|
|
@@ -97,19 +97,29 @@
|
|
|
|
|
|
// 确认
|
|
|
function confirmBtn() {
|
|
|
+
|
|
|
+ if (!duihuamaValue.value) {
|
|
|
+ toast('请输入兑换码')
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
let req = {
|
|
|
code: duihuamaValue.value
|
|
|
}
|
|
|
duihuanmaCodeNew(req).then(res => {
|
|
|
if (res.code == 0) {
|
|
|
- toast('兑换成功')
|
|
|
+ // toast('兑换成功')
|
|
|
// 清空缓存
|
|
|
cacheManager.remove("contentInfo");
|
|
|
duihuamaValue.value = '';
|
|
|
+ dhSucRef.value.handleShow()
|
|
|
} else {
|
|
|
- toast('兑换失败请重试或联系管理员')
|
|
|
+ // toast('兑换失败请重试或联系管理员')
|
|
|
+ dhErrRef.value.handleShow()
|
|
|
}
|
|
|
- })
|
|
|
+ }).catch(err=> {
|
|
|
+ toast('兑换失败请重试或联系管理员')
|
|
|
+ })
|
|
|
}
|
|
|
</script>
|
|
|
|