正在显示
6 个修改的文件
包含
19 行增加
和
20 行删除
| 1 | -//app.js | ||
| 2 | -const appId = 'wxe91c67adba6ac02d'; | 1 | +const appId = 'wx04262fa98a7de5b6'; |
| 3 | 2 | ||
| 4 | App({ | 3 | App({ |
| 5 | onLaunch: function() { | 4 | onLaunch: function() { |
| @@ -17,7 +16,7 @@ App({ | @@ -17,7 +16,7 @@ App({ | ||
| 17 | "code": res.code, | 16 | "code": res.code, |
| 18 | "scope": "global_access:end_user,tenant:" + appId | 17 | "scope": "global_access:end_user,tenant:" + appId |
| 19 | }; | 18 | }; |
| 20 | - that.getTokenByCode(requestdata, true,"") | 19 | + that.getTokenByCode(requestdata, true, "") |
| 21 | } | 20 | } |
| 22 | } | 21 | } |
| 23 | }) | 22 | }) |
| @@ -28,13 +27,13 @@ App({ | @@ -28,13 +27,13 @@ App({ | ||
| 28 | var that = this; | 27 | var that = this; |
| 29 | that.globalData.onshow_count++; | 28 | that.globalData.onshow_count++; |
| 30 | if (that.globalData.onshow_count > 1) { //除第一次进入小程序之外的打开时 | 29 | if (that.globalData.onshow_count > 1) { //除第一次进入小程序之外的打开时 |
| 31 | - if (res.path =="pages/main/smartchat/chat") {//聊天页面锁屏再打开,走该逻辑 | 30 | + if (res.path == "pages/main/smartchat/chat") { //聊天页面锁屏再打开,走该逻辑 |
| 32 | var requestdata = { | 31 | var requestdata = { |
| 33 | "grant_type": "refresh_token", | 32 | "grant_type": "refresh_token", |
| 34 | "refresh_token": that.globalData.refresh_token, | 33 | "refresh_token": that.globalData.refresh_token, |
| 35 | "scope": "global_access:end_user,tenant:" + that.globalData.com_id | 34 | "scope": "global_access:end_user,tenant:" + that.globalData.com_id |
| 36 | }; | 35 | }; |
| 37 | - that.getTokenByCode(requestdata, false,"") | 36 | + that.getTokenByCode(requestdata, false, "") |
| 38 | } else { | 37 | } else { |
| 39 | wx.login({ | 38 | wx.login({ |
| 40 | success: function(res) { | 39 | success: function(res) { |
| @@ -44,7 +43,7 @@ App({ | @@ -44,7 +43,7 @@ App({ | ||
| 44 | "code": res.code, | 43 | "code": res.code, |
| 45 | "scope": "global_access:end_user,tenant:" + appId | 44 | "scope": "global_access:end_user,tenant:" + appId |
| 46 | }; | 45 | }; |
| 47 | - that.getTokenByCode(requestdata, false,"chat") | 46 | + that.getTokenByCode(requestdata, false, "chat") |
| 48 | } | 47 | } |
| 49 | } | 48 | } |
| 50 | }) | 49 | }) |
| @@ -52,7 +51,7 @@ App({ | @@ -52,7 +51,7 @@ App({ | ||
| 52 | } | 51 | } |
| 53 | }, | 52 | }, |
| 54 | 53 | ||
| 55 | - getTokenByCode: function(requestdata, relaunch,str) { | 54 | + getTokenByCode: function(requestdata, relaunch, str) { |
| 56 | var that = this; | 55 | var that = this; |
| 57 | var baseUrl = that.globalData.baseUrl; | 56 | var baseUrl = that.globalData.baseUrl; |
| 58 | wx.request({ | 57 | wx.request({ |
| @@ -89,14 +88,14 @@ App({ | @@ -89,14 +88,14 @@ App({ | ||
| 89 | fail: function(res) { | 88 | fail: function(res) { |
| 90 | console.log("login-res-fail", res); | 89 | console.log("login-res-fail", res); |
| 91 | }, | 90 | }, |
| 92 | - complete:function(res){ | ||
| 93 | - if(str=="chat"){ | 91 | + complete: function(res) { |
| 92 | + if (str == "chat") { | ||
| 94 | that.globalData.refresh_complete = true | 93 | that.globalData.refresh_complete = true |
| 95 | } | 94 | } |
| 96 | } | 95 | } |
| 97 | }) | 96 | }) |
| 98 | }, | 97 | }, |
| 99 | - | 98 | + |
| 100 | getUserInfo: function(cb) { | 99 | getUserInfo: function(cb) { |
| 101 | var that = this | 100 | var that = this |
| 102 | if (this.globalData.userInfo) { | 101 | if (this.globalData.userInfo) { |
| @@ -150,11 +149,11 @@ App({ | @@ -150,11 +149,11 @@ App({ | ||
| 150 | // baseUrl: "http://192.144.144.220:20000/", | 149 | // baseUrl: "http://192.144.144.220:20000/", |
| 151 | // baseUrl: "http://154.8.229.55:20000/", | 150 | // baseUrl: "http://154.8.229.55:20000/", |
| 152 | // baseUrl: "http://47.110.250.177:20000/", | 151 | // baseUrl: "http://47.110.250.177:20000/", |
| 153 | - baseUrl: "http://47.110.158.110:20000/", | ||
| 154 | - // baseUrl: "https://api.workai.com.cn/", | 152 | + // baseUrl: "http://47.110.158.110:20000/", |
| 153 | + baseUrl: "https://api.fjhxrl.com/", | ||
| 155 | OSSUrl: "", //"https://oss.workai.com.cn/", | 154 | OSSUrl: "", //"https://oss.workai.com.cn/", |
| 156 | userInfo: null, | 155 | userInfo: null, |
| 157 | - hostInfo:null, | 156 | + hostInfo: null, |
| 158 | hasLogin: false, | 157 | hasLogin: false, |
| 159 | openid: null, | 158 | openid: null, |
| 160 | Authorization: null, | 159 | Authorization: null, |
| @@ -11,9 +11,9 @@ | @@ -11,9 +11,9 @@ | ||
| 11 | "newFeature": true | 11 | "newFeature": true |
| 12 | }, | 12 | }, |
| 13 | "compileType": "miniprogram", | 13 | "compileType": "miniprogram", |
| 14 | - "libVersion": "2.2.2", | ||
| 15 | - "appid": "wxe91c67adba6ac02d", | ||
| 16 | - "projectname": "%E8%87%AA%E7%84%B6%E4%BA%BA%E7%A8%8E%E6%94%B6", | 14 | + "libVersion": "2.2.2", |
| 15 | + "appid": "wx04262fa98a7de5b6", | ||
| 16 | + "projectname": "%E8%87%AA%E7%84%B6%E4%BA%BA%E7%A8%8E%E6%94%B6", | ||
| 17 | "isGameTourist": false, | 17 | "isGameTourist": false, |
| 18 | "condition": { | 18 | "condition": { |
| 19 | "search": { | 19 | "search": { |
请
注册
或
登录
后发表评论