pageHead.vue 34 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219
  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. shopMenu.value = responseStatus.data.category[0].children;
  471. //shopMenuGoods.value = responseStatus.data.goods;
  472. //只展示6个商品
  473. for(let index in responseStatus.data.goods){
  474. if(index<=5){
  475. shopMenuGoods.value.push(responseStatus.data.goods[index])
  476. }
  477. }
  478. }
  479. getShopMenu();
  480. //6.商城 end ---------------------------------------->
  481. </script>
  482. <style lang="less" scoped>
  483. //常规 header start ---------------------------------------->
  484. .userInfo11 {
  485. width: 100px;
  486. height: 80px;
  487. background-color: #fff;
  488. box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  489. border-radius: 3px;
  490. position: absolute;
  491. top: 40px;
  492. right: 35px;
  493. font-size: 14px;
  494. z-index: 999;
  495. li {
  496. height: 40px;
  497. line-height: 40px;
  498. color: #333333;
  499. padding-left: 10px;
  500. }
  501. >li:hover {
  502. color: #028E21;
  503. }
  504. }
  505. .tips {
  506. padding: 20px 0;
  507. text-align: center;
  508. font-size: 20px;
  509. color: #333333;
  510. font-weight: bold;
  511. img {
  512. width: 78px;
  513. height: 78px;
  514. vertical-align: middle;
  515. margin-right: 20px;
  516. p {
  517. line-height: 30px;
  518. }
  519. }
  520. p {
  521. line-height: 40px;
  522. }
  523. >p:first-child {
  524. margin-bottom: 30px;
  525. }
  526. }
  527. /* 页面头部 */
  528. header {
  529. width: 100%;
  530. font-size: 12px;
  531. font-family: PingFang SC-Regular;
  532. color: #666666;
  533. background: url("http://img.bjzxtw.org.cn/master/bjzxtw/public/head/headtopbg.png") repeat-x;
  534. }
  535. .headerNav {
  536. width: 100%;
  537. height: 33px;
  538. line-height: 33px;
  539. }
  540. .headerNav .left span {
  541. margin-right: 20px;
  542. a {
  543. color: #666666;
  544. }
  545. }
  546. .headerNav .right {
  547. display: flex;
  548. margin-right: 10px;
  549. position: relative;
  550. button {
  551. font-size: 12px;
  552. color: #666666;
  553. border: none;
  554. background: none;
  555. cursor: pointer;
  556. }
  557. .login {
  558. width: 36px;
  559. height: 19px;
  560. color: #fff;
  561. border-radius: 4px;
  562. background-color: #028E21;
  563. margin-right: 15px;
  564. cursor: pointer;
  565. }
  566. .menu,
  567. .right-top-menu {
  568. display: flex;
  569. }
  570. .reg {
  571. margin-right: 20px;
  572. display: flex;
  573. align-items: center;
  574. justify-content: center;
  575. height: 33px;
  576. img {
  577. margin-right: 5px;
  578. }
  579. }
  580. }
  581. .headerNav .right {
  582. float: right;
  583. font-size: 12px;
  584. span {
  585. margin-right: 20px;
  586. }
  587. .home,
  588. .collection {
  589. display: inline-block;
  590. width: 16px;
  591. height: 16px;
  592. vertical-align: -3px;
  593. }
  594. .home {
  595. background-image: url("http://img.bjzxtw.org.cn/master/bjzxtw/public/image/search.png");
  596. }
  597. .collection {
  598. background-image: url("http://img.bjzxtw.org.cn/master/bjzxtw/public/image/search.png");
  599. }
  600. .exit {
  601. line-height: 30px;
  602. }
  603. // .exit:hover{
  604. // color: #028E21;
  605. // }
  606. }
  607. /* // 头部logo */
  608. .headerLogo {
  609. height: 145px;
  610. position: relative;
  611. //background: url("../../public/head/topBg.png") no-repeat center;
  612. .titlead {
  613. position: absolute;
  614. bottom: 14px;
  615. right: 26px;
  616. width: 830px;
  617. height: 110px;
  618. overflow: hidden;
  619. a {
  620. display: block;
  621. width: 830px;
  622. height: 110px;
  623. overflow: hidden;
  624. }
  625. img {
  626. width: 100%;
  627. height: 110px;
  628. }
  629. }
  630. .inner {
  631. position: relative;
  632. height: 145px;
  633. }
  634. .inner>img {
  635. width: 297px;
  636. height: 110px;
  637. margin-top: 20px;
  638. cursor: pointer;
  639. }
  640. /* // 搜索框部分 */
  641. .search {
  642. float: left;
  643. width: 440px;
  644. height: 40px;
  645. background-color: #fff;
  646. line-height: 40px;
  647. margin-left: 39px;
  648. margin: 71px 39px 48px;
  649. position: relative;
  650. em {
  651. display: inline-block;
  652. width: 30px;
  653. height: 30px;
  654. background: url("http://img.bjzxtw.org.cn/master/bjzxtw/public/image/search.png") no-repeat;
  655. position: absolute;
  656. top: 5px;
  657. left: 15px;
  658. }
  659. input {
  660. float: left;
  661. width: 351px;
  662. height: 40px;
  663. border: none;
  664. outline: none;
  665. padding-left: 65px;
  666. box-sizing: border-box;
  667. border: 1px solid #028E21;
  668. border-right: none;
  669. border-radius: 4px 0px 0px 4px;
  670. }
  671. button {
  672. float: right;
  673. width: 89px;
  674. height: 40px;
  675. background-color: #028E21;
  676. border-radius: 0px 4px 4px 0px;
  677. border: none;
  678. font-size: 14px;
  679. color: #fff;
  680. font-family: PingFang SC, PingFang SC;
  681. font-weight: 500;
  682. }
  683. }
  684. /* // 右侧小图标 */
  685. .serve {
  686. float: right;
  687. height: 60px;
  688. margin-top: 60px;
  689. margin-right: 60px;
  690. >li {
  691. float: left;
  692. height: 64px;
  693. margin-left: 48px;
  694. }
  695. >li>a {
  696. display: inline-block;
  697. height: 64px;
  698. }
  699. >li img {
  700. width: 29px;
  701. height: 29px;
  702. padding: 8px 14px;
  703. }
  704. >li p {
  705. height: 28px;
  706. text-align: center;
  707. color: #666666;
  708. }
  709. }
  710. }
  711. //常规 header end ---------------------------------------->
  712. //商城 header start ---------------------------------------->
  713. .clearfix_2::after {
  714. content: '';
  715. display: block;
  716. height: 0;
  717. visibility: hidden;
  718. clear: both;
  719. }
  720. .shop_head {
  721. width: 1200px;
  722. margin: 30px auto;
  723. }
  724. .shop_head_left {
  725. float: left;
  726. width: 322px;
  727. margin-right: 33px;
  728. .shop_head_left_a {
  729. width: 322px;
  730. display: block;
  731. }
  732. }
  733. .shop_head_img {
  734. width: 297px;
  735. height: 110px;
  736. display: block;
  737. }
  738. .shop_head_form_out {
  739. width: 550px;
  740. float: left;
  741. }
  742. .shop_head_form {
  743. margin-top: 37px;
  744. display: block;
  745. width: 547px;
  746. border: solid 1px #A01C0E;
  747. height: 40px;
  748. box-sizing: border-box;
  749. overflow: hidden;
  750. .shop_head_btn {
  751. float: right;
  752. width: 52px;
  753. height: 100%;
  754. border: solid 1px #fff;
  755. box-sizing: border-box;
  756. background: url(@/public/img/3.png) no-repeat center center #A01C0E;
  757. background-size: 22px 22px;
  758. cursor: pointer;
  759. }
  760. .shop_head_inp {
  761. display: block;
  762. text-indent: 11px;
  763. height: 40px;
  764. line-height: 40px;
  765. width: 490px;
  766. border: none;
  767. outline: none;
  768. }
  769. }
  770. .shop_head_form_foot {
  771. width: 550px;
  772. margin-top: 10px;
  773. .shop_head_form_foot_a {
  774. float: left;
  775. height: 18px;
  776. line-height: 18px;
  777. color: #999;
  778. font-size: 14px;
  779. margin-right: 10px;
  780. }
  781. }
  782. .shop_head_form_foot_a:nth-of-type(1) {
  783. color: #A01C0E;
  784. }
  785. .shop_head_form_foot_a:hover {
  786. color: #A01C0E;
  787. }
  788. .shop_head_right {
  789. float: right;
  790. margin-top: 37px;
  791. position: relative;
  792. .shop_head_right_btn {
  793. float: right;
  794. width: 120px;
  795. height: 40px;
  796. line-height: 40px;
  797. color: #666;
  798. font-size: 14px;
  799. margin-left: 10px;
  800. text-indent: 52px;
  801. border: 1px solid #E9E9E9;
  802. background: no-repeat 20px center #F4F4F4;
  803. background-size: 24px 24px !important;
  804. cursor: pointer;
  805. }
  806. }
  807. .shop_head_right_btn:nth-of-type(1) {
  808. background-image: url(@/public/img/4.png);
  809. }
  810. .shop_head_right_btn:nth-of-type(2) {
  811. background-image: url(@/public/img/5.png);
  812. }
  813. // .shop_head_right_btn:hover {
  814. // color: #fff;
  815. // background: no-repeat 20px center #A01C0E;
  816. // background-size: 24px 24px;
  817. // }
  818. .shop_head_right_btn_active {
  819. color: #fff !important;
  820. background-size: 24px 24px !important;
  821. background: url(@/public/img/4a.png) no-repeat 20px center #A01C0E !important;
  822. }
  823. .shop_head_right_btn:nth-of-type(1):hover {
  824. background-image: url(@/public/img/4a.png);
  825. }
  826. .shop_head_right_btn:nth-of-type(2):hover {
  827. background-image: url(@/public/img/5a.png);
  828. }
  829. .shop_head_right_btn_1_only {
  830. color: #fff;
  831. background: no-repeat 20px center #A01C0E;
  832. background-size: 24px 24px;
  833. background-image: url(@/public/img/4a.png);
  834. }
  835. .shop_head_right_btn_2_only {
  836. color: #fff;
  837. background: no-repeat 20px center #A01C0E;
  838. background-size: 24px 24px;
  839. background-image: url(@/public/img/5a.png);
  840. }
  841. .shop_head_right_btn:hover .shop_head_right_out {
  842. display: block;
  843. }
  844. .shop_head_right_box {
  845. background: #fff;
  846. height: 1111px;
  847. margin-top: 20px;
  848. }
  849. .shop_alert_out {
  850. position: absolute;
  851. width: 1036px;
  852. right: 0px;
  853. top: 99%;
  854. z-index: 111;
  855. }
  856. .shop_alert_box {
  857. background: #fff;
  858. box-sizing: border-box;
  859. padding: 0px 20px;
  860. border: solid 1px #A01C0E;
  861. width: 100%;
  862. margin-top: 20px;
  863. .shop_alert_head_box {}
  864. .shop_alert_head_name_1 {
  865. float: left;
  866. font-weight: bold;
  867. color: #A01C0E;
  868. font-size: 20px;
  869. margin-top: 30px;
  870. letter-spacing: 1px;
  871. }
  872. .shop_alert_head_name_2 {
  873. float: left;
  874. color: #333;
  875. font-size: 16px;
  876. margin: 35px 0px 0px 10px;
  877. position: relative;
  878. padding-left: 22px;
  879. font-weight: bold;
  880. }
  881. }
  882. .shop_alert_head_name_2::after {
  883. content: '';
  884. display: block;
  885. width: 14px;
  886. height: 10px;
  887. position: absolute;
  888. left: 0px;
  889. bottom: 3px;
  890. background: url(@/public/img/16.png) no-repeat left 0px;
  891. background-size: 100% 100%;
  892. }
  893. .shop_alert_head_btn_a {
  894. float: right;
  895. height: 40px;
  896. line-height: 40px;
  897. color: #fff;
  898. font-size: 14px;
  899. padding: 0px 20px 0px 36px;
  900. margin-top: 23px;
  901. background: url(@/public/img/14.png) no-repeat 18px center #A01C0E;
  902. background-size: 14px auto;
  903. cursor: pointer;
  904. }
  905. .shop_alert_ul {
  906. margin: 28px auto 0px;
  907. width: 980px;
  908. }
  909. .shop_alert_li {
  910. margin-bottom: 11px;
  911. display: flex;
  912. .shop_alert_li_label {
  913. width: 120px;
  914. line-height: 21px;
  915. color: #333;
  916. font-size: 16px;
  917. padding-right: 24px;
  918. font-weight: bold;
  919. position: relative;
  920. box-sizing: border-box;
  921. margin-right: 20px;
  922. }
  923. .shop_alert_li_label::after {
  924. content: '';
  925. display: block;
  926. position: absolute;
  927. right: 0px;
  928. top: 0px;
  929. width: 22px;
  930. height: 22px;
  931. background: url(@/public/img/15.png) no-repeat right 0px;
  932. background-size: 100% 100%;
  933. }
  934. .shop_alert_li_panel {}
  935. .shop_alert_li_panel_a {
  936. float: left;
  937. height: 21px;
  938. line-height: 21px;
  939. color: #666;
  940. font-size: 16px;
  941. margin: 0px 25px 0 0;
  942. }
  943. }
  944. .shop_alert_li_panel_a:hover {
  945. color: #A01C0E;
  946. }
  947. .shop_alert_1_index {
  948. margin-top: 20px;
  949. }
  950. .shop_alert_img_ul {
  951. margin-top: 30px;
  952. }
  953. .shop_alert_img_li {
  954. float: left;
  955. width: 314px;
  956. margin: 0px 26px 30px 0px;
  957. box-sizing: border-box;
  958. .shop_alert_img_li_a {
  959. display: block;
  960. width: 100%;
  961. }
  962. .shop_alert_img_li_img {
  963. width: 130px;
  964. height: 130px;
  965. margin-right: 10px;
  966. float: left;
  967. }
  968. .shop_alert_img_li_right {
  969. width: 173px;
  970. float: right;
  971. }
  972. .shop_alert_img_li_h4 {
  973. height: 18px;
  974. line-height: 18px;
  975. color: #333;
  976. font-size: 14px;
  977. font-weight: bold;
  978. margin-top: 7px;
  979. }
  980. .shop_alert_img_li_dot3 {
  981. height: 48px;
  982. line-height: 16px;
  983. color: #666;
  984. font-size: 12px;
  985. margin-top: 13px;
  986. }
  987. .shop_alert_img_li_time {
  988. float: left;
  989. height: 26px;
  990. line-height: 26px;
  991. color: rgba(51, 51, 51, 0.4);
  992. font-size: 12px;
  993. margin-top: 18px;
  994. background: #f7f7f7;
  995. padding: 0px 4px;
  996. }
  997. }
  998. .shop_alert_img_li:nth-of-type(3n) {
  999. margin-right: 0;
  1000. }
  1001. .shop_alert_img_li_a:hover * {
  1002. color: #A01C0E;
  1003. }
  1004. .clearfix {
  1005. overflow: hidden;
  1006. }
  1007. .shop_name_box {
  1008. border-top: solid 1px #fff;
  1009. .shop_name_box_a {
  1010. height: 44px;
  1011. line-height: 44px;
  1012. color: #fff;
  1013. font-weight: bold;
  1014. font-size: 20px;
  1015. }
  1016. .shop_name {
  1017. float: left;
  1018. height: 44px;
  1019. line-height: 44px;
  1020. color: #fff;
  1021. font-weight: bold;
  1022. position: relative;
  1023. z-index: 11;
  1024. text-align: center;
  1025. font-size: 20px;
  1026. background: #A01C0E;
  1027. padding: 0px 14px;
  1028. }
  1029. .shop_name_right {
  1030. height: 40px;
  1031. border-bottom: 1px solid #E8E9EC;
  1032. margin-top: 4px;
  1033. background: #F8F8F8;
  1034. position: relative;
  1035. z-index: 2;
  1036. }
  1037. .shop_name_right::after {
  1038. content: '';
  1039. display: block;
  1040. position: absolute;
  1041. top: 0px;
  1042. right: 0px;
  1043. height: 100%;
  1044. width: 16px;
  1045. background: url(@/public/img/9.png) no-repeat 0px bottom #fff;
  1046. background-size: 100% auto;
  1047. }
  1048. .shop_name_btn {
  1049. width: 24px;
  1050. height: 24px;
  1051. float: right;
  1052. margin: 10px 22px 0px 0px;
  1053. background: url(@/public/img/8.png) no-repeat center center;
  1054. border-radius: 50%;
  1055. background-size: 100% 100%;
  1056. }
  1057. }
  1058. .dot1 {
  1059. display: block;
  1060. word-break: keep-all;
  1061. white-space: nowrap;
  1062. overflow: hidden;
  1063. text-overflow: ellipsis;
  1064. }
  1065. .dot3 {
  1066. overflow: hidden;
  1067. display: -webkit-box;
  1068. -webkit-box-orient: vertical;
  1069. -webkit-line-clamp: 3;
  1070. }
  1071. a.shop_nav_head_a {
  1072. color: #A01C0E !important;
  1073. display: inline-block;
  1074. box-sizing: border-box;
  1075. padding-left: 17px;
  1076. background: url(@/public/img/home.png) no-repeat left center;
  1077. background-size: 12px 12px;
  1078. margin-left: 10px;
  1079. }
  1080. //商城 header end ---------------------------------------->
  1081. </style>