Commit 03696a96 authored by chenqikuai's avatar chenqikuai

fix

parent 10310604
......@@ -19,7 +19,7 @@
name="icon-kefu"
class="absolute left-11"
size="18"
@click="$router.push({name:'Chat'})"
@click="$emit('clickSecondIcon')"
:color="iconColor"
/>
<icon
......@@ -41,6 +41,7 @@ import { defineComponent } from "vue";
import Icon from "../common/Icon.vue";
export default defineComponent({
inheritAttrs: false,
emits: ['clickSecondIcon'],
components: { Icon },
props: {
title: {
......
......@@ -14,6 +14,8 @@ import { filterGuaranteeType } from "@/utils/guarantee-type"
import { Skeleton } from "vant"
import { iNearbyOutLet } from "@/service/AddressService/types"
import AddressService from "@/service/AddressService"
import router from "@/router";
import UserService from "@/service/UserService";
function isInViewPort(element: HTMLElement, barHeight: number) {
const viewWidth = window.innerWidth || document.documentElement.clientWidth;
......@@ -109,6 +111,34 @@ export default defineComponent({
window.onscroll = null;
});
const handleClickApply = async () => {
getOutletAndNavigateToChat();
}
const clickChatIcon = async () => {
getOutletAndNavigateToChat()
}
const getOutletAndNavigateToChat = async () => {
const ret = await AddressService.getInstance().getNearby({
bank_code: Number(process.env.VUE_APP_BANK_CODE),
number: 1,
})
if (ret.code === 200) {
const ret2 = await UserService.getInstance().contact_custom_service({
outLetID: ret.data[0].outlet_id as number
})
if (ret2.code == 200) {
router.push({
name: 'Chat',
query: {
target: ret2.data.addr
}
})
}
}
}
return () => (
<>
<div class="page flex-col">
......@@ -118,6 +148,7 @@ export default defineComponent({
iconColor={canSeeApplyBtn.value ? "white" : 'black'}
style={{ 'background': canSeeApplyBtn.value ? '#2C3C92 !important' : 'white !important', 'color': canSeeApplyBtn.value ? 'white' : 'black' }}
showSecondIcon={true}
onClickSecondIcon={clickChatIcon}
occupyPosition={false}
/>
<div class="block1 flex-col">
......@@ -251,6 +282,7 @@ export default defineComponent({
<div
class=" fixed left-0 right-0 bottom-0 h-12 bg-app-blue apply-btn flex items-center justify-center"
style={{ zIndex: 300 }}
onClick={handleClickApply}
>
立即申请
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment