Browse Source

修改提币记录的联系客服需跳转

master
liaoxinyu 10 months ago
parent
commit
301c82c129
  1. 2
      src/i18n/en.json
  2. 117
      src/views/wallet/funding.vue

2
src/i18n/en.json

@ -227,7 +227,7 @@
"c17": "Transfer Address",
"c18": "Transfer Amount",
"c19": "Recharge/Transfer",
"c20": "Contact customer service",
"c20": "Contact Customer Service",
"c21": "Select Currency",
"c22": "Password and Email Verification Code",
"c23": "Estimated arrival time",

117
src/views/wallet/funding.vue

@ -101,7 +101,7 @@
<td>{{item.withdrawal_fee}}</td>
<td class="text-right">
<div :class="item.status==0?'status_text':item.status==2?'status_text1':''">{{item.status_text}}</div>
<div v-if="item.status==0">{{updateTimer(item.datetime)}}</div>
<div v-if="item.status==0">{{updateTimer(item)}}</div>
</td>
<!-- <td v-if="item.status==0" class="text-right">{{$t('wallet.processing')}}</td>
<td v-if="item.status==1" class="text-right">{{$t('wallet.success')}}</td>
@ -112,7 +112,9 @@
<td style="word-wrap: break-word;width: 200px;">
<div v-if="item.remark">
<div style="width: 200px;">{{item.remark}}</div>
<div v-if="!remarktext(item.updated_at)" style="color: #0089ff;cursor: pointer;">{{$t('common.c20')}}</div>
<div style="display: flex;">
<div v-if="!remarktext(item.updated_at)" class="updated" @click="scbox">{{$t('common.c20')}}</div>
</div>
</div>
</td>
</tr>
@ -146,18 +148,22 @@
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="cspopup" :class='{"hidden":ispopup?"":"none"}'>
<a href="javascript:void(0);" class="close_btn" @click="closebox();">x</a>
<iframe width="100%" height="100%" class="my-modal-body" :src="ifurl" frameborder="0" style="border-radius: 10px;"></iframe>
</div>
</div>
</template>
<script>
import Wallet from "@/api/wallet";
import Member from "@/api/member";
export default {
data() {
return {
@ -169,6 +175,8 @@ export default {
submitStatus: '', //
timeRange: [],
timer: null,
ispopup:false,
ifurl:"",
}
},
@ -188,6 +196,9 @@ export default {
}
];
},
isLogin() {
return Boolean(localStorage.token);
},
},
methods: {
@ -258,38 +269,49 @@ export default {
load3() {
console.log('load3')
},
//
isWeekend(date) {
const day = date.getDay(); // 0 6
return day === 0 || day === 6;
scbox(){
// under login
if (this.isLogin) {
// get user infomation
let user_str = localStorage.getItem("auth");
if(user_str!=""){
let user = JSON.parse(user_str);
//
Member.getUnameByUid({user_id:user.pid}).then(rfres=>{
// query referr uname
this.ifurl ="https://cs.btcaholic.com/chat/?toid="+rfres.username+"&room_id="+user.account+"&usid="+user.user_id;
// show popup
this.ispopup = ! this.ispopup
})
}
}else{
this.$router.push({ path: '/sign-in' });
}
},
//
getTargetTime(datetime) {
const now = new Date();
const target = new Date( Date.parseTime(datetime) );
const isWeekend = this.isWeekend(target);
// 24
if (isWeekend) {
target.setHours(target.getHours() + 24);
} else {
// 12
target.setHours(target.getHours() + 12);
closebox(){
if(this.ispopup){
this.ispopup = false
}
const countdownMilliseconds = isWeekend ? 24 * 60 * 60 * 1000 : 12 * 60 * 60 * 1000;
return target.getTime() + countdownMilliseconds;
this.ispopup =false
},
updateTimer(val){
const now = Date.now();
const timer = this.getTargetTime(val)
const diff = timer - now;
const nowInMilliseconds = Date.now(); //
const twelveHoursInSeconds = 43200; // 12
const nowInSeconds = Math.floor(nowInMilliseconds / 1000); //
const adjustedNowInSeconds = nowInSeconds - twelveHoursInSeconds; //
//
const adjustedNowInMilliseconds = adjustedNowInSeconds * 1000;
const timer = val.newdatetime * 1000
const diff = timer - adjustedNowInMilliseconds;
if (diff <= 0) {
return '00:00:00';
}
const hours = Math.floor((diff % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
const minutes = Math.floor((diff % (1000 * 60 * 60)) / (1000 * 60));
const seconds = Math.floor((diff % (1000 * 60)) / 1000);
const hours = Math.floor(diff / 3600000)
const minutes = Math.floor((diff % 3600000) / 60000)
const seconds = Math.floor((diff % 60000) / 1000)
return `${hours < 10 ? '0'+hours: hours}:${minutes < 10 ? '0'+minutes: minutes}:${seconds < 10 ? '0'+seconds: seconds}`;
},
@ -353,4 +375,43 @@ export default {
font-size: 14px;
color: #D31027;
}
.cspopup{
position:fixed;
top:50%;
left:50%;
transform: translate(-50%, -50%);
width:560px;
height:560px;
z-index:999;
.close_btn{
width:35px;
height:35px;
font-size:20px;
font-weight:500;
line-height:30px;
text-align:center;
display:block;
color:#fff;
background:#553646;
border-radius:50%;
position:absolute;
right:-10px;
top:-10px;
z-index:1000;
}
}
.hidden{
display:none;
}
.updated{
color: #fff;
padding: 5px;
display: flex;
cursor: pointer;
border-radius: 5px;
background-color: #0089ff;
text-align: center;
}
</style>

Loading…
Cancel
Save