26 lines
508 B
TypeScript
26 lines
508 B
TypeScript
import {defineStore} from "pinia";
|
|
import { baseUrl, testUrl , suiUrl} from '@/api/request';
|
|
export const userStore = defineStore('userInfo', {
|
|
state: () => {
|
|
return {
|
|
userInfo: {
|
|
id: 2,
|
|
userAvatar: '',
|
|
userName: '匠承非遗',
|
|
points: 800
|
|
}
|
|
}
|
|
},
|
|
actions: {
|
|
// updateUserInfo: async () => {
|
|
// const res = await uni.request({
|
|
// url: testUrl + '/user/updateUser'
|
|
// })
|
|
// console.log(res)
|
|
// },
|
|
// getLoginUser(res) {
|
|
|
|
// }
|
|
}
|
|
})
|