From da4aa71c23abd57a8b50d7932012af943d203e97 Mon Sep 17 00:00:00 2001 From: Wik-T <812952667@qq.com> Date: Fri, 3 Dec 2021 09:21:22 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9=E9=A2=86=E5=88=B8=20?= =?UTF-8?q?=E4=B8=8D=E9=9C=80=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 16 +++++------ pages/goods/externalCoupon/externalCoupon.vue | 27 ++++++++++++------- 2 files changed, 25 insertions(+), 18 deletions(-) diff --git a/App.vue b/App.vue index c50acc1..eb2a24c 100644 --- a/App.vue +++ b/App.vue @@ -5,15 +5,15 @@ // brestUrl: 'http://192.168.3.4:9302/brest', // imgUrl: 'https://192.168.3.4:9301/filesystem/', //正式 - // url: 'https://hsg.dctpay.com/crest', - // imgUrl: 'https://hsg.dctpay.com/filesystem/', - // brestUrl : 'https://hsg.dctpay.com/brest', - // imageWxImg:'https://hsg.dctpay.com/filesystem/wxApplets/', + url: 'https://hsg.dctpay.com/crest', + imgUrl: 'https://hsg.dctpay.com/filesystem/', + brestUrl : 'https://hsg.dctpay.com/brest', + imageWxImg:'https://hsg.dctpay.com/filesystem/wxApplets/', //测试 - url: 'https://hsgcs.dctpay.com/crest', - brestUrl : 'https://hsgcs.dctpay.com/brest', - imgUrl: 'https://hsgcs.dctpay.com/filesystem/', - imageWxImg:'https://hsgcs.dctpay.com/filesystem/wxApplets/', + // url: 'https://hsgcs.dctpay.com/crest', + // brestUrl : 'https://hsgcs.dctpay.com/brest', + // imgUrl: 'https://hsgcs.dctpay.com/filesystem/', + // imageWxImg:'https://hsgcs.dctpay.com/filesystem/wxApplets/', userInfo: "", brestUserInfo : '', openId: '', diff --git a/pages/goods/externalCoupon/externalCoupon.vue b/pages/goods/externalCoupon/externalCoupon.vue index 932b197..7eaa622 100644 --- a/pages/goods/externalCoupon/externalCoupon.vue +++ b/pages/goods/externalCoupon/externalCoupon.vue @@ -64,12 +64,8 @@ getH5AccessToken, loginByPhone } from '../../../Utils/Api.js'; - // import authorize from '../../../components/Authorize'; let app = getApp(); export default { - // components: { - // authorize - // }, data() { return { minecoupones: [], @@ -104,11 +100,22 @@ } }, onShow() { - if (app.globalData.userInfo.phone) { - this.userInfo = 2; - } else { - this.userInfo = 1; - } + uni.getStorage({ + key: 'user', + success: (res) => { + app.globalData.userInfo = res.data; + if (app.globalData.userInfo.phone) { + this.userInfo = 2; + } else { + this.userInfo = 1; + } + }, + fail() { + this.userInfo = 1; + } + }); + + }, onLoad() { var arr1 = window.location.href; @@ -128,7 +135,7 @@ code: res.data } getDiscountByQrCode(params).then(res => { - if (res.return_code == '000000') { + if (res.return_code == '000000') { that.couponsDetails = res.return_data; that.salesEndTime = res.return_data.highDiscount.salesEndTime; that.getCouponByDiscount(res.return_data.highDiscount.id);