version/0412
liudan 11 months ago
parent 9158a95b89
commit 2fef9eb560
  1. 5
      manifest.json
  2. 83
      pages/news/user/vip.vue

@ -115,7 +115,10 @@
"permission" : {
"scope.userLocation" : {
"desc" : "获取当前所在城市位置"
}
},
"makePhoneCall": {
"desc": "用于拨打电话"
}
},
"optimization" : {
"subPackages" : true

@ -110,39 +110,58 @@
});
},
makeCall(phoneNumber) {
uni.getSetting({
success(res) {
if (!res.authSetting['scope.phoneCall']) {
//
uni.authorize({
scope: 'scope.phoneCall',
success() {
//
uni.makePhoneCall({
phoneNumber: phoneNumber //
});
},
fail() {
//
uni.showModal({
title: '提示',
content: '需要电话权限',
success: function(modalRes) {
if (modalRes.confirm) {
uni.openSetting();
}
}
});
}
});
} else {
//
uni.makePhoneCall({
phoneNumber: phoneNumber //
});
}
}
uni.makePhoneCall({
phoneNumber: phoneNumber, //
success: (res) => {
},
//
fail: (res) => {
}
});
// uni.getSetting({
// success(res) {
// if (!res.authSetting['scope.makePhoneCall']) {
// //
// uni.authorize({
// scope: 'scope.makePhoneCall',
// success() {
// //
// uni.makePhoneCall({
// phoneNumber: phoneNumber //
// });
// },
// fail() {
// //
// uni.showModal({
// title: '',
// content: '',
// success: function(modalRes) {
// console.log(modalRes)
// if (modalRes.confirm) {
// uni.openSetting({
// success: (res) => {
// console.log(res)
// if (res.authSetting['scope.makePhoneCall']) {
// uni.makePhoneCall({
// phoneNumber: phoneNumber //
// });
// }
// }
// });
// }
// }
// });
// }
// });
// } else {
// //
// uni.makePhoneCall({
// phoneNumber: phoneNumber //
// });
// }
// }
// });
},
goVipDetails(item){
let details = JSON.stringify(item)

Loading…
Cancel
Save