perf: 清理测试输出
This commit is contained in:
@@ -67,14 +67,14 @@ export const useUserStore = defineStore({
|
|||||||
/** 登入 */
|
/** 登入 */
|
||||||
async loginByUsername(data) {
|
async loginByUsername(data) {
|
||||||
console.info("```````````````````````````````````````````````");
|
console.info("```````````````````````````````````````````````");
|
||||||
console.info(data);
|
// console.info(data);
|
||||||
return new Promise<UserResult>((resolve, reject) => {
|
return new Promise<UserResult>((resolve, reject) => {
|
||||||
getLogin(data)
|
getLogin(data)
|
||||||
.then(data => {
|
.then(data => {
|
||||||
console.log("loginByUsername");
|
/* console.log("loginByUsername");
|
||||||
console.log(data.data);
|
console.log(data.data);
|
||||||
console.log(data.status);
|
console.log(data.status);
|
||||||
console.log(data);
|
console.log(data); */
|
||||||
//if (data?.success) setToken(data.data);
|
//if (data?.success) setToken(data.data);
|
||||||
// if(data?.status==200) setToken(data.data);
|
// if(data?.status==200) setToken(data.data);
|
||||||
if (data && data.status == 200) {
|
if (data && data.status == 200) {
|
||||||
|
|||||||
@@ -124,8 +124,8 @@ export function removeToken() {
|
|||||||
|
|
||||||
/** 格式化token(jwt格式) */
|
/** 格式化token(jwt格式) */
|
||||||
export const formatToken = (token: string): string => {
|
export const formatToken = (token: string): string => {
|
||||||
console.log("token", token);
|
/* console.log("token", token);
|
||||||
console.info("Bearer " + token);
|
console.info("Bearer " + token); */
|
||||||
return "Bearer " + token;
|
return "Bearer " + token;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ const getRoleList = async () => {
|
|||||||
const res = await request(authApi("getRoles"), {
|
const res = await request(authApi("getRoles"), {
|
||||||
method: "post"
|
method: "post"
|
||||||
});
|
});
|
||||||
console.info(res);
|
// console.info(res);
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
roleOptions.value = res.data.map(item => ({
|
roleOptions.value = res.data.map(item => ({
|
||||||
value: item.id,
|
value: item.id,
|
||||||
@@ -62,7 +62,6 @@ const getUserList = async () => {
|
|||||||
method: "post",
|
method: "post",
|
||||||
body: JSON.stringify(params)
|
body: JSON.stringify(params)
|
||||||
});
|
});
|
||||||
console.log(data);
|
|
||||||
|
|
||||||
if (data.status === 200) {
|
if (data.status === 200) {
|
||||||
tableData.value = data.data.rows;
|
tableData.value = data.data.rows;
|
||||||
|
|||||||
@@ -46,7 +46,6 @@ const getCompanyList = async () => {
|
|||||||
method: "POST",
|
method: "POST",
|
||||||
body: JSON.stringify(params)
|
body: JSON.stringify(params)
|
||||||
});
|
});
|
||||||
console.log(data);
|
|
||||||
|
|
||||||
/* tableData.value = data.data.records;
|
/* tableData.value = data.data.records;
|
||||||
total.value = data.data.total; */
|
total.value = data.data.total; */
|
||||||
|
|||||||
@@ -46,7 +46,6 @@ const getCompanyList = async () => {
|
|||||||
const res = await request(authApi("getCompanyPrimaryInfo"), {
|
const res = await request(authApi("getCompanyPrimaryInfo"), {
|
||||||
method: "post"
|
method: "post"
|
||||||
});
|
});
|
||||||
console.info(res);
|
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
companyOptions.value = res.data.map(item => ({
|
companyOptions.value = res.data.map(item => ({
|
||||||
value: item.id,
|
value: item.id,
|
||||||
@@ -66,7 +65,7 @@ const getRoleList = async () => {
|
|||||||
const res = await request(authApi("getRoles"), {
|
const res = await request(authApi("getRoles"), {
|
||||||
method: "post"
|
method: "post"
|
||||||
});
|
});
|
||||||
console.info(res);
|
// console.info(res);
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
roleOptions.value = res.data.map(item => ({
|
roleOptions.value = res.data.map(item => ({
|
||||||
value: item.id,
|
value: item.id,
|
||||||
@@ -87,7 +86,6 @@ const getUserList = async () => {
|
|||||||
method: "post",
|
method: "post",
|
||||||
body: JSON.stringify(params)
|
body: JSON.stringify(params)
|
||||||
});
|
});
|
||||||
console.log(data);
|
|
||||||
|
|
||||||
if (data.status === 200) {
|
if (data.status === 200) {
|
||||||
tableData.value = data.data.rows;
|
tableData.value = data.data.rows;
|
||||||
|
|||||||
@@ -44,7 +44,6 @@ const getRoleList = async () => {
|
|||||||
method: "POST",
|
method: "POST",
|
||||||
body: JSON.stringify(params)
|
body: JSON.stringify(params)
|
||||||
});
|
});
|
||||||
console.log(data);
|
|
||||||
|
|
||||||
/* tableData.value = data.data.records;
|
/* tableData.value = data.data.records;
|
||||||
total.value = data.data.total; */
|
total.value = data.data.total; */
|
||||||
|
|||||||
@@ -83,7 +83,6 @@ const getPurchaseSpendList = async () => {
|
|||||||
body: JSON.stringify(params)
|
body: JSON.stringify(params)
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log(data);
|
|
||||||
if (data.status === 200 && data.data != null) {
|
if (data.status === 200 && data.data != null) {
|
||||||
tableData.value = data.data.rows;
|
tableData.value = data.data.rows;
|
||||||
total.value = data.data.records;
|
total.value = data.data.records;
|
||||||
|
|||||||
Reference in New Issue
Block a user