Browse Source

Merge branch 'dev' of http://git.ycjcjy.com/zhiyuxing/miniapp-v3 into dev

Yansen 5 years ago
parent
commit
b30ddc49b2

+ 1
- 1
config/dev.js View File

@@ -9,7 +9,7 @@ module.exports = {
9 9
     // WSS_HOST: '"ws://192.168.2.43:8080"',
10 10
     OSS_PATH: 'https://njcj.oss-cn-shanghai.aliyuncs.com/',
11 11
     OSS_FAST_PATH: 'https://njcj.oss-accelerate.aliyuncs.com/',
12
-    Version: 'V3.5.21'
12
+    Version: 'V3.5.25'
13 13
   },
14 14
   weapp: {},
15 15
   h5: {}

+ 3
- 3
config/prod.js View File

@@ -3,13 +3,13 @@ module.exports = {
3 3
     NODE_ENV: '"production"'
4 4
   },
5 5
   defineConstants: {
6
+    // HOST: '"https://dev.fangdeal.cn"',//测试
7
+    // WSS_HOST: '"wss://dev.fangdeal.cn"',
6 8
     HOST: '"https://wx.fangdeal.cn"',//正式
7 9
     WSS_HOST: '"wss://wx.fangdeal.cn"',
8
-    // HOST: '"https://wx.fangdeal.cn"',//正式
9
-    // WSS_HOST: '"wss://wx.fangdeal.cn"',
10 10
     OSS_PATH: 'https://njcj.oss-cn-shanghai.aliyuncs.com/',
11 11
     OSS_FAST_PATH: 'https://njcj.oss-accelerate.aliyuncs.com/',
12
-    Version: 'V3.5.24'
12
+    Version: 'V3.5.25'
13 13
   },
14 14
   weapp: {},
15 15
   h5: {}

+ 0
- 5
ext.json View File

@@ -1,5 +0,0 @@
1
-{
2
-  "extEnable": true,
3
-  "extAppid": "wxd9ee3a9480a4e544",
4
-  "ext": {}
5
-}

+ 1
- 1
project.config.json View File

@@ -2,7 +2,7 @@
2 2
 	"miniprogramRoot": "dist/",
3 3
 	"projectname": "mini-chengjiao",
4 4
 	"description": "知与行互动",
5
-	"appid": "wxd9ee3a9480a4e544",
5
+	"appid": "wxd6f47a9bb3052175",
6 6
 	"setting": {
7 7
 		"urlCheck": false,
8 8
 		"es6": false,

+ 3
- 3
src/components/consultant/index.js View File

@@ -45,7 +45,7 @@ export default class Index extends Component {
45 45
     }
46 46
     handleChatClick(data, e) {
47 47
         e.stopPropagation()
48
-        
48
+
49 49
         const { userInfo: { miniApp: { tpls }, person: { personId, name, nickname } } } = this.props
50 50
         const tplId = (tpls.filter(x => x.tplType == noticeType.TPL_NOTICE && x.isSubscribe == true)[0] || {}).tplId
51 51
         const realname = name || nickname
@@ -67,9 +67,9 @@ export default class Index extends Component {
67 67
 
68 68
     handleConsuItemClick(item) {
69 69
         Taro.navigateTo({
70
-          url: `/pages/card/index?id=${item.id}`
70
+            url: `/pages/card/index?id=${item.id}`
71 71
         })
72
-      }
72
+    }
73 73
     render() {
74 74
         const { show } = this.state
75 75
         const { data, style, smallStyle } = this.props

+ 8
- 0
src/pages/card/index.js View File

@@ -62,6 +62,14 @@ export default class Index extends Component {
62 62
       this.initPageData()
63 63
     })
64 64
   }
65
+
66
+  componentDidShow() {
67
+      wx.setStorage({
68
+        key: "from-card",
69
+        data: "true"
70
+      })
71
+  }
72
+
65 73
   initPageData() {
66 74
 
67 75
     const id = this.$router.params.id

+ 1
- 0
src/pages/project/banner/index.scss View File

@@ -27,6 +27,7 @@
27 27
       height: 100%!important;
28 28
       overflow: hidden;
29 29
       border-radius: 0;
30
+      image-rendering: pixelated;
30 31
     }
31 32
   }
32 33
 }

+ 58
- 20
src/pages/project/detail/index.js View File

@@ -98,27 +98,38 @@ export default class Index extends Component {
98 98
         this.toggleGrantAvatar()
99 99
       }
100 100
 
101
-      const id = this.$router.params.id
101
+      this.loadData()
102
+
103
+      // const id = this.$router.params.id
104
+
105
+      // // 没有找到 id , 再重新找一次
106
+      // if (this.$router.params.scene) {
107
+      //   getQrCodeParams(this.$router.params.scene).then(res => {
108
+      //     console.log(res, "扫码参数")
109
+      //     this.setState({
110
+      //       qrcodeParams: res
111
+      //     })
112
+      //     this.initPageData(res.id)
113
+      //   }).catch(err => {
114
+      //     Taro.showToast({
115
+      //       title: '没有找到项目',
116
+      //       icon: 'none'
117
+      //     })
118
+      //   })
119
+      // } else {
120
+      //   console.log('有项目id,不请求扫码参数接口')
121
+      //   this.initPageData(id)
122
+      // }
123
+    })
124
+  }
125
+  componentDidShow() {
126
+    console.log('3366633', this.$router.params)
102 127
 
103
-      // 没有找到 id , 再重新找一次
104
-      if (this.$router.params.scene) {
105
-        getQrCodeParams(this.$router.params.scene).then(res => {
106
-          console.log(res, "扫码参数")
107
-          this.setState({
108
-            qrcodeParams: res
109
-          })
110
-          this.initPageData(res.id)
111
-        }).catch(err => {
112
-          Taro.showToast({
113
-            title: '没有找到项目',
114
-            icon: 'none'
115
-          })
116
-        })
117
-      } else {
118
-        console.log('有项目id,不请求扫码参数接口')
119
-        this.initPageData(id)
128
+      const fromCard = !!wx.getStorageSync('from-card')
129
+
130
+      if (fromCard) {
131
+        this.loadData()
120 132
       }
121
-    })
122 133
   }
123 134
 
124 135
   componentWillUnmount() {
@@ -144,6 +155,31 @@ export default class Index extends Component {
144 155
     }
145 156
   }
146 157
 
158
+  loadData() {
159
+    const id = this.$router.params.id
160
+
161
+    // 没有找到 id , 再重新找一次
162
+    if (this.$router.params.scene) {
163
+      getQrCodeParams(this.$router.params.scene).then(res => {
164
+        console.log(res, "扫码参数")
165
+        this.setState({
166
+          qrcodeParams: res
167
+        })
168
+        this.initPageData(res.id)
169
+      }).catch(err => {
170
+        Taro.showToast({
171
+          title: '没有找到项目',
172
+          icon: 'none'
173
+        })
174
+      })
175
+    } else {
176
+      console.log('有项目id,不请求扫码参数接口')
177
+      this.initPageData(id)
178
+    }
179
+
180
+    wx.removeStorageSync('from-card')
181
+  }
182
+
147 183
   currentPageAndParams() {
148 184
     const {
149 185
       projectDetail: { buildingId },
@@ -201,6 +237,7 @@ export default class Index extends Component {
201 237
     this.setState({
202 238
       buildingId: id
203 239
     }, () => {
240
+      console.log('12321312321321')
204 241
       this.loadDetail()
205 242
       this.loadNewsData()
206 243
       // this.loadActivityData()
@@ -287,7 +324,8 @@ export default class Index extends Component {
287 324
   }
288 325
 
289 326
   loadDetail() {
290
-    const { buildingId } = this.state
327
+    const sceneParams = this._$_scene || {}
328
+    const buildingId = this.state.buildingId || this.$router.params.id || sceneParams.id
291 329
     const { dispatchProjectDetail } = this.props
292 330
     this.setState({
293 331
       loaded: false,

+ 5
- 4
src/pages/project/index.js View File

@@ -33,7 +33,7 @@ export default class Index extends Component {
33 33
     maskBanner: '',
34 34
     shareImg: '',
35 35
     imgDocument: '',
36
-    newImg:'',
36
+    newImg: '',
37 37
     // adImage: advImageOfApp,
38 38
     bannerList: [],
39 39
     helpGroupList: [],
@@ -94,7 +94,7 @@ export default class Index extends Component {
94 94
         imgDocument: (shareInfo || {}).imgDocument,
95 95
         newImg: (newsInfo || {}).imgUrl,
96 96
       })
97
-      
97
+
98 98
       // indexNews
99 99
       console.log(shareInfo, '首页分享信息')
100 100
     })
@@ -508,8 +508,9 @@ export default class Index extends Component {
508 508
   }
509 509
 
510 510
   render() {
511
-    const { achieve, helpGroupList, propagandaBanner, newsShow, iconList,newImg } = this.state
511
+    const { achieve, helpGroupList, propagandaBanner, newsShow, iconList, newImg } = this.state
512 512
     const { curCity, unReadNum, userInfo: { person: { personType } } } = this.props
513
+    console.log(personType, "personTypepersonTypepersonTypepersonType")
513 514
 
514 515
     return (
515 516
       <Block>
@@ -577,7 +578,7 @@ export default class Index extends Component {
577 578
                   </View>
578 579
                 }
579 580
                 {/* 资讯 */}
580
-                <Newsbanner showNesBox={this.handleNewsbannerShow} cityId={curCity.id} newImg = {newImg} onClick={this.handleNoticeClick} onClickMore={this.toNewsList} />
581
+                <Newsbanner showNesBox={this.handleNewsbannerShow} cityId={curCity.id} newImg={newImg} onClick={this.handleNoticeClick} onClickMore={this.toNewsList} />
581 582
               </View >
582 583
               {/* 参加活动*/}
583 584
               {