master
chen 2021-11-11 15:33:17 +08:00
parent 98959dd0f6
commit 1ac9c5046e
5 changed files with 102 additions and 20 deletions

View File

@ -132,7 +132,7 @@
return {
statusHNH:uni.getStorageSync('statusHNH'),
publicColor:uni.getStorageSync('publicColor'),//
isScreenshot:true,
isScreenshot:false,
upImg:'',
chooseIndex:0,
activityList:[],//
@ -243,10 +243,9 @@
count:1,
sourceType:['album'],
success: (res) => {
console.log(res);
this.upImg = res.tempFilePaths[0];
this.$requst.upload('file/upload/image',{file:this.upImg}).then(res=>{
this.upImg = this.$http + res.data.src
this.upImg = this.$http + res.data.src;
this.$toolAll.tools.showToast('图片上传成功(*^▽^*)')
},error=>{})
}

View File

@ -33,7 +33,7 @@
</view>
</view>
<!-- 体验券使用弹框 -->
<view v-if="isTY" @tap="isTY=false" class="disjcac tc quan-tk-box">
<view v-if="isTY" @tap="isTY=false" class="disjcac tc quan-tk-box" catchtouchmove="return">
<view class="bacf width100 radius20 pad30 posir" style="margin: 0 128rpx;" @tap.stop="isTY=true">
<view class="fon28 col3">体验券使用</view>
<view class="mar-sx30">

View File

@ -484,6 +484,9 @@
},
fail() {
this.times = 0;
uni.navigateTo({
url:'/pagesA/myOrder/myOrder'
})
}
});
} else {

View File

@ -12,7 +12,10 @@
</view>
<view :style="{paddingTop:(statusHNH+12+chuTop)+'px'}" class="pad-sx20 pad-zy32">
<view v-if="orderList.length!=0" v-for="(item,index) in orderList" :key="index" class="radius20 bacf pad20 mar-x20 order-item-box">
<view @tap="goDetail(item.id)" class="bbot disjbac pad-x20 mar-x20"><view class="fon28 col3 bold">{{item.isShop==0?'商城订单':'积分商城订单'}}</view><view class="fon24 col9">{{item.establish}}</view></view>
<view @tap="goDetail(item.id)" class="bbot disjbac pad-x20 mar-x20"><view class="fon28 col3 bold">{{item.isShop==0?'商城订单':'积分商城订单'}}</view>
<view v-if="item.is_only==0 && item.open_one==1 && item.is_group_make==1 && item.open_one_success==0" class="fon24 col9">{{item.group_make_end_at}}</view>
<view v-else class="fon24 col9">{{item.establish}}</view>
</view>
<view @tap="goDetail(item.id)" class="disjbac fon24">
<view class="col3">订单号{{item.orderNum}}</view>
<view v-if="item.virtual_check==0" class="bold" :class="(item.orderStatus==1 || item.orderStatus==2 || item.orderStatus==3) ? 'colf8':'col9'">{{['','','','','',''][item.orderStatus]}}</view>
@ -31,7 +34,7 @@
<view v-if="itemc.is_virtual!=0 && itemc.check_type!='frontend'" class="order-btn" style="background-color: #CCCCCC;">线</view>
</view>
</view>
<view v-if="itemc.is_virtual!=0" class="disjbac mar-s10 posia colf8" style="bottom: 20rpx;"> x{{itemc.not_check_num}}</view>
<view v-if="itemc.is_virtual!=0 && itemc.not_check_num!=0" class="mar-s10 posia col6" style="bottom: 20rpx; right: 0rpx;"> x{{itemc.not_check_num}}</view>
</view>
<!-- <view class="fon28 col3 pad-s20 disjbac">
<view class="flexs"><span v-if="item.isShop==0"><span v-if="item.is_only!=1">{{item.total}}</span><span v-if="item.is_only==1">{{item.total}}</span> +<span v-if="item.coin!=0">{{item.coin}}</span></span><span v-else>{{item.total}}</span></view>
@ -46,8 +49,8 @@
<view class="fon28 col3">
<view class="mar-sx20 disje"><span v-if="item.isShop==0"><span v-if="item.is_only!=1">{{item.total}}</span><span v-if="item.is_only==1">{{item.total}}</span> <span v-if="item.coin!=0">+{{item.coin}}</span></span><span v-else>{{item.total}}</span></view>
<view class="width100 disje">
<view v-if="item.is_only==0 && item.open_one==1" class="order-btn mar-y20"></view>
<view @tap="transferFrame(index)" v-if="item.orderStatus != 0 && item.orderStatus != 5 && item.virtual_check==0" class="order-cancle"></view>
<view @tap="comeing(item.orderNum)" v-if="item.is_only==0 && item.open_one==1 && item.is_group_make==1 && item.open_one_success==0" class="order-btn mar-y20"></view>
<view @tap="transferFrame(index)" v-if="item.orderStatus != 0 && item.orderStatus != 5 && item.virtual_check==0 && item.orderStatus!=5" class="order-cancle"></view>
<view @tap="payMentEv(index)" v-if="item.orderStatus == 1" class="order-btn"></view>
<!-- <view class="order-btn" v-if="item.is_only==1"></view> -->
<view @tap="confirmReceipt(item.id)" v-if="item.orderStatus == 4" class="order-btn"></view>
@ -57,7 +60,7 @@
<nothing-page v-if="orderList.length==0" :content="`暂无更多订单列表`"></nothing-page>
</view>
<!-- 待核验弹框 -->
<view v-if="isHeyan" @tap="isHeyan=false" class="disjcac tc posAll" style="z-index: 3;">
<view v-if="isHeyan" @tap="isHeyan=false" class="disjcac tc posAll" style="z-index: 3;" catchtouchmove="return">
<view class="bacf width100 radius20 pad30 posir" style="margin: 0 128rpx;" @tap.stop="isHeyan=true">
<view class="fon28 col3">订单二维码</view>
<view class="mar-sx30">
@ -134,7 +137,9 @@
size: 162,
colorDark: '#000000',
colorLight: '#ffffff',
timer:null
timer:null,
zanArr:[],
timeList:[]
}
},
onReachBottom() {
@ -163,6 +168,14 @@
options.index==undefined ? this.activeIndex = 0 : this.activeIndex = options.index;
},
methods: {
comeing(coding){
this.$requst.post('user/open-one',{order_coding:coding}).then(res=>{
if(res.code==0){
this.$toolAll.tools.showToast('免拼成功');
this.checkList(this.activeIndex);
}
})
},
make(index,index2){
this.isHeyan = true;
this.text = `${this.orderList[index].orderNum},${this.orderList[index].childrenList[index2].id}`;
@ -216,16 +229,18 @@
duration: 0
});
this.orderList = [];
this.zanArr = [];
this.timeList = [];
}
this.total = res.data.total;
if(res.data.list.length!=0){
res.data.list.forEach(item=>{
let statusNum = 0;
if(item.status=="waiting") statusNum = 1;
if(item.status=="paid" && item.has_virtual==1) {
statusNum = 3;
}
if(item.status=="paid" && item.has_virtual==0) {
// if(item.status=="paid" && item.has_virtual==1) {
// statusNum = 3;
// }
if(item.status=="paid") {
statusNum = 2;
}
// if(item.status=="check")
@ -262,15 +277,61 @@
isShop:item.is_score,//0 ,1
total: nprice,//
coin:item.coin,//
is_only:item.is_only,//
is_only:item.is_only,//,1
virtual_check:item.virtual_check,
// open_one:item.open_one
open_one:item.open_one,
is_group_make:item.is_group_make,
open_one_success:item.open_one_success,
group_make_end_at:item.group_make_end_at
}
this.orderList.push(obj);
this.zanArr.push(obj);
})
this.zanArr.forEach((item,index)=>{
if(item.group_make_end_at!='' && item.group_make_end_at!=null) {
let obj = {
id:item.id,
time:item.group_make_end_at,
nIndex:index
}
this.timeList.push(obj);
}
})
if(this.timeList!=0){
uni.showToast({
title:'加载中...',
icon:'none',
duration:100000
})
this.timer = setInterval(()=>{//
if(this.timeList.length!=0){
this.timeList.forEach((item,index)=>{
if(item.id==this.zanArr[item.nIndex].id){
let endTime = new Date(this.timeList[index].time).getTime();//
let startTime = new Date().getTime() + 1000;//
if(startTime - endTime >=0) {// - >= 0
// this.checkList(this.activeIndex);
} else {
//
this.zanArr[item.nIndex].group_make_end_at = this.$toolAll.tools.dayTime(this.timeList[index].time,startTime);
}
}
})
}
},1000)
setTimeout(()=>{
uni.hideToast();
this.orderList = this.zanArr;
// this.search_result = true;
},1000)
} else {
uni.hideToast();
this.orderList = this.zanArr;
}
this.zanList = this.orderList;
if(index==0) {
this.orderList = this.zanList;
} else if(index==3){
console.log(1234);
} else {
this.orderList = this.zanList.filter(item=>{
return item.orderStatus==index;

View File

@ -17,7 +17,8 @@
<view v-if="orderInfo.status=='closed'" class="col9 bold"></view>
</view>
<view class="bold col3 mar-s40 mar-x20">订单号{{orderInfo.coding}}</view>
<view class="fon24 col9">{{orderInfo.created_at}}</view>
<view class="fon24 col9" v-if="orderInfo.is_only==0 && orderInfo.open_one==1 && orderInfo.is_group_make==1 && orderInfo.open_one_success==0 ">{{daoTime}}</view>
<view class="fon24 col9" v-else>{{orderInfo.created_at}}</view>
</view>
<!-- 物流信息 -->
<view class="bacf radius20 mar-s20 fon28" style="padding: 27rpx 20rpx;">
@ -78,6 +79,7 @@
<view class="fon28 col3">分享</view>
<button open-type="share" class="posia-op"></button>
</view>
<view @tap="comeing(orderInfo.coding)" v-if="orderInfo.is_only==0 && orderInfo.open_one==1 && orderInfo.is_group_make==1 && orderInfo.open_one_success==0 " class="orderInfo-btn"></view>
<!-- 待付款 -->
<view class="disac paid-btn-box" v-if="orderInfo.status=='waiting'">
<view @tap="cancleEv"></view>
@ -91,7 +93,7 @@
<view @tap="confirmReceipt(orderInfo.id)" class="orderInfo-btn" v-if="orderInfo.status=='shipped'"></view>
</view>
<!-- 待核验弹框 -->
<view v-if="isHeyan" @tap="isHeyan=false" class="disjcac tc posAll" style="z-index: 3;">
<view v-if="isHeyan" @tap="isHeyan=false" class="disjcac tc posAll" style="z-index: 3;" catchtouchmove="return">
<view class="bacf width100 radius20 pad30 posir" style="margin: 0 128rpx;" @tap.stop="isHeyan=true">
<view class="fon28 col3">订单二维码</view>
<view class="mar-sx30">
@ -137,7 +139,8 @@
size: 162,
colorDark: '#000000',
colorLight: '#ffffff',
timer:null
timer:null,
daoTime:''
}
},
onUnload() {
@ -150,6 +153,14 @@
this.checkInfo(options.id);
},
methods: {
comeing(coding){
this.$requst.post('user/open-one',{order_coding:coding}).then(res=>{
if(res.code==0){
this.$toolAll.tools.showToast('免拼成功');
this.checkInfo(this.orderInfo.id);
}
})
},
confirmReceipt(id){//
this.$requst.post('order/accepted',{order_id:id}).then(res=>{
if(res.code==0){
@ -251,6 +262,14 @@
this.allPrice = this.allPrice;
}
this.orderInfo = narr;
this.daoTime = this.$toolAll.tools.dayTime(this.orderInfo.group_make_end_at,new Date().getTime());
this.timerDao = setInterval(()=>{
if(new Date().getTime()-new Date().getTime(this.orderInfo.group_make_end_at)>0){
this.checkInfo(this.orderInfo.id);
} else {
this.daoTime = this.$toolAll.tools.dayTime(this.orderInfo.group_make_end_at,new Date().getTime());
}
},1000)
let naddress = this.orderInfo.address.split(',');
if(naddress[0]!='自提'){
let nphone = this.$toolAll.tools.hideMPhone(naddress[1].trim())