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 @@