|
|
@@ -18,10 +18,31 @@
|
|
|
auto-complete="off"
|
|
|
class="msg"
|
|
|
placeholder="短信验证码"></el-input>
|
|
|
- <el-button type="primary" class="code"
|
|
|
- v-show="sendEnterpriseCode"
|
|
|
- @click="getCheckCode"
|
|
|
- :disabled="getCodeBtnIsDisabled">获取验证码</el-button>
|
|
|
+
|
|
|
+ <!--<el-button type="primary" class="code"-->
|
|
|
+ <!--v-show="sendEnterpriseCode"-->
|
|
|
+ <!--@click="getCheckCode"-->
|
|
|
+ <!--:disabled="getCodeBtnIsDisabled">获取验证码</el-button>-->
|
|
|
+ <el-popover
|
|
|
+ placement="top"
|
|
|
+ width="300"
|
|
|
+ v-model="visible2">
|
|
|
+ <div>
|
|
|
+ <el-input type="text"
|
|
|
+ v-model="ImgCode"
|
|
|
+ auto-complete="off"
|
|
|
+ class="code-input2"></el-input>
|
|
|
+ <img id="captchaImage2" class="code-img" src="/sso/login/checkCode"/>
|
|
|
+ <a class="code-click" @click="getCode" style="font-size: 12px">看不清换一张</a>
|
|
|
+ </div>
|
|
|
+ <div style="text-align: right; margin: 0">
|
|
|
+ <el-button size="mini" type="text" @click="visible2 = false">取消</el-button>
|
|
|
+ <el-button type="primary" size="mini" @click="getCheckCode">确定</el-button>
|
|
|
+ </div>
|
|
|
+ <el-button type="primary" class="code"
|
|
|
+ v-show="sendEnterpriseCode" slot="reference" :disabled="getCodeBtnIsDisabled">获取验证码</el-button>
|
|
|
+ </el-popover>
|
|
|
+
|
|
|
<el-button type="primary" v-show="!sendEnterpriseCode" class="code code-send">已发送({{enterprise_time}}s)</el-button>
|
|
|
<span v-show="codeErrorChecked" class="codeError-tip">{{codeErrorMsg}}</span>
|
|
|
</el-form-item>
|
|
|
@@ -113,7 +134,7 @@
|
|
|
<loading v-show="isShowLoading"/>
|
|
|
</div>
|
|
|
<!--尾部-->
|
|
|
- <div v-html="loginStyle.footUrl" class="footer"></div>
|
|
|
+ <!--<div v-html="loginStyle.footUrl" class="footer"></div>-->
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -465,6 +486,8 @@
|
|
|
}
|
|
|
}
|
|
|
return {
|
|
|
+ visible2: false,
|
|
|
+ ImgCode: '',
|
|
|
// 企业注册第一步
|
|
|
enterprise: {
|
|
|
mobile: '',
|
|
|
@@ -559,9 +582,15 @@
|
|
|
// 获取链接
|
|
|
this.$nextTick(() => {
|
|
|
this.getUrl()
|
|
|
+ this.getCode()
|
|
|
})
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 获取验证码
|
|
|
+ getCode () {
|
|
|
+ let imgSrc = document.getElementById('captchaImage2')
|
|
|
+ imgSrc.setAttribute('src', '/sso/resetPwd/checkCaptcha?timestamp=' + (new Date()).valueOf())
|
|
|
+ },
|
|
|
// 获取链接
|
|
|
getUrl () {
|
|
|
var url = window.location.search
|
|
|
@@ -589,11 +618,20 @@
|
|
|
// 获取校验码
|
|
|
getCheckCode () {
|
|
|
this.isShowLoading = true
|
|
|
- this.$http.get(`/sso/userspace/register/checkCode`, {params: {mobile: this.enterprise.mobile, timestamp: new Date().getTime() + ''}})
|
|
|
+ this.$http.get(`/sso/userspace/register/checkCode`, {params: {mobile: this.enterprise.mobile, timestamp: new Date().getTime() + '', code: this.ImgCode}})
|
|
|
.then(response => {
|
|
|
this.isShowLoading = false
|
|
|
if (response.data) {
|
|
|
this.token = response.data.token
|
|
|
+ if (response.data.errMsg) {
|
|
|
+ this.$message({
|
|
|
+ message: response.data.errMsg,
|
|
|
+ type: 'error'
|
|
|
+ })
|
|
|
+ this.ImgCode = ''
|
|
|
+ this.getCode()
|
|
|
+ return
|
|
|
+ }
|
|
|
if (this.token !== '') {
|
|
|
this.$message({
|
|
|
message: '验证码已经发送到您的手机,请注意查收',
|
|
|
@@ -601,6 +639,8 @@
|
|
|
})
|
|
|
this.sendEnterpriseCode = false
|
|
|
this.enterprise_time = 60
|
|
|
+ this.visible2 = false
|
|
|
+ this.ImgCode = ''
|
|
|
var enterpriseTime = setInterval(() => {
|
|
|
this.enterprise_time--
|
|
|
if (this.enterprise_time <= 0) {
|
|
|
@@ -608,6 +648,7 @@
|
|
|
clearInterval(enterpriseTime)
|
|
|
}
|
|
|
}, 1000)
|
|
|
+ this.getCode()
|
|
|
}
|
|
|
} else {
|
|
|
return Promise.reject(response.data)
|