.
This commit is contained in:
parent
69437c3523
commit
2542af9d06
@ -45,7 +45,8 @@
|
||||
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
||||
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
||||
"<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" ],
|
||||
"minSdkVersion" : 21,
|
||||
|
@ -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({
|
||||
|
@ -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) {
|
||||
|
@ -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'
|
||||
|
@ -77,9 +77,9 @@
|
||||
</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>
|
||||
</view> -->
|
||||
<!--编辑-->
|
||||
<view @click="onEditClick(item.userId)" v-hasPermi="['system:user:edit']" v-if="item.userId>2">
|
||||
<view class="iconfont icon-a-bianji6"></view>编辑
|
||||
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user