first
This commit is contained in:
parent
81d0df2a90
commit
81966f25fe
@ -4,12 +4,16 @@
|
||||
"version" : "0.0",
|
||||
"configurations" : [
|
||||
{
|
||||
"app-plus" : {
|
||||
"app-plus" : {
|
||||
"launchtype" : "local"
|
||||
},
|
||||
"default" : {
|
||||
"launchtype" : "local"
|
||||
},
|
||||
"h5" : {
|
||||
"launchtype" : "local"
|
||||
},
|
||||
"provider" : "aliyun",
|
||||
"type" : "uniCloud"
|
||||
},
|
||||
{
|
||||
|
48
App.vue
48
App.vue
@ -1,16 +1,40 @@
|
||||
<script>
|
||||
export default {
|
||||
onLaunch: function() {
|
||||
},
|
||||
onShow: function() {
|
||||
console.log('App Show')
|
||||
},
|
||||
onHide: function() {
|
||||
console.log('App Hide')
|
||||
}
|
||||
}
|
||||
<script setup>
|
||||
import { onLaunch, onShow, onHide } from "@dcloudio/uni-app";
|
||||
/* import location from "./utils/location"; */
|
||||
onLaunch(() => {
|
||||
/* location.startLocationService((res)=>{
|
||||
console.log(JSON.stringify(res),'JSON.stringify(res)');
|
||||
uni.showToast({
|
||||
duration:1000,
|
||||
icon:'none',
|
||||
title:JSON.stringify(res)
|
||||
})
|
||||
},()=>{
|
||||
|
||||
}) */
|
||||
|
||||
})
|
||||
|
||||
onShow(() => {
|
||||
|
||||
})
|
||||
onHide(() => {
|
||||
plus.geolocation.clearWatch(LocationId)
|
||||
console.log("App Hide")
|
||||
})
|
||||
uni.getPushClientId({
|
||||
success: (res) => {
|
||||
let push_clientid = res.cid
|
||||
console.log('客户端推送标识cid:',push_clientid)
|
||||
},
|
||||
fail(err) {
|
||||
console.log(err)
|
||||
}
|
||||
})
|
||||
uni.onPushMessage((res)=>{
|
||||
console.log(JSON.stringify(res),);
|
||||
})
|
||||
</script>
|
||||
|
||||
<style>
|
||||
/*每个页面公共css */
|
||||
</style>
|
||||
|
@ -1,18 +1,17 @@
|
||||
const env = 'dev';
|
||||
const env = 'dev';
|
||||
const configs = {
|
||||
dev: {
|
||||
apiBaseUrl: 'https://warehouse.szjixun.cn/oa_backend',
|
||||
h5Url:'http://192.168.88.35:8080/'
|
||||
h5Url: 'http://192.168.0.191:8080/#/'
|
||||
},
|
||||
test: {
|
||||
apiBaseUrl: 'https://warehouse.szjixun.cn/oa_backend',
|
||||
h5Url:'http://172.16.100.93:8041/#/'
|
||||
h5Url: 'http://114.218.158.24:9051/#/'
|
||||
},
|
||||
prod: {
|
||||
apiBaseUrl: 'https://oa.szjixun.cn/api',
|
||||
h5Url:'https://oa.szjixun.cn/#/'
|
||||
apiBaseUrl: 'https://oa-a.szjixun.cn/#/',
|
||||
h5Url: 'https://oa-a.szjixun.cn/#/'
|
||||
},
|
||||
};
|
||||
|
||||
}
|
||||
const config = configs[env];
|
||||
export default config;
|
||||
|
@ -1,13 +1,8 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta charset="UTF-8" name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0,viewport-fit=cover" />
|
||||
<script>
|
||||
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
|
||||
CSS.supports('top: constant(a)'))
|
||||
document.write(
|
||||
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
|
||||
(coverSupport ? ', viewport-fit=cover' : '') + '" />')
|
||||
</script>
|
||||
<title></title>
|
||||
<!--preload-links-->
|
||||
|
@ -1,15 +1,21 @@
|
||||
{
|
||||
"name" : "oa考勤系统",
|
||||
"appid" : "__UNI__70C49A3",
|
||||
"appid" : "__UNI__4796942",
|
||||
"description" : "",
|
||||
"versionName" : "1.1.5",
|
||||
"versionCode" : 115,
|
||||
"versionName" : "1.1.7",
|
||||
"versionCode" : 117,
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus" : {
|
||||
"usingComponents" : true,
|
||||
"nvueStyleCompiler" : "uni-app",
|
||||
"compilerVersion" : 3,
|
||||
"statusbar" : {
|
||||
"immersed" : true
|
||||
},
|
||||
"navigationbar" : {
|
||||
"hidden" : true
|
||||
},
|
||||
"splashscreen" : {
|
||||
"alwaysShowBeforeRender" : true,
|
||||
"waiting" : true,
|
||||
@ -19,7 +25,8 @@
|
||||
/* 模块配置 */
|
||||
"modules" : {
|
||||
"Camera" : {},
|
||||
"Geolocation" : {}
|
||||
"Geolocation" : {},
|
||||
"Push" : {}
|
||||
},
|
||||
/* 应用发布信息 */
|
||||
"distribute" : {
|
||||
@ -76,6 +83,14 @@
|
||||
"appid" : "",
|
||||
"UniversalLinks" : ""
|
||||
}
|
||||
},
|
||||
"push" : {
|
||||
"unipush" : {
|
||||
"version" : "2",
|
||||
"offline" : true,
|
||||
"hms" : {},
|
||||
"vivo" : {}
|
||||
}
|
||||
}
|
||||
},
|
||||
"icons" : {
|
||||
@ -113,6 +128,22 @@
|
||||
"splashscreen" : {
|
||||
"useOriginalMsgbox" : true
|
||||
}
|
||||
},
|
||||
"nativePlugins" : {
|
||||
"KJ-WebView" : {
|
||||
"__plugin_info__" : {
|
||||
"name" : "官方WebView全能扩展、支持plus、vue、nvue里的WebView - [试用版,仅用于自定义调试基座]",
|
||||
"description" : "WebView与原生双向通信交互、传值、js注入、设置获取UserAgent(桌面网站)、原生侧滑返回 、媒体播放自动播放、请试用合适再购买、请试用合适再购买、请试用合适再购买",
|
||||
"platforms" : "Android,iOS",
|
||||
"url" : "https://ext.dcloud.net.cn/plugin?id=9832",
|
||||
"android_package_name" : "",
|
||||
"ios_bundle_id" : "",
|
||||
"isCloud" : true,
|
||||
"bought" : 0,
|
||||
"pid" : "9832",
|
||||
"parameters" : {}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
/* 快应用特有相关 */
|
||||
|
15
pages.json
15
pages.json
@ -3,16 +3,15 @@
|
||||
{
|
||||
"path": "pages/index/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "uni-app",
|
||||
"navigationStyle": "custom"
|
||||
"navigationStyle": "custom",
|
||||
|
||||
"app-plus": {
|
||||
"titleNView": false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
],
|
||||
"globalStyle": {
|
||||
"navigationBarTextStyle": "black",
|
||||
"navigationBarTitleText": "uni-app",
|
||||
"navigationBarBackgroundColor": "#F8F8F8",
|
||||
"backgroundColor": "#F8F8F8"
|
||||
},
|
||||
|
||||
"uniIdRouter": {}
|
||||
}
|
||||
|
@ -1,54 +0,0 @@
|
||||
<template>
|
||||
<div class="content">
|
||||
<web-view class="webview" @onPostMessage="webLoad" :style="{height:`${systemInfo.windowHeight}px`,width:`${systemInfo.windowWidth}`}" ref="webViewRef" :src="config.h5Url"></web-view>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import config from "../../config";
|
||||
import {sendWebWiew,receiveWebView} from "@/utils/communicate";
|
||||
const webViewRef=ref(null)
|
||||
const systemInfo = uni.getSystemInfoSync();
|
||||
// #ifdef APP-ANDROID
|
||||
const permissionListener = uni.createRequestPermissionListener();
|
||||
permissionListener.onRequest((e)=>{
|
||||
})
|
||||
permissionListener.onConfirm((e) => {
|
||||
sendWebWiew(webViewRef.value,{auth:e,open:true})
|
||||
});
|
||||
permissionListener.onComplete((e) => {
|
||||
sendWebWiew(webViewRef.value,{auth:e,open:false})
|
||||
});
|
||||
// #endif
|
||||
const webLoad=(e)=>{
|
||||
const m=receiveWebView(e)
|
||||
switch (m.action) {
|
||||
//webview初始化加载完成
|
||||
case 'load-complete':{
|
||||
|
||||
const systemInfo= uni.getSystemInfoSync()
|
||||
uni.getLocation({
|
||||
type: 'gcj02',
|
||||
geocode: false,
|
||||
isHighAccuracy: false,
|
||||
success:async (res) => {
|
||||
sendWebWiew(webViewRef.value,{...res,systemInfo})
|
||||
},
|
||||
fail: (e) => {
|
||||
console.log(e);
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
.content {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
}
|
||||
</style>
|
3
unpackage/dist/build/.nvue/app.css.js
vendored
3
unpackage/dist/build/.nvue/app.css.js
vendored
@ -4,8 +4,7 @@ var __commonJS = (cb, mod) => function __require() {
|
||||
};
|
||||
var require_app_css = __commonJS({
|
||||
"app.css.js"(exports) {
|
||||
const _style_0 = {};
|
||||
exports.styles = [_style_0];
|
||||
exports.styles = [];
|
||||
}
|
||||
});
|
||||
export default require_app_css();
|
||||
|
84
unpackage/dist/build/.nvue/pages/index/index.js
vendored
84
unpackage/dist/build/.nvue/pages/index/index.js
vendored
@ -1,4 +1,6 @@
|
||||
import { ref, openBlock, createElementBlock, createElementVNode, normalizeStyle, unref } from "vue";
|
||||
import { isInSSRComponentSetup, injectHook, getCurrentInstance, ref, openBlock, createElementBlock, createElementVNode, unref } from "vue";
|
||||
const ON_SHOW = "onShow";
|
||||
const ON_HIDE = "onHide";
|
||||
function formatAppLog(type, filename, ...args) {
|
||||
if (uni.__log__) {
|
||||
uni.__log__(type, filename, ...args);
|
||||
@ -6,19 +8,24 @@ function formatAppLog(type, filename, ...args) {
|
||||
console[type].apply(console, [...args, filename]);
|
||||
}
|
||||
}
|
||||
const createHook = (lifecycle) => (hook, target = getCurrentInstance()) => {
|
||||
!isInSSRComponentSetup && injectHook(lifecycle, hook, target);
|
||||
};
|
||||
const onShow = /* @__PURE__ */ createHook(ON_SHOW);
|
||||
const onHide = /* @__PURE__ */ createHook(ON_HIDE);
|
||||
const env = "dev";
|
||||
const configs = {
|
||||
dev: {
|
||||
apiBaseUrl: "https://warehouse.szjixun.cn/oa_backend",
|
||||
h5Url: "http://192.168.88.35:8080/"
|
||||
h5Url: "http://192.168.0.191:8080/#/"
|
||||
},
|
||||
test: {
|
||||
apiBaseUrl: "https://warehouse.szjixun.cn/oa_backend",
|
||||
h5Url: "http://172.16.100.93:8041/#/"
|
||||
h5Url: "http://114.218.158.24:9051/#/"
|
||||
},
|
||||
prod: {
|
||||
apiBaseUrl: "https://oa.szjixun.cn/api",
|
||||
h5Url: "https://oa.szjixun.cn/#/"
|
||||
apiBaseUrl: "https://oa- a.szjixun.cn/#/",
|
||||
h5Url: "https://oa-a.szjixun.cn/#/"
|
||||
}
|
||||
};
|
||||
const config = configs[env];
|
||||
@ -42,33 +49,55 @@ const sendWebWiew = (refValue, paramValue, callName = "onReceive") => {
|
||||
const receiveWebView = (e) => {
|
||||
return e.detail.data[0];
|
||||
};
|
||||
const _style_0 = { "content": { "": { "display": "flex", "flex": 1 } } };
|
||||
const _export_sfc = (sfc, props) => {
|
||||
const target = sfc.__vccOpts || sfc;
|
||||
for (const [key, val] of props) {
|
||||
target[key] = val;
|
||||
}
|
||||
return target;
|
||||
};
|
||||
uni;
|
||||
const _sfc_main = {
|
||||
__name: "index",
|
||||
setup(__props) {
|
||||
const webViewRef = ref(null);
|
||||
const systemInfo = uni.getSystemInfoSync();
|
||||
uni.getSystemInfoSync();
|
||||
const networkStatusChange = (res) => {
|
||||
if (res.isConnected) {
|
||||
uni.redirectTo({
|
||||
url: "/pages/index/index"
|
||||
});
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: "网络无连接",
|
||||
icon: "none"
|
||||
});
|
||||
}
|
||||
};
|
||||
const handleBackButton = () => {
|
||||
sendWebWiew(webViewRef.value, { turnBack: 1 });
|
||||
};
|
||||
onShow(() => {
|
||||
plus.key.addEventListener("backbutton", handleBackButton, false);
|
||||
uni.onNetworkStatusChange(networkStatusChange);
|
||||
});
|
||||
onHide(() => {
|
||||
plus.key.removeEventListener("backbutton", handleBackButton, false);
|
||||
uni.offNetworkStatusChange(networkStatusChange);
|
||||
});
|
||||
const webLoad = (e) => {
|
||||
const m = receiveWebView(e);
|
||||
switch (m.action) {
|
||||
case "load-complete": {
|
||||
const systemInfo2 = uni.getSystemInfoSync();
|
||||
const systemInfo = uni.getSystemInfoSync();
|
||||
uni.getLocation({
|
||||
type: "gcj02",
|
||||
geocode: false,
|
||||
isHighAccuracy: false,
|
||||
success: async (res) => {
|
||||
sendWebWiew(webViewRef.value, { ...res, systemInfo: systemInfo2 });
|
||||
sendWebWiew(webViewRef.value, {
|
||||
...res,
|
||||
systemInfo,
|
||||
webViewRef: webViewRef.value,
|
||||
"latitude": 31.386561,
|
||||
"longitude": 120.660274
|
||||
});
|
||||
},
|
||||
fail: (e2) => {
|
||||
formatAppLog("log", "at pages/index/index.nvue:38", e2);
|
||||
formatAppLog("log", "at pages/index/index.nvue:89", e2);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -82,21 +111,18 @@ const _sfc_main = {
|
||||
bubble: "true",
|
||||
style: { flexDirection: "column" }
|
||||
}, [
|
||||
createElementVNode("div", { class: "content" }, [
|
||||
createElementVNode("u-web-view", {
|
||||
class: "webview",
|
||||
"on:onPostMessage": webLoad,
|
||||
style: normalizeStyle({ height: `${unref(systemInfo).windowHeight}px`, width: `${unref(systemInfo).windowWidth}` }),
|
||||
ref_key: "webViewRef",
|
||||
ref: webViewRef,
|
||||
src: unref(config).h5Url
|
||||
}, null, 44, ["src"])
|
||||
])
|
||||
createElementVNode("u-web-view", {
|
||||
class: "webview",
|
||||
"on:onPostMessage": webLoad,
|
||||
style: { "flex": "1" },
|
||||
ref_key: "webViewRef",
|
||||
ref: webViewRef,
|
||||
src: unref(config).h5Url
|
||||
}, null, 40, ["src"])
|
||||
]);
|
||||
};
|
||||
}
|
||||
};
|
||||
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["styles", [_style_0]]]);
|
||||
export {
|
||||
index as default
|
||||
_sfc_main as default
|
||||
};
|
||||
|
File diff suppressed because one or more lines are too long
@ -1,9 +1,9 @@
|
||||
|
||||
;(function(){
|
||||
let u=void 0,isReady=false,onReadyCallbacks=[],isServiceReady=false,onServiceReadyCallbacks=[];
|
||||
const __uniConfig = {"pages":[],"globalStyle":{"backgroundColor":"#F8F8F8","navigationBar":{"backgroundColor":"#F8F8F8","titleText":"uni-app","type":"default","titleColor":"#000000"},"isNVue":false},"nvue":{"compiler":"uni-app","styleCompiler":"uni-app","flex-direction":"column"},"renderer":"auto","appname":"oa考勤系统","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":true},"compilerVersion":"4.08","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,"navigationBar":{"titleText":"uni-app","style":"custom","type":"default"},"isNVue":true}}].map(uniRoute=>(uniRoute.meta.route=uniRoute.path,__uniConfig.pages.push(uniRoute.path),uniRoute.path='/'+uniRoute.path,uniRoute));
|
||||
__uniConfig.styles=[{}];//styles
|
||||
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":true}}].map(uniRoute=>(uniRoute.meta.route=uniRoute.path,__uniConfig.pages.push(uniRoute.path),uniRoute.path='/'+uniRoute.path,uniRoute));
|
||||
__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.onServiceReady=function(callback){if(__uniConfig.serviceReady){callback()}else{onServiceReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"serviceReady",{get:function(){return isServiceReady},set:function(val){isServiceReady=val;if(!isServiceReady){return}const callbacks=onServiceReadyCallbacks.slice(0);onServiceReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
|
||||
service.register("uni-app-config",{create(a,b,c){if(!__uniConfig.viewport){var d=b.weex.config.env.scale,e=b.weex.config.env.deviceWidth,f=Math.ceil(e/d);Object.assign(__uniConfig,{viewport:f,defaultFontSize:16})}return{instance:{__uniConfig:__uniConfig,__uniRoutes:__uniRoutes,global:u,window:u,document:u,frames:u,self:u,location:u,navigator:u,localStorage:u,history:u,Caches:u,screen:u,alert:u,confirm:u,prompt:u,fetch:u,XMLHttpRequest:u,WebSocket:u,webkit:u,print:u}}}});
|
||||
|
2
unpackage/dist/build/app-plus/app-service.js
vendored
2
unpackage/dist/build/app-plus/app-service.js
vendored
File diff suppressed because one or more lines are too long
2
unpackage/dist/build/app-plus/app.css
vendored
2
unpackage/dist/build/app-plus/app.css
vendored
File diff suppressed because one or more lines are too long
44
unpackage/dist/build/app-plus/manifest.json
vendored
44
unpackage/dist/build/app-plus/manifest.json
vendored
@ -4,11 +4,11 @@
|
||||
"iPhone",
|
||||
"iPad"
|
||||
],
|
||||
"id": "__UNI__70C49A3",
|
||||
"id": "__UNI__4796942",
|
||||
"name": "oa考勤系统",
|
||||
"version": {
|
||||
"name": "1.1.5",
|
||||
"code": 115
|
||||
"name": "1.1.7",
|
||||
"code": 117
|
||||
},
|
||||
"description": "",
|
||||
"developer": {
|
||||
@ -19,6 +19,7 @@
|
||||
"permissions": {
|
||||
"Camera": {},
|
||||
"Geolocation": {},
|
||||
"Push": {},
|
||||
"UniNView": {
|
||||
"description": "UniNView原生渲染"
|
||||
}
|
||||
@ -46,6 +47,14 @@
|
||||
"usingComponents": true,
|
||||
"nvueStyleCompiler": "uni-app",
|
||||
"compilerVersion": 3,
|
||||
"statusbar": {
|
||||
"immersed": "supportedDevice",
|
||||
"style": "dark",
|
||||
"background": "#000000"
|
||||
},
|
||||
"navigationbar": {
|
||||
"hidden": true
|
||||
},
|
||||
"distribute": {
|
||||
"icons": {
|
||||
"android": {
|
||||
@ -142,6 +151,14 @@
|
||||
"UniversalLinks": ""
|
||||
}
|
||||
},
|
||||
"push": {
|
||||
"unipush": {
|
||||
"version": "2",
|
||||
"offline": true,
|
||||
"hms": {},
|
||||
"vivo": {}
|
||||
}
|
||||
},
|
||||
"audio": {
|
||||
"mp3": {
|
||||
"description": "Android平台录音支持MP3格式文件"
|
||||
@ -149,10 +166,21 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"statusbar": {
|
||||
"immersed": "supportedDevice",
|
||||
"style": "dark",
|
||||
"background": "#F8F8F8"
|
||||
"nativePlugins": {
|
||||
"KJ-WebView": {
|
||||
"__plugin_info__": {
|
||||
"name": "官方WebView全能扩展、支持plus、vue、nvue里的WebView - [试用版,仅用于自定义调试基座]",
|
||||
"description": "WebView与原生双向通信交互、传值、js注入、设置获取UserAgent(桌面网站)、原生侧滑返回 、媒体播放自动播放、请试用合适再购买、请试用合适再购买、请试用合适再购买",
|
||||
"platforms": "Android,iOS",
|
||||
"url": "https://ext.dcloud.net.cn/plugin?id=9832",
|
||||
"android_package_name": "",
|
||||
"ios_bundle_id": "",
|
||||
"isCloud": true,
|
||||
"bought": 0,
|
||||
"pid": "9832",
|
||||
"parameters": {}
|
||||
}
|
||||
}
|
||||
},
|
||||
"uniStatistics": {
|
||||
"enable": false
|
||||
@ -161,7 +189,7 @@
|
||||
"uni-app": {
|
||||
"control": "uni-v3",
|
||||
"vueVersion": "3",
|
||||
"compilerVersion": "4.08",
|
||||
"compilerVersion": "4.15",
|
||||
"nvueCompiler": "uni-app",
|
||||
"renderer": "auto",
|
||||
"nvue": {
|
||||
|
@ -29,4 +29,4 @@ if (typeof uni !== 'undefined' && uni && uni.requireGlobal) {
|
||||
};
|
||||
|
||||
|
||||
(()=>{var S=Object.create;var _=Object.defineProperty,j=Object.defineProperties,J=Object.getOwnPropertyDescriptor,k=Object.getOwnPropertyDescriptors,I=Object.getOwnPropertyNames,w=Object.getOwnPropertySymbols,U=Object.getPrototypeOf,y=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable;var h=(t,e,o)=>e in t?_(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,g=(t,e)=>{for(var o in e||(e={}))y.call(e,o)&&h(t,o,e[o]);if(w)for(var o of w(e))A.call(e,o)&&h(t,o,e[o]);return t},v=(t,e)=>j(t,k(e));var B=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var $=(t,e,o,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of I(e))!y.call(t,s)&&s!==o&&_(t,s,{get:()=>e[s],enumerable:!(n=J(e,s))||n.enumerable});return t};var z=(t,e,o)=>(o=t!=null?S(U(t)):{},$(e||!t||!t.__esModule?_(o,"default",{value:t,enumerable:!0}):o,t));var m=(t,e,o)=>new Promise((n,s)=>{var u=c=>{try{i(o.next(c))}catch(d){s(d)}},p=c=>{try{i(o.throw(c))}catch(d){s(d)}},i=c=>c.done?n(c.value):Promise.resolve(c.value).then(u,p);i((o=o.apply(t,e)).next())});var b=B((D,x)=>{x.exports=Vue});var r=z(b());function a(t,e,...o){uni.__log__?uni.__log__(t,e,...o):console[t].apply(console,[...o,e])}var T="dev",V={dev:{apiBaseUrl:"https://warehouse.szjixun.cn/oa_backend",h5Url:"http://192.168.88.35:8080/"},test:{apiBaseUrl:"https://warehouse.szjixun.cn/oa_backend",h5Url:"http://172.16.100.93:8041/#/"},prod:{apiBaseUrl:"https://oa.szjixun.cn/api",h5Url:"https://oa.szjixun.cn/#/"}},W=V[T],C=(t,e,o="onReceive")=>{if(!t){a("error","at utils/communicate/index.js:3","evalJs: The reference to the webview is not provided or is null.");return}if(typeof t.evalJs!="function"){a("error","at utils/communicate/index.js:8","evalJs: The evalJs method is not available on the provided reference.");return}try{let n=JSON.stringify(e),s=`window.${o}(${n})`;t.evalJs(s)}catch(n){a("error","at utils/communicate/index.js:18","evalJs: An error occurred while trying to stringify the parameter value or while invoking evalJs.",n)}},L=t=>t.detail.data[0],N={content:{"":{display:"flex",flex:1}}},O=(t,e)=>{let o=t.__vccOpts||t;for(let[n,s]of e)o[n]=s;return o},P={__name:"index",setup(t){let e=(0,r.ref)(null),o=uni.getSystemInfoSync(),n=s=>{switch(L(s).action){case"load-complete":{let p=uni.getSystemInfoSync();uni.getLocation({type:"gcj02",geocode:!1,isHighAccuracy:!1,success:i=>m(this,null,function*(){C(e.value,v(g({},i),{systemInfo:p}))}),fail:i=>{a("log","at pages/index/index.nvue:38",i)}})}}};return(s,u)=>((0,r.openBlock)(),(0,r.createElementBlock)("scroll-view",{scrollY:!0,showScrollbar:!0,enableBackToTop:!0,bubble:"true",style:{flexDirection:"column"}},[(0,r.createElementVNode)("div",{class:"content"},[(0,r.createElementVNode)("u-web-view",{class:"webview","on:onPostMessage":n,style:(0,r.normalizeStyle)({height:`${(0,r.unref)(o).windowHeight}px`,width:`${(0,r.unref)(o).windowWidth}`}),ref_key:"webViewRef",ref:e,src:(0,r.unref)(W).h5Url},null,44,["src"])])]))}},l=O(P,[["styles",[N]]]);var f=plus.webview.currentWebview();if(f){let t=parseInt(f.id),e="pages/index/index",o={};try{o=JSON.parse(f.__query__)}catch(s){}l.mpType="page";let n=Vue.createPageApp(l,{$store:getApp({allowDefault:!0}).$store,__pageId:t,__pagePath:e,__pageQuery:o});n.provide("__globalStyles",Vue.useCssStyles([...__uniConfig.styles,...l.styles||[]])),n.mount("#root")}})();
|
||||
(()=>{var j=Object.create;var f=Object.defineProperty,B=Object.defineProperties,C=Object.getOwnPropertyDescriptor,J=Object.getOwnPropertyDescriptors,I=Object.getOwnPropertyNames,_=Object.getOwnPropertySymbols,H=Object.getPrototypeOf,g=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;var h=(t,e,n)=>e in t?f(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,v=(t,e)=>{for(var n in e||(e={}))g.call(e,n)&&h(t,n,e[n]);if(_)for(var n of _(e))N.call(e,n)&&h(t,n,e[n]);return t},m=(t,e)=>B(t,J(e));var T=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var U=(t,e,n,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of I(e))!g.call(t,r)&&r!==n&&f(t,r,{get:()=>e[r],enumerable:!(s=C(e,r))||s.enumerable});return t};var A=(t,e,n)=>(n=t!=null?j(H(t)):{},U(e||!t||!t.__esModule?f(n,"default",{value:t,enumerable:!0}):n,t));var y=(t,e,n)=>new Promise((s,r)=>{var a=i=>{try{c(n.next(i))}catch(d){r(d)}},p=i=>{try{c(n.throw(i))}catch(d){r(d)}},c=i=>i.done?s(i.value):Promise.resolve(i.value).then(a,p);c((n=n.apply(t,e)).next())});var x=T((P,b)=>{b.exports=Vue});var o=A(x());var V="onShow",E="onHide";function l(t,e,...n){uni.__log__?uni.__log__(t,e,...n):console[t].apply(console,[...n,e])}var k=t=>(e,n=(0,o.getCurrentInstance)())=>{!o.isInSSRComponentSetup&&(0,o.injectHook)(t,e,n)},L=k(V),O=k(E),R="dev",W={dev:{apiBaseUrl:"https://warehouse.szjixun.cn/oa_backend",h5Url:"http://192.168.0.191:8080/#/"},test:{apiBaseUrl:"https://warehouse.szjixun.cn/oa_backend",h5Url:"http://114.218.158.24:9051/#/"},prod:{apiBaseUrl:"https://oa- a.szjixun.cn/#/",h5Url:"https://oa-a.szjixun.cn/#/"}},z=W[R],S=(t,e,n="onReceive")=>{if(!t){l("error","at utils/communicate/index.js:3","evalJs: The reference to the webview is not provided or is null.");return}if(typeof t.evalJs!="function"){l("error","at utils/communicate/index.js:8","evalJs: The evalJs method is not available on the provided reference.");return}try{let s=JSON.stringify(e),r=`window.${n}(${s})`;t.evalJs(r)}catch(s){l("error","at utils/communicate/index.js:18","evalJs: An error occurred while trying to stringify the parameter value or while invoking evalJs.",s)}},$=t=>t.detail.data[0];uni;var u={__name:"index",setup(t){let e=(0,o.ref)(null);uni.getSystemInfoSync();let n=a=>{a.isConnected?uni.redirectTo({url:"/pages/index/index"}):uni.showToast({title:"\u7F51\u7EDC\u65E0\u8FDE\u63A5",icon:"none"})},s=()=>{S(e.value,{turnBack:1})};L(()=>{plus.key.addEventListener("backbutton",s,!1),uni.onNetworkStatusChange(n)}),O(()=>{plus.key.removeEventListener("backbutton",s,!1),uni.offNetworkStatusChange(n)});let r=a=>{switch($(a).action){case"load-complete":{let c=uni.getSystemInfoSync();uni.getLocation({type:"gcj02",geocode:!1,isHighAccuracy:!1,success:i=>y(this,null,function*(){S(e.value,m(v({},i),{systemInfo:c,webViewRef:e.value,latitude:31.386561,longitude:120.660274}))}),fail:i=>{l("log","at pages/index/index.nvue:89",i)}})}}};return(a,p)=>((0,o.openBlock)(),(0,o.createElementBlock)("scroll-view",{scrollY:!0,showScrollbar:!0,enableBackToTop:!0,bubble:"true",style:{flexDirection:"column"}},[(0,o.createElementVNode)("u-web-view",{class:"webview","on:onPostMessage":r,style:{flex:"1"},ref_key:"webViewRef",ref:e,src:(0,o.unref)(z).h5Url},null,40,["src"])]))}};var w=plus.webview.currentWebview();if(w){let t=parseInt(w.id),e="pages/index/index",n={};try{n=JSON.parse(w.__query__)}catch(r){}u.mpType="page";let s=Vue.createPageApp(u,{$store:getApp({allowDefault:!0}).$store,__pageId:t,__pagePath:e,__pageQuery:n});s.provide("__globalStyles",Vue.useCssStyles([...__uniConfig.styles,...u.styles||[]])),s.mount("#root")}})();
|
||||
|
File diff suppressed because one or more lines are too long
3
unpackage/dist/dev/.nvue/app.css.js
vendored
3
unpackage/dist/dev/.nvue/app.css.js
vendored
@ -4,8 +4,7 @@ var __commonJS = (cb, mod) => function __require() {
|
||||
};
|
||||
var require_app_css = __commonJS({
|
||||
"app.css.js"(exports) {
|
||||
const _style_0 = {};
|
||||
exports.styles = [_style_0];
|
||||
exports.styles = [];
|
||||
}
|
||||
});
|
||||
export default require_app_css();
|
||||
|
3
unpackage/dist/dev/.nvue/app.js
vendored
3
unpackage/dist/dev/.nvue/app.js
vendored
@ -1,5 +1,2 @@
|
||||
Promise.resolve("./pages/index/index.js").then((res) => {
|
||||
res.length;
|
||||
});
|
||||
Promise.resolve("./app.css.js").then(() => {
|
||||
});
|
||||
|
102
unpackage/dist/dev/.nvue/pages/index/index.js
vendored
102
unpackage/dist/dev/.nvue/pages/index/index.js
vendored
@ -1,102 +0,0 @@
|
||||
import { ref, openBlock, createElementBlock, createElementVNode, normalizeStyle, unref } from "vue";
|
||||
function formatAppLog(type, filename, ...args) {
|
||||
if (uni.__log__) {
|
||||
uni.__log__(type, filename, ...args);
|
||||
} else {
|
||||
console[type].apply(console, [...args, filename]);
|
||||
}
|
||||
}
|
||||
const env = "dev";
|
||||
const configs = {
|
||||
dev: {
|
||||
apiBaseUrl: "https://warehouse.szjixun.cn/oa_backend",
|
||||
h5Url: "http://192.168.88.35:8080/"
|
||||
},
|
||||
test: {
|
||||
apiBaseUrl: "https://warehouse.szjixun.cn/oa_backend",
|
||||
h5Url: "http://172.16.100.93:8041/#/"
|
||||
},
|
||||
prod: {
|
||||
apiBaseUrl: "https://oa.szjixun.cn/api",
|
||||
h5Url: "https://oa.szjixun.cn/#/"
|
||||
}
|
||||
};
|
||||
const config = configs[env];
|
||||
const sendWebWiew = (refValue, paramValue, callName = "onReceive") => {
|
||||
if (!refValue) {
|
||||
formatAppLog("error", "at utils/communicate/index.js:3", "evalJs: The reference to the webview is not provided or is null.");
|
||||
return;
|
||||
}
|
||||
if (typeof refValue.evalJs !== "function") {
|
||||
formatAppLog("error", "at utils/communicate/index.js:8", "evalJs: The evalJs method is not available on the provided reference.");
|
||||
return;
|
||||
}
|
||||
try {
|
||||
const jsonString = JSON.stringify(paramValue);
|
||||
const jsCode = `window.${callName}(${jsonString})`;
|
||||
refValue.evalJs(jsCode);
|
||||
} catch (error) {
|
||||
formatAppLog("error", "at utils/communicate/index.js:18", "evalJs: An error occurred while trying to stringify the parameter value or while invoking evalJs.", error);
|
||||
}
|
||||
};
|
||||
const receiveWebView = (e) => {
|
||||
return e.detail.data[0];
|
||||
};
|
||||
const _style_0 = { "content": { "": { "display": "flex", "flex": 1 } } };
|
||||
const _export_sfc = (sfc, props) => {
|
||||
const target = sfc.__vccOpts || sfc;
|
||||
for (const [key, val] of props) {
|
||||
target[key] = val;
|
||||
}
|
||||
return target;
|
||||
};
|
||||
const _sfc_main = {
|
||||
__name: "index",
|
||||
setup(__props) {
|
||||
const webViewRef = ref(null);
|
||||
const systemInfo = uni.getSystemInfoSync();
|
||||
const webLoad = (e) => {
|
||||
const m = receiveWebView(e);
|
||||
switch (m.action) {
|
||||
case "load-complete": {
|
||||
const systemInfo2 = uni.getSystemInfoSync();
|
||||
uni.getLocation({
|
||||
type: "gcj02",
|
||||
geocode: false,
|
||||
isHighAccuracy: false,
|
||||
success: async (res) => {
|
||||
sendWebWiew(webViewRef.value, { ...res, systemInfo: systemInfo2 });
|
||||
},
|
||||
fail: (e2) => {
|
||||
formatAppLog("log", "at pages/index/index.nvue:38", e2);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
return openBlock(), createElementBlock("scroll-view", {
|
||||
scrollY: true,
|
||||
showScrollbar: true,
|
||||
enableBackToTop: true,
|
||||
bubble: "true",
|
||||
style: { flexDirection: "column" }
|
||||
}, [
|
||||
createElementVNode("div", { class: "content" }, [
|
||||
createElementVNode("u-web-view", {
|
||||
class: "webview",
|
||||
"on:onPostMessage": webLoad,
|
||||
style: normalizeStyle({ height: `${unref(systemInfo).windowHeight}px`, width: `${unref(systemInfo).windowWidth}` }),
|
||||
ref_key: "webViewRef",
|
||||
ref: webViewRef,
|
||||
src: unref(config).h5Url
|
||||
}, null, 44, ["src"])
|
||||
])
|
||||
]);
|
||||
};
|
||||
}
|
||||
};
|
||||
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["styles", [_style_0]], ["__file", "D:/WebstormProjects/oa-base/pages/index/index.nvue"]]);
|
||||
export {
|
||||
index as default
|
||||
};
|
File diff suppressed because one or more lines are too long
@ -1,9 +1,9 @@
|
||||
|
||||
;(function(){
|
||||
let u=void 0,isReady=false,onReadyCallbacks=[],isServiceReady=false,onServiceReadyCallbacks=[];
|
||||
const __uniConfig = {"pages":[],"globalStyle":{"backgroundColor":"#F8F8F8","navigationBar":{"backgroundColor":"#F8F8F8","titleText":"uni-app","type":"default","titleColor":"#000000"},"isNVue":false},"nvue":{"compiler":"uni-app","styleCompiler":"uni-app","flex-direction":"column"},"renderer":"auto","appname":"oa考勤系统","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":true},"compilerVersion":"4.08","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,"navigationBar":{"titleText":"uni-app","style":"custom","type":"default"},"isNVue":true}}].map(uniRoute=>(uniRoute.meta.route=uniRoute.path,__uniConfig.pages.push(uniRoute.path),uniRoute.path='/'+uniRoute.path,uniRoute));
|
||||
__uniConfig.styles=[{}];//styles
|
||||
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));
|
||||
__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.onServiceReady=function(callback){if(__uniConfig.serviceReady){callback()}else{onServiceReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"serviceReady",{get:function(){return isServiceReady},set:function(val){isServiceReady=val;if(!isServiceReady){return}const callbacks=onServiceReadyCallbacks.slice(0);onServiceReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
|
||||
service.register("uni-app-config",{create(a,b,c){if(!__uniConfig.viewport){var d=b.weex.config.env.scale,e=b.weex.config.env.deviceWidth,f=Math.ceil(e/d);Object.assign(__uniConfig,{viewport:f,defaultFontSize:16})}return{instance:{__uniConfig:__uniConfig,__uniRoutes:__uniRoutes,global:u,window:u,document:u,frames:u,self:u,location:u,navigator:u,localStorage:u,history:u,Caches:u,screen:u,alert:u,confirm:u,prompt:u,fetch:u,XMLHttpRequest:u,WebSocket:u,webkit:u,print:u}}}});
|
||||
|
2878
unpackage/dist/dev/app-plus/app-service.js
vendored
2878
unpackage/dist/dev/app-plus/app-service.js
vendored
File diff suppressed because it is too large
Load Diff
4
unpackage/dist/dev/app-plus/app.css
vendored
4
unpackage/dist/dev/app-plus/app.css
vendored
File diff suppressed because one or more lines are too long
52
unpackage/dist/dev/app-plus/manifest.json
vendored
52
unpackage/dist/dev/app-plus/manifest.json
vendored
@ -4,11 +4,11 @@
|
||||
"iPhone",
|
||||
"iPad"
|
||||
],
|
||||
"id": "__UNI__70C49A3",
|
||||
"id": "__UNI__4796942",
|
||||
"name": "oa考勤系统",
|
||||
"version": {
|
||||
"name": "1.1.5",
|
||||
"code": 115
|
||||
"name": "1.1.7",
|
||||
"code": 117
|
||||
},
|
||||
"description": "",
|
||||
"developer": {
|
||||
@ -19,6 +19,7 @@
|
||||
"permissions": {
|
||||
"Camera": {},
|
||||
"Geolocation": {},
|
||||
"Push": {},
|
||||
"UniNView": {
|
||||
"description": "UniNView原生渲染"
|
||||
}
|
||||
@ -38,14 +39,19 @@
|
||||
"launchwebview": {
|
||||
"render": "always",
|
||||
"id": "1",
|
||||
"kernel": "WKWebview",
|
||||
"uniNView": {
|
||||
"path": "pages/index/index.js"
|
||||
}
|
||||
"kernel": "WKWebview"
|
||||
},
|
||||
"usingComponents": true,
|
||||
"nvueStyleCompiler": "uni-app",
|
||||
"compilerVersion": 3,
|
||||
"statusbar": {
|
||||
"immersed": "supportedDevice",
|
||||
"style": "dark",
|
||||
"background": "#000000"
|
||||
},
|
||||
"navigationbar": {
|
||||
"hidden": true
|
||||
},
|
||||
"distribute": {
|
||||
"icons": {
|
||||
"android": {
|
||||
@ -142,6 +148,14 @@
|
||||
"UniversalLinks": ""
|
||||
}
|
||||
},
|
||||
"push": {
|
||||
"unipush": {
|
||||
"version": "2",
|
||||
"offline": true,
|
||||
"hms": {},
|
||||
"vivo": {}
|
||||
}
|
||||
},
|
||||
"audio": {
|
||||
"mp3": {
|
||||
"description": "Android平台录音支持MP3格式文件"
|
||||
@ -149,10 +163,21 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"statusbar": {
|
||||
"immersed": "supportedDevice",
|
||||
"style": "dark",
|
||||
"background": "#F8F8F8"
|
||||
"nativePlugins": {
|
||||
"KJ-WebView": {
|
||||
"__plugin_info__": {
|
||||
"name": "官方WebView全能扩展、支持plus、vue、nvue里的WebView - [试用版,仅用于自定义调试基座]",
|
||||
"description": "WebView与原生双向通信交互、传值、js注入、设置获取UserAgent(桌面网站)、原生侧滑返回 、媒体播放自动播放、请试用合适再购买、请试用合适再购买、请试用合适再购买",
|
||||
"platforms": "Android,iOS",
|
||||
"url": "https://ext.dcloud.net.cn/plugin?id=9832",
|
||||
"android_package_name": "",
|
||||
"ios_bundle_id": "",
|
||||
"isCloud": true,
|
||||
"bought": 0,
|
||||
"pid": "9832",
|
||||
"parameters": {}
|
||||
}
|
||||
}
|
||||
},
|
||||
"uniStatistics": {
|
||||
"enable": false
|
||||
@ -161,7 +186,7 @@
|
||||
"uni-app": {
|
||||
"control": "uni-v3",
|
||||
"vueVersion": "3",
|
||||
"compilerVersion": "4.08",
|
||||
"compilerVersion": "4.15",
|
||||
"nvueCompiler": "uni-app",
|
||||
"renderer": "auto",
|
||||
"nvue": {
|
||||
@ -172,5 +197,6 @@
|
||||
"minUserAgentVersion": "49.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"launch_path": "__uniappview.html"
|
||||
}
|
219
unpackage/dist/dev/app-plus/pages/index/index.js
vendored
219
unpackage/dist/dev/app-plus/pages/index/index.js
vendored
@ -1,219 +0,0 @@
|
||||
"use weex:vue";
|
||||
|
||||
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
|
||||
};
|
||||
|
||||
|
||||
(() => {
|
||||
var __create = Object.create;
|
||||
var __defProp = Object.defineProperty;
|
||||
var __defProps = Object.defineProperties;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
||||
var __getProtoOf = Object.getPrototypeOf;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
||||
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
||||
var __spreadValues = (a, b) => {
|
||||
for (var prop in b || (b = {}))
|
||||
if (__hasOwnProp.call(b, prop))
|
||||
__defNormalProp(a, prop, b[prop]);
|
||||
if (__getOwnPropSymbols)
|
||||
for (var prop of __getOwnPropSymbols(b)) {
|
||||
if (__propIsEnum.call(b, prop))
|
||||
__defNormalProp(a, prop, b[prop]);
|
||||
}
|
||||
return a;
|
||||
};
|
||||
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
||||
var __commonJS = (cb, mod) => function __require() {
|
||||
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
||||
// If the importer is in node compatibility mode or this is not an ESM
|
||||
// file that has been converted to a CommonJS file using a Babel-
|
||||
// compatible transform (i.e. "__esModule" has not been set), then set
|
||||
// "default" to the CommonJS "module.exports" for node compatibility.
|
||||
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
||||
mod
|
||||
));
|
||||
var __async = (__this, __arguments, generator) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
var fulfilled = (value) => {
|
||||
try {
|
||||
step(generator.next(value));
|
||||
} catch (e) {
|
||||
reject(e);
|
||||
}
|
||||
};
|
||||
var rejected = (value) => {
|
||||
try {
|
||||
step(generator.throw(value));
|
||||
} catch (e) {
|
||||
reject(e);
|
||||
}
|
||||
};
|
||||
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
||||
step((generator = generator.apply(__this, __arguments)).next());
|
||||
});
|
||||
};
|
||||
|
||||
// vue-ns:vue
|
||||
var require_vue = __commonJS({
|
||||
"vue-ns:vue"(exports, module) {
|
||||
module.exports = Vue;
|
||||
}
|
||||
});
|
||||
|
||||
// D:/WebstormProjects/oa-base/unpackage/dist/dev/.nvue/pages/index/index.js
|
||||
var import_vue = __toESM(require_vue());
|
||||
function formatAppLog(type, filename, ...args) {
|
||||
if (uni.__log__) {
|
||||
uni.__log__(type, filename, ...args);
|
||||
} else {
|
||||
console[type].apply(console, [...args, filename]);
|
||||
}
|
||||
}
|
||||
var env = "dev";
|
||||
var configs = {
|
||||
dev: {
|
||||
apiBaseUrl: "https://warehouse.szjixun.cn/oa_backend",
|
||||
h5Url: "http://192.168.88.35:8080/"
|
||||
},
|
||||
test: {
|
||||
apiBaseUrl: "https://warehouse.szjixun.cn/oa_backend",
|
||||
h5Url: "http://172.16.100.93:8041/#/"
|
||||
},
|
||||
prod: {
|
||||
apiBaseUrl: "https://oa.szjixun.cn/api",
|
||||
h5Url: "https://oa.szjixun.cn/#/"
|
||||
}
|
||||
};
|
||||
var config = configs[env];
|
||||
var sendWebWiew = (refValue, paramValue, callName = "onReceive") => {
|
||||
if (!refValue) {
|
||||
formatAppLog("error", "at utils/communicate/index.js:3", "evalJs: The reference to the webview is not provided or is null.");
|
||||
return;
|
||||
}
|
||||
if (typeof refValue.evalJs !== "function") {
|
||||
formatAppLog("error", "at utils/communicate/index.js:8", "evalJs: The evalJs method is not available on the provided reference.");
|
||||
return;
|
||||
}
|
||||
try {
|
||||
const jsonString = JSON.stringify(paramValue);
|
||||
const jsCode = `window.${callName}(${jsonString})`;
|
||||
refValue.evalJs(jsCode);
|
||||
} catch (error) {
|
||||
formatAppLog("error", "at utils/communicate/index.js:18", "evalJs: An error occurred while trying to stringify the parameter value or while invoking evalJs.", error);
|
||||
}
|
||||
};
|
||||
var receiveWebView = (e) => {
|
||||
return e.detail.data[0];
|
||||
};
|
||||
var _style_0 = { "content": { "": { "display": "flex", "flex": 1 } } };
|
||||
var _export_sfc = (sfc, props) => {
|
||||
const target = sfc.__vccOpts || sfc;
|
||||
for (const [key, val] of props) {
|
||||
target[key] = val;
|
||||
}
|
||||
return target;
|
||||
};
|
||||
var _sfc_main = {
|
||||
__name: "index",
|
||||
setup(__props) {
|
||||
const webViewRef = (0, import_vue.ref)(null);
|
||||
const systemInfo = uni.getSystemInfoSync();
|
||||
const webLoad = (e) => {
|
||||
const m = receiveWebView(e);
|
||||
switch (m.action) {
|
||||
case "load-complete": {
|
||||
const systemInfo2 = uni.getSystemInfoSync();
|
||||
uni.getLocation({
|
||||
type: "gcj02",
|
||||
geocode: false,
|
||||
isHighAccuracy: false,
|
||||
success: (res) => __async(this, null, function* () {
|
||||
sendWebWiew(webViewRef.value, __spreadProps(__spreadValues({}, res), { systemInfo: systemInfo2 }));
|
||||
}),
|
||||
fail: (e2) => {
|
||||
formatAppLog("log", "at pages/index/index.nvue:38", e2);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
return (0, import_vue.openBlock)(), (0, import_vue.createElementBlock)("scroll-view", {
|
||||
scrollY: true,
|
||||
showScrollbar: true,
|
||||
enableBackToTop: true,
|
||||
bubble: "true",
|
||||
style: { flexDirection: "column" }
|
||||
}, [
|
||||
(0, import_vue.createElementVNode)("div", { class: "content" }, [
|
||||
(0, import_vue.createElementVNode)("u-web-view", {
|
||||
class: "webview",
|
||||
"on:onPostMessage": webLoad,
|
||||
style: (0, import_vue.normalizeStyle)({ height: `${(0, import_vue.unref)(systemInfo).windowHeight}px`, width: `${(0, import_vue.unref)(systemInfo).windowWidth}` }),
|
||||
ref_key: "webViewRef",
|
||||
ref: webViewRef,
|
||||
src: (0, import_vue.unref)(config).h5Url
|
||||
}, null, 44, ["src"])
|
||||
])
|
||||
]);
|
||||
};
|
||||
}
|
||||
};
|
||||
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["styles", [_style_0]], ["__file", "D:/WebstormProjects/oa-base/pages/index/index.nvue"]]);
|
||||
|
||||
// <stdin>
|
||||
var webview = plus.webview.currentWebview();
|
||||
if (webview) {
|
||||
const __pageId = parseInt(webview.id);
|
||||
const __pagePath = "pages/index/index";
|
||||
let __pageQuery = {};
|
||||
try {
|
||||
__pageQuery = JSON.parse(webview.__query__);
|
||||
} catch (e) {
|
||||
}
|
||||
index.mpType = "page";
|
||||
const app = Vue.createPageApp(index, { $store: getApp({ allowDefault: true }).$store, __pageId, __pagePath, __pageQuery });
|
||||
app.provide("__globalStyles", Vue.useCssStyles([...__uniConfig.styles, ...index.styles || []]));
|
||||
app.mount("#root");
|
||||
}
|
||||
})();
|
File diff suppressed because one or more lines are too long
@ -3,7 +3,7 @@ const sendWebWiew = (refValue, paramValue, callName = 'onReceive') => {
|
||||
console.error('evalJs: The reference to the webview is not provided or is null.');
|
||||
return;
|
||||
}
|
||||
|
||||
console.log('测试',refValue.evalJs);
|
||||
if (typeof refValue.evalJs !== 'function') {
|
||||
console.error('evalJs: The evalJs method is not available on the provided reference.');
|
||||
return;
|
||||
|
@ -1,175 +0,0 @@
|
||||
! function (e, n) {
|
||||
"object" == typeof exports && "undefined" != typeof module ? module.exports = n() : "function" == typeof define && define.amd ? define(n) : (e = e || self).webUni = n()
|
||||
}(this, (function () {
|
||||
"use strict";
|
||||
try {
|
||||
var e = {};
|
||||
Object.defineProperty(e, "passive", {
|
||||
get: function () {
|
||||
!0
|
||||
}
|
||||
}), window.addEventListener("test-passive", null, e)
|
||||
} catch (e) { }
|
||||
var n = Object.prototype.hasOwnProperty;
|
||||
|
||||
function t (e, t) {
|
||||
return n.call(e, t)
|
||||
}
|
||||
var i = [],
|
||||
a = function (e, n) {
|
||||
var t = {
|
||||
options: {
|
||||
timestamp: +new Date
|
||||
},
|
||||
name: e,
|
||||
arg: n
|
||||
};
|
||||
if (window.__dcloud_weex_postMessage || window.__dcloud_weex_) {
|
||||
if ("postMessage" === e) {
|
||||
var a = {
|
||||
data: [n]
|
||||
};
|
||||
return window.__dcloud_weex_postMessage ? window.__dcloud_weex_postMessage(a) : window.__dcloud_weex_.postMessage(JSON.stringify(a))
|
||||
}
|
||||
var o = {
|
||||
type: "WEB_INVOKE_APPSERVICE",
|
||||
args: {
|
||||
data: t,
|
||||
webviewIds: i
|
||||
}
|
||||
};
|
||||
window.__dcloud_weex_postMessage ? window.__dcloud_weex_postMessageToService(o) : window.__dcloud_weex_.postMessageToService(JSON.stringify(o))
|
||||
}
|
||||
if (!window.plus) return window.parent.postMessage({
|
||||
type: "WEB_INVOKE_APPSERVICE",
|
||||
data: t,
|
||||
pageId: ""
|
||||
}, "*");
|
||||
if (0 === i.length) {
|
||||
var r = plus.webview.currentWebview();
|
||||
if (!r) throw new Error("plus.webview.currentWebview() is undefined");
|
||||
var d = r.parent(),
|
||||
s = "";
|
||||
s = d ? d.id : r.id, i.push(s)
|
||||
}
|
||||
if (plus.webview.getWebviewById("__uniapp__service")) plus.webview.postMessageToUniNView({
|
||||
type: "WEB_INVOKE_APPSERVICE",
|
||||
args: {
|
||||
data: t,
|
||||
webviewIds: i
|
||||
}
|
||||
}, "__uniapp__service");
|
||||
else {
|
||||
var w = JSON.stringify(t);
|
||||
plus.webview.getLaunchWebview().evalJS('UniPlusBridge.subscribeHandler("'.concat("WEB_INVOKE_APPSERVICE", '",').concat(w, ",").concat(JSON.stringify(i), ");"))
|
||||
}
|
||||
},
|
||||
o = {
|
||||
navigateTo: function () {
|
||||
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
|
||||
n = e.url;
|
||||
a("navigateTo", {
|
||||
url: encodeURI(n)
|
||||
})
|
||||
},
|
||||
navigateBack: function () {
|
||||
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
|
||||
n = e.delta;
|
||||
a("navigateBack", {
|
||||
delta: parseInt(n) || 1
|
||||
})
|
||||
},
|
||||
switchTab: function () {
|
||||
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
|
||||
n = e.url;
|
||||
a("switchTab", {
|
||||
url: encodeURI(n)
|
||||
})
|
||||
},
|
||||
reLaunch: function () {
|
||||
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
|
||||
n = e.url;
|
||||
a("reLaunch", {
|
||||
url: encodeURI(n)
|
||||
})
|
||||
},
|
||||
redirectTo: function () {
|
||||
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
|
||||
n = e.url;
|
||||
a("redirectTo", {
|
||||
url: encodeURI(n)
|
||||
})
|
||||
},
|
||||
getEnv: function (e) {
|
||||
window.plus ? e({
|
||||
plus: !0
|
||||
}) : e({
|
||||
h5: !0
|
||||
})
|
||||
},
|
||||
postMessage: function () {
|
||||
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
|
||||
a("postMessage", e.data || {})
|
||||
}
|
||||
},
|
||||
r = /uni-app/i.test(navigator.userAgent),
|
||||
d = /Html5Plus/i.test(navigator.userAgent),
|
||||
s = /complete|loaded|interactive/;
|
||||
var w = window.my && navigator.userAgent.indexOf("AlipayClient") > -1;
|
||||
var u = window.swan && window.swan.webView && /swan/i.test(navigator.userAgent);
|
||||
var c = window.qq && window.qq.miniProgram && /QQ/i.test(navigator.userAgent) && /miniProgram/i.test(navigator.userAgent);
|
||||
var g = window.tt && window.tt.miniProgram && /toutiaomicroapp/i.test(navigator.userAgent);
|
||||
var v = window.wx && window.wx.miniProgram && /micromessenger/i.test(navigator.userAgent) && /miniProgram/i.test(navigator.userAgent);
|
||||
var p = window.qa && /quickapp/i.test(navigator.userAgent);
|
||||
for (var l, _ = function () {
|
||||
window.UniAppJSBridge = !0, document.dispatchEvent(new CustomEvent("UniAppJSBridgeReady", {
|
||||
bubbles: !0,
|
||||
cancelable: !0
|
||||
}))
|
||||
}, f = [function (e) {
|
||||
if (r || d) return window.__dcloud_weex_postMessage || window.__dcloud_weex_ ? document.addEventListener("DOMContentLoaded", e) : window.plus && s.test(document.readyState) ? setTimeout(e, 0) : document.addEventListener("plusready", e), o
|
||||
}, function (e) {
|
||||
if (v) return window.WeixinJSBridge && window.WeixinJSBridge.invoke ? setTimeout(e, 0) : document.addEventListener("WeixinJSBridgeReady", e), window.wx.miniProgram
|
||||
}, function (e) {
|
||||
if (c) return window.QQJSBridge && window.QQJSBridge.invoke ? setTimeout(e, 0) : document.addEventListener("QQJSBridgeReady", e), window.qq.miniProgram
|
||||
}, function (e) {
|
||||
if (w) {
|
||||
document.addEventListener("DOMContentLoaded", e);
|
||||
var n = window.my;
|
||||
return {
|
||||
navigateTo: n.navigateTo,
|
||||
navigateBack: n.navigateBack,
|
||||
switchTab: n.switchTab,
|
||||
reLaunch: n.reLaunch,
|
||||
redirectTo: n.redirectTo,
|
||||
postMessage: n.postMessage,
|
||||
getEnv: n.getEnv
|
||||
}
|
||||
}
|
||||
}, function (e) {
|
||||
if (u) return document.addEventListener("DOMContentLoaded", e), window.swan.webView
|
||||
}, function (e) {
|
||||
if (g) return document.addEventListener("DOMContentLoaded", e), window.tt.miniProgram
|
||||
}, function (e) {
|
||||
if (p) {
|
||||
window.QaJSBridge && window.QaJSBridge.invoke ? setTimeout(e, 0) : document.addEventListener("QaJSBridgeReady", e);
|
||||
var n = window.qa;
|
||||
return {
|
||||
navigateTo: n.navigateTo,
|
||||
navigateBack: n.navigateBack,
|
||||
switchTab: n.switchTab,
|
||||
reLaunch: n.reLaunch,
|
||||
redirectTo: n.redirectTo,
|
||||
postMessage: n.postMessage,
|
||||
getEnv: n.getEnv
|
||||
}
|
||||
}
|
||||
}, function (e) {
|
||||
return document.addEventListener("DOMContentLoaded", e), o
|
||||
}], m = 0; m < f.length && !(l = f[m](_)); m++);
|
||||
l || (l = {});
|
||||
var E = "undefined" != typeof webUni ? webUni : {};
|
||||
if (!E.navigateTo)
|
||||
for (var b in l) t(l, b) && (E[b] = l[b]);
|
||||
return E.webView = l, E
|
||||
}));
|
Loading…
Reference in New Issue
Block a user