adv 7.30
This commit is contained in:
@@ -67,6 +67,34 @@ export default {
|
||||
onLoad() {
|
||||
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) {
|
||||
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() {
|
||||
this.$u.api.getMemberInfo().then(res => {
|
||||
if (res.errCode == 0) {
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
<view class="integral-top">
|
||||
<view>
|
||||
<view class="title">总积分</view>
|
||||
<view class="value">{{ memberInfo.member_points }}</view>
|
||||
<view class="value">{{ memberInfo.member_points || 0 }}</view>
|
||||
</view>
|
||||
<view>
|
||||
<view class="title">经验值</view>
|
||||
<view class="value">{{ memberInfo.member_exppoints }}</view>
|
||||
<view class="value">{{ memberInfo.member_exppoints || 0 }}</view>
|
||||
</view>
|
||||
<view @click="viewProgress">
|
||||
<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>
|
||||
<swiper :current="swiperCouponCurrent" @animationfinish="couponAnimationFinish" :style="{ height: swiperHeight }">
|
||||
<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">
|
||||
<Coupon :couponInfo="coupon" :status='0' :type="0" @exchange="exchangeCoupon($event)"></Coupon>
|
||||
</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>
|
||||
</scroll-view>
|
||||
</swiper-item>
|
||||
@@ -18,6 +19,7 @@ import Coupon from "@/components/mine/coupon/index";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
pageSize: 1,
|
||||
swiperHeight: '',
|
||||
couponCurrent: 0,
|
||||
swiperCouponCurrent: 0,
|
||||
@@ -38,20 +40,18 @@ export default {
|
||||
watch: {
|
||||
couponCurrent(index) {
|
||||
const id = this.couponGroupList[index].gc_id;
|
||||
this.getCouponList({ gc_id: id });
|
||||
this.getCouponList({ gc_id: id, load: 'reload' });
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
loadMore(page) {
|
||||
onreachBottom() {
|
||||
if(!this.timer) return false;
|
||||
this.loadStatus = "loading";
|
||||
this.page++;
|
||||
this.getGoodsRecommend({
|
||||
gc_id: this.classifyList[this.current].gc_id,
|
||||
page: this.page,
|
||||
reload: false,
|
||||
this.getCouponList({
|
||||
gc_id: this.couponGroupList[this.couponCurrent].gc_id,
|
||||
load: 'loadmore',
|
||||
}).then(length => {
|
||||
// console.log(length);
|
||||
if(length == 0) {
|
||||
this.page--;
|
||||
this.loadStatus = 'nomore';
|
||||
@@ -67,24 +67,24 @@ export default {
|
||||
this.$u.api.getGoodsClass().then(res => {
|
||||
if(res.errCode == 0) {
|
||||
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 }) {
|
||||
this.$u.api.getCouponList({
|
||||
async getCouponList({ gc_id, load }) {
|
||||
const res = await this.$u.api.getCouponList({
|
||||
page: this.page,
|
||||
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) {
|
||||
console.log(id);
|
||||
// console.log(id);
|
||||
|
||||
},
|
||||
couponTabsChange(index) {
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
<template>
|
||||
<view class="logistics">
|
||||
<view class="logistics-info">
|
||||
<view class="express">
|
||||
<!-- <view class="express">
|
||||
<image src="../static/mine/23.png"></image>
|
||||
<view class="dispatcher-info">
|
||||
<view>派件员:xxx</view>
|
||||
<view>手机:123456789</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="express-status">
|
||||
<image src="../static/mine/23.png"></image>
|
||||
<image :src="expressInfo.goods_image"></image>
|
||||
<view>
|
||||
<view class="status">物流状态:已签收</view>
|
||||
<view>承运来源:百世快递</view>
|
||||
<view>运单编号:3253463464777</view>
|
||||
<view>官方电话:4009-565-656</view>
|
||||
<view class="status">物流状态:{{ expressInfo.is_check }}</view>
|
||||
<view>承运来源:{{ expressInfo.express_name || '' }}</view>
|
||||
<view>运单编号:{{ expressInfo.shipping_code || '' }}</view>
|
||||
<view>官方电话:{{ expressInfo.express_phone || '' }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -22,8 +22,8 @@
|
||||
<view class="title">物流跟踪</view>
|
||||
<view class="main">
|
||||
<view v-for="(item, index) in list" :key="index" class="logistics-item">
|
||||
<view class="info u-line-2">{{ item.address }}</view>
|
||||
<view class="date">{{ item.date }}</view>
|
||||
<view class="info u-line-2">{{ item.content }}</view>
|
||||
<view class="date">{{ item.kd_time }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -33,24 +33,23 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list: [
|
||||
{
|
||||
address: '[北京市]【已签收,本人签收】,感谢使用百事快递,期待再次为您服务[北京市]【已签收,本人签收】,感谢使用百事快递,期待再次为您服务[北京市]【已签收,本人签收】,感谢使用百事快递,期待再次为您服务',
|
||||
date: '2019-12-25 09:38:21'
|
||||
},
|
||||
{
|
||||
address: '[北京市]【已签收,本人签收】,感谢使用百事快递,期待再次为您服务',
|
||||
date: '2019-12-25 09:38:21'
|
||||
},
|
||||
{
|
||||
address: '[北京市]【已签收,本人签收】,感谢使用百事快递,期待再次为您服务',
|
||||
date: '2019-12-15 09:38:20'
|
||||
},
|
||||
{
|
||||
address: '卖家已发货',
|
||||
date: '2019-12-15 09:38:20'
|
||||
list: [],
|
||||
expressInfo: {},
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
this.getOrderLogistics(option.oid);
|
||||
},
|
||||
methods: {
|
||||
getOrderLogistics(id) {
|
||||
this.$u.api.orderLogistics({ id: 16 }).then(res => {
|
||||
if(res.errCode == 0) {
|
||||
this.expressInfo = res.data.express_info;
|
||||
this.list = res.data.express_list;
|
||||
} else {
|
||||
this.list = [];
|
||||
}
|
||||
]
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -26,7 +26,7 @@ export default {
|
||||
return {
|
||||
name: '',
|
||||
time: '',
|
||||
address: '四川省攀枝花市银江镇',
|
||||
address: '',
|
||||
params: {
|
||||
year: true,
|
||||
month: true,
|
||||
|
||||
@@ -15,8 +15,9 @@
|
||||
<view class="order-info">
|
||||
<image src="../static/mine/23.png"></image>
|
||||
<view v-if="item.deliver_goods_type == 2 && item.order_status == 20">
|
||||
<view>骑手名字:{{ item.takeawayer_name }}</view>
|
||||
<view>联系方式:{{ item.member_phone }}</view>
|
||||
<view>骑手名字:{{ item.takeawayer_name || '' }}</view>
|
||||
<view>联系方式:{{ item.member_phone || '' }}</view>
|
||||
<view>所属公司:{{ item.company || '' }}</view>
|
||||
</view>
|
||||
<view v-if="item.order_status == 0">
|
||||
<view>正在等待接单</view>
|
||||
|
||||
Reference in New Issue
Block a user