store.vue 34 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579
  1. <template>
  2. <view class="container">
  3. <view class="carousel-section">
  4. <swiper class="carousel" autoplay="true" duration="400" interval="5000" @change="swiperChange"
  5. :indicator-dots="true" indicator-active-color="#FFFFFF">
  6. <swiper-item class="carousel-item">
  7. <!-- #ifndef APP-PLUS -->
  8. <image src="http://yiqugo.oss-cn-hangzhou.aliyuncs.com/f8564202304061452591511.png"
  9. mode="aspectFill"></image>
  10. <!-- #endif -->
  11. <!-- #ifdef APP-PLUS -->
  12. <image src="http://yiqugo.oss-cn-hangzhou.aliyuncs.com/f8564202304061452591511.png"
  13. mode="aspectFill"></image>
  14. <!-- #endif -->
  15. </swiper-item>
  16. </swiper>
  17. <!-- <view class="search flex">
  18. <view class="input-box flex" @click.stop="clickSearch">
  19. <view class=" input-content flex">
  20. <view class="iconfont iconsearch"></view>
  21. <view class="input"><input type="text" disabled value="搜索附近门店" /></view>
  22. </view>
  23. </view>
  24. </view> -->
  25. </view>
  26. <swiper :interval="3000" :duration="1000" style="height: 300rpx;background: #fff;">
  27. <swiper-item v-for="(shopitem, shopindex) in shopList" :key="shopindex">
  28. <view class="shop-list flex" style="padding-top: 40rpx;">
  29. <view class="shop-item flex" v-for="(item, index) in shopitem"
  30. @click="navto('/pages/store/shopList?id=' + item.id)">
  31. <image :src="item.pic" mode="" class="shop-img"></image>
  32. <view class="shop-name">{{ item.cate_name }}</view>
  33. </view>
  34. </view>
  35. </swiper-item>
  36. </swiper>
  37. <!-- 门店列表 -->
  38. <view class="" style="height: 20rpx;"></view>
  39. <view class="shop">
  40. <view class="shop-title">
  41. <view class="shop-item" @click="changePx(0)">
  42. <view class="sitem-font" :class="{ choose: PXType == 0 }">销量</view>
  43. <view class="p-box">
  44. <text :class="{ active: PXType == 0 && numberOrder === 1 }" class="iconfont iconfold"></text>
  45. <text :class="{ active: PXType == 0 && numberOrder === 2 }"
  46. class="iconfont iconfold xia"></text>
  47. </view>
  48. </view>
  49. <view class="shop-item" @click="changePx(1)">
  50. <view class="sitem-font" :class="{ choose: PXType == 1 }">位置距离</view>
  51. <view class="p-box">
  52. <text :class="{ active: PXType == 1 && distance === 1 }" class="iconfont iconfold"></text>
  53. <text :class="{ active: PXType == 1 && distance === 2 }" class="iconfont iconfold xia"></text>
  54. </view>
  55. </view>
  56. <view class="shop-item" @click="changePx(2)">
  57. <view class="sitem-font" :class="{ choose: PXType == 2 }">趣豆赠送</view>
  58. <view class="p-box">
  59. <text :class="{ active: PXType == 2 && qudou === 1 }" class="iconfont iconfold"></text>
  60. <text :class="{ active: PXType == 2 && qudou === 2 }" class="iconfont iconfold xia"></text>
  61. </view>
  62. </view>
  63. </view>
  64. </view>
  65. <view class="" style="height: 20rpx;"></view>
  66. <view class="djq-wrap flex f-ai-s" v-for="storeitem in storeList"
  67. @click="navto('/pages/store/shopDetail?id=' + storeitem.id)">
  68. <image :src="storeitem.image" mode="" class="djq-img"></image>
  69. <view class="djq-right pl20">
  70. <view class="djq-tit flex f-j-sb f-ai-s">
  71. <view class="djq-name clamp">{{ storeitem.name }}</view>
  72. <view class="djq-dis">
  73. <image src="https://hy.liuniu946.com/app/index/index10.png" mode=""></image>
  74. 距离{{ (storeitem.range * 1).toFixed(2) * 1 }}KM
  75. </view>
  76. </view>
  77. <view class="flex f-d-c f-j-sb f-ai-s fg1" style="height: 110rpx;">
  78. <view class="djq-dz-box">
  79. <view class="djq-dz clamp2">{{ storeitem.detailed_address }}</view>
  80. <view class="djq-dz">每100元赠送趣豆{{ storeitem.gift_integral * 1 }}</view>
  81. </view>
  82. <view class="djq-hd flex f-j-sb">
  83. <view class="hd-btn">
  84. <image src="../../static/icon/call.png" mode="" style="margin-right: 15rpx;"
  85. @click.stop="makeCall(storeitem.phone)"></image>
  86. <!-- #ifdef H5 -->
  87. <image src="../../static/icon/dh.png" mode=""
  88. @click.stop="toGaodeMap(storeitem.latitude, storeitem.longitude, storeitem.name)">
  89. </image>
  90. <!-- #endif -->
  91. <!-- #ifdef MP -->
  92. <image src="../../static/icon/dh.png" mode="" @click.stop="dh(storeitem)"></image>
  93. <!-- #endif -->
  94. <!-- #ifdef APP-PLUS -->
  95. <image src="../../static/icon/dh.png" mode=""
  96. @click.stop="gomapApp(storeitem.latitude, storeitem.longitude, storeitem.name)"></image>
  97. <!-- #endif -->
  98. </view>
  99. </view>
  100. </view>
  101. <view class="" style="padding: 10rpx 0 0 0;" v-if="storeitem.cou && storeitem.cou.length > 0">
  102. <view class="left-btm flex f-j-s" v-for="qitem in storeitem.cou">
  103. <view class="j-price">
  104. <text>¥</text>
  105. {{ qitem.coupon_price }}
  106. </view>
  107. <view class="j-name">{{ qitem.title }}</view>
  108. </view>
  109. </view>
  110. </view>
  111. </view>
  112. <uni-load-more :status="loadingType"></uni-load-more>
  113. </view>
  114. </template>
  115. <script>
  116. // 地区选择
  117. import LeeSelectCity from '@/components/lee-select-city/lee-select-city.vue';
  118. import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
  119. import {
  120. store_cate,
  121. getStoreList,
  122. getCity
  123. } from '@/api/shop.js';
  124. import {
  125. lookSubpoints,
  126. lookOneself
  127. } from '../../api/user.js';
  128. import seckill from '../../components/seckill/seckill.vue';
  129. import {
  130. loadIndexs,
  131. getVip
  132. } from '@/api/index.js';
  133. import {
  134. getUserInfo,
  135. spread
  136. } from '@/api/user.js';
  137. import {
  138. getBargainList,
  139. getProducts
  140. } from '@/api/product.js';
  141. import {
  142. interceptor
  143. } from '@/utils/loginUtils';
  144. import {
  145. openMap
  146. } from '@/utils/rocessor';
  147. import {
  148. mapState,
  149. mapMutations
  150. } from 'vuex';
  151. // #ifdef H5
  152. import {
  153. weixindata,
  154. shareLoad
  155. } from '@/utils/wxAuthorized';
  156. // #endif
  157. export default {
  158. components: {
  159. seckill,
  160. LeeSelectCity
  161. },
  162. data() {
  163. return {
  164. page: 1,
  165. limitt: 20,
  166. loadingType: 'more',
  167. district: '定位中',
  168. PXType: 0, //店铺排序规则 0-》销量排序 1-》距离排序 2-》趣豆多少排序
  169. numberOrder: 1, //销量排序1升2降
  170. distance: 1, //距离排序1升2降
  171. qudou: 1, //趣豆多少排序1升2降
  172. storeList: [],
  173. current: 0,
  174. carouselList: [], //轮播列表
  175. page: 1,
  176. limit: 5,
  177. shopList: [],
  178. period: 1,
  179. order: ''
  180. };
  181. },
  182. computed: {
  183. ...mapState(['loginInterceptor', 'baseURL', 'latitude', 'longitude', 'weichatObj', 'chooseDistrict']),
  184. ...mapState('user', ['hasLogin', 'userInfo'])
  185. },
  186. onReachBottom() {
  187. this.getStoreList();
  188. },
  189. onLoad: function(option) {
  190. this.getaddress();
  191. // #ifdef MP
  192. if (option.scene) {
  193. // 存储小程序邀请人
  194. uni.setStorage({
  195. key: 'spread_code',
  196. data: option.scene
  197. });
  198. }
  199. // #endif
  200. },
  201. watch: {
  202. PXType(val, old) {
  203. console.log('切换显示');
  204. this.getStoreList();
  205. }
  206. // chooseDistrict(val,old) {
  207. // this.reGetStoreList()
  208. // }
  209. },
  210. onShow: function() {
  211. this.getStoreCate();
  212. this.getStoreList();
  213. // this.loadData();
  214. },
  215. //下拉刷新
  216. onPullDownRefresh() {
  217. this.loadData();
  218. },
  219. // #ifndef MP
  220. // 监听导航栏输入框点击事件
  221. onNavigationBarSearchInputClicked(e) {
  222. //跳转到搜索页面
  223. this.clickSearch();
  224. },
  225. //点击导航栏 buttons 时触发
  226. onNavigationBarButtonTap(e) {
  227. const index = e.index;
  228. if (index === 0) {
  229. this.$api.msg('点击了扫描');
  230. } else if (index === 1) {
  231. // #ifdef APP-PLUS
  232. const pages = getCurrentPages();
  233. const page = pages[pages.length - 1];
  234. const currentWebview = page.$getAppWebview();
  235. currentWebview.hideTitleNViewButtonRedDot({
  236. index
  237. });
  238. // #endif
  239. uni.navigateTo({
  240. url: '/user/page/notice'
  241. });
  242. }
  243. },
  244. // #endif
  245. methods: {
  246. ...mapMutations(['setLat', 'setLon', 'setChoose']),
  247. // 切换排序
  248. changePx(index) {
  249. let obj = this;
  250. obj.PXType = index;
  251. if (index === 0) {
  252. this.order = this.numberOrder === 1 ? 'asc' : 'desc';
  253. this.numberOrder = this.numberOrder === 1 ? 2 : 1;
  254. }
  255. if (index === 1) {
  256. this.order = this.distance === 1 ? 'asc' : 'desc';
  257. this.distance = this.distance === 1 ? 2 : 1;
  258. }
  259. // 判断是否为价格优先
  260. if (index === 2) {
  261. this.order = this.qudou === 1 ? 'asc' : 'desc';
  262. this.qudou = this.qudou === 1 ? 2 : 1;
  263. }
  264. console.log('切换显示');
  265. this.page = 1;
  266. this.loadingType = 'more';
  267. this.getStoreList('reload');
  268. },
  269. // 刷新门店列表
  270. reGetStoreList() {
  271. this.page = 1;
  272. this.loadingType = 'more';
  273. this.storeList = [];
  274. console.log('地址刷新');
  275. this.getStoreList();
  276. },
  277. // 计算距离
  278. space(lat1, lng1, lat2, lng2) {
  279. console.log(lat1, lng1, lat2, lng2);
  280. var radLat1 = (lat1 * Math.PI) / 180.0;
  281. var radLat2 = (lat2 * Math.PI) / 180.0;
  282. var a = radLat1 - radLat2;
  283. var b = (lng1 * Math.PI) / 180.0 - (lng2 * Math.PI) / 180.0;
  284. var s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) + Math.cos(radLat1) * Math.cos(radLat2) * Math
  285. .pow(Math.sin(b / 2), 2)));
  286. s = s * 6378.137;
  287. s = Math.round(s * 10000) / 10000;
  288. // return s * 1000; // 单位米
  289. return s; //单位km
  290. },
  291. // 获取店铺分类
  292. getStoreCate() {
  293. let obj = this;
  294. store_cate().then(res => {
  295. console.log(res);
  296. obj.shopList = obj.chunkArr(res.data, 10);
  297. console.log(obj.shopList, 'this.shopList+++++++++++++');
  298. });
  299. },
  300. // 拨打电话
  301. makeCall(phone) {
  302. console.log(phone, '123456');
  303. uni.makePhoneCall({
  304. phoneNumber: phone, //仅为示例
  305. fail(err) {
  306. console.log(err, 'fail');
  307. },
  308. success(res) {
  309. console.log(res, 'success');
  310. }
  311. });
  312. },
  313. // 导航
  314. dh(item) {
  315. wx.openLocation({
  316. latitude: item.latitude * 1,
  317. longitude: item.longitude * 1,
  318. name: item.name,
  319. address: item.detailed_address
  320. });
  321. },
  322. // 获取商店列表
  323. getStoreList(type) {
  324. let obj = this;
  325. if (obj.loadingType == 'loading' || obj.loadingType == 'noMore') {
  326. return;
  327. }
  328. obj.loadingType = 'loading';
  329. let data = {
  330. page: obj.page,
  331. latitude: obj.latitude,
  332. longitude: obj.longitude,
  333. limit: obj.limitt,
  334. // address: obj.$store.state.chooseProvince,
  335. sort: obj.PXType == 0 ? 'achievement' : obj.PXType == 1 ? 'distance' : 'gift_integral',
  336. order: obj.order
  337. };
  338. getStoreList(data)
  339. .then(res => {
  340. console.log(res, '1111');
  341. if (type == 'reload') {
  342. obj.storeList = [];
  343. }
  344. console.log(type);
  345. if (res.data.list.length > 0) {
  346. obj.storeList = obj.storeList.concat(res.data.list);
  347. obj.page++;
  348. console.log('数据加载完毕');
  349. }
  350. if (obj.limitt == res.data.list.length) {
  351. //说明数据已经加载完毕了
  352. obj.loadingType = 'more';
  353. console.log('加载完毕1111111');
  354. } else {
  355. console.log('加载完毕1222222222211');
  356. obj.loadingType = 'noMore';
  357. }
  358. //说明还有数据
  359. uni.hideLoading();
  360. this.$set(obj.storeList, 'loaded', true);
  361. })
  362. .catch(err => {
  363. console.log(err, '报错');
  364. });
  365. },
  366. getLocation() {
  367. uni.getLocation({
  368. type: 'gcj02',
  369. success(e) {
  370. console.log(e, 'dingwei');
  371. }
  372. });
  373. },
  374. navto(url) {
  375. uni.navigateTo({
  376. url,
  377. fail() {
  378. uni.switchTab({
  379. url
  380. });
  381. }
  382. });
  383. },
  384. getaddress() {
  385. console.log('dizhi+++++++++++');
  386. let obj = this;
  387. uni.getLocation({
  388. type: 'wgs84',
  389. success: res => {
  390. // uni.showModal({
  391. // title: '成功',
  392. // content: JSON.stringify(res)
  393. // });
  394. let wz = obj.wgs84Togcj02(res.longitude, res.latitude);
  395. obj.setLat(wz[1]);
  396. obj.setLon(wz[0]);
  397. console.log(wz, '经纬度');
  398. this.getStoreList();
  399. // obj.getCity();
  400. },
  401. fail: err => {
  402. // uni.showModal({
  403. // title: '失败',
  404. // content: JSON.stringify(err)
  405. // });
  406. this.getStoreList();
  407. openMap().then(e => {
  408. this.getaddress();
  409. });
  410. }
  411. });
  412. },
  413. wgs84Togcj02(lng, lat) {
  414. if (this.out_of_china(lng, lat)) {
  415. return [lng, lat];
  416. }
  417. //定义一些常量
  418. //GCJ02 转换为 WGS84
  419. var that = this;
  420. const x_PI = (3.14159265358979324 * 3000.0) / 180.0;
  421. const PI = 3.1415926535897932384626;
  422. const a = 6378245.0;
  423. const ee = 0.00669342162296594323;
  424. let dlat = that.transformlat(lng - 105.0, lat - 35.0);
  425. let dlng = that.transformlng(lng - 105.0, lat - 35.0);
  426. let radlat = (lat / 180.0) * PI;
  427. let magic = Math.sin(radlat);
  428. magic = 1 - ee * magic * magic;
  429. let sqrtmagic = Math.sqrt(magic);
  430. dlat = (dlat * 180.0) / (((a * (1 - ee)) / (magic * sqrtmagic)) * PI);
  431. dlng = (dlng * 180.0) / ((a / sqrtmagic) * Math.cos(radlat) * PI);
  432. var mglat = lat + dlat;
  433. var mglng = lng + dlng;
  434. return [mglng, mglat];
  435. },
  436. out_of_china(lng, lat) {
  437. return lng < 72.004 || lng > 137.8347 || (lat < 0.8293 || lat > 55.8271 || false);
  438. },
  439. transformlat(lng, lat) {
  440. const x_PI = (3.14159265358979324 * 3000.0) / 180.0;
  441. const PI = 3.1415926535897932384626;
  442. const a = 6378245.0;
  443. const ee = 0.00669342162296594323;
  444. let ret = -100.0 + 2.0 * lng + 3.0 * lat + 0.2 * lat * lat + 0.1 * lng * lat + 0.2 * Math.sqrt(Math.abs(
  445. lng));
  446. ret += ((20.0 * Math.sin(6.0 * lng * PI) + 20.0 * Math.sin(2.0 * lng * PI)) * 2.0) / 3.0;
  447. ret += ((20.0 * Math.sin(lat * PI) + 40.0 * Math.sin((lat / 3.0) * PI)) * 2.0) / 3.0;
  448. ret += ((160.0 * Math.sin((lat / 12.0) * PI) + 320 * Math.sin((lat * PI) / 30.0)) * 2.0) / 3.0;
  449. return ret;
  450. },
  451. transformlng(lng, lat) {
  452. const x_PI = (3.14159265358979324 * 3000.0) / 180.0;
  453. const PI = 3.1415926535897932384626;
  454. const a = 6378245.0;
  455. const ee = 0.00669342162296594323;
  456. let ret = 300.0 + lng + 2.0 * lat + 0.1 * lng * lng + 0.1 * lng * lat + 0.1 * Math.sqrt(Math.abs(lng));
  457. ret += ((20.0 * Math.sin(6.0 * lng * PI) + 20.0 * Math.sin(2.0 * lng * PI)) * 2.0) / 3.0;
  458. ret += ((20.0 * Math.sin(lng * PI) + 40.0 * Math.sin((lng / 3.0) * PI)) * 2.0) / 3.0;
  459. ret += ((150.0 * Math.sin((lng / 12.0) * PI) + 300.0 * Math.sin((lng / 30.0) * PI)) * 2.0) / 3.0;
  460. return ret;
  461. },
  462. navTo(url) {
  463. if (url == '') {
  464. this.$api.msg('暂未开通,敬请期待');
  465. } else {
  466. uni.navigateTo({
  467. url
  468. });
  469. }
  470. },
  471. // 點擊搜索框
  472. clickSearch() {
  473. uni.navigateTo({
  474. url: '/pages/store/shopList'
  475. });
  476. },
  477. // 监听图片加载完成
  478. onImageError(key, index) {
  479. this[key][index].image = '/static/error/errorImage.jpg';
  480. },
  481. // 请求载入数据
  482. async loadData() {
  483. loadIndexs({})
  484. .then(({
  485. data
  486. }) => {
  487. this.carouselList = data.info.storebanner;
  488. uni.stopPullDownRefresh();
  489. })
  490. .catch(e => {
  491. uni.stopPullDownRefresh();
  492. });
  493. },
  494. //轮播图切换修改背景色
  495. swiperChange(e) {
  496. const index = e.detail.current;
  497. this.swiperCurrent = index;
  498. this.titleNViewBackground = this.carouselList[index].background;
  499. },
  500. // 轮播图跳转
  501. bannerNavToUrl(item) {
  502. // #ifdef H5
  503. console.log(item.wap_url.indexOf('http'), 'banner');
  504. if (item.wap_url.indexOf('http') >= 0) {
  505. window.location.href = item.wap_url;
  506. }
  507. // #endif
  508. //测试数据没有写id,用title代替
  509. uni.navigateTo({
  510. url: item.wap_url
  511. });
  512. },
  513. // 根据指定个数分割数组
  514. chunkArr(arr, size) {
  515. console.log(arr, 'arr+++++');
  516. //判断如果不是数组(就没有length),或者size没有传值,size小于1,就返回空数组
  517. if (!arr.length || !size || size < 1) return [];
  518. let [start, end, result] = [null, null, []];
  519. for (let i = 0; i < Math.ceil(arr.length / size); i++) {
  520. start = i * size;
  521. end = start + size;
  522. result.push(arr.slice(start, end));
  523. }
  524. return result;
  525. },
  526. gomapApp(latitude, longitude, name) {
  527. let url = '';
  528. if (plus.os.name == 'Android') {
  529. //判断是安卓端
  530. plus.nativeUI.actionSheet({
  531. //选择菜单
  532. title: '选择地图应用',
  533. cancel: '取消',
  534. buttons: [{
  535. title: '腾讯地图'
  536. }, {
  537. title: '百度地图'
  538. }, {
  539. title: '高德地图'
  540. }]
  541. },
  542. function(e) {
  543. switch (e.index) {
  544. //下面是拼接url,不同系统以及不同地图都有不同的拼接字段
  545. case 1:
  546. //注意referer=xxx的xxx替换成你在腾讯地图开发平台申请的key
  547. url = `qqmap://map/geocoder?coord=${latitude},${longitude}&referer=xxx`;
  548. break;
  549. case 2:
  550. url =
  551. `baidumap://map/marker?location=${latitude},${longitude}&title=${name}&coord_type=gcj02&src=andr.baidu.openAPIdemo`;
  552. break;
  553. case 3:
  554. url =
  555. `androidamap://viewMap?sourceApplication=appname&poiname=${name}&lat=${latitude}&lon=${longitude}&dev=0`;
  556. break;
  557. default:
  558. break;
  559. }
  560. if (url != '') {
  561. url = encodeURI(url);
  562. //plus.runtime.openURL(url,function(e){})调起手机APP应用
  563. plus.runtime.openURL(url, function(e) {
  564. plus.nativeUI.alert('本机未安装指定的地图应用');
  565. });
  566. }
  567. }
  568. );
  569. } else {
  570. // iOS上获取本机是否安装了百度高德地图,需要在manifest里配置
  571. // 在manifest.json文件app-plus->distribute->apple->urlschemewhitelist节点下添加
  572. //(如urlschemewhitelist:["iosamap","baidumap"])
  573. plus.nativeUI.actionSheet({
  574. title: '选择地图应用',
  575. cancel: '取消',
  576. buttons: [{
  577. title: '腾讯地图'
  578. }, {
  579. title: '百度地图'
  580. }, {
  581. title: '高德地图'
  582. }]
  583. },
  584. function(e) {
  585. switch (e.index) {
  586. case 1:
  587. url = `qqmap://map/geocoder?coord=${latitude},${longitude}&referer=xxx`;
  588. break;
  589. case 2:
  590. url =
  591. `baidumap://map/marker?location=${latitude},${longitude}&title=${name}&content=${name}&src=ios.baidu.openAPIdemo&coord_type=gcj02`;
  592. break;
  593. case 3:
  594. url =
  595. `iosamap://viewMap?sourceApplication=applicationName&poiname=${name}&lat=${latitude}&lon=${longitude}&dev=0`;
  596. break;
  597. default:
  598. break;
  599. }
  600. if (url != '') {
  601. url = encodeURI(url);
  602. plus.runtime.openURL(url, function(e) {
  603. plus.nativeUI.alert('本机未安装指定的地图应用');
  604. });
  605. }
  606. }
  607. );
  608. }
  609. },
  610. getCity() {
  611. let obj = this;
  612. console.log('进入city');
  613. getCity({
  614. lat: obj.latitude,
  615. lng: obj.longitude
  616. })
  617. .then(res => {
  618. console.log(res, '逆解析结果');
  619. obj.chooseDistrict = res.data.district;
  620. if (!obj.chooseDistrict) {
  621. obj.setChoose({
  622. chooseProvince: res.data.province,
  623. chooseCity: res.data.city,
  624. chooseDistrict: res.data.district
  625. });
  626. }
  627. obj.getStoreList();
  628. })
  629. .catch(err => {
  630. console.log(err, 'shibai');
  631. });
  632. },
  633. // 调用高德
  634. toGaodeMap(latitude, longitude, address) {
  635. window.location.href = `https://uri.amap.com/marker?position=${longitude},${latitude}&name=${address}`;
  636. }
  637. }
  638. };
  639. </script>
  640. <style lang="scss">
  641. page {
  642. background: #f8f6f9;
  643. }
  644. .carousel-section {
  645. position: relative;
  646. // padding-top: 10px;
  647. .bg {
  648. position: absolute;
  649. top: 0;
  650. left: 0;
  651. width: 750rpx;
  652. height: 378rpx;
  653. image {
  654. width: 100%;
  655. height: 100%;
  656. }
  657. }
  658. .titleNview-placing {
  659. height: var(--status-bar-height);
  660. box-sizing: content-box;
  661. }
  662. .search {
  663. justify-content: space-between;
  664. padding: 30rpx 32rpx 20rpx;
  665. align-items: center;
  666. background-color: #fff;
  667. .address {
  668. width: 32rpx;
  669. height: 38rpx;
  670. }
  671. .shop-name {
  672. height: 38rpx;
  673. position: relative;
  674. top: -4rpx;
  675. z-index: 100;
  676. width: 120rpx;
  677. font-size: 30rpx;
  678. font-family: PingFang SC;
  679. font-weight: 500;
  680. padding-left: 10rpx;
  681. }
  682. .shop-jt {
  683. margin-left: 8rpx;
  684. width: 16rpx;
  685. height: 10rpx;
  686. }
  687. .input-box {
  688. margin-left: 10rpx;
  689. position: relative;
  690. z-index: 99;
  691. width: 650rpx;
  692. height: 60rpx;
  693. background: #eeeeee;
  694. border-radius: 30rpx;
  695. .input-content {
  696. position: relative;
  697. z-index: 11;
  698. border-radius: 99rpx;
  699. flex-grow: 1;
  700. padding: 5rpx 30rpx;
  701. background: #eeeeee;
  702. .iconsearch {
  703. font-size: 50rpx;
  704. color: #cbcbcb;
  705. }
  706. .input {
  707. margin-left: 19rpx;
  708. flex-grow: 1;
  709. color: #cbcbcb;
  710. input {
  711. font-size: 28rpx;
  712. color: #cbcbcb;
  713. }
  714. }
  715. }
  716. .input-button {
  717. padding-left: 20rpx;
  718. font-size: $font-base;
  719. height: 100%;
  720. }
  721. }
  722. }
  723. }
  724. .carousel {
  725. position: relative;
  726. z-index: 3;
  727. width: 100%;
  728. height: 360rpx;
  729. background-color: #fff;
  730. .carousel-item {
  731. width: 100%;
  732. height: 100%;
  733. }
  734. image {
  735. width: 100%;
  736. height: 100%;
  737. }
  738. }
  739. .navbar {
  740. position: relative;
  741. z-index: 2;
  742. padding: 0 50rpx;
  743. margin-top: -200rpx;
  744. width: 750rpx;
  745. height: 420rpx;
  746. background: #ffffff;
  747. border-radius: 40rpx;
  748. .navbar-box {
  749. padding-top: 250rpx;
  750. .navbar-item {
  751. display: flex;
  752. flex-direction: column;
  753. align-items: center;
  754. width: 20%;
  755. .nitem-image {
  756. width: 90rpx;
  757. height: 90rpx;
  758. }
  759. .nitem-font {
  760. margin-top: 22rpx;
  761. font-size: 26rpx;
  762. font-family: PingFang SC;
  763. font-weight: 500;
  764. color: #000000;
  765. }
  766. }
  767. }
  768. }
  769. .jx {
  770. background: #fff;
  771. width: 750rpx;
  772. }
  773. .jx-box {
  774. background: #fff;
  775. display: flex;
  776. flex-direction: column;
  777. align-items: center;
  778. width: 750rpx;
  779. .jx-box-title {
  780. margin: 50rpx 0;
  781. width: 610rpx;
  782. height: 30rpx;
  783. image {
  784. width: 100%;
  785. height: 100%;
  786. }
  787. }
  788. .jx-box-img {
  789. width: 750rpx;
  790. height: 220rpx;
  791. image {
  792. width: 100%;
  793. height: 100%;
  794. }
  795. }
  796. }
  797. .cai {
  798. display: flex;
  799. justify-content: center;
  800. align-items: center;
  801. padding-bottom: 20rpx;
  802. font-size: 28rpx;
  803. font-weight: 500;
  804. color: #999999;
  805. }
  806. .jx-box-content {
  807. display: flex;
  808. .content-left {
  809. margin: 20rpx 15rpx;
  810. width: 236rpx;
  811. height: 236rpx;
  812. background: #e2e2e2;
  813. border-radius: 10rpx;
  814. image {
  815. width: 100%;
  816. height: 100%;
  817. }
  818. }
  819. .content-right {
  820. display: flex;
  821. flex-direction: column;
  822. justify-content: space-around;
  823. .shop-name {
  824. width: 382rpx;
  825. font-size: 32rpx;
  826. font-weight: bold;
  827. color: #333333;
  828. overflow: hidden;
  829. text-overflow: ellipsis;
  830. display: -webkit-box;
  831. -webkit-box-orient: vertical;
  832. -webkit-line-clamp: 2;
  833. }
  834. .shop-content {
  835. width: 455rpx;
  836. display: flex;
  837. justify-content: space-between;
  838. .shop-content-left {
  839. display: flex;
  840. flex-direction: column;
  841. .price-box {
  842. display: flex;
  843. align-items: center;
  844. .yuan-price {
  845. font-size: 26rpx;
  846. font-weight: 500;
  847. text-decoration: line-through;
  848. color: #999999;
  849. }
  850. image {
  851. margin: 0 10rpx;
  852. width: 16rpx;
  853. height: 18rpx;
  854. }
  855. .j-price {
  856. font-size: 24rpx;
  857. font-weight: bold;
  858. color: #b59467;
  859. }
  860. }
  861. .price-x {
  862. font-size: 36rpx;
  863. font-weight: bold;
  864. color: #ff4c4c;
  865. }
  866. }
  867. .shop-content-right {
  868. margin-top: 20rpx;
  869. align-items: center;
  870. text-align: center;
  871. width: 137rpx;
  872. height: 52rpx;
  873. font-size: 26rpx;
  874. font-weight: 500;
  875. color: #fff;
  876. background: #f75022;
  877. border-radius: 26rpx;
  878. line-height: 52rpx;
  879. }
  880. }
  881. }
  882. }
  883. .shop {
  884. margin-top: 20rpx;
  885. background: #ffffff;
  886. padding: 0 12rpx;
  887. .shop-title {
  888. padding: 30rpx 0 20rpx;
  889. display: flex;
  890. align-items: center;
  891. border-bottom: 1px solid #e3e6e7;
  892. .shop-item {
  893. width: 25%;
  894. display: flex;
  895. align-items: center;
  896. justify-content: center;
  897. .sitem-font {
  898. font-size: 26rpx;
  899. font-family: PingFang SC;
  900. font-weight: bold;
  901. color: #333333;
  902. }
  903. .choose {
  904. color: #ff4c4c;
  905. }
  906. .p-box {
  907. display: flex;
  908. flex-direction: column;
  909. .iconfont {
  910. display: flex;
  911. align-items: center;
  912. justify-content: center;
  913. width: 30rpx;
  914. height: 14rpx;
  915. line-height: 1;
  916. margin-left: 4rpx;
  917. font-size: 26rpx;
  918. color: #888;
  919. &.active {
  920. color: $base-color;
  921. }
  922. }
  923. .xia {
  924. transform: scaleY(-1);
  925. }
  926. }
  927. }
  928. }
  929. }
  930. .shop-main {
  931. padding: 32rpx 18rpx 0 12rpx;
  932. align-items: flex-start;
  933. justify-content: flex-start;
  934. .main-left {
  935. width: 180rpx;
  936. height: 180rpx;
  937. border-radius: 10rpx;
  938. }
  939. .main-right {
  940. width: 500rpx;
  941. justify-content: space-between;
  942. align-items: flex-start;
  943. margin-left: 20rpx;
  944. padding: 13rpx 0 35rpx;
  945. border-bottom: 1px solid #eaeced;
  946. .shopm-info {
  947. max-width: 60%;
  948. line-height: 1;
  949. .shopm-title {
  950. display: flex;
  951. justify-content: flex-start;
  952. .shopmt-font {
  953. font-size: 34rpx;
  954. font-family: PingFang SC;
  955. font-weight: bold;
  956. color: #333333;
  957. }
  958. .shopmt-good {
  959. margin-left: 6rpx;
  960. width: 30rpx;
  961. height: 30rpx;
  962. border: 1px solid #ff4c4c;
  963. border-radius: 5rpx;
  964. font-size: 20rpx;
  965. font-family: PingFang SC;
  966. font-weight: 500;
  967. color: #ff4c4c;
  968. text-align: center;
  969. line-height: 30rpx;
  970. }
  971. }
  972. .address {
  973. margin-top: 16rpx;
  974. font-size: 24rpx;
  975. font-family: PingFang SC;
  976. font-weight: 500;
  977. color: #666666;
  978. }
  979. .shopmt-tip {
  980. position: relative;
  981. display: inline-block;
  982. flex-grow: 0;
  983. margin-top: 52rpx;
  984. padding: 8rpx;
  985. background: #fcf3f0;
  986. border-radius: 16rpx 16rpx 16rpx 0px;
  987. font-size: 20rpx;
  988. font-family: PingFang SC;
  989. font-weight: 500;
  990. color: #ff440d;
  991. }
  992. }
  993. .right {
  994. height: 100%;
  995. margin-top: 5rpx;
  996. display: flex;
  997. flex-direction: column;
  998. .mright-top {
  999. display: flex;
  1000. justify-content: flex-end;
  1001. align-items: center;
  1002. .mrt-image {
  1003. width: 20rpx;
  1004. height: 28rpx;
  1005. }
  1006. .mrt-font {
  1007. margin-left: 8rpx;
  1008. font-size: 22rpx;
  1009. font-family: PingFang SC;
  1010. font-weight: 500;
  1011. color: #666666;
  1012. }
  1013. }
  1014. .mright-bottom {
  1015. margin-top: 80rpx;
  1016. display: flex;
  1017. justify-content: flex-end;
  1018. .mrb-item {
  1019. width: 46rpx;
  1020. height: 46rpx;
  1021. margin-left: 14rpx;
  1022. }
  1023. }
  1024. }
  1025. }
  1026. }
  1027. .good-list {
  1028. width: 750rpx;
  1029. background: linear-gradient(0deg, #ffffff, #f8f8f8);
  1030. padding: 0 30rpx 30rpx;
  1031. .good {
  1032. width: 690rpx;
  1033. height: 276rpx;
  1034. background: #ffffff;
  1035. box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
  1036. border-radius: 10rpx;
  1037. margin: auto;
  1038. padding: 20rpx 15rpx;
  1039. margin-bottom: 20rpx;
  1040. &:last-of-type {
  1041. margin-bottom: 0rpx;
  1042. }
  1043. .good-img {
  1044. flex-shrink: 0;
  1045. width: 236rpx;
  1046. height: 236rpx;
  1047. border-radius: 10rpx;
  1048. margin-right: 22rpx;
  1049. image {
  1050. width: 236rpx;
  1051. height: 236rpx;
  1052. border-radius: 10rpx;
  1053. }
  1054. }
  1055. .good-info {
  1056. flex-grow: 1;
  1057. height: 100%;
  1058. flex-direction: column;
  1059. justify-content: space-between;
  1060. align-items: flex-start;
  1061. .good-name {
  1062. font-size: 32rpx;
  1063. font-weight: bold;
  1064. padding-top: 10rpx;
  1065. color: #333333;
  1066. }
  1067. .good-price {
  1068. width: 100%;
  1069. image {
  1070. width: 14rpx;
  1071. margin: 0 6rpx 0 10rpx;
  1072. }
  1073. .old-price {
  1074. .old-left {
  1075. font-size: 26rpx;
  1076. font-weight: 500;
  1077. text-decoration: line-through;
  1078. color: #999999;
  1079. }
  1080. .old-right {
  1081. font-size: 24rpx;
  1082. font-weight: bold;
  1083. color: #b59467;
  1084. }
  1085. }
  1086. .new-price {
  1087. width: 100%;
  1088. font-size: 36rpx;
  1089. font-weight: bold;
  1090. color: #ff4c4c;
  1091. justify-content: space-between;
  1092. .good-tip {
  1093. display: inline-block;
  1094. padding: 0 20rpx 0 17rpx;
  1095. min-width: 160rpx;
  1096. text-align: center;
  1097. line-height: 40rpx;
  1098. background: #f75022;
  1099. font-size: 24rpx;
  1100. font-weight: 500;
  1101. color: #fff;
  1102. border-radius: 10rpx;
  1103. position: relative;
  1104. &::before {
  1105. content: '';
  1106. display: inline-block;
  1107. height: 17rpx;
  1108. width: 17rpx;
  1109. background-color: #fff;
  1110. border-radius: 50%;
  1111. position: absolute;
  1112. top: 0;
  1113. bottom: 0;
  1114. left: -9rpx;
  1115. margin: auto;
  1116. }
  1117. &::after {
  1118. content: '';
  1119. display: inline-block;
  1120. height: 17rpx;
  1121. width: 17rpx;
  1122. background-color: #fff;
  1123. border-radius: 50%;
  1124. position: absolute;
  1125. top: 0;
  1126. bottom: 0;
  1127. right: -9rpx;
  1128. margin: auto;
  1129. }
  1130. }
  1131. }
  1132. }
  1133. }
  1134. }
  1135. }
  1136. .title-wrapper {
  1137. padding-left: 20rpx;
  1138. justify-content: flex-start;
  1139. align-items: center;
  1140. height: 86rpx;
  1141. line-height: 86rpx;
  1142. width: 690rpx;
  1143. margin: auto;
  1144. image {
  1145. width: 36rpx;
  1146. height: 36rpx;
  1147. background: linear-gradient(43deg, #ffc063, #ffa163);
  1148. border-radius: 50%;
  1149. }
  1150. view {
  1151. padding-left: 10rpx;
  1152. font-size: 32rpx;
  1153. font-family: PingFang SC;
  1154. font-weight: bold;
  1155. color: #242424;
  1156. }
  1157. .title-b {
  1158. font-size: 24rpx;
  1159. font-family: PingFang SC;
  1160. font-weight: 500;
  1161. color: #8b8b8b;
  1162. }
  1163. }
  1164. .shop-list {
  1165. padding-top: 20rpx;
  1166. flex-wrap: wrap;
  1167. background-color: #fff;
  1168. justify-content: flex-start;
  1169. .shop-item {
  1170. margin-bottom: 20rpx;
  1171. flex-direction: column;
  1172. width: 20%;
  1173. height: 100rpx;
  1174. image {
  1175. width: 60rpx;
  1176. height: 58rpx;
  1177. }
  1178. }
  1179. }
  1180. .gift-info {
  1181. width: 690rpx;
  1182. height: 155rpx;
  1183. background: linear-gradient(43deg, #ffb242, #ff944d);
  1184. border-radius: 12rpx 12rpx 0px 0px;
  1185. margin: auto;
  1186. color: #fff;
  1187. font-size: 24rpx;
  1188. font-weight: 400;
  1189. color: #ffffff;
  1190. view {
  1191. padding-left: 28rpx;
  1192. }
  1193. }
  1194. .gift-good-list {
  1195. width: 690rpx;
  1196. height: 243rpx;
  1197. background: #f4f4f4;
  1198. border-radius: 12rpx;
  1199. margin: auto;
  1200. .gift-list {
  1201. width: 670rpx;
  1202. height: 286rpx;
  1203. background: #fff;
  1204. border-radius: 12px;
  1205. // margin: -54rpx auto 0;
  1206. top: -54rpx;
  1207. left: 0;
  1208. right: 0;
  1209. margin: auto;
  1210. .gift-item {
  1211. background-color: #fff;
  1212. width: 223rpx;
  1213. height: 100%;
  1214. border-right: 1rpx solid #d6d7dc;
  1215. &:first-of-type {
  1216. border-radius: 12rpx 0 0 12rpx;
  1217. }
  1218. &:last-of-type {
  1219. margin-right: 0;
  1220. }
  1221. image {
  1222. width: 160rpx;
  1223. height: 160rpx;
  1224. }
  1225. .gift-name {
  1226. font-size: 22rpx;
  1227. font-weight: bold;
  1228. color: #3f3f3f;
  1229. line-height: 34px;
  1230. }
  1231. .gift-price {
  1232. font-size: 28rpx;
  1233. font-weight: bold;
  1234. color: #ff4c4c;
  1235. }
  1236. }
  1237. }
  1238. }
  1239. .djq-wrap {
  1240. width: 701rpx;
  1241. // height: 255rpx;
  1242. background: #ffffff;
  1243. box-shadow: 0px 0px 27rpx 0px rgba(50, 50, 52, 0.06);
  1244. border-radius: 20rpx;
  1245. margin: 0 auto 20rpx;
  1246. padding: 23rpx 22rpx;
  1247. &:last-of-type {
  1248. margin-bottom: 0;
  1249. }
  1250. .djq-img {
  1251. flex-shrink: 0;
  1252. width: 150rpx;
  1253. height: 150rpx;
  1254. border-radius: 10rpx;
  1255. }
  1256. .djq-right {
  1257. padding-left: 10rpx;
  1258. width: 500rpx;
  1259. .djq-tit {
  1260. font-size: 34rpx;
  1261. font-weight: bold;
  1262. color: #333333;
  1263. line-height: 52rpx;
  1264. .djq-name {
  1265. max-width: 300rpx;
  1266. }
  1267. .djq-dis {
  1268. flex-shrink: 0;
  1269. display: flex;
  1270. align-items: center;
  1271. image {
  1272. width: 20rpx;
  1273. height: 28rpx;
  1274. margin-right: 10rpx;
  1275. }
  1276. font-size: 22rpx;
  1277. font-weight: 500;
  1278. color: #666666;
  1279. }
  1280. }
  1281. .djq-dz-box {
  1282. width: 60%;
  1283. }
  1284. .djq-dz {
  1285. width: 100%;
  1286. font-size: 24rpx;
  1287. font-weight: 500;
  1288. color: #666666;
  1289. }
  1290. .djq-hd {
  1291. width: 30%;
  1292. display: flex;
  1293. justify-content: flex-end;
  1294. .buy-info {
  1295. display: inline-block;
  1296. height: 32rpx;
  1297. border-radius: 16rpx 16rpx 16rpx 0px;
  1298. line-height: 32rpx;
  1299. font-size: 20rpx;
  1300. font-weight: 500;
  1301. color: #ff440d;
  1302. padding: 0 15rpx;
  1303. background-color: #fff;
  1304. }
  1305. .hd-btn {
  1306. image {
  1307. width: 46rpx;
  1308. height: 46rpx;
  1309. }
  1310. }
  1311. }
  1312. }
  1313. }
  1314. .left-btm {
  1315. height: 66rpx;
  1316. .j-logo {
  1317. width: 32rpx;
  1318. line-height: 33rpx;
  1319. background: linear-gradient(-48deg, #ffa30b, #ffd158);
  1320. border-radius: 13rpx;
  1321. font-size: 21rpx;
  1322. font-weight: 500;
  1323. color: #ffffff;
  1324. text-align: center;
  1325. }
  1326. .j-price {
  1327. font-size: 27rpx;
  1328. font-weight: bold;
  1329. color: #ff4c4c;
  1330. margin: 0 10rpx 0 5rpx;
  1331. }
  1332. .j-zk {
  1333. height: 31rpx;
  1334. border: 1rpx solid #ff4c4c;
  1335. border-radius: 7rpx;
  1336. line-height: 31rpx;
  1337. padding: 0 8rpx;
  1338. font-size: 20rpx;
  1339. font-weight: bold;
  1340. color: #ff4c4c;
  1341. margin-right: 5rpx;
  1342. }
  1343. .j-name {
  1344. font-size: 23rpx;
  1345. font-weight: bold;
  1346. color: #333333;
  1347. }
  1348. }
  1349. .hotgoods {
  1350. // margin-top: 38rpx;
  1351. width: 100%;
  1352. display: flex;
  1353. flex-wrap: wrap;
  1354. padding: 0 0 30rpx;
  1355. .hotgoods-item {
  1356. width: 48%;
  1357. background-color: #ffffff;
  1358. border-radius: 12rpx;
  1359. &:nth-child(2n + 1) {
  1360. margin-right: 24rpx;
  1361. }
  1362. .image-wrapper {
  1363. width: 100%;
  1364. height: 330rpx;
  1365. border-radius: 3px;
  1366. overflow: hidden;
  1367. position: relative;
  1368. .image-bg {
  1369. position: absolute;
  1370. top: 0;
  1371. left: 0;
  1372. right: 0;
  1373. bottom: 0;
  1374. width: 100%;
  1375. height: 100%;
  1376. opacity: 1;
  1377. border-radius: 12rpx 12rpx 0 0;
  1378. z-index: 2;
  1379. }
  1380. .image {
  1381. width: 100%;
  1382. height: 100%;
  1383. opacity: 1;
  1384. border-radius: 12rpx 12rpx 0 0;
  1385. }
  1386. }
  1387. .title {
  1388. margin-top: 24rpx;
  1389. font-size: 28rpx;
  1390. font-family: PingFang SC;
  1391. font-weight: 500;
  1392. color: #333333;
  1393. }
  1394. .hot-price {
  1395. display: flex;
  1396. justify-content: space-between;
  1397. align-items: center;
  1398. padding: 14rpx 10rpx 30rpx;
  1399. .hotPrice-box {
  1400. width: 70rpx;
  1401. height: 28rpx;
  1402. background: linear-gradient(90deg, #c79a4c, #f9df7f);
  1403. border-radius: 5rpx;
  1404. text-align: center;
  1405. line-height: 28rpx;
  1406. font-size: 20rpx;
  1407. font-family: Source Han Sans CN;
  1408. font-weight: 400;
  1409. color: #ffffff;
  1410. }
  1411. .price {
  1412. // margin-left: 10rpx;
  1413. font-size: 40rpx;
  1414. color: #ff0000;
  1415. font-weight: 500;
  1416. }
  1417. .yuanPrice {
  1418. margin-left: 10rpx;
  1419. font-size: 20rpx;
  1420. font-weight: 500;
  1421. // text-decoration: line-through;
  1422. color: #999999;
  1423. }
  1424. .cart-icon {
  1425. image {
  1426. width: 44rpx;
  1427. height: 44rpx;
  1428. }
  1429. }
  1430. }
  1431. }
  1432. }
  1433. .product-box {
  1434. // margin-top: 20rpx;
  1435. background: #ffffff;
  1436. padding: 0rpx 30rpx 20rpx;
  1437. }
  1438. </style>