浏览代码

积分取消

twt 2 年之前
父节点
当前提交
20247addec
共有 2 个文件被更改,包括 28 次插入10 次删除
  1. 25 7
      pages/integral/integralConfirm.vue
  2. 3 3
      pages/integral/recordDetail.vue

+ 25 - 7
pages/integral/integralConfirm.vue

@@ -68,14 +68,32 @@
 						uni.hideLoading();
 						if(res.code==0){
 							this.orderData=res.data
-							uni.showToast({
-								title: '兑换成功',
-								icon: 'none',
-								duration: 3000
+							// uni.showToast({
+							// 	title: '兑换成功',
+							// 	icon: 'none',
+							// 	duration: 3000
+							// });
+							
+							var that = this
+							uni.showModal({
+							    title: '提示',
+							    content: '提交成功',
+								cancelText:'回到首页',
+								confirmText:'查看订单',
+							    success: function (res2) {
+							        if (res2.confirm) {
+										uni.redirectTo({
+											url:'recordDetail?id='+res.data
+										})
+									
+							          
+							        } else if (res2.cancel) {
+							           uni.switchTab({
+							           	url:'../index/index'
+							           })
+							        }
+							    }
 							});
-							uni.redirectTo({
-								url:'recordDetail?id='+res.data
-							})
 						}else{
 							uni.showToast({
 								title: res.msg,

+ 3 - 3
pages/integral/recordDetail.vue

@@ -236,7 +236,7 @@
 								title: '加载中'
 							})
 
-							that.$http('openOrderManagement/updateSheetState', {
+							that.$http('openIntegralMall/cancelExchange', {
 
 								id: that.id,
 
@@ -249,9 +249,9 @@
 									icon: 'none',
 									duration: 2000
 								});
-								setTimeout(function() {
+								//setTimeout(function() {
 									that.getData();
-								}, 1000);
+								//}, 1000);
 							})