Browse Source

upload

soldDate
HolyKnightIX 1 year ago
parent
commit
3c89a4056c
2 changed files with 18 additions and 10 deletions
  1. +15
    -7
      pages/main/index.js
  2. +3
    -3
      project.config.json

+ 15
- 7
pages/main/index.js View File

@@ -106,7 +106,7 @@ Page({
if (options.couponChannelId || options.orderId || options.id) { if (options.couponChannelId || options.orderId || options.id) {
that.userStatus(options); that.userStatus(options);
} else { } else {
that.userStatus();
that.userStatus(options);
} }
} else { } else {
// 由于 token 是网络请求,可能会在 Page.onLoad 之后才返回 // 由于 token 是网络请求,可能会在 Page.onLoad 之后才返回
@@ -117,7 +117,7 @@ Page({
if (options.couponChannelId || options.orderId || options.id) { if (options.couponChannelId || options.orderId || options.id) {
that.userStatus(options); that.userStatus(options);
} else { } else {
that.userStatus();
that.userStatus(options);
} }
} }
} }
@@ -128,10 +128,11 @@ Page({
*/ */
userStatus: function (options) { userStatus: function (options) {
var that = this; var that = this;
console.log(options, 'userStatus');
if (options && (options.couponChannelId || options.orderId || options.id)) { if (options && (options.couponChannelId || options.orderId || options.id)) {
that.checkuserstatus(options); that.checkuserstatus(options);
} else { } else {
that.checkuserstatus();
that.checkuserstatus(options);
} }
}, },
/** /**
@@ -153,6 +154,7 @@ Page({
// }, // },


checkuserstatus(options) { checkuserstatus(options) {
console.log(options, 'checkuserstatus');
let that = this; let that = this;
if (options && options.couponChannelId && options.type == 'orderAffirm') { if (options && options.couponChannelId && options.type == 'orderAffirm') {
tt.redirectTo({ tt.redirectTo({
@@ -171,12 +173,18 @@ Page({
}) })
} }
} else { } else {
let dataX = {
token: app.globalData.token,
}

if (options && options.tenantId) {
dataX.mallTenantId = options.tenantId
}

console.log(dataX, 'dataX');
Http.get({ Http.get({
url: config.api.checkUserStatus, url: config.api.checkUserStatus,
data: {
token: app.globalData.token,
mallTenantId: options.tenantId
}
dataX
}) })
.then(res => { .then(res => {
// res = JSON.parse('{"code":11004,"message":"用户昵称未授权,请跳转到用户昵称授权页!","data":{}}') // res = JSON.parse('{"code":11004,"message":"用户昵称未授权,请跳转到用户昵称授权页!","data":{}}')


+ 3
- 3
project.config.json View File

@@ -17,13 +17,13 @@
"projectname": "tt富茂C", "projectname": "tt富茂C",
"condition": { "condition": {
"miniprogram": { "miniprogram": {
"current": 1678330099779,
"current": 1678508631604,
"list": [ "list": [
{ {
"id": 1676969626961,
"id": 1678508631604,
"name": "pages/main/index", "name": "pages/main/index",
"pathName": "pages/main/index", "pathName": "pages/main/index",
"query": "type=md&id=758855991052394496&tenantId=1032",
"query": "type=uc&tenantId=1033",
"scene": "990001", "scene": "990001",
"launchFrom": "scan", "launchFrom": "scan",
"location": "qr_code" "location": "qr_code"


Loading…
Cancel
Save