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

25 lines
409 B

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