|
@@ -2,12 +2,26 @@ import {
|
|
|
ApiModel
|
|
|
} from './utils/api';
|
|
|
|
|
|
+
|
|
|
App({
|
|
|
- onLaunch() {},
|
|
|
+ onLaunch() {
|
|
|
+ //自动登录
|
|
|
+ if (wx.getStorageSync('userMsg').token && ![1007, 1008, 1155].includes(wx.getLaunchOptionsSync().scene)) this.globalData.http.basic({
|
|
|
+ "classname": "webmanage.site.site",
|
|
|
+ "method": "querySite_Parameter",
|
|
|
+ "content": {}
|
|
|
+ }).then(res => {
|
|
|
+ console.log("验证登录", res)
|
|
|
+ if (res.msg == '成功') {
|
|
|
+ const loginMsg = require("./pages/login/modules/login");
|
|
|
+ loginMsg.query_userauth();
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
initSocket() {
|
|
|
let that = this;
|
|
|
this.globalData.SocketTask = wx.connectSocket({
|
|
|
- url: 'ws://121.37.152.76:8080/yos/webSocket/' + wx.getStorageSync('userMsg').token,
|
|
|
+ url: 'wss://meida.cnyunl.com/yos/webSocket/' + wx.getStorageSync('userMsg').token,
|
|
|
complete: (res) => {
|
|
|
console.log(res)
|
|
|
}
|