diff --git a/src/configs/index.js b/src/configs/index.js index 1f17c80..6aba0de 100755 --- a/src/configs/index.js +++ b/src/configs/index.js @@ -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' diff --git a/src/mixins/share/index.js b/src/mixins/share/index.js index 01a7481..0406194 100755 --- a/src/mixins/share/index.js +++ b/src/mixins/share/index.js @@ -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: '', diff --git a/src/pages/other/edit-userinfo.vue b/src/pages/other/edit-userinfo.vue index e369735..8547b6e 100755 --- a/src/pages/other/edit-userinfo.vue +++ b/src/pages/other/edit-userinfo.vue @@ -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)