xuqiang 4 anni fa
parent
commit
258cdb1ef4

+ 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':

+ 56 - 52
src/main/nine-space/src/views/Givesubmit.vue

@@ -4,9 +4,11 @@
         <div class="product">
             <van-image width="74" height="104" :radius="6" :src="getImg(changeImgs(info.pic))" fit="cover" />
             <div class="product-content">
-                <div class="text1">111</div>
+                <div class="text1">
+                    {{ info.name }}
+                </div>
                 <div class="no"></div>
-                <div class="price">¥11</div>
+                <div class="price">¥{{ info.price }}</div>
             </div>
         </div>
         <div class="input">
@@ -82,57 +84,59 @@ export default {
         };
     },
     computed: {
-        //     money() {
-        //         if (this.info.price) {
-        //             return add(this.info.price, this.gas);
-        //         } else {
-        //             return 0;
-        //         }
-        //     }
-        // },
-        // mounted() {
-        //     this.$http.get('/sysConfig/get/gas_fee').then(res => {
-        //         this.gas = res.value;
-        //     });
-        //     this.$toast.loading({
-        //         message: '加载中...',
-        //         forbidClick: true
+        money() {
+            if (this.info.price) {
+                return add(this.info.price, this.gas);
+            } else {
+                return 0;
+            }
+        }
+    },
+    mounted() {
+        // this.$http.get('/sysConfig/get/gas_fee').then(res => {
+        //     this.gas = res.value;
+        // });
+        this.$toast.loading({
+            message: '加载中...',
+            forbidClick: true
+        });
+        if (this.$route.query.id) {
+            this.$http.get('/asset/get/' + this.$route.query.id).then(res => {
+                this.info = res;
+                console.log(this.info);
+                // setTimeout(() => {
+                //     this.$toast.clear();
+                //     this.bs.value.refresh();
+                // }, 100);
+                // this.$http('/sysConfig/get/gas_fee')
+            });
+        }
+        //  else {
+        //     this.$http.get('/order/get/' + this.$route.query.orderId).then(res => {
+        //         this.info = res;
+        //         this.orderId = res.id;
+        //         setTimeout(() => {
+        //             this.bs.value.refresh();
+        //         }, 100);
+        //         this.$dialog
+        //             .alert({
+        //                 title: '提示',
+        //                 message:
+        //                     res.status === 'NOT_PAID' || res.status === 'CANCELLED'
+        //                         ? '订单支付失败,点击重新下单'
+        //                         : '订单已支付,点击查看订单详情'
+        //             })
+        //             .then(() => {
+        //                 if (res.status === 'NOT_PAID' || res.status === 'CANCELLED') {
+        //                     this.$router.back();
+        //                 } else {
+        //                     this.$router.replace('/orderDetail?id' + res.id);
+        //                 }
+        //                 // on close
+        //             });
         //     });
-        //     if (this.$route.query.id) {
-        //         this.$http.get('/collection/get/' + this.$route.query.id).then(res => {
-        //             this.info = res;
-        //             setTimeout(() => {
-        //                 this.$toast.clear();
-        //                 this.bs.value.refresh();
-        //             }, 100);
-        //             // this.$http('/sysConfig/get/gas_fee')
-        //         });
-        //     } else {
-        //         this.$http.get('/order/get/' + this.$route.query.orderId).then(res => {
-        //             this.info = res;
-        //             this.orderId = res.id;
-        //             setTimeout(() => {
-        //                 this.bs.value.refresh();
-        //             }, 100);
-        //             this.$dialog
-        //                 .alert({
-        //                     title: '提示',
-        //                     message:
-        //                         res.status === 'NOT_PAID' || res.status === 'CANCELLED'
-        //                             ? '订单支付失败,点击重新下单'
-        //                             : '订单已支付,点击查看订单详情'
-        //                 })
-        //                 .then(() => {
-        //                     if (res.status === 'NOT_PAID' || res.status === 'CANCELLED') {
-        //                         this.$router.back();
-        //                     } else {
-        //                         this.$router.replace('/orderDetail?id' + res.id);
-        //                     }
-        //                     // on close
-        //                 });
-        //         });
-        //     }
-        //     this.bottom = this.$refs.bottom;
+        // }
+        // this.bottom = this.$refs.bottom;
     },
     methods: {
         submit() {

+ 4 - 3
src/main/nine-space/src/views/Submit.vue

@@ -54,7 +54,6 @@
 
 <script>
 const path = require('path');
-import resolveUrl from 'resolve-url';
 import { add } from 'mathjs';
 import product from '../mixins/product';
 let inWeixin = /micromessenger/i.test(navigator.userAgent);
@@ -155,7 +154,7 @@ export default {
                     this.$router.replace('/submit?orderId=' + res.id);
                     this.$nextTick(() => {
                         if (this.payType === 'ALIPAY') {
-                            document.location.replace(resolveUrl(this.$baseUrl, 'payOrder/alipay?id=' + res.id));
+                            document.location.replace(path.resolve(this.$baseUrl, 'payOrder/alipay?id=' + res.id));
                         } else if (this.payType === 'WEIXIN') {
                             if (this.inWeixin) {
                                 this.$toast.loading('加载中');
@@ -184,7 +183,9 @@ export default {
                                         });
                                     });
                             } else {
-                                document.location.replace(resolveUrl(this.$baseUrl, 'payOrder/weixin_h5?id=' + res.id));
+                                document.location.replace(
+                                    path.resolve(this.$baseUrl, 'payOrder/weixin_h5?id=' + res.id)
+                                );
                             }
                         }
                     });

+ 15 - 3
src/main/nine-space/src/views/asset/Detail.vue

@@ -119,7 +119,7 @@
         </div> -->
         <div class="btn van-safe-area-bottom" ref="btn">
             <div class="btns1">
-                <div @click="$router.push('/giveSearch?id=' + info.id)">
+                <div @click="Add">
                     <img
                         class="img"
                         src="https://9space-2021.oss-cn-shenzhen.aliyuncs.com/image/2021-11-09-15-17-04hsdZwERv.png"
@@ -222,6 +222,18 @@ export default {
                     });
             }
         },
+        Add() {
+            if (this.userInfo.authStatus === 'SUCCESS') {
+                this.$router.push('/giveSearch?id=' + this.info.id);
+            } else {
+                Dialog.confirm({
+                    title: '认证信息',
+                    message: '用户未认证,是否立即认证'
+                }).then(() => {
+                    this.$router.push('/Authentication');
+                });
+            }
+        },
         Exhibition() {
             if (!this.info.publicShow) {
                 Dialog.confirm({
@@ -233,7 +245,7 @@ export default {
                     })
                     .then(res => {
                         this.getProduct();
-                        this.$message.success('展示成功');
+                        this.$toast.success('展示成功');
                     });
             } else {
                 Dialog.confirm({
@@ -245,7 +257,7 @@ export default {
                     })
                     .then(res => {
                         this.getProduct();
-                        this.$message.success('取消展示');
+                        this.$toast.success('取消展示');
                     });
             }
         },

+ 15 - 59
src/main/nine-space/src/views/asset/GiveSearch.vue

@@ -26,12 +26,14 @@
             <!-- <template v-for="(item, index) in list" :key="index"> -->
             <!-- <product-info></product-info> -->
             <!-- </template> -->
-            <div class="content" @click="$router.push('/givesubmit')">
-                <div class="img"></div>
+            <div v-if="empty" class="content" @click="$router.push('/givesubmit?id=' + this.$route.query.id)">
+                <img class="img" :src="info.avatar" alt="" />
                 <div class="init">
                     <div>
-                        <div class="text1">姓名</div>
-                        <div class="text2">手机号码 <span>11111</span></div>
+                        <div class="text1">{{ info.realName || '保密' }}</div>
+                        <div class="text2">
+                            手机号码 <span>{{ info.phone }}</span>
+                        </div>
                         <div class="text2">真实姓名 <span>11111</span></div>
                     </div>
                     <div class="btn">赠送</div>
@@ -43,23 +45,20 @@
 </template>
 
 <script>
-// import ProductInfo from '../../components/product/productSmall.vue';
 import product from '../../mixins/product';
 import list from '../../mixins/list';
 export default {
     name: 'Search',
-    // components: { ProductInfo },
     inject: ['bar'],
     mixins: [product, list],
     data() {
         return {
-            list: [],
             empty: false,
+            info: [],
             phone: '',
             stiky: null,
             type: '',
             minterId: ''
-            // url: '/user/searchByPhone'
         };
     },
     computed: {
@@ -67,63 +66,20 @@ export default {
             return this.getLabelName(this.type, this.typeOptions);
         }
     },
-    mounted() {
-        // if (this.$route.query.type) {
-        //     this.type = this.$route.query.type;
-        // }
-        // if (this.$route.query.minterId) {
-        //     this.minterId = this.$route.query.minterId;
-        // }
-    },
+    mounted() {},
     methods: {
-        // beforeData() {
-        //     return {
-        //         // query: {
-        //         //     onShelf: true,
-        //         //     type: this.type,
-        //         //     minterId: this.minterId,
-        //         //     del: false
-        //         // },
-        //         search: this.phone
-        //     };
-        // },
         getSearch() {
-            // console.log(search);
-            // this.search = search;
-            // this.getData(true);
-            // this.$http
-            //     .post(
-            //         '/user/searchByPhone',
-            //         {
-            //             phone: this.phone
-            //         },
-            //         {
-            //             body: 'json'
-            //         }
-            //     )
-            //     .then(res => {
-            //         console.log(res);
-            //     });
             this.$http
-                .post(
-                    '/user/searchByPhone',
-                    {
-                        phone: this.phone
-                    },
-                    {
-                        body: 'json'
-                    }
-                )
+                .post('/user/searchByPhone', {
+                    phone: this.phone
+                })
                 .then(res => {
+                    this.info = res;
+                    if (this.info != '') {
+                        this.empty = true;
+                    }
                     console.log(res);
-                    // this.$message.success('寄售成功');
-                    // this.isShow = false;
                 });
-            // .catch(e => {
-            //     if (e) {
-            //         this.$message(e.error);
-            //     }
-            // });
         }
     }
 };

+ 1 - 1
src/main/pc-space/src/views/AssetDetail.vue

@@ -314,7 +314,7 @@ export default {
         },
         changeShow() {
             if (!this.info.publicShow) {
-                console.log(this.info);
+                // console.log(this.info);
                 this.$confirm('藏品将公开展示,无报价', '公开展示', {
                     confirmButtonText: '确定',
                     cancelButtonText: '取消',

+ 2 - 1
src/main/pc-space/src/views/user/CollectionOrder.vue

@@ -156,7 +156,8 @@ export default {
                 customClass: 'myClass',
                 type: 'warning'
             }).then(() => {
-                this.$http.post('/order/del/' + row.id).then(() => {
+                this.$http.post('/order/hide/' + row.id).then(() => {
+                    //hide:false
                     this.$message.success('删除成功');
                     setTimeout(() => {
                         this.getData();