Browse Source

加了版本页面

master
unknown 6 days ago
parent
commit
60a8f8fceb
  1. 20
      App - 副本.vue
  2. 47
      App.vue
  3. 40
      manifest.json
  4. 9
      pages.json
  5. 2
      pages/recordEntry/student/studentDetail/comp/info.vue
  6. 45
      pages/userCenter/aboutUs/aboutUs.vue
  7. 8
      pages/userCenter/personaInfo/personaInfo.vue
  8. 8
      pages/userCenter/personaInfo/setLatLng.vue
  9. 2
      pages/userCenter/scanCode/scanCodeSubjiect1.vue
  10. BIN
      static/images/userCenter/minIcon (2).png
  11. 2
      store/modules/user.js
  12. 8
      uni_modules/uni-registerRequestPermissionTips/changelog.md
  13. 115
      uni_modules/uni-registerRequestPermissionTips/package.json
  14. 95
      uni_modules/uni-registerRequestPermissionTips/readme.md
  15. 3
      uni_modules/uni-registerRequestPermissionTips/utssdk/app-android/AndroidManifest.xml
  16. 3
      uni_modules/uni-registerRequestPermissionTips/utssdk/app-android/config.json
  17. 148
      uni_modules/uni-registerRequestPermissionTips/utssdk/app-android/index.uts
  18. 6
      uni_modules/uni-registerRequestPermissionTips/utssdk/app-android/res/anim/popupwindow_enter.xml
  19. 5
      uni_modules/uni-registerRequestPermissionTips/utssdk/app-android/res/anim/popupwindow_exit.xml
  20. 6
      uni_modules/uni-registerRequestPermissionTips/utssdk/app-android/res/drawable/dcloud_permission_background.xml
  21. 19
      uni_modules/uni-registerRequestPermissionTips/utssdk/interface.uts

20
App - 副本.vue

@ -0,0 +1,20 @@
<script>
export default {
onLaunch: function() {
console.log('App Launch')
},
onShow: function() {
console.log('App Show')
},
onHide: function() {
console.log('App Hide')
}
}
</script>
<style lang="scss">
/*每个页面公共css */
@import '@/uni_modules/uview-ui/index.scss';
@import 'common/css/app.scss';
</style>

47
App.vue

@ -1,14 +1,57 @@
<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.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.CALL_PHONE": "<h4 style=\"font-size:40px;\">/</h4><font color=#cccccc>便使</font>"
}
export default {
onLaunch: function() {
console.log('App Launch')
uni.hideTabBar();
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>

40
manifest.json

@ -2,8 +2,8 @@
"name" : "洛阳学车驾校版",
"appid" : "__UNI__3347C6E",
"description" : "",
"versionName" : "1.1.0",
"versionCode" : 110,
"versionName" : "1.1.4",
"versionCode" : 114,
"transformPx" : false,
/* 5+App */
"app-plus" : {
@ -17,7 +17,9 @@
"delay" : 0
},
/* */
"modules" : {},
"modules" : {
"Maps" : {}
},
/* */
"distribute" : {
/* android */
@ -25,6 +27,7 @@
"permissions" : [
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
@ -45,11 +48,24 @@
/* ios */
"ios" : {
"dSYMs" : false,
"idfa" : false
"idfa" : false,
"UIBackgroundModes" : "location",
"privacyDescription" : {
"NSLocationWhenInUseUsageDescription" : "该应用需要读取您的位置,以便学员找到您驾校的具体位置"
}
},
// "NSLocationAlwaysAndWhenInUseUsageDescription" : "该应用需要读取您的位置,以便学员找到您驾校的具体位置"
/* SDK */
"sdkConfigs" : {
"ad" : {}
"ad" : {},
"geolocation" : {},
"maps" : {
"amap" : {
"name" : "amapOV4nNDfa",
"appkey_ios" : "2839b2b14fdcd2983e0d6247ce9baf7a",
"appkey_android" : "3c5fcc5ee6aaba56e4806f3382399c16"
}
}
},
"icons" : {
"android" : {
@ -148,8 +164,8 @@
"proxy" : {
"/api" : {
// "target" : "http://123.6.232.1:8099/",
"target" : "http://192.168.1.106:8318",
// "target" : "http://www.lyjppt.com/",
// "target" : "http://192.168.1.106:8318",
"target" : "http://www.lyjppt.com/",
"changeOrigin" : true,
"secure" : true,
"pathRewrite" : {
@ -163,6 +179,16 @@
"router" : {
"mode" : "hash",
"base" : "/h5"
},
"sdkConfigs" : {
"maps" : {
"qqmap" : {
"key" : "JTOBZ-KLLKQ-S325W-25JZC-JLHEV-WNF5J"
}
}
}
},
"locale" : "auto"
}
/* SDK */

9
pages.json

@ -214,6 +214,15 @@
}
},
{
"path": "aboutUs/aboutUs",
"style": {
"navigationBarTitleText": "签名",
// "navigationStyle": "custom",
"enablePullDownRefresh": false,
"backgroundTextStyle": "dark"
}
},
{
"path": "forgetPwd/forgetPwd",
"style": {
"navigationBarTitleText": "修改密码",

2
pages/recordEntry/student/studentDetail/comp/info.vue

@ -10,7 +10,7 @@
<view class="lab">{{info.sex==1?'男':'女'}}</view>
</view>
<view class="li">
<view class="val">名称</view>
<view class="val">名称</view>
<view class="lab">{{info.schoolName}}</view>
</view>
<view class="li">

45
pages/userCenter/aboutUs/aboutUs.vue

@ -0,0 +1,45 @@
<template>
<view class="main">
<view class="logo">
<image src="@/static/images/userCenter/minIcon (2).png" mode="widthFix"></image>
</view>
<view class="text">
版本号 {{version}}
</view>
</view>
</template>
<script >
export default {
data() {
return {
version: '1.0.0'
}
},
onLoad() {
// #ifdef APP-PLUS
this.version = plus.runtime.version
// #endif
}
}
</script>
<style lang="scss" scoped>
.main {
padding: 230rpx 0 0 0;
.logo {
display: flex;
justify-content: center;
image {
display: block;
width: 120rpx;
}
}
.text {
margin-top: 20rpx;
font-size: 32rpx;
color: #666;
text-align: center;
}
}
</style>

8
pages/userCenter/personaInfo/personaInfo.vue

@ -40,8 +40,14 @@
<view class="val"><u-icon name="arrow-right" color="#999" size="18"></u-icon></view>
</view>
</view>
<!-- v-if="identity=='校长'" -->
<view class="card">
<view class="row" @click="$goPage('/pages/userCenter/aboutUs/aboutUs')">
<view class="lab">关于我们</view>
<view class="val"><u-icon name="arrow-right" color="#999" size="18"></u-icon></view>
</view>
</view>
<!-- v-if="identity=='校长'" -->
<view class="card" v-if="identity=='校长'" >
<view class="row" @click="$goPage('/pages/userCenter/personaInfo/setLatLng')" >
<view class="lab">更新驾校经纬度</view>
<view class="val"><u-icon name="arrow-right" color="#999" size="18"></u-icon></view>

8
pages/userCenter/personaInfo/setLatLng.vue

@ -6,7 +6,7 @@
<view class="adr" v-if="vuex_cityInfo.city" @click="getLatLngFn">{{vuex_cityInfo.city}} <text v-if="vuex_cityInfo.name"> / {{vuex_cityInfo.name}}</text></view>
<view class="adr" v-else @click="getLatLngFn" style="display: flex;align-items: center;">
<text>获取定位信息</text>
<image src="@/static/images/index/down.png" mode="" style="width: 18rpx;height: 18rpx;margin-left: 6rpx;"></image>
<!-- <image src="@/static/images/index/down.png" mode="" style="width: 18rpx;height: 18rpx;margin-left: 6rpx;"></image> -->
</view>
<view class="adrsIcon">
<image src="@/static/images/index/down.png" mode=""></image>
@ -57,8 +57,10 @@
})
},
async setLngLatFn() {
const res = await setLngLat({longitude: this.vuex_cityInfo.lng, latitude: this.vuex_cityInfo.lat})
console.log(res)
let obj = {longitude: this.vuex_cityInfo.lng, latitude: this.vuex_cityInfo.lat}
console.log(obj, '参数')
const res = await setLngLat(obj)
this.$u.toast('更新经纬度成功')
}
}
}

2
pages/userCenter/scanCode/scanCodeSubjiect1.vue

@ -6,7 +6,7 @@
<view class="adr" v-if="vuex_cityInfo.city" @click="getLatLngFn">{{vuex_cityInfo.city}} <text v-if="vuex_cityInfo.name"> / {{vuex_cityInfo.name}}</text></view>
<view class="adr" v-else @click="getLatLngFn" style="display: flex;align-items: center;">
<text>获取定位信息</text>
<image src="@/static/images/index/down.png" mode="" style="width: 18rpx;height: 18rpx;margin-left: 6rpx;"></image>
<!-- <image src="@/static/images/index/down.png" mode="" style="width: 18rpx;height: 18rpx;margin-left: 6rpx;"></image> -->
</view>
<view class="adrsIcon">
<image src="@/static/images/index/down.png" mode=""></image>

BIN
static/images/userCenter/minIcon (2).png

After

Width: 54  |  Height: 51  |  Size: 2.3 KiB

2
store/modules/user.js

@ -2,7 +2,7 @@
const user = {
state: {
identity: uni.getStorageSync('identity')?uni.getStorageSync('identity'):'理论教练',
identity: uni.getStorageSync('identity')?uni.getStorageSync('identity'):'实操教练',
vuex_cityInfo: uni.getStorageSync('vuex_cityInfo') ? uni.getStorageSync('vuex_cityInfo') : {city: ''},
vuex_userInfo: uni.getStorageSync('vuex_userInfo') ? uni.getStorageSync('vuex_userInfo') : {user:{}},
vuex_loginInfo: uni.getStorageSync('vuex_loginInfo') ? uni.getStorageSync('vuex_loginInfo') : {},

8
uni_modules/uni-registerRequestPermissionTips/changelog.md

@ -0,0 +1,8 @@
## 1.0.3(2024-10-18)
修复4.25版引起的插件回调只触发一次的问题。
## 1.0.2(2024-09-05)
修复uni.chooseImage或者其他部分情况下弹窗不显示的bug。
## 1.0.1(2024-05-30)
修复云打包可能报错的bug
## 1.0.0(2024-03-09)
支持全局监听权限申请。当申请权限时,会在页面顶部显示申请权限的目的。

115
uni_modules/uni-registerRequestPermissionTips/package.json

@ -0,0 +1,115 @@
{
"id": "uni-registerRequestPermissionTips",
"displayName": "uni-registerRequestPermissionTips",
"version": "1.0.3",
"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",
"app-harmony": "u"
},
"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"
}
}
}
}
}

95
uni_modules/uni-registerRequestPermissionTips/readme.md

@ -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>
```

3
uni_modules/uni-registerRequestPermissionTips/utssdk/app-android/AndroidManifest.xml

@ -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>

3
uni_modules/uni-registerRequestPermissionTips/utssdk/app-android/config.json

@ -0,0 +1,3 @@
{
"minSdkVersion": "21"
}

148
uni_modules/uni-registerRequestPermissionTips/utssdk/app-android/index.uts

@ -0,0 +1,148 @@
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';
import Runnable from "java.lang.Runnable"
let PermissionTipsView : View | null = null
let permissionTips : HashMap<String, String> = new HashMap<String, String>()
var permissionListener : RequestPermissionListener | null = null
var listener : RequestPermissionTipsListener | null = null
@UTSJS.keepAlive
export function unregisterRequestPermissionTipsListener(e : 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
}
}
@UTSJS.keepAlive
export function 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>) => {
UTSAndroid.getUniActivity()!.runOnUiThread(new ConfirmRunnable(permissions))
})
permissionListener!.onComplete((permissions : Array<string>) => {
UTSAndroid.getUniActivity()!.runOnUiThread(new CompleteRunnable(permissions))
})
}
}
class ConfirmRunnable implements Runnable {
permissions : Array<string>
constructor(permissions : Array<string>) {
this.permissions = permissions
}
override run() {
let activity = UTSAndroid.getUniActivity()!
if (PermissionTipsView != null && PermissionTipsView!.getParent() != null) {
PermissionTipsView!.setAnimation(null);
((PermissionTipsView!.getParent()) as ViewGroup).removeView(PermissionTipsView)
}
if (this.permissions.length > 0) {
try {
PermissionTipsView = createPermissionWindow(activity, this.permissions);
if (PermissionTipsView != null) {
(activity.findViewById(android.R.id.content) as ViewGroup).addView(PermissionTipsView!)
}
} catch (e) {
console.log(e)
}
}
if (listener != null)
listener!.onConfirm?.invoke(this.permissions)
}
}
class CompleteRunnable implements Runnable {
permissions : Array<string>
constructor(permissions : Array<string>) {
this.permissions = permissions
}
override run() {
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 this.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 * 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() * 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;
}
function getScale() : Float {
if (UTSAndroid.getUniActivity() != null) {
return UTSAndroid.getUniActivity()!.resources.displayMetrics.scaledDensity
}
return (0 as number).toFloat();
}

6
uni_modules/uni-registerRequestPermissionTips/utssdk/app-android/res/anim/popupwindow_enter.xml

@ -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>

5
uni_modules/uni-registerRequestPermissionTips/utssdk/app-android/res/anim/popupwindow_exit.xml

@ -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%" />

6
uni_modules/uni-registerRequestPermissionTips/utssdk/app-android/res/drawable/dcloud_permission_background.xml

@ -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>

19
uni_modules/uni-registerRequestPermissionTips/utssdk/interface.uts

@ -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
}
Loading…
Cancel
Save