index.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868
  1. <template>
  2. <view class="page u-skeleton">
  3. <wm-watermark :text="userInfo.phone" :num="50"></wm-watermark>
  4. <!-- 经纪人信息卡片 -->
  5. <view class="userinfo-wrap u-skeleton-fillet box-shadow">
  6. <!-- 个人信息 -->
  7. <view class="userinfo">
  8. <view class="user">
  9. <view class="avatar-wrap" @click="pageTo('/pages/user/setting/avatar')">
  10. <u-avatar
  11. class="u-skeleton-circle"
  12. :src="userInfo.avatar"
  13. size="128"
  14. mode="circle"
  15. ></u-avatar>
  16. <!-- :show-level="true" -->
  17. <view class="avatar-bg box-shadow"></view>
  18. </view>
  19. <view class="info">
  20. <view class="nickname u-skeleton-rect">
  21. {{userInfo.user_id ? userInfo.nickname ? `${userInfo.nickname}(${userInfo.dept_code})` : '未设置用户名' : '未登录'}}
  22. </view>
  23. </view>
  24. <image v-if="userInfo && userInfo.manage_type == 2" src="/static/index/i_c_1.png" class="scoped-scan-img" @click="scanHandle"></image>
  25. </view>
  26. <u-button
  27. v-if="!userInfo.user_id"
  28. class="u-skeleton-fillet"
  29. size="mini"
  30. type="primary"
  31. @click="pageTo('/pages/user/login/login')"
  32. :customStyle="{ margin: 0 }"
  33. >
  34. 立即登录
  35. </u-button>
  36. <view
  37. v-if="userInfo.user_id" style="padding: 20rpx 30rpx" @click="pageTo('/pages/user/setting/setting')">
  38. <u-icon name="/static/index/i_c_2.png" size="40"></u-icon>
  39. </view>
  40. </view>
  41. <u-line length="650rpx" margin="30rpx 0 0"></u-line>
  42. <!-- 数据信息 -->
  43. <view class="datainfo">
  44. <view class="data-item" @click="pageTo('/pages/agent/recommend/list?filterStepStatus=1')">
  45. <view class="data u-skeleton-fillet">{{reportStepCountObj['1'] || 0}}</view>
  46. <view class="item u-skeleton-fillet">未到访</view>
  47. </view>
  48. <view class="data-item" @click="pageTo('/pages/agent/recommend/list?filterStepStatus=2')">
  49. <view class="data u-skeleton-fillet">{{reportStepCountObj['2'] || 0}}</view>
  50. <view class="item u-skeleton-fillet">已到访</view>
  51. </view>
  52. <view class="data-item" @click="pageTo('/pages/agent/recommend/list?filterStepStatus=3')">
  53. <view class="data u-skeleton-fillet">{{reportStepCountObj['3'] || 0}}</view>
  54. <view class="item u-skeleton-fillet">已认购</view>
  55. </view>
  56. <view class="data-item" @click="pageTo('/pages/agent/recommend/list?filterStepStatus=4')">
  57. <view class="data u-skeleton-fillet">
  58. {{reportStepCountObj['4'] || 0}}
  59. </view>
  60. <view class="item u-skeleton-fillet">已签约</view>
  61. </view>
  62. <view class="data-item" @click="pageTo('/pages/agent/recommend/list?filterStepStatus=5')">
  63. <view class="data u-skeleton-fillet">{{reportStepCountObj['5'] || 0}}</view>
  64. <view class="item u-skeleton-fillet">已结佣</view>
  65. </view>
  66. </view>
  67. </view>
  68. <!-- 功能卡片 -->
  69. <view class="scoped-entry">
  70. <view class="op" @click="pageTo('/pages/agent/recommend/create')">
  71. <u-image src="/static/index/i_e_1.png" mode="heightFix" height="146rpx" class="icon"></u-image>
  72. </view>
  73. <view class="op" @click="pageTo('/pages/agent/recommend/list')">
  74. <u-image src="/static/index/i_e_2.png" mode="heightFix" height="146rpx" class="icon"></u-image>
  75. </view>
  76. <view class="op" @click="pageTo('/pages/cust/list')">
  77. <u-image src="/static/index/i_e_3.png" mode="heightFix" height="146rpx" class="icon"></u-image>
  78. </view>
  79. <view class="op" @click="commonRulesShow = true">
  80. <u-image src="/static/index/i_e_4.png" mode="heightFix" height="146rpx" class="icon"></u-image>
  81. </view>
  82. <view v-if="curRoles == 1 || curRoles == 5 || curRoles == 6" class="op" @click="pageTo('/pages/saler/check')">
  83. <u-image src="/static/index/i_e_4c.png" mode="heightFix" height="146rpx" class="icon"></u-image>
  84. </view>
  85. <view v-if="curRoles == 6" class="op" @click="pageTo('/pages/saler/list')">
  86. <u-image src="/static/index/i_e_4s.png" mode="heightFix" height="146rpx" class="icon"></u-image>
  87. </view>
  88. </view>
  89. <!-- <view class="function-card-wrap">
  90. <view class="col-card-wrap">
  91. <view class="function-card box-shadow u-skeleton-fillet" @click="pageTo('/pages/agent/recommend/create')">
  92. <view class="title-wrap">
  93. <view class="main-title">
  94. <u-icon class="u-m-r-5" name="/static/icon/thump-up.png" size="32"></u-icon>
  95. ️我要推荐
  96. </view>
  97. <view class="sub-title u-line-1">Recommend</view>
  98. </view>
  99. <u-image src="/static/icon/wenli1.png" mode="heightFix" height="144rpx" class="icon"></u-image>
  100. </view>
  101. <view class="function-card box-shadow u-skeleton-fillet" @click="pageTo('/pages/agent/recommend/list')">
  102. <view class="title-wrap">
  103. <view class="main-title">
  104. <u-icon class="u-m-r-5" name="/static/icon/money.png" size="32"></u-icon>
  105. 报备管理
  106. </view>
  107. <view class="sub-title u-line-1">Filing</view>
  108. </view>
  109. <u-image src="/static/icon/wenli2.png" mode="heightFix" height="144rpx" class="icon"></u-image>
  110. </view>
  111. </view>
  112. <view class="col-card-wrap">
  113. <view class="function-card box-shadow u-skeleton-fillet" @click="pageTo('/pages/cust/list')">
  114. <view class="title-wrap">
  115. <view class="main-title">
  116. <u-icon class="u-m-r-5" name="/static/icon/customer.png" size="32"></u-icon>
  117. 客户管理
  118. </view>
  119. <view class="sub-title u-line-1">Customer</view>
  120. </view>
  121. <u-image src="/static/icon/wenli3.png" mode="heightFix" height="144rpx" class="icon"></u-image>
  122. </view>
  123. <view class="function-card box-shadow u-skeleton-fillet" @click="commonRulesShow = true">
  124. <view class="title-wrap">
  125. <view class="main-title">
  126. <u-icon class="u-m-r-5" name="/static/icon/book.png" size="32"></u-icon>
  127. 奖励政策
  128. </view>
  129. <view class="sub-title u-line-1">Rules</view>
  130. </view>
  131. <u-image src="/static/icon/wenli4.png" mode="heightFix" height="144rpx" class="icon"></u-image>
  132. </view>
  133. </view>
  134. </view> -->
  135. <!-- 项目卡片 -->
  136. <view class="card-list-wrap box-shadow u-m-b-20">
  137. <view class="header-title-warp">
  138. <view class="title u-skeleton-rect">
  139. <u-icon class="u-m-r-10" name="/static/index/i_c_3.png" size="36"></u-icon>
  140. 热销推荐
  141. </view>
  142. <!-- <view v-show="propertyList.length > 5" class="more u-skeleton-rect">
  143. 更多
  144. <u-icon name="arrow-right"></u-icon>
  145. </view> -->
  146. <view class="more u-skeleton-rect" @click="this.isOneRow = !this.isOneRow">{{isOneRow ? '切换至双行' : '切换至单行'}}</view>
  147. </view>
  148. <view v-if="propertyList.length == 0" class="u-m-t-40 u-m-b-40"><u-empty mode="list" text="暂无在售房源"></u-empty></view>
  149. <view class="scoped-list-one" v-for="(item, one) in twoObj" :key="one">
  150. <view class="slo-title">{{item.str}}</view>
  151. <view :class="isOneRow ? 'property-row-wrap' : 'property-col-wrap'">
  152. <view class="property-body u-skeleton-fillet box-shadow" v-for="(item, index) in item.list" :key="index" @click="showDetail(index, item)">
  153. <view class="image-wrap">
  154. <text class="tag u-skeleton-rect">{{ item.estate_tag }}</text>
  155. <image class="u-skeleton-rect" :src="item.pri_image" mode="aspectFill"></image>
  156. </view>
  157. <view class="property-info-wrap">
  158. <view class="title u-skeleton-rect">{{ item.estate_name }}
  159. <text class="s">{{areaTypeObj[item.area_type]}}</text>
  160. </view>
  161. <view class="commission u-skeleton-rect" v-if="userInfo.auth_state == 1">预计奖励:{{ item.brokerage }}</view>
  162. </view>
  163. </view>
  164. </view>
  165. </view>
  166. </view>
  167. <!-- 平台佣金政策弹窗 -->
  168. <u-popup v-model="commonRulesShow" mode="center" width="80%" height="800rpx" border-radius="20" closeable>
  169. <view class="bwin-popup">
  170. <view class="popup-header">平台佣金政策</view>
  171. <view class="popup-body">需上传身份证、银行卡进行实名认证,认证通过后方可报备客户和获得佣金,各楼盘相关带看规则和佣金政策点击下方对应楼盘<!-- <u-parse :html="xxxxxxxxxx"></u-parse> --></view>
  172. </view>
  173. </u-popup>
  174. <!-- 项目佣金政策信息弹窗 -->
  175. <u-popup v-model="propertyPopupShow" mode="center" width="80%" height="90%" border-radius="20" closeable>
  176. <view class="bwin-popup">
  177. <view class="popup-header">{{ currentPropertyObj.estate_name + '介绍' }}</view>
  178. <view class="popup-body">
  179. <view class="scoped-popup-more" @click="oneImgHandle(currentPropertyObj)">
  180. <u-image src="/static/index/popup_bg_more.png" mode="heightFix" height="118rpx" class="icon"></u-image>
  181. </view>
  182. <u-parse :html="currentPropertyObj.introduce"></u-parse>
  183. <u-divider marginTop="20" marginBottom="20">详情</u-divider>
  184. <view class="property-info">
  185. <!-- <view class="item">
  186. <view class="item-title">基本情况:</view>
  187. <view class="item-info" style="text-decoration: underline;color: #2080f0;">点击查看楼盘一页纸</view>
  188. </view> -->
  189. <view class="item" v-if="userInfo.auth_state == 1">
  190. <view class="item-title">预计奖励:</view>
  191. <view class="item-info" style="color: red;font-weight: bold;">{{ currentPropertyObj.brokerage }}</view>
  192. </view>
  193. <view class="item">
  194. <view class="item-title">营销中心:</view>
  195. <view class="item-info">{{ currentPropertyObj.address }}</view>
  196. </view>
  197. <view class="item">
  198. <view class="item-title">销售热线:</view>
  199. <view class="item-info">{{ currentPropertyObj.marketing_phone || '00000000' }}</view>
  200. </view>
  201. <view class="item">
  202. <view class="item-title">带看需收集:</view>
  203. <view class="item-info">{{ currentPropertyObj.report_visit }}</view>
  204. </view>
  205. <view class="item">
  206. <view class="item-title">报备保护期:</view>
  207. <view class="item-info">{{ currentPropertyObj.report_lock + '天' }}</view>
  208. </view>
  209. <view class="item">
  210. <view class="item-title">带看保护期:</view>
  211. <view class="item-info">{{ currentPropertyObj.lead_lock + '天' }}</view>
  212. </view>
  213. </view>
  214. <u-divider marginTop="20" marginBottom="20">更多</u-divider>
  215. <view class="scoped-estate-desc">
  216. <!-- <view v-html="curHtml"></view> -->
  217. <rich-text :nodes="curHtml | filtersRichText"></rich-text>
  218. </view>
  219. </view>
  220. </view>
  221. </u-popup>
  222. <!-- 骨架屏 -->
  223. <u-skeleton :loading="skeletonLoading" animation></u-skeleton>
  224. <backTop :src="backTop.src" :scrollTop="backTop.scrollTop"></backTop>
  225. </view>
  226. </template>
  227. <script>
  228. var that;
  229. import { arrToObj } from '@/utils'
  230. import backTop from '@/components/back-top/back-top.vue'
  231. import wmWatermark from '@/components/wm-watermark/wm-watermark.vue'
  232. export default {
  233. components: {
  234. backTop,
  235. wmWatermark
  236. },
  237. filters: {
  238. filtersRichText(html) { //控制小程序中图片大小
  239. let newContent = html.replace(/<img[^>]*>/gi, (match, capture)=>{
  240. match = match.replace(/style="[^"]+"/gi, '').replace(/style='[^']+'/gi, '');
  241. match = match.replace(/width="[^"]+"/gi, '').replace(/width='[^']+'/gi, '');
  242. match = match.replace(/height="[^"]+"/gi, '').replace(/height='[^']+'/gi, '');
  243. return match;
  244. });
  245. newContent = newContent.replace(/style="[^"]+"/gi, (match, capture)=>{
  246. match = match.replace(/width:[^;]+;/gi, 'max-width:100%;').replace(/width:[^;]+;/gi, 'max-width:100%;');
  247. return match;
  248. });
  249. newContent = newContent.replace(/<br[^>]*\/>/gi, '');
  250. newContent = newContent.replace(/\<img/gi,
  251. '<img style="max-width:100%;height:auto;display:inline-block;margin:10rpx auto;"');
  252. return newContent;
  253. }
  254. },
  255. data() {
  256. // 页面数据变量
  257. return {
  258. curRoles: '',
  259. isOneRow: false,
  260. curHtml: '',
  261. backTop: {
  262. src: '../../static/back-top/top.png',
  263. scrollTop: 0
  264. },
  265. userInfo: {},
  266. skeletonLoading: true,
  267. agentTypeList: ['', '自由经纪人', '渠道经纪人', '老业主'],
  268. propertyList: [
  269. {
  270. estate_name: '在售项目1',
  271. pri_image: 'https://zdcdn.2bwin.cn/uploads/20220501/af6eb9c2a5d462be10a15c2302e5e6b5.jpg',
  272. sale_tag: '刚需好盘',
  273. rulesInfo: {
  274. des: '内容加载中1....',
  275. des_content: '内容加载中2....'
  276. }
  277. },
  278. ],
  279. commonRulesShow: false,
  280. propertyPopupShow: false,
  281. currentPropertyIndex: 0,
  282. currentPropertyObj: {},
  283. // init请求返回的数据
  284. data: {},
  285. // 表单请求数据
  286. form1: {},
  287. scrollTop: 0,
  288. reportStepCountObj: {},
  289. areaTypeObj: {},
  290. twoObj: {},
  291. };
  292. },
  293. onPageScroll(e) {
  294. this.scrollTop = e.scrollTop;
  295. this.backTop.scrollTop = e.scrollTop;
  296. },
  297. // 监听 - 页面每次【加载时】执行(如:前进)
  298. onLoad(options = {}) {
  299. // that = this;
  300. // this.options = options;
  301. // this.init(options);
  302. },
  303. // 监听 - 页面【首次渲染完成时】执行。注意如果渲染速度快,会在页面进入动画完成前触发
  304. onReady() {
  305. },
  306. // 监听 - 页面每次【显示时】执行(如:前进和返回) (页面每次出现在屏幕上都触发,包括从下级页面点返回露出当前页面)
  307. onShow() {
  308. this.init()
  309. this.checkUpdate()
  310. // const dictObj = uni.getStorageSync('MD_dict')
  311. // this.areaTypeObj = arrToObj(dictObj.area_type)
  312. },
  313. // 监听 - 页面每次【隐藏时】执行(如:返回)
  314. onHide() {},
  315. // 监听 - 页面触底部
  316. onReachBottom() {},
  317. // 监听 - 窗口尺寸变化(仅限:App、微信小程序)
  318. onResize() {},
  319. // 监听 - 点击右上角转发时
  320. onShareAppMessage(options) {},
  321. // 监听 - 页面创建时
  322. created() {},
  323. // 函数
  324. methods: {
  325. checkUpdate() {
  326. const updateManager = uni.getUpdateManager();
  327. updateManager.onUpdateReady(function(res) {
  328. uni.showModal({
  329. title: '更新提示',
  330. content: '新版本已经准备好,是否重启应用?',
  331. success(res) {
  332. if (res.confirm) {
  333. // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
  334. updateManager.applyUpdate()
  335. }
  336. }
  337. })
  338. })
  339. },
  340. oneImgHandle (item) {
  341. uni.api.estate.apiestateinfodetail({id: item.id}).then(res => {
  342. const curImgUrl = res.info_img || ''
  343. if (!curImgUrl) {
  344. uni.$msg('该楼盘暂未设置一页纸楼盘简介~')
  345. return
  346. }
  347. uni.previewImage({
  348. current: curImgUrl,
  349. urls: [curImgUrl],
  350. })
  351. })
  352. },
  353. scanHandle () {
  354. uni.scanCode({
  355. success: function (res) {
  356. uni.navigateTo({
  357. url: `/pages/agent/recommend/detail2?id=${res.result}`
  358. })
  359. }
  360. })
  361. },
  362. // 页面数据初始化函数
  363. init(options) {
  364. const userInfo2 = uni.getStorageSync('MD_userInfo2')
  365. this.curRoles = userInfo2 ? userInfo2.roles : ''
  366. this.userInfo = userInfo2 || {}
  367. uni.api.estate.apireportcount().then(res => {
  368. const reportStepCount = res.report_step_count || []
  369. let reportStepCountObj = {}
  370. reportStepCount.forEach(item => {
  371. reportStepCountObj[item.report_step] = item.total || 0
  372. })
  373. this.reportStepCountObj = {...reportStepCountObj}
  374. })
  375. uni.api.estate.apiestatelist({page_size: 100}).then(res => {
  376. const list = res.list || []
  377. const dictObj = uni.getStorageSync('MD_dict')
  378. const areaTypeObj = arrToObj(dictObj.area_type)
  379. let twoObj = {}
  380. list.forEach(item => {
  381. if (twoObj[item.area_type]) {
  382. twoObj[item.area_type].list.push(item)
  383. } else {
  384. twoObj[item.area_type] = {
  385. list: [item],
  386. str: areaTypeObj[item.area_type],
  387. }
  388. }
  389. })
  390. this.twoObj = {...twoObj}
  391. // console.log(twoObj)
  392. // let oneObj = list[0] || {}
  393. this.propertyList = [...list]
  394. // this.propertyList = [list[0], list[1], list[2]]
  395. })
  396. // let currentTime = Date.parse(new Date()) / 1000; // 秒级
  397. // // 初始化平台数据
  398. // let systemConfig = vk.vuex.get('$app.systemConfig');
  399. // if (!systemConfig.use_skeleton) {
  400. this.skeletonLoading = false;
  401. // }
  402. // if (vk.pubfn.isNull(systemConfig._id)) {
  403. // // 不存在则直接初始化
  404. // vk.callFunction({
  405. // url: 'client/agent/pub/getConfigInfo',
  406. // needAlert: false
  407. // }).then(res => {
  408. // vk.vuex.set('$app.systemConfig', res.config);
  409. // vk.vuex.set('$app.systemConfig.lastGetTime', currentTime);
  410. // });
  411. // } else {
  412. // let mathTime = ((currentTime - systemConfig.lastGetTime) / 3600).toFixed(2);
  413. // if (mathTime > systemConfig.cache_time) {
  414. // vk.callFunction({
  415. // url: 'client/agent/pub/getConfigInfo',
  416. // needAlert: false
  417. // }).then(res => {
  418. // vk.vuex.set('$app.systemConfig', res.config);
  419. // vk.vuex.set('$app.systemConfig.lastGetTime', currentTime);
  420. // });
  421. // }
  422. // }
  423. // // 请求经纪人个人数据
  424. // let lastInitAgentDataTime = vk.vuex.get('$user.history.lastInitAgentDataTime');
  425. // if (currentTime - lastInitAgentDataTime >= 60 && vk.checkToken()) {
  426. // // 个人数据1分钟主动更新1次
  427. // vk.callFunction({
  428. // url: 'client/agent/kh/getAgentData',
  429. // data: {
  430. // agentId: vk.vuex.get('$user.agentInfo._id')
  431. // },
  432. // needAlert: false
  433. // }).then(res => {
  434. // vk.vuex.set('$user.dataInfo.recommendNum', res.data.recommendNum);
  435. // vk.vuex.set('$user.dataInfo.visitedNum', res.data.visitedNum);
  436. // vk.vuex.set('$user.dataInfo.buyNum', res.data.buyNum);
  437. // vk.vuex.set('$user.dataInfo.totalCommission', res.data.totalCommission);
  438. // vk.vuex.set('$user.history.lastInitAgentDataTime', currentTime);
  439. // });
  440. // }
  441. // // 请求未读消息数量
  442. // // 最快1分钟请求一次
  443. // let lastGetUnreadMsgTime = vk.vuex.get('$user.history.lastGetUnreadMsgTime');
  444. // if (currentTime - lastGetUnreadMsgTime > 60 && vk.checkToken()) {
  445. // vk.callFunction({
  446. // url: 'client/agent/kh/getUnreadMsgNum'
  447. // }).then(res => {
  448. // vk.vuex.set('$user.dataInfo.unreadMsgNum', res.num);
  449. // vk.vuex.set('$user.history.lastGetUnreadMsgTime', currentTime);
  450. // });
  451. // }
  452. // // 请求在售项目列表
  453. // vk.callFunction({
  454. // url: 'client/agent/pub/getPropertyList',
  455. // needAlert: false
  456. // }).then(res => {
  457. // that.propertyList = res.list;
  458. // // 存储到vuex,方便其他页面调用
  459. // if (res.list.length < 5) {
  460. // // 若大于等于5则可能有更多项目,则不缓存
  461. // let list = res.list.map(function(val, index) {
  462. // return { value: val._id, label: val.name };
  463. // });
  464. // vk.vuex.set('$app.propertyList', list);
  465. // }
  466. // // 拼接佣金政策
  467. // // 非经纪人身份时显示佣金政策简介
  468. // // 否则显示最高可获得的佣金额度
  469. // let i;
  470. // for (i = 0; i < res.list.length; i++) {
  471. // let agentType = vk.vuex.get('$user.agentInfo.type');
  472. // if (vk.pubfn.isNull(agentType)) {
  473. // // 还未注册为经纪人
  474. // that.propertyList[i].commissionText = that.propertyList[i].rulesInfo.des;
  475. // } else {
  476. // let commissionInfo = that.propertyList[i].rulesInfo.commission_info;
  477. // let item = vk.pubfn.getListItem(commissionInfo, 'type', agentType);
  478. // that.propertyList[i].commissionText = '您最高可获得佣金' + item.amount + '元';
  479. // }
  480. // }
  481. // that.skeletonLoading = false;
  482. // });
  483. },
  484. pageTo(path) {
  485. if (path === 'dev') {
  486. uni.$msg('开发中~')
  487. return
  488. }
  489. uni.navigateTo({
  490. url: path
  491. })
  492. },
  493. // 弹窗展示项目佣金详情
  494. showDetail(index, item) {
  495. this.curHtml = ''
  496. if (this.userInfo && this.userInfo.auth_state == 1) {
  497. this.currentPropertyIndex = index;
  498. this.currentPropertyObj = item
  499. this.propertyPopupShow = true;
  500. uni.api.estate.apiestatecontentdetail({id: item.id}).then(res => {
  501. this.curHtml = res.content || ''
  502. })
  503. } else {
  504. uni.$msgConfirm('请点击首页右上角设置,进行实名认证,实名认证后可查看详细信息')
  505. }
  506. }
  507. },
  508. // 监听器
  509. watch: {},
  510. // 计算属性
  511. computed: {}
  512. };
  513. </script>
  514. <style lang="scss" scoped>
  515. .page {
  516. min-height: calc(100vh - 44px);
  517. }
  518. .userinfo-wrap {
  519. display: flex;
  520. flex-direction: column;
  521. align-items: flex-start;
  522. background-color: #fff;
  523. padding: 10rpx 26rpx 26rpx;
  524. width: 100%;
  525. margin-bottom: 20rpx;
  526. border-radius: 10rpx;
  527. position: relative;
  528. .userinfo {
  529. width: 100%;
  530. display: flex;
  531. align-items: center;
  532. justify-content: space-between;
  533. .user {
  534. display: flex;
  535. align-items: center;
  536. .avatar-wrap {
  537. position: relative;
  538. .avatar-bg {
  539. position: absolute;
  540. left: 0;
  541. top: 0;
  542. border-radius: 50%;
  543. width: 128rpx;
  544. height: 128rpx;
  545. }
  546. }
  547. .info {
  548. margin-left: 32rpx;
  549. .nickname {
  550. font-size: $u-p;
  551. font-weight: bold;
  552. color: $u-main-color;
  553. margin-bottom: 5rpx;
  554. }
  555. .mobile {
  556. font-size: $u-p1;
  557. color: $u-tips-color;
  558. }
  559. }
  560. }
  561. }
  562. .datainfo {
  563. width: 100%;
  564. display: flex;
  565. align-items: flex-end;
  566. justify-content: space-between;
  567. padding: 20rpx 0 0;
  568. .data-item {
  569. display: flex;
  570. flex-direction: column;
  571. align-items: center;
  572. .data {
  573. font-weight: bold;
  574. font-size: $u-h2;
  575. line-height: $u-h2;
  576. margin-bottom: 10rpx;
  577. }
  578. .item {
  579. font-size: $u-p2;
  580. color: $u-content-color;
  581. }
  582. }
  583. }
  584. }
  585. .function-card-wrap {
  586. .col-card-wrap {
  587. display: flex;
  588. align-items: center;
  589. justify-content: space-between;
  590. }
  591. .function-card {
  592. background-color: #fff;
  593. padding: 32rpx 20rpx;
  594. width: 345rpx;
  595. margin-bottom: 20rpx;
  596. border-radius: 10rpx;
  597. position: relative;
  598. overflow: hidden;
  599. .title-wrap {
  600. text-align: left;
  601. .main-title {
  602. display: flex;
  603. align-items: center;
  604. font-size: $u-p;
  605. font-weight: bold;
  606. }
  607. .sub-title {
  608. font-size: $u-p2;
  609. color: $u-content-color;
  610. }
  611. }
  612. .icon {
  613. text-align: right;
  614. position: absolute;
  615. top: 0;
  616. right: 0;
  617. }
  618. }
  619. }
  620. // 项目列表
  621. .card-list-wrap {
  622. background-color: #fff;
  623. // margin: 0rpx -20rpx 20rpx;
  624. padding: 20rpx 20rpx 0 20rpx;
  625. display: flex;
  626. flex-direction: column;
  627. border-radius: 10rpx;
  628. .header-title-warp {
  629. width: 100%;
  630. margin-bottom: 20rpx;
  631. display: flex;
  632. align-items: center;
  633. justify-content: space-between;
  634. .title {
  635. display: flex;
  636. align-items: center;
  637. color: $u-main-color;
  638. font-weight: bold;
  639. font-size: $u-p;
  640. }
  641. .more {
  642. font-size: $u-sub;
  643. color: $u-tips-color;
  644. }
  645. }
  646. // 行版
  647. .property-row-wrap {
  648. .property-body {
  649. width: 100%;
  650. border-radius: 10rpx;
  651. margin-bottom: 20rpx;
  652. // background-color: #fff;
  653. .image-wrap {
  654. position: relative;
  655. image {
  656. width: 100%;
  657. height: 300rpx;
  658. display: block;
  659. border-top-left-radius: 10rpx;
  660. border-top-right-radius: 10rpx;
  661. }
  662. .tag {
  663. color: #ffffff;
  664. // background-color: $u-theme-color;
  665. background: #8BC34A;
  666. font-size: $u-p2;
  667. position: absolute;
  668. z-index: 1;
  669. left: 0;
  670. padding: 8rpx 20rpx;
  671. border-top-left-radius: 10rpx;
  672. border-bottom-right-radius: 10rpx;
  673. }
  674. }
  675. .property-info-wrap {
  676. padding: 20rpx;
  677. .title {
  678. font-weight: bold;
  679. color: $u-main-color;
  680. font-size: $u-p;
  681. .s {
  682. font-weight: normal;
  683. padding-left: 10rpx;
  684. }
  685. }
  686. .commission {
  687. margin-top: 10rpx;
  688. font-size: $u-p2;
  689. color: $u-content-color;
  690. }
  691. }
  692. }
  693. }
  694. // 两列版
  695. .property-col-wrap {
  696. display: flex;
  697. flex-wrap: wrap;
  698. justify-content: space-between;
  699. align-items: flex-start;
  700. .property-body {
  701. width: 325rpx;
  702. border-radius: 10rpx;
  703. margin-bottom: 20rpx;
  704. // background-color: #fff;
  705. .image-wrap {
  706. position: relative;
  707. image {
  708. width: 100%;
  709. height: 210rpx;
  710. display: block;
  711. border-top-left-radius: 10rpx;
  712. border-top-right-radius: 10rpx;
  713. }
  714. .tag {
  715. color: #ffffff;
  716. // background-color: $u-theme-color;
  717. background: #8BC34A;
  718. font-size: $u-sub;
  719. position: absolute;
  720. z-index: 1;
  721. left: 0;
  722. padding: 8rpx 20rpx;
  723. border-top-left-radius: 10rpx;
  724. border-bottom-right-radius: 10rpx;
  725. }
  726. }
  727. .property-info-wrap {
  728. padding: 20rpx;
  729. .title {
  730. font-weight: bold;
  731. color: $u-main-color;
  732. font-size: $u-p2;
  733. .s {
  734. font-weight: normal;
  735. padding-left: 10rpx;
  736. }
  737. }
  738. .commission {
  739. margin-top: 10rpx;
  740. font-size: $u-sub;
  741. color: $u-content-color;
  742. }
  743. }
  744. }
  745. }
  746. }
  747. .popup-body {
  748. .property-info {
  749. font-size: $u-p1;
  750. .item {
  751. display: flex;
  752. margin-bottom: 10rpx;
  753. text-align: left;
  754. .item-title {
  755. font-weight: bold;
  756. width: 170rpx;
  757. }
  758. .item-info {
  759. flex: 1;
  760. }
  761. }
  762. }
  763. }
  764. .scoped-scan-img {
  765. padding-left: 20px;
  766. width: 40rpx;
  767. height: 40rpx;
  768. }
  769. .scoped-estate-desc {
  770. padding: 10rpx;
  771. iamge, img {
  772. width: 100%;
  773. }
  774. }
  775. .scoped-popup-more {
  776. width: 100%;
  777. height: 118rpx;
  778. margin-left: -20rpx;
  779. margin-top: -20rpx;
  780. margin-bottom: 20rpx;
  781. }
  782. .scoped-entry {
  783. display: flex;
  784. flex-wrap: wrap;
  785. .op {
  786. flex: 1;
  787. margin-bottom: 20rpx;
  788. &:nth-child(2n) {
  789. text-align: right;
  790. }
  791. }
  792. }
  793. .scoped-list-one {
  794. .slo-title {
  795. margin-top: 20rpx;
  796. margin-bottom: 20rpx;
  797. color: #2080f0;
  798. font-weight: bold;
  799. border-left: 2PX solid #2080f0;
  800. padding-left: 10rpx;
  801. font-size: 32rpx;
  802. }
  803. }
  804. </style>