Compare commits
33 Commits
Author | SHA1 | Date | |
---|---|---|---|
6227aaf931 | |||
ddfedd2058 | |||
934fe8de1f | |||
61459264ef | |||
59982f4f46 | |||
|
687371b1e6 | ||
|
f7b500f715 | ||
|
a9d3014b28 | ||
ed3ebf0b85 | |||
a2b3ef0cf8 | |||
|
d6fb4b5688 | ||
|
7bc12f11a0 | ||
67e81c1a80 | |||
c0b331bfb5 | |||
|
acace8dc21 | ||
|
446498b893 | ||
022aaa9109 | |||
92d8327930 | |||
|
c2168272de | ||
|
6d913b9288 | ||
|
951aabfe55 | ||
a7bc5506de | |||
|
e6833725e7 | ||
|
1bd2bffedf | ||
86dbbcd6a7 | |||
6e8d2d38e3 | |||
b9a7864433 | |||
5e0d4bea19 | |||
524bfb97fa | |||
8be6d5316d | |||
b44bd80ecd | |||
695f33d77b | |||
c955087e49 |
@ -13,7 +13,7 @@
|
|||||||
"h5" : {
|
"h5" : {
|
||||||
"launchtype" : "local"
|
"launchtype" : "local"
|
||||||
},
|
},
|
||||||
"provider" : "alipay",
|
"provider" : "aliyun",
|
||||||
"type" : "uniCloud"
|
"type" : "uniCloud"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
42
App.vue
@ -1,22 +1,62 @@
|
|||||||
<script>
|
<script>
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 上一次网络状态
|
||||||
|
lastNetworkStatus: null
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 判断是否是第一次安装APP并且打开
|
||||||
|
isFirstOpen() {
|
||||||
|
let isFirstOpen = uni.getStorageSync('isFirstOpen')
|
||||||
|
if (!isFirstOpen) {
|
||||||
|
uni.setStorageSync('isFirstOpen', true)
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
},
|
||||||
networkStatusChange(res) {
|
networkStatusChange(res) {
|
||||||
|
console.log(res)
|
||||||
if (res.isConnected) {
|
if (res.isConnected) {
|
||||||
|
// 如果是第一次安装进入,并且网络状态为有网络,则跳转到主页
|
||||||
|
if (this.isFirstOpen()) {
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
url: '/pages/index/index'
|
url: '/pages/index/index'
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
// 如果上一次网络状态为无网络,且当前网络状态为有网络,则跳转到首页
|
||||||
|
if (this.lastNetworkStatus === false) {
|
||||||
|
uni.showModal({
|
||||||
|
title: "提示",
|
||||||
|
content: "当前设备网络发生更改,是否刷新页面?",
|
||||||
|
showCancel: true,
|
||||||
|
success: function (res) {
|
||||||
|
if (res.confirm || res.cancel) {
|
||||||
|
uni.redirectTo({
|
||||||
|
url: '/pages/index/index'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
url: '/pages/networko/index'
|
url: '/pages/networko/index'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
this.lastNetworkStatus = res.isConnected
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLaunch: function () {
|
onLaunch: function () {
|
||||||
|
console.log('onLaunch')
|
||||||
|
|
||||||
},
|
},
|
||||||
onShow: function () {
|
onShow: function () {
|
||||||
|
uni.onNetworkStatusChange(this.networkStatusChange);
|
||||||
uni.getNetworkType({
|
uni.getNetworkType({
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
if (res.networkType === 'none') {
|
if (res.networkType === 'none') {
|
||||||
@ -27,7 +67,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
uni.onNetworkStatusChange(this.networkStatusChange);
|
|
||||||
},
|
},
|
||||||
onHide: function () {
|
onHide: function () {
|
||||||
uni.offNetworkStatusChange(this.networkStatusChange)
|
uni.offNetworkStatusChange(this.networkStatusChange)
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
{
|
{
|
||||||
"version" : "1",
|
"version" : "1",
|
||||||
"prompt" : "template",
|
"prompt" : "template",
|
||||||
"title" : "服务协议和隐私政策",
|
"title" : "温馨提示",
|
||||||
"message" : " 请你务必审慎阅读、充分理解“平台服务协议”和“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/> 你可阅读<a href=\"https://oa.szjixun.cn/#/pages/login/serveInfo\">《用户服务协议》</a>和<a href=\"https://oa.szjixun.cn/#/pages/login/privateInfo\">《隐私政策》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。",
|
"message" : " 感谢您对oa考勤系统的信赖!在使用前请务必阅读并同意<a href=\"https://oa-a.szjixun.cn/#/pages/setting/severInfo\">《用户服务协议》</a>和<a href=\"https://oa-a.szjixun.cn/#/pages/setting/privateInfo\">《隐私政策》</a>,我们将按照协议和政策内容为您提供服务。<br/>oa考勤系统系统的基本功能为打卡、审批等考勤管理及协同办公服务。基于您的授权及服务之必要,基本功能的必要个人信息包括移动电话号码、账号信息等。您同意<a href=\"https://oa-a.szjixun.cn/#/pages/setting/privateInfo\">《隐私政策》</a>仅代表同意oa考勤系统在您使用基本功能时处理相关必要信息。附加功能如需处理个人信息,将单独征求您的同意。",
|
||||||
"buttonAccept" : "同意并接受",
|
"buttonAccept" : "同意并接受",
|
||||||
"buttonRefuse" : "不同意",
|
"buttonRefuse" : "不同意",
|
||||||
"second" : {
|
"second" : {
|
||||||
"title" : "确认提示",
|
"title" : " 您需要同意本隐私政策才能继续使用oa考勤系统",
|
||||||
"message" : " 进入应用前,你需先同意<a href=\"https://oa.szjixun.cn/#/pages/login/serveInfo\">《用户服务协议》</a>和<a href=\"https://oa.szjixun.cn/#/pages/login/privateInfo\">《隐私政策》</a>,否则将退出应用。",
|
"message" : " 若您不同意本<a href=\"https://oa-a.szjixun.cn/#/pages/setting/privateInfo\">《隐私政策》</a>,很遗憾我们将无法为您提供服务",
|
||||||
"buttonAccept" : "同意并继续",
|
"buttonAccept" : "同意并继续",
|
||||||
"buttonRefuse" : "退出应用"
|
"buttonRefuse" : "退出应用"
|
||||||
},
|
},
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
const env = 'test';
|
const env = 'prod';
|
||||||
const configs = {
|
const configs = {
|
||||||
LocalTest: {
|
LocalTest: {
|
||||||
apiBaseUrl: 'https://warehouse.szjixun.cn/oa_backend',
|
apiBaseUrl: 'https://warehouse.szjixun.cn/oa_backend',
|
||||||
h5Url:'http://192.168.88.51:8080/#/'
|
h5Url: 'http://192.168.88.61:2367/#/'
|
||||||
},
|
},
|
||||||
dev: {
|
dev: {
|
||||||
apiBaseUrl: 'https://warehouse.szjixun.cn/oa_backend',
|
apiBaseUrl: 'https://warehouse.szjixun.cn/oa_backend',
|
||||||
h5Url:'https://192.168.88.27:8080/#/'
|
h5Url: 'http://192.168.88.47:2367/#/'
|
||||||
},
|
},
|
||||||
test: {
|
test: {
|
||||||
apiBaseUrl: 'https://warehouse.szjixun.cn/oa_backend',
|
apiBaseUrl: 'https://warehouse.szjixun.cn/oa_backend',
|
||||||
h5Url:'https://192.168.88.29:8080/#/'
|
h5Url: 'http://114.218.158.24:8042/#/'
|
||||||
},
|
},
|
||||||
prod: {
|
prod: {
|
||||||
apiBaseUrl: 'https://oa-a.szjixun.cn/api',
|
apiBaseUrl: 'https://oa-a.szjixun.cn/api',
|
||||||
|
@ -33,12 +33,12 @@
|
|||||||
<rect key="frame" x="150.66666666666666" y="391.66666666666669" width="112.66666666666666" height="112.66666666666669"/>
|
<rect key="frame" x="150.66666666666666" y="391.66666666666669" width="112.66666666666666" height="112.66666666666669"/>
|
||||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||||
</imageView>
|
</imageView>
|
||||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="hello uniapp" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="QBH-Ne-rcx">
|
<!-- <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="hello uniapp" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="QBH-Ne-rcx">
|
||||||
<rect key="frame" x="168" y="835" width="78.333333333333314" height="17"/>
|
<rect key="frame" x="168" y="835" width="78.333333333333314" height="17"/>
|
||||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||||
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||||
<nil key="highlightedColor"/>
|
<nil key="highlightedColor"/>
|
||||||
</label>
|
</label> -->
|
||||||
</subviews>
|
</subviews>
|
||||||
<viewLayoutGuide key="safeArea" id="IW3-oA-Ytg"/>
|
<viewLayoutGuide key="safeArea" id="IW3-oA-Ytg"/>
|
||||||
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
||||||
|
Before Width: | Height: | Size: 732 KiB After Width: | Height: | Size: 226 KiB |
Before Width: | Height: | Size: 732 KiB After Width: | Height: | Size: 226 KiB |
@ -1,3 +1,3 @@
|
|||||||
Android 包名 : uni.UNI4796942
|
Android 包名 : uni.UNI70C49A3
|
||||||
证书别名:oaapp
|
证书别名:oaapp
|
||||||
密钥密码:12345678
|
密钥密码:12345678
|
||||||
|
BIN
files/icon.png
Normal file
After Width: | Height: | Size: 27 KiB |
BIN
files/pushicon/18.png
Normal file
After Width: | Height: | Size: 3.4 KiB |
BIN
files/pushicon/24.png
Normal file
After Width: | Height: | Size: 5.2 KiB |
BIN
files/pushicon/36.png
Normal file
After Width: | Height: | Size: 8.0 KiB |
BIN
files/pushicon/48.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
files/pushicon/72.png
Normal file
After Width: | Height: | Size: 19 KiB |
@ -1 +1,5 @@
|
|||||||
|
Android 包名 : uni.UNI70C49A3
|
||||||
|
证书别名:oaapp
|
||||||
|
密钥密码:12345678
|
||||||
|
Bundle ID:com.fonchain.attendance
|
||||||
|
IOS:私钥证书密码 dis dev 都是 12345678
|
||||||
|
@ -2,11 +2,14 @@
|
|||||||
"name" : "oa考勤系统",
|
"name" : "oa考勤系统",
|
||||||
"appid" : "__UNI__4796942",
|
"appid" : "__UNI__4796942",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"versionName" : "2.1.1",
|
"versionName" : "2.3.2",
|
||||||
"versionCode" : 211,
|
"versionCode" : 232,
|
||||||
"transformPx" : false,
|
"transformPx" : false,
|
||||||
/* 5+App特有相关 */
|
/* 5+App特有相关 */
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
|
"compatible" : {
|
||||||
|
"ignoreVersion" : true //true表示忽略版本检查提示框,HBuilderX1.9.0及以上版本支持
|
||||||
|
},
|
||||||
"usingComponents" : true,
|
"usingComponents" : true,
|
||||||
"nvueStyleCompiler" : "uni-app",
|
"nvueStyleCompiler" : "uni-app",
|
||||||
"compilerVersion" : 3,
|
"compilerVersion" : 3,
|
||||||
@ -21,7 +24,10 @@
|
|||||||
"Camera" : {},
|
"Camera" : {},
|
||||||
"Geolocation" : {},
|
"Geolocation" : {},
|
||||||
"Maps" : {},
|
"Maps" : {},
|
||||||
"LivePusher" : {}
|
"LivePusher" : {},
|
||||||
|
"Push" : {},
|
||||||
|
"Barcode" : {},
|
||||||
|
"Share" : {}
|
||||||
},
|
},
|
||||||
/* 应用发布信息 */
|
/* 应用发布信息 */
|
||||||
"distribute" : {
|
"distribute" : {
|
||||||
@ -32,13 +38,11 @@
|
|||||||
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
|
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
|
||||||
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
||||||
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
||||||
@ -48,7 +52,8 @@
|
|||||||
],
|
],
|
||||||
"abiFilters" : [ "armeabi-v7a", "arm64-v8a" ],
|
"abiFilters" : [ "armeabi-v7a", "arm64-v8a" ],
|
||||||
"autoSdkPermissions" : false,
|
"autoSdkPermissions" : false,
|
||||||
"targetSdkVersion" : 34
|
"targetSdkVersion" : 34,
|
||||||
|
"minSdkVersion" : 21
|
||||||
},
|
},
|
||||||
/* ios打包配置 */
|
/* ios打包配置 */
|
||||||
"ios" : {
|
"ios" : {
|
||||||
@ -65,33 +70,37 @@
|
|||||||
"geolocation" : {
|
"geolocation" : {
|
||||||
"system" : {
|
"system" : {
|
||||||
"__platform__" : [ "ios", "android" ]
|
"__platform__" : [ "ios", "android" ]
|
||||||
},
|
|
||||||
"baidu" : {
|
|
||||||
"__platform__" : [ "ios", "android" ],
|
|
||||||
"appkey_ios" : "5zzMAq3ofL5H5KfxRcf0zDMLTimvGIb0",
|
|
||||||
"appkey_android" : "ahdcPcBfatf61zRAgNl9SpBGUEURsnXN"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ad" : {},
|
"ad" : {},
|
||||||
"share" : {
|
"share" : {
|
||||||
"weixin" : {
|
"weixin" : {
|
||||||
"appid" : "",
|
"appid" : "wx3a0f78634d074b23",
|
||||||
"UniversalLinks" : ""
|
"UniversalLinks" : "https://warehouse.szjixun.cn/oa_backend/static/aretree/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"push" : {
|
"push" : {
|
||||||
"unipush" : {
|
"unipush" : {
|
||||||
|
"offline" : true,
|
||||||
|
"oppo" : {},
|
||||||
|
"vivo" : {},
|
||||||
|
"mi" : {},
|
||||||
|
"honor" : {},
|
||||||
"version" : "2",
|
"version" : "2",
|
||||||
"offline" : true
|
"icons" : {
|
||||||
|
"small" : {
|
||||||
|
"ldpi" : "unpackage/pushicon/18.png",
|
||||||
|
"mdpi" : "unpackage/pushicon/24.png",
|
||||||
|
"hdpi" : "unpackage/pushicon/36.png",
|
||||||
|
"xhdpi" : "unpackage/pushicon/48.png",
|
||||||
|
"xxhdpi" : "unpackage/pushicon/72.png"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"maps" : {
|
"meizu" : {}
|
||||||
"baidu" : {
|
|
||||||
"appkey_ios" : "5zzMAq3ofL5H5KfxRcf0zDMLTimvGIb0",
|
|
||||||
"appkey_android" : "ahdcPcBfatf61zRAgNl9SpBGUEURsnXN"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"maps" : {}
|
||||||
|
},
|
||||||
"icons" : {
|
"icons" : {
|
||||||
"android" : {
|
"android" : {
|
||||||
"hdpi" : "unpackage/res/icons/72x72.png",
|
"hdpi" : "unpackage/res/icons/72x72.png",
|
||||||
@ -126,13 +135,13 @@
|
|||||||
},
|
},
|
||||||
"splashscreen" : {
|
"splashscreen" : {
|
||||||
"useOriginalMsgbox" : true,
|
"useOriginalMsgbox" : true,
|
||||||
"androidStyle" : "common",
|
"androidStyle" : "default",
|
||||||
"android" : {
|
"android" : {
|
||||||
"hdpi" : "static/image/sy.png",
|
"hdpi" : "static/image/drawable-hdpi/sy.9.png",
|
||||||
"xhdpi" : "static/image/sy.png",
|
"xhdpi" : "static/image/drawable-xhdpi/sy.9.png",
|
||||||
"xxhdpi" : "static/image/sy.png"
|
"xxhdpi" : "static/image/drawable-xxhdpi/sy.9.png"
|
||||||
},
|
},
|
||||||
"iosStyle" : "common",
|
"iosStyle" : "storyboard",
|
||||||
"ios" : {
|
"ios" : {
|
||||||
"storyboard" : "files/CustomStoryboard.zip"
|
"storyboard" : "files/CustomStoryboard.zip"
|
||||||
}
|
}
|
||||||
|
@ -2,12 +2,47 @@
|
|||||||
<web-view class="webview" @message="webLoad" style="flex: 1;" :src="config.h5Url"></web-view>
|
<web-view class="webview" @message="webLoad" style="flex: 1;" :src="config.h5Url"></web-view>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from 'vue'
|
import { ref, onMounted } from 'vue'
|
||||||
import config from "../../config";
|
import { onExit, onShow } from "@dcloudio/uni-app";
|
||||||
import {onExit } from "@dcloudio/uni-app";
|
import config from "../../config"
|
||||||
|
onShow(() => {
|
||||||
|
// const { statusBarHeight } = uni.getSystemInfoSync()
|
||||||
|
// const wv1 = plus.webview.getWebviewById("custom-webview");
|
||||||
|
// let wv = null;
|
||||||
|
// if (wv1) {
|
||||||
|
// wv = wv1;
|
||||||
|
// } else {
|
||||||
|
// wv = plus.webview.create(config.h5Url, "custom-webview", {
|
||||||
|
// top: statusBarHeight,
|
||||||
|
// bottom: 0,
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// var pages = getCurrentPages();
|
||||||
|
// var page = pages[pages.length - 1];
|
||||||
|
// var currentWebview = page.$getAppWebview();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
})
|
||||||
import { Communication } from '../../utils/communication.js';
|
import { Communication } from '../../utils/communication.js';
|
||||||
const commun = new Communication()
|
const commun = new Communication()
|
||||||
|
const shareH5 = () => {
|
||||||
|
uni.share({
|
||||||
|
provider: 'weixin',
|
||||||
|
scene: "WXSceneSession",
|
||||||
|
type: 0,// 5代表分享为小程序
|
||||||
|
imageUrl: 'https://th.bing.com/th?id=ORMS.41c34644e7e67f95a14620e77064b5d9&pid=Wdp&w=268&h=140&qlt=90&c=1&rs=1&dpr=1&p=0', // 必填
|
||||||
|
title: '分享的标题',
|
||||||
|
href: 'https://www.baidu.com/',
|
||||||
|
success: function (res) {
|
||||||
|
console.log("success:" + JSON.stringify(res));
|
||||||
|
},
|
||||||
|
fail: function (err) {
|
||||||
|
console.log("fail:" + JSON.stringify(err));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//#ifdef APP-ANDROID
|
||||||
import {
|
import {
|
||||||
registerRequestPermissionTipsListener,
|
registerRequestPermissionTipsListener,
|
||||||
unregisterRequestPermissionTipsListener,
|
unregisterRequestPermissionTipsListener,
|
||||||
@ -15,8 +50,11 @@ const commun=new Communication()
|
|||||||
} from "@/uni_modules/uni-registerRequestPermissionTips"
|
} from "@/uni_modules/uni-registerRequestPermissionTips"
|
||||||
|
|
||||||
const PermissionTips = {
|
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>",
|
||||||
"android.permission.READ_PHONE_STATE": "<h4 style=\"font-size:40px;\">正在读取网络状态权限</h4><font color=#cccccc>通讯录权限不会获取任何信息,请注意通讯录权限不会获取任何信息,请注意通讯录权限不会获取任何信息,请注意</font>"
|
"android.permission.CAMERA": "<h4 style=\"font-size:40px;\">正在访问相机权限</h4><font color=#cccccc>需要扫描二维码或拍照,是否允许打开相机?</font>",
|
||||||
|
"android.permission.WRITE_EXTERNAL_STORAGE": "<h4 style=\"font-size:40px;\">正在读取相册权限</h4><font color=#cccccc>我们需要获取访问您设备相册的权限,以便您能够选择并上传图片或视频到我们的应用中。</font>",
|
||||||
|
"android.permission.ACCESS_FINE_LOCATION": "<h4 style=\"font-size:40px;\">正在访问位置权限</h4><font color=#cccccc>需要获取您的位置信息,以便您能够进行考勤打卡。</font>",
|
||||||
|
"android.permission.ACCESS_COARSE_LOCATION": "<h4 style=\"font-size:40px;\">正在访问位置权限</h4><font color=#cccccc>需要获取您的位置信息,以便您能够进行考勤打卡。</font>"
|
||||||
}
|
}
|
||||||
onExit(() => {
|
onExit(() => {
|
||||||
unregisterRequestPermissionTipsListener()
|
unregisterRequestPermissionTipsListener()
|
||||||
@ -29,7 +67,7 @@ onExit(()=>{
|
|||||||
console.log('onRequest', e)
|
console.log('onRequest', e)
|
||||||
},
|
},
|
||||||
onConfirm: (e) => {
|
onConfirm: (e) => {
|
||||||
commun.sendToH5('permission-application',{action:'open-permission',data:e});
|
// commun.sendToH5('permission-application', { action: 'open-permission', data: e });
|
||||||
},
|
},
|
||||||
onComplete: (e) => {
|
onComplete: (e) => {
|
||||||
commun.sendToH5('permission-application', { action: 'close-permission', data: e });
|
commun.sendToH5('permission-application', { action: 'close-permission', data: e });
|
||||||
@ -53,12 +91,18 @@ onExit(()=>{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
//#endif
|
||||||
|
const webLoad = (e) => {
|
||||||
|
const message = e.detail.data?.[0] || '';
|
||||||
|
commun.handleMessage(message);
|
||||||
|
};
|
||||||
function initializeWebView() {
|
function initializeWebView() {
|
||||||
const currentWebview = getCurrentPages().pop().$getAppWebview()
|
const currentWebview = getCurrentPages().pop().$getAppWebview()
|
||||||
commun.setWebView(currentWebview.children()[0])
|
commun.setWebView(currentWebview.children()[0])
|
||||||
}
|
}
|
||||||
//load-complete 注册函数
|
//load-complete 注册函数
|
||||||
commun.registerHandler('load-complete', () => {
|
commun.registerHandler('load-complete', () => {
|
||||||
|
|
||||||
initializeWebView()
|
initializeWebView()
|
||||||
const { statusBarHeight } = uni.getSystemInfoSync()
|
const { statusBarHeight } = uni.getSystemInfoSync()
|
||||||
commun.webViewObj.setStyle({
|
commun.webViewObj.setStyle({
|
||||||
@ -67,6 +111,7 @@ commun.registerHandler('load-complete',()=>{
|
|||||||
})
|
})
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
commun.registerHandler('getLocation', (data) => {
|
commun.registerHandler('getLocation', (data) => {
|
||||||
uni.getLocation({
|
uni.getLocation({
|
||||||
type: 'gcj02',
|
type: 'gcj02',
|
||||||
@ -79,12 +124,50 @@ commun.registerHandler('getLocation',(data)=>{
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
const webLoad = (e) => {
|
commun.registerHandler('goCard', async (data) => {
|
||||||
const message = e.detail.data?.[0] || '';
|
await getCard(data.phone)
|
||||||
commun.handleMessage(message);
|
})
|
||||||
};
|
|
||||||
|
commun.registerHandler('createPushMessage', async (data) => {
|
||||||
|
uni.createPushMessage(JSON.parse(decodeURIComponent(data)))
|
||||||
|
})
|
||||||
|
|
||||||
|
// 获取电子名片
|
||||||
|
async function getCard(phone) {
|
||||||
|
uni.request({
|
||||||
|
url: 'https://blockchain.szjixun.cn/api/e_card/info-phone',
|
||||||
|
method: 'POST',
|
||||||
|
data: {
|
||||||
|
phone: phone
|
||||||
|
},
|
||||||
|
success: (res) => {
|
||||||
|
const resData = res.data.data
|
||||||
|
uni.share({
|
||||||
|
provider: 'weixin',
|
||||||
|
scene: "WXSceneSession",
|
||||||
|
type: 5,// 5代表分享为小程序
|
||||||
|
imageUrl: 'https://e-cdn.fontree.cn/fonchain-main/prod/image/139/avatar/ababc42c-7654-47f8-b22b-29dc589c71f0.png', // 必填
|
||||||
|
title: `${resData.name}的电子名片`,
|
||||||
|
miniProgram: {
|
||||||
|
id: "gh_97094c34debd",
|
||||||
|
path: `/pages/mine/index?uid=${resData.uid}&userType=${resData.userType}`,
|
||||||
|
type: 0,
|
||||||
|
webUrl: `/pages/mine/index?uid=${resData.uid}&userType=${resData.userType}`,
|
||||||
|
},
|
||||||
|
success: function (res) {
|
||||||
|
console.log("success:" + JSON.stringify(res));
|
||||||
|
},
|
||||||
|
fail: function (err) {
|
||||||
|
console.log("fail:" + JSON.stringify(err));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
fail: (err) => {
|
||||||
|
console.log('getCard', err)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style></style>
|
||||||
|
|
||||||
</style>
|
|
||||||
|
BIN
static/image/drawable-hdpi/sy.9.png
Normal file
After Width: | Height: | Size: 175 KiB |
BIN
static/image/drawable-xhdpi/sy.9.png
Normal file
After Width: | Height: | Size: 227 KiB |
BIN
static/image/drawable-xxhdpi/sy.9.png
Normal file
After Width: | Height: | Size: 525 KiB |
Before Width: | Height: | Size: 732 KiB After Width: | Height: | Size: 226 KiB |
14
uniCloud-aliyun/database/opendb-device.index.json
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"IndexName": "index_device_id",
|
||||||
|
"MgoKeySchema": {
|
||||||
|
"MgoIndexKeys": [
|
||||||
|
{
|
||||||
|
"Name": "device_id",
|
||||||
|
"Direction": "1"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"MgoIsUnique": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
142
uniCloud-aliyun/database/opendb-device.schema.json
Normal file
@ -0,0 +1,142 @@
|
|||||||
|
{
|
||||||
|
"bsonType": "object",
|
||||||
|
"required": [],
|
||||||
|
"permission": {
|
||||||
|
"read": false,
|
||||||
|
"create": false,
|
||||||
|
"update": false,
|
||||||
|
"delete": false
|
||||||
|
},
|
||||||
|
"properties": {
|
||||||
|
"_id": {
|
||||||
|
"description": "ID,系统自动生成"
|
||||||
|
},
|
||||||
|
"appid": {
|
||||||
|
"bsonType": "string",
|
||||||
|
"description": "DCloud appid"
|
||||||
|
},
|
||||||
|
"device_id": {
|
||||||
|
"bsonType": "string",
|
||||||
|
"description": "设备唯一标识"
|
||||||
|
},
|
||||||
|
"vendor": {
|
||||||
|
"bsonType": "string",
|
||||||
|
"description": "设备厂商"
|
||||||
|
},
|
||||||
|
"push_clientid": {
|
||||||
|
"bsonType": "string",
|
||||||
|
"description": "推送设备客户端标识"
|
||||||
|
},
|
||||||
|
"imei": {
|
||||||
|
"bsonType": "string",
|
||||||
|
"description": "国际移动设备识别码IMEI(International Mobile Equipment Identity)"
|
||||||
|
},
|
||||||
|
"oaid": {
|
||||||
|
"bsonType": "string",
|
||||||
|
"description": "移动智能设备标识公共服务平台提供的匿名设备标识符(OAID)"
|
||||||
|
},
|
||||||
|
"idfa": {
|
||||||
|
"bsonType": "string",
|
||||||
|
"description": "iOS平台配置应用使用广告标识(IDFA)"
|
||||||
|
},
|
||||||
|
"imsi": {
|
||||||
|
"bsonType": "string",
|
||||||
|
"description": "国际移动用户识别码(International Mobile Subscriber Identification Number)"
|
||||||
|
},
|
||||||
|
"model": {
|
||||||
|
"bsonType": "string",
|
||||||
|
"description": "设备型号"
|
||||||
|
},
|
||||||
|
"platform": {
|
||||||
|
"bsonType": "string",
|
||||||
|
"description": "平台类型"
|
||||||
|
},
|
||||||
|
"uni_platform": {
|
||||||
|
"bsonType": "string",
|
||||||
|
"description": "uni-app 运行平台,与条件编译平台相同。"
|
||||||
|
},
|
||||||
|
"os_name": {
|
||||||
|
"bsonType": "string",
|
||||||
|
"description": "ios|android|windows|mac|linux "
|
||||||
|
},
|
||||||
|
"os_version": {
|
||||||
|
"bsonType": "string",
|
||||||
|
"description": "操作系统版本号 "
|
||||||
|
},
|
||||||
|
"os_language": {
|
||||||
|
"bsonType": "string",
|
||||||
|
"description": "操作系统语言 "
|
||||||
|
},
|
||||||
|
"os_theme": {
|
||||||
|
"bsonType": "string",
|
||||||
|
"description": "操作系统主题 light|dark"
|
||||||
|
},
|
||||||
|
"pixel_ratio": {
|
||||||
|
"bsonType": "string",
|
||||||
|
"description": "设备像素比 "
|
||||||
|
},
|
||||||
|
"network_model": {
|
||||||
|
"bsonType": "string",
|
||||||
|
"description": "设备网络型号wifi/3G/4G/"
|
||||||
|
},
|
||||||
|
"window_width": {
|
||||||
|
"bsonType": "string",
|
||||||
|
"description": "设备窗口宽度 "
|
||||||
|
},
|
||||||
|
"window_height": {
|
||||||
|
"bsonType": "string",
|
||||||
|
"description": "设备窗口高度"
|
||||||
|
},
|
||||||
|
"screen_width": {
|
||||||
|
"bsonType": "string",
|
||||||
|
"description": "设备屏幕宽度"
|
||||||
|
},
|
||||||
|
"screen_height": {
|
||||||
|
"bsonType": "string",
|
||||||
|
"description": "设备屏幕高度"
|
||||||
|
},
|
||||||
|
"rom_name": {
|
||||||
|
"bsonType": "string",
|
||||||
|
"description": "rom 名称"
|
||||||
|
},
|
||||||
|
"rom_version": {
|
||||||
|
"bsonType": "string",
|
||||||
|
"description": "rom 版本"
|
||||||
|
},
|
||||||
|
"location_latitude": {
|
||||||
|
"bsonType": "double",
|
||||||
|
"description": "纬度"
|
||||||
|
},
|
||||||
|
"location_longitude": {
|
||||||
|
"bsonType": "double",
|
||||||
|
"description": "经度"
|
||||||
|
},
|
||||||
|
"location_country": {
|
||||||
|
"bsonType": "string",
|
||||||
|
"description": "国家"
|
||||||
|
},
|
||||||
|
"location_province": {
|
||||||
|
"bsonType": "string",
|
||||||
|
"description": "省份"
|
||||||
|
},
|
||||||
|
"location_city": {
|
||||||
|
"bsonType": "string",
|
||||||
|
"description": "城市"
|
||||||
|
},
|
||||||
|
"create_date": {
|
||||||
|
"bsonType": "timestamp",
|
||||||
|
"description": "创建时间",
|
||||||
|
"forceDefaultValue": {
|
||||||
|
"$env": "now"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"last_update_date": {
|
||||||
|
"bsonType": "timestamp",
|
||||||
|
"description": "最后一次修改时间",
|
||||||
|
"forceDefaultValue": {
|
||||||
|
"$env": "now"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"version": "0.0.1"
|
||||||
|
}
|
26
uniCloud-aliyun/database/opendb-tempdata.schema.json
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
"bsonType": "object",
|
||||||
|
"required": [
|
||||||
|
"value",
|
||||||
|
"expired"
|
||||||
|
],
|
||||||
|
"permission": {
|
||||||
|
"read": false,
|
||||||
|
"create": false,
|
||||||
|
"update": false,
|
||||||
|
"delete": false
|
||||||
|
},
|
||||||
|
"properties": {
|
||||||
|
"_id": {
|
||||||
|
"description": "ID,系统自动生成"
|
||||||
|
},
|
||||||
|
"value": {
|
||||||
|
"description": "值"
|
||||||
|
},
|
||||||
|
"expired": {
|
||||||
|
"description": "过期时间",
|
||||||
|
"bsonType": "timestamp"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"version": "0.0.1"
|
||||||
|
}
|
38
uniCloud-aliyun/database/uni-id-device.index.json
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"IndexName": "device_id",
|
||||||
|
"MgoKeySchema": {
|
||||||
|
"MgoIndexKeys": [
|
||||||
|
{
|
||||||
|
"Name": "device_id",
|
||||||
|
"Direction": "1"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"MgoIsUnique": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"IndexName": "oaid",
|
||||||
|
"MgoKeySchema": {
|
||||||
|
"MgoIndexKeys": [
|
||||||
|
{
|
||||||
|
"Name": "oaid",
|
||||||
|
"Direction": "1"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"MgoIsUnique": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"IndexName": "imei",
|
||||||
|
"MgoKeySchema": {
|
||||||
|
"MgoIndexKeys": [
|
||||||
|
{
|
||||||
|
"Name": "imei",
|
||||||
|
"Direction": "1"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"MgoIsUnique": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
87
uniCloud-aliyun/database/uni-id-device.schema.json
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
{
|
||||||
|
"bsonType": "object",
|
||||||
|
"required": [
|
||||||
|
"user_id"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"_id": {
|
||||||
|
"description": "ID,系统自动生成"
|
||||||
|
},
|
||||||
|
"user_id": {
|
||||||
|
"bsonType": "string",
|
||||||
|
"description": "用户id,参考uni-id-users表"
|
||||||
|
},
|
||||||
|
"ua": {
|
||||||
|
"bsonType": "string",
|
||||||
|
"description": "userAgent"
|
||||||
|
},
|
||||||
|
"uuid": {
|
||||||
|
"bsonType": "string",
|
||||||
|
"description": "设备唯一标识(需要加密存储)"
|
||||||
|
},
|
||||||
|
"os_name": {
|
||||||
|
"bsonType": "string",
|
||||||
|
"description": "ios|android|windows|mac|linux "
|
||||||
|
},
|
||||||
|
"os_version": {
|
||||||
|
"bsonType": "string",
|
||||||
|
"description": "操作系统版本号 "
|
||||||
|
},
|
||||||
|
"os_language": {
|
||||||
|
"bsonType": "string",
|
||||||
|
"description": "操作系统语言 "
|
||||||
|
},
|
||||||
|
"os_theme": {
|
||||||
|
"bsonType": "string",
|
||||||
|
"description": "操作系统主题 light|dark"
|
||||||
|
},
|
||||||
|
"vendor": {
|
||||||
|
"bsonType": "string",
|
||||||
|
"description": "设备厂商"
|
||||||
|
},
|
||||||
|
"push_clientid": {
|
||||||
|
"bsonType": "string",
|
||||||
|
"description": "推送设备客户端标识"
|
||||||
|
},
|
||||||
|
"device_id": {
|
||||||
|
"bsonType": "string",
|
||||||
|
"description": "设备id"
|
||||||
|
},
|
||||||
|
"imei": {
|
||||||
|
"bsonType": "string",
|
||||||
|
"description": "国际移动设备识别码IMEI(International Mobile Equipment Identity)"
|
||||||
|
},
|
||||||
|
"oaid": {
|
||||||
|
"bsonType": "string",
|
||||||
|
"description": "移动智能设备标识公共服务平台提供的匿名设备标识符(OAID)"
|
||||||
|
},
|
||||||
|
"idfa": {
|
||||||
|
"bsonType": "string",
|
||||||
|
"description": "iOS平台配置应用使用广告标识(IDFA)"
|
||||||
|
},
|
||||||
|
"model": {
|
||||||
|
"bsonType": "string",
|
||||||
|
"description": "设备型号"
|
||||||
|
},
|
||||||
|
"platform": {
|
||||||
|
"bsonType": "string",
|
||||||
|
"description": "平台类型"
|
||||||
|
},
|
||||||
|
"create_date": {
|
||||||
|
"bsonType": "timestamp",
|
||||||
|
"description": "创建时间",
|
||||||
|
"forceDefaultValue": {
|
||||||
|
"$env": "now"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"last_active_date": {
|
||||||
|
"bsonType": "timestamp",
|
||||||
|
"description": "最后登录时间"
|
||||||
|
},
|
||||||
|
"last_active_ip": {
|
||||||
|
"bsonType": "string",
|
||||||
|
"description": "最后登录IP"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"version": "0.0.1"
|
||||||
|
}
|