index2.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995
  1. <template>
  2. <view class="home">
  3. <!-- 微信提示遮罩 -->
  4. <view v-if="isWeiXin" class="shadow"><image src="/static/image/tabbar/weixinShadow.png" mode="aspectFit"></image></view>
  5. <audio id="audio" src="/h5/pagesA/static/bj1.mp3" loop></audio>
  6. <!--S 头部搜索 -->
  7. <view class="home_bar">
  8. <view class="home_bar_nav"></view>
  9. <view class="home_bar_con flex">
  10. <view class="home_bar_logo"><image :src="logo" mode="aspectFill"></image></view>
  11. <view class="home_bar_search flexs" @click="goSearch">
  12. <image src="https://chaomd.liuniu946.com/image/home/sousuo@2x.png" mode="" style="background-size: 100%;"></image>
  13. <input type="text" disabled placeholder="拆个盒子" placeholder-style="color:#808080" />
  14. </view>
  15. <view class="home_bar_serve" @click="goServe"><image src="https://chaomd.liuniu946.com/image/home/kefu@2x.png" mode=""></image></view>
  16. </view>
  17. </view>
  18. <!--E 头部搜索 -->
  19. <!--S 轮播图 -->
  20. <swiper autoplay circular class="swiper">
  21. <swiper-item v-for="(item, index) in bannerList" :key="index"><image src="/static/image/tabbar/index-banner1.jpg" mode="aspectFill"></image></swiper-item>
  22. <swiper-item v-for="(item, index) in bannerList" :key="index"><image src="/static/image/tabbar/index-banner2.jpg" mode="aspectFill"></image></swiper-item>
  23. <swiper-item v-for="(item, index) in bannerList" :key="index"><image src="/static/image/tabbar/index-banner3.jpg" mode="aspectFill"></image></swiper-item>
  24. </swiper>
  25. <view class="home_swiper">
  26. <!-- 菜单start -->
  27. <view class="home_swiper_nav flex">
  28. <view class="home_swiper_nav_li center" v-for="(item, index) in navList" :key="index" @click="changeNav(item)">
  29. <image :src="item.image" mode=""></image>
  30. <text>{{ item.name }}</text>
  31. </view>
  32. </view>
  33. <!-- 菜单end -->
  34. <!-- 获奖公告start -->
  35. <view class="award-notice" @tap="tomore">
  36. <view class="title-view flex">
  37. <view class="title-box flex">
  38. <!-- <text class="title">获奖公告</text> -->
  39. <view class="title"><image src="../../static/image/home/notice@2x.png" mode="aspectFit"></image></view>
  40. <!-- <text class="tip">{{total}}人获得心仪商品</text> -->
  41. <text class="tip">1.53万人获得心仪商品</text>
  42. </view>
  43. <view class="more flex">
  44. 查看更多
  45. <image class="more-icon" src="../../static/image/publice/return@2x.png" mode="aspectFit"></image>
  46. </view>
  47. </view>
  48. <swiper autoplay :display-multiple-items="4" circular class="goods-list flex" :class="{ 'goods-list-no': vgoods.length < 4 }">
  49. <swiper-item class="goods-item-swiper" v-for="item in vgoods">
  50. <view class="goods-item">
  51. <view class="goods-info">
  52. <view class="goods-img"><image :src="item.image" mode="aspectFit"></image></view>
  53. <view class="goods-price flex">¥ {{ item.price }}</view>
  54. </view>
  55. <view class="bottom-view">
  56. <view class="player-view flex">
  57. <view class="player-avatar"><image :src="item.avatar" mode="aspectFit"></image></view>
  58. <text class="player-name">{{ item.username }}</text>
  59. </view>
  60. <view class="goods-name">{{ item.goods_name }}</view>
  61. </view>
  62. </view>
  63. </swiper-item>
  64. <swiper-item class="goods-item-swiper" v-for="item in vgoods2"></swiper-item>
  65. </swiper>
  66. <!-- <view class="goods-list flex">
  67. <view class="goods-item" v-for="item in 10">
  68. <view class="goods-info">
  69. <image class="goods-img" src="../../static/image/open/erji@2x.png" mode="aspectFit"></image>
  70. <view class="goods-price flex">
  71. ¥ 480.00
  72. </view>
  73. </view>
  74. <view class="bottom-view">
  75. <view class="player-view flex">
  76. <image class="player-avatar" src="../../static/image/publice/weixin@2x.png" mode="aspectFit"></image>
  77. <text class="player-name">**玩家</text>
  78. </view>
  79. <view class="goods-name">
  80. Apple/iPhoneiPhoneiPhoneiPhone
  81. </view>
  82. </view>
  83. </view>
  84. </view> -->
  85. <view class="home_swiper_ul flex">
  86. <view class="home_swiper_li flexs" v-for="(item, index) in iconList" :key="index">
  87. <image :src="item.image" mode=""></image>
  88. <text>{{ item.name }}</text>
  89. </view>
  90. </view>
  91. </view>
  92. <!-- 获奖公告end -->
  93. <!-- 轮播图start -->
  94. <!-- <swiper autoplay circular class="swiper">
  95. <swiper-item v-for="(item,index) in bannerList" :key="index" @click="changeBanner(item)">
  96. <image :src="item.image" mode="aspectFill"></image>
  97. </swiper-item>
  98. </swiper> -->
  99. <!-- 轮播end -->
  100. </view>
  101. <!--E 轮播图 -->
  102. <!-- S 试一试 -->
  103. <view class="home_trial flex">
  104. <view class="home_trial_img flexs">
  105. <text>试试手气</text>
  106. <image src="https://chaomd.liuniu946.com/image/home/zuijia@2x.png" mode=""></image>
  107. </view>
  108. <view class="home_trial_go" @click="shishisq"><image src="https://chaomd.liuniu946.com/image/home/jinru@2x.png" mode=""></image></view>
  109. </view>
  110. <!-- E 试一试 -->
  111. <!-- S 最新开箱 -->
  112. <view class="home_newest">
  113. <!-- <view class="home_newest_head flex">
  114. <view class="home_newest_head_new">最新开箱</view>
  115. <view class="home_newest_head_go flexs" @click="goNewBox">
  116. <text>查看更多</text>
  117. <image src="/static/image/publice/jinruer@2x.png" mode=""></image>
  118. </view>
  119. </view>
  120. <scroll-view scroll-x="true" class="scroll-view">
  121. <view class="scroll-view_li" v-for="(item,index) in newBoxList" :key="'list-5-' + index" @click="goMessage(item,0)">
  122. <view class="scroll-view_li_img">
  123. <image :src="item.goods_images[0]" mode="aspectFill"></image>
  124. </view>
  125. <view class="scroll-view_li_price flexs">
  126. <text>¥</text>
  127. <text>{{ item.coin_price }}</text>
  128. </view>
  129. </view>
  130. </scroll-view> -->
  131. <!-- <view class="home_newest_ul flex">
  132. <view class="home_newest_li flexs" v-for="(item,index) in hotList" :key="index" @click="changeHot(item)">
  133. <view class="home_newest_img">
  134. <image :src="item.image" mode=""></image>
  135. </view>
  136. <view class="home_newest_con">
  137. <view class="home_newest_name">{{ item.name }}</view>
  138. <view class="home_newest_title">{{ item.title }}</view>
  139. </view>
  140. </view>
  141. </view> -->
  142. </view>
  143. <view class="home_swiper">
  144. <!-- E 最新开箱 -->
  145. <!-- <swiper autoplay circular class="swiper">
  146. <swiper-item v-for="(item,index) in bannerList" :key="index" @click="changeBanner(item)">
  147. <image :src="item.image" mode="aspectFill"></image>
  148. </swiper-item>
  149. </swiper> -->
  150. </view>
  151. <!-- 轮播end -->
  152. <!-- S 推荐盲盒 -->
  153. <view class="home_recommend home_newest">
  154. <view class="home_newest_head flex">
  155. <view class="home_newest_head_new">
  156. 推荐
  157. <text class="dot"></text>
  158. </view>
  159. <view class="home_newest_head_go flexs" @click="goRecommend">
  160. <text>更多分类</text>
  161. <image src="/static/image/publice/jinruer@2x.png" mode=""></image>
  162. </view>
  163. </view>
  164. <view class="home_recommend_ul flex ">
  165. <!-- <view class="home_recommend_item flex" v-for="(item,index) in shopList" :key="index" @click="goMessage(item,0)">
  166. <view class="item-box">
  167. <view class="coin-view">
  168. <text class="coin-price">{{item.coin_price}}</text>
  169. <text class="coin-unit">金币/抽</text>
  170. </view>
  171. <text class="box-name">{{item.box_name}}</text>
  172. <view class="goods-list flex">
  173. <view class="goods-img goods-img-0">
  174. <image :src="item.goods_images[0]" mode="aspectFit"></image>
  175. </view>
  176. <swiper :autoplay="false" :display-multiple-items="4" class="goods-list4 flex">
  177. <swiper-item class="goods-img" v-for="(img, img_index) in item.goods_images.slice(1)" :key="img_index">
  178. <image :src="img" mode="aspectFit"></image>
  179. </swiper-item>
  180. <swiper-item class="goods-img" v-for="t in item.goods_images2"></swiper-item>
  181. </swiper>
  182. </view>
  183. <view class="bottom-view flex">
  184. <text class="goods-num">共{{item.goods_num}}款商品</text>
  185. <view class="goods-jiazhi">
  186. <view class="min-max">
  187. <text class="price">{{item.price_min}}~{{item.price_max}}</text>
  188. </view>
  189. </view>
  190. </view>
  191. </view>
  192. </view> -->
  193. <view class="home_recommend_li" v-for="(item, index) in shopList" :key="index" @click="goMessage(item, 0)">
  194. <view class="home_recommend_li_img">
  195. <view class="home_recommend_li_img_top flex">
  196. <view class="home_recommend_li_img_box"><image :src="item.goods_images[0]" mode="aspectFit"></image></view>
  197. <!-- <view class="home_recommend_li_img_right" v-if="item.right.length != 0">
  198. <image :src="items" mode="aspectFit" v-for="(items,index) in item.right" :key="index"></image>
  199. </view> -->
  200. </view>
  201. <!-- <view class="home_recommend_li_img_bot">
  202. <image :src="items" mode="aspectFit" v-for="(items,index) in item.bot" :key="index"></image>
  203. </view> -->
  204. </view>
  205. <view class="home_recommend_li_main">
  206. <view class="home_recommend_li_price">
  207. <view class="li_price">
  208. <view class="price">{{ item.price_min }}~{{ item.price_max }}</view>
  209. </view>
  210. </view>
  211. <view class="home_recommend_li_name">{{ item.box_name }}</view>
  212. <view class="home_recommend_li_glod flex">
  213. <view class="item-box">
  214. <text class="coin-price">{{ item.coin_price }}</text>
  215. <text class="coin-unit1">金币/抽</text>
  216. </view>
  217. <text class="gjksp">共{{ item.goods_num }}款商品</text>
  218. </view>
  219. </view>
  220. </view>
  221. </view>
  222. </view>
  223. <!-- E 推荐盲盒 -->
  224. </view>
  225. </template>
  226. <script>
  227. export default {
  228. data() {
  229. return {
  230. vgoods: [],
  231. vgoods2: 0,
  232. total: 0,
  233. iconList: [
  234. {
  235. image: 'https://chaomd.liuniu946.com/image/home/zhengpinbaozheng@2x.png',
  236. name: '官方正品保证'
  237. },
  238. {
  239. image: 'https://chaomd.liuniu946.com/image/home/yijianhuishou@2x.png',
  240. name: '一键秒回收'
  241. },
  242. {
  243. image: 'https://chaomd.liuniu946.com/image/home/youhui@2x.png',
  244. name: '全网最优惠'
  245. }
  246. ],
  247. navList: [
  248. {
  249. image: 'https://chaomd.liuniu946.com/image/home/chaowanmanghe@2x.png?i=1',
  250. name: '盲盒商城',
  251. url: '/pages/index/more'
  252. },
  253. {
  254. image: 'https://chaomd.liuniu946.com/image/home/youhuichongzhi@2x.png?i=1',
  255. name: '优惠充值',
  256. url: '/pages/me/recharge'
  257. },
  258. {
  259. image: 'https://chaomd.liuniu946.com/image/home/fahuoliucheng@2x.png?i=1',
  260. name: '发货流程',
  261. url: '/pages/index/flow'
  262. },
  263. {
  264. image: 'https://chaomd.liuniu946.com/image/home/xinshoubangzhu@2x.png?i=1',
  265. name: '新手帮助',
  266. url: '/pages/index/help'
  267. }
  268. ], //导航列表
  269. hotList: [
  270. {
  271. image: 'https://chaomd.liuniu946.com/image/home/remen@2x.png',
  272. name: '热门专区',
  273. title: '跟随热门手气更欧',
  274. url: '/pages/index/hot?type=0'
  275. },
  276. {
  277. image: 'https://chaomd.liuniu946.com/image/home/dijia@2x.png',
  278. name: '低价专区',
  279. title: '低价试试手气',
  280. url: '/pages/index/hot?type=1'
  281. }
  282. ],
  283. bannerList: [], //轮播图
  284. logo: '', //logo
  285. shopList: [], //获取推荐列表
  286. newBoxList: [], //最新开箱
  287. pages: 0,
  288. page: 1, //
  289. isWeiXin: isWeiXin() //是否为微信
  290. };
  291. },
  292. methods: {
  293. sumUv() {
  294. this.$api.sumuv().then(res => {});
  295. },
  296. tomore() {
  297. uni.navigateTo({
  298. url: '/pages/index/records'
  299. });
  300. },
  301. getVgoods() {
  302. this.$api.getVgoods().then(res => {
  303. if (res.code === 1) {
  304. this.vgoods = res.data.list;
  305. this.total = res.data.total;
  306. if (this.total < 4) {
  307. this.vgoods2 = 4 - this.total;
  308. }
  309. }
  310. });
  311. },
  312. //去客服
  313. goServe() {
  314. uni.navigateTo({ url: '/pagesB/pages/server' });
  315. },
  316. //试试手气
  317. shishisq() {
  318. uni.navigateTo({ url: '/pages/index/details?id=' + 46 + '&type=0' });
  319. },
  320. //去推荐,盲盒
  321. goRecommend() {
  322. uni.navigateTo({ url: '/pages/index/recommend' });
  323. },
  324. //最新开箱
  325. goNewBox() {
  326. uni.navigateTo({ url: '/pages/index/newBox' });
  327. },
  328. //轮播图
  329. changeBanner(item) {
  330. if (item.type == 'word') {
  331. uni.setStorageSync('bannerMessage', JSON.stringify(item.value));
  332. uni.navigateTo({ url: '/pagesA/pages/bannerMessage' });
  333. } else if (item.type == 'link') {
  334. location.href = item.value;
  335. } else if (item.type == 'box') {
  336. uni.navigateTo({ url: '/pages/index/details?id=' + 36 + '&type=0' });
  337. }
  338. },
  339. //去搜索
  340. goSearch() {
  341. uni.navigateTo({ url: '/pages/index/search' });
  342. },
  343. //去详情
  344. goMessage(item, type) {
  345. return;
  346. uni.navigateTo({ url: '/pages/index/details?id=' + item.box_id + '&type=' + type });
  347. },
  348. //热门专区
  349. changeHot(item) {
  350. uni.navigateTo({ url: item.url });
  351. },
  352. //头部四个
  353. changeNav(item) {
  354. uni.navigateTo({ url: item.url });
  355. },
  356. //获取轮播图
  357. getbannerList() {},
  358. //最新开箱
  359. getNewbox() {
  360. this.$api.newestOpen().then(res => {
  361. if (res.code === 1) {
  362. this.newBoxList = res.data;
  363. }
  364. });
  365. },
  366. //获取推荐列表
  367. getShopList() {
  368. this.$api.recommend().then(res => {
  369. if (res.code === 1) {
  370. res.data.data.forEach(item => {
  371. item.image = item.goods_images[0];
  372. item.right = [];
  373. item.bot = [];
  374. item.goods_images.forEach((em, index) => {
  375. if (index > 0 && index < 3) {
  376. item.right.push(em);
  377. }
  378. if (index > 2) {
  379. item.bot.push(em);
  380. }
  381. });
  382. if (item.goods_images.length < 5) {
  383. item.goods_images2 = 5 - item.goods_images.length;
  384. }
  385. });
  386. (this.shopList = this.page == 1 ? res.data.data : [...this.shopList, ...res.data.data]), (this.pages = res.data.last_page);
  387. }
  388. });
  389. },
  390. //获取首页信息
  391. getBaseInfo() {
  392. this.$api.baseInfo().then(res => {
  393. if (res.code === 1) {
  394. this.logo = res.data.logo;
  395. this.bannerList = res.data.banner;
  396. }
  397. });
  398. }
  399. },
  400. onLoad({ sharecode, token, is_channel }) {
  401. if (sharecode) {
  402. uni.setStorageSync('sharecode', sharecode);
  403. }
  404. if (is_channel) {
  405. uni.setStorageSync('is_channel', is_channel);
  406. }
  407. if (token) {
  408. uni.setStorageSync('token', token);
  409. }
  410. this.getBaseInfo();
  411. this.getbannerList();
  412. this.getNewbox();
  413. this.getShopList();
  414. this.getVgoods();
  415. this.sumUv();
  416. },
  417. onShow() {
  418. let is_notice = uni.getStorageSync('is_notice');
  419. uni.removeStorageSync('is_notice');
  420. if (is_notice == 1) {
  421. setTimeout(() => {
  422. uni.showModal({
  423. title: '提示',
  424. content: '恭喜,获得10金币',
  425. success: function(res) {
  426. if (res.confirm) {
  427. console.log('用户点击确定');
  428. } else if (res.cancel) {
  429. console.log('用户点击取消');
  430. }
  431. }
  432. });
  433. }, 1000);
  434. }
  435. },
  436. mounted() {
  437. let audio = document.getElementById('audio').querySelector('audio');
  438. audio.play();
  439. },
  440. onReachBottom() {
  441. if (this.page < this.pages) {
  442. this.page++;
  443. this.getShopList();
  444. }
  445. }
  446. };
  447. //判断是否是微信浏览器的函数
  448. function isWeiXin() {
  449. //window.navigator.userAgent属性包含了浏览器类型、版本、操作系统类型、浏览器引擎类型等信息,这个属性可以用来判断浏览器类型
  450. var ua = window.navigator.userAgent.toLowerCase();
  451. //通过正则表达式匹配ua中是否含有MicroMessenger字符串
  452. if (ua.match(/MicroMessenger/i) == 'micromessenger') {
  453. return true;
  454. } else {
  455. return false;
  456. }
  457. }
  458. </script>
  459. <style lang="scss">
  460. page {
  461. background-color: #ffffff;
  462. }
  463. //主页双产品
  464. .home_recommend_ul .home_recommend_li .home_recommend_li_img .home_recommend_li_img_box uni-image {
  465. width: 145px !important;
  466. }
  467. .home_recommend_li_price .li_price {
  468. text-align: left;
  469. width: 83px;
  470. height: 19px;
  471. line-height: 19px;
  472. position: absolute;
  473. right: 0;
  474. top: 0;
  475. }
  476. .home_recommend_ul .home_recommend_li .coin-price {
  477. font-size: 18px;
  478. font-family: DINAlternate-Bold, DINAlternate;
  479. font-weight: bold;
  480. color: #f55d22 !important;
  481. line-height: 26px;
  482. }
  483. .home_recommend_ul .home_recommend_li .coin-unit1 {
  484. font-size: 11px;
  485. font-family: PingFangSC-Regular, PingFang SC;
  486. font-weight: bold !important;
  487. color: #fa6400 !important;
  488. line-height: 16px;
  489. margin-left: 3px;
  490. }
  491. .home_recommend_ul .home_recommend_li .gjksp {
  492. height: 16px;
  493. line-height: 25px;
  494. }
  495. .home_recommend_li_price .li_price .price {
  496. font-size: 13px;
  497. font-family: DINAlternate-Bold, DINAlternate;
  498. font-weight: bold;
  499. color: #ffffff;
  500. line-height: 19px;
  501. }
  502. .home_bar {
  503. width: 100%;
  504. position: sticky;
  505. top: 0;
  506. left: 0;
  507. padding: 0 30rpx;
  508. z-index: 2021;
  509. background: #ffffff;
  510. .home_bar_nav {
  511. width: 100%;
  512. }
  513. .home_bar_con {
  514. height: 88rpx;
  515. }
  516. .home_bar_logo {
  517. width: 66rpx;
  518. height: 66rpx;
  519. }
  520. .home_bar_search {
  521. width: 600rpx;
  522. height: 58rpx;
  523. padding: 0 20rpx;
  524. background: #f7f7f7;
  525. border-radius: 200rpx;
  526. image {
  527. width: 44rpx;
  528. height: 44rpx;
  529. }
  530. input {
  531. flex: 1;
  532. font-size: 26rpx;
  533. margin-left: 15rpx;
  534. }
  535. }
  536. .home_bar_serve {
  537. width: 44rpx;
  538. height: 44rpx;
  539. }
  540. }
  541. .home_swiper {
  542. padding: 0 30rpx;
  543. background: #ffffff;
  544. .award-notice {
  545. padding: 22rpx 15rpx 0 30rpx;
  546. // width: 686rpx;
  547. height: 358rpx;
  548. background: url(../../pagesA/static/jpgg.jpg);
  549. background-size: 100%;
  550. border-radius: 24rpx 24rpx 0rpx 0rpx;
  551. .title-view {
  552. padding-right: 24rpx;
  553. .title {
  554. font-size: 39rpx;
  555. font-family: YouSheBiaoTiHei;
  556. color: #ffffff;
  557. margin-right: 20rpx;
  558. width: 142rpx;
  559. height: 30rpx;
  560. }
  561. .tip {
  562. font-size: 24rpx;
  563. font-family: PingFangSC-Medium, PingFang SC;
  564. font-weight: 500;
  565. color: #ffffff;
  566. line-height: 34rpx;
  567. }
  568. .more {
  569. font-size: 24rpx;
  570. font-family: PingFangSC-Medium, PingFang SC;
  571. font-weight: 500;
  572. color: #ffffff;
  573. line-height: 34rpx;
  574. // margin-top: 12rpx;
  575. .more-icon {
  576. width: 24rpx;
  577. height: 24rpx;
  578. }
  579. }
  580. }
  581. .goods-list {
  582. margin: 20rpx 0 0;
  583. height: 206rpx;
  584. justify-content: flex-start;
  585. .goods-item {
  586. margin-right: 18rpx;
  587. width: 146rpx;
  588. height: 206rpx;
  589. background: #ffffff;
  590. border-radius: 8rpx;
  591. .goods-info {
  592. position: relative;
  593. height: 106rpx;
  594. .goods-img {
  595. width: 100%;
  596. height: 100%;
  597. }
  598. .goods-price {
  599. position: absolute;
  600. bottom: -10rpx;
  601. right: 0;
  602. z-index: 1;
  603. justify-content: center;
  604. min-width: 92rpx;
  605. height: 32rpx;
  606. background: linear-gradient(90deg, #ff495c 0%, #ff769e 100%);
  607. border-radius: 16rpx 0px 0px 0px;
  608. font-size: 18rpx;
  609. font-family: PingFangSC-Medium, PingFang SC;
  610. font-weight: 500;
  611. color: #ffffff;
  612. line-height: 26rpx;
  613. }
  614. }
  615. .bottom-view {
  616. padding: 20rpx 0 0 16rpx;
  617. width: 146rpx;
  618. height: 100rpx;
  619. background: #e8dbf9;
  620. border-radius: 0px 0px 8rpx 8rpx;
  621. .player-view {
  622. justify-content: flex-start;
  623. .player-avatar {
  624. width: 32rpx;
  625. height: 32rpx;
  626. border-radius: 50%;
  627. }
  628. .player-name {
  629. margin-left: 4rpx;
  630. font-size: 18rpx;
  631. font-family: PingFangSC-Medium, PingFang SC;
  632. font-weight: 500;
  633. color: #171a20;
  634. line-height: 26rpx;
  635. }
  636. }
  637. .goods-name {
  638. margin-top: 6rpx;
  639. width: 124rpx;
  640. font-size: 18rpx;
  641. font-family: PingFangSC-Medium, PingFang SC;
  642. font-weight: 500;
  643. color: #171a20;
  644. line-height: 26rpx;
  645. white-space: nowrap;
  646. text-overflow: ellipsis;
  647. overflow: hidden;
  648. }
  649. }
  650. }
  651. }
  652. .home_swiper_ul {
  653. padding-right: 24rpx;
  654. margin-top: 16rpx;
  655. }
  656. }
  657. .swiper {
  658. height: 156rpx;
  659. border-radius: 99rpx;
  660. overflow: hidden;
  661. overflow: hidden;
  662. image {
  663. border-radius: 20rpx;
  664. }
  665. }
  666. .home_swiper_li {
  667. height: 64rpx;
  668. image {
  669. width: 34rpx;
  670. height: 34rpx;
  671. margin-right: 10rpx;
  672. }
  673. text {
  674. color: #fff;
  675. }
  676. }
  677. .home_swiper_nav {
  678. justify-content: space-around;
  679. }
  680. .home_swiper_nav_li {
  681. height: 182rpx;
  682. flex-direction: column;
  683. image {
  684. width: 70rpx;
  685. height: 70rpx;
  686. margin-bottom: 10rpx;
  687. }
  688. text {
  689. color: #000000;
  690. font-size: 26rpx;
  691. }
  692. }
  693. }
  694. .home_trial {
  695. height: 88rpx;
  696. margin: 10rpx 0;
  697. padding: 0 30rpx;
  698. background: #ffffff;
  699. .home_trial_img {
  700. text {
  701. font-size: 28rpx;
  702. }
  703. image {
  704. width: 38rpx;
  705. height: 38rpx;
  706. margin-left: 10rpx;
  707. }
  708. }
  709. .home_trial_go {
  710. width: 50rpx;
  711. height: 50rpx;
  712. }
  713. }
  714. .home_newest {
  715. background: #ffffff;
  716. .home_newest_head {
  717. padding: 30rpx 28rpx;
  718. .home_newest_head_new {
  719. font-size: 28rpx;
  720. font-weight: bold;
  721. position: relative;
  722. .dot {
  723. position: absolute;
  724. right: -16rpx;
  725. top: 0rpx;
  726. background-color: #fff;
  727. border: 6rpx solid #f7b500;
  728. border-radius: 50%;
  729. }
  730. }
  731. .home_newest_head_go {
  732. text {
  733. color: #999999;
  734. }
  735. image {
  736. width: 22rpx;
  737. height: 22rpx;
  738. margin-left: 10rpx;
  739. }
  740. }
  741. }
  742. .scroll-view {
  743. white-space: nowrap;
  744. box-sizing: border-box;
  745. padding-left: 28rpx;
  746. .scroll-view_li {
  747. margin-right: 20rpx;
  748. display: inline-block;
  749. .scroll-view_li_img {
  750. image {
  751. width: 150rpx;
  752. height: 150rpx;
  753. border-radius: 10rpx;
  754. }
  755. margin-bottom: 20rpx;
  756. }
  757. .scroll-view_li_price {
  758. text {
  759. color: #cf271b;
  760. &:last-child {
  761. font-size: 30rpx;
  762. }
  763. }
  764. }
  765. }
  766. }
  767. .home_newest_ul {
  768. padding: 4rpx 28rpx 4rpx 28rpx;
  769. background-color: #f8fafb;
  770. .home_newest_li {
  771. width: 332rpx;
  772. height: 130rpx;
  773. padding-left: 30rpx;
  774. background: #f8fafb;
  775. border-radius: 6rpx;
  776. .home_newest_img {
  777. width: 70rpx;
  778. height: 70rpx;
  779. margin-right: 24rpx;
  780. }
  781. .home_newest_name {
  782. font-size: 30rpx;
  783. font-weight: bold;
  784. }
  785. .home_newest_title {
  786. color: #999999;
  787. margin-top: 10rpx;
  788. }
  789. }
  790. }
  791. }
  792. .home_recommend_ul {
  793. flex-wrap: wrap;
  794. justify-content: center;
  795. // padding: 0 28rpx;
  796. .home_recommend_item {
  797. margin-top: -30rpx;
  798. justify-content: center;
  799. width: 746rpx;
  800. height: 384rpx;
  801. background-image: url(https://chaomd.liuniu946.com/image/home/bg@2x.png);
  802. background-size: 100% 100%;
  803. background-position: center;
  804. .item-box {
  805. width: 686rpx;
  806. height: 324rpx;
  807. padding: 22rpx 0 20rpx 18rpx;
  808. position: relative;
  809. .coin-view {
  810. position: absolute;
  811. top: 20rpx;
  812. right: 20rpx;
  813. .coin-price {
  814. font-size: 48rpx;
  815. font-family: DINAlternate-Bold, DINAlternate;
  816. font-weight: bold;
  817. color: #f55d22;
  818. line-height: 56rpx;
  819. }
  820. .coin-unit {
  821. font-size: 24rpx;
  822. font-family: PingFangSC-Regular, PingFang SC;
  823. font-weight: 400;
  824. color: #fa6400;
  825. line-height: 34rpx;
  826. margin-left: 8rpx;
  827. }
  828. }
  829. .box-name {
  830. font-size: 32rpx;
  831. font-family: PingFangSC-Medium, PingFang SC;
  832. font-weight: 500;
  833. color: #2e333f;
  834. line-height: 44rpx;
  835. }
  836. .goods-list {
  837. margin: 44rpx 0 6rpx;
  838. .goods-img {
  839. width: 92rpx;
  840. height: 92rpx;
  841. }
  842. .goods-img-0 {
  843. width: 148rpx;
  844. height: 148rpx;
  845. }
  846. .goods-list4 {
  847. flex: 1;
  848. height: 92rpx;
  849. justify-content: flex-start;
  850. }
  851. }
  852. .bottom-view {
  853. .goods-num {
  854. font-size: 24rpx;
  855. font-family: PingFangSC-Regular, PingFang SC;
  856. font-weight: 400;
  857. color: #7a808d;
  858. line-height: 34rpx;
  859. margin-left: 8rpx;
  860. }
  861. .goods-jiazhi {
  862. margin-right: 20rpx;
  863. background-image: url(https://chaomd.liuniu946.com/image/home/jiazhi10@2x.png);
  864. background-size: 100% 100%;
  865. background-position: center;
  866. width: 274rpx;
  867. height: 40rpx;
  868. position: relative;
  869. .min-max {
  870. text-align: left;
  871. width: 162rpx;
  872. height: 40rpx;
  873. line-height: 40rpx;
  874. position: absolute;
  875. right: 0;
  876. top: 0;
  877. .unit {
  878. font-size: 20rpx;
  879. font-family: PingFangSC-Regular, PingFang SC;
  880. font-weight: 400;
  881. color: #ffffff;
  882. line-height: 28rpx;
  883. }
  884. .price {
  885. font-size: 28rpx;
  886. font-family: DINAlternate-Bold, DINAlternate;
  887. font-weight: bold;
  888. color: #ffffff;
  889. line-height: 32rpx;
  890. }
  891. }
  892. }
  893. }
  894. }
  895. }
  896. .home_recommend_li {
  897. width: 332rpx;
  898. padding: 20rpx;
  899. margin-bottom: 30rpx;
  900. background: url(../../static/image/tabbar/scpbj.png);
  901. background-size: 100%;
  902. box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(153, 153, 153, 0.1);
  903. border-radius: 10rpx;
  904. margin: 5px 5px;
  905. .home_recommend_li_img {
  906. height: auto;
  907. .home_recommend_li_img_top {
  908. align-items: flex-start;
  909. }
  910. .home_recommend_li_img_bot {
  911. display: flex;
  912. margin-top: 20rpx;
  913. justify-content: flex-end;
  914. image {
  915. width: 85rpx;
  916. height: 85rpx;
  917. margin-left: 20rpx;
  918. &:first-child {
  919. margin-left: 0;
  920. }
  921. border-radius: 6rpx;
  922. }
  923. }
  924. .home_recommend_li_img_box {
  925. image {
  926. width: 190rpx;
  927. height: 190rpx;
  928. border-radius: 6rpx;
  929. }
  930. }
  931. .home_recommend_li_img_right {
  932. image {
  933. width: 85rpx;
  934. height: 85rpx;
  935. border-radius: 6rpx;
  936. &:first-child {
  937. margin-bottom: 20rpx;
  938. }
  939. }
  940. }
  941. }
  942. .home_recommend_li_price {
  943. // width: 280rpx;
  944. height: 40rpx;
  945. color: #ffffff;
  946. margin: 20rpx 0;
  947. font-size: 26rpx;
  948. line-height: 40rpx;
  949. padding-left: 18rpx;
  950. background: url(/h5/static/img/jiazhi10@2x.27fb9543.png);
  951. background-size: 100% 100%;
  952. border-radius: 20rpx;
  953. position: relative;
  954. }
  955. .home_recommend_li_name {
  956. font-size: 28rpx;
  957. display: -webkit-box;
  958. -webkit-box-orient: vertical;
  959. -webkit-line-clamp: 2;
  960. overflow: hidden;
  961. height: 76rpx;
  962. line-height: 40rpx;
  963. }
  964. .home_recommend_li_glod {
  965. text {
  966. color: #cf271b;
  967. font-size: 26tpx;
  968. &:last-child {
  969. color: #666666;
  970. font-size: 24rpx;
  971. }
  972. }
  973. }
  974. }
  975. }
  976. .shadow {
  977. height: 100vh;
  978. width: 100vw;
  979. position: fixed;
  980. top: 0;
  981. left: 0;
  982. background-color: #000;
  983. z-index: 99999999;
  984. uni-image {
  985. height: 480rpx !important;
  986. }
  987. }
  988. </style>