瀏覽代碼

静态页面

xcx 4 年之前
父節點
當前提交
fafeaa635c
共有 1 個文件被更改,包括 9 次插入2 次删除
  1. 9
    2
      src/pages/HuoDong/ZiXunDetail/index.jsx

+ 9
- 2
src/pages/HuoDong/ZiXunDetail/index.jsx 查看文件

@@ -1,7 +1,7 @@
1 1
 import React, { useState, useEffect } from 'react'
2 2
 import Taro, { useRouter } from '@tarojs/taro'
3 3
 import request, { apis } from '@/utils/request'
4
-import { RichText } from '@tarojs/components'
4
+import { RichText, WebView } from '@tarojs/components'
5 5
 import toolclass from '@/utils/toolclass.js'
6 6
 import Page from '@/layouts'
7 7
 import { useModel } from '@/store'
@@ -54,7 +54,14 @@ export default function ZiXunDetail () {
54 54
               <text className='iconfont iconguankan'></text>
55 55
               <text>{NewsDetail.pvNum || 0}</text>
56 56
             </view>
57
-            <RichText nodes={NewsDetail.newsDetail}></RichText>
57
+            {
58
+              NewsDetail.newsDetailType - 0 === 1 &&
59
+              <RichText nodes={NewsDetail.newsDetail}></RichText>
60
+            }
61
+            {
62
+              NewsDetail.newsDetailType - 0 !== 1 &&
63
+              <WebView src={NewsDetail.newsDetail}></WebView>
64
+            }
58 65
           </view>
59 66
         }
60 67
       </view>