refactor(xumu): 优化 API 请求参数传递方式
- 在 AppDeathAudit 和 AppOutAudit 组件中,修改了 getDetail 方法的 API 请求参数传递方式 - 从使用 params 参数改为直接传递对象,简化了请求参数的处理
This commit is contained in:
@@ -34,7 +34,7 @@ export default {
|
|||||||
},
|
},
|
||||||
getDetail() {
|
getDetail() {
|
||||||
const {id} = this.$route.query
|
const {id} = this.$route.query
|
||||||
return id && this.instance.post("/api/breed/death/getAuditPage", null, {params: {id}}).then(res => {
|
return id && this.instance.post("/api/breed/death/getAuditPage", {id}).then(res => {
|
||||||
if (res?.data) {
|
if (res?.data) {
|
||||||
const detail = res.data || {}
|
const detail = res.data || {}
|
||||||
if (detail.picture) {
|
if (detail.picture) {
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ export default {
|
|||||||
},
|
},
|
||||||
getDetail() {
|
getDetail() {
|
||||||
const {id} = this.$route.query
|
const {id} = this.$route.query
|
||||||
return id && this.instance.post("/api/breed/out/getAuditPage", null, {params: {id}}).then(res => {
|
return id && this.instance.post("/api/breed/out/getAuditPage", {id}).then(res => {
|
||||||
if (res?.data) {
|
if (res?.data) {
|
||||||
const detail = res.data
|
const detail = res.data
|
||||||
return this.detail = {...detail}
|
return this.detail = {...detail}
|
||||||
|
|||||||
Reference in New Issue
Block a user