pageHead.vue 34 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222
  1. <template>
  2. <header>
  3. <nav class="headerNav">
  4. <div class="inner">
  5. <div class="left">
  6. <span class="znxy">
  7. <a href="http://znxyw.org.cn/" target="_blank">中农兴业网团</a>
  8. </span>
  9. <span>
  10. 旗下网站 · 政府类农业百强网站!
  11. <NuxtLink class="shop_nav_head_a" to="/" title="中国乡村网首页">中国乡村网首页</NuxtLink>
  12. </span>
  13. </div>
  14. <div class="right">
  15. <div class="menu">
  16. <button class="reg" @click="goTopic">
  17. <img src="http://img.bjzxtw.org.cn/master/bjzxtw/public/head/topicon1.png" alt="商圈">商圈
  18. </button>
  19. <button class="reg" @click="goAdvertising">
  20. <img src="http://img.bjzxtw.org.cn/master/bjzxtw/public/head/topicon2.png" alt="广告服务">广告服务
  21. </button>
  22. </div>
  23. <div class="right-top-menu">
  24. <button class="reg" @click="goLogin" v-show="!showToken">
  25. <img src="http://img.bjzxtw.org.cn/master/bjzxtw/public/head/topicon3.png" alt="登录">登录
  26. </button>
  27. <button class="reg" @click="goRegister" v-show="!showToken">
  28. <img src="http://img.bjzxtw.org.cn/master/bjzxtw/public/head/topicon4.png" alt="注册">注册
  29. </button>
  30. <button class="reg" @click="userCenter" v-show="showToken">
  31. <img src="http://img.bjzxtw.org.cn/master/bjzxtw/public/head/topicon3.png" alt="用户信息">{{
  32. username }}
  33. </button>
  34. <button class="reg" @click="goSearch">
  35. <img src="http://img.bjzxtw.org.cn/master/bjzxtw/public/head/searchicon.png" alt="搜索">搜索
  36. </button>
  37. </div>
  38. <ul class="userInfo11" v-if="isShow">
  39. <li @click="gotosystem">个人中心</li>
  40. <li @click="exit">退出</li>
  41. </ul>
  42. </div>
  43. </div>
  44. </nav>
  45. <!--商城header-->
  46. <div class="shop_head clearfix_2">
  47. <div class="shop_head_left">
  48. <NuxtLink class="shop_head_left_a" to="/" :title="webSiteName">
  49. <!-- <img class="shop_head_img" src="@/public/img/2.png" alt="乡村商城"> -->
  50. <img class="shop_head_img" :src="logo" :alt="webSiteName">
  51. </NuxtLink>
  52. </div>
  53. <div class="shop_head_form_out clearfix">
  54. <form class="shop_head_form" action="" method="">
  55. <input class="shop_head_btn hand" type="button" @click="goShopSearch">
  56. <input class="shop_head_inp hand" type="search" v-model="shopKeyword" placeholder="请输入要搜索的商品名称..">
  57. </form>
  58. </div>
  59. <div class="shop_head_right clearfix_2">
  60. <div
  61. :class="['shop_head_right_btn', alert_1_num == 2 ? 'shop_head_right_btn_active' : '']"
  62. @mouseenter="qhTabs(2)"
  63. >
  64. 我要卖
  65. </div>
  66. <div
  67. :class="['shop_head_right_btn', alert_1_num == 1 ? 'shop_head_right_btn_active' : '']"
  68. @mouseenter="qhTabs(1)"
  69. >
  70. 我要买
  71. </div>
  72. <!-- 我要卖 -->
  73. <section class="shop_alert_out" v-if="alert_1_num == 2" @mouseenter="qhTabs(2)" @mouseleave="qhTabs(0)">
  74. <div class="shop_alert_box">
  75. <div class="shop_alert_head_box clearfix">
  76. <div class="shop_alert_head_name_1">全部信息分类</div>
  77. <div class="shop_alert_head_name_2">求购信息</div>
  78. <span class="shop_alert_head_btn_a" @click="goLogin">
  79. 发布求购信息
  80. </span>
  81. </div>
  82. <div class="shop_alert_ul clearfix">
  83. <div class="shop_alert_li clearfix" v-for="item in shopMenu" :key="per_obj">
  84. <label class="shop_alert_li_label">{{ item.alias }}</label>
  85. <div class="shop_alert_li_panel clearfix">
  86. <NuxtLink
  87. class="shop_alert_li_panel_a"
  88. v-for="i in item.children"
  89. :to="`/xiangcunshangcheng/${item.aLIas_pinyin}/${i.aLIas_pinyin}/gongying/list-1.html`"
  90. :title="item.name"
  91. >
  92. {{ i.alias }}
  93. </NuxtLink>
  94. </div>
  95. </div>
  96. </div>
  97. <div class="shop_alert_1_index clearfix">
  98. <!--产品展台-->
  99. <div class="shop_name_box">
  100. <div class="shop_name">
  101. <span class="shop_name_box_a">产品展台</span>
  102. </div>
  103. <div class="shop_name_right"></div>
  104. </div>
  105. <div class="shop_alert_img_ul clearfix">
  106. <div class="shop_alert_img_li clearfix" v-for="item in shopMenuGoods">
  107. <NuxtLink
  108. :to="getShopLinkPath(item)"
  109. class="shop_alert_img_li_a"
  110. :title="item.name"
  111. >
  112. <img class="shop_alert_img_li_img" :src="item.imgurl" :title="item.name" :alt="item.name">
  113. <div class="shop_alert_img_li_right">
  114. <!--产品展台产品展台产品展台产品展台产品展台产品展台产品展台产品展台产品展台产品展台产品展台产品展台产品展台产品展台产品展台产品展台产品展台产品展台产品展台产品展台产品展台产品展台-->
  115. <h4 class="shop_alert_img_li_h4 dot1">{{ item.name }}</h4>
  116. <div class="shop_alert_img_li_dot3 dot3">{{ item.description }}</div>
  117. <time class="shop_alert_img_li_time">{{ item.updated_at }}</time>
  118. </div>
  119. </NuxtLink>
  120. </div>
  121. </div>
  122. </div>
  123. </div>
  124. </section>
  125. <!-- 我要卖 -->
  126. <!-- 我要买 -->
  127. <section class="shop_alert_out" v-if="alert_1_num == 1" @mouseenter="qhTabs(1)" @mouseleave="qhTabs(0)">
  128. <div class="shop_alert_box">
  129. <div class="shop_alert_head_box clearfix">
  130. <div class="shop_alert_head_name_1">全部信息分类</div>
  131. <div class="shop_alert_head_name_2">供应信息</div>
  132. <span class="shop_alert_head_btn_a" @click="goLogin">
  133. 发布供应信息
  134. </span>
  135. </div>
  136. <div class="shop_alert_ul clearfix">
  137. <div class="shop_alert_li clearfix" v-for="item in shopMenu" :key="item.id">
  138. <label class="shop_alert_li_label">{{ item.alias }}</label>
  139. <div class="shop_alert_li_panel clearfix">
  140. <NuxtLink
  141. class="shop_alert_li_panel_a"
  142. v-for="i in item.children"
  143. :to="`/xiangcunshangcheng/${item.aLIas_pinyin}/${i.aLIas_pinyin}/qiugou/list-1.html`"
  144. :title="item.name"
  145. >
  146. {{ i.alias }}
  147. </NuxtLink>
  148. </div>
  149. </div>
  150. </div>
  151. <div class="shop_alert_1_index clearfix">
  152. <!--产品展台-->
  153. <div class="shop_name_box">
  154. <div class="shop_name">
  155. <span class="shop_name_box_a">产品展台</span>
  156. </div>
  157. <div class="shop_name_right"></div>
  158. </div>
  159. <div class="shop_alert_img_ul clearfix">
  160. <div class="shop_alert_img_li clearfix" v-for="item in shopMenuGoods">
  161. <NuxtLink
  162. :to="getShopLinkPath(item)"
  163. class="shop_alert_img_li_a"
  164. :title="item.name"
  165. >
  166. <img class="shop_alert_img_li_img" :src="item.imgurl" :title="item.name" :alt="item.name">
  167. <div class="shop_alert_img_li_right">
  168. <h4 class="shop_alert_img_li_h4 dot1">{{ item.name }}</h4>
  169. <div class="shop_alert_img_li_dot3 dot3">{{ item.description }}</div>
  170. <time class="shop_alert_img_li_time">{{ item.updated_at }}</time>
  171. </div>
  172. </NuxtLink>
  173. </div>
  174. </div>
  175. </div>
  176. </div>
  177. </section>
  178. <!-- 我要买 -->
  179. </div>
  180. </div>
  181. <!--商城header-->
  182. <el-dialog v-model="dialogTableVisible" width="800">
  183. <div class="tips">
  184. <p>
  185. <img src="@/public/topic/tips.png"> 提示:注册请联系管理员操作!
  186. </p>
  187. <p>联系电话:010-56019387</p>
  188. <p>QQ : 2909421493 、213552413</p>
  189. </div>
  190. </el-dialog>
  191. </header>
  192. </template>
  193. <script setup>
  194. //1.加载基本依赖 start ---------------------------------------->
  195. import { ref, watch, onMounted } from 'vue'
  196. import { ElDialog } from 'element-plus'
  197. import { getToken, setToken, removeToken } from '@/store/useCookieStore'
  198. import { setTicket, removeTicket } from '@/store/useticketStore'
  199. //网站地址
  200. const { $webUrl, $CwebUrl, $BwebUrl, $LoginWebUrl } = useNuxtApp()
  201. //1.加载基本依赖 end ---------------------------------------->
  202. //1.登录逻辑 start ---------------------------------------->
  203. let ticket = ref('')
  204. let token = ref('')
  205. let route = useRoute()
  206. //页面每次刷新先判断一下用户状态是否已经过期了
  207. //如果没有过期再储存token
  208. ticket.value = route.query.ticket
  209. token.value = route.query.admintoken
  210. if (ticket.value) {
  211. setTicket(ticket.value)
  212. }
  213. if (token.value) {
  214. setToken(token.value)
  215. }
  216. //搜索框
  217. let keyword = useState('keyword', () => '')
  218. //用户名
  219. let username = useState('username', () => '用户中心')
  220. //是否删除
  221. let isDel = useState('isDel', () => 1)
  222. //是否显示用户中心
  223. let isShow = useState('isShow', () => false)
  224. let token1 = useState("token1", () => '')
  225. let showToken = useState("showToken", () => '')
  226. token1.value = getToken()
  227. //检测登录状态
  228. let tokenStatus = ref('');
  229. tokenStatus.value = getToken()
  230. if (tokenStatus.value == undefined) {
  231. console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
  232. console.log('错误:未获取到用户token,如果在本地测试请忽略!');
  233. console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
  234. } else {
  235. console.log(tokenStatus.value);
  236. }
  237. //点击登录按钮
  238. let goLogin = () => {
  239. //开启线上登录模式 start---------------------------------------->
  240. isDel.value = 0
  241. token1.value = getToken()
  242. //王鹏
  243. //window.open($BwebUrl + "/auth/login.php?backurl=" + $CwebUrl, '_blank');
  244. //刘佳伟
  245. //window.open($LoginWebUrl + "/api/goLogin?backurl=" + $CwebUrl, '_blank');
  246. //党云龙
  247. window.open($BwebUrl + "/#/login?backurl=" + $CwebUrl, '_blank');
  248. //开启线上登录模式 end---------------------------------------->
  249. //开启本地登录模式 start---------------------------------------->
  250. // window.location.href = $BwebUrl + "/auth/login.php?backurl=" + $CwebUrl;
  251. //"http://adminpre.bjzxtw.org.cn/auth/login.php?backurl=http://nwpre.bjzxtw.org.cn";
  252. //开启本地登录模式 end---------------------------------------->
  253. }
  254. let dialogTableVisible = ref(false)
  255. //点击注册按钮
  256. let goRegister = () => {
  257. dialogTableVisible.value = true
  258. }
  259. //点击用户中心
  260. let userCenter = () => {
  261. if (isShow.value) {
  262. isShow.value = false
  263. return
  264. } else {
  265. isShow.value = true
  266. return
  267. }
  268. }
  269. // 添加点击事件处理函数
  270. const handleClickOutside = (event) => {
  271. // 获取用户信息菜单元素
  272. const userInfoMenu = document.querySelector('.userInfo11');
  273. // 获取用户按钮元素
  274. const userButton = document.querySelector('.reg img[alt="用户信息"]')?.parentElement;
  275. // 如果点击的不是菜单本身且不是用户按钮,则隐藏菜单
  276. if (userInfoMenu &&
  277. !userInfoMenu.contains(event.target) &&
  278. !userButton?.contains(event.target)) {
  279. isShow.value = false;
  280. }
  281. }
  282. //2.登录逻辑 end ---------------------------------------->
  283. //3.跳转菜单逻辑 start ---------------------------------------->
  284. let gotosystem = () => {
  285. let url = $BwebUrl + '/#/login?userurl=' + $CwebUrl;
  286. isShow.value = false
  287. //window.location.href = url;
  288. window.open(url, '_blank');
  289. }
  290. //点击退出按钮
  291. let exit = () => {
  292. window.location.href = $CwebUrl;
  293. isShow.value = false
  294. isDel.value = 1
  295. token1.value = getToken()
  296. let tokendata = getToken()
  297. //王鹏
  298. // let url = $BwebUrl + '/auth/logout.php?backurl=' + $CwebUrl + '&admintoken=' + tokendata;
  299. // console.log("用户退出登录======token为:", tokendata,url)
  300. //刘佳伟
  301. let url = $LoginWebUrl + '/api/logout?backurl=' + $CwebUrl + '&admintoken=' + tokendata;
  302. window.location.href = url;
  303. removeToken()
  304. removeTicket()
  305. }
  306. //点击返回首页
  307. let backHome = () => {
  308. window.location.href = $CwebUrl;
  309. }
  310. //点击搜索按钮
  311. let goSearch = () => {
  312. const route = `/search/search?keyword=${keyword.value}`;
  313. window.location.href = route;
  314. }
  315. // 点击广告服务
  316. let goAdvertising = () => {
  317. //本地启动广告服务
  318. //window.open('/advertising?activeName=1', '_blank');
  319. //线上启动
  320. if (getToken()) {
  321. window.open($CwebUrl + '/advertising?activeName=1', '_blank');
  322. } else {
  323. goLogin()
  324. }
  325. }
  326. //点击商圈
  327. let goTopic = () => {
  328. if (getToken()) {
  329. window.open($CwebUrl + '/topic', '_blank');
  330. } else {
  331. goLogin()
  332. }
  333. }
  334. //监听token状态
  335. watch(token1, (newval, oldval) => {
  336. //console.log(newval, oldval);
  337. showToken.value = newval
  338. }, {
  339. deep: true,
  340. immediate: true,
  341. })
  342. //获得网站logo
  343. const logo = ref("")
  344. const webSiteName = ref("")
  345. let getLogo = async () => {
  346. const responseStatus = await requestDataPromise('/web/getWebsiteHead', {
  347. method: 'GET',
  348. query: {},
  349. });
  350. logo.value = responseStatus.data.logo;
  351. webSiteName.value = responseStatus.data.website_name;
  352. }
  353. getLogo();
  354. //3.跳转菜单逻辑 end ---------------------------------------->
  355. //4.获取广告 start ---------------------------------------->
  356. let adImg = ref({})
  357. //4.获取广告 end ---------------------------------------->
  358. //5.获取登录状态 start ---------------------------------------->
  359. // 在组件卸载时移除事件监听
  360. onUnmounted(() => {
  361. document.removeEventListener('click', handleClickOutside);
  362. })
  363. onMounted(async () => {
  364. //添加监听关闭个人中心菜单
  365. document.addEventListener('click', handleClickOutside);
  366. //从客户端获取登录状态
  367. //从客户端阶段开始 持续查询登录状态
  368. let getLoginStatus = async () => {
  369. //获得token
  370. const token = getToken();
  371. const { $webUrl, $CwebUrl } = useNuxtApp();
  372. if (token == undefined) {
  373. //如果没有获取到token 不访问后端获取在线状态
  374. console.log("没有获取到token!无需查询登录状态!")
  375. showToken.value = false;
  376. } else {
  377. //如果获取到了token 访问后端查询状态
  378. console.log("已获取到用户token,开始查询登录状态!")
  379. const queryParams = new URLSearchParams({
  380. token: getToken()
  381. });
  382. let url = `${$webUrl}/api/loginStatus?${queryParams.toString()}`
  383. const responseStatus = await fetch(url, {
  384. method: 'GET',
  385. headers: {
  386. 'Content-Type': 'application/json',
  387. 'Userurl': $CwebUrl,
  388. //'token': getToken(),
  389. 'Origin': $CwebUrl
  390. }
  391. });
  392. const result = await responseStatus.json();
  393. console.log(result)
  394. if (result.code == 200) {
  395. console.log("用户已经登录!");
  396. showToken.value = true;
  397. }
  398. if (result.code == -1) {
  399. isShow.value = false;
  400. showToken.value = false;
  401. removeToken();
  402. removeTicket();
  403. ElMessage.error('您没有权限登录该网站!')
  404. }
  405. if (result.code == -2) {
  406. isShow.value = false;
  407. showToken.value = false;
  408. removeToken();
  409. removeTicket();
  410. ElMessage.error('您已退出登录!')
  411. }
  412. }
  413. }
  414. getLoginStatus();
  415. setInterval(getLoginStatus, 3000);
  416. //从客户端获取广告
  417. //从客户端获取行政职能部门 加快打开速度
  418. const { $webUrl, $CwebUrl } = useNuxtApp();
  419. //广告1
  420. let url = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=xcw_top`
  421. const responseAd1 = await fetch(url, {
  422. headers: {
  423. 'Content-Type': 'application/json',
  424. 'Userurl': $CwebUrl,
  425. 'Origin': $CwebUrl
  426. }
  427. });
  428. const resultAd1 = await responseAd1.json();
  429. adImg.value = resultAd1.data[0];
  430. //从客户端获取用户名
  431. let userInfoUrl = `${$webUrl}/user/getUserInfo`
  432. const userInfoResponse = await fetch(userInfoUrl, {
  433. headers: {
  434. 'Content-Type': 'application/json',
  435. 'Userurl': $CwebUrl,
  436. 'Origin': $CwebUrl
  437. }
  438. });
  439. const userInfo = await userInfoResponse.json();
  440. if (userInfo.code == 200) {
  441. username.value = userInfo.data.nickname
  442. }
  443. })
  444. //5.获取登录状态 end ---------------------------------------->
  445. //6.商城 start ---------------------------------------->
  446. //6.1 商城搜索
  447. const shopKeyword = ref('')
  448. let goShopSearch = () => {
  449. const route = `/xiangcunshangcheng/search/search?keyword=${shopKeyword.value}`;
  450. window.location.href = route;
  451. }
  452. //6.2 商城菜单
  453. //我要卖
  454. const alert_1_num = ref(0)
  455. const qhTabs = function(number){
  456. alert_1_num.value = number
  457. }
  458. //6.3 获得商城菜单
  459. const shopMenu = ref([]) //获得商城菜单
  460. const shopMenuGoods = ref([]) //获得产品站台里面的商品
  461. let getShopMenu = async () => {
  462. const responseStatus = await requestDataPromise('/web/getWebsiteshopCat', {
  463. method: 'GET',
  464. query: {
  465. id:346,
  466. page:1,
  467. pageSize:10,//请求所有菜单
  468. },
  469. });
  470. if(responseStatus.data.category){
  471. shopMenu.value = responseStatus.data.category[0].children;
  472. }
  473. //shopMenuGoods.value = responseStatus.data.goods;
  474. //只展示6个商品
  475. for(let index in responseStatus.data.goods){
  476. if(index<=5){
  477. shopMenuGoods.value.push(responseStatus.data.goods[index])
  478. }
  479. }
  480. }
  481. getShopMenu();
  482. //6.商城 end ---------------------------------------->
  483. </script>
  484. <style lang="less" scoped>
  485. //常规 header start ---------------------------------------->
  486. .userInfo11 {
  487. width: 100px;
  488. height: 80px;
  489. background-color: #fff;
  490. box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  491. border-radius: 3px;
  492. position: absolute;
  493. top: 40px;
  494. right: 35px;
  495. font-size: 14px;
  496. z-index: 999;
  497. li {
  498. height: 40px;
  499. line-height: 40px;
  500. color: #333333;
  501. padding-left: 10px;
  502. }
  503. >li:hover {
  504. color: #028E21;
  505. }
  506. }
  507. .tips {
  508. padding: 20px 0;
  509. text-align: center;
  510. font-size: 20px;
  511. color: #333333;
  512. font-weight: bold;
  513. img {
  514. width: 78px;
  515. height: 78px;
  516. vertical-align: middle;
  517. margin-right: 20px;
  518. p {
  519. line-height: 30px;
  520. }
  521. }
  522. p {
  523. line-height: 40px;
  524. }
  525. >p:first-child {
  526. margin-bottom: 30px;
  527. }
  528. }
  529. /* 页面头部 */
  530. header {
  531. width: 100%;
  532. font-size: 12px;
  533. font-family: PingFang SC-Regular;
  534. color: #666666;
  535. background: url("http://img.bjzxtw.org.cn/master/bjzxtw/public/head/headtopbg.png") repeat-x;
  536. }
  537. .headerNav {
  538. width: 100%;
  539. height: 33px;
  540. line-height: 33px;
  541. }
  542. .headerNav .left span {
  543. margin-right: 20px;
  544. a {
  545. color: #666666;
  546. }
  547. }
  548. .headerNav .right {
  549. display: flex;
  550. margin-right: 10px;
  551. position: relative;
  552. button {
  553. font-size: 12px;
  554. color: #666666;
  555. border: none;
  556. background: none;
  557. cursor: pointer;
  558. }
  559. .login {
  560. width: 36px;
  561. height: 19px;
  562. color: #fff;
  563. border-radius: 4px;
  564. background-color: #028E21;
  565. margin-right: 15px;
  566. cursor: pointer;
  567. }
  568. .menu,
  569. .right-top-menu {
  570. display: flex;
  571. }
  572. .reg {
  573. margin-right: 20px;
  574. display: flex;
  575. align-items: center;
  576. justify-content: center;
  577. height: 33px;
  578. img {
  579. margin-right: 5px;
  580. }
  581. }
  582. }
  583. .headerNav .right {
  584. float: right;
  585. font-size: 12px;
  586. span {
  587. margin-right: 20px;
  588. }
  589. .home,
  590. .collection {
  591. display: inline-block;
  592. width: 16px;
  593. height: 16px;
  594. vertical-align: -3px;
  595. }
  596. .home {
  597. background-image: url("http://img.bjzxtw.org.cn/master/bjzxtw/public/image/search.png");
  598. }
  599. .collection {
  600. background-image: url("http://img.bjzxtw.org.cn/master/bjzxtw/public/image/search.png");
  601. }
  602. .exit {
  603. line-height: 30px;
  604. }
  605. // .exit:hover{
  606. // color: #028E21;
  607. // }
  608. }
  609. /* // 头部logo */
  610. .headerLogo {
  611. height: 145px;
  612. position: relative;
  613. //background: url("../../public/head/topBg.png") no-repeat center;
  614. .titlead {
  615. position: absolute;
  616. bottom: 14px;
  617. right: 26px;
  618. width: 830px;
  619. height: 110px;
  620. overflow: hidden;
  621. a {
  622. display: block;
  623. width: 830px;
  624. height: 110px;
  625. overflow: hidden;
  626. }
  627. img {
  628. width: 100%;
  629. height: 110px;
  630. }
  631. }
  632. .inner {
  633. position: relative;
  634. height: 145px;
  635. }
  636. .inner>img {
  637. width: 297px;
  638. height: 110px;
  639. margin-top: 20px;
  640. cursor: pointer;
  641. }
  642. /* // 搜索框部分 */
  643. .search {
  644. float: left;
  645. width: 440px;
  646. height: 40px;
  647. background-color: #fff;
  648. line-height: 40px;
  649. margin-left: 39px;
  650. margin: 71px 39px 48px;
  651. position: relative;
  652. em {
  653. display: inline-block;
  654. width: 30px;
  655. height: 30px;
  656. background: url("http://img.bjzxtw.org.cn/master/bjzxtw/public/image/search.png") no-repeat;
  657. position: absolute;
  658. top: 5px;
  659. left: 15px;
  660. }
  661. input {
  662. float: left;
  663. width: 351px;
  664. height: 40px;
  665. border: none;
  666. outline: none;
  667. padding-left: 65px;
  668. box-sizing: border-box;
  669. border: 1px solid #028E21;
  670. border-right: none;
  671. border-radius: 4px 0px 0px 4px;
  672. }
  673. button {
  674. float: right;
  675. width: 89px;
  676. height: 40px;
  677. background-color: #028E21;
  678. border-radius: 0px 4px 4px 0px;
  679. border: none;
  680. font-size: 14px;
  681. color: #fff;
  682. font-family: PingFang SC, PingFang SC;
  683. font-weight: 500;
  684. }
  685. }
  686. /* // 右侧小图标 */
  687. .serve {
  688. float: right;
  689. height: 60px;
  690. margin-top: 60px;
  691. margin-right: 60px;
  692. >li {
  693. float: left;
  694. height: 64px;
  695. margin-left: 48px;
  696. }
  697. >li>a {
  698. display: inline-block;
  699. height: 64px;
  700. }
  701. >li img {
  702. width: 29px;
  703. height: 29px;
  704. padding: 8px 14px;
  705. }
  706. >li p {
  707. height: 28px;
  708. text-align: center;
  709. color: #666666;
  710. }
  711. }
  712. }
  713. //常规 header end ---------------------------------------->
  714. //商城 header start ---------------------------------------->
  715. .clearfix_2::after {
  716. content: '';
  717. display: block;
  718. height: 0;
  719. visibility: hidden;
  720. clear: both;
  721. }
  722. .shop_head {
  723. width: 1200px;
  724. margin: 30px auto;
  725. }
  726. .shop_head_left {
  727. float: left;
  728. width: 322px;
  729. margin-right: 33px;
  730. .shop_head_left_a {
  731. width: 322px;
  732. display: block;
  733. }
  734. }
  735. .shop_head_img {
  736. width: 297px;
  737. height: 110px;
  738. display: block;
  739. }
  740. .shop_head_form_out {
  741. width: 550px;
  742. float: left;
  743. }
  744. .shop_head_form {
  745. margin-top: 37px;
  746. display: block;
  747. width: 547px;
  748. border: solid 1px #A01C0E;
  749. height: 40px;
  750. box-sizing: border-box;
  751. overflow: hidden;
  752. .shop_head_btn {
  753. float: right;
  754. width: 52px;
  755. height: 100%;
  756. border: solid 1px #fff;
  757. box-sizing: border-box;
  758. background: url(@/public/img/3.png) no-repeat center center #A01C0E;
  759. background-size: 22px 22px;
  760. cursor: pointer;
  761. }
  762. .shop_head_inp {
  763. display: block;
  764. text-indent: 11px;
  765. height: 40px;
  766. line-height: 40px;
  767. width: 490px;
  768. border: none;
  769. outline: none;
  770. }
  771. }
  772. .shop_head_form_foot {
  773. width: 550px;
  774. margin-top: 10px;
  775. .shop_head_form_foot_a {
  776. float: left;
  777. height: 18px;
  778. line-height: 18px;
  779. color: #999;
  780. font-size: 14px;
  781. margin-right: 10px;
  782. }
  783. }
  784. .shop_head_form_foot_a:nth-of-type(1) {
  785. color: #A01C0E;
  786. }
  787. .shop_head_form_foot_a:hover {
  788. color: #A01C0E;
  789. }
  790. .shop_head_right {
  791. float: right;
  792. margin-top: 37px;
  793. position: relative;
  794. .shop_head_right_btn {
  795. float: right;
  796. width: 120px;
  797. height: 40px;
  798. line-height: 40px;
  799. color: #666;
  800. font-size: 14px;
  801. margin-left: 10px;
  802. text-indent: 52px;
  803. border: 1px solid #E9E9E9;
  804. background: no-repeat 20px center #F4F4F4;
  805. background-size: 24px 24px !important;
  806. cursor: pointer;
  807. }
  808. }
  809. .shop_head_right_btn:nth-of-type(1) {
  810. background-image: url(@/public/img/4.png);
  811. }
  812. .shop_head_right_btn:nth-of-type(2) {
  813. background-image: url(@/public/img/5.png);
  814. }
  815. // .shop_head_right_btn:hover {
  816. // color: #fff;
  817. // background: no-repeat 20px center #A01C0E;
  818. // background-size: 24px 24px;
  819. // }
  820. .shop_head_right_btn_active {
  821. color: #fff !important;
  822. background-size: 24px 24px !important;
  823. background: url(@/public/img/4a.png) no-repeat 20px center #A01C0E !important;
  824. }
  825. .shop_head_right_btn:nth-of-type(1):hover {
  826. background-image: url(@/public/img/4a.png);
  827. }
  828. .shop_head_right_btn:nth-of-type(2):hover {
  829. background-image: url(@/public/img/5a.png);
  830. }
  831. .shop_head_right_btn_1_only {
  832. color: #fff;
  833. background: no-repeat 20px center #A01C0E;
  834. background-size: 24px 24px;
  835. background-image: url(@/public/img/4a.png);
  836. }
  837. .shop_head_right_btn_2_only {
  838. color: #fff;
  839. background: no-repeat 20px center #A01C0E;
  840. background-size: 24px 24px;
  841. background-image: url(@/public/img/5a.png);
  842. }
  843. .shop_head_right_btn:hover .shop_head_right_out {
  844. display: block;
  845. }
  846. .shop_head_right_box {
  847. background: #fff;
  848. height: 1111px;
  849. margin-top: 20px;
  850. }
  851. .shop_alert_out {
  852. position: absolute;
  853. width: 1036px;
  854. right: 0px;
  855. top: 99%;
  856. z-index: 111;
  857. }
  858. .shop_alert_box {
  859. background: #fff;
  860. box-sizing: border-box;
  861. padding: 0px 20px;
  862. border: solid 1px #A01C0E;
  863. width: 100%;
  864. margin-top: 20px;
  865. .shop_alert_head_box {}
  866. .shop_alert_head_name_1 {
  867. float: left;
  868. font-weight: bold;
  869. color: #A01C0E;
  870. font-size: 20px;
  871. margin-top: 30px;
  872. letter-spacing: 1px;
  873. }
  874. .shop_alert_head_name_2 {
  875. float: left;
  876. color: #333;
  877. font-size: 16px;
  878. margin: 35px 0px 0px 10px;
  879. position: relative;
  880. padding-left: 22px;
  881. font-weight: bold;
  882. }
  883. }
  884. .shop_alert_head_name_2::after {
  885. content: '';
  886. display: block;
  887. width: 14px;
  888. height: 10px;
  889. position: absolute;
  890. left: 0px;
  891. bottom: 3px;
  892. background: url(@/public/img/16.png) no-repeat left 0px;
  893. background-size: 100% 100%;
  894. }
  895. .shop_alert_head_btn_a {
  896. float: right;
  897. height: 40px;
  898. line-height: 40px;
  899. color: #fff;
  900. font-size: 14px;
  901. padding: 0px 20px 0px 36px;
  902. margin-top: 23px;
  903. background: url(@/public/img/14.png) no-repeat 18px center #A01C0E;
  904. background-size: 14px auto;
  905. cursor: pointer;
  906. }
  907. .shop_alert_ul {
  908. margin: 28px auto 0px;
  909. width: 980px;
  910. }
  911. .shop_alert_li {
  912. margin-bottom: 11px;
  913. display: flex;
  914. .shop_alert_li_label {
  915. width: 120px;
  916. line-height: 21px;
  917. color: #333;
  918. font-size: 16px;
  919. padding-right: 24px;
  920. font-weight: bold;
  921. position: relative;
  922. box-sizing: border-box;
  923. margin-right: 20px;
  924. }
  925. .shop_alert_li_label::after {
  926. content: '';
  927. display: block;
  928. position: absolute;
  929. right: 0px;
  930. top: 0px;
  931. width: 22px;
  932. height: 22px;
  933. background: url(@/public/img/15.png) no-repeat right 0px;
  934. background-size: 100% 100%;
  935. }
  936. .shop_alert_li_panel {}
  937. .shop_alert_li_panel_a {
  938. float: left;
  939. height: 21px;
  940. line-height: 21px;
  941. color: #666;
  942. font-size: 16px;
  943. margin: 0px 25px 0 0;
  944. }
  945. }
  946. .shop_alert_li_panel_a:hover {
  947. color: #A01C0E;
  948. }
  949. .shop_alert_1_index {
  950. margin-top: 20px;
  951. }
  952. .shop_alert_img_ul {
  953. margin-top: 30px;
  954. }
  955. .shop_alert_img_li {
  956. float: left;
  957. width: 314px;
  958. margin: 0px 26px 30px 0px;
  959. box-sizing: border-box;
  960. .shop_alert_img_li_a {
  961. display: block;
  962. width: 100%;
  963. }
  964. .shop_alert_img_li_img {
  965. width: 130px;
  966. height: 130px;
  967. margin-right: 10px;
  968. float: left;
  969. }
  970. .shop_alert_img_li_right {
  971. width: 173px;
  972. float: right;
  973. }
  974. .shop_alert_img_li_h4 {
  975. height: 18px;
  976. line-height: 18px;
  977. color: #333;
  978. font-size: 14px;
  979. font-weight: bold;
  980. margin-top: 7px;
  981. }
  982. .shop_alert_img_li_dot3 {
  983. height: 48px;
  984. line-height: 16px;
  985. color: #666;
  986. font-size: 12px;
  987. margin-top: 13px;
  988. }
  989. .shop_alert_img_li_time {
  990. float: left;
  991. height: 26px;
  992. line-height: 26px;
  993. color: rgba(51, 51, 51, 0.4);
  994. font-size: 12px;
  995. margin-top: 18px;
  996. background: #f7f7f7;
  997. padding: 0px 4px;
  998. }
  999. }
  1000. .shop_alert_img_li:nth-of-type(3n) {
  1001. margin-right: 0;
  1002. }
  1003. .shop_alert_img_li_a:hover * {
  1004. color: #A01C0E;
  1005. }
  1006. .clearfix {
  1007. overflow: hidden;
  1008. }
  1009. .shop_name_box {
  1010. border-top: solid 1px #fff;
  1011. .shop_name_box_a {
  1012. height: 44px;
  1013. line-height: 44px;
  1014. color: #fff;
  1015. font-weight: bold;
  1016. font-size: 20px;
  1017. }
  1018. .shop_name {
  1019. float: left;
  1020. height: 44px;
  1021. line-height: 44px;
  1022. color: #fff;
  1023. font-weight: bold;
  1024. position: relative;
  1025. z-index: 11;
  1026. text-align: center;
  1027. font-size: 20px;
  1028. background: #A01C0E;
  1029. padding: 0px 14px;
  1030. }
  1031. .shop_name_right {
  1032. height: 40px;
  1033. border-bottom: 1px solid #E8E9EC;
  1034. margin-top: 4px;
  1035. background: #F8F8F8;
  1036. position: relative;
  1037. z-index: 2;
  1038. }
  1039. .shop_name_right::after {
  1040. content: '';
  1041. display: block;
  1042. position: absolute;
  1043. top: 0px;
  1044. right: 0px;
  1045. height: 100%;
  1046. width: 16px;
  1047. background: url(@/public/img/9.png) no-repeat 0px bottom #fff;
  1048. background-size: 100% auto;
  1049. }
  1050. .shop_name_btn {
  1051. width: 24px;
  1052. height: 24px;
  1053. float: right;
  1054. margin: 10px 22px 0px 0px;
  1055. background: url(@/public/img/8.png) no-repeat center center;
  1056. border-radius: 50%;
  1057. background-size: 100% 100%;
  1058. }
  1059. }
  1060. .dot1 {
  1061. display: block;
  1062. word-break: keep-all;
  1063. white-space: nowrap;
  1064. overflow: hidden;
  1065. text-overflow: ellipsis;
  1066. }
  1067. .dot3 {
  1068. overflow: hidden;
  1069. display: -webkit-box;
  1070. -webkit-box-orient: vertical;
  1071. -webkit-line-clamp: 3;
  1072. }
  1073. a.shop_nav_head_a {
  1074. color: #A01C0E !important;
  1075. display: inline-block;
  1076. box-sizing: border-box;
  1077. padding-left: 17px;
  1078. background: url(@/public/img/home.png) no-repeat left center;
  1079. background-size: 12px 12px;
  1080. margin-left: 10px;
  1081. }
  1082. //商城 header end ---------------------------------------->
  1083. </style>