gift.vue 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256
  1. <template>
  2. <view class="sub-base-container">
  3. <view class="gift-title">
  4. <view class="name">
  5. <view class="txt">守护等级规则</view>
  6. <text>积累能量升等级 获大礼</text>
  7. </view>
  8. <image class="icon" :src="`${config.BASIC_IMG}img/subTreePage/energy-icon.png`"></image>
  9. </view>
  10. <view class="gift-card energy-card">
  11. <view class="gift-name">已打卡 <text>2</text>/7 天</view>
  12. <view class="tips">
  13. <text>再连续签到5天,获得</text>
  14. <image class="icon" :src="`${config.BASIC_IMG}img/subTreePage/leaf-icon.png`" alt=""></image>
  15. <view class="score"><up-icon name="plus" size="10" color="#D9AB14"></up-icon>30</view>
  16. </view>
  17. <view class="check-wrap">
  18. <view :class="['check-day',{active:item.check}]" v-for="(item, index) in checkDay" :key="index">
  19. <view class="leaf">
  20. <image class="icon"
  21. :src="`${config.BASIC_IMG}img/subTreePage/${item.check?'gray-leaf':'leaf-icon'}.png`" alt="">
  22. </image>
  23. <text>x20</text>
  24. </view>
  25. <view v-if="item.check">已领取</view>
  26. <view v-else>第{{item.day}}天</view>
  27. </view>
  28. </view>
  29. </view>
  30. <view class="gift-card">
  31. <view class="card-title">守护等级划分</view>
  32. <view class="card-desc">守护等级共有5个等级,您的守护等级会根据您累计的能量值决定的,当您的能量值达到相应的要求即可升级并获得相对应礼物,不同等级的用户获得礼物不同。</view>
  33. <view class="card-table">
  34. <view class="table-item" v-for="(item,index) in tableList" :key="index">
  35. <view class="levle">{{item.level}}等级</view>
  36. <view>{{item.text}}</view>
  37. <view class="gift">{{item.gift}}</view>
  38. </view>
  39. </view>
  40. </view>
  41. <view class="gift-card">
  42. <view class="card-title">积累能量规则</view>
  43. <view class="card-desc">每日登录会积累相应的能量,连续登录天数越高能量值越高,每天可以通过做任务增加能量值,每日阳光可以获得 10 能量,分享转发可以获得 10 能量,送ta祝福可以获得 10
  44. 能量,水果订购一次,可以获得 100 能量,但是需要扫描箱内溯源卡的二维码领取。</view>
  45. </view>
  46. </view>
  47. </template>
  48. <script setup>
  49. import config from "@/api/config.js"
  50. const checkDay = [{
  51. day: 1,
  52. check: true
  53. },
  54. {
  55. day: 2,
  56. check: true
  57. },
  58. {
  59. day: 3,
  60. check: false
  61. },
  62. {
  63. day: 4,
  64. check: false
  65. },
  66. {
  67. day: 5,
  68. check: false
  69. },
  70. {
  71. day: 6,
  72. check: false
  73. },
  74. {
  75. day: 7,
  76. check: false
  77. }
  78. ]
  79. const tableList = [{
  80. level: '平民',
  81. text: '无要求',
  82. gift: '无礼品'
  83. },
  84. {
  85. level: '青铜',
  86. text: '达到300能量',
  87. gift: '一份曲奇'
  88. },
  89. {
  90. level: '白银',
  91. text: '达到600能量',
  92. gift: '一份精美水果'
  93. },
  94. {
  95. level: '赤金',
  96. text: '达到900能量',
  97. gift: '一份荔枝'
  98. },
  99. {
  100. level: '星勋',
  101. text: '达到1200能量',
  102. gift: '一份荔枝'
  103. }
  104. ]
  105. </script>
  106. <style lang="scss" scoped>
  107. @import "@/static/style/mixin.scss";
  108. .sub-base-container {
  109. @include ossBg("subTreePage/gift-bg.png");
  110. padding: 12rpx 20rpx 20rpx;
  111. .gift-title {
  112. display: flex;
  113. align-items: center;
  114. justify-content: space-between;
  115. padding: 0 14rpx;
  116. .name {
  117. color: rgba(0, 0, 0, 0.5);
  118. font-size: 28rpx;
  119. .txt {
  120. font-size: 60rpx;
  121. font-family: 'PangMenZhengDao';
  122. color: #000;
  123. }
  124. }
  125. .icon {
  126. width: 212rpx;
  127. height: 222rpx;
  128. }
  129. }
  130. .energy-card {
  131. margin-top: -10rpx;
  132. position: relative;
  133. z-index: 2;
  134. .gift-name {
  135. font-weight: 500;
  136. text {
  137. color: #F3B242;
  138. }
  139. }
  140. .tips {
  141. display: flex;
  142. align-items: center;
  143. font-size: 24rpx;
  144. color: rgba(0, 0, 0, 0.4);
  145. .icon{
  146. width: 24rpx;
  147. height: 22rpx;
  148. margin: 0 8rpx;
  149. }
  150. .score {
  151. display: flex;
  152. align-items: center;
  153. color: #D9AB14;
  154. }
  155. }
  156. .check-wrap {
  157. margin: 28rpx 0 20rpx 0;
  158. display: flex;
  159. .check-day {
  160. flex: 1;
  161. padding: 20rpx 0;
  162. font-size: 20rpx;
  163. color: #F3B242;
  164. background: rgba(185, 185, 185, 0.1);
  165. border-radius: 10rpx;
  166. text-align: center;
  167. &.active {
  168. color: #BCBCBA;
  169. }
  170. .leaf {
  171. font-size: 20rpx;
  172. display: flex;
  173. justify-content: center;
  174. align-items: center;
  175. .icon{
  176. width: 28rpx;
  177. height: 28rpx;
  178. margin-right: 4rpx;
  179. margin-bottom: 10rpx;
  180. }
  181. }
  182. }
  183. .check-day+.check-day {
  184. margin-left: 10rpx;
  185. }
  186. }
  187. }
  188. .gift-card {
  189. border-radius: 16rpx;
  190. background: #fff;
  191. padding: 20rpx;
  192. .card-title {
  193. font-weight: 500;
  194. }
  195. .card-desc {
  196. margin-top: 10rpx;
  197. line-height: 36rpx;
  198. font-size: 24rpx;
  199. }
  200. .card-table {
  201. margin-top: 20rpx;
  202. .table-item {
  203. display: flex;
  204. background: rgba(243, 193, 29, 0.07);
  205. .levle {
  206. background: rgba(243, 193, 29, 0.12);
  207. }
  208. .gift {
  209. color: #CC9D00;
  210. }
  211. view {
  212. flex: 1;
  213. padding: 30rpx 0;
  214. text-align: center;
  215. font-size: 28rpx;
  216. }
  217. }
  218. .table-item+.table-item {
  219. border-top: 2rpx solid rgba(0, 0, 0, 0.06);
  220. }
  221. }
  222. }
  223. .gift-card+.gift-card {
  224. margin-top: 20rpx;
  225. }
  226. }
  227. </style>