feat: 添加车牌的搭建

This commit is contained in:
2025-09-18 20:44:29 +08:00
parent 8af82e54ef
commit fd5902ca05
10 changed files with 209 additions and 8 deletions

View File

@@ -84,6 +84,9 @@ watch(
border-radius: 4px 20px 20px 20px;
border: 1px solid;
border-color: #ffffff;
overflow: hidden; // ✅ 超出内容被切掉
word-wrap: break-word; // ✅ 长单词自动换行
word-break: break-all; // ✅ 强制换行
}
}

View File

@@ -18,7 +18,7 @@ import { ref, onMounted, onUnmounted } from "vue";
import ChatMainList from "../chat/ChatMainList.vue";
import Calender from "@/components/Calender/index.vue";
import { onLoad } from "@dcloudio/uni-app";
import { GetWxMiniProgramUrlParam } from "@/utils/UrlParams";
import { getUrlParams } from "@/utils/UrlParams";
import { useAppStore } from "@/store";
@@ -48,7 +48,7 @@ const getWeixinMiniProgramParams = (e) => {
console.log("Params:", e);
if (e.q && e.q != "undefined") {
const qrUrl = decodeURIComponent(e.q); // 获取到二维码原始链接内容
const params = GetWxMiniProgramUrlParam(qrUrl);
const params = getUrlParams(qrUrl);
appStore.setSceneId(params.sceneId);
}
};

56
pages/webview/index.vue Normal file
View File

@@ -0,0 +1,56 @@
<template>
<view class="webview">
<!-- 使用 NavBar 组件 -->
<TopNavBar title="网页浏览" @back="goBack" />
<!-- WebView 内容区域 -->
<view class="webview-content">
<web-view :src="webviewUrl"></web-view>
</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();
const currentPage = pages[pages.length - 1];
const options = currentPage.options;
// 从页面参数中获取url
if (options.url) {
// 对URL进行解码因为传递时可能被编码了
webviewUrl.value = decodeURIComponent(options.url);
}
});
</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>