-
+
-
- 余额:1
- 余额:20
- 余额:30
- 余额:40
+
+ 余额:{{ userTimeMoneyDto.btc }}
+ 余额:{{ userTimeMoneyDto.usdt }}
+ 余额:{{ userTimeMoneyDto.eos }}
+ 余额:{{ userTimeMoneyDto.eth }}
@@ -32,18 +51,33 @@
diff --git a/src/pages/yyyflogin.vue b/src/pages/yyyflogin.vue
index d154540..02d131c 100644
--- a/src/pages/yyyflogin.vue
+++ b/src/pages/yyyflogin.vue
@@ -19,6 +19,8 @@ export default {
loading: null,
tel: null,
pass: null,
+ //0 考试 1 练习 2 不计分
+ reqType: null,
};
},
@@ -26,6 +28,7 @@ export default {
created() {
this.startLoading();
let params = this.parseUrl();
+ this.reqType = params.reqType;
//判断是否来自以渔有方
if (
!$.isEmptyObject(params) &&
@@ -112,7 +115,8 @@ export default {
//保存登录的token到cookie
// Cookie.set('token', res.data.data.token);
localStorage.setItem('token', res.data.data.token);
-
+ //重复提交标识
+ localStorage.setItem('isSubmit', JSON.stringify(false));
//保存登录的用户信息到cookie
// Cookie.set('userData', res.data.data);
localStorage.setItem('userData', JSON.stringify(res.data.data));
@@ -125,43 +129,40 @@ export default {
// 保存邀请码信息
localStorage.setItem('invitationCode', res.data.data.invitationCode);
this.endLoading();
- location.href = '/';
+ location.href = '/entry';
} else {
this.$message.warning(res.data.msg);
}
});
},
loginFromYyyf: function(params) {
+ let self = this;
signInYyyf(params).then(res => {
if (res.data.code === 200) {
let status = res.data.data.status;
+ localStorage.setItem('yyyfToken', res.data.data.yyyfUserToken);
+
+ //0 考试 1 练习 2 不计分
+ localStorage.setItem('reqType', self.reqType);
+ if (self.reqType == 0) {
+ //考试 保留考试剩余
+ localStorage.setItem('remainingTime', res.data.data.remainingTime);
+ }
+
if (status == 1) {
//保存登录的token到cookie
// Cookie.set('token', res.data.data.token);
- localStorage.setItem('yyyfToken', res.data.data.yyyfUserToken);
- let code = res.data.data.code;
- this.tel = res.data.data.tel;
- this.pass = res.data.data.password;
- //注册
- if (code != undefined && code != '') {
- let signParams = {
- tel: this.tel,
- nickName: res.data.data.nickName,
- code: res.data.data.code,
- password: this.pass,
- internationalCode: null,
- invitationCode: '',
- };
- this.sign(signParams);
- } else {
- this.login();
- }
+ self.dealLogin(res);
} else {
this.$message.warning({
message: res.data.data.msg,
onClose: function() {
- this.closeWindow();
+ if (status == 3) {
+ self.dealLogin(res);
+ } else {
+ self.closeWindow();
+ }
},
});
}
@@ -169,12 +170,31 @@ export default {
this.$message.warning({
message: res.data.msg,
onClose: function() {
- this.closeWindow();
+ self.closeWindow();
},
});
}
});
},
+ dealLogin: function(res) {
+ let code = res.data.data.code;
+ this.tel = res.data.data.tel;
+ this.pass = res.data.data.password;
+ //注册
+ if (code != undefined && code != '') {
+ let signParams = {
+ tel: this.tel,
+ nickName: res.data.data.nickName,
+ code: res.data.data.code,
+ password: this.pass,
+ internationalCode: null,
+ invitationCode: '',
+ };
+ this.sign(signParams);
+ } else {
+ this.login();
+ }
+ },
closeWindow: function() {
if (
navigator.userAgent.indexOf('Firefox') != -1 ||