1123
This commit is contained in:
parent
98745b859b
commit
89a7960fd3
@ -1,4 +1,4 @@
|
||||
const env = 'dev';
|
||||
const env = 'test';
|
||||
const configs = {
|
||||
LocalTest: {
|
||||
apiBaseUrl: 'https://warehouse.szjixun.cn/oa_backend',
|
||||
@ -17,7 +17,6 @@ const configs = {
|
||||
h5Url:'https://oa-a.szjixun.cn/#/'
|
||||
},
|
||||
};
|
||||
|
||||
const config = configs[env];
|
||||
export default config;
|
||||
|
1
main.js
1
main.js
@ -10,7 +10,6 @@ const app = new Vue({
|
||||
})
|
||||
app.$mount()
|
||||
// #endif
|
||||
|
||||
// #ifdef VUE3
|
||||
import { createSSRApp } from 'vue'
|
||||
export function createApp() {
|
||||
|
@ -2,8 +2,8 @@
|
||||
"name" : "oa考勤系统",
|
||||
"appid" : "__UNI__4796942",
|
||||
"description" : "",
|
||||
"versionName" : "2.0.4",
|
||||
"versionCode" : 204,
|
||||
"versionName" : "2.1.0",
|
||||
"versionCode" : 210,
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus" : {
|
||||
|
@ -7,14 +7,56 @@ import config from "../../config";
|
||||
import {onExit } from "@dcloudio/uni-app";
|
||||
import { Communication } from '../../utils/communication.js';
|
||||
const commun=new Communication()
|
||||
const permissionListener = uni.createRequestPermissionListener();
|
||||
|
||||
/* import {
|
||||
registerRequestPermissionTipsListener,
|
||||
unregisterRequestPermissionTipsListener,
|
||||
setRequestPermissionTips
|
||||
} from "@/uni_modules/uni-registerRequestPermissionTips"
|
||||
|
||||
const 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>"
|
||||
}
|
||||
onExit(()=>{
|
||||
permissionListener.stop()
|
||||
unregisterRequestPermissionTipsListener()
|
||||
})
|
||||
|
||||
const brand = uni.getSystemInfoSync().deviceBrand
|
||||
setRequestPermissionTips(PermissionTips)
|
||||
registerRequestPermissionTipsListener({
|
||||
onRequest: (e) => {
|
||||
},
|
||||
onConfirm: (e) => {
|
||||
commun.sendToH5('permission-application',{action:'open-permission',data:e});
|
||||
},
|
||||
onComplete: (e) => {
|
||||
commun.sendToH5('permission-application',{action:'close-permission',data:e});
|
||||
|
||||
// 华为手机在权限禁止之后,再次申请权限不会出现权限申请框。此时应该引导用户去系统设置开启此权限,不应该频繁申请。
|
||||
if (brand.toLowerCase() === "huawei") {
|
||||
const tips = {}
|
||||
let hasDeniedPermission = false
|
||||
for (let k in PermissionTips) {
|
||||
if (e[k] !== "denied") {
|
||||
tips[k] = PermissionTips[k]
|
||||
} else {
|
||||
hasDeniedPermission = true
|
||||
}
|
||||
}
|
||||
setRequestPermissionTips(tips) // 更新弹框提醒,防止华为手机不出现权限申请框时权限提醒框闪烁的情况
|
||||
if (hasDeniedPermission)
|
||||
uni.showModal({
|
||||
content: "权限已经被拒绝,请前往设置中开启"
|
||||
})
|
||||
}
|
||||
}
|
||||
}) */
|
||||
function initializeWebView() {
|
||||
const currentWebview = getCurrentPages().pop().$getAppWebview()
|
||||
commun.setWebView(currentWebview.children()[0])
|
||||
}
|
||||
//load-complete 注册函数
|
||||
commun.registerHandler('load-complete',()=>{
|
||||
initializeWebView()
|
||||
const {statusBarHeight} = uni.getSystemInfoSync()
|
||||
@ -22,16 +64,7 @@ onExit(()=>{
|
||||
top: statusBarHeight,
|
||||
bottom: 0,
|
||||
})
|
||||
permissionListener.onRequest((e)=>{
|
||||
commun.sendToH5('permission-application',e);
|
||||
})
|
||||
permissionListener.onConfirm((e) => {
|
||||
});
|
||||
permissionListener.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 webLoad = (e) => {
|
||||
const message = e.detail.data?.[0] || '';
|
||||
|
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.
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
4
unpackage/dist/build/app-plus/manifest.json
vendored
4
unpackage/dist/build/app-plus/manifest.json
vendored
@ -7,8 +7,8 @@
|
||||
"id": "__UNI__4796942",
|
||||
"name": "oa考勤系统",
|
||||
"version": {
|
||||
"name": "2.0.4",
|
||||
"code": 204
|
||||
"name": "2.1.0",
|
||||
"code": 210
|
||||
},
|
||||
"description": "",
|
||||
"developer": {
|
||||
|
File diff suppressed because one or more lines are too long
42
unpackage/dist/dev/app-plus/app-service.js
vendored
42
unpackage/dist/dev/app-plus/app-service.js
vendored
@ -32,22 +32,7 @@ if (uni.restoreGlobal) {
|
||||
(function(vue) {
|
||||
"use strict";
|
||||
var _e2, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
||||
const ON_EXIT = "onExit";
|
||||
function formatAppLog(type, filename, ...args) {
|
||||
if (uni.__log__) {
|
||||
uni.__log__(type, filename, ...args);
|
||||
} else {
|
||||
console[type].apply(console, [...args, filename]);
|
||||
}
|
||||
}
|
||||
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 env = "test";
|
||||
const configs = {
|
||||
LocalTest: {
|
||||
apiBaseUrl: "https://warehouse.szjixun.cn/oa_backend",
|
||||
@ -67,6 +52,16 @@ if (uni.restoreGlobal) {
|
||||
}
|
||||
};
|
||||
const config = configs[env];
|
||||
function formatAppLog(type, filename, ...args) {
|
||||
if (uni.__log__) {
|
||||
uni.__log__(type, filename, ...args);
|
||||
} else {
|
||||
console[type].apply(console, [...args, filename]);
|
||||
}
|
||||
}
|
||||
function resolveEasycom(component, easycom) {
|
||||
return typeof component === "string" ? easycom : component;
|
||||
}
|
||||
class Communication {
|
||||
constructor() {
|
||||
this.webViewObj = null;
|
||||
@ -106,10 +101,6 @@ if (uni.restoreGlobal) {
|
||||
__name: "index",
|
||||
setup(__props) {
|
||||
const commun = new Communication();
|
||||
const permissionListener = uni.createRequestPermissionListener();
|
||||
onExit(() => {
|
||||
permissionListener.stop();
|
||||
});
|
||||
function initializeWebView() {
|
||||
const currentWebview = getCurrentPages().pop().$getAppWebview();
|
||||
commun.setWebView(currentWebview.children()[0]);
|
||||
@ -121,15 +112,6 @@ if (uni.restoreGlobal) {
|
||||
top: statusBarHeight,
|
||||
bottom: 0
|
||||
});
|
||||
permissionListener.onRequest((e2) => {
|
||||
commun.sendToH5("permission-application", e2);
|
||||
});
|
||||
permissionListener.onConfirm((e2) => {
|
||||
});
|
||||
permissionListener.onComplete((e2) => {
|
||||
formatAppLog("log", "at pages/index/index.vue:31", "APP执行onComplete", e2);
|
||||
commun.sendToH5("permission-complete", e2);
|
||||
});
|
||||
});
|
||||
const webLoad = (e2) => {
|
||||
var _a;
|
||||
@ -3194,7 +3176,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.56"\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.53"\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"}]') || [];
|
||||
let O = "";
|
||||
try {
|
||||
O = "__UNI__4796942";
|
||||
|
4
unpackage/dist/dev/app-plus/manifest.json
vendored
4
unpackage/dist/dev/app-plus/manifest.json
vendored
@ -7,8 +7,8 @@
|
||||
"id": "__UNI__4796942",
|
||||
"name": "oa考勤系统",
|
||||
"version": {
|
||||
"name": "2.0.4",
|
||||
"code": 204
|
||||
"name": "2.1.0",
|
||||
"code": 210
|
||||
},
|
||||
"description": "",
|
||||
"developer": {
|
||||
|
Loading…
Reference in New Issue
Block a user