瀏覽代碼

Merge branch 'dev' of http://git.ycjcjy.com/zhiyuxing/estateagents-admin-manager into dev

xujing 5 年之前
父節點
當前提交
6963e26843
共有 2 個檔案被更改,包括 30 行新增19 行删除
  1. 11
    8
      src/pages/h5SampleManager/h5Demand/detail.jsx
  2. 19
    11
      src/pages/h5SampleManager/h5Sample/detail.jsx

+ 11
- 8
src/pages/h5SampleManager/h5Demand/detail.jsx 查看文件

@@ -43,14 +43,17 @@ const header = props => {
43 43
     }
44 44
   }
45 45
 
46
-  function sampleDetail(e){
47
-    console.log(e,'eeeeeeeeeee')
48
-    router.push({
49
-      pathname: '/h5SampleManager/h5Sample/detail',
50
-      query: {
51
-        id: e,
52
-      },
53
-    });
46
+  function sampleDetail(sampleId){
47
+    request({ ...apis.taH5SampleManager.taH5SampleById, urlData: { id: sampleId } }).then((data) => {
48
+      router.push({
49
+        pathname: '/h5SampleManager/h5Sample/detail',
50
+        query: {
51
+          id: sampleId,
52
+        },
53
+      });
54
+    }).catch(err => {
55
+      message.info("该H5样例已取消发布或已删除")
56
+    })
54 57
   }
55 58
 
56 59
   function handleSubmit (e) {

+ 19
- 11
src/pages/h5SampleManager/h5Sample/detail.jsx 查看文件

@@ -37,16 +37,23 @@ const header = props => {
37 37
 
38 38
   // 跳转到编辑
39 39
   const toDetail = rowData => () => {
40
-    if (rowData) {
41
-      router.push({
42
-        pathname: '/h5SampleManager/h5Sample/add',
43
-        query: {
44
-          id: sampleId,
45
-          sampleName: demandData.sampleName
46
-        },
47
-      });
48
-      return
49
-    }
40
+
41
+    request({ ...apis.taH5SampleManager.taH5SampleById, urlData: { id: sampleId } }).then((data) => {
42
+      if (rowData) {
43
+        router.push({
44
+          pathname: '/h5SampleManager/h5Sample/add',
45
+          query: {
46
+            id: sampleId,
47
+            sampleName: demandData.sampleName
48
+          },
49
+        });
50
+        return
51
+      }
52
+    }).catch(err => {
53
+      message.info("该H5样例已取消发布或已删除")
54
+    })
55
+
56
+    
50 57
   }
51 58
   const toCancel = () => {
52 59
     router.go(-1)
@@ -96,7 +103,8 @@ const header = props => {
96 103
           <DragableUploadImageList sampleId={sampleId}></DragableUploadImageList>
97 104
         </Form.Item>}
98 105
         <Form.Item label="样例内容">
99
-          {demandData.sampleType === 'rich' ? getFieldDecorator('sampleContent')(<Wangedit contenteditable={false} />) : getFieldDecorator('sampleContentLink')(<a style={{ color: "blue" }} href={demandData.sampleContentLink} target="_blank" >{demandData.sampleContentLink}</a>)}
106
+          <span style={{ color: 'rgba(0, 0, 0, 0.45)', fontSize: '14px' }}>若您想在您的小程序举办类似活动,请联系以下联系人咨询,或直接点击底部的 提交需求 按钮下单,下单后与联系人沟通定制活动</span><br/>
107
+          {demandData.sampleType === 'rich' ? getFieldDecorator('sampleContent')(<div dangerouslySetInnerHTML={{ __html: demandData.sampleContent}}></div>) : getFieldDecorator('sampleContentLink')(<a style={{ color: "blue" }} href={demandData.sampleContentLink} target="_blank" >{demandData.sampleContentLink}</a>)}
100 108
         </Form.Item>
101 109
         <Form.Item wrapperCol={{ span: 15, offset: 7 }}>
102 110
           <div style={{ margin: '0.16rem 0 0.06rem' }}>