feat: 按配置获取主体信息

This commit is contained in:
duanshuwen
2025-09-20 19:26:16 +08:00
parent 4cdff7a594
commit 55fd7c7ee6
11 changed files with 155 additions and 142 deletions

View File

@@ -60,8 +60,9 @@
</template>
<script setup>
import { ref, watch, nextTick, onMounted, defineExpose } from "vue";
import { ref, computed, watch, nextTick, onMounted, defineExpose } from "vue";
import RecordingWaveBtn from "@/components/Speech/RecordingWaveBtn.vue";
import { getCurrentConfig } from "@/constant/base";
const plugin = requirePlugin("WechatSI");
const manager = plugin.getRecordRecognitionManager();
@@ -83,7 +84,7 @@ const emit = defineEmits([
const textareaRef = ref(null);
const recordingWaveBtnRef = ref(null);
const placeholder = ref("快告诉朵朵您在想什么~");
const placeholder = computed(() => getCurrentConfig().placeholder);
const inputMessage = ref(props.modelValue || "");
const isFocused = ref(false);
const keyboardHeight = ref(0);
@@ -115,14 +116,14 @@ const toggleVoiceMode = () => {
const handleVoiceTouchStart = () => {
manager.start({ lang: "zh_CN" });
visibleWaveBtn.value = true;
visibleWaveBtn.value = true;
// 启动音频条动画
nextTick(() => {
if (recordingWaveBtnRef.value) {
recordingWaveBtnRef.value.startAnimation();
}
});
// 启动音频条动画
nextTick(() => {
if (recordingWaveBtnRef.value) {
recordingWaveBtnRef.value.startAnimation();
}
});
};
// 处理语音按钮长按结束

View File

@@ -181,9 +181,9 @@ import {
import WebSocketManager from "@/utils/WebSocketManager";
import TypewriterManager from "@/utils/TypewriterManager";
import { IdUtils } from "@/utils";
import { goLogin, checkToken } from "@/hooks/useGoLogin";
import { checkToken } from "@/hooks/useGoLogin";
import { useAppStore } from "@/store";
const appStore = useAppStore();
/// 导航栏相关
const statusBarHeight = ref(20);
@@ -433,7 +433,8 @@ const loadConversationMsgList = async () => {
const getMainPageData = async () => {
/// 从个渠道获取如二维,没有的时候就返回首页的数据
const sceneId = appStore.sceneId || "";
const res = await mainPageData(sceneId);
const res = await mainPageData({ sceneId });
if (res.code === 0) {
initData();
mainPageDataModel.value = res.data;

BIN
pages/login/images/tm.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 KiB

BIN
pages/login/images/wsmm.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

View File

@@ -2,23 +2,19 @@
<view class="login-wrapper" :style="{ backgroundImage: `url(${loginBg})` }">
<!-- 返回按钮 -->
<view class="back-btn" @click="goBack">
<uni-icons fontFamily="znicons" size="24" color="#333">{{
zniconsMap["zn-nav-arrow-left"]
}}</uni-icons>
<uni-icons fontFamily="znicons" size="24" color="#333">
{{ zniconsMap["zn-nav-arrow-left"] }}
</uni-icons>
</view>
<!-- 头部内容 -->
<view class="login-header">
<!-- 卡通形象 -->
<image class="login-avatar" src="./images/dh.png" mode="widthFix"></image>
<image
class="login-title"
src="./images/dhwq.png"
mode="widthFix"
></image>
<image class="login-avatar" :src="logo" mode="widthFix"></image>
<image class="login-title" :src="subLogo" mode="widthFix"></image>
<!-- 描述 -->
<view class="login-desc">您好欢迎来到朵花温泉</view>
<view class="login-desc">{{ loginDesc }}</view>
</view>
<!-- 按钮区域 -->
@@ -82,6 +78,7 @@ import loginBg from "./images/bg.png";
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";
const isAgree = ref(false);
const visible = ref(false);
@@ -89,6 +86,10 @@ const serviceAgreement = ref("");
const privacyAgreement = ref("");
// 协议类型
const AgreeType = ref("service");
const logo = computed(() => getCurrentConfig().logo);
const subLogo = computed(() => getCurrentConfig().subLogo);
const loginDesc = computed(() => getCurrentConfig().loginDesc);
const clientId = computed(() => getCurrentConfig().clientId);
// 同意隐私协议并获取手机号
const handleAgreeAndGetPhone = () => {