|
@@ -5,7 +5,8 @@ import {
|
|
|
} from "../../api/user.js";
|
|
|
import {
|
|
|
LOGIN_STATUS,
|
|
|
- UID
|
|
|
+ UID,
|
|
|
+ OPENID
|
|
|
} from '../../config/cache';
|
|
|
import Cache from '../../utils/cache';
|
|
|
const user_res = require('@/mock/json/user_res.json')
|
|
@@ -18,6 +19,7 @@ const state = {
|
|
|
backgroundColor: "#fff",
|
|
|
userInfo: {},
|
|
|
uid: Cache.get(UID) || 0,
|
|
|
+ open_id: Cache.get(OPENID),
|
|
|
homeActive: false,
|
|
|
phoneStatus:true,
|
|
|
pageFooter:uni.getStorageSync('pageFoot') || {}
|
|
@@ -31,6 +33,10 @@ const mutations = {
|
|
|
state.token = opt.token;
|
|
|
Cache.set(LOGIN_STATUS, opt.token, opt.time);
|
|
|
},
|
|
|
+ OPENID(state, val) {
|
|
|
+ state.open_id = val;
|
|
|
+ Cache.set(OPENID, val);
|
|
|
+ },
|
|
|
SETUID(state,val){
|
|
|
state.uid = val;
|
|
|
Cache.set(UID, val);
|