master-emergent
Phoenix 5 months ago
parent bc88d3f880
commit e2c784761f

@ -1,20 +1,6 @@
<script> <script>
export default { export default {
onLaunch: function() { onLaunch: function() {
const permissionListener = uni.createRequestPermissionListener();
permissionListener.onRequest((e)=>{
})
permissionListener.onConfirm((e) => {
uni.showToast({
icon:'none',
title:'已开启通知',
duration:5000
})
});
permissionListener.onComplete((e) => {
});
console.log('App Launch')
}, },
onShow: function() { onShow: function() {
console.log('App Show') console.log('App Show')

@ -0,0 +1,18 @@
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];
export default config;

@ -1,9 +1,9 @@
{ {
"name" : "oa-base", "name" : "oa考勤系统",
"appid" : "__UNI__4796942", "appid" : "__UNI__70C49A3",
"description" : "", "description" : "",
"versionName" : "1.0.0", "versionName" : "1.1.5",
"versionCode" : "100", "versionCode" : 115,
"transformPx" : false, "transformPx" : false,
/* 5+App */ /* 5+App */
"app-plus" : { "app-plus" : {
@ -17,7 +17,10 @@
"delay" : 0 "delay" : 0
}, },
/* */ /* */
"modules" : {}, "modules" : {
"Camera" : {},
"Geolocation" : {}
},
/* */ /* */
"distribute" : { "distribute" : {
/* android */ /* android */
@ -37,16 +40,78 @@
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>", "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>", "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>", "<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>" "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>",
] "<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>"
],
"abiFilters" : [ "armeabi-v7a", "arm64-v8a" ],
"autoSdkPermissions" : false,
"targetSdkVersion" : 33
}, },
/* ios */ /* ios */
"ios" : { "ios" : {
"dSYMs" : false "dSYMs" : false,
"privacyDescription" : {
"NSLocationWhenInUseUsageDescription" : "我们的应用需要在您进行考勤打卡时获取位置信息,以确保打卡记录的准确性和验证打卡地点。",
"NSPhotoLibraryUsageDescription" : "我们需要获取访问您设备相册的权限,以便您能够选择并上传图片或视频到我们的应用中。",
"NSPhotoLibraryAddUsageDescription" : "我们需要获取写入权限,以便我们能够将您通过应用程序拍摄的照片或视频保存到您的设备相册中。",
"NSCameraUsageDescription" : "我们的应用使用摄像头来拍照,以便在进行外勤打卡时确认您的身份和打卡环境,确保打卡数据的真实性和准确性。"
}
}, },
/* SDK */ /* SDK */
"sdkConfigs" : { "sdkConfigs" : {
"ad" : {} "geolocation" : {
"system" : {
"__platform__" : [ "ios", "android" ]
},
"baidu" : {
"__platform__" : [ "ios", "android" ],
"appkey_ios" : "5zzMAq3ofL5H5KfxRcf0zDMLTimvGIb0",
"appkey_android" : "ahdcPcBfatf61zRAgNl9SpBGUEURsnXN"
}
},
"ad" : {},
"share" : {
"weixin" : {
"appid" : "",
"UniversalLinks" : ""
}
}
},
"icons" : {
"android" : {
"hdpi" : "unpackage/res/icons/72x72.png",
"xhdpi" : "unpackage/res/icons/96x96.png",
"xxhdpi" : "unpackage/res/icons/144x144.png",
"xxxhdpi" : "unpackage/res/icons/192x192.png"
},
"ios" : {
"appstore" : "unpackage/res/icons/1024x1024.png",
"ipad" : {
"app" : "unpackage/res/icons/76x76.png",
"app@2x" : "unpackage/res/icons/152x152.png",
"notification" : "unpackage/res/icons/20x20.png",
"notification@2x" : "unpackage/res/icons/40x40.png",
"proapp@2x" : "unpackage/res/icons/167x167.png",
"settings" : "unpackage/res/icons/29x29.png",
"settings@2x" : "unpackage/res/icons/58x58.png",
"spotlight" : "unpackage/res/icons/40x40.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png"
},
"iphone" : {
"app@2x" : "unpackage/res/icons/120x120.png",
"app@3x" : "unpackage/res/icons/180x180.png",
"notification@2x" : "unpackage/res/icons/40x40.png",
"notification@3x" : "unpackage/res/icons/60x60.png",
"settings@2x" : "unpackage/res/icons/58x58.png",
"settings@3x" : "unpackage/res/icons/87x87.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png",
"spotlight@3x" : "unpackage/res/icons/120x120.png"
}
}
},
"splashscreen" : {
"useOriginalMsgbox" : true
} }
} }
}, },

@ -1,13 +1,15 @@
<template> <template>
<div class="content"> <div class="content">
<web-view class="webview" @onPostMessage="webLoad" :style="{height:`${systemInfo.windowHeight}px`,width:`${systemInfo.windowWidth}`}" ref="webViewRef" src="http://192.168.88.35:8081/"></web-view> <web-view class="webview" @onPostMessage="webLoad" :style="{height:`${systemInfo.windowHeight}px`,width:`${systemInfo.windowWidth}`}" ref="webViewRef" :src="config.h5Url"></web-view>
</div> </div>
</template> </template>
<script setup> <script setup>
import { ref } from 'vue' import { ref } from 'vue'
import config from "../../config";
import {sendWebWiew,receiveWebView} from "@/utils/communicate"; import {sendWebWiew,receiveWebView} from "@/utils/communicate";
const webViewRef=ref(null) const webViewRef=ref(null)
const systemInfo = uni.getSystemInfoSync(); const systemInfo = uni.getSystemInfoSync();
// #ifdef APP-ANDROID
const permissionListener = uni.createRequestPermissionListener(); const permissionListener = uni.createRequestPermissionListener();
permissionListener.onRequest((e)=>{ permissionListener.onRequest((e)=>{
}) })
@ -17,6 +19,7 @@ permissionListener.onConfirm((e) => {
permissionListener.onComplete((e) => { permissionListener.onComplete((e) => {
sendWebWiew(webViewRef.value,{auth:e,open:false}) sendWebWiew(webViewRef.value,{auth:e,open:false})
}); });
// #endif
const webLoad=(e)=>{ const webLoad=(e)=>{
const m=receiveWebView(e) const m=receiveWebView(e)
switch (m.action) { switch (m.action) {

@ -6,6 +6,22 @@ function formatAppLog(type, filename, ...args) {
console[type].apply(console, [...args, filename]); 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") => { const sendWebWiew = (refValue, paramValue, callName = "onReceive") => {
if (!refValue) { if (!refValue) {
formatAppLog("error", "at utils/communicate/index.js:3", "evalJs: The reference to the webview is not provided or is null."); formatAppLog("error", "at utils/communicate/index.js:3", "evalJs: The reference to the webview is not provided or is null.");
@ -52,7 +68,7 @@ const _sfc_main = {
sendWebWiew(webViewRef.value, { ...res, systemInfo: systemInfo2 }); sendWebWiew(webViewRef.value, { ...res, systemInfo: systemInfo2 });
}, },
fail: (e2) => { fail: (e2) => {
formatAppLog("log", "at pages/index/index.nvue:27", e2); formatAppLog("log", "at pages/index/index.nvue:38", e2);
} }
}); });
} }
@ -73,8 +89,8 @@ const _sfc_main = {
style: normalizeStyle({ height: `${unref(systemInfo).windowHeight}px`, width: `${unref(systemInfo).windowWidth}` }), style: normalizeStyle({ height: `${unref(systemInfo).windowHeight}px`, width: `${unref(systemInfo).windowWidth}` }),
ref_key: "webViewRef", ref_key: "webViewRef",
ref: webViewRef, ref: webViewRef,
src: "http://192.168.88.35:8080/#/" src: unref(config).h5Url
}, null, 36) }, null, 44, ["src"])
]) ])
]); ]);
}; };

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 0 B

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 0 B

After

Width:  |  Height:  |  Size: 2.0 KiB

@ -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":{"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-base","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":true},"compilerVersion":"3.99","entryPagePath":"pages/index/index","entryPageQuery":"","realEntryPagePath":"","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000},"locales":{},"darkmode":false,"themeConfig":{}}; 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)); 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 __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()})}});

File diff suppressed because one or more lines are too long

@ -4,11 +4,11 @@
"iPhone", "iPhone",
"iPad" "iPad"
], ],
"id": "__UNI__4796942", "id": "__UNI__70C49A3",
"name": "oa-base", "name": "oa考勤系统",
"version": { "version": {
"name": "1.0.0", "name": "1.1.5",
"code": "100" "code": 115
}, },
"description": "", "description": "",
"developer": { "developer": {
@ -17,6 +17,8 @@
"url": "" "url": ""
}, },
"permissions": { "permissions": {
"Camera": {},
"Geolocation": {},
"UniNView": { "UniNView": {
"description": "UniNView原生渲染" "description": "UniNView原生渲染"
} }
@ -45,6 +47,41 @@
"nvueStyleCompiler": "uni-app", "nvueStyleCompiler": "uni-app",
"compilerVersion": 3, "compilerVersion": 3,
"distribute": { "distribute": {
"icons": {
"android": {
"hdpi": "unpackage/res/icons/72x72.png",
"xhdpi": "unpackage/res/icons/96x96.png",
"xxhdpi": "unpackage/res/icons/144x144.png",
"xxxhdpi": "unpackage/res/icons/192x192.png"
},
"ios": {
"appstore": "unpackage/res/icons/1024x1024.png",
"ipad": {
"app": "unpackage/res/icons/76x76.png",
"app@2x": "unpackage/res/icons/152x152.png",
"notification": "unpackage/res/icons/20x20.png",
"notification@2x": "unpackage/res/icons/40x40.png",
"proapp@2x": "unpackage/res/icons/167x167.png",
"settings": "unpackage/res/icons/29x29.png",
"settings@2x": "unpackage/res/icons/58x58.png",
"spotlight": "unpackage/res/icons/40x40.png",
"spotlight@2x": "unpackage/res/icons/80x80.png"
},
"iphone": {
"app@2x": "unpackage/res/icons/120x120.png",
"app@3x": "unpackage/res/icons/180x180.png",
"notification@2x": "unpackage/res/icons/40x40.png",
"notification@3x": "unpackage/res/icons/60x60.png",
"settings@2x": "unpackage/res/icons/58x58.png",
"settings@3x": "unpackage/res/icons/87x87.png",
"spotlight@2x": "unpackage/res/icons/80x80.png",
"spotlight@3x": "unpackage/res/icons/120x120.png"
}
}
},
"splashscreen": {
"useOriginalMsgbox": true
},
"google": { "google": {
"permissions": [ "permissions": [
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>", "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
@ -61,14 +98,50 @@
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>", "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>", "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>", "<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>" "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>",
] "<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>"
],
"abiFilters": [
"armeabi-v7a",
"arm64-v8a"
],
"autoSdkPermissions": false,
"targetSdkVersion": 33
}, },
"apple": { "apple": {
"dSYMs": false "dSYMs": false,
"privacyDescription": {
"NSLocationWhenInUseUsageDescription": "我们的应用需要在您进行考勤打卡时获取位置信息,以确保打卡记录的准确性和验证打卡地点。",
"NSPhotoLibraryUsageDescription": "我们需要获取访问您设备相册的权限,以便您能够选择并上传图片或视频到我们的应用中。",
"NSPhotoLibraryAddUsageDescription": "我们需要获取写入权限,以便我们能够将您通过应用程序拍摄的照片或视频保存到您的设备相册中。",
"NSCameraUsageDescription": "我们的应用使用摄像头来拍照,以便在进行外勤打卡时确认您的身份和打卡环境,确保打卡数据的真实性和准确性。"
}
}, },
"plugins": { "plugins": {
"geolocation": {
"system": {
"__platform__": [
"ios",
"android"
]
},
"baidu": {
"__platform__": [
"ios",
"android"
],
"appkey_ios": "5zzMAq3ofL5H5KfxRcf0zDMLTimvGIb0",
"appkey_android": "ahdcPcBfatf61zRAgNl9SpBGUEURsnXN"
}
},
"ad": {}, "ad": {},
"share": {
"weixin": {
"appid": "",
"UniversalLinks": ""
}
},
"audio": { "audio": {
"mp3": { "mp3": {
"description": "Android平台录音支持MP3格式文件" "description": "Android平台录音支持MP3格式文件"
@ -88,7 +161,7 @@
"uni-app": { "uni-app": {
"control": "uni-v3", "control": "uni-v3",
"vueVersion": "3", "vueVersion": "3",
"compilerVersion": "3.99", "compilerVersion": "4.08",
"nvueCompiler": "uni-app", "nvueCompiler": "uni-app",
"renderer": "auto", "renderer": "auto",
"nvue": { "nvue": {

@ -29,4 +29,4 @@ if (typeof uni !== 'undefined' && uni && uni.requireGlobal) {
}; };
(()=>{var S=Object.create;var d=Object.defineProperty,J=Object.defineProperties,I=Object.getOwnPropertyDescriptor,j=Object.getOwnPropertyDescriptors,k=Object.getOwnPropertyNames,w=Object.getOwnPropertySymbols,A=Object.getPrototypeOf,g=Object.prototype.hasOwnProperty,$=Object.prototype.propertyIsEnumerable;var y=(t,e,o)=>e in t?d(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,m=(t,e)=>{for(var o in e||(e={}))g.call(e,o)&&y(t,o,e[o]);if(w)for(var o of w(e))$.call(e,o)&&y(t,o,e[o]);return t},v=(t,e)=>J(t,j(e));var T=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var V=(t,e,o,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of k(e))!g.call(t,n)&&n!==o&&d(t,n,{get:()=>e[n],enumerable:!(s=I(e,n))||s.enumerable});return t};var W=(t,e,o)=>(o=t!=null?S(A(t)):{},V(e||!t||!t.__esModule?d(o,"default",{value:t,enumerable:!0}):o,t));var h=(t,e,o)=>new Promise((s,n)=>{var u=c=>{try{i(o.next(c))}catch(_){n(_)}},p=c=>{try{i(o.throw(c))}catch(_){n(_)}},i=c=>c.done?s(c.value):Promise.resolve(c.value).then(u,p);i((o=o.apply(t,e)).next())});var x=T((R,b)=>{b.exports=Vue});var r=W(x());function l(t,e,...o){uni.__log__?uni.__log__(t,e,...o):console[t].apply(console,[...o,e])}var B=(t,e,o="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),n=`window.${o}(${s})`;t.evalJs(n)}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)}},C=t=>t.detail.data[0],L={content:{"":{display:"flex",flex:1}}},N=(t,e)=>{let o=t.__vccOpts||t;for(let[s,n]of e)o[s]=n;return o},O={__name:"index",setup(t){let e=(0,r.ref)(null),o=uni.getSystemInfoSync(),s=n=>{switch(C(n).action){case"load-complete":{let p=uni.getSystemInfoSync();uni.getLocation({type:"gcj02",geocode:!1,isHighAccuracy:!1,success:i=>h(this,null,function*(){B(e.value,v(m({},i),{systemInfo:p}))}),fail:i=>{l("log","at pages/index/index.nvue:27",i)}})}}};return(n,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":s,style:(0,r.normalizeStyle)({height:`${(0,r.unref)(o).windowHeight}px`,width:`${(0,r.unref)(o).windowWidth}`}),ref_key:"webViewRef",ref:e,src:"http://192.168.88.35:8080/#/"},null,36)])]))}},a=N(O,[["styles",[L]]]);var f=plus.webview.currentWebview();if(f){let t=parseInt(f.id),e="pages/index/index",o={};try{o=JSON.parse(f.__query__)}catch(n){}a.mpType="page";let s=Vue.createPageApp(a,{$store:getApp({allowDefault:!0}).$store,__pageId:t,__pagePath:e,__pageQuery:o});s.provide("__globalStyles",Vue.useCssStyles([...__uniConfig.styles,...a.styles||[]])),s.mount("#root")}})(); (()=>{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")}})();

File diff suppressed because one or more lines are too long

@ -6,6 +6,22 @@ function formatAppLog(type, filename, ...args) {
console[type].apply(console, [...args, filename]); 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") => { const sendWebWiew = (refValue, paramValue, callName = "onReceive") => {
if (!refValue) { if (!refValue) {
formatAppLog("error", "at utils/communicate/index.js:3", "evalJs: The reference to the webview is not provided or is null."); formatAppLog("error", "at utils/communicate/index.js:3", "evalJs: The reference to the webview is not provided or is null.");
@ -52,7 +68,7 @@ const _sfc_main = {
sendWebWiew(webViewRef.value, { ...res, systemInfo: systemInfo2 }); sendWebWiew(webViewRef.value, { ...res, systemInfo: systemInfo2 });
}, },
fail: (e2) => { fail: (e2) => {
formatAppLog("log", "at pages/index/index.nvue:27", e2); formatAppLog("log", "at pages/index/index.nvue:38", e2);
} }
}); });
} }
@ -67,20 +83,14 @@ const _sfc_main = {
style: { flexDirection: "column" } style: { flexDirection: "column" }
}, [ }, [
createElementVNode("div", { class: "content" }, [ createElementVNode("div", { class: "content" }, [
createElementVNode( createElementVNode("u-web-view", {
"u-web-view", class: "webview",
{ "on:onPostMessage": webLoad,
class: "webview", style: normalizeStyle({ height: `${unref(systemInfo).windowHeight}px`, width: `${unref(systemInfo).windowWidth}` }),
"on:onPostMessage": webLoad, ref_key: "webViewRef",
style: normalizeStyle({ height: `${unref(systemInfo).windowHeight}px`, width: `${unref(systemInfo).windowWidth}` }), ref: webViewRef,
ref_key: "webViewRef", src: unref(config).h5Url
ref: webViewRef, }, null, 44, ["src"])
src: "http://192.168.88.35:8081/"
},
null,
36
/* STYLE, NEED_HYDRATION */
)
]) ])
]); ]);
}; };

Binary file not shown.

Before

Width:  |  Height:  |  Size: 0 B

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 0 B

After

Width:  |  Height:  |  Size: 2.0 KiB

@ -109,6 +109,22 @@ if (typeof uni !== 'undefined' && uni && uni.requireGlobal) {
console[type].apply(console, [...args, filename]); 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") => { var sendWebWiew = (refValue, paramValue, callName = "onReceive") => {
if (!refValue) { if (!refValue) {
formatAppLog("error", "at utils/communicate/index.js:3", "evalJs: The reference to the webview is not provided or is null."); formatAppLog("error", "at utils/communicate/index.js:3", "evalJs: The reference to the webview is not provided or is null.");
@ -155,7 +171,7 @@ if (typeof uni !== 'undefined' && uni && uni.requireGlobal) {
sendWebWiew(webViewRef.value, __spreadProps(__spreadValues({}, res), { systemInfo: systemInfo2 })); sendWebWiew(webViewRef.value, __spreadProps(__spreadValues({}, res), { systemInfo: systemInfo2 }));
}), }),
fail: (e2) => { fail: (e2) => {
formatAppLog("log", "at pages/index/index.nvue:27", e2); formatAppLog("log", "at pages/index/index.nvue:38", e2);
} }
}); });
} }
@ -170,20 +186,14 @@ if (typeof uni !== 'undefined' && uni && uni.requireGlobal) {
style: { flexDirection: "column" } style: { flexDirection: "column" }
}, [ }, [
(0, import_vue.createElementVNode)("div", { class: "content" }, [ (0, import_vue.createElementVNode)("div", { class: "content" }, [
(0, import_vue.createElementVNode)( (0, import_vue.createElementVNode)("u-web-view", {
"u-web-view", class: "webview",
{ "on:onPostMessage": webLoad,
class: "webview", style: (0, import_vue.normalizeStyle)({ height: `${(0, import_vue.unref)(systemInfo).windowHeight}px`, width: `${(0, import_vue.unref)(systemInfo).windowWidth}` }),
"on:onPostMessage": webLoad, ref_key: "webViewRef",
style: (0, import_vue.normalizeStyle)({ height: `${(0, import_vue.unref)(systemInfo).windowHeight}px`, width: `${(0, import_vue.unref)(systemInfo).windowWidth}` }), ref: webViewRef,
ref_key: "webViewRef", src: (0, import_vue.unref)(config).h5Url
ref: webViewRef, }, null, 44, ["src"])
src: "http://192.168.88.35:8081/"
},
null,
36
/* STYLE, NEED_HYDRATION */
)
]) ])
]); ]);
}; };

@ -0,0 +1,16 @@
// PageMixin.js
export default {
mounted() {
const targetElement = document.querySelector('.uni-app--maxwidth');
if (targetElement) {
targetElement.style.paddingTop = `${this.$store.state.systemInfo.statusBarHeight}px`
}
},
onShow() {
const targetElement = document.querySelector('.uni-app--maxwidth');
if (targetElement) {
targetElement.style.paddingTop = `${this.$store.state.systemInfo.statusBarHeight}px`
}
},
// 其它生命周期方法也可以在此实现...
};
Loading…
Cancel
Save