许成详 6 years ago
parent
commit
afe61ebf66
3 changed files with 25 additions and 10 deletions
  1. 2
    2
      pages/ActivityDetail/index.js
  2. 10
    8
      pages/EstateDetail/index.js
  3. 13
    0
      pages/components/SubIndex/index.wxss

+ 2
- 2
pages/ActivityDetail/index.js View File

@@ -90,7 +90,7 @@ Page({
90 90
     })
91 91
   },
92 92
   AddComment() { // 添加评论
93
-    if (app.globalData.UserInfo.avatar === '' && app.globalData.UserInfo.name === '') {
93
+    if (app.globalData.UserInfo.hasReg - 0 !== 1) {
94 94
       wx.navigateTo({
95 95
         url: '/pages/index/index?index=3'
96 96
       })
@@ -101,7 +101,7 @@ Page({
101 101
     }
102 102
   },
103 103
   ShowSignUpPopup() { // 打开报名弹窗
104
-    if (app.globalData.UserInfo.avatar === '' && app.globalData.UserInfo.name === '') {
104
+    if (app.globalData.UserInfo.hasReg - 0 !== 1) {
105 105
       wx.navigateTo({
106 106
         url: '/pages/index/index?index=3'
107 107
       })

+ 10
- 8
pages/EstateDetail/index.js View File

@@ -12,7 +12,7 @@ Page({
12 12
       title: '楼盘详情'
13 13
     })
14 14
   },
15
-  onLoad: function (options) {
15
+  onLoad: function(options) {
16 16
     const id = page.getCurrentPageOptions().id
17 17
     const _that = this
18 18
 
@@ -47,13 +47,13 @@ Page({
47 47
           }
48 48
         })
49 49
         _that.setData({
50
-          EstateDetail: { 
51
-            ...data.data, 
50
+          EstateDetail: {
51
+            ...data.data,
52 52
             openingDate: data.data.openingDate.split(' ')[0],
53
-            propertyType: propertyType, 
54
-            buildingApartment: apart, 
55
-            IsCollect: (_that.data.Collects.filter(x => x.buildingId == data.data.buildingId).length>0? true:false)
56
-            }
53
+            propertyType: propertyType,
54
+            buildingApartment: apart,
55
+            IsCollect: (_that.data.Collects.filter(x => x.buildingId == data.data.buildingId).length > 0 ? true : false)
56
+          }
57 57
         })
58 58
       })
59 59
     })
@@ -79,7 +79,9 @@ Page({
79 79
         title: '收藏成功!'
80 80
       })
81 81
       _that.setData({
82
-        EstateDetail: { ..._that.data.EstateDetail, IsCollect:true}
82
+        EstateDetail: { ..._that.data.EstateDetail,
83
+          IsCollect: true
84
+        }
83 85
       })
84 86
     })
85 87
   },

+ 13
- 0
pages/components/SubIndex/index.wxss View File

@@ -17,6 +17,19 @@
17 17
   z-index: 1;
18 18
 }
19 19
 
20
+.imgContent {
21
+  width: 100%;
22
+  position: absolute;
23
+  left: 0;
24
+  top: 0;
25
+  bottom: 0;
26
+}
27
+
28
+.imgContent > swiper {
29
+  width: 100%;
30
+  height: 100%;
31
+}
32
+
20 33
 .nav {
21 34
   width: 100%;
22 35
   position: relative;