1002884655 hace 3 años
padre
commit
b60297293b

+ 2
- 2
src/components/ProjectItemCard/index.jsx Ver fichero

@@ -42,7 +42,7 @@ export default (props) => {
42 42
       <view className='Views flex-h' onClick={() => goto(Data)}>
43 43
         <view className='flex-item'>
44 44
           <text className='iconfont icon-fenxiang'></text>
45
-          <text>{`${Data.shareList?.total || 0} 次分享`}</text>
45
+          <text>{`${Data.shareList?.total || 199} 次分享`}</text>
46 46
         </view>
47 47
         {
48 48
           (Data.uvList?.length || 0) > 0 && (
@@ -57,7 +57,7 @@ export default (props) => {
57 57
             </view>
58 58
           )
59 59
         }
60
-        <text>{`...${Data.uvList?.length || 0}人围观`}</text>
60
+        <text>{`...${Data.uvList?.length || 199}人围观`}</text>
61 61
       </view>
62 62
       {props.children}
63 63
     </view>

+ 2
- 2
src/components/ShareModal/index.jsx Ver fichero

@@ -4,7 +4,7 @@ import { Button } from '@tarojs/components'
4 4
 import './style.scss'
5 5
 
6 6
 export default (props) => {
7
-  const { visible = false } = props
7
+  const { visible = false, Cancel = () => {} } = props
8 8
 
9 9
   const shareTimeline = () => {
10 10
     Taro.showToast({
@@ -29,7 +29,7 @@ export default (props) => {
29 29
               <text>好友或群</text>
30 30
             </Button>
31 31
           </view>
32
-          <text>取消</text>
32
+          <text onClick={Cancel}>取消</text>
33 33
         </view>
34 34
       </view>
35 35
     </view>

+ 7
- 3
src/pages/index/activityDetail/index.jsx Ver fichero

@@ -12,6 +12,7 @@ import {
12 12
   Button
13 13
 } from '@tarojs/components';
14 14
 import Disclaimer from '@/components/Disclaimer';
15
+import ShareToCircle from '@/components/ShareToCircle'
15 16
 import { useSelector } from 'react-redux';
16 17
 import {
17 18
   signupActivity,
@@ -63,6 +64,8 @@ export default withLayout((props) => {
63 64
   const [selectorChecked, setSelectorChecked] = useState('1');
64 65
   const [selector, setSelector] = useState('');
65 66
 
67
+  const [ShowShareLayer, setShowShareLayer] = useState(false)
68
+
66 69
   const buildingId = detail?.buildingId;
67 70
 
68 71
   const [btnText, btnDisabled] = useStatus(detail)
@@ -201,8 +204,8 @@ export default withLayout((props) => {
201 204
             <view className='flex-item'>
202 205
               <text>{detail.address}</text>
203 206
             </view>
204
-            <text className='Price'>{detail.groupBuyPrice || '价格待定'}</text>
205 207
           </view>
208
+          <text className='Price'>{detail.groupBuyPrice || '价格待定'}</text>
206 209
           <text className='Time'>时间:{formatDate(detail.startDate, 'yyyy/M/d')} - {formatDate(detail.endDate, 'yyyy/M/d')}</text>
207 210
         </view>
208 211
         <view className='Option'>
@@ -211,8 +214,8 @@ export default withLayout((props) => {
211 214
             <text>分享</text>
212 215
             <Button open-type='share' className='ShareBtn'>分享</Button>
213 216
           </view>
214
-          <view>
215
-            <text className='iconfont icon-pengyouquan1'></text>
217
+          <view onClick={() => { setShowShareLayer(true) }}>
218
+            <text className='iconfont icon-pengyouquan1' style='font-size: 32rpx'></text>
216 219
             <text>朋友圈</text>
217 220
           </view>
218 221
         </view>
@@ -239,6 +242,7 @@ export default withLayout((props) => {
239 242
     <>
240 243
       {detail && (
241 244
         <view className='Page activityDetail flex-v'>
245
+          <ShareToCircle visible={ShowShareLayer} close={() => { setShowShareLayer(false) }}></ShareToCircle>
242 246
           <view className='flex-item'>
243 247
             <view>
244 248
               <ScrollView scroll-y>

+ 8
- 7
src/pages/index/activityDetail/index.scss Ver fichero

@@ -68,13 +68,14 @@
68 68
                       line-height: 1.1;
69 69
                     }
70 70
                   }
71
-                  >.Price {
72
-                    font-size: 26px;
73
-                    font-weight: bold;
74
-                    color: #FF0000;
75
-                    margin-left: 30px;
76
-                    line-height: 1.1;
77
-                  }
71
+                }
72
+                >.Price {
73
+                  font-size: 26px;
74
+                  font-weight: bold;
75
+                  color: #FF0000;
76
+                  line-height: 1.1;
77
+                  display: block;
78
+                  margin-top: 10px;
78 79
                 }
79 80
                 >.Time {
80 81
                   display: block;

+ 4
- 4
src/pages/index/addedValueService/formData.js Ver fichero

@@ -55,7 +55,7 @@ const questions = [
55 55
     question: '你较为看重家装的哪些方面?',
56 56
     key: 'important',
57 57
     type: 'checkboxs',
58
-    result: '',
58
+    result: [],
59 59
     resultId: null,
60 60
     options: [
61 61
       { name: '家装价格', id: 1, selected: false },
@@ -70,7 +70,7 @@ const questions = [
70 70
     question: '你理想的家装风格是哪些?',
71 71
     key: 'style',
72 72
     type: 'checkboxs',
73
-    result: '',
73
+    result: [],
74 74
     resultId: null,
75 75
     options: [
76 76
       { name: '北欧风格', id: 1, selected: false },
@@ -90,7 +90,7 @@ const questions = [
90 90
     question: '你最关键的家装诉求是什么?',
91 91
     key: 'mostImportant',
92 92
     type: 'checkboxs',
93
-    result: '',
93
+    result: [],
94 94
     resultId: null,
95 95
     options: [
96 96
       { name: '设计凸显个性', id: 1, selected: false },
@@ -106,7 +106,7 @@ const questions = [
106 106
     question: '你理想中的家应该包含哪些特殊功能区域?',
107 107
     key: 'special',
108 108
     type: 'checkboxs',
109
-    result: '',
109
+    result: [],
110 110
     resultId: null,
111 111
     options: [
112 112
       { name: '衣帽间', id: 1, selected: false },

+ 2
- 2
src/pages/index/findHouseFromMap/index.jsx Ver fichero

@@ -178,7 +178,7 @@ export default withLayout((props) => {
178 178
             <view className='Views flex-h'>
179 179
               <view className='flex-item'>
180 180
                 <text className='iconfont icon-fenxiang'></text>
181
-                <text>{`${current.shareNum || 0}次分享`}</text>
181
+                <text>{`${current.shareNum || 199}次分享`}</text>
182 182
               </view>
183 183
               <view className='Icons'>
184 184
                 {
@@ -189,7 +189,7 @@ export default withLayout((props) => {
189 189
                   ))
190 190
                 }
191 191
               </view>
192
-              <text>{(current.uvList?.records || []).length > 0 ? '...' : ''}{`${current.pvNum}人围观`}</text>
192
+              <text>{(current.uvList?.records || []).length > 0 ? '...' : ''}{`${current.pvNum || 199}人围观`}</text>
193 193
             </view>
194 194
           </view>
195 195
         </view>

+ 2
- 2
src/pages/index/specialPriceHouse/index.jsx Ver fichero

@@ -122,7 +122,7 @@ export default withLayout((props) => {
122 122
                       <view className='Views flex-h' onClick={() => goto(item)}>
123 123
                         <view className='flex-item'>
124 124
                           <text className='iconfont icon-fenxiang'></text>
125
-                          <text>{`${shareNum} 次分享`}</text>
125
+                          <text>{`${shareNum || 199} 次分享`}</text>
126 126
                         </view>
127 127
                         {
128 128
                           uvNum > 0 && (
@@ -137,7 +137,7 @@ export default withLayout((props) => {
137 137
                             </view>
138 138
                           )
139 139
                         }
140
-                        <text>{`...${uvNum}人围观`}</text>
140
+                        <text>{`...${uvNum || 199}人围观`}</text>
141 141
                       </view>
142 142
                       <view className='SpecialList'>
143 143
                         <ScrollView scrollX>

+ 1
- 1
src/pages/mine/components/UserDetailFollowRecord/index.jsx Ver fichero

@@ -28,7 +28,7 @@ export default function UserDetailFollowRecord (props) {
28 28
 
29 29
   const GetPageList = () => {
30 30
     setHasNextPage(false)
31
-    fetch({ url: API_FOLLOW_LIST, method: 'get', payload: { pageNumber, pageSize: 10, customerId: CustomerId } }).then((res) => {
31
+    fetch({ url: API_FOLLOW_LIST, method: 'get', payload: { pageNumber, pageSize: 10, customerId: CustomerId, recordType: '跟进' } }).then((res) => {
32 32
       setPageList(pageNumber === 1 ? res.records || [] : PageList.concat(res.records || []))
33 33
       setHasNextPage(res.current < res.pages)
34 34
       setPull(false)

+ 1
- 3
src/pages/mine/customerDetail/index.jsx Ver fichero

@@ -33,9 +33,7 @@ export default withLayout((props) => {
33 33
 
34 34
   const UpdateCustomerInfo = () => {
35 35
     fetch({ url: `${API_GET_CUSTOMER_INFO}/${CustomerId}` }).then((res) => {
36
-      if (res) {
37
-        setCustomerInfo(res)
38
-      }
36
+      setCustomerInfo(res || {})
39 37
     })
40 38
   }
41 39
 

+ 1
- 1
src/pages/mine/index.jsx Ver fichero

@@ -30,7 +30,7 @@ export default withLayout(() => {
30 30
     setShowLogin(false)
31 31
     if (user?.userInfo?.person?.personId) {
32 32
       const person = user.userInfo.person
33
-      setUserRole(person.personType === ROLE_CODE.CUSTOMER ? 1 : person.personType === ROLE_CODE.CHANNEL_AGENT ? 2 : person.personType === ROLE_CODE.CONSULTANT ? 3 : 4)
33
+      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)
34 34
     }
35 35
   }, [user])
36 36
 

+ 19
- 7
src/subpackages/pages/consultant/myHomepage/index.jsx Ver fichero

@@ -5,14 +5,15 @@ import { ScrollView, Image } from '@tarojs/components'
5 5
 import ProjectListItem from '@/components/ProjectListItem/index'
6 6
 import { useSelector } from 'react-redux'
7 7
 import { fetch } from '@/utils/request'
8
-import { API_AGENT_CURRENT, API_ITEMS_DETAIL, API_QUERY_USERINFO_BYID } from '@/constants/api'
8
+import { API_AGENT_CURRENT, API_ITEMS_DETAIL, API_CARDS_LIST } from '@/constants/api'
9 9
 import { getImgURL } from '@/utils/image'
10
+import useLike from "@/utils/hooks/useLike";
10 11
 import '@/assets/css/iconfont.css'
11 12
 import './index.scss'
12 13
 
13 14
 export default withLayout((props) => {
14 15
 
15
-  const { router } = props
16
+  const { router, trackData } = props
16 17
   const { id } = router.params
17 18
   
18 19
   const [IsPull, setPull] = useState(false)
@@ -24,10 +25,15 @@ export default withLayout((props) => {
24 25
   const user = useSelector(state => state.user)
25 26
   const [PersonId, setPersonId] = useState(null)
26 27
 
28
+  const [isSave, handleFavor] = useLike(BuildingInfo?.isSave, {
29
+    id,
30
+    ...trackData,
31
+  });
32
+
27 33
   useEffect(() => {
28 34
     if (PersonId !== user.userInfo.person.personId) {
29 35
       if(id) {
30
-        fetch({ url: `${API_QUERY_USERINFO_BYID}/${id}`, method: 'get' }).then((res) => {
36
+        fetch({ url: `${API_CARDS_LIST}/${id}`, method: 'get' }).then((res) => {
31 37
           setUserInfo(res)
32 38
         })
33 39
       } else {
@@ -93,8 +99,8 @@ export default withLayout((props) => {
93 99
                   <view className='flex-item'>
94 100
                     <text>{UserInfo.nickname} {UserInfo.phone}</text>
95 101
                   </view>
96
-                  <text className='iconfont icon-dianzan'></text>
97
-                  <text onClick={Liked}>{UserInfo.likeNum || 0}赞</text>
102
+                  <text onClick={handleFavor} className='iconfont icon-dianzan' style={isSave ? { color: 'red' } : undefined}></text>
103
+                  <text onClick={handleFavor}>{UserInfo.likeNum || 0}{isSave ? `已点赞` : '赞'}</text>
98 104
                 </view>
99 105
                 <view className='Tag'>
100 106
                   <view>
@@ -149,13 +155,19 @@ export default withLayout((props) => {
149 155
                 <text>{UserInfo.address || '暂无地址'}</text>
150 156
               </view>
151 157
             </view>
158
+            <view className='flex-h'>
159
+              <text>简介:</text>
160
+              <view className='flex-item'>
161
+                <text className='active'>{UserInfo.description || '暂无简介'}</text>
162
+              </view>
163
+            </view>
152 164
             <view className='Btn'>
153 165
               <text>分享主页</text>
154 166
             </view>
155 167
           </view>
156 168
 
157 169
           {
158
-            BuildingInfo.buildingId &&
170
+            !!BuildingInfo.buildingId &&
159 171
             <view className='ProjectList'>
160 172
               <view className='flex-h'>
161 173
                 <view className='flex-item'>
@@ -165,7 +177,7 @@ export default withLayout((props) => {
165 177
                 <text className='iconfont icon-jiantouright'></text>
166 178
               </view>
167 179
               <view className='List'>
168
-                <ProjectListItem data={BuildingInfo}></ProjectListItem>
180
+                <ProjectListItem Data={BuildingInfo}></ProjectListItem>
169 181
               </view>
170 182
             </view>
171 183
           }

+ 6
- 1
src/subpackages/pages/consultant/myHomepage/index.scss Ver fichero

@@ -177,7 +177,7 @@
177 177
             font-weight: bold;
178 178
           }
179 179
           > .flex-h {
180
-            align-items: center;
180
+            align-items: flex-start;
181 181
             margin-top: 30px;
182 182
             > text {
183 183
               font-size: 30px;
@@ -199,6 +199,11 @@
199 199
                 white-space: nowrap;
200 200
                 overflow: hidden;
201 201
                 text-overflow: ellipsis;
202
+                &.active {
203
+                  white-space: normal;
204
+                  text-overflow: initial;
205
+                  word-break: break-all;
206
+                }
202 207
               }
203 208
             }
204 209
           }