Commit 3e4a86e5 by haojie

1

parent d99906fd
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { onBeforeUnmount, onMounted, reactive, ref } from 'vue'; import { onBeforeUnmount, onMounted, ref } from 'vue';
import GptIcon from '@/assets/svg/gpt/gpt-icon.svg'; import GptIcon from '@/assets/svg/gpt/gpt-icon.svg';
const props = withDefaults( const props = withDefaults(
......
...@@ -20,8 +20,7 @@ const props = withDefaults( ...@@ -20,8 +20,7 @@ const props = withDefaults(
</script> </script>
<style lang="less"> <style lang="less">
.custom-reset-button, .custom-reset-button {
.t-button {
height: 50px !important; height: 50px !important;
background: transparent !important; background: transparent !important;
border: none !important; border: none !important;
......
...@@ -148,6 +148,7 @@ onMounted(() => { ...@@ -148,6 +148,7 @@ onMounted(() => {
.avatar { .avatar {
width: 30px; width: 30px;
height: 30px; height: 30px;
border-radius: 50%;
} }
.user-name { .user-name {
padding-left: 8px; padding-left: 8px;
......
...@@ -54,7 +54,7 @@ const btns = [ ...@@ -54,7 +54,7 @@ const btns = [
// path: '/AIVideo', // path: '/AIVideo',
// }, // },
{ {
label: '图片处理', label: '模特穿衣预处理',
path: '/ImgConversion', path: '/ImgConversion',
}, },
// { // {
......
...@@ -219,7 +219,7 @@ onBeforeMount(async () => { ...@@ -219,7 +219,7 @@ onBeforeMount(async () => {
height: 100%; height: 100%;
.custom-copywriting-generation { .custom-copywriting-generation {
display: flex; display: flex;
padding-top: @page-margin-top; padding-top: @page-padding-top;
.tip-box { .tip-box {
width: 50%; width: 50%;
object-fit: contain; object-fit: contain;
......
...@@ -52,7 +52,7 @@ const changeTable = (item: any) => { ...@@ -52,7 +52,7 @@ const changeTable = (item: any) => {
<style lang="less"> <style lang="less">
@import '@/style/variables.less'; @import '@/style/variables.less';
.custom-creation-record { .custom-creation-record {
padding-top: @page-margin-top; padding-top: @page-padding-top;
.label-box { .label-box {
font-weight: 600; font-weight: 600;
font-size: @font-size-18; font-size: @font-size-18;
......
...@@ -30,7 +30,6 @@ const ProductList = reactive({ ...@@ -30,7 +30,6 @@ const ProductList = reactive({
}); });
// 这里跳转传id // 这里跳转传id
const onChange = (item: any) => { const onChange = (item: any) => {
console.log(item);
let path = ''; let path = '';
if (item.type == TASKTYPE.CHAT) { if (item.type == TASKTYPE.CHAT) {
// 文案 // 文案
......
@import '@/style/variables.less'; @import '@/style/variables.less';
.swiper-box { .swiper-box {
margin: @page-margin-top 0 30px 0; margin: @page-padding-top 0 30px 0;
margin-top: 0; margin-top: 0;
padding-top: @page-margin-top; padding-top: @page-padding-top;
} }
...@@ -4,6 +4,7 @@ import './index.less'; ...@@ -4,6 +4,7 @@ import './index.less';
import ModuleCard from '@/components/modulecard.vue'; import ModuleCard from '@/components/modulecard.vue';
import { getScenariosRecommend } from '@/utils/api/scenes'; import { getScenariosRecommend } from '@/utils/api/scenes';
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
import { TASKTYPE } from '@/utils/api/Task';
export default defineComponent({ export default defineComponent({
setup() { setup() {
const router = useRouter(); const router = useRouter();
...@@ -12,7 +13,7 @@ export default defineComponent({ ...@@ -12,7 +13,7 @@ export default defineComponent({
}); });
const getRecommend = async () => { const getRecommend = async () => {
try { try {
let res: any = await getScenariosRecommend(); const res: any = await getScenariosRecommend();
if (res.code == 0) { if (res.code == 0) {
CardList.list = res.data; CardList.list = res.data;
} }
...@@ -22,11 +23,20 @@ export default defineComponent({ ...@@ -22,11 +23,20 @@ export default defineComponent({
} }
}; };
const onChange = (item: any) => { const onChange = (item: any) => {
if (item.type == 0) { let path = '';
// 文案生成 if (item.type == TASKTYPE.CHAT) {
// 文案
path = '/CopywritingGeneration';
} else if (item.type == TASKTYPE.PAINTING) {
// 绘图
path = '/ImageGeneration';
}
if (path) {
const url = router.resolve({ const url = router.resolve({
path: '/CopywritingGeneration', path: path,
// path: '/ImageGeneration', query: {
id: item.id,
},
}); });
window.open(url.href); window.open(url.href);
} }
......
<template> <template>
<div class="custom-copywriting-generation"> <div class="custom-image-generation-box">
<div class="generation-box" v-show="!loading"> <div class="generation-box" v-show="!loading">
<div class="interaction-form"> <div class="interaction-form">
<div class="basic-info" v-for="item in AdminData.list" :key="item.name"> <div class="basic-info" v-for="item in AdminData.list" :key="item.name">
...@@ -267,6 +267,11 @@ const onSubmit = async (params: any) => { ...@@ -267,6 +267,11 @@ const onSubmit = async (params: any) => {
}; };
// 提交前的校验 // 提交前的校验
const beforeSubmit = () => { const beforeSubmit = () => {
// 定时器不能为开启状态
if (IntervalImg) {
show_message('请等待上一个任务完成');
return;
}
let params: any = {}; let params: any = {};
// 遍历整个列表 // 遍历整个列表
for (let i = 0; i < AdminData.list.length; i++) { for (let i = 0; i < AdminData.list.length; i++) {
...@@ -321,8 +326,8 @@ onBeforeUnmount(() => { ...@@ -321,8 +326,8 @@ onBeforeUnmount(() => {
<style lang="less"> <style lang="less">
@import '@/style/variables.less'; @import '@/style/variables.less';
.custom-copywriting-generation { .custom-image-generation-box {
padding-top: @page-margin-top; padding-top: @page-padding-top;
box-sizing: border-box; box-sizing: border-box;
position: relative; position: relative;
width: 100%; width: 100%;
......
<template> <template>
<div class="fileUpload btn btn-primary"> <div class="fileUpload">
<TButton <TButton
>{{ label }} >{{ label }}
<input <input
......
...@@ -9,7 +9,8 @@ import ImageEdit from './components/img_edit.vue'; ...@@ -9,7 +9,8 @@ import ImageEdit from './components/img_edit.vue';
</script> </script>
<style lang="less"> <style lang="less">
@import '@/style/variables.less';
.custom-img-conversion { .custom-img-conversion {
margin-top: 30px; padding-top: @page-padding-top;
} }
</style> </style>
...@@ -105,7 +105,7 @@ const CardList = reactive({ ...@@ -105,7 +105,7 @@ const CardList = reactive({
.products-label { .products-label {
font-weight: 700; font-weight: 700;
font-size: @font-size-26; font-size: @font-size-26;
margin-top: @page-margin-top; margin-top: @page-padding-top;
margin-bottom: 20px; margin-bottom: 20px;
} }
.products-content-box { .products-content-box {
......
// 每个页面的content模块的margin-top // 每个页面的content模块的margin-top
@page-margin-top: 30px; @page-padding-top: 30px;
// border // border
@main-border-radius: 15px; @main-border-radius: 15px;
......
...@@ -56,7 +56,7 @@ export default defineConfig(({ mode }) => { ...@@ -56,7 +56,7 @@ export default defineConfig(({ mode }) => {
terserOptions: { terserOptions: {
compress: { compress: {
//生产环境时移除console //生产环境时移除console
drop_console: false, drop_console: true,
// drop_debugger: true, // drop_debugger: true,
}, },
output: { output: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment