소스 검색

静态页面

1002884655 3 년 전
부모
커밋
370d589c24

+ 1
- 0
src/constants/api.js 파일 보기

@@ -123,6 +123,7 @@ export const API_CHANNEL_REPORT = resolvePath('channel/report')
123 123
 
124 124
 // 驻场
125 125
 export const API_MANAGE_CUSTOMER_LIST = resolvePath('marking/customers')
126
+export const API_TOBE_MANAGER = resolvePath('marketing')
126 127
 
127 128
 // report
128 129
 export const API_REPORT_CUETOMER = resolvePath('customer/manualReport ')

+ 1
- 1
src/pages/mine/residentManager/index.jsx 파일 보기

@@ -72,7 +72,7 @@ export default withLayout(() => {
72 72
 
73 73
   const GetPageList = () => {
74 74
     setHasNextPage(false)
75
-    fetch({ url: API_MANAGE_CUSTOMER_LIST, method: 'get', payload: { customerId: PersonId, pageNumber, pageSize: 10, ...FilterData, buildingId: user.userInfo.person.buildingId } }).then((res) => {
75
+    fetch({ url: API_MANAGE_CUSTOMER_LIST, method: 'get', payload: { pageNumber, pageSize: 10, ...FilterData, buildingId: user.userInfo.person.buildingId } }).then((res) => {
76 76
       setPageList(pageNumber === 1 ? res.records || [] : PageList.concat(res.records || []))
77 77
       setHasNextPage(res.current < res.pages)
78 78
       setPull(false)

+ 3
- 1
src/pages/mine/tabData.js 파일 보기

@@ -1,7 +1,8 @@
1 1
 const MineMenuList = {
2 2
   User: [ // 普通用户
3 3
     [
4
-      { name: '推荐客户', icon: require('../../assets/mine-icon8.png'), router: '/pages/mine/addCustomer/index?type=customer' }
4
+      { name: '推荐客户', icon: require('../../assets/mine-icon8.png'), router: '/pages/mine/addCustomer/index?type=customer' },
5
+      { name: '成为驻场管理', icon: require('../../assets/mine-icon8.png'), router: '/pages/mine/toBeManager/index' }
5 6
     ],
6 7
     [
7 8
       { name: '我的分享', icon: require('../../assets/mine-icon9.png'), router: '/pages/mine/myShare/index' },
@@ -39,6 +40,7 @@ const MineMenuList = {
39 40
   Adviser: [ // 置业顾问
40 41
     [
41 42
       { name: '添加客户', icon: require('../../assets/mine-icon7.png'), router: '/pages/mine/addCustomer/index?type=consultant' },
43
+      { name: '成为驻场管理', icon: require('../../assets/mine-icon8.png'), router: '/pages/mine/toBeManager/index' },
42 44
       { name: '我的主页', icon: require('../../assets/mine-icon15.png'), router: '/pages/mine/myHomepage/index' },
43 45
       { name: '我的推广码', icon: require('../../assets/mine-icon14.png'), router: '' },
44 46
       { name: '客户分析', icon: require('../../assets/mine-icon5.png'), router: '/pages/mine/customerAnalyse/index' },

+ 3
- 0
src/pages/mine/toBeManager/index.config.js 파일 보기

@@ -0,0 +1,3 @@
1
+export default {
2
+  navigationBarTitleText: '成为驻场管理'
3
+}

+ 54
- 0
src/pages/mine/toBeManager/index.jsx 파일 보기

@@ -0,0 +1,54 @@
1
+import { useState } from 'react'
2
+import Taro from '@tarojs/taro'
3
+import withLayout from '@/layout'
4
+import { ScrollView, Input } from '@tarojs/components'
5
+import { fetch } from '@/utils/request'
6
+import { API_TOBE_MANAGER } from '@/constants/api'
7
+import login from '@/utils/login'
8
+import './index.scss'
9
+
10
+export default withLayout(() => {
11
+
12
+  const [Code, setCode] = useState('')
13
+
14
+  const ToSubmit = () => {
15
+    if (Code !== '') {
16
+      fetch({ url: API_TOBE_MANAGER, method: 'post', payload: { marketingCode: Code } }).then((res) => {
17
+        Taro.showToast({
18
+          title: '提交成功',
19
+          icon: 'none'
20
+        })
21
+        login({ path: '', scene: '' })
22
+      })
23
+    } else {
24
+      Taro.showToast({
25
+        title: '请输入楼盘码',
26
+        icon: 'none'
27
+      })
28
+    }
29
+  }
30
+
31
+  const CodeChange = (e) => {
32
+    setCode(e.detail.value)
33
+  }
34
+
35
+  return (
36
+    <view className='Page toBeManager'>
37
+
38
+      <ScrollView scroll-y>
39
+        <view className='PageContent'>
40
+
41
+          <view className='Input'>
42
+            <Input placeholder='请输入楼盘码' onInput={CodeChange}></Input>
43
+          </view>
44
+
45
+          <view className='Btn'>
46
+            <text onClick={ToSubmit}>提交</text>
47
+          </view>
48
+
49
+        </view>
50
+      </ScrollView>
51
+
52
+    </view>
53
+  )
54
+})

+ 44
- 0
src/pages/mine/toBeManager/index.scss 파일 보기

@@ -0,0 +1,44 @@
1
+.Page.toBeManager {
2
+  background: #fff;
3
+  height: 100vh;
4
+  width: 100%;
5
+  > scroll-view {
6
+    width: 100%;
7
+    height: 100%;
8
+    .PageContent {
9
+      position: relative;
10
+      overflow: hidden;
11
+      min-height: 100vh;
12
+      >.Input {
13
+        padding: 0 30px;
14
+        position: relative;
15
+        overflow: hidden;
16
+        margin-top: 30px;
17
+        >input {
18
+          display: block;
19
+          font-size: 28px;
20
+          line-height: 80px;
21
+          height: 80px;
22
+          text-indent: 20px;
23
+          border: 2px solid rgba(0, 0, 0, 0.08);
24
+          border-radius: 8px;
25
+        }
26
+      }
27
+      >.Btn {
28
+        padding: 40px;
29
+        position: relative;
30
+        overflow: hidden;
31
+        > text {
32
+          display: block;
33
+          text-align: center;
34
+          font-size: 32px;
35
+          line-height: 92px;
36
+          background: #193c83;
37
+          color: #fff;
38
+          font-weight: bold;
39
+          border-radius: 92px;
40
+        }
41
+      }
42
+    }
43
+  }
44
+}

+ 6
- 0
src/routes.js 파일 보기

@@ -259,6 +259,12 @@ const routes = [
259 259
     pkg: 'main',
260 260
     type: 'mine',
261 261
   },
262
+  {
263
+    name: '成为驻场管理',
264
+    page: 'pages/mine/toBeManager/index',
265
+    pkg: 'main',
266
+    type: 'mine',
267
+  },
262 268
   {
263 269
     name: '推荐客户',
264 270
     page: 'pages/mine/recommendUser/index',