diff --git a/components/AddCarCrad/images/add_car_crad.png b/components/AddCarCrad/images/add_car_crad.png new file mode 100644 index 0000000..0133227 Binary files /dev/null and b/components/AddCarCrad/images/add_car_crad.png differ diff --git a/components/AddCarCrad/index.vue b/components/AddCarCrad/index.vue new file mode 100644 index 0000000..e61caee --- /dev/null +++ b/components/AddCarCrad/index.vue @@ -0,0 +1,43 @@ + + + + + diff --git a/components/AddCarCrad/styles/index.scss b/components/AddCarCrad/styles/index.scss new file mode 100644 index 0000000..a79280f --- /dev/null +++ b/components/AddCarCrad/styles/index.scss @@ -0,0 +1,51 @@ +.add-car-card { + display: flex; + flex-direction: column; + + .header-image { + display: flex; + justify-content: center; + align-items: center; + margin: -24rpx -24rpx 0 -24rpx; + + .header-img { + width: 100%; + height: 150px; + } + } + + .content { + display: flex; + align-items: start; + flex-direction: column; + padding: 24rpx 0; + } + + .title { + font-size: 36rpx; + font-weight: 600; + color: #333; + } + + .description { + font-size: 28rpx; + color: #666; + line-height: 1.5; + } + + .confirm-btn { + height: 88rpx; + background: linear-gradient(135deg, #1898ff 0%, #77e5f9 100%); + border-radius: 44rpx; + margin-bottom: 24rpx; + display: flex; + align-items: center; + justify-content: center; + + .confirm-text { + font-size: 28rpx; + font-weight: 500; + color: #fff; + } + } +} \ No newline at end of file diff --git a/model/ChatModel.js b/model/ChatModel.js index f3cfe85..fc5620e 100644 --- a/model/ChatModel.js +++ b/model/ChatModel.js @@ -16,4 +16,5 @@ export const CompName = { createWorkOrderCard: "createWorkOrderCard", feedbackCard: "feedbackCard", discoveryCard: "discoveryCard", + addLicensePlate: "addLicensePlate", }; \ No newline at end of file diff --git a/pages.json b/pages.json index af52e0a..1d373f5 100644 --- a/pages.json +++ b/pages.json @@ -1,6 +1,5 @@ { "pages": [ - //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages { "path": "pages/index/index", "style": { @@ -47,13 +46,21 @@ "style": { "navigationStyle": "custom" } + }, + { + "path": "pages/webview/index", + "style": { + "navigationStyle": "custom", + "navigationBarBackgroundColor": "#F8F8F8", + "navigationBarTitleColor": "#000000" + } } ], "globalStyle": { - // "navigationBarTextStyle": "black", - // // "navigationBarTitleText": "小沐", - // "navigationBarBackgroundColor": "#F8F8F8", - // "backgroundColor": "#F8F8F8" + "navigationBarTextstyle": "black", + "navigationBarTitleText": "", + "navigationBarBackgroundcolor": "#F8F8F8", + "backgroundColor": "#F8F8F8" }, "uniIdRouter": {} } diff --git a/pages/chat/ChatCardAI.vue b/pages/chat/ChatCardAI.vue index 2bd81cc..9773f00 100644 --- a/pages/chat/ChatCardAI.vue +++ b/pages/chat/ChatCardAI.vue @@ -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; // ✅ 强制换行 } } diff --git a/pages/index/index.vue b/pages/index/index.vue index bfdc48c..02b8945 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -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); } }; diff --git a/pages/webview/index.vue b/pages/webview/index.vue new file mode 100644 index 0000000..993c430 --- /dev/null +++ b/pages/webview/index.vue @@ -0,0 +1,56 @@ + + + + + diff --git a/router/index.js b/router/index.js new file mode 100644 index 0000000..53d3f52 --- /dev/null +++ b/router/index.js @@ -0,0 +1,20 @@ +import { objectToUrlParams } from "../utils/UrlParams.js"; + +export function navigateTo(url, args) { + let targetUrl = url; + if (args && typeof args === "object") { + // 如果有额外参数,拼接到URL后面 + const paramString = objectToUrlParams(args); + if (paramString) { + if (targetUrl.contains("?")) { + targetUrl += "&"; + } else { + targetUrl += "?"; + } + targetUrl += paramString; + } + } + uni.navigateTo({ + url: "/pages/webview/index?url=" + encodeURIComponent(targetUrl), + }); +} diff --git a/utils/UrlParams.js b/utils/UrlParams.js index f70b172..296a363 100644 --- a/utils/UrlParams.js +++ b/utils/UrlParams.js @@ -1,4 +1,4 @@ -export function GetWxMiniProgramUrlParam(url) { +export function getUrlParams(url) { let theRequest = {}; if(url.indexOf("#") != -1){ const str=url.split("#")[1]; @@ -15,3 +15,23 @@ export function GetWxMiniProgramUrlParam(url) { } return theRequest; } + +/** + * 将对象参数转换为URL查询字符串格式 + * @param {Object} args - 参数对象 + * @returns {String} 返回key=value&格式的查询字符串 + */ +export function objectToUrlParams(args) { + if (!args || typeof args !== 'object') { + return ''; + } + + const params = []; + for (const key in args) { + if (args.hasOwnProperty(key) && args[key] !== undefined && args[key] !== null) { + params.push(`${key}=${args[key]}`); + } + } + + return params.length > 0 ? params.join('&') : ''; +}