mirror of https://github.com/rocboss/paopao-ce
commit
5b08ad51e9
@ -0,0 +1 @@
|
|||||||
|
DROP TABLE IF EXISTS `p_topic_user`;
|
@ -0,0 +1,17 @@
|
|||||||
|
CREATE TABLE `p_topic_user` (
|
||||||
|
`id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||||
|
`topic_id` BIGINT UNSIGNED NOT NULL COMMENT '标签ID',
|
||||||
|
`user_id` BIGINT UNSIGNED NOT NULL COMMENT '创建者ID',
|
||||||
|
`alias_name` VARCHAR ( 255 ) COMMENT '别名',
|
||||||
|
`remark` VARCHAR ( 512 ) COMMENT '备注',
|
||||||
|
`quote_num` BIGINT UNSIGNED COMMENT '引用数',
|
||||||
|
`is_top` TINYINT UNSIGNED NOT NULL DEFAULT '0' COMMENT '是否置顶 0 为未置顶、1 为已置顶',
|
||||||
|
`created_on` BIGINT UNSIGNED NOT NULL DEFAULT '0' COMMENT '创建时间',
|
||||||
|
`modified_on` BIGINT UNSIGNED NOT NULL DEFAULT '0' COMMENT '修改时间',
|
||||||
|
`deleted_on` BIGINT UNSIGNED NOT NULL DEFAULT '0' COMMENT '删除时间',
|
||||||
|
`is_del` TINYINT UNSIGNED NOT NULL DEFAULT '0' COMMENT '是否删除 0 为未删除、1 为已删除',
|
||||||
|
`reserve_a` VARCHAR ( 255 ) COMMENT '保留字段a',
|
||||||
|
`reserve_b` VARCHAR ( 255 ) COMMENT '保留字段b',
|
||||||
|
PRIMARY KEY ( `id` ) USING BTREE,
|
||||||
|
UNIQUE KEY `idx_topic_user_uid_tid` ( `topic_id`, `user_id` ) USING BTREE
|
||||||
|
) ENGINE = INNODB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户话题';
|
@ -0,0 +1 @@
|
|||||||
|
DROP TABLE IF EXISTS `p_topic_user`;
|
@ -0,0 +1,16 @@
|
|||||||
|
CREATE TABLE p_topic_user (
|
||||||
|
ID BIGSERIAL PRIMARY KEY,
|
||||||
|
topic_id BIGINT NOT NULL,-- 标签ID
|
||||||
|
user_id BIGINT NOT NULL,-- 创建者ID
|
||||||
|
alias_name VARCHAR ( 255 ),-- 别名
|
||||||
|
remark VARCHAR ( 512 ),-- 备注
|
||||||
|
quote_num BIGINT,-- 引用数
|
||||||
|
is_top SMALLINT NOT NULL DEFAULT 0,-- 是否置顶 0 为未置顶、1 为已置顶
|
||||||
|
created_on BIGINT NOT NULL DEFAULT 0,-- 创建时间
|
||||||
|
modified_on BIGINT NOT NULL DEFAULT 0,-- 修改时间
|
||||||
|
deleted_on BIGINT NOT NULL DEFAULT 0,-- 删除时间
|
||||||
|
is_del SMALLINT NOT NULL DEFAULT 0,-- 是否删除 0 为未删除、1 为已删除
|
||||||
|
reserve_a VARCHAR ( 255 ),-- 保留字段a
|
||||||
|
reserve_b VARCHAR ( 255 ) -- 保留字段b
|
||||||
|
);
|
||||||
|
CREATE UNIQUE INDEX idx_topic_user_uid_tid ON p_topic_user USING btree ( topic_id, user_id );
|
@ -0,0 +1 @@
|
|||||||
|
DROP TABLE IF EXISTS `p_topic_user`;
|
@ -0,0 +1,17 @@
|
|||||||
|
CREATE TABLE "p_topic_user" (
|
||||||
|
"id" integer,
|
||||||
|
"topic_id" integer NOT NULL,-- 标签ID
|
||||||
|
"user_id" integer NOT NULL,-- 创建者ID
|
||||||
|
"alias_name" text ( 255 ),-- 别名
|
||||||
|
"remark" text ( 512 ),-- 备注
|
||||||
|
"quote_num" integer,-- 引用数
|
||||||
|
"is_top" integer NOT NULL DEFAULT 0,-- 是否置顶 0 为未置顶、1 为已置顶
|
||||||
|
"created_on" integer NOT NULL DEFAULT 0,-- 创建时间
|
||||||
|
"modified_on" integer NOT NULL DEFAULT 0,-- 修改时间
|
||||||
|
"deleted_on" integer NOT NULL DEFAULT 0,-- 删除时间
|
||||||
|
"is_del" integer NOT NULL DEFAULT 0,-- 是否删除 0 为未删除、1 为已删除
|
||||||
|
"reserve_a" text,-- 保留字段a
|
||||||
|
"reserve_b" text,-- 保留字段b
|
||||||
|
PRIMARY KEY ( "id" )
|
||||||
|
);
|
||||||
|
CREATE UNIQUE INDEX "idx_topic_user_uid_tid" ON "p_topic_user" ( "topic_id", "user_id" );
|
@ -1 +1 @@
|
|||||||
import{_ as s}from"./main-nav.vue_vue_type_style_index_0_lang-d6d2ed7f.js";import{u as a}from"./vue-router-29025daf.js";import{F as i,e as c,a2 as u}from"./naive-ui-ddb574dd.js";import{d as l,c as d,L as t,Y as o,o as f,e as x}from"./@vue-f70ab1bd.js";import{_ as g}from"./index-ce5b62d8.js";import"./vuex-cc1858c6.js";import"./vooks-dfdd6eef.js";import"./evtd-b614532e.js";import"./@vicons-fc06a0bb.js";import"./seemly-76b7b838.js";import"./vueuc-804c4158.js";import"./@css-render-66126308.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";import"./axios-707ed124.js";/* empty css */const v=l({__name:"404",setup(h){const e=a(),_=()=>{e.push({path:"/"})};return(k,w)=>{const n=s,p=c,r=u,m=i;return f(),d("div",null,[t(n,{title:"404"}),t(m,{class:"main-content-wrap wrap404",bordered:""},{default:o(()=>[t(r,{status:"404",title:"404 资源不存在",description:"再看看其他的吧"},{footer:o(()=>[t(p,{onClick:_},{default:o(()=>[x("回主页")]),_:1})]),_:1})]),_:1})])}}});const K=g(v,[["__scopeId","data-v-e62daa85"]]);export{K as default};
|
import{_ as s}from"./main-nav.vue_vue_type_style_index_0_lang-5f0e81a4.js";import{u as a}from"./vue-router-29025daf.js";import{F as i,e as c,a2 as u}from"./naive-ui-ddb574dd.js";import{d as l,c as d,L as t,Y as o,o as f,e as x}from"./@vue-f70ab1bd.js";import{_ as g}from"./index-f6017bc3.js";import"./vuex-cc1858c6.js";import"./vooks-dfdd6eef.js";import"./evtd-b614532e.js";import"./@vicons-2f3cb6b9.js";import"./seemly-76b7b838.js";import"./vueuc-804c4158.js";import"./@css-render-66126308.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";import"./axios-707ed124.js";/* empty css */const v=l({__name:"404",setup(h){const e=a(),_=()=>{e.push({path:"/"})};return(k,w)=>{const n=s,p=c,r=u,m=i;return f(),d("div",null,[t(n,{title:"404"}),t(m,{class:"main-content-wrap wrap404",bordered:""},{default:o(()=>[t(r,{status:"404",title:"404 资源不存在",description:"再看看其他的吧"},{footer:o(()=>[t(p,{onClick:_},{default:o(()=>[x("回主页")]),_:1})]),_:1})]),_:1})])}}});const K=g(v,[["__scopeId","data-v-e62daa85"]]);export{K as default};
|
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
|||||||
import{_ as F}from"./post-skeleton-a5bf805a.js";import{_ as N}from"./main-nav.vue_vue_type_style_index_0_lang-d6d2ed7f.js";import{u as z}from"./vuex-cc1858c6.js";import{b as A}from"./vue-router-29025daf.js";import{a as R}from"./formatTime-936c40eb.js";import{d as S,r as n,j as V,c as o,L as a,Y as p,o as e,U as u,O as l,F as I,$ as L,K as M,a as s,M as _,a1 as O}from"./@vue-f70ab1bd.js";import{F as P,G as U,I as $,H as j}from"./naive-ui-ddb574dd.js";import{_ as q}from"./index-ce5b62d8.js";import"./vooks-dfdd6eef.js";import"./evtd-b614532e.js";import"./@vicons-fc06a0bb.js";import"./moment-b7869f98.js";import"./seemly-76b7b838.js";import"./vueuc-804c4158.js";import"./@css-render-66126308.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";import"./axios-707ed124.js";/* empty css */const D={key:0,class:"pagination-wrap"},E={key:0,class:"skeleton-wrap"},G={key:1},H={key:0,class:"empty-wrap"},K={class:"bill-line"},T=S({__name:"Anouncement",setup(Y){const d=z(),g=A(),v=n(!1),r=n([]),i=n(+g.query.p||1),f=n(20),c=n(0),h=m=>{i.value=m};return V(()=>{}),(m,J)=>{const y=N,k=U,x=F,w=$,B=j,C=P;return e(),o("div",null,[a(y,{title:"公告"}),a(C,{class:"main-content-wrap",bordered:""},{footer:p(()=>[c.value>1?(e(),o("div",D,[a(k,{page:i.value,"onUpdate:page":h,"page-slot":u(d).state.collapsedRight?5:8,"page-count":c.value},null,8,["page","page-slot","page-count"])])):l("",!0)]),default:p(()=>[v.value?(e(),o("div",E,[a(x,{num:f.value},null,8,["num"])])):(e(),o("div",G,[r.value.length===0?(e(),o("div",H,[a(w,{size:"large",description:"暂无数据"})])):l("",!0),(e(!0),o(I,null,L(r.value,t=>(e(),M(B,{key:t.id},{default:p(()=>[s("div",K,[s("div",null,"NO."+_(t.id),1),s("div",null,_(t.reason),1),s("div",{class:O({income:t.change_amount>=0,out:t.change_amount<0})},_((t.change_amount>0?"+":"")+(t.change_amount/100).toFixed(2)),3),s("div",null,_(u(R)(t.created_on)),1)])]),_:2},1024))),128))]))]),_:1})])}}});const kt=q(T,[["__scopeId","data-v-d4d04859"]]);export{kt as default};
|
import{_ as F}from"./post-skeleton-fdf95824.js";import{_ as N}from"./main-nav.vue_vue_type_style_index_0_lang-5f0e81a4.js";import{u as z}from"./vuex-cc1858c6.js";import{b as A}from"./vue-router-29025daf.js";import{a as R}from"./formatTime-936c40eb.js";import{d as S,r as n,j as V,c as o,L as a,Y as p,o as e,U as u,O as l,F as I,$ as L,K as M,a as s,M as _,a1 as O}from"./@vue-f70ab1bd.js";import{F as P,G as U,I as $,H as j}from"./naive-ui-ddb574dd.js";import{_ as q}from"./index-f6017bc3.js";import"./vooks-dfdd6eef.js";import"./evtd-b614532e.js";import"./@vicons-2f3cb6b9.js";import"./moment-b7869f98.js";import"./seemly-76b7b838.js";import"./vueuc-804c4158.js";import"./@css-render-66126308.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";import"./axios-707ed124.js";/* empty css */const D={key:0,class:"pagination-wrap"},E={key:0,class:"skeleton-wrap"},G={key:1},H={key:0,class:"empty-wrap"},K={class:"bill-line"},T=S({__name:"Anouncement",setup(Y){const d=z(),g=A(),v=n(!1),r=n([]),i=n(+g.query.p||1),f=n(20),c=n(0),h=m=>{i.value=m};return V(()=>{}),(m,J)=>{const y=N,k=U,x=F,w=$,B=j,C=P;return e(),o("div",null,[a(y,{title:"公告"}),a(C,{class:"main-content-wrap",bordered:""},{footer:p(()=>[c.value>1?(e(),o("div",D,[a(k,{page:i.value,"onUpdate:page":h,"page-slot":u(d).state.collapsedRight?5:8,"page-count":c.value},null,8,["page","page-slot","page-count"])])):l("",!0)]),default:p(()=>[v.value?(e(),o("div",E,[a(x,{num:f.value},null,8,["num"])])):(e(),o("div",G,[r.value.length===0?(e(),o("div",H,[a(w,{size:"large",description:"暂无数据"})])):l("",!0),(e(!0),o(I,null,L(r.value,t=>(e(),M(B,{key:t.id},{default:p(()=>[s("div",K,[s("div",null,"NO."+_(t.id),1),s("div",null,_(t.reason),1),s("div",{class:O({income:t.change_amount>=0,out:t.change_amount<0})},_((t.change_amount>0?"+":"")+(t.change_amount/100).toFixed(2)),3),s("div",null,_(u(R)(t.created_on)),1)])]),_:2},1024))),128))]))]),_:1})])}}});const kt=q(T,[["__scopeId","data-v-d4d04859"]]);export{kt as default};
|
@ -0,0 +1 @@
|
|||||||
|
import{_ as z}from"./post-item.vue_vue_type_style_index_0_lang-c48fe5cf.js";import{_ as B}from"./post-skeleton-fdf95824.js";import{_ as F}from"./main-nav.vue_vue_type_style_index_0_lang-5f0e81a4.js";import{u as P}from"./vuex-cc1858c6.js";import{b as R,u as $}from"./vue-router-29025daf.js";import{G as b,_ as G}from"./index-f6017bc3.js";import{d as I,r as s,j as L,c as e,L as n,Y as m,U as M,O as u,o as t,F as N,$ as S,K as U}from"./@vue-f70ab1bd.js";import{F as V,G as j,I as q,H as E}from"./naive-ui-ddb574dd.js";import"./content-0b348d1e.js";import"./@vicons-2f3cb6b9.js";import"./nonesir-video-29a967e9.js";import"./formatTime-936c40eb.js";import"./moment-b7869f98.js";import"./vooks-dfdd6eef.js";import"./evtd-b614532e.js";import"./axios-707ed124.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-804c4158.js";import"./@css-render-66126308.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";const H={key:0,class:"skeleton-wrap"},K={key:1},O={key:0,class:"empty-wrap"},T={key:0,class:"pagination-wrap"},Y=I({__name:"Collection",setup(A){const d=P(),g=R();$();const a=s(!1),_=s([]),p=s(+g.query.p||1),i=s(20),r=s(0),l=()=>{a.value=!0,b({page:p.value,page_size:i.value}).then(o=>{a.value=!1,_.value=o.list,r.value=Math.ceil(o.pager.total_rows/i.value),window.scrollTo(0,0)}).catch(o=>{a.value=!1})},v=o=>{p.value=o,l()};return L(()=>{l()}),(o,D)=>{const f=F,h=B,k=q,y=z,w=E,C=V,x=j;return t(),e("div",null,[n(f,{title:"收藏"}),n(C,{class:"main-content-wrap",bordered:""},{default:m(()=>[a.value?(t(),e("div",H,[n(h,{num:i.value},null,8,["num"])])):(t(),e("div",K,[_.value.length===0?(t(),e("div",O,[n(k,{size:"large",description:"暂无数据"})])):u("",!0),(t(!0),e(N,null,S(_.value,c=>(t(),U(w,{key:c.id},{default:m(()=>[n(y,{post:c},null,8,["post"])]),_:2},1024))),128))]))]),_:1}),r.value>0?(t(),e("div",T,[n(x,{page:p.value,"onUpdate:page":v,"page-slot":M(d).state.collapsedRight?5:8,"page-count":r.value},null,8,["page","page-slot","page-count"])])):u("",!0)])}}});const xt=G(Y,[["__scopeId","data-v-1e709369"]]);export{xt as default};
|
@ -1 +0,0 @@
|
|||||||
import{_ as z}from"./post-item.vue_vue_type_style_index_0_lang-02b1501b.js";import{_ as B}from"./post-skeleton-a5bf805a.js";import{_ as F}from"./main-nav.vue_vue_type_style_index_0_lang-d6d2ed7f.js";import{u as P}from"./vuex-cc1858c6.js";import{b as R,u as $}from"./vue-router-29025daf.js";import{D as b,_ as I}from"./index-ce5b62d8.js";import{d as L,r as s,j as M,c as e,L as n,Y as m,U as N,O as u,o as t,F as S,$ as U,K as V}from"./@vue-f70ab1bd.js";import{F as j,G as q,I as D,H as E}from"./naive-ui-ddb574dd.js";import"./content-16569a30.js";import"./@vicons-fc06a0bb.js";import"./nonesir-video-29a967e9.js";import"./formatTime-936c40eb.js";import"./moment-b7869f98.js";import"./vooks-dfdd6eef.js";import"./evtd-b614532e.js";import"./axios-707ed124.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-804c4158.js";import"./@css-render-66126308.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";const G={key:0,class:"skeleton-wrap"},H={key:1},K={key:0,class:"empty-wrap"},O={key:0,class:"pagination-wrap"},T=L({__name:"Collection",setup(Y){const d=P(),g=R();$();const a=s(!1),_=s([]),p=s(+g.query.p||1),i=s(20),r=s(0),l=()=>{a.value=!0,b({page:p.value,page_size:i.value}).then(o=>{a.value=!1,_.value=o.list,r.value=Math.ceil(o.pager.total_rows/i.value),window.scrollTo(0,0)}).catch(o=>{a.value=!1})},v=o=>{p.value=o,l()};return M(()=>{l()}),(o,A)=>{const f=F,h=B,k=D,y=z,w=E,C=j,x=q;return t(),e("div",null,[n(f,{title:"收藏"}),n(C,{class:"main-content-wrap",bordered:""},{default:m(()=>[a.value?(t(),e("div",G,[n(h,{num:i.value},null,8,["num"])])):(t(),e("div",H,[_.value.length===0?(t(),e("div",K,[n(k,{size:"large",description:"暂无数据"})])):u("",!0),(t(!0),e(S,null,U(_.value,c=>(t(),V(w,{key:c.id},{default:m(()=>[n(y,{post:c},null,8,["post"])]),_:2},1024))),128))]))]),_:1}),r.value>0?(t(),e("div",O,[n(x,{page:p.value,"onUpdate:page":v,"page-slot":N(d).state.collapsedRight?5:8,"page-count":r.value},null,8,["page","page-slot","page-count"])])):u("",!0)])}}});const xt=I(T,[["__scopeId","data-v-1e709369"]]);export{xt as default};
|
|
@ -0,0 +1 @@
|
|||||||
|
import{u as M,b as N}from"./vue-router-29025daf.js";import{d as b,o as t,c as n,a as s,L as a,M as v,r as i,j as P,Y as h,U as R,O as y,F as k,$ as S,K as V}from"./@vue-f70ab1bd.js";import{o as q,F as D,G as L,I as T,H as j}from"./naive-ui-ddb574dd.js";import{_ as C,J as E}from"./index-f6017bc3.js";import{_ as G}from"./post-skeleton-fdf95824.js";import{_ as H}from"./main-nav.vue_vue_type_style_index_0_lang-5f0e81a4.js";import{u as J}from"./vuex-cc1858c6.js";import"./seemly-76b7b838.js";import"./vueuc-804c4158.js";import"./evtd-b614532e.js";import"./@css-render-66126308.js";import"./vooks-dfdd6eef.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";import"./axios-707ed124.js";import"./@vicons-2f3cb6b9.js";/* empty css */const K={class:"avatar"},O={class:"base-info"},Y={class:"username"},A={class:"uid"},Q=b({__name:"contact-item",props:{contact:null},setup(c){const p=M(),m=e=>{p.push({name:"user",query:{username:e}})};return(e,o)=>{const _=q;return t(),n("div",{class:"contact-item",onClick:o[0]||(o[0]=l=>m(c.contact.username))},[s("div",K,[a(_,{size:"large",src:c.contact.avatar},null,8,["src"])]),s("div",O,[s("div",Y,[s("strong",null,v(c.contact.nickname),1),s("span",null," @"+v(c.contact.username),1)]),s("div",A,"UID. "+v(c.contact.user_id),1)])])}}});const W=C(Q,[["__scopeId","data-v-08ee9b2e"]]),X={key:0,class:"skeleton-wrap"},Z={key:1},tt={key:0,class:"empty-wrap"},et={key:0,class:"pagination-wrap"},ot=b({__name:"Contacts",setup(c){const p=J(),m=N(),e=i(!1),o=i([]),_=i(+m.query.p||1),l=i(20),d=i(0),$=r=>{_.value=r,g()};P(()=>{g()});const g=(r=!1)=>{o.value.length===0&&(e.value=!0),E({page:_.value,page_size:l.value}).then(u=>{e.value=!1,o.value=u.list,d.value=Math.ceil(u.pager.total_rows/l.value),r&&setTimeout(()=>{window.scrollTo(0,99999)},50)}).catch(u=>{e.value=!1})};return(r,u)=>{const w=H,x=G,I=T,z=W,B=j,U=D,F=L;return t(),n(k,null,[s("div",null,[a(w,{title:"好友"}),a(U,{class:"main-content-wrap",bordered:""},{default:h(()=>[e.value?(t(),n("div",X,[a(x,{num:l.value},null,8,["num"])])):(t(),n("div",Z,[o.value.length===0?(t(),n("div",tt,[a(I,{size:"large",description:"暂无数据"})])):y("",!0),(t(!0),n(k,null,S(o.value,f=>(t(),V(B,{key:f.user_id},{default:h(()=>[a(z,{contact:f},null,8,["contact"])]),_:2},1024))),128))]))]),_:1})]),d.value>0?(t(),n("div",et,[a(F,{page:_.value,"onUpdate:page":$,"page-slot":R(p).state.collapsedRight?5:8,"page-count":d.value},null,8,["page","page-slot","page-count"])])):y("",!0)],64)}}});const It=C(ot,[["__scopeId","data-v-3b2bf978"]]);export{It as default};
|
@ -1 +0,0 @@
|
|||||||
import{u as M,b as N}from"./vue-router-29025daf.js";import{d as b,o as t,c as n,a as s,L as a,M as v,r as i,j as P,Y as h,U as R,O as y,F as k,$ as S,K as V}from"./@vue-f70ab1bd.js";import{o as q,F as D,G,I as L,H as T}from"./naive-ui-ddb574dd.js";import{_ as C,G as j}from"./index-ce5b62d8.js";import{_ as E}from"./post-skeleton-a5bf805a.js";import{_ as H}from"./main-nav.vue_vue_type_style_index_0_lang-d6d2ed7f.js";import{u as K}from"./vuex-cc1858c6.js";import"./seemly-76b7b838.js";import"./vueuc-804c4158.js";import"./evtd-b614532e.js";import"./@css-render-66126308.js";import"./vooks-dfdd6eef.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";import"./axios-707ed124.js";import"./@vicons-fc06a0bb.js";/* empty css */const O={class:"avatar"},Y={class:"base-info"},A={class:"username"},J={class:"uid"},Q=b({__name:"contact-item",props:{contact:null},setup(c){const p=M(),m=e=>{p.push({name:"user",query:{username:e}})};return(e,o)=>{const _=q;return t(),n("div",{class:"contact-item",onClick:o[0]||(o[0]=l=>m(c.contact.username))},[s("div",O,[a(_,{size:"large",src:c.contact.avatar},null,8,["src"])]),s("div",Y,[s("div",A,[s("strong",null,v(c.contact.nickname),1),s("span",null," @"+v(c.contact.username),1)]),s("div",J,"UID. "+v(c.contact.user_id),1)])])}}});const W=C(Q,[["__scopeId","data-v-08ee9b2e"]]),X={key:0,class:"skeleton-wrap"},Z={key:1},tt={key:0,class:"empty-wrap"},et={key:0,class:"pagination-wrap"},ot=b({__name:"Contacts",setup(c){const p=K(),m=N(),e=i(!1),o=i([]),_=i(+m.query.p||1),l=i(20),d=i(0),$=r=>{_.value=r,g()};P(()=>{g()});const g=(r=!1)=>{o.value.length===0&&(e.value=!0),j({page:_.value,page_size:l.value}).then(u=>{e.value=!1,o.value=u.list,d.value=Math.ceil(u.pager.total_rows/l.value),r&&setTimeout(()=>{window.scrollTo(0,99999)},50)}).catch(u=>{e.value=!1})};return(r,u)=>{const w=H,x=E,I=L,z=W,B=T,U=D,F=G;return t(),n(k,null,[s("div",null,[a(w,{title:"好友"}),a(U,{class:"main-content-wrap",bordered:""},{default:h(()=>[e.value?(t(),n("div",X,[a(x,{num:l.value},null,8,["num"])])):(t(),n("div",Z,[o.value.length===0?(t(),n("div",tt,[a(I,{size:"large",description:"暂无数据"})])):y("",!0),(t(!0),n(k,null,S(o.value,f=>(t(),V(B,{key:f.user_id},{default:h(()=>[a(z,{contact:f},null,8,["contact"])]),_:2},1024))),128))]))]),_:1})]),d.value>0?(t(),n("div",et,[a(F,{page:_.value,"onUpdate:page":$,"page-slot":R(p).state.collapsedRight?5:8,"page-count":d.value},null,8,["page","page-slot","page-count"])])):y("",!0)],64)}}});const It=C(ot,[["__scopeId","data-v-3b2bf978"]]);export{It as default};
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
|||||||
import{_ as F}from"./post-item.vue_vue_type_style_index_0_lang-02b1501b.js";import{_ as M}from"./post-skeleton-a5bf805a.js";import{_ as N}from"./main-nav.vue_vue_type_style_index_0_lang-d6d2ed7f.js";import{u as S}from"./vuex-cc1858c6.js";import{b as V}from"./vue-router-29025daf.js";import{r as D,_ as L}from"./index-ce5b62d8.js";import{d as R,r,j,c as a,L as e,U as _,K as h,Y as m,O as d,o as t,a as s,M as f,F as q,$ as E}from"./@vue-f70ab1bd.js";import{F as G,G as H,o as K,f as O,g as T,I as Y,H as A}from"./naive-ui-ddb574dd.js";import"./content-16569a30.js";import"./@vicons-fc06a0bb.js";import"./nonesir-video-29a967e9.js";import"./formatTime-936c40eb.js";import"./moment-b7869f98.js";import"./vooks-dfdd6eef.js";import"./evtd-b614532e.js";import"./axios-707ed124.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-804c4158.js";import"./@css-render-66126308.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";const J={class:"profile-baseinfo"},Q={class:"avatar"},W={class:"base-info"},X={class:"username"},Z={class:"uid"},ee={key:0,class:"skeleton-wrap"},te={key:1},oe={key:0,class:"empty-wrap"},se={key:1,class:"pagination-wrap"},ne=R({__name:"Profile",setup(ae){const o=S(),k=V(),i=r(!1),p=r([]),l=r(+k.query.p||1),c=r(20),u=r(0),g=()=>{i.value=!0,D({username:o.state.userInfo.username,page:l.value,page_size:c.value}).then(n=>{i.value=!1,p.value=n.list,u.value=Math.ceil(n.pager.total_rows/c.value),window.scrollTo(0,0)}).catch(n=>{i.value=!1})},y=n=>{l.value=n,g()};return j(()=>{g()}),(n,_e)=>{const w=N,I=K,b=O,P=T,x=M,z=Y,B=F,U=A,$=G,C=H;return t(),a("div",null,[e(w,{title:"主页"}),_(o).state.userInfo.id>0?(t(),h($,{key:0,class:"main-content-wrap profile-wrap",bordered:""},{default:m(()=>[s("div",J,[s("div",Q,[e(I,{size:"large",src:_(o).state.userInfo.avatar},null,8,["src"])]),s("div",W,[s("div",X,[s("strong",null,f(_(o).state.userInfo.nickname),1),s("span",null," @"+f(_(o).state.userInfo.username),1)]),s("div",Z,"UID. "+f(_(o).state.userInfo.id),1)])]),e(P,{class:"profile-tabs-wrap",animated:""},{default:m(()=>[e(b,{name:"post",tab:"泡泡"})]),_:1}),i.value?(t(),a("div",ee,[e(x,{num:c.value},null,8,["num"])])):(t(),a("div",te,[p.value.length===0?(t(),a("div",oe,[e(z,{size:"large",description:"暂无数据"})])):d("",!0),(t(!0),a(q,null,E(p.value,v=>(t(),h(U,{key:v.id},{default:m(()=>[e(B,{post:v},null,8,["post"])]),_:2},1024))),128))]))]),_:1})):d("",!0),u.value>0?(t(),a("div",se,[e(C,{page:l.value,"onUpdate:page":y,"page-slot":_(o).state.collapsedRight?5:8,"page-count":u.value},null,8,["page","page-slot","page-count"])])):d("",!0)])}}});const Ve=L(ne,[["__scopeId","data-v-1d87d974"]]);export{Ve as default};
|
import{_ as F}from"./post-item.vue_vue_type_style_index_0_lang-c48fe5cf.js";import{_ as M}from"./post-skeleton-fdf95824.js";import{_ as N}from"./main-nav.vue_vue_type_style_index_0_lang-5f0e81a4.js";import{u as S}from"./vuex-cc1858c6.js";import{b as V}from"./vue-router-29025daf.js";import{w as D,_ as L}from"./index-f6017bc3.js";import{d as R,r,j,c as a,L as e,U as _,K as h,Y as m,O as d,o as t,a as s,M as f,F as q,$ as E}from"./@vue-f70ab1bd.js";import{F as G,G as H,o as K,f as O,g as T,I as Y,H as A}from"./naive-ui-ddb574dd.js";import"./content-0b348d1e.js";import"./@vicons-2f3cb6b9.js";import"./nonesir-video-29a967e9.js";import"./formatTime-936c40eb.js";import"./moment-b7869f98.js";import"./vooks-dfdd6eef.js";import"./evtd-b614532e.js";import"./axios-707ed124.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-804c4158.js";import"./@css-render-66126308.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";const J={class:"profile-baseinfo"},Q={class:"avatar"},W={class:"base-info"},X={class:"username"},Z={class:"uid"},ee={key:0,class:"skeleton-wrap"},te={key:1},oe={key:0,class:"empty-wrap"},se={key:1,class:"pagination-wrap"},ne=R({__name:"Profile",setup(ae){const o=S(),k=V(),i=r(!1),p=r([]),l=r(+k.query.p||1),c=r(20),u=r(0),g=()=>{i.value=!0,D({username:o.state.userInfo.username,page:l.value,page_size:c.value}).then(n=>{i.value=!1,p.value=n.list,u.value=Math.ceil(n.pager.total_rows/c.value),window.scrollTo(0,0)}).catch(n=>{i.value=!1})},y=n=>{l.value=n,g()};return j(()=>{g()}),(n,_e)=>{const w=N,I=K,b=O,P=T,x=M,z=Y,B=F,U=A,$=G,C=H;return t(),a("div",null,[e(w,{title:"主页"}),_(o).state.userInfo.id>0?(t(),h($,{key:0,class:"main-content-wrap profile-wrap",bordered:""},{default:m(()=>[s("div",J,[s("div",Q,[e(I,{size:"large",src:_(o).state.userInfo.avatar},null,8,["src"])]),s("div",W,[s("div",X,[s("strong",null,f(_(o).state.userInfo.nickname),1),s("span",null," @"+f(_(o).state.userInfo.username),1)]),s("div",Z,"UID. "+f(_(o).state.userInfo.id),1)])]),e(P,{class:"profile-tabs-wrap",animated:""},{default:m(()=>[e(b,{name:"post",tab:"泡泡"})]),_:1}),i.value?(t(),a("div",ee,[e(x,{num:c.value},null,8,["num"])])):(t(),a("div",te,[p.value.length===0?(t(),a("div",oe,[e(z,{size:"large",description:"暂无数据"})])):d("",!0),(t(!0),a(q,null,E(p.value,v=>(t(),h(U,{key:v.id},{default:m(()=>[e(B,{post:v},null,8,["post"])]),_:2},1024))),128))]))]),_:1})):d("",!0),u.value>0?(t(),a("div",se,[e(C,{page:l.value,"onUpdate:page":y,"page-slot":_(o).state.collapsedRight?5:8,"page-count":u.value},null,8,["page","page-slot","page-count"])])):d("",!0)])}}});const Ve=L(ne,[["__scopeId","data-v-1d87d974"]]);export{Ve as default};
|
File diff suppressed because one or more lines are too long
@ -1 +0,0 @@
|
|||||||
.tags-wrap[data-v-c1908b4e]{padding:20px}.tags-wrap .tag-item .tag-hot[data-v-c1908b4e]{margin-left:12px;font-size:12px;opacity:.75}.dark .tags-wrap[data-v-c1908b4e]{background-color:#101014bf}
|
|
@ -0,0 +1 @@
|
|||||||
|
import{q as x,u as S,r as I,t as U,_ as j}from"./index-f6017bc3.js";import{l as z}from"./@vicons-2f3cb6b9.js";import{d as F,r as _,n as $,j as q,_ as E,o as l,c as u,L as n,Y as a,K as T,e as A,M as w,O as m,U as r,w as D,a3 as K,F as Y,$ as G}from"./@vue-f70ab1bd.js";import{o as H,M as L,j as J,e as P,O as Q,L as R,F as W,f as X,g as Z,a as tt,k as et}from"./naive-ui-ddb574dd.js";import{_ as ot}from"./main-nav.vue_vue_type_style_index_0_lang-5f0e81a4.js";import{u as nt}from"./vuex-cc1858c6.js";import"./vue-router-29025daf.js";import"./axios-707ed124.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-804c4158.js";import"./evtd-b614532e.js";import"./@css-render-66126308.js";import"./vooks-dfdd6eef.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";const st={key:0,class:"tag-item"},at={key:0,class:"tag-quote"},ct={key:1,class:"tag-quote tag-follow"},lt={key:0,class:"options"},it=F({__name:"tag-item",props:{tag:null,showAction:{type:Boolean},checkFollowing:{type:Boolean}},setup(s){const e=s,g=_(!1),d=$(()=>{let o=[];return e.tag.is_following===0?o.push({label:"关注",key:"follow"}):(e.tag.is_top===0?o.push({label:"置顶",key:"stick"}):o.push({label:"取消置顶",key:"unstick"}),o.push({label:"取消关注",key:"unfollow"})),o}),i=o=>{switch(o){case"follow":I({topic_id:e.tag.id}).then(t=>{e.tag.is_following=1,window.$message.success("关注成功")}).catch(t=>{console.log(t)});break;case"unfollow":S({topic_id:e.tag.id}).then(t=>{e.tag.is_following=0,window.$message.success("取消关注")}).catch(t=>{console.log(t)});break;case"stick":x({topic_id:e.tag.id}).then(t=>{e.tag.is_top=t.top_status,window.$message.success("置顶成功")}).catch(t=>{console.log(t)});break;case"unstick":x({topic_id:e.tag.id}).then(t=>{e.tag.is_top=t.top_status,window.$message.success("取消置顶")}).catch(t=>{console.log(t)});break}};return q(()=>{g.value=!1}),(o,t)=>{const k=E("router-link"),f=H,v=L,c=J,h=P,y=Q,p=R;return!s.checkFollowing||s.checkFollowing&&s.tag.is_following===1?(l(),u("div",st,[n(p,null,{header:a(()=>[(l(),T(v,{type:"success",size:"large",round:"",key:s.tag.id},{avatar:a(()=>[n(f,{src:s.tag.user.avatar},null,8,["src"])]),default:a(()=>[n(k,{class:"hash-link",to:{name:"home",query:{q:s.tag.tag,t:"tag"}}},{default:a(()=>[A(" #"+w(s.tag.tag),1)]),_:1},8,["to"]),s.showAction?m("",!0):(l(),u("span",at,"("+w(s.tag.quote_num)+")",1)),s.showAction?(l(),u("span",ct,"("+w(s.tag.quote_num)+")",1)):m("",!0)]),_:1}))]),"header-extra":a(()=>[s.showAction?(l(),u("div",lt,[n(y,{placement:"bottom-end",trigger:"click",size:"small",options:r(d),onSelect:i},{default:a(()=>[n(h,{type:"success",quaternary:"",circle:"",block:""},{icon:a(()=>[n(c,null,{default:a(()=>[n(r(z))]),_:1})]),_:1})]),_:1},8,["options"])])):m("",!0)]),_:1})])):m("",!0)}}});const _t=F({__name:"Topic",setup(s){const e=nt(),g=_([]),d=_("hot"),i=_(!1),o=_(!1),t=_(!1);D(o,()=>{o.value||(window.$message.success("保存成功"),e.commit("refreshTopicFollow"))});const k=$({get:()=>{let c="编辑";return o.value&&(c="保存"),c},set:c=>{}}),f=()=>{i.value=!0,U({type:d.value,num:50}).then(c=>{g.value=c.topics,i.value=!1}).catch(c=>{console.log(c),i.value=!1})},v=c=>{d.value=c,c=="follow"?t.value=!0:t.value=!1,f()};return q(()=>{f()}),(c,h)=>{const y=ot,p=X,B=L,C=Z,V=it,M=tt,N=et,O=W;return l(),u("div",null,[n(y,{title:"话题"}),n(O,{class:"main-content-wrap tags-wrap",bordered:""},{default:a(()=>[n(C,{type:"line",animated:"","onUpdate:value":v},K({default:a(()=>[n(p,{name:"hot",tab:"热门"}),n(p,{name:"new",tab:"最新"}),r(e).state.userLogined?(l(),T(p,{key:0,name:"follow",tab:"关注"})):m("",!0)]),_:2},[r(e).state.userLogined?{name:"suffix",fn:a(()=>[n(B,{checked:o.value,"onUpdate:checked":h[0]||(h[0]=b=>o.value=b),checkable:""},{default:a(()=>[A(w(r(k)),1)]),_:1},8,["checked"])]),key:"0"}:void 0]),1024),n(N,{show:i.value},{default:a(()=>[n(M,null,{default:a(()=>[(l(!0),u(Y,null,G(g.value,b=>(l(),T(V,{tag:b,showAction:r(e).state.userLogined&&o.value,checkFollowing:t.value},null,8,["tag","showAction","checkFollowing"]))),256))]),_:1})]),_:1},8,["show"])]),_:1})])}}});const Vt=j(_t,[["__scopeId","data-v-15794a53"]]);export{Vt as default};
|
@ -0,0 +1 @@
|
|||||||
|
.tag-item .tag-quote{margin-left:12px;font-size:14px;opacity:.75}.tag-item .tag-follow{margin-right:22px}.tag-item .options{margin-left:-32px;margin-bottom:4px;opacity:.55}.tag-item .n-thing .n-thing-header{margin-bottom:0}.tag-item .n-thing .n-thing-avatar-header-wrapper{align-items:center}.tags-wrap[data-v-15794a53]{padding:20px}.dark .tags-wrap[data-v-15794a53]{background-color:#101014bf}
|
@ -1 +0,0 @@
|
|||||||
import{_ as T}from"./main-nav.vue_vue_type_style_index_0_lang-d6d2ed7f.js";import{q as w,_ as x}from"./index-ce5b62d8.js";import{d as q,r as s,j as B,c as i,L as t,Y as o,o as _,F as C,$ as F,_ as M,K as N,e as V,M as l,a as L}from"./@vue-f70ab1bd.js";import{F as $,f as j,g as D,a as E,k as I,o as K,M as S}from"./naive-ui-ddb574dd.js";import"./vuex-cc1858c6.js";import"./vue-router-29025daf.js";import"./vooks-dfdd6eef.js";import"./evtd-b614532e.js";import"./@vicons-fc06a0bb.js";import"./axios-707ed124.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-804c4158.js";import"./@css-render-66126308.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";const U={class:"tag-hot"},Y=q({__name:"Topic",setup(z){const p=s([]),c=s("hot"),a=s(!1),r=()=>{a.value=!0,w({type:c.value,num:50}).then(n=>{p.value=n.topics,a.value=!1}).catch(n=>{a.value=!1})},u=n=>{c.value=n,r()};return B(()=>{r()}),(n,A)=>{const d=T,m=j,g=D,f=M("router-link"),v=K,h=S,y=E,b=I,k=$;return _(),i("div",null,[t(d,{title:"话题"}),t(k,{class:"main-content-wrap tags-wrap",bordered:""},{default:o(()=>[t(g,{type:"line",animated:"","onUpdate:value":u},{default:o(()=>[t(m,{name:"hot",tab:"热门"}),t(m,{name:"new",tab:"最新"})]),_:1}),t(b,{show:a.value},{default:o(()=>[t(y,null,{default:o(()=>[(_(!0),i(C,null,F(p.value,e=>(_(),N(h,{class:"tag-item",type:"success",round:"",key:e.id},{avatar:o(()=>[t(v,{src:e.user.avatar},null,8,["src"])]),default:o(()=>[t(f,{class:"hash-link",to:{name:"home",query:{q:e.tag,t:"tag"}}},{default:o(()=>[V(" #"+l(e.tag),1)]),_:2},1032,["to"]),L("span",U,"("+l(e.quote_num)+")",1)]),_:2},1024))),128))]),_:1})]),_:1},8,["show"])]),_:1})])}}});const lt=x(Y,[["__scopeId","data-v-c1908b4e"]]);export{lt as default};
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@
|
|||||||
|
.auth-wrap[data-v-52205ad0]{margin-top:-30px}.dark .auth-wrap[data-v-52205ad0]{background-color:#101014bf}.rightbar-wrap[data-v-200967dd]{width:240px;position:fixed;left:calc(50% + var(--content-main) / 2 + 10px)}.rightbar-wrap .search-wrap[data-v-200967dd]{margin:12px 0}.rightbar-wrap .hot-tag-item[data-v-200967dd]{line-height:2;position:relative}.rightbar-wrap .hot-tag-item .hash-link[data-v-200967dd]{width:calc(100% - 60px);text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block}.rightbar-wrap .hot-tag-item .post-num[data-v-200967dd]{position:absolute;right:0;top:0;width:60px;text-align:right;line-height:2;opacity:.5}.rightbar-wrap .hottopic-wrap[data-v-200967dd]{margin-bottom:10px}.rightbar-wrap .copyright-wrap .copyright[data-v-200967dd]{font-size:12px;opacity:.75}.rightbar-wrap .copyright-wrap .hash-link[data-v-200967dd]{font-size:12px}.dark .hottopic-wrap[data-v-200967dd],.dark .copyright-wrap[data-v-200967dd]{background-color:#18181c}.sidebar-wrap{z-index:99;width:200px;height:100vh;position:fixed;right:calc(50% + var(--content-main) / 2 + 10px);padding:12px 0;box-sizing:border-box}.sidebar-wrap .n-menu .n-menu-item-content:before{border-radius:21px}.logo-wrap{display:flex;justify-content:flex-start;margin-bottom:12px}.logo-wrap .logo-img{margin-left:24px}.logo-wrap .logo-img:hover{cursor:pointer}.user-wrap{display:flex;align-items:center;position:absolute;bottom:12px;left:12px;right:12px}.user-wrap .user-mini-wrap{display:none}.user-wrap .user-avatar{margin-right:8px}.user-wrap .user-info{display:flex;flex-direction:column}.user-wrap .user-info .nickname{font-size:16px;font-weight:700;line-height:16px;height:16px;margin-bottom:2px;display:flex;align-items:center}.user-wrap .user-info .nickname .nickname-txt{max-width:90px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.user-wrap .user-info .nickname .logout{margin-left:6px}.user-wrap .user-info .username{font-size:14px;line-height:16px;height:16px;width:120px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;opacity:.75}.user-wrap .login-only-wrap{display:flex;justify-content:center;width:100%}.user-wrap .login-only-wrap button{margin:0 4px;width:80%}.user-wrap .login-wrap{display:flex;justify-content:center;width:100%}.user-wrap .login-wrap button{margin:0 4px}.auth-card .n-card-header{z-index:999}@media screen and (max-width: 821px){.sidebar-wrap{width:200px;right:calc(100% - 200px)}.logo-wrap .logo-img{margin-left:12px!important}.user-wrap .user-avatar,.user-wrap .user-info,.user-wrap .login-only-wrap,.user-wrap .login-wrap{margin-bottom:32px}}:root{--content-main: 544px}.app-container{margin:0}.app-container .app-wrap{width:100%;margin:0 auto}.main-wrap{min-height:100vh;display:flex;flex-direction:row;justify-content:center}.main-wrap .content-wrap{width:100%;max-width:var(--content-main);position:relative}.main-wrap .main-content-wrap{margin:0;border-top:none;border-radius:0}.main-wrap .main-content-wrap .n-list-item{padding:0}.empty-wrap{min-height:300px;display:flex;align-items:center;justify-content:center}.hash-link,.user-link{color:#18a058;text-decoration:none;cursor:pointer}.hash-link:hover,.user-link:hover{opacity:.8}.beian-link{color:#333;text-decoration:none}.beian-link:hover{opacity:.75}.username-link{color:#000;color:none;text-decoration:none;cursor:pointer}.username-link:hover{text-decoration:underline}.dark .hash-link,.dark .user-link{color:#63e2b7}.dark .username-link{color:#eee}.dark .beian-link{color:#ddd}@media screen and (max-width: 821px){.content-wrap{top:0;position:absolute!important}}
|
@ -1 +0,0 @@
|
|||||||
.auth-wrap[data-v-52205ad0]{margin-top:-30px}.dark .auth-wrap[data-v-52205ad0]{background-color:#101014bf}.rightbar-wrap[data-v-9c65d923]{width:240px;position:fixed;left:calc(50% + var(--content-main) / 2 + 10px)}.rightbar-wrap .search-wrap[data-v-9c65d923]{margin:12px 0}.rightbar-wrap .hot-tag-item[data-v-9c65d923]{line-height:2;position:relative}.rightbar-wrap .hot-tag-item .hash-link[data-v-9c65d923]{width:calc(100% - 60px);text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block}.rightbar-wrap .hot-tag-item .post-num[data-v-9c65d923]{position:absolute;right:0;top:0;width:60px;text-align:right;line-height:2;opacity:.5}.rightbar-wrap .copyright-wrap[data-v-9c65d923]{margin-top:10px}.rightbar-wrap .copyright-wrap .copyright[data-v-9c65d923]{font-size:12px;opacity:.75}.rightbar-wrap .copyright-wrap .hash-link[data-v-9c65d923]{font-size:12px}.dark .hottopic-wrap[data-v-9c65d923],.dark .copyright-wrap[data-v-9c65d923]{background-color:#18181c}.sidebar-wrap{z-index:99;width:200px;height:100vh;position:fixed;right:calc(50% + var(--content-main) / 2 + 10px);padding:12px 0;box-sizing:border-box}.sidebar-wrap .n-menu .n-menu-item-content:before{border-radius:21px}.logo-wrap{display:flex;justify-content:flex-start;margin-bottom:12px}.logo-wrap .logo-img{margin-left:24px}.logo-wrap .logo-img:hover{cursor:pointer}.user-wrap{display:flex;align-items:center;position:absolute;bottom:12px;left:12px;right:12px}.user-wrap .user-mini-wrap{display:none}.user-wrap .user-avatar{margin-right:8px}.user-wrap .user-info{display:flex;flex-direction:column}.user-wrap .user-info .nickname{font-size:16px;font-weight:700;line-height:16px;height:16px;margin-bottom:2px;display:flex;align-items:center}.user-wrap .user-info .nickname .nickname-txt{max-width:90px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.user-wrap .user-info .nickname .logout{margin-left:6px}.user-wrap .user-info .username{font-size:14px;line-height:16px;height:16px;width:120px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;opacity:.75}.user-wrap .login-only-wrap{display:flex;justify-content:center;width:100%}.user-wrap .login-only-wrap button{margin:0 4px;width:80%}.user-wrap .login-wrap{display:flex;justify-content:center;width:100%}.user-wrap .login-wrap button{margin:0 4px}.auth-card .n-card-header{z-index:999}@media screen and (max-width: 821px){.sidebar-wrap{width:200px;right:calc(100% - 200px)}.logo-wrap .logo-img{margin-left:12px!important}.user-wrap .user-avatar,.user-wrap .user-info,.user-wrap .login-only-wrap,.user-wrap .login-wrap{margin-bottom:32px}}:root{--content-main: 544px}.app-container{margin:0}.app-container .app-wrap{width:100%;margin:0 auto}.main-wrap{min-height:100vh;display:flex;flex-direction:row;justify-content:center}.main-wrap .content-wrap{width:100%;max-width:var(--content-main);position:relative}.main-wrap .main-content-wrap{margin:0;border-top:none;border-radius:0}.main-wrap .main-content-wrap .n-list-item{padding:0}.empty-wrap{min-height:300px;display:flex;align-items:center;justify-content:center}.hash-link,.user-link{color:#18a058;text-decoration:none;cursor:pointer}.hash-link:hover,.user-link:hover{opacity:.8}.beian-link{color:#333;text-decoration:none}.beian-link:hover{opacity:.75}.username-link{color:#000;color:none;text-decoration:none;cursor:pointer}.username-link:hover{text-decoration:underline}.dark .hash-link,.dark .user-link{color:#63e2b7}.dark .username-link{color:#eee}.dark .beian-link{color:#ddd}@media screen and (max-width: 821px){.content-wrap{top:0;position:absolute!important}}
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
|||||||
import{S as B}from"./index-ce5b62d8.js";import{u as E}from"./vuex-cc1858c6.js";import{u as z}from"./vue-router-29025daf.js";import{j as A}from"./vooks-dfdd6eef.js";import{D as C,t as D,u as N,v as P}from"./@vicons-fc06a0bb.js";import{a3 as x,a4 as R,j as I,e as V,a5 as j,h as H}from"./naive-ui-ddb574dd.js";import{d as L,r as f,j as U,o as a,c as g,U as o,L as e,Y as t,O as c,a as q,K as _,e as F,M as $,F as K}from"./@vue-f70ab1bd.js";const Y={key:0},G={class:"navbar"},oe=L({__name:"main-nav",props:{title:{default:""},back:{type:Boolean,default:!1},theme:{type:Boolean,default:!0}},setup(r){const i=r,n=E(),m=z(),l=f(!1),k=f("left"),u=d=>{d?(localStorage.setItem("PAOPAO_THEME","dark"),n.commit("triggerTheme","dark")):(localStorage.setItem("PAOPAO_THEME","light"),n.commit("triggerTheme","light"))},w=()=>{window.history.length<=1?m.push({path:"/"}):m.go(-1)},v=()=>{l.value=!0};return U(()=>{localStorage.getItem("PAOPAO_THEME")||u(A()==="dark")}),(d,p)=>{const y=B,b=x,O=R,s=I,h=V,M=j,S=H;return a(),g(K,null,[o(n).state.drawerModelShow?(a(),g("div",Y,[e(O,{show:l.value,"onUpdate:show":p[0]||(p[0]=T=>l.value=T),width:212,placement:k.value,resizable:""},{default:t(()=>[e(b,null,{default:t(()=>[e(y)]),_:1})]),_:1},8,["show","placement"])])):c("",!0),e(S,{size:"small",bordered:!0,class:"nav-title-card"},{header:t(()=>[q("div",G,[o(n).state.drawerModelShow&&!r.back?(a(),_(h,{key:0,class:"drawer-btn",onClick:v,quaternary:"",circle:"",size:"medium"},{icon:t(()=>[e(s,null,{default:t(()=>[e(o(C))]),_:1})]),_:1})):c("",!0),r.back?(a(),_(h,{key:1,class:"back-btn",onClick:w,quaternary:"",circle:"",size:"small"},{icon:t(()=>[e(s,null,{default:t(()=>[e(o(D))]),_:1})]),_:1})):c("",!0),F(" "+$(i.title)+" ",1),i.theme?(a(),_(M,{key:2,value:o(n).state.theme==="dark","onUpdate:value":u,size:"small",class:"theme-switch-wrap"},{"checked-icon":t(()=>[e(s,{component:o(N)},null,8,["component"])]),"unchecked-icon":t(()=>[e(s,{component:o(P)},null,8,["component"])]),_:1},8,["value"])):c("",!0)])]),_:1})],64)}}});export{oe as _};
|
import{V as E}from"./index-f6017bc3.js";import{u as S}from"./vuex-cc1858c6.js";import{u as z}from"./vue-router-29025daf.js";import{j as A}from"./vooks-dfdd6eef.js";import{D as C,u as D,v as N,w as P}from"./@vicons-2f3cb6b9.js";import{a3 as x,a4 as R,j as V,e as I,a5 as j,h as H}from"./naive-ui-ddb574dd.js";import{d as L,r as f,j as U,o as a,c as g,U as o,L as e,Y as t,O as c,a as q,K as _,e as F,M as $,F as K}from"./@vue-f70ab1bd.js";const Y={key:0},G={class:"navbar"},oe=L({__name:"main-nav",props:{title:{default:""},back:{type:Boolean,default:!1},theme:{type:Boolean,default:!0}},setup(r){const i=r,n=S(),m=z(),l=f(!1),k=f("left"),u=d=>{d?(localStorage.setItem("PAOPAO_THEME","dark"),n.commit("triggerTheme","dark")):(localStorage.setItem("PAOPAO_THEME","light"),n.commit("triggerTheme","light"))},w=()=>{window.history.length<=1?m.push({path:"/"}):m.go(-1)},v=()=>{l.value=!0};return U(()=>{localStorage.getItem("PAOPAO_THEME")||u(A()==="dark")}),(d,p)=>{const y=E,b=x,O=R,s=V,h=I,M=j,T=H;return a(),g(K,null,[o(n).state.drawerModelShow?(a(),g("div",Y,[e(O,{show:l.value,"onUpdate:show":p[0]||(p[0]=B=>l.value=B),width:212,placement:k.value,resizable:""},{default:t(()=>[e(b,null,{default:t(()=>[e(y)]),_:1})]),_:1},8,["show","placement"])])):c("",!0),e(T,{size:"small",bordered:!0,class:"nav-title-card"},{header:t(()=>[q("div",G,[o(n).state.drawerModelShow&&!r.back?(a(),_(h,{key:0,class:"drawer-btn",onClick:v,quaternary:"",circle:"",size:"medium"},{icon:t(()=>[e(s,null,{default:t(()=>[e(o(C))]),_:1})]),_:1})):c("",!0),r.back?(a(),_(h,{key:1,class:"back-btn",onClick:w,quaternary:"",circle:"",size:"small"},{icon:t(()=>[e(s,null,{default:t(()=>[e(o(D))]),_:1})]),_:1})):c("",!0),F(" "+$(i.title)+" ",1),i.theme?(a(),_(M,{key:2,value:o(n).state.theme==="dark","onUpdate:value":u,size:"small",class:"theme-switch-wrap"},{"checked-icon":t(()=>[e(s,{component:o(N)},null,8,["component"])]),"unchecked-icon":t(()=>[e(s,{component:o(P)},null,8,["component"])]),_:1},8,["value"])):c("",!0)])]),_:1})],64)}}});export{oe as _};
|
@ -1 +1 @@
|
|||||||
import{p as N,a as S,_ as $,b as V,c as j}from"./content-16569a30.js";import{d as H,n as R,_ as D,o as i,c as f,L as a,a3 as F,U as t,Y as n,F as I,$ as P,Z as v,a as l,e as r,M as c,K as p,O as _}from"./@vue-f70ab1bd.js";import{u as E}from"./vuex-cc1858c6.js";import{b as K,u as U}from"./vue-router-29025daf.js";import{a as Y}from"./formatTime-936c40eb.js";import{f as Z,h as A,i as G,k as J}from"./@vicons-fc06a0bb.js";import{o as Q,M as W,j as X,a as tt,L as et}from"./naive-ui-ddb574dd.js";const st={class:"nickname-wrap"},nt={class:"username-wrap"},ot={class:"timestamp"},at=["innerHTML"],it={class:"opt-item"},rt={class:"opt-item"},ct={class:"opt-item"},pt={class:"opt-item"},ft=H({__name:"post-item",props:{post:null},setup(x){const C=x;K();const d=U(),z=E(),e=R(()=>{let o=Object.assign({texts:[],imgs:[],videos:[],links:[],attachments:[],charge_attachments:[]},C.post);return o.contents.map(s=>{(+s.type==1||+s.type==2)&&o.texts.push(s),+s.type==3&&o.imgs.push(s),+s.type==4&&o.videos.push(s),+s.type==6&&o.links.push(s),+s.type==7&&o.attachments.push(s),+s.type==8&&o.charge_attachments.push(s)}),o}),k=o=>{d.push({name:"post",query:{id:o}})},b=(o,s)=>{if(o.target.dataset.detail){const m=o.target.dataset.detail.split(":");if(m.length===2){z.commit("refresh"),m[0]==="tag"?d.push({name:"home",query:{q:m[1],t:"tag"}}):d.push({name:"user",query:{username:m[1]}});return}}k(s)};return(o,s)=>{const m=Q,w=D("router-link"),h=W,y=S,O=$,T=V,q=j,u=X,B=tt,L=et;return i(),f("div",{class:"post-item",onClick:s[2]||(s[2]=g=>k(t(e).id))},[a(L,{"content-indented":""},F({avatar:n(()=>[a(m,{round:"",size:30,src:t(e).user.avatar},null,8,["src"])]),header:n(()=>[l("span",st,[a(w,{onClick:s[0]||(s[0]=v(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{username:t(e).user.username}}},{default:n(()=>[r(c(t(e).user.nickname),1)]),_:1},8,["to"])]),l("span",nt," @"+c(t(e).user.username),1),t(e).is_top?(i(),p(h,{key:0,class:"top-tag",type:"warning",size:"small",round:""},{default:n(()=>[r(" 置顶 ")]),_:1})):_("",!0),t(e).visibility==1?(i(),p(h,{key:1,class:"top-tag",type:"error",size:"small",round:""},{default:n(()=>[r(" 私密 ")]),_:1})):_("",!0),t(e).visibility==2?(i(),p(h,{key:2,class:"top-tag",type:"info",size:"small",round:""},{default:n(()=>[r(" 好友可见 ")]),_:1})):_("",!0)]),"header-extra":n(()=>[l("span",ot,c(t(e).ip_loc?t(e).ip_loc+" · ":t(e).ip_loc)+" "+c(t(Y)(t(e).created_on)),1)]),footer:n(()=>[t(e).attachments.length>0?(i(),p(y,{key:0,attachments:t(e).attachments},null,8,["attachments"])):_("",!0),t(e).charge_attachments.length>0?(i(),p(y,{key:1,attachments:t(e).charge_attachments,price:t(e).attachment_price},null,8,["attachments","price"])):_("",!0),t(e).imgs.length>0?(i(),p(O,{key:2,imgs:t(e).imgs},null,8,["imgs"])):_("",!0),t(e).videos.length>0?(i(),p(T,{key:3,videos:t(e).videos},null,8,["videos"])):_("",!0),t(e).links.length>0?(i(),p(q,{key:4,links:t(e).links},null,8,["links"])):_("",!0)]),action:n(()=>[a(B,{justify:"space-between"},{default:n(()=>[l("div",it,[a(u,{size:"18",class:"opt-item-icon"},{default:n(()=>[a(t(Z))]),_:1}),r(" "+c(t(e).upvote_count),1)]),l("div",rt,[a(u,{size:"18",class:"opt-item-icon"},{default:n(()=>[a(t(A))]),_:1}),r(" "+c(t(e).comment_count),1)]),l("div",ct,[a(u,{size:"18",class:"opt-item-icon"},{default:n(()=>[a(t(G))]),_:1}),r(" "+c(t(e).collection_count),1)]),l("div",pt,[a(u,{size:"18",class:"opt-item-icon"},{default:n(()=>[a(t(J))]),_:1}),r(" "+c(t(e).share_count),1)])]),_:1})]),_:2},[t(e).texts.length>0?{name:"description",fn:n(()=>[(i(!0),f(I,null,P(t(e).texts,g=>(i(),f("span",{key:g.id,class:"post-text",onClick:s[1]||(s[1]=v(M=>b(M,t(e).id),["stop"])),innerHTML:t(N)(g.content).content},null,8,at))),128))]),key:"0"}:void 0]),1024)])}}});export{ft as _};
|
import{p as N,a as S,_ as $,b as V,c as j}from"./content-0b348d1e.js";import{d as H,n as R,_ as D,o as i,c as f,L as a,a3 as F,U as t,Y as n,F as I,$ as P,Z as v,a as l,e as r,M as c,K as p,O as _}from"./@vue-f70ab1bd.js";import{u as E}from"./vuex-cc1858c6.js";import{b as K,u as U}from"./vue-router-29025daf.js";import{a as Y}from"./formatTime-936c40eb.js";import{f as Z,h as A,i as G,k as J}from"./@vicons-2f3cb6b9.js";import{o as Q,M as W,j as X,a as tt,L as et}from"./naive-ui-ddb574dd.js";const st={class:"nickname-wrap"},nt={class:"username-wrap"},ot={class:"timestamp"},at=["innerHTML"],it={class:"opt-item"},rt={class:"opt-item"},ct={class:"opt-item"},pt={class:"opt-item"},ft=H({__name:"post-item",props:{post:null},setup(x){const C=x;K();const d=U(),z=E(),e=R(()=>{let o=Object.assign({texts:[],imgs:[],videos:[],links:[],attachments:[],charge_attachments:[]},C.post);return o.contents.map(s=>{(+s.type==1||+s.type==2)&&o.texts.push(s),+s.type==3&&o.imgs.push(s),+s.type==4&&o.videos.push(s),+s.type==6&&o.links.push(s),+s.type==7&&o.attachments.push(s),+s.type==8&&o.charge_attachments.push(s)}),o}),k=o=>{d.push({name:"post",query:{id:o}})},b=(o,s)=>{if(o.target.dataset.detail){const m=o.target.dataset.detail.split(":");if(m.length===2){z.commit("refresh"),m[0]==="tag"?d.push({name:"home",query:{q:m[1],t:"tag"}}):d.push({name:"user",query:{username:m[1]}});return}}k(s)};return(o,s)=>{const m=Q,w=D("router-link"),h=W,y=S,O=$,T=V,q=j,u=X,B=tt,L=et;return i(),f("div",{class:"post-item",onClick:s[2]||(s[2]=g=>k(t(e).id))},[a(L,{"content-indented":""},F({avatar:n(()=>[a(m,{round:"",size:30,src:t(e).user.avatar},null,8,["src"])]),header:n(()=>[l("span",st,[a(w,{onClick:s[0]||(s[0]=v(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{username:t(e).user.username}}},{default:n(()=>[r(c(t(e).user.nickname),1)]),_:1},8,["to"])]),l("span",nt," @"+c(t(e).user.username),1),t(e).is_top?(i(),p(h,{key:0,class:"top-tag",type:"warning",size:"small",round:""},{default:n(()=>[r(" 置顶 ")]),_:1})):_("",!0),t(e).visibility==1?(i(),p(h,{key:1,class:"top-tag",type:"error",size:"small",round:""},{default:n(()=>[r(" 私密 ")]),_:1})):_("",!0),t(e).visibility==2?(i(),p(h,{key:2,class:"top-tag",type:"info",size:"small",round:""},{default:n(()=>[r(" 好友可见 ")]),_:1})):_("",!0)]),"header-extra":n(()=>[l("span",ot,c(t(e).ip_loc?t(e).ip_loc+" · ":t(e).ip_loc)+" "+c(t(Y)(t(e).created_on)),1)]),footer:n(()=>[t(e).attachments.length>0?(i(),p(y,{key:0,attachments:t(e).attachments},null,8,["attachments"])):_("",!0),t(e).charge_attachments.length>0?(i(),p(y,{key:1,attachments:t(e).charge_attachments,price:t(e).attachment_price},null,8,["attachments","price"])):_("",!0),t(e).imgs.length>0?(i(),p(O,{key:2,imgs:t(e).imgs},null,8,["imgs"])):_("",!0),t(e).videos.length>0?(i(),p(T,{key:3,videos:t(e).videos},null,8,["videos"])):_("",!0),t(e).links.length>0?(i(),p(q,{key:4,links:t(e).links},null,8,["links"])):_("",!0)]),action:n(()=>[a(B,{justify:"space-between"},{default:n(()=>[l("div",it,[a(u,{size:"18",class:"opt-item-icon"},{default:n(()=>[a(t(Z))]),_:1}),r(" "+c(t(e).upvote_count),1)]),l("div",rt,[a(u,{size:"18",class:"opt-item-icon"},{default:n(()=>[a(t(A))]),_:1}),r(" "+c(t(e).comment_count),1)]),l("div",ct,[a(u,{size:"18",class:"opt-item-icon"},{default:n(()=>[a(t(G))]),_:1}),r(" "+c(t(e).collection_count),1)]),l("div",pt,[a(u,{size:"18",class:"opt-item-icon"},{default:n(()=>[a(t(J))]),_:1}),r(" "+c(t(e).share_count),1)])]),_:1})]),_:2},[t(e).texts.length>0?{name:"description",fn:n(()=>[(i(!0),f(I,null,P(t(e).texts,g=>(i(),f("span",{key:g.id,class:"post-text",onClick:s[1]||(s[1]=v(M=>b(M,t(e).id),["stop"])),innerHTML:t(N)(g.content).content},null,8,at))),128))]),key:"0"}:void 0]),1024)])}}});export{ft as _};
|
@ -1 +1 @@
|
|||||||
import{U as c}from"./naive-ui-ddb574dd.js";import{d as r,o as s,c as n,$ as l,a as o,L as t,F as p}from"./@vue-f70ab1bd.js";import{_ as i}from"./index-ce5b62d8.js";const m={class:"user"},d={class:"content"},u=r({__name:"post-skeleton",props:{num:{default:1}},setup(_){return(f,k)=>{const e=c;return s(!0),n(p,null,l(new Array(_.num),a=>(s(),n("div",{class:"skeleton-item",key:a},[o("div",m,[t(e,{circle:"",size:"small"})]),o("div",d,[t(e,{text:"",repeat:3}),t(e,{text:"",style:{width:"60%"}})])]))),128)}}});const b=i(u,[["__scopeId","data-v-ab0015b4"]]);export{b as _};
|
import{U as c}from"./naive-ui-ddb574dd.js";import{d as r,o as s,c as n,$ as l,a as o,L as t,F as p}from"./@vue-f70ab1bd.js";import{_ as i}from"./index-f6017bc3.js";const m={class:"user"},d={class:"content"},u=r({__name:"post-skeleton",props:{num:{default:1}},setup(_){return(f,k)=>{const e=c;return s(!0),n(p,null,l(new Array(_.num),a=>(s(),n("div",{class:"skeleton-item",key:a},[o("div",m,[t(e,{circle:"",size:"small"})]),o("div",d,[t(e,{text:"",repeat:3}),t(e,{text:"",style:{width:"60%"}})])]))),128)}}});const b=i(u,[["__scopeId","data-v-ab0015b4"]]);export{b as _};
|
@ -1,163 +1,232 @@
|
|||||||
import { request } from '@/utils/request';
|
import { request } from "@/utils/request";
|
||||||
|
|
||||||
/** 获取动态列表 */
|
/** 获取动态列表 */
|
||||||
export const getPosts = (params: NetParams.PostGetPosts): Promise<NetReq.PostGetPosts> => {
|
export const getPosts = (
|
||||||
return request({
|
params: NetParams.PostGetPosts
|
||||||
method: 'get',
|
): Promise<NetReq.PostGetPosts> => {
|
||||||
url: '/v1/posts',
|
return request({
|
||||||
params
|
method: "get",
|
||||||
});
|
url: "/v1/posts",
|
||||||
|
params,
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 获取标签列表 */
|
/** 获取标签列表 */
|
||||||
export const getTags = (params: NetParams.PostGetTags): Promise<NetReq.PostGetTags> => {
|
export const getTags = (
|
||||||
return request({
|
params: NetParams.PostGetTags
|
||||||
method: 'get',
|
): Promise<NetReq.PostGetTags> => {
|
||||||
url: '/v1/tags',
|
return request({
|
||||||
params
|
method: "get",
|
||||||
});
|
url: "/v1/tags",
|
||||||
|
params,
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 获取动态详情 */
|
/** 获取动态详情 */
|
||||||
export const getPost = (params: NetParams.PostGetPost): Promise<NetReq.PostGetPost> => {
|
export const getPost = (
|
||||||
return request({
|
params: NetParams.PostGetPost
|
||||||
method: 'get',
|
): Promise<NetReq.PostGetPost> => {
|
||||||
url: '/v1/post',
|
return request({
|
||||||
params
|
method: "get",
|
||||||
});
|
url: "/v1/post",
|
||||||
|
params,
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 获取动态点赞状态 */
|
/** 获取动态点赞状态 */
|
||||||
export const getPostStar = (params: NetParams.PostPostStar): Promise<NetReq.PostGetPostStar> => {
|
export const getPostStar = (
|
||||||
return request({
|
params: NetParams.PostPostStar
|
||||||
method: 'get',
|
): Promise<NetReq.PostGetPostStar> => {
|
||||||
url: '/v1/post/star',
|
return request({
|
||||||
params
|
method: "get",
|
||||||
});
|
url: "/v1/post/star",
|
||||||
|
params,
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 动态点赞 */
|
/** 动态点赞 */
|
||||||
export const postStar = (data: NetParams.PostPostStar): Promise<NetReq.PostPostStar> => {
|
export const postStar = (
|
||||||
return request({
|
data: NetParams.PostPostStar
|
||||||
method: 'post',
|
): Promise<NetReq.PostPostStar> => {
|
||||||
url: '/v1/post/star',
|
return request({
|
||||||
data
|
method: "post",
|
||||||
});
|
url: "/v1/post/star",
|
||||||
|
data,
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 获取动态收藏状态 */
|
/** 获取动态收藏状态 */
|
||||||
export const getPostCollection = (params: NetParams.PostGetPostCollection): Promise<NetReq.PostGetPostCollection> => {
|
export const getPostCollection = (
|
||||||
return request({
|
params: NetParams.PostGetPostCollection
|
||||||
method: 'get',
|
): Promise<NetReq.PostGetPostCollection> => {
|
||||||
url: '/v1/post/collection',
|
return request({
|
||||||
params
|
method: "get",
|
||||||
});
|
url: "/v1/post/collection",
|
||||||
|
params,
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 动态收藏 */
|
/** 动态收藏 */
|
||||||
export const postCollection = (data: NetParams.PostPostCollection): Promise<NetReq.PostPostCollection> => {
|
export const postCollection = (
|
||||||
return request({
|
data: NetParams.PostPostCollection
|
||||||
method: 'post',
|
): Promise<NetReq.PostPostCollection> => {
|
||||||
url: '/v1/post/collection',
|
return request({
|
||||||
data
|
method: "post",
|
||||||
});
|
url: "/v1/post/collection",
|
||||||
|
data,
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 获取动态评论列表 */
|
/** 获取动态评论列表 */
|
||||||
export const getPostComments = (params: NetParams.PostGetPostComments): Promise<NetReq.PostGetPostComments> => {
|
export const getPostComments = (
|
||||||
return request({
|
params: NetParams.PostGetPostComments
|
||||||
method: 'get',
|
): Promise<NetReq.PostGetPostComments> => {
|
||||||
url: '/v1/post/comments',
|
return request({
|
||||||
params
|
method: "get",
|
||||||
});
|
url: "/v1/post/comments",
|
||||||
|
params,
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 获取联系人列表 */
|
/** 获取联系人列表 */
|
||||||
export const getContacts = (params: NetParams.GetContacts): Promise<NetReq.GetContacts> => {
|
export const getContacts = (
|
||||||
return request({
|
params: NetParams.GetContacts
|
||||||
method: 'get',
|
): Promise<NetReq.GetContacts> => {
|
||||||
url: '/v1/user/contacts',
|
return request({
|
||||||
params
|
method: "get",
|
||||||
});
|
url: "/v1/user/contacts",
|
||||||
|
params,
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 发布动态 */
|
/** 发布动态 */
|
||||||
export const createPost = (data: NetParams.PostCreatePost): Promise<NetReq.PostCreatePost> => {
|
export const createPost = (
|
||||||
return request({
|
data: NetParams.PostCreatePost
|
||||||
method: 'post',
|
): Promise<NetReq.PostCreatePost> => {
|
||||||
url: '/v1/post',
|
return request({
|
||||||
data
|
method: "post",
|
||||||
});
|
url: "/v1/post",
|
||||||
|
data,
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 删除动态 */
|
/** 删除动态 */
|
||||||
export const deletePost = (data: NetParams.PostDeletePost): Promise<NetReq.PostDeletePost> => {
|
export const deletePost = (
|
||||||
return request({
|
data: NetParams.PostDeletePost
|
||||||
method: 'delete',
|
): Promise<NetReq.PostDeletePost> => {
|
||||||
url: '/v1/post',
|
return request({
|
||||||
data
|
method: "delete",
|
||||||
});
|
url: "/v1/post",
|
||||||
|
data,
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 锁定/解锁动态 */
|
/** 锁定/解锁动态 */
|
||||||
export const lockPost = (data: NetParams.PostLockPost): Promise<NetReq.PostLockPost> => {
|
export const lockPost = (
|
||||||
return request({
|
data: NetParams.PostLockPost
|
||||||
method: 'post',
|
): Promise<NetReq.PostLockPost> => {
|
||||||
url: '/v1/post/lock',
|
return request({
|
||||||
data
|
method: "post",
|
||||||
});
|
url: "/v1/post/lock",
|
||||||
|
data,
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 置顶/取消置顶动态 */
|
/** 置顶/取消置顶动态 */
|
||||||
export const stickPost = (data: NetParams.PostStickPost): Promise<NetReq.PostStickPost> => {
|
export const stickPost = (
|
||||||
return request({
|
data: NetParams.PostStickPost
|
||||||
method: 'post',
|
): Promise<NetReq.PostStickPost> => {
|
||||||
url: '/v1/post/stick',
|
return request({
|
||||||
data
|
method: "post",
|
||||||
});
|
url: "/v1/post/stick",
|
||||||
|
data,
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 置顶/取消置顶动态 */
|
/** 置顶/取消置顶动态 */
|
||||||
export const visibilityPost = (data: NetParams.PostVisibilityPost): Promise<NetReq.PostVisibilityPost> => {
|
export const visibilityPost = (
|
||||||
return request({
|
data: NetParams.PostVisibilityPost
|
||||||
method: 'post',
|
): Promise<NetReq.PostVisibilityPost> => {
|
||||||
url: '/v1/post/visibility',
|
return request({
|
||||||
data
|
method: "post",
|
||||||
});
|
url: "/v1/post/visibility",
|
||||||
|
data,
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 发布动态评论 */
|
/** 发布动态评论 */
|
||||||
export const createComment = (data: NetParams.PostCreateComment): Promise<NetReq.PostCreateComment> => {
|
export const createComment = (
|
||||||
return request({
|
data: NetParams.PostCreateComment
|
||||||
method: 'post',
|
): Promise<NetReq.PostCreateComment> => {
|
||||||
url: '/v1/post/comment',
|
return request({
|
||||||
data
|
method: "post",
|
||||||
});
|
url: "/v1/post/comment",
|
||||||
|
data,
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 删除评论 */
|
/** 删除评论 */
|
||||||
export const deleteComment = (data: NetParams.PostDeleteComment): Promise<NetReq.PostDeleteComment> => {
|
export const deleteComment = (
|
||||||
return request({
|
data: NetParams.PostDeleteComment
|
||||||
method: 'delete',
|
): Promise<NetReq.PostDeleteComment> => {
|
||||||
url: '/v1/post/comment',
|
return request({
|
||||||
data
|
method: "delete",
|
||||||
});
|
url: "/v1/post/comment",
|
||||||
|
data,
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 发布评论回复 */
|
/** 发布评论回复 */
|
||||||
export const createCommentReply = (data: NetParams.PostCreateCommentReply): Promise<NetReq.PostCreateCommentReply> => {
|
export const createCommentReply = (
|
||||||
return request({
|
data: NetParams.PostCreateCommentReply
|
||||||
method: 'post',
|
): Promise<NetReq.PostCreateCommentReply> => {
|
||||||
url: '/v1/post/comment/reply',
|
return request({
|
||||||
data
|
method: "post",
|
||||||
});
|
url: "/v1/post/comment/reply",
|
||||||
|
data,
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 删除评论回复 */
|
/** 删除评论回复 */
|
||||||
export const deleteCommentReply = (data: NetParams.PostDeleteCommentReply): Promise<NetReq.PostDeleteCommentReply> => {
|
export const deleteCommentReply = (
|
||||||
return request({
|
data: NetParams.PostDeleteCommentReply
|
||||||
method: 'delete',
|
): Promise<NetReq.PostDeleteCommentReply> => {
|
||||||
url: '/v1/post/comment/reply',
|
return request({
|
||||||
data
|
method: "delete",
|
||||||
});
|
url: "/v1/post/comment/reply",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 置顶/取消置顶话题 */
|
||||||
|
export const stickTopic = (
|
||||||
|
data: NetParams.PostStickTopic
|
||||||
|
): Promise<NetReq.PostStickTopic> => {
|
||||||
|
return request({
|
||||||
|
method: "post",
|
||||||
|
url: "/v1/topic/stick",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 关注话题 */
|
||||||
|
export const followTopic = (
|
||||||
|
data: NetParams.PostFollowTopic
|
||||||
|
): Promise<NetReq.PostFollowTopic> => {
|
||||||
|
return request({
|
||||||
|
method: "post",
|
||||||
|
url: "/v1/topic/follow",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 取消关注话题 */
|
||||||
|
export const unfollowTopic = (
|
||||||
|
data: NetParams.PostUnfollowTopic
|
||||||
|
): Promise<NetReq.PostUnfollowTopic> => {
|
||||||
|
return request({
|
||||||
|
method: "post",
|
||||||
|
url: "/v1/topic/unfollow",
|
||||||
|
data,
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
@ -0,0 +1,184 @@
|
|||||||
|
<template>
|
||||||
|
<div v-if="!checkFollowing || (checkFollowing && tag.is_following === 1)" class="tag-item">
|
||||||
|
<n-thing>
|
||||||
|
<template #header>
|
||||||
|
<n-tag
|
||||||
|
type="success"
|
||||||
|
size="large"
|
||||||
|
round
|
||||||
|
:key="tag.id"
|
||||||
|
>
|
||||||
|
<router-link
|
||||||
|
class="hash-link"
|
||||||
|
:to="{
|
||||||
|
name: 'home',
|
||||||
|
query: {
|
||||||
|
q: tag.tag,
|
||||||
|
t: 'tag',
|
||||||
|
},
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
#{{ tag.tag }}
|
||||||
|
</router-link>
|
||||||
|
<span v-if="!showAction" class="tag-quote">({{ tag.quote_num }})</span>
|
||||||
|
<span v-if="showAction" class="tag-quote tag-follow">({{ tag.quote_num }})</span>
|
||||||
|
<template #avatar>
|
||||||
|
<n-avatar :src="tag.user.avatar" />
|
||||||
|
</template>
|
||||||
|
</n-tag>
|
||||||
|
</template>
|
||||||
|
<template #header-extra>
|
||||||
|
<div
|
||||||
|
v-if="showAction"
|
||||||
|
class="options">
|
||||||
|
<n-dropdown
|
||||||
|
placement="bottom-end"
|
||||||
|
trigger="click"
|
||||||
|
size="small"
|
||||||
|
:options="tagOptions"
|
||||||
|
@select="handleTagAction"
|
||||||
|
>
|
||||||
|
<n-button type="success" quaternary circle block>
|
||||||
|
<template #icon>
|
||||||
|
<n-icon>
|
||||||
|
<more-vert-outlined />
|
||||||
|
</n-icon>
|
||||||
|
</template>
|
||||||
|
</n-button>
|
||||||
|
</n-dropdown>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</n-thing>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref, onMounted, computed } from 'vue';
|
||||||
|
import { MoreVertOutlined } from '@vicons/material';
|
||||||
|
import type { DropdownOption } from 'naive-ui';
|
||||||
|
import { stickTopic, followTopic, unfollowTopic } from '@/api/post';
|
||||||
|
|
||||||
|
const hasFollowing= ref(false);
|
||||||
|
const props = withDefaults(
|
||||||
|
defineProps<{
|
||||||
|
tag: Item.TagProps;
|
||||||
|
showAction: boolean;
|
||||||
|
checkFollowing: boolean;
|
||||||
|
}>(),
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
|
||||||
|
const tagOptions = computed(() => {
|
||||||
|
let options: DropdownOption[] = [];
|
||||||
|
if (props.tag.is_following === 0) {
|
||||||
|
options.push({
|
||||||
|
label: '关注',
|
||||||
|
key: 'follow',
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
if (props.tag.is_top === 0) {
|
||||||
|
options.push({
|
||||||
|
label: '置顶',
|
||||||
|
key: 'stick',
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
options.push({
|
||||||
|
label: '取消置顶',
|
||||||
|
key: 'unstick',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
options.push({
|
||||||
|
label: '取消关注',
|
||||||
|
key: 'unfollow',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return options;
|
||||||
|
});
|
||||||
|
|
||||||
|
const handleTagAction = (
|
||||||
|
item: 'follow' | 'unfollow' | 'stick' | 'unstick'
|
||||||
|
) => {
|
||||||
|
switch (item) {
|
||||||
|
case 'follow':
|
||||||
|
followTopic({
|
||||||
|
topic_id: props.tag.id
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
props.tag.is_following = 1
|
||||||
|
window.$message.success(`关注成功`);
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.log(err);
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case 'unfollow':
|
||||||
|
unfollowTopic({
|
||||||
|
topic_id: props.tag.id
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
props.tag.is_following = 0
|
||||||
|
window.$message.success(`取消关注`);
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.log(err);
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case 'stick':
|
||||||
|
stickTopic({
|
||||||
|
topic_id: props.tag.id
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
props.tag.is_top = res.top_status
|
||||||
|
window.$message.success(`置顶成功`);
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.log(err);
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case 'unstick':
|
||||||
|
stickTopic({
|
||||||
|
topic_id: props.tag.id
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
props.tag.is_top = res.top_status
|
||||||
|
window.$message.success(`取消置顶`);
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.log(err);
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
hasFollowing.value = false
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less">
|
||||||
|
.tag-item {
|
||||||
|
.tag-quote {
|
||||||
|
margin-left: 12px;
|
||||||
|
font-size: 14px;
|
||||||
|
opacity: 0.75;
|
||||||
|
}
|
||||||
|
.tag-follow {
|
||||||
|
margin-right: 22px;
|
||||||
|
}
|
||||||
|
.options {
|
||||||
|
margin-left: -32px;
|
||||||
|
margin-bottom: 4px;
|
||||||
|
opacity: 0.55;
|
||||||
|
}
|
||||||
|
.n-thing {
|
||||||
|
.n-thing-header {
|
||||||
|
margin-bottom: 0px;
|
||||||
|
}
|
||||||
|
.n-thing-avatar-header-wrapper {
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
Loading…
Reference in new issue