rules.vue 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459
  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" @click="openDetail" />
  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. <u-row class="row-class" customStyle="margin-bottom: 5px" v-for="(item, index) in planDetails">
  65. <u-col span="4" textAlign ="left" >
  66. <view class=" item-text">{{item.prize_name}}</view>
  67. </u-col>
  68. <u-col span="8">
  69. <view class="item-text-1">{{item.prize_desc}}</view>
  70. </u-col>
  71. </u-row>
  72. </view>
  73. <view class="return_view">
  74. <view class="return-button" @click="goBack">返回</view>
  75. </view>
  76. </view>
  77. </view>
  78. </view>
  79. </template>
  80. <script>
  81. import {
  82. getRule
  83. } from '@/api/scan'
  84. export default {
  85. data() {
  86. return {
  87. scanCode: '',
  88. planDetails: []
  89. }
  90. },
  91. onLoad() {
  92. this.scanCode = uni.getStorageSync('scanCode');
  93. this.initRuleData();
  94. },
  95. methods: {
  96. openDetail(){
  97. uni.navigateTo({
  98. url: '/pages/cjx/index/rules'
  99. });
  100. },
  101. goBack() {
  102. uni.navigateBack();
  103. },
  104. initRuleData() {
  105. getRule(this.scanCode).then(res => {
  106. console.log(res)
  107. if (res.code == 0) {
  108. this.planDetails = res.data.planDetails;
  109. }
  110. })
  111. }
  112. }
  113. }
  114. </script>
  115. <style>
  116. @import url('../../../static/scss/common_cjx.css');
  117. .cardTop{
  118. background-image:
  119. url("https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/cjx/hdgz.png");
  120. }
  121. .row-class {
  122. height: 80rpx;
  123. }
  124. .logo-rules {
  125. height: 124rpx;
  126. width: 80rpx;
  127. margin-left: 110rpx;
  128. }
  129. .logo-img {
  130. background-size: cover;
  131. /* 确保背景图片自适应填充整个容器 */
  132. background-position: center;
  133. /* 背景图片居中显示 */
  134. background-repeat: no-repeat;
  135. /* 防止背景图重复 */
  136. height: 100rpx;
  137. width: 62%;
  138. margin-right: 80rpx;
  139. }
  140. .commodity-img {
  141. background-size: cover;
  142. /* 确保背景图片自适应填充整个容器 */
  143. background-position: center;
  144. /* 背景图片居中显示 */
  145. background-repeat: no-repeat;
  146. /* 防止背景图重复 */
  147. height: 72rpx;
  148. width: 100%;
  149. }
  150. .item-text{
  151. font-weight: 500;
  152. font-size: 30rpx;
  153. color: #FFFFFF;
  154. }
  155. .item-text-1{
  156. font-weight: 500;
  157. font-size: 30rpx;
  158. color: #D9B96D;
  159. }
  160. .text {
  161. height: 10vh;
  162. text-align: center;
  163. line-height: 13vh;
  164. margin-bottom: 10rpx;
  165. }
  166. .textImage {
  167. height: 80rpx;
  168. width: 400rpx;
  169. }
  170. .content {
  171. height: 60vh;
  172. border-radius: 10rpx;
  173. margin: 0rpx 40rpx;
  174. padding: 10rpx 24rpx;
  175. overflow: auto;
  176. align-items: center;
  177. justify-content: center;
  178. background-image:
  179. url("https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/cjx/cardBgi.png");
  180. background-size: cover;
  181. background-position: center;
  182. background-repeat: no-repeat;
  183. }
  184. .text-1 {
  185. text-align: center;
  186. font-size: 24rpx;
  187. font-weight: 600;
  188. color: white;
  189. background-color: #9A1712;
  190. width: 160rpx;
  191. border-radius: 4rpx;
  192. height: 40rpx;
  193. line-height: 40rpx;
  194. }
  195. .text-2 {
  196. text-align: center;
  197. font-size: 24rpx;
  198. font-weight: 600;
  199. color: #F9D395;
  200. background-color: #9A1712;
  201. width: 120rpx;
  202. border-radius: 4rpx;
  203. height: 40rpx;
  204. line-height: 40rpx;
  205. margin-left: 80rpx;
  206. }
  207. .cards {
  208. display: grid;
  209. grid-template-columns: repeat(3, 1fr);
  210. gap: 30rpx;
  211. width: 100%;
  212. }
  213. .card {
  214. width: 100%;
  215. height: 250rpx;
  216. position: relative;
  217. background: none;
  218. border-radius: 16rpx;
  219. margin: 0;
  220. perspective: 1000px;
  221. }
  222. .card-inner {
  223. position: relative;
  224. width: 100%;
  225. height: 100%;
  226. transition: transform 0.8s cubic-bezier(0.5, 1.5, 0.5, 1);
  227. transform-style: preserve-3d;
  228. }
  229. .card.flipping .card-inner {
  230. transform: rotateY(180deg);
  231. }
  232. .card.flipped .card-inner {
  233. transform: rotateY(180deg);
  234. }
  235. .card-front,
  236. .card-back {
  237. position: absolute;
  238. width: 100%;
  239. height: 100%;
  240. backface-visibility: hidden;
  241. }
  242. .card-back {
  243. transform: rotateY(180deg);
  244. }
  245. .card-back-text {
  246. position: absolute;
  247. top: 50%;
  248. left: 0;
  249. width: 100%;
  250. text-align: center;
  251. color: #9A1712;
  252. font-weight: bold;
  253. font-size: 28rpx;
  254. transform: translateY(-50%);
  255. z-index: 2;
  256. pointer-events: none;
  257. }
  258. .card-img {
  259. width: 100%;
  260. height: 100%;
  261. display: block;
  262. }
  263. ::v-deep .u-popup__content {
  264. height: 720rpx;
  265. width: 600rpx;
  266. background-color: rgba(0, 0, 0, 0) !important;
  267. background-image:
  268. url("https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/guzhenganzi/bgiPopup.png");
  269. background-size: cover;
  270. background-position: center;
  271. background-repeat: no-repeat;
  272. }
  273. ::v-deep .u-popup__content__close--top-right {
  274. top: 720rpx !important;
  275. right: 288rpx !important;
  276. }
  277. .winImgClss {
  278. height: 60rpx;
  279. width: 320rpx;
  280. }
  281. .popup-view {
  282. text-align: center;
  283. margin-top: 100rpx;
  284. }
  285. .popup-content {
  286. margin: 15px 54px;
  287. overflow: auto;
  288. }
  289. .popup-text {
  290. font-weight: 400;
  291. font-size: 20rpx;
  292. color: #9B0000;
  293. }
  294. .prize {
  295. height: 130rpx;
  296. width: 130rpx;
  297. }
  298. ::v-deep .u-form-item__body {
  299. padding: 8rpx;
  300. }
  301. ::v-deep uni-view.u-form-item__body__left {
  302. background: #AD7F55;
  303. border-radius: 5px 0px 0px 5px;
  304. border: 2px solid #63462B;
  305. border-right: none;
  306. }
  307. ::v-deep .u-form-item__body__right {
  308. background-color: #fff;
  309. border-radius: 0px 5px 5px 0px;
  310. border: 2px solid #63462B;
  311. }
  312. ::v-deep uni-text.u-form-item__body__left__content__label {
  313. color: #fff !important;
  314. padding-left: 4px;
  315. letter-spacing: 2px;
  316. }
  317. .popup-flex {
  318. display: flex;
  319. flex-direction: column;
  320. height: 100%;
  321. /* 或具体高度如340px,确保撑满弹窗 */
  322. min-width: 600rpx;
  323. }
  324. .popup-content-scroll {
  325. flex: 1;
  326. }
  327. .popup-footer {
  328. flex-shrink: 0;
  329. padding: 0rpx 0 60rpx 0px;
  330. text-align: center;
  331. background: transparent;
  332. /* 可选,确保无背景遮挡 */
  333. }
  334. .save-button {
  335. width: 90rpx;
  336. margin: 0 auto;
  337. background: #b22222;
  338. color: #F9D395;
  339. border-radius: 12rpx;
  340. padding: 18rpx 0;
  341. font-size: 24rpx;
  342. font-weight: bold;
  343. height: 16rpx;
  344. line-height: 16rpx;
  345. letter-spacing: 4rpx;
  346. }
  347. .unWin {
  348. width: 130rpx !important;
  349. }
  350. .productImg {
  351. width: 400rpx;
  352. }
  353. ::v-deep .u-swiper {
  354. background-color: rgba(0, 0, 0, 0) !important;
  355. padding: 0px 20rpx !important;
  356. width: 90%;
  357. }
  358. ::v-deep .u-col-4 {
  359. }
  360. ::v-deep .right-col .u-col-4 {
  361. display: flex !important;
  362. justify-content: flex-end !important;
  363. /* 水平居中 */
  364. align-items: center !important;
  365. /* 垂直居中 */
  366. }
  367. .card-img-f {
  368. height: 100rpx;
  369. width: 100rpx;
  370. }
  371. .card-text {
  372. font-size: 26rpx;
  373. }
  374. .select-tag {
  375. position: absolute;
  376. right: 0px;
  377. font-weight: 400;
  378. font-size: 20rpx;
  379. color: #FFFFFF;
  380. width: 40px;
  381. text-align: center;
  382. background-color: #11BC64;
  383. height: 15px;
  384. border-radius: 3px;
  385. line-height: 15px;
  386. z-index: 5;
  387. }
  388. .h1 {
  389. font-weight: bold;
  390. font-size: 28rpx;
  391. color: #E22ADD;
  392. margin-bottom: 10rpx;
  393. }
  394. .text_1 {
  395. font-weight: 400;
  396. font-size: 12px;
  397. color: #FFFFFF;
  398. margin-bottom: 10rpx;
  399. }
  400. </style>