Commit c9d434bc authored by yyh's avatar yyh

10603 状态码定制提示

parent 0690466c
......@@ -130,7 +130,7 @@ instance.interceptors.response.use(
return Promise.resolve(res.data.data);
} else {
tip(res.data.msg);
return Promise.reject(res.data.msg);
return Promise.reject(res.data);
}
// return Promise.resolve(res.data.data);
} else {
......
......@@ -134,9 +134,20 @@ export default class Recharge extends Vue {
});
}
private async recharge() {
try {
const { id } = await this.$api.order.add(this.selectedPlan.id, this.method);
this.confirm = true;
this.orderId = id;
} catch (err) {
if (err.code === 10603) {
this.$dialog.confirm({
title: '提示',
message: err.msg,
confirmButtonText: '确定',
cancelButtonText: '取消',
});
}
}
}
private async payHandler() {
const { protocol, host } = location;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment