|
|
@@ -27,22 +27,30 @@ export default {
|
|
|
name: 'order-sett',
|
|
|
components: { Bounced, OrderDetail, BalanceTip},
|
|
|
props: {
|
|
|
- orderId: ``
|
|
|
+
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
dialogVisible:false,
|
|
|
timeServe:undefined,
|
|
|
time:0,
|
|
|
- orderDetail: {}
|
|
|
+ orderDetail: {},
|
|
|
+ orderId: ``
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
|
|
|
},
|
|
|
methods: {
|
|
|
- setOpen(dialogVisible){
|
|
|
+ async setOpen(dialogVisible,orderId){
|
|
|
this.dialogVisible=dialogVisible===true;
|
|
|
+ if(dialogVisible){
|
|
|
+ this.orderId=orderId
|
|
|
+ }
|
|
|
+ // 调用订单详情接口
|
|
|
+ const result = await orderDetail({ orderId: this.orderId })
|
|
|
+
|
|
|
+ this.orderDetail = result.data
|
|
|
if( this.dialogVisible){
|
|
|
this.time=3
|
|
|
this.timeServe=setInterval(async ()=>{
|
|
|
@@ -53,19 +61,15 @@ export default {
|
|
|
this.timeServe=undefined
|
|
|
this.dialogVisible=false
|
|
|
|
|
|
- // 调用订单详情接口
|
|
|
- const result = await orderDetail({ orderId: this.orderId })
|
|
|
|
|
|
- this.orderDetail = result.data
|
|
|
|
|
|
-
|
|
|
// 支付成功了
|
|
|
if (this.orderDetail.status >= 1) {
|
|
|
/* openGoodsDetailPopup() */
|
|
|
this.$emit('order-success', this.orderDetail)
|
|
|
this.$refs.orderDetail.setOpen(true)
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
// 支付失败了
|
|
|
if (this.orderDetail.status == 0) {
|
|
|
this.$refs.balanceTip.setOpen(true)
|