first commit
This commit is contained in:
34
store/modules/policy.js
Normal file
34
store/modules/policy.js
Normal file
@@ -0,0 +1,34 @@
|
||||
const getDefaultState = () => {
|
||||
return {
|
||||
is_buy: 0,
|
||||
is_trusteeship: 0,
|
||||
is_give: 0,
|
||||
is_mianze: 0,
|
||||
}
|
||||
}
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: getDefaultState(),
|
||||
mutations: {
|
||||
//通俗的理解,mutations 里面装着改变数据的方法集合,处理数据逻辑的方法全部放在 mutations 里,使数据和视图分离。
|
||||
setBuy(state, value) { //更新当前时间戳
|
||||
state.is_buy = value;
|
||||
},
|
||||
setTrusteeship(state, value) { //更新当前时间戳
|
||||
state.is_trusteeship = value;
|
||||
},
|
||||
setGive(state, value) { //更新当前时间戳
|
||||
state.is_give = value;
|
||||
},
|
||||
setMianze(state, value) { //更新当前时间戳
|
||||
state.is_mianze = value;
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
|
||||
},
|
||||
getters: {
|
||||
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user