扫码入库新增可修改原有图片

This commit is contained in:
weipengfei 2023-11-07 16:54:23 +08:00
parent 0c25b1c6e4
commit 946ced7f59
1 changed files with 134 additions and 1 deletions

View File

@ -150,6 +150,25 @@
<!-- #ifndef H5 -->
<passwordPopup></passwordPopup>
<!-- #endif -->
<!-- 购物车 -->
<view class="card" :style="`bottom:10px`"
@click="navgo('/pages/order_addcart/order_addcart?product_type=98')">
<view class="left">
<view class="cart" :class="{ act_cart: false }" style="position: relative; z-index: 9999999">
<u--image :showLoading="true" src="/static/images/LHYC/GWC.png" width="63.09rpx"
height="63.09rpx"></u--image>
<view class="badge">
{{goodsNum}}
</view>
</view>
<view class="tot_price">
<view class=""> {{totalMoney}} </view>
<view class=""> 支持配送 售后无忧 </view>
</view>
</view>
<view class="right"> 去结算 </view>
</view>
</view>
</template>
@ -200,6 +219,11 @@
import {
getconfig,
} from '@/api/public.js';
import {
getCartCounts,
getCartList,
} from '@/api/requesta.js';
const app = getApp();
export default {
components: {
@ -231,6 +255,8 @@
domain: HTTP_REQUEST_URL,
productList: [],
is_switch: true,
goodsNum: 0,
totalMoney: 0,
where: {
cate_id: '',
order: '',
@ -334,7 +360,10 @@
this.get_host_product();
this.getClassfication();
this.getStoreType();
this.tabIndex = 2
// this.tabIndex = 2
},
onShow() {
this.cartFn()
},
onReady() {},
mounted() {
@ -791,6 +820,55 @@
})
}
},
skuaddcart() {
this.showcartpop = false
// this.skuform = {}
let res = postCartAdd({
cart_num: this.skuNumber,
is_new: 0,
product_attr_unique: this.skuform.sku[this.skusize].unique,
product_id: this.skuform.product_id,
product_type: this.skuform.product_type,
spread_id: "",
}).then((res, err) => {
this.cartFn()
uni.showToast({
title: "加入成功",
duration: 1000,
})
}).catch(err => {
// this.act_cart = false
uni.showToast({
title: err,
icon: "none",
duration: 1000,
})
})
},
cartFn() {
getCartList().then(res => {
// console.log(res)
this.totalMoney = 0
this.cartList = res.data.list
this.cartList.forEach(e => {
e.list.forEach(item => {
this.totalMoney += item.cart_num * item.productAttr.price
})
})
this.totalMoney = this.totalMoney.toFixed(2)
})
getCartCounts().then(res => {
this.goodsNum = res.data[0].count
})
},
navgo(url){
uni.navigateTo({
url: url
})
}
},
onPullDownRefresh() {
@ -1661,4 +1739,59 @@
}
}
}
.card {
width: 720rpx;
z-index: 99;
// margin:auto;
left: 50%;
transform: translateX(-50%);
position: fixed;
// bottom: 0;
background-color: #333333;
height: 101.64rpx;
border-radius: 50.82rpx;
overflow: hidden;
color: white;
display: flex;
justify-content: space-between;
box-sizing: border-box;
.left {
display: flex;
align-items: center;
padding: 10rpx 35rpx;
.tot_price {
display: flex;
margin-left: 42rpx;
flex-direction: column;
justify-content: space-between;
}
.badge {
position: absolute;
top: 0;
right: 0;
background-color: #f84221;
transform: translate(50%, -50%);
// padding: 10rpx 10rpx;
border-radius: 35rpx;
text-align: center;
width: 35rpx;
line-height: 35rpx;
height: 35rpx;
}
}
.right {
font-size: 33.29rpx;
line-height: 50px;
background: linear-gradient(to right, #f84221, #ff6d20);
width: 140.19rpx;
text-align: center;
}
}
.act_cart {
transition: 0.5s;
transform: scale(1.1);
}
</style>