Browse Source

weizhi

master
torsenli 2 years ago
parent
commit
25da5e539f
  1. 8
      api/member.js
  2. 10
      app.js
  3. 18
      layout/vCode.vue
  4. 51
      pages/reg/index.vue
  5. 6
      static/tradingview.html

8
api/member.js

@ -26,6 +26,14 @@ class Member {
return server.post(`/register/sendEmailCode`, data); return server.post(`/register/sendEmailCode`, data);
} }
/**
* 获取图形验证码
* @param data {email,token}
*/
static Graph_che() {
return server.get(`/register/Graph_che`);
}
/** /**
* 获取国家区号 * 获取国家区号
* @param {object} data * @param {object} data

10
app.js

@ -3,14 +3,14 @@ let config = {};
if (process.env.NODE_ENV == 'production'||true) { //生产环境 if (process.env.NODE_ENV == 'production'||true) { //生产环境
config = { config = {
// ajax地址 // ajax地址
baseUrl: 'https://xmg.xusexchange.com/', baseUrl: 'https://xmg.xuscoins.com/',
// 图片地址 (暂时无用) // 图片地址 (暂时无用)
imgUrl: 'https://xmg.xusexchange.com/storage', imgUrl: 'https://xmg.xuscoins.com/storage',
// socket地址 // socket地址
socketUrl: 'wss://xmg.xusexchange.com/ws1', socketUrl: 'wss://xmg.xuscoins.com/ws1',
socketUrl1: 'wss://xmg.xusexchange.com/ws2', socketUrl1: 'wss://xmg.xuscoins.com/ws2',
// pc端地址 // pc端地址
pcUrl:'https://xmg.xusexchange.com/', pcUrl:'https://xmg.xuscoins.com/',
// app名称 // app名称
appName: 'XUSCoins', appName: 'XUSCoins',
// 版本 // 版本

18
layout/vCode.vue

@ -75,11 +75,19 @@ export default {
if (this.load) return; if (this.load) return;
this.inSend = true; this.inSend = true;
serve.post(this.url, this.data) serve.post(this.url, this.data)
.then(() => { .then((res) => {
this.inSend = false; // ss
this.load = true; if(res.code=='4001'){
this.countDown(); this.inSend = false
this.$toast(this.$t('common.sendSuccess')); this.$toast(res.message);
}else{
this.inSend = false;
this.load = true;
this.countDown();
this.$toast(this.$t('common.sendSuccess'));
}
}) })
.catch(() => { .catch(() => {
this.inSend = false; this.inSend = false;

51
pages/reg/index.vue

@ -70,6 +70,26 @@
</view> </view>
</template> </template>
</view> </view>
<!--图形验证码-->
<view class="form-item border-b m-b-md p-b-xs">
<view class="label m-b-xs">Captcha</view>
<v-input class="color-light" v-model="form.gr_code" placeholder='Please enter graphic results'>
<template #right>
<!-- 邮箱 -->
<!--<img :src="'api/app/register/Graph_che?'+Math.random()" @click="refreshCaptcha">-->
<img :src="Graph_che" @click="gett_gc_code">
<!--<v-code-->
<!-- url="/register/sendEmailCode"-->
<!-- :data="{-->
<!-- email:form.account,-->
<!-- type:1-->
<!--}"-->
<!-- v-show="form.type==2"-->
<!--&gt;</v-code>-->
</template>
</v-input>
<!--<img src="https://xmg.xuscoins.com/api/app/register/Graph_che?0.5386844216396525"/>-->
</view>
<view class="form-item border-b m-b-md p-b-xs"> <view class="form-item border-b m-b-md p-b-xs">
<view class="label m-b-xs">{{$t('reg.a6')}}</view> <view class="label m-b-xs">{{$t('reg.a6')}}</view>
<v-input class="color-light" v-model="form.code" :placeholder="$t('reg.a7')"> <v-input class="color-light" v-model="form.code" :placeholder="$t('reg.a7')">
@ -89,6 +109,8 @@
url="/register/sendEmailCode" url="/register/sendEmailCode"
:data="{ :data="{
email:form.account, email:form.account,
gc_code: form.gr_code,
gc_key: gc_key,
type:1 type:1
}" }"
v-show="form.type==2" v-show="form.type==2"
@ -159,7 +181,11 @@ export default {
password: "", password: "",
password_confirmation: "", password_confirmation: "",
invite_code: "", invite_code: "",
gr_code: "",
}, },
captcha: '',
Graph_che:'',
gc_key:'', // tuxiangyanzheng key
check: false, check: false,
agreement: {}, agreement: {},
country_code:'', country_code:'',
@ -231,7 +257,28 @@ export default {
this.$toast(this.$t('reg.c5')); this.$toast(this.$t('reg.c5'));
}); });
}, },
//
//
refreshCaptcha() {
axios.get('/register/Graph_che')
.then(response => {
//
})
.catch(error => {
console.log(error);
});
},
gett_gc_code(){
Member.Graph_che().then((res)=>{
console.log("gc",res.data.img)
this.Graph_che = res.data.img;
this.gc_key= res.data.key;
});
//this.Graph_che = gc
},
//,
login(){ login(){
let data={type: 2,account:this.form.account,password: this.form.password} let data={type: 2,account:this.form.account,password: this.form.password}
Member.login(this.form) Member.login(this.form)
@ -256,7 +303,7 @@ export default {
}, },
}, },
mounted() { mounted() {
this.gett_gc_code();
}, },
onLoad(query){ onLoad(query){
this.query = query this.query = query

6
static/tradingview.html

@ -22,9 +22,9 @@
<body> <body>
<div class="tradingview" id="tradingview_10798345"></div> <div class="tradingview" id="tradingview_10798345"></div>
</body> </body>
<script src="https://www.xusexchange.com/newlink/mobile/jquery3_5_1.min.js"></script> <script src="https://www.xuscoins.com/newlink/mobile/jquery3_5_1.min.js"></script>
<script src="https://www.xusexchange.com/newlink/mobile/pako1_0_9.min.js"></script> <script src="https://www.xuscoins.com/newlink/mobile/pako1_0_9.min.js"></script>
<script src="https://www.xusexchange.com/newlink/mobile/qs6_9_4.min.js"></script> <script src="https://www.xuscoins.com/newlink/mobile/qs6_9_4.min.js"></script>
<script src="./chart_main/charting_library.min.js"></script> <script src="./chart_main/charting_library.min.js"></script>
<script src="./chart_main/ws.js"></script> <script src="./chart_main/ws.js"></script>
<script src="./chart_main/sevencoin.js?v=2"></script> <script src="./chart_main/sevencoin.js?v=2"></script>

Loading…
Cancel
Save