parent
e66c993bd7
commit
cc5aac59ba
8
App.vue
8
App.vue
|
|
@ -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/',
|
||||
|
||||
// 静态资源地址(如系统根目录不在public目录下面请在静态地址后面加public目录、如:https://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',
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue