|
|
<template> <view> <!-- 状态栏 --> <view class="header"> <view class="input-box" @tap="toSearch()"> <input placeholder="输入商品名称" placeholder-style="color:#c0c0c0;" disabled="disabled" /> <view class="icon search"></view> </view> </view> <!-- 占位 --> <view class="place"></view> <view class="toplist" style="position: relative;z-index: 1;"> <mstabs :list="dfllist" v-model="dflindex" :lineAnimated="false" itemColor="#4D9864" lineColor="#4D9864"></mstabs> </view> <view class="category-list"> <scroll-view scroll-y="true" class="left" :scroll-into-view="leftIntoView"> <view class="row" v-for="(category,index) in xfllist" :key="category.id" :class="{ 'on':index==leftIndex }" @tap="leftTap(index)" :data-index="index" :id="'left-'+index"> <view class="text"> <view class="block"></view> {{category.fenlmc}} </view> </view> </scroll-view> <scroll-view :scroll-top="scrollTop" scroll-y="isscoll" class="right" @scrolltolower="onscrolltolower" @scrolltoupper="onscrolltoupper" @scroll="mainScroll" :scroll-into-view="scrollInto" scroll-with-animation="true"> <view class="right-goods" :style="{height:tiancheight+'px'}"> <view class="category" v-for="(v,i) in prodata" :key="i" :id="'item-'+i"> <view class="twoListName" v-if="v!=''">{{xfllist[i].fenlmc}}</view> <view class="good_list" v-for="(product,index) in v" :key="index" @click="toGoods(product)"> <view class="goodleft"> <image :src="product.img"></image> </view> <view class="goodright"> <view class="cpmc">{{ product.mc }} {{product.gg}}{{product.dw}}</view> <view :class="product.miaosstyle" @tap.stop="changemiaosstyle(index)"> {{product.miaos}} </view> <view> <text>¥{{ product.price }}</text> <text style="margin-left: 10upx;">库存 {{ product.kcnum }}</text> </view> <!-- <view> <text class="sdtext">{{ product.sdtext }}</text> </view> --> <view style="padding:0upx 8upx; color: grey; display: flex;align-items: center;" @tap.stop v-if="product.inputnum"> <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="输入备注"> <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="输入副单位"> </view> <view class="rfoot"> <view class="stopbuy" v-if="product.isokorder==0"> {{product.opentime}} </view> <view class="p-b-btn" :class="{active: product.iscollect}" @click.stop="toFavorite(product.id,index,0,i)"> <text class="yticon icon-shoucang"></text> </view> <view class="nosell" v-if="product.kcnum<=0"><text>已售空</text></view> <view class="number" v-if="product.kcnum"> <view class="sub" @tap.stop="sub(product.id,i)"> <view class="jian">-</view> </view> <view class="input" @tap.stop="discard" > <input type="digit" v-model="product.inputnum==0?'':product.inputnum" @input="inputchange($event,product.inputnum,product.id,product.kcnum,i)" /> </view> <view class="add" @tap.stop="add(product.id,i,product.kcnum)"> <view class="jia"> <image src="../../static/img/addicon.png"></image> </view> </view> </view> </view> </view> </view> </view> <view class="loadtext">{{loadingText}}</view> </view> </scroll-view> </view> <!-- 脚部菜单 --> <view class="footer"> <view class="settlement"> <view class="sum">合计:<view class="money">¥{{sumPrice}}</view></view> <view class="btn" @tap="toConfirmation">确认加单({{productnum}})</view> </view> </view> </view> </template> <script> import mstabs from "@/components/ms-tabs/ms-tabs.vue"; export default { components: { mstabs }, data() { return { //分类列表
dfllist: [], xfllist: [], dflindex: 0, //初始第一分类id
xflid: 0, goodlist: [], cartlist: [], //购物车商品列表
miaosstyle: 'miaos', scrollHeight: 0, prodata: [], //当前一级分类下所有属于二级分类的商品数据
leftIndex: 0, //左边规定位置下标
scrollInto: '', //滚动位置
scrollTop: 0, old: { scrollTop: 0 }, aid: 0, //在页面保存其它页面传来的列表id ,做滚动列表位置
twolevalid: [], //二级分类全部id
isscoll: false, //scollview默认不可滑动,等待数据渲染完成之后可滑动
isfirst: 0, //是否是第一进入页面
level2: [], tiancheight:0, loadingText: '上滑加载更多...', flag:true, isPost:true, userinfo:[], productnum:0, sumPrice:0, dhid:0, tmp_data:[], pagenum:1, } }, onPageScroll(e) { //兼容iOS端下拉时顶部漂移
if (e.scrollTop >= 0) { this.headerPosition = "fixed"; } else { this.headerPosition = "absolute"; } }, watch: { dflindex() { var that=this; this.xfllist = this.level2[this.dflindex]; this.leftIndex=0; this.pagenum=1; this.tmp_data=[]; that.getgoods(that.xfllist[0].id,0,1); } }, onShow(e) { let dflid = getApp().globalData.dflid; let xflid = getApp().globalData.xflid; if (xflid!=''){ this.init(); } this.checkshownum(); }, onLoad(e) { this.dhid=e.dhid; this.init(); }, computed: { /* 计算左侧滚动位置定位 */ leftIntoView() { return `left-${this.leftIndex}`; } }, //加载更多
methods: { toConfirmation(){ if(this.productnum>0){ uni.navigateTo({ url:'../cart/cartjiad?dhid='+this.dhid }) }else{ uni.showToast({ title:'请选择商品结算', icon:'none' }); } }, async init(){ let t = this; this.userinfo = uni.getStorageSync('userinfo'); //通过其他页面进来的定位
let dflid = getApp().globalData.dflid; let xflid = getApp().globalData.xflid; getApp().globalData.dflid='';//获取了值就立马清空这个全局变量
getApp().globalData.xflid='';//获取了值就立马清空这个全局变量
let getdata = await this.$api.getcategory({ action: 'categorys', pid: 0, uid: this.userinfo.uid, aid: this.userinfo.aid }); this.dfllist = getdata.data[0]; //一级分类
this.level2 = getdata.data[1]; //全部的二级分类
for (let i = 0; i < this.dfllist.length; i++) { if (this.dfllist[i].id == dflid) { //通过id来定位下标
this.dflindex = i; } } this.xfllist = this.level2[this.dflindex]; //当前选中的一级分类下的二级分类
// // DOM 挂载后 再调用 getElementTop 获取高度的方法。
this.$nextTick(function() { this.isscoll = true; uni.hideLoading() }) let xflindex=0; if(xflid==''){ xflid=this.xfllist[0].id; } for (let i = 0; i < this.xfllist.length; i++) { if (this.xfllist[i].id == xflid) { //通过id来定位下标
xflindex = i; } } this.pagenum=1; this.tmp_data=[]; this.getgoods(xflid,xflindex,1)//获取分类下的产品
this.leftIndex=xflindex; this.isfirst = 1; }, getsysteminfo(){ let that=this; const { windowWidth, windowHeight } = uni.getSystemInfoSync(); let scrollHeight = windowHeight - 95; that.tiancheight=scrollHeight+15; }, //跳详情页
toGoods(good) { uni.navigateTo({ url: '../product/detailjiad?gid=' + good.id + "&price=" + good.price }) }, //搜索跳转
toSearch() { uni.showLoading({ title: '加载中...' }) uni.navigateTo({ url: `/pages/search/search?type=1` }) uni.hideLoading() //uni.showToast({title: "建议跳转到新页面做搜索功能"});
}, /* 左侧导航点击 */ leftTap(key) { this.leftIndex = key; this.$nextTick(function() { this.pagenum=1; this.tmp_data=[]; this.scrollTop = 0 this.getgoods(this.xfllist[key].id,key,1); }); }, /* 主区域滚动监听 */ mainScroll(e) { this.old.scrollTop = e.detail.scrollTop; }, onscrolltoupper(e){ // let index=this.leftIndex-1;
// let newlist=this.prodata;
// this.prodata=[];
// this.prodata=newlist;
// if(index>=0 && index<this.xfllist.length){
// let xflid=this.xfllist[index].id;
// this.leftIndex=index;
// this.getgoods(xflid,index,0);
// }
}, onscrolltolower(e){ // let index=this.leftIndex+1;
// if(index>=0 && index<this.xfllist.length){
// let xflid=this.xfllist[index].id;
// this.leftIndex=index;
// this.getgoods(xflid,index,0);
// }else{
// this.loadingText="无更多数据了!";
// }
let index=this.leftIndex+1; if(index>=0 && index<this.xfllist.length && this.tmp_data==''){ this.pagenum=1; let xflid=this.xfllist[index].id; this.leftIndex=index; this.getgoods(xflid,index,0); }else if(this.tmp_data!=''){ this.pagenum++; let xflid=this.xfllist[this.leftIndex].id; this.getgoods(xflid,this.leftIndex,0); }else{ this.loadingText="无更多数据了!"; } }, //获取分类下的产品
async getgoods(xflid,xflindex,lx) { // this.isPost=false;
let that = this; that.scrollTop = 0; //定位右侧商品内容位置
uni.showLoading({ title: '正在加载...' }) //通过二级分类查产品
let getdata = await this.$api.getgoodlist({ action: 'goodlist2', uid: this.userinfo.uid, fid: xflid, keywords: this.keyword, pagenum: this.pagenum, aid: this.userinfo.aid }); if(lx==1){ this.prodata=[]; for(let i=0;i<=this.xfllist.length;i++){ this.prodata[i]=''; } } if (getdata.data.length == 0) { this.loadmore = 0; this.loadingText = "无更多数据"; } else { this.tmp_data= this.tmp_data.concat(getdata.data); this.prodata[xflindex] = this.tmp_data; } // this.prodata[xflindex] = getdata.data;
// that.$forceUpdate();
this.$nextTick(function() { uni.hideLoading(); that.getsysteminfo(); }) if(lx==1){ that.scrollTop = that.old.scrollTop; that.$nextTick(function() { //初始化scollview的顶部位置,每次切换tab时top值必须为空0
that.scrollTop = 0; }) that.$forceUpdate(); } this.checkshownum(); }, async addcollection(id, index, a, levalkey) { let type = !this.prodata[levalkey][index].iscollect; if (this.userinfo) { let redata = await this.$api.addcollection({ action: 'addcollection', type: type, uid: this.userinfo.uid, id: id, aid: this.userinfo.uid, }); uni.showToast({ title: redata.msg, icon: 'none' }) if (redata.code == 1) { this.prodata[levalkey][index].iscollect = !this.prodata[levalkey][index].iscollect; } this.$forceUpdate(); } else { uni.navigateTo({ url: '/pages/user/login' }) } }, //收藏
toFavorite(id, index, type, key) { this.addcollection(id, index, type, key); }, //减操作
sub(id) { let getcartlist = uni.getStorageSync('cartlistjiad'); let isexit = this.findidfromstor(id); let delid = 0; for (let i = 0; i < getcartlist.length; i++) { if (isexit.id == getcartlist[i].id) { //找到商品一样的商品
getcartlist[i].num--; //数量减
if (getcartlist[i].num <= 0) { //删除当前商品缓存
getcartlist.splice(i, 1); uni.setStorageSync('cartlistjiad', getcartlist) break; //跳出循环
} else { getcartlist[i].total = getcartlist[i].num * getcartlist[i].price uni.setStorageSync('cartlistjiad', getcartlist) break; //跳出循环
} } } this.checkshownum(); }, // 增加数量,type 0-推荐商品,1-猜你喜欢商品
add(id, key,cknum) { let getcartlist = uni.getStorageSync('cartlistjiad'); //首次加购物车
if (getcartlist == '') { this.cartlist = []; this.cartlist.push(this.findarrbyid(id, key)); //计算每个商品的总价格
this.cartlist.map((item, index) => { item.total = item.price * item.num }); uni.setStorageSync('cartlistjiad', this.cartlist); } else { //已有商品在购物车
let isexit = this.findidfromstor(id, key); if (!isexit) { //购物车中还没当前商品
//不存在
getcartlist.push(this.findarrbyid(id, key)); for (let i = 0; i < getcartlist.length; i++) { if (id == getcartlist[i].id) { getcartlist[i].total = getcartlist[i].num * getcartlist[i].price } } uni.setStorageSync('cartlistjiad', getcartlist); } else { //存在
for (let i = 0; i < getcartlist.length; i++) { if (isexit.id == getcartlist[i].id) { //找到商品一样的商品
if(cknum<=getcartlist[i].num){ uni.showToast({ title:'库存不足!', icon:'none' }); break; //跳出循环
} getcartlist[i].num++; //数量自增
getcartlist[i].total = getcartlist[i].num * getcartlist[i].price uni.setStorageSync('cartlistjiad', getcartlist) break; //跳出循环
} } } } this.checkshownum(); }, // input框直接加入购物车
inputadd(id,key,inputnum) { let getcartlist = uni.getStorageSync('cartlistjiad'); //首次加购物车
if (getcartlist == '') { this.cartlist = []; this.cartlist.push(this.findarrbyid(id, key)); //计算每个商品的总价格
this.cartlist.map((item, index) => { item.total = parseFloat((item.price * inputnum) * 100) / 100; item.num = parseFloat(inputnum); }); uni.setStorageSync('cartlistjiad', this.cartlist); } else { //已有商品在购物车
let isexit = this.findidfromstor(id, key); if (!isexit) { //购物车中还没当前商品
//不存在
getcartlist.push(this.findarrbyid(id, key)); for (let i = 0; i < getcartlist.length; i++) { if (id == getcartlist[i].id) { getcartlist[i].total = parseFloat((inputnum * getcartlist[i].price) * 100) / 100; getcartlist[i].num = parseFloat(inputnum); } } uni.setStorageSync('cartlistjiad', getcartlist); } else { //存在
for (let i = 0; i < getcartlist.length; i++) { if (isexit.id == getcartlist[i].id) { //找到商品一样的商品
getcartlist[i].num=inputnum; //数量自增
if(getcartlist[i].kcnum<=getcartlist[i].num){ uni.showToast({ title:'库存不足!', icon:'none' }); break; //跳出循环
} getcartlist[i].total = parseFloat((getcartlist[i].num * getcartlist[i].price) * 100) / 100 uni.setStorageSync('cartlistjiad', getcartlist) break; //跳出循环
} } } } this.checkshownum(); }, inputchange(inputsl,inputnum, id, kcnum,key) { inputnum=parseFloat(inputsl.detail.value); let getcartlist = uni.getStorageSync('cartlistjiad'); if (inputnum > 0) { if (inputnum > kcnum) { uni.showToast({ title: '库存不足', icon: 'none' }) return; } this.inputadd(id,key,inputnum);//input框直接添加购物车
} else { for (let i = 0; i < getcartlist.length; i++) { if (id == getcartlist[i].id) { //找到商品一样的商品
getcartlist[i].num = 0; uni.setStorageSync('cartlistjiad', getcartlist) break; //跳出循环
} } this.checkshownum(); } }, inputchangeBz(inputsl,inputnum, id, kcnum,type) { inputnum=inputsl.detail.value; let getcartlist = uni.getStorageSync('cartlistjiad'); let isbz=0; for (let i = 0; i < getcartlist.length; i++) { if (id == getcartlist[i].id) { //找到商品一样的商品
getcartlist[i].bz = inputnum; uni.setStorageSync('cartlistjiad', getcartlist) isbz=1; break; //跳出循环
} } if(isbz==0){ uni.showToast({title:'请您输入数量后再填备注',icon:'none'}); return; } this.checkshownum(); }, inputchangeFudw(inputsl,inputnum, id, kcnum,type) { inputnum=inputsl.detail.value; let getcartlist = uni.getStorageSync('cartlistjiad'); let is=0; for (let i = 0; i < getcartlist.length; i++) { if (id == getcartlist[i].id) { //找到商品一样的商品
getcartlist[i].fudw = inputnum; uni.setStorageSync('cartlistjiad', getcartlist) is=1; break; //跳出循环
} } if(is==0){ uni.showToast({title:'请您输入数量后再填副单位',icon:'none'}); return; } this.checkshownum(); }, //初始化购物车数据
checkshownum() { let getcartlist = uni.getStorageSync('cartlistjiad'); let carid = [];let carbz = [];let carfudw = []; let prodata = this.prodata; let money=0;let pronum=0; for (let i = 0; i < getcartlist.length; i++) { if(getcartlist[i]!=''){ let num = carid[getcartlist[i]['id']] || 0 carid[getcartlist[i]['id']] = parseFloat(num) + parseFloat(getcartlist[i]['num']); carbz[getcartlist[i]['id']] = getcartlist[i]['bz']; carfudw[getcartlist[i]['id']] = getcartlist[i]['fudw']; money=money+getcartlist[i]['total']; pronum=pronum+1; } } this.sumPrice=money.toFixed(2); this.productnum=pronum; for (let i = 0; i < prodata.length; i++) { if(prodata[i]!=''){ for (let y = 0; y < prodata[i].length; y++) { if (carid[prodata[i][y]['id']]) { this.$set(this.prodata[i][y], 'inputnum', carid[prodata[i][y]['id']]) this.$set(this.prodata[i][y], 'bz', carbz[prodata[i][y]['id']]) this.$set(this.prodata[i][y], 'fudw', carfudw[prodata[i][y]['id']]) } else { this.$set(this.prodata[i][y], 'inputnum', 0) this.$set(this.prodata[i][y], 'bz', '') this.$set(this.prodata[i][y], 'fudw', '') } } } } this.$forceUpdate(); }, //查找商品
findarrbyid(id, key) { let arr = this.prodata[key]; for (let i = 0; i < arr.length; i++) { if (arr[i]['id'] == id) { //console.log(arr[i],'要保存的东西')
return arr[i]; break; //跳出循环
} } }, //从本地存储中根据id获取数组
findidfromstor(id) { let arr = uni.getStorageSync('cartlistjiad'); for (let i = 0; i < arr.length; i++) { if (arr[i]['id'] == id) { return arr[i]; break; //跳出循环
} } }, //点击改变描述显示
changemiaosstyle(index) { let item = this.goodlist[index] item.checked = !item.checked if (item.miaosstyle == 'miaos') { item.miaosstyle = 'miaosshow'; } else { item.miaosstyle = 'miaos'; } this.$set(this.goodlist, index, item) }, discard() { //丢弃,防止事件冒泡而设
} } } </script> <style lang="scss"> @font-face { font-family: "HMfont-home"; src: url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAABDkAAsAAAAAHNQAABCUAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCEOAqqPKIAATYCJAM4Cx4ABCAFhG0HgUIbsBczo8LGAQApXpzs/3DAzQnrqJVQobqjkywr6K3VnnGPu9Hok7hbbDQrMa3YYH8hMXBogoTzwQb7Cx1kafc7LoV7nPdDKXng//D1vvHHmJQxLb6PhyYHA5TjobT1Ahe8Yj0Bel0CGZ62+e/eIdwdcCPswEj8LgoVo7G/whxWfmb0JgvdWPLFRbsoNzNXdS7DRYaDbmUCvEXgheNFZKuuXTu+aEU1WZOVcF6HmhlSCYD7H5tIg0qTmVZRu7s/lUSaaoKS9pbWFqJJPkHSvAEC8qYvrtm2JxQywhzK2SfN9jDt5aDpt8kIchy0s3wRg+cEDyyL1Gjv/0BR8z+X2vyO6G5ACjPM2Jv/kxz8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MOZWF7uQCrKh2ul4x0Sb/mLF/+/YYQjLNDU103KRzSaXPAdSz70nTPNP9CC4MffmeUuT4Tl5TlNKIV8liyPlcleA5CaB+B83q0HC/48PJ97iy7vw4MfROonLACLCsfO1T7LoqIxoojYFo6BS/T8GH+31h6tu3zaeULDhNdPPcZvdc7Qj3VGVT29KuguM6o06vjx/sR0DJcii9durAZOTrhOW8eVPYQOP9IULCnZnYOYjJRz21e+5HX2NhhHO9FUBw6rmB9n6a7jdL76eziU/M0YUW0/Hkd0CW2Jzt0/khCxnsSEviTnQC4WfegavUP5
}
.icon { font-family: "HMfont-home" !important; font-size: 60upx; font-style: normal; color: #000000;
&.search { &:before { content: "\e628"; } }
&.xia { &:before { content: "\e689"; } } } .loadtext { display: flex; justify-content: center; font-size: 25upx; color: #D6D6D6; margin-bottom: 20upx; margin-top: 20upx; } .twoListName { display: block; text-align: center; color: #348143; padding: 30upx 0; font-size: 30upx; font-weight: bold; }
.stopbuy { margin-top: 15upx; font-size: 28upx; color: #F2F5F2; padding: 15upx; border-radius: 5upx; background-color: #B7B7B7; text-align: center; }
.status { width: 100%; height: 0; position: fixed; z-index: 10; background-color: #fff; top: 0; /* #ifdef APP-PLUS */ height: var(--status-bar-height); //覆盖样式
/* #endif */
}
.header { width: 100%; padding: 0 5%; height: 100upx; display: flex; align-items: center; position: fixed; top: 0; z-index: 10; background-color: #fff; /* #ifdef APP-PLUS */ top: var(--status-bar-height);
/* #endif */ .input-box { width: 100%; height: 60upx; background-color: #f5f5f5; border-radius: 30upx; position: relative; display: flex; align-items: center;
.icon { display: flex; align-items: center; position: absolute; top: 0; right: 0; width: 60upx; height: 60upx; font-size: 34upx; color: #c0c0c0; }
input { padding-left: 28upx; height: 28upx; font-size: 28upx; } }
}
.place {
background-color: #ffffff; height: 100upx; /* #ifdef APP-PLUS */ margin-top: var(--status-bar-height); /* #endif */ }
.category-list { width: 100%; background-color: #fff; display: flex; padding-bottom: 130upx;; .left, .right { position: absolute; top: 190upx; /* #ifdef APP-PLUS */ top: calc(100upx + var(--status-bar-height)); /* #endif */ bottom: 0upx; padding-bottom: 110upx; }
.left { width: 24%; left: 0upx; background-color: #f2f2f2; .row { width: 100%; height: 90upx; display: flex; align-items: center;
.text { width: 100%; position: relative; font-size: 28upx; display: flex; justify-content: center; color: #3c3c3c;
.block { position: absolute; width: 0upx; left: 0; } }
&.on { height: 100upx; background-color: #fff;
.text { font-size: 30upx; font-weight: 600; color: #2d2d2d;
.block { width: 10upx; height: 80%; top: 10%; background-color: #4D9864; } } } } }
.right { width: 76%; left: 24%;
.good_list { display: flex; justify-content: space-around; padding: 15upx 0; border-bottom: 1upx #F0F0F0 solid; height: auto;
.goodleft { width: 50%; padding: 10upx 0 10upx 15upx;
image { width: 160upx; height: 160upx; border-radius: 15upx; } }
.goodright { width: 100%; padding: 10upx 4%; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; text-align: justify; overflow: hidden; font-size: 28upx; color: #747474; .cpmc{ overflow:hidden; text-overflow:ellipsis; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:1; } .sdtext { padding: 2upx 8upx; border: 1upx #DBDBDB solid; border-radius: 5upx; color: #B9B9B9; font-size: 25upx; margin-top: 3upx;
}
.sellnum { font-size: 25upx; padding-left: 15upx; color: #B9B9B9; }
.miaos { width: 100%; margin: 10upx; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; text-align: justify; overflow: hidden; font-size: 28upx; color: #747474; }
.miaosshow { margin: 10upx; font-size: 28upx; color: #747474; }
.rfoot { display: flex; justify-content: space-between; justify-items: center; padding-top: 8upx; }
//收藏样式
.p-b-btn {
.yticon { font-size: 40upx; line-height: 48upx; color: $font-color-light; }
&.active, &.active .yticon { color: $uni-color-primary; }
.icon-fenxiang2 { font-size: 42upx; transform: translateY(-2upx); }
.icon-shoucang { font-size: 50upx; } } } }
.nosell { display: flex; justify-content: flex-end;
text { position: relative; right: 5upx; padding: 5upx; background-color: #EAEAEA; color: white; font-size: 28upx !important; } }
.number { display: flex; justify-content: flex-end; margin-right: 30upx; margin-bottom: 10upx;
.input { width: 70upx; height: 45upx; margin: 0 10upx; // background-color: #f3f3f3;
border-bottom: 1upx #ADADAD solid;
input { width: 60upx; height: 60upx; display: flex; justify-content: center; align-items: center; text-align: center; font-size: 26upx; } }
.sub, .add { width: 45upx; height: 45upx; border-radius: 5upx; }
.jia { display: flex; width: 45upx; height: 45upx; justify-content: center; justify-items: center; align-items: center; background-color: #41A863; color: #fff; border-radius: 50%;
image { width: 40upx; height: 40upx; padding: 7upx; } }
.jian { display: flex; width: 45upx; height: 45upx; justify-content: center; justify-items: center; align-items: center; background-color: #41A863; color: #fff; border-radius: 50%; padding-bottom: 10upx; } } } } .footer{ width: 100%; padding: 0 4%; background-color: #fbfbfb; height: 100upx; display: flex; justify-content: space-between; align-items: center; font-size: 28upx; position: fixed; bottom: 0upx; z-index: 5; .delBtn{ border: solid 1upx #f06c7a; color: #f06c7a; padding: 0 30upx; height: 50upx; border-radius: 30upx; display: flex; justify-content: center; align-items: center; } .settlement{ width: 100%; display: flex; justify-content: flex-end; align-items: flex-end; .sum{ width: 50%; font-size: 28upx; margin-right: 10upx; display: flex; justify-content: flex-end; .money{ font-weight: 600; } } .btn{ padding: 0 20upx; height: 50upx; background-color: #f06c7a; color: #fff; display: flex; justify-content: center; align-items: center; border-radius: 30upx; } .btn_gray{ padding: 0 20upx; height: 50upx; background-color: #C4C4C4; color: #fff; display: flex; justify-content: center; align-items: center; width: 240upx; border-radius: 30upx; } } } </style>
|