You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
shop-app/common/store/index.js

26 lines
424 B

3 years ago
/*
* @Author: ch
* @Date: 2022-03-22 18:28:52
* @LastEditors: ch
3 years ago
* @LastEditTime: 2022-03-29 11:08:32
3 years ago
* @Description: file content
*/
import Vue from 'vue'
import Vuex from 'vuex';
3 years ago
Vue.use(Vuex)
3 years ago
export default new Vuex.Store({
state : {
3 years ago
token : uni.getStorageSync('tk') || ''
3 years ago
},
mutations:{
SET_TOKEN (state, token = ''){
state.token = token;
uni.setStorageSync('tk', token);
}
3 years ago
},
getters:{
}
})