Browse Source

授权头像

1002884655 4 years ago
parent
commit
7d51554cc3

+ 18
- 39
src/components/GetUserIcon/index.vue View File

@@ -10,12 +10,13 @@
10 10
 
11 11
 <script>
12 12
 import { createNamespacedHelpers } from 'vuex'
13
-const { mapState: mapUserState, mapMutations: mapUserMutations } = createNamespacedHelpers('user')
13
+const { mapState: mapUserState, mapActions: mapUserActions, mapMutations: mapUserMutations } = createNamespacedHelpers('user')
14 14
 export default {
15 15
   name: 'GetUserIcon',
16 16
   data () {
17 17
     return {
18
-      Show: false
18
+      Show: false,
19
+      DataLock: false
19 20
     }
20 21
   },
21 22
   computed: {
@@ -27,6 +28,9 @@ export default {
27 28
     this.Init() // 初始化
28 29
   },
29 30
   methods: {
31
+    ...mapUserActions([
32
+      'UpdateUserInfo'
33
+    ]),
30 34
     ...mapUserMutations([
31 35
       'EditUserInfo'
32 36
     ]),
@@ -54,44 +58,19 @@ export default {
54 58
       })
55 59
     },
56 60
     ToGetUserIcon (res) { // 获取用户头像
57
-      wx.showToast({
58
-        title: JSON.stringify(res),
59
-        icon: 'none',
60
-        duration: 200000
61
+      if (this.DataLock) return
62
+      this.DataLock = true
63
+      this.UpdateUserInfo({
64
+        urlData: { id: this.UserInfo.PersonId },
65
+        data: { data: { nickname: res.detail.userInfo.nickName, avatar: res.detail.userInfo.avatarUrl, sex: res.detail.userInfo.gender, personId: this.UserInfo.PersonId } }
66
+      }).then(() => {
67
+        this.EditUserInfo({ name: 'Icon', value: res.detail.userInfo.avatarUrl })
68
+        this.EditUserInfo({ name: 'Name', value: res.detail.userInfo.nickName })
69
+        this.DataLock = false
70
+        this.Show = false
71
+      }).catch(() => {
72
+        this.DataLock = false
61 73
       })
62
-      // let _that = this
63
-      // wx.authorize({
64
-      //   scope: 'scope.userInfo',
65
-      //   success () {
66
-      //     wx.getUserInfo({ // 授权成功时,获取用户信息
67
-      //       success (res) {
68
-      //         wx.showToast({
69
-      //           title: res.userInfo.avatarUrl,
70
-      //           icon: 'none',
71
-      //           duration: 2000
72
-      //         })
73
-      //         _that.EditUserInfo({ name: 'Icon', value: res.userInfo.avatarUrl })
74
-      //         _that.EditUserInfo({ name: 'Name', value: res.userInfo.nickName })
75
-      //         _that.$emit('UserInfoChange')
76
-      //         _that.Show = false
77
-      //       },
78
-      //       fail (res) {
79
-      //         wx.showToast({
80
-      //           title: '获取头像授权失败',
81
-      //           icon: 'none',
82
-      //           duration: 2000
83
-      //         })
84
-      //       }
85
-      //     })
86
-      //   },
87
-      //   fail (res) {
88
-      //     wx.showToast({
89
-      //       title: '自动获取头像授权失败',
90
-      //       icon: 'none',
91
-      //       duration: 2000
92
-      //     })
93
-      //   }
94
-      // })
95 74
     }
96 75
   }
97 76
 }

+ 52
- 48
src/pages/HuiAiXin/index.vue View File

@@ -2,66 +2,70 @@
2 2
   <view class="page HuiAiXin">
3 3
     <ScrollY :IsRefreshing="IsRefreshing" @Refresh="Refresh">
4 4
 
5
-      <!-- banner -->
6
-      <view class="Banner">
7
-        <view>
8
-          <BannerSwiper :List="HuiAiXinBanner"></BannerSwiper>
9
-        </view>
10
-      </view>
5
+      <view class="PageContainer">
11 6
 
12
-      <!-- 明星业主 -->
13
-      <view class="StarOwnerList">
14
-        <view class="flex-h">
15
-          <view class="flex-item">
16
-            <image mode="heightFix" src="https://cjgw.oss-cn-hangzhou.aliyuncs.com/ygcxxfb/image/mingxingyezhu.png"></image>
7
+        <!-- banner -->
8
+        <view class="Banner">
9
+          <view>
10
+            <BannerSwiper :List="HuiAiXinBanner"></BannerSwiper>
17 11
           </view>
18
-          <navigator url="./StarOwner/index" hover-class="other-navigator-hover" class="More">更多 <text class="iconfont iconjiantouright"></text></navigator>
19 12
         </view>
20
-        <view class="ListContainer" v-if="PageStarList.length">
21
-          <scroll-view scroll-x="true">
22
-            <view class="List">
23
-              <navigator v-for="(item, index) in PageStarList" :key="index" :url="`../HuiShengHuo/ActivityList/ActivityDetail/index?id=${item.activityId}`" hover-class="other-navigator-hover" class="Item">
24
-                <view class="Img">
25
-                  <view class="MainItemImg">
26
-                    <image mode="aspectFill" :src="item.thumb"></image>
27
-                  </view>
28
-                </view>
29
-                <text class="Info">{{item.name}}</text>
30
-              </navigator>
31
-            </view>
32
-            <view style="width: 100%; height: 20px;"></view>
33
-          </scroll-view>
34
-        </view>
35
-      </view>
36 13
 
37
-      <!-- 正能量事迹 -->
38
-      <view class="StoryList">
39
-        <view class="flex-h">
40
-          <view class="flex-item">
41
-            <image mode="heightFix" src="https://cjgw.oss-cn-hangzhou.aliyuncs.com/ygcxxfb/image/zhengnengliangshiji.png"></image>
14
+        <!-- 明星业主 -->
15
+        <view class="StarOwnerList">
16
+          <view class="flex-h">
17
+            <view class="flex-item">
18
+              <image mode="heightFix" src="https://cjgw.oss-cn-hangzhou.aliyuncs.com/ygcxxfb/image/mingxingyezhu.png"></image>
19
+            </view>
20
+            <navigator url="./StarOwner/index" hover-class="other-navigator-hover" class="More">更多 <text class="iconfont iconjiantouright"></text></navigator>
21
+          </view>
22
+          <view class="ListContainer" v-if="PageStarList.length">
23
+            <scroll-view scroll-x="true">
24
+              <view class="List">
25
+                <navigator v-for="(item, index) in PageStarList" :key="index" :url="`../HuiShengHuo/ActivityList/ActivityDetail/index?id=${item.activityId}`" hover-class="other-navigator-hover" class="Item">
26
+                  <view class="Img">
27
+                    <view class="MainItemImg">
28
+                      <image mode="aspectFill" :src="item.thumb"></image>
29
+                    </view>
30
+                  </view>
31
+                  <text class="Info">{{item.name}}</text>
32
+                </navigator>
33
+              </view>
34
+              <view style="width: 100%; height: 20px;"></view>
35
+            </scroll-view>
42 36
           </view>
43
-          <navigator url="./EnergyStory/index" hover-class="other-navigator-hover" class="More">更多 <text class="iconfont iconjiantouright"></text></navigator>
44 37
         </view>
45
-        <view class="List" v-if="PageStoryList.length">
46
-          <navigator v-for="(item, index) in PageStoryList" :key="index" :url="`../HuiShengHuo/ActivityList/ActivityDetail/index?id=${item.activityId}`" hover-class="other-navigator-hover" class="Item flex-h">
38
+
39
+        <!-- 正能量事迹 -->
40
+        <view class="StoryList">
41
+          <view class="flex-h">
47 42
             <view class="flex-item">
48
-              <text>{{item.name}}</text>
49
-              <text>{{item.address}}</text>
50
-              <text>{{ToolClass.DateFormat(new Date(item.startDate).getTime())}}</text>
43
+              <image mode="heightFix" src="https://cjgw.oss-cn-hangzhou.aliyuncs.com/ygcxxfb/image/zhengnengliangshiji.png"></image>
51 44
             </view>
52
-            <view class="Img">
53
-              <view>
54
-                <view class="MainItemImg">
55
-                  <image mode="aspectFill" :src="item.thumb"></image>
45
+            <navigator url="./EnergyStory/index" hover-class="other-navigator-hover" class="More">更多 <text class="iconfont iconjiantouright"></text></navigator>
46
+          </view>
47
+          <view class="List" v-if="PageStoryList.length">
48
+            <navigator v-for="(item, index) in PageStoryList" :key="index" :url="`../HuiShengHuo/ActivityList/ActivityDetail/index?id=${item.activityId}`" hover-class="other-navigator-hover" class="Item flex-h">
49
+              <view class="flex-item">
50
+                <text>{{item.name}}</text>
51
+                <text>{{item.address}}</text>
52
+                <text>{{ToolClass.DateFormat(new Date(item.startDate).getTime())}}</text>
53
+              </view>
54
+              <view class="Img">
55
+                <view>
56
+                  <view class="MainItemImg">
57
+                    <image mode="aspectFill" :src="item.thumb"></image>
58
+                  </view>
56 59
                 </view>
57 60
               </view>
58
-            </view>
59
-          </navigator>
61
+            </navigator>
62
+          </view>
60 63
         </view>
61
-      </view>
62 64
 
63
-      <!-- 授权头像获取弹窗 -->
64
-      <GetUserIcon></GetUserIcon>
65
+        <!-- 授权头像获取弹窗 -->
66
+        <GetUserIcon></GetUserIcon>
67
+
68
+      </view>
65 69
 
66 70
     </ScrollY>
67 71
   </view>

+ 131
- 126
src/pages/HuiAiXin/page.scss View File

@@ -1,156 +1,161 @@
1 1
 .page.HuiAiXin {
2 2
   width: 100%;
3 3
   height: 100%;
4
-  .Banner {
4
+  .PageContainer {
5 5
     width: 100%;
6
-    padding-bottom: 41%;
6
+    min-height: 100vh;
7 7
     position: relative;
8
-    overflow: hidden;
9
-    > view {
8
+    .Banner {
10 9
       width: 100%;
11
-      position: absolute;
12
-      left: 0;
13
-      top: 0;
14
-      bottom: 0;
10
+      padding-bottom: 41%;
11
+      position: relative;
15 12
       overflow: hidden;
16
-      background: #ccc;
13
+      > view {
14
+        width: 100%;
15
+        position: absolute;
16
+        left: 0;
17
+        top: 0;
18
+        bottom: 0;
19
+        overflow: hidden;
20
+        background: #ccc;
21
+      }
17 22
     }
18
-  }
19
-  .StarOwnerList {
20
-    padding: 20px 0;
21
-    background: #fff;
22
-    margin-top: 20px;
23
-    > .flex-h {
24
-      padding: 0 20px;
25
-      align-items: center;
26
-      margin-top: 10px;
27
-      > .flex-item {
28
-        > image {
29
-          height: 48px;
23
+    .StarOwnerList {
24
+      padding: 20px 0;
25
+      background: #fff;
26
+      margin-top: 20px;
27
+      > .flex-h {
28
+        padding: 0 20px;
29
+        align-items: center;
30
+        margin-top: 10px;
31
+        > .flex-item {
32
+          > image {
33
+            height: 48px;
34
+          }
30 35
         }
31
-      }
32
-      > .More {
33
-        font-size: 26px;
34
-        color: #999;
35
-        > text {
36
+        > .More {
36 37
           font-size: 26px;
38
+          color: #999;
39
+          > text {
40
+            font-size: 26px;
41
+          }
37 42
         }
38 43
       }
39
-    }
40
-    > .ListContainer {
41
-      width: 100%;
42
-      position: relative;
43
-      overflow: hidden;
44
-      margin-top: 40px;
45
-      margin-bottom: 10px;
46
-      > scroll-view {
47
-        .List {
48
-          font-size: 0;
49
-          white-space: nowrap;
50
-          overflow: visible;
51
-          > .Item {
52
-            width: 80%;
53
-            position: relative;
54
-            overflow: hidden;
55
-            display: inline-block;
56
-            vertical-align: middle;
57
-            margin-left: 25px;
58
-            border-radius: 20px;
59
-            box-shadow: 0 5px 10px 5px rgba(0, 0, 0, 0.08);
60
-            &:last-child {
61
-              margin-right: 25px;
62
-            }
63
-            > .Img {
64
-              width: 100%;
65
-              padding-bottom: 45%;
66
-              background: #ccc;
44
+      > .ListContainer {
45
+        width: 100%;
46
+        position: relative;
47
+        overflow: hidden;
48
+        margin-top: 40px;
49
+        margin-bottom: 10px;
50
+        > scroll-view {
51
+          .List {
52
+            font-size: 0;
53
+            white-space: nowrap;
54
+            overflow: visible;
55
+            > .Item {
56
+              width: 80%;
67 57
               position: relative;
68 58
               overflow: hidden;
69
-            }
70
-            > .Info {
71
-              display: block;
72
-              padding: 0 34px;
73
-              font-size: 24px;
74
-              line-height: 70px;
75
-              white-space: nowrap;
76
-              overflow: hidden;
77
-              text-overflow: ellipsis;
78
-              color: #333;
59
+              display: inline-block;
60
+              vertical-align: middle;
61
+              margin-left: 25px;
62
+              border-radius: 20px;
63
+              box-shadow: 0 5px 10px 5px rgba(0, 0, 0, 0.08);
64
+              &:last-child {
65
+                margin-right: 25px;
66
+              }
67
+              > .Img {
68
+                width: 100%;
69
+                padding-bottom: 45%;
70
+                background: #ccc;
71
+                position: relative;
72
+                overflow: hidden;
73
+              }
74
+              > .Info {
75
+                display: block;
76
+                padding: 0 34px;
77
+                font-size: 24px;
78
+                line-height: 70px;
79
+                white-space: nowrap;
80
+                overflow: hidden;
81
+                text-overflow: ellipsis;
82
+                color: #333;
83
+              }
79 84
             }
80 85
           }
81 86
         }
82 87
       }
83 88
     }
84
-  }
85
-  .StoryList {
86
-    padding: 20px 0;
87
-    background: #fff;
88
-    margin-top: 20px;
89
-    > .flex-h {
90
-      padding: 0 20px;
91
-      align-items: center;
92
-      margin-top: 10px;
93
-      > .flex-item {
94
-        > image {
95
-          height: 48px;
89
+    .StoryList {
90
+      padding: 20px 0;
91
+      background: #fff;
92
+      margin-top: 20px;
93
+      > .flex-h {
94
+        padding: 0 20px;
95
+        align-items: center;
96
+        margin-top: 10px;
97
+        > .flex-item {
98
+          > image {
99
+            height: 48px;
100
+          }
96 101
         }
97
-      }
98
-      > .More {
99
-        font-size: 26px;
100
-        color: #999;
101
-        > text {
102
+        > .More {
102 103
           font-size: 26px;
104
+          color: #999;
105
+          > text {
106
+            font-size: 26px;
107
+          }
103 108
         }
104 109
       }
105
-    }
106
-    > .List {
107
-      position: relative;
108
-      overflow: hidden;
109
-      margin-bottom: 30px;
110
-      padding-left: 30px;
111
-      > .Item {
112
-        padding: 40px 0;
113
-        border-bottom: 2px solid #f5f5f5;
114
-        > .flex-item {
115
-          margin-right: 20px;
116
-          > text {
117
-            display: block;
118
-            font-size: 28px;
119
-            line-height: 40px;
120
-            overflow: hidden;
121
-            margin-top: 6px;
122
-            &:nth-child(1) {
123
-              text-overflow: ellipsis;
124
-              display: -webkit-box;
125
-              -webkit-box-orient: vertical;
126
-              -webkit-line-clamp: 2;
127
-              margin-top: 0;
128
-            }
129
-            &:nth-child(2) {
130
-              color: #666;
131
-              font-size: 24px;
132
-              white-space: nowrap;
133
-              text-overflow: ellipsis;
134
-            }
135
-            &:nth-child(3) {
136
-              color: #FE4E45;
137
-              font-size: 24px;
138
-              white-space: nowrap;
139
-              text-overflow: ellipsis;
110
+      > .List {
111
+        position: relative;
112
+        overflow: hidden;
113
+        margin-bottom: 30px;
114
+        padding-left: 30px;
115
+        > .Item {
116
+          padding: 40px 0;
117
+          border-bottom: 2px solid #f5f5f5;
118
+          > .flex-item {
119
+            margin-right: 20px;
120
+            > text {
121
+              display: block;
122
+              font-size: 28px;
123
+              line-height: 40px;
124
+              overflow: hidden;
125
+              margin-top: 6px;
126
+              &:nth-child(1) {
127
+                text-overflow: ellipsis;
128
+                display: -webkit-box;
129
+                -webkit-box-orient: vertical;
130
+                -webkit-line-clamp: 2;
131
+                margin-top: 0;
132
+              }
133
+              &:nth-child(2) {
134
+                color: #666;
135
+                font-size: 24px;
136
+                white-space: nowrap;
137
+                text-overflow: ellipsis;
138
+              }
139
+              &:nth-child(3) {
140
+                color: #fe4e45;
141
+                font-size: 24px;
142
+                white-space: nowrap;
143
+                text-overflow: ellipsis;
144
+              }
140 145
             }
141 146
           }
142
-        }
143
-        > .Img {
144
-          width: 34%;
145
-          margin-right: 20px;
146
-          position: relative;
147
-          overflow: hidden;
148
-          > view {
149
-            width: 100%;
150
-            padding-bottom: 70%;
151
-            background: #ccc;
147
+          > .Img {
148
+            width: 34%;
149
+            margin-right: 20px;
152 150
             position: relative;
153 151
             overflow: hidden;
152
+            > view {
153
+              width: 100%;
154
+              padding-bottom: 70%;
155
+              background: #ccc;
156
+              position: relative;
157
+              overflow: hidden;
158
+            }
154 159
           }
155 160
         }
156 161
       }

+ 30
- 26
src/pages/HuiQuanYi/index.vue View File

@@ -2,39 +2,43 @@
2 2
   <view class="page HuiQuanYi">
3 3
     <ScrollY :IsRefreshing="IsRefreshing" @Refresh="Refresh">
4 4
 
5
-      <!-- banner -->
6
-      <view class="Banner">
7
-        <view>
8
-          <BannerSwiper :List="QuanYiBanner"></BannerSwiper>
9
-        </view>
10
-      </view>
11
-
12
-      <!-- 一荐倾心计划 -->
13
-      <navigator url="./Recommed/index" hover-class="other-navigator-hover" class="YiJianQingXin">
14
-        <image mode="widthFix" src="https://cjgw.oss-cn-hangzhou.aliyuncs.com/ygcxxfb/image/yijianqingxin.png"></image>
15
-      </navigator>
5
+      <view class="PageContainer">
16 6
 
17
-      <!-- 业主资讯 -->
18
-      <view class="NewsList">
19
-        <view class="flex-h">
20
-          <view class="flex-item">
21
-            <image mode="heightFix" src="https://cjgw.oss-cn-hangzhou.aliyuncs.com/ygcxxfb/image/yezhuzixun.png"></image>
7
+        <!-- banner -->
8
+        <view class="Banner">
9
+          <view>
10
+            <BannerSwiper :List="QuanYiBanner"></BannerSwiper>
22 11
           </view>
23
-          <navigator url="./OwnersNews/index" hover-class="other-navigator-hover" class="More">更多 <text class="iconfont iconjiantouright"></text></navigator>
24 12
         </view>
25
-        <view class="List" v-if="PageList.length">
26
-          <navigator v-for="(item, index) in PageList" class="flex-h" :key="index" :url="`./OwnersNews/NewsDetail/index?id=${item.newsId}`" hover-class="other-navigator-hover">
27
-            <view class="Num"><text>{{index + 1}}</text></view>
13
+
14
+        <!-- 一荐倾心计划 -->
15
+        <navigator url="./Recommed/index" hover-class="other-navigator-hover" class="YiJianQingXin">
16
+          <image mode="widthFix" src="https://cjgw.oss-cn-hangzhou.aliyuncs.com/ygcxxfb/image/yijianqingxin.png"></image>
17
+        </navigator>
18
+
19
+        <!-- 业主资讯 -->
20
+        <view class="NewsList">
21
+          <view class="flex-h">
28 22
             <view class="flex-item">
29
-              <text>{{item.title}}</text>
30
-              <text></text>
23
+              <image mode="heightFix" src="https://cjgw.oss-cn-hangzhou.aliyuncs.com/ygcxxfb/image/yezhuzixun.png"></image>
31 24
             </view>
32
-          </navigator>
25
+            <navigator url="./OwnersNews/index" hover-class="other-navigator-hover" class="More">更多 <text class="iconfont iconjiantouright"></text></navigator>
26
+          </view>
27
+          <view class="List" v-if="PageList.length">
28
+            <navigator v-for="(item, index) in PageList" class="flex-h" :key="index" :url="`./OwnersNews/NewsDetail/index?id=${item.newsId}`" hover-class="other-navigator-hover">
29
+              <view class="Num"><text>{{index + 1}}</text></view>
30
+              <view class="flex-item">
31
+                <text>{{item.title}}</text>
32
+                <text></text>
33
+              </view>
34
+            </navigator>
35
+          </view>
33 36
         </view>
34
-      </view>
35 37
 
36
-      <!-- 授权头像获取弹窗 -->
37
-      <GetUserIcon v-if="ShowGetUserIcon"></GetUserIcon>
38
+        <!-- 授权头像获取弹窗 -->
39
+        <GetUserIcon v-if="ShowGetUserIcon"></GetUserIcon>
40
+
41
+      </view>
38 42
 
39 43
     </ScrollY>
40 44
   </view>

+ 113
- 108
src/pages/HuiQuanYi/page.scss View File

@@ -1,136 +1,141 @@
1 1
 .page.HuiQuanYi {
2 2
   width: 100%;
3 3
   height: 100%;
4
-  .Banner {
4
+  .PageContainer {
5 5
     width: 100%;
6
-    padding-bottom: 41%;
6
+    min-height: 100vh;
7 7
     position: relative;
8
-    overflow: hidden;
9
-    > view {
8
+    .Banner {
10 9
       width: 100%;
11
-      position: absolute;
12
-      left: 0;
13
-      top: 0;
14
-      bottom: 0;
10
+      padding-bottom: 41%;
11
+      position: relative;
15 12
       overflow: hidden;
16
-      background: #ccc;
13
+      > view {
14
+        width: 100%;
15
+        position: absolute;
16
+        left: 0;
17
+        top: 0;
18
+        bottom: 0;
19
+        overflow: hidden;
20
+        background: #ccc;
21
+      }
17 22
     }
18
-  }
19
-  .YiJianQingXin {
20
-    margin-top: 20px;
21
-    > image {
22
-      width: 100%;
23
+    .YiJianQingXin {
24
+      margin-top: 20px;
25
+      > image {
26
+        width: 100%;
27
+      }
23 28
     }
24
-  }
25
-  .NewsList {
26
-    padding: 20px 0;
27
-    background: #fff;
28
-    margin-top: 20px;
29
-    > .flex-h {
30
-      padding: 0 20px;
31
-      align-items: center;
32
-      margin-top: 10px;
33
-      > .flex-item {
34
-        > image {
35
-          height: 48px;
29
+    .NewsList {
30
+      padding: 20px 0;
31
+      background: #fff;
32
+      margin-top: 20px;
33
+      > .flex-h {
34
+        padding: 0 20px;
35
+        align-items: center;
36
+        margin-top: 10px;
37
+        > .flex-item {
38
+          > image {
39
+            height: 48px;
40
+          }
36 41
         }
37
-      }
38
-      > .More {
39
-        font-size: 26px;
40
-        color: #999;
41
-        > text {
42
+        > .More {
42 43
           font-size: 26px;
44
+          color: #999;
45
+          > text {
46
+            font-size: 26px;
47
+          }
43 48
         }
44 49
       }
45
-    }
46
-    > .List {
47
-      position: relative;
48
-      overflow: hidden;
49
-      margin-top: 40px;
50
-      margin-bottom: 30px;
51
-      > .flex-h {
52
-        align-items: center;
53
-        &:nth-child(1) {
54
-          > .Num {
55
-            > text {
56
-              width: 40px;
57
-              text-align: center;
58
-              line-height: 40px;
59
-              display: inline-block;
60
-              border-radius: 100%;
61
-              background: #fe4e45;
62
-              color: #fff;
63
-              box-shadow: 0 10px 20px 5px rgba(254, 78, 69, 0.1);
50
+      > .List {
51
+        position: relative;
52
+        overflow: hidden;
53
+        margin-top: 40px;
54
+        margin-bottom: 30px;
55
+        > .flex-h {
56
+          align-items: center;
57
+          &:nth-child(1) {
58
+            > .Num {
59
+              > text {
60
+                width: 40px;
61
+                text-align: center;
62
+                line-height: 40px;
63
+                display: inline-block;
64
+                border-radius: 100%;
65
+                background: #fe4e45;
66
+                color: #fff;
67
+                box-shadow: 0 10px 20px 5px rgba(254, 78, 69, 0.1);
68
+              }
64 69
             }
65 70
           }
66
-        }
67
-        &:nth-child(2) {
68
-          > .Num {
69
-            > text {
70
-              display: inline-block;
71
-              width: 40px;
72
-              text-align: center;
73
-              line-height: 40px;
74
-              display: inline-block;
75
-              border-radius: 100%;
76
-              background: #fe7e48;
77
-              color: #fff;
78
-              box-shadow: 0 10px 20px 5px rgba(254, 126, 72, 0.1);
71
+          &:nth-child(2) {
72
+            > .Num {
73
+              > text {
74
+                display: inline-block;
75
+                width: 40px;
76
+                text-align: center;
77
+                line-height: 40px;
78
+                display: inline-block;
79
+                border-radius: 100%;
80
+                background: #fe7e48;
81
+                color: #fff;
82
+                box-shadow: 0 10px 20px 5px rgba(254, 126, 72, 0.1);
83
+              }
84
+            }
85
+          }
86
+          &:nth-child(3) {
87
+            > .Num {
88
+              > text {
89
+                width: 40px;
90
+                text-align: center;
91
+                line-height: 40px;
92
+                display: inline-block;
93
+                border-radius: 100%;
94
+                background: #ffa93a;
95
+                color: #fff;
96
+                box-shadow: 0 10px 20px 5px rgba(255, 169, 58, 0.1);
97
+              }
79 98
             }
80 99
           }
81
-        }
82
-        &:nth-child(3) {
83 100
           > .Num {
101
+            width: 56px;
102
+            margin-left: 10px;
103
+            text-align: center;
104
+            font-size: 0;
105
+            height: 40px;
106
+            overflow: visible;
84 107
             > text {
85
-              width: 40px;
86
-              text-align: center;
87
-              line-height: 40px;
88
-              display: inline-block;
89
-              border-radius: 100%;
90
-              background: #ffa93a;
91
-              color: #fff;
92
-              box-shadow: 0 10px 20px 5px rgba(255, 169, 58, 0.1);
108
+              font-size: 24px;
109
+              color: #999;
93 110
             }
94 111
           }
95
-        }
96
-        > .Num {
97
-          width: 56px;
98
-          margin-left: 10px;
99
-          text-align: center;
100
-          font-size: 0;
101
-          height: 40px;
102
-          overflow: visible;
103
-          > text {
104
-            font-size: 24px;
105
-            color: #999;
106
-          }
107
-        }
108
-        > .flex-item {
109
-          padding: 20px 0;
110
-          margin-left: 10px;
111
-          border-bottom: 2px solid #f5f5f5;
112
-          font-size: 0;
113
-          white-space: nowrap;
114
-          margin-top: 10px;
115
-          > text {
116
-            display: inline-block;
117
-            vertical-align: middle;
118
-            max-width: 100%;
119
-            font-size: 28px;
120
-            line-height: 1.5;
112
+          > .flex-item {
113
+            padding: 20px 0;
114
+            margin-left: 10px;
115
+            border-bottom: 2px solid #f5f5f5;
116
+            font-size: 0;
121 117
             white-space: nowrap;
122
-            overflow: hidden;
123
-            text-overflow: ellipsis;
124
-            &:nth-child(1) {
125
-              max-width: 88%;
118
+            margin-top: 10px;
119
+            > text {
120
+              display: inline-block;
121
+              vertical-align: middle;
122
+              max-width: 100%;
123
+              font-size: 28px;
124
+              line-height: 1.5;
126 125
               white-space: nowrap;
127 126
               overflow: hidden;
128 127
               text-overflow: ellipsis;
129
-            }
130
-            &:nth-child(2) {
131
-              color: #999;
132
-              width: 10%;
133
-              margin-left: 2%;
128
+              &:nth-child(1) {
129
+                max-width: 88%;
130
+                white-space: nowrap;
131
+                overflow: hidden;
132
+                text-overflow: ellipsis;
133
+              }
134
+              &:nth-child(2) {
135
+                color: #999;
136
+                width: 10%;
137
+                margin-left: 2%;
138
+              }
134 139
             }
135 140
           }
136 141
         }

+ 15
- 0
src/store/user/index.js View File

@@ -17,6 +17,21 @@ export default {
17 17
     }
18 18
   },
19 19
   actions: {
20
+    UpdateUserInfo (context, payload) { // 更新用户信息
21
+      return new Promise((resolve, reject) => {
22
+        ToolClass.WxRequest({
23
+          url: Api.UpdateUserInfo.url,
24
+          method: Api.UpdateUserInfo.method,
25
+          ...payload,
26
+          success (res) {
27
+            resolve(res)
28
+          },
29
+          error (res) {
30
+            reject(res)
31
+          }
32
+        })
33
+      })
34
+    },
20 35
     GetRecommedList (context, payload) { // 获取推荐的客户列表
21 36
       return new Promise((resolve, reject) => {
22 37
         ToolClass.WxRequest({

+ 4
- 0
src/util/Api/index.js View File

@@ -2,6 +2,10 @@
2 2
 const prefix = process.env.NODE_ENV === 'production' ? '' : ''
3 3
 
4 4
 const Api = {
5
+  UpdateUserInfo: { // 更新用户信息
6
+    method: 'post',
7
+    url: `${prefix}/person/:id`
8
+  },
5 9
   GetRecommedList: { // 获取推荐的客户列表
6 10
     method: 'get',
7 11
     url: `${prefix}/person/:personId/recommender`