index.vue 24 KB

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