123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740 |
- <template>
- <view class="page u-skeleton">
- <wm-watermark :text="userInfo.phone" :num="50"></wm-watermark>
-
- <view class="userinfo-wrap u-skeleton-fillet box-shadow">
-
- <view class="userinfo">
- <view class="user">
- <view class="avatar-wrap" @click="pageTo('/pages/user/setting/avatar')">
- <u-avatar
- class="u-skeleton-circle"
- :src="userInfo.avatar"
- size="128"
- mode="circle"
- ></u-avatar>
-
- <view class="avatar-bg box-shadow"></view>
- </view>
- <view class="info">
- <view class="nickname u-skeleton-rect">
- {{userInfo.user_id ? userInfo.nickname ? userInfo.nickname : '未设置用户名' : '未登录'}}
- </view>
- </view>
- <image v-if="userInfo && userInfo.manage_type == 2" src="../../static/bg_scan.png" class="scoped-scan-img" @click="scanHandle"></image>
- </view>
- <u-button
- v-if="!userInfo.user_id"
- class="u-skeleton-fillet"
- size="mini"
- type="primary"
- @click="pageTo('/pages/user/login/login')"
- :customStyle="{ margin: 0 }"
- >
- 立即登录
- </u-button>
- <view
- v-if="userInfo.user_id" style="padding: 20px" @click="pageTo('/pages/user/setting/setting')">
- <u-icon name="/static/icon/setting.png" size="24"></u-icon>
- </view>
- </view>
- <u-line length="650rpx" margin="30rpx 0 0"></u-line>
-
- <view class="datainfo">
- <view class="data-item" @click="pageTo('/pages/agent/recommend/list?filterStepStatus=1')">
- <view class="data u-skeleton-fillet">{{reportStepCountObj['1'] || 0}}</view>
- <view class="item u-skeleton-fillet">未到访</view>
- </view>
- <view class="data-item" @click="pageTo('/pages/agent/recommend/list?filterStepStatus=2')">
- <view class="data u-skeleton-fillet">{{reportStepCountObj['2'] || 0}}</view>
- <view class="item u-skeleton-fillet">已到访</view>
- </view>
- <view class="data-item" @click="pageTo('/pages/agent/recommend/list?filterStepStatus=3')">
- <view class="data u-skeleton-fillet">{{reportStepCountObj['3'] || 0}}</view>
- <view class="item u-skeleton-fillet">已认购</view>
- </view>
- <view class="data-item" @click="pageTo('/pages/agent/recommend/list?filterStepStatus=4')">
- <view class="data u-skeleton-fillet">
- {{reportStepCountObj['4'] || 0}}
- </view>
- <view class="item u-skeleton-fillet">已签约</view>
- </view>
- <view class="data-item" @click="pageTo('/pages/agent/recommend/list?filterStepStatus=5')">
- <view class="data u-skeleton-fillet">{{reportStepCountObj['5'] || 0}}</view>
- <view class="item u-skeleton-fillet">已结佣</view>
- </view>
- </view>
- </view>
-
- <view class="function-card-wrap">
- <view class="col-card-wrap">
- <view class="function-card box-shadow u-skeleton-fillet" @click="pageTo('/pages/agent/recommend/create')">
- <view class="title-wrap">
- <view class="main-title">
- <u-icon class="u-m-r-5" name="/static/icon/thump-up.png" size="32"></u-icon>
- ️我要推荐
- </view>
- <view class="sub-title u-line-1">Recommend</view>
- </view>
- <u-image src="/static/icon/wenli1.png" mode="heightFix" height="144rpx" class="icon"></u-image>
- </view>
- <view class="function-card box-shadow u-skeleton-fillet" @click="pageTo('/pages/agent/recommend/list')">
- <view class="title-wrap">
- <view class="main-title">
- <u-icon class="u-m-r-5" name="/static/icon/money.png" size="32"></u-icon>
- 报备管理
- </view>
- <view class="sub-title u-line-1">Filing</view>
- </view>
- <u-image src="/static/icon/wenli2.png" mode="heightFix" height="144rpx" class="icon"></u-image>
- </view>
- </view>
- <view class="col-card-wrap">
- <view class="function-card box-shadow u-skeleton-fillet" @click="pageTo('/pages/cust/list')">
- <view class="title-wrap">
- <view class="main-title">
- <u-icon class="u-m-r-5" name="/static/icon/customer.png" size="32"></u-icon>
- 客户管理
- </view>
- <view class="sub-title u-line-1">Customer</view>
- </view>
- <u-image src="/static/icon/wenli3.png" mode="heightFix" height="144rpx" class="icon"></u-image>
- </view>
- <view class="function-card box-shadow u-skeleton-fillet" @click="commonRulesShow = true">
- <view class="title-wrap">
- <view class="main-title">
- <u-icon class="u-m-r-5" name="/static/icon/book.png" size="32"></u-icon>
- 佣金政策
- </view>
- <view class="sub-title u-line-1">Rules</view>
- </view>
- <u-image src="/static/icon/wenli4.png" mode="heightFix" height="144rpx" class="icon"></u-image>
- </view>
- </view>
- </view>
-
- <view class="card-list-wrap box-shadow u-m-b-20">
- <view class="header-title-warp">
- <view class="title u-skeleton-rect">
- <u-icon class="u-m-r-5" name="/static/icon/fire.png" size="36"></u-icon>
- 高佣热销
- </view>
-
- </view>
- <view v-if="propertyList.length == 0" class="u-m-t-40 u-m-b-40"><u-empty mode="list" text="暂无在售房源"></u-empty></view>
- <view :class="'property-row-wrap'">
- <view class="property-body u-skeleton-fillet box-shadow" v-for="(item, index) in propertyList" :key="index" @click="showDetail(index, item)">
- <view class="image-wrap">
- <text class="tag u-skeleton-rect">{{ item.estate_tag }}</text>
- <image class="u-skeleton-rect" :src="item.pri_image" mode="aspectFill"></image>
- </view>
- <view class="property-info-wrap">
- <view class="title u-skeleton-rect">{{ item.estate_name }}
- <text class="s">{{areaTypeObj[item.area_type]}}</text>
- </view>
- <view class="commission u-line-1 u-skeleton-rect" v-if="userInfo.auth_state == 1">预计佣金:{{ item.brokerage }}</view>
- </view>
- </view>
- </view>
- </view>
-
- <u-popup v-model="commonRulesShow" mode="center" width="80%" height="800rpx" border-radius="20" closeable>
- <view class="bwin-popup">
- <view class="popup-header">平台佣金政策</view>
- <view class="popup-body">需上传身份证、银行卡进行实名认证,认证通过后方可报备客户和获得佣金,各楼盘相关带看规则和佣金政策点击下方对应楼盘</view>
- </view>
- </u-popup>
-
- <u-popup v-model="propertyPopupShow" mode="center" width="80%" height="800rpx" border-radius="20" closeable>
- <view class="bwin-popup">
- <view class="popup-header">{{ propertyList[currentPropertyIndex].estate_name + '佣金政策' }}</view>
- <view class="popup-body">
- <u-parse :html="propertyList[currentPropertyIndex].introduce"></u-parse>
- <u-divider marginTop="20" marginBottom="20">详情</u-divider>
- <view class="property-info">
- <view class="item" v-if="userInfo.auth_state == 1">
- <view class="item-title">预计佣金:</view>
- <view class="item-info" style="color: red;font-weight: bold;">{{ propertyList[currentPropertyIndex].brokerage }}</view>
- </view>
- <view class="item">
- <view class="item-title">营销中心:</view>
- <view class="item-info">{{ propertyList[currentPropertyIndex].address }}</view>
- </view>
- <view class="item">
- <view class="item-title">销售热线:</view>
- <view class="item-info">{{ propertyList[currentPropertyIndex].marketing_phone || '00000000' }}</view>
- </view>
- <view class="item">
- <view class="item-title">带看需收集:</view>
- <view class="item-info">{{ propertyList[currentPropertyIndex].report_visit }}</view>
- </view>
- <view class="item">
- <view class="item-title">报备保护期:</view>
- <view class="item-info">{{ propertyList[currentPropertyIndex].report_lock + '天' }}</view>
- </view>
- <view class="item">
- <view class="item-title">带看保护期:</view>
- <view class="item-info">{{ propertyList[currentPropertyIndex].lead_lock + '天' }}</view>
- </view>
- </view>
- <u-divider marginTop="20" marginBottom="20">更多</u-divider>
- <view class="scoped-estate-desc">
-
- <rich-text :nodes="curHtml | filtersRichText"></rich-text>
- </view>
- </view>
- </view>
- </u-popup>
-
- <u-skeleton :loading="skeletonLoading" animation></u-skeleton>
- <backTop :src="backTop.src" :scrollTop="backTop.scrollTop"></backTop>
- </view>
- </template>
- <script>
- var that;
- import { arrToObj } from '@/utils'
- import backTop from '@/components/back-top/back-top.vue'
- import wmWatermark from '@/components/wm-watermark/wm-watermark.vue'
- export default {
- components: {
- backTop,
- wmWatermark
- },
- filters: {
- filtersRichText(html) {
- let newContent = html.replace(/<img[^>]*>/gi, (match, capture)=>{
- match = match.replace(/style="[^"]+"/gi, '').replace(/style='[^']+'/gi, '');
- match = match.replace(/width="[^"]+"/gi, '').replace(/width='[^']+'/gi, '');
- match = match.replace(/height="[^"]+"/gi, '').replace(/height='[^']+'/gi, '');
- return match;
- });
- newContent = newContent.replace(/style="[^"]+"/gi, (match, capture)=>{
- match = match.replace(/width:[^;]+;/gi, 'max-width:100%;').replace(/width:[^;]+;/gi, 'max-width:100%;');
- return match;
- });
- newContent = newContent.replace(/<br[^>]*\/>/gi, '');
- newContent = newContent.replace(/\<img/gi,
- '<img style="max-width:100%;height:auto;display:inline-block;margin:10rpx auto;"');
- return newContent;
- }
- },
- data() {
-
- return {
- curHtml: '',
- backTop: {
- src: '../../static/back-top/top.png',
- scrollTop: 0
- },
- userInfo: {},
- skeletonLoading: true,
- agentTypeList: ['', '自由经纪人', '渠道经纪人', '老业主'],
- propertyList: [
- {
- estate_name: '在售项目1',
- pri_image: 'https://zdcdn.2bwin.cn/uploads/20220501/af6eb9c2a5d462be10a15c2302e5e6b5.jpg',
- sale_tag: '刚需好盘',
- rulesInfo: {
- des: '内容加载中1....',
- des_content: '内容加载中2....'
- }
- },
- ],
- commonRulesShow: false,
- propertyPopupShow: false,
- currentPropertyIndex: 0,
-
- data: {},
-
- form1: {},
- scrollTop: 0,
- reportStepCountObj: {},
- areaTypeObj: {},
- };
- },
- onPageScroll(e) {
- this.scrollTop = e.scrollTop;
- this.backTop.scrollTop = e.scrollTop;
- },
-
- onLoad(options = {}) {
-
-
-
- },
-
- onReady() {
-
- },
-
- onShow() {
- this.init()
- const dictObj = uni.getStorageSync('MD_dict')
- this.areaTypeObj = arrToObj(dictObj.area_type)
- },
-
- onHide() {},
-
- onReachBottom() {},
-
- onResize() {},
-
- onShareAppMessage(options) {},
-
- created() {},
-
- methods: {
- scanHandle () {
- uni.scanCode({
- success: function (res) {
- uni.navigateTo({
- url: `/pages/agent/recommend/detail2?id=${res.result}`
- })
- }
- })
- },
-
- init(options) {
- const userInfo2 = uni.getStorageSync('MD_userInfo2')
- this.userInfo = userInfo2 || {}
- uni.api.estate.apireportcount().then(res => {
- const reportStepCount = res.report_step_count || []
- let reportStepCountObj = {}
- reportStepCount.forEach(item => {
- reportStepCountObj[item.report_step] = item.total || 0
- })
- this.reportStepCountObj = {...reportStepCountObj}
- })
- uni.api.estate.apiestatelist({page_size: 100}).then(res => {
- const list = res.list || []
-
- this.propertyList = [...list]
-
- })
-
-
-
-
-
- this.skeletonLoading = false;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- },
- pageTo(path) {
- if (path === 'dev') {
- uni.$msg('开发中~')
- return
- }
- uni.navigateTo({
- url: path
- })
- },
-
- showDetail(index, item) {
- this.currentPropertyIndex = index;
- this.propertyPopupShow = true;
- uni.api.estate.apiestatecontentdetail({id: item.id}).then(res => {
- this.curHtml = res.content || ''
- })
- }
- },
-
- watch: {},
-
- computed: {}
- };
- </script>
- <style lang="scss" scoped>
- .page {
- min-height: calc(100vh - 44px);
- }
- .userinfo-wrap {
- display: flex;
- flex-direction: column;
- align-items: flex-start;
- background-color: #fff;
- padding: 32rpx;
- width: 100%;
- margin-bottom: 20rpx;
- border-radius: 10rpx;
- position: relative;
- .userinfo {
- width: 100%;
- display: flex;
- align-items: center;
- justify-content: space-between;
- .user {
- display: flex;
- align-items: center;
-
- .avatar-wrap {
- position: relative;
- .avatar-bg {
- position: absolute;
- left: 0;
- top: 0;
- border-radius: 50%;
- width: 128rpx;
- height: 128rpx;
- }
- }
- .info {
- margin-left: 32rpx;
- .nickname {
- font-size: $u-p;
- font-weight: bold;
- color: $u-main-color;
- margin-bottom: 5rpx;
- }
- .mobile {
- font-size: $u-p1;
- color: $u-tips-color;
- }
- }
- }
- }
- .datainfo {
- width: 100%;
- display: flex;
- align-items: flex-end;
- justify-content: space-between;
- padding: 20rpx 0 0;
- .data-item {
- display: flex;
- flex-direction: column;
- align-items: center;
- .data {
- font-weight: bold;
- font-size: $u-h2;
- line-height: $u-h2;
- margin-bottom: 10rpx;
- }
- .item {
- font-size: $u-p2;
- color: $u-content-color;
- }
- }
- }
- }
- .function-card-wrap {
- .col-card-wrap {
- display: flex;
- align-items: center;
- justify-content: space-between;
- }
- .function-card {
- background-color: #fff;
- padding: 32rpx 20rpx;
- width: 345rpx;
- margin-bottom: 20rpx;
- border-radius: 10rpx;
- position: relative;
- overflow: hidden;
- .title-wrap {
- text-align: left;
- .main-title {
- display: flex;
- align-items: center;
- font-size: $u-p;
- font-weight: bold;
- }
- .sub-title {
- font-size: $u-p2;
- color: $u-content-color;
- }
- }
- .icon {
- text-align: right;
- position: absolute;
- top: 0;
- right: 0;
- }
- }
- }
- // 项目列表
- .card-list-wrap {
- background-color: #fff;
- // margin: 0rpx -20rpx 20rpx;
- padding: 20rpx 20rpx 0 20rpx;
- display: flex;
- flex-direction: column;
- border-radius: 10rpx;
- .header-title-warp {
- width: 100%;
- margin-bottom: 20rpx;
- display: flex;
- align-items: center;
- justify-content: space-between;
- .title {
- display: flex;
- align-items: center;
- color: $u-main-color;
- font-weight: bold;
- font-size: $u-p;
- }
- .more {
- font-size: $u-sub;
- color: $u-tips-color;
- }
- }
- // 行版
- .property-row-wrap {
- .property-body {
- width: 100%;
- border-radius: 10rpx;
- margin-bottom: 20rpx;
- // background-color: #fff;
- .image-wrap {
- position: relative;
- image {
- width: 100%;
- height: 300rpx;
- display: block;
- border-top-left-radius: 10rpx;
- border-top-right-radius: 10rpx;
- }
- .tag {
- color: #ffffff;
- background-color: $u-theme-color;
- font-size: $u-p2;
- position: absolute;
- z-index: 1;
- left: 0;
- padding: 8rpx 20rpx;
- border-top-left-radius: 10rpx;
- border-bottom-right-radius: 10rpx;
- }
- }
- .property-info-wrap {
- padding: 20rpx;
- .title {
- font-weight: bold;
- color: $u-main-color;
- font-size: $u-p;
- .s {
- font-weight: normal;
- padding-left: 10rpx;
- }
- }
- .commission {
- margin-top: 10rpx;
- font-size: $u-p2;
- color: $u-content-color;
- }
- }
- }
- }
- // 两列版
- .property-col-wrap {
- display: flex;
- flex-wrap: wrap;
- justify-content: space-between;
- align-items: flex-start;
- .property-body {
- width: 325rpx;
- border-radius: 10rpx;
- margin-bottom: 20rpx;
- // background-color: #fff;
- .image-wrap {
- position: relative;
- image {
- width: 100%;
- height: 300rpx;
- display: block;
- border-top-left-radius: 10rpx;
- border-top-right-radius: 10rpx;
- }
- .tag {
- color: #ffffff;
- background-color: $u-theme-color;
- font-size: $u-sub;
- position: absolute;
- z-index: 1;
- left: 0;
- padding: 8rpx 20rpx;
- border-top-left-radius: 10rpx;
- border-bottom-right-radius: 10rpx;
- }
- }
- .property-info-wrap {
- padding: 20rpx;
- .title {
- font-weight: bold;
- color: $u-main-color;
- font-size: $u-p2;
- }
- .commission {
- margin-top: 10rpx;
- font-size: $u-sub;
- color: $u-content-color;
- }
- }
- }
- }
- }
- .popup-body {
- .property-info {
- font-size: $u-p1;
- .item {
- display: flex;
- margin-bottom: 10rpx;
- text-align: left;
- .item-title {
- font-weight: bold;
- width: 170rpx;
- }
- .item-info {
- flex: 1;
- }
- }
- }
- }
- .scoped-scan-img {
- padding-left: 20px;
- width: 90rpx;
- height: 90rpx;
- }
- .scoped-estate-desc {
- padding: 10rpx;
- iamge, img {
- width: 100%;
- }
- }
- </style>
|