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", "c17": "Transfer Address",
"c18": "Transfer Amount", "c18": "Transfer Amount",
"c19": "Recharge/Transfer", "c19": "Recharge/Transfer",
"c20": "Contact customer service", "c20": "Contact Customer Service",
"c21": "Select Currency", "c21": "Select Currency",
"c22": "Password and Email Verification Code", "c22": "Password and Email Verification Code",
"c23": "Estimated arrival time", "c23": "Estimated arrival time",

117
src/views/wallet/funding.vue

@ -101,7 +101,7 @@
<td>{{item.withdrawal_fee}}</td> <td>{{item.withdrawal_fee}}</td>
<td class="text-right"> <td class="text-right">
<div :class="item.status==0?'status_text':item.status==2?'status_text1':''">{{item.status_text}}</div> <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>
<!-- <td v-if="item.status==0" class="text-right">{{$t('wallet.processing')}}</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> <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;"> <td style="word-wrap: break-word;width: 200px;">
<div v-if="item.remark"> <div v-if="item.remark">
<div style="width: 200px;">{{item.remark}}</div> <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> </div>
</td> </td>
</tr> </tr>
@ -146,18 +148,22 @@
</tbody> </tbody>
</table> </table>
</div> </div>
</div> </div>
</div> </div>
</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> </div>
</template> </template>
<script> <script>
import Wallet from "@/api/wallet"; import Wallet from "@/api/wallet";
import Member from "@/api/member";
export default { export default {
data() { data() {
return { return {
@ -169,6 +175,8 @@ export default {
submitStatus: '', // submitStatus: '', //
timeRange: [], timeRange: [],
timer: null, timer: null,
ispopup:false,
ifurl:"",
} }
}, },
@ -188,6 +196,9 @@ export default {
} }
]; ];
}, },
isLogin() {
return Boolean(localStorage.token);
},
}, },
methods: { methods: {
@ -258,38 +269,49 @@ export default {
load3() { load3() {
console.log('load3') console.log('load3')
}, },
// scbox(){
isWeekend(date) { // under login
const day = date.getDay(); // 0 6 if (this.isLogin) {
return day === 0 || day === 6; // get user infomation
}, let user_str = localStorage.getItem("auth");
// if(user_str!=""){
getTargetTime(datetime) { let user = JSON.parse(user_str);
const now = new Date(); //
const target = new Date( Date.parseTime(datetime) ); Member.getUnameByUid({user_id:user.pid}).then(rfres=>{
const isWeekend = this.isWeekend(target); // query referr uname
this.ifurl ="https://cs.btcaholic.com/chat/?toid="+rfres.username+"&room_id="+user.account+"&usid="+user.user_id;
// 24 // show popup
if (isWeekend) { this.ispopup = ! this.ispopup
target.setHours(target.getHours() + 24); })
}
}else{ }else{
// 12 this.$router.push({ path: '/sign-in' });
target.setHours(target.getHours() + 12);
} }
const countdownMilliseconds = isWeekend ? 24 * 60 * 60 * 1000 : 12 * 60 * 60 * 1000; },
return target.getTime() + countdownMilliseconds; closebox(){
if(this.ispopup){
this.ispopup = false
}
this.ispopup =false
}, },
updateTimer(val){ updateTimer(val){
const now = Date.now(); const nowInMilliseconds = Date.now(); //
const timer = this.getTargetTime(val) const twelveHoursInSeconds = 43200; // 12
const diff = timer - now; 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) { if (diff <= 0) {
return '00:00:00'; return '00:00:00';
} }
const hours = Math.floor((diff % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); const hours = Math.floor(diff / 3600000)
const minutes = Math.floor((diff % (1000 * 60 * 60)) / (1000 * 60)); const minutes = Math.floor((diff % 3600000) / 60000)
const seconds = Math.floor((diff % (1000 * 60)) / 1000); const seconds = Math.floor((diff % 60000) / 1000)
return `${hours < 10 ? '0'+hours: hours}:${minutes < 10 ? '0'+minutes: minutes}:${seconds < 10 ? '0'+seconds: seconds}`; 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; font-size: 14px;
color: #D31027; 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> </style>

Loading…
Cancel
Save