|
|
@ -10,8 +10,10 @@ |
|
|
|
<view style="width: calc(100% - 120rpx); padding-left: 20rpx;box-sizing: border-box;"> |
|
|
|
<view class="base-leavel"> |
|
|
|
<text>{{getIsLogin()?userInfo.userName:"欢迎来到版宠师"}}</text> |
|
|
|
<image class="petMaster" :src="petMaster" mode="aspectFill"></image> |
|
|
|
<image class="petMaster" :src="partnerMaster" mode="aspectFill"></image> |
|
|
|
</view> |
|
|
|
<view> |
|
|
|
<image v-if="petMaster" class="role-tag" :src="petMaster" mode="aspectFill"></image> |
|
|
|
<image v-if="partnerMaster" class="role-tag" :src="partnerMaster" mode="aspectFill"></image> |
|
|
|
</view> |
|
|
|
<view> |
|
|
|
手机号:{{ userInfo?.userTelephone }} |
|
|
@ -87,12 +89,14 @@ |
|
|
|
height="68rpx"></up-image> |
|
|
|
<view>平台协议</view> |
|
|
|
</view> |
|
|
|
<view @click="openCustomerServiceChat" class="icon-list"> |
|
|
|
<up-image class="mb20" :show-loading="true" |
|
|
|
src="https://cdn.catmdogd.com/Work/image/work/icon3.png" width="68rpx" |
|
|
|
height="68rpx"></up-image> |
|
|
|
<view>联系客服</view> |
|
|
|
</view> |
|
|
|
<button plain class="btn-share" open-type="contact"> |
|
|
|
<view class="icon-list"> |
|
|
|
<up-image class="mb20" :show-loading="true" |
|
|
|
src="https://cdn.catmdogd.com/Work/image/work/icon3.png" width="68rpx" |
|
|
|
height="68rpx"></up-image> |
|
|
|
<view>联系客服</view> |
|
|
|
</view> |
|
|
|
</button> |
|
|
|
<button plain class="btn-share" open-type="share"> |
|
|
|
<view class="icon-list"> |
|
|
|
<up-image class="mb20" :show-loading="true" |
|
|
@ -183,22 +187,36 @@ |
|
|
|
const show = ref(false) |
|
|
|
const content = ref("") |
|
|
|
const modal = ref(null) |
|
|
|
const petMasterLevel = ref(1) |
|
|
|
const partnerLevel = ref(0) |
|
|
|
|
|
|
|
const LEVEL_AND_KEY_FIELDS_MAPPING = { |
|
|
|
'1': 'primary', |
|
|
|
'2': 'intermediate', |
|
|
|
'3': 'senior', |
|
|
|
} |
|
|
|
|
|
|
|
// 按伴宠师等级选中图标 |
|
|
|
const petMaster = computed(() => { |
|
|
|
const paths = [configList.value?.pet_primary?.paramValueImage, configList.value?.pet_senior |
|
|
|
?.paramValueImage |
|
|
|
]; |
|
|
|
return paths[petMasterLevel.value]; |
|
|
|
const { userBcs, userBcsRole } = userInfo.value |
|
|
|
|
|
|
|
if (!userBcs) { |
|
|
|
return '' |
|
|
|
} |
|
|
|
|
|
|
|
const key = `pet_${LEVEL_AND_KEY_FIELDS_MAPPING[userBcsRole]}` |
|
|
|
|
|
|
|
return configList.value?.[key]?.paramValueImage |
|
|
|
}) |
|
|
|
// 按合伙人等级选中图标 |
|
|
|
const partnerMaster = computed(() => { |
|
|
|
const paths = [configList.value?.partner_intermediate?.paramValueImage, configList.value?.partner_senior |
|
|
|
?.paramValueImage |
|
|
|
]; |
|
|
|
return paths[partnerLevel.value]; |
|
|
|
const { userHh } = userInfo.value |
|
|
|
|
|
|
|
if (!userHh) { |
|
|
|
return '' |
|
|
|
} |
|
|
|
|
|
|
|
const key = `partner_${LEVEL_AND_KEY_FIELDS_MAPPING[userHh]}` |
|
|
|
|
|
|
|
return configList.value?.[key]?.paramValueImage |
|
|
|
}) |
|
|
|
|
|
|
|
if (getIsLogin() && getToken()) { |
|
|
@ -270,23 +288,6 @@ |
|
|
|
// 取消退出登录回调 |
|
|
|
} |
|
|
|
|
|
|
|
// 定义 openCustomerServiceChat 方法,用于唤起客服会话界面 |
|
|
|
const openCustomerServiceChat = () => { |
|
|
|
uni.openCustomerServiceChat({ |
|
|
|
extInfo: { |
|
|
|
url: "https://work.weixin.qq.com/kfid/kfc135d138d063817e1" |
|
|
|
}, |
|
|
|
sessionFrom: '1000', |
|
|
|
// 成功回调函数 |
|
|
|
success: function(res) { |
|
|
|
console.log('成功打开客服会话', res); |
|
|
|
}, |
|
|
|
// 失败回调函数 |
|
|
|
fail: function(err) { |
|
|
|
console.error('打开客服会话失败', err); |
|
|
|
} |
|
|
|
}); |
|
|
|
}; |
|
|
|
</script> |
|
|
|
<style scoped lang="scss"> |
|
|
|
@import "index"; |
|
|
|