From 964dde74b2f18de014a39db01294f7e0d62fd7cc Mon Sep 17 00:00:00 2001 From: zhangguoping Date: Fri, 1 Nov 2024 16:45:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=B4=E4=B8=9A=E9=93=B6=E8=A1=8C=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/xyyh/activity.vue | 46 +++++++++++++++++++++++++++++++++---- 1 file changed, 41 insertions(+), 5 deletions(-) diff --git a/src/pages/xyyh/activity.vue b/src/pages/xyyh/activity.vue index 570d5af..d7cf818 100644 --- a/src/pages/xyyh/activity.vue +++ b/src/pages/xyyh/activity.vue @@ -85,7 +85,7 @@ 7、适用场景:仅限奈雪线下门店出示会员码或"奈雪的茶"小程序自取/外卖使用,不适用于第三方外送服务。 - 8、优惠券仅限单笔订单当次使用,不与其他优惠活动共享,不可兑换现金,不设找零,不可拆分使用,优惠券抵扣金额不予积分,不适用运费。 + 8、优惠券仅限单笔订单当次使用,不与其他优惠活动共享,不可兑换现金,不设找零,不可拆分使用,优惠券抵扣金额不予积分,不适用运费。。 五、售后服务: @@ -128,18 +128,54 @@ export default { rulesFun() { this.showRules = true }, - btnFun(type) { - if (/(iPhone|iPod|iPad|Android).*cib-ebank*/i.test(navigator.userAgent)) { + setPageValue(obj, defaultValue) { + // eslint-disable-next-line eqeqeq + if (obj == undefined || obj == null || obj == '' || obj.indexOf('undefined') >= 0) { + return defaultValue + } else { + return obj + } + }, + nextPage(pageOptions) { + if ( + window.plugins && + window.plugins.UrlProcessPlugin && + window.plugins.UrlProcessPlugin.nextStep + ) { + const options = { + url: pageOptions.url, // 跳转url + needLogin: this.setPageValue(pageOptions.needLogin, 'false'), + pageFlag: this.setPageValue(pageOptions.pageFlag, '2'), + titleStr: this.setPageValue(pageOptions.titleStr, ''), + statusColor: this.setPageValue(pageOptions.statusColor, '1'), + foreColor: this.setPageValue(pageOptions.foreColor, '#ff333333'), + subTitle: this.setPageValue(pageOptions.subTitle, undefined), + subTitleColor: this.setPageValue(pageOptions.subTitleColor, undefined), + backColor: this.setPageValue(pageOptions.backColor, '#ffffffff'), + tipsNaviType: this.setPageValue(pageOptions.tipsNaviType, undefined), + tipsStr: this.setPageValue(pageOptions.tipsStr, undefined), + tipsUrl: this.setPageValue(pageOptions.tipsUrl, undefined), + tipsPicName: this.setPageValue(pageOptions.tipsPicName, undefined), + prevStepUrlStr: '', + isLastPage: this.setPageValue(pageOptions.isLastPage, 'false'), + closeCount: this.setPageValue(pageOptions.closeCount, '2'), + dipIn: this.setPageValue(pageOptions.dipIn, 'false'), + } + window.plugins.UrlProcessPlugin.nextStep.action(options) + } else if (/(iPhone|iPod|iPad|Android).*cib-ebank*/i.test(navigator.userAgent)) { const params = { - url: `${this.btnUrl}&skuId=${type}`, + url: pageOptions.url, title: '', hiddenTitle: true, } window.plugins.urlProcessPlugin.nextStepJson(null, JSON.stringify(params)) } else { - window.location.href = `${this.btnUrl}&skuId=${type}` + window.location.href = pageOptions.url } }, + btnFun(type) { + this.nextPage({ url: `${this.btnUrl}&skuId=${type}`, pageFlag: '4', dipIn: 'true' }) + }, videoFun(type) { this.show = true this.videoSrc = this.videoSrcList[type - 1]