1002884655 пре 3 година
родитељ
комит
7a10932cf0

+ 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://xlj.newlandsh.com"',
6
+    HOST: '"https://xlk.njyz.tech"',
7
+    // HOST: '"https://xlj.newlandsh.com"',
8 8
     // HOST: '"http://127.0.0.1:8081"',
9 9
     WSS_HOST: '"wss://xlk.njyz.tech"',
10 10
     OSS_PATH: '"https://xlk-assets.oss-accelerate.aliyuncs.com/"',

+ 1
- 1
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,

+ 19
- 7
src/pages/index/buildingDetail/components/News/index.jsx Прегледај датотеку

@@ -47,14 +47,26 @@ export default function News (props) {
47 47
 
48 48
       <view className='List flex-h'>
49 49
         {
50
-          NewsList.map((item, index) => (
51
-            <view className='flex-item' key={`ListItem-${index}`} onClick={() => gotoDetail(item)}>
52
-              <view className='Img' style={{display: item.newsImg || item.newsName ? 'block' : 'none'}}>
53
-                <Image mode='aspectFill' src={getImgURL(item.newsImg)} className='centerLabel'></Image>
54
-              </view>
55
-              <text className='Title'>{item.newsName}</text>
50
+          NewsList.length > 0 &&
51
+          <view className='flex-item' onClick={() => gotoDetail(NewsList[0])}>
52
+            <view className='Img' style={{display: NewsList[0].newsImg || NewsList[0].newsName ? 'block' : 'none'}}>
53
+              <Image mode='aspectFill' src={getImgURL(NewsList[0].newsImg)} className='centerLabel'></Image>
56 54
             </view>
57
-          ))
55
+            <text className='Title'>{NewsList[0].newsName}</text>
56
+          </view>
57
+        }
58
+        {
59
+          NewsList.length > 1 &&
60
+          <view className='flex-item' onClick={() => gotoDetail(NewsList[1])}>
61
+            <view className='Img' style={{display: NewsList[1].newsImg || NewsList[1].newsName ? 'block' : 'none'}}>
62
+              <Image mode='aspectFill' src={getImgURL(NewsList[1].newsImg)} className='centerLabel'></Image>
63
+            </view>
64
+            <text className='Title'>{NewsList[1].newsName}</text>
65
+          </view>
66
+        }
67
+        {
68
+          NewsList.length === 1 &&
69
+          <view className='flex-item'></view>
58 70
         }
59 71
       </view>
60 72
 

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

@@ -40,7 +40,7 @@ export default withLayout((props) => {
40 40
               <view className="Info">
41 41
                 <view>
42 42
                   <text className="Title">
43
-                    {data.title} {data.subtitle}
43
+                    {data.title}
44 44
                   </text>
45 45
                   <view>
46 46
                   <text>阅读:{data.pvNum}</text>

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

@@ -43,7 +43,7 @@ const EncyItem = (props) => {
43 43
               });
44 44
             }}
45 45
           >
46
-            <text className="Name">{subItem.title}</text>
46
+            <text className="Name">{subItem.subtitle}</text>
47 47
             {subItem.isHot === 1 && (
48 48
               <text className="Tips" style={{ background: "#FF0000" }}>
49 49
                 {/* {subItem.tips} */}

+ 8
- 1
src/pages/mine/myRecommendCode/index.jsx Прегледај датотеку

@@ -41,6 +41,13 @@ export default withLayout((props) => {
41 41
     })
42 42
   }
43 43
 
44
+  const PreviewImage = () => {
45
+    Taro.previewImage({
46
+      current: QrCodeUrl,
47
+      urls: [QrCodeUrl]
48
+    })
49
+  }
50
+
44 51
   return (
45 52
     <view className='Page myRecommendCode'>
46 53
       <view className='CodeContent'>
@@ -51,7 +58,7 @@ export default withLayout((props) => {
51 58
             </view>
52 59
             <text>{person?.name}</text>
53 60
           </view>
54
-          <Image mode='widthFix' src={QrCodeUrl}></Image>
61
+          <Image mode='widthFix' src={QrCodeUrl} onClick={PreviewImage}></Image>
55 62
           <text>扫一扫上面的二维码图案,成为我的客户</text>
56 63
         </view>
57 64
       </view>

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

@@ -17,7 +17,7 @@ export default withLayout(() => {
17 17
     if (Code !== '') {
18 18
       fetch({ url: `${API_REGISTER_AGENT}?channelCode=${Code}`, method: 'put' }).then(() => {
19 19
         Taro.showToast({ title: '绑定成功', icon: 'none', duration: 2000 })
20
-        dispatch({ type: UPDATE_USER_INFO, payload: { personType: 'estate agent' } })
20
+        dispatch({ type: UPDATE_USER_INFO, payload: { personType: 'channel agent' } })
21 21
         setTimeout(() => {
22 22
           Taro.navigateBack({ delta: 1 })
23 23
         }, 2000)

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

@@ -2,7 +2,7 @@ import { useState, useEffect } from 'react'
2 2
 import Taro from '@tarojs/taro'
3 3
 import { useSelector } from 'react-redux'
4 4
 import withLayout from '@/layout'
5
-import { ScrollView, Input, Image } from '@tarojs/components'
5
+import { ScrollView, Input, Image, Block, Textarea } from '@tarojs/components'
6 6
 import { getImgURL } from '@/utils/image'
7 7
 import { fetch, uploadFiles } from '@/utils/request'
8 8
 import { UPDATE_USER_INFO, ROLE_CODE } from '@/constants/user'
@@ -20,28 +20,35 @@ export default withLayout(() => {
20 20
   const [UserRole, setUserRole] = useState(null) // 1-普通用户 2-经纪人 3-置业顾问 4-驻场管理
21 21
   const [FormData, setFormData] = useState({
22 22
     name: '',
23
-    phone: ''
23
+    phone: '',
24
+    description: ''
24 25
   })
25 26
 
26 27
   useEffect(() => {
27 28
     if (user?.userInfo?.person?.personId) {
28 29
       const person = user.userInfo.person
29
-      setUserRole(person.personType === ROLE_CODE.CUSTOMER || person.personType === ROLE_CODE.DRIFT ? 1 : person.personType === ROLE_CODE.CHANNEL_AGENT ? 2 : person.personType === ROLE_CODE.CONSULTANT ? 3 : 4)
30
+      setUserRole(person.personType === ROLE_CODE.CHANNEL_AGENT ? 2 : person.personType === ROLE_CODE.CONSULTANT ? 3 : person.personType === ROLE_CODE.MARKETING ? 4 : 1)
30 31
     }
31 32
   }, [user])
32 33
 
33 34
   useEffect(() => {
34 35
     setUserInfo(user?.userInfo?.person)
35
-    setFormData({ name: user?.userInfo?.person.name, phone: user?.userInfo?.person.phone })
36
+    setFormData({ name: user?.userInfo?.person.name, phone: user?.userInfo?.person.phone, description: user?.userInfo?.person.description })
36 37
   }, [user])
37 38
 
38 39
   const Save = () => {
39
-    fetch({ url: `${API_EDIT_AGENT}?name=${FormData.name}&phone=${FormData.phone}`, method: 'put' }).then(() => {
40
+    let params = ''
41
+    if(UserRole === 3) {
42
+      params = `name=${FormData.name}&phone=${FormData.phone}&description=${FormData.description}`
43
+    } else {
44
+      params = `name=${FormData.name}&phone=${FormData.phone}`
45
+    }
46
+    fetch({ url: `${API_EDIT_AGENT}?${params}`, method: 'put' }).then(() => {
40 47
       Taro.showToast({
41 48
         title: '修改成功',
42 49
         icon: 'none'
43 50
       })
44
-      dispatch({ type: UPDATE_USER_INFO, payload: { name: FormData.name, phone: FormData.phone } })
51
+      dispatch({ type: UPDATE_USER_INFO, payload: { name: FormData.name, phone: FormData.phone, description: FormData.description } })
45 52
       // login({ path: '', scene: '' })
46 53
     })
47 54
   }
@@ -53,7 +60,7 @@ export default withLayout(() => {
53 60
   }
54 61
 
55 62
   const ToUploadImg = () => {
56
-    if(UserRole - 0 === 3) {
63
+    if (UserRole - 0 === 3) {
57 64
       Taro.chooseImage({
58 65
         count: 1,
59 66
         success: function (res) {
@@ -102,6 +109,18 @@ export default withLayout(() => {
102 109
             </view>
103 110
           </view>
104 111
 
112
+          {
113
+            true &&
114
+            <Block>
115
+              <text>简介</text>
116
+              <view className='FormLine flex-h'>
117
+                <view className='flex-item'>
118
+                  <Textarea auto-height placeholder='请输入简介' value={FormData.description} onInput={FormChange.bind(this, 'description')} />
119
+                </view>
120
+              </view>
121
+            </Block>
122
+          }
123
+
105 124
         </view>
106 125
 
107 126
         <view className='Btn'>

+ 5
- 0
src/pages/mine/userInfo/index.scss Прегледај датотеку

@@ -45,6 +45,11 @@
45 45
             line-height: 40px;
46 46
             height: 40px;
47 47
           }
48
+          >textarea {
49
+            font-size: 26px;
50
+            display: block;
51
+            width: 100%;
52
+          }
48 53
           >text {
49 54
             display: block;
50 55
             width: 100%;