store.vue 34 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580
  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. // #ifndef APP
  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. // #endif
  413. },
  414. wgs84Togcj02(lng, lat) {
  415. if (this.out_of_china(lng, lat)) {
  416. return [lng, lat];
  417. }
  418. //定义一些常量
  419. //GCJ02 转换为 WGS84
  420. var that = this;
  421. const x_PI = (3.14159265358979324 * 3000.0) / 180.0;
  422. const PI = 3.1415926535897932384626;
  423. const a = 6378245.0;
  424. const ee = 0.00669342162296594323;
  425. let dlat = that.transformlat(lng - 105.0, lat - 35.0);
  426. let dlng = that.transformlng(lng - 105.0, lat - 35.0);
  427. let radlat = (lat / 180.0) * PI;
  428. let magic = Math.sin(radlat);
  429. magic = 1 - ee * magic * magic;
  430. let sqrtmagic = Math.sqrt(magic);
  431. dlat = (dlat * 180.0) / (((a * (1 - ee)) / (magic * sqrtmagic)) * PI);
  432. dlng = (dlng * 180.0) / ((a / sqrtmagic) * Math.cos(radlat) * PI);
  433. var mglat = lat + dlat;
  434. var mglng = lng + dlng;
  435. return [mglng, mglat];
  436. },
  437. out_of_china(lng, lat) {
  438. return lng < 72.004 || lng > 137.8347 || (lat < 0.8293 || lat > 55.8271 || false);
  439. },
  440. transformlat(lng, lat) {
  441. const x_PI = (3.14159265358979324 * 3000.0) / 180.0;
  442. const PI = 3.1415926535897932384626;
  443. const a = 6378245.0;
  444. const ee = 0.00669342162296594323;
  445. let ret = -100.0 + 2.0 * lng + 3.0 * lat + 0.2 * lat * lat + 0.1 * lng * lat + 0.2 * Math.sqrt(Math.abs(
  446. lng));
  447. ret += ((20.0 * Math.sin(6.0 * lng * PI) + 20.0 * Math.sin(2.0 * lng * PI)) * 2.0) / 3.0;
  448. ret += ((20.0 * Math.sin(lat * PI) + 40.0 * Math.sin((lat / 3.0) * PI)) * 2.0) / 3.0;
  449. ret += ((160.0 * Math.sin((lat / 12.0) * PI) + 320 * Math.sin((lat * PI) / 30.0)) * 2.0) / 3.0;
  450. return ret;
  451. },
  452. transformlng(lng, lat) {
  453. const x_PI = (3.14159265358979324 * 3000.0) / 180.0;
  454. const PI = 3.1415926535897932384626;
  455. const a = 6378245.0;
  456. const ee = 0.00669342162296594323;
  457. let ret = 300.0 + lng + 2.0 * lat + 0.1 * lng * lng + 0.1 * lng * lat + 0.1 * Math.sqrt(Math.abs(lng));
  458. ret += ((20.0 * Math.sin(6.0 * lng * PI) + 20.0 * Math.sin(2.0 * lng * PI)) * 2.0) / 3.0;
  459. ret += ((20.0 * Math.sin(lng * PI) + 40.0 * Math.sin((lng / 3.0) * PI)) * 2.0) / 3.0;
  460. ret += ((150.0 * Math.sin((lng / 12.0) * PI) + 300.0 * Math.sin((lng / 30.0) * PI)) * 2.0) / 3.0;
  461. return ret;
  462. },
  463. navTo(url) {
  464. if (url == '') {
  465. this.$api.msg('暂未开通,敬请期待');
  466. } else {
  467. uni.navigateTo({
  468. url
  469. });
  470. }
  471. },
  472. // 點擊搜索框
  473. clickSearch() {
  474. uni.navigateTo({
  475. url: '/pages/store/shopList'
  476. });
  477. },
  478. // 监听图片加载完成
  479. onImageError(key, index) {
  480. this[key][index].image = '/static/error/errorImage.jpg';
  481. },
  482. // 请求载入数据
  483. async loadData() {
  484. loadIndexs({})
  485. .then(({
  486. data
  487. }) => {
  488. this.carouselList = data.info.storebanner;
  489. uni.stopPullDownRefresh();
  490. })
  491. .catch(e => {
  492. uni.stopPullDownRefresh();
  493. });
  494. },
  495. //轮播图切换修改背景色
  496. swiperChange(e) {
  497. const index = e.detail.current;
  498. this.swiperCurrent = index;
  499. this.titleNViewBackground = this.carouselList[index].background;
  500. },
  501. // 轮播图跳转
  502. bannerNavToUrl(item) {
  503. // #ifdef H5
  504. console.log(item.wap_url.indexOf('http'), 'banner');
  505. if (item.wap_url.indexOf('http') >= 0) {
  506. window.location.href = item.wap_url;
  507. }
  508. // #endif
  509. //测试数据没有写id,用title代替
  510. uni.navigateTo({
  511. url: item.wap_url
  512. });
  513. },
  514. // 根据指定个数分割数组
  515. chunkArr(arr, size) {
  516. console.log(arr, 'arr+++++');
  517. //判断如果不是数组(就没有length),或者size没有传值,size小于1,就返回空数组
  518. if (!arr.length || !size || size < 1) return [];
  519. let [start, end, result] = [null, null, []];
  520. for (let i = 0; i < Math.ceil(arr.length / size); i++) {
  521. start = i * size;
  522. end = start + size;
  523. result.push(arr.slice(start, end));
  524. }
  525. return result;
  526. },
  527. gomapApp(latitude, longitude, name) {
  528. let url = '';
  529. if (plus.os.name == 'Android') {
  530. //判断是安卓端
  531. plus.nativeUI.actionSheet({
  532. //选择菜单
  533. title: '选择地图应用',
  534. cancel: '取消',
  535. buttons: [{
  536. title: '腾讯地图'
  537. }, {
  538. title: '百度地图'
  539. }, {
  540. title: '高德地图'
  541. }]
  542. },
  543. function(e) {
  544. switch (e.index) {
  545. //下面是拼接url,不同系统以及不同地图都有不同的拼接字段
  546. case 1:
  547. //注意referer=xxx的xxx替换成你在腾讯地图开发平台申请的key
  548. url = `qqmap://map/geocoder?coord=${latitude},${longitude}&referer=xxx`;
  549. break;
  550. case 2:
  551. url =
  552. `baidumap://map/marker?location=${latitude},${longitude}&title=${name}&coord_type=gcj02&src=andr.baidu.openAPIdemo`;
  553. break;
  554. case 3:
  555. url =
  556. `androidamap://viewMap?sourceApplication=appname&poiname=${name}&lat=${latitude}&lon=${longitude}&dev=0`;
  557. break;
  558. default:
  559. break;
  560. }
  561. if (url != '') {
  562. url = encodeURI(url);
  563. //plus.runtime.openURL(url,function(e){})调起手机APP应用
  564. plus.runtime.openURL(url, function(e) {
  565. plus.nativeUI.alert('本机未安装指定的地图应用');
  566. });
  567. }
  568. }
  569. );
  570. } else {
  571. // iOS上获取本机是否安装了百度高德地图,需要在manifest里配置
  572. // 在manifest.json文件app-plus->distribute->apple->urlschemewhitelist节点下添加
  573. //(如urlschemewhitelist:["iosamap","baidumap"])
  574. plus.nativeUI.actionSheet({
  575. title: '选择地图应用',
  576. cancel: '取消',
  577. buttons: [{
  578. title: '腾讯地图'
  579. }, {
  580. title: '百度地图'
  581. }, {
  582. title: '高德地图'
  583. }]
  584. },
  585. function(e) {
  586. switch (e.index) {
  587. case 1:
  588. url = `qqmap://map/geocoder?coord=${latitude},${longitude}&referer=xxx`;
  589. break;
  590. case 2:
  591. url =
  592. `baidumap://map/marker?location=${latitude},${longitude}&title=${name}&content=${name}&src=ios.baidu.openAPIdemo&coord_type=gcj02`;
  593. break;
  594. case 3:
  595. url =
  596. `iosamap://viewMap?sourceApplication=applicationName&poiname=${name}&lat=${latitude}&lon=${longitude}&dev=0`;
  597. break;
  598. default:
  599. break;
  600. }
  601. if (url != '') {
  602. url = encodeURI(url);
  603. plus.runtime.openURL(url, function(e) {
  604. plus.nativeUI.alert('本机未安装指定的地图应用');
  605. });
  606. }
  607. }
  608. );
  609. }
  610. },
  611. getCity() {
  612. let obj = this;
  613. console.log('进入city');
  614. getCity({
  615. lat: obj.latitude,
  616. lng: obj.longitude
  617. })
  618. .then(res => {
  619. console.log(res, '逆解析结果');
  620. obj.chooseDistrict = res.data.district;
  621. if (!obj.chooseDistrict) {
  622. obj.setChoose({
  623. chooseProvince: res.data.province,
  624. chooseCity: res.data.city,
  625. chooseDistrict: res.data.district
  626. });
  627. }
  628. obj.getStoreList();
  629. })
  630. .catch(err => {
  631. console.log(err, 'shibai');
  632. });
  633. },
  634. // 调用高德
  635. toGaodeMap(latitude, longitude, address) {
  636. window.location.href = `https://uri.amap.com/marker?position=${longitude},${latitude}&name=${address}`;
  637. }
  638. }
  639. };
  640. </script>
  641. <style lang="scss">
  642. page {
  643. background: #f8f6f9;
  644. }
  645. .carousel-section {
  646. position: relative;
  647. // padding-top: 10px;
  648. .bg {
  649. position: absolute;
  650. top: 0;
  651. left: 0;
  652. width: 750rpx;
  653. height: 378rpx;
  654. image {
  655. width: 100%;
  656. height: 100%;
  657. }
  658. }
  659. .titleNview-placing {
  660. height: var(--status-bar-height);
  661. box-sizing: content-box;
  662. }
  663. .search {
  664. justify-content: space-between;
  665. padding: 30rpx 32rpx 20rpx;
  666. align-items: center;
  667. background-color: #fff;
  668. .address {
  669. width: 32rpx;
  670. height: 38rpx;
  671. }
  672. .shop-name {
  673. height: 38rpx;
  674. position: relative;
  675. top: -4rpx;
  676. z-index: 100;
  677. width: 120rpx;
  678. font-size: 30rpx;
  679. font-family: PingFang SC;
  680. font-weight: 500;
  681. padding-left: 10rpx;
  682. }
  683. .shop-jt {
  684. margin-left: 8rpx;
  685. width: 16rpx;
  686. height: 10rpx;
  687. }
  688. .input-box {
  689. margin-left: 10rpx;
  690. position: relative;
  691. z-index: 99;
  692. width: 650rpx;
  693. height: 60rpx;
  694. background: #eeeeee;
  695. border-radius: 30rpx;
  696. .input-content {
  697. position: relative;
  698. z-index: 11;
  699. border-radius: 99rpx;
  700. flex-grow: 1;
  701. padding: 5rpx 30rpx;
  702. background: #eeeeee;
  703. .iconsearch {
  704. font-size: 50rpx;
  705. color: #cbcbcb;
  706. }
  707. .input {
  708. margin-left: 19rpx;
  709. flex-grow: 1;
  710. color: #cbcbcb;
  711. input {
  712. font-size: 28rpx;
  713. color: #cbcbcb;
  714. }
  715. }
  716. }
  717. .input-button {
  718. padding-left: 20rpx;
  719. font-size: $font-base;
  720. height: 100%;
  721. }
  722. }
  723. }
  724. }
  725. .carousel {
  726. position: relative;
  727. z-index: 3;
  728. width: 100%;
  729. height: 360rpx;
  730. background-color: #fff;
  731. .carousel-item {
  732. width: 100%;
  733. height: 100%;
  734. }
  735. image {
  736. width: 100%;
  737. height: 100%;
  738. }
  739. }
  740. .navbar {
  741. position: relative;
  742. z-index: 2;
  743. padding: 0 50rpx;
  744. margin-top: -200rpx;
  745. width: 750rpx;
  746. height: 420rpx;
  747. background: #ffffff;
  748. border-radius: 40rpx;
  749. .navbar-box {
  750. padding-top: 250rpx;
  751. .navbar-item {
  752. display: flex;
  753. flex-direction: column;
  754. align-items: center;
  755. width: 20%;
  756. .nitem-image {
  757. width: 90rpx;
  758. height: 90rpx;
  759. }
  760. .nitem-font {
  761. margin-top: 22rpx;
  762. font-size: 26rpx;
  763. font-family: PingFang SC;
  764. font-weight: 500;
  765. color: #000000;
  766. }
  767. }
  768. }
  769. }
  770. .jx {
  771. background: #fff;
  772. width: 750rpx;
  773. }
  774. .jx-box {
  775. background: #fff;
  776. display: flex;
  777. flex-direction: column;
  778. align-items: center;
  779. width: 750rpx;
  780. .jx-box-title {
  781. margin: 50rpx 0;
  782. width: 610rpx;
  783. height: 30rpx;
  784. image {
  785. width: 100%;
  786. height: 100%;
  787. }
  788. }
  789. .jx-box-img {
  790. width: 750rpx;
  791. height: 220rpx;
  792. image {
  793. width: 100%;
  794. height: 100%;
  795. }
  796. }
  797. }
  798. .cai {
  799. display: flex;
  800. justify-content: center;
  801. align-items: center;
  802. padding-bottom: 20rpx;
  803. font-size: 28rpx;
  804. font-weight: 500;
  805. color: #999999;
  806. }
  807. .jx-box-content {
  808. display: flex;
  809. .content-left {
  810. margin: 20rpx 15rpx;
  811. width: 236rpx;
  812. height: 236rpx;
  813. background: #e2e2e2;
  814. border-radius: 10rpx;
  815. image {
  816. width: 100%;
  817. height: 100%;
  818. }
  819. }
  820. .content-right {
  821. display: flex;
  822. flex-direction: column;
  823. justify-content: space-around;
  824. .shop-name {
  825. width: 382rpx;
  826. font-size: 32rpx;
  827. font-weight: bold;
  828. color: #333333;
  829. overflow: hidden;
  830. text-overflow: ellipsis;
  831. display: -webkit-box;
  832. -webkit-box-orient: vertical;
  833. -webkit-line-clamp: 2;
  834. }
  835. .shop-content {
  836. width: 455rpx;
  837. display: flex;
  838. justify-content: space-between;
  839. .shop-content-left {
  840. display: flex;
  841. flex-direction: column;
  842. .price-box {
  843. display: flex;
  844. align-items: center;
  845. .yuan-price {
  846. font-size: 26rpx;
  847. font-weight: 500;
  848. text-decoration: line-through;
  849. color: #999999;
  850. }
  851. image {
  852. margin: 0 10rpx;
  853. width: 16rpx;
  854. height: 18rpx;
  855. }
  856. .j-price {
  857. font-size: 24rpx;
  858. font-weight: bold;
  859. color: #b59467;
  860. }
  861. }
  862. .price-x {
  863. font-size: 36rpx;
  864. font-weight: bold;
  865. color: #ff4c4c;
  866. }
  867. }
  868. .shop-content-right {
  869. margin-top: 20rpx;
  870. align-items: center;
  871. text-align: center;
  872. width: 137rpx;
  873. height: 52rpx;
  874. font-size: 26rpx;
  875. font-weight: 500;
  876. color: #fff;
  877. background: #f75022;
  878. border-radius: 26rpx;
  879. line-height: 52rpx;
  880. }
  881. }
  882. }
  883. }
  884. .shop {
  885. margin-top: 20rpx;
  886. background: #ffffff;
  887. padding: 0 12rpx;
  888. .shop-title {
  889. padding: 30rpx 0 20rpx;
  890. display: flex;
  891. align-items: center;
  892. border-bottom: 1px solid #e3e6e7;
  893. .shop-item {
  894. width: 25%;
  895. display: flex;
  896. align-items: center;
  897. justify-content: center;
  898. .sitem-font {
  899. font-size: 26rpx;
  900. font-family: PingFang SC;
  901. font-weight: bold;
  902. color: #333333;
  903. }
  904. .choose {
  905. color: #ff4c4c;
  906. }
  907. .p-box {
  908. display: flex;
  909. flex-direction: column;
  910. .iconfont {
  911. display: flex;
  912. align-items: center;
  913. justify-content: center;
  914. width: 30rpx;
  915. height: 14rpx;
  916. line-height: 1;
  917. margin-left: 4rpx;
  918. font-size: 26rpx;
  919. color: #888;
  920. &.active {
  921. color: $base-color;
  922. }
  923. }
  924. .xia {
  925. transform: scaleY(-1);
  926. }
  927. }
  928. }
  929. }
  930. }
  931. .shop-main {
  932. padding: 32rpx 18rpx 0 12rpx;
  933. align-items: flex-start;
  934. justify-content: flex-start;
  935. .main-left {
  936. width: 180rpx;
  937. height: 180rpx;
  938. border-radius: 10rpx;
  939. }
  940. .main-right {
  941. width: 500rpx;
  942. justify-content: space-between;
  943. align-items: flex-start;
  944. margin-left: 20rpx;
  945. padding: 13rpx 0 35rpx;
  946. border-bottom: 1px solid #eaeced;
  947. .shopm-info {
  948. max-width: 60%;
  949. line-height: 1;
  950. .shopm-title {
  951. display: flex;
  952. justify-content: flex-start;
  953. .shopmt-font {
  954. font-size: 34rpx;
  955. font-family: PingFang SC;
  956. font-weight: bold;
  957. color: #333333;
  958. }
  959. .shopmt-good {
  960. margin-left: 6rpx;
  961. width: 30rpx;
  962. height: 30rpx;
  963. border: 1px solid #ff4c4c;
  964. border-radius: 5rpx;
  965. font-size: 20rpx;
  966. font-family: PingFang SC;
  967. font-weight: 500;
  968. color: #ff4c4c;
  969. text-align: center;
  970. line-height: 30rpx;
  971. }
  972. }
  973. .address {
  974. margin-top: 16rpx;
  975. font-size: 24rpx;
  976. font-family: PingFang SC;
  977. font-weight: 500;
  978. color: #666666;
  979. }
  980. .shopmt-tip {
  981. position: relative;
  982. display: inline-block;
  983. flex-grow: 0;
  984. margin-top: 52rpx;
  985. padding: 8rpx;
  986. background: #fcf3f0;
  987. border-radius: 16rpx 16rpx 16rpx 0px;
  988. font-size: 20rpx;
  989. font-family: PingFang SC;
  990. font-weight: 500;
  991. color: #ff440d;
  992. }
  993. }
  994. .right {
  995. height: 100%;
  996. margin-top: 5rpx;
  997. display: flex;
  998. flex-direction: column;
  999. .mright-top {
  1000. display: flex;
  1001. justify-content: flex-end;
  1002. align-items: center;
  1003. .mrt-image {
  1004. width: 20rpx;
  1005. height: 28rpx;
  1006. }
  1007. .mrt-font {
  1008. margin-left: 8rpx;
  1009. font-size: 22rpx;
  1010. font-family: PingFang SC;
  1011. font-weight: 500;
  1012. color: #666666;
  1013. }
  1014. }
  1015. .mright-bottom {
  1016. margin-top: 80rpx;
  1017. display: flex;
  1018. justify-content: flex-end;
  1019. .mrb-item {
  1020. width: 46rpx;
  1021. height: 46rpx;
  1022. margin-left: 14rpx;
  1023. }
  1024. }
  1025. }
  1026. }
  1027. }
  1028. .good-list {
  1029. width: 750rpx;
  1030. background: linear-gradient(0deg, #ffffff, #f8f8f8);
  1031. padding: 0 30rpx 30rpx;
  1032. .good {
  1033. width: 690rpx;
  1034. height: 276rpx;
  1035. background: #ffffff;
  1036. box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
  1037. border-radius: 10rpx;
  1038. margin: auto;
  1039. padding: 20rpx 15rpx;
  1040. margin-bottom: 20rpx;
  1041. &:last-of-type {
  1042. margin-bottom: 0rpx;
  1043. }
  1044. .good-img {
  1045. flex-shrink: 0;
  1046. width: 236rpx;
  1047. height: 236rpx;
  1048. border-radius: 10rpx;
  1049. margin-right: 22rpx;
  1050. image {
  1051. width: 236rpx;
  1052. height: 236rpx;
  1053. border-radius: 10rpx;
  1054. }
  1055. }
  1056. .good-info {
  1057. flex-grow: 1;
  1058. height: 100%;
  1059. flex-direction: column;
  1060. justify-content: space-between;
  1061. align-items: flex-start;
  1062. .good-name {
  1063. font-size: 32rpx;
  1064. font-weight: bold;
  1065. padding-top: 10rpx;
  1066. color: #333333;
  1067. }
  1068. .good-price {
  1069. width: 100%;
  1070. image {
  1071. width: 14rpx;
  1072. margin: 0 6rpx 0 10rpx;
  1073. }
  1074. .old-price {
  1075. .old-left {
  1076. font-size: 26rpx;
  1077. font-weight: 500;
  1078. text-decoration: line-through;
  1079. color: #999999;
  1080. }
  1081. .old-right {
  1082. font-size: 24rpx;
  1083. font-weight: bold;
  1084. color: #b59467;
  1085. }
  1086. }
  1087. .new-price {
  1088. width: 100%;
  1089. font-size: 36rpx;
  1090. font-weight: bold;
  1091. color: #ff4c4c;
  1092. justify-content: space-between;
  1093. .good-tip {
  1094. display: inline-block;
  1095. padding: 0 20rpx 0 17rpx;
  1096. min-width: 160rpx;
  1097. text-align: center;
  1098. line-height: 40rpx;
  1099. background: #f75022;
  1100. font-size: 24rpx;
  1101. font-weight: 500;
  1102. color: #fff;
  1103. border-radius: 10rpx;
  1104. position: relative;
  1105. &::before {
  1106. content: '';
  1107. display: inline-block;
  1108. height: 17rpx;
  1109. width: 17rpx;
  1110. background-color: #fff;
  1111. border-radius: 50%;
  1112. position: absolute;
  1113. top: 0;
  1114. bottom: 0;
  1115. left: -9rpx;
  1116. margin: auto;
  1117. }
  1118. &::after {
  1119. content: '';
  1120. display: inline-block;
  1121. height: 17rpx;
  1122. width: 17rpx;
  1123. background-color: #fff;
  1124. border-radius: 50%;
  1125. position: absolute;
  1126. top: 0;
  1127. bottom: 0;
  1128. right: -9rpx;
  1129. margin: auto;
  1130. }
  1131. }
  1132. }
  1133. }
  1134. }
  1135. }
  1136. }
  1137. .title-wrapper {
  1138. padding-left: 20rpx;
  1139. justify-content: flex-start;
  1140. align-items: center;
  1141. height: 86rpx;
  1142. line-height: 86rpx;
  1143. width: 690rpx;
  1144. margin: auto;
  1145. image {
  1146. width: 36rpx;
  1147. height: 36rpx;
  1148. background: linear-gradient(43deg, #ffc063, #ffa163);
  1149. border-radius: 50%;
  1150. }
  1151. view {
  1152. padding-left: 10rpx;
  1153. font-size: 32rpx;
  1154. font-family: PingFang SC;
  1155. font-weight: bold;
  1156. color: #242424;
  1157. }
  1158. .title-b {
  1159. font-size: 24rpx;
  1160. font-family: PingFang SC;
  1161. font-weight: 500;
  1162. color: #8b8b8b;
  1163. }
  1164. }
  1165. .shop-list {
  1166. padding-top: 20rpx;
  1167. flex-wrap: wrap;
  1168. background-color: #fff;
  1169. justify-content: flex-start;
  1170. .shop-item {
  1171. margin-bottom: 20rpx;
  1172. flex-direction: column;
  1173. width: 20%;
  1174. height: 100rpx;
  1175. image {
  1176. width: 60rpx;
  1177. height: 58rpx;
  1178. }
  1179. }
  1180. }
  1181. .gift-info {
  1182. width: 690rpx;
  1183. height: 155rpx;
  1184. background: linear-gradient(43deg, #ffb242, #ff944d);
  1185. border-radius: 12rpx 12rpx 0px 0px;
  1186. margin: auto;
  1187. color: #fff;
  1188. font-size: 24rpx;
  1189. font-weight: 400;
  1190. color: #ffffff;
  1191. view {
  1192. padding-left: 28rpx;
  1193. }
  1194. }
  1195. .gift-good-list {
  1196. width: 690rpx;
  1197. height: 243rpx;
  1198. background: #f4f4f4;
  1199. border-radius: 12rpx;
  1200. margin: auto;
  1201. .gift-list {
  1202. width: 670rpx;
  1203. height: 286rpx;
  1204. background: #fff;
  1205. border-radius: 12px;
  1206. // margin: -54rpx auto 0;
  1207. top: -54rpx;
  1208. left: 0;
  1209. right: 0;
  1210. margin: auto;
  1211. .gift-item {
  1212. background-color: #fff;
  1213. width: 223rpx;
  1214. height: 100%;
  1215. border-right: 1rpx solid #d6d7dc;
  1216. &:first-of-type {
  1217. border-radius: 12rpx 0 0 12rpx;
  1218. }
  1219. &:last-of-type {
  1220. margin-right: 0;
  1221. }
  1222. image {
  1223. width: 160rpx;
  1224. height: 160rpx;
  1225. }
  1226. .gift-name {
  1227. font-size: 22rpx;
  1228. font-weight: bold;
  1229. color: #3f3f3f;
  1230. line-height: 34px;
  1231. }
  1232. .gift-price {
  1233. font-size: 28rpx;
  1234. font-weight: bold;
  1235. color: #ff4c4c;
  1236. }
  1237. }
  1238. }
  1239. }
  1240. .djq-wrap {
  1241. width: 701rpx;
  1242. // height: 255rpx;
  1243. background: #ffffff;
  1244. box-shadow: 0px 0px 27rpx 0px rgba(50, 50, 52, 0.06);
  1245. border-radius: 20rpx;
  1246. margin: 0 auto 20rpx;
  1247. padding: 23rpx 22rpx;
  1248. &:last-of-type {
  1249. margin-bottom: 0;
  1250. }
  1251. .djq-img {
  1252. flex-shrink: 0;
  1253. width: 150rpx;
  1254. height: 150rpx;
  1255. border-radius: 10rpx;
  1256. }
  1257. .djq-right {
  1258. padding-left: 10rpx;
  1259. width: 500rpx;
  1260. .djq-tit {
  1261. font-size: 34rpx;
  1262. font-weight: bold;
  1263. color: #333333;
  1264. line-height: 52rpx;
  1265. .djq-name {
  1266. max-width: 300rpx;
  1267. }
  1268. .djq-dis {
  1269. flex-shrink: 0;
  1270. display: flex;
  1271. align-items: center;
  1272. image {
  1273. width: 20rpx;
  1274. height: 28rpx;
  1275. margin-right: 10rpx;
  1276. }
  1277. font-size: 22rpx;
  1278. font-weight: 500;
  1279. color: #666666;
  1280. }
  1281. }
  1282. .djq-dz-box {
  1283. width: 60%;
  1284. }
  1285. .djq-dz {
  1286. width: 100%;
  1287. font-size: 24rpx;
  1288. font-weight: 500;
  1289. color: #666666;
  1290. }
  1291. .djq-hd {
  1292. width: 30%;
  1293. display: flex;
  1294. justify-content: flex-end;
  1295. .buy-info {
  1296. display: inline-block;
  1297. height: 32rpx;
  1298. border-radius: 16rpx 16rpx 16rpx 0px;
  1299. line-height: 32rpx;
  1300. font-size: 20rpx;
  1301. font-weight: 500;
  1302. color: #ff440d;
  1303. padding: 0 15rpx;
  1304. background-color: #fff;
  1305. }
  1306. .hd-btn {
  1307. image {
  1308. width: 46rpx;
  1309. height: 46rpx;
  1310. }
  1311. }
  1312. }
  1313. }
  1314. }
  1315. .left-btm {
  1316. height: 66rpx;
  1317. .j-logo {
  1318. width: 32rpx;
  1319. line-height: 33rpx;
  1320. background: linear-gradient(-48deg, #ffa30b, #ffd158);
  1321. border-radius: 13rpx;
  1322. font-size: 21rpx;
  1323. font-weight: 500;
  1324. color: #ffffff;
  1325. text-align: center;
  1326. }
  1327. .j-price {
  1328. font-size: 27rpx;
  1329. font-weight: bold;
  1330. color: #ff4c4c;
  1331. margin: 0 10rpx 0 5rpx;
  1332. }
  1333. .j-zk {
  1334. height: 31rpx;
  1335. border: 1rpx solid #ff4c4c;
  1336. border-radius: 7rpx;
  1337. line-height: 31rpx;
  1338. padding: 0 8rpx;
  1339. font-size: 20rpx;
  1340. font-weight: bold;
  1341. color: #ff4c4c;
  1342. margin-right: 5rpx;
  1343. }
  1344. .j-name {
  1345. font-size: 23rpx;
  1346. font-weight: bold;
  1347. color: #333333;
  1348. }
  1349. }
  1350. .hotgoods {
  1351. // margin-top: 38rpx;
  1352. width: 100%;
  1353. display: flex;
  1354. flex-wrap: wrap;
  1355. padding: 0 0 30rpx;
  1356. .hotgoods-item {
  1357. width: 48%;
  1358. background-color: #ffffff;
  1359. border-radius: 12rpx;
  1360. &:nth-child(2n + 1) {
  1361. margin-right: 24rpx;
  1362. }
  1363. .image-wrapper {
  1364. width: 100%;
  1365. height: 330rpx;
  1366. border-radius: 3px;
  1367. overflow: hidden;
  1368. position: relative;
  1369. .image-bg {
  1370. position: absolute;
  1371. top: 0;
  1372. left: 0;
  1373. right: 0;
  1374. bottom: 0;
  1375. width: 100%;
  1376. height: 100%;
  1377. opacity: 1;
  1378. border-radius: 12rpx 12rpx 0 0;
  1379. z-index: 2;
  1380. }
  1381. .image {
  1382. width: 100%;
  1383. height: 100%;
  1384. opacity: 1;
  1385. border-radius: 12rpx 12rpx 0 0;
  1386. }
  1387. }
  1388. .title {
  1389. margin-top: 24rpx;
  1390. font-size: 28rpx;
  1391. font-family: PingFang SC;
  1392. font-weight: 500;
  1393. color: #333333;
  1394. }
  1395. .hot-price {
  1396. display: flex;
  1397. justify-content: space-between;
  1398. align-items: center;
  1399. padding: 14rpx 10rpx 30rpx;
  1400. .hotPrice-box {
  1401. width: 70rpx;
  1402. height: 28rpx;
  1403. background: linear-gradient(90deg, #c79a4c, #f9df7f);
  1404. border-radius: 5rpx;
  1405. text-align: center;
  1406. line-height: 28rpx;
  1407. font-size: 20rpx;
  1408. font-family: Source Han Sans CN;
  1409. font-weight: 400;
  1410. color: #ffffff;
  1411. }
  1412. .price {
  1413. // margin-left: 10rpx;
  1414. font-size: 40rpx;
  1415. color: #ff0000;
  1416. font-weight: 500;
  1417. }
  1418. .yuanPrice {
  1419. margin-left: 10rpx;
  1420. font-size: 20rpx;
  1421. font-weight: 500;
  1422. // text-decoration: line-through;
  1423. color: #999999;
  1424. }
  1425. .cart-icon {
  1426. image {
  1427. width: 44rpx;
  1428. height: 44rpx;
  1429. }
  1430. }
  1431. }
  1432. }
  1433. }
  1434. .product-box {
  1435. // margin-top: 20rpx;
  1436. background: #ffffff;
  1437. padding: 0rpx 30rpx 20rpx;
  1438. }
  1439. </style>