|
@@ -0,0 +1,158 @@
|
|
|
+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";
|
|
|
+ function formatAppLog(type, filename, ...args) {
|
|
|
+ if (uni.__log__) {
|
|
|
+ uni.__log__(type, filename, ...args);
|
|
|
+ } else {
|
|
|
+ console[type].apply(console, [...args, filename]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ 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) => {
|
|
|
+ formatAppLog("log", "at pages/index/index.vue:61", sysinfo);
|
|
|
+ height = sysinfo.windowHeight;
|
|
|
+ },
|
|
|
+ complete: () => {
|
|
|
+ }
|
|
|
+ });
|
|
|
+ let info = uni.getSystemInfoSync();
|
|
|
+ let top = info.statusBarHeight;
|
|
|
+ formatAppLog("log", "at pages/index/index.vue:68", info, 12312312312);
|
|
|
+ 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);
|
|
|
+ const _sfc_main = {
|
|
|
+ onLaunch: function() {
|
|
|
+ formatAppLog("log", "at App.vue:4", "App Launch");
|
|
|
+ },
|
|
|
+ onShow: function() {
|
|
|
+ formatAppLog("log", "at App.vue:7", "App Show");
|
|
|
+ },
|
|
|
+ onHide: function() {
|
|
|
+ formatAppLog("log", "at App.vue:10", "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);
|