用户个人信息没有国家和职业弹窗绑定
This commit is contained in:
@@ -4,13 +4,21 @@
|
||||
<div class="accountEdit_page_body_item">
|
||||
<div class="accountEdit_page_body_item_name">{{$t('account.Country')}}:</div>
|
||||
<div class="accountEdit_page_body_item_inut">
|
||||
<input type="text" disabled :value="userDetail.Country">
|
||||
<a-select
|
||||
v-model:value="Country"
|
||||
size="large"
|
||||
optionFilterProp="label"
|
||||
:options="countryList"
|
||||
placeholder="Please select"
|
||||
allowClear
|
||||
show-search
|
||||
></a-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="accountEdit_page_body_item">
|
||||
<div class="accountEdit_page_body_item_name">{{$t('account.CompanyName')}}:</div>
|
||||
<div class="accountEdit_page_body_item_inut">
|
||||
<input type="text" disabled :value="userDetail.CompanyName">
|
||||
<input type="text" v-model="CompanyName">
|
||||
</div>
|
||||
</div>
|
||||
<div class="accountEdit_page_body_item">
|
||||
@@ -19,6 +27,9 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mark_loading" v-show="loadingShow">
|
||||
<a-spin size="large" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
@@ -26,6 +37,7 @@ import { defineComponent,computed,ref,reactive,nextTick,toRefs,createVNode, onMo
|
||||
import { Https } from "@/tool/https";
|
||||
import { Modal,message } from 'ant-design-vue';
|
||||
import { useStore } from "vuex";
|
||||
import { country } from "@/tool/country";
|
||||
import { useI18n } from 'vue-i18n'
|
||||
export default defineComponent({
|
||||
components:{
|
||||
@@ -38,10 +50,32 @@ export default defineComponent({
|
||||
let accountHomeData:any = reactive({
|
||||
Country:'',
|
||||
CompanyName:'',
|
||||
loadingShow:false,
|
||||
countryList:country
|
||||
})
|
||||
let setSubmit = ()=>{
|
||||
|
||||
let data = {
|
||||
country:accountHomeData.Country,
|
||||
occupation:accountHomeData.CompanyName
|
||||
}
|
||||
accountHomeData.loadingShow = true
|
||||
Https.axiosGet(Https.httpUrls.updateUserInfo,{params:data}).
|
||||
then((rv:any)=>{
|
||||
// let value = {
|
||||
// userName:accountHomeData.editUserName
|
||||
// }
|
||||
// store.commit('upUserDetail',value)
|
||||
accountHomeData.loadingShow = false
|
||||
}).catch((err:any)=>{
|
||||
accountHomeData.loadingShow = false
|
||||
})
|
||||
}
|
||||
onMounted(()=>{
|
||||
let country = userDetail.value.country
|
||||
let CompanyName = userDetail.value.occupation
|
||||
accountHomeData.Country = country
|
||||
accountHomeData.CompanyName = CompanyName
|
||||
})
|
||||
return{
|
||||
...toRefs(accountHomeData),
|
||||
userDetail,
|
||||
@@ -61,7 +95,7 @@ export default defineComponent({
|
||||
width: 85rem;
|
||||
.accountEdit_page_body_item{
|
||||
display: flex;
|
||||
margin-bottom: 5rem;
|
||||
margin-bottom: 20px;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
.gallery_btn{
|
||||
@@ -75,7 +109,7 @@ export default defineComponent({
|
||||
font-size: 2rem;
|
||||
}
|
||||
input{
|
||||
height: 7rem;
|
||||
height: 40px;
|
||||
}
|
||||
.accountEdit_page_body_item_name{
|
||||
color: #000;
|
||||
@@ -85,6 +119,22 @@ export default defineComponent({
|
||||
.accountEdit_page_body_item_inut{
|
||||
margin-top: 1.5rem;
|
||||
flex: 1;
|
||||
.ant-select-lg{
|
||||
font-size: 2rem;
|
||||
}
|
||||
.ant-select{
|
||||
width: 100%;
|
||||
border-radius: 1.6rem;
|
||||
border: 2px solid #D0D0D0;
|
||||
overflow: hidden;
|
||||
.ant-select-selector{
|
||||
border-radius: 1.6rem;
|
||||
}
|
||||
:deep(.ant-select-selector ){
|
||||
border: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
.accountEdit_page_body_item:last-child{
|
||||
|
||||
@@ -31,7 +31,20 @@
|
||||
:filter-option="filterOption"
|
||||
placeholder="Select Item..."
|
||||
max-tag-count="responsive"
|
||||
:options="allCountry"
|
||||
:options="countryList"
|
||||
></a-select>
|
||||
</div>
|
||||
<div class="admin_state_item">
|
||||
<span>City:</span>
|
||||
<a-select
|
||||
v-model:value="city"
|
||||
:allowClear="true"
|
||||
show-search
|
||||
style="width: 250px"
|
||||
:filter-option="filterOption"
|
||||
placeholder="Select Item..."
|
||||
max-tag-count="responsive"
|
||||
:options="cityList"
|
||||
></a-select>
|
||||
</div>
|
||||
<div class="admin_state_item">
|
||||
@@ -131,13 +144,13 @@
|
||||
>
|
||||
<template #bodyCell="{ column, text, record, index }">
|
||||
<div class="operate_list" v-if="column?.Operations">
|
||||
<div :class="{success:record.status == 'Success'}">
|
||||
<div v-if="record.status == 'Success'" :class="{success:record.status == 'Success'}">
|
||||
<i class="fi fi-ss-check-circle"></i>{{ record.status }}
|
||||
</div>
|
||||
<div :class="{pending:record.status == 'Pending'}">
|
||||
<div v-if="record.status == 'Pending'" :class="{pending:record.status == 'Pending'}">
|
||||
<i class="fi fi-br-hourglass-end"></i>{{ record.status }}
|
||||
</div>
|
||||
<div :class="{fail:record.status == 'Fail'}">
|
||||
<div v-if="record.status == 'Fail'" :class="{fail:record.status == 'Fail'}">
|
||||
<i class="fi fi-ss-cross-circle"></i>{{ record.status }}
|
||||
</div>
|
||||
</div>
|
||||
@@ -166,7 +179,13 @@ export default defineComponent({
|
||||
let filter: any = reactive({
|
||||
dataList: [],
|
||||
tableLoading: false,
|
||||
allCountry:[]
|
||||
allCountry:[],
|
||||
cityList: computed(()=>{
|
||||
return store.state.adminPage.city
|
||||
}),
|
||||
countryList: computed(()=>{
|
||||
return store.state.adminPage.country
|
||||
}),
|
||||
});
|
||||
let filterData: any = reactive({
|
||||
rangePickerValue: [],
|
||||
@@ -174,6 +193,7 @@ export default defineComponent({
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
country: "",
|
||||
city:"",
|
||||
payerTotal: "",
|
||||
platform: "",
|
||||
order: "", //'Ascending 升序 Descending 降序'
|
||||
@@ -365,7 +385,7 @@ export default defineComponent({
|
||||
filterData.orderBy = 'credits'
|
||||
}
|
||||
}
|
||||
filterData.order = sorter.order == "descend" ? "Descending" : "Ascending";
|
||||
filterData.order = sorter.order == "descend" ? "DESC" : "ASC";
|
||||
|
||||
gettrialList();
|
||||
};
|
||||
@@ -380,6 +400,7 @@ export default defineComponent({
|
||||
filterData.currentPage = 1,
|
||||
filterData.pageSize = 10,
|
||||
filterData.total = 0,
|
||||
filterData.city = "",
|
||||
filterData.country = "",
|
||||
filterData.payerTotal = ""
|
||||
filterData.order = "" //'Ascending 升序 Descending 降序'
|
||||
@@ -398,8 +419,7 @@ export default defineComponent({
|
||||
let data = {
|
||||
order: filterData.order,
|
||||
orderBy: filterData.orderBy,
|
||||
|
||||
"city": "",
|
||||
"city": filterData.city,
|
||||
"country": filterData.country,
|
||||
startTime: startDate,
|
||||
endTime: endDate,
|
||||
|
||||
@@ -6,14 +6,13 @@
|
||||
v-model:visible="registerModel"
|
||||
:footer="null"
|
||||
:width="pageWidth"
|
||||
height="60rem"
|
||||
:height="bindType == 'Modify'?'60rem':'70rem'"
|
||||
:maskClosable="false"
|
||||
:centered="true"
|
||||
:closable="false"
|
||||
:mask="registerModelMask"
|
||||
:keyboard="false"
|
||||
:destroyOnClose="true"
|
||||
:zIndex="9999"
|
||||
>
|
||||
<div class="generalModel_btn" v-if="bindType == 'Modify'">
|
||||
<div class="generalModel_closeIcon" @click.stop="cancelDsign()">
|
||||
@@ -39,7 +38,7 @@
|
||||
]"
|
||||
>
|
||||
<span v-if="bindType == 'Modify'">Modify Email</span>
|
||||
<span v-else>Bind Email</span>
|
||||
<span v-else>Bind personal information</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 账号密码登录 start -->
|
||||
@@ -53,42 +52,59 @@
|
||||
v-model="email"
|
||||
@keydown.enter="submitPerLogin()"
|
||||
/>
|
||||
<div class="login_form_title marign_top30">{{$t('account.Country')}}:</div>
|
||||
<div class="">
|
||||
<a-select
|
||||
class="gallerySelect"
|
||||
v-model:value="Country"
|
||||
size="large"
|
||||
optionFilterProp="label"
|
||||
style="width: 100%;"
|
||||
:options="countryList"
|
||||
placeholder="Please select"
|
||||
allowClear
|
||||
show-search
|
||||
></a-select>
|
||||
</div>
|
||||
|
||||
<div class="login_form_title marign_top30">{{$t('account.CompanyName')}}:</div>
|
||||
<input class="login_form_input" type="text" placeholder="Please enter occupation" v-model="CompanyName">
|
||||
|
||||
<!-- 邮箱登录 start -->
|
||||
<div class="login_form_email" :class="{active:emailStap===2}">
|
||||
<div v-show="emailStap === 2" class="email_last_step">
|
||||
|
||||
<div class="email_last_step_block" >
|
||||
<span class="email_last_step_content"
|
||||
>Verify with one-time verification code</span
|
||||
>
|
||||
<i class="fi fi-br-cross email_last_step_block_icon" @click="emailLastStepFun()"></i>
|
||||
</div>
|
||||
<div class="email_last_step_bottom">
|
||||
<div class="email_last_step_des">
|
||||
<div class="sent_email_content">
|
||||
Sent to {{ email }}
|
||||
</div>
|
||||
<div class="tip_content">
|
||||
<span v-show="time">{{ time }}s</span>
|
||||
<span v-show="!time" @click="emailNextStepFun()"
|
||||
>Resend</span
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<VerificationCodeInput
|
||||
:ct="emailCode"
|
||||
@sendCaptcha="submitEmailLogin($event)"
|
||||
></VerificationCodeInput>
|
||||
<div v-show="emailStap === 2" class="email_last_step">
|
||||
|
||||
<div class="email_last_step_block" >
|
||||
<span class="email_last_step_content"
|
||||
>Verify with one-time verification code</span
|
||||
>
|
||||
<i class="fi fi-br-cross email_last_step_block_icon" @click="emailLastStepFun()"></i>
|
||||
</div>
|
||||
<div class="email_last_step_bottom">
|
||||
<div class="email_last_step_des">
|
||||
<div class="sent_email_content">
|
||||
Sent to {{ email }}
|
||||
</div>
|
||||
<div class="tip_content">
|
||||
<span v-show="time">{{ time }}s</span>
|
||||
<span v-show="!time" @click="emailNextStepFun()"
|
||||
>Resend</span
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<VerificationCodeInput
|
||||
:ct="emailCode"
|
||||
@sendCaptcha="submitEmailLogin($event)"
|
||||
></VerificationCodeInput>
|
||||
|
||||
<div class="email_last_step_des">
|
||||
<div class="sent_email_content email_tip_content">
|
||||
Please check the junk box if you haven't received verification code
|
||||
<div class="email_last_step_des">
|
||||
<div class="sent_email_content email_tip_content">
|
||||
Please check the junk box if you haven't received verification code
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="login_submit_button marign_top40"
|
||||
@@ -97,7 +113,7 @@
|
||||
@click="submitPerLogin()"
|
||||
>
|
||||
<span v-if="bindType == 'Modify'">Modify Email</span>
|
||||
<span v-else>Bind Email</span>
|
||||
<span v-else>Submit</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 账号密码登录 end -->
|
||||
@@ -113,7 +129,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent,ref,reactive,toRefs ,computed} from "vue";
|
||||
import { defineComponent,ref,reactive,toRefs ,computed, onMounted} from "vue";
|
||||
import { Https } from "@/tool/https";
|
||||
import { isEmail } from "@/tool/util";
|
||||
import { setCookie ,WriteCookie } from "@/tool/cookie";
|
||||
@@ -122,7 +138,7 @@ import VerificationCodeInput from "@/component/LoginPage/verificationCodeInput.v
|
||||
import { useStore } from "vuex";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { setLang } from "@/tool/guide";
|
||||
const md5 = require("md5");
|
||||
import { country } from "@/tool/country";
|
||||
export default defineComponent({
|
||||
components: {
|
||||
VerificationCodeInput,
|
||||
@@ -132,6 +148,9 @@ export default defineComponent({
|
||||
let timer:any = 0;
|
||||
const {locale} = useI18n()
|
||||
const store = useStore();
|
||||
let userDetail:any= computed(()=>{
|
||||
return store.state.UserHabit.userDetail
|
||||
})
|
||||
let register = reactive({
|
||||
registerModel:computed(()=>{
|
||||
return store.state.UserHabit.bindEmail.isBindEmail
|
||||
@@ -140,14 +159,28 @@ export default defineComponent({
|
||||
return store.state.UserHabit.bindEmail.type
|
||||
}),
|
||||
registerModelMask:true,
|
||||
pageWidth:'45%'
|
||||
pageWidth:'45%',
|
||||
Country:'',
|
||||
CompanyName:'',
|
||||
countryList:country,
|
||||
email:'',
|
||||
})
|
||||
onMounted(()=>{
|
||||
let country = userDetail.value.country
|
||||
let CompanyName = userDetail.value.occupation
|
||||
let email = userDetail.value.email
|
||||
register.Country = country
|
||||
register.CompanyName = CompanyName
|
||||
register.email = email == '-------------'?'':email
|
||||
})
|
||||
return{
|
||||
store,
|
||||
timer,
|
||||
userDetail,
|
||||
...toRefs(register),
|
||||
locale
|
||||
}
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -155,7 +188,6 @@ export default defineComponent({
|
||||
emailStap: 1, // 邮箱登录步骤
|
||||
emailCode: ["", "", "", "", "", ""], //邮箱验证码
|
||||
emailNextStep: true,
|
||||
email: "", //邮箱登录邮箱
|
||||
frogetPasswordStep: 1, //忘记密码的步骤
|
||||
forgetPasswordEmail: "",
|
||||
forgetEmailCode: ["", "", "", "", "", ""], //忘记密码的邮箱验证码
|
||||
@@ -232,15 +264,28 @@ export default defineComponent({
|
||||
message.info("The email format is incorrect");
|
||||
return;
|
||||
}
|
||||
if (!this.CompanyName) {
|
||||
message.info("Please enter occupation");
|
||||
return;
|
||||
}
|
||||
if (!this.Country) {
|
||||
message.info("Please select a country");
|
||||
return;
|
||||
}
|
||||
let type = 'BIND_MAILBOX'
|
||||
if(this.email == this.userDetail.email)type = 'UPDATE_USERINFO'
|
||||
let data = {
|
||||
"email": this.email,
|
||||
"ip": "",
|
||||
"operationType": "BIND_MAILBOX"
|
||||
"operationType": type,
|
||||
occupation:this.CompanyName,
|
||||
country:this.Country
|
||||
};
|
||||
if(this.loginTime){
|
||||
this.loginTime = false
|
||||
Https.axiosPost(Https.httpUrls.accountSendEmail, data).then(
|
||||
(rv: any) => {
|
||||
if(type == 'UPDATE_USERINFO')this.setSuccessLogin(rv)
|
||||
this.emailStap = 2;
|
||||
if (rv) {
|
||||
this.userId = rv.userId
|
||||
@@ -266,7 +311,9 @@ export default defineComponent({
|
||||
setSuccessLogin(rv:any){
|
||||
if (rv) {
|
||||
let value = {
|
||||
email:this.email
|
||||
email:this.email,
|
||||
occupation:this.CompanyName,
|
||||
country:this.Country,
|
||||
}
|
||||
this.store.commit("upUserDetail", value)
|
||||
window.location.reload();
|
||||
@@ -443,7 +490,17 @@ export default defineComponent({
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.gallerySelect{
|
||||
margin-top: 1rem;
|
||||
:deep(.ant-select-selector){
|
||||
height: 5rem;
|
||||
border: 0.1rem solid #dfdfdf;
|
||||
border-radius: 2.5rem;
|
||||
}
|
||||
:deep(.ant-select-selector):hover{
|
||||
border: 0.1rem solid #000;
|
||||
}
|
||||
}
|
||||
.login_form_input {
|
||||
width: 100%;
|
||||
height: 5rem;
|
||||
|
||||
@@ -603,7 +603,7 @@ export default {
|
||||
notModifiable:'Not modifiable',
|
||||
remainingModifications:'Remaining this month:',
|
||||
Country:'Country',
|
||||
CompanyName:'Company Name',
|
||||
CompanyName:'Occupation',
|
||||
//account首页
|
||||
myInfor:'My lnformation',
|
||||
bindWeChat:'Bind WeChat/gmail',
|
||||
|
||||
@@ -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:{
|
||||
|
||||
@@ -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;//是否完成新手指引
|
||||
/**
|
||||
|
||||
@@ -131,6 +131,7 @@ export const Https = {
|
||||
changeUserLanguage:`/api/account/changeUserLanguage`, //切换用户当前语言
|
||||
uploadAvatar:`/api/account/uploadAvatar`, //修改头像
|
||||
editUserName:`/api/account/editUserName`, //修改用户名
|
||||
updateUserInfo:`/api/account/updateUserInfo`, //修改国家职业
|
||||
accountDetail:`/api/account/getAccountDetail`, //用户详细信息
|
||||
|
||||
trialUserLogout:`/account/trialUserLogout`, //试用用户退出登录接口
|
||||
@@ -260,6 +261,7 @@ export const Https = {
|
||||
//管理员接口
|
||||
//查询所有试用用户
|
||||
inquiryGetTrial:`/api/inquiry/getTrial`,//查询所有试用用户
|
||||
getCities:`/api/inquiry/getCities`,//获取所有付款订单使用的国家
|
||||
getUserInfo:`/api/inquiry/getUserInfo`,//查询所有用户
|
||||
queryTransaction:`/api/inquiry/queryTransaction`,//查询交易记录
|
||||
//查询某个时间内design点击次数
|
||||
|
||||
@@ -286,6 +286,11 @@ export default defineComponent({
|
||||
store.commit('setAllUserList',rv);
|
||||
}
|
||||
})
|
||||
Https.axiosGet(Https.httpUrls.getCities,).then((rv: any) => {
|
||||
if (rv) {
|
||||
store.commit('setAllCitiesList',rv);
|
||||
}
|
||||
})
|
||||
let allCountry = country
|
||||
sessionStorage.setItem('allCountry',JSON.stringify(allCountry));
|
||||
// state.nowPageName = state.rootSubmenuKeys[0].name
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user