blob: dec6950d4dd4242493c24c599379656ffb47156a [file] [log] [blame]
guangchao.xu070005a2020-12-07 09:56:40 +08001<template>
2 <view class="question">
3 <!-- <view class="question-header">
4 <u-search placeholder="搜索问题关键词" v-model="keyword" :show-action="false" bg-color="#ffffff" @search="search"></u-search>
5 </view> -->
6 <view class="question-con">
7 <u-collapse arrow-color="#999999">
8 <u-collapse-item v-for="(item, index) in list" :key="index">
9 <view slot="title" class="question-con-item-title">
10 <view class="question-con-item-title-index">{{ (index+1) < 10 ? '0'+(index + 1):(index+1)}}</view>
11 <text class="question-con-item-title-title">{{item.title}}</text>
12 </view>
13 <view class="question-con-item-con">
14 <text>{{item.content}}</text>
15 </view>
16 </u-collapse-item>
17 </u-collapse>
18 </view>
19 </view>
20</template>
21
22<script>
23 export default {
24 data() {
25 return {
26 keyword: "",
27 list:[]
28 }
29 },
30 methods: {
31 search(e){
32 uni.showToast({
33 icon: "none",
34 title: "搜索服务功能暂未开通",
35 duration: 1500
36 })
37 },
38 getQuestionList(){
39 let that = this
40 let params = {
41 pageno:1,
42 pagesize:20
43 }
44 that.$u.get("/i/advisory/list",params).then(res=>{
45 that.list = res.data.list
46 //console.log(that.list)
47 })
48 }
49 },
50 onLoad(){
51 let that = this
52 that.getQuestionList()
53 }
54 }
55</script>
56
57<style lang="scss" scoped>
58 .u-collapse-head{
59 padding: 30rpx 0;
60 }
61 .question {
62 overflow: hidden;
63 &-header {
64 width: 700rpx;
65 margin: 30rpx auto;
66 font-family: "PingFang-SC-Medium";
67 }
68 &-con{
69 background-color: #FFFFFF;
70 padding: 30rpx;
71 margin-top: 30rpx;
72 &-item{
73 &-con{
74 padding: 0 60rpx;
75 font-size: 28rpx;
76 }
77 &-title{
78 display: flex;
79 align-items: center;
80
81 &-title{
82 font-size: 30rpx;
83 }
84 &-index{
85 display: flex;
86 justify-content: center;
87 align-items: center;
88 background-color: #2FA8E1;
89 padding: 10rpx;
90 color: #FFFFFF;
91 margin-right: 20rpx;
92 border-radius: 10rpx;
93 border-bottom-left-radius: 0;
94 position: relative;
95 font-size: 20rpx;
96 &::after{
97 content: "";
98 position: absolute;
99 width: 0;
100 height: 0;
101 bottom: -10rpx;
102 left: 0;
103 border-left: 12rpx #2FA8E1 solid;
104 border-top: 12rpx transparent solid;
105 border-right: 12rpx transparent solid;
106 border-bottom: 12rpx transparent solid;
107 }
108 }
109 }
110 }
111 }
112 }
113</style>