From 011a450c4d38ca0038c6006dbfb052f3be7e9907 Mon Sep 17 00:00:00 2001 From: xpz2018 <107107461@qq.com> Date: Mon, 11 Jan 2021 15:33:08 +0800 Subject: [PATCH] no message --- app.js | 2 +- pages/login/index.js | 29 ++++++++++++++--------------- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/app.js b/app.js index 6ecce42..733317f 100644 --- a/app.js +++ b/app.js @@ -1,7 +1,7 @@ //app.js App({ //----------------------------------------------globalData-------------------------------------- - release: 0, + release: 1, httpUrl: 'https://api.qniao.cn', tmplIds: ['SUjEgwDopCv9xkkSZ4KbS0L7XbAiVQor6GmPg14K760'], agentMsgIds: ['kG8DErWDpyzBHCFaLlSKYMF7xVy8UpgogCwV_WSNt10', 'oLbv-IyJOia2tenh64_Lc8xeAzwgzu3gh1vFJ1Se-ME'], diff --git a/pages/login/index.js b/pages/login/index.js index 08c7835..30e7e28 100644 --- a/pages/login/index.js +++ b/pages/login/index.js @@ -149,24 +149,23 @@ Page({ app.globalData.userInfo = result.data event.emit('EventMessage', { what: 888, desc: 'Logined' }) if(app.globalData.userToken){ - // 判断该用户是否有订单存在 1存在 2不存在 - wx.reLaunch({ url: '/pages/paper/index' }) + // /receive/v150/get/OrderExists 判断该用户是否有订单存在 1存在 2不存在 + request.get('/saas-trade/receive/v150/get/OrderExists').then(result => { + wx.hideLoading() + if (Number(result.data) != 1 || !app.release) { + wx.navigateBack() + } else { + wx.reLaunch({ url: '/pages/paper/index' }) + } + }).catch(err => { + //异常回调 + wx.hideLoading() + wx.navigateBack() + }) } else { wx.navigateBack() } - // /receive/v150/get/OrderExists 判断该用户是否有订单存在 1存在 2不存在 - // request.get('/saas-trade/receive/v150/get/OrderExists').then(result => { - // wx.hideLoading() - // if (Number(result.data) != 1 || !app.release) { - // wx.navigateBack() - // } else { - // wx.reLaunch({ url: '/pages/paper/index' }) - // } - // }).catch(err => { - // //异常回调 - // wx.hideLoading() - // wx.navigateBack() - // }) + }, changeType: function () { if (this.data.type == 1) {