| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233 |
- <template>
- <div class="sannongzhichuang">
- <div class="inner">
- <h2>
- {{ title }}
- <em class="iconfont icon-xingzhuang-zhijiaosanjiaoxing-copy"></em>
- </h2>
- <div class="introduction">
- <strong>频道介绍</strong>
- <div v-for="(item,index) in titleData">
- <span v-if="index<=7">
- <NuxtLink :to="{ path: `/${item.aLIas_pinyin}/list-1.html`}">{{ item.alias }}</NuxtLink>
- </span>
- <b v-else></b>
- </div>
- </div>
- </div>
- </div>
- </template>
- <script setup>
- //1.设置组件数据 start---------------------------------------->
- //子导航
- const props = defineProps({
- titleData:Array,
- pinyinid:Number
- });
- //1.设置组件数据 end---------------------------------------->
- //2.设置组件标题 start ---------------------------------------->
- const title = ref("")
- async function getPageData() {
- const mkdata = await requestDataPromise('/web/getOneWebsiteCategory', {
- method: 'GET',
- query: {
- 'catid': props.pinyinid,
- },
- });
- console.log("获取一级标题",mkdata);
-
- if(mkdata.code == 200){
- title.value = mkdata.data.alias;
- }else{
- // console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
- // console.log("错误位置:获取二级标题")
- // console.log("后端错误反馈:",mkdata.message)
- // console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
- }
- }
- getPageData();
- //2.设置组件标题 end ---------------------------------------->
- </script>
- <style lang="less" scoped>
- // 三农之窗
- .sannongzhichuang {
- margin: 25px 0 25px;
- .inner {
- width: 1200px;
- height: 67px;
- position: relative;
- }
- h2 {
- display: inline-block;
- //background-image: url("../../public/image/bg1.png");
- background: #139602;
- width: 156px;
- height: 43px;
- padding: 14px 31px 10px 25px;
- font-family: STXingkai, STXingkai;
- font-weight: 400;
- font-size: 39px;
- color: #FFFFFF;
- line-height: 46px;
- text-align: center;
- font-style: normal;
- text-transform: none;
- -webkit-text-stroke: 1px #3C6C47;
- position: absolute;
- top: 0;
- left: 0;
- z-index: 99;
- em {
- position: absolute;
- top: -16px;
- right: -12px;
- color: #185410;
- display: inline-block;
- width: 13px;
- height: 13px;
- }
- }
- div.introduction {
- display: inline-block;
- width: 1003px;
- height: 56px;
- line-height: 56px;
- background-color: #fafafa;
- position: absolute;
- bottom: 0;
- right: 0;
- display: flex;
- >strong:first-child {
- margin-left: 40px;
- display: inline-block;
- vertical-align: middle;
- width: 32px;
- height: 36px;
- padding: 3px 7px;
- border: 0.5px solid #129502;
- font-family: Microsoft YaHei, Microsoft YaHei;
- font-weight: bold;
- font-size: 14px;
- color: #139602;
- line-height: 18px;
- text-align: center;
- font-style: normal;
- text-transform: none;
- }
- div {
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- >span {
- width: 64px;
- height: 21px;
- font-family: Microsoft YaHei, Microsoft YaHei;
- font-weight: 400;
- font-size: 16px;
- color: #000000;
- line-height: 21px;
- text-align: left;
- font-style: normal;
- text-transform: none;
- margin-top: 17px;
- padding: 0 24px;
- border-right: 1px solid #ccc;
- a {
- color: #000;
- }
- }
- >span:hover a {
- color: #139602;
- }
- >span:last-child {
- border: none;
- }
- }
-
- }
- }
- @media screen and (max-width:800px){/*ipad_phone*/
-
-
- // .sannongzhichuang h2{ display:none;}
- .sannongzhichuang div.introduction{ }
- .sannongzhichuang div.introduction > strong{ display:none!important;}
- .sannongzhichuang .inner{width: 92%;box-sizing:border-box;
- margin: 0px auto;height: 33px; display:flex;
-
- }
-
-
- .sannongzhichuang div.introduction{
- width:100%;display:block;word-break: keep-all; white-space: nowrap;
- box-sizing:border-box;height:100%;line-height:33px;
- position:relative;
- overflow-y:hidden;
- overflow-x:auto;
- flex:1;
- }
-
- .sannongzhichuang div.introduction::-webkit-scrollbar {
- background:rgba(0,0,0,0);
- height: 0px;
- }
- .sannongzhichuang div.introduction::-webkit-scrollbar-thumb {
- background:rgba(0,0,0,0);
- height: 0px;
- }
-
- .sannongzhichuang div.introduction::-webkit-scrollbar-track {
- background:rgba(0,0,0,0);
- height: 0px;
-
- }
-
- .sannongzhichuang div.introduction div{display:inline-block;box-sizing:border-box; }
- .farmingPartOne{height:auto;overflow:hidden;}
- .farmingPartOne .inner{height:auto;overflow:hidden;}
-
- .sannongzhichuang { margin:10px auto 10px; background:#fafafa;}
-
-
-
- .sannongzhichuang div.introduction div > span a{font-size:14px;}
- .sannongzhichuang div.introduction div > span{padding:0px 10px;}
- .sannongzhichuang div.introduction div:nth-of-type(1) > span{padding-left:0;}
- .sannongzhichuang h2{ line-height:26px;height:26px; margin-top:4px;
- width:auto;padding:0px 4px;font-size:12px; font-weight:normal;
- -webkit-text-stroke: 0px #fff;position:relative;
- display:none;
- }
- .sannongzhichuang h2 em{display:none;}
-
- }
- </style>
|