panhui 3 년 전
부모
커밋
f8208206f8
3개의 변경된 파일36개의 추가작업 그리고 19개의 파일을 삭제
  1. 7 2
      src/components/product/ProductBanner.vue
  2. 9 1
      src/components/product/ThreeMode.vue
  3. 20 16
      src/views/product/Detail.vue

+ 7 - 2
src/components/product/ProductBanner.vue

@@ -3,7 +3,12 @@
         <img src="@assets/png-bg-shangping.png" :style="bgImgStyle" class="bg-img" />
 
         <div class="detail-info">
-            <three-mode :info="info.model3d" v-if="!!info.model3d" :pageType="pageType"></three-mode>
+            <three-mode
+                :info="info.model3d"
+                :windowVertical="windowVertical"
+                v-if="!!info.model3d"
+                :pageType="pageType"
+            ></three-mode>
             <swiper
                 @swiper="setSwiperRef"
                 :style="{ width: BannerWidth, height: BannerWidth }"
@@ -132,7 +137,7 @@ export default {
         },
         windowVertical: {
             type: Boolean,
-            default: false
+            default: true
         }
     },
     data() {

+ 9 - 1
src/components/product/ThreeMode.vue

@@ -21,6 +21,10 @@ export default {
         pageType: {
             type: String,
             default: 'product'
+        },
+        windowVertical: {
+            type: Boolean,
+            default: true
         }
     },
     data() {
@@ -106,7 +110,11 @@ export default {
                     let isY = size_y >= size_x;
 
                     camera.lookAt(new THREE.Vector3(center_x, center_y, center_z));
-                    camera.position.set(center_x, center_y + yOffset, (isY ? size_y : size_x) * 1.8 * scale);
+                    camera.position.set(
+                        center_x,
+                        center_y + yOffset,
+                        (isY ? size_y : size_x) * (props.windowVertical ? 1.8 : 5) * scale
+                    );
                     object.position.set(0, yOffset, 0);
 
                     hemiLight.position.set(0, center_y + size_y * 2, 0);

+ 20 - 16
src/views/product/Detail.vue

@@ -755,26 +755,27 @@ export default {
             ssr: '',
             sr: '',
             u: '',
+            windowVertical: true,
             riskStatement:
                 '风险提示:法律许可范围内,最终解释权归RAEX绿洲宇宙平台所有,RAEX绿洲宇宙平台有权对宣传内容进行修改、调整,敬请留意最新宣传资料或公告通知。华储艺术品中心(深圳)有限公司进行拍卖的数字艺术品及RAEX绿洲宇宙平台发售的数字艺术品仅具备收藏欣赏、版权价值。RAEX绿洲宇宙发售的数字艺术品首发价格为官方指导价,版权市场拍卖价格均为数字艺术品持有者自行决定,平台不干涉拍卖价格,对发行的艺术品二手市场价格不构成任何指导建议。平台严禁未满22周岁以及超过55周岁的用户注册平台账号及使用相关功能,请各位探索者理性消费,仔细阅读相关权益,切勿盲从、轻信他人谣言,杜绝恶意炒作,远离一切非法行为,切实维护自身财产安全,共同营造健康数字艺术品生态。'
         };
     },
-    setup() {
-        const { width, height } = useWindowSize();
-
-        console.log(width.value); // -> 窗口宽度
-        console.log(height.value); // -> 窗口高度
-
-        const windowVertical = computed(() => {
-            if (width.value > height.value) {
-                return false;
-            } else {
-                return true;
-            }
-        });
-
-        return { windowVertical, width, height };
-    },
+    // setup() {
+    //     const { width, height } = useWindowSize();
+
+    //     console.log(width.value); // -> 窗口宽度
+    //     console.log(height.value); // -> 窗口高度
+
+    //     const windowVertical = computed(() => {
+    //         if (width.value > height.value) {
+    //             return false;
+    //         } else {
+    //             return true;
+    //         }
+    //     });
+
+    //     return { windowVertical, width, height };
+    // },
     computed: {
         ...mapState(['userInfo']),
         banners() {
@@ -798,6 +799,9 @@ export default {
     },
     mounted() {
         this.getInit();
+        if (this.$route.query.windowVertical === 'false' || this.$route.query.windowVertical === false) {
+            this.windowVertical = false;
+        }
 
         // if (this.isLogin) {
         //     this.$http