rules.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. <template>
  2. <view class="common">
  3. <view class="body">
  4. <view class="top-class"></view>
  5. <view class="title">
  6. 活动规则
  7. </view>
  8. <view class="head">
  9. </view>
  10. <view class="content">
  11. <view class="content_text">
  12. <view class="h1">
  13. .活动规则
  14. </view>
  15. <view class="text_1">
  16. 凡购买我司产品,扫描外包装背后二维码,即有机会参与优惠活动,赢取优惠或实物礼品。
  17. </view>
  18. <view class="h1">
  19. .扫码有效时间
  20. </view>
  21. <view class="text_1">
  22. 本产品生产日期开始有效期内可以扫码参与优惠活动。
  23. </view>
  24. <view class="h1">
  25. .扫码次数
  26. </view>
  27. <view class="text_1">
  28. 每个微信号,单日扫码活动以5次为限。
  29. </view>
  30. <view class="h1">
  31. .活动参与方式
  32. </view>
  33. <view class="text_1">
  34. 1.通过手机扫描外包装背面二维码,进入优惠界面。
  35. </view>
  36. <view class="text_1">
  37. 2.撕开包装,输入内侧验证码参与优惠活动。
  38. </view>
  39. <view class="h1">
  40. .活动奖品
  41. </view>
  42. <u-row class="row-class" customStyle="margin-bottom: 5px" v-for="(item, index) in planDetails">
  43. <u-col span="12" textAlign ="left" >
  44. <view class=" item-text">{{item.prize_name}}</view>
  45. </u-col>
  46. </u-row>
  47. </view>
  48. <view class="return_view">
  49. <view class="return-button" @click="goBack">返回</view>
  50. </view>
  51. </view>
  52. </view>
  53. </view>
  54. </template>
  55. <script>
  56. import {
  57. getRule
  58. } from '@/api/scan'
  59. export default {
  60. data() {
  61. return {
  62. scanCode: '',
  63. planDetails: []
  64. }
  65. },
  66. onLoad() {
  67. this.scanCode = uni.getStorageSync('scanCode');
  68. this.initRuleData();
  69. },
  70. methods: {
  71. goBack() {
  72. uni.navigateBack();
  73. },
  74. initRuleData() {
  75. getRule(this.scanCode).then(res => {
  76. console.log(res)
  77. if (res.code == 0) {
  78. this.planDetails = res.data.planDetails;
  79. }
  80. })
  81. }
  82. }
  83. }
  84. </script>
  85. <style>
  86. @import url('../../../static/scss/common_qilang.css');
  87. .row-class {
  88. height: 80rpx;
  89. }
  90. .item-text{
  91. font-weight: 500;
  92. font-size: 30rpx;
  93. color: #EC6B25;
  94. }
  95. .content {
  96. height: 65vh;
  97. padding: 10rpx 24rpx;
  98. overflow: auto;
  99. align-items: center;
  100. justify-content: center;
  101. border-radius: 48px;
  102. background: #FDE2B1;
  103. border: 6px solid #FB911b;
  104. margin: 10vh 40rpx 0rpx;
  105. }
  106. ::v-deep .u-popup__content {
  107. height: 720rpx;
  108. width: 600rpx;
  109. background-color: rgba(0, 0, 0, 0) !important;
  110. background-image:
  111. url("https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/guzhenganzi/bgiPopup.png");
  112. background-size: cover;
  113. background-position: center;
  114. background-repeat: no-repeat;
  115. }
  116. ::v-deep .u-popup__content__close--top-right {
  117. top: 720rpx !important;
  118. right: 288rpx !important;
  119. }
  120. ::v-deep .u-form-item__body {
  121. padding: 8rpx;
  122. }
  123. ::v-deep uni-view.u-form-item__body__left {
  124. background: #AD7F55;
  125. border-radius: 5px 0px 0px 5px;
  126. border: 2px solid #63462B;
  127. border-right: none;
  128. }
  129. ::v-deep .u-form-item__body__right {
  130. background-color: #fff;
  131. border-radius: 0px 5px 5px 0px;
  132. border: 2px solid #63462B;
  133. }
  134. ::v-deep uni-text.u-form-item__body__left__content__label {
  135. color: #fff !important;
  136. padding-left: 4px;
  137. letter-spacing: 2px;
  138. }
  139. .popup-flex {
  140. display: flex;
  141. flex-direction: column;
  142. height: 100%;
  143. /* 或具体高度如340px,确保撑满弹窗 */
  144. min-width: 600rpx;
  145. }
  146. .popup-content-scroll {
  147. flex: 1;
  148. }
  149. .popup-footer {
  150. flex-shrink: 0;
  151. padding: 0rpx 0 60rpx 0px;
  152. text-align: center;
  153. background: transparent;
  154. /* 可选,确保无背景遮挡 */
  155. }
  156. ::v-deep .u-swiper {
  157. background-color: rgba(0, 0, 0, 0) !important;
  158. padding: 0px 20rpx !important;
  159. width: 90%;
  160. }
  161. ::v-deep .right-col .u-col-4 {
  162. display: flex !important;
  163. justify-content: flex-end !important;
  164. /* 水平居中 */
  165. align-items: center !important;
  166. /* 垂直居中 */
  167. }
  168. .h1 {
  169. font-weight: bold;
  170. font-size: 28rpx;
  171. color: #000000;
  172. margin-bottom: 10rpx;
  173. }
  174. .text_1 {
  175. font-weight: 400;
  176. font-size: 12px;
  177. color: #000000;
  178. margin-bottom: 10rpx;
  179. }
  180. </style>