xuqiang 4 years ago
parent
commit
ec0da7af95

+ 2 - 2
src/main/nine-space/src/plugins/http.js

@@ -5,9 +5,9 @@ import qs from 'qs';
 let baseUrl = 'http://localhost:8080';
 switch (process.env.NODE_ENV) {
     case 'development':
-        baseUrl = 'https://nfttest.9space.vip/';
+        // baseUrl = 'https://nfttest.9space.vip/';
         // baseUrl = 'http://192.168.50.190:8080';
-        // baseUrl = 'http://localhost:8080';
+        baseUrl = 'http://localhost:8080';
         // baseUrl = 'http://192.168.50.190:8080';
         break;
     case 'test':

+ 34 - 5
src/main/nine-space/src/views/Givesubmit.vue

@@ -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;

+ 44 - 9
src/main/nine-space/src/views/asset/Consignment.vue

@@ -11,10 +11,17 @@
         <div class="border"></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="bottom van-safe-area-bottom" ref="bottom">
             <van-notice-bar
@@ -31,6 +38,7 @@
 </template>
 
 <script>
+import { mapState } from 'vuex';
 export default {
     name: 'Top',
     data() {
@@ -38,6 +46,7 @@ export default {
             price: '',
             showKeyboard: false,
             password: '',
+            sets: false,
             list: [
                 {
                     title: '1. 作品寄售为单个作品价格'
@@ -57,7 +66,23 @@ export default {
             ]
         };
     },
+    computed: {
+        ...mapState(['userInfo'])
+    },
+    mounted() {
+        this.passFn();
+    },
     methods: {
+        passFn() {
+            this.$http
+                .get('/user/tradeCodeStatus', {
+                    userId: this.userInfo.id
+                })
+                .then(res => {
+                    console.log(res);
+                    this.sets = res.set;
+                });
+        },
         submit() {
             if (this.price != '') {
                 this.$http
@@ -129,7 +154,7 @@ export default {
 .input {
     margin-top: 20px;
     .text1 {
-        font-size: 14px;
+        font-size: @font2;
         color: #ffffff;
         line-height: 24px;
         margin-bottom: 6px;
@@ -158,7 +183,7 @@ export default {
         padding-top: 20px;
     }
     /deep/.van-cell__title {
-        font-size: 14px;
+        font-size: @font2;
         font-weight: bold;
         color: #ffffff;
         line-height: 24px;
@@ -222,7 +247,7 @@ export default {
                 max-width: 210px;
             }
             .text {
-                font-size: 14px;
+                font-size: @font2;
                 color: @text3;
                 line-height: 20px;
                 word-break: keep-all;
@@ -245,21 +270,31 @@ export default {
     }
     .input {
         margin-top: 20px;
+        width: 100%;
         .text1 {
-            font-size: 14px;
+            font-size: @font2;
             color: #ffffff;
             line-height: 24px;
             margin-bottom: 6px;
             text-align: center;
         }
         .text2 {
-            font-size: 14px;
+            font-size: @font2;
             text-align: right;
             font-weight: 400;
             color: @text3;
             line-height: 24px;
             margin-right: 15px;
         }
+        .text3 {
+            font-size: @font2;
+            font-weight: 400;
+            color: #b81c22;
+            line-height: 24px;
+            margin-top: 40px;
+            display: flex;
+            justify-content: center;
+        }
     }
 }
 </style>