Ver Fonte

紧急修正:B端控制开启搜索

dangyunlong há 4 dias atrás
pai
commit
7431f77d08

+ 0 - 3
components/template/sector/body/index/link/1200x230/1.vue

@@ -1,8 +1,5 @@
 <template>
     <div class="linkSectorBox">
-        <!-- 
-            注意 ,该组件可以在首页与频道页中通用
-         -->
         <div v-if="skinId==1" class="linkSectorStyle1Box">
             <div class="linkSectorItem bg1">
                 <NuxtLink href="http://dy.qgsnfzzx.org.cn/list-renyuanchaxun.html" target="_blank">

+ 0 - 3
components/template/sector/body/index/list/1200x470/2.vue

@@ -1,8 +1,5 @@
 <template>
     <div class="manyPictureSectorBox">
-        <!-- 
-            注意 ,该组件可以在首页与频道页中通用
-         -->
         <div class="manyPictureSector">
             <div class="manyPictureSectorLeft">
                 <div v-if="templateData[0].component_style.toString()=='1'">

+ 0 - 3
components/template/sector/body/index/list/1200x980/1.vue

@@ -1,8 +1,5 @@
 <template>
     <div class="commentSectorBox">
-        <!-- 
-            注意 ,该组件可以在首页与频道页中通用
-         -->
         <div class="commentSector">
             <div class="commentSectorLeft">
                 <div class="commentSectorLeftTop">

+ 1 - 1
components/template/sector/head/1200x200/1.vue

@@ -13,7 +13,7 @@
                         <button class="reg" @click="goLogin" v-show="!showToken"><img src="http://img.bjzxtw.org.cn/master/bjzxtw/public/head/topicon3.png">登录</button>
                         <button class="reg" @click="goRegister" v-show="!showToken"><img src="http://img.bjzxtw.org.cn/master/bjzxtw/public/head/topicon4.png">注册</button>
                         <button class="reg" @click="userCenter" v-show="showToken"><img src="http://img.bjzxtw.org.cn/master/bjzxtw/public/head/topicon3.png">{{username}}</button>
-                        <button class="reg" @click="goSearch"><img src="http://img.bjzxtw.org.cn/master/bjzxtw/public/head/searchicon.png">搜索</button>
+                        <button class="reg" @click="goSearch" v-if="templateBaseStore.isSearch"><img src="http://img.bjzxtw.org.cn/master/bjzxtw/public/head/searchicon.png">搜索</button>
                     </div>
                     <ul class="userInfo11" v-if="isShow">
                         <li @click="gotosystem">个人中心</li>

+ 1 - 1
nuxt.config.js

@@ -26,7 +26,7 @@ export default defineNuxtConfig({
   ],
   build: {
     publicPath: '/',
-    transpile: ['#app-manifest'],
+    //transpile: ['#app-manifest'],
   },
   nitro: {
     devServer: {

+ 2 - 0
pages/[dir]/[dir]/[id].vue

@@ -82,6 +82,8 @@ const response:any = await requestDataPromise('/client/indexData', {
 });
 //2.2模板数据
 const templateData = response.data.template.article;
+//是否启用搜索功能
+templateBaseStore.setIsSearch(response.data.isSearch)
 console.log(templateData)
 //2.3广告数据
 const adData = ref<any[]>([]);

+ 2 - 0
pages/[dir]/[dir]/list-[id].vue

@@ -127,6 +127,8 @@ const response = await requestDataPromise('/client/indexData', {
 });
 //页面模板数据
 const templateData = response.data.template.list;
+//是否启用搜索功能
+templateBaseStore.setIsSearch(response.data.isSearch)
 console.log(templateData)
 //2.2广告数据
 const adData = ref<any[]>([]);

+ 2 - 0
pages/[dir]/[id].vue

@@ -82,6 +82,8 @@ const response:any = await requestDataPromise('/client/indexData', {
 });
 //2.2模板数据
 const templateData = response.data.template.article;
+//是否启用搜索功能
+templateBaseStore.setIsSearch(response.data.isSearch)
 console.log(templateData)
 //2.3广告数据
 const adData = ref<any[]>([]);

+ 2 - 0
pages/[dir]/index.html.vue

@@ -136,6 +136,8 @@ const response:any = await requestDataPromise('/client/indexData', {
     },
 });
 const templateData = response.data.template.class;
+//是否启用搜索功能
+templateBaseStore.setIsSearch(response.data.isSearch)
 //console.log(templateData)
 //2.2.1循环一下模板数据,把所有需要请求后端内容的组件里面imgSize和textSize拿出来
 const getIndex = ref<number>(0);

+ 2 - 0
pages/[dir]/list-[id].vue

@@ -101,6 +101,8 @@ const response = await requestDataPromise('/client/indexData', {
 });
 //页面模板数据
 const templateData = response.data.template.list;
+//是否启用搜索功能
+templateBaseStore.setIsSearch(response.data.isSearch)
 console.log(templateData)
 //2.2广告数据
 const adData = ref<any[]>([]);

+ 2 - 0
pages/index.vue

@@ -131,6 +131,8 @@ try {
     if(response.code == 200){
         //页面数据
         templateData.value = response.data.template.index;
+        //是否启用搜索功能
+        templateBaseStore.setIsSearch(response.data.isSearch)
         //广告数据
         adData.value.push(response.data.ad.top)
         for(let item of response.data.ad.index){

+ 2 - 0
pages/search/[id].vue

@@ -83,6 +83,8 @@ const response = await requestDataPromise('/client/indexData', {
 });
 //页面数据
 const templateData = response.data.template.search;
+//是否启用搜索功能
+templateBaseStore.setIsSearch(response.data.isSearch)
 console.log(templateData)
 //广告数据
 const adData = ref<any[]>([]);

+ 1 - 1
plugins/request.js

@@ -13,7 +13,7 @@ export default defineNuxtPlugin(nuxtApp => {
         //webUrl: 'https://flzxw.bjzxtw.org.cn', //接口地址
         //CwebUrl: 'nw.nmwwt.org' //页面地址
         //pre环境
-        webUrl: 'http://apipre1.bjzxtw.org.cn:29501', //pre接口地址
+        webUrl: 'https://apipre1.bjzxtw.org.cn', //pre接口地址
         CwebUrl: currentDomain //页面地址
     }
 

+ 5 - 0
stores/templateBase.js

@@ -2,6 +2,7 @@ import { defineStore } from "pinia";
 export const useTemplateBaseStore = defineStore("templateBase", {
     state: () => ({
         webSiteInfo: {},
+        isSearch:false,
         webAdList:[],
     }),
     actions: {
@@ -9,6 +10,10 @@ export const useTemplateBaseStore = defineStore("templateBase", {
         setWebSiteInfo(webSiteInfo) {
             this.webSiteInfo = webSiteInfo
         },
+        //是否启用搜索功能
+        setIsSearch(bool){
+            this.isSearch = bool
+        },
         //广告列表
         setAdList(webAdList){
             this.webAdList = webAdList