From 6e6d92209f1b160346bed61b428ddb2dd31066b3 Mon Sep 17 00:00:00 2001 From: huangzhen Date: Fri, 6 Sep 2024 21:00:24 +0800 Subject: [PATCH] =?UTF-8?q?update=20@=E4=BF=AE=E6=94=B9=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/webpack.dev.js | 4 ++-- public/index.html | 5 ++++- src/views/pages/comProduct/index.vue | 7 +++++++ src/views/templates/cmsCash/index.vue | 7 +++++++ src/views/templates/cmsVoucher/index.vue | 7 +++++++ 5 files changed, 27 insertions(+), 3 deletions(-) diff --git a/build/webpack.dev.js b/build/webpack.dev.js index 2aeaa6a..41b5105 100644 --- a/build/webpack.dev.js +++ b/build/webpack.dev.js @@ -1,8 +1,8 @@ const { merge } = require('webpack-merge') const baseConfig = require('./webpack.base.js') -const VITE_BASE_URL = 'http://192.168.110.126:8099'; // 樊波 -// const VITE_BASE_URL = 'http://120.55.12.245:8098'; // 测试-公网 +// const VITE_BASE_URL = 'http://192.168.110.126:8099'; // 樊波 +const VITE_BASE_URL = 'http://120.55.12.245:8098'; // 测试-公网 // const VITE_BASE_URL = 'https://scens.admin.86698.cn'; // 正式地址 // 合并公共配置,并添加开发环境配置 diff --git a/public/index.html b/public/index.html index ccd0949..47e9d1d 100644 --- a/public/index.html +++ b/public/index.html @@ -11,6 +11,9 @@ We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.
- + + diff --git a/src/views/pages/comProduct/index.vue b/src/views/pages/comProduct/index.vue index f08ed40..9c9623c 100644 --- a/src/views/pages/comProduct/index.vue +++ b/src/views/pages/comProduct/index.vue @@ -473,7 +473,14 @@ export default { // 唤起小程序 todo location.href = 'https://www.baidu.com/'; } + } else { + if (!this.openid) { + // 微信进入未获取到 openid + location.replace(`${this.wxAuthUrl}?jump=${location.href}`); + } } + } else { + showToast(!channel ? '渠道错误' : !mode ? '领取方式错误' : '') } }, // 复制文本 diff --git a/src/views/templates/cmsCash/index.vue b/src/views/templates/cmsCash/index.vue index 6aba513..ceab4f1 100644 --- a/src/views/templates/cmsCash/index.vue +++ b/src/views/templates/cmsCash/index.vue @@ -203,7 +203,14 @@ export default { // 唤起小程序 todo location.href = 'https://www.baidu.com/'; } + } else { + if (!this.openid) { + // 微信进入未获取到 openid + location.replace(`${this.wxAuthUrl}?jump=${location.href}`); + } } + } else { + showToast(!channel ? '渠道错误' : !mode ? '领取方式错误' : '') } }, // 复制文本 diff --git a/src/views/templates/cmsVoucher/index.vue b/src/views/templates/cmsVoucher/index.vue index 935861d..193f4dc 100644 --- a/src/views/templates/cmsVoucher/index.vue +++ b/src/views/templates/cmsVoucher/index.vue @@ -218,7 +218,14 @@ export default { // 唤起小程序 todo location.href = 'https://www.baidu.com/'; } + } else { + if (!this.openid) { + // 微信进入未获取到 openid + location.replace(`${this.wxAuthUrl}?jump=${location.href}`); + } } + } else { + showToast(!channel ? '渠道错误' : !mode ? '领取方式错误' : '') } }, // 复制文本