pageHead.vue 34 KB

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