修复产品提的bug(全景显示、返回、资金管理显示0)

master
unclekh 4 years ago
parent 2ec42a85a0
commit c4eb40e80b
  1. 2
      src/api/app.js
  2. 94
      src/components/balances/banlanes-tabds.vue
  3. 94
      src/components/balances/bibi-balances/bibi-balances-table.vue
  4. 72
      src/components/common/header.vue
  5. 210
      src/pages/entry.vue

@ -10,7 +10,7 @@ export const userApi = 'https://www.zhixinchains.com/user'; //用户
export const FILE_URL = 'https://file.zhixinchains.com/'; //图片地址
export const yyyfApi = 'https://file.zhixinchains.com/yyyfuser'; //用户
export const yyyfApi = 'httpsz://www.zhixinchains.com/yyyfuser'; //用户
// export const c2cApi = 'https://c2c.flamex.io'; //法币
// export const btcApi = 'https://btc.flamex.io'; //BTC钱包

@ -261,13 +261,99 @@
</el-col>
</el-row>
<!-- 判断是否有记录 ,无则显示 -->
<el-row v-else class="no-data1">
<el-col class="no-data">
<el-row v-else class="cec-table gundong"
>
<el-col
class="cec-title" >
<!-- 币种 -->
<div>
<img src="../../assets/home/ic_shuju.png" alt />
<span type="text" style="cursor: default;">BTC</span>
</div>
<!-- 可用 -->
<div>
<span type="text" class="white size">0</span>
</div>
<!-- 冻结 -->
<div>
<span type="text" class="white size">0</span>
</div>
<div>
<!-- 充值 -->
<span
class="blue" type="text">-</span>
</div>
<div>{{ $t('balances.table.header_nodata') }}</div>
</el-col>
<el-col
class="cec-title" >
<!-- 币种 -->
<div>
<span type="text" style="cursor: default;">ETH</span>
</div>
<!-- 可用 -->
<div>
<span type="text" class="white size">0</span>
</div>
<!-- 冻结 -->
<div>
<span type="text" class="white size">0</span>
</div>
<div>
<!-- 充值 -->
<span
class="blue" type="text">-</span>
</div>
</el-col>
<el-col
class="cec-title" >
<!-- 币种 -->
<div>
<span type="text" style="cursor: default;">EOS</span>
</div>
<!-- 可用 -->
<div>
<span type="text" class="white size">0</span>
</div>
<!-- 冻结 -->
<div>
<span type="text" class="white size">0</span>
</div>
<div>
<!-- 充值 -->
<span
class="blue" type="text">-</span>
</div>
</el-col>
<el-col
class="cec-title" >
<!-- 币种 -->
<div>
<span type="text" style="cursor: default;">USDT</span>
</div>
<!-- 可用 -->
<div>
<span type="text" class="white size">0</span>
</div>
<!-- 冻结 -->
<div>
<span type="text" class="white size">0</span>
</div>
<div>
<!-- 充值 -->
<span
class="blue" type="text">-</span>
</div>
</el-col>
</el-row>
</div>
<!-- </main> -->

@ -259,13 +259,99 @@
</el-col>
</el-row>
<!-- 判断是否有记录 ,无则显示 -->
<el-row v-else class="no-data1">
<el-col class="no-data">
<el-row v-else class="cec-table gundong"
>
<el-col
class="cec-title" >
<!-- 币种 -->
<div>
<span type="text" style="cursor: default;">BTC</span>
</div>
<!-- 可用 -->
<div>
<span type="text" class="white size">0</span>
</div>
<!-- 冻结 -->
<div>
<img src="../../../assets/home/ic_shuju.png" alt />
<span type="text" class="white size">0</span>
</div>
<div>
<!-- 充值 -->
<span
class="blue" type="text">-</span>
</div>
<div>{{ $t('balances.table.header_nodata') }}</div>
</el-col>
<el-col
class="cec-title" >
<!-- 币种 -->
<div>
<span type="text" style="cursor: default;">ETH</span>
</div>
<!-- 可用 -->
<div>
<span type="text" class="white size">0</span>
</div>
<!-- 冻结 -->
<div>
<span type="text" class="white size">0</span>
</div>
<div>
<!-- 充值 -->
<span
class="blue" type="text">-</span>
</div>
</el-col>
<el-col
class="cec-title" >
<!-- 币种 -->
<div>
<span type="text" style="cursor: default;">EOS</span>
</div>
<!-- 可用 -->
<div>
<span type="text" class="white size">0</span>
</div>
<!-- 冻结 -->
<div>
<span type="text" class="white size">0</span>
</div>
<div>
<!-- 充值 -->
<span
class="blue" type="text">-</span>
</div>
</el-col>
<el-col
class="cec-title" >
<!-- 币种 -->
<div>
<span type="text" style="cursor: default;">USDT</span>
</div>
<!-- 可用 -->
<div>
<span type="text" class="white size">0</span>
</div>
<!-- 冻结 -->
<div>
<span type="text" class="white size">0</span>
</div>
<div>
<!-- 充值 -->
<span
class="blue" type="text">-</span>
</div>
</el-col>
</el-row>
</div>
<!-- </main> -->

@ -4,7 +4,7 @@
<!-- 左侧 nav -->
<div class="leftNav">
<a class="logoBox" href="javascript:history.go(-1);">
<el-button type="info" @click="submitExam">&lt; 返回</el-button>
<el-button type="info" >&lt; 返回</el-button>
</a>
<ul class="nav-menu">
<!-- menu -->
@ -276,7 +276,7 @@ export default {
{id: 'security', name: this.$t('personal.leftNav.security')},
{id: 'manner', name: this.$t('personal.leftNav.manner')},
{id: 'prove', name: this.$t('personal.leftNav.prove')},
{id: 'out', name: this.$t('nav.menu_logOut')},
/* {id: 'out', name: this.$t('nav.menu_logOut')},*/
],
},
userData: '',
@ -396,74 +396,6 @@ export default {
format: function(num, n) {
return (Array(n).join(0) + num).slice(-n);
},
submitExam: function() {
let self = this;
//
if (!self.isSubmit) {
self.isSubmit = true;
} else {
return false;
}
submit().then(res => {
if (res.data.code === 200) {
this.$message.success({
message: '提交成功',
onClose: function() {
if (self.reqType == 0) {
self.closeWindow();
} else {
localStorage.setItem('isSubmit', JSON.stringify(true));
self.isSubmit = false;
}
},
});
} else {
this.$message.warning({
message: res.data.msg,
onClose: function() {
self.closeWindow();
},
});
}
});
},
reStartTest: function() {
let self = this;
//
if (!self.isSubmit) {
this.isSubmit = true;
} else {
return false;
}
//退
this.exit(1);
reStart().then(res => {
if (res.data.code === 200) {
this.$message.success({
message: '重新开始成功',
onClose: function() {
let signParams = {
tel: res.data.data.tel,
nickName: res.data.data.nickName,
code: res.data.data.code,
password: res.data.data.password,
internationalCode: null,
invitationCode: '',
};
self.sign(signParams);
},
});
} else {
this.$message.warning({
message: res.data.msg,
onClose: function() {
self.closeWindow();
},
});
}
});
},
sign(params) {
signUp(params).then(res => {
if (res.data.code === 200) {

@ -173,6 +173,9 @@ import NavHeader from '@/components/common/header';
import Footer from '@/components/common/footer';
import {getUserTimeMoneyDto} from '@/api/yyyf';
import {getLeftPrice} from '@/api/currency.js';
import {submit, reStart} from '@/api/yyyf';
import {logOut} from '@/api/user';
import {signUp, signIn} from '@/api/user';
export default {
name: 'entry',
data() {
@ -180,6 +183,12 @@ export default {
activeName: 'BTC',
userTimeMoneyDto: {},
tatolPrice: 0,
//0 1 2
reqType: 2,
//
remainingTime: 0,
//
isSubmit: false,
};
},
components: {
@ -187,9 +196,180 @@ export default {
Footer,
},
methods: {
getUserTimeMoneyDtoMethod(){
let ths=this;
getUserTimeMoneyDto().then(res => {
if (res.data.code === 200) {
ths.userTimeMoneyDto = res.data.data;
this.getUSDTPrie();
} else {
ths.$message.warning({
message: res.data.msg,
onClose: function() {
ths.closeWindow();
},
});
}
});
},
login(params) {
signIn(params).then(res => {
// console.log(res);
if (res.data.code === 200) {
//
// if( this.checked === true ){
// Cookie.set('phoneNum',num)
// Cookie.set('password',pass)
// }
//tokencookie
// 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));
// console.log(JSON.parse(localStorage.getItem('userData')));
// userIDcookie
// Cookie.set('userID', res.data.data.id);
localStorage.setItem('userID', res.data.data.id);
//
localStorage.setItem('invitationCode', res.data.data.invitationCode);
this.isSubmit = false;
location.href = '/entry';
} else {
this.$message.warning(res.data.msg);
this.isSubmit = false;
}
});
},
closeWindow: function() {
if (
navigator.userAgent.indexOf('Firefox') != -1 ||
navigator.userAgent.indexOf('Chrome') != -1
) {
window.location.href = 'about:blank';
window.close();
} else {
window.opener = null;
window.open('', '_self');
window.close();
}
},
sign(params) {
signUp(params).then(res => {
if (res.data.code === 200) {
this.login({
tel: params.tel,
password: params.password,
});
} else {
this.$message.warning(res.data.msg);
this.isSubmit = false;
}
});
},
exit(params) {
logOut().then(res => {
if (res.data.code === 200 || res.data.code === 202) {
// Cookie.set('userData', '');
localStorage.setItem('userData', '');
localStorage.removeItem('userpass');
localStorage.removeItem('userdate');
localStorage.removeItem('nowPassNOValue');
if (params == undefined) {
//window.location.href = '/';
this.closeWindow();
}
// let pathName = window.location.pathname.split('/')[1];
// console.log(pathName);
//退
// if (pathName === 'personal') {
// window.location.href = '/login';
// } else {
// window.location.href = this.perUrl;
// }
} else {
this.$message.warning(res.data.msg);
}
});
},
goIndex() {
window.open('/', '_blank');
},
submitExam: function() {
debugger;
let self = this;
//
if (!self.isSubmit) {
self.isSubmit = true;
} else {
return false;
}
submit().then(res => {
if (res.data.code === 200) {
this.$message.success({
message: '提交成功',
onClose: function() {
if (self.reqType == 0) {
self.closeWindow();
} else {
localStorage.setItem('isSubmit', JSON.stringify(true));
self.isSubmit = false;
}
self.getUserTimeMoneyDtoMethod();
},
});
} else {
this.$message.warning({
message: res.data.msg,
onClose: function() {
self.closeWindow();
},
});
}
});
},
reStartTest: function() {
let self = this;
//
if (!self.isSubmit) {
this.isSubmit = true;
} else {
return false;
}
//退
this.exit(1);
reStart().then(res => {
if (res.data.code === 200) {
this.$message.success({
message: '重新开始成功',
onClose: function() {
let signParams = {
tel: res.data.data.tel,
nickName: res.data.data.nickName,
code: res.data.data.code,
password: res.data.data.password,
internationalCode: null,
invitationCode: '',
};
self.sign(signParams);
},
});
} else {
this.$message.warning({
message: res.data.msg,
onClose: function() {
self.closeWindow();
},
});
}
});
},
getUSDTPrie() {
getLeftPrice().then(res => {
this.USDTPrie = res.data.data;
@ -250,19 +430,23 @@ export default {
},
},
created() {
getUserTimeMoneyDto().then(res => {
if (res.data.code === 200) {
this.userTimeMoneyDto = res.data.data;
this.getUSDTPrie();
} else {
this.$message.warning({
message: res.data.msg,
onClose: function() {
this.closeWindow();
},
});
}
});
let ths=this;
ths.getUserTimeMoneyDtoMethod();
let yyyfToken = localStorage.getItem('yyyfToken');
this.isSubmit = localStorage.getItem('isSubmit') == 'true' ? true : false;
if (yyyfToken == '' || yyyfToken == undefined) {
this.$alert('未从以渔有方登录,点击确定关闭浏览器', '提示', {
type: 'error',
showClose: false,
confirmButtonText: '确定',
confirmButtonClass: 'btn-self-style',
callback: () => {
ths.closeWindow();
},
});
} else {
ths.reqType = localStorage.getItem('reqType');
}
},
};
</script>

Loading…
Cancel
Save