设置拨打电话权限、修改定位
This commit is contained in:
@@ -55,8 +55,8 @@ import { getManagePhoneData } from '../api/apiSub.js'
|
||||
uni.showToast({ title: '电话号码为空', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
const cleanPhone = phone.replace(/-/g, '').trim();
|
||||
if (!/^1[3-9]\d{9}$/.test(cleanPhone) && !/^0\d{2,3}-?\d{7,8}$/.test(cleanPhone)) {
|
||||
const cleanPhone = phone.replace(/\D/g, '');
|
||||
if (!/^1[3-9]\d{9}$/.test(cleanPhone) && !/^0\d{2,3}\d{7,8}$/.test(cleanPhone)) {
|
||||
uni.showToast({ title: '电话号码格式有误', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
@@ -75,7 +75,7 @@ import { getManagePhoneData } from '../api/apiSub.js'
|
||||
return;
|
||||
}
|
||||
uni.setClipboardData({
|
||||
data: phone.replace(/-/g, '').trim(),
|
||||
data: phone.replace(/\D/g, ''),
|
||||
success: () => {
|
||||
uni.showToast({ title: '号码已复制', icon: 'none' });
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user