index.vue 24 KB

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