Browse Source

新增提币密码

master
liaoxinyu 3 months ago
parent
commit
3ed0fbc0b9
  1. 3
      api/setting.js
  2. 8
      element/index.js
  3. 3
      pages.json
  4. 14
      pages/assets/draw.vue
  5. 11
      pages/reg/index.vue
  6. 10
      pages/safe/index.vue
  7. 65
      pages/safe/withdrawals-pwd.vue

3
api/setting.js

@ -77,6 +77,9 @@ class Setting {
static updatePassword(data,{btn}) {
return Serve.post(`/user/updatePassword`, data,{btn});
}
static withdrawalPassword(data,{btn}) {
return Serve.post(`/user/withdrawalPassword`, data,{btn});
}
/**
* 绑定邮箱
* @param {object} data

8
element/index.js

@ -1,8 +1,12 @@
// 导入自己需要的组件
import { Slider } from 'element-ui'
import { Slider,Progress,Steps,Step,Select,Option } from 'element-ui'
const components = [Slider,Progress,Steps,Step,Select,Option]
const element = {
install: function (Vue) {
Vue.use(Slider)
// Vue.use(Slider)
components.forEach(component => {
Vue.use(component)
})
}
}
export default element

3
pages.json

@ -176,6 +176,9 @@
{
"path" : "pages/oncs/onservice"
},
{
"path" : "pages/safe/withdrawals-pwd"
},
{
"path": "pages/service/index",
"style": {

14
pages/assets/draw.vue

@ -108,12 +108,12 @@
</v-input>
</view>
<view class="d-flex align-center p-y-xs m-t-ms justify-between color-light fn-15">
<span>{{ $t("reg.a8") }}</span>
<span>{{ $t("common.c13") }}</span>
<!-- <span class="color-light">{{ withdrawFee.withdrawal_fee }} {{coin}}</span> -->
</view>
<view class="d-flex align-end p-y-xs justify-between bg-form-panel-3 rounded-xs p-y-sm">
<v-input type="password" v-model="form.password" class="p-x-ms color-light w-max fn-13 rounded-xs" :placeholder="$t('reg.a9')">
<v-input type="password" v-model="form.withdrawal_psw" class="p-x-ms color-light w-max fn-13 rounded-xs" :placeholder="$t('common.c14')">
</v-input>
</view>
@ -240,7 +240,7 @@ export default {
form: {
coin_id: "",
amount: "",
password:"",
withdrawal_psw:"",
address: "",
addressType: "",
code_type: 1,
@ -328,8 +328,8 @@ export default {
this.$toast(this.$t('assets.c2'))
return
}
if (!this.form.password) {
this.$toast(this.$t('reg.a9'))
if (!this.form.withdrawal_psw) {
this.$toast(this.$t('common.c14'))
return
}
if(this.getEmailCodeLock){return};
@ -362,6 +362,10 @@ export default {
this.$toast(this.$t('assets.c2'))
return
}
if(!this.form.withdrawal_psw){
this.$toast(this.$t('common.c14'))
return
}
if (!this.form.emailcode) {
this.$toast(this.$t('safe.a6'))
return

11
pages/reg/index.vue

@ -106,6 +106,10 @@
<view class="label m-b-xs black">{{$t('reg.b0')}}</view>
<v-input class="login_box3" v-model="form.password_confirmation" type="password" :placeholder="$t('reg.b1')"></v-input>
</view>
<view class="form-item m-b-md p-b-xs">
<view class="label m-b-xs color-light">{{$t('common.c13')}}</view>
<v-input class="color-light" v-model="form.withdrawal_psw" type="password" :placeholder="$t('common.c14')"></v-input>
</view>
<!-- <view class="form-item m-b-md p-b-xs">
<view class="label m-b-xs">{{$t('reg.c6')}}</view>
<v-input class="color-light" v-model="form.invitationCode" type="password" :placeholder="$t('reg.c7')"></v-input>
@ -161,7 +165,8 @@ export default {
password: "",
password_confirmation: "",
invite_code: "",
gr_code: "",
gr_code: "",
withdrawal_psw:""
},
captcha: '',
Graph_che:'',
@ -209,6 +214,10 @@ export default {
this.$toast(this.$t('reg.c7'));
return;
}
if (!this.form.withdrawal_psw) {
this.$toast(this.$t('common.c14'));
return;
}
this.form.type=this.form.type
this.form.country_code = this.country_code || 86;

10
pages/safe/index.vue

@ -26,6 +26,16 @@
</view>
<van-icon name="arrow" />
</v-link>
<v-link
tag="li"
to="/pages/safe/withdrawals-pwd"
class="item link-active d-flex p-x-md p-y-md align-center border-b"
>
<view class="flex-fill d-flex justify-between m-r-xs">
<view class="color-light">{{$t('common.c13')}}</view>
</view>
<van-icon name="arrow" />
</v-link>
<!-- ----------交易密码---------- -->
<!-- <v-link
tag="li"

65
pages/safe/withdrawals-pwd.vue

@ -0,0 +1,65 @@
<template>
<v-page class="pos-login">
<v-header :title="$t('common.c13')"></v-header>
<main class="bg-panel-3 p-x-lg p-y-lg rounded-md box-shadow">
<view class="form-item border-b p-y-md color-light">
<view class="label m-b-xs">{{$t('safe.b3')}}</view>
<view class="input">
<v-input type="password" v-model="form.password" :placeholder="$t('safe.b4')"></v-input>
</view>
</view>
<view class="form-item border-b p-y-md color-light">
<view class="label m-b-xs">{{$t('safe.b5')}}</view>
<view class="input">
<v-input type="password" v-model="form.password_confirmation" :placeholder="$t('safe.b6')"></v-input>
</view>
</view>
<view class="p-md ">
<v-button block type="blue" class="w-max rounded-md" ref="btn" @click="setPassword">{{$t('safe.b7')}}</v-button>
</view>
</main>
<van-toast id="van-toast" />
</v-page>
</template>
<script>
import Member from "@/api/member";
import { mapState } from "vuex";
import Setting from "@/api/setting";
export default {
data() {
return {
form: {
password: "",
password_confirmation: ""
}
};
},
computed: {
...mapState({
user: "user",
}),
},
methods: {
setPassword() {
let data = this.form;
Setting.withdrawalPassword(data, { btn: this.$refs.btn })
.then((res) => {
if(res.code==200){
this.$back();
this.$toast.success(this.$t('safe.d3'));
}
}).catch(() => {});
},
},
};
</script>
<style lang="scss" scoped>
.layout-page{
background-color: #fff !important;
background: none;
}
.bg-panel-3{
background-color: #fff;
}
</style>
Loading…
Cancel
Save