| xqd
@@ -11,8 +11,8 @@ const state = {
|
|
|
userInfo: uni.getStorageSync("userInfo") || {}, // 用户信息
|
|
|
userData: {}, //用户其他相关数据
|
|
|
subscribeMessageIdsMap: [], //小程序订阅消息模板ids
|
|
|
- authType: '' ,// smsLogin:手机号登录注册, accountLogin:密码登录, forgotPwd:忘记密码, changePwd:修改密码, bindMobile:绑定手机号
|
|
|
- tabbarList:[]
|
|
|
+ authType: '', // smsLogin:手机号登录注册, accountLogin:密码登录, forgotPwd:忘记密码, changePwd:修改密码, bindMobile:绑定手机号
|
|
|
+ tabbarList: []
|
|
|
}
|
|
|
|
|
|
const getters = {
|
| xqd
@@ -36,8 +36,8 @@ const actions = {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
console.log(token);
|
|
|
token && uni.setStorageSync('token', token);
|
|
|
- http('user.info').then(res => {
|
|
|
- // console.log(res);
|
|
|
+ http('user.info').then(res => {
|
|
|
+ // console.log(res);
|
|
|
if (res.code === 0) {
|
|
|
let lastLoginStatus = getters.isLogin;
|
|
|
commit('userInfo', res.data);
|
| xqd
@@ -52,7 +52,7 @@ const actions = {
|
|
|
uni.removeStorageSync('spm');
|
|
|
}
|
|
|
resolve(res.data)
|
|
|
- }
|
|
|
+ }
|
|
|
}).then(() => {
|
|
|
// uni.showModal({
|
|
|
// title:'提示',
|
| xqd
@@ -78,7 +78,7 @@ const actions = {
|
|
|
commit
|
|
|
}) {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
- http('user.userData').then(res => {
|
|
|
+ http('user.userData').then(res => {
|
|
|
commit('USER_DATA', res.data);
|
|
|
resolve(res)
|
|
|
}).catch(e => {
|
| xqd
@@ -134,7 +134,9 @@ const actions = {
|
|
|
commit,
|
|
|
state
|
|
|
}) {
|
|
|
- http('conf.getGroupConf',{group:'system.notification'}).then(res => {
|
|
|
+ http('conf.getGroupConf', {
|
|
|
+ group: 'system.notification'
|
|
|
+ }).then(res => {
|
|
|
commit('formatMessage', res.data)
|
|
|
Promise.resolve(res.data)
|
|
|
}).catch(e => {
|
| xqd
@@ -190,7 +192,7 @@ const mutations = {
|
|
|
formatMessage(state, messageIdsObj) {
|
|
|
// 各场景下用到的订阅模板
|
|
|
let typeMap = {
|
|
|
- 'unread_msg': ['pay_suc','examine_result','company_examine'],
|
|
|
+ 'unread_msg': ['pay_suc', 'examine_result', 'company_examine'],
|
|
|
// 'order':['pay_suc','recommend','new_video']
|
|
|
}
|
|
|
let idsMap = {}
|
| xqd
@@ -211,4 +213,4 @@ export default {
|
|
|
mutations,
|
|
|
actions,
|
|
|
getters
|
|
|
-}
|
|
|
+}
|