problems.vue
1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<template>
<view>
<view class="topLine"></view>
<view class="problemWrap">
<view class="problemItem" v-for="(item,index) in list" :key="index">
<view class="problem" @click="item.status = !item.status">
<text>{{index+1}}:{{item.title}}</text>
<image v-if="!item.status" src="../../../static/image/wallet/zhankai.png" mode=""></image>
<image v-if="item.status" src="../../../static/image/wallet/shouqi.png" mode=""></image>
</view>
<view class="answer" v-if="item.status">
{{item.content}}
</view>
</view>
</view>
</view>
</template>
<script>
export default{
data(){
return{
list:[]
}
},
onLoad() {
uni.request({
url:this.apiUrl + '/faq/lis',
method:'POST',
data:{
faq_cate_id:'1'
},
success: (res) => {
console.log('常见问题列表',res)
let list = []
res.data.data.forEach((item)=>{
item.status = false
list.push(item)
})
this.list = list
}
})
}
}
</script>
<style lang="scss" scoped>
.topLine{height: 2rpx;background: rgba(25,24,51,0.06);}
.problemWrap{
padding: 0 32rpx;
.problemItem{
.problem{
text{font-size: 28rpx;}
height: 88rpx;
display: flex;
align-items: center;
justify-content: space-between;
image{width: 32rpx;height: 32rpx;}
border-bottom: 2rpx solid #ebedf0;
}
.answer{
padding: 24rpx 0;
color: #969799;
font-size: 24rpx;
border-bottom: 2rpx solid #ebedf0;
}
}
}
</style>