|
@@ -69,6 +69,7 @@
|
|
|
//1.页面依赖 start ---------------------------------------->
|
|
|
import { ElBreadcrumb, ElBreadcrumbItem, ElPagination } from 'element-plus'
|
|
|
import { ArrowRight } from '@element-plus/icons-vue'
|
|
|
+import { ref, onMounted } from 'vue';
|
|
|
//获得跳转过来的id
|
|
|
const route = useRoute();
|
|
|
const pageId = route.params.id;
|
|
@@ -76,27 +77,55 @@ const routeHref = route.href;
|
|
|
//1.页面依赖 end ---------------------------------------->
|
|
|
|
|
|
//2.页面数据 start ---------------------------------------->
|
|
|
+//广告
|
|
|
let adImg1 = ref([]);
|
|
|
let adImg2 = ref([]);
|
|
|
-async function getAdData(){
|
|
|
- const adData = await requestDataPromise('/web/getWebsiteAdvertisement',{method:'GET',query:{'ad_tag':'PAGE'}});
|
|
|
- if(adData.code==200){
|
|
|
- for(let item of adData.data){
|
|
|
- if(item.ad_tag == 'PAGE_0001'){
|
|
|
- adImg1.value = item;
|
|
|
- }
|
|
|
- if(item.ad_tag == 'PAGE_0002'){
|
|
|
- adImg2.value = item;
|
|
|
- }
|
|
|
+// async function getAdData(){
|
|
|
+// const adData = await requestDataPromise('/web/getWebsiteAdvertisement',{method:'GET',query:{'ad_tag':'PAGE'}});
|
|
|
+// if(adData.code==200){
|
|
|
+// for(let item of adData.data){
|
|
|
+// if(item.ad_tag == 'PAGE_0001'){
|
|
|
+// adImg1.value = item;
|
|
|
+// }
|
|
|
+// if(item.ad_tag == 'PAGE_0002'){
|
|
|
+// adImg2.value = item;
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }else{
|
|
|
+// console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
|
|
|
+// console.log("错误位置:获取详情页广告列表")
|
|
|
+// console.log("后端错误反馈:",adData.message)
|
|
|
+// console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
|
|
|
+// }
|
|
|
+// }
|
|
|
+// getAdData();
|
|
|
+onMounted(async () => {
|
|
|
+ //从客户端获取行政职能部门 加快打开速度
|
|
|
+ const { $webUrl, $CwebUrl } = useNuxtApp();
|
|
|
+ //广告1
|
|
|
+ let url = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=snzxw_page_0001`
|
|
|
+ const responseAd1 = await fetch(url, {
|
|
|
+ headers: {
|
|
|
+ 'Content-Type': 'application/json',
|
|
|
+ 'Userurl': $CwebUrl,
|
|
|
+ 'Origin': $CwebUrl
|
|
|
}
|
|
|
- }else{
|
|
|
- console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
|
|
|
- console.log("错误位置:获取详情页广告列表")
|
|
|
- console.log("后端错误反馈:",adData.message)
|
|
|
- console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
|
|
|
- }
|
|
|
-}
|
|
|
-getAdData();
|
|
|
+ });
|
|
|
+ const resultAd1 = await responseAd1.json();
|
|
|
+ adImg1.value = resultAd1.data[0];
|
|
|
+
|
|
|
+ //广告2
|
|
|
+ let url2 = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=snzxw_page_0002`
|
|
|
+ const responseAd2 = await fetch(url2, {
|
|
|
+ headers: {
|
|
|
+ 'Content-Type': 'application/json',
|
|
|
+ 'Userurl': $CwebUrl,
|
|
|
+ 'Origin': $CwebUrl
|
|
|
+ }
|
|
|
+ });
|
|
|
+ const resultAd2 = await responseAd2.json();
|
|
|
+ adImg2.value = resultAd2.data[0];
|
|
|
+})
|
|
|
|
|
|
//左侧导航
|
|
|
const bottomMenu = ref([]);
|