From 1028757ea63aabb7800e6dc24739058efc9dba00 Mon Sep 17 00:00:00 2001 From: abu <3109389044@qq.com> Date: Tue, 20 May 2025 10:58:51 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9A=90=E7=A7=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 52 +- config/api.js | 19 +- manifest.json | 489 +++++++++--------- .../utssdk/app-android/config.json | 54 +- utils/huawei_describe.js | 5 +- 5 files changed, 334 insertions(+), 285 deletions(-) diff --git a/App.vue b/App.vue index 766afca7..e0fdcc0f 100644 --- a/App.vue +++ b/App.vue @@ -95,13 +95,9 @@ export default { }, methods: { onRequestPermissionListener() { - // #ifdef APP - // 权限监听申请 - // 为应用市场审核时要求:APP在调用终端权限时,应同步告知用户申请该权限的目的。此时即可使用本API,在app.vue里全局监听。 - var brand = uni.getSystemInfoSync().deviceBrand; - if (brand.toLowerCase() != 'huawei' && brand.toLowerCase() != 'xiaomi') return; this.permissionListener = uni.createRequestPermissionListener(); this.permissionListener.onRequest(async (e) => { + console.log(e); if (this.flag) { return; } @@ -135,12 +131,56 @@ export default { this.flag = false; }, 5000); }); + + // #ifndef APP-HARMONY + // 权限监听申请 + // 为应用市场审核时要求:APP在调用终端权限时,应同步告知用户申请该权限的目的。此时即可使用本API,在app.vue里全局监听。 + // var brand = uni.getSystemInfoSync().deviceBrand; + // if (brand.toLowerCase() == 'huawei' && brand.toLowerCase() == 'xiaomi') { + // this.permissionListener = uni.createRequestPermissionListener(); + // this.permissionListener.onRequest(async (e) => { + // console.log(e); + // if (this.flag) { + // return; + // } + // this.flag = true; + // console.log('权限-1', e); + // var item = e[0]; + // const { isSuc, msg } = await requestPermissions({ + // title: PermissionTips[item].title, // 申请权限时弹出框标题 + // content: PermissionTips[item].content, // 申请权限时弹出框内容 + // permissionID: item // 权限ID + // }); + // console.log(msg); + // if (!isSuc) { + // if (msg != 'close') { + // this.popupView = showModal({ + // title: PermissionTips[item].title, // 申请权限时弹出框标题 + // content: PermissionTips[item].content, // 申请权限时弹出框内容 + // permissionID: item // 权限ID + // }); + // } else { + // console.log('用户永久拒绝'); + // } + // } + // }); + // this.permissionListener.onComplete((e) => { + // console.log('权限-2', e); + // if (this.popupView) { + // this.popupView.close(); + // } + // setTimeout(() => { + // this.flag = false; + // }, 5000); + // }); + // } + // #endif + // 权限检测成功则返回 { isSuc : true} ,未授权则弹出权限询问弹窗以及权限说明窗口 // if (!isSuc) { // return false // } - // #endif }, hanleTabCenter() { // 点击中间的➕ diff --git a/config/api.js b/config/api.js index 000b664f..67ba138c 100644 --- a/config/api.js +++ b/config/api.js @@ -14,21 +14,24 @@ const dev = { vlog: "http://43.143.227.203:8099", web: "http://43.143.227.203:8099", seller: "http://43.143.227.203:8889", + // common: "http://192.168.1.40:8890", + // buyer: "http://192.168.1.40:8888", + // vlog: "http://192.168.1.40:8099", + // web: "http://192.168.1.40:8099", + // seller: "http://192.168.1.40:8889", }; // 生产环境 const prod = { - // common: "http://192.168.1.211:8890", - // buyer: "http://192.168.1.211:8888", - // vlog: "http://192.168.1.211:8099", - // web: "http://192.168.1.211:8099", - // seller: "http://192.168.1.211:8889", - // common: "http://192.168.1.211:8890", - // buyer: "http://192.168.1.211:8888", + // common: "http://192.168.1.40:8890", + // buyer: "http://192.168.1.40:8888", + // vlog: "http://192.168.1.40:8099", + // web: "http://192.168.1.40:8099", + // seller: "http://192.168.1.40:8889", + common: "http://43.143.227.203:8890", buyer: "http://43.143.227.203:8888", vlog: "http://43.143.227.203:8099", - // vlog: "http://192.168.1.86:8099", web: "http://43.143.227.203:8099", seller: "http://43.143.227.203:8889", }; diff --git a/manifest.json b/manifest.json index 1fda1ce1..2a77da7b 100644 --- a/manifest.json +++ b/manifest.json @@ -1,244 +1,245 @@ -{ - "name": "无终街", - "appid": "__UNI__6DB512D", - "description": "admin", - "versionName": "4.0.0", - "versionCode": 404, - "sassImplementationName" : "node-sass", - "transformPx": false, - "app-plus": { - "android": { - "versionCode": 404, // Android 版本号 - "versionName": "4.0.0" // 用户看到的版本号 - }, - "compatible": { - "ignoreVersion": true //true表示忽略版本检查提示框,HBuilderX1.9.0及以上版本支持 - }, - "nvueStyleCompiler": "uni-app", - "compilerVersion": 3, - /* 5+App特有相关 */ - "usingComponents": true, - "splashscreen": { - "alwaysShowBeforeRender": true, - "waiting": true, - "autoclose": true, - "delay": 0 - }, - "screenOrientation": ["portrait-primary"], - "modules": { - "Payment": {}, - "Share": {}, - "Geolocation": {}, - "Maps": {}, - "Camera": {}, - "Barcode": {}, - "VideoPlayer": {}, - "Push": {}, - "OAuth": {} - }, - "error": { - /* 404错误页面*/ - "url": "hybrid/html/error.html" - }, - /* 模块配置 */ - "distribute": { - /* 应用发布信息 */ - "android": { - /* android打包配置 */ - "permissions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ], - "abiFilters": ["arm64-v8a"], - "schemes": "wuzhongjie", - "minSdkVersion": 30, - "targetSdkVersion": 34 - }, - "ios": { - "idfa": false, - "privacyDescription": { - "NSPhotoLibraryUsageDescription": "需要用与评论上传,头像上传功能", - "NSPhotoLibraryAddUsageDescription": "保存商品图片到本地", - "NSCameraUsageDescription": "需要用与扫描二维码和商品评论图片拍摄", - "NSLocationAlwaysAndWhenInUseUsageDescription": "可根据位置向您介绍附近的视频信息,提升浏览体验,或帮助你在发布的信息中展示位置,不授权不影响app正常使用", - "NSMicrophoneUsageDescription": "用户上传视频时需使用音频信息" - }, - "capabilities": { - "entitlements": { - "com.apple.developer.associated-domains": ["applinks:wuzhongjie.com.cn"] - } - }, - "urltypes": "wuzhongjie", - "dSYMs": false - }, - /* ios打包配置 */ - "sdkConfigs": { - "payment": { - "weixin": { - "__platform__": ["ios", "android"], - "appid": "wxebcdaea31881caab", - "UniversalLinks": "https://wuzhongjie.com.cn/ulink/" - }, - "alipay": { - "__platform__": ["ios", "android"] - } - }, - "ad": {}, - "share": { - "weixin": { - "appid": "wxebcdaea31881caab", - "UniversalLinks": "https://wuzhongjie.com.cn/ulink/" - } - }, - "oauth": { - "weixin": { - "appid": "wxebcdaea31881caab", - "UniversalLinks": "https://wuzhongjie.com.cn/ulink/" - } - }, - "geolocation": { - "amap": { - "__platform__": ["ios", "android"], - "appkey_ios": "f463d3350efe63f8be5d9a62f24d0aab", - "appkey_android": "fb3f1ccb34616c70f068aa950f3e27df" - }, - "system": { - "__platform__": ["ios", "android"] - } - }, - "maps": { - "amap": { - "appkey_ios": "f463d3350efe63f8be5d9a62f24d0aab", - "appkey_android": "fb3f1ccb34616c70f068aa950f3e27df" - } - }, - "push": {} - }, - "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": { - "iosStyle": "common", - "ios": { - "storyboard": "CustomStoryboard.zip" - }, - "androidStyle": "default", - "android": { - "hdpi": "CustomStartPage/start-page.9.png", - "xhdpi": "CustomStartPage/start-page.9.png", - "xxhdpi": "CustomStartPage/start-page.9.png" - }, - "useOriginalMsgbox": true - } - }, - "nativePlugins": {} - }, - "permission": { - "scope.userLocation": { - "desc": "你的位置信息将用于高德地图的效果展示" - } - }, - /* SDK配置 */ - "quickapp": {}, - /* 快应用特有相关 */ - "mp-weixin": { - /* 小程序特有相关 */ - "usingComponents": true, - "appid": "wx6f10f29075dc1b0b", - "optimization": { - "subPackages": true - }, - "setting": { - "urlCheck": false, - "minified": true, - "postcss": false, - "es6": true - }, - "permission": { - "scope.userLocation": { - "desc": "位置信息将用于高德地图的效果展示" - } - }, - "plugins": { - "myPlugin": { - "version": "1.1.0", - "provider": "wx738958e0f4c894f9" - }, - "live-player-plugin": { - "version": "1.3.0", - "provider": "wx2b03c6e691cd7370" - } - } - }, - "h5": { - "devServer": { - "disableHostCheck": true - }, - "router": { - "mode": "history", - "base": "" - }, - "sdkConfigs": { - "maps": {} - }, - "optimization": { - "treeShaking": { - "enable": true - } - }, - "title": "lilishop", - "template": "" - } -} \ No newline at end of file +{ + "name" : "无终街", + "appid" : "__UNI__6DB512D", + "description" : "admin", + "versionName" : "4.0.0", + "versionCode" : 404, + "transformPx" : false, + "sassImplementationName" : "node-sass", + "app-plus" : { + "android" : { + "versionCode" : 404, // Android 版本号 + "versionName" : "4.0.0" // 用户看到的版本号 + }, + "compatible" : { + "ignoreVersion" : true //true表示忽略版本检查提示框,HBuilderX1.9.0及以上版本支持 + }, + "nvueStyleCompiler" : "uni-app", + "compilerVersion" : 3, + /* 5+App特有相关 */ + "usingComponents" : true, + "splashscreen" : { + "alwaysShowBeforeRender" : true, + "waiting" : true, + "autoclose" : true, + "delay" : 0 + }, + "screenOrientation" : [ "portrait-primary" ], + "modules" : { + "Payment" : {}, + "Share" : {}, + "Geolocation" : {}, + "Maps" : {}, + "Camera" : {}, + "Barcode" : {}, + "VideoPlayer" : {}, + "Push" : {}, + "OAuth" : {} + }, + "error" : { + /* 404错误页面*/ + "url" : "hybrid/html/error.html" + }, + /* 模块配置 */ + "distribute" : { + /* 应用发布信息 */ + "android" : { + /* android打包配置 */ + "permissions" : [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ], + "schemes" : "wuzhongjie", + "minSdkVersion" : 21, + "targetSdkVersion" : 34 + }, + "ios" : { + "idfa" : false, + "privacyDescription" : { + "NSPhotoLibraryUsageDescription" : "需要用与评论上传,头像上传功能", + "NSPhotoLibraryAddUsageDescription" : "保存商品图片到本地", + "NSCameraUsageDescription" : "需要用与扫描二维码和商品评论图片拍摄", + "NSLocationAlwaysAndWhenInUseUsageDescription" : "可根据位置向您介绍附近的视频信息,提升浏览体验,或帮助你在发布的信息中展示位置,不授权不影响app正常使用", + "NSMicrophoneUsageDescription" : "用户上传视频时需使用音频信息" + }, + "capabilities" : { + "entitlements" : { + "com.apple.developer.associated-domains" : [ "applinks:wuzhongjie.com.cn" ] + } + }, + "urltypes" : "wuzhongjie", + "dSYMs" : false + }, + /* ios打包配置 */ + "sdkConfigs" : { + "payment" : { + "weixin" : { + "__platform__" : [ "ios", "android" ], + "appid" : "wxebcdaea31881caab", + "UniversalLinks" : "https://wuzhongjie.com.cn/ulink/" + }, + "alipay" : { + "__platform__" : [ "ios", "android" ] + } + }, + "ad" : {}, + "share" : { + "weixin" : { + "appid" : "wxebcdaea31881caab", + "UniversalLinks" : "https://wuzhongjie.com.cn/ulink/" + } + }, + "oauth" : { + "weixin" : { + "appid" : "wxebcdaea31881caab", + "UniversalLinks" : "https://wuzhongjie.com.cn/ulink/" + }, + "apple" : {} + }, + "geolocation" : { + "amap" : { + "__platform__" : [ "ios", "android" ], + "appkey_ios" : "f463d3350efe63f8be5d9a62f24d0aab", + "appkey_android" : "fb3f1ccb34616c70f068aa950f3e27df" + }, + "system" : { + "__platform__" : [ "ios", "android" ] + } + }, + "maps" : { + "amap" : { + "appkey_ios" : "f463d3350efe63f8be5d9a62f24d0aab", + "appkey_android" : "fb3f1ccb34616c70f068aa950f3e27df" + } + }, + "push" : {} + }, + "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" : { + "iosStyle" : "common", + "ios" : { + "storyboard" : "CustomStoryboard.zip" + }, + "androidStyle" : "default", + "android" : { + "hdpi" : "CustomStartPage/start-page.9.png", + "xhdpi" : "CustomStartPage/start-page.9.png", + "xxhdpi" : "CustomStartPage/start-page.9.png" + }, + "useOriginalMsgbox" : true + } + }, + "nativePlugins" : {} + }, + "permission" : { + "scope.userLocation" : { + "desc" : "你的位置信息将用于高德地图的效果展示" + } + }, + /* SDK配置 */ + "quickapp" : {}, + /* 快应用特有相关 */ + "mp-weixin" : { + /* 小程序特有相关 */ + "usingComponents" : true, + "appid" : "wx6f10f29075dc1b0b", + "optimization" : { + "subPackages" : true + }, + "setting" : { + "urlCheck" : false, + "minified" : true, + "postcss" : false, + "es6" : true + }, + "permission" : { + "scope.userLocation" : { + "desc" : "位置信息将用于高德地图的效果展示" + } + }, + "plugins" : { + "myPlugin" : { + "version" : "1.1.0", + "provider" : "wx738958e0f4c894f9" + }, + "live-player-plugin" : { + "version" : "1.3.0", + "provider" : "wx2b03c6e691cd7370" + } + } + }, + "h5" : { + "devServer" : { + "disableHostCheck" : true + }, + "router" : { + "mode" : "history", + "base" : "" + }, + "sdkConfigs" : { + "maps" : {} + }, + "optimization" : { + "treeShaking" : { + "enable" : true + } + }, + "title" : "lilishop", + "template" : "" + } +} diff --git a/uni_modules/TencentCloud-Push/utssdk/app-android/config.json b/uni_modules/TencentCloud-Push/utssdk/app-android/config.json index a2340f55..ff8cfffd 100644 --- a/uni_modules/TencentCloud-Push/utssdk/app-android/config.json +++ b/uni_modules/TencentCloud-Push/utssdk/app-android/config.json @@ -1,27 +1,29 @@ -{ - "minSdkVersion": "21", - "dependencies": [ - "com.google.android.material:material:1.3.0", - "com.google.code.gson:gson:2.9.1", - "commons-codec:commons-codec:1.15", - "com.github.bumptech.glide:glide:4.12.0", - "com.tencent.timpush:timpush:8.5.6864", - "com.tencent.liteav.tuikit:tuicore:8.5.6864", - "com.tencent.timpush:huawei:8.5.6864", - "com.tencent.timpush:xiaomi:8.5.6864", - "com.tencent.timpush:oppo:8.5.6864", - "com.tencent.timpush:meizu:8.5.6864", - "com.tencent.timpush:fcm:8.5.6864" - ], - "project": { - "plugins": [ - "com.huawei.agconnect", - "com.hihonor.mcs.asplugin" - ], - "dependencies": [ - "com.huawei.agconnect:agcp:1.9.1.301", - "com.google.gms:google-services:4.3.15", - "com.hihonor.mcs:asplugin:2.0.1.300" - ] - } +{ + "minSdkVersion": "21", + "dependencies": [ + "com.google.android.material:material:1.3.0", + "com.google.code.gson:gson:2.9.1", + "commons-codec:commons-codec:1.15", + "com.github.bumptech.glide:glide:4.12.0", + "com.tencent.timpush:timpush:8.5.6864", + "com.tencent.liteav.tuikit:tuicore:8.5.6864", + "com.tencent.timpush:huawei:8.5.6864", + "com.tencent.timpush:xiaomi:8.5.6864", + "com.tencent.timpush:oppo:8.5.6864", + "com.tencent.timpush:meizu:8.5.6864", + "com.tencent.timpush:fcm:8.5.6864", + "com.tencent.timpush:honor:8.5.6864", + "com.tencent.timpush:vivo:8.5.6864" + ], + "project": { + "plugins": [ + "com.huawei.agconnect", + "com.hihonor.mcs.asplugin" + ], + "dependencies": [ + "com.huawei.agconnect:agcp:1.9.1.301", + "com.google.gms:google-services:4.3.15", + "com.hihonor.mcs:asplugin:2.0.1.300" + ] + } } \ No newline at end of file diff --git a/utils/huawei_describe.js b/utils/huawei_describe.js index 89bf8e5a..eed117f8 100644 --- a/utils/huawei_describe.js +++ b/utils/huawei_describe.js @@ -7,7 +7,10 @@ export const PermissionTips = { "android.permission.READ_EXTERNAL_STORAGE": { title: '正在获取相册权限', content: '为了您使用相机拍摄,并在评论、传头像等功能使用所拍摄的照片,我们需要访问您终端设备的摄像头权限和相册权限,如果您拒绝或关闭本项权限,我们将无法提供上述服务。' - + }, + "android.permission.READ_MEDIA_IMAGES": { + title: '正在获取相册权限', + content: '为了您使用相机拍摄,并在评论、传头像等功能使用所拍摄的照片,我们需要访问您终端设备的摄像头权限和相册权限,如果您拒绝或关闭本项权限,我们将无法提供上述服务。' }, "android.permission.CAMERA": { title: '正在获取摄像头权限',