rules.vue 8.5 KB

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