main
wwl 2024-03-28 16:39:03 +08:00
parent 9227d2383d
commit 82ca8b7b3d
3 changed files with 16 additions and 5 deletions

View File

@ -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'

View File

@ -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: '',

View File

@ -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)