index.vue 25 KB

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