用户个人信息没有国家和职业弹窗绑定

This commit is contained in:
X1627315083
2025-01-13 11:27:04 +08:00
parent cfa1a3345d
commit e7c09a27fc
9 changed files with 219 additions and 2018 deletions

View File

@@ -3,16 +3,35 @@ import {RootState} from '../index'
interface DesignDetail{
allUserList:any,
city:any,
country:any,
}
const adminPage : Module<DesignDetail,RootState> = {
state:{
allUserList:[],
city:[],
country:[],
},
mutations:{
setAllUserList(state,files){
state.allUserList = files
},
setAllCitiesList(state,files){
state.city = []
files.city.forEach((item:any) => {
state.city.push({
label:item,
value:item,
})
})
state.country = []
files.country.forEach((item:any) => {
state.country.push({
label:item,
value:item,
})
})
},
},
actions:{

View File

@@ -79,6 +79,8 @@ const userHabit : Module<UserHabit,RootState> = {
subscriptionType:null,
subscriptionId:null,
usernameModify:0,
occupation:'',//职业
country:'',//国家
},
bindEmail : {
@@ -182,6 +184,8 @@ const userHabit : Module<UserHabit,RootState> = {
//是否是affiliate用户
affiliate:false,
usernameModify:0,
occupation:'',//职业
country:'',//国家
}
state.bindEmail = {
@@ -196,8 +200,11 @@ const userHabit : Module<UserHabit,RootState> = {
},
setUserDetail(state,data){
// console.log(data);
console.log(data.email,state.userDetail.email);
if(!data.email && state.userDetail.email == '-------------'){
if(
(!data.email && state.userDetail.email == '-------------') ||
(!data.country && !state.userDetail.country) ||
(!data.occupation && !state.userDetail.occupation)
){
state.bindEmail.isBindEmail = true
state.bindEmail.type = ''
}
@@ -207,6 +214,8 @@ const userHabit : Module<UserHabit,RootState> = {
state.userDetail.userName = data.userName//用户名
state.userDetail.userId = data.userId//用户id
state.userDetail.avatar = data.avatar//头像
state.userDetail.country = data.country//头像
state.userDetail.occupation = data.occupation//头像
state.userDetail.usernameModify = data.usernameModify//当月剩余修改次数
state.userDetail.isBeginner = data.isBeginner == 1 ? true : false;//是否完成新手指引
/**