index.vue 25 KB

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