细节优化
parent
9948b8aa8f
commit
a3f3bc3f76
6
App.vue
6
App.vue
|
|
@ -61,9 +61,9 @@
|
|||
"/pages/user/user"
|
||||
],
|
||||
// 请求地址
|
||||
request_url: 'http://shopxo.com/',
|
||||
request_url: 'https://d1.shopxo.vip/',
|
||||
// 静态资源地址(如系统根目录不在public目录下面请在静态地址后面加public目录、如:https://d1.shopxo.vip/public/)
|
||||
static_url: 'http://shopxo.com/',
|
||||
static_url: 'https://d1.shopxo.vip/',
|
||||
// 系统类型(默认default、如额外独立小程序、可与程序分身插件实现不同主体小程序及支付独立)
|
||||
system_type: 'default',
|
||||
// 基础信息
|
||||
|
|
@ -72,7 +72,7 @@
|
|||
// 默认logo、如 /static/images/common/logo.png
|
||||
application_logo: '',
|
||||
// 版本号
|
||||
version: 'v2.3.2',
|
||||
version: 'v2.3.3',
|
||||
// 货币价格符号
|
||||
currency_symbol: '¥',
|
||||
// 主题类型 主题颜色
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
## v2.3.3(2023-000)
|
||||
## v2.3.3(2023-04-10)
|
||||
* 商品列表使用统一组件
|
||||
* 商品参数新增弹窗展示
|
||||
* 初始访问登录页面优化
|
||||
|
|
@ -21,6 +21,10 @@
|
|||
* 新增组合搭配
|
||||
* 新增列表快捷加入购物车
|
||||
* 商品列表新增错误提示
|
||||
* 商家详情新增搜索全站开关控制
|
||||
* 门店详情新增扫码开关控制
|
||||
* 新增多规格批量下单
|
||||
* 插件分包处理
|
||||
|
||||
|
||||
## v2.3.2(2022-11-30)
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<view>
|
||||
<view v-if="data_list.length > 0" class="cart-page">
|
||||
<!-- 数据列表 -->
|
||||
<view class="padding-horizontal-main padding-top-main">
|
||||
<view :class="'padding-horizontal-main padding-top-main '+(source_type != 'cart' ? 'bottom-line-exclude' : '')">
|
||||
<uni-swipe-action>
|
||||
<view v-for="(item, index) in data_list" :key="index" class="oh border-radius-main bg-white spacing-mb">
|
||||
<uni-swipe-action-item :right-options="swipe_options" @click="swipe_opt_event" @change="swipe_change($event, index)">
|
||||
|
|
@ -59,34 +59,33 @@
|
|||
</view>
|
||||
|
||||
<!-- 操作导航 -->
|
||||
<view class="cart-buy-nav oh wh-auto">
|
||||
<!-- 展示型 -->
|
||||
<view v-if="common_site_type == 1" class="cart-exhibition-mode padding-horizontal-main">
|
||||
<button class="bg-main cr-white round wh-auto text-size" type="default" @tap="exhibition_submit_event" hover-class="none">
|
||||
<!-- 展示型 -->
|
||||
<view v-if="common_site_type == 1" :class="'cart-buy-nav oh wh-auto '+(source_type != 'cart' ? 'bottom-line-exclude' : '')">
|
||||
<view class="cart-exhibition-mode padding-horizontal-main">
|
||||
<button class="bg-main cr-white round wh-auto text-size-sm" type="default" @tap="exhibition_submit_event" hover-class="none">
|
||||
<view class="dis-inline-block va-m margin-right-xl">
|
||||
<uni-icons type="phone" size="14" color="#fff" />
|
||||
</view>
|
||||
<text class="va-m">{{common_is_exhibition_mode_btn_text}}</text>
|
||||
</button>
|
||||
</view>
|
||||
|
||||
<!-- 销售,自提,虚拟销售 -->
|
||||
<view v-else class="br-t bg-white wh-auto ht-auto">
|
||||
<view class="cart-nav-base fl single-text padding-left">
|
||||
<view @tap="selected_event" data-type="all" class="fl cart-selected">
|
||||
<image class="icon va-m" :src="common_static_url+'select' + (is_selected_all ? '-active' : '') + '-icon.png'" mode="widthFix"></image>
|
||||
<text v-if="!already_selected_status" class="va-m cr-base">全选</text>
|
||||
</view>
|
||||
<view v-if="already_selected_status" @tap="cart_all_remove_event" class="cart-nav-remove-submit pa bg-white cr-red br-red round cp">删除</view>
|
||||
<view class="fr price">
|
||||
<view class="sales-price single-text fr">{{currency_symbol}}{{total_price}}</view>
|
||||
<view class="fr">合计:</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 销售,自提,虚拟销售 -->
|
||||
<view v-else :class="'cart-buy-nav oh wh-auto br-t bg-white '+(source_type != 'cart' ? 'bottom-line-exclude' : '')">
|
||||
<view class="cart-nav-base fl single-text padding-left">
|
||||
<view @tap="selected_event" data-type="all" class="fl cart-selected">
|
||||
<image class="icon va-m" :src="common_static_url+'select' + (is_selected_all ? '-active' : '') + '-icon.png'" mode="widthFix"></image>
|
||||
<text v-if="!already_selected_status" class="va-m cr-base">全选</text>
|
||||
</view>
|
||||
<view class="fr cart-nav-submit padding-top padding-bottom padding-horizontal-main">
|
||||
<button class="bg-main cr-white round text-size-lg" type="default" @tap="buy_submit_event" :disabled="!already_selected_status" hover-class="none">结算</button>
|
||||
<view v-if="already_selected_status" @tap="cart_all_remove_event" class="cart-nav-remove-submit pa bg-white cr-red br-red round cp">删除</view>
|
||||
<view class="fr price">
|
||||
<view class="sales-price single-text fr">{{currency_symbol}}{{total_price}}</view>
|
||||
<view class="fr">合计:</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="fr cart-nav-submit padding-top padding-bottom padding-horizontal-main">
|
||||
<button class="bg-main cr-white round text-size-lg" type="default" @tap="buy_submit_event" :disabled="!already_selected_status" hover-class="none">结算</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
|
@ -121,7 +120,8 @@
|
|||
data_list: [],
|
||||
total_price: '0.00',
|
||||
is_selected_all: false,
|
||||
already_selected_status: false,
|
||||
already_selected_status: false,
|
||||
source_type: null,
|
||||
// 基础配置
|
||||
currency_symbol: app.globalData.data.currency_symbol,
|
||||
common_site_type: 0,
|
||||
|
|
@ -180,7 +180,8 @@
|
|||
},
|
||||
|
||||
// 获取数据
|
||||
init(e) {
|
||||
init(source_type = null) {
|
||||
this.setData({source_type: source_type});
|
||||
var user = app.globalData.get_user_info(this, "init");
|
||||
if (user != false) {
|
||||
// 用户未绑定用户则转到登录页面
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
<view class="plugins-batchbuy-container oh">
|
||||
<block v-if="(goods || null) != null && (batchbuy_data || null) != null && (batchbuy_data.goods_spec_data || null) != null && batchbuy_data.goods_spec_data.length > 0">
|
||||
<block v-if="batchbuy_data.is_only_level_one == 0">
|
||||
<view class="left-nav ht-auto pa bg-base">
|
||||
<view class="left-nav pa bg-base">
|
||||
<scroll-view :scroll-y="true" class="ht-auto">
|
||||
<block v-for="(item, index) in batchbuy_data.goods_spec_data" :key="index">
|
||||
<view :class="'padding-top-xxl padding-bottom-xxl tc cp oh pr ' + (nav_active_index == index ? 'bg-white cr-main' : '')" :data-index="index" @tap="nav_event">
|
||||
|
|
@ -63,8 +63,26 @@
|
|||
</scroll-view>
|
||||
</view>
|
||||
</block>
|
||||
<view class="pa confirm-submit padding-horizontal-main wh-auto bs-bb bottom-line-exclude">
|
||||
<button type="default" class="bg-main cr-white text-size tc wh-auto round" @tap="confirm_event">{{(buy_event_type == 'buy') ? '立即购买' : '加入购物车'}}</button>
|
||||
<view class="confirm-submit pa wh-auto bottom-line-exclude bg-white padding-top-main">
|
||||
<view class="oh padding-horizontal-main padding-bottom-main cr-grey">
|
||||
<text class="text-size-xs">
|
||||
<text>已选</text>
|
||||
<text class="cr-red padding-left-xs padding-right-xs">{{base_data.kind}}</text>
|
||||
<text>种</text>
|
||||
<text class="cr-red padding-left-xs padding-right-xs">{{base_data.quantity}}</text>
|
||||
<text>{{goods.inventory_unit}}</text>
|
||||
</text>
|
||||
<text class="text-size-xs fr">金额:<text class="fw-b sales-price">{{currency_symbol}}{{base_data.amount_money}}</text></text>
|
||||
</view>
|
||||
<view v-if="(buy_button.data || null) != null && buy_button.data.length > 0" class="padding-bottom-main">
|
||||
<view :class="'oh buy-nav-btn-number-' + buy_button.count || 0">
|
||||
<block v-for="(item, index) in buy_button.data" :key="index">
|
||||
<view v-if="(item.name || null) != null && (item.type || null) != null" class="item fl bs-bb padding-horizontal-main">
|
||||
<button :class="'cr-white round text-size-sm bg-' + ((item.color || 'main') == 'main' ? 'main' : 'main-pair')" type="default" @tap="confirm_event" :data-type="item.type" hover-class="none">{{item.name}}</button>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<block v-else>
|
||||
|
|
@ -86,10 +104,15 @@
|
|||
currency_symbol: app.globalData.get_config('currency_symbol', app.globalData.data.currency_symbol),
|
||||
popup_status: false,
|
||||
nav_active_index: 0,
|
||||
buy_event_type: 'buy',
|
||||
goods: null,
|
||||
buy_button: null,
|
||||
batchbuy_data: null,
|
||||
back_data: null,
|
||||
back_data: null,
|
||||
base_data: {
|
||||
kind: 0,
|
||||
quantity: 0,
|
||||
amount_money: '0.00',
|
||||
}
|
||||
};
|
||||
},
|
||||
|
||||
|
|
@ -102,7 +125,7 @@
|
|||
|
||||
methods: {
|
||||
// 初始化
|
||||
init(goods = null, batchbuy_data = null, buy_event_type = 'buy', back_data = null) {
|
||||
init(goods = null, batchbuy_data = null, buy_button = null, back_data = null) {
|
||||
if(!app.globalData.is_single_page_check()) {
|
||||
return false;
|
||||
}
|
||||
|
|
@ -110,7 +133,7 @@
|
|||
popup_status: true,
|
||||
goods: goods || null,
|
||||
batchbuy_data: batchbuy_data || null,
|
||||
buy_event_type: buy_event_type || 'buy',
|
||||
buy_button: buy_button || null,
|
||||
back_data: back_data,
|
||||
});
|
||||
},
|
||||
|
|
@ -196,28 +219,48 @@
|
|||
{
|
||||
var badge_total = 0;
|
||||
temp_data.goods_spec_data[this.nav_active_index]['data'].forEach(item => {
|
||||
badge_total += parseInt(item.buy_number || 0);
|
||||
var temp_badge = parseInt(item.buy_number || 0);
|
||||
if(temp_badge > 0) {
|
||||
badge_total += temp_badge;
|
||||
}
|
||||
});
|
||||
temp_data.goods_spec_data[this.nav_active_index]['badge_total'] = badge_total;
|
||||
}
|
||||
|
||||
// 设置数据
|
||||
this.setData({
|
||||
batchbuy_data: temp_data
|
||||
});
|
||||
|
||||
// 总数
|
||||
// 总数、汇总
|
||||
var stock_total = 0;
|
||||
var kind_total = 0;
|
||||
var amount_money_total = 0;
|
||||
temp_data.goods_spec_data.forEach(item => {
|
||||
if(parseInt(temp_data.is_only_level_one || 0) == 1) {
|
||||
stock_total += parseInt(item.buy_number || 0);
|
||||
var temp_stock = parseInt(item.buy_number || 0);
|
||||
if(temp_stock > 0) {
|
||||
stock_total += temp_stock;
|
||||
kind_total += 1;
|
||||
amount_money_total += temp_stock*parseFloat(item.base.price);
|
||||
}
|
||||
} else {
|
||||
item.data.forEach(item2 => {
|
||||
stock_total += parseInt(item2.buy_number || 0);
|
||||
var temp_stock = parseInt(item2.buy_number || 0);
|
||||
if(temp_stock > 0) {
|
||||
stock_total += temp_stock;
|
||||
kind_total += 1;
|
||||
amount_money_total += temp_stock*parseFloat(item2.base.price);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// 设置数据
|
||||
this.setData({
|
||||
batchbuy_data: temp_data,
|
||||
base_data: {
|
||||
kind: kind_total,
|
||||
quantity: stock_total,
|
||||
amount_money: app.globalData.price_two_decimal(amount_money_total)
|
||||
}
|
||||
});
|
||||
|
||||
// 下单数据
|
||||
var goods_data = [];
|
||||
var goods_id = this.goods.id;
|
||||
|
|
@ -323,8 +366,8 @@
|
|||
}
|
||||
|
||||
// 操作类型
|
||||
switch (this.buy_event_type) {
|
||||
case 'buy':
|
||||
switch (e.currentTarget.dataset.type) {
|
||||
case 'plugins-batchbuy-button-buy':
|
||||
// 进入订单确认页面
|
||||
var data = {
|
||||
buy_type: "goods",
|
||||
|
|
@ -337,7 +380,7 @@
|
|||
break;
|
||||
|
||||
// 加入购物车
|
||||
case 'cart':
|
||||
case 'plugins-batchbuy-button-cart':
|
||||
this.goods_cart_event(goods_data);
|
||||
break;
|
||||
|
||||
|
|
@ -389,12 +432,13 @@
|
|||
<style>
|
||||
.plugins-batchbuy-container {
|
||||
height: 60vh;
|
||||
padding-bottom: 100rpx;;
|
||||
padding-bottom: 160rpx;
|
||||
}
|
||||
.plugins-batchbuy-container .left-nav {
|
||||
width: 200rpx;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: calc(100% - 160rpx);
|
||||
}
|
||||
.plugins-batchbuy-container .left-nav .badge-icon {
|
||||
top: 8rpx;
|
||||
|
|
@ -436,6 +480,19 @@
|
|||
}
|
||||
.plugins-batchbuy-container .confirm-submit {
|
||||
left: 0;
|
||||
bottom: 20rpx;
|
||||
bottom: 0;
|
||||
}
|
||||
.plugins-batchbuy-container .buy-nav-btn-number-0 .item,
|
||||
.plugins-batchbuy-container .buy-nav-btn-number-1 .item {
|
||||
width: 100% !important;
|
||||
}
|
||||
.plugins-batchbuy-container .buy-nav-btn-number-2 .item {
|
||||
width: 50% !important;
|
||||
}
|
||||
.plugins-batchbuy-container .buy-nav-btn-number-3 .item {
|
||||
width: 33.33% !important;
|
||||
}
|
||||
.plugins-batchbuy-container .buy-nav-btn-number-4 .item {
|
||||
width: 25% !important;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -627,16 +627,12 @@
|
|||
data['goods_id'] = this.goods.id;
|
||||
data['spec'] = JSON.stringify(spec);
|
||||
data['stock'] = this.buy_number;
|
||||
uni.showLoading({
|
||||
title: '处理中...'
|
||||
});
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url('save', 'cart'),
|
||||
method: 'POST',
|
||||
data: data,
|
||||
dataType: 'json',
|
||||
success: res => {
|
||||
uni.hideLoading();
|
||||
if (res.data.code == 0) {
|
||||
// 是否成功提示
|
||||
if(this.is_success_tips == 1) {
|
||||
|
|
@ -669,7 +665,6 @@
|
|||
}
|
||||
},
|
||||
fail: () => {
|
||||
uni.hideLoading();
|
||||
app.globalData.showToast('服务器请求出错');
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@
|
|||
is_first: 0,
|
||||
system: system,
|
||||
x: 12,
|
||||
y: height - 210
|
||||
y: height - 280
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
|
|
|
|||
1172
pages.json
1172
pages.json
File diff suppressed because it is too large
Load Diff
|
|
@ -23,13 +23,13 @@
|
|||
onShow() {
|
||||
// 数据加载
|
||||
if((this.$refs.cart || null) != null) {
|
||||
this.$refs.cart.init();
|
||||
this.$refs.cart.init('cart');
|
||||
}
|
||||
},
|
||||
|
||||
// 下拉刷新
|
||||
onPullDownRefresh() {
|
||||
this.$refs.cart.init();
|
||||
this.$refs.cart.init('cart');
|
||||
},
|
||||
|
||||
methods: {}
|
||||
|
|
|
|||
|
|
@ -778,7 +778,16 @@
|
|||
if(res === false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// 数据临时记录
|
||||
this.setData({
|
||||
temp_opt_data: {
|
||||
pos: e,
|
||||
goods: temp_goods,
|
||||
type: type,
|
||||
}
|
||||
});
|
||||
|
||||
// 操作类型
|
||||
if(res == 0) {
|
||||
this.cart_delete(temp_goods['id']);
|
||||
|
|
@ -855,9 +864,6 @@
|
|||
|
||||
// 购物车添加
|
||||
cart_save(goods_id, buy_number, spec = '') {
|
||||
uni.showLoading({
|
||||
title: '处理中...'
|
||||
});
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url('save', 'cart'),
|
||||
method: 'POST',
|
||||
|
|
@ -868,7 +874,6 @@
|
|||
},
|
||||
dataType: 'json',
|
||||
success: res => {
|
||||
uni.hideLoading();
|
||||
if (res.data.code == 0) {
|
||||
this.cart_para_curve_handle();
|
||||
this.get_cart_data();
|
||||
|
|
@ -879,7 +884,6 @@
|
|||
}
|
||||
},
|
||||
fail: () => {
|
||||
uni.hideLoading();
|
||||
app.globalData.showToast('服务器请求出错');
|
||||
}
|
||||
});
|
||||
|
|
@ -887,10 +891,6 @@
|
|||
|
||||
// 购物车更新
|
||||
cart_update(cart_id, goods_id, buy_number) {
|
||||
uni.showLoading({
|
||||
title: '处理中...',
|
||||
mask: true
|
||||
});
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url("stock", "cart"),
|
||||
method: 'POST',
|
||||
|
|
@ -901,7 +901,6 @@
|
|||
},
|
||||
dataType: 'json',
|
||||
success: res => {
|
||||
uni.hideLoading();
|
||||
if (res.data.code == 0) {
|
||||
this.cart_para_curve_handle();
|
||||
this.get_cart_data();
|
||||
|
|
@ -914,7 +913,6 @@
|
|||
}
|
||||
},
|
||||
fail: () => {
|
||||
uni.hideLoading();
|
||||
app.globalData.showToast('服务器请求出错');
|
||||
}
|
||||
});
|
||||
|
|
@ -922,10 +920,6 @@
|
|||
|
||||
// 购物车删除
|
||||
cart_delete(cart_id) {
|
||||
uni.showLoading({
|
||||
title: '处理中...',
|
||||
mask: true
|
||||
});
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url('delete', 'cart'),
|
||||
method: 'POST',
|
||||
|
|
@ -934,7 +928,6 @@
|
|||
},
|
||||
dataType: 'json',
|
||||
success: res => {
|
||||
uni.hideLoading();
|
||||
if (res.data.code == 0) {
|
||||
this.get_cart_data();
|
||||
} else {
|
||||
|
|
@ -946,7 +939,6 @@
|
|||
}
|
||||
},
|
||||
fail: () => {
|
||||
uni.hideLoading();
|
||||
app.globalData.showToast('服务器请求出错');
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1043,7 +1043,7 @@
|
|||
// 商品批量下单-加入购物车
|
||||
case 'plugins-batchbuy-button-cart' :
|
||||
if((this.$refs.goods_batch_buy || null) != null) {
|
||||
this.$refs.goods_batch_buy.init(this.goods, this.plugins_batchbuy_data, type.replace('plugins-batchbuy-button-', ''));
|
||||
this.$refs.goods_batch_buy.init(this.goods, this.plugins_batchbuy_data, this.buy_button);
|
||||
}
|
||||
break;
|
||||
// 默认
|
||||
|
|
|
|||
|
|
@ -40,15 +40,17 @@
|
|||
|
||||
<!-- 导航 -->
|
||||
<view class="nav-button bottom-fixed padding-main pr">
|
||||
<view class="left-price fl">
|
||||
<view v-if="data.estimate_discount_price != 0" class="pa single-text estimate-discount-price">
|
||||
<text class="discount-icon cr-white text-size-xs">节省</text>
|
||||
<text class="cr-green">{{currency_symbol}}{{data.estimate_discount_price}}</text>
|
||||
<view class="bottom-line-exclude oh">
|
||||
<view class="left-price fl">
|
||||
<view v-if="data.estimate_discount_price != 0" class="pa single-text estimate-discount-price">
|
||||
<text class="discount-icon cr-white text-size-xs">节省</text>
|
||||
<text class="cr-green">{{currency_symbol}}{{data.estimate_discount_price}}</text>
|
||||
</view>
|
||||
<view :class="'sales-price single-text margin-top-'+(data.estimate_discount_price == 0 ? 'sm' : 'xl')">{{currency_symbol}}{{data.estimate_price}}</view>
|
||||
</view>
|
||||
<view class="right-button fr tr">
|
||||
<button type="default" size="mini" class="bg-main br-main cr-white round dis-block text-size-sm" @tap="buy_event">立即购买</button>
|
||||
</view>
|
||||
<view :class="'sales-price single-text margin-top-'+(data.estimate_discount_price == 0 ? 'sm' : 'xl')">{{currency_symbol}}{{data.estimate_price}}</view>
|
||||
</view>
|
||||
<view class="right-button fr tr">
|
||||
<button type="default" size="mini" class="bg-main br-main cr-white round dis-block text-size-sm" @tap="buy_event">立即购买</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
|||
|
|
@ -713,7 +713,16 @@
|
|||
if(res === false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// 数据临时记录
|
||||
this.setData({
|
||||
temp_opt_data: {
|
||||
pos: e,
|
||||
goods: temp_goods,
|
||||
type: type,
|
||||
}
|
||||
});
|
||||
|
||||
// 操作类型
|
||||
if(res == 0) {
|
||||
this.cart_delete(temp_goods['id']);
|
||||
|
|
@ -815,9 +824,6 @@
|
|||
|
||||
// 购物车添加
|
||||
cart_save(goods_id, buy_number, spec = '') {
|
||||
uni.showLoading({
|
||||
title: '处理中...'
|
||||
});
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url('save', 'cart'),
|
||||
method: 'POST',
|
||||
|
|
@ -828,7 +834,6 @@
|
|||
},
|
||||
dataType: 'json',
|
||||
success: res => {
|
||||
uni.hideLoading();
|
||||
if (res.data.code == 0) {
|
||||
this.cart_para_curve_handle();
|
||||
this.get_cart_data();
|
||||
|
|
@ -839,7 +844,6 @@
|
|||
}
|
||||
},
|
||||
fail: () => {
|
||||
uni.hideLoading();
|
||||
app.globalData.showToast('服务器请求出错');
|
||||
}
|
||||
});
|
||||
|
|
@ -847,10 +851,6 @@
|
|||
|
||||
// 购物车更新
|
||||
cart_update(cart_id, goods_id, buy_number) {
|
||||
uni.showLoading({
|
||||
title: '处理中...',
|
||||
mask: true
|
||||
});
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url("stock", "cart"),
|
||||
method: 'POST',
|
||||
|
|
@ -861,7 +861,6 @@
|
|||
},
|
||||
dataType: 'json',
|
||||
success: res => {
|
||||
uni.hideLoading();
|
||||
if (res.data.code == 0) {
|
||||
this.cart_para_curve_handle();
|
||||
this.get_cart_data();
|
||||
|
|
@ -874,7 +873,6 @@
|
|||
}
|
||||
},
|
||||
fail: () => {
|
||||
uni.hideLoading();
|
||||
app.globalData.showToast('服务器请求出错');
|
||||
}
|
||||
});
|
||||
|
|
@ -882,10 +880,6 @@
|
|||
|
||||
// 购物车删除
|
||||
cart_delete(cart_id) {
|
||||
uni.showLoading({
|
||||
title: '处理中...',
|
||||
mask: true
|
||||
});
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url('delete', 'cart'),
|
||||
method: 'POST',
|
||||
|
|
@ -894,7 +888,6 @@
|
|||
},
|
||||
dataType: 'json',
|
||||
success: res => {
|
||||
uni.hideLoading();
|
||||
if (res.data.code == 0) {
|
||||
this.get_cart_data();
|
||||
} else {
|
||||
|
|
@ -906,7 +899,6 @@
|
|||
}
|
||||
},
|
||||
fail: () => {
|
||||
uni.hideLoading();
|
||||
app.globalData.showToast('服务器请求出错');
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue