You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

836 lines
22 KiB

6 months ago
  1. <template>
  2. <view class="content">
  3. <view class="navbar" :style="{position:headerPosition,top:headerTop}">
  4. <view class="nav-item" :class="{current: filterIndex === 0}" @click="tabClick(0)">
  5. 综合排序
  6. </view>
  7. <view class="nav-item" :class="{current: filterIndex === 1}" @click="tabClick(1)">
  8. 销量优先
  9. </view>
  10. <view class="nav-item" :class="{current: filterIndex === 2}" @click="tabClick(2)">
  11. <text>价格</text>
  12. <view class="p-box">
  13. <text :class="{active: priceOrder === 1 && filterIndex === 2}" class="yticon icon-shang"></text>
  14. <text :class="{active: priceOrder === 2 && filterIndex === 2}" class="yticon icon-shang xia"></text>
  15. </view>
  16. </view>
  17. <!-- 跳到购物车 -->
  18. <!-- <navigator url="/pages/cart/cart" open-type="switchTab"><text class=" cate-item yticon icon-gouwuche"></text></navigator> -->
  19. </view>
  20. <view class="goods-list">
  21. <view
  22. v-for="(item, index) in goodsList" :key="index"
  23. class="goods-item">
  24. <view class="image-wrapper" @click="toGoods(item)">
  25. <image :src="item.img" mode="aspectFill"></image>
  26. </view>
  27. <text class="title clamp" @click="toGoods(item)">{{item.mc}}&nbsp;{{item.gg}}{{item.dw}}</text>
  28. <!-- <view>
  29. <text class="sdtext">{{ item.sdtext }}</text>
  30. </view> -->
  31. <view v-if="item.inputnum">
  32. <input style="font-size: 28upx;color: #41A863;" type="text" :value="item.bz" @input="inputchangeBz($event,item.bz,item.id,item.kcnum)" placeholder="输入备注">
  33. <input style="font-size: 28upx;color: #41A863;" type="text" :value="item.fudw" @input="inputchangeFudw($event,item.fudw,item.id,item.kcnum)" placeholder="输入副单位">
  34. </view>
  35. <view class="price-box">
  36. <view class="info">
  37. <view class="price">{{ item.price }}{{item.dw}}</view>
  38. <view class="slogan">库存&nbsp;{{ item.kcnum }}</view>
  39. </view>
  40. <view style="display: flex; justify-content: space-between; width: 100%;">
  41. <!-- <view v-if="item.kcnum==0" class="cart"><cjl-icon color="#909399" size='50'>&#xe60f;</cjl-icon></view> -->
  42. <!-- <view v-if="item.kcnum" @click="addshopcat(item.id)" class="cart"><cjl-icon color="#3883FA" size='50'>&#xe60f;</cjl-icon></view>
  43. <text class="checknum" v-if="item.shownum">{{item.shownum}}</text>
  44. -->
  45. <view class="p-b-btn" :class="{active: item.iscollect}" @click="toFavorite(item.id,index)">
  46. <text class="yticon icon-shoucang"></text>
  47. </view>
  48. <view class="number" v-if="item.kcnum">
  49. <view class="sub" @tap.stop="sub(item.id)" >
  50. <view class="jian">-</view>
  51. </view>
  52. <view class="input" @tap.stop="discard" >
  53. <input type="digit" v-model="item.inputnum==0?'':item.inputnum" @input="inputchange($event,item.inputnum,item.id,item.kcnum,0)" />
  54. </view>
  55. <view class="add" @tap.stop="add(item.id,0)">
  56. <view class="jia">
  57. <image src="../../static/img/addicon.png"></image>
  58. </view>
  59. </view>
  60. </view>
  61. </view>
  62. </view>
  63. <view class="shouqinimg" v-if="item.kcnum==0">
  64. <image src="/static/img/nocknum.png" ></image>
  65. </view>
  66. </view>
  67. </view>
  68. <uni-load-more :status="loadingType"></uni-load-more>
  69. </view>
  70. </template>
  71. <script>
  72. import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
  73. export default {
  74. components: {
  75. uniLoadMore
  76. },
  77. data() {
  78. return {
  79. cateMaskState: 0, //分类面板展开状态
  80. headerPosition:"fixed",
  81. headerTop:"0px",
  82. loadingType: 'more', //加载更多状态
  83. filterIndex: 0,
  84. cateId: 0, //已选三级分类id
  85. priceOrder: 0, //1 价格从低到高 2价格从高到低
  86. goodsList: [],
  87. favorite: true,
  88. cartlist:[],
  89. dflid:0
  90. };
  91. },
  92. onBackPress(options) {
  93. console.log(55555,options);
  94. if (options.from === 'navigateBack') {
  95. return false;
  96. }
  97. // 这里使用重定向
  98. uni.redirectTo({
  99. url: '/pages/category/categoryjiad'
  100. })
  101. return true;
  102. },
  103. onLoad(options){
  104. // #ifdef H5
  105. this.headerTop = document.getElementsByTagName('uni-page-head')[0].offsetHeight+'px';
  106. // #endif
  107. this.cateId = options.fid;
  108. this.dflid=options.dflid;
  109. this.keyword=options.keyword
  110. this.loadData();
  111. //this.getgoodlist();
  112. },
  113. onShow(){
  114. this.checkshownum()
  115. },
  116. onPageScroll(e){
  117. //兼容iOS端下拉时顶部漂移
  118. if(e.scrollTop>=0){
  119. this.headerPosition = "fixed";
  120. }else{
  121. this.headerPosition = "absolute";
  122. }
  123. },
  124. //下拉刷新
  125. onPullDownRefresh(){
  126. this.loadData('refresh');
  127. },
  128. //加载更多
  129. onReachBottom(){
  130. this.loadData();
  131. },
  132. methods: {
  133. //减操作
  134. sub(id) {
  135. let getcartlist = uni.getStorageSync('cartlistjiad');
  136. let isexit = this.findidfromstor(id);
  137. let delid = 0;
  138. for (let i = 0; i < getcartlist.length; i++) {
  139. if (isexit.id == getcartlist[i].id) { //找到商品一样的商品
  140. getcartlist[i].num--; //数量减
  141. if (getcartlist[i].num <= 0) {
  142. //删除当前商品缓存
  143. getcartlist.splice(i, 1);
  144. uni.setStorageSync('cartlistjiad', getcartlist)
  145. break; //跳出循环
  146. } else {
  147. getcartlist[i].total = parseFloat((getcartlist[i].num * getcartlist[i].price) * 100) / 100
  148. uni.setStorageSync('cartlistjiad', getcartlist)
  149. break; //跳出循环
  150. }
  151. }
  152. }
  153. this.checkshownum();
  154. },
  155. // 增加数量,type 0-推荐商品,1-猜你喜欢商品
  156. add(id, type) {
  157. let getcartlist = uni.getStorageSync('cartlistjiad');
  158. //首次加购物车
  159. if (getcartlist == '') {
  160. this.goodsLists = [];
  161. this.goodsLists.push(this.findarrbyid(id));
  162. //计算每个商品的总价格
  163. this.goodsLists.map((item, index) => {
  164. item.total = parseFloat((item.price * item.num) * 100) / 100
  165. });
  166. uni.setStorageSync('cartlistjiad', this.goodsLists);
  167. } else {
  168. //已有商品在购物车
  169. let isexit = this.findidfromstor(id);
  170. if (!isexit) {
  171. //购物车中还没当前商品
  172. //不存在
  173. getcartlist.push(this.findarrbyid(id));
  174. for (let i = 0; i < getcartlist.length; i++) {
  175. if (id == getcartlist[i].id) {
  176. getcartlist[i].total = parseFloat((getcartlist[i].num * getcartlist[i].price) * 100) / 100
  177. }
  178. }
  179. uni.setStorageSync('cartlistjiad', getcartlist);
  180. } else {
  181. //存在
  182. for (let i = 0; i < getcartlist.length; i++) {
  183. if (isexit.id == getcartlist[i].id) { //找到商品一样的商品
  184. getcartlist[i].num++; //数量自增
  185. if (getcartlist[i].num > getcartlist[i].kcnum) {
  186. uni.showToast({
  187. title: '库存不足!',
  188. icon: 'none'
  189. })
  190. break; //跳出循环
  191. } else {
  192. getcartlist[i].total = parseFloat((getcartlist[i].num * getcartlist[i].price) * 100) / 100
  193. uni.setStorageSync('cartlistjiad', getcartlist)
  194. break; //跳出循环
  195. }
  196. }
  197. }
  198. }
  199. }
  200. this.checkshownum();
  201. //更新本地储存
  202. },
  203. // input框直接加入购物车
  204. inputadd(id, type,inputnum) {
  205. let getcartlist = uni.getStorageSync('cartlistjiad');
  206. //首次加购物车
  207. if (getcartlist == '') {
  208. this.goodsLists = [];
  209. this.goodsLists.push(this.findarrbyid(id));
  210. //计算每个商品的总价格
  211. this.goodsLists.map((item, index) => {
  212. // item.total = parseFloat((item.price * item.num) * 100) / 100;
  213. item.total = parseFloat((item.price * inputnum) * 100) / 100;
  214. item.num = parseFloat(inputnum);
  215. });
  216. uni.setStorageSync('cartlistjiad', this.goodsLists);
  217. } else {
  218. //已有商品在购物车
  219. let isexit = this.findidfromstor(id);
  220. if (!isexit) {
  221. //购物车中还没当前商品
  222. //不存在
  223. getcartlist.push(this.findarrbyid(id));
  224. for (let i = 0; i < getcartlist.length; i++) {
  225. if (id == getcartlist[i].id) {
  226. //getcartlist[i].total = parseFloat((getcartlist[i].num * getcartlist[i].price) * 100) / 100;
  227. getcartlist[i].total = parseFloat((inputnum * getcartlist[i].price) * 100) / 100;
  228. getcartlist[i].num = parseFloat(inputnum);
  229. }
  230. }
  231. uni.setStorageSync('cartlistjiad', getcartlist);
  232. } else {
  233. //存在
  234. for (let i = 0; i < getcartlist.length; i++) {
  235. if (isexit.id == getcartlist[i].id) { //找到商品一样的商品
  236. getcartlist[i].num=inputnum; //数量自增
  237. if (getcartlist[i].num > getcartlist[i].kcnum) {
  238. uni.showToast({
  239. title: '库存不足!',
  240. icon: 'none'
  241. })
  242. break; //跳出循环
  243. } else {
  244. getcartlist[i].total = parseFloat((getcartlist[i].num * getcartlist[i].price) * 100) / 100
  245. uni.setStorageSync('cartlistjiad', getcartlist)
  246. break; //跳出循环
  247. }
  248. }
  249. }
  250. }
  251. }
  252. this.checkshownum();
  253. },
  254. inputchange(inputsl,inputnum, id, kcnum,type) {
  255. inputnum=parseFloat(inputsl.detail.value);
  256. let getcartlist = uni.getStorageSync('cartlistjiad');
  257. if (inputnum > 0) {
  258. if (inputnum > kcnum) {
  259. uni.showToast({
  260. title: '库存不足',
  261. icon: 'none'
  262. })
  263. return;
  264. }
  265. this.inputadd(id,type,inputnum);//input框直接添加购物车
  266. } else {
  267. for (let i = 0; i < getcartlist.length; i++) {
  268. if (id == getcartlist[i].id) { //找到商品一样的商品
  269. getcartlist[i].num = 0;
  270. uni.setStorageSync('cartlistjiad', getcartlist)
  271. break; //跳出循环
  272. }
  273. }
  274. this.checkshownum();
  275. }
  276. },
  277. //初始化购物车数据
  278. checkshownum(){
  279. let getcartlist=uni.getStorageSync('cartlistjiad');
  280. let carid=[];let carbz=[];let carfudw=[];
  281. for(let i=0;i<getcartlist.length;i++){
  282. carid[getcartlist[i]['id']]=getcartlist[i]['num'];
  283. carbz[getcartlist[i]['id']] = getcartlist[i]['bz'];
  284. carfudw[getcartlist[i]['id']] = getcartlist[i]['fudw'];
  285. }
  286. for(let i=0;i<this.goodsList.length;i++){
  287. if(carid[this.goodsList[i]['id']]){
  288. this.$set(this.goodsList[i],'shownum',carid[this.goodsList[i]['id']])
  289. this.$set(this.goodsList[i],'inputnum',carid[this.goodsList[i]['id']])
  290. this.$set(this.goodsList[i], 'bz', carbz[this.goodsList[i]['id']])
  291. this.$set(this.goodsList[i], 'fudw', carfudw[this.goodsList[i]['id']])
  292. }else{
  293. this.$set(this.goodsList[i],'shownum',0)
  294. this.$set(this.goodsList[i],'inputnum',0)
  295. this.$set(this.goodsList[i], 'bz', '')
  296. this.$set(this.goodsList[i], 'fudw', '')
  297. }
  298. }
  299. },
  300. inputchangeBz(inputsl,inputnum, id, kcnum) {
  301. inputnum=inputsl.detail.value;
  302. let getcartlist = uni.getStorageSync('cartlistjiad');
  303. let isbz=0;
  304. for (let i = 0; i < getcartlist.length; i++) {
  305. if (id == getcartlist[i].id) { //找到商品一样的商品
  306. getcartlist[i].bz = inputnum;
  307. uni.setStorageSync('cartlistjiad', getcartlist)
  308. isbz=1;
  309. break; //跳出循环
  310. }
  311. }
  312. if(isbz==0){
  313. uni.showToast({title:'请您输入数量后再填备注',icon:'none'});
  314. return;
  315. }
  316. this.checkshownum();
  317. },
  318. inputchangeFudw(inputsl,inputnum, id, kcnum) {
  319. inputnum=inputsl.detail.value;
  320. let getcartlist = uni.getStorageSync('cartlistjiad');
  321. let is=0;
  322. for (let i = 0; i < getcartlist.length; i++) {
  323. if (id == getcartlist[i].id) { //找到商品一样的商品
  324. getcartlist[i].fudw = inputnum;
  325. uni.setStorageSync('cartlistjiad', getcartlist)
  326. is=1;
  327. break; //跳出循环
  328. }
  329. }
  330. if(is==0){
  331. uni.showToast({title:'请您输入数量后再填副单位',icon:'none'});
  332. return;
  333. }
  334. this.checkshownum();
  335. },
  336. //加载商品 ,带下拉刷新和上滑加载
  337. async loadData(type='add', loading) {
  338. //没有更多直接返回
  339. if(type === 'add'){
  340. if(this.loadingType === 'nomore'){
  341. return;
  342. }
  343. this.loadingType = 'loading';
  344. }else{
  345. this.loadingType = 'more'
  346. }
  347. let userinfo=uni.getStorageSync('userinfo');
  348. let getdata;
  349. if(this.dflid>0){
  350. //一级分类
  351. getdata = await this.$api.getgoodlist({action:'goodlist2',uid:userinfo.uid,aid:userinfo.aid,dflid:this.dflid,keywords:this.keyword});
  352. }else{
  353. //二级分类
  354. getdata = await this.$api.getgoodlist({action:'goodlist2',uid:userinfo.uid,aid:userinfo.aid,fid:this.cateId,keywords:this.keyword});
  355. }
  356. let goodsList=getdata.data;
  357. if(type === 'refresh'){
  358. this.goodsList = [];
  359. }
  360. console.log(this.cateId,'得到的类id')
  361. //筛选,测试数据直接前端筛选了
  362. if(this.filterIndex === 1){
  363. goodsList.sort((a,b)=>b.sellnum - a.sellnum)
  364. }
  365. if(this.filterIndex === 2){
  366. goodsList.sort((a,b)=>{
  367. if(this.priceOrder == 1){
  368. return a.price - b.price;
  369. }
  370. return b.price - a.price;
  371. })
  372. }
  373. this.goodsList = this.goodsList.concat(goodsList);
  374. this.checkshownum();
  375. //判断是否还有下一页,有是more 没有是nomore(测试数据判断大于20就没有了)
  376. //this.loadingType = this.goodsList.length > 20 ? 'nomore' : 'more';
  377. this.loadingType = 'nomore';
  378. if(type === 'refresh'){
  379. if(loading == 1){
  380. uni.hideLoading()
  381. }else{
  382. uni.stopPullDownRefresh();
  383. }
  384. }
  385. },
  386. //筛选点击
  387. tabClick(index){
  388. if(this.filterIndex === index && index !== 2){
  389. return;
  390. }
  391. this.filterIndex = index;
  392. if(index === 2){
  393. this.priceOrder = this.priceOrder === 1 ? 2: 1;
  394. }else{
  395. this.priceOrder = 0;
  396. }
  397. uni.pageScrollTo({
  398. duration: 300,
  399. scrollTop: 0
  400. })
  401. this.loadData('refresh', 1);
  402. uni.showLoading({
  403. title: '正在加载'
  404. })
  405. },
  406. stopPrevent(){},
  407. async addcollection(id, index) {
  408. let userinfo=uni.getStorageSync('userinfo');
  409. let type=!this.goodsList[index].iscollect;
  410. if(userinfo){
  411. let redata=await this.$api.addcollection({action:'addcollection',type:type,uid:userinfo.uid,aid:userinfo.aid,id:id});
  412. uni.showToast({
  413. title:redata.msg,icon:'none'
  414. })
  415. if(redata.code==1){
  416. this.goodsList[index].iscollect=!this.goodsList[index].iscollect;
  417. }
  418. }else{
  419. uni.navigateTo({
  420. url:'/pages/user/login'
  421. })
  422. }
  423. },
  424. //收藏
  425. toFavorite(id,index){
  426. this.addcollection(id,index);
  427. },
  428. //添加浏览记录
  429. async add_read_record(id,uid,aid) {
  430. await this.$api.add_read_record({action:'add_read_record',cpid:id,uid:uid,aid:aid});
  431. },
  432. addshopcat(id){
  433. let getcartlist=uni.getStorageSync('cartlistjiad');
  434. let userinfo=uni.getStorageSync('userinfo');
  435. if(userinfo.uid>0){
  436. this.add_read_record(id,userinfo.uid,userinfo.aid)
  437. }
  438. if(getcartlist==''){
  439. this.cartlist.push(this.findarrbyid(id));
  440. this.cartlist.map((item,index)=>{
  441. item.total=parseFloat((item.price*item.num)*100)/100
  442. });
  443. uni.setStorageSync('cartlistjiad',this.cartlist);
  444. }else{
  445. let isexit=this.findidfromstor(id);
  446. if(!isexit){
  447. //不存在
  448. getcartlist.push(this.findarrbyid(id));
  449. for(let i=0;i<getcartlist.length;i++){
  450. if(id==getcartlist[i].id ){
  451. getcartlist[i].total=parseFloat((getcartlist[i].num*getcartlist[i].price)*100)/100
  452. }
  453. }
  454. uni.setStorageSync('cartlistjiad',getcartlist);
  455. }else{
  456. //存在
  457. for(let i=0;i<getcartlist.length;i++){
  458. if(isexit.id==getcartlist[i].id )
  459. { //找到商品一样的商品
  460. getcartlist[i].num++;//数量自增
  461. if(getcartlist[i].num>getcartlist[i].kcnum){
  462. uni.showToast({
  463. title:'库存不足!',icon:'none'
  464. })
  465. break;//跳出循环
  466. }else{
  467. getcartlist[i].total=parseFloat((getcartlist[i].num*getcartlist[i].price)*100)/100
  468. uni.setStorageSync('cartlistjiad',getcartlist)
  469. break;//跳出循环
  470. }
  471. }
  472. }
  473. }
  474. }
  475. this.checkshownum();
  476. },
  477. //根据数组指定key获取当前数组
  478. findarrbyid(id){
  479. let arr=this.goodsList;
  480. for(let i=0;i<arr.length;i++){
  481. if(arr[i]['id']==id){
  482. return arr[i];
  483. break;//跳出循环
  484. }
  485. }
  486. },
  487. //从本地存储中根据id获取数组
  488. findidfromstor(id){
  489. let arr=uni.getStorageSync('cartlistjiad');
  490. for(let i=0;i<arr.length;i++){
  491. if(arr[i]['id']==id){
  492. return arr[i];
  493. break;//跳出循环
  494. }
  495. }
  496. },
  497. //跳详情页
  498. // toGoods(good){
  499. // uni.navigateTo({
  500. // url:'../product/detail?gid='+good.id+"&price="+good.price
  501. // })
  502. // }
  503. },
  504. }
  505. </script>
  506. <style lang="scss">
  507. page, .content{
  508. background: $page-color-base;
  509. }
  510. .content{
  511. padding-top: 96upx;
  512. }
  513. .info {
  514. display: flex;
  515. justify-content: space-between;
  516. align-items: flex-end;
  517. width: 100%;
  518. padding: 10upx 4% 10upx 0;
  519. .price {
  520. color: #e65339;
  521. font-size: 30upx;
  522. font-weight: 600;
  523. }
  524. .slogan {
  525. color: #807c87;
  526. font-size: 24upx;
  527. }
  528. }
  529. .number {
  530. display: flex;
  531. justify-content: flex-end;
  532. margin-right: 30upx;
  533. margin-bottom: 10upx;
  534. .input {
  535. width: 70upx;
  536. height: 45upx;
  537. margin: 0 10upx;
  538. // background-color: #f3f3f3;
  539. border-bottom: 1upx #ADADAD solid;
  540. input {
  541. width: 60upx;
  542. height: 60upx;
  543. display: flex;
  544. justify-content: center;
  545. align-items: center;
  546. text-align: center;
  547. font-size: 26upx;
  548. }
  549. }
  550. .sub,
  551. .add {
  552. width: 45upx;
  553. height: 45upx;
  554. border-radius: 5upx;
  555. }
  556. .jia {
  557. display: flex;
  558. width: 45upx;
  559. height: 45upx;
  560. justify-content: center;
  561. justify-items: center;
  562. align-items: center;
  563. background-color: #41A863;
  564. color: #fff;
  565. border-radius: 50%;
  566. image {
  567. width: 40upx;
  568. height: 40upx;
  569. padding: 7upx;
  570. }
  571. }
  572. .jian {
  573. display: flex;
  574. width: 45upx;
  575. height: 45upx;
  576. justify-content: center;
  577. justify-items: center;
  578. align-items: center;
  579. background-color: #41A863;
  580. color: #fff;
  581. border-radius: 50%;
  582. padding-bottom: 10upx;
  583. }
  584. }
  585. .navbar{
  586. position: fixed;
  587. left: 0;
  588. top: var(--window-top);
  589. display: flex;
  590. width: 100%;
  591. height: 80upx;
  592. background: #fff;
  593. box-shadow: 0 2upx 10upx rgba(0,0,0,.06);
  594. z-index: 10;
  595. .nav-item{
  596. flex: 1;
  597. display: flex;
  598. justify-content: center;
  599. align-items: center;
  600. height: 100%;
  601. font-size: 30upx;
  602. color: $font-color-dark;
  603. position: relative;
  604. &.current{
  605. color: #3883FA;
  606. &:after{
  607. content: '';
  608. position: absolute;
  609. left: 50%;
  610. bottom: 0;
  611. transform: translateX(-50%);
  612. width: 120upx;
  613. height: 0;
  614. border-bottom: 4upx solid #3883FA;
  615. }
  616. }
  617. }
  618. .p-box{
  619. display: flex;
  620. flex-direction: column;
  621. .yticon{
  622. display: flex;
  623. align-items: center;
  624. justify-content: center;
  625. width: 30upx;
  626. height: 14upx;
  627. line-height: 1;
  628. margin-left: 4upx;
  629. font-size: 26upx;
  630. color: #888;
  631. &.active{
  632. color: #2C74E5;
  633. }
  634. }
  635. &.active, &.active .yticon{
  636. color: $uni-color-primary;
  637. }
  638. .xia{
  639. transform: scaleY(-1);
  640. }
  641. }
  642. .cate-item{
  643. display: flex;
  644. justify-content: center;
  645. align-items: center;
  646. height: 100%;
  647. width: 100upx;
  648. position: relative;
  649. font-size: 44upx;
  650. &:after{
  651. content: '';
  652. position: absolute;
  653. left: 0;
  654. top: 50%;
  655. transform: translateY(-50%);
  656. border-left: 1px solid #ddd;
  657. width: 0;
  658. height: 36upx;
  659. }
  660. }
  661. }
  662. /* 商品列表 */
  663. .goods-list{
  664. display:flex;
  665. flex-wrap:wrap;
  666. padding: 0 30upx;
  667. background: #fff;
  668. .goods-item{
  669. display:flex;
  670. flex-direction: column;
  671. width: 48%;
  672. padding-bottom: 40upx;
  673. &:nth-child(2n+1){
  674. margin-right: 4%;
  675. }
  676. .sdtext{
  677. padding: 2upx 8upx;
  678. border: 1upx #DBDBDB solid;
  679. border-radius: 5upx;
  680. color: #B9B9B9;
  681. font-size: 25upx;
  682. margin-top: 3upx;
  683. }
  684. .sellnum{
  685. font-size: 25upx;
  686. padding-left: 15upx;
  687. color: #B9B9B9;
  688. }
  689. }
  690. .shouqinimg{
  691. position: relative;
  692. image{
  693. width: 250upx;
  694. height: 250upx;
  695. position: absolute;
  696. bottom: 200upx;
  697. right: 40upx;
  698. z-index: 100;
  699. }
  700. }
  701. .image-wrapper{
  702. width: 100%;
  703. height: 330upx;
  704. border-radius: 3px;
  705. overflow: hidden;
  706. image{
  707. width: 100%;
  708. height: 100%;
  709. opacity: 1;
  710. }
  711. }
  712. .title{
  713. font-size: $font-lg;
  714. color: $font-color-dark;
  715. line-height: 80upx;
  716. }
  717. .price-box{
  718. display: flex;
  719. align-items: center;
  720. // justify-content: space-between;
  721. flex-direction: column;
  722. // padding-right: 10upx;
  723. font-size: 24upx;
  724. color: $font-color-light;
  725. .waitsell{
  726. font-size: 24upx;
  727. color: #F2F5F2;
  728. padding: 5upx;
  729. border-radius: 3upx;
  730. background-color: #B7B7B7;
  731. text-align: center;
  732. }
  733. .btright{
  734. display: flex;
  735. align-items: center;
  736. .nosell{
  737. display: flex;
  738. justify-content: flex-end;
  739. text{
  740. position: relative;
  741. right: 5upx;
  742. padding: 5upx;
  743. background-color: #EAEAEA;
  744. color: white;
  745. font-size: 28upx !important;
  746. }
  747. }
  748. .cart{
  749. padding-right: 15upx;
  750. }
  751. .checknum{
  752. width: 38upx;
  753. height: 38upx;
  754. border-radius: 50%;
  755. color: #FFFFFF;
  756. background-color: #FF393B;
  757. position: relative;
  758. text-align: center;
  759. right: 15upx;
  760. bottom: 25upx;
  761. }
  762. }
  763. .p-b-btn{
  764. display:flex;
  765. flex-direction: column;
  766. align-items: flex-start;
  767. justify-content: flex-start;
  768. font-size: 24upx;
  769. color: $font-color-base;
  770. // width: 96upx;
  771. height: 80upx;
  772. .yticon{
  773. font-size: 40upx;
  774. line-height: 48upx;
  775. color: #F0EAE5;
  776. }
  777. &.active, &.active .yticon{
  778. color: $uni-color-primary;
  779. }
  780. .icon-fenxiang2{
  781. font-size: 42upx;
  782. transform: translateY(-2upx);
  783. }
  784. .icon-shoucang{
  785. font-size: 50upx;
  786. }
  787. }
  788. }
  789. .price{
  790. font-size: $font-lg;
  791. color: $uni-color-primary;
  792. line-height: 1;
  793. &:before{
  794. content: '¥';
  795. font-size: 26upx;
  796. }
  797. }
  798. }
  799. </style>