parent
d499d750b3
commit
f22713668a
|
After Width: | Height: | Size: 2.5 KiB |
@ -1,230 +1,230 @@ |
||||
<template> |
||||
<div class="qipaomain"> |
||||
<div v-for="(item, index) in keywordslist" :key="index"> |
||||
<div class="footer-bar-btn an-move-left"> |
||||
|
||||
<a href="javascript:;" class="footer-items-list _line-fine-btn" v-show="item.name" @click="keywordsClick(item)"> |
||||
<img class="footer-items-img" :src="item.icon" alt="">{{ longToShort(item.name) }}</a> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</template> |
||||
|
||||
<script setup> |
||||
import { ref, computed, onMounted } from 'vue' |
||||
import { storeToRefs } from 'pinia' |
||||
import { useAppStore } from '@/store/app.js' |
||||
import { Post } from '@/utils/https' |
||||
import { jumpOpenWeb } from '@/utils' |
||||
import footerBarBtnIcon from '@/assets/images/footer-bar-btn-icon.png' |
||||
import footerBarBtnIcon2 from '@/assets/images/footer-bar-btn-icon2.png' |
||||
import footerBarBtnIcon3 from '@/assets/images/footer-bar-btn-icon3.png' |
||||
import footerBarBtnIcon4 from '@/assets/images/footer-bar-btn-icon4.png' |
||||
|
||||
defineEmits(['onFooterBtnChoose']) |
||||
|
||||
const store = useAppStore() |
||||
const { source, planCode, userInfo, manualService, mescrollContent, elder, isChatLoading } = |
||||
storeToRefs(store) |
||||
|
||||
const keywordslist = ref([ |
||||
{ name: "查保单", icon: footerBarBtnIcon, URL: "https://yzsslfw.cpiccdn.com/accept_pad/index.html#/phone/base/wxxcxHomeSearch?source=wxxcx&bqtype=search&ticket=%s" }, |
||||
{ name: "查收益", icon: footerBarBtnIcon2, URL: "https://yzsslfw.cpiccdn.com/accept_pad/index.html#/phone/base/wxxcxHomeSearch?source=wxxcx&bqtype=search&ticket=%s" }, |
||||
{ name: "贷还款", icon: footerBarBtnIcon3, URL: "https://yzsslfw.cpiccdn.com/accept_pad/index.html#/phone/infoChange/eye?source=wxxcx&bqtype=search&ticket=%s" }, |
||||
{ name: "续期交费", icon: footerBarBtnIcon4, URL: "/packageAgent/pages/renewalPayment/renewalPayment?source_channel=GDFW&ticket=%s" }, |
||||
]) |
||||
|
||||
const keyWordshow = computed(() => keywordslist.value.length > 0) |
||||
const isRobotService = computed(() => String(manualService.value) === '1') |
||||
|
||||
function scrollTopBody() { |
||||
setTimeout(() => { |
||||
// 滚动到底部 |
||||
try { |
||||
const el = mescrollContent.value |
||||
if (el) el.scrollTop = el.scrollHeight || 0 |
||||
} catch (error) { |
||||
console.log(error.message) |
||||
} |
||||
}, 300) |
||||
} |
||||
|
||||
function keywordsClick(item) { |
||||
// 只把问题写入对话气泡,不走对话接口 |
||||
store.addSendMessageList({ msgText: item.name, reqAndResType: '1' }) |
||||
// 没有机器人回复来复位打字动画,这里手动复位,避免"正在输入"一直转 |
||||
isChatLoading.value = false |
||||
scrollTopBody() |
||||
|
||||
jumpOpenWeb('YY_GWXCX', item.URL) |
||||
} |
||||
|
||||
async function initFooterBtn() { |
||||
const param = { |
||||
category: 4, |
||||
source: source.value, |
||||
planCode: planCode.value, |
||||
keyWord: '', |
||||
sceneId: userInfo.value?.sceneId || '', |
||||
} |
||||
|
||||
try { |
||||
const res = await Post('config/activity', param) |
||||
if (res.code && res.code != 0) return |
||||
keywordslist.value = res.data |
||||
// for (let i = 0; i < 3; i++) { |
||||
// const list = [] |
||||
// for (let j = 0; j < 3; j++) { |
||||
// if (res.data[i * 3 + j]) list[j] = res.data[i * 3 + j] |
||||
// } |
||||
// // 将list添加到keywordslist的首位 |
||||
// if (list.length > 0) keywordslist.value.unshift(list) |
||||
// } |
||||
} catch (error) { |
||||
console.log(error) |
||||
} |
||||
} |
||||
|
||||
function longToShort(name) { |
||||
// return 111 |
||||
// console.log(name, 1111) |
||||
return name.length > 6 ? name.slice(0, 5) + '...' : name |
||||
} |
||||
|
||||
onMounted(() => { |
||||
// initFooterBtn() |
||||
}) |
||||
</script> |
||||
|
||||
<style scoped> |
||||
.qipaomain { |
||||
background-color: #ebf1ff; |
||||
overflow-x: auto; |
||||
display: flex; |
||||
padding: 0 16rem; |
||||
gap: 8rem; |
||||
scrollbar-width: none; |
||||
-ms-overflow-style: none; |
||||
-webkit-overflow-scrolling: touch; |
||||
} |
||||
|
||||
.qipaomain::-webkit-scrollbar { |
||||
display: none; |
||||
} |
||||
|
||||
.footer-bar-btn { |
||||
height: auto; |
||||
line-height: 3rem; |
||||
overflow-x: scroll; |
||||
overflow-y: hidden; |
||||
/* padding: 0 9.5rem; */ |
||||
white-space: nowrap; |
||||
text-align: left; |
||||
-webkit-overflow-scrolling: touch; |
||||
} |
||||
|
||||
.footer-bar-btn::-webkit-scrollbar { |
||||
display: none; |
||||
} |
||||
|
||||
.footer-items-list { |
||||
display: inline-block; |
||||
font-family: 'SourceHanSansCN-Normal'; |
||||
font-size: 13rem; |
||||
line-height: 13rem; |
||||
color: #17204D; |
||||
letter-spacing: 0; |
||||
text-align: justify; |
||||
padding: 6.5rem 10rem; |
||||
position: relative; |
||||
/* border-radius: 82rem; */ |
||||
-webkit-animation: slideInRight 0.5s ease-in-out both; |
||||
animation: slideInRight 0.5s ease-in-out both; |
||||
display: flex; |
||||
background: linear-gradient(140deg, #dcfcff 6%, #ffffffbf 18%, #ffffff 56%); |
||||
box-sizing: border-box; |
||||
border-image: linear-gradient(115deg, #ffffff 4%, #ffffff 89%) 1.2; |
||||
backdrop-filter: blur(14px); |
||||
/* box-shadow: 0px 4px 10px 0px rgba(181, 189, 216, 0.3); */ |
||||
z-index: 3; |
||||
border-radius: 101rem; |
||||
} |
||||
|
||||
.footerBtn .footer-items-list:active { |
||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0); |
||||
color: #fff !important; |
||||
background-color: #8ec2ff !important; |
||||
} |
||||
|
||||
.footer-items-list:nth-child(2) { |
||||
-webkit-animation-delay: 0.2s; |
||||
animation-delay: 0.2s; |
||||
} |
||||
|
||||
.footer-items-list:nth-child(3) { |
||||
-webkit-animation-delay: 0.4s; |
||||
animation-delay: 0.4s; |
||||
} |
||||
|
||||
.footer-items-list:nth-child(4) { |
||||
-webkit-animation-delay: 0.6s; |
||||
animation-delay: 0.6s; |
||||
} |
||||
|
||||
.footer-items-list:nth-child(5) { |
||||
-webkit-animation-delay: 0.8s; |
||||
animation-delay: 0.8s; |
||||
} |
||||
|
||||
.footer-items-list:nth-child(6) { |
||||
-webkit-animation-delay: 1s; |
||||
animation-delay: 1s; |
||||
} |
||||
|
||||
.footer-items-list:nth-child(7) { |
||||
-webkit-animation-delay: 1.2s; |
||||
animation-delay: 1.2s; |
||||
} |
||||
|
||||
.footer-items-list:nth-child(8) { |
||||
-webkit-animation-delay: 1.4s; |
||||
animation-delay: 1.4s; |
||||
} |
||||
|
||||
.footer-items-list:nth-child(9) { |
||||
-webkit-animation-delay: 1.6s; |
||||
animation-delay: 1.6s; |
||||
} |
||||
|
||||
.footer-items-list:nth-child(10) { |
||||
-webkit-animation-delay: 1.8s; |
||||
animation-delay: 1.8s; |
||||
} |
||||
|
||||
.footer-items-list:nth-child(11) { |
||||
-webkit-animation-delay: 2s; |
||||
animation-delay: 2s; |
||||
} |
||||
|
||||
.elder-wrapper { |
||||
padding: 0 16rem; |
||||
} |
||||
|
||||
.elder-wrapper .footer-items-list { |
||||
font-family: PingFangSC-Medium; |
||||
font-size: 18rem; |
||||
line-height: 18rem; |
||||
color: #025cea; |
||||
margin: 0 8rem 6rem 0; |
||||
} |
||||
|
||||
.elder-wrapper ._line-fine-btn::before { |
||||
border: 0.5rem solid #dddddd; |
||||
} |
||||
|
||||
.footer-items-img { |
||||
height: 14rem; |
||||
width: 14rem; |
||||
margin-right: 2rem; |
||||
} |
||||
</style> |
||||
<template> |
||||
<div class="qipaomain"> |
||||
<div v-for="(item, index) in keywordslist" :key="index"> |
||||
<div class="footer-bar-btn an-move-left"> |
||||
|
||||
<a href="javascript:;" class="footer-items-list _line-fine-btn" v-show="item.name" @click="keywordsClick(item)"> |
||||
<img class="footer-items-img" :src="item.icon" alt="">{{ longToShort(item.name) }}</a> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</template> |
||||
|
||||
<script setup> |
||||
import { ref, computed, onMounted } from 'vue' |
||||
import { storeToRefs } from 'pinia' |
||||
import { useAppStore } from '@/store/app.js' |
||||
import { Post } from '@/utils/https' |
||||
import { jumpOpenWeb } from '@/utils' |
||||
import footerBarBtnIcon from '@/assets/images/footer-bar-btn-icon.png' |
||||
import footerBarBtnIcon2 from '@/assets/images/footer-bar-btn-icon2.png' |
||||
import footerBarBtnIcon3 from '@/assets/images/footer-bar-btn-icon3.png' |
||||
import footerBarBtnIcon4 from '@/assets/images/footer-bar-btn-icon4.png' |
||||
|
||||
defineEmits(['onFooterBtnChoose']) |
||||
|
||||
const store = useAppStore() |
||||
const { source, planCode, userInfo, manualService, mescrollContent, elder, isChatLoading } = |
||||
storeToRefs(store) |
||||
|
||||
const keywordslist = ref([ |
||||
{ name: "查保单", icon: footerBarBtnIcon, URL: "https://yzsslfw.cpiccdn.com/accept_pad/index.html#/phone/base/wxxcxHomeSearch?source=wxxcx&bqtype=search&ticket=%s" }, |
||||
{ name: "查收益", icon: footerBarBtnIcon2, URL: "https://yzsslfw.cpiccdn.com/accept_pad/index.html#/phone/base/wxxcxHomeSearch?source=wxxcx&bqtype=search&ticket=%s" }, |
||||
{ name: "贷还款", icon: footerBarBtnIcon3, URL: "https://yzsslfw.cpiccdn.com/accept_pad/index.html#/phone/infoChange/eye?source=wxxcx&bqtype=search&ticket=%s" }, |
||||
{ name: "续期交费", icon: footerBarBtnIcon4, URL: "/packageAgent/pages/renewalPayment/renewalPayment?source_channel=GDFW&ticket=%s" }, |
||||
]) |
||||
|
||||
const keyWordshow = computed(() => keywordslist.value.length > 0) |
||||
const isRobotService = computed(() => String(manualService.value) === '1') |
||||
|
||||
function scrollTopBody() { |
||||
setTimeout(() => { |
||||
// 滚动到底部 |
||||
try { |
||||
const el = mescrollContent.value |
||||
if (el) el.scrollTop = el.scrollHeight || 0 |
||||
} catch (error) { |
||||
console.log(error.message) |
||||
} |
||||
}, 300) |
||||
} |
||||
|
||||
function keywordsClick(item) { |
||||
// 只把问题写入对话气泡,不走对话接口 |
||||
store.addSendMessageList({ msgText: item.name, reqAndResType: '1', sendLoading: false }) |
||||
// 没有机器人回复来复位打字动画,这里手动复位,避免"正在输入"一直转 |
||||
isChatLoading.value = false |
||||
scrollTopBody() |
||||
|
||||
jumpOpenWeb('YY_GWXCX', item.URL) |
||||
} |
||||
|
||||
async function initFooterBtn() { |
||||
const param = { |
||||
category: 4, |
||||
source: source.value, |
||||
planCode: planCode.value, |
||||
keyWord: '', |
||||
sceneId: userInfo.value?.sceneId || '', |
||||
} |
||||
|
||||
try { |
||||
const res = await Post('config/activity', param) |
||||
if (res.code && res.code != 0) return |
||||
keywordslist.value = res.data |
||||
// for (let i = 0; i < 3; i++) { |
||||
// const list = [] |
||||
// for (let j = 0; j < 3; j++) { |
||||
// if (res.data[i * 3 + j]) list[j] = res.data[i * 3 + j] |
||||
// } |
||||
// // 将list添加到keywordslist的首位 |
||||
// if (list.length > 0) keywordslist.value.unshift(list) |
||||
// } |
||||
} catch (error) { |
||||
console.log(error) |
||||
} |
||||
} |
||||
|
||||
function longToShort(name) { |
||||
// return 111 |
||||
// console.log(name, 1111) |
||||
return name.length > 6 ? name.slice(0, 5) + '...' : name |
||||
} |
||||
|
||||
onMounted(() => { |
||||
// initFooterBtn() |
||||
}) |
||||
</script> |
||||
|
||||
<style scoped> |
||||
.qipaomain { |
||||
background-color: #ebf1ff; |
||||
overflow-x: auto; |
||||
display: flex; |
||||
padding: 0 16rem; |
||||
gap: 8rem; |
||||
scrollbar-width: none; |
||||
-ms-overflow-style: none; |
||||
-webkit-overflow-scrolling: touch; |
||||
} |
||||
|
||||
.qipaomain::-webkit-scrollbar { |
||||
display: none; |
||||
} |
||||
|
||||
.footer-bar-btn { |
||||
height: auto; |
||||
line-height: 3rem; |
||||
overflow-x: scroll; |
||||
overflow-y: hidden; |
||||
/* padding: 0 9.5rem; */ |
||||
white-space: nowrap; |
||||
text-align: left; |
||||
-webkit-overflow-scrolling: touch; |
||||
} |
||||
|
||||
.footer-bar-btn::-webkit-scrollbar { |
||||
display: none; |
||||
} |
||||
|
||||
.footer-items-list { |
||||
display: inline-block; |
||||
font-family: 'SourceHanSansCN-Normal'; |
||||
font-size: 13rem; |
||||
line-height: 13rem; |
||||
color: #17204D; |
||||
letter-spacing: 0; |
||||
text-align: justify; |
||||
padding: 6.5rem 10rem; |
||||
position: relative; |
||||
/* border-radius: 82rem; */ |
||||
-webkit-animation: slideInRight 0.5s ease-in-out both; |
||||
animation: slideInRight 0.5s ease-in-out both; |
||||
display: flex; |
||||
background: linear-gradient(140deg, #dcfcff 6%, #ffffffbf 18%, #ffffff 56%); |
||||
box-sizing: border-box; |
||||
border-image: linear-gradient(115deg, #ffffff 4%, #ffffff 89%) 1.2; |
||||
backdrop-filter: blur(14px); |
||||
/* box-shadow: 0px 4px 10px 0px rgba(181, 189, 216, 0.3); */ |
||||
z-index: 3; |
||||
border-radius: 101rem; |
||||
} |
||||
|
||||
.footerBtn .footer-items-list:active { |
||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0); |
||||
color: #fff !important; |
||||
background-color: #8ec2ff !important; |
||||
} |
||||
|
||||
.footer-items-list:nth-child(2) { |
||||
-webkit-animation-delay: 0.2s; |
||||
animation-delay: 0.2s; |
||||
} |
||||
|
||||
.footer-items-list:nth-child(3) { |
||||
-webkit-animation-delay: 0.4s; |
||||
animation-delay: 0.4s; |
||||
} |
||||
|
||||
.footer-items-list:nth-child(4) { |
||||
-webkit-animation-delay: 0.6s; |
||||
animation-delay: 0.6s; |
||||
} |
||||
|
||||
.footer-items-list:nth-child(5) { |
||||
-webkit-animation-delay: 0.8s; |
||||
animation-delay: 0.8s; |
||||
} |
||||
|
||||
.footer-items-list:nth-child(6) { |
||||
-webkit-animation-delay: 1s; |
||||
animation-delay: 1s; |
||||
} |
||||
|
||||
.footer-items-list:nth-child(7) { |
||||
-webkit-animation-delay: 1.2s; |
||||
animation-delay: 1.2s; |
||||
} |
||||
|
||||
.footer-items-list:nth-child(8) { |
||||
-webkit-animation-delay: 1.4s; |
||||
animation-delay: 1.4s; |
||||
} |
||||
|
||||
.footer-items-list:nth-child(9) { |
||||
-webkit-animation-delay: 1.6s; |
||||
animation-delay: 1.6s; |
||||
} |
||||
|
||||
.footer-items-list:nth-child(10) { |
||||
-webkit-animation-delay: 1.8s; |
||||
animation-delay: 1.8s; |
||||
} |
||||
|
||||
.footer-items-list:nth-child(11) { |
||||
-webkit-animation-delay: 2s; |
||||
animation-delay: 2s; |
||||
} |
||||
|
||||
.elder-wrapper { |
||||
padding: 0 16rem; |
||||
} |
||||
|
||||
.elder-wrapper .footer-items-list { |
||||
font-family: PingFangSC-Medium; |
||||
font-size: 18rem; |
||||
line-height: 18rem; |
||||
color: #025cea; |
||||
margin: 0 8rem 6rem 0; |
||||
} |
||||
|
||||
.elder-wrapper ._line-fine-btn::before { |
||||
border: 0.5rem solid #dddddd; |
||||
} |
||||
|
||||
.footer-items-img { |
||||
height: 14rem; |
||||
width: 14rem; |
||||
margin-right: 2rem; |
||||
} |
||||
</style> |
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue