zylx.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. <template>
  2. <view>
  3. <u-navbar :is-back="false" :border-bottom="false" :background="background">
  4. <view style="width: 100%;padding: 0 10rpx;">
  5. <view class="flztoa inlbhhe ">
  6. <navigator class="indihh" url="../index/index" open-type="redirect" hover-class="none">
  7. <text>最新</text>
  8. </navigator>
  9. <!-- <navigator class="indihh" url="../index/hykt" open-type="redirect" hover-class="none">
  10. <text>会员</text>
  11. </navigator> -->
  12. <view class="indihh" style="width: 40%;">
  13. <text style="font-size: 44rpx;color: #374B6E;">治愈练习</text>
  14. <view
  15. style="width: 26rpx;height: 4rpx;background: #374B6E;border-radius: 4rpx;margin-top: 10rpx;">
  16. </view>
  17. </view>
  18. <!-- <navigator class="indihh" url="../index/hd" open-type="redirect" hover-class="none">
  19. <text>活动</text>
  20. </navigator> -->
  21. </view>
  22. </view>
  23. </u-navbar>
  24. <view class="zyjjvko">
  25. <view class="zyddwwe" v-for="(item,index) in list" :key="index">
  26. <navigator class="zygdihh" :style="'background: url(../../static/zy/zy0' + (index+1) + '.png) center center no-repeat;'"
  27. :url="'../index/zyDetail?item=' + JSON.stringify(item)" hover-class="none">
  28. <view class="zywenzi">
  29. <text>{{item.title}}</text>
  30. <text class="zywenzib">{{item.desc}}</text>
  31. </view>
  32. </navigator>
  33. </view>
  34. </view>
  35. <view style="height: 120rpx;"></view>
  36. <view style="height: 130rpx;"></view>
  37. <view class="dibuboot">
  38. <navigator class="dibubootlb" url="../index/index" open-type="redirect" hover-class="none">
  39. <image src="/static/dibu/bob1.png" style="width: 48rpx;height: 48rpx;"></image>
  40. <text style="color: #374B6E">首页</text>
  41. </navigator>
  42. <!-- <navigator class="dibubootlb" url="../lecturer/wdzx" open-type="redirect" hover-class="none">
  43. <image src="/static/dibu/boa2.png" style="width: 48rpx;height: 48rpx;"></image>
  44. <text>咨询</text>
  45. </navigator>
  46. <navigator class="dibubootlb" url="../index/jiehuo" open-type="redirect" hover-class="none">
  47. <image src="/static/dibu/boa3.png" style="width: 48rpx;height: 48rpx;"></image>
  48. <text>解惑</text>
  49. </navigator> -->
  50. <navigator class="dibubootlb" url="../lecturer/my" open-type="redirect" hover-class="none">
  51. <image src="/static/dibu/boa4.png" style="width: 48rpx;height: 48rpx;"></image>
  52. <text>我的</text>
  53. </navigator>
  54. </view>
  55. </view>
  56. </template>
  57. <style>
  58. page {
  59. background: #FAFAFA;
  60. }
  61. </style>
  62. <script>
  63. export default {
  64. data() {
  65. return {
  66. background: {
  67. backgroundColor: '#ffffff',
  68. },
  69. list:[{},{}]
  70. }
  71. },
  72. onLoad() {
  73. // this.getclassifyList();
  74. this.getcureList();
  75. },
  76. methods: {
  77. getcureList(){
  78. let user_id = uni.getStorageSync('id');
  79. this.$request.getcureList({}).then(res => {
  80. console.log(res)
  81. this.list = res.data.splice(0,6);
  82. }).catch(err => {
  83. console.log(err)
  84. })
  85. },
  86. // 获取分类列表
  87. getclassifyList() {
  88. let user_id = uni.getStorageSync('id');
  89. this.$post({
  90. data: {
  91. do: 'TypeList',
  92. // data: {
  93. // user_id: user_id,
  94. // type_id: 14,
  95. // pw: '375'
  96. // }
  97. }
  98. }).then(res => {
  99. this.list = res.data
  100. })
  101. },
  102. }
  103. }
  104. </script>
  105. <style lang="scss" scoped>
  106. .zyjjvko {
  107. display: flex;
  108. flex-wrap: wrap;
  109. padding: 0 10rpx;
  110. margin-top: 30rpx;
  111. }
  112. .zyddwwe {
  113. width: 50%;
  114. display: flex;
  115. justify-content: center;
  116. align-items: center;
  117. margin-top: 20rpx;
  118. }
  119. .zygdihh {
  120. background-size: 100%;
  121. width: 342rpx;
  122. height: 290rpx;
  123. border-radius: 16rpx 16rpx 16rpx 16rpx;
  124. display: flex;
  125. flex-direction: column;
  126. }
  127. .zygdihhb {
  128. background-size: 100%;
  129. width: 702rpx;
  130. height: 290rpx;
  131. border-radius: 16rpx 16rpx 16rpx 16rpx;
  132. display: flex;
  133. flex-direction: column;
  134. }
  135. .zywenzi {
  136. display: flex;
  137. flex-direction: column;
  138. padding: 40rpx 30rpx;
  139. font-size: 32rpx;
  140. font-family: PingFang SC-Bold, PingFang SC;
  141. font-weight: bold;
  142. color: #FFFFFF;
  143. line-height: 44rpx;
  144. }
  145. .zywenzib {
  146. font-size: 28rpx;
  147. font-family: PingFang SC-Regular, PingFang SC;
  148. font-weight: 400;
  149. color: #FFFFFF;
  150. line-height: 40rpx;
  151. }
  152. </style>