1123
This commit is contained in:
parent
3faf5d6535
commit
d663d7e7c4
@ -2,11 +2,11 @@ const env = 'dev';
|
||||
const configs = {
|
||||
LocalTest: {
|
||||
apiBaseUrl: 'https://warehouse.szjixun.cn/oa_backend',
|
||||
h5Url:'http://192.168.88.37:8080/#/'
|
||||
h5Url:'http://192.168.88.51:8080/#/'
|
||||
},
|
||||
dev: {
|
||||
apiBaseUrl: 'https://warehouse.szjixun.cn/oa_backend',
|
||||
h5Url:'http://192.168.88.37:8080/#/'
|
||||
h5Url:'http://192.168.88.56:8080/#/'
|
||||
},
|
||||
test: {
|
||||
apiBaseUrl: 'https://warehouse.szjixun.cn/oa_backend',
|
||||
@ -20,3 +20,4 @@ const configs = {
|
||||
|
||||
const config = configs[env];
|
||||
export default config;
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -2,8 +2,8 @@
|
||||
"name" : "oa考勤系统",
|
||||
"appid" : "__UNI__4796942",
|
||||
"description" : "",
|
||||
"versionName" : "2.0.3",
|
||||
"versionCode" : 203,
|
||||
"versionName" : "2.0.4",
|
||||
"versionCode" : 204,
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus" : {
|
||||
@ -19,7 +19,9 @@
|
||||
/* 模块配置 */
|
||||
"modules" : {
|
||||
"Camera" : {},
|
||||
"Geolocation" : {}
|
||||
"Geolocation" : {},
|
||||
"Maps" : {},
|
||||
"Push" : {}
|
||||
},
|
||||
/* 应用发布信息 */
|
||||
"distribute" : {
|
||||
@ -46,7 +48,7 @@
|
||||
],
|
||||
"abiFilters" : [ "armeabi-v7a", "arm64-v8a" ],
|
||||
"autoSdkPermissions" : false,
|
||||
"targetSdkVersion" : 33
|
||||
"targetSdkVersion" : 34
|
||||
},
|
||||
/* ios打包配置 */
|
||||
"ios" : {
|
||||
@ -80,10 +82,13 @@
|
||||
"push" : {
|
||||
"unipush" : {
|
||||
"version" : "2",
|
||||
"offline" : true,
|
||||
"hms" : {},
|
||||
"oppo" : {},
|
||||
"vivo" : {}
|
||||
"offline" : true
|
||||
}
|
||||
},
|
||||
"maps" : {
|
||||
"baidu" : {
|
||||
"appkey_ios" : "5zzMAq3ofL5H5KfxRcf0zDMLTimvGIb0",
|
||||
"appkey_android" : "ahdcPcBfatf61zRAgNl9SpBGUEURsnXN"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -1,69 +1,52 @@
|
||||
<template>
|
||||
|
||||
<web-view class="webview" @message="webLoad" style="flex: 1;" ref="webViewRef" :src="config.h5Url"></web-view>
|
||||
|
||||
<web-view class="webview" @message="webLoad" style="flex: 1;" :src="config.h5Url"></web-view>
|
||||
</template>
|
||||
<script setup>
|
||||
import uvNoNetwork from "../../uni_modules/uv-no-network/components/uv-no-network/uv-no-network.vue";
|
||||
import { ref } from 'vue'
|
||||
import config from "../../config";
|
||||
import { onShow, onHide } from "@dcloudio/uni-app";
|
||||
/* import location from "../../utils/location"; */
|
||||
/* import {
|
||||
registerRequestPermissionTipsListener,
|
||||
unregisterRequestPermissionTipsListener,
|
||||
setRequestPermissionTips
|
||||
} from "@/uni_modules/uni-registerRequestPermissionTips" */
|
||||
/* plus.runtime.setBadgeNumber(999); */
|
||||
|
||||
/* const permissionListener = uni.createRequestPermissionListener();
|
||||
import {onExit } from "@dcloudio/uni-app";
|
||||
import { Communication } from '../../utils/communication.js';
|
||||
const commun=new Communication()
|
||||
const permissionListener = uni.createRequestPermissionListener();
|
||||
permissionListener.onRequest((e)=>{
|
||||
console.log('APP执行onRequest',e)
|
||||
commun.sendToH5('permission-application',e);
|
||||
})
|
||||
permissionListener.onConfirm((e) => {
|
||||
sendWebWiew(webViewRef.value,{auth:e,open:true})
|
||||
});
|
||||
permissionListener.onComplete((e) => {
|
||||
/* uni.showToast({
|
||||
duration:1000000,
|
||||
title:`${JSON.stringify(e)}1111${JSON.stringify(f)}`,
|
||||
icon:'none'
|
||||
}) */
|
||||
/* sendWebWiew(webViewRef.value,{auth:e,open:false})
|
||||
}); *!/*/
|
||||
/* registerRequestPermissionTipsListener({
|
||||
onRequest: (e) => {
|
||||
console.log(e)
|
||||
},
|
||||
onConfirm: (e) => {
|
||||
sendWebWiew(webViewRef.value,{auth:e,open:true})
|
||||
},
|
||||
onComplete: (e) => {
|
||||
console.log('APP执行onComplete',e)
|
||||
const arr=['android.permission.ACCESS_COARSE_LOCATION','android.permission.ACCESS_FINE_LOCATION','android.permission.ACCESS_LOCATION_EXTRA_COMMANDS','android.permission.ACCESS_MOCK_LOCATION']
|
||||
commun.sendToH5('permission-complete',e);
|
||||
|
||||
const arr=['android.permission.ACCESS_COARSE_LOCATION','android.permission.ACCESS_FINE_LOCATION','android.permission.ACCESS_LOCATION_EXTRA_COMMANDS','android.permission.ACCESS_MOCK_LOCATION']
|
||||
const hasIntersection = Object.keys(e).some(item => new Set(arr).has(item));
|
||||
uni.setSt
|
||||
sendWebWiew(webViewRef.value,{auth:Object.keys(e),open:false})
|
||||
}
|
||||
})*/
|
||||
//解决ios的h5问题,获取网络权限之后,重新加载
|
||||
})
|
||||
onExit(()=>{
|
||||
permissionListener.stop()
|
||||
})
|
||||
function initializeWebView() {
|
||||
const currentWebview = getCurrentPages().pop().$getAppWebview()
|
||||
console.log('当前view',currentWebview)
|
||||
commun.setWebView(currentWebview.children()[0])
|
||||
}
|
||||
|
||||
const webViewObj=ref(null)
|
||||
const webLoad=(e)=>{
|
||||
const h5SendString=e.detail.data?.[0]?.action
|
||||
switch (h5SendString) {
|
||||
//webview初始化加载完成
|
||||
case 'load-complete':{
|
||||
|
||||
const {statusBarHeight} = uni.getSystemInfoSync()
|
||||
const currentWebview = getCurrentPages().pop().$getAppWebview()
|
||||
webViewObj.value=currentWebview.children()[0]
|
||||
webViewObj.value.setStyle({
|
||||
top: statusBarHeight,
|
||||
bottom: 0,
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
commun.registerHandler('load-complete',()=>{
|
||||
})
|
||||
const webLoad = (e) => {
|
||||
try {
|
||||
const message = e.detail.data?.[0] || '';
|
||||
if (message.action==='load-complete'){
|
||||
initializeWebView()
|
||||
const {statusBarHeight} = uni.getSystemInfoSync()
|
||||
commun.webViewObj.setStyle({
|
||||
top: statusBarHeight,
|
||||
bottom: 0,
|
||||
})
|
||||
}else {
|
||||
commun.handleMessage(message);
|
||||
}
|
||||
} catch (error) {
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
@ -1,2 +0,0 @@
|
||||
## 1.0.0(2024-03-09)
|
||||
支持全局监听权限申请。当申请权限时,会在页面顶部显示申请权限的目的。
|
@ -1,114 +0,0 @@
|
||||
{
|
||||
"id": "uni-registerRequestPermissionTips",
|
||||
"displayName": "uni-registerRequestPermissionTips",
|
||||
"version": "1.0.0",
|
||||
"description": "支持android平台全局监听权限的申请。当申请权限时,会在页面顶部显示申请权限的目的。主要解决上架华为应用市场审核要求:APP在调用终端权限时,应同步告知用户申请该权限的目的。",
|
||||
"keywords": [
|
||||
"权限",
|
||||
"权限申请",
|
||||
"上架",
|
||||
"华为"
|
||||
],
|
||||
"repository": "",
|
||||
"engines": {
|
||||
"HBuilderX": "^4.0"
|
||||
},
|
||||
"dcloudext": {
|
||||
"type": "uts",
|
||||
"sale": {
|
||||
"regular": {
|
||||
"price": "0.00"
|
||||
},
|
||||
"sourcecode": {
|
||||
"price": "0.00"
|
||||
}
|
||||
},
|
||||
"contact": {
|
||||
"qq": ""
|
||||
},
|
||||
"declaration": {
|
||||
"ads": "无",
|
||||
"data": "无",
|
||||
"permissions": "无"
|
||||
},
|
||||
"npmurl": ""
|
||||
},
|
||||
"uni_modules": {
|
||||
"dependencies": [
|
||||
],
|
||||
"uni-ext-api": {
|
||||
"uni": {
|
||||
"registerRequestPermissionTipsListener": {
|
||||
"name": "registerRequestPermissionTipsListener",
|
||||
"app": {
|
||||
"js": false,
|
||||
"kotlin": true,
|
||||
"swift": false
|
||||
}
|
||||
},
|
||||
"unregisterRequestPermissionTipsListener": {
|
||||
"name": "unregisterRequestPermissionTipsListener",
|
||||
"app": {
|
||||
"js": false,
|
||||
"kotlin": true,
|
||||
"swift": false
|
||||
}
|
||||
},
|
||||
"setRequestPermissionTips": {
|
||||
"name": "setRequestPermissionTips",
|
||||
"app": {
|
||||
"js": false,
|
||||
"kotlin": true,
|
||||
"swift": false
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"encrypt": [],
|
||||
"platforms": {
|
||||
"cloud": {
|
||||
"tcb": "y",
|
||||
"aliyun": "y",
|
||||
"alipay": "y"
|
||||
},
|
||||
"client": {
|
||||
"Vue": {
|
||||
"vue2": "y",
|
||||
"vue3": "y"
|
||||
},
|
||||
"App": {
|
||||
"app-android": "y",
|
||||
"app-ios": "n"
|
||||
},
|
||||
"H5-mobile": {
|
||||
"Safari": "n",
|
||||
"Android Browser": "n",
|
||||
"微信浏览器(Android)": "n",
|
||||
"QQ浏览器(Android)": "n"
|
||||
},
|
||||
"H5-pc": {
|
||||
"Chrome": "n",
|
||||
"IE": "n",
|
||||
"Edge": "n",
|
||||
"Firefox": "n",
|
||||
"Safari": "n"
|
||||
},
|
||||
"小程序": {
|
||||
"微信": "n",
|
||||
"阿里": "n",
|
||||
"百度": "n",
|
||||
"字节跳动": "n",
|
||||
"QQ": "n",
|
||||
"钉钉": "n",
|
||||
"快手": "n",
|
||||
"飞书": "n",
|
||||
"京东": "n"
|
||||
},
|
||||
"快应用": {
|
||||
"华为": "n",
|
||||
"联盟": "n"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,95 +0,0 @@
|
||||
## registerRequestPermissionTipsListener(listener?)
|
||||
注册权限监听事件
|
||||
## unregisterRequestPermissionTipsListener(listener?)
|
||||
取消注册权限监听事件
|
||||
|
||||
## RequestPermissionTipsListener的属性值
|
||||
|名称 |类型 |描述 |必填 |
|
||||
|:-- |:-- |:-- |:-- |
|
||||
|onRequest |(permissions:Array<string>)=>void |申请系统权限回调,permissions为触发权限申请的所有权限 |否 |
|
||||
|onConfirm |(permissions:Array<string>)=>void |弹出系统权限授权框回调,permissions为触发弹出权限授权框的所有权限 |否 |
|
||||
|onComplete |(permissions:UTSJSONObject)=>void |权限申请完成回调,permissions包括权限及权限的状态。`grant`为权限已获取,`denied`为权限已拒绝 |否 |
|
||||
|
||||
## setRequestPermissionTips(UTSJSONObject)
|
||||
设置权限监听的说明。支持针对权限设置具体的说明。
|
||||
|
||||
参考:`{"android.permission.CAMERA":"<p>相机权限申请说明</p>"}`
|
||||
|
||||
安卓权限列表可参考[谷歌官方文档](https://developer.android.com/reference/android/Manifest.permission)。
|
||||
|
||||
权限申请说明基于原生TextView实现,可以实现加载html内容,支持的标签及属性可参考:
|
||||
```
|
||||
<b> 或 <strong>:加粗文本。
|
||||
<i> 或 <em>:斜体文本。
|
||||
<u>:下划线文本。
|
||||
<sup>:上标文本。
|
||||
<sub>:下标文本。
|
||||
<tt>:等宽字体文本。
|
||||
<big>:放大字体。
|
||||
<small>:缩小字体。
|
||||
<strike> 或 <s> 或 <del>:带有删除线的文本。
|
||||
<p>:段落。
|
||||
<div>:块级容器。
|
||||
<h1>,<h2>,<h3>,<h4>,<h5>,<h6>:区域标题元素。
|
||||
<ul>, <ol>, <li>:无序列表和有序列表。
|
||||
<br>:换行。
|
||||
<font color="..."> 和 <font size="...">:设置文本颜色和大小。
|
||||
```
|
||||
|
||||
## 示例
|
||||
|
||||
```
|
||||
<script>
|
||||
import {
|
||||
registerRequestPermissionTipsListener,
|
||||
unregisterRequestPermissionTipsListener,
|
||||
setRequestPermissionTips
|
||||
} from "@/uni_modules/uni-registerRequestPermissionTips"
|
||||
var PermissionTips = {
|
||||
"android.permission.CAMERA": "<h4 style=\"font-size:40px;\">正在读取通讯录权限</h4><font color=#cccccc>通讯录权限不会获取任何信息,请注意</font>",
|
||||
"android.permission.READ_PHONE_STATE": "<h4 style=\"font-size:40px;\">正在读取网络状态权限</h4><font color=#cccccc>通讯录权限不会获取任何信息,请注意通讯录权限不会获取任何信息,请注意通讯录权限不会获取任何信息,请注意</font>"
|
||||
}
|
||||
export default {
|
||||
onLaunch: function() {
|
||||
var brand = uni.getSystemInfoSync().deviceBrand
|
||||
setRequestPermissionTips(PermissionTips)
|
||||
registerRequestPermissionTipsListener({
|
||||
onRequest: (e) => {
|
||||
console.log(e)
|
||||
},
|
||||
onConfirm: (e) => {
|
||||
console.log(e)
|
||||
},
|
||||
onComplete: (e) => {
|
||||
// 华为手机在权限禁止之后,再次申请权限不会出现权限申请框。此时应该引导用户去系统设置开启此权限,不应该频繁申请。
|
||||
if (brand.toLowerCase() == "huawei") {
|
||||
var tips = {}
|
||||
var hasDeniedPermission = false
|
||||
for (var k in PermissionTips) {
|
||||
if (e[k] != "denied") {
|
||||
tips[k] = PermissionTips[k]
|
||||
} else {
|
||||
hasDeniedPermission = true
|
||||
}
|
||||
}
|
||||
setRequestPermissionTips(tips) // 更新弹框提醒,防止华为手机不出现权限申请框时权限提醒框闪烁的情况
|
||||
if (hasDeniedPermission)
|
||||
uni.showModal({
|
||||
content: "权限已经被拒绝,请前往设置中开启"
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
onShow: function() {
|
||||
console.log('App Show')
|
||||
},
|
||||
onHide: function() {
|
||||
console.log('App Hide')
|
||||
},
|
||||
onExit: function() {
|
||||
unregisterRequestPermissionTipsListener(null)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
```
|
@ -1,3 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" package="io.dcloud.uts.permissionrequest">
|
||||
</manifest>
|
@ -1,3 +0,0 @@
|
||||
{
|
||||
"minSdkVersion": "21"
|
||||
}
|
@ -1,115 +0,0 @@
|
||||
import { UnregisterRequestPermissionTipsListener, RegisterRequestPermissionTipsListener, RequestPermissionTipsListener, SetRequestPermissionTips } from "../interface";
|
||||
import RelativeLayout from 'android.widget.RelativeLayout';
|
||||
import LinearLayout from 'android.widget.LinearLayout';
|
||||
import Color from 'android.graphics.Color';
|
||||
import TextView from 'android.widget.TextView';
|
||||
import ViewGroup from 'android.view.ViewGroup';
|
||||
import Activity from 'android.app.Activity';
|
||||
import HashMap from 'java.util.HashMap';
|
||||
import AnimationUtils from 'android.view.animation.AnimationUtils';
|
||||
import R from 'io.dcloud.uts.permissionrequest.R'
|
||||
import Html from 'android.text.Html';
|
||||
import View from 'android.view.View';
|
||||
|
||||
let PermissionTipsView : View | null = null
|
||||
let permissionTips : HashMap<String, String> = new HashMap<String, String>()
|
||||
var permissionListener : RequestPermissionListener | null = null
|
||||
var listener : RequestPermissionTipsListener | null = null
|
||||
export const unregisterRequestPermissionTipsListener : UnregisterRequestPermissionTipsListener = (l : RequestPermissionTipsListener | null) => {
|
||||
listener = null;
|
||||
if (permissionListener != null) {
|
||||
permissionListener!.stop()
|
||||
permissionListener = null
|
||||
}
|
||||
if (PermissionTipsView != null) {
|
||||
if (PermissionTipsView!.getParent() != null) {
|
||||
PermissionTipsView!.setAnimation(null);
|
||||
((PermissionTipsView!.getParent()) as ViewGroup).removeView(PermissionTipsView)
|
||||
}
|
||||
PermissionTipsView = null
|
||||
}
|
||||
}
|
||||
|
||||
export const registerRequestPermissionTipsListener : RegisterRequestPermissionTipsListener = (l : RequestPermissionTipsListener | null) => {
|
||||
listener = l
|
||||
if (permissionListener == null) {
|
||||
permissionListener = uni.createRequestPermissionListener()
|
||||
permissionListener!.onRequest((permissions : Array<string>) => {
|
||||
if (listener != null)
|
||||
listener!.onRequest?.invoke(permissions)
|
||||
})
|
||||
permissionListener!.onConfirm((permissions : Array<string>) => {
|
||||
let activity = UTSAndroid.getUniActivity()!
|
||||
if (PermissionTipsView != null && PermissionTipsView!.getParent() != null) {
|
||||
PermissionTipsView!.setAnimation(null);
|
||||
((PermissionTipsView!.getParent()) as ViewGroup).removeView(PermissionTipsView)
|
||||
}
|
||||
if (permissions.length > 0) {
|
||||
PermissionTipsView = createPermissionWindow(activity, permissions);
|
||||
if (PermissionTipsView != null) {
|
||||
(activity.findViewById(android.R.id.content) as ViewGroup).addView(PermissionTipsView!)
|
||||
}
|
||||
}
|
||||
if (listener != null)
|
||||
listener!.onConfirm?.invoke(permissions)
|
||||
|
||||
})
|
||||
permissionListener!.onComplete((permissions : Array<string>) => {
|
||||
// clearTimeout(timeoutRequestId)
|
||||
let activity = UTSAndroid.getUniActivity()!
|
||||
if (PermissionTipsView != null) {
|
||||
PermissionTipsView!.setAnimation(AnimationUtils.loadAnimation(activity, R.anim.popupwindow_exit));
|
||||
((PermissionTipsView!.getParent()) as ViewGroup).removeView(PermissionTipsView!)
|
||||
PermissionTipsView = null
|
||||
}
|
||||
if (listener != null) {
|
||||
var permissionStatus = {}
|
||||
for (var p in permissions) {
|
||||
permissionStatus[p] = UTSAndroid.checkSystemPermissionGranted(UTSAndroid.getUniActivity()!, [p]) ? "grant" : "denied"
|
||||
}
|
||||
listener!.onComplete?.invoke(permissionStatus)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
export const setRequestPermissionTips : SetRequestPermissionTips = (tips : UTSJSONObject) => {
|
||||
permissionTips.clear()
|
||||
for (var k in tips) {
|
||||
permissionTips.put(k, tips[k] != null ? tips[k].toString() : "")
|
||||
}
|
||||
}
|
||||
|
||||
function createPermissionWindow(activity : Activity, permissions : Array<string>) : ViewGroup | null {
|
||||
let rootView = new RelativeLayout(activity);
|
||||
rootView.setBackgroundColor(Color.TRANSPARENT);
|
||||
let backgroundView = new LinearLayout(activity);
|
||||
backgroundView.setPadding(30, 0, 30, 30);
|
||||
backgroundView.setOrientation(1)
|
||||
backgroundView.setBackgroundResource(R.drawable.dcloud_permission_background);
|
||||
let permissionTipsList : Array<string> = new Array<string>()
|
||||
for (var p in permissions) {
|
||||
if (permissionTips.containsKey(p) && permissionTipsList.indexOf(permissionTips.get(p)) == -1) {
|
||||
permissionTipsList.push(permissionTips.get(p)!)
|
||||
}
|
||||
}
|
||||
for (var p in permissionTipsList) {
|
||||
let text = new TextView(activity);
|
||||
text.setText(Html.fromHtml(p, Html.FROM_HTML_SEPARATOR_LINE_BREAK_HEADING))
|
||||
text.setPadding(0, 30, 0, 0)
|
||||
text.setTextSize((5 * UTSAndroid.getScale()).toFloat())
|
||||
text.setTextColor(Color.BLACK)
|
||||
backgroundView.addView(text)
|
||||
}
|
||||
if (backgroundView.getChildCount() == 0) {
|
||||
return null;
|
||||
}
|
||||
let rll = new RelativeLayout.LayoutParams(-1, -2)
|
||||
rll.topMargin = (UTSAndroid.getStatusBarHeight() * UTSAndroid.getScale()).toInt();
|
||||
rll.leftMargin = 30;
|
||||
rll.rightMargin = 30;
|
||||
rll.bottomMargin = 30;
|
||||
rootView.addView(backgroundView, rll)
|
||||
rootView.setAnimation(AnimationUtils.loadAnimation(activity, R.anim.popupwindow_enter));
|
||||
return rootView;
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<translate xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:duration="200"
|
||||
android:fromYDelta="-100%"
|
||||
android:toYDelta="0" >
|
||||
</translate>
|
@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<translate xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:duration="200"
|
||||
android:fromYDelta="0"
|
||||
android:toYDelta="-100%" />
|
@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<corners android:radius="8dp" />
|
||||
<!-- <stroke android:color="@color/black" android:width="2dp"/>-->
|
||||
<solid android:color="#ffffff"/>
|
||||
</shape>
|
@ -1,19 +0,0 @@
|
||||
export type RequestPermissionTipsListener = {
|
||||
onRequest ?: ((permissions : Array<string>) => void) | null,
|
||||
onConfirm ?: ((permission : Array<string>) => void) | null,
|
||||
onComplete ?: ((permissions : UTSJSONObject) => void) | null
|
||||
}
|
||||
|
||||
|
||||
export type RegisterRequestPermissionTipsListener = (listener : RequestPermissionTipsListener | null) => void
|
||||
export type UnregisterRequestPermissionTipsListener = (listener : RequestPermissionTipsListener | null) => void
|
||||
export type SetRequestPermissionTips = (tips : UTSJSONObject) => void
|
||||
|
||||
export interface Uni {
|
||||
|
||||
registerRequestPermissionTipsListener : RegisterRequestPermissionTipsListener,
|
||||
|
||||
unregisterRequestPermissionTipsListener : UnregisterRequestPermissionTipsListener
|
||||
|
||||
setRequestPermissionTips : SetRequestPermissionTips
|
||||
}
|
4
unpackage/cache/certdataios
vendored
4
unpackage/cache/certdataios
vendored
@ -1,3 +1,3 @@
|
||||
iosProfile=D:/WebstormProjects/oa-base/files/ios/oa_dev_20240516.mobileprovision
|
||||
ioscertFile=D:/WebstormProjects/oa-base/files/ios/20230714_dev.p12
|
||||
iosProfile=D:/WebstormProjects/oa-base/files/ios/oadev20240709.mobileprovision
|
||||
ioscertFile=D:/WebstormProjects/oa-base/files/ios/dev.p12
|
||||
ioscertPassword=uecGPNMV8s+KLcdEgW/MRg==
|
||||
|
@ -1 +1 @@
|
||||
{"dir":"/Users/seaman/srv/bdserver.dcloud.net.cn/service/storage/app/package/IOS/queue/c4575c00-4029-11ef-8567-3d311656bb68/wgtRoot/__UNI__4796942/"}
|
||||
{"dir":"/Users/seaman/srv/bdserver.dcloud.net.cn/service/storage/app/package/IOS/queue/f2298b00-593b-11ef-a5f6-293d800e1281/wgtRoot/__UNI__4796942/"}
|
@ -1,8 +1,8 @@
|
||||
|
||||
;(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.23","entryPagePath":"pages/networko/index","entryPageQuery":"","realEntryPagePath":"","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000},"locales":{},"darkmode":false,"themeConfig":{}};
|
||||
const __uniRoutes = [{"path":"pages/networko/index","meta":{"isQuit":true,"isEntry":true,"navigationBar":{"titleText":"uni-app","style":"custom","type":"default"},"isNVue":false}},{"path":"pages/index/index","meta":{"navigationBar":{"titleText":"uni-app","style":"custom","type":"default"},"isNVue":false}}].map(uniRoute=>(uniRoute.meta.route=uniRoute.path,__uniConfig.pages.push(uniRoute.path),uniRoute.path='/'+uniRoute.path,uniRoute));
|
||||
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.23","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":false}},{"path":"pages/networko/index","meta":{"navigationBar":{"titleText":"uni-app","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()})}});
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
@ -1,8 +1,8 @@
|
||||
|
||||
;(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.23","entryPagePath":"pages/networko/index","entryPageQuery":"","realEntryPagePath":"","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000},"locales":{},"darkmode":false,"themeConfig":{}};
|
||||
const __uniRoutes = [{"path":"pages/networko/index","meta":{"isQuit":true,"isEntry":true,"navigationBar":{"titleText":"uni-app","style":"custom","type":"default"},"isNVue":false}},{"path":"pages/index/index","meta":{"navigationBar":{"titleText":"uni-app","style":"custom","type":"default"},"isNVue":false}}].map(uniRoute=>(uniRoute.meta.route=uniRoute.path,__uniConfig.pages.push(uniRoute.path),uniRoute.path='/'+uniRoute.path,uniRoute));
|
||||
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.23","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":false}},{"path":"pages/networko/index","meta":{"navigationBar":{"titleText":"uni-app","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()})}});
|
||||
|
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
21
unpackage/dist/build/app-plus/manifest.json
vendored
21
unpackage/dist/build/app-plus/manifest.json
vendored
@ -7,8 +7,8 @@
|
||||
"id": "__UNI__4796942",
|
||||
"name": "oa考勤系统",
|
||||
"version": {
|
||||
"name": "2.0.3",
|
||||
"code": 203
|
||||
"name": "2.0.4",
|
||||
"code": 204
|
||||
},
|
||||
"description": "",
|
||||
"developer": {
|
||||
@ -19,6 +19,10 @@
|
||||
"permissions": {
|
||||
"Camera": {},
|
||||
"Geolocation": {},
|
||||
"Maps": {
|
||||
"coordType": "gcj02"
|
||||
},
|
||||
"Push": {},
|
||||
"UniNView": {
|
||||
"description": "UniNView原生渲染"
|
||||
}
|
||||
@ -114,7 +118,7 @@
|
||||
"arm64-v8a"
|
||||
],
|
||||
"autoSdkPermissions": false,
|
||||
"targetSdkVersion": 33
|
||||
"targetSdkVersion": 34
|
||||
},
|
||||
"apple": {
|
||||
"dSYMs": false,
|
||||
@ -152,10 +156,13 @@
|
||||
"push": {
|
||||
"unipush": {
|
||||
"version": "2",
|
||||
"offline": true,
|
||||
"hms": {},
|
||||
"oppo": {},
|
||||
"vivo": {}
|
||||
"offline": true
|
||||
}
|
||||
},
|
||||
"maps": {
|
||||
"baidu": {
|
||||
"appkey_ios": "5zzMAq3ofL5H5KfxRcf0zDMLTimvGIb0",
|
||||
"appkey_android": "ahdcPcBfatf61zRAgNl9SpBGUEURsnXN"
|
||||
}
|
||||
},
|
||||
"audio": {
|
||||
|
File diff suppressed because one or more lines are too long
240
unpackage/dist/dev/app-plus/app-service.js
vendored
240
unpackage/dist/dev/app-plus/app-service.js
vendored
@ -32,7 +32,7 @@ if (uni.restoreGlobal) {
|
||||
(function(vue) {
|
||||
"use strict";
|
||||
var _e2, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
||||
const mpMixin = {};
|
||||
const ON_EXIT = "onExit";
|
||||
function formatAppLog(type, filename, ...args) {
|
||||
if (uni.__log__) {
|
||||
uni.__log__(type, filename, ...args);
|
||||
@ -43,6 +43,123 @@ if (uni.restoreGlobal) {
|
||||
function resolveEasycom(component, easycom) {
|
||||
return typeof component === "string" ? easycom : component;
|
||||
}
|
||||
const createHook = (lifecycle) => (hook, target = vue.getCurrentInstance()) => {
|
||||
!vue.isInSSRComponentSetup && vue.injectHook(lifecycle, hook, target);
|
||||
};
|
||||
const onExit = /* @__PURE__ */ createHook(ON_EXIT);
|
||||
const env = "dev";
|
||||
const configs = {
|
||||
LocalTest: {
|
||||
apiBaseUrl: "https://warehouse.szjixun.cn/oa_backend",
|
||||
h5Url: "http://192.168.88.51:8080/#/"
|
||||
},
|
||||
dev: {
|
||||
apiBaseUrl: "https://warehouse.szjixun.cn/oa_backend",
|
||||
h5Url: "http://192.168.88.56:8080/#/"
|
||||
},
|
||||
test: {
|
||||
apiBaseUrl: "https://warehouse.szjixun.cn/oa_backend",
|
||||
h5Url: "http://114.218.158.24:8042/#/"
|
||||
},
|
||||
prod: {
|
||||
apiBaseUrl: "https://oa-a.szjixun.cn/api",
|
||||
h5Url: "https://oa-a.szjixun.cn/#/"
|
||||
}
|
||||
};
|
||||
const config = configs[env];
|
||||
class Communication {
|
||||
constructor() {
|
||||
this.webViewObj = null;
|
||||
this.messageHandlers = {};
|
||||
}
|
||||
setWebView(webView) {
|
||||
this.webViewObj = webView;
|
||||
}
|
||||
sendToH5(action, data = {}) {
|
||||
if (!this.webViewObj) {
|
||||
formatAppLog("error", "at utils/communication.js:13", "webViewObj is not initialized");
|
||||
return;
|
||||
}
|
||||
const message = JSON.stringify({ action, data });
|
||||
this.webViewObj.evalJS(`window.handleMessage(${JSON.stringify(message)})`);
|
||||
}
|
||||
registerHandler(action, handler) {
|
||||
this.messageHandlers[action] = handler;
|
||||
}
|
||||
handleMessage(message) {
|
||||
try {
|
||||
const { action, data } = JSON.parse(message);
|
||||
if (this.messageHandlers[action]) {
|
||||
this.messageHandlers[action](data);
|
||||
} else {
|
||||
formatAppLog("warn", "at utils/communication.js:31", "Unknown action:", action);
|
||||
}
|
||||
} catch (error2) {
|
||||
formatAppLog("error", "at utils/communication.js:34", "Failed to handle message:", error2);
|
||||
}
|
||||
}
|
||||
}
|
||||
const _export_sfc = (sfc, props2) => {
|
||||
const target = sfc.__vccOpts || sfc;
|
||||
for (const [key, val] of props2) {
|
||||
target[key] = val;
|
||||
}
|
||||
return target;
|
||||
};
|
||||
const _sfc_main$8 = {
|
||||
__name: "index",
|
||||
setup(__props) {
|
||||
const commun = new Communication();
|
||||
const permissionListener = uni.createRequestPermissionListener();
|
||||
permissionListener.onRequest((e2) => {
|
||||
formatAppLog("log", "at pages/index/index.vue:12", "APP执行onRequest", e2);
|
||||
commun.sendToH5("permission-application", e2);
|
||||
});
|
||||
permissionListener.onConfirm((e2) => {
|
||||
});
|
||||
permissionListener.onComplete((e2) => {
|
||||
formatAppLog("log", "at pages/index/index.vue:18", "APP执行onComplete", e2);
|
||||
commun.sendToH5("permission-complete", e2);
|
||||
});
|
||||
onExit(() => {
|
||||
permissionListener.stop();
|
||||
});
|
||||
function initializeWebView() {
|
||||
const currentWebview = getCurrentPages().pop().$getAppWebview();
|
||||
formatAppLog("log", "at pages/index/index.vue:28", "当前view", currentWebview);
|
||||
commun.setWebView(currentWebview.children()[0]);
|
||||
}
|
||||
commun.registerHandler("load-complete", () => {
|
||||
});
|
||||
const webLoad = (e2) => {
|
||||
var _a;
|
||||
try {
|
||||
const message = ((_a = e2.detail.data) == null ? void 0 : _a[0]) || "";
|
||||
if (message.action === "load-complete") {
|
||||
initializeWebView();
|
||||
const { statusBarHeight } = uni.getSystemInfoSync();
|
||||
commun.webViewObj.setStyle({
|
||||
top: statusBarHeight,
|
||||
bottom: 0
|
||||
});
|
||||
} else {
|
||||
commun.handleMessage(message);
|
||||
}
|
||||
} catch (error2) {
|
||||
}
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
return vue.openBlock(), vue.createElementBlock("web-view", {
|
||||
class: "webview",
|
||||
onMessage: webLoad,
|
||||
style: { "flex": "1" },
|
||||
src: vue.unref(config).h5Url
|
||||
}, null, 40, ["src"]);
|
||||
};
|
||||
}
|
||||
};
|
||||
const PagesIndexIndex = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__file", "D:/WebstormProjects/oa-base/pages/index/index.vue"]]);
|
||||
const mpMixin = {};
|
||||
function email(value) {
|
||||
return /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/.test(value);
|
||||
}
|
||||
@ -1300,14 +1417,7 @@ if (uni.restoreGlobal) {
|
||||
...(_f = (_e2 = uni.$uv) == null ? void 0 : _e2.props) == null ? void 0 : _f.icon
|
||||
}
|
||||
};
|
||||
const _export_sfc = (sfc, props2) => {
|
||||
const target = sfc.__vccOpts || sfc;
|
||||
for (const [key, val] of props2) {
|
||||
target[key] = val;
|
||||
}
|
||||
return target;
|
||||
};
|
||||
const _sfc_main$8 = {
|
||||
const _sfc_main$7 = {
|
||||
name: "uv-icon",
|
||||
emits: ["click"],
|
||||
mixins: [mpMixin, mixin, props$4],
|
||||
@ -1412,7 +1522,7 @@ if (uni.restoreGlobal) {
|
||||
/* CLASS */
|
||||
);
|
||||
}
|
||||
const __easycom_0$2 = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$5], ["__scopeId", "data-v-b7a6dd5d"], ["__file", "D:/WebstormProjects/oa-base/uni_modules/uv-icon/components/uv-icon/uv-icon.vue"]]);
|
||||
const __easycom_0$2 = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$5], ["__scopeId", "data-v-b7a6dd5d"], ["__file", "D:/WebstormProjects/oa-base/uni_modules/uv-icon/components/uv-icon/uv-icon.vue"]]);
|
||||
function colorGradient(startColor = "rgb(0, 0, 0)", endColor = "rgb(255, 255, 255)", step = 10) {
|
||||
const startRGB = hexToRgb(startColor, false);
|
||||
const startR = startRGB[0];
|
||||
@ -1564,7 +1674,7 @@ if (uni.restoreGlobal) {
|
||||
...(_h = (_g = uni.$uv) == null ? void 0 : _g.props) == null ? void 0 : _h.loadingIcon
|
||||
}
|
||||
};
|
||||
const _sfc_main$7 = {
|
||||
const _sfc_main$6 = {
|
||||
name: "uv-loading-icon",
|
||||
mixins: [mpMixin, mixin, props$3],
|
||||
data() {
|
||||
@ -1687,7 +1797,7 @@ if (uni.restoreGlobal) {
|
||||
/* CLASS, STYLE */
|
||||
)) : vue.createCommentVNode("v-if", true);
|
||||
}
|
||||
const __easycom_0$1 = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$4], ["__scopeId", "data-v-29b619ea"], ["__file", "D:/WebstormProjects/oa-base/uni_modules/uv-loading-icon/components/uv-loading-icon/uv-loading-icon.vue"]]);
|
||||
const __easycom_0$1 = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$4], ["__scopeId", "data-v-29b619ea"], ["__file", "D:/WebstormProjects/oa-base/uni_modules/uv-loading-icon/components/uv-loading-icon/uv-loading-icon.vue"]]);
|
||||
const props$2 = {
|
||||
props: {
|
||||
// 是否细边框
|
||||
@ -1851,7 +1961,7 @@ if (uni.restoreGlobal) {
|
||||
...(_j = (_i = uni.$uv) == null ? void 0 : _i.props) == null ? void 0 : _j.button
|
||||
}
|
||||
};
|
||||
const _sfc_main$6 = {
|
||||
const _sfc_main$5 = {
|
||||
name: "uv-button",
|
||||
mixins: [mpMixin, mixin, props$2],
|
||||
emits: ["click"],
|
||||
@ -2056,7 +2166,7 @@ if (uni.restoreGlobal) {
|
||||
/* STYLE */
|
||||
);
|
||||
}
|
||||
const __easycom_1 = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$3], ["__scopeId", "data-v-ae8e42c7"], ["__file", "D:/WebstormProjects/oa-base/uni_modules/uv-button/components/uv-button/uv-button.vue"]]);
|
||||
const __easycom_1 = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$3], ["__scopeId", "data-v-ae8e42c7"], ["__file", "D:/WebstormProjects/oa-base/uni_modules/uv-button/components/uv-button/uv-button.vue"]]);
|
||||
class MPAnimation {
|
||||
constructor(options, _this) {
|
||||
this.options = options;
|
||||
@ -2169,7 +2279,7 @@ if (uni.restoreGlobal) {
|
||||
clearTimeout(_this.timer);
|
||||
return new MPAnimation(option, _this);
|
||||
}
|
||||
const _sfc_main$5 = {
|
||||
const _sfc_main$4 = {
|
||||
name: "uv-transition",
|
||||
mixins: [mpMixin, mixin],
|
||||
emits: ["click", "change"],
|
||||
@ -2429,7 +2539,7 @@ if (uni.restoreGlobal) {
|
||||
vue.renderSlot(_ctx.$slots, "default")
|
||||
], 14, ["animation"])) : vue.createCommentVNode("v-if", true);
|
||||
}
|
||||
const __easycom_0 = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$2], ["__file", "D:/WebstormProjects/oa-base/uni_modules/uv-transition/components/uv-transition/uv-transition.vue"]]);
|
||||
const __easycom_0 = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$2], ["__file", "D:/WebstormProjects/oa-base/uni_modules/uv-transition/components/uv-transition/uv-transition.vue"]]);
|
||||
const props$1 = {
|
||||
props: {
|
||||
// 是否显示遮罩
|
||||
@ -2455,7 +2565,7 @@ if (uni.restoreGlobal) {
|
||||
...(_l = (_k = uni.$uv) == null ? void 0 : _k.props) == null ? void 0 : _l.overlay
|
||||
}
|
||||
};
|
||||
const _sfc_main$4 = {
|
||||
const _sfc_main$3 = {
|
||||
name: "uv-overlay",
|
||||
emits: ["click"],
|
||||
mixins: [mpMixin, mixin, props$1],
|
||||
@ -2503,7 +2613,7 @@ if (uni.restoreGlobal) {
|
||||
/* FORWARDED */
|
||||
}, 8, ["show", "duration", "custom-style", "onClick", "onTouchmove"]);
|
||||
}
|
||||
const __easycom_2 = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$1], ["__scopeId", "data-v-7303e1aa"], ["__file", "D:/WebstormProjects/oa-base/uni_modules/uv-overlay/components/uv-overlay/uv-overlay.vue"]]);
|
||||
const __easycom_2 = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$1], ["__scopeId", "data-v-7303e1aa"], ["__file", "D:/WebstormProjects/oa-base/uni_modules/uv-overlay/components/uv-overlay/uv-overlay.vue"]]);
|
||||
const props = {
|
||||
props: {
|
||||
// 页面文字提示
|
||||
@ -2524,7 +2634,7 @@ if (uni.restoreGlobal) {
|
||||
...(_n = (_m = uni.$uv) == null ? void 0 : _m.props) == null ? void 0 : _n.noNetwork
|
||||
}
|
||||
};
|
||||
const _sfc_main$3 = {
|
||||
const _sfc_main$2 = {
|
||||
name: "uv-no-network",
|
||||
mixins: [mpMixin, mixin, props],
|
||||
data() {
|
||||
@ -2697,58 +2807,7 @@ if (uni.restoreGlobal) {
|
||||
/* STABLE */
|
||||
}, 8, ["show", "zIndex", "onTouchmove"]);
|
||||
}
|
||||
const uvNoNetwork = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render], ["__scopeId", "data-v-bffa4de5"], ["__file", "D:/WebstormProjects/oa-base/uni_modules/uv-no-network/components/uv-no-network/uv-no-network.vue"]]);
|
||||
const env = "dev";
|
||||
const configs = {
|
||||
LocalTest: {
|
||||
apiBaseUrl: "https://warehouse.szjixun.cn/oa_backend",
|
||||
h5Url: "http://192.168.88.37:8080/#/"
|
||||
},
|
||||
dev: {
|
||||
apiBaseUrl: "https://warehouse.szjixun.cn/oa_backend",
|
||||
h5Url: "http://192.168.88.37:8080/#/"
|
||||
},
|
||||
test: {
|
||||
apiBaseUrl: "https://warehouse.szjixun.cn/oa_backend",
|
||||
h5Url: "http://114.218.158.24:8042/#/"
|
||||
},
|
||||
prod: {
|
||||
apiBaseUrl: "https://oa-a.szjixun.cn/api",
|
||||
h5Url: "https://oa-a.szjixun.cn/#/"
|
||||
}
|
||||
};
|
||||
const config = configs[env];
|
||||
const _sfc_main$2 = {
|
||||
__name: "index",
|
||||
setup(__props) {
|
||||
const webViewObj = vue.ref(null);
|
||||
const webLoad = (e2) => {
|
||||
var _a, _b;
|
||||
const h5SendString = (_b = (_a = e2.detail.data) == null ? void 0 : _a[0]) == null ? void 0 : _b.action;
|
||||
switch (h5SendString) {
|
||||
case "load-complete": {
|
||||
const { statusBarHeight } = uni.getSystemInfoSync();
|
||||
const currentWebview = getCurrentPages().pop().$getAppWebview();
|
||||
webViewObj.value = currentWebview.children()[0];
|
||||
webViewObj.value.setStyle({
|
||||
top: statusBarHeight,
|
||||
bottom: 0
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
return vue.openBlock(), vue.createElementBlock("web-view", {
|
||||
class: "webview",
|
||||
onMessage: webLoad,
|
||||
style: { "flex": "1" },
|
||||
ref: "webViewRef",
|
||||
src: vue.unref(config).h5Url
|
||||
}, null, 40, ["src"]);
|
||||
};
|
||||
}
|
||||
};
|
||||
const PagesIndexIndex = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__file", "D:/WebstormProjects/oa-base/pages/index/index.vue"]]);
|
||||
const uvNoNetwork = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render], ["__scopeId", "data-v-bffa4de5"], ["__file", "D:/WebstormProjects/oa-base/uni_modules/uv-no-network/components/uv-no-network/uv-no-network.vue"]]);
|
||||
const _sfc_main$1 = {
|
||||
__name: "index",
|
||||
setup(__props) {
|
||||
@ -2760,6 +2819,43 @@ if (uni.restoreGlobal) {
|
||||
const PagesNetworkoIndex = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__file", "D:/WebstormProjects/oa-base/pages/networko/index.vue"]]);
|
||||
__definePage("pages/index/index", PagesIndexIndex);
|
||||
__definePage("pages/networko/index", PagesNetworkoIndex);
|
||||
function initPushNotification() {
|
||||
if (typeof plus !== "undefined" && plus.push) {
|
||||
plus.globalEvent.addEventListener("newPath", ({ path }) => {
|
||||
if (!path) {
|
||||
return;
|
||||
}
|
||||
const pages2 = getCurrentPages();
|
||||
const currentPage = pages2[pages2.length - 1];
|
||||
if (currentPage && currentPage.$page && currentPage.$page.fullPath === path) {
|
||||
return;
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: path,
|
||||
fail(res) {
|
||||
if (res.errMsg.indexOf("tabbar") > -1) {
|
||||
uni.switchTab({
|
||||
url: path,
|
||||
fail(res2) {
|
||||
console.error(res2.errMsg);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
console.error(res.errMsg);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
uni.invokePushCallback({
|
||||
type: "enabled",
|
||||
offline: true
|
||||
});
|
||||
Promise.resolve().then(() => {
|
||||
initPushNotification();
|
||||
plus.push.setAutoNotification && plus.push.setAutoNotification(false);
|
||||
});
|
||||
const _sfc_main = {
|
||||
methods: {
|
||||
networkStatusChange(res) {
|
||||
@ -3110,7 +3206,7 @@ if (uni.restoreGlobal) {
|
||||
function I(e2) {
|
||||
return e2 && "string" == typeof e2 ? JSON.parse(e2) : e2;
|
||||
}
|
||||
const S = true, b = "app", A = I(define_process_env_UNI_SECURE_NETWORK_CONFIG_default), C = b, P = 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'), T = I('[{"provider":"alipay","spaceName":"oaapp","spaceId":"env-00jxgxphla18","spaceAppId":"2021004145628977","accessKey":"ZALus7EgJXdovISb","secretKey":"7qzvVrPN0mAxfcLr"}]') || [];
|
||||
const S = true, b = "app", A = I(define_process_env_UNI_SECURE_NETWORK_CONFIG_default), C = b, P = I('{\n "address": [\n "127.0.0.1",\n "192.168.56.1",\n "192.168.88.56"\n ],\n "debugPort": 9001,\n "initialLaunchType": "local",\n "servePort": 7001,\n "skipFiles": [\n "<node_internals>/**",\n "C:/Users/37363/Downloads/HBuilderX.4.08.2024040127/HBuilderX/plugins/unicloud/**/*.js"\n ]\n}\n'), T = I('[{"provider":"alipay","spaceName":"oaapp","spaceId":"env-00jxgxphla18","spaceAppId":"2021004145628977","accessKey":"ZALus7EgJXdovISb","secretKey":"7qzvVrPN0mAxfcLr"}]') || [];
|
||||
let O = "";
|
||||
try {
|
||||
O = "__UNI__4796942";
|
||||
|
21
unpackage/dist/dev/app-plus/manifest.json
vendored
21
unpackage/dist/dev/app-plus/manifest.json
vendored
@ -7,8 +7,8 @@
|
||||
"id": "__UNI__4796942",
|
||||
"name": "oa考勤系统",
|
||||
"version": {
|
||||
"name": "2.0.3",
|
||||
"code": 203
|
||||
"name": "2.0.4",
|
||||
"code": 204
|
||||
},
|
||||
"description": "",
|
||||
"developer": {
|
||||
@ -19,6 +19,10 @@
|
||||
"permissions": {
|
||||
"Camera": {},
|
||||
"Geolocation": {},
|
||||
"Maps": {
|
||||
"coordType": "gcj02"
|
||||
},
|
||||
"Push": {},
|
||||
"UniNView": {
|
||||
"description": "UniNView原生渲染"
|
||||
}
|
||||
@ -114,7 +118,7 @@
|
||||
"arm64-v8a"
|
||||
],
|
||||
"autoSdkPermissions": false,
|
||||
"targetSdkVersion": 33
|
||||
"targetSdkVersion": 34
|
||||
},
|
||||
"apple": {
|
||||
"dSYMs": false,
|
||||
@ -152,10 +156,13 @@
|
||||
"push": {
|
||||
"unipush": {
|
||||
"version": "2",
|
||||
"offline": true,
|
||||
"hms": {},
|
||||
"oppo": {},
|
||||
"vivo": {}
|
||||
"offline": true
|
||||
}
|
||||
},
|
||||
"maps": {
|
||||
"baidu": {
|
||||
"appkey_ios": "5zzMAq3ofL5H5KfxRcf0zDMLTimvGIb0",
|
||||
"appkey_android": "ahdcPcBfatf61zRAgNl9SpBGUEURsnXN"
|
||||
}
|
||||
},
|
||||
"audio": {
|
||||
|
549
unpackage/dist/dev/app-plus/pages/index/index.css
vendored
549
unpackage/dist/dev/app-plus/pages/index/index.css
vendored
@ -1,549 +0,0 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
uni-view[data-v-b7a6dd5d], uni-scroll-view[data-v-b7a6dd5d], uni-swiper-item[data-v-b7a6dd5d] {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-shrink: 0;
|
||||
flex-grow: 0;
|
||||
flex-basis: auto;
|
||||
align-items: stretch;
|
||||
align-content: flex-start;
|
||||
}
|
||||
@font-face {
|
||||
font-family: "uvicon-iconfont";
|
||||
src: url("../../assets/uvicons.04d281cc.ttf") format("truetype");
|
||||
}
|
||||
.uv-icon[data-v-b7a6dd5d] {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.uv-icon--left[data-v-b7a6dd5d] {
|
||||
flex-direction: row-reverse;
|
||||
align-items: center;
|
||||
}
|
||||
.uv-icon--right[data-v-b7a6dd5d] {
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
}
|
||||
.uv-icon--top[data-v-b7a6dd5d] {
|
||||
flex-direction: column-reverse;
|
||||
justify-content: center;
|
||||
}
|
||||
.uv-icon--bottom[data-v-b7a6dd5d] {
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
}
|
||||
.uv-icon__icon[data-v-b7a6dd5d] {
|
||||
font-family: uvicon-iconfont;
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
}
|
||||
.uv-icon__icon--primary[data-v-b7a6dd5d] {
|
||||
color: #3c9cff;
|
||||
}
|
||||
.uv-icon__icon--success[data-v-b7a6dd5d] {
|
||||
color: #5ac725;
|
||||
}
|
||||
.uv-icon__icon--error[data-v-b7a6dd5d] {
|
||||
color: #f56c6c;
|
||||
}
|
||||
.uv-icon__icon--warning[data-v-b7a6dd5d] {
|
||||
color: #f9ae3d;
|
||||
}
|
||||
.uv-icon__icon--info[data-v-b7a6dd5d] {
|
||||
color: #909399;
|
||||
}
|
||||
.uv-icon__img[data-v-b7a6dd5d] {
|
||||
height: auto;
|
||||
will-change: transform;
|
||||
}
|
||||
.uv-icon__label[data-v-b7a6dd5d] {
|
||||
line-height: 1;
|
||||
}
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
uni-view[data-v-29b619ea], uni-scroll-view[data-v-29b619ea], uni-swiper-item[data-v-29b619ea] {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-shrink: 0;
|
||||
flex-grow: 0;
|
||||
flex-basis: auto;
|
||||
align-items: stretch;
|
||||
align-content: flex-start;
|
||||
}
|
||||
.uv-loading-icon[data-v-29b619ea] {
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #c8c9cc;
|
||||
}
|
||||
.uv-loading-icon__text[data-v-29b619ea] {
|
||||
margin-left: 4px;
|
||||
color: #606266;
|
||||
font-size: 14px;
|
||||
line-height: 20px;
|
||||
}
|
||||
.uv-loading-icon__spinner[data-v-29b619ea] {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
animation: uv-rotate-29b619ea 1s linear infinite;
|
||||
}
|
||||
.uv-loading-icon__spinner--semicircle[data-v-29b619ea] {
|
||||
border-width: 2px;
|
||||
border-color: transparent;
|
||||
border-top-right-radius: 100px;
|
||||
border-top-left-radius: 100px;
|
||||
border-bottom-left-radius: 100px;
|
||||
border-bottom-right-radius: 100px;
|
||||
border-style: solid;
|
||||
}
|
||||
.uv-loading-icon__spinner--circle[data-v-29b619ea] {
|
||||
border-top-right-radius: 100px;
|
||||
border-top-left-radius: 100px;
|
||||
border-bottom-left-radius: 100px;
|
||||
border-bottom-right-radius: 100px;
|
||||
border-width: 2px;
|
||||
border-top-color: #e5e5e5;
|
||||
border-right-color: #e5e5e5;
|
||||
border-bottom-color: #e5e5e5;
|
||||
border-left-color: #e5e5e5;
|
||||
border-style: solid;
|
||||
}
|
||||
.uv-loading-icon--vertical[data-v-29b619ea] {
|
||||
flex-direction: column;
|
||||
}
|
||||
[data-v-29b619ea]:host {
|
||||
font-size: 0px;
|
||||
line-height: 1;
|
||||
}
|
||||
.uv-loading-icon__spinner--spinner[data-v-29b619ea] {
|
||||
animation-timing-function: steps(12);
|
||||
}
|
||||
.uv-loading-icon__text[data-v-29b619ea]:empty {
|
||||
display: none;
|
||||
}
|
||||
.uv-loading-icon--vertical .uv-loading-icon__text[data-v-29b619ea] {
|
||||
margin: 6px 0 0;
|
||||
color: #606266;
|
||||
}
|
||||
.uv-loading-icon__dot[data-v-29b619ea] {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.uv-loading-icon__dot[data-v-29b619ea]:before {
|
||||
display: block;
|
||||
width: 2px;
|
||||
height: 25%;
|
||||
margin: 0 auto;
|
||||
background-color: currentColor;
|
||||
border-radius: 40%;
|
||||
content: " ";
|
||||
}
|
||||
.uv-loading-icon__dot[data-v-29b619ea]:nth-of-type(1) {
|
||||
transform: rotate(30deg);
|
||||
opacity: 1;
|
||||
}
|
||||
.uv-loading-icon__dot[data-v-29b619ea]:nth-of-type(2) {
|
||||
transform: rotate(60deg);
|
||||
opacity: 0.9375;
|
||||
}
|
||||
.uv-loading-icon__dot[data-v-29b619ea]:nth-of-type(3) {
|
||||
transform: rotate(90deg);
|
||||
opacity: 0.875;
|
||||
}
|
||||
.uv-loading-icon__dot[data-v-29b619ea]:nth-of-type(4) {
|
||||
transform: rotate(120deg);
|
||||
opacity: 0.8125;
|
||||
}
|
||||
.uv-loading-icon__dot[data-v-29b619ea]:nth-of-type(5) {
|
||||
transform: rotate(150deg);
|
||||
opacity: 0.75;
|
||||
}
|
||||
.uv-loading-icon__dot[data-v-29b619ea]:nth-of-type(6) {
|
||||
transform: rotate(180deg);
|
||||
opacity: 0.6875;
|
||||
}
|
||||
.uv-loading-icon__dot[data-v-29b619ea]:nth-of-type(7) {
|
||||
transform: rotate(210deg);
|
||||
opacity: 0.625;
|
||||
}
|
||||
.uv-loading-icon__dot[data-v-29b619ea]:nth-of-type(8) {
|
||||
transform: rotate(240deg);
|
||||
opacity: 0.5625;
|
||||
}
|
||||
.uv-loading-icon__dot[data-v-29b619ea]:nth-of-type(9) {
|
||||
transform: rotate(270deg);
|
||||
opacity: 0.5;
|
||||
}
|
||||
.uv-loading-icon__dot[data-v-29b619ea]:nth-of-type(10) {
|
||||
transform: rotate(300deg);
|
||||
opacity: 0.4375;
|
||||
}
|
||||
.uv-loading-icon__dot[data-v-29b619ea]:nth-of-type(11) {
|
||||
transform: rotate(330deg);
|
||||
opacity: 0.375;
|
||||
}
|
||||
.uv-loading-icon__dot[data-v-29b619ea]:nth-of-type(12) {
|
||||
transform: rotate(360deg);
|
||||
opacity: 0.3125;
|
||||
}
|
||||
@keyframes uv-rotate-29b619ea {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
transform: rotate(1turn);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
.uv-reset-button[data-v-ae8e42c7] {
|
||||
padding: 0;
|
||||
background-color: transparent;
|
||||
}
|
||||
.uv-reset-button[data-v-ae8e42c7]::after {
|
||||
border: none;
|
||||
}
|
||||
uni-view[data-v-ae8e42c7], uni-scroll-view[data-v-ae8e42c7], uni-swiper-item[data-v-ae8e42c7] {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-shrink: 0;
|
||||
flex-grow: 0;
|
||||
flex-basis: auto;
|
||||
align-items: stretch;
|
||||
align-content: flex-start;
|
||||
}
|
||||
.uv-button-wrapper[data-v-ae8e42c7] {
|
||||
position: relative;
|
||||
}
|
||||
.uv-button-wrapper--dis[data-v-ae8e42c7] {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: 9;
|
||||
}
|
||||
.uv-button[data-v-ae8e42c7] {
|
||||
width: 100%;
|
||||
}
|
||||
.uv-button__text[data-v-ae8e42c7] {
|
||||
white-space: nowrap;
|
||||
line-height: 1;
|
||||
}
|
||||
.uv-button[data-v-ae8e42c7]:before {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: inherit;
|
||||
border-radius: inherit;
|
||||
transform: translate(-50%, -50%);
|
||||
opacity: 0;
|
||||
content: " ";
|
||||
background-color: #000;
|
||||
border-color: #000;
|
||||
}
|
||||
.uv-button--active[data-v-ae8e42c7]:before {
|
||||
opacity: 0.15;
|
||||
}
|
||||
.uv-button__icon + .uv-button__text[data-v-ae8e42c7]:not(:empty), .uv-button__loading-text[data-v-ae8e42c7] {
|
||||
margin-left: 4px;
|
||||
}
|
||||
.uv-button--plain.uv-button--primary[data-v-ae8e42c7] {
|
||||
color: #3c9cff;
|
||||
}
|
||||
.uv-button--plain.uv-button--info[data-v-ae8e42c7] {
|
||||
color: #909399;
|
||||
}
|
||||
.uv-button--plain.uv-button--success[data-v-ae8e42c7] {
|
||||
color: #5ac725;
|
||||
}
|
||||
.uv-button--plain.uv-button--error[data-v-ae8e42c7] {
|
||||
color: #f56c6c;
|
||||
}
|
||||
.uv-button--plain.uv-button--warning[data-v-ae8e42c7] {
|
||||
color: #f9ae3d;
|
||||
}
|
||||
.uv-button[data-v-ae8e42c7] {
|
||||
height: 40px;
|
||||
position: relative;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
box-sizing: border-box;
|
||||
flex-direction: row;
|
||||
}
|
||||
.uv-button__text[data-v-ae8e42c7] {
|
||||
font-size: 15px;
|
||||
}
|
||||
.uv-button__loading-text[data-v-ae8e42c7] {
|
||||
font-size: 15px;
|
||||
margin-left: 4px;
|
||||
}
|
||||
.uv-button--large[data-v-ae8e42c7] {
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
padding: 0 15px;
|
||||
}
|
||||
.uv-button--normal[data-v-ae8e42c7] {
|
||||
padding: 0 12px;
|
||||
font-size: 14px;
|
||||
}
|
||||
.uv-button--small[data-v-ae8e42c7] {
|
||||
min-width: 60px;
|
||||
height: 30px;
|
||||
padding: 0px 8px;
|
||||
font-size: 12px;
|
||||
}
|
||||
.uv-button--mini[data-v-ae8e42c7] {
|
||||
height: 22px;
|
||||
font-size: 10px;
|
||||
min-width: 50px;
|
||||
padding: 0px 8px;
|
||||
}
|
||||
.uv-button--disabled[data-v-ae8e42c7] {
|
||||
opacity: 0.5;
|
||||
}
|
||||
.uv-button--info[data-v-ae8e42c7] {
|
||||
color: #323233;
|
||||
background-color: #fff;
|
||||
border-color: #ebedf0;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
}
|
||||
.uv-button--success[data-v-ae8e42c7] {
|
||||
color: #fff;
|
||||
background-color: #5ac725;
|
||||
border-color: #5ac725;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
}
|
||||
.uv-button--primary[data-v-ae8e42c7] {
|
||||
color: #fff;
|
||||
background-color: #3c9cff;
|
||||
border-color: #3c9cff;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
}
|
||||
.uv-button--error[data-v-ae8e42c7] {
|
||||
color: #fff;
|
||||
background-color: #f56c6c;
|
||||
border-color: #f56c6c;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
}
|
||||
.uv-button--warning[data-v-ae8e42c7] {
|
||||
color: #fff;
|
||||
background-color: #f9ae3d;
|
||||
border-color: #f9ae3d;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
}
|
||||
.uv-button--block[data-v-ae8e42c7] {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
width: 100%;
|
||||
}
|
||||
.uv-button--circle[data-v-ae8e42c7] {
|
||||
border-top-right-radius: 100px;
|
||||
border-top-left-radius: 100px;
|
||||
border-bottom-left-radius: 100px;
|
||||
border-bottom-right-radius: 100px;
|
||||
}
|
||||
.uv-button--square[data-v-ae8e42c7] {
|
||||
border-bottom-left-radius: 3px;
|
||||
border-bottom-right-radius: 3px;
|
||||
border-top-left-radius: 3px;
|
||||
border-top-right-radius: 3px;
|
||||
}
|
||||
.uv-button__icon[data-v-ae8e42c7] {
|
||||
min-width: 1em;
|
||||
line-height: inherit !important;
|
||||
vertical-align: top;
|
||||
}
|
||||
.uv-button--plain[data-v-ae8e42c7] {
|
||||
background-color: #fff;
|
||||
}
|
||||
.uv-button--hairline[data-v-ae8e42c7] {
|
||||
border-width: 0.5px !important;
|
||||
}
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
.uv-overlay[data-v-7303e1aa] {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: rgba(0, 0, 0, 0.7);
|
||||
}
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
uni-view[data-v-bffa4de5], uni-scroll-view[data-v-bffa4de5], uni-swiper-item[data-v-bffa4de5] {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-shrink: 0;
|
||||
flex-grow: 0;
|
||||
flex-basis: auto;
|
||||
align-items: stretch;
|
||||
align-content: flex-start;
|
||||
}
|
||||
.uv-no-network[data-v-bffa4de5] {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-top: -100px;
|
||||
}
|
||||
.uv-no-network__tips[data-v-bffa4de5] {
|
||||
color: #909193;
|
||||
font-size: 14px;
|
||||
margin-top: 15px;
|
||||
}
|
||||
.uv-no-network__app[data-v-bffa4de5] {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
margin-top: 6px;
|
||||
}
|
||||
.uv-no-network__app__setting[data-v-bffa4de5] {
|
||||
color: #c0c4cc;
|
||||
font-size: 13px;
|
||||
}
|
||||
.uv-no-network__app__to-setting[data-v-bffa4de5] {
|
||||
font-size: 13px;
|
||||
color: #3c9cff;
|
||||
margin-left: 3px;
|
||||
}
|
||||
.uv-no-network__retry[data-v-bffa4de5] {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
margin-top: 15px;
|
||||
}
|
38
utils/communication.js
Normal file
38
utils/communication.js
Normal file
@ -0,0 +1,38 @@
|
||||
export class Communication {
|
||||
constructor() {
|
||||
this.webViewObj = null;
|
||||
this.messageHandlers = {};
|
||||
}
|
||||
|
||||
setWebView(webView) {
|
||||
this.webViewObj = webView;
|
||||
}
|
||||
|
||||
sendToH5(action, data = {}) {
|
||||
if (!this.webViewObj) {
|
||||
console.error('webViewObj is not initialized');
|
||||
return;
|
||||
}
|
||||
|
||||
const message = JSON.stringify({ action, data });
|
||||
// 调用 H5 端的 window.handleMessage 函数
|
||||
this.webViewObj.evalJS(`window.handleMessage(${JSON.stringify(message)})`);
|
||||
}
|
||||
|
||||
registerHandler(action, handler) {
|
||||
this.messageHandlers[action] = handler;
|
||||
}
|
||||
handleMessage(message) {
|
||||
try {
|
||||
const { action, data } = JSON.parse(message);
|
||||
if (this.messageHandlers[action]) {
|
||||
this.messageHandlers[action](data);
|
||||
} else {
|
||||
console.warn('Unknown action:', action);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Failed to handle message:', error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user