no message

This commit is contained in:
2025-08-14 23:19:03 +08:00
parent 2ff5cc2146
commit 6a7c7fb073
3 changed files with 136 additions and 21 deletions
@@ -275,9 +275,7 @@ export default {
onLoad(options) {
const id = options.id;
const source = options.source;
if(options.ji){
this.ji = 1;
}
if (id && id !== 0) {
this.id = id ? parseInt(id, 10) : 0;
if (source && source === 'supply_chain') {
@@ -326,6 +324,7 @@ export default {
const resp = await getGoodsDetail(params);
if (resp && resp.bizcode === 100) {
const data = resp.data;
this.ji = data.type == 3 ? 1 : 0;
// 商品图
if (data.goodsGraph) {
this.swiperList = data.goodsGraph.split(",");
@@ -495,24 +494,33 @@ export default {
});
return;
}
const params = {
id: this.id,
specsId: selectTempl.id,// 规格ID
goodsNum: this.orderInfo.quantity,// 商品数量
}
console.log('selectTempl',selectTempl)
if(isBy){
params['specsId'] = selectTempl;
uni.navigateTo({
url: `/pages/order_package/order_submit/order_submit?sed=${JSON.stringify(params)}`,
})
return;
}
const resp = await addGoods(params);
if (resp && resp.bizcode === 100) {
if (isBy) {
uni.navigateTo({
url: `/pages/order_package/order_submit/order_submit?ids=${resp.data}&ji=${ji}`,
})
} else {
// if (isBy) {
// uni.navigateTo({
// url: `/pages/order_package/order_submit/order_submit?ids=${resp.data}&ji=${this.ji}`,
// })
// } else {
uni.showToast({
title: '成功加入购物车',
icon: 'success', // 可选 success/loading/none
duration: 2000 // 持续时长,单位ms
});
}
// }
setTimeout(() => {
this.checkSpecification(false, null);
}, 2000)