index.vue 25 KB

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