immediatelyList.vue 27 KB

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