Browse Source

返回上一页

liushengqiang 1 year ago
parent
commit
f1536e058c

+ 5 - 1
src/helpers/communication.ts

@@ -153,7 +153,11 @@ export const api_cloudFollowTime = (onFollowTime: CallBack, listen = true) => {
 		removeListenerMessage("cloudFollowTime", onFollowTime);
 	}
 };
-
+export const api_goback = () => {
+	postMessage({
+		api: "goback",
+	});
+}
 /** 结束webview */
 export const api_back = () => {
 	postMessage({

+ 8 - 2
src/page-instrument/custom-plugins/the-vip/index.tsx

@@ -4,14 +4,20 @@ import icon_btn from "./icon_btn.png";
 import icon_close from "./icon_close.png";
 import styles from "./index.module.less";
 import { Popup } from "vant";
-import { api_back } from "/src/helpers/communication";
+import { api_back, api_goback } from "/src/helpers/communication";
 import { postMessage } from "/src/utils/native-message";
+import { getQuery } from "/src/utils/queryString";
 
 export default defineComponent({
 	name: "TheVip",
 	setup() {
 		const close = () => {
-			api_back();
+			const query = getQuery();
+			if (query.modelType){
+				api_goback();
+			} else {
+				api_back();
+			}
 		};
     
 		return () => (