first
This commit is contained in:
parent
2d70c64db5
commit
86cb4aafa8
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
;(function(){
|
;(function(){
|
||||||
let u=void 0,isReady=false,onReadyCallbacks=[],isServiceReady=false,onServiceReadyCallbacks=[];
|
let u=void 0,isReady=false,onReadyCallbacks=[],isServiceReady=false,onServiceReadyCallbacks=[];
|
||||||
const __uniConfig = {"pages":[],"globalStyle":{"navigationBar":{},"isNVue":false},"nvue":{"compiler":"uni-app","styleCompiler":"uni-app","flex-direction":"column"},"renderer":"auto","appname":"泰丰考勤","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":true},"compilerVersion":"4.15","entryPagePath":"pages/index/index","entryPageQuery":"","realEntryPagePath":"","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000},"locales":{},"darkmode":false,"themeConfig":{}};
|
const __uniConfig = {"pages":[],"globalStyle":{"navigationBar":{},"isNVue":false},"nvue":{"compiler":"uni-app","styleCompiler":"uni-app","flex-direction":"column"},"renderer":"auto","appname":"oa考勤系统","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":true},"compilerVersion":"4.15","entryPagePath":"pages/index/index","entryPageQuery":"","realEntryPagePath":"","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000},"locales":{},"darkmode":false,"themeConfig":{}};
|
||||||
const __uniRoutes = [{"path":"pages/index/index","meta":{"isQuit":true,"isEntry":true,"titleNView":false,"navigationBar":{"style":"custom","type":"default"},"isNVue":false}}].map(uniRoute=>(uniRoute.meta.route=uniRoute.path,__uniConfig.pages.push(uniRoute.path),uniRoute.path='/'+uniRoute.path,uniRoute));
|
const __uniRoutes = [{"path":"pages/index/index","meta":{"isQuit":true,"isEntry":true,"titleNView":false,"navigationBar":{"style":"custom","type":"default"},"isNVue":false}}].map(uniRoute=>(uniRoute.meta.route=uniRoute.path,__uniConfig.pages.push(uniRoute.path),uniRoute.path='/'+uniRoute.path,uniRoute));
|
||||||
__uniConfig.styles=[];//styles
|
__uniConfig.styles=[];//styles
|
||||||
__uniConfig.onReady=function(callback){if(__uniConfig.ready){callback()}else{onReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"ready",{get:function(){return isReady},set:function(val){isReady=val;if(!isReady){return}const callbacks=onReadyCallbacks.slice(0);onReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
|
__uniConfig.onReady=function(callback){if(__uniConfig.ready){callback()}else{onReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"ready",{get:function(){return isReady},set:function(val){isReady=val;if(!isReady){return}const callbacks=onReadyCallbacks.slice(0);onReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
|
||||||
|
124
unpackage/dist/dev/app-plus/app-service.js
vendored
124
unpackage/dist/dev/app-plus/app-service.js
vendored
@ -63,98 +63,6 @@ if (uni.restoreGlobal) {
|
|||||||
const onShow = /* @__PURE__ */ createHook(ON_SHOW);
|
const onShow = /* @__PURE__ */ createHook(ON_SHOW);
|
||||||
const onHide = /* @__PURE__ */ createHook(ON_HIDE);
|
const onHide = /* @__PURE__ */ createHook(ON_HIDE);
|
||||||
const onLaunch = /* @__PURE__ */ createHook(ON_LAUNCH);
|
const onLaunch = /* @__PURE__ */ createHook(ON_LAUNCH);
|
||||||
const receiveWebView = (e2) => {
|
|
||||||
return e2.detail.data[0];
|
|
||||||
};
|
|
||||||
const location$1 = {
|
|
||||||
// 检测是否开启系统定位权限
|
|
||||||
hasLocationPermission() {
|
|
||||||
const system = uni.getSystemInfoSync();
|
|
||||||
if (system.platform === "android") {
|
|
||||||
return this.checkAndroidLocationPermission();
|
|
||||||
} else if (system.platform === "ios") {
|
|
||||||
return this.checkiOSLocationPermission();
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
},
|
|
||||||
// 检查安卓系统定位权限
|
|
||||||
checkAndroidLocationPermission() {
|
|
||||||
const context = plus.android.importClass("android.content.Context");
|
|
||||||
const locationManager = plus.android.importClass("android.location.LocationManager");
|
|
||||||
const main = plus.android.runtimeMainActivity();
|
|
||||||
const service = main.getSystemService(context.LOCATION_SERVICE);
|
|
||||||
if (service.isProviderEnabled(locationManager.GPS_PROVIDER)) {
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
this.showLocationServiceModal("请开启位置服务功能", this.openAndroidLocationSettings);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 检查iOS系统定位权限
|
|
||||||
checkiOSLocationPermission() {
|
|
||||||
const CLLocationManager = plus.ios.import("CLLocationManager");
|
|
||||||
const enabled = CLLocationManager.locationServicesEnabled();
|
|
||||||
const status = CLLocationManager.authorizationStatus();
|
|
||||||
plus.ios.deleteObject(CLLocationManager);
|
|
||||||
if (enabled && status !== 2) {
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
this.showLocationServiceModal("请前往设置-定位服务打开定位服务功能", this.openiOSLocationSettings);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 提示用户启用位置服务
|
|
||||||
showLocationServiceModal(content, openSettingsCallback) {
|
|
||||||
uni.showModal({
|
|
||||||
title: "友情提示",
|
|
||||||
content,
|
|
||||||
success: (e2) => {
|
|
||||||
if (e2.confirm) {
|
|
||||||
openSettingsCallback();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 打开安卓定位设置页面
|
|
||||||
openAndroidLocationSettings() {
|
|
||||||
const Intent = plus.android.importClass("android.content.Intent");
|
|
||||||
const Settings = plus.android.importClass("android.provider.Settings");
|
|
||||||
const main = plus.android.runtimeMainActivity();
|
|
||||||
const intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);
|
|
||||||
main.startActivity(intent);
|
|
||||||
},
|
|
||||||
// 打开iOS定位设置页面
|
|
||||||
openiOSLocationSettings() {
|
|
||||||
const UIApplication = plus.ios.import("UIApplication");
|
|
||||||
const application = UIApplication.sharedApplication();
|
|
||||||
const NSURL = plus.ios.import("NSURL");
|
|
||||||
const setting = NSURL.URLWithString("app-settings:");
|
|
||||||
application.openURL(setting);
|
|
||||||
plus.ios.deleteObject(setting);
|
|
||||||
plus.ios.deleteObject(NSURL);
|
|
||||||
plus.ios.deleteObject(application);
|
|
||||||
},
|
|
||||||
// 开启后台持续获取定位功能
|
|
||||||
startLocationService(successCallBack = () => {
|
|
||||||
}, failCallBack = () => {
|
|
||||||
}, options) {
|
|
||||||
if (this.hasLocationPermission()) {
|
|
||||||
plus.geolocation.watchPosition(
|
|
||||||
(position) => successCallBack(position),
|
|
||||||
(error) => {
|
|
||||||
formatAppLog("log", "at utils/location.js:85", "定位失败", error);
|
|
||||||
failCallBack(error);
|
|
||||||
},
|
|
||||||
options
|
|
||||||
);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 关闭定位功能
|
|
||||||
closeLocationService(locationWatcherId) {
|
|
||||||
plus.geolocation.clearWatch(locationWatcherId);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
uni;
|
|
||||||
const _export_sfc = (sfc, props) => {
|
const _export_sfc = (sfc, props) => {
|
||||||
const target = sfc.__vccOpts || sfc;
|
const target = sfc.__vccOpts || sfc;
|
||||||
for (const [key, val] of props) {
|
for (const [key, val] of props) {
|
||||||
@ -165,8 +73,6 @@ if (uni.restoreGlobal) {
|
|||||||
const _sfc_main$1 = {
|
const _sfc_main$1 = {
|
||||||
__name: "index",
|
__name: "index",
|
||||||
setup(__props) {
|
setup(__props) {
|
||||||
const webViewRef = vue.ref(null);
|
|
||||||
const systemInfo = uni.getSystemInfoSync();
|
|
||||||
const networkStatusChange = (res) => {
|
const networkStatusChange = (res) => {
|
||||||
if (res.isConnected) {
|
if (res.isConnected) {
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
@ -180,40 +86,23 @@ if (uni.restoreGlobal) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
const webViewObj = vue.ref(null);
|
const webViewObj = vue.ref(null);
|
||||||
const handleBackButton = () => {
|
|
||||||
};
|
|
||||||
let LocationId = null;
|
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
plus.key.addEventListener("backbutton", handleBackButton, false);
|
|
||||||
uni.onNetworkStatusChange(networkStatusChange);
|
uni.onNetworkStatusChange(networkStatusChange);
|
||||||
});
|
});
|
||||||
onHide(() => {
|
onHide(() => {
|
||||||
plus.geolocation.clearWatch(LocationId);
|
|
||||||
plus.key.removeEventListener("backbutton", handleBackButton, false);
|
|
||||||
uni.offNetworkStatusChange(networkStatusChange);
|
uni.offNetworkStatusChange(networkStatusChange);
|
||||||
});
|
});
|
||||||
const webLoad = (e2) => {
|
const webLoad = (e2) => {
|
||||||
const m2 = receiveWebView(e2);
|
var _a, _b;
|
||||||
switch (m2.action) {
|
const h5SendString = (_b = (_a = e2.detail.data) == null ? void 0 : _a[0]) == null ? void 0 : _b.action;
|
||||||
|
switch (h5SendString) {
|
||||||
case "load-complete": {
|
case "load-complete": {
|
||||||
|
const { statusBarHeight } = uni.getSystemInfoSync();
|
||||||
const currentWebview = getCurrentPages().pop().$getAppWebview();
|
const currentWebview = getCurrentPages().pop().$getAppWebview();
|
||||||
webViewObj.value = currentWebview.children()[0];
|
webViewObj.value = currentWebview.children()[0];
|
||||||
let statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
|
|
||||||
webViewObj.value.setStyle({
|
webViewObj.value.setStyle({
|
||||||
//设置web-view距离顶部的距离以及自己的高度,单位为px
|
|
||||||
top: statusBarHeight,
|
top: statusBarHeight,
|
||||||
//此处是距离顶部的高度,应该是你页面的头部
|
|
||||||
bottom: 0
|
bottom: 0
|
||||||
//webview的高度
|
|
||||||
});
|
|
||||||
LocationId = location$1.startLocationService((res) => {
|
|
||||||
const jsonString = JSON.stringify({ ...res, systemInfo });
|
|
||||||
webViewObj.value.evalJS(`window.onReceive(${jsonString})`);
|
|
||||||
}, () => {
|
|
||||||
}, {
|
|
||||||
geocode: true,
|
|
||||||
coordsType: "gcj02",
|
|
||||||
enableHighAccuracy: true
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -223,8 +112,7 @@ if (uni.restoreGlobal) {
|
|||||||
class: "webview",
|
class: "webview",
|
||||||
onMessage: webLoad,
|
onMessage: webLoad,
|
||||||
style: { "flex": "1" },
|
style: { "flex": "1" },
|
||||||
ref_key: "webViewRef",
|
ref: "webViewRef",
|
||||||
ref: webViewRef,
|
|
||||||
src: vue.unref(config).h5Url
|
src: vue.unref(config).h5Url
|
||||||
}, null, 40, ["src"]);
|
}, null, 40, ["src"]);
|
||||||
};
|
};
|
||||||
@ -558,7 +446,7 @@ if (uni.restoreGlobal) {
|
|||||||
const S = true, b = "app", A = I(define_process_env_UNI_SECURE_NETWORK_CONFIG_default), P = b, T = I('{\n "address": [\n "127.0.0.1",\n "192.168.56.1",\n "192.168.88.37"\n ],\n "debugPort": 9000,\n "initialLaunchType": "local",\n "servePort": 7000,\n "skipFiles": [\n "<node_internals>/**",\n "C:/Users/37363/Downloads/HBuilderX.4.08.2024040127/HBuilderX/plugins/unicloud/**/*.js"\n ]\n}\n'), C = I('[{"provider":"aliyun","spaceName":"oabase","spaceId":"mp-edf38b0d-bc9a-4e81-9a15-f55995ccca70","clientSecret":"ty1X79FB2pMuAQUzaQBKXA==","endpoint":"https://api.next.bspapp.com"}]') || [];
|
const S = true, b = "app", A = I(define_process_env_UNI_SECURE_NETWORK_CONFIG_default), P = b, T = I('{\n "address": [\n "127.0.0.1",\n "192.168.56.1",\n "192.168.88.37"\n ],\n "debugPort": 9000,\n "initialLaunchType": "local",\n "servePort": 7000,\n "skipFiles": [\n "<node_internals>/**",\n "C:/Users/37363/Downloads/HBuilderX.4.08.2024040127/HBuilderX/plugins/unicloud/**/*.js"\n ]\n}\n'), C = I('[{"provider":"aliyun","spaceName":"oabase","spaceId":"mp-edf38b0d-bc9a-4e81-9a15-f55995ccca70","clientSecret":"ty1X79FB2pMuAQUzaQBKXA==","endpoint":"https://api.next.bspapp.com"}]') || [];
|
||||||
let O = "";
|
let O = "";
|
||||||
try {
|
try {
|
||||||
O = "__UNI__4796942";
|
O = "__UNI__70C49A3";
|
||||||
} catch (e2) {
|
} catch (e2) {
|
||||||
}
|
}
|
||||||
let E = {};
|
let E = {};
|
||||||
|
2
unpackage/dist/dev/app-plus/manifest.json
vendored
2
unpackage/dist/dev/app-plus/manifest.json
vendored
@ -46,7 +46,7 @@
|
|||||||
"statusbar": {
|
"statusbar": {
|
||||||
"immersed": "supportedDevice",
|
"immersed": "supportedDevice",
|
||||||
"style": "dark",
|
"style": "dark",
|
||||||
"background": "#000000"
|
"background": "#F8F8F8"
|
||||||
},
|
},
|
||||||
"navigationbar": {
|
"navigationbar": {
|
||||||
"hidden": true
|
"hidden": true
|
||||||
|
Loading…
Reference in New Issue
Block a user