Files
aida_front/src/store/userHabit/userHabit.ts

51 lines
911 B
TypeScript
Raw Normal View History

2023-07-26 15:54:34 +08:00
import {Module} from 'vuex'
import {RootState} from '../index'
import { Https } from "@/tool/https";
interface DesignDetail{
clothingType:any,
2024-02-29 17:16:51 +08:00
credits:any,
2023-07-26 15:54:34 +08:00
// devise:any,
// deviseType:any,
// system_per:any,
// model:any,
}
const HomeStoreModule : Module<DesignDetail,RootState> = {
state:{
clothingType:[],
2024-02-29 17:16:51 +08:00
credits:{
value:0
},
2023-07-26 15:54:34 +08:00
},
mutations:{
res_clothingType(state,data){
state.clothingType = data
},
2024-02-29 17:16:51 +08:00
setCredits(state,data){
state.credits.value = data
},
2023-07-26 15:54:34 +08:00
},
actions:{
get_clothingType(context){
var arr = [{
id:11,
name:"nv"
},{
id:22,
name:"nan",
}]
context.commit('res_clothingType',arr)
// Https.axiosGet(url)
// .then((rv: any) => {
// context.commit('res_clothingType',rv)
// })
// .catch((rv) => {
// });
2024-02-29 17:16:51 +08:00
},
2023-07-26 15:54:34 +08:00
}
}
export default HomeStoreModule