diff --git a/Utils/Request.js b/Utils/Request.js index c51641c..0e7b07c 100644 --- a/Utils/Request.js +++ b/Utils/Request.js @@ -12,26 +12,31 @@ function request(method, url, data) { 'Authorization': app.globalData.token }, //有的时候这里不一定是 token 还可能是 Authorization success(res) { - resolve(res) - if(res.statusCode === 401 || res.data.return_code == 102014 || res.data.return_code == 104001){ - uni.showToast({ - title:'登录信息过期,请重新授权', - icon:'none', - duration:2000 - }) - app.globalData.userInfo = ''; - app.globalData.token = ''; - uni.setStorage({ - key: "user", - data: '' - }) - uni.setStorage({ - key: "token", - data: '' - }) - uni.reLaunch({ - url: '/pages/tabBar/home/home' - }) + resolve(res) + if (res.statusCode === 401 || res.data.return_code == 102014 || res.data.return_code == + 104001) { + app.globalData.userInfo = ''; + app.globalData.token = ''; + uni.setStorage({ + key: "user", + data: '' + }) + uni.setStorage({ + key: "token", + data: '' + }) + uni.showToast({ + title: '登录信息过期,请重新授权', + icon: 'none', + duration: 2000, + success() { + setTimeout(() => { + uni.navigateTo({ + url:'/pages/userLogin/userLogin' + }) + }, 800); + } + }) } }, fail(err) { diff --git a/pages.json b/pages.json index a48e375..1217a3a 100644 --- a/pages.json +++ b/pages.json @@ -517,6 +517,15 @@ } } + ,{ + "path" : "pages/userLogin/userLogin", + "style" : + { + "navigationBarTitleText": "嗨森购", + "enablePullDownRefresh": false + } + + } ], "globalStyle": { diff --git a/pages/goods/goods.vue b/pages/goods/goods.vue index 158ee30..9e15ecf 100644 --- a/pages/goods/goods.vue +++ b/pages/goods/goods.vue @@ -13,10 +13,10 @@ - @@ -112,7 +112,7 @@ - + @@ -122,12 +122,12 @@ GetPhoneNumber, getUserInfo } from "../../Utils/Api.js"; - import authorize from '../../components/Authorize.vue' + // import authorize from '../../components/Authorize.vue' import wybPopup from '../../components/wyb-popup/wyb-popup.vue'; let app = getApp() export default { components: { - authorize, + // authorize, wybPopup }, data() { diff --git a/pages/goods/refuel-confirm/refuel-confirm.vue b/pages/goods/refuel-confirm/refuel-confirm.vue index f5881a4..f926537 100644 --- a/pages/goods/refuel-confirm/refuel-confirm.vue +++ b/pages/goods/refuel-confirm/refuel-confirm.vue @@ -52,7 +52,7 @@ 微信支付 - + @@ -109,7 +109,6 @@ orderList: '', refulAdress: '', tongCardPrice: 0, - balanceCardNo: '', user: '', paytype: '', PaymentPassword: '', @@ -126,13 +125,7 @@ let that = this; that.paytype = ''; that.user = app.globalData.userInfo; - uni.getStorage({ - key: 'balanceCardNo', - success(e) { - that.balanceCardNo = e.data; - that.getHuiLianTongCardBalance(); - } - }) + that.getHuiLianTongCardBalance(); }, methods: { //密码支付完成 @@ -151,7 +144,7 @@ }) let params = { "orderId": this.orderNo, - "cardNo": this.balanceCardNo, + "cardNo": this.user.hltCardNo.cardNo, "password": this.PaymentPassword } hltUnionCardPay(params).then(res => { @@ -214,7 +207,7 @@ //查询工会卡余额 getHuiLianTongCardBalance() { let params = { - cardNo: this.balanceCardNo + cardNo: this.user.hltCardNo.cardNo } getHuiLianTongCardBalance(params).then(res => { if (res.return_code == '000000') { @@ -226,6 +219,20 @@ //获取订单数据 orderToPay() { let that = this; + uni.requestSubscribeMessage({ + tmplIds: ['oUvaCPeeOg4wH6HTvCcSabU6FnzXUXOBXsqBYAPOV-U'], + success (res) { + + }, + fail:(res) => { + // console.log(res) + // uni.showToast({ + // title: '请开起消息订阅', + // duration:2000, + // icon:'none' + // }) + } + }) if (that.paytype == '') { uni.showToast({ title: '请选择支付方式', @@ -267,13 +274,13 @@ }, }); // #endif - + //判断是否是公众号 // #ifdef H5 //判断微信浏览器 that.payRequest(res); // #endif - + } else { uni.showToast({ title: res.return_msg, @@ -307,7 +314,6 @@ } that.$refs.paymentPassword.modalFun('show'); } - }, payRequest: function(self) { let that = this; diff --git a/pages/goods/refuel-details/refuel-details.vue b/pages/goods/refuel-details/refuel-details.vue index 42ca687..63d5207 100644 --- a/pages/goods/refuel-details/refuel-details.vue +++ b/pages/goods/refuel-details/refuel-details.vue @@ -87,9 +87,9 @@ - - + + @@ -124,8 +124,7 @@ + + diff --git a/static/img/login.png b/static/img/login.png new file mode 100644 index 0000000..8d528cc Binary files /dev/null and b/static/img/login.png differ