Browse Source

修改文档2022.02.14

master
ltlzx 4 years ago
parent
commit
1404c1d63b
  1. 9
      src/components/SecondaryNav.vue
  2. 5
      src/i18n/en.json
  3. 5
      src/i18n/tw.json
  4. 267
      src/views/contract/hold-position.vue
  5. 26
      src/views/contract/index.vue
  6. 140
      src/views/profile/certification.vue
  7. 53
      src/views/profile/index.vue

9
src/components/SecondaryNav.vue

@ -65,10 +65,11 @@ export default {
}, { }, {
url: `/profile/certification`, url: `/profile/certification`,
label: this.$t('common.auth') label: this.$t('common.auth')
}, { },
url: `/profile/invite`, // {
label: this.$t('common.invitationReward') // url: `/profile/invite`,
}, // label: this.$t('common.invitationReward')
// },
// { // {
// url: `/profile/login-history`, // url: `/profile/login-history`,
// label: this.$t('common.visitHistory') // label: this.$t('common.visitHistory')

5
src/i18n/en.json

@ -683,6 +683,9 @@
"buyLevel": "equal" "buyLevel": "equal"
}, },
"profile": { "profile": {
"tips":"Withdrawal quota. For more withdrawal quota, please complete advanced certification.",
"SelectAreaCode":"Select area code",
"driverLicense":"Driver's license",
"country":"Country", "country":"Country",
"country1":"Please enter your country", "country1":"Please enter your country",
"realName": "Real Name Authentication", "realName": "Real Name Authentication",
@ -739,7 +742,7 @@
"userInfo": "Account Information", "userInfo": "Account Information",
"verState": "Verification State", "verState": "Verification State",
"max": "Max", "max": "Max",
"limitH": "Hourly withdrawal limit", "limitH": "Hourly withdrawal limit.",
"verLeave": "Verification Level", "verLeave": "Verification Level",
"exceed": "Exceed", "exceed": "Exceed",
"contactUs": "Contact Us", "contactUs": "Contact Us",

5
src/i18n/tw.json

@ -622,6 +622,9 @@
"buyLevel": "買平" "buyLevel": "買平"
}, },
"profile": { "profile": {
"tips":"提幣限額,如需更多提幣額度,請完成⾼級認證",
"SelectAreaCode":"選擇區號",
"driverLicense":"駕駛證",
"country":"國家", "country":"國家",
"country1":"請輸入國家", "country1":"請輸入國家",
"realName": "實名認證", "realName": "實名認證",
@ -678,7 +681,7 @@
"userInfo": "帳戶資訊", "userInfo": "帳戶資訊",
"verState": "驗證狀態", "verState": "驗證狀態",
"max": "最大", "max": "最大",
"limitH": "小時提幣限額", "limitH": "小時提幣限額",
"verLeave": "驗證級別", "verLeave": "驗證級別",
"exceed": "超過", "exceed": "超過",
"contactUs": "聯繫我們", "contactUs": "聯繫我們",

267
src/views/contract/hold-position.vue

@ -89,111 +89,111 @@
</table> </table>
<!-- 平仓 --> <!-- 平仓 -->
<div <div
class="modal fade" class="modal fade"
id="exampleModal" id="exampleModal"
tabindex="-1" tabindex="-1"
role="dialog" role="dialog"
aria-labelledby="exampleModalLabel" aria-labelledby="exampleModalLabel"
aria-hidden="true" aria-hidden="true"
> >
<div class="modal-dialog modal-dialog-centered"> <div class="modal-dialog modal-dialog-centered">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel"> <h5 class="modal-title" id="exampleModalLabel">
{{ $t("contract.d6") }} {{ $t("contract.d6") }}
</h5> </h5>
<button <button
type="button" type="button"
class="close" class="close"
data-dismiss="modal" data-dismiss="modal"
aria-label="Close" aria-label="Close"
>
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<form>
<div class="form-group">
<label for="recipient-name" class="col-form-label"
>{{ $t("contract.d8") }}:</label
> >
<div class="input-group"> <span aria-hidden="true">&times;</span>
<input </button>
type="text" </div>
v-model="form.entrust_price" <div class="modal-body">
class="form-control" <form>
id="recipient-name" <div class="form-group">
v-if="activeItem.closeType == 1" <label for="recipient-name" class="col-form-label"
/> >{{ $t("contract.d8") }}:</label
<input
type="text"
disabled
:value="$t('contract.d9')"
class="form-control"
id="recipient-name"
v-if="activeItem.closeType == 2"
/>
<div class="input-group-append">
<button
type="button"
@click="
activeItem.closeType == 1
? (activeItem.closeType = 2)
: (activeItem.closeType = 1)
"
class="btn btn-outline-primary"
> >
{{ <div class="input-group">
activeItem.closeType == 1 <input
? $t("contract.e0") type="text"
: $t("contract.d9") v-model="form.entrust_price"
}} class="form-control"
</button> id="recipient-name"
</div> v-if="activeItem.closeType == 1"
/>
<input
type="text"
disabled
:value="$t('contract.d9')"
class="form-control"
id="recipient-name"
v-if="activeItem.closeType == 2"
/>
<div class="input-group-append">
<button
type="button"
@click="
activeItem.closeType == 1
? (activeItem.closeType = 2)
: (activeItem.closeType = 1)
"
class="btn btn-outline-primary"
>
{{
activeItem.closeType == 1
? $t("contract.e0")
: $t("contract.d9")
}}
</button>
</div>
</div>
</div> </div>
</div> <div class="form-group">
<div class="form-group"> <label for="message-text" class="col-form-label"
<label for="message-text" class="col-form-label" >{{ $t("contract.e1") }}:</label
>{{ $t("contract.e1") }}:</label >
<input
type="number"
v-model="form.amount"
class="form-control"
id="message-text"
/>
</div>
<div>
{{ $t("contract.e9") }}
{{ activeItem.avail_position }}
</div>
<el-slider
:value="activeStep"
@input="sliderChange"
:format-tooltip="tooltip"
:step="25"
show-stops
></el-slider>
</form>
</div>
<div class="modal-footer">
<button
type="button"
class="btn btn-secondary"
data-dismiss="modal"
> >
<input {{ $t("contract.c4") }}
type="number" </button>
v-model="form.amount" <button
class="form-control" type="button"
id="message-text" class="btn btn-primary"
/> @click="closePosition"
</div> >
<div> {{ $t("contract.c5") }}
{{ $t("contract.e9") }} </button>
{{ activeItem.avail_position }} </div>
</div> </div>
<el-slider
:value="activeStep"
@input="sliderChange"
:format-tooltip="tooltip"
:step="25"
show-stops
></el-slider>
</form>
</div>
<div class="modal-footer">
<button
type="button"
class="btn btn-secondary"
data-dismiss="modal"
>
{{ $t("contract.c4") }}
</button>
<button
type="button"
class="btn btn-primary"
@click="closePosition"
>
{{ $t("contract.c5") }}
</button>
</div>
</div> </div>
</div>
</div> </div>
<!-- 市价平仓 --> <!-- 市价平仓 -->
<div <div
@ -449,53 +449,54 @@ export default {
name: "hold-position", name: "hold-position",
props: { props: {
symbol: { symbol: {
default: "", default: "",
type: String, type: String,
required: false, required: false,
}, },
holdPositionList: { holdPositionList: {
default: () => [], default: () => [],
type: Array, type: Array,
required: false, required: false,
}, },
newPrice: { newPrice: {
default: 0, default: 0,
type: Number, type: Number,
required: false, required: false,
}, },
holdPositionAll: { holdPositionAll: {
default: false, default: false,
type: Boolean, type: Boolean,
}, },
symbolDetail: { symbolDetail: {
default: () => {}, default: () => {},
type: Object, type: Object,
}, },
}, },
computed: { computed: {
showList() { showList() {
return this.holdPositionList.filter((item) => item.hold_position); return this.holdPositionList.filter((item) => item.hold_position);
}, },
activeStep() { activeStep() {
if (!this.form.amount || !this.activeItem.avail_position) return 0; // return 0
let num = (this.form.amount / this.activeItem.avail_position) * 100; if (!this.form.amount || !this.activeItem.avail_position) return 100;
return num; let num = (this.form.amount / this.activeItem.avail_position) * 100;
return num;
}, },
}, },
data() { data() {
return { return {
list: [], list: [],
activeItem: {}, activeItem: {},
form: { form: {
entrust_price: "", entrust_price: "",
amount: "", amount: "",
}, },
strategyForm: { strategyForm: {
symbol: "", symbol: "",
position_side: "", position_side: "",
tp_trigger_price: "", tp_trigger_price: "",
sl_trigger_price: "", sl_trigger_price: "",
}, },
}; };
}, },
watch: {}, watch: {},
@ -530,10 +531,10 @@ export default {
}, },
// //
liquidation(item) { liquidation(item) {
this.activeItem = item; this.activeItem = item;
this.form.entrust_price = this.newPrice; this.form.entrust_price = this.newPrice;
this.$set(this.activeItem, "closeType", 1); this.$set(this.activeItem, "closeType", 1);
$("#exampleModal").modal("show"); $("#exampleModal").modal("show");
}, },
closePosition() { closePosition() {
let data = { let data = {
@ -619,4 +620,4 @@ export default {
} }
}, },
}; };
</script> </script>

26
src/views/contract/index.vue

@ -143,18 +143,18 @@
/> />
</div> </div>
<page-bottom <page-bottom
@position="holdPosition" @position="holdPosition"
@isall=" @isall="
holdPositionAll = $event; holdPositionAll = $event;
holdPosition(); holdPosition();
" "
@setactiveItem="setactiveItem" @setactiveItem="setactiveItem"
:accountInfo="accountInfo" :accountInfo="accountInfo"
:newPriceObj="newPriceObj" :newPriceObj="newPriceObj"
:holdPositionList="holdPositionList" :holdPositionList="holdPositionList"
:holdPositionAll="holdPositionAll" :holdPositionAll="holdPositionAll"
:symbol="activeSymbol" :symbol="activeSymbol"
:symbolDetail="symbolDetail" :symbolDetail="symbolDetail"
/> />
<div <div
class="modal fade" class="modal fade"
@ -345,4 +345,4 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
</style> </style>

140
src/views/profile/certification.vue

@ -95,37 +95,51 @@
/> />
</div> </div>
</div> </div>
<div class="form-group"> <!-- <div class="form-group">
<label>{{$t('profile.additionalInformation')}}{{$t('profile.optional')}}</label> <label>{{$t('profile.additionalInformation')}}{{$t('profile.optional')}}</label>
<input type="text" v-model="form.extra" class="form-control" placeholder /> <input type="text" v-model="form.extra" class="form-control" placeholder />
</div> </div> -->
<div class="label my-2 blue">{{$t('profile.contactInformation')}}</div> <div class="label my-2 blue">{{$t('profile.contactInformation')}}</div>
<div class="form-row"> <div class="form-row">
<div class="form-group col-md-6"> <!-- <div class="form-group col-md-12"> -->
<label>{{$t('profile.phoneNumber')}}*</label> <!-- <label>{{$t('profile.phoneNumber')}}*</label> -->
<div class="input-group mb-3"> <!-- <div class="input-group mb-3"> -->
<el-dropdown tragger="click" class="input-group-prepend"> <div class="form-group col-md-3">
<button <label>{{$t('profile.SelectAreaCode')}}*</label>
class="btn btn-outline-secondary dropdown-toggle" <el-select v-model="form.country_id" filterable placeholder="请选择" >
type="button" <el-option
>+{{country.country_code}}</button> v-for="item in countryList"
<el-dropdown-menu slot="dropdown"> :key="item.id"
<el-dropdown-item :label="'+'+item.country_code +'('+item.name+')'"
icon="el-icon-plus" :value="item.id">
v-for="item in countryList" </el-option>
:key="item.id" </el-select>
@click.native="form.country_id=item.id" </div>
>{{item.country_code}}{{item.name}}</el-dropdown-item> <!-- <el-dropdown tragger="click" class="input-group-prepend">
</el-dropdown-menu> <button
</el-dropdown> class="btn btn-outline-secondary dropdown-toggle"
<input type="button"
type="text" >+{{country.country_code}}</button>
required <el-dropdown-menu slot="dropdown">
class="form-control" <el-dropdown-item
:placeholder="$t('profile.enterPhoneNumber')" icon="el-icon-plus"
/> v-for="item in countryList"
</div> :key="item.id"
</div> @click.native="form.country_id=item.id"
>{{item.country_code}}{{item.name}}</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown> -->
<div class="form-group col-md-9">
<label>{{$t('profile.phoneNumber')}}*</label>
<input
type="text"
required
class="form-control"
:placeholder="$t('profile.enterPhoneNumber')"
/>
</div>
<!-- </div>
</div> -->
</div> </div>
<div class="text-center"> <div class="text-center">
<button <button
@ -182,7 +196,7 @@
</div> </div>
</template> </template>
</upload-img> </upload-img>
<upload-img <!-- <upload-img
class="mb-3" class="mb-3"
v-model="topForm.front_img" v-model="topForm.front_img"
required required
@ -194,7 +208,7 @@
<em>{{$t('profile.clickUpload')}}</em> <em>{{$t('profile.clickUpload')}}</em>
</div> </div>
</template> </template>
</upload-img> </upload-img> -->
<div class="text-center mt-3"> <div class="text-center mt-3">
<button type="button" class="btn w-25 btn-primary rounded-pill" @click="topAuth">{{$t('profile.nextStep')}}</button> <button type="button" class="btn w-25 btn-primary rounded-pill" @click="topAuth">{{$t('profile.nextStep')}}</button>
</div> </div>
@ -277,17 +291,25 @@ export default {
}, },
computed: { computed: {
country() { country() {
return ( return (
this.countryList.find(item => item.id == this.form.country_id) || {} this.countryList.find(item => item.id == this.form.country_id) || {}
); );
}, },
cardType() { cardType() {
return [ return [
{ {
label: this.$t("profile.iD"), label: this.$t("profile.iD"),
value: 1 value: 1,
} },
]; {
label: this.$t("profile.driverLicense"),
value: 2,
},
{
label: this.$t("profile.passport"),
value: 3,
},
];
} }
}, },
methods: { methods: {
@ -310,25 +332,31 @@ export default {
}, },
// //
getCountryCode() { getCountryCode() {
Member.getCountryCode() Member.getCountryCode().then(res => {
.then(res => { this.countryList = res;
this.countryList = res; for(let i=0; i<this.countryList.length;i++){
this.form.country_id = this.countryList[0].id; let item=this.countryList[i];
}) if(item.country_code=="1"){
.catch(res => {}); this.form.country_id = item.id;
break;
}
}
}).catch(res => {});
}, },
// //
primaryAuth() { primaryAuth() {
let data = this.form; let data = this.form;
data.country_code = this.country.country_code; data.country_code = this.country.country_code;
if (utils.validate("#auth")) { if (utils.validate("#auth")) {
Profile.primaryAuth(data) Profile.primaryAuth(data)
.then(res => { .then(res => {
this.$message.success(this.$t("profile.preliminary")); this.$message.success(this.$t("profile.preliminary"));
this.setp++; // this.setp++;
}) this.$router.push("/wallet/assets/exchange")
.catch(err => {}); })
} .catch(err => {});
}
}, },
// //
topAuth() { topAuth() {

53
src/views/profile/index.vue

@ -21,11 +21,12 @@
<img src="../../assets/img/icon/top1.png" alt /> <img src="../../assets/img/icon/top1.png" alt />
</div> </div>
<div> <div>
{{$t('profile.max')}} {{$t('profile.max')}}
<span class="font-weight-bold">20k</span> <span class="font-weight-bold">1k</span>
<span class="font-weight-bold light-purple">USD</span> <span class="font-weight-bold light-purple">USD</span>
<span class="font-weight-bold">24</span> <span class="font-weight-bold">24</span>
{{$t('profile.limitH')}} {{$t('profile.limitH')}}
{{$t('profile.tips')}}
</div> </div>
</div> </div>
</div> </div>
@ -81,16 +82,16 @@
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-md-4 d-flex"> <!-- <div class="col-md-4 d-flex">
<!-- 邀请好友 --> 邀请好友
<div class="panel-box bg-panel shadow-sm w-100"> <div class="panel-box bg-panel shadow-sm w-100">
<div class="heading d-flex justify-content-between">{{$t('profile.inviteFriends')}}</div> <div class="heading d-flex justify-content-between">{{$t('profile.inviteFriends')}}</div>
<div class="tab-content"> <div class="tab-content">
<div class="min-height-50">{{$t('profile.dividends',{name:'AMATAK',num:'30%'})}}</div> <div class="min-height-50">{{$t('profile.dividends',{name:'AMATAK',num:'30%'})}}</div>
<button type="button" class="bottom-left-btn btn btn-sm btn-primary rounded-pill" @click="$router.push('/profile/invite')">{{$t('profile.sendInvitation')}}</button> <button type="button" class="bottom-left-btn btn btn-sm btn-primary rounded-pill" @click="$router.push('/profile/invite')">{{$t('profile.sendInvitation')}}</button>
</div> </div>
</div> </div>
</div> </div> -->
<div class="col-md-4 d-flex"> <div class="col-md-4 d-flex">
<!-- 重置密码 --> <!-- 重置密码 -->
<div class="panel-box bg-panel shadow-sm w-100"> <div class="panel-box bg-panel shadow-sm w-100">
@ -101,16 +102,16 @@
</div> </div>
</div> </div>
</div> </div>
<div class="col-md-4 d-flex"> <!-- <div class="col-md-4 d-flex">
<!-- 访问记录 --> 访问记录
<div class="panel-box bg-panel shadow-sm w-100"> <div class="panel-box bg-panel shadow-sm w-100">
<div class="heading d-flex justify-content-between">{{$t('profile.registrationDecord')}}</div> <div class="heading d-flex justify-content-between">{{$t('profile.registrationDecord')}}</div>
<div class="tab-content"> <div class="tab-content">
<div class="min-height-50">{{$t('profile.recording')}}</div> <div class="min-height-50">{{$t('profile.recording')}}</div>
<button type="button" class="bottom-left-btn btn btn-sm btn-primary rounded-pill" @click="$router.push('/profile/login-history')">{{$t('profile.recordingDEtail')}}</button> <button type="button" class="bottom-left-btn btn btn-sm btn-primary rounded-pill" @click="$router.push('/profile/login-history')">{{$t('profile.recordingDEtail')}}</button>
</div> </div>
</div> </div>
</div> </div> -->
</div> </div>
</div> </div>
</div> </div>
@ -145,4 +146,4 @@ export default {
</script> </script>
<style> <style>
</style> </style>

Loading…
Cancel
Save