sponsored.vue 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. <template>
  2. <view>
  3. <!--标题栏-->
  4. <bar-title bgColor="bg-white" isBack>
  5. <block slot="content">我的红包</block>
  6. <block slot="right">
  7. <text class="text-black">使用说明</text>
  8. </block>
  9. </bar-title>
  10. <!--红包Tab-->
  11. <scroll-view scroll-x class="bg-white nav z text-center">
  12. <block v-for="(item,index) in TabData" :key="index">
  13. <view class="cu-item" :class="index == TabCur?'select':''" @tap="tabSelect" :data-id="index">
  14. <view :class="index == TabCur?'text-black':''">{{item}}</view>
  15. <view class="tab-dot bg-red"/>
  16. </view>
  17. </block>
  18. </scroll-view>
  19. <!--红包列表-->
  20. <view class="zaiui-sponsored-card-view">
  21. <view class="card-price-view">
  22. <view class="text-red price-left-view">
  23. <text class="text-sm">¥</text>
  24. <text class="price">10</text>
  25. </view>
  26. <view class="name-content-view">
  27. <view class="text-cut text-red">限购【某某某】店铺商品</view>
  28. <view class="text-xs">满99元可用</view>
  29. <view class="text-xs">04.01 00:00 - 12.01 23:59</view>
  30. </view>
  31. <view class="btn-right-view">
  32. <button class="cu-btn bg-red round sm">去使用</button>
  33. </view>
  34. </view>
  35. <view class="card-num-view">
  36. <view class="text-xs">满99可用</view>
  37. <text class="cuIcon-unfold"/>
  38. </view>
  39. </view>
  40. <view class="zaiui-sponsored-card-view">
  41. <view class="card-price-view">
  42. <view class="text-red price-left-view">
  43. <text class="text-sm">¥</text>
  44. <text class="price">10</text>
  45. </view>
  46. <view class="name-content-view">
  47. <view class="text-cut text-red">限购【某某某】店铺商品</view>
  48. <view class="text-xs">满99元可用</view>
  49. <view class="text-xs">04.01 00:00 - 12.01 23:59</view>
  50. </view>
  51. <view class="btn-right-view">
  52. <button class="cu-btn bg-red round sm">去使用</button>
  53. </view>
  54. </view>
  55. <view class="card-num-view">
  56. <view class="text-xs">满99可用</view>
  57. <text class="cuIcon-unfold"/>
  58. </view>
  59. </view>
  60. <view class="zaiui-sponsored-card-view">
  61. <view class="card-price-view">
  62. <view class="text-red price-left-view">
  63. <text class="text-sm">¥</text>
  64. <text class="price">10</text>
  65. </view>
  66. <view class="name-content-view">
  67. <view class="text-cut text-red">限购【某某某】店铺商品</view>
  68. <view class="text-xs">满99元可用</view>
  69. <view class="text-xs">04.01 00:00 - 12.01 23:59</view>
  70. </view>
  71. <view class="btn-right-view">
  72. <button class="cu-btn bg-red round sm">去使用</button>
  73. </view>
  74. </view>
  75. <view class="card-num-view">
  76. <view class="text-xs">满99可用</view>
  77. <text class="cuIcon-unfold"/>
  78. </view>
  79. </view>
  80. </view>
  81. </template>
  82. <script>
  83. import barTitle from '@/components/zaiui-common/basics/bar-title';
  84. import _tool from '@/static/zaiui/util/tools.js'; //工具函数
  85. export default {
  86. components: {
  87. barTitle
  88. },
  89. data() {
  90. return {
  91. TabCur: 0, TabData: ['未使用(4)','已使用','已过期'],
  92. }
  93. },
  94. onLoad() {
  95. },
  96. onReady() {
  97. _tool.setBarColor(true);
  98. uni.pageScrollTo({
  99. scrollTop: 0,
  100. duration: 0
  101. });
  102. },
  103. methods: {
  104. tabSelect(e) {
  105. this.TabCur = e.currentTarget.dataset.id;
  106. uni.pageScrollTo({
  107. scrollTop: 0,
  108. duration: 0
  109. });
  110. },
  111. }
  112. }
  113. </script>
  114. <style lang="scss">
  115. /* #ifdef APP-PLUS */
  116. @import "../../static/colorui/main.css";
  117. @import "../../static/colorui/icon.css";
  118. @import "../../static/zaiui/style/app.scss";
  119. /* #endif */
  120. page {
  121. background: #FFFFFF;
  122. }
  123. .zaiui-sponsored-card-view {
  124. position: relative;
  125. margin: 27.27upx 27.27upx 0;
  126. .card-price-view {
  127. position: relative;
  128. background: #FFF5F5;
  129. border-radius: 14.54upx 14.54upx 0 0;
  130. padding: 18.18upx;
  131. .price-left-view {
  132. position: absolute;
  133. height: 125.45upx;
  134. width: 145.45upx;
  135. text-align: center;
  136. line-height: 125.45upx;
  137. .price {
  138. font-size: 45.45upx;
  139. font-weight: 400;
  140. }
  141. }
  142. .name-content-view {
  143. position: relative;
  144. padding-left: 163.63upx;
  145. padding-right: 145.45upx;
  146. height: 125.45upx;
  147. line-height: 1.8;
  148. color: #999898;
  149. &::before {
  150. content: '';
  151. position: absolute;
  152. top: -18.18upx;
  153. bottom: -18.18upx;
  154. margin-left: -18.18upx;
  155. border-left: 2upx dashed #fdbabc;
  156. }
  157. }
  158. .btn-right-view {
  159. position: absolute;
  160. right: 27.27upx;
  161. top: 18.18upx;
  162. height: 125.45upx;
  163. line-height: 125.45upx;
  164. }
  165. }
  166. .card-num-view {
  167. position: relative;
  168. background: #FFECED;
  169. border-radius: 0 0 14.54upx 14.54upx;
  170. border-top: 2upx dashed #dedbdb;
  171. padding: 10.9upx 27.27upx;
  172. color: #999898;
  173. &::before {
  174. content: '';
  175. position: absolute;
  176. width: 36.36upx;
  177. height: 36.36upx;
  178. background: #ffffff;
  179. border-radius: 50%;
  180. top: -18.18upx;
  181. left: -18.18upx;
  182. }
  183. &::after {
  184. content: '';
  185. position: absolute;
  186. width: 36.36upx;
  187. height: 36.36upx;
  188. background: #ffffff;
  189. border-radius: 50%;
  190. top: -18.18upx;
  191. right: -18.18upx;
  192. }
  193. view {
  194. position: relative;
  195. padding-right: 72.72upx;
  196. }
  197. text {
  198. position: absolute;
  199. right: 27.27upx;
  200. top: 14.54upx;
  201. }
  202. }
  203. }
  204. </style>