2023-09-16 09:24:38 +08:00

2 lines
7.6 KiB
JavaScript

import{d as O,r as d,R as X,e as v,f as U,g as s,B as r,u as l,y as t,x as n,A as g,Q as z,v as N,H as R}from"./base-d77b0726.js";/* empty css *//* empty css *//* empty css */import{_ as Y}from"./index.vue_vue_type_style_index_0_lang-21f863fe.js";import"./el-form-item-4ed993c7.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css *//* empty css */import{a as Z,b as ee,s as te}from"./weapp-db39645c.js";import{t as e}from"./index-ab361b00.js";import{u as oe,b as ae}from"./vue-router-57155f94.js";import{g as le}from"./module-713f7239.js";/* empty css */import{E as ne}from"./index-5b262c6a.js";import{a as ie,E as pe}from"./index-09449e3d.js";import{a as se,E as re}from"./index-136e79ad.js";import{E as me}from"./index-91bdda63.js";import{a as de,E as ue}from"./index-0d721416.js";import{E as ce}from"./index-45cca80f.js";import{E as _e}from"./index-f956e728.js";import{E as fe}from"./index-2cf73bf7.js";import{E as ve}from"./index-c1eb81db.js";import{a as ge,E as be}from"./index-68c5ad54.js";import{E as he}from"./index-6a54cf26.js";import{v as we}from"./directive-08cd03ab.js";import{_ as Ve}from"./_plugin-vue_export-helper-c27b6911.js";/* empty css */import"./common-4a1cac58.js";import"./index-e37943c3.js";import"./index-331c6de1.js";import"./index-9e51ba8b.js";import"./typescript-defaf979.js";import"./aria-60e0cdc6.js";import"./index-de9bede2.js";import"./index-bbf3e154.js";import"./event-e06a23af.js";import"./index-a20d1a31.js";import"./index-ec3f2721.js";import"./index-704f0685.js";import"./index-b3418ddc.js";import"./scroll-59301fd6.js";import"./vnode-5920e7a9.js";import"./aria-adfa05c5.js";import"./focus-trap-98fda164.js";import"./validator-7b087194.js";import"./index-6245131d.js";import"./strings-6a15e170.js";import"./index-f2dc9b9f.js";import"./index-40fcecbc.js";import"./index-74352d71.js";import"./_Uint8Array-2fd72219.js";import"./_initCloneObject-22d1caee.js";import"./index-52f984e1.js";import"./isEqual-030b54ca.js";import"./_isIterateeCall-ff5ab0b5.js";import"./debounce-8a1738b0.js";import"./index-ef0eb7b1.js";import"./index-a997ab1f.js";import"./index-45469947.js";import"./index-d1e433eb.js";const xe={class:"main-container min-h-[300px] p-5"},Ee={class:"flex justify-between items-center mb-[20px]"},ye={class:"text-[20px]"},Ce={class:"indent-4"},Te={class:"mt-[50px]"},ke={key:0,class:"text-error"},Be={class:""},De={class:"mt-[16px] flex justify-end"},Pe={class:"dialog-footer"},Ue=["element-loading-text"],ze=O({__name:"code",setup(Ne){const F=oe(),E=ae(),I=F.meta.title,y=d("1"),b=d(!1),i=X({page:1,limit:10,total:0,loading:!1,data:[]}),m=d({desc:""}),h=d("");le().then(p=>{p.data.data&&p.data.data.auth_code&&(h.value=p.data.data.auth_code,j())}).catch(()=>{});const w=d("/website/channel/weapp/code"),W=p=>{E.push({path:w.value})},C=d(null),c=(p=1)=>{i.loading=!0,i.page=p,ee({page:i.page,limit:i.limit}).then(o=>{i.loading=!1,i.data=o.data.data,i.total=o.data.total}).catch(()=>{i.loading=!1})};c();const A=()=>{C.value.clearValidate()},u=d(!1),T=()=>{if(!h.value){ne.confirm(e("authTips"),e("warning"),{distinguishCancelAndClose:!0,confirmButtonText:e("toBind"),cancelButtonText:e("toNiucloud")}).then(()=>{E.push({path:"/app/authorize"})}).catch(p=>{p==="cancel"&&window.open("https://www.niucloud.com/product")});return}u.value||(u.value=!0,te(m.value).then(()=>{c(),u.value=!1}).catch(()=>{u.value=!1}))},k=d(""),j=()=>{h.value&&Z().then(p=>{}).catch()};return(p,o)=>{const V=ie,L=pe,S=se,M=re,_=me,f=de,$=ce,H=ue,Q=_e,q=fe,B=ve,x=ge,G=Y,J=be,D=he,P=we;return v(),U("div",xe,[s("div",Ee,[s("span",ye,r(l(I)),1)]),t(L,{modelValue:w.value,"onUpdate:modelValue":o[0]||(o[0]=a=>w.value=a),class:"demo-tabs",onTabChange:W},{default:n(()=>[t(V,{label:l(e)("weappAccessFlow"),name:"/website/channel/weapp"},null,8,["label"]),t(V,{label:l(e)("subscribeMessage"),name:"/website/channel/weapp/message"},null,8,["label"]),t(V,{label:l(e)("weappRelease"),name:"/website/channel/weapp/code"},null,8,["label"])]),_:1},8,["modelValue"]),t(q,{class:"box-card !border-none",shadow:"never"},{default:n(()=>[t(M,{modelValue:y.value,"onUpdate:modelValue":o[1]||(o[1]=a=>y.value=a)},{default:n(()=>[t(S,{title:l(e)("operatePrompt"),name:"1"},{default:n(()=>[s("div",null,[s("p",Ce,r(l(e)("operatePromptTipsTwo")),1)])]),_:1},8,["title"])]),_:1},8,["modelValue"]),s("div",Te,[t(_,{type:"primary",onClick:T},{default:n(()=>[g(r(l(e)("codeDownTwoDesc")),1)]),_:1})]),z((v(),N(H,{class:"mt-[15px]",data:i.data,size:"default"},{empty:n(()=>[s("span",null,r(l(e)("emptyData")),1)]),default:n(()=>[t(f,{prop:"version",label:l(e)("code"),align:"left"},null,8,["label"]),t(f,{prop:"status_name",label:l(e)("status"),align:"left"},{default:n(({row:a})=>[s("div",null,r(a.status_name),1),a.status==-1?(v(),U("div",ke,r(l(e)("failReason"))+r(a.fail_reason),1)):R("",!0)]),_:1},8,["label"]),t(f,{prop:"create_time",label:l(e)("createTime"),align:"center"},null,8,["label"]),t(f,{label:l(e)("operation"),fixed:"right",align:"right","min-width":"120"},{default:n(({row:a,$index:K})=>[s("div",Be,[t($,{content:k.value,"raw-content":"",effect:"light"},{default:n(()=>[k.value&&K==0&&i.page==1?(v(),N(_,{key:0,type:"primary",link:""},{default:n(()=>[g(r(l(e)("preview")),1)]),_:1})):R("",!0)]),_:2},1032,["content"])])]),_:1},8,["label"])]),_:1},8,["data"])),[[P,i.loading]]),s("div",De,[t(Q,{"current-page":i.page,"onUpdate:currentPage":o[2]||(o[2]=a=>i.page=a),"page-size":i.limit,"onUpdate:pageSize":o[3]||(o[3]=a=>i.limit=a),layout:"total, sizes, prev, pager, next, jumper",total:i.total,onSizeChange:c,onCurrentChange:c},null,8,["current-page","page-size","total"])])]),_:1}),t(D,{modelValue:b.value,"onUpdate:modelValue":o[8]||(o[8]=a=>b.value=a),title:l(e)("codeDownTwoDesc"),width:"30%","before-close":A},{footer:n(()=>[s("span",Pe,[t(_,{onClick:o[7]||(o[7]=a=>b.value=!1)},{default:n(()=>[g(r(l(e)("cancel")),1)]),_:1}),t(_,{type:"primary",onClick:T},{default:n(()=>[g(r(l(e)("confirm")),1)]),_:1})])]),default:n(()=>[t(J,{ref_key:"ruleFormRef",ref:C,model:m.value,rules:p.rules,"label-width":"120px"},{default:n(()=>[t(x,{prop:"code",label:l(e)("code")},{default:n(()=>[t(B,{modelValue:m.value.code,"onUpdate:modelValue":o[4]||(o[4]=a=>m.value.code=a),placeholder:l(e)("codePlaceholder"),onkeyup:"this.value = this.value.replace(/[^\\d\\.]/g,'');"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),t(x,{prop:"path",label:l(e)("path")},{default:n(()=>[t(G,{modelValue:m.value.path,"onUpdate:modelValue":o[5]||(o[5]=a=>m.value.path=a),api:"weapp/upload",accept:".zip"},null,8,["modelValue","accept"])]),_:1},8,["label"]),t(x,{label:l(e)("content")},{default:n(()=>[t(B,{type:"textarea",modelValue:m.value.content,"onUpdate:modelValue":o[6]||(o[6]=a=>m.value.content=a),placeholder:l(e)("contentPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","rules"])]),_:1},8,["modelValue","title"]),t(D,{modelValue:u.value,"onUpdate:modelValue":o[9]||(o[9]=a=>u.value=a),title:"",width:"300px","show-close":!1,"align-center":!0,"close-on-click-modal":!1},{default:n(()=>[z(s("div",{class:"w-full h-[100px]","element-loading-text":l(e)("uploadingTips")},null,8,Ue),[[P,u.value]])]),_:1},8,["modelValue"])])}}});const Yt=Ve(ze,[["__scopeId","data-v-3864bc88"]]);export{Yt as default};