Merge branch 'master' of http://git.luyuan.tk/luyuan/deming into xbx

This commit is contained in:
2020-08-07 11:41:03 +08:00
36 changed files with 391 additions and 259 deletions

View File

@@ -259,12 +259,13 @@ export default {
return vm.$u.post('Order/buyer_cancel', params);
},
// add_refund
refundOrder({ order_id, goods_id, refund_amount, refund_type = 1 } = {}) {
refundOrder({ order_id, goods_id, goods_num, reason_info, refund_amount } = {}) {
return vm.$u.post('order/add_refund', {
order_id: order_id,
goods_id: goods_id,
refund_amount: refund_amount,
refund_type: refund_type,
goods_num: goods_num,
reason_info: reason_info,
});
},
// 删除订单

View File

@@ -27,16 +27,32 @@ const install = (Vue, vm) => {
return res.data;
} else if(res.data.errCode == 401) {
// 假设201为token失效这里跳转登录
vm.$u.toast('验证失败,请重新登录');
setTimeout(() => {
// 此为uView的方法详见路由相关文档
vm.$u.route('/pageA/login/login')
}, 1500)
// vm.$u.toast('您还没有登录哦,请先去登录!');
if (res.data.action != "memberinfo") {
uni.showModal({
title: "温馨提示",
content: "您还未登录,请立即登录",
cancelText: "以后再说",
confirmText: "立即登录",
confirmColor: "#FF780F",
success(res) {
// console.log(res);
if (res.confirm) {
setTimeout(() => {
// 此为uView的方法详见路由相关文档
vm.$u.route('/pageA/login/login')
}, 500)
}
}
})
}
return false;
} else if (res.errCode == 1) {
console.log(res.message);
} else {
// 如果返回false则会调用Promise的reject回调
// 并将进入this.$u.post(url).then().catch(res=>{})的catch回调中res为服务端的返回值
return false;
return res;
}
}

View File

@@ -17,7 +17,8 @@ const store = new Vuex.Store({
groupbuyInfo: {}, // 秒杀详情
loadmore: {}, // 下拉加载返回的数据
hasLogin: false, // 登录状态
token: "" // 储存token
token: "", // 储存token
showLoginModel: false, // 登录框
},
getters: {
getOrderAddress(state) {