fix: 问题修复
This commit is contained in:
parent
4cc1e6853f
commit
f4e2f87b6e
@ -3,12 +3,7 @@
|
||||
<view class="consult-title">咨询互动</view>
|
||||
|
||||
<view class="consult-grid">
|
||||
<view
|
||||
class="consult-item"
|
||||
v-for="item in consultItems"
|
||||
:key="item.id"
|
||||
@click="handleItemClick(item)"
|
||||
>
|
||||
<view class="consult-item" v-for="item in consultItems" :key="item.id" @click="handleItemClick(item)">
|
||||
<view class="item-icon">
|
||||
<image :src="item.icon" class="icon-img" mode="aspectFill" />
|
||||
</view>
|
||||
@ -17,14 +12,8 @@
|
||||
</view>
|
||||
|
||||
<!-- 选择咨询人弹窗 -->
|
||||
<select-consultant-popup
|
||||
ref="consultantPopup"
|
||||
:customers="customers"
|
||||
:corpId="corpId"
|
||||
:teamId="teamId"
|
||||
@confirm="handleConsultantConfirm"
|
||||
@addNew="handleAddNewArchive"
|
||||
/>
|
||||
<select-consultant-popup ref="consultantPopup" :customers="customers" :corpId="corpId" :teamId="teamId"
|
||||
@confirm="handleConsultantConfirm" @addNew="handleAddNewArchive" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -41,6 +30,10 @@ const props = defineProps({
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
team: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
},
|
||||
teamId: {
|
||||
type: String,
|
||||
default: "",
|
||||
@ -84,6 +77,10 @@ const consultItems = ref([
|
||||
function handleItemClick(item) {
|
||||
// 聊天咨询需要选择咨询人
|
||||
if (item.needSelectConsultant) {
|
||||
if (!props.team || !props.team.creator) {
|
||||
return toast('该团队暂未开放咨询服务')
|
||||
}
|
||||
|
||||
if (!props.customers || props.customers.length === 0) {
|
||||
toast("请先添加档案");
|
||||
// 跳转到档案管理页面
|
||||
@ -121,7 +118,7 @@ async function handleConsultantConfirm(customer) {
|
||||
const res = await api("createConsultGroup", {
|
||||
teamId: props.teamId,
|
||||
corpId: props.corpId,
|
||||
customerId: customer._id,
|
||||
customerId: customer._id,
|
||||
customerImUserId: account.value.openid,
|
||||
});
|
||||
uni.hideLoading();
|
||||
|
||||
@ -170,7 +170,6 @@ const baseInfo = computed(() =>
|
||||
);
|
||||
const baseInfoError = computed(() => {
|
||||
const requiredTitles = baseInfo.value
|
||||
.filter((i) => i.required)
|
||||
.map((i) => i.title);
|
||||
return current.value && requiredTitles.some((i) => !current.value[i]);
|
||||
});
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
<customer-archive :corpId="corpId" :team="team" @update:customers="handleCustomersUpdate" />
|
||||
</view>
|
||||
<view class="home-section">
|
||||
<consult :corpId="corpId" :teamId="team.teamId" :customers="customers" />
|
||||
<consult :corpId="corpId" :teamId="team.teamId" :team="team" :customers="customers" />
|
||||
</view>
|
||||
<view class="home-section">
|
||||
<team-mate :team="team" />
|
||||
|
||||
@ -36,8 +36,8 @@
|
||||
<image class="flex-shrink-0 mr-10 section-icon" src="/static/homepage/out-phone.svg"></image>
|
||||
<view class="w-0 flex-grow text-lg font-semibold">对外联系电话</view>
|
||||
</view>
|
||||
<view class="mt-10 text-dark" :class="member.callNumber ? 'text-primary' : 'text-gray'" @click="callNumber()">
|
||||
{{ member.callNumber || '暂无联系电话' }}
|
||||
<view class="mt-10 text-dark" :class="member.externalContact ? 'text-primary' : 'text-gray'" @click="callNumber()">
|
||||
{{ member.externalContact || '暂无联系电话' }}
|
||||
</view>
|
||||
<view class="mt-20 flex items-center">
|
||||
<image class="flex-shrink-0 mr-10 section-icon" src="/static/homepage/sunshine-home.svg"></image>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user