Commit b2cc98e7 by haojie

1

parent 8d7fb418
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -30,8 +30,10 @@
"@types/uuid": "^9.0.0",
"@vitejs/plugin-vue": "^4.0.0",
"axios": "^0.24.0",
"express": "^4.18.2",
"http-proxy-middleware": "^2.0.6",
"less": "^4.1.1",
"node-html-parser": "^6.1.4",
"serve": "^14.2.0",
"terser": "^5.16.1",
"typescript": "^4.9.3",
"vite": "^4.0.0",
......
192.168.1.1:3000
\ No newline at end of file
const path = require('path');
const express = require('express');
const { createProxyMiddleware } = require('http-proxy-middleware');
// const history = require('connect-history-api-fallback');
const app = express();
// 处理单页应用路由
// app.use(history());
// 代理对象地址
// 读取本地配置的ip
app.use(
'/video',
createProxyMiddleware({
target: 'http://192.168.1.19:5000',
changeOrigin: true,
// pathRewrite: {
// '^api': '',
// },
})
);
// 加载静态资源
app.use(express.static('./dist'));
// 启动服务
app.listen(3001, () => {
console.log('success => http://localhost:3001');
});
......@@ -8,6 +8,7 @@ import { getUserCookie } from '@/utils/api/userApi';
import request from '@/utils/otherRequest';
import axios from 'axios';
import { v4 } from 'uuid';
import { xhr } from '@/utils/xhr';
export default defineComponent({
props: {
index: Number,
......@@ -103,12 +104,12 @@ export default defineComponent({
// return { name: 'FileName', url: response.url };
};
// 上传成功回调
const UploadSuccessCallback = (uuid: any) => {
const UploadSuccessCallback = (uuid: any, url: any) => {
// 关闭定时器
window.clearInterval(percentageInterval);
MessagePlugin.success('上传成功');
// 将将完整url传给父组件
Curfile.url = adminConfigUrl.value + 'video/' + uuid + '.mp4';
Curfile.url = url;
// 成功2
Curfile.status = 2;
emit('UploadVideo', props.index, Curfile.url);
......@@ -131,19 +132,26 @@ export default defineComponent({
// 上传中状态
Curfile.status = 1;
let url = '';
if (import.meta.env.MODE != 'development') {
if (import.meta.env.MODE == 'production') {
// 线上地址使用完整url
url = `http://192.168.1.19:5000/video/` + uuid + '.mp4';
url = adminConfigUrl.value + 'video/' + uuid + '.mp4';
// url = `http://192.168.1.19:5000/video/` + uuid + '.mp4';
} else if (import.meta.env.MODE == 'app') {
// app
url = '/video/' + uuid + '.mp4';
} else {
// 本地
url = '/video/' + uuid + '.mp4';
}
const timer = setTimeout(() => {
let http = xhr();
// 中断上传
const CancelToken = axios.CancelToken;
request.put(url, file[0].raw).then((res: any) => {
// resolve 参数为关键代码
if (res == 201) {
UploadSuccessCallback(uuid);
if (res == 200) {
let url = adminConfigUrl.value + 'video/' + uuid + '.mp4';
UploadSuccessCallback(uuid, url);
resolve({
status: 'success',
response: { url: Curfile.url },
......@@ -152,6 +160,17 @@ export default defineComponent({
UploadErrorCallback();
}
});
// http.request(
// 'post',
// url,
// file[0].raw,
// function (res: any) {
// console.log(res);
// },
// function (err: any) {
// console.log(err);
// }
// );
}, 1000);
});
};
......@@ -192,7 +211,9 @@ export default defineComponent({
.then((res: any) => {
// resolve 参数为关键代码
if (res == 200) {
UploadSuccessCallback(uuid);
// 外网url
let url = config.domain + 'video/' + uuid + '.mp4';
UploadSuccessCallback(uuid, url);
resolve({
status: 'success',
response: { url: Curfile.url },
......@@ -205,6 +226,10 @@ export default defineComponent({
});
};
const requestSuccessMethod = async (file: any) => {
// 上传前将文件名放入textarea
let text = file[0].name.replace('.mp4', '');
textValue.value = text;
textareaChange(text);
if (uploadStrategy.value.oss) {
// 外网
return ExtranetUpload(file, uploadStrategy.value.config);
......
......@@ -13,14 +13,11 @@ export default defineComponent({
const userAccount = computed(() => store.getters['user/getAccount']);
const getList = async () => {
try {
if (!userAccount.value) {
return;
}
loading.value = true;
let res: any = await getSubmitTableList({
limit: pageSize.value,
page: pageNum.value,
account_id: userAccount.value,
account_id: userAccount.value ? userAccount.value : undefined,
});
if (res.code == 0) {
res.data.data.forEach((item: any) => {
......@@ -38,10 +35,8 @@ export default defineComponent({
watch(
() => userAccount.value,
(v) => {
if (v) {
pageNum.value = 1;
getList();
}
pageNum.value = 1;
getList();
}
);
watch(
......
......@@ -5,16 +5,17 @@ import router from '@/router';
const mode = import.meta.env.MODE;
const getBaseUrl = () => {
if (mode == 'app') {
return 'https://silkr.net';
return 'http://video_publish.test';
} else {
return undefined;
// 打包
return '';
}
};
const instance = axios.create({
baseURL: getBaseUrl(),
timeout: 60000,
// withCredentials: mode == 'development' ? false : true,
withCredentials: true,
withCredentials: mode == 'app' ? false : true,
});
// 请求头
instance.interceptors.request.use((config: any) => {
......
export function updateProgress(event: any) {
if (event.lengthComputable) {
var percentComplete = event.loaded / event.total;
}
}
export function xhr() {
var xhr = new XMLHttpRequest();
return {
request: (method: any, url: any, data: any, success: any, err: any) => {
xhr.open(method, url);
xhr.onprogress = updateProgress;
xhr.upload.onprogress = updateProgress;
if (method == 'GET') {
xhr.send();
} else {
xhr.setRequestHeader(
'Content-Type',
'application/x-www-form-urlencoded'
);
// xhr.setRequestHeader('test', 'test');
// xhr.setRequestHeader('Host', '192.168.1.1:5000');
// xhr.setRequestHeader('Origin', 'http://192.168.1.1:5000');
// xhr.setRequestHeader('Referer', 'http://192.168.1.1:5000/upload');
// 声明请求源
xhr.setRequestHeader('Origin', 'http://a.example.com');
xhr.send(data);
}
xhr.onreadystatechange = function () {
if (xhr.readyState === 4 && xhr.status === 200) {
success(xhr.responseText);
} else {
err();
}
};
},
};
}
import{d as e,r as a,o as t,e as l,Q as s,I as o,S as u,H as n,J as c,K as i,b as r,l as d,w as p,j as v,B as m}from"./vue-f8fdfec2.js";import{C as h,b as g,M as f,c as w,g as b,d as x,e as V}from"./index-dae4a232.js";import{A as y}from"./Animation-f85aa7e2.js";const U=e({props:{modelValue:String},emits:["update:modelValue"],setup(e,{emit:n}){const c=u(),i=a([]),r=a(""),d=({value:e,e:a})=>{},p=({value:e,e:a})=>{},v=e=>{c.commit("user/setUserChoseAccount",e)},m=({value:e,e:a,inputValue:t})=>{},g=()=>{const{modelValue:a}=e;n("update:modelValue","upload"==a?"table":"upload")};return t((()=>{(async()=>{try{let e=await h();0==e.code&&e.data.length&&(e.data.forEach((e=>{e.label=e.name+"-"+e.region,e.value=e.account_id})),i.value=e.data)}catch(e){}})()})),()=>l("div",{class:"custom-chose-account"},[l("div",{class:"chose-account-left"},[l("div",{class:"chose-account-title"},[s("选择账户")]),l(o("t-select"),{class:"chose-account-select",modelValue:r.value,"onUpdate:modelValue":e=>r.value=e,placeholder:"选择一个账户",options:i.value,style:"width: 200px; display: inline-block;",filterable:!0,onblur:d,onfocus:p,onenter:m,onChange:v},null)]),l("div",{class:"choose-account-right"},[l(o("t-button"),{onClick:g},{default:()=>["upload"==e.modelValue?"发布记录":"发布视频"]})])])}}),C={width:"17",height:"16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},A=[i("path",{d:"M1.243 3.888a1.926 1.926 0 0 1-.448-.655A1.928 1.928 0 0 1 .64 2.49c0-.248.052-.496.155-.744.103-.248.252-.466.448-.655.206-.198.435-.345.687-.439.252-.094.507-.141.764-.141a2.133 2.133 0 0 1 1.452.58l4.34 4.182 4.339-4.182c.206-.198.435-.345.687-.439.252-.094.507-.141.764-.141a2.134 2.134 0 0 1 1.452.58c.206.199.358.42.456.662.097.244.146.49.146.737 0 .248-.049.494-.146.737-.098.243-.25.464-.456.662l-4.34 4.182 4.34 4.182c.206.198.358.42.456.662.097.243.146.489.146.737s-.049.493-.146.736a2.013 2.013 0 0 1-1.135 1.094c-.258.1-.515.15-.773.15a2.17 2.17 0 0 1-.764-.142 1.988 1.988 0 0 1-.687-.44l-4.34-4.181-4.34 4.182a2.132 2.132 0 0 1-1.452.58 2.17 2.17 0 0 1-.763-.141 1.988 1.988 0 0 1-.687-.44 1.873 1.873 0 0 1-.603-1.398c0-.546.201-1.012.603-1.4l4.34-4.181-4.34-4.182Z",fill:"#FD1753"},null,-1),i("path",{d:"M1.243 3.888a1.926 1.926 0 0 1-.448-.655A1.928 1.928 0 0 1 .64 2.49c0-.248.052-.496.155-.744.103-.248.252-.466.448-.655.206-.198.435-.345.687-.439.252-.094.507-.141.764-.141a2.133 2.133 0 0 1 1.452.58l4.34 4.182 4.339-4.182c.206-.198.435-.345.687-.439.252-.094.507-.141.764-.141a2.134 2.134 0 0 1 1.452.58c.206.199.358.42.456.662.097.244.146.49.146.737 0 .248-.049.494-.146.737-.098.243-.25.464-.456.662l-4.34 4.182 4.34 4.182c.206.198.358.42.456.662.097.243.146.489.146.737s-.049.493-.146.736a2.013 2.013 0 0 1-1.135 1.094c-.258.1-.515.15-.773.15a2.17 2.17 0 0 1-.764-.142 1.988 1.988 0 0 1-.687-.44l-4.34-4.181-4.34 4.182a2.132 2.132 0 0 1-1.452.58 2.17 2.17 0 0 1-.763-.141 1.988 1.988 0 0 1-.687-.44 1.873 1.873 0 0 1-.603-1.398c0-.546.201-1.012.603-1.4l4.34-4.181-4.34-4.182Z",fill:"#616161"},null,-1)];const k={render:function(e,a){return n(),c("svg",C,A)}},S={width:"40",height:"30",fill:"none",xmlns:"http://www.w3.org/2000/svg"},D=[i("path",{d:"M22.125 20.833v4.584h8.333c2.917-.417 5.209-3.125 5.209-6.25 0-3.542-2.709-6.25-6.25-6.25-.834 0-1.459.208-2.084.416v-.416c0-4.584-3.75-8.334-8.333-8.334s-8.333 3.75-8.333 8.334c0 .833.208 1.458.208 2.291C10.458 15 10.042 15 9.625 15c-2.917 0-5.208 2.292-5.208 5.208 0 2.917 2.291 5.209 5.208 5.209h8.333v-4.584l-2.291 2.292-2.917-2.917 7.292-7.291 7.291 7.291-2.916 2.917-2.292-2.292Zm0 4.584v4.166h-4.167v-4.166h-2.083v4.166h-6.25A9.336 9.336 0 0 1 .25 20.208c0-4.166 2.708-7.708 6.25-8.958C7.333 5.208 12.542.417 19 .417c5.417 0 10.208 3.541 11.875 8.333 5 .625 8.958 5 8.958 10.417 0 5.416-4.166 9.791-9.375 10.416h-6.25v-4.166h-2.083Z",fill:"#999"},null,-1),i("path",{d:"M22.125 20.833v4.584h8.333c2.917-.417 5.209-3.125 5.209-6.25 0-3.542-2.709-6.25-6.25-6.25-.834 0-1.459.208-2.084.416v-.416c0-4.584-3.75-8.334-8.333-8.334s-8.333 3.75-8.333 8.334c0 .833.208 1.458.208 2.291C10.458 15 10.042 15 9.625 15c-2.917 0-5.208 2.292-5.208 5.208 0 2.917 2.291 5.209 5.208 5.209h8.333v-4.584l-2.291 2.292-2.917-2.917 7.292-7.291 7.291 7.291-2.916 2.917-2.292-2.292Zm0 4.584v4.166h-4.167v-4.166h-2.083v4.166h-6.25A9.336 9.336 0 0 1 .25 20.208c0-4.166 2.708-7.708 6.25-8.958C7.333 5.208 12.542.417 19 .417c5.417 0 10.208 3.541 11.875 8.333 5 .625 8.958 5 8.958 10.417 0 5.416-4.166 9.791-9.375 10.416h-6.25v-4.166h-2.083Z",fill:"#999"},null,-1)];const _={render:function(e,a){return n(),c("svg",S,D)}},I=g.create({timeout:6e4,withCredentials:!1});let T;I.interceptors.request.use((e=>e)),I.defaults.timeout=6e4,I.interceptors.response.use((e=>{const{data:a,status:t}=e;return 201==t||200==t?t:0===a.code?a:(f.error(a.msg||"请求错误"),Promise.reject(a.msg))}),(e=>{if("response"in e){const{message:a,status_code:t}=e.response.data;return 403==t?void w.replace({path:"/"}):(f.error(a||"请求错误"),e.response)}}));const M=new Uint8Array(16);function Z(){if(!T&&(T="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!T))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return T(M)}const j=[];for(let N=0;N<256;++N)j.push((N+256).toString(16).slice(1));const K={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function R(e,a,t){if(K.randomUUID&&!a&&!e)return K.randomUUID();const l=(e=e||{}).random||(e.rng||Z)();if(l[6]=15&l[6]|64,l[8]=63&l[8]|128,a){t=t||0;for(let e=0;e<16;++e)a[t+e]=l[e];return a}return function(e,a=0){return(j[e[a+0]]+j[e[a+1]]+j[e[a+2]]+j[e[a+3]]+"-"+j[e[a+4]]+j[e[a+5]]+"-"+j[e[a+6]]+j[e[a+7]]+"-"+j[e[a+8]]+j[e[a+9]]+"-"+j[e[a+10]]+j[e[a+11]]+j[e[a+12]]+j[e[a+13]]+j[e[a+14]]+j[e[a+15]]).toLowerCase()}(l)}const z=e({props:{index:Number},emits:["DeleteUploadBox","TextareaChange","SubmitVideo","UploadVideo"],setup(e,{emit:t}){const n=u(),c=r((()=>n.getters["user/getAccount"])),i=r((()=>n.getters["user/getadminConfig"])),p=r((()=>n.getters["user/getuploadStrategy"]));let v="";const m=a([]),h=d({url:"",status:0}),w=a(""),x=a(""),V=a(0);let y=null;const U=()=>{const{index:a}=e;return 0==a?"":l("span",{class:"real-upload-close-icon",onClick:C},[l(k,null,null)])},C=()=>{t("DeleteUploadBox",e.index)},A=a=>{t("TextareaChange",e.index,a)},S=()=>{w.value="",A(w.value),h.url="",h.status=0,t("UploadVideo",e.index,h.url)},D=()=>{V.value=0,y=setInterval((()=>{99!=V.value&&(V.value+=1)}),100)},T=e=>c.value?!!i.value||(f.warning("后台配置链接为空"),!1):(f.warning("请先选择一个账户"),!1),M=({file:e})=>{f.error(`文件 ${e.name} 上传失败`)},Z=(e,a)=>{},j=a=>{window.clearInterval(y),f.success("上传成功"),h.url=i.value+"video/"+a+".mp4",h.status=2,t("UploadVideo",e.index,h.url)},K=()=>{window.clearInterval(y),h.url="",h.status=0,t("UploadVideo",e.index,h.url),f.warning("上传失败")},z=async e=>p.value.oss?((e,a)=>(D(),new Promise((a=>{let t=R();h.status=1;let l="";const{config:s}=p.value;l="https://"+s.host,setTimeout((()=>{let o=new FormData;o.append("key",s.dir+t+".mp4"),o.append("policy",s.policy),o.append("OSSAccessKeyId",s.accessid),o.append("success_action_status","200"),o.append("callback",s.callback),o.append("signature",s.signature),o.append("file",e[0].raw),I.post(l,o,{headers:{"Content-Type":"multipart/form-data;charset=utf-8"}}).then((e=>{200==e?(j(t),a({status:"success",response:{url:h.url}})):K()}))}),1e3)}))))(e,p.value.config):(e=>(D(),new Promise((a=>{let t=R();h.status=1;let l="";l="http://192.168.1.19:5000/video/"+t+".mp4",setTimeout((()=>{const s=g.CancelToken;I.put(l,e[0].raw,{cancelToken:new s((function(e){}))}).then((e=>{201==e?(j(t),a({status:"success",response:{url:h.url}})):K()}))}),1e3)}))))(e),B=()=>0==h.status?l(o("t-upload"),{modelValue:m.value,"onUpdate:modelValue":e=>m.value=e,method:"PUT",requestMethod:z,action:x.value,headers:{authorization:`Bearer ${b()}`},tips:v,accept:"video",theme:"custom","before-upload":T,multiple:!0,max:1,draggable:!0,formatResponse:Z,onfail:M,onsuccess:v=""},{default:()=>[l("div",{class:"custom-upload-click-box"},[l("div",{class:"title"},[s("选择视频")]),l("div",{class:"title2"},[s("或拖视频到此处上传")]),l("div",null,[l(_,null,null)]),l(o("t-button"),{class:"custom-chose-file"},{default:()=>[s("选择文件")]})])]}):1==h.status?l("div",{class:"custom-uploading-stauts"},[l(o("t-progress"),{theme:"circle",percentage:V.value,size:"small"},null),l("div",{class:"uploading-title"},[s("正在上传")])]):l("div",{class:"custom-UploadSuccess-stauts"},[l("div",{class:"title1"},[s("上传完成")]),l("div",{class:"title1"},[s("点击下方发布按钮发布视频")])]),H=()=>{t("SubmitVideo",e.index)};return()=>l("div",{class:"custom-real-upload"},[U(),l("div",{class:"real-upload-content"},[l("div",{class:"upload-textarea"},[l(o("t-textarea"),{placeholder:"请输入内容",autosize:{minRows:3,maxRows:5},modelValue:w.value,"onUpdate:modelValue":e=>w.value=e,onChange:A},null)]),l("div",{class:"custom-real-upload-component"},[B()])]),l("div",{class:"custom-real-upload-footer"},[l(o("t-button"),{onClick:H,class:["submit",h.url&&w.value?"active":""]},{default:()=>[s("发布")]}),l(o("t-button"),{class:"reset-button",onClick:S},{default:()=>[s("重置")]})])])}}),B={width:"24",height:"24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},H=[i("path",{d:"M21.1 9.375c.317 0 .62.063.912.188.292.124.542.291.75.5.209.208.375.458.5.75.125.291.188.595.188.912 0 .333-.063.642-.188.925-.125.283-.291.53-.5.737a2.364 2.364 0 0 1-.75.5 2.293 2.293 0 0 1-.912.188h-7.025V21.1c0 .333-.063.642-.188.925-.125.283-.291.53-.5.738a2.364 2.364 0 0 1-.75.5 2.293 2.293 0 0 1-.912.187c-.333 0-.642-.063-.925-.188a2.404 2.404 0 0 1-.738-.5 2.403 2.403 0 0 1-.5-.737 2.266 2.266 0 0 1-.187-.925v-7.025H2.35c-.333 0-.642-.063-.925-.188a2.404 2.404 0 0 1-.738-.5 2.403 2.403 0 0 1-.5-.737A2.266 2.266 0 0 1 0 11.725c0-.317.063-.62.188-.912.124-.292.291-.542.5-.75.208-.209.454-.376.737-.5.283-.126.592-.188.925-.188h7.025V2.35c0-.317.063-.62.188-.913.124-.291.291-.541.5-.75.208-.208.454-.375.737-.5.283-.124.592-.187.925-.187.65 0 1.204.23 1.662.688.459.458.688 1.012.688 1.662v7.025H21.1Z",fill:"#FD1753"},null,-1),i("path",{d:"M21.1 9.375c.317 0 .62.063.912.188.292.124.542.291.75.5.209.208.375.458.5.75.125.291.188.595.188.912 0 .333-.063.642-.188.925-.125.283-.291.53-.5.737a2.364 2.364 0 0 1-.75.5 2.293 2.293 0 0 1-.912.188h-7.025V21.1c0 .333-.063.642-.188.925-.125.283-.291.53-.5.738a2.364 2.364 0 0 1-.75.5 2.293 2.293 0 0 1-.912.187c-.333 0-.642-.063-.925-.188a2.404 2.404 0 0 1-.738-.5 2.403 2.403 0 0 1-.5-.737 2.266 2.266 0 0 1-.187-.925v-7.025H2.35c-.333 0-.642-.063-.925-.188a2.404 2.404 0 0 1-.738-.5 2.403 2.403 0 0 1-.5-.737A2.266 2.266 0 0 1 0 11.725c0-.317.063-.62.188-.912.124-.292.291-.542.5-.75.208-.209.454-.376.737-.5.283-.126.592-.188.925-.188h7.025V2.35c0-.317.063-.62.188-.913.124-.291.291-.541.5-.75.208-.208.454-.375.737-.5.283-.124.592-.187.925-.187.65 0 1.204.23 1.662.688.459.458.688 1.012.688 1.662v7.025H21.1Z",fill:"#FD1753"},null,-1)];const F={render:function(e,a){return n(),c("svg",B,H)}},P=e({setup(e){const s=u(),n=a([]),c=a(1),i=a(10),d=a(0),v=a(!1),m=r((()=>s.getters["user/getAccount"])),h=async()=>{try{if(!m.value)return;v.value=!0;let e=await x({limit:i.value,page:c.value,account_id:m.value});0==e.code&&(e.data.data.forEach((e=>{e.n_title=e.parameters.title})),n.value=e.data.data,d.value=e.data.total),v.value=!1}catch(e){v.value=!1}};p((()=>m.value),(e=>{e&&(c.value=1,h())})),p((()=>i.value),(e=>{h()})),t((()=>{h()}));const g=e=>{h()},f=[{title:"账号",colKey:"account_name"},{title:"内容",colKey:"n_title"},{title:"发布",colKey:"status_label"},{title:"发布时间",colKey:"publish_time"}];return()=>l("div",{class:"custom-submit-table"},[l(o("t-table"),{data:n.value,"row-key":"index",columns:f,hover:!0,ShowJumper:!0,loading:v.value},null),l("div",{class:"custom-pagination-box"},[l(o("t-pagination"),{pageNum:c.value,"onUpdate:pageNum":e=>c.value=e,pageSize:i.value,"onUpdate:pageSize":e=>i.value=e,total:d.value,onCurrentChange:g},null)])])}}),E=e({setup(){const e=u(),o=r((()=>e.getters["user/getAccount"])),n=r((()=>e.getters["user/getadminConfig"])),c=a(!1);t((()=>{e.dispatch("user/AdminConfig")}));const i=a([{textValue:"",files:""}]),d=a("upload");let p={textValue:"",files:""};const h=()=>{i.value.push(p)},g=e=>{i.value.splice(e,1)},w=(e,a)=>{i.value[e].files=a},b=(e,a)=>{i.value[e].textValue=a},x=async e=>{try{if(!(n.value&&o.value&&i.value[e].files&&i.value[e].textValue))return;let a={video_url:i.value[e].files,title:i.value[e].textValue};c.value=!0,0==(await V({account_id:o.value,parameters:[a]})).code?f.success("发布成功"):f.success("发布失败"),c.value=!1}catch(a){c.value=!1}};return()=>l("div",{class:"custom-upload-page narrow-scrollbar"},[l("div",{class:"custom-upload-page-child"},[l(U,{modelValue:d.value,"onUpdate:modelValue":e=>d.value=e},null),v(l("div",null,[l("div",{class:"custom-upload-box"},[l("span",{class:"custom-upload-title"},[s("上传视频")]),i.value.map(((e,a)=>l(z,{index:a,onDeleteUploadBox:g,onTextareaChange:b,onSubmitVideo:x,onUploadVideo:w},null)))]),l("div",{class:"custom-add-new-upload",onClick:h},[l(F,null,null),l("span",null,[s("新添新上传视频")])])]),[[m,"upload"==d.value]]),"upload"!=d.value?l(P,null,null):""]),v(l(y,{poistion:"fixed",background:"rgba(200,200,200,0.2)"},null),[[m,c.value]])])}});export{E as default};
import{d as a,J as t,K as l,U as s,V as e,H as o,W as i,X as d}from"./vue-f8fdfec2.js";import{a as u}from"./index-dae4a232.js";const n=a=>(i("data-v-60ab0cfe"),a=a(),d(),a),p=[n((()=>l("div",null,null,-1))),n((()=>l("div",null,null,-1))),n((()=>l("div",null,null,-1)))],b=u(a({__name:"Animation",props:{background:{default:""},position:{default:"absolute"},width:{default:"100%"},left:{default:"0px"},height:{default:"100%"},top:{default:"0px"},isTable:{type:Boolean,default:!1}},setup:a=>(i,d)=>(o(),t("div",{class:s(["custom-loading-box",{"custom-is-table-box":!a.isTable}]),style:e({width:a.width,height:a.height,background:a.background,position:a.position})},[l("div",{class:s(["ball-beat",{"custom-is-table-child":!a.isTable}]),style:e({top:a.top,left:a.left})},p,6)],6))}),[["__scopeId","data-v-60ab0cfe"]]);export{b as A};
import{d as a,J as t,K as l,U as s,V as e,H as o,W as i,X as d}from"./vue-f8fdfec2.js";import{a as u}from"./index-06b4a16d.js";const n=a=>(i("data-v-60ab0cfe"),a=a(),d(),a),p=[n((()=>l("div",null,null,-1))),n((()=>l("div",null,null,-1))),n((()=>l("div",null,null,-1)))],b=u(a({__name:"Animation",props:{background:{default:""},position:{default:"absolute"},width:{default:"100%"},left:{default:"0px"},height:{default:"100%"},top:{default:"0px"},isTable:{type:Boolean,default:!1}},setup:a=>(i,d)=>(o(),t("div",{class:s(["custom-loading-box",{"custom-is-table-box":!a.isTable}]),style:e({width:a.width,height:a.height,background:a.background,position:a.position})},[l("div",{class:s(["ball-beat",{"custom-is-table-child":!a.isTable}]),style:e({top:a.top,left:a.left})},p,6)],6))}),[["__scopeId","data-v-60ab0cfe"]]);export{b as A};
System.register(["./vue-legacy-3fa9a658.js","./index-legacy-87ce98c4.js"],(function(t,e){"use strict";var l,a,i,s,o,u,d,n,c;return{setters:[t=>{l=t.d,a=t.J,i=t.K,s=t.U,o=t.V,u=t.H,d=t.W,n=t.X},t=>{c=t.a}],execute:function(){const e=t=>(d("data-v-60ab0cfe"),t=t(),n(),t),b=[e((()=>i("div",null,null,-1))),e((()=>i("div",null,null,-1))),e((()=>i("div",null,null,-1)))],f=l({__name:"Animation",props:{background:{default:""},position:{default:"absolute"},width:{default:"100%"},left:{default:"0px"},height:{default:"100%"},top:{default:"0px"},isTable:{type:Boolean,default:!1}},setup:t=>(e,l)=>(u(),a("div",{class:s(["custom-loading-box",{"custom-is-table-box":!t.isTable}]),style:o({width:t.width,height:t.height,background:t.background,position:t.position})},[i("div",{class:s(["ball-beat",{"custom-is-table-child":!t.isTable}]),style:o({top:t.top,left:t.left})},b,6)],6))});t("A",c(f,[["__scopeId","data-v-60ab0cfe"]]))}}}));
System.register(["./vue-legacy-3fa9a658.js","./index-legacy-01b3f2d3.js"],(function(t,e){"use strict";var l,a,i,s,o,u,d,n,c;return{setters:[t=>{l=t.d,a=t.J,i=t.K,s=t.U,o=t.V,u=t.H,d=t.W,n=t.X},t=>{c=t.a}],execute:function(){const e=t=>(d("data-v-60ab0cfe"),t=t(),n(),t),b=[e((()=>i("div",null,null,-1))),e((()=>i("div",null,null,-1))),e((()=>i("div",null,null,-1)))],f=l({__name:"Animation",props:{background:{default:""},position:{default:"absolute"},width:{default:"100%"},left:{default:"0px"},height:{default:"100%"},top:{default:"0px"},isTable:{type:Boolean,default:!1}},setup:t=>(e,l)=>(u(),a("div",{class:s(["custom-loading-box",{"custom-is-table-box":!t.isTable}]),style:o({width:t.width,height:t.height,background:t.background,position:t.position})},[i("div",{class:s(["ball-beat",{"custom-is-table-child":!t.isTable}]),style:o({top:t.top,left:t.left})},b,6)],6))});t("A",c(f,[["__scopeId","data-v-60ab0cfe"]]))}}}));
import{d as e,b as t,r,l as a,H as o,J as s,e as l,N as n,L as c,Q as i,j as u,B as p,K as d,R as m,S as v,I as f}from"./vue-f8fdfec2.js";import{u as y,r as b,_ as h,M as O,U as g}from"./index-dae4a232.js";import{A as w}from"./Animation-f85aa7e2.js";function j(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function k(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?j(Object(r),!0).forEach((function(t){h(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):j(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var P={tag:"svg",attrs:{fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M2.5 11h5v2H3v1h10v-1H8.5v-2h5a1 1 0 001-1V3a1 1 0 00-1-1h-11a1 1 0 00-1 1v7a1 1 0 001 1zm0-8h11v7h-11V3z",fillOpacity:.9}}]},_=e({name:"DesktopIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,r){var{attrs:a}=r,o=t((()=>e.size)),{className:s,style:l}=y(o),n=t((()=>["t-icon","t-icon-desktop",s.value])),c=t((()=>k(k({},l.value),a.style))),i=t((()=>({class:n.value,style:c.value,onClick:t=>{var r;return null===(r=e.onClick)||void 0===r?void 0:r.call(e,{e:t})}})));return()=>b(P,i.value)}});function V(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function z(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?V(Object(r),!0).forEach((function(t){h(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):V(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var x={tag:"svg",attrs:{fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M6 10v1h4v-1H6z",fillOpacity:.9}},{tag:"path",attrs:{fill:"currentColor",d:"M4.5 5v1H3a.5.5 0 00-.5.5v7c0 .28.22.5.5.5h10a.5.5 0 00.5-.5v-7A.5.5 0 0013 6h-1.5V5a3.5 3.5 0 00-7 0zm6 1h-5V5a2.5 2.5 0 015 0v1zm-7 1h9v6h-9V7z",fillOpacity:.9}}]},C=e({name:"LockOnIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,r){var{attrs:a}=r,o=t((()=>e.size)),{className:s,style:l}=y(o),n=t((()=>["t-icon","t-icon-lock-on",s.value])),c=t((()=>z(z({},l.value),a.style))),i=t((()=>({class:n.value,style:c.value,onClick:t=>{var r;return null===(r=e.onClick)||void 0===r?void 0:r.call(e,{e:t})}})));return()=>b(x,i.value)}});const D={class:"custom-login"},S=d("div",{class:"custom-login-title"},"登录",-1),E=e({__name:"login",setup(e){const d=m(),y=v(),b=r(!1),h=a({account:"",password:""}),j=t((()=>({account:[{required:!0,messgae:"账号不能为空",type:"error"}],password:[{required:!0,message:"密码不能为空",type:"error"}]}))),k=()=>{O.success("重置成功")},P=async({validateResult:e,firstError:t})=>{if(!0===e)try{b.value=!0;let e=await g({email:h.account,password:h.password});0==e.code&&(O.success("登录成功"),y.commit("user/setToken",{token:e.data.access_token,time:e.data.expires_in}),d.replace({path:"/upload"})),b.value=!1}catch(r){b.value=!1}else O.closeAll(),O.warning(t)};return(e,t)=>{const r=f("t-input"),a=f("t-form-item"),d=f("t-button"),m=f("t-form");return o(),s("div",D,[S,l(m,{ref:"form",class:"custom-login-form",data:h,rules:c(j),colon:!0,"label-width":0,onReset:k,onSubmit:P},{default:n((()=>[l(a,{name:"account"},{default:n((()=>[l(r,{modelValue:h.account,"onUpdate:modelValue":t[0]||(t[0]=e=>h.account=e),clearable:"",placeholder:"请输入账户名"},{"prefix-icon":n((()=>[l(c(_))])),_:1},8,["modelValue"])])),_:1}),l(a,{name:"password"},{default:n((()=>[l(r,{modelValue:h.password,"onUpdate:modelValue":t[1]||(t[1]=e=>h.password=e),type:"password",clearable:"",placeholder:"请输入密码"},{"prefix-icon":n((()=>[l(c(C))])),_:1},8,["modelValue"])])),_:1}),l(a,null,{default:n((()=>[l(d,{theme:"primary",type:"submit",block:""},{default:n((()=>[i("登录")])),_:1})])),_:1})])),_:1},8,["data","rules"]),u(l(w,{poistion:"fixed",background:"rgba(200,200,200,0.2)"},null,512),[[p,b.value]])])}}}),H={class:"custom-home-page-login"},A=e({__name:"index",setup:e=>(e,t)=>(o(),s("div",H,[l(E)]))});export{A as default};
import{d as e,b as t,r,l as a,H as o,J as s,e as l,N as n,L as c,Q as i,j as u,B as p,K as d,R as m,S as v,I as f}from"./vue-f8fdfec2.js";import{u as y,r as b,_ as h,M as O,U as g}from"./index-06b4a16d.js";import{A as w}from"./Animation-a19c5bfe.js";function j(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function k(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?j(Object(r),!0).forEach((function(t){h(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):j(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var P={tag:"svg",attrs:{fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M2.5 11h5v2H3v1h10v-1H8.5v-2h5a1 1 0 001-1V3a1 1 0 00-1-1h-11a1 1 0 00-1 1v7a1 1 0 001 1zm0-8h11v7h-11V3z",fillOpacity:.9}}]},_=e({name:"DesktopIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,r){var{attrs:a}=r,o=t((()=>e.size)),{className:s,style:l}=y(o),n=t((()=>["t-icon","t-icon-desktop",s.value])),c=t((()=>k(k({},l.value),a.style))),i=t((()=>({class:n.value,style:c.value,onClick:t=>{var r;return null===(r=e.onClick)||void 0===r?void 0:r.call(e,{e:t})}})));return()=>b(P,i.value)}});function V(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function z(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?V(Object(r),!0).forEach((function(t){h(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):V(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var x={tag:"svg",attrs:{fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M6 10v1h4v-1H6z",fillOpacity:.9}},{tag:"path",attrs:{fill:"currentColor",d:"M4.5 5v1H3a.5.5 0 00-.5.5v7c0 .28.22.5.5.5h10a.5.5 0 00.5-.5v-7A.5.5 0 0013 6h-1.5V5a3.5 3.5 0 00-7 0zm6 1h-5V5a2.5 2.5 0 015 0v1zm-7 1h9v6h-9V7z",fillOpacity:.9}}]},C=e({name:"LockOnIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,r){var{attrs:a}=r,o=t((()=>e.size)),{className:s,style:l}=y(o),n=t((()=>["t-icon","t-icon-lock-on",s.value])),c=t((()=>z(z({},l.value),a.style))),i=t((()=>({class:n.value,style:c.value,onClick:t=>{var r;return null===(r=e.onClick)||void 0===r?void 0:r.call(e,{e:t})}})));return()=>b(x,i.value)}});const D={class:"custom-login"},S=d("div",{class:"custom-login-title"},"登录",-1),E=e({__name:"login",setup(e){const d=m(),y=v(),b=r(!1),h=a({account:"",password:""}),j=t((()=>({account:[{required:!0,messgae:"账号不能为空",type:"error"}],password:[{required:!0,message:"密码不能为空",type:"error"}]}))),k=()=>{O.success("重置成功")},P=async({validateResult:e,firstError:t})=>{if(!0===e)try{b.value=!0;let e=await g({email:h.account,password:h.password});0==e.code&&(O.success("登录成功"),y.commit("user/setToken",{token:e.data.access_token,time:e.data.expires_in}),d.replace({path:"/upload"})),b.value=!1}catch(r){b.value=!1}else O.closeAll(),O.warning(t)};return(e,t)=>{const r=f("t-input"),a=f("t-form-item"),d=f("t-button"),m=f("t-form");return o(),s("div",D,[S,l(m,{ref:"form",class:"custom-login-form",data:h,rules:c(j),colon:!0,"label-width":0,onReset:k,onSubmit:P},{default:n((()=>[l(a,{name:"account"},{default:n((()=>[l(r,{modelValue:h.account,"onUpdate:modelValue":t[0]||(t[0]=e=>h.account=e),clearable:"",placeholder:"请输入账户名"},{"prefix-icon":n((()=>[l(c(_))])),_:1},8,["modelValue"])])),_:1}),l(a,{name:"password"},{default:n((()=>[l(r,{modelValue:h.password,"onUpdate:modelValue":t[1]||(t[1]=e=>h.password=e),type:"password",clearable:"",placeholder:"请输入密码"},{"prefix-icon":n((()=>[l(c(C))])),_:1},8,["modelValue"])])),_:1}),l(a,null,{default:n((()=>[l(d,{theme:"primary",type:"submit",block:""},{default:n((()=>[i("登录")])),_:1})])),_:1})])),_:1},8,["data","rules"]),u(l(w,{poistion:"fixed",background:"rgba(200,200,200,0.2)"},null,512),[[p,b.value]])])}}}),H={class:"custom-home-page-login"},A=e({__name:"index",setup:e=>(e,t)=>(o(),s("div",H,[l(E)]))});export{A as default};
import{d as e,r as a,o as t,e as l,Q as s,I as u,S as o,H as n,J as c,K as i,b as r,l as d,w as p,j as v,B as m}from"./vue-f8fdfec2.js";import{C as h,b as g,M as f,c as w,g as b,d as x,e as V}from"./index-06b4a16d.js";import{A as y}from"./Animation-a19c5bfe.js";const U=e({props:{modelValue:String},emits:["update:modelValue"],setup(e,{emit:n}){const c=o(),i=a([]),r=a(""),d=({value:e,e:a})=>{},p=({value:e,e:a})=>{},v=e=>{c.commit("user/setUserChoseAccount",e)},m=({value:e,e:a,inputValue:t})=>{},g=()=>{const{modelValue:a}=e;n("update:modelValue","upload"==a?"table":"upload")};return t((()=>{(async()=>{try{let e=await h();0==e.code&&e.data.length&&(e.data.forEach((e=>{e.label=e.name+"-"+e.region,e.value=e.account_id})),i.value=e.data)}catch(e){}})()})),()=>l("div",{class:"custom-chose-account"},[l("div",{class:"chose-account-left"},[l("div",{class:"chose-account-title"},[s("选择账户")]),l(u("t-select"),{class:"chose-account-select",modelValue:r.value,"onUpdate:modelValue":e=>r.value=e,placeholder:"选择一个账户",options:i.value,style:"width: 200px; display: inline-block;",filterable:!0,onblur:d,onfocus:p,onenter:m,onChange:v},null)]),l("div",{class:"choose-account-right"},[l(u("t-button"),{onClick:g},{default:()=>["upload"==e.modelValue?"发布记录":"发布视频"]})])])}}),C={width:"17",height:"16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},A=[i("path",{d:"M1.243 3.888a1.926 1.926 0 0 1-.448-.655A1.928 1.928 0 0 1 .64 2.49c0-.248.052-.496.155-.744.103-.248.252-.466.448-.655.206-.198.435-.345.687-.439.252-.094.507-.141.764-.141a2.133 2.133 0 0 1 1.452.58l4.34 4.182 4.339-4.182c.206-.198.435-.345.687-.439.252-.094.507-.141.764-.141a2.134 2.134 0 0 1 1.452.58c.206.199.358.42.456.662.097.244.146.49.146.737 0 .248-.049.494-.146.737-.098.243-.25.464-.456.662l-4.34 4.182 4.34 4.182c.206.198.358.42.456.662.097.243.146.489.146.737s-.049.493-.146.736a2.013 2.013 0 0 1-1.135 1.094c-.258.1-.515.15-.773.15a2.17 2.17 0 0 1-.764-.142 1.988 1.988 0 0 1-.687-.44l-4.34-4.181-4.34 4.182a2.132 2.132 0 0 1-1.452.58 2.17 2.17 0 0 1-.763-.141 1.988 1.988 0 0 1-.687-.44 1.873 1.873 0 0 1-.603-1.398c0-.546.201-1.012.603-1.4l4.34-4.181-4.34-4.182Z",fill:"#FD1753"},null,-1),i("path",{d:"M1.243 3.888a1.926 1.926 0 0 1-.448-.655A1.928 1.928 0 0 1 .64 2.49c0-.248.052-.496.155-.744.103-.248.252-.466.448-.655.206-.198.435-.345.687-.439.252-.094.507-.141.764-.141a2.133 2.133 0 0 1 1.452.58l4.34 4.182 4.339-4.182c.206-.198.435-.345.687-.439.252-.094.507-.141.764-.141a2.134 2.134 0 0 1 1.452.58c.206.199.358.42.456.662.097.244.146.49.146.737 0 .248-.049.494-.146.737-.098.243-.25.464-.456.662l-4.34 4.182 4.34 4.182c.206.198.358.42.456.662.097.243.146.489.146.737s-.049.493-.146.736a2.013 2.013 0 0 1-1.135 1.094c-.258.1-.515.15-.773.15a2.17 2.17 0 0 1-.764-.142 1.988 1.988 0 0 1-.687-.44l-4.34-4.181-4.34 4.182a2.132 2.132 0 0 1-1.452.58 2.17 2.17 0 0 1-.763-.141 1.988 1.988 0 0 1-.687-.44 1.873 1.873 0 0 1-.603-1.398c0-.546.201-1.012.603-1.4l4.34-4.181-4.34-4.182Z",fill:"#616161"},null,-1)];const S={render:function(e,a){return n(),c("svg",C,A)}},k={width:"40",height:"30",fill:"none",xmlns:"http://www.w3.org/2000/svg"},D=[i("path",{d:"M22.125 20.833v4.584h8.333c2.917-.417 5.209-3.125 5.209-6.25 0-3.542-2.709-6.25-6.25-6.25-.834 0-1.459.208-2.084.416v-.416c0-4.584-3.75-8.334-8.333-8.334s-8.333 3.75-8.333 8.334c0 .833.208 1.458.208 2.291C10.458 15 10.042 15 9.625 15c-2.917 0-5.208 2.292-5.208 5.208 0 2.917 2.291 5.209 5.208 5.209h8.333v-4.584l-2.291 2.292-2.917-2.917 7.292-7.291 7.291 7.291-2.916 2.917-2.292-2.292Zm0 4.584v4.166h-4.167v-4.166h-2.083v4.166h-6.25A9.336 9.336 0 0 1 .25 20.208c0-4.166 2.708-7.708 6.25-8.958C7.333 5.208 12.542.417 19 .417c5.417 0 10.208 3.541 11.875 8.333 5 .625 8.958 5 8.958 10.417 0 5.416-4.166 9.791-9.375 10.416h-6.25v-4.166h-2.083Z",fill:"#999"},null,-1),i("path",{d:"M22.125 20.833v4.584h8.333c2.917-.417 5.209-3.125 5.209-6.25 0-3.542-2.709-6.25-6.25-6.25-.834 0-1.459.208-2.084.416v-.416c0-4.584-3.75-8.334-8.333-8.334s-8.333 3.75-8.333 8.334c0 .833.208 1.458.208 2.291C10.458 15 10.042 15 9.625 15c-2.917 0-5.208 2.292-5.208 5.208 0 2.917 2.291 5.209 5.208 5.209h8.333v-4.584l-2.291 2.292-2.917-2.917 7.292-7.291 7.291 7.291-2.916 2.917-2.292-2.292Zm0 4.584v4.166h-4.167v-4.166h-2.083v4.166h-6.25A9.336 9.336 0 0 1 .25 20.208c0-4.166 2.708-7.708 6.25-8.958C7.333 5.208 12.542.417 19 .417c5.417 0 10.208 3.541 11.875 8.333 5 .625 8.958 5 8.958 10.417 0 5.416-4.166 9.791-9.375 10.416h-6.25v-4.166h-2.083Z",fill:"#999"},null,-1)];const _={render:function(e,a){return n(),c("svg",k,D)}},I=g.create({timeout:6e4,withCredentials:!1});let M;I.interceptors.request.use((e=>e)),I.defaults.timeout=6e4,I.interceptors.response.use((e=>{const{data:a,status:t}=e;return 201==t||200==t?t:0===a.code?a:(f.error(a.msg||"请求错误"),Promise.reject(a.msg))}),(e=>{if("response"in e){const{message:a,status_code:t}=e.response.data;return 403==t?void w.replace({path:"/"}):(f.error(a||"请求错误"),e.response)}}));const T=new Uint8Array(16);function Z(){if(!M&&(M="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!M))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return M(T)}const R=[];for(let E=0;E<256;++E)R.push((E+256).toString(16).slice(1));const j={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function H(e,a,t){if(j.randomUUID&&!a&&!e)return j.randomUUID();const l=(e=e||{}).random||(e.rng||Z)();if(l[6]=15&l[6]|64,l[8]=63&l[8]|128,a){t=t||0;for(let e=0;e<16;++e)a[t+e]=l[e];return a}return function(e,a=0){return(R[e[a+0]]+R[e[a+1]]+R[e[a+2]]+R[e[a+3]]+"-"+R[e[a+4]]+R[e[a+5]]+"-"+R[e[a+6]]+R[e[a+7]]+"-"+R[e[a+8]]+R[e[a+9]]+"-"+R[e[a+10]]+R[e[a+11]]+R[e[a+12]]+R[e[a+13]]+R[e[a+14]]+R[e[a+15]]).toLowerCase()}(l)}const K=e({props:{index:Number},emits:["DeleteUploadBox","TextareaChange","SubmitVideo","UploadVideo"],setup(e,{emit:t}){const n=o(),c=r((()=>n.getters["user/getAccount"])),i=r((()=>n.getters["user/getadminConfig"])),p=r((()=>n.getters["user/getuploadStrategy"]));let v="";const m=a([]),h=d({url:"",status:0}),w=a(""),x=a(""),V=a(0);let y=null;const U=()=>{const{index:a}=e;return 0==a?"":l("span",{class:"real-upload-close-icon",onClick:C},[l(S,null,null)])},C=()=>{t("DeleteUploadBox",e.index)},A=a=>{t("TextareaChange",e.index,a)},k=()=>{w.value="",A(w.value),h.url="",h.status=0,t("UploadVideo",e.index,h.url)},D=()=>{V.value=0,y=setInterval((()=>{99!=V.value&&(V.value+=1)}),100)},M=e=>c.value?!!i.value||(f.warning("后台配置链接为空"),!1):(f.warning("请先选择一个账户"),!1),T=({file:e})=>{f.error(`文件 ${e.name} 上传失败`)},Z=(e,a)=>{},R=(a,l)=>{window.clearInterval(y),f.success("上传成功"),h.url=l,h.status=2,t("UploadVideo",e.index,h.url)},j=()=>{window.clearInterval(y),h.url="",h.status=0,t("UploadVideo",e.index,h.url),f.warning("上传失败")},K=e=>(D(),new Promise((a=>{let t=H();h.status=1;let l="";l=i.value+"video/"+t+".mp4",setTimeout((()=>{new XMLHttpRequest,g.CancelToken,I.put(l,e[0].raw).then((e=>{if(200==e){let e=i.value+"video/"+t+".mp4";R(0,e),a({status:"success",response:{url:h.url}})}else j()}))}),1e3)}))),z=async e=>{let a=e[0].name.replace(".mp4","");return w.value=a,A(a),p.value.oss?((e,a)=>(D(),new Promise((a=>{let t=H();h.status=1;let l="";const{config:s}=p.value;l="https://"+s.host,setTimeout((()=>{let u=new FormData;u.append("key",s.dir+t+".mp4"),u.append("policy",s.policy),u.append("OSSAccessKeyId",s.accessid),u.append("success_action_status","200"),u.append("callback",s.callback),u.append("signature",s.signature),u.append("file",e[0].raw),I.post(l,u,{headers:{"Content-Type":"multipart/form-data;charset=utf-8"}}).then((e=>{if(200==e){let e=s.domain+"video/"+t+".mp4";R(0,e),a({status:"success",response:{url:h.url}})}else j()}))}),1e3)}))))(e,p.value.config):K(e)},B=()=>0==h.status?l(u("t-upload"),{modelValue:m.value,"onUpdate:modelValue":e=>m.value=e,method:"PUT",requestMethod:z,action:x.value,headers:{authorization:`Bearer ${b()}`},tips:v,accept:"video",theme:"custom","before-upload":M,multiple:!0,max:1,draggable:!0,formatResponse:Z,onfail:T,onsuccess:v=""},{default:()=>[l("div",{class:"custom-upload-click-box"},[l("div",{class:"title"},[s("选择视频")]),l("div",{class:"title2"},[s("或拖视频到此处上传")]),l("div",null,[l(_,null,null)]),l(u("t-button"),{class:"custom-chose-file"},{default:()=>[s("选择文件")]})])]}):1==h.status?l("div",{class:"custom-uploading-stauts"},[l(u("t-progress"),{theme:"circle",percentage:V.value,size:"small"},null),l("div",{class:"uploading-title"},[s("正在上传")])]):l("div",{class:"custom-UploadSuccess-stauts"},[l("div",{class:"title1"},[s("上传完成")]),l("div",{class:"title1"},[s("点击下方发布按钮发布视频")])]),F=()=>{t("SubmitVideo",e.index)};return()=>l("div",{class:"custom-real-upload"},[U(),l("div",{class:"real-upload-content"},[l("div",{class:"upload-textarea"},[l(u("t-textarea"),{placeholder:"请输入内容",autosize:{minRows:3,maxRows:5},modelValue:w.value,"onUpdate:modelValue":e=>w.value=e,onChange:A},null)]),l("div",{class:"custom-real-upload-component"},[B()])]),l("div",{class:"custom-real-upload-footer"},[l(u("t-button"),{onClick:F,class:["submit",h.url&&w.value?"active":""]},{default:()=>[s("发布")]}),l(u("t-button"),{class:"reset-button",onClick:k},{default:()=>[s("重置")]})])])}}),z={width:"24",height:"24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},B=[i("path",{d:"M21.1 9.375c.317 0 .62.063.912.188.292.124.542.291.75.5.209.208.375.458.5.75.125.291.188.595.188.912 0 .333-.063.642-.188.925-.125.283-.291.53-.5.737a2.364 2.364 0 0 1-.75.5 2.293 2.293 0 0 1-.912.188h-7.025V21.1c0 .333-.063.642-.188.925-.125.283-.291.53-.5.738a2.364 2.364 0 0 1-.75.5 2.293 2.293 0 0 1-.912.187c-.333 0-.642-.063-.925-.188a2.404 2.404 0 0 1-.738-.5 2.403 2.403 0 0 1-.5-.737 2.266 2.266 0 0 1-.187-.925v-7.025H2.35c-.333 0-.642-.063-.925-.188a2.404 2.404 0 0 1-.738-.5 2.403 2.403 0 0 1-.5-.737A2.266 2.266 0 0 1 0 11.725c0-.317.063-.62.188-.912.124-.292.291-.542.5-.75.208-.209.454-.376.737-.5.283-.126.592-.188.925-.188h7.025V2.35c0-.317.063-.62.188-.913.124-.291.291-.541.5-.75.208-.208.454-.375.737-.5.283-.124.592-.187.925-.187.65 0 1.204.23 1.662.688.459.458.688 1.012.688 1.662v7.025H21.1Z",fill:"#FD1753"},null,-1),i("path",{d:"M21.1 9.375c.317 0 .62.063.912.188.292.124.542.291.75.5.209.208.375.458.5.75.125.291.188.595.188.912 0 .333-.063.642-.188.925-.125.283-.291.53-.5.737a2.364 2.364 0 0 1-.75.5 2.293 2.293 0 0 1-.912.188h-7.025V21.1c0 .333-.063.642-.188.925-.125.283-.291.53-.5.738a2.364 2.364 0 0 1-.75.5 2.293 2.293 0 0 1-.912.187c-.333 0-.642-.063-.925-.188a2.404 2.404 0 0 1-.738-.5 2.403 2.403 0 0 1-.5-.737 2.266 2.266 0 0 1-.187-.925v-7.025H2.35c-.333 0-.642-.063-.925-.188a2.404 2.404 0 0 1-.738-.5 2.403 2.403 0 0 1-.5-.737A2.266 2.266 0 0 1 0 11.725c0-.317.063-.62.188-.912.124-.292.291-.542.5-.75.208-.209.454-.376.737-.5.283-.126.592-.188.925-.188h7.025V2.35c0-.317.063-.62.188-.913.124-.291.291-.541.5-.75.208-.208.454-.375.737-.5.283-.124.592-.187.925-.187.65 0 1.204.23 1.662.688.459.458.688 1.012.688 1.662v7.025H21.1Z",fill:"#FD1753"},null,-1)];const F={render:function(e,a){return n(),c("svg",z,B)}},P=e({setup(e){const s=o(),n=a([]),c=a(1),i=a(10),d=a(0),v=a(!1),m=r((()=>s.getters["user/getAccount"])),h=async()=>{try{v.value=!0;let e=await x({limit:i.value,page:c.value,account_id:m.value?m.value:void 0});0==e.code&&(e.data.data.forEach((e=>{e.n_title=e.parameters.title})),n.value=e.data.data,d.value=e.data.total),v.value=!1}catch(e){v.value=!1}};p((()=>m.value),(e=>{c.value=1,h()})),p((()=>i.value),(e=>{h()})),t((()=>{h()}));const g=e=>{h()},f=[{title:"账号",colKey:"account_name"},{title:"内容",colKey:"n_title"},{title:"发布",colKey:"status_label"},{title:"发布时间",colKey:"publish_time"}];return()=>l("div",{class:"custom-submit-table"},[l(u("t-table"),{data:n.value,"row-key":"index",columns:f,hover:!0,ShowJumper:!0,loading:v.value},null),l("div",{class:"custom-pagination-box"},[l(u("t-pagination"),{pageNum:c.value,"onUpdate:pageNum":e=>c.value=e,pageSize:i.value,"onUpdate:pageSize":e=>i.value=e,total:d.value,onCurrentChange:g},null)])])}}),q=e({setup(){const e=o(),u=r((()=>e.getters["user/getAccount"])),n=r((()=>e.getters["user/getadminConfig"])),c=a(!1);t((()=>{e.dispatch("user/AdminConfig")}));const i=a([{textValue:"",files:""}]),d=a("upload");let p={textValue:"",files:""};const h=()=>{i.value.push(p)},g=e=>{i.value.splice(e,1)},w=(e,a)=>{i.value[e].files=a},b=(e,a)=>{i.value[e].textValue=a},x=async e=>{try{if(!(n.value&&u.value&&i.value[e].files&&i.value[e].textValue))return;let a={video_url:i.value[e].files,title:i.value[e].textValue};c.value=!0,0==(await V({account_id:u.value,parameters:[a]})).code?f.success("发布成功"):f.success("发布失败"),c.value=!1}catch(a){c.value=!1}};return()=>l("div",{class:"custom-upload-page narrow-scrollbar"},[l("div",{class:"custom-upload-page-child"},[l(U,{modelValue:d.value,"onUpdate:modelValue":e=>d.value=e},null),v(l("div",null,[l("div",{class:"custom-upload-box"},[l("span",{class:"custom-upload-title"},[s("上传视频")]),i.value.map(((e,a)=>l(K,{index:a,onDeleteUploadBox:g,onTextareaChange:b,onSubmitVideo:x,onUploadVideo:w},null)))]),l("div",{class:"custom-add-new-upload",onClick:h},[l(F,null,null),l("span",null,[s("新添新上传视频")])])]),[[m,"upload"==d.value]]),"upload"!=d.value?l(P,null,null):""]),v(l(y,{poistion:"fixed",background:"rgba(200,200,200,0.2)"},null),[[m,c.value]])])}});export{q as default};
System.register(["./vue-legacy-3fa9a658.js"],(function(e,t){"use strict";var n,r,o,a,l,i,u,c,s,f,d,v,p,h,g,m,y,b,w,O,C,x,j,S,P,_,E,D,k,F,I,A,T,R,M,B;return{setters:[e=>{n=e.c,r=e.a,o=e.r,a=e.g,l=e.i,i=e.b,u=e.h,c=e.d,s=e.o,f=e.e,d=e.f,v=e.t,p=e.w,h=e.j,g=e.k,m=e.l,y=e.m,b=e.n,w=e.F,O=e.p,C=e.q,x=e.s,j=e.u,S=e.v,P=e.x,_=e.T,E=e.y,D=e.z,k=e.A,F=e.B,I=e.C,A=e.D,T=e.E,R=e.G,M=e.H,B=e.I}],execute:function(){e({_:dd,r:hd,u:md});const N=function(e,t,n){return e()},z=[{path:"/",name:"layout",component:()=>N((()=>t.import("./content-legacy-051e4eef.js"))),children:[{path:"/",name:"SnowHome",component:()=>N((()=>t.import("./index-legacy-4d1fe46b.js"))),meta:{header:!1}},{path:"/upload",name:"upload",component:()=>N((()=>t.import("./index-legacy-6fe97d5f.js"))),meta:{header:!0}}]}],L=e("c",n({history:r(),routes:z,scrollBehavior:()=>({el:"#app",top:0,behavior:"smooth"})})),V="dexnav-token";/*! js-cookie v3.0.1 | MIT */ /* eslint-disable no-var */function K(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}/* eslint-enable no-var */ /* eslint-disable no-var */var H=/* eslint-enable no-var */ /* eslint-disable no-var */function e(t,n){function r(e,r,o){if("undefined"!=typeof document){"number"==typeof(o=K({},n,o)).expires&&(o.expires=new Date(Date.now()+864e5*o.expires)),o.expires&&(o.expires=o.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var l in o)o[l]&&(a+="; "+l,!0!==o[l]&&(// Considers RFC 6265 section 5.2:
System.register(["./vue-legacy-3fa9a658.js"],(function(e,t){"use strict";var n,r,o,a,l,i,u,c,s,f,d,v,p,h,g,m,y,b,w,O,C,x,j,S,P,_,E,D,k,F,I,A,T,R,M,B;return{setters:[e=>{n=e.c,r=e.a,o=e.r,a=e.g,l=e.i,i=e.b,u=e.h,c=e.d,s=e.o,f=e.e,d=e.f,v=e.t,p=e.w,h=e.j,g=e.k,m=e.l,y=e.m,b=e.n,w=e.F,O=e.p,C=e.q,x=e.s,j=e.u,S=e.v,P=e.x,_=e.T,E=e.y,D=e.z,k=e.A,F=e.B,I=e.C,A=e.D,T=e.E,R=e.G,M=e.H,B=e.I}],execute:function(){e({_:dd,r:hd,u:md});const N=function(e,t,n){return e()},z=[{path:"/",name:"layout",component:()=>N((()=>t.import("./content-legacy-051e4eef.js"))),children:[{path:"/",name:"SnowHome",component:()=>N((()=>t.import("./index-legacy-86f099a4.js"))),meta:{header:!1}},{path:"/upload",name:"upload",component:()=>N((()=>t.import("./index-legacy-04a4dcb0.js"))),meta:{header:!0}}]}],L=e("c",n({history:r(),routes:z,scrollBehavior:()=>({el:"#app",top:0,behavior:"smooth"})})),V="dexnav-token";/*! js-cookie v3.0.1 | MIT */ /* eslint-disable no-var */function K(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}/* eslint-enable no-var */ /* eslint-disable no-var */var H=/* eslint-enable no-var */ /* eslint-disable no-var */function e(t,n){function r(e,r,o){if("undefined"!=typeof document){"number"==typeof(o=K({},n,o)).expires&&(o.expires=new Date(Date.now()+864e5*o.expires)),o.expires&&(o.expires=o.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var l in o)o[l]&&(a+="; "+l,!0!==o[l]&&(// Considers RFC 6265 section 5.2:
// ...
// 3. If the remaining unparsed-attributes contains a %x3B (";")
// character:
......@@ -4186,4 +4186,4 @@ function CD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
* tdesign v1.0.5
* (c) 2023 tdesign
* @license MIT
*/const kD=kt.create({baseURL:void 0,timeout:6e4,withCredentials:!0});kD.interceptors.request.use((e=>{const t=TD.getters["language/getLang"];return e.headers.lang=t,e})),kD.defaults.timeout=6e4,kD.interceptors.response.use((e=>{const{data:t}=e;return 0===t.code||201==t.code?t:(Uh.error(t.msg||"请求错误"),Promise.reject(t.msg))}),(e=>{if("response"in e){const{message:t,status_code:n}=e.response.data;return 403==n?(Uh.warning("请登录"),void L.replace({path:"/"})):(Uh.error(t||"请求错误"),e.response)}}));const FD=e("g",(()=>TD.getters["user/token"])),ID=(e("U",(e=>kD.post("/api/users/login",{...e}))),e("C",(()=>{let e=FD();return kD.get("/api/users/accounts",{headers:{authorization:`Bearer ${e}`}})})),e("e",(e=>{let t=FD();return kD.post("/api/users/video/upload",{...e},{headers:{authorization:`Bearer ${t}`}})})),e("d",(e=>{let t=FD();return kD.get("/api/users/publish-tasks",{params:e,headers:{authorization:`Bearer ${t}`}})})),{token:H.get(V),account:"",adminConfig:"",uploadStrategy:{oss:null,config:{}}}),AD={setToken(e,t){H.set(V,t.token,{expires:t.time/60/60/24}),e.token=t.token},removeToken(e){H.remove(V),e.token=""},setUserChoseAccount(e,t){e.account=t},setadminConfig(e,t){e.adminConfig=t},setuploadStrategy(e,t){e.uploadStrategy.oss=t.oss,t.oss&&(e.uploadStrategy.config=t.config)}},TD=T({modules:{user:{namespaced:!0,state:ID,mutations:AD,actions:{async AdminConfig({commit:e}){try{let t=await(()=>{let e=FD();return kD.get("/api/users/config",{headers:{authorization:`Bearer ${e}`}})})();if(0==t.code)if(e("setadminConfig",t.data.config.intranet_url),t.data.config.oss){let n=await(()=>{let e=FD();return kD.get("/api/users/config/policy",{headers:{authorization:`Bearer ${e}`}})})();0==n.code&&e("setuploadStrategy",{oss:t.data.config.oss,config:n.data})}else e("setuploadStrategy",{oss:t.data.config.oss})}catch(t){}}},getters:{token:e=>e.token,getAccount:e=>e.account,getadminConfig:e=>e.adminConfig,getuploadStrategy:e=>e.uploadStrategy}}}}),RD=e("a",((e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n})),MD=[ZO,Qx,Dx,kx,bb,fd,DD,Wj,uC],BD={install(e){MD.forEach(((t,n)=>{e.component(t.name,t)})),e.component("t-table",XE)}},ND=y(RD({},[["render",function(e,t){const n=B("router-view");return M(),R(n)}]]));ND.use(L),ND.use(TD),ND.use(BD),ND.mount("#app")}}}));
*/const kD=kt.create({baseURL:"",timeout:6e4,withCredentials:!0});kD.interceptors.request.use((e=>{const t=TD.getters["language/getLang"];return e.headers.lang=t,e})),kD.defaults.timeout=6e4,kD.interceptors.response.use((e=>{const{data:t}=e;return 0===t.code||201==t.code?t:(Uh.error(t.msg||"请求错误"),Promise.reject(t.msg))}),(e=>{if("response"in e){const{message:t,status_code:n}=e.response.data;return 403==n?(Uh.warning("请登录"),void L.replace({path:"/"})):(Uh.error(t||"请求错误"),e.response)}}));const FD=e("g",(()=>TD.getters["user/token"])),ID=(e("U",(e=>kD.post("/api/users/login",{...e}))),e("C",(()=>{let e=FD();return kD.get("/api/users/accounts",{headers:{authorization:`Bearer ${e}`}})})),e("e",(e=>{let t=FD();return kD.post("/api/users/video/upload",{...e},{headers:{authorization:`Bearer ${t}`}})})),e("d",(e=>{let t=FD();return kD.get("/api/users/publish-tasks",{params:e,headers:{authorization:`Bearer ${t}`}})})),{token:H.get(V),account:"",adminConfig:"",uploadStrategy:{oss:null,config:{}}}),AD={setToken(e,t){H.set(V,t.token,{expires:t.time/60/60/24}),e.token=t.token},removeToken(e){H.remove(V),e.token=""},setUserChoseAccount(e,t){e.account=t},setadminConfig(e,t){e.adminConfig=t},setuploadStrategy(e,t){e.uploadStrategy.oss=t.oss,t.oss&&(e.uploadStrategy.config=t.config)}},TD=T({modules:{user:{namespaced:!0,state:ID,mutations:AD,actions:{async AdminConfig({commit:e}){try{let t=await(()=>{let e=FD();return kD.get("/api/users/config",{headers:{authorization:`Bearer ${e}`}})})();if(0==t.code)if(e("setadminConfig",t.data.config.intranet_url),t.data.config.oss){let n=await(()=>{let e=FD();return kD.get("/api/users/config/policy",{headers:{authorization:`Bearer ${e}`}})})();0==n.code&&e("setuploadStrategy",{oss:t.data.config.oss,config:n.data})}else e("setuploadStrategy",{oss:t.data.config.oss})}catch(t){}}},getters:{token:e=>e.token,getAccount:e=>e.account,getadminConfig:e=>e.adminConfig,getuploadStrategy:e=>e.uploadStrategy}}}}),RD=e("a",((e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n})),MD=[ZO,Qx,Dx,kx,bb,fd,DD,Wj,uC],BD={install(e){MD.forEach(((t,n)=>{e.component(t.name,t)})),e.component("t-table",XE)}},ND=y(RD({},[["render",function(e,t){const n=B("router-view");return M(),R(n)}]]));ND.use(L),ND.use(TD),ND.use(BD),ND.mount("#app")}}}));
System.register(["./vue-legacy-3fa9a658.js","./index-legacy-87ce98c4.js","./Animation-legacy-f2d58539.js"],(function(e,t){"use strict";var a,l,u,s,o,n,c,i,r,d,p,v,m,h,g,f,w,y,b,x,V,U,C;return{setters:[e=>{a=e.d,l=e.r,u=e.o,s=e.e,o=e.Q,n=e.I,c=e.S,i=e.H,r=e.J,d=e.K,p=e.b,v=e.l,m=e.w,h=e.j,g=e.B},e=>{f=e.C,w=e.b,y=e.M,b=e.c,x=e.g,V=e.d,U=e.e},e=>{C=e.A}],execute:function(){const t=a({props:{modelValue:String},emits:["update:modelValue"],setup(e,{emit:t}){const a=c(),i=l([]),r=l(""),d=({value:e,e:t})=>{},p=({value:e,e:t})=>{},v=e=>{a.commit("user/setUserChoseAccount",e)},m=({value:e,e:t,inputValue:a})=>{},h=()=>{const{modelValue:a}=e;t("update:modelValue","upload"==a?"table":"upload")};return u((()=>{(async()=>{try{let e=await f();0==e.code&&e.data.length&&(e.data.forEach((e=>{e.label=e.name+"-"+e.region,e.value=e.account_id})),i.value=e.data)}catch(e){}})()})),()=>s("div",{class:"custom-chose-account"},[s("div",{class:"chose-account-left"},[s("div",{class:"chose-account-title"},[o("选择账户")]),s(n("t-select"),{class:"chose-account-select",modelValue:r.value,"onUpdate:modelValue":e=>r.value=e,placeholder:"选择一个账户",options:i.value,style:"width: 200px; display: inline-block;",filterable:!0,onblur:d,onfocus:p,onenter:m,onChange:v},null)]),s("div",{class:"choose-account-right"},[s(n("t-button"),{onClick:h},{default:()=>["upload"==e.modelValue?"发布记录":"发布视频"]})])])}}),A={width:"17",height:"16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},S=[d("path",{d:"M1.243 3.888a1.926 1.926 0 0 1-.448-.655A1.928 1.928 0 0 1 .64 2.49c0-.248.052-.496.155-.744.103-.248.252-.466.448-.655.206-.198.435-.345.687-.439.252-.094.507-.141.764-.141a2.133 2.133 0 0 1 1.452.58l4.34 4.182 4.339-4.182c.206-.198.435-.345.687-.439.252-.094.507-.141.764-.141a2.134 2.134 0 0 1 1.452.58c.206.199.358.42.456.662.097.244.146.49.146.737 0 .248-.049.494-.146.737-.098.243-.25.464-.456.662l-4.34 4.182 4.34 4.182c.206.198.358.42.456.662.097.243.146.489.146.737s-.049.493-.146.736a2.013 2.013 0 0 1-1.135 1.094c-.258.1-.515.15-.773.15a2.17 2.17 0 0 1-.764-.142 1.988 1.988 0 0 1-.687-.44l-4.34-4.181-4.34 4.182a2.132 2.132 0 0 1-1.452.58 2.17 2.17 0 0 1-.763-.141 1.988 1.988 0 0 1-.687-.44 1.873 1.873 0 0 1-.603-1.398c0-.546.201-1.012.603-1.4l4.34-4.181-4.34-4.182Z",fill:"#FD1753"},null,-1),d("path",{d:"M1.243 3.888a1.926 1.926 0 0 1-.448-.655A1.928 1.928 0 0 1 .64 2.49c0-.248.052-.496.155-.744.103-.248.252-.466.448-.655.206-.198.435-.345.687-.439.252-.094.507-.141.764-.141a2.133 2.133 0 0 1 1.452.58l4.34 4.182 4.339-4.182c.206-.198.435-.345.687-.439.252-.094.507-.141.764-.141a2.134 2.134 0 0 1 1.452.58c.206.199.358.42.456.662.097.244.146.49.146.737 0 .248-.049.494-.146.737-.098.243-.25.464-.456.662l-4.34 4.182 4.34 4.182c.206.198.358.42.456.662.097.243.146.489.146.737s-.049.493-.146.736a2.013 2.013 0 0 1-1.135 1.094c-.258.1-.515.15-.773.15a2.17 2.17 0 0 1-.764-.142 1.988 1.988 0 0 1-.687-.44l-4.34-4.181-4.34 4.182a2.132 2.132 0 0 1-1.452.58 2.17 2.17 0 0 1-.763-.141 1.988 1.988 0 0 1-.687-.44 1.873 1.873 0 0 1-.603-1.398c0-.546.201-1.012.603-1.4l4.34-4.181-4.34-4.182Z",fill:"#616161"},null,-1)],k={render:function(e,t){return i(),r("svg",A,S)}},D={width:"40",height:"30",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_=[d("path",{d:"M22.125 20.833v4.584h8.333c2.917-.417 5.209-3.125 5.209-6.25 0-3.542-2.709-6.25-6.25-6.25-.834 0-1.459.208-2.084.416v-.416c0-4.584-3.75-8.334-8.333-8.334s-8.333 3.75-8.333 8.334c0 .833.208 1.458.208 2.291C10.458 15 10.042 15 9.625 15c-2.917 0-5.208 2.292-5.208 5.208 0 2.917 2.291 5.209 5.208 5.209h8.333v-4.584l-2.291 2.292-2.917-2.917 7.292-7.291 7.291 7.291-2.916 2.917-2.292-2.292Zm0 4.584v4.166h-4.167v-4.166h-2.083v4.166h-6.25A9.336 9.336 0 0 1 .25 20.208c0-4.166 2.708-7.708 6.25-8.958C7.333 5.208 12.542.417 19 .417c5.417 0 10.208 3.541 11.875 8.333 5 .625 8.958 5 8.958 10.417 0 5.416-4.166 9.791-9.375 10.416h-6.25v-4.166h-2.083Z",fill:"#999"},null,-1),d("path",{d:"M22.125 20.833v4.584h8.333c2.917-.417 5.209-3.125 5.209-6.25 0-3.542-2.709-6.25-6.25-6.25-.834 0-1.459.208-2.084.416v-.416c0-4.584-3.75-8.334-8.333-8.334s-8.333 3.75-8.333 8.334c0 .833.208 1.458.208 2.291C10.458 15 10.042 15 9.625 15c-2.917 0-5.208 2.292-5.208 5.208 0 2.917 2.291 5.209 5.208 5.209h8.333v-4.584l-2.291 2.292-2.917-2.917 7.292-7.291 7.291 7.291-2.916 2.917-2.292-2.292Zm0 4.584v4.166h-4.167v-4.166h-2.083v4.166h-6.25A9.336 9.336 0 0 1 .25 20.208c0-4.166 2.708-7.708 6.25-8.958C7.333 5.208 12.542.417 19 .417c5.417 0 10.208 3.541 11.875 8.333 5 .625 8.958 5 8.958 10.417 0 5.416-4.166 9.791-9.375 10.416h-6.25v-4.166h-2.083Z",fill:"#999"},null,-1)],I={render:function(e,t){return i(),r("svg",D,_)}},T=w.create({timeout:6e4,withCredentials:!1});// Unique ID creation requires a high quality random # generator. In the browser we therefore
System.register(["./vue-legacy-3fa9a658.js","./index-legacy-01b3f2d3.js","./Animation-legacy-7598f867.js"],(function(e,t){"use strict";var a,l,u,s,o,n,c,i,r,d,p,v,m,h,g,f,w,y,b,x,V,U,C;return{setters:[e=>{a=e.d,l=e.r,u=e.o,s=e.e,o=e.Q,n=e.I,c=e.S,i=e.H,r=e.J,d=e.K,p=e.b,v=e.l,m=e.w,h=e.j,g=e.B},e=>{f=e.C,w=e.b,y=e.M,b=e.c,x=e.g,V=e.d,U=e.e},e=>{C=e.A}],execute:function(){const t=a({props:{modelValue:String},emits:["update:modelValue"],setup(e,{emit:t}){const a=c(),i=l([]),r=l(""),d=({value:e,e:t})=>{},p=({value:e,e:t})=>{},v=e=>{a.commit("user/setUserChoseAccount",e)},m=({value:e,e:t,inputValue:a})=>{},h=()=>{const{modelValue:a}=e;t("update:modelValue","upload"==a?"table":"upload")};return u((()=>{(async()=>{try{let e=await f();0==e.code&&e.data.length&&(e.data.forEach((e=>{e.label=e.name+"-"+e.region,e.value=e.account_id})),i.value=e.data)}catch(e){}})()})),()=>s("div",{class:"custom-chose-account"},[s("div",{class:"chose-account-left"},[s("div",{class:"chose-account-title"},[o("选择账户")]),s(n("t-select"),{class:"chose-account-select",modelValue:r.value,"onUpdate:modelValue":e=>r.value=e,placeholder:"选择一个账户",options:i.value,style:"width: 200px; display: inline-block;",filterable:!0,onblur:d,onfocus:p,onenter:m,onChange:v},null)]),s("div",{class:"choose-account-right"},[s(n("t-button"),{onClick:h},{default:()=>["upload"==e.modelValue?"发布记录":"发布视频"]})])])}}),A={width:"17",height:"16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},S=[d("path",{d:"M1.243 3.888a1.926 1.926 0 0 1-.448-.655A1.928 1.928 0 0 1 .64 2.49c0-.248.052-.496.155-.744.103-.248.252-.466.448-.655.206-.198.435-.345.687-.439.252-.094.507-.141.764-.141a2.133 2.133 0 0 1 1.452.58l4.34 4.182 4.339-4.182c.206-.198.435-.345.687-.439.252-.094.507-.141.764-.141a2.134 2.134 0 0 1 1.452.58c.206.199.358.42.456.662.097.244.146.49.146.737 0 .248-.049.494-.146.737-.098.243-.25.464-.456.662l-4.34 4.182 4.34 4.182c.206.198.358.42.456.662.097.243.146.489.146.737s-.049.493-.146.736a2.013 2.013 0 0 1-1.135 1.094c-.258.1-.515.15-.773.15a2.17 2.17 0 0 1-.764-.142 1.988 1.988 0 0 1-.687-.44l-4.34-4.181-4.34 4.182a2.132 2.132 0 0 1-1.452.58 2.17 2.17 0 0 1-.763-.141 1.988 1.988 0 0 1-.687-.44 1.873 1.873 0 0 1-.603-1.398c0-.546.201-1.012.603-1.4l4.34-4.181-4.34-4.182Z",fill:"#FD1753"},null,-1),d("path",{d:"M1.243 3.888a1.926 1.926 0 0 1-.448-.655A1.928 1.928 0 0 1 .64 2.49c0-.248.052-.496.155-.744.103-.248.252-.466.448-.655.206-.198.435-.345.687-.439.252-.094.507-.141.764-.141a2.133 2.133 0 0 1 1.452.58l4.34 4.182 4.339-4.182c.206-.198.435-.345.687-.439.252-.094.507-.141.764-.141a2.134 2.134 0 0 1 1.452.58c.206.199.358.42.456.662.097.244.146.49.146.737 0 .248-.049.494-.146.737-.098.243-.25.464-.456.662l-4.34 4.182 4.34 4.182c.206.198.358.42.456.662.097.243.146.489.146.737s-.049.493-.146.736a2.013 2.013 0 0 1-1.135 1.094c-.258.1-.515.15-.773.15a2.17 2.17 0 0 1-.764-.142 1.988 1.988 0 0 1-.687-.44l-4.34-4.181-4.34 4.182a2.132 2.132 0 0 1-1.452.58 2.17 2.17 0 0 1-.763-.141 1.988 1.988 0 0 1-.687-.44 1.873 1.873 0 0 1-.603-1.398c0-.546.201-1.012.603-1.4l4.34-4.181-4.34-4.182Z",fill:"#616161"},null,-1)],k={render:function(e,t){return i(),r("svg",A,S)}},D={width:"40",height:"30",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_=[d("path",{d:"M22.125 20.833v4.584h8.333c2.917-.417 5.209-3.125 5.209-6.25 0-3.542-2.709-6.25-6.25-6.25-.834 0-1.459.208-2.084.416v-.416c0-4.584-3.75-8.334-8.333-8.334s-8.333 3.75-8.333 8.334c0 .833.208 1.458.208 2.291C10.458 15 10.042 15 9.625 15c-2.917 0-5.208 2.292-5.208 5.208 0 2.917 2.291 5.209 5.208 5.209h8.333v-4.584l-2.291 2.292-2.917-2.917 7.292-7.291 7.291 7.291-2.916 2.917-2.292-2.292Zm0 4.584v4.166h-4.167v-4.166h-2.083v4.166h-6.25A9.336 9.336 0 0 1 .25 20.208c0-4.166 2.708-7.708 6.25-8.958C7.333 5.208 12.542.417 19 .417c5.417 0 10.208 3.541 11.875 8.333 5 .625 8.958 5 8.958 10.417 0 5.416-4.166 9.791-9.375 10.416h-6.25v-4.166h-2.083Z",fill:"#999"},null,-1),d("path",{d:"M22.125 20.833v4.584h8.333c2.917-.417 5.209-3.125 5.209-6.25 0-3.542-2.709-6.25-6.25-6.25-.834 0-1.459.208-2.084.416v-.416c0-4.584-3.75-8.334-8.333-8.334s-8.333 3.75-8.333 8.334c0 .833.208 1.458.208 2.291C10.458 15 10.042 15 9.625 15c-2.917 0-5.208 2.292-5.208 5.208 0 2.917 2.291 5.209 5.208 5.209h8.333v-4.584l-2.291 2.292-2.917-2.917 7.292-7.291 7.291 7.291-2.916 2.917-2.292-2.292Zm0 4.584v4.166h-4.167v-4.166h-2.083v4.166h-6.25A9.336 9.336 0 0 1 .25 20.208c0-4.166 2.708-7.708 6.25-8.958C7.333 5.208 12.542.417 19 .417c5.417 0 10.208 3.541 11.875 8.333 5 .625 8.958 5 8.958 10.417 0 5.416-4.166 9.791-9.375 10.416h-6.25v-4.166h-2.083Z",fill:"#999"},null,-1)],I={render:function(e,t){return i(),r("svg",D,_)}},M=w.create({timeout:6e4,withCredentials:!1});// Unique ID creation requires a high quality random # generator. In the browser we therefore
// require the crypto API and do not support built-in fallback to lower quality random number
// generators (like Math.random()).
let M;T.interceptors.request.use((e=>e)),T.defaults.timeout=6e4,T.interceptors.response.use((e=>{const{data:t,status:a}=e;return 201==a||200==a?a:0===t.code?t:(y.error(t.msg||"请求错误"),Promise.reject(t.msg))}),(e=>{if("response"in e){const{message:t,status_code:a}=e.response.data;return 403==a?void b.replace({path:"/"}):(y.error(t||"请求错误"),e.response)}}));const Z=new Uint8Array(16);function j(){// lazy load so that environments that need to polyfill have a chance to do so
if(!M&&(// getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
M="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!M))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return M(Z)}
let T;M.interceptors.request.use((e=>e)),M.defaults.timeout=6e4,M.interceptors.response.use((e=>{const{data:t,status:a}=e;return 201==a||200==a?a:0===t.code?t:(y.error(t.msg||"请求错误"),Promise.reject(t.msg))}),(e=>{if("response"in e){const{message:t,status_code:a}=e.response.data;return 403==a?void b.replace({path:"/"}):(y.error(t||"请求错误"),e.response)}}));const Z=new Uint8Array(16);function R(){// lazy load so that environments that need to polyfill have a chance to do so
if(!T&&(// getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
T="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!T))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return T(Z)}
/**
* Convert array of 16 byte values to UUID string format of the form:
* XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
*/const K=[];for(let e=0;e<256;++e)K.push((e+256).toString(16).slice(1));const R={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function z(e,t,a){if(R.randomUUID&&!t&&!e)return R.randomUUID();const l=(e=e||{}).random||(e.rng||j)();// Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
*/const j=[];for(let e=0;e<256;++e)j.push((e+256).toString(16).slice(1));const H={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function K(e,t,a){if(H.randomUUID&&!t&&!e)return H.randomUUID();const l=(e=e||{}).random||(e.rng||R)();// Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
// Copy bytes to buffer, if provided
if(l[6]=15&l[6]|64,l[8]=63&l[8]|128,t){a=a||0;for(let e=0;e<16;++e)t[a+e]=l[e];return t}return function(e,t=0){// Note: Be careful editing this code! It's been tuned for performance
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
return(K[e[t+0]]+K[e[t+1]]+K[e[t+2]]+K[e[t+3]]+"-"+K[e[t+4]]+K[e[t+5]]+"-"+K[e[t+6]]+K[e[t+7]]+"-"+K[e[t+8]]+K[e[t+9]]+"-"+K[e[t+10]]+K[e[t+11]]+K[e[t+12]]+K[e[t+13]]+K[e[t+14]]+K[e[t+15]]).toLowerCase()}(l)}const B=a({props:{index:Number},emits:["DeleteUploadBox","TextareaChange","SubmitVideo","UploadVideo"],setup(e,{emit:t}){const a=c(),u=p((()=>a.getters["user/getAccount"])),i=p((()=>a.getters["user/getadminConfig"])),r=p((()=>a.getters["user/getuploadStrategy"]));let d="";const m=l([]),h=v({url:"",status:0}),g=l(""),f=l(""),b=l(0);// 文件地址
return(j[e[t+0]]+j[e[t+1]]+j[e[t+2]]+j[e[t+3]]+"-"+j[e[t+4]]+j[e[t+5]]+"-"+j[e[t+6]]+j[e[t+7]]+"-"+j[e[t+8]]+j[e[t+9]]+"-"+j[e[t+10]]+j[e[t+11]]+j[e[t+12]]+j[e[t+13]]+j[e[t+14]]+j[e[t+15]]).toLowerCase()}(l)}const z=a({props:{index:Number},emits:["DeleteUploadBox","TextareaChange","SubmitVideo","UploadVideo"],setup(e,{emit:t}){const a=c(),u=p((()=>a.getters["user/getAccount"])),i=p((()=>a.getters["user/getadminConfig"])),r=p((()=>a.getters["user/getuploadStrategy"]));let d="";const m=l([]),h=v({url:"",status:0}),g=l(""),f=l(""),b=l(0);// 文件地址
// 定时器
let V=null;// 是否加载删除按钮
const U=()=>{const{index:t}=e;return 0==t?"":s("span",{class:"real-upload-close-icon",onClick:C},[s(k,null,null)])},C=()=>{t("DeleteUploadBox",e.index)},A=a=>{t("TextareaChange",e.index,a)},S=()=>{// 先重置自己的,再通知父组件重置
g.value="",A(g.value),// 清空视频url
h.url="",h.status=0,t("UploadVideo",e.index,h.url)},D=()=>{// 开启一个定时器,模拟上传进度
b.value=0,V=setInterval((()=>{99!=b.value&&(b.value+=1)}),100)},_=e=>u.value?!!i.value||(y.warning("后台配置链接为空"),!1):(y.warning("请先选择一个账户"),!1),M=({file:e})=>{y.error(`文件 ${e.name} 上传失败`)},Z=(e,t)=>{}// return { name: 'FileName', url: response.url };
,j=a=>{// 关闭定时器
b.value=0,V=setInterval((()=>{99!=b.value&&(b.value+=1)}),100)},_=e=>u.value?!!i.value||(y.warning("后台配置链接为空"),!1):(y.warning("请先选择一个账户"),!1),T=({file:e})=>{y.error(`文件 ${e.name} 上传失败`)},Z=(e,t)=>{}// return { name: 'FileName', url: response.url };
,R=(a,l)=>{// 关闭定时器
window.clearInterval(V),y.success("上传成功"),// 将将完整url传给父组件
h.url=i.value+"video/"+a+".mp4",// 成功2
h.status=2,t("UploadVideo",e.index,h.url)},K=()=>{// 关闭定时器
h.url=l,// 成功2
h.status=2,t("UploadVideo",e.index,h.url)},j=()=>{// 关闭定时器
window.clearInterval(V),h.url="",// 失败0
h.status=0,t("UploadVideo",e.index,h.url),y.warning("上传失败")},R=async e=>r.value.oss?((e,t)=>(D(),new Promise((t=>{let a=z();// 上传中状态
h.status=0,t("UploadVideo",e.index,h.url),y.warning("上传失败")},H=e=>(D(),new Promise((t=>{let a=K();// 上传中状态
h.status=1;let l="";// 线上地址使用完整url
l=i.value+"video/"+a+".mp4",setTimeout((()=>{new XMLHttpRequest,// 中断上传
w.CancelToken,M.put(l,e[0].raw).then((e=>{// resolve 参数为关键代码
if(200==e){let e=i.value+"video/"+a+".mp4";R(0,e),t({status:"success",response:{url:h.url}})}else j()}))}// http.request(
// 'post',
// url,
// file[0].raw,
// function (res: any) {
// console.log(res);
// },
// function (err: any) {
// console.log(err);
// }
// );
),1e3)}))),z=async e=>{// 上传前将文件名放入textarea
let t=e[0].name.replace(".mp4","");return g.value=t,A(t),r.value.oss?((e,t)=>(D(),new Promise((t=>{let a=K();// 上传中状态
h.status=1;let l="";const{config:u}=r.value;// 线上
l="https://"+u.host,setTimeout((()=>{let s=new FormData;s.append("key",u.dir+a+".mp4"),s.append("policy",u.policy),s.append("OSSAccessKeyId",u.accessid),s.append("success_action_status","200"),s.append("callback",u.callback),s.append("signature",u.signature),// formData.append('name', uuid + '.mp4');
s.append("file",e[0].raw),T.post(l,s,{headers:{"Content-Type":"multipart/form-data;charset=utf-8"}}).then((e=>{// resolve 参数为关键代码
200==e?(j(a),t({status:"success",response:{url:h.url}})):K()}))}),1e3)}))))(e,r.value.config):(e=>(D(),new Promise((t=>{let a=z();// 上传中状态
h.status=1;let l="";// 线上地址使用完整url
l="http://192.168.1.19:5000/video/"+a+".mp4",setTimeout((()=>{// 中断上传
const u=w.CancelToken;T.put(l,e[0].raw,{cancelToken:new u((function(e){}))}).then((e=>{// resolve 参数为关键代码
201==e?(j(a),t({status:"success",response:{url:h.url}})):K()}))}),1e3)}))))(e),B=()=>0==h.status?s(n("t-upload"),{modelValue:m.value,"onUpdate:modelValue":e=>m.value=e,method:"PUT",requestMethod:R,action:f.value,headers:{authorization:`Bearer ${x()}`},tips:d,accept:"video",theme:"custom","before-upload":_,multiple:!0,max:1,draggable:!0,formatResponse:Z,onfail:M,onsuccess:d=""},{default:()=>[s("div",{class:"custom-upload-click-box"},[s("div",{class:"title"},[o("选择视频")]),s("div",{class:"title2"},[o("或拖视频到此处上传")]),s("div",null,[s(I,null,null)]),s(n("t-button"),{class:"custom-chose-file"},{default:()=>[o("选择文件")]})])]}):1==h.status?s("div",{class:"custom-uploading-stauts"},[s(n("t-progress"),{theme:"circle",percentage:b.value,size:"small"},null),s("div",{class:"uploading-title"},[o("正在上传")])]):s("div",{class:"custom-UploadSuccess-stauts"},[s("div",{class:"title1"},[o("上传完成")]),s("div",{class:"title1"},[o("点击下方发布按钮发布视频")])]),H=()=>{t("SubmitVideo",e.index)};return()=>s("div",{class:"custom-real-upload"},[U(),s("div",{class:"real-upload-content"},[s("div",{class:"upload-textarea"},[s(n("t-textarea"),{placeholder:"请输入内容",autosize:{minRows:3,maxRows:5},modelValue:g.value,"onUpdate:modelValue":e=>g.value=e,onChange:A},null)]),s("div",{class:"custom-real-upload-component"},[B()])]),s("div",{class:"custom-real-upload-footer"},[s(n("t-button"),{onClick:H,class:["submit",h.url&&g.value?"active":""]},{default:()=>[o("发布")]}),s(n("t-button"),{class:"reset-button",onClick:S},{default:()=>[o("重置")]})])])}}),H={width:"24",height:"24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},F=[d("path",{d:"M21.1 9.375c.317 0 .62.063.912.188.292.124.542.291.75.5.209.208.375.458.5.75.125.291.188.595.188.912 0 .333-.063.642-.188.925-.125.283-.291.53-.5.737a2.364 2.364 0 0 1-.75.5 2.293 2.293 0 0 1-.912.188h-7.025V21.1c0 .333-.063.642-.188.925-.125.283-.291.53-.5.738a2.364 2.364 0 0 1-.75.5 2.293 2.293 0 0 1-.912.187c-.333 0-.642-.063-.925-.188a2.404 2.404 0 0 1-.738-.5 2.403 2.403 0 0 1-.5-.737 2.266 2.266 0 0 1-.187-.925v-7.025H2.35c-.333 0-.642-.063-.925-.188a2.404 2.404 0 0 1-.738-.5 2.403 2.403 0 0 1-.5-.737A2.266 2.266 0 0 1 0 11.725c0-.317.063-.62.188-.912.124-.292.291-.542.5-.75.208-.209.454-.376.737-.5.283-.126.592-.188.925-.188h7.025V2.35c0-.317.063-.62.188-.913.124-.291.291-.541.5-.75.208-.208.454-.375.737-.5.283-.124.592-.187.925-.187.65 0 1.204.23 1.662.688.459.458.688 1.012.688 1.662v7.025H21.1Z",fill:"#FD1753"},null,-1),d("path",{d:"M21.1 9.375c.317 0 .62.063.912.188.292.124.542.291.75.5.209.208.375.458.5.75.125.291.188.595.188.912 0 .333-.063.642-.188.925-.125.283-.291.53-.5.737a2.364 2.364 0 0 1-.75.5 2.293 2.293 0 0 1-.912.188h-7.025V21.1c0 .333-.063.642-.188.925-.125.283-.291.53-.5.738a2.364 2.364 0 0 1-.75.5 2.293 2.293 0 0 1-.912.187c-.333 0-.642-.063-.925-.188a2.404 2.404 0 0 1-.738-.5 2.403 2.403 0 0 1-.5-.737 2.266 2.266 0 0 1-.187-.925v-7.025H2.35c-.333 0-.642-.063-.925-.188a2.404 2.404 0 0 1-.738-.5 2.403 2.403 0 0 1-.5-.737A2.266 2.266 0 0 1 0 11.725c0-.317.063-.62.188-.912.124-.292.291-.542.5-.75.208-.209.454-.376.737-.5.283-.126.592-.188.925-.188h7.025V2.35c0-.317.063-.62.188-.913.124-.291.291-.541.5-.75.208-.208.454-.375.737-.5.283-.124.592-.187.925-.187.65 0 1.204.23 1.662.688.459.458.688 1.012.688 1.662v7.025H21.1Z",fill:"#FD1753"},null,-1)],P={render:function(e,t){return i(),r("svg",H,F)}},E=a({setup(e){const t=c(),a=l([]),o=l(1),i=l(10),r=l(0),d=l(!1),v=p((()=>t.getters["user/getAccount"])),h=async()=>{try{if(!v.value)return;d.value=!0;let e=await V({limit:i.value,page:o.value,account_id:v.value});0==e.code&&(e.data.data.forEach((e=>{e.n_title=e.parameters.title})),a.value=e.data.data,r.value=e.data.total),d.value=!1}catch(e){d.value=!1}};m((()=>v.value),(e=>{e&&(o.value=1,h())})),m((()=>i.value),(e=>{// 页数变化重新请求
s.append("file",e[0].raw),M.post(l,s,{headers:{"Content-Type":"multipart/form-data;charset=utf-8"}}).then((e=>{// resolve 参数为关键代码
if(200==e){// 外网url
let e=u.domain+"video/"+a+".mp4";R(0,e),t({status:"success",response:{url:h.url}})}else j()}))}),1e3)}))))(e,r.value.config):H(e)},B=()=>0==h.status?s(n("t-upload"),{modelValue:m.value,"onUpdate:modelValue":e=>m.value=e,method:"PUT",requestMethod:z,action:f.value,headers:{authorization:`Bearer ${x()}`},tips:d,accept:"video",theme:"custom","before-upload":_,multiple:!0,max:1,draggable:!0,formatResponse:Z,onfail:T,onsuccess:d=""},{default:()=>[s("div",{class:"custom-upload-click-box"},[s("div",{class:"title"},[o("选择视频")]),s("div",{class:"title2"},[o("或拖视频到此处上传")]),s("div",null,[s(I,null,null)]),s(n("t-button"),{class:"custom-chose-file"},{default:()=>[o("选择文件")]})])]}):1==h.status?s("div",{class:"custom-uploading-stauts"},[s(n("t-progress"),{theme:"circle",percentage:b.value,size:"small"},null),s("div",{class:"uploading-title"},[o("正在上传")])]):s("div",{class:"custom-UploadSuccess-stauts"},[s("div",{class:"title1"},[o("上传完成")]),s("div",{class:"title1"},[o("点击下方发布按钮发布视频")])]),F=()=>{t("SubmitVideo",e.index)};return()=>s("div",{class:"custom-real-upload"},[U(),s("div",{class:"real-upload-content"},[s("div",{class:"upload-textarea"},[s(n("t-textarea"),{placeholder:"请输入内容",autosize:{minRows:3,maxRows:5},modelValue:g.value,"onUpdate:modelValue":e=>g.value=e,onChange:A},null)]),s("div",{class:"custom-real-upload-component"},[B()])]),s("div",{class:"custom-real-upload-footer"},[s(n("t-button"),{onClick:F,class:["submit",h.url&&g.value?"active":""]},{default:()=>[o("发布")]}),s(n("t-button"),{class:"reset-button",onClick:S},{default:()=>[o("重置")]})])])}}),B={width:"24",height:"24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},F=[d("path",{d:"M21.1 9.375c.317 0 .62.063.912.188.292.124.542.291.75.5.209.208.375.458.5.75.125.291.188.595.188.912 0 .333-.063.642-.188.925-.125.283-.291.53-.5.737a2.364 2.364 0 0 1-.75.5 2.293 2.293 0 0 1-.912.188h-7.025V21.1c0 .333-.063.642-.188.925-.125.283-.291.53-.5.738a2.364 2.364 0 0 1-.75.5 2.293 2.293 0 0 1-.912.187c-.333 0-.642-.063-.925-.188a2.404 2.404 0 0 1-.738-.5 2.403 2.403 0 0 1-.5-.737 2.266 2.266 0 0 1-.187-.925v-7.025H2.35c-.333 0-.642-.063-.925-.188a2.404 2.404 0 0 1-.738-.5 2.403 2.403 0 0 1-.5-.737A2.266 2.266 0 0 1 0 11.725c0-.317.063-.62.188-.912.124-.292.291-.542.5-.75.208-.209.454-.376.737-.5.283-.126.592-.188.925-.188h7.025V2.35c0-.317.063-.62.188-.913.124-.291.291-.541.5-.75.208-.208.454-.375.737-.5.283-.124.592-.187.925-.187.65 0 1.204.23 1.662.688.459.458.688 1.012.688 1.662v7.025H21.1Z",fill:"#FD1753"},null,-1),d("path",{d:"M21.1 9.375c.317 0 .62.063.912.188.292.124.542.291.75.5.209.208.375.458.5.75.125.291.188.595.188.912 0 .333-.063.642-.188.925-.125.283-.291.53-.5.737a2.364 2.364 0 0 1-.75.5 2.293 2.293 0 0 1-.912.188h-7.025V21.1c0 .333-.063.642-.188.925-.125.283-.291.53-.5.738a2.364 2.364 0 0 1-.75.5 2.293 2.293 0 0 1-.912.187c-.333 0-.642-.063-.925-.188a2.404 2.404 0 0 1-.738-.5 2.403 2.403 0 0 1-.5-.737 2.266 2.266 0 0 1-.187-.925v-7.025H2.35c-.333 0-.642-.063-.925-.188a2.404 2.404 0 0 1-.738-.5 2.403 2.403 0 0 1-.5-.737A2.266 2.266 0 0 1 0 11.725c0-.317.063-.62.188-.912.124-.292.291-.542.5-.75.208-.209.454-.376.737-.5.283-.126.592-.188.925-.188h7.025V2.35c0-.317.063-.62.188-.913.124-.291.291-.541.5-.75.208-.208.454-.375.737-.5.283-.124.592-.187.925-.187.65 0 1.204.23 1.662.688.459.458.688 1.012.688 1.662v7.025H21.1Z",fill:"#FD1753"},null,-1)],P={render:function(e,t){return i(),r("svg",B,F)}},q=a({setup(e){const t=c(),a=l([]),o=l(1),i=l(10),r=l(0),d=l(!1),v=p((()=>t.getters["user/getAccount"])),h=async()=>{try{d.value=!0;let e=await V({limit:i.value,page:o.value,account_id:v.value?v.value:void 0});0==e.code&&(e.data.data.forEach((e=>{e.n_title=e.parameters.title})),a.value=e.data.data,r.value=e.data.total),d.value=!1}catch(e){d.value=!1}};m((()=>v.value),(e=>{o.value=1,h()})),m((()=>i.value),(e=>{// 页数变化重新请求
h()})),u((()=>{// 请求表格
h()}));const g=e=>{h()},f=[{title:"账号",colKey:"account_name"},{title:"内容",colKey:"n_title"},{title:"发布",colKey:"status_label"},{title:"发布时间",colKey:"publish_time"}];return()=>s("div",{class:"custom-submit-table"},[s(n("t-table"),{data:a.value,"row-key":"index",columns:f,hover:!0,ShowJumper:!0,loading:d.value},null),s("div",{class:"custom-pagination-box"},[s(n("t-pagination"),{pageNum:o.value,"onUpdate:pageNum":e=>o.value=e,pageSize:i.value,"onUpdate:pageSize":e=>i.value=e,total:r.value,onCurrentChange:g},null)])])}});e("default",a({setup(){const e=c(),a=p((()=>e.getters["user/getAccount"])),n=p((()=>e.getters["user/getadminConfig"])),i=l(!1);// 用户选择的账号
u((()=>{e.dispatch("user/AdminConfig")}));const r=l([{textValue:"",files:""}]),d=l("upload");// 默认展示的内容
let v={textValue:"",files:""};const m=()=>{r.value.push(v)},f=e=>{// 根据下标删除数组对象
r.value.splice(e,1)},w=(e,t)=>{r.value[e].files=t},b=(e,t)=>{r.value[e].textValue=t},x=async e=>{try{if(!(n.value&&a.value&&r.value[e].files&&r.value[e].textValue))return;let t={video_url:r.value[e].files,title:r.value[e].textValue};i.value=!0,0==(await U({account_id:a.value,parameters:[t]})).code?y.success("发布成功"):y.success("发布失败"),i.value=!1}catch(t){i.value=!1}};return()=>s("div",{class:"custom-upload-page narrow-scrollbar"},[s("div",{class:"custom-upload-page-child"},[s(t,{modelValue:d.value,"onUpdate:modelValue":e=>d.value=e},null),h(s("div",null,[s("div",{class:"custom-upload-box"},[s("span",{class:"custom-upload-title"},[o("上传视频")]),r.value.map(((e,t)=>s(B,{index:t,onDeleteUploadBox:f,onTextareaChange:b,onSubmitVideo:x,onUploadVideo:w},null)))]),s("div",{class:"custom-add-new-upload",onClick:m},[s(P,null,null),s("span",null,[o("新添新上传视频")])])]),[[g,"upload"==d.value]]),"upload"!=d.value?s(E,null,null):""]),h(s(C,{poistion:"fixed",background:"rgba(200,200,200,0.2)"},null),[[g,i.value]])])}}))}}}));
r.value.splice(e,1)},w=(e,t)=>{r.value[e].files=t},b=(e,t)=>{r.value[e].textValue=t},x=async e=>{try{if(!(n.value&&a.value&&r.value[e].files&&r.value[e].textValue))return;let t={video_url:r.value[e].files,title:r.value[e].textValue};i.value=!0,0==(await U({account_id:a.value,parameters:[t]})).code?y.success("发布成功"):y.success("发布失败"),i.value=!1}catch(t){i.value=!1}};return()=>s("div",{class:"custom-upload-page narrow-scrollbar"},[s("div",{class:"custom-upload-page-child"},[s(t,{modelValue:d.value,"onUpdate:modelValue":e=>d.value=e},null),h(s("div",null,[s("div",{class:"custom-upload-box"},[s("span",{class:"custom-upload-title"},[o("上传视频")]),r.value.map(((e,t)=>s(z,{index:t,onDeleteUploadBox:f,onTextareaChange:b,onSubmitVideo:x,onUploadVideo:w},null)))]),s("div",{class:"custom-add-new-upload",onClick:m},[s(P,null,null),s("span",null,[o("新添新上传视频")])])]),[[g,"upload"==d.value]]),"upload"!=d.value?s(q,null,null):""]),h(s(C,{poistion:"fixed",background:"rgba(200,200,200,0.2)"},null),[[g,i.value]])])}}))}}}));
System.register(["./vue-legacy-3fa9a658.js","./index-legacy-87ce98c4.js","./Animation-legacy-f2d58539.js"],(function(e,t){"use strict";var r,a,o,l,n,c,s,i,u,p,d,v,f,m,y,g,b,h,O,w,j,k;return{setters:[e=>{r=e.d,a=e.b,o=e.r,l=e.l,n=e.H,c=e.J,s=e.e,i=e.N,u=e.L,p=e.Q,d=e.j,v=e.B,f=e.K,m=e.R,y=e.S,g=e.I},e=>{b=e.u,h=e.r,O=e._,w=e.M,j=e.U},e=>{k=e.A}],execute:function(){function t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function P(e){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?t(Object(a),!0).forEach((function(t){O(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):t(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var _={tag:"svg",attrs:{fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M2.5 11h5v2H3v1h10v-1H8.5v-2h5a1 1 0 001-1V3a1 1 0 00-1-1h-11a1 1 0 00-1 1v7a1 1 0 001 1zm0-8h11v7h-11V3z",fillOpacity:.9}}]},V=r({name:"DesktopIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,t){var{attrs:r}=t,o=a((()=>e.size)),{className:l,style:n}=b(o),c=a((()=>["t-icon","t-icon-desktop",l.value])),s=a((()=>P(P({},n.value),r.style))),i=a((()=>({class:c.value,style:s.value,onClick:t=>{var r;return null===(r=e.onClick)||void 0===r?void 0:r.call(e,{e:t})}})));return()=>h(_,i.value)}});function z(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function x(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?z(Object(r),!0).forEach((function(t){O(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):z(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var C={tag:"svg",attrs:{fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M6 10v1h4v-1H6z",fillOpacity:.9}},{tag:"path",attrs:{fill:"currentColor",d:"M4.5 5v1H3a.5.5 0 00-.5.5v7c0 .28.22.5.5.5h10a.5.5 0 00.5-.5v-7A.5.5 0 0013 6h-1.5V5a3.5 3.5 0 00-7 0zm6 1h-5V5a2.5 2.5 0 015 0v1zm-7 1h9v6h-9V7z",fillOpacity:.9}}]},D=r({name:"LockOnIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,t){var{attrs:r}=t,o=a((()=>e.size)),{className:l,style:n}=b(o),c=a((()=>["t-icon","t-icon-lock-on",l.value])),s=a((()=>x(x({},n.value),r.style))),i=a((()=>({class:c.value,style:s.value,onClick:t=>{var r;return null===(r=e.onClick)||void 0===r?void 0:r.call(e,{e:t})}})));return()=>h(C,i.value)}});const S={class:"custom-login"},E=f("div",{class:"custom-login-title"},"登录",-1),H=r({__name:"login",setup(e){const t=m(),r=y(),f=o(!1),b=l({account:"",password:""}),h=a((()=>({account:[{required:!0,messgae:"账号不能为空",type:"error"}],password:[{required:!0,message:"密码不能为空",type:"error"}]}))),O=()=>{w.success("重置成功")},P=async({validateResult:e,firstError:a})=>{if(!0===e)try{f.value=!0;let e=await j({email:b.account,password:b.password});0==e.code&&(w.success("登录成功"),r.commit("user/setToken",{token:e.data.access_token,time:e.data.expires_in}),t.replace({path:"/upload"})),f.value=!1}catch(o){f.value=!1}else w.closeAll(),w.warning(a)};return(e,t)=>{const r=g("t-input"),a=g("t-form-item"),o=g("t-button"),l=g("t-form");return n(),c("div",S,[E,s(l,{ref:"form",class:"custom-login-form",data:b,rules:u(h),colon:!0,"label-width":0,onReset:O,onSubmit:P},{default:i((()=>[s(a,{name:"account"},{default:i((()=>[s(r,{modelValue:b.account,"onUpdate:modelValue":t[0]||(t[0]=e=>b.account=e),clearable:"",placeholder:"请输入账户名"},{"prefix-icon":i((()=>[s(u(V))])),_:1},8,["modelValue"])])),_:1}),s(a,{name:"password"},{default:i((()=>[s(r,{modelValue:b.password,"onUpdate:modelValue":t[1]||(t[1]=e=>b.password=e),type:"password",clearable:"",placeholder:"请输入密码"},{"prefix-icon":i((()=>[s(u(D))])),_:1},8,["modelValue"])])),_:1}),s(a,null,{default:i((()=>[s(o,{theme:"primary",type:"submit",block:""},{default:i((()=>[p("登录")])),_:1})])),_:1})])),_:1},8,["data","rules"]),d(s(k,{poistion:"fixed",background:"rgba(200,200,200,0.2)"},null,512),[[v,f.value]])])}}}),A={class:"custom-home-page-login"};e("default",r({__name:"index",setup:e=>(e,t)=>(n(),c("div",A,[s(H)]))}))}}}));
System.register(["./vue-legacy-3fa9a658.js","./index-legacy-01b3f2d3.js","./Animation-legacy-7598f867.js"],(function(e,t){"use strict";var r,a,o,l,n,c,s,i,u,p,d,v,f,m,y,g,b,h,O,w,j,k;return{setters:[e=>{r=e.d,a=e.b,o=e.r,l=e.l,n=e.H,c=e.J,s=e.e,i=e.N,u=e.L,p=e.Q,d=e.j,v=e.B,f=e.K,m=e.R,y=e.S,g=e.I},e=>{b=e.u,h=e.r,O=e._,w=e.M,j=e.U},e=>{k=e.A}],execute:function(){function t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function P(e){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?t(Object(a),!0).forEach((function(t){O(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):t(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var _={tag:"svg",attrs:{fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M2.5 11h5v2H3v1h10v-1H8.5v-2h5a1 1 0 001-1V3a1 1 0 00-1-1h-11a1 1 0 00-1 1v7a1 1 0 001 1zm0-8h11v7h-11V3z",fillOpacity:.9}}]},V=r({name:"DesktopIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,t){var{attrs:r}=t,o=a((()=>e.size)),{className:l,style:n}=b(o),c=a((()=>["t-icon","t-icon-desktop",l.value])),s=a((()=>P(P({},n.value),r.style))),i=a((()=>({class:c.value,style:s.value,onClick:t=>{var r;return null===(r=e.onClick)||void 0===r?void 0:r.call(e,{e:t})}})));return()=>h(_,i.value)}});function z(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function x(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?z(Object(r),!0).forEach((function(t){O(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):z(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var C={tag:"svg",attrs:{fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M6 10v1h4v-1H6z",fillOpacity:.9}},{tag:"path",attrs:{fill:"currentColor",d:"M4.5 5v1H3a.5.5 0 00-.5.5v7c0 .28.22.5.5.5h10a.5.5 0 00.5-.5v-7A.5.5 0 0013 6h-1.5V5a3.5 3.5 0 00-7 0zm6 1h-5V5a2.5 2.5 0 015 0v1zm-7 1h9v6h-9V7z",fillOpacity:.9}}]},D=r({name:"LockOnIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,t){var{attrs:r}=t,o=a((()=>e.size)),{className:l,style:n}=b(o),c=a((()=>["t-icon","t-icon-lock-on",l.value])),s=a((()=>x(x({},n.value),r.style))),i=a((()=>({class:c.value,style:s.value,onClick:t=>{var r;return null===(r=e.onClick)||void 0===r?void 0:r.call(e,{e:t})}})));return()=>h(C,i.value)}});const S={class:"custom-login"},E=f("div",{class:"custom-login-title"},"登录",-1),H=r({__name:"login",setup(e){const t=m(),r=y(),f=o(!1),b=l({account:"",password:""}),h=a((()=>({account:[{required:!0,messgae:"账号不能为空",type:"error"}],password:[{required:!0,message:"密码不能为空",type:"error"}]}))),O=()=>{w.success("重置成功")},P=async({validateResult:e,firstError:a})=>{if(!0===e)try{f.value=!0;let e=await j({email:b.account,password:b.password});0==e.code&&(w.success("登录成功"),r.commit("user/setToken",{token:e.data.access_token,time:e.data.expires_in}),t.replace({path:"/upload"})),f.value=!1}catch(o){f.value=!1}else w.closeAll(),w.warning(a)};return(e,t)=>{const r=g("t-input"),a=g("t-form-item"),o=g("t-button"),l=g("t-form");return n(),c("div",S,[E,s(l,{ref:"form",class:"custom-login-form",data:b,rules:u(h),colon:!0,"label-width":0,onReset:O,onSubmit:P},{default:i((()=>[s(a,{name:"account"},{default:i((()=>[s(r,{modelValue:b.account,"onUpdate:modelValue":t[0]||(t[0]=e=>b.account=e),clearable:"",placeholder:"请输入账户名"},{"prefix-icon":i((()=>[s(u(V))])),_:1},8,["modelValue"])])),_:1}),s(a,{name:"password"},{default:i((()=>[s(r,{modelValue:b.password,"onUpdate:modelValue":t[1]||(t[1]=e=>b.password=e),type:"password",clearable:"",placeholder:"请输入密码"},{"prefix-icon":i((()=>[s(u(D))])),_:1},8,["modelValue"])])),_:1}),s(a,null,{default:i((()=>[s(o,{theme:"primary",type:"submit",block:""},{default:i((()=>[p("登录")])),_:1})])),_:1})])),_:1},8,["data","rules"]),d(s(k,{poistion:"fixed",background:"rgba(200,200,200,0.2)"},null,512),[[v,f.value]])])}}}),A={class:"custom-home-page-login"};e("default",r({__name:"index",setup:e=>(e,t)=>(n(),c("div",A,[s(H)]))}))}}}));
......@@ -8,7 +8,7 @@
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
/>
<title>TikTok-upload</title>
<script type="module" crossorigin src="/assets/index-dae4a232.js"></script>
<script type="module" crossorigin src="/assets/index-06b4a16d.js"></script>
<link rel="modulepreload" crossorigin href="/assets/vue-f8fdfec2.js">
<link rel="stylesheet" href="/assets/style-bd54347d.css">
<script type="module">try{import.meta.url;import("_").catch(()=>1);}catch(e){}window.__vite_is_modern_browser=true;</script>
......@@ -19,6 +19,6 @@
<script nomodule>!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",(function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()}),!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script>
<script nomodule crossorigin id="vite-legacy-polyfill" src="/assets/polyfills-legacy-b1e0acc8.js"></script>
<script nomodule crossorigin id="vite-legacy-entry" data-src="/assets/index-legacy-87ce98c4.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
<script nomodule crossorigin id="vite-legacy-entry" data-src="/assets/index-legacy-01b3f2d3.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
</body>
</html>
192.168.1.1:3000
\ No newline at end of file
const path = require('path');
const express = require('express');
const { createProxyMiddleware } = require('http-proxy-middleware');
// const history = require('connect-history-api-fallback');
const app = express();
// 处理单页应用路由
// app.use(history());
// 代理对象地址
// 读取本地配置的ip
app.use(
'/video',
createProxyMiddleware({
target: 'http://192.168.1.19:5000',
changeOrigin: true,
// pathRewrite: {
// '^api': '',
// },
})
);
// 加载静态资源
app.use(express.static(path.join(__dirname, './dist')));
// 启动服务
app.listen(3001, () => {
console.log('success => http://localhost:3001');
});
......@@ -14,7 +14,7 @@ export default defineConfig(({ command, mode }) => {
}-${date.getDate()}--${date.getHours()}.${date.getMinutes()}`;
let api = 0 ? 'http://silkr.net' : 'http://video_publish.test';
return {
base: mode == 'app' ? './' : '/',
base: '/',
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
......@@ -47,7 +47,7 @@ export default defineConfig(({ command, mode }) => {
],
build: {
minify: 'terser', // 混淆器,terser构建后文件体积更小
outDir: `tiktok-upload-${newDate}`, //指定输出路径
outDir: mode != 'app' ? `tiktok-upload-${newDate}` : 'dist', //指定输出路径
cssCodeSplit: false, // 如果设置为false,整个项目中的所有 CSS 将被提取到一个 CSS 文件中
terserOptions: {
compress: {
......@@ -60,6 +60,7 @@ export default defineConfig(({ command, mode }) => {
comments: true,
},
},
// http-server -P http://142.194.143.229
// target: 'es2015',
rollupOptions: {
output: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment