Commit 279a70f5 authored by youjie's avatar youjie

优化

parent 1105bfda
...@@ -246,6 +246,7 @@ export default { ...@@ -246,6 +246,7 @@ export default {
photoSize: '图片大小不能超过{size}MB', photoSize: '图片大小不能超过{size}MB',
uploadComplete: '图片上传完成', uploadComplete: '图片上传完成',
uploadFailed: '上传失败', uploadFailed: '上传失败',
updateSuccess: '保存成功',
}, },
// HTTP 错误状态码 // HTTP 错误状态码
httpError: { httpError: {
......
This diff is collapsed.
...@@ -201,6 +201,13 @@ const unBindWeChatAccount = async (type: number) => { ...@@ -201,6 +201,13 @@ const unBindWeChatAccount = async (type: number) => {
const response = await UserService.externalunbindBind(systemConfig.tenantId,ProviderType) const response = await UserService.externalunbindBind(systemConfig.tenantId,ProviderType)
if (response){ if (response){
Message.success(t('personal.unBindSuccess')) Message.success(t('personal.unBindSuccess'))
if(ProviderType=='WeChat'){
WeChatInfor.value = null
}else if(ProviderType=='Line'){
LnlineInfor.value = null
}else if(ProviderType=='Google'){
GoogleInfor.value = null
}
getPersonalInfor() getPersonalInfor()
}else{ }else{
Message.error(t('personal.unBindError')) Message.error(t('personal.unBindError'))
...@@ -217,6 +224,8 @@ const unBindWeChatAccount = async (type: number) => { ...@@ -217,6 +224,8 @@ const unBindWeChatAccount = async (type: number) => {
const getPersonalInfor = async () => { const getPersonalInfor = async () => {
const response = await UserService.memberCenterAsync(systemConfig.tenantId) const response = await UserService.memberCenterAsync(systemConfig.tenantId)
userStore.updateProfile(response) userStore.updateProfile(response)
// userInfor.value = response
// inData()
} }
// 随机生成 state 参数 // 随机生成 state 参数
...@@ -256,7 +265,7 @@ const useLineBind = async(code:string) => { ...@@ -256,7 +265,7 @@ const useLineBind = async(code:string) => {
} }
// 微信授权 // 微信授权
const loginWechat = () => { const loginWechat = () => {
const redirect_url = openInfo.value.redirectUri || 'http://localhost:8002/account/2' const redirect_url = openInfo.value.redirectUri || 'https://www.oytour.com/#/login/2' ||'http://localhost:8002/account/2'
const url = `https://open.weixin.qq.com/connect/qrconnect?appid=${openInfo.value.appId}&redirect_uri=${encodeURIComponent(redirect_url)}&response_type=code&scope=snsapi_login&state=${1}&wechat_redirect=${redirect_url}`; const url = `https://open.weixin.qq.com/connect/qrconnect?appid=${openInfo.value.appId}&redirect_uri=${encodeURIComponent(redirect_url)}&response_type=code&scope=snsapi_login&state=${1}&wechat_redirect=${redirect_url}`;
window.location.href = url; window.location.href = url;
} }
...@@ -389,7 +398,6 @@ onMounted(async () => { ...@@ -389,7 +398,6 @@ onMounted(async () => {
watch(() => userStore.personalInfor, (newVal, oldVal) => { watch(() => userStore.personalInfor, (newVal, oldVal) => {
userInfor.value = newVal userInfor.value = newVal
console.log(newVal,'newVal----')
inData() inData()
}) })
......
...@@ -391,11 +391,12 @@ const handleSubmit = async () => { ...@@ -391,11 +391,12 @@ const handleSubmit = async () => {
try { try {
const registerData = formData const registerData = formData
const response = await UserService.updateMemberUser(tenantId|| 'default',registerData) const response = await UserService.updateMemberUser(tenantId|| 'default',registerData)
if (response) { // if (response) {}
Message.success(t('personal.updateSuccess'))
getUserDetail() getUserDetail()
getPersonalInfor() getPersonalInfor()
// userStore.updateProfile({photo:formData.photo,name:formData.name}) // userStore.updateProfile({photo:formData.photo,name:formData.name})
}
} catch (error: any) { } catch (error: any) {
console.error('提交失败:', error) console.error('提交失败:', error)
Message.error(error.message) Message.error(error.message)
......
...@@ -345,10 +345,10 @@ const cancel = () => { ...@@ -345,10 +345,10 @@ const cancel = () => {
formData.name = '' formData.name = ''
formData.surName = '' formData.surName = ''
formData.birthday = null formData.birthday = null
formData.phone = null formData.phone = ''
formData.phoneCode = null formData.phoneCode = ''
formData.countryId = null formData.countryId = null
formData.sex = null formData.sex = 1
formData.idCard = null formData.idCard = null
formData.email = null formData.email = null
} }
...@@ -375,6 +375,7 @@ const handleSubmit = async () => { ...@@ -375,6 +375,7 @@ const handleSubmit = async () => {
try { try {
const registerData = formData const registerData = formData
const response = await UserService.updateMemberGuest(systemConfig.tenantId || 'default',registerData) const response = await UserService.updateMemberGuest(systemConfig.tenantId || 'default',registerData)
console.log('提交成功:', response)
showType.value = null showType.value = null
resetQuery() resetQuery()
} catch (error: any) { } catch (error: any) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment