Commit e83d0883 by haojie

1

parent b2cc98e7
......@@ -3,6 +3,15 @@
<div class="layout-head-left">
<LeftSvg></LeftSvg>
<span>TikToK视频上传</span>
<div
class="layout-chose-button"
v-for="item in btns"
:key="item.path"
@click="changeBtn(item)"
:class="{ active: item.path === currentBtn }"
>
{{ item.label }}
</div>
</div>
<div class="layout-head-right">
<RightSvg></RightSvg>
......@@ -13,6 +22,27 @@
<script lang="ts" setup>
import LeftSvg from '@/assets/svg/header/headerLeft.svg?component';
import RightSvg from '@/assets/svg/header/headerRight.svg?component';
import { ref } from '@vue/reactivity';
import { useRoute, useRouter } from 'vue-router';
const route = useRoute();
const router = useRouter();
const currentBtn = ref(route.path);
const btns = [
{
label: '上传视频',
path: '/upload',
},
{
label: '上传链接',
path: '/uploadlink',
},
];
const changeBtn = (item: any) => {
currentBtn.value = item.path;
router.replace({
path: item.path,
});
};
</script>
<style lang="less">
......@@ -29,8 +59,19 @@ import RightSvg from '@/assets/svg/header/headerRight.svg?component';
font-weight: 700;
font-size: 24px;
}
}
.layout-head-right {
.layout-chose-button {
margin-left: 80px;
font-size: 18px;
color: #413f3f;
transition: all 0.1s;
cursor: pointer;
}
.active {
color: #fd1753;
font-size: 20px;
font-weight: 600;
transition: all 0.1s;
}
}
}
</style>
import { defineComponent, onMounted, ref } from 'vue';
import { computed, defineComponent, onMounted, ref } from 'vue';
import './index.less';
import { ChoseAccount } from '@/utils/api/userApi';
import { useStore } from 'vuex';
export default defineComponent({
props: {
modelValue: String,
record: Boolean,
},
emits: ['update:modelValue'],
emits: ['update:modelValue', 'update:accountId'],
setup(props, { emit }) {
const store = useStore();
const options = ref([]);
// 选择列表
const AccountOptions = computed(() => store.getters['user/getOptions']);
const value = ref('');
const handleBlur = ({ value, e }: any) => {
console.log('handleBlur: ', value, e);
......@@ -19,26 +20,12 @@ export default defineComponent({
console.log('handleFocus: ', value, e);
};
const handleChange = (value: number) => {
store.commit('user/setUserChoseAccount', value);
emit('update:accountId', value);
};
const handleEnter = ({ value, e, inputValue }: any) => {
console.log('handleEnter: ', value, e, inputValue);
};
const getAccount = async () => {
try {
let res: any = await ChoseAccount();
if (res.code == 0 && res.data.length) {
res.data.forEach((item: any) => {
item.label = item.name + '-' + item.region;
item.value = item.account_id;
});
options.value = res.data;
}
} catch (e) {
console.log(e);
}
};
// 切换展示的内容
const onChangeType = () => {
const { modelValue } = props;
......@@ -49,7 +36,9 @@ export default defineComponent({
}
};
onMounted(() => {
getAccount();
if (!AccountOptions.value.length) {
store.dispatch('user/AcountOptions');
}
});
return () => (
<div class="custom-chose-account">
......@@ -59,7 +48,7 @@ export default defineComponent({
class="chose-account-select"
v-model={value.value}
placeholder={'选择一个账户'}
options={options.value}
options={AccountOptions.value}
style="width: 200px; display: inline-block;"
filterable
onblur={handleBlur}
......@@ -69,9 +58,13 @@ export default defineComponent({
/>
</div>
<div class="choose-account-right">
<t-button onClick={onChangeType}>
{props.modelValue == 'upload' ? '发布记录' : '发布视频'}
</t-button>
{props.record ? (
<t-button onClick={onChangeType}>
{props.modelValue == 'upload' ? '发布记录' : '发布视频'}
</t-button>
) : (
''
)}
</div>
</div>
);
......
import { computed, defineComponent, reactive, ref } from 'vue';
import { computed, defineComponent, PropType, reactive, ref } from 'vue';
import './upload.less';
import CloseSvg from '@/assets/svg/upload/close.svg?component';
import UploadTip from '@/assets/svg/upload/uploadTip.svg?component';
......@@ -12,11 +12,13 @@ import { xhr } from '@/utils/xhr';
export default defineComponent({
props: {
index: Number,
accountId: {
type: Number as PropType<number | null>,
},
},
emits: ['DeleteUploadBox', 'TextareaChange', 'SubmitVideo', 'UploadVideo'],
setup(props, { emit }) {
const store = useStore();
const userAccount = computed(() => store.getters['user/getAccount']);
// 后台配置的地址
const adminConfigUrl = computed(() => store.getters['user/getadminConfig']);
// 上传策略
......@@ -29,6 +31,8 @@ export default defineComponent({
const Curfile = reactive({
url: '',
status: 0,
// 当前上传模块提交的状态
uploadStatus: false,
});
const textValue = ref('');
const actionUrl = ref('');
......@@ -84,7 +88,7 @@ export default defineComponent({
}, 100);
};
const beforeUpload = (file: File) => {
if (!userAccount.value) {
if (!props.accountId) {
MessagePlugin.warning('请先选择一个账户');
return false;
} else if (!adminConfigUrl.value) {
......@@ -152,12 +156,16 @@ export default defineComponent({
if (res == 200) {
let url = adminConfigUrl.value + 'video/' + uuid + '.mp4';
UploadSuccessCallback(uuid, url);
//
Curfile.uploadStatus = true;
resolve({
status: 'success',
response: { url: Curfile.url },
});
} else {
UploadErrorCallback();
//
Curfile.uploadStatus = false;
}
});
// http.request(
......@@ -212,14 +220,17 @@ export default defineComponent({
// resolve 参数为关键代码
if (res == 200) {
// 外网url
let url = config.domain + 'video/' + uuid + '.mp4';
let url = config.domain + config.dir + uuid + '.mp4';
UploadSuccessCallback(uuid, url);
//
Curfile.uploadStatus = true;
resolve({
status: 'success',
response: { url: Curfile.url },
});
} else {
UploadErrorCallback();
Curfile.uploadStatus = false;
}
});
}, 1000);
......@@ -306,7 +317,12 @@ export default defineComponent({
};
// 发布视频
const submitVideo = () => {
if (!Curfile.uploadStatus) {
return;
}
emit('SubmitVideo', props.index);
//
Curfile.uploadStatus = false;
};
return () => (
<div class="custom-real-upload">
......@@ -327,7 +343,12 @@ export default defineComponent({
<div class="custom-real-upload-footer">
<t-button
onClick={submitVideo}
class={['submit', Curfile.url && textValue.value ? 'active' : '']}
class={[
'submit',
Curfile.url && textValue.value && Curfile.uploadStatus
? 'active'
: '',
]}
>
发布
</t-button>
......
......@@ -51,6 +51,7 @@ export default defineComponent({
getList();
});
const onPageChange = (value: number) => {
pageNum.value = value;
getList();
};
const columns: any = [
......
......@@ -11,10 +11,10 @@ import UploadTable from './compontent/uploadTable';
export default defineComponent({
setup() {
const store = useStore();
// 用户选择的账号
const accountId = computed(() => store.getters['user/getAccount']);
// 后台配置的地址
const adminConfigUrl = computed(() => store.getters['user/getadminConfig']);
// 用户选择的账号
const accountId = ref(null);
const loading = ref(false);
onMounted(() => {
store.dispatch('user/AdminConfig');
......@@ -85,6 +85,7 @@ export default defineComponent({
{uploadList.value.map((item: any, index: number) => (
<Upload
index={index}
accountId={accountId.value}
onDeleteUploadBox={ondeleteUploadBox}
onTextareaChange={TextareaChange}
onSubmitVideo={SubmitVideo}
......@@ -102,9 +103,15 @@ export default defineComponent({
return () => (
<div class="custom-upload-page narrow-scrollbar">
<div class="custom-upload-page-child">
<SelectAccount v-model={defaultType.value}></SelectAccount>
{uploadVideoHtml()}
{defaultType.value != 'upload' ? <UploadTable></UploadTable> : ''}
<div>
<SelectAccount
v-model={defaultType.value}
v-model:accountId={accountId.value}
record={true}
></SelectAccount>
{uploadVideoHtml()}
{defaultType.value != 'upload' ? <UploadTable></UploadTable> : ''}
</div>
</div>
<Animation
v-show={loading.value}
......
.custom-upload-link-page {
flex: 1;
background: #f9f9f9;
max-height: calc(100vh - 60px);
overflow-y: auto;
.custom-upload-link-page-child {
width: 1270px;
margin: 0 auto;
background: white;
min-height: 300px;
margin-top: 72px;
padding: 30px 60px;
.upload-link-box {
margin-top: 30px;
.label {
font-weight: 700;
font-size: 20px;
color: #000000;
}
.value {
margin-top: 20px;
.t-input__wrap {
height: 55px;
.t-input {
height: 100%;
}
}
}
.submit-btn {
margin-top: 20px;
background: #ebebeb;
border-radius: 8px;
color: #9a9a9a;
width: 164px;
height: 46px;
border: none;
--ripple-color: none !important;
cursor: not-allowed;
}
.active {
background: #fd1753;
color: #ffffff;
cursor: pointer;
}
}
}
}
import { defineComponent, ref } from 'vue';
import SelectAccount from '@/pages/upload/compontent/selectAccount';
import './index.less';
import { SubmitLink } from '@/utils/api/userApi';
import { MessagePlugin } from 'tdesign-vue-next';
import Animation from '@/components/Animation.vue';
export default defineComponent({
setup(props) {
const accountId = ref(null);
const inputValue = ref('');
const BtnStatus = ref(false);
const loading = ref(false);
const inputchange = (value: string) => {
if (value) {
BtnStatus.value = true;
} else {
BtnStatus.value = false;
}
};
const submit = async () => {
if (!accountId.value || !inputValue.value || !BtnStatus.value) {
return;
}
// 通过
try {
loading.value = true;
let res: any = await SubmitLink({
account_id: accountId.value,
parameters: [
{
url: inputValue.value,
},
],
});
if (res.code == 0) {
// 成功-将提交按钮置灰
BtnStatus.value = false;
MessagePlugin.success('上传成功');
}
loading.value = false;
} catch (e) {
console.log(e);
loading.value = false;
}
};
return () => (
<div class="custom-upload-link-page narrow-scrollbar">
<div class="custom-upload-link-page-child">
<SelectAccount
record={false}
v-model:accountId={accountId.value}
></SelectAccount>
<div class="upload-link-box">
<div class="label">上传链接</div>
<div class="value">
<t-input
v-model={inputValue.value}
onChange={inputchange}
></t-input>
</div>
<t-button
class={[
'submit-btn',
accountId.value && inputValue.value && BtnStatus.value
? 'active'
: '',
]}
onClick={submit}
>
确认
</t-button>
</div>
<Animation
v-show={loading.value}
poistion="fixed"
background="rgba(200,200,200,0.2)"
></Animation>
</div>
</div>
);
},
});
......@@ -20,6 +20,14 @@ export default [
header: true,
},
},
{
path: '/uploadlink',
name: 'uploadlink',
component: () => import('@/pages/uploadLink/index'),
meta: {
header: true,
},
},
],
},
];
import { createStore } from 'vuex';
import user from './modules/user';
import theme from './modules/theme';
import reload from './modules/reload';
import token from './modules/token';
import login from './modules/login';
import language from './modules/language';
import page from './modules/page';
export const store = createStore({
modules: {
user,
page,
},
});
......
import { LOGIN_MODES } from '@/constants/login';
const state = {
// 登录页面显示显示的内容
mode: 'login',
// 注册模块显示的内容--注册页面与输入验证码页面
regmode: {
mode: LOGIN_MODES.register,
account: '',
realAccount: '',
code: '',
type: '',
},
// 重置密码模块显示的内容--有三个模块
forgotMode: {
mode: LOGIN_MODES.forgotMode.account,
},
code: '',
};
type StateType = typeof state;
const mutations = {
setMode(state: StateType, info: string) {
state.mode = info;
},
setCode(state: StateType, info: string) {
state.code = info;
},
// 注册模块
setRegMode(state: StateType, info: any) {
if (Object.keys(info).length) {
state.regmode = info;
}
},
// 忘记密码模块
setForgotMode(state: StateType, info: any) {
if (Object.keys(info).length) {
state.forgotMode = info;
}
},
};
const getters = {
getMode: (state: StateType) => {
return state.mode;
},
getRegMode: (state: StateType) => {
return state.regmode;
},
getForgotMode: (state: StateType) => {
return state.forgotMode;
},
getCode: (state: StateType) => {
return state.code;
},
};
const actions = {};
export default {
namespaced: true,
state,
mutations,
actions,
getters,
};
const state = {
language: localStorage.getItem('lang') ?? 'es',
interface MyState {
currentPage: string;
}
// 定义的state初始值
const state: MyState = {
currentPage: 'video',
};
type StateType = typeof state;
const mutations = {
setLang(state: StateType, info: string) {
state.language = info;
setPage(state: StateType, cur: string) {
state.currentPage = cur;
},
};
const getters = {
getLang: (state: StateType) => {
return state.language;
getPage: (state: StateType) => {
return state.currentPage;
},
};
......
const state = {
load: 0,
// footer是否显示
footer_load: true,
};
type StateType = typeof state;
const mutations = {
setLoad(state: StateType, info: number) {
state.load += info;
},
setFooter(state: StateType, info: boolean) {
state.footer_load = info;
},
};
const getters = {
getLoad: (state: StateType) => {
return state.load;
},
getFooter: (state: StateType) => {
return state.footer_load;
},
};
const actions = {};
export default {
namespaced: true,
state,
mutations,
actions,
getters,
};
// 定义的state初始值
const state = {
// 主题色
theme: localStorage.getItem('theme')
? localStorage.getItem('theme')
: 'light',
};
type StateType = typeof state;
const mutations = {
setTheme(state: StateType, theme: string) {
let html = document.children[0];
html.setAttribute('theme-mode', theme);
localStorage.setItem('theme', theme);
state.theme = theme;
},
};
const getters = {
getTheme(state: StateType) {
return state.theme;
},
};
const actions = {};
export default {
namespaced: true,
state,
mutations,
actions,
getters,
};
type numStr = number | string;
interface tradingInfo {
first_price?: numStr;
icons?: string;
id?: numStr;
last_price?: numStr;
max_price?: numStr;
min_price?: numStr;
n_last_price?: numStr;
n_up?: numStr;
name?: string;
sum_amount?: numStr;
tbname?: string;
time?: number;
ts?: number;
up?: numStr;
}
interface ThisState {
tradingInfo: tradingInfo;
// 最新价格
new_price: null | number;
}
const state: ThisState = {
// 交易页面当前币的数据
tradingInfo: {},
// 最新价格
new_price: null,
};
type StateType = typeof state;
const mutations = {
setTradingInfo(state: StateType, info: tradingInfo) {
state.tradingInfo = info;
},
// 更新k线页面的最新价格
setTradePrice(state: StateType, info: number) {
state.new_price = parseFloat(info.toFixed(4));
},
};
const getters = {
getTradingInfo: (state: StateType) => {
return state.tradingInfo;
},
// 获取price
getTradePrice: (state: StateType) => {
return state.new_price;
},
};
const actions = {};
export default {
namespaced: true,
state,
mutations,
actions,
getters,
};
import { TOKEN_NAME, APP_COOKIE } from '@/config/global';
import Cookies from 'js-cookie';
import { getAdminConfig, getConfigPolicy } from '@/utils/api/userApi';
import {
getAdminConfig,
getConfigPolicy,
ChoseAccount,
} from '@/utils/api/userApi';
interface MyState {
token: String | undefined | null;
account: number | string;
adminConfig: string;
uploadStrategy: any;
options: any[];
}
// 获取cookie
const getUserCookie = () => {
......@@ -26,6 +31,7 @@ const state: MyState = {
oss: null,
config: {},
},
options: [],
};
type StateType = typeof state;
......@@ -63,6 +69,10 @@ const mutations = {
state.uploadStrategy.config = config.config;
}
},
// 更新账户选择列表
setOptions(state: StateType, config: any[]) {
state.options = config;
},
};
const getters = {
......@@ -78,6 +88,10 @@ const getters = {
getuploadStrategy: (state: StateType) => {
return state.uploadStrategy;
},
// 获取账户选择列表
getOptions: (state: StateType) => {
return state.options;
},
};
const actions = {
......@@ -106,6 +120,21 @@ const actions = {
console.log(e);
}
},
// 获取账户选择列表
async AcountOptions({ commit }: any) {
try {
let res: any = await ChoseAccount();
if (res.code == 0 && res.data.length) {
res.data.forEach((item: any) => {
item.label = item.name + '-' + item.region;
item.value = item.account_id;
});
commit('setOptions', res.data);
}
} catch (e) {
console.log(e);
}
},
};
export default {
......
......@@ -71,3 +71,19 @@ export const getSubmitTableList = (data: any) => {
},
});
};
// 上传链接
export const SubmitLink = (data: any) => {
let token = getUserCookie();
return request.post(
'/api/users/link/upload',
{
...data,
},
{
headers: {
authorization: `Bearer ${token}`,
},
}
);
};
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-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{H as l,J as t,K as a,d as s,e,L as n,G as c,M as o,N as u,I as r,O as h,P as i}from"./vue-f8fdfec2.js";const v={width:"35",height:"35",fill:"none",xmlns:"http://www.w3.org/2000/svg"},d=[a("path",{d:"M29.64 14.146c-2.49 0-4.913-.817-6.905-2.33v10.545c0 5.384-4.11 9.744-9.18 9.744-5.07 0-9.18-4.36-9.18-9.744 0-5.384 4.11-9.746 9.18-9.746.508 0 1 .043 1.479.128v5.585a3.905 3.905 0 0 0-1.44-.277c-2.263 0-4.099 1.947-4.099 4.35 0 2.4 1.836 4.348 4.098 4.348 2.26 0 4.095-1.949 4.095-4.348V1.458h5.12c0 4.025 3.076 7.288 6.87 7.288v5.396l-.037.002",fill:"#03FBFF"},null,-1),a("path",{d:"M30.59 15.58c-2.495 0-4.92-.818-6.907-2.327v10.544c0 5.384-4.11 9.745-9.18 9.745-5.069 0-9.179-4.36-9.179-9.745 0-5.384 4.11-9.745 9.18-9.745.507 0 1 .044 1.48.129v5.585a3.903 3.903 0 0 0-1.441-.277c-2.262 0-4.098 1.947-4.098 4.35 0 2.4 1.836 4.35 4.098 4.35 2.26 0 4.095-1.95 4.095-4.35V2.895h5.12c0 4.025 3.075 7.287 6.869 7.287v5.396l-.037.003Z",fill:"#FD1753"},null,-1)];const f={render:function(a,s){return l(),t("svg",v,d)}},p={width:"45",height:"45",fill:"none",xmlns:"http://www.w3.org/2000/svg"},w=[a("circle",{cx:"22.5",cy:"22.5",r:"22.5",fill:"#393939"},null,-1),a("path",{d:"M34.64 19.146c-2.49 0-4.913-.817-6.905-2.33v10.545c0 5.384-4.11 9.744-9.18 9.744-5.07 0-9.18-4.36-9.18-9.744 0-5.384 4.11-9.746 9.18-9.746.508 0 1 .043 1.479.128v5.585a3.905 3.905 0 0 0-1.44-.277c-2.263 0-4.099 1.947-4.099 4.35 0 2.4 1.836 4.348 4.098 4.348 2.26 0 4.095-1.949 4.095-4.348V6.458h5.12c0 4.025 3.076 7.288 6.87 7.288v5.396l-.037.002",fill:"#03FBFF"},null,-1),a("path",{d:"M35.59 20.58c-2.495 0-4.92-.817-6.907-2.327v10.544c0 5.384-4.11 9.745-9.18 9.745-5.069 0-9.178-4.36-9.178-9.745 0-5.384 4.109-9.745 9.178-9.745.508 0 1 .044 1.48.129v5.585a3.902 3.902 0 0 0-1.44-.277c-2.262 0-4.098 1.947-4.098 4.35 0 2.4 1.836 4.35 4.098 4.35 2.26 0 4.095-1.95 4.095-4.35V7.895h5.12c0 4.025 3.075 7.287 6.869 7.287v5.396l-.037.003Z",fill:"#FD1753"},null,-1)];const m={render:function(a,s){return l(),t("svg",p,w)}},g={class:"custom-layout-head"},F={class:"layout-head-left"},y=a("span",null,"TikToK视频上传",-1),M={class:"layout-head-right"},_=s({__name:"header",setup:s=>(s,c)=>(l(),t("div",g,[a("div",F,[e(n(f)),y]),a("div",M,[e(n(m))])]))}),x={class:"custom-layout"},V=s({__name:"content",setup(a){const s=h();return(a,h)=>{const v=r("router-view");return l(),t("div",x,[n(s).meta.header?(l(),c(_,{key:0})):o("",!0),e(v,null,{default:u((({Component:t})=>[(l(),c(i(t)))])),_:1})])}}});export{V as default};
System.register(["./vue-legacy-3fa9a658.js"],(function(t,l){"use strict";var e,n,c,u,a,s,r,i,v,h,o,d;return{setters:[t=>{e=t.H,n=t.J,c=t.K,u=t.d,a=t.e,s=t.L,r=t.G,i=t.M,v=t.N,h=t.I,o=t.O,d=t.P}],execute:function(){const l={width:"35",height:"35",fill:"none",xmlns:"http://www.w3.org/2000/svg"},f=[c("path",{d:"M29.64 14.146c-2.49 0-4.913-.817-6.905-2.33v10.545c0 5.384-4.11 9.744-9.18 9.744-5.07 0-9.18-4.36-9.18-9.744 0-5.384 4.11-9.746 9.18-9.746.508 0 1 .043 1.479.128v5.585a3.905 3.905 0 0 0-1.44-.277c-2.263 0-4.099 1.947-4.099 4.35 0 2.4 1.836 4.348 4.098 4.348 2.26 0 4.095-1.949 4.095-4.348V1.458h5.12c0 4.025 3.076 7.288 6.87 7.288v5.396l-.037.002",fill:"#03FBFF"},null,-1),c("path",{d:"M30.59 15.58c-2.495 0-4.92-.818-6.907-2.327v10.544c0 5.384-4.11 9.745-9.18 9.745-5.069 0-9.179-4.36-9.179-9.745 0-5.384 4.11-9.745 9.18-9.745.507 0 1 .044 1.48.129v5.585a3.903 3.903 0 0 0-1.441-.277c-2.262 0-4.098 1.947-4.098 4.35 0 2.4 1.836 4.35 4.098 4.35 2.26 0 4.095-1.95 4.095-4.35V2.895h5.12c0 4.025 3.075 7.287 6.869 7.287v5.396l-.037.003Z",fill:"#FD1753"},null,-1)],g={render:function(t,c){return e(),n("svg",l,f)}},w={width:"45",height:"45",fill:"none",xmlns:"http://www.w3.org/2000/svg"},p=[c("circle",{cx:"22.5",cy:"22.5",r:"22.5",fill:"#393939"},null,-1),c("path",{d:"M34.64 19.146c-2.49 0-4.913-.817-6.905-2.33v10.545c0 5.384-4.11 9.744-9.18 9.744-5.07 0-9.18-4.36-9.18-9.744 0-5.384 4.11-9.746 9.18-9.746.508 0 1 .043 1.479.128v5.585a3.905 3.905 0 0 0-1.44-.277c-2.263 0-4.099 1.947-4.099 4.35 0 2.4 1.836 4.348 4.098 4.348 2.26 0 4.095-1.949 4.095-4.348V6.458h5.12c0 4.025 3.076 7.288 6.87 7.288v5.396l-.037.002",fill:"#03FBFF"},null,-1),c("path",{d:"M35.59 20.58c-2.495 0-4.92-.817-6.907-2.327v10.544c0 5.384-4.11 9.745-9.18 9.745-5.069 0-9.178-4.36-9.178-9.745 0-5.384 4.109-9.745 9.178-9.745.508 0 1 .044 1.48.129v5.585a3.902 3.902 0 0 0-1.44-.277c-2.262 0-4.098 1.947-4.098 4.35 0 2.4 1.836 4.35 4.098 4.35 2.26 0 4.095-1.95 4.095-4.35V7.895h5.12c0 4.025 3.075 7.287 6.869 7.287v5.396l-.037.003Z",fill:"#FD1753"},null,-1)],m={render:function(t,l){return e(),n("svg",w,p)}},y={class:"custom-layout-head"},F={class:"layout-head-left"},M=c("span",null,"TikToK视频上传",-1),_={class:"layout-head-right"},x=u({__name:"header",setup:t=>(t,l)=>(e(),n("div",y,[c("div",F,[a(s(g)),M]),c("div",_,[a(s(m))])]))}),V={class:"custom-layout"};t("default",u({__name:"content",setup(t){const l=o();return(t,c)=>{const u=h("router-view");return e(),n("div",V,[s(l).meta.header?(e(),r(x,{key:0})):i("",!0),a(u,null,{default:v((({Component:t})=>[(e(),r(d(t)))])),_:1})])}}}))}}}));
This source diff could not be displayed because it is too large. You can view the blob instead.
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};
This source diff could not be displayed because it is too large. You can view the blob instead.
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)]))}))}}}));
This source diff could not be displayed because it is too large. You can view the blob instead.
import{d as a,J as t,K as l,P as e,X as s,D as o,Y as i,Z as d}from"./vue-1766cb08.js";import{aD as u}from"./_plugin-vue_export-helper-574a79f6.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:e(["custom-loading-box",{"custom-is-table-box":!a.isTable}]),style:s({width:a.width,height:a.height,background:a.background,position:a.position})},[l("div",{class:e(["ball-beat",{"custom-is-table-child":!a.isTable}]),style:s({top:a.top,left:a.left})},p,6)],6))}),[["__scopeId","data-v-60ab0cfe"]]);export{b as A};
System.register(["./vue-legacy-4c3ba68d.js","./_plugin-vue_export-helper-legacy-bfc1263b.js"],(function(t,e){"use strict";var l,a,i,s,u,o,d,n,c;return{setters:[t=>{l=t.d,a=t.J,i=t.K,s=t.P,u=t.X,o=t.D,d=t.Y,n=t.Z},t=>{c=t.aD}],execute:function(){const e=t=>(d("data-v-60ab0cfe"),t=t(),n(),t),p=[e((()=>i("div",null,null,-1))),e((()=>i("div",null,null,-1))),e((()=>i("div",null,null,-1)))],b=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)=>(o(),a("div",{class:s(["custom-loading-box",{"custom-is-table-box":!t.isTable}]),style:u({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:u({top:t.top,left:t.left})},p,6)],6))});t("A",c(b,[["__scopeId","data-v-60ab0cfe"]]))}}}));
This source diff could not be displayed because it is too large. You can view the blob instead.
import{D as a,J as l,K as t,d as s,L as e,M as n,r as c,b as o,N as u,F as h,O as r,P as i,Q as v,C as d,R as p,S as f,E as w,U as m}from"./vue-1766cb08.js";const g={width:"35",height:"35",fill:"none",xmlns:"http://www.w3.org/2000/svg"},F=[t("path",{d:"M29.64 14.146c-2.49 0-4.913-.817-6.905-2.33v10.545c0 5.384-4.11 9.744-9.18 9.744-5.07 0-9.18-4.36-9.18-9.744 0-5.384 4.11-9.746 9.18-9.746.508 0 1 .043 1.479.128v5.585a3.905 3.905 0 0 0-1.44-.277c-2.263 0-4.099 1.947-4.099 4.35 0 2.4 1.836 4.348 4.098 4.348 2.26 0 4.095-1.949 4.095-4.348V1.458h5.12c0 4.025 3.076 7.288 6.87 7.288v5.396l-.037.002",fill:"#03FBFF"},null,-1),t("path",{d:"M30.59 15.58c-2.495 0-4.92-.818-6.907-2.327v10.544c0 5.384-4.11 9.745-9.18 9.745-5.069 0-9.179-4.36-9.179-9.745 0-5.384 4.11-9.745 9.18-9.745.507 0 1 .044 1.48.129v5.585a3.903 3.903 0 0 0-1.441-.277c-2.262 0-4.098 1.947-4.098 4.35 0 2.4 1.836 4.35 4.098 4.35 2.26 0 4.095-1.95 4.095-4.35V2.895h5.12c0 4.025 3.075 7.287 6.869 7.287v5.396l-.037.003Z",fill:"#FD1753"},null,-1)];const y={render:function(t,s){return a(),l("svg",g,F)}},k={width:"45",height:"45",fill:"none",xmlns:"http://www.w3.org/2000/svg"},b=[t("circle",{cx:"22.5",cy:"22.5",r:"22.5",fill:"#393939"},null,-1),t("path",{d:"M34.64 19.146c-2.49 0-4.913-.817-6.905-2.33v10.545c0 5.384-4.11 9.744-9.18 9.744-5.07 0-9.18-4.36-9.18-9.744 0-5.384 4.11-9.746 9.18-9.746.508 0 1 .043 1.479.128v5.585a3.905 3.905 0 0 0-1.44-.277c-2.263 0-4.099 1.947-4.099 4.35 0 2.4 1.836 4.348 4.098 4.348 2.26 0 4.095-1.949 4.095-4.348V6.458h5.12c0 4.025 3.076 7.288 6.87 7.288v5.396l-.037.002",fill:"#03FBFF"},null,-1),t("path",{d:"M35.59 20.58c-2.495 0-4.92-.817-6.907-2.327v10.544c0 5.384-4.11 9.745-9.18 9.745-5.069 0-9.178-4.36-9.178-9.745 0-5.384 4.109-9.745 9.178-9.745.508 0 1 .044 1.48.129v5.585a3.902 3.902 0 0 0-1.44-.277c-2.262 0-4.098 1.947-4.098 4.35 0 2.4 1.836 4.35 4.098 4.35 2.26 0 4.095-1.95 4.095-4.35V7.895h5.12c0 4.025 3.075 7.287 6.869 7.287v5.396l-.037.003Z",fill:"#FD1753"},null,-1)];const M={render:function(t,s){return a(),l("svg",k,b)}},_={class:"custom-layout-head"},x={class:"layout-head-left"},C=t("span",null,"TikToK视频上传",-1),V=["onClick"],D={class:"layout-head-right"},B=s({__name:"header",setup(s){const d=e(),p=n(),f=c(d.path),w=[{label:"上传视频",path:"/upload"},{label:"上传链接",path:"/uploadlink"}];return(s,e)=>(a(),l("div",_,[t("div",x,[o(u(y)),C,(a(),l(h,null,r(w,(a=>t("div",{class:i(["layout-chose-button",{active:a.path===u(f)}]),key:a.path,onClick:l=>(a=>{f.value=a.path,p.replace({path:a.path})})(a)},v(a.label),11,V))),64))]),t("div",D,[o(u(M))])]))}}),K={class:"custom-layout"},T=s({__name:"content",setup(t){const s=e();return(t,e)=>{const n=w("router-view");return a(),l("div",K,[u(s).meta.header?(a(),d(B,{key:0})):p("",!0),o(n,null,{default:f((({Component:l})=>[(a(),d(m(l)))])),_:1})])}}});export{T as default};
System.register(["./vue-legacy-4c3ba68d.js"],(function(l,t){"use strict";var e,a,n,c,u,s,r,h,i,o,v,d,p,f,g,w,y,m;return{setters:[l=>{e=l.D,a=l.J,n=l.K,c=l.d,u=l.L,s=l.M,r=l.r,h=l.b,i=l.N,o=l.F,v=l.O,d=l.P,p=l.Q,f=l.C,g=l.R,w=l.S,y=l.E,m=l.U}],execute:function(){const t={width:"35",height:"35",fill:"none",xmlns:"http://www.w3.org/2000/svg"},F=[n("path",{d:"M29.64 14.146c-2.49 0-4.913-.817-6.905-2.33v10.545c0 5.384-4.11 9.744-9.18 9.744-5.07 0-9.18-4.36-9.18-9.744 0-5.384 4.11-9.746 9.18-9.746.508 0 1 .043 1.479.128v5.585a3.905 3.905 0 0 0-1.44-.277c-2.263 0-4.099 1.947-4.099 4.35 0 2.4 1.836 4.348 4.098 4.348 2.26 0 4.095-1.949 4.095-4.348V1.458h5.12c0 4.025 3.076 7.288 6.87 7.288v5.396l-.037.002",fill:"#03FBFF"},null,-1),n("path",{d:"M30.59 15.58c-2.495 0-4.92-.818-6.907-2.327v10.544c0 5.384-4.11 9.745-9.18 9.745-5.069 0-9.179-4.36-9.179-9.745 0-5.384 4.11-9.745 9.18-9.745.507 0 1 .044 1.48.129v5.585a3.903 3.903 0 0 0-1.441-.277c-2.262 0-4.098 1.947-4.098 4.35 0 2.4 1.836 4.35 4.098 4.35 2.26 0 4.095-1.95 4.095-4.35V2.895h5.12c0 4.025 3.075 7.287 6.869 7.287v5.396l-.037.003Z",fill:"#FD1753"},null,-1)],k={render:function(l,n){return e(),a("svg",t,F)}},b={width:"45",height:"45",fill:"none",xmlns:"http://www.w3.org/2000/svg"},M=[n("circle",{cx:"22.5",cy:"22.5",r:"22.5",fill:"#393939"},null,-1),n("path",{d:"M34.64 19.146c-2.49 0-4.913-.817-6.905-2.33v10.545c0 5.384-4.11 9.744-9.18 9.744-5.07 0-9.18-4.36-9.18-9.744 0-5.384 4.11-9.746 9.18-9.746.508 0 1 .043 1.479.128v5.585a3.905 3.905 0 0 0-1.44-.277c-2.263 0-4.099 1.947-4.099 4.35 0 2.4 1.836 4.348 4.098 4.348 2.26 0 4.095-1.949 4.095-4.348V6.458h5.12c0 4.025 3.076 7.288 6.87 7.288v5.396l-.037.002",fill:"#03FBFF"},null,-1),n("path",{d:"M35.59 20.58c-2.495 0-4.92-.817-6.907-2.327v10.544c0 5.384-4.11 9.745-9.18 9.745-5.069 0-9.178-4.36-9.178-9.745 0-5.384 4.109-9.745 9.178-9.745.508 0 1 .044 1.48.129v5.585a3.902 3.902 0 0 0-1.44-.277c-2.262 0-4.098 1.947-4.098 4.35 0 2.4 1.836 4.35 4.098 4.35 2.26 0 4.095-1.95 4.095-4.35V7.895h5.12c0 4.025 3.075 7.287 6.869 7.287v5.396l-.037.003Z",fill:"#FD1753"},null,-1)],_={render:function(l,t){return e(),a("svg",b,M)}},x={class:"custom-layout-head"},C={class:"layout-head-left"},V=n("span",null,"TikToK视频上传",-1),D=["onClick"],B={class:"layout-head-right"},K=c({__name:"header",setup(l){const t=u(),c=s(),f=r(t.path),g=[{label:"上传视频",path:"/upload"},{label:"上传链接",path:"/uploadlink"}];return(l,t)=>(e(),a("div",x,[n("div",C,[h(i(k)),V,(e(),a(o,null,v(g,(l=>n("div",{class:d(["layout-chose-button",{active:l.path===i(f)}]),key:l.path,onClick:t=>(l=>{f.value=l.path,c.replace({path:l.path})})(l)},p(l.label),11,D))),64))]),n("div",B,[h(i(_))])]))}}),S={class:"custom-layout"};l("default",c({__name:"content",setup(l){const t=u();return(l,n)=>{const c=y("router-view");return e(),a("div",S,[i(t).meta.header?(e(),f(K,{key:0})):g("",!0),h(c,null,{default:w((({Component:l})=>[(e(),f(m(l)))])),_:1})])}}}))}}}));
import{d as e,c as a,r as o,o as l,b as t,V as s,E as u,W as c}from"./vue-1766cb08.js";const n=e({props:{modelValue:String,record:Boolean},emits:["update:modelValue","update:accountId"],setup(e,{emit:n}){const d=c(),i=a((()=>d.getters["user/getOptions"])),p=o(""),r=({value:e,e:a})=>{},m=({value:e,e:a})=>{},v=e=>{n("update:accountId",e)},h=({value:e,e:a,inputValue:o})=>{},V=()=>{const{modelValue:a}=e;n("update:modelValue","upload"==a?"table":"upload")};return l((()=>{i.value.length||d.dispatch("user/AcountOptions")})),()=>t("div",{class:"custom-chose-account"},[t("div",{class:"chose-account-left"},[t("div",{class:"chose-account-title"},[s("选择账户")]),t(u("t-select"),{class:"chose-account-select",modelValue:p.value,"onUpdate:modelValue":e=>p.value=e,placeholder:"选择一个账户",options:i.value,style:"width: 200px; display: inline-block;",filterable:!0,onblur:r,onfocus:m,onenter:h,onChange:v},null)]),t("div",{class:"choose-account-right"},[e.record?t(u("t-button"),{onClick:V},{default:()=>["upload"==e.modelValue?"发布记录":"发布视频"]}):""])])}});export{n as S};
import{d as e,c as t,r,x as a,D as o,J as s,b as l,S as n,N as c,V as i,s as u,v as p,K as d,M as v,W as m,E as f}from"./vue-1766cb08.js";import{C as y,D as h,F as b,aG as O,aH as g}from"./_plugin-vue_export-helper-574a79f6.js";import{A as w}from"./Animation-782def3c.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){b(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()=>h(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 D(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){b(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}}]},z=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((()=>D(D({},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()=>h(x,i.value)}});const C={class:"custom-login"},S=d("div",{class:"custom-login-title"},"登录",-1),E=e({__name:"login",setup(e){const d=v(),y=m(),h=r(!1),b=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{h.value=!0;let e=await g({email:b.account,password:b.password});0==e.code&&(O.success("登录成功"),y.commit("user/setToken",{token:e.data.access_token,time:e.data.expires_in}),d.replace({path:"/upload"})),h.value=!1}catch(r){h.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"),v=f("t-form");return o(),s("div",C,[S,l(v,{ref:"form",class:"custom-login-form",data:b,rules:c(j),colon:!0,"label-width":0,onReset:k,onSubmit:P},{default:n((()=>[l(a,{name:"account"},{default:n((()=>[l(r,{modelValue:b.account,"onUpdate:modelValue":t[0]||(t[0]=e=>b.account=e),clearable:"",placeholder:"请输入账户名"},{"prefix-icon":n((()=>[l(c(_))])),_:1},8,["modelValue"])])),_:1}),l(a,{name:"password"},{default:n((()=>[l(r,{modelValue:b.password,"onUpdate:modelValue":t[1]||(t[1]=e=>b.password=e),type:"password",clearable:"",placeholder:"请输入密码"},{"prefix-icon":n((()=>[l(c(z))])),_: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,h.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 a,r as l,b as e,V as u,E as s,s as o,v as t}from"./vue-1766cb08.js";import{S as n}from"./index-02df183b.js";import{aM as c,aG as v}from"./_plugin-vue_export-helper-574a79f6.js";import{A as i}from"./Animation-782def3c.js";const r=a({setup(a){const r=l(null),d=l(""),p=l(!1),m=l(!1),b=a=>{p.value=!!a},f=async()=>{if(r.value&&d.value&&p.value)try{m.value=!0,0==(await c({account_id:r.value,parameters:[{url:d.value}]})).code&&(p.value=!1,v.success("上传成功")),m.value=!1}catch(a){m.value=!1}};return()=>e("div",{class:"custom-upload-link-page narrow-scrollbar"},[e("div",{class:"custom-upload-link-page-child"},[e(n,{record:!1,accountId:r.value,"onUpdate:accountId":a=>r.value=a},null),e("div",{class:"upload-link-box"},[e("div",{class:"label"},[u("上传链接")]),e("div",{class:"value"},[e(s("t-input"),{modelValue:d.value,"onUpdate:modelValue":a=>d.value=a,onChange:b},null)]),e(s("t-button"),{class:["submit-btn",r.value&&d.value&&p.value?"active":""],onClick:f},{default:()=>[u("确认")]})]),o(e(i,{poistion:"fixed",background:"rgba(200,200,200,0.2)"},null),[[t,m.value]])])])}});export{r as default};
This source diff could not be displayed because it is too large. You can view the blob instead.
System.register(["./vue-legacy-4c3ba68d.js"],(function(e,t){"use strict";var l,o,u,a,c,s,n,d;return{setters:[e=>{l=e.d,o=e.c,u=e.r,a=e.o,c=e.b,s=e.V,n=e.E,d=e.W}],execute:function(){e("S",l({props:{modelValue:String,record:Boolean},emits:["update:modelValue","update:accountId"],setup(e,{emit:t}){const l=d(),i=o((()=>l.getters["user/getOptions"])),r=u(""),p=({value:e,e:t})=>{},v=({value:e,e:t})=>{},h=e=>{t("update:accountId",e)},m=({value:e,e:t,inputValue:l})=>{},V=()=>{const{modelValue:l}=e;t("update:modelValue","upload"==l?"table":"upload")};// 选择列表
return a((()=>{i.value.length||l.dispatch("user/AcountOptions")})),()=>c("div",{class:"custom-chose-account"},[c("div",{class:"chose-account-left"},[c("div",{class:"chose-account-title"},[s("选择账户")]),c(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:p,onfocus:v,onenter:m,onChange:h},null)]),c("div",{class:"choose-account-right"},[e.record?c(n("t-button"),{onClick:V},{default:()=>["upload"==e.modelValue?"发布记录":"发布视频"]}):""])])}}))}}}));
This source diff could not be displayed because it is too large. You can view the blob instead.
System.register(["./vue-legacy-4c3ba68d.js","./index-legacy-18505e5c.js","./_plugin-vue_export-helper-legacy-bfc1263b.js","./Animation-legacy-c8c92395.js"],(function(a,e){"use strict";var l,u,t,c,s,n,v,o,i,d,r;return{setters:[a=>{l=a.d,u=a.r,t=a.b,c=a.V,s=a.E,n=a.s,v=a.v},a=>{o=a.S},a=>{i=a.aM,d=a.aG},a=>{r=a.A}],execute:function(){a("default",l({setup(a){const e=u(null),l=u(""),p=u(!1),g=u(!1),b=a=>{p.value=!!a},m=async()=>{if(e.value&&l.value&&p.value)// 通过
try{g.value=!0,0==(await i({account_id:e.value,parameters:[{url:l.value}]})).code&&(// 成功-将提交按钮置灰
p.value=!1,d.success("上传成功")),g.value=!1}catch(a){g.value=!1}};return()=>t("div",{class:"custom-upload-link-page narrow-scrollbar"},[t("div",{class:"custom-upload-link-page-child"},[t(o,{record:!1,accountId:e.value,"onUpdate:accountId":a=>e.value=a},null),t("div",{class:"upload-link-box"},[t("div",{class:"label"},[c("上传链接")]),t("div",{class:"value"},[t(s("t-input"),{modelValue:l.value,"onUpdate:modelValue":a=>l.value=a,onChange:b},null)]),t(s("t-button"),{class:["submit-btn",e.value&&l.value&&p.value?"active":""],onClick:m},{default:()=>[c("确认")]})]),n(t(r,{poistion:"fixed",background:"rgba(200,200,200,0.2)"},null),[[v,g.value]])])])}}))}}}));
System.register(["./vue-legacy-4c3ba68d.js","./_plugin-vue_export-helper-legacy-bfc1263b.js","./Animation-legacy-c8c92395.js"],(function(e,t){"use strict";var r,a,o,l,n,c,s,i,u,p,d,v,f,m,y,g,h,b,O,w,j,k;return{setters:[e=>{r=e.d,a=e.c,o=e.r,l=e.x,n=e.D,c=e.J,s=e.b,i=e.S,u=e.N,p=e.V,d=e.s,v=e.v,f=e.K,m=e.M,y=e.W,g=e.E},e=>{h=e.C,b=e.D,O=e.F,w=e.aG,j=e.aH},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}=h(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()=>b(_,i.value)}});function D(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?D(Object(r),!0).forEach((function(t){O(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):D(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var z={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=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}=h(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()=>b(z,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),h=l({account:"",password:""}),b=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:h.account,password:h.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:h,rules:u(b),colon:!0,"label-width":0,onReset:O,onSubmit:P},{default:i((()=>[s(a,{name:"account"},{default:i((()=>[s(r,{modelValue:h.account,"onUpdate:modelValue":t[0]||(t[0]=e=>h.account=e),clearable:"",placeholder:"请输入账户名"},{"prefix-icon":i((()=>[s(u(V))])),_:1},8,["modelValue"])])),_:1}),s(a,{name:"password"},{default:i((()=>[s(r,{modelValue:h.password,"onUpdate:modelValue":t[1]||(t[1]=e=>h.password=e),type:"password",clearable:"",placeholder:"请输入密码"},{"prefix-icon":i((()=>[s(u(C))])),_: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)]))}))}}}));
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -8,9 +8,10 @@
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-06b4a16d.js"></script>
<link rel="modulepreload" crossorigin href="/assets/vue-f8fdfec2.js">
<link rel="stylesheet" href="/assets/style-bd54347d.css">
<script type="module" crossorigin src="/assets/index-b4a2dafc.js"></script>
<link rel="modulepreload" crossorigin href="/assets/vue-1766cb08.js">
<link rel="modulepreload" crossorigin href="/assets/_plugin-vue_export-helper-574a79f6.js">
<link rel="stylesheet" href="/assets/style-4740619b.css">
<script type="module">try{import.meta.url;import("_").catch(()=>1);}catch(e){}window.__vite_is_modern_browser=true;</script>
<script type="module">!function(){if(window.__vite_is_modern_browser)return;console.warn("vite: loading legacy build because dynamic import or import.meta.url is unsupported, syntax error above should be ignored");var e=document.getElementById("vite-legacy-polyfill"),n=document.createElement("script");n.src=e.src,n.onload=function(){System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))},document.body.appendChild(n)}();</script>
</head>
......@@ -18,7 +19,7 @@
<div id="app"></div>
<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-01b3f2d3.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
<script nomodule crossorigin id="vite-legacy-polyfill" src="/assets/polyfills-legacy-b7b22370.js"></script>
<script nomodule crossorigin id="vite-legacy-entry" data-src="/assets/index-legacy-7062491f.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
</body>
</html>
......@@ -20,9 +20,8 @@ app.use(
// },
})
);
// 加载静态资源
app.use(express.static(path.join(__dirname, './dist')));
app.use(express.static('./dist'));
// 启动服务
app.listen(3001, () => {
......
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