immediatelyList.vue 28 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018
  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. <view class="coupon-tags" v-if="pros.couponsLogo">优惠券</view>
  61. <template>
  62. <view class="floor-tags" v-if="PromotionsFormat(pros.promotions)">
  63. {{pros.promotions.name}}<text>:¥{{ pros.price | NumFormat }}</text>
  64. </view>
  65. <view class="floor-tags" v-else>{{pros.promotions.name}}</view>
  66. </template>
  67. </view>
  68. <view class="floor-item-act" v-if="pros.actStatus == 0">
  69. <view class="coupon-tags" v-if="pros.couponsLogo">优惠券</view>
  70. <view class="floor-tags" v-if="pros.actStatus ==0 && pros.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" v-if="pros.actStatus==1">
  102. <view class="coupon-tags" v-if="pros.couponsLogo">优惠券</view>
  103. <template>
  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" v-if="pros.actStatus==0">
  111. <view class="coupon-tags" v-if="pros.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(
  321. {
  322. userId: this.clubUserId,
  323. productIds:productIds,
  324. source: 2
  325. }
  326. ).then(response =>{
  327. this.listData = this.ReturnNewProducts(this.listData,response.data);
  328. this.priceLoading = false;
  329. }).catch(error =>{
  330. this.$util.msg(error.msg,2000)
  331. })
  332. },
  333. ReturnNewProducts(Array,list){//合并字段
  334. let NewArray = []
  335. Array.map(item=>{
  336. for (let i = 0; i < list.length; i++) {
  337. if( item.productId == list[i].productId ){
  338. NewArray.push(Object.assign(item,list[i]))
  339. }
  340. }
  341. });
  342. return NewArray
  343. },
  344. searchOpertor(tabIndex){//搜索商品
  345. if(tabIndex == 0){
  346. if(this.searchInputVal == ''){
  347. this.$util.msg('请输入商品关键词',2000)
  348. }else{
  349. this.pageNum = 1
  350. this.showSkeleton = true;
  351. this.getProductAgainInfo();
  352. this.isFocus = false
  353. }
  354. }else{
  355. this.pageNum = 1
  356. this.showSkeleton = true;
  357. this.getcombinationProduct();
  358. this.isFocus = false
  359. }
  360. },
  361. getcombinationProduct(loadMore){//组合搜索商品
  362. this.showLoading = true;
  363. this.loadingNow = true;
  364. this.loadingText = '加载中';
  365. this.isShowEmpty = false;
  366. if(loadMore) {this.pageNum += 1;}
  367. this.ProductService.GetSearchCombinationProduct(
  368. {
  369. clubUserId:this.clubUserId,
  370. pageNum:this.pageNum,
  371. pageSize:this.zuhepageSize,
  372. searchWord:this.searchInputVal,
  373. }
  374. )
  375. .then(response =>{
  376. this.isShowWrapper = true
  377. const responseData = response.data;
  378. console.log(responseData)
  379. if(responseData.results && responseData.results.length > 0){
  380. this.hasNextPage = responseData.hasNextPage;
  381. this.isShowEmpty = false;
  382. if(loadMore) {
  383. this.combinationProduct = [...this.combinationProduct,...responseData.results];
  384. } else {
  385. this.combinationProduct = [...responseData.results];
  386. this.showSkeleton = false;
  387. }
  388. // 防上拉暴滑
  389. this.pullFlag = false;
  390. setTimeout(()=>{
  391. this.pullFlag = true;
  392. },500)
  393. // 底部提示文案
  394. if(this.hasNextPage) {
  395. this.loadingText = '上拉加载更多';
  396. } else {
  397. this.showLoading = true;
  398. this.loadingNow = false;
  399. }
  400. } else {
  401. this.isShowEmpty = true;
  402. this.isShowEmptyText ='暂无相关商品'
  403. }
  404. })
  405. .catch(error =>{
  406. this.$util.msg(error.msg,2000);
  407. })
  408. },
  409. changeCountAdd(item,pros){//商品数量加加
  410. if(pros.initProductNum == 0){
  411. pros.initProductNum = pros.minBuyNumber
  412. this.processActivityPrice(pros)
  413. }else if(pros.initProductNum >= pros.minBuyNumber){
  414. pros.initProductNum++
  415. this.processActivityPrice(pros)
  416. }
  417. this.totalPeice(item)
  418. this.totalCount(item)
  419. this.totalKind(item)
  420. },
  421. changeCountSub(item,pros){//商品数量减减
  422. if(pros.initProductNum==0){
  423. this.$util.msg(`采购数量不能小于0`,2000);
  424. return
  425. }else if(pros.initProductNum == pros.minBuyNumber){
  426. pros.initProductNum = 0;
  427. this.processActivityPrice(pros);
  428. }else{
  429. pros.initProductNum--
  430. this.processActivityPrice(pros)
  431. }
  432. this.totalPeice(item)
  433. this.totalCount(item)
  434. this.totalKind(item)
  435. },
  436. changeNnmber(e,item,pros){//输入商品数量更新
  437. let _value = e.detail.value;
  438. if(!this.$api.isNumber(_value)){
  439. pros.initProductNum = pros.minBuyNumber
  440. }else if(_value < pros.minBuyNumber){
  441. this.$util.msg(`该商品最小起订量为${pros.minBuyNumber}`,2000);
  442. pros.initProductNum = pros.minBuyNumber
  443. }else{
  444. pros.initProductNum = parseInt(e.detail.value)
  445. this.processActivityPrice(pros)
  446. }
  447. this.totalPeice(item)
  448. this.totalCount(item)
  449. this.totalKind(item)
  450. },
  451. totalPeice(item){ //计算总价格,每次调用此方法,将初始值为0,遍历价格并累加
  452. let prosPrice=0;
  453. let productsList =[];
  454. productsList=item.combinationProductList;
  455. productsList.forEach(pros=>{
  456. prosPrice+=pros.price*pros.initProductNum;
  457. item.productTotalAmount = prosPrice;
  458. })
  459. // console.log(prosPrice)
  460. },
  461. totalCount(item){//计算总数量
  462. let prosAllCount=0
  463. let productsList =[];
  464. productsList = item.combinationProductList
  465. productsList.forEach(pros=>{
  466. prosAllCount+=parseInt(pros.initProductNum);
  467. item.productTotalNum = prosAllCount
  468. })
  469. // console.log(prosAllCount)
  470. },
  471. totalKind(item){//计算商品种类
  472. let productsList =[];
  473. let checkList = [];
  474. productsList=item.combinationProductList;
  475. productsList.forEach(pros=>{
  476. if(pros.initProductNum>0){
  477. checkList.push(pros)
  478. item.productKind = checkList.length;
  479. }else{
  480. item.productKind = checkList.length;
  481. }
  482. })
  483. },
  484. processActivityPrice(pros){//单独处理活动价格和阶梯价格
  485. let ladderPriceList = pros.ladderPrices;
  486. if(pros.ladderPriceFlag == '0' || pros.actStatus == 1){
  487. pros.totalPrice = pros.initProductNum*pros.price
  488. }else{
  489. ladderPriceList.forEach((item,index)=>{
  490. if(pros.initProductNum>=item.buyNum){
  491. pros.price = item.buyPrice
  492. pros.totalPrice = pros.initProductNum*item.buyPrice
  493. }
  494. })
  495. }
  496. },
  497. operationHanld(prop){
  498. this.$emit('operationConfim',prop);
  499. },
  500. alertjieti(pros){
  501. this.$emit('alertjietiConfim',pros);
  502. },
  503. changeTab(index){
  504. this.tabIndex = index;
  505. if(index == 0){
  506. this.pageNum = 1
  507. this.getProductAgainInfo()
  508. }else{
  509. this.getcombinationProduct()
  510. }
  511. // this.$emit('changetab',index);
  512. },
  513. navToDetailPage(id) {
  514. this.isModallayer = true;
  515. this.$api.navigateTo(`/pages/goods/product?id=${id}`);
  516. this.isModallayer = false;
  517. },
  518. repurchModel(){
  519. this.$util.modal('','此商品的价格有变化,原来的购买价已不适用','知道了','',false,() =>{})
  520. },
  521. onShowClose () {//输入框失去焦点时触发
  522. if(this.searchInputVal != ''){
  523. this.isShowClose = true
  524. }else{
  525. this.isShowClose = false
  526. }
  527. },
  528. delInputText(tabIndex){//清除输入框内容
  529. if(tabIndex==0){
  530. this.searchInputVal = '';
  531. this.listData =[];
  532. this.isFocus = true
  533. this.isShowClose = false;
  534. this.loadingNow = false;
  535. this.isShowEmpty = true;
  536. this.isShowEmptyText ='暂无相关商品'
  537. }else{
  538. this.searchInputVal = '';
  539. this.isShowClose = false;
  540. this.isFocus = true
  541. this.getcombinationProduct();
  542. }
  543. },
  544. isInterceptHtmlFn(text){
  545. let name = this.$reg.interceptHtmlFn(text)
  546. return name
  547. },
  548. PromotionsFormat(promo){//促销活动类型数据处理
  549. if(promo!=null){
  550. if(promo.type == 1 && promo.mode == 1){
  551. return true
  552. }else{
  553. return false
  554. }
  555. }
  556. return false
  557. },
  558. btnClick() {
  559. this.$emit('goCartPage')
  560. },
  561. btnTouchstart() {
  562. // console.log('btnTouchstart');
  563. },
  564. btnTouchend() {
  565. // console.log('btnTouchend');
  566. }
  567. }
  568. }
  569. </script>
  570. <style lang="scss">
  571. .all-zuhe-list{
  572. background: #FFFFFF;
  573. }
  574. .foot_conten{
  575. width: 655rpx;
  576. background: #fff;
  577. font-size: 28rpx;
  578. height: 80rpx;
  579. // line-height: 80rpx;
  580. display: inherit;
  581. padding: 10px;
  582. overflow: hidden;
  583. margin: 20rpx auto;
  584. }
  585. .zuhe_foot-box{
  586. float: left;
  587. overflow: hidden;
  588. white-space: nowrap;
  589. // text-overflow: ellipsis;
  590. width: 490rpx;
  591. }
  592. .zuhe_foot-box text{
  593. margin-right: 36rpx;
  594. }
  595. .foot_text{
  596. color: #FF2A2A;
  597. }
  598. .foot_conten .buycart{
  599. width: 162rpx;
  600. height: 64rpx;
  601. background: #EFAF00 !important;
  602. color: #fff;
  603. font-size: 26rpx;
  604. border-radius: 36rpx;
  605. text-align: center;
  606. line-height: 64rpx;
  607. float: right;
  608. }
  609. .price-none{
  610. font-size: 24rpx;
  611. color: #666666;
  612. }
  613. .zuhe_title{
  614. background:#FFFFFF;
  615. height: 76rpx;
  616. font-size: 28rpx;
  617. color: #1675E1;
  618. border-bottom: 4rpx solid #1675E1 ;
  619. line-height: 76rpx;
  620. padding-left: 30rpx;
  621. &.active{
  622. color: #E15616;
  623. border-bottom: 4rpx solid #E15616;
  624. }
  625. }
  626. .tabstyle{
  627. width: 128rpx;
  628. height: 76rpx;
  629. font-size: 26rpx;
  630. display: inline-block;
  631. border-radius: 10rpx;
  632. text-align: center;
  633. line-height: 76rpx;
  634. border: 2rpx solid #EEEEEE;
  635. position: relative;
  636. margin-right: 12rpx;
  637. &.addstyle{
  638. background: $btn-confirm;
  639. color: #FFFFFF;
  640. &::before{
  641. content: "";
  642. width: 0;
  643. height: 0;
  644. border-top: 20rpx solid transparent;
  645. border-right: 20rpx solid #FFFFFF;
  646. border-left: 20rpx solid transparent;
  647. border-bottom: 20rpx solid #FFFFFF;
  648. position: absolute;
  649. right: 0;
  650. bottom: 0;
  651. }
  652. }
  653. .icon-gou{
  654. width: 36rpx;
  655. height: 36rpx;
  656. line-height: 36rpx;
  657. text-align: center;
  658. color: #E15616;
  659. position: absolute;
  660. bottom: -5rpx;
  661. right: -5rpx;
  662. font-weight: bold;
  663. font-size: $font-size-28;
  664. }
  665. }
  666. .commodity-list-wrapper {
  667. scroll-view {
  668. height: 100%;
  669. }
  670. .show-more-btn {
  671. width: 276rpx;
  672. height: 52rpx;
  673. line-height: 52rpx;
  674. border: 2rpx solid #D8D8D8;
  675. background: #F7F7F7;
  676. font-size: 26rpx;
  677. margin: 26rpx 0;
  678. position: absolute;
  679. left: 50%;
  680. margin-left: -138rpx;
  681. }
  682. }
  683. .good-search{
  684. height: 80rpx;
  685. width: 100%;
  686. padding: 24rpx;
  687. background: #FFFFFF;
  688. display: flex;
  689. align-items: center;
  690. margin-bottom: 20rpx;
  691. position: fixed;
  692. top: 0;
  693. left: 0;
  694. z-index: 19;
  695. .search-from{
  696. width: 420rpx;
  697. height: 80rpx;
  698. background: #F7F7F7;
  699. border-radius: 40rpx;
  700. float: left;
  701. position: relative;
  702. .input{
  703. width: 340rpx;
  704. height: 80rpx;
  705. float: left;
  706. line-height: 80rpx;
  707. color: $text-color;
  708. font-size: $font-size-24;
  709. }
  710. .icon-iconfonticonfontsousuo1{
  711. width: 64rpx;
  712. height: 80rpx;
  713. line-height: 80rpx;
  714. text-align: center;
  715. display: block;
  716. font-size: $font-size-38;
  717. float: left;
  718. color: #999999;
  719. }
  720. .icon-shanchu1{
  721. font-size: $font-size-32;
  722. color: #999999;
  723. position: absolute;
  724. width: 120rpx;
  725. height: 80rpx;
  726. line-height: 80rpx;
  727. top: 0;
  728. right: 0;
  729. text-align: center;
  730. z-index: 10;
  731. }
  732. }
  733. .search-btn{
  734. // width: 120rpx;
  735. line-height: 64rpx;
  736. text-align: center;
  737. font-size: $font-size-28;
  738. color: $color-system;
  739. float: left;
  740. background: #FFFFFF;
  741. margin-left: 10rpx;
  742. }
  743. }
  744. .all-type-list-content {
  745. // height: 240rpx;
  746. padding: 24rpx;
  747. background: #fff;
  748. margin-bottom: 2rpx;
  749. display: flex;
  750. flex-direction: row;
  751. box-sizing: content-box;
  752. .list-img {
  753. width: 312rpx;
  754. height: 207rpx !important;
  755. margin-right: 26rpx;
  756. border-radius: 10rpx;
  757. border: 2rpx solid #f3f3f3;
  758. }
  759. }
  760. .zuhe-list-content{
  761. width: 655rpx;
  762. // height: 214rpx;
  763. background: #fff;
  764. border: 2rpx solid #DEF4FF;
  765. display: flex;
  766. flex-direction: row;
  767. box-sizing: content-box;
  768. margin-top: 10rpx;
  769. border-radius: 14rpx;
  770. margin: 10rpx auto;
  771. padding: 20rpx;
  772. &.stylecontent{
  773. border: 2rpx solid #FFF0DE;
  774. }
  775. }
  776. .list-details-info {
  777. width: 100%;
  778. flex-direction: column;
  779. font-size: 26rpx;
  780. position: relative;
  781. .list-details-title {
  782. line-height: 38rpx;
  783. text-overflow: ellipsis;
  784. overflow: hidden;
  785. display: -webkit-box;
  786. -webkit-line-clamp: 2;
  787. line-clamp: 2;
  788. -webkit-box-orient: vertical;
  789. }
  790. .list-details-specs {
  791. width: 100%;
  792. display: inline-block;
  793. margin: 5rpx 0;
  794. color: #666666;
  795. }
  796. .list-details-miniQuantity {
  797. width: 100%;
  798. display: inline-block;
  799. margin-top: 7rpx;
  800. }
  801. }
  802. .list-details-price {
  803. width: 100%;
  804. .floor-item-act{
  805. height: 54rpx;
  806. text-align: center;
  807. box-sizing: border-box;
  808. float: left;
  809. padding: 11rpx 0;
  810. .coupon-tags{
  811. height: 32rpx;
  812. box-sizing: border-box;
  813. border-radius: 8rpx;
  814. background-color: #fff1eb;
  815. line-height: 28rpx;
  816. color: #f94b4b;
  817. text-align: center;
  818. display: inline-block;
  819. padding:0 10rpx;
  820. font-size: $font-size-20;
  821. border: 1px solid #f94b4b;
  822. float: left;
  823. margin-right: 12rpx;
  824. }
  825. .floor-tags{
  826. height: 32rpx;
  827. box-sizing: border-box;
  828. border-radius: 8rpx;
  829. background-color: #FFFFFF;
  830. line-height: 28rpx;
  831. color: $color-system;
  832. text-align: center;
  833. display: inline-block;
  834. padding:0 16rpx;
  835. font-size: $font-size-20;
  836. border: 1px solid #E15616;
  837. float: left;
  838. }
  839. }
  840. .price-icon {
  841. width: 22rpx;
  842. height: 28rpx;
  843. vertical-align: middle;
  844. margin-right: 10rpx;
  845. }
  846. .price-icon + text {
  847. font-size: 25rpx;
  848. vertical-align: middle;
  849. }
  850. .list-login-now {
  851. width: 375rpx;
  852. color: #F8C499;
  853. .p-no{
  854. float: left;
  855. font-size: $font-size-24;
  856. color: $color-system;
  857. margin-right: 10rpx;
  858. }
  859. }
  860. .login-now {
  861. padding: 10rpx 10rpx 10rpx 0;
  862. }
  863. .list-none{
  864. margin-top: 15rpx;
  865. .price-small{
  866. font-size:$font-size-24;
  867. line-height: 40rpx;
  868. color: #FF2A2A;
  869. }
  870. }
  871. .list-price-loding{
  872. font-size:$font-size-24;
  873. line-height: 54rpx;
  874. color: #FF2A2A;
  875. }
  876. .list-shop{
  877. float: left;
  878. overflow: hidden;
  879. &.com{
  880. width: 100%;
  881. }
  882. .list-price {
  883. color: #FF2A2A;
  884. float: left;
  885. line-height:54rpx ;
  886. align-items: center;
  887. justify-content: center;
  888. .price-larger {
  889. font-size: $font-size-26;
  890. display: inline-block;
  891. &.none{
  892. text-decoration: line-through;
  893. color: #999999;
  894. }
  895. }
  896. .list-price-all{
  897. width: 100%;
  898. float: left;
  899. }
  900. .zuhe_price-larger{
  901. width: 100%;
  902. float: left;
  903. height: 54rpx;
  904. color: #666666;
  905. .price-larger{
  906. float: left;
  907. margin-right: 20rpx;
  908. }
  909. }
  910. .price-two{
  911. color: #666666;
  912. float: left;
  913. }
  914. .zuhe_list_zj{
  915. color: #FF2A2A;
  916. }
  917. .price-view{
  918. display: inline-block;
  919. width: 40rpx;
  920. border-radius: 10rpx;
  921. font-size: $font-size-22;
  922. text-align: center;
  923. color: #FFFFFF;
  924. height: 36rpx;
  925. line-height: 36rpx;
  926. margin-right: 8rpx;
  927. &.ladder{
  928. background: linear-gradient(135deg,rgba(255,0,0,1) 0%,rgba(242,143,49,1) 100%);
  929. }
  930. &.activity{
  931. background: linear-gradient(135deg,rgba(128,0,255,1) 0%,rgba(242,49,153,1) 100%);
  932. }
  933. }
  934. }
  935. .zuhe_list_price .price-view{
  936. margin-left:20rpx;
  937. float: left;
  938. margin-top: 5rpx;
  939. }
  940. .zuhe_list_price{
  941. width: 100%;
  942. overflow: hidden;
  943. margin-top: 10rpx;
  944. }
  945. .count{
  946. float: right;
  947. border: 1px solid #EEEEEE;
  948. border-radius: 10rpx;
  949. .number-box{
  950. display: flex;
  951. justify-content: center;
  952. align-items: center;
  953. .iconfont{
  954. font-size: $font-size-24;
  955. padding:0 16rpx;
  956. color: $text-color;
  957. text-align: center;
  958. line-height: 48rpx;
  959. font-weight: bold;
  960. }
  961. .btn-input{
  962. width: 100rpx;
  963. height: 48rpx;
  964. line-height: 48rpx;
  965. background: #F8F8F8;
  966. border-radius: 4rpx;
  967. text-align: center;
  968. font-size: $font-size-24;
  969. border-right: 1px solid #EEEEEE;
  970. border-left: 1px solid #EEEEEE;
  971. }
  972. }
  973. }
  974. .list-price-none{
  975. width: 100%;
  976. .price-none{
  977. text-decoration: line-through;
  978. color: #999999;
  979. display: inline-block;
  980. }
  981. .icon-wenhao{
  982. font-size: $font-size-32;
  983. color: #0091FF;
  984. margin-left: 6rpx;
  985. }
  986. }
  987. }
  988. .add-cart-btn {
  989. flex: 4;
  990. width: 140rpx;
  991. height: 54rpx;
  992. line-height: 54rpx;
  993. border-radius: 27rpx;
  994. color: #fff;
  995. font-size: 24rpx;
  996. margin-right: 0;
  997. background:#FFFFFF;
  998. border: 1px solid #C9C9C9;
  999. color: $text-color;
  1000. }
  1001. .zuhe_btn{
  1002. float: right;
  1003. }
  1004. }
  1005. .zuhe_list_price{
  1006. display: block !important;
  1007. }
  1008. .zuhe_list_text{
  1009. margin-top: 0;
  1010. }
  1011. </style>