rules.vue 4.7 KB

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