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