|
@@ -6,7 +6,7 @@
|
|
|
<cover-image class="icon" :src="`/static/chat-icon/${user.icon}.png`"></cover-image>
|
|
|
</view>
|
|
|
<view class="name-box">
|
|
|
- <view class="name" v-if="authority">
|
|
|
+ <view class="name" v-if="isLogin">
|
|
|
<view class="text">
|
|
|
{{user.username}}
|
|
|
</view>
|
|
@@ -28,7 +28,7 @@
|
|
|
任职机构:
|
|
|
</view>
|
|
|
<view class="text">
|
|
|
- {{authority ? user.employment : ''}}
|
|
|
+ {{isLogin ? user.employment : ''}}
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="info-item-box">
|
|
@@ -36,7 +36,7 @@
|
|
|
机构备案证号:
|
|
|
</view>
|
|
|
<view class="text">
|
|
|
- {{authority ? user.recordCertificateNumber : ''}}
|
|
|
+ {{isLogin ? user.recordCertificateNumber : ''}}
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -46,14 +46,20 @@
|
|
|
我的证明
|
|
|
</view>
|
|
|
<view class="list-box">
|
|
|
- <view class="list-item-box" :class="[authority ? 'zhongjie-front-zhiyin' : 'zhongjie-front-login']">
|
|
|
+ <view class="list-item-box" @click="onShowCreditCard(creditCard.id)">
|
|
|
+ <CreditCard :isLogin="isLogin" :data="creditCard" @guide="onCreditCardGuideClick()"></CreditCard>
|
|
|
</view>
|
|
|
- <view class="list-item-box" :class="[authority ? 'zhongjie-back-zhiyin' : 'zhongjie-back-login']">
|
|
|
+ <view class="list-item-box" :class="[isLogin ? (user.zhongjierenzheng ? 'zhongjie-back' : 'zhongjie-back-zhiyin') : 'zhongjie-back-login']" @click="onZhongJieRenZhengClick(user.zhongjierenzheng)">
|
|
|
</view>
|
|
|
- <view class="list-item-box" :class="[authority ? 'anjie-back-zhiyin' : 'anjie-back-login']">
|
|
|
+ <view class="list-item-box" :class="[isLogin ? (user.anjierenzheng ? 'anjie-back' : 'anjie-back-zhiyin') : 'anjie-back-login']" @click="onAnJieRenZhengClick(user.anjierenzheng)">
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <u-popup v-model="showCreditCard" mode="center">
|
|
|
+ <view class="certificate-preview-box">
|
|
|
+ <CreditCard :isLogin="isLogin" size="normal red" :data="creditCard"></CreditCard>
|
|
|
+ </view>
|
|
|
+ </u-popup>
|
|
|
<view class="menu-box">
|
|
|
<view class="menu-item-box">
|
|
|
<view class="icon-box">
|
|
@@ -66,7 +72,7 @@
|
|
|
<view class="iconfont icon-chevron-right"></view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="menu-item-box">
|
|
|
+ <view class="menu-item-box" @click="onWoDeDingDan()">
|
|
|
<view class="icon-box">
|
|
|
<view class="iconfont icon-dingdan"></view>
|
|
|
</view>
|
|
@@ -99,7 +105,7 @@
|
|
|
<view class="iconfont icon-chevron-right"></view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="menu-item-box">
|
|
|
+ <view class="menu-item-box" @click="onChangJianWenTi()">
|
|
|
<view class="icon-box">
|
|
|
<view class="iconfont icon-anquan"></view>
|
|
|
</view>
|
|
@@ -110,7 +116,7 @@
|
|
|
<view class="iconfont icon-chevron-right"></view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="menu-item-box">
|
|
|
+ <view class="menu-item-box" @click="onLianXiWoMen()">
|
|
|
<view class="icon-box">
|
|
|
<view class="iconfont icon-yonghuzu"></view>
|
|
|
</view>
|
|
@@ -137,19 +143,92 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
- import { ref } from 'vue'
|
|
|
+ import CreditCard from '@/components/creditCard.vue'
|
|
|
+
|
|
|
+ import { ref, computed } from 'vue'
|
|
|
import { onLoad } from '@dcloudio/uni-app'
|
|
|
+ import { getToken } from '@/utils/auth.js'
|
|
|
|
|
|
+ // 用户信息
|
|
|
const user = ref({
|
|
|
icon: 'jiaoyu',
|
|
|
username: '某某某',
|
|
|
employment: '广州市xx地产有限公司',
|
|
|
- recordCertificateNumber: '123xxxx'
|
|
|
+ recordCertificateNumber: '123xxxx',
|
|
|
+ zhongjierenzheng: true, // 中介认证
|
|
|
+ anjierenzheng: true // 按揭认证
|
|
|
+ })
|
|
|
+
|
|
|
+ // 是否预览信用信息卡
|
|
|
+ const showCreditCard = ref(false)
|
|
|
+ // 信用信息卡
|
|
|
+ const creditCard = ref({
|
|
|
+ id: '1',
|
|
|
+ number: 'GZ2028000001',
|
|
|
+ name: '彭于晏',
|
|
|
+ time: '2018年6月22日',
|
|
|
+ publisher: '广州市住房和城乡建设委员会',
|
|
|
+ photo: 'https://ok.166.net/reunionpub/1_20210628_17a5105e667995566.jpeg',
|
|
|
+ qrCode: '/static/images/zhengshu/qrCode.png'
|
|
|
+ })
|
|
|
+ function onShowCreditCard(valid) {
|
|
|
+ showCreditCard.value = false
|
|
|
+ if (isLogin.value && valid) {
|
|
|
+ showCreditCard.value = true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 信息信用卡-点击指引
|
|
|
+ function onCreditCardGuideClick() {
|
|
|
+ console.log('点击-信息信用卡指引');
|
|
|
+ }
|
|
|
+ // 中介认证点击
|
|
|
+ function onZhongJieRenZhengClick(valid) {
|
|
|
+ if (!isLogin.value) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (valid) {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages/certificateDetail/certificateDetail?type=zhongjie&title=广州市房地产中介从业人员水平认证证书'
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ console.log('跳转中介认证报名指引');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 按揭认证点击
|
|
|
+ function onAnJieRenZhengClick(valid) {
|
|
|
+ if (!isLogin.value) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (valid) {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages/certificateDetail/certificateDetail?type=anjie&title=广州市房地产按揭从业人员水平认证证书'
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 点击-我的订单
|
|
|
+ function onWoDeDingDan() {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages/order/order'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ // 点击-常见问题
|
|
|
+ function onChangJianWenTi() {
|
|
|
+ console.log('点击-常见问题');
|
|
|
+ }
|
|
|
+ // 点击-联系我们
|
|
|
+ function onLianXiWoMen() {
|
|
|
+ console.log('点击-联系我们');
|
|
|
+ }
|
|
|
+
|
|
|
+ const isLogin = computed(() => {
|
|
|
+ return true
|
|
|
+ // return getToken() ? true : false
|
|
|
})
|
|
|
|
|
|
- const authority = ref('')
|
|
|
onLoad(() => {
|
|
|
- // authority.value = uni.getStorageSync('authority')
|
|
|
})
|
|
|
</script>
|
|
|
|
|
@@ -247,15 +326,6 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- .zhengshu-empty {
|
|
|
- @include backgroundImg('/static/images/zhengshu/zhengshu-empty.png')
|
|
|
- }
|
|
|
- .zhongjie-front-login {
|
|
|
- @include backgroundImg('/static/images/zhengshu/zhongjie-front-login.png')
|
|
|
- }
|
|
|
- .zhongjie-front-zhiyin {
|
|
|
- @include backgroundImg('/static/images/zhengshu/zhongjie-front-zhiyin.png')
|
|
|
- }
|
|
|
.zhongjie-back {
|
|
|
@include backgroundImg('/static/images/zhengshu/zhongjie-back.png')
|
|
|
}
|
|
@@ -277,6 +347,11 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ .certificate-preview-box {
|
|
|
+ height: 65vh;
|
|
|
+ width: 75vw;
|
|
|
+ }
|
|
|
+
|
|
|
.menu-box {
|
|
|
padding: 20rpx 20rpx;
|
|
|
margin: 10rpx 0;
|