Pārlūkot izejas kodu

紧急修正:顶部个人中心菜单不显示

紧急修正:顶部个人中心菜单不显示
dangyunlong 1 dienu atpakaļ
vecāks
revīzija
52239337e9

+ 1 - 1
components/template/component/list/1200x480/1.vue

@@ -77,7 +77,7 @@
                 </div>
                 <div class="adBox">
                     <!-- 广告模块 -->
-                    <a href="http://nzgxw.org.cn/" v-if="templateAdData.image_url==null" target="_blank" :title="templateAdData.introduce">
+                    <a :href="templateAdData.ad_url" v-if="templateAdData.image_url==null" target="_blank" :title="templateAdData.introduce">
                         <img :src="templateAdData.thumb" :alt="templateAdData.introduce" :id="templateAdData.ad_tag"  data-tag="templateAdData.ad_tag">
                     </a>
                     <a :href="templateAdData.image_url" v-else :title="templateAdData.introduce">

+ 1 - 1
components/template/component/list/1200x480/2.vue

@@ -77,7 +77,7 @@
                 </div>
                 <div class="adBox">
                     <!-- 广告模块 -->
-                    <a href="http://nzgxw.org.cn/" v-if="templateAdData.image_url==null" target="_blank" :title="templateAdData.introduce">
+                    <a :href="templateAdData.ad_url" v-if="templateAdData.image_url==null" target="_blank" :title="templateAdData.introduce">
                         <img :src="templateAdData.thumb" :alt="templateAdData.introduce" :id="templateAdData.ad_tag"  data-tag="templateAdData.ad_tag">
                     </a>
                     <a :href="templateAdData.image_url" v-else :title="templateAdData.introduce">

+ 1 - 1
components/template/sector/body/ad/1200x90/1.vue

@@ -1,7 +1,7 @@
 <template>
     <div class="adversing" v-if="imgurl">
         <div class="inner">
-            <a href="http://nzgxw.org.cn/" v-if="imgurl.image_url==null" target="_blank" :title="imgurl.introduce">
+            <a :href="imgurl.ad_url" v-if="imgurl.image_url==null" target="_blank" :title="imgurl.introduce">
                 <img :src="imgurl.thumb" :alt="imgurl.introduce" :id="imgurl.ad_tag"  data-tag="imgurl.ad_tag">
             </a>
             <a :href="imgurl.image_url" v-else :title="imgurl.introduce">

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

@@ -1,6 +1,6 @@
 <template>
     <!-- <div>当前皮肤:{{ skinId }}</div> -->
-    <header>
+    <!-- <header>
         <nav class="headerNav">
             <div class="inner">
                 <div class="left">你好,欢迎来到{{webSiteName}}!</div>
@@ -26,7 +26,7 @@
             <div class="inner">
                 <img :src="logo" :alt="webSiteName" class="left" @click="backHome">
                 <div class="titlead" v-if="adImg">
-                    <a href="http://sannongdy.org.cn/" v-if="adImg.image_url == null" target="_blank" :title="adImg.introduce"><img :src="adImg.thumb" :alt="adImg.introduce" data-tag="imgurl.ad_tag" :id="adImg.ad_tag"></a>
+                    <a href="adImg.ad_url" v-if="adImg.image_url == null" target="_blank" :title="adImg.introduce"><img :src="adImg.thumb" :alt="adImg.introduce" data-tag="imgurl.ad_tag" :id="adImg.ad_tag"></a>
                     <a :href="adImg.image_url" v-else :title="adImg.introduce"><img :src="adImg.image_src" :alt="adImg.introduce" data-tag="imgurl.ad_tag" :id="adImg.ad_tag"></a>
                 </div>
             </div>
@@ -38,18 +38,60 @@
                 <p>QQ : 2909421493 、213552413</p>
             </div>
         </el-dialog>
+    </header> -->
+    <header>
+        <nav class="headerNav">
+            <div class="inner">
+                <div class="left">
+                    <span>你好,欢迎来到{{webSiteName}}!</span>
+                </div>
+                <div class="right">
+                    <div class="menu">
+                        <button class="reg" @click="goTopic"><img src="http://img.bjzxtw.org.cn/master/bjzxtw/public/head/topicon1.png" alt="商圈">商圈</button>
+                        <button class="reg" @click="goAdvertising"><img src="http://img.bjzxtw.org.cn/master/bjzxtw/public/head/topicon2.png" alt="广告服务">广告服务</button>
+                    </div>
+                    <div class="right-top-menu">
+                        <button class="reg" @click="goLogin" v-show="!showToken"><img src="http://img.bjzxtw.org.cn/master/bjzxtw/public/head/topicon3.png" alt="登录">登录</button>
+                        <button class="reg" @click="goRegister" v-show="!showToken"><img src="http://img.bjzxtw.org.cn/master/bjzxtw/public/head/topicon4.png" alt="注册">注册</button>
+                        <button class="reg" @click="userCenter" v-show="showToken"><img src="http://img.bjzxtw.org.cn/master/bjzxtw/public/head/topicon3.png" alt="用户信息">{{username }}</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>
+                        <li @click="exit">退出</li>
+                    </ul>
+                </div>
+            </div>
+        </nav>
+        <div class="headerLogo">
+            <div class="inner">
+                <img :src="logo" :alt="webSiteName" class="left" @click="backHome">
+                <div class="titlead" v-if="adImg">
+                    <a :href="adImg.ad_url" v-if="adImg.image_url == null" target="_blank" :title="adImg.introduce">
+                        <img :src="adImg.thumb" :alt="adImg.introduce" data-tag="imgurl.ad_tag" :id="adImg.ad_tag">
+                    </a>
+                    <a :href="adImg.image_url" v-else :title="adImg.introduce">
+                        <img :src="adImg.image_src" :alt="adImg.introduce" data-tag="imgurl.ad_tag" :id="adImg.ad_tag">
+                    </a>
+                </div>
+            </div>
+        </div>
+        <el-dialog v-model="dialogTableVisible" width="800">
+            <div class="tips">
+                <p><img src="@/public/topic/tips.png"> 提示:注册请联系管理员操作!</p>
+                <p>联系电话:010-56019387</p>
+                <p>QQ : 2909421493 、213552413</p>
+            </div>
+        </el-dialog>
     </header>
 </template>
 
 <script setup>
-
 //1.加载基本依赖 start ---------------------------------------->
 import { ref, watch, onMounted } from 'vue'
 import { ElDialog } from 'element-plus'
 import { getToken, setToken, removeToken } from '@/store/useCookieStore'
 import { setTicket, removeTicket } from '@/store/useticketStore'
-import { useTemplateBaseStore } from '@/stores/templateBase'
-const templateBaseStore = useTemplateBaseStore()
 //网站地址
 const { $webUrl, $CwebUrl, $BwebUrl, $LoginWebUrl } = useNuxtApp()
 //1.加载基本依赖 end ---------------------------------------->
@@ -89,9 +131,9 @@ token1.value = getToken()
 let tokenStatus = ref('');
 tokenStatus.value = getToken()
 if (tokenStatus.value == undefined) {
-    // console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
-    // console.log('错误:未获取到用户token,如果在本地测试请忽略!');
-    // console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
+    console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
+    console.log('错误:未获取到用户token,如果在本地测试请忽略!');
+    console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
 } else {
     console.log(tokenStatus.value);
 }
@@ -151,6 +193,7 @@ const handleClickOutside = (event) => {
 //3.跳转菜单逻辑 start ---------------------------------------->
 let gotosystem = () => {
     let url = $BwebUrl + '/#/login?userurl=' + $CwebUrl;
+    isShow.value = false
     //window.location.href = url; 
     window.open(url, '_blank');
 }
@@ -158,7 +201,7 @@ let gotosystem = () => {
 //点击退出按钮
 let exit = () => {
     window.location.href = $CwebUrl;
-
+    isShow.value = false
     isDel.value = 1
     token1.value = getToken()
 
@@ -188,7 +231,7 @@ let goSearch = () => {
 // 点击广告服务
 let goAdvertising = () => {
     //本地启动广告服务
-    //window.open('/advertising?activeName=1', '_blank');
+    // window.open('/advertising?activeName=1', '_blank');
     //线上启动
     if (getToken()) {
         window.open($CwebUrl + '/advertising?activeName=1', '_blank');
@@ -199,6 +242,9 @@ let goAdvertising = () => {
 
 //点击商圈
 let goTopic = () => {
+    //本地启动
+    // window.open('/topic', '_blank');
+    //线上启动
     if (getToken()) {
         window.open($CwebUrl + '/topic', '_blank');
     } else {
@@ -214,6 +260,23 @@ watch(token1, (newval, oldval) => {
     deep: true,
     immediate: true,
 })
+
+//获得网站logo
+// const logo = ref("")
+// const webSiteName = ref("")
+// let getLogo = async () => {
+//     const responseStatus = await requestDataPromise('/web/getWebsiteHead', {
+//         method: 'GET',
+//         query: {},
+//     });
+//     if (responseStatus.code == 200) {
+//         logo.value = responseStatus.data.logo;
+//         webSiteName.value = responseStatus.data.website_name;
+//     } else if (responseStatus.code == 0) {
+//         window.location.href = $CwebUrl + '/404';
+//     }
+// }
+// getLogo();
 //3.跳转菜单逻辑 end ---------------------------------------->
 
 //4.获取广告 start ---------------------------------------->
@@ -239,7 +302,7 @@ onMounted(async () => {
 
         if (token == undefined) {
             //如果没有获取到token 不访问后端获取在线状态
-            //console.log("没有获取到token!无需查询登录状态!")
+            console.log("没有获取到token!无需查询登录状态!")
             showToken.value = false;
 
         } else {
@@ -287,9 +350,8 @@ onMounted(async () => {
     //从客户端获取广告
     //从客户端获取行政职能部门 加快打开速度
     const { $webUrl, $CwebUrl } = useNuxtApp();
-
     //广告1
-    // let url = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=nmw_top`
+    // let url = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=xcw_top`
     // const responseAd1 = await fetch(url, {
     //     headers: {
     //         'Content-Type': 'application/json',
@@ -318,6 +380,8 @@ onMounted(async () => {
 
 
 //6.获得网站基本信息与广告池 start ---------------------------------------->
+import { useTemplateBaseStore } from '@/stores/templateBase'
+const templateBaseStore = useTemplateBaseStore()
 //获得网站logo
 const logo = ref("")
 const webSiteName = ref("")