commonProblem.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <template>
  2. <div>
  3. <div class="label">
  4. 常见问题</div>
  5. <div v-for="(v,index) in items">
  6. <div class="title" @click="titClick(index)">
  7. <span>{{v.title}}</span>
  8. <i class="iconfont icon-moren ico"></i>
  9. </div>
  10. <div class="conent">
  11. <div v-html="v.content"></div>
  12. </div>
  13. </div>
  14. </div>
  15. </template>
  16. <script>
  17. export default {
  18. data(){
  19. return{
  20. items:[
  21. ],
  22. dictionaryId:"",
  23. data:[]
  24. }
  25. },
  26. methods:{
  27. getParamsData(){
  28. this.data=JSON.parse(this.$route.params.data)
  29. },
  30. titClick(res){
  31. if($(".conent").eq(res).css("height")=="0px"){
  32. $(".conent").eq(res).animate({"height":"100%"},0);
  33. $(".ico").eq(res).css({"transform":"rotate(90deg)"})
  34. }else{
  35. $(".conent").eq(res).animate({"height":"0"},0);
  36. $(".ico").eq(res).css({"transform":"rotate(0deg)"})
  37. }
  38. },
  39. getDictionaryId(){
  40. var that=this;
  41. that.$http.post('service/solution/fetchDataList/serviceGuide',{
  42. "idx": 0,
  43. "sum": 10,
  44. "serviceGuide":{
  45. "serviceType":{"id":that.data.id},
  46. "status":1
  47. }
  48. }).then(function(res1){
  49. that.items=res1.data.list
  50. })
  51. }
  52. },
  53. created(){
  54. this.getParamsData();
  55. this.getDictionaryId();
  56. },
  57. mounted(){
  58. }
  59. }
  60. </script>
  61. <style scoped>
  62. .label {
  63. background-color: rgb(238, 238, 238);
  64. height: .6rem;
  65. line-height: .6rem;
  66. padding-left: .2rem;
  67. font-size: .24rem;
  68. color:#666666;
  69. border-top: .01rem rgb(223, 222, 222) solid;
  70. border-bottom: .01rem rgb(223, 222, 222) solid;
  71. }
  72. .title{
  73. padding: 0 .24rem;
  74. height: .88rem;
  75. display: flex;
  76. justify-content:space-between;
  77. align-items:center;
  78. border-bottom: .01rem rgb(223, 222, 222) solid;
  79. }
  80. .title span{
  81. font-size: .32rem
  82. }
  83. .title i{
  84. font-size: .32rem
  85. }
  86. .conent{
  87. /* padding: .24rem; */
  88. border-bottom: .01rem rgb(223, 222, 222) solid;
  89. height: 0;
  90. overflow: hidden;
  91. }
  92. .conent div{
  93. padding: .24rem;
  94. font-size: .28rem;
  95. line-height: .39rem;
  96. color: #666666;
  97. overflow: hidden;
  98. overflow-x: scroll
  99. }
  100. </style>