feat(fittingRoom): 实现衣服数据获取与tab切换功能
新增 fittingRoom 接口调用逻辑,支持根据 tab 类型加载对应衣服列表。 在 store 中增加 `clothes` 数据字段,并通过 `getCloths` 方法请求数据。页面组件中更新 tab 切换逻辑以触发数据刷新,并调整模板绑定方式。 添加 `tabsMap` 映射表用于匹配接口所需 clothType 参数。
This commit is contained in:
+17
-17
@@ -122,23 +122,23 @@ http.interceptors.response.use(
|
||||
response.config.custom.showLoading && closeLoading();
|
||||
|
||||
// 自定义处理【error 错误提示】:如果需要显示错误提示,则显示错误提示
|
||||
if (response.data.code !== 0) {
|
||||
// 特殊:如果 401 错误码,则跳转到登录页 or 刷新令牌
|
||||
if (response.data.code === 401) {
|
||||
return refreshToken(response.config);
|
||||
}
|
||||
// 特殊:处理分销用户绑定失败的提示
|
||||
if ((response.data.code + '').includes('1011007')) {
|
||||
console.error(`分销用户绑定失败,原因:${response.data.msg}`);
|
||||
} else if (response.config.custom.showError) {
|
||||
// 错误提示
|
||||
uni.showToast({
|
||||
title: response.data.msg || '服务器开小差啦,请稍后再试~',
|
||||
icon: 'none',
|
||||
mask: true,
|
||||
});
|
||||
}
|
||||
}
|
||||
// if (response.data.code !== 0) {
|
||||
// // 特殊:如果 401 错误码,则跳转到登录页 or 刷新令牌
|
||||
// if (response.data.code === 401) {
|
||||
// return refreshToken(response.config);
|
||||
// }
|
||||
// // 特殊:处理分销用户绑定失败的提示
|
||||
// if ((response.data.code + '').includes('1011007')) {
|
||||
// console.error(`分销用户绑定失败,原因:${response.data.msg}`);
|
||||
// } else if (response.config.custom.showError) {
|
||||
// // 错误提示
|
||||
// uni.showToast({
|
||||
// title: response.data.msg || '服务器开小差啦,请稍后再试~',
|
||||
// icon: 'none',
|
||||
// mask: true,
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
|
||||
// 自定义处理【showSuccess 成功提示】:如果需要显示成功提示,则显示成功提示
|
||||
if (
|
||||
|
||||
Reference in New Issue
Block a user