From 2542af9d06be7e537cdc2b3f97c4e47e66cc483d Mon Sep 17 00:00:00 2001 From: Iruka <1017819588@qq.com> Date: Tue, 14 Jan 2025 12:31:59 +0800 Subject: [PATCH] . --- manifest.json | 3 +- pages/index.vue | 22 ++++++------- pages/mine/avatar/index.vue | 12 +++++-- pages/mine/index.vue | 10 +++--- pages/work/user/index.vue | 62 ++++++++++++++++++++++++++++--------- 5 files changed, 76 insertions(+), 33 deletions(-) diff --git a/manifest.json b/manifest.json index b57e1f0..8037e81 100644 --- a/manifest.json +++ b/manifest.json @@ -45,7 +45,8 @@ "", "", "", - "" + "", + "" ], "abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ], "minSdkVersion" : 21, diff --git a/pages/index.vue b/pages/index.vue index be14195..62dfabe 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -640,17 +640,17 @@ }, // 去扫码 async toQRCode() { - // 权限检测成功则返回 { isSuc : true} ,未授权则弹出权限询问弹窗以及权限说明窗口 - const { - isSuc - } = await requestPermissions({ - title: "相机/摄像头权限申请说明", // 申请权限时弹出框标题 - content: "便于您使用该功能扫描设备二维码,查看设备信息", // 申请权限时弹出框内容 - permissionID: "CAMERA" // 权限ID - }) - if (!isSuc) { - return false - } + // // 权限检测成功则返回 { isSuc : true} ,未授权则弹出权限询问弹窗以及权限说明窗口 + // const { + // isSuc + // } = await requestPermissions({ + // title: "相机/摄像头权限申请说明", // 申请权限时弹出框标题 + // content: "便于您使用该功能扫描设备二维码,查看设备信息", // 申请权限时弹出框内容 + // permissionID: "CAMERA" // 权限ID + // }) + // if (!isSuc) { + // return false + // } var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module") mpaasScanModule.mpaasScan({ diff --git a/pages/mine/avatar/index.vue b/pages/mine/avatar/index.vue index d143616..990b33c 100644 --- a/pages/mine/avatar/index.vue +++ b/pages/mine/avatar/index.vue @@ -56,6 +56,14 @@ uploadAvatar, uploadAvatarForUser } from "@/api/system/user" + // 引入插件包 + import { + requestPermissions + } from "@/js_sdk/yu-app-permission/yu-app-permission.js" + // 前往设置页面 兼容安卓以及IOS + import { + goSetting + } from "@/js_sdk/yu-app-permission/yu-app-permission.js" const baseUrl = config.baseUrl let sysInfo = uni.getSystemInfoSync() @@ -124,7 +132,7 @@ if (options && options.userId) { this.userId = options.userId; this.imageSrc = options.avatar; - }else{ + } else { this.imageSrc = store.getters.avatar; } }, @@ -135,7 +143,7 @@ that.$set(that.$data, key, obj[key]) }) }, - getImage: function() { + async getImage() { var _this = this uni.chooseImage({ success: function(res) { diff --git a/pages/mine/index.vue b/pages/mine/index.vue index 719066d..9bfce0e 100644 --- a/pages/mine/index.vue +++ b/pages/mine/index.vue @@ -134,11 +134,11 @@ //页面跳转 function toPage(type) { switch (type) { - case "info": //用户资料 - uni.navigateTo({ - url: '/pages/mine/info/index' - }); - break; + // case "info": //用户资料 + // uni.navigateTo({ + // url: '/pages/mine/info/index' + // }); + // break; case "avatar": //头像 uni.navigateTo({ url: '/pages/mine/avatar/index' diff --git a/pages/work/user/index.vue b/pages/work/user/index.vue index ec898c6..f17593e 100644 --- a/pages/work/user/index.vue +++ b/pages/work/user/index.vue @@ -77,9 +77,9 @@ - + 编辑 @@ -118,6 +118,15 @@ checkPermi } from "@/utils/permission" import plugin from "@/plugins" + // 引入插件包 + import { + requestPermissions + } from "@/js_sdk/yu-app-permission/yu-app-permission.js" + // 前往设置页面 兼容安卓以及IOS + import { + goSetting + } from "@/js_sdk/yu-app-permission/yu-app-permission.js" + export default { data() { return { @@ -285,18 +294,39 @@ plugin.modal.msgError("抱歉暂无权限") } }, - onClickPhone(phone) { + async onClickPhone(phone) { + // //安卓手机手动设置一个showActionSheet + // uni.showActionSheet({ + // itemList: ['phone', '呼叫'], + // success: function(res) { + // if (res.tapIndex == 1) { + // uni.makePhoneCall({ + // phoneNumber: phone, + // }) + // } + // } + // }) + plugin.modal.confirm("是否拨打电话?").then(res => { - //#ifdef APP-PLUS - plus.device.dial(phone, true) - //#endif - //#ifdef MP-WEIXIN - uni.makePhoneCall({ - phoneNumber: phone, - fail: res => {}, - success: res => {} - }) + + // #ifdef APP-PLUS + //手机端的这样写 + plus.device.dial("+86" + phone, true); //#endif + // uni.makePhoneCall({ + // phoneNumber: phone + // }); + + // //#ifdef APP-PLUS + // plus.device.dial(phone, true) + // //#endif + // //#ifdef MP-WEIXIN + // uni.makePhoneCall({ + // phoneNumber: phone, + // fail: res => {}, + // success: res => {} + // }) + // //#endif }) }, onEditPassWordClick(item) { @@ -370,10 +400,14 @@ .txt-list .left uni-text:first-child { width: auto; } -.txt-list .left .u-text{margin-left: 10px !important;} + + .txt-list .left .u-text { + margin-left: 10px !important; + } + // 表单 ::v-deep.uni-forms-item__label { - display: none !important; + display: none !important; } .u-search {