mirror of
https://github.com/certd/certd.git
synced 2026-05-01 02:17:27 +08:00
fix: 修复用户管理添加用户无法上传头像的bug
This commit is contained in:
@@ -33,7 +33,7 @@ export default {
|
|||||||
async function onCreate() {
|
async function onCreate() {
|
||||||
await pluginStore.init();
|
await pluginStore.init();
|
||||||
options.value = pluginStore.group.getPreStepOutputOptions({
|
options.value = pluginStore.group.getPreStepOutputOptions({
|
||||||
pipeline: pipeline.value,
|
pipeline: pipeline?.value,
|
||||||
currentStageIndex: currentStageIndex.value,
|
currentStageIndex: currentStageIndex.value,
|
||||||
currentTaskIndex: currentTaskIndex.value,
|
currentTaskIndex: currentTaskIndex.value,
|
||||||
currentStepIndex: currentStepIndex.value,
|
currentStepIndex: currentStepIndex.value,
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ const userStore = useUserStore();
|
|||||||
const projectStore = useProjectStore();
|
const projectStore = useProjectStore();
|
||||||
async function emitValue(value: any) {
|
async function emitValue(value: any) {
|
||||||
// target.value = optionsDictRef.dataMap[value];
|
// target.value = optionsDictRef.dataMap[value];
|
||||||
if (pipeline.value) {
|
if (pipeline?.value) {
|
||||||
const userId = userStore.userInfo.id;
|
const userId = userStore.userInfo.id;
|
||||||
const isEnterprice = projectStore.isEnterprise;
|
const isEnterprice = projectStore.isEnterprise;
|
||||||
if (isEnterprice) {
|
if (isEnterprice) {
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ export default function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOpti
|
|||||||
width: "auto",
|
width: "auto",
|
||||||
},
|
},
|
||||||
buildUrl(key: string) {
|
buildUrl(key: string) {
|
||||||
return `api/basic/file/download?&key=` + key;
|
return `api/basic/file/download?token=${userStore.getToken}&key=` + key;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -188,7 +188,7 @@ export default function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOpti
|
|||||||
onReady: null,
|
onReady: null,
|
||||||
uploader: {
|
uploader: {
|
||||||
type: "form",
|
type: "form",
|
||||||
action: "/basic/file/upload",
|
action: "/basic/file/upload?token=" + userStore.getToken,
|
||||||
name: "file",
|
name: "file",
|
||||||
headers: {
|
headers: {
|
||||||
Authorization: "Bearer " + userStore.getToken,
|
Authorization: "Bearer " + userStore.getToken,
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
import { request } from "/src/api/service";
|
import { request } from "/src/api/service";
|
||||||
const apiPrefix = "/sys/site";
|
const apiPrefix = "/sys/site";
|
||||||
|
|
||||||
export async function SettingsGet(key: string) {
|
export async function SettingsGet() {
|
||||||
return await request({
|
return await request({
|
||||||
url: apiPrefix + "/get",
|
url: apiPrefix + "/get",
|
||||||
method: "post",
|
method: "post",
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ const onFinish = async (form: any) => {
|
|||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const uploaderConfig = ref({
|
const uploaderConfig = ref({
|
||||||
type: "form",
|
type: "form",
|
||||||
action: "/basic/file/upload",
|
action: "/basic/file/upload?token=" + userStore.getToken,
|
||||||
name: "file",
|
name: "file",
|
||||||
headers: {
|
headers: {
|
||||||
Authorization: "Bearer " + userStore.getToken,
|
Authorization: "Bearer " + userStore.getToken,
|
||||||
|
|||||||
Reference in New Issue
Block a user