| | |
| | | // 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) |
| | | |
| | | // 登录 |
| | | // wx.login({ |
| | | // success: res => { |
| | | // // 发送 res.code 到后台换取 openId, sessionKey, unionId |
| | | // } |
| | | // }) |
| | | console.log('onLaunch'); |
| | | |
| | | moment.updateLocale('en', { |
| | | weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_') |
| | | }); |
| | | |
| | | wx.getStorage({ |
| | | key: 'userProfile', |
| | | success: (res) => { |
| | | this.globalData.userProfile = res.data |
| | | }, |
| | | }) |
| | | }, |
| | | globalData: { |
| | | perPage: 5, |
| | | userInfo: null, |
| | | accessToken: null, |
| | | isLogin: false |
| | | isLogin: false, |
| | | version: '体验版 1.0.0', |
| | | agreement: $f.baseFileUrl + '/agreement/中小微企业生态环境守法智能服务微信小程序服务协议.docx', |
| | | newUser: false,//是否为注册一个月以内的新用户 |
| | | }, |
| | | // 智能咨询结果类型文本转换 |
| | | cosultTypeName: (typeId) => { |