shoppingMall.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. <template>
  2. <view class="">
  3. <view class="margin-top" style="padding: 0 30rpx;">
  4. <view class="title">选择兑换平台</view>
  5. <view class="flex" style="justify-content: space-between; margin: 20rpx 0;">
  6. <view class="module" :class="{ selected: selectedModule === 'douyin' }" @click="selectModule('douyin')">
  7. <image v-if="globalImages" :src="globalImages + 'imgs/douyin.png'" style="width: 100rpx;height: 100rpx;" mode="">
  8. </image>
  9. <view style="font-size: 33rpx;margin-top: 20rpx;">抖音兑换码</view>
  10. <view style="font-size: 23rpx; color: #999;margin-top: 10rpx;">输入抖音兑换码领取奖励</view>
  11. </view>
  12. <view class="module" :class="{ selected2: selectedModule === 'kuaishou' }"
  13. @click="selectModule('kuaishou')">
  14. <image v-if="globalImages" :src="globalImages + 'images/my/kuaishou.png'" style="width: 100rpx;height: 100rpx;" mode="">
  15. </image>
  16. <view style="font-size: 33rpx;margin-top: 20rpx;">快手兑换码</view>
  17. <view style="font-size: 23rpx; color: #999;margin-top: 10rpx;">输入快手兑换码领取奖励</view>
  18. </view>
  19. </view>
  20. </view>
  21. <view class="margin-top" style="padding: 0 30rpx;">
  22. <view class="flex align-center" style="position: relative;">
  23. <view class="title">输入兑换码</view>
  24. </view>
  25. <view class="margin-top padding" style="background: #FFFFFF;border-radius: 20upx;">
  26. <view class="flex"
  27. style="margin: 20rpx 0; padding: 20rpx;border-radius: 11rpx; border: 1px #ccc solid;">
  28. <input class="uni-input" style="width: 90%;" placeholder="输入充值金额" />
  29. <image v-if="globalImages" :src="globalImages + 'images/saoma.png'" style="width: 44rpx;height: 44rpx;margin-left: 15rpx;"
  30. mode=""></image>
  31. </view>
  32. </view>
  33. <view class="margin-top padding" style="background: #FFFFFF;border-radius: 20upx;">
  34. <view class="title">使用说明</view>
  35. <view class="instruction-list">
  36. <view class="instruction-item">
  37. <text class="step-number">1.</text>
  38. <text class="step-content">在抖音/快手 APP 内获取兑换码</text>
  39. </view>
  40. <view class="instruction-item">
  41. <text class="step-number">2.</text>
  42. <text class="step-content">选择对应平台并输入兑换码</text>
  43. </view>
  44. <view class="instruction-item">
  45. <text class="step-number">3.</text>
  46. <text class="step-content">点击“立即兑换”按钮完成兑换</text>
  47. </view>
  48. </view>
  49. </view>
  50. <view class="margin-top padding" style="background: #FFFFFF;border-radius: 20upx;">
  51. <view class="title">注意事项</view>
  52. <ul class="notice-list">
  53. <li class="notice-item">兑换码有效期通常为 30 天,请及时兑换</li>
  54. <li class="notice-item">每个兑换码仅使用一次</li>
  55. <li class="notice-item">兑换成功奖励直接发放至账户</li>
  56. <li class="notice-item">如有问题请联系客服 400 - 123 - 4567</li>
  57. </ul>
  58. </view>
  59. <view class="login_btn">立即兑换</view>
  60. </view>
  61. </view>
  62. </template>
  63. <script>
  64. import { waitForGlobalImages } from '@/utils/globalImageLoader'
  65. export default {
  66. data() {
  67. return {
  68. selectedModule: 'douyin',
  69. globalImages: ''
  70. }
  71. },
  72. methods: {
  73. selectModule(module) {
  74. this.selectedModule = module;
  75. }
  76. },
  77. onLoad() {
  78. waitForGlobalImages().then((path) => {
  79. console.log('✅ 全局图片路径:', path)
  80. this.globalImages = path
  81. })
  82. },
  83. mounted() {
  84. }
  85. }
  86. </script>
  87. <style scoped>
  88. .title {
  89. font-size: 33rpx;
  90. font-family: PingFang SC;
  91. color: #333333;
  92. }
  93. .instruction-list {
  94. display: flex;
  95. flex-direction: column;
  96. gap: 15rpx;
  97. margin-top: 20rpx;
  98. }
  99. .instruction-item {
  100. display: flex;
  101. align-items: flex-start;
  102. }
  103. .step-number {
  104. font-size: 28rpx;
  105. color: #666;
  106. margin-right: 15rpx;
  107. }
  108. .step-content {
  109. font-size: 28rpx;
  110. color: #666;
  111. line-height: 1.5;
  112. }
  113. .notice-list {
  114. margin-top: 20rpx;
  115. list-style-type: none;
  116. padding: 0;
  117. }
  118. /* 注意事项列表项 */
  119. .notice-item {
  120. font-size: 28rpx;
  121. color: #666;
  122. line-height: 1.6;
  123. position: relative;
  124. padding-left: 30rpx;
  125. margin-bottom: 10rpx;
  126. }
  127. /* 自定义列表项前面的圆点 */
  128. .notice-item::before {
  129. content: "";
  130. position: absolute;
  131. left: 0;
  132. top: 50%;
  133. transform: translateY(-50%);
  134. width: 10rpx;
  135. height: 10rpx;
  136. background-color: #666;
  137. border-radius: 50%;
  138. }
  139. .login_btn {
  140. width: 100%;
  141. margin: 60rpx auto;
  142. text-align: center;
  143. background: #00c18a;
  144. height: 80rpx;
  145. border-radius: 16rpx;
  146. color: #ffffff;
  147. line-height: 80rpx;
  148. }
  149. .module {
  150. width: 45%;
  151. height: 300rpx;
  152. border-radius: 16rpx;
  153. padding: 40rpx;
  154. text-align: center;
  155. border: #e5e7eb 1rpx solid;
  156. }
  157. .module:nth-child(1) {
  158. background: #e8fbf6;
  159. }
  160. .module:nth-child(2) {
  161. background: #ecf5ff;
  162. }
  163. .selected {
  164. border-color: #00c18a;
  165. }
  166. .selected2 {
  167. border-color: #409eff;
  168. }
  169. </style>