Commit 28a22dd5 by haojie

动作视频结尾不会播放的问题

parent b85de4a3
<template> <template>
<div class="add-video-play"> <div class="add-video-play">
<div class="main-video-play" v-show="showFirstVideo && !showActionVideo"> <div class="main-video-play" v-show="showFirstVideo && !showActionVideo && !showActionEndVideo">
<template v-for="(item, index) in mainVideoList" :key="item.name"> <template v-for="(item, index) in mainVideoList" :key="item.name">
<video <video
v-show="item.show" v-show="item.show"
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
</div> </div>
<!-- 互动 --> <!-- 互动 -->
<video <video
v-show="!showFirstVideo && !showActionVideo" v-show="!showFirstVideo && !showActionVideo && !showActionEndVideo"
ref="videoSecond" ref="videoSecond"
:volume="secondVideoVolume" :volume="secondVideoVolume"
class="video-default" class="video-default"
...@@ -26,13 +26,21 @@ ...@@ -26,13 +26,21 @@
></video> ></video>
<!-- 动作 --> <!-- 动作 -->
<video <video
v-show="showActionVideo" v-show="showActionVideo && !showActionEndVideo"
ref="videoAction" ref="videoAction"
class="video-default" class="video-default"
:src="actionVideo" :src="actionVideo"
@ended="actionVideoEnded" @ended="actionVideoEnded"
@canplay="actionCanplay" @canplay="actionCanplay"
></video> ></video>
<!-- 结束动作 -->
<video
v-show="showActionEndVideo"
ref="videoEndAction"
class="video-default"
:src="actionEndVideo"
@ended="actionEndVideoEnded"
></video>
<ConfirmDialog <ConfirmDialog
v-model="confirmVisible" v-model="confirmVisible"
:closeOnOverlayClick="false" :closeOnOverlayClick="false"
...@@ -60,12 +68,13 @@ import Loading from '@/components/Loading/FirstCircle.vue'; ...@@ -60,12 +68,13 @@ import Loading from '@/components/Loading/FirstCircle.vue';
import { onBeforeRouteLeave } from 'vue-router'; import { onBeforeRouteLeave } from 'vue-router';
import { injectWindow } from '@/utils/pyqt'; import { injectWindow } from '@/utils/pyqt';
import { scriptTypePhonetics } from '@/service/CreateLive'; import { scriptTypePhonetics } from '@/service/CreateLive';
import { isDev } from '@/utils/tool';
// 再加一个动作视频标签 // 再加一个动作视频标签
const props = withDefaults( const props = withDefaults(
defineProps<{ defineProps<{
playMainIndex: number | null; currentPlayMainIndex: number | null;
video2: string; video2: string;
actionVideo?: string; actionVideo?: string;
playId?: any; playId?: any;
...@@ -76,7 +85,9 @@ const props = withDefaults( ...@@ -76,7 +85,9 @@ const props = withDefaults(
currentMainVideoIndex: number | null; currentMainVideoIndex: number | null;
playInfo: any; playInfo: any;
firstVideoIsMain: boolean; firstVideoIsMain: boolean;
endVideoIsMain: boolean;
showActionVideo: boolean; showActionVideo: boolean;
realVideoList: any[];
}>(), }>(),
{ {
progress: 0, progress: 0,
...@@ -89,11 +100,12 @@ const emit = defineEmits([ ...@@ -89,11 +100,12 @@ const emit = defineEmits([
'playEnd', 'playEnd',
'actionPlayChange', 'actionPlayChange',
'update:progress', 'update:progress',
'update:playMainIndex', 'update:currentPlayMainIndex',
'mainVideoListChange', 'mainVideoListChange',
'initActionVideo', 'initActionVideo',
'update:showActionVideo', 'update:showActionVideo',
'update:firstVideoIsMain', 'update:firstVideoIsMain',
'update:endVideoIsMain',
]); ]);
const store = useStore(); const store = useStore();
...@@ -115,7 +127,7 @@ const videoSecondFirstPlay = ref(true); ...@@ -115,7 +127,7 @@ const videoSecondFirstPlay = ref(true);
const actionVideoFirstPlay = ref(true); const actionVideoFirstPlay = ref(true);
// 当前正在播放的主视频下标 // 当前正在播放的主视频下标
const currentPlayMainIndex = ref(props.playMainIndex); const currentPlayMainIndex = ref(props.currentPlayMainIndex);
/** /**
* element * element
...@@ -126,6 +138,13 @@ const videoFirst = ref<HTMLVideoElement>(); ...@@ -126,6 +138,13 @@ const videoFirst = ref<HTMLVideoElement>();
const videoSecond = ref<HTMLVideoElement>(); const videoSecond = ref<HTMLVideoElement>();
// 动作视频 // 动作视频
const videoAction = ref<HTMLVideoElement>(); const videoAction = ref<HTMLVideoElement>();
// 结束动作
const videoEndAction = ref<HTMLVideoElement>();
// 结束动作是否显示
const showActionEndVideo = ref(false);
// 结束动作url
const actionEndVideo = ref('');
// 初始音量 // 初始音量
const initVolume = 1; const initVolume = 1;
...@@ -160,6 +179,7 @@ const mainVideoPlayChange = (status: boolean, index: number | boolean = false) = ...@@ -160,6 +179,7 @@ const mainVideoPlayChange = (status: boolean, index: number | boolean = false) =
} else if (typeof index === 'number') { } else if (typeof index === 'number') {
updateMainVideoShow(true, index); updateMainVideoShow(true, index);
videoFirst.value[index].play(); videoFirst.value[index].play();
currentPlayMainIndex.value = index;
} }
openInterval(); openInterval();
} else { } else {
...@@ -203,6 +223,12 @@ const confirm = () => { ...@@ -203,6 +223,12 @@ const confirm = () => {
} }
// 确定之后修改状态 // 确定之后修改状态
emit('update:firstVideoIsMain', true); emit('update:firstVideoIsMain', true);
// 找最后的动作
findLastAction();
if (isDev()) {
// 测试将视频进度改为160
// videoFirst.value[currentPlayMainIndex.value].currentTime = 170;
}
}; };
// 主视频可以播放 // 主视频可以播放
...@@ -231,6 +257,26 @@ const mainVideoPlayStatus = (index: number) => { ...@@ -231,6 +257,26 @@ const mainVideoPlayStatus = (index: number) => {
}); });
}; };
// 结束动作视频状态改变
const endActionVideoStatus = (status: boolean) => {
showActionEndVideo.value = status;
if (status) {
videoEndAction.value.play();
} else {
videoEndAction.value.pause();
}
};
// 找到最后一个动作视频
const findLastAction = () => {
const { realVideoList, mainVideoList, endVideoIsMain } = props;
if (!endVideoIsMain && typeof currentPlayMainIndex.value === 'number') {
const actionUrl = realVideoList[mainVideoList[currentPlayMainIndex.value].videoIndex].actionUrl;
actionEndVideo.value = actionUrl[actionUrl.length - 1].url;
console.log(actionEndVideo.value, '找到结束动作视频了');
}
};
// 下一个要播放的视频 // 下一个要播放的视频
const nextVideoToPlay = (status: boolean = true) => { const nextVideoToPlay = (status: boolean = true) => {
const { mainVideoList } = props; const { mainVideoList } = props;
...@@ -240,7 +286,7 @@ const nextVideoToPlay = (status: boolean = true) => { ...@@ -240,7 +286,7 @@ const nextVideoToPlay = (status: boolean = true) => {
if (nextIndex !== -1 && status) { if (nextIndex !== -1 && status) {
mainVideoPlayStatus(nextIndex); mainVideoPlayStatus(nextIndex);
// 更新当前正在播放的video标签下标 // 更新当前正在播放的video标签下标
emit('update:playMainIndex', nextIndex); emit('update:currentPlayMainIndex', nextIndex);
if (mainVideoList[nextIndex].restart && status) { if (mainVideoList[nextIndex].restart && status) {
// 本次播放是重复播放,通知父组件初始化动作视频的状态 // 本次播放是重复播放,通知父组件初始化动作视频的状态
console.log('本次播放是重复播放,初始化动作视频的状态'); console.log('本次播放是重复播放,初始化动作视频的状态');
...@@ -256,6 +302,8 @@ const nextVideoToPlay = (status: boolean = true) => { ...@@ -256,6 +302,8 @@ const nextVideoToPlay = (status: boolean = true) => {
// 播放 // 播放
console.log('开始播放下一个主视频,1'); console.log('开始播放下一个主视频,1');
mainVideoPlayChange(true, nextIndex); mainVideoPlayChange(true, nextIndex);
findLastAction();
// 找到最后一个动作视频
} else if (nextIndex == -1 && !status) { } else if (nextIndex == -1 && !status) {
// 更新状态 // 更新状态
emit('mainVideoListChange', { emit('mainVideoListChange', {
...@@ -266,6 +314,7 @@ const nextVideoToPlay = (status: boolean = true) => { ...@@ -266,6 +314,7 @@ const nextVideoToPlay = (status: boolean = true) => {
// 播放 // 播放
console.log('开始播放下一个主视频,2'); console.log('开始播放下一个主视频,2');
mainVideoPlayChange(true); mainVideoPlayChange(true);
findLastAction();
} else { } else {
console.log('未找到下一个要播放的主视频'); console.log('未找到下一个要播放的主视频');
} }
...@@ -298,8 +347,14 @@ const firstVideoEnded = (index: number) => { ...@@ -298,8 +347,14 @@ const firstVideoEnded = (index: number) => {
}); });
// 强制关闭自己的播放状态,防止loop生效 // 强制关闭自己的播放状态,防止loop生效
mainVideoPlayChange(false); mainVideoPlayChange(false);
// 最后一个视频是否是主视频
if (props.endVideoIsMain) {
// 找下一个
nextVideoToPlay(); nextVideoToPlay();
} else {
// 播放结束动作
endActionVideoStatus(true);
}
} }
}; };
...@@ -333,6 +388,16 @@ const actionVideoEnded = () => { ...@@ -333,6 +388,16 @@ const actionVideoEnded = () => {
} }
}; };
// 结束动作播放完毕
const actionEndVideoEnded = () => {
if (videoEndAction.value.ended) {
// 隐藏自己
endActionVideoStatus(false);
// 下一个主视频
nextVideoToPlay();
}
};
const canplay2 = () => { const canplay2 = () => {
if (!videoSecondFirstPlay.value) { if (!videoSecondFirstPlay.value) {
showFirstVideo.value = false; showFirstVideo.value = false;
...@@ -386,12 +451,13 @@ const onPlay = () => { ...@@ -386,12 +451,13 @@ const onPlay = () => {
console.log(index, '开始播放', mainVideoList[index]); console.log(index, '开始播放', mainVideoList[index]);
// 开始播放 // 开始播放
mainVideoPlayChange(true, index); mainVideoPlayChange(true, index);
emit('update:playMainIndex', index); emit('update:currentPlayMainIndex', index);
} }
// 第一个视频连带着第二个视频一起播放--立马暂停是为了处理后续进来的视频 // 第一个视频连带着第二个视频一起播放--立马暂停是为了处理后续进来的视频
videoSecond.value.play(); videoSecond.value.play();
videoSecond.value.pause(); videoSecond.value.pause();
videoSecondFirstPlay.value = false; videoSecondFirstPlay.value = false;
findLastAction();
}; };
const onStop = () => { const onStop = () => {
...@@ -408,7 +474,7 @@ watch( ...@@ -408,7 +474,7 @@ watch(
); );
watch(props.playInfo, (v) => { watch(props.playInfo, (v) => {
if (v && v.is_main) { if (v && v.mainStart) {
// //
console.log('开始播放主视频-watch'); console.log('开始播放主视频-watch');
nextVideoToPlay(false); nextVideoToPlay(false);
...@@ -445,7 +511,7 @@ watch( ...@@ -445,7 +511,7 @@ watch(
); );
watch( watch(
() => props.playMainIndex, () => props.currentPlayMainIndex,
(v) => { (v) => {
currentPlayMainIndex.value = v; currentPlayMainIndex.value = v;
}, },
...@@ -463,7 +529,7 @@ watch( ...@@ -463,7 +529,7 @@ watch(
watch( watch(
() => currentPlayMainIndex.value, () => currentPlayMainIndex.value,
(v) => { (v) => {
emit('update:playMainIndex', v); emit('update:currentPlayMainIndex', v);
}, },
); );
......
import { DataType } from '@/utils/tool';
import './index.less';
import { defineComponent, provide, ref } from 'vue';
export default defineComponent({
props: {
data: Object,
rules: Object,
},
emits: ['submit'],
setup(props, { emit, slots }) {
const newRule = ref<any>({});
const ewriteRules = () => {
const { data, rules } = props;
Object.keys(rules).forEach((key: string) => {
rules[key].forEach((item: any) => {
// 是否显示error
item.leShow = false;
if (!DataType(newRule.value[key], 'array')) {
newRule.value[key] = [];
}
newRule.value[key].push(item);
});
});
console.log(newRule.value);
// 注入规则,提供给item使用
provide('leRules', rules);
};
//
ewriteRules();
const onSubmit = () => {
// 校验
// 通知tab_panel
emit('submit');
};
return () => (
<form class="le-form" onSubmit={onSubmit}>
{slots.default ? slots.default() : ''}
</form>
);
},
});
import './index.less';
import { defineComponent, inject, ref } from 'vue';
export default defineComponent({
props: {
name: String,
},
setup(props, { emit, slots }) {
const leRules: { value: object } = inject('leRules');
return () => (
<div class="le-form-item">
{slots.default ? slots.default() : ''}
<div class="form-item-error">{/* */}</div>
</div>
);
},
});
...@@ -2,9 +2,10 @@ ...@@ -2,9 +2,10 @@
<div class="custom-start-only-video-page"> <div class="custom-start-only-video-page">
<div class="start-only-video-live"> <div class="start-only-video-live">
<AddVideoPlay <AddVideoPlay
v-model:playMainIndex="currentPlayMainIndex" v-model:currentPlayMainIndex="currentPlayMainIndex"
v-model:showActionVideo="showActionVideo" v-model:showActionVideo="showActionVideo"
v-model:firstVideoIsMain="firstVideoIsMain" v-model:firstVideoIsMain="firstVideoIsMain"
v-model:endVideoIsMain="endVideoIsMain"
:loading="loading" :loading="loading"
:playId="addVideoId" :playId="addVideoId"
:liveDetail="liveDetail" :liveDetail="liveDetail"
...@@ -13,6 +14,7 @@ ...@@ -13,6 +14,7 @@
:mainVideoList="mainVideoList" :mainVideoList="mainVideoList"
:currentMainVideoIndex="currentMainVideoIndex" :currentMainVideoIndex="currentMainVideoIndex"
:playInfo="playInfo" :playInfo="playInfo"
:realVideoList="realVideoList"
@playEnd="playEnd" @playEnd="playEnd"
@actionPlayChange="actionPlayChange" @actionPlayChange="actionPlayChange"
@initActionVideo="initActionVideo" @initActionVideo="initActionVideo"
...@@ -37,7 +39,9 @@ const { ...@@ -37,7 +39,9 @@ const {
currentMainVideoIndex, currentMainVideoIndex,
playInfo, playInfo,
firstVideoIsMain, firstVideoIsMain,
endVideoIsMain,
showActionVideo, showActionVideo,
realVideoList,
playEnd, playEnd,
actionPlayChange, actionPlayChange,
currentTimeChange, currentTimeChange,
......
...@@ -59,6 +59,8 @@ export default function () { ...@@ -59,6 +59,8 @@ export default function () {
// 当前播放的视频中,第一个视频是否为主视频 // 当前播放的视频中,第一个视频是否为主视频
const firstVideoIsMain = ref(true); const firstVideoIsMain = ref(true);
// 当前播放的视频中,最后一个视频是否为主视频
const endVideoIsMain = ref(true);
// 互动视频 // 互动视频
const addVideo = ref(imgs.mp4); const addVideo = ref(imgs.mp4);
...@@ -74,7 +76,7 @@ export default function () { ...@@ -74,7 +76,7 @@ export default function () {
const liveDetail = ref<any>({}); const liveDetail = ref<any>({});
// 通知视频播放 // 通知视频播放
const playInfo = ref({ const playInfo = ref({
is_main: true, mainStart: true,
num: 0, num: 0,
}); });
...@@ -276,7 +278,7 @@ export default function () { ...@@ -276,7 +278,7 @@ export default function () {
// 当前播放进度变化 // 当前播放进度变化
const currentTimeChange = (index: number, value: number) => { const currentTimeChange = (index: number, value: number) => {
// console.log(value, '当前进度'); // console.log(value, '当前主视频进度');
let row = mainVideoList.value[index]; let row = mainVideoList.value[index];
// 剩余多少没有播放 // 剩余多少没有播放
let currentEsidueTime = row.total - value; let currentEsidueTime = row.total - value;
...@@ -345,9 +347,9 @@ export default function () { ...@@ -345,9 +347,9 @@ export default function () {
item.play = false; item.play = false;
item.status = false; item.status = false;
}); });
if (row.is_main) { if (row.mainStart) {
// 是主视频--通知视频直接播放 // 是主视频--通知视频直接播放
playInfo.value.is_main = true; playInfo.value.mainStart = true;
playInfo.value.num += 1; playInfo.value.num += 1;
} }
}; };
...@@ -461,6 +463,11 @@ export default function () { ...@@ -461,6 +463,11 @@ export default function () {
const currentAction = actionUrl[index]; const currentAction = actionUrl[index];
// 当前正在播放的主视频的进度 // 当前正在播放的主视频的进度
const currentProgress = currentMain.current; const currentProgress = currentMain.current;
// 最后一个视频是动作视频,当前找到的url和最后一个动作的链接一致的
if (!currentMain.mainEnd.status && currentAction.uuid == currentMain.mainEnd.uuid) {
// console.log('最后一个视频是动作视频,这里不处理');
return;
}
// 是否到了播放时间 // 是否到了播放时间
if (currentProgress >= currentAction.play_time) { if (currentProgress >= currentAction.play_time) {
// 可以播放 // 可以播放
...@@ -564,54 +571,75 @@ export default function () { ...@@ -564,54 +571,75 @@ export default function () {
// 创建url // 创建url
res.data = {}; res.data = {};
let url = let url =
'http://yunyi-live.oss-cn-hangzhou.aliyuncs.com/upload/1/2023-08-21cff27bcf-ebb2-4380-b328-3069247c02c7.mp4'; 'http://yunyi-live.oss-cn-hangzhou.aliyuncs.com/upload/1/2023-08-21c68c10b7-611a-47b3-a3e7-8362c4a206b3.mp4';
let list = [ let list = [
// 动作视频
{
url: 'http://yunyi-live.oss-cn-hangzhou.aliyuncs.com/upload/1/2023-08-217a507cc4-55c3-4c70-81d6-24594944e3c9.mp4',
type: 3,
play_time: 0,
},
{ {
url: url, url: url,
type: 1, type: 1,
}, },
// {
// url: 'http://yunyi-live.oss-cn-hangzhou.aliyuncs.com/upload/2/2023-08-217a51d89c-1a9f-476b-950c-f81d0423b816.mp4',
// type: 3,
// play_time: 15,
// },
// 动作视频 // 动作视频
{ {
url: 'http://yunyi-live.oss-cn-hangzhou.aliyuncs.com/upload/1/2023-08-217a507cc4-55c3-4c70-81d6-24594944e3c9.mp4', url: 'http://yunyi-live.oss-cn-hangzhou.aliyuncs.com/upload/2/2023-08-2192d4a904-c78a-4a87-9728-d93bb40cad77.mp4',
type: 3,
play_time: 10,
},
// 动作视频
{
url: 'http://yunyi-live.oss-cn-hangzhou.aliyuncs.com/upload/1/2023-08-217a507cc4-55c3-4c70-81d6-24594944e3c9.mp4',
type: 3, type: 3,
play_time: 20, play_time: 30,
}, },
{ {
url: url, url: url,
type: 1, type: 1,
}, },
{
url: 'http://yunyi-live.oss-cn-hangzhou.aliyuncs.com/upload/2/2023-08-217a51d89c-1a9f-476b-950c-f81d0423b816.mp4',
type: 3,
play_time: 0,
},
]; ];
res.data.url = list; res.data.url = list;
} }
if (DataType(res.data, 'object') && res.data.url && res.data.url.length) { if (DataType(res.data, 'object') && res.data.url && res.data.url.length) {
res.data.url.forEach((item: any) => {
item.uuid = v4();
});
const mainUrl = res.data.url.filter((item: any) => item.type == mainVideoType); const mainUrl = res.data.url.filter((item: any) => item.type == mainVideoType);
realVideoList.value.push({ const actionUrl = res.data.url.filter((item: any) => {
// 主视频列表
url: mainUrl,
// 过滤动作视频
actionUrl: res.data.url.filter((item: any) => {
if (item.type == actionVideoType) { if (item.type == actionVideoType) {
item.remove = false; item.remove = false;
item.play = false; item.play = false;
item.status = false; item.status = false;
return item; return item;
} }
}), });
// 最后一个视频是否是动作视频
const lastRow = res.data.url[res.data.url.length - 1];
let mainEnd = lastRow.type === mainVideoType ? true : false;
let url = '';
let uuid = '';
if (mainEnd) {
url = lastRow.url;
} else {
// 最后一个不是主视频,才有uuid
uuid = lastRow.uuid;
}
console.log(actionUrl, '动作列表');
realVideoList.value.push({
// 主视频列表
url: mainUrl,
// 过滤动作视频
actionUrl: actionUrl,
// 第一个视频是否是主视频 // 第一个视频是否是主视频
is_main: res.data.url[0].type === mainVideoType ? true : false, mainStart: res.data.url[0].type === mainVideoType ? true : false,
// 最后一个视频是否是主视频
mainEnd: {
status: mainEnd,
url: url,
// 生成一个uid
uuid: uuid,
},
// 合并后的地址 // 合并后的地址
result: '', result: '',
// 是否播放完毕 // 是否播放完毕
...@@ -628,7 +656,7 @@ export default function () { ...@@ -628,7 +656,7 @@ export default function () {
if (isDev()) { if (isDev()) {
if (isFirst.value) { if (isFirst.value) {
if (realVideoList.value[0].is_main) { if (realVideoList.value[0].mainStart) {
// 首个视频是主视频的 // 首个视频是主视频的
mergeCallback({ mergeCallback({
video: mainUrl[0].url, video: mainUrl[0].url,
...@@ -716,7 +744,7 @@ export default function () { ...@@ -716,7 +744,7 @@ export default function () {
let videoIndex = realVideoList.value.findIndex((item: any) => !item.remove && item.result && !item.status); let videoIndex = realVideoList.value.findIndex((item: any) => !item.remove && item.result && !item.status);
if (videoIndex !== -1) { if (videoIndex !== -1) {
const realVideoRow = realVideoList.value[videoIndex]; const realVideoRow = realVideoList.value[videoIndex];
if (!realVideoRow.is_main) { if (!realVideoRow.mainStart) {
console.log('当前要播放的主视频列表中,第一个视频是动作视频'); console.log('当前要播放的主视频列表中,第一个视频是动作视频');
firstVideoIsMain.value = false; firstVideoIsMain.value = false;
mainVideoList.value[0].show = false; mainVideoList.value[0].show = false;
...@@ -729,6 +757,12 @@ export default function () { ...@@ -729,6 +757,12 @@ export default function () {
} else { } else {
firstVideoIsMain.value = true; firstVideoIsMain.value = true;
} }
// 最后一个视频是否主视频
if (!realVideoRow.mainEnd.status) {
endVideoIsMain.value = false;
} else {
endVideoIsMain.value = true;
}
// 存入视频 // 存入视频
mainVideoList.value[index].url = realVideoRow.result; mainVideoList.value[index].url = realVideoRow.result;
...@@ -841,7 +875,9 @@ export default function () { ...@@ -841,7 +875,9 @@ export default function () {
mainVideoList, mainVideoList,
playInfo, playInfo,
firstVideoIsMain, firstVideoIsMain,
endVideoIsMain,
showActionVideo, showActionVideo,
realVideoList,
playEnd, playEnd,
actionPlayChange, actionPlayChange,
currentTimeChange, currentTimeChange,
......
...@@ -49,6 +49,42 @@ ...@@ -49,6 +49,42 @@
</div> </div>
</t-form-item> </t-form-item>
</t-form> </t-form>
<!-- <CustomForm ref="form" class="custom-login-form" :data="formData" :rules="FORM_RULES" @submit="onSubmit">
<CustomFormItem name="account">
<div class="form-item-box">
<div class="label required">账号</div>
<CustomInput
placeholder=""
:needSelect="true"
:selectList="rememberList.list"
v-model="formData.account"
@submitAccount="submitAccount"
align="left"
className="reset-login-input"
></CustomInput>
</div>
</CustomFormItem>
<CustomFormItem name="password">
<div class="form-item-box">
<div class="label required">请输入密码</div>
<CustomInput
placeholder=""
className="reset-login-input"
type="password"
v-model="formData.password"
align="left"
></CustomInput>
</div>
</CustomFormItem>
<CustomFormItem>
<CheckBox class="remember-password-box" v-model="remember">记住密码</CheckBox>
</CustomFormItem>
<CustomFormItem>
<div class="submit-box">
<Button type="submit" theme="green" class="reset-login-submit-btn">登录</Button>
</div>
</CustomFormItem>
</CustomForm> -->
</div> </div>
</div> </div>
</template> </template>
...@@ -64,6 +100,9 @@ import { setRememberList, getRememberList } from '@/utils/remember'; ...@@ -64,6 +100,9 @@ import { setRememberList, getRememberList } from '@/utils/remember';
import { UserLogin } from '@/utils/api/userApi'; import { UserLogin } from '@/utils/api/userApi';
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
import CheckBox from '@/components/CheckBox.vue'; import CheckBox from '@/components/CheckBox.vue';
import CustomForm from '@/components/form';
import CustomFormItem from '@/components/formItem';
const store = useStore(); const store = useStore();
const router = useRouter(); const router = useRouter();
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -38,12 +38,12 @@ export default defineConfig(({ command, mode }) => { ...@@ -38,12 +38,12 @@ export default defineConfig(({ command, mode }) => {
}), }),
// viteCompression(), // viteCompression(),
// 打包体积分析 // 打包体积分析
visualizer({ // visualizer({
open: true, //注意这里要设置为true,否则无效 // open: true, //注意这里要设置为true,否则无效
filename: 'stats.html', //分析图生成的文件名 // filename: 'stats.html', //分析图生成的文件名
gzipSize: true, // 收集 gzip 大小并将其显示 // gzipSize: true, // 收集 gzip 大小并将其显示
brotliSize: true, // 收集 brotli 大小并将其显示 // brotliSize: true, // 收集 brotli 大小并将其显示
}), // }),
// importToCDN({ // importToCDN({
// modules: [ // modules: [
// { // {
......
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