feat: 🚀 token无感刷新

This commit is contained in:
2025-03-29 16:12:35 +08:00
parent e0f8d6c574
commit 2d7470c133
20 changed files with 32 additions and 27 deletions

View File

@@ -15,7 +15,7 @@
<el-input v-model="scope.row.sort" @blur="handleBlur(scope.row)" @input="handleInput(scope.row)"></el-input>
</template>
<template #image="scope">
<el-image :src="h + scope.row.image" style="width: 60px; height: 60px" />
<el-image :src="scope.row.image ? h + scope.row.image : ''" style="width: 60px; height: 60px" />
</template>
<template #operation="scope">

View File

@@ -13,7 +13,7 @@
:init-param="dataStore.initParam"
>
<template #image="scope">
<el-image :src="h + scope.row.image" style="width: 60px; height: 60px" />
<el-image :src="scope.row.image ? h + scope.row.image : ''" style="width: 60px; height: 60px" />
</template>
<template #enabled="scope">
<el-tag type="success" effect="dark">{{ scope.row.enabled === 1 ? "启用" : "禁用" }}</el-tag>

View File

@@ -9,7 +9,7 @@
:init-param="dataStore.initParam"
>
<template #image="scope">
<el-image :src="h + scope.row.image" style="width: 60px; height: 60px" />
<el-image :src="scope.row.image ? h + scope.row.image : ''" style="width: 60px; height: 60px" />
</template>
<template #status="scope">

View File

@@ -12,7 +12,7 @@
:init-param="dataStore.initParam"
>
<template #image="scope">
<el-image :src="h + scope.row.image" style="width: 60px; height: 60px" />
<el-image :src="scope.row.image ? h + scope.row.image : ''" style="width: 60px; height: 60px" />
</template>
<template #is_audited="scope">
<el-tag :type="scope.row.is_audited ? 'success' : 'danger'" effect="dark">{{

View File

@@ -12,7 +12,7 @@
:init-param="dataStore.initParam"
>
<template #image="scope">
<el-image :src="h + scope.row.image" style="width: 60px; height: 60px" />
<el-image :src="scope.row.image ? h + scope.row.image : ''" style="width: 60px; height: 60px" />
</template>
<template #status="scope">
<el-tag type="success" effect="dark">{{ scope.row.status }}</el-tag>

View File

@@ -12,7 +12,7 @@
:init-param="dataStore.initParam"
>
<template #image="scope">
<el-image :src="h + scope.row.image" style="width: 60px; height: 60px" />
<el-image :src="scope.row.image ? h + scope.row.image : ''" style="width: 60px; height: 60px" />
</template>
<template #sort="scope">
<el-input v-model="scope.row.sort" @blur="handleBlur(scope.row)" @input="handleInput(scope.row)"></el-input>

View File

@@ -12,7 +12,7 @@
:init-param="dataStore.initParam"
>
<template #image="scope">
<el-image :src="h + scope.row.image" style="width: 60px; height: 60px" />
<el-image :src="scope.row.image ? h + scope.row.image : ''" style="width: 60px; height: 60px" />
</template>
<template #status="scope">
<el-tag type="success" effect="dark">{{ scope.row.status }}</el-tag>

View File

@@ -12,7 +12,7 @@
:init-param="dataStore.initParam"
>
<template #image="scope">
<el-image :src="h + scope.row.image" style="width: 60px; height: 60px" />
<el-image :src="scope.row.image ? h + scope.row.image : ''" style="width: 60px; height: 60px" />
</template>
<template #status="scope">
<el-tag :type="scope.row.status === 1 ? 'success' : 'danger'" effect="dark">{{

View File

@@ -9,7 +9,7 @@
:init-param="dataStore.initParam"
>
<template #image="scope">
<el-image :src="h + scope.row.image" style="width: 60px; height: 60px" />
<el-image :src="scope.row.image ? h + scope.row.image : ''" style="width: 60px; height: 60px" />
</template>
<template #status="scope">
<el-tag type="danger" effect="dark">{{ scope.row.status ? "删除" : "删除" }}</el-tag>

View File

@@ -268,7 +268,7 @@ const setUserData = (data: any) => {
const { username, uid, token, avatar } = data;
console.log();
// 设置token
userStore.setToken(token);
userStore.setToken("Bearer" + " " + token);
userStore.setUid(uid);
userStore.setNickname(username);
userStore.setAvatar(avatar);

View File

@@ -14,9 +14,9 @@
:request-api="getProductBuypassListApi"
:init-param="dataStore.initParam"
>
<template #imgUrl="scope">
<el-image :src="scope.row.imgUrl" style="width: 60px; height: 60px" />
</template>
<!-- <template #imgUrl="scope">
<el-image :src="scope.row.imgUrl ? h + scope.row.imgUrl : ''" style="width: 60px; height: 60px" />
</template> -->
<template #status="scope">
<el-tag type="success" effect="dark">{{ scope.row.status }}</el-tag>
</template>

View File

@@ -12,7 +12,7 @@
:init-param="dataStore.initParam"
>
<template #cover_image="scope">
<el-image :src="h + scope.row.cover_image" style="width: 60px; height: 60px" />
<el-image :src="scope.row.cover_image ? h + scope.row.cover_image : ''" style="width: 60px; height: 60px" />
</template>
<template #status="scope">
<el-tag effect="dark" :type="scope.row.status === 1 ? 'success' : 'danger'">{{
@@ -59,9 +59,10 @@ import {
getProductListApi,
getProductUpOrShelvesApi,
getProductListSortApi,
getProductListExportApi
getProductListExportApi,
getProductCategoryListApi
} from "@/api/modules/productList";
import { getProductCategoryListApi } from "@/api/modules/productClass";
// import { getProductCategoryListApi } from "@/api/modules/productClass";
import { addLabelValue } from "./utils/common/addLabelValue";
//深拷贝方法
@@ -112,7 +113,7 @@ const getProductListSort = async (row: any) => {
//产品分类(后端大佬说直接掉列表接口)
const getProductCategoryList = async () => {
const result = await getProductCategoryListApi({ page: 1, size: 500 });
const result = await getProductCategoryListApi();
if (result?.code === 0) {
let dataClone: any = cloneDeep(result?.data);
dataStore.formData[2].options = addLabelValue(dataClone);

View File

@@ -9,7 +9,7 @@
:init-param="dataStore.initParam"
>
<template #image="scope">
<el-image :src="h + scope.row.image" style="width: 60px; height: 60px" />
<el-image :src="scope.row.image ? h + scope.row.image : ''" style="width: 60px; height: 60px" />
</template>
<template #status="scope">
<el-tag type="danger" effect="dark"> {{ scope.row.status === 1 ? "删除" : "删除" }}</el-tag>

View File

@@ -12,7 +12,7 @@
:init-param="dataStore.initParam"
>
<template #image="scope">
<el-image :src="h + scope.row.image" style="width: 60px; height: 60px" />
<el-image :src="scope.row.image ? h + scope.row.image : ''" style="width: 60px; height: 60px" />
</template>
<template #status="scope">
<el-tag type="success" effect="dark">{{ scope.row.status }}</el-tag>

View File

@@ -13,7 +13,7 @@
:init-param="dataStore.initParam"
>
<template #image="scope">
<el-image :src="h + scope.row.image" style="width: 60px; height: 60px" />
<el-image :src="scope.row.image ? h + scope.row.image : ''" style="width: 60px; height: 60px" />
</template>
<template #status="scope">
<el-tag :type="scope.row.status === 1 ? 'success' : 'danger'" effect="dark">{{

View File

@@ -9,7 +9,7 @@
:init-param="dataStore.initParam"
>
<template #image="scope">
<el-image :src="h + scope.row.image" style="width: 60px; height: 60px" />
<el-image :src="scope.row.image ? h + scope.row.image : ''" style="width: 60px; height: 60px" />
</template>
<template #status="scope">

View File

@@ -12,7 +12,7 @@
:init-param="dataStore.initParam"
>
<template #image="scope">
<el-image :src="h + scope.row.image" style="width: 60px; height: 60px" />
<el-image :src="scope.row.image ? h + scope.row.image : ''" style="width: 60px; height: 60px" />
</template>
<template #status="scope">
<el-tag type="success" effect="dark">{{ scope.row.status }}</el-tag>