样式优化

master
wujingling0908 4 days ago
parent de0ea807f3
commit 770d0786a0
  1. 30
      src/assets/style/chat.css
  2. 2
      src/assets/style/reset.css
  3. 55
      src/components/appraise-popup.vue
  4. 5
      src/components/business-handle.vue
  5. 4
      src/components/edit-address.vue
  6. 253
      src/components/geriatric-discourse.vue
  7. 2
      src/components/gmNetwork-address.vue
  8. 31
      src/components/hot-question.vue
  9. 2
      src/components/network-address.vue
  10. 2
      src/components/problem-feedback.vue
  11. 2
      src/components/transfer-accounts.vue
  12. 3
      src/utils/https.js
  13. 1
      src/views/chat.vue

@ -14,7 +14,7 @@ button:disabled,
.historicRecords button.answer-items:active { .historicRecords button.answer-items:active {
background: transparent; background: transparent;
color: #5a9cff; color: #025cea;
} }
.historicRecords button.answer-items:disabled { .historicRecords button.answer-items:disabled {
@ -88,7 +88,7 @@ button:disabled,
/* background-color: #dadada; */ /* background-color: #dadada; */
padding: 5rem 5rem; padding: 5rem 5rem;
border-radius: 5rem; border-radius: 5rem;
color: #7E849F; color: #7e849f;
white-space: nowrap; white-space: nowrap;
} }
@ -219,7 +219,7 @@ img.avatarUrl-img[lazy="loading"] {
.enter-service-link { .enter-service-link {
font-family: NotoSansHans-Regular; font-family: NotoSansHans-Regular;
font-size: 14rem; font-size: 14rem;
color: #5a9cff; color: #025cea;
line-height: 21rem; line-height: 21rem;
background-color: transparent; background-color: transparent;
display: inline-block; display: inline-block;
@ -261,7 +261,7 @@ img.avatarUrl-img[lazy="loading"] {
background-color: #fff; background-color: #fff;
font-family: NotoSansHans-Regular; font-family: NotoSansHans-Regular;
font-size: 14rem; font-size: 14rem;
color: #5a9cff; color: #025cea;
position: relative; position: relative;
border: 0; border: 0;
} }
@ -324,7 +324,7 @@ img.avatarUrl-img[lazy="loading"] {
font-family: NotoSansHans-Regular; font-family: NotoSansHans-Regular;
font-size: 13rem; font-size: 13rem;
line-height: 20rem; line-height: 20rem;
color: #5a9cff; color: #025cea;
text-align: left; text-align: left;
position: relative; position: relative;
box-sizing: border-box; box-sizing: border-box;
@ -343,7 +343,7 @@ img.avatarUrl-img[lazy="loading"] {
top: 8rem; top: 8rem;
width: 4rem; width: 4rem;
height: 4rem; height: 4rem;
background-color: #5a9cff; background-color: #025cea;
border-radius: 4rem; border-radius: 4rem;
} }
@ -362,7 +362,7 @@ img.avatarUrl-img[lazy="loading"] {
.answer-help-btn { .answer-help-btn {
font-family: NotoSansHans-Regular; font-family: NotoSansHans-Regular;
font-size: 14rem; font-size: 14rem;
color: #5a9cff; color: #025cea;
line-height: 21rem; line-height: 21rem;
text-decoration: underline; text-decoration: underline;
background-color: transparent; background-color: transparent;
@ -381,7 +381,7 @@ img.avatarUrl-img[lazy="loading"] {
} }
.question-answer-con button { .question-answer-con button {
color: #5a9cff; color: #025cea;
background-color: transparent; background-color: transparent;
text-decoration: underline; text-decoration: underline;
} }
@ -456,7 +456,7 @@ img.avatarUrl-img[lazy="loading"] {
/* box-shadow: /* box-shadow:
1rem 2rem 5rem 0 rgba(10, 75, 173, 0.42), 1rem 2rem 5rem 0 rgba(10, 75, 173, 0.42),
inset 0 -4rem 15rem 0 rgba(164, 203, 255, 0.25); */ inset 0 -4rem 15rem 0 rgba(164, 203, 255, 0.25); */
border-radius: 100px; border-radius: 100px;
} }
.question-answer-con p .jump-web-button-disable, .question-answer-con p .jump-web-button-disable,
@ -476,7 +476,7 @@ img.avatarUrl-img[lazy="loading"] {
/* box-shadow: /* box-shadow:
1rem 2rem 5rem 0 rgba(45, 54, 67, 0.42), 1rem 2rem 5rem 0 rgba(45, 54, 67, 0.42),
inset 0 -4rem 15rem 0 rgba(204, 225, 251, 0.25); */ inset 0 -4rem 15rem 0 rgba(204, 225, 251, 0.25); */
border-radius: 100px; border-radius: 100px;
pointer-events: none; pointer-events: none;
margin: 16rem 0; margin: 16rem 0;
} }
@ -592,7 +592,7 @@ img.avatarUrl-img[lazy="loading"] {
text-align: center; text-align: center;
font-family: NotoSansHans-Regular; font-family: NotoSansHans-Regular;
font-size: 13rem; font-size: 13rem;
color: #5a9cff; color: #025cea;
line-height: 20rem; line-height: 20rem;
vertical-align: middle; vertical-align: middle;
outline: 0; outline: 0;
@ -606,7 +606,6 @@ img.avatarUrl-img[lazy="loading"] {
.help-button-item:first-child { .help-button-item:first-child {
position: relative; position: relative;
height: 100%;
overflow: hidden; overflow: hidden;
margin-right: 8rem; margin-right: 8rem;
} }
@ -639,7 +638,7 @@ img.avatarUrl-img[lazy="loading"] {
} }
.help-button-item:not(.active):disabled { .help-button-item:not(.active):disabled {
color: #5a9cff !important; color: #025cea !important;
} }
.help-button-item.active:disabled { .help-button-item.active:disabled {
@ -698,7 +697,6 @@ img.avatarUrl-img[lazy="loading"] {
font-size: 14rem; font-size: 14rem;
line-height: 21rem; line-height: 21rem;
color: #333333; color: #333333;
padding-left: 12rem;
word-break: break-all; word-break: break-all;
} }
@ -712,7 +710,9 @@ img.avatarUrl-img[lazy="loading"] {
word-wrap: break-word; word-wrap: break-word;
white-space: pre-wrap; white-space: pre-wrap;
} }
a {
color: #025cea;
}
.chat-left-txt.red-txt { .chat-left-txt.red-txt {
font-family: NotoSansHans-Medium; font-family: NotoSansHans-Medium;
color: #fc5454; color: #fc5454;

@ -38,7 +38,7 @@ textarea::-webkit-input-placeholder {
color: #999; color: #999;
opacity: 0.5; opacity: 0.5;
} }
a{ text-decoration:none;color: #5A9CFF;} a{ text-decoration:none;color: #025cea;}
.hide{ display:none !important;} .hide{ display:none !important;}
html,body{width: 100%;height: 100%;touch-action: none;overflow: hidden;} html,body{width: 100%;height: 100%;touch-action: none;overflow: hidden;}
body{background: #fff;} body{background: #fff;}

@ -2,14 +2,12 @@
<div class="appraise-popup-content"> <div class="appraise-popup-content">
<div class="wrapper-content" :class="elder ? 'elder-wrapper' : ''"> <div class="wrapper-content" :class="elder ? 'elder-wrapper' : ''">
<van-icon <van-icon
v-if="elder"
class="close-btn" class="close-btn"
name="cross" name="cross"
size="22" size="22"
color="#D0D2DB" color="#D0D2DB"
@click.stop="handleClose" @click.stop="handleClose"
/> />
<a v-else class="appraise-close-btn" href="javascript:;" @click.stop="handleClose">关闭</a>
<div v-if="elder" class="appraise-header-main-title">意见反馈</div> <div v-if="elder" class="appraise-header-main-title">意见反馈</div>
<div class="appraise-header-title">您的反馈对我们完善服务十分重要</div> <div class="appraise-header-title">您的反馈对我们完善服务十分重要</div>
<div class="appraise-main"> <div class="appraise-main">
@ -259,7 +257,7 @@ const submitForm = (type) => {
getReasonList() getReasonList()
</script> </script>
<style scoped> <style scoped lang="scss">
.appraise-popup-content { .appraise-popup-content {
display: flex; display: flex;
align-items: center; align-items: center;
@ -274,22 +272,6 @@ getReasonList()
position: relative; position: relative;
padding: 14rem 0 24rem 0; padding: 14rem 0 24rem 0;
} }
.wrapper-content .appraise-close-btn {
display: block;
position: absolute;
right: 10rem;
top: 14rem;
text-indent: -9999rem;
width: 16rem;
height: 16rem;
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAgCAYAAAB3j6rJAAAAAXNSR0IArs4c6QAABXlJREFUWAmtl31InVUcx7texbBaYVt5jTIoZro5Ih3RG5HaqD9K+yOHa/1RgZl653WZKURIBCuCdctp6h+1YFskg5K0P4YvxXKNQqIXeqEVvZDTstHE99c+39tznp57fe71mXjgcM75vXx/3+d3fs95zuO76AJaRUVFit/vv3tpaanE5/NtX1lZyWTMFATzEeYjjN9g043Nx52dnQte4X1eDKurq69cXFx8jiCPYX85fYqgwya4MJhHSDHms7yEfh6bt5KTk19sbW39WzaJWkIiXV1d/r6+vmcAbCKAwI8lJSV1ZWRk9DU3N8+6ASO/eHR0tHh5ebkM/R58p/A9UFxc/EpZWdmSm49kcYmEQqErpqen38VmF2DdpLupra3tu3hAbvKqqqoctugARErQn0hLS9sdDof/cbN1JcJWZC0sLJzA4Xoy8FR7e/ubbs5eZZWVlY+ToTew/yUlJWUXW/VrrO8qIjzFpdTDKQyvpT9AwX0S67SeNYV+J34f0H+nbm4nu5NOnCTnghT6SOURZLlsR9lGkVAMYQlT2IqhWJKb5jcTjWNjY49i0ITD/o6OjmNO3UbMh4eHfy4oKDhPjFBvb+8Z1l8ZXJtVMBhMnZub+wES49TETsYVY8Qe68wI0Rt5snEjTzSyFQEwwvSXwPvC2ILhA+9zxs2pqanZLS0tc9LZWwOJJ1ln4djgJCEjCi0LxyeY9hNgs2SJGnWWAcYgPg/ju8VpK2zFQJZlxYyobSIoH6F/BvsBp6PmZKGXt2c/0x30hGRqa2uvpthFYqveOHz19kU1xVAsxTSKCJGamppMHHfS3zOK2BHnV3EMIY9LhpRfNTs7qwfJtl77jlgcs1YsxVRsySJEODPuZ+7jteo2hm4jBfwaZPahW0VGJNiGAcBz1iIhbCuWz4pt18gN6OY5aL6XUaIGmRYCBbGxyVDoWyDQjyzXCwnhW7HmmSq2TSTA/CxPa78pUsZrbNMhbKvR59H7Kbp+iGzzSkK4VqyzTBU7esioBF4bmWkDrAl7ZSYPEo0QjFsTcXAVM0O6SI3wNJOA6uvquek1xm8PDsriCvWxV1vkGQBDxQRjSj4RIgh0oYlUrxcg6yxRTeThW6UtYb59fn5+QEXrBUM2iqnYmpuMaJFeX1+/ZlYcJHYAUsMWsSPtHSID8Db6oM4SgSdq+riiT8f+fyKAnJbTxMTEvYmcnSTwCapOjL2DTM7MzMygTlejcxs59IolN7EjGSksLDyJ7By9VEq35iSBvpbAh2LtDBnkN+l0XYOMYp2zYv+3NbrCkeYeFCUE1J00qtXV1aUjUE3oDanj2H49ysCxcJDJ5nP/kVvN6PaHiy7gPeb6GMmIhXMQxSa6XsmoRqofRKCaeBoS4Sily8KQYf+30u+LNQGvUbGQHzQ6mwj7/SVOR1Hs01XRGGjk1TzKkZyLje3o1LvNRQafrEAgoIuW3YRNnFrFUkyjsO8jErAt18H0a4zOsLyLp582hhsxgp8Gzkli3EiMPPB/M7h2RiSwFOUY3szyML8GUXrjtJ7RwjpsYZc7SQjPHwvK9e1HrnPKRGhycjK/qKioZ2hoSB+ndbeGhobLxsfHjwPwEEQa2JK3Y8FWEZEBZE7l5+f/iVOQ+0Up89PI9IG64MZ23MJH8UMcb6XXkAnXNy6qRmKjAHIPMv1k6Xr4Dv15gH5iXLPhq8/7C/Ryuu65u/EdZHRtCYnIgw/ZJi4vz/LmhFimkaVhxvcptiF+lv5gjBzRyDOxu4bxDvSlyPUPPM3JGcbuZS7JE6zjtjWJGE+eMMB8L4H0+3gbgVwLGf0y+k/R67Z3hCx42lLPRAC1mz73HOG5ZEl33chXGwIjPP0IZ8e3PP1ftrHHyb/+R6X+8I7cugAAAABJRU5ErkJggg==")
no-repeat center;
background-size: 100% 100%;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
.wrapper-content .appraise-close-btn:active {
opacity: 0.65;
}
.wrapper-content .appraise-header-title { .wrapper-content .appraise-header-title {
font-family: NotoSansHans-Bold; font-family: NotoSansHans-Bold;
font-size: 15rem; font-size: 15rem;
@ -315,12 +297,12 @@ getReasonList()
-webkit-tap-highlight-color: transparent; -webkit-tap-highlight-color: transparent;
} }
.appraise-item-box .cells-check-label .cell-ft { .appraise-item-box .cells-check-label .cell-ft {
border: 1rem solid #5a9cff; border: 1rem solid #025cea;
border-radius: 4rem; border-radius: 4rem;
font-family: NotoSansHans-Medium; font-family: NotoSansHans-Medium;
font-size: 15rem; font-size: 12rem;
line-height: 15rem; line-height: 15rem;
color: #5a9cff; color: #025cea;
text-align: center; text-align: center;
padding: 5rem 3rem; padding: 5rem 3rem;
display: inline-block; display: inline-block;
@ -335,7 +317,7 @@ getReasonList()
.appraise-item-box .cells-check-label .check-radio:checked + .text-checked, .appraise-item-box .cells-check-label .check-radio:checked + .text-checked,
.appraise-item-box .cells-check-label .text-checked.is-checked { .appraise-item-box .cells-check-label .text-checked.is-checked {
color: #fff; color: #fff;
background-color: #5a9cff; background-color: #025cea;
} }
.appraise-item-other { .appraise-item-other {
padding: 0 20rem; padding: 0 20rem;
@ -345,8 +327,8 @@ getReasonList()
width: 100%; width: 100%;
min-height: 60rem; min-height: 60rem;
max-height: 150rem; max-height: 150rem;
background: #f7f7f7; background: #fbfbfb;
border-radius: 4rem; border-radius: 8rem;
font-family: NotoSansHans-Regular; font-family: NotoSansHans-Regular;
font-size: 14rem; font-size: 14rem;
line-height: 21rem; line-height: 21rem;
@ -369,16 +351,16 @@ getReasonList()
display: block; display: block;
width: 100%; width: 100%;
height: 40rem; height: 40rem;
line-height: 40rem;
border: 0; border: 0;
background: #579aff; border-radius: 22rem;
box-shadow: 1rem 2rem 5rem 0 rgba(10, 75, 173, 0.42), background: linear-gradient(90deg, #025cea 0%, #0595f6 100%);
inset 0 -4rem 15rem 0 rgba(164, 203, 255, 0.25); color: #fff;
border-radius: 6rem; font-size: 14rem;
font-family: NotoSansHans-Regular; &:disabled {
font-size: 16rem; background: linear-gradient(270deg, #63a0ff 0%, #025cea 100%);
color: #ffffff; opacity: 0.3;
text-align: center; color: inherit;
}
} }
.elder-wrapper .appraise-header-main-title { .elder-wrapper .appraise-header-main-title {
@ -440,11 +422,6 @@ getReasonList()
border-radius: 4rem; border-radius: 4rem;
} }
.elder-wrapper .appraise-close-btn {
/* background: url() no-repeat; */
background-size: 100%;
}
.elder-wrapper .appraise-item-other textarea { .elder-wrapper .appraise-item-other textarea {
font-family: PingFangSC-Medium; font-family: PingFangSC-Medium;
font-size: 14rem; font-size: 14rem;

@ -36,7 +36,7 @@
/> />
<div class="item-content"> <div class="item-content">
<div>{{ item.name }}</div> <div>{{ item.name }}</div>
<van-icon name="arrow" color="#5A9CFF" /> <van-icon name="arrow" color="#025cea" />
</div> </div>
</div> </div>
</div> </div>
@ -159,7 +159,8 @@ defineExpose({
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
font-size: 15rem; font-size: 15rem;
i{ line-height: 26rem;
i {
padding-top: 4rem; padding-top: 4rem;
} }
} }

@ -55,7 +55,7 @@
<van-button <van-button
round round
block block
color="#5A9CFF" color="#025cea"
:disabled="submitDisabled" :disabled="submitDisabled"
:loading="submitLoad" :loading="submitLoad"
type="info" type="info"
@ -407,7 +407,7 @@ function submitInfo() {
} }
.customer-info { .customer-info {
color: #5a9cff; color: #025cea;
text-decoration: underline; text-decoration: underline;
} }

@ -1,13 +1,16 @@
<template> <template>
<div class="geriatric-discourse" v-if="dataMes"> <div class="geriatric-discourse" v-if="dataMes">
<div class="geriatric-discourse-content an-move-left"> <div class="geriatric-discourse-content an-move-left">
<div class="newBox" :style="{ 'backgroundImage': 'url(' + dataMes.imgUrl + ')' }"> <div class="newBox" :style="{ backgroundImage: 'url(' + dataMes.imgUrl + ')' }">
<button type="button" <button
:style="{ 'padding': ' 0 10rem', 'background': dataMes.btnBgcolor, 'color': dataMes.btnColor }" type="button"
v-text="dataMes.btnName" @click="connectionArtificial($event)"></button> :style="{ padding: ' 0 10rem', background: dataMes.btnBgcolor, color: dataMes.btnColor }"
</div> v-text="dataMes.btnName"
</div> @click="connectionArtificial($event)"
></button>
</div>
</div> </div>
</div>
</template> </template>
<script setup> <script setup>
@ -16,7 +19,7 @@ import { Loading, showToast } from 'vant'
import imageService from '@/utils/imageService' import imageService from '@/utils/imageService'
defineProps({ defineProps({
userInfos: { type: Object, default: () => ({}) } userInfos: { type: Object, default: () => ({}) }
}) })
const store = inject('appStore', null) const store = inject('appStore', null)
@ -31,162 +34,170 @@ const sendMessageList = inject('sendMessageList', ref([]))
const dataMes = ref('') const dataMes = ref('')
onMounted(() => { onMounted(() => {
initGeriatric() initGeriatric()
}) })
function initGeriatric() { function initGeriatric() {
store?.dispatch?.('post', { store?.dispatch?.('post', {
url: 'specialBtn/config', url: 'specialBtn/config',
data: { data: {
source: source.value, source: source.value,
btnType: userInfo.value && userInfo.value.vip ? 0 : 1 btnType: userInfo.value && userInfo.value.vip ? 0 : 1
} }
}).then(res => { }).then(res => {
console.log('老年人配置信息:', res.data) console.log('老年人配置信息:', res.data)
if (res.code && res.code != 0) { if (res.code && res.code != 0) {
showToast(res.msg) showToast(res.msg)
return return
} }
const imgKey = JSON.parse(res.data.imgUrl).url const imgKey = JSON.parse(res.data.imgUrl).url
imageService.getImageByKey(imgKey).then(imgUrl => { imageService.getImageByKey(imgKey).then(imgUrl => {
res.data.imgUrl = imgUrl res.data.imgUrl = imgUrl
dataMes.value = res.data dataMes.value = res.data
}).catch(err => { }).catch(err => {
console.error('获取图片失败:', err) console.error('获取图片失败:', err)
dataMes.value = res.data dataMes.value = res.data
})
}).catch(error => {
console.log(error)
}) })
}).catch(error => {
console.log(error)
})
} }
function connectionArtificial(event) { function connectionArtificial(event) {
try { try {
let current = event.currentTarget let current = event.currentTarget
let qaId = '' let qaId = ''
let sendParmas = { let sendParmas = {
reqAndResType: '1', reqAndResType: '1',
msgText: '&转人工服务&', msgText: '&转人工服务&',
msgSource: manualService.value msgSource: manualService.value
}
scrollTopBody()
store?.dispatch?.('connectionArtificial', sendParmas).then(() => {
current.disabled = true
}).catch(err => {
current.disabled = false
console.log(err)
})
getUserBehavior(qaId, '5', '老年客户或VIP用户转人工服务')
} catch (error) {
console.log(error)
} }
scrollTopBody()
store?.dispatch?.('connectionArtificial', sendParmas).then(() => {
current.disabled = true
}).catch(err => {
current.disabled = false
console.log(err)
})
getUserBehavior(qaId, '5', '老年客户或VIP用户转人工服务')
} catch (error) {
console.log(error)
}
} }
function getUserBehavior(qaId, eventType, eventMsg) { function getUserBehavior(qaId, eventType, eventMsg) {
let param = { qaId, eventType, eventMsg } let param = { qaId, eventType, eventMsg }
store?.dispatch?.('userBehavior', param).catch(err => { store?.dispatch?.('userBehavior', param).catch(err => {
console.log(err) console.log(err)
}) })
} }
function scrollTopBody() { function scrollTopBody() {
setTimeout(() => { setTimeout(() => {
try { try {
if (mescrollContent.value) { if (mescrollContent.value) {
mescrollContent.value.scrollTop = mescrollContent.value.scrollHeight || 0 mescrollContent.value.scrollTop = mescrollContent.value.scrollHeight || 0
} }
} catch (error) { } catch (error) {
console.log(error.message) console.log(error.message)
} }
}, 300) }, 300)
} }
</script> </script>
<style scoped> <style scoped lang="scss" >
.geriatric-discourse { .geriatric-discourse {
overflow: hidden; overflow: hidden;
padding-bottom: 10rem; padding-bottom: 10rem;
} }
.geriatric-discourse-content { .geriatric-discourse-content {
width: 100%; width: 100%;
display: -webkit-box; display: -webkit-box;
display: -webkit-flex; display: -webkit-flex;
display: flex; display: flex;
-webkit-box-pack: start; -webkit-box-pack: start;
-webkit-justify-content: flex-start; -webkit-justify-content: flex-start;
justify-content: flex-start; justify-content: flex-start;
-webkit-box-align: top; -webkit-box-align: top;
-webkit-align-items: top; -webkit-align-items: top;
align-items: top; align-items: top;
} }
.header-pic { .header-pic {
width: 36rem; width: 36rem;
height: 36rem; height: 36rem;
} }
.avatarUrl { .avatarUrl {
display: block; display: block;
width: 36rem; width: 36rem;
height: 36rem; height: 36rem;
border: 0; border: 0;
margin-top: auto; margin-top: auto;
margin-bottom: auto; margin-bottom: auto;
} }
.discourse-main-box { .discourse-main-box {
width: 100%; width: 100%;
margin-left: 10rem; margin-left: 10rem;
border-radius: 18rem; border-radius: 18rem;
padding: 7.5rem 14rem 0 14rem; padding: 7.5rem 14rem 0 14rem;
box-sizing: border-box; box-sizing: border-box;
background: #FFFFFF; background: #ffffff;
} }
.discourse-content { .discourse-content {
width: 100%; width: 100%;
font-family: NotoSansHans-Regular; font-family: NotoSansHans-Regular;
font-size: 14rem; font-size: 14rem;
line-height: 20rem; line-height: 20rem;
color: #333333; color: #333333;
} }
.discourse-button { .discourse-button {
width: 100%; width: 100%;
margin: 0 auto; margin: 0 auto;
text-align: center; text-align: center;
padding: 7rem 0 14rem 0; padding: 7rem 0 14rem 0;
} }
.discourse-button .button-rengong { .discourse-button .button-rengong {
width: 226rem; display: block;
margin: 0 auto; width: 100%;
background: #579AFF; height: 40rem;
box-shadow: 1rem 2rem 5rem 0 rgba(10, 75, 173, 0.42), inset 0 -4rem 15rem 0 rgba(164, 203, 255, 0.25); border: 0;
border-radius: 8rem; border-radius: 22rem;
font-family: NotoSansHans-Regular; margin: 0 auto;
background: linear-gradient(90deg, #025cea 0%, #0595f6 100%);
color: #fff;
font-size: 14rem;
&:disabled {
background: linear-gradient(270deg, #63a0ff 0%, #025cea 100%);
opacity: 0.3;
color: inherit;
}
} }
.newBox { .newBox {
width: 100%; width: 100%;
height: 100%; height: 100%;
background-size: cover; background-size: cover;
background-position: center; background-position: center;
background-repeat: no-repeat; background-repeat: no-repeat;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
padding: 20rem; padding: 20rem;
} }
.newBox button { .newBox button {
border-radius: 8rem; border-radius: 8rem;
border: none; border: none;
font-size: 16rem; font-size: 16rem;
cursor: pointer; cursor: pointer;
} }
</style> </style>

@ -35,7 +35,7 @@
<van-button <van-button
round round
block block
color="#5A9CFF" color="#025cea"
:disabled="submitDisabled" :disabled="submitDisabled"
:loading="submitLoad" :loading="submitLoad"
loading-text="变更中..." loading-text="变更中..."

@ -4,7 +4,7 @@
<div class="hotcontent"> <div class="hotcontent">
<div class="content_body"> <div class="content_body">
<van-tabs <van-tabs
v-model="active" v-model:active="active"
title-active-color="#025CEA" title-active-color="#025CEA"
@change="activeChange($event)" @change="activeChange($event)"
:ellipsis="false" :ellipsis="false"
@ -224,7 +224,7 @@ function autoIncre() {
// 截取当前每组的数据 // 截取当前每组的数据
function renderR() { function renderR() {
if (hotList.value) { if (hotList.value) {
newHotList.value = hotList.value.slice(num * timeStart.value, num * timeEnd.value) newHotList.value = _.cloneDeep(hotList.value.slice(num * timeStart.value, num * timeEnd.value))
} }
} }
@ -348,21 +348,7 @@ function activeChange(e) {
const tabIndex = active.value - 1 const tabIndex = active.value - 1
len = tabsList.value[tabIndex] ? tabsList.value[tabIndex].question.length : 0 len = tabsList.value[tabIndex] ? tabsList.value[tabIndex].question.length : 0
} }
footerMore.value = len > 4
console.log(`activeChange: active=${active.value}, len=${len}, isQA=${props.isQA}`)
// 当isQA=true时,第一页也需要显示展开收起功能
if ((active.value === 0 && !props.isQA)) {
footerMore.value = len > 4
}
// 当isQA=true且在第一页时,如果数据超过4条也要显示展开收起
if (props.isQA && active.value === 0) {
footerMore.value = len > 4
}
// 其他页签如果数据超过4条也要显示展开收起
if (active.value > 0) {
footerMore.value = len > 4
}
updateTabHeight() updateTabHeight()
} }
@ -519,6 +505,7 @@ function initTabList() {
nextTick(() => { nextTick(() => {
activeChange(active.value) activeChange(active.value)
updateTabHeight() updateTabHeight()
scrollTopBody()
}) })
} }
if (res.data && Array.isArray(res.data)) { if (res.data && Array.isArray(res.data)) {
@ -547,10 +534,11 @@ function initTabList() {
// 人工去掉第一个页签 // 人工去掉第一个页签
tabsList.value.shift() tabsList.value.shift()
} }
// 数据加载完成后更新高度 // 数据加载完成后更新高度,渲染完成滚到底部
nextTick(() => { nextTick(() => {
activeChange(active.value) activeChange(active.value)
updateTabHeight() updateTabHeight()
scrollTopBody()
}) })
} else { } else {
console.log('[hot-question] res.data 不是数组,无法生成页签:', res.data) console.log('[hot-question] res.data 不是数组,无法生成页签:', res.data)
@ -687,7 +675,6 @@ onMounted(() => {
min-height: 180rem; min-height: 180rem;
.van-tabs__nav1 { .van-tabs__nav1 {
font-weight: bold;
& :deep(.van-tabs__line) { & :deep(.van-tabs__line) {
width: 24rem !important; width: 24rem !important;
@ -786,7 +773,6 @@ onMounted(() => {
span { span {
font-size: 14rem; font-size: 14rem;
color: #17204d; color: #17204d;
font-weight: 700;
} }
.go { .go {
@ -811,7 +797,7 @@ onMounted(() => {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
font-size: 14rem; font-size: 12rem;
transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1); transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
cursor: pointer; cursor: pointer;
z-index: 1; z-index: 1;
@ -833,8 +819,7 @@ onMounted(() => {
} }
span { span {
font-size: 15rem; font-size: 12rem;
font-weight: 700;
margin-right: 4rem; margin-right: 4rem;
line-height: 15rem; line-height: 15rem;
} }

@ -30,7 +30,7 @@
<van-button <van-button
round round
block block
color="#5A9CFF" color="#025cea"
:disabled="submitDisabled" :disabled="submitDisabled"
:loading="submitLoad" :loading="submitLoad"
type="info" type="info"

@ -106,7 +106,7 @@
</van-field> </van-field>
</div> </div>
<div class="footer-btn"> <div class="footer-btn">
<van-button type="primary" color="#5A9CFF" block round native-type="submitForm" <van-button type="primary" color="#025cea" block round native-type="submitForm"
>确认提交</van-button >确认提交</van-button
> >
</div> </div>

@ -44,7 +44,7 @@
<van-button <van-button
round round
block block
color="#5A9CFF" color="#025cea"
:disabled="submitDisabled || disabled" :disabled="submitDisabled || disabled"
:loading="submitLoad" :loading="submitLoad"
loading-text="变更中..." loading-text="变更中..."

@ -273,9 +273,6 @@ export function Post(url, params) {
axios axios
.post(url, params) .post(url, params)
.then((res) => { .then((res) => {
if (res?.data?.code === 10022) {
toast(res.data.msg || '接口连接错误')
}
resolve(res.data) resolve(res.data)
}) })
.catch((err) => { .catch((err) => {

@ -197,6 +197,7 @@ const initToken = async () => {
const res = await getToken() const res = await getToken()
const data = res?.data const data = res?.data
if (!data) { if (!data) {
showToast(res?.msg || '获取用户信息失败:接口未返回 data')
throw new Error('获取用户信息失败:接口未返回 data') throw new Error('获取用户信息失败:接口未返回 data')
} }

Loading…
Cancel
Save