优化登录和注册界面

This commit is contained in:
季圣华
2022-07-21 00:09:17 +08:00
parent 7186017965
commit e729fb5378
2 changed files with 48 additions and 6 deletions

View File

@@ -48,7 +48,7 @@
<a-col> <a-col>
© 2015-2030 {{systemTitle}} - Powered By © 2015-2030 {{systemTitle}} - Powered By
<a style="color:#00458a;" :href="systemUrl" target="_blank">官方网站</a> <a style="color:#00458a;" :href="systemUrl" target="_blank">官方网站</a>
<span v-if="showWeixinSpan()" class="weixin" @mouseover="showWeixin" @click="hideWeixin">微信小程序</span> <span v-if="showWeixinSpan()" class="weixin" @mouseover="showWeixin" @click="changeWeixinStatus">微信小程序</span>
</a-col> </a-col>
</a-row> </a-row>
</div> </div>
@@ -304,9 +304,13 @@
showWeixin() { showWeixin() {
this.showWeixinFlag = true this.showWeixinFlag = true
}, },
hideWeixin() { changeWeixinStatus() {
this.showWeixinFlag = false if(this.showWeixinFlag) {
} this.showWeixinFlag = false
} else {
this.showWeixinFlag = true
}
},
} }
} }
</script> </script>

View File

@@ -5,7 +5,7 @@
<a-form-item <a-form-item
fieldDecoratorId="username" fieldDecoratorId="username"
:fieldDecoratorOptions="{rules: [{ required: true, message: '用户名不能为空'}, { validator: this.handleUserName}], validateTrigger: ['change', 'blur'], validateFirst: true}"> :fieldDecoratorOptions="{rules: [{ required: true, message: '用户名不能为空'}, { validator: this.handleUserName}], validateTrigger: ['change', 'blur'], validateFirst: true}">
<a-input size="large" type="text" autocomplete="false" placeholder="请输入用户名"></a-input> <a-input size="large" type="text" @focus="initWeixin" autocomplete="false" placeholder="请输入用户名"></a-input>
</a-form-item> </a-form-item>
<a-popover placement="rightTop" trigger="click" :visible="state.passwordLevelChecked"> <a-popover placement="rightTop" trigger="click" :visible="state.passwordLevelChecked">
@@ -69,9 +69,14 @@
<a-col> <a-col>
© 2015-2030 {{systemTitle}} - Powered By © 2015-2030 {{systemTitle}} - Powered By
<a style="color:#00458a;" :href="systemUrl" target="_blank">官方网站</a> <a style="color:#00458a;" :href="systemUrl" target="_blank">官方网站</a>
<span v-if="showWeixinSpan()" class="weixin" @mouseover="showWeixin" @click="changeWeixinStatus">微信小程序</span>
</a-col> </a-col>
</a-row> </a-row>
</div> </div>
<div v-if="showWeixinFlag" style="text-align: center; padding-top: 10px;">
<img src="/static/weixin.jpg" style="width:258px" />
</div>
</a-form> </a-form>
</div> </div>
</template> </template>
@@ -120,7 +125,8 @@
percent: 10, percent: 10,
progressColor: '#FF0000' progressColor: '#FF0000'
}, },
registerBtn: false registerBtn: false,
showWeixinFlag:false,
} }
}, },
computed: { computed: {
@@ -280,6 +286,32 @@
}); });
this.registerBtn = false; this.registerBtn = false;
}, },
initWeixin() {
if(this.showWeixinSpan()) {
let that = this
setTimeout(function() {
that.showWeixin()
},1000)
}
},
showWeixinSpan() {
let host = window.location.host
if(host === 'cloud.huaxiaerp.vip') {
return true
} else {
return false
}
},
showWeixin() {
this.showWeixinFlag = true
},
changeWeixinStatus() {
if(this.showWeixinFlag) {
this.showWeixinFlag = false
} else {
this.showWeixinFlag = true
}
},
}, },
watch: { watch: {
'state.passwordLevel'(val) { 'state.passwordLevel'(val) {
@@ -343,4 +375,10 @@
.login-copyright, .login-copyright a { .login-copyright, .login-copyright a {
color: #666 color: #666
} }
.login-copyright .weixin {
padding-left:10px;
color: red;
cursor:pointer
}
</style> </style>