wangtao 3 месяцев назад
Родитель
Сommit
25f8b5ad66

+ 1 - 5
src/components/layout/footer.vue

@@ -2,13 +2,9 @@
 import { ref } from 'vue'
 import { useStore } from 'vuex'
 const store = useStore()
-const pageStatus = ref(false)
-setTimeout(()=>{
-    pageStatus.value = true
-},400)
 </script>
 <template>
-    <footer v-show="pageStatus">
+    <footer v-show="store.state.footerStatus">
         <div class="footer-widget-area" style="position: relative;clear: both;">
             <div class="container">
                 <div class="row footerOne">

+ 10 - 1
src/store/index.ts

@@ -24,7 +24,8 @@ export const store = createStore({
         meta:{
             title:undefined,keywords:undefined,description:undefined
         },
-        dialogPersonalStatus:false//弹框状态
+        dialogPersonalStatus:false,//弹框状态
+        footerStatus:false,//footer状态
     },
     mutations:{
         //菜单列表
@@ -74,6 +75,11 @@ export const store = createStore({
             state.meta = data
             return state.meta
         },
+        //设置footerStatus
+        setFooterStatus(state:any,data:string){
+            state.footerStatus = data
+            return state.footerStatus
+        },
         
     },
     actions:{
@@ -202,6 +208,9 @@ export const store = createStore({
                         resolve(true)
                     })
                 }
+                setTimeout(()=>{
+                    commit("setFooterStatus",true)
+                },1000)
             })
         },
     }

+ 2 - 1
src/utils/request.ts

@@ -4,7 +4,8 @@ import { tansParams } from './common.ts'
 var url = "https://gateWay.usky.cn/"
 if (typeof window !== 'undefined'){
     if(window.location.host.indexOf("localhost") > -1 || window.location.host.indexOf("192.168.10.165") >-1){
-        url = "http://192.168.10.165:13200/"
+        // url = "http://192.168.10.165:13200/"
+        url = "https://gateWay.usky.cn/"
     }
     if(window.location.host.indexOf("usky.cn") > -1){
         url = "https://gateWay.usky.cn/"

+ 2 - 1
src/views/cases/index.vue

@@ -12,6 +12,7 @@ export default defineComponent({
         let paramsData = reactive({})
         const pageStatus = ref(false)
         let oldCategoryId = ref()
+        store.state.footerStatus = false
         //类型切换
         function facilityClick(item: any) {
             //防抖
@@ -106,7 +107,7 @@ export default defineComponent({
         <section style="background:#F4F8FD" class="solutionType">
             <div class="container pc" style="text-align:center">
                 <div class="solutionTypeOne" v-for="(item, index) in store.state.columnTypes"
-                    :class="item.id == store.state.acitveId ? 'active' : ''" @mouseover="facilityClick(item)"
+                    :class="item.id == store.state.acitveId ? 'active' : ''" @click="facilityClick(item),item.id == store.state.acitveId"
                     :style="{ 'width': (1 / store.state.columnTypes.length * 100) + '%' }" :key="index">
                     <div style="width:40px;height:40px;;overflow:hidden;margin:0 auto">
                         <img class="img" :src="item.imagePath" alt="">

+ 23 - 19
src/views/cases/read.vue

@@ -10,6 +10,7 @@
             const route = useRoute()
             const recomMendationList:any = ref(recomMendationFilter(store.state.recomMendation)) //推荐内容
             const pageStatus = ref(false)
+            store.state.footerStatus = false
             //推荐内容过滤
             function recomMendationFilter(data:any){
                 let array = []
@@ -20,9 +21,9 @@
                 }
                 return array
             }
-            setTimeout(()=>{
-                pageStatus.value = true
-            },300)
+            store.state.pageContent = []
+            store.state.footerStatus = false
+            pageStatus.value = true
             return { store, recomMendationList, pageStatus }
         },
         components:{
@@ -52,22 +53,25 @@
                         }
                     }
                 }
-                if(params.query?.categoryid  && !params.query.dup){
-                    paramsData = {
-                        params:{
-                            categoryid: params.query.categoryid,
-                            pageNum:1,
-                            pageSize:1,
-                            order:"sortindex",
-                            articleid: params.query.id,
-                            id: params.query.id,
-                            details:true
-                        },
-                        index:params.path,
-                        sub:sub.value
+                setTimeout(()=>{
+                    params.query = route.value.query
+                    if(params.query?.categoryid  && !params.query.dup){
+                        paramsData = {
+                            params:{
+                                categoryid: params.query.categoryid,
+                                pageNum:1,
+                                pageSize:1,
+                                order:"sortindex",
+                                articleid: params.query.id,
+                                id: params.query.id,
+                                details:true
+                            },
+                            index:params.path,
+                            sub:sub.value
+                        }
+                        return store.dispatch('getPageData',paramsData)
                     }
-                    return store.dispatch('getPageData',paramsData)
-                }
+                },1)
                 
             })
         }
@@ -79,7 +83,7 @@
         <section class="common-bradcrumb-section" >
             <banner />
         </section>
-        <section class="product-content-section pt-60" v-show="pageStatus">
+        <section class="product-content-section pt-60" v-if="pageStatus">
             <div class="container" v-if="store.state.pageContent.length>0">
                 <div class="row">
                     <div class="col-lg-12 col-md-12 content">

+ 4 - 11
src/views/index/index.vue

@@ -7,7 +7,8 @@ import banner from '@/components/layout/banner.vue'
 export default defineComponent({
     setup(){
         const store = useStore()
-        const pageStatus = ref(false)
+        store.state.pageContent = []
+// +       store.state.footerStatus = false
         // 首页箭头下拉
         function go_down(){
             globalThis.scrollTo({
@@ -15,10 +16,7 @@ export default defineComponent({
                 behavior: "smooth"
             })
         }
-        setTimeout(()=>{
-            pageStatus.value = true
-        },300)
-        return { store, go_down, pageStatus }
+        return { store, go_down }
     },
     components:{
         banner
@@ -90,12 +88,11 @@ export default defineComponent({
         <section v-if="store.state.pageContent.length>0" style="width:100vw;">
             <div class="whyUs-section pt-60 pb-60" v-for="(arr,index) in store.state.pageContent"
                 :style="{background:(index % 2 == 1?'#F4F8FD':'#fff')}">
-                <div class="container" v-show="pageStatus">
+                <div class="container">
                     <div class="section-title text-center both-border pb-20">
                         <span class="title-tag">{{arr.title}}</span>
                         <span class="mb-30">{{arr.zhaiyao}}</span>
                     </div>
-                
                     <div class="row aboutOnlyText" v-if="arr.image" 
                         :style="{padding:(index % 2 == 1?'40px 25px':' 40px 25px')}"
                         style="background-color: #ffff;    box-shadow: 0px 10px 20px 10px rgb(179 202 216 / 20%); align-items:center">
@@ -105,17 +102,13 @@ export default defineComponent({
                         <div class="col-md-6" v-html="arr.content">
                         </div>
                     </div>
-        
                     <div class="aboutOnlyText row text-center" v-else :style="{padding:(index % 2 == 1?'':'0 ')}"
                         style="background-color: #ffff;">
                         <div class=" about-text-image" v-html="arr.content">
                         </div>
                     </div>
-
                 </div>
             </div>
         </section>
     </div>
 </template>
-<style lang="scss" scoped>
-</style>

+ 3 - 4
src/views/news/index.vue

@@ -65,9 +65,8 @@ export default defineComponent({
             paramsData.params.categoryid = store.state.acitveId
             store.dispatch('getPageData',paramsData)
         }
-        setTimeout(()=>{
-            pageStatus.value = true
-        },300)
+        store.state.footerStatus = false
+        pageStatus.value = true
         return { store, facilityClick, handleCurrentChange, details, pageStatus }
     },
     components:{
@@ -132,7 +131,7 @@ export default defineComponent({
                 </div>
             </div>
         </section>
-        <section class="news-content-section pt-70" v-show="pageStatus">
+        <section class="news-content-section pt-70" v-if="pageStatus">
                 <div class="container">
                     <div class="row">
                         <div class="col-lg-12 col-md-12 content">

+ 1 - 1
src/views/news2/index.vue

@@ -143,7 +143,7 @@ export default defineComponent({
                     <div class="news-right-list"  >
                         <div class="title" v-if="columnActive.categoryName">{{columnActive.categoryName}}</div>
                         <ul>
-                            <li class="" v-for="(item,index) in store.state.pageContent" :key="index"  v-show="pageStatus">
+                            <li class="" v-for="(item,index) in store.state.pageContent" :key="index"  v-if="store.state.pagination">
                                 <div  @click="details(item)">
                                     <a class="newsTitleLeft"><span style="width: 8px;height: 8px;background: #B7B7B7;border-radius: 50%;margin-right:30px"></span>{{item.title}}</a>
                                     <span  class="timeRight" >{{ item.createdate.substring(0, 10) }}</span>

+ 21 - 19
src/views/services/read.vue

@@ -20,9 +20,9 @@ export default defineComponent({
             }
             return array
         }
-        setTimeout(()=>{
-            pageStatus.value = true
-        })
+        store.state.pageContent = []
+        store.state.footerStatus = false
+        pageStatus.value = true
         return { store, recomMendationList,pageStatus }
     },
     components:{
@@ -52,22 +52,24 @@ export default defineComponent({
                     }
                 }
             }
-            if(params.query?.categoryid  && !params.query.dup){
-                paramsData = {
-                    params:{
-                        categoryid: params.query?.categoryid,
-                        pageNum:1,
-                        pageSize:1,
-                        order:"sortindex",
-                        articleid: params.query?.id,
-                        id: params.query?.id,
-                        details:true
-                    },
-                    index:params.path,
-                    sub:sub.value
+            setTimeout(()=>{
+                if(params.query?.categoryid  && !params.query.dup){
+                    paramsData = {
+                        params:{
+                            categoryid: params.query?.categoryid,
+                            pageNum:1,
+                            pageSize:1,
+                            order:"sortindex",
+                            articleid: params.query?.id,
+                            id: params.query?.id,
+                            details:true
+                        },
+                        index:params.path,
+                        sub:sub.value
+                    }
                 }
-            }
-            return store.dispatch('getPageData',paramsData)
+                return store.dispatch('getPageData',paramsData)
+            },1)
         })
     }
 })
@@ -77,7 +79,7 @@ export default defineComponent({
                 <section class="common-bradcrumb-section" >
                     <banner />
                 </section>
-                <section class="product-content-section pt-60" v-show="pageStatus">
+                <section class="product-content-section pt-60" v-if="pageStatus">
                     <div class="container" v-if="store.state.pageContent.length>0">
                         <div class="row">
                             <div class="col-lg-12 col-md-12 content">