xcx hace 4 años
padre
commit
f4c449c198

+ 11
- 0
src/app.scss Ver fichero

@@ -69,4 +69,15 @@ page {
69 69
       text-align: center;
70 70
     }
71 71
   }
72
+  view.MainItemImg {
73
+    width: 100%;
74
+    position: absolute;
75
+    left: 0;
76
+    top: 0;
77
+    bottom: 0;
78
+    > image {
79
+      width: 100%;
80
+      height: 100%;
81
+    }
82
+  }
72 83
 }

+ 4
- 2
src/components/BannerSwiper/index.vue Ver fichero

@@ -4,7 +4,9 @@
4 4
       <block v-for="(item, index) in List" :key="index">
5 5
         <swiper-item>
6 6
           <view class="swiper-item">
7
-            <image mode="aspectFill" class="centerLabel" :src="item.image" @tap="LinkTo(item)"></image>
7
+            <view class="MainItemImg">
8
+              <image mode="aspectFill" :src="item.image" @tap="LinkTo(item)"></image>
9
+            </view>
8 10
           </view>
9 11
         </swiper-item>
10 12
       </block>
@@ -30,7 +32,7 @@ export default {
30 32
   methods: {
31 33
     LinkTo (item) {
32 34
       if (item.srcId === null) return
33
-      wx.navigateTo({ url: `../../pages/HuiShengHuo/ActivityList/ActivityDetail/index?id=${item.srcId}`})
35
+      wx.navigateTo({ url: `../../pages/HuiShengHuo/ActivityList/ActivityDetail/index?id=${item.srcId}` })
34 36
     }
35 37
   }
36 38
 }

+ 2
- 0
src/components/GetUserIcon/index.vue Ver fichero

@@ -42,6 +42,7 @@ export default {
42 42
                   success (subRes) {
43 43
                     _that.EditUserInfo({ name: 'Icon', value: subRes.userInfo.avatarUrl })
44 44
                     _that.EditUserInfo({ name: 'Name', value: subRes.userInfo.nickName })
45
+                    _that.$emit('UserInfoChange')
45 46
                   }
46 47
                 })
47 48
               }
@@ -61,6 +62,7 @@ export default {
61 62
             success (res) {
62 63
               _that.EditUserInfo({ name: 'Icon', value: res.userInfo.avatarUrl })
63 64
               _that.EditUserInfo({ name: 'Name', value: res.userInfo.nickName })
65
+              _that.$emit('UserInfoChange')
64 66
               _that.Show = false
65 67
             }
66 68
           })

+ 3
- 1
src/pages/HuiAiXin/EnergyStory/index.vue Ver fichero

@@ -18,7 +18,9 @@
18 18
             </view>
19 19
             <view class="Img">
20 20
               <view>
21
-                <image mode="aspectFill" class="centerLabel" :src="item.thumb"></image>
21
+                <view class="MainItemImg">
22
+                  <image mode="aspectFill" :src="item.thumb"></image>
23
+                </view>
22 24
               </view>
23 25
             </view>
24 26
           </navigator>

+ 3
- 1
src/pages/HuiAiXin/StarOwner/index.vue Ver fichero

@@ -12,7 +12,9 @@
12 12
         <view class="List" v-if="PageList.length">
13 13
           <navigator v-for="(item, index) in PageList" :key="index" :url="`../../HuiShengHuo/ActivityList/ActivityDetail/index?id=${item.activityId}`" hover-class="other-navigator-hover" class="Item">
14 14
             <view class="Img">
15
-              <image mode="aspectFill" class="centerLabel" :src="item.thumb"></image>
15
+              <view class="MainItemImg">
16
+                <image mode="aspectFill" :src="item.thumb"></image>
17
+              </view>
16 18
             </view>
17 19
             <text class="Info">{{item.name}}</text>
18 20
           </navigator>

+ 13
- 4
src/pages/HuiAiXin/index.vue Ver fichero

@@ -22,7 +22,9 @@
22 22
             <view class="List">
23 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 24
                 <view class="Img">
25
-                  <image mode="aspectFill" class="centerLabel" :src="item.thumb"></image>
25
+                  <view class="MainItemImg">
26
+                    <image mode="aspectFill" :src="item.thumb"></image>
27
+                  </view>
26 28
                 </view>
27 29
                 <text class="Info">{{item.name}}</text>
28 30
               </navigator>
@@ -49,18 +51,24 @@
49 51
             </view>
50 52
             <view class="Img">
51 53
               <view>
52
-                <image mode="aspectFill" class="centerLabel" :src="item.thumb"></image>
54
+                <view class="MainItemImg">
55
+                  <image mode="aspectFill" :src="item.thumb"></image>
56
+                </view>
53 57
               </view>
54 58
             </view>
55 59
           </navigator>
56 60
         </view>
57 61
       </view>
58 62
 
63
+      <!-- 授权头像获取弹窗 -->
64
+      <GetUserIcon></GetUserIcon>
65
+
59 66
     </ScrollY>
60 67
   </view>
61 68
 </template>
62 69
 
63 70
 <script>
71
+import GetUserIcon from '../../components/GetUserIcon/index'
64 72
 import ScrollY from '../../components/ScrollY/index'
65 73
 import BannerSwiper from '../../components/BannerSwiper/index'
66 74
 import { createNamespacedHelpers } from 'vuex'
@@ -86,7 +94,8 @@ export default {
86 94
   },
87 95
   components: {
88 96
     ScrollY,
89
-    BannerSwiper
97
+    BannerSwiper,
98
+    GetUserIcon
90 99
   },
91 100
   created () {
92 101
     this.$authed(() => {
@@ -122,7 +131,7 @@ export default {
122 131
       }).catch(() => {
123 132
         this.CheckRequestNum(3) // 判断请求接口个数
124 133
       })
125
-      this.GetMingXingYeZhuList({ queryData: { pageNum: 1, pageSize: 10, typeId: 2 } }).then(() => { // 获取明星业主列表
134
+      this.GetMingXingYeZhuList({ queryData: { pageNum: 1, pageSize: 10, typeId: 5 } }).then(() => { // 获取明星业主列表
126 135
         this.PageStarList = [...this.MingXingYeZhuList]
127 136
         this.CheckRequestNum(3) // 判断请求接口个数
128 137
       }).catch(() => {

+ 6
- 1
src/pages/HuiQuanYi/index.vue Ver fichero

@@ -28,11 +28,15 @@
28 28
         </view>
29 29
       </view>
30 30
 
31
+      <!-- 授权头像获取弹窗 -->
32
+      <GetUserIcon></GetUserIcon>
33
+
31 34
     </ScrollY>
32 35
   </view>
33 36
 </template>
34 37
 
35 38
 <script>
39
+import GetUserIcon from '../../components/GetUserIcon/index'
36 40
 import ScrollY from '../../components/ScrollY/index'
37 41
 import BannerSwiper from '../../components/BannerSwiper/index'
38 42
 import { createNamespacedHelpers } from 'vuex'
@@ -56,7 +60,8 @@ export default {
56 60
   },
57 61
   components: {
58 62
     ScrollY,
59
-    BannerSwiper
63
+    BannerSwiper,
64
+    GetUserIcon
60 65
   },
61 66
   created () {
62 67
     this.$authed(() => {

+ 3
- 1
src/pages/HuiShengHuo/ActivityList/index.vue Ver fichero

@@ -23,7 +23,9 @@
23 23
           <view class="List">
24 24
             <view class="Item" v-for="(item, index) in PageList" :key="index">
25 25
               <navigator class="Img" :url="`./ActivityDetail/index?id=${item.activityId}`" hover-class="other-navigator-hover">
26
-                <image mode="aspectFill" class="centerLabel" :src="item.thumb"></image>
26
+                <view class="MainItemImg">
27
+                  <image mode="aspectFill" :src="item.thumb"></image>
28
+                </view>
27 29
               </navigator>
28 30
               <view class="Info">
29 31
                 <text>{{item.name}}</text>

+ 4
- 2
src/pages/HuiShengHuo/PhotoList/index.vue Ver fichero

@@ -15,7 +15,9 @@
15 15
             <view>
16 16
               <view v-for="(subItem, subIndex) in item.List" :key="subIndex">
17 17
                 <view class="Img" @tap="CheckBigImg(subItem.imgUrl)">
18
-                  <image mode="aspectFill" class="centerLabel" :src="subItem.imgUrl"></image>
18
+                  <view class="MainItemImg">
19
+                    <image mode="aspectFill" :src="item.imgUrl"></image>
20
+                  </view>
19 21
                 </view>
20 22
               </view>
21 23
             </view>
@@ -96,7 +98,7 @@ export default {
96 98
           if (Arr.length && item.typeId === Arr[Arr.length - 1].Month) {
97 99
             Arr[Arr.length - 1].List.push({ ...item })
98 100
           } else {
99
-            Arr.push({ Month: item.typeId, List: [{ ...item} ] })
101
+            Arr.push({ Month: item.typeId, List: [{ ...item }] })
100 102
           }
101 103
         })
102 104
         this.PageList = Arr

+ 6
- 2
src/pages/HuiShengHuo/index.vue Ver fichero

@@ -23,7 +23,9 @@
23 23
               <view class="List">
24 24
                 <view v-for="(item, index) in PhotoList" :key="index">
25 25
                   <view @tap="CheckBigImg(item.imgUrl)">
26
-                    <image mode="aspectFill" class="centerLabel" :src="item.imgUrl"></image>
26
+                    <view class="MainItemImg">
27
+                      <image mode="aspectFill" :src="item.imgUrl"></image>
28
+                    </view>
27 29
                   </view>
28 30
                 </view>
29 31
               </view>
@@ -42,7 +44,9 @@
42 44
           <view class="List" v-if="ActivityList.length">
43 45
             <view class="Item" v-for="(item, index) in ActivityList" :key="index">
44 46
               <navigator class="Img" :url="`./ActivityList/ActivityDetail/index?id=${item.activityId}`" hover-class="other-navigator-hover">
45
-                <image mode="aspectFill" class="centerLabel" :src="item.thumb"></image>
47
+                <view class="MainItemImg">
48
+                  <image mode="aspectFill" :src="item.thumb"></image>
49
+                </view>
46 50
               </navigator>
47 51
               <view class="Info">
48 52
                 <text>{{item.name}}</text>

+ 3
- 1
src/pages/WoDe/MyActivityList/index.vue Ver fichero

@@ -23,7 +23,9 @@
23 23
             </view>
24 24
             <view class="Img">
25 25
               <view>
26
-                <image mode="aspectFill" class="centerLabel" :src="item.thumb"></image>
26
+                <view class="MainItemImg">
27
+                  <image mode="aspectFill" :src="item.thumb"></image>
28
+                </view>
27 29
               </view>
28 30
             </view>
29 31
           </navigator>

+ 7
- 4
src/pages/WoDe/index.vue Ver fichero

@@ -7,13 +7,12 @@
7 7
       <view class="centerLabel">
8 8
         <view class="flex-h">
9 9
           <view class="Icon">
10
-            <image mode="widthFix" v-if="this.UserInfo === null || this.UserInfo.Icon === undefined || this.UserInfo.Icon === null" src="https://cjgw.oss-cn-hangzhou.aliyuncs.com/ygcxxfb/image/morentouxiang.png"></image>
11
-            <image mode="widthFix" v-else :src="this.UserInfo.Icon"></image>
10
+            <image mode="widthFix" :src="IconUrl"></image>
12 11
           </view>
13 12
           <view class="flex-item">
14 13
             <navigator url="../SignIn/index" hover-class="other-navigator-hover" class="SiginIn" v-if="UserInfo === null || UserInfo.Phone === undefined || UserInfo.Phone === null">立即登录</navigator>
15 14
             <text v-else>{{UserInfo.Name}}</text>
16
-            <text  v-if="!(UserInfo === null || UserInfo.Phone === undefined || UserInfo.Phone === null)">{{UserInfo.Phone}}</text>
15
+            <text v-if="!(UserInfo === null || UserInfo.Phone === undefined || UserInfo.Phone === null)">{{UserInfo.Phone}}</text>
17 16
           </view>
18 17
         </view>
19 18
       </view>
@@ -38,7 +37,7 @@
38 37
     </view>
39 38
 
40 39
     <!-- 授权头像获取弹窗 -->
41
-    <GetUserIcon></GetUserIcon>
40
+    <GetUserIcon @UserInfoChange="UserInfoChange"></GetUserIcon>
42 41
 
43 42
   </view>
44 43
 </template>
@@ -51,6 +50,7 @@ export default {
51 50
   name: 'WoDe',
52 51
   data () {
53 52
     return {
53
+      IconUrl: 'https://cjgw.oss-cn-hangzhou.aliyuncs.com/ygcxxfb/image/morentouxiang.png',
54 54
     }
55 55
   },
56 56
   computed: {
@@ -74,6 +74,9 @@ export default {
74 74
       'EditUserInfo' // 编辑用户信息
75 75
     ]),
76 76
     Init () { // 初始化
77
+    },
78
+    UserInfoChange () {
79
+      this.IconUrl = this.UserInfo.Icon
77 80
     }
78 81
   }
79 82
 }