immediatelyList.vue 27 KB

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