first commit
first commit
This commit is contained in:
@@ -2,6 +2,7 @@ import { createStore } from 'vuex'
|
||||
import UploadFilesModule from './uploadFile/uploadFile'
|
||||
import DesignDetailModule from './Detail/designDetail'
|
||||
import HomeStoreModule from './homeStore/homeStore'
|
||||
import UserHabit from './userHabit/userHabit'
|
||||
export interface RootState{
|
||||
|
||||
}
|
||||
@@ -18,6 +19,7 @@ export default createStore<RootState>({
|
||||
modules: {
|
||||
UploadFilesModule,
|
||||
DesignDetailModule,
|
||||
HomeStoreModule
|
||||
HomeStoreModule,
|
||||
UserHabit
|
||||
}
|
||||
})
|
||||
|
||||
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