Files
houyi-uniapp/store/modules/policy.js
PC-202306242200\Administrator 85b89ccea7 first commit
2026-03-28 23:27:25 +08:00

34 lines
726 B
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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: {
},
}