This commit is contained in:
Iruka 2025-01-14 12:31:59 +08:00
parent 69437c3523
commit 2542af9d06
5 changed files with 76 additions and 33 deletions

View File

@ -45,7 +45,8 @@
"<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\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>" "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>"
], ],
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ], "abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ],
"minSdkVersion" : 21, "minSdkVersion" : 21,

View File

@ -640,17 +640,17 @@
}, },
// //
async toQRCode() { async toQRCode() {
// { isSuc : true} , // // { isSuc : true} ,
const { // const {
isSuc // isSuc
} = await requestPermissions({ // } = await requestPermissions({
title: "相机/摄像头权限申请说明", // // title: "/", //
content: "便于您使用该功能扫描设备二维码,查看设备信息", // // content: "便使,", //
permissionID: "CAMERA" // ID // permissionID: "CAMERA" // ID
}) // })
if (!isSuc) { // if (!isSuc) {
return false // return false
} // }
var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module") var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
mpaasScanModule.mpaasScan({ mpaasScanModule.mpaasScan({

View File

@ -56,6 +56,14 @@
uploadAvatar, uploadAvatar,
uploadAvatarForUser uploadAvatarForUser
} from "@/api/system/user" } 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 const baseUrl = config.baseUrl
let sysInfo = uni.getSystemInfoSync() let sysInfo = uni.getSystemInfoSync()
@ -124,7 +132,7 @@
if (options && options.userId) { if (options && options.userId) {
this.userId = options.userId; this.userId = options.userId;
this.imageSrc = options.avatar; this.imageSrc = options.avatar;
}else{ } else {
this.imageSrc = store.getters.avatar; this.imageSrc = store.getters.avatar;
} }
}, },
@ -135,7 +143,7 @@
that.$set(that.$data, key, obj[key]) that.$set(that.$data, key, obj[key])
}) })
}, },
getImage: function() { async getImage() {
var _this = this var _this = this
uni.chooseImage({ uni.chooseImage({
success: function(res) { success: function(res) {

View File

@ -134,11 +134,11 @@
// //
function toPage(type) { function toPage(type) {
switch (type) { switch (type) {
case "info": // // case "info": //
uni.navigateTo({ // uni.navigateTo({
url: '/pages/mine/info/index' // url: '/pages/mine/info/index'
}); // });
break; // break;
case "avatar": // case "avatar": //
uni.navigateTo({ uni.navigateTo({
url: '/pages/mine/avatar/index' url: '/pages/mine/avatar/index'

View File

@ -77,9 +77,9 @@
</view> </view>
<view class="card-view"> <view class="card-view">
<!--打电话--> <!--打电话-->
<view @click="onClickPhone(item.mobilePhone)" v-if="item.userId>2"> <!-- <view @click="onClickPhone(item.mobilePhone)" v-if="item.userId>2">
<view class="iconfont icon-hover"></view>打电话 <view class="iconfont icon-hover"></view>打电话
</view> </view> -->
<!--编辑--> <!--编辑-->
<view @click="onEditClick(item.userId)" v-hasPermi="['system:user:edit']" v-if="item.userId>2"> <view @click="onEditClick(item.userId)" v-hasPermi="['system:user:edit']" v-if="item.userId>2">
<view class="iconfont icon-a-bianji6"></view>编辑 <view class="iconfont icon-a-bianji6"></view>编辑
@ -118,6 +118,15 @@
checkPermi checkPermi
} from "@/utils/permission" } from "@/utils/permission"
import plugin from "@/plugins" 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 { export default {
data() { data() {
return { return {
@ -285,18 +294,39 @@
plugin.modal.msgError("抱歉暂无权限") 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 => { plugin.modal.confirm("是否拨打电话?").then(res => {
//#ifdef APP-PLUS
plus.device.dial(phone, true) // #ifdef APP-PLUS
//#endif //
//#ifdef MP-WEIXIN plus.device.dial("+86" + phone, true);
uni.makePhoneCall({
phoneNumber: phone,
fail: res => {},
success: res => {}
})
//#endif //#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) { onEditPassWordClick(item) {
@ -370,10 +400,14 @@
.txt-list .left uni-text:first-child { .txt-list .left uni-text:first-child {
width: auto; 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 { ::v-deep.uni-forms-item__label {
display: none !important; display: none !important;
} }
.u-search { .u-search {