chore: remove recharge and switch to test mode

Remove all recharge-related pages, components, and API endpoints.
Update developVersion flag to enable test environment with 400 free credits for all users.
Revise PointInsufficientDialog to reflect closed recharge channel, update button text and actions.
Remove recharge actions from all top bars and generate confirmation panels.
Add new user agreement page for service terms, update related API calls.
Restyle AigcConsentDialog to use sectioned content layout.
Fix visibility timing logic in GiftPointsToast component.
This commit is contained in:
duanshuwen
2026-07-20 14:50:14 +08:00
parent 2407a9d941
commit bfebed44b0
28 changed files with 260 additions and 963 deletions

View File

@@ -0,0 +1,59 @@
<template>
<view class="aigc-agreement-page">
<TopNavBar
title="智念AI用户规则"
background="#ffffff"
title-color="#172033"
back-icon-color="#172033"
:align-with-menu-button="true"
:z-index="3"
/>
<scroll-view class="aigc-agreement-scroll" scroll-y>
<view v-if="agreement" class="aigc-agreement-document">
<zero-markdown-view :markdown="agreement" />
</view>
<view v-else class="aigc-agreement-state">
<text>{{ loading ? "协议加载中..." : "协议内容加载失败" }}</text>
<button v-if="!loading" class="aigc-agreement-retry" @tap="fetchAgreement">
重新加载
</button>
</view>
</scroll-view>
</view>
</template>
<script setup>
import { ref } from "vue";
import { onLoad } from "@dcloudio/uni-app";
import TopNavBar from "@/components/TopNavBar/index.vue";
import { getUserAgreement } from "@/request/api/AigcApi.js";
const agreement = ref("");
const loading = ref(false);
const fetchAgreement = async () => {
if (loading.value) return;
loading.value = true;
try {
const res = await getUserAgreement();
agreement.value =
res?.code === 0 && typeof res.data === "string" ? res.data.trim() : "";
} catch (error) {
agreement.value = "";
console.error("获取智念AI用户规则失败", error);
} finally {
loading.value = false;
}
};
onLoad(() => {
fetchAgreement();
});
</script>
<style scoped lang="scss">
@import "./styles/index.scss";
</style>

View File

@@ -0,0 +1,54 @@
.aigc-agreement-page {
width: 100%;
height: 100vh;
display: flex;
flex-direction: column;
overflow: hidden;
background: #ffffff;
}
.aigc-agreement-scroll {
height: 0;
flex: 1 1 auto;
min-height: 0;
background: #ffffff;
}
.aigc-agreement-document {
min-height: 100%;
padding: 20px 16px calc(24px + env(safe-area-inset-bottom));
box-sizing: border-box;
}
.aigc-agreement-state {
min-height: 240px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 24px;
color: #7b8798;
font-size: 14px;
line-height: 22px;
box-sizing: border-box;
}
.aigc-agreement-retry {
width: 120px;
height: 42px;
display: flex;
align-items: center;
justify-content: center;
margin: 16px 0 0;
padding: 0;
border-radius: 999px;
background: #102942;
color: #ffffff;
font-size: 14px;
line-height: 20px;
font-weight: 800;
}
.aigc-agreement-retry::after {
border: 0;
}