pageHead.vue 37 KB

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