修复弹窗bug
This commit is contained in:
@@ -16,13 +16,17 @@
|
||||
>
|
||||
<div class="generalModel_btn" v-if="bindType == 'Modify'">
|
||||
<div class="generalModel_closeIcon" @click.stop="cancelDsign()">
|
||||
<!-- <i class="fi fi-rr-cross-small"></i> -->
|
||||
<svg width="46" height="46" viewBox="0 0 46 46" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="23" cy="23" r="23" fill="white" fill-opacity="0.3"/>
|
||||
<rect x="32.5063" y="12" width="3" height="29" rx="1.5" transform="rotate(45 32.5063 12)" fill="white"/>
|
||||
<rect x="34.6274" y="32.5059" width="3" height="29" rx="1.5" transform="rotate(135 34.6274 32.5059)" fill="white"/>
|
||||
</svg>
|
||||
|
||||
<circle cx="23" cy="23" r="23" fill="white" fill-opacity="0.3"/>
|
||||
<rect x="32.5063" y="12" width="3" height="29" rx="1.5" transform="rotate(45 32.5063 12)" fill="white"/>
|
||||
<rect x="34.6274" y="32.5059" width="3" height="29" rx="1.5" transform="rotate(135 34.6274 32.5059)" fill="white"/>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
<div class="generalModel_btn back" v-if="bindType != 'Modify'">
|
||||
<div class="generalModel_closeIcon" @click.stop="setBack()">
|
||||
<span>←</span>
|
||||
<span class="back_text">Back</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="login_page">
|
||||
@@ -48,7 +52,7 @@
|
||||
<div class="login_form_title marign_top30">Email</div>
|
||||
<input
|
||||
class="login_form_input"
|
||||
:class="{active:!!email && bindType != 'Modify'}"
|
||||
:class="{active:!!userDetail.email && bindType != 'Modify'}"
|
||||
placeholder="Enter your email address"
|
||||
v-model="email"
|
||||
:disabled="!!userDetail.email && bindType != 'Modify'"
|
||||
@@ -72,7 +76,7 @@
|
||||
</div>
|
||||
|
||||
<div class="login_form_title marign_top30">{{$t('account.CompanyName')}}:</div>
|
||||
<input class="login_form_input" :class="{active:!!CompanyName}" :disabled="!!userDetail.country" type="text" placeholder="Please enter occupation" v-model="CompanyName">
|
||||
<input class="login_form_input" :class="{active:!!userDetail.occupation}" :disabled="!!userDetail.occupation" type="text" placeholder="Please enter occupation" v-model="CompanyName">
|
||||
|
||||
</div>
|
||||
|
||||
@@ -145,12 +149,14 @@ import { useStore } from "vuex";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { setLang } from "@/tool/guide";
|
||||
import { country } from "@/tool/country";
|
||||
import { useRouter } from "vue-router";
|
||||
export default defineComponent({
|
||||
components: {
|
||||
VerificationCodeInput,
|
||||
},
|
||||
setup(prop, { emit }){
|
||||
const bindType = ''
|
||||
const router = useRouter()
|
||||
let timer:any = 0;
|
||||
const {locale} = useI18n()
|
||||
const store = useStore();
|
||||
@@ -180,6 +186,7 @@ export default defineComponent({
|
||||
register.email = email == '-------------'?'':email
|
||||
})
|
||||
return{
|
||||
router,
|
||||
store,
|
||||
timer,
|
||||
userDetail,
|
||||
@@ -358,6 +365,9 @@ export default defineComponent({
|
||||
},
|
||||
cancelDsign(){
|
||||
this.store.commit('setIsBindEmail', false)
|
||||
},
|
||||
setBack(){
|
||||
this.router.push({path:'/login'})
|
||||
}
|
||||
},
|
||||
});
|
||||
@@ -382,9 +392,29 @@ export default defineComponent({
|
||||
}
|
||||
</style>
|
||||
<style lang="less" scoped>
|
||||
.generalModel_btn{
|
||||
&.back{
|
||||
.generalModel_closeIcon{
|
||||
border-radius: 0;
|
||||
right: auto;
|
||||
left: 0;
|
||||
border: none;
|
||||
font-size: 2rem;
|
||||
font-weight: 600;
|
||||
transform: translate(100%, 100%);
|
||||
.back_text{
|
||||
text-decoration: underline;
|
||||
}
|
||||
span{
|
||||
margin-right: .5rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.login_page {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
.page_content {
|
||||
// position: relative;
|
||||
.login_content {
|
||||
|
||||
@@ -356,7 +356,9 @@ window.addEventListener("beforeunload", (e) => {
|
||||
});
|
||||
var vuex_setUserDetail:any = localStorage.getItem("vuex_setUserDetail");
|
||||
if (vuex_setUserDetail) {
|
||||
store.commit("setUserDetail", JSON.parse(vuex_setUserDetail));
|
||||
if(JSON.parse(vuex_setUserDetail).email != '-------------'){
|
||||
store.commit("setUserDetail", JSON.parse(vuex_setUserDetail));
|
||||
}
|
||||
// localStorage.removeItem("vuex_setUserDetail");
|
||||
}
|
||||
|
||||
|
||||
@@ -210,8 +210,6 @@ const userHabit : Module<UserHabit,RootState> = {
|
||||
state.userDetail.occupation = data.occupation//头像
|
||||
state.userDetail.usernameModify = data.usernameModify//当月剩余修改次数
|
||||
state.userDetail.isBeginner = data.isBeginner == 1 ? true : false;//是否完成新手指引
|
||||
console.log(data);
|
||||
|
||||
if(
|
||||
(!data.email && state.userDetail.email == '-------------') ||
|
||||
(!data.country && !state.userDetail.country) ||
|
||||
@@ -347,10 +345,7 @@ const userHabit : Module<UserHabit,RootState> = {
|
||||
let getUserDetail = ()=>{
|
||||
return new Promise((resolve,reject) => {
|
||||
Https.axiosPost(Https.httpUrls.accountDetail).then((rv: any) => {
|
||||
console.log(rv,'rv1');
|
||||
if(rv){
|
||||
console.log(rv,'rv');
|
||||
|
||||
context.commit('setUserDetail',rv)
|
||||
}
|
||||
resolve('')
|
||||
|
||||
Reference in New Issue
Block a user