immediatelyList.vue 28 KB

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