fix bug
parent
9227d2383d
commit
82ca8b7b3d
|
|
@ -2,7 +2,7 @@ import { isH5 } from '@uni-helper/uni-env'
|
||||||
|
|
||||||
const isProduction = process.env.NODE_ENV === 'production'
|
const isProduction = process.env.NODE_ENV === 'production'
|
||||||
|
|
||||||
export const appName = 'Escort'
|
export const appName = '护医达'
|
||||||
|
|
||||||
// 项目主题色
|
// 项目主题色
|
||||||
export const primaryColor = '#FF8CA6'
|
export const primaryColor = '#FF8CA6'
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,20 @@
|
||||||
import { appName } from '@/configs/index'
|
import { appName } from '@/configs/index'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data () {
|
||||||
return {
|
return {
|
||||||
shareAppMessageProps: {},
|
shareAppMessageProps: {},
|
||||||
shareTimelineProps: {},
|
shareTimelineProps: {},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShareAppMessage() {
|
onShareAppMessage () {
|
||||||
return {
|
return {
|
||||||
title: appName,
|
title: appName,
|
||||||
path: '/pages/index/index',
|
path: '/pages/index/home/index',
|
||||||
...this.shareAppMessageProps,
|
...this.shareAppMessageProps,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShareTimeline() {
|
onShareTimeline () {
|
||||||
return {
|
return {
|
||||||
title: appName,
|
title: appName,
|
||||||
query: '',
|
query: '',
|
||||||
|
|
|
||||||
|
|
@ -103,6 +103,17 @@ const handleNickName = (e) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleSave = async () => {
|
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)
|
const res = await $api.userSave(userInfo.value)
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
$store.user.setUserInfo(userInfo.value)
|
$store.user.setUserInfo(userInfo.value)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue