From 32febb140d320b35d580c8d4e78a80ef846e75fc Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Fri, 19 Dec 2025 15:59:34 +0800
Subject: [PATCH] feat:webview通信处理

---
 src/components/WebViewPlus.vue |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/src/components/WebViewPlus.vue b/src/components/WebViewPlus.vue
index 6e7da46..437b7a8 100644
--- a/src/components/WebViewPlus.vue
+++ b/src/components/WebViewPlus.vue
@@ -2,11 +2,14 @@
   <web-view :src="src" @message="viewMessage" :allow="allow"/>
 </template>
 
+
 <script setup>
+
 
 const allow = "accelerometer;ambient-light-sensor;autoplay;battery;camera;clipboard-read;clipboard-write;cross-origin-isolated;display-capture;document-domain;encrypted-media;execution-while-not-rendered;execution-while-out-of-viewport;fullscreen;gamepad;geolocation;gyroscope;hid;idle-detection;local-fonts;magnetometer;microphone;midi;payment;picture-in-picture;publickey-credentials-get;screen-wake-lock;serial;speaker-selection;storage-access;sync-xhr;usb;web-share;xr-spatial-tracking"
 const src = defineModel("src");
 const emit = defineEmits(["webMessage"]);
+
 function viewMessage(event) {
   messageFun({
     data: {
@@ -22,7 +25,7 @@
 function messageFun(e) {
   if (e.data.type === "WEB_INVOKE_APPSERVICE") {
     if (e.data.data.arg.type === "tokenExpired") {
-      return uni.redirectTo({
+      return uni.reLaunch({
         url: "/pages/login/index",
       });
     }

--
Gitblit v1.9.3