immediatelyList.vue 26 KB

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