diff --git a/rc-busness/pages/myorder/usertion.vue b/rc-busness/pages/myorder/usertion.vue index 88ea5fc7..2f5cedff 100644 --- a/rc-busness/pages/myorder/usertion.vue +++ b/rc-busness/pages/myorder/usertion.vue @@ -205,7 +205,6 @@ export default { logisticsNumber: "", customer: "", //联系客服或者取消订单 payorsucess: "", //立即支付或者再次购买, - addressstype: null, addressUserName: "", logisticsCompany: "", //物流公司 orderstatus: "", @@ -327,6 +326,7 @@ export default { this.addressPhoneNumber = this.goldmedal[i].addressPhoneNumber; this.paytype = this.goldmedal[i].paytype; this.information.paytypeText = this.util.getTextByPaytype(this.paytype); + this.updateButtonByOrderStatus(this.goldmedal[i].status); } } }, @@ -391,6 +391,33 @@ export default { // console.log(this.list); }, + updateButtonByOrderStatus(status){ + if (status == 2) { + this.orderstatus = "您的订单已完成"; + this.isshow = false; + this.userisdelivery = "待发货"; + this.customer = "联系客服申请售后"; + this.payorsucess = "再次购买"; + } else if (status == 0) { + this.orderstatus = "您的订单还未付款,请尽快付款!"; + this.isshow = false; + this.userisdelivery = "待付款"; + this.customer = "取消订单"; + this.payorsucess = "立即支付"; + } else if (status == 1) { + this.orderstatus = "您的订单已发出,请耐心等候。"; + this.isshow = true; + this.userisdelivery = "待收货"; + this.customer = "联系客服申请售后"; + this.payorsucess = "再次购买"; + } else if (status == 3) { + this.orderstatus = "您的订单已取消!"; + this.isshow = false; + this.userisdelivery = "已取消"; + this.customer = "联系客服申请售后"; + this.payorsucess = "再次购买"; + } + } }, mounted() { this.checkIsLogin(); @@ -399,35 +426,8 @@ export default { this.userid = this.usermessage.data.id; this.userphone = this.usermessage.data.mobile; this.editaddress(this.userid); - this.addressstype = this.$route.query.stype; - this.orderNumber = this.$route.query.orderNumber; this.orderquantity(this.orderNumber); - if (this.addressstype == 2) { - this.orderstatus = "您的订单已完成"; - this.isshow = false; - this.userisdelivery = "待发货"; - this.customer = "联系客服申请售后"; - this.payorsucess = "再次购买"; - } else if (this.addressstype == 0) { - this.orderstatus = "您的订单还未付款,请尽快付款!"; - this.isshow = false; - this.userisdelivery = "待付款"; - this.customer = "取消订单"; - this.payorsucess = "立即支付"; - } else if (this.addressstype == 1) { - this.orderstatus = "您的订单已发出,请耐心等候。"; - this.isshow = true; - this.userisdelivery = "待收货"; - this.customer = "联系客服申请售后"; - this.payorsucess = "再次购买"; - } else if (this.addressstype == 3) { - this.orderstatus = "您的订单已取消!"; - this.isshow = false; - this.userisdelivery = "已取消"; - this.customer = "联系客服申请售后"; - this.payorsucess = "再次购买"; - } }, components: { Myheader,