index.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728
  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><image class="logo-img" src="/static/images/common/logo.png" mode="aspectFit" /></view>
  9. <view class="head">
  10. <u-swiper :list="list1"></u-swiper>
  11. </view>
  12. <view class="text">
  13. <image src="https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/guzhenganzi/text.png"
  14. class="textImage"></image>
  15. </view>
  16. <view class="content">
  17. <view class="chouka" style="width: 100%;">
  18. <view class="" style="margin-bottom: 10px;">
  19. <u-row justify="space-between"
  20. customStyle="margin-bottom: 5px;display: flex; align-items: center;">
  21. <u-col span="4">
  22. </u-col>
  23. <u-col span="4" class="center-col">
  24. <view class="text-1">翻卡抽盲盒</view>
  25. </u-col>
  26. <u-col span="4" class="right-col">
  27. <view class="text-2" @click="openDetail()">活动规则</view>
  28. </u-col>
  29. </u-row>
  30. </view>
  31. <template>
  32. <!-- 卡片区 -->
  33. <view class="cards">
  34. <view class="card" v-for="(item, idx) in cards" :key="idx" @click="flipCard(idx)"
  35. :class="{ 'flipping': item.isFlipping, 'flipped': item.flipped }">
  36. <view v-if="item.checkStauts" class="select-tag">
  37. 已选
  38. </view>
  39. <view class="card-inner">
  40. <view class="card-front">
  41. <image class="card-img" :src="item.front" mode="scaleToFill"></image>
  42. </view>
  43. <view class="card-back">
  44. <image class="card-img" :src="item.prizeType == 2 && item.img ? item.img : item.back"
  45. mode="scaleToFill"></image>
  46. <view class="card-back-text">
  47. <view v-show="item.prizeType == 0" class="card-text">很遗憾</view>
  48. <view v-show="item.prizeType == 1" class="card-text">{{item.money/100}}元红包
  49. </view>
  50. <view v-show="item.prizeType == 0" class="card-text">下次继续</view>
  51. <view v-show="item.prizeType == 2 && !item.img " class="card-text">恭喜您中奖了</view>
  52. <view v-show="item.prizeType == 2 && !item.img" class="card-text">{{item.prizeName}}</view>
  53. </view>
  54. </view>
  55. </view>
  56. </view>
  57. </view>
  58. </template>
  59. </view>
  60. <u-popup :show="showWin" :round="10" mode="center" @close="close" @open="open" closeable="true">
  61. <view class="popup-flex">
  62. <view class="popup-content-scroll">
  63. <!-- 这里放原来的内容部分(除返回按钮) -->
  64. <view class="popup-view">
  65. <image src="https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/guzhenganzi/win.png"
  66. class="winImgClss"></image>
  67. </view>
  68. <view class="popup-content">
  69. <u-row customStyle="margin-bottom: 5px">
  70. <u-col span="6">
  71. <image :src="prizeJson.img" class="prize"></image>
  72. </u-col>
  73. <u-col span="6">
  74. <view>{{prizeJson.prize_name}}</view>
  75. </u-col>
  76. </u-row>
  77. <view class="popup-text">
  78. 请留下联系方式,稍后工作人员会联系您!
  79. </view>
  80. <u--form labelPosition="left" :model="model1" :rules="rules" ref="uForm">
  81. <u-form-item label="姓名" prop="userInfo.name" ref="item1">
  82. <u--input v-model="model1.userInfo.name" border="none"></u--input>
  83. </u-form-item>
  84. <u-form-item label="电话" prop="userInfo.tel" ref="item1">
  85. <u--input v-model="model1.userInfo.tel" border="none"></u--input>
  86. </u-form-item>
  87. </u--form>
  88. </view>
  89. </view>
  90. <view class="popup-footer">
  91. <view class="save-button" @click="addWinDetail()">领取</view>
  92. </view>
  93. </view>
  94. </u-popup>
  95. <u-popup :show="showUnWin" :round="10" mode="center" @close="close" @open="open" closeable="true">
  96. <view class="popup-flex">
  97. <view class="popup-content-scroll">
  98. <!-- 这里放原来的内容部分(除返回按钮) -->
  99. <view class="popup-view">
  100. <image src="https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/guzhenganzi/unWin.png"
  101. class="winImgClss"></image>
  102. </view>
  103. <view class="popup-content">
  104. <view class="">
  105. <image class="productImg" mode="widthFix"
  106. src="https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/guzhenganzi/product.png ">
  107. </image>
  108. </view>
  109. <view class="">
  110. {{ randomText }}
  111. </view>
  112. </view>
  113. </view>
  114. <view class="popup-footer">
  115. <view class="save-button unWin" @click="close()">我知道了</view>
  116. </view>
  117. </view>
  118. </u-popup>
  119. </view>
  120. </view>
  121. <CustomTabbar />
  122. </view>
  123. </template>
  124. <script>
  125. import { randomTexts } from '../../../utils/randomTexts.js';
  126. import CustomTabbar from '@/components/tabbar.vue';
  127. import {
  128. addWinDetail,
  129. saveCardData
  130. } from '@/api/scan'
  131. export default {
  132. components: {
  133. CustomTabbar
  134. },
  135. data() {
  136. return {
  137. rules: {
  138. 'userInfo.name': {
  139. type: 'string',
  140. required: true,
  141. message: '请填写姓名',
  142. trigger: ['blur', 'change']
  143. },
  144. 'userInfo.tel': {
  145. type: 'string',
  146. required: true,
  147. message: '请填写手机号',
  148. trigger: ['blur', 'change']
  149. },
  150. },
  151. model1: {
  152. userInfo: {
  153. name: '',
  154. tel: '',
  155. qrcodeId: ''
  156. },
  157. },
  158. showUnWin: false,
  159. showWin: false,
  160. list1: [
  161. "https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/guzhenganzi/commodity/1.jpg",
  162. "https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/guzhenganzi/commodity/2.jpg",
  163. "https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/guzhenganzi/commodity/3.jpg",
  164. "https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/guzhenganzi/commodity/4.jpg",
  165. "https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/guzhenganzi/commodity/5.jpg",
  166. ],
  167. cards: [{
  168. front: 'https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/guzhenganzi/one.png',
  169. back: 'https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/guzhenganzi/bgiCard.png',
  170. flipped: false,
  171. prizeName: '',
  172. title: '',
  173. checkStauts: false,
  174. img: '',
  175. money: '',
  176. prizeType: '',
  177. isFlipping: false
  178. },
  179. {
  180. front: 'https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/guzhenganzi/two.png',
  181. back: 'https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/guzhenganzi/bgiCard.png',
  182. flipped: false,
  183. prizeName: '',
  184. title: '',
  185. checkStauts: false,
  186. img: '',
  187. money: '',
  188. prizeType: '',
  189. isFlipping: false
  190. },
  191. {
  192. front: 'https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/guzhenganzi/three.png',
  193. back: 'https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/guzhenganzi/bgiCard.png',
  194. flipped: false,
  195. prizeName: '',
  196. title: '',
  197. checkStauts: false,
  198. img: '',
  199. money: '',
  200. prizeType: '',
  201. isFlipping: false
  202. },
  203. {
  204. front: 'https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/guzhenganzi/four.png',
  205. back: 'https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/guzhenganzi/bgiCard.png',
  206. flipped: false,
  207. prizeName: '',
  208. title: '',
  209. checkStauts: false,
  210. img: '',
  211. money: '',
  212. prizeType: '',
  213. isFlipping: false
  214. },
  215. {
  216. front: 'https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/guzhenganzi/five.png',
  217. back: 'https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/guzhenganzi/bgiCard.png',
  218. flipped: false,
  219. prizeName: '',
  220. title: '',
  221. checkStauts: false,
  222. img: '',
  223. money: '',
  224. prizeType: '',
  225. isFlipping: false
  226. },
  227. {
  228. front: 'https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/guzhenganzi/six.png',
  229. back: 'https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/guzhenganzi/bgiCard.png',
  230. flipped: false,
  231. prizeName: '',
  232. title: '',
  233. checkStauts: false,
  234. img: '',
  235. money: '',
  236. prizeType: '',
  237. isFlipping: false
  238. }
  239. ],
  240. totalDetail: '',
  241. prizeJson: {},
  242. saveData: {},
  243. scanCode: '',
  244. saveStatus: true,
  245. fankaStatu:false,
  246. randomText: ""
  247. }
  248. },
  249. onLoad() {
  250. this.setRandomText();
  251. let scanDetail = uni.getStorageSync('scanDetail');
  252. this.scanCode = uni.getStorageSync('scanCode');
  253. this.model1.userInfo.qrcodeId = this.scanCode;
  254. this.prizeJson = scanDetail.prizeJson;
  255. let planDetail = JSON.parse(scanDetail.planDetail);
  256. while (planDetail.length < 5) {
  257. planDetail.push({
  258. 'prizeType': 0,
  259. 'money': 0
  260. })
  261. }
  262. this.totalDetail = planDetail;
  263. console.log(planDetail);
  264. if (scanDetail.result.click) {
  265. this.initCardData(scanDetail.clickJson);
  266. }
  267. },
  268. methods: {
  269. setRandomText() {
  270. const randomIndex = Math.floor(Math.random() * randomTexts.length);
  271. this.randomText = randomTexts[randomIndex];
  272. },
  273. initCardData(clickJson) {
  274. let list = JSON.parse(clickJson);
  275. for (let i = 0; i < this.cards.length; i++) {
  276. if (i == list.index) {
  277. this.cards[i].checkStauts = true
  278. }
  279. this.cards[i].img = list['card' + i].img;
  280. this.cards[i].flipped = true;
  281. this.cards[i].prizeType = list['card' + i].prize_type == undefined ? list['card' + i].prizeType : list[
  282. 'card' + i].prize_type;
  283. this.cards[i].money = list['card' + i].money;
  284. this.cards[i].prizeName = list['card' + i].prizeName == undefined ? list['card' + i].prize_name : list[
  285. 'card' + i].prizeName;
  286. }
  287. this.$forceUpdate();
  288. },
  289. addWinDetail() {
  290. let that = this;
  291. this.$refs.uForm.validate().then(res => {
  292. addWinDetail(that.model1.userInfo).then(data => {
  293. this.showWin = false;
  294. if (data.code == 0) {
  295. that.saveStatus = false;
  296. // uni.redirectTo({
  297. // url: '/pages/lgz/index/claim' // 目标页面路径
  298. // })
  299. let params = {
  300. type: "success",
  301. title: "成功主题(带图标)",
  302. message: "提交成功",
  303. iconUrl: "https://uviewui.com/demo/toast/success.png",
  304. }
  305. that.$refs.uToast.show({
  306. ...params
  307. });
  308. } else {
  309. }
  310. })
  311. }).catch(errors => {
  312. })
  313. },
  314. open() {
  315. // console.log('open');
  316. },
  317. close() {
  318. this.showUnWin = false;
  319. this.showWin = false
  320. },
  321. flipCard(idx) {
  322. if(this.fankaStatu){
  323. return;
  324. }
  325. if (this.cards[idx].flipped) {
  326. return;
  327. }
  328. this.fankaStatu = true;
  329. setTimeout(() => {
  330. if (this.prizeJson.prizeType == 0 || this.prizeJson.prize_type == 0) {
  331. this.showUnWin = true;
  332. }
  333. if ((this.prizeJson.prizeType == 2 || this.prizeJson.prize_type == 2) && this.saveStatus) {
  334. this.showWin = true;
  335. }
  336. }, 2500); //弹框延迟3.5秒后显示弹框
  337. // 标记被点击的卡牌正在翻转
  338. this.cards[idx].isFlipping = true;
  339. this.cards[idx].checkStauts = true;
  340. let that = this;
  341. // 延迟翻转其他卡牌
  342. setTimeout(() => {
  343. that.cards[idx].flipped = true;
  344. that.cards[idx].isFlipping = false;
  345. // 其他未翻转的卡牌延迟2秒后同时翻转
  346. setTimeout(() => {
  347. that.cards.forEach((card, index) => {
  348. if (index !== idx && !card.flipped) {
  349. card.isFlipping = true;
  350. that.$forceUpdate();
  351. }
  352. });
  353. // 所有其他卡牌同时翻转
  354. setTimeout(() => {
  355. that.cards.forEach((card, index) => {
  356. if (index !== idx && !card.flipped) {
  357. card.flipped = true;
  358. card.isFlipping = false;
  359. that.$forceUpdate();
  360. }
  361. });
  362. }, 300); // 与其他卡牌翻转动画保持一致
  363. }, 1000); // 延迟2秒翻转其他卡牌
  364. // 处理数据逻辑
  365. that.totalDetail.splice(idx, 0, this.prizeJson);
  366. that.saveData.index = idx;
  367. for (let i = 0; i < that.totalDetail.length; i++) {
  368. that.saveData['card' + i] = that.totalDetail[i];
  369. that.cards[i].prizeType = that.totalDetail[i].prize_type == undefined ?
  370. that.totalDetail[i].prizeType :
  371. that.totalDetail[i].prize_type;
  372. that.cards[i].img = that.totalDetail[i].img;
  373. that.cards[i].money = that.totalDetail[i].money;
  374. that.cards[i].prizeName = that.totalDetail[i].prizeName == undefined ?
  375. that.totalDetail[i].prize_name :
  376. that.totalDetail[i].prizeName;
  377. }
  378. that.saveAllCardData();
  379. }, 100);
  380. },
  381. saveAllCardData() {
  382. let jsonStr = JSON.stringify(this.saveData);
  383. saveCardData(this.scanCode, jsonStr).then(res => {
  384. console.log(res)
  385. })
  386. },
  387. openDetail() {
  388. uni.navigateTo({
  389. url: '/pages/lgz/index/rules'
  390. });
  391. }
  392. }
  393. }
  394. </script>
  395. <style>
  396. @import url('../../../static/scss/common.css');
  397. .common {
  398. background-image:
  399. url("https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/guzhenganzi/bgi-two.png");
  400. }
  401. .title{
  402. height: 4vh;
  403. line-height: 5vh;
  404. }
  405. .head {
  406. background-image:
  407. url("https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/guzhenganzi/zhanshi.png");
  408. background-size: cover;
  409. background-position: center;
  410. background-repeat: no-repeat;
  411. height: 23vh;
  412. margin: 0px 40rpx;
  413. display: flex;
  414. justify-content: center;
  415. /* 水平居中 */
  416. align-items: center;
  417. /* 垂直居中 */
  418. }
  419. .text {
  420. height: 10vh;
  421. text-align: center;
  422. line-height: 13vh;
  423. margin-bottom: 10rpx;
  424. }
  425. .textImage {
  426. height: 80rpx;
  427. width: 400rpx;
  428. }
  429. .content {
  430. height: 42vh;
  431. background: rgba(131, 100, 71, 0.5);
  432. border-radius: 10rpx;
  433. margin: 0rpx 40rpx;
  434. padding: 10rpx 24rpx;
  435. overflow: auto;
  436. display: flex;
  437. align-items: center;
  438. justify-content: center;
  439. }
  440. .text-1 {
  441. text-align: center;
  442. font-size: 24rpx;
  443. font-weight: 600;
  444. color: white;
  445. background-color: #9A1712;
  446. width: 160rpx;
  447. border-radius: 4rpx;
  448. height: 40rpx;
  449. line-height: 40rpx;
  450. }
  451. .text-2 {
  452. text-align: center;
  453. font-size: 24rpx;
  454. font-weight: 600;
  455. color: #F9D395;
  456. background-color: #9A1712;
  457. width: 120rpx;
  458. border-radius: 4rpx;
  459. height: 40rpx;
  460. line-height: 40rpx;
  461. margin-left: 80rpx;
  462. }
  463. .cards {
  464. display: grid;
  465. grid-template-columns: repeat(3, 1fr);
  466. gap: 30rpx;
  467. width: 100%;
  468. }
  469. .card {
  470. width: 100%;
  471. height: 250rpx;
  472. position: relative;
  473. background: none;
  474. border-radius: 16rpx;
  475. margin: 0;
  476. perspective: 1000px;
  477. }
  478. .card-inner {
  479. position: relative;
  480. width: 100%;
  481. height: 100%;
  482. transition: transform 0.8s cubic-bezier(0.5, 1.5, 0.5, 1);
  483. transform-style: preserve-3d;
  484. }
  485. .card.flipping .card-inner {
  486. transform: rotateY(180deg);
  487. }
  488. .card.flipped .card-inner {
  489. transform: rotateY(180deg);
  490. }
  491. .card-front,
  492. .card-back {
  493. position: absolute;
  494. width: 100%;
  495. height: 100%;
  496. backface-visibility: hidden;
  497. }
  498. .card-back {
  499. transform: rotateY(180deg);
  500. }
  501. .card-back-text {
  502. position: absolute;
  503. top: 50%;
  504. left: 0;
  505. width: 100%;
  506. text-align: center;
  507. color: #9A1712;
  508. font-weight: bold;
  509. font-size: 28rpx;
  510. transform: translateY(-50%);
  511. z-index: 2;
  512. pointer-events: none;
  513. }
  514. .card-img {
  515. width: 100%;
  516. height: 100%;
  517. display: block;
  518. }
  519. ::v-deep .content .u-popup__content {
  520. height: 720rpx;
  521. width: 600rpx;
  522. background-color: rgba(0, 0, 0, 0) !important;
  523. background-image:
  524. url("https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/guzhenganzi/bgiPopup.png");
  525. background-size: cover;
  526. background-position: center;
  527. background-repeat: no-repeat;
  528. }
  529. ::v-deep .u-popup__content__close--top-right {
  530. top: 720rpx !important;
  531. right: 288rpx !important;
  532. }
  533. .winImgClss {
  534. height: 60rpx;
  535. width: 320rpx;
  536. }
  537. .popup-view {
  538. text-align: center;
  539. margin-top: 100rpx;
  540. }
  541. .popup-content {
  542. margin: 15px 54px;
  543. overflow: auto;
  544. }
  545. .popup-text {
  546. font-weight: 400;
  547. font-size: 20rpx;
  548. color: #9B0000;
  549. }
  550. .prize {
  551. height: 130rpx;
  552. width: 130rpx;
  553. }
  554. ::v-deep .u-form-item__body {
  555. padding: 8rpx;
  556. }
  557. ::v-deep uni-view.u-form-item__body__left {
  558. background: #AD7F55;
  559. border-radius: 5px 0px 0px 5px;
  560. border: 2px solid #63462B;
  561. border-right: none;
  562. }
  563. ::v-deep .u-form-item__body__right {
  564. background-color: #fff;
  565. border-radius: 0px 5px 5px 0px;
  566. border: 2px solid #63462B;
  567. }
  568. ::v-deep uni-text.u-form-item__body__left__content__label {
  569. color: #fff !important;
  570. padding-left: 4px;
  571. letter-spacing: 2px;
  572. }
  573. .popup-flex {
  574. display: flex;
  575. flex-direction: column;
  576. height: 100%;
  577. /* 或具体高度如340px,确保撑满弹窗 */
  578. min-width: 600rpx;
  579. }
  580. .popup-content-scroll {
  581. flex: 1;
  582. }
  583. .popup-footer {
  584. flex-shrink: 0;
  585. padding: 0rpx 0 60rpx 0px;
  586. text-align: center;
  587. background: transparent;
  588. /* 可选,确保无背景遮挡 */
  589. }
  590. .save-button {
  591. width: 90rpx;
  592. margin: 0 auto;
  593. background: #b22222;
  594. color: #F9D395;
  595. border-radius: 12rpx;
  596. padding: 18rpx 0;
  597. font-size: 24rpx;
  598. font-weight: bold;
  599. height: 16rpx;
  600. line-height: 16rpx;
  601. letter-spacing: 4rpx;
  602. }
  603. .unWin {
  604. width: 130rpx !important;
  605. }
  606. .productImg {
  607. width: 400rpx;
  608. }
  609. ::v-deep .u-swiper {
  610. background-color: rgba(0, 0, 0, 0) !important;
  611. padding: 0px 20rpx !important;
  612. width: 90%;
  613. }
  614. ::v-deep .u-col-4 {
  615. display: flex !important;
  616. justify-content: center !important;
  617. /* 水平居中 */
  618. align-items: center !important;
  619. /* 垂直居中 */
  620. }
  621. ::v-deep .right-col .u-col-4 {
  622. display: flex !important;
  623. justify-content: flex-end !important;
  624. /* 水平居中 */
  625. align-items: center !important;
  626. /* 垂直居中 */
  627. }
  628. .card-img-f {
  629. height: 100rpx;
  630. width: 100rpx;
  631. }
  632. .card-text {
  633. font-size: 26rpx;
  634. padding: 0rpx 10rpx;
  635. }
  636. .select-tag {
  637. position: absolute;
  638. right: 0px;
  639. font-weight: 400;
  640. font-size: 20rpx;
  641. color: #FFFFFF;
  642. width: 40px;
  643. text-align: center;
  644. background-color: #11BC64;
  645. height: 15px;
  646. border-radius: 3px;
  647. line-height: 15px;
  648. z-index: 5;
  649. }
  650. .logo-img {
  651. background-size: cover;
  652. /* 确保背景图片自适应填充整个容器 */
  653. background-position: center;
  654. /* 背景图片居中显示 */
  655. background-repeat: no-repeat;
  656. /* 防止背景图重复 */
  657. height: 42rpx;
  658. width: 180rpx
  659. }
  660. </style>