class.vue 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781
  1. <template>
  2. <HomePageHead></HomePageHead>
  3. <HomePageNavigation></HomePageNavigation>
  4. <!-- 三农市场网-商城 -->
  5. <main class="index_main">
  6. <HomeAdvertising :imgurl="adImg1"></HomeAdvertising>
  7. <!-- 导航 -->
  8. <section class="shop_nav phone_none">
  9. <div class="shop_nav_1 clearfix">
  10. <span class="shop_nav_1_a" title="">{{ categoryName }}</span>
  11. </div>
  12. <div class="shop_nav_2">
  13. <a class="shop_nav_2_a" :href="getLinkPath(item)" title="" v-for="(item, index) in pageData"
  14. :key="index">{{ item.alias }}</a>
  15. </div>
  16. </section>
  17. <div class="phone_nav pc_none">
  18. <div class="phone_nav_in">
  19. <a class="phone_nav_a"
  20. :href="getLinkPath(item)"
  21. v-for="(item, index) in pageData"
  22. :key="index">
  23. {{ item.alias }}
  24. </a>
  25. </div>
  26. </div>
  27. <!-- 地区选择 -->
  28. <GoodsSubMenu></GoodsSubMenu>
  29. <section class="shop_3 clearfix phone_none">
  30. <!-- 农产批发1 -->
  31. <div class="shop_3_in clearfix">
  32. <div class="shop_head_2 clearfix">
  33. <div class="shop_head_2_name">{{ goodsData[0].alias }}</div>
  34. <a class="shop_head_2_more" :href="getLinkPath(goodsData[0])" :title="goodsData[0].title"></a>
  35. </div>
  36. <div class="shop_img_ul_1 clearfix">
  37. <div class="shop_img_li_1 clearfix" v-for="(item, index) in goodsData[0].data" :key="index">
  38. <a class="shop_img_li_1_a" :href="getLinkPathDetail(item)" :title="item.title">
  39. <div class="shop_img_li_1_img_box clearfix">
  40. <img class="shop_img_li_1_img" :src="item.imgurl" :title="item.title" alt="">
  41. </div>
  42. <div class="shop_img_li_1_right clearfix">
  43. <h4 class="shop_img_li_1_h4 dot2">{{ item.name }}</h4>
  44. <div class="shop_img_li_1_tag">
  45. {{ item.type_id == 1 ? '求购' : '供应' }}
  46. </div>
  47. <div class="shop_img_li_1_btn">查看详情</div>
  48. </div>
  49. </a>
  50. </div>
  51. </div>
  52. </div>
  53. <!-- 农产批发2 -->
  54. <!-- 集贸市场1 -->
  55. <div class="shop_3_in clearfix">
  56. <div class="shop_head_3 clearfix">
  57. <div class="shop_head_3_name">{{ goodsData[1].alias }}</div>
  58. <a class="shop_head_3_more" :href="getLinkPath(goodsData[1])" :title="goodsData[1].title"></a>
  59. </div>
  60. <div class="shop_ul_1 clearfix" v-if="goodsData[1].data.length > 0">
  61. <div class="shop_li_1 clearfix" v-for="(item, index) in goodsData[1].data" :key="index">
  62. <a class="shop_li_1_a" :href="getLinkPathDetail(item)" :title="item.title">
  63. <div class="shop_li_1_left">
  64. <h4 class="shop_li_1_h4 dot1">
  65. {{ item.name }}
  66. </h4>
  67. <div class="shop_li_1_text dot1">
  68. {{ item.description }}
  69. </div>
  70. </div>
  71. <div class="shop_li_1_btn">查看详情</div>
  72. </a>
  73. </div>
  74. </div>
  75. </div>
  76. <!-- 集贸市场2 -->
  77. </section>
  78. <div class="phone_shop_1 clearfix pc_none">
  79. <div class="phone_shop_head">
  80. <a class="phone_shop_head_a"
  81. :href="getLinkPath(goodsData[0])">
  82. {{ goodsData[0].alias }}
  83. </a>
  84. </div>
  85. <div class="phone_shop_img_ul clearfix">
  86. <div class="phone_shop_img_li" v-for="(item, index) in goodsData[0].data.slice(0, 2)" :key="index">
  87. <a class="phone_shop_img_li_a" :href="getLinkPathDetail(item)" >
  88. <img class="phone_shop_img" :src="item.imgurl" :alt="item.title" >
  89. <div class="phone_shop_img_li_dot2">
  90. {{ item.name }}
  91. </div>
  92. <div class="phone_shop_img_foot">
  93. <span class="phone_shop_img_foot_1">{{ item.type_id == 1 ? '求购' : '供应' }}</span>
  94. <span class="phone_shop_img_foot_2">查看详情</span>
  95. </div>
  96. </a>
  97. </div>
  98. </div>
  99. </div>
  100. <div class="phone_shop_1_text_box clearfix pc_none">
  101. <div class="phone_shop_text_head">
  102. <a class="phone_shop_text_head_a" :href="getLinkPath(goodsData[1])">
  103. {{ goodsData[1].alias }}
  104. </a>
  105. </div>
  106. <div class="phone_shop_text_ul">
  107. <div class="phone_shop_text_li" v-for="(item, index) in goodsData[1].data.slice(0, 6)" :key="index">
  108. <a class="phone_shop_text_li_a" :href="getLinkPathDetail(item)">
  109. <h4 class="phone_shop_text_li_h4"> {{ item.name }}</h4>
  110. <div class="phone_shop_text_li_dot1">{{ item.description }}</div>
  111. </a>
  112. </div>
  113. </div>
  114. </div>
  115. <section class="shop_4 clearfix phone_none">
  116. <!-- 名品之窗1 -->
  117. <div class="shop_3_in clearfix" v-if="goodsData.length > 2">
  118. <div class="shop_head_4 clearfix">
  119. <div class="shop_head_4_name">{{ goodsData[2].alias }}</div>
  120. <a class="shop_head_4_more" :href="getLinkPath(goodsData[2])" :title="goodsData[2].title"></a>
  121. </div>
  122. <div class="shop_img_ul_2 clearfix">
  123. <div class="shop_img_li_2 clearfix" v-for="(item, index) in goodsData[2].data" :key="index">
  124. <a class="shop_img_li_2_a" :href="getLinkPathDetail(item)" :title="item.title">
  125. <div class="shop_img_li_2_img_box clearfix">
  126. <img class="shop_img_li_2_img" :src="item.imgurl" title="" alt="">
  127. </div>
  128. <div class="shop_img_li_2_right clearfix">
  129. <h4 class="shop_img_li_2_h4 dot2">{{ item.name }}</h4>
  130. <div class="shop_img_li_2_tag">
  131. {{ item.type_id == 1 ? '求购' : '供应' }}
  132. </div>
  133. <div class="shop_img_li_2_btn">查看详情</div>
  134. </div>
  135. </a>
  136. </div>
  137. </div>
  138. </div>
  139. <!-- 名品之窗2 -->
  140. <!-- 供求信息1 -->
  141. <div class="shop_3_in clearfix" v-if="goodsData.length > 3">
  142. <div class="shop_head_5 clearfix">
  143. <div class="shop_head_5_name">{{ goodsData[3].alias }}</div>
  144. <a class="shop_head_5_more" :href="getLinkPath(goodsData[3])" :title="goodsData[3].title"></a>
  145. </div>
  146. <div class="shop_img_ul_3 clearfix">
  147. <div class="shop_img_li_3 clearfix" v-for="(item, index) in goodsData[3].data" :key="index">
  148. <a class="shop_img_li_3_a" :href="getLinkPathDetail(item)" :title="item.title">
  149. <div class="shop_img_li_3_img_box clearfix">
  150. <img class="shop_img_li_3_img" :src="item.imgurl" :title="item.title" alt="">
  151. </div>
  152. <div class="shop_img_li_3_right clearfix">
  153. <h4 class="shop_img_li_3_h4 dot2">{{ item.name }}</h4>
  154. <div class="shop_img_li_3_tag">
  155. {{ item.type_id == 1 ? '求购' : '供应' }}
  156. </div>
  157. <div class="shop_img_li_3_btn">查看详情</div>
  158. </div>
  159. </a>
  160. </div>
  161. </div>
  162. </div>
  163. <!-- 供求信息2 -->
  164. </section>
  165. <div class="phone_shop_2 clearfix pc_none" v-if="goodsData.length > 2">
  166. <div class="phone_shop_head">
  167. <a class="phone_shop_head_a"
  168. :href="getLinkPath(goodsData[2])">
  169. {{ goodsData[2].alias }}
  170. </a>
  171. </div>
  172. <div class="phone_shop_img_ul clearfix">
  173. <div class="phone_shop_img_li" v-for="(item, index) in goodsData[2].data.slice(0, 2)" :key="index">
  174. <a class="phone_shop_img_li_a" :href="getLinkPathDetail(item)" >
  175. <img class="phone_shop_img" :src="item.imgurl" :alt="item.title" >
  176. <div class="phone_shop_img_li_dot2">
  177. {{ item.name }}
  178. </div>
  179. <div class="phone_shop_img_foot">
  180. <span class="phone_shop_img_foot_1">{{ item.type_id == 1 ? '求购' : '供应' }}</span>
  181. <span class="phone_shop_img_foot_2">查看详情</span>
  182. </div>
  183. </a>
  184. </div>
  185. </div>
  186. </div>
  187. <div class="phone_shop_3 clearfix pc_none" v-if="goodsData.length > 3">
  188. <div class="phone_shop_head">
  189. <a class="phone_shop_head_a"
  190. :href="getLinkPath(goodsData[3])">
  191. {{ goodsData[3].alias }}
  192. </a>
  193. </div>
  194. <div class="phone_shop_img_ul clearfix">
  195. <div class="phone_shop_img_li" v-for="(item, index) in goodsData[3].data.slice(0, 2)" :key="index">
  196. <a class="phone_shop_img_li_a" :href="getLinkPathDetail(item)" >
  197. <img class="phone_shop_img" :src="item.imgurl" :alt="item.title" >
  198. <div class="phone_shop_img_li_dot2">
  199. {{ item.name }}
  200. </div>
  201. <div class="phone_shop_img_foot">
  202. <span class="phone_shop_img_foot_1">{{ item.type_id == 1 ? '求购' : '供应' }}</span>
  203. <span class="phone_shop_img_foot_2">查看详情</span>
  204. </div>
  205. </a>
  206. </div>
  207. </div>
  208. </div>
  209. <section class="shop_5 clearfix phone_none">
  210. <!-- 名品之窗1 -->
  211. <div class="shop_3_in clearfix">
  212. <div class="shop_head_4 clearfix">
  213. <div class="shop_head_4_name">{{ goodsData[4].alias }}</div>
  214. <a class="shop_head_4_more" :href="getLinkPath(goodsData[4])" :title="goodsData[4].title"></a>
  215. </div>
  216. <div class="shop_img_ul_2 clearfix">
  217. <div class="shop_img_li_2 clearfix" v-for="(item, index) in goodsData[4].data" :key="index">
  218. <a class="shop_img_li_2_a" :href="getLinkPathDetail(item)" :title="item.title">
  219. <div class="shop_img_li_2_img_box clearfix">
  220. <img class="shop_img_li_2_img" :src="item.imgurl" :title="item.title" alt="">
  221. </div>
  222. <div class="shop_img_li_2_right clearfix">
  223. <h4 class="shop_img_li_2_h4 dot2">{{ item.name }}</h4>
  224. <div class="shop_img_li_2_tag">
  225. {{ item.type_id == 1 ? '求购' : '供应' }}
  226. </div>
  227. <div class="shop_img_li_2_btn">查看详情</div>
  228. </div>
  229. </a>
  230. </div>
  231. </div>
  232. </div>
  233. <!-- 名品之窗2 -->
  234. <!-- 供求信息1 -->
  235. <div class="shop_3_in clearfix">
  236. <div class="shop_head_5 clearfix">
  237. <div class="shop_head_5_name">{{ goodsData[5].alias }}</div>
  238. <a class="shop_head_5_more" :href="getLinkPath(goodsData[5])" :title="goodsData[5].title"></a>
  239. </div>
  240. <div class="shop_img_ul_3 clearfix">
  241. <div class="shop_img_li_3 clearfix" v-for="(item, index) in goodsData[5].data" :key="index">
  242. <a class="shop_img_li_3_a" :href="getLinkPathDetail(item)" :title="item.title">
  243. <div class="shop_img_li_3_img_box clearfix">
  244. <img class="shop_img_li_3_img" :src="item.imgurl" :title="item.title" alt="">
  245. </div>
  246. <div class="shop_img_li_3_right clearfix">
  247. <h4 class="shop_img_li_3_h4 dot2">{{ item.name }}</h4>
  248. <div class="shop_img_li_3_tag">
  249. {{ item.type_id == 1 ? '求购' : '供应' }}
  250. </div>
  251. <div class="shop_img_li_3_btn">查看详情</div>
  252. </div>
  253. </a>
  254. </div>
  255. </div>
  256. </div>
  257. <!-- 供求信息2 -->
  258. </section>
  259. <div class="phone_shop_4 clearfix pc_none" v-if="goodsData.length > 4">
  260. <div class="phone_shop_head">
  261. <a class="phone_shop_head_a"
  262. :href="getLinkPath(goodsData[4])">
  263. {{ goodsData[4].alias }}
  264. </a>
  265. </div>
  266. <div class="phone_shop_img_ul clearfix">
  267. <div class="phone_shop_img_li" v-for="(item, index) in goodsData[4].data.slice(0, 2)" :key="index">
  268. <a class="phone_shop_img_li_a" :href="getLinkPathDetail(item)" >
  269. <img class="phone_shop_img" :src="item.imgurl" :alt="item.title" >
  270. <div class="phone_shop_img_li_dot2">
  271. {{ item.name }}
  272. </div>
  273. <div class="phone_shop_img_foot">
  274. <span class="phone_shop_img_foot_1">{{ item.type_id == 1 ? '求购' : '供应' }}</span>
  275. <span class="phone_shop_img_foot_2">查看详情</span>
  276. </div>
  277. </a>
  278. </div>
  279. </div>
  280. </div>
  281. <div class="phone_shop_5 clearfix pc_none" v-if="goodsData.length > 5">
  282. <div class="phone_shop_head">
  283. <a class="phone_shop_head_a"
  284. :href="getLinkPath(goodsData[5])">
  285. {{ goodsData[5].alias }}
  286. </a>
  287. </div>
  288. <div class="phone_shop_img_ul clearfix">
  289. <div class="phone_shop_img_li" v-for="(item, index) in goodsData[5].data.slice(0, 2)" :key="index">
  290. <a class="phone_shop_img_li_a" :href="getLinkPathDetail(item)" >
  291. <img class="phone_shop_img" :src="item.imgurl" :alt="item.title" >
  292. <div class="phone_shop_img_li_dot2">
  293. {{ item.name }}
  294. </div>
  295. <div class="phone_shop_img_foot">
  296. <span class="phone_shop_img_foot_1">{{ item.type_id == 1 ? '求购' : '供应' }}</span>
  297. <span class="phone_shop_img_foot_2">查看详情</span>
  298. </div>
  299. </a>
  300. </div>
  301. </div>
  302. </div>
  303. <HomeAdvertising :imgurl="adImg2"></HomeAdvertising>
  304. </main>
  305. <HomeFoot1></HomeFoot1>
  306. </template>
  307. <script setup>
  308. import { ref } from 'vue'
  309. import { ElRadio, ElRadioGroup, ElMessage } from 'element-plus'
  310. //1.获得路由id start ---------------------------------------->
  311. const targetSegment = getRoutePath(1);
  312. //1.1 获得当前的路由id
  313. let routeId;
  314. let categoryName;
  315. //通过导航路径反向查询导航id
  316. const getRouteId = await requestDataPromise('/web/getWebsiteRoute', {
  317. method: 'GET',
  318. query: {
  319. 'pinyin': targetSegment,
  320. },
  321. });
  322. if (getRouteId.code == 200) {
  323. routeId = getRouteId.data.category_id
  324. categoryName = getRouteId.data.alias
  325. } else {
  326. console.log("获得路由id出错!", getRouteId.message)
  327. }
  328. //1.获得路由id end ---------------------------------------->
  329. //3.广告 start ---------------------------------------->
  330. let adImg1 = ref({})
  331. let adImg2 = ref({})
  332. onMounted(async () => {
  333. //从客户端获取行政职能部门 加快打开速度
  334. const { $webUrl, $CwebUrl } = useNuxtApp();
  335. //广告1
  336. let url = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=nfcpgxw_category_0001`
  337. const responseAd1 = await fetch(url, {
  338. headers: {
  339. 'Content-Type': 'application/json',
  340. 'Userurl': $CwebUrl,
  341. 'Origin': $CwebUrl
  342. }
  343. });
  344. const resultAd1 = await responseAd1.json();
  345. adImg1.value = resultAd1.data[0];
  346. //广告2
  347. let url2 = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=nfcpgxw_category_0002`
  348. const responseAd2 = await fetch(url2, {
  349. headers: {
  350. 'Content-Type': 'application/json',
  351. 'Userurl': $CwebUrl,
  352. 'Origin': $CwebUrl
  353. }
  354. });
  355. const resultAd2 = await responseAd2.json();
  356. adImg2.value = resultAd2.data[0];
  357. })
  358. //3.广告 end ---------------------------------------->
  359. //4.页面数据 start ---------------------------------------->
  360. const pageData = ref([
  361. //示例:
  362. // {
  363. // id: 1,
  364. // title: "", //该导航的标题
  365. // data: [], //数据1
  366. // data1: [], //数据2
  367. // data2: [], //数据3
  368. // data3: [], //数据4
  369. // data4: [], //数据5
  370. // category_id1: "", //子导航id1
  371. // category_id2: "",
  372. // category_id3: "",
  373. // category_id4: "",
  374. // title1: "", //子导航标题1
  375. // title2: "",
  376. // title3: "",
  377. // title4: "",
  378. // cid: "" //该导航的id
  379. // },
  380. ])
  381. const goodsData = ref([])
  382. const newsData = ref([])
  383. //4.1 获取所有导航
  384. try {
  385. const navigateData = await requestDataPromise('/web/getWebsiteModelCategory', {
  386. method: 'GET',
  387. query: {
  388. 'placeid': 1,
  389. 'pid': routeId,
  390. 'num': 20,
  391. 'type': 1
  392. },
  393. });
  394. console.log("导航池11111", navigateData);
  395. if (navigateData.code == 200) {
  396. // 遍历可用的导航池放到页面中
  397. for (let index in navigateData.data) {
  398. let data = {
  399. title: navigateData.data[index].name,
  400. cid: navigateData.data[index].category_id,
  401. children_count: navigateData.data[index].children_count,
  402. alias: navigateData.data[index].alias,
  403. aLIas_pinyin: targetSegment + "/" + navigateData.data[index].aLIas_pinyin,
  404. children: navigateData.data[index].children,
  405. type: navigateData.data[index].type,
  406. data: [],
  407. data1: [],
  408. data2: [],
  409. data3: [],
  410. data4: [],
  411. category_id1: "",
  412. category_id2: "",
  413. category_id3: "",
  414. category_id4: "",
  415. title1: "",
  416. title2: "",
  417. title3: "",
  418. title4: ""
  419. };
  420. if (navigateData.data[index].is_url == 1) {
  421. // 处理 URL 的逻辑
  422. } else {
  423. if (navigateData.data[index].type == 2) {
  424. goodsData.value.push(data);
  425. } else if (navigateData.data[index].type == 1) {
  426. newsData.value.push(data);
  427. }
  428. //每个页面最多8个模块
  429. pageData.value.push(data);
  430. }
  431. }
  432. console.log("导航池111111pageData", pageData.value);
  433. console.log("导航池111111goodsData", goodsData.value);
  434. console.log("导航池111111newsData", newsData.value);
  435. //导航池加载完毕,开始申请模块数据
  436. let goodsJson = [
  437. // { "catid": goodsData.value[0].cid + ",0,12" },//模块1
  438. // { "catid": goodsData.value[1].cid + ",0,4" },//模块2
  439. // { "catid": goodsData.value[2].cid + ",0,4" },//模块3
  440. ]
  441. for (let i = 0; i < goodsData.value.length; i++) {
  442. if (i == 0) {
  443. goodsJson.push({ "catid": goodsData.value[0].cid + ",0,3" });
  444. } else if (i == 1) {
  445. goodsJson.push({ "catid": goodsData.value[1].cid + ",0,6" });
  446. } else if (i == 2) {
  447. goodsJson.push({ "catid": goodsData.value[2].cid + ",0,3" });
  448. } else if (i == 3) {
  449. goodsJson.push({ "catid": goodsData.value[3].cid + ",0,3" });
  450. } else if (i == 4) {
  451. goodsJson.push({ "catid": goodsData.value[4].cid + ",0,3" });
  452. } else if (i == 5) {
  453. goodsJson.push({ "catid": goodsData.value[5].cid + ",0,3" });
  454. }
  455. }
  456. let goodsJsonString = JSON.stringify(goodsJson);
  457. getPageGoodsAllData(goodsJsonString);
  458. } else {
  459. console.log("错误:渲染8个模块环节出错,请检查是否存在没有数据的模块!")
  460. }
  461. } catch (error) {
  462. console.log("错误:导航池渲染执行接口出错!请检查频道页渲染的模块数据是否完整!")
  463. }
  464. // 获取商品数据 start--------------------------------------->
  465. async function getPageGoodsAllData(goodsJsonString) {
  466. const mkdata = await requestDataPromise('/web/getWebsiteCatidshop', {
  467. method: 'GET',
  468. query: {
  469. 'catid': goodsJsonString
  470. },
  471. });
  472. console.log("获取商品数据", mkdata);
  473. if (mkdata.code == 200) {
  474. goodsData.value[0].data = mkdata.data[0];//模块1
  475. goodsData.value[1].data = mkdata.data[1];//模块2
  476. goodsData.value[2].data = mkdata.data[2];//模块3
  477. goodsData.value[3].data = mkdata.data[3];//模块4
  478. goodsData.value[4].data = mkdata.data[4];//模块5
  479. goodsData.value[5].data = mkdata.data[5];//模块6
  480. }
  481. }
  482. // 获取商品数据 end----------------------------------------->
  483. //4.页面数据 end ---------------------------------------->
  484. //5.设置seo信息 start---------------------------------------->
  485. const setData = await requestDataPromise('/web/getWebsiteCategoryHead', {
  486. method: 'GET',
  487. query: {
  488. 'catid': routeId
  489. },
  490. });
  491. if (setData.code == 200) {
  492. let seoTitle = setData.data.seo_title;
  493. let seoDescription = setData.data.seo_description;
  494. let seoKeywords = setData.data.seo_keywords;
  495. let seoSuffix = setData.data.suffix;
  496. let seoName = setData.data.website_name;
  497. useSeoMeta({
  498. title: seoTitle + "_" + seoName + "_" + seoSuffix,
  499. meta: [
  500. { name: 'keywords', content: seoKeywords + "_" + seoName + "_" + seoSuffix, tagPriority: 10 },
  501. { name: 'description', content: seoDescription + "_" + seoName + "_" + seoSuffix, tagPriority: 10 },
  502. { name: 'viewport', content: 'width=device-width,initial-scale=1,user-scalable=no',tagPriority: 10 }
  503. ]
  504. });
  505. } else {
  506. console.log("设置频道页SEO出错!", setData.message)
  507. }
  508. //5.设置seo信息 end---------------------------------------->
  509. </script>
  510. <style lang="less" scoped>
  511. @import url("@/assets/css/shop/shopClass.less");
  512. </style>
  513. <style lang="less" scoped>
  514. @media screen and (min-width:801px){/*pc*/
  515. .pc_none{display:none;}
  516. }
  517. @media screen and (max-width:800px){/*ipad_phone*/
  518. .index_main{width:100%;margin:0px auto;}
  519. .phone_nav{
  520. width:100%; box-sizing:border-box;background:#fafafa;
  521. margin:10px auto;height:33px;
  522. .phone_nav_in{ width:92%;margin:0px auto;
  523. overflow-x:auto;overflow-y:hidden;
  524. word-break: keep-all; white-space: nowrap;
  525. line-height:33px;
  526. height:33px;
  527. }
  528. .phone_nav_in::-webkit-scrollbar{height:0px;}
  529. .phone_nav_a{display:inline-block;line-height:33px;height:33px;
  530. color:#333;font-size:14px;margin:0px 10px;
  531. }
  532. .phone_nav_a:nth-of-type(1){margin-left:0px;}
  533. }
  534. .phone_nav_a.active{
  535. color:#004564;
  536. }
  537. .phone_shop_1{width:92%;margin:10px auto 0;
  538. .phone_shop_head{overflow:hidden;}
  539. .phone_shop_head_a{ float:left;height:50px;line-height:50px;margin:0;position:relative;
  540. color:#004564;font-size:18px; font-weight:bold;box-sizing:border-box;
  541. padding-left:18px;
  542. background:url(@/public/shop/01.png) no-repeat left center;
  543. background-size:10px 14px;
  544. }
  545. .phone_shop_img_ul{min-height:252px;}
  546. .phone_shop_img_li{width:48%;margin-bottom:15px;}
  547. .phone_shop_img_li:nth-of-type(odd){float:left; }
  548. .phone_shop_img_li:nth-of-type(even){ float:right;}
  549. .phone_shop_img_li_a{display:block;width:100%; }
  550. .phone_shop_img{display:block;width:100%;height:44vw;border-radius:6px;}
  551. .phone_shop_img_li_dot2{height:40px;line-height:20px;color:#333;font-size:16px;margin:4px 0 2px;
  552. overflow:hidden;display:-webkit-box!important;-webkit-box-orient:vertical;-webkit-line-clamp:2;}
  553. .phone_shop_img_foot{overflow:hidden;margin-top:4px;}
  554. .phone_shop_img_foot_1{float:left;height:22px;line-height:22px;color:#004564;font-size:14px;padding:0px 6px;margin-right:4px; border:solid 1px #004564;}
  555. .phone_shop_img_foot_2{float:right;height:22px;line-height:22px;color:#fff;font-size:14px;background:#004564; padding:0px 6px;border:solid 1px #004564;}
  556. }
  557. .phone_shop_1_text_box{
  558. width:92%;margin:0px auto 0px;
  559. .phone_shop_text_head{overflow:hidden;}
  560. .phone_shop_text_head_a{ float:left;height:50px;line-height:50px;margin:0;position:relative;
  561. color:#F7812B;font-size:18px; font-weight:bold;box-sizing:border-box;
  562. padding-left:18px;
  563. background:url(@/public/shop/02.png) no-repeat left center;
  564. background-size:10px 14px; }
  565. .phone_shop_text_ul{width:100%;}
  566. .phone_shop_text_li{width:100%;border-bottom:dashed 1px #ddd;padding-bottom:8px;margin-bottom:8px;}
  567. .phone_shop_text_li_a{display:block;width:100%;}
  568. .phone_shop_text_li_h4{display:block;width:100%;height:20px;line-height:20px;color:#333;font-size:16px;text-indent:15px;position:relative;font-weight:normal;
  569. word-break: keep-all; white-space: nowrap;overflow:hidden;text-overflow:ellipsis;}
  570. .phone_shop_text_li_h4::after {
  571. content: '';
  572. display: block;
  573. width: 6px;
  574. height: 6px;
  575. background: #F7812B;
  576. position: absolute;
  577. left: 0px;
  578. top: 7px;
  579. }
  580. .phone_shop_text_li_dot1{display:block;width:100%;height:20px;line-height:20px;color:#666;font-size:14px;text-indent:15px;margin-top:2px;
  581. word-break: keep-all; white-space: nowrap;overflow:hidden;text-overflow:ellipsis;}
  582. }
  583. .phone_shop_2{width:92%;margin:10px auto 0;
  584. .phone_shop_head{overflow:hidden;}
  585. .phone_shop_head_a{ float:left;height:50px;line-height:50px;margin:0;position:relative;
  586. color:#004564;font-size:18px; font-weight:bold;box-sizing:border-box;
  587. padding-left:18px;
  588. background:url(@/public/shop/01.png) no-repeat left center;
  589. background-size:10px 14px;
  590. }
  591. .phone_shop_img_ul{min-height:252px;}
  592. .phone_shop_img_li{width:48%;margin-bottom:15px;}
  593. .phone_shop_img_li:nth-of-type(odd){float:left; }
  594. .phone_shop_img_li:nth-of-type(even){ float:right;}
  595. .phone_shop_img_li_a{display:block;width:100%; }
  596. .phone_shop_img{display:block;width:100%;height:44vw;border-radius:6px;}
  597. .phone_shop_img_li_dot2{height:40px;line-height:20px;color:#333;font-size:16px;margin:4px 0 2px;
  598. overflow:hidden;display:-webkit-box!important;-webkit-box-orient:vertical;-webkit-line-clamp:2;}
  599. .phone_shop_img_foot{overflow:hidden;margin-top:4px;}
  600. .phone_shop_img_foot_1{float:left;height:22px;line-height:22px;color:#004564;font-size:14px;padding:0px 6px;margin-right:4px; border:solid 1px #004564;}
  601. .phone_shop_img_foot_2{float:right;height:22px;line-height:22px;color:#fff;font-size:14px;background:#004564; padding:0px 6px;border:solid 1px #004564;}
  602. }
  603. .phone_shop_3{width:92%;margin:10px auto 0;
  604. .phone_shop_head{overflow:hidden;}
  605. .phone_shop_head_a{ float:left;height:50px;line-height:50px;margin:0;position:relative;
  606. color:#F7812B;font-size:18px; font-weight:bold;box-sizing:border-box;
  607. padding-left:18px;
  608. background:url(@/public/shop/02.png) no-repeat left center;
  609. background-size:10px 14px;
  610. }
  611. .phone_shop_img_ul{min-height:252px;}
  612. .phone_shop_img_li{width:48%;margin-bottom:15px;}
  613. .phone_shop_img_li:nth-of-type(odd){float:left; }
  614. .phone_shop_img_li:nth-of-type(even){ float:right;}
  615. .phone_shop_img_li_a{display:block;width:100%; }
  616. .phone_shop_img{display:block;width:100%;height:44vw;border-radius:6px;}
  617. .phone_shop_img_li_dot2{height:40px;line-height:20px;color:#333;font-size:16px;margin:4px 0 2px;
  618. overflow:hidden;display:-webkit-box!important;-webkit-box-orient:vertical;-webkit-line-clamp:2;}
  619. .phone_shop_img_foot{overflow:hidden;margin-top:4px;}
  620. .phone_shop_img_foot_1{float:left;height:22px;line-height:22px;color:#F7812B;font-size:14px;padding:0px 6px;margin-right:4px; border:solid 1px #F7812B;}
  621. .phone_shop_img_foot_2{float:right;height:22px;line-height:22px;color:#fff;font-size:14px;background:#F7812B; padding:0px 6px;border:solid 1px #F7812B;}
  622. }
  623. .phone_shop_4{width:92%;margin:10px auto 0;
  624. .phone_shop_head{overflow:hidden;}
  625. .phone_shop_head_a{ float:left;height:50px;line-height:50px;margin:0;position:relative;
  626. color:#004564;font-size:18px; font-weight:bold;box-sizing:border-box;
  627. padding-left:18px;
  628. background:url(@/public/shop/01.png) no-repeat left center;
  629. background-size:10px 14px;
  630. }
  631. .phone_shop_img_ul{min-height:252px;}
  632. .phone_shop_img_li{width:48%;margin-bottom:15px;}
  633. .phone_shop_img_li:nth-of-type(odd){float:left; }
  634. .phone_shop_img_li:nth-of-type(even){ float:right;}
  635. .phone_shop_img_li_a{display:block;width:100%; }
  636. .phone_shop_img{display:block;width:100%;height:44vw;border-radius:6px;}
  637. .phone_shop_img_li_dot2{height:40px;line-height:20px;color:#333;font-size:16px;margin:4px 0 2px;
  638. overflow:hidden;display:-webkit-box!important;-webkit-box-orient:vertical;-webkit-line-clamp:2;}
  639. .phone_shop_img_foot{overflow:hidden;margin-top:4px;}
  640. .phone_shop_img_foot_1{float:left;height:22px;line-height:22px;color:#004564;font-size:14px;padding:0px 6px;margin-right:4px; border:solid 1px #004564;}
  641. .phone_shop_img_foot_2{float:right;height:22px;line-height:22px;color:#fff;font-size:14px;background:#004564; padding:0px 6px;border:solid 1px #004564;}
  642. }
  643. .phone_shop_5{width:92%;margin:10px auto 15px;
  644. .phone_shop_head{overflow:hidden;}
  645. .phone_shop_head_a{ float:left;height:50px;line-height:50px;margin:0;position:relative;
  646. color:#F7812B;font-size:18px; font-weight:bold;box-sizing:border-box;
  647. padding-left:18px;
  648. background:url(@/public/shop/02.png) no-repeat left center;
  649. background-size:10px 14px;
  650. }
  651. .phone_shop_img_ul{min-height:252px;}
  652. .phone_shop_img_li{width:48%;margin-bottom:15px;}
  653. .phone_shop_img_li:nth-of-type(odd){float:left; }
  654. .phone_shop_img_li:nth-of-type(even){ float:right;}
  655. .phone_shop_img_li_a{display:block;width:100%; }
  656. .phone_shop_img{display:block;width:100%;height:44vw;border-radius:6px;}
  657. .phone_shop_img_li_dot2{height:40px;line-height:20px;color:#333;font-size:16px;margin:4px 0 2px;
  658. overflow:hidden;display:-webkit-box!important;-webkit-box-orient:vertical;-webkit-line-clamp:2;}
  659. .phone_shop_img_foot{overflow:hidden;margin-top:4px;}
  660. .phone_shop_img_foot_1{float:left;height:22px;line-height:22px;color:#F7812B;font-size:14px;padding:0px 6px;margin-right:4px; border:solid 1px #F7812B;}
  661. .phone_shop_img_foot_2{float:right;height:22px;line-height:22px;color:#fff;font-size:14px;background:#F7812B; padding:0px 6px;border:solid 1px #F7812B;}
  662. }
  663. .phone_none{display:none;}
  664. }
  665. </style>