fix bug
parent
9227d2383d
commit
82ca8b7b3d
|
|
@ -2,7 +2,7 @@ import { isH5 } from '@uni-helper/uni-env'
|
|||
|
||||
const isProduction = process.env.NODE_ENV === 'production'
|
||||
|
||||
export const appName = 'Escort'
|
||||
export const appName = '护医达'
|
||||
|
||||
// 项目主题色
|
||||
export const primaryColor = '#FF8CA6'
|
||||
|
|
|
|||
|
|
@ -1,20 +1,20 @@
|
|||
import { appName } from '@/configs/index'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
data () {
|
||||
return {
|
||||
shareAppMessageProps: {},
|
||||
shareTimelineProps: {},
|
||||
}
|
||||
},
|
||||
onShareAppMessage() {
|
||||
onShareAppMessage () {
|
||||
return {
|
||||
title: appName,
|
||||
path: '/pages/index/index',
|
||||
path: '/pages/index/home/index',
|
||||
...this.shareAppMessageProps,
|
||||
}
|
||||
},
|
||||
onShareTimeline() {
|
||||
onShareTimeline () {
|
||||
return {
|
||||
title: appName,
|
||||
query: '',
|
||||
|
|
|
|||
|
|
@ -103,6 +103,17 @@ const handleNickName = (e) => {
|
|||
}
|
||||
|
||||
const handleSave = async () => {
|
||||
const { phone, nickName } = userInfo.value
|
||||
// 1. 校验
|
||||
const reg = /^(?:(?:\+|00)86)?1[3-9]\d{9}$/
|
||||
if (!phone || !reg.test(phone)) {
|
||||
$toast('请输入正确的手机号')
|
||||
return
|
||||
}
|
||||
if (!nickName || !nickName.trim()) {
|
||||
$toast('请输入昵称')
|
||||
return
|
||||
}
|
||||
const res = await $api.userSave(userInfo.value)
|
||||
if (res.success) {
|
||||
$store.user.setUserInfo(userInfo.value)
|
||||
|
|
|
|||
Loading…
Reference in New Issue