index.vue 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725
  1. <template>
  2. <view class="container">
  3. <!-- 小程序头部兼容 -->
  4. <view class="lalala"></view>
  5. <view class="input-box flex" @click="clickSearch">
  6. <view class=" input-content flex">
  7. <view class="iconfont iconsearch"></view>
  8. <view class="input"><input type="text" disabled placeholder="请输入搜索内容" /></view>
  9. </view>
  10. </view>
  11. <!-- 头部轮播 -->
  12. <view class="carousel-section">
  13. <!-- 标题栏和状态栏占位符 -->
  14. <view class="titleNview-placing"></view>
  15. <!-- 背景色区域 -->
  16. <view class="titleNview-background" :style="{ backgroundColor: '#fff' }"></view>
  17. <swiper class="carousel" autoplay="true" duration="400" interval="5000" @change="swiperChange">
  18. <swiper-item v-for="(item, index) in carouselList" :key="index" class="carousel-item"
  19. @click="bannerNavToUrl(item)">
  20. <image :src="item.pic" />
  21. </swiper-item>
  22. </swiper>
  23. <!-- 自定义swiper指示器 -->
  24. <!-- <view class="swiper-dots">
  25. <text class="num">{{ swiperCurrent + 1 }}</text>
  26. <text class="sign">/</text>
  27. <text class="num">{{ swiperLength }}</text>
  28. </view> -->
  29. </view>
  30. <!-- 分类 -->
  31. <view class="cate-section">
  32. <view v-for="menus in menusList" class="cate-item" @click="navToTab(menus.url)">
  33. <image :src="menus.pic"></image>
  34. <text>{{menus.name}}</text>
  35. </view>
  36. <!-- <view class="cate-item" @click="navTo('/pages/product/construction')">
  37. <image src="/static/icon/c7.png"></image>
  38. <text>礼包商品</text>
  39. </view>
  40. <view class="cate-item" @click="navTo('/pages/user/shareQrCode')">
  41. <image src="/static/icon/c8.png"></image>
  42. <text>分享有礼</text>
  43. </view> -->
  44. <!-- <view class="cate-item" @click="navTo('/pages/index/loveitem?id=1')">
  45. <image src="/static/icon/c8.png"></image>
  46. <text>员工找工作</text>
  47. </view> -->
  48. <!-- <view class="cate-item" @click="navTo('/pages/index/loveitem?id=2')">
  49. <image src="/static/icon/c8.png"></image>
  50. <text>企业找员工</text>
  51. </view> -->
  52. <!-- <view class="cate-item" @click="navTo('/pages/index/loveitem?id=3')">
  53. <image src="/static/icon/c8.png"></image>
  54. <text>在线就医</text>
  55. </view> -->
  56. <!-- <view class="cate-item" @click="navTo('/pages/index/loveitem?id=4')">
  57. <image src="/static/icon/c8.png"></image>
  58. <text>红娘牵线</text>
  59. </view> -->
  60. <!-- <view class="cate-item" @click="navTo('/pages/index/loveitem?id=5')">
  61. <image src="/static/icon/c8.png"></image>
  62. <text>公益众筹</text>
  63. </view> -->
  64. <!-- <view class="cate-item" @click="navTo('/pages/index/loveitem?id=6')">
  65. <image src="/static/icon/c8.png"></image>
  66. <text>贫困助学</text>
  67. </view> -->
  68. <!-- <view class="cate-item" @click="navTo('/pages/index/loveitem?id=7')">
  69. <image src="/static/icon/c8.png"></image>
  70. <text>商标专利注册</text>
  71. </view> -->
  72. <!-- <view class="cate-item" @click="navTo('/pages/index/loveitem?id=8')">
  73. <image src="/static/icon/c8.png"></image>
  74. <text>旅游旅居</text>
  75. </view> -->
  76. <!-- <view class="cate-item" @click="navTo('/pages/index/loveitem?id=9')">
  77. <image src="/static/icon/c8.png"></image>
  78. <text>直播互动</text>
  79. </view> -->
  80. <!-- <view class="ewm" @click="openewm()" v-if="wechat_qrcode">
  81. <image :src="wechat_qrcode" mode=""></image>
  82. </view> -->
  83. </view>
  84. <!-- 秒杀楼层 -->
  85. <!-- <seckill></seckill> -->
  86. <!-- 附近门店 -->
  87. <view class="store-wrapper" v-if="storeList.length != 0">
  88. <view class="title-wrapper flex">
  89. <image src="/static/icon/t2.png" mode=""></image>
  90. <view class="">附近门店</view>
  91. <view class="title-b">门店好物随心购</view>
  92. </view>
  93. <view class="store flex" v-for="item in storeList" @click="navTo('/pages/store/storeDetail?id=' + item.id)"
  94. :key="item.id">
  95. <image :src="item.image" mode="" class="store-img"></image>
  96. <view class="store-info">
  97. <view class="store-name">{{ item.name }}</view>
  98. <view class="store-detail">{{ item.detailed_address }}</view>
  99. <view class="store-tip">门店</view>
  100. <view class="store-des">
  101. <image src="../../static/icon/dingwei.png" mode=""></image>
  102. 距离 {{ item.space }}
  103. </view>
  104. </view>
  105. </view>
  106. </view>
  107. <view class="store-wrapper">
  108. <view class="title-wrapper flex">
  109. <image src="/static/icon/t3.png" mode=""></image>
  110. <view class="">会员礼包</view>
  111. <view class="title-b">享受多重优惠</view>
  112. </view>
  113. <view class="goods-wrapper flex">
  114. <view class="good" v-if="userInfo.uid && userInfo.level<=1" v-show="auth ==0"
  115. @click="navTo('/pages/store/apply')">
  116. <image src="../../static/img/daili.jpg" class="good-img"></image>
  117. <view class="good-name clamp">加盟代理</view>
  118. <view class="good-info clamp">纯植物无香精</view>
  119. <view class="good-price">
  120. <text class="new-price">568.00</text>
  121. <text class="old-price">755.00</text>
  122. </view>
  123. </view>
  124. <view class="good" v-for="item in vip"
  125. @click="navTo('/pages/product/product?id='+ item.id + '&spread=' + userInfo.uid )" :key="item.id">
  126. <image :src="item.image" mode="" class="good-img"></image>
  127. <view class="good-name clamp">{{ item.store_name }}</view>
  128. <!-- <view class="good-info clamp">纯植物无香精</view> -->
  129. <view class="good-price">
  130. <text class="new-price">{{ item.price }}</text>
  131. <text class="old-price">{{ item.ot_price }}</text>
  132. </view>
  133. </view>
  134. </view>
  135. </view>
  136. <!-- 好货推荐 -->
  137. <view class="store-wrapper">
  138. <view class="title-wrapper flex">
  139. <image src="/static/icon/t3.png" mode=""></image>
  140. <view class="">爆单专区</view>
  141. <view class="title-b">优选商品低价入手</view>
  142. </view>
  143. <view class="goods-wrapper flex">
  144. <!-- <view class="good" v-if="userInfo.uid && userInfo.level<=1"
  145. v-show="auth ==0"
  146. @click="navTo('/pages/store/apply')">
  147. <image src="../../static/img/daili.jpg" class="good-img"></image>
  148. <view class="good-name clamp">加盟代理</view>
  149. <!-- <view class="good-info clamp">纯植物无香精</view> -->
  150. <!-- <view class="good-price">
  151. <text class="new-price">568.00</text>
  152. <text class="old-price">755.00</text>
  153. </view> -->
  154. <!-- </view> -->
  155. <view class="good" v-for="item in bastList"
  156. @click="navTo('/pages/product/product?id='+ item.id + '&spread=' + userInfo.uid )" :key="item.id">
  157. <image :src="item.image" mode="" class="good-img"></image>
  158. <view class="good-name clamp">{{ item.store_name }}</view>
  159. <!-- <view class="good-info clamp">纯植物无香精</view> -->
  160. <view class="good-price">
  161. <text class="new-price">{{ item.price }}</text>
  162. <text class="old-price">{{ item.ot_price }}</text>
  163. </view>
  164. </view>
  165. </view>
  166. </view>
  167. <view class="Mask" v-show="shareShow">
  168. <image @click="share" src="http://shicai.liuniu946.com/static/img/shareimg4.png"></image>
  169. <view class="Toshare" @click="Toshare"></view>
  170. <view class="Tocancel" @click="Tocancel"></view>
  171. </view>
  172. <uni-popup ref="popup" type="center">
  173. <view class="popup-box">
  174. <image :src="wechat_qrcode" mode="" class="gzhqr"></image>
  175. <view>长按关注公众号</view>
  176. </view>
  177. </uni-popup>
  178. <p>{{laji | filter}}</p>
  179. </view>
  180. </template>
  181. <script>
  182. import {
  183. timeComputed,
  184. space,
  185. openMap
  186. } from '@/utils/rocessor.js';
  187. import {
  188. loadIndexs,
  189. getStoreList,
  190. addJifen
  191. } from '@/api/index.js';
  192. import {
  193. getUserInfo
  194. } from '@/api/user.js';
  195. import {
  196. setCoupons
  197. } from '@/api/functionalUnit.js';
  198. import {
  199. getBargainList,
  200. getProducts
  201. } from '@/api/product.js';
  202. import {
  203. interceptor
  204. } from '@/utils/loginUtils';
  205. import {
  206. mapState,
  207. mapMutations
  208. } from 'vuex';
  209. // #ifdef H5
  210. import {
  211. weixinObj,
  212. shareLoad
  213. } from '@/utils/wxAuthorized';
  214. // #endif
  215. export default {
  216. components: {
  217. // seckill
  218. },
  219. watch: {
  220. //自适应swiper高度
  221. checkid(newValue, oldValue) {
  222. let obj = this;
  223. if (newValue == 0) {
  224. let bHeight = Math.ceil(obj.bastList.length / 2);
  225. obj.swiperHeight = Math.ceil(obj.pageProportion * 520 * bHeight);
  226. }
  227. if (newValue == 1) {
  228. let bHeight = Math.ceil(obj.goodsList.length / 2);
  229. obj.swiperHeight = Math.ceil(obj.pageProportion * 520 * bHeight);
  230. }
  231. if (newValue == 2) {
  232. let bHeight = Math.ceil(obj.bastBanner.length / 2);
  233. obj.swiperHeight = Math.ceil(obj.pageProportion * 520 * bHeight);
  234. }
  235. }
  236. },
  237. data() {
  238. return {
  239. laji: ['吃藕垃圾', '我不是垃圾'],
  240. vip: [], //会员礼包
  241. shop: [],
  242. isAuth: 0,
  243. wechat_qrcode: '', //公众号二维码
  244. storeList: [], //门店列表
  245. shareShow: false, //分享海报
  246. pageProportion: 0, //保存页面基于750宽度的比例
  247. swiperHeight: 0,
  248. checkid: 0,
  249. titleNViewBackground: '',
  250. swiperCurrent: 0,
  251. swiperLength: 0,
  252. bargainlist: [], //砍价商品
  253. carouselList: [], //轮播列表
  254. goodsList: [], //最新商品列表
  255. bastList: [], //精品推荐列表
  256. bastBanner: [], //促销商品列表
  257. menusList: [], //头部菜单
  258. page: 1,
  259. limit: 5,
  260. userServant: [{
  261. image: ''
  262. }], //用户推广服务
  263. couponArray: [], //可领取优惠券
  264. recommend: [{
  265. id: 0,
  266. re_title: '精选',
  267. re_name: '为你推荐'
  268. },
  269. {
  270. id: 1,
  271. re_title: '最新',
  272. re_name: '最新好货优选'
  273. },
  274. {
  275. id: 2,
  276. re_title: '便宜好货',
  277. re_name: '90天便宜好货'
  278. }
  279. ],
  280. actTime: new Date()
  281. };
  282. },
  283. computed: {
  284. ...mapState(['loginInterceptor', 'baseURL', 'urlFile']),
  285. ...mapState('user', ['hasLogin', 'userInfo']),
  286. ...mapState('latlon', ['lat', 'lon']),
  287. auth() {
  288. loadIndexs({}).then(({
  289. data
  290. }) => {
  291. this.isAuth = data.is_auth
  292. })
  293. return this.isAuth
  294. }
  295. },
  296. filters: {
  297. filter(laji) {
  298. return laji[0]
  299. }
  300. },
  301. onShareAppMessage() {
  302. // 设置菜单中的转发按钮触发转发事件时的转发内容
  303. let pages = getCurrentPages(); //获取加载的页面
  304. let currentPage = pages[pages.length - 1]; //获取当前页面的对象
  305. console.log(currentPage, '1919');
  306. let url = currentPage.route; //当前页面url
  307. let item = currentPage.options; //如果要获取url中所带的参数可以查看options
  308. addJifen({}).then(({
  309. data
  310. }) => {
  311. console.log(data, 'fenxiang');
  312. })
  313. console.log(url + '?id=' + item.id + '&spread=' + this.userInfo.uid)
  314. let shareObj = {
  315. title: this.userInfo.nickname + "邀请您加入永省购", // 默认是小程序的名称(可以写slogan等)
  316. path: url + '?id=' + item.id + '&spread=' + this.userInfo.uid, // 默认是当前页面,必须是以‘/’开头的完整路径
  317. // imageUrl: ,
  318. success: function(res) {
  319. console.log(res, 'xuhaolan');
  320. // 转发成功之后的回调
  321. if (res.errMsg == 'shareAppMessage:ok') {
  322. }
  323. //token
  324. },
  325. fail: function() {
  326. // 转发失败之后的回调
  327. if (res.errMsg == 'shareAppMessage:fail cancel') {
  328. // 用户取消转发
  329. } else if (res.errMsg == 'shareAppMessage:fail') {
  330. // 转发失败,其中 detail message 为详细失败信息
  331. }
  332. }
  333. };
  334. return shareObj;
  335. },
  336. onLoad: function(option) {
  337. console.log(this.userInfo.uid, '111222');
  338. // #ifndef MP
  339. if (option.spread) {
  340. // 存储其他邀请人
  341. uni.setStorageSync('spread', option.spread);
  342. }
  343. // #endif
  344. // #ifdef MP
  345. if (option.scene) {
  346. // 存储小程序邀请人
  347. uni.setStorage({
  348. key: 'spread_code',
  349. data: option.scene
  350. });
  351. }
  352. // #endif
  353. // #ifdef H5
  354. shareLoad();
  355. // #endif
  356. // weixinObj.showAllNonBaseMenuItem();
  357. // this.getaddress();
  358. },
  359. onShow: function() {
  360. // 判断是否强制登录
  361. // if (this.loginInterceptor && !this.hasLogin) {
  362. // // 登录拦截
  363. // interceptor();
  364. // }
  365. wx.hideShareMenu()
  366. if (this.userInfo.uid) {
  367. wx.showShareMenu()
  368. }
  369. this.loadData();
  370. this.getBargainList();
  371. // #ifdef MP-WEIXIN
  372. this.IndexShare()
  373. // #endif
  374. this.getVip()
  375. },
  376. //下拉刷新
  377. onPullDownRefresh() {
  378. this.loadData();
  379. },
  380. // #ifndef MP
  381. // 监听导航栏输入框点击事件
  382. onNavigationBarSearchInputClicked(e) {
  383. //跳转到搜索页面
  384. this.clickSearch();
  385. },
  386. //点击导航栏 buttons 时触发
  387. onNavigationBarButtonTap(e) {
  388. const index = e.index;
  389. if (index === 0) {
  390. this.$api.msg('点击了扫描');
  391. } else if (index === 1) {
  392. // #ifdef APP-PLUS
  393. const pages = getCurrentPages();
  394. const page = pages[pages.length - 1];
  395. const currentWebview = page.$getAppWebview();
  396. currentWebview.hideTitleNViewButtonRedDot({
  397. index
  398. });
  399. // #endif
  400. uni.navigateTo({
  401. url: '/pages/user/notice'
  402. });
  403. }
  404. },
  405. // #endif
  406. methods: {
  407. getVip() {
  408. let obj = this
  409. getProducts({
  410. is_gift: 1
  411. }).then(res => {
  412. obj.vip = res.data
  413. console.log(obj.vip, '21312');
  414. })
  415. },
  416. // #ifdef MP-WEIXIN
  417. IndexShare() {
  418. let obj = this;
  419. let pages = getCurrentPages();
  420. // 获取当前页面
  421. let page = pages[pages.length - 1];
  422. let path = '/#/pages/index/index' + '?';
  423. // 保存传值
  424. for (let i in page.options) {
  425. path += i + '=' + page.options[i] + '&';
  426. }
  427. console.log(obj.Path)
  428. // 保存邀请人
  429. path += 'spread=' + this.userInfo.uid;
  430. let data = {
  431. link: this.baseURL + path,
  432. title: this.userInfo.nickname + '邀请您进入Xingwang永省购',
  433. desc: '欢迎加入Xingwang永省购',
  434. imgUrl: 'http://xw.liuniu946.com/static/img/logo.png'
  435. };
  436. console.log(data, '分享数据');
  437. // shareLoad(data);
  438. },
  439. // #endif
  440. openewm() {
  441. this.$refs.popup.open()
  442. },
  443. navTo(url) {
  444. uni.navigateTo({
  445. url: url
  446. })
  447. },
  448. ...mapMutations('latlon', ['setLat', 'setLon']),
  449. navToTab(url) {
  450. uni.navigateTo({
  451. url,
  452. fail() {
  453. uni.switchTab({
  454. url
  455. })
  456. }
  457. })
  458. },
  459. //砍价商品推荐详情页
  460. navToDetailPages(item) {
  461. let id = item.product_id;
  462. //let type = 2;
  463. uni.navigateTo({
  464. url: '/pages/product/product?id=' + id
  465. });
  466. },
  467. openSubscribe: function(e) {
  468. let page = e;
  469. // #ifndef MP
  470. uni.navigateTo({
  471. url: page
  472. });
  473. // #endif
  474. // #ifdef MP
  475. uni.showLoading({
  476. title: '正在加载'
  477. });
  478. openBargainSubscribe()
  479. .then(res => {
  480. uni.hideLoading();
  481. uni.navigateTo({
  482. url: page
  483. });
  484. })
  485. .catch(err => {
  486. uni.hideLoading();
  487. });
  488. // #endif
  489. },
  490. getBargainList() {
  491. let that = this;
  492. getBargainList({
  493. page: that.page,
  494. limit: that.limit
  495. })
  496. .then(function(res) {
  497. that.$set(that, 'bargainlist', res.data.slice(0, 2));
  498. })
  499. .catch(res => {
  500. console.log(res, 'getBargainList');
  501. });
  502. },
  503. Mask() {
  504. this.MaskShow = false;
  505. this.shareShow = true;
  506. uni.setStorage({
  507. key: 'FirstEntry',
  508. data: true,
  509. success: function() {
  510. console.log(uni.getStorageSync('FirstEntry'), 'Mask');
  511. }
  512. });
  513. },
  514. Toshare() {
  515. if (this.userInfo == '') {
  516. getUserInfo({})
  517. .then(({
  518. data
  519. }) => {
  520. this.setUserInfo(data);
  521. this.userInfo = data;
  522. })
  523. .catch(e => {});
  524. } else {
  525. this.shareShow = false;
  526. uni.navigateTo({
  527. url: '/pages/user/shareQrCode?spread=' + this.userInfo.uid
  528. });
  529. }
  530. },
  531. Tocancel() {
  532. this.shareShow = false;
  533. },
  534. // 监听切换事件
  535. listChange(e) {
  536. this.checkid = e.detail.current;
  537. },
  538. // 點擊搜索框
  539. clickSearch() {
  540. uni.navigateTo({
  541. url: '/pages/product/search'
  542. });
  543. },
  544. // 点击触发领取优惠券
  545. setCoupons(item) {
  546. // 判断是否已经领取了优惠券
  547. let obj = this;
  548. uni.showModal({
  549. title: '领取提示',
  550. content: '是否领取优惠券',
  551. success(e) {
  552. if (e.confirm) {
  553. setCoupons({
  554. couponId: item.id
  555. }).then(e => {
  556. item.is_use = true;
  557. uni.showToast({
  558. title: '领取成功',
  559. type: 'top',
  560. duration: 2000
  561. });
  562. });
  563. }
  564. }
  565. });
  566. },
  567. //商品种类切换
  568. change(item) {
  569. let id = item;
  570. this.checkid = id;
  571. if (this.checkid == 1) {
  572. // console.log(1);
  573. this.detail = this.selected_detail;
  574. } else if (this.checkid == 2) {
  575. // console.log(2);
  576. this.detail = this.new_product;
  577. } else {
  578. this.detail = this.cheap_good;
  579. }
  580. },
  581. // 监听图片加载完成
  582. onImageError(key, index) {
  583. this[key][index].image = '/static/error/errorImage.jpg';
  584. },
  585. // 请求载入数据
  586. async loadData() {
  587. loadIndexs({})
  588. .then(({
  589. data
  590. }) => {
  591. console.log(data, '8989')
  592. let goods = data.info;
  593. this.carouselList = data.banner;
  594. this.swiperLength = this.carouselList.length;
  595. this.menusList = data.menus;
  596. this.goodsList = goods.firstList; //最新商品
  597. let bast = goods.bastList; //精品推荐
  598. let arr = []
  599. bast.forEach(item => {
  600. if (item.store_name == '加盟会员') {
  601. // this.shop.push(item.store_name)
  602. if (this.userInfo.uid && this.userInfo.level > 1) {} else {
  603. arr.push(item)
  604. }
  605. } else {
  606. arr.push(item)
  607. }
  608. })
  609. // console.log(this.shop,'2223344');
  610. this.bastList = arr
  611. console.log(this.bastList, 'this.bastList6666666666666666666666');
  612. this.wechat_qrcode = data.wechat_qrcode
  613. console.log(data.wechat_qrcode)
  614. this.bastBanner = data.benefit; //促销单品
  615. this.$set(this, 'couponArray', data.couponList); //保存卡包券
  616. uni.stopPullDownRefresh();
  617. })
  618. .catch(e => {
  619. uni.stopPullDownRefresh();
  620. });
  621. },
  622. //轮播图切换修改背景色
  623. swiperChange(e) {
  624. const index = e.detail.current;
  625. this.swiperCurrent = index;
  626. this.titleNViewBackground = this.carouselList[index].background;
  627. },
  628. //详情页
  629. navToDetailPage(item) {
  630. let id = item.id;
  631. uni.navigateTo({
  632. url: '/pages/product/product?id=' + id
  633. });
  634. },
  635. // 轮播图跳转
  636. bannerNavToUrl(item) {
  637. console.log(item)
  638. // #ifdef H5
  639. console.log(item.wap_url.indexOf('http'), '66666666666')
  640. if (item.wap_url.indexOf('http') > -1) {
  641. console.log('hello word')
  642. window.location.href = item.wap_url;
  643. }
  644. // #endif
  645. //测试数据没有写id,用title代替
  646. uni.navigateTo({
  647. url: item.wap_url
  648. });
  649. },
  650. //获取定位信息
  651. // getaddress() {
  652. // console.log('dizhi+++++++++++')
  653. // let obj = this;
  654. // uni.getLocation({
  655. // type:'gcj02',
  656. // success: res => {
  657. // console.log('66666666666666666666')
  658. // let latitude = Math.abs(+res.latitude);
  659. // let longitude = Math.abs(+res.longitude);
  660. // obj.setLat(latitude);
  661. // obj.setLon(longitude);
  662. // console.log(obj.lat, obj.lon, '经纬度数据');
  663. // obj.getStoreList(latitude, longitude);
  664. // },
  665. // fail: err => {
  666. // console.log(err,'shi+++++++++++++++')
  667. // openMap().then(e => {
  668. // this.getaddress();
  669. // });
  670. // }
  671. // });
  672. // },
  673. //获取门店列表
  674. getStoreList(latitude, longitude) {
  675. let obj = this;
  676. getStoreList({
  677. page: 1,
  678. limit: 3,
  679. latitude: latitude,
  680. longitude: longitude
  681. }).then(({
  682. data
  683. }) => {
  684. data.list = data.list.map(item => {
  685. item.space = obj.space(obj.lat, obj.lon, item.latitude * 1, item.longitude * 1);
  686. console.log(item.space, 'item.space++++++++++');
  687. return item;
  688. });
  689. obj.storeList = data.list;
  690. });
  691. },
  692. space(lat1, lng1, lat2, lng2) {
  693. console.log(lat1, lng1, lat2, lng2, '位置信息');
  694. var radLat1 = (lat1 * Math.PI) / 180.0;
  695. var radLat2 = (lat2 * Math.PI) / 180.0;
  696. var a = radLat1 - radLat2;
  697. var b = (lng1 * Math.PI) / 180.0 - (lng2 * Math.PI) / 180.0;
  698. var s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) + Math.cos(radLat1) * Math.cos(radLat2) * Math
  699. .pow(Math.sin(b / 2), 2)));
  700. s = s * 6378.137;
  701. s = Math.round(s * 10000) / 10000;
  702. // return s * 1000;
  703. if (s > 1) {
  704. return s.toFixed(2) + 'km';
  705. } else {
  706. return (s * 1000).toFixed(2) + 'm'; // 单位米
  707. }
  708. }
  709. }
  710. };
  711. </script>
  712. <style lang="scss">
  713. .Mask {
  714. width: 100%;
  715. height: 100vh;
  716. position: fixed;
  717. z-index: 99999;
  718. background-color: rgba(0, 0, 0, 0.7);
  719. top: 0;
  720. image {
  721. width: 100%;
  722. height: 100vh;
  723. }
  724. }
  725. // 热销商品
  726. .hot-goods {
  727. margin: 0 25rpx;
  728. padding: 5rpx 25rpx 30rpx 25rpx;
  729. background-color: #fff;
  730. border-radius: 10rpx;
  731. .hot-headers {
  732. margin: 25rpx 0;
  733. width: 100%;
  734. display: flex;
  735. .img {
  736. width: 32rpx;
  737. height: 32rpx;
  738. margin-right: 10rpx;
  739. }
  740. .hot-title {
  741. font-size: 30rpx;
  742. margin-right: 15rpx;
  743. }
  744. .more {
  745. line-height: 1;
  746. padding: 5rpx 10rpx 5rpx 15rpx;
  747. text-align: center;
  748. font-size: 20rpx;
  749. border-radius: 15rpx;
  750. color: #ffffff;
  751. background: linear-gradient(90deg, rgba(250, 52, 38, 1) 0%, rgba(249, 30, 83, 1) 100%);
  752. image {
  753. width: 20rpx;
  754. height: 20rpx;
  755. }
  756. }
  757. }
  758. .hot-lists {
  759. line-height: 1;
  760. display: flex;
  761. .hot-produce {
  762. width: 100%;
  763. height: 260rpx;
  764. border-top: 1px solid #f0f0f0;
  765. display: flex;
  766. padding-top: 28rpx;
  767. .produce-image {
  768. width: 200rpx;
  769. height: 200rpx;
  770. image {
  771. width: 200rpx;
  772. height: 200rpx;
  773. border: 1px solid #f0f0f0;
  774. }
  775. }
  776. .produce-content {
  777. // flex-direction: column;
  778. margin-left: 30rpx;
  779. height: 200rpx;
  780. position: relative;
  781. width: calc(100% - 200rpx - 30rpx);
  782. .produce-name {
  783. font-size: 28rpx;
  784. font-weight: bold;
  785. line-height: 35rpx;
  786. color: #343434;
  787. }
  788. .produce-info {
  789. font-size: 20rpx;
  790. margin-top: 25rpx;
  791. }
  792. .produce-price {
  793. display: flex;
  794. align-items: flex-end;
  795. color: #ff383e;
  796. font-size: 24rpx;
  797. margin-top: 70rpx;
  798. font-weight: bold;
  799. text {
  800. font-size: 36rpx;
  801. }
  802. .produce-price-1 {
  803. font-size: 22rpx;
  804. font-weight: 500;
  805. text-decoration: line-through;
  806. color: rgba(170, 170, 170, 1);
  807. margin-left: 20rpx;
  808. }
  809. }
  810. .produce-price1 {
  811. height: 100%;
  812. letter-spacing: 3rpx;
  813. color: #ff383e;
  814. font-size: 24rpx;
  815. font-weight: bold;
  816. .produce-center {
  817. width: 100%;
  818. position: absolute;
  819. bottom: 0;
  820. display: flex;
  821. justify-content: space-between;
  822. align-items: center;
  823. .kanjia_word {
  824. .word-1 {
  825. font-size: 22rpx;
  826. color: #666666;
  827. }
  828. .word-2 {
  829. font-size: 28rpx;
  830. color: #ff383e;
  831. margin-top: 10rpx;
  832. }
  833. }
  834. .kanjia_button {
  835. height: 50rpx;
  836. width: 150rpx;
  837. border-radius: 25rpx;
  838. font-size: 26rpx;
  839. font-weight: 500;
  840. color: #ff383e;
  841. border: 1px solid rgba(255, 56, 62, 1);
  842. }
  843. }
  844. }
  845. }
  846. }
  847. }
  848. }
  849. .lalala {
  850. height: var(--status-bar-height);
  851. width: 100%;
  852. height: 100rpx;
  853. }
  854. .input-box {
  855. /* #ifdef H5 */
  856. position: fixed;
  857. left: 0;
  858. right: 0;
  859. top: 0;
  860. z-index: 99999;
  861. /* #endif */
  862. width: 100%;
  863. padding: 25rpx;
  864. background-color: rgba(0, 0, 0, 0);
  865. height: 44px;
  866. .iconsearch {
  867. font-size: 50rpx;
  868. }
  869. .input-content {
  870. border-radius: 99rpx;
  871. flex-grow: 1;
  872. padding: 10rpx 200rpx;
  873. background-color: #fff;
  874. // justify-content: center;
  875. .input {
  876. flex-grow: 1;
  877. input {
  878. font-size: $font-lg;
  879. }
  880. }
  881. }
  882. .input-button {
  883. padding-left: 20rpx;
  884. font-size: $font-lg;
  885. height: 100%;
  886. }
  887. }
  888. /* #ifdef MP */
  889. .mp-height {
  890. height: 44px;
  891. }
  892. .input-box {
  893. width: 100%;
  894. padding: 25rpx;
  895. background-color: #ffffff;
  896. height: 44px;
  897. .iconsearch {
  898. font-size: 50rpx;
  899. }
  900. .input-content {
  901. border-radius: 99rpx;
  902. flex-grow: 1;
  903. padding: 10rpx 30rpx;
  904. background-color: rgba(231, 231, 231, 0.7);
  905. .input {
  906. flex-grow: 1;
  907. input {
  908. font-size: $font-lg;
  909. }
  910. }
  911. }
  912. .input-button {
  913. padding-left: 20rpx;
  914. font-size: $font-lg;
  915. height: 100%;
  916. }
  917. }
  918. page {
  919. .cate-section {
  920. position: relative;
  921. z-index: 5;
  922. border-radius: 16rpx 16rpx 0 0;
  923. margin-top: -20rpx;
  924. }
  925. .carousel-section {
  926. padding: 0;
  927. .titleNview-placing {
  928. padding-top: 0;
  929. height: 0;
  930. }
  931. .carousel {
  932. .carousel-item {
  933. padding: 0;
  934. }
  935. }
  936. .swiper-dots {
  937. left: 45rpx;
  938. bottom: 40rpx;
  939. }
  940. }
  941. }
  942. /* #endif */
  943. page {
  944. background: #f7f8f7;
  945. }
  946. .m-t {
  947. margin-top: 16rpx;
  948. }
  949. /* 头部 轮播图 */
  950. .carousel-section {
  951. position: relative;
  952. // padding-top: 10px;
  953. overflow: hidden;
  954. .titleNview-placing {
  955. height: var(--status-bar-height);
  956. // padding-top: 44px;
  957. box-sizing: content-box;
  958. }
  959. .titleNview-background {
  960. position: absolute;
  961. top: 0;
  962. left: 0;
  963. width: 100%;
  964. height: 426rpx;
  965. transition: 0.4s;
  966. }
  967. .carousel {
  968. width: 100%;
  969. height: 426rpx;
  970. .carousel-item {
  971. width: 100%;
  972. height: 100%;
  973. // padding: 0 28rpx;
  974. overflow: hidden;
  975. }
  976. image {
  977. width: 100%;
  978. height: 100%;
  979. // border-radius: $border-radius-sm;
  980. }
  981. }
  982. }
  983. .swiper-dots {
  984. display: flex;
  985. position: absolute;
  986. left: 60rpx;
  987. bottom: 15rpx;
  988. width: 72rpx;
  989. height: 36rpx;
  990. background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAABkCAYAAADDhn8LAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTMyIDc5LjE1OTI4NCwgMjAxNi8wNC8xOS0xMzoxMzo0MCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OTk4MzlBNjE0NjU1MTFFOUExNjRFQ0I3RTQ0NEExQjMiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OTk4MzlBNjA0NjU1MTFFOUExNjRFQ0I3RTQ0NEExQjMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTcgKFdpbmRvd3MpIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6Q0E3RUNERkE0NjExMTFFOTg5NzI4MTM2Rjg0OUQwOEUiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6Q0E3RUNERkI0NjExMTFFOTg5NzI4MTM2Rjg0OUQwOEUiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4Gh5BPAAACTUlEQVR42uzcQW7jQAwFUdN306l1uWwNww5kqdsmm6/2MwtVCp8CosQtP9vg/2+/gY+DRAMBgqnjIp2PaCxCLLldpPARRIiFj1yBbMV+cHZh9PURRLQNhY8kgWyL/WDtwujjI8hoE8rKLqb5CDJaRMJHokC6yKgSCR9JAukmokIknCQJpLOIrJFwMsBJELFcKHwM9BFkLBMKFxNcBCHlQ+FhoocgpVwwnv0Xn30QBJGMC0QcaBVJiAMiec/dcwKuL4j1QMsVCXFAJE4s4NQA3K/8Y6DzO4g40P7UcmIBJxbEesCKWBDg8wWxHrAiFgT4fEGsB/CwIhYE+AeBAAdPLOcV8HRmWRDAiQVcO7GcV8CLM8uCAE4sQCDAlHcQ7x+ABQEEAggEEAggEEAggEAAgQACASAQQCCAQACBAAIBBAIIBBAIIBBAIABe4e9iAe/xd7EAJxYgEGDeO4j3EODp/cOCAE4sYMyJ5cwCHs4rCwI4sYBxJ5YzC84rCwKcXxArAuthQYDzC2JF0H49LAhwYUGsCFqvx5EF2T07dMaJBetx4cRyaqFtHJ8EIhK0i8OJBQxcECuCVutxJhCRoE0cZwMRyRcFefa/ffZBVPogePihhyCnbBhcfMFFEFM+DD4m+ghSlgmDkwlOgpAl4+BkkJMgZdk4+EgaSCcpVX7bmY9kgXQQU+1TgE0c+QJZUUz1b2T4SBbIKmJW+3iMj2SBVBWz+leVfCQLpIqYbp8b85EskIxyfIOfK5Sf+wiCRJEsllQ+oqEkQfBxmD8BBgA5hVjXyrBNUQAAAABJRU5ErkJggg==);
  991. background-size: 100% 100%;
  992. .num {
  993. width: 36rpx;
  994. height: 36rpx;
  995. border-radius: 50px;
  996. font-size: 24rpx;
  997. color: #fff;
  998. text-align: center;
  999. line-height: 36rpx;
  1000. }
  1001. .sign {
  1002. position: absolute;
  1003. top: 0;
  1004. left: 50%;
  1005. line-height: 36rpx;
  1006. font-size: 12rpx;
  1007. color: #fff;
  1008. transform: translateX(-50%);
  1009. }
  1010. }
  1011. /* 分类 */
  1012. .cate-section {
  1013. display: flex;
  1014. justify-content: space-around;
  1015. align-items: center;
  1016. flex-wrap: wrap;
  1017. padding: 30rpx 22rpx;
  1018. background-color: #fff;
  1019. margin-bottom: 20rpx;
  1020. position: relative;
  1021. .cate-item {
  1022. padding: 10rpx 0;
  1023. display: flex;
  1024. flex-direction: column;
  1025. align-items: center;
  1026. font-size: $font-sm + 2rpx;
  1027. color: $font-color-dark;
  1028. width: 25%;
  1029. }
  1030. /* 原图标颜色太深,不想改图了,所以加了透明度 */
  1031. image {
  1032. width: 88rpx;
  1033. height: 88rpx;
  1034. margin-bottom: 14rpx;
  1035. border-radius: 50%;
  1036. opacity: 0.7;
  1037. }
  1038. }
  1039. // 中间广告图片
  1040. .ad-1 {
  1041. width: 100%;
  1042. height: 210rpx;
  1043. padding: 10rpx 0;
  1044. background: #fff;
  1045. image {
  1046. width: 100%;
  1047. height: 100%;
  1048. }
  1049. }
  1050. /*公用边框样式*/
  1051. %icon {
  1052. margin-right: 10rpx;
  1053. display: inline-block;
  1054. padding: 2rpx 10rpx;
  1055. border: 1rpx solid $color-yellow;
  1056. color: $color-yellow;
  1057. line-height: 1;
  1058. font-size: $font-base;
  1059. border-radius: 10rpx;
  1060. }
  1061. .f-header {
  1062. display: flex;
  1063. align-items: center;
  1064. height: 92rpx;
  1065. padding: 6rpx 30rpx 8rpx;
  1066. image {
  1067. flex-shrink: 0;
  1068. width: 80rpx;
  1069. height: 80rpx;
  1070. margin-right: 20rpx;
  1071. }
  1072. .tit-box {
  1073. @extend %font-title-box;
  1074. }
  1075. .tit {
  1076. @extend %font-title;
  1077. }
  1078. .iconenter {
  1079. font-size: $font-lg + 2rpx;
  1080. color: $font-color-light;
  1081. }
  1082. .f-left-icon {
  1083. @extend %f-left-icon;
  1084. }
  1085. .iconfont {
  1086. font-size: $font-sm - 2rpx;
  1087. }
  1088. }
  1089. // 会员升级礼包
  1090. .uservip {
  1091. border-radius: $border-radius-sm;
  1092. background-color: white;
  1093. box-shadow: $box-shadow;
  1094. height: 300rpx;
  1095. margin: 0 30rpx;
  1096. image {
  1097. height: 100%;
  1098. width: 300rpx;
  1099. }
  1100. .detail {
  1101. position: relative;
  1102. padding: 20rpx;
  1103. height: 100%;
  1104. .icon {
  1105. @extend %icon;
  1106. }
  1107. .price-box {
  1108. position: absolute;
  1109. bottom: 20rpx;
  1110. width: calc(100% - 40rpx);
  1111. .price {
  1112. font-size: $font-lg + 2rpx;
  1113. font-weight: bold;
  1114. color: $font-color-base;
  1115. }
  1116. .text {
  1117. color: $color-gray;
  1118. font-size: $font-sm;
  1119. }
  1120. }
  1121. .title {
  1122. font-size: $font-lg;
  1123. font-weight: bold;
  1124. }
  1125. }
  1126. }
  1127. /* 猜你喜欢 */
  1128. .guess-section {
  1129. display: flex;
  1130. flex-wrap: wrap;
  1131. padding: 0 30rpx;
  1132. .guess-item {
  1133. overflow: hidden;
  1134. display: flex;
  1135. flex-direction: column;
  1136. width: 48%;
  1137. margin-bottom: 4%;
  1138. border-radius: $border-radius-sm;
  1139. background-color: white;
  1140. box-shadow: $box-shadow;
  1141. &:nth-child(2n + 1) {
  1142. margin-right: 4%;
  1143. }
  1144. }
  1145. .image-wrapper {
  1146. width: 100%;
  1147. height: 330rpx;
  1148. border-radius: 3px;
  1149. overflow: hidden;
  1150. image {
  1151. width: 100%;
  1152. height: 100%;
  1153. opacity: 1;
  1154. }
  1155. }
  1156. .title {
  1157. font-size: $font-base;
  1158. color: $font-color-dark;
  1159. font-weight: bold;
  1160. line-height: 80rpx;
  1161. }
  1162. .price {
  1163. font-size: $font-lg;
  1164. color: $font-color-base;
  1165. font-weight: bold;
  1166. line-height: 1;
  1167. line-height: 80rpx;
  1168. }
  1169. .icon {
  1170. @extend %icon;
  1171. }
  1172. .detail {
  1173. line-height: 1;
  1174. }
  1175. .tip {
  1176. color: white;
  1177. background-color: $color-yellow;
  1178. line-height: 1.5;
  1179. font-size: $font-sm;
  1180. padding-left: 20rpx;
  1181. }
  1182. }
  1183. // 推荐
  1184. .recommend {
  1185. width: 95%;
  1186. height: 155rpx;
  1187. margin: 0rpx auto;
  1188. padding-top: 30rpx;
  1189. font-size: 26rpx;
  1190. text-align: center;
  1191. color: #333333;
  1192. align-items: flex-start;
  1193. .recommend_list {
  1194. width: 33%;
  1195. }
  1196. .re_title {
  1197. font-size: 32rpx;
  1198. font-weight: bold;
  1199. }
  1200. .re_name {
  1201. color: #999999;
  1202. padding-top: 10rpx;
  1203. }
  1204. .selected_icon {
  1205. width: 25rpx;
  1206. height: 10rpx;
  1207. margin: 0px auto;
  1208. display: none;
  1209. image {
  1210. width: 100%;
  1211. height: 100%;
  1212. }
  1213. }
  1214. .active {
  1215. display: block;
  1216. }
  1217. .active_color {
  1218. color: #dc4d46 !important;
  1219. }
  1220. }
  1221. // 列表
  1222. .list-box-h {
  1223. height: 1550rpx;
  1224. }
  1225. // 优惠券
  1226. .coupon-list {
  1227. display: inline-block;
  1228. }
  1229. .row {
  1230. border-radius: 15rpx;
  1231. margin: 25rpx;
  1232. height: 155rpx;
  1233. // width: 552rpx;
  1234. overflow: hidden;
  1235. background-color: #ffffff;
  1236. padding-right: 25rpx;
  1237. .list-interval {
  1238. border: 1px dashed $border-color-light;
  1239. height: 100%;
  1240. .top,
  1241. .bottom {
  1242. border-radius: 100rpx;
  1243. width: 30rpx;
  1244. height: 30rpx;
  1245. position: absolute;
  1246. background-color: $page-color-base;
  1247. right: -15rpx;
  1248. }
  1249. .top {
  1250. top: -18rpx;
  1251. }
  1252. .bottom {
  1253. bottom: -18rpx;
  1254. }
  1255. }
  1256. .list-money {
  1257. height: 100%;
  1258. min-width: 155rpx;
  1259. text-align: center;
  1260. image {
  1261. height: 100%;
  1262. width: 20rpx;
  1263. }
  1264. .list-money-text {
  1265. flex-grow: 1;
  1266. padding: 0 25rpx;
  1267. .tit {
  1268. text-align: center;
  1269. padding: 15rpx 0rpx;
  1270. font-size: 55rpx;
  1271. color: $color-red;
  1272. font-weight: bold;
  1273. &.noAction {
  1274. color: $font-color-light;
  1275. }
  1276. }
  1277. .price {
  1278. padding-bottom: 25rpx;
  1279. color: $font-color-light;
  1280. }
  1281. }
  1282. }
  1283. .row_list_right {
  1284. // flex-grow: 1;
  1285. min-width: 200rpx;
  1286. padding-left: 25rpx;
  1287. line-height: 1;
  1288. .right_time {
  1289. padding: 10rpx 0rpx;
  1290. color: $font-color-light;
  1291. font-size: $font-sm;
  1292. }
  1293. .right_top {
  1294. margin: 15rpx 0;
  1295. .right_name {
  1296. font-size: $font-base;
  1297. color: #bc253a;
  1298. font-weight: bold;
  1299. }
  1300. .right_title {
  1301. font-size: $font-base;
  1302. color: $font-base;
  1303. font-weight: bold;
  1304. &.noAction {
  1305. color: $font-color-light;
  1306. }
  1307. }
  1308. }
  1309. }
  1310. .right_use {
  1311. margin: 15rpx 0;
  1312. padding: 10rpx;
  1313. width: 160rpx;
  1314. text-align: center;
  1315. color: #fff;
  1316. background-color: #bc253a;
  1317. border-radius: 50rpx;
  1318. font-size: $font-sm;
  1319. &.noAction {
  1320. background-color: $font-color-light;
  1321. }
  1322. }
  1323. .iconlocation {
  1324. font-size: 36rpx;
  1325. color: $font-color-light;
  1326. }
  1327. }
  1328. .store-wrapper {
  1329. margin: 20rpx 0;
  1330. background-color: #fff;
  1331. padding: 0 0rpx 25rpx;
  1332. .title-wrapper {
  1333. padding-left: 20rpx;
  1334. justify-content: flex-start;
  1335. align-items: center;
  1336. height: 86rpx;
  1337. line-height: 86rpx;
  1338. image {
  1339. width: 36rpx;
  1340. height: 36rpx;
  1341. background: linear-gradient(43deg, #ffc063, #ffa163);
  1342. border-radius: 50%;
  1343. }
  1344. view {
  1345. padding-left: 10rpx;
  1346. font-size: 32rpx;
  1347. font-family: PingFang SC;
  1348. font-weight: bold;
  1349. color: #242424;
  1350. }
  1351. .title-b {
  1352. font-size: 24rpx;
  1353. font-family: PingFang SC;
  1354. font-weight: 500;
  1355. color: #8b8b8b;
  1356. }
  1357. }
  1358. .goods-wrapper {
  1359. padding: 0 20rpx;
  1360. justify-content: space-between;
  1361. flex-wrap: wrap;
  1362. .good {
  1363. margin-bottom: 20rpx;
  1364. width: 345rpx;
  1365. height: 480rpx;
  1366. background: #ffffff;
  1367. box-shadow: 0px 0px 10rpx rgba(50, 50, 52, 0.2);
  1368. border-radius: 10rpx;
  1369. .good-img {
  1370. width: 345rpx;
  1371. height: 345rpx;
  1372. border-radius: 10rpx;
  1373. }
  1374. .good-name {
  1375. font-size: 30rpx;
  1376. font-family: PingFang SC;
  1377. font-weight: bold;
  1378. color: #333333;
  1379. line-height: 35rpx;
  1380. padding-left: 21rpx;
  1381. }
  1382. .good-info {
  1383. padding-top: 10rpx;
  1384. padding-left: 21rpx;
  1385. font-size: 26rpx;
  1386. font-family: PingFang SC;
  1387. font-weight: 500;
  1388. color: #666666;
  1389. line-height: 35rpx;
  1390. }
  1391. .good-price {
  1392. padding-left: 21rpx;
  1393. padding-top: 30rpx;
  1394. font-size: 36rpx;
  1395. font-family: PingFang SC;
  1396. font-weight: bold;
  1397. color: #ff4c4c;
  1398. line-height: 35rpx;
  1399. height: 35rpx;
  1400. .old-price {
  1401. display: inline-block;
  1402. padding-left: 8rpx;
  1403. font-size: 26rpx;
  1404. font-family: PingFang SC;
  1405. font-weight: bold;
  1406. text-decoration: line-through;
  1407. color: #999999;
  1408. }
  1409. }
  1410. }
  1411. }
  1412. .store {
  1413. margin: 0 auto 20rpx;
  1414. width: 710rpx;
  1415. height: 210rpx;
  1416. background: #ffffff;
  1417. box-shadow: 0px 0px 10rpx 0px rgba(0, 0, 0, 0.1);
  1418. border-radius: 10rpx;
  1419. padding: 19rpx 25rpx 11rpx 20rpx;
  1420. justify-content: flex-start;
  1421. .store-img {
  1422. flex-shrink: 0;
  1423. width: 180rpx;
  1424. height: 180rpx;
  1425. border-radius: 10rpx;
  1426. // background-color: red;
  1427. }
  1428. .store-info {
  1429. width: 100%;
  1430. height: 100%;
  1431. padding-left: 19rpx;
  1432. position: relative;
  1433. .store-name {
  1434. font-size: 30rpx;
  1435. font-family: PingFang SC;
  1436. font-weight: bold;
  1437. color: #333333;
  1438. }
  1439. .store-detail {
  1440. padding-top: 10rpx;
  1441. font-size: 22rpx;
  1442. font-family: PingFang SC;
  1443. font-weight: 500;
  1444. color: #666666;
  1445. }
  1446. .store-tip {
  1447. width: 66rpx;
  1448. height: 40rpx;
  1449. background: linear-gradient(120deg, #ffc063, #ffa163);
  1450. border-radius: 8rpx;
  1451. position: absolute;
  1452. right: 0;
  1453. top: 0;
  1454. font-size: 24rpx;
  1455. font-family: PingFang SC;
  1456. font-weight: 500;
  1457. color: #ffffff;
  1458. line-height: 40rpx;
  1459. text-align: center;
  1460. }
  1461. .store-des {
  1462. // width: 400rpx;
  1463. position: absolute;
  1464. bottom: 0;
  1465. font-size: 24rpx;
  1466. font-family: PingFang SC;
  1467. font-weight: 500;
  1468. color: #999999;
  1469. height: 35rpx;
  1470. image {
  1471. margin-right: 8rpx;
  1472. width: 17rpx;
  1473. height: 24rpx;
  1474. }
  1475. }
  1476. }
  1477. }
  1478. }
  1479. .ewm {
  1480. width: 75rpx;
  1481. height: 75rpx;
  1482. position: absolute;
  1483. right: 10rpx;
  1484. bottom: -75rpx;
  1485. background-color: #fff;
  1486. border-radius: 50%;
  1487. box-shadow: 0 0 10rpx rgba($color: #000000, $alpha: 0.6);
  1488. image {
  1489. width: 50rpx;
  1490. height: 50rpx;
  1491. position: absolute;
  1492. top: 0;
  1493. left: 0;
  1494. bottom: 0;
  1495. right: 0;
  1496. margin: auto;
  1497. }
  1498. .ewm-tit {
  1499. position: absolute;
  1500. bottom: 10rpx;
  1501. font-size: 10rpx;
  1502. }
  1503. .closeEwm {
  1504. width: 40rpx;
  1505. height: 40rpx;
  1506. position: absolute;
  1507. top: -40rpx;
  1508. right: -20rpx;
  1509. image {
  1510. width: 100%;
  1511. height: 100%;
  1512. }
  1513. }
  1514. }
  1515. .popup-box {
  1516. width: 400rpx;
  1517. height: 450rpx;
  1518. background-color: #fff;
  1519. border-radius: 20rpx;
  1520. padding-top: 20rpx;
  1521. position: relative;
  1522. .gzhqr {
  1523. display: block;
  1524. width: 360rpx;
  1525. height: 360rpx;
  1526. margin: 0 auto 20rpx;
  1527. }
  1528. view {
  1529. text-align: center;
  1530. }
  1531. .close-img {
  1532. position: absolute;
  1533. width: 50rpx;
  1534. height: 50rpx;
  1535. top: -20rpx;
  1536. right: -20rpx;
  1537. }
  1538. }
  1539. </style>