|
@@ -146,6 +146,13 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <u-modal
|
|
|
+ :show="umodal.show"
|
|
|
+ :title="umodal.title"
|
|
|
+ :content='umodal.content'
|
|
|
+ confirmColor="#ED0303"
|
|
|
+ @confirm="modalConfirm"
|
|
|
+ ></u-modal>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -191,6 +198,11 @@
|
|
|
payResult: {}, //gotoPay结果
|
|
|
paysuccess: false, //支付结果
|
|
|
templateIdList: [], //微信小程序订阅消息
|
|
|
+ umodal:{
|
|
|
+ show:false,
|
|
|
+ title:'温馨提示',
|
|
|
+ content:''
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
},
|
|
@@ -340,7 +352,7 @@
|
|
|
// console.log('pageData',this.pageData);
|
|
|
// console.log('visitors',this.visitors);
|
|
|
// console.log('params',params);
|
|
|
- this.$u.api.submitOrder(params).then(res => {
|
|
|
+ this.$u.api.submitOrder(params,{custom:{toast:false}}).then(res => {
|
|
|
// console.log('submitOrder',res.data);
|
|
|
this.orderId = res.data.orderId;
|
|
|
// this.templateEven()
|
|
@@ -348,17 +360,24 @@
|
|
|
|
|
|
}).catch(err => {
|
|
|
this.cansubmit = true;
|
|
|
- uni.$u.toast(err.msg);
|
|
|
+ uni.hideLoading();
|
|
|
+ // uni.$u.toast(err.msg);
|
|
|
if (err.msg.includes('限购')) {
|
|
|
- setTimeout(() => {
|
|
|
- uni.$u.route('/center/order', {
|
|
|
- status: 0
|
|
|
- });
|
|
|
- }, 2000)
|
|
|
+ this.umodal.title = '';
|
|
|
+ this.umodal.content = err.msg;
|
|
|
+ this.umodal.show = true;
|
|
|
+ // setTimeout(() => {
|
|
|
+ // uni.$u.route('/center/order', {
|
|
|
+ // status: 0
|
|
|
+ // });
|
|
|
+ // }, 2000)
|
|
|
}
|
|
|
console.log('submitOrder', err);
|
|
|
})
|
|
|
},
|
|
|
+ modalConfirm(){
|
|
|
+ this.umodal.show = false;
|
|
|
+ },
|
|
|
// 订阅消息
|
|
|
templateEven() {
|
|
|
let that = this
|