1.解决购物车猜你喜欢出现的加入购物车数量错误的问题

2024.1.14 sws
master
sws 2024-01-15 13:46:47 +08:00
parent e66c993bd7
commit cc5aac59ba
3 changed files with 7 additions and 6 deletions

View File

@ -5,14 +5,14 @@
data: {
//
//
request_url: 'https://new.shopxo.vip/',
// request_url: 'https://new.shopxo.vip/',
// request_url: 'https://xiaotao8888.com/',
// request_url: 'http://shopxo.com/',
request_url: 'http://shopxo.com/',
// publicpublichttps://d1.shopxo.vip/public/
static_url: 'https://new.shopxo.vip/',
// static_url: 'https://new.shopxo.vip/',
// static_url: 'https://xiaotao8888.com/',
// static_url: 'http://shopxo.com/',
static_url: 'http://shopxo.com/',
// default
system_type: 'default',

View File

@ -1115,7 +1115,7 @@
//
cart_success_event(e) {
//
this.goods_change(e.goods_id, 1, e.stock);
this.goods_change(e.goods_id, 1);
//
this.get_data();
},
@ -1124,6 +1124,7 @@
goods_change(goods_id, type, number = 0) {
var temp_goods_list = this.goods_list || [];
if (temp_goods_list.length > 0) {
number = parseInt(number);
for (var i in temp_goods_list) {
if (temp_goods_list[i]['id'] == goods_id) {
var user_cart_count = parseInt(temp_goods_list[i]['user_cart_count'] || 0);

View File

@ -136,7 +136,7 @@ export default {
//
var is_success_tips = params.is_success_tips == undefined ? 1 : params.is_success_tips || 0;
// +1
if (this.is_direct_cart == 1 && parseInt(this.goods.user_cart_count || 0) > 0) {
if (is_direct_cart == 1 && parseInt(goods.user_cart_count || 0) > 0) {
var buy_number = 1;
} else {
var buy_number = goods.buy_min_number || 1;