You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
yanzong_qianduan/pages/news1/help.vue

306 lines
6.2 KiB

11 months ago
<template>
11 months ago
<view class="help">
<view class="helpContent">
<view class="helpTitle">帮助中心</view>
10 months ago
<view class="helpItem" :class="((index == itemList.length - 1) && item.child.length == 0) ? 'border' : ''"
v-for="(item, index) in itemList" :key="index">
10 months ago
<view class="helpMain" @click="goListPage(item)">
9 months ago
<u-icon name="arrow-left" class="zhishi" color="#dfdbdb" size="28"></u-icon>
<image :src="item.img_url" mode="" class="helpImg"></image>
<!-- <u-icon name="question-circle"></u-icon> -->
11 months ago
<view class="mainText">
10 months ago
<text>{{ item.name }}</text>
<u-icon name="arrow-right" v-if="item.name != ''" color="#8B8B8B" size="22"></u-icon>
11 months ago
</view>
</view>
<view class="mainItem">
<view class="itemText" v-for="(p, i) in item.childArr" :key="i" @click="openContent(p)">
{{ p.title }}
10 months ago
</view>
11 months ago
</view>
</view>
</view>
11 months ago
<view class="footer">
<view class="btn">
10 months ago
<button type="default" open-type="contact" class="infoBtn">
10 months ago
<image :src="$picUrl + '/static/news1/n7.png'" mode="widthFix"></image>在线客服9:00-22:00
10 months ago
</button>
</view>
</view>
10 months ago
<view class="dialog" v-if="dialog" @click="dialog = false">
10 months ago
<view class="content">
<rich-text :nodes="strings"></rich-text>
11 months ago
</view>
11 months ago
</view>
</view>
</template>
<script>
import * as help from '@/api/help'
export default {
data() {
return {
itemList: [],
strings: '',
dialog: false,
}
},
onShow() {
this.getHelpList()
},
methods: {
goListPage(item) {
uni.navigateTo({
9 months ago
url: '/pages/news/rules/rulesList?itemInfo=' + encodeURIComponent(JSON.stringify(item))
})
},
getHelpList() {
const that = this
help.helpList()
.then(res => {
if (res.status == 200) {
that.itemList = res.data.list;
that.itemList.map(item => {
if (item.child.length > 0) {
9 months ago
if (parseInt(item.child.length % 4) == 1) {
item.child.push({}, {}, {})
}
9 months ago
if (parseInt(item.child.length % 4) == 2) {
item.child.push({}, {})
}
if (parseInt(item.child.length % 4) == 3) {
item.child.push({})
}
9 months ago
if (parseInt(item.child.length % 4) == 1) {
10 months ago
item.child.push({})
}
}
item.childArr = []
9 months ago
item.childArr = item.child.slice(0, 4)
})
}
10 months ago
})
.finally(() => that.isLoading = false)
},
openContent(item) {
uni.navigateTo({
9 months ago
url: '/pages/news/rules/index?itemInfo=' + encodeURIComponent(JSON.stringify(item))
10 months ago
})
},
}
11 months ago
}
</script>
<style lang="scss" scoped>
page {
min-height: 100%;
}
.help {
9 months ago
padding-bottom: 160rpx;
height: 100%;
11 months ago
.helpContent {
margin: 20upx;
background: #fff;
border-radius: 20upx;
overflow: hidden;
padding: 20upx;
10 months ago
.helpTitle {
font-size: 32upx;
color: #000000;
padding: 20upx 0;
font-weight: bold;
10 months ago
// border-bottom: 3upx solid #dfdbdb;
}
10 months ago
.border {
10 months ago
border-bottom: 1px solid #dfdbdb;
}
10 months ago
.helpItem {
display: flex;
color: #333333;
font-size: 28upx;
min-height: 220rpx;
border-top: 1px solid #dfdbdb;
11 months ago
.helpMain {
width: 180upx;
// height: 178upx;
min-height: 180rpx;
border-right: 1px solid #dfdbdb;
flex-shrink: 0;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
position: relative;
9 months ago
.helpImg {
width: 50rpx;
height: 50rpx;
}
11 months ago
.titleIcon {
width: 50upx;
height: auto;
11 months ago
}
.mainText {
margin-top: 8upx;
11 months ago
text {
color: #333333;
font-size: 28upx;
margin-left: 5upx;
}
}
10 months ago
.zhishi {
position: absolute;
right: -5px;
background: #fff;
top: 50%;
transform: translateY(-50%);
11 months ago
}
10 months ago
}
11 months ago
.mainItem {
display: flex;
flex-wrap: wrap;
10 months ago
// align-items: center;
width: calc(100% - 90px);
margin: 20rpx 20rpx 20rpx 40rpx;
.itemText {
width: 50%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
text-align: center;
10 months ago
// padding: 24upx 16upx;
height: 90upx;
line-height: 90upx;
padding: 0 10upx;
border-top: 1px solid #dfdbdb;
border-left: 1px solid #dfdbdb;
}
.itemText:nth-child(odd) {
border-left: none;
}
.itemText:nth-child(1) {
border-top: 0;
padding-right: 1px;
10 months ago
// border-right: 1px solid #dfdbdb;
}
.itemText:nth-child(2) {
border-top: 0;
10 months ago
// border-left: none;
}
10 months ago
// .itemText:nth-last-child(odd):last-of-type {
// border-bottom: none;
// border-right: 1px solid #dfdbdb;
// }
// .itemText:nth-last-child(2){
// border-bottom: none;
// }
// :first-child {
// border-right: 1px solid #dfdbdb;
// }
// :nth-child(2n) {
// border-left: 1px solid #dfdbdb;
// }
// :last-child {
// border-left: 1px solid #dfdbdb;
// }
// :nth-child(3) {
// border-right: 1px solid #dfdbdb;
// }
}
10 months ago
}
}
10 months ago
.footer {
position: fixed;
z-index: 9;
bottom: 0;
width: 100%;
background-color: #fff;
padding: 30rpx;
.btn {
height: 100upx;
background: #FE6048;
border-radius: 28px 28px 28px 28px;
opacity: 1;
display: flex;
align-items: center;
justify-content: center;
10 months ago
11 months ago
image {
width: 54upx;
height: auto;
11 months ago
}
11 months ago
text {
font-size: 28upx;
font-family: PingFang SC, PingFang SC;
font-weight: 600;
color: #FFFFFF;
margin-left: 100upx;
}
.infoBtn {
image {
width: 54upx;
height: auto;
margin-right: 100rpx;
}
text-align: center;
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
background: #FE6048;
border-radius: 28px 28px 28px 28px;
color: #FFFFFF;
}
11 months ago
}
}
}
.dialog {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
background: rgba(0, 0, 0, 0.8);
color: #fff;
10 months ago
.content {
height: 60%;
width: 80%;
overflow: auto;
}
10 months ago
}
</style>