xuyonghao
2025-02-11 90c6eb32f9c3abdf2d1c91dc7c255a55c95b8ca7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
export function isPhone(value) {
  if (!value) {
      uni.showToast({
          icon:'none',
        title: '请输入手机号'
      });
      return false;
  }
  var pattern = /^1[345789]\d{9}$/
  if (!pattern.test(value)) {
    uni.showToast({
        icon:'none',
        title: '手机号码格式有误'
    });
    return false;
  }
  return true;
}