changemain
This commit is contained in:
parent
446498b893
commit
acace8dc21
@ -1,20 +1,20 @@
|
|||||||
const env = 'prod';
|
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.30: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:'http://192.168.88.47:2367/#/'
|
h5Url: 'http://192.168.88.47:2367/#/'
|
||||||
},
|
},
|
||||||
test: {
|
test: {
|
||||||
apiBaseUrl: 'https://warehouse.szjixun.cn/oa_backend',
|
apiBaseUrl: 'https://warehouse.szjixun.cn/oa_backend',
|
||||||
h5Url:'http://114.218.158.24:8042/#/'
|
h5Url: 'http://114.218.158.24:8042/#/'
|
||||||
},
|
},
|
||||||
prod: {
|
prod: {
|
||||||
apiBaseUrl: 'https://oa-a.szjixun.cn/api',
|
apiBaseUrl: 'https://oa-a.szjixun.cn/api',
|
||||||
h5Url:'https://oa-a.szjixun.cn/#/'
|
h5Url: 'https://oa-a.szjixun.cn/#/'
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
const config = configs[env];
|
const config = configs[env];
|
||||||
|
@ -42,52 +42,54 @@ const shareH5 = () => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// import {
|
import {
|
||||||
// registerRequestPermissionTipsListener,
|
registerRequestPermissionTipsListener,
|
||||||
// unregisterRequestPermissionTipsListener,
|
unregisterRequestPermissionTipsListener,
|
||||||
// setRequestPermissionTips
|
setRequestPermissionTips
|
||||||
// } from "@/uni_modules/uni-registerRequestPermissionTips"
|
} from "@/uni_modules/uni-registerRequestPermissionTips"
|
||||||
|
|
||||||
// const PermissionTips = {
|
const PermissionTips = {
|
||||||
// "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.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.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>",
|
||||||
// onExit(() => {
|
"android.permission.ACCESS_COARSE_LOCATION": "<h4 style=\"font-size:40px;\">正在访问位置权限</h4><font color=#cccccc>需要获取您的位置信息,以便您能够进行考勤打卡。</font>"
|
||||||
// unregisterRequestPermissionTipsListener()
|
}
|
||||||
// })
|
onExit(() => {
|
||||||
|
unregisterRequestPermissionTipsListener()
|
||||||
|
})
|
||||||
|
|
||||||
// const brand = uni.getSystemInfoSync().deviceBrand
|
const brand = uni.getSystemInfoSync().deviceBrand
|
||||||
// setRequestPermissionTips(PermissionTips)
|
setRequestPermissionTips(PermissionTips)
|
||||||
// registerRequestPermissionTipsListener({
|
registerRequestPermissionTipsListener({
|
||||||
// onRequest: (e) => {
|
onRequest: (e) => {
|
||||||
// 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 });
|
||||||
|
|
||||||
// // 华为手机在权限禁止之后,再次申请权限不会出现权限申请框。此时应该引导用户去系统设置开启此权限,不应该频繁申请。
|
// 华为手机在权限禁止之后,再次申请权限不会出现权限申请框。此时应该引导用户去系统设置开启此权限,不应该频繁申请。
|
||||||
// if (brand.toLowerCase() === "huawei") {
|
if (brand.toLowerCase() === "huawei") {
|
||||||
// const tips = {}
|
const tips = {}
|
||||||
// let hasDeniedPermission = false
|
let hasDeniedPermission = false
|
||||||
// for (let k in PermissionTips) {
|
for (let k in PermissionTips) {
|
||||||
// if (e[k] !== "denied") {
|
if (e[k] !== "denied") {
|
||||||
// tips[k] = PermissionTips[k]
|
tips[k] = PermissionTips[k]
|
||||||
// } else {
|
} else {
|
||||||
// hasDeniedPermission = true
|
hasDeniedPermission = true
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// setRequestPermissionTips(tips) // 更新弹框提醒,防止华为手机不出现权限申请框时权限提醒框闪烁的情况
|
setRequestPermissionTips(tips) // 更新弹框提醒,防止华为手机不出现权限申请框时权限提醒框闪烁的情况
|
||||||
// if (hasDeniedPermission)
|
if (hasDeniedPermission)
|
||||||
// uni.showModal({
|
uni.showModal({
|
||||||
// content: "权限已经被拒绝,请前往设置中开启"
|
content: "权限已经被拒绝,请前往设置中开启"
|
||||||
// })
|
})
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// })
|
})
|
||||||
const webLoad = (e) => {
|
const webLoad = (e) => {
|
||||||
const message = e.detail.data?.[0] || '';
|
const message = e.detail.data?.[0] || '';
|
||||||
commun.handleMessage(message);
|
commun.handleMessage(message);
|
||||||
|
Loading…
Reference in New Issue
Block a user