Browse Source

14bug更新

panhui 4 years ago
parent
commit
2c7e25e41d

+ 1 - 1
src/main/nine-space/.env.development

@@ -1,4 +1,4 @@
-VUE_APP_BASE_URL=http://localhost:8080/
+VUE_APP_BASE_URL=https://nfttest.9space.vip/
 NODE_ENV=development
 PUBLIC_PATH=/
 ASSETS_PATH=9th

+ 1 - 0
src/main/nine-space/package.json

@@ -27,6 +27,7 @@
         "query-string": "^7.0.1",
         "register-service-worker": "^1.7.1",
         "swiper": "^6.8.1",
+        "three": "^0.135.0",
         "v-charts": "^1.19.0",
         "vant": "^3.2.3",
         "vconsole": "^3.9.4",

+ 3 - 0
src/main/nine-space/src/components/product/ProductBanner.vue

@@ -37,6 +37,7 @@
                     <span>分享</span>
                 </div>
             </div>
+            <!-- <three-mode></three-mode> -->
         </div>
 
         <post ref="post" :info="info" noButton :pageUrl="pageUrl" />
@@ -52,6 +53,8 @@ import 'swiper/swiper-bundle.min.css';
 import product from '../../mixins/product';
 import Post from '../Post.vue';
 import { ImagePreview } from 'vant';
+// import ThreeMode from './ThreeMode.vue';
+
 export default {
     props: {
         info: {

+ 18 - 2
src/main/nine-space/src/components/product/ProductTitle.vue

@@ -1,5 +1,5 @@
 <template>
-    <div class="product-title">
+    <div class="product-title" :class="{ isSmall }">
         <span><slot></slot></span>
         <img class="img1" src="@assets/png-biaokuag-01.png" alt="" />
         <img class="img2" src="@assets/png-biaokuag-02.png" alt="" />
@@ -7,7 +7,14 @@
 </template>
 
 <script>
-export default {};
+export default {
+    props: {
+        isSmall: {
+            type: Boolean,
+            default: false
+        }
+    }
+};
 </script>
 
 <style lang="less" scoped>
@@ -17,6 +24,7 @@ export default {};
     line-height: 44px;
     padding: 0 20px;
     position: relative;
+    min-height: 44px;
     img {
         width: 20px;
         height: 44px;
@@ -29,5 +37,13 @@ export default {};
             right: 0;
         }
     }
+
+    &.isSmall {
+        font-size: 18px;
+        color: #ffffff;
+        line-height: 24px;
+        text-align: center;
+        .flex();
+    }
 }
 </style>

+ 23 - 2
src/main/nine-space/src/mixins/list.js

@@ -4,7 +4,8 @@ export default {
             empty: false,
             loading: false,
             finished: false,
-            page: 0
+            page: 0,
+            maxSize: -1
         };
     },
     methods: {
@@ -19,7 +20,17 @@ export default {
             this.loading = true;
             this.finished = false;
             this.empty = false;
-            let data = { page: this.page, size: 20, sort: 'createdAt,desc' };
+
+            let size = 20;
+
+            if (this.maxSize !== -1) {
+                size = this.maxSize - this.list.length;
+            }
+            if (size > 20) {
+                size = 20;
+            }
+
+            let data = { page: this.page, size: size, sort: 'createdAt,desc' };
             if (this.beforeData) {
                 data = {
                     ...data,
@@ -36,6 +47,11 @@ export default {
                     this.empty = res.empty;
                     this.loading = false;
                     this.finished = res.last;
+                    if (this.maxSize !== -1) {
+                        if (!this.finished && this.list.length >= this.maxSize) {
+                            this.finished = true;
+                        }
+                    }
                     if (!this.finished) {
                         this.page = this.page + 1;
                     }
@@ -49,6 +65,11 @@ export default {
                     this.empty = res.empty;
                     this.loading = false;
                     this.finished = res.last;
+                    if (this.maxSize !== -1) {
+                        if (!this.finished && this.list.length >= this.maxSize) {
+                            this.finished = true;
+                        }
+                    }
                     if (!this.finished) {
                         this.page = this.page + 1;
                     }

+ 4 - 1
src/main/nine-space/src/views/Discover.vue

@@ -85,7 +85,10 @@
         <div class="box" v-if="hots.length > 0">
             <page-title
                 title="最HOT收藏品"
-                :to="{ path: '/productList', query: { type: 'DEFAULT', source: 'TRANSFER', title: '最HOT收藏品' } }"
+                :to="{
+                    path: '/productList',
+                    query: { type: 'DEFAULT', source: 'TRANSFER', maxSize: 30, title: '最HOT收藏品' }
+                }"
             ></page-title>
             <div class="box-list">
                 <template v-for="(item, index) in hots" :key="item.id">

+ 9 - 0
src/main/nine-space/src/views/activity/List.vue

@@ -38,6 +38,15 @@ export default {
             empty: false,
             url: '/activity/all'
         };
+    },
+    methods: {
+        beforeData() {
+            return {
+                query: {
+                    del: false
+                }
+            };
+        }
     }
 };
 </script>

+ 2 - 1
src/main/nine-space/src/views/order/Detail.vue

@@ -108,8 +108,9 @@ export default {
             })
             .then(res => {
                 this.collection = res;
-                if (dayjs().isBefore(dayjs(this.info.payTime).add(3, 'minute')) && this.info.type === 'BLIND_BOX') {
+                if (!this.info.opened) {
                     this.$refs.box.show = true;
+                    this.$http.post('/order/open?id=' + this.info.id);
                 }
             });
     },

+ 1 - 1
src/main/nine-space/src/views/product/Detail.vue

@@ -4,7 +4,7 @@
 
         <div class="info">
             <div class="info-title">
-                <product-title>{{ info.name }}</product-title>
+                <product-title :isSmall="info.name && info.name.length > 16">{{ info.name }}</product-title>
             </div>
             <!-- <div class="name" v-if="info.salable && startTime">
                 <div class="name1">首发抢购倒计时</div>

+ 6 - 2
src/main/nine-space/src/views/product/List.vue

@@ -59,14 +59,14 @@ export default {
         return {
             list: [],
             empty: false,
-            sort: 'id,desc',
+            sort: 'soldOut;id,desc',
             type: '',
             source: '',
             minterId: '',
             selectOptions: [
                 {
                     label: '全部',
-                    value: 'id,desc'
+                    value: 'soldOut;id,desc'
                 },
                 {
                     label: '最新',
@@ -107,6 +107,10 @@ export default {
         if (this.$route.query.title) {
             this.title = this.$route.query.title;
         }
+
+        if (this.$route.query.maxSize) {
+            this.maxSize = Number(this.$route.query.maxSize);
+        }
     },
     methods: {
         beforeData() {

+ 5 - 0
src/main/nine-space/yarn.lock

@@ -8473,6 +8473,11 @@ thread-loader@^2.1.3:
     loader-utils "^1.1.0"
     neo-async "^2.6.0"
 
+three@^0.135.0:
+  version "0.135.0"
+  resolved "https://registry.yarnpkg.com/three/-/three-0.135.0.tgz#cff4ec8edd3c51ce9bc7e88d13e8eafed4d0ddfc"
+  integrity sha512-kuEpuuxRzLv0MDsXai9huCxOSQPZ4vje6y0gn80SRmQvgz6/+rI0NAvCRAw56zYaWKMGMfqKWsxF9Qa2Z9xymQ==
+
 throttle-debounce@^1.0.1:
   version "1.1.0"
   resolved "https://registry.npm.taobao.org/throttle-debounce/download/throttle-debounce-1.1.0.tgz?cache=0&sync_timestamp=1604313832516&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fthrottle-debounce%2Fdownload%2Fthrottle-debounce-1.1.0.tgz#51853da37be68a155cb6e827b3514a3c422e89cd"