feat(37需求): 登录页面和加载页面支持上传

This commit is contained in:
luying
2023-04-13 16:06:34 +08:00
parent d13e623084
commit 0899ac7773
6 changed files with 20 additions and 14 deletions

View File

@@ -15,7 +15,7 @@ const publishPath = '/root/hot_update_backup';
import {exec} from 'child_process'
import { reloadResources } from '@pubUtils/data';
import { decodeArrayStr } from '@pubUtils/util';
import { getLocalPopNoticeUrl, getLocalQrCodeUrl, getRemotePopNoticeUrl, getRemoteQrCodeUrl } from '@pubUtils/battleUtils';
import { getLocalImgUrl, getLocalQrCodeUrl, getRemoteImgUrl, getRemoteQrCodeUrl } from '@pubUtils/battleUtils';
const sendToWormhole = require('stream-wormhole');
export default class UploadController extends Controller {
@@ -293,10 +293,10 @@ public async uploadQrCode() {
let filenames = part.filename.split('.');
ext = filenames[filenames.length - 1];
if(type == 'popNotice') {
writePath = getLocalPopNoticeUrl(this.app.config.realEnv);
if(type == 'popNotice'|| type == 'loginPage' || type == 'loadingPage') {
writePath = getLocalImgUrl(this.app.config.realEnv, type);
fileName = `${moment().valueOf()}.${ext}`;
remoteUrl = getRemotePopNoticeUrl(this.app.config.realEnv, fileName);
remoteUrl = getRemoteImgUrl(this.app.config.realEnv, fileName, type);
} else {
writePath = getLocalQrCodeUrl(this.app.config.realEnv, env);
fileName = `QR${moment().valueOf()}.${ext}`;