Commit 85aa249d by haojie

1

parent e9458ad1
<template>
<div class="custom-set-pwd-fund">
<CustomFormItem :label="$t('account.Contraseondos')">
<CustomInput
type="password"
:placeholder="$t('account.Introduzcalam')"
:rules="defaultRule('')"
:num="formData.num"
v-model="formData.password.password"
@submitType="submitType1"
></CustomInput>
</CustomFormItem>
<c-button class="sumit-pwd" @click="onSubmit">{{
$t('earncoins.confirm')
}}</c-button>
</div>
</template>
<script lang="ts" setup>
import CustomFormItem from '@/components/custom/formItem';
import CustomInput from '@/components/custom/input/index.vue';
import useRules from '@/hooks/rules';
import { reactive } from '@vue/reactivity';
import { computed } from '@vue/runtime-core';
import { useI18n } from 'vue-i18n';
const emit = defineEmits(['submit']);
const { defaultRule } = useRules();
const { t } = useI18n();
const formData = reactive({
password: {
password: '',
status: false,
},
// 通知表单校验
num: 1,
});
const repasswordValidator = (value: string) => {
if (formData.password.password == value) {
return {
required: true,
status: true,
};
} else {
return {
required: true,
message: t('input.DosEntradas'),
status: false,
};
}
};
const submitType1 = (value: boolean) => {
formData.password.status = value;
};
const onSubmit = () => {
if (!formData.password.status) {
formData.num += 1;
return;
}
// 通过
emit('submit', formData.password.password);
};
</script>
<style lang="less">
.custom-set-pwd-fund {
.sumit-pwd {
width: 100%;
height: 40px;
color: white;
background: rgba(41, 98, 255, 0.85);
}
}
</style>
.custom-form-item {
.custom-form-item-label {
font-weight: 400;
font-size: 14px;
color: var(--theme-color-4);
line-height: 30px;
.form-item-label-required {
color: #f05451;
}
}
}
import { defineComponent } from 'vue';
import { useI18n } from 'vue-i18n';
import './index.less';
export default defineComponent({
props: {
label: {
type: String,
default: '',
},
required: {
type: Boolean,
default: false,
},
},
setup(props, { slots }) {
const { t } = useI18n();
return () => (
<div class="custom-form-item">
<label class="custom-form-item-label">
{props.label}
<span class="form-item-label-required">
{props.required ? `(${t('login.required')})` : ''}
</span>
</label>
{slots.default ? slots.default() : ''}
</div>
);
},
});
<template>
<div class="Pagination-box">
<div class="left-total" v-show="ShowTotal">
<TableTotal :total="total"></TableTotal>
</div>
<div class="right-page" :class="{ hasShow: !ShowTotal }">
<ChevronLeftIcon
class="icon"
:style="{ color: pageNum == 1 ? 'rgb(201,205,212)' : 'rgb(78,89,105)' }"
@click="updatePage(pageNum - 1 == 0 ? pageNum : pageNum - 1)"
/>
<div v-if="totalPage > 1" class="page-btns">
<c-button
class="c-button"
@click="updatePage(item['value'])"
:class="{ active: item['value'] == pageNum }"
v-for="item in pageBtns"
:key="item"
>
{{ item['value'] }}
</c-button>
<div v-show="totalPage > continues">
<span>...</span>
<!-- 最后一个 -->
<c-button
class="last-page"
:class="{ active: totalPage == pageNum }"
@click="updatePage(totalPage)"
>
{{ totalPage }}
</c-button>
</div>
</div>
<div v-else class="page-btns">
<c-button :class="{ active: pageNum == 1 }" class="c-button"
>1</c-button
>
</div>
<ChevronRightIcon
class="icon"
:style="{
color: rightIconColor(pageNum, totalPage),
}"
@click="updatePage(pageNum >= totalPage ? pageNum : pageNum + 1)"
/>
</div>
</div>
</template>
<script lang="ts" setup>
import { computed, reactive, watch } from '@vue/runtime-core';
import { ChevronLeftIcon, ChevronRightIcon } from 'tdesign-icons-vue-next';
import TableTotal from '@/components/tableTotal';
const props = defineProps({
// 当前页数
pageNum: {
type: Number,
default: 1,
},
// 分页大小
pageSize: {
type: Number,
default: 100,
},
// 总数
total: {
type: Number,
default: 0,
},
// 展示的按钮个数
continues: {
type: Number,
default: 3,
},
// ShowTotal--是否显示total
ShowTotal: {
type: Boolean,
default: false,
},
});
const emit = defineEmits(['pageChange']);
const pageBtns: any = reactive([]);
// 总页数
const totalPage: any = computed(() => Math.ceil(props.total / props.pageSize));
watch(
() => [props.total, props.pageNum],
(v) => {
// 总量变化重新获取分页符
pageBtns.length = 0;
let add = startNumAndEndNum();
for (let i: any = add.start; i <= add.end; i++) {
pageBtns.push({
value: i,
});
}
}
);
// 右侧箭头颜色
const rightIconColor = (pNum: any, tPage: any) => {
if (pNum >= tPage) {
// 不可点击
return 'rgb(201,205,212)';
} else {
return 'rgb(78,89,105)';
}
};
// 计算
const startNumAndEndNum = () => {
// 解构赋值
const { pageNum, total, continues } = props;
//先定义两个变量存储起始数字与结束数字
let start = 0,
end = 0;
// 当pageNum小于5时
if (totalPage.value <= continues) {
start = 1;
end = totalPage.value;
} else {
//起始数字
start = pageNum - Math.floor(continues / 2);
//结束数字
end = pageNum + Math.floor(continues / 2);
if (start < 1) {
start = 1;
end = continues;
}
if (end > totalPage.value) {
end = totalPage.value - 1;
start = totalPage.value - continues;
}
}
return { start, end };
};
// 分页点击事件
const updatePage = (value: number) => {
if (props.pageNum === value) {
return;
}
emit('pageChange', value);
};
</script>
<style lang="less" scoped>
@import '../../../style/flex.less';
.Pagination-box {
width: 100%;
height: 64px;
// position: sticky;
// left: 0;
// bottom: 0;
z-index: 200;
.dja(space-between,center);
.left-total,
.right-page {
.dja();
.icon {
width: 22px;
height: 22px;
}
}
// 如果total隐藏--就将分页器居中显示
.hasShow {
width: 100%;
}
.left-total {
padding-left: 12px;
font-size: 14px;
color: var(--theme-color-4);
}
.right-page {
padding-right: 12px;
.page-btns {
box-sizing: border-box;
white-space: nowrap;
display: flex;
.c-button,
.last-page {
box-sizing: border-box;
margin: 0 3px;
width: auto;
border-radius: 4px;
padding: 0 12px;
background: transparent;
}
.active {
background: var(--theme-color-35);
color: white;
border: 1px solid var(--theme-color-35);
}
}
}
}
</style>
<template>
<div
class="t-select"
:style="{ width: width }"
v-clickOutside
:class="{ 't-select-Selected-class': postionShow }"
>
<slot name="prefix"></slot>
<input
type="text"
:placeholder="placeholder ?? $t('login.Seleccione')"
readonly
:value="selectVal"
/>
<!-- 上下旋转的箭头 -->
<span class="ChevronDown-box" ref="ChevronDown">
<SelectSvg class="icon" />
</span>
<transition name="select-fade">
<div class="t-position-box" v-show="postionShow">
<li
v-for="(item, index) in options"
:key="item.value"
class="item-li"
@click.stop="change(item, index)"
:class="{ active: selectVal === item[filedLabel] }"
>
<span>{{ item[filedLabel] }}</span>
</li>
</div>
</transition>
</div>
</template>
<script lang="tsx" setup>
import { ref } from '@vue/reactivity';
import SelectSvg from '@/assets/svg/login/select.svg?component';
import { watch } from '@vue/runtime-core';
// props
const props = defineProps({
options: {
type: Object as any,
default: () => [],
},
filedLabel: {
type: String,
default: 'label',
},
filedValue: {
type: String,
default: 'value',
},
placeholder: {
type: String,
},
value: {
type: String,
},
width: {
type: String,
default: '120px',
},
});
const emit = defineEmits(['change', 'update:value']);
const postionShow = ref(false);
const onFind = () => {
const { value, options } = props;
if (value && options.length) {
let obj: any = options.find((item: any) => item.value == value);
if (obj) {
return obj.label;
} else {
return '';
}
} else {
return '';
}
};
const selectVal = ref(onFind());
// 找出默认的value的label
const ChevronDown: any = ref(null);
const thisEl: any = ref(null);
// dom元素
const domCl = ref(null);
// 下拉菜单最大高度
const positionMaxHeight = ref('');
const handler = (e: any) => {
if (thisEl.value.contains(e.target)) {
if (postionShow.value === true) {
postionShow.value = false;
if (ChevronDown.value) {
ChevronDown.value.children[0].classList.replace(
't-fake-arrow--active',
't-fake-arrow--remove'
);
}
} else {
postionShow.value = true;
// 给父盒子添加点击后的样式
// 给箭头添加旋转样式
ChevronDown.value.children[0].classList.remove('t-fake-arrow--remove');
ChevronDown.value.children[0].classList.toggle('t-fake-arrow--active');
}
} else {
postionShow.value = false;
ChevronDown.value.children[0].classList.replace(
't-fake-arrow--active',
't-fake-arrow--remove'
);
}
};
watch(
() => props.value,
(v) => {
const { options } = props;
let obj = options.find((item: any) => item.value == v);
if (obj) {
selectVal.value = obj.label;
}
}
);
// 自定义指令
const vClickOutside = {
beforeMount: (el: any) => {
thisEl.value = el;
// 计算出手机距离屏幕底部的距离,设为maxheight
domCl.value = el;
document.addEventListener('click', handler);
},
beforeUnmount: () => {
// 注销
document.removeEventListener('click', handler);
},
};
const change = (item: any, index: number) => {
selectVal.value = item.label;
postionShow.value = false;
emit('update:value', item[props.filedValue]);
emit('change', item, index);
// 箭头恢复原状
if (ChevronDown.value) {
ChevronDown.value.children[0].classList.replace(
't-fake-arrow--active',
't-fake-arrow--remove'
);
}
};
</script>
<style lang="less">
@import '@/style/flex.less';
.t-select {
width: 120px;
height: 32px;
position: relative;
.dja();
border: 1px solid var(--home-page-color-19);
border-radius: 4px;
transition: all 0.3s;
input {
border: none;
border-radius: 4px;
outline: none;
width: 100%;
box-sizing: border-box;
line-height: inherit;
flex: 1;
padding: 0;
text-align: center;
font-size: 14px;
background: transparent;
color: var(--theme-color-4);
}
// 旋转的箭头
.ChevronDown-box {
font-size: 16px;
.icon {
color: var(--home-page-color-19);
margin-bottom: 2px;
margin-right: 8px;
}
// 旋转样式
.t-fake-arrow--active {
animation: customAnimation1 400ms;
animation-fill-mode: forwards;
}
@keyframes customAnimation1 {
from {
transform: rotate(0deg);
}
to {
transform: rotate(180deg);
}
}
//点击恢复转动的样式:
.t-fake-arrow--remove {
animation: customAnimation2 500ms;
animation-fill-mode: forwards;
}
@keyframes customAnimation2 {
from {
transform: rotate(180deg);
}
to {
transform: rotate(0deg);
}
}
}
.t-position-box {
box-sizing: border-box;
width: 100%;
max-height: 300px;
height: auto;
overflow: hidden;
position: absolute;
top: 40px;
box-shadow: 0 2px 16px 0 rgba(0, 0, 0, 0.1);
z-index: 1000;
background: var(--theme-color-34);
border-radius: 4px;
overflow-y: auto;
border: 1px solid var(--home-page-color-19);
li {
height: 32px;
display: flex;
align-items: center;
font-size: 14px;
border-bottom: 1px solid var(--home-page-color-19);
color: var(--theme-color-4);
.dja();
span {
.icon {
width: 20px;
height: 20px;
}
}
}
.active {
color: #848e9c;
font-weight: bold;
}
}
}
// select选中后的样式
.t-select-Selected-class {
border: 1px solid var(--theme-color20);
box-shadow: 0px 0px 5px var(--theme-color20);
transition: all 0.3s;
.ChevronDown-box {
.icon {
color: var(--theme-color20) !important;
}
}
}
//内容打开动画
.select-fade-enter-active {
transition: all 0.15s ease-out;
}
.select-fade-leave-active {
transition: all 0.15s cubic-bezier(1, 0.5, 0.8, 1);
}
.select-fade-enter-from,
.select-fade-leave-to {
transform: translateY(-6px);
opacity: 0;
}
</style>
.custom-tab-one {
.t-tabs__nav {
background: transparent;
}
.t-tabs__panel {
background: transparent;
}
.t-tabs__nav-item {
flex: none;
color: var(--theme-color-4);
&::after {
height: 0;
}
}
.t-is-active {
color: var(--theme-color-35);
}
}
import { defineComponent, PropType, ref } from 'vue';
import { ColumnProps } from '@/utils/interface/login';
import { tabPanels } from '@/constants/token';
import './index.less';
import { useI18n } from 'vue-i18n';
/**
* {false ? (
<t-tab-panel label={t('login.email')} value="test"></t-tab-panel>
) : (
''
)}
加上这一段是因为label无法多语言动态更新,ui库bug
*/
export default defineComponent({
props: {
options: {
type: Array as PropType<ColumnProps[]>,
default: tabPanels,
},
},
setup(props, { slots }) {
const { t } = useI18n();
const stickyProps = {
disabled: true,
};
// 不使用深拷贝
const my_options = ref<ColumnProps[]>(props.options);
const onChange = (v: string) => {
let index = my_options.value.findIndex((item: any) => item.value === v);
if (index !== -1) {
// tabs组件--true不销毁--false销毁
if (!my_options.value[index].is_load) {
my_options.value[index].is_load = true;
}
}
};
return () => (
<t-tabs
class="custom-tab-one"
default-value={props.options[0].value}
sticky-props={stickyProps}
onChange={onChange.bind(this)}
>
{false ? (
<t-tab-panel label={t('login.email')} value="test"></t-tab-panel>
) : (
''
)}
{props.options.map((item: any) => {
return (
<t-tab-panel
label={item.label}
value={item.value}
destroyOnHide={item.is_load}
v-slots={{
panel: item.panel,
}}
></t-tab-panel>
);
})}
</t-tabs>
);
},
});
import { defineComponent, ref } from 'vue';
import { useI18n } from 'vue-i18n';
import './index.less';
export default defineComponent({
props: {
accept: {
type: String,
default: 'image/png',
},
action: {
type: String,
default: '',
},
},
setup(props, { slots }) {
const { t } = useI18n();
const getFile = ref<any>(null);
const UploadChange = (e: any) => {
// let file = getFile.value.files[0];
console.log(e);
};
return () => (
<div class="custom-component-upload" onChange={UploadChange}>
<input
type="file"
ref="getFile"
accept={props.accept}
onChange={UploadChange}
/>
</div>
);
},
});
import { computed, defineComponent } from 'vue';
import { useI18n } from 'vue-i18n';
import { useStore } from 'vuex';
export default defineComponent({
props: {
total: Number,
},
setup(props, { slots }) {
// 表格共多少条数据
const { t } = useI18n();
const store = useStore();
const language = computed(() => store.getters['language/getLang']);
const languageText = () => {
if (language.value == 'cn') {
return `共 ${props.total} 条数据`;
} else if (language.value == 'en') {
return `Total ${props.total} data`;
} else if (language.value == 'es') {
return `${props.total} dato en total`;
}
};
return () => <div style="flex:1">{languageText()}</div>;
},
});
.custom-chose-account { .custom-chose-account {
display: flex;
justify-content: space-between;
align-items: center;
.chose-account-left {
.chose-account-title { .chose-account-title {
font-weight: 700; font-weight: 700;
font-size: 20px; font-size: 20px;
...@@ -16,4 +20,18 @@ ...@@ -16,4 +20,18 @@
} }
} }
} }
}
.choose-account-right {
.t-button {
height: 55px;
width: 140px;
border: 1px solid #dbdbdb;
border-radius: 8px;
background: white;
font-weight: 600;
font-size: 20px;
color: #000000;
--ripple-color: none !important;
}
}
} }
...@@ -3,7 +3,11 @@ import './index.less'; ...@@ -3,7 +3,11 @@ import './index.less';
import { ChoseAccount } from '@/utils/api/userApi'; import { ChoseAccount } from '@/utils/api/userApi';
import { useStore } from 'vuex'; import { useStore } from 'vuex';
export default defineComponent({ export default defineComponent({
setup() { props: {
modelValue: String,
},
emits: ['update:modelValue'],
setup(props, { emit }) {
const store = useStore(); const store = useStore();
const options = ref([]); const options = ref([]);
const value = ref(''); const value = ref('');
...@@ -35,11 +39,21 @@ export default defineComponent({ ...@@ -35,11 +39,21 @@ export default defineComponent({
console.log(e); console.log(e);
} }
}; };
// 切换展示的内容
const onChangeType = () => {
const { modelValue } = props;
if (modelValue == 'upload') {
emit('update:modelValue', 'table');
} else {
emit('update:modelValue', 'upload');
}
};
onMounted(() => { onMounted(() => {
getAccount(); getAccount();
}); });
return () => ( return () => (
<div class="custom-chose-account"> <div class="custom-chose-account">
<div class="chose-account-left">
<div class="chose-account-title">选择账户</div> <div class="chose-account-title">选择账户</div>
<t-select <t-select
class="chose-account-select" class="chose-account-select"
...@@ -54,6 +68,12 @@ export default defineComponent({ ...@@ -54,6 +68,12 @@ export default defineComponent({
onChange={handleChange} onChange={handleChange}
/> />
</div> </div>
<div class="choose-account-right">
<t-button onClick={onChangeType}>
{props.modelValue == 'upload' ? '发布记录' : '发布视频'}
</t-button>
</div>
</div>
); );
}, },
}); });
...@@ -18,6 +18,10 @@ export default defineComponent({ ...@@ -18,6 +18,10 @@ export default defineComponent({
const userAccount = computed(() => store.getters['user/getAccount']); const userAccount = computed(() => store.getters['user/getAccount']);
// 后台配置的地址 // 后台配置的地址
const adminConfigUrl = computed(() => store.getters['user/getadminConfig']); const adminConfigUrl = computed(() => store.getters['user/getadminConfig']);
// 上传策略
const uploadStrategy = computed(
() => store.getters['user/getuploadStrategy']
);
let tips = ''; let tips = '';
const files = ref([]); const files = ref([]);
// 文件地址 // 文件地址
...@@ -67,6 +71,17 @@ export default defineComponent({ ...@@ -67,6 +71,17 @@ export default defineComponent({
const cancelThis = () => { const cancelThis = () => {
cancelRequest(); cancelRequest();
}; };
// 上传进度定时器
const openpercentage = () => {
// 开启一个定时器,模拟上传进度
percentage.value = 0;
percentageInterval = setInterval(() => {
if (percentage.value == 99) {
return;
}
percentage.value += 1;
}, 100);
};
const beforeUpload = (file: File) => { const beforeUpload = (file: File) => {
if (!userAccount.value) { if (!userAccount.value) {
MessagePlugin.warning('请先选择一个账户'); MessagePlugin.warning('请先选择一个账户');
...@@ -87,23 +102,46 @@ export default defineComponent({ ...@@ -87,23 +102,46 @@ export default defineComponent({
console.log(response); console.log(response);
// return { name: 'FileName', url: response.url }; // return { name: 'FileName', url: response.url };
}; };
const requestSuccessMethod = async (file: any) => { // 上传成功回调
const UploadSuccessCallback = (uuid: any) => {
// 关闭定时器
window.clearInterval(percentageInterval);
MessagePlugin.success('上传成功');
// 将将完整url传给父组件
Curfile.url = adminConfigUrl.value + 'video/' + uuid + '.mp4';
// 成功2
Curfile.status = 2;
emit('UploadVideo', props.index, Curfile.url);
};
// 上传失败回调
const UploadErrorCallback = () => {
// 关闭定时器
window.clearInterval(percentageInterval);
Curfile.url = '';
// 失败0
Curfile.status = 0;
emit('UploadVideo', props.index, Curfile.url);
MessagePlugin.warning('上传失败');
};
// 内网上传-Intranet
const IntranetUpload = (file: any) => {
openpercentage();
return new Promise((resolve) => { return new Promise((resolve) => {
let uuid = v4(); let uuid = v4();
// 上传中状态
Curfile.status = 1; Curfile.status = 1;
const timer = setTimeout(() => { let url = '';
// 开启一个定时器,模拟上传进度 if (import.meta.env.MODE != 'development') {
percentage.value = 0; // 线上地址使用完整url
percentageInterval = setInterval(() => { url = `http://192.168.1.19:5000/video/'` + uuid + '.mp4';
if (percentage.value == 99) { } else {
return; url = '/video/' + uuid + '.mp4';
} }
percentage.value += 1; const timer = setTimeout(() => {
}, 100);
// 中断上传 // 中断上传
const CancelToken = axios.CancelToken; const CancelToken = axios.CancelToken;
request request
.put('/video/' + uuid + '.mp4', file[0].raw, { .put(url, file[0].raw, {
cancelToken: new CancelToken(function executor(c) { cancelToken: new CancelToken(function executor(c) {
// executor 函数接收一个 cancel 函数作为参数 // executor 函数接收一个 cancel 函数作为参数
cancelRequest = c; cancelRequest = c;
...@@ -112,31 +150,75 @@ export default defineComponent({ ...@@ -112,31 +150,75 @@ export default defineComponent({
.then((res: any) => { .then((res: any) => {
// resolve 参数为关键代码 // resolve 参数为关键代码
if (res == 201) { if (res == 201) {
// 关闭定时器 UploadSuccessCallback(uuid);
window.clearInterval(percentageInterval);
MessagePlugin.success('上传成功');
// 将将完整url传给父组件
Curfile.url = adminConfigUrl.value + 'video/' + uuid + '.mp4';
// 成功2
Curfile.status = 2;
emit('UploadVideo', props.index, Curfile.url);
resolve({ resolve({
status: 'success', status: 'success',
response: { url: Curfile.url }, response: { url: Curfile.url },
}); });
} else { } else {
// 关闭定时器 UploadErrorCallback();
window.clearInterval(percentageInterval);
Curfile.url = '';
// 失败0
Curfile.status = 0;
emit('UploadVideo', props.index, Curfile.url);
MessagePlugin.warning('上传失败');
} }
}); });
}, 1000); }, 1000);
}); });
}; };
// 外网上传-func
const ExtranetUpload = (file: any, config: any) => {
openpercentage();
return new Promise((resolve) => {
let uuid = v4();
// 上传中状态
Curfile.status = 1;
let url = '';
const { config } = uploadStrategy.value;
if (import.meta.env.MODE != 'development') {
// 线上
url = 'https://' + config.host;
} else {
// 本地
// url = '/files';
url = 'https://' + config.host;
}
const timer = setTimeout(() => {
let formData = new FormData();
formData.append('file', file[0].raw);
formData.append('key', config.dir + uuid + '.mp4');
formData.append('policy', config.policy);
formData.append('OSSAccessKeyId', config.accessid);
formData.append('success_action_status', '200');
formData.append('callback', config.callback);
formData.append('signature', config.signature);
formData.append('name', uuid + '.mp4');
request
.put(url, formData, {
headers: {
'Content-Type': 'multipart/form-data',
},
})
.then((res: any) => {
// resolve 参数为关键代码
if (res == 200) {
UploadSuccessCallback(uuid);
resolve({
status: 'success',
response: { url: Curfile.url },
});
} else {
UploadErrorCallback();
}
});
}, 1000);
});
};
const requestSuccessMethod = async (file: any) => {
if (uploadStrategy.value.oss) {
// 外网
return ExtranetUpload(file, uploadStrategy.value.config);
} else {
// 内网
return IntranetUpload(file);
}
};
// 未上传 // 未上传
const notUploadHtml = () => { const notUploadHtml = () => {
return ( return (
...@@ -233,7 +315,7 @@ export default defineComponent({ ...@@ -233,7 +315,7 @@ export default defineComponent({
<t-button class="reset-button" onClick={ResetUpload}> <t-button class="reset-button" onClick={ResetUpload}>
重置 重置
</t-button> </t-button>
<t-button onClick={cancelThis}>中断请求</t-button> {/* <t-button onClick={cancelThis}>中断请求</t-button> */}
</div> </div>
</div> </div>
); );
......
// import { CommonApi } from '@/shop/api/common.js'
// import { Message } from 'element-ui'
// export default {
// data() {
// return {
// oss: {}, // oss 上传
// ossOptions: {
// key: '',
// policy: '',
// OSSAccessKeyId: '',
// success_action_status: '200', // 让服务端返回200,不然,默认会返回204
// callback: '',
// signature: ''
// },
// action: '',
// isCreated: false
// }
// },
// created() {
// if (this.isCreated) {
// this.requestOssPolicy()
// }
// },
// destroyed() {
// document.removeEventListener('paste', this.pasteHandler)
// },
// methods: {
// onExceed() {
// Message.error(`上传数量不能超过${this.uploadLimit}个`)
// },
// fileName(file) {
// return this.oss.domain + file.raw.keys
// },
// async fieldBeforeUpload(file) {
// await this.requestOssPolicy()
// return new Promise((resolve, reject) => {
// const ext = file.name.split('.').pop()
// file.keys = this.ossOptions.key = this.oss.dir + (new Date().getTime() + Math.random() * 1000000) + '.' + ext
// const isRightSize = file.size / 1024 / 1024 < 2
// if (!isRightSize) {
// Message.error('文件大小超过 2MB')
// return reject(false)
// }
// const isAccept = new RegExp('image/*').test(file.type)
// if (!isAccept) {
// Message.error('应该选择image/*类型的文件')
// return reject(false)
// }
// return resolve(true)
// })
// },
// handleGoodsImageError(res, file) {
// Message.error('上传错误,请刷新重试')
// },
// pasteHandler(e) {
// const _this = this
// var cbd = e.clipboardData
// var ua = window.navigator.userAgent
// // 如果是 Safari 直接 return
// if (!(e.clipboardData && e.clipboardData.items)) {
// return
// }
// // Mac平台下Chrome49版本以下 复制Finder中的文件的Bug Hack掉
// if (cbd.items && cbd.items.length === 2 && cbd.items[0].kind === 'string' && cbd.items[1].kind === 'file' &&
// cbd.types && cbd.types.length === 2 && cbd.types[0] === 'text/plain' && cbd.types[1] === 'Files' &&
// ua.match(/Macintosh/i) && Number(ua.match(/Chrome\/(\d{2})/i)[1]) < 49) {
// return
// }
// // 循环遍历粘贴板
// for (var i = 0; i < cbd.items.length; i++) {
// var item = cbd.items[i]
// // 判断类型
// if (item.kind === 'file') {
// var blob = item.getAsFile()
// if (blob.size === 0) {
// return
// }
// // 进行校验
// if (_this.fieldBeforeUpload(blob)) {
// _this.uploadImg(blob, (data) => {
// _this.fileList.push({
// name: data,
// url: data
// })
// // 通知父组件
// _this.changeList('', _this.$refs.avatar.fileList)
// })
// }
// }
// }
// },
// pasteList() {
// // demo 程序将粘贴事件绑定到 document 上
// document.addEventListener('paste', this.pasteHandler, false)
// },
// async uploadImg(item, callback) {
// const _this = this
// const ext = item.name.split('.').pop()
// const name = (new Date().getTime() + Math.random() * 1000000) + '.' + ext
// this.ossOptions.key = this.oss.dir + name
// const keys = this.oss.dir + name
// var formData = new FormData()
// for (const keys in this.ossOptions) {
// formData.append(keys, this.ossOptions[keys])
// }
// formData.append('file', item)
// await CommonApi.common.upload('https://' + this.oss.host, formData).catch(() => {})
// const str = _this.oss.domain + keys
// callback(str)
// },
// async requestOssPolicy() {
// const res = await CommonApi.common.policy({ module: 'shop' })
// const oss = res.data
// this.oss = oss
// this.ossOptions = {
// key: oss.dir + '${filename}',
// policy: oss.policy,
// OSSAccessKeyId: oss.accessid,
// success_action_status: '200', // 让服务端返回200,不然,默认会返回204
// callback: oss.callback,
// signature: oss.signature
// }
// this.action = 'https://' + this.oss.host
// }
// }
// }
export const gettfdd = () => {
//
};
// async uploadImg(item, callback) {
// const _this = this
// const ext = item.name.split('.').pop()
// const name = (new Date().getTime() + Math.random() * 1000000) + '.' + ext
// this.ossOptions.key = this.oss.dir + name
// const keys = this.oss.dir + name
// var formData = new FormData()
// for (const keys in this.ossOptions) {
// formData.append(keys, this.ossOptions[keys])
// }
// formData.append('file', item)
// await CommonApi.common.upload('https://' + this.oss.host, formData).catch(() => {})
// const str = _this.oss.domain + keys
// callback(str)
// },
.custom-submit-table {
margin-top: 40px;
table {
thead {
tr {
& > :first-child {
border-radius: 8px 0 0 8px;
}
& > :last-child {
border-radius: 0 8px 8px 0;
}
th {
border-bottom: none;
font-weight: 400;
font-size: 18px;
color: #000000;
background: #f7f7f7;
}
}
}
tbody {
tr {
td {
}
}
}
}
.custom-pagination-box {
padding: 20px 20px 0 20px;
.t-pagination {
.t-is-current {
background: #fe2c55;
border: none;
}
}
}
}
import { defineComponent, onMounted, ref, computed, watch } from 'vue';
import { getSubmitTableList } from '@/utils/api/userApi';
import './index.less';
import { useStore } from 'vuex';
export default defineComponent({
setup(props) {
const store = useStore();
const data = ref([]);
const pageNum = ref(1);
const pageSize = ref(10);
const total = ref(0);
const loading = ref(false);
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,
});
if (res.code == 0) {
res.data.data.forEach((item: any) => {
item.n_title = item.parameters.title;
});
data.value = res.data.data;
total.value = res.data.total;
}
loading.value = false;
} catch (e) {
console.log(e);
loading.value = false;
}
};
watch(
() => userAccount.value,
(v) => {
if (v) {
pageNum.value = 1;
getList();
}
}
);
watch(
() => pageSize.value,
(v) => {
// 页数变化重新请求
getList();
}
);
onMounted(() => {
// 请求表格
getList();
});
const onPageChange = (value: number) => {
getList();
};
const columns: any = [
{
title: '账号',
colKey: 'account_name',
},
{
title: '内容',
colKey: 'n_title',
},
{
title: '发布',
colKey: 'status_label',
},
{
title: '发布时间',
colKey: 'publish_time',
},
];
return () => (
<div class="custom-submit-table">
<t-table
data={data.value}
row-key="index"
columns={columns}
hover
ShowJumper
loading={loading.value}
></t-table>
<div class="custom-pagination-box">
<t-pagination
v-model:pageNum={pageNum.value}
v-model:pageSize={pageSize.value}
total={total.value}
onCurrentChange={onPageChange}
></t-pagination>
</div>
</div>
);
},
});
...@@ -29,9 +29,5 @@ ...@@ -29,9 +29,5 @@
padding-left: 12px; padding-left: 12px;
} }
} }
& > :not(:last-child) {
width: 1042px;
margin: 0 auto;
}
} }
} }
...@@ -7,6 +7,7 @@ import { useStore } from 'vuex'; ...@@ -7,6 +7,7 @@ import { useStore } from 'vuex';
import { UserUploadVideo } from '@/utils/api/userApi'; import { UserUploadVideo } from '@/utils/api/userApi';
import { MessagePlugin } from 'tdesign-vue-next'; import { MessagePlugin } from 'tdesign-vue-next';
import Animation from '@/components/Animation.vue'; import Animation from '@/components/Animation.vue';
import UploadTable from './compontent/uploadTable';
export default defineComponent({ export default defineComponent({
setup() { setup() {
const store = useStore(); const store = useStore();
...@@ -24,6 +25,8 @@ export default defineComponent({ ...@@ -24,6 +25,8 @@ export default defineComponent({
files: '', files: '',
}, },
]); ]);
// 默认展示的内容
const defaultType = ref('upload');
let obj = { let obj = {
textValue: '', textValue: '',
files: '', files: '',
...@@ -73,10 +76,10 @@ export default defineComponent({ ...@@ -73,10 +76,10 @@ export default defineComponent({
loading.value = false; loading.value = false;
} }
}; };
return () => ( // 发布视频
<div class="custom-upload-page narrow-scrollbar"> const uploadVideoHtml = () => {
<div class="custom-upload-page-child"> return (
<SelectAccount></SelectAccount> <div v-show={defaultType.value == 'upload'}>
<div class="custom-upload-box"> <div class="custom-upload-box">
<span class="custom-upload-title">上传视频</span> <span class="custom-upload-title">上传视频</span>
{uploadList.value.map((item: any, index: number) => ( {uploadList.value.map((item: any, index: number) => (
...@@ -94,6 +97,15 @@ export default defineComponent({ ...@@ -94,6 +97,15 @@ export default defineComponent({
<span>新添新上传视频</span> <span>新添新上传视频</span>
</div> </div>
</div> </div>
);
};
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>
<Animation <Animation
v-show={loading.value} v-show={loading.value}
poistion="fixed" poistion="fixed"
......
import { TOKEN_NAME, APP_COOKIE } from '@/config/global'; import { TOKEN_NAME, APP_COOKIE } from '@/config/global';
import Cookies from 'js-cookie'; import Cookies from 'js-cookie';
import { getAdminConfig } from '@/utils/api/userApi'; import { getAdminConfig, getConfigPolicy } from '@/utils/api/userApi';
interface MyState { interface MyState {
token: String | undefined | null; token: String | undefined | null;
account: number | string; account: number | string;
adminConfig: string; adminConfig: string;
uploadStrategy: any;
} }
// 获取cookie // 获取cookie
const getUserCookie = () => { const getUserCookie = () => {
...@@ -21,6 +22,10 @@ const state: MyState = { ...@@ -21,6 +22,10 @@ const state: MyState = {
token: getUserCookie(), token: getUserCookie(),
account: '', account: '',
adminConfig: '', adminConfig: '',
uploadStrategy: {
oss: null,
config: {},
},
}; };
type StateType = typeof state; type StateType = typeof state;
...@@ -50,6 +55,14 @@ const mutations = { ...@@ -50,6 +55,14 @@ const mutations = {
setadminConfig(state: StateType, url: string) { setadminConfig(state: StateType, url: string) {
state.adminConfig = url; state.adminConfig = url;
}, },
// 更新上传策略
setuploadStrategy(state: StateType, config: any) {
state.uploadStrategy.oss = config.oss;
if (config.oss) {
// 上传配置
state.uploadStrategy.config = config.config;
}
},
}; };
const getters = { const getters = {
...@@ -62,6 +75,9 @@ const getters = { ...@@ -62,6 +75,9 @@ const getters = {
getadminConfig: (state: StateType) => { getadminConfig: (state: StateType) => {
return state.adminConfig; return state.adminConfig;
}, },
getuploadStrategy: (state: StateType) => {
return state.uploadStrategy;
},
}; };
const actions = { const actions = {
...@@ -70,6 +86,21 @@ const actions = { ...@@ -70,6 +86,21 @@ const actions = {
let res: any = await getAdminConfig(); let res: any = await getAdminConfig();
if (res.code == 0) { if (res.code == 0) {
commit('setadminConfig', res.data.config.intranet_url); commit('setadminConfig', res.data.config.intranet_url);
if (res.data.config.oss) {
// 请求上传配置
let result: any = await getConfigPolicy();
if (result.code == 0) {
commit('setuploadStrategy', {
oss: res.data.config.oss,
config: result.data,
});
}
} else {
// 内网上传
commit('setuploadStrategy', {
oss: res.data.config.oss,
});
}
} }
} catch (e) { } catch (e) {
console.log(e); console.log(e);
......
...@@ -10,6 +10,8 @@ import { ...@@ -10,6 +10,8 @@ import {
Textarea as TTextarea, Textarea as TTextarea,
Upload as TUpload, Upload as TUpload,
Progress as TProgress, Progress as TProgress,
Table as TTable,
Pagination as TPagination,
} from 'tdesign-vue-next'; } from 'tdesign-vue-next';
const components: any[] = [ const components: any[] = [
TSelect, TSelect,
...@@ -20,11 +22,13 @@ const components: any[] = [ ...@@ -20,11 +22,13 @@ const components: any[] = [
TButton, TButton,
TUpload, TUpload,
TProgress, TProgress,
TPagination,
]; ];
export default { export default {
install(app: any) { install(app: any) {
components.forEach((component, index) => { components.forEach((component, index) => {
app.component(component.name, component); app.component(component.name, component);
}); });
app.component('t-table', TTable);
}, },
}; };
...@@ -50,3 +50,24 @@ export const UserUploadVideo = (data: any) => { ...@@ -50,3 +50,24 @@ export const UserUploadVideo = (data: any) => {
} }
); );
}; };
// 获取阿里云上传策略
export const getConfigPolicy = () => {
let token = getUserCookie();
return request.get('/api/users/config/policy', {
headers: {
authorization: `Bearer ${token}`,
},
});
};
// 获取发布表格数据
export const getSubmitTableList = (data: any) => {
let token = getUserCookie();
return request.get('/api/users/publish-tasks', {
params: data,
headers: {
authorization: `Bearer ${token}`,
},
});
};
import axios from 'axios'; import axios from 'axios';
import { store } from '@/store/index';
import { MessagePlugin } from 'tdesign-vue-next'; import { MessagePlugin } from 'tdesign-vue-next';
import router from '@/router'; import router from '@/router';
const mode = import.meta.env.MODE; const mode = import.meta.env.MODE;
const getBaseUrl = () => { const getBaseUrl = () => {
if (mode == 'app') { return '/';
return 'https://silkr.net';
} else {
return undefined;
}
}; };
const instance = axios.create({ const instance = axios.create({
baseURL: getBaseUrl(), baseURL: getBaseUrl(),
timeout: 60000, timeout: 60000,
// withCredentials: mode == 'development' ? false : true, // withCredentials: mode == 'development' ? false : true,
withCredentials: true, withCredentials: false,
}); });
// 请求头 // 请求头
instance.interceptors.request.use((config: any) => { instance.interceptors.request.use((config: any) => {
const lang = store.getters['language/getLang'];
config.headers['lang'] = lang;
return config; return config;
}); });
...@@ -28,7 +21,7 @@ instance.defaults.timeout = 60000; ...@@ -28,7 +21,7 @@ instance.defaults.timeout = 60000;
instance.interceptors.response.use( instance.interceptors.response.use(
(response) => { (response) => {
const { data, status } = response; const { data, status } = response;
if (status == 201) { if (status == 201 || status == 200) {
return status; return status;
} }
if (data.code === 0) { if (data.code === 0) {
...@@ -39,13 +32,12 @@ instance.interceptors.response.use( ...@@ -39,13 +32,12 @@ instance.interceptors.response.use(
} }
}, },
(err) => { (err) => {
console.log('我执行了2');
if ('response' in err) { if ('response' in err) {
const { message: msg, status_code } = err.response.data; const { message: msg, status_code } = err.response.data;
if (status_code == 403) { if (status_code == 403) {
// MessagePlugin.warning(i18n.global.t('message.loginInfo')); // MessagePlugin.warning(i18n.global.t('message.loginInfo'));
router.replace({ router.replace({
path: '/login', path: '/',
}); });
return; return;
} }
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
import{d as a,K as t,L as l,V as s,W as e,H as o,X as i,Y as d}from"./vue-6f9f63a6.js";import{a as u}from"./index-bace56c9.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-fcc744cd.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-6be34360.js","./index-legacy-725fd718.js"],(function(t,e){"use strict";var l,a,i,s,o,u,d,n,c;return{setters:[t=>{l=t.d,a=t.K,i=t.L,s=t.V,o=t.W,u=t.H,d=t.X,n=t.Y},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-9d678870.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,K as t,L as a,d as s,e,M as n,I as c,N as o,O as u,J as r,P as h,Q as i}from"./vue-6f9f63a6.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}; 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-6be34360.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.K,c=t.L,u=t.d,a=t.e,s=t.M,r=t.I,i=t.N,v=t.O,h=t.J,o=t.P,d=t.Q}],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})])}}}))}}})); 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})])}}}))}}}));
import{d as e,b as t,r,l as a,H as o,K as s,e as l,O as n,M as c,R as i,j as u,z as p,L as d,S as m,U as v,J as f}from"./vue-6f9f63a6.js";import{u as y,r as O,_ as b,M as h,U as g}from"./index-bace56c9.js";import{A as w}from"./Animation-6bd1ad27.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()=>O(P,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 V(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){b(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 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((()=>V(V({},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()=>O(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(),O=r(!1),b=a({account:"",password:""}),j=t((()=>({account:[{required:!0,messgae:"账号不能为空",type:"error"}],password:[{required:!0,message:"密码不能为空",type:"error"}]}))),k=()=>{h.success("重置成功")},P=async({validateResult:e,firstError:t})=>{if(!0===e)try{O.value=!0;let e=await g({email:b.account,password:b.password});0==e.code&&(h.success("登录成功"),y.commit("user/setToken",{token:e.data.access_token,time:e.data.expires_in}),d.replace({path:"/upload"})),O.value=!1}catch(r){O.value=!1}else h.closeAll(),h.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: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(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,O.value]])])}}}),H={class:"custom-home-page-login"},M=e({__name:"index",setup:e=>(e,t)=>(o(),s("div",H,[l(E)]))});export{M 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-fcc744cd.js";import{A as w}from"./Animation-a5de4968.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.
This source diff could not be displayed because it is too large. You can view the blob instead.
System.register(["./vue-legacy-6be34360.js","./index-legacy-725fd718.js","./Animation-legacy-4a5675c2.js"],(function(e,t){"use strict";var r,a,o,l,n,c,s,i,u,p,d,v,f,m,y,g,O,b,h,w,j,k;return{setters:[e=>{r=e.d,a=e.b,o=e.r,l=e.l,n=e.H,c=e.K,s=e.e,i=e.O,u=e.M,p=e.R,d=e.j,v=e.z,f=e.L,m=e.S,y=e.U,g=e.J},e=>{O=e.u,b=e.r,h=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){h(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}}]},z=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}=O(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 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 x(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 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}=O(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(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),O=l({account:"",password:""}),b=a((()=>({account:[{required:!0,messgae:"账号不能为空",type:"error"}],password:[{required:!0,message:"密码不能为空",type:"error"}]}))),h=()=>{w.success("重置成功")},P=async({validateResult:e,firstError:a})=>{if(!0===e)try{f.value=!0;let e=await j({email:O.account,password:O.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:O,rules:u(b),colon:!0,"label-width":0,onReset:h,onSubmit:P},{default:i((()=>[s(a,{name:"account"},{default:i((()=>[s(r,{modelValue:O.account,"onUpdate:modelValue":t[0]||(t[0]=e=>O.account=e),clearable:"",placeholder:"请输入账户名"},{"prefix-icon":i((()=>[s(u(z))])),_:1},8,["modelValue"])])),_:1}),s(a,{name:"password"},{default:i((()=>[s(r,{modelValue:O.password,"onUpdate:modelValue":t[1]||(t[1]=e=>O.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]])])}}}),M={class:"custom-home-page-login"};e("default",r({__name:"index",setup:e=>(e,t)=>(n(),c("div",M,[s(H)]))}))}}})); System.register(["./vue-legacy-3fa9a658.js","./index-legacy-9d678870.js","./Animation-legacy-48eaf7d2.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.
...@@ -8,9 +8,9 @@ ...@@ -8,9 +8,9 @@
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
/> />
<title>TikTok-upload</title> <title>TikTok-upload</title>
<script type="module" crossorigin src="/assets/index-bace56c9.js"></script> <script type="module" crossorigin src="/assets/index-fcc744cd.js"></script>
<link rel="modulepreload" crossorigin href="/assets/vue-6f9f63a6.js"> <link rel="modulepreload" crossorigin href="/assets/vue-f8fdfec2.js">
<link rel="stylesheet" href="/assets/style-7404420e.css"> <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> <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> <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> </head>
...@@ -19,6 +19,6 @@ ...@@ -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>!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-polyfill" src="/assets/polyfills-legacy-b1e0acc8.js"></script>
<script nomodule crossorigin id="vite-legacy-entry" data-src="/assets/index-legacy-725fd718.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script> <script nomodule crossorigin id="vite-legacy-entry" data-src="/assets/index-legacy-9d678870.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
</body> </body>
</html> </html>
...@@ -27,6 +27,13 @@ export default defineConfig(({ command, mode }) => { ...@@ -27,6 +27,13 @@ export default defineConfig(({ command, mode }) => {
proxy: { proxy: {
'/api': api, '/api': api,
'/video': 'http://192.168.1.19:5000', '/video': 'http://192.168.1.19:5000',
'/files': {
target: 'https://chensav.oss-cn-shenzhen.aliyuncs.com', // 代理的目标地址
changeOrigin: true, // 开发模式,默认的origin是真实的 origin:localhost:3000 代理服务会把origin修改为目标地址
// secure: true, // 是否https接口
// ws: true, // 是否代理websockets
rewrite: (path) => path.replace(/^\/files/, ''),
},
}, },
}, },
plugins: [ plugins: [
......
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