rules.vue 8.4 KB

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