if (typeof Promise !== "undefined" && !Promise.prototype.finally) { Promise.prototype.finally = function(callback) { const promise = this.constructor; return this.then( (value) => promise.resolve(callback()).then(() => value), (reason) => promise.resolve(callback()).then(() => { throw reason; }) ); }; } ; if (typeof uni !== "undefined" && uni && uni.requireGlobal) { const global = uni.requireGlobal(); ArrayBuffer = global.ArrayBuffer; Int8Array = global.Int8Array; Uint8Array = global.Uint8Array; Uint8ClampedArray = global.Uint8ClampedArray; Int16Array = global.Int16Array; Uint16Array = global.Uint16Array; Int32Array = global.Int32Array; Uint32Array = global.Uint32Array; Float32Array = global.Float32Array; Float64Array = global.Float64Array; BigInt64Array = global.BigInt64Array; BigUint64Array = global.BigUint64Array; } ; if (uni.restoreGlobal) { uni.restoreGlobal(Vue, weex, plus, setTimeout, clearTimeout, setInterval, clearInterval); } (function(vue) { "use strict"; const _export_sfc = (sfc, props) => { const target = sfc.__vccOpts || sfc; for (const [key, val] of props) { target[key] = val; } return target; }; var wv; const _sfc_main$1 = { data() { return { title: "ByteSailing", url: "http://139.159.251.109:82/#/", //url: 'http://36.134.91.96:10008/#/', //url: 'http://36.134.91.96:10007/#/', //ehsd测试 //url:'http://139.9.102.170:10009/#/', //ehsd正式 //url:'http://139.9.102.170:10010/#/', //本地调试 //url:'http://192.168.1.18:8088/', src: "", canBack: false }; }, onBackPress() { if (wv && this.canBack) { wv.back(); return true; } return false; }, onReady() { var self = this; var currentWebview = this.$scope.$getAppWebview(); setTimeout(function() { wv = currentWebview.children()[0]; wv.addEventListener( "progressChanged", function(e) { wv.canBack(function(e2) { self.canBack = e2.canBack; }); }, false ); }, 500); }, onLoad() { var height = 0; uni.getSystemInfo({ //成功获取的回调函数,返回值为系统信息 success: (sysinfo) => { height = sysinfo.windowHeight; }, complete: () => { } }); let info = uni.getSystemInfoSync(); let top = info.statusBarHeight; var currentWebview = this.$scope.$getAppWebview(); setTimeout(function() { var wv2 = currentWebview.children()[0]; wv2.setStyle({ //设置web-view距离顶部的距离以及自己的高度,单位为px top, //此处是距离顶部的高度,应该是你页面的头部 // bottom:0,//防止输入框被软键盘遮挡 height: height - top, //webview的高度 scalable: false //webview的页面是否可以缩放,双指放大缩小 }); }, 1e3); } }; function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [ vue.createElementVNode("view", { class: "status_bar" }, [ vue.createCommentVNode(" 这里是状态栏 ") ]), vue.createElementVNode("web-view", { src: $data.url, fullscreen: false }, null, 8, ["src"]) ]); } const PagesIndexIndex = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__file", "D:/hongxing/uni-byte-sailing-mobile/pages/index/index.vue"]]); __definePage("pages/index/index", PagesIndexIndex); function requireNativePlugin(name) { return weex.requireModule(name); } function formatAppLog(type, filename, ...args) { if (uni.__log__) { uni.__log__(type, filename, ...args); } else { console[type].apply(console, [...args, filename]); } } const jpushModule = requireNativePlugin("JG-JPush"); formatAppLog("log", "at App.vue:3", jpushModule.getRegistrationID, "jpushModule"); const _sfc_main = { onLaunch: function() { formatAppLog("log", "at App.vue:6", "App Launch"); if (uni.getSystemInfoSync().platform == "ios") { let locationServicesEnabled = jpushModule.locationServicesEnabled(); let locationAuthorizationStatus = jpushModule.getLocationAuthorizationStatus(); formatAppLog("log", "at App.vue:11", "locationAuthorizationStatus", locationAuthorizationStatus); if (locationServicesEnabled == true && locationAuthorizationStatus < 3) { jpushModule.requestLocationAuthorization((result) => { formatAppLog("log", "at App.vue:14", "定位权限", result.status); }); } jpushModule.requestNotificationAuthorization((result) => { let status = result.status; if (status < 2) { uni.showToast({ icon: "none", title: "您还没有打开通知权限", duration: 3e3 }); } }); } jpushModule.getRegistrationID((result) => { formatAppLog("log", "at App.vue:30", result, "注册ID....."); uni.showToast({ title: result.registerID, icon: "success", duration: 3e4 }); }); jpushModule.initJPushService(); jpushModule.setLoggerEnable(true); jpushModule.addConnectEventListener((result) => { formatAppLog("log", "at App.vue:42", result); let connectEnable = result.connectEnable; uni.$emit("connectStatusChange", connectEnable); }); jpushModule.addNotificationListener((result) => { formatAppLog("log", "at App.vue:49", result); if (result.notificationEventType == "notificationOpened") { uni.navigateTo({ url: "/pages/home/warningCenter/warningCenter", complete(res) { formatAppLog("log", "at App.vue:55", res); } }); } }); jpushModule.addCustomMessageListener((result) => { result.type; result.messageType; result.content; uni.showToast({ icon: "none", title: JSON.stringify(result), duration: 3e3 }); }); jpushModule.addLocalNotificationListener((result) => { result.messageID; result.title; result.content; result.extras; uni.showToast({ icon: "none", title: JSON.stringify(result), duration: 3e3 }); }); jpushModule.addGeofenceListener((result) => { result.code; result.type; result.geofenceId; result.userInfo; uni.showToast({ icon: "none", title: "触发地理围栏", duration: 3e3 }); }); jpushModule.setIsAllowedInMessagePop(true); jpushModule.pullInMessage((result) => { let code = result.code; formatAppLog("log", "at App.vue:100", code); }); jpushModule.addInMessageListener((result) => { let eventType = result.eventType; let messageType = result.messageType; let content = result.content; formatAppLog("log", "at App.vue:107", "inMessageListener", eventType, messageType, content); uni.showToast({ icon: "none", title: JSON.stringify(result), duration: 3e3 }); }); }, onShow: function() { formatAppLog("log", "at App.vue:117", "App Show"); }, onHide: function() { formatAppLog("log", "at App.vue:120", "App Hide"); } }; const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "D:/hongxing/uni-byte-sailing-mobile/App.vue"]]); function createApp() { const app = vue.createVueApp(App); return { app }; } const { app: __app__, Vuex: __Vuex__, Pinia: __Pinia__ } = createApp(); uni.Vuex = __Vuex__; uni.Pinia = __Pinia__; __app__.provide("__globalStyles", __uniConfig.styles); __app__._component.mpType = "app"; __app__._component.render = () => { }; __app__.mount("#app"); })(Vue);