12345678910111213141516171819202122232425262728293031323334 |
- let state = {
- shopDetail: {}, //用户当前所属地区商家信息
- shopAction:{
- name:'',
- image:'',
- }//商店账号商家数据
- }
- let mutations = {
- // 保存用户信息
- setShopInfo(state, provider) {
- state.shopDetail = provider;
- uni.setStorage({ //缓存用户登陆状态
- key: 'shopDetail',
- data: provider
- })
- },
- setShopAction(state, provider) {
- state.shopAction = provider;
- uni.setStorage({ //缓存用户登陆状态
- key: 'shopDetailAction',
- data: provider
- })
- },
- }
- let getters = {}
- export default {
- namespaced: true,
- state,
- mutations,
- getters
- }
|