Compare commits
8 Commits
6c58484b36
...
home3.0
| Author | SHA1 | Date | |
|---|---|---|---|
| 9c83a47260 | |||
| 255b40aad7 | |||
| 25c8a3570d | |||
| a3c82382c2 | |||
| 42e0e4920f | |||
| 9455beec4d | |||
| 3a5fa0b7d2 | |||
| af7366f32b |
@@ -74,5 +74,6 @@
|
|||||||
"@vue/tsconfig": "^0.1.3",
|
"@vue/tsconfig": "^0.1.3",
|
||||||
"sass": "1.58.3",
|
"sass": "1.58.3",
|
||||||
"vite": "5.2.8"
|
"vite": "5.2.8"
|
||||||
}
|
},
|
||||||
|
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,109 +1,105 @@
|
|||||||
{
|
{
|
||||||
"name": "YGTianmuCS",
|
"name" : "YGChatCS",
|
||||||
"appid": "__UNI__BB03E8A",
|
"appid" : "__UNI__38F74B8",
|
||||||
"description": "",
|
"description" : "",
|
||||||
"versionName": "1.0.0",
|
"versionName" : "1.0.0",
|
||||||
"versionCode": "100",
|
"versionCode" : "100",
|
||||||
"transformPx": false,
|
"transformPx" : false,
|
||||||
/* 5+App特有相关 */
|
"app-plus" : {
|
||||||
"app-plus": {
|
"usingComponents" : true,
|
||||||
"usingComponents": true,
|
"nvueStyleCompiler" : "uni-app",
|
||||||
"nvueStyleCompiler": "uni-app",
|
"compilerVersion" : 3,
|
||||||
"compilerVersion": 3,
|
"optimization" : {
|
||||||
"splashscreen": {
|
"subPackages" : true
|
||||||
"alwaysShowBeforeRender": true,
|
},
|
||||||
"waiting": true,
|
"compatible" : {
|
||||||
"autoclose": true,
|
"ignoreVersion" : true
|
||||||
"delay": 0
|
},
|
||||||
|
"splashscreen" : {
|
||||||
|
"alwaysShowBeforeRender" : true,
|
||||||
|
"waiting" : true,
|
||||||
|
"autoclose" : true,
|
||||||
|
"delay" : 0
|
||||||
|
},
|
||||||
|
"safearea" : {
|
||||||
|
"bottom" : {
|
||||||
|
"offset" : "auto"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"modules" : {},
|
||||||
|
"distribute" : {
|
||||||
|
"android" : {
|
||||||
|
"permissions" : [
|
||||||
|
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
||||||
|
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
||||||
|
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"ios" : {},
|
||||||
|
"sdkConfigs" : {
|
||||||
|
"oauth" : {}
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"safearea": {
|
"quickapp" : {},
|
||||||
"bottom": {
|
"mp-weixin" : {
|
||||||
"offset": "auto" // 自动适配安全区域
|
"appid" : "wx5e79df5996572539",
|
||||||
}
|
"setting" : {
|
||||||
|
"urlCheck" : false,
|
||||||
|
"minified" : true
|
||||||
|
},
|
||||||
|
"optimization" : {
|
||||||
|
"subPackages" : true
|
||||||
|
},
|
||||||
|
"usingComponents" : true,
|
||||||
|
"requiredPrivateInfos" : [ "getLocation" ],
|
||||||
|
"permission" : {
|
||||||
|
"scope.userLocation" : {
|
||||||
|
"desc" : "用于获取当前所在城市信息"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"plugins" : {
|
||||||
|
"WechatSI" : {
|
||||||
|
"version" : "0.3.6",
|
||||||
|
"provider" : "wx069ba97219f66d99"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"__usePrivacyCheck__" : true
|
||||||
},
|
},
|
||||||
/* 模块配置 */
|
"mp-alipay" : {
|
||||||
"modules": {},
|
"usingComponents" : true
|
||||||
/* 应用发布信息 */
|
|
||||||
"distribute": {
|
|
||||||
/* android打包配置 */
|
|
||||||
"android": {
|
|
||||||
"permissions": [
|
|
||||||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
|
||||||
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
|
||||||
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
/* ios打包配置 */
|
|
||||||
"ios": {},
|
|
||||||
/* SDK配置 */
|
|
||||||
"sdkConfigs": {
|
|
||||||
"oauth": {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
/* 快应用特有相关 */
|
|
||||||
"quickapp": {},
|
|
||||||
/* 小程序特有相关 同时更改 project.config.json文件
|
|
||||||
智念:wx5e79df5996572539
|
|
||||||
朵花:wx23f86d809ae80259
|
|
||||||
*/
|
|
||||||
"mp-weixin": {
|
|
||||||
"appid": "wx5e79df5996572539",
|
|
||||||
"setting": {
|
|
||||||
"urlCheck": false,
|
|
||||||
"minified": true
|
|
||||||
},
|
},
|
||||||
"optimization": {
|
"mp-baidu" : {
|
||||||
"subPackages": true
|
"usingComponents" : true
|
||||||
},
|
},
|
||||||
"usingComponents": true,
|
"mp-toutiao" : {
|
||||||
"requiredPrivateInfos": ["getLocation"],
|
"usingComponents" : true,
|
||||||
"permission": {
|
"usePrivacyCheck" : true
|
||||||
"scope.userLocation": {
|
|
||||||
"desc": "用于获取当前所在城市信息"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"plugins": {
|
"uniStatistics" : {
|
||||||
"WechatSI": {
|
"enable" : false
|
||||||
"version": "0.3.6",
|
|
||||||
"provider": "wx069ba97219f66d99"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"__usePrivacyCheck__": true
|
"vueVersion" : "3",
|
||||||
},
|
"h5" : {
|
||||||
"mp-alipay": {
|
"router" : {
|
||||||
"usingComponents": true
|
"base" : "./",
|
||||||
},
|
"mode" : "hash"
|
||||||
"mp-baidu": {
|
},
|
||||||
"usingComponents": true
|
"devServer" : {
|
||||||
},
|
"https" : false
|
||||||
"mp-toutiao": {
|
}
|
||||||
"usingComponents": true,
|
|
||||||
"usePrivacyCheck": true
|
|
||||||
},
|
|
||||||
"uniStatistics": {
|
|
||||||
"enable": false
|
|
||||||
},
|
|
||||||
"vueVersion": "3",
|
|
||||||
"h5": {
|
|
||||||
"router": {
|
|
||||||
"base": "./",
|
|
||||||
"mode": "hash"
|
|
||||||
},
|
},
|
||||||
"devServer": {
|
"fallbackLocale" : "zh-Hans"
|
||||||
"https": false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,6 +38,12 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/ChatMain/NoticeMessage/detail",
|
||||||
|
"style": {
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"subPackages": [
|
"subPackages": [
|
||||||
|
|||||||
@@ -9,8 +9,8 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="relative">
|
<view class="relative">
|
||||||
<image class="w-full block" src="https://images.unsplash.com/photo-1506744038136-46273834b3fb?w=800&q=80"
|
<image class="w-full block" :src="mainPageDataModel?.initPageImages?.backgroundImageUrl"
|
||||||
mode="widthFix" />
|
mode="aspectFill" style="height: 252px;" />
|
||||||
<view class="absolute bottom-0 left-0 right-0 flex-full">
|
<view class="absolute bottom-0 left-0 right-0 flex-full">
|
||||||
<view class="px-12 pt-12">
|
<view class="px-12 pt-12">
|
||||||
<HomeWelcome :mainPageDataModel="mainPageDataModel" />
|
<HomeWelcome :mainPageDataModel="mainPageDataModel" />
|
||||||
@@ -92,14 +92,21 @@
|
|||||||
item.toolCall.componentName === CompName.mapCard
|
item.toolCall.componentName === CompName.mapCard
|
||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
<GeneratorPhotoComponent
|
<!-- <GeneratorPhotoComponent
|
||||||
v-else-if="
|
v-else-if="
|
||||||
item.toolCall &&
|
item.toolCall &&
|
||||||
item.toolCall.componentName ===
|
item.toolCall.componentName ===
|
||||||
CompName.aigcPhotoGeneratorCard
|
CompName.aigcPhotoGeneratorCard
|
||||||
"
|
"
|
||||||
:toolCall="item.toolCall"
|
:toolCall="item.toolCall"
|
||||||
|
/> -->
|
||||||
|
<ZModuleC01
|
||||||
|
v-else-if="
|
||||||
|
item.toolCall &&
|
||||||
|
item.toolCall.componentName === CompName.aigcPhotoGeneratorCard
|
||||||
|
"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Feedback
|
<Feedback
|
||||||
v-else-if="
|
v-else-if="
|
||||||
item.toolCall &&
|
item.toolCall &&
|
||||||
@@ -204,8 +211,6 @@ import HomeWelcome from "../HomeWelcome/index.vue";
|
|||||||
import AiTabSwitch from "@/components/AiTabSwitch/index.vue";
|
import AiTabSwitch from "@/components/AiTabSwitch/index.vue";
|
||||||
import Discovery from "../../Discovery/index.vue";
|
import Discovery from "../../Discovery/index.vue";
|
||||||
|
|
||||||
import ChatTopWelcome from "../ChatTopWelcome/index.vue";
|
|
||||||
import NoticeMessage from "../NoticeMessage/index.vue";
|
|
||||||
import ChatTopNavBar from "../ChatTopNavBar/index.vue";
|
import ChatTopNavBar from "../ChatTopNavBar/index.vue";
|
||||||
import ChatCardAI from "../ChatCardAi/index.vue";
|
import ChatCardAI from "../ChatCardAi/index.vue";
|
||||||
import ChatCardMine from "../ChatCardMine/index.vue";
|
import ChatCardMine from "../ChatCardMine/index.vue";
|
||||||
@@ -223,6 +228,8 @@ import OpenMapComponent from "../../ChatModule/OpenMapComponent/index.vue";
|
|||||||
import AnswerComponent from "../../ChatModule/AnswerComponent/index.vue";
|
import AnswerComponent from "../../ChatModule/AnswerComponent/index.vue";
|
||||||
import GeneratorPhotoComponent from "../../ChatModule/GeneratorPhotoComponent/index.vue";
|
import GeneratorPhotoComponent from "../../ChatModule/GeneratorPhotoComponent/index.vue";
|
||||||
|
|
||||||
|
import ZModuleC01 from "../../ChatModule/ZModuleC01/index.vue";
|
||||||
|
|
||||||
import CreateServiceOrder from "@/components/CreateServiceOrder/index.vue";
|
import CreateServiceOrder from "@/components/CreateServiceOrder/index.vue";
|
||||||
import Feedback from "@/components/Feedback/index.vue";
|
import Feedback from "@/components/Feedback/index.vue";
|
||||||
import AddCarCrad from "@/components/AddCarCrad/index.vue";
|
import AddCarCrad from "@/components/AddCarCrad/index.vue";
|
||||||
|
|||||||
@@ -7,58 +7,21 @@
|
|||||||
<view class="flex flex-col flex-full min-width-0">
|
<view class="flex flex-col flex-full min-width-0">
|
||||||
<view class="flex flex-row flex-items-center flex-justify-between min-width-0">
|
<view class="flex flex-row flex-items-center flex-justify-between min-width-0">
|
||||||
<text class="flex-full min-width-0 font-size-20 font-500 color-white ellipsis-1">{{ mainPageDataModel.welcomeContent }}</text>
|
<text class="flex-full min-width-0 font-size-20 font-500 color-white ellipsis-1">{{ mainPageDataModel.welcomeContent }}</text>
|
||||||
<text class="flex-shrink-0 font-size-20 font-500 color-white mt-4"> 26°C ☀️ </text>
|
<text class="flex-shrink-0 font-size-20 font-500 color-white mt-4"> {{ weatherText }} </text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<swiper @change="onSwiperChange" class="swiper" circular :autoplay="autoplay" :interval="interval"
|
<NoticeMessage />
|
||||||
:duration="duration" :indicator-dots="false">
|
|
||||||
<swiper-item v-for="item in bannerList" :key="item.title">
|
|
||||||
<view class="swiper-item flex flex-col flex-items-start flex-justify-between px-10">
|
|
||||||
<text class="font-size-12 font-600 color-B45309">
|
|
||||||
{{ item.title }}
|
|
||||||
</text>
|
|
||||||
<view class="flex flex-row flex-justify-between">
|
|
||||||
<text class="font-size-10 font-500 color-D97706">
|
|
||||||
发布时间:{{ item.time }}
|
|
||||||
</text>
|
|
||||||
<text class="font-size-10 font-500 color-B45309 underline-text">
|
|
||||||
详情
|
|
||||||
</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</swiper-item>
|
|
||||||
</swiper>
|
|
||||||
|
|
||||||
<yo-indicator-dot :current-index="currentIndex" :length="bannerList.length" duration="0.5" default-width="4px"
|
|
||||||
active-width="16px" dot-height="4px" shape="circle" default-color="rgba(255,255,255,0.5)"
|
|
||||||
active-color="rgba(255,255,255,1)" />
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from "vue";
|
import { onMounted, ref } from "vue";
|
||||||
import { defineProps, computed } from "vue";
|
import { defineProps, computed } from "vue";
|
||||||
import SpriteAnimator from "@/components/Sprite/SpriteAnimator.vue";
|
import SpriteAnimator from "@/components/Sprite/SpriteAnimator.vue";
|
||||||
|
import NoticeMessage from "../NoticeMessage/index.vue";
|
||||||
|
import { getLocalWeather } from "@/request/api/MainPageDataApi";
|
||||||
|
|
||||||
const autoplay = ref(true);
|
const weatherText = ref("26°C ☀️");
|
||||||
const interval = ref(7000);
|
|
||||||
const duration = ref(500);
|
|
||||||
|
|
||||||
const currentIndex = ref(0);
|
|
||||||
const bannerList = ref([
|
|
||||||
{
|
|
||||||
title: "小七欢迎你~",
|
|
||||||
time: "2025年7月12日 09:30",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "小8欢迎你~",
|
|
||||||
time: "2025年7月13日 09:30",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "小9欢迎你~",
|
|
||||||
time: "2025年7月15日 09:30",
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
mainPageDataModel: {
|
mainPageDataModel: {
|
||||||
@@ -92,29 +55,18 @@ const spriteStyle = computed(() => {
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
const onSwiperChange = (e) => {
|
const getLocalWeatherData = async () => {
|
||||||
currentIndex.value = e.detail.current;
|
const res = await getLocalWeather();
|
||||||
};
|
if (res && res.code === 0) {
|
||||||
|
const { temperature, weather } = res.data;
|
||||||
|
weatherText.value = `${temperature}°C ${weather}`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
getLocalWeatherData();
|
||||||
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped></style>
|
||||||
.swiper {
|
|
||||||
height: 50px;
|
|
||||||
margin-top: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-item {
|
|
||||||
display: block;
|
|
||||||
height: 46px;
|
|
||||||
background: #fffbeb;
|
|
||||||
box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.05);
|
|
||||||
border-radius: 12px;
|
|
||||||
border: 2px solid #fef3c7;
|
|
||||||
}
|
|
||||||
|
|
||||||
.underline-text {
|
|
||||||
text-decoration: underline;
|
|
||||||
text-decoration-color: #b45309;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|||||||
77
src/pages/ChatMain/NoticeMessage/detail.vue
Normal file
77
src/pages/ChatMain/NoticeMessage/detail.vue
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
<template>
|
||||||
|
<view class="flex flex-col bg-liner h-screen overflow-hidden">
|
||||||
|
<!-- ✅ 顶部固定导航 -->
|
||||||
|
<view class="flex-shrink-0">
|
||||||
|
<TopNavBar :title="detailTitle" background="transparent" />
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- ✅ 滚动区域 -->
|
||||||
|
<scroll-view class="flex-full overflow-hidden" scroll-y >
|
||||||
|
<view class="pb-24 border-box overflow-hidden">
|
||||||
|
<image v-if="coverImage" class="w-full block" :src="coverImage" mode="aspectFill" />
|
||||||
|
|
||||||
|
<view class="pt-16 px-12 pb-24 border-box">
|
||||||
|
<view class="color-171717 font-size-16 font-weight-600">{{ detailTitle }}</view>
|
||||||
|
|
||||||
|
<view v-if="publishTime" class="notice-time-tag flex flex-row flex-items-center mt-16">
|
||||||
|
<uni-icons type="clock" size="18" color="#5A6780" />
|
||||||
|
<text class="color-171717 font-size-12 font-weight-600 ml-8">发布时间:{{ publishTime }}</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="mt-16 mx-12 bg-gray w-full height-1"></view>
|
||||||
|
|
||||||
|
<view class="mt-16 color-666 font-size-14 line-height-20">{{ noticeContent }}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import TopNavBar from "@/components/TopNavBar/index.vue";
|
||||||
|
import { computed, ref } from "vue";
|
||||||
|
import { onLoad } from "@dcloudio/uni-app";
|
||||||
|
|
||||||
|
const noticeData = ref({});
|
||||||
|
|
||||||
|
const detailTitle = computed(() => {
|
||||||
|
return noticeData.value.entityName?.trim() || "消息详情";
|
||||||
|
});
|
||||||
|
|
||||||
|
const publishTime = computed(() => {
|
||||||
|
return noticeData.value.effectiveStartTime?.trim();
|
||||||
|
});
|
||||||
|
|
||||||
|
const coverImage = computed(() => {
|
||||||
|
return noticeData.value.eventImage?.trim();
|
||||||
|
});
|
||||||
|
|
||||||
|
const noticeContent = computed(() => {
|
||||||
|
return noticeData.value.eventDescription?.trim();
|
||||||
|
});
|
||||||
|
|
||||||
|
onLoad((query = {}) => {
|
||||||
|
if (query.noticeData) {
|
||||||
|
try {
|
||||||
|
noticeData.value = JSON.parse(decodeURIComponent(query.noticeData));
|
||||||
|
} catch (error) {
|
||||||
|
console.warn("noticeData parse failed:", error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
|
||||||
|
.notice-time-tag {
|
||||||
|
display: inline-flex;
|
||||||
|
height: 28px;
|
||||||
|
padding: 6px 12px;
|
||||||
|
background: linear-gradient(180deg, #f4f7fb 0%, #e9eef6 100%);
|
||||||
|
border: 1px solid #d6dde8;
|
||||||
|
border-radius: 14px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -1,40 +1,100 @@
|
|||||||
<template>
|
<template>
|
||||||
|
|
||||||
<view class="border-box pl-12 pr-12">
|
<view >
|
||||||
<view class="wrap rounded-20 bg-white relative overflow-hidden">
|
<swiper @change="onSwiperChange" class="swiper" circular :autoplay="autoplay" :interval="interval"
|
||||||
<view class="flex flex-col p-16 mr-110 border-box">
|
:duration="duration" :indicator-dots="false">
|
||||||
<view class="flex flex-row flex-items-center justify-center">
|
<swiper-item v-for="item in bannerList" :key="item.entityName">
|
||||||
<view class="w-24 h-24 rounded-full bg-theme-color-500 flex flex-items-center flex-justify-center">
|
<view class="swiper-item flex flex-col flex-items-start flex-justify-between px-10" @click="clickItem(item)">
|
||||||
<uni-icons type="sound" size="16" color="#ffffff"/>
|
<text class="font-size-12 font-600 color-B45309">
|
||||||
|
{{ item.entityName }}
|
||||||
|
</text>
|
||||||
|
<view class="flex flex-row flex-justify-between">
|
||||||
|
<text class="font-size-10 font-500 color-D97706">
|
||||||
|
发布时间:{{ item.effectiveStartTime }}
|
||||||
|
</text>
|
||||||
|
<text class="font-size-10 font-500 color-B45309 underline-text">
|
||||||
|
详情
|
||||||
|
</text>
|
||||||
</view>
|
</view>
|
||||||
<text class="font-size-16 font-500 text-color-900 ml-6">临时提醒</text>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="font-size-12 font-color-600 mt-8">{{ props.noticeContent.eventMessageContent }}</view>
|
</swiper-item>
|
||||||
</view>
|
</swiper>
|
||||||
<image class="mt-4 object-cover absolute right-0 bottom-0 bg-image" src="./notice_bg_img.png"/>
|
|
||||||
</view>
|
<yo-indicator-dot :current-index="currentIndex" :length="bannerList.length" duration="0.5" default-width="4px"
|
||||||
|
active-width="16px" dot-height="4px" shape="circle" default-color="rgba(255,255,255,0.5)"
|
||||||
|
active-color="rgba(255,255,255,1)" />
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { defineProps } from "vue";
|
import { onMounted, ref } from "vue";
|
||||||
|
import { getTimeNoticeList } from "@/request/api/MainPageDataApi";
|
||||||
|
|
||||||
const props = defineProps({
|
const autoplay = ref(true);
|
||||||
noticeContent: {
|
const interval = ref(7000);
|
||||||
type: Object,
|
const duration = ref(500);
|
||||||
default: () => ({}),
|
|
||||||
|
const currentIndex = ref(0);
|
||||||
|
// const bannerList = ref([]);
|
||||||
|
const bannerList = ref([
|
||||||
|
{
|
||||||
|
entityName: "小七欢迎你~",
|
||||||
|
effectiveStartTime: "2025年7月12日 09:30",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
entityName: "小8欢迎你~",
|
||||||
|
effectiveStartTime: "2025年7月13日 09:30",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
entityName: "小9欢迎你~",
|
||||||
|
effectiveStartTime: "2025年7月15日 09:30",
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
|
||||||
|
|
||||||
|
const onSwiperChange = (e) => {
|
||||||
|
currentIndex.value = e.detail.current;
|
||||||
|
};
|
||||||
|
|
||||||
|
const getTimeNoticeListData = async () => {
|
||||||
|
const res = await getTimeNoticeList();
|
||||||
|
if (res && res.code === 0) {
|
||||||
|
bannerList.value = res.data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
getTimeNoticeListData();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const clickItem = (item) => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/ChatMain/NoticeMessage/detail?noticeData=${encodeURIComponent(JSON.stringify(item))}`
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.bg-image {
|
.swiper {
|
||||||
width: 140px;
|
height: 50px;
|
||||||
height: 96px;
|
margin-top: 8px;
|
||||||
}
|
}
|
||||||
.mr-110 {
|
|
||||||
margin-right: 110px;
|
.swiper-item {
|
||||||
|
display: block;
|
||||||
|
height: 46px;
|
||||||
|
background: #fffbeb;
|
||||||
|
box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.05);
|
||||||
|
border-radius: 12px;
|
||||||
|
border: 2px solid #fef3c7;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.underline-text {
|
||||||
|
text-decoration: underline;
|
||||||
|
text-decoration-color: #b45309;
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 178 KiB |
21
src/pages/ChatModule/ZModuleBase/index.vue
Normal file
21
src/pages/ChatModule/ZModuleBase/index.vue
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<template>
|
||||||
|
<view class="container w-full border-box border-ff overflow-hidden rounded-24 flex flex-col">
|
||||||
|
<!-- 占位撑开 -->
|
||||||
|
<view class="w-vw"></view>
|
||||||
|
<view class="flex flex-col m-4 border-box rounded-24">
|
||||||
|
<slot name="content"></slot>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
.container {
|
||||||
|
background: rgba(255, 255, 255, 0.2);
|
||||||
|
box-shadow: 0px 9px 34px 0px rgba(27, 9, 91, 0.07);
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
12
src/pages/ChatModule/ZModuleC01/index.vue
Normal file
12
src/pages/ChatModule/ZModuleC01/index.vue
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<template>
|
||||||
|
<ZModuleBase>
|
||||||
|
<template #content >
|
||||||
|
灌灌灌灌灌滚滚滚
|
||||||
|
</template>
|
||||||
|
</ZModuleBase>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import ZModuleBase from "../ZModuleBase/index.vue";
|
||||||
|
|
||||||
|
</script>
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
<view class="card-title ellipsis-1">
|
<view class="card-title ellipsis-1">
|
||||||
{{ slot.item.title }}
|
{{ slot.item.title }}
|
||||||
</view>
|
</view>
|
||||||
<view v-if="slot.item.subTitle" class="card-desc ellipsis-2">
|
<view v-if="slot.item.subTitle" class="card-desc ellipsis-1">
|
||||||
{{ slot.item.subTitle }}
|
{{ slot.item.subTitle }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -29,10 +29,12 @@ import CardSwiper from "./components/CardSwiper/index.vue";
|
|||||||
import QuickQuestions from "./components/QuickQuestions/index.vue";
|
import QuickQuestions from "./components/QuickQuestions/index.vue";
|
||||||
import discoveryCover from "@/components/ImageSwiper/images/2025-07-12_180248.jpg";
|
import discoveryCover from "@/components/ImageSwiper/images/2025-07-12_180248.jpg";
|
||||||
|
|
||||||
import { homeTabsData, homeTabContentData, homeQuickQuestionData } from "../../request/api/MainPageDataApi";
|
import { homeTabsData, getNearbyTags, homeTabContentData, homeQuickQuestionData } from "../../request/api/MainPageDataApi";
|
||||||
import { useAppStore } from "@/store";
|
import { useAppStore, useLocationStore } from "@/store";
|
||||||
import { JumpType } from "../../model/ChatModel";
|
import { JumpType } from "../../model/ChatModel";
|
||||||
|
|
||||||
const appStore = useAppStore();
|
const appStore = useAppStore();
|
||||||
|
const locationStore = useLocationStore();
|
||||||
/// 从个渠道获取如二维码
|
/// 从个渠道获取如二维码
|
||||||
const sceneId = appStore.sceneId || "";
|
const sceneId = appStore.sceneId || "";
|
||||||
|
|
||||||
@@ -58,15 +60,20 @@ const queryTabsList = async () => {
|
|||||||
}));
|
}));
|
||||||
/// 设置tab数据
|
/// 设置tab数据
|
||||||
discoveryTabs.value = tabList;
|
discoveryTabs.value = tabList;
|
||||||
|
/// 根据sceneId查询对应tab数据
|
||||||
/// 查询是否有sceneId参数
|
findTabByIdWithActiveTabIndex(sceneId);
|
||||||
const activeTabIndex = discoveryTabs.value.findIndex((tab) => tab.id === sceneId);
|
}
|
||||||
|
}
|
||||||
/// 如果有则优先展示对应tab数据,没有则展示第一个tab数据
|
/// 根据id查询tab并设置activeIndex
|
||||||
if (activeTabIndex > -1) {
|
const findTabByIdWithActiveTabIndex = (tabsId) => {
|
||||||
activeIndex.value = activeTabIndex;
|
/// 查询是否有id参数
|
||||||
queryDiscoveryData(sceneId);
|
const activeTabIndex = discoveryTabs.value.findIndex((tab) => tab.id === tabsId);
|
||||||
} else {
|
/// 如果有则优先展示对应tab数据,没有则展示第一个tab数据
|
||||||
|
if (activeTabIndex > -1) {
|
||||||
|
activeIndex.value = activeTabIndex;
|
||||||
|
queryDiscoveryData(tabsId);
|
||||||
|
} else {
|
||||||
|
if (discoveryTabs.value.length > 0) {
|
||||||
activeIndex.value = 0;
|
activeIndex.value = 0;
|
||||||
queryDiscoveryData(discoveryTabs.value[0].id);
|
queryDiscoveryData(discoveryTabs.value[0].id);
|
||||||
}
|
}
|
||||||
@@ -145,10 +152,37 @@ const handleClick = async (item) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 获取位置信息
|
||||||
|
const getLocation = () => {
|
||||||
|
/// 已经有sceneId了,说明之前已经获取过位置信息了,就不需要再获取一次了
|
||||||
|
if (sceneId) return;
|
||||||
|
uni.getLocation({
|
||||||
|
type: 'wgs84',
|
||||||
|
success: function (res) {
|
||||||
|
// 将位置信息存储到 Pinia 中
|
||||||
|
locationStore.setLocationData({
|
||||||
|
latitude: res.latitude,
|
||||||
|
longitude: res.longitude,
|
||||||
|
});
|
||||||
|
console.log('当前位置:' + JSON.stringify(res));
|
||||||
|
getNearbyTagsData();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/// 获取附近标签数据
|
||||||
|
const getNearbyTagsData = async () => {
|
||||||
|
const res = await getNearbyTags();
|
||||||
|
if (res.code === 0) {
|
||||||
|
const nearbyTagId = res.data;
|
||||||
|
findTabByIdWithActiveTabIndex(nearbyTagId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// 组件挂载后请求数据
|
/// 组件挂载后请求数据
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
queryTabsList();
|
queryTabsList();
|
||||||
|
getLocation();
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { onLoad } from "@dcloudio/uni-app";
|
import { onLoad } from "@dcloudio/uni-app";
|
||||||
import { ref, onUnmounted } from "vue";
|
import { ref, onUnmounted, onMounted } from "vue";
|
||||||
import { getUrlParams } from "@/utils/UrlParams";
|
import { getUrlParams } from "@/utils/UrlParams";
|
||||||
import { useAppStore } from "@/store";
|
import { useAppStore } from "@/store";
|
||||||
import { checkToken } from "@/hooks/useGoLogin";
|
import { checkToken } from "@/hooks/useGoLogin";
|
||||||
@@ -31,7 +31,7 @@ import DrawerSection from "../DrawerSection/index.vue";
|
|||||||
import Calender from "@/components/Calender/index.vue";
|
import Calender from "@/components/Calender/index.vue";
|
||||||
|
|
||||||
const appStore = useAppStore();
|
const appStore = useAppStore();
|
||||||
|
const locationStore = useLocationStore();
|
||||||
const calendarVisible = ref(false);
|
const calendarVisible = ref(false);
|
||||||
const selectedDate = ref("");
|
const selectedDate = ref("");
|
||||||
|
|
||||||
@@ -52,14 +52,6 @@ uni.$on("openCalendar", () => {
|
|||||||
calendarVisible.value = true;
|
calendarVisible.value = true;
|
||||||
});
|
});
|
||||||
|
|
||||||
const getWeixinMiniProgramParams = (e) => {
|
|
||||||
console.log("Params:", e);
|
|
||||||
if (e.q && e.q != "undefined") {
|
|
||||||
const qrUrl = decodeURIComponent(e.q); // 获取到二维码原始链接内容
|
|
||||||
const params = getUrlParams(qrUrl);
|
|
||||||
appStore.setSceneId(params.sceneId || params.tagId);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// 打开窗口
|
// 打开窗口
|
||||||
const drawerRef = ref(null);
|
const drawerRef = ref(null);
|
||||||
@@ -68,19 +60,32 @@ const showDrawer = async (e) => {
|
|||||||
|
|
||||||
drawerRef.value.open();
|
drawerRef.value.open();
|
||||||
};
|
};
|
||||||
|
|
||||||
uni.$on("SHOW_DRAWER", showDrawer);
|
uni.$on("SHOW_DRAWER", showDrawer);
|
||||||
|
|
||||||
// 关闭窗口
|
// 关闭窗口
|
||||||
const closeDrawer = (e) => drawerRef.value.close();
|
const closeDrawer = (e) => drawerRef.value.close();
|
||||||
|
|
||||||
|
///获取到二维码原始链接内容
|
||||||
|
const getWeixinMiniProgramParams = (e) => {
|
||||||
|
console.log("Params:", e);
|
||||||
|
if (e.q && e.q != "undefined") {
|
||||||
|
const qrUrl = decodeURIComponent(e.q);
|
||||||
|
const params = getUrlParams(qrUrl);
|
||||||
|
appStore.setSceneId(params.sceneId || params.tagId);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
onLoad((e) => {
|
onLoad((e) => {
|
||||||
getWeixinMiniProgramParams(e);
|
getWeixinMiniProgramParams(e);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
// uni.$off('openCalendar')
|
// uni.$off('openCalendar')
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|||||||
@@ -10,6 +10,21 @@ function homeTabContentData(args) {
|
|||||||
return request.post("/hotelBiz/mainScene/queryContentListWithCache", args);
|
return request.post("/hotelBiz/mainScene/queryContentListWithCache", args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 获取距离用户最近的标签
|
||||||
|
function getNearbyTags(args) {
|
||||||
|
return request.get("/hotelBiz/mainScene/nearestTag", args);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// 获取本地天气
|
||||||
|
function getLocalWeather(args) {
|
||||||
|
return request.get("/hotelBiz/mainScene/getLocalWeather", args);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// 获取时间公告列表
|
||||||
|
function getTimeNoticeList(args) {
|
||||||
|
return request.get("/hotelBiz/mainScene/eventList", args);
|
||||||
|
}
|
||||||
|
|
||||||
/// 快速问题列表
|
/// 快速问题列表
|
||||||
function homeQuickQuestionData(args) {
|
function homeQuickQuestionData(args) {
|
||||||
return request.post("/hotelBiz/mainScene/queryQuickQuestionListWithCache", args);
|
return request.post("/hotelBiz/mainScene/queryQuickQuestionListWithCache", args);
|
||||||
@@ -34,6 +49,9 @@ function discoveryCradComponent() {
|
|||||||
export {
|
export {
|
||||||
homeTabsData,
|
homeTabsData,
|
||||||
homeTabContentData,
|
homeTabContentData,
|
||||||
|
getNearbyTags,
|
||||||
|
getLocalWeather,
|
||||||
|
getTimeNoticeList,
|
||||||
homeQuickQuestionData,
|
homeQuickQuestionData,
|
||||||
mainPageData,
|
mainPageData,
|
||||||
quickBookingComponent,
|
quickBookingComponent,
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
import { getCurrentConfig } from "@/constant/base";
|
import { getCurrentConfig } from "@/constant/base";
|
||||||
import { useAppStore } from "@/store";
|
import { useAppStore, useLocationStore } from "@/store";
|
||||||
import { NOTICE_EVENT_LOGOUT } from "@/constant/constant";
|
import { NOTICE_EVENT_LOGOUT } from "@/constant/constant";
|
||||||
import { getAccessToken } from "@/constant/token";
|
import { getAccessToken, removeAccessToken } from "@/constant/token";
|
||||||
import { goLogin } from "../../hooks/useGoLogin";
|
import { goLogin } from "../../hooks/useGoLogin";
|
||||||
|
|
||||||
const clientId = getCurrentConfig().clientId;
|
const clientId = getCurrentConfig().clientId;
|
||||||
const defaultConfig = {
|
const defaultConfig = {
|
||||||
header: {
|
header: {
|
||||||
Authorization: "", // 可在此动态设置 token
|
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
|
Authorization: "", // 可在此动态设置 token
|
||||||
clientId: clientId,
|
clientId: clientId,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@@ -19,6 +19,17 @@ function request(url, args = {}, method = "POST", customConfig = {}) {
|
|||||||
if (!/^http/.test(url)) {
|
if (!/^http/.test(url)) {
|
||||||
url = appStore.serverConfig?.baseUrl + url;
|
url = appStore.serverConfig?.baseUrl + url;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取位置信息并添加到请求头
|
||||||
|
const locationStore = useLocationStore();
|
||||||
|
if (locationStore.latitude && locationStore.longitude) {
|
||||||
|
customConfig.header = {
|
||||||
|
...customConfig.header,
|
||||||
|
"X-Latitude": locationStore.latitude,
|
||||||
|
"X-Longitude": locationStore.longitude
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
// 动态获取 token
|
// 动态获取 token
|
||||||
const token = getAccessToken();
|
const token = getAccessToken();
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,10 @@
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.h-1 {
|
||||||
|
height: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
.h-8 {
|
.h-8 {
|
||||||
height: 8px;
|
height: 8px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import { useAppStore } from "./app";
|
import { useAppStore } from "./app";
|
||||||
import { useSelectedDateStore } from "./selectedDate";
|
import { useSelectedDateStore } from "./selectedDate";
|
||||||
import { usePictureStore } from "./picture";
|
import { usePictureStore } from "./picture";
|
||||||
|
import { useLocationStore } from "./location";
|
||||||
|
|
||||||
export { useAppStore, useSelectedDateStore, usePictureStore };
|
export { useAppStore, useSelectedDateStore, usePictureStore, useLocationStore };
|
||||||
19
src/store/modules/location.js
Normal file
19
src/store/modules/location.js
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
import { defineStore } from "pinia";
|
||||||
|
|
||||||
|
export const useLocationStore = defineStore("location", {
|
||||||
|
state() {
|
||||||
|
return {
|
||||||
|
latitude: 0, // 纬度
|
||||||
|
longitude: 0, // 经度
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
|
actions: {
|
||||||
|
setLocationData(data) {
|
||||||
|
this.latitude = data.latitude;
|
||||||
|
this.longitude = data.longitude;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
unistorage: true,
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user