index.vue 36 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420
  1. <template>
  2. <view :style="viewColor">
  3. <view class='productList'>
  4. <view class='search acea-row row-between-wrapper'>
  5. <!--#ifdef H5-->
  6. <view v-if='!$wechat.isWeixin()' class="back" @click='set_where(1)'>
  7. <view class="iconfont icon-xiangzuo"></view>
  8. </view>
  9. <!--#endif-->
  10. <view class='input acea-row row-between-wrapper'><text class='iconfont icon-sousuo'></text>
  11. <input placeholder='搜索商品名称' placeholder-class='placeholder' confirm-type='search' name="search" :value='where.keyword'
  12. @confirm="searchSubmit" @input="inputChange"></input>
  13. </view>
  14. <view style="text-align: right;" v-if="tabIndex==1" class='iconfont' :class='is_switch==true?"icon-pailie":"icon-tupianpailie"'
  15. @click='Changswitch'></view>
  16. <view v-else-if="mer_location == 1" style="text-align: right;" class='iconfont icon-dingwei' @click="showMaoLocation(latitude,longitude)"></view>
  17. </view>
  18. <view class="nav-wrapper">
  19. <view v-if="hide_mer_status == 0" class="tab-bar">
  20. <view class="tab-item" :class="{on:tabIndex==1}" @click="tabIndex = 1">商品</view>
  21. <view class="tab-item" :class="{on:tabIndex==2}" @click="tabIndex = 2">店铺</view>
  22. </view>
  23. <block v-if="tabIndex==1">
  24. <view class='nav acea-row row-middle'>
  25. <view class='item' @click="downStatus = !downStatus" :class="{'t-color':downKey>0 && firstKey == 0}">
  26. {{downMenu[downKey].title}}
  27. <text v-if="!downStatus" class="iconfont icon-xiala1 spin"></text>
  28. <text v-else class="iconfont icon-xiala1"></text>
  29. </view>
  30. <view class='item' :class="{'t-color': where.order=='sales'}" @click='set_where(3)'>
  31. 销量
  32. </view>
  33. <view class='item' :class="{'t-color': where.order=='price_desc'}" @click='set_where(2)'>
  34. 价格
  35. <image v-if="price==1" :src="domain+'/static/diy/up'+keyColor+'.png'"></image>
  36. <image v-else-if="price==2" :src="domain+'/static/diy/down'+keyColor+'.png'"></image>
  37. <image v-else :src='`${domain}/static/images/horn.png`'></image>
  38. </view>
  39. <!-- down -->
  40. <view class='item' @click='bindRight'>
  41. 筛选
  42. <text class="iconfont icon-shaixuan"></text>
  43. </view>
  44. </view>
  45. </block>
  46. <block v-if="tabIndex==2">
  47. <view class='nav acea-row row-middle'>
  48. <view class='item' v-for="item in shopTab" :key="item.key" :class=" {'t-color':storeKey==item.key}" @click="storeTab(item.key)">
  49. {{item.title}}
  50. </view>
  51. <view class="item" :class="{'t-colors':firstKey == 4}" @click="bindRight2">
  52. <view>筛选
  53. <text class="iconfont icon-shaixuan"></text>
  54. </view>
  55. <view class="line" :class="{'font-line':firstKey == 4}">
  56. </view>
  57. </view>
  58. </view>
  59. </block>
  60. </view>
  61. <!-- 商品 -->
  62. <block v-if="tabIndex == 1">
  63. <view class='list acea-row row-between-wrapper on' v-if="!is_switch" :style="{ marginTop: mTop }">
  64. <view class='item on' v-for="(item,index) in productList" :key="index"
  65. @click="godDetail(item)">
  66. <view class='pictrue on'>
  67. <image :src='item.image' class="on"></image>
  68. <view v-if="item.stock == 0" class="sell_out">已售罄</view>
  69. <view v-if="item.border_pic" :style="{ backgroundImage: `url(${item.border_pic})` }" class="border-picture"></view>
  70. </view>
  71. <view class='text on acea-row row-between-wrapper'>
  72. <view class='name'>
  73. <text class="name_text line2">{{item.store_name}}</text>
  74. </view>
  75. <view class="item_bot">
  76. <view class="acea-row row-bottom">
  77. <view class='money on'>
  78. ¥<text class='num'>{{item.price}}</text>
  79. </view>
  80. <view v-if="item.show_svip_info&&item.show_svip_info.show_svip_price && item.svip_price" class="acea-row row-middle">
  81. <text class='vip-money'>¥{{item.svip_price}}</text>
  82. <view class="vipImg">
  83. <image :src="`${domain}/static/images/svip.png`"></image>
  84. </view>
  85. </view>
  86. </view>
  87. <view class="item_tags acea-row">
  88. <text v-if="item.merchant.type_name && item.product_type == 0" class="font-bg-red bt-color line1">{{item.merchant.type_name}}</text>
  89. <text v-else-if="item.merchant.is_trader && item.product_type == 0" class="font-bg-red bt-color line1">自营</text>
  90. <text v-if="item.product_type != 0" :class="'font_bg-red bt-color type'+item.product_type">{{item.product_type == 1 ? "秒杀" : item.product_type == 2 ? "预售" : item.product_type == 3 ? "助力" : item.product_type == 4 ? "拼团" : ""}}</text>
  91. <text class="tags_item ticket" v-if="item.issetCoupon">领券</text>
  92. <text class="tags_item delivery" v-if="item.delivery_free == 1">包邮</text>
  93. <!-- <view class="ticket-big" v-if="!is_switch && item.issetCoupon">领券满{{item.issetCoupon.use_min_price}}减{{item.issetCoupon.coupon_price}}</view> -->
  94. </view>
  95. <view class="score">{{item.rate}}评分 {{item.reply_count}}条评论</view>
  96. <view class="company" v-if="item.merchant && hide_mer_status==0">
  97. <text class='name line1'>{{item.merchant.mer_name}}</text>
  98. <view class="flex" v-if="item.merchant" @click.stop="goStore(item.merchant.mer_id)">
  99. 进店
  100. <text class="iconfont icon-xiangyou"></text>
  101. </view>
  102. </view>
  103. </view>
  104. </view>
  105. <!-- 返佣 -->
  106. <block v-if="item.max_extension>0 && (item.product_type == 2 || item.product_type == 0)">
  107. <view class="foot-bar on">
  108. <text class="iconfont icon-fenxiang" v-if="is_switch==true"></text>
  109. <text class="line1">最高赚 ¥{{item.max_extension}}</text>
  110. </view>
  111. </block>
  112. </view>
  113. </view>
  114. <view v-else class="list" :style="{ marginTop: mTop }">
  115. <WaterfallsFlow :wfList='productList' :isStore="hide_mer_status" @itemTap="godDetail" :type="1" @goShop="goStore"/>
  116. <view class='loadingicon acea-row row-center-wrapper' v-if='productList.length > 0'>
  117. <text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
  118. </view>
  119. </view>
  120. <view class='loadingicon acea-row row-center-wrapper' v-if='loading'>
  121. <text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
  122. </view>
  123. <view class='noCommodity' v-if="productList.length==0 && !loading">
  124. <view class='pictrue' style="margin: 0 auto;">
  125. <image :src="domain+'/static/images/noSearch.png'"></image>
  126. <text>暂无商品,快去搜索其他商品吧</text>
  127. </view>
  128. <recommend v-if="recommend_switch == 1" :hostProduct="hostProduct" :isLogin="isLogin"></recommend>
  129. </view>
  130. </block>
  131. <!-- 店铺 -->
  132. <block v-if="tabIndex == 2">
  133. <view class="store-wrapper" :style="{ marginTop: mTop }">
  134. <view class="store-item" v-if="storeList.length" v-for="(item,index) in storeList" :key="index">
  135. <view class="head">
  136. <view class="left-wrapper">
  137. <view class="logo">
  138. <image :src="item.mer_avatar" mode=""></image>
  139. </view>
  140. <view class="con-box">
  141. <view class="name acea-row row-between-wrapper line1">
  142. <text class="mer_name line1">{{item.mer_name}}</text>
  143. <image v-if="margin_ico_switch==1 && margin_ico && item.is_margin == 10" :src="margin_ico" class="store-margin"></image>
  144. <text v-if="item.type_name" class="font-bg-red b-color">{{item.type_name}}</text>
  145. <text v-else-if="item.is_trader" class="font-bg-red b-color">自营</text>
  146. </view>
  147. <view class="star-box">
  148. <view class="star">
  149. <view class="star-active" :style="{width: `${item.allScore}%`, backgroundImage: `url(${domain}/static/diy/score1${keyColor}.png)`}"></view>
  150. </view>
  151. <view class="num">{{item.product_score}}</view>
  152. <view class="line" v-if="item.distance"></view>
  153. <view class="distance" v-if="item.distance" @click="showMaoLocation(item.lat,item.long)">{{item.distance}}
  154. <view class="iconfont icon-xiangyou"></view>
  155. </view>
  156. </view>
  157. </view>
  158. </view>
  159. <view class="link" @click="goStore(item.mer_id)">进店</view>
  160. </view>
  161. <view class="pic-wrapper">
  162. <view class="pic-item" v-for="(goods,index) in item.recommend" :key="index">
  163. <navigator :url="`/pages/goods_details/index?id=${goods.product_id}`">
  164. <image :src="goods.image" mode=""></image>
  165. <view class="price">
  166. <text>¥</text>{{goods.price}}
  167. </view>
  168. </navigator>
  169. </view>
  170. </view>
  171. </view>
  172. </view>
  173. <view class='loadingicon acea-row row-center-wrapper' v-if='loading'>
  174. <text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
  175. </view>
  176. <view class='noCommodity' v-if="!storeList.length && !loading">
  177. <view class='pictrue' style="margin: 0 auto;">
  178. <image :src="domain+'/static/images/noSearch.png'"></image>
  179. <text>暂无商品,快去搜索其他商品吧</text>
  180. </view>
  181. <recommend v-if="recommend_switch == 1" :hostProduct="hostProduct" :isLogin="isLogin"></recommend>
  182. </view>
  183. </block>
  184. <rightSlider1 v-if="rightBox&&typeStatus&&brandStatus&&parmasStatus" :status="rightBox&&typeStatus&&brandStatus&&parmasStatus" :activeIndex="activeIndex" :storeTypeArr="storeTypeArr" :brandList="brandList" :parmasList="parmasList" :price_on="where.price_on" :price_off="where.price_off"
  185. :isCate="true" @confirm="confirm" @close="close"></rightSlider1>
  186. </view>
  187. <view class="down-wrapper" v-if="downStatus">
  188. <view class="bg" @click="downStatus=false"></view>
  189. <view class="down-box" :style="{ top: mTop }">
  190. <view class="down-item" v-for="(item,index) in downMenu" :key="item.key" :class="{'on':index == downKey}" @click="bindDown(item,index)">
  191. {{item.title}}
  192. <text v-if="index == downKey" class="iconfont icon-gou"></text>
  193. </view>
  194. </view>
  195. </view>
  196. <rightSlider2 v-if="rightBox2&&storeCateStatus&&typeStatus" :status="rightBox2&&storeCateStatus&&typeStatus" :activeIndex="activeIndex" :merList="merList" :storeTypeArr="storeTypeArr" @confirm="confirm2" @close="close"></rightSlider2>
  197. <!-- #ifndef H5 -->
  198. <passwordPopup></passwordPopup>
  199. <!-- #endif -->
  200. </view>
  201. </template>
  202. <script>
  203. // +----------------------------------------------------------------------
  204. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  205. // +----------------------------------------------------------------------
  206. // | Copyright (c) 2016~2024 https://www.crmeb.com All rights reserved.
  207. // +----------------------------------------------------------------------
  208. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  209. // +----------------------------------------------------------------------
  210. // | Author: CRMEB Team <admin@crmeb.com>
  211. // +----------------------------------------------------------------------
  212. import {
  213. getProductslist,
  214. getProductHot,
  215. getBrandlist,
  216. getParmasList,
  217. storeMerchantList,
  218. getGeocoder
  219. } from '@/api/store.js';
  220. import {initiateAssistApi} from '@/api/activity.js';
  221. import recommend from '@/components/recommend';
  222. import rightSlider1 from '@/components/rightSlider.vue';
  223. import rightSlider2 from '@/components/rightSlider/index';
  224. import WaterfallsFlow from '@/components/WaterfallsFlow/WaterfallsFlow.vue'
  225. import { merClassifly, getStoreTypeApi } from '@/api/store.js';
  226. import { configMap } from "@/utils";
  227. import { mapGetters } from "vuex";
  228. // #ifndef H5
  229. import passwordPopup from '@/components/passwordPopup';
  230. // #endif
  231. import { toLogin } from '@/libs/login.js';
  232. import { HTTP_REQUEST_URL } from '@/config/app';
  233. import { goShopDetail } from '@/libs/order.js'
  234. import { getconfig } from '@/api/public.js';
  235. const app = getApp();
  236. export default {
  237. components: {
  238. recommend,
  239. rightSlider1,
  240. rightSlider2,
  241. WaterfallsFlow,
  242. // #ifndef H5
  243. passwordPopup,
  244. // #endif
  245. },
  246. watch: {
  247. tabIndex(nVal, oVal) {
  248. if (nVal == 1) {
  249. this.loadend = false;
  250. this.$set(this.where, 'page', 1)
  251. this.get_product_list(true);
  252. } else {
  253. this.loadend = false;
  254. this.downStatus = false
  255. this.storeScroll = true
  256. this.storeList = []
  257. this.storeMerchantList('')
  258. }
  259. }
  260. },
  261. data() {
  262. return {
  263. domain: HTTP_REQUEST_URL,
  264. productList: [],
  265. is_switch: true,
  266. where: {
  267. cate_id: '',
  268. order: '',
  269. price_on: '',
  270. price_off: '',
  271. brand_id: '',
  272. keyword: '',
  273. is_trader: '',
  274. mer_type_id: '',
  275. filter_params: '',
  276. page: 1,
  277. limit: 30
  278. },
  279. shopTabs: [{
  280. title: '默认',
  281. key: 0,
  282. order: ""
  283. },
  284. {
  285. title: '销量',
  286. key: 1,
  287. order: 'sales'
  288. },
  289. {
  290. title: '好评',
  291. key: 2,
  292. order: 'rate'
  293. },
  294. {
  295. title: '距离',
  296. key: 3,
  297. order: 'location'
  298. }
  299. ],
  300. price: 0,
  301. stock: 0,
  302. nows: false,
  303. loadend: false,
  304. loading: false,
  305. loadTitle: '加载更多',
  306. title: '',
  307. hostProduct: [],
  308. hotPage: 1,
  309. hotLimit: 10,
  310. hotScroll: false,
  311. // 筛选框
  312. rightBox: false,
  313. brandStatus: false,
  314. typeStatus: false,
  315. cateStatus: false,
  316. parmasStatus: false,
  317. rightBox2: false,
  318. storeCateStatus: false,
  319. //品牌列表
  320. brandList: [],
  321. downKey: 0,
  322. downStatus: false,
  323. // 下拉菜单
  324. downMenu: [{
  325. title: '综合',
  326. key: 1,
  327. },
  328. {
  329. title: '评分',
  330. key: 2,
  331. },
  332. {
  333. title: '新品',
  334. key: 3,
  335. }
  336. ],
  337. // 是否第一个
  338. firstKey: 0,
  339. // tab切换
  340. tabIndex: 1,
  341. // 商铺列表
  342. storeList: [],
  343. sotreParam: {
  344. keyword: '',
  345. page: 1,
  346. limit: 10,
  347. order: '',
  348. category_id : '',
  349. type_id: '',
  350. parameter_id: []
  351. },
  352. storeKey: 0,
  353. storeScroll: true,
  354. detaile_address: "", //详细地址
  355. recommend_address: "", //当前地点
  356. latitude: "",
  357. longitude: "",
  358. mer_location: 0,
  359. count: 0, //店铺总条数
  360. storeTypeArr: [], //店铺类型
  361. parmasList: [],
  362. merList: [], //商户分类
  363. mTop: 0,
  364. activeIndex: 0,
  365. };
  366. },
  367. onLoad: function(options) {
  368. this.$set(this.where, 'cate_id', options.id || '');
  369. this.title = options.title || '';
  370. this.$set(this.where, 'keyword', options.searchValue || '');
  371. this.get_product_list();
  372. this.get_host_product();
  373. },
  374. onReady() {
  375. },
  376. mounted() {
  377. uni.getStorage({
  378. key: 'GLOBAL_DATA',
  379. success: (res) => {
  380. if (res.data.mer_location == 1) {
  381. this.mer_location = res.data.mer_location
  382. this.selfLocation()
  383. }
  384. }
  385. });
  386. this.mTop = this.hide_mer_status == 0 ? '238rpx' : '170rpx'
  387. },
  388. computed: {
  389. shopTab: function() {
  390. return this.shopTabs.filter((item) => {
  391. if (this.mer_location == 1) {
  392. return item
  393. } else {
  394. return item.key < 3
  395. }
  396. })
  397. },
  398. ...configMap({margin_ico_switch: 0,margin_ico: '',hide_mer_status:0,recommend_switch: 0},mapGetters(['uid','isLogin','scrollTop','viewColor','keyColor'])),
  399. },
  400. // 滚动监听
  401. onPageScroll() {
  402. uni.$emit('scroll');
  403. },
  404. methods: {
  405. //查看地图
  406. showMaoLocation(lat, lon) {
  407. if (!lat || !lon) return this.$util.Tips({
  408. title: '请设置允许商城访问您的位置!'
  409. });
  410. //#ifdef H5
  411. if(this.$wechat.isWeixin() === true) {
  412. this.$wechat.seeLocation({
  413. latitude: Number(lat),
  414. longitude: Number(lon)
  415. }).then(res=>{
  416. console.log('success');
  417. })
  418. }else{
  419. //#endif
  420. uni.openLocation({
  421. latitude: parseFloat(lat),
  422. longitude: parseFloat(lon),
  423. scale: 8,
  424. geocode: true,
  425. name: '当前位置',
  426. address: this.detaile_address,
  427. success: function(res) {
  428. console.log(res)
  429. },
  430. });
  431. // #ifdef H5
  432. }
  433. //#endif
  434. },
  435. //获取定位
  436. selfLocation() {
  437. let self = this
  438. uni.getLocation({
  439. type: 'gcj02',
  440. success: (res) => {
  441. let latitude, longitude;
  442. latitude = res.latitude.toString();
  443. longitude = res.longitude.toString();
  444. this.latitude = res.latitude
  445. this.longitude = res.longitude
  446. getGeocoder({
  447. lat: latitude,
  448. long: longitude
  449. }).then(res => {
  450. this.detaile_address = res.data.address;
  451. this.recommend_address = res.data.formatted_addresses.recommend;
  452. })
  453. },
  454. complete: function() {
  455. }
  456. });
  457. },
  458. // 获取商户分类
  459. getClassfication: function() {
  460. let temp = []
  461. merClassifly()
  462. .then(res => {
  463. this.storeCateStatus = true
  464. temp = res.data.map(item => {
  465. return {
  466. ...item,
  467. check: false
  468. }
  469. })
  470. this.merList = temp
  471. })
  472. .catch(res => {
  473. this.$util.Tips({
  474. title: res
  475. });
  476. });
  477. },
  478. // 获取店铺类型
  479. async getStoreType() {
  480. let temp = []
  481. getStoreTypeApi()
  482. .then(res => {
  483. this.typeStatus = true
  484. temp = res.data.map(item => {
  485. return {
  486. ...item,
  487. check: false
  488. }
  489. })
  490. this.storeTypeArr = temp
  491. })
  492. .catch(res => {
  493. this.$util.Tips({
  494. title: res
  495. });
  496. });
  497. },
  498. // 获取参数列表
  499. async getParmasList(){
  500. let temp = []
  501. getParmasList({
  502. cate_id: this.where.cate_id,
  503. keyword:this.where.keyword
  504. })
  505. .then(res => {
  506. this.parmasStatus = true
  507. temp = res.data.map(item => {
  508. return {
  509. ...item,
  510. check: false,
  511. showValue: false,
  512. parmasValue: []
  513. }
  514. })
  515. this.parmasList = temp
  516. })
  517. .catch(res => {
  518. this.$util.Tips({
  519. title: res
  520. });
  521. });
  522. },
  523. // 查找店铺
  524. storeMerchantList(type) {
  525. if (!this.storeScroll) return
  526. this.loading = true
  527. let serachData = {
  528. keyword: this.where.keyword,
  529. page: this.sotreParam.page,
  530. limit: this.sotreParam.limit,
  531. order: this.sotreParam.order,
  532. category_id: this.sotreParam.category_id,
  533. type_id: this.sotreParam.type_id
  534. }
  535. if (this.latitude) {
  536. serachData.location = this.latitude + ',' + this.longitude
  537. }
  538. storeMerchantList(serachData).then(res => {
  539. res.data.list.forEach(item => {
  540. var tempNum = parseFloat(item.product_score) + parseFloat(item.service_score) + parseInt(item.postage_score)
  541. tempNum = tempNum / 3 / 5 * 100
  542. item.allScore = tempNum.toFixed(2)
  543. })
  544. this.storeScroll = res.data.list.length >= this.sotreParam.limit
  545. this.storeList = this.storeList.concat(res.data.list)
  546. this.count = res.data.count
  547. this.loading = false
  548. })
  549. },
  550. // 店铺排序
  551. storeTab(key) {
  552. if (this.loading) return
  553. this.storeKey = key
  554. this.sotreParam.order = this.shopTabs[key].order
  555. this.sotreParam.page = 1
  556. this.storeScroll = true
  557. this.storeList = []
  558. this.storeMerchantList()
  559. },
  560. // 右侧切换
  561. bindRight() {
  562. this.price = 0;
  563. this.firstKey = 4
  564. if(!this.brandList.length)this.getBrandlist()
  565. if(!this.storeTypeArr.length)this.getStoreType()
  566. if(!this.parmasList.length)this.getParmasList()
  567. this.rightBox = true
  568. },
  569. // 品牌列表
  570. async getBrandlist() {
  571. let temp = []
  572. getBrandlist({
  573. cate_id: this.where.cate_id,
  574. keyword: this.where.keyword
  575. }).then(res => {
  576. this.brandStatus = true
  577. temp = res.data.list.map(item => {
  578. return {
  579. ...item,
  580. check: false
  581. }
  582. })
  583. this.brandList = temp
  584. })
  585. },
  586. // 去详情页
  587. godDetail(item) {
  588. goShopDetail(item, this.uid).then(res => {
  589. if (this.isLogin) {
  590. initiateAssistApi(item.activity_id).then(res => {
  591. let id = res.data.product_assist_set_id;
  592. uni.hideLoading();
  593. uni.navigateTo({
  594. url: '/pages/activity/assist_detail/index?id=' + id
  595. });
  596. }).catch((err) => {
  597. uni.showToast({
  598. title: err,
  599. icon: 'none'
  600. })
  601. });
  602. } else {
  603. toLogin()
  604. }
  605. })
  606. },
  607. // 组件确定
  608. confirm(data,index) {
  609. let arr1 = [], arr2 = []
  610. if (data.brandList.length == 0) {
  611. this.where.brand_id = ''
  612. } else {
  613. data.brandList.forEach(item => {
  614. arr1.push(item.brand_id)
  615. })
  616. this.where.brand_id = arr1.toString()
  617. }
  618. if(data.typeList.length == 0){
  619. this.where.mer_type_id = ''
  620. }else{
  621. data.typeList.forEach(item =>{
  622. arr2.push(item.mer_type_id)
  623. })
  624. this.where.mer_type_id = arr2.toString()
  625. }
  626. this.activeIndex = index
  627. this.where.filter_params = JSON.stringify(data.parmasList)
  628. this.rightBox = data.status
  629. this.where.price_on = data.price_on
  630. this.where.price_off = data.price_off
  631. this.where.is_trader = data.is_trader
  632. this.loadend = false;
  633. this.$set(this.where, 'page', 1)
  634. this.get_product_list(true);
  635. },
  636. // 右侧切换
  637. bindRight2() {
  638. this.price = 0;
  639. this.sotreParam.page = 1
  640. this.sotreParam.order = ''
  641. if(!this.storeTypeArr.length)this.getStoreType()
  642. if(!this.merList.length)this.getClassfication()
  643. this.rightBox2 = true
  644. },
  645. // 组件确定
  646. confirm2(data) {
  647. let arr1 = [],arr2 = []
  648. if (data.storeTypeArr.length == 0) {
  649. this.sotreParam.type_id = ''
  650. } else {
  651. data.storeTypeArr.forEach(item => {
  652. arr1.push(item.mer_type_id)
  653. })
  654. this.sotreParam.type_id = arr1.toString();
  655. }
  656. if (data.merList.length == 0) {
  657. this.sotreParam.category_id = ''
  658. } else {
  659. data.merList.forEach(item => {
  660. arr2.push(item.merchant_category_id)
  661. })
  662. this.sotreParam.category_id = arr2.toString();
  663. }
  664. this.rightBox2 = data.status
  665. this.loadend = false;
  666. this.$set(this.sotreParam, 'page', 1)
  667. this.storeList = [];
  668. this.storeScroll = true
  669. this.storeMerchantList();
  670. },
  671. // 组件关闭
  672. close() {
  673. this.rightBox = false
  674. this.rightBox2 = false
  675. },
  676. // 下拉选项
  677. bindDown(item, index) {
  678. this.firstKey = 0
  679. if (index == 0) {
  680. this.where.order = ''
  681. } else if (index == 1) {
  682. this.where.order = 'rate'
  683. } else if (index == 2) {
  684. this.where.order = 'is_new'
  685. }
  686. this.downKey = index
  687. this.downStatus = false
  688. this.loadend = false;
  689. this.$set(this.where, 'page', 1)
  690. this.get_product_list(true);
  691. },
  692. Changswitch: function() {
  693. let that = this;
  694. that.is_switch = !that.is_switch
  695. },
  696. searchSubmit: function(e) {
  697. let that = this;
  698. if (!e.detail.value.trim()) {
  699. uni.showToast({
  700. title: '请输入搜索内容',
  701. icon: 'none',
  702. duration: 1000
  703. });
  704. return
  705. }
  706. that.$set(that.where, 'keyword', e.detail.value);
  707. if (this.tabIndex == 1) {
  708. that.loadend = false;
  709. that.$set(that.where, 'page', 1)
  710. this.get_product_list(true);
  711. } else {
  712. this.sotreParam.page = 1
  713. this.storeScroll = true
  714. this.storeList = []
  715. this.storeMerchantList('search')
  716. }
  717. },
  718. inputChange: function(e) {
  719. let that = this;
  720. that.$set(that.where, 'keyword', e.detail.value);
  721. },
  722. /**
  723. * 获取我的推荐
  724. */
  725. get_host_product: function() {
  726. let that = this;
  727. if (that.hotScroll) return
  728. getProductHot(
  729. that.hotPage,
  730. that.hotLimit,
  731. ).then(res => {
  732. that.hotPage++
  733. that.hotScroll = res.data.list.length < that.hotLimit
  734. that.hostProduct = that.hostProduct.concat(res.data.list)
  735. });
  736. },
  737. //点击事件处理
  738. set_where: function(e) {
  739. this.downStatus = false
  740. switch (e) {
  741. case 1:
  742. uni.navigateBack()
  743. break
  744. case 2:
  745. this.firstKey = e
  746. if (this.price == 0) {
  747. this.price = 1;
  748. this.where.order = 'price_asc'
  749. } else if (this.price == 1) {
  750. this.price = 2;
  751. this.where.order = 'price_desc'
  752. } else if (this.price == 2) {
  753. this.price = 0;
  754. this.where.order = ''
  755. }
  756. this.$set(this.where, 'page', 1)
  757. this.get_product_list(true);
  758. break;
  759. case 3:
  760. this.price = 0;
  761. this.loadend = false;
  762. this.$set(this.where, 'order', 'sales')
  763. this.$set(this.where, 'page', 1)
  764. this.get_product_list(true);
  765. this.firstKey = e
  766. break;
  767. }
  768. this.loadend = false;
  769. this.$set(this.where, 'page', 1);
  770. this.get_product_list(true);
  771. },
  772. //查找产品
  773. get_product_list: function(isPage) {
  774. let that = this;
  775. if (that.loadend) return;
  776. if (that.loading) return;
  777. if (isPage === true) that.$set(that, 'productList', []);
  778. that.loading = true;
  779. that.loadTitle = '';
  780. getProductslist(that.where).then(res => {
  781. let list = res.data.list;
  782. let productList = that.$util.SplitArray(list, that.productList);
  783. let loadend = list.length < that.where.limit;
  784. that.loadend = loadend;
  785. that.loading = false;
  786. that.loadTitle = loadend ? '已全部加载' : '加载更多';
  787. that.$set(that, 'productList', productList);
  788. that.$set(that.where, 'page', that.where.page + 1);
  789. }).catch(err => {
  790. that.loading = false;
  791. that.loadTitle = '加载更多';
  792. });
  793. },
  794. goStore: function(id) {
  795. if (this.hide_mer_status != 1) {
  796. uni.navigateTo({
  797. url: `/pages/store/home/index?id=${id}`
  798. })
  799. }
  800. }
  801. },
  802. onPullDownRefresh() {
  803. },
  804. onReachBottom() {
  805. if (this.tabIndex == 1) {
  806. if (this.productList.length > 0) {
  807. this.get_product_list(false);
  808. } else {
  809. this.get_host_product();
  810. }
  811. } else {
  812. if (this.count === this.storeList.length) {
  813. if (this.count === 0) {
  814. return
  815. }
  816. uni.showToast({
  817. title: '已加载全部',
  818. icon: 'none',
  819. duration: 1000
  820. });
  821. } else {
  822. this.sotreParam.page += 1
  823. this.storeMerchantList()
  824. }
  825. }
  826. },
  827. onPullDownRefresh(){
  828. setTimeout(()=>{
  829. const newList = this.productList.reverse();
  830. this.productList = newList;
  831. uni.stopPullDownRefresh();
  832. },500)
  833. }
  834. }
  835. </script>
  836. <style lang="scss" scoped>
  837. .b-color {
  838. background-color: var(--view-theme)!important;
  839. border: 1px solid var(--view-theme)!important;
  840. }
  841. .productList .search {
  842. width: 100%;
  843. height: 86rpx;
  844. padding: 0 20rpx;
  845. box-sizing: border-box;
  846. position: fixed;
  847. left: 0;
  848. top: 0;
  849. z-index: 9;
  850. background-color: var(--view-theme);
  851. .icon-dingwei {
  852. color: #fff;
  853. font-weight: 0;
  854. font-size: 40rpx;
  855. line-height: 86rpx;
  856. width: 62rpx;
  857. }
  858. }
  859. .productList .search .back {
  860. display: flex;
  861. align-items: center;
  862. width: 40rpx;
  863. height: 60rpx;
  864. .iconfont {
  865. color: #fff;
  866. font-size: 36rpx;
  867. }
  868. }
  869. .productList .search .input {
  870. flex: 1;
  871. height: 60rpx;
  872. background-color: #fff;
  873. border-radius: 50rpx;
  874. padding: 0 20rpx;
  875. box-sizing: border-box;
  876. }
  877. .productList .search .input input {
  878. flex: 1;
  879. height: 100%;
  880. font-size: 26rpx;
  881. margin-left: 10rpx;
  882. }
  883. .productList .search .input .placeholder {
  884. color: #999;
  885. }
  886. .productList .search .input .iconfont {
  887. font-size: 35rpx;
  888. color: #555;
  889. }
  890. .productList .search .icon-pailie,
  891. .productList .search .icon-tupianpailie,
  892. .productList .search .iconempty {
  893. color: #fff;
  894. width: 62rpx;
  895. font-size: 40rpx;
  896. height: 86rpx;
  897. line-height: 86rpx;
  898. }
  899. .productList .nav-wrapper {
  900. z-index: 9;
  901. position: fixed;
  902. left: 0;
  903. top: 0;
  904. width: 100%;
  905. margin-top: 86rpx;
  906. background-color: var(--view-theme);
  907. .tab-bar {
  908. display: flex;
  909. align-items: center;
  910. .tab-item {
  911. position: relative;
  912. flex: 1;
  913. display: flex;
  914. justify-content: center;
  915. align-items: center;
  916. padding: 8rpx 0 20rpx;
  917. color: #fff;
  918. font-size: 28rpx;
  919. font-weight: bold;
  920. &::after {
  921. content: ' ';
  922. position: absolute;
  923. left: 50%;
  924. bottom: 18rpx;
  925. width: 30rpx;
  926. height: 3rpx;
  927. background: transparent;
  928. transform: translateX(-50%);
  929. }
  930. &.on {
  931. &::after {
  932. background: #fff;
  933. }
  934. }
  935. }
  936. }
  937. }
  938. .productList .nav {
  939. height: 86rpx;
  940. color: #454545;
  941. font-size: 28rpx;
  942. background-color: #fff;
  943. display: flex;
  944. justify-content: space-between;
  945. padding: 0 28rpx;
  946. }
  947. .productList .nav .item {
  948. display: flex;
  949. align-items: center;
  950. justify-content: center;
  951. flex: 1;
  952. }
  953. .t-color {
  954. color: var(--view-theme);
  955. }
  956. .productList .nav .item.t-color {
  957. font-weight: bold;
  958. color: #454545;
  959. }
  960. .productList .nav .item image {
  961. width: 15rpx;
  962. height: 19rpx;
  963. margin-left: 10rpx;
  964. }
  965. .productList .list {
  966. padding: 0 20rpx;
  967. }
  968. .productList .list.on {
  969. background-color: #fff;
  970. border-top: 1px solid #f6f6f6;
  971. }
  972. .productList .list .item {
  973. position: relative;
  974. width: 345rpx;
  975. margin-top: 20rpx;
  976. background-color: #fff;
  977. border-radius: 20rpx;
  978. .name{
  979. display: flex;
  980. align-items: center;
  981. .name_text{
  982. // max-width: 420rpx;
  983. }
  984. }
  985. }
  986. .productList .list .item.on {
  987. width: 100%;
  988. display: flex;
  989. padding: 30rpx 0;
  990. margin: 0;
  991. }
  992. .productList .list .item .pictrue {
  993. position: relative;
  994. width: 100%;
  995. height: 345rpx;
  996. }
  997. .productList .list .item .pictrue.on {
  998. width: 260rpx;
  999. height: 260rpx;
  1000. .sell_out {
  1001. display: flex;
  1002. width: 110rpx;
  1003. height: 110rpx;
  1004. align-items: center;
  1005. justify-content: center;
  1006. border-radius: 100%;
  1007. background: rgba(0,0,0,.6);
  1008. color: #fff;
  1009. font-size: 24rpx;
  1010. position: absolute;
  1011. top: 50%;
  1012. left: 50%;
  1013. margin: -55rpx 0 0 -55rpx;
  1014. &::before{
  1015. content: "";
  1016. display: block;
  1017. width: 100rpx;
  1018. height: 100rpx;
  1019. border-radius: 100%;
  1020. border: 1px dashed #fff;
  1021. position: absolute;
  1022. top: 5rpx;
  1023. left: 5rpx;
  1024. }
  1025. }
  1026. .border-picture {
  1027. position: absolute;
  1028. top: 0;
  1029. left: 0;
  1030. width: 100%;
  1031. height: 100%;
  1032. border-radius: 16rpx;
  1033. background: center/cover no-repeat;
  1034. }
  1035. }
  1036. .productList .list .item .pictrue image {
  1037. width: 100%;
  1038. height: 100%;
  1039. border-radius: 20rpx 20rpx 0 0;
  1040. }
  1041. .productList .list .item .pictrue image.on {
  1042. border-radius: 16rpx;
  1043. width: 260rpx;
  1044. height: 260rpx;
  1045. }
  1046. .productList .list .item .text {
  1047. padding: 20rpx 17rpx 26rpx 17rpx;
  1048. font-size: 30rpx;
  1049. color: #222;
  1050. }
  1051. .productList .list .item .text.on {
  1052. width: 508rpx;
  1053. padding: 0 0 0 22rpx;
  1054. justify-content: space-between;
  1055. .font-bg-red{
  1056. max-width: 120rpx;
  1057. }
  1058. .bt-color {
  1059. background-color: var(--view-theme);
  1060. &.type2{
  1061. background-color: #FD6523;
  1062. }
  1063. }
  1064. .name,.item_bot{
  1065. width: 100%;
  1066. }
  1067. .name_text{
  1068. line-height: 38rpx;
  1069. height: 76rpx;
  1070. }
  1071. .vip-money {
  1072. color: #282828;
  1073. font-size: 22rpx;
  1074. margin-left: 6rpx;
  1075. font-weight: bold;
  1076. }
  1077. .vipImg {
  1078. width: 65rpx;
  1079. height: 28rpx;
  1080. margin-left: 4rpx;
  1081. image {
  1082. width: 100%;
  1083. height: 100%;
  1084. display: block;
  1085. }
  1086. }
  1087. .item_bot{
  1088. position: relative;
  1089. &::after{
  1090. content: '';
  1091. display: block;
  1092. width: 100%;
  1093. border-bottom: 1px solid #f6f6f6;
  1094. position: absolute;
  1095. right: 20rpx;
  1096. bottom: -30rpx;
  1097. }
  1098. }
  1099. }
  1100. .productList .list .item .text .money {
  1101. display: flex;
  1102. align-items: center;
  1103. font-size: 26rpx;
  1104. font-weight: bold;
  1105. color: var(--view-priceColor);
  1106. }
  1107. .productList .list .item .text .money .num {
  1108. font-size: 34rpx;
  1109. }
  1110. .productList .distance {
  1111. display: flex;
  1112. align-items: center;
  1113. font-size: 24rpx;
  1114. color: #999999;
  1115. .icon-xiangyou {
  1116. font-size: 24rpx;
  1117. line-height: 24rpx;
  1118. }
  1119. }
  1120. .productList .list .item .text .money .ticket {
  1121. margin-left: 10rpx;
  1122. padding: 0 5rpx;
  1123. font-weight: initial;
  1124. font-size: 20rpx;
  1125. border: 1px solid var(--view-theme);
  1126. border-radius: 4rpx;
  1127. }
  1128. .productList .list .item .text .money .ticket-big {
  1129. display: flex;
  1130. align-items: center;
  1131. justify-content: center;
  1132. min-width: 163rpx;
  1133. height: 28rpx;
  1134. margin-left: 10rpx;
  1135. background-image: url(~static/images/yh.png);
  1136. background-size: 100% 100%;
  1137. font-size: 20rpx;
  1138. font-weight: normal;
  1139. padding: 0 10rpx;
  1140. }
  1141. .productList .list .item .item_tags{
  1142. margin-top: 8rpx;
  1143. }
  1144. .productList .list .item .item_tags .tags_item {
  1145. display: inline-block;
  1146. font-size: 20rpx;
  1147. text-align: center;
  1148. border-radius: 5rpx;
  1149. padding: 0 4rpx;
  1150. line-height: 28rpx;
  1151. margin-right: 8rpx;
  1152. }
  1153. .productList .list .item .item_tags .tags_item.ticket{
  1154. color: var(--view-theme);
  1155. border: 1px solid var(--view-theme);
  1156. }
  1157. .item_tags .tags_item.delivery{
  1158. color: #FF9000;
  1159. border: 1px solid #FF9000;
  1160. }
  1161. .productList .list .item .text .score {
  1162. margin-top: 10rpx;
  1163. color: #737373;
  1164. font-size: 20rpx;
  1165. }
  1166. .productList .list .item .text .company {
  1167. display: flex;
  1168. align-items: center;
  1169. color: #737373;
  1170. font-size: 20rpx;
  1171. margin-top: 10rpx;
  1172. // width: 300rpx;
  1173. .name {
  1174. display: inline-block;
  1175. width: auto;
  1176. max-width: 200rpx;
  1177. overflow: hidden;
  1178. white-space: nowrap;
  1179. text-overflow: ellipsis;
  1180. }
  1181. .flex {
  1182. display: flex;
  1183. align-items: center;
  1184. margin-left: 10rpx;
  1185. color: #282828;
  1186. width: 100rpx;
  1187. .iconfont {
  1188. font-size: 16rpx;
  1189. margin-top: 4rpx;
  1190. }
  1191. }
  1192. }
  1193. .productList .list .item .foot-bar {
  1194. width: 100%;
  1195. height: 52rpx;
  1196. display: flex;
  1197. align-items: center;
  1198. justify-content: center;
  1199. background-image: linear-gradient(-90deg, var(--view-bntColor21) 0%, var(--view-bntColor22) 100%);
  1200. border-radius: 0px 0px 16rpx 16rpx;
  1201. color: #fff;
  1202. font-size: 24rpx;
  1203. .icon-fenxiang {
  1204. font-size: 24rpx;
  1205. margin-right: 10rpx;
  1206. }
  1207. &.on {
  1208. position: absolute;
  1209. right: 0;
  1210. bottom: 26rpx;
  1211. width: 200rpx;
  1212. height: 44rpx;
  1213. border-radius: 22rpx;
  1214. }
  1215. }
  1216. .noCommodity {
  1217. background-color: #fff;
  1218. .pictrue {
  1219. height: 420rpx;
  1220. color: $uni-nothing-text;
  1221. image {
  1222. width: 414rpx;
  1223. height: 336rpx;
  1224. }
  1225. }
  1226. }
  1227. .no-shop {
  1228. margin-top: 240rpx;
  1229. background-color: #fff;
  1230. padding-bottom: calc(100% - 109rpx);
  1231. .pictrue {
  1232. display: flex;
  1233. flex-direction: column;
  1234. align-items: center;
  1235. color: $uni-nothing-text;
  1236. image {
  1237. width: 414rpx;
  1238. height: 336rpx;
  1239. }
  1240. }
  1241. }
  1242. .spin {
  1243. display: block;
  1244. transform: rotate(180deg);
  1245. font-size: 36rpx;
  1246. }
  1247. .icon-xiala1 {
  1248. margin-top: 6rpx;
  1249. }
  1250. .icon-shaixuan {
  1251. font-size: 30rpx;
  1252. margin-left: 10rpx;
  1253. }
  1254. .down-wrapper {
  1255. .bg {
  1256. z-index: 8;
  1257. position: fixed;
  1258. left: 0;
  1259. top: 0;
  1260. width: 100%;
  1261. height: 100%;
  1262. background: rgba(0, 0, 0, .5);
  1263. }
  1264. .down-box {
  1265. z-index: 8;
  1266. position: fixed;
  1267. left: 0;
  1268. top: 238rpx;
  1269. width: 100%;
  1270. padding: 0 40rpx 28rpx 74rpx;
  1271. background-color: #F8F8F8;
  1272. border-radius: 0 0 24rpx 24rpx;
  1273. .down-item {
  1274. margin-top: 28rpx;
  1275. font-size: 24rpx;
  1276. color: #454545;
  1277. &.on {
  1278. color: var(--view-theme);
  1279. }
  1280. .iconfont{
  1281. float: right;
  1282. }
  1283. }
  1284. }
  1285. }
  1286. .store-wrapper {
  1287. margin-top: 240rpx;
  1288. border-top: 1px solid #F6F6F6;
  1289. .star-box {
  1290. display: flex;
  1291. align-items: center;
  1292. .line {
  1293. width: 2rpx;
  1294. height: 20rpx;
  1295. background: #BFBFBF;
  1296. margin: 0 12rpx;
  1297. }
  1298. .star {
  1299. position: relative;
  1300. width: 111rpx;
  1301. height: 19rpx;
  1302. background: url(~pages/columnGoods/images/star.png);
  1303. background-size: 111rpx 19rpx;
  1304. }
  1305. .star-active {
  1306. position: absolute;
  1307. left: 0;
  1308. top: 0;
  1309. width: 111rpx;
  1310. height: 19rpx;
  1311. overflow: hidden;
  1312. background: url(~pages/columnGoods/images/star_active.png);
  1313. background-size: 111rpx 19rpx;
  1314. }
  1315. .num {
  1316. color: var(--view-theme);
  1317. font-size: 24rpx;
  1318. margin-left: 10rpx;
  1319. }
  1320. }
  1321. .store-item {
  1322. margin-bottom: 12rpx;
  1323. padding: 40rpx 20rpx;
  1324. background-color: #fff;
  1325. .head {
  1326. display: flex;
  1327. align-items: center;
  1328. justify-content: space-between;
  1329. .left-wrapper {
  1330. display: flex;
  1331. align-items: center;
  1332. .logo {
  1333. width: 80rpx;
  1334. height: 80rpx;
  1335. image {
  1336. width: 80rpx;
  1337. height: 80rpx;
  1338. border-radius: 6rpx;
  1339. }
  1340. }
  1341. .con-box {
  1342. margin-left: 20rpx;
  1343. .font-bg-red {
  1344. width: max-content;
  1345. white-space: nowrap;
  1346. margin-left: 20rpx;
  1347. font-size: 18rpx;
  1348. padding: 2rpx 10rpx;
  1349. color: #FFFFFF;
  1350. background-color: #E93323;
  1351. border-radius: 13rpx;
  1352. }
  1353. .name {
  1354. font-size: 30rpx;
  1355. color: #333;
  1356. font-weight: bold;
  1357. margin-bottom: 10rpx;
  1358. .store-margin{
  1359. width: 28rpx;
  1360. height: 30rpx;
  1361. margin-left: 10rpx;
  1362. }
  1363. .mer_name{
  1364. max-width: 360rpx;
  1365. }
  1366. }
  1367. }
  1368. }
  1369. .link {
  1370. width: 114rpx;
  1371. height: 50rpx;
  1372. line-height: 50rpx;
  1373. background-image: linear-gradient(-90deg, var(--view-bntColor21) 0%, var(--view-bntColor22) 100%);
  1374. border-radius: 25rpx;
  1375. text-align: center;
  1376. color: #fff;
  1377. font-size: 24rpx;
  1378. }
  1379. }
  1380. .pic-wrapper {
  1381. display: flex;
  1382. margin-top: 30rpx;
  1383. .pic-item {
  1384. position: relative;
  1385. width: 226rpx;
  1386. height: 226rpx;
  1387. margin-right: 16rpx;
  1388. image {
  1389. width: 226rpx;
  1390. height: 226rpx;
  1391. border-radius: 16rpx;
  1392. }
  1393. .price {
  1394. position: absolute;
  1395. right: 0;
  1396. bottom: 0;
  1397. height: 36rpx;
  1398. padding: 0 10rpx;
  1399. line-height: 36rpx;
  1400. text-align: center;
  1401. background: rgba(0, 0, 0, .5);
  1402. border-radius: 16rpx 2rpx 16rpx 2rpx;
  1403. color: #fff;
  1404. font-size: 24rpx;
  1405. text {
  1406. font-size: 18rpx;
  1407. }
  1408. }
  1409. &:nth-child(3n) {
  1410. margin-right: 0;
  1411. }
  1412. }
  1413. }
  1414. }
  1415. }
  1416. </style>