From eb7366f400867d3f401fe60f06d848d6d1448457 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期一, 17 十月 2022 17:41:56 +0800
Subject: [PATCH] 2022.10.17

---
 app.js |   52 +++++++++++++++++++++++++++++++++++++++++-----------
 1 files changed, 41 insertions(+), 11 deletions(-)

diff --git a/app.js b/app.js
index 1ed57c4..db53ec6 100644
--- a/app.js
+++ b/app.js
@@ -1,19 +1,49 @@
 // app.js
+import moment from './utils/moment.min'
+import $f from "./service/baserequest"
+
 App({
   onLaunch() {
-    // 灞曠ず鏈湴瀛樺偍鑳藉姏
-    const logs = wx.getStorageSync('logs') || []
-    logs.unshift(Date.now())
-    wx.setStorageSync('logs', logs)
+    console.log('onLaunch');
 
-    // 鐧诲綍
-    wx.login({
-      success: res => {
-        // 鍙戦�� res.code 鍒板悗鍙版崲鍙� openId, sessionKey, unionId
-      }
+    moment.updateLocale('en', {
+      weekdays: '鏄熸湡鏃鏄熸湡涓�_鏄熸湡浜宊鏄熸湡涓塤鏄熸湡鍥沖鏄熸湡浜擾鏄熸湡鍏�'.split('_')
+    });
+
+    wx.getStorage({
+      key: 'userProfile',
+      success: (res) => {
+        this.globalData.userProfile = res.data
+      },
     })
   },
   globalData: {
-    userInfo: null
+    perPage: 5,
+    userInfo: null,
+    accessToken: null,
+    isLogin: false,
+    version: '浣撻獙鐗� 1.0.0',
+    agreement: $f.baseFileUrl + '/agreement/涓皬寰紒涓氱敓鎬佺幆澧冨畧娉曟櫤鑳芥湇鍔″井淇″皬绋嬪簭鏈嶅姟鍗忚.docx'
+  },
+  // 鏅鸿兘鍜ㄨ缁撴灉绫诲瀷鏂囨湰杞崲
+  cosultTypeName: (typeId) => {
+    let name = ''
+    switch (typeId) {
+      case 1:
+        name = '鐩稿叧鏂囦欢'
+        break;
+      case 2:
+        name = '鐩稿叧鏉$洰'
+        break;
+      case 3:
+        name = '鎵ф硶妗堜緥'
+        break;
+      case 4:
+        name = '鐜繚闂'
+        break;
+      default:
+        break;
+    }
+    return name
   }
-})
+})
\ No newline at end of file

--
Gitblit v1.9.3