Commit 76110af162b484c7d09547a28a1e3e61d1a970cf
1 parent
9f24039a
健康商城积分不足跳转到获取健康值任务页面
Showing
1 changed file
with
32 additions
and
20 deletions
src/pages/healthGoodDetails/healthGoodDetails.vue
| @@ -176,7 +176,7 @@ export default { | @@ -176,7 +176,7 @@ export default { | ||
| 176 | message: "兑换成功", | 176 | message: "兑换成功", |
| 177 | messageAlign: "center", | 177 | messageAlign: "center", |
| 178 | confirmButtonText: "我知道了", | 178 | confirmButtonText: "我知道了", |
| 179 | - confirmButtonCallback:"" | 179 | + confirmButtonCallback: "" |
| 180 | // confirmButtonCallback: this.addAddressCallback, | 180 | // confirmButtonCallback: this.addAddressCallback, |
| 181 | // params: { shopType: datas.shop_type, id: datas.id } | 181 | // params: { shopType: datas.shop_type, id: datas.id } |
| 182 | }; | 182 | }; |
| @@ -236,8 +236,8 @@ export default { | @@ -236,8 +236,8 @@ export default { | ||
| 236 | // 兑换 | 236 | // 兑换 |
| 237 | exchange () { | 237 | exchange () { |
| 238 | if (this.isCNLive.value) { | 238 | if (this.isCNLive.value) { |
| 239 | - // 校验登录 | ||
| 240 | - if (this.$parent.checkLogin()){ | 239 | + // 校验登录 |
| 240 | + if (this.$parent.checkLogin()) { | ||
| 241 | // 提示用积分兑换兑换 | 241 | // 提示用积分兑换兑换 |
| 242 | let options = { | 242 | let options = { |
| 243 | title: "", | 243 | title: "", |
| @@ -261,16 +261,16 @@ export default { | @@ -261,16 +261,16 @@ export default { | ||
| 261 | /** | 261 | /** |
| 262 | * 判断shop_type是否等于1等于1为实物弹出填写地址,其他商品直接走兑换接口 | 262 | * 判断shop_type是否等于1等于1为实物弹出填写地址,其他商品直接走兑换接口 |
| 263 | */ | 263 | */ |
| 264 | - if(this.goodsInfo.shop_type){ | ||
| 265 | - // 实物弹出填写地址 | ||
| 266 | - this.addAddressCallback() | ||
| 267 | - }else{ | ||
| 268 | - // isExchange为false才可兑换防止连续点击 | 264 | + if (this.goodsInfo.shop_type) { |
| 265 | + // 实物弹出填写地址 | ||
| 266 | + this.addAddressCallback() | ||
| 267 | + } else { | ||
| 268 | + // isExchange为false才可兑换防止连续点击 | ||
| 269 | if (!this.isExchange) { | 269 | if (!this.isExchange) { |
| 270 | // 兑换 | 270 | // 兑换 |
| 271 | this.addIntegralOrder(); | 271 | this.addIntegralOrder(); |
| 272 | } | 272 | } |
| 273 | - } | 273 | + } |
| 274 | }, | 274 | }, |
| 275 | /** | 275 | /** |
| 276 | * 分享 | 276 | * 分享 |
| @@ -330,7 +330,7 @@ export default { | @@ -330,7 +330,7 @@ export default { | ||
| 330 | message: tipMessage, | 330 | message: tipMessage, |
| 331 | messageAlign: "center", | 331 | messageAlign: "center", |
| 332 | confirmButtonText: "我知道了", | 332 | confirmButtonText: "我知道了", |
| 333 | - confirmButtonCallback:"" | 333 | + confirmButtonCallback: "" |
| 334 | // confirmButtonCallback: this.addAddressCallback, | 334 | // confirmButtonCallback: this.addAddressCallback, |
| 335 | // params: { shopType: datas.shop_type, id: datas.id } | 335 | // params: { shopType: datas.shop_type, id: datas.id } |
| 336 | }; | 336 | }; |
| @@ -359,9 +359,9 @@ export default { | @@ -359,9 +359,9 @@ export default { | ||
| 359 | }, | 359 | }, |
| 360 | // 填写地址 | 360 | // 填写地址 |
| 361 | addAddressCallback () { | 361 | addAddressCallback () { |
| 362 | - this.pointsToast_control = true; | ||
| 363 | - // 礼品兑换弹框派发 | ||
| 364 | - this.$refs.itemsInfo.getItemInfo(this.goodsInfo, params.id) | 362 | + this.pointsToast_control = true; |
| 363 | + // 礼品兑换弹框派发 | ||
| 364 | + this.$refs.itemsInfo.getItemInfo(this.goodsInfo, params.id) | ||
| 365 | }, | 365 | }, |
| 366 | /** | 366 | /** |
| 367 | * 跳转赚取积分页面 | 367 | * 跳转赚取积分页面 |
| @@ -370,14 +370,26 @@ export default { | @@ -370,14 +370,26 @@ export default { | ||
| 370 | jumpClientIntegralList () { | 370 | jumpClientIntegralList () { |
| 371 | // 判断APP内 | 371 | // 判断APP内 |
| 372 | if (this.isCNLive.value) { | 372 | if (this.isCNLive.value) { |
| 373 | - // (判断app内是否有该方法) | ||
| 374 | - if (window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.jumpClientIntegralList) { | ||
| 375 | - // 跳转到原生的任务列表 | ||
| 376 | - window.webkit.messageHandlers.jumpClientIntegralList.postMessage({ body: {} }); | ||
| 377 | - } else if (window.obj && window.obj.jumpClientIntegralList) { | ||
| 378 | - // 跳转到原生的任务列表 | ||
| 379 | - window.obj.jumpClientIntegralList(); | 373 | + // 跳转封装 |
| 374 | + if (typeof this.$parent.gotoDetail === 'function') { | ||
| 375 | + // 设置跳转参数 | ||
| 376 | + let params = { | ||
| 377 | + type: '34', | ||
| 378 | + to: this.mode == 'pro' ? "http://wjjh5.cnlive.com" : "http://wjjh5test.cnlive.com" + "/cnStepApp.html?isShowTitle=true&type=web", | ||
| 379 | + shop_type: '' | ||
| 380 | + }; | ||
| 381 | + // 页面跳转 | ||
| 382 | + this.$parent.gotoDetail(params); | ||
| 380 | } | 383 | } |
| 384 | + | ||
| 385 | + // (判断app内是否有该方法) | ||
| 386 | + // if (window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.jumpClientIntegralList) { | ||
| 387 | + // // 跳转到原生的任务列表 | ||
| 388 | + // window.webkit.messageHandlers.jumpClientIntegralList.postMessage({ body: {} }); | ||
| 389 | + // } else if (window.obj && window.obj.jumpClientIntegralList) { | ||
| 390 | + // // 跳转到原生的任务列表 | ||
| 391 | + // window.obj.jumpClientIntegralList(); | ||
| 392 | + // } | ||
| 381 | } | 393 | } |
| 382 | }, | 394 | }, |
| 383 | /** | 395 | /** |