index.vue 25 KB

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