list.vue 36 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513
  1. <template>
  2. <view class="content">
  3. <view class="fixed_top_status_bar"></view>
  4. <view class="top_part">
  5. <!-- 搜索头部分 start -->
  6. <view class='sea_input_part'>
  7. <!-- #ifndef MP-->
  8. <text class="back_icon iconfont iconziyuan2" @click="navBack"></text>
  9. <!-- #endif -->
  10. <view class="search_center" @click="search">
  11. <image class="search_icon" :src="imgUrl+'search.png'"></image>
  12. <input disabled class='sea_input' type='text' :value="searchParams.keyword" :placeholder="$L('请输入关键词')"></input>
  13. <image v-if='searchParams.keyword' class='clear_content' v-show="searchParams.keyword" :src="imgUrl+'input_clear.png'"
  14. @click.stop="clearInput" />
  15. </view>
  16. </view>
  17. <!-- 搜索头部分 end -->
  18. <!-- 头部搜索nav start -->
  19. <view class="navbar">
  20. <view class="nav-item complex" :class="{current: filterIndex === 0||filterIndex === 3||filterIndex === 4||filterIndex === 5}"
  21. @click="showSelect">
  22. <text>{{$L('综合')}}</text>
  23. <text class="iconfont iconziyuan14"></text>
  24. </view>
  25. <view class="nav-item" :class="{current: filterIndex === 1}" @click="tabClick(1)">
  26. {{$L('销量')}}
  27. </view>
  28. <view class="nav-item" :class="{current: filterIndex === 2}" @click="tabClick(2)">
  29. {{$L('店铺')}}
  30. </view>
  31. <view class="nav-item default" v-if="showStoreList">
  32. <text>{{$L('筛选')}}</text>
  33. <text class="filter_icon iconfont iconshaixuan"></text>
  34. </view>
  35. <view v-else class="nav-item" @click="toggleCateMask('show')">
  36. <text>{{$L('筛选')}}</text>
  37. <text class="filter_icon iconfont iconshaixuan"></text>
  38. </view>
  39. <text v-if="showStoreList" class="cate_item iconfont iconliebiao1 default"></text>
  40. <text v-else :class="{cate_item:loadingState, iconfont:loadingState, iconfenlei1:gridFlag,iconliebiao1:!gridFlag,grid_icon:gridFlag}"
  41. @click="tabShowStyle"></text>
  42. </view>
  43. </view>
  44. <!-- 头部搜索nav end -->
  45. <view v-if="(loadingState!='first_loading'&&!showStoreList&&goodsList.length == 0)||(loadingState!='first_loading'&&showStoreList&&store_list.length==0)" class="empty_part flex_column_start_center">
  46. <image :src="imgUrl+'empty_goods.png'" />
  47. <text>{{$L('暂无数据')}}</text>
  48. </view>
  49. <view class="pricearea" :hidden="pricearea" @tap.stop="showSelect" id="pricearea-wrap" catchtouchmove="touchmove">
  50. <view class="pri-content">
  51. <view :class="'pri-item ' + (seleindex==0?'current':'')" data-order data-key data-index="0" @tap.stop="changeSort(0)">
  52. <text>{{$L('综合排序')}}</text>
  53. <image :src="imgUrl+'good_search/order_sel.png'" v-if="seleindex==0"></image>
  54. </view>
  55. <view :class="'pri-item ' + (seleindex==5?'current':'')" data-index="5" @tap.stop="changeSort(5)">
  56. <text>{{$L('人气排序从高到低')}}</text>
  57. <image :src="imgUrl+'good_search/order_sel.png'" v-if="seleindex==5"></image>
  58. </view>
  59. <view :class="'pri-item ' + (seleindex==4?'current':'')" data-index="4" @tap.stop="changeSort(4)">
  60. <text>{{$L('价格排序从高到低')}}</text>
  61. <image :src="imgUrl+'good_search/order_sel.png'" v-if="seleindex==4"></image>
  62. </view>
  63. <view :class="'pri-item ' + (seleindex==3?'current':'')" data-index="3" @tap.stop="changeSort(3)">
  64. <text>{{$L('价格排序从低到高')}}</text>
  65. <image :src="imgUrl+'good_search/order_sel.png'" v-if="seleindex==3"></image>
  66. </view>
  67. </view>
  68. </view>
  69. <scroll-view v-if="goodsList.length&&!showStoreList" class="goods_part" scroll-y @scrolltolower='getMoreData'>
  70. <view v-if='gridFlag' class="goods_list_another flex_row_start_start">
  71. <goodsListItemV v-for="(item,index) in goodsList" :goods_info="item" :key='index' />
  72. </view>
  73. <view v-if='!gridFlag' class="goods_list flex_row_start_start">
  74. <goodsItemH v-for="(item,index) in goodsList" :goods_info="item" :key='index' />
  75. </view>
  76. <loadingState v-if="loadingState == 'first_loading'||goodsList.length > 0" :state='loadingState' />
  77. </scroll-view>
  78. <scroll-view v-if="showStoreList&&store_list.length>0" class="shop_lists" scroll-y @scrolltolower='getMoreStoreData'>
  79. <view class="" v-if="showStoreList&&store_list.length>0">
  80. <storeItem v-for="(item, index) in store_list" :store_info='item' :key="index"></storeItem>
  81. <loadingState v-if="loadingState == 'first_loading'||store_list.length > 0" :state='loadingState' />
  82. </view>
  83. </scroll-view>
  84. <view class="cate-mask" :class="cateMaskState===0 ? 'none' : cateMaskState===1 ? 'show' : ''" @click="toggleCateMask">
  85. <view class="cate-content" @click.stop.prevent="stopPrevent" @touchmove.stop.prevent="stopPrevent">
  86. <view class="filter_title">
  87. {{$L('筛选')}}
  88. </view>
  89. <scroll-view scroll-y class="cate-list flex_column_start_start">
  90. <view class="wrap">
  91. <view class="part price_part">
  92. <view class="title flex_row_between_center">
  93. <text class="left">{{$L('价格区间')}}</text>
  94. </view>
  95. <view class="detail price_area flex_row_start_center">
  96. <input type='number' :value="searchParams.lowPrice" class="amount low" :placeholder="$L('最低价')" placeholder-class="price_input_placeholder"
  97. data-key='lowPrice' @input="inputPrice" />
  98. <input type='number' :value="searchParams.highPrice" class="amount hight" :placeholder="$L('最高价')" placeholder-class="price_input_placeholder"
  99. data-key='highPrice' @input="inputPrice" />
  100. </view>
  101. </view>
  102. <!-- 分类 -->
  103. <view v-if='cateList.length>0' class="part" style="margin-top: 20rpx;">
  104. <view class="title flex_row_between_center">
  105. <text class="left">{{$L('分类')}}</text>
  106. <text v-if="cateList.length>cateLimit||cateLimit==999999" :class="{iconfont:true, iconziyuan11:true,up:cateFlag=='up',down:cateFlag=='down',}"
  107. @click="viewMoreCate"></text>
  108. <view v-if="cateList.length>cateLimit||cateLimit==999999" class="attributr_sel_con">
  109. <text class="attributr_sel_text">{{selectCateText}}</text>
  110. </view>
  111. </view>
  112. <view class="detail flex_row_start_center">
  113. <template v-for="(itemCat,index) in cateList">
  114. <view v-if="index<cateLimit" :class="{item:true, sel:searchParams.cateId == itemCat.categoryId}" @click="selCat('cateId',itemCat.categoryId,itemCat.categoryName)">
  115. <text class="brand_name">{{itemCat.categoryName}}</text></view>
  116. </template>
  117. </view>
  118. </view>
  119. <!-- 品牌 selectBrandText-->
  120. <view class="part" style="margin-top: 20rpx;" v-if="brandList.length>0">
  121. <view class="title flex_row_between_center">
  122. <text class="left">{{$L('品牌')}}</text>
  123. <text v-if="brandList.length>brandLimit||brandLimit==999999" :class="{iconfont:true, iconziyuan11:true,up:brandFlag=='up',down:brandFlag=='down',}"
  124. @click="viewMoreBrand"></text>
  125. <view v-if="brandList.length>brandLimit||brandLimit==999999" class="attributr_sel_con">
  126. <text class="attributr_sel_text" v-for="(item,index) in selectBrandText">{{item}}<text v-if="(index+1)!=selectBrandText.length">,</text></text>
  127. </view>
  128. </view>
  129. <view class="detail flex_row_start_center">
  130. <template v-for="(item,index) in brandList">
  131. <view v-if='index<brandLimit' :class="{item:true, sel:searchParams.brandId.indexOf(item.brandId)>-1}" @click="selBrand(item.brandId,item.brandName)"><text
  132. class="brand_name">{{item.brandName}}</text></view>
  133. </template>
  134. </view>
  135. </view>
  136. <!-- 商品属性 -->
  137. <view class="part" v-for="(attribute,index) in attributeList" style="margin-top: 20rpx;" v-if="attributeList.length>0">
  138. <view class="title flex_row_between_center">
  139. <text class="left">{{attribute.attributeName}}</text>
  140. <!-- <text :class="{iconfont:true, iconziyuan11:true,up:arrowFlag=='up',down:arrowFlag=='down',}" -->
  141. <text v-if="attribute.attributeValueList.length>attribute.showLimit||attribute.showLimit==999999" :class="{iconfont:true, iconziyuan11:true,up:attribute.showFlag=='up',down:attribute.showFlag=='down',}"
  142. @click="viewMoreAttridute(attribute)"></text>
  143. <view v-if="attribute.attributeValueList.length>attribute.showLimit||attribute.showLimit==999999" class="attributr_sel_con">
  144. <text class="attributr_sel_text" v-for="(item,index) in attribute.select_text_list">{{item}}<text v-if="(index+1)!=attribute.select_text_list.length">,</text></text>
  145. </view>
  146. </view>
  147. <view class="detail flex_row_start_center">
  148. <template v-for="(item,index) in attribute.attributeValueList">
  149. <view v-if="index<attribute.showLimit" :class="{item:true, sel:attribute.select_text_list.indexOf(item.attributeValue)>-1}"
  150. @click="selAttribude(attribute,item.attributeValue)"><text class="brand_name">{{item.attributeValue}}</text></view>
  151. </template>
  152. <!-- <view v-if='brandLimit==17' :class="{item:true}" @click="viewBrand"><text class="brand_name">查看全部品牌</text></view> -->
  153. </view>
  154. </view>
  155. </view>
  156. </scroll-view>
  157. <view class="bottom flex_row_end_center">
  158. <text class="btn reset flex_row_center_center" @click="resetSel">{{$L('重置')}}</text>
  159. <text class="btn confirm flex_row_center_center" @click="confirmSel">{{$L('确认')}}</text>
  160. </view>
  161. </view>
  162. </view>
  163. </view>
  164. </template>
  165. <script module="filters" lang="wxs" src="@/utils/filter.wxs"></script>
  166. <script>
  167. import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
  168. import goodsListItemV from "@/components/goods_list_item_v.vue";
  169. import storeItem from "@/components/store_item.vue";
  170. import goodsItemH from "@/components/goods_item_h.vue";
  171. import loadingState from "@/components/loading-state.vue";
  172. export default {
  173. components: {
  174. uniLoadMore,
  175. goodsListItemV,
  176. goodsItemH,
  177. loadingState,
  178. storeItem
  179. },
  180. data() {
  181. return {
  182. midPrice: '', //筛选切换用
  183. imgUrl: getApp().globalData.imgUrl,
  184. source: '', //页面来源(从哪个页面进入的),如果是搜素页,点击该页顶部搜素的时候会返回上级页面,否则会跳转
  185. searchParams: {
  186. brandId: [], //选中的品牌,多选
  187. categoryIds: '', //选中的分类
  188. lowPrice: '', //筛选的最低价
  189. highPrice: '', //筛选的最高价
  190. attribudeId: '',
  191. keyword: '',
  192. storeId:'',
  193. goodsIds:'',
  194. cateId:''
  195. }, //搜索的参数
  196. stopPullDownRefresh: false, //是否下拉刷新中
  197. cateMaskState: 0, //分类面板展开状态
  198. headerPosition: "fixed",
  199. filterIndex: 0,
  200. priceOrder: 0, //1 价格从低到高 2价格从高到低
  201. cateList: [], //分类列表
  202. brandList: [], //品牌列表
  203. brandLimit: 6, //筛选条件展示
  204. cateLimit: 6, //筛选条件展示
  205. arrowFlag: '',
  206. goodsList: [],
  207. loadingState: 'first_loading',
  208. pageSize: 10,
  209. current: 1,
  210. loading: false, //是否加载数据
  211. hasMore: true, //是否还有数据
  212. gridFlag: false, //是否网格形式展示,默认item形式展示
  213. options: {},
  214. pricearea: true,
  215. seleindex: 0,
  216. store_list: [],
  217. store_info: {
  218. pageSize: 10,
  219. current: 1,
  220. hasMore: false
  221. },
  222. showStoreList: false,
  223. attributeList: [], //商品属性列表
  224. cateFlag: 'up',
  225. brandFlag: 'up',
  226. selectCateText: '', //已选分类名称
  227. selectBrandText: [], //已选品牌列表
  228. keyword:''
  229. };
  230. },
  231. onLoad(options) {
  232. this.options = options;
  233. // this.getBrandList();
  234. // if (options.source) {
  235. // this.source = options.source;
  236. // }
  237. this.keyword = decodeURIComponent(options.keyword)
  238. if (options.keyword) { //关键词
  239. this.searchParams.keyword = decodeURIComponent(options.keyword)
  240. }
  241. if (options.goodsIds) { //关键词
  242. this.searchParams.goodsIds = decodeURIComponent(options.goodsIds)
  243. }
  244. if (options.storeId) { //店铺id
  245. this.searchParams.storeId = decodeURIComponent(options.storeId)
  246. }
  247. if (options.categoryId) { //接受分类
  248. this.searchParams.categoryIds = options.categoryId;
  249. if(!options.source){//如果是优惠券进来的分类,不调取筛选条件中的品牌等
  250. this.getcateList(options.categoryId);
  251. }
  252. }
  253. if(options.brandId){ //品牌id
  254. this.searchParams.brandIds = decodeURIComponent(options.brandId)
  255. }
  256. if(options.storeInnerLabelId){ //店铺内分类id
  257. this.searchParams.storeInnerLabelId = decodeURIComponent(options.storeInnerLabelId)
  258. }
  259. this.getGoodsList();
  260. },
  261. onShow() {
  262. },
  263. onPageScroll(e) {
  264. //兼容iOS端下拉时顶部漂移
  265. if (e.scrollTop >= 0) {
  266. this.headerPosition = "fixed";
  267. } else {
  268. this.headerPosition = "absolute";
  269. }
  270. },
  271. //下拉刷新
  272. onPullDownRefresh() {
  273. this.current = 1;
  274. this.stopPullDownRefresh = true; //下拉刷新状态
  275. this.getGoodsList();
  276. },
  277. methods: {
  278. changeSort(index) {
  279. this.seleindex = index
  280. this.filterIndex = index
  281. this.pricearea = !this.pricearea
  282. this.current=1
  283. this.getGoodsList()
  284. },
  285. getGoodsList() {
  286. uni.showLoading({
  287. title:'加载中',
  288. icon:'none'
  289. })
  290. //处理属性选择
  291. let attributeInfo = []
  292. this.attributeList.map(item => {
  293. if (item.select_list.length > 0) {
  294. item.select_list.map(item => {
  295. attributeInfo.push(item)
  296. })
  297. }
  298. })
  299. let param = {};
  300. param.url = 'v3/goods/front/goods/goodsList';
  301. param.data = {};
  302. param.data.pageSize = this.pageSize;
  303. param.data.current = this.current;
  304. param.data.sort = this.filterIndex;
  305. if (this.searchParams.categoryIds) {
  306. param.data.categoryIds = this.searchParams.categoryIds
  307. }
  308. if(this.searchParams.cateId){
  309. param.data.categoryIds = this.searchParams.cateId
  310. }
  311. if (attributeInfo.length > 0) {
  312. param.data.attributeInfo = attributeInfo.join(',')
  313. }
  314. if (this.searchParams.highPrice) {
  315. param.data.highPrice = this.searchParams.highPrice
  316. }
  317. if (this.searchParams.lowPrice) {
  318. param.data.lowPrice = this.searchParams.lowPrice;
  319. }
  320. if(param.data.lowPrice > param.data.highPrice) {
  321. this.midPrice = param.data.lowPrice
  322. param.data.lowPrice = param.data.highPrice
  323. param.data.highPrice = this.midPrice
  324. this.searchParams.lowPrice = param.data.lowPrice;
  325. this.searchParams.highPrice = param.data.highPrice;
  326. }
  327. if (this.searchParams.keyword) {
  328. param.data.keyword = this.searchParams.keyword
  329. }
  330. // if (this.searchParams.brandId.join(',')) {
  331. // param.data.brandIds = this.searchParams.brandId.join(',')
  332. // }
  333. if (this.searchParams.storeId) {
  334. param.data.storeId = this.searchParams.storeId
  335. }
  336. if (this.searchParams.goodsIds) {
  337. param.data.goodsIds = this.searchParams.goodsIds
  338. }
  339. if(this.searchParams.brandIds){
  340. param.data.brandIds = this.searchParams.brandIds
  341. }
  342. if(this.searchParams.storeInnerLabelId){
  343. param.data.storeInnerLabelId = this.searchParams.storeInnerLabelId
  344. }
  345. this.loadingState = this.loadingState == 'first_loading' ? this.loadingState : 'loading';
  346. this.$request(param).then(res => {
  347. if (res.state == 200) {
  348. if (this.current == 1) {
  349. this.goodsList = res.data.list;
  350. } else {
  351. this.goodsList = this.goodsList.concat(res.data.list);
  352. }
  353. this.hasMore = this.$checkPaginationHasMore(res.data.pagination); //是否还有数据
  354. if (this.hasMore) {
  355. this.current++;
  356. this.loadingState = 'allow_loading_more';
  357. } else {
  358. this.loadingState = 'no_more_data';
  359. }
  360. uni.hideLoading()
  361. } else {
  362. uni.hideLoading()
  363. //错误提示
  364. }
  365. if (this.stopPullDownRefresh) {
  366. this.stopPullDownRefresh = false;
  367. uni.stopPullDownRefresh();
  368. }
  369. })
  370. },
  371. //加载更多事件
  372. getMoreData() {
  373. if (this.hasMore) {
  374. this.getGoodsList();
  375. }
  376. },
  377. getMoreStoreData(){
  378. if (this.store_info.hasMore) {
  379. this.getShopList();
  380. }
  381. },
  382. //切换页面展示风格
  383. tabShowStyle() {
  384. this.gridFlag = !this.gridFlag;
  385. },
  386. //加载商品 ,带下拉刷新和上滑加载
  387. async loadData(type = 'add', loading) {
  388. //没有更多直接返回
  389. if (type === 'add') {
  390. if (this.loadingType === 'nomore') {
  391. return;
  392. }
  393. this.loadingType = 'loading';
  394. } else {
  395. this.loadingType = 'more'
  396. }
  397. let goodsList = await this.$api.json('goodsList');
  398. if (type === 'refresh') {
  399. this.goodsList = [];
  400. }
  401. //筛选,测试数据直接前端筛选了
  402. if (this.filterIndex === 1) {
  403. goodsList.sort((a, b) => b.sales - a.sales)
  404. }
  405. if (this.filterIndex === 2) {
  406. goodsList.sort((a, b) => {
  407. if (this.priceOrder == 1) {
  408. return a.price - b.price;
  409. }
  410. return b.price - a.price;
  411. })
  412. }
  413. this.goodsList = this.goodsList.concat(goodsList);
  414. //判断是否还有下一页,有是more 没有是nomore(测试数据判断大于20就没有了)
  415. this.loadingType = this.goodsList.length > 20 ? 'nomore' : 'more';
  416. if (type === 'refresh') {
  417. if (loading == 1) {
  418. uni.hideLoading()
  419. } else {
  420. uni.stopPullDownRefresh();
  421. }
  422. }
  423. },
  424. //筛选点击
  425. tabClick(index) {
  426. if (this.filterIndex === index) {
  427. return;
  428. }
  429. this.filterIndex = index;
  430. //根据筛选条件重新请求
  431. this.loadingState = 'first_loading';
  432. this.goodsList = [];
  433. this.current = 1;
  434. if (index == 2) {
  435. this.getShopList()
  436. this.showStoreList = true
  437. } else {
  438. this.getGoodsList();
  439. this.showStoreList = false
  440. }
  441. },
  442. //获取店铺列表
  443. getShopList(index) {
  444. uni.showLoading({
  445. title:'加载中',
  446. icon:'none'
  447. })
  448. let param = {};
  449. param.url = 'v3/seller/front/store/list';
  450. param.data = {};
  451. param.data.pageSize = this.store_info.pageSize;
  452. param.data.current = this.store_info.current;
  453. param.data.keyword = this.searchParams.keyword
  454. this.loadingState = this.loadingState == 'first_loading' ? this.loadingState : 'loading';
  455. this.$request(param).then(res => {
  456. if (res.state == 200) {
  457. if (this.store_info.current == 1) {
  458. this.store_list = res.data.list;
  459. } else {
  460. this.store_list = this.store_list.concat(res.data.list);
  461. }
  462. this.store_info.hasMore = this.$checkPaginationHasMore(res.data.pagination); //是否还有数据
  463. if (this.store_info.hasMore) {
  464. this.store_info.current++;
  465. this.loadingState = 'allow_loading_more';
  466. } else {
  467. this.loadingState = 'no_more_data';
  468. }
  469. uni.hideLoading()
  470. } else {
  471. uni.hideLoading()
  472. this.$api.msg(res.msg)
  473. //错误提示
  474. }
  475. if (this.stopPullDownRefresh) {
  476. this.stopPullDownRefresh = false;
  477. uni.stopPullDownRefresh();
  478. }
  479. })
  480. },
  481. showSelect() {
  482. const {
  483. pricearea
  484. } = this;
  485. this.pricearea = !pricearea
  486. },
  487. //显示分类面板
  488. toggleCateMask(type) {
  489. let timer = type === 'show' ? 10 : 300;
  490. let state = type === 'show' ? 1 : 0;
  491. this.cateMaskState = 2;
  492. setTimeout(() => {
  493. this.cateMaskState = state;
  494. }, timer)
  495. },
  496. //详情
  497. navToDetailPage(item) {
  498. //测试数据没有写id,用title代替
  499. let id = item.title;
  500. uni.navigateTo({
  501. url: `/pages/product/product?id=${id}`
  502. })
  503. },
  504. stopPrevent() {},
  505. //点击顶部搜索事件
  506. search() {
  507. let pages = getCurrentPages(); //获取所有页面栈实例列
  508. let prevPage = pages[pages.length - 2]; //上一页页面实例
  509. if(prevPage.route=='pages/search/search'){
  510. prevPage.$vm.input_val = this.keyword;
  511. uni.navigateBack({
  512. delta:1
  513. })
  514. }else{
  515. uni.navigateTo({
  516. url:'/pages/search/search'
  517. })
  518. }
  519. // url: '/pages/search/search'
  520. },
  521. navBack() {
  522. uni.navigateBack();
  523. },
  524. //查看更多品牌
  525. viewMoreBrand() {
  526. let curFlag = this.brandFlag;
  527. if (curFlag == '' || curFlag == 'down') {
  528. this.brandFlag = 'up';
  529. } else if (curFlag == 'up') {
  530. this.brandFlag = 'down';
  531. }
  532. this.brandLimit = this.brandLimit == 6 ? 999999 : 6
  533. },
  534. //查看更多分类
  535. viewMoreCate() {
  536. let curFlag = this.cateFlag;
  537. if (curFlag == '' || curFlag == 'down') {
  538. this.cateFlag = 'up';
  539. } else if (curFlag == 'up') {
  540. this.cateFlag = 'down';
  541. }
  542. this.cateLimit = this.cateLimit == 6 ? 999999 : 6
  543. },
  544. //查看更多属性
  545. viewMoreAttridute(attribute) {
  546. let curFlag = attribute.showFlag;
  547. if (curFlag == '' || curFlag == 'down') {
  548. attribute.showFlag = 'up';
  549. } else if (curFlag == 'up') {
  550. attribute.showFlag = 'down';
  551. }
  552. attribute.showLimit = attribute.showLimit == 6 ? 999999 : 6
  553. },
  554. //选择分类
  555. selCat(type, id, name) {
  556. this.selectCateText = name
  557. if (this.searchParams[type] == id) {
  558. //选中的话取消选中
  559. this.searchParams[type] = '';
  560. } else {
  561. this.searchParams[type] = id;
  562. }
  563. },
  564. //选择品牌
  565. selBrand(id, name) {
  566. let tmp_data = this.searchParams.brandId;
  567. let position = tmp_data.indexOf(id);
  568. if (position > -1) {
  569. //选中的话取消选中
  570. this.searchParams.brandId.splice(position, 1);
  571. this.selectBrandText.splice(position, 1)
  572. } else {
  573. if (this.searchParams.brandId == 5) {
  574. uni.showToast({
  575. title: '品牌最多选择五条',
  576. icon: 'none'
  577. })
  578. return
  579. }
  580. this.selectBrandText.push(name)
  581. this.searchParams.brandId.push(id);
  582. }
  583. },
  584. //选择属性
  585. selAttribude(attribute, attributeValue) {
  586. let attributedata = ''
  587. let position = attribute.select_text_list.indexOf(attributeValue);
  588. if (position > -1) {
  589. //选中的话取消选中
  590. attribute.select_text_list.splice(position, 1);
  591. attribute.select_list.splice(position, 1)
  592. } else {
  593. if (attribute.select_text_list.length == 5) {
  594. uni.showToast({
  595. title: '属性值最多选择五条',
  596. icon: 'none'
  597. })
  598. return
  599. }
  600. attributedata = attribute.attributeName + '_' + attributeValue
  601. attribute.select_list.push(attributedata)
  602. attribute.select_text_list.push(attributeValue)
  603. }
  604. },
  605. //根据二级分类获取三级分类
  606. getcateList(id) {
  607. this.$request({
  608. url: 'v3/goods/front/goods/category/screenList',
  609. data: {
  610. categoryId: id
  611. },
  612. }).then(res => {
  613. if (res.state == 200) {
  614. if (res.data.categoryList != null) {
  615. this.cateList = res.data.categoryList;
  616. this.cateList.map(item => {
  617. if (item.categoryId == this.searchParams.categoryIds) {
  618. this.selectCateText = item.categoryName
  619. }
  620. })
  621. }
  622. if (res.data.brandList != null) {
  623. this.brandList = res.data.brandList;
  624. }
  625. if (res.data.attributeList != null) {
  626. this.attributeList = res.data.attributeList;
  627. this.attributeList.map(item => {
  628. this.$set(item, 'select_list', [])
  629. this.$set(item, 'select_text_list', [])
  630. this.$set(item, 'showFlag', 'up')
  631. this.$set(item, 'showLimit', 6)
  632. })
  633. }
  634. } else {
  635. this.$api.msg(res.msg);
  636. }
  637. }).catch((e) => {
  638. //异常处理
  639. })
  640. },
  641. //重置筛选条件
  642. resetSel() {
  643. this.searchParams.cateId = '' || this.options.cateId; //路径里带过来的
  644. this.cateMaskState = 0
  645. this.searchParams.lowPrice = ''
  646. this.searchParams.highPrice = ''
  647. this.searchParams.brandId = []
  648. this.attributeList.map(item => {
  649. item.select_text_list = []
  650. item.select_list = []
  651. })
  652. this.getGoodsList();
  653. },
  654. //弹层的确认事件
  655. confirmSel() {
  656. //关闭弹层
  657. this.toggleCateMask();
  658. this.goodsList = [];
  659. this.current = 1;
  660. this.getGoodsList();
  661. },
  662. //价格输入事件
  663. inputPrice(e) {
  664. this.searchParams[e.currentTarget.dataset.key] = e.detail.value;
  665. },
  666. //清空输入框的值
  667. clearInput(e) {
  668. this.searchParams.keyword = '';
  669. this.$forceUpdate();
  670. const pages = getCurrentPages();
  671. const prevPage = pages[pages.length - 2];
  672. prevPage.$vm.input_val = '';
  673. uni.navigateBack({
  674. delta: 1
  675. })
  676. },
  677. },
  678. }
  679. </script>
  680. <style lang="scss">
  681. page,
  682. .content {
  683. background: $bg-color-split;
  684. display: flex;
  685. width: 750rpx;
  686. flex: 1;
  687. margin: 0 auto;
  688. }
  689. uni-page-body {
  690. display: flex;
  691. height: 100%;
  692. }
  693. .sea_input_part {
  694. position: fixed;
  695. display: flex;
  696. align-items: center;
  697. height: 88rpx;
  698. background-color: #fff;
  699. width: 750rpx;
  700. padding-right: 20rpx;
  701. top: 0;
  702. right: 0;
  703. left: 0;
  704. margin: 0 auto;
  705. /* #ifdef APP-PLUS */
  706. top: var(--status-bar-height);
  707. /* #endif */
  708. .back_icon {
  709. padding-left: 20rpx;
  710. }
  711. .sea_input {
  712. flex: 1;
  713. height: 65rpx;
  714. font-size: 28rpx;
  715. color: #333;
  716. }
  717. .search_center {
  718. display: flex;
  719. align-items: center;
  720. border: none;
  721. flex: 1;
  722. height: 65rpx;
  723. margin-left: 20rpx;
  724. padding-left: 20rpx;
  725. border-radius: 32.5rpx;
  726. background-color: #f5f5f5;
  727. .search_icon {
  728. width: 30rpx;
  729. height: 30rpx;
  730. margin-right: 22rpx;
  731. }
  732. }
  733. .clear_content {
  734. width: 45rpx !important;
  735. height: 45rpx !important;
  736. margin-right: 15rpx !important;
  737. }
  738. .sea_btn {
  739. font-size: 28rpx;
  740. color: #2D2D2D;
  741. padding: 10rpx 25rpx;
  742. flex-shrink: 0;
  743. }
  744. &:after {
  745. position: absolute;
  746. content: '';
  747. left: 0;
  748. bottom: 0;
  749. width: 100%;
  750. height: 1rpx;
  751. background-color: #eee;
  752. transform: scaleY(0.5);
  753. }
  754. }
  755. .top_part {
  756. top: var(--window-top);
  757. position: fixed;
  758. z-index: 9;
  759. }
  760. .navbar {
  761. position: fixed;
  762. left: 0;
  763. right: 0;
  764. margin: 0 auto;
  765. top: var(--window-top);
  766. display: flex;
  767. width: 750rpx;
  768. height: 80rpx;
  769. background: #fff;
  770. z-index: 10;
  771. margin-top: 87rpx;
  772. /* #ifdef APP-PLUS */
  773. margin-top: calc(var(--status-bar-height) + 87rpx);
  774. /* #endif */
  775. .complex .iconfont {
  776. font-size: 16rpx;
  777. transform: scale(0.5, 0.5);
  778. }
  779. .nav-item {
  780. flex: 1;
  781. display: flex;
  782. justify-content: center;
  783. align-items: center;
  784. height: 100%;
  785. font-size: 30upx;
  786. color: $font-color-dark;
  787. position: relative;
  788. .iconfont {
  789. color: $main-font-color;
  790. &.active {
  791. color: $main-color;
  792. }
  793. }
  794. .synthesize_icon {
  795. font-size: 16rpx;
  796. transform: scale(0.5, 0.5)
  797. }
  798. .filter_icon {
  799. font-size: 24rpx;
  800. margin-left: 9rpx;
  801. transform: scale(0.8, 0.8);
  802. margin-top: 6rpx;
  803. }
  804. &.current {
  805. // color: $main-color;
  806. color: #FC1C1C !important;
  807. .iconziyuan14 {
  808. color: #FC1C1C !important
  809. }
  810. &:after {
  811. content: '';
  812. position: absolute;
  813. left: 50%;
  814. bottom: 0;
  815. transform: translateX(-50%);
  816. width: 120upx;
  817. height: 0;
  818. }
  819. }
  820. }
  821. .p-box {
  822. display: flex;
  823. flex-direction: column;
  824. font-size: 16rpx;
  825. transform: scale(0.3, 0.3);
  826. margin-left: -9rpx;
  827. .price_up {
  828. margin-bottom: 4rpx;
  829. }
  830. .price_down {
  831. margin-top: 4rpx;
  832. }
  833. }
  834. .cate_item {
  835. display: flex;
  836. justify-content: center;
  837. align-items: center;
  838. height: 100%;
  839. width: 80upx;
  840. position: relative;
  841. font-size: 55rpx;
  842. color: $main-font-color;
  843. &.grid_icon {
  844. font-size: 36rpx;
  845. }
  846. &:after {
  847. content: '';
  848. position: absolute;
  849. left: 0;
  850. top: 50%;
  851. transform: translateY(-50%);
  852. border-left: 1px solid rgba(0, 0, 0, .1);
  853. width: 0;
  854. height: 36upx;
  855. }
  856. }
  857. }
  858. .goods_part {
  859. position: absolute;
  860. top: 166rpx;
  861. height: calc(100vh - 168rpx);
  862. /* #ifdef APP-PLUS */
  863. top: calc(var(--status-bar-height) + 168rpx);
  864. /* #endif */
  865. /* #ifdef APP-PLUS||MP-WEIXIN */
  866. padding-bottom: constant(safe-area-inset-bottom); /*兼容 IOS<11.2*/
  867. padding-bottom: env(safe-area-inset-bottom); /*兼容 IOS>11.2*/
  868. /* #endif */
  869. }
  870. .goods_list {
  871. flex-wrap: wrap;
  872. width: 750rpx;
  873. }
  874. .goods_list_another {
  875. margin-top: 20rpx;
  876. flex-wrap: wrap;
  877. width: 750rpx;
  878. }
  879. /* 分类 */
  880. .wrap {
  881. display: flex;
  882. flex-direction: column;
  883. height: 100%;
  884. }
  885. .cate-mask {
  886. position: fixed;
  887. left: 0;
  888. right: 0;
  889. margin: 0 auto;
  890. top: var(--window-top);
  891. bottom: 0;
  892. width: 750rpx;
  893. background: rgba(0, 0, 0, 0);
  894. z-index: 95;
  895. transition: .3s;
  896. overflow: hidden;
  897. .cate-content {
  898. width: 600rpx;
  899. height: 100%;
  900. background: $bg-color-split;
  901. float: right;
  902. transform: translateX(100%);
  903. transition: .3s;
  904. .bottom {
  905. position: fixed;
  906. left: 0;
  907. bottom: 0;
  908. right: 0;
  909. height: 100rpx;
  910. background: #fff;
  911. box-shadow: 0px 0px 15rpx 0px rgba(86, 86, 86, 0.1);
  912. .btn {
  913. width: 150rpx;
  914. height: 50rpx;
  915. border-radius: 25rpx;
  916. }
  917. .reset {
  918. border: 1rpx solid #ADADAD;
  919. color: #333333;
  920. font-size: 26rpx;
  921. }
  922. .confirm {
  923. background: #F30300;
  924. // box-shadow: 0px 3rpx 15rpx 0px rgba(215, 163, 53, 0.2);
  925. color: #fff;
  926. font-size: 26rpx;
  927. margin-right: 30rpx;
  928. margin-left: 20rpx;
  929. }
  930. }
  931. }
  932. &.none {
  933. display: none;
  934. }
  935. &.show {
  936. background: rgba(0, 0, 0, .4);
  937. .cate-content {
  938. transform: translateX(0);
  939. }
  940. }
  941. }
  942. .cate-list {
  943. height: calc(100vh - 98rpx - 100rpx);
  944. .part {
  945. padding: 30rpx;
  946. background: #fff;
  947. .title {
  948. margin-bottom: 10rpx;
  949. .left {
  950. color: $main-font-color;
  951. font-size: 28rpx;
  952. font-weight: bold;
  953. }
  954. .iconfont {
  955. font-size: 16rpx;
  956. transform: rotate(90deg);
  957. -ms-transform: rotate(90deg);
  958. /* IE 9 */
  959. -webkit-transform: rotate(90deg);
  960. /* Safari and Chrome */
  961. &.up {
  962. -webkit-animation: moveUp 0.6 ease-in-out 0.2s forwards;
  963. }
  964. &.down {
  965. -webkit-animation: moveDown 0.6 ease-in-out 0.2s forwards;
  966. }
  967. @-webkit-keyframes moveUp {
  968. 0% {
  969. -webkit-transform: rotate(90deg);
  970. }
  971. 100% {
  972. -webkit-transform: rotate(360deg);
  973. }
  974. }
  975. @-webkit-keyframes moveDown {
  976. 0% {
  977. -webkit-transform: rotate(360deg);
  978. }
  979. 100% {
  980. -webkit-transform: rotate(495deg);
  981. }
  982. }
  983. }
  984. }
  985. .detail {
  986. flex-wrap: wrap;
  987. position: relative;
  988. &.price_area:after {
  989. position: absolute;
  990. content: '';
  991. width: 25rpx;
  992. height: 1rpx;
  993. background-color: rgba(45, 45, 45, .4);
  994. margin: 10rpx 38rpx 0 258rpx;
  995. }
  996. .item {
  997. display: flex;
  998. justify-content: center;
  999. align-items: center;
  1000. background-color: $bg-color-split;
  1001. height: 70rpx;
  1002. border-radius: 35rpx;
  1003. width: 167rpx;
  1004. color: #2D2D2D;
  1005. font-size: 22rpx;
  1006. margin-right: 20rpx;
  1007. margin-top: 20rpx;
  1008. line-height: 70rpx;
  1009. overflow: hidden;
  1010. .brand_name {
  1011. max-width: 147rpx;
  1012. white-space: nowrap;
  1013. overflow: hidden;
  1014. text-overflow: ellipsis;
  1015. }
  1016. &:nth-child(3n+3) {
  1017. margin-right: 0;
  1018. }
  1019. &.sel {
  1020. color: $main-color;
  1021. background-color: rgba(252, 28, 28, .05);
  1022. }
  1023. }
  1024. .amount {
  1025. margin-top: 20rpx;
  1026. text-align: center;
  1027. width: 220rpx;
  1028. height: 70rpx;
  1029. background: $bg-color-split;
  1030. border-radius: 35rpx;
  1031. font-size: 24rpx;
  1032. color: #2D2D2D;
  1033. &.hight {
  1034. margin-left: 100rpx;
  1035. }
  1036. }
  1037. .price_input_placeholder {
  1038. color: $main-third-color;
  1039. font-size: 22rpx;
  1040. text-align: center;
  1041. }
  1042. }
  1043. &.price_part {
  1044. // flex: 1;
  1045. // padding-bottom: 130rpx;
  1046. }
  1047. }
  1048. }
  1049. /* 商品列表 */
  1050. .goods-list {
  1051. display: flex;
  1052. flex-wrap: wrap;
  1053. padding: 0 30upx;
  1054. background: #fff;
  1055. .goods-item {
  1056. display: flex;
  1057. flex-direction: column;
  1058. width: 48%;
  1059. padding-bottom: 40upx;
  1060. &:nth-child(2n+1) {
  1061. margin-right: 4%;
  1062. }
  1063. }
  1064. .image-wrapper {
  1065. width: 100%;
  1066. height: 330upx;
  1067. border-radius: 3px;
  1068. overflow: hidden;
  1069. image {
  1070. width: 100%;
  1071. height: 100%;
  1072. opacity: 1;
  1073. }
  1074. }
  1075. .title {
  1076. font-size: $font-lg;
  1077. color: $font-color-dark;
  1078. line-height: 80upx;
  1079. }
  1080. .price-box {
  1081. display: flex;
  1082. align-items: center;
  1083. justify-content: space-between;
  1084. padding-right: 10upx;
  1085. font-size: 24upx;
  1086. color: $font-color-light;
  1087. }
  1088. .price {
  1089. font-size: $font-lg;
  1090. color: $uni-color-primary;
  1091. line-height: 1;
  1092. &:before {
  1093. content: '¥';
  1094. font-size: 26upx;
  1095. }
  1096. }
  1097. }
  1098. .empty_part {
  1099. margin-top: 276rpx;
  1100. width: 100%;
  1101. image {
  1102. width: 210rpx;
  1103. height: 210rpx;
  1104. }
  1105. text {
  1106. color: $main-third-color;
  1107. font-size: 26rpx;
  1108. margin-top: 57rpx;
  1109. }
  1110. button {
  1111. width: 245rpx;
  1112. height: 66rpx;
  1113. background: rgba(252, 28, 28, .05);
  1114. border-radius: 33rpx;
  1115. color: $main-color;
  1116. font-size: 30rpx;
  1117. font-weight: bold;
  1118. margin-top: 29rpx;
  1119. }
  1120. uni-button:after {
  1121. border-radius: 200rpx;
  1122. border-color: #fff;
  1123. }
  1124. }
  1125. .fixed_top_status_bar {
  1126. position: fixed;
  1127. /* #ifdef APP-PLUS */
  1128. height: var(--status-bar-height);
  1129. /* #endif */
  1130. /* #ifndef APP-PLUS */
  1131. height: 0;
  1132. /* #endif */
  1133. top: 0;
  1134. left: 0;
  1135. right: 0;
  1136. z-index: 99;
  1137. background: #fff;
  1138. }
  1139. .pricearea {
  1140. position: fixed;
  1141. /* #ifdef APP-PLUS */
  1142. top: var(--status-bar-height);
  1143. /* #endif */
  1144. /* #ifndef APP-PLUS */
  1145. top: 0;
  1146. /* #endif */
  1147. left: 0;
  1148. right: 0;
  1149. width: 750rpx;
  1150. height: 100vh;
  1151. padding-top: 159rpx;
  1152. box-sizing: border-box;
  1153. background-color: rgba(0, 0, 0, 0.5);
  1154. z-index: 8;
  1155. margin: 0 auto;
  1156. }
  1157. .pricearea .pri-content {
  1158. padding: 25rpx 25rpx 15rpx 36rpx;
  1159. background-color: #F8F8F8;
  1160. border-radius: 0 0 14rpx 14rpx;
  1161. }
  1162. .pricearea .pri-item {
  1163. display: flex;
  1164. align-items: center;
  1165. justify-content: space-between;
  1166. height: 80rpx;
  1167. color: #2D2D2D;
  1168. font-size: 28rpx;
  1169. }
  1170. .pricearea .pri-item.current {
  1171. color: #E1251B;
  1172. }
  1173. .pricearea .pri-item.current image {
  1174. width: 23rpx;
  1175. height: 16rpx;
  1176. }
  1177. .shop_lists {
  1178. margin-top : 168rpx;
  1179. width: 100%;
  1180. background: #F5F5F5;
  1181. padding: 20rpx 0;
  1182. box-sizing: border-box;
  1183. height: 100%;
  1184. // #ifdef APP-PLUS
  1185. padding: 60rpx 0;
  1186. //#endif
  1187. }
  1188. .shop_pre {
  1189. width: 710rpx;
  1190. background: rgba(255, 255, 255, 1);
  1191. border-radius: 15rpx;
  1192. margin: 0 auto;
  1193. box-sizing: border-box;
  1194. margin-bottom: 20rpx;
  1195. padding: 0 21rpx;
  1196. }
  1197. .pre_top {
  1198. display: flex;
  1199. width: 100%;
  1200. height: 140rpx;
  1201. justify-content: space-between;
  1202. align-items: center;
  1203. }
  1204. .shop_left {
  1205. display: flex;
  1206. align-items: center;
  1207. }
  1208. .shop_avatar_img {
  1209. width: 80rpx;
  1210. height: 80rpx;
  1211. border-radius: 50%;
  1212. margin-right: 20rpx;
  1213. background: #F8F8F8;
  1214. }
  1215. .shop_avatar {
  1216. width: 80rpx;
  1217. height: 80rpx;
  1218. border-radius: 50%;
  1219. margin-right: 20rpx;
  1220. }
  1221. .shop_des {
  1222. display: flex;
  1223. flex-direction: column;
  1224. }
  1225. .des_top {
  1226. display: flex;
  1227. margin-bottom: 20rpx;
  1228. }
  1229. .shop_name {
  1230. max-width: 323rpx;
  1231. font-size: 30rpx;
  1232. font-family: PingFang SC;
  1233. font-weight: bold;
  1234. color: rgba(45, 45, 45, 1);
  1235. line-height: 32rpx;
  1236. white-space: nowrap;
  1237. text-overflow: ellipsis;
  1238. overflow: hidden;
  1239. word-break: break-all;
  1240. }
  1241. .shop_type {
  1242. width: 56rpx;
  1243. height: 30rpx;
  1244. background: #FB1B1B;
  1245. border-radius: 15rpx;
  1246. font-size: 22rpx;
  1247. font-family: PingFang SC;
  1248. font-weight: 600;
  1249. color: #FFFFFF;
  1250. line-height: 32rpx;
  1251. display: flex;
  1252. align-items: center;
  1253. justify-content: center;
  1254. }
  1255. .des_bottom {
  1256. display: flex;
  1257. }
  1258. .popularity {
  1259. font-size: 24rpx;
  1260. font-family: PingFang SC;
  1261. font-weight: 600;
  1262. color: #999999;
  1263. line-height: 32rpx;
  1264. margin-left: 10rpx;
  1265. }
  1266. .line {
  1267. height: 24rpx;
  1268. color: #999999;
  1269. font-size: 24rpx;
  1270. margin: 0 15rpx;
  1271. }
  1272. .payer_number {
  1273. font-size: 24rpx;
  1274. font-family: PingFang SC;
  1275. font-weight: 600;
  1276. color: #999999;
  1277. line-height: 32rpx;
  1278. }
  1279. .go_shop {
  1280. width: 100rpx;
  1281. height: 50rpx;
  1282. border: 1rpx solid #FF0000;
  1283. border-radius: 25rpx;
  1284. font-size: 28rpx;
  1285. font-family: PingFang SC;
  1286. font-weight: 600;
  1287. color: #FB1B1B;
  1288. line-height: 32rpx;
  1289. display: flex;
  1290. align-items: center;
  1291. justify-content: center;
  1292. }
  1293. .pre_content {
  1294. display: flex;
  1295. }
  1296. .commodity {
  1297. width: 216rpx;
  1298. height: 216rpx;
  1299. position: relative;
  1300. margin-right: 10rpx;
  1301. margin-bottom: 21rpx;
  1302. background: #F5F5F5;
  1303. border-radius: 10rpx;
  1304. }
  1305. .commodity:nth-of-type(3) {
  1306. margin-right: 0;
  1307. }
  1308. .commodity_images {
  1309. width: 216rpx;
  1310. height: 216rpx;
  1311. border-radius: 10rpx;
  1312. margin-bottom: 20rpx;
  1313. background: #F8F8F8;
  1314. }
  1315. .commodity_img {
  1316. width: 216rpx;
  1317. height: 216rpx;
  1318. border-radius: 10rpx;
  1319. margin-bottom: 20rpx;
  1320. }
  1321. .commodity_price {
  1322. font-size: 24rpx;
  1323. font-family: PingFang SC;
  1324. font-weight: 600;
  1325. color: #FFFFFF;
  1326. line-height: 24rpx;
  1327. position: absolute;
  1328. width: 100%;
  1329. bottom: 0;
  1330. z-index: 10;
  1331. text-align: center;
  1332. height: 36rpx;
  1333. background: rgba(0, 0, 0, 0.3);
  1334. border-radius: 0 0 10rpx 10rpx;
  1335. display: flex;
  1336. align-items: center;
  1337. justify-content: center;
  1338. }
  1339. .commodity_price text:nth-child(1),
  1340. .commodity_price text:nth-last-child(1) {
  1341. font-size: 20rpx;
  1342. }
  1343. .filter_title {
  1344. margin-top: 40rpx;
  1345. margin: 28rpx;
  1346. }
  1347. .default {
  1348. color: #dddddd !important;
  1349. }
  1350. .default .iconfont {
  1351. color: #dddddd !important;
  1352. }
  1353. .attributr_sel_con {
  1354. position: absolute;
  1355. right: 65rpx;
  1356. width: 370rpx;
  1357. white-space: nowrap;
  1358. overflow: hidden;
  1359. text-overflow: ellipsis;
  1360. color: red;
  1361. text-align: right;
  1362. font-size: 18rpx;
  1363. }
  1364. </style>