|
|
@@ -15,10 +15,18 @@
|
|
|
</div>
|
|
|
<div class="input">
|
|
|
<div class="text1">请输入交易密码,验证信息</div>
|
|
|
- <van-password-input :value="password" :focused="showKeyboard" @focus="showKeyboard = true" />
|
|
|
- <!-- 数字键盘 -->
|
|
|
- <van-number-keyboard v-model="password" :show="showKeyboard" @blur="showKeyboard = false" maxlength="6" />
|
|
|
- <div class="text2" @click="$router.push('/tradingPassword')">忘记密码?</div>
|
|
|
+ <div v-if="sets">
|
|
|
+ <van-password-input :value="password" :focused="showKeyboard" @focus="showKeyboard = true" />
|
|
|
+ <!-- 数字键盘 -->
|
|
|
+ <van-number-keyboard
|
|
|
+ v-model="password"
|
|
|
+ :show="showKeyboard"
|
|
|
+ @blur="showKeyboard = false"
|
|
|
+ maxlength="6"
|
|
|
+ />
|
|
|
+ <div class="text2" @click="$router.push('/tradingPassword')">忘记密码?</div>
|
|
|
+ </div>
|
|
|
+ <div v-else class="text3" @click="$router.push('/tradingPassword')">您当前没有交易密码,点击去设置</div>
|
|
|
</div>
|
|
|
<div class="list">
|
|
|
<div class="info">
|
|
|
@@ -50,6 +58,7 @@
|
|
|
<script>
|
|
|
const path = require('path');
|
|
|
import { add } from 'mathjs';
|
|
|
+import { mapState } from 'vuex';
|
|
|
import product from '../mixins/product';
|
|
|
let inWeixin = /micromessenger/i.test(navigator.userAgent);
|
|
|
export default {
|
|
|
@@ -86,6 +95,7 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
+ ...mapState(['userInfo']),
|
|
|
money() {
|
|
|
if (this.info.price) {
|
|
|
return add(this.info.price, this.gas);
|
|
|
@@ -95,6 +105,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
+ this.passFn();
|
|
|
this.$http.get('/sysConfig/get/gas_fee').then(res => {
|
|
|
this.gas = res.value;
|
|
|
});
|
|
|
@@ -110,6 +121,16 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ passFn() {
|
|
|
+ this.$http
|
|
|
+ .get('/user/tradeCodeStatus', {
|
|
|
+ userId: this.userInfo.id
|
|
|
+ })
|
|
|
+ .then(res => {
|
|
|
+ console.log(res);
|
|
|
+ this.sets = res.set;
|
|
|
+ });
|
|
|
+ },
|
|
|
submit() {
|
|
|
this.$http
|
|
|
.post('/user/verifyTradeCode', {
|
|
|
@@ -306,7 +327,15 @@ export default {
|
|
|
color: #ffffff;
|
|
|
line-height: 22px;
|
|
|
}
|
|
|
-
|
|
|
+ .text3 {
|
|
|
+ font-size: @font2;
|
|
|
+ font-weight: 400;
|
|
|
+ color: #b81c22;
|
|
|
+ line-height: 24px;
|
|
|
+ margin-top: 40px;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ }
|
|
|
.price {
|
|
|
font-size: 16px;
|
|
|
font-weight: bold;
|