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.

1051 lines
32 KiB

6 months ago
  1. <template>
  2. <view>
  3. <!-- 状态栏 -->
  4. <view class="header">
  5. <view class="input-box" @tap="toSearch()">
  6. <input placeholder="输入商品名称" placeholder-style="color:#c0c0c0;" disabled="disabled" />
  7. <view class="icon search"></view>
  8. </view>
  9. </view>
  10. <!-- 占位 -->
  11. <view class="place"></view>
  12. <view class="toplist" style="position: relative;z-index: 1;">
  13. <mstabs :list="dfllist" v-model="dflindex" :lineAnimated="false" itemColor="#4D9864" lineColor="#4D9864"></mstabs>
  14. </view>
  15. <view class="category-list">
  16. <scroll-view scroll-y="true" class="left" :scroll-into-view="leftIntoView">
  17. <view class="row" v-for="(category,index) in xfllist" :key="category.id" :class="{ 'on':index==leftIndex }" @tap="leftTap(index)"
  18. :data-index="index" :id="'left-'+index">
  19. <view class="text">
  20. <view class="block"></view>
  21. {{category.fenlmc}}
  22. </view>
  23. </view>
  24. </scroll-view>
  25. <scroll-view :scroll-top="scrollTop" scroll-y="isscoll" class="right" @scrolltolower="onscrolltolower" @scrolltoupper="onscrolltoupper" @scroll="mainScroll" :scroll-into-view="scrollInto"
  26. scroll-with-animation="true">
  27. <view class="right-goods" :style="{height:tiancheight+'px'}">
  28. <view class="category" v-for="(v,i) in prodata" :key="i" :id="'item-'+i">
  29. <view class="twoListName" v-if="v!=''">{{xfllist[i].fenlmc}}</view>
  30. <view class="good_list" v-for="(product,index) in v" :key="index" @click="toGoods(product)">
  31. <view class="goodleft">
  32. <image :src="product.img"></image>
  33. </view>
  34. <view class="goodright">
  35. <view class="cpmc">{{ product.mc }}&nbsp;{{product.gg}}{{product.dw}}</view>
  36. <view :class="product.miaosstyle" @tap.stop="changemiaosstyle(index)">
  37. {{product.miaos}}
  38. </view>
  39. <view>
  40. <text>{{ product.price }}</text>
  41. <text style="margin-left: 10upx;">库存&nbsp;{{ product.kcnum }}</text>
  42. </view>
  43. <!-- <view>
  44. <text class="sdtext">{{ product.sdtext }}</text>
  45. </view> -->
  46. <view style="padding:0upx 8upx; color: grey; display: flex;align-items: center;" @tap.stop v-if="product.inputnum">
  47. <input style="font-size: 28upx;color: #41A863;height: 40upx; line-height: 40upx; min-height: 40upx;" type="text" :value="product.bz" @input="inputchangeBz($event,product.bz,product.id,product.kcnum,2)" placeholder="输入备注">
  48. <input style="font-size: 28upx;color: #41A863;height: 40upx; line-height: 40upx; min-height: 40upx;" type="text" :value="product.fudw" @input="inputchangeFudw($event,product.fudw,product.id,product.kcnum,2)" placeholder="输入副单位">
  49. </view>
  50. <view class="rfoot">
  51. <view class="stopbuy" v-if="product.isokorder==0">
  52. {{product.opentime}}
  53. </view>
  54. <view class="p-b-btn" :class="{active: product.iscollect}" @click.stop="toFavorite(product.id,index,0,i)">
  55. <text class="yticon icon-shoucang"></text>
  56. </view>
  57. <view class="nosell" v-if="product.kcnum<=0"><text>已售空</text></view>
  58. <view class="number" v-if="product.kcnum">
  59. <view class="sub" @tap.stop="sub(product.id,i)">
  60. <view class="jian">-</view>
  61. </view>
  62. <view class="input" @tap.stop="discard" >
  63. <input type="digit" v-model="product.inputnum==0?'':product.inputnum" @input="inputchange($event,product.inputnum,product.id,product.kcnum,i)" />
  64. </view>
  65. <view class="add" @tap.stop="add(product.id,i,product.kcnum)">
  66. <view class="jia">
  67. <image src="../../static/img/addicon.png"></image>
  68. </view>
  69. </view>
  70. </view>
  71. </view>
  72. </view>
  73. </view>
  74. </view>
  75. <view class="loadtext">{{loadingText}}</view>
  76. </view>
  77. </scroll-view>
  78. </view>
  79. <!-- 脚部菜单 -->
  80. <view class="footer">
  81. <view class="settlement">
  82. <view class="sum">合计:<view class="money">{{sumPrice}}</view></view>
  83. <view class="btn" @tap="toConfirmation">确认加单({{productnum}})</view>
  84. </view>
  85. </view>
  86. </view>
  87. </template>
  88. <script>
  89. import mstabs from "@/components/ms-tabs/ms-tabs.vue";
  90. export default {
  91. components: {
  92. mstabs
  93. },
  94. data() {
  95. return {
  96. //分类列表
  97. dfllist: [],
  98. xfllist: [],
  99. dflindex: 0, //初始第一分类id
  100. xflid: 0,
  101. goodlist: [],
  102. cartlist: [], //购物车商品列表
  103. miaosstyle: 'miaos',
  104. scrollHeight: 0,
  105. prodata: [], //当前一级分类下所有属于二级分类的商品数据
  106. leftIndex: 0, //左边规定位置下标
  107. scrollInto: '', //滚动位置
  108. scrollTop: 0,
  109. old: {
  110. scrollTop: 0
  111. },
  112. aid: 0, //在页面保存其它页面传来的列表id ,做滚动列表位置
  113. twolevalid: [], //二级分类全部id
  114. isscoll: false, //scollview默认不可滑动,等待数据渲染完成之后可滑动
  115. isfirst: 0, //是否是第一进入页面
  116. level2: [],
  117. tiancheight:0,
  118. loadingText: '上滑加载更多...',
  119. flag:true,
  120. isPost:true,
  121. userinfo:[],
  122. productnum:0,
  123. sumPrice:0,
  124. dhid:0,
  125. tmp_data:[],
  126. pagenum:1,
  127. }
  128. },
  129. onPageScroll(e) {
  130. //兼容iOS端下拉时顶部漂移
  131. if (e.scrollTop >= 0) {
  132. this.headerPosition = "fixed";
  133. } else {
  134. this.headerPosition = "absolute";
  135. }
  136. },
  137. watch: {
  138. dflindex() {
  139. var that=this;
  140. this.xfllist = this.level2[this.dflindex];
  141. this.leftIndex=0;
  142. this.pagenum=1;
  143. this.tmp_data=[];
  144. that.getgoods(that.xfllist[0].id,0,1);
  145. }
  146. },
  147. onShow(e) {
  148. let dflid = getApp().globalData.dflid;
  149. let xflid = getApp().globalData.xflid;
  150. if (xflid!=''){
  151. this.init();
  152. }
  153. this.checkshownum();
  154. },
  155. onLoad(e) {
  156. this.dhid=e.dhid;
  157. this.init();
  158. },
  159. computed: {
  160. /* 计算左侧滚动位置定位 */
  161. leftIntoView() {
  162. return `left-${this.leftIndex}`;
  163. }
  164. },
  165. //加载更多
  166. methods: {
  167. toConfirmation(){
  168. if(this.productnum>0){
  169. uni.navigateTo({
  170. url:'../cart/cartjiad?dhid='+this.dhid
  171. })
  172. }else{
  173. uni.showToast({
  174. title:'请选择商品结算',
  175. icon:'none'
  176. });
  177. }
  178. },
  179. async init(){
  180. let t = this;
  181. this.userinfo = uni.getStorageSync('userinfo');
  182. //通过其他页面进来的定位
  183. let dflid = getApp().globalData.dflid;
  184. let xflid = getApp().globalData.xflid;
  185. getApp().globalData.dflid='';//获取了值就立马清空这个全局变量
  186. getApp().globalData.xflid='';//获取了值就立马清空这个全局变量
  187. let getdata = await this.$api.getcategory({
  188. action: 'categorys',
  189. pid: 0,
  190. uid: this.userinfo.uid,
  191. aid: this.userinfo.aid
  192. });
  193. this.dfllist = getdata.data[0]; //一级分类
  194. this.level2 = getdata.data[1]; //全部的二级分类
  195. for (let i = 0; i < this.dfllist.length; i++) {
  196. if (this.dfllist[i].id == dflid) {
  197. //通过id来定位下标
  198. this.dflindex = i;
  199. }
  200. }
  201. this.xfllist = this.level2[this.dflindex]; //当前选中的一级分类下的二级分类
  202. // // DOM 挂载后 再调用 getElementTop 获取高度的方法。
  203. this.$nextTick(function() {
  204. this.isscoll = true;
  205. uni.hideLoading()
  206. })
  207. let xflindex=0;
  208. if(xflid==''){
  209. xflid=this.xfllist[0].id;
  210. }
  211. for (let i = 0; i < this.xfllist.length; i++) {
  212. if (this.xfllist[i].id == xflid) {
  213. //通过id来定位下标
  214. xflindex = i;
  215. }
  216. }
  217. this.pagenum=1;
  218. this.tmp_data=[];
  219. this.getgoods(xflid,xflindex,1)//获取分类下的产品
  220. this.leftIndex=xflindex;
  221. this.isfirst = 1;
  222. },
  223. getsysteminfo(){
  224. let that=this;
  225. const {
  226. windowWidth,
  227. windowHeight
  228. } = uni.getSystemInfoSync();
  229. let scrollHeight = windowHeight - 95;
  230. that.tiancheight=scrollHeight+15;
  231. },
  232. //跳详情页
  233. toGoods(good) {
  234. uni.navigateTo({
  235. url: '../product/detailjiad?gid=' + good.id + "&price=" + good.price
  236. })
  237. },
  238. //搜索跳转
  239. toSearch() {
  240. uni.showLoading({
  241. title: '加载中...'
  242. })
  243. uni.navigateTo({
  244. url: `/pages/search/search?type=1`
  245. })
  246. uni.hideLoading()
  247. //uni.showToast({title: "建议跳转到新页面做搜索功能"});
  248. },
  249. /* 左侧导航点击 */
  250. leftTap(key) {
  251. this.leftIndex = key;
  252. this.$nextTick(function() {
  253. this.pagenum=1;
  254. this.tmp_data=[];
  255. this.scrollTop = 0
  256. this.getgoods(this.xfllist[key].id,key,1);
  257. });
  258. },
  259. /* 主区域滚动监听 */
  260. mainScroll(e) {
  261. this.old.scrollTop = e.detail.scrollTop;
  262. },
  263. onscrolltoupper(e){
  264. // let index=this.leftIndex-1;
  265. // let newlist=this.prodata;
  266. // this.prodata=[];
  267. // this.prodata=newlist;
  268. // if(index>=0 && index<this.xfllist.length){
  269. // let xflid=this.xfllist[index].id;
  270. // this.leftIndex=index;
  271. // this.getgoods(xflid,index,0);
  272. // }
  273. },
  274. onscrolltolower(e){
  275. // let index=this.leftIndex+1;
  276. // if(index>=0 && index<this.xfllist.length){
  277. // let xflid=this.xfllist[index].id;
  278. // this.leftIndex=index;
  279. // this.getgoods(xflid,index,0);
  280. // }else{
  281. // this.loadingText="无更多数据了!";
  282. // }
  283. let index=this.leftIndex+1;
  284. if(index>=0 && index<this.xfllist.length && this.tmp_data==''){
  285. this.pagenum=1;
  286. let xflid=this.xfllist[index].id;
  287. this.leftIndex=index;
  288. this.getgoods(xflid,index,0);
  289. }else if(this.tmp_data!=''){
  290. this.pagenum++;
  291. let xflid=this.xfllist[this.leftIndex].id;
  292. this.getgoods(xflid,this.leftIndex,0);
  293. }else{
  294. this.loadingText="无更多数据了!";
  295. }
  296. },
  297. //获取分类下的产品
  298. async getgoods(xflid,xflindex,lx) {
  299. // this.isPost=false;
  300. let that = this;
  301. that.scrollTop = 0; //定位右侧商品内容位置
  302. uni.showLoading({
  303. title: '正在加载...'
  304. })
  305. //通过二级分类查产品
  306. let getdata = await this.$api.getgoodlist({
  307. action: 'goodlist2',
  308. uid: this.userinfo.uid,
  309. fid: xflid,
  310. keywords: this.keyword,
  311. pagenum: this.pagenum,
  312. aid: this.userinfo.aid
  313. });
  314. if(lx==1){
  315. this.prodata=[];
  316. for(let i=0;i<=this.xfllist.length;i++){
  317. this.prodata[i]='';
  318. }
  319. }
  320. if (getdata.data.length == 0) {
  321. this.loadmore = 0;
  322. this.loadingText = "无更多数据";
  323. } else {
  324. this.tmp_data= this.tmp_data.concat(getdata.data);
  325. this.prodata[xflindex] = this.tmp_data;
  326. }
  327. // this.prodata[xflindex] = getdata.data;
  328. // that.$forceUpdate();
  329. this.$nextTick(function() {
  330. uni.hideLoading();
  331. that.getsysteminfo();
  332. })
  333. if(lx==1){
  334. that.scrollTop = that.old.scrollTop;
  335. that.$nextTick(function() { //初始化scollview的顶部位置,每次切换tab时top值必须为空0
  336. that.scrollTop = 0;
  337. })
  338. that.$forceUpdate();
  339. }
  340. this.checkshownum();
  341. },
  342. async addcollection(id, index, a, levalkey) {
  343. let type = !this.prodata[levalkey][index].iscollect;
  344. if (this.userinfo) {
  345. let redata = await this.$api.addcollection({
  346. action: 'addcollection',
  347. type: type,
  348. uid: this.userinfo.uid,
  349. id: id,
  350. aid: this.userinfo.uid,
  351. });
  352. uni.showToast({
  353. title: redata.msg,
  354. icon: 'none'
  355. })
  356. if (redata.code == 1) {
  357. this.prodata[levalkey][index].iscollect = !this.prodata[levalkey][index].iscollect;
  358. }
  359. this.$forceUpdate();
  360. } else {
  361. uni.navigateTo({
  362. url: '/pages/user/login'
  363. })
  364. }
  365. },
  366. //收藏
  367. toFavorite(id, index, type, key) {
  368. this.addcollection(id, index, type, key);
  369. },
  370. //减操作
  371. sub(id) {
  372. let getcartlist = uni.getStorageSync('cartlistjiad');
  373. let isexit = this.findidfromstor(id);
  374. let delid = 0;
  375. for (let i = 0; i < getcartlist.length; i++) {
  376. if (isexit.id == getcartlist[i].id) { //找到商品一样的商品
  377. getcartlist[i].num--; //数量减
  378. if (getcartlist[i].num <= 0) {
  379. //删除当前商品缓存
  380. getcartlist.splice(i, 1);
  381. uni.setStorageSync('cartlistjiad', getcartlist)
  382. break; //跳出循环
  383. } else {
  384. getcartlist[i].total = getcartlist[i].num * getcartlist[i].price
  385. uni.setStorageSync('cartlistjiad', getcartlist)
  386. break; //跳出循环
  387. }
  388. }
  389. }
  390. this.checkshownum();
  391. },
  392. // 增加数量,type 0-推荐商品,1-猜你喜欢商品
  393. add(id, key,cknum) {
  394. let getcartlist = uni.getStorageSync('cartlistjiad');
  395. //首次加购物车
  396. if (getcartlist == '') {
  397. this.cartlist = [];
  398. this.cartlist.push(this.findarrbyid(id, key));
  399. //计算每个商品的总价格
  400. this.cartlist.map((item, index) => {
  401. item.total = item.price * item.num
  402. });
  403. uni.setStorageSync('cartlistjiad', this.cartlist);
  404. } else {
  405. //已有商品在购物车
  406. let isexit = this.findidfromstor(id, key);
  407. if (!isexit) {
  408. //购物车中还没当前商品
  409. //不存在
  410. getcartlist.push(this.findarrbyid(id, key));
  411. for (let i = 0; i < getcartlist.length; i++) {
  412. if (id == getcartlist[i].id) {
  413. getcartlist[i].total = getcartlist[i].num * getcartlist[i].price
  414. }
  415. }
  416. uni.setStorageSync('cartlistjiad', getcartlist);
  417. } else {
  418. //存在
  419. for (let i = 0; i < getcartlist.length; i++) {
  420. if (isexit.id == getcartlist[i].id) { //找到商品一样的商品
  421. if(cknum<=getcartlist[i].num){
  422. uni.showToast({
  423. title:'库存不足!',
  424. icon:'none'
  425. });
  426. break; //跳出循环
  427. }
  428. getcartlist[i].num++; //数量自增
  429. getcartlist[i].total = getcartlist[i].num * getcartlist[i].price
  430. uni.setStorageSync('cartlistjiad', getcartlist)
  431. break; //跳出循环
  432. }
  433. }
  434. }
  435. }
  436. this.checkshownum();
  437. },
  438. // input框直接加入购物车
  439. inputadd(id,key,inputnum) {
  440. let getcartlist = uni.getStorageSync('cartlistjiad');
  441. //首次加购物车
  442. if (getcartlist == '') {
  443. this.cartlist = [];
  444. this.cartlist.push(this.findarrbyid(id, key));
  445. //计算每个商品的总价格
  446. this.cartlist.map((item, index) => {
  447. item.total = parseFloat((item.price * inputnum) * 100) / 100;
  448. item.num = parseFloat(inputnum);
  449. });
  450. uni.setStorageSync('cartlistjiad', this.cartlist);
  451. } else {
  452. //已有商品在购物车
  453. let isexit = this.findidfromstor(id, key);
  454. if (!isexit) {
  455. //购物车中还没当前商品
  456. //不存在
  457. getcartlist.push(this.findarrbyid(id, key));
  458. for (let i = 0; i < getcartlist.length; i++) {
  459. if (id == getcartlist[i].id) {
  460. getcartlist[i].total = parseFloat((inputnum * getcartlist[i].price) * 100) / 100;
  461. getcartlist[i].num = parseFloat(inputnum);
  462. }
  463. }
  464. uni.setStorageSync('cartlistjiad', getcartlist);
  465. } else {
  466. //存在
  467. for (let i = 0; i < getcartlist.length; i++) {
  468. if (isexit.id == getcartlist[i].id) { //找到商品一样的商品
  469. getcartlist[i].num=inputnum; //数量自增
  470. if(getcartlist[i].kcnum<=getcartlist[i].num){
  471. uni.showToast({
  472. title:'库存不足!',
  473. icon:'none'
  474. });
  475. break; //跳出循环
  476. }
  477. getcartlist[i].total = parseFloat((getcartlist[i].num * getcartlist[i].price) * 100) / 100
  478. uni.setStorageSync('cartlistjiad', getcartlist)
  479. break; //跳出循环
  480. }
  481. }
  482. }
  483. }
  484. this.checkshownum();
  485. },
  486. inputchange(inputsl,inputnum, id, kcnum,key) {
  487. inputnum=parseFloat(inputsl.detail.value);
  488. let getcartlist = uni.getStorageSync('cartlistjiad');
  489. if (inputnum > 0) {
  490. if (inputnum > kcnum) {
  491. uni.showToast({
  492. title: '库存不足',
  493. icon: 'none'
  494. })
  495. return;
  496. }
  497. this.inputadd(id,key,inputnum);//input框直接添加购物车
  498. } else {
  499. for (let i = 0; i < getcartlist.length; i++) {
  500. if (id == getcartlist[i].id) { //找到商品一样的商品
  501. getcartlist[i].num = 0;
  502. uni.setStorageSync('cartlistjiad', getcartlist)
  503. break; //跳出循环
  504. }
  505. }
  506. this.checkshownum();
  507. }
  508. },
  509. inputchangeBz(inputsl,inputnum, id, kcnum,type) {
  510. inputnum=inputsl.detail.value;
  511. let getcartlist = uni.getStorageSync('cartlistjiad');
  512. let isbz=0;
  513. for (let i = 0; i < getcartlist.length; i++) {
  514. if (id == getcartlist[i].id) { //找到商品一样的商品
  515. getcartlist[i].bz = inputnum;
  516. uni.setStorageSync('cartlistjiad', getcartlist)
  517. isbz=1;
  518. break; //跳出循环
  519. }
  520. }
  521. if(isbz==0){
  522. uni.showToast({title:'请您输入数量后再填备注',icon:'none'});
  523. return;
  524. }
  525. this.checkshownum();
  526. },
  527. inputchangeFudw(inputsl,inputnum, id, kcnum,type) {
  528. inputnum=inputsl.detail.value;
  529. let getcartlist = uni.getStorageSync('cartlistjiad');
  530. let is=0;
  531. for (let i = 0; i < getcartlist.length; i++) {
  532. if (id == getcartlist[i].id) { //找到商品一样的商品
  533. getcartlist[i].fudw = inputnum;
  534. uni.setStorageSync('cartlistjiad', getcartlist)
  535. is=1;
  536. break; //跳出循环
  537. }
  538. }
  539. if(is==0){
  540. uni.showToast({title:'请您输入数量后再填副单位',icon:'none'});
  541. return;
  542. }
  543. this.checkshownum();
  544. },
  545. //初始化购物车数据
  546. checkshownum() {
  547. let getcartlist = uni.getStorageSync('cartlistjiad');
  548. let carid = [];let carbz = [];let carfudw = [];
  549. let prodata = this.prodata;
  550. let money=0;let pronum=0;
  551. for (let i = 0; i < getcartlist.length; i++) {
  552. if(getcartlist[i]!=''){
  553. let num = carid[getcartlist[i]['id']] || 0
  554. carid[getcartlist[i]['id']] = parseFloat(num) + parseFloat(getcartlist[i]['num']);
  555. carbz[getcartlist[i]['id']] = getcartlist[i]['bz'];
  556. carfudw[getcartlist[i]['id']] = getcartlist[i]['fudw'];
  557. money=money+getcartlist[i]['total'];
  558. pronum=pronum+1;
  559. }
  560. }
  561. this.sumPrice=money.toFixed(2);
  562. this.productnum=pronum;
  563. for (let i = 0; i < prodata.length; i++) {
  564. if(prodata[i]!=''){
  565. for (let y = 0; y < prodata[i].length; y++) {
  566. if (carid[prodata[i][y]['id']]) {
  567. this.$set(this.prodata[i][y], 'inputnum', carid[prodata[i][y]['id']])
  568. this.$set(this.prodata[i][y], 'bz', carbz[prodata[i][y]['id']])
  569. this.$set(this.prodata[i][y], 'fudw', carfudw[prodata[i][y]['id']])
  570. } else {
  571. this.$set(this.prodata[i][y], 'inputnum', 0)
  572. this.$set(this.prodata[i][y], 'bz', '')
  573. this.$set(this.prodata[i][y], 'fudw', '')
  574. }
  575. }
  576. }
  577. }
  578. this.$forceUpdate();
  579. },
  580. //查找商品
  581. findarrbyid(id, key) {
  582. let arr = this.prodata[key];
  583. for (let i = 0; i < arr.length; i++) {
  584. if (arr[i]['id'] == id) {
  585. //console.log(arr[i],'要保存的东西')
  586. return arr[i];
  587. break; //跳出循环
  588. }
  589. }
  590. },
  591. //从本地存储中根据id获取数组
  592. findidfromstor(id) {
  593. let arr = uni.getStorageSync('cartlistjiad');
  594. for (let i = 0; i < arr.length; i++) {
  595. if (arr[i]['id'] == id) {
  596. return arr[i];
  597. break; //跳出循环
  598. }
  599. }
  600. },
  601. //点击改变描述显示
  602. changemiaosstyle(index) {
  603. let item = this.goodlist[index]
  604. item.checked = !item.checked
  605. if (item.miaosstyle == 'miaos') {
  606. item.miaosstyle = 'miaosshow';
  607. } else {
  608. item.miaosstyle = 'miaos';
  609. }
  610. this.$set(this.goodlist, index, item)
  611. },
  612. discard() {
  613. //丢弃,防止事件冒泡而设
  614. }
  615. }
  616. }
  617. </script>
  618. <style lang="scss">
  619. @font-face {
  620. font-family: "HMfont-home";
  621. src: url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAABDkAAsAAAAAHNQAABCUAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCEOAqqPKIAATYCJAM4Cx4ABCAFhG0HgUIbsBczo8LGAQApXpzs/3DAzQnrqJVQobqjkywr6K3VnnGPu9Hok7hbbDQrMa3YYH8hMXBogoTzwQb7Cx1kafc7LoV7nPdDKXng//D1vvHHmJQxLb6PhyYHA5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ka1bN++ESZesEzAWvINptXXpSBpiA6b5zjQk/Y479m8PcqKcIRnX911oydrQ0rfjIQ2VLNf0erh2chWIAdEeUriOmKO0T8jl1E6tmRO4y+VtaOkaVPrfEECIBOg4o0EM0AYCR93UeYyW7RL1He07hISwVvb/NziFPbvEzCyxOGiRTjvxE1zGzil7hXTvIEF4zS/tUFT5MkAb9w7MRfL5QVfEiotFSTP7TuoVwPp6uB0F9RobxxWamihGPWGdiJRXIMOZWF7uQCrKh2ul4x0Sb/mLF/+/YYQjLNDU103KRzSaXPAdSz70nTPNP9CC4MffmeUuT4Tl5TlNKIV8liyPlcleA5CaB+B83q0HC/48PJ97iy7vw4MfROonLACLCsfO1T7LoqIxoojYFo6BS/T8GH+31h6tu3zaeULDhNdPPcZvdc7Qj3VGVT29KuguM6o06vjx/sR0DJcii9durAZOTrhOW8eVPYQOP9IULCnZnYOYjJRz21e+5HX2NhhHO9FUBw6rmB9n6a7jdL76eziU/M0YUW0/Hkd0CW2Jzt0/khCxnsSEviTnQC4WfegavUP5
  622. }
  623. .icon {
  624. font-family: "HMfont-home" !important;
  625. font-size: 60upx;
  626. font-style: normal;
  627. color: #000000;
  628. &.search {
  629. &:before {
  630. content: "\e628";
  631. }
  632. }
  633. &.xia {
  634. &:before {
  635. content: "\e689";
  636. }
  637. }
  638. }
  639. .loadtext {
  640. display: flex;
  641. justify-content: center;
  642. font-size: 25upx;
  643. color: #D6D6D6;
  644. margin-bottom: 20upx;
  645. margin-top: 20upx;
  646. }
  647. .twoListName {
  648. display: block;
  649. text-align: center;
  650. color: #348143;
  651. padding: 30upx 0;
  652. font-size: 30upx;
  653. font-weight: bold;
  654. }
  655. .stopbuy {
  656. margin-top: 15upx;
  657. font-size: 28upx;
  658. color: #F2F5F2;
  659. padding: 15upx;
  660. border-radius: 5upx;
  661. background-color: #B7B7B7;
  662. text-align: center;
  663. }
  664. .status {
  665. width: 100%;
  666. height: 0;
  667. position: fixed;
  668. z-index: 10;
  669. background-color: #fff;
  670. top: 0;
  671. /* #ifdef APP-PLUS */
  672. height: var(--status-bar-height); //覆盖样式
  673. /* #endif */
  674. }
  675. .header {
  676. width: 100%;
  677. padding: 0 5%;
  678. height: 100upx;
  679. display: flex;
  680. align-items: center;
  681. position: fixed;
  682. top: 0;
  683. z-index: 10;
  684. background-color: #fff;
  685. /* #ifdef APP-PLUS */
  686. top: var(--status-bar-height);
  687. /* #endif */
  688. .input-box {
  689. width: 100%;
  690. height: 60upx;
  691. background-color: #f5f5f5;
  692. border-radius: 30upx;
  693. position: relative;
  694. display: flex;
  695. align-items: center;
  696. .icon {
  697. display: flex;
  698. align-items: center;
  699. position: absolute;
  700. top: 0;
  701. right: 0;
  702. width: 60upx;
  703. height: 60upx;
  704. font-size: 34upx;
  705. color: #c0c0c0;
  706. }
  707. input {
  708. padding-left: 28upx;
  709. height: 28upx;
  710. font-size: 28upx;
  711. }
  712. }
  713. }
  714. .place {
  715. background-color: #ffffff;
  716. height: 100upx;
  717. /* #ifdef APP-PLUS */
  718. margin-top: var(--status-bar-height);
  719. /* #endif */
  720. }
  721. .category-list {
  722. width: 100%;
  723. background-color: #fff;
  724. display: flex;
  725. padding-bottom: 130upx;;
  726. .left,
  727. .right {
  728. position: absolute;
  729. top: 190upx;
  730. /* #ifdef APP-PLUS */
  731. top: calc(100upx + var(--status-bar-height));
  732. /* #endif */
  733. bottom: 0upx;
  734. padding-bottom: 110upx;
  735. }
  736. .left {
  737. width: 24%;
  738. left: 0upx;
  739. background-color: #f2f2f2;
  740. .row {
  741. width: 100%;
  742. height: 90upx;
  743. display: flex;
  744. align-items: center;
  745. .text {
  746. width: 100%;
  747. position: relative;
  748. font-size: 28upx;
  749. display: flex;
  750. justify-content: center;
  751. color: #3c3c3c;
  752. .block {
  753. position: absolute;
  754. width: 0upx;
  755. left: 0;
  756. }
  757. }
  758. &.on {
  759. height: 100upx;
  760. background-color: #fff;
  761. .text {
  762. font-size: 30upx;
  763. font-weight: 600;
  764. color: #2d2d2d;
  765. .block {
  766. width: 10upx;
  767. height: 80%;
  768. top: 10%;
  769. background-color: #4D9864;
  770. }
  771. }
  772. }
  773. }
  774. }
  775. .right {
  776. width: 76%;
  777. left: 24%;
  778. .good_list {
  779. display: flex;
  780. justify-content: space-around;
  781. padding: 15upx 0;
  782. border-bottom: 1upx #F0F0F0 solid;
  783. height: auto;
  784. .goodleft {
  785. width: 50%;
  786. padding: 10upx 0 10upx 15upx;
  787. image {
  788. width: 160upx;
  789. height: 160upx;
  790. border-radius: 15upx;
  791. }
  792. }
  793. .goodright {
  794. width: 100%;
  795. padding: 10upx 4%;
  796. display: -webkit-box;
  797. -webkit-box-orient: vertical;
  798. -webkit-line-clamp: 1;
  799. text-align: justify;
  800. overflow: hidden;
  801. font-size: 28upx;
  802. color: #747474;
  803. .cpmc{
  804. overflow:hidden;
  805. text-overflow:ellipsis;
  806. display:-webkit-box;
  807. -webkit-box-orient:vertical;
  808. -webkit-line-clamp:1;
  809. }
  810. .sdtext {
  811. padding: 2upx 8upx;
  812. border: 1upx #DBDBDB solid;
  813. border-radius: 5upx;
  814. color: #B9B9B9;
  815. font-size: 25upx;
  816. margin-top: 3upx;
  817. }
  818. .sellnum {
  819. font-size: 25upx;
  820. padding-left: 15upx;
  821. color: #B9B9B9;
  822. }
  823. .miaos {
  824. width: 100%;
  825. margin: 10upx;
  826. display: -webkit-box;
  827. -webkit-box-orient: vertical;
  828. -webkit-line-clamp: 1;
  829. text-align: justify;
  830. overflow: hidden;
  831. font-size: 28upx;
  832. color: #747474;
  833. }
  834. .miaosshow {
  835. margin: 10upx;
  836. font-size: 28upx;
  837. color: #747474;
  838. }
  839. .rfoot {
  840. display: flex;
  841. justify-content: space-between;
  842. justify-items: center;
  843. padding-top: 8upx;
  844. }
  845. //收藏样式
  846. .p-b-btn {
  847. .yticon {
  848. font-size: 40upx;
  849. line-height: 48upx;
  850. color: $font-color-light;
  851. }
  852. &.active,
  853. &.active .yticon {
  854. color: $uni-color-primary;
  855. }
  856. .icon-fenxiang2 {
  857. font-size: 42upx;
  858. transform: translateY(-2upx);
  859. }
  860. .icon-shoucang {
  861. font-size: 50upx;
  862. }
  863. }
  864. }
  865. }
  866. .nosell {
  867. display: flex;
  868. justify-content: flex-end;
  869. text {
  870. position: relative;
  871. right: 5upx;
  872. padding: 5upx;
  873. background-color: #EAEAEA;
  874. color: white;
  875. font-size: 28upx !important;
  876. }
  877. }
  878. .number {
  879. display: flex;
  880. justify-content: flex-end;
  881. margin-right: 30upx;
  882. margin-bottom: 10upx;
  883. .input {
  884. width: 70upx;
  885. height: 45upx;
  886. margin: 0 10upx;
  887. // background-color: #f3f3f3;
  888. border-bottom: 1upx #ADADAD solid;
  889. input {
  890. width: 60upx;
  891. height: 60upx;
  892. display: flex;
  893. justify-content: center;
  894. align-items: center;
  895. text-align: center;
  896. font-size: 26upx;
  897. }
  898. }
  899. .sub,
  900. .add {
  901. width: 45upx;
  902. height: 45upx;
  903. border-radius: 5upx;
  904. }
  905. .jia {
  906. display: flex;
  907. width: 45upx;
  908. height: 45upx;
  909. justify-content: center;
  910. justify-items: center;
  911. align-items: center;
  912. background-color: #41A863;
  913. color: #fff;
  914. border-radius: 50%;
  915. image {
  916. width: 40upx;
  917. height: 40upx;
  918. padding: 7upx;
  919. }
  920. }
  921. .jian {
  922. display: flex;
  923. width: 45upx;
  924. height: 45upx;
  925. justify-content: center;
  926. justify-items: center;
  927. align-items: center;
  928. background-color: #41A863;
  929. color: #fff;
  930. border-radius: 50%;
  931. padding-bottom: 10upx;
  932. }
  933. }
  934. }
  935. }
  936. .footer{
  937. width: 100%;
  938. padding: 0 4%;
  939. background-color: #fbfbfb;
  940. height: 100upx;
  941. display: flex;
  942. justify-content: space-between;
  943. align-items: center;
  944. font-size: 28upx;
  945. position: fixed;
  946. bottom: 0upx;
  947. z-index: 5;
  948. .delBtn{
  949. border: solid 1upx #f06c7a;
  950. color: #f06c7a;
  951. padding: 0 30upx;
  952. height: 50upx;
  953. border-radius: 30upx;
  954. display: flex;
  955. justify-content: center;
  956. align-items: center;
  957. }
  958. .settlement{
  959. width: 100%;
  960. display: flex;
  961. justify-content: flex-end;
  962. align-items: flex-end;
  963. .sum{
  964. width: 50%;
  965. font-size: 28upx;
  966. margin-right: 10upx;
  967. display: flex;
  968. justify-content: flex-end;
  969. .money{
  970. font-weight: 600;
  971. }
  972. }
  973. .btn{
  974. padding: 0 20upx;
  975. height: 50upx;
  976. background-color: #f06c7a;
  977. color: #fff;
  978. display: flex;
  979. justify-content: center;
  980. align-items: center;
  981. border-radius: 30upx;
  982. }
  983. .btn_gray{
  984. padding: 0 20upx;
  985. height: 50upx;
  986. background-color: #C4C4C4;
  987. color: #fff;
  988. display: flex;
  989. justify-content: center;
  990. align-items: center;
  991. width: 240upx;
  992. border-radius: 30upx;
  993. }
  994. }
  995. }
  996. </style>