Commit 8472b78789fea417f28d79e7fab77cde06565917

Authored by zhiyangdu
1 parent b12f8436

积分兑换

src/pages/goodDetails/goodDetails.vue
@@ -217,19 +217,22 @@ export default { @@ -217,19 +217,22 @@ export default {
217 // 兑换 217 // 兑换
218 exchange () { 218 exchange () {
219 if (this.isCNLive.value) { 219 if (this.isCNLive.value) {
220 - // 提示用积分兑换兑换  
221 - let options = {  
222 - title: "",  
223 - message: "确定使用" + this.goodsInfo.num + "积分兑换?",  
224 - confirmButtonText: "确定",  
225 - confirmButtonCallback: this.addIntegralOrderconfirm,  
226 - showCancelButton: true,  
227 - cancelButtonText: "取消"  
228 - };  
229 - // 调用showModal层参数  
230 - this.$set(this.$parent, "showOptions", options);  
231 - // 显示通用浮层  
232 - this.$parent.$refs.showModal.showLayer(); 220 + // 校验登录
  221 + if (this.$parent.checkLogin()){
  222 + // 提示用积分兑换兑换
  223 + let options = {
  224 + title: "",
  225 + message: "确定使用" + this.goodsInfo.num + "积分兑换?",
  226 + confirmButtonText: "确定",
  227 + confirmButtonCallback: this.addIntegralOrderconfirm,
  228 + showCancelButton: true,
  229 + cancelButtonText: "取消"
  230 + };
  231 + // 调用showModal层参数
  232 + this.$set(this.$parent, "showOptions", options);
  233 + // 显示通用浮层
  234 + this.$parent.$refs.showModal.showLayer();
  235 + }
233 } else { 236 } else {
234 this.$parent.callApp(); 237 this.$parent.callApp();
235 } 238 }
src/pages/healthGoodDetails/healthGoodDetails.vue
@@ -217,19 +217,22 @@ export default { @@ -217,19 +217,22 @@ export default {
217 // 兑换 217 // 兑换
218 exchange () { 218 exchange () {
219 if (this.isCNLive.value) { 219 if (this.isCNLive.value) {
220 - // 提示用积分兑换兑换  
221 - let options = {  
222 - title: "",  
223 - message: "确定使用" + this.goodsInfo.num + "积分兑换?",  
224 - confirmButtonText: "确定",  
225 - confirmButtonCallback: this.addIntegralOrderconfirm,  
226 - showCancelButton: true,  
227 - cancelButtonText: "取消"  
228 - };  
229 - // 调用showModal层参数  
230 - this.$set(this.$parent, "showOptions", options);  
231 - // 显示通用浮层  
232 - this.$parent.$refs.showModal.showLayer(); 220 + // 校验登录
  221 + if (this.$parent.checkLogin()){
  222 + // 提示用积分兑换兑换
  223 + let options = {
  224 + title: "",
  225 + message: "确定使用" + this.goodsInfo.num + "积分兑换?",
  226 + confirmButtonText: "确定",
  227 + confirmButtonCallback: this.addIntegralOrderconfirm,
  228 + showCancelButton: true,
  229 + cancelButtonText: "取消"
  230 + };
  231 + // 调用showModal层参数
  232 + this.$set(this.$parent, "showOptions", options);
  233 + // 显示通用浮层
  234 + this.$parent.$refs.showModal.showLayer();
  235 + }
233 } else { 236 } else {
234 this.$parent.callApp(); 237 this.$parent.callApp();
235 } 238 }