计算购物车钱之前
This commit is contained in:
@@ -19,11 +19,10 @@ export default (params) => {
|
||||
// #ifdef MP-ALIPAY
|
||||
environment: 'alipay',
|
||||
// #endif
|
||||
token: uni.cache.get('token'),
|
||||
openId: uni.cache.get('miniAppOpenId'),
|
||||
id: uni.cache.get('userInfo').id,
|
||||
shopId: uni.cache.get('shopId'),
|
||||
userId: uni.cache.get('userInfo').id,
|
||||
token: uni.cache.get('token') || '',
|
||||
id: uni.cache.get('userInfo').id || '',
|
||||
shopId: uni.cache.get('shopId') || '',
|
||||
userId: uni.cache.get('userInfo').id || '',
|
||||
}
|
||||
if (toast) {
|
||||
uni.showLoading({
|
||||
@@ -41,10 +40,10 @@ export default (params) => {
|
||||
const res = response.data
|
||||
// 根据返回的状态码做出对应的操作
|
||||
//获取成功
|
||||
if (res.code == 0) {
|
||||
if (res.code == 200) {
|
||||
uni.hideLoading();
|
||||
uni.hideToast();
|
||||
resolve(res);
|
||||
resolve(res.data);
|
||||
} else {
|
||||
switch (res.code) {
|
||||
case '-4':
|
||||
|
||||
Reference in New Issue
Block a user