From 8c7a34ceb886b7a237388bf9fcfce89cfce86b5a Mon Sep 17 00:00:00 2001 From: MO <448233645@qq.com> Date: Mon, 18 Sep 2023 16:25:57 +0800 Subject: [PATCH] 1 --- src/api/login.js | 5 +++-- src/views/info.vue | 6 +----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/api/login.js b/src/api/login.js index 95fbe1d5..8f447502 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -146,10 +146,11 @@ export function reqCheck(data) { // 获取详情 -export function getCodeValueo() { +export function getCodeValueo(query) { return request({ url: '/archives/packages/getByCodeValue', - method: 'get' + method: 'get', + params: query }) } diff --git a/src/views/info.vue b/src/views/info.vue index ad5bb57f..33821253 100644 --- a/src/views/info.vue +++ b/src/views/info.vue @@ -89,18 +89,14 @@ export default { }; }, created() { - console.log(location); this.getCodeValueo(); }, methods: { getCodeValueo() { - // const params = window.location.search.substring(1); const params = new URLSearchParams(location.search); const name = params.get("codeValue"); console.log(name); - getCodeValueo({ - codeValue: name, - }).then((response) => { + getCodeValueo({ codeValue: name }).then((response) => { this.form = response.data; }); },