会员支付管理后台-用于提供会员管理小程序支付的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
9.9 KiB

import{d as pe,f as ue,O as me,n as x,q as Y,N as a,r as y,h as p,c as h,e as t,w as n,a as v,t as d,u as o,i as m,F as E,G as N,I as w,y as ce,B as S,a5 as fe,E as _e,W as ye,X as ge,aq as he,aC as be,Y as ve,_ as we,af as Ve,ah as Pe,a3 as ke,a7 as Ce,aA as De,aB as xe,$ as Te}from"./index-6010b07e.js";/* empty css */import{_ as Ee}from"./index-4718d422.js";/* empty css *//* 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 */import"./el-form-item-4ed993c7.js";/* empty css */import{f as Ue,h as $e,j as Fe,s as Ne,k as Se,l as Be}from"./diy-5ff717bd.js";import{q as Re}from"./sys-0f76aff3.js";/* empty css */import"./index.vue_vue_type_style_index_0_lang-cc99af21.js";import"./attachment-bc20fd95.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./index.vue_vue_type_script_setup_true_lang-6f0143c4.js";/* empty css */import"./_plugin-vue_export-helper-c27b6911.js";const qe={class:"main-container"},Ae={class:"flex justify-between items-center"},Ie={class:"text-[20px]"},ze={key:0},je={key:0,class:"text-primary"},Le={key:1},Oe={class:"mt-[16px] flex justify-end"},Ge={class:"dialog-footer"},Ye={class:"dialog-footer"},Tl=pe({__name:"list",setup(Je){const U=ue(),J=me().meta.title,P=x({}),b=x({title:"",type:""}),M=Y(()=>({title:[{required:!0,message:a("titlePlaceholder"),trigger:"blur"}],type:[{required:!0,message:a("pageTypePlaceholder"),trigger:"blur"}]})),B=y(),k=y(!1),W=async r=>{r&&await r.validate(async e=>{if(e){k.value=!1;const s={type:b.type,title:b.title};U.push({path:"/decorate/edit",query:s})}})},X=y("");(async()=>{X.value=(await Re()).data.wap_url})();const R=(r="")=>{$e({mode:"",addon:r}).then(e=>{for(let s in P)delete P[s];for(const s in e.data)P[s]=e.data[s]})};R();const q=x({});Ue().then(r=>{if(r.data)for(const e in r.data)q[e]=r.data[e]});const H=r=>{i.searchParam.type="",R(r)},i=x({page:1,limit:10,total:0,loading:!0,data:[],searchParam:{title:"",type:"",mode:"",addon_name:""}}),A=y(),g=(r=1)=>{i.loading=!0,i.page=r,Fe({page:i.page,limit:i.limit,...i.searchParam}).then(e=>{i.loading=!1,i.data=e.data.data,i.total=e.data.total}).catch(()=>{i.loading=!1})};g();const K=r=>{const e=U.resolve({path:"/decorate/edit",query:{id:r.id}});window.open(e.href)},Q=r=>{Ne({id:r}).then(()=>{g()})},Z=r=>{fe.confirm(a("diyPageDeleteTips"),a("warning"),{confirmButtonText:a("confirm"),cancelButtonText:a("cancel"),type:"warning"}).then(()=>{Se(r).then(()=>{g()}).catch(()=>{})})},ee=r=>{const e=U.resolve({path:"/preview/wap",query:{page:r.type_page+"?id="+r.id}});window.open(e.href)},c=y("wechat"),I=y(""),z=y(0),f=x({wechat:{title:"",desc:"",url:""},weapp:{title:"",url:""}}),C=y(!1),le=Y(()=>({})),j=y(),ae=async r=>{z.value=r.id,I.value=r.title;const e=r.share?JSON.parse(r.share):{wechat:{title:"",desc:"",url:""},weapp:{title:"",url:""}};e&&(f.wechat=e.wechat,f.weapp=e.weapp),C.value=!0},te=async r=>{r&&await r.validate(async e=>{e&&Be({id:z.value,share:JSON.stringify(f)}).then(()=>{g(),C.value=!1}).catch(()=>{})})},oe=r=>{r&&(r.resetFields(),g())};return(r,e)=>{const s=_e,T=ye,_=ge,D=he,$=be,F=ve,L=we,V=Ve,ne=Pe,re=ke,O=Ce,G=De,ie=xe,se=Ee,de=Te;return p(),h("div",qe,[t(L,{class:"box-card !border-none",shadow:"never"},{default:n(()=>[v("div",Ae,[v("span",Ie,d(o(J)),1),t(s,{type:"primary",class:"w-[100px]",onClick:e[0]||(e[0]=l=>k.value=!0)},{default:n(()=>[m(d(o(a)("addDiyPage")),1)]),_:1})]),t(L,{class:"box-card !border-none my-[10px] table-search-wrap",shadow:"never"},{default:n(()=>[t(F,{inline:!0,model:i.searchParam,ref_key:"searchFormDiyPageRef",ref:A},{default:n(()=>[t(_,{label:o(a)("title"),prop:"title"},{default:n(()=>[t(T,{modelValue:i.searchParam.title,"onUpdate:modelValue":e[1]||(e[1]=l=>i.searchParam.title=l),placeholder:o(a)("titlePlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),t(_,{label:o(a)("forAddon"),prop:"addon_name"},{default:n(()=>[t($,{modelValue:i.searchParam.addon_name,"onUpdate:modelValue":e[2]||(e[2]=l=>i.searchParam.addon_name=l),placeholder:o(a)("pageTypePlaceholder"),onChange:H},{default:n(()=>[t(D,{label:o(a)("all"),value:""},null,8,["label"]),(p(!0),h(E,null,N(q,(l,u)=>(p(),w(D,{label:l.title,value:u,key:u},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),t(_,{label:o(a)("typeName"),prop:"type"},{default:n(()=>[t($,{modelValue:i.searchParam.type,"onUpdate:modelValue":e[3]||(e[3]=l=>i.searchParam.type=l),placeholder:o(a)("pageTypePlaceholder")},{default:n(()=>[t(D,{label:o(a)("all"),value:""},null,8,["label"]),(p(!0),h(E,null,N(P,(l,u)=>(p(),w(D,{label:l.title,value:u,key:u},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),t(_,null,{default:n(()=>[t(s,{type:"primary",onClick:e[4]||(e[4]=l=>g())},{default:n(()=>[m(d(o(a)("search")),1)]),_:1}),t(s,{onClick:e[5]||(e[5]=l=>oe(A.value))},{default:n(()=>[m(d(o(a)("reset")),1)]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),ce((p(),w(ne,{data:i.data,size:"large"},{empty:n(()=>[v("span",null,d(i.loading?"":o(a)("emptyData")),1)]),default:n(()=>[t(V,{prop:"title",label:o(a)("title"),"min-width":"120"},null,8,["label"]),t(V,{prop:"addon_name",label:o(a)("forAddon"),"min-width":"80"},null,8,["label"]),t(V,{prop:"type_name",label:o(a)("typeName"),"min-width":"80"},null,8,["label"]),t(V,{label:o(a)("status"),"min-width":"80"},{default:n(({row:l})=>[l.type=="DIY_PAGE"?(p(),h("span",ze,"-")):(p(),h(E,{key:1},[l.is_default==1?(p(),h("span",je,d(o(a)("isUse")),1)):(p(),h("span",Le,d(o(a)("unused")),1))],64))]),_:1},8,["label"]),t(V,{prop:"update_time",label:o(a)("updateTime"),"min-width":"120"},null,8,["label"]),t(V,{label:o(a)("operation"),fixed:"right",align:"right","min-width":"160"},{default:n(({row:l})=>[t(s,{type:"primary",link:"",onClick:u=>ee(l)},{default:n(()=>[m(d(o(a)("promote")),1)]),_:2},1032,["onClick"]),l.is_default==0?(p(),w(s,{key:0,type:"primary",link:"",onClick:u=>Q(l.id)},{default:n(()=>[m(d(o(a)("use")),1)]),_:2},1032,["onClick"])):S("",!0),l.type=="DIY_PAGE"?(p(),w(s,{key:1,type:"primary",link:"",onClick:u=>ae(l)},{default:n(()=>[m(d(o(a)("shareSet")),1)]),_:2},1032,["onClick"])):S("",!0),t(s,{type:"primary",link:"",onClick:u=>K(l)},{default:n(()=>[m(d(o(a)("edit")),1)]),_:2},1032,["onClick"]),t(s,{type:"primary",link:"",onClick:u=>Z(l.id)},{default:n(()=>[m(d(o(a)("delete")),1)]),_:2},1032,["onClick"])]),_:1},8,["label"])]),_:1},8,["data"])),[[de,i.loading]]),v("div",Oe,[t(re,{"current-page":i.page,"onUpdate:current-page":e[6]||(e[6]=l=>i.page=l),"page-size":i.limit,"onUpdate:page-size":e[7]||(e[7]=l=>i.limit=l),layout:"total, sizes, prev, pager, next, jumper",total:i.total,onSizeChange:e[8]||(e[8]=l=>g()),onCurrentChange:g},null,8,["current-page","page-size","total"])])]),_:1}),t(O,{modelValue:k.value,"onUpdate:modelValue":e[13]||(e[13]=l=>k.value=l),title:o(a)("addPageTips"),width:"25%"},{footer:n(()=>[v("span",Ge,[t(s,{onClick:e[11]||(e[11]=l=>k.value=!1)},{default:n(()=>[m(d(o(a)("cancel")),1)]),_:1}),t(s,{type:"primary",onClick:e[12]||(e[12]=l=>W(B.value))},{default:n(()=>[m(d(o(a)("confirm")),1)]),_:1})])]),default:n(()=>[t(F,{model:b,"label-width":"90px",ref_key:"formRef",ref:B,rules:o(M)},{default:n(()=>[t(_,{label:o(a)("title"),prop:"title"},{default:n(()=>[t(T,{modelValue:b.title,"onUpdate:modelValue":e[9]||(e[9]=l=>b.title=l),placeholder:o(a)("titlePlaceholder"),clearable:"",maxlength:"12","show-word-limit":"",class:"w-full"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),t(_,{label:o(a)("typeName"),prop:"type"},{default:n(()=>[t($,{modelValue:b.type,"onUpdate:modelValue":e[10]||(e[10]=l=>b.type=l),placeholder:o(a)("pageTypePlaceholder"),class:"w-full"},{default:n(()=>[(p(!0),h(E,null,N(P,(l,u)=>(p(),w(D,{label:l.title,value:u,key:u},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","rules"])]),_:1},8,["modelValue","title"]),t(O,{modelValue:C.value,"onUpdate:modelValue":e[20]||(e[20]=l=>C.value=l),title:o(a)("shareSet"),width:"30%"},{footer:n(()=>[v("span",Ye,[t(s,{onClick:e[18]||(e[18]=l=>C.value=!1)},{default:n(()=>[m(d(o(a)("cancel")),1)]),_:1}),t(s,{type:"primary",onClick:e[19]||(e[19]=l=>te(j.value))},{default:n(()=>[m(d(o(a)("confirm")),1)]),_:1})])]),default:n(()=>[t(ie,{modelValue:c.value,"onUpdate:modelValue":e[14]||(e[14]=l=>c.value=l)},{default:n(()=>[t(G,{label:o(a)("wechat"),name:"wechat"},null,8,["label"]),t(G,{label:o(a)("weapp"),name:"weapp"},null,8,["label"])]),_:1},8,["modelValue"]),t(F,{model:f[c.value],"label-width":"90px",ref_key:"shareFormRef",ref:j,rules:o(le)},{default:n(()=>[t(_,{label:o(a)("sharePage")},{default:n(()=>[v("span",null,d(I.value),1)]),_:1},8,["label"]),t(_,{label:o(a)("shareTitle"),prop:"title"},{default:n(()=>[t(T,{modelValue:f[c.value].title,"onUpdate:modelValue":e[15]||(e[15]=l=>f[c.value].title=l),placeholder:o(a)("shareTitlePlaceholder"),clearable:"",maxlength:"30","show-word-limit":""},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),c.value=="wechat"?(p(),w(_,{key:0,label:o(a)("shareDesc"),prop:"desc"},{default:n(()=>[t(T,{modelValue:f[c.value].desc,"onUpdate:modelValue":e[16]||(e[16]=l=>f[c.value].desc=l),placeholder:o(a)("shareDescPlaceholder"),type:"textarea",rows:"4",clearable:"",maxlength:"100","show-word-limit":""},null,8,["modelValue","placeholder"])]),_:1},8,["label"])):S("",!0),t(_,{label:o(a)("shareImageUrl"),prop:"url"},{default:n(()=>[t(se,{modelValue:f[c.value].url,"onUpdate:modelValue":e[17]||(e[17]=l=>f[c.value].url=l),limit:1},null,8,["modelValue"])]),_:1},8,["label"])]),_:1},8,["model","rules"])]),_:1},8,["modelValue","title"])])}}});export{Tl as default};