problem.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. <template>
  2. <view :class="[AppTheme]">
  3. <view style="padding-top: 10px">
  4. <view class="header" v-for="item in helpList" :key="item.id">
  5. <view class="header-fle" @click="showContent(item.content)">
  6. <view style="display: flex; height: 11px; align-items: center">
  7. <view class="out bg-primary">?</view>
  8. <text class="why">{{ item.title || "一万个为什么" }}</text>
  9. <image class="jt_img" :src="settingFile.root_img+'/static/app/imgs/mine/27.png'" alt="" />
  10. </view>
  11. </view>
  12. </view>
  13. <u-empty margin-top="60" style="height: 0% !important;width: 100vw;" v-if="helpList.length == 0" text="暂无更多数据 " mode="list"></u-empty>
  14. </view>
  15. </view>
  16. </template>
  17. <script>
  18. import mineApi from "@/api/mine/index.js";
  19. export default {
  20. data() {
  21. return {
  22. primary:this.$theme.primary,
  23. flag: true,
  24. settingFile:getApp().globalData.siteinfo,
  25. helpList: [],
  26. }
  27. },
  28. onShow() {
  29. this.gethelp()
  30. },
  31. methods: {
  32. gethelp() {
  33. let that = this
  34. mineApi.aboutquestion().then(res=>{
  35. this.helpList=res.data
  36. })
  37. },
  38. showContent(con) {
  39. let content = con.replace(/\<img src="/gi,`<img style='width:100%;display:block' src="${this.settingFile.root_rich_img}`)
  40. /* 因页面传参,限制参数长度,存储vueX */
  41. this.$store.commit('setProblem_co',content)
  42. //跳转详情
  43. uni.navigateTo({
  44. url:"/pagesE/pages/user/problem/problem_det/problem_det"
  45. })
  46. }
  47. }
  48. }
  49. </script>
  50. <style lang="scss">
  51. .header {
  52. width: 100%;
  53. min-height: 70rpx;
  54. margin: 0 auto;
  55. background: #fff;
  56. padding-top: 30rpx;
  57. margin-bottom: 20rpx;
  58. position: relative;
  59. }
  60. .header-fle {
  61. height: 44rpx;
  62. padding-left: 40rpx;
  63. }
  64. header p {
  65. font-size: 1.7rem;
  66. font-weight: bold;
  67. color: #333;
  68. position: absolute;
  69. bottom: 12rpx;
  70. left: 50%;
  71. transform: translateX(-50%);
  72. }
  73. .out {
  74. width: 36rpx;
  75. height: 34rpx;
  76. position: relative;
  77. color: #ffffff;
  78. text-align: center;
  79. font-size: 28rpx;
  80. line-height: 34rpx;
  81. border-radius: 4rpx;
  82. margin-right: 14rpx;
  83. }
  84. .out::before {
  85. content: '';
  86. position: absolute;
  87. width: 0;
  88. height: 0;
  89. // border-left: 8rpx solid transparent;
  90. // border-right: 8rpx solid transparent;
  91. // border-top: 8rpx solid $tab-color-2;
  92. border-width: 8rpx;
  93. border-style: solid;
  94. left: 27%;
  95. top: 34rpx;
  96. }
  97. .why {
  98. width: 600rpx;
  99. overflow: hidden;
  100. white-space: nowrap;
  101. text-overflow: ellipsis;
  102. margin-left: 8rpx;
  103. font-size: 28rpx;
  104. font-family: PingFang SC;
  105. font-weight: bold;
  106. color: rgba(51, 51, 51, 1);
  107. line-height: 40rpx;
  108. // margin-top: 10rpx;
  109. }
  110. /* .delta {
  111. width: 0;
  112. height: 0;
  113. border: 8px solid;
  114. border-color: transparent transparent #93A0B0;
  115. float: right;
  116. position: absolute;
  117. right: 25px;
  118. top: 24px;
  119. } */
  120. .con-num p {
  121. font-size: 28rpx;
  122. font-family: PingFangSC-Regular, PingFang SC;
  123. font-weight: 400;
  124. color: rgba(96, 104, 116, 1);
  125. line-height: 36rpx;
  126. margin-left: 40rpx;
  127. padding-bottom: 20rpx;
  128. }
  129. /* .delta2 {
  130. width: 0;
  131. height: 0;
  132. border-left: 8px solid transparent;
  133. border-right: 8px solid transparent;
  134. border-top: 8px solid #93A0B0;
  135. position: absolute;
  136. right: 25px;
  137. top:24px;
  138. } */
  139. footer {
  140. margin-top: 360rpx;
  141. text-align: center;
  142. color: red;
  143. font-size: 24rpx;
  144. }
  145. .jt_img {
  146. width: 58rpx;
  147. height: 58rpx;
  148. position: absolute;
  149. top: 50rpx;
  150. margin-top: -34rpx;
  151. right: 24rpx;
  152. }
  153. .lanxikf {
  154. width: 100%;
  155. height: 90rpx;
  156. background: #ff4841;
  157. position: fixed;
  158. bottom: 0;
  159. line-height: 100rpx;
  160. text-align: center;
  161. font-size: 32rpx;
  162. color: white;
  163. }
  164. </style>