1123
This commit is contained in:
parent
36393038ed
commit
76251e092d
@ -6,7 +6,7 @@ const configs = {
|
||||
},
|
||||
dev: {
|
||||
apiBaseUrl: 'https://warehouse.szjixun.cn/oa_backend',
|
||||
h5Url:'http://192.168.88.56:8080/#/'
|
||||
h5Url:'https://192.168.88.27:8080/#/'
|
||||
},
|
||||
test: {
|
||||
apiBaseUrl: 'https://warehouse.szjixun.cn/oa_backend',
|
||||
@ -19,4 +19,3 @@ const configs = {
|
||||
};
|
||||
const config = configs[env];
|
||||
export default config;
|
||||
|
Binary file not shown.
Binary file not shown.
@ -2,8 +2,8 @@
|
||||
"name" : "oa考勤系统",
|
||||
"appid" : "__UNI__4796942",
|
||||
"description" : "",
|
||||
"versionName" : "2.1.0",
|
||||
"versionCode" : 210,
|
||||
"versionName" : "2.1.1",
|
||||
"versionCode" : 211,
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus" : {
|
||||
|
@ -1,12 +1,12 @@
|
||||
<template>
|
||||
<web-view class="webview" @message="webLoad" style="flex: 1;" :src="config.h5Url"></web-view>
|
||||
<web-view class="webview" @message="webLoad" style="flex: 1;" :src="config.h5Url"></web-view>
|
||||
</template>
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import { ref } from 'vue'
|
||||
import config from "../../config";
|
||||
import {onExit } from "@dcloudio/uni-app";
|
||||
import { Communication } from '../../utils/communication.js';
|
||||
const commun=new Communication()
|
||||
import { Communication } from '../../utils/communication.js';
|
||||
const commun=new Communication()
|
||||
|
||||
/* import {
|
||||
registerRequestPermissionTipsListener,
|
||||
@ -26,6 +26,7 @@ onExit(()=>{
|
||||
setRequestPermissionTips(PermissionTips)
|
||||
registerRequestPermissionTipsListener({
|
||||
onRequest: (e) => {
|
||||
console.log('onRequest',e)
|
||||
},
|
||||
onConfirm: (e) => {
|
||||
commun.sendToH5('permission-application',{action:'open-permission',data:e});
|
||||
@ -51,25 +52,37 @@ onExit(()=>{
|
||||
})
|
||||
}
|
||||
}
|
||||
}) */
|
||||
function initializeWebView() {
|
||||
const currentWebview = getCurrentPages().pop().$getAppWebview()
|
||||
commun.setWebView(currentWebview.children()[0])
|
||||
}
|
||||
//load-complete 注册函数
|
||||
commun.registerHandler('load-complete',()=>{
|
||||
initializeWebView()
|
||||
const {statusBarHeight} = uni.getSystemInfoSync()
|
||||
commun.webViewObj.setStyle({
|
||||
top: statusBarHeight,
|
||||
bottom: 0,
|
||||
})
|
||||
})*/
|
||||
function initializeWebView() {
|
||||
const currentWebview = getCurrentPages().pop().$getAppWebview()
|
||||
commun.setWebView(currentWebview.children()[0])
|
||||
}
|
||||
//load-complete 注册函数
|
||||
commun.registerHandler('load-complete',()=>{
|
||||
initializeWebView()
|
||||
const {statusBarHeight} = uni.getSystemInfoSync()
|
||||
commun.webViewObj.setStyle({
|
||||
top: statusBarHeight,
|
||||
bottom: 0,
|
||||
})
|
||||
|
||||
})
|
||||
const webLoad = (e) => {
|
||||
const message = e.detail.data?.[0] || '';
|
||||
commun.handleMessage(message);
|
||||
};
|
||||
})
|
||||
commun.registerHandler('getLocation',(data)=>{
|
||||
uni.getLocation({
|
||||
type:'gcj02',
|
||||
geocode:true,
|
||||
isHighAccuracy:true,
|
||||
...data,
|
||||
success: (res) => {
|
||||
console.log('getLocation',res)
|
||||
commun.sendToH5('getLocation',res);
|
||||
},
|
||||
})
|
||||
})
|
||||
const webLoad = (e) => {
|
||||
const message = e.detail.data?.[0] || '';
|
||||
commun.handleMessage(message);
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
Loading…
Reference in New Issue
Block a user