index.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984
  1. <template>
  2. <view class="index-main">
  3. <!-- 微信提示遮罩 -->
  4. <!-- <view v-if="isWeiXin" class="shadow">
  5. <image src="/static/image/tabbar/weixinShadow.png" mode="aspectFit"></image>
  6. </view> -->
  7. <view class="top">
  8. <view class="title">
  9. <!-- <view class="play-explain" @tap="$refs.regulation.open()">
  10. <image class="small-img" src="/static/image/new_home/ckgz.png" mode="widthFix"></image>
  11. <text>查看规则</text>
  12. </view> -->
  13. <!-- <view class="play-explain_1" @tap="$refs.regulation_1.open()">
  14. <image class="small-img" src="/static/image/tabbar/wodeyixuanzhong@2x1.png" mode="widthFix"></image>
  15. <text>买家须知</text>
  16. </view> -->
  17. <view class="kf" @click="zxkf()"><image class="small-img" src="https://chaomd.liuniu946.com/image/new_home/kf.png" mode="widthFix"></image></view>
  18. </view>
  19. <view class="left-cd">
  20. <view class="details_title_mp3" @click="changePlay">
  21. <image :class="['bjtb', isPlay && 'run']" :src="isPlay ? '/static/image/home/bofang@2x.png' : '/static/image/home/guanbiyinyue@2x.png'" mode="widthFix"></image>
  22. </view>
  23. <view class="oval1" @click="toMyBox()">
  24. <image class="small-img" src="/static/image/new_home/tbxg.png" mode="widthFix"></image>
  25. <!-- <span>物品盒柜</span> -->
  26. </view>
  27. <view class="right" @click="wfashuiming()">
  28. <image class="small-img" src="/static/image/new_home/wfsm.png" mode="widthFix"></image>
  29. <!-- <span>玩法说明</span> -->
  30. </view>
  31. </view>
  32. <lunbobox></lunbobox>
  33. <view class="loop-container">
  34. <!-- 图片轮播主区域 -->
  35. <view class="loop-image-main">
  36. <view class="box-image-bj"><image src="../../static/image/new_home/box-images-bj.png" mode=""></image></view>
  37. <prize-flying v-if="currBox" :box-id="currBox.box_id"></prize-flying>
  38. <!-- 图片轮播 -->
  39. <image class="arrow arrow-left" src="/static/image/new_home/arrow-left.png" mode="widthFix" @click="prev"></image>
  40. <image class="arrow arrow-right" src="/static/image/new_home/arrow-right.png" mode="widthFix" @click="next"></image>
  41. <view class="loop-image-warapper">
  42. <swiper class="swiper" circular :current="loopData.current" @change="loopItemChange($event.detail.current)">
  43. <template v-for="(item, index) in loopData.list">
  44. <swiper-item :key="index">
  45. <view :class="['image-box']">
  46. <template v-for="(box_banner, index) in item.box_banner_images">
  47. <image
  48. :class="[item.box_banner_images.length > 1 ? `box-banner-${index}` : 'box-banner']"
  49. :src="box_banner"
  50. mode="heightFix"
  51. @click="goMessage(item, 0)"
  52. ></image>
  53. </template>
  54. </view>
  55. </swiper-item>
  56. </template>
  57. </swiper>
  58. </view>
  59. <!-- 底座 -->
  60. <!-- <view class="pedestal">
  61. <image src="/h5/static/image/new_home/dizhuo.png" mode="heightFix"></image>
  62. </view> -->
  63. <!-- 手指 -->
  64. <view class="finger"><image src="/static/image/new_home/sz.png" mode="heightFix"></image></view>
  65. <!-- 盲盒奖品 -->
  66. <!-- <view class="prize" @click="goCurrMessage()">
  67. <image src="/h5/static/image/new_home/mhjp.png" mode="heightFix"></image>
  68. </view> -->
  69. </view>
  70. <!-- 下方价格 -->
  71. <view class="price-container">
  72. <text class="price">¥{{ price }}.00元/个</text>
  73. </view>
  74. <!-- 文字轮播 -->
  75. <!-- <view class="loop-label-warapper">
  76. <swiper class="swiper" :indicator-dots="true" :previous-margin="loopData.margin" :next-margin="loopData.margin"
  77. :current="loopData.current" @change="loopItemChange($event.detail.current)">
  78. <template v-for="(item, index) in loopData.list">
  79. <swiper-item :key="index" :class="[loopData.current == index && 'label-active']">
  80. <view :class="['label-box']" @click="loopItemChange(index)">
  81. <view :class="['loop-label']">
  82. <text>{{item.box_name}}</text>
  83. </view>
  84. </view>
  85. </swiper-item>
  86. </template>
  87. </swiper>
  88. </view> -->
  89. <!-- 图片文字轮播 -->
  90. <view class="loop-label-warapper">
  91. <swiper
  92. class="swiper"
  93. circular
  94. :indicator-dots="true"
  95. :previous-margin="loopData.margin"
  96. :next-margin="loopData.margin"
  97. :current="loopData.current"
  98. @change="loopItemChange($event.detail.current)"
  99. >
  100. <template v-for="(item, index) in loopData.list">
  101. <swiper-item :key="index" :class="[loopData.current == index && 'label-active']">
  102. <view :class="['label-box']" @click="loopItemChange(index)">
  103. <view :class="['loop-image-label']">
  104. <image :src="item.box_foot_images" mode="aspectFit" class="loop-image-label-img"></image>
  105. <text>{{ item.box_name }}</text>
  106. </view>
  107. </view>
  108. </swiper-item>
  109. </template>
  110. </swiper>
  111. </view>
  112. </view>
  113. </view>
  114. <!-- 下半部分 -->
  115. <view class="bottom">
  116. <view>
  117. <!-- 下方按钮区 -->
  118. <view class="button-container">
  119. <view class="side-btn" @click="haveTry()"><image src="/static/image/new_home/swmhan.png" mode="widthFix"></image></view>
  120. <view class="center-btn" @click="selectNum()">
  121. <image src="/static/image/new_home/khan.png" mode="widthFix"></image>
  122. <!-- <text>立即开箱</text> -->
  123. </view>
  124. <view class="side-btn" @click="$refs.regulation.open()"><image src="/static/image/new_home/gdmhan.png" mode="widthFix"></image></view>
  125. </view>
  126. </view>
  127. <!-- <view>
  128. <text class="look-rule" @click="toHelp()">查看规则</text>
  129. </view> -->
  130. <!-- <view class="banner">
  131. <view>
  132. <image class="small-img" src="/h5/static/image/new_home/dbzj.png" mode="heightFix"></image>
  133. 每盒100%中奖
  134. </view>
  135. <view class="center">
  136. <image class="small-img" src="/h5/static/image/new_home/myfh.png" mode="heightFix"></image>
  137. 满意发货
  138. </view>
  139. <view>
  140. <image class="small-img" src="/h5/static/image/new_home/hs.png" mode="heightFix"></image>
  141. 不满意回收
  142. </view>
  143. </view> -->
  144. </view>
  145. <uni-popup ref="num-popup" type="bottom" :mask-click="false">
  146. <view class="num-popup">
  147. <view class="popup-close" @click="closeNumPopup"><image src="/static/image/home/guanbi@2x.png" mode=""></image></view>
  148. <view class="num-button-group">
  149. <view class="num-button" @click="createOder(1)">
  150. <image src="../../static/image/new_home/btn-1.png" mode="widthFix"></image>
  151. <text>一发入魂</text>
  152. </view>
  153. </view>
  154. <view class="num-button-group">
  155. <view class="num-button" @click="createOder(5)">
  156. <image src="../../static/image/new_home/btn-3.png" mode="widthFix"></image>
  157. <text>五连绝世</text>
  158. </view>
  159. <view class="num-button" @click="createOder(9)">
  160. <image src="../../static/image/new_home/btn-2.png" mode="widthFix"></image>
  161. <text>九连更稳</text>
  162. </view>
  163. </view>
  164. <view class="order-info">
  165. <view>开盒数量:{{ boxNum }}</view>
  166. <view class="total-price">订单金额:¥{{ totalPrice }}</view>
  167. </view>
  168. <view class="popup-btn"><!-- <button type="primary" @click="$refs['payment'].open(0, boxNum)">创建订单</button> --></view>
  169. </view>
  170. </uni-popup>
  171. <uni-popup ref="regulation" :mask-click="false">
  172. <view class="regulation">
  173. <view class="regulation_close" @click="$refs.regulation.close()"><image src="/static/image/home/guanbi@2x.png" mode=""></image></view>
  174. <view class="regulation_name">玩法规则</view>
  175. <view class="regulation_main">
  176. <scroll-view scroll-y="true" class="scroll-view"><u-parse :content="message"></u-parse></scroll-view>
  177. </view>
  178. </view>
  179. </uni-popup>
  180. <uni-popup ref="regulation_1" :mask-click="false">
  181. <view class="regulation_1">
  182. <view class="regulation_close" @click="$refs.regulation_1.close()"><image src="/static/image/home/guanbi@2x.png" mode=""></image></view>
  183. <view class="regulation_name">买家须知</view>
  184. <view class="regulation_main">
  185. <scroll-view scroll-y="true" class="scroll-view"><u-parse :content="mjxz"></u-parse></scroll-view>
  186. </view>
  187. </view>
  188. </uni-popup>
  189. <payment
  190. ref="payment"
  191. :box-id="currBox && currBox.box_id"
  192. :box-num="boxNum"
  193. :type="type"
  194. pay-page="index"
  195. @create-success="closeNumPopup"
  196. @show-result="showResult"
  197. ></payment>
  198. <!-- <show-result ref="result-popup" :num="boxNum" @accept="toMyBox()" @recycle="recycle" :type="type"></show-result> -->
  199. <show-result :key="resultKey" ref="result-popup" :num="boxNum" @accept="toMyBox()" @recycle="recycle" :type="type" @close="resultKey++"></show-result>
  200. <recycle ref="recycle"></recycle>
  201. </view>
  202. </template>
  203. 1
  204. <script>
  205. import payment from '@/components/payment.vue';
  206. import showResult from '@/components/show-result.vue';
  207. import recycle from '@/components/recycle.vue';
  208. import lunbobox from '@/components/lunbobox.vue';
  209. import prizeFlying from '@/components/prize-flying.vue';
  210. const innerAudioContext = uni.createInnerAudioContext();
  211. innerAudioContext.autoplay = true;
  212. innerAudioContext.loop = true;
  213. // innerAudioContext.src = '/static/image/home/bj.mp3';
  214. export default {
  215. components: {
  216. payment,
  217. showResult,
  218. recycle,
  219. lunbobox,
  220. prizeFlying
  221. },
  222. data() {
  223. return {
  224. message: '', //玩法规则
  225. mjxz: '', //买家须知
  226. loopData: {
  227. //标签轮播左右边距
  228. margin: '260rpx',
  229. //当前选中盒子下标
  230. current: 0,
  231. //盒子分类列表
  232. list: []
  233. },
  234. capital: {
  235. box: 0,
  236. coin: 0
  237. },
  238. //金额
  239. price: 0,
  240. //数量
  241. boxNum: 1,
  242. //开盒类型 0:正式开盒 1:试玩
  243. type: 0,
  244. isPlay: true,
  245. resultKey: 0,
  246. flyingKey: 0
  247. // isWeiXin: isWeiXin() //是否为微信
  248. };
  249. },
  250. created() {
  251. this.$api.getUserCapital().then(({ code, data }) => {
  252. if (code == 1) {
  253. this.capital = data;
  254. }
  255. });
  256. //渲染分类列表
  257. this.getCategoryList();
  258. this.getMessage();
  259. },
  260. computed: {
  261. //当前选中盒子
  262. currBox() {
  263. let boxList = this.loopData.list;
  264. if (!boxList || boxList.length < 1) {
  265. return null;
  266. }
  267. return boxList[this.loopData.current];
  268. },
  269. //当前盒子图片
  270. currBoxImg() {
  271. if (!this.currBox) {
  272. return null;
  273. }
  274. let imgs = this.currBox.box_banner_images;
  275. if (!imgs || imgs.length < 1) {
  276. return null;
  277. }
  278. return imgs[0];
  279. },
  280. //订单总金额
  281. totalPrice() {
  282. return this.boxNum * this.price;
  283. },
  284. //第一个盒子
  285. isFirstBox() {
  286. return this.loopData.current == 0;
  287. },
  288. //最后一个盒子
  289. isLastBox() {
  290. return this.loopData.current == this.loopData.list.length - 1;
  291. }
  292. },
  293. methods: {
  294. //轮播图变更
  295. loopItemChange(index) {
  296. if (this.loopData.current == index) {
  297. return;
  298. }
  299. this.loopData.current = index;
  300. this.price = this.loopData.list[index].coin_price;
  301. this.flyingKey++;
  302. },
  303. //轮播图上一个
  304. prev() {
  305. let index;
  306. if (this.isFirstBox) {
  307. index = this.loopData.list.length - 1;
  308. } else {
  309. index = this.loopData.current - 1;
  310. }
  311. this.loopItemChange(index);
  312. },
  313. //轮播图下一个
  314. next() {
  315. let index;
  316. if (this.isLastBox) {
  317. index = 0;
  318. } else {
  319. index = this.loopData.current + 1;
  320. }
  321. this.loopItemChange(index);
  322. },
  323. //分类列表
  324. getCategoryList() {
  325. this.$api.recommend({ page: 1, pagesize: 10 }).then(res => {
  326. if (res.code === 1) {
  327. let categoryList = res.data.data.map(item => {
  328. item.box_banner_images = item.box_banner_images.split(',');
  329. return item;
  330. });
  331. this.loopData.list = categoryList;
  332. let currIndex = Math.floor(categoryList.length / 2);
  333. currIndex = 2;
  334. this.loopData.current = currIndex;
  335. this.price = categoryList[currIndex].coin_price;
  336. }
  337. });
  338. },
  339. //跳转盒柜
  340. toMyBox() {
  341. this.$refs['result-popup'].close();
  342. uni.switchTab({ url: '/pages/tabbar/box' });
  343. },
  344. //玩法说明
  345. wfashuiming: () => uni.navigateTo({ url: '/pages/index/wfsm' }),
  346. //跳转充值
  347. toRecharge: () => uni.navigateTo({ url: '/pages/me/recharge' }),
  348. //跳转客服
  349. zxkf: () => uni.navigateTo({ url: '/pagesB/pages/server' }),
  350. //跳转说明
  351. toHelp: () => uni.navigateTo({ url: '/pages/index/help' }),
  352. //玩法规则
  353. getMessage() {
  354. this.$api.agreement({ name: 'play_rule' }).then(res => {
  355. if (res.code === 1) {
  356. this.message = res.data.content;
  357. }
  358. });
  359. this.$api.agreement({ name: 'notice_to_buyers' }).then(res => {
  360. if (res.code === 1) {
  361. this.mjxz = res.data.content;
  362. }
  363. });
  364. },
  365. //跳转更多盲盒
  366. toMore: () => uni.navigateTo({ url: '/pages/index/more' }),
  367. //音乐播放
  368. changePlay() {
  369. this.isPlay = !this.isPlay;
  370. uni.setStorageSync('isPlay', this.isPlay);
  371. this.isPlay ? innerAudioContext.play() : innerAudioContext.pause();
  372. },
  373. //跳转内页
  374. goMessage(item, type) {
  375. uni.navigateTo({ url: '/pages/index/details?id=' + item.box_id + '&type=' + type });
  376. },
  377. //跳转当前分类内页
  378. goCurrMessage() {
  379. this.goMessage(this.currBox, 0);
  380. },
  381. //试玩
  382. haveTry() {
  383. this.type = 1;
  384. this.boxNum = 1;
  385. this.$refs['payment'].open(1, 1);
  386. },
  387. //选择数量
  388. selectNum() {
  389. this.type = 0;
  390. this.boxNum = 1;
  391. this.$refs['num-popup'].open();
  392. },
  393. //创建订单
  394. createOder(num) {
  395. this.boxNum = num;
  396. this.$refs['payment'].open(0, this.boxNum);
  397. },
  398. //创建订单成功或者试玩返回结果
  399. closeNumPopup() {
  400. //关闭数量弹窗
  401. this.$refs['num-popup'].close();
  402. },
  403. //展示结果
  404. showResult(result) {
  405. //试玩
  406. if (this.type == 1) {
  407. this.$refs['result-popup'].open({ prizeInfo: result.goodsInfo, boxImg: this.currBoxImg });
  408. return;
  409. }
  410. this.$refs['result-popup'].open({ ...result, boxImg: this.currBoxImg });
  411. },
  412. //回收
  413. recycle(prizedata) {
  414. this.$refs['result-popup'].close();
  415. this.$refs['recycle'].recycle(prizedata.prizeInfo);
  416. }
  417. },
  418. onLoad({ sharecode, token, is_channel, out_trade_no }) {
  419. if (sharecode) {
  420. uni.setStorageSync('sharecode', sharecode);
  421. }
  422. if (is_channel) {
  423. uni.setStorageSync('is_channel', is_channel);
  424. }
  425. if (token) {
  426. uni.setStorageSync('token', token);
  427. }
  428. //存在支付订单id
  429. if (out_trade_no) {
  430. let params = { out_trade_no, order_id: uni.getStorageSync('order_id') };
  431. this.$api.openByOrderTrade(params).then(({ code, data }) => {
  432. if (code === 1) {
  433. //展示结果
  434. this.showResult(data.prize);
  435. }
  436. });
  437. }
  438. },
  439. onShow() {
  440. //刷新金币和盒子数量
  441. this.$api.getUserCapital().then(({ code, data }) => {
  442. if (code == 1) {
  443. this.capital = data;
  444. }
  445. });
  446. let is_notice = uni.getStorageSync('is_notice');
  447. uni.removeStorageSync('is_notice');
  448. if (is_notice == 1) {
  449. setTimeout(() => {
  450. uni.showModal({
  451. title: '提示',
  452. content: '恭喜,获得10金币',
  453. success: function(res) {
  454. if (res.confirm) {
  455. console.log('用户点击确定');
  456. } else if (res.cancel) {
  457. console.log('用户点击取消');
  458. }
  459. }
  460. });
  461. }, 1000);
  462. }
  463. }
  464. };
  465. //判断是否是微信浏览器的函数
  466. function isWeiXin() {
  467. //window.navigator.userAgent属性包含了浏览器类型、版本、操作系统类型、浏览器引擎类型等信息,这个属性可以用来判断浏览器类型
  468. var ua = window.navigator.userAgent.toLowerCase();
  469. //通过正则表达式匹配ua中是否含有MicroMessenger字符串
  470. if (ua.match(/MicroMessenger/i) == 'micromessenger') {
  471. return true;
  472. } else {
  473. return false;
  474. }
  475. }
  476. </script>
  477. <style lang="scss">
  478. /deep/ .uni-swiper-dots {
  479. display: none;
  480. }
  481. .left-cd {
  482. display: flex;
  483. align-items: center;
  484. z-index: 99;
  485. position: absolute;
  486. top: 1vh;
  487. right: 40rpx;
  488. .oval span,
  489. .oval1 span,
  490. .right span {
  491. text-align: center;
  492. display: block;
  493. color: #ffffff;
  494. margin: 10rpx;
  495. }
  496. }
  497. .oval1 {
  498. margin: 20rpx;
  499. }
  500. uni-page-body {
  501. height: 100%;
  502. }
  503. .regulation,
  504. .regulation_1 {
  505. width: 650rpx;
  506. height: 900rpx;
  507. padding: 0 0 0 30rpx;
  508. background: #ffffff;
  509. border-radius: 20rpx;
  510. position: relative;
  511. .regulation_close {
  512. position: absolute;
  513. width: 44rpx;
  514. height: 44rpx;
  515. top: 30rpx;
  516. right: 30rpx;
  517. }
  518. .regulation_name {
  519. padding: 40rpx 0;
  520. text-align: center;
  521. font-size: 30rpx;
  522. font-weight: bold;
  523. }
  524. .scroll-view {
  525. height: 735rpx;
  526. }
  527. }
  528. .play-explain {
  529. position: absolute;
  530. top: 52vh;
  531. right: 40rpx;
  532. display: flex;
  533. z-index: 99;
  534. uni-image {
  535. width: 150rpx;
  536. }
  537. }
  538. .play-explain_1 {
  539. position: absolute;
  540. box-shadow: 0px 4rpx 6rpx 2rpx #5ca6c8;
  541. background-color: #fff;
  542. top: 35vh;
  543. right: 0;
  544. display: flex;
  545. z-index: 99;
  546. align-items: center;
  547. border-radius: 100rpx;
  548. padding: 8rpx 20rpx;
  549. border-top-right-radius: 0;
  550. border-bottom-right-radius: 0;
  551. uni-text {
  552. color: #5348c9 !important;
  553. margin-left: 10rpx;
  554. }
  555. uni-image {
  556. width: 40rpx;
  557. }
  558. }
  559. .kf {
  560. position: absolute;
  561. box-shadow: 0px 4rpx 6rpx 2rpx #5ca6c8;
  562. background-color: #fff;
  563. top: 46vh;
  564. left: 0;
  565. display: flex;
  566. z-index: 99;
  567. align-items: center;
  568. border-radius: 100rpx;
  569. padding: 8rpx 20rpx;
  570. border-top-left-radius: 0;
  571. border-bottom-left-radius: 0;
  572. uni-text {
  573. color: #5348c9 !important;
  574. margin-left: 10rpx;
  575. }
  576. uni-image {
  577. width: 40rpx;
  578. }
  579. }
  580. .details_title_mp3 {
  581. position: relative;
  582. z-index: 99;
  583. box-shadow: 0px 4rpx 6rpx 2rpx #5ca6c8;
  584. background-color: #ffffff45;
  585. align-items: center;
  586. border-radius: 200rpx;
  587. padding: 5rpx;
  588. uni-text {
  589. color: #5348c9 !important;
  590. margin-left: 10rpx;
  591. }
  592. uni-image {
  593. width: 40rpx;
  594. }
  595. }
  596. page {
  597. min-height: 100%;
  598. height: auto;
  599. }
  600. .index-main {
  601. min-height: 100%;
  602. height: auto;
  603. background-image: url(https://chaomd.liuniu946.com/image/bj.jpg);
  604. background-repeat: no-repeat;
  605. background-size: 100% 100%;
  606. display: flex;
  607. flex-direction: column;
  608. .light {
  609. position: absolute;
  610. top: 0;
  611. }
  612. > view {
  613. display: flex;
  614. flex-direction: column;
  615. }
  616. .top {
  617. flex: 0.6;
  618. .loop-container {
  619. background: url(https://chaomd.liuniu946.com/image/hzbj.gif);
  620. .loop-image-main {
  621. margin-bottom: 20rpx;
  622. position: relative;
  623. // height: 452rpx;
  624. height: 600rpx;
  625. margin-top: 300rpx;
  626. .arrow {
  627. width: 60rpx;
  628. position: absolute;
  629. top: 50%;
  630. transform: translateY(-20%);
  631. z-index: 99;
  632. &.arrow-left {
  633. left: 80rpx;
  634. }
  635. &.arrow-right {
  636. right: 80rpx;
  637. }
  638. }
  639. .loop-image-warapper {
  640. position: absolute;
  641. height: 100%;
  642. width: 100%;
  643. .swiper {
  644. height: 100%;
  645. }
  646. .image-box {
  647. display: flex;
  648. justify-content: center;
  649. height: 100%;
  650. .box-banner {
  651. height: 70%;
  652. }
  653. .box-banner-0 {
  654. width: 118px;
  655. height: 60%;
  656. position: absolute;
  657. bottom: 0;
  658. }
  659. .box-banner-1 {
  660. position: absolute;
  661. top: 60px;
  662. height: 50%;
  663. }
  664. }
  665. }
  666. .pedestal {
  667. position: absolute;
  668. height: 400rpx;
  669. width: 100%;
  670. bottom: 0;
  671. uni-image {
  672. margin: 0 auto;
  673. }
  674. }
  675. .finger {
  676. position: absolute;
  677. z-index: 21;
  678. height: 140rpx;
  679. right: 250rpx;
  680. bottom: 0rpx;
  681. }
  682. .prize {
  683. position: absolute;
  684. height: 120rpx;
  685. right: 10rpx;
  686. bottom: 50rpx;
  687. z-index: 22;
  688. }
  689. }
  690. .loop-label-warapper {
  691. height: 260rpx;
  692. margin-top: 18rpx;
  693. .label-box {
  694. height: 100%;
  695. display: flex;
  696. align-items: center;
  697. justify-content: center;
  698. box-shadow: 3px 0px 0px 3px #45bfff;
  699. }
  700. .swiper {
  701. // background: url(https://chaomd.liuniu946.com/image/text-bj.png);
  702. // background-size: 100% 100%;
  703. height: 260rpx;
  704. }
  705. .loop-label {
  706. transition: 0.2s;
  707. margin: 0 auto;
  708. width: 80%;
  709. height: 80%;
  710. background-repeat: no-repeat;
  711. display: flex;
  712. align-items: center;
  713. justify-content: center;
  714. border-radius: 14rpx;
  715. text {
  716. transition: 0.2s;
  717. color: #ffffff;
  718. font-size: 28rpx;
  719. letter-spacing: 2rpx;
  720. font-weight: 600;
  721. color: #94a9ee;
  722. }
  723. }
  724. .loop-image-label {
  725. transition: 0.3s;
  726. background: linear-gradient(white, 80%, lightgrey);
  727. padding: 2px;
  728. border-radius: 7px;
  729. height: 95%;
  730. // height: 247rpx;
  731. width: 210rpx;
  732. text-align: center;
  733. // .loop-image-label-img {
  734. // height: 185rpx;
  735. // }
  736. image {
  737. height: 75%;
  738. margin-bottom: 5%;
  739. }
  740. text {
  741. font-size: 26rpx;
  742. font-weight: bold;
  743. }
  744. }
  745. .label-active {
  746. .loop-label {
  747. width: 80%;
  748. height: 80%;
  749. text {
  750. font-size: 42rpx;
  751. font-weight: bold;
  752. color: #7494fe;
  753. }
  754. }
  755. .loop-image-label {
  756. border: 2px solid #45bfff;
  757. }
  758. }
  759. }
  760. uni-swiper {
  761. height: 100%;
  762. }
  763. }
  764. }
  765. .bottom {
  766. margin-top: 20rpx;
  767. flex: 0.4;
  768. .button-container {
  769. flex: 1;
  770. margin-top: 20rpx;
  771. display: flex;
  772. > view {
  773. display: flex;
  774. align-items: center;
  775. justify-content: center;
  776. }
  777. .center-btn {
  778. flex: 0.87;
  779. image {
  780. width: 75%;
  781. }
  782. text {
  783. position: absolute;
  784. font-size: 40rpx;
  785. line-height: 1.1;
  786. color: #ffffff;
  787. font-weight: bold;
  788. font-style: italic;
  789. letter-spacing: 2px;
  790. }
  791. }
  792. .side-btn {
  793. flex-direction: column;
  794. flex: 0.28;
  795. image {
  796. width: 60%;
  797. }
  798. text {
  799. margin-top: 14rpx;
  800. font-size: 28rpx;
  801. font-weight: bold;
  802. }
  803. }
  804. }
  805. }
  806. .price-container {
  807. text-align: center;
  808. .price {
  809. font-size: 36rpx;
  810. font-weight: bold;
  811. font-style: italic;
  812. letter-spacing: 5rpx;
  813. }
  814. .look-rule {
  815. font-size: 30rpx;
  816. padding-left: 14rpx;
  817. color: #575757;
  818. }
  819. .banner {
  820. display: flex;
  821. margin: 20rpx 14rpx;
  822. > view {
  823. display: flex;
  824. font-size: 28rpx;
  825. image {
  826. margin-right: 10rpx;
  827. }
  828. }
  829. .center {
  830. flex: 1;
  831. }
  832. }
  833. }
  834. }
  835. .small-img {
  836. width: 80rpx;
  837. margin: 0 auto;
  838. }
  839. //选择数量弹窗
  840. .num-popup {
  841. background: #ffffff;
  842. border-radius: 10px 10px 0px 0px;
  843. padding: 50px 25px 90px 25px;
  844. .popup-close {
  845. top: 30rpx;
  846. right: 30rpx;
  847. width: 44rpx;
  848. height: 44rpx;
  849. position: absolute;
  850. }
  851. .num-button-group {
  852. display: flex;
  853. justify-content: center;
  854. gap: 50rpx;
  855. }
  856. .num-button {
  857. position: relative;
  858. width: 300rpx;
  859. text {
  860. position: absolute;
  861. top: 50%;
  862. left: 50%;
  863. transform: translateX(-50%) translateY(-50%);
  864. font-size: 36rpx;
  865. font-weight: bold;
  866. color: #fff;
  867. text-shadow: 1px 1px 1px black;
  868. }
  869. }
  870. .order-info {
  871. display: flex;
  872. > view {
  873. flex: 1;
  874. display: flex;
  875. align-items: center;
  876. }
  877. > view {
  878. font-size: 28rpx;
  879. font-weight: bold;
  880. }
  881. .total-price {
  882. color: red;
  883. }
  884. }
  885. > view {
  886. margin-bottom: 30rpx;
  887. }
  888. }
  889. /deep/ .pay {
  890. padding-bottom: 100px !important;
  891. }
  892. .center-btn uni-text {
  893. -webkit-animation-name: living; /*关键帧名称*/
  894. -webkit-animation-timing-function: ease-in-out; /*动画的速度曲线*/
  895. -webkit-animation-iteration-count: infinite; /*动画播放的次数*/
  896. -webkit-animation-duration: 5s; /*动画所花费的时间*/
  897. }
  898. .details_title_mp3 .run {
  899. animation: donut-spin 1.2s linear infinite;
  900. }
  901. // 动画
  902. @keyframes updown {
  903. 0% {
  904. top: 0px;
  905. }
  906. 50% {
  907. top: 10px;
  908. }
  909. 100% {
  910. top: 0px;
  911. }
  912. }
  913. //放大动画
  914. @keyframes living {
  915. 0% {
  916. transform: scale(0.8);
  917. opacity: 0.8;
  918. }
  919. 50% {
  920. transform: scale(1);
  921. opacity: 1; /*圆形放大的同时,透明度逐渐减小为0*/
  922. }
  923. 100% {
  924. transform: scale(0.8);
  925. opacity: 0.8;
  926. }
  927. }
  928. //音乐背景旋转
  929. @keyframes donut-spin {
  930. 0% {
  931. transform: rotate(0deg);
  932. }
  933. 100% {
  934. transform: rotate(360deg);
  935. }
  936. }
  937. .loop-image-warapper {
  938. animation: updown 2s infinite;
  939. -webkit-animation: updown 2s infinite;
  940. }
  941. @keyframes rotates {
  942. 0% {
  943. transform: scale(0.7);
  944. }
  945. 50% {
  946. transform: scale(0.8);
  947. }
  948. 100% {
  949. transform: scale(0.7);
  950. }
  951. }
  952. .finger {
  953. animation: rotates 2.8s infinite;
  954. -webkit-animation: rotates 2.8s infinite;
  955. }
  956. .shadow {
  957. height: 100vh;
  958. width: 100vw;
  959. position: fixed;
  960. top: 0;
  961. left: 0;
  962. background-color: #fff;
  963. z-index: 99999999;
  964. uni-image {
  965. height: 480rpx !important;
  966. }
  967. }
  968. .box-image-bj {
  969. // background: url(../../static/image/new_home/box-images-bj.png);
  970. background-size: 100% 100%;
  971. height: 500rpx;
  972. width: 380rpx;
  973. margin: 0 auto;
  974. position: relative;
  975. top: -260rpx;
  976. }
  977. </style>