immediatelyList.vue 26 KB

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