From 43dea26c25255b2cb3e368f67a85cb0ecaafb668 Mon Sep 17 00:00:00 2001
From: liugongyu <290219706@qq.com>
Date: Tue, 16 May 2023 12:22:49 +0800
Subject: [PATCH] 黄石h5新页面
---
src/views/peripheralService/peripheralService.vue | 33 +++++++++++++++++++++++++++++++--
1 file changed, 31 insertions(+), 2 deletions(-)
diff --git a/src/views/peripheralService/peripheralService.vue b/src/views/peripheralService/peripheralService.vue
index e41330b..a316089 100644
--- a/src/views/peripheralService/peripheralService.vue
+++ b/src/views/peripheralService/peripheralService.vue
@@ -46,8 +46,8 @@
位置:{{i.companyAddress}}
联系电话:{{i.contactTel}} (李美丽)
-
-
+
+
@@ -90,6 +90,35 @@ export default {
this.queryInsuranceCompanyList(this.carNumber);
},
methods: {
+ toLinkApp(lon,lat,name){
+ var u = navigator.userAgent,
+ app = navigator.appVersion;
+ var isAndroid = u.indexOf("Android") > -1 || u.indexOf("Linux") > -1;
+ var isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
+ if (isAndroid) {
+ // alert("我是安卓");
+ window.JSInterface.toApp(lon,lat,name);
+ }
+ if (isIOS) {
+ // alert("我是苹果");
+ window.webkit.messageHandlers.toApp.postMessage({ "lon": lon, "lat": lat, "name":name})
+ }
+
+ },
+ callPhone(telNum) {
+ var u = navigator.userAgent,
+ app = navigator.appVersion;
+ var isAndroid = u.indexOf("Android") > -1 || u.indexOf("Linux") > -1;
+ var isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
+ if (isAndroid) {
+ // alert("我是安卓");
+ window.JSInterface.callAppPhone(telNum);
+ }
+ if (isIOS) {
+ // alert("我是苹果");
+ window.webkit.messageHandlers.callAppPhone.postMessage({ "phoneNumber": telNum})
+ }
+ },
queryInsuranceCompanyList() { // 获取停车记录数据
var salt = this.$utils.myCommonSalt(32);
var jsondata = {
--
libgit2 0.21.4