You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
paopao-ce/web/dist/assets/Home-416cfd1e.js

2 lines
13 KiB

import{_ as xe,a as ze}from"./post-item.vue_vue_type_style_index_0_lang-18e150bb.js";import{_ as Ie}from"./post-skeleton-f095ca4e.js";import{d as te,r as l,j as ae,o as u,c as h,_ as z,a as T,V as a,a1 as s,Q as R,O as C,a2 as Y,e as L,M as Q,F as Z,a4 as W,n as qe,w as Ue}from"./@vue-e0e89260.js";import{u as oe}from"./vuex-473b3783.js";import{l as ee}from"./lodash-94eb5868.js";import{g as Ae,a as Ee,c as Re,b as Pe,_ as Se}from"./index-26a2b065.js";import{p as Le}from"./content-772a5dad.js";import{V as E,P as V}from"./IEnum-a180d93e.js";import{I as Ve,V as Ne,A as Fe,d as Be,E as Me}from"./@vicons-0524c43e.js";import{o as Oe,v as je,j as De,e as He,w as Ge,x as Ke,y as Je,z as Qe,A as Ze,B as We,C as Xe,a as ne,D as Ye,E as et,F as tt,G as at,H as ot,k as nt}from"./naive-ui-e703c4e6.js";import{_ as st}from"./main-nav.vue_vue_type_style_index_0_lang-2c8a0605.js";import{b as lt,u as it}from"./vue-router-b8e3382f.js";import{W as rt}from"./v3-infinite-loading-e5c2e8bf.js";import"./formatTime-4210fcd1.js";import"./moment-2ab8298d.js";import"./copy-to-clipboard-1dd3075d.js";import"./toggle-selection-93f4ad84.js";import"./axios-4a70c6fc.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-59ca65c3.js";import"./evtd-b614532e.js";import"./@css-render-580d83ec.js";import"./vooks-a50491fd.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"./paopao-video-player-aa5e8b3f.js";const ut=N=>{const q=new FileReader,c=_=>["application/zip","application/x-zip","application/octet-stream","application/x-zip-compressed"].includes(_),P=()=>{const _=new Uint8Array(q.result).subarray(0,4);let m="";for(let i=0;i<_.length;i++)m+=_[i].toString(16);switch(m){case"504b0304":case"504b0506":case"504b0708":return c("application/zip");case"504b030414":return c("application/x-zip-compressed");case"504b0508":return c("application/x-zip");case"504b5370":return c("application/octet-stream");default:return!1}};return new Promise((_,m)=>{q.onloadend=()=>{const i=N.type;_(i===""||i==="application/octet-stream"?P():c(i))},q.readAsArrayBuffer(N.slice(0,4))})},ct={key:0,class:"compose-wrap"},pt={class:"compose-line"},_t={class:"compose-user"},dt={class:"compose-line compose-options"},mt={class:"attachment"},vt={class:"submit-wrap"},ft={class:"attachment-list-wrap"},gt={key:0,class:"attachment-price-wrap"},yt=T("span",null," 附件价格¥",-1),ht={key:0,class:"eye-wrap"},wt={key:1,class:"link-wrap"},bt={key:1,class:"compose-wrap"},kt=T("div",{class:"login-wrap"},[T("span",{class:"login-banner"}," 登录后,精彩更多")],-1),Ct={key:0,class:"login-only-wrap"},$t={key:1,class:"login-wrap"},Tt=te({__name:"compose",emits:["post-success"],setup(N,{emit:q}){const c=oe(),P=l([]),_=l(!1),m=l(!1),i=l(!1),v=l(!1),w=l(""),I=l([]),F=l(),U=l(0),g=l("public/image"),x=l([]),p=l([]),y=l([]),k=l([]),b=l(E.FRIEND),$=l(E.FRIEND),M=[{value:E.PUBLIC,label:"公开"},{value:E.PRIVATE,label:"私密"},{value:E.FRIEND,label:"好友可见"}],S=+"400",B=l("true".toLowerCase()==="true"),O=l("true".toLowerCase()==="true"),j=l("true".toLowerCase()==="true"),D=l("false".toLowerCase()==="true"),H=l("true".toLowerCase()==="true"),A="/v1/attachment",X=l(),se=()=>{i.value=!i.value,i.value&&v.value&&(v.value=!1)},le=()=>{v.value=!v.value,v.value&&i.value&&(i.value=!1)},ie=ee.debounce(t=>{Ae({k:t}).then(e=>{let n=[];e.suggest.map(o=>{n.push({label:o,value:o})}),P.value=n,_.value=!1}).catch(e=>{_.value=!1})},200),re=ee.debounce(t=>{Ee({k:t}).then(e=>{let n=[];e.suggest.map(o=>{n.push({label:o,value:o})}),P.value=n,_.value=!1}).catch(e=>{_.value=!1})},200),ue=(t,e)=>{_.value||(_.value=!0,e==="@"?ie(t):re(t))},ce=t=>{t.length>S?w.value=t.substring(0,S):w.value=t},G=t=>{g.value=t},pe=t=>{for(let r=0;r<t.length;r++){var e=t[r].name,n=e.split(".").slice(0,-1).join("."),o=e.split(".").pop();n.length>30&&(t[r].name=n.substring(0,18)+"..."+n.substring(n.length-9)+"."+o)}