Merge branch 'aigc' of https://git.nianxx.cn/zoujing/YGChatCS into home3.0
# Conflicts: # src/pages-aigc/agreement/agreement.vue # src/pages-booking/index.vue # src/pages.json # src/request/api/AigcApi.js # src/utils/index.js 合并了代码
This commit is contained in:
@@ -1,56 +1,56 @@
|
||||
<template>
|
||||
<view
|
||||
class="template-version-hero"
|
||||
:class="`is-${variant}`"
|
||||
>
|
||||
<video
|
||||
v-if="templateMediaUrl && isVideoTemplate"
|
||||
class="template-version-video"
|
||||
:src="templateMediaUrl"
|
||||
autoplay
|
||||
muted
|
||||
loop
|
||||
:controls="false"
|
||||
:show-play-btn="false"
|
||||
:show-center-play-btn="false"
|
||||
object-fit="cover"
|
||||
/>
|
||||
<image v-else-if="templateMediaUrl" class="template-version-image" :src="templateMediaUrl" mode="aspectFill" />
|
||||
<view class="template-version-shade" />
|
||||
|
||||
<view class="template-version-copy">
|
||||
<text class="template-version-badge">{{ template.templateTag }}</text>
|
||||
<text class="template-version-title">{{ template.templateTitle || template.templateName }}</text>
|
||||
<text class="template-version-desc">{{ template.templateSubTitle || template.templateDescription }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { computed } from "vue";
|
||||
|
||||
const props = defineProps({
|
||||
template: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
variant: {
|
||||
type: String,
|
||||
default: "default",
|
||||
},
|
||||
});
|
||||
|
||||
const VIDEO_EXT_REGEXP = /\.(mp4|mov|webm|m4v)(\?.*)?$/i;
|
||||
|
||||
const templateMediaUrl = computed(() => {
|
||||
return props.template.templateContentUrl || props.template.coverPhotoUrl || "";
|
||||
});
|
||||
|
||||
const isVideoTemplate = computed(() => {
|
||||
return VIDEO_EXT_REGEXP.test(templateMediaUrl.value);
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import "./styles/index.scss";
|
||||
</style>
|
||||
<template>
|
||||
<view
|
||||
class="template-version-hero"
|
||||
:class="`is-${variant}`"
|
||||
>
|
||||
<video
|
||||
v-if="templateMediaUrl && isVideoTemplate"
|
||||
class="template-version-video"
|
||||
:src="templateMediaUrl"
|
||||
autoplay
|
||||
muted
|
||||
loop
|
||||
:controls="false"
|
||||
:show-play-btn="false"
|
||||
:show-center-play-btn="false"
|
||||
object-fit="cover"
|
||||
/>
|
||||
<image v-else-if="templateMediaUrl" class="template-version-image" :src="templateMediaUrl" mode="aspectFill" />
|
||||
<view class="template-version-shade" />
|
||||
|
||||
<view class="template-version-copy">
|
||||
<text class="template-version-badge">{{ template.templateTag }}</text>
|
||||
<text class="template-version-title">{{ template.templateTitle || template.templateName }}</text>
|
||||
<text class="template-version-desc">{{ template.templateSubTitle || template.templateDescription }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { computed } from "vue";
|
||||
|
||||
const props = defineProps({
|
||||
template: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
variant: {
|
||||
type: String,
|
||||
default: "default",
|
||||
},
|
||||
});
|
||||
|
||||
const VIDEO_EXT_REGEXP = /\.(mp4|mov|webm|m4v)(\?.*)?$/i;
|
||||
|
||||
const templateMediaUrl = computed(() => {
|
||||
return props.template.templateContentUrl || props.template.coverPhotoUrl || "";
|
||||
});
|
||||
|
||||
const isVideoTemplate = computed(() => {
|
||||
return VIDEO_EXT_REGEXP.test(templateMediaUrl.value);
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import "./styles/index.scss";
|
||||
</style>
|
||||
|
||||
@@ -1,116 +1,116 @@
|
||||
.template-version-hero {
|
||||
position: relative;
|
||||
height: 360px;
|
||||
overflow: hidden;
|
||||
border-radius: 24px;
|
||||
background: var(--template-accent, #0a4d46);
|
||||
color: #ffffff;
|
||||
box-shadow: 0 16px 30px rgba(15, 29, 37, 0.1);
|
||||
}
|
||||
|
||||
.template-version-hero.is-confirm {
|
||||
height: 248px;
|
||||
border-radius: 18px;
|
||||
box-shadow: 0 12px 24px rgba(15, 29, 37, 0.08);
|
||||
}
|
||||
|
||||
.template-version-image,
|
||||
.template-version-video {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.template-version-shade {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
background: linear-gradient(
|
||||
180deg,
|
||||
rgba(8, 22, 28, 0.05) 0%,
|
||||
rgba(8, 22, 28, 0.18) 46%,
|
||||
rgba(8, 22, 28, 0.72) 100%
|
||||
);
|
||||
}
|
||||
|
||||
.template-version-copy {
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
right: 18px;
|
||||
bottom: 18px;
|
||||
left: 18px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.template-version-badge {
|
||||
height: 22px;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
max-width: 132px;
|
||||
overflow: hidden;
|
||||
padding: 0 9px;
|
||||
border-radius: 999px;
|
||||
background: rgba(255, 255, 255, 0.78);
|
||||
color: #172033;
|
||||
font-size: 10px;
|
||||
line-height: 22px;
|
||||
font-weight: 900;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.template-version-title,
|
||||
.template-version-desc {
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.template-version-title {
|
||||
margin-top: 10px;
|
||||
color: #ffffff;
|
||||
font-size: 24px;
|
||||
line-height: 30px;
|
||||
font-weight: 900;
|
||||
}
|
||||
|
||||
.template-version-desc {
|
||||
margin-top: 5px;
|
||||
color: rgba(255, 255, 255, 0.82);
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.template-version-hero.is-confirm .template-version-copy {
|
||||
right: 16px;
|
||||
bottom: 18px;
|
||||
left: 16px;
|
||||
}
|
||||
|
||||
.template-version-hero.is-confirm .template-version-badge {
|
||||
height: 22px;
|
||||
max-width: 88px;
|
||||
line-height: 22px;
|
||||
}
|
||||
|
||||
.template-version-hero.is-confirm .template-version-title {
|
||||
margin-top: 9px;
|
||||
font-size: 24px;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
.template-version-hero.is-confirm .template-version-desc {
|
||||
max-width: 294px;
|
||||
margin-top: 4px;
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
}
|
||||
.template-version-hero {
|
||||
position: relative;
|
||||
height: 360px;
|
||||
overflow: hidden;
|
||||
border-radius: 24px;
|
||||
background: var(--template-accent, #0a4d46);
|
||||
color: #ffffff;
|
||||
box-shadow: 0 16px 30px rgba(15, 29, 37, 0.1);
|
||||
}
|
||||
|
||||
.template-version-hero.is-confirm {
|
||||
height: 248px;
|
||||
border-radius: 18px;
|
||||
box-shadow: 0 12px 24px rgba(15, 29, 37, 0.08);
|
||||
}
|
||||
|
||||
.template-version-image,
|
||||
.template-version-video {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.template-version-shade {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
background: linear-gradient(
|
||||
180deg,
|
||||
rgba(8, 22, 28, 0.05) 0%,
|
||||
rgba(8, 22, 28, 0.18) 46%,
|
||||
rgba(8, 22, 28, 0.72) 100%
|
||||
);
|
||||
}
|
||||
|
||||
.template-version-copy {
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
right: 18px;
|
||||
bottom: 18px;
|
||||
left: 18px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.template-version-badge {
|
||||
height: 22px;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
max-width: 132px;
|
||||
overflow: hidden;
|
||||
padding: 0 9px;
|
||||
border-radius: 999px;
|
||||
background: rgba(255, 255, 255, 0.78);
|
||||
color: #172033;
|
||||
font-size: 10px;
|
||||
line-height: 22px;
|
||||
font-weight: 900;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.template-version-title,
|
||||
.template-version-desc {
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.template-version-title {
|
||||
margin-top: 10px;
|
||||
color: #ffffff;
|
||||
font-size: 24px;
|
||||
line-height: 30px;
|
||||
font-weight: 900;
|
||||
}
|
||||
|
||||
.template-version-desc {
|
||||
margin-top: 5px;
|
||||
color: rgba(255, 255, 255, 0.82);
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.template-version-hero.is-confirm .template-version-copy {
|
||||
right: 16px;
|
||||
bottom: 18px;
|
||||
left: 16px;
|
||||
}
|
||||
|
||||
.template-version-hero.is-confirm .template-version-badge {
|
||||
height: 22px;
|
||||
max-width: 88px;
|
||||
line-height: 22px;
|
||||
}
|
||||
|
||||
.template-version-hero.is-confirm .template-version-title {
|
||||
margin-top: 9px;
|
||||
font-size: 24px;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
.template-version-hero.is-confirm .template-version-desc {
|
||||
max-width: 294px;
|
||||
margin-top: 4px;
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user