mirror of https://github.com/rocboss/paopao-ce
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.
2 lines
22 KiB
2 lines
22 KiB
1 year ago
|
import{_ as Ue}from"./whisper-7c8226c3.js";import{_ as Be,a as Ee}from"./post-item.vue_vue_type_style_index_0_lang-1243f33f.js";import{_ as Ve}from"./post-skeleton-5d89319a.js";import{d as ge,H as o,c as pe,b as fe,e as p,f as w,bf as y,j as k,k as s,w as l,q as R,Y as A,y as me,A as L,x as se,F as de,u as ve,R as xe,E as Ne}from"./@vue-a481fc63.js";import{u as he}from"./vuex-44de225f.js";import{l as _e}from"./lodash-e0b37ac3.js";import{g as Re,a as qe,c as Ge,b as Oe,d as Pe,e as Fe,u as Ye,f as Le,_ as Se}from"./index-537a241d.js";import{p as Me}from"./content-f21e8034.js";import{V as N,P as J}from"./IEnum-5453a777.js";import{I as Ke,V as We,A as je,d as Qe,E as He}from"./@vicons-4ed09704.js";import{o as we,v as Ze,j as Je,e as Xe,w as $e,x as et,y as tt,z as st,A as at,B as ot,C as nt,a as ye,D as lt,E as it,F as rt,G as ut,H as ct,l as pt,I as dt,J as vt,k as mt}from"./naive-ui-defd0b2d.js";import{_ as _t}from"./main-nav.vue_vue_type_style_index_0_lang-832ff0ed.js";import{b as gt,u as ft}from"./vue-router-e5a2430e.js";import{W as ht}from"./v3-infinite-loading-2c58ec2f.js";import{S as wt}from"./@opentiny-d73a2d67.js";import"./copy-to-clipboard-4ef7d3eb.js";import"./@babel-725317a4.js";import"./toggle-selection-93f4ad84.js";import"./axios-4a70c6fc.js";import"./moment-2ab8298d.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-39372edb.js";import"./evtd-b614532e.js";import"./@css-render-7124a1a5.js";import"./vooks-6d99783e.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-2fe58954.js";import"./vue-1e3b54ec.js";import"./xss-a5544f63.js";import"./cssfilter-af71ba68.js";const yt=X=>{const G=new FileReader,b=r=>["application/zip","application/x-zip","application/octet-stream","application/x-zip-compressed"].includes(r),C=()=>{const r=new Uint8Array(G.result).subarray(0,4);let U="";for(let f=0;f<r.length;f++)U+=r[f].toString(16);switch(U){case"504b0304":case"504b0506":case"504b0708":return b("application/zip");case"504b030414":return b("application/x-zip-compressed");case"504b0508":return b("application/x-zip");case"504b5370":return b("application/octet-stream");default:return!1}};return new Promise((r,U)=>{G.onloadend=()=>{const f=X.type;r(f===""||f==="application/octet-stream"?C():b(f))},G.readAsArrayBuffer(X.slice(0,4))})},At={key:0,class:"compose-wrap"},kt={class:"compose-line"},bt={class:"compose-user"},Ct={class:"compose-line compose-options"},It={class:"attachment"},zt={class:"submit-wrap"},Dt={class:"attachment-list-wrap"},Tt={key:0,class:"attachment-price-wrap"},Ut=k("span",null," 附件价格¥",-1),Bt={key:0,class:"eye-wrap"},Et={key:1,class:"link-wrap"},Vt={key:1,class:"compose-wrap"},xt=k("div",{class:"login-wrap"},[k("span",{class:"login-banner"}," 登录后,精彩更多")],-1),Nt={key:0,class:"login-only-wrap"},Rt={key:1,class:"login-wrap"},qt=ge({__name:"compose",emits:["post-success"],setup(X,{emit:G}){const b=he(),C=o([]),r=o(!1),U=o(!1),f=o(!1),q=o(!1),B=o(""),I=o([]),P=o(),D=o(0),d=o("public/image"),T=o([]),O=o([]),m=o([]),_=o([]),E=o(N.PUBLIC),z=o(N.PUBLIC),S="true".toLowerCase()==="true",F=+"400",W=o("true".toLowerCase()==="true"),ae=o("true".toLowerCase()==="true"),$=o("true".toLowerCase()==="true"),ee=o("false".toLowerCase()==="true"),oe=o("true".toLowerCase()==="true"),M="/v1/attachment",ne=pe(()=>"Bearer "+localStorage.getItem("PAOPAO_TOKEN")),j=pe(()=>{let e=[{value:N.PUBLIC,label:"公开"},{value:N.PRIVATE,label:"私密"},{value:N.Following,label:"关注可见"}];return S&&e.push({value:N.FRIEND,label:"好友可见"}),e}),V=()=>{f.value=!f.value,f.value&&q.value&&(q.value=!1)},te=()=>{q.value=!q.value,q.value&&f.value&&(f.value=!1)},le=_e.debounce(e=>{Re({k:e}).then(t=>{let n=[];t.suggest.map(a=>{n.push({label:a,value:a})}),C.value=n,r.value=!1}).catch(t=>{r.value=!1})},200),Q=_e.debounce(e=>{qe({k:e}).then(t=>{let n=[];t.suggest.map(a
|