Commit 90e7f1e178e4c55c32a60787d45500dd70386a1b

Authored by 史婷婷
1 parent 69abac62

feat: 个人信息页面

... ... @@ -44,13 +44,6 @@
44 44 </view>
45 45 </view>
46 46 </view>
47   - <view>
48   - <uni-popup ref="alertDialog" type="dialog">
49   - <uni-popup-dialog type="info" cancelText="关闭" confirmText="确定" title="公众号" content="公众号">
50   - <view><image src="../../static/images/gzh.jpg" style="width: 250px;height: 250px;"></image></view>
51   - </uni-popup-dialog>
52   - </uni-popup>
53   - </view>
54 47 </view>
55 48 </template>
56 49
... ... @@ -114,9 +107,6 @@
114 107 handleToInfo() {
115 108 this.$tab.navigateTo('/pages/mine/info/index')
116 109 },
117   - handleToEditInfo() {
118   - this.$tab.navigateTo('/pages/mine/info/edit')
119   - },
120 110 handleToSetting() {
121 111 this.$tab.navigateTo('/pages/mine/setting/index')
122 112 },
... ... @@ -126,32 +116,9 @@
126 116 handleToAvatar() {
127 117 this.$tab.navigateTo('/pages/mine/avatar/index')
128 118 },
129   - handleLogout() {
130   - this.$modal.confirm('确定注销并退出系统吗?').then(() => {
131   - this.$store.dispatch('LogOut').then(() => {
132   - this.$tab.reLaunch('/pages/index')
133   - })
134   - })
135   - },
136   - handleHelp() {
137   - this.$tab.navigateTo('/pages/mine/help/index')
138   -
139   - },
140 119 handleAbout() {
141 120 this.$tab.navigateTo('/pages/mine/about/index')
142 121 },
143   - handleJiaoLiuQun() {
144   - this.$refs.alertDialog.open('center');
145   - },
146   - handleBuilding() {
147   - this.$modal.showToast('添加CDERP客服 QQ:3783722918')
148   - },
149   - handleLink() {
150   - // let site = this.globalConfig.appInfo.agreements[2]
151   - // this.$tab.navigateTo('/pages/common/webview/index?title='+site.title+'&url='+site.url)
152   - this.$refs.alertDialog.open('center');
153   - }
154   -
155 122 }
156 123 }
157 124 </script>
... ...
1 1 <template>
2 2 <view class="container">
3 3 <uni-list>
4   - <uni-list-item showExtraIcon="true" :extraIcon="{type: 'person-filled'}" title="昵称" :rightText="user.username" />
  4 + <uni-list-item showExtraIcon="true" :extraIcon="{type: 'person-filled'}" title="昵称" :rightText="user.name" />
5 5 <uni-list-item showExtraIcon="true" :extraIcon="{type: 'phone-filled'}" title="手机号码" :rightText="user.telephone" />
6   - <uni-list-item showExtraIcon="true" :extraIcon="{type: 'email-filled'}" title="邮箱" :rightText="user.email" />
7   - <uni-list-item showExtraIcon="true" :extraIcon="{type: 'auth-filled'}" title="岗位" :rightText="postGroup" />
8   - <uni-list-item showExtraIcon="true" :extraIcon="{type: 'staff-filled'}" title="角色" :rightText="roleGroup" />
9   - <!-- <uni-list-item showExtraIcon="true" :extraIcon="{type: 'calendar-filled'}" title="创建日期" :rightText="user.createTime" /> -->
  6 + <uni-list-item showExtraIcon="true" :extraIcon="{type: 'auth-filled'}" title="部门" :rightText="user.deptPathsText" />
10 7 </uni-list>
11 8 </view>
12 9 </template>
13 10
14 11 <script>
15   - import { getUserProfile } from "@/api/system/user"
16   -
17 12 export default {
18 13 data() {
19 14 return {
20 15 user: {},
21   - // roleGroup: "",
22   - // postGroup: ""
23 16 }
24 17 },
25 18 onShow() {
... ... @@ -30,18 +23,17 @@
30 23 })
31 24 },
32 25 onLoad() {
33   - this.getUser()
  26 + },
  27 + created() {
  28 + console.log('this.$store.state.user', this.$store.state.user)
  29 + this.user = {
  30 + name : this.$store.state.user.name || '',
  31 + deptPathsText : this.$store.state.user.deptPaths.length ? this.$store.state.user.deptPaths.join(',') : '',
  32 + telephone: this.$store.state.user.telephone || ''
  33 + }
34 34 },
35 35 methods: {
36   - getUser() {
37   - getUserProfile().then(response => {
38   - // console.log("结果:"+response.data)
39   - this.user = response.data
40   -
41   - // this.roleGroup = response.roleGroup
42   - // this.postGroup = response.postGroup
43   - })
44   - }
  36 +
45 37 }
46 38 }
47 39 </script>
... ...