Compare commits
3 Commits
2cbfae6833
...
6c58484b36
| Author | SHA1 | Date | |
|---|---|---|---|
| 6c58484b36 | |||
| 85eaf3b86a | |||
| 3fe099c3b0 |
@@ -68,8 +68,8 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { ref, computed, nextTick } from "vue";
|
import { ref, computed, nextTick } from "vue";
|
||||||
import { zniconsMap } from "@/static/fonts/znicons.js";
|
import { zniconsMap } from "@/static/fonts/znicons.js";
|
||||||
import { useAppStore } from "@/store";
|
import { usePictureStore } from "@/store";
|
||||||
const appStore = useAppStore();
|
const pictureStore = usePictureStore();
|
||||||
|
|
||||||
// Props定义
|
// Props定义
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
@@ -170,7 +170,7 @@ const handleSwiperChange = (e) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const handlePreviewClick = () => {
|
const handlePreviewClick = () => {
|
||||||
appStore.setPreviewImageData(thumbnails.value);
|
pictureStore.setPreviewImageData(thumbnails.value);
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/goods/album/index`,
|
url: `/pages/goods/album/index`,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -35,13 +35,7 @@
|
|||||||
@scroll="handleScroll"
|
@scroll="handleScroll"
|
||||||
@scrolltolower="handleScrollToLower"
|
@scrolltolower="handleScrollToLower"
|
||||||
>
|
>
|
||||||
<!-- welcome栏 -->
|
|
||||||
<!-- <ChatTopWelcome ref="welcomeRef" :mainPageDataModel="mainPageDataModel" />
|
|
||||||
<NoticeMessage
|
|
||||||
v-if="notitceConent"
|
|
||||||
:noticeContent="notitceConent"
|
|
||||||
></NoticeMessage> -->
|
|
||||||
|
|
||||||
<view
|
<view
|
||||||
class="area-msg-list-content"
|
class="area-msg-list-content"
|
||||||
v-for="item in chatMsgList"
|
v-for="item in chatMsgList"
|
||||||
@@ -250,7 +244,6 @@ const statusBarHeight = ref(20);
|
|||||||
/// 输入框组件引用
|
/// 输入框组件引用
|
||||||
const inputAreaRef = ref(null);
|
const inputAreaRef = ref(null);
|
||||||
const topNavBarRef = ref();
|
const topNavBarRef = ref();
|
||||||
const welcomeRef = ref();
|
|
||||||
const notitceConent = ref(null);
|
const notitceConent = ref(null);
|
||||||
|
|
||||||
const holdKeyboardTimer = ref(null);
|
const holdKeyboardTimer = ref(null);
|
||||||
@@ -537,11 +530,6 @@ const getMainPageData = async () => {
|
|||||||
initData();
|
initData();
|
||||||
mainPageDataModel.value = res.data;
|
mainPageDataModel.value = res.data;
|
||||||
agentId.value = res.data.agentId;
|
agentId.value = res.data.agentId;
|
||||||
// 数据更新后再次测量欢迎区高度
|
|
||||||
welcomeRef.value.measureWelcomeHeight((data) => {
|
|
||||||
console.log("🚀 ~ getMainPageData ~ data:", data);
|
|
||||||
welcomeHeight.value = data.height;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
appStore.setSceneId(""); // 清空sceneId,分身二次进入展示默认的
|
appStore.setSceneId(""); // 清空sceneId,分身二次进入展示默认的
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -35,14 +35,14 @@
|
|||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import TopNavBar from "@/components/TopNavBar/index.vue";
|
import TopNavBar from "@/components/TopNavBar/index.vue";
|
||||||
import { onLoad } from "@dcloudio/uni-app";
|
import { onLoad } from "@dcloudio/uni-app";
|
||||||
import { useAppStore } from "@/store";
|
import { usePictureStore } from "@/store";
|
||||||
const appStore = useAppStore();
|
const pictureStore = usePictureStore();
|
||||||
|
|
||||||
const albumList = ref([]);
|
const albumList = ref([]);
|
||||||
|
|
||||||
onLoad(() => {
|
onLoad(() => {
|
||||||
albumList.value = appStore.previewImageData;
|
albumList.value = pictureStore.previewImageData;
|
||||||
appStore.setPreviewImageData([]);
|
pictureStore.setPreviewImageData([]);
|
||||||
});
|
});
|
||||||
|
|
||||||
// 处理图片预览
|
// 处理图片预览
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
import request from "../base/request";
|
import request from "../base/request";
|
||||||
import { proUrl } from "../base/baseUrl";
|
|
||||||
import { useAppStore } from "@/store";
|
import { useAppStore } from "@/store";
|
||||||
|
|
||||||
export const getServiceUrl = async (versionValue) => {
|
export const getServiceUrl = async (versionValue) => {
|
||||||
const apiUrl = proUrl + "/hotelBiz/versionManager/getInfo";
|
const apiUrl = "/hotelBiz/versionManager/getInfo";
|
||||||
const res = await request.post(apiUrl, { versionValue: versionValue });
|
const res = await request.post(apiUrl, { versionValue: versionValue });
|
||||||
if (res && res.code == 0 && res.data) {
|
if (res && res.code == 0 && res.data) {
|
||||||
const appStore = useAppStore();
|
const appStore = useAppStore();
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { devUrl, wssDevUrl } from "./baseUrl";
|
|||||||
import { getServiceUrl } from "../api/GetServiceUrlApi";
|
import { getServiceUrl } from "../api/GetServiceUrlApi";
|
||||||
|
|
||||||
/// 版本号, 每次发版本前增加
|
/// 版本号, 每次发版本前增加
|
||||||
const versionValue = "1.1.1";
|
const versionValue = "1.1.2";
|
||||||
|
|
||||||
/// 是否是测试版本, 测试版本为true, 发布版本为false
|
/// 是否是测试版本, 测试版本为true, 发布版本为false
|
||||||
const developVersion = true;
|
const developVersion = true;
|
||||||
|
|||||||
@@ -4,9 +4,7 @@ import { devUrl, wssDevUrl } from "../../request/base/baseUrl";
|
|||||||
export const useAppStore = defineStore("app", {
|
export const useAppStore = defineStore("app", {
|
||||||
state() {
|
state() {
|
||||||
return {
|
return {
|
||||||
title: "",
|
|
||||||
sceneId: "", // 分身场景id
|
sceneId: "", // 分身场景id
|
||||||
previewImageData: [], // 预览图片数据
|
|
||||||
serverConfig: { // 服务器配置
|
serverConfig: { // 服务器配置
|
||||||
baseUrl: devUrl, // 服务器基础地址
|
baseUrl: devUrl, // 服务器基础地址
|
||||||
wssUrl: wssDevUrl, // 服务器ws地址
|
wssUrl: wssDevUrl, // 服务器ws地址
|
||||||
@@ -16,15 +14,9 @@ export const useAppStore = defineStore("app", {
|
|||||||
getters: {},
|
getters: {},
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
setData(data) {
|
|
||||||
this.title = data;
|
|
||||||
},
|
|
||||||
setSceneId(data) {
|
setSceneId(data) {
|
||||||
this.sceneId = data;
|
this.sceneId = data;
|
||||||
},
|
},
|
||||||
setPreviewImageData(data) {
|
|
||||||
this.previewImageData = data;
|
|
||||||
},
|
|
||||||
setServerConfig(data) {
|
setServerConfig(data) {
|
||||||
this.serverConfig = data;
|
this.serverConfig = data;
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { useAppStore } from "./app";
|
import { useAppStore } from "./app";
|
||||||
import { useSelectedDateStore } from "./selectedDate";
|
import { useSelectedDateStore } from "./selectedDate";
|
||||||
|
import { usePictureStore } from "./picture";
|
||||||
|
|
||||||
export { useAppStore, useSelectedDateStore };
|
export { useAppStore, useSelectedDateStore, usePictureStore };
|
||||||
17
src/store/modules/picture.js
Normal file
17
src/store/modules/picture.js
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
import { defineStore } from "pinia";
|
||||||
|
|
||||||
|
export const usePictureStore = defineStore("picture", {
|
||||||
|
state() {
|
||||||
|
return {
|
||||||
|
previewImageData: [], // 预览图片数据
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
|
actions: {
|
||||||
|
setPreviewImageData(data) {
|
||||||
|
this.previewImageData = data;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
unistorage: true,
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user