userCenterView.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813
  1. <template>
  2. <div>
  3. <div style="width: 100%; height: 190px; background: #fff">
  4. <div style="float: left; width: 20%; height: 100%; position: relative">
  5. <div
  6. style="
  7. width: 130px;
  8. height: 130px;
  9. position: absolute;
  10. left: 50%;
  11. top: 45%;
  12. transform: translate(-50%, -50%);
  13. border-radius: 65px;
  14. overflow: hidden;
  15. "
  16. >
  17. <img
  18. v-if="!showDefaultImg"
  19. :src="'api/file/pub/' + this.userPic"
  20. alt=""
  21. style="width: 100%; height: 130px"
  22. @error="showDefault()"
  23. />
  24. <img
  25. v-if="showDefaultImg"
  26. :src="require('@/assets/img/userCenter/user.png')"
  27. alt=""
  28. style="width: 100%; height: 130px"
  29. />
  30. </div>
  31. </div>
  32. <div style="float: left; width: 50%; height: 100%">
  33. <div
  34. style="width: 96.5%; margin-left: 10px; margin-top: 20px; height: 80%"
  35. >
  36. <div>
  37. <span style="font-size: 20px; color: #2c5589; font-weight: 700">{{
  38. realName
  39. }}</span>
  40. <span v-if="userInfor.userType" class="tagFA6400">{{
  41. userTypeDicts[this.userInfor.userType]
  42. }}</span>
  43. <span v-if="userInfor.tag1" class="tag6DD400">{{
  44. realStatusDicts[this.realStatus]
  45. }}</span>
  46. <span v-if="userInfor.tag1" class="tag00D4C3">{{
  47. userMobileStatusDicts[this.mobileStatus]
  48. }}</span>
  49. <span v-if="userInfor.tag1" class="tag00B9FF">{{
  50. userEmailStatusDicts[this.emailStatus]
  51. }}</span>
  52. </div>
  53. <div style="margin-top: 10px; font-size: 14px; color: #999">
  54. <div
  55. style="margin-top: 10px; font-size: 14px; color: #999"
  56. v-if="userInfor.unitName"
  57. >
  58. <span>
  59. <i class="el-icon-office-building" aria-hidden="true"></i>
  60. {{ userInfor.unitName }}
  61. </span>
  62. </div>
  63. <span style="margin-right: 25px">
  64. <i class="el-icon-message" aria-hidden="true"></i>
  65. {{ userInfor.Email }}
  66. </span>
  67. <div style="margin-top: 10px; font-size: 14px; color: #999">
  68. <span>
  69. <i class="el-icon-mobile-phone" aria-hidden="true"></i>
  70. {{ userInfor.tel }}
  71. </span>
  72. </div>
  73. </div>
  74. </div>
  75. </div>
  76. <div
  77. style="
  78. float: left;
  79. width: 19.8%;
  80. height: 100%;
  81. border-left: 1px solid #ebebeb;
  82. "
  83. >
  84. <div
  85. style="width: 96.4%; margin-left: 10px; margin-top: 20px; height: 80%"
  86. >
  87. <div>
  88. <span style="font-size: 18px; color: #2c5589; font-weight: 700">{{
  89. $t("common.MessageRemind")
  90. }}</span>
  91. <i
  92. class="fa fa-volume-up"
  93. aria-hidden="true"
  94. style="color: #2c5589; margin-left: 20px; font-size: 18px"
  95. ></i>
  96. </div>
  97. <div style="margin-top: 10px; font-size: 14px; color: #999">
  98. <span
  99. style="display: block; line-height: 30px"
  100. @click="toView('SystemMessage', '/SystemMessage')"
  101. class="cursor"
  102. >
  103. {{ $t("common.SystemRemind") }}:<span class="num1">{{
  104. SystemRemindNum
  105. }}</span>
  106. </span>
  107. <span
  108. style="display: block; line-height: 30px"
  109. @click="toView('notification', '/notification')"
  110. class="cursor"
  111. >
  112. {{ $t("common.Announcements") }}:<span class="num1">{{
  113. AnnouncementsNum
  114. }}</span>
  115. </span>
  116. <span
  117. style="display: block; line-height: 30px"
  118. @click="toView('myConsultingService', '/myConsultingService')"
  119. class="cursor"
  120. >
  121. {{ $t("common.MyAdvice") }}:<span class="num2">{{
  122. MyAdviceNum
  123. }}</span>
  124. </span>
  125. <span
  126. style="display: block; line-height: 30px"
  127. @click="toView('communication', '/communication')"
  128. class="cursor"
  129. >
  130. {{ $t("common.interactiveMessage") }}:<span class="num2">{{
  131. interactiveMessageNum
  132. }}</span>
  133. </span>
  134. </div>
  135. </div>
  136. </div>
  137. </div>
  138. <div style="width: 100%; height: 100px; background: #fff; margin-top: 15px">
  139. <div class="title">
  140. <span>
  141. <i
  142. class="el-icon-menu"
  143. aria-hidden="true"
  144. style="margin-right: 10px"
  145. ></i
  146. >{{ $t("common.FunctionRecommended") }}</span
  147. >
  148. </div>
  149. <div
  150. style="
  151. width: 100%;
  152. height: 50px;
  153. line-height: 50px;
  154. font-size: 15px;
  155. color: #666;
  156. "
  157. >
  158. <span
  159. style="padding: 3px 30px; border-right: 1px solid #2c5589"
  160. class="cursor"
  161. @click="toViewDevelopmentCooperation()"
  162. >
  163. <i
  164. class="el-icon-message"
  165. aria-hidden="true"
  166. style="margin-right: 5px; color: #2c5589"
  167. ></i
  168. >{{ $t("common.CooperationForum") }}</span
  169. >
  170. <span
  171. style="padding: 3px 30px; border-right: 1px solid #2c5589"
  172. class="cursor"
  173. @click="toOnlineMeeting()"
  174. >
  175. <i
  176. class="el-icon-microphone"
  177. aria-hidden="true"
  178. style="margin-right: 5px; color: #2c5589"
  179. ></i
  180. >{{ $t("common.OnlineMeeting") }}</span
  181. >
  182. </div>
  183. </div>
  184. <!--我的项目-->
  185. <div style="width: 100%; background: #fff; margin-top: 15px">
  186. <div class="title">
  187. <span>
  188. <i
  189. class="el-icon-office-building"
  190. aria-hidden="true"
  191. style="margin-right: 10px"
  192. ></i
  193. >{{ $t("common.UserMyProject") }}</span
  194. >
  195. <span
  196. style="float: right; font-size: 14px; color: #666; margin-top: 12px"
  197. class="cursor"
  198. @click="toMyProject()"
  199. >{{ $t("common.More") }}
  200. <i
  201. class="el-icon-arrow-right"
  202. aria-hidden="true"
  203. style="margin-right: 10px"
  204. ></i
  205. ></span>
  206. </div>
  207. <div style="width: 100%; height: 160px">
  208. <div class="recommend">
  209. <ul>
  210. <li
  211. v-for="(item, index) in myProject"
  212. v-if="index < 4"
  213. :key="index + 2"
  214. style="margin-left: 20px"
  215. >
  216. <img
  217. @click="
  218. toViewProject('projectPresentationDetails', item, index)
  219. "
  220. :src="'api/file/pub/' + item.bannerImg"
  221. alt
  222. style="width: 100%; height: 115px; cursor: pointer"
  223. />
  224. <div
  225. style="
  226. color: #bcbcbc;
  227. font-size: 14px;
  228. overflow: hidden;
  229. text-overflow: ellipsis;
  230. white-space: nowrap;
  231. "
  232. >
  233. {{ item.followName }}
  234. </div>
  235. </li>
  236. </ul>
  237. </div>
  238. </div>
  239. </div>
  240. <div style="width: 100%; background: #fff; margin-top: 15px">
  241. <div class="title">
  242. <span>
  243. <i
  244. class="el-icon-wind-power"
  245. aria-hidden="true"
  246. style="margin-right: 10px"
  247. ></i
  248. >{{ $t("common.UserMyActivities") }}</span
  249. >
  250. <span
  251. style="float: right; font-size: 14px; color: #666; margin-top: 12px"
  252. class="cursor"
  253. @click="toMyProject()"
  254. >{{ $t("common.More") }}
  255. <i
  256. class="el-icon-arrow-right"
  257. aria-hidden="true"
  258. style="margin-right: 10px"
  259. ></i
  260. ></span>
  261. </div>
  262. <div style="width: 100%; height: 160px">
  263. <div class="recommend">
  264. <ul>
  265. <li
  266. v-for="(item, index) in myActivity"
  267. v-if="index < 4"
  268. :key="index + 2"
  269. style="margin-left: 20px"
  270. >
  271. <img
  272. @click="
  273. toViewActivity('cooperationExchangeListDetails', item, index)
  274. "
  275. :src="'api/file/pub/' + item.bannerImg"
  276. alt
  277. style="width: 100%; height: 115px; cursor: pointer"
  278. />
  279. <div
  280. style="
  281. color: #bcbcbc;
  282. font-size: 14px;
  283. overflow: hidden;
  284. text-overflow: ellipsis;
  285. white-space: nowrap;
  286. "
  287. >
  288. {{ item.followName }}
  289. </div>
  290. </li>
  291. </ul>
  292. </div>
  293. </div>
  294. </div>
  295. </div>
  296. </template>
  297. <script>
  298. import { selectPushMsgNum, selectNoticeInfoNum } from "@/api/userCenter";
  299. import { getDicts } from "@/api/dict";
  300. import { getPortalMyFollowMode } from "@/api/userCenter/myFollow";
  301. import { saveFollowModelLanguage } from "@/api/operation/basePortalModelFollowInfo";
  302. import { dropUmsUser } from "@/api/userCenter/ums";
  303. import { getToken } from "@/utils/auth";
  304. import {
  305. getUserInfoStatus,
  306. getUserInfoStatusByLanuage,
  307. } from "@/api/userCenter";
  308. import Base from "@/views/base/Base";
  309. export default {
  310. name: "userCenterView",
  311. extends: Base,
  312. data() {
  313. return {
  314. showDefaultImg: false,
  315. //系统提示
  316. SystemRemindNum: 0,
  317. //通知公告
  318. AnnouncementsNum: 0,
  319. //我的咨询
  320. MyAdviceNum: 0,
  321. //互动留言
  322. interactiveMessageNum: 0,
  323. projectNum: [],
  324. projectParams: {
  325. pageNo: 1,
  326. pageSize: 10,
  327. technicalCategories: "",
  328. technicalScope: "",
  329. phaseType: "",
  330. createBy: "",
  331. projectName: "",
  332. publishingChannels: "1",
  333. approveStatus: "",
  334. language: "",
  335. },
  336. userInfor: {
  337. userName: "",
  338. tag1: "1",
  339. tag2: "1",
  340. tag3: "1",
  341. enterpriseName: "common.threeGorgesCorporation",
  342. Email: "",
  343. tel: "",
  344. userType: "",
  345. userTypeDict: "",
  346. unitName: "",
  347. },
  348. userPic: "/def/user.png",
  349. mobileStatus: "",
  350. emailStatus: "",
  351. realStatus: "",
  352. userTypeDicts: {
  353. 2: this.$t("common.UserUsertyp1"),
  354. 5: this.$t("common.UserUsertyp2"),
  355. 4: this.$t("common.UserUsertyp3"),
  356. },
  357. userMobileStatusDicts: {
  358. 0: this.$t("common.PhoneNumberVerified"),
  359. 1: this.$t("common.PhoneNumberNotVerified"),
  360. },
  361. userEmailStatusDicts: {
  362. 0: this.$t("common.EmailVerified"),
  363. 1: this.$t("common.EmailNotVerified"),
  364. },
  365. realStatusDicts: {
  366. true: this.$t("common.RealNameVerification"),
  367. false: this.$t("common.RealNameNotVerification"),
  368. },
  369. myProject: [],
  370. myActivity: [],
  371. recommend: [],
  372. user: {
  373. umsUser: {},
  374. },
  375. };
  376. },
  377. watch: {
  378. "$i18n.locale"() {
  379. this.userMobileStatusDicts = {
  380. 0: this.$t("common.PhoneNumberVerified"),
  381. 1: this.$t("common.PhoneNumberNotVerified"),
  382. };
  383. this.userEmailStatusDicts = {
  384. 0: this.$t("common.EmailVerified"),
  385. 1: this.$t("common.EmailNotVerified"),
  386. };
  387. this.realStatusDicts = {
  388. true: this.$t("common.RealNameVerification"),
  389. false: this.$t("common.RealNameNotVerification"),
  390. };
  391. this.userTypeDicts = {
  392. 2: this.$t("common.UserUsertyp1"),
  393. 5: this.$t("common.UserUsertyp2"),
  394. 4: this.$t("common.UserUsertyp3"),
  395. };
  396. this.initData();
  397. },
  398. },
  399. mounted() {
  400. this.initData();
  401. },
  402. computed: {
  403. // 判断有无真名
  404. realName() {
  405. if (this.user.umsUser.userNickName) {
  406. return this.user.umsUser.userNickName;
  407. } else {
  408. return this.user.username;
  409. }
  410. },
  411. },
  412. methods: {
  413. exinfo() {
  414. let token = "" + getToken();
  415. this.resetToken();
  416. // 接口逻辑
  417. dropUmsUser(token)
  418. .then((result) => {
  419. // console.log(result);
  420. this.$message({
  421. message: result.data,
  422. type: "success",
  423. });
  424. this.getList();
  425. })
  426. .catch((error) => {
  427. // 此处你的业务代码
  428. });
  429. },
  430. //获取系统消息数量
  431. getMessageNum() {
  432. if (this.i != 1) {
  433. let readStatus = "unread";
  434. selectPushMsgNum(readStatus).then((res) => {
  435. if (res.data.page.totalCount > 0) {
  436. this.SystemRemindNum = res.data.page.totalCount;
  437. } else {
  438. this.SystemRemindNum = 0;
  439. }
  440. });
  441. }
  442. },
  443. //获取通知公告数量
  444. getNoticeNum() {
  445. if (this.i != 1) {
  446. let readStatus = "unread";
  447. selectNoticeInfoNum(readStatus).then((res) => {
  448. if (res.data.page.totalCount > 0) {
  449. this.AnnouncementsNum = res.data.page.totalCount;
  450. } else {
  451. this.AnnouncementsNum = 0;
  452. }
  453. });
  454. }
  455. },
  456. toView(router, json, index) {
  457. window.localStorage.setItem("router", router);
  458. this.$store.commit("modify", router);
  459. const { href } = this.$router.resolve({
  460. name: router,
  461. query: {
  462. key: json,
  463. dataIndex: index,
  464. },
  465. });
  466. window.open(href, "_blank");
  467. },
  468. //项目跳转
  469. toViewProject(router, json, index) {
  470. if ("已删除" == json.followName || "Deleted" == json.followName) {
  471. this.saveFollowModelDo("unfollow", json.id, "project");
  472. return;
  473. }
  474. window.localStorage.setItem("router", router);
  475. this.$store.commit("modify", router);
  476. const { href } = this.$router.resolve({
  477. name: router,
  478. query: {
  479. key: json.id,
  480. dataIndex: index,
  481. },
  482. });
  483. window.open(href, "_blank");
  484. },
  485. //活动跳转
  486. toViewActivity(router, json) {
  487. if ("已删除" == json.followName || "Deleted" == json.followName) {
  488. this.saveFollowModelDo("unfollow", json.id, "activity");
  489. return;
  490. }
  491. this.$store.commit("modify", router);
  492. window.localStorage.setItem("router", router);
  493. const { href } = this.$router.resolve({
  494. name: router,
  495. query: {
  496. key: json.id,
  497. },
  498. });
  499. window.open(href, "_blank");
  500. },
  501. //跳转到发展合作留言
  502. toViewDevelopmentCooperation() {
  503. var router = "developmentCooperation";
  504. this.toView(router);
  505. },
  506. //跳转到在线会议
  507. toOnlineMeeting() {
  508. var router = "onlineMeeting";
  509. this.toView(router);
  510. },
  511. //跳到我的项目
  512. toMyProject() {
  513. this.toView("myFollow");
  514. },
  515. //查看项目
  516. findProject(item, index) {
  517. this.toView("projectPresentationDetails", item.id, index);
  518. },
  519. //查看留言
  520. findLeavMesage(item) {
  521. alert("查看留言");
  522. },
  523. initData() {
  524. let language = this.$i18n.locale.toUpperCase();
  525. this.user = JSON.parse(window.localStorage.getItem("user"));
  526. //获取用户信息
  527. getUserInfoStatusByLanuage(language).then((result) => {
  528. var data = result.data;
  529. console.log(data);
  530. this.userInfor.userName = data.name;
  531. this.userInfor.Email = data.email;
  532. if (!this.userInfor.Email) {
  533. this.userInfor.Email = this.$t("common.noHave");
  534. }
  535. this.userInfor.tel = data.newMobile;
  536. if (!this.userInfor.tel) {
  537. this.userInfor.tel = this.$t("common.noHave");
  538. }
  539. this.mobileStatus = this.user.umsUser.userMobileStatus;
  540. this.emailStatus = data.userEmailStatus;
  541. this.realStatus = data.realStatus;
  542. this.userInfor.userType = data.userType;
  543. this.userInfor.userTypeDict = data.userTypeDict;
  544. this.userInfor.unitName = data.unitName;
  545. if (!data.userPic) {
  546. this.userPic = "/def/user.png";
  547. } else {
  548. this.userPic = data.userPic;
  549. }
  550. });
  551. //获取对应的项目数据
  552. this.projectParams.language = this.$i18n.locale.toUpperCase();
  553. let token = getToken();
  554. let list = {
  555. modelType: "project",
  556. language: this.$i18n.locale.toUpperCase(),
  557. pageNo: 1,
  558. pageSize: 4,
  559. };
  560. getPortalMyFollowMode(list, token).then((res) => {
  561. this.myProject = res.data ? res.data.models : [];
  562. if (this.myProject && this.myProject.length > 0) {
  563. this.myProject.forEach((element) => {
  564. if (
  565. element.bannerImg &&
  566. element.bannerImg instanceof Array &&
  567. element.bannerImg[0] != ""
  568. ) {
  569. var bannerImgs = element.bannerImg;
  570. element.bannerImg = bannerImgs[0];
  571. } else if (
  572. element.bannerImg &&
  573. element.bannerImg.constructor == String &&
  574. element.bannerImg != ""
  575. ) {
  576. var bannerImgs = element.bannerImg.split(",");
  577. element.bannerImg = bannerImgs[0];
  578. } else {
  579. element.bannerImg = "def/projectdefault.png";
  580. }
  581. });
  582. }
  583. });
  584. token = getToken();
  585. list = {
  586. modelType: "activity",
  587. language: this.$i18n.locale.toUpperCase(),
  588. pageNo: 1,
  589. pageSize: 4,
  590. };
  591. getPortalMyFollowMode(list, token).then((res) => {
  592. this.myActivity = res.data ? res.data.models : [];
  593. if (this.myActivity && this.myActivity.length > 0) {
  594. this.myActivity.forEach((element) => {
  595. if (element.bannerImg && element.bannerImg != "") {
  596. var bannerImgs = element.bannerImg.split(",");
  597. element.bannerImg = bannerImgs[0];
  598. }
  599. });
  600. }
  601. });
  602. //获取系统消息数量
  603. this.getMessageNum();
  604. this.getNoticeNum();
  605. },
  606. getIconUrl(url) {
  607. return require("@/assets/img/userCenter/" + url);
  608. },
  609. getPorjectUrl(url) {
  610. if (null == url) {
  611. url = "api/file/pub//def/projectdefault.png";
  612. }
  613. return url;
  614. },
  615. saveFollowModelDo: function (followType, projectId, modelType) {
  616. let user = window.localStorage.getItem("user");
  617. var users = JSON.parse(user);
  618. if (!user) {
  619. this.$message.warning("请先登录");
  620. } else {
  621. let token = "" + getToken();
  622. this.resetToken();
  623. // 接口逻辑
  624. this.submitHandler((token) => {
  625. saveFollowModelLanguage(
  626. this.$i18n.locale.toUpperCase(),
  627. projectId,
  628. modelType,
  629. users.userId,
  630. followType,
  631. token
  632. )
  633. .then((result) => {
  634. // console.log(result);
  635. this.$message({
  636. message: result.data,
  637. type: "success",
  638. });
  639. this.getList();
  640. })
  641. .catch((error) => {
  642. // 此处你的业务代码
  643. });
  644. });
  645. }
  646. },
  647. showDefault() {
  648. this.showDefaultImg = true;
  649. },
  650. },
  651. };
  652. </script>
  653. <style scoped>
  654. .tagFA6400,
  655. .tag6DD400,
  656. .tag00D4C3,
  657. .tag00B9FF {
  658. display: inline-block;
  659. padding: 3px 10px;
  660. border-radius: 12px;
  661. color: #fff;
  662. font-size: 12px;
  663. margin-left: 15px;
  664. }
  665. .tagFA6400 {
  666. background: #fa6400;
  667. }
  668. .tag6DD400 {
  669. background: #6dd400;
  670. }
  671. .tag00D4C3 {
  672. background: #00d4c3;
  673. }
  674. .tag00B9FF {
  675. background: #00b9ff;
  676. }
  677. .num1 {
  678. color: #328cfc;
  679. font-weight: 700;
  680. }
  681. .num2 {
  682. font-weight: 700;
  683. color: #d8361d;
  684. }
  685. .title {
  686. height: 50px;
  687. margin-left: 30px;
  688. margin-right: 30px;
  689. border-bottom: 1px solid #ebebeb;
  690. line-height: 50px;
  691. font-size: 17px;
  692. color: #2c5589;
  693. font-weight: 700;
  694. }
  695. .init {
  696. /* padding:0 30px; */
  697. height: 450px;
  698. padding-bottom: 30px;
  699. width: 100%;
  700. }
  701. .init ul {
  702. text-align: top;
  703. height: 100%;
  704. display: flex;
  705. display: -webkit-flex; /* Safari */
  706. justify-content: space-between;
  707. flex-wrap: wrap;
  708. }
  709. .init li {
  710. width: 430px;
  711. height: 130px;
  712. text-align: top;
  713. margin-bottom: 10px;
  714. }
  715. .initLiItem {
  716. float: left;
  717. height: 100%;
  718. width: 230px;
  719. position: relative;
  720. display: flex;
  721. flex-direction: column;
  722. }
  723. .initLiItemFirst {
  724. text-align: center;
  725. margin-top: 40px;
  726. font-size: 18px;
  727. color: #666;
  728. font-weight: 600;
  729. }
  730. /* .initLiItem div, */
  731. .initLiItem span:hover {
  732. color: #2c5589;
  733. }
  734. #myActivity li {
  735. float: left;
  736. width: 300px;
  737. height: 200px;
  738. margin-right: -80px;
  739. background: skyblue;
  740. }
  741. #myActivity ul {
  742. text-align: top;
  743. margin-top: 20px;
  744. height: 200px;
  745. display: flex;
  746. display: -webkit-flex; /* Safari */
  747. justify-content: space-between;
  748. flex-wrap: nowrap;
  749. }
  750. .swiper-container {
  751. width: 100%;
  752. height: 200px;
  753. }
  754. .swiper-slide {
  755. text-align: center;
  756. font-size: 18px;
  757. background: #fff;
  758. /* Center slide text vertically */
  759. display: -webkit-box;
  760. display: -ms-flexbox;
  761. display: -webkit-flex;
  762. display: flex;
  763. -webkit-box-pack: center;
  764. -ms-flex-pack: center;
  765. -webkit-justify-content: center;
  766. justify-content: center;
  767. -webkit-box-align: center;
  768. -ms-flex-align: center;
  769. -webkit-align-items: center;
  770. align-items: center;
  771. }
  772. .swiper-slide {
  773. margin-right: 10px !important;
  774. }
  775. .recommend {
  776. margin-top: 16px;
  777. /* margin-left: 30px; */
  778. }
  779. .recommend li {
  780. display: inline-block;
  781. width: 170px;
  782. /* height: 130px; */
  783. text-align: center;
  784. margin-right: 16px;
  785. }
  786. .cursor:hover {
  787. color: red;
  788. }
  789. </style>