|
@@ -314,15 +314,25 @@
|
|
|
|
|
|
|
|
cancelOrder(item){
|
|
cancelOrder(item){
|
|
|
console.log('++++++++++++++++++++',item)
|
|
console.log('++++++++++++++++++++',item)
|
|
|
- let that = this
|
|
|
|
|
- this.$api.cancelOrder({
|
|
|
|
|
- orderId:item.orderId
|
|
|
|
|
- }).then(res=>{
|
|
|
|
|
- that.downCallback()
|
|
|
|
|
- that.$api.getUserInfo().then( res=> {
|
|
|
|
|
- uni.setStorageSync('userInfo', res.data.data);
|
|
|
|
|
- });
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ uni.showModal({
|
|
|
|
|
+ content: '请确认是否取消订单!',
|
|
|
|
|
+ success: function (res) {
|
|
|
|
|
+ if (res.confirm) {
|
|
|
|
|
+ let that = this
|
|
|
|
|
+ this.$api.cancelOrder({
|
|
|
|
|
+ orderId:item.orderId
|
|
|
|
|
+ }).then(res=>{
|
|
|
|
|
+ that.downCallback()
|
|
|
|
|
+ that.$api.getUserInfo().then( res=> {
|
|
|
|
|
+ uni.setStorageSync('userInfo', res.data.data);
|
|
|
|
|
+ });
|
|
|
|
|
+ })
|
|
|
|
|
+ } else if (res.cancel) {
|
|
|
|
|
+ console.log('用户点击取消');
|
|
|
|
|
+ }
|
|
|
|
|
+ }.bind(this)
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
orderDetail(item) {
|
|
orderDetail(item) {
|