immediatelyList.vue 26 KB

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