@ -0,0 +1,5 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<excludeFolder url="file://$MODULE_DIR$/temp" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/demo.iml" filepath="$PROJECT_DIR$/.idea/demo.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,5 @@
|
||||
module.exports = {
|
||||
presets: [
|
||||
'@vue/cli-plugin-babel/preset'
|
||||
]
|
||||
}
|
@ -0,0 +1 @@
|
||||
#app{font-family:Avenir,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-align:center;color:#2c3e50;margin-top:60px}.router-view{width:100%;height:auto;position:absolute;top:0;bottom:0;margin:0;left:0;-webkit-overflow-scrolling:touch}
|
@ -0,0 +1 @@
|
||||
.el-divider--horizontal[data-v-3a4480b8]{margin:0}div.app-cart[data-v-3a4480b8]{display:flex;min-height:100vh;flex-direction:column}.cart-body[data-v-3a4480b8]{flex:1;display:flex;flex-direction:column;justify-content:center;margin-top:20px}.tableCardDiv[data-v-3a4480b8]{margin:0 auto}.tableCard[data-v-3a4480b8]{margin-bottom:30px}div.totalPriceDiv[data-v-3a4480b8]{display:flex;flex-direction:row;justify-content:flex-end;margin-top:20px}.totalPrice[data-v-3a4480b8]{font-weight:700;font-size:37px;margin-right:10px}div.createOrder[data-v-3a4480b8]{display:flex;flex-direction:row;justify-content:flex-end;margin-top:20px}div.app-header[data-v-3a4480b8]{position:sticky;top:0;z-index:99}.createOrderButton[data-v-3a4480b8]{width:200px;font-weight:700;font-size:20px;margin-right:10px;margin-bottom:10px}
|
@ -0,0 +1 @@
|
||||
div.login-left-div[data-v-fd61066c]{display:flex;flex-direction:row;align-items:center}div.login-left-border[data-v-fd61066c]{border-right-width:2px;border-right-color:#f2f3f5;border-right-style:solid;height:200px;margin-right:50px;margin-left:200px}div.cover[data-v-fd61066c]{position:relative}div.cover[data-v-fd61066c]:after{position:absolute;content:"";width:100%;height:100%;top:0;left:0;box-shadow:inset 0 0 50px 30px #fff}.userNameInput[data-v-631182ba]{width:230px}.loginButton[data-v-631182ba]{margin-right:50px}div.login-right-div[data-v-631182ba]{display:flex;flex-direction:column;justify-content:center}div.app-login[data-v-5138cc1e]{display:flex;flex-direction:column;overflow-y:scroll;min-height:100vh}div.login-main[data-v-5138cc1e]{display:flex;flex-direction:row;justify-content:center;flex:1;margin-top:-50px}.el-divider--horizontal[data-v-5138cc1e]{margin:0}.login-title[data-v-5138cc1e]{font-weight:700;color:#111;font-size:50px;margin-top:30px}div.app-header[data-v-5138cc1e]{position:sticky;top:0;z-index:99}
|
@ -0,0 +1 @@
|
||||
.el-divider--horizontal[data-v-58b43baa]{margin:0}div.app-register[data-v-58b43baa]{display:flex;flex-direction:column;justify-content:center;min-height:100vh}div.register-main[data-v-58b43baa]{flex:1;background-image:url(../img/background.467f696a.jpg);background-size:100% 100%}.register-card[data-v-58b43baa]{width:391px;height:520px;margin-left:60%;margin-top:30px;padding:10px}span.register-title[data-v-58b43baa]{font-weight:700;color:#111;font-size:30px}.registerButton[data-v-58b43baa]{margin-right:100px}div.app-header[data-v-58b43baa]{position:sticky;top:0;z-index:99}
|
@ -0,0 +1 @@
|
||||
.el-divider--horizontal[data-v-7f473ac2]{margin:0}div.app-myInfo[data-v-7f473ac2]{display:flex;min-height:100vh;flex-direction:column}.myInfo-body[data-v-7f473ac2]{flex:1;display:flex;flex-direction:row;justify-content:center;margin-top:20px}.editCard[data-v-7f473ac2]{width:391px;height:520px;padding:10px}.editButtonItem[data-v-7f473ac2]{margin-top:10px}.editButton[data-v-7f473ac2]{width:100px;margin-right:60px}.resetButton[data-v-7f473ac2]{width:100px}
|
@ -0,0 +1 @@
|
||||
.el-divider--horizontal[data-v-9e06330e]{margin:0}div.app-verifyEntrust[data-v-9e06330e]{display:flex;min-height:100vh;flex-direction:column}.verifyEntrust-body[data-v-9e06330e]{flex:1;display:flex;flex-direction:column;justify-content:center;margin-top:20px}.verifyEntrust-table th[data-v-9e06330e]{margin-left:10px}.tableCardDiv[data-v-9e06330e]{margin:0 auto}.tableCard[data-v-9e06330e]{margin-bottom:30px}div.app-header[data-v-9e06330e]{position:sticky;top:0;z-index:99}
|
@ -0,0 +1 @@
|
||||
.el-divider--horizontal[data-v-055e03d9]{margin:0}.app-publishEntrust[data-v-055e03d9]{display:flex;min-height:100vh;flex-direction:column}.publishEntrust-body[data-v-055e03d9]{flex:1;display:flex;margin-top:50px}.formTable[data-v-055e03d9]{margin:0 auto}div.app-header[data-v-055e03d9]{position:sticky;top:0;z-index:99}
|
@ -0,0 +1 @@
|
||||
div.app-search[data-v-10374396]{display:flex;flex-direction:column;min-height:100vh}div.search-main[data-v-10374396]{flex:1;background-size:100% 100%}.searchBreadcrumb[data-v-10374396]{margin-left:70px;margin-top:20px;margin-bottom:20px}span.searchKeyTitle[data-v-10374396]{font-weight:700;color:#111;font-size:37px}div.searchKey[data-v-10374396]{left:200px;margin-top:30px;margin-left:-1200px}.searchCard[data-v-10374396]{width:90%;margin:0 auto;display:flex;flex-wrap:wrap;flex-direction:row;padding:0}.searchItem[data-v-10374396]{margin-left:50px;margin-top:30px;margin-bottom:20px}.searchDiv[data-v-10374396]{display:flex;flex-direction:row;justify-content:left;flex-wrap:wrap}.el-menu.el-menu--horizontal{border:0}.el-divider--horizontal{margin:0}div.app-header{position:sticky;top:0;z-index:99}div.orderOption{margin-bottom:10px}
|
@ -0,0 +1 @@
|
||||
.el-divider--horizontal[data-v-38702800]{margin:0}.app-editEntrust[data-v-38702800]{display:flex;min-height:100vh;flex-direction:column}.editEntrust-body[data-v-38702800]{flex:1;display:flex;margin-top:50px}.formTable[data-v-38702800]{margin:0 auto}div.app-header[data-v-38702800]{position:sticky;top:0;z-index:99}
|
@ -0,0 +1 @@
|
||||
.carousel-card[data-v-4158376e]{width:100%;height:700px;display:flex;flex-direction:column;justify-content:center}.carousel-card img[data-v-4158376e]{width:100%;height:auto}div.home-carousel[data-v-4158376e]{display:flex;flex-direction:row;justify-content:center}.el-card__body{padding:0}div.discount-card-div[data-v-1119cf8c]{display:flex;flex-direction:row;justify-content:center;padding-left:80px}.discount-card[data-v-1119cf8c]{width:600px;height:350px;margin:0 auto}span.discount-title[data-v-1119cf8c]{font-weight:700;color:#111;font-size:37px}div.home-recommend-body[data-v-328ce212]{display:flex;flex-direction:row;justify-content:center}div.recommend-card-div[data-v-328ce212]{width:91%;height:auto}span.recommend-title[data-v-328ce212]{font-weight:700;color:#111;font-size:37px}.recommend-row[data-v-328ce212]{display:flex;flex-direction:row;justify-content:center;margin-top:30px;padding:20px}.recommend-row-item[data-v-328ce212]{padding:0}img.recommend-row-item-img[data-v-328ce212]{width:100%;height:300px;border-radius:5px}.recommend-row-carousel[data-v-328ce212]{width:100%}.el-divider--horizontal[data-v-50a58f05]{margin:0}div.app-home[data-v-50a58f05]{display:flex;flex-direction:column;justify-content:space-between;overflow-y:scroll}span.carousel-title[data-v-50a58f05]{font-weight:700;color:#111;font-size:37px}div.app-header[data-v-50a58f05]{position:sticky;top:0;z-index:99}
|
@ -0,0 +1 @@
|
||||
.detail-head[data-v-2cade05f]{margin-top:30px}.goodsImg[data-v-2cade05f]{max-height:600px;max-width:500px;width:auto;height:auto;border-radius:5px}.totalDayShow[data-v-2cade05f]{font-weight:700;font-size:30px;margin-top:10px}.datePick[data-v-2cade05f]{margin-bottom:30px}.rentSinglePrice[data-v-2cade05f]{font-size:30px;font-weight:700}.totalPrice[data-v-2cade05f]{font-weight:700;font-size:50px;margin-top:10px}.total[data-v-2cade05f]{margin-bottom:20px}.searchBreadcrumb[data-v-2cade05f]{margin-bottom:15px}.detail-body[data-v-22aef2cf]{display:flex;justify-content:center;margin-top:20px}.detailCard[data-v-22aef2cf]{width:95%}.el-divider--horizontal[data-v-22aef2cf],.el-divider--horizontal[data-v-dc04f3ee]{margin:0}div.app-header[data-v-dc04f3ee]{position:sticky;top:0;z-index:99}
|
@ -0,0 +1 @@
|
||||
div.app-header[data-v-313e3313]{width:100%;height:80px;background-color:#fff;display:flex;flex-direction:row;justify-content:flex-start;align-items:center}img.header-icon[data-v-313e3313]{width:60px;height:auto;margin-left:50px;margin-right:20px}.header-nav[data-v-313e3313]{margin-left:30px;font-weight:700}.goods-menu[data-v-313e3313]{width:500px;height:auto}div.childrenCategoryPanel[data-v-313e3313]{display:flex;flex-direction:row;justify-content:left;align-items:flex-start}div.childrenCategoryItem[data-v-313e3313]{width:90px;height:90px;display:flex;flex-direction:column;align-items:center}div.childrenCategoryItem img[data-v-313e3313]{width:30px;height:30px}.childrenCategoryItemTitle-active[data-v-313e3313]{text-decoration:none}.childrenCategoryItemTitle[data-v-313e3313]{color:#6495ed}.loginButton[data-v-313e3313]{margin-left:80px;margin-right:20px}.loginButton[data-v-313e3313],.registerButton[data-v-313e3313]{font-weight:700;color:#111}.searchInput[data-v-313e3313]{width:500px;margin-left:50px}.header-myName[data-v-313e3313]{margin-left:30px}.cartButton[data-v-313e3313]{margin-right:10px}.editInfoButton[data-v-313e3313]{margin-right:15px}.searchInput .el-button.el-button--default,.searchInput .el-input-group__append,.searchInput .el-input__inner{background-color:#f5f5f5;border-color:#f5f5f5}.el-menu.el-menu--horizontal{border:0}div.childrenCategoryPanel{max-width:700px;display:flex;flex-direction:row;justify-content:left;flex-wrap:wrap}div.footer[data-v-eae00f6e]{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;padding-bottom:10px;padding-top:10px}span.footerTitle[data-v-eae00f6e]{color:#5e5e60;margin-left:100px;margin-right:700px}span.footerSpan[data-v-eae00f6e]{color:#5e5e60;margin-left:20px;font-size:10px}
|
@ -0,0 +1 @@
|
||||
.el-divider--horizontal[data-v-4c409a12]{margin:0}div.app-myOrder[data-v-4c409a12]{display:flex;min-height:100vh;flex-direction:column;overflow-y:scroll}.myOrder-body[data-v-4c409a12]{flex:1;display:flex;flex-direction:column;justify-content:center;margin-top:20px}.myOrder-table th[data-v-4c409a12]{margin-left:10px}.tableCardDiv[data-v-4c409a12]{margin:0 auto}.tableCard[data-v-4c409a12]{margin-bottom:30px}.orderTitle[data-v-4c409a12]{display:flex;flex-direction:row;justify-content:space-between}div.app-header[data-v-4c409a12]{position:sticky;top:0;z-index:99}
|
After Width: | Height: | Size: 4.2 KiB |
After Width: | Height: | Size: 6.9 KiB |
After Width: | Height: | Size: 8.2 MiB |
After Width: | Height: | Size: 92 KiB |
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="favicon.ico"><title>recommend</title><link href="css/chunk-1bd82549.1aa4a9e0.css" rel="prefetch"><link href="css/chunk-2116cc62.6152ef83.css" rel="prefetch"><link href="css/chunk-29274228.b580ba1a.css" rel="prefetch"><link href="css/chunk-29c6aa4c.82e49dd0.css" rel="prefetch"><link href="css/chunk-2aa38a4c.ac868c00.css" rel="prefetch"><link href="css/chunk-2df4187e.d21b4853.css" rel="prefetch"><link href="css/chunk-32b71ca9.111f9e99.css" rel="prefetch"><link href="css/chunk-34b74788.463a54b0.css" rel="prefetch"><link href="css/chunk-3851f843.0b0af127.css" rel="prefetch"><link href="css/chunk-58653ef2.bc97859b.css" rel="prefetch"><link href="css/chunk-99a8997e.941c50f9.css" rel="prefetch"><link href="css/chunk-be15c974.b2a5216a.css" rel="prefetch"><link href="js/chunk-1bd82549.ad11e70a.js" rel="prefetch"><link href="js/chunk-2116cc62.0a3fbf13.js" rel="prefetch"><link href="js/chunk-29274228.2de2bdd6.js" rel="prefetch"><link href="js/chunk-29c6aa4c.d3d6605b.js" rel="prefetch"><link href="js/chunk-2aa38a4c.4fa71200.js" rel="prefetch"><link href="js/chunk-2df4187e.887d1970.js" rel="prefetch"><link href="js/chunk-32b71ca9.83de87ff.js" rel="prefetch"><link href="js/chunk-34b74788.305efea2.js" rel="prefetch"><link href="js/chunk-3851f843.d5ff1500.js" rel="prefetch"><link href="js/chunk-58653ef2.55e37243.js" rel="prefetch"><link href="js/chunk-99a8997e.d9434408.js" rel="prefetch"><link href="js/chunk-be15c974.c8f18af5.js" rel="prefetch"><link href="css/app.f7c433db.css" rel="preload" as="style"><link href="css/chunk-vendors.85907e0d.css" rel="preload" as="style"><link href="js/app.28bf8cfa.js" rel="preload" as="script"><link href="js/chunk-vendors.bee969bd.js" rel="preload" as="script"><link href="css/chunk-vendors.85907e0d.css" rel="stylesheet"><link href="css/app.f7c433db.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but recommend doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="js/chunk-vendors.bee969bd.js"></script><script src="js/app.28bf8cfa.js"></script></body></html>
|
@ -0,0 +1,2 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1bd82549"],{2166:function(t,e,a){"use strict";a.d(e,"a",(function(){return s})),a.d(e,"d",(function(){return o})),a.d(e,"c",(function(){return r})),a.d(e,"b",(function(){return c}));var i=a("a27e");function s(t){return i["a"].post("/cart/add",t)}function o(t){return i["a"].post("/cart/list",t)}function r(t){return i["a"].post("/cart/delete",t)}function c(t){return i["a"].post("/order/addOrderByCart",t)}},5931:function(t,e,a){"use strict";a("e257")},bf12:function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("transition",{attrs:{name:"el-fade-in-linear"}},[a("div",{staticClass:"app-cart"},[a("div",{staticClass:"app-header"},[a("appHeader"),a("el-divider")],1),a("div",{staticClass:"cart-body"},[a("div",{staticClass:"tableCardDiv"},[a("el-card",{staticClass:"box-card tableCard"},[a("div",{staticClass:"clearfix orderTitle",attrs:{slot:"header"},slot:"header"},[a("span",[t._v("购物车")])]),a("table",{staticClass:"cart-table",attrs:{border:"0",cellspacing:"50px"}},[a("tr",[a("th",[t._v("图片")]),a("th",[t._v("名称")]),a("th",[t._v("价格")]),a("th",[t._v("数量")]),a("th",[t._v("删除")])]),t._l(t.cartItemList,(function(e){return a("tr",{key:e.cartItemId},[a("td",[a("img",{staticClass:"goodsImg",staticStyle:{width:"70px",height:"70px"},attrs:{src:t.getImgUrl(e.goodsCoverImg)}})]),a("td",[t._v(t._s(e.goodsName))]),a("td",[t._v(" "+t._s(e.price)+" ")]),a("td",[a("el-input-number",{attrs:{min:1,max:100,label:"物品数量"},on:{change:function(a){return t.calSingleTotalPrice(e)}},model:{value:e.goodsCount,callback:function(a){t.$set(e,"goodsCount",a)},expression:"item.goodsCount"}})],1),a("td",[a("el-date-picker",{attrs:{type:"date",placeholder:"选择租赁起始日期"},on:{change:function(a){return t.calTotalDay(e)}},model:{value:e.createTime,callback:function(a){t.$set(e,"createTime",a)},expression:"item.createTime"}})],1),a("td",[a("el-date-picker",{attrs:{type:"date",placeholder:"选择租赁结束日期"},on:{change:function(a){return t.calTotalDay(e)}},model:{value:e.endTime,callback:function(a){t.$set(e,"endTime",a)},expression:"item.endTime"}})],1),a("td",[a("el-dialog",{attrs:{title:"删除",visible:t.dialogVisible,width:"30%"},on:{"update:visible":function(e){t.dialogVisible=e}}},[a("span",[t._v("确认是否删除?")]),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(e){t.dialogVisible=!1}}},[t._v("取 消")]),a("el-button",{attrs:{type:"primary"},on:{click:function(a){return t.deleteCartItem(e.cartItemId)}}},[t._v("确 定")])],1)]),a("el-button",{attrs:{slot:"reference",type:"danger"},on:{click:function(e){t.dialogVisible=!0}},slot:"reference"},[t._v("删除")])],1)])}))],2),a("el-divider"),a("div",{staticClass:"totalPriceDiv"},[a("span",{staticClass:"totalPrice"},[t._v(" 总计:"+t._s(this.totalPrice)+" ")])]),a("div",{staticClass:"createOrder"},[a("el-button",{staticClass:"createOrderButton",attrs:{type:"success"},on:{click:t.addOrder}},[t._v("确认下单")])],1)],1)],1)]),a("div",{staticClass:"app-footer"},[a("el-divider"),a("appFooter",{staticClass:"app-footer"})],1)])])},s=[],o=(a("14d9"),a("f392")),r=a("2c4b"),c=a("2166"),l={name:"cart",components:{appHeader:o["a"],appFooter:r["a"]},data(){return{cartItemList:"",dialogVisible:!1,totalPrice:""}},methods:{async getList(){try{await Object(c["d"])({}).then(t=>{this.cartItemList=t;for(let e=0;e<this.cartItemList.length;e++)this.cartItemList[e]["totalDay"]=[],this.cartItemList[e]["singleTotalPrice"]=this.cartItemList[e].price;console.log(this.cartItemList)})}catch(t){console.log(t)}},async deleteCartItem(t){try{await Object(c["c"])({cartItemId:t}).then(t=>{console.log(t)})}catch(e){console.log(e)}this.dialogVisible=!1,alert("删除成功"),await this.$router.push({name:"cart",query:{t:Date.now()}})},getImgUrl(t){return this.$store.state.baseUrl+"/img/"+t+".jpg"},date(t){console.log(t)},calTotalPrice(){let t=0;for(let e=0;e<this.cartItemList.length;e++)t+=this.cartItemList[e].singleTotalPrice;this.totalPrice=t.toString(),console.log(this.totalPrice)},calSingleTotalPrice(t){t.singleTotalPrice=t.price*t.goodsCount*t.totalDay,this.calTotalPrice(),console.log(t.totalDay),console.log(t.singleTotalPrice)},calTotalDay(t){let e=t.endTime-t.createTime,a=e/36e5/24;t.totalDay=a,console.log(a),console.log(t.createTime),this.calSingleTotalPrice(t),this.calTotalPrice()},async addOrder(){try{await Object(c["b"])({cartItemList:this.cartItemList,totalPrice:this.totalPrice}).then(t=>{console.log(t),this.openSuccess(),this.$router.push({name:"home",query:{t:Date.now()}})})}catch(t){console.log(t)}},openSuccess(){this.$message({message:"恭喜你,下单成功!",type:"success"})}},mounted(){this.getList()},beforeRouteUpdate(){this.getList()}},n=l,d=(a("5931"),a("2877")),u=Object(d["a"])(n,i,s,!1,null,"3a4480b8",null);e["default"]=u.exports},e257:function(t,e,a){}}]);
|
||||
//# sourceMappingURL=chunk-1bd82549.ad11e70a.js.map
|
@ -0,0 +1,2 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2116cc62"],{"15b6":function(e,t,s){},"3aed":function(e,t,s){"use strict";s("e374")},a86a:function(e,t,s){"use strict";s.r(t);var r=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("transition",{attrs:{name:"el-fade-in-linear"}},[s("div",{staticClass:"app-login"},[s("div",{staticClass:"app-header"},[s("appHeader"),s("el-divider")],1),s("div",{staticClass:"login-title"},[e._v("登录")]),s("div",{staticClass:"login-main"},[s("login-left"),s("login-right")],1),s("div",{staticClass:"app-footer"},[s("el-divider"),s("appFooter",{staticClass:"app-footer"})],1)])])},o=[],a=function(){var e=this,t=e.$createElement;e._self._c;return e._m(0)},l=[function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"login-left-div"},[r("div",{staticClass:"cover"},[r("img",{attrs:{src:s("9b14")}})]),r("div",{staticClass:"login-left-border"})])}],i={name:"login-left"},n=i,c=(s("3aed"),s("2877")),u=Object(c["a"])(n,a,l,!1,null,"fd61066c",null),m=u.exports,p=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"login-right-div"},[s("el-form",{ref:"loginForm",attrs:{"label-width":"100px",rules:e.rules,model:e.ruleForm}},[s("el-form-item",{attrs:{label:"用户名",prop:"userName"}},[s("el-input",{staticClass:"userNameInput",attrs:{type:"text",autocomplete:"off",size:"small",placeholder:"用户名"},model:{value:e.ruleForm.userName,callback:function(t){e.$set(e.ruleForm,"userName",t)},expression:"ruleForm.userName"}})],1),s("el-form-item",{attrs:{label:"密码",prop:"passWord"}},[s("el-input",{attrs:{type:"password",autocomplete:"off",size:"small",placeholder:"密码"},model:{value:e.ruleForm.passWord,callback:function(t){e.$set(e.ruleForm,"passWord",t)},expression:"ruleForm.passWord"}})],1),s("el-form-item",[s("el-button",{staticClass:"loginButton",attrs:{type:"primary"},on:{click:function(t){return e.submitLogin("loginForm")}}},[e._v("提交")]),s("el-button",{on:{click:function(t){return e.resetForm("loginForm")}}},[e._v("重置")])],1)],1)],1)},d=[],f=(s("14d9"),s("c24f")),g={name:"login-right",data(){return{ruleForm:{userName:"",passWord:""},rules:{userName:[{required:!0,message:"请输入用户名",trigger:"blur"},{min:3,max:20,message:"用户名长度在3到20个字符",trigger:"blur"}],passWord:[{required:!0,message:"请输入密码",trigger:"blur"},{min:3,max:30,trigger:"blur"}]}}},methods:{submitLogin(e){this.$refs[e].validate(e=>{if(!e)return console.log("error submit!!"),!1;this.onSubmit()})},resetForm(e){this.$refs[e].resetFields()},async onSubmit(){try{await Object(f["c"])({userName:this.ruleForm.userName,passWord:this.ruleForm.passWord}).then(e=>{localStorage.setItem("token",e.toString()),console.log(e),console.log(localStorage.getItem("token")),this.openSuccess(),this.$router.push({name:"home"})})}catch(e){console.log(e)}},openSuccess(){this.$message({message:"恭喜你,登录成功!",type:"success"})}}},b=g,h=(s("e4f4"),Object(c["a"])(b,p,d,!1,null,"631182ba",null)),v=h.exports,F=s("f392"),C=s("2c4b"),_={name:"login",components:{loginLeft:m,appHeader:F["a"],appFooter:C["a"],loginRight:v}},$=_,k=(s("f503"),Object(c["a"])($,r,o,!1,null,"5138cc1e",null));t["default"]=k.exports},bc06:function(e,t,s){},e374:function(e,t,s){},e4f4:function(e,t,s){"use strict";s("bc06")},f503:function(e,t,s){"use strict";s("15b6")}}]);
|
||||
//# sourceMappingURL=chunk-2116cc62.0a3fbf13.js.map
|
@ -0,0 +1,2 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-29c6aa4c"],{1823:function(e,t,r){"use strict";r.r(t);var s=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("transition",{attrs:{name:"el-fade-in-linear"}},[r("div",{staticClass:"app-myInfo"},[r("div",{staticClass:"app-header"},[r("appHeader"),r("el-divider")],1),r("div",{staticClass:"myInfo-body"},[r("el-card",{staticClass:"box-card editCard"},[r("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[r("span",[e._v("个人信息修改")])]),r("el-form",{ref:"editForm",attrs:{model:e.editForm,"label-width":"80px",rules:e.editRules,"hide-required-asterisk":"true"}},[r("el-form-item",{attrs:{label:"昵称",prop:"name"}},[r("el-input",{attrs:{type:"text",autocomplete:"off",size:"small",placeholder:"昵称",maxlength:"30","show-word-limit":""},model:{value:e.editForm.name,callback:function(t){e.$set(e.editForm,"name",t)},expression:"editForm.name"}})],1),r("el-form-item",{attrs:{label:"收货地址",prop:"address"}},[r("el-input",{attrs:{type:"text",autocomplete:"off",size:"small",placeholder:"收货地址",maxlength:"50","show-word-limit":""},model:{value:e.editForm.address,callback:function(t){e.$set(e.editForm,"address",t)},expression:"editForm.address"}})],1),r("el-form-item",{attrs:{label:"电话号码",prop:"phone"}},[r("el-input",{attrs:{type:"text",autocomplete:"off",size:"small",placeholder:"电话号码","suffix-icon":"el-icon-mobile-phone"},model:{value:e.editForm.phone,callback:function(t){e.$set(e.editForm,"phone",t)},expression:"editForm.phone"}})],1),r("el-form-item",{attrs:{label:"性别",size:"medium",prop:"sex"}},[r("el-radio-group",{model:{value:e.editForm.sex,callback:function(t){e.$set(e.editForm,"sex",t)},expression:"editForm.sex"}},[r("el-radio",{attrs:{border:"",label:"男"}}),r("el-radio",{attrs:{border:"",label:"女"}})],1)],1),r("el-form-item",{staticClass:"editButtonItem"},[r("el-button",{staticClass:"editButton",attrs:{type:"primary"},on:{click:function(t){return e.submitEdit("editForm")}}},[e._v("提交")]),r("el-button",{staticClass:"resetButton",on:{click:function(t){return e.resetForm("editForm")}}},[e._v("重置")])],1)],1)],1)],1),r("div",{staticClass:"app-footer"},[r("el-divider"),r("appFooter",{staticClass:"app-footer"})],1)])])},a=[],i=r("f392"),o=r("2c4b"),l=r("c24f"),d={name:"myInfo",components:{appHeader:i["a"],appFooter:o["a"]},data(){return{editForm:{sex:"",phone:"",name:"",address:""},editRules:{sex:[{required:!0,message:"请选择性别",trigger:"blur"}],phone:[{required:!0,message:"请输入电话号码",trigger:"blur"},{min:11,max:11,trigger:"blur"}],name:[{required:!0,message:"请输入您的昵称",trigger:"blur"},{min:3,max:30,trigger:"blur"}],address:[{required:!0,message:"请输入您的收货地址",trigger:"blur"},{min:3,max:50,trigger:"blur"}]}}},methods:{submitEdit(e){this.$refs[e].validate(e=>{if(!e)return console.log("error submit!!"),!1;this.onSubmit()})},async onSubmit(){const{data:e}=await Object(l["a"])({name:this.editForm.userName,sex:this.editForm.sex,phone:this.editForm.phone,address:this.editForm.address});window.location.href="/",console.log(e),this.openSuccess()},openSuccess(){this.$message({message:"恭喜你,编辑个人信息成功!",type:"success"})},resetForm(e){this.$refs[e].resetFields()}}},n=d,m=(r("fd71"),r("2877")),c=Object(m["a"])(n,s,a,!1,null,"7f473ac2",null);t["default"]=c.exports},"4aa1":function(e,t,r){},fd71:function(e,t,r){"use strict";r("4aa1")}}]);
|
||||
//# sourceMappingURL=chunk-29c6aa4c.d3d6605b.js.map
|
@ -0,0 +1,2 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2aa38a4c"],{"1fa6":function(t,e,s){"use strict";s.d(e,"d",(function(){return a})),s.d(e,"b",(function(){return n})),s.d(e,"c",(function(){return i})),s.d(e,"a",(function(){return o}));var r=s("a27e");function a(t){return r["a"].post("/entrust/add",t)}function n(t){return r["a"].post("/entrust/list",t)}function i(t){return r["a"].post("/entrust/listById",t)}function o(t){return r["a"].post("/goods/add",t)}},b6b5:function(t,e,s){},ea19:function(t,e,s){"use strict";s("b6b5")},fdf3:function(t,e,s){"use strict";s.r(e);var r=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("transition",{attrs:{name:"el-fade-in-linear"}},[s("div",{staticClass:"app-verifyEntrust"},[s("div",{staticClass:"app-header"},[s("appHeader"),s("el-divider")],1),s("div",{staticClass:"verifyEntrust-body"},[s("div",{staticClass:"tableCardDiv"},[s("el-card",{staticClass:"box-card tableCard"},[s("div",{staticClass:"clearfix orderTitle",attrs:{slot:"header"},slot:"header"},[s("span",[t._v("待审核委托列表")])]),s("table",{staticClass:"verifyEntrust-table",attrs:{border:"0",cellspacing:"70px"}},[s("tr",[s("th",[t._v("委托物品图片")]),s("th",[t._v("委托物品名称")]),s("th",[t._v("委托租赁价格")]),s("th",[t._v("委托租赁数量")]),s("th",[t._v("确认审核")])]),t._l(this.entrustList,(function(e){return s("tr",{key:e.entrustId},[s("td",[s("img",{staticClass:"goodsImg",staticStyle:{width:"70px",height:"70px"},attrs:{src:t.getImgUrl(e.eGoodsCoverImg)}})]),s("td",[t._v(t._s(e.eGoodsName))]),s("td",[t._v(t._s(e.eGoodsPrice))]),s("td",[t._v(t._s(e.eStockNum))]),s("td",[s("el-button",{attrs:{type:"success"},on:{click:function(s){return t.toEditEntrust(e.entrustId)}}},[t._v("审核")])],1)])}))],2)])],1)]),s("div",{staticClass:"app-footer"},[s("el-divider"),s("appFooter",{staticClass:"app-footer"})],1)])])},a=[],n=(s("14d9"),s("f392")),i=s("2c4b"),o=s("1fa6"),u={name:"verifyEntrust",components:{appHeader:n["a"],appFooter:i["a"]},data(){return{entrustList:""}},methods:{async getEntrustList(){try{await Object(o["b"])({}).then(t=>{this.entrustList=t,console.log(t)})}catch(t){console.log(t)}},getImgUrl(t){return this.$store.state.baseUrl+"/img/"+t+".jpg"},toEditEntrust(t){this.$store.commit("commitEditEntrustId",t),console.log(this.$store.state.editEntrustId),this.$router.push({name:"editEntrust",query:{t:Date.now()}})}},mounted(){this.getEntrustList()},beforeRouteUpdate(){this.getEntrustList()}},d=u,c=(s("ea19"),s("2877")),l=Object(c["a"])(d,r,a,!1,null,"9e06330e",null);e["default"]=l.exports}}]);
|
||||
//# sourceMappingURL=chunk-2aa38a4c.4fa71200.js.map
|
@ -0,0 +1,2 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-34b74788"],{"1fa6":function(t,e,s){"use strict";s.d(e,"d",(function(){return a})),s.d(e,"b",(function(){return r})),s.d(e,"c",(function(){return n})),s.d(e,"a",(function(){return l}));var o=s("a27e");function a(t){return o["a"].post("/entrust/add",t)}function r(t){return o["a"].post("/entrust/list",t)}function n(t){return o["a"].post("/entrust/listById",t)}function l(t){return o["a"].post("/goods/add",t)}},"503a":function(t,e,s){"use strict";s("a3e9")},a3e9:function(t,e,s){},e89e:function(t,e,s){"use strict";s.r(e);var o=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("transition",{attrs:{name:"el-fade-in-linear"}},[s("div",{staticClass:"app-editEntrust"},[s("div",{staticClass:"app-header"},[s("appHeader"),s("el-divider")],1),s("div",{staticClass:"editEntrust-body"},[s("el-form",{ref:"form",staticClass:"formTable",attrs:{"label-width":"150px"}},[s("el-form-item",{attrs:{label:"委托物品图片"}},[s("img",{staticStyle:{width:"150px",height:"150px"},attrs:{src:t.getImgUrl(t.entrustDetail.eGoodsCoverImg)}})]),s("el-form-item",{attrs:{label:"委托物品名称"}},[s("el-input",{attrs:{placeholder:"请输入物品名称"},model:{value:t.entrustDetail.eGoodsName,callback:function(e){t.$set(t.entrustDetail,"eGoodsName",e)},expression:"entrustDetail.eGoodsName"}})],1),s("el-form-item",{attrs:{label:"委托物品单价 "}},[s("el-input",{attrs:{placeholder:"请输入物品单价"},model:{value:t.entrustDetail.eGoodsPrice,callback:function(e){t.$set(t.entrustDetail,"eGoodsPrice",e)},expression:"entrustDetail.eGoodsPrice"}})],1),s("el-form-item",{attrs:{label:"委托物品数量 "}},[s("el-input-number",{attrs:{min:1,max:100,label:"物品数量"},model:{value:t.entrustDetail.eStockNum,callback:function(e){t.$set(t.entrustDetail,"eStockNum",e)},expression:"entrustDetail.eStockNum"}})],1),s("el-form-item",{attrs:{label:"委托物品简介 "}},[s("el-input",{attrs:{placeholder:"请输入物品简介"},model:{value:t.entrustDetail.eGoodsIntro,callback:function(e){t.$set(t.entrustDetail,"eGoodsIntro",e)},expression:"entrustDetail.eGoodsIntro"}})],1),s("el-form-item",{attrs:{label:"选择分类"}},[s("el-select",{attrs:{placeholder:"请选择分类"},model:{value:t.entrustDetail.eGoodsCategory,callback:function(e){t.$set(t.entrustDetail,"eGoodsCategory",e)},expression:"entrustDetail.eGoodsCategory"}},t._l(t.childrenCategoryList,(function(t){return s("el-option",{key:t.categoryId,attrs:{label:t.categoryName,value:t.categoryId}})})),1)],1),s("el-form-item",{attrs:{label:"物品描述"}},[s("el-input",{attrs:{type:"textarea"},model:{value:t.entrustDetail.eGoodsDetailContent,callback:function(e){t.$set(t.entrustDetail,"eGoodsDetailContent",e)},expression:"entrustDetail.eGoodsDetailContent"}})],1)],1)],1),s("div",{staticClass:"app-footer"},[s("el-divider"),s("appFooter",{staticClass:"app-footer"})],1)])])},a=[],r=(s("14d9"),s("f392")),n=s("2c4b"),l=s("1fa6"),i=s("42f1"),u={name:"editEntrust",components:{appHeader:r["a"],appFooter:n["a"]},data(){return{entrustDetail:"",childrenCategoryList:""}},methods:{getImgUrl(t){return this.$store.state.baseUrl+"/img/"+t+".jpg"},async listEntrustDetail(){let t=this.$store.state.editEntrustId;try{await Object(l["c"])({entrustId:t}).then(t=>{this.entrustDetail=t,console.log(t)})}catch(e){console.log(e)}},async listChildren(){try{await Object(i["c"])({}).then(t=>{this.childrenCategoryList=t,console.log(t)})}catch(t){console.log(t)}},async publishEntrust(){try{await Object(l["a"])({entrust:{goodsName:this.entrustDetail.eGoodsName,goodsIntro:this.entrustDetail.eGoodsIntro,goodsCategoryId:this.entrustDetail.eGoodsCategory,goodsCoverImg:this.entrustDetail.eGoodsCoverImg,goodsCarousel:this.entrustDetail.eGoodsCarousel,goodsDetailContent:this.entrustDetail.eGoodsDetailContent,stockNum:this.entrustDetail.eStockNum,goodsStatus:1,goodsScore:3.7},itPrice:this.entrustDetail.eGoodsPrice,entrustId:this.entrustDetail.entrustId}).then(t=>{console.log(t),alert("发布成功!"),this.$router.push({name:"verifyEntrust",query:{t:Date.now()}})})}catch(t){console.log(t)}}},mounted(){this.listEntrustDetail(),this.listChildren()},beforeRouteUpdate(){this.listEntrustDetail(),this.listChildren()}},c=u,d=(s("503a"),s("2877")),m=Object(d["a"])(c,o,a,!1,null,"38702800",null);e["default"]=m.exports}}]);
|
||||
//# sourceMappingURL=chunk-34b74788.305efea2.js.map
|
@ -0,0 +1,2 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3851f843"],{"03b4":function(t,e,s){},"22cd":function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("transition",{attrs:{name:"el-fade-in-linear"}},[s("div",{staticClass:"app-home"},[s("el-backtop",{attrs:{target:".app-home",bottom:100,"visibility-height":100,right:20}}),s("div",{staticClass:"app-header"},[s("appHeader"),s("el-divider")],1),s("span",{staticClass:"carousel-title",staticStyle:{"margin-top":"50px"}},[t._v("今日推荐Today")]),s("home-carousel",{staticStyle:{"margin-bottom":"50px"}}),s("home-discount",{staticStyle:{"margin-bottom":"50px"}}),s("home-recommend",{staticStyle:{"margin-bottom":"50px"}}),s("div",{staticClass:"app-footer"},[s("el-divider"),s("appFooter",{staticClass:"app-footer"})],1)],1)])},o=[],a=s("f392"),c=s("2c4b"),r=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"home-carousel"},[s("el-card",{staticClass:"carousel-card",attrs:{shadow:"hover"}},[s("el-carousel",{attrs:{"indicator-position":"outside",height:"700px"}},t._l(t.carouselList,(function(e){return s("el-carousel-item",{key:e.configId},[s("img",{staticStyle:{height:"auto"},attrs:{src:t.getImgUrl(e.goodsCoverImg)},on:{click:function(s){return t.toSearch(e.configName)}}})])})),1)],1)],1)},n=[],l=(s("14d9"),s("a27e"));function d(t){return l["a"].post("/index-config/list",t)}var m={name:"carousel",methods:{toSearch(t){this.$store.commit("commitSearchKey",t),this.$router.push({name:"search",query:{t:Date.now()}})},async getIndexList(){try{await d({indexType:1}).then(t=>{this.carouselList=t,console.log(this.carouselList)})}catch(t){console.log(t)}},getImgUrl(t){return this.$store.state.baseUrl+"/img/"+t+".jpg"}},data(){return{carouselList:""}},mounted(){this.getIndexList()},beforeRouteUpdate(){this.getIndexList()}},u=m,h=(s("7c4b"),s("e0cb"),s("2877")),g=Object(h["a"])(u,r,n,!1,null,"4158376e",null),p=g.exports,f=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"home-discount"},[s("span",{staticClass:"discount-title"},[t._v("今日优惠Discount")]),s("div",{staticClass:"discount-card-div"},t._l(t.discountList,(function(e){return s("el-card",{key:e.configId,staticClass:"discount-card",staticStyle:{"margin-right":"100px"},attrs:{shadow:"hover"}},[s("img",{staticStyle:{width:"100%",height:"auto"},attrs:{src:t.getImgUrl(e.goodsCoverImg)},on:{click:function(s){return t.toSearch(e.configName)}}})])})),1)])},b=[],v={name:"discount",methods:{toSearch(t){this.$store.commit("commitSearchKey",t),this.$router.push({name:"search",query:{t:Date.now()}})},async getIndexList(){try{await d({indexType:2}).then(t=>{this.discountList=t,console.log(this.discountList)})}catch(t){console.log(t)}},getImgUrl(t){return this.$store.state.baseUrl+"/img/"+t+".jpg"}},data(){return{discountList:""}},mounted(){this.getIndexList()},beforeRouteUpdate(){this.getIndexList()}},y=v,x=(s("e881"),Object(h["a"])(y,f,b,!1,null,"1119cf8c",null)),C=x.exports,w=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"home-recommend"},[s("span",{staticClass:"recommend-title"},[t._v("为您推荐Recommend")]),s("div",{staticClass:"home-recommend-body"},[s("div",{staticClass:"recommend-card-div"},[s("el-card",{staticClass:"recommend-card",staticStyle:{width:"100%",height:"auto"},attrs:{shadow:"hover"}},[s("div",{staticClass:"recommend-row",staticStyle:{width:"100%",height:"auto"}},[s("el-carousel",{staticClass:"recommend-row-carousel",attrs:{interval:3e3,type:"card"}},t._l(t.recommendList,(function(e){return s("el-carousel-item",{key:e.configId},[s("img",{staticClass:"recommend-row-item-img",attrs:{src:t.getImgUrl(e.goodsCoverImg)},on:{click:function(s){return t.toSearch(e.configName)}}})])})),1)],1)])],1)])])},I=[],L={name:"recommend",methods:{toSearch(t){this.$store.commit("commitSearchKey",t),this.$router.push({name:"search",query:{t:Date.now()}})},async getIndexList(){try{await d({indexType:3}).then(t=>{this.recommendList=t,console.log(this.recommendList)})}catch(t){console.log(t)}},getImgUrl(t){return this.$store.state.baseUrl+"/img/"+t+".jpg"}},data(){return{recommendList:""}},mounted(){this.getIndexList()},beforeRouteUpdate(){this.getIndexList()}},S=L,_=(s("ce7e"),s("7a6c"),Object(h["a"])(S,w,I,!1,null,"328ce212",null)),$=_.exports,U={name:"home",components:{appHeader:a["a"],appFooter:c["a"],homeCarousel:p,homeDiscount:C,homeRecommend:$}},k=U,j=(s("563d"),Object(h["a"])(k,i,o,!1,null,"50a58f05",null));e["default"]=j.exports},"402b":function(t,e,s){},"563d":function(t,e,s){"use strict";s("402b")},"7a6c":function(t,e,s){"use strict";s("03b4")},"7c4b":function(t,e,s){"use strict";s("e5df")},ba0d:function(t,e,s){},cd9b:function(t,e,s){},ce7e:function(t,e,s){"use strict";s("fc2b")},e0cb:function(t,e,s){"use strict";s("cd9b")},e5df:function(t,e,s){},e881:function(t,e,s){"use strict";s("ba0d")},fc2b:function(t,e,s){}}]);
|
||||
//# sourceMappingURL=chunk-3851f843.d5ff1500.js.map
|
@ -0,0 +1,2 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-be15c974"],{"1cd1":function(t,e,r){},"2acc":function(t,e,r){"use strict";r.d(e,"b",(function(){return s})),r.d(e,"a",(function(){return o})),r.d(e,"c",(function(){return i}));var a=r("a27e");function s(t){return a["a"].post("/orderItem/add",t)}function o(t){return a["a"].post("/order/add",t)}function i(t){return a["a"].post("/order/listByUser",t)}},"30b7":function(t,e,r){"use strict";r.r(e);var a=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("transition",{attrs:{name:"el-fade-in-linear"}},[r("div",{staticClass:"app-myOrder"},[r("el-backtop",{attrs:{target:".app-myOrder",bottom:100,"visibility-height":100,right:20}}),r("div",{staticClass:"app-header"},[r("appHeader"),r("el-divider")],1),r("div",{staticClass:"myOrder-body"},t._l(t.orderList,(function(e){return r("div",{key:e.orderId,staticClass:"tableCardDiv"},[r("el-card",{staticClass:"box-card tableCard",attrs:{shadow:"hover"}},[r("div",{staticClass:"clearfix orderTitle",attrs:{slot:"header"},slot:"header"},[r("span",[t._v("订单号:"+t._s(e.orderNum))]),r("span",[t._v("创建时间:"+t._s(e.createTime))])]),r("table",{staticClass:"myOrder-table",attrs:{border:"0",cellspacing:"50px"}},[r("tr",[r("th",[t._v("物品图片")]),r("th",[t._v("物品名称")]),r("th",[t._v("租赁价格")]),r("th",[t._v("租赁数量")]),r("th",[t._v("租赁起始时间")]),r("th",[t._v("租赁结束时间")]),r("th",[t._v("确认")])]),t._l(e.orderItemList,(function(e){return r("tr",{key:e.orderItemId},[r("td",[r("img",{staticClass:"goodsImg",staticStyle:{width:"70px",height:"70px"},attrs:{src:t.getImgUrl(e.goodsCoverImg)}})]),r("td",[t._v(t._s(e.goodsName))]),r("td",[t._v(t._s(e.price))]),r("td",[t._v(t._s(e.goodsCount))]),r("td",[t._v(t._s(e.createTime))]),r("td",[t._v(t._s(e.endTime))]),r("td",[r("el-button",{attrs:{type:"success"}},[t._v("确认租赁")])],1)])}))],2)])],1)})),0),r("div",{staticClass:"app-footer"},[r("el-divider"),r("appFooter",{staticClass:"app-footer"})],1)],1)])},s=[],o=r("f392"),i=r("2c4b"),d=r("2acc"),n={name:"myOrder",data(){return{orderItemList:[],orderList:[],imgIndex:""}},methods:{async getList(){try{await Object(d["c"])({}).then(t=>{this.orderList=t,console.log(this.orderList)})}catch(t){console.log(t)}},getImgUrl(t){return this.$store.state.baseUrl+"/img/"+t+".jpg"}},mounted(){let t=localStorage.getItem("token");null!==t?this.getList():alert("请先登录")},beforeRouteUpdate(){let t=localStorage.getItem("token");null!==t?this.getList():alert("请先登录")},components:{appHeader:o["a"],appFooter:i["a"]}},c=n,l=(r("be5d"),r("2877")),u=Object(l["a"])(c,a,s,!1,null,"4c409a12",null);e["default"]=u.exports},be5d:function(t,e,r){"use strict";r("1cd1")}}]);
|
||||
//# sourceMappingURL=chunk-be15c974.c8f18af5.js.map
|
@ -0,0 +1,53 @@
|
||||
{
|
||||
"name": "recommend",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"serve": "set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve",
|
||||
"build": "vue-cli-service build",
|
||||
"lint": "vue-cli-service lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"axios": "^0.21.1",
|
||||
"core-js": "^3.6.5",
|
||||
"element-ui": "^2.15.1",
|
||||
"react-scripts": "^5.0.1",
|
||||
"vue": "^2.6.11",
|
||||
"vue-puzzle-vcode": "^1.1.5",
|
||||
"vue-router": "^3.5.1",
|
||||
"vuex": "^3.6.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vue/cli-plugin-babel": "~4.5.0",
|
||||
"@vue/cli-plugin-eslint": "~4.5.0",
|
||||
"@vue/cli-service": "~4.5.0",
|
||||
"babel-eslint": "^10.1.0",
|
||||
"eslint": "^6.7.2",
|
||||
"eslint-plugin-vue": "^6.2.2",
|
||||
"vue-template-compiler": "^2.6.11"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"root": true,
|
||||
"env": {
|
||||
"node": true
|
||||
},
|
||||
"extends": [
|
||||
"plugin:vue/essential",
|
||||
"eslint:recommended"
|
||||
],
|
||||
"parserOptions": {
|
||||
"parser": "babel-eslint"
|
||||
},
|
||||
"rules": {}
|
||||
},
|
||||
"browserslist": [
|
||||
"> 1%",
|
||||
"last 2 versions",
|
||||
"not dead"
|
||||
],
|
||||
"description": "## Project setup ``` npm install ```",
|
||||
"main": "babel.config.js",
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC"
|
||||
}
|
After Width: | Height: | Size: 4.2 KiB |
@ -0,0 +1,17 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
||||
<title><%= htmlWebpackPlugin.options.title %></title>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>
|
||||
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
|
||||
</noscript>
|
||||
<div id="app"></div>
|
||||
<!-- built files will be auto injected -->
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,37 @@
|
||||
<template>
|
||||
<div id="app">
|
||||
<!-- 单页应用路由-->
|
||||
<router-view class="router-view"></router-view>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: 'App',
|
||||
components: {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
#app {
|
||||
font-family: Avenir, Helvetica, Arial, sans-serif;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
text-align: center;
|
||||
color: #2c3e50;
|
||||
margin-top: 60px;
|
||||
}
|
||||
.router-view{
|
||||
width: 100%;
|
||||
height: auto;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
margin: 0;
|
||||
left: 0;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,17 @@
|
||||
import axios from '../utils/axios'
|
||||
|
||||
export function addCart(params) {
|
||||
return axios.post('/cart/add', params);
|
||||
}
|
||||
|
||||
export function listCartItem(params) {
|
||||
return axios.post('/cart/list', params);
|
||||
}
|
||||
|
||||
export function deleteItem(params) {
|
||||
return axios.post('/cart/delete', params);
|
||||
}
|
||||
|
||||
export function addOrderByCart(params) {
|
||||
return axios.post('/order/addOrderByCart', params);
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
import axios from '../utils/axios'
|
||||
|
||||
export function listCategory(params) {
|
||||
return axios.post('/category/list', params);
|
||||
}
|
||||
|
||||
export function listGoods(params) {
|
||||
return axios.post('/goods/search', params);
|
||||
}
|
||||
|
||||
export function goodsDetail(params) {
|
||||
return axios.post('/goods/detail', params);
|
||||
}
|
||||
|
||||
export function listChildrenCategory(params) {
|
||||
return axios.post('/category/listChildrenCategory', params);
|
||||
}
|
||||
|
||||
export function listGoodsByOrder(params) {
|
||||
return axios.post('/goods/searchByOrder', params);
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
import axios from '../utils/axios'
|
||||
|
||||
export function publishEntrust(params) {
|
||||
return axios.post('/entrust/add', params);
|
||||
}
|
||||
|
||||
export function listEntrust(params) {
|
||||
return axios.post('/entrust/list', params);
|
||||
}
|
||||
|
||||
export function listEntrustById(params) {
|
||||
return axios.post('/entrust/listById', params);
|
||||
}
|
||||
|
||||
export function editAndPublishEntrust(params) {
|
||||
return axios.post('/goods/add', params);
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
import axios from '../utils/axios'
|
||||
|
||||
export function indexList(params) {
|
||||
return axios.post('/index-config/list', params);
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
import axios from '../utils/axios'
|
||||
|
||||
export function addOrderItem(params) {
|
||||
return axios.post('/orderItem/add', params);
|
||||
}
|
||||
|
||||
export function addOrder(params) {
|
||||
return axios.post('/order/add', params);
|
||||
}
|
||||
|
||||
export function listOrderItem(params) {
|
||||
return axios.post('/orderItem/listByUser', params);
|
||||
}
|
||||
|
||||
export function listOrderByUser(params) {
|
||||
return axios.post('/order/listByUser', params);
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
import axios from '../utils/axios'
|
||||
|
||||
export function login(params) {
|
||||
return axios.post('/home/login', params);
|
||||
}
|
||||
|
||||
export function register(params) {
|
||||
return axios.post('/home/register', params);
|
||||
}
|
||||
|
||||
export function userInfo(params) {
|
||||
return axios.post('/user/userInfo', params);
|
||||
}
|
||||
|
||||
export function logout(params) {
|
||||
return axios.post('/home/logout', params);
|
||||
}
|
||||
|
||||
export function isAdmin(params) {
|
||||
return axios.post('/user/isAdmin', params);
|
||||
}
|
||||
|
||||
export function editInfo(params) {
|
||||
return axios.post('/user/editUserInfo', params);
|
||||
}
|
After Width: | Height: | Size: 6.7 KiB |
@ -0,0 +1,58 @@
|
||||
<template>
|
||||
<div class="hello">
|
||||
<h1>{{ msg }}</h1>
|
||||
<p>
|
||||
For a guide and recipes on how to configure / customize this project,<br>
|
||||
check out the
|
||||
<a href="https://cli.vuejs.org" target="_blank" rel="noopener">vue-cli documentation</a>.
|
||||
</p>
|
||||
<h3>Installed CLI Plugins</h3>
|
||||
<ul>
|
||||
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-babel" target="_blank" rel="noopener">babel</a></li>
|
||||
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-eslint" target="_blank" rel="noopener">eslint</a></li>
|
||||
</ul>
|
||||
<h3>Essential Links</h3>
|
||||
<ul>
|
||||
<li><a href="https://vuejs.org" target="_blank" rel="noopener">Core Docs</a></li>
|
||||
<li><a href="https://forum.vuejs.org" target="_blank" rel="noopener">Forum</a></li>
|
||||
<li><a href="https://chat.vuejs.org" target="_blank" rel="noopener">Community Chat</a></li>
|
||||
<li><a href="https://twitter.com/vuejs" target="_blank" rel="noopener">Twitter</a></li>
|
||||
<li><a href="https://news.vuejs.org" target="_blank" rel="noopener">News</a></li>
|
||||
</ul>
|
||||
<h3>Ecosystem</h3>
|
||||
<ul>
|
||||
<li><a href="https://router.vuejs.org" target="_blank" rel="noopener">vue-router</a></li>
|
||||
<li><a href="https://vuex.vuejs.org" target="_blank" rel="noopener">vuex</a></li>
|
||||
<li><a href="https://github.com/vuejs/vue-devtools#vue-devtools" target="_blank" rel="noopener">vue-devtools</a></li>
|
||||
<li><a href="https://vue-loader.vuejs.org" target="_blank" rel="noopener">vue-loader</a></li>
|
||||
<li><a href="https://github.com/vuejs/awesome-vue" target="_blank" rel="noopener">awesome-vue</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'HelloWorld',
|
||||
props: {
|
||||
msg: String
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
||||
<style scoped>
|
||||
h3 {
|
||||
margin: 40px 0 0;
|
||||
}
|
||||
ul {
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
}
|
||||
li {
|
||||
display: inline-block;
|
||||
margin: 0 10px;
|
||||
}
|
||||
a {
|
||||
color: #42b983;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,68 @@
|
||||
<template>
|
||||
<div class="detail-body">
|
||||
<el-card class="box-card detailCard">
|
||||
<div slot="header" class="clearfix">
|
||||
<span style="font-size: 30px">物品详情</span>
|
||||
</div>
|
||||
<div style="margin-top: 20px;margin-bottom: 20px">{{this.detail.goodsDetailContent}}</div>
|
||||
<img :src="getImgUrl(this.detail.goodsCarousel)">
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {goodsDetail} from '@/api/categoryAndGoods'
|
||||
|
||||
export default {
|
||||
name: "body",
|
||||
data(){
|
||||
return{
|
||||
detail:"",
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
//获取物品详情
|
||||
async getDetail(){
|
||||
try{
|
||||
await goodsDetail({
|
||||
"key":this.$store.state.detailGoodsId
|
||||
}).then((data)=>{
|
||||
this.detail=data
|
||||
console.log(data)
|
||||
})
|
||||
|
||||
}catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
//获取图片地址
|
||||
getImgUrl(imgId){
|
||||
return this.$store.state.baseUrl+"/img/"+imgId+".jpg"
|
||||
}
|
||||
},
|
||||
|
||||
//创建时调用
|
||||
mounted() {
|
||||
this.getDetail()
|
||||
},
|
||||
|
||||
//相同路由刷新时调用
|
||||
beforeRouteUpdate(){
|
||||
this.getDetail()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.detail-body{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.detailCard{
|
||||
width: 95%;
|
||||
}
|
||||
.el-divider--horizontal {
|
||||
margin: 0;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,37 @@
|
||||
<template>
|
||||
<div class="footer">
|
||||
<span class="footerTitle">© 2023 recommend</span>
|
||||
<span class="footerSpan">帮助中心</span>
|
||||
<span class="footerSpan">联络我们</span>
|
||||
<span class="footerSpan">媒体</span>
|
||||
<span class="footerSpan">公司职位</span>
|
||||
<span class="footerSpan">营销中心</span>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "footer"
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
div.footer{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
padding-bottom: 10px;
|
||||
padding-top: 10px;
|
||||
}
|
||||
span.footerTitle{
|
||||
color: rgb(94,94,96);
|
||||
margin-left: 100px;
|
||||
margin-right: 700px;
|
||||
}
|
||||
span.footerSpan{
|
||||
color: rgb(94,94,96);
|
||||
margin-left: 20px;
|
||||
font-size: 10px;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,343 @@
|
||||
<template>
|
||||
<div class="app-header">
|
||||
|
||||
<router-link to="./" class="header-icon-link">
|
||||
<img src="../../static/images/DOGE.png" class="header-icon">
|
||||
</router-link>
|
||||
<span style="font-size: 20px">数码产品推荐系统</span>
|
||||
<el-menu mode="horizontal" class="header-nav"
|
||||
text-color="#111111"
|
||||
>
|
||||
<el-submenu index="1">
|
||||
<template slot="title">分类导航</template>
|
||||
<el-container>
|
||||
<el-aside width="200px">
|
||||
<el-menu
|
||||
default-active="2">
|
||||
<el-menu-item index="item.categoryId"
|
||||
v-for="item in categoryData"
|
||||
v-bind:key="item.categoryId"
|
||||
@mouseover.native="getChildrenCategory(item.children)"
|
||||
>
|
||||
<template slot="title">
|
||||
<span >{{item.categoryName}}</span>
|
||||
</template>
|
||||
</el-menu-item>
|
||||
</el-menu>
|
||||
</el-aside>
|
||||
<el-main style="width: 500px">
|
||||
<div class="childrenCategoryPanel">
|
||||
<div class="childrenCategoryItem"
|
||||
v-for="item in childrenCategoryData"
|
||||
:key="item.categoryId"
|
||||
>
|
||||
<router-link to="">
|
||||
<!-- <div>-->
|
||||
<!-- <img class="childrenCategoryItemImg" :src="getImgUrl(item.categoryImg)">-->
|
||||
<!-- </div>-->
|
||||
</router-link>
|
||||
<el-link active-class="childrenCategoryItemTitle-active" class="childrenCategoryItemTitle">
|
||||
<span class="childrenCategoryItemTitle" @click="catergorySearch(item.categoryName)">{{item.categoryName}}</span>
|
||||
</el-link>
|
||||
</div>
|
||||
</div>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</el-submenu>
|
||||
</el-menu>
|
||||
<el-input placeholder="请输入内容" class=" searchInput" v-model="searchValue" @keyup.enter.native="commitSearch(searchValue)">
|
||||
<el-button slot="append" icon="el-icon-search" @click="commitSearch(searchValue)" ></el-button>
|
||||
</el-input>
|
||||
<div v-if="isLogin" class="header-myName">
|
||||
<el-button round class="cartButton"><router-link to="./cart" tag="span">购物车</router-link></el-button>
|
||||
<!-- <el-link type="primary" underline="false" style="margin-right: 10px" v-if="ifAdmin"><router-link to="./verifyEntrust" tag="span">审核委托</router-link></el-link>-->
|
||||
<!-- <el-button round class="editInfoButton" v-if="isLogin" ><router-link to="./myInfo" tag="span" >个人信息</router-link></el-button>-->
|
||||
<el-dropdown v-if="isLogin" >
|
||||
<el-button round class="cartButton">
|
||||
个人信息<i class="el-icon-arrow-down el-icon--right"></i>
|
||||
</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item><router-link to="./myInfo" tag="span" >个人信息</router-link></el-dropdown-item>
|
||||
<el-dropdown-item><router-link to="./verifyEntrust" tag="span" v-if="ifAdmin">审核委托</router-link></el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
<el-link type="primary" underline="false" @click="logout">登出</el-link>
|
||||
</div>
|
||||
<div v-else>
|
||||
<el-button round class="loginButton"><router-link to="./login" tag="span">登录</router-link></el-button>
|
||||
<el-button round class="registerButton"><router-link to="./register" tag="span">注册</router-link></el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { userInfo,logout,isAdmin} from '@/api/user'
|
||||
import { listCategory} from '@/api/categoryAndGoods'
|
||||
export default {
|
||||
name: "header",
|
||||
data(){
|
||||
return{
|
||||
categoryData: [
|
||||
],
|
||||
childrenCategoryData:[],
|
||||
isLogin:false,
|
||||
name:"",
|
||||
categoryList:[],
|
||||
categoryChildrenList:[],
|
||||
searchValue:"",
|
||||
ifAdmin:false,
|
||||
}
|
||||
},
|
||||
|
||||
methods:{
|
||||
//获取子分类
|
||||
getChildrenCategory(childrenCategory){
|
||||
this.childrenCategoryData=childrenCategory
|
||||
},
|
||||
//获取用户信息
|
||||
async getUserInfo(){
|
||||
try{
|
||||
await userInfo({}).then((data)=>{
|
||||
console.log(data)
|
||||
this.name=data.name
|
||||
console.log(data.name)
|
||||
if(typeof(this.name) !== "undefined"){
|
||||
this.isLogin=true
|
||||
this.$store.commit("commitIsLogin",true)
|
||||
}else {
|
||||
this.isLogin=false
|
||||
this.$store.commit("commitIsLogin",false)
|
||||
}
|
||||
})
|
||||
|
||||
}catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
//登出
|
||||
async logout(){
|
||||
try{
|
||||
await logout({}).then(()=>{
|
||||
this.$router.go(0);
|
||||
})
|
||||
|
||||
}catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
//获取物品分类
|
||||
async listCategory(){
|
||||
try{
|
||||
await listCategory({}).then((data)=>{
|
||||
// console.log(data)
|
||||
this.categoryList=data.categoryParentList
|
||||
this.categoryChildrenList=data.categoryChildrenList
|
||||
for (let index = 0; index < this.categoryList.length; index++) {
|
||||
this.categoryList[index]['children']=[]
|
||||
}
|
||||
for (let index = 0; index < this.categoryChildrenList.length; index++) {
|
||||
let parentId=this.categoryChildrenList[index].parentId
|
||||
this.categoryList.find(item => item.categoryId === parentId).children.push(this.categoryChildrenList[index])
|
||||
console.log(this.categoryList)
|
||||
}
|
||||
this.categoryData=this.categoryList
|
||||
})
|
||||
|
||||
}catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
//判断是否管理员
|
||||
async admin(){
|
||||
try{
|
||||
await isAdmin({}).then((res)=>{
|
||||
this.ifAdmin=res
|
||||
console.log("是否管理员"+this.ifAdmin)
|
||||
})
|
||||
|
||||
}catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
//获取图片地址
|
||||
getImgUrl(imgId){
|
||||
return this.baseUrl+"/img/"+imgId+".jpg"
|
||||
},
|
||||
//进行物品搜索
|
||||
commitSearch(key){
|
||||
this.$store.commit("commitSearchKey",key)
|
||||
this.$router.push({
|
||||
name:'search',
|
||||
query:{
|
||||
t: Date.now(),
|
||||
}})
|
||||
},
|
||||
//根据分类进行搜索
|
||||
catergorySearch(key){
|
||||
this.$store.commit("commitSearchKey",key)
|
||||
this.$router.push({
|
||||
name:'search',
|
||||
query:{
|
||||
t: Date.now(),
|
||||
}})
|
||||
},
|
||||
//前往发布委托页面
|
||||
toPublishEntrust(){
|
||||
if(this.isLogin){
|
||||
this.$router.push({
|
||||
name:'publishEntrust',
|
||||
query:{
|
||||
t: Date.now(),
|
||||
}})
|
||||
}else {
|
||||
this.openWarning();
|
||||
}
|
||||
},
|
||||
//前往我的订单页面
|
||||
toMyOrder(){
|
||||
if(this.isLogin){
|
||||
this.$router.push({
|
||||
name:'myOrder',
|
||||
query:{
|
||||
t: Date.now(),
|
||||
}})
|
||||
}else {
|
||||
this.openWarning();
|
||||
}
|
||||
},
|
||||
openWarning() {
|
||||
this.$message({
|
||||
message: '请先登录!',
|
||||
type: 'warning'
|
||||
});
|
||||
},
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.getUserInfo()
|
||||
this.listCategory()
|
||||
this.admin()
|
||||
},
|
||||
|
||||
//相同路由刷新时调用
|
||||
beforeRouteUpdate(){
|
||||
this.getUserInfo()
|
||||
this.listCategory()
|
||||
this.admin()
|
||||
},
|
||||
|
||||
watch:{
|
||||
'$router': 'getUserInfo'
|
||||
},
|
||||
|
||||
computed: {
|
||||
baseUrl () {
|
||||
return this.$store.state.baseUrl
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
div.app-header{
|
||||
width: 100%;
|
||||
height: 80px;
|
||||
background-color: #FFFFFF;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
}
|
||||
img.header-icon{
|
||||
width: 60px;
|
||||
height: auto;
|
||||
margin-left: 50px;
|
||||
margin-right: 20px;
|
||||
}
|
||||
.header-nav{
|
||||
margin-left: 30px;
|
||||
font-weight: 700;
|
||||
|
||||
}
|
||||
.goods-menu{
|
||||
width: 500px;
|
||||
height: auto;
|
||||
}
|
||||
div.childrenCategoryPanel{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: left;
|
||||
align-items: flex-start;
|
||||
}
|
||||
div.childrenCategoryItem{
|
||||
width: 90px;
|
||||
height: 90px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
div.childrenCategoryItem img{
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
}
|
||||
.childrenCategoryItemTitle-active{
|
||||
text-decoration: none;
|
||||
}
|
||||
.childrenCategoryItemTitle{
|
||||
color: cornflowerblue;
|
||||
}
|
||||
.loginButton{
|
||||
margin-left: 80px;
|
||||
margin-right: 20px;
|
||||
}
|
||||
.loginButton,.registerButton{
|
||||
font-weight: 700;
|
||||
color: #111111;
|
||||
}
|
||||
.searchInput{
|
||||
width: 500px;
|
||||
margin-left: 50px;
|
||||
|
||||
}
|
||||
.header-myName{
|
||||
margin-left: 30px;
|
||||
}
|
||||
.cartButton{
|
||||
margin-right: 10px;
|
||||
}
|
||||
.editInfoButton{
|
||||
margin-right: 15px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
<style>
|
||||
.searchInput .el-input__inner{
|
||||
background-color: #f5f5f5;
|
||||
border-color:#f5f5f5 ;
|
||||
}
|
||||
.searchInput .el-button.el-button--default{
|
||||
background-color: #f5f5f5;
|
||||
border-color:#f5f5f5 ;
|
||||
}
|
||||
.searchInput .el-input-group__append{
|
||||
background-color: #f5f5f5;
|
||||
border-color:#f5f5f5 ;
|
||||
}
|
||||
.el-menu.el-menu--horizontal{
|
||||
border: 0;
|
||||
}
|
||||
div.childrenCategoryPanel{
|
||||
max-width: 700px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: left;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,94 @@
|
||||
<template>
|
||||
<div class="home-carousel">
|
||||
<el-card class="carousel-card" shadow="hover">
|
||||
<el-carousel indicator-position="outside" height="700px">
|
||||
<el-carousel-item v-for="item in carouselList" v-bind:key="item.configId">
|
||||
<img :src="getImgUrl(item.goodsCoverImg)" style="height: auto" @click="toSearch(item.configName)">
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {indexList} from "@/api/index"
|
||||
export default {
|
||||
name: "carousel",
|
||||
methods:{
|
||||
//进行物品搜索
|
||||
toSearch(itemName){
|
||||
this.$store.commit("commitSearchKey",itemName)
|
||||
this.$router.push({
|
||||
name:'search',
|
||||
query:{
|
||||
t: Date.now(),
|
||||
}})
|
||||
},
|
||||
|
||||
//获取首页轮播配置
|
||||
async getIndexList(){
|
||||
try{
|
||||
await indexList({
|
||||
"indexType":1
|
||||
}).then((data)=>{
|
||||
this.carouselList=data
|
||||
console.log(this.carouselList)
|
||||
})
|
||||
|
||||
}catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
|
||||
//获取图片地址
|
||||
getImgUrl(imgId){
|
||||
return this.$store.state.baseUrl+"/img/"+imgId+".jpg"
|
||||
},
|
||||
|
||||
},
|
||||
data(){
|
||||
return{
|
||||
carouselList:"",
|
||||
}
|
||||
},
|
||||
|
||||
//创建时调用
|
||||
mounted() {
|
||||
this.getIndexList()
|
||||
},
|
||||
|
||||
//相同路由刷新时调用
|
||||
beforeRouteUpdate(){
|
||||
this.getIndexList()
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.carousel-card{
|
||||
width: 100%;
|
||||
height: 700px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
}
|
||||
.carousel-card img{
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
div.home-carousel{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
}
|
||||
div.carousel-Title{
|
||||
|
||||
}
|
||||
|
||||
</style>
|
||||
<style>
|
||||
.el-card__body{
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,91 @@
|
||||
<template>
|
||||
<div class="home-discount">
|
||||
<span class="discount-title">今日优惠Discount</span>
|
||||
<div class="discount-card-div">
|
||||
<el-card class="discount-card" style="margin-right: 100px" v-for="item in discountList" v-bind:key="item.configId" shadow="hover">
|
||||
<img :src="getImgUrl(item.goodsCoverImg)" style="width: 100%;height: auto" @click="toSearch(item.configName)">
|
||||
</el-card>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {indexList} from "@/api";
|
||||
|
||||
export default {
|
||||
name: "discount",
|
||||
methods:{
|
||||
//进行物品搜索
|
||||
toSearch(itemName){
|
||||
this.$store.commit("commitSearchKey",itemName)
|
||||
this.$router.push({
|
||||
name:'search',
|
||||
query:{
|
||||
t: Date.now(),
|
||||
}})
|
||||
},
|
||||
|
||||
//获取首页轮播配置
|
||||
async getIndexList(){
|
||||
try{
|
||||
await indexList({
|
||||
"indexType":2
|
||||
}).then((data)=>{
|
||||
this.discountList=data
|
||||
console.log(this.discountList)
|
||||
})
|
||||
|
||||
}catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
|
||||
//获取图片地址
|
||||
getImgUrl(imgId){
|
||||
return this.$store.state.baseUrl+"/img/"+imgId+".jpg"
|
||||
},
|
||||
|
||||
},
|
||||
data(){
|
||||
return{
|
||||
discountList:"",
|
||||
}
|
||||
},
|
||||
|
||||
//创建时调用
|
||||
mounted() {
|
||||
this.getIndexList()
|
||||
},
|
||||
|
||||
//相同路由刷新时调用
|
||||
beforeRouteUpdate(){
|
||||
this.getIndexList()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
div.home-discount{
|
||||
|
||||
}
|
||||
div.discount-card-div{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
padding-left: 80px;
|
||||
}
|
||||
.discount-card{
|
||||
width: 600px;
|
||||
height: 350px;
|
||||
/*display: flex;*/
|
||||
/*flex-direction: row;*/
|
||||
/*justify-content: center;*/
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
span.discount-title{
|
||||
font-weight: 700;
|
||||
color: #111111;
|
||||
font-size: 37px;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,124 @@
|
||||
<template>
|
||||
<div class="home-recommend">
|
||||
<span class="recommend-title">为您推荐Recommend</span>
|
||||
<div class="home-recommend-body">
|
||||
<div class="recommend-card-div">
|
||||
<el-card class="recommend-card" style="width: 100%;height: auto" shadow="hover">
|
||||
<div class="recommend-row" style="width: 100%;height:auto">
|
||||
<el-carousel :interval="3000" type="card" class="recommend-row-carousel">
|
||||
<el-carousel-item v-for="item in recommendList" v-bind:key="item.configId">
|
||||
<img class="recommend-row-item-img" :src="getImgUrl(item.goodsCoverImg)" @click="toSearch(item.configName)">
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {indexList} from "@/api/index";
|
||||
|
||||
export default {
|
||||
name: "recommend",
|
||||
//进行物品搜索
|
||||
methods:{
|
||||
toSearch(itemName){
|
||||
this.$store.commit("commitSearchKey",itemName)
|
||||
this.$router.push({
|
||||
name:'search',
|
||||
query:{
|
||||
t: Date.now(),
|
||||
}})
|
||||
},
|
||||
|
||||
//获取首页轮播配置
|
||||
async getIndexList(){
|
||||
try{
|
||||
await indexList({
|
||||
"indexType":3
|
||||
}).then((data)=>{
|
||||
this.recommendList=data
|
||||
console.log(this.recommendList)
|
||||
})
|
||||
|
||||
}catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
|
||||
//获取图片地址
|
||||
getImgUrl(imgId){
|
||||
return this.$store.state.baseUrl+"/img/"+imgId+".jpg"
|
||||
},
|
||||
|
||||
},
|
||||
data(){
|
||||
return{
|
||||
recommendList:"",
|
||||
}
|
||||
},
|
||||
|
||||
//创建时调用
|
||||
mounted() {
|
||||
this.getIndexList()
|
||||
},
|
||||
|
||||
//相同路由刷新时调用
|
||||
beforeRouteUpdate(){
|
||||
this.getIndexList()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
div.home-recommend-body{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
}
|
||||
div.recommend-card-div{
|
||||
width: 91%;
|
||||
height: auto;
|
||||
|
||||
}
|
||||
span.recommend-title{
|
||||
font-weight: 700;
|
||||
color: #111111;
|
||||
font-size: 37px;
|
||||
}
|
||||
.recommend-row{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
margin-top: 30px;
|
||||
padding: 20px;
|
||||
}
|
||||
.recommend-row-item{
|
||||
/*display: flex;*/
|
||||
/*flex-direction: column;*/
|
||||
/*justify-content: center;*/
|
||||
/*width: 600px;*/
|
||||
/*height: 400px;*/
|
||||
/*margin-left: 30px;*/
|
||||
padding: 0;
|
||||
}
|
||||
img.recommend-row-item-img{
|
||||
width: 100%;
|
||||
height: 300px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.recommend-row-carousel{
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.recommend-row-item{
|
||||
/*padding: 30px;*/
|
||||
}
|
||||
|
||||
</style>
|
@ -0,0 +1,44 @@
|
||||
<template>
|
||||
<div class="login-left-div">
|
||||
<div class="cover">
|
||||
<img src="../../static/images/DOGE.png">
|
||||
</div>
|
||||
<div class="login-left-border">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "login-left"
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
div.login-left-div{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
}
|
||||
div.login-left-border{
|
||||
border-right-width: 2px;
|
||||
border-right-color: #F2F3F5;
|
||||
border-right-style: solid;
|
||||
height: 200px;
|
||||
margin-right: 50px;
|
||||
margin-left: 200px;
|
||||
}
|
||||
div.cover{
|
||||
position: relative;
|
||||
}
|
||||
div.cover:after{
|
||||
position: absolute;
|
||||
content: '';
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
box-shadow:0 0 50px 30px #ffffff inset;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,96 @@
|
||||
<template>
|
||||
<div class="login-right-div">
|
||||
<el-form ref="loginForm" label-width="100px" class="" :rules="rules" :model="ruleForm">
|
||||
<el-form-item label="用户名" prop="userName">
|
||||
<el-input type="text" autocomplete="off" v-model="ruleForm.userName" size="small" class="userNameInput" placeholder="用户名"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="密码" prop="passWord">
|
||||
<el-input type="password" autocomplete="off" v-model="ruleForm.passWord" size="small" placeholder="密码"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="submitLogin('loginForm')" class="loginButton">提交</el-button>
|
||||
<el-button @click="resetForm('loginForm')">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {login} from '@/api/user'
|
||||
export default {
|
||||
name: "login-right",
|
||||
data(){
|
||||
return{
|
||||
ruleForm:{
|
||||
userName:'',
|
||||
passWord:'',
|
||||
},
|
||||
rules:{
|
||||
userName:[
|
||||
{required:true,message:'请输入用户名',trigger:'blur'},
|
||||
{min:3,max:20,message:'用户名长度在3到20个字符',trigger: 'blur'}
|
||||
],
|
||||
passWord:[
|
||||
{required:true,message:'请输入密码',trigger:'blur'},
|
||||
{min:3,max:30,trigger: 'blur'}
|
||||
],
|
||||
}
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
//提交登录
|
||||
submitLogin(formName){
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
this.onSubmit();
|
||||
} else {
|
||||
console.log('error submit!!');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
//重置表单
|
||||
resetForm(formName) {
|
||||
this.$refs[formName].resetFields();
|
||||
},
|
||||
//提交登录请求
|
||||
async onSubmit(){
|
||||
try{
|
||||
await login({
|
||||
"userName": this.ruleForm.userName,
|
||||
"passWord": this.ruleForm.passWord,
|
||||
}).then((data)=>{
|
||||
localStorage.setItem('token', data.toString())
|
||||
console.log(data)
|
||||
console.log(localStorage.getItem('token'))
|
||||
this.openSuccess();
|
||||
this.$router.push({name:'home'})
|
||||
})
|
||||
|
||||
}catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
openSuccess() {
|
||||
this.$message({
|
||||
message: '恭喜你,登录成功!',
|
||||
type: 'success'
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.userNameInput{
|
||||
width: 230px;
|
||||
}
|
||||
.loginButton{
|
||||
margin-right: 50px;
|
||||
}
|
||||
div.login-right-div{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,47 @@
|
||||
import Vue from 'vue'
|
||||
import App from './App.vue'
|
||||
import router from "./router/index";
|
||||
import ElementUI from 'element-ui';
|
||||
import 'element-ui/lib/theme-chalk/index.css';
|
||||
import store from "./store/index";
|
||||
import Vuex from 'vuex'
|
||||
//使用了element ui vueRouter以及vuex
|
||||
Vue.config.productionTip = false
|
||||
Vue.use(ElementUI);
|
||||
Vue.use(Vuex)
|
||||
|
||||
new Vue({
|
||||
render: h => h(App),
|
||||
router,
|
||||
store:store,
|
||||
}).$mount('#app')
|
||||
|
||||
router.beforeEach((to, from, next) => {
|
||||
/* 路由发生变化修改页面title */
|
||||
if (to.meta.title) {
|
||||
document.title = to.meta.title
|
||||
}
|
||||
next()
|
||||
})
|
||||
|
||||
//格式化日期
|
||||
Date.prototype.format = function(fmt) {
|
||||
var o = {
|
||||
"M+" : this.getMonth()+1, //月份
|
||||
"d+" : this.getDate(), //日
|
||||
"h+" : this.getHours(), //小时
|
||||
"m+" : this.getMinutes(), //分
|
||||
"s+" : this.getSeconds(), //秒
|
||||
"q+" : Math.floor((this.getMonth()+3)/3), //季度
|
||||
"S" : this.getMilliseconds() //毫秒
|
||||
};
|
||||
if(/(y+)/.test(fmt)) {
|
||||
fmt=fmt.replace(RegExp.$1, (this.getFullYear()+"").substr(4 - RegExp.$1.length));
|
||||
}
|
||||
for(var k in o) {
|
||||
if(new RegExp("("+ k +")").test(fmt)){
|
||||
fmt = fmt.replace(RegExp.$1, (RegExp.$1.length===1) ? (o[k]) : (("00"+ o[k]).substr((""+ o[k]).length)));
|
||||
}
|
||||
}
|
||||
return fmt;
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
<template>
|
||||
<transition name="el-fade-in-linear">
|
||||
<div class="app-detail">
|
||||
<div class="app-header">
|
||||
<appHeader></appHeader>
|
||||
<el-divider></el-divider>
|
||||
</div>
|
||||
<detailHead></detailHead>
|
||||
<detailBody></detailBody>
|
||||
<div class="app-footer">
|
||||
<el-divider></el-divider>
|
||||
<appFooter class="app-footer"></appFooter>
|
||||
</div>
|
||||
</div>
|
||||
</transition>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import appHeader from "@/components/header/header";
|
||||
import appFooter from "@/components/footer/footer";
|
||||
import detailHead from "@/components/detail/head"
|
||||
import detailBody from "@/components/detail/body"
|
||||
|
||||
|
||||
|
||||
|
||||
export default {
|
||||
name: "detail",
|
||||
components: {
|
||||
appHeader,
|
||||
appFooter,
|
||||
detailHead,
|
||||
detailBody,
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-divider--horizontal {
|
||||
margin: 0;
|
||||
}
|
||||
div.app-header{
|
||||
position: -webkit-sticky;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 99;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,64 @@
|
||||
<template>
|
||||
<transition name="el-fade-in-linear">
|
||||
<div class="app-home">
|
||||
<el-backtop target=".app-home" :bottom="100" :visibility-height="100" :right="20"></el-backtop>
|
||||
<div class="app-header">
|
||||
<appHeader></appHeader>
|
||||
<el-divider></el-divider>
|
||||
</div>
|
||||
<span class="carousel-title" style="margin-top: 50px">今日推荐Today</span>
|
||||
<home-carousel style="margin-bottom: 50px"></home-carousel>
|
||||
<home-discount style="margin-bottom: 50px"></home-discount>
|
||||
<home-recommend style="margin-bottom: 50px"></home-recommend>
|
||||
<div class="app-footer">
|
||||
<el-divider></el-divider>
|
||||
<appFooter class="app-footer"></appFooter>
|
||||
</div>
|
||||
</div>
|
||||
</transition>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "home",
|
||||
components: {
|
||||
appHeader,
|
||||
appFooter,
|
||||
homeCarousel,
|
||||
homeDiscount,
|
||||
homeRecommend,
|
||||
}
|
||||
}
|
||||
import appHeader from "../../components/header/header";
|
||||
import appFooter from "@/components/footer/footer";
|
||||
import homeCarousel from "@/components/home/carousel"
|
||||
import homeDiscount from "@/components/home/discount"
|
||||
import homeRecommend from "@/components/home/recommend"
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-divider--horizontal {
|
||||
margin: 0;
|
||||
}
|
||||
div.app-home{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
.app-footer{
|
||||
|
||||
}
|
||||
span.carousel-title{
|
||||
font-weight: 700;
|
||||
color: #111111;
|
||||
font-size: 37px;
|
||||
}
|
||||
div.app-header{
|
||||
position: -webkit-sticky;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 99;
|
||||
}
|
||||
|
||||
</style>
|
@ -0,0 +1,66 @@
|
||||
<template>
|
||||
<transition name="el-fade-in-linear">
|
||||
<div class="app-login">
|
||||
<div class="app-header">
|
||||
<appHeader></appHeader>
|
||||
<el-divider></el-divider>
|
||||
</div>
|
||||
<div class="login-title">登录</div>
|
||||
<div class="login-main" >
|
||||
<login-left></login-left>
|
||||
<login-right></login-right>
|
||||
</div>
|
||||
<div class="app-footer">
|
||||
<el-divider></el-divider>
|
||||
<appFooter class="app-footer"></appFooter>
|
||||
</div>
|
||||
</div>
|
||||
</transition>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "login",
|
||||
components:{
|
||||
loginLeft,
|
||||
appHeader,
|
||||
appFooter,
|
||||
loginRight,
|
||||
}
|
||||
}
|
||||
import loginLeft from "@/components/login/login-left";
|
||||
import loginRight from "@/components/login/login-right";
|
||||
import appHeader from "../../components/header/header";
|
||||
import appFooter from "@/components/footer/footer";
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
div.app-login{
|
||||
display: flex;
|
||||
flex-direction:column;
|
||||
overflow-y: scroll;
|
||||
min-height: 100vh;
|
||||
}
|
||||
div.login-main{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
flex: 1;
|
||||
margin-top: -50px;
|
||||
}
|
||||
.el-divider--horizontal {
|
||||
margin: 0;
|
||||
}
|
||||
.login-title{
|
||||
font-weight: 700;
|
||||
color: #111111;
|
||||
font-size: 50px;
|
||||
margin-top: 30px;
|
||||
}
|
||||
div.app-header{
|
||||
position: -webkit-sticky;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 99;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,162 @@
|
||||
<template>
|
||||
<transition name="el-fade-in-linear">
|
||||
<div class="app-myInfo">
|
||||
<div class="app-header">
|
||||
<appHeader></appHeader>
|
||||
<el-divider></el-divider>
|
||||
</div>
|
||||
<div class="myInfo-body">
|
||||
<el-card class="box-card editCard">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>个人信息修改</span>
|
||||
</div>
|
||||
<el-form ref="editForm" :model="editForm" label-width="80px" :rules="editRules" hide-required-asterisk="true" >
|
||||
<el-form-item label="昵称" prop="name">
|
||||
<el-input type="text" autocomplete="off" size="small" placeholder="昵称" maxlength="30" show-word-limit v-model="editForm.name"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="收货地址" prop="address">
|
||||
<el-input type="text" autocomplete="off" size="small" placeholder="收货地址" maxlength="50" show-word-limit v-model="editForm.address"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="电话号码" prop="phone">
|
||||
<el-input type="text" autocomplete="off" size="small" placeholder="电话号码" suffix-icon="el-icon-mobile-phone" v-model="editForm.phone"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="性别" size="medium" prop="sex">
|
||||
<el-radio-group v-model="editForm.sex">
|
||||
<el-radio border label="男"></el-radio>
|
||||
<el-radio border label="女"></el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item class="editButtonItem">
|
||||
<el-button type="primary" @click="submitEdit('editForm')" class="editButton">提交</el-button>
|
||||
<el-button @click="resetForm('editForm')" class="resetButton">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</div>
|
||||
|
||||
<div class="app-footer">
|
||||
<el-divider></el-divider>
|
||||
<appFooter class="app-footer"></appFooter>
|
||||
</div>
|
||||
</div>
|
||||
</transition>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import appHeader from "@/components/header/header";
|
||||
import appFooter from "@/components/footer/footer";
|
||||
import {editInfo} from "@/api/user";
|
||||
|
||||
export default {
|
||||
name: "myInfo",
|
||||
components: {
|
||||
appHeader,
|
||||
appFooter,
|
||||
},
|
||||
|
||||
data(){
|
||||
return{
|
||||
editForm: {
|
||||
sex:'',
|
||||
phone:'',
|
||||
name:'',
|
||||
address:'',
|
||||
},
|
||||
|
||||
editRules:{
|
||||
sex:[
|
||||
{required:true,message:'请选择性别',trigger:'blur'},
|
||||
],
|
||||
phone:[
|
||||
{required:true,message:'请输入电话号码',trigger:'blur'},
|
||||
{min:11,max:11,trigger: 'blur'}
|
||||
],
|
||||
name:[
|
||||
{required:true,message:'请输入您的昵称',trigger:'blur'},
|
||||
{min:3,max:30,trigger: 'blur'}
|
||||
],
|
||||
address:[
|
||||
{required:true,message:'请输入您的收货地址',trigger:'blur'},
|
||||
{min:3,max:50,trigger: 'blur'}
|
||||
],
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
methods:{
|
||||
//提交编辑
|
||||
submitEdit(formName){
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
this.onSubmit()
|
||||
} else {
|
||||
console.log('error submit!!');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
//提交编辑请求
|
||||
async onSubmit(){
|
||||
const { data} = await editInfo({
|
||||
"name": this.editForm.userName,
|
||||
"sex": this.editForm.sex,
|
||||
"phone": this.editForm.phone,
|
||||
"address": this.editForm.address,
|
||||
})
|
||||
window.location.href = '/'
|
||||
console.log(data)
|
||||
this.openSuccess()
|
||||
},
|
||||
|
||||
openSuccess() {
|
||||
this.$message({
|
||||
message: '恭喜你,编辑个人信息成功!',
|
||||
type: 'success'
|
||||
});
|
||||
},
|
||||
|
||||
//重置表单
|
||||
resetForm(formName) {
|
||||
this.$refs[formName].resetFields();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-divider--horizontal {
|
||||
margin: 0;
|
||||
}
|
||||
div.app-myInfo{
|
||||
display: flex;
|
||||
min-height: 100vh;
|
||||
flex-direction: column;
|
||||
/*justify-content: center;*/
|
||||
}
|
||||
.myInfo-body{
|
||||
flex:1;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.editCard{
|
||||
width: 391px;
|
||||
height: 520px;
|
||||
padding: 10px;
|
||||
}
|
||||
.editButtonItem{
|
||||
margin-top: 10px;
|
||||
}
|
||||
.editButton{
|
||||
width: 100px;
|
||||
margin-right: 60px;
|
||||
}
|
||||
.resetButton{
|
||||
width: 100px;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,197 @@
|
||||
<template>
|
||||
<transition name="el-fade-in-linear">
|
||||
<div class="app-register">
|
||||
<div class="app-header">
|
||||
<appHeader></appHeader>
|
||||
<el-divider></el-divider>
|
||||
</div>
|
||||
<div class="register-main">
|
||||
<el-card class="register-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span class="register-title">注册</span>
|
||||
</div>
|
||||
<el-form ref="registerForm" label-width="70px" class="" :rules="registerRules" :model="registerForm" hide-required-asterisk="true">
|
||||
<el-form-item label="用户名" prop="userName">
|
||||
<el-input type="text" autocomplete="off" size="small" class="userNameInput" placeholder="用户名" suffix-icon="el-icon-user" v-model="registerForm.userName"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="密码" prop="passWord">
|
||||
<el-input type="password" autocomplete="off" size="small" placeholder="密码" suffix-icon="el-icon-key" v-model="registerForm.passWord"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="性别" size="medium" prop="sex">
|
||||
<el-radio-group v-model="registerForm.sex">
|
||||
<el-radio border label="男"></el-radio>
|
||||
<el-radio border label="女"></el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="电话号码" prop="phone">
|
||||
<el-input type="text" autocomplete="off" size="small" placeholder="电话号码" suffix-icon="el-icon-mobile-phone" v-model="registerForm.phone"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="昵称" prop="name">
|
||||
<el-input type="text" autocomplete="off" size="small" placeholder="昵称" maxlength="30" show-word-limit v-model="registerForm.name"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="收货地址" prop="address">
|
||||
<el-input type="text" autocomplete="off" size="small" placeholder="收货地址" maxlength="50" show-word-limit v-model="registerForm.address"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="submitRegister('registerForm')" class="registerButton">提交</el-button>
|
||||
<el-button @click="resetForm('registerForm')">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<vCode
|
||||
:show="isShow"
|
||||
@success="vCodeSuccess"
|
||||
@close="vCodeClose"
|
||||
:imgs="[vCodeImg1]"
|
||||
/>
|
||||
</el-card>
|
||||
</div>
|
||||
<div class="app-footer">
|
||||
<el-divider></el-divider>
|
||||
<appFooter class="app-footer"></appFooter>
|
||||
</div>
|
||||
</div>
|
||||
</transition>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "register",
|
||||
components: {
|
||||
appHeader,
|
||||
appFooter,
|
||||
vCode,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
registerForm: {
|
||||
userName: '',
|
||||
passWord: '',
|
||||
sex:'',
|
||||
phone:'',
|
||||
name:'',
|
||||
address:'',
|
||||
},
|
||||
registerRules:{
|
||||
userName:[
|
||||
{required:true,message:'请输入用户名',trigger:'blur'},
|
||||
{min:3,max:20,message:'用户名长度在3到20个字符',trigger: 'blur'}
|
||||
],
|
||||
passWord:[
|
||||
{required:true,message:'请输入密码',trigger:'blur'},
|
||||
{min:3,max:30,trigger: 'blur'}
|
||||
],
|
||||
sex:[
|
||||
{required:true,message:'请选择性别',trigger:'blur'},
|
||||
],
|
||||
phone:[
|
||||
{required:true,message:'请输入电话号码',trigger:'blur'},
|
||||
{min:11,max:11,trigger: 'blur'}
|
||||
],
|
||||
name:[
|
||||
{required:true,message:'请输入您的昵称',trigger:'blur'},
|
||||
{min:3,max:30,trigger: 'blur'}
|
||||
],
|
||||
address:[
|
||||
{required:true,message:'请输入您的收货地址',trigger:'blur'},
|
||||
{min:3,max:50,trigger: 'blur'}
|
||||
],
|
||||
},
|
||||
isShow:false,
|
||||
vCodeImg1,
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
//提交注册请求
|
||||
submitRegister(formName){
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
this.isShow=true;
|
||||
} else {
|
||||
console.log('error submit!!');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
//重置表单
|
||||
resetForm(formName) {
|
||||
this.$refs[formName].resetFields();
|
||||
},
|
||||
//验证图通过
|
||||
vCodeSuccess(){
|
||||
this.isShow=false;
|
||||
this.onSubmit();
|
||||
},
|
||||
//验证图关闭
|
||||
vCodeClose(){
|
||||
this.isShow=false;
|
||||
},
|
||||
//提交注册请求
|
||||
async onSubmit(){
|
||||
const { data} = await register({
|
||||
"name": this.registerForm.userName,
|
||||
"sex": this.registerForm.sex,
|
||||
"phone": this.registerForm.phone,
|
||||
"userName": this.registerForm.userName,
|
||||
"passWord": this.registerForm.passWord,
|
||||
"address": this.registerForm.address,
|
||||
})
|
||||
window.location.href = '/'
|
||||
console.log(data)
|
||||
this.openSuccess()
|
||||
},
|
||||
openSuccess() {
|
||||
this.$message({
|
||||
message: '恭喜你,注册成功!',
|
||||
type: 'success'
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
|
||||
}
|
||||
import appHeader from "../../components/header/header";
|
||||
import appFooter from "@/components/footer/footer";
|
||||
import vCode from "vue-puzzle-vcode";
|
||||
import vCodeImg1 from '@/static/images/vcodeimg1.jpeg'
|
||||
import {register} from '@/api/user'
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-divider--horizontal {
|
||||
margin: 0;
|
||||
}
|
||||
div.app-register{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
min-height: 100vh;
|
||||
|
||||
}
|
||||
div.register-main{
|
||||
flex: 1;
|
||||
background-image: url("../../static/images/background.jpg");
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
.register-card{
|
||||
width: 391px;
|
||||
height: 520px;
|
||||
margin-left: 60%;
|
||||
margin-top: 30px;
|
||||
padding: 10px;
|
||||
}
|
||||
span.register-title{
|
||||
font-weight: 700;
|
||||
color: #111111;
|
||||
font-size: 30px;
|
||||
}
|
||||
.registerButton{
|
||||
margin-right: 100px;
|
||||
}
|
||||
div.app-header{
|
||||
position: -webkit-sticky;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 99;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,176 @@
|
||||
<template>
|
||||
<transition name="el-fade-in-linear">
|
||||
<div class="app-editEntrust">
|
||||
<div class="app-header">
|
||||
<appHeader></appHeader>
|
||||
<el-divider></el-divider>
|
||||
</div>
|
||||
<div class="editEntrust-body">
|
||||
<el-form ref="form" label-width="150px" class="formTable">
|
||||
<el-form-item label="委托物品图片">
|
||||
<img :src="getImgUrl(entrustDetail.eGoodsCoverImg)" style="width: 150px;height: 150px;">
|
||||
</el-form-item>
|
||||
<el-form-item label="委托物品名称">
|
||||
<el-input v-model="entrustDetail.eGoodsName" placeholder="请输入物品名称"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="委托物品单价 ">
|
||||
<el-input v-model="entrustDetail.eGoodsPrice" placeholder="请输入物品单价"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="委托物品数量 ">
|
||||
<el-input-number :min="1" :max="100" label="物品数量" v-model="entrustDetail.eStockNum"></el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="委托物品简介 ">
|
||||
<el-input v-model="entrustDetail.eGoodsIntro" placeholder="请输入物品简介"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="选择分类">
|
||||
<el-select v-model="entrustDetail.eGoodsCategory" placeholder="请选择分类">
|
||||
<el-option :label="item.categoryName" :value="item.categoryId"
|
||||
v-for="item in childrenCategoryList"
|
||||
v-bind:key="item.categoryId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="物品描述">
|
||||
<el-input type="textarea" v-model="entrustDetail.eGoodsDetailContent"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<div class="app-footer">
|
||||
<el-divider></el-divider>
|
||||
<appFooter class="app-footer"></appFooter>
|
||||
</div>
|
||||
</div>
|
||||
</transition>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import appHeader from "@/components/header/header";
|
||||
import appFooter from "@/components/footer/footer";
|
||||
import {listEntrustById} from '@/api/entrust'
|
||||
import {editAndPublishEntrust} from '@/api/entrust'
|
||||
import {listChildrenCategory} from "@/api/categoryAndGoods";
|
||||
export default {
|
||||
name: "editEntrust",
|
||||
components: {
|
||||
appHeader,
|
||||
appFooter,
|
||||
},
|
||||
data(){
|
||||
return{
|
||||
entrustDetail:"",
|
||||
childrenCategoryList:"",
|
||||
}
|
||||
},
|
||||
|
||||
methods:{
|
||||
//获取图片地址
|
||||
getImgUrl(imgId){
|
||||
return this.$store.state.baseUrl+"/img/"+imgId+".jpg"
|
||||
},
|
||||
|
||||
//获取委托详情
|
||||
async listEntrustDetail(){
|
||||
let entrustId=this.$store.state.editEntrustId
|
||||
try{
|
||||
await listEntrustById({entrustId}).then((data)=>{
|
||||
this.entrustDetail=data
|
||||
console.log(data);
|
||||
})
|
||||
|
||||
}catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
//获取分类
|
||||
async listChildren(){
|
||||
try{
|
||||
await listChildrenCategory({
|
||||
}).then((data)=>{
|
||||
this.childrenCategoryList=data
|
||||
console.log(data);
|
||||
})
|
||||
|
||||
}catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
|
||||
//发布委托
|
||||
async publishEntrust(){
|
||||
try{
|
||||
await editAndPublishEntrust({
|
||||
"entrust":{
|
||||
"goodsName":this.entrustDetail.eGoodsName,
|
||||
"goodsIntro":this.entrustDetail.eGoodsIntro,
|
||||
"goodsCategoryId":this.entrustDetail.eGoodsCategory,
|
||||
"goodsCoverImg":this.entrustDetail.eGoodsCoverImg,
|
||||
"goodsCarousel":this.entrustDetail.eGoodsCarousel,
|
||||
"goodsDetailContent":this.entrustDetail.eGoodsDetailContent,
|
||||
"stockNum":this.entrustDetail.eStockNum,
|
||||
"goodsStatus":1,
|
||||
"goodsScore":3.7,
|
||||
},
|
||||
"itPrice":this.entrustDetail.eGoodsPrice,
|
||||
"entrustId":this.entrustDetail.entrustId
|
||||
}).then((data)=>{
|
||||
console.log(data);
|
||||
alert("发布成功!")
|
||||
this.$router.push({
|
||||
name:'verifyEntrust',
|
||||
query:{
|
||||
t: Date.now(),
|
||||
}})
|
||||
})
|
||||
|
||||
}catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
|
||||
//创建时调用
|
||||
mounted() {
|
||||
this.listEntrustDetail()
|
||||
this.listChildren()
|
||||
},
|
||||
|
||||
//相同路由刷新时调用
|
||||
beforeRouteUpdate(){
|
||||
this.listEntrustDetail()
|
||||
this.listChildren()
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-divider--horizontal {
|
||||
margin: 0;
|
||||
}
|
||||
.app-editEntrust{
|
||||
display: flex;
|
||||
min-height: 100vh;
|
||||
flex-direction: column;
|
||||
/*justify-content: center;*/
|
||||
}
|
||||
.editEntrust-body{
|
||||
flex:1;
|
||||
display: flex;
|
||||
margin-top: 50px;
|
||||
}
|
||||
.formTable{
|
||||
margin: 0 auto;
|
||||
}
|
||||
div.app-header{
|
||||
position: -webkit-sticky;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 99;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,141 @@
|
||||
<template>
|
||||
<transition name="el-fade-in-linear">
|
||||
<div class="app-verifyEntrust">
|
||||
<div class="app-header">
|
||||
<appHeader></appHeader>
|
||||
<el-divider></el-divider>
|
||||
</div>
|
||||
<div class="verifyEntrust-body">
|
||||
<div class="tableCardDiv">
|
||||
<el-card class="box-card tableCard" >
|
||||
<div slot="header" class="clearfix orderTitle">
|
||||
<span >待审核委托列表</span>
|
||||
</div>
|
||||
<table border="0" class="verifyEntrust-table" cellspacing = 70px>
|
||||
<tr>
|
||||
<th>委托物品图片</th>
|
||||
<th>委托物品名称</th>
|
||||
<th>委托租赁价格</th>
|
||||
<th>委托租赁数量</th>
|
||||
<th>确认审核</th>
|
||||
</tr>
|
||||
<tr v-for="item in this.entrustList"
|
||||
v-bind:key="item.entrustId"
|
||||
>
|
||||
<td><img :src="getImgUrl(item.eGoodsCoverImg)" class="goodsImg" style="width: 70px;height: 70px"></td>
|
||||
<td>{{item.eGoodsName}}</td>
|
||||
<td>{{item.eGoodsPrice}}</td>
|
||||
<td>{{item.eStockNum}}</td>
|
||||
<td><el-button type="success" @click="toEditEntrust(item.entrustId)">审核</el-button></td>
|
||||
</tr>
|
||||
</table>
|
||||
</el-card>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="app-footer">
|
||||
<el-divider></el-divider>
|
||||
<appFooter class="app-footer"></appFooter>
|
||||
</div>
|
||||
</div>
|
||||
</transition>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import appHeader from "@/components/header/header";
|
||||
import appFooter from "@/components/footer/footer";
|
||||
import {listEntrust} from '@/api/entrust'
|
||||
export default {
|
||||
name: "verifyEntrust",
|
||||
components: {
|
||||
appHeader,
|
||||
appFooter,
|
||||
},
|
||||
data(){
|
||||
return{
|
||||
entrustList:"",
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
//获取委托列表
|
||||
async getEntrustList(){
|
||||
try{
|
||||
await listEntrust({
|
||||
}).then((data)=>{
|
||||
this.entrustList=data
|
||||
console.log(data);
|
||||
})
|
||||
|
||||
}catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
|
||||
//获取图片地址
|
||||
getImgUrl(imgId){
|
||||
return this.$store.state.baseUrl+"/img/"+imgId+".jpg"
|
||||
},
|
||||
|
||||
//前往编辑委托页面
|
||||
toEditEntrust(entrustId){
|
||||
this.$store.commit("commitEditEntrustId",entrustId)
|
||||
console.log(this.$store.state.editEntrustId)
|
||||
this.$router.push({
|
||||
name:'editEntrust',
|
||||
query:{
|
||||
t: Date.now(),
|
||||
}})
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
//创建时调用
|
||||
mounted() {
|
||||
this.getEntrustList()
|
||||
},
|
||||
|
||||
//相同路由刷新时调用
|
||||
beforeRouteUpdate(){
|
||||
this.getEntrustList()
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-divider--horizontal {
|
||||
margin: 0;
|
||||
}
|
||||
div.app-verifyEntrust{
|
||||
display: flex;
|
||||
min-height: 100vh;
|
||||
flex-direction: column;
|
||||
/*justify-content: center;*/
|
||||
}
|
||||
.verifyEntrust-body{
|
||||
flex:1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
|
||||
.verifyEntrust-table th{
|
||||
margin-left: 10px;
|
||||
}
|
||||
.tableCardDiv{
|
||||
margin: 0 auto;
|
||||
}
|
||||
.tableCard{
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
div.app-header{
|
||||
position: -webkit-sticky;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 99;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,104 @@
|
||||
import Vue from "vue";
|
||||
import VueRouter from "vue-router";
|
||||
|
||||
Vue.use(VueRouter);
|
||||
//获取原型对象上的push函数
|
||||
const originalPush = VueRouter.prototype.push
|
||||
//修改原型对象中的push方法
|
||||
VueRouter.prototype.push = function push(location) {
|
||||
return originalPush.call(this, location).catch(err => err)
|
||||
}
|
||||
|
||||
export default new VueRouter({
|
||||
mode: "hash",
|
||||
routes: [
|
||||
{
|
||||
name: "home",
|
||||
path: "/",
|
||||
component: () => import("../pages/home/home"),
|
||||
meta: {
|
||||
title: "首页"
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "login",
|
||||
path: "/login",
|
||||
component: () => import("../pages/login/login"),
|
||||
meta: {
|
||||
title: "登录"
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "register",
|
||||
path: "/register",
|
||||
component: () => import("../pages/register/register"),
|
||||
meta: {
|
||||
title: "注册"
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "search",
|
||||
path: "/search",
|
||||
component: () => import("../pages/search/search"),
|
||||
meta: {
|
||||
title: "搜索"
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "detail",
|
||||
path: "/detail",
|
||||
component: () => import("../pages/detail/detail"),
|
||||
meta: {
|
||||
title: "详情"
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "myOrder",
|
||||
path: "/myOrder",
|
||||
component: () => import("../pages/myOrder/myOrder"),
|
||||
meta: {
|
||||
title: "我的订单"
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "publishEntrust",
|
||||
path: "/publishEntrust",
|
||||
component: () => import("../pages/publishEntrust/publishEntrust"),
|
||||
meta: {
|
||||
title: "发布委托"
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "verifyEntrust",
|
||||
path: "/verifyEntrust",
|
||||
component: () => import("../pages/verifyEntrust/verifyEntrust"),
|
||||
meta: {
|
||||
title: "审核委托"
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "editEntrust",
|
||||
path: "/editEntrust",
|
||||
component: () => import("../pages/verifyEntrust/editEntrust"),
|
||||
meta: {
|
||||
title: "审核编辑委托"
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "cart",
|
||||
path: "/cart",
|
||||
component: () => import("../pages/cart/cart"),
|
||||
meta: {
|
||||
title: "购物车"
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "myInfo",
|
||||
path: "/myInfo",
|
||||
component: () => import("../pages/myInfo/myInfo"),
|
||||
meta: {
|
||||
title: "个人信息"
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
After Width: | Height: | Size: 210 KiB |
After Width: | Height: | Size: 39 KiB |
After Width: | Height: | Size: 46 KiB |
After Width: | Height: | Size: 41 KiB |
After Width: | Height: | Size: 90 KiB |
After Width: | Height: | Size: 55 KiB |
After Width: | Height: | Size: 84 KiB |
After Width: | Height: | Size: 6.9 KiB |
After Width: | Height: | Size: 8.2 MiB |
After Width: | Height: | Size: 92 KiB |
@ -0,0 +1,10 @@
|
||||
import Vue from "vue";
|
||||
import Vuex from "vuex";
|
||||
import state from "./state";
|
||||
import mutations from "./mutations";
|
||||
Vue.use(Vuex);
|
||||
|
||||
export default new Vuex.Store({
|
||||
state,
|
||||
mutations
|
||||
})
|