From 85ffb79965e8e163937cde20bc810c660cc7cb33 Mon Sep 17 00:00:00 2001 From: Wik-T <812952667@qq.com> Date: Fri, 24 Mar 2023 17:46:18 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BC=98=E5=8C=96=E5=97=A8=E6=A3=AE=E9=80=9B?= =?UTF-8?q?=E5=88=86=E4=BA=AB=E9=A2=86=E5=8F=96=E4=BC=98=E6=83=A0=202.?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=9C=AA=E7=94=A8=E5=9B=BE=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 62 +++++------ Utils/Api.js | 4 +- pages.json | 10 +- pages/goods/externalCoupon/externalCoupon.vue | 4 +- pages/tabBar/home/home.vue | 90 +++++++-------- pages/tabBar/user/user.vue | 8 +- pages/welcome/welcome.vue | 75 ++++++++++++- subPages/recharge/recharge.vue | 4 +- subPages/shareCounpon/shareCounpon.vue | 103 ++++++++++++------ subPages/shareImgage/shareImgage.vue | 8 +- subPages/static/union1.jpg | Bin 97739 -> 0 bytes subPages/static/union2.jpg | Bin 90408 -> 0 bytes subPages/static/upay1.jpg | Bin 38214 -> 0 bytes subPages/static/upay2.jpg | Bin 43663 -> 0 bytes subPages/static/upay4.jpg | Bin 52567 -> 0 bytes 15 files changed, 239 insertions(+), 129 deletions(-) delete mode 100644 subPages/static/union1.jpg delete mode 100644 subPages/static/union2.jpg delete mode 100644 subPages/static/upay1.jpg delete mode 100644 subPages/static/upay2.jpg delete mode 100644 subPages/static/upay4.jpg diff --git a/App.vue b/App.vue index 4a542a5..fca60c6 100644 --- a/App.vue +++ b/App.vue @@ -74,18 +74,18 @@ // #ifdef MP let accountInfo = uni.getAccountInfoSync(); - // if (accountInfo.miniProgram.envVersion == 'develop' || accountInfo.miniProgram.envVersion == 'trial') { - // this.globalData.url = 'https://hsgcs.dctpay.com/crest'; - // this.globalData.v1url = 'https://hsgcs.dctpay.com/v1'; - // this.globalData.payurl = 'https://gratia-pay.dctpay.com/crest'; - // this.globalData.orderurl = 'https://hsgcs.dctpay.com/order'; - // this.globalData.userurl = 'https://hsgcs.dctpay.com/user'; - // this.globalData.brestUrl = 'https://hsgcs.dctpay.com/brest'; - // this.globalData.imgUrl = 'https://hsgcs.dctpay.com/filesystem/'; - // this.globalData.imageWxImg = 'https://hsgcs.dctpay.com/filesystem/wxApplets/'; - // this.globalData.imageqrImg = 'https://hsgcs.dctpay.com/filesystem/temporary/'; - // } - // if (accountInfo.miniProgram.envVersion == 'release') { + if (accountInfo.miniProgram.envVersion == 'develop' || accountInfo.miniProgram.envVersion == 'trial') { + this.globalData.url = 'https://hsgcs.dctpay.com/crest'; + this.globalData.v1url = 'https://hsgcs.dctpay.com/v1'; + this.globalData.payurl = 'https://gratia-pay.dctpay.com/crest'; + this.globalData.orderurl = 'https://hsgcs.dctpay.com/order'; + this.globalData.userurl = 'https://hsgcs.dctpay.com/user'; + this.globalData.brestUrl = 'https://hsgcs.dctpay.com/brest'; + this.globalData.imgUrl = 'https://hsgcs.dctpay.com/filesystem/'; + this.globalData.imageWxImg = 'https://hsgcs.dctpay.com/filesystem/wxApplets/'; + this.globalData.imageqrImg = 'https://hsgcs.dctpay.com/filesystem/temporary/'; + } + if (accountInfo.miniProgram.envVersion == 'release') { this.globalData.url = 'https://hsg.dctpay.com/crest'; this.globalData.v1url = 'https://hsg.dctpay.com/v1'; this.globalData.payurl = 'https://pay.dctpay.com/crest'; @@ -95,29 +95,29 @@ this.globalData.imgUrl = 'https://hsg.dctpay.com/filesystem/'; this.globalData.imageWxImg = 'https://hsg.dctpay.com/filesystem/wxApplets/'; this.globalData.imageqrImg = 'https://hsg.dctpay.com/filesystem/temporary/'; - // } + } // #endif // #ifdef H5 let that = this; - // that.globalData.url = 'https://hsgcs.dctpay.com/crest'; - // that.globalData.v1url = 'https://hsgcs.dctpay.com/v1'; - // that.globalData.payurl = 'https://gratia-pay.dctpay.com/crest'; - // that.globalData.orderurl = 'https://hsgcs.dctpay.com/order'; - // that.globalData.userurl = 'https://hsgcs.dctpay.com/user'; - // that.globalData.brestUrl = 'https://hsgcs.dctpay.com/brest'; - // that.globalData.imgUrl = 'https://hsgcs.dctpay.com/filesystem/'; - // that.globalData.imageWxImg = 'https://hsgcs.dctpay.com/filesystem/wxApplets/'; - // that.globalData.imageqrImg = 'https://hsgcs.dctpay.com/filesystem/temporary/'; + that.globalData.url = 'https://hsgcs.dctpay.com/crest'; + that.globalData.v1url = 'https://hsgcs.dctpay.com/v1'; + that.globalData.payurl = 'https://gratia-pay.dctpay.com/crest'; + that.globalData.orderurl = 'https://hsgcs.dctpay.com/order'; + that.globalData.userurl = 'https://hsgcs.dctpay.com/user'; + that.globalData.brestUrl = 'https://hsgcs.dctpay.com/brest'; + that.globalData.imgUrl = 'https://hsgcs.dctpay.com/filesystem/'; + that.globalData.imageWxImg = 'https://hsgcs.dctpay.com/filesystem/wxApplets/'; + that.globalData.imageqrImg = 'https://hsgcs.dctpay.com/filesystem/temporary/'; - that.globalData.url = 'https://hsg.dctpay.com/crest'; - that.globalData.v1url = 'https://hsg.dctpay.com/v1'; - that.globalData.payurl = 'https://pay.dctpay.com/crest'; - that.globalData.orderurl = 'https://hsg.dctpay.com/order'; - that.globalData.userurl = 'https://hsg.dctpay.com/user'; - that.globalData.brestUrl = 'https://hsg.dctpay.com/brest'; - that.globalData.imgUrl = 'https://hsg.dctpay.com/filesystem/'; - that.globalData.imageWxImg = 'https://hsg.dctpay.com/filesystem/wxApplets/'; - that.globalData.imageqrImg = 'https://hsg.dctpay.com/filesystem/temporary/'; + // that.globalData.url = 'https://hsg.dctpay.com/crest'; + // that.globalData.v1url = 'https://hsg.dctpay.com/v1'; + // that.globalData.payurl = 'https://pay.dctpay.com/crest'; + // that.globalData.orderurl = 'https://hsg.dctpay.com/order'; + // that.globalData.userurl = 'https://hsg.dctpay.com/user'; + // that.globalData.brestUrl = 'https://hsg.dctpay.com/brest'; + // that.globalData.imgUrl = 'https://hsg.dctpay.com/filesystem/'; + // that.globalData.imageWxImg = 'https://hsg.dctpay.com/filesystem/wxApplets/'; + // that.globalData.imageqrImg = 'https://hsg.dctpay.com/filesystem/temporary/'; uni.getStorage({ key: 'openId', success(e) { diff --git a/Utils/Api.js b/Utils/Api.js index 98236e9..b2c6233 100644 --- a/Utils/Api.js +++ b/Utils/Api.js @@ -704,11 +704,11 @@ export const payReceiveDiscount = params => { } //获取二维码 export const generateWeChatMpQrCode = params => { - return POST('POST', `${payBase}/storeDiscountActivityPartakeUser/generateWeChatMpQrCode`, params).then(res => res.data); + return POST('GET', `${payBase}/storeDiscountActivityPartakeUser/generateWeChatMpQrCode`, params).then(res => res.data); } //查询订单详情 export const getOrderByOutTradeOrder = params => { - return POST('POST', `${payBase}/tradeOrder/getOrderByOutTradeOrder`, params).then(res => res.data); + return POST('GET', `${payBase}/tradeOrder/getOrderByOutTradeOrder`, params).then(res => res.data); } diff --git a/pages.json b/pages.json index 184c600..bb96871 100644 --- a/pages.json +++ b/pages.json @@ -832,14 +832,20 @@ "path": "shareCounpon/shareCounpon", "style": { "navigationBarTitleText": "分享领取优惠券", - "enablePullDownRefresh": false + "enablePullDownRefresh": false, + "app-plus": { + "titleNView": false //禁用原生导航栏 + } } }, { "path": "shareImgage/shareImgage", "style": { "navigationBarTitleText": "分享领取优惠券", - "enablePullDownRefresh": false + "enablePullDownRefresh": false, + "app-plus": { + "titleNView": false //禁用原生导航栏 + } } } diff --git a/pages/goods/externalCoupon/externalCoupon.vue b/pages/goods/externalCoupon/externalCoupon.vue index eeae6b4..1d1920b 100644 --- a/pages/goods/externalCoupon/externalCoupon.vue +++ b/pages/goods/externalCoupon/externalCoupon.vue @@ -65,8 +65,7 @@ - + 优惠券 - + @@ -252,7 +252,7 @@ onLoad() { if (!app.globalData.userInfo) { this.findUser(); - // this.queryHzfDiscountTotalNum(); + this.queryHzfDiscountTotalNum(); } }, onReady() { @@ -267,7 +267,7 @@ onShow() { if (app.globalData.userInfo) { this.findUser(); - // this.queryHzfDiscountTotalNum(); + this.queryHzfDiscountTotalNum(); } // #ifdef MP if (!app.globalData.userInfo.isSetPayPwd) { diff --git a/pages/welcome/welcome.vue b/pages/welcome/welcome.vue index 62abc51..034c42d 100644 --- a/pages/welcome/welcome.vue +++ b/pages/welcome/welcome.vue @@ -21,12 +21,12 @@ let that = this; // #ifdef MP app.globalData.accountId = options.accountId; - // uni.switchTab({ - // url: '../tabBar/home/home' - // }) - uni.navigateTo({ - url:'/subPages/shareImgage/shareImgage' + uni.switchTab({ + url: '../tabBar/home/home' }) + // uni.navigateTo({ + // url: '/subPages/shareImgage/shareImgage' + // }) // #endif // #ifdef H5 var arr1 = window.location.href; @@ -37,6 +37,69 @@ key: "h5code", data: arr2[1] }) + + uni.getStorage({ + key: 'accountId', + success(e) { + if (e.data) { + app.globalData.accountId = e.data; + } + } + }) + uni.getStorage({ + key: 'gasKey', + success(e) { + if (e.data) { + app.globalData.gasKey = e.data; + } + } + }) + uni.getStorage({ + key: 'staffCode', + success(e) { + if (e.data) { + if (app.globalData.accountId == '000001&key' || app.globalData.accountId == + '000000&gasKey' || app.globalData.accountId == '000009&key' || app.globalData + .accountId == '0000010&key') { + app.globalData.staffCode = e.data; + } else { + app.globalData.mchId = e.data; + } + } + } + }) + uni.getStorage({ + key: 'accountType', + success(e) { + if (e.data) { + app.globalData.accountType = e.data; + } + } + }) + + // 0011 扫码领取优惠券 + // 0012 分享领取优惠券 + // 0013 分享界面 + // 0014 直领优惠券 + if (app.globalData.accountType == '0000011&key' && app.globalData.h5code) { + uni.navigateTo({ + url: '/pages/goods/externalCoupon/externalCoupon' + }) + return; + } + if ((app.globalData.accountType == '0000012&key' || app.globalData.accountType == '0000014&key') && app + .globalData.h5code) { + uni.navigateTo({ + url: '/subPages/shareCounpon/shareCounpon' + }) + return; + } + if (app.globalData.accountType == '0000013&key' && app.globalData.h5code) { + uni.navigateTo({ + url: '/subPages/shareImgage/shareImgage' + }) + return; + } uni.switchTab({ url: '../tabBar/home/home' }) @@ -140,7 +203,7 @@ }, jumpcdx() { location.href = - 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxa075e8509802f826&redirect_uri=https%3A%2F%2Fhsg.dctpay.com%2FhsgH5%2Findex.html%23%2F&response_type=code&scope=snsapi_base&state=1#wechat_redirect'; + 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxa075e8509802f826&redirect_uri=https%3A%2F%2Fhsgcs.dctpay.com%2FhsgH5%2Findex.html%23%2F&response_type=code&scope=snsapi_base&state=1#wechat_redirect'; }, } } diff --git a/subPages/recharge/recharge.vue b/subPages/recharge/recharge.vue index 402bcea..f0d3a39 100644 --- a/subPages/recharge/recharge.vue +++ b/subPages/recharge/recharge.vue @@ -1,9 +1,9 @@