immediatelyList.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909
  1. <template>
  2. <view class="container commodity-list-wrapper" :style="{'overflow':(showSkeleton? 'hidden' : 'auto'),'height': (showSkeleton? windowHeight + 'px' : 'auto')}">
  3. <view class="good-search clearfix" v-if="searchStatus">
  4. <view class="nav-tab-bar u-f-ajc">
  5. <block v-for="(tab,index) in tabBars" :key='tab.id' :class="{ current: tabIndex === index }">
  6. <view class="tabstyle u-f-ajc" :class="{'addstyle':tabIndex==index}" @tap="changeTab(index)">
  7. {{tab.name}}<i v-if='(tabIndex==index)' class='nav-tab-line iconfont icon-gou'></i>
  8. </view>
  9. </block>
  10. </view>
  11. <view class="search-from name">
  12. <text class="iconfont icon-iconfonticonfontsousuo1"></text>
  13. <input class="input"
  14. type="text"
  15. focus
  16. confirm-type="search"
  17. v-model="searchInputVal"
  18. placeholder="请输入商品关键词"
  19. @input="onShowClose"
  20. @confirm="searchOpertor(tabIndex)"
  21. maxlength="20"/>
  22. <text class="iconfont icon-shanchu1" v-if="isShowClose" @click="delInputText(tabIndex)"></text>
  23. </view>
  24. </view>
  25. <list-skeleton v-if="showSkeleton"></list-skeleton>
  26. <view class="empty-container" v-if="isShowEmpty" >
  27. <image class="empty-container-image" src="https://img.caimei365.com/group1/M00/03/71/Cmis2F3wna6AY2ZjAABpmnBICH4247.png"></image>
  28. <text class="error-text">{{isShowEmptyText}}</text>
  29. </view>
  30. <!-- 单一商品 -->
  31. <view class="product-container" v-else >
  32. <view :class="tabIndex" v-if="tabIndex === 0" :style="{paddingTop:searchStatus?'128rpx':''}">
  33. <scroll-view :style="{'height':scrollHeight+'px'}" @scrolltolower="scrolltolower(tabIndex)" scroll-y v-if="listData.length > 0">
  34. <view v-for="(item,index) in listData" :key="index" :id="item.id" class="all-type-list-content commodity-list" @click.stop="navToDetailPage(item.productID)" >
  35. <image mode='widthFix' :src="item.image" class="list-img" alt="list-img"></image>
  36. <view class="list-details-info">
  37. <text class="list-details-title">{{isInterceptHtmlFn(item.name)}}</text>
  38. <text class="list-details-specs">规格:{{item.unit?item.unit:''}}</text>
  39. <text class="list-details-miniQuantity list-details-specs">起订量:{{item.minBuyNumber}}</text>
  40. <view class="list-details-specs" v-if="item.productCode!=''&&item.productCode!=null">
  41. <view>商品编码:{{item.productCode}}</view>
  42. </view>
  43. <view class="list-details-price">
  44. <view v-if="priceLoading" class="list-price-loding">正在获取价格...</view>
  45. <view v-else class="list-shop">
  46. <view class="list-price">
  47. <text class="price-view activity" v-if="item.isShowActFlg">活动价</text>
  48. <text class="price-larger">¥{{item.price}}</text>
  49. <text class="price-view ladder" v-if="item.ladderPriceFlag == '1'" @click.stop="alertjieti(item)">阶</text>
  50. </view>
  51. <view class="list-price-none" v-if="item.repurchasePriceState">
  52. <text class="price-none">¥{{item.discountPrice}}</text>
  53. <text class="iconfont icon-wenhao" @click.stop="repurchModel"></text>
  54. </view>
  55. </view>
  56. <button class="add-cart-btn" @click.stop="operationHanld(item)">数量</button>
  57. </view>
  58. </view>
  59. </view>
  60. <view v-if="showLoading && listData.length > 4 && !showRegularBtn">
  61. <view class="loading-wrapper loading-wrapper-now" v-if="loadingNow">{{loadingText}}<text v-if="loadingText === '已至底部'">‧ ‧ ‧</text></view>
  62. <view class="loading-wrapper loading-wrapper-btm" v-else>———<text class="btm-text">已至底部</text>———</view>
  63. </view>
  64. </scroll-view>
  65. </view>
  66. <!-- 组合商品 -->
  67. <view :class="tabIndex" v-if="tabIndex === 1">
  68. <scroll-view :style="{'height':scrollHeight+'px'}" @scrolltolower="scrolltolower(tabIndex)" scroll-y>
  69. <view class="all-zuhe-list" v-for="(item,index) in combinationProduct" :key="index" :id="item.id" :style="{paddingTop:searchStatus?'112rpx':''}" >
  70. <view class="zuhe_title" :class="index%2==0 ? 'active' : ''">{{item.name}}</view>
  71. <view v-for="(pros,proIndex) in item.combinationProductList" :class="index%2==0 ? 'stylecontent' : ''" :key="proIndex" :id="pros.productID" class="zuhe-list-content commodity-list" >
  72. <view class="list-details-info" >
  73. <text class="list-details-title zuhe_list_text">商品编码:{{pros.productCode}}</text>
  74. <text class="list-details-specs zuhe_list_text" @click.stop="navToDetailPage(pros.productID)">{{pros.name}}</text>
  75. <view class="list-details-price zuhe_list_price">
  76. <view class="list-shop">
  77. <view class="list-price zuhe_list_price" >
  78. <view class="zuhe_price-larger zuhe_list_text" >价格:¥{{pros.retailPrice.toFixed(2)}}</view>
  79. <view :style="{'overflow':'hidden'}">
  80. <view class="price-two zuhe_list_text" >总价:<text class="zuhe_list_zj">¥ {{pros.totalPrice.toFixed(2)}}</text></view>
  81. <text class="price-view ladder zuhe-price-ladder" v-if="pros.ladderPriceFlag == '1'" @click.stop="alertjieti(pros)">阶</text>
  82. <text class="price-view activity" v-if="pros.actStatus == '1'">活动价</text>
  83. </view>
  84. </view>
  85. <view class="list-price-none" v-if="pros.repurchasePriceState">
  86. <text class="price-none">价格:¥{{pros.discountPrice}}</text>
  87. <text class="iconfont icon-wenhao" @click.stop="repurchModel"></text>
  88. </view>
  89. <view class="count">
  90. <view class="number-box">
  91. <view class="iconfont icon-jianhao" @click.stop="changeCountSub(item,pros)"></view>
  92. <input class="btn-input" type="number" maxlength='6' v-model="pros.initProductNum" @blur="changeNnmber($event,item,pros)">
  93. <view class="iconfont icon-jiahao" @click.stop="changeCountAdd(item,pros)"></view>
  94. </view>
  95. </view>
  96. </view>
  97. </view>
  98. </view>
  99. </view>
  100. <view class="foot_conten" >
  101. <view class="zuhe_foot-box">
  102. <view class="">
  103. <text>种类:{{item.productKind}}</text>
  104. <text >总数:{{item.productTotalNum}}</text>
  105. </view>
  106. <text>总额:<text class="foot_text">{{item.productTotalAmount.toFixed(2)}}</text></text>
  107. </view>
  108. <button type="default" class="buycart" @click.stop="operationHanld(item)">加入购物车</button>
  109. </view>
  110. </view>
  111. <view v-if="showLoading && combinationProduct.length > 4 && !showRegularBtn">
  112. <view class="loading-wrapper loading-wrapper-now" v-if="loadingNow">{{loadingText}}<text v-if="loadingText === '已至底部'">‧ ‧ ‧</text></view>
  113. <view class="loading-wrapper loading-wrapper-btm" v-else>———<text class="btm-text">已至底部</text>———</view>
  114. </view>
  115. </scroll-view>
  116. </view>
  117. </view>
  118. <!-- 可拖动悬浮按钮 -->
  119. <cm-drag :cartNum="cartQuantity"
  120. :isDock="true"
  121. :existTabBar="true"
  122. @btnClick="btnClick"
  123. @btnTouchstart="btnTouchstart"
  124. @btnTouchend="btnTouchend">
  125. </cm-drag>
  126. <!-- 透明模态层 -->
  127. <modal-layer v-if='isModallayer'></modal-layer>
  128. </view>
  129. </template>
  130. <script>
  131. import listSkeleton from '@/components/cm-module/listTemplate/listSkeleton'
  132. import modalLayer from "@/components/modal-layer"
  133. import uniStars from '@/components/uni-stars/uni-stars.vue'
  134. import cmDrag from '@/components/cm-custom/cm-drag.vue'
  135. import { queryNewSearchProduct,querySearchProductPrice} from "@/api/product.js"
  136. import { getSellerProduct,getcombinationProduct } from "@/api/seller.js"
  137. import { mapState,mapMutations } from 'vuex';
  138. export default{
  139. name:'productList',
  140. components:{
  141. listSkeleton,
  142. modalLayer,
  143. uniStars,
  144. cmDrag
  145. },
  146. props: {
  147. searchStatus:{
  148. type:Boolean,
  149. default:false
  150. }
  151. },
  152. data(){
  153. return{
  154. isShowClose:false,
  155. searchInputVal:'',
  156. isModallayer:false,
  157. windowHeight: '',
  158. showSkeleton: false,
  159. priceLoading:true,
  160. isShowEmpty: false,
  161. isShowEmptyText: '搜索相关商品',
  162. clubUserId: '',
  163. scrollHeight: '',
  164. listData: [],
  165. combinationProduct:[],
  166. zuheProductList:[],//组合商品列表
  167. showLoading: false,
  168. loadingNow: true,
  169. loadingText: '上拉加载更多',
  170. pageSize: 10,
  171. zuhepageSize:5,
  172. pageNum: 1,
  173. totalPage:1,
  174. hasNextPage: false,
  175. pullFlag: true,
  176. fromRegularPurchasePage: false,
  177. cartQuantity: 0,
  178. showRegularBtn: false,
  179. isPrecedence:false,
  180. ladderPriceList:[],//是否 阶梯,
  181. tabIndex:0,
  182. goodsList:[],
  183. tabBars:[
  184. {name:'单一',id:'danyi'},
  185. {name:'组合',id:'zuhe'}
  186. ],
  187. isShow: false,
  188. }
  189. },
  190. created() {
  191. this.setScrollHeight();
  192. this.$api.getComStorage('orderUserInfo').then((resolve) =>{
  193. this.clubUserId = resolve.userID
  194. })
  195. },
  196. computed: {
  197. ...mapState(['hasLogin','userInfo'])
  198. },
  199. methods:{
  200. scrolltolower(tabIndex) {
  201. if(tabIndex ==0){
  202. if(this.totalPage>this.pageNum && this.pullFlag) {
  203. this.getProductAgainInfo(true);
  204. }
  205. }else if(tabIndex==1){
  206. if(this.hasNextPage && this.pullFlag) {
  207. this.getcombinationProduct(true);
  208. }
  209. }
  210. },
  211. setScrollHeight() {
  212. const {windowHeight, pixelRatio} = wx.getSystemInfoSync();
  213. this.windowHeight = windowHeight - 1;
  214. this.scrollHeight = windowHeight - 1;
  215. },
  216. getProductAgainInfo(loadMore) {
  217. this.showLoading = true;
  218. this.loadingNow = true;
  219. this.loadingText = '加载中';
  220. this.isShowEmpty = false;
  221. if(loadMore) {this.pageNum += 1;}
  222. let params = {keyword:this.searchInputVal,pageNum:this.pageNum,pageSize:this.pageSize,sortField:'',sortType:''}
  223. queryNewSearchProduct(params).then(response =>{
  224. this.isShowWrapper = true
  225. const resData = JSON.parse(response.data);
  226. console.log(resData)
  227. const resList = resData.items;
  228. if(resList && resList.length > 0){
  229. this.totalPage = resData.total;
  230. this.showEmpty = false;
  231. if(loadMore) {
  232. this.listData = [...this.listData,...resList];
  233. console.log(this.listData)
  234. this.setProductPrice()
  235. } else {
  236. this.listData = [...resList];
  237. this.setProductPrice()
  238. this.showSkeleton = false;
  239. }
  240. // 防上拉暴滑
  241. this.pullFlag = false;
  242. setTimeout(()=>{ this.pullFlag = true; },500)
  243. // 底部提示文案
  244. if(this.totalPage>this.pageNum) {
  245. this.loadingText = '上拉加载更多';
  246. } else {
  247. this.showLoading = true;
  248. this.loadingNow = false;
  249. }
  250. } else {
  251. if(!loadMore) {
  252. this.isShowEmpty = true;
  253. this.isShowEmptyText ='暂无相关商品'
  254. }
  255. }
  256. }).catch(error =>{
  257. this.$util.msg(error.msg,2000);
  258. })
  259. },
  260. setProductPrice(){//获取价格
  261. let productIdArr = [];
  262. this.listData.map(item=>{
  263. productIdArr.push(item.pid)
  264. })
  265. console.log(productIdArr)
  266. this.productIds = productIdArr.join(",");
  267. querySearchProductPrice({userId: this.clubUserId,productIds:this.productIds}).then(response =>{
  268. if (response.data) {
  269. let priceList = response.data,isActFlg;
  270. this.listData.map(item=>{
  271. for (let i = 0; i < priceList.length; i++) {
  272. if(priceList[i].actStatus == 1){
  273. isActFlg = true
  274. }else if(priceList[i].actStatus == 1 && priceList[i].ladderPriceFlag == '1'){
  275. isActFlg = true
  276. }else{
  277. isActFlg = false
  278. }
  279. let priceObj ={
  280. actStatus:priceList[i].actStatus,
  281. costCheckFlag:priceList[i].costCheckFlag,
  282. costPrice:priceList[i].costPrice,
  283. costProportional:priceList[i].costProportional,
  284. ladderPriceFlag:priceList[i].ladderPriceFlag,
  285. price:Number(priceList[i].price).toFixed(2),
  286. minBuyNumber:priceList[i].minBuyNumber,
  287. isShowActFlg:isActFlg
  288. }
  289. if( item.pid == priceList[i].productId ){
  290. Object.assign(item,priceObj)
  291. }
  292. }
  293. });
  294. console.log(this.listData)
  295. }
  296. this.priceLoading = false;
  297. }).catch(error =>{
  298. this.$util.msg(error.msg,2000)
  299. })
  300. },
  301. searchOpertor(tabIndex){//搜索商品
  302. if(tabIndex == 0){
  303. if(this.searchInputVal == ''){
  304. this.$util.msg('请输入商品关键词',2000)
  305. }else{
  306. this.pageNum = 1
  307. this.showSkeleton = true;
  308. this.getProductAgainInfo();
  309. }
  310. }else{
  311. this.pageNum = 1
  312. this.showSkeleton = true;
  313. this.getcombinationProduct();
  314. }
  315. },
  316. getcombinationProduct(loadMore){//组合搜索商品
  317. this.showLoading = true;
  318. this.loadingNow = true;
  319. this.loadingText = '加载中';
  320. this.isShowEmpty = false;
  321. if(loadMore) {this.pageNum += 1;}
  322. let params = {clubUserId:this.clubUserId,pageNum:this.pageNum,pageSize:this.zuhepageSize,searchWord:this.searchInputVal}
  323. getcombinationProduct(params).then(response =>{
  324. this.isShowWrapper = true
  325. const responseData = response.data;
  326. if(responseData.results && responseData.results.length > 0){
  327. this.hasNextPage = responseData.hasNextPage;
  328. this.isShowEmpty = false;
  329. if(loadMore) {
  330. this.combinationProduct = [...this.combinationProduct,...responseData.results];
  331. } else {
  332. this.combinationProduct = [...responseData.results];
  333. this.showSkeleton = false;
  334. }
  335. // 防上拉暴滑
  336. this.pullFlag = false;
  337. setTimeout(()=>{
  338. this.pullFlag = true;
  339. },500)
  340. // 底部提示文案
  341. if(this.hasNextPage) {
  342. this.loadingText = '上拉加载更多';
  343. } else {
  344. this.showLoading = true;
  345. this.loadingNow = false;
  346. }
  347. } else {
  348. this.isShowEmpty = true;
  349. this.isShowEmptyText ='暂无相关商品'
  350. }
  351. }).catch(error =>{
  352. this.$util.msg(error.msg,2000);
  353. })
  354. },
  355. changeCountAdd(item,pros){//商品数量加加
  356. if(pros.initProductNum == 0){
  357. pros.initProductNum = pros.minBuyNumber
  358. this.processActivityPrice(pros)
  359. }else if(pros.initProductNum >= pros.minBuyNumber){
  360. pros.initProductNum++
  361. this.processActivityPrice(pros)
  362. }
  363. this.totalPeice(item)
  364. this.totalCount(item)
  365. this.totalKind(item)
  366. },
  367. changeCountSub(item,pros){//商品数量减减
  368. if(pros.initProductNum==0){
  369. this.$util.msg(`采购数量不能小于0`,2000);
  370. return
  371. }else if(pros.initProductNum == pros.minBuyNumber){
  372. pros.initProductNum = 0;
  373. this.processActivityPrice(pros);
  374. }else{
  375. pros.initProductNum--
  376. this.processActivityPrice(pros)
  377. }
  378. this.totalPeice(item)
  379. this.totalCount(item)
  380. this.totalKind(item)
  381. },
  382. changeNnmber(e,item,pros){//输入商品数量更新
  383. let _value = e.detail.value;
  384. if(!this.$api.isNumber(_value)){
  385. pros.initProductNum = pros.minBuyNumber
  386. }else if(_value < pros.minBuyNumber){
  387. this.$util.msg(`该商品最小起订量为${pros.minBuyNumber}`,2000);
  388. pros.initProductNum = pros.minBuyNumber
  389. }else{
  390. pros.initProductNum = parseInt(e.detail.value)
  391. this.processActivityPrice(pros)
  392. }
  393. this.totalPeice(item)
  394. this.totalCount(item)
  395. this.totalKind(item)
  396. },
  397. totalPeice(item){ //计算总价格,每次调用此方法,将初始值为0,遍历价格并累加
  398. let prosPrice=0;
  399. let productsList =[];
  400. productsList=item.combinationProductList;
  401. productsList.forEach(pros=>{
  402. prosPrice+=pros.retailPrice*pros.initProductNum;
  403. item.productTotalAmount = prosPrice;
  404. })
  405. // console.log(prosPrice)
  406. },
  407. totalCount(item){//计算总数量
  408. let prosAllCount=0
  409. let productsList =[];
  410. productsList = item.combinationProductList
  411. productsList.forEach(pros=>{
  412. prosAllCount+=parseInt(pros.initProductNum);
  413. item.productTotalNum = prosAllCount
  414. })
  415. // console.log(prosAllCount)
  416. },
  417. totalKind(item){//计算商品种类
  418. let productsList =[];
  419. let checkList = [];
  420. productsList=item.combinationProductList;
  421. productsList.forEach(pros=>{
  422. if(pros.initProductNum>0){
  423. checkList.push(pros)
  424. item.productKind = checkList.length;
  425. }else{
  426. item.productKind = checkList.length;
  427. }
  428. })
  429. },
  430. processActivityPrice(pros){//单独处理活动价格和阶梯价格
  431. let ladderPriceList = pros.ladderPriceList;
  432. if(pros.ladderPriceFlag == '0' || pros.actStatus == 1){
  433. pros.totalPrice = pros.initProductNum*pros.retailPrice
  434. }else{
  435. ladderPriceList.forEach((item,index)=>{
  436. if(pros.initProductNum>=item.buyNum){
  437. pros.retailPrice = item.buyPrice
  438. pros.totalPrice = pros.initProductNum*item.buyPrice
  439. }
  440. })
  441. }
  442. },
  443. operationHanld(prop){
  444. this.$emit('operationConfim',prop);
  445. },
  446. alertjieti(pros){
  447. this.$emit('alertjietiConfim',pros);
  448. },
  449. changeTab(index){
  450. this.tabIndex = index;
  451. if(index == 0){
  452. this.loadingNow = false
  453. this.isShowEmpty = true;
  454. this.isShowEmptyText ='暂无相关商品'
  455. }
  456. this.$emit('changetab',index);
  457. },
  458. navToDetailPage(id) {
  459. this.isModallayer = true;
  460. this.$api.navigateTo(`/pages/goods/product?id=${id}`);
  461. this.isModallayer = false;
  462. },
  463. repurchModel(){
  464. this.$util.modal('','此商品的价格有变化,原来的购买价已不适用','知道了','',false,() =>{})
  465. },
  466. onShowClose () {//输入框失去焦点时触发
  467. if(this.searchInputVal != ''){
  468. this.isShowClose = true
  469. }else{
  470. this.isShowClose = false
  471. }
  472. },
  473. delInputText(tabIndex){//清除输入框内容
  474. if(tabIndex==0){
  475. this.searchInputVal = '';
  476. this.listData =[];
  477. this.isShowClose = false;
  478. this.loadingNow = false;
  479. this.isShowEmpty = true; this.isShowEmptyText ='暂无相关商品'
  480. }else{
  481. this.searchInputVal = '';
  482. this.isShowClose = false;
  483. this.getcombinationProduct();
  484. }
  485. },
  486. isInterceptHtmlFn(text){
  487. let name = this.$reg.interceptHtmlFn(text)
  488. return name
  489. },
  490. btnClick() {
  491. this.$emit('goCartPage')
  492. },
  493. btnTouchstart() {
  494. // console.log('btnTouchstart');
  495. },
  496. btnTouchend() {
  497. // console.log('btnTouchend');
  498. }
  499. }
  500. }
  501. </script>
  502. <style lang="scss">
  503. .all-zuhe-list{
  504. background: #FFFFFF;
  505. }
  506. .foot_conten{
  507. width: 655rpx;
  508. background: #fff;
  509. font-size: 28rpx;
  510. height: 80rpx;
  511. // line-height: 80rpx;
  512. display: inherit;
  513. padding: 10px;
  514. overflow: hidden;
  515. margin: 20rpx auto;
  516. }
  517. .zuhe_foot-box{
  518. float: left;
  519. overflow: hidden;
  520. white-space: nowrap;
  521. // text-overflow: ellipsis;
  522. width: 490rpx;
  523. }
  524. .zuhe_foot-box text{
  525. margin-right: 36rpx;
  526. }
  527. .foot_text{
  528. color: #FF2A2A;
  529. }
  530. .foot_conten .buycart{
  531. width: 162rpx;
  532. height: 64rpx;
  533. background: #EFAF00 !important;
  534. color: #fff;
  535. font-size: 28rpx;
  536. border-radius: 36rpx;
  537. text-align: center;
  538. line-height: 64rpx;
  539. float: right;
  540. }
  541. .price-none{
  542. font-size: 24rpx;
  543. color: #666666;
  544. }
  545. .zuhe_title{
  546. background:#FFFFFF;
  547. height: 76rpx;
  548. font-size: 28rpx;
  549. color: #1675E1;
  550. border-bottom: 4rpx solid #1675E1 ;
  551. line-height: 76rpx;
  552. padding-left: 30rpx;
  553. &.active{
  554. color: #E15616;
  555. border-bottom: 4rpx solid #E15616;
  556. }
  557. }
  558. .tabstyle{
  559. width: 128rpx;
  560. height: 76rpx;
  561. font-size: 26rpx;
  562. display: inline-block;
  563. border-radius: 10rpx;
  564. text-align: center;
  565. line-height: 76rpx;
  566. border: 2rpx solid #EEEEEE;
  567. position: relative;
  568. margin-right: 12rpx;
  569. &.addstyle{
  570. background: $btn-confirm;
  571. color: #FFFFFF;
  572. &::before{
  573. content: "";
  574. width: 0;
  575. height: 0;
  576. border-top: 20rpx solid transparent;
  577. border-right: 20rpx solid #FFFFFF;
  578. border-left: 20rpx solid transparent;
  579. border-bottom: 20rpx solid #FFFFFF;
  580. position: absolute;
  581. right: 0;
  582. bottom: 0;
  583. }
  584. }
  585. .icon-gou{
  586. width: 36rpx;
  587. height: 36rpx;
  588. line-height: 36rpx;
  589. text-align: center;
  590. color: #E15616;
  591. position: absolute;
  592. bottom: -5rpx;
  593. right: -5rpx;
  594. font-weight: bold;
  595. font-size: $font-size-28;
  596. }
  597. }
  598. .commodity-list-wrapper {
  599. scroll-view {
  600. height: 100%;
  601. }
  602. .show-more-btn {
  603. width: 276rpx;
  604. height: 52rpx;
  605. line-height: 52rpx;
  606. border: 2rpx solid #D8D8D8;
  607. background: #F7F7F7;
  608. font-size: 26rpx;
  609. margin: 26rpx 0;
  610. position: absolute;
  611. left: 50%;
  612. margin-left: -138rpx;
  613. }
  614. }
  615. .good-search{
  616. height: 80rpx;
  617. width: 100%;
  618. padding: 24rpx;
  619. background: #FFFFFF;
  620. display: flex;
  621. align-items: center;
  622. margin-bottom: 20rpx;
  623. position: fixed;
  624. top: 0;
  625. left: 0;
  626. z-index: 19;
  627. .search-from{
  628. width: 420rpx;
  629. height: 80rpx;
  630. background: #F7F7F7;
  631. border-radius: 14rpx;
  632. float: left;
  633. position: relative;
  634. .input{
  635. width: 340rpx;
  636. height: 80rpx;
  637. float: left;
  638. line-height: 80rpx;
  639. color: $text-color;
  640. font-size: $font-size-24;
  641. }
  642. .icon-iconfonticonfontsousuo1{
  643. width: 64rpx;
  644. height: 80rpx;
  645. line-height: 80rpx;
  646. text-align: center;
  647. display: block;
  648. font-size: $font-size-38;
  649. float: left;
  650. color: #999999;
  651. }
  652. .icon-shanchu1{
  653. font-size: $font-size-32;
  654. color: #999999;
  655. position: absolute;
  656. width: 120rpx;
  657. height: 80rpx;
  658. line-height: 80rpx;
  659. top: 0;
  660. right: 0;
  661. text-align: center;
  662. z-index: 10;
  663. }
  664. }
  665. .search-btn{
  666. // width: 120rpx;
  667. line-height: 64rpx;
  668. text-align: center;
  669. font-size: $font-size-28;
  670. color: $color-system;
  671. float: left;
  672. background: #FFFFFF;
  673. margin-left: 10rpx;
  674. }
  675. }
  676. .all-type-list-content {
  677. // height: 240rpx;
  678. padding: 24rpx;
  679. background: #fff;
  680. margin-bottom: 2rpx;
  681. display: flex;
  682. flex-direction: row;
  683. box-sizing: content-box;
  684. .list-img {
  685. width: 312rpx;
  686. height: 207rpx !important;
  687. margin-right: 26rpx;
  688. border-radius: 10rpx;
  689. border: 2rpx solid #f3f3f3;
  690. }
  691. }
  692. .zuhe-list-content{
  693. width: 655rpx;
  694. // height: 214rpx;
  695. background: #fff;
  696. border: 2rpx solid #DEF4FF;
  697. display: flex;
  698. flex-direction: row;
  699. box-sizing: content-box;
  700. margin-top: 10rpx;
  701. border-radius: 14rpx;
  702. margin: 10rpx auto;
  703. padding: 20rpx;
  704. &.stylecontent{
  705. border: 2rpx solid #FFF0DE;
  706. }
  707. }
  708. .list-details-info {
  709. width: 100%;
  710. flex-direction: column;
  711. font-size: 26rpx;
  712. position: relative;
  713. .list-details-title {
  714. line-height: 38rpx;
  715. text-overflow: ellipsis;
  716. overflow: hidden;
  717. display: -webkit-box;
  718. -webkit-line-clamp: 2;
  719. line-clamp: 2;
  720. -webkit-box-orient: vertical;
  721. }
  722. .list-details-specs {
  723. width: 100%;
  724. display: inline-block;
  725. margin-top: 8rpx;
  726. color: #666666;
  727. }
  728. .list-details-miniQuantity {
  729. width: 100%;
  730. display: inline-block;
  731. margin-top: 7rpx;
  732. }
  733. }
  734. .list-details-price {
  735. width: 100%;
  736. display: flex;
  737. flex-direction: row;
  738. justify-content: space-between;
  739. .price-icon {
  740. width: 22rpx;
  741. height: 28rpx;
  742. vertical-align: middle;
  743. margin-right: 10rpx;
  744. }
  745. .price-icon + text {
  746. font-size: 25rpx;
  747. vertical-align: middle;
  748. }
  749. .list-login-now {
  750. width: 375rpx;
  751. color: #F8C499;
  752. position: absolute;
  753. bottom: 0;
  754. .p-no{
  755. float: left;
  756. font-size: $font-size-24;
  757. color: $color-system;
  758. margin-right: 10rpx;
  759. }
  760. }
  761. .login-now {
  762. padding: 10rpx 10rpx 10rpx 0;
  763. }
  764. .list-none{
  765. margin-top: 15rpx;
  766. .price-small{
  767. font-size:$font-size-24;
  768. line-height: 40rpx;
  769. color: #FF2A2A;
  770. }
  771. }
  772. .list-price-loding{
  773. flex: 6;
  774. font-size:$font-size-24;
  775. line-height: 64rpx;
  776. color: #FF2A2A;
  777. }
  778. .list-shop{
  779. width: 100%;
  780. height: auto;
  781. flex: 6;
  782. overflow: hidden;
  783. .list-price {
  784. // width: 100%;
  785. color: #FF2A2A;
  786. float: left;
  787. line-height:36rpx ;
  788. align-items: center;
  789. justify-content: center;
  790. .price-larger {
  791. margin-top: 20rpx;
  792. font-size: $font-size-30;
  793. display: inline-block;
  794. margin-right: 20rpx;
  795. }
  796. .zuhe_price-larger{
  797. color: #666666;
  798. // float: left;
  799. // margin-right: 85rpx;
  800. }
  801. .price-two{
  802. color: #666666;
  803. float: left;
  804. }
  805. .zuhe_list_zj{
  806. color: #FF2A2A;
  807. }
  808. .price-view{
  809. display: inline-block;
  810. width: 40rpx;
  811. border-radius: 10rpx;
  812. font-size: $font-size-24;
  813. text-align: center;
  814. color: #FFFFFF;
  815. height: 36rpx;
  816. line-height: 36rpx;
  817. margin-right: 8rpx;
  818. &.ladder{
  819. background: linear-gradient(135deg,rgba(255,0,0,1) 0%,rgba(242,143,49,1) 100%);
  820. }
  821. &.activity{
  822. background: linear-gradient(135deg,rgba(128,0,255,1) 0%,rgba(242,49,153,1) 100%);
  823. }
  824. }
  825. }
  826. .zuhe_list_price .price-view{
  827. margin-left:20rpx;
  828. float: left;
  829. margin-top: 5rpx;
  830. }
  831. .zuhe_list_price{
  832. width: 400rpx;
  833. overflow: hidden;
  834. margin-top: 10rpx;
  835. }
  836. .count{
  837. margin-top: 50rpx;
  838. float: right;
  839. border: 1px solid #EEEEEE;
  840. border-radius: 10rpx;
  841. .number-box{
  842. display: flex;
  843. justify-content: center;
  844. align-items: center;
  845. .iconfont{
  846. font-size: $font-size-24;
  847. padding:0 16rpx;
  848. color: $text-color;
  849. text-align: center;
  850. line-height: 48rpx;
  851. font-weight: bold;
  852. }
  853. .btn-input{
  854. width: 100rpx;
  855. height: 48rpx;
  856. line-height: 48rpx;
  857. background: #F8F8F8;
  858. border-radius: 4rpx;
  859. text-align: center;
  860. font-size: $font-size-24;
  861. border-right: 1px solid #EEEEEE;
  862. border-left: 1px solid #EEEEEE;
  863. }
  864. }
  865. }
  866. .list-price-none{
  867. width: 100%;
  868. .price-none{
  869. text-decoration: line-through;
  870. color: #999999;
  871. display: inline-block;
  872. }
  873. .icon-wenhao{
  874. font-size: $font-size-32;
  875. color: #0091FF;
  876. margin-left: 6rpx;
  877. }
  878. }
  879. }
  880. .add-cart-btn {
  881. flex: 4;
  882. width: 156rpx;
  883. height: 64rpx;
  884. line-height: 64rpx;
  885. border-radius: 32rpx;
  886. color: #333333;
  887. font-size: 26rpx;
  888. margin-right: 0;
  889. // background:linear-gradient(135deg,rgba(242,143,49,1) 0%,rgba(225,86,22,1) 100%);
  890. background: #FFFFFF;
  891. border: 2rpx solid #C9C9C9;
  892. }
  893. .zuhe_btn{
  894. float: right;
  895. }
  896. }
  897. .zuhe_list_price{
  898. display: block !important;
  899. }
  900. .zuhe_list_text{
  901. margin-top: 10rpx;
  902. }
  903. </style>