adv 7.30
This commit is contained in:
parent
04adc72d92
commit
6d00107944
@ -253,6 +253,10 @@ export default {
|
|||||||
tabLiveList(){
|
tabLiveList(){
|
||||||
return vm.$u.post('Specialci/tabLiveList')
|
return vm.$u.post('Specialci/tabLiveList')
|
||||||
},
|
},
|
||||||
|
// 商城-活动广告
|
||||||
|
getStoreActivity() {
|
||||||
|
return vm.$u.post('adv/storeActivity')
|
||||||
|
},
|
||||||
// 获取图文视频详情
|
// 获取图文视频详情
|
||||||
articleInfo({article_id}){
|
articleInfo({article_id}){
|
||||||
return vm.$u.post('article/articleInfo',{article_id})
|
return vm.$u.post('article/articleInfo',{article_id})
|
||||||
|
@ -270,6 +270,9 @@ export default {
|
|||||||
getOrderEvaluateInfo({ id }) {
|
getOrderEvaluateInfo({ id }) {
|
||||||
return vm.$u.post('Order/getOrderEvaluateInfo', { id: id });
|
return vm.$u.post('Order/getOrderEvaluateInfo', { id: id });
|
||||||
},
|
},
|
||||||
|
orderLogistics({ id }) {
|
||||||
|
return vm.$u.post('Order/orderLogistics', { order_id: id });
|
||||||
|
},
|
||||||
// 订单评价/修改评价
|
// 订单评价/修改评价
|
||||||
updateOrderEvaluate({ id, content, scores_one, scores_two, scores_three, file }) {
|
updateOrderEvaluate({ id, content, scores_one, scores_two, scores_three, file }) {
|
||||||
let params = {
|
let params = {
|
||||||
|
@ -21,7 +21,7 @@ const store = new Vuex.Store({
|
|||||||
},
|
},
|
||||||
getters: {
|
getters: {
|
||||||
getOrderAddress(state) {
|
getOrderAddress(state) {
|
||||||
return state.orderAddress;
|
return state.orderAddress || {};
|
||||||
},
|
},
|
||||||
getGoodsType(state) {
|
getGoodsType(state) {
|
||||||
return state.goodsDetails.type;
|
return state.goodsDetails.type;
|
||||||
|
@ -118,19 +118,11 @@ export default {
|
|||||||
// latitude,
|
// latitude,
|
||||||
}).then((res)=>{
|
}).then((res)=>{
|
||||||
if (res.errCode == 0) {
|
if (res.errCode == 0) {
|
||||||
uni.redirectTo({
|
this.$refs.uToast.show({
|
||||||
url: '/pageE/more/Address'
|
title: res.message,
|
||||||
});
|
type: 'success',
|
||||||
// this.$refs.uToast.show({
|
back: true,
|
||||||
// title: res.message,
|
})
|
||||||
// type: 'success',
|
|
||||||
// // url: '/pageE/more/Address',
|
|
||||||
// callback() {
|
|
||||||
// uni.redirectTo({
|
|
||||||
// url: '/pageE/more/Address'
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
} else {
|
} else {
|
||||||
this.showToast(res.message, 'warning');
|
this.showToast(res.message, 'warning');
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
<!-- 加载更多 -->
|
<!-- 加载更多 -->
|
||||||
<u-loadmore :status="loadStatus" bgColor="#FFF" margin-top="20" margin-bottom="20"></u-loadmore>
|
<u-loadmore :status="loadStatus" bgColor="#FFF" margin-top="20" margin-bottom="20" @loadmore="loadMore" v-if="goodsList.length>=pageSize"></u-loadmore>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@ -22,6 +22,7 @@ export default {
|
|||||||
name:"list",
|
name:"list",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
pageSize: 12,
|
||||||
current: -1,
|
current: -1,
|
||||||
swiperCurrent: 0,
|
swiperCurrent: 0,
|
||||||
goodsList: [],
|
goodsList: [],
|
||||||
@ -60,7 +61,7 @@ export default {
|
|||||||
this.page--;
|
this.page--;
|
||||||
this.loadStatus = 'nomore';
|
this.loadStatus = 'nomore';
|
||||||
} else {
|
} else {
|
||||||
this.loadStatus = 'loading';
|
this.loadStatus = 'loadmore';
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.loadStatus = "nomore";
|
this.loadStatus = "nomore";
|
||||||
@ -82,6 +83,7 @@ export default {
|
|||||||
gc_id: gc_id,
|
gc_id: gc_id,
|
||||||
})
|
})
|
||||||
if (res.errCode == 0) {
|
if (res.errCode == 0) {
|
||||||
|
this.timer = true;
|
||||||
if(reload) this.goodsList = res.data.goodsList;
|
if(reload) this.goodsList = res.data.goodsList;
|
||||||
else this.goodsList.push(...res.data.goodsList);
|
else this.goodsList.push(...res.data.goodsList);
|
||||||
// console.log(this.goodsList);
|
// console.log(this.goodsList);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<scroll-view scroll-y class="comment" @scrolltolower="loadMore">
|
<scroll-view scroll-y class="comment" @scrolltolower="loadMore">
|
||||||
<view class="label-list">
|
<view class="label-list">
|
||||||
<view v-for="(label, index) in evaluateSpec" :key="index" :class="{'active': current == index}" @click="current=index">{{ index + '(' + label + '}' }}</view>
|
<view v-for="(label, index) in evaluateSpec" :key="index" :class="{'active': current == index}" @click="current=index">{{ index + '(' + label + ')' }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="comment-container">
|
<view class="comment-container">
|
||||||
<view v-for="(item, index) in evalueList" :key="index" class="itme">
|
<view v-for="(item, index) in evalueList" :key="index" class="itme">
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="order">
|
<view class="order">
|
||||||
<view class="info-address" @click="changeAddress">
|
<view class="info-address" @click="changeAddress" v-if="JSON.stringify(addressInfo) != '{}'">
|
||||||
<image src="../static/image/2.png" class="address-icon"></image>
|
<image src="../static/image/2.png" class="address-icon"></image>
|
||||||
<view class="address">
|
<view class="address">
|
||||||
<view class="user-info">
|
<view class="user-info">
|
||||||
@ -11,6 +11,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<image src="../static/image/1.png" class="right"></image>
|
<image src="../static/image/1.png" class="right"></image>
|
||||||
</view>
|
</view>
|
||||||
|
<view v-else class="address-none" @click="changeAddress">请选择地址</view>
|
||||||
<view class="main">
|
<view class="main">
|
||||||
<view v-for="(item, index) in orderInfo.store_cart_list" :key="index">
|
<view v-for="(item, index) in orderInfo.store_cart_list" :key="index">
|
||||||
<view class="goods-info">
|
<view class="goods-info">
|
||||||
@ -147,17 +148,18 @@ export default {
|
|||||||
this.orderType = this.$store.state.orderType;
|
this.orderType = this.$store.state.orderType;
|
||||||
this.orderInfo = this.$store.state.orderInfo;
|
this.orderInfo = this.$store.state.orderInfo;
|
||||||
// console.log(this.orderType);
|
// console.log(this.orderType);
|
||||||
console.log(this.orderInfo);
|
// console.log(this.orderInfo);
|
||||||
this.getGoodsClass();
|
this.getGoodsClass();
|
||||||
|
this.setTotalPrice();
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.storeCoupon = {};
|
this.storeCoupon = {};
|
||||||
this.choiceCoupon = {};
|
this.choiceCoupon = {};
|
||||||
// 判断是不是从选择地址页面返回
|
// 判断是不是从选择地址页面返回
|
||||||
if(JSON.stringify(this.$store.state.orderAddress) == '{}') {
|
if(JSON.stringify(this.$store.state.orderAddress) == '{}') {
|
||||||
this.$store.commit('updateAddress', this.orderInfo.address_info);
|
if(this.orderInfo.address_info) this.$store.commit('updateAddress', this.orderInfo.address_info);
|
||||||
} else {
|
} else {
|
||||||
this.addressInfo = this.$store.state.orderAddress;
|
if(this.$store.getters.getOrderAddress) this.addressInfo = this.$store.state.orderAddress;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
@ -166,22 +168,8 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
'$store.state.orderAddress'(value) {
|
'$store.state.orderAddress'(value) {
|
||||||
this.addressInfo = value;
|
this.addressInfo = value;
|
||||||
this.getFreight();
|
if(JSON.stringify(value) != '{}') this.getFreight();
|
||||||
},
|
},
|
||||||
// storeCoupon: {
|
|
||||||
// deep: true,
|
|
||||||
// handler() {
|
|
||||||
// console.log(222);
|
|
||||||
// this.setTotalPrice(); // 计算总价
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
// choiceCoupon: {
|
|
||||||
// deep: true,
|
|
||||||
// handler() {
|
|
||||||
// console.log(111);
|
|
||||||
// this.setTotalPrice(); // 计算总价
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 如果有pintuangroup_headid为参团不然为开团
|
// 如果有pintuangroup_headid为参团不然为开团
|
||||||
@ -242,6 +230,11 @@ export default {
|
|||||||
if(JSON.stringify(this.choiceCoupon) != '{}') {
|
if(JSON.stringify(this.choiceCoupon) != '{}') {
|
||||||
coupon.push(0 + '|' + this.choiceCoupon.voucher_id)
|
coupon.push(0 + '|' + this.choiceCoupon.voucher_id)
|
||||||
}
|
}
|
||||||
|
// 验证是否选择地址
|
||||||
|
if(!this.addressInfo || JSON.stringify(this.addressInfo) == '{}') {
|
||||||
|
this.$u.toast('收货地址不能为空');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
let params = {
|
let params = {
|
||||||
ifcart: ifcart,
|
ifcart: ifcart,
|
||||||
cart_id: id,
|
cart_id: id,
|
||||||
@ -304,6 +297,7 @@ export default {
|
|||||||
},
|
},
|
||||||
setTotalPrice() {
|
setTotalPrice() {
|
||||||
const goods = this.orderInfo.store_goods_total;
|
const goods = this.orderInfo.store_goods_total;
|
||||||
|
console.log(this.freight);
|
||||||
const freight = this.freight;
|
const freight = this.freight;
|
||||||
let price = 0;
|
let price = 0;
|
||||||
// 商品价格加上运费
|
// 商品价格加上运费
|
||||||
@ -398,6 +392,14 @@ export default {
|
|||||||
height: 22rpx;
|
height: 22rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.address-none {
|
||||||
|
height: 150rpx;
|
||||||
|
line-height: 150rpx;
|
||||||
|
margin-bottom: 10rpx;
|
||||||
|
background:rgba(255,255,255,1);
|
||||||
|
text-align: center;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
.main {
|
.main {
|
||||||
margin-bottom: 50rpx;
|
margin-bottom: 50rpx;
|
||||||
> view {
|
> view {
|
||||||
|
@ -5,9 +5,9 @@
|
|||||||
</view>
|
</view>
|
||||||
<swiper :current="swiperCurrent" @transition="transition" @animationfinish="animationfinish" :style="{height: swiperHeight}">
|
<swiper :current="swiperCurrent" @transition="transition" @animationfinish="animationfinish" :style="{height: swiperHeight}">
|
||||||
<swiper-item class="swiper-item" v-for="(_, index) in tabList" :key="index">
|
<swiper-item class="swiper-item" v-for="(_, index) in tabList" :key="index">
|
||||||
<scroll-view scroll-y style="height: 800rpx;width: 100%;" @scrolltolower="onreachBottom">
|
<scroll-view scroll-y style="width: 100%;" @scrolltolower="onreachBottom">
|
||||||
<SpecialGoods v-for="(item, index) in pinTuanList" :key="index" :item="item" type='group'></SpecialGoods>
|
<SpecialGoods v-for="(item, index) in pinTuanList" :key="index" :item="item" type='group'></SpecialGoods>
|
||||||
<loadmore ref="loadmore" @callback="getPinTuanList" bgColor="#FFF"></loadmore>
|
<u-loadmore :status="loadStatus" bgColor="#FFF" margin-top="20" margin-bottom="20" v-if="pinTuanList.length>=pageSize" @loadmore="onreachBottom"></u-loadmore>
|
||||||
<u-empty text="暂无商品" mode="list" color="#000" v-if="!pinTuanList.length"></u-empty>
|
<u-empty text="暂无商品" mode="list" color="#000" v-if="!pinTuanList.length"></u-empty>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
@ -15,22 +15,22 @@
|
|||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import loadmore from "@/components/loadmore/index";
|
|
||||||
import SpecialGoods from "../../components/shop/special-shop/index";
|
import SpecialGoods from "../../components/shop/special-shop/index";
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
pageSize: 12,
|
||||||
tabList: [],
|
tabList: [],
|
||||||
current: -1,
|
current: -1,
|
||||||
swiperCurrent: 0,
|
swiperCurrent: 0,
|
||||||
page: 0,
|
page: 0,
|
||||||
pinTuanList: [],
|
pinTuanList: [],
|
||||||
swiperHeight: '',
|
swiperHeight: '',
|
||||||
timer: '', // 限制下拉刷新
|
timer: true, // 限制下拉刷新
|
||||||
|
loadStatus: 'loadmore',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
loadmore,
|
|
||||||
SpecialGoods,
|
SpecialGoods,
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
@ -39,7 +39,7 @@ export default {
|
|||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
current(index) {
|
current(index) {
|
||||||
this.getPinTuanList({ id: this.tabList[index].gc_id });
|
this.getPinTuanList({ id: this.tabList[index].gc_id, load: 'reload' });
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -53,14 +53,39 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 拼团列表
|
// 拼团列表
|
||||||
async getPinTuanList({ id, page }) {
|
async getPinTuanList({ id, page, load }) {
|
||||||
const res = await this.$u.api.getPinTuanList({
|
const res = await this.$u.api.getPinTuanList({
|
||||||
page: this.page,
|
page: this.page,
|
||||||
gc_id: id,
|
gc_id: id,
|
||||||
})
|
})
|
||||||
this.pinTuanList = res.data;
|
this.timer = true;
|
||||||
|
if (res.errCode == 0) {
|
||||||
|
if(load == 'reload') this.pinTuanList = res.data;
|
||||||
|
else if(load == 'loadmore') this.pinTuanList.push(...res.data);
|
||||||
|
}
|
||||||
return res.data.length;
|
return res.data.length;
|
||||||
},
|
},
|
||||||
|
// scroll-view到底部加载更多
|
||||||
|
onreachBottom() {
|
||||||
|
if(!this.timer) return false;
|
||||||
|
this.loadStatus = "loading";
|
||||||
|
this.page++;
|
||||||
|
this.getPinTuanList({
|
||||||
|
id: this.tabList[this.current].gc_id,
|
||||||
|
load: 'loadmore',
|
||||||
|
}).then(length => {
|
||||||
|
console.log(length);
|
||||||
|
if(length == 0) {
|
||||||
|
this.page--;
|
||||||
|
this.loadStatus = 'nomore';
|
||||||
|
} else {
|
||||||
|
this.loadStatus = 'loadmore';
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.loadStatus = "nomore";
|
||||||
|
this.page--;
|
||||||
|
})
|
||||||
|
},
|
||||||
// tabs通知swiper切换
|
// tabs通知swiper切换
|
||||||
tabsChange(index) {
|
tabsChange(index) {
|
||||||
this.swiperCurrent = index;
|
this.swiperCurrent = index;
|
||||||
@ -77,24 +102,6 @@ export default {
|
|||||||
this.swiperCurrent = current;
|
this.swiperCurrent = current;
|
||||||
this.current = current;
|
this.current = current;
|
||||||
},
|
},
|
||||||
// scroll-view到底部加载更多
|
|
||||||
onreachBottom() {
|
|
||||||
this.$$refs.loadmore.reachBottom();
|
|
||||||
if(!this.timer) return false;
|
|
||||||
this.loadStatus = "loading";
|
|
||||||
this.page++;
|
|
||||||
this.getPinTuanList().then(length => {
|
|
||||||
if(length == 0) {
|
|
||||||
this.page--;
|
|
||||||
this.status = 'nomore';
|
|
||||||
} else {
|
|
||||||
this.status = 'loading';
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.loadStatus = "nomore";
|
|
||||||
this.page--;
|
|
||||||
})
|
|
||||||
},
|
|
||||||
setViewHeight() {
|
setViewHeight() {
|
||||||
const res = uni.getSystemInfoSync();
|
const res = uni.getSystemInfoSync();
|
||||||
this.swiperHeight = res.windowHeight - (88 / 2) + 'px';
|
this.swiperHeight = res.windowHeight - (88 / 2) + 'px';
|
||||||
|
@ -67,6 +67,34 @@ export default {
|
|||||||
onLoad() {
|
onLoad() {
|
||||||
this.getUserInfo();
|
this.getUserInfo();
|
||||||
},
|
},
|
||||||
|
// 监听头像裁剪
|
||||||
|
created() {
|
||||||
|
// uni.$on('uAvatarCropper', path => {
|
||||||
|
// const url = this.$u.http.config.baseUrl + '/Upload/uploadfile';
|
||||||
|
// this.avatar = path;
|
||||||
|
// // 可以在此上传到服务端
|
||||||
|
// // uni.uploadFile({
|
||||||
|
// // url: 'http://www.example.com/upload',
|
||||||
|
// // filePath: path,
|
||||||
|
// // name: 'file',
|
||||||
|
// // complete: (res) => {
|
||||||
|
// // console.log(res);
|
||||||
|
// // }
|
||||||
|
// // });
|
||||||
|
// common.uploadFile({
|
||||||
|
// url: url,
|
||||||
|
// name: 'avatar',
|
||||||
|
// filePath: path
|
||||||
|
// }).then(result => {
|
||||||
|
// // console.log(result);
|
||||||
|
// this.$set(this, 'avatar', result.file_path);
|
||||||
|
// // this.avatar = result.file_path;
|
||||||
|
// this.uploadPath = result.file_name;
|
||||||
|
// }, error => {
|
||||||
|
// this.$u.toast(error);
|
||||||
|
// })
|
||||||
|
// })
|
||||||
|
},
|
||||||
onNavigationBarButtonTap(e) {
|
onNavigationBarButtonTap(e) {
|
||||||
if( e.index == 0 ) uni.navigateBack();
|
if( e.index == 0 ) uni.navigateBack();
|
||||||
},
|
},
|
||||||
@ -94,6 +122,17 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
// 头像裁剪
|
||||||
|
// chooseAvatar() {
|
||||||
|
// this.$u.route({
|
||||||
|
// url: '/uview-ui/components/u-avatar-cropper/u-avatar-cropper',
|
||||||
|
// params: {
|
||||||
|
// destWidth: 300,
|
||||||
|
// rectWidth: 200,
|
||||||
|
// fileType: 'jpg',
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// },
|
||||||
getUserInfo() {
|
getUserInfo() {
|
||||||
this.$u.api.getMemberInfo().then(res => {
|
this.$u.api.getMemberInfo().then(res => {
|
||||||
if (res.errCode == 0) {
|
if (res.errCode == 0) {
|
||||||
|
@ -3,11 +3,11 @@
|
|||||||
<view class="integral-top">
|
<view class="integral-top">
|
||||||
<view>
|
<view>
|
||||||
<view class="title">总积分</view>
|
<view class="title">总积分</view>
|
||||||
<view class="value">{{ memberInfo.member_points }}</view>
|
<view class="value">{{ memberInfo.member_points || 0 }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<view class="title">经验值</view>
|
<view class="title">经验值</view>
|
||||||
<view class="value">{{ memberInfo.member_exppoints }}</view>
|
<view class="value">{{ memberInfo.member_exppoints || 0 }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view @click="viewProgress">
|
<view @click="viewProgress">
|
||||||
<view class="title">预计进度</view>
|
<view class="title">预计进度</view>
|
||||||
|
@ -3,10 +3,11 @@
|
|||||||
<u-tabs-swiper ref="coupon" :list="couponGroupList" name="gc_name" :is-scroll="true" active-color="#FF780F" :current="couponCurrent" font-size="24" :show-bar="false" @change="couponTabsChange" height="88" ></u-tabs-swiper>
|
<u-tabs-swiper ref="coupon" :list="couponGroupList" name="gc_name" :is-scroll="true" active-color="#FF780F" :current="couponCurrent" font-size="24" :show-bar="false" @change="couponTabsChange" height="88" ></u-tabs-swiper>
|
||||||
<swiper :current="swiperCouponCurrent" @animationfinish="couponAnimationFinish" :style="{ height: swiperHeight }">
|
<swiper :current="swiperCouponCurrent" @animationfinish="couponAnimationFinish" :style="{ height: swiperHeight }">
|
||||||
<swiper-item class="swiper-coupon-item" v-for="(_, i) in couponGroupList" :key="i">
|
<swiper-item class="swiper-coupon-item" v-for="(_, i) in couponGroupList" :key="i">
|
||||||
<scroll-view scroll-y style="height: 100%;">
|
<scroll-view scroll-y style="height: 100%;" @scrolltolower="onreachBottom">
|
||||||
<view v-for="(coupon, index) in couponList" :key="index" class="coupon-item">
|
<view v-for="(coupon, index) in couponList" :key="index" class="coupon-item">
|
||||||
<Coupon :couponInfo="coupon" :status='0' :type="0" @exchange="exchangeCoupon($event)"></Coupon>
|
<Coupon :couponInfo="coupon" :status='0' :type="0" @exchange="exchangeCoupon($event)"></Coupon>
|
||||||
</view>
|
</view>
|
||||||
|
<u-loadmore :status="loadStatus" bgColor="#FFF" margin-top="20" margin-bottom="20" v-if="couponList.length>=pageSize" @loadmore="onreachBottom"></u-loadmore>
|
||||||
<u-empty text="暂无优惠券" mode="coupon" color="#000" v-if="!couponList.length"></u-empty>
|
<u-empty text="暂无优惠券" mode="coupon" color="#000" v-if="!couponList.length"></u-empty>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
@ -18,6 +19,7 @@ import Coupon from "@/components/mine/coupon/index";
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
pageSize: 1,
|
||||||
swiperHeight: '',
|
swiperHeight: '',
|
||||||
couponCurrent: 0,
|
couponCurrent: 0,
|
||||||
swiperCouponCurrent: 0,
|
swiperCouponCurrent: 0,
|
||||||
@ -38,20 +40,18 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
couponCurrent(index) {
|
couponCurrent(index) {
|
||||||
const id = this.couponGroupList[index].gc_id;
|
const id = this.couponGroupList[index].gc_id;
|
||||||
this.getCouponList({ gc_id: id });
|
this.getCouponList({ gc_id: id, load: 'reload' });
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadMore(page) {
|
onreachBottom() {
|
||||||
if(!this.timer) return false;
|
if(!this.timer) return false;
|
||||||
this.loadStatus = "loading";
|
this.loadStatus = "loading";
|
||||||
this.page++;
|
this.page++;
|
||||||
this.getGoodsRecommend({
|
this.getCouponList({
|
||||||
gc_id: this.classifyList[this.current].gc_id,
|
gc_id: this.couponGroupList[this.couponCurrent].gc_id,
|
||||||
page: this.page,
|
load: 'loadmore',
|
||||||
reload: false,
|
|
||||||
}).then(length => {
|
}).then(length => {
|
||||||
// console.log(length);
|
|
||||||
if(length == 0) {
|
if(length == 0) {
|
||||||
this.page--;
|
this.page--;
|
||||||
this.loadStatus = 'nomore';
|
this.loadStatus = 'nomore';
|
||||||
@ -67,24 +67,24 @@ export default {
|
|||||||
this.$u.api.getGoodsClass().then(res => {
|
this.$u.api.getGoodsClass().then(res => {
|
||||||
if(res.errCode == 0) {
|
if(res.errCode == 0) {
|
||||||
this.couponGroupList = res.data;
|
this.couponGroupList = res.data;
|
||||||
this.getCouponList(this.couponGroupList[0].gc_id);
|
this.getCouponList({ gc_id: this.couponGroupList[0].gc_id, load: 'reload' });
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getCouponList({ gc_id }) {
|
async getCouponList({ gc_id, load }) {
|
||||||
this.$u.api.getCouponList({
|
const res = await this.$u.api.getCouponList({
|
||||||
page: this.page,
|
page: this.page,
|
||||||
gc_id: gc_id,
|
gc_id: gc_id,
|
||||||
}).then(res => {
|
|
||||||
if(res.errCode == 0) {
|
|
||||||
this.couponList = res.data;
|
|
||||||
} else {
|
|
||||||
this.couponList = [];
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
this.timer = true;
|
||||||
|
if(res.errCode == 0) {
|
||||||
|
if(load == 'reload') this.couponList = res.data;
|
||||||
|
else if(load == 'loadmore') this.couponList.push(...res.data);
|
||||||
|
}
|
||||||
|
return res.data.length;
|
||||||
},
|
},
|
||||||
exchangeCoupon(id) {
|
exchangeCoupon(id) {
|
||||||
console.log(id);
|
// console.log(id);
|
||||||
|
|
||||||
},
|
},
|
||||||
couponTabsChange(index) {
|
couponTabsChange(index) {
|
||||||
|
@ -1,20 +1,20 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="logistics">
|
<view class="logistics">
|
||||||
<view class="logistics-info">
|
<view class="logistics-info">
|
||||||
<view class="express">
|
<!-- <view class="express">
|
||||||
<image src="../static/mine/23.png"></image>
|
<image src="../static/mine/23.png"></image>
|
||||||
<view class="dispatcher-info">
|
<view class="dispatcher-info">
|
||||||
<view>派件员:xxx</view>
|
<view>派件员:xxx</view>
|
||||||
<view>手机:123456789</view>
|
<view>手机:123456789</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
<view class="express-status">
|
<view class="express-status">
|
||||||
<image src="../static/mine/23.png"></image>
|
<image :src="expressInfo.goods_image"></image>
|
||||||
<view>
|
<view>
|
||||||
<view class="status">物流状态:已签收</view>
|
<view class="status">物流状态:{{ expressInfo.is_check }}</view>
|
||||||
<view>承运来源:百世快递</view>
|
<view>承运来源:{{ expressInfo.express_name || '' }}</view>
|
||||||
<view>运单编号:3253463464777</view>
|
<view>运单编号:{{ expressInfo.shipping_code || '' }}</view>
|
||||||
<view>官方电话:4009-565-656</view>
|
<view>官方电话:{{ expressInfo.express_phone || '' }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -22,8 +22,8 @@
|
|||||||
<view class="title">物流跟踪</view>
|
<view class="title">物流跟踪</view>
|
||||||
<view class="main">
|
<view class="main">
|
||||||
<view v-for="(item, index) in list" :key="index" class="logistics-item">
|
<view v-for="(item, index) in list" :key="index" class="logistics-item">
|
||||||
<view class="info u-line-2">{{ item.address }}</view>
|
<view class="info u-line-2">{{ item.content }}</view>
|
||||||
<view class="date">{{ item.date }}</view>
|
<view class="date">{{ item.kd_time }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -33,24 +33,23 @@
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
list: [
|
list: [],
|
||||||
{
|
expressInfo: {},
|
||||||
address: '[北京市]【已签收,本人签收】,感谢使用百事快递,期待再次为您服务[北京市]【已签收,本人签收】,感谢使用百事快递,期待再次为您服务[北京市]【已签收,本人签收】,感谢使用百事快递,期待再次为您服务',
|
}
|
||||||
date: '2019-12-25 09:38:21'
|
},
|
||||||
},
|
onLoad(option) {
|
||||||
{
|
this.getOrderLogistics(option.oid);
|
||||||
address: '[北京市]【已签收,本人签收】,感谢使用百事快递,期待再次为您服务',
|
},
|
||||||
date: '2019-12-25 09:38:21'
|
methods: {
|
||||||
},
|
getOrderLogistics(id) {
|
||||||
{
|
this.$u.api.orderLogistics({ id: 16 }).then(res => {
|
||||||
address: '[北京市]【已签收,本人签收】,感谢使用百事快递,期待再次为您服务',
|
if(res.errCode == 0) {
|
||||||
date: '2019-12-15 09:38:20'
|
this.expressInfo = res.data.express_info;
|
||||||
},
|
this.list = res.data.express_list;
|
||||||
{
|
} else {
|
||||||
address: '卖家已发货',
|
this.list = [];
|
||||||
date: '2019-12-15 09:38:20'
|
|
||||||
}
|
}
|
||||||
]
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -26,7 +26,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
name: '',
|
name: '',
|
||||||
time: '',
|
time: '',
|
||||||
address: '四川省攀枝花市银江镇',
|
address: '',
|
||||||
params: {
|
params: {
|
||||||
year: true,
|
year: true,
|
||||||
month: true,
|
month: true,
|
||||||
|
@ -15,8 +15,9 @@
|
|||||||
<view class="order-info">
|
<view class="order-info">
|
||||||
<image src="../static/mine/23.png"></image>
|
<image src="../static/mine/23.png"></image>
|
||||||
<view v-if="item.deliver_goods_type == 2 && item.order_status == 20">
|
<view v-if="item.deliver_goods_type == 2 && item.order_status == 20">
|
||||||
<view>骑手名字:{{ item.takeawayer_name }}</view>
|
<view>骑手名字:{{ item.takeawayer_name || '' }}</view>
|
||||||
<view>联系方式:{{ item.member_phone }}</view>
|
<view>联系方式:{{ item.member_phone || '' }}</view>
|
||||||
|
<view>所属公司:{{ item.company || '' }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="item.order_status == 0">
|
<view v-if="item.order_status == 0">
|
||||||
<view>正在等待接单</view>
|
<view>正在等待接单</view>
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
<scroll-view style="width:100%;height:100%" scroll-y="true">
|
<scroll-view style="width:100%;height:100%" scroll-y="true">
|
||||||
<view class="box">
|
<view class="box">
|
||||||
<!-- <indexad style="width:690rpx"></indexad> -->
|
<!-- <indexad style="width:690rpx"></indexad> -->
|
||||||
<u-swiper mode="dot" :list="indexImageSwiper" name="adv_code"></u-swiper>
|
<u-swiper mode="dot" :list="indexImageSwiper" name="adv_code" @click="clickFImage"></u-swiper>
|
||||||
<view class="list">
|
<view class="list">
|
||||||
<view>
|
<view>
|
||||||
<videoItem v-for="item in articleList.filter((_, index) => !(index&1))" :key="item.article_id" :item="item"
|
<videoItem v-for="item in articleList.filter((_, index) => !(index&1))" :key="item.article_id" :item="item"
|
||||||
@ -36,7 +36,7 @@
|
|||||||
<swiper-item>
|
<swiper-item>
|
||||||
<scroll-view style="width:100%;height:100%" scroll-y="true">
|
<scroll-view style="width:100%;height:100%" scroll-y="true">
|
||||||
<view class="box">
|
<view class="box">
|
||||||
<u-swiper mode="dot" :list="zhiboImageSwiper" name="adv_code"></u-swiper>
|
<u-swiper mode="dot" :list="zhiboImageSwiper" name="adv_code" @click="clickSImage($event, 2)"></u-swiper>
|
||||||
<view class="list">
|
<view class="list">
|
||||||
<view>
|
<view>
|
||||||
<zhiboItem v-for="item in tabLiveLists.filter((_, index) => !(index&1))" :key="item.live_id" :name="item.store_name" :image="item.cover_img" :url="item.url"></zhiboItem>
|
<zhiboItem v-for="item in tabLiveLists.filter((_, index) => !(index&1))" :key="item.live_id" :name="item.store_name" :image="item.cover_img" :url="item.url"></zhiboItem>
|
||||||
@ -283,6 +283,28 @@
|
|||||||
url: '/pageB/follow/index'
|
url: '/pageB/follow/index'
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
clickFImage(index) {
|
||||||
|
const item = this.indexImageSwiper[index];
|
||||||
|
console.log(item);
|
||||||
|
this.activityLink({ type: item.url_type, id: item.info_id });
|
||||||
|
},
|
||||||
|
clickSImage(index) {
|
||||||
|
const item = this.zhiboImageSwiper[index];
|
||||||
|
console.log(item);
|
||||||
|
this.activityLink({ type: item.url_type, id: item.info_id });
|
||||||
|
},
|
||||||
|
activityLink({ type, id }) {
|
||||||
|
if(type == 0) return false;
|
||||||
|
// type 1 商品详情页, 2 店铺详情页
|
||||||
|
const url = type == 1 ? 'pageB/sdetails/index' : 'pageC/merchant/index';
|
||||||
|
let params = { id: id };
|
||||||
|
// type: 1 // 商品详情 1普通 2拼团 3秒杀 4优惠券
|
||||||
|
if(type == 1) Object.assign(params, { type: 1 });
|
||||||
|
this.$u.route({
|
||||||
|
url: url,
|
||||||
|
params: params
|
||||||
|
})
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -241,6 +241,12 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.mine-container {
|
.mine-container {
|
||||||
|
@mixin image-size($image-width, $image-height) {
|
||||||
|
> image {
|
||||||
|
width: $image-width !important;
|
||||||
|
height: $image-height !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
@mixin common-mine($content-padding-top, $content-padding-bottom, $image-width, $image-height) {
|
@mixin common-mine($content-padding-top, $content-padding-bottom, $image-width, $image-height) {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
width: 690rpx;
|
width: 690rpx;
|
||||||
@ -306,9 +312,24 @@ export default {
|
|||||||
}
|
}
|
||||||
.content {
|
.content {
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
> view {
|
> view:nth-child(1){
|
||||||
text-align: center;
|
@include image-size($image-width: 33rpx, $image-height: 36rpx);
|
||||||
};
|
}
|
||||||
|
> view:nth-child(2){
|
||||||
|
@include image-size($image-width: 39rpx, $image-height: 33rpx);
|
||||||
|
}
|
||||||
|
> view:nth-child(3){
|
||||||
|
@include image-size($image-width: 41rpx, $image-height: 33rpx);
|
||||||
|
}
|
||||||
|
> view:nth-child(4){
|
||||||
|
@include image-size($image-width: 40rpx, $image-height: 35rpx);
|
||||||
|
}
|
||||||
|
> view:nth-child(5){
|
||||||
|
@include image-size($image-width: 37rpx, $image-height: 37rpx);
|
||||||
|
}
|
||||||
|
> view:nth-child(6){
|
||||||
|
@include image-size($image-width: 33rpx, $image-height: 35rpx);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.tool {
|
.tool {
|
||||||
|
@ -43,7 +43,9 @@
|
|||||||
<pintuan v-if="JSON.stringify(pinTuanPush) != '{}'" :recommendData="pinTuanPush"></pintuan>
|
<pintuan v-if="JSON.stringify(pinTuanPush) != '{}'" :recommendData="pinTuanPush"></pintuan>
|
||||||
<!-- 拼团列表 -->
|
<!-- 拼团列表 -->
|
||||||
<group></group>
|
<group></group>
|
||||||
<image class="lingquan"></image>
|
<view class="activity-view">
|
||||||
|
<image class="lingquan" :src="activityInfo.adv_code" @click="activityLink({ type: activityInfo.url_type, id: activityInfo.info_id })"></image>
|
||||||
|
</view>
|
||||||
<youhq></youhq>
|
<youhq></youhq>
|
||||||
<list ref="recommendGoods"></list>
|
<list ref="recommendGoods"></list>
|
||||||
<view class="cart" @click="toCartPage">
|
<view class="cart" @click="toCartPage">
|
||||||
@ -89,6 +91,7 @@ export default {
|
|||||||
seckillTime: {}, // 秒杀时间
|
seckillTime: {}, // 秒杀时间
|
||||||
// couponGroupList: [], // 优惠券拼团分类
|
// couponGroupList: [], // 优惠券拼团分类
|
||||||
pinTuanPush: {}, // 拼团推荐
|
pinTuanPush: {}, // 拼团推荐
|
||||||
|
activityInfo: {},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
@ -98,6 +101,7 @@ export default {
|
|||||||
this.getRecommendedSpike();
|
this.getRecommendedSpike();
|
||||||
this.getSpikeList();
|
this.getSpikeList();
|
||||||
this.getPinTuanPush();
|
this.getPinTuanPush();
|
||||||
|
this.getStoreActivity();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
sousuo() {
|
sousuo() {
|
||||||
@ -170,6 +174,25 @@ export default {
|
|||||||
url: '/pageC/classify/index'
|
url: '/pageC/classify/index'
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
getStoreActivity() {
|
||||||
|
this.$u.api.getStoreActivity().then(res => {
|
||||||
|
if(res.errCode == 0) {
|
||||||
|
this.activityInfo = res.data;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
activityLink({ type, id }) {
|
||||||
|
if(type == 0 || type == 2) return false;
|
||||||
|
// type 1 商品详情页, 2 店铺详情页
|
||||||
|
const url = type == 1 ? 'pageB/sdetails/index' : '';
|
||||||
|
let params = { id: id };
|
||||||
|
// type: 1 // 商品详情 1普通 2拼团 3秒杀 4优惠券
|
||||||
|
if(type == 1) Object.assign(params, { type: 1 });
|
||||||
|
this.$u.route({
|
||||||
|
url: url,
|
||||||
|
params: params
|
||||||
|
})
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@ -251,13 +274,15 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.lingquan {
|
.activity-view {
|
||||||
width: 750rpx;
|
padding: 20rpx 30rpx;
|
||||||
height: 177rpx;
|
text-align: center;
|
||||||
margin-left: -33rpx;
|
.lingquan {
|
||||||
margin-top: 29rpx;
|
background-color: #ececec;
|
||||||
background-color: #ececec;
|
width: 688rpx;
|
||||||
}
|
height: 138rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
.cart {
|
.cart {
|
||||||
z-index: 9;
|
z-index: 9;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
|
Loading…
Reference in New Issue
Block a user