Compare commits
23 Commits
V1.0.3
...
df8a7f4de7
| Author | SHA1 | Date | |
|---|---|---|---|
| df8a7f4de7 | |||
| 9cfde3f10a | |||
| 685c6d0910 | |||
| 03231e611c | |||
| e917befe02 | |||
| 4e92ec2000 | |||
| 2da15786c8 | |||
| 8e27c27abf | |||
| 76ead609d5 | |||
| 521a0bf4b3 | |||
|
|
2d3cd6796e | ||
| e383bbbcf0 | |||
| 6f879a0bc8 | |||
| d78368b4ec | |||
| 226ddf8305 | |||
| 98c1d50ca5 | |||
| 8211e0b91b | |||
| 17a05aab4c | |||
| ff9227c3b8 | |||
| 5aba9afdd5 | |||
| 0351bd8dc6 | |||
| 3b8e604853 | |||
| fbb19c4603 |
@@ -1,19 +1,21 @@
|
||||
{
|
||||
"zhinian": {
|
||||
"clientId": "6",
|
||||
"clientId": "8",
|
||||
"appId": "wx5e79df5996572539",
|
||||
"name": "智念",
|
||||
"placeholder": "快告诉智念您在想什么~",
|
||||
"loginDesc": "您好,欢迎来到智念科技",
|
||||
"logo": "https://oss.nianxx.cn/mp/static/version_101/login/dh_logo.png",
|
||||
"ipLargeImage": "https://oss.nianxx.cn/mp/static/version_101/dh/dh_large.png",
|
||||
"ipLargeImage": "https://oss.nianxx.cn/mp/static/version_101/zn/zn_large.png",
|
||||
"ipLargeImageWidth": 395,
|
||||
"ipLargeImageHeight": 335,
|
||||
"ipLargeTotalFrames": 71,
|
||||
"ipLargeColumns": 1,
|
||||
"ipSmallImage": "https://oss.nianxx.cn/mp/static/version_101/dh/dh_small.png",
|
||||
"ipLargeImageHeight": 19687,
|
||||
"ipSmallImageHeight": 3744,
|
||||
"ipLargeImageStep": 147,
|
||||
"ipSmallImageStep": 117,
|
||||
"ipLargeTime": 4,
|
||||
"ipSmallTime": 4
|
||||
"ipSmallImageWidth": 128,
|
||||
"ipSmallImageHeight": 128,
|
||||
"ipSmallTotalFrames": 117,
|
||||
"ipSmallColumns": 1
|
||||
},
|
||||
"duohua": {
|
||||
"clientId": "2",
|
||||
@@ -23,13 +25,15 @@
|
||||
"loginDesc": "您好,欢迎来到朵花温泉",
|
||||
"logo": "https://oss.nianxx.cn/mp/static/version_101/login/dh_logo.png",
|
||||
"ipLargeImage": "https://oss.nianxx.cn/mp/static/version_101/dh/dh_large.png",
|
||||
"ipLargeImageWidth": 263,
|
||||
"ipLargeImageHeight": 210,
|
||||
"ipLargeTotalFrames": 147,
|
||||
"ipLargeColumns": 1,
|
||||
"ipSmallImage": "https://oss.nianxx.cn/mp/static/version_101/dh/dh_small.png",
|
||||
"ipLargeImageHeight": 19687,
|
||||
"ipSmallImageHeight": 3744,
|
||||
"ipLargeImageStep": 147,
|
||||
"ipSmallImageStep": 117,
|
||||
"ipLargeTime": 4,
|
||||
"ipSmallTime": 4
|
||||
"ipSmallImageWidth": 128,
|
||||
"ipSmallImageHeight": 128,
|
||||
"ipSmallTotalFrames": 117,
|
||||
"ipSmallColumns": 1
|
||||
},
|
||||
"tianmu": {
|
||||
"clientId": "4",
|
||||
@@ -39,12 +43,14 @@
|
||||
"loginDesc": "您好,欢迎来到天沐温泉",
|
||||
"logo": "https://oss.nianxx.cn/mp/static/version_101/login/tm_logo.png",
|
||||
"ipLargeImage": "https://oss.nianxx.cn/mp/static/version_101/tm/tm_large.png",
|
||||
"ipLargeImageWidth": 395,
|
||||
"ipLargeImageHeight": 335,
|
||||
"ipLargeTotalFrames": 71,
|
||||
"ipLargeColumns": 1,
|
||||
"ipSmallImage": "https://oss.nianxx.cn/mp/static/version_101/tm/tm_small.png",
|
||||
"ipLargeImageHeight": 9514,
|
||||
"ipSmallImageHeight": 4736,
|
||||
"ipLargeImageStep": 71,
|
||||
"ipSmallImageStep": 148,
|
||||
"ipLargeTime": 4,
|
||||
"ipSmallTime": 6
|
||||
"ipSmallImageWidth": 128,
|
||||
"ipSmallImageHeight": 128,
|
||||
"ipSmallTotalFrames": 148,
|
||||
"ipSmallColumns": 1
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
<script setup>
|
||||
import { onLaunch, onShow, onHide } from "@dcloudio/uni-app";
|
||||
import { getEvnUrl } from "@/request/api/config";
|
||||
import { getEvnUrl } from "@/request/base/config";
|
||||
import { refreshToken } from "@/hooks/useGoLogin";
|
||||
import { getAccessToken } from "@/constant/token";
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
class="w-full bg-white border-box border-ff overflow-hidden rounded-20"
|
||||
>
|
||||
<view
|
||||
class="border-box order-header w-vw flex flex-items-center flex-justify-between bg-EEF8FF"
|
||||
class="border-box order-header w-vw flex flex-items-center flex-justify-between bg-theme-color-50"
|
||||
>
|
||||
<text class="font-size-18 font-500 color-171717 text-left ml-12">
|
||||
{{ isCallSuccess ? "服务已创建" : "呼叫服务" }}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
</text>
|
||||
</view>
|
||||
<view class="flex flex-items-center" v-if="showBtn" @click="emit('click')">
|
||||
<text class="font-size-12 color-2D91FF line-height-16">房间详情</text>
|
||||
<text class="font-size-12 theme-color-500 line-height-16">房间详情</text>
|
||||
<uni-icons type="right" size="15" color="#99A0AE" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
class="w-full bg-white border-box border-ff overflow-hidden rounded-20"
|
||||
>
|
||||
<view
|
||||
class="border-box order-header w-vw flex flex-items-center flex-justify-between bg-EEF8FF"
|
||||
class="border-box order-header w-vw flex flex-items-center flex-justify-between bg-theme-color-50"
|
||||
>
|
||||
<text class="font-size-18 font-500 color-171717 text-left ml-12">
|
||||
{{ isCallSuccess ? "反馈已创建" : "反馈意见" }}
|
||||
|
||||
112
src/components/Sprite/SpriteAnimator.vue
Normal file
112
src/components/Sprite/SpriteAnimator.vue
Normal file
@@ -0,0 +1,112 @@
|
||||
<template>
|
||||
<view class="sprite-animator" :style="spriteStyle" />
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed, ref, onMounted, onUnmounted } from 'vue'
|
||||
|
||||
const props = withDefaults(defineProps<{
|
||||
src: string
|
||||
frameWidth: number
|
||||
frameHeight: number
|
||||
totalFrames: number
|
||||
columns: number
|
||||
displayWidth: number
|
||||
fps?: number
|
||||
autoplay?: boolean
|
||||
loop?: boolean
|
||||
}>(), {
|
||||
fps: 12,
|
||||
autoplay: true,
|
||||
loop: true,
|
||||
})
|
||||
|
||||
/* JS 精确逐帧方案(使用 setInterval,确保整数偏移、无插值) */
|
||||
const currentFrame = ref(0)
|
||||
let intervalId: number | null = null
|
||||
|
||||
const play = () => {
|
||||
stop()
|
||||
const safeFps = Math.max(1, Math.floor(props.fps || 12))
|
||||
const durationPerFrame = 1000 / safeFps
|
||||
// 强制整数像素偏移,使用 setInterval 在各运行时更可靠
|
||||
const setter = (globalThis as any).setInterval || setInterval
|
||||
intervalId = setter(() => {
|
||||
const safeTotal = Math.max(1, Math.floor(props.totalFrames || 0))
|
||||
if (currentFrame.value >= safeTotal - 1) {
|
||||
if (props.loop) {
|
||||
currentFrame.value = 0
|
||||
} else {
|
||||
stop()
|
||||
return
|
||||
}
|
||||
} else {
|
||||
currentFrame.value++
|
||||
}
|
||||
}, durationPerFrame) as unknown as number
|
||||
}
|
||||
|
||||
const stop = () => {
|
||||
if (intervalId) {
|
||||
clearInterval(intervalId)
|
||||
intervalId = null
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
console.log('[SpriteAnimator] mounted', { autoplay: props.autoplay, fps: props.fps })
|
||||
if (props.autoplay) play()
|
||||
})
|
||||
|
||||
onUnmounted(() => stop())
|
||||
|
||||
const spriteStyle = computed(() => {
|
||||
const {
|
||||
src,
|
||||
frameWidth: rawFrameWidth,
|
||||
frameHeight: rawFrameHeight,
|
||||
totalFrames: rawTotalFrames,
|
||||
columns: rawColumns,
|
||||
} = props
|
||||
|
||||
const frameWidth = Math.max(1, Math.floor(rawFrameWidth || 0))
|
||||
const frameHeight = Math.max(1, Math.floor(rawFrameHeight || 0))
|
||||
const totalFrames = Math.max(1, Math.floor(rawTotalFrames || 0))
|
||||
let columns = Math.floor(Number(rawColumns) || 0)
|
||||
if (!columns || columns <= 0) columns = Math.min(1, totalFrames)
|
||||
columns = Math.min(columns, totalFrames)
|
||||
|
||||
const displayWidth = props.displayWidth || frameWidth
|
||||
|
||||
const rows = Math.ceil(totalFrames / columns)
|
||||
const imageWidth = columns * frameWidth
|
||||
const imageHeight = rows * frameHeight
|
||||
|
||||
const scale = displayWidth / frameWidth
|
||||
const displayHeight = Math.round(frameHeight * scale)
|
||||
|
||||
const scaledImageWidth = Math.round(imageWidth * scale)
|
||||
const scaledImageHeight = Math.round(imageHeight * scale)
|
||||
|
||||
if (currentFrame.value < 0) currentFrame.value = 0
|
||||
if (currentFrame.value >= totalFrames) currentFrame.value = totalFrames - 1
|
||||
const col = currentFrame.value % columns
|
||||
const row = Math.floor(currentFrame.value / columns)
|
||||
|
||||
const offsetX = Math.round(col * frameWidth * scale)
|
||||
const offsetY = Math.round(row * frameHeight * scale)
|
||||
|
||||
const styleStr = `width: ${Math.round(displayWidth)}px; height: ${displayHeight}px; background-image: url("${src}"); background-repeat: no-repeat; background-size: ${scaledImageWidth}px ${scaledImageHeight}px; background-position: -${offsetX}px -${offsetY}px;`
|
||||
return styleStr as any
|
||||
})
|
||||
|
||||
// 对外暴露
|
||||
defineExpose({ play, stop, currentFrame })
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.sprite-animator {
|
||||
display: block;
|
||||
will-change: background-position;
|
||||
}
|
||||
</style>
|
||||
47
src/components/SurveyQuestionnaire/index.vue
Normal file
47
src/components/SurveyQuestionnaire/index.vue
Normal file
@@ -0,0 +1,47 @@
|
||||
<template>
|
||||
<view class="survey-questionnaire w-vw-24">
|
||||
<view class="bg-white border-box border-ff overflow-hidden rounded-20">
|
||||
<view class="border-box flex flex-items-center flex-justify-between bg-theme-color-50">
|
||||
<text class="font-size-18 font-500 color-171717 text-left ml-12">
|
||||
调查问卷
|
||||
</text>
|
||||
<image class="w-102 h-72" :src="surveyData.logoUrl" mode="widthFix" />
|
||||
</view>
|
||||
|
||||
<image class="w-full" :src="surveyData.bannerUrl" mode="widthFix" />
|
||||
|
||||
<view class="h-44 m-12 rounded-50 bg-button color-white flex flex-items-center flex-justify-center"
|
||||
@click="handleCall">
|
||||
前往填写
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getAccessToken } from "@/constant/token";
|
||||
import { defineProps, computed } from "vue";
|
||||
import { navigateTo } from "../../router";
|
||||
|
||||
const props = defineProps({
|
||||
toolCall: {
|
||||
type: Object,
|
||||
default: {},
|
||||
},
|
||||
});
|
||||
|
||||
const surveyData = computed(() => {
|
||||
if (props.toolCall?.data) {
|
||||
return JSON.parse(props.toolCall?.data);
|
||||
} else {
|
||||
return {};
|
||||
}
|
||||
});
|
||||
|
||||
const handleCall = () => {
|
||||
const token = getAccessToken();
|
||||
navigateTo(surveyData.value.jumpUrl, { token: token });
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
@@ -1,7 +1,7 @@
|
||||
// TopNavBar 组件样式
|
||||
.top-nav-bar {
|
||||
width: 100%;
|
||||
background-color: #d9eeff;
|
||||
background-color: $theme-color-100;
|
||||
|
||||
&--fixed {
|
||||
position: fixed;
|
||||
|
||||
@@ -7,13 +7,6 @@ export const MessageRole = {
|
||||
OTHER: "OTHER",
|
||||
};
|
||||
|
||||
export const MessageType = {
|
||||
// 文本消息
|
||||
TEXT: "TEXT",
|
||||
// 图片消息
|
||||
IMAGE: "IMAGE",
|
||||
};
|
||||
|
||||
/// 组件的名称
|
||||
export const CompName = {
|
||||
// 快速预定卡片
|
||||
@@ -28,6 +21,8 @@ export const CompName = {
|
||||
pictureAndCommodityCard: "pictureAndCommodityCard",
|
||||
// 输入车牌卡片
|
||||
enterLicensePlateCard: "enterLicensePlateCard",
|
||||
// 调查问卷卡片
|
||||
callSurveyQuestionnaire: "callSurveyQuestionnaire",
|
||||
};
|
||||
|
||||
/// 发送的指令类型
|
||||
|
||||
@@ -1,40 +1,27 @@
|
||||
<template>
|
||||
<view class="bg-white rounded-12 overflow-hidden mb-12">
|
||||
<view class="flex flex-items-center border-box p-12 border-bottom">
|
||||
<view class="font-size-16 font-500 color-000 line-height-24 flex-full"
|
||||
>入住信息</view
|
||||
>
|
||||
<view class="font-size-16 font-500 color-000 line-height-24 flex-full">入住信息</view>
|
||||
<view class="right">
|
||||
<Stepper v-model="count" unit="间" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="border-box pl-12 pr-12">
|
||||
<view
|
||||
class="border-box border-bottom pt-12 pb-12 flex flex-items-center"
|
||||
v-for="(item, index) in userFormList"
|
||||
:key="index"
|
||||
>
|
||||
<view class="border-box border-bottom pt-12 pb-12 flex flex-items-center" v-for="(item, index) in userFormList"
|
||||
:key="index">
|
||||
<view class="font-size-14 font-500 color-525866 mr-12"> 住客姓名 </view>
|
||||
<view class="right">
|
||||
<input
|
||||
class="border-box rounded-8 px-4 py-2 font-size-15 color-000 line-height-20"
|
||||
v-model.trim="item.visitorName"
|
||||
placeholder="请输入姓名"
|
||||
maxlength="11"
|
||||
/>
|
||||
<input class="border-box px-4 py-2 font-size-15 color-000 line-height-20" v-model.trim="item.visitorName"
|
||||
placeholder="请输入姓名" maxlength="11" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="flex flex-items-center border-box pt-12 pb-12">
|
||||
<view class="font-size-14 font-500 color-525866 mr-12"> 联系手机 </view>
|
||||
<view class="right">
|
||||
<input
|
||||
class="border-box rounded-8 px-4 py-2 font-size-15 color-000 line-height-20"
|
||||
v-model.trim="userFormList[0].contactPhone"
|
||||
placeholder="请输入联系手机"
|
||||
maxlength="11"
|
||||
/>
|
||||
<input class="border-box px-4 py-2 font-size-15 color-000 line-height-20"
|
||||
v-model.trim="userFormList[0].contactPhone" placeholder="请输入联系手机" maxlength="11" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<view class="booking h-screen flex flex-col">
|
||||
<TopNavBar
|
||||
titleAlign="center"
|
||||
backgroundColor="#D9EEFF"
|
||||
:backgroundColor="$theme-color-100"
|
||||
backIconColor="#000"
|
||||
:shadow="false"
|
||||
>
|
||||
@@ -53,7 +53,7 @@
|
||||
>
|
||||
<view class="flex flex-items-center">
|
||||
<text
|
||||
class="font-size-12 color-2D91FF line-height-16"
|
||||
class="font-size-12 theme-color-500 line-height-16"
|
||||
@click="refundVisible = true"
|
||||
>取消政策</text
|
||||
>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.booking {
|
||||
background: linear-gradient(180deg, #d9eeff 0%, #f5f7fa 100%) 0 86px / 100%
|
||||
background: linear-gradient(180deg, $theme-color-100 0%, #f5f7fa 100%) 0 86px / 100%
|
||||
100px no-repeat;
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
>
|
||||
<view class="color-525866">取消政策及说明</view>
|
||||
<view class="flex flex-items-center" @click="emit('click')">
|
||||
<text class="color-2D91FF mr-4">查看详情</text>
|
||||
<text class="theme-color-500 mr-4">查看详情</text>
|
||||
<uni-icons type="right" size="12" color="#99A0AE" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
'right border-none rounded-10 flex flex-full flex-items-center flex-justify-center font-size-14 font-500 color-white',
|
||||
{
|
||||
'bg-FF3D60': statusCode === '0',
|
||||
'bg-2D91FF': ['1', '2', '3', '4', '5', '6'].includes(statusCode),
|
||||
'theme-color-500': ['1', '2', '3', '4', '5', '6'].includes(statusCode),
|
||||
},
|
||||
]"
|
||||
@click="handleButtonClick(orderData)"
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
}
|
||||
|
||||
&.tag-4 {
|
||||
color: #2d91ff;
|
||||
color: $theme-color-500;
|
||||
}
|
||||
|
||||
&.tag-5 {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="order-detail-page flex flex-col h-screen">
|
||||
<TopNavBar titleAlign="center" background="#D9EEFF" title="订单详情" />
|
||||
<TopNavBar titleAlign="center" :background="$theme-color-100" title="订单详情" />
|
||||
|
||||
<view
|
||||
class="order-detail-wrapper border-box flex-full overflow-hidden scroll-y"
|
||||
|
||||
@@ -1,14 +1,8 @@
|
||||
<template>
|
||||
<z-paging
|
||||
bg-color="linear-gradient(180deg, #D9EEFF 0%, #F5F7FA 100%) 0 86px / 100% 100px no-repeat"
|
||||
ref="paging"
|
||||
v-model="dataList"
|
||||
use-virtual-list
|
||||
:force-close-inner-list="true"
|
||||
cell-height-mode="dynamic"
|
||||
safe-area-inset-bottom
|
||||
@query="queryList"
|
||||
>
|
||||
:bg-color="'linear-gradient(180deg, ' + $theme-color-100 + ' 0%, #F5F7FA 100%) 0 86px / 100% 100px no-repeat'"
|
||||
ref="paging" v-model="dataList" use-virtual-list :force-close-inner-list="true" cell-height-mode="dynamic"
|
||||
safe-area-inset-bottom @query="queryList">
|
||||
<template #top>
|
||||
<TopNavBar title="全部订单" />
|
||||
</template>
|
||||
@@ -17,12 +11,7 @@
|
||||
<CustomEmpty statusText="您暂无订单" />
|
||||
</template>
|
||||
|
||||
<OrderCard
|
||||
v-for="(item, index) in dataList"
|
||||
:key="item.id || index"
|
||||
:orderData="item"
|
||||
@click="handleOrderClick"
|
||||
/>
|
||||
<OrderCard v-for="(item, index) in dataList" :key="item.id || index" :orderData="item" @click="handleOrderClick" />
|
||||
</z-paging>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.order-detail-wrapper {
|
||||
background: linear-gradient(180deg, #d9eeff 0%, #f5f7fa 100%);
|
||||
background: linear-gradient(180deg, $theme-color-100 0%, #f5f7fa 100%);
|
||||
padding: 0 12px 40px;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<text class="font-size-12 line-height-16 color-99A0AE">
|
||||
/{{ item.stockUnitLabel }}
|
||||
</text>
|
||||
<text class="btn border-box rounded-10 color-white ml-16" @click.stop="handleBooking(item)">订</text>
|
||||
<text class="btn border-box rounded-10 color-white ml-16">订</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -63,7 +63,6 @@ const navigateToPage = (commodityId, path) => {
|
||||
|
||||
const handleClick = ({ commodityId }) => navigateToPage(commodityId, "/pages/goods/index")
|
||||
|
||||
const handleBooking = ({ commodityId }) => navigateToPage(commodityId, "/pages-booking/index")
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
@@ -1,30 +1,19 @@
|
||||
<template>
|
||||
<view class="tab-container relative">
|
||||
<view class="tab-wrapper flex flex-items-center flex-justify-center">
|
||||
<view
|
||||
v-for="(item, index) in tabList"
|
||||
:key="index"
|
||||
:class="[
|
||||
<view v-for="(item, index) in tabList" :key="index" :class="[
|
||||
'tab-item flex flex-full flex-items-center flex-justify-center relative',
|
||||
activeIndex === index && 'tab-item-active',
|
||||
]"
|
||||
@click="handleTabClick(index)"
|
||||
>
|
||||
]" @click="handleTabClick(index)">
|
||||
<view class="absolute flex flex-items-center">
|
||||
<uni-icons
|
||||
class="icon mr-4"
|
||||
fontFamily="znicons"
|
||||
size="20"
|
||||
:color="activeIndex === index ? '#2D91FF' : '#525866'"
|
||||
>
|
||||
<uni-icons class="icon mr-4" fontFamily="znicons" size="20"
|
||||
:color="activeIndex === index ? '$theme-color-500' : '#525866'">
|
||||
{{ zniconsMap[item.icon] }}
|
||||
</uni-icons>
|
||||
<text
|
||||
:class="[
|
||||
<text :class="[
|
||||
'font-size-16 font-500 color-525866 ',
|
||||
activeIndex === index && 'tab-text-active',
|
||||
]"
|
||||
>
|
||||
]">
|
||||
{{ item.label }}
|
||||
</text>
|
||||
</view>
|
||||
@@ -32,17 +21,14 @@
|
||||
</view>
|
||||
|
||||
<!-- 下划线指示器 -->
|
||||
<view
|
||||
:class="[
|
||||
<view :class="[
|
||||
'tab-indicator absolute',
|
||||
indicatorAnimating && 'animating',
|
||||
indicatorInitialized && 'initialized',
|
||||
]"
|
||||
:style="{
|
||||
]" :style="{
|
||||
left: indicatorLeft + 'px',
|
||||
width: indicatorWidth + 'px',
|
||||
}"
|
||||
></view>
|
||||
}"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.tab-wrapper {
|
||||
background-color: #d9eeff;
|
||||
background-color: $theme-color-100;
|
||||
height: 48px;
|
||||
}
|
||||
|
||||
@@ -24,19 +24,19 @@
|
||||
border-radius: 20px 20px 0 0;
|
||||
transform: perspective(40px) rotateX(6deg) translate(0, -1px);
|
||||
transform-origin: bottom bottom;
|
||||
box-shadow: 0 -0.5px 0 #2d91ff;
|
||||
box-shadow: 0 -0.5px 0 $theme-color-500;
|
||||
}
|
||||
}
|
||||
|
||||
.tab-text-active {
|
||||
color: #2d91ff;
|
||||
color: $theme-color-500;
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
.tab-indicator {
|
||||
bottom: 0;
|
||||
height: 3px;
|
||||
background-color: #2d91ff;
|
||||
background-color: $theme-color-500;
|
||||
border-radius: 4px 4px 0 0;
|
||||
transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1),
|
||||
width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
|
||||
@@ -1,23 +1,13 @@
|
||||
<template>
|
||||
<z-paging
|
||||
ref="paging"
|
||||
v-model="dataList"
|
||||
use-virtual-list
|
||||
:force-close-inner-list="true"
|
||||
cell-height-mode="dynamic"
|
||||
safe-area-inset-bottom
|
||||
@query="queryList"
|
||||
>
|
||||
<z-paging ref="paging" v-model="dataList" use-virtual-list :force-close-inner-list="true" cell-height-mode="dynamic"
|
||||
safe-area-inset-bottom @query="queryList">
|
||||
<template #top>
|
||||
<TopNavBar title="快速预定" />
|
||||
|
||||
<Tabs @change="handleTabChange" />
|
||||
|
||||
<!-- 选择入住、离店日期 -->
|
||||
<view
|
||||
class="bg-white border-box flex flex-items-center p-12"
|
||||
v-if="currentType === '0'"
|
||||
>
|
||||
<view class="bg-white border-box flex flex-items-center p-12" v-if="currentType === '0'">
|
||||
<view class="in flex flex-items-center">
|
||||
<text class="font-size-11 font-500 color-99A0AE mr-4">入住</text>
|
||||
<text class="font-size-14 font-500 color-171717">
|
||||
@@ -26,9 +16,7 @@
|
||||
</view>
|
||||
|
||||
<!-- 几晚 -->
|
||||
<text
|
||||
class="nights bg-E5E8EE border-box font-size-11 font-500 color-525866 rounded-50 ml-8 mr-8"
|
||||
>
|
||||
<text class="nights bg-E5E8EE border-box font-size-11 font-500 color-525866 rounded-50 ml-8 mr-8">
|
||||
{{ selectedDate.totalDays }}晚
|
||||
</text>
|
||||
|
||||
@@ -40,32 +28,16 @@
|
||||
</view>
|
||||
|
||||
<!-- 日期图标 -->
|
||||
<uni-icons
|
||||
class="ml-auto"
|
||||
type="calendar"
|
||||
size="24"
|
||||
color="#2D91FF"
|
||||
@click="calendarVisible = true"
|
||||
/>
|
||||
<uni-icons class="ml-auto" type="calendar" size="24" color="$theme-color-500" @click="calendarVisible = true" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<Card
|
||||
v-for="(item, index) in dataList"
|
||||
:key="index"
|
||||
:item="item"
|
||||
:selectedDate="selectedDate"
|
||||
/>
|
||||
<Card v-for="(item, index) in dataList" :key="index" :item="item" :selectedDate="selectedDate" />
|
||||
</z-paging>
|
||||
|
||||
<!-- 日历组件 -->
|
||||
<Calender
|
||||
:visible="calendarVisible"
|
||||
mode="range"
|
||||
:default-value="selectedDate"
|
||||
@close="handleCalendarClose"
|
||||
@range-select="handleDateSelect"
|
||||
/>
|
||||
<Calender :visible="calendarVisible" mode="range" :default-value="selectedDate" @close="handleCalendarClose"
|
||||
@range-select="handleDateSelect" />
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
|
||||
@@ -1,30 +1,18 @@
|
||||
<template>
|
||||
<z-paging
|
||||
bg-color="linear-gradient(180deg, #D9EEFF 0%, #F5F7FA 100%) 0 86px / 100% 100px no-repeat"
|
||||
ref="paging"
|
||||
v-model="dataList"
|
||||
use-virtual-list
|
||||
:force-close-inner-list="true"
|
||||
cell-height-mode="dynamic"
|
||||
safe-area-inset-bottom
|
||||
@query="queryList"
|
||||
>
|
||||
:bg-color="'linear-gradient(180deg, ' + $theme - color - 100 + ' 0%, #F5F7FA 100%) 0 86px / 100% 100px no-repeat'"
|
||||
ref="paging" v-model="dataList" use-virtual-list :force-close-inner-list="true" cell-height-mode="dynamic"
|
||||
safe-area-inset-bottom @query="queryList">
|
||||
<template #top>
|
||||
<TopNavBar title="呼叫服务" />
|
||||
</template>
|
||||
|
||||
<template #empty>
|
||||
<CustomEmpty
|
||||
emptyIcon="https://oss.nianxx.cn/mp/static/version_101/order/service_empty.png"
|
||||
statusText="您暂无呼叫服务"
|
||||
/>
|
||||
<CustomEmpty emptyIcon="https://oss.nianxx.cn/mp/static/version_101/order/service_empty.png"
|
||||
statusText="您暂无呼叫服务" />
|
||||
</template>
|
||||
|
||||
<OrderCard
|
||||
v-for="(item, index) in dataList"
|
||||
:key="item.id || index"
|
||||
:orderData="item"
|
||||
/>
|
||||
<OrderCard v-for="(item, index) in dataList" :key="item.id || index" :orderData="item" />
|
||||
</z-paging>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -23,6 +23,15 @@
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/webview/index",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"backgroundColor": "#FFFFFF",
|
||||
"navigationBarBackgroundColor": "#FFFFFF",
|
||||
"navigationBarTextStyle": "black"
|
||||
}
|
||||
}
|
||||
],
|
||||
"subPackages": [
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
#8afcf8 0%,
|
||||
rgba(138, 252, 248, 0) 100%
|
||||
),
|
||||
#2d91ff;
|
||||
$theme-color-500;
|
||||
}
|
||||
|
||||
.send-icon {
|
||||
|
||||
@@ -33,6 +33,9 @@
|
||||
<AddCarCrad v-else-if="
|
||||
item.toolCall.componentName === CompName.enterLicensePlateCard
|
||||
" :toolCall="item.toolCall" />
|
||||
<SurveyQuestionnaire v-else-if="
|
||||
item.toolCall.componentName === CompName.callSurveyQuestionnaire
|
||||
" :toolCall="item.toolCall" />
|
||||
</template>
|
||||
|
||||
<template #footer>
|
||||
@@ -82,7 +85,7 @@ import {
|
||||
NOTICE_EVENT_LOGOUT,
|
||||
NOTICE_EVENT_LOGIN_SUCCESS,
|
||||
} from "@/constant/constant";
|
||||
import { MessageRole, MessageType, CompName } from "@/model/ChatModel";
|
||||
import { MessageRole, CompName } from "@/model/ChatModel";
|
||||
import ChatTopWelcome from "../ChatTopWelcome/index.vue";
|
||||
import ChatTopNavBar from "../ChatTopNavBar/index.vue";
|
||||
import ChatCardAI from "../ChatCardAi/index.vue";
|
||||
@@ -99,6 +102,7 @@ import DetailCardCompontent from "../../module/DetailCardCompontent/index.vue";
|
||||
import CreateServiceOrder from "@/components/CreateServiceOrder/index.vue";
|
||||
import Feedback from "@/components/Feedback/index.vue";
|
||||
import AddCarCrad from "@/components/AddCarCrad/index.vue";
|
||||
import SurveyQuestionnaire from "@/components/SurveyQuestionnaire/index.vue";
|
||||
import { mainPageData } from "@/request/api/MainPageDataApi";
|
||||
import {
|
||||
conversationMsgList,
|
||||
@@ -144,7 +148,7 @@ const mainPageDataModel = ref({});
|
||||
// 会话进行中标志
|
||||
const isSessionActive = ref(false);
|
||||
/// 指令
|
||||
let commonType = "";
|
||||
let messageCommonType = "";
|
||||
|
||||
// WebSocket 相关
|
||||
let webSocketManager = null;
|
||||
@@ -234,7 +238,7 @@ const handleReplyText = (text) => {
|
||||
const handleReplyInstruct = async (item) => {
|
||||
await checkToken();
|
||||
|
||||
commonType = item.type;
|
||||
messageCommonType = item.type;
|
||||
// 重置消息状态,准备接收新的AI回复
|
||||
resetMessageState();
|
||||
sendMessage(item.title, true);
|
||||
@@ -608,10 +612,6 @@ const sendMessage = async (message, isInstruct = false) => {
|
||||
msgId: `msg_${chatMsgList.value.length}`,
|
||||
msgType: MessageRole.ME,
|
||||
msg: message,
|
||||
msgContent: {
|
||||
type: MessageType.TEXT,
|
||||
text: message,
|
||||
},
|
||||
};
|
||||
chatMsgList.value.push(newMsg);
|
||||
inputMessage.value = "";
|
||||
@@ -734,7 +734,7 @@ const sendChat = async (message, isInstruct = false) => {
|
||||
}
|
||||
|
||||
const messageType = isInstruct ? 1 : 0;
|
||||
const messageContent = isInstruct ? commonType : message;
|
||||
const messageContent = isInstruct ? messageCommonType : message;
|
||||
// 生成 messageId 并保存到当前会话变量(stopRequest 可能使用)
|
||||
currentSessionMessageId = IdUtils.generateMessageId();
|
||||
|
||||
@@ -744,10 +744,6 @@ const sendChat = async (message, isInstruct = false) => {
|
||||
msgType: MessageRole.AI,
|
||||
msg: "加载中",
|
||||
isLoading: true,
|
||||
msgContent: {
|
||||
type: MessageType.TEXT,
|
||||
url: "",
|
||||
},
|
||||
messageId: currentSessionMessageId,
|
||||
};
|
||||
chatMsgList.value.push(aiMsg);
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
@click="sendReply(item)">
|
||||
<view class="flex items-center justify-center">
|
||||
<image v-if="item.icon" class="icon" :src="item.icon" />
|
||||
<text class="font-size-14 color-2D91FF line-height-20">
|
||||
<text class="font-size-14 theme-color-500 line-height-20">
|
||||
{{ item.title }}
|
||||
</text>
|
||||
</view>
|
||||
|
||||
@@ -5,18 +5,14 @@
|
||||
<!-- 隐藏 -->
|
||||
<view class="flex-full h-full flex flex-items-center flex-justify-center">
|
||||
<!-- ChatTopWelcome不在可视区:显示并添加动画;在可视区:隐藏 -->
|
||||
<view
|
||||
v-show="show"
|
||||
:class="['w-32 h-32', { 'image-animated': show }]"
|
||||
:style="getStyle"
|
||||
></view>
|
||||
<text
|
||||
v-show="show"
|
||||
:class="[
|
||||
<SpriteAnimator v-show="show" class="image-animated" :src="spriteStyle.ipSmallImage"
|
||||
:frameWidth="spriteStyle.frameWidth" :frameHeight="spriteStyle.frameHeight"
|
||||
:totalFrames="spriteStyle.totalFrames" :columns="spriteStyle.columns" :displayWidth="spriteStyle.displayWidth"
|
||||
:fps="16" />
|
||||
<text v-show="show" :class="[
|
||||
'font-size-14 font-500 color-171717 ml-10',
|
||||
{ 'text-animated': show },
|
||||
]"
|
||||
>
|
||||
]">
|
||||
{{ config.name }}
|
||||
</text>
|
||||
</view>
|
||||
@@ -28,25 +24,33 @@
|
||||
<script setup>
|
||||
import { ref, defineProps, computed, defineExpose } from "vue";
|
||||
import { getCurrentConfig } from "@/constant/base";
|
||||
import SpriteAnimator from "@/components/Sprite/SpriteAnimator.vue";
|
||||
|
||||
const props = defineProps({
|
||||
mainPageDataModel: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
default: () => ({
|
||||
initPageImages: {},
|
||||
}),
|
||||
},
|
||||
});
|
||||
|
||||
const initPageImages = computed(() => {
|
||||
return props.mainPageDataModel?.initPageImages || {};
|
||||
});
|
||||
|
||||
const show = ref(false);
|
||||
const config = getCurrentConfig();
|
||||
const getStyle = computed(() => {
|
||||
|
||||
const spriteStyle = computed(() => {
|
||||
const images = initPageImages.value;
|
||||
return {
|
||||
"--ipSmallImageStep": config.ipSmallImageStep,
|
||||
"--ipSmallImageHeight": config.ipSmallImageHeight,
|
||||
"--ipSmallTime": config.ipSmallTime,
|
||||
backgroundImage: `url(${config.ipSmallImage})`,
|
||||
backgroundRepeat: "no-repeat",
|
||||
backgroundSize: "32px auto",
|
||||
backgroundPosition: "0 0",
|
||||
ipSmallImage: images.ipSmallImage ?? config.ipSmallImage,
|
||||
frameWidth: images.ipSmallImageWidth ?? config.ipSmallImageWidth,
|
||||
frameHeight: images.ipSmallImageHeight ?? config.ipSmallImageHeight,
|
||||
totalFrames: images.ipSmallTotalFrames ?? config.ipSmallTotalFrames,
|
||||
columns: images.ipSmallColumns ?? config.ipSmallColumns,
|
||||
displayWidth: 32,
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
@@ -1,30 +1,18 @@
|
||||
// 图片从0%到100%动画
|
||||
.image-animated {
|
||||
animation: logo-scale 0.3s ease-in-out,
|
||||
sprite-play calc(var(--ipSmallTime) * 1s) steps(var(--ipSmallImageStep))
|
||||
infinite;
|
||||
animation: logo-scale 0.3s ease-in-out;
|
||||
}
|
||||
|
||||
@keyframes logo-scale {
|
||||
0% {
|
||||
transform: scale(0);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: scale(1);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes sprite-play {
|
||||
0% {
|
||||
background-position: 0 0;
|
||||
}
|
||||
|
||||
100% {
|
||||
/* 117 帧 × 每帧高度约 32px,终点应为 -(117-1)*32 = -5421px */
|
||||
background-position: 0 calc(var(--ipSmallImageHeight) * -1px);
|
||||
}
|
||||
}
|
||||
|
||||
// 文字从0%到100%动画,从左到右
|
||||
.text-animated {
|
||||
animation: text-fade-in 0.3s ease-in-out;
|
||||
@@ -35,6 +23,7 @@
|
||||
opacity: 0;
|
||||
transform: translateX(-20px);
|
||||
}
|
||||
|
||||
100% {
|
||||
opacity: 1;
|
||||
transform: translateX(0);
|
||||
|
||||
@@ -2,13 +2,11 @@ v
|
||||
<template>
|
||||
<view class="welcome-content border-box p-12">
|
||||
<view class="wrap rounded-20">
|
||||
<view
|
||||
class="flex flex-items-center flex-justify-between border-box pl-12 pr-12"
|
||||
>
|
||||
<view class="ip" :style="getStyle"></view>
|
||||
<view
|
||||
class="welcome-text font-size-14 font-500 font-family-misans-vf color-171717 line-height-24"
|
||||
>
|
||||
<view class="flex flex-items-center flex-justify-between border-box pl-12 pr-12">
|
||||
<SpriteAnimator :src="spriteStyle.ipLargeImage" :frameWidth="spriteStyle.frameWidth"
|
||||
:frameHeight="spriteStyle.frameHeight" :totalFrames="spriteStyle.totalFrames" :columns="spriteStyle.columns"
|
||||
:displayWidth="spriteStyle.displayWidth" :fps="16" />
|
||||
<view class="welcome-text font-size-14 font-500 font-family-misans-vf color-171717 line-height-24">
|
||||
{{ welcomeContent }}
|
||||
</view>
|
||||
</view>
|
||||
@@ -22,6 +20,7 @@ v
|
||||
import { defineProps, computed, getCurrentInstance, defineExpose } from "vue";
|
||||
import { getCurrentConfig } from "@/constant/base";
|
||||
import ChatMoreTips from "../ChatMoreTips/index.vue";
|
||||
import SpriteAnimator from "@/components/Sprite/SpriteAnimator.vue";
|
||||
|
||||
const props = defineProps({
|
||||
mainPageDataModel: {
|
||||
@@ -49,19 +48,24 @@ const props = defineProps({
|
||||
},
|
||||
});
|
||||
|
||||
const getStyle = computed(() => {
|
||||
const config = getCurrentConfig();
|
||||
const initPageImages = computed(() => {
|
||||
return props.mainPageDataModel?.initPageImages || {};
|
||||
});
|
||||
|
||||
const config = getCurrentConfig();
|
||||
|
||||
const spriteStyle = computed(() => {
|
||||
const images = initPageImages.value;
|
||||
return {
|
||||
"--ipLargeImageStep": config.ipLargeImageStep,
|
||||
"--ipLargeImageHeight": config.ipLargeImageHeight,
|
||||
"--ipLargeTime": config.ipLargeTime,
|
||||
backgroundImage: `url(${config.ipLargeImage})`,
|
||||
backgroundRepeat: "no-repeat",
|
||||
backgroundSize: "158px auto",
|
||||
backgroundPosition: "0 0",
|
||||
ipLargeImage: images.ipLargeImage ?? config.ipLargeImage,
|
||||
frameWidth: images.ipLargeImageWidth ?? config.ipLargeImageWidth,
|
||||
frameHeight: images.ipLargeImageHeight ?? config.ipLargeImageHeight,
|
||||
totalFrames: images.ipLargeTotalFrames ?? config.ipLargeTotalFrames,
|
||||
columns: images.ipLargeColumns ?? config.ipLargeColumns,
|
||||
displayWidth: 158,
|
||||
};
|
||||
});
|
||||
|
||||
const welcomeContent = computed(() => props.mainPageDataModel.welcomeContent);
|
||||
const guideWords = computed(() => props.mainPageDataModel.guideWords);
|
||||
|
||||
|
||||
@@ -1,32 +1,3 @@
|
||||
.wrap {
|
||||
background-color: rgba(255, 255, 255, 0.5);
|
||||
}
|
||||
|
||||
.ip {
|
||||
position: relative;
|
||||
flex: 0 0 158px;
|
||||
width: 158px;
|
||||
height: 134px;
|
||||
animation: sprite-play calc(var(--ipLargeTime) * 1s)
|
||||
steps(var(--ipLargeImageStep)) infinite;
|
||||
&::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
background-color: #f9fcfd;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 3px;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes sprite-play {
|
||||
0% {
|
||||
background-position: 0 0;
|
||||
}
|
||||
|
||||
100% {
|
||||
/* 40 帧 × 每帧高度约 139px,终点应为 -(40-1)*139 = -5421px */
|
||||
background-position: 0 calc(var(--ipLargeImageHeight) * -1px);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,6 +18,6 @@
|
||||
}
|
||||
|
||||
.tag-text {
|
||||
color: #2d91ff; /* 蓝色文字,可根据设计调整 */
|
||||
color: $theme-color-500;
|
||||
font-size: $uni-font-size-base;
|
||||
}
|
||||
|
||||
@@ -2,16 +2,9 @@
|
||||
<view class="container">
|
||||
<ModuleTitle :title="recommendTheme.themeName" />
|
||||
<view class="container-scroll">
|
||||
<view
|
||||
v-for="(item, index) in recommendTheme.recommendPostsList"
|
||||
:key="index"
|
||||
>
|
||||
<view v-for="(item, index) in recommendTheme.recommendPostsList" :key="index">
|
||||
<view class="mk-card-item" @click="sendReply(item)">
|
||||
<image
|
||||
class="card-img"
|
||||
:src="item.coverPhoto"
|
||||
mode="widthFix"
|
||||
></image>
|
||||
<image class="card-img" :src="item.coverPhoto" mode="widthFix"></image>
|
||||
<text class="card-text">{{ item.topic }}</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -20,7 +13,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { SEND_MESSAGE_CONTENT_TEXT } from "@/constant/constant";
|
||||
import { SEND_MESSAGE_CONTENT_TEXT, SEND_MESSAGE_COMMAND_TYPE } from "@/constant/constant";
|
||||
import { defineProps } from "vue";
|
||||
import ModuleTitle from "@/components/ModuleTitle/index.vue";
|
||||
|
||||
@@ -32,8 +25,12 @@ const props = defineProps({
|
||||
});
|
||||
|
||||
const sendReply = (item) => {
|
||||
const topic = item.userInputContent || item.topic.replace(/^#/, "");
|
||||
uni.$emit(SEND_MESSAGE_CONTENT_TEXT, topic);
|
||||
if (item.userInputContentType && item.userInputContentType === '1') {
|
||||
const commonItem = { type: item.userInputContent, title: item.topic }
|
||||
uni.$emit(SEND_MESSAGE_COMMAND_TYPE, commonItem);
|
||||
return;
|
||||
}
|
||||
uni.$emit(SEND_MESSAGE_CONTENT_TEXT, item.userInputContent);
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
}
|
||||
|
||||
.right {
|
||||
background-color: #2d91ff;
|
||||
background-color: $theme-color-500;
|
||||
border-radius: 5px;
|
||||
padding: 6px;
|
||||
}
|
||||
|
||||
@@ -3,29 +3,18 @@
|
||||
<ModuleTitle :title="recommendTheme.themeName" />
|
||||
|
||||
<view class="container-scroll font-size-0 scroll-x whitespace-nowrap">
|
||||
<view
|
||||
class="card-item bg-white inline-block rounded-20 mr-8"
|
||||
v-for="(item, index) in recommendTheme.recommendPostsList"
|
||||
:key="index"
|
||||
@click="sendReply(item)"
|
||||
>
|
||||
<view class="card-item bg-white inline-block rounded-20 mr-8"
|
||||
v-for="(item, index) in recommendTheme.recommendPostsList" :key="index" @click="sendReply(item)">
|
||||
<view class="m-4 relative">
|
||||
<image
|
||||
class="card-img rounded-16 relative z-10"
|
||||
:src="item.coverPhoto"
|
||||
mode="aspectFill"
|
||||
/>
|
||||
<image class="card-img rounded-16 relative z-10" :src="item.coverPhoto" mode="aspectFill" />
|
||||
|
||||
<view class="shadow absolute rounded-16"></view>
|
||||
</view>
|
||||
|
||||
<view class="card-text border-box">
|
||||
<view class="color-171717 font-size-14 line-height-20 ellipsis-1">
|
||||
<view class="font-size-11 color-99A0AE ellipsis-1">
|
||||
{{ item.topic }}
|
||||
</view>
|
||||
<view class="font-size-11 color-99A0AE">
|
||||
{{ item.userInputContent }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -34,7 +23,7 @@
|
||||
|
||||
<script setup>
|
||||
import { defineProps } from "vue";
|
||||
import { SEND_MESSAGE_CONTENT_TEXT } from "@/constant/constant";
|
||||
import { SEND_MESSAGE_CONTENT_TEXT, SEND_MESSAGE_COMMAND_TYPE } from "@/constant/constant";
|
||||
import ModuleTitle from "@/components/ModuleTitle/index.vue";
|
||||
|
||||
const props = defineProps({
|
||||
@@ -45,8 +34,12 @@ const props = defineProps({
|
||||
});
|
||||
|
||||
const sendReply = (item) => {
|
||||
const topic = item.userInputContent || item.topic.replace(/^#/, "");
|
||||
uni.$emit(SEND_MESSAGE_CONTENT_TEXT, topic);
|
||||
if (item.userInputContentType && item.userInputContentType === '1') {
|
||||
const commonItem = { type: item.userInputContent, title: item.topic }
|
||||
uni.$emit(SEND_MESSAGE_COMMAND_TYPE, commonItem);
|
||||
return;
|
||||
}
|
||||
uni.$emit(SEND_MESSAGE_CONTENT_TEXT, item.userInputContent);
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
<view class="login-agreement flex flex-items-center">
|
||||
<CheckBox v-model="isAgree">
|
||||
<text class="font-size-12 color-525866">我已阅读并同意</text>
|
||||
<text class="font-size-12 color-2D91FF ml-4 mr-4" @click.stop="handleAgreeClick('service')">《服务协议》</text>
|
||||
<text class="font-size-12 theme-color-500 ml-4 mr-4" @click.stop="handleAgreeClick('service')">《服务协议》</text>
|
||||
<text class="font-size-12 color-525866">和</text>
|
||||
<text class="font-size-12 color-2D91FF ml-4 mr-4" @click.stop="handleAgreeClick('privacy')">《隐私协议》</text>
|
||||
<text class="font-size-12 theme-color-500 ml-4 mr-4" @click.stop="handleAgreeClick('privacy')">《隐私协议》</text>
|
||||
<text class="font-size-12 color-525866">,\n</text>
|
||||
<text class="font-size-12 color-525866 ml-30">授权与账号关联操作</text>
|
||||
</CheckBox>
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
width: 304px;
|
||||
|
||||
.login-btn {
|
||||
background: #2d91ff;
|
||||
background: $theme-color-500;
|
||||
width: 100%;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
@@ -1,26 +1,14 @@
|
||||
<template>
|
||||
<view class="webview">
|
||||
<!-- 使用 NavBar 组件 -->
|
||||
<TopNavBar title="网页浏览" @back="goBack" />
|
||||
|
||||
<!-- WebView 内容区域 -->
|
||||
<view class="webview-content">
|
||||
<web-view :src="webviewUrl"></web-view>
|
||||
</view>
|
||||
<view>
|
||||
<web-view :src="webviewUrl" @message="handleH5Message"></web-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, onMounted } from "vue";
|
||||
import TopNavBar from "@/components/TopNavBar/index.vue";
|
||||
|
||||
const webviewUrl = ref("");
|
||||
|
||||
// 返回上一页
|
||||
const goBack = () => {
|
||||
uni.navigateBack();
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
// 获取页面参数
|
||||
const pages = getCurrentPages();
|
||||
@@ -33,24 +21,26 @@ onMounted(() => {
|
||||
webviewUrl.value = decodeURIComponent(options.url);
|
||||
}
|
||||
});
|
||||
|
||||
const handleH5Message = (event) => {
|
||||
const messageData = event.detail.data[0];
|
||||
console.log("Received message from H5:", messageData);
|
||||
// 根据需要处理H5传递过来的消息
|
||||
const action = messageData.action;
|
||||
|
||||
switch (action) {
|
||||
case "navigateBack":
|
||||
uni.navigateBack();
|
||||
break;
|
||||
case "navigateTo":
|
||||
|
||||
break
|
||||
default:
|
||||
console.log("Unknown action:", action);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.webview {
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.webview-content {
|
||||
flex: 1;
|
||||
margin-top: calc(44px + var(--status-bar-height));
|
||||
}
|
||||
|
||||
.webview-content {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
<style lang="scss" scoped></style>
|
||||
|
||||
13
src/request/api/GetServiceUrlApi.js
Normal file
13
src/request/api/GetServiceUrlApi.js
Normal file
@@ -0,0 +1,13 @@
|
||||
import request from "../base/request";
|
||||
import { proUrl } from "../base/baseUrl";
|
||||
import { useAppStore } from "@/store";
|
||||
|
||||
export const getServiceUrl = async (versionValue) => {
|
||||
const apiUrl = proUrl + "/hotelBiz/mainScene/getServiceUrl";
|
||||
const res = await request.post(apiUrl, { versionValue: versionValue });
|
||||
if (res && res.code == 0 && res.data) {
|
||||
const appStore = useAppStore();
|
||||
appStore.setServerConfig(res.data);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,15 +1,18 @@
|
||||
import request from "../base/request";
|
||||
import { isZhiNian } from "@/constant/base";
|
||||
import { useAppStore } from "@/store";
|
||||
import { devUrl, proUrl, wssDevUrl } from "../base/baseUrl";
|
||||
import { devUrl, wssDevUrl } from "./baseUrl";
|
||||
import { getServiceUrl } from "../api/GetServiceUrlApi";
|
||||
|
||||
/// 版本号, 每次发版本前增加
|
||||
const versionValue = "1.0.3";
|
||||
const versionValue = "1.0.4";
|
||||
|
||||
/// 是否是测试版本, 测试版本为true, 发布版本为false
|
||||
const developVersion = false;
|
||||
|
||||
// 获取服务地址
|
||||
const getEvnUrl = async () => {
|
||||
/// 智念客户端不需要获取环境地址
|
||||
if (isZhiNian) {
|
||||
if (isZhiNian || developVersion) {
|
||||
const appStore = useAppStore();
|
||||
appStore.setServerConfig({
|
||||
baseUrl: devUrl, // 服务器基础地址
|
||||
@@ -18,12 +21,8 @@ const getEvnUrl = async () => {
|
||||
return;
|
||||
}
|
||||
|
||||
const apiUrl = proUrl + "/hotelBiz/mainScene/getServiceUrl";
|
||||
const res = await request.post(apiUrl, { versionValue: versionValue });
|
||||
if (res && res.code == 0 && res.data) {
|
||||
const appStore = useAppStore();
|
||||
appStore.setServerConfig(res.data);
|
||||
}
|
||||
/// 正式环境获取服务地址
|
||||
await getServiceUrl(versionValue);
|
||||
};
|
||||
|
||||
export { getEvnUrl };
|
||||
@@ -1,4 +1,3 @@
|
||||
import { goLogin } from "../../hooks/useGoLogin";
|
||||
import { getCurrentConfig } from "@/constant/base";
|
||||
import { useAppStore } from "@/store";
|
||||
import { NOTICE_EVENT_LOGOUT } from "@/constant/constant";
|
||||
|
||||
@@ -6,7 +6,7 @@ export function navigateTo(url, args) {
|
||||
// 如果有额外参数,拼接到URL后面
|
||||
const paramString = objectToUrlParams(args);
|
||||
if (paramString) {
|
||||
if (targetUrl.contains("?")) {
|
||||
if (typeof targetUrl === "string" && targetUrl.includes("?")) {
|
||||
targetUrl += "&";
|
||||
} else {
|
||||
targetUrl += "?";
|
||||
@@ -14,6 +14,7 @@ export function navigateTo(url, args) {
|
||||
targetUrl += paramString;
|
||||
}
|
||||
}
|
||||
console.log("Navigating to URL:", targetUrl);
|
||||
uni.navigateTo({
|
||||
url: "/pages/webview/index?url=" + encodeURIComponent(targetUrl),
|
||||
});
|
||||
|
||||
@@ -23,31 +23,29 @@
|
||||
background-color: #f5f7fa;
|
||||
}
|
||||
|
||||
.bg-EEF8FF {
|
||||
background-color: #eef8ff;
|
||||
}
|
||||
|
||||
.bg-FF3D60 {
|
||||
background-color: #ff3d60;
|
||||
}
|
||||
|
||||
.bg-2D91FF {
|
||||
background-color: #2d91ff;
|
||||
.bg-theme-color-500 {
|
||||
background-color: $theme-color-500;
|
||||
}
|
||||
|
||||
.bg-theme-color-50 {
|
||||
background-color: $theme-color-50;
|
||||
}
|
||||
|
||||
.bg-liner {
|
||||
background: linear-gradient(205deg, #8ae3fc 0%, rgba(138, 227, 252, 0) 20%),
|
||||
background: linear-gradient(205deg, $theme-color-100 0%, rgba(138, 227, 252, 0) 20%),
|
||||
linear-gradient(155deg, #fef7e1 0%, rgba(254, 247, 225, 0) 20%),
|
||||
radial-gradient(
|
||||
48% 48% at 61% 118%,
|
||||
radial-gradient(48% 48% at 61% 118%,
|
||||
#ffffff 0%,
|
||||
rgba(255, 255, 255, 0) 100%
|
||||
),
|
||||
linear-gradient(180deg, rgba(238, 248, 255, 0) 0%, #eef8ff 50%), #eef8ff;
|
||||
rgba(255, 255, 255, 0) 100%),
|
||||
linear-gradient(180deg, rgba(238, 248, 255, 0) 0%, $theme-color-50 50%), $theme-color-50;
|
||||
}
|
||||
|
||||
.bg-button {
|
||||
background: linear-gradient(90deg, #2d91ff 0%, #4de4ff 100%);
|
||||
background: linear-gradient(90deg, $theme-color-500 0%, #4de4ff 100%);
|
||||
}
|
||||
|
||||
.bg-transparent {
|
||||
|
||||
@@ -40,8 +40,8 @@
|
||||
color: #ff3d60;
|
||||
}
|
||||
|
||||
.color-2D91FF {
|
||||
color: #2d91ff;
|
||||
.theme-color-500 {
|
||||
color: $theme-color-500;
|
||||
}
|
||||
|
||||
.color-43669A {
|
||||
|
||||
@@ -21,3 +21,7 @@
|
||||
.h-24 {
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
.h72 {
|
||||
height: 72px;
|
||||
}
|
||||
@@ -6,6 +6,10 @@
|
||||
width: 100vw;
|
||||
}
|
||||
|
||||
.w-vw-24 {
|
||||
width: calc(100vw - 24px);
|
||||
}
|
||||
|
||||
.w-24 {
|
||||
width: 24px;
|
||||
}
|
||||
@@ -22,6 +26,12 @@
|
||||
width: 60px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.w-80 {
|
||||
width: 80px;
|
||||
}
|
||||
|
||||
.w-102 {
|
||||
width: 102px;
|
||||
}
|
||||
26
src/uni.scss
26
src/uni.scss
@@ -12,6 +12,32 @@
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
|
||||
/* 主题颜色:蓝色 */
|
||||
// $theme-color-800: #174BB6;
|
||||
// $theme-color-700: #19428F;
|
||||
// $theme-color-500: #2D91FF;
|
||||
// $theme-color-100: #D9EEFF;
|
||||
// $theme-color-50: #EEF8FF;
|
||||
|
||||
/* 主题颜色:绿色 */
|
||||
$theme-color-800: #0B7034;
|
||||
$theme-color-700: #0B5C2D;
|
||||
$theme-color-500: #0CCD58;
|
||||
$theme-color-100: #E8FFF1;
|
||||
$theme-color-50: #F0F8F3;
|
||||
|
||||
// text 颜色
|
||||
$text-color-900: #181B25;
|
||||
$text-color-800: #222530;
|
||||
$text-color-700: #2B303B;
|
||||
$text-color-600: #525866;
|
||||
$text-color-500: #717784;
|
||||
$text-color-400: #99A0AE;
|
||||
$text-color-300: #CACFD8;
|
||||
$text-color-200: #E5E8EE;
|
||||
$text-color-100: #F2F5F8;
|
||||
$text-color-50: #F9FAFB;
|
||||
|
||||
/* 颜色变量 */
|
||||
|
||||
/* 行为相关颜色 */
|
||||
|
||||
@@ -1,13 +1,7 @@
|
||||
<template>
|
||||
<view class="zero-markdown-view">
|
||||
<mp-html
|
||||
:key="mpkey"
|
||||
:selectable="selectable"
|
||||
:scroll-table="scrollTable"
|
||||
:tag-style="tagStyle"
|
||||
:markdown="true"
|
||||
:content="contentAi"
|
||||
>
|
||||
<mp-html :key="mpkey" :selectable="selectable" :scroll-table="scrollTable" :tag-style="tagStyle" :markdown="true"
|
||||
:content="contentAi">
|
||||
</mp-html>
|
||||
</view>
|
||||
</template>
|
||||
@@ -35,7 +29,7 @@ export default {
|
||||
},
|
||||
themeColor: {
|
||||
type: String,
|
||||
default: "#2D91FF",
|
||||
default: "#181B25",
|
||||
},
|
||||
codeBgColor: {
|
||||
type: String,
|
||||
@@ -47,11 +41,11 @@ export default {
|
||||
},
|
||||
fontColor: {
|
||||
type: String,
|
||||
default: "#171717",
|
||||
default: "#181B25",
|
||||
},
|
||||
fontSubColor: {
|
||||
type: String,
|
||||
default: "#4D4D4D",
|
||||
default: "#717784",
|
||||
},
|
||||
aiMode: {
|
||||
type: Boolean,
|
||||
|
||||
Reference in New Issue
Block a user