immediatelyList.vue 27 KB

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