mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2026-08-06 19:07:25 +08:00
feat: 更新 API 请求参数与组件样式优化
- 在 account.js 和 member.js 中添加 loading 和 skipMessage 参数,提升 API 调用的用户体验。 - 在 ShowGoods.vue 中优化商品详情展示样式,增强可读性和交互性。 - 在 Cart.vue 中重构购物车商品列表结构,提升布局一致性。 - 在多个页面中修复了提示信息的内容,确保用户操作的清晰反馈。
This commit is contained in:
@@ -362,18 +362,36 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
normalizeWithdrawError (message) {
|
||||
if (!message) return '提现失败,请稍后重试';
|
||||
const text = String(message);
|
||||
if (text.includes('最少提现金额为1元')) {
|
||||
return '提现金额单次最少提现金额为1元';
|
||||
}
|
||||
const colonIndex = text.indexOf(':');
|
||||
if (colonIndex > -1 && colonIndex < text.length - 1) {
|
||||
return text.slice(colonIndex + 1).trim();
|
||||
}
|
||||
return text;
|
||||
},
|
||||
withdraw() {
|
||||
// 申请提现
|
||||
const price = Number(this.withdrawPrice);
|
||||
if (!price || price < 1) {
|
||||
this.$Message.error('提现金额单次最少提现金额为1元');
|
||||
return;
|
||||
}
|
||||
distCash({ price: this.withdrawPrice }).then((res) => {
|
||||
this.withdrawApplyModal = false;
|
||||
this.price = 0;
|
||||
if (res.success) {
|
||||
this.$Message.success("申请已提交,请等待审核");
|
||||
this.withdrawApplyModal = false;
|
||||
this.withdrawPrice = 0;
|
||||
this.$Message.success('申请已提交,请等待审核');
|
||||
this.distribution();
|
||||
this.getLog();
|
||||
} else {
|
||||
this.$Message.error(res.message);
|
||||
this.$Message.error(this.normalizeWithdrawError(res.message));
|
||||
}
|
||||
}).catch((err) => {
|
||||
this.$Message.error(this.normalizeWithdrawError(err?.message || err?.data?.message));
|
||||
});
|
||||
},
|
||||
qrcodeData(data64) {
|
||||
|
||||
Reference in New Issue
Block a user