Browse Source

更新

master
luyisha 3 years ago
parent
commit
0c23d5c746
  1. 1
      api/serve/index.js
  2. BIN
      assets/img/bg/1-1.png
  3. BIN
      assets/img/bg/1.png
  4. BIN
      assets/img/bg/2-1.png
  5. BIN
      assets/img/bg/2.png
  6. BIN
      assets/img/bg/3-1.png
  7. BIN
      assets/img/bg/3.png
  8. BIN
      assets/img/bg/4-1.png
  9. BIN
      assets/img/bg/home_recharge.png
  10. 35
      layout/vDropdwon.vue
  11. 144
      pages/auth/primary.vue
  12. 4955
      pages/base/home.vue
  13. 65
      pages/exchange/open-position.vue

1
api/serve/index.js

@ -86,6 +86,7 @@ x.fn = x.prototype = {
if(Cache.get(newMsg).data){
if(newMsg!='_user_walletImage'&& newMsg!='_user_getAuthInfo' && newMsg!='_user_withdrawalBalance'
&& newMsg!='_wallet_getBalance' && newMsg!='_contract_getMarketInfo'&& newMsg!='_contract_openNum'
&& newMsg!='_article_detail'
&& newMsg!='_indexList'&& newMsg!='_user_subscribe'&& newMsg!='_contract_getSymbolDetail' && newMsg!='_user_withdrawalRecord'){
resolve(Cache.get(newMsg).data);

BIN
assets/img/bg/1-1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
assets/img/bg/1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
assets/img/bg/2-1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

BIN
assets/img/bg/2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
assets/img/bg/3-1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

BIN
assets/img/bg/3.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
assets/img/bg/4-1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

BIN
assets/img/bg/home_recharge.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

35
layout/vDropdwon.vue

@ -56,18 +56,33 @@ export default {
},
watch:{
leverShow:{
deep:true,
deep: true,
handler:function(newVal,oldVal) {
console.log(newVal, '下拉组件leverShow更新');
this.$nextTick(() => {
this.text=this.list[newVal].label
this.text=this.list[newVal].label;
})
}
},
list:{
deep: true,
handler:function(newVal,oldVal) {
console.log(newVal, '下拉组件list更新');
if(this.contract==1&&this.list){
this.text=this.list[1].label
}else if(this.contract==0&&this.list){
this.text=this.list[0].label
}
if(this.leverShow){
this.text=this.list[this.leverShow].label
}
}
}
},
methods: {
handlerItem(value,index) {
this.showIf = false
this.text=this.list[index].label
this.text=this.list[index].label
this.$emit('onClick', value);
console.log(this.text);
},
@ -79,13 +94,15 @@ export default {
}
},
mounted() {
if(this.contract==1&&this.list){
this.text=this.list[1].label
if(this.contract==1&&this.list){
this.text=this.list[1].label
// this.text=this.list[0].label
}else if(this.contract==0&&this.list){
this.text=this.list[0].label
}
this.text=this.list[this.leverShow].label
}else if(this.contract==0&&this.list){
this.text=this.list[0].label
}
if(this.leverShow){
this.text=this.list[this.leverShow].label
}
}
};
</script>

144
pages/auth/primary.vue

@ -2,53 +2,74 @@
<v-page style="height:auto!important;min-height: 100%!important;">
<v-header :title="$t('auth.a1')"></v-header>
<main class=" m-lg bg-panel-3 rounded-md p-x-md box-shadow">
<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" range-value="id" range-label="name">
<v-input disabled :value="activeCountry.name" :placeholder="$t('auth.a8')">
<template #right>
<van-icon class="color-default" name="arrow" />
</template>
</v-input>
</v-picker>
</view>
</view>
<!-- 姓名 -->
<view class="form-item border-b p-md m-b-md">
<view class="label m-b-xs">{{$t('auth.a9')}}</view>
<view class="input color-light">
<v-input v-model="form.realname" :placeholder="$t('auth.b0')"></v-input>
</view>
</view>
<!-- 出生日期 -->
<view class="form-item border-b p-md m-b-md">
<view class="label m-b-xs">{{$t('auth.c5')}}</view>
<view class="input color-light">
<uni-datetime-picker type="date" :placeholder="$t('auth.d4')" :clear-icon="false" v-model="form.birthday" @maskClick="maskClick" />
</view>
</view>
<view class="form-item border-b p-md m-b-md">
<view class="label m-b-xs">{{$t('auth.c6')}}</view>
<view class="input color-light">
<uni-data-select
:placeholder="$t('auth.d5')"
v-model="form.identification_type"
:localdata="id_range"
@change="changeID"
></uni-data-select>
</view>
</view>
<!-- 证件号类型 -->
<view class="form-item border-b p-md m-b-md">
<view class="label m-b-xs">{{$t('auth.c6')}}</view>
<view class="input color-light">
<uni-data-select
:placeholder="$t('auth.d5')"
v-model="form.identification_type"
:localdata="id_range"
@change="changeID"
></uni-data-select>
</view>
</view>
<!-- 证件号 -->
<view class="form-item border-b p-md m-b-md">
<view class="label m-b-xs">{{$t('auth.b1')}}</view>
<view class="input color-light">
<v-input v-model="form.id_card" :placeholder="$t('auth.b2')"></v-input>
</view>
</view>
<!-- 居住地址 -->
<view class="form-item border-b p-md m-b-md">
<view class="label m-b-xs">{{$t('auth.c7')}}</view>
<view class="input color-light">
<v-input v-model="form.address" :placeholder="$t('auth.c8')"></v-input>
</view>
</view>
<!-- 城市 -->
<!-- <view class="form-item border-b p-md m-b-md">
<view class="label m-b-xs">{{$t('auth.d7')}}</view>
<view class="input color-light">
<v-input v-model="form.city" :placeholder="$t('auth.d8')"></v-input>
</view>
</view> -->
<!-- 邮政区号 -->
<!-- <view class="form-item border-b p-md m-b-md">
<view class="label m-b-xs">{{$t('auth.d9')}}</view>
<view class="input color-light">
<v-input v-model="form.postal_code" :placeholder="$t('auth.d10')"></v-input>
</view>
</view> -->
<!-- 国籍区号 -->
<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" range-value="id" range-label="name2">
<v-input disabled :value="activeCountry.name2" :placeholder="$t('auth.a8')">
<template #right>
<van-icon class="color-default" name="arrow" />
</template>
</v-input>
</v-picker>
</view>
</view>
<!-- 电话 -->
<view class="form-item border-b p-md m-b-md">
<view class="label m-b-xs">{{$t('auth.c9')}}</view>
<view class="input color-light">
@ -74,15 +95,17 @@ export default {
detail: {},
countryList: [],
form: {
id_card: "",
area_code: "",
realname: "",
birthday: "",
identification_type: "",
birthday: "",
identification_type: "",
id_card: "",
address: "",
// city: "",
// postal_code: "",
country_id: "",
country_code: "",
area_code: "",
address: "",
phone: ""
phone: ""
},
id_range: [{ value: 0, text: this.$t('auth.d1') },{ value: 1, text: this.$t('auth.d2') },{ value: 2, text: this.$t('auth.d3') }],
};
@ -108,7 +131,13 @@ export default {
Member.getCountryCode()
.then((res) => {
console.info(res)
this.countryList = res.data;
// this.countryList = res.data;
this.countryList = res.data.map(item=>{
return {
...item,
name2: '+'+item.country_code+'('+item.name+')'
}
});
this.form.country_id = this.countryList[res.data.length-1].id;
})
.catch(() => {});
@ -120,16 +149,61 @@ export default {
primaryAuth() {
let data = this.form;
data.country_code = this.activeCountry.country_code;
console.log(data);
if(!data.realname){
uni.showToast({
title: this.$t('auth.b0'),
icon: 'none'
})
return;
}
if(!data.birthday){
uni.showToast({
title: this.$t('auth.d4'),
icon: 'none'
})
return;
}
if(data.identification_type===""){
uni.showToast({
title: this.$t('auth.d5')+this.$t('auth.c6'),
icon: 'none'
})
return;
}
if(!data.id_card){
uni.showToast({
title: this.$t('auth.b2'),
icon: 'none'
})
return;
}
if(!data.address){
uni.showToast({
title: this.$t('auth.c8'),
icon: 'none'
})
return;
}
if(!data.phone){
uni.showToast({
title: this.$t('auth.d0'),
icon: 'none'
})
return;
}
Profile.primaryAuth(data,{btn:this.$refs.btn}).then(() => {
this.$toast.success(this.$t('auth.b4'));
setTimeout(()=>{
this.$back();
}, 1500)
this.$back();
}, 1500)
}).catch(()=>{});
},
changeID(e){
this.form.identification = this.id_range[e].text;
}
changeID(e){
console.log(e);
this.form.identification_type = this.id_range[e].text;
}
},
created() {
this.getAuthInfo();

4955
pages/base/home.vue

File diff suppressed because it is too large

65
pages/exchange/open-position.vue

@ -811,7 +811,7 @@ export default {
accountInfo: {},
//
lever_rage: [],
leverShow: '',
leverShow: '',
//
maxNum: 0,
form: {
@ -1331,52 +1331,41 @@ export default {
symbol: this.symbolLeft,
};
Contract.getSymbolDetail(data).then((res) => {
console.log(3333333333333);
console.info(res)
this.unit_amount = res.data.unit_amount;
// if (!this.lever_rage.length) {
this.lever_rage = res.data.lever_rage.map((item) => ({
label: item,
value: item,
}));
console.log(444444444444);
// let index = res.data.lever_rage.indexOf(res.data.default_lever);
// this.dropdwonText = this.lever_rage[index].label
// this.dropdwonText = res.data.default_lever
// console.log('dropdwonText',this.dropdwonText);
// lever v-dropdwontext
console.log("45454545454",res.data.lever_rage.indexOf(res.data.default_lever));
this.leverShow = (res.data.lever_rage.indexOf(res.data.default_lever)).toString();
// this.form.lever_rate = this.lever_rage[2].value;
this.form.lever_rate = res.data.default_lever;
// this.lever_rage.length =0;
// console.info(this.form.lever_rate)
console.info(res.data.default_lever);
// let e=this.lever_rage[2]
// let e = res.data.default_lever
let e={value:res.data.default_lever}
console.log('111111111111111', this.leverShow);
this.openNum(e);
// }
this.$emit("getSymbolDetail", res.data);
console.log(5555555555);
if (!this.form.lever_rate) {
// this.form.lever_rate = this.lever_rage[2].value;
this.form.lever_rate = res.data.default_lever;
this.openNum(e);
}
console.info('res.data', res.data.default_lever, res.data.lever_rage)
this.unit_amount = res.data.unit_amount;
this.lever_rage = res.data.lever_rage.map((item) => ({
label: item,
value: item,
}));
let e={value:res.data.default_lever, label: res.data.default_lever}
this.openNum(e);
this.$emit("getSymbolDetail", res.data);
});
},
//
openNum(e) {
if (e) {
this.form.lever_rate = e.value
}
// console.log(e, '', this.lever_rage);
if (!this.isLogin) return;
let data = {
symbol: this.symbolLeft, //ETH
lever_rate: this.form.lever_rate, //10
};
if (e) {
this.form.lever_rate = e.value;
data.lever_rate = e.value;
for(let item =0;item<this.lever_rage.length;item++){
if(e.value==this.lever_rage[item].value){
// leverShow v-dropdwontext
// indexof-1
this.leverShow = item.toString();
}
}
// console.log('111111111111', this.leverShow, this.form.lever_rate);
}
Contract.openNum(data, {toast: false}).then((res) => {
this.maxNum = res.data;
});

Loading…
Cancel
Save