immediatelyList.vue 27 KB

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