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