pageHead.vue 34 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217
  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="`/${item.aLIas_pinyin}/gongying/index.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="`/${item.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. }
  805. }
  806. .shop_head_right_btn:nth-of-type(1) {
  807. background-image: url(@/public/img/4.png);
  808. }
  809. .shop_head_right_btn:nth-of-type(2) {
  810. background-image: url(@/public/img/5.png);
  811. }
  812. // .shop_head_right_btn:hover {
  813. // color: #fff;
  814. // background: no-repeat 20px center #A01C0E;
  815. // background-size: 24px 24px;
  816. // }
  817. .shop_head_right_btn_active {
  818. color: #fff !important;
  819. background-size: 24px 24px !important;
  820. background: url(@/public/img/4a.png) no-repeat 20px center #A01C0E !important;
  821. }
  822. .shop_head_right_btn:nth-of-type(1):hover {
  823. background-image: url(@/public/img/4a.png);
  824. }
  825. .shop_head_right_btn:nth-of-type(2):hover {
  826. background-image: url(@/public/img/5a.png);
  827. }
  828. .shop_head_right_btn_1_only {
  829. color: #fff;
  830. background: no-repeat 20px center #A01C0E;
  831. background-size: 24px 24px;
  832. background-image: url(@/public/img/4a.png);
  833. }
  834. .shop_head_right_btn_2_only {
  835. color: #fff;
  836. background: no-repeat 20px center #A01C0E;
  837. background-size: 24px 24px;
  838. background-image: url(@/public/img/5a.png);
  839. }
  840. .shop_head_right_btn:hover .shop_head_right_out {
  841. display: block;
  842. }
  843. .shop_head_right_box {
  844. background: #fff;
  845. height: 1111px;
  846. margin-top: 20px;
  847. }
  848. .shop_alert_out {
  849. position: absolute;
  850. width: 1036px;
  851. right: 0px;
  852. top: 99%;
  853. z-index: 111;
  854. }
  855. .shop_alert_box {
  856. background: #fff;
  857. box-sizing: border-box;
  858. padding: 0px 20px;
  859. border: solid 1px #A01C0E;
  860. width: 100%;
  861. margin-top: 20px;
  862. .shop_alert_head_box {}
  863. .shop_alert_head_name_1 {
  864. float: left;
  865. font-weight: bold;
  866. color: #A01C0E;
  867. font-size: 20px;
  868. margin-top: 30px;
  869. letter-spacing: 1px;
  870. }
  871. .shop_alert_head_name_2 {
  872. float: left;
  873. color: #333;
  874. font-size: 16px;
  875. margin: 35px 0px 0px 10px;
  876. position: relative;
  877. padding-left: 22px;
  878. font-weight: bold;
  879. }
  880. }
  881. .shop_alert_head_name_2::after {
  882. content: '';
  883. display: block;
  884. width: 14px;
  885. height: 10px;
  886. position: absolute;
  887. left: 0px;
  888. bottom: 3px;
  889. background: url(@/public/img/16.png) no-repeat left 0px;
  890. background-size: 100% 100%;
  891. }
  892. .shop_alert_head_btn_a {
  893. float: right;
  894. height: 40px;
  895. line-height: 40px;
  896. color: #fff;
  897. font-size: 14px;
  898. padding: 0px 20px 0px 36px;
  899. margin-top: 23px;
  900. background: url(@/public/img/14.png) no-repeat 18px center #A01C0E;
  901. background-size: 14px auto;
  902. }
  903. .shop_alert_ul {
  904. margin: 28px auto 0px;
  905. width: 980px;
  906. }
  907. .shop_alert_li {
  908. margin-bottom: 11px;
  909. display: flex;
  910. .shop_alert_li_label {
  911. width: 170px;
  912. line-height: 21px;
  913. color: #333;
  914. font-size: 16px;
  915. padding-right: 24px;
  916. font-weight: bold;
  917. position: relative;
  918. box-sizing: border-box;
  919. margin-right: 20px;
  920. }
  921. .shop_alert_li_label::after {
  922. content: '';
  923. display: block;
  924. position: absolute;
  925. right: 0px;
  926. top: 0px;
  927. width: 22px;
  928. height: 22px;
  929. background: url(@/public/img/15.png) no-repeat right 0px;
  930. background-size: 100% 100%;
  931. }
  932. .shop_alert_li_panel {}
  933. .shop_alert_li_panel_a {
  934. float: left;
  935. height: 21px;
  936. line-height: 21px;
  937. color: #666;
  938. font-size: 16px;
  939. margin: 0px 25px 0 0;
  940. }
  941. }
  942. .shop_alert_li_panel_a:hover {
  943. color: #A01C0E;
  944. }
  945. .shop_alert_1_index {
  946. margin-top: 20px;
  947. }
  948. .shop_alert_img_ul {
  949. margin-top: 30px;
  950. }
  951. .shop_alert_img_li {
  952. float: left;
  953. width: 314px;
  954. margin: 0px 26px 30px 0px;
  955. box-sizing: border-box;
  956. .shop_alert_img_li_a {
  957. display: block;
  958. width: 100%;
  959. }
  960. .shop_alert_img_li_img {
  961. width: 130px;
  962. height: 130px;
  963. margin-right: 10px;
  964. float: left;
  965. }
  966. .shop_alert_img_li_right {
  967. width: 173px;
  968. float: right;
  969. }
  970. .shop_alert_img_li_h4 {
  971. height: 18px;
  972. line-height: 18px;
  973. color: #333;
  974. font-size: 14px;
  975. font-weight: bold;
  976. margin-top: 7px;
  977. }
  978. .shop_alert_img_li_dot3 {
  979. height: 48px;
  980. line-height: 16px;
  981. color: #666;
  982. font-size: 12px;
  983. margin-top: 13px;
  984. }
  985. .shop_alert_img_li_time {
  986. float: left;
  987. height: 26px;
  988. line-height: 26px;
  989. color: rgba(51, 51, 51, 0.4);
  990. font-size: 12px;
  991. margin-top: 18px;
  992. background: #f7f7f7;
  993. padding: 0px 4px;
  994. }
  995. }
  996. .shop_alert_img_li:nth-of-type(3n) {
  997. margin-right: 0;
  998. }
  999. .shop_alert_img_li_a:hover * {
  1000. color: #A01C0E;
  1001. }
  1002. .clearfix {
  1003. overflow: hidden;
  1004. }
  1005. .shop_name_box {
  1006. border-top: solid 1px #fff;
  1007. .shop_name_box_a {
  1008. height: 44px;
  1009. line-height: 44px;
  1010. color: #fff;
  1011. font-weight: bold;
  1012. font-size: 20px;
  1013. }
  1014. .shop_name {
  1015. float: left;
  1016. height: 44px;
  1017. line-height: 44px;
  1018. color: #fff;
  1019. font-weight: bold;
  1020. position: relative;
  1021. z-index: 11;
  1022. text-align: center;
  1023. font-size: 20px;
  1024. background: #A01C0E;
  1025. padding: 0px 14px;
  1026. }
  1027. .shop_name_right {
  1028. height: 40px;
  1029. border-bottom: 1px solid #E8E9EC;
  1030. margin-top: 4px;
  1031. background: #F8F8F8;
  1032. position: relative;
  1033. z-index: 2;
  1034. }
  1035. .shop_name_right::after {
  1036. content: '';
  1037. display: block;
  1038. position: absolute;
  1039. top: 0px;
  1040. right: 0px;
  1041. height: 100%;
  1042. width: 16px;
  1043. background: url(@/public/img/9.png) no-repeat 0px bottom #fff;
  1044. background-size: 100% auto;
  1045. }
  1046. .shop_name_btn {
  1047. width: 24px;
  1048. height: 24px;
  1049. float: right;
  1050. margin: 10px 22px 0px 0px;
  1051. background: url(@/public/img/8.png) no-repeat center center;
  1052. border-radius: 50%;
  1053. background-size: 100% 100%;
  1054. }
  1055. }
  1056. .dot1 {
  1057. display: block;
  1058. word-break: keep-all;
  1059. white-space: nowrap;
  1060. overflow: hidden;
  1061. text-overflow: ellipsis;
  1062. }
  1063. .dot3 {
  1064. overflow: hidden;
  1065. display: -webkit-box;
  1066. -webkit-box-orient: vertical;
  1067. -webkit-line-clamp: 3;
  1068. }
  1069. a.shop_nav_head_a {
  1070. color: #A01C0E !important;
  1071. display: inline-block;
  1072. box-sizing: border-box;
  1073. padding-left: 17px;
  1074. background: url(@/public/img/home.png) no-repeat left center;
  1075. background-size: 12px 12px;
  1076. margin-left: 10px;
  1077. }
  1078. //商城 header end ---------------------------------------->
  1079. </style>