refactor(aigc): update aigc consent dialog and apis

- set developVersion to false for production build
- format api request calls for consistent readability
- simplify consent dialog template and remove unused styles
- update default consent text and add ruleClick emit event
- add new getUserAgreement api endpoint and export it
This commit is contained in:
duanshuwen
2026-07-23 21:04:54 +08:00
parent d71bda5e0b
commit f71f28fe99
4 changed files with 29 additions and 52 deletions

View File

@@ -6,24 +6,13 @@
<text class="aigc-consent-title">温馨提示</text> <text class="aigc-consent-title">温馨提示</text>
<view class="aigc-consent-content"> <view class="aigc-consent-content">
<text v-if="content" class="aigc-consent-paragraph">{{ content }}</text> <text v-if="content">{{ content }}</text>
<template v-else> <template v-else>
<view class="aigc-consent-section"> <text>{{ defaultContentPrefix }}</text>
<text class="aigc-consent-section-title">体验权益</text> <text class="aigc-consent-rule" @tap.stop="handleRuleClick">
<text class="aigc-consent-paragraph">{{ experienceContent }}</text> {{ ruleName }}
</view> </text>
<text>{{ defaultContentSuffix }}</text>
<view class="aigc-consent-section">
<text class="aigc-consent-section-title">服务说明</text>
<text class="aigc-consent-paragraph">{{ serviceContent }}</text>
<view class="aigc-consent-paragraph">
<text>请您在使用前仔细阅读</text>
<text class="aigc-consent-rule" @tap.stop="handleRuleClick">
{{ ruleName }}
</text>
<text>{{ ruleConsentSuffix }}</text>
</view>
</view>
</template> </template>
</view> </view>
@@ -62,19 +51,16 @@ const props = defineProps({
}, },
}); });
const emit = defineEmits(["update:visible", "cancel", "agree"]); const emit = defineEmits(["update:visible", "cancel", "agree", "ruleClick"]);
const popupRef = ref(null); const popupRef = ref(null);
const experienceContent = const defaultContentPrefix = computed(
"当前体验版本赠送 400 积分,可生成 1 张高清旅行图片和 1 段 5 秒内动效视频。如需更多生成额度,敬请期待后续版本上线。";
const serviceContent = computed(
() => () =>
`欢迎使用【${props.companyName}】提供的 AI 内容升级服务。本服务通过人工智能技术AIGC,对您上传的照片或视频进行处理,并结合景区场景模板,为您生成具有特定风格的旅行图片或视频内容。` `欢迎使用【${props.companyName}】提供的AI内容升级服务。本服务通过人工智能技术AIGC您上传的照片或视频与景区场景模板进行创意优化,为您生成具有特定风格的旅行内容。请您仔细阅读`
); );
const ruleConsentSuffix = const defaultContentSuffix =
"点击“我同意”并继续操作,即表示您已阅读、理解并同意遵守相关规则;如您不同意,可点击“取消”并退出本服务。"; ",您点击“我同意”等进行下一步操作的行为均视为您同意受本规则约束。如您不同意,您可以直接关闭页面。";
const close = () => { const close = () => {
popupRef.value?.close(); popupRef.value?.close();

View File

@@ -31,28 +31,6 @@
text-align: justify; text-align: justify;
} }
.aigc-consent-section + .aigc-consent-section {
margin-top: 18px;
}
.aigc-consent-section-title,
.aigc-consent-paragraph {
display: block;
}
.aigc-consent-section-title {
margin-bottom: 6px;
color: #172033;
font-size: 16px;
line-height: 24px;
font-weight: 900;
text-align: left;
}
.aigc-consent-paragraph + .aigc-consent-paragraph {
margin-top: 10px;
}
.aigc-consent-rule { .aigc-consent-rule {
color: #18bd78; color: #18bd78;
font-weight: 900; font-weight: 900;

View File

@@ -9,18 +9,24 @@ function getAigcTemplateItemList(args) {
} }
function getAigcGeneratorTaskList(args) { function getAigcGeneratorTaskList(args) {
return request.post("/hotelBiz/aigcGeneratorTask/aigcGeneratorTaskList", args); return request.post(
"/hotelBiz/aigcGeneratorTask/aigcGeneratorTaskList",
args,
);
} }
function getAigcGeneratorTaskDetail(args) { function getAigcGeneratorTaskDetail(args) {
return request.post("/hotelBiz/aigcGeneratorTask/aigcGeneratorTaskDetail", args); return request.post(
"/hotelBiz/aigcGeneratorTask/aigcGeneratorTaskDetail",
args,
);
} }
function createAigcGeneratorTask(args) { function createAigcGeneratorTask(args) {
return request.post( return request.post(
"/hotelBiz/aigcGeneratorTask/createAigcGeneratorTask", "/hotelBiz/aigcGeneratorTask/createAigcGeneratorTask",
args, args,
{ sensitive: true } { sensitive: true },
); );
} }
@@ -36,12 +42,18 @@ function getPointsTopUpAgreement() {
return request.get("/hotelBiz/mainScene/pointsTopUpAgreement", {}); return request.get("/hotelBiz/mainScene/pointsTopUpAgreement", {});
} }
function getUserAgreement() {
return request.get("/hotelBiz/mainScene/userAgreement", {});
}
function createAigcGeneratorTaskShare(args) { function createAigcGeneratorTaskShare(args) {
return request.post("/hotelBiz/aigcGeneratorTask/share/create", args); return request.post("/hotelBiz/aigcGeneratorTask/share/create", args);
} }
function getAigcGeneratorTaskShareDetail(args) { function getAigcGeneratorTaskShareDetail(args) {
return request.post("/hotelBiz/aigcGeneratorTask/share/detail", args, { noToken: true }); return request.post("/hotelBiz/aigcGeneratorTask/share/detail", args, {
noToken: true,
});
} }
export { export {
@@ -53,6 +65,7 @@ export {
getCurrentCredit, getCurrentCredit,
getCreditLedgerPage, getCreditLedgerPage,
getPointsTopUpAgreement, getPointsTopUpAgreement,
getUserAgreement,
createAigcGeneratorTaskShare, createAigcGeneratorTaskShare,
getAigcGeneratorTaskShareDetail, getAigcGeneratorTaskShareDetail,
}; };

View File

@@ -7,7 +7,7 @@ import { getServiceUrl } from "../api/GetServiceUrlApi";
const versionValue = "1.1.3"; const versionValue = "1.1.3";
/// 是否是测试版本, 测试版本为true 发布版本为false /// 是否是测试版本, 测试版本为true 发布版本为false
const developVersion = true; const developVersion = false;
// 获取服务地址 // 获取服务地址
const getEvnUrl = async () => { const getEvnUrl = async () => {