emis-sapp/components/buns-post-edit-templates/bpe-bindedpost-tmp.vue
2024-10-31 13:13:32 +08:00

94 lines
2.0 KiB
Vue

<template>
<u-row justify="between">
<u-row @click="handleChooseEmp" custom-style="flex:1;">
<view class="">
<u-avatar size="80" :src="modelInfo._bindTsmAvatar"></u-avatar>
</view>
<view class="ml-10">
<view class="clr-sub font-26">您的专属快递员</view>
<view class="pt-5 font-26">
<text v-if="modelInfo._bindTsmName">{{modelInfo._bindTsmName}}</text>
<u-row v-else>
<u-icon name="attach" size="30"></u-icon>
去绑定
</u-row>
</view>
</view>
</u-row>
<u-row>
<view @click="handleConnect" class="text-center">
<u-icon name="kefu-ermai" size="40" custom-style="margin: 0 auto;"></u-icon>
<text class="pt-10">客服</text>
</view>
</u-row>
</u-row>
</template>
<script>
import * as apiService from "@/common/api"
import { pageEventNames } from "@/common/enum"
export default {
computed: {
modelInfo: {
get(){
return this.value
}
},
kefuH5Url() {
return this.$store.getters.kefuH5Url
},
},
watch: {
},
props: {
value: {
default () {
return { }
}
}
},
data() {
return {
}
},
created() {
this.initEvent()
},
onHide() {
},
unmounted() {
uni.$off(pageEventNames.chooseEpm, this.chooseEmpEventBack)
},
methods: {
initEvent() {
if(!this.disabled) {
uni.$on(pageEventNames.chooseEpm, this.chooseEmpEventBack)
}
},
chooseEmpEventBack({ data, queryOption }){
const { tab } = queryOption
let isChange = false
let oldData = this.modelInfo
if(oldData.empName != data.empName) {
this.modelInfo._bindTsmName = data.empName
this.modelInfo._bindTsmCode = data.empCode
this.modelInfo._bindTsmAvatar = data.avatar
this.$emit("onChange", this.modelInfo)
}
},
handleChooseEmp(){
this.goto(`user/exclusiveCourier?type=choose`)
},
handleConnect(){
this.gotoWebview({ url: `${this.kefuH5Url}` })
},
}
}
</script>
<style scoped lang="scss">
</style>