first commit
first commit
This commit is contained in:
48
src/store/userHabit/userHabit.ts
Normal file
48
src/store/userHabit/userHabit.ts
Normal file
@@ -0,0 +1,48 @@
|
||||
import {Module} from 'vuex'
|
||||
import {RootState} from '../index'
|
||||
import { Https } from "@/tool/https";
|
||||
interface DesignDetail{
|
||||
clothingType:any,
|
||||
// devise:any,
|
||||
// deviseType:any,
|
||||
// system_per:any,
|
||||
// model:any,
|
||||
|
||||
}
|
||||
|
||||
const HomeStoreModule : Module<DesignDetail,RootState> = {
|
||||
state:{
|
||||
clothingType:[],
|
||||
|
||||
|
||||
},
|
||||
mutations:{
|
||||
res_clothingType(state,data){
|
||||
state.clothingType = data
|
||||
console.log(data);
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
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) => {
|
||||
// });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default HomeStoreModule
|
||||
Reference in New Issue
Block a user