fixed 修改细节

This commit is contained in:
lwh 2023-08-30 10:50:20 +08:00
parent daab96ca7e
commit fd03bedff5
22 changed files with 59 additions and 33 deletions

View File

@ -10,7 +10,7 @@
height: 40vw!important; height: 40vw!important;
} }
.Carousel-container{ .Carousel-container{
margin-top: 63px !important; margin-top: 11px !important;
} }
.carousel-items{ .carousel-items{
height: 40vw!important; height: 40vw!important;

View File

@ -16,8 +16,8 @@
position: relative; position: relative;
img { img {
height: 100%; height: 85%;
width: 100%; width: 85%;
object-fit: contain; object-fit: contain;
// margin-top: 9px; // margin-top: 9px;
} }

View File

@ -23,7 +23,8 @@
/*小于*/ /*小于*/
@media screen and (max-width: 1037px) { @media screen and (max-width: 1037px) {
.Header-container { .Header-container {
height: 111px !important; height: 60px !important;
justify-content: center;
} }
.HeaderSearch-Icon { .HeaderSearch-Icon {

View File

@ -31,4 +31,17 @@
.return { .return {
display: none; display: none;
} }
.music-box{
width: 100%;
position: relative !important;
display: flex;
flex-direction: column;
margin: 1rem;
}
.joint-details-pos-box{
padding: 1rem 0 15rem 0 !important;
}
audio{
margin: 0 auto;
}
} }

View File

@ -38,7 +38,7 @@
@media screen and (max-width: 480px) { @media screen and (max-width: 480px) {
.Poster-container{ .Poster-container{
height: 35vw !important; height: 35vw !important;
margin-top: 63px !important; margin-top: 11px !important;
} }
.Poster-text{ .Poster-text{
display: none !important; display: none !important;

View File

@ -37,7 +37,7 @@ export default {
} }
// //
editorConfig.MENU_CONF['uploadImage'] = { editorConfig.MENU_CONF['uploadImage'] = {
server: "http://localhost:3003/api-v" + '/CommonApi.CommonApi/uploadImg', server: "http://xdxw.aerwen.net/api-v" + '/CommonApi.CommonApi/uploadImg',
// form-data fieldName 'wangeditor-uploaded-image' // form-data fieldName 'wangeditor-uploaded-image'
fieldName: 'file', fieldName: 'file',
// 2M // 2M
@ -70,7 +70,7 @@ export default {
} }
// //
editorConfig.MENU_CONF['uploadVideo'] = { editorConfig.MENU_CONF['uploadVideo'] = {
server: "http://localhost:3003/api-v" + '/CommonApi.CommonApi/uploadFile', server: "http://xdxw.aerwen.net/api-v" + '/CommonApi.CommonApi/uploadFile',
// form-data fieldName 'wangeditor-uploaded-video' // form-data fieldName 'wangeditor-uploaded-video'
fieldName: 'file', fieldName: 'file',

View File

@ -56,6 +56,7 @@
<script setup> <script setup>
import { ref,reactive,watch,computed } from "vue"; import { ref,reactive,watch,computed } from "vue";
import { fileUpload } from "~/server/api/common/common"; import { fileUpload } from "~/server/api/common/common";
import { ElMessage, ElMessageBox } from 'element-plus'
const props = defineProps({ const props = defineProps({
modelValue: [String, Object, Array], modelValue: [String, Object, Array],

View File

@ -30,6 +30,7 @@
<script setup> <script setup>
import { ref, reactive, watch, computed } from "vue"; import { ref, reactive, watch, computed } from "vue";
import { imageUpload } from "~/server/api/common/common"; import { imageUpload } from "~/server/api/common/common";
import { ElMessage, ElMessageBox } from 'element-plus'
const props = defineProps({ const props = defineProps({
modelValue: [String, Object, Array], modelValue: [String, Object, Array],

View File

@ -28,13 +28,15 @@
</el-col> </el-col>
<el-col :span='12'> <el-col :span='12'>
<el-form-item :label-width='labelWidth' label='封面' prop='love_story_cover'> <el-form-item :label-width='labelWidth' label='封面' prop='love_story_cover'>
<input ref="love_story_cover" type="file" accept=".jpg,.png,.jpeg"> <UploadImage ref='uploadRef' v-model='formData.love_story_cover' :data=uoloadData :limit='1'
:fileSize='5' :drag='true' :isShowTip='false' />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span='12'> <el-col :span='12'>
<el-form-item :label-width='labelWidth' label='音乐' prop='love_story_music'> <el-form-item :label-width='labelWidth' label='音乐' prop='love_story_music'>
<input ref="love_story_music" type="file" accept=".mp3,.m4a,.flac"> <UploadFile v-model='formData.love_story_music'
:fileType="['mp3', 'wma', 'wav', 'ape', 'flac', 'ogg', 'aac']" :data=uoloadData :limit="1" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<client-only> <client-only>
@ -64,7 +66,7 @@
</template> </template>
<script setup> <script setup>
import { ElMessage } from 'element-plus' import { ElMessage, ElMessageBox } from 'element-plus'
// -- // --
const router = useRouter() const router = useRouter()
@ -73,7 +75,19 @@ const love_story_cover = ref(null)
// -- // --
const imgFileList = ref([
])
const beforeRemove = (uploadFile, uploadFiles) => {
return ElMessageBox.confirm(
`确定要删除 ${uploadFile.name} 吗?`
).then(
() => true,
() => false
)
}
// -- // --
@ -120,21 +134,15 @@ const handleAddClick = async (formEl) => {
if (!valid) { if (!valid) {
return; return;
} }
if (!love_story_cover.value.value) {
ElMessage({
message: "请上传封面",
type: 'error',
})
}
useFetch('/api/loveStory/addLoveStory', { useFetch('/api/loveStory/addLoveStory', {
method: "post", body: { method: "post", body: {
love_story_title: formData.love_story_title, love_story_title: formData.love_story_title,
love_story_author: formData.love_story_author, love_story_author: formData.love_story_author,
love_story_place: formData.love_story_place, love_story_place: formData.love_story_place,
love_story_date: formData.love_story_date, love_story_date: formData.love_story_date,
love_story_cover: love_story_cover.value.value, love_story_cover: formData.love_story_cover,
love_story_music: love_story_music.value.value, love_story_music: formData.love_story_music,
love_story_content: formData.love_story_content, love_story_content: formData.love_story_content,
} }
}).then(res => { }).then(res => {

View File

@ -10,7 +10,7 @@
<div class="--box--"> <div class="--box--">
<div class="music-box" v-if="loveStoryInfo.love_story_music != null"> <div class="music-box" v-if="loveStoryInfo.love_story_music">
<div class="music-name">{{ loveStoryInfo.love_story_music_name }}</div> <div class="music-name">{{ loveStoryInfo.love_story_music_name }}</div>
<audio controls="controls" height="100" width="100" autoplay> <audio controls="controls" height="100" width="100" autoplay>
<source :src=loveStoryInfo.love_story_music type="audio/mp3" /> <source :src=loveStoryInfo.love_story_music type="audio/mp3" />
@ -89,6 +89,7 @@ useFetch('/api/loveStory/getLoveStoryInfo', { params: { love_story_id: route.par
[...document.querySelectorAll('.joint-details-content-box video')].map(item => { [...document.querySelectorAll('.joint-details-content-box video')].map(item => {
item.style.maxWidth = 100 + '%' item.style.maxWidth = 100 + '%'
item.style.height = 0 + '%' item.style.height = 0 + '%'
item.style.margin = "0 auto"
}) })

View File

@ -10,7 +10,7 @@ export default defineEventHandler(async (event) => {
const method = getMethod(event).toUpperCase() const method = getMethod(event).toUpperCase()
let body let body
if (method !== 'GET') body = await readRawBody(event) if (method !== 'GET') body = await readRawBody(event)
const res = await $fetch(baseURL + "/Banners.Banner/getBannerList", { const res = await $fetch("http://xdxw.api.aerwen.net/api.php/Banners.Banner/getBannerList", {
method, method,
baseURL: event.context.baseUrl, baseURL: event.context.baseUrl,
headers: event.context.headers, headers: event.context.headers,

View File

@ -2,14 +2,14 @@
/** /**
* 上传图片 * 上传图片
*/ */
export const imageUpload = '/common/uploadImg'; export const imageUpload = 'http://xdxw.aerwen.net/api-v/CommonApi.CommonApi/uploadImg';
/** /**
* 上传文件 * 上传文件
*/ */
export const fileUpload = '/common/uploadFile'; export const fileUpload = 'http://xdxw.aerwen.net/api-v/CommonApi.CommonApi/uploadFile';
/** /**
* 上传视频 * 上传视频
*/ */
export const videoUpload = '/common/uploadVideo'; export const videoUpload = 'http://xdxw.aerwen.net/api-v/CommonApi.CommonApi/uploadVideo';

View File

@ -10,7 +10,7 @@ export default defineEventHandler(async (event) => {
const method = getMethod(event).toUpperCase() const method = getMethod(event).toUpperCase()
let body let body
if (method !== 'GET') body = await readRawBody(event) if (method !== 'GET') body = await readRawBody(event)
const res = await $fetch(baseURL + "/Flow.Flow/AddFlowRecord", { const res = await $fetch("http://xdxw.api.aerwen.net/api.php/Flow.Flow/AddFlowRecord", {
method, method,
baseURL: event.context.baseUrl, baseURL: event.context.baseUrl,
headers: event.context.headers, headers: event.context.headers,

View File

@ -13,7 +13,7 @@ export default defineEventHandler(async (event) => {
const method = getMethod(event).toUpperCase() const method = getMethod(event).toUpperCase()
let body let body
if (method !== 'GET') body = await readRawBody(event) if (method !== 'GET') body = await readRawBody(event)
const res = await $fetch(baseURL + "/Home.Home/getHomeData", { const res = await $fetch("http://xdxw.api.aerwen.net/api.php/Home.Home/getHomeData", {
method, method,
baseURL: event.context.baseUrl, baseURL: event.context.baseUrl,
headers: event.context.headers, headers: event.context.headers,

View File

@ -10,7 +10,7 @@ export default defineEventHandler(async (event) => {
const method = getMethod(event).toUpperCase() const method = getMethod(event).toUpperCase()
let body let body
if (method !== 'GET') body = await readRawBody(event) if (method !== 'GET') body = await readRawBody(event)
const res = await $fetch(baseURL + "/LoveStory.LoveStory/addLoveStory", { const res = await $fetch("http://xdxw.api.aerwen.net/api.php/LoveStory.LoveStory/addLoveStory", {
method, method,
baseURL: event.context.baseUrl, baseURL: event.context.baseUrl,
headers: event.context.headers, headers: event.context.headers,

View File

@ -13,7 +13,7 @@ export default defineEventHandler(async (event) => {
const method = getMethod(event).toUpperCase() const method = getMethod(event).toUpperCase()
let body let body
if (method !== 'GET') body = await readRawBody(event) if (method !== 'GET') body = await readRawBody(event)
const res = await $fetch(baseURL + "/LoveStory.LoveStory/getLoveStoryInfo", { const res = await $fetch("http://xdxw.api.aerwen.net/api.php/LoveStory.LoveStory/getLoveStoryInfo", {
method, method,
baseURL: event.context.baseUrl, baseURL: event.context.baseUrl,
headers: event.context.headers, headers: event.context.headers,

View File

@ -14,7 +14,7 @@ export default defineEventHandler(async (event) => {
const method = getMethod(event).toUpperCase() const method = getMethod(event).toUpperCase()
let body let body
if (method !== 'GET') body = await readRawBody(event) if (method !== 'GET') body = await readRawBody(event)
const res = await $fetch(baseURL + "/LoveStory.LoveStory/getLoveStoryList", { const res = await $fetch("http://xdxw.api.aerwen.net/api.php/LoveStory.LoveStory/getLoveStoryList", {
method, method,
baseURL: event.context.baseUrl, baseURL: event.context.baseUrl,
headers: event.context.headers, headers: event.context.headers,

View File

@ -10,7 +10,7 @@ export default defineEventHandler(async (event) => {
const method = getMethod(event).toUpperCase() const method = getMethod(event).toUpperCase()
let body let body
if (method !== 'GET') body = await readRawBody(event) if (method !== 'GET') body = await readRawBody(event)
const res = await $fetch(baseURL + "/Banners.Poster/getPoster", { const res = await $fetch("http://xdxw.api.aerwen.net/api.php/Banners.Poster/getPoster", {
method, method,
baseURL: event.context.baseUrl, baseURL: event.context.baseUrl,
headers: event.context.headers, headers: event.context.headers,

View File

@ -10,7 +10,7 @@ export default defineEventHandler(async (event) => {
const method = getMethod(event).toUpperCase() const method = getMethod(event).toUpperCase()
let body let body
if (method !== 'GET') body = await readRawBody(event) if (method !== 'GET') body = await readRawBody(event)
const res = await $fetch(baseURL + "/Tdk.Tdk/getTdkInfo", { const res = await $fetch("http://xdxw.api.aerwen.net/api.php/Tdk.Tdk/getTdkInfo", {
method, method,
baseURL: event.context.baseUrl, baseURL: event.context.baseUrl,
headers: event.context.headers, headers: event.context.headers,

View File

@ -10,7 +10,7 @@ export default defineEventHandler(async (event) => {
const method = getMethod(event).toUpperCase() const method = getMethod(event).toUpperCase()
let body let body
if (method !== 'GET') body = await readRawBody(event) if (method !== 'GET') body = await readRawBody(event)
const res = await $fetch(baseURL + "/WishList.WishList/addWishList", { const res = await $fetch("http://xdxw.api.aerwen.net/api.php/WishList.WishList/addWishList", {
method, method,
baseURL: event.context.baseUrl, baseURL: event.context.baseUrl,
headers: event.context.headers, headers: event.context.headers,

View File

@ -14,7 +14,7 @@ export default defineEventHandler(async (event) => {
const method = getMethod(event).toUpperCase() const method = getMethod(event).toUpperCase()
let body let body
if (method !== 'GET') body = await readRawBody(event) if (method !== 'GET') body = await readRawBody(event)
const res = await $fetch(baseURL + "/WishList.WishList/getWishListList", { const res = await $fetch("http://xdxw.api.aerwen.net/api.php/WishList.WishList/getWishListList", {
method, method,
baseURL: event.context.baseUrl, baseURL: event.context.baseUrl,
headers: event.context.headers, headers: event.context.headers,

View File

@ -16,3 +16,4 @@
@use "element-plus/theme-chalk/src/pagination.scss" as *; @use "element-plus/theme-chalk/src/pagination.scss" as *;
@use "element-plus/theme-chalk/src/date-picker.scss" as *; @use "element-plus/theme-chalk/src/date-picker.scss" as *;
@use "element-plus/theme-chalk/src/upload.scss" as *; @use "element-plus/theme-chalk/src/upload.scss" as *;
@use "element-plus/theme-chalk/src/link.scss" as *;