Compare commits
No commits in common. "b4203b3ae50078e84f0b16313280715415b19fc4" and "f451e44715d3ac7bd83b07a0095f8676d5e5386b" have entirely different histories.
b4203b3ae5
...
f451e44715
@ -45,7 +45,7 @@
|
|||||||
:hair-line="false"
|
:hair-line="false"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="getSmsCode"
|
@click="getSmsCode"
|
||||||
>{{ parseInt(verifyText) > 0 ? `${verifyText}S` : verifyText }}</u-button
|
>{{ verifyText }}</u-button
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
</u-input>
|
</u-input>
|
||||||
@ -82,7 +82,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import { mapActions, mapState } from "vuex";
|
import { mapActions, mapState } from "vuex";
|
||||||
import { GetSmsCode } from "../../api/login";
|
import { GetSmsCode } from "../../api/login";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "login",
|
name: "login",
|
||||||
data() {
|
data() {
|
||||||
@ -103,7 +102,7 @@ export default {
|
|||||||
},
|
},
|
||||||
onLoad(options) {},
|
onLoad(options) {},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(["userInfo"]),
|
...mapState("user", ["ukey", "approvalStatus"]),
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
if (this.ukey && [1, 2, 3].includes(this.approvalStatus)) {
|
if (this.ukey && [1, 2, 3].includes(this.approvalStatus)) {
|
||||||
@ -122,7 +121,6 @@ export default {
|
|||||||
},
|
},
|
||||||
onHide() {},
|
onHide() {},
|
||||||
methods: {
|
methods: {
|
||||||
...mapActions("user", ["GetLogin", "GetSmsCode", "GetAccountLogin"]),
|
|
||||||
// 手机注册
|
// 手机注册
|
||||||
async handleRegister() {
|
async handleRegister() {
|
||||||
if (!this.account) {
|
if (!this.account) {
|
||||||
@ -161,13 +159,12 @@ export default {
|
|||||||
await this.GetLogin(params);
|
await this.GetLogin(params);
|
||||||
},
|
},
|
||||||
loadSmsTime() {
|
loadSmsTime() {
|
||||||
clearInterval(this.time);
|
|
||||||
this.time = setInterval(() => {
|
this.time = setInterval(() => {
|
||||||
this.verifyText--;
|
this.verifyText--;
|
||||||
|
|
||||||
uni.setStorageSync("registerSmsTime", this.verifyText);
|
uni.setStorageSync("registerSmsTime", this.verifyText);
|
||||||
|
|
||||||
if (this.verifyText <= 0) {
|
if (this.verifyText == 0) {
|
||||||
clearInterval(this.time);
|
clearInterval(this.time);
|
||||||
this.verifyText = "获取验证码";
|
this.verifyText = "获取验证码";
|
||||||
uni.removeStorageSync("registerSmsTime");
|
uni.removeStorageSync("registerSmsTime");
|
||||||
@ -199,12 +196,12 @@ export default {
|
|||||||
if (Number(this.verifyText) > 0) return;
|
if (Number(this.verifyText) > 0) return;
|
||||||
|
|
||||||
this.verifyText = 60;
|
this.verifyText = 60;
|
||||||
clearInterval(this.time);
|
|
||||||
this.time = setInterval(() => {
|
this.time = setInterval(() => {
|
||||||
this.verifyText--;
|
this.verifyText--;
|
||||||
|
|
||||||
uni.setStorageSync("registerSmsTime", this.verifyText);
|
uni.setStorageSync("registerSmsTime", this.verifyText);
|
||||||
|
|
||||||
if (this.verifyText <= 0) {
|
if (this.verifyText == 0) {
|
||||||
clearInterval(this.time);
|
clearInterval(this.time);
|
||||||
this.verifyText = "获取验证码";
|
this.verifyText = "获取验证码";
|
||||||
uni.removeStorageSync("registerSmsTime");
|
uni.removeStorageSync("registerSmsTime");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user