瀏覽代碼

静态页面

1002884655 3 年之前
父節點
當前提交
025dfdf1bd

+ 2
- 2
config/dev.js 查看文件

@@ -3,8 +3,8 @@ module.exports = {
3 3
     NODE_ENV: '"development"'
4 4
   },
5 5
   defineConstants: {
6
-    // HOST: '"https://xlk.njyz.tech"',
7
-    HOST: '"https://www.newhousehold.cn"',
6
+    HOST: '"https://xlk.njyz.tech"',
7
+    // HOST: '"https://www.newhousehold.cn"',
8 8
     // HOST: '"http://127.0.0.1:8567"',
9 9
     WSS_HOST: '"wss://xlk.njyz.tech"',
10 10
     OSS_PATH: '"https://xlk-assets.oss-cn-shanghai.aliyuncs.com/"',

+ 2
- 2
project.config.json 查看文件

@@ -2,7 +2,7 @@
2 2
 	"miniprogramRoot": "dist/",
3 3
 	"projectname": "miniapp",
4 4
 	"description": "",
5
-	"appid": "wxc96058d57e77f373",
5
+	"appid": "wxe44244d1a5ea3364",
6 6
 	"setting": {
7 7
 		"urlCheck": false,
8 8
 		"es6": false,
@@ -27,7 +27,7 @@
27 27
 			"outputPath": ""
28 28
 		},
29 29
 		"useIsolateContext": true,
30
-		"useCompilerModule": true,
30
+		"useCompilerModule": false,
31 31
 		"userConfirmedUseCompilerModuleSwitch": false
32 32
 	},
33 33
 	"compileType": "miniprogram",

+ 12
- 1
src/components/ProjectListItem/index.jsx 查看文件

@@ -8,8 +8,19 @@ import './index.scss'
8 8
 export default function ProjectListItem (props) {
9 9
   const { Data = {}, ShowImgIcon = true } = props
10 10
   const { uvList = [] } = Data
11
+
12
+  const LinkTo = () => {
13
+    if(Data.eventType === 'news') { // 资讯
14
+      Taro.navigateTo({ url: `/pages/index/newsDetail/index?id=${Data.targetId}` })
15
+    } else if(Data.eventType === 'activity') { // 活动
16
+      Taro.navigateTo({ url: `/pages/index/activityDetail/index?id=${Data.targetId}` })
17
+    } else { // 楼盘
18
+      Taro.navigateTo({ url: `/pages/index/buildingDetail/index?id=${Data.buildingId || Data.targetId}` })
19
+    }
20
+  }
21
+
11 22
   return (
12
-    <view className='components ProjectListItem flex-h' onClick={() => { Taro.navigateTo({ url: `/pages/index/buildingDetail/index?id=${Data.buildingId || Data.targetId}` }) }}>
23
+    <view className='components ProjectListItem flex-h' onClick={LinkTo}>
13 24
       <view className='Img'>
14 25
         <view>
15 26
           <Image mode='aspectFill' className='centerLabel' src={getImgURL((Data?.buildingListImg || []).length ? Data.buildingListImg[0].url : Data.activityImg || null)} />

+ 1
- 1
src/pages/index/components/ActivityListItem/index.jsx 查看文件

@@ -28,7 +28,7 @@ export default function ActivityListItem (props) {
28 28
   return (
29 29
     <view className='components ActivityListItem' onClick={() => { Taro.navigateTo({ url: `/pages/index/activityDetail/index?id=${data.dynamicId}` }) }}>
30 30
       <view className='Img'>
31
-        <Image mode='aspectFill' src={getImgURL(data.listImgUrl)} className='centerLabel'></Image>
31
+        <Image mode='aspectFill' src={getImgURL(data.listImgUrl || data.imgUrl)} className='centerLabel'></Image>
32 32
       </view>
33 33
       <view className='Info'>
34 34
         <view className='Name flex-h'>

+ 23
- 20
src/pages/mine/myCustomerDetail/index.jsx 查看文件

@@ -163,27 +163,30 @@ export default withLayout((props) => {
163 163
           }
164 164
 
165 165
           {/* 操作人员 */}
166
-          {/* <view className='OptUser'>
167
-            <view className='Title flex-h'>
168
-              <text>操作人员</text>
169
-              <view className='flex-item'></view>
170
-              <view className='More'>
171
-                <text>更多</text>
172
-                <text className='iconfont icon-jiantouright'></text>
173
-              </view>
174
-            </view>
175
-            <view className='Content'>
176
-              <view className='UserInfo flex-h'>
177
-                <view className='Icon'>
178
-                  <Image mode='aspectFill' src={null}></Image>
166
+          {
167
+            followList.length > 0 &&
168
+            <view className='OptUser'>
169
+              <view className='Title flex-h'>
170
+                <text>操作人员</text>
171
+                <view className='flex-item'></view>
172
+                <view className='More' onClick={() => { Taro.navigateTo({url: `/pages/mine/myCustomerForOperator/index?id=${id}`}) }}>
173
+                  <text>更多</text>
174
+                  <text className='iconfont icon-jiantouright'></text>
179 175
                 </view>
180
-                <view className='flex-item'>
181
-                  <text>最后跟进人</text>
182
-                  <text>跟进时间</text>
176
+              </view>
177
+              <view className='Content'>
178
+                <view className='UserInfo flex-h'>
179
+                  <view className='Icon'>
180
+                    <Image mode='aspectFill' src={null}></Image>
181
+                  </view>
182
+                  <view className='flex-item'>
183
+                    <text>{followList[0].followerName}</text>
184
+                    <text>{formatDate(followList[0].createDate, 'yyyy-MM-dd hh:mm')}</text>
185
+                  </view>
183 186
                 </view>
184 187
               </view>
185 188
             </view>
186
-          </view> */}
189
+          }
187 190
 
188 191
           {/* 跟进记录 */}
189 192
           <view className='Record'>
@@ -194,17 +197,17 @@ export default withLayout((props) => {
194 197
                 <text>新增</text>
195 198
               </view>
196 199
               <view className='flex-item'></view>
197
-              {/* <view className='More'>
200
+              <view className='More' onClick={() => { Taro.navigateTo({url: `/pages/mine/myCustomerForRecord/index?id=${id}`}) }}>
198 201
                 <text>更多</text>
199 202
                 <text className='iconfont icon-jiantouright'></text>
200
-              </view> */}
203
+              </view>
201 204
             </view>
202 205
             <view className='Content'>
203 206
               {
204 207
                 followList.map((item, index) => (
205 208
                   <view key={`Item-${index}`}>
206 209
                     <view className='flex-h'>
207
-                      <text>{item.name}</text>
210
+                      <text>{item.followerName}</text>
208 211
                       <view className='flex-item'></view>
209 212
                       <text>{formatDate(item.createDate, 'yyyy-MM-dd hh:mm')}</text>
210 213
                     </view>

+ 3
- 0
src/pages/mine/myCustomerForOperator/index.config.js 查看文件

@@ -0,0 +1,3 @@
1
+export default {
2
+  navigationBarTitleText: '操作人员'
3
+}

+ 90
- 0
src/pages/mine/myCustomerForOperator/index.jsx 查看文件

@@ -0,0 +1,90 @@
1
+import { useState, useEffect } from 'react'
2
+import withLayout from '@/layout'
3
+import { ScrollView, Image } from '@tarojs/components'
4
+import '@/assets/css/iconfont.css'
5
+import { useSelector } from 'react-redux'
6
+import { fetch } from '@/utils/request'
7
+import { API_ACTIVITY_LIST } from '@/constants/api'
8
+import { getImgURL } from '@/utils/image'
9
+import './index.scss'
10
+
11
+export default withLayout(() => {
12
+
13
+  const user = useSelector(state => state.user)
14
+  const [PageList, setPageList] = useState([])
15
+  const [IsPull, setPull] = useState(false)
16
+  const [PersonId, setPersonId] = useState(null)
17
+  const [pageNumber, setPageNumber] = useState(1)
18
+  const [HasNextPage, setHasNextPage] = useState(true)
19
+
20
+  useEffect(() => {
21
+    if (user?.userInfo?.person?.personId) {
22
+      setPersonId(user.userInfo.person.personId)
23
+    }
24
+  }, [user])
25
+
26
+  useEffect(() => {
27
+    GetPageList()
28
+  }, [pageNumber])
29
+
30
+  const PageRefresh = () => { // 页面下拉刷新回调
31
+    setPull(true)
32
+  }
33
+
34
+  const GetPageList = () => {
35
+    setHasNextPage(false)
36
+    fetch({ url: API_ACTIVITY_LIST, method: 'get', payload: { mine: true, pageNumber, pageSize: 10 } }).then((res) => {
37
+      setPageList(pageNumber === 1 ? res.records || [] : PageList.concat(res.records || []))
38
+      setHasNextPage(res.current < res.pages)
39
+      setPull(false)
40
+    })
41
+  }
42
+
43
+  const PageLoadMore = () => { // 页面上拉加载更多
44
+    if (HasNextPage) {
45
+      setPageNumber(pageNumber + 1)
46
+    }
47
+  }
48
+
49
+  useEffect(() => { // 下拉刷新触发
50
+    if (IsPull) {
51
+      if (pageNumber === 1) {
52
+        GetPageList()
53
+      } else {
54
+        setPageNumber(1)
55
+      }
56
+    }
57
+  }, [IsPull])
58
+
59
+  return (
60
+    <view className='Page myActivity'>
61
+
62
+      <ScrollView scroll-y refresher-enabled refresher-triggered={IsPull} onrefresherrefresh={PageRefresh} onscrolltolower={PageLoadMore} refresher-background='#fff'>
63
+        <view className='PageContent'>
64
+          <view className='List'>
65
+            {
66
+              PageList.map((item, index) => (
67
+                <view className='ListItem flex-h' key={`ListItem-${index}`}>
68
+                  <view className='Icon'>
69
+                    <Image mode='aspectFill' className='centerLabel' src={getImgURL(null)} />
70
+                  </view>
71
+                  <view className='flex-item'>
72
+                    <text>报备人</text>
73
+                    <text>2021-08-08 15:15:15</text>
74
+                  </view>
75
+                </view>
76
+              ))
77
+            }
78
+          </view>
79
+
80
+          {/* bottom */}
81
+          <view className='PageBottom'>
82
+            <text>已经到底了~</text>
83
+          </view>
84
+
85
+        </view>
86
+      </ScrollView>
87
+
88
+    </view>
89
+  )
90
+})

+ 70
- 0
src/pages/mine/myCustomerForOperator/index.scss 查看文件

@@ -0,0 +1,70 @@
1
+.Page.myActivity {
2
+  background: #fff;
3
+  width: 100%;
4
+  height: 100%;
5
+  position: relative;
6
+  overflow: hidden;
7
+  > scroll-view {
8
+    width: 100%;
9
+    height: 100vh;
10
+    .PageContent {
11
+      position: relative;
12
+      overflow: hidden;
13
+      min-height: 100vh;
14
+      >.List {
15
+        padding: 0 30px;
16
+        position: relative;
17
+        overflow: hidden;
18
+        >.ListItem {
19
+          position: relative;
20
+          overflow: hidden;
21
+          border-bottom: 2px solid rgba(0, 0, 0, 0.08);
22
+          padding: 24px 0;
23
+          align-items: center;
24
+          >.Icon {
25
+            width: 92px;
26
+            height: 92px;
27
+            position: relative;
28
+            overflow: hidden;
29
+            background: #eee;
30
+            border-radius: 100%;
31
+            margin-right: 30px;
32
+            >image {
33
+              width: 100%;
34
+              height: 100%;
35
+            }
36
+          }
37
+          >.flex-item {
38
+            >text {
39
+              display: block;
40
+              font-size: 28px;
41
+              color: #666;
42
+              line-height: 1;
43
+              margin-top: 12px;
44
+              white-space: nowrap;
45
+              overflow: hidden;
46
+              text-overflow: ellipsis;
47
+              &:first-child {
48
+                font-size: 32px;
49
+                color: #333;
50
+                margin-top: 0;
51
+              }
52
+            }
53
+          }
54
+        }
55
+      }
56
+      > .PageBottom {
57
+        text-align: center;
58
+        font-size: 0;
59
+        white-space: nowrap;
60
+        > text {
61
+          display: inline-block;
62
+          font-size: 28px;
63
+          color: #666;
64
+          line-height: 40px;
65
+          margin: 20px auto;
66
+        }
67
+      }
68
+    }
69
+  }
70
+}

+ 3
- 0
src/pages/mine/myCustomerForRecord/index.config.js 查看文件

@@ -0,0 +1,3 @@
1
+export default {
2
+  navigationBarTitleText: '跟进记录'
3
+}

+ 90
- 0
src/pages/mine/myCustomerForRecord/index.jsx 查看文件

@@ -0,0 +1,90 @@
1
+import { useState, useEffect } from 'react'
2
+import withLayout from '@/layout'
3
+import { ScrollView, Image } from '@tarojs/components'
4
+import '@/assets/css/iconfont.css'
5
+import { useSelector } from 'react-redux'
6
+import { fetch } from '@/utils/request'
7
+import { API_ACTIVITY_LIST } from '@/constants/api'
8
+import { getImgURL } from '@/utils/image'
9
+import './index.scss'
10
+
11
+export default withLayout(() => {
12
+
13
+  const user = useSelector(state => state.user)
14
+  const [PageList, setPageList] = useState([])
15
+  const [IsPull, setPull] = useState(false)
16
+  const [PersonId, setPersonId] = useState(null)
17
+  const [pageNumber, setPageNumber] = useState(1)
18
+  const [HasNextPage, setHasNextPage] = useState(true)
19
+
20
+  useEffect(() => {
21
+    if (user?.userInfo?.person?.personId) {
22
+      setPersonId(user.userInfo.person.personId)
23
+    }
24
+  }, [user])
25
+
26
+  useEffect(() => {
27
+    GetPageList()
28
+  }, [pageNumber])
29
+
30
+  const PageRefresh = () => { // 页面下拉刷新回调
31
+    setPull(true)
32
+  }
33
+
34
+  const GetPageList = () => {
35
+    setHasNextPage(false)
36
+    fetch({ url: API_ACTIVITY_LIST, method: 'get', payload: { mine: true, pageNumber, pageSize: 10 } }).then((res) => {
37
+      setPageList(pageNumber === 1 ? res.records || [] : PageList.concat(res.records || []))
38
+      setHasNextPage(res.current < res.pages)
39
+      setPull(false)
40
+    })
41
+  }
42
+
43
+  const PageLoadMore = () => { // 页面上拉加载更多
44
+    if (HasNextPage) {
45
+      setPageNumber(pageNumber + 1)
46
+    }
47
+  }
48
+
49
+  useEffect(() => { // 下拉刷新触发
50
+    if (IsPull) {
51
+      if (pageNumber === 1) {
52
+        GetPageList()
53
+      } else {
54
+        setPageNumber(1)
55
+      }
56
+    }
57
+  }, [IsPull])
58
+
59
+  return (
60
+    <view className='Page myActivity'>
61
+
62
+      <ScrollView scroll-y refresher-enabled refresher-triggered={IsPull} onrefresherrefresh={PageRefresh} onscrolltolower={PageLoadMore} refresher-background='#fff'>
63
+        <view className='PageContent'>
64
+          <view className='List'>
65
+            {
66
+              PageList.map((item, index) => (
67
+                <view className='ListItem' key={`ListItem-${index}`}>
68
+                  <view className='flex-h'>
69
+                    <view className='flex-item'>
70
+                      <text>跟进人</text>
71
+                    </view>
72
+                    <text>2021-05-21 12:00</text>
73
+                  </view>
74
+                  <text>跟进内容</text>
75
+                </view>
76
+              ))
77
+            }
78
+          </view>
79
+
80
+          {/* bottom */}
81
+          <view className='PageBottom'>
82
+            <text>已经到底了~</text>
83
+          </view>
84
+
85
+        </view>
86
+      </ScrollView>
87
+
88
+    </view>
89
+  )
90
+})

+ 62
- 0
src/pages/mine/myCustomerForRecord/index.scss 查看文件

@@ -0,0 +1,62 @@
1
+.Page.myActivity {
2
+  background: #fff;
3
+  width: 100%;
4
+  height: 100%;
5
+  position: relative;
6
+  overflow: hidden;
7
+  > scroll-view {
8
+    width: 100%;
9
+    height: 100vh;
10
+    .PageContent {
11
+      position: relative;
12
+      overflow: hidden;
13
+      min-height: 100vh;
14
+      >.List {
15
+        padding: 0 30px;
16
+        position: relative;
17
+        overflow: hidden;
18
+        >.ListItem {
19
+          position: relative;
20
+          overflow: hidden;
21
+          border-bottom: 2px solid rgba(0, 0, 0, 0.08);
22
+          padding: 40px 0;
23
+          >.flex-h {
24
+            align-items: center;
25
+            >.flex-item {
26
+              >text {
27
+                display: block;
28
+                font-size: 32px;
29
+                color: #333;
30
+                line-height: 1;
31
+              }
32
+            }
33
+            >text {
34
+              font-size: 24px;
35
+              color: #999;
36
+              line-height: 1;
37
+            }
38
+          }
39
+          >text {
40
+            font-size: 28px;
41
+            color: 666;
42
+            line-height: 36px;
43
+            display: block;
44
+            margin-top: 38px;
45
+          }
46
+        }
47
+      }
48
+      > .PageBottom {
49
+        text-align: center;
50
+        font-size: 0;
51
+        white-space: nowrap;
52
+        > text {
53
+          display: inline-block;
54
+          font-size: 28px;
55
+          color: #666;
56
+          line-height: 40px;
57
+          margin: 20px auto;
58
+        }
59
+      }
60
+    }
61
+  }
62
+}

+ 14
- 0
src/routes.js 查看文件

@@ -318,6 +318,20 @@ const routes = [
318 318
     type: 'mine',
319 319
     // auth: ['phone'],
320 320
   },
321
+  {
322
+    name: '操作人员',
323
+    page: 'pages/mine/myCustomerForOperator/index',
324
+    pkg: 'main',
325
+    type: 'mine',
326
+    // auth: ['phone'],
327
+  },
328
+  {
329
+    name: '跟进记录',
330
+    page: 'pages/mine/myCustomerForRecord/index',
331
+    pkg: 'main',
332
+    type: 'mine',
333
+    // auth: ['phone'],
334
+  },
321 335
   {
322 336
     name: '我的收藏',
323 337
     page: 'pages/mine/myCollect/index',