1
0
Code Issues Pull Requests Packages Projects Releases Wiki Activity GitHub Gitee

小程序小商店同时可以搜商品名称和商品图片;后台管理显示商品简介;其他一些小调整

This commit is contained in:
程序员小墨 2023-04-25 05:46:53 +08:00
parent 85472f43e8
commit 83047d7877
24 changed files with 547 additions and 732 deletions

5
MoveBackendJar.bat Normal file
View File

@ -0,0 +1,5 @@
move .\backend\microservice-gateway\target\microservice-gateway-0.0.1-SNAPSHOT.jar .\ignore
move .\backend\microservice-provider-user-8001\target\microservice-provider-user-8001-0.0.1-SNAPSHOT.jar .\ignore
move .\backend\microservice-provider-access-8002\target\microservice-provider-access-8002-0.0.1-SNAPSHOT.jar .\ignore
move .\backend\microservice-provider-shop-8003\target\microservice-provider-shop-8003-0.0.1-SNAPSHOT.jar .\ignore
pause

View File

@ -124,6 +124,9 @@ git clone https://github.com/coder-xiaomo/epp
# git clone https://git.only4.work/coder-xiaomo/epp
# 进入项目根目录
cd epp
# 切换到 production 分支
git checkout production
```

View File

@ -0,0 +1,2 @@
*
!.gitignore

View File

@ -1 +0,0 @@
import{d as c,dK as l,aU as p,bg as i,o as m,c as E,b as o,a as s,w as a,dc as f,db as h,e as t,bS as v}from"./index.f92c5f31.js";const r=e=>(f("data-v-d4771405"),e=e(),h(),e),B={class:"error-page"},g=r(()=>o("div",{class:"error-code"},[t("4"),o("span",null,"0"),t("3")],-1)),b=r(()=>o("div",{class:"error-desc"},"\u554A\u54E6~ \u4F60\u6CA1\u6709\u6743\u9650\u8BBF\u95EE\u8BE5\u9875\u9762\u54E6",-1)),k={class:"error-handle"},x=c({name:"403"}),y=c({...x,setup(e){const u=l(),n=()=>{u.go(-2)};return(C,D)=>{const _=p,d=i("router-link");return m(),E("div",B,[g,b,o("div",k,[s(d,{to:"/"},{default:a(()=>[s(_,{type:"primary",size:"large"},{default:a(()=>[t("\u8FD4\u56DE\u9996\u9875")]),_:1})]),_:1}),s(_,{class:"error-btn",type:"primary",size:"large",onClick:n},{default:a(()=>[t("\u8FD4\u56DE\u4E0A\u4E00\u9875")]),_:1})])])}}});const I=v(y,[["__scopeId","data-v-d4771405"]]);export{I as default};

View File

@ -1 +0,0 @@
import{m as s}from"./manage-list.20233657.js";import{s as t}from"./el-input.7b05f86e.js";import{d as n,o as r,c,a as o}from"./index.f92c5f31.js";import"./el-overlay.938d56f5.js";function u(e){return t({url:"/access/gate/manage/getGateList",method:"GET",params:e})}function a(e){return t({url:"/access/gate/manage/editGate",method:"POST",useQS:!0,params:e})}function i(e){return t({url:"/access/gate/manage/deleteGate",method:"POST",useQS:!0,params:e})}function m(e){return t({url:"/access/gate/manage/exportGateList",method:"GET",params:e})}const d={class:"container"},h=n({__name:"access-gate-setting",setup(e){return(f,p)=>(r(),c("div",d,[o(s,{"list-func":u,"add-func":a,"edit-func":a,"delete-func":i,"export-func":m,"edit-permiss":"access-gate-setting"},null,8,["list-func","add-func","edit-func","delete-func","export-func"])]))}});export{h as default};

View File

@ -1 +0,0 @@
import{m as c}from"./manage-list.20233657.js";import{s as m}from"./el-input.7b05f86e.js";import{d as a,o,c as r,a as n}from"./index.f92c5f31.js";import"./el-overlay.938d56f5.js";function p(e){var s,i;let t=JSON.parse(JSON.stringify(e));return delete t.timestamp,Array.isArray(e.timestamp)&&e.timestamp.length==2&&(t.startTime=(s=e.timestamp[0])==null?void 0:s.getTime(),t.endTime=(i=e.timestamp[1])==null?void 0:i.getTime()),m({url:"/access/access-log/manage/getAccessLogList",method:"GET",params:t})}function g(e){var s,i;let t=JSON.parse(JSON.stringify(e));return delete t.timestamp,Array.isArray(e.timestamp)&&e.timestamp.length==2&&(t.startTime=(s=e.timestamp[0])==null?void 0:s.getTime(),t.endTime=(i=e.timestamp[1])==null?void 0:i.getTime()),m({url:"/access/access-log/manage/exportAccessLogList",method:"GET",params:t})}const l={class:"container"},T=a({__name:"access-log",setup(e){return(t,s)=>(o(),r("div",l,[n(c,{"list-func":p,"export-func":g,"edit-permiss":"access-log"},null,8,["list-func","export-func"])]))}});export{T as default};

View File

@ -1 +0,0 @@
import{d as n,E as i,o as _,c as d,a as t,w as m,b as s,u as e,t as o,e as u,f}from"./index.f92c5f31.js";import{E as p}from"./el-card.aaaea6a5.js";const h={class:"container"},v={class:"user-info"},E={class:"user-info-cont"},B={class:"user-info-name"},A=s("div",{class:"user-info-list"},[u(" \u4E0A\u6B21\u767B\u5F55\u65F6\u95F4\uFF1A "),s("span",null,"2022-10-01")],-1),F=s("div",{class:"user-info-list"},[u(" \u4E0A\u6B21\u767B\u5F55\u5730\u70B9\uFF1A "),s("span",null,"\u4E1C\u839E")],-1),g=n({name:"dashboard"}),V=n({...g,setup(x){const a=localStorage.getItem("ms_username"),c=a==="admin"?"\u8D85\u7EA7\u7BA1\u7406\u5458":"\u666E\u901A\u7528\u6237";return(C,b)=>{const r=i,l=p;return _(),d("div",h,[t(l,{shadow:"hover",class:"mgb20",style:{height:"252px"}},{default:m(()=>[s("div",v,[t(r,{size:120,src:e(f)},null,8,["src"]),s("div",E,[s("div",B,o(e(a)),1),s("div",null,o(e(c)),1)])]),A,F]),_:1})])}}});export{V as default};

View File

@ -1 +0,0 @@
import{g as n,h as c,d,i as p,o,c as t,n as r,u as s,r as l,e as i,t as u,j as y,b as m,k as h,_ as f,l as v}from"./index.f92c5f31.js";const S=n({header:{type:String,default:""},bodyStyle:{type:c([String,Object,Array]),default:""},shadow:{type:String,values:["always","hover","never"],default:"always"}}),_=d({name:"ElCard"}),b=d({..._,props:S,setup(C){const a=p("card");return(e,g)=>(o(),t("div",{class:r([s(a).b(),s(a).is(`${e.shadow}-shadow`)])},[e.$slots.header||e.header?(o(),t("div",{key:0,class:r(s(a).e("header"))},[l(e.$slots,"header",{},()=>[i(u(e.header),1)])],2)):y("v-if",!0),m("div",{class:r(s(a).e("body")),style:h(e.bodyStyle)},[l(e.$slots,"default")],6)],2))}});var w=f(b,[["__file","/home/runner/work/element-plus/element-plus/packages/components/card/src/card.vue"]]);const E=v(w);export{E};

View File

@ -1 +0,0 @@
import{g as b,h as u,aW as r,d as p,a9 as k,U as o,i as _,av as g,az as O,o as h,V as w,w as $,r as v,n as j,u as c,k as N,Y as C,_ as x,l as E,ah as S}from"./index.f92c5f31.js";const R=Symbol("rowContextKey"),K=b({tag:{type:String,default:"div"},span:{type:Number,default:24},offset:{type:Number,default:0},pull:{type:Number,default:0},push:{type:Number,default:0},xs:{type:u([Number,Object]),default:()=>r({})},sm:{type:u([Number,Object]),default:()=>r({})},md:{type:u([Number,Object]),default:()=>r({})},lg:{type:u([Number,Object]),default:()=>r({})},xl:{type:u([Number,Object]),default:()=>r({})}}),P=p({name:"ElCol"}),B=p({...P,props:K,setup(f){const t=f,{gutter:l}=k(R,{gutter:o(()=>0)}),a=_("col"),i=o(()=>{const e={};return l.value&&(e.paddingLeft=e.paddingRight=`${l.value/2}px`),e}),m=o(()=>{const e=[];return["span","offset","pull","push"].forEach(s=>{const n=t[s];g(n)&&(s==="span"?e.push(a.b(`${t[s]}`)):n>0&&e.push(a.b(`${s}-${t[s]}`)))}),["xs","sm","md","lg","xl"].forEach(s=>{g(t[s])?e.push(a.b(`${s}-${t[s]}`)):O(t[s])&&Object.entries(t[s]).forEach(([n,y])=>{e.push(n!=="span"?a.b(`${s}-${n}-${y}`):a.b(`${s}-${y}`))})}),l.value&&e.push(a.is("guttered")),[a.b(),e]});return(e,d)=>(h(),w(C(e.tag),{class:j(c(m)),style:N(c(i))},{default:$(()=>[v(e.$slots,"default")]),_:3},8,["class","style"]))}});var L=x(B,[["__file","/home/runner/work/element-plus/element-plus/packages/components/col/src/col.vue"]]);const Y=E(L),A=["start","center","end","space-around","space-between","space-evenly"],D=["top","middle","bottom"],I=b({tag:{type:String,default:"div"},gutter:{type:Number,default:0},justify:{type:String,values:A,default:"start"},align:{type:String,values:D,default:"top"}}),J=p({name:"ElRow"}),T=p({...J,props:I,setup(f){const t=f,l=_("row"),a=o(()=>t.gutter);S(R,{gutter:a});const i=o(()=>{const e={};return t.gutter&&(e.marginRight=e.marginLeft=`-${t.gutter/2}px`),e}),m=o(()=>[l.b(),l.is(`justify-${t.justify}`,t.justify!=="start"),l.is(`align-${t.align}`,t.align!=="top")]);return(e,d)=>(h(),w(C(e.tag),{class:j(c(m)),style:N(c(i))},{default:$(()=>[v(e.$slots,"default")]),_:3},8,["class","style"]))}});var U=x(T,[["__file","/home/runner/work/element-plus/element-plus/packages/components/row/src/row.vue"]]);const q=E(U);export{Y as E,q as a};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
import{d as C,dK as x,aI as N,R as S,dL as k,bg as R,X as D,o as B,c as E,b as d,t as h,u as l,a as o,w as a,aL as T,e as q,j as K,bM as f,aU as L,c9 as v,dM as M,dN as U,bS as j}from"./index.f92c5f31.js";import{E as A,t as $,v as O}from"./el-input.7b05f86e.js";import{b as X}from"./user.c71eb139.js";const z={class:"login-wrap"},G={class:"login-container"},H={class:"ms-login"},J={class:"ms-title"},P={class:"login-btn"},Q={key:0,class:"company-info"},W=C({__name:"login",setup(Y){const _=x(),r=N({username:"admin",password:"admin"}),V={username:[{required:!0,message:"\u8BF7\u8F93\u5165\u7528\u6237\u540D",trigger:"blur"}],password:[{required:!0,message:"\u8BF7\u8F93\u5165\u5BC6\u7801",trigger:"blur"}]},p=S(),I=g=>{!g||g.validate(async(s,u)=>{if(!s){console.log("invalidFields",u),Object.values(u).forEach(e=>{e.forEach(t=>{f.error({message:t.message,grouping:!0})})});return}X({username:r.username,password:r.password}).then(async e=>{var i,c,m,n,y,F,w,b;if(!e)return;if(console.log("login data",e,e.userInfo),![1,2].includes((i=e.userInfo)==null?void 0:i.roleId)){f.error("\u60A8\u6240\u5728\u7528\u6237\u7EC4\u65E0\u6743\u767B\u5F55\u5F53\u524D\u7CFB\u7EDF");return}f.success("\u767B\u5F55\u6210\u529F"),localStorage.setItem("ms_username",(c=e.userInfo)==null?void 0:c.username),localStorage.setItem("ms_realname",(m=e.userInfo)==null?void 0:m.realname),localStorage.setItem("ms_user_id",(n=e.userInfo)==null?void 0:n.id),localStorage.setItem("ms_role_id",(y=e.userInfo)==null?void 0:y.roleId);let t=(b=(w=(F=_.currentRoute)==null?void 0:F.value)==null?void 0:w.query)==null?void 0:b.redirectTo;t&&!t.includes("/login")?_.push(t):_.push("/")})})};return k().clearTags(),(g,s)=>{const u=L,e=A,t=$,i=R("Right"),c=D,m=O;return B(),E("div",z,[d("div",G,[d("div",H,[d("div",J,h(l(v).siteFullTitle),1),o(m,{model:r,rules:V,ref_key:"login",ref:p,"label-width":"0px",class:"ms-content"},{default:a(()=>[o(t,{prop:"username"},{default:a(()=>[o(e,{modelValue:r.username,"onUpdate:modelValue":s[0]||(s[0]=n=>r.username=n),placeholder:"\u7528\u6237\u540D"},{prepend:a(()=>[o(u,{icon:l(M)},null,8,["icon"])]),_:1},8,["modelValue"])]),_:1}),o(t,{prop:"password"},{default:a(()=>[o(e,{type:"password",placeholder:"\u5BC6\u7801",modelValue:r.password,"onUpdate:modelValue":s[1]||(s[1]=n=>r.password=n),onKeyup:s[2]||(s[2]=T(n=>I(p.value),["enter"]))},{prepend:a(()=>[o(u,{icon:l(U)},null,8,["icon"])]),_:1},8,["modelValue"])]),_:1}),d("div",P,[o(u,{type:"primary",onClick:s[3]||(s[3]=n=>I(p.value))},{default:a(()=>[q(" \u767B \u5F55\xA0"),o(c,null,{default:a(()=>[o(i)]),_:1})]),_:1})])]),_:1},8,["model"])])]),l(v).companyName?(B(),E("div",Q,h(l(v).companyName),1)):K("",!0)])}}});const te=j(W,[["__scopeId","data-v-ae431c4c"]]);export{te as default};

View File

@ -1 +0,0 @@
import{m as t}from"./manage-list.20233657.js";import{g as s,e,d as r,a as n}from"./user.c71eb139.js";import{d as i,o as a,c as o,a as c}from"./index.f92c5f31.js";import"./el-overlay.938d56f5.js";import"./el-input.7b05f86e.js";const d={class:"container"},U=i({__name:"privilege-user-setting",setup(p){return(u,f)=>(a(),o("div",d,[c(t,{"list-func":s,"add-func":e,"edit-func":e,"delete-func":r,"export-func":n,"edit-permiss":"privilege-user-setting"},null,8,["list-func","add-func","edit-func","delete-func","export-func"])]))}});export{U as default};

View File

@ -1 +0,0 @@
import{m}from"./manage-list.20233657.js";import{s}from"./el-input.7b05f86e.js";import{d as o,o as n,c as a,a as p}from"./index.f92c5f31.js";import"./el-overlay.938d56f5.js";function c(e){var r,i;let t=JSON.parse(JSON.stringify(e));return delete t.timestamp,Array.isArray(e.timestamp)&&e.timestamp.length==2&&(t.startTime=(r=e.timestamp[0])==null?void 0:r.getTime(),t.endTime=(i=e.timestamp[1])==null?void 0:i.getTime()),s({url:"/access/report/manage/getReportList",method:"GET",params:t})}function l(e){var r,i;let t=JSON.parse(JSON.stringify(e));return delete t.timestamp,Array.isArray(e.timestamp)&&e.timestamp.length==2&&(t.startTime=(r=e.timestamp[0])==null?void 0:r.getTime(),t.endTime=(i=e.timestamp[1])==null?void 0:i.getTime()),s({url:"/access/report/manage/exportReportList",method:"GET",params:t})}const u={class:"container"},T=o({__name:"report-log",setup(e){return(t,r)=>(n(),a("div",u,[p(m,{"list-func":c,"export-func":l,"edit-permiss":"privilege-user-setting"},null,8,["list-func","export-func"])]))}});export{T as default};

View File

@ -1 +0,0 @@
import{m as a}from"./manage-list.20233657.js";import{s as t}from"./el-input.7b05f86e.js";import{d as n,o as r,c as s,a as u}from"./index.f92c5f31.js";import"./el-overlay.938d56f5.js";function c(e){return t({url:"/shop/good/manage/getCategoryList",method:"GET",params:e})}function o(e){return t({url:"/shop/good/manage/editCategory",method:"POST",useQS:!0,params:e})}function d(e){return t({url:"/shop/good/manage/deleteCategory",method:"POST",useQS:!0,params:e})}function i(e){return t({url:"/shop/good/manage/exportCategoryList",method:"GET",params:e})}const m={class:"container"},C=n({__name:"shop-cate-setting",setup(e){return(p,f)=>(r(),s("div",m,[u(a,{"list-func":c,"add-func":o,"edit-func":o,"delete-func":d,"export-func":i,"edit-permiss":"shop-cate-setting"},null,8,["list-func","add-func","edit-func","delete-func","export-func"])]))}});export{C as default};

View File

@ -1 +0,0 @@
import{m as n}from"./manage-list.20233657.js";import{s as o}from"./el-input.7b05f86e.js";import{d as s,o as r,c as d,a}from"./index.f92c5f31.js";import"./el-overlay.938d56f5.js";function u(e){return o({url:"/shop/good/manage/getGoodList",method:"GET",params:e})}function t(e){return o({url:"/shop/good/manage/editGood",method:"POST",useQS:!0,params:e})}function i(e){return o({url:"/shop/good/manage/deleteGood",method:"POST",useQS:!0,params:e})}function c(e){return o({url:"/shop/good/manage/exportGoodList",method:"GET",params:e})}const m={class:"container"},G=s({__name:"shop-good-setting",setup(e){return(p,f)=>(r(),d("div",m,[a(n,{"list-func":u,"add-func":t,"edit-func":t,"delete-func":i,"export-func":c,"edit-permiss":"shop-good-setting"},null,8,["list-func","add-func","edit-func","delete-func","export-func"])]))}});export{G as default};

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
import{s as r}from"./el-input.7b05f86e.js";function a({username:e,password:s}){return r({url:"/user/login",method:"POST",useQS:!0,params:{username:e,password:s}})}function n({oldpwd:e,newpwd:s}){let t=localStorage.getItem("ms_user_id");return r({url:"/user/updatePwd",method:"POST",useQS:!0,params:{userId:t,oldpwd:e,newpwd:s}})}function d(e){return r({url:"/user/manage/getUserList",method:"GET",params:e})}function o(e){return r({url:"/user/manage/editUser",method:"POST",useQS:!0,params:e})}function m(e){return r({url:"/user/manage/deleteUser",method:"POST",useQS:!0,params:e})}function i(e){return r({url:"/user/manage/exportUserList",method:"GET",params:e})}export{i as a,a as b,m as d,o as e,d as g,n as u};

View File

@ -125,9 +125,18 @@ public class GoodController {
"商品名称", FieldBuilder.EDIT_PLACEHOLDER_SAME_AS_ADD_PLACEHOLDER,
FieldRuleListBuilder.create()
.add(FieldRuleBuilder.create("商品名称").required())
.add(FieldRuleBuilder.create("商品名称").minMax(6, 20)),
.add(FieldRuleBuilder.create("商品名称").minMax(2, 20)),
"DPD @cword(6, 20)"
)
.add("brief", "brief", "商品简介", "暂无简介",
FieldType.LONG_TEXT, SearchType.INPUT, AddType.INPUT, EditType.INPUT,
FieldBuilder.SEARCH_PLACEHOLDER_SAME_AS_FIELDNAME,
"商品简介", FieldBuilder.EDIT_PLACEHOLDER_SAME_AS_ADD_PLACEHOLDER,
FieldRuleListBuilder.create()
.add(FieldRuleBuilder.create("商品简介").required())
.add(FieldRuleBuilder.create("商品简介").minMax(2, 30)),
"DPD @cword(15, 30)"
)
.add("categoryId", "categoryName", "所属分类", "",
FieldType.TEXT, SearchType.SELECT, AddType.SELECT, EditType.SELECT,
"商品分类",
@ -142,18 +151,9 @@ public class GoodController {
"商品品牌", FieldBuilder.EDIT_PLACEHOLDER_SAME_AS_ADD_PLACEHOLDER,
FieldRuleListBuilder.create()
.add(FieldRuleBuilder.create("商品品牌").required())
.add(FieldRuleBuilder.create("商品品牌").minMax(6, 20)),
.add(FieldRuleBuilder.create("商品品牌").minMax(2, 20)),
"DPD @cword(6, 15)"
)
.add("brief", "brief", "商品简介", "暂无简介",
FieldType.HIDDEN, SearchType.INPUT, AddType.INPUT, EditType.INPUT,
FieldBuilder.SEARCH_PLACEHOLDER_SAME_AS_FIELDNAME,
"商品简介", FieldBuilder.EDIT_PLACEHOLDER_SAME_AS_ADD_PLACEHOLDER,
FieldRuleListBuilder.create()
.add(FieldRuleBuilder.create("商品简介").required())
.add(FieldRuleBuilder.create("商品简介").minMax(6, 30)),
"DPD @cword(15, 30)"
)
.add("isOnSale", "isOnSaleDisplay", "状态", true,
FieldType.TEXT, SearchType.SELECT, AddType.SELECT, EditType.SELECT,
FieldBuilder.SEARCH_PLACEHOLDER_SAME_AS_FIELDNAME,

View File

@ -45,7 +45,9 @@
AND category_id = #{cateId}
</if>
<if test="searchText != null">
AND goods_name LIKE concat('%',#{searchText,jdbcType=VARCHAR},'%')
AND
( goods_name LIKE concat('%',#{searchText,jdbcType=VARCHAR},'%')
OR brief LIKE concat('%',#{searchText,jdbcType=VARCHAR},'%'))
</if>
order by `sort_order` asc
</select>

File diff suppressed because it is too large Load Diff