index.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871
  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">需上传身份证、银行卡进行实名认证,认证通过后方可报备客户和获得佣金,各楼盘相关带看规则和佣金政策点击下方对应楼盘<!-- <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.api.estate.apiestateinfodetail({id: item.id}).then(res => {
  344. const curImgUrl = res.info_img || ''
  345. if (!curImgUrl) {
  346. uni.$msg('该楼盘暂未设置一页纸楼盘简介~')
  347. return
  348. }
  349. uni.previewImage({
  350. current: curImgUrl,
  351. urls: [curImgUrl],
  352. })
  353. })
  354. },
  355. scanHandle () {
  356. uni.scanCode({
  357. success: function (res) {
  358. uni.navigateTo({
  359. url: `/pages/agent/recommend/detail2?id=${res.result}`
  360. })
  361. }
  362. })
  363. },
  364. // 页面数据初始化函数
  365. init(options) {
  366. const userInfo2 = uni.getStorageSync('MD_userInfo2')
  367. this.curRoles = userInfo2 ? userInfo2.roles : ''
  368. this.GT = userInfo2 ? userInfo2.group_type : ''
  369. this.userInfo = userInfo2 || {}
  370. uni.api.estate.apireportcount().then(res => {
  371. const reportStepCount = res.report_step_count || []
  372. let reportStepCountObj = {}
  373. reportStepCount.forEach(item => {
  374. reportStepCountObj[item.report_step] = item.total || 0
  375. })
  376. this.reportStepCountObj = {...reportStepCountObj}
  377. })
  378. uni.api.estate.apiestatelist({page_size: 100}).then(res => {
  379. const list = res.list || []
  380. const dictObj = uni.getStorageSync('MD_dict')
  381. const areaTypeObj = arrToObj(dictObj.area_type)
  382. let twoObj = {}
  383. list.forEach(item => {
  384. if (twoObj[item.area_type]) {
  385. twoObj[item.area_type].list.push(item)
  386. } else {
  387. twoObj[item.area_type] = {
  388. list: [item],
  389. str: areaTypeObj[item.area_type],
  390. }
  391. }
  392. })
  393. this.twoObj = {...twoObj}
  394. // console.log(twoObj)
  395. // let oneObj = list[0] || {}
  396. this.propertyList = [...list]
  397. // this.propertyList = [list[0], list[1], list[2]]
  398. })
  399. // let currentTime = Date.parse(new Date()) / 1000; // 秒级
  400. // // 初始化平台数据
  401. // let systemConfig = vk.vuex.get('$app.systemConfig');
  402. // if (!systemConfig.use_skeleton) {
  403. this.skeletonLoading = false;
  404. // }
  405. // if (vk.pubfn.isNull(systemConfig._id)) {
  406. // // 不存在则直接初始化
  407. // vk.callFunction({
  408. // url: 'client/agent/pub/getConfigInfo',
  409. // needAlert: false
  410. // }).then(res => {
  411. // vk.vuex.set('$app.systemConfig', res.config);
  412. // vk.vuex.set('$app.systemConfig.lastGetTime', currentTime);
  413. // });
  414. // } else {
  415. // let mathTime = ((currentTime - systemConfig.lastGetTime) / 3600).toFixed(2);
  416. // if (mathTime > systemConfig.cache_time) {
  417. // vk.callFunction({
  418. // url: 'client/agent/pub/getConfigInfo',
  419. // needAlert: false
  420. // }).then(res => {
  421. // vk.vuex.set('$app.systemConfig', res.config);
  422. // vk.vuex.set('$app.systemConfig.lastGetTime', currentTime);
  423. // });
  424. // }
  425. // }
  426. // // 请求经纪人个人数据
  427. // let lastInitAgentDataTime = vk.vuex.get('$user.history.lastInitAgentDataTime');
  428. // if (currentTime - lastInitAgentDataTime >= 60 && vk.checkToken()) {
  429. // // 个人数据1分钟主动更新1次
  430. // vk.callFunction({
  431. // url: 'client/agent/kh/getAgentData',
  432. // data: {
  433. // agentId: vk.vuex.get('$user.agentInfo._id')
  434. // },
  435. // needAlert: false
  436. // }).then(res => {
  437. // vk.vuex.set('$user.dataInfo.recommendNum', res.data.recommendNum);
  438. // vk.vuex.set('$user.dataInfo.visitedNum', res.data.visitedNum);
  439. // vk.vuex.set('$user.dataInfo.buyNum', res.data.buyNum);
  440. // vk.vuex.set('$user.dataInfo.totalCommission', res.data.totalCommission);
  441. // vk.vuex.set('$user.history.lastInitAgentDataTime', currentTime);
  442. // });
  443. // }
  444. // // 请求未读消息数量
  445. // // 最快1分钟请求一次
  446. // let lastGetUnreadMsgTime = vk.vuex.get('$user.history.lastGetUnreadMsgTime');
  447. // if (currentTime - lastGetUnreadMsgTime > 60 && vk.checkToken()) {
  448. // vk.callFunction({
  449. // url: 'client/agent/kh/getUnreadMsgNum'
  450. // }).then(res => {
  451. // vk.vuex.set('$user.dataInfo.unreadMsgNum', res.num);
  452. // vk.vuex.set('$user.history.lastGetUnreadMsgTime', currentTime);
  453. // });
  454. // }
  455. // // 请求在售项目列表
  456. // vk.callFunction({
  457. // url: 'client/agent/pub/getPropertyList',
  458. // needAlert: false
  459. // }).then(res => {
  460. // that.propertyList = res.list;
  461. // // 存储到vuex,方便其他页面调用
  462. // if (res.list.length < 5) {
  463. // // 若大于等于5则可能有更多项目,则不缓存
  464. // let list = res.list.map(function(val, index) {
  465. // return { value: val._id, label: val.name };
  466. // });
  467. // vk.vuex.set('$app.propertyList', list);
  468. // }
  469. // // 拼接佣金政策
  470. // // 非经纪人身份时显示佣金政策简介
  471. // // 否则显示最高可获得的佣金额度
  472. // let i;
  473. // for (i = 0; i < res.list.length; i++) {
  474. // let agentType = vk.vuex.get('$user.agentInfo.type');
  475. // if (vk.pubfn.isNull(agentType)) {
  476. // // 还未注册为经纪人
  477. // that.propertyList[i].commissionText = that.propertyList[i].rulesInfo.des;
  478. // } else {
  479. // let commissionInfo = that.propertyList[i].rulesInfo.commission_info;
  480. // let item = vk.pubfn.getListItem(commissionInfo, 'type', agentType);
  481. // that.propertyList[i].commissionText = '您最高可获得佣金' + item.amount + '元';
  482. // }
  483. // }
  484. // that.skeletonLoading = false;
  485. // });
  486. },
  487. pageTo(path) {
  488. if (path === 'dev') {
  489. uni.$msg('开发中~')
  490. return
  491. }
  492. uni.navigateTo({
  493. url: path
  494. })
  495. },
  496. // 弹窗展示项目佣金详情
  497. showDetail(index, item) {
  498. this.curHtml = ''
  499. if (this.userInfo && this.userInfo.auth_state == 1) {
  500. this.currentPropertyIndex = index;
  501. this.currentPropertyObj = item
  502. this.propertyPopupShow = true;
  503. uni.api.estate.apiestatecontentdetail({id: item.id}).then(res => {
  504. this.curHtml = res.content || ''
  505. })
  506. } else {
  507. uni.$msgConfirm('请点击首页右上角设置,进行实名认证,实名认证后可查看详细信息')
  508. }
  509. }
  510. },
  511. // 监听器
  512. watch: {},
  513. // 计算属性
  514. computed: {}
  515. };
  516. </script>
  517. <style lang="scss" scoped>
  518. .page {
  519. min-height: calc(100vh - 44px);
  520. }
  521. .userinfo-wrap {
  522. display: flex;
  523. flex-direction: column;
  524. align-items: flex-start;
  525. background-color: #fff;
  526. padding: 10rpx 26rpx 26rpx;
  527. width: 100%;
  528. margin-bottom: 20rpx;
  529. border-radius: 10rpx;
  530. position: relative;
  531. .userinfo {
  532. width: 100%;
  533. display: flex;
  534. align-items: center;
  535. justify-content: space-between;
  536. .user {
  537. display: flex;
  538. align-items: center;
  539. .avatar-wrap {
  540. position: relative;
  541. .avatar-bg {
  542. position: absolute;
  543. left: 0;
  544. top: 0;
  545. border-radius: 50%;
  546. width: 128rpx;
  547. height: 128rpx;
  548. }
  549. }
  550. .info {
  551. margin-left: 32rpx;
  552. .nickname {
  553. font-size: $u-p;
  554. font-weight: bold;
  555. color: $u-main-color;
  556. margin-bottom: 5rpx;
  557. }
  558. .mobile {
  559. font-size: $u-p1;
  560. color: $u-tips-color;
  561. }
  562. }
  563. }
  564. }
  565. .datainfo {
  566. width: 100%;
  567. display: flex;
  568. align-items: flex-end;
  569. justify-content: space-between;
  570. padding: 20rpx 0 0;
  571. .data-item {
  572. display: flex;
  573. flex-direction: column;
  574. align-items: center;
  575. .data {
  576. font-weight: bold;
  577. font-size: $u-h2;
  578. line-height: $u-h2;
  579. margin-bottom: 10rpx;
  580. }
  581. .item {
  582. font-size: $u-p2;
  583. color: $u-content-color;
  584. }
  585. }
  586. }
  587. }
  588. .function-card-wrap {
  589. .col-card-wrap {
  590. display: flex;
  591. align-items: center;
  592. justify-content: space-between;
  593. }
  594. .function-card {
  595. background-color: #fff;
  596. padding: 32rpx 20rpx;
  597. width: 345rpx;
  598. margin-bottom: 20rpx;
  599. border-radius: 10rpx;
  600. position: relative;
  601. overflow: hidden;
  602. .title-wrap {
  603. text-align: left;
  604. .main-title {
  605. display: flex;
  606. align-items: center;
  607. font-size: $u-p;
  608. font-weight: bold;
  609. }
  610. .sub-title {
  611. font-size: $u-p2;
  612. color: $u-content-color;
  613. }
  614. }
  615. .icon {
  616. text-align: right;
  617. position: absolute;
  618. top: 0;
  619. right: 0;
  620. }
  621. }
  622. }
  623. // 项目列表
  624. .card-list-wrap {
  625. background-color: #fff;
  626. // margin: 0rpx -20rpx 20rpx;
  627. padding: 20rpx 20rpx 0 20rpx;
  628. display: flex;
  629. flex-direction: column;
  630. border-radius: 10rpx;
  631. .header-title-warp {
  632. width: 100%;
  633. margin-bottom: 20rpx;
  634. display: flex;
  635. align-items: center;
  636. justify-content: space-between;
  637. .title {
  638. display: flex;
  639. align-items: center;
  640. color: $u-main-color;
  641. font-weight: bold;
  642. font-size: $u-p;
  643. }
  644. .more {
  645. font-size: $u-sub;
  646. color: $u-tips-color;
  647. }
  648. }
  649. // 行版
  650. .property-row-wrap {
  651. .property-body {
  652. width: 100%;
  653. border-radius: 10rpx;
  654. margin-bottom: 20rpx;
  655. // background-color: #fff;
  656. .image-wrap {
  657. position: relative;
  658. image {
  659. width: 100%;
  660. height: 300rpx;
  661. display: block;
  662. border-top-left-radius: 10rpx;
  663. border-top-right-radius: 10rpx;
  664. }
  665. .tag {
  666. color: #ffffff;
  667. // background-color: $u-theme-color;
  668. background: #8BC34A;
  669. font-size: $u-p2;
  670. position: absolute;
  671. z-index: 1;
  672. left: 0;
  673. padding: 8rpx 20rpx;
  674. border-top-left-radius: 10rpx;
  675. border-bottom-right-radius: 10rpx;
  676. }
  677. }
  678. .property-info-wrap {
  679. padding: 20rpx;
  680. .title {
  681. font-weight: bold;
  682. color: $u-main-color;
  683. font-size: $u-p;
  684. .s {
  685. font-weight: normal;
  686. padding-left: 10rpx;
  687. }
  688. }
  689. .commission {
  690. margin-top: 10rpx;
  691. font-size: $u-p2;
  692. color: $u-content-color;
  693. }
  694. }
  695. }
  696. }
  697. // 两列版
  698. .property-col-wrap {
  699. display: flex;
  700. flex-wrap: wrap;
  701. justify-content: space-between;
  702. align-items: flex-start;
  703. .property-body {
  704. width: 325rpx;
  705. border-radius: 10rpx;
  706. margin-bottom: 20rpx;
  707. // background-color: #fff;
  708. .image-wrap {
  709. position: relative;
  710. image {
  711. width: 100%;
  712. height: 210rpx;
  713. display: block;
  714. border-top-left-radius: 10rpx;
  715. border-top-right-radius: 10rpx;
  716. }
  717. .tag {
  718. color: #ffffff;
  719. // background-color: $u-theme-color;
  720. background: #8BC34A;
  721. font-size: $u-sub;
  722. position: absolute;
  723. z-index: 1;
  724. left: 0;
  725. padding: 8rpx 20rpx;
  726. border-top-left-radius: 10rpx;
  727. border-bottom-right-radius: 10rpx;
  728. }
  729. }
  730. .property-info-wrap {
  731. padding: 20rpx;
  732. .title {
  733. font-weight: bold;
  734. color: $u-main-color;
  735. font-size: $u-p2;
  736. .s {
  737. font-weight: normal;
  738. padding-left: 10rpx;
  739. }
  740. }
  741. .commission {
  742. margin-top: 10rpx;
  743. font-size: $u-sub;
  744. color: $u-content-color;
  745. }
  746. }
  747. }
  748. }
  749. }
  750. .popup-body {
  751. .property-info {
  752. font-size: $u-p1;
  753. .item {
  754. display: flex;
  755. margin-bottom: 10rpx;
  756. text-align: left;
  757. .item-title {
  758. font-weight: bold;
  759. width: 170rpx;
  760. }
  761. .item-info {
  762. flex: 1;
  763. }
  764. }
  765. }
  766. }
  767. .scoped-scan-img {
  768. padding-left: 20px;
  769. width: 40rpx;
  770. height: 40rpx;
  771. }
  772. .scoped-estate-desc {
  773. padding: 10rpx;
  774. iamge, img {
  775. width: 100%;
  776. }
  777. }
  778. .scoped-popup-more {
  779. width: 100%;
  780. height: 118rpx;
  781. margin-left: -20rpx;
  782. margin-top: -20rpx;
  783. margin-bottom: 20rpx;
  784. }
  785. .scoped-entry {
  786. display: flex;
  787. flex-wrap: wrap;
  788. .op {
  789. flex: 1;
  790. margin-bottom: 20rpx;
  791. &:nth-child(2n) {
  792. text-align: right;
  793. }
  794. }
  795. }
  796. .scoped-list-one {
  797. .slo-title {
  798. margin-top: 20rpx;
  799. margin-bottom: 20rpx;
  800. color: #2080f0;
  801. font-weight: bold;
  802. border-left: 2PX solid #2080f0;
  803. padding-left: 10rpx;
  804. font-size: 32rpx;
  805. }
  806. }
  807. </style>