Browse Source

隐藏高级认证不必要的认证、修改k线固定为美国时间、新增客服和提醒、显示撤销按钮和撤销回复

master
liaoxinyu 11 months ago
parent
commit
8bb89fd4ef
  1. 46
      App.vue
  2. 12
      api/home.js
  3. 28
      api/member.js
  4. 4
      i18n/lang/en.json
  5. 4
      i18n/lang/zh-TW.json
  6. 3
      pages.json
  7. 54
      pages/assets/records.vue
  8. 4
      pages/auth/senior.vue
  9. 52
      pages/base/home.vue
  10. 118
      pages/oncs/onservice.vue
  11. 2
      pages/safe/email.vue
  12. 15
      static/chart_main/sevencoin.js
  13. 1
      static/img/cs_w.svg
  14. 77
      utils/class/date.js

46
App.vue

@ -140,6 +140,52 @@ export default {
color: $text-color;
}
.circle-pulse {
background: red;
width: 7px;
height: 7px;
border-radius: 50%;
position: absolute;
right: -10px;
top: 10px;
}
.circle-pulse:after {
background-color: red;
content: "";
display: table;
border-radius: 50%;
position: absolute;
animation-name: pulse1;
animation-duration: 0.9s;
animation-iteration-count: infinite;
animation-timing-function: ease-out;
}
@keyframes pulse1 {
0% {
opacity: 1;
width: 7px;
height: 7px;
left: 0;
top: 0;
}
95% {
opacity: 0.1;
left: -10.5px;
top: -10.5px;
width: 28px;
height: 28px;
}
100% {
opacity: 0;
width: 7px;
height: 7px;
left: 0;
top: 0;
}
}
/* #ifdef H5 */
.layout-page {
height: 100%!important;

12
api/home.js

@ -20,6 +20,18 @@ class Home {
static option(data){
return Serve.post('/option',data)
}
/*
* 获取未读消息
*/
static chat(){
return Serve.get('/user/chat')
}
/*
* 已读消息
*/
static chatRead(){
return Serve.get('/user/chatRead')
}
}
export default Home;

28
api/member.js

@ -127,18 +127,22 @@ class Member {
static contact () {
return server.get(`/contact`);
}
/**
* 获取图形验证码
* @param data {email,token}
*/
static Graph_che() {
return server.get(`/register/Graph_che`);
}
// 提币获取邮箱验证码
static getWdcode(data){
return server.get(`/user/wdcode`, data);
}
/**
* 获取图形验证码
* @param data {email,token}
*/
static Graph_che() {
return server.get(`/register/Graph_che`);
}
// 提币获取邮箱验证码
static getWdcode(data){
return server.get(`/user/wdcode`, data);
}
// 查询用户的帐号
static getUnameByUid(data){
return server.get(`/user/getUserName`, data);
}
}
export default Member;

4
i18n/lang/en.json

@ -109,7 +109,9 @@
"c5": "your transfer order has been submitted successfully, please wait patiently, and the transfer result will be notified by SMS or e-mail. Please check it carefully. If you have any questions, please contact the customer service in time.",
"c6": "Increase ratio",
"c7": "Current valuation",
"GraphicValidation": "Graphical verification"
"GraphicValidation": "Graphical verification",
"loading": "loading",
"rejection":"Reason for rejection"
},
"base": {
"a0": "Title",

4
i18n/lang/zh-TW.json

@ -109,7 +109,9 @@
"c5": "您的劃轉訂單已提交成功,請耐心等待,劃轉結果會以簡訊或郵件的管道通知。請注意查收,如有疑問請及時聯系客服",
"c6": "漲幅比例",
"c7": "當前估值",
"GraphicValidation": "圖形驗證"
"GraphicValidation": "圖形驗證",
"loading": "加载中",
"rejection":"拒絕理由"
},
"base": {
"a0": "標題",

3
pages.json

@ -173,6 +173,9 @@
{
"path": "pages/service/service"
},
{
"path" : "pages/oncs/onservice"
},
{
"path": "pages/service/index",
"style": {

54
pages/assets/records.vue

@ -16,29 +16,39 @@
<view class="">
<table class="w-max">
<thead class="p-x-md">
<tr class="fn-sm p-x-md">
<th class="p-b-md fn-left p-l-md">{{ $t("assets.c9") }}</th>
<th class="p-b-md fn-left">{{ $t("assets.d0") }}</th>
<th class="p-b-md fn-right p-r-md">{{ $t("assets.c0") }}</th>
<tr class="fn-sm p-x-md" style="display: flex;align-items: center;">
<view class="p-b-md fn-left p-l-md" style="width: 30%;">{{ $t("assets.c9") }}</view>
<view class="p-b-md fn-left" style="width: 20%;">{{ $t("assets.d0") }}</view>
<view class="p-b-md fn-right p-r-md" style="width: 30%;">{{ $t("assets.c0") }}</view>
<view class="p-b-md fn-right p-r-md" style="width: 10%;">{{ $t("exchange.g3") }}</view>
</tr>
</thead>
<tbody>
<tr class="color-light trChange p-x-md rounded-md" v-for="item in list" :key="item.id">
<td class="p-y-xs p-l-md rounded-tl-sm rounded-bl-sm fn-sm">
{{ item.datetime | parseTime }}
</td>
<td v-if="type=='draw'">
<view>{{ item.status_text }}</view>
</td>
<td v-if="type=='recharge'">
<view v-if="item.status==0">{{$t('assets.d1')}}</view>
<view v-if="item.status==1" class="color-buy">{{$t('assets.d2')}}</view>
<view v-if="item.status==2" class="color-sell">{{$t('assets.d3')}}</view>
</td>
<td class="fn-right p-r-md rounded-tr-sm rounded-br-sm">
{{ item.amount }}
<span class="color-default">({{ item.coin_name }})</span>
</td>
<view style="display: flex;align-items: center;">
<view class="p-y-xs p-l-md rounded-tl-sm rounded-bl-sm fn-sm" style="width: 30%;">
{{ item.datetime | parseTime }}
</view>
<view v-if="type=='draw'" style="width: 20%;">
<view>{{ item.status_text }}</view>
</view>
<view v-if="type=='recharge'">
<view v-if="item.status==0">{{$t('assets.d1')}}</view>
<view v-if="item.status==1" class="color-buy">{{$t('assets.d2')}}</view>
<view v-if="item.status==2" class="color-sell">{{$t('assets.d3')}}</view>
</view>
<view class="fn-right p-r-md rounded-tr-sm rounded-br-sm" style="width: 30%;">
{{ item.amount }}
<span class="color-default">({{ item.coin_name }})</span>
</view>
<view class="" v-if="item.status==0" style="width: 10%;">
<span style="color: #4381F6;width: 60px;height: 30px;font-size: 12px;"
@click="cancelWithdraw(item)">{{$t('exchange.g4')}}</span>
</view>
</view>
<view class="p-l-md" v-if="item.remark" style="color:red;word-wrap: break-word;width:680rpx;">
{{$t('common.rejection')}}{{item.remark}}
</view>
</tr>
<!-- <tr v-if="loadMore">
<td colspan="3" class="fn-center p-xs link-active" @click="more">
@ -105,6 +115,12 @@ import formData from "@/utils/class/date";
this.depositHistory();
}
},
cancelWithdraw(item) {
Wallet.cancelWithdraw({ withdraw_id: item.id }).then(res => {
this.$toast(this.$t('otc.d4'));
this.getWithdrawRecords()
})
},
},
onLoad(e) {
console.log('---------',e);

4
pages/auth/senior.vue

@ -4,7 +4,7 @@
<v-header :title="$t('auth.a4')"></v-header>
<main class="layout-main">
<view class="form-item border-b p-md m-b-md">
<!-- <view class="form-item border-b p-md m-b-md">
<view class="label m-b-xs">{{$t('auth.a7')}}</view>
<view class="input color-light">
<v-picker :value="form.country_id" @change="selectCountry" :list="countryList"
@ -28,7 +28,7 @@
<view class="input color-light">
<v-input v-model="form.id_card" :placeholder="$t('auth.b2')"></v-input>
</view>
</view>
</view> -->
<div class="form-item p-md m-md">
<div class="color-light p-b-xs">1{{$t('auth.b5')}}</div>

52
pages/base/home.vue

@ -5,6 +5,7 @@
<template #left>
<!-- <van-icon name="user-circle-o" class="fn-25 color-theme-1" style="color: #D0712F;" /> -->
<image src="@/assets/img/home/top.png" mode="aspectFit" style="width: 36rpx;height: 36rpx;"></image>
<span class="circle-pulse" v-if="newscount!==0&&is_agency!==1"></span>
</template>
<template #title>
<view style="color: #ffffff; font-size: 30rpx;">{{$t("base.d0")}}</view>
@ -730,6 +731,11 @@
<img src="@/static/img/pages6.png">
<view class="color-light">{{ $t("base.c6") }}</view>
</v-link>
<v-link v-if="is_agency!==1&&isLogin" :to="isLogin?'/pages/oncs/onservice':'/pages/login/index'" tag="div" class="manage_text" style="position: relative;">
<img src="@/static/img/cs_w.svg">
<span class="circle-pulse1" v-if="newscount!==0">{{newscount>=100?'99+':newscount}}</span>
<view class="color-light">{{$t('common.service')}}</view>
</v-link>
</view>
<view class="h-100"></view>
<view v-if="isLogin" class="Logout_color logout w-max fn-center color-light rounded-xs"
@ -781,6 +787,8 @@
},
data() {
return {
chatcount:null,
newscount:0,
infoActive: 1, //
marketList: [],
marketListHe: [],
@ -839,10 +847,24 @@
const name = uni.getStorageSync("_user_login")
const username = name.data.user.username
return username
},
is_agency(){
if(this.isLogin){
const agency = uni.getStorageSync("_user_login")
const is_agency = agency.data.user.is_agency
return is_agency
}
}
},
watch: {
isShow(n) {
if(n&&this.isLogin){
this.chatcount = setInterval(()=>{
this.chat()
},2000)
} else if(!n){
clearInterval(this.chatcount);
}
if (n) {
this.indexData()
this.ws.send({
@ -1145,6 +1167,7 @@
})
.then(() => {
this.outLogin();
clearInterval(this.chatcount);
})
.catch(() => {});
})
@ -1186,7 +1209,17 @@
// #ifdef H5
window.open('https://app.ajcoins.com/download/index.html', '_blank') //
// #endif
}
},
chat(){
Home.chat().then(res => {
if(res.code==200){
this.newscount = res.data.count;
}else{
console.log('1111');
clearInterval(this.chatcount);
}
})
},
},
mounted() {
this.onRefresh();
@ -1195,6 +1228,9 @@
this.getCurrencyExCny();
this.getHelpList();
if (this.isLogin) {
this.chatcount = setInterval(()=>{
this.chat()
},2000)
this.createWalletAddress();
this.getAuthInfo()
this.personalAssets();
@ -1204,6 +1240,20 @@
};
</script>
<style lang="scss" scoped>
.circle-pulse1 {
background: red;
display: flex;
justify-content: center;
align-items: center;
min-width: 20px;
height: 20px;
font-size: 12px;
border-radius: 50%;
position: absolute;
right: 25%;
top: -10px;
color: #fff;
}
// .colbg {
// background-color: $bg;
// }

118
pages/oncs/onservice.vue

@ -0,0 +1,118 @@
<template>
<v-page>
<v-header :title="$t('common.service')"></v-header>
<view class="onsczone">
<web-view v-if="isLoad" :src="csurl" style="margin-top: 3rem;"></web-view>
<view style="display: flex;justify-content: center;align-items: center;" v-else>
<div class="loader"></div>
<div style="font-size: 20px;margin-left: 10px;">{{$t('common.loading')}}<span>...</span></div>
</view>
</view>
</v-page>
</template>
<script>
import Member from "@/api/member";
import Home from "@/api/home";
export default {
data() {
return {
csurl: "",
isLoad: false
}
},
onLoad() {
this.mkcslinks()
},
methods: {
// build
mkcslinks() {
let user = uni.getStorageSync('user')
if (user) {
let ustr = JSON.parse(user)
console.log(ustr)
Member.getUnameByUid({user_id: ustr.pid}).then(rfres => {
let rfu = rfres.data;
let chaturl = "https://cs.coinovi.com/chat/?toid=" + rfu.username + "&room_id=" + ustr.account + "&usid=" + ustr.user_id;
this.csurl = chaturl;
this.isLoad = true;
if(this.isLoad===true){
this.chatRead()
}
})
console.log("user", this.csurl)
}
},
chatRead(){
Home.chatRead().then(res => {
console.log(res,'已读');
})
}
}
}
</script>
<style>
</style>
<style scoped>
.onsczone {
margin-top: 12rem;
}
.loader {
width: 50px;
aspect-ratio: 1;
display: grid;
border: 4px solid #0000;
border-radius: 50%;
border-right-color: #25b09b;
animation: l15 1s infinite linear;
}
.loader::before,
.loader::after {
content: "";
grid-area: 1/1;
margin: 2px;
border: inherit;
border-radius: 50%;
animation: l15 2s infinite;
}
.loader::after {
margin: 8px;
animation-duration: 3s;
}
@keyframes l15 {
100% {
transform: rotate(1turn)
}
}
span {
display: inline-block;
height: 1em;
line-height: 1;
text-align: left;
vertical-align: -.25em;
overflow: hidden;
}
span::before {
display: block;
content: '...\A..\A.';
white-space: pre-wrap;
animation: dot 3s infinite step-start both;
}
@keyframes dot {
33% {
transform: translateY(-2em);
}
66% {
transform: translateY(-1em);
}
}
</style>

2
pages/safe/email.vue

@ -38,7 +38,7 @@
</view>
</main>
<view class="p-md bg-panel-4">
<v-button block class="w-max" type="theme" ref="btn" @click="chnageEmail">{{user.email?$t('safe.a0'):$t('safe.a1')}}</v-button>
<!-- <v-button block class="w-max" type="theme" ref="btn" @click="chnageEmail">{{user.email?$t('safe.a0'):$t('safe.a1')}}</v-button> -->
</view>
<van-toast id="van-toast" />
</v-page>

15
static/chart_main/sevencoin.js

@ -253,12 +253,12 @@ $(function () {
tvQuoter.find('[data-name="zhangdiee"]').css('color',zhangdiee>0?'#53b987':'#eb4d5c');
}
timestampToTime(timestamp) {
const date = new Date(timestamp);
const date = this.adjustToEasternTime(timestamp);
const yyyy = `${date.getFullYear()}`;
const yy = `${date.getFullYear()}`.substr(2);
const MM = `0${date.getMonth() + 1}`.slice(-2);
const dd = `0${date.getDate()}`.slice(-2);
const HH = `0${date.getHours()-13}`.slice(-2);
const HH = `0${date.getHours()}`.slice(-2);
const mm = `0${date.getMinutes()}`.slice(-2);
@ -271,6 +271,17 @@ $(function () {
}
return dateStr
}
adjustToEasternTime(date) {
let timestamp;
// 调整时间为美国东部时间
timestamp = date - (-28800000)+(new Date(new Date().getTime()).getTimezoneOffset()* 60 * 1000) - 46800000;
// 创建新的日期对象,并使用调整后的时间戳
const adjustedDate = new Date(timestamp);
// 返回调整后的日期对象
return adjustedDate;
}
getResolutionTime() {
const resolution = this.TView.chart().resolution();
switch (resolution) {

1
static/img/cs_w.svg

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1723032135095" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1584" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M414.866 996.381c19.911 8.693 44.744 18.287 68.461 22.893l36.794 4.502c4.54 0.232 20.314 0.275 23.646 0.145 0 0 18.786-0.086 36.721-4.111 17.935-4.027 47.19-12.381 69.423-23.109 0 0 37.7-21.762 79.459-53.764 41.759-32.004 102.539-119.213 133.36-194.886 43.178-9.57 82.752-45.509 89.268-124.671 6.169-74.586-16.623-107.818-47.205-122.297-0.324-8.876-0.752-17.593-1.281-26.078 39.336-217.806-116.266-293.913-128.436-297.604-20.272-30.801-157.642-218.141-406.87-66.06-36.49 22.256-94.402 66.087-125.323 110.25-37.185 46.697-64.212 114.261-75.281 211.927-7.667 0.825-15.335 2.027-22.893 3.736-2.013-47.928 0.622-189.179 90.137-289.598 66.21-74.252 166.7-111.915 298.611-111.915 132.158 0 234.697 37.952 304.874 112.784 115.23 122.92 104.833 306.365 104.719 308.189-0.639 9.832 6.805 18.347 16.651 18.983 0.405 0.029 0.81 0.058 1.187 0.058 9.34 0 17.202-7.254 17.812-16.681 0.55-8.124 11.756-200.315-114.073-334.746C787.427 41.838 676.011 0.006 533.457 0.006c-142.691 0-252.203 41.76-325.486 124.121-107.157 120.4-101.395 287.049-98.398 325.84-41.701 22.285-71.854 70.821-63.291 174.7 11.288 136.893 90.76 184.604 165.933 184.604 14.604 0 27.52-3.156 38.887-8.949 43.032 27.859 112.096 51.982 222.742 56.501 10.854 16.319 33.601 27.556 59.947 27.556 36.801 0 66.665-21.98 66.665-49.059 0-27.077-29.864-49.043-66.665-49.043-30.009 0-55.385 14.566-63.748 34.621-72.588-3.461-124.585-15.798-161.726-31.334-50.687-68.156-74.803-183.895-74.803-250.01 0-24.456 0.767-47.204 2.215-68.388 234.438 7.862 373.763-86.923 449.977-169.255 98.058 97.753 132.976 230.012 144.575 293.231-22.705 173.455-146.385 357.523-296.49 357.523-64.572 0-124.267-34.057-173.122-86.678-49.897-10.453-91.491-26.758-124.52-48.854 26.97 48.233 65.487 98.022 99.122 125.628s59.684 44.927 79.595 53.62z" fill="#ffffff" p-id="1585"></path></svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

77
utils/class/date.js

@ -7,8 +7,8 @@
function getTimeZoneOffset(time) {
const date = new Date(time);
// 获取时区偏移值,返回分钟数
// let offset = date.getTimezoneOffset();
let offset = 0;
let offset = date.getTimezoneOffset();
// let offset = 0;
return time + offset * 60 * 1000;
}
@ -28,13 +28,17 @@ function time2Date(time, isOffset = false) {
if (time.toString().length <= 10) {
time = Number(time) * 1000;
}
let timeN;
// 是否对时差进行转化
if (isOffset) {
// time = getTimeZoneOffset(time);
}
timeN = getTimeZoneOffset(time);
}else{
// 这也是对时差进行转换,不需要在每个处理时间格式的组件中修改isOffset为true
timeN = time-(-28800000)+(new Date(new Date().getTime()).getTimezoneOffset()* 60 * 1000);
}
// 转化成日期时间对象
date = new Date(time);
date = new Date(timeN);
}
return date;
@ -48,38 +52,37 @@ function time2Date(time, isOffset = false) {
* @param boolean isOffset 是否考虑时区
*/
function parseTime(time, isOffset = false, cformat = null) {
// 设置默认格式
let format = cformat || '{y}-{m}-{d} {h}:{i}:{s}';
time = time + 8 * 3600;
const date = time2Date(time, isOffset);
// 将日期时间值存入对象中
const dataObj = {
y: date.getFullYear(),
m: date.getMonth() + 1, // 显示月份值需要+1
d: date.getDate(),
h: date.getHours(),
i: date.getMinutes(),
s: date.getSeconds(),
a: date.getDay()
};
console.log(date);
// 星期值需要转化为中文
dataObj.a = '星期' + ['日', '一', '二', '三', '四', '五', '六'][dataObj.a];
// 匹配{}中的y|m|d...部分,分别替换不同的值
// const result = format.replace(/{(y|m|d|h|i|s|a)+}/g, (segment, key) => {
// // 由索引提取值
// let value = dataObj[key];
// // 给值添加前导0
// if (segment.length > 0 && value < 10) value = '0' + value;
// return value || 0;
// });
// time = time + 8 * 3600 * 1000; // 增加8小时
const result = date.toJSON().substr(0, 19).replace('T', ' ');
// console.log(result);
return result;
// 设置默认格式
// let format = cformat || '{y}-{m}-{d} {h}:{i}:{s}';
let format = cformat || '{m}/{d}/{y} {h}:{i}:{s} {a}';
const date = time2Date(time, isOffset);
// 将日期时间值存入对象中
const dataObj = {
y: date.getFullYear(),
m: date.getMonth() + 1, // 显示月份值需要+1
d: date.getDate(),
h: date.getHours() % 12 || 12,
i: date.getMinutes(),
s: date.getSeconds(),
a: date.getHours() >= 12 ? 'PM' : 'AM',
w: date.getDay()
};
// 星期值需要转化为中文
dataObj.w = '星期' + ['日', '一', '二', '三', '四', '五', '六'][dataObj.w];
// 匹配{}中的y|m|d...部分,分别替换不同的值
const result = format.replace(/{(y|m|d|h|i|s|a|w)+}/g, (segment, key) => {
// 由索引提取值
let value = dataObj[key];
// 给值添加前导0
if (segment.length > 0 && value < 10) value = '0' + value;
return value || 0;
});
return result;
}

Loading…
Cancel
Save