✨ feat(37需求): 登录页面和加载页面支持上传
This commit is contained in:
@@ -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}`;
|
||||
|
||||
Reference in New Issue
Block a user