@ -0,0 +1,22 @@ |
|||
<script> |
|||
export default { |
|||
onLaunch: function() { |
|||
console.log('App Launch') |
|||
// #ifndef H5 |
|||
// 非H5平台 |
|||
// 设置横屏方向 |
|||
plus.screen.lockOrientation('landscape-primary'); |
|||
// #endif |
|||
}, |
|||
onShow: function() { |
|||
console.log('App Show') |
|||
}, |
|||
onHide: function() { |
|||
console.log('App Hide') |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style> |
|||
/*每个页面公共css */ |
|||
</style> |
@ -0,0 +1 @@ |
|||
平板APP |
@ -0,0 +1,32 @@ |
|||
{ |
|||
"version" : "1", |
|||
"prompt" : "template", |
|||
"title" : "服务协议和隐私政策", |
|||
"message" : " 请你务必审慎阅读、充分理解“服务协议”和“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/> 你可阅读<a href=\"https://test.tall.wiki/htage2023/client/#/agreement\">《服务协议》</a>和<a href=\"https://test.tall.wiki/htage2023/client/#/privacyPolicy\">《隐私政策》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。", |
|||
"buttonAccept" : "同意并接受", |
|||
"buttonRefuse" : "暂不同意", |
|||
"hrefLoader" : "system|default", |
|||
"backToExit" : "false", |
|||
"second" : { |
|||
"title" : "确认提示", |
|||
"message" : "进入应用前,你需先同意<a href=\"https://test.tall.wiki/htage2023/client/#/agreement\">《服务协议》</a>和<a href=\"https://test.tall.wiki/htage2023/client/#/privacyPolicy\">《隐私政策》</a>,否则将退出应用。", |
|||
"buttonAccept" : "同意并继续", |
|||
"buttonRefuse" : "退出应用" |
|||
}, |
|||
"disagreeMode" : { |
|||
"support" : false, |
|||
"loadNativePlugins" : false, |
|||
"visitorEntry" : true, |
|||
"showAlways" : false |
|||
}, |
|||
"styles" : { |
|||
"backgroundColor" : "#fff", |
|||
"borderRadius" : "5px", |
|||
"title" : { |
|||
"color" : "#000" |
|||
}, |
|||
"buttonAccept" : { |
|||
"color" : "#002582" |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,20 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="en"> |
|||
<head> |
|||
<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--> |
|||
<!--app-context--> |
|||
</head> |
|||
<body> |
|||
<div id="app"><!--app-html--></div> |
|||
<script type="module" src="/main.js"></script> |
|||
</body> |
|||
</html> |
@ -0,0 +1,22 @@ |
|||
import App from './App' |
|||
|
|||
// #ifndef VUE3
|
|||
import Vue from 'vue' |
|||
import './uni.promisify.adaptor' |
|||
Vue.config.productionTip = false |
|||
App.mpType = 'app' |
|||
const app = new Vue({ |
|||
...App |
|||
}) |
|||
app.$mount() |
|||
// #endif
|
|||
|
|||
// #ifdef VUE3
|
|||
import { createSSRApp } from 'vue' |
|||
export function createApp() { |
|||
const app = createSSRApp(App) |
|||
return { |
|||
app |
|||
} |
|||
} |
|||
// #endif
|
@ -0,0 +1,120 @@ |
|||
{ |
|||
"name" : "神头发电会议系统", |
|||
"appid" : "__UNI__4D0EF3F", |
|||
"description" : "", |
|||
"versionName" : "1.0.0", |
|||
"versionCode" : "100", |
|||
"transformPx" : false, |
|||
/* 5+App特有相关 */ |
|||
"app-plus" : { |
|||
"usingComponents" : true, |
|||
"nvueStyleCompiler" : "uni-app", |
|||
"compilerVersion" : 3, |
|||
"splashscreen" : { |
|||
"alwaysShowBeforeRender" : true, |
|||
"waiting" : true, |
|||
"autoclose" : true, |
|||
"delay" : 0 |
|||
}, |
|||
/* 模块配置 */ |
|||
"modules" : { |
|||
"Record" : {}, |
|||
"Camera" : {}, |
|||
"Barcode" : {} |
|||
}, |
|||
/* 应用发布信息 */ |
|||
"distribute" : { |
|||
/* android打包配置 */ |
|||
"android" : { |
|||
"permissions" : [ |
|||
"<uses-feature android:name=\"android.hardware.camera\"/>", |
|||
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>", |
|||
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>", |
|||
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>", |
|||
"<uses-permission android:name=\"android.permission.CAMERA\"/>", |
|||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>", |
|||
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>", |
|||
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>", |
|||
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>", |
|||
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>", |
|||
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>", |
|||
"<uses-permission android:name=\"android.permission.PERSISTENT_ACTIVITY\"/>", |
|||
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>", |
|||
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>", |
|||
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>", |
|||
"<uses-permission android:name=\"android.permission.VIBRATE\"/>", |
|||
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>", |
|||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>" |
|||
], |
|||
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ] |
|||
}, |
|||
/* ios打包配置 */ |
|||
"ios" : { |
|||
"dSYMs" : false |
|||
}, |
|||
/* SDK配置 */ |
|||
"sdkConfigs" : { |
|||
"ad" : {} |
|||
}, |
|||
"icons" : { |
|||
"android" : { |
|||
"hdpi" : "unpackage/res/icons/72x72.png", |
|||
"xhdpi" : "unpackage/res/icons/96x96.png", |
|||
"xxhdpi" : "unpackage/res/icons/144x144.png", |
|||
"xxxhdpi" : "unpackage/res/icons/192x192.png" |
|||
}, |
|||
"ios" : { |
|||
"appstore" : "unpackage/res/icons/1024x1024.png", |
|||
"ipad" : { |
|||
"app" : "unpackage/res/icons/76x76.png", |
|||
"app@2x" : "unpackage/res/icons/152x152.png", |
|||
"notification" : "unpackage/res/icons/20x20.png", |
|||
"notification@2x" : "unpackage/res/icons/40x40.png", |
|||
"proapp@2x" : "unpackage/res/icons/167x167.png", |
|||
"settings" : "unpackage/res/icons/29x29.png", |
|||
"settings@2x" : "unpackage/res/icons/58x58.png", |
|||
"spotlight" : "unpackage/res/icons/40x40.png", |
|||
"spotlight@2x" : "unpackage/res/icons/80x80.png" |
|||
}, |
|||
"iphone" : { |
|||
"app@2x" : "unpackage/res/icons/120x120.png", |
|||
"app@3x" : "unpackage/res/icons/180x180.png", |
|||
"notification@2x" : "unpackage/res/icons/40x40.png", |
|||
"notification@3x" : "unpackage/res/icons/60x60.png", |
|||
"settings@2x" : "unpackage/res/icons/58x58.png", |
|||
"settings@3x" : "unpackage/res/icons/87x87.png", |
|||
"spotlight@2x" : "unpackage/res/icons/80x80.png", |
|||
"spotlight@3x" : "unpackage/res/icons/120x120.png" |
|||
} |
|||
} |
|||
}, |
|||
"splashscreen" : { |
|||
"useOriginalMsgbox" : true, |
|||
"androidStyle" : "default" |
|||
} |
|||
} |
|||
}, |
|||
/* 快应用特有相关 */ |
|||
"quickapp" : {}, |
|||
/* 小程序特有相关 */ |
|||
"mp-weixin" : { |
|||
"appid" : "", |
|||
"setting" : { |
|||
"urlCheck" : false |
|||
}, |
|||
"usingComponents" : true |
|||
}, |
|||
"mp-alipay" : { |
|||
"usingComponents" : true |
|||
}, |
|||
"mp-baidu" : { |
|||
"usingComponents" : true |
|||
}, |
|||
"mp-toutiao" : { |
|||
"usingComponents" : true |
|||
}, |
|||
"uniStatistics" : { |
|||
"enable" : false |
|||
}, |
|||
"vueVersion" : "2" |
|||
} |
@ -0,0 +1,22 @@ |
|||
{ |
|||
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages |
|||
{ |
|||
"path": "pages/index/index", |
|||
"style": { |
|||
"navigationBarTitleText": "神头发电会议系统", |
|||
"navigationStyle": "custom", |
|||
"app-plus": { |
|||
"titleNView": false //禁用原生导航栏 |
|||
} |
|||
} |
|||
} |
|||
], |
|||
"globalStyle": { |
|||
"navigationBarTextStyle": "black", |
|||
"navigationBarTitleText": "神头发电会议系统", |
|||
"navigationBarBackgroundColor": "#F8F8F8", |
|||
"backgroundColor": "#F8F8F8", |
|||
"pageOrientation": "landscape" |
|||
}, |
|||
"uniIdRouter": {} |
|||
} |
@ -0,0 +1,110 @@ |
|||
<template> |
|||
<view class="container"> |
|||
<web-view :src="src" @message="handlePostMessage"></web-view> |
|||
</view> |
|||
</template> |
|||
<script> |
|||
var wv; |
|||
// #ifdef APP-PLUS |
|||
import permision from '@/utils/wa-permission/permission.js' |
|||
// #endif |
|||
export default { |
|||
data() { |
|||
return { |
|||
src: '', |
|||
} |
|||
}, |
|||
onLoad() { |
|||
this.onReloadWebview() |
|||
}, |
|||
onReady() { |
|||
// #ifdef APP-PLUS |
|||
var currentWebview = this.$scope.$getAppWebview() |
|||
//此对象相当于html5plus里的plus.webview.currentWebview()。在uni-app里vue页面直接使用plus.webview.currentWebview()无效 |
|||
//如果是页面初始化调用时,需要延时一下 |
|||
setTimeout(function() { |
|||
wv = currentWebview.children()[0] |
|||
}, 1000); |
|||
// #endif |
|||
}, |
|||
methods: { |
|||
onReloadWebview() { |
|||
this.src = 'http://10.89.114.11:9001/datang/meeting/client/' |
|||
}, |
|||
// webview向外部发送消息 |
|||
handlePostMessage(e) { |
|||
var data = e.detail.data || [] |
|||
if (data.length) { |
|||
var bridgeParam = data[0] |
|||
// 集中控制bridge |
|||
this.onBridgeHandler(bridgeParam) |
|||
} |
|||
}, |
|||
onBridgeHandler({ |
|||
method, |
|||
param, |
|||
callback |
|||
}) { |
|||
var currentWebview = this.$scope.$getAppWebview() |
|||
wv = currentWebview.children()[0] |
|||
var onAuthHandlerFinished = (result) => { |
|||
wv.evalJS(`${callback}(${result})`); |
|||
} |
|||
if (method === 'camera') { |
|||
this.getCameraAuth(param, onAuthHandlerFinished) |
|||
} |
|||
if (method === 'record') { |
|||
this.getAudioAuth(param, onAuthHandlerFinished) |
|||
} |
|||
}, |
|||
getCameraAuth(param, callback) { |
|||
var result = uni.getAppAuthorizeSetting() |
|||
if (result.cameraAuthorized === 'authorized') { |
|||
// 已获取到权限了 |
|||
callback && callback(1) |
|||
} else { |
|||
permision.requestAndroidPermission('android.permission.CAMERA').then((e) => { |
|||
// 已获取到权限了 |
|||
callback && callback(e) |
|||
}).catch((err) => { |
|||
// 没有获取到权限 |
|||
callback && callback(false) |
|||
// 打开系统设置界面 |
|||
uni.openAppAuthorizeSetting({ |
|||
success(res) { |
|||
console.log('openAppAuthorizeSetting::', res) |
|||
} |
|||
}) |
|||
}) |
|||
} |
|||
}, |
|||
getAudioAuth(param, callback) { |
|||
var result = uni.getAppAuthorizeSetting() |
|||
if (result.microphoneAuthorized === 'authorized') { |
|||
// 已获取到权限了 |
|||
callback && callback(1) |
|||
} else { |
|||
permision.requestAndroidPermission('android.permission.RECORD_AUDIO').then((e) => { |
|||
// 已获取到权限了 |
|||
callback && callback(e) |
|||
}).catch((err) => { |
|||
// 没有获取到权限 |
|||
callback && callback(false) |
|||
// 打开系统设置界面 |
|||
uni.openAppAuthorizeSetting({ |
|||
success(res) { |
|||
console.log('openAppAuthorizeSetting::', res) |
|||
} |
|||
}) |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
.container { |
|||
height: 100vh; |
|||
} |
|||
</style> |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 4.1 KiB |
@ -0,0 +1,10 @@ |
|||
uni.addInterceptor({ |
|||
returnValue (res) { |
|||
if (!(!!res && (typeof res === "object" || typeof res === "function") && typeof res.then === "function")) { |
|||
return res; |
|||
} |
|||
return new Promise((resolve, reject) => { |
|||
res.then((res) => res[0] ? reject(res[0]) : resolve(res[1])); |
|||
}); |
|||
}, |
|||
}); |
@ -0,0 +1,76 @@ |
|||
/** |
|||
* 这里是uni-app内置的常用样式变量 |
|||
* |
|||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 |
|||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App |
|||
* |
|||
*/ |
|||
|
|||
/** |
|||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 |
|||
* |
|||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 |
|||
*/ |
|||
|
|||
/* 颜色变量 */ |
|||
|
|||
/* 行为相关颜色 */ |
|||
$uni-color-primary: #007aff; |
|||
$uni-color-success: #4cd964; |
|||
$uni-color-warning: #f0ad4e; |
|||
$uni-color-error: #dd524d; |
|||
|
|||
/* 文字基本颜色 */ |
|||
$uni-text-color:#333;//基本色 |
|||
$uni-text-color-inverse:#fff;//反色 |
|||
$uni-text-color-grey:#999;//辅助灰色,如加载更多的提示信息 |
|||
$uni-text-color-placeholder: #808080; |
|||
$uni-text-color-disable:#c0c0c0; |
|||
|
|||
/* 背景颜色 */ |
|||
$uni-bg-color:#ffffff; |
|||
$uni-bg-color-grey:#f8f8f8; |
|||
$uni-bg-color-hover:#f1f1f1;//点击状态颜色 |
|||
$uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色 |
|||
|
|||
/* 边框颜色 */ |
|||
$uni-border-color:#c8c7cc; |
|||
|
|||
/* 尺寸变量 */ |
|||
|
|||
/* 文字尺寸 */ |
|||
$uni-font-size-sm:12px; |
|||
$uni-font-size-base:14px; |
|||
$uni-font-size-lg:16; |
|||
|
|||
/* 图片尺寸 */ |
|||
$uni-img-size-sm:20px; |
|||
$uni-img-size-base:26px; |
|||
$uni-img-size-lg:40px; |
|||
|
|||
/* Border Radius */ |
|||
$uni-border-radius-sm: 2px; |
|||
$uni-border-radius-base: 3px; |
|||
$uni-border-radius-lg: 6px; |
|||
$uni-border-radius-circle: 50%; |
|||
|
|||
/* 水平间距 */ |
|||
$uni-spacing-row-sm: 5px; |
|||
$uni-spacing-row-base: 10px; |
|||
$uni-spacing-row-lg: 15px; |
|||
|
|||
/* 垂直间距 */ |
|||
$uni-spacing-col-sm: 4px; |
|||
$uni-spacing-col-base: 8px; |
|||
$uni-spacing-col-lg: 12px; |
|||
|
|||
/* 透明度 */ |
|||
$uni-opacity-disabled: 0.3; // 组件禁用态的透明度 |
|||
|
|||
/* 文章场景相关 */ |
|||
$uni-color-title: #2C405A; // 文章标题颜色 |
|||
$uni-font-size-title:20px; |
|||
$uni-color-subtitle: #555555; // 二级标题颜色 |
|||
$uni-font-size-subtitle:26px; |
|||
$uni-color-paragraph: #3F536E; // 文章段落颜色 |
|||
$uni-font-size-paragraph:15px; |
@ -0,0 +1 @@ |
|||
https://app.liuyingyong.cn/build/download/57bfb730-f352-11ef-bf0a-77340ed3f901 |
@ -0,0 +1,4 @@ |
|||
andrCertfile=D:/公司项目/HBuilderX/plugins/app-safe-pack/Test.keystore |
|||
andrCertAlias=android |
|||
andrCertPass=ep/Tdjka4Y7WYqDB6/S7dw== |
|||
storePassword=ep/Tdjka4Y7WYqDB6/S7dw== |
@ -0,0 +1,4 @@ |
|||
[General] |
|||
andrCertfile=package.keystore |
|||
andrCertAlias=__UNI__4D0EF3F |
|||
andrCertPass="jZ3sIvAof+ZIPDHsK0/UhQ==" |
After Width: | Height: | Size: 4.6 KiB |
After Width: | Height: | Size: 5.4 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 5.7 KiB |
After Width: | Height: | Size: 2.0 KiB |
@ -0,0 +1,25 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh-CN"> |
|||
|
|||
<head> |
|||
<meta charset="UTF-8" /> |
|||
<script> |
|||
var __UniViewStartTime__ = Date.now(); |
|||
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>View</title> |
|||
<link rel="stylesheet" href="view.css" /> |
|||
</head> |
|||
|
|||
<body> |
|||
<div id="app"></div> |
|||
<script src="__uniappes6.js"></script> |
|||
<script src="view.umd.min.js"></script> |
|||
<script src="app-view.js"></script> |
|||
</body> |
|||
|
|||
</html> |
@ -0,0 +1,32 @@ |
|||
{ |
|||
"version" : "1", |
|||
"prompt" : "template", |
|||
"title" : "服务协议和隐私政策", |
|||
"message" : " 请你务必审慎阅读、充分理解“服务协议”和“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/> 你可阅读<a href=\"https://test.tall.wiki/htage2023/client/#/agreement\">《服务协议》</a>和<a href=\"https://test.tall.wiki/htage2023/client/#/privacyPolicy\">《隐私政策》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。", |
|||
"buttonAccept" : "同意并接受", |
|||
"buttonRefuse" : "暂不同意", |
|||
"hrefLoader" : "system|default", |
|||
"backToExit" : "false", |
|||
"second" : { |
|||
"title" : "确认提示", |
|||
"message" : "进入应用前,你需先同意<a href=\"https://test.tall.wiki/htage2023/client/#/agreement\">《服务协议》</a>和<a href=\"https://test.tall.wiki/htage2023/client/#/privacyPolicy\">《隐私政策》</a>,否则将退出应用。", |
|||
"buttonAccept" : "同意并继续", |
|||
"buttonRefuse" : "退出应用" |
|||
}, |
|||
"disagreeMode" : { |
|||
"support" : false, |
|||
"loadNativePlugins" : false, |
|||
"visitorEntry" : true, |
|||
"showAlways" : false |
|||
}, |
|||
"styles" : { |
|||
"backgroundColor" : "#fff", |
|||
"borderRadius" : "5px", |
|||
"title" : { |
|||
"color" : "#000" |
|||
}, |
|||
"buttonAccept" : { |
|||
"color" : "#002582" |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,8 @@ |
|||
|
|||
var isReady=false;var onReadyCallbacks=[]; |
|||
var isServiceReady=false;var onServiceReadyCallbacks=[]; |
|||
var __uniConfig = {"pages":["pages/index/index"],"window":{"navigationBarTextStyle":"black","navigationBarTitleText":"神头发电会议系统","navigationBarBackgroundColor":"#F8F8F8","backgroundColor":"#F8F8F8","pageOrientation":"landscape"},"darkmode":false,"nvueCompiler":"uni-app","nvueStyleCompiler":"uni-app","renderer":"auto","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":false},"appname":"神头发电会议系统","compilerVersion":"4.45","entryPagePath":"pages/index/index","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000}}; |
|||
var __uniRoutes = [{"path":"/pages/index/index","meta":{"isQuit":true},"window":{"navigationBarTitleText":"神头发电会议系统","navigationStyle":"custom","titleNView":false}}]; |
|||
__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:Math.round(f/20)})}return{instance:{__uniConfig:__uniConfig,__uniRoutes:__uniRoutes,global:void 0,window:void 0,document:void 0,frames:void 0,self:void 0,location:void 0,navigator:void 0,localStorage:void 0,history:void 0,Caches:void 0,screen:void 0,alert:void 0,confirm:void 0,prompt:void 0,fetch:void 0,XMLHttpRequest:void 0,WebSocket:void 0,webkit:void 0,print:void 0}}}}); |
@ -0,0 +1 @@ |
|||
(function(e){function r(r){for(var n,l,i=r[0],p=r[1],a=r[2],c=0,s=[];c<i.length;c++)l=i[c],Object.prototype.hasOwnProperty.call(o,l)&&o[l]&&s.push(o[l][0]),o[l]=0;for(n in p)Object.prototype.hasOwnProperty.call(p,n)&&(e[n]=p[n]);f&&f(r);while(s.length)s.shift()();return u.push.apply(u,a||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,i=1;i<t.length;i++){var p=t[i];0!==o[p]&&(n=!1)}n&&(u.splice(r--,1),e=l(l.s=t[0]))}return e}var n={},o={"app-config":0},u=[];function l(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,l),t.l=!0,t.exports}l.m=e,l.c=n,l.d=function(e,r,t){l.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},l.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,r){if(1&r&&(e=l(e)),8&r)return e;if(4&r&&"object"===typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(l.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)l.d(t,n,function(r){return e[r]}.bind(null,n));return t},l.n=function(e){var r=e&&e.__esModule?function(){return e["default"]}:function(){return e};return l.d(r,"a",r),r},l.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},l.p="/";var i=this["webpackJsonp"]=this["webpackJsonp"]||[],p=i.push.bind(i);i.push=r,i=i.slice();for(var a=0;a<i.length;a++)r(i[a]);var f=p;t()})([]); |
@ -0,0 +1 @@ |
|||
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__4D0EF3F","name":"神头发电会议系统","version":{"name":"1.0.0","code":"100"},"description":"","launch_path":"__uniappview.html","developer":{"name":"","email":"","url":""},"permissions":{"Record":{},"Camera":{},"Barcode":{},"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"autoclose":true,"delay":0,"target":"id:1","waiting":true},"popGesture":"close","launchwebview":{"render":"always","id":"1","kernel":"WKWebview"},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#F8F8F8"},"usingComponents":true,"nvueStyleCompiler":"uni-app","compilerVersion":3,"distribute":{"icons":{"android":{"hdpi":"icon-android-hdpi.png","xhdpi":"icon-android-xhdpi.png","xxhdpi":"icon-android-xxhdpi.png","xxxhdpi":"icon-android-xxxhdpi.png"},"ios":{"appstore":"unpackage/res/icons/1024x1024.png","ipad":{"app":"unpackage/res/icons/76x76.png","app@2x":"unpackage/res/icons/152x152.png","notification":"unpackage/res/icons/20x20.png","notification@2x":"unpackage/res/icons/40x40.png","proapp@2x":"unpackage/res/icons/167x167.png","settings":"unpackage/res/icons/29x29.png","settings@2x":"unpackage/res/icons/58x58.png","spotlight":"unpackage/res/icons/40x40.png","spotlight@2x":"unpackage/res/icons/80x80.png"},"iphone":{"app@2x":"unpackage/res/icons/120x120.png","app@3x":"unpackage/res/icons/180x180.png","notification@2x":"unpackage/res/icons/40x40.png","notification@3x":"unpackage/res/icons/60x60.png","settings@2x":"unpackage/res/icons/58x58.png","settings@3x":"unpackage/res/icons/87x87.png","spotlight@2x":"unpackage/res/icons/80x80.png","spotlight@3x":"unpackage/res/icons/120x120.png"},"prerendered":"false"}},"splashscreen":{"useOriginalMsgbox":true,"androidStyle":"default"},"google":{"abiFilters":["armeabi-v7a","arm64-v8a","x86"],"permissions":["<uses-feature android:name=\"android.hardware.camera\"/>","<uses-feature android:name=\"android.hardware.camera.autofocus\"/>","<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>","<uses-permission android:name=\"android.permission.CAMERA\"/>","<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>","<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>","<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>","<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>","<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>","<uses-permission android:name=\"android.permission.PERSISTENT_ACTIVITY\"/>","<uses-permission android:name=\"android.permission.READ_LOGS\"/>","<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>","<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>","<uses-permission android:name=\"android.permission.VIBRATE\"/>","<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>","<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"],"packagename":"uni.UNI4D0EF3F","custompermissions":true},"apple":{"dSYMs":false,"devices":"universal"},"plugins":{"ad":{},"audio":{"mp3":{"description":"Android平台录音支持MP3格式文件"}}},"orientation":"portrait-primary"},"uniStatistics":{"enable":false},"allowsInlineMediaPlayback":true,"uni-app":{"compilerVersion":"4.45","control":"uni-v3","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal"},"launch_path":"__uniappview.html","adid":"128096300305"},"screenOrientation":["landscape-primary","landscape-secondary"]} |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 4.1 KiB |
@ -0,0 +1 @@ |
|||
forceInstall |
After Width: | Height: | Size: 207 KiB |
After Width: | Height: | Size: 8.6 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 952 B |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 4.6 KiB |
After Width: | Height: | Size: 4.9 KiB |
After Width: | Height: | Size: 5.1 KiB |
After Width: | Height: | Size: 5.7 KiB |
After Width: | Height: | Size: 5.4 KiB |
@ -0,0 +1,272 @@ |
|||
/** |
|||
* 本模块封装了Android、iOS的应用权限判断、打开应用权限设置界面、以及位置系统服务是否开启 |
|||
*/ |
|||
|
|||
var isIos |
|||
// #ifdef APP-PLUS
|
|||
isIos = (plus.os.name == "iOS") |
|||
// #endif
|
|||
|
|||
// 判断推送权限是否开启
|
|||
function judgeIosPermissionPush() { |
|||
var result = false; |
|||
var UIApplication = plus.ios.import("UIApplication"); |
|||
var app = UIApplication.sharedApplication(); |
|||
var enabledTypes = 0; |
|||
if (app.currentUserNotificationSettings) { |
|||
var settings = app.currentUserNotificationSettings(); |
|||
enabledTypes = settings.plusGetAttribute("types"); |
|||
console.log("enabledTypes1:" + enabledTypes); |
|||
if (enabledTypes == 0) { |
|||
console.log("推送权限没有开启"); |
|||
} else { |
|||
result = true; |
|||
console.log("已经开启推送功能!") |
|||
} |
|||
plus.ios.deleteObject(settings); |
|||
} else { |
|||
enabledTypes = app.enabledRemoteNotificationTypes(); |
|||
if (enabledTypes == 0) { |
|||
console.log("推送权限没有开启!"); |
|||
} else { |
|||
result = true; |
|||
console.log("已经开启推送功能!") |
|||
} |
|||
console.log("enabledTypes2:" + enabledTypes); |
|||
} |
|||
plus.ios.deleteObject(app); |
|||
plus.ios.deleteObject(UIApplication); |
|||
return result; |
|||
} |
|||
|
|||
// 判断定位权限是否开启
|
|||
function judgeIosPermissionLocation() { |
|||
var result = false; |
|||
var cllocationManger = plus.ios.import("CLLocationManager"); |
|||
var status = cllocationManger.authorizationStatus(); |
|||
result = (status != 2) |
|||
console.log("定位权限开启:" + result); |
|||
// 以下代码判断了手机设备的定位是否关闭,推荐另行使用方法 checkSystemEnableLocation
|
|||
/* var enable = cllocationManger.locationServicesEnabled(); |
|||
var status = cllocationManger.authorizationStatus(); |
|||
console.log("enable:" + enable); |
|||
console.log("status:" + status); |
|||
if (enable && status != 2) { |
|||
result = true; |
|||
console.log("手机定位服务已开启且已授予定位权限"); |
|||
} else { |
|||
console.log("手机系统的定位没有打开或未给予定位权限"); |
|||
} */ |
|||
plus.ios.deleteObject(cllocationManger); |
|||
return result; |
|||
} |
|||
|
|||
// 判断麦克风权限是否开启
|
|||
function judgeIosPermissionRecord() { |
|||
var result = false; |
|||
var avaudiosession = plus.ios.import("AVAudioSession"); |
|||
var avaudio = avaudiosession.sharedInstance(); |
|||
var permissionStatus = avaudio.recordPermission(); |
|||
console.log("permissionStatus:" + permissionStatus); |
|||
if (permissionStatus == 1684369017 || permissionStatus == 1970168948) { |
|||
console.log("麦克风权限没有开启"); |
|||
} else { |
|||
result = true; |
|||
console.log("麦克风权限已经开启"); |
|||
} |
|||
plus.ios.deleteObject(avaudiosession); |
|||
return result; |
|||
} |
|||
|
|||
// 判断相机权限是否开启
|
|||
function judgeIosPermissionCamera() { |
|||
var result = false; |
|||
var AVCaptureDevice = plus.ios.import("AVCaptureDevice"); |
|||
var authStatus = AVCaptureDevice.authorizationStatusForMediaType('vide'); |
|||
console.log("authStatus:" + authStatus); |
|||
if (authStatus == 3) { |
|||
result = true; |
|||
console.log("相机权限已经开启"); |
|||
} else { |
|||
console.log("相机权限没有开启"); |
|||
} |
|||
plus.ios.deleteObject(AVCaptureDevice); |
|||
return result; |
|||
} |
|||
|
|||
// 判断相册权限是否开启
|
|||
function judgeIosPermissionPhotoLibrary() { |
|||
var result = false; |
|||
var PHPhotoLibrary = plus.ios.import("PHPhotoLibrary"); |
|||
var authStatus = PHPhotoLibrary.authorizationStatus(); |
|||
console.log("authStatus:" + authStatus); |
|||
if (authStatus == 3) { |
|||
result = true; |
|||
console.log("相册权限已经开启"); |
|||
} else { |
|||
console.log("相册权限没有开启"); |
|||
} |
|||
plus.ios.deleteObject(PHPhotoLibrary); |
|||
return result; |
|||
} |
|||
|
|||
// 判断通讯录权限是否开启
|
|||
function judgeIosPermissionContact() { |
|||
var result = false; |
|||
var CNContactStore = plus.ios.import("CNContactStore"); |
|||
var cnAuthStatus = CNContactStore.authorizationStatusForEntityType(0); |
|||
if (cnAuthStatus == 3) { |
|||
result = true; |
|||
console.log("通讯录权限已经开启"); |
|||
} else { |
|||
console.log("通讯录权限没有开启"); |
|||
} |
|||
plus.ios.deleteObject(CNContactStore); |
|||
return result; |
|||
} |
|||
|
|||
// 判断日历权限是否开启
|
|||
function judgeIosPermissionCalendar() { |
|||
var result = false; |
|||
var EKEventStore = plus.ios.import("EKEventStore"); |
|||
var ekAuthStatus = EKEventStore.authorizationStatusForEntityType(0); |
|||
if (ekAuthStatus == 3) { |
|||
result = true; |
|||
console.log("日历权限已经开启"); |
|||
} else { |
|||
console.log("日历权限没有开启"); |
|||
} |
|||
plus.ios.deleteObject(EKEventStore); |
|||
return result; |
|||
} |
|||
|
|||
// 判断备忘录权限是否开启
|
|||
function judgeIosPermissionMemo() { |
|||
var result = false; |
|||
var EKEventStore = plus.ios.import("EKEventStore"); |
|||
var ekAuthStatus = EKEventStore.authorizationStatusForEntityType(1); |
|||
if (ekAuthStatus == 3) { |
|||
result = true; |
|||
console.log("备忘录权限已经开启"); |
|||
} else { |
|||
console.log("备忘录权限没有开启"); |
|||
} |
|||
plus.ios.deleteObject(EKEventStore); |
|||
return result; |
|||
} |
|||
|
|||
// Android权限查询
|
|||
function requestAndroidPermission(permissionID) { |
|||
return new Promise((resolve, reject) => { |
|||
plus.android.requestPermissions( |
|||
[permissionID], // 理论上支持多个权限同时查询,但实际上本函数封装只处理了一个权限的情况。有需要的可自行扩展封装
|
|||
function(resultObj) { |
|||
var result = 0; |
|||
for (var i = 0; i < resultObj.granted.length; i++) { |
|||
var grantedPermission = resultObj.granted[i]; |
|||
console.log('已获取的权限:' + grantedPermission); |
|||
result = 1 |
|||
} |
|||
for (var i = 0; i < resultObj.deniedPresent.length; i++) { |
|||
var deniedPresentPermission = resultObj.deniedPresent[i]; |
|||
console.log('拒绝本次申请的权限:' + deniedPresentPermission); |
|||
result = 0 |
|||
} |
|||
for (var i = 0; i < resultObj.deniedAlways.length; i++) { |
|||
var deniedAlwaysPermission = resultObj.deniedAlways[i]; |
|||
console.log('永久拒绝申请的权限:' + deniedAlwaysPermission); |
|||
result = -1 |
|||
} |
|||
resolve(result); |
|||
// 若所需权限被拒绝,则打开APP设置界面,可以在APP设置界面打开相应权限
|
|||
// if (result != 1) {
|
|||
// gotoAppPermissionSetting()
|
|||
// }
|
|||
}, |
|||
function(error) { |
|||
console.log('申请权限错误:' + error.code + " = " + error.message); |
|||
resolve({ |
|||
code: error.code, |
|||
message: error.message |
|||
}); |
|||
} |
|||
); |
|||
}); |
|||
} |
|||
|
|||
// 使用一个方法,根据参数判断权限
|
|||
function judgeIosPermission(permissionID) { |
|||
if (permissionID == "location") { |
|||
return judgeIosPermissionLocation() |
|||
} else if (permissionID == "camera") { |
|||
return judgeIosPermissionCamera() |
|||
} else if (permissionID == "photoLibrary") { |
|||
return judgeIosPermissionPhotoLibrary() |
|||
} else if (permissionID == "record") { |
|||
return judgeIosPermissionRecord() |
|||
} else if (permissionID == "push") { |
|||
return judgeIosPermissionPush() |
|||
} else if (permissionID == "contact") { |
|||
return judgeIosPermissionContact() |
|||
} else if (permissionID == "calendar") { |
|||
return judgeIosPermissionCalendar() |
|||
} else if (permissionID == "memo") { |
|||
return judgeIosPermissionMemo() |
|||
} |
|||
return false; |
|||
} |
|||
|
|||
// 跳转到**应用**的权限页面
|
|||
function gotoAppPermissionSetting() { |
|||
if (isIos) { |
|||
var UIApplication = plus.ios.import("UIApplication"); |
|||
var application2 = UIApplication.sharedApplication(); |
|||
var NSURL2 = plus.ios.import("NSURL"); |
|||
// var setting2 = NSURL2.URLWithString("prefs:root=LOCATION_SERVICES");
|
|||
var setting2 = NSURL2.URLWithString("app-settings:"); |
|||
application2.openURL(setting2); |
|||
|
|||
plus.ios.deleteObject(setting2); |
|||
plus.ios.deleteObject(NSURL2); |
|||
plus.ios.deleteObject(application2); |
|||
} else { |
|||
// console.log(plus.device.vendor);
|
|||
var Intent = plus.android.importClass("android.content.Intent"); |
|||
var Settings = plus.android.importClass("android.provider.Settings"); |
|||
var Uri = plus.android.importClass("android.net.Uri"); |
|||
var mainActivity = plus.android.runtimeMainActivity(); |
|||
var intent = new Intent(); |
|||
intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS); |
|||
var uri = Uri.fromParts("package", mainActivity.getPackageName(), null); |
|||
intent.setData(uri); |
|||
mainActivity.startActivity(intent); |
|||
} |
|||
} |
|||
|
|||
// 检查系统的设备服务是否开启
|
|||
// var checkSystemEnableLocation = async function () {
|
|||
function checkSystemEnableLocation() { |
|||
if (isIos) { |
|||
var result = false; |
|||
var cllocationManger = plus.ios.import("CLLocationManager"); |
|||
var result = cllocationManger.locationServicesEnabled(); |
|||
console.log("系统定位开启:" + result); |
|||
plus.ios.deleteObject(cllocationManger); |
|||
return result; |
|||
} else { |
|||
var context = plus.android.importClass("android.content.Context"); |
|||
var locationManager = plus.android.importClass("android.location.LocationManager"); |
|||
var main = plus.android.runtimeMainActivity(); |
|||
var mainSvr = main.getSystemService(context.LOCATION_SERVICE); |
|||
var result = mainSvr.isProviderEnabled(locationManager.GPS_PROVIDER); |
|||
console.log("系统定位开启:" + result); |
|||
return result |
|||
} |
|||
} |
|||
|
|||
module.exports = { |
|||
judgeIosPermission: judgeIosPermission, |
|||
requestAndroidPermission: requestAndroidPermission, |
|||
checkSystemEnableLocation: checkSystemEnableLocation, |
|||
gotoAppPermissionSetting: gotoAppPermissionSetting |
|||
} |