index.vue 18 KB

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