index.vue 26 KB

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