index.vue 27 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087
  1. <script setup>
  2. import { placeholderPic } from "~/utils/util";
  3. import ExperienceCard from "./components/ExperienceCard.vue";
  4. import Routers from "./components/Routers.vue";
  5. import MomentLayout from "~/components/MomentLayout/index.vue";
  6. import Level from "~/components/Level/index.vue";
  7. import { useUser } from "~/store/user";
  8. import { onMounted, reactive, ref, watch, watchEffect } from "vue";
  9. import {
  10. PERSONAL_SUB_NAV_LIST,
  11. PERSONAL_SECOND_SUB_NAV_LIST,
  12. } from "~/utils/constance";
  13. import { usePersonalIndexList } from "~/useHook/usePersonalIndex";
  14. import debounce from "loadsh/debounce";
  15. import * as follow from "~/api/user";
  16. import * as collect from "~/api/gather";
  17. import { useRoute, useRouter } from "vue-router";
  18. import * as delApi from "~/api/forum";
  19. import * as artivleApi from "~/api/article";
  20. import * as videoApi from "~/api/video";
  21. import * as infoApi from "~/api/news";
  22. import { CaretBottom, Search } from "@element-plus/icons-vue";
  23. const router = useRouter();
  24. const subNavCurrent = ref("forum");
  25. //勋章列表
  26. const boutiqueList = ref([]);
  27. const boutique_post = async (id) => {
  28. try {
  29. const { data } = await follow.badge({
  30. code: "boutique_post",
  31. });
  32. boutiqueList.value = data;
  33. } catch (error) {}
  34. };
  35. onMounted(boutique_post);
  36. //点赞勋章
  37. const likeList = ref([]);
  38. const like = async (id) => {
  39. try {
  40. const { data } = await follow.badge({
  41. code: "like",
  42. });
  43. likeList.value = data;
  44. } catch (error) {}
  45. };
  46. onMounted(like);
  47. //发帖/回帖勋章
  48. const postList = ref([]);
  49. const post = async (id) => {
  50. try {
  51. const { data } = await follow.badge({
  52. code: "post",
  53. });
  54. postList.value = data;
  55. } catch (error) {}
  56. };
  57. onMounted(post);
  58. //拍摄勋章
  59. const shootList = ref([]);
  60. const shoot = async (id) => {
  61. try {
  62. const { data } = await follow.badge({
  63. code: "post",
  64. });
  65. shootList.value = data;
  66. } catch (error) {}
  67. };
  68. onMounted(shoot);
  69. //删除
  70. const delect = (id) => {
  71. if (subNavCurrent.value == "forum") {
  72. delecta(id);
  73. }
  74. if (subNavCurrent.value == "news") {
  75. //资讯
  76. delectd(id);
  77. }
  78. if (subNavCurrent.value == "article") {
  79. delectb(id);
  80. }
  81. if (subNavCurrent.value == "video") {
  82. delectc(id);
  83. }
  84. };
  85. //帖子删除
  86. const delecta = async (id) => {
  87. try {
  88. const { data } = await delApi.del({
  89. id: id,
  90. });
  91. ElMessage({
  92. message: "删除成功",
  93. type: "success",
  94. });
  95. refrenshTableData();
  96. } catch (error) {}
  97. };
  98. //文章删除
  99. const delectb = async (id) => {
  100. try {
  101. const { data } = await artivleApi.del({
  102. id: id,
  103. });
  104. ElMessage({
  105. message: "删除成功",
  106. type: "success",
  107. });
  108. refrenshTableData();
  109. } catch (error) {}
  110. };
  111. //视频删除
  112. const delectc = async (id) => {
  113. try {
  114. const { data } = await videoApi.del({
  115. id: id,
  116. });
  117. ElMessage({
  118. message: "删除成功",
  119. type: "success",
  120. });
  121. refrenshTableData();
  122. } catch (error) {}
  123. };
  124. //咨询删除
  125. const delectd = async (id) => {
  126. try {
  127. const { data } = await infoApi.del({
  128. id: id,
  129. });
  130. ElMessage({
  131. message: "删除成功",
  132. type: "success",
  133. });
  134. refrenshTableData();
  135. } catch (error) {}
  136. };
  137. //跳转到详情
  138. const todetail = (id) => {
  139. //帖子
  140. if (subNavCurrent.value == "forum") {
  141. router.push({
  142. name: "post",
  143. query: {
  144. id: id,
  145. },
  146. });
  147. }
  148. if (subNavCurrent.value == "news") {
  149. router.push({
  150. name: "news",
  151. query: {
  152. id: id,
  153. },
  154. });
  155. }
  156. if (subNavCurrent.value == "article") {
  157. router.push({
  158. name: "articles",
  159. query: {
  160. id: id,
  161. },
  162. });
  163. }
  164. if (subNavCurrent.value == "video") {
  165. router.push({
  166. name: "videos",
  167. query: {
  168. id: id,
  169. },
  170. });
  171. }
  172. };
  173. //跳转到详情
  174. const todetails = (id) => {
  175. //帖子
  176. if (secondSubNavCurrent.value == "post") {
  177. router.push({
  178. name: "post",
  179. query: {
  180. id: id,
  181. },
  182. });
  183. }
  184. if (secondSubNavCurrent.value == "info") {
  185. router.push({
  186. name: "news",
  187. query: {
  188. id: id,
  189. },
  190. });
  191. }
  192. if (secondSubNavCurrent.value == "article") {
  193. router.push({
  194. name: "articles",
  195. query: {
  196. id: id,
  197. },
  198. });
  199. }
  200. if (secondSubNavCurrent.value == "video") {
  201. router.push({
  202. name: "videos",
  203. query: {
  204. id: id,
  205. },
  206. });
  207. }
  208. if (secondSubNavCurrent.value == "integral_goods") {
  209. router.push({
  210. path: "/store/pointshoping/:id",
  211. query: {
  212. id: id,
  213. },
  214. });
  215. }
  216. };
  217. const route = useRoute();
  218. //弹出层
  219. const dialogVisible = ref(false);
  220. const User = useUser();
  221. console.log("User", User.id);
  222. const backgroud_image = ref();
  223. backgroud_image.value = User.backgroud_image;
  224. //修改背景图
  225. const handleRemove = (value) => {
  226. backgroud_image.value = value.data.url;
  227. __image__();
  228. };
  229. //更换背景图接口
  230. const __image__ = async () => {
  231. try {
  232. const { data } = await follow.updata({
  233. backgroud_image: backgroud_image.value,
  234. });
  235. ElMessage.success({
  236. message: "更改成功",
  237. type: "success",
  238. });
  239. } catch (error) {}
  240. };
  241. //弹出层
  242. const attention = () => {
  243. dialogVisible.value = true;
  244. };
  245. //关注
  246. const atten = async (id) => {
  247. try {
  248. const { data } = await follow.userfollow({
  249. id: id,
  250. });
  251. ElMessage({
  252. message: "操作成功",
  253. type: "success",
  254. });
  255. if (inde.value == 0) {
  256. __articles__();
  257. } else {
  258. __fans__();
  259. }
  260. } catch (error) {}
  261. };
  262. const inde = ref(0);
  263. //关注列表
  264. const guan = (id) => {
  265. inde.value = id;
  266. if (id == 0) {
  267. __articles__();
  268. } else {
  269. __fans__();
  270. }
  271. };
  272. //关注列表
  273. const fllowlist = ref([]);
  274. const __fans__ = async () => {
  275. try {
  276. const { data } = await follow.fans({
  277. is_page: 0,
  278. });
  279. fllowlist.value = data;
  280. } catch (error) {}
  281. };
  282. //粉丝列表
  283. const __articles__ = async () => {
  284. try {
  285. const { data } = await follow.follow({
  286. is_page: 0,
  287. });
  288. fllowlist.value = data;
  289. } catch (error) {}
  290. };
  291. onMounted(__articles__);
  292. console.log("user see>>", User);
  293. // forum, news, article, video, collect
  294. if (route.query.subNavCurrent) {
  295. subNavCurrent.value = "collect";
  296. }
  297. // default value 'forum'
  298. const subNavList = PERSONAL_SUB_NAV_LIST;
  299. const handleSwitchSubNav = debounce((type) => {
  300. if (subNavCurrent.value === type) return;
  301. subNavCurrent.value = type;
  302. }, 160);
  303. // news, article, video, forum, goods
  304. const secondSubNavCurrent = ref("info"); // second nav
  305. const secondSubNavList = PERSONAL_SECOND_SUB_NAV_LIST;
  306. const subList = ref([]);
  307. const __subnav__ = async () => {
  308. try {
  309. const { data } = await collect.summary({
  310. is_page: 0,
  311. source_type: secondSubNavCurrent.value,
  312. type: "collect",
  313. });
  314. subList.value = data;
  315. console.log(subList.value);
  316. } catch (error) {}
  317. };
  318. onMounted(__subnav__);
  319. // 防抖
  320. const handleSwitchSecondSubNav = debounce((type) => {
  321. if (secondSubNavCurrent.value === type) return;
  322. secondSubNavCurrent.value = type;
  323. __subnav__();
  324. }, 240);
  325. // 首页列表数据
  326. const params = reactive({
  327. // page: 1,
  328. limit: 999,
  329. is_page: 0,
  330. source_type: "",
  331. type: "single",
  332. title: "",
  333. author_id: "",
  334. topic_id: "",
  335. is_boutique: 0, // 是否精品: 0.否, 1.是
  336. // order: "", // 排序字段: id. ID, published_at.发布时间, 默认发布时间
  337. order_type: "", // 排序类型: desc.降序, asc.升序
  338. });
  339. const __reset_params__ = () =>
  340. Object.assign(params, {
  341. // page: 1,
  342. limit: 999,
  343. is_page: 0,
  344. source_type: "",
  345. type: "single",
  346. title: "",
  347. author_id: User.id,
  348. topic_id: "",
  349. is_boutique: 0, // 是否精品: 0.否, 1.是
  350. // order: "id", // 排序字段: id. ID, published_at.发布时间, 默认发布时间
  351. order_type: "desc", // 排序类型: desc.降序, asc.升序
  352. });
  353. // 监听 `subNavCurrent` 进行数据请求
  354. watchEffect(() => {
  355. let temporary = {};
  356. switch (subNavCurrent.value) {
  357. case "forum":
  358. temporary.source_type = "post";
  359. break;
  360. case "news":
  361. temporary.source_type = "info";
  362. break;
  363. case "article":
  364. temporary.source_type = "article";
  365. break;
  366. case "video":
  367. temporary.source_type = "video";
  368. break;
  369. // case "collect":
  370. // // temporary.source_type = '<++>'
  371. // break;
  372. }
  373. console.log(
  374. "%c ----- >>>",
  375. "background: blue; color: #fff",
  376. subNavCurrent.value
  377. );
  378. // 收藏接口不走接口
  379. if (subNavCurrent.value === "collect") {
  380. __subnav__();
  381. } else {
  382. Object.assign(params, __reset_params__(), temporary);
  383. }
  384. });
  385. // onMounted()
  386. const { tableData, pagination, refrenshTableData } =
  387. usePersonalIndexList(params);
  388. const handleRefreshListData = () => {
  389. refrenshTableData();
  390. usePersonalIndexList();
  391. };
  392. //其他用户信息接口
  393. const __other__ = async (id) => {
  394. try {
  395. const { data } = await user.other({
  396. user_id: id,
  397. });
  398. userInfo.value = data;
  399. } catch (error) {}
  400. };
  401. //其他用户信息
  402. const other = (id) => {
  403. type.value = "other";
  404. __other__(id);
  405. };
  406. </script>
  407. <template>
  408. <div class="personal-container">
  409. <!-- header -->
  410. <div class="personal-header">
  411. <div
  412. :style="
  413. User.backgroud_image
  414. ? `background-image: url(${backgroud_image})`
  415. : ''
  416. "
  417. class="pheader"
  418. style="display: flex; justify-content: space-between; height: 184px"
  419. >
  420. <div class="pinfo flex-row flex-aic" style="margin-top: 50px">
  421. <div>
  422. <div class="flex-row flex-aic">
  423. <img :src="User.avatar" alt="" class="avatar circle" />
  424. <div class="pinfo__info">
  425. <div class="rheader flex-row flex-aic">
  426. <div class="name">{{ User.name || "匿名用户" }}</div>
  427. <Level :level="User.level" full />
  428. <div class="tags flex-row flex-aic">
  429. <div v-if="User.is_vip == 1">
  430. <img
  431. src="../../assets/bage/icon3.png"
  432. style="width: 22px; height: 22px"
  433. alt=""
  434. />
  435. </div>
  436. <el-dropdown>
  437. <div v-if="User.boutique_post_badge != ''">
  438. <img
  439. :src="User.boutique_post_badge"
  440. style="width: 22px; height: 22px"
  441. alt=""
  442. />
  443. </div>
  444. <template #dropdown>
  445. <el-dropdown-menu>
  446. <el-dropdown-item
  447. v-for="(item, idx) in boutiqueList"
  448. :key="idx"
  449. >
  450. {{ item.full_name }}
  451. <span style="margin-left: 10px"
  452. >({{ item.complete_time }}/{{ item.times }})
  453. </span>
  454. </el-dropdown-item>
  455. </el-dropdown-menu>
  456. </template>
  457. </el-dropdown>
  458. <el-dropdown>
  459. <div v-if="User.like_badge != ''">
  460. <img
  461. :src="User.like_badge"
  462. style="width: 22px; height: 22px"
  463. alt=""
  464. />
  465. </div>
  466. <template #dropdown>
  467. <el-dropdown-menu>
  468. <el-dropdown-item
  469. v-for="(item, idx) in likeList"
  470. :key="idx"
  471. >
  472. {{ item.full_name }}
  473. <span style="margin-left: 10px"
  474. >({{ item.complete_time }}/{{ item.times }})
  475. </span>
  476. </el-dropdown-item>
  477. </el-dropdown-menu>
  478. </template>
  479. </el-dropdown>
  480. <el-dropdown>
  481. <div v-if="User.post_badge != ''">
  482. <img
  483. :src="User.post_badge"
  484. style="width: 22px; height: 22px"
  485. alt=""
  486. />
  487. </div>
  488. <template #dropdown>
  489. <el-dropdown-menu>
  490. <el-dropdown-item
  491. v-for="(item, idx) in postList"
  492. :key="idx"
  493. >
  494. {{ item.full_name }}
  495. <span style="margin-left: 10px"
  496. >({{ item.complete_time }}/{{ item.times }})
  497. </span>
  498. </el-dropdown-item>
  499. </el-dropdown-menu>
  500. </template>
  501. </el-dropdown>
  502. <el-dropdown>
  503. <div v-if="User.shoot_badge != ''">
  504. <img
  505. :src="User.shoot_badge"
  506. style="width: 22px; height: 22px"
  507. alt=""
  508. />
  509. </div>
  510. <template #dropdown>
  511. <el-dropdown-menu>
  512. <el-dropdown-item
  513. v-for="(item, idx) in shootList"
  514. :key="idx"
  515. >
  516. {{ item.full_name }}
  517. <span style="margin-left: 10px"
  518. >({{ item.complete_time }}/{{ item.times }})
  519. </span>
  520. </el-dropdown-item>
  521. </el-dropdown-menu>
  522. </template>
  523. </el-dropdown>
  524. </div>
  525. </div>
  526. <div class="rdesc">{{ User.introduction }}</div>
  527. </div>
  528. </div>
  529. <div class="register">注册日期:{{ User.created_at.slice(0,10) }}</div>
  530. </div>
  531. </div>
  532. <!-- bg-image -->
  533. <!-- <div>
  534. <el-upload
  535. class="upload-demo"
  536. action="https://www.yixiangvr.com/api/upload/file"
  537. :on-success="handleRemove"
  538. :show-file-list="false"
  539. >
  540. <span class="change-bgc">更换背景图</span>
  541. </el-upload>
  542. </div> -->
  543. </div>
  544. <div class="sub-nav">
  545. <div class="sub-nav__main flex-row flex-jc-sb">
  546. <div class="snm-left">
  547. <ul class="flex-row flex-aic">
  548. <li
  549. :class="subNavCurrent === nav.value ? 'active' : ''"
  550. v-for="(nav, idx) in subNavList"
  551. @click="handleSwitchSubNav(nav.value)"
  552. :key="idx"
  553. >
  554. <span>{{ nav.label }}</span>
  555. </li>
  556. </ul>
  557. </div>
  558. <ul class="snm-right flex-row flex-aic">
  559. <li
  560. @click="attention()"
  561. style="
  562. cursor: pointer;
  563. display: flex;
  564. flex-direction: column;
  565. align-items: center;
  566. "
  567. >
  568. <div class="xtit" @click="dialogVisible = true">已关注</div>
  569. <span>{{ User.follow_count }}</span>
  570. </li>
  571. <li
  572. @click="attention()"
  573. style="
  574. cursor: pointer;
  575. display: flex;
  576. flex-direction: column;
  577. align-items: center;
  578. "
  579. >
  580. <div class="xtit">被关注</div>
  581. <span>{{ User.fans_count }}</span>
  582. </li>
  583. </ul>
  584. </div>
  585. <div class="sub-nav__footer" v-show="subNavCurrent === 'collect'">
  586. <ul class="flex-row flex-aic">
  587. <li
  588. :class="secondSubNavCurrent === nav.value ? 'active' : ''"
  589. v-for="(nav, idx) in secondSubNavList"
  590. @click="handleSwitchSecondSubNav(nav.value)"
  591. :key="idx"
  592. >
  593. <span>{{ nav.label }}</span>
  594. </li>
  595. </ul>
  596. </div>
  597. </div>
  598. </div>
  599. <!-- main -->
  600. <div class="personal-main flex-row flex-jc-sb">
  601. <div class="pm-content">
  602. <!-- 理应只有4种适配 -->
  603. <template
  604. v-if="['forum', 'news', 'article', 'video'].includes(subNavCurrent)"
  605. >
  606. <template v-for="(item, idx) in tableData" :key="idx">
  607. <MomentLayout
  608. @delec="delect(item.id)"
  609. @other="other(item.id)"
  610. :type="subNavCurrent"
  611. :detail="item"
  612. @refresh="handleRefreshListData"
  613. @detail="todetail(item.id)"
  614. />
  615. </template>
  616. </template>
  617. <!-- 收藏 -->
  618. <div v-else>
  619. <div
  620. v-if="
  621. secondSubNavCurrent == 'info' ||
  622. secondSubNavCurrent == 'article' ||
  623. secondSubNavCurrent == 'video'
  624. "
  625. class="flex-row"
  626. style="column-gap: 16px; flex-wrap: wrap"
  627. >
  628. <template v-for="(item, idx) in subList" :key="idx">
  629. <IndexNews
  630. style="width: 260px"
  631. @update="todetails(item.id)"
  632. :title="item.title"
  633. :time-ago="item.published_at"
  634. :like-count="item.like_count || '0'"
  635. :comment-count="item.comment_count || '0'"
  636. :image="item.image"
  637. :is_like="item.is_like"
  638. :is_collect="item.is_collect"
  639. />
  640. </template>
  641. </div>
  642. <div
  643. v-if="secondSubNavCurrent == 'post'"
  644. class="flex-row"
  645. style="column-gap: 20px; flex-wrap: wrap"
  646. >
  647. <template v-for="(item, idx) in subList" :key="idx">
  648. <div @click="todetails(item.id)" class="lunbox">
  649. <img
  650. :src="item.images[0] || ''"
  651. style="width: 112px; height: 112px"
  652. alt=""
  653. />
  654. <div style="margin-left: 10px">
  655. <div class="cont">{{ item.content }}</div>
  656. <div class="smell">
  657. <span>{{ item.like_count }}喜欢·</span>
  658. <span>{{ item.comment_count }}评论</span>
  659. </div>
  660. </div>
  661. </div>
  662. </template>
  663. </div>
  664. <div
  665. v-if="secondSubNavCurrent == 'integral_goods'"
  666. class="flex-row"
  667. style="column-gap: 20px; flex-wrap: wrap"
  668. >
  669. <template v-for="(item, idx) in subList" :key="idx">
  670. <div
  671. @click="todetails(item.id)"
  672. class="goodsbox"
  673. style="margin-bottom: 20px"
  674. >
  675. <img
  676. :src="item.image"
  677. style="width: 182px; height: 182px"
  678. alt=""
  679. />
  680. <div style="margin-left: 10px">
  681. <div
  682. style="margin-top: 14px; text-align: center"
  683. class="name"
  684. >
  685. {{ item.name }}
  686. </div>
  687. <div
  688. style="margin-top: 10px; text-align: center"
  689. class="price"
  690. >
  691. {{ item.price }}积分
  692. </div>
  693. </div>
  694. </div>
  695. </template>
  696. </div>
  697. </div>
  698. </div>
  699. <div class="pm-side">
  700. <ExperienceCard />
  701. <div class="gap"></div>
  702. <Routers />
  703. </div>
  704. </div>
  705. </div>
  706. <!-- 弹出层 -->
  707. <el-dialog
  708. v-model="dialogVisible"
  709. width="500px"
  710. style="height: 560px; border-radius: 10px"
  711. :show-close="true"
  712. >
  713. <div style="padding: 0px 24px; box-sizing: border-box">
  714. <div style="display: flex; margin-top: -20px">
  715. <div :class="inde == 0 ? 'active' : 'toptitle'" @click="guan(0)">
  716. 已关注
  717. </div>
  718. <div
  719. :class="inde == 1 ? 'active' : 'toptitle'"
  720. style="margin-left: 46px"
  721. @click="guan(1)"
  722. >
  723. 被关注
  724. </div>
  725. </div>
  726. <div v-if="fllowlist.length > 0">
  727. <div class="boxa" v-for="(item, idx) in fllowlist" :key="idx">
  728. <div style="display: flex">
  729. <img
  730. :src="item.avatar"
  731. style="width: 46px; height: 46px; border-radius: 50%"
  732. alt=""
  733. />
  734. <div style="margin-left: 12px">
  735. <div class="name">{{ item.username }}</div>
  736. <div class="info">{{ item.introduction || "" }}</div>
  737. </div>
  738. </div>
  739. <div>
  740. <div
  741. class="attention"
  742. @click="atten(item.id)"
  743. v-if="item.is_follow == 0"
  744. >
  745. 关注
  746. </div>
  747. <div
  748. class="atten"
  749. @click="atten(item.id)"
  750. v-if="item.is_follow == 1"
  751. >
  752. 已关注
  753. </div>
  754. </div>
  755. </div>
  756. </div>
  757. <div
  758. v-else
  759. style="
  760. display: flex;
  761. flex-direction: column;
  762. align-items: center;
  763. justify-content: center;
  764. height: 450px;
  765. "
  766. >
  767. <div>还没有内容</div>
  768. </div>
  769. </div>
  770. </el-dialog>
  771. </template>
  772. <style lang="scss" scoped>
  773. .register {
  774. font-family: SFPro, SFPro;
  775. font-weight: 400;
  776. font-size: 12px;
  777. color: rgba(255, 255, 255, 0.5);
  778. line-height: 14px;
  779. text-align: left;
  780. font-style: normal;
  781. margin-top: 12px;
  782. }
  783. @import "~/styles/variable.scss";
  784. .name {
  785. font-family: PingFangSC, PingFang SC;
  786. font-weight: 400;
  787. font-size: 12px;
  788. color: #444444;
  789. line-height: 17px;
  790. text-align: justify;
  791. font-style: normal;
  792. height: 20px;
  793. overflow: hidden;
  794. text-overflow: ellipsis;
  795. white-space: nowrap;
  796. }
  797. .goodsbox {
  798. width: 222px;
  799. height: 276px;
  800. border: 1px solid #e3e3e3;
  801. padding: 20px 20px 13px;
  802. box-sizing: border-box;
  803. }
  804. .smell {
  805. font-family: SFPro, SFPro;
  806. font-weight: 400;
  807. font-size: 12px;
  808. color: #777777;
  809. line-height: 14px;
  810. text-align: left;
  811. font-style: normal;
  812. margin-top: 16px;
  813. }
  814. .lunbox {
  815. width: 374px;
  816. height: 132px;
  817. background: #ffffff;
  818. border-radius: 6px;
  819. padding: 10px;
  820. box-sizing: border-box;
  821. display: flex;
  822. margin-bottom: 20px;
  823. }
  824. .cont {
  825. width: 232px;
  826. height: 72px;
  827. font-family: PingFangSC, PingFang SC;
  828. font-weight: 400;
  829. font-size: 13px;
  830. color: #333333;
  831. line-height: 18px;
  832. text-align: justify;
  833. font-style: normal;
  834. text-overflow: ellipsis;
  835. overflow: hidden;
  836. white-space: nowrap;
  837. }
  838. .active {
  839. font-family: PingFangSC, PingFang SC;
  840. font-weight: 500;
  841. font-size: 18px;
  842. color: #222222;
  843. line-height: 25px;
  844. text-align: justify;
  845. font-style: normal;
  846. }
  847. .toptitle {
  848. font-family: PingFangSC, PingFang SC;
  849. font-weight: 500;
  850. font-size: 18px;
  851. color: #999999;
  852. line-height: 25px;
  853. text-align: justify;
  854. font-style: normal;
  855. }
  856. .atten {
  857. width: 92px;
  858. height: 38px;
  859. background: #c7cbcc;
  860. border-radius: 4px;
  861. font-family: PingFangSC, PingFang SC;
  862. font-weight: 400;
  863. font-size: 14px;
  864. color: #ffffff;
  865. line-height: 38px;
  866. text-align: center;
  867. font-style: normal;
  868. cursor: pointer;
  869. }
  870. .attention {
  871. background: #00b0b0;
  872. border-radius: 4px;
  873. width: 92px;
  874. height: 38px;
  875. font-family: PingFangSC, PingFang SC;
  876. font-weight: 400;
  877. font-size: 14px;
  878. color: #ffffff;
  879. line-height: 38px;
  880. text-align: center;
  881. font-style: normal;
  882. cursor: pointer;
  883. }
  884. .name {
  885. font-family: PingFangSC, PingFang SC;
  886. font-weight: 500;
  887. font-size: 14px;
  888. color: #333333;
  889. line-height: 20px;
  890. text-align: justify;
  891. font-style: normal;
  892. }
  893. .info {
  894. font-family: PingFangSC, PingFang SC;
  895. font-weight: 400;
  896. font-size: 10px;
  897. color: #777777;
  898. line-height: 14px;
  899. text-align: justify;
  900. font-style: normal;
  901. margin-top: 4px;
  902. width: 280px;
  903. overflow: hidden;
  904. text-overflow: ellipsis;
  905. white-space: nowrap;
  906. }
  907. .boxa {
  908. display: flex;
  909. justify-content: space-between;
  910. margin-top: 32px;
  911. }
  912. ul {
  913. list-style: none;
  914. padding: 0;
  915. margin: 0;
  916. }
  917. .personal {
  918. // &-container {}
  919. &-header {
  920. background-color: #fff;
  921. margin-bottom: 16px;
  922. .change-bgc {
  923. width: 74px;
  924. height: 26px;
  925. background: rgba(255, 255, 255, 0.16);
  926. border-radius: 2px;
  927. font-size: 12px;
  928. font-weight: 400;
  929. color: #ffffff;
  930. float: right;
  931. line-height: 26px;
  932. text-align: center;
  933. cursor: pointer;
  934. }
  935. .pheader {
  936. padding: 20px;
  937. background-color: rgba(0, 0, 0, 0.18);
  938. box-sizing: border-box;
  939. background-repeat: no-repeat;
  940. background-position: cover;
  941. background-attachment: fixed;
  942. background-size: 100% 100%;
  943. .pinfo {
  944. .avatar {
  945. width: 60px;
  946. height: 60px;
  947. margin-right: 16px;
  948. }
  949. .rheader {
  950. column-gap: 10px;
  951. }
  952. .name {
  953. font-size: 18px;
  954. font-weight: 500;
  955. color: #ffffff;
  956. }
  957. .rdesc {
  958. margin-top: 10px;
  959. font-size: 13px;
  960. font-weight: 400;
  961. color: rgba(255, 255, 255, 0.5);
  962. }
  963. .tags {
  964. column-gap: 6px;
  965. }
  966. }
  967. }
  968. .sub-nav {
  969. &__main {
  970. padding: 12px 24px;
  971. .snm-left {
  972. ul {
  973. column-gap: 36px;
  974. }
  975. li {
  976. cursor: pointer;
  977. padding: 10px 0;
  978. &.active {
  979. border-bottom: 3px solid $color-primary;
  980. }
  981. }
  982. }
  983. .snm-right {
  984. column-gap: 50px;
  985. .xtit {
  986. font-size: 12px;
  987. font-weight: 400;
  988. color: #555555;
  989. line-height: 17px;
  990. }
  991. span {
  992. font-size: 18px;
  993. font-weight: 400;
  994. color: #333333;
  995. line-height: 22px;
  996. }
  997. }
  998. }
  999. &__footer {
  1000. padding: 10px 14px;
  1001. column-gap: 20px;
  1002. li {
  1003. padding: 8px 10px;
  1004. font-size: 14px;
  1005. font-weight: 500;
  1006. color: #555555;
  1007. border-radius: 3px;
  1008. cursor: pointer;
  1009. &.active {
  1010. color: #fff;
  1011. background-color: $color-primary;
  1012. }
  1013. }
  1014. }
  1015. }
  1016. }
  1017. &-main {
  1018. column-gap: 16px;
  1019. .pm-content {
  1020. width: 0;
  1021. flex: 1;
  1022. // background-color: rgba(255, 255, 255, 0.46);
  1023. .moment-layout-container {
  1024. border-radius: 8px;
  1025. margin-bottom: 20px;
  1026. &:last-child {
  1027. margin-bottom: initial;
  1028. }
  1029. }
  1030. }
  1031. .pm-side {
  1032. width: 314px;
  1033. .gap {
  1034. height: 16px;
  1035. }
  1036. }
  1037. }
  1038. }
  1039. </style>