store.vue 34 KB

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