outside-the-system
Phoenix 3 months ago
parent 1bb3c9e744
commit 629ce2f21b

@ -10,10 +10,6 @@
"default" : {
"launchtype" : "local"
},
"h5" : {
"launchtype" : "local"
},
"provider" : "aliyun",
"type" : "uniCloud"
},
{

@ -1,40 +1,16 @@
<script setup>
import { onLaunch, onShow, onHide } from "@dcloudio/uni-app";
/* import location from "./utils/location"; */
onLaunch(() => {
/* location.startLocationService((res)=>{
console.log(JSON.stringify(res),'JSON.stringify(res)');
uni.showToast({
duration:1000,
icon:'none',
title:JSON.stringify(res)
})
},()=>{
}) */
})
onShow(() => {
})
onHide(() => {
/* plus.geolocation.clearWatch(LocationId) */
console.log("App Hide")
})
/* uni.getPushClientId({
success: (res) => {
let push_clientid = res.cid
console.log('客户端推送标识cid:',push_clientid)
<script>
export default {
onLaunch: function() {
},
onShow: function() {
console.log('App Show')
},
fail(err) {
console.log(err)
onHide: function() {
console.log('App Hide')
}
}
}) */
uni.onPushMessage((res)=>{
console.log(JSON.stringify(res),);
})
</script>
<style>
/*每个页面公共css */
</style>

@ -0,0 +1,36 @@
{
"version" : "1",
"prompt" : "template",
"title" : "服务协议和隐私政策",
"message" : "  请你务必审慎阅读、充分理解“平台服务协议”和“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/>  你可阅读<a href=\"https://oa.szjixun.cn/#/pages/login/serveInfo\">《用户服务协议》</a>和<a href=\"https://oa.szjixun.cn/#/pages/login/privateInfo\">《隐私政策》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。",
"buttonAccept" : "同意并接受",
"buttonRefuse" : "不同意",
"second" : {
"title" : "确认提示",
"message" : "  进入应用前,你需先同意<a href=\"https://oa.szjixun.cn/#/pages/login/serveInfo\">《用户服务协议》</a>和<a href=\"https://oa.szjixun.cn/#/pages/login/privateInfo\">《隐私政策》</a>,否则将退出应用。",
"buttonAccept" : "同意并继续",
"buttonRefuse" : "退出应用"
},
"disagreeMode" : {
"support" : false,
"loadNativePlugins" : false,
"visitorEntry" : false,
"showAlways" : false
},
"styles" : {
"backgroundColor" : "#ffffff",
"borderRadius" : "5px",
"title" : {
"color" : "#000"
},
"buttonAccept" : {
"color" : "#000"
},
"buttonRefuse" : {
"color" : "#000"
},
"buttonVisitor" : {
"color" : "#009"
}
}
}

@ -2,16 +2,17 @@ const env = 'prod';
const configs = {
dev: {
apiBaseUrl: 'https://warehouse.szjixun.cn/oa_backend',
h5Url: 'http://192.168.88.37:8080/#/'
h5Url:'http://192.168.88.37:8080/#/'
},
test: {
apiBaseUrl: 'https://warehouse.szjixun.cn/oa_backend',
h5Url: 'http://114.218.158.24:8042/#/'
h5Url:'http://172.16.100.93:8041/#/'
},
prod: {
apiBaseUrl: 'https://oa-a.szjixun.cn',
h5Url: 'https://oa-a.szjixun.cn/#/'
apiBaseUrl: 'https://oa-a.szjixun.cn/api',
h5Url:'https://oa-a.szjixun.cn/#/'
},
}
};
const config = configs[env];
export default config;

@ -1,8 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0,viewport-fit=cover" />
<meta charset="UTF-8" />
<script>
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
CSS.supports('top: constant(a)'))
document.write(
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
(coverSupport ? ', viewport-fit=cover' : '') + '" />')
</script>
<title></title>
<!--preload-links-->

@ -1,21 +1,15 @@
{
"name" : "泰丰考勤",
"appid" : "__UNI__4796942",
"name" : "oa考勤系统",
"appid" : "__UNI__70C49A3",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : 100,
"versionName" : "1.1.5",
"versionCode" : 115,
"transformPx" : false,
/* 5+App */
"app-plus" : {
"usingComponents" : true,
"nvueStyleCompiler" : "uni-app",
"compilerVersion" : 3,
"statusbar" : {
"immersed" : true
},
"navigationbar" : {
"hidden" : true
},
"splashscreen" : {
"alwaysShowBeforeRender" : true,
"waiting" : true,
@ -82,8 +76,7 @@
"appid" : "",
"UniversalLinks" : ""
}
},
"push" : {}
}
},
"icons" : {
"android" : {
@ -120,8 +113,7 @@
"splashscreen" : {
"useOriginalMsgbox" : true
}
},
"nativePlugins" : {}
}
},
/* */
"quickapp" : {},

@ -3,15 +3,16 @@
{
"path": "pages/index/index",
"style": {
"navigationStyle": "custom",
"app-plus": {
"titleNView": false
"navigationBarTitleText": "uni-app",
"navigationStyle": "custom"
}
}
}
],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8"
},
"uniIdRouter": {}
}

@ -0,0 +1,87 @@
<template>
<web-view class="webview" @message="webLoad" style="flex: 1;" ref="webViewRef" :src="config.h5Url"></web-view>
</template>
<script setup>
import { ref } from 'vue'
import config from "../../config";
import { onShow, onHide } from "@dcloudio/uni-app";
/* import {sendWebWiew,receiveWebView} from "@/utils/communicate"; */
/* import location from "../../utils/location"; */
/* import {
registerRequestPermissionTipsListener,
unregisterRequestPermissionTipsListener,
setRequestPermissionTips
} from "@/uni_modules/uni-registerRequestPermissionTips" */
/* plus.runtime.setBadgeNumber(999); */
/* const permissionListener = uni.createRequestPermissionListener();
permissionListener.onRequest((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) => {
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})
}
})*/
//iosh5
const networkStatusChange=(res)=>{
if(res.isConnected) {
uni.redirectTo({
url: '/pages/index/index'
})
} else {
uni.showToast({
title: '网络无连接',
icon: 'none'
})
}
}
const webViewObj=ref(null)
onShow(()=>{
uni.onNetworkStatusChange(networkStatusChange);
})
onHide(()=>{
uni.offNetworkStatusChange(networkStatusChange)
})
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.evalJS(`window.onReceive(${jsonString})`) */
webViewObj.value.setStyle({
top: statusBarHeight,
bottom: 0,
})
}
}
}
</script>
<style>
</style>

@ -0,0 +1,24 @@
// 简单的使用示例
'use strict';
const uniPush = uniCloud.getPushManager({appId:"__UNI__4796942"}) //注意这里需要传入你的应用appId
exports.main = async (event, context) => {
return await uniPush.sendMessage({
"push_clientid": "7d4aa359cc4dbab39f4e5fcbc7106b31", //填写上一步在uni-app客户端获取到的客户端推送标识push_clientid
"force_notification":true, //填写true客户端就会对在线消息自动创建“通知栏消息”。
"title": "通知栏显示的标题",
"content": "通知栏显示的内容",
"payload": {
"text":"体验一下uni-push2.0"
},
"options":{
"HW": {
// 值为int 类型。1 表示华为测试消息华为每个应用每日可发送该测试消息500条。此 target_user_type 参数请勿发布至线上。
"/message/android/target_user_type":1
} ,
"VV": {
//值为int 类型。0 表示正式推送1 表示测试推送不填默认为0。此 pushMode 参数请勿发布至线上。
"/pushMode":1
}
}
})
}

@ -0,0 +1,8 @@
{
"name": "uni-cloud-push",
"dependencies": {},
"extensions": {
"uni-cloud-jql": {},
"uni-cloud-push": {}
}
}

@ -0,0 +1,12 @@
// 本文件用于使用JQL语法操作项目关联的uniCloud空间的数据库方便开发调试和远程数据库管理
// 编写clientDB的js API也支持常规js语法比如var可以对云数据库进行增删改查操作。不支持uniCloud-db组件写法
// 可以全部运行也可以选中部分代码运行。点击工具栏上的运行按钮或者按下【F5】键运行代码
// 如果文档中存在多条JQL语句只有最后一条语句生效
// 如果混写了普通js最后一条语句需是数据库操作语句
// 此处代码运行不受DB Schema的权限控制移植代码到实际业务中注意在schema中配好permission
// 不支持clientDB的action
// 数据库查询有最大返回条数限制详见https://uniapp.dcloud.net.cn/uniCloud/cf-database.html#limit
// 详细JQL语法请参考https://uniapp.dcloud.net.cn/uniCloud/jql.html
// 下面示例查询uni-id-users表的所有数据
db.collection('uni-id-users').get();

@ -0,0 +1,6 @@
## 0.0.32022-11-11
- 修复 config 方法获取根节点为数组格式配置时错误的转化为了对象的Bug
## 0.0.22021-04-16
- 修改插件package信息
## 0.0.12021-03-15
- 初始化项目

@ -0,0 +1,81 @@
{
"id": "uni-config-center",
"displayName": "uni-config-center",
"version": "0.0.3",
"description": "uniCloud 配置中心",
"keywords": [
"配置",
"配置中心"
],
"repository": "",
"engines": {
"HBuilderX": "^3.1.0"
},
"dcloudext": {
"sale": {
"regular": {
"price": "0.00"
},
"sourcecode": {
"price": "0.00"
}
},
"contact": {
"qq": ""
},
"declaration": {
"ads": "无",
"data": "无",
"permissions": "无"
},
"npmurl": "",
"type": "unicloud-template-function"
},
"directories": {
"example": "../../../scripts/dist"
},
"uni_modules": {
"dependencies": [],
"encrypt": [],
"platforms": {
"cloud": {
"tcb": "y",
"aliyun": "y"
},
"client": {
"App": {
"app-vue": "u",
"app-nvue": "u"
},
"H5-mobile": {
"Safari": "u",
"Android Browser": "u",
"微信浏览器(Android)": "u",
"QQ浏览器(Android)": "u"
},
"H5-pc": {
"Chrome": "u",
"IE": "u",
"Edge": "u",
"Firefox": "u",
"Safari": "u"
},
"小程序": {
"微信": "u",
"阿里": "u",
"百度": "u",
"字节跳动": "u",
"QQ": "u"
},
"快应用": {
"华为": "u",
"联盟": "u"
},
"Vue": {
"vue2": "y",
"vue3": "u"
}
}
}
}
}

@ -0,0 +1,93 @@
# 为什么使用uni-config-center
实际开发中很多插件需要配置文件才可以正常运行,如果每个插件都单独进行配置的话就会产生下面这样的目录结构
```bash
cloudfunctions
└─────common 公共模块
├─plugin-a // 插件A对应的目录
│ ├─index.js
│ ├─config.json // plugin-a对应的配置文件
│ └─other-file.cert // plugin-a依赖的其他文件
└─plugin-b // plugin-b对应的目录
├─index.js
└─config.json // plugin-b对应的配置文件
```
假设插件作者要发布一个项目模板,里面使用了很多需要配置的插件,无论是作者发布还是用户使用都是一个大麻烦。
uni-config-center就是用了统一管理这些配置文件的使用uni-config-center后的目录结构如下
```bash
cloudfunctions
└─────common 公共模块
├─plugin-a // 插件A对应的目录
│ └─index.js
├─plugin-b // plugin-b对应的目录
│ └─index.js
└─uni-config-center
├─index.js // config-center入口文件
├─plugin-a
│ ├─config.json // plugin-a对应的配置文件
│ └─other-file.cert // plugin-a依赖的其他文件
└─plugin-b
└─config.json // plugin-b对应的配置文件
```
使用uni-config-center后的优势
- 配置文件统一管理,分离插件主体和配置信息,更新插件更方便
- 支持对config.json设置schema插件使用者在HBuilderX内编写config.json文件时会有更好的提示后续HBuilderX会提供支持
# 用法
在要使用uni-config-center的公共模块或云函数内引入uni-config-center依赖请参考[使用公共模块](https://uniapp.dcloud.net.cn/uniCloud/cf-common)
```js
const createConfig = require('uni-config-center')
const uniIdConfig = createConfig({
pluginId: 'uni-id', // 插件id
defaultConfig: { // 默认配置
tokenExpiresIn: 7200,
tokenExpiresThreshold: 600,
},
customMerge: function(defaultConfig, userConfig) { // 自定义默认配置和用户配置的合并规则,不设置的情况侠会对默认配置和用户配置进行深度合并
// defaudltConfig 默认配置
// userConfig 用户配置
return Object.assign(defaultConfig, userConfig)
}
})
// 以如下配置为例
// {
// "tokenExpiresIn": 7200,
// "passwordErrorLimit": 6,
// "bindTokenToDevice": false,
// "passwordErrorRetryTime": 3600,
// "app-plus": {
// "tokenExpiresIn": 2592000
// },
// "service": {
// "sms": {
// "codeExpiresIn": 300
// }
// }
// }
// 获取配置
uniIdConfig.config() // 获取全部配置注意uni-config-center内不存在对应插件目录时会返回空对象
uniIdConfig.config('tokenExpiresIn') // 指定键值获取配置返回7200
uniIdConfig.config('service.sms.codeExpiresIn') // 指定键值获取配置返回300
uniIdConfig.config('tokenExpiresThreshold', 600) // 指定键值获取配置如果不存在则取传入的默认值返回600
// 获取文件绝对路径
uniIdConfig.resolve('custom-token.js') // 获取uni-config-center/uni-id/custom-token.js文件的路径
// 引用文件require
uniIDConfig.requireFile('custom-token.js') // 使用require方式引用uni-config-center/uni-id/custom-token.js文件。文件不存在时返回undefined文件内有其他错误导致require失败时会抛出错误。
// 判断是否包含某文件
uniIDConfig.hasFile('custom-token.js') // 配置目录是否包含某文件true: 文件存在false: 文件不存在
```

@ -0,0 +1,9 @@
{
"name": "uni-config-center",
"version": "0.0.3",
"description": "配置中心",
"main": "index.js",
"keywords": [],
"author": "DCloud",
"license": "Apache-2.0"
}

@ -0,0 +1,34 @@
## 1.0.172024-04-26
- 兼容uni-app-x对客户端uniPlatform的调整uni-app-x内uniPlatform区分app-android、app-ios
## 1.0.162023-04-25
- 新增maxTokenLength配置用于限制数据库用户记录token数组的最大长度
## 1.0.152023-04-06
- 修复部分语言国际化出错的Bug
## 1.0.142023-03-07
- 修复 admin用户包含其他角色时未包含在token的Bug
## 1.0.132022-07-21
- 修复 创建token时未传角色权限信息生成的token不正确的bug
## 1.0.122022-07-15
- 提升与旧版本uni-id的兼容性补充读取配置文件时回退平台app-plus、h5但是仍推荐使用新平台名进行配置app、web
## 1.0.112022-07-14
- 修复 部分情况下报`read property 'reduce' of undefined`的错误
## 1.0.102022-07-11
- 将token存储在用户表的token字段内与旧版本uni-id保持一致
## 1.0.92022-07-01
- checkToken兼容token内未缓存角色权限的情况此时将查库获取角色权限
## 1.0.82022-07-01
- 修复clientDB默认依赖时部分情况下获取不到uni-id配置的Bug
## 1.0.72022-06-30
- 修复config文件不合法时未抛出具体错误的Bug
## 1.0.62022-06-28
- 移除插件内的数据表schema
## 1.0.52022-06-27
- 修复使用多应用配置时报`Cannot read property 'appId' of undefined`的Bug
## 1.0.42022-06-27
- 修复使用自定义token内容功能报错的Bug [详情](https://ask.dcloud.net.cn/question/147945)
## 1.0.22022-06-23
- 对齐旧版本uni-id默认配置
## 1.0.12022-06-22
- 补充对uni-config-center的依赖
## 1.0.02022-06-21
- 提供uni-id token创建、校验、刷新接口简化旧版uni-id公共模块

@ -0,0 +1,85 @@
{
"id": "uni-id-common",
"displayName": "uni-id-common",
"version": "1.0.17",
"description": "包含uni-id token生成、校验、刷新功能的云函数公共模块",
"keywords": [
"uni-id-common",
"uniCloud",
"token",
"权限"
],
"repository": "https://gitcode.net/dcloud/uni-id-common",
"engines": {
"HBuilderX": "^3.1.0"
},
"dcloudext": {
"sale": {
"regular": {
"price": "0.00"
},
"sourcecode": {
"price": "0.00"
}
},
"contact": {
"qq": ""
},
"declaration": {
"ads": "无",
"data": "无",
"permissions": "无"
},
"npmurl": "",
"type": "unicloud-template-function"
},
"uni_modules": {
"dependencies": ["uni-config-center"],
"encrypt": [],
"platforms": {
"cloud": {
"tcb": "y",
"aliyun": "y",
"alipay": "n"
},
"client": {
"Vue": {
"vue2": "u",
"vue3": "u"
},
"App": {
"app-vue": "u",
"app-nvue": "u"
},
"H5-mobile": {
"Safari": "u",
"Android Browser": "u",
"微信浏览器(Android)": "u",
"QQ浏览器(Android)": "u"
},
"H5-pc": {
"Chrome": "u",
"IE": "u",
"Edge": "u",
"Firefox": "u",
"Safari": "u"
},
"小程序": {
"微信": "u",
"阿里": "u",
"百度": "u",
"字节跳动": "u",
"QQ": "u",
"钉钉": "u",
"快手": "u",
"飞书": "u",
"京东": "u"
},
"快应用": {
"华为": "u",
"联盟": "u"
}
}
}
}
}

@ -0,0 +1,3 @@
# uni-id-common
文档请参考:[uni-id-common](https://uniapp.dcloud.net.cn/uniCloud/uni-id-common.html)

File diff suppressed because one or more lines are too long

@ -0,0 +1,16 @@
{
"name": "uni-id-common",
"version": "1.0.17",
"description": "uni-id token生成、校验、刷新",
"main": "index.js",
"homepage": "https://uniapp.dcloud.io/uniCloud/uni-id-common.html",
"repository": {
"type": "git",
"url": "git+https://gitee.com/dcloud/uni-id-common.git"
},
"author": "DCloud",
"license": "Apache-2.0",
"dependencies": {
"uni-config-center": "file:../../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center"
}
}

@ -0,0 +1,2 @@
## 1.0.02024-03-09
支持全局监听权限申请。当申请权限时,会在页面顶部显示申请权限的目的。

@ -0,0 +1,114 @@
{
"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"
}
}
}
}
}

@ -0,0 +1,95 @@
## 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>
```

@ -0,0 +1,3 @@
<?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>

@ -0,0 +1,115 @@
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;
}

@ -0,0 +1,6 @@
<?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>

@ -0,0 +1,5 @@
<?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%" />

@ -0,0 +1,6 @@
<?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>

@ -0,0 +1,19 @@
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
}

@ -0,0 +1,30 @@
[appleAppid]
appleAppid=com.fonchain.attendance
[appstore]
appstore=abc81314b1cb2f4f095fbca455487458
[iosStyle]
iosStyle=
[universalLinks]
universalLinks=
spaceid=
[universalLinks_qq]
universalLinks_qq=
spaceid_qq=
[universalLinks_weibo]
universalLinks_weibo=
spaceid_weibo=
[iphone]
app%402x=e31f03f5b61f733fde613928d833f792
app%403x=01152a0d424507499d4795a356238bbf
notification%402x=e490d08ae23a63d00242987afaa0a5c6
notification%403x=a17bd2a164932fa951b325bc6cc338ee
settings%402x=09b612b761a570fc9165d9cb3d3fdc85
settings%403x=5e112954602bfd705d66fb8565541ee5
spotlight%402x=67cca23a2591dc1fd39ae11e1c2a0b81
spotlight%403x=e31f03f5b61f733fde613928d833f792

@ -0,0 +1,3 @@
iosProfile=D:/WebstormProjects/oa-app/common/updown/oa_dis_20231130.mobileprovision
ioscertFile=D:/WebstormProjects/oa-app/common/updown/20230714_dis.p12
ioscertPassword=uecGPNMV8s+KLcdEgW/MRg==

@ -0,0 +1,32 @@
{
"version": "1",
"env": {
"compilerVersion": "4.15.2024050802"
},
"files": {
"utssdk/app-android/index.uts": {
"md5": "e8f2ac1b4ac0e64a05b903015cf803be"
},
"utssdk/interface.uts": {
"md5": "9ea37d02881a45c98410e9e913811526"
},
"package.json": {
"md5": "46557c5b31ca9d13fda95139225a60c8"
},
"utssdk/app-android/AndroidManifest.xml": {
"md5": "cf857a1b6e0cbb80c543ae9a8faf2d40"
},
"utssdk/app-android/config.json": {
"md5": "643b2980a54aaca20ecd07d593fb4099"
},
"utssdk/app-android/res/anim/popupwindow_enter.xml": {
"md5": "f198c859de0d759ada725448d27ad2d5"
},
"utssdk/app-android/res/anim/popupwindow_exit.xml": {
"md5": "d10997057313c1750142f37f2016301b"
},
"utssdk/app-android/res/drawable/dcloud_permission_background.xml": {
"md5": "2c0da97c93a16d13d99686918165f390"
}
}
}

@ -0,0 +1 @@
{"dir":"/Users/seaman/srv/bdserver.dcloud.net.cn/service/storage/app/package/IOS/queue/5e3149e0-2222-11ef-99a5-7f806ab2dc79/wgtRoot/__UNI__4796942/"}

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

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.

After

Width:  |  Height:  |  Size: 5.7 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

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.

After

Width:  |  Height:  |  Size: 2.0 KiB

@ -0,0 +1,23 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>View</title>
<link rel="stylesheet" href="app.css" />
<script>var __uniConfig = {"globalStyle":{},"darkmode":false}</script>
<script>
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
CSS.supports('top: constant(a)'))
document.write(
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
(coverSupport ? ', viewport-fit=cover' : '') + '" />')
</script>
</head>
<body>
<div id="app"></div>
<script src="uni-app-view.umd.js"></script>
</body>
</html>

@ -0,0 +1,36 @@
{
"version" : "1",
"prompt" : "template",
"title" : "服务协议和隐私政策",
"message" : "  请你务必审慎阅读、充分理解“平台服务协议”和“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/>  你可阅读<a href=\"https://oa.szjixun.cn/#/pages/login/serveInfo\">《用户服务协议》</a>和<a href=\"https://oa.szjixun.cn/#/pages/login/privateInfo\">《隐私政策》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。",
"buttonAccept" : "同意并接受",
"buttonRefuse" : "不同意",
"second" : {
"title" : "确认提示",
"message" : "  进入应用前,你需先同意<a href=\"https://oa.szjixun.cn/#/pages/login/serveInfo\">《用户服务协议》</a>和<a href=\"https://oa.szjixun.cn/#/pages/login/privateInfo\">《隐私政策》</a>,否则将退出应用。",
"buttonAccept" : "同意并继续",
"buttonRefuse" : "退出应用"
},
"disagreeMode" : {
"support" : false,
"loadNativePlugins" : false,
"visitorEntry" : false,
"showAlways" : false
},
"styles" : {
"backgroundColor" : "#ffffff",
"borderRadius" : "5px",
"title" : {
"color" : "#000"
},
"buttonAccept" : {
"color" : "#000"
},
"buttonRefuse" : {
"color" : "#000"
},
"buttonVisitor" : {
"color" : "#009"
}
}
}

@ -0,0 +1,11 @@
;(function(){
let u=void 0,isReady=false,onReadyCallbacks=[],isServiceReady=false,onServiceReadyCallbacks=[];
const __uniConfig = {"pages":[],"globalStyle":{"navigationBar":{},"isNVue":false},"nvue":{"compiler":"uni-app","styleCompiler":"uni-app","flex-direction":"column"},"renderer":"auto","appname":"oa考勤系统","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":true},"compilerVersion":"4.15","entryPagePath":"pages/index/index","entryPageQuery":"","realEntryPagePath":"","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000},"locales":{},"darkmode":false,"themeConfig":{}};
const __uniRoutes = [{"path":"pages/index/index","meta":{"isQuit":true,"isEntry":true,"titleNView":false,"navigationBar":{"style":"custom","type":"default"},"isNVue":false}}].map(uniRoute=>(uniRoute.meta.route=uniRoute.path,__uniConfig.pages.push(uniRoute.path),uniRoute.path='/'+uniRoute.path,uniRoute));
__uniConfig.styles=[];//styles
__uniConfig.onReady=function(callback){if(__uniConfig.ready){callback()}else{onReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"ready",{get:function(){return isReady},set:function(val){isReady=val;if(!isReady){return}const callbacks=onReadyCallbacks.slice(0);onReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
__uniConfig.onServiceReady=function(callback){if(__uniConfig.serviceReady){callback()}else{onServiceReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"serviceReady",{get:function(){return isServiceReady},set:function(val){isServiceReady=val;if(!isServiceReady){return}const callbacks=onServiceReadyCallbacks.slice(0);onServiceReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
service.register("uni-app-config",{create(a,b,c){if(!__uniConfig.viewport){var d=b.weex.config.env.scale,e=b.weex.config.env.deviceWidth,f=Math.ceil(e/d);Object.assign(__uniConfig,{viewport:f,defaultFontSize:16})}return{instance:{__uniConfig:__uniConfig,__uniRoutes:__uniRoutes,global:u,window:u,document:u,frames:u,self:u,location:u,navigator:u,localStorage:u,history:u,Caches:u,screen:u,alert:u,confirm:u,prompt:u,fetch:u,XMLHttpRequest:u,WebSocket:u,webkit:u,print:u}}}});
})();

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

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.

Binary file not shown.

@ -1,2 +1,5 @@
Promise.resolve("./pages/index/index.js").then((res) => {
res.length;
});
Promise.resolve("./app.css.js").then(() => {
});

@ -0,0 +1,102 @@
import { ref, openBlock, createElementBlock, createElementVNode, normalizeStyle, unref } from "vue";
function formatAppLog(type, filename, ...args) {
if (uni.__log__) {
uni.__log__(type, filename, ...args);
} else {
console[type].apply(console, [...args, filename]);
}
}
const env = "dev";
const configs = {
dev: {
apiBaseUrl: "https://warehouse.szjixun.cn/oa_backend",
h5Url: "http://192.168.88.35:8080/"
},
test: {
apiBaseUrl: "https://warehouse.szjixun.cn/oa_backend",
h5Url: "http://172.16.100.93:8041/#/"
},
prod: {
apiBaseUrl: "https://oa.szjixun.cn/api",
h5Url: "https://oa.szjixun.cn/#/"
}
};
const config = configs[env];
const sendWebWiew = (refValue, paramValue, callName = "onReceive") => {
if (!refValue) {
formatAppLog("error", "at utils/communicate/index.js:3", "evalJs: The reference to the webview is not provided or is null.");
return;
}
if (typeof refValue.evalJs !== "function") {
formatAppLog("error", "at utils/communicate/index.js:8", "evalJs: The evalJs method is not available on the provided reference.");
return;
}
try {
const jsonString = JSON.stringify(paramValue);
const jsCode = `window.${callName}(${jsonString})`;
refValue.evalJs(jsCode);
} catch (error) {
formatAppLog("error", "at utils/communicate/index.js:18", "evalJs: An error occurred while trying to stringify the parameter value or while invoking evalJs.", error);
}
};
const receiveWebView = (e) => {
return e.detail.data[0];
};
const _style_0 = { "content": { "": { "display": "flex", "flex": 1 } } };
const _export_sfc = (sfc, props) => {
const target = sfc.__vccOpts || sfc;
for (const [key, val] of props) {
target[key] = val;
}
return target;
};
const _sfc_main = {
__name: "index",
setup(__props) {
const webViewRef = ref(null);
const systemInfo = uni.getSystemInfoSync();
const webLoad = (e) => {
const m = receiveWebView(e);
switch (m.action) {
case "load-complete": {
const systemInfo2 = uni.getSystemInfoSync();
uni.getLocation({
type: "gcj02",
geocode: false,
isHighAccuracy: false,
success: async (res) => {
sendWebWiew(webViewRef.value, { ...res, systemInfo: systemInfo2 });
},
fail: (e2) => {
formatAppLog("log", "at pages/index/index.nvue:38", e2);
}
});
}
}
};
return (_ctx, _cache) => {
return openBlock(), createElementBlock("scroll-view", {
scrollY: true,
showScrollbar: true,
enableBackToTop: true,
bubble: "true",
style: { flexDirection: "column" }
}, [
createElementVNode("div", { class: "content" }, [
createElementVNode("u-web-view", {
class: "webview",
"on:onPostMessage": webLoad,
style: normalizeStyle({ height: `${unref(systemInfo).windowHeight}px`, width: `${unref(systemInfo).windowWidth}` }),
ref_key: "webViewRef",
ref: webViewRef,
src: unref(config).h5Url
}, null, 44, ["src"])
])
]);
};
}
};
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["styles", [_style_0]]]);
export {
index as default
};

File diff suppressed because one or more lines are too long

@ -0,0 +1,36 @@
{
"version" : "1",
"prompt" : "template",
"title" : "服务协议和隐私政策",
"message" : "  请你务必审慎阅读、充分理解“平台服务协议”和“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/>  你可阅读<a href=\"https://oa.szjixun.cn/#/pages/login/serveInfo\">《用户服务协议》</a>和<a href=\"https://oa.szjixun.cn/#/pages/login/privateInfo\">《隐私政策》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。",
"buttonAccept" : "同意并接受",
"buttonRefuse" : "不同意",
"second" : {
"title" : "确认提示",
"message" : "  进入应用前,你需先同意<a href=\"https://oa.szjixun.cn/#/pages/login/serveInfo\">《用户服务协议》</a>和<a href=\"https://oa.szjixun.cn/#/pages/login/privateInfo\">《隐私政策》</a>,否则将退出应用。",
"buttonAccept" : "同意并继续",
"buttonRefuse" : "退出应用"
},
"disagreeMode" : {
"support" : false,
"loadNativePlugins" : false,
"visitorEntry" : false,
"showAlways" : false
},
"styles" : {
"backgroundColor" : "#ffffff",
"borderRadius" : "5px",
"title" : {
"color" : "#000"
},
"buttonAccept" : {
"color" : "#000"
},
"buttonRefuse" : {
"color" : "#000"
},
"buttonVisitor" : {
"color" : "#009"
}
}
}

@ -1,9 +1,9 @@
;(function(){
let u=void 0,isReady=false,onReadyCallbacks=[],isServiceReady=false,onServiceReadyCallbacks=[];
const __uniConfig = {"pages":[],"globalStyle":{"navigationBar":{},"isNVue":false},"nvue":{"compiler":"uni-app","styleCompiler":"uni-app","flex-direction":"column"},"renderer":"auto","appname":"泰丰考勤","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":true},"compilerVersion":"4.15","entryPagePath":"pages/index/index","entryPageQuery":"","realEntryPagePath":"","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000},"locales":{},"darkmode":false,"themeConfig":{}};
const __uniRoutes = [{"path":"pages/index/index","meta":{"isQuit":true,"isEntry":true,"titleNView":false,"navigationBar":{"style":"custom","type":"default"},"isNVue":false}}].map(uniRoute=>(uniRoute.meta.route=uniRoute.path,__uniConfig.pages.push(uniRoute.path),uniRoute.path='/'+uniRoute.path,uniRoute));
__uniConfig.styles=[];//styles
const __uniConfig = {"pages":[],"globalStyle":{"backgroundColor":"#F8F8F8","navigationBar":{"backgroundColor":"#F8F8F8","titleText":"uni-app","type":"default","titleColor":"#000000"},"isNVue":false},"nvue":{"compiler":"uni-app","styleCompiler":"uni-app","flex-direction":"column"},"renderer":"auto","appname":"oa考勤系统","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":true},"compilerVersion":"4.08","entryPagePath":"pages/index/index","entryPageQuery":"","realEntryPagePath":"","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000},"locales":{},"darkmode":false,"themeConfig":{}};
const __uniRoutes = [{"path":"pages/index/index","meta":{"isQuit":true,"isEntry":true,"navigationBar":{"titleText":"uni-app","style":"custom","type":"default"},"isNVue":true}}].map(uniRoute=>(uniRoute.meta.route=uniRoute.path,__uniConfig.pages.push(uniRoute.path),uniRoute.path='/'+uniRoute.path,uniRoute));
__uniConfig.styles=[{}];//styles
__uniConfig.onReady=function(callback){if(__uniConfig.ready){callback()}else{onReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"ready",{get:function(){return isReady},set:function(val){isReady=val;if(!isReady){return}const callbacks=onReadyCallbacks.slice(0);onReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
__uniConfig.onServiceReady=function(callback){if(__uniConfig.serviceReady){callback()}else{onServiceReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"serviceReady",{get:function(){return isServiceReady},set:function(val){isServiceReady=val;if(!isServiceReady){return}const callbacks=onServiceReadyCallbacks.slice(0);onServiceReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
service.register("uni-app-config",{create(a,b,c){if(!__uniConfig.viewport){var d=b.weex.config.env.scale,e=b.weex.config.env.deviceWidth,f=Math.ceil(e/d);Object.assign(__uniConfig,{viewport:f,defaultFontSize:16})}return{instance:{__uniConfig:__uniConfig,__uniRoutes:__uniRoutes,global:u,window:u,document:u,frames:u,self:u,location:u,navigator:u,localStorage:u,history:u,Caches:u,screen:u,alert:u,confirm:u,prompt:u,fetch:u,XMLHttpRequest:u,WebSocket:u,webkit:u,print:u}}}});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -4,11 +4,11 @@
"iPhone",
"iPad"
],
"id": "__UNI__4796942",
"name": "泰丰考勤",
"id": "__UNI__70C49A3",
"name": "oa考勤系统",
"version": {
"name": "1.0.0",
"code": 100
"name": "1.1.5",
"code": 115
},
"description": "",
"developer": {
@ -38,19 +38,14 @@
"launchwebview": {
"render": "always",
"id": "1",
"kernel": "WKWebview"
"kernel": "WKWebview",
"uniNView": {
"path": "pages/index/index.js"
}
},
"usingComponents": true,
"nvueStyleCompiler": "uni-app",
"compilerVersion": 3,
"statusbar": {
"immersed": "supportedDevice",
"style": "dark",
"background": "#000000"
},
"navigationbar": {
"hidden": true
},
"distribute": {
"icons": {
"android": {
@ -147,7 +142,6 @@
"UniversalLinks": ""
}
},
"push": {},
"audio": {
"mp3": {
"description": "Android平台录音支持MP3格式文件"
@ -155,7 +149,11 @@
}
}
},
"nativePlugins": {},
"statusbar": {
"immersed": "supportedDevice",
"style": "dark",
"background": "#F8F8F8"
},
"uniStatistics": {
"enable": false
},
@ -163,7 +161,7 @@
"uni-app": {
"control": "uni-v3",
"vueVersion": "3",
"compilerVersion": "4.15",
"compilerVersion": "4.08",
"nvueCompiler": "uni-app",
"renderer": "auto",
"nvue": {
@ -174,6 +172,5 @@
"minUserAgentVersion": "49.0"
}
}
},
"launch_path": "__uniappview.html"
}
}

@ -0,0 +1,32 @@
"use weex:vue";
if (typeof Promise !== 'undefined' && !Promise.prototype.finally) {
Promise.prototype.finally = function(callback) {
const promise = this.constructor
return this.then(
value => promise.resolve(callback()).then(() => value),
reason => promise.resolve(callback()).then(() => {
throw reason
})
)
}
};
if (typeof uni !== 'undefined' && uni && uni.requireGlobal) {
const global = uni.requireGlobal()
ArrayBuffer = global.ArrayBuffer
Int8Array = global.Int8Array
Uint8Array = global.Uint8Array
Uint8ClampedArray = global.Uint8ClampedArray
Int16Array = global.Int16Array
Uint16Array = global.Uint16Array
Int32Array = global.Int32Array
Uint32Array = global.Uint32Array
Float32Array = global.Float32Array
Float64Array = global.Float64Array
BigInt64Array = global.BigInt64Array
BigUint64Array = global.BigUint64Array
};
(()=>{var 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

@ -0,0 +1,8 @@
{
"hash": "fd84dcc1",
"configHash": "8979c8e1",
"lockfileHash": "e3b0c442",
"browserHash": "4c910bc0",
"optimized": {},
"chunks": {}
}

@ -0,0 +1,3 @@
{
"type": "module"
}

@ -1,2 +1,5 @@
Promise.resolve("./pages/index/index.js").then((res) => {
res.length;
});
Promise.resolve("./app.css.js").then(() => {
});

@ -0,0 +1,102 @@
import { ref, openBlock, createElementBlock, createElementVNode, normalizeStyle, unref } from "vue";
function formatAppLog(type, filename, ...args) {
if (uni.__log__) {
uni.__log__(type, filename, ...args);
} else {
console[type].apply(console, [...args, filename]);
}
}
const env = "dev";
const configs = {
dev: {
apiBaseUrl: "https://warehouse.szjixun.cn/oa_backend",
h5Url: "http://192.168.88.35:8080/"
},
test: {
apiBaseUrl: "https://warehouse.szjixun.cn/oa_backend",
h5Url: "http://172.16.100.93:8041/#/"
},
prod: {
apiBaseUrl: "https://oa.szjixun.cn/api",
h5Url: "https://oa.szjixun.cn/#/"
}
};
const config = configs[env];
const sendWebWiew = (refValue, paramValue, callName = "onReceive") => {
if (!refValue) {
formatAppLog("error", "at utils/communicate/index.js:3", "evalJs: The reference to the webview is not provided or is null.");
return;
}
if (typeof refValue.evalJs !== "function") {
formatAppLog("error", "at utils/communicate/index.js:8", "evalJs: The evalJs method is not available on the provided reference.");
return;
}
try {
const jsonString = JSON.stringify(paramValue);
const jsCode = `window.${callName}(${jsonString})`;
refValue.evalJs(jsCode);
} catch (error) {
formatAppLog("error", "at utils/communicate/index.js:18", "evalJs: An error occurred while trying to stringify the parameter value or while invoking evalJs.", error);
}
};
const receiveWebView = (e) => {
return e.detail.data[0];
};
const _style_0 = { "content": { "": { "display": "flex", "flex": 1 } } };
const _export_sfc = (sfc, props) => {
const target = sfc.__vccOpts || sfc;
for (const [key, val] of props) {
target[key] = val;
}
return target;
};
const _sfc_main = {
__name: "index",
setup(__props) {
const webViewRef = ref(null);
const systemInfo = uni.getSystemInfoSync();
const webLoad = (e) => {
const m = receiveWebView(e);
switch (m.action) {
case "load-complete": {
const systemInfo2 = uni.getSystemInfoSync();
uni.getLocation({
type: "gcj02",
geocode: false,
isHighAccuracy: false,
success: async (res) => {
sendWebWiew(webViewRef.value, { ...res, systemInfo: systemInfo2 });
},
fail: (e2) => {
formatAppLog("log", "at pages/index/index.nvue:38", e2);
}
});
}
}
};
return (_ctx, _cache) => {
return openBlock(), createElementBlock("scroll-view", {
scrollY: true,
showScrollbar: true,
enableBackToTop: true,
bubble: "true",
style: { flexDirection: "column" }
}, [
createElementVNode("div", { class: "content" }, [
createElementVNode("u-web-view", {
class: "webview",
"on:onPostMessage": webLoad,
style: normalizeStyle({ height: `${unref(systemInfo).windowHeight}px`, width: `${unref(systemInfo).windowWidth}` }),
ref_key: "webViewRef",
ref: webViewRef,
src: unref(config).h5Url
}, null, 44, ["src"])
])
]);
};
}
};
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["styles", [_style_0]], ["__file", "D:/WebstormProjects/oa-base/pages/index/index.nvue"]]);
export {
index as default
};

File diff suppressed because one or more lines are too long

@ -0,0 +1,36 @@
{
"version" : "1",
"prompt" : "template",
"title" : "服务协议和隐私政策",
"message" : "  请你务必审慎阅读、充分理解“平台服务协议”和“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/>  你可阅读<a href=\"https://oa.szjixun.cn/#/pages/login/serveInfo\">《用户服务协议》</a>和<a href=\"https://oa.szjixun.cn/#/pages/login/privateInfo\">《隐私政策》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。",
"buttonAccept" : "同意并接受",
"buttonRefuse" : "不同意",
"second" : {
"title" : "确认提示",
"message" : "  进入应用前,你需先同意<a href=\"https://oa.szjixun.cn/#/pages/login/serveInfo\">《用户服务协议》</a>和<a href=\"https://oa.szjixun.cn/#/pages/login/privateInfo\">《隐私政策》</a>,否则将退出应用。",
"buttonAccept" : "同意并继续",
"buttonRefuse" : "退出应用"
},
"disagreeMode" : {
"support" : false,
"loadNativePlugins" : false,
"visitorEntry" : false,
"showAlways" : false
},
"styles" : {
"backgroundColor" : "#ffffff",
"borderRadius" : "5px",
"title" : {
"color" : "#000"
},
"buttonAccept" : {
"color" : "#000"
},
"buttonRefuse" : {
"color" : "#000"
},
"buttonVisitor" : {
"color" : "#009"
}
}
}

@ -1,9 +1,9 @@
;(function(){
let u=void 0,isReady=false,onReadyCallbacks=[],isServiceReady=false,onServiceReadyCallbacks=[];
const __uniConfig = {"pages":[],"globalStyle":{"navigationBar":{},"isNVue":false},"nvue":{"compiler":"uni-app","styleCompiler":"uni-app","flex-direction":"column"},"renderer":"auto","appname":"泰丰考勤","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":true},"compilerVersion":"4.15","entryPagePath":"pages/index/index","entryPageQuery":"","realEntryPagePath":"","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000},"locales":{},"darkmode":false,"themeConfig":{}};
const __uniRoutes = [{"path":"pages/index/index","meta":{"isQuit":true,"isEntry":true,"titleNView":false,"navigationBar":{"style":"custom","type":"default"},"isNVue":false}}].map(uniRoute=>(uniRoute.meta.route=uniRoute.path,__uniConfig.pages.push(uniRoute.path),uniRoute.path='/'+uniRoute.path,uniRoute));
__uniConfig.styles=[];//styles
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.15","entryPagePath":"pages/index/index","entryPageQuery":"","realEntryPagePath":"","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000},"locales":{},"darkmode":false,"themeConfig":{}};
const __uniRoutes = [{"path":"pages/index/index","meta":{"isQuit":true,"isEntry":true,"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.onReady=function(callback){if(__uniConfig.ready){callback()}else{onReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"ready",{get:function(){return isReady},set:function(val){isReady=val;if(!isReady){return}const callbacks=onReadyCallbacks.slice(0);onReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
__uniConfig.onServiceReady=function(callback){if(__uniConfig.serviceReady){callback()}else{onServiceReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"serviceReady",{get:function(){return isServiceReady},set:function(val){isServiceReady=val;if(!isServiceReady){return}const callbacks=onServiceReadyCallbacks.slice(0);onServiceReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
service.register("uni-app-config",{create(a,b,c){if(!__uniConfig.viewport){var d=b.weex.config.env.scale,e=b.weex.config.env.deviceWidth,f=Math.ceil(e/d);Object.assign(__uniConfig,{viewport:f,defaultFontSize:16})}return{instance:{__uniConfig:__uniConfig,__uniRoutes:__uniRoutes,global:u,window:u,document:u,frames:u,self:u,location:u,navigator:u,localStorage:u,history:u,Caches:u,screen:u,alert:u,confirm:u,prompt:u,fetch:u,XMLHttpRequest:u,WebSocket:u,webkit:u,print:u}}}});

@ -31,25 +31,6 @@ if (uni.restoreGlobal) {
}
(function(vue) {
"use strict";
const env = "prod";
const configs = {
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",
h5Url: "https://oa-a.szjixun.cn/#/"
}
};
const config = configs[env];
const ON_SHOW = "onShow";
const ON_HIDE = "onHide";
const ON_LAUNCH = "onLaunch";
function formatAppLog(type, filename, ...args) {
if (uni.__log__) {
uni.__log__(type, filename, ...args);
@ -57,12 +38,6 @@ if (uni.restoreGlobal) {
console[type].apply(console, [...args, filename]);
}
}
const createHook = (lifecycle) => (hook, target = vue.getCurrentInstance()) => {
!vue.isInSSRComponentSetup && vue.injectHook(lifecycle, hook, target);
};
const onShow = /* @__PURE__ */ createHook(ON_SHOW);
const onHide = /* @__PURE__ */ createHook(ON_HIDE);
const onLaunch = /* @__PURE__ */ createHook(ON_LAUNCH);
const _export_sfc = (sfc, props) => {
const target = sfc.__vccOpts || sfc;
for (const [key, val] of props) {
@ -70,71 +45,14 @@ if (uni.restoreGlobal) {
}
return target;
};
const _sfc_main$1 = {
__name: "index",
setup(__props) {
const networkStatusChange = (res) => {
if (res.isConnected) {
uni.redirectTo({
url: "/pages/index/index"
});
} else {
uni.showToast({
title: "网络无连接",
icon: "none"
});
}
};
const webViewObj = vue.ref(null);
onShow(() => {
uni.onNetworkStatusChange(networkStatusChange);
});
onHide(() => {
uni.offNetworkStatusChange(networkStatusChange);
});
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$1, [["__file", "D:/WebstormProjects/oa-base/pages/index/index.vue"]]);
__definePage("pages/index/index", PagesIndexIndex);
const _sfc_main = {
__name: "App",
setup(__props) {
onLaunch(() => {
});
onShow(() => {
});
onHide(() => {
formatAppLog("log", "at App.vue:23", "App Hide");
});
uni.onPushMessage((res) => {
formatAppLog("log", "at App.vue:35", JSON.stringify(res));
});
return () => {
};
onLaunch: function() {
},
onShow: function() {
formatAppLog("log", "at App.vue:6", "App Show");
},
onHide: function() {
formatAppLog("log", "at App.vue:9", "App Hide");
}
};
const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "D:/WebstormProjects/oa-base/App.vue"]]);
@ -142,16 +60,21 @@ if (uni.restoreGlobal) {
{
path: "pages/index/index",
style: {
navigationStyle: "custom",
"app-plus": {
titleNView: false
}
navigationBarTitleText: "uni-app",
navigationStyle: "custom"
}
}
];
const globalStyle = {
navigationBarTextStyle: "black",
navigationBarTitleText: "uni-app",
navigationBarBackgroundColor: "#F8F8F8",
backgroundColor: "#F8F8F8"
};
const uniIdRouter = {};
const e = {
pages,
globalStyle,
uniIdRouter
};
var define_process_env_UNI_SECURE_NETWORK_CONFIG_default = [];
@ -446,7 +369,7 @@ if (uni.restoreGlobal) {
const S = true, b = "app", A = I(define_process_env_UNI_SECURE_NETWORK_CONFIG_default), P = b, T = 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'), C = I('[{"provider":"aliyun","spaceName":"oabase","spaceId":"mp-edf38b0d-bc9a-4e81-9a15-f55995ccca70","clientSecret":"ty1X79FB2pMuAQUzaQBKXA==","endpoint":"https://api.next.bspapp.com"}]') || [];
let O = "";
try {
O = "__UNI__4796942";
O = "__UNI__70C49A3";
} catch (e2) {
}
let E = {};

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save