wangxy 15 часов назад
Родитель
Сommit
0fb1dea8ce

+ 4 - 2
pages/chanpinMy/components/duihuanma/duihuanError.vue

@@ -1,6 +1,6 @@
 <template>
 	<uni-popup ref="dlRef" :animation="true" :is-mask-click="false" mask-background-color="rgba(255, 255, 255, 0.6);">
-		<view>兑换无效,请重新输入</view>
+		<view>{{ tex }}</view>
 		<view @click="handleConfirm">确认</view>
 	</uni-popup>
 </template>
@@ -9,6 +9,7 @@
 import {ref} from "vue"
 
 const dlRef = ref(null);
+const tex = ref('兑换无效,请重新输入');
 
 const emits =defineEmits(['confirm'])
 
@@ -17,7 +18,8 @@ function handleConfirm() {
   handleClose()
 }
 
-function handleShow() {
+function handleShow(msg) {
+  tex.value = msg;
 	dlRef.value.open('center')
 }
 

+ 4 - 4
pages/chanpinMy/duihuanma.vue

@@ -113,12 +113,12 @@
 				cacheManager.remove("contentInfo");
 				duihuamaValue.value = '';
         dhSucRef.value.handleShow()
-			} else {
-				// toast('兑换失败请重试或联系管理员')
-        dhErrRef.value.handleShow()
 			}
 		}).catch(err=> {
-      toast('兑换失败请重试或联系管理员')
+      if (err && err.code == 1002) {
+        dhErrRef.value.handleShow(err.msg)
+
+      }
     })
 	}
 </script>