feat: 按配置获取主体信息
This commit is contained in:
@@ -1,28 +1,42 @@
|
|||||||
|
import DH from "@/pages/login/images/dh.png";
|
||||||
|
import DHWQ from "@/pages/login/images/dhwq.png";
|
||||||
|
import TM from "@/pages/login/images/tm.png";
|
||||||
|
import WSMM from "@/pages/login/images/wsmm.png";
|
||||||
|
|
||||||
// 小程序特有相关: 同时更改manifest.json和 project.config.json文件中的appid;
|
// 小程序特有相关: 同时更改manifest.json和 project.config.json文件中的appid;
|
||||||
// 所有用户端的配置
|
// 所有用户端的配置
|
||||||
export const CLIENT_CONFIGS = {
|
export const CLIENT_CONFIGS = {
|
||||||
// 智念用户端
|
// 智念用户端
|
||||||
zhinian: {
|
zhinian: {
|
||||||
clientId: '2',
|
clientId: "2",
|
||||||
appId: 'wx5e79df5996572539'
|
appId: "wx5e79df5996572539",
|
||||||
|
placeholder: "快告诉智念您再想什么~",
|
||||||
|
loginDesc: "您好,欢迎来到智念科技",
|
||||||
|
logo: DH,
|
||||||
|
subLogo: DHWQ,
|
||||||
},
|
},
|
||||||
// 朵花用户端
|
// 朵花用户端
|
||||||
duohua: {
|
duohua: {
|
||||||
clientId: '2',
|
clientId: "2",
|
||||||
appId: 'wx23f86d809ae80259'
|
appId: "wx23f86d809ae80259",
|
||||||
|
placeholder: "快告诉朵朵您再想什么~",
|
||||||
|
loginDesc: "您好,欢迎来到朵花温泉",
|
||||||
|
logo: DH,
|
||||||
|
subLogo: DHWQ,
|
||||||
},
|
},
|
||||||
// 天沐用户端
|
// 天沐用户端
|
||||||
tianmu: {
|
tianmu: {
|
||||||
clientId: '4',
|
clientId: "4",
|
||||||
appId: 'wx0be424e1d22065a9'
|
appId: "wx0be424e1d22065a9",
|
||||||
}
|
placeholder: "快告诉沐沐您再想什么~",
|
||||||
|
loginDesc: "您好,欢迎来到天沐温泉",
|
||||||
|
logo: TM,
|
||||||
|
subLogo: WSMM,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
// 获取当前用户端配置
|
// 获取当前用户端配置
|
||||||
const getCurrentConfig = () => {
|
export const getCurrentConfig = () => CLIENT_CONFIGS.tianmu;
|
||||||
return CLIENT_CONFIGS.zhinian;
|
|
||||||
};
|
|
||||||
|
|
||||||
export const clientId = getCurrentConfig().clientId;
|
export const clientId = getCurrentConfig().clientId;
|
||||||
export const appId = getCurrentConfig().appId;
|
export const appId = getCurrentConfig().appId;
|
||||||
|
|
||||||
|
|||||||
@@ -60,7 +60,7 @@
|
|||||||
朵花:wx23f86d809ae80259
|
朵花:wx23f86d809ae80259
|
||||||
*/
|
*/
|
||||||
"mp-weixin" : {
|
"mp-weixin" : {
|
||||||
"appid": "wx5e79df5996572539",
|
"appid" : "wx0be424e1d22065a9",
|
||||||
"setting" : {
|
"setting" : {
|
||||||
"urlCheck" : false
|
"urlCheck" : false
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -60,8 +60,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<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 RecordingWaveBtn from "@/components/Speech/RecordingWaveBtn.vue";
|
||||||
|
import { getCurrentConfig } from "@/constant/base";
|
||||||
|
|
||||||
const plugin = requirePlugin("WechatSI");
|
const plugin = requirePlugin("WechatSI");
|
||||||
const manager = plugin.getRecordRecognitionManager();
|
const manager = plugin.getRecordRecognitionManager();
|
||||||
@@ -83,7 +84,7 @@ const emit = defineEmits([
|
|||||||
|
|
||||||
const textareaRef = ref(null);
|
const textareaRef = ref(null);
|
||||||
const recordingWaveBtnRef = ref(null);
|
const recordingWaveBtnRef = ref(null);
|
||||||
const placeholder = ref("快告诉朵朵您在想什么~");
|
const placeholder = computed(() => getCurrentConfig().placeholder);
|
||||||
const inputMessage = ref(props.modelValue || "");
|
const inputMessage = ref(props.modelValue || "");
|
||||||
const isFocused = ref(false);
|
const isFocused = ref(false);
|
||||||
const keyboardHeight = ref(0);
|
const keyboardHeight = ref(0);
|
||||||
|
|||||||
@@ -181,9 +181,9 @@ import {
|
|||||||
import WebSocketManager from "@/utils/WebSocketManager";
|
import WebSocketManager from "@/utils/WebSocketManager";
|
||||||
import TypewriterManager from "@/utils/TypewriterManager";
|
import TypewriterManager from "@/utils/TypewriterManager";
|
||||||
import { IdUtils } from "@/utils";
|
import { IdUtils } from "@/utils";
|
||||||
import { goLogin, checkToken } from "@/hooks/useGoLogin";
|
import { checkToken } from "@/hooks/useGoLogin";
|
||||||
|
|
||||||
import { useAppStore } from "@/store";
|
import { useAppStore } from "@/store";
|
||||||
|
|
||||||
const appStore = useAppStore();
|
const appStore = useAppStore();
|
||||||
/// 导航栏相关
|
/// 导航栏相关
|
||||||
const statusBarHeight = ref(20);
|
const statusBarHeight = ref(20);
|
||||||
@@ -433,7 +433,8 @@ const loadConversationMsgList = async () => {
|
|||||||
const getMainPageData = async () => {
|
const getMainPageData = async () => {
|
||||||
/// 从个渠道获取如二维,没有的时候就返回首页的数据
|
/// 从个渠道获取如二维,没有的时候就返回首页的数据
|
||||||
const sceneId = appStore.sceneId || "";
|
const sceneId = appStore.sceneId || "";
|
||||||
const res = await mainPageData(sceneId);
|
const res = await mainPageData({ sceneId });
|
||||||
|
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
initData();
|
initData();
|
||||||
mainPageDataModel.value = res.data;
|
mainPageDataModel.value = res.data;
|
||||||
|
|||||||
BIN
pages/login/images/tm.png
Normal file
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
BIN
pages/login/images/wsmm.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.2 KiB |
@@ -2,23 +2,19 @@
|
|||||||
<view class="login-wrapper" :style="{ backgroundImage: `url(${loginBg})` }">
|
<view class="login-wrapper" :style="{ backgroundImage: `url(${loginBg})` }">
|
||||||
<!-- 返回按钮 -->
|
<!-- 返回按钮 -->
|
||||||
<view class="back-btn" @click="goBack">
|
<view class="back-btn" @click="goBack">
|
||||||
<uni-icons fontFamily="znicons" size="24" color="#333">{{
|
<uni-icons fontFamily="znicons" size="24" color="#333">
|
||||||
zniconsMap["zn-nav-arrow-left"]
|
{{ zniconsMap["zn-nav-arrow-left"] }}
|
||||||
}}</uni-icons>
|
</uni-icons>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 头部内容 -->
|
<!-- 头部内容 -->
|
||||||
<view class="login-header">
|
<view class="login-header">
|
||||||
<!-- 卡通形象 -->
|
<!-- 卡通形象 -->
|
||||||
<image class="login-avatar" src="./images/dh.png" mode="widthFix"></image>
|
<image class="login-avatar" :src="logo" mode="widthFix"></image>
|
||||||
<image
|
<image class="login-title" :src="subLogo" mode="widthFix"></image>
|
||||||
class="login-title"
|
|
||||||
src="./images/dhwq.png"
|
|
||||||
mode="widthFix"
|
|
||||||
></image>
|
|
||||||
|
|
||||||
<!-- 描述 -->
|
<!-- 描述 -->
|
||||||
<view class="login-desc">您好,欢迎来到朵花温泉!</view>
|
<view class="login-desc">{{ loginDesc }}</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 按钮区域 -->
|
<!-- 按钮区域 -->
|
||||||
@@ -82,6 +78,7 @@ import loginBg from "./images/bg.png";
|
|||||||
import CheckBox from "@/components/CheckBox/index.vue";
|
import CheckBox from "@/components/CheckBox/index.vue";
|
||||||
import AgreePopup from "./components/AgreePopup/index.vue";
|
import AgreePopup from "./components/AgreePopup/index.vue";
|
||||||
import { zniconsMap } from "@/static/fonts/znicons.js";
|
import { zniconsMap } from "@/static/fonts/znicons.js";
|
||||||
|
import { getCurrentConfig } from "@/constant/base";
|
||||||
|
|
||||||
const isAgree = ref(false);
|
const isAgree = ref(false);
|
||||||
const visible = ref(false);
|
const visible = ref(false);
|
||||||
@@ -89,6 +86,10 @@ const serviceAgreement = ref("");
|
|||||||
const privacyAgreement = ref("");
|
const privacyAgreement = ref("");
|
||||||
// 协议类型
|
// 协议类型
|
||||||
const AgreeType = ref("service");
|
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 = () => {
|
const handleAgreeAndGetPhone = () => {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"appid": "wx5e79df5996572539",
|
"appid": "wx0be424e1d22065a9",
|
||||||
"compileType": "miniprogram",
|
"compileType": "miniprogram",
|
||||||
"libVersion": "3.8.10",
|
"libVersion": "3.8.10",
|
||||||
"packOptions": {
|
"packOptions": {
|
||||||
|
|||||||
@@ -1,26 +1,19 @@
|
|||||||
import request from "../base/request";
|
import request from "../base/request";
|
||||||
|
|
||||||
/// 主页数据
|
/// 主页数据
|
||||||
function mainPageData(sceneId) {
|
function mainPageData(args) {
|
||||||
const args = { sceneId : sceneId}
|
return request.post("/hotelBiz/mainScene/mainPageData", args);
|
||||||
return request.post('/hotelBiz/mainScene/mainPageData', args);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// 快速预订组件
|
/// 快速预订组件
|
||||||
function quickBookingComponent(selectedData) {
|
function quickBookingComponent(selectedData) {
|
||||||
const args = { selectedData: selectedData }
|
const args = { selectedData: selectedData };
|
||||||
return request.post('/hotelBiz/mainScene/quickBookingComponent', args);
|
return request.post("/hotelBiz/mainScene/quickBookingComponent", args);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 探索发现卡片组件
|
/// 探索发现卡片组件
|
||||||
function discoveryCradComponent() {
|
function discoveryCradComponent() {
|
||||||
return request.get('/hotelBiz/mainScene/discoveryComponent', {});
|
return request.get("/hotelBiz/mainScene/discoveryComponent", {});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export { mainPageData, quickBookingComponent, discoveryCradComponent };
|
||||||
export {
|
|
||||||
mainPageData,
|
|
||||||
quickBookingComponent,
|
|
||||||
discoveryCradComponent
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
const isProd = false;
|
const isProd = true;
|
||||||
|
|
||||||
// 测试
|
// 测试
|
||||||
const VITE_BASE_URL_TEST = "https://onefeel.brother7.cn/ingress";
|
const VITE_BASE_URL_TEST = "https://onefeel.brother7.cn/ingress";
|
||||||
|
|||||||
@@ -1,10 +1,13 @@
|
|||||||
import { goLogin } from "../../hooks/useGoLogin";
|
import { goLogin } from "../../hooks/useGoLogin";
|
||||||
import { BASE_URL } from "./baseUrl";
|
import { BASE_URL } from "./baseUrl";
|
||||||
|
import { getCurrentConfig } from "@/constant/base";
|
||||||
|
|
||||||
|
const clientId = getCurrentConfig().clientId;
|
||||||
const defaultConfig = {
|
const defaultConfig = {
|
||||||
header: {
|
header: {
|
||||||
Authorization: "", // 可在此动态设置 token
|
Authorization: "", // 可在此动态设置 token
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
|
clientId: clientId,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user