immediatelyList.vue 26 KB

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