index.vue 22 KB

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