rules.vue 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440
  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. <u-row class="row-class">
  10. <u-col span="4">
  11. <image class="logo-img"
  12. src="https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/cjx/logo.png"
  13. mode="aspectFit" />
  14. </u-col>
  15. <u-col span="4">
  16. <image class="commodity-img"
  17. src="https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/cjx/commodity.png"
  18. mode="aspectFit" />
  19. </u-col>
  20. <u-col span="4">
  21. <image class="logo-rules"
  22. src="https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/cjx/rules.png" />
  23. </u-col>
  24. </u-row>
  25. </view>
  26. <view class="topImg">
  27. <image class="img_1" src="https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/cjx/topImg.png"
  28. mode="heightFix" />
  29. </view>
  30. <view class="content">
  31. <view class="cardTop">
  32. </view>
  33. <view class="content_text">
  34. <view class="h1">
  35. .活动规则
  36. </view>
  37. <view class="text_1">
  38. 凡购买我司产品,扫描外包装背后二维码,即有机会参与优惠活动,赢取优惠或实物礼品。
  39. </view>
  40. <view class="h1">
  41. .扫码有效时间
  42. </view>
  43. <view class="text_1">
  44. 本产品生产日期开始60天内可以扫码参与优惠活动。
  45. </view>
  46. <view class="h1">
  47. .扫码次数
  48. </view>
  49. <view class="text_1">
  50. 每个微信号,单日扫码活动以5次为限。
  51. </view>
  52. <view class="h1">
  53. .活动参与方式
  54. </view>
  55. <view class="text_1">
  56. 1.通过手机扫描外包装背面二维码,进入优惠界面。
  57. </view>
  58. <view class="text_1">
  59. 2.撕开包装,输入内侧验证码参与优惠活动。
  60. </view>
  61. <view class="h1">
  62. .活动奖品
  63. </view>
  64. </view>
  65. <view class="return_view">
  66. <view class="return-button">返回</view>
  67. </view>
  68. </view>
  69. </view>
  70. <CustomTabbar />
  71. </view>
  72. </template>
  73. <script>
  74. import CustomTabbar from '@/components/tabbar_cjx.vue';
  75. import {
  76. getRule
  77. } from '@/api/scan'
  78. export default {
  79. components: {
  80. CustomTabbar
  81. },
  82. data() {
  83. return {
  84. scanCode: '',
  85. planDetails: []
  86. }
  87. },
  88. onLoad() {
  89. this.scanCode = uni.getStorageSync('scanCode');
  90. this.initRuleData();
  91. },
  92. methods: {
  93. goBack() {
  94. uni.navigateBack();
  95. },
  96. initRuleData() {
  97. getRule(this.scanCode).then(res => {
  98. console.log(res)
  99. if (res.code == 0) {
  100. this.planDetails = res.data.planDetails;
  101. }
  102. })
  103. }
  104. }
  105. }
  106. </script>
  107. <style>
  108. @import url('../../../static/scss/common_cjx.css');
  109. .row-class {
  110. height: 80rpx;
  111. }
  112. .logo-rules {
  113. height: 124rpx;
  114. width: 80rpx;
  115. margin-left: 110rpx;
  116. }
  117. .logo-img {
  118. background-size: cover;
  119. /* 确保背景图片自适应填充整个容器 */
  120. background-position: center;
  121. /* 背景图片居中显示 */
  122. background-repeat: no-repeat;
  123. /* 防止背景图重复 */
  124. height: 100rpx;
  125. width: 62%;
  126. margin-right: 80rpx;
  127. }
  128. .commodity-img {
  129. background-size: cover;
  130. /* 确保背景图片自适应填充整个容器 */
  131. background-position: center;
  132. /* 背景图片居中显示 */
  133. background-repeat: no-repeat;
  134. /* 防止背景图重复 */
  135. height: 72rpx;
  136. width: 100%;
  137. }
  138. .text {
  139. height: 10vh;
  140. text-align: center;
  141. line-height: 13vh;
  142. margin-bottom: 10rpx;
  143. }
  144. .textImage {
  145. height: 80rpx;
  146. width: 400rpx;
  147. }
  148. .content {
  149. height: 60vh;
  150. border-radius: 10rpx;
  151. margin: 0rpx 40rpx;
  152. padding: 10rpx 24rpx;
  153. overflow: auto;
  154. align-items: center;
  155. justify-content: center;
  156. background-image:
  157. url("https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/cjx/cardBgi.png");
  158. background-size: cover;
  159. background-position: center;
  160. background-repeat: no-repeat;
  161. }
  162. .text-1 {
  163. text-align: center;
  164. font-size: 24rpx;
  165. font-weight: 600;
  166. color: white;
  167. background-color: #9A1712;
  168. width: 160rpx;
  169. border-radius: 4rpx;
  170. height: 40rpx;
  171. line-height: 40rpx;
  172. }
  173. .text-2 {
  174. text-align: center;
  175. font-size: 24rpx;
  176. font-weight: 600;
  177. color: #F9D395;
  178. background-color: #9A1712;
  179. width: 120rpx;
  180. border-radius: 4rpx;
  181. height: 40rpx;
  182. line-height: 40rpx;
  183. margin-left: 80rpx;
  184. }
  185. .cards {
  186. display: grid;
  187. grid-template-columns: repeat(3, 1fr);
  188. gap: 30rpx;
  189. width: 100%;
  190. }
  191. .card {
  192. width: 100%;
  193. height: 250rpx;
  194. position: relative;
  195. background: none;
  196. border-radius: 16rpx;
  197. margin: 0;
  198. perspective: 1000px;
  199. }
  200. .card-inner {
  201. position: relative;
  202. width: 100%;
  203. height: 100%;
  204. transition: transform 0.8s cubic-bezier(0.5, 1.5, 0.5, 1);
  205. transform-style: preserve-3d;
  206. }
  207. .card.flipping .card-inner {
  208. transform: rotateY(180deg);
  209. }
  210. .card.flipped .card-inner {
  211. transform: rotateY(180deg);
  212. }
  213. .card-front,
  214. .card-back {
  215. position: absolute;
  216. width: 100%;
  217. height: 100%;
  218. backface-visibility: hidden;
  219. }
  220. .card-back {
  221. transform: rotateY(180deg);
  222. }
  223. .card-back-text {
  224. position: absolute;
  225. top: 50%;
  226. left: 0;
  227. width: 100%;
  228. text-align: center;
  229. color: #9A1712;
  230. font-weight: bold;
  231. font-size: 28rpx;
  232. transform: translateY(-50%);
  233. z-index: 2;
  234. pointer-events: none;
  235. }
  236. .card-img {
  237. width: 100%;
  238. height: 100%;
  239. display: block;
  240. }
  241. ::v-deep .u-popup__content {
  242. height: 720rpx;
  243. width: 600rpx;
  244. background-color: rgba(0, 0, 0, 0) !important;
  245. background-image:
  246. url("https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/guzhenganzi/bgiPopup.png");
  247. background-size: cover;
  248. background-position: center;
  249. background-repeat: no-repeat;
  250. }
  251. ::v-deep .u-popup__content__close--top-right {
  252. top: 720rpx !important;
  253. right: 288rpx !important;
  254. }
  255. .winImgClss {
  256. height: 60rpx;
  257. width: 320rpx;
  258. }
  259. .popup-view {
  260. text-align: center;
  261. margin-top: 100rpx;
  262. }
  263. .popup-content {
  264. margin: 15px 54px;
  265. overflow: auto;
  266. }
  267. .popup-text {
  268. font-weight: 400;
  269. font-size: 20rpx;
  270. color: #9B0000;
  271. }
  272. .prize {
  273. height: 130rpx;
  274. width: 130rpx;
  275. }
  276. ::v-deep .u-form-item__body {
  277. padding: 8rpx;
  278. }
  279. ::v-deep uni-view.u-form-item__body__left {
  280. background: #AD7F55;
  281. border-radius: 5px 0px 0px 5px;
  282. border: 2px solid #63462B;
  283. border-right: none;
  284. }
  285. ::v-deep .u-form-item__body__right {
  286. background-color: #fff;
  287. border-radius: 0px 5px 5px 0px;
  288. border: 2px solid #63462B;
  289. }
  290. ::v-deep uni-text.u-form-item__body__left__content__label {
  291. color: #fff !important;
  292. padding-left: 4px;
  293. letter-spacing: 2px;
  294. }
  295. .popup-flex {
  296. display: flex;
  297. flex-direction: column;
  298. height: 100%;
  299. /* 或具体高度如340px,确保撑满弹窗 */
  300. min-width: 600rpx;
  301. }
  302. .popup-content-scroll {
  303. flex: 1;
  304. }
  305. .popup-footer {
  306. flex-shrink: 0;
  307. padding: 0rpx 0 60rpx 0px;
  308. text-align: center;
  309. background: transparent;
  310. /* 可选,确保无背景遮挡 */
  311. }
  312. .save-button {
  313. width: 90rpx;
  314. margin: 0 auto;
  315. background: #b22222;
  316. color: #F9D395;
  317. border-radius: 12rpx;
  318. padding: 18rpx 0;
  319. font-size: 24rpx;
  320. font-weight: bold;
  321. height: 16rpx;
  322. line-height: 16rpx;
  323. letter-spacing: 4rpx;
  324. }
  325. .unWin {
  326. width: 130rpx !important;
  327. }
  328. .productImg {
  329. width: 400rpx;
  330. }
  331. ::v-deep .u-swiper {
  332. background-color: rgba(0, 0, 0, 0) !important;
  333. padding: 0px 20rpx !important;
  334. width: 90%;
  335. }
  336. ::v-deep .u-col-4 {
  337. display: flex !important;
  338. justify-content: center !important;
  339. /* 水平居中 */
  340. align-items: center !important;
  341. /* 垂直居中 */
  342. }
  343. ::v-deep .right-col .u-col-4 {
  344. display: flex !important;
  345. justify-content: flex-end !important;
  346. /* 水平居中 */
  347. align-items: center !important;
  348. /* 垂直居中 */
  349. }
  350. .card-img-f {
  351. height: 100rpx;
  352. width: 100rpx;
  353. }
  354. .card-text {
  355. font-size: 26rpx;
  356. }
  357. .select-tag {
  358. position: absolute;
  359. right: 0px;
  360. font-weight: 400;
  361. font-size: 20rpx;
  362. color: #FFFFFF;
  363. width: 40px;
  364. text-align: center;
  365. background-color: #11BC64;
  366. height: 15px;
  367. border-radius: 3px;
  368. line-height: 15px;
  369. z-index: 5;
  370. }
  371. .h1 {
  372. font-weight: bold;
  373. font-size: 28rpx;
  374. color: #E22ADD;
  375. margin-bottom: 10rpx;
  376. }
  377. .text_1 {
  378. font-weight: 400;
  379. font-size: 12px;
  380. color: #FFFFFF;
  381. margin-bottom: 10rpx;
  382. }
  383. </style>