diff --git a/src/constant/aigc.js b/src/constant/aigc.js new file mode 100644 index 0000000..705b3cc --- /dev/null +++ b/src/constant/aigc.js @@ -0,0 +1,16 @@ +import { currentClientType } from "@/constant/base"; + +const CLIENT_TYPE = currentClientType(); +const AIGC_CONSENT_AGREED = `${CLIENT_TYPE}_AIGC_CONSENT_AGREED`; + +export const getAigcConsentAgreed = () => { + return uni.getStorageSync(AIGC_CONSENT_AGREED); +}; + +export const setAigcConsentAgreed = (agreed = true) => { + return uni.setStorageSync(AIGC_CONSENT_AGREED, agreed); +}; + +export const removeAigcConsentAgreed = () => { + return uni.removeStorageSync(AIGC_CONSENT_AGREED); +}; diff --git a/src/model/ChatModel.js b/src/model/ChatModel.js index 620da63..0c8052b 100644 --- a/src/model/ChatModel.js +++ b/src/model/ChatModel.js @@ -99,4 +99,6 @@ export const Command = { feedbackCard: "Command.feedbackCard", // 生成合成图片 aigcPhotoGenerator: "Command.aigcPhotoGenerator", + // 旅行AIGC + travelAIGC: "Command.travelAIGC", }; diff --git a/src/pages-aigc/detail/data/result.js b/src/pages-aigc/detail/data/result.js index 3f22992..73a0a8b 100644 --- a/src/pages-aigc/detail/data/result.js +++ b/src/pages-aigc/detail/data/result.js @@ -1,9 +1,7 @@ -import glassBoatPostcard from "../../home/assets/glass-boat-postcard.gif"; - export const aigcDetailResult = { id: "glass-boat-postcard-result", title: "鸳鸯湖明信片", - cover: glassBoatPostcard, + cover: "https://oss.nianxx.cn/mp/static/xiaoqi/glass-boat-postcard.gif", accent: "#0a4d46", variantLabel: "图片版", resultLabel: "图片版", diff --git a/src/pages-aigc/home/assets/card-bridge.png b/src/pages-aigc/home/assets/card-bridge.png deleted file mode 100644 index f45f686..0000000 Binary files a/src/pages-aigc/home/assets/card-bridge.png and /dev/null differ diff --git a/src/pages-aigc/home/assets/card-culture-1.png b/src/pages-aigc/home/assets/card-culture-1.png deleted file mode 100644 index 439d94a..0000000 Binary files a/src/pages-aigc/home/assets/card-culture-1.png and /dev/null differ diff --git a/src/pages-aigc/home/assets/card-waterfall.png b/src/pages-aigc/home/assets/card-waterfall.png deleted file mode 100644 index c9d493f..0000000 Binary files a/src/pages-aigc/home/assets/card-waterfall.png and /dev/null differ diff --git a/src/pages-aigc/home/assets/glass-boat-postcard.gif b/src/pages-aigc/home/assets/glass-boat-postcard.gif deleted file mode 100644 index 2fb01dd..0000000 Binary files a/src/pages-aigc/home/assets/glass-boat-postcard.gif and /dev/null differ diff --git a/src/pages-aigc/home/data/templates.js b/src/pages-aigc/home/data/templates.js index 02d35ed..e734f27 100644 --- a/src/pages-aigc/home/data/templates.js +++ b/src/pages-aigc/home/data/templates.js @@ -1,8 +1,3 @@ -import glassBoatPostcard from "../assets/glass-boat-postcard.gif"; -import bridgeCover from "../assets/card-bridge.png"; -import waterfallCover from "../assets/card-waterfall.png"; -import cultureCover from "../assets/card-culture-1.png"; - export const aigcTemplates = [ { id: "glass-boat-postcard", @@ -11,7 +6,7 @@ export const aigcTemplates = [ note: "图片版100积分 · 动效视频版200积分/5秒内", badge: "同源双版本", buttonText: "选这个模板", - cover: glassBoatPostcard, + cover: "https://oss.nianxx.cn/mp/static/xiaoqi/glass-boat-postcard.gif", tone: "postcard", accent: "#0a4d46", }, @@ -22,7 +17,7 @@ export const aigcTemplates = [ note: "图片版100积分 · 动效视频版200积分/5秒内", badge: "同源双版本", buttonText: "选这个模板", - cover: bridgeCover, + cover: "https://oss.nianxx.cn/mp/static/xiaoqi/card-bridge.png", tone: "emerald", accent: "#0f7069", }, @@ -33,7 +28,7 @@ export const aigcTemplates = [ note: "图片版100积分 · 动效视频版200积分/5秒内", badge: "同源双版本", buttonText: "选这个模板", - cover: waterfallCover, + cover: "https://oss.nianxx.cn/mp/static/xiaoqi/card-waterfall.png", tone: "aqua", accent: "#155e75", }, @@ -44,7 +39,7 @@ export const aigcTemplates = [ note: "图片版100积分 · 动效视频版200积分/5秒内", badge: "同源双版本", buttonText: "选这个模板", - cover: cultureCover, + cover: "https://oss.nianxx.cn/mp/static/xiaoqi/card-culture-1.png", tone: "forest", accent: "#36563d", }, diff --git a/src/pages-aigc/home/home.vue b/src/pages-aigc/home/home.vue index ce522df..0a7c557 100644 --- a/src/pages-aigc/home/home.vue +++ b/src/pages-aigc/home/home.vue @@ -3,10 +3,7 @@ - + @@ -29,13 +26,6 @@ const giftToastVisible = ref(true); const templates = aigcTemplates; const steps = aigcFlowSteps; -const showPlaceholderToast = (title) => { - uni.showToast({ - title, - icon: "none", - }); -}; - const handleBack = () => { const pages = getCurrentPages(); if (pages.length > 1) { @@ -44,11 +34,15 @@ const handleBack = () => { }; const handleHistory = () => { - showPlaceholderToast("最近任务"); + uni.navigateTo({ + url: "/pages-aigc/record/record" + }); }; const handleRecharge = () => { - showPlaceholderToast("积分充值"); + uni.navigateTo({ + url: "/pages-aigc/recharge/recharge" + }); }; const handleCloseGiftToast = () => { @@ -57,8 +51,7 @@ const handleCloseGiftToast = () => { const handleSelectTemplate = (template) => { uni.navigateTo({ - url: `/pages-aigc/useTemplate/useTemplate?templateId=${encodeURIComponent(template.id || "")}`, - fail: () => showPlaceholderToast(template.title), + url: `/pages-aigc/useTemplate/useTemplate?templateId=${encodeURIComponent(template.id || "")}` }); }; diff --git a/src/pages-aigc/record/data/records.js b/src/pages-aigc/record/data/records.js index 81d2af7..35e67f3 100644 --- a/src/pages-aigc/record/data/records.js +++ b/src/pages-aigc/record/data/records.js @@ -1,18 +1,16 @@ -import glassBoatPostcard from "@/pages-aigc/home/assets/glass-boat-postcard.gif"; - export const aigcRecords = [ { id: "record-lake-postcard", title: "鸳鸯湖明信片", time: "2026-06-29 15:46:12", status: "图片版 · 已完成 · 可升级动效视频", - image: glassBoatPostcard, + image: "https://oss.nianxx.cn/mp/static/xiaoqi/glass-boat-postcard.gif", }, { id: "record-lake-postcard-video", title: "鸳鸯湖明信片", time: "2026-06-29 15:58:40", status: "动效视频版 · 5秒内 · 由图片版升级", - image: glassBoatPostcard, + image: "https://oss.nianxx.cn/mp/static/xiaoqi/glass-boat-postcard.gif", }, ]; diff --git a/src/pages-aigc/useTemplate/assets/xiaoqi-avatar.png b/src/pages-aigc/useTemplate/assets/xiaoqi-avatar.png index 8411462..4ba612e 100644 Binary files a/src/pages-aigc/useTemplate/assets/xiaoqi-avatar.png and b/src/pages-aigc/useTemplate/assets/xiaoqi-avatar.png differ diff --git a/src/pages/ChatMain/AigcConsentDialog/index.vue b/src/pages/ChatMain/AigcConsentDialog/index.vue index 0e19a94..edcb195 100644 --- a/src/pages/ChatMain/AigcConsentDialog/index.vue +++ b/src/pages/ChatMain/AigcConsentDialog/index.vue @@ -1,13 +1,21 @@ diff --git a/src/pages/Discovery/components/HeritageDiscoverySection/styles/index.scss b/src/pages/Discovery/components/HeritageDiscoverySection/styles/index.scss deleted file mode 100644 index 92f9c91..0000000 --- a/src/pages/Discovery/components/HeritageDiscoverySection/styles/index.scss +++ /dev/null @@ -1,137 +0,0 @@ -.heritage-section { - width: 100%; - height: 386px; - overflow: hidden; - background: $theme-color-50; -} - -.heritage-carousel, -.heritage-scroll { - width: 100%; - height: 268px; - overflow: hidden; - background: $theme-color-50; -} - -.heritage-track { - display: inline-flex; - align-items: flex-start; - min-width: 100%; - height: 268px; - padding: 8px 69px 26px; - box-sizing: border-box; -} - -.heritage-card { - flex: 0 0 189px; - width: 189px; - height: 227px; - margin-top: 5px; - margin-right: 14px; - display: flex; - flex-direction: column; - padding: 8px; - border-radius: 28px; - border: 1px solid #f1f5f9; - background: #ffffff; - box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); - box-sizing: border-box; - text-align: left; -} - -.heritage-card:last-child { - margin-right: 0; -} - -.heritage-card.is-featured { - flex-basis: 237px; - width: 237px; - height: 234px; - margin-top: 0; -} - -.heritage-card.is-selected { - border-color: rgba(12, 205, 88, 0.55); - box-shadow: 0 8px 18px rgba(12, 205, 88, 0.12); - transform: translateY(-2px); -} - -.heritage-card.is-pressed { - opacity: 0.92; -} - -.heritage-image { - position: relative; - width: 100%; - height: 138px; - overflow: hidden; - border-radius: 20px; - background: #f1f5f9; -} - -.heritage-card.is-featured .heritage-image { - height: 145px; -} - -.heritage-cover { - width: 100%; - height: 100%; - display: block; -} - -.heritage-badge { - position: absolute; - top: 8px; - right: 8px; - width: 34px; - height: 32px; - display: flex; - align-items: center; - justify-content: center; - border-radius: 8px; - background: rgba(255, 255, 255, 0.8); - box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); - color: $theme-color-500; - font-size: 11px; - line-height: 16px; - font-weight: 900; -} - -.heritage-copy { - min-width: 0; - margin-top: 8px; - padding: 0 8px; -} - -.heritage-tag { - display: inline-flex; - max-width: 100%; - height: 18px; - align-items: center; - padding: 0 6px; - border-radius: 4px; - background: #fffbeb; - color: #d97706; - font-size: 9px; - line-height: 14px; - font-weight: 800; -} - -.heritage-title { - display: block; - max-width: 100%; - margin: 4px 0; - color: #1e293b; - font-size: 16px; - line-height: 20px; - font-weight: 900; -} - -.heritage-desc { - display: block; - max-width: 100%; - color: #94a3b8; - font-size: 10px; - line-height: 15px; - font-weight: 600; -} diff --git a/src/pages/Discovery/index.vue b/src/pages/Discovery/index.vue index 861ce79..5fd3fab 100644 --- a/src/pages/Discovery/index.vue +++ b/src/pages/Discovery/index.vue @@ -4,17 +4,18 @@ - + + + - + - - - + + + @@ -26,7 +27,6 @@ import { getAccessToken } from "@/constant/token"; import FindTabs from "./components/FindTabs/index.vue"; import ExploreCards from "./components/ExploreCards/index.vue"; -import HeritageDiscoverySection from "./components/HeritageDiscoverySection/index.vue"; import QuickQuestions from "./components/QuickQuestions/index.vue"; import DiscoveryPhotoToolCard from "./components/DiscoveryPhotoToolCard/index.vue"; import DiscoveryAudioToolCard from "./components/DiscoveryAudioToolCard/index.vue"; @@ -45,7 +45,13 @@ const activeIndex = ref(0); const discoveryTabs = ref([]); const discoveryCards = ref([]); const discoveryQuickQuestions = ref([]); -const emit = defineEmits(["scroll-touch-start", "scroll-touch"]); +const emit = defineEmits(["content-scroll"]); + +const handleContentScroll = (e) => { + emit("content-scroll", { + scrollTop: Number(e.detail?.scrollTop || 0), + }); +}; /// tabs 切换事件 @@ -208,16 +214,30 @@ onMounted(() => {