detail.vue 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. <!-- 详情页 -->
  2. <template>
  3. <view class="detail">
  4. <!-- 三大套餐对比 -->
  5. <view class="menu_tmps">
  6. <view class="tips">
  7. <view class="tips-title">
  8. <text class="title-text">三大套餐所有内容对比</text>
  9. <image :src="lineBg" class="line" mode="widthFix"></image>
  10. </view>
  11. </view>
  12. <view class="menu_table">
  13. <view class="table-prop flex jcsb aic">
  14. <view class="table-prop-item">内容板块</view>
  15. <view v-for="item in tabLists" :key="item" class="table-prop-item">{{ item }}</view>
  16. </view>
  17. <view v-for="(item, index) in configs" :key="index" class="table-item">
  18. <view class="table-title flex aic jcsb">
  19. <text class="ttitle">{{ item.name }}</text>
  20. <view class="cutout flex aic" @click="item.flag = !item.flag">
  21. <text>{{ item.flag ? '展开' : '收起' }}</text>
  22. <image :src="item.flag ? more_mindown : more_minup"></image>
  23. </view>
  24. </view>
  25. <view v-if="!item.flag" v-for="(items, indexs) in item.data" :key="indexs" class="table-content">
  26. <view class="row flex aic jcsb">
  27. <view class="row_name">
  28. <text>{{ items.name }}</text>
  29. </view>
  30. <view v-for="(itm, inx) in items.data" :key="inx" class="row_value">
  31. <image v-if="!itm || itm == ''" :src="emptyImg" class="row_empty"></image>
  32. <text v-else>{{ itm }}</text>
  33. </view>
  34. </view>
  35. </view>
  36. </view>
  37. </view>
  38. </view>
  39. </view>
  40. </template>
  41. <script>
  42. import { home } from '@/apis/index'
  43. export default {
  44. data() {
  45. return {
  46. lineBg: 'https://ovp-shop.oss-cn-hangzhou.aliyuncs.com/static/9dshop/ic_line.png',
  47. emptyImg: 'https://ovp-shop.oss-cn-hangzhou.aliyuncs.com/static/9dshop/ic_empty.png',
  48. tabLists: [],
  49. packagesEntity: [],
  50. configs: [],
  51. type: "",
  52. };
  53. },
  54. onLoad(options) {
  55. if (options.type) this.type = options.type
  56. this.getData()
  57. },
  58. methods: {
  59. // 获取列表
  60. getData() {
  61. home({ type: this.type }).then(res => {
  62. this.tabLists = res.packages
  63. this.configs = res.configs
  64. })
  65. },
  66. },
  67. }
  68. </script>
  69. <style lang='scss' scoped>
  70. .detail {
  71. width: 100%;
  72. // min-height: 100vh;
  73. background-color: #0D121A;
  74. // position: absolute;
  75. // top: 0;
  76. // bottom: 0;
  77. display: flex;
  78. flex-direction: column;
  79. padding: 96rpx 24rpx 24rpx;
  80. }
  81. .tips {
  82. display: flex;
  83. flex-direction: column;
  84. justify-content: center;
  85. align-items: center;
  86. .tips-title {
  87. display: flex;
  88. flex-direction: column;
  89. align-items: flex-end;
  90. .title-text {
  91. font-weight: bold;
  92. font-size: 40rpx;
  93. color: transparent;
  94. background: linear-gradient(54.35820730218651deg, #00C1FF 0%, #2FFFFC 100%);
  95. -webkit-background-clip: text;
  96. }
  97. .line {
  98. width: 112rpx;
  99. }
  100. }
  101. .tips-content {
  102. font-size: 32rpx;
  103. color: #F8FAFF;
  104. margin-top: 28rpx;
  105. .cantant {
  106. font-weight: 400;
  107. font-size: 32rpx;
  108. color: #00ECFF;
  109. background: linear-gradient(54.35820730218651deg, #00C1FF 0%, #2FFFFC 100%);
  110. -webkit-background-clip: text;
  111. text-decoration: underline;
  112. margin-left: 8rpx;
  113. }
  114. }
  115. }
  116. .menu_tmps {
  117. width: 100%;
  118. .menu_table {
  119. background: linear-gradient(180deg, rgba(9, 155, 255, 0.12) 0%, rgba(66, 121, 192, 0.08) 100%);
  120. border-radius: 24rpx;
  121. border: 2rpx solid #003849;
  122. margin-top: 48rpx;
  123. .table-prop {
  124. padding: 36rpx 40rpx;
  125. color: #F8FAFF;
  126. font-size: 24rpx;
  127. border-bottom: #1D3A4A 2rpx solid;
  128. }
  129. .table-item {
  130. padding: 40rpx;
  131. font-size: 24rpx;
  132. border-bottom: #1D3A4A 2rpx solid;
  133. .table-title {
  134. .ttitle {
  135. background: linear-gradient(311.670791165708deg, #00C1FF 0%, #2FFFFC 100%);
  136. -webkit-background-clip: text;
  137. color: transparent;
  138. }
  139. .cutout {
  140. text {
  141. background: linear-gradient(54.35820730218651deg, #00C1FF 0%, #2FFFFC 100%);
  142. -webkit-background-clip: text;
  143. color: transparent;
  144. }
  145. image {
  146. width: 32rpx;
  147. height: 32rpx;
  148. margin-left: 8rpx;
  149. }
  150. }
  151. }
  152. .table-content {
  153. margin-top: 40rpx;
  154. color: #FFFFFF;
  155. .row {
  156. margin-top: 40rpx;
  157. width: 100%;
  158. .row_name {
  159. white-space: nowrap;
  160. width: 15%;
  161. display: flex;
  162. flex-direction: column;
  163. text:nth-child(2) {
  164. font-size: 20rpx;
  165. text-align: center;
  166. }
  167. }
  168. .row_value {
  169. width: 15%;
  170. text-align: center;
  171. display: flex;
  172. justify-content: center;
  173. }
  174. .row_empty {
  175. width: 32rpx;
  176. height: 32rpx;
  177. }
  178. }
  179. .row:nth-child(1) {
  180. margin-top: 0;
  181. }
  182. }
  183. }
  184. .table-item:last-child {
  185. border: none;
  186. }
  187. }
  188. }
  189. </style>