1007395918@qq.com 5 gadus atpakaļ
vecāks
revīzija
a9d97888a7
2 mainītis faili ar 75 papildinājumiem un 73 dzēšanām
  1. 50
    47
      src/pages/news/detail/index.js
  2. 25
    26
      src/pages/project/list/filter/index.js

+ 50
- 47
src/pages/news/detail/index.js Parādīt failu

@@ -62,7 +62,7 @@ export default class NewsDetail extends Component {
62 62
 
63 63
       if (this.$router.params.scene) {
64 64
         getQrCodeParams(this.$router.params.scene).then(res => {
65
-          console.log(res,"扫码参数")
65
+          console.log(res, "扫码参数")
66 66
           this.setState({ newsId: res.id, qrcodeParams: res }, () => {
67 67
             this.loadDetail()
68 68
             addNewsUv(res.id)
@@ -368,58 +368,61 @@ export default class NewsDetail extends Component {
368 368
           grantAvatarVisible &&
369 369
           <AchieveAvatar user={userInfo.person} onSuccess={() => { this.setState({ grantAvatarVisible: false }) }} ></AchieveAvatar>
370 370
         }
371
-
372 371
         {
373 372
           loaded && (
374
-            <Block>
375
-              <ScrollView className="detail" scrollY>
376
-                <View class="detail-title">{detail.newsName}</View>
377
-                <View className="detail-stat">
378
-                  <View className='left-icon'>
379
-                    <View className='eye-num'><Text className="iconfont icon-eye"></Text>{detail.pvNum || 0}</View>
380
-                    {/* <View><Text className="iconfont icon-fenxiang1"></Text>{detail.shareNum || 0}</View> */}
381
-                    <View className='fenx'><Image src={require('@/assets/person/fenxiang.png')} className='fenxiang1-img'></Image>{detail.shareNum || 0}</View>
373
+            detail.newsDetailType == 0 ? <WebView src={detail.newsDetail} /> :
374
+              <Block>
375
+                <ScrollView className="detail" scrollY>
376
+                  <View class="detail-title">{detail.newsName}</View>
377
+                  <View className="detail-stat">
378
+                    <View className='left-icon'>
379
+                      <View className='eye-num'><Text className="iconfont icon-eye"></Text>{detail.pvNum || 0}</View>
380
+                      {/* <View><Text className="iconfont icon-fenxiang1"></Text>{detail.shareNum || 0}</View> */}
381
+                      <View className='fenx'><Image src={require('@/assets/person/fenxiang.png')} className='fenxiang1-img'></Image>{detail.shareNum || 0}</View>
382
+                    </View>
383
+                    <View>{dayjs(detail.createDate).format('YYYY-MM-DD')}</View>
384
+                  </View>
385
+                  {/* <Image mode="widthFix" style={{ width: '100%', marginTop: '20px' }} src={transferImage(detail.newsImg)}></Image> */}
386
+                  <View className="detail-con">
387
+                    {/* <richText nodes={detail.newsDetail} ></richText> */}
388
+                    <import src='../../../components/wxParse/wxParse.wxml' />
389
+                    <template is='wxParse' data='{{wxParseData:article.nodes}}' />
390
+                  </View>
391
+                </ScrollView>
392
+                <Notice></Notice>
393
+                <BackHomeBtn style={consultShow ? "bottom:310rpx" : ''}></BackHomeBtn>
394
+                {
395
+                  consultShow && <Consultant style="bottom:150rpx" smallStyle="bottom:178rpx" personId={userInfo.person.personId} name={userInfo.person.name || userInfo.person.nickname} data={consultData}></Consultant>
396
+                }
397
+                <View className="bot-nav flex">
398
+                  <View className='btn poster-btn' style={{ display: posterShow }} onClick={() => { this.handleTogglePoster(true) }}>
399
+                    {/* <Text className="iconfont icon-xiazai"></Text> */}
400
+                    <Image src={require('@/assets/news/tupian.png')} className='poster-img'></Image>
401
+                    <Text className="txt">海报</Text>
402
+                  </View>
403
+                  <Button className="btn share-btn" open-type="share">
404
+                    {/* <Text className="icon-fenxiang iconfont"></Text> */}
405
+                    <Image src={require('@/assets/news/fasong.png')} className='fenxiang-img'></Image>
406
+                    <Text className="txt">分享</Text>
407
+                  </Button>
408
+                  <View className="btn collection-btn" onClick={this.handleFavor}>
409
+                    {
410
+                      isSaved ? (
411
+                        <Text className="iconfont icon-shoucang saved"></Text>
412
+                      ) : (
413
+                          <Text className="iconfont icon-shoucang1"></Text>
414
+                        )
415
+                    }
416
+                    <Text className="txt">收藏</Text>
382 417
                   </View>
383
-                  <View>{dayjs(detail.createDate).format('YYYY-MM-DD')}</View>
384
-                </View>
385
-                {/* <Image mode="widthFix" style={{ width: '100%', marginTop: '20px' }} src={transferImage(detail.newsImg)}></Image> */}
386
-                <View className="detail-con">
387
-                  {/* <richText nodes={detail.newsDetail} ></richText> */}
388
-                  <import src='../../../components/wxParse/wxParse.wxml' />
389
-                  <template is='wxParse' data='{{wxParseData:article.nodes}}' />
390
-                </View>
391
-              </ScrollView>
392
-              <Notice></Notice>
393
-              <BackHomeBtn style={consultShow ? "bottom:310rpx" : ''}></BackHomeBtn>
394
-              {
395
-                consultShow && <Consultant style="bottom:150rpx" smallStyle="bottom:178rpx" personId={userInfo.person.personId} name={userInfo.person.name || userInfo.person.nickname} data={consultData}></Consultant>
396
-              }
397
-              <View className="bot-nav flex">
398
-                <View className='btn poster-btn' style={{ display: posterShow }} onClick={() => { this.handleTogglePoster(true) }}>
399
-                  {/* <Text className="iconfont icon-xiazai"></Text> */}
400
-                  <Image src={require('@/assets/news/tupian.png')} className='poster-img'></Image>
401
-                  <Text className="txt">海报</Text>
402
-                </View>
403
-                <Button className="btn share-btn" open-type="share">
404
-                  {/* <Text className="icon-fenxiang iconfont"></Text> */}
405
-                  <Image src={require('@/assets/news/fasong.png')} className='fenxiang-img'></Image>
406
-                  <Text className="txt">分享</Text>
407
-                </Button>
408
-                <View className="btn collection-btn" onClick={this.handleFavor}>
409
-                  {
410
-                    isSaved ? (
411
-                      <Text className="iconfont icon-shoucang saved"></Text>
412
-                    ) : (
413
-                        <Text className="iconfont icon-shoucang1"></Text>
414
-                      )
415
-                  }
416
-                  <Text className="txt">收藏</Text>
417
-                </View>
418 418
 
419
-              </View>
420
-            </Block>
419
+                </View>
420
+              </Block>
421 421
           )
422 422
         }
423
+
424
+
425
+
423 426
       </Block>
424 427
     )
425 428
   }

+ 25
- 26
src/pages/project/list/filter/index.js Parādīt failu

@@ -25,19 +25,19 @@ export default class Index extends Component {
25 25
       {
26 26
         name: '价格',
27 27
         id: 'price',
28
-        list: ['不限', '10000元/㎡以下', '10000-20000元/㎡', '20000-30000元/㎡', '30000-50000元/㎡', '50000-70000元/㎡', '70000-100000元/㎡', '100000元/㎡以上']
29
-        // list: [
30
-        //   {
31
-        //     name: '总价',
32
-        //     id: 'totalPrice',
33
-        //     list: ['不限', '100万以下', '100-150万', '150-200万', '200-500万', '500-1000万', '1000万以上']
34
-        //   },
35
-        //   {
36
-        //     name: '单价',
37
-        //     id: 'unitPrice ',
38
-        //     list: ['不限', '10000/㎡以下', '10000-20000元/㎡', '20000-30000元/㎡', '30000-50000元/㎡', '50000-70000元/㎡', '70000-100000元/㎡', '100000元/㎡以上']
39
-        //   }
40
-        // ]
28
+        // list: ['不限', '10000元/㎡以下', '10000-20000元/㎡', '20000-30000元/㎡', '30000-50000元/㎡', '50000-70000元/㎡', '70000-100000元/㎡', '100000元/㎡以上']
29
+        list: [
30
+          {
31
+            name: '单价',
32
+            id: 'unitPrice ',
33
+            list: ['不限', '10000/㎡以下', '10000-20000元/㎡', '20000-30000元/㎡', '30000-50000元/㎡', '50000-70000元/㎡', '70000-100000元/㎡', '100000元/㎡以上']
34
+          },
35
+          {
36
+            name: '总价',
37
+            id: 'totalPrice',
38
+            list: ['不限', '100万以下', '100-150万', '150-200万','200-250万', '250-500万', '500-1000万', '1000万以上']
39
+          },
40
+        ]
41 41
       },
42 42
       {
43 43
         name: '面积',
@@ -47,9 +47,7 @@ export default class Index extends Component {
47 47
       {
48 48
         name: '类型',
49 49
         id: 'type',
50
-        list: [
51
-
52
-        ]
50
+        list: []
53 51
       }
54 52
     ]
55 53
   }
@@ -215,13 +213,13 @@ export default class Index extends Component {
215 213
     })
216 214
   }
217 215
 
218
-  // renderPanel() {
219
-  //   const { tabIndex } = this.state
220
-  //   return (
221
-  //     <Block>
222
-  //       {tabIndex === 1 ? this.renderPrice() : this.renderList()}
223
-  //     </Block>)
224
-  // }
216
+  renderPanel() {
217
+    const { tabIndex } = this.state
218
+    return (
219
+      <Block>
220
+        {tabIndex === 1 ? this.renderPrice() : this.renderList()}
221
+      </Block>)
222
+  }
225 223
 
226 224
   renderList() {
227 225
     const { tabs, tabIndex, selectedIndex } = this.state
@@ -251,7 +249,7 @@ export default class Index extends Component {
251 249
     const priceArr = tabs[1].list
252 250
     const list = priceArr[priceTypeIndex].list
253 251
     return (
254
-      <View className="price">
252
+      <View className="price" >
255 253
         <View className="menu">
256 254
           {
257 255
             priceArr.map((item, index) => (
@@ -263,7 +261,7 @@ export default class Index extends Component {
263 261
             ))
264 262
           }
265 263
         </View>
266
-        <ScrollView scrollY className="content">
264
+        <ScrollView scrollY className="content" style="padding-left:0">
267 265
           {
268 266
             list.map((text, index) => (
269 267
               <View
@@ -326,7 +324,8 @@ export default class Index extends Component {
326 324
               <ScrollView
327 325
                 scrollY
328 326
                 className="panel">
329
-                {this.renderList()}
327
+                {this.renderPanel()}
328
+                {/* {this.renderList()} */}
330 329
               </ScrollView>
331 330
 
332 331
               <View className="confirm">