This commit is contained in:
2020-08-17 12:11:38 +08:00
parent 5a2fc6e94c
commit fb297a74ce
4 changed files with 166 additions and 104 deletions

View File

@@ -91,7 +91,6 @@
export default {
data() {
return {
orderstate: '',
s_object: {
'1': {
text: '待收货',
@@ -154,44 +153,7 @@ export default {
clearInterval(this.timer);
},
methods: {
viewState(value) {
let state;
switch (value) {
case 1:
state = '6';
break;
case 2:
state = '4';
break;
case 3:
state = '1';
break;
case 4:
state = '2';
break;
case 5:
state = '3';
break;
case 6:
state = '7';
break;
case 7:
state = '5';
break;
case 9:
state = '8';
break;
case 10:
state = '9';
break;
case 11:
state = '10';
break;
default:
break;
}
this.orderstate = state;
},
viewStoreDetails(id) {
this.$u.route('pageC/merchant/index', {
id: id
@@ -239,9 +201,9 @@ export default {
this.$u.api.getOrderInfo({
order_id: id,
}).then(res => {
console.log(res)
if(res.errCode == 0) {
this.orderInfo = res.data;
this.viewState(this.orderInfo.view_type);
this.setTitle(this.orderInfo.view_type);
if(res.data.view_type == 1) this.setSpikeTime(res.data.end_time);
else if(res.data.view_type == 9) this.setSpikeTime(res.data.pintuangroup_endtime);
@@ -260,9 +222,10 @@ export default {
},
confirmReceive() {
this.$u.api.confirmReceive({
order_id: this.order.order_id,
order_id: this.orderInfo.order_id,
}).then(res => {
if(res.errCode == 0) {
console.log(res,"确认支付")
this.getOrderInfo(this.oid);
}
this.$u.toast(res.message);
@@ -300,6 +263,46 @@ export default {
});
}
},
computed:{
orderstate() {
let state;
switch (this.orderInfo.view_type) {
case 1:
state = '6';
break;
case 2:
state = '4';
break;
case 3:
state = '1';
break;
case 4:
state = '2';
break;
case 5:
state = '3';
break;
case 6:
state = '7';
break;
case 7:
state = '5';
break;
case 9:
state = '8';
break;
case 10:
state = '9';
break;
case 11:
state = '10';
break;
default:
break;
}
return state;
},
}
};
</script>
<style lang="scss" scoped>