diff --git a/pages/main/index.js b/pages/main/index.js index 402d6a9..e9a3c37 100644 --- a/pages/main/index.js +++ b/pages/main/index.js @@ -106,7 +106,7 @@ Page({ if (options.couponChannelId || options.orderId || options.id) { that.userStatus(options); } else { - that.userStatus(); + that.userStatus(options); } } else { // 由于 token 是网络请求,可能会在 Page.onLoad 之后才返回 @@ -117,7 +117,7 @@ Page({ if (options.couponChannelId || options.orderId || options.id) { that.userStatus(options); } else { - that.userStatus(); + that.userStatus(options); } } } @@ -128,10 +128,11 @@ Page({ */ userStatus: function (options) { var that = this; + console.log(options, 'userStatus'); if (options && (options.couponChannelId || options.orderId || options.id)) { that.checkuserstatus(options); } else { - that.checkuserstatus(); + that.checkuserstatus(options); } }, /** @@ -153,6 +154,7 @@ Page({ // }, checkuserstatus(options) { + console.log(options, 'checkuserstatus'); let that = this; if (options && options.couponChannelId && options.type == 'orderAffirm') { tt.redirectTo({ @@ -171,12 +173,18 @@ Page({ }) } } else { + let dataX = { + token: app.globalData.token, + } + + if (options && options.tenantId) { + dataX.mallTenantId = options.tenantId + } + + console.log(dataX, 'dataX'); Http.get({ url: config.api.checkUserStatus, - data: { - token: app.globalData.token, - mallTenantId: options.tenantId - } + dataX }) .then(res => { // res = JSON.parse('{"code":11004,"message":"用户昵称未授权,请跳转到用户昵称授权页!","data":{}}') diff --git a/project.config.json b/project.config.json index fc7243c..54ff689 100644 --- a/project.config.json +++ b/project.config.json @@ -17,13 +17,13 @@ "projectname": "tt富茂C", "condition": { "miniprogram": { - "current": 1678330099779, + "current": 1678508631604, "list": [ { - "id": 1676969626961, + "id": 1678508631604, "name": "pages/main/index", "pathName": "pages/main/index", - "query": "type=md&id=758855991052394496&tenantId=1032", + "query": "type=uc&tenantId=1033", "scene": "990001", "launchFrom": "scan", "location": "qr_code"