Преглед изворни кода

Merge branch 'main' of http://git.ycjcjy.com/marketing/miniapp into main

Your Name пре 3 година
родитељ
комит
72905f75b9

+ 3
- 0
src/constants/api.js Прегледај датотеку

@@ -274,3 +274,6 @@ export const API_BRAND_INFO = resolvePath('brand')
274 274
 //特价房
275 275
 export const API_BUILDINGSPECIALROOM_LIST = resolvePath('buildingSpecialRoom')
276 276
 export const API_BUILDINGSPECIALROOM_BUILDING_LIST = resolvePath('buildingSpecialRoom/building')
277
+
278
+// video
279
+export const API_VIDEO_DETAIL = resolvePath('detail')

+ 7
- 0
src/pages/mine/addCustomer/index.jsx Прегледај датотеку

@@ -61,6 +61,13 @@ export default withLayout((props) => {
61 61
       } else {
62 62
         params = { ...FormData, sex: SexId, intention: BuildingId, realtyConsultant: CardId }
63 63
       }
64
+      if(type === 'estateAgent') {
65
+        params.channelCustomerId = PersonId
66
+        params.channelId = user.userInfo.person.channelId
67
+        params.buildingId = BuildingId
68
+        params.orgId = `${user.userInfo.person.orgId}`
69
+        params.personId = PersonId
70
+      }
64 71
       fetch({ url, method: 'post', payload: params }).then(() => {
65 72
         Taro.showToast({ title: '添加成功', icon: 'none', duration: 2000 })
66 73
         setTimeout(() => {

+ 1
- 1
src/pages/mine/tabData.js Прегледај датотеку

@@ -21,7 +21,7 @@ const MineMenuList = {
21 21
   ],
22 22
   Broker: [ // 经纪人
23 23
     [
24
-      { name: '报备客户', icon: require('../../assets/mine-icon1.png'), router: '/pages/mine/addCustomer/index' },
24
+      { name: '报备客户', icon: require('../../assets/mine-icon1.png'), router: '/pages/mine/addCustomer/index?type=estateAgent' },
25 25
       { name: '合作渠道', icon: require('../../assets/mine-icon3.png'), router: '/pages/mine/partnerChannel/index' }
26 26
     ],
27 27
     [

+ 13
- 1
src/pages/video/components/VideoListItem/index.jsx Прегледај датотеку

@@ -1,11 +1,23 @@
1
+import Taro from '@tarojs/taro'
1 2
 import { getImgURL } from '@/utils/image'
2 3
 import { Image } from '@tarojs/components'
3 4
 import './index.scss'
4 5
 
5 6
 export default function VideoListItem (props) {
6 7
   const { Data = {} } = props
8
+
9
+  const toDetail=()=>{
10
+    console.log(Data,'------------')
11
+    if(Data.type=='video'){
12
+      Taro.navigateTo({ url: `/pages/video/videoDetail/index?id=${Data.id}` })
13
+    }else{
14
+      Taro.navigateTo({ url: `/pages/video/liveDetail/index?id=${Data.id}` })
15
+    }
16
+    // 
17
+  }
18
+  // onClick={()=>{}
7 19
   return (
8
-    <view className='components VideoListItem'>
20
+    <view className='components VideoListItem' onClick={()=>toDetail()}>
9 21
       <view className='Img'>
10 22
         <view>
11 23
           <Image mode='aspectFill' className='centerLabel' src={getImgURL(Data.images) || null} />

+ 54
- 24
src/pages/video/videoDetail/index.jsx Прегледај датотеку

@@ -1,44 +1,74 @@
1
+import { useState, useEffect } from "react";
2
+import withLayout from "@/layout";
3
+import { ScrollView } from "@tarojs/components";
4
+import "@/assets/css/iconfont.css";
5
+import "./index.scss";
6
+import { fetch } from "@/utils/request";
7
+import { API_VIDEO_DETAIL } from "@/constants/api";
8
+import getDateFormat from "@/utils/chatDate";
1 9
 
2
-import withLayout from '@/layout'
3
-import { ScrollView } from '@tarojs/components'
4
-import '@/assets/css/iconfont.css'
5
-import './index.scss'
10
+export default withLayout((props) => {
11
+  const { id } = props.router.params;
6 12
 
7
-export default withLayout(() => {
13
+  const [data, setData] = useState({});
14
+  console.log(id, "queryLiveDetail");
15
+  const getData = () => {
16
+    fetch({ url: `${API_VIDEO_DETAIL}/${id}` }).then(res=>{
17
+      setData(res)
18
+    });
19
+  };
20
+
21
+  useEffect(() => {
22
+    if (id) {
23
+      getData();
24
+    }
25
+  }, [id]);
8 26
 
9 27
   return (
10
-    <view className='Page videoDetail'>
28
+    <view className="Page videoDetail">
11 29
       <ScrollView scroll-y>
12
-        <view className='Content'>
13
-
30
+        <view className="Content">
14 31
           {/* 视频 */}
15
-          <view className='VideoContainer'>
16
-            <view>
17
-
18
-            </view>
32
+          <view className="VideoContainer">
33
+            <video
34
+              id="myVideo"
35
+              src={data.videoUrl}
36
+              // binderror="videoErrorCallback"
37
+              // danmu-list="{{danmuList}}"
38
+              // enable-danmu
39
+              // danmu-btn
40
+              // show-center-play-btn='{{false}}'
41
+              // show-play-btn="{{true}}"
42
+              // controls
43
+              // picture-in-picture-mode="{{['push', 'pop']}}"
44
+              // bindenterpictureinpicture='bindVideoEnterPictureInPicture'
45
+              // bindleavepictureinpicture='bindVideoLeavePictureInPicture'
46
+            ></video>
19 47
           </view>
20 48
 
21 49
           {/* 视频信息 */}
22
-          <view className='Info'>
23
-            <text className='Name'>视频看好房,直播抢优惠!</text>
24
-            <text className='Time'>时间:2021年7月6日  13:00</text>
50
+          <view className="Info">
51
+            <text className="Name">{data.name}</text>
52
+            <text className="Time">时间:{getDateFormat(
53
+            new Date(data.createdTime).valueOf(),
54
+            true,
55
+            'yyyy年M月d日'
56
+          )}</text>
25 57
           </view>
26 58
 
27 59
           {/* 详情 */}
28
-          <view className='Detail'>
29
-            <view className='Title'>
60
+          <view className="Detail">
61
+            <view className="Title">
30 62
               <text>视频详情</text>
31 63
             </view>
32
-            <view className='Node'>
33
-
34
-            </view>
35
-            <view className='Share'>
64
+            <view className="Node"></view>
65
+            {data.remark}
66
+            <view className="Share">
36 67
               <text>分享好友</text>
37 68
             </view>
38 69
           </view>
39
-
40 70
         </view>
41 71
       </ScrollView>
42 72
     </view>
43
-  )
44
-})
73
+  );
74
+});

+ 1
- 1
src/pages/video/videoDetail/index.scss Прегледај датотеку

@@ -15,7 +15,7 @@
15 15
         position: relative;
16 16
         overflow: hidden;
17 17
         background: #eee;
18
-        >view {
18
+        >video {
19 19
           width: 100%;
20 20
           position: absolute;
21 21
           left: 0;