mirror of
				https://gitee.com/hhyykk/ipms-sjy-ui.git
				synced 2025-10-31 10:18:43 +08:00 
			
		
		
		
	重命名组件名称
This commit is contained in:
		
							
								
								
									
										7
									
								
								src/views/member/user/components/UserBasicInfo.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								src/views/member/user/components/UserBasicInfo.vue
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,7 @@ | |||||||
|  | <script setup lang="ts"></script> | ||||||
|  |  | ||||||
|  | <template> | ||||||
|  |   <span>基础信息</span> | ||||||
|  | </template> | ||||||
|  |  | ||||||
|  | <style scoped lang="scss"></style> | ||||||
| @@ -142,28 +142,25 @@ | |||||||
|       </el-card> |       </el-card> | ||||||
|     </el-row> |     </el-row> | ||||||
|   </div> |   </div> | ||||||
|  |  | ||||||
|   <!-- 表单弹窗:添加/修改 --> |   <!-- 表单弹窗:添加/修改 --> | ||||||
|   <UserForm ref="formRef" @success="getUserData(user.id)" /> |   <UserForm ref="formRef" v-if="user.id" @success="getUserData(user.id)" /> | ||||||
| </template> | </template> | ||||||
| <script setup lang="ts"> | <script setup lang="ts"> | ||||||
| // TODO @梦:组件对应的 vue,都大写 | import PointList from '@/views/member/user/components/PointList.vue' | ||||||
| import PointList from '@/views/member/user/components/point-list.vue' | import SignList from '@/views/member/user/components/SignList.vue' | ||||||
| import SignList from '@/views/member/user/components/sign-list.vue' | import CardTitle from '@/views/member/user/components/CardTitle.vue' | ||||||
| import CardTitle from '@/views/member/user/components/card-title.vue' | import * as UserApi from '@/api/member/user' | ||||||
| // TODO @梦:参考别的模块,UserApi 这样去引用 |  | ||||||
| import { getUser, UserBaseInfoVO } from '@/api/member/user' |  | ||||||
| import { formatDate } from '@/utils/formatTime' | import { formatDate } from '@/utils/formatTime' | ||||||
| import { DICT_TYPE } from '@/utils/dict' | import { DICT_TYPE } from '@/utils/dict' | ||||||
| import UserForm from '@/views/member/user/UserForm.vue' | import UserForm from '@/views/member/user/UserForm.vue' | ||||||
| // TODO @梦:把用户信息,也抽成一个组件,类似 AccountInfo | // TODO @梦:把用户信息,也抽成一个组件,类似 AccountInfo | ||||||
| import AccountInfo from '@/views/member/user/components/account-info.vue' | import AccountInfo from '@/views/member/user/components/AccountInfo.vue' | ||||||
|  |  | ||||||
| defineOptions({ name: 'MemberDetail' }) | defineOptions({ name: 'MemberDetail' }) | ||||||
|  |  | ||||||
| const activeName = ref('point') // 账户明细 选中的 tabs | const activeName = ref('point') // 账户明细 选中的 tabs | ||||||
| const loading = ref(true) // 加载中 | const loading = ref(true) // 加载中 | ||||||
| let user = ref<UserBaseInfoVO>({ | let user = ref<UserApi.UserBaseInfoVO>({ | ||||||
|   areaId: undefined, |   areaId: undefined, | ||||||
|   avatar: undefined, |   avatar: undefined, | ||||||
|   birthday: undefined, |   birthday: undefined, | ||||||
| @@ -185,7 +182,7 @@ let user = ref<UserBaseInfoVO>({ | |||||||
| const getUserData = async (id: number) => { | const getUserData = async (id: number) => { | ||||||
|   loading.value = true |   loading.value = true | ||||||
|   try { |   try { | ||||||
|     user.value = await getUser(id) |     user.value = await UserApi.getUser(id) | ||||||
|   } finally { |   } finally { | ||||||
|     loading.value = false |     loading.value = false | ||||||
|   } |   } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 绮梦
					绮梦