This commit is contained in:
魏啾
2024-08-03 10:54:15 +08:00
6 changed files with 88 additions and 1796 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -170,7 +170,7 @@
<text class="num">{{cartLists.amount||'0.00'}}</text>
</view>
<view class="btn" @tap="$u.debounce(orderdetail, 500)">
<text class="t">结算</text>
<text class="t">结算</text>
</view>
</view>
</view>
@@ -525,18 +525,31 @@
* @param {Object} b
*/
shopAdd(item, index, index1, a, b) {
if (a == "+") {
if (this.amountcartNumber <= 0) {
this.amountcartNumber = this.amountcartNumber + item.suit;
} else {
let flag = true;
if ( this.cartLists.data.length > 0) {
this.cartLists.data.forEach((v,e)=>{
if ( v.productId == item.id) {
flag = false;
}
console.log(v)
})
}
console.log(a)
console.log(this.amountcartNumber)
console.log(flag)
console.log(item)
if ( a == "+" ){
if ( this.amountcartNumber <= 0 && flag) {
this.amountcartNumber = this.amountcartNumber + (item.suit==0?1:item.suit);
}else {
this.amountcartNumber++;
}
} else {
if (this.amountcartNumber > 0) {
console.log(item)
if (this.amountcartNumber <= item.suit) {
this.amountcartNumber = this.amountcartNumber - item.suit
if ( this.amountcartNumber <= item.suit && flag) {
this.amountcartNumber = this.amountcartNumber - (item.suit==0?1:item.suit);
} else {
this.amountcartNumber = this.amountcartNumber - 1;
}
@@ -1431,18 +1444,17 @@
.btn {
width: 160rpx;
height: 64rpx;
background: #FEFAF7;
background: #E7AE7B;
border-radius: 36rpx 36rpx 36rpx 36rpx;
border: 2rpx solid #E8AD7B;
display: flex;
align-items: center;
justify-content: flex-end;
justify-content: center;
.t {
font-weight: bold;
font-size: 28rpx;
color: #E8AD7B;
margin-right: 26rpx;
color: #FFFFFF;
}
}
}
@@ -1636,6 +1648,9 @@
font-weight: 400;
font-size: 24rpx;
color: #333333;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
&+.item {
margin-top: 1px;
@@ -1804,6 +1819,13 @@
color: #999999;
margin-bottom: 8rpx;
}
.describe,.name{
width: 270rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.lookBack {
color: #FF534B;