index.vue 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524
  1. <template>
  2. <view class="container">
  3. <!-- 首页头部搜索 -->
  4. <!-- #ifdef MP -->
  5. <navigator url="/pages/product/search">
  6. <view class="input-box flex">
  7. <view class=" input-content flex">
  8. <view class="iconfont iconsearch"></view>
  9. <view class="input"><input disabled placeholder="请输入搜索内容" /></view>
  10. </view>
  11. <view class="input-button flex"><text>搜索</text></view>
  12. </view>
  13. </navigator>
  14. <!-- #endif -->
  15. <!-- 滚动tab导航 -->
  16. <view class="horizonal-tab">
  17. <scroll-view class="scroll-list" scroll-x>
  18. <view class="scoll-box" v-for="(item, index) in tabTitle" :key="index" :class="{ active: item.id === currentId }" @click="tabtap(item)">
  19. <view class="scoll-name">{{ item.cate_name }}</view>
  20. </view>
  21. </scroll-view>
  22. </view>
  23. <!-- <view @click="add">扫码</view> -->
  24. <!-- 护肤 -->
  25. <view v-if="currentId !== 0" class="skincare-content">
  26. <view class="skincare-cate">
  27. <view class="skincare-cate-row" v-for="(items, indexs) in children" :key="indexs" @click="navToList(items.id)">
  28. <view class="skincare-cate-item">
  29. <view class="img"><image :src="items.pic"></image></view>
  30. <view class="name">{{ items.cate_name }}</view>
  31. </view>
  32. </view>
  33. <view class="skincare-cate-row" @click="switchTab('/pages/category/category')">
  34. <view class="skincare-cate-item">
  35. <view class="img"><image src="../../static/img/34.png" style="width: 54rpx;height: 54rpx;"></image></view>
  36. <view class="name">更多</view>
  37. </view>
  38. </view>
  39. </view>
  40. <!-- 排行榜 -->
  41. <view class="store-box">
  42. <!-- 排行榜charts -->
  43. <view class="charts-box">
  44. <view class="charts-header">
  45. <image src="../../static/img/33.png"></image>
  46. <view class="charts-name">排行榜</view>
  47. <view class="charts-info" @click="navTo('/pages/index/hotindex?type=2')">热门好货top榜</view>
  48. </view>
  49. <view class="charts-content">
  50. <view v-for="(item, index) in rankingList" :key="index" open-type="switchTab" hover-class="none" @click="navToDetailPage(item)">
  51. <view class="goods-box">
  52. <view class="goods-bg"><image :src="item.image"></image></view>
  53. <view class="goods-name">{{ item.store_name }}</view>
  54. <!-- <view class="goods-info"><text class="goods-name">面膜</text></view> -->
  55. <view class="goods-prince">
  56. <text>{{ item.price }}</text>
  57. </view>
  58. </view>
  59. </view>
  60. </view>
  61. </view>
  62. </view>
  63. <!-- 天天特价 便宜好货 -->
  64. <view class="recommend">
  65. <view class="recommend-list" v-for="(ls, lsindex) in recommend" :key="lsindex" @click="change(ls.id)">
  66. <view class="re_title" v-bind:class="{ active_color: ls.id == checkid }">{{ ls.re_title }}</view>
  67. <view class="re_name" v-bind:class="{ active_color: ls.id == checkid }">{{ ls.re_name }}</view>
  68. <image class="selected_icon" src="/static/img/31.png" v-bind:class="{ active: ls.id == checkid }"></image>
  69. </view>
  70. </view>
  71. <view class="guess-box">
  72. <view class="list-box">
  73. <view class="guess-section">
  74. <view v-for="(item, index) in bargain" :key="index" open-type="switchTab" hover-class="none" @click="navToDetailPage(item)">
  75. <view class="guess-section-item">
  76. <view class="img"><image :src="item.image"></image></view>
  77. <view class="guess-info">
  78. <view class="name">{{ item.store_name }}</view>
  79. <view class="price">
  80. <text>{{ item.price }}</text>
  81. </view>
  82. </view>
  83. </view>
  84. </view>
  85. </view>
  86. </view>
  87. </view>
  88. </view>
  89. <!-- 首页 -->
  90. <view v-if="currentId == 0">
  91. <!-- 首页轮播 -->
  92. <view class="carousel-section">
  93. <swiper class="carousel" indicator-dots indicator-color="#FFFFFF" indicator-active-color="#333333" autoplay="true" duration="400" interval="5000">
  94. <swiper-item v-for="(item, index) in carouselList" :key="index" class="carousel-item" @click="bannerNavToUrl(item)"><image :src="item.pic" /></swiper-item>
  95. </swiper>
  96. </view>
  97. <!-- 礼包 -->
  98. <view class="cate-section" @click="navTo('/pages/hotsale/giftbag')"><image src="https://mmz.liuniu946.com/statics/img/img50.png"></image></view>
  99. <!-- <view class="cate-section">
  100. <view class="hot-live">
  101. <view class="title">大礼包专区</view>
  102. <view class="hot-living">升级合伙人</view>
  103. </view>
  104. <swiper class="cate-box" scroll-x="true" @scroll="bindscroll" show-scrollbar="false">
  105. <swiper-item class="cate-frame" v-if="menusList_one.length != 0">
  106. <view class="cate-frame-1" v-for="(item, index) in menusList_one" :key="index" @click="navToDetailPage(item)">
  107. <view class="item-cate">
  108. <view class="image"><image :src="item.image" /></view>
  109. <text>大礼包{{ index + 1 }}</text>
  110. </view>
  111. </view>
  112. </swiper-item>
  113. <swiper-item class="cate-frame" v-if="menusList_two.length != 0">
  114. <view class="cate-frame-1" v-for="(item, index) in menusList_two" :key="index" @click="navToDetailPage(item)">
  115. <view class="item-cate">
  116. <view class="image"><image :src="item.image" /></view>
  117. <text>大礼包{{ index + 1 + 10 }}</text>
  118. </view>
  119. </view>
  120. </swiper-item>
  121. <swiper-item class="cate-frame" v-if="menusList_three.length != 0">
  122. <view class="cate-frame-1" v-for="(item, index) in menusList_three" :key="index" @click="navToDetailPage(item)">
  123. <view class="item-cate">
  124. <view class="image"><image :src="item.image" /></view>
  125. <text>大礼包{{ index + 1 + 20 }}</text>
  126. </view>
  127. </view>
  128. </swiper-item>
  129. <swiper-item class="cate-frame" v-if="menusList_four.length != 0">
  130. <view class="cate-frame-1" v-for="(item, index) in menusList_four" :key="index" @click="navToDetailPage(item)">
  131. <view class="item-cate">
  132. <view class="image"><image :src="item.image" /></view>
  133. <text>大礼包{{ index + 1 + 30 }}</text>
  134. </view>
  135. </view>
  136. </swiper-item>
  137. <swiper-item class="cate-frame" v-if="menusList_five.length != 0">
  138. <view class="cate-frame-1" v-for="(item, index) in menusList_five" :key="index" @click="navToDetailPage(item)">
  139. <view class="item-cate">
  140. <view class="image"><image :src="item.image" /></view>
  141. <text>大礼包{{ index + 1 + 40 }}</text>
  142. </view>
  143. </view>
  144. </swiper-item>
  145. </swiper>
  146. <view class="progressBar-green"><view class="left" :style="{ width: sildeWidth + 'px', marginLeft: videoSilde + 'px' }"></view></view>
  147. </view> -->
  148. <!-- 热门直播 -->
  149. <view class="hot-live">
  150. <view class="title">热门直播</view>
  151. <view class="hot-living">火热直播中</view>
  152. </view>
  153. <view class="live-goods">
  154. <scroll-view scroll-x="true" @scrolltolower="liveList()">
  155. <view class="goods flex1">
  156. <view class="live-good-items" v-for="(item, index) in LiveList" :key="index" @click="goLive(item)">
  157. <image :src="item.image"></image>
  158. <text class="goods-info" style="width: 175rpx;">{{ item.store_name }}</text>
  159. </view>
  160. </view>
  161. </scroll-view>
  162. </view>
  163. <!-- 秒杀楼层 -->
  164. <seckill></seckill>
  165. <!-- 砍价商品 -->
  166. <view class="hot-goods">
  167. <view class="hot-headers flex-upDown-center">
  168. <!-- <image class="img" src="../../static/img/img44.png"></image> -->
  169. <view class="hot-title">超值砍价</view>
  170. <view><view class="more" @click.stop="navTo('/pages/activity/goods_bargain/index')">更多</view></view>
  171. </view>
  172. <view class="hot-lists" v-for="(baritem, barindex) in bargainlist" :key="barindex" @click.stop="navToDetailPages(baritem)">
  173. <view class="hot-produce">
  174. <view class="produce-image"><image :src="baritem.image"></image></view>
  175. <view class="produce-content">
  176. <view class="produce-price1 ">
  177. <view class="produce-name line2">{{ baritem.title }}</view>
  178. <!-- <view class="produce-info">
  179. 已抢
  180. <text style="color: #FF383E">{{ baritem.sales }}</text>
  181. 箱/仅剩
  182. <text style="color:#FF383E">{{ baritem.stock }}</text>
  183. </view> -->
  184. <view class="produce-center">
  185. <view class="kanjia_word">
  186. <view class="word-1">原价:¥{{ baritem.price }}</view>
  187. <view class="word-2">
  188. 砍后价
  189. <text style="font-size: 24rpx;">¥</text>
  190. <text style="font-size: 36rpx;">{{ baritem.min_price }}</text>
  191. </view>
  192. </view>
  193. <view
  194. class="kanjia_button flex-center"
  195. @tap.stop="openSubscribe('/pages/activity/goods_bargain_details/index?id=' + baritem.id + '&bargain=' + userInfo.uid)"
  196. >
  197. <view>查看详情</view>
  198. </view>
  199. </view>
  200. </view>
  201. </view>
  202. </view>
  203. </view>
  204. </view>
  205. <!-- 热销产品 -->
  206. <view class="hot-goods" v-if="showCard" style="margin-top: 30rpx;">
  207. <view class="hot-headers flex-upDown-center" @click="navTo('/pages/hotsale/hotsale')">
  208. <!-- <image class="img" src="../../static/img/img44.png"></image> -->
  209. <view class="hot-title">热销产品</view>
  210. <view><view class="more">更多</view></view>
  211. </view>
  212. <view class="hot-lists" v-for="(hotitem, hotindex) in hotlist" :key="hotindex" @click="navToDetailPage(hotitem)">
  213. <view class="hot-produce">
  214. <view class="produce-image"><image :src="hotitem.image"></image></view>
  215. <view class="produce-content">
  216. <view class="produce-name">{{ hotitem.store_name }}</view>
  217. <view class="produce-info">
  218. 已抢
  219. <text style="color: #FF383E">{{ hotitem.sales }}</text>
  220. 箱/仅剩
  221. <text style="color:#FF383E">{{ hotitem.stock }}</text>
  222. </view>
  223. <view class="produce-price ">
  224. <view>
  225. <text>{{ hotitem.price }}</text>
  226. </view>
  227. <view class="produce-price-1" v-if="userInfo.level != null" :key="hotitem.origin_price">¥{{ hotitem.origin_price }}</view>
  228. </view>
  229. </view>
  230. </view>
  231. </view>
  232. </view>
  233. <uni-load-more :status="loadingType"></uni-load-more>
  234. </view>
  235. </view>
  236. </template>
  237. <script>
  238. import seckill from './seckill';
  239. import { loadIndexs } from '@/api/index.js';
  240. import { groomList, getProducts, productDetail, getliveList,userSpread } from '@/api/product.js';
  241. import navTab from '@/components/navTab.vue';
  242. import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
  243. import { getList } from '@/api/category.js';
  244. import { openBargainSubscribe } from '@/utils/SubscribeMessage.js';
  245. import { interceptor } from '@/utils/loginUtils.js';
  246. import { getBargainList } from '@/api/user.js';
  247. import { mapState } from 'vuex';
  248. // import uniPopups from '@/components/uni-popup/uni-popups.vue';
  249. export default {
  250. components: {
  251. seckill,
  252. navTab,
  253. uniLoadMore
  254. // uniPopups
  255. },
  256. computed: {
  257. ...mapState(['baseURL', 'userInfo', 'hasLogin'])
  258. },
  259. // 监听导航栏输入框点击事件
  260. onNavigationBarSearchInputClicked(e) {
  261. uni.navigateTo({
  262. url: '/pages/product/search'
  263. });
  264. },
  265. onReachBottom() {
  266. this.gethotlists();
  267. },
  268. onBackPress() {
  269. obj.hotlist = [];
  270. },
  271. data() {
  272. return {
  273. showCard: false, //数据加载完成在渲染界面
  274. type: 3,
  275. hotlist: [], //热销产品1
  276. bargainlist: [], //砍价商品
  277. rankingList: [], //排行榜2
  278. bargain: [], //特价商品4 便宜好货3
  279. currentId: 0,
  280. list: [],
  281. children: [], //详细的分类
  282. //直播
  283. LiveList: [],
  284. checkid: 3,
  285. // swiperHeight: 0,
  286. // bastList: [],
  287. isFixed: false,
  288. carouselList: [],
  289. giftbag: 12, //礼包id
  290. menusList_one: [],
  291. menusList_two: [],
  292. menusList_three: [],
  293. menusList_four: [],
  294. menusList_five: [],
  295. tabIndex: 0,
  296. tabTitle: [],
  297. goodstype: 1,
  298. recommend: [
  299. {
  300. id: 3,
  301. re_title: '天天特价',
  302. re_name: '为你推荐'
  303. },
  304. {
  305. id: 4,
  306. re_title: '便宜好货',
  307. re_name: '特价包邮'
  308. }
  309. ],
  310. videoSilde: '', // 滑动条移动左侧距离
  311. ScollWid: '', // 分类框宽度
  312. sildeWidth: '20', // 滑动条宽度
  313. buttonWidth: '', // 滑动条底部宽度
  314. specSelected: '',
  315. specList: '',
  316. actionPrice: '',
  317. productValue: [],
  318. page: 1,
  319. limit: 5,
  320. hotpage: 1,
  321. hotlimit: 5,
  322. number: '',
  323. loadingType: 'more' //加载更多状态
  324. };
  325. },
  326. onLoad: function(option) {
  327. let obj = this;
  328. if (option.spread) {
  329. uni.setStorageSync('spread', option.spread);
  330. }
  331. if (option.scene) {
  332. if (typeof option.scene == 'string' && isNaN(option.scene)) {
  333. let da = GetRequest(decodeURIComponent(option.scene));
  334. uni.setStorageSync('spread', da.scene);
  335. if (obj.hasLogin) {
  336. if(obj.userInfo.spread_uid == 0){
  337. userSpread({
  338. puid: uni.getStorageSync('spread')
  339. }).then(res => {
  340. uni.showToast({
  341. title:'添加成功'
  342. })
  343. });
  344. }
  345. }
  346. }
  347. if (!isNaN(option.scene)) {
  348. uni.setStorageSync('spread_code', option.scene);
  349. if (obj.hasLogin) {
  350. if(obj.userInfo.spread_uid == 0){
  351. userSpread({
  352. pcode: uni.getStorageSync('spread_code')
  353. }).then(res => {
  354. uni.showToast({
  355. title:'邀请人添加成功'
  356. })
  357. });
  358. }
  359. }
  360. }
  361. }
  362. this.liveList();
  363. if (!obj.hasLogin) {
  364. uni.showModal({
  365. title: '登录',
  366. content: '您未登录,是否马上登陆?',
  367. success: e => {
  368. if (e.confirm) {
  369. interceptor();
  370. }
  371. },
  372. fail: e => {
  373. console.log(e);
  374. }
  375. });
  376. return;
  377. }
  378. },
  379. onShow: function() {
  380. this.hotpage = 1;
  381. this.loadData();
  382. this.loadDatalist();
  383. this.getBargainList();
  384. this.hotlist = [];
  385. this.loadingType = 'more';
  386. this.gethotlists();
  387. // #ifdef APP-PLUS
  388. let obj = this;
  389. uni.getClipboardData({
  390. //获取剪切板里的信息
  391. data: 'hello',
  392. success: function(res) {
  393. //var str =res.data.substring(0,6);
  394. var arr = res.data.split('@');
  395. console.log(arr[0],'arr[0]');//https://pt.xsp
  396. console.log(arr[1],'arr[1]');//pages/product/details
  397. console.log(arr[2],'arr[2]');//type:0商品,type=1拼团,type=2邀请注册,type=3邀请好友参团type=4邀请好友助力
  398. console.log(arr[3],'arr[3]');//uid 邀请人id
  399. let userInfo = uni.getStorageSync('userInfo') || '';
  400. if (arr[0] == obj.baseURL) {
  401. //判断是不是美美赚的复制内容
  402. if (userInfo.uid != arr[3]) {
  403. uni.showModal({
  404. title: '是否要进入你好友分享的页面',
  405. content: arr[1],
  406. //image:"https://img-blog.csdnimg.cn/20200313124105374.png",
  407. success: function(r) {
  408. if (r.confirm) {
  409. uni.setClipboardData({
  410. data: '',
  411. success: function() {
  412. uni.hideToast();
  413. }
  414. });
  415. if (arr[2] == 4) {
  416. uni.switchTab({
  417. url: '/' + arr[1]
  418. });
  419. } else {
  420. uni.navigateTo({
  421. url: '/' + arr[1] + '&spread=' + arr[3]
  422. });
  423. }
  424. } else if (r.cancel) {
  425. uni.setClipboardData({
  426. data: '',
  427. success: function() {
  428. uni.hideToast();
  429. }
  430. });
  431. }
  432. },
  433. fail: function(err) {
  434. console.log('fail');
  435. }
  436. });
  437. } else {
  438. console.log('这是自己分享的链接');
  439. }
  440. } else {
  441. console.log('不是美美赚的地址:' + res.data);
  442. }
  443. },
  444. fail: function(err) {
  445. console.log('fail');
  446. }
  447. });
  448. //关闭剪贴板。
  449. //uni.CloseClipboard();
  450. // #endif
  451. },
  452. // onReady() {
  453. // // 获取分类包裹框宽度
  454. // uni.getSystemInfo({
  455. // success: function(res) {
  456. // // res - 各种参数
  457. // let obj = uni.createSelectorQuery().select('.cate-box');
  458. // obj.boundingClientRect(function(data) {
  459. // // data - 各种参数
  460. // uni.setStorageSync('ScollWid', data.width);
  461. // }).exec();
  462. // }
  463. // });
  464. // // 获取进度条底部宽度
  465. // uni.getSystemInfo({
  466. // success: function(res) {
  467. // // res - 各种参数
  468. // let obj = uni.createSelectorQuery().select('.progressBar-green');
  469. // obj.boundingClientRect(function(data) {
  470. // // data - 各种参数
  471. // uni.setStorageSync('buttonWidth', data.width);
  472. // }).exec();
  473. // }
  474. // });
  475. // },
  476. methods: {
  477. add(){
  478. uni.scanCode({
  479. success: function (res) {
  480. // uni.showModal({
  481. // title:'s',
  482. // content:JSON.stringify(res)
  483. // })
  484. }
  485. });
  486. },
  487. getBargainList() {
  488. let that = this;
  489. getBargainList({
  490. page: that.page,
  491. limit: that.limit
  492. })
  493. .then(function(res) {
  494. that.$set(that, 'bargainlist', res.data.slice(0, 2));
  495. })
  496. .catch(res => {
  497. console.log(res, 'getBargainList');
  498. });
  499. },
  500. gethotlists() {
  501. let obj = this;
  502. //获取精品推荐放在热销商品
  503. if (obj.loadingType == 'more') {
  504. groomList(
  505. {
  506. page: obj.hotpage,
  507. limit: obj.hotlimit
  508. },
  509. obj.goodstype
  510. )
  511. .then(({ data }) => {
  512. let hotlists = obj.hotlist.concat(data.list);
  513. // 传值处理数据
  514. obj.getVipMoney(hotlists, data, obj.hotpage, obj.hotlimit).then(res => {
  515. obj.hotlist = res;
  516. obj.showCard = true;
  517. if (obj.hotlimit == data.list.length) {
  518. obj.hotpage++;
  519. obj.loadingType = 'more';
  520. } else {
  521. obj.loadingType = 'nomore';
  522. }
  523. });
  524. })
  525. .catch(e => {
  526. console.log(e);
  527. });
  528. }
  529. },
  530. openSubscribe: function(e) {
  531. let page = e;
  532. // #ifndef MP
  533. uni.navigateTo({
  534. url: page
  535. });
  536. // #endif
  537. // #ifdef MP
  538. uni.showLoading({
  539. title: '正在加载'
  540. });
  541. openBargainSubscribe()
  542. .then(res => {
  543. uni.hideLoading();
  544. uni.navigateTo({
  545. url: page
  546. });
  547. })
  548. .catch(err => {
  549. uni.hideLoading();
  550. });
  551. // #endif
  552. },
  553. // 获取当前等级价格
  554. /**
  555. * @param {number} num 用于计算是否取得指定数据次数
  556. */
  557. getVipMoney(hotlists, dataList, page, limit) {
  558. let obj = this;
  559. return new Promise((ok, error) => {
  560. let out = setTimeout(e => {
  561. error('请求超时', hotlists);
  562. }, 20000);
  563. //计算请求返回次数
  564. let num = 0;
  565. for (let i = 0; i < hotlists.length; i++) {
  566. num++;
  567. if (page == 1) {
  568. obj.specList = hotlists[i].productAttr; //保存产品属性
  569. obj.productValue = hotlists[i].productValue;
  570. } else {
  571. let a = (page - 1) * limit + i;
  572. obj.specList = hotlists[a].productAttr;
  573. obj.productValue = hotlists[a].productValue;
  574. }
  575. obj.specSelected = []; //初始化默认选择对象
  576. for (let i = 0; i < obj.specList.length; i++) {
  577. // 设置默认数据
  578. let attrValue = obj.specList[i].attr_value[0];
  579. attrValue.check = true;
  580. obj.specSelected.push(attrValue.attr);
  581. }
  582. let str = obj.specSelected.join(',');
  583. let actionPrice = obj.productValue[str].price;
  584. if (page == 1) {
  585. hotlists[i].origin_price = hotlists[i].price;
  586. hotlists[i].price = actionPrice;
  587. } else {
  588. let a = (page - 1) * limit + i;
  589. hotlists[a].origin_price = hotlists[a].price;
  590. hotlists[a].price = actionPrice;
  591. }
  592. if (dataList.list.length == num) {
  593. // 清除倒计时
  594. clearTimeout(out);
  595. ok(hotlists);
  596. }
  597. }
  598. });
  599. },
  600. // 获取首页数据
  601. loadData() {
  602. let obj = this;
  603. let types = 2;
  604. groomList({}, types)
  605. .then(({ data }) => {
  606. let rankingList = data.list.slice(0, 3);
  607. for (let i = 0; i < 3; i++) {
  608. let goodsid = data.list[i].id;
  609. productDetail({}, goodsid).then(({ data }) => {
  610. obj.specList = data.productAttr; //保存产品属性
  611. obj.specSelected = []; //初始化默认选择对象
  612. obj.productValue = data.productValue;
  613. for (let i = 0; i < obj.specList.length; i++) {
  614. // 设置默认数据
  615. let attrValue = obj.specList[i].attr_value[0];
  616. attrValue.check = true;
  617. obj.specSelected.push(attrValue.attr);
  618. }
  619. let str = obj.specSelected.join(',');
  620. let actionPrice = obj.productValue[str].price;
  621. rankingList[i].price = actionPrice;
  622. });
  623. }
  624. setTimeout(function() {
  625. obj.rankingList = rankingList;
  626. }, 500);
  627. })
  628. .catch(e => {
  629. console.log(e);
  630. });
  631. //获取轮播图
  632. loadIndexs({})
  633. .then(({ data }) => {
  634. this.carouselList = data.banner;
  635. })
  636. .catch(e => {
  637. console.log(e);
  638. });
  639. getList({})
  640. .then(({ data }) => {
  641. // obj.tabTitle = data.map(function(s) {
  642. // return s;
  643. // });
  644. obj.tabTitle = data;
  645. let poped = obj.tabTitle.pop();
  646. obj.giftbag = poped.children[0].id;
  647. let newDate = {
  648. id: 0,
  649. cate_name: '首页'
  650. };
  651. obj.tabTitle.unshift(newDate);
  652. let datas = {
  653. sid: obj.giftbag, //分类id
  654. isPink: 1
  655. };
  656. getProducts(datas).then(function(e) {
  657. obj.menusList_one = e.data.slice(0, 10);
  658. obj.menusList_two = e.data.slice(11, 20);
  659. obj.menusList_three = e.data.slice(21, 30);
  660. obj.menusList_four = e.data.slice(31, 40);
  661. obj.menusList_five = e.data.slice(41, 50);
  662. });
  663. // obj.currentId = obj.flist[0].id;
  664. })
  665. .catch(err => {
  666. console.log(err);
  667. });
  668. },
  669. loadDatalist() {
  670. let obj = this;
  671. let type = this.type;
  672. groomList(
  673. {
  674. page: 1,
  675. limit: 10
  676. },
  677. type
  678. )
  679. .then(({ data }) => {
  680. let bargain = data.list.slice(0, 10);
  681. for (let i = 0; i < 10; i++) {
  682. let goodsid = data.list[i].id;
  683. productDetail({}, goodsid).then(({ data }) => {
  684. obj.specList = data.productAttr; //保存产品属性
  685. obj.specSelected = []; //初始化默认选择对象
  686. obj.productValue = data.productValue;
  687. for (let i = 0; i < obj.specList.length; i++) {
  688. // 设置默认数据
  689. let attrValue = obj.specList[i].attr_value[0];
  690. attrValue.check = true;
  691. obj.specSelected.push(attrValue.attr);
  692. }
  693. let str = obj.specSelected.join(',');
  694. let actionPrice = obj.productValue[str].price;
  695. bargain[i].price = actionPrice;
  696. });
  697. }
  698. setTimeout(function() {
  699. obj.bargain = bargain;
  700. }, 500);
  701. })
  702. .catch(e => {
  703. console.log(e);
  704. });
  705. },
  706. liveList() {
  707. let obj = this;
  708. if (obj.number != obj.page) {
  709. getliveList({
  710. page: obj.page,
  711. limit: obj.limit
  712. }).then(res => {
  713. obj.LiveList = obj.LiveList.concat(res.data);
  714. obj.number = obj.page;
  715. if (res.data.length == obj.limit) {
  716. obj.page++;
  717. }
  718. });
  719. } else {
  720. uni.showToast({
  721. title: '已经到底了',
  722. duration: 1000
  723. });
  724. }
  725. },
  726. goLive(item) {
  727. let url = item.kd_url;
  728. wx.navigateToMiniProgram({
  729. appId: 'wx60d176f873ca2d67',
  730. envVersion: 'release',
  731. path: url,
  732. success(res) {
  733. console.log(res);
  734. // 打开成功
  735. }
  736. });
  737. // let url = this.goodsObjact.jump_url
  738. // // #ifdef H5
  739. // if (url.indexOf('http') != -1) {
  740. // window.location.href = url;
  741. // }
  742. // // #endif
  743. // uni.navigateTo({
  744. // url: url
  745. // })
  746. },
  747. navToList(tid) {
  748. // 点击导航跳转到详细页面
  749. uni.navigateTo({
  750. url: '/pages/product/list?fid=' + this.currentId + '&sid=' + this.currentId + '&tid=' + tid
  751. });
  752. },
  753. // 轮播图跳转
  754. bannerNavToUrl(item) {
  755. // #ifdef H5
  756. if (item.wap_url.indexOf('http') != -1) {
  757. window.location.href = item.wap_url;
  758. }
  759. // #endif
  760. //测试数据没有写id,用title代替
  761. uni.navigateTo({
  762. url: item.url,
  763. fail() {
  764. uni.switchTab({
  765. url: item.url
  766. });
  767. }
  768. });
  769. },
  770. //商品推荐详情页
  771. navToDetailPage(item) {
  772. let id = item.id;
  773. //let type = 2;
  774. uni.navigateTo({
  775. url: '/pages/product/product?id=' + id
  776. });
  777. },
  778. //砍价商品推荐详情页
  779. navToDetailPages(item) {
  780. let id = item.product_id;
  781. //let type = 2;
  782. uni.navigateTo({
  783. url: '/pages/product/product?id=' + id
  784. });
  785. },
  786. // 分类滑动进度条
  787. bindscroll(e) {
  788. // 分类框宽度
  789. this.ScollWid = uni.getStorageSync('ScollWid');
  790. // 滑动条底部宽度
  791. this.buttonWidth = uni.getStorageSync('buttonWidth');
  792. // 滑动条宽度
  793. let sliderWidth = (this.ScollWid / e.detail.scrollWidth) * this.buttonWidth;
  794. this.sildeWidth = sliderWidth;
  795. // 滑动条移动距离
  796. let sliderValue = (e.detail.scrollLeft / e.detail.scrollWidth) * this.buttonWidth;
  797. this.videoSilde = sliderValue;
  798. },
  799. // 监听切换事件
  800. listChange(e) {
  801. this.checkid = e.detail.current;
  802. },
  803. changeTab: function(e) {
  804. console.log(e);
  805. },
  806. // 點擊搜索框
  807. clickSearch() {
  808. uni.navigateTo({
  809. url: '/pages/product/search'
  810. });
  811. },
  812. //切换选项卡
  813. toggleTab(index) {
  814. this.tabIndex = index;
  815. },
  816. navTo(url) {
  817. if (!this.hasLogin) {
  818. uni.showModal({
  819. title: '登录',
  820. content: '您未登录,是否马上登陆?',
  821. success: e => {
  822. if (e.confirm) {
  823. interceptor();
  824. }
  825. },
  826. fail: e => {
  827. console.log(e);
  828. }
  829. });
  830. return;
  831. }
  832. uni.navigateTo({
  833. url
  834. });
  835. },
  836. switchTab(url) {
  837. // if (!this.hasLogin) {
  838. // uni.showModal({
  839. // title: '登录',
  840. // content: '您未登录,是否马上登陆?',
  841. // success: e => {
  842. // if (e.confirm) {
  843. // interceptor();
  844. // }
  845. // },
  846. // fail: e => {
  847. // console.log(e);
  848. // }
  849. // });
  850. // return;
  851. // }
  852. uni.switchTab({
  853. url: url
  854. });
  855. },
  856. //滑动切换swiper
  857. tabChange(e) {
  858. //console.log(e);
  859. this.tabIndex = e.detail.current;
  860. },
  861. async loadDataList() {
  862. let obj = this;
  863. getList({})
  864. .then(({ data }) => {
  865. // obj.tabTitle = data.map(function(s) {
  866. // return s;
  867. // });
  868. obj.tabTitle = data;
  869. let newDate = {
  870. id: 0,
  871. cate_name: '首页'
  872. };
  873. obj.tabTitle.unshift(newDate);
  874. // obj.currentId = obj.flist[0].id;
  875. })
  876. .catch(err => {
  877. console.log(err);
  878. });
  879. },
  880. tabtap(item) {
  881. this.currentId = item.id;
  882. this.pages = 1;
  883. this.limits = 6;
  884. this.queryList = [];
  885. this.loadingTypes = 'more';
  886. this.children = item.children.slice(0, 7);
  887. // if (item.id != 0) {
  888. // this.productList();
  889. // }
  890. },
  891. toCategory() {
  892. uni.switchTab({
  893. url: '/pages/category/category'
  894. });
  895. },
  896. change(item) {
  897. // console.log(item)
  898. // let id = item;
  899. // this.checkid = id;
  900. // console.log(this.checkid)
  901. // if (this.checkid == 1) {
  902. // // console.log(1);
  903. // this.detail = this.selected_detail;
  904. // } else if (this.checkid == 2) {
  905. // // console.log(2);
  906. // this.detail = this.new_product;
  907. // } else {
  908. // this.detail = this.cheap_good;
  909. // }
  910. if (item == 3) {
  911. this.checkid = 3;
  912. this.type = 3;
  913. this.loadDatalist();
  914. } else {
  915. this.checkid = 4;
  916. this.type = 4;
  917. this.loadDatalist();
  918. }
  919. }
  920. }
  921. };
  922. </script>
  923. <style lang="scss">
  924. page,
  925. .content {
  926. background: $page-color-base;
  927. height: 100%;
  928. }
  929. .container {
  930. .horizonal-tab {
  931. background-color: #fff;
  932. padding: 0rpx;
  933. }
  934. /* #ifdef MP || APP-PLUS*/
  935. .input-box {
  936. padding: 25rpx;
  937. /* #ifdef APP-PLUS */
  938. margin-top: var(--status-bar-height);
  939. /* #endif */
  940. background-color: #ffffff;
  941. height: 44px;
  942. .iconsearch {
  943. font-size: 50rpx;
  944. }
  945. .input-content {
  946. border-radius: 99rpx;
  947. flex-grow: 1;
  948. padding: 5rpx 30rpx;
  949. background-color: rgba(231, 231, 231, 0.7);
  950. .input {
  951. flex-grow: 1;
  952. input {
  953. font-size: $font-base;
  954. }
  955. }
  956. }
  957. .input-button {
  958. padding-left: 20rpx;
  959. font-size: $font-base;
  960. height: 100%;
  961. }
  962. }
  963. /* #endif */
  964. // 横向tab
  965. .scroll-list {
  966. padding-left: 24rpx;
  967. overflow: hidden;
  968. white-space: nowrap;
  969. .scoll-box {
  970. padding-bottom: 10rpx;
  971. margin-right: 50rpx;
  972. text-align: center;
  973. display: inline-block;
  974. color: #666666;
  975. .scoll-name {
  976. font-size: 30rpx;
  977. }
  978. &.active {
  979. color: #dc4d46;
  980. border-bottom: 4rpx solid #fa2740;
  981. }
  982. }
  983. }
  984. .skincare-content {
  985. .skincare-cate {
  986. width: 100%;
  987. padding-bottom: 20rpx;
  988. background-color: #fff;
  989. display: flex;
  990. flex-wrap: wrap;
  991. .skincare-cate-row {
  992. width: 25%;
  993. }
  994. .skincare-cate-item {
  995. display: flex;
  996. justify-content: center;
  997. justify-items: center;
  998. flex-direction: column;
  999. .img {
  1000. height: 160rpx;
  1001. width: 100%;
  1002. display: flex;
  1003. align-items: center;
  1004. justify-content: center;
  1005. image {
  1006. width: 120rpx;
  1007. height: 120rpx;
  1008. }
  1009. }
  1010. .name {
  1011. font-size: 24rpx;
  1012. color: #666666;
  1013. text-align: center;
  1014. }
  1015. }
  1016. }
  1017. .store-box {
  1018. width: 100%;
  1019. padding: 25rpx 27rpx 40rpx 24rpx;
  1020. .charts-box {
  1021. background: linear-gradient(180deg, rgba(233, 234, 239, 1) 0%, rgba(255, 255, 255, 1) 12%);
  1022. border-radius: 10rpx;
  1023. .charts-header {
  1024. display: flex;
  1025. align-items: center;
  1026. height: 80rpx;
  1027. border-bottom: 2rpx solid #f0f0f0;
  1028. margin-left: 30rpx;
  1029. margin-right: 30rpx;
  1030. image {
  1031. height: 34rpx;
  1032. width: 28rpx;
  1033. margin-top: 6rpx;
  1034. }
  1035. .charts-name {
  1036. font-size: 30rpx;
  1037. color: #333333;
  1038. font-weight: bold;
  1039. margin-left: 10rpx;
  1040. }
  1041. .charts-info {
  1042. color: #dc4d46;
  1043. font-size: 24rpx;
  1044. margin-left: 30rpx;
  1045. }
  1046. }
  1047. .charts-content {
  1048. display: flex;
  1049. padding: 30rpx 10rpx 12rpx;
  1050. justify-content: space-around;
  1051. .goods-box {
  1052. .goods-bg {
  1053. image {
  1054. width: 194rpx;
  1055. height: 194rpx;
  1056. }
  1057. }
  1058. .goods-name {
  1059. width: 180rpx;
  1060. font-size: 26rpx;
  1061. font-weight: 500;
  1062. color: #333333;
  1063. overflow: hidden;
  1064. text-overflow: ellipsis;
  1065. white-space: nowrap;
  1066. }
  1067. .goods-info {
  1068. color: #e93323;
  1069. font-size: 20rpx;
  1070. margin-top: 10rpx;
  1071. height: 30rpx;
  1072. line-height: 30rpx;
  1073. .goods-name {
  1074. border: 1px solid #f8f8f8;
  1075. border-radius: 10rpx;
  1076. }
  1077. }
  1078. .goods-prince {
  1079. font-size: 24rpx;
  1080. color: #fc4141;
  1081. margin-top: 20rpx;
  1082. font-weight: bold;
  1083. text {
  1084. font-size: 30rpx;
  1085. }
  1086. }
  1087. }
  1088. }
  1089. }
  1090. }
  1091. .recommend {
  1092. display: flex;
  1093. padding: 0 30rpx;
  1094. .recommend-list {
  1095. width: 50%;
  1096. font-size: 16px;
  1097. text-align: center;
  1098. color: #000000;
  1099. .re_title {
  1100. font-size: 36rpx;
  1101. }
  1102. .re_name {
  1103. font-size: 24rpx;
  1104. }
  1105. .selected_icon {
  1106. width: 25rpx;
  1107. height: 10rpx;
  1108. margin: 0px auto;
  1109. display: none;
  1110. image {
  1111. width: 100%;
  1112. height: 100%;
  1113. }
  1114. }
  1115. .active {
  1116. display: block;
  1117. }
  1118. .active_color {
  1119. color: #dc4d46;
  1120. }
  1121. }
  1122. }
  1123. .guess-box {
  1124. padding: 0 24rpx;
  1125. .list-box {
  1126. margin-top: 30rpx;
  1127. margin-bottom: 100rpx;
  1128. min-height: 1800rpx;
  1129. .guess-section {
  1130. display: flex;
  1131. flex-wrap: wrap;
  1132. justify-content: space-between;
  1133. navigator {
  1134. width: 49%;
  1135. }
  1136. .guess-section-item {
  1137. height: 490rpx;
  1138. border-radius: 19rpx;
  1139. background-color: #fff;
  1140. margin-bottom: 16rpx;
  1141. .img {
  1142. width: 340rpx;
  1143. height: 340rpx;
  1144. display: flex;
  1145. justify-content: center;
  1146. align-items: center;
  1147. image {
  1148. width: 270rpx;
  1149. height: 270rpx;
  1150. }
  1151. }
  1152. .guess-info {
  1153. padding-left: 21rpx;
  1154. padding-right: 25rpx;
  1155. font-weight: bold;
  1156. .name {
  1157. margin-top: 21rpx;
  1158. font-size: 26rpx;
  1159. width: 270rpx;
  1160. display: inline-block;
  1161. white-space: nowrap;
  1162. overflow: hidden;
  1163. text-overflow: ellipsis;
  1164. }
  1165. .price {
  1166. color: #fc4141;
  1167. font-size: 24rpx;
  1168. margin-top: 16rpx;
  1169. }
  1170. }
  1171. }
  1172. }
  1173. }
  1174. }
  1175. }
  1176. .carousel-section {
  1177. padding: 0;
  1178. .carousel {
  1179. padding: 0;
  1180. height: 320rpx;
  1181. .carousel-item {
  1182. width: 100%;
  1183. height: 100%;
  1184. overflow: hidden;
  1185. image {
  1186. width: 100%;
  1187. height: 100%;
  1188. }
  1189. }
  1190. }
  1191. }
  1192. .cate-section {
  1193. width: 100%;
  1194. background-color: #fff;
  1195. image {
  1196. width: 750rpx;
  1197. height: 205rpx;
  1198. }
  1199. // height: 340rpx;
  1200. //padding-bottom: 10rpx;
  1201. // display: flex;
  1202. // flex-wrap: wrap;
  1203. // padding-left: 22rpx;
  1204. // padding-bottom: 40rpx;
  1205. // 进度条
  1206. // .progressBar-green {
  1207. // width: 130rpx;
  1208. // height: 6rpx;
  1209. // background: #f7f4f8;
  1210. // border-radius: 2rpx;
  1211. // z-index: 10;
  1212. // margin: auto;
  1213. // .left {
  1214. // height: 100%;
  1215. // background: #fc676c;
  1216. // }
  1217. // }
  1218. // .cate-box {
  1219. // width: 100%;
  1220. // .cate-frame {
  1221. // display: flex;
  1222. // flex-wrap: wrap;
  1223. // height: 360rpx;
  1224. // padding: 20rpx 0;
  1225. // .cate-frame-1 {
  1226. // width: 150rpx;
  1227. // margin-bottom: 20rpx;
  1228. // }
  1229. // }
  1230. // }
  1231. // .item-cate {
  1232. // display: flex;
  1233. // flex-direction: column;
  1234. // align-items: center;
  1235. // font-size: 24rpx;
  1236. // color: #666;
  1237. // .image {
  1238. // width: 85rpx;
  1239. // height: 85rpx;
  1240. // overflow: hidden;
  1241. // box-shadow: 0px 3px 15px 1px rgba(153, 153, 153, 0.2);
  1242. // border-radius: 50%;
  1243. // }
  1244. // image {
  1245. // width: 85rpx;
  1246. // height: 85rpx;
  1247. // margin-bottom: 6rpx;
  1248. // }
  1249. // }
  1250. }
  1251. // 火热直播中
  1252. .hot-live {
  1253. display: flex;
  1254. padding-left: 45rpx;
  1255. padding-top: 30rpx;
  1256. align-items: center;
  1257. .title {
  1258. font-size: 30rpx;
  1259. font-weight: bold;
  1260. color: #333333;
  1261. margin-right: 10rpx;
  1262. }
  1263. .hot-living {
  1264. height: 30rpx;
  1265. line-height: 30rpx;
  1266. background-color: #fc4141;
  1267. padding: 0rpx 15rpx;
  1268. border-radius: 20rpx;
  1269. font-size: 20rpx;
  1270. font-weight: 500;
  1271. color: #ffffff;
  1272. }
  1273. }
  1274. // 直播商品
  1275. .live-goods {
  1276. margin-top: 18rpx;
  1277. padding: 0 25rpx;
  1278. .goods {
  1279. width: 100%;
  1280. }
  1281. .live-good-items {
  1282. width: 220rpx;
  1283. height: 270rpx;
  1284. background-color: #ffffff;
  1285. border-radius: 12rpx;
  1286. margin-left: 20rpx;
  1287. &:first-of-type {
  1288. margin-left: 0;
  1289. }
  1290. image {
  1291. width: 220rpx;
  1292. height: 196rpx;
  1293. border-radius: 12rpx 12rpx 0 0;
  1294. }
  1295. .goods-info {
  1296. font-size: 26rpx;
  1297. margin: 0 25rpx;
  1298. color: #333333;
  1299. display: block;
  1300. overflow: hidden;
  1301. text-overflow: ellipsis;
  1302. white-space: nowrap;
  1303. }
  1304. }
  1305. }
  1306. // 限时秒杀
  1307. .seckill-section {
  1308. // overflow: hidden;
  1309. background-color: #fff;
  1310. margin: 30rpx 25rpx;
  1311. border-radius: 8rpx;
  1312. .seckill-header {
  1313. display: flex;
  1314. margin-left: 24rpx;
  1315. padding-top: 20rpx;
  1316. .seckill-titile {
  1317. font-size: 28rpx;
  1318. }
  1319. .seckill-time {
  1320. width: 180rpx;
  1321. height: 28rpx;
  1322. line-height: 28rpx;
  1323. border-radius: 14rpx;
  1324. border: 1px solid #fc4141;
  1325. font-size: 18rpx;
  1326. margin-left: 10rpx;
  1327. margin-top: 4rpx;
  1328. display: flex;
  1329. .seckill-countdown {
  1330. width: 64rpx;
  1331. height: 28rpx;
  1332. line-height: 28rpx;
  1333. text-align: center;
  1334. border-radius: 14rpx;
  1335. background-color: #fc4141;
  1336. color: #fff;
  1337. }
  1338. .countdown {
  1339. color: #fc4141;
  1340. text-align: center;
  1341. margin-left: 4rpx;
  1342. }
  1343. }
  1344. }
  1345. .seckill-goods {
  1346. display: flex;
  1347. justify-content: space-around;
  1348. margin-top: 14rpx;
  1349. text-align: center;
  1350. .seckill-goods-item {
  1351. display: flex;
  1352. flex-direction: column;
  1353. image {
  1354. width: 128rpx;
  1355. height: 128rpx;
  1356. }
  1357. .new-price {
  1358. font-size: 28rpx;
  1359. margin-top: 8rpx;
  1360. font-weight: bold;
  1361. }
  1362. .old-price {
  1363. font-size: 20rpx;
  1364. color: #999999;
  1365. text-decoration: line-through;
  1366. }
  1367. }
  1368. }
  1369. }
  1370. // 热销商品
  1371. .hot-goods {
  1372. margin: 0 25rpx;
  1373. padding: 5rpx 25rpx 30rpx 25rpx;
  1374. background-color: #fff;
  1375. border-radius: 10rpx;
  1376. .hot-headers {
  1377. margin: 25rpx 0;
  1378. width: 100%;
  1379. display: flex;
  1380. .img {
  1381. width: 32rpx;
  1382. height: 32rpx;
  1383. margin-right: 10rpx;
  1384. }
  1385. .hot-title {
  1386. font-size: 30rpx;
  1387. margin-right: 15rpx;
  1388. }
  1389. .more {
  1390. line-height: 1;
  1391. padding: 5rpx 10rpx 5rpx 15rpx;
  1392. text-align: center;
  1393. font-size: 20rpx;
  1394. border-radius: 15rpx;
  1395. color: #ffffff;
  1396. background: linear-gradient(90deg, rgba(250, 52, 38, 1) 0%, rgba(249, 30, 83, 1) 100%);
  1397. image {
  1398. width: 20rpx;
  1399. height: 20rpx;
  1400. }
  1401. }
  1402. }
  1403. .hot-lists {
  1404. line-height: 1;
  1405. display: flex;
  1406. .hot-produce {
  1407. width: 100%;
  1408. height: 260rpx;
  1409. border-top: 1px solid #f0f0f0;
  1410. display: flex;
  1411. padding-top: 28rpx;
  1412. .produce-image {
  1413. width: 200rpx;
  1414. height: 200rpx;
  1415. image {
  1416. width: 200rpx;
  1417. height: 200rpx;
  1418. border: 1px solid #f0f0f0;
  1419. }
  1420. }
  1421. .produce-content {
  1422. // flex-direction: column;
  1423. margin-left: 30rpx;
  1424. height: 200rpx;
  1425. position: relative;
  1426. width: calc(100% - 200rpx - 30rpx);
  1427. .produce-name {
  1428. font-size: 28rpx;
  1429. font-weight: bold;
  1430. line-height: 35rpx;
  1431. color: #343434;
  1432. }
  1433. .produce-info {
  1434. font-size: 20rpx;
  1435. margin-top: 25rpx;
  1436. }
  1437. .produce-price {
  1438. display: flex;
  1439. align-items: flex-end;
  1440. color: #ff383e;
  1441. font-size: 24rpx;
  1442. margin-top: 70rpx;
  1443. font-weight: bold;
  1444. text {
  1445. font-size: 36rpx;
  1446. }
  1447. .produce-price-1 {
  1448. font-size: 22rpx;
  1449. font-weight: 500;
  1450. text-decoration: line-through;
  1451. color: rgba(170, 170, 170, 1);
  1452. margin-left: 20rpx;
  1453. }
  1454. }
  1455. .produce-price1 {
  1456. height: 100%;
  1457. letter-spacing: 3rpx;
  1458. color: #ff383e;
  1459. font-size: 24rpx;
  1460. font-weight: bold;
  1461. .produce-center {
  1462. width: 100%;
  1463. position: absolute;
  1464. bottom: 0;
  1465. display: flex;
  1466. justify-content: space-between;
  1467. align-items: center;
  1468. .kanjia_word {
  1469. .word-1 {
  1470. font-size: 22rpx;
  1471. color: #666666;
  1472. }
  1473. .word-2 {
  1474. font-size: 28rpx;
  1475. color: #ff383e;
  1476. margin-top: 10rpx;
  1477. }
  1478. }
  1479. .kanjia_button {
  1480. height: 50rpx;
  1481. width: 150rpx;
  1482. border-radius: 25rpx;
  1483. font-size: 26rpx;
  1484. font-weight: 500;
  1485. color: #ff383e;
  1486. border: 1px solid rgba(255, 56, 62, 1);
  1487. }
  1488. }
  1489. }
  1490. }
  1491. }
  1492. }
  1493. }
  1494. }
  1495. </style>