会员支付管理后台-用于提供会员管理小程序支付的api接口,与后台数据管理展示
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.
 
 
 
 
 
 

1 lines
4.8 KiB

import{d as S,O as W,n as E,r as v,q as M,N as t,h as y,c as O,e as l,w as r,a as d,t as m,u as s,i as g,y as C,I as k,a5 as X,E as Y,af as A,ah as G,a3 as H,_ as J,W as K,X as Q,Y as Z,a7 as ee,$ as te}from"./index-6010b07e.js";/* empty css *//* empty css *//* empty css */import{_ as ae}from"./index.vue_vue_type_style_index_0_lang-eec94bc0.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 */import{h as oe,i as le,j as ne,k as se}from"./weapp-7423630d.js";import{_ as ie}from"./cron-info.vue_vue_type_script_setup_true_lang-4ef60fee.js";import{_ as re}from"./_plugin-vue_export-helper-c27b6911.js";/* empty css */const pe={class:"main-container"},de={class:"flex justify-between items-center"},me={class:"text-[20px]"},ue={class:"mt-[10px]"},ce={class:"mt-[16px] flex justify-end"},_e={class:"dialog-footer"},fe=S({__name:"weapp",setup(ve){const D=W().meta.title,a=E({page:1,limit:10,total:0,loading:!0,data:[],searchParam:{title:"",type:"",last_time:""}}),u=(i=1)=>{a.loading=!0,a.page=i,oe({page:a.page,limit:a.limit,...a.searchParam}).then(e=>{a.loading=!1,a.data=e.data.data,a.total=e.data.total}).catch(()=>{a.loading=!1})};u();const c=v(!1),o=E({...{id:0,desc:"",path:"",version:"",type:"weapp"}}),b=v(),T=()=>{o.id=0,o.desc="",o.path="",o.version="",c.value=!0},B=M(()=>({version:[{required:!0,message:t("versionPlaceholder"),trigger:"blur"}],path:[{required:!0,validator:P,trigger:"blur"}]})),P=(i,e,p)=>o.path==""?p(new Error(t("filePlaceholder"))):p(),_=v(!1),$=async i=>{_.value||!i||await i.validate(async e=>{if(e){_.value=!0;const p=o;(o.id>0?le:ne)(p).then(w=>{_.value=!1,c.value=!1,u()}).catch(()=>{_.value=!1})}})},z=i=>{o.id=i.id,o.desc=i.desc,o.path=i.path,o.version=i.version,c.value=!0},U=i=>{X.confirm(t("weappVersionDeleteTips"),t("warning"),{confirmButtonText:t("confirm"),cancelButtonText:t("cancel"),type:"warning"}).then(()=>{se(i).then(()=>{u()}).catch(()=>{})})},N=v(null);return(i,e)=>{const p=Y,f=A,w=G,j=H,F=J,V=K,h=Q,I=ae,R=Z,q=ee,x=te;return y(),O("div",pe,[l(F,{class:"box-card !border-none",shadow:"never"},{default:r(()=>[d("div",de,[d("span",me,m(s(D)),1),l(p,{type:"primary",onClick:T},{default:r(()=>[g(m(s(t)("addVersion")),1)]),_:1})]),d("div",ue,[C((y(),k(w,{data:a.data,size:"large"},{empty:r(()=>[d("span",null,m(a.loading?"":s(t)("emptyData")),1)]),default:r(()=>[l(f,{prop:"version",label:s(t)("version"),"min-width":"150"},null,8,["label"]),l(f,{prop:"create_time",label:s(t)("createTime"),"min-width":"150"},null,8,["label"]),l(f,{label:s(t)("operation"),align:"right",fixed:"right",width:"130"},{default:r(({row:n})=>[l(p,{type:"primary",link:"",onClick:L=>z(n)},{default:r(()=>[g(m(s(t)("edit")),1)]),_:2},1032,["onClick"]),l(p,{type:"primary",link:"",onClick:L=>U(n.id)},{default:r(()=>[g(m(s(t)("delete")),1)]),_:2},1032,["onClick"])]),_:1},8,["label"])]),_:1},8,["data"])),[[x,a.loading]]),d("div",ce,[l(j,{"current-page":a.page,"onUpdate:current-page":e[0]||(e[0]=n=>a.page=n),"page-size":a.limit,"onUpdate:page-size":e[1]||(e[1]=n=>a.limit=n),layout:"total, sizes, prev, pager, next, jumper",total:a.total,onSizeChange:e[2]||(e[2]=n=>u()),onCurrentChange:u},null,8,["current-page","page-size","total"])])])]),_:1}),l(ie,{ref_key:"cronDialog",ref:N,onComplete:a},null,8,["onComplete"]),l(q,{modelValue:c.value,"onUpdate:modelValue":e[7]||(e[7]=n=>c.value=n),title:s(t)("editVersion"),width:"550px","destroy-on-close":!0},{footer:r(()=>[d("span",_e,[l(p,{type:"primary",onClick:e[6]||(e[6]=n=>$(b.value))},{default:r(()=>[g(m(s(t)("confirm")),1)]),_:1})])]),default:r(()=>[C((y(),k(R,{model:o,"label-width":"110px",ref_key:"formRef",ref:b,rules:s(B),class:"page-form"},{default:r(()=>[l(h,{label:s(t)("version"),prop:"version"},{default:r(()=>[l(V,{modelValue:o.version,"onUpdate:modelValue":e[3]||(e[3]=n=>o.version=n),placeholder:s(t)("versionPlaceholder"),class:"input-width"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),l(h,{label:s(t)("file"),prop:"path"},{default:r(()=>[l(I,{modelValue:o.path,"onUpdate:modelValue":e[4]||(e[4]=n=>o.path=n),class:"input-width",api:"applet/upload"},null,8,["modelValue"])]),_:1},8,["label"]),l(h,{label:s(t)("desc")},{default:r(()=>[l(V,{type:"textarea",modelValue:o.desc,"onUpdate:modelValue":e[5]||(e[5]=n=>o.desc=n),class:"input-width",clearable:""},null,8,["modelValue"])]),_:1},8,["label"])]),_:1},8,["model","rules"])),[[x,i.loading]])]),_:1},8,["modelValue","title"])])}}});const Se=re(fe,[["__scopeId","data-v-3bf4624d"]]);export{Se as default};