连云港陪玩陪聊
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.
chunwan/pages/users/help/index.vue

160 lines
2.9 KiB

3 months ago
<template>
3 months ago
<view class="help">
2 months ago
<view class="help-dl" v-for="(a,i) in list" :key="i" :class="a.isClick?'help-dl-on':''" @click="tabItem(i)">
3 months ago
<view class="dt">
2 months ago
<image class="icon" :src="a.icon"></image>
3 months ago
<view class="info">
2 months ago
<view class="fl">{{a.title}}<text>{{a.content}}</text></view>
3 months ago
<view class="fr">
2 months ago
<image class="img2" v-if="a.isClick" src="@/static/icon-help-up.png"></image>
<image class="img1" v-else src="@/static/icon-help-down.png"></image>
3 months ago
</view>
</view>
</view>
<view class="dd">
2 months ago
<view class="item" v-for="(b,idx) in a.contentList" :key="idx" @click="toPage(a)">
{{b.title}}<image src="@/static/icon-help-right.png"></image>
3 months ago
</view>
</view>
</view>
2 months ago
3 months ago
</view>
</template>
<script>
export default {
data() {
return {
2 months ago
tabIndex: 0,
list: [],
3 months ago
};
2 months ago
},
onLoad() {
this.getList();
3 months ago
},
2 months ago
methods: {
toPage(a) {
uni.setStorageSync("pcontent",a)
uni.navigateTo({
url: "/pages/users/xieyi/index"
})
},
3 months ago
tabItem (index) {
2 months ago
this.list[index].isClick = !this.list[index].isClick;
},
async getList() {
let { code, data } = await this.$api.helpCenter({});
if(code == 200){
if(data && data.length > 0){
data.map(a=>{
a.isClick = false
})
}
this.list = data
}
},
3 months ago
}
}
</script>
3 months ago
<style scoped lang="scss">
.help{
padding: 0 25rpx 25rpx;
overflow: hidden;
&-dl{
width: 100%;
min-height: 150rpx;
background: #FFFFFF;
border-radius: 20rpx;
padding: 25rpx;
box-sizing: border-box;
margin-top: 20rpx;
.dt{
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
.icon{
width: 110rpx;
height: 110rpx;
margin-right: 20rpx;
}
.info{
flex: 1;
display: flex;
align-items: center;
justify-content: space-between;
.fl{
flex: 1;
font-weight: 500;
font-size: 30rpx;
color: #222222;
text{
display: block;
font-weight: 400;
font-size: 24rpx;
color: #999999;
margin-top: 15rpx;
}
}
.fr{
.img1{
width: 22rpx;
height: 13rpx;
display: block;
}
.img2{
width: 22rpx;
height: 13rpx;
display: none;
}
}
}
}
.dd{
margin-top: 10rpx;
overflow: hidden;
background: #F3F4F5;
border-radius: 20rpx;
padding: 0 20rpx;
box-sizing: border-box;
display: none;
.item{
padding: 30rpx 0;
font-weight: 400;
font-size: 28rpx;
color: #333333;
border-top: 1px solid #E3E5E6;
display: flex;
align-items: center;
justify-content: space-between;
&:first-child{
border-top-color: transparent;
}
image{
width: 13rpx;
height: 23rpx;
}
}
}
&-on{
.dt{
.info{
.fr{
.img2{
display: block;
}
.img1{
display: none;
}
}
}
}
.dd{
display: block;
}
}
}
}
3 months ago
</style>