Commit e4f09c60 by 李伟康

feat(axios): 增加返回全部数据配置项支持

在 axios 响应拦截器中新增 `returnAll` 配置选项,允许接口调用时通过设置该参数来决定是否直接返回完整响应数据。

fix(components): 调整 authPhoneDialog 关闭事件逻辑

移除 dialogClose 事件传递的 refreshFlag 参数,简化组件间通信逻辑。

feat(components): 添加 visible 监听以清空错误提示

当 authPhoneDialog 组件打开时自动清空手机号与短信验证码相关的错误提示信息。

fix(components): 修复 usageLimitDialog 显示时表单未重置问题

确保每次打开 usageLimitDialog 弹窗时都会重置编辑表单内容。

fix(message): 修改付款单重推选择提示文案

将“请选择要重推的明细”更正为“请选择要重推的付款单”,使提示信息更加准确。
1 parent 2310c1f3
...@@ -119,6 +119,7 @@ service.interceptors.response.use( ...@@ -119,6 +119,7 @@ service.interceptors.response.use(
// } // }
const dataAxios = response.data const dataAxios = response.data
const ruleResult = baseConfig.axios.result const ruleResult = baseConfig.axios.result
const returnAll = response.config.returnAll
// 这个状态码是和后端约定的 // 这个状态码是和后端约定的
// 有 code 代表这是一个后端接口 可以进行进一步的判断 // 有 code 代表这是一个后端接口 可以进行进一步的判断
var goBackArr = ["20", "21"] var goBackArr = ["20", "21"]
...@@ -132,6 +133,7 @@ service.interceptors.response.use( ...@@ -132,6 +133,7 @@ service.interceptors.response.use(
// return Promise.reject(new Error("登录超时,请重新登录")) // return Promise.reject(new Error("登录超时,请重新登录"))
// return Promise.reject(new Error(response.message || 'Error')) // return Promise.reject(new Error(response.message || 'Error'))
} }
if(returnAll) return dataAxios
const codeValue = dataAxios[ruleResult.code_key] || dataAxios.returnCode const codeValue = dataAxios[ruleResult.code_key] || dataAxios.returnCode
switch (+codeValue) { switch (+codeValue) {
case ruleResult.code_success_value: case ruleResult.code_success_value:
......
...@@ -65,7 +65,7 @@ export default { ...@@ -65,7 +65,7 @@ export default {
return this.visible return this.visible
}, },
set (val) { set (val) {
this.$emit('dialogClose', { flag: this.refreshFlag }) this.$emit('dialogClose')
} }
}, },
phoneText () { phoneText () {
...@@ -76,6 +76,20 @@ export default { ...@@ -76,6 +76,20 @@ export default {
return this.userInfo.loginAccount.phone return this.userInfo.loginAccount.phone
} }
}, },
watch: {
visible: {
handler (val) {
if (val) {
console.log(123)
this.phoneError = ''
this.smsError = ''
}
},
immediate: true,
deep: true
}
},
mounted () { mounted () {
}, },
data () { data () {
......
...@@ -95,6 +95,7 @@ export default { ...@@ -95,6 +95,7 @@ export default {
handler (val) { handler (val) {
if (val) { if (val) {
this.infoForm = this.$options.data.call(this).infoForm this.infoForm = this.$options.data.call(this).infoForm
this.$refs.editRef.resetFields()
} }
}, },
immediate: true, immediate: true,
......
...@@ -517,7 +517,7 @@ export default { ...@@ -517,7 +517,7 @@ export default {
if (!selectedData?.length) { if (!selectedData?.length) {
this.pushPayBillLoading = false this.pushPayBillLoading = false
this.$message({ this.$message({
message: "请选择要重推的明细", message: "请选择要重推的付款单",
type: "warning", type: "warning",
showClose: true showClose: true
}) })
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!