zhaoxiaohai 2 years ago
parent
commit
4ed2ef2379
3 changed files with 18 additions and 4 deletions
  1. 16 2
      app.js
  2. 1 1
      project.config.json
  3. 1 1
      project.private.config.json

+ 16 - 2
app.js

@@ -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)
             }

+ 1 - 1
project.config.json

@@ -52,7 +52,7 @@
     },
     "compileType": "miniprogram",
     "libVersion": "2.19.4",
-    "appid": "wx8fa10446dd041b67",
+    "appid": "wx3f070c8a298dd1ec",
     "projectname": "miniprogram-92",
     "condition": {},
     "editorSetting": {

+ 1 - 1
project.private.config.json

@@ -1,5 +1,5 @@
 {
-    "projectname": "CRM",
+    "projectname": "MD_YOSwechat",
     "setting": {
         "compileHotReLoad": true,
         "urlCheck": false