Browse Source

基础配置

zhaoxiaohai 2 years ago
parent
commit
9f78916a96
3 changed files with 45 additions and 36 deletions
  1. 36 35
      app.js
  2. 2 1
      app.json
  3. 7 0
      project.private.config.json

+ 36 - 35
app.js

@@ -1,40 +1,41 @@
 import {
-	ApiModel
+    ApiModel
 } from './utils/Api';
 
 App({
-	onLaunch() {},
-	initSocket() {
-		let that = this;
-		this.globalData.SocketTask = wx.connectSocket({
-			url: 'wss://meida.cnyunl.com/yos/webSocket/' + wx.getStorageSync('userMsg').token,
-			complete: (res) => {
-				console.log(res)
-			}
-		})
-		this.globalData.SocketTask.onOpen(function (res) {
-			that.globalData.socketEstablish = true;
-		})
-		this.globalData.SocketTask.onMessage(function (res) {
-			that.globalData.socket.callback(res)
-		})
-		this.globalData.SocketTask.onError(function (res) {
-			that.globalData.socketEstablish = false;
-		})
-		this.globalData.SocketTask.onClose(function (res) {
-			that.globalData.socketEstablish = false;
-		})
-	},
-	globalData: {
-		http: new ApiModel(), //接口文件
-		queryPer: require("./utils/queryPermissions"), //权限查询
-		handleSelect: null, //处理选择结果  函数
-		savePage: null, //保存页面实例
-		socketEstablish: false, //是否已经建立socket
-		SocketTask: '', // Socket方法
-		socket: { // Socket回调
-			that: null, //保存this
-			callback: function () {}
-		},
-	}
+    onLaunch() {},
+    initSocket() {
+        let that = this;
+        this.globalData.SocketTask = wx.connectSocket({
+            url: 'wss://meida.cnyunl.com/yos/webSocket/' + wx.getStorageSync('userMsg').token,
+            complete: (res) => {
+                console.log(res)
+            }
+        })
+        this.globalData.SocketTask.onOpen(function (res) {
+            that.globalData.socketEstablish = true;
+        })
+        this.globalData.SocketTask.onMessage(function (res) {
+            that.globalData.socket.callback(res)
+        })
+        this.globalData.SocketTask.onError(function (res) {
+            that.globalData.socketEstablish = false;
+        })
+        this.globalData.SocketTask.onClose(function (res) {
+            that.globalData.socketEstablish = false;
+        })
+    },
+    globalData: {
+        userrole: null, //角色身份
+        http: new ApiModel(), //接口文件
+        queryPer: require("./utils/queryPermissions"), //权限查询
+        handleSelect: null, //处理选择结果  函数
+        savePage: null, //保存页面实例
+        socketEstablish: false, //是否已经建立socket
+        SocketTask: '', // Socket方法
+        socket: { // Socket回调
+            that: null, //保存this
+            callback: function () {}
+        },
+    }
 })

+ 2 - 1
app.json

@@ -46,7 +46,8 @@
         "address/index",
         "finance/index",
         "contract/index",
-        "activity/index"
+        "activity/index",
+        "orderFormLine/index"
       ]
     }
   ],

+ 7 - 0
project.private.config.json

@@ -85,6 +85,13 @@
           "query": "",
           "launchMode": "default",
           "scene": null
+        },
+        {
+          "name": "开票详情",
+          "pathName": "packageA/invoice/detail",
+          "query": "id=4",
+          "launchMode": "default",
+          "scene": null
         }
       ]
     }