Browse Source

全景720

xiaohaizhao 1 year ago
parent
commit
d91d6ecc99
3 changed files with 130 additions and 3 deletions
  1. 18 0
      packageA/webView/webView.vue
  2. 106 0
      pages/index/index/casePages/fullView.vue
  3. 6 3
      pages/index/index/myCase.vue

+ 18 - 0
packageA/webView/webView.vue

@@ -0,0 +1,18 @@
+<template>
+    <web-view :src="openUrl" />
+</template>
+
+<script>
+export default {
+    data() {
+        return {
+            openUrl: ""
+        }
+    },
+    onLoad(options) {
+        this.openUrl = options.url
+    }
+}
+</script>
+
+<style></style>

+ 106 - 0
pages/index/index/casePages/fullView.vue

@@ -0,0 +1,106 @@
+<template>
+    <view>
+        <tabs ref="tabs" @getList="getList" />
+        <My_listbox ref="List" @getlist="getList" :bottomHeight="70">
+            <navigator class="list-item" :url="'/packageA/webView/webView?url=' + item.panoramaurl" v-for="item in list"
+                hover-class="navigator-hover" :key="item.sat_sharematerialid">
+                <image class="image" :src="item.cover" mode="aspectFill" lazy-load="true" />
+                <view class="tips">
+                    <view class="label u-line-1">{{ item.title }}</view>
+                </view>
+            </navigator>
+        </My_listbox>
+    </view>
+</template>
+
+<script>
+import tabs from "./tabs.vue"
+export default {
+    components: { tabs },
+    name: "imgsindex",
+    data() {
+        return {
+            "content": {
+                "where": {
+                    "condition": "",
+                }
+            },
+            list: [],
+            isInitialize: false,
+        }
+    },
+    methods: {
+        init() {
+            if (this.isInitialize) return;
+            this.getList();
+        },
+        getList(init = false) {
+            return new Promise(async (resolve, reject) => {
+                if (this.paging(this.content, init)) return;
+                let content = this.content;
+                let ref = this.$refs.tabs;
+                content.where = {
+                    ...content.where,
+                    ...ref.where
+                }
+                this.$Http.basic({
+                    "id": 20240417154702,
+                    content: this.content
+                }).then(res => {
+                    resolve()
+                    this.$refs.List.RefreshToComplete()
+                    this.$refs.List.setHeight()
+                    console.log("获取全景列表", res)
+                    if (this.cutoff(res.msg)) return;
+                    this.isInitialize = true;
+                    res.data = res.data.map(v => {
+                        v.cover = v.attinfos.length ? this.getSpecifiedImage(v.attinfos.find(s => s.usetype == "sat_sharematerial") || v.attinfos[0]) : ''
+                        return v
+                    })
+                    this.list = res.pageNumber == 1 ? res.data : this.list.concat(res.data);
+                    this.content = this.$refs.List.paging(this.content, res)
+                })
+            })
+        }
+    },
+}
+</script>
+
+<style lang="scss" scoped>
+page,
+body {
+    height: 100vh;
+    overflow: hidden;
+}
+
+
+.list-item {
+    width: 355px;
+    margin: 0 auto 20px;
+    border-radius: 5px;
+    overflow: hidden;
+
+    .image {
+        width: 355px;
+        height: 240px;
+        border-radius: 5px;
+        overflow: hidden;
+    }
+
+    .tips {
+        display: flex;
+        justify-content: space-between;
+        height: 20px;
+        line-height: 20pxF;
+
+        .title {
+            flex: 1;
+            font-family: PingFang SC, PingFang SC;
+            font-size: 14px;
+            color: #333333;
+            margin-top: 10px;
+            margin-bottom: 20px;
+        }
+    }
+}
+</style>

+ 6 - 3
pages/index/index/myCase.vue

@@ -7,19 +7,21 @@
         <view class="content">
             <view class="head" />
             <imgs ref="图库" v-show="tabsActive == '图库'" />
+            <full-view ref="全景720" v-show="tabsActive == '全景720'" />
         </view>
     </view>
 </template>
 
 <script>
 import imgs from "./casePages/imgs.vue";
+import fullView from "./casePages/fullView.vue";
 export default {
     name: "myCase",
-    components: { imgs },
+    components: { imgs, fullView },
     data() {
         return {
             updatePage: true,
-            tabsActive: "图库",
+            tabsActive: "全景720",
             tabs: ['图库', '设计美家', '实景案例', '全景720'],
             list: [],
             appList: [],
@@ -39,8 +41,9 @@ export default {
             })
         },
         tabsChange(tabsActive) {
+            console.log("切换", tabsActive)
             this.tabsActive = tabsActive;
-            this.$refs[this.tabsActive].init()
+            this.$refs[tabsActive].init()
         }
     },
 }