feat: 备案调整

This commit is contained in:
duanshuwen
2025-11-12 20:10:24 +08:00
parent 785040ecc8
commit 31fefeb046
3 changed files with 69 additions and 20 deletions

View File

@@ -65,10 +65,6 @@
<!-- 录音按钮 -->
<RecordingWaveBtn v-if="visibleWaveBtn" ref="recordingWaveBtnRef" />
<view class="color-99A0AE font-size-9 text-center text-gray-400">
内容由AI大模型生成请仔细鉴别
</view>
</view>
</template>

View File

@@ -74,6 +74,13 @@
v-if="item.question"
:question="item.question"
/>
<view
v-if="!item.isLoading"
class="border-box color-99A0AE font-size-12 pl-12"
>
内容由AI大模型生成请仔细鉴别
</view>
</template>
</ChatCardAI>
</template>

View File

@@ -18,11 +18,23 @@
class="bg-white border-box p-12 rounded-10 flex flex-items-center mb-16"
>
<uni-icons class="mr-8" type="phone-filled" size="20" color="#999" />
<input class="w-272" type="tel" placeholder="请输入手机号" />
<input
class="w-272"
type="tel"
v-model="form.username"
placeholder="请输入手机号"
maxlength="11"
/>
</view>
<view class="bg-white border-box p-12 rounded-10 flex flex-items-center">
<uni-icons class="mr-8" type="locked-filled" size="20" color="#999" />
<input class="w-272" type="text" password placeholder="请输入密码" />
<input
class="w-272"
type="text"
v-model="form.password"
password
placeholder="请输入密码"
/>
</view>
</view>
@@ -66,17 +78,25 @@
<script setup>
import { ref, computed } from "vue";
import {
wxLogin,
getServiceAgreement,
getPrivacyAgreement,
} from "@/request/api/LoginApi";
import { onLogin, goBack } from "@/hooks/useGoLogin";
import { goBack } from "@/hooks/useGoLogin";
import CheckBox from "@/components/CheckBox/index.vue";
import AgreePopup from "./components/AgreePopup/index.vue";
import { zniconsMap } from "@/static/fonts/znicons.js";
import { getCurrentConfig } from "@/constant/base";
import { NOTICE_EVENT_LOGIN_SUCCESS } from "@/constant/constant";
import { useAppStore } from "@/store";
const appStore = useAppStore();
const form = ref({
grant_type: "password",
scope: "server",
username: "",
password: "",
});
const isAgree = ref(false);
const visible = ref(false);
const serviceAgreement = ref("");
@@ -87,6 +107,22 @@ const logo = computed(() => getCurrentConfig().logo);
// 提交表单操作
const onSubmitForm = () => {
if (!form.value.username) {
uni.showToast({
title: "请输入手机号",
icon: "none",
});
return;
}
if (!form.value.password) {
uni.showToast({
title: "请输入密码",
icon: "none",
});
return;
}
if (!isAgree.value) {
uni.showToast({
title: "请先同意服务协议和隐私协议",
@@ -94,20 +130,30 @@ const onSubmitForm = () => {
});
return;
}
};
const handleLogin = () => {
console.log("handleLogin");
onLogin()
.then(() => {
if (form.value.password !== "YehdBPev") {
uni.showToast({
title: "密码错误",
icon: "none",
});
return;
}
wxLogin(form.value).then((res) => {
uni.showToast({
title: "登录成功",
icon: "success",
});
appStore.setTokenExpired(false);
if (res.access_token) {
uni.setStorageSync("token", res.access_token);
appStore.setHasToken(true);
// 登录成功后,触发登录成功事件
uni.$emit(NOTICE_EVENT_LOGIN_SUCCESS);
}
goBack();
})
.catch(() => {});
});
};
// 处理同意协议点击事件