fix;修复bug
This commit is contained in:
+24
-66
@@ -1,21 +1,19 @@
|
||||
<template>
|
||||
<view class="help-container">
|
||||
<!-- 常见问题 -->
|
||||
<view class="faq-list">
|
||||
<view
|
||||
class="faq-item"
|
||||
v-for="(item, index) in faqList"
|
||||
:key="index"
|
||||
@click="toggleFaq(index)"
|
||||
>
|
||||
<view class="faq-header">
|
||||
<text class="question">{{ $t(item.question) }}</text>
|
||||
<view class="arrow" :class="{ open: item.isOpen }"></view>
|
||||
</view>
|
||||
<view class="answer" v-show="item.isOpen">
|
||||
{{ $t(item.answer) }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="faq-section">
|
||||
<uv-collapse :border="false">
|
||||
<uv-collapse-item
|
||||
v-for="(item, index) in faqList"
|
||||
:key="index"
|
||||
:title="$t(item.question)"
|
||||
:name="index"
|
||||
>
|
||||
<view class="answer-content">
|
||||
<text class="answer-text">{{ $t(item.answer) }}</text>
|
||||
</view>
|
||||
</uv-collapse-item>
|
||||
</uv-collapse>
|
||||
</view>
|
||||
|
||||
<!-- 联系客服 -->
|
||||
@@ -43,10 +41,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
HELP_CONTENT,
|
||||
faqList: HELP_CONTENT.FAQ_LIST.map(item => ({
|
||||
...item,
|
||||
isOpen: false
|
||||
})),
|
||||
faqList: HELP_CONTENT.FAQ_LIST,
|
||||
customerPhone: HELP_CONTENT.CONTACT.PHONE.VALUE // 默认客服电话
|
||||
}
|
||||
},
|
||||
@@ -59,9 +54,6 @@ export default {
|
||||
this.customerPhone = getCustomerPhone()
|
||||
},
|
||||
methods: {
|
||||
toggleFaq(index) {
|
||||
this.faqList[index].isOpen = !this.faqList[index].isOpen
|
||||
},
|
||||
makePhoneCall() {
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: this.customerPhone
|
||||
@@ -77,55 +69,22 @@ export default {
|
||||
background: #f8f8f8;
|
||||
padding: 30rpx;
|
||||
|
||||
.faq-list {
|
||||
.faq-section {
|
||||
background: #fff;
|
||||
border-radius: 20rpx;
|
||||
padding: 20rpx;
|
||||
margin-bottom: 30rpx;
|
||||
box-shadow: 0 4rpx 16rpx rgba(0,0,0,0.04);
|
||||
overflow: hidden;
|
||||
|
||||
.faq-item {
|
||||
border-bottom: 1rpx solid #f5f5f5;
|
||||
.answer-content {
|
||||
padding: 20rpx 30rpx 30rpx;
|
||||
background: #f9f9f9;
|
||||
|
||||
&:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.faq-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 30rpx 20rpx;
|
||||
|
||||
.question {
|
||||
font-size: 30rpx;
|
||||
color: #333;
|
||||
flex: 1;
|
||||
padding-right: 20rpx;
|
||||
}
|
||||
|
||||
.arrow {
|
||||
width: 16rpx;
|
||||
height: 16rpx;
|
||||
border-right: 4rpx solid #999;
|
||||
border-bottom: 4rpx solid #999;
|
||||
transform: rotate(45deg);
|
||||
transition: all 0.3s;
|
||||
|
||||
&.open {
|
||||
transform: rotate(-135deg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.answer {
|
||||
.answer-text {
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
line-height: 1.6;
|
||||
padding: 0 20rpx 30rpx;
|
||||
background: #f9f9f9;
|
||||
border-radius: 10rpx;
|
||||
margin: 0 20rpx 20rpx;
|
||||
line-height: 1.8;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -145,7 +104,7 @@ export default {
|
||||
font-weight: 500;
|
||||
margin-bottom: 20rpx;
|
||||
padding-bottom: 8rpx;
|
||||
width:fit-content;
|
||||
width: fit-content;
|
||||
|
||||
&::after {
|
||||
z-index: -1;
|
||||
@@ -156,8 +115,7 @@ export default {
|
||||
width: 88%;
|
||||
height: 16rpx;
|
||||
border-radius: 20rpx;
|
||||
// background: transparent;
|
||||
background: #07C160; // 底部高亮(微信绿)
|
||||
background: #07C160;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user