index.vue 30 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445
  1. <template>
  2. <view class="container">
  3. <view class="carousel-section">
  4. <view class="search flex">
  5. <!-- <image src="../../static/icon/img01.png" class="address"></image> -->
  6. <view class="shop-name clamp">{{city}}</view>
  7. <view class="input-box flex" @click.stop="clickSearch">
  8. <view class=" input-content flex">
  9. <view class="iconfont iconsearch"></view>
  10. <view class="input"><input type="text" disabled value="输入关键字搜索" /></view>
  11. </view>
  12. </view>
  13. </view>
  14. <swiper class="carousel" autoplay="true" duration="400" interval="5000" @change="swiperChange"
  15. :indicator-dots="true" indicator-active-color="#FFFFFF">
  16. <swiper-item v-for="(item, index) in carouselList" :key="index" class="carousel-item">
  17. <image :src="item.pic" mode="aspectFill" @click="bannerNavToUrl(item)"></image>
  18. </swiper-item>
  19. </swiper>
  20. </view>
  21. <swiper :interval="3000" :duration="1000" style="height: 300rpx;background: #fff;">
  22. <swiper-item v-for=" (shopitem,shopindex) in shopList" :key="shopindex">
  23. <view class="shop-list flex" style="padding-top: 40rpx;">
  24. <view class="shop-item flex" v-for="(item,index) in shopitem"
  25. @click="navto('/pages/shop/shopList?id=' + item.id)">
  26. <image :src="item.pic" mode="" class="shop-img"></image>
  27. <view class="shop-name">
  28. {{item.cate_name}}
  29. </view>
  30. </view>
  31. </view>
  32. </swiper-item>
  33. </swiper>
  34. <!-- <view class="shop-list flex" style="padding-top: 40rpx;">
  35. <view class="shop-item flex" v-for="(item,index) in shopList"
  36. @click="navto('/pages/shop/shopList?id=' + item.id)">
  37. <image :src="item.pic" mode="" class="shop-img"></image>
  38. <view class="shop-name">
  39. {{item.cate_name}}
  40. </view>
  41. </view>
  42. </view> -->
  43. <!-- 商品列表 -->
  44. <view class="" style="background: #fff;margin-top: 20rpx;padding-bottom: 20rpx;">
  45. <view class="title-wrapper flex">
  46. <image src="../../static/icon/shop-logo.png" mode=""></image>
  47. <view class="">礼包商品</view>
  48. <view class="title-b">超值体验</view>
  49. </view>
  50. <!-- <view class="gift-info">
  51. <view class="" style="padding-top: 20rpx;font-weight: bold;font-size: 32rpx;">
  52. 最强商家联盟
  53. </view>
  54. <view class="">
  55. 买到就是赚到
  56. </view>
  57. </view>
  58. <view class="gift-good-list p-r">
  59. <view class="gift-list p-a flex f-j-s">
  60. <view class="gift-item flex f-d-c f-j-c" v-for="item in goodList"
  61. @click="navto('/pages/product/product?id=' + item.id)">
  62. <image :src="item.image" mode=""></image>
  63. <view class="gift-name clamp">
  64. {{item.store_name}}
  65. </view>
  66. <view class="gift-price">
  67. ¥{{item.price}}
  68. </view>
  69. </view>
  70. </view>
  71. </view> -->
  72. </view>
  73. <view class="product-box">
  74. <view class="hotgoods">
  75. <view class="hotgoods-item" v-for="item in goodList" :key="item.id"
  76. @click="navto('/pages/product/product?id=' + item.id)">
  77. <view class="image-wrapper">
  78. <!-- <image class="image-bg" src="../../static/img/libao-bg.png" mode=""></image> -->
  79. <image class="image" :src="item.image" mode="scaleToFill"></image>
  80. </view>
  81. <view class="title clamp2">{{ item.store_name }}</view>
  82. <view class="hot-price">
  83. <!-- <view class="hotPrice-box">会员价</view> -->
  84. <view class="price">
  85. <text class="font-size-sm">¥</text>
  86. {{ item.price * 1 }}
  87. </view>
  88. <view class="yuanPrice">
  89. 已售:{{item.sales}}
  90. </view>
  91. <!-- <view class="yuanPrice">{{ item.ot_price }}</view> -->
  92. </view>
  93. </view>
  94. </view>
  95. </view>
  96. <!-- 门店列表 -->
  97. <view class="" style="height: 20rpx;"></view>
  98. <view class="shop">
  99. <view class="shop-title">
  100. <view class="shop-item" @click="PXType = 0">
  101. <view class="sitem-font" :class="{'choose': PXType == 0}">智能排序</view>
  102. <image class="jt-down" src="../../static/index/index06.png" mode=""></image>
  103. </view>
  104. <view class="shop-item" @click="PXType = 1">
  105. <view class="sitem-font" :class="{'choose': PXType == 1}">距离排序</view>
  106. <image class="jt-down" src="../../static/index/index06.png" mode=""></image>
  107. </view>
  108. <view class="shop-item" @click="PXType = 2">
  109. <view class="sitem-font" :class="{'choose': PXType == 2}">销量排序</view>
  110. <image class="jt-down" src="../../static/index/index06.png" mode=""></image>
  111. </view>
  112. </view>
  113. </view>
  114. <view class="" style="height: 20rpx;"></view>
  115. <view class="djq-wrap flex f-ai-s" v-for="storeitem in storeList"
  116. @click="navto('/pages/shop/shopDetail?id=' + storeitem.id )">
  117. <image :src="storeitem.image" mode="" class="djq-img"></image>
  118. <view class="djq-right pl20">
  119. <view class="djq-tit flex f-j-sb f-ai-s">
  120. <view class="djq-name clamp">
  121. {{storeitem.name}}
  122. </view>
  123. <view class="djq-dis">
  124. <image src="../../static/index/index10.png" mode=""></image>
  125. 距离{{storeitem.range*1}}KM
  126. </view>
  127. </view>
  128. <view class="flex f-d-c f-j-sb f-ai-s fg1" style="height: 110rpx;">
  129. <view class="djq-dz clamp2">
  130. {{storeitem.detailed_address}}
  131. </view>
  132. <view class="djq-hd flex f-j-sb">
  133. <view class="buy-info">
  134. <!-- {{storeitem.count}}人已购买 -->
  135. </view>
  136. <view class="hd-btn">
  137. <image src="../../static/icon/call.png" mode="" style="margin-right: 15rpx;"
  138. @click.stop="makeCall(storeitem.phone)"></image>
  139. <image src="../../static/icon/dh.png" mode=""
  140. @click.stop="toGaodeMap(storeitem.latitude,storeitem.longitude,storeitem.name)">
  141. </image>
  142. </view>
  143. </view>
  144. </view>
  145. <view class="" style="padding: 10rpx 0 0 0;" v-if="storeitem.coupon && storeitem.coupon.length > 0">
  146. <view class="left-btm flex f-j-s" v-for="qitem in storeitem.coupon">
  147. <view class="j-logo">
  148. </view>
  149. <view class="j-price">
  150. <text>¥</text>{{qitem.price}}
  151. </view>
  152. <view class="j-zk">
  153. {{(((qitem.price*10)/(qitem.ot_price*1)).toFixed(1))}}折
  154. </view>
  155. <view class="j-name">
  156. {{qitem.store_name}}
  157. </view>
  158. </view>
  159. </view>
  160. </view>
  161. </view>
  162. </view>
  163. </template>
  164. <script>
  165. import {
  166. store_cate,
  167. getStoreList,
  168. getCity
  169. } from '@/api/shop.js'
  170. import {
  171. lookSubpoints,
  172. lookOneself
  173. } from '../../api/user.js';
  174. import seckill from '../../components/seckill/seckill.vue';
  175. import {
  176. loadIndexs,
  177. getVip
  178. } from '@/api/index.js';
  179. import {
  180. getUserInfo,
  181. spread
  182. } from '@/api/user.js';
  183. import {
  184. setCoupons
  185. } from '@/api/functionalUnit.js';
  186. import {
  187. getBargainList,
  188. getProducts
  189. } from '@/api/product.js';
  190. import {
  191. interceptor
  192. } from '@/utils/loginUtils';
  193. import {
  194. mapState,
  195. mapMutations
  196. } from 'vuex';
  197. import {
  198. tabbar
  199. } from '@/utils/tabbar.js';
  200. // #ifdef H5
  201. import {
  202. weixindata,
  203. shareLoad
  204. } from '@/utils/wxAuthorized';
  205. // #endif
  206. export default {
  207. components: {
  208. seckill
  209. },
  210. data() {
  211. return {
  212. city: '台州市',
  213. PXType: 0, //店铺排序规则 0-》智能排序 1-》距离排序 2-》销量排序
  214. storeList: [],
  215. tabbar: tabbar,
  216. current: 0,
  217. shareShow: false, //分享海报
  218. pageProportion: 0, //保存页面基于750宽度的比例
  219. swiperHeight: 0,
  220. checkid: 0,
  221. titleNViewBackground: '',
  222. swiperCurrent: 0,
  223. swiperLength: 0,
  224. carouselList: [], //轮播列表
  225. bastList: [], //会员礼包
  226. page: 1,
  227. limit: 5,
  228. firstList: [],
  229. goodList: [],
  230. shopList: []
  231. };
  232. },
  233. computed: {
  234. ...mapState(['loginInterceptor', 'baseURL', 'latitude', 'longitude', 'weichatObj']),
  235. ...mapState('user', ['hasLogin', 'userInfo'])
  236. },
  237. onLoad: function(option) {
  238. this.getaddress();
  239. // #ifdef MP
  240. if (option.scene) {
  241. // 存储小程序邀请人
  242. uni.setStorage({
  243. key: 'spread_code',
  244. data: option.scene
  245. });
  246. }
  247. // #endif
  248. // #ifdef H5
  249. this.IndexShare();
  250. //#endif
  251. },
  252. watch: {
  253. PXType(val, old) {
  254. this.getStoreList()
  255. }
  256. },
  257. onShow: function() {
  258. this.getGoodList()
  259. this.loadData();
  260. // this.getStoreList()
  261. // this.getCity()
  262. // this.getBargainList();
  263. this.getStoreCate()
  264. },
  265. //下拉刷新
  266. onPullDownRefresh() {
  267. this.loadData();
  268. },
  269. // #ifndef MP
  270. // 监听导航栏输入框点击事件
  271. onNavigationBarSearchInputClicked(e) {
  272. //跳转到搜索页面
  273. this.clickSearch();
  274. },
  275. //点击导航栏 buttons 时触发
  276. onNavigationBarButtonTap(e) {
  277. const index = e.index;
  278. if (index === 0) {
  279. this.$api.msg('点击了扫描');
  280. } else if (index === 1) {
  281. // #ifdef APP-PLUS
  282. const pages = getCurrentPages();
  283. const page = pages[pages.length - 1];
  284. const currentWebview = page.$getAppWebview();
  285. currentWebview.hideTitleNViewButtonRedDot({
  286. index
  287. });
  288. // #endif
  289. uni.navigateTo({
  290. url: '/pages/user/notice'
  291. });
  292. }
  293. },
  294. // #endif
  295. methods: {
  296. ...mapMutations(['setLat', 'setLon']),
  297. // 计算距离
  298. space(lat1, lng1, lat2, lng2) {
  299. console.log(lat1, lng1, lat2, lng2);
  300. var radLat1 = (lat1 * Math.PI) / 180.0;
  301. var radLat2 = (lat2 * Math.PI) / 180.0;
  302. var a = radLat1 - radLat2;
  303. var b = (lng1 * Math.PI) / 180.0 - (lng2 * Math.PI) / 180.0;
  304. var s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) + Math.cos(radLat1) * Math.cos(radLat2) * Math
  305. .pow(Math.sin(b / 2), 2)));
  306. s = s * 6378.137;
  307. s = Math.round(s * 10000) / 10000;
  308. // return s * 1000; // 单位米
  309. return s //单位km
  310. },
  311. // 拨打电话
  312. makeCall(phone) {
  313. uni.makePhoneCall({
  314. phoneNumber: phone //仅为示例
  315. });
  316. },
  317. // 导航
  318. dh(item) {
  319. // #ifdef H5
  320. weixindata().then(wxOjb => {
  321. console.log(wxOjb, '获取微信');
  322. wxOjb.openLocation({
  323. latitude: item.latitude, // 纬度,浮点数,范围为90 ~ -90
  324. longitude: item.longitude, // 经度,浮点数,范围为180 ~ -180。
  325. name: item.name, // 位置名
  326. address: item.detailed_address, // 地址详情说明
  327. scale: 28, // 地图缩放级别,整型值,范围从1~28。默认为最大
  328. infoUrl: '' // 在查看位置界面底部显示的超链接,可点击跳转
  329. });
  330. });
  331. // #endif
  332. },
  333. // 获取商店列表
  334. getStoreList() {
  335. let obj = this
  336. //getStoreList( cate_id=1
  337. getStoreList({
  338. latitude: obj.latitude,
  339. longitude: obj.longitude,
  340. sales: obj.PXType == 2 ? 1 : 0
  341. }).then(res => {
  342. console.log(res)
  343. obj.storeList = res.data.list
  344. })
  345. },
  346. // 获取店铺分类
  347. getStoreCate() {
  348. let obj = this
  349. store_cate().then(res => {
  350. console.log(res)
  351. obj.shopList = obj.chunkArr(res.data, 10)
  352. console.log(obj.shopList, 'this.shopList+++++++++++++')
  353. })
  354. },
  355. getLocation() {
  356. uni.getLocation({
  357. type: 'gcj02',
  358. success(e) {
  359. console.log(e, 'dingwei')
  360. }
  361. })
  362. },
  363. getGoodList() {
  364. let obj = this
  365. getProducts({
  366. page: 1,
  367. limit: 50,
  368. cid: 1
  369. }).then(res => {
  370. console.log(res, 'libao')
  371. obj.goodList = res.data.filter(item => {
  372. return item.price != 2999
  373. })
  374. })
  375. },
  376. navto(url) {
  377. uni.navigateTo({
  378. url,
  379. fail() {
  380. uni.switchTab({
  381. url
  382. })
  383. }
  384. })
  385. },
  386. // #ifdef H5
  387. IndexShare() {
  388. let obj = this;
  389. let pages = getCurrentPages();
  390. // 获取当前页面
  391. let page = pages[pages.length - 1];
  392. let path = '#/' + page.route + '?';
  393. // 保存传值
  394. for (let i in page.options) {
  395. path += i + '=' + page.options[i] + '&';
  396. }
  397. console.log(obj.Path);
  398. // 保存邀请人
  399. path += 'spread=' + this.userInfo.uid;
  400. let data = {
  401. link: this.baseURL + '/index/' + path,
  402. title: this.userInfo.nickname + '邀请您进入想亮',
  403. desc: '欢迎加入想亮',
  404. imgUrl: this.baseURL + '/index/static/img/logo.jpg'
  405. };
  406. console.log(data, '分享数据');
  407. shareLoad(data);
  408. },
  409. // #endif
  410. getaddress() {
  411. console.log('dizhi+++++++++++');
  412. let obj = this;
  413. uni.getLocation({
  414. type: 'gcj02',
  415. success: res => {
  416. console.log(res, 123456);
  417. obj.setLat(res.latitude);
  418. obj.setLon(res.longitude);
  419. obj.getStoreList()
  420. obj.getCity()
  421. },
  422. fail: err => {
  423. console.log(err, 'shi+++++++++++++++');
  424. openMap().then(e => {
  425. this.getaddress();
  426. });
  427. }
  428. });
  429. },
  430. navTo(url) {
  431. if (url == '') {
  432. this.$api.msg('暂未开通,敬请期待');
  433. } else {
  434. uni.navigateTo({
  435. url
  436. });
  437. }
  438. },
  439. // 點擊搜索框
  440. clickSearch() {
  441. uni.navigateTo({
  442. url: '/pages/shop/shopList?id=0'
  443. });
  444. },
  445. // 监听图片加载完成
  446. onImageError(key, index) {
  447. this[key][index].image = '/static/error/errorImage.jpg';
  448. },
  449. // 请求载入数据
  450. async loadData() {
  451. loadIndexs({})
  452. .then(({
  453. data
  454. }) => {
  455. let goods = data.info;
  456. console.log(goods, '商品信息');
  457. this.carouselList = data.banner;
  458. this.swiperLength = this.carouselList.length;
  459. this.bastList = data.giftInfo; //会员礼包
  460. data.info.firstList.forEach(e => {
  461. e.isVip = e.store_type ? "3" : "0"
  462. })
  463. this.firstList = data.info.firstList //首页商品
  464. uni.stopPullDownRefresh();
  465. })
  466. .catch(e => {
  467. uni.stopPullDownRefresh();
  468. });
  469. },
  470. //轮播图切换修改背景色
  471. swiperChange(e) {
  472. const index = e.detail.current;
  473. this.swiperCurrent = index;
  474. this.titleNViewBackground = this.carouselList[index].background;
  475. },
  476. // 轮播图跳转
  477. bannerNavToUrl(item) {
  478. // #ifdef H5
  479. console.log(item.wap_url.indexOf('http'), 'banner');
  480. if (item.wap_url.indexOf('http') >= 0) {
  481. window.location.href = item.wap_url;
  482. }
  483. // #endif
  484. //测试数据没有写id,用title代替
  485. uni.navigateTo({
  486. url: item.wap_url
  487. });
  488. },
  489. // 根据指定个数分割数组
  490. chunkArr(arr, size) {
  491. console.log(arr, 'arr+++++')
  492. //判断如果不是数组(就没有length),或者size没有传值,size小于1,就返回空数组
  493. if (!arr.length || !size || size < 1) return []
  494. let [start, end, result] = [null, null, []]
  495. for (let i = 0; i < Math.ceil(arr.length / size); i++) {
  496. start = i * size
  497. end = start + size
  498. result.push(arr.slice(start, end))
  499. }
  500. return result
  501. },
  502. getCity() {
  503. let obj = this
  504. getCity({
  505. lat: obj.latitude,
  506. lng: obj.longitude
  507. }).then(res => {
  508. console.log(res, '逆解析结果')
  509. obj.city = res.data.city
  510. })
  511. },
  512. // 调用高德
  513. toGaodeMap(latitude, longitude, address) {
  514. window.location.href = `https://uri.amap.com/marker?position=${longitude},${latitude}&name=${address}`;
  515. },
  516. }
  517. };
  518. </script>
  519. <style lang="scss">
  520. page {
  521. background: #f8f6f9;
  522. }
  523. .carousel-section {
  524. position: relative;
  525. // padding-top: 10px;
  526. .bg {
  527. position: absolute;
  528. top: 0;
  529. left: 0;
  530. width: 750rpx;
  531. height: 378rpx;
  532. image {
  533. width: 100%;
  534. height: 100%;
  535. }
  536. }
  537. .titleNview-placing {
  538. height: var(--status-bar-height);
  539. box-sizing: content-box;
  540. }
  541. .search {
  542. justify-content: space-between;
  543. padding: 10rpx 32rpx 20rpx;
  544. align-items: center;
  545. background-color: #fff;
  546. .address {
  547. width: 32rpx;
  548. height: 38rpx;
  549. }
  550. .shop-name {
  551. height: 38rpx;
  552. position: relative;
  553. top: -4rpx;
  554. z-index: 100;
  555. font-size: 30rpx;
  556. font-family: PingFang SC;
  557. font-weight: 500;
  558. padding-left: 10rpx;
  559. }
  560. .shop-jt {
  561. margin-left: 8rpx;
  562. width: 16rpx;
  563. height: 10rpx;
  564. }
  565. .input-box {
  566. margin-left: 10rpx;
  567. position: relative;
  568. z-index: 99;
  569. width: 550rpx;
  570. height: 60rpx;
  571. background: #EEEEEE;
  572. border-radius: 30rpx;
  573. .input-content {
  574. position: relative;
  575. z-index: 11;
  576. border-radius: 99rpx;
  577. flex-grow: 1;
  578. padding: 5rpx 30rpx;
  579. background: #EEEEEE;
  580. .iconsearch {
  581. font-size: 50rpx;
  582. color: #CBCBCB;
  583. }
  584. .input {
  585. margin-left: 19rpx;
  586. flex-grow: 1;
  587. color: #CBCBCB;
  588. input {
  589. font-size: 28rpx;
  590. color: #CBCBCB;
  591. }
  592. }
  593. }
  594. .input-button {
  595. padding-left: 20rpx;
  596. font-size: $font-base;
  597. height: 100%;
  598. }
  599. }
  600. }
  601. }
  602. .carousel {
  603. position: relative;
  604. z-index: 3;
  605. width: 100%;
  606. height: 360rpx;
  607. background-color: #fff;
  608. .carousel-item {
  609. width: 100%;
  610. height: 100%;
  611. padding: 0 28rpx;
  612. overflow: hidden;
  613. }
  614. image {
  615. width: 100%;
  616. height: 100%;
  617. border-radius: $border-radius-sm;
  618. }
  619. }
  620. .navbar {
  621. position: relative;
  622. z-index: 2;
  623. padding: 0 50rpx;
  624. margin-top: -200rpx;
  625. width: 750rpx;
  626. height: 420rpx;
  627. background: #ffffff;
  628. border-radius: 40rpx;
  629. .navbar-box {
  630. padding-top: 250rpx;
  631. .navbar-item {
  632. display: flex;
  633. flex-direction: column;
  634. align-items: center;
  635. width: 20%;
  636. .nitem-image {
  637. width: 90rpx;
  638. height: 90rpx;
  639. }
  640. .nitem-font {
  641. margin-top: 22rpx;
  642. font-size: 26rpx;
  643. font-family: PingFang SC;
  644. font-weight: 500;
  645. color: #000000;
  646. }
  647. }
  648. }
  649. }
  650. .jx {
  651. background: #fff;
  652. width: 750rpx;
  653. }
  654. .jx-box {
  655. background: #fff;
  656. display: flex;
  657. flex-direction: column;
  658. align-items: center;
  659. width: 750rpx;
  660. .jx-box-title {
  661. margin: 50rpx 0;
  662. width: 610rpx;
  663. height: 30rpx;
  664. image {
  665. width: 100%;
  666. height: 100%;
  667. }
  668. }
  669. .jx-box-img {
  670. width: 750rpx;
  671. height: 220rpx;
  672. image {
  673. width: 100%;
  674. height: 100%;
  675. }
  676. }
  677. }
  678. .cai {
  679. display: flex;
  680. justify-content: center;
  681. align-items: center;
  682. padding-bottom: 20rpx;
  683. font-size: 28rpx;
  684. font-weight: 500;
  685. color: #999999;
  686. }
  687. .jx-box-content {
  688. display: flex;
  689. .content-left {
  690. margin: 20rpx 15rpx;
  691. width: 236rpx;
  692. height: 236rpx;
  693. background: #E2E2E2;
  694. border-radius: 10rpx;
  695. image {
  696. width: 100%;
  697. height: 100%;
  698. }
  699. }
  700. .content-right {
  701. display: flex;
  702. flex-direction: column;
  703. justify-content: space-around;
  704. .shop-name {
  705. width: 382rpx;
  706. font-size: 32rpx;
  707. font-weight: bold;
  708. color: #333333;
  709. overflow: hidden;
  710. text-overflow: ellipsis;
  711. display: -webkit-box;
  712. -webkit-box-orient: vertical;
  713. -webkit-line-clamp: 2;
  714. }
  715. .shop-content {
  716. width: 455rpx;
  717. display: flex;
  718. justify-content: space-between;
  719. .shop-content-left {
  720. display: flex;
  721. flex-direction: column;
  722. .price-box {
  723. display: flex;
  724. align-items: center;
  725. .yuan-price {
  726. font-size: 26rpx;
  727. font-weight: 500;
  728. text-decoration: line-through;
  729. color: #999999;
  730. }
  731. image {
  732. margin: 0 10rpx;
  733. width: 16rpx;
  734. height: 18rpx;
  735. }
  736. .j-price {
  737. font-size: 24rpx;
  738. font-weight: bold;
  739. color: #B59467;
  740. }
  741. }
  742. .price-x {
  743. font-size: 36rpx;
  744. font-weight: bold;
  745. color: #FF4C4C;
  746. }
  747. }
  748. .shop-content-right {
  749. margin-top: 20rpx;
  750. align-items: center;
  751. text-align: center;
  752. width: 137rpx;
  753. height: 52rpx;
  754. font-size: 26rpx;
  755. font-weight: 500;
  756. color: #F8DABA;
  757. background: #303030;
  758. border-radius: 26rpx;
  759. line-height: 52rpx;
  760. }
  761. }
  762. }
  763. }
  764. .shop {
  765. margin-top: 20rpx;
  766. background: #ffffff;
  767. padding: 0 12rpx;
  768. .shop-title {
  769. padding: 30rpx 0 20rpx;
  770. display: flex;
  771. align-items: center;
  772. border-bottom: 1px solid #e3e6e7;
  773. .shop-item {
  774. width: 25%;
  775. display: flex;
  776. align-items: center;
  777. justify-content: center;
  778. .sitem-font {
  779. font-size: 26rpx;
  780. font-family: PingFang SC;
  781. font-weight: bold;
  782. color: #333333;
  783. }
  784. .choose {
  785. color: #ff4c4c;
  786. }
  787. .jt-down {
  788. width: 10rpx;
  789. height: 8rpx;
  790. margin-left: 12rpx;
  791. }
  792. }
  793. }
  794. }
  795. .shop-main {
  796. padding: 32rpx 18rpx 0 12rpx;
  797. align-items: flex-start;
  798. justify-content: flex-start;
  799. .main-left {
  800. width: 180rpx;
  801. height: 180rpx;
  802. border-radius: 10rpx;
  803. }
  804. .main-right {
  805. width: 500rpx;
  806. justify-content: space-between;
  807. align-items: flex-start;
  808. margin-left: 20rpx;
  809. padding: 13rpx 0 35rpx;
  810. border-bottom: 1px solid #eaeced;
  811. .shopm-info {
  812. max-width: 60%;
  813. line-height: 1;
  814. .shopm-title {
  815. display: flex;
  816. justify-content: flex-start;
  817. .shopmt-font {
  818. font-size: 34rpx;
  819. font-family: PingFang SC;
  820. font-weight: bold;
  821. color: #333333;
  822. }
  823. .shopmt-good {
  824. margin-left: 6rpx;
  825. width: 30rpx;
  826. height: 30rpx;
  827. border: 1px solid #ff4c4c;
  828. border-radius: 5rpx;
  829. font-size: 20rpx;
  830. font-family: PingFang SC;
  831. font-weight: 500;
  832. color: #ff4c4c;
  833. text-align: center;
  834. line-height: 30rpx;
  835. }
  836. }
  837. .address {
  838. margin-top: 16rpx;
  839. font-size: 24rpx;
  840. font-family: PingFang SC;
  841. font-weight: 500;
  842. color: #666666;
  843. }
  844. .shopmt-tip {
  845. position: relative;
  846. display: inline-block;
  847. flex-grow: 0;
  848. margin-top: 52rpx;
  849. padding: 8rpx;
  850. background: #fcf3f0;
  851. border-radius: 16rpx 16rpx 16rpx 0px;
  852. font-size: 20rpx;
  853. font-family: PingFang SC;
  854. font-weight: 500;
  855. color: #ff440d;
  856. }
  857. }
  858. .right {
  859. height: 100%;
  860. margin-top: 5rpx;
  861. display: flex;
  862. flex-direction: column;
  863. .mright-top {
  864. display: flex;
  865. justify-content: flex-end;
  866. align-items: center;
  867. .mrt-image {
  868. width: 20rpx;
  869. height: 28rpx;
  870. }
  871. .mrt-font {
  872. margin-left: 8rpx;
  873. font-size: 22rpx;
  874. font-family: PingFang SC;
  875. font-weight: 500;
  876. color: #666666;
  877. }
  878. }
  879. .mright-bottom {
  880. margin-top: 80rpx;
  881. display: flex;
  882. justify-content: flex-end;
  883. .mrb-item {
  884. width: 46rpx;
  885. height: 46rpx;
  886. margin-left: 14rpx;
  887. }
  888. }
  889. }
  890. }
  891. }
  892. .good-list {
  893. width: 750rpx;
  894. background: linear-gradient(0deg, #FFFFFF, #F8F8F8);
  895. padding: 0 30rpx 30rpx;
  896. .good {
  897. width: 690rpx;
  898. height: 276rpx;
  899. background: #FFFFFF;
  900. box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
  901. border-radius: 10rpx;
  902. margin: auto;
  903. padding: 20rpx 15rpx;
  904. margin-bottom: 20rpx;
  905. &:last-of-type {
  906. margin-bottom: 0rpx;
  907. }
  908. .good-img {
  909. flex-shrink: 0;
  910. width: 236rpx;
  911. height: 236rpx;
  912. border-radius: 10rpx;
  913. margin-right: 22rpx;
  914. image {
  915. width: 236rpx;
  916. height: 236rpx;
  917. border-radius: 10rpx;
  918. }
  919. }
  920. .good-info {
  921. flex-grow: 1;
  922. height: 100%;
  923. flex-direction: column;
  924. justify-content: space-between;
  925. align-items: flex-start;
  926. .good-name {
  927. font-size: 32rpx;
  928. font-weight: bold;
  929. padding-top: 10rpx;
  930. color: #333333;
  931. }
  932. .good-price {
  933. width: 100%;
  934. image {
  935. width: 14rpx;
  936. margin: 0 6rpx 0 10rpx;
  937. }
  938. .old-price {
  939. .old-left {
  940. font-size: 26rpx;
  941. font-weight: 500;
  942. text-decoration: line-through;
  943. color: #999999;
  944. }
  945. .old-right {
  946. font-size: 24rpx;
  947. font-weight: bold;
  948. color: #B59467;
  949. }
  950. }
  951. .new-price {
  952. width: 100%;
  953. font-size: 36rpx;
  954. font-weight: bold;
  955. color: #FF4C4C;
  956. justify-content: space-between;
  957. .good-tip {
  958. display: inline-block;
  959. padding: 0 20rpx 0 17rpx;
  960. min-width: 160rpx;
  961. text-align: center;
  962. line-height: 40rpx;
  963. background: #303030;
  964. font-size: 24rpx;
  965. font-weight: 500;
  966. color: #F8DABA;
  967. border-radius: 10rpx;
  968. position: relative;
  969. &::before {
  970. content: '';
  971. display: inline-block;
  972. height: 17rpx;
  973. width: 17rpx;
  974. background-color: #fff;
  975. border-radius: 50%;
  976. position: absolute;
  977. top: 0;
  978. bottom: 0;
  979. left: -9rpx;
  980. margin: auto;
  981. }
  982. &::after {
  983. content: '';
  984. display: inline-block;
  985. height: 17rpx;
  986. width: 17rpx;
  987. background-color: #fff;
  988. border-radius: 50%;
  989. position: absolute;
  990. top: 0;
  991. bottom: 0;
  992. right: -9rpx;
  993. margin: auto;
  994. }
  995. }
  996. }
  997. }
  998. }
  999. }
  1000. }
  1001. .title-wrapper {
  1002. padding-left: 20rpx;
  1003. justify-content: flex-start;
  1004. align-items: center;
  1005. height: 86rpx;
  1006. line-height: 86rpx;
  1007. width: 690rpx;
  1008. margin: auto;
  1009. image {
  1010. width: 36rpx;
  1011. height: 36rpx;
  1012. background: linear-gradient(43deg, #ffc063, #ffa163);
  1013. border-radius: 50%;
  1014. }
  1015. view {
  1016. padding-left: 10rpx;
  1017. font-size: 32rpx;
  1018. font-family: PingFang SC;
  1019. font-weight: bold;
  1020. color: #242424;
  1021. }
  1022. .title-b {
  1023. font-size: 24rpx;
  1024. font-family: PingFang SC;
  1025. font-weight: 500;
  1026. color: #8b8b8b;
  1027. }
  1028. }
  1029. .shop-list {
  1030. padding-top: 20rpx;
  1031. flex-wrap: wrap;
  1032. background-color: #fff;
  1033. justify-content: flex-start;
  1034. .shop-item {
  1035. margin-bottom: 20rpx;
  1036. flex-direction: column;
  1037. width: 20%;
  1038. height: 100rpx;
  1039. image {
  1040. width: 60rpx;
  1041. height: 58rpx;
  1042. }
  1043. }
  1044. }
  1045. .gift-info {
  1046. width: 690rpx;
  1047. height: 155rpx;
  1048. background: linear-gradient(43deg, #FFB242, #FF944D);
  1049. border-radius: 12rpx 12rpx 0px 0px;
  1050. margin: auto;
  1051. color: #fff;
  1052. font-size: 24rpx;
  1053. font-weight: 400;
  1054. color: #FFFFFF;
  1055. view {
  1056. padding-left: 28rpx;
  1057. }
  1058. }
  1059. .gift-good-list {
  1060. width: 690rpx;
  1061. height: 243rpx;
  1062. background: #f4f4f4;
  1063. border-radius: 12rpx;
  1064. margin: auto;
  1065. .gift-list {
  1066. width: 670rpx;
  1067. height: 286rpx;
  1068. background: #fff;
  1069. border-radius: 12px;
  1070. // margin: -54rpx auto 0;
  1071. top: -54rpx;
  1072. left: 0;
  1073. right: 0;
  1074. margin: auto;
  1075. .gift-item {
  1076. background-color: #fff;
  1077. width: 223rpx;
  1078. height: 100%;
  1079. border-right: 1rpx solid #D6D7DC;
  1080. &:first-of-type {
  1081. border-radius: 12rpx 0 0 12rpx;
  1082. }
  1083. &:last-of-type {
  1084. margin-right: 0;
  1085. }
  1086. image {
  1087. width: 160rpx;
  1088. height: 160rpx;
  1089. }
  1090. .gift-name {
  1091. font-size: 22rpx;
  1092. font-weight: bold;
  1093. color: #3F3F3F;
  1094. line-height: 34px;
  1095. }
  1096. .gift-price {
  1097. font-size: 28rpx;
  1098. font-weight: bold;
  1099. color: #FF4C4C;
  1100. }
  1101. }
  1102. }
  1103. }
  1104. .djq-wrap {
  1105. width: 701rpx;
  1106. // height: 255rpx;
  1107. background: #FFFFFF;
  1108. box-shadow: 0px 0px 27rpx 0px rgba(50, 50, 52, 0.06);
  1109. border-radius: 20rpx;
  1110. margin: 0 auto 20rpx;
  1111. padding: 23rpx 22rpx;
  1112. &:last-of-type {
  1113. margin-bottom: 0;
  1114. }
  1115. .djq-img {
  1116. flex-shrink: 0;
  1117. width: 150rpx;
  1118. height: 150rpx;
  1119. border-radius: 10rpx;
  1120. }
  1121. .djq-right {
  1122. flex-grow: 1;
  1123. .djq-tit {
  1124. font-size: 34rpx;
  1125. font-weight: bold;
  1126. color: #333333;
  1127. line-height: 52rpx;
  1128. .djq-name {
  1129. max-width: 300rpx;
  1130. }
  1131. .djq-dis {
  1132. flex-shrink: 0;
  1133. image {
  1134. width: 20rpx;
  1135. height: 28rpx;
  1136. margin-right: 10rpx;
  1137. }
  1138. font-size: 22rpx;
  1139. font-weight: 500;
  1140. color: #666666;
  1141. }
  1142. }
  1143. .djq-dz {
  1144. width: 100%;
  1145. font-size: 24rpx;
  1146. font-weight: 500;
  1147. color: #666666;
  1148. }
  1149. .djq-hd {
  1150. width: 100%;
  1151. // border-bottom: 1rpx solid #EAECED;
  1152. .buy-info {
  1153. display: inline-block;
  1154. height: 32rpx;
  1155. border-radius: 16rpx 16rpx 16rpx 0px;
  1156. line-height: 32rpx;
  1157. font-size: 20rpx;
  1158. font-weight: 500;
  1159. color: #FF440D;
  1160. padding: 0 15rpx;
  1161. background-color: #fff;
  1162. }
  1163. .hd-btn {
  1164. image {
  1165. width: 46rpx;
  1166. height: 46rpx;
  1167. }
  1168. }
  1169. }
  1170. }
  1171. }
  1172. .left-btm {
  1173. height: 66rpx;
  1174. .j-logo {
  1175. width: 32rpx;
  1176. line-height: 33rpx;
  1177. background: linear-gradient(-48deg, #FFA30B, #FFD158);
  1178. border-radius: 13rpx;
  1179. font-size: 21rpx;
  1180. font-weight: 500;
  1181. color: #FFFFFF;
  1182. text-align: center;
  1183. }
  1184. .j-price {
  1185. font-size: 27rpx;
  1186. font-weight: bold;
  1187. color: #FF4C4C;
  1188. margin: 0 10rpx 0 5rpx;
  1189. }
  1190. .j-zk {
  1191. height: 31rpx;
  1192. border: 1rpx solid #FF4C4C;
  1193. border-radius: 7rpx;
  1194. line-height: 31rpx;
  1195. padding: 0 8rpx;
  1196. font-size: 20rpx;
  1197. font-weight: bold;
  1198. color: #FF4C4C;
  1199. margin-right: 5rpx;
  1200. }
  1201. .j-name {
  1202. font-size: 23rpx;
  1203. font-weight: bold;
  1204. color: #333333;
  1205. }
  1206. }
  1207. .hotgoods {
  1208. // margin-top: 38rpx;
  1209. width: 100%;
  1210. display: flex;
  1211. flex-wrap: wrap;
  1212. padding: 0 0 30rpx;
  1213. .hotgoods-item {
  1214. width: 48%;
  1215. background-color: #ffffff;
  1216. border-radius: 12rpx;
  1217. &:nth-child(2n + 1) {
  1218. margin-right: 24rpx;
  1219. }
  1220. .image-wrapper {
  1221. width: 100%;
  1222. height: 330rpx;
  1223. border-radius: 3px;
  1224. overflow: hidden;
  1225. position: relative;
  1226. .image-bg {
  1227. position: absolute;
  1228. top: 0;
  1229. left: 0;
  1230. right: 0;
  1231. bottom: 0;
  1232. width: 100%;
  1233. height: 100%;
  1234. opacity: 1;
  1235. border-radius: 12rpx 12rpx 0 0;
  1236. z-index: 2;
  1237. }
  1238. .image {
  1239. width: 100%;
  1240. height: 100%;
  1241. opacity: 1;
  1242. border-radius: 12rpx 12rpx 0 0;
  1243. }
  1244. }
  1245. .title {
  1246. margin-top: 24rpx;
  1247. font-size: 28rpx;
  1248. font-family: PingFang SC;
  1249. font-weight: 500;
  1250. color: #333333;
  1251. }
  1252. .hot-price {
  1253. display: flex;
  1254. justify-content: space-between;
  1255. align-items: center;
  1256. padding: 14rpx 10rpx 30rpx;
  1257. .hotPrice-box {
  1258. width: 70rpx;
  1259. height: 28rpx;
  1260. background: linear-gradient(90deg, #c79a4c, #f9df7f);
  1261. border-radius: 5rpx;
  1262. text-align: center;
  1263. line-height: 28rpx;
  1264. font-size: 20rpx;
  1265. font-family: Source Han Sans CN;
  1266. font-weight: 400;
  1267. color: #ffffff;
  1268. }
  1269. .price {
  1270. // margin-left: 10rpx;
  1271. font-size: 40rpx;
  1272. color: #ff0000;
  1273. font-weight: 500;
  1274. }
  1275. .yuanPrice {
  1276. margin-left: 10rpx;
  1277. font-size: 20rpx;
  1278. font-weight: 500;
  1279. // text-decoration: line-through;
  1280. color: #999999;
  1281. }
  1282. .cart-icon {
  1283. image {
  1284. width: 44rpx;
  1285. height: 44rpx;
  1286. }
  1287. }
  1288. }
  1289. }
  1290. }
  1291. .product-box {
  1292. // margin-top: 20rpx;
  1293. background: #ffffff;
  1294. padding: 0rpx 30rpx 20rpx;
  1295. }
  1296. </style>