Browse Source

前台提交

panhui 7 years ago
parent
commit
546bd30578
33 changed files with 3330 additions and 350 deletions
  1. 3 3
      src/main/java/com/izouma/awesomeadmin/constant/AppConstant.java
  2. 587 49
      src/main/vue/package-lock.json
  3. 2 0
      src/main/vue/package.json
  4. BIN
      src/main/vue/src/assetsPre/fail.png
  5. BIN
      src/main/vue/src/assetsPre/logoWhite.png
  6. BIN
      src/main/vue/src/assetsPre/pay1.png
  7. BIN
      src/main/vue/src/assetsPre/pay2.png
  8. BIN
      src/main/vue/src/assetsPre/pay3.png
  9. BIN
      src/main/vue/src/assetsPre/success.png
  10. 0 0
      src/main/vue/src/city.js
  11. 12 7
      src/main/vue/src/components/GoodsLarge.vue
  12. 8 2
      src/main/vue/src/components/GoodsLittle.vue
  13. 188 0
      src/main/vue/src/components/OrderItem.vue
  14. 5 0
      src/main/vue/src/elementVariables.scss
  15. 134 1
      src/main/vue/src/emUI.less
  16. 23 0
      src/main/vue/src/entries/index.html
  17. 14 2
      src/main/vue/src/entries/index.js
  18. 110 0
      src/main/vue/src/mainPre.less
  19. 75 35
      src/main/vue/src/pagesPre/App.vue
  20. 6 4
      src/main/vue/src/pagesPre/Business.vue
  21. 0 22
      src/main/vue/src/pagesPre/Customer.vue
  22. 13 6
      src/main/vue/src/pagesPre/Index.vue
  23. 10 2
      src/main/vue/src/pagesPre/Login.vue
  24. 168 0
      src/main/vue/src/pagesPre/Order.vue
  25. 168 0
      src/main/vue/src/pagesPre/PayOrder.vue
  26. 346 157
      src/main/vue/src/pagesPre/Product.vue
  27. 120 34
      src/main/vue/src/pagesPre/Shop.vue
  28. 781 0
      src/main/vue/src/pagesPre/Submit.vue
  29. 193 0
      src/main/vue/src/pagesPre/UserCenter.vue
  30. 161 0
      src/main/vue/src/pagesPre/UserCenterHome.vue
  31. 128 0
      src/main/vue/src/pagesPre/UserOrder.vue
  32. 73 25
      src/main/vue/src/routerPre/index.js
  33. 2 1
      src/main/vue/src/vuexPre/index.js

+ 3 - 3
src/main/java/com/izouma/awesomeadmin/constant/AppConstant.java

@@ -130,12 +130,12 @@ public interface AppConstant {
         Integer PAY_OVER = 1;
 
         /**
-         * 待修图
+         * 待修图、代发货
          */
         Integer WAIT_REPAIR = 2;
 
         /**
-         * 修图完成待验收
+         * 修图完成待验收、已发货
          */
         Integer ACCEPT = 3;
 
@@ -146,7 +146,7 @@ public interface AppConstant {
 
 
         /**
-         * 验收完成待评论
+         * 验收完成待评论、已收货待评论
          */
         Integer FINISH = 5;
 

File diff suppressed because it is too large
+ 587 - 49
src/main/vue/package-lock.json


+ 2 - 0
src/main/vue/package.json

@@ -22,6 +22,7 @@
     "less": "^3.0.4",
     "less-loader": "^4.1.0",
     "normalize.css": "^8.0.0",
+    "sass-loader": "^7.1.0",
     "tinymce": "^4.8.2",
     "vue": "^2.5.2",
     "vue-amap": "^0.5.8",
@@ -50,6 +51,7 @@
     "friendly-errors-webpack-plugin": "^1.7.0",
     "html-webpack-plugin": "^2.30.1",
     "node-notifier": "^5.1.2",
+    "node-sass": "^4.9.3",
     "optimize-css-assets-webpack-plugin": "^3.2.0",
     "ora": "^1.2.0",
     "portfinder": "^1.0.13",

BIN
src/main/vue/src/assetsPre/fail.png


BIN
src/main/vue/src/assetsPre/logoWhite.png


BIN
src/main/vue/src/assetsPre/pay1.png


BIN
src/main/vue/src/assetsPre/pay2.png


BIN
src/main/vue/src/assetsPre/pay3.png


BIN
src/main/vue/src/assetsPre/success.png


File diff suppressed because it is too large
+ 0 - 0
src/main/vue/src/city.js


+ 12 - 7
src/main/vue/src/components/GoodsLarge.vue

@@ -1,5 +1,5 @@
 <template>
-    <router-link :to='{name:"shop",query:{id:info.id}}' class="goods">
+    <router-link :to='{name:"shop",query:{id:info.id,breHref:breHref}}' class="goods">
 
         <div class="goodsImg" :style="{backgroundImage:'url('+info.icon+')'}"></div>
         <div class="goodsInfo">
@@ -29,19 +29,24 @@
 
 export default {
     name: 'goodsLarge',
-    props:{
-        info:{
-            type:Object,
-            default:{}
+    props: {
+        info: {
+            type: Object,
+            default: {}
         }
     },
     data() {
         return {
-
         }
     },
     computed: {
-
+        breHref() {
+            var str = '首页,/index_;'
+            if(this.$route.name=='business'){
+                str+=document.title+','+this.$route.name+'_;'
+            }
+            return str
+        }
     },
     methods: {
 

+ 8 - 2
src/main/vue/src/components/GoodsLittle.vue

@@ -1,5 +1,5 @@
 <template>
-    <router-link :to='{name:"shop",query:{id:info.id}}' class="goods">
+    <router-link :to='{name:"shop",query:{id:info.id,breHref:breHref}}' class="goods">
         <img src="../assetsPre/levelA.png" alt="" class="level">
         <div class="goodsImg" :style="{backgroundImage:'url('+info.icon+')'}"></div>
         <div class="title">
@@ -33,7 +33,13 @@ export default {
         }
     },
     computed: {
-
+        breHref() {
+            var str = '首页,/index_;'
+            if (this.$route.name == 'business') {
+                str += document.title + ',' + this.$route.name + '_;'
+            }
+            return str
+        }
     },
     methods: {
 

+ 188 - 0
src/main/vue/src/components/OrderItem.vue

@@ -0,0 +1,188 @@
+<template>
+    <div class="order" v-if="info.productInfo">
+        <div class="orderTop">
+            <span style="margin-left:25px;">{{getTime(info.createTime)}}</span>
+            <span style="margin-left:30px;">订单号:{{info.orderCode}}</span>
+
+            <span style="float:right;position: relative;">
+                <span style="margin-right:66px;">店铺:{{info.productInfo.storeInfo.storeName}}</span>
+                <img style="width:30px;height:25px;position: absolute;right: 30px;top: 9px;" src="../assetsPre/kefu.png" alt="">
+            </span>
+        </div>
+
+        <div class="ordercontent">
+            <div class="left" style="width:687px">
+                <div class="goodsInfo">
+                    <div class="goodsImg" :style="{backgroundImage:'url('+info.productInfo.image+')'}"></div>
+                    <div class="title">
+                        <div class="name">{{info.productInfo.title}}</div>
+                        <div class="subName">{{info.specification}}</div>
+                    </div>
+                </div>
+                <span style="width:56px;color:#FD9501">{{info.unitPrice}}</span>
+                <span style="width:56px">{{info.quantity}}</span>
+            </div>
+            <div class="right" style="width:270px;">
+                <div class="price">
+                    ¥{{info.totlePrice}}
+                </div>
+                <div>
+                    <el-button type="primary" size="mini" style="width:78px">去支付</el-button>
+                </div>
+            </div>
+        </div>
+
+        <div class="orderRemark">
+            <span style="color:#FD9501">备注要求</span>
+            <span style="margin-left:20px;">{{info.remark}}</span>
+        </div>
+    </div>
+</template>
+
+<script>
+
+export default {
+    name: 'orderItem',
+    props: {
+        info: {
+            type: Object,
+            default: {}
+        }
+    },
+    data() {
+        return {
+        }
+    },
+    computed: {
+        breHref() {
+            var str = '首页,/index_;'
+            if (this.$route.name == 'business') {
+                str += document.title + ',' + this.$route.name + '_;'
+            }
+            return str
+        }
+    },
+    methods: {
+
+    }
+}
+</script>
+
+<style lang="less" scoped>
+.order {
+    width: 957px;
+    border: 1px solid rgba(245, 166, 35, 1);
+    margin: 0 auto 23px;
+
+    .orderTop {
+        height: 40px;
+        background: rgba(255, 249, 241, 1);
+        line-height: 40px;
+
+        span {
+            font-size: 12px;
+            font-family: MicrosoftYaHei;
+            color: rgba(51, 51, 51, 1);
+        }
+    }
+
+    .ordercontent {
+        font-size: 0;
+        border-top: 1px solid #ebebeb;
+        border-bottom: 1px solid #ebebeb;
+        .left {
+            display: inline-block;
+            vertical-align: middle;
+
+            .goodsInfo {
+                width: 240px;
+                padding: 17px 5px 9px 25px;
+                display: inline-block;
+                font-size: 0;
+                height: 60px;
+
+                .goodsImg {
+                    width: 80px;
+                    height: 60px;
+                    border-radius: 2px;
+                    background-position: center center;
+                    background-size: cover;
+                    background-repeat: no-repeat;
+                    display: inline-block;
+                    vertical-align: middle;
+                }
+
+                .title {
+                    width: 140px;
+                    margin-left: 17px;
+                    display: inline-block;
+                    vertical-align: top;
+
+                    .name {
+                        font-size: 14px;
+                        font-family: MicrosoftYaHei;
+                        color: rgba(51, 51, 51, 1);
+                        line-height: 19px;
+                        display: block;
+                        overflow: hidden;
+                        text-overflow: ellipsis;
+                        white-space: nowrap;
+                    }
+
+                    .subName {
+                        font-size: 12px;
+                        font-family: MicrosoftYaHei;
+                        color: rgba(11, 158, 192, 1);
+                        line-height: 16px;
+                        display: block;
+                        overflow: hidden;
+                        text-overflow: ellipsis;
+                        white-space: nowrap;
+                        margin-top: 11px;
+                    }
+                }
+            }
+
+            span {
+                font-size: 12px;
+                font-family: MicrosoftYaHei;
+                color: rgba(51, 51, 51, 1);
+                line-height: 16px;
+                display: inline-block;
+                text-align: center;
+            }
+        }
+        .right {
+            display: inline-block;
+            height: 87px;
+            line-height: 87px;
+            vertical-align: middle;
+
+            div {
+                width: 50%;
+                height: 100%;
+                display: inline-block;
+                text-align: center;
+                border-left: 1px solid #eaeaea;
+                box-sizing: border-box;
+                vertical-align: middle;
+
+                &.price {
+                    font-size: 20px;
+                    font-family: MicrosoftYaHei;
+                    color: #e8200e;
+                    font-weight: bold;
+                }
+            }
+        }
+    }
+
+    .orderRemark {
+        font-size: 12px;
+        font-family: MicrosoftYaHei;
+        color: rgba(51, 51, 51, 1);
+        line-height: 16px;
+        padding: 14px 25px 11px;
+    }
+}
+</style>

+ 5 - 0
src/main/vue/src/elementVariables.scss

@@ -0,0 +1,5 @@
+$--color-primary: #0B9EC0;
+$--color-warning: #fb6e08 !default;
+$--color-info: #DBDBDB !default;
+$--font-path: '~element-ui/lib/theme-chalk/fonts';
+@import "~element-ui/packages/theme-chalk/src/index";

+ 134 - 1
src/main/vue/src/emUI.less

@@ -120,6 +120,28 @@ input:-webkit-autofill {
     }
 }
 
+.use-search{
+    .el-input__inner{
+        border:1px solid #DBDBDB;
+        height: 35px;
+        border-radius: 0px;
+    }
+    .el-input-group__append, .el-input-group__prepend{
+        border:1px solid #DBDBDB;
+        background-color: #DBDBDB;
+        width:56px;
+        cursor: pointer;
+        border-radius: 0;
+    }
+
+    button{
+        width: 100%;
+        font-size:14px;
+        font-family:MicrosoftYaHei;
+        color:rgba(51,51,51,1);
+    }
+}
+
 
 a{
     outline: none;
@@ -173,7 +195,7 @@ a{
     font-weight: normal;
 }
 .Breadcrumb .el-breadcrumb__inner a, .el-breadcrumb__inner.is-link:hover{
-    color: #0B9EC0
+    color: #666666
 }
 .Breadcrumb .el-breadcrumb__inner{
     color: #666666;
@@ -183,6 +205,14 @@ a{
     font-weight: normal;
 }
 
+.content .el-textarea__inner:focus{
+    border-color: #1BB8AC;
+}
+.content .el-textarea__inner{
+    min-height: 50px;
+}
+
+
 .goodsTab .el-tabs__item{
     font-size:14px;
     font-family:MicrosoftYaHei;
@@ -200,3 +230,106 @@ a{
 .goodsTab .el-tabs__nav-wrap{
     padding-left: 26px;
 }
+
+
+.star .el-rate__icon{
+    margin-right: 3px;
+}
+
+
+.buyNum .el-input-number__decrease,.buyNum .el-input-number__increase{
+    background: #fff;
+    color: #666666;
+    // border-radius: 0;
+}
+
+.buyNum .el-input-number__decrease{
+    border-right: 1px solid #979797;
+}
+.buyNum .el-input-number__increase{
+    border-left: 1px solid #979797;
+}
+.buyNum .el-input__inner{
+    border: 1px solid #979797;
+}
+.buyNum .el-input-number__decrease.is-disabled,.buyNum .el-input-number__increase.is-disabled{
+    color: #666666;
+}
+
+
+.btn-cancel{
+    width:110px;
+    height:36px;
+    border-radius:2px;
+    margin-top: 30px;
+    float:right;
+    margin-right: 30px;
+    margin-bottom: 25px;
+}
+
+.btn-confirm{
+    width:110px;
+    height:36px;
+    border-radius:2px;
+    margin-top: 30px;
+    float:left;
+    margin-left: 30px!important;
+    margin-bottom: 25px;
+}
+
+.el-message-box{
+    width: 346px;
+}
+
+
+.el-message-box__headerbtn .el-message-box__close{
+    color:#0B9EC0;
+    font-size: 24px;
+}
+
+.collection [class^="el-icon-"],.collection [class*=" el-icon-"]{
+    vertical-align: middle;
+    font-size:24px;
+}
+
+.el-button [class*="el-icon-"] + span{
+    vertical-align: middle;
+}
+.collection.el-button [class*="el-icon-"] + span{
+    font-size: 14px;
+}
+
+
+.payStyle .el-radio__label{
+    display: inline-block;
+}
+
+.payStyle .el-radio span{
+    vertical-align: middle;
+}
+
+
+.order .el-menu-item{
+    height: 30px;
+    line-height: 30px;
+    padding-left: 30px!important;
+    margin-bottom: 10px;
+    box-sizing: border-box;
+}
+
+
+
+.order .el-menu{
+    border-right: 0;
+}
+
+.el-main{
+    padding:0;
+}
+
+.el-header{
+    padding: 0;
+}
+.el-footer{
+    padding: 0;
+}

+ 23 - 0
src/main/vue/src/entries/index.html

@@ -26,4 +26,27 @@
     <!-- built files will be auto injected -->
 </body>
 
+<script>
+    var userAgent = navigator.userAgent; //取得浏览器的userAgent字符串
+    var isIE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1; //判断是否IE<11浏览器
+    var isEdge = userAgent.indexOf("Edge") > -1 && !isIE; //判断是否IE的Edge浏览器
+    var isIE11 = userAgent.indexOf('Trident') > -1 && userAgent.indexOf("rv:11.0") > -1;
+    if (isIE) {
+        var reIE = new RegExp("MSIE (\\d+\\.\\d+);");
+        reIE.test(userAgent);
+        var fIEVersion = parseFloat(RegExp["$1"]);
+        if (fIEVersion == 11) {
+
+        } else {
+            alert('检测到浏览器使用的ie内核版本过低,为了更好的用户体验,请切换成极速模式,或者更换360等其他类型浏览器')
+        }
+    } else if (isEdge) {
+
+    } else if (isIE11) {
+
+    } else {
+
+    }
+</script>
+
 </html>

+ 14 - 2
src/main/vue/src/entries/index.js

@@ -8,14 +8,17 @@ import MultiUpload from '../components/MultiUpload'
 import SingleUpload from '../components/SingleUpload'
 import VueI18n from 'vue-i18n'
 import VueAMap from 'vue-amap'
+import moment from 'moment'
 
+import '../elementVariables.scss'
 import 'normalize.css/normalize.css'
-import 'element-ui/lib/theme-chalk/index.css'
-import '../main.less'
+// import 'element-ui/lib/theme-chalk/index.css'
+import '../mainPre.less'
 import '../emUI.less'
 import { format } from 'date-fns'
 import zh from 'date-fns/locale/zh_cn'
 
+
 VueAMap.initAMapApiLoader({
     key: 'bf91055058a47a7dc387e40ab6256a5f',
     plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'AMap.Geolocation'],
@@ -152,6 +155,15 @@ Vue.prototype.$http = {
 };
 
 
+Vue.prototype.getTime = function(str) {
+    if (str) {
+        return moment(str).format('YYYY-MM-DD HH:mm')
+    } else {
+        return ''
+    }
+}
+
+
 
 
 Vue.mixin({

+ 110 - 0
src/main/vue/src/mainPre.less

@@ -0,0 +1,110 @@
+* {
+
+}
+
+html, body {
+    width: 100%;
+    height: 100%;
+    font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
+    -webkit-font-smoothing: antialiased;
+    -moz-osx-font-smoothing: grayscale;
+    margin: 0;
+    padding: 0;
+}
+
+html {
+    background: white;
+}
+
+a {
+    text-decoration: none;
+}
+
+a img {
+    border: 0;
+}
+
+input, textarea, button {
+    border: none;
+    outline: none;
+    background: none;
+    appearance: none;
+}
+
+ul, li {
+    appearance: none;
+    margin: 0;
+    padding: 0;
+    list-style-type: none;
+}
+
+//.el-menu-item {
+//    background: #1F2D3D !important;
+//}
+//
+//.el-submenu .el-submenu .el-submenu__title {
+//    background: #1F2D3D !important;
+//}
+
+.el-menu-item.is-active {
+    // background: #1F2D3D !important;
+    border-left: 6px solid #0B9EC0;
+}
+
+.el-menu {
+    i {
+        color: #BFCBD9;
+    }
+    .svg-inline--fa {
+        margin-right: 6px;
+    }
+}
+
+.el-pagination {
+    display: flex;
+    justify-content: center;
+    background: #fff;
+}
+
+.filters-container {
+    .filter-item {
+        margin-bottom: 10px;
+        margin-right: 10px;
+        margin-left: 0;
+    }
+    .filter-item.el-input {
+        width: 200px;
+    }
+
+    .filter-item.el-input {
+        width: 200px;
+    }
+}
+
+.table-column-filter {
+    cursor: pointer;
+    color: #409eff;
+    float: right;
+    height: 36px;
+    margin-bottom: 10px;
+    display: flex;
+    align-items: center;
+}
+
+.table-column-filter-wrapper {
+    padding: 10px 20px;
+}
+
+.pagination-wrapper {
+    padding-top: 20px;
+    position: relative;
+}
+
+.multiple-mode-wrapper {
+    position: absolute;
+    left: 0;
+    top: 20px;
+    bottom: 2px;
+    display: flex;
+    align-items: center;
+}

+ 75 - 35
src/main/vue/src/pagesPre/App.vue

@@ -51,10 +51,10 @@
                     </div>
                 </div>
             </div>
-           <!-- <keep-alive exclude="shop"> -->
-                <router-view ref='child'></router-view>
-           <!-- </keep-alive> -->
-            <logo-foot :isBottom='isBottom'></logo-foot>
+            <keep-alive exclude="shop,product">
+            <router-view ref='child'></router-view>
+            </keep-alive>
+            <logo-foot :isBottom='false'></logo-foot>
         </div>
 
         <div class="little-menu">
@@ -70,6 +70,7 @@
                 <img src="../assetsPre/fankui3.png" style="width:24px;height:20px;" alt="">
             </div>
         </div>
+
     </div>
 </template>
 
@@ -81,7 +82,9 @@ import miniHead from '../components/MiniHead'
 export default {
     name: 'App',
     created() {
+
         setTimeout(() => {
+
             console.log(this.$route.name)
             if (this.$route.name == 'index') {
                 this.nowMenu = 0
@@ -93,6 +96,30 @@ export default {
                 this.nowMenu = -1
                 this.isBottom = true
             }
+
+            if (this.hrefHistory.length > 0) {
+                this.nowMenu = 0
+            }
+
+            if (this.hrefHistory.length > 1) {
+                if (this.hrefHistory[1].href == 'business') {
+                    this.serviceType.forEach((item, index) => {
+                        console.log(this.hrefHistory[1].name, item.shortName)
+                        if (item.shortName == this.hrefHistory[1].name) {
+                            this.nowMenu = index + 1
+                        }
+                    })
+                }
+            }
+
+
+
+            console.log(this.nowMenu)
+
+
+
+
+
             var length = -2
             for (var i = 0; i < this.nowMenu; i++) {
                 if (document.getElementById('menuItem' + i)) {
@@ -100,19 +127,24 @@ export default {
                 }
             }
             this.lineLeft = length
-        }, 1000)
+        }, 500)
     },
     mounted() {
+
         this.$http.get({
             url: '/serviceType/all',
             data: {}
         }).then(res => {
             if (res.success) {
                 this.$store.commit('updateServiceType', res.data)
+
             }
         }).catch(e => {
             console.log(e)
         })
+
+
+
     },
     data() {
         return {
@@ -124,17 +156,7 @@ export default {
         }
     },
     computed: {
-        ...mapState(['userInfo', 'serviceType', 'hrefHistory']),
-        // lineLeft() {
-        //     var length = -2
-        //     if (document.getElementById('menuItem0')) {
-        //         for (var i = 0; i < this.nowMenu; i++) {
-        //             length += document.getElementById('menuItem' + i).offsetWidth + 40.5
-        //         }
-        //     }
-
-        //     return length
-        // },
+        ...mapState(['userInfo', 'serviceType']),
         lineWidth() {
             var width = 40
             if (document.getElementById('menuItem' + this.nowMenu)) {
@@ -146,6 +168,24 @@ export default {
             }
 
             return width
+        },
+        hrefHistory() {
+            var list = []
+            var breHrefs = []
+            if (this.$route.query.breHref) {
+                breHrefs = this.$route.query.breHref.split('_;')
+            }
+
+            breHrefs.forEach(item => {
+                if (item) {
+                    var jsonp = {
+                        name: item.split(',')[0],
+                        href: item.split(',')[1]
+                    }
+                    list.push(jsonp)
+                }
+            })
+            return list
         }
     },
     methods: {
@@ -181,6 +221,24 @@ export default {
                 this.nowMenu = -1
                 this.isBottom = true
             }
+
+            if (this.hrefHistory.length > 0) {
+                this.nowMenu = 0
+            }
+
+            if (this.hrefHistory.length > 1) {
+                if (this.hrefHistory[1].href == 'business') {
+                    this.serviceType.forEach((item, index) => {
+                        console.log(this.hrefHistory[1].name, item.shortName)
+                        if (item.shortName == this.hrefHistory[1].name) {
+                            this.nowMenu = index + 1
+                        }
+                    })
+                }
+            }
+
+
+
             var length = -2
             for (var i = 0; i < this.nowMenu; i++) {
                 if (document.getElementById('menuItem' + i)) {
@@ -189,28 +247,10 @@ export default {
             }
             this.lineLeft = length
             document.getElementById('container').scrollTop = 0
-        },
-        hrefHistory() {
-            if (this.hrefHistory.length > 2) {
-                this.nowMenu = this.hrefHistory[1].href.split('=')[1]
-
-                var length = -2
-                for (var i = 0; i < this.nowMenu; i++) {
-                    if (document.getElementById('menuItem' + i)) {
-                        length += document.getElementById('menuItem' + i).offsetWidth + 36
-                    }
-                }
-                this.lineLeft = length
-            }
-            else if (this.hrefHistory.length > 1 && this.$route.name != 'business') {
-                this.nowMenu = 0
-                this.lineLeft = -2
-            }
-
         }
     },
     components: {
-        logo, logoFoot,miniHead
+        logo, logoFoot, miniHead
     }
 }
 </script>

+ 6 - 4
src/main/vue/src/pagesPre/Business.vue

@@ -2,14 +2,14 @@
     <div class="conatiner">
         <el-carousel class="swiper" :class="[bannerList.length==1?'noButton':'']" height="420px" :interval="4000">
             <template v-for="item in bannerList">
-                <el-carousel-item @click="goBanner(item.url)" :style="{backgroundImage:'url('+item.imageUrl+')'}">
+                <el-carousel-item @click="goBanner(item.url)"  :style="{backgroundImage:'url('+item.imageUrl+')'}">
                     <a v-if="item.url" :href="item.url"></a>
                 </el-carousel-item>
             </template>
 
         </el-carousel>
         <el-breadcrumb v-if="serviceType.length>0" separator-class="el-icon-arrow-right" class="Breadcrumb">
-            <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
+            <el-breadcrumb-item :replace='true' :to="{ path: '/' }">首页</el-breadcrumb-item>
             <el-breadcrumb-item>{{serviceType[nowIndex].shortName}}</el-breadcrumb-item>
         </el-breadcrumb>
 
@@ -345,9 +345,9 @@ export default {
             }]
             list.push({
                 name: this.serviceType[this.nowIndex].shortName,
-                href: this.$route.fullPath
+                href: this.$route.name
             })
-            this.$store.commit('updateHrefHistory', list)
+            // this.$store.commit('updateHrefHistory', list)
 
 
             this.$http.get({
@@ -439,6 +439,7 @@ export default {
         scrollMenu() {
             if (document.getElementById('container').scrollTop + document.body.clientHeight + 100 >= document.getElementById('container').scrollHeight) {
                 this.getInfo()
+                console.log('到底了')
             }
         }
     },
@@ -563,6 +564,7 @@ export default {
 
         .goodsList {
             padding-top: 5px;
+            padding-bottom: 20px;
         }
     }
 

+ 0 - 22
src/main/vue/src/pagesPre/Customer.vue

@@ -1,22 +0,0 @@
-<template>
-    <div class="conatiner">
-customer
-    </div>
-</template>
-
-<script>
-export default {
-    name: 'home',
-    data() {
-        return {
-        }
-    },
-    computed: {
-    },
-    methods: {
-    }
-}
-</script>
-
-<style lang="less" scoped>
-</style>

+ 13 - 6
src/main/vue/src/pagesPre/Index.vue

@@ -73,7 +73,7 @@
                             </div>
                             <div class="box-rankList" v-loading="loading">
                                 <template v-if='serviceGoods[item.id]'>
-                                    <router-link :to='{name:"shop",query:{id:todo.id}}' class="box-rankItem" v-for="(todo,todoIndex) in serviceGoods[item.id].hot">
+                                    <router-link :to='{name:"shop",query:{id:todo.id,breHref:breHref}}' class="box-rankItem" v-for="(todo,todoIndex) in serviceGoods[item.id].hot">
                                         <div class="num" :style="{backgroundImage:'url('+(todoIndex<3?require('../assetsPre/num_bg_pre.png'):require('../assetsPre/num_bg.png'))+')'}">{{todoIndex+1}}</div>
                                         <div class="name">{{todo.storeName}}</div>
                                     </router-link>
@@ -104,7 +104,7 @@
                         <i class="el-icon-close" id='close1' @click="hideShow1=true"></i>
                     </div>
                     <div class="newShop-list">
-                        <router-link :to='{name:"shop",query:{id:item.id}}' class="newShop-item" v-for="item in newShop">
+                        <router-link :to='{name:"shop",query:{id:item.id,breHref:breHref}}' class="newShop-item" v-for="item in newShop">
                             <span>{{item.storeName}}</span>
                             <span style="color:#1BB8AC">{{getTime(item.createTime)}}</span>
                             <span>入住了平台</span>
@@ -187,7 +187,7 @@ export default {
                 currentPage: 1,
                 pageNumber: 4,
                 orderByStr: 'create_time_,desc',
-                    useFlag:'Y'
+                useFlag: 'Y'
             }
         }).then(res => {
             if (res.success) {
@@ -225,7 +225,7 @@ export default {
                         pageNumber: 6,
                         serviceType: item.id,
                         homeFlag: 1,
-                    useFlag:'Y'
+                        useFlag: 'Y'
                     }
                 }).then(res => {
                     if (res.success) {
@@ -242,7 +242,7 @@ export default {
                         pageNumber: 10,
                         serviceType: item.id,
                         hotFlag: 1,
-                    useFlag:'Y'
+                        useFlag: 'Y'
                     }
                 }).then(res => {
                     if (res.success) {
@@ -281,7 +281,7 @@ export default {
             name: '首页',
             href: '/'
         }]
-        this.$store.commit('updateHrefHistory', list)
+        // this.$store.commit('updateHrefHistory', list)
     },
     computed: {
         ...mapState(['serviceType']),
@@ -289,6 +289,13 @@ export default {
             var val = 65
             val = this.nowShort * 50 + 65
             return val + 'px'
+        },
+        breHref() {
+            var str = '首页,/index_;'
+            if (this.$route.name == 'business') {
+                str += document.title + ',' + this.$route.name + '_;'
+            }
+            return str
         }
     },
     methods: {

+ 10 - 2
src/main/vue/src/pagesPre/Login.vue

@@ -5,7 +5,7 @@
             <div class="login">
                 <div class="login-wrapper" @keyup.enter="login">
                     <div class="tabLine" :style="{left:activeName=='first'?'33px':'177px'}"></div>
-                    <el-tabs class="myTab"  v-model="activeName">
+                    <el-tabs class="myTab" v-model="activeName">
 
                         <el-tab-pane label="用户名登陆" name="first">
                             <el-form :model="userInfo" style="width: 288px;margin-top:27px;" ref="form">
@@ -130,6 +130,14 @@ export default {
                     }).then(res => {
                         this.loading = false;
                         if (res.success) {
+                            if (history.length > 2) {
+                                history.back()
+                            }
+                            else {
+                                this.$router.replace({
+                                    name: 'index'
+                                })
+                            }
                             this.$router.replace('/');
                         } else {
                             this.$message.error('登录失败');
@@ -195,7 +203,7 @@ export default {
 }
 </script>
 <style lang="less" scoped>
-.container{
+.container {
     height: 100%;
     background-color: #fff;
     min-width: 1190px;

+ 168 - 0
src/main/vue/src/pagesPre/Order.vue

@@ -0,0 +1,168 @@
+<template>
+    <div class="conatiner">
+        <mini-head></mini-head>
+        <div class="Head">
+            <div class="HeadContent">
+                <img class="logo" src="../assetsPre/logo.png" alt="">
+            </div>
+        </div>
+
+        <div class="lineContent">
+            <div class="line-item" :class="{active:nowStep>=1}">
+                <div class="title">提交订单</div>
+                <div class="ball">1</div>
+            </div>
+            <div class="line-item" :class="{active:nowStep>=2}">
+                <div class="title">支付到第三方平台</div>
+                <div class="ball">2</div>
+            </div>
+            <div class="line-item"  :class="{active:nowStep>=3}">
+                <div class="title">验收成功</div>
+                <div class="ball">3</div>
+            </div>
+            <div class="line-item"  :class="{active:nowStep>=4}">
+                <div class="title">评价</div>
+                <div class="ball">4</div>
+            </div>
+            <div class="line">
+                <div class="line-color" :style="{width:(nowStep*25)+'%'}"></div>
+            </div>
+        </div>
+        <div class="order">
+            <router-view ref='child'></router-view>
+        </div>
+
+        <menuFoot></menuFoot>
+
+        <logo-foot :isBottom='isBottom'></logo-foot>
+    </div>
+</template>
+
+<script>
+import miniHead from '../components/MiniHead'
+import menuFoot from '../pagesPre/MenuFoot'
+import logoFoot from '../pagesPre/LogoFoot'
+export default {
+    name: 'order',
+    data() {
+        return {
+            nowStep: 1,
+            isBottom: true
+        }
+    },
+    watch: {
+        $route() {
+            this.getStep()
+        }
+    },
+    computed: {
+    },
+    mounted() {
+        this.getStep()
+    },
+    methods: {
+        getStep() {
+            if (this.$route.name == 'submit') {
+                this.nowStep = 1
+            }
+            else if (this.$route.name == 'payOrder') {
+                this.nowStep = 2
+            }
+        }
+
+    },
+    components: {
+        miniHead, menuFoot, logoFoot
+    }
+}
+</script>
+
+<style lang="less" scoped>
+.Head {
+    height: 70px;
+    background: rgba(255, 255, 255, 1);
+    box-shadow: 0px 1px 2px 0px rgba(199, 199, 199, 0.5);
+    .HeadContent {
+        width: 1190px;
+        margin: auto;
+        height: 70px;
+        line-height: 70px;
+
+        img {
+            width: 300px;
+            height: 54px;
+            vertical-align: middle;
+        }
+    }
+}
+
+.lineContent {
+    width: 1190px;
+    margin: auto;
+    padding: 37px 0 41px;
+    font-size: 0;
+    position: relative;
+    .line-item {
+        width: 25%;
+        display: inline-block;
+        z-index: 2;
+        position: relative;
+
+        .title {
+            font-size: 12px;
+            font-family: MicrosoftYaHei;
+            color: rgba(51, 51, 51, 1);
+            line-height: 16px;
+            text-align: center;
+        }
+
+        .ball {
+            width: 20px;
+            height: 20px;
+            background: rgba(198, 198, 198, 1);
+            border: 2px solid rgba(151, 151, 151, 0.5);
+            font-size: 12px;
+            font-family: MicrosoftYaHei;
+            font-weight: bold;
+            color: rgba(255, 255, 255, 1);
+            line-height: 20px;
+            text-align: center;
+            border-radius: 100%;
+            margin: 8px auto 0;
+        }
+
+        &.active {
+            .title {
+                color: #0b9ec0;
+            }
+            .ball {
+                background: #1bb8ac;
+                border-color: #0b9ec0;
+            }
+        }
+    }
+
+    .line {
+        width: 100%;
+        height: 8px;
+        background: rgba(204, 204, 204, 1);
+        border-radius: 4px;
+        position: absolute;
+        bottom: 49px;
+        left: 0;
+        z-index: 1;
+
+        .line-color {
+            height: 8px;
+            background: linear-gradient(141deg, rgba(27, 184, 172, 1) 0%, rgba(0, 142, 205, 1) 100%);
+            border-radius: 4px;
+        }
+    }
+}
+
+.order {
+    width: 1190px;
+    margin: auto;
+
+}
+</style>

+ 168 - 0
src/main/vue/src/pagesPre/PayOrder.vue

@@ -0,0 +1,168 @@
+<template>
+    <div class="conatiner">
+        <div class="orderInfo">
+            <span style="margin-left:25px;">订单:{{orderInfo.orderCode}}</span>
+            <span style="margin-left:25px;">{{productInfo.title}}</span>
+            <span style="float:right">
+                <span>应付金额</span>
+
+                <span class="price" style="margin-left:10px;">¥</span>
+                <span class="price" style="color:#FC2703;margin-right:24px;font-weight:bold;">{{orderInfo.totlePrice}}</span>
+            </span>
+        </div>
+
+        <div class="orderTitle">
+            选择支付方式
+        </div>
+
+        <div class="orderWayTitle">
+            第三方账户支付
+        </div>
+
+        <div class="payStyle">
+            <template>
+                <el-radio v-model="payStyle" label="支付宝">
+                    <img style="width:88px;height:30px;margin-left:14px;" src="../assetsPre/pay1.png" alt="">
+                </el-radio>
+                <el-radio v-model="payStyle" label="微信">
+                    <img style="width:125px;height:43px;margin-left:8px;" class="payIcon" src="../assetsPre/pay2.png" alt="">
+                </el-radio>
+                <el-radio v-model="payStyle" label="银联">
+                    <img style="width:150px;height:39px;margin-left:8px;" class="payIcon" src="../assetsPre/pay3.png" alt="">
+                </el-radio>
+            </template>
+        </div>
+
+        <div class="pay-btn">
+            <el-button class="pay" type="primary" @click="payOrder">立即支付</el-button>
+        </div>
+    </div>
+</template>
+
+<script>
+import miniHead from '../components/MiniHead'
+import menuFoot from '../pagesPre/MenuFoot'
+import { mapState } from 'vuex'
+export default {
+    name: 'submit',
+    data() {
+        return {
+            tableData3: [],
+            productInfo: {},
+            num: 1,
+            remark: '',
+            orderInfo: {},
+            payStyle: '支付宝'
+        }
+    },
+    mounted() {
+        this.$http.get({
+            url: '/userOrder/getOne',
+            data: {
+                id: this.$route.query.orderId
+            }
+        }).then(res => {
+            if (res.success) {
+                this.orderInfo = res.data
+                this.productInfo = res.data.productInfo
+            }
+        }).catch(e => {
+            console.log(e)
+
+        })
+
+    },
+    computed: {
+        ...mapState(['userInfo']),
+    },
+    methods: {
+        payOrder() {
+            this.$confirm('<img src="' + require('../assetsPre/success.png') + '" style="width:48px;height:47px;vertical-align: middle;"><span style="font-size:24px;font-family:MicrosoftYaHei;color:rgba(51,51,51,1);margin-left:12px;line-height:17px;vertical-align: middle;">订单支付成功!</span>', '', {
+                confirmButtonText: '立即上传',
+                cancelButtonText: '返回订单管理',
+                dangerouslyUseHTMLString: true,
+                center: true,
+                cancelButtonClass: 'btn-cancel',
+                confirmButtonClass: 'btn-confirm',
+                closeOnClickModal: false,
+            }).then(() => {
+                this.$router.push({
+                    name: 'payOrder',
+                    query: {
+                        orderId: res.data
+                    }
+                })
+
+            }).catch(() => {
+                this.$router.push({
+                    name: 'userOrder',
+                })
+
+            });
+        }
+    },
+    components: {
+        miniHead, menuFoot
+    }
+}
+</script>
+
+<style lang="less" scoped>
+.conatiner {
+    background-color: #fff;
+    padding: 18px 33px 31px 29px;
+    .orderInfo {
+        height: 50px;
+        background: rgba(246, 246, 246, 1);
+        line-height: 50px;
+
+        span {
+            font-size: 14px;
+            font-family: MicrosoftYaHei;
+            color: rgba(51, 51, 51, 1);
+            line-height: 50px;
+
+            &.price {
+                font-size: 24px;
+                font-family: MicrosoftYaHei;
+                color: rgba(153, 153, 153, 1);
+            }
+        }
+    }
+
+    .orderTitle {
+        margin: 26px 0 17px 25px;
+        font-size: 18px;
+        font-family: MicrosoftYaHei;
+        color: rgba(51, 51, 51, 1);
+        line-height: 24px;
+    }
+    .orderWayTitle {
+        width: 1131px;
+        height: 24px;
+        background: rgba(246, 246, 246, 1);
+        font-size: 12px;
+        font-family: MicrosoftYaHei;
+        color: rgba(51, 51, 51, 1);
+        line-height: 24px;
+        padding-left: 28px;
+    }
+
+    .payStyle {
+        margin-left: 25px;
+        line-height: 84px;
+        border-bottom: 1px solid #eaeaea;
+    }
+
+    .pay-btn {
+        overflow: hidden;
+
+        .pay {
+            width: 176px;
+            border-radius: 2px;
+            float: right;
+            margin-top: 86px;
+        }
+    }
+}
+</style>

+ 346 - 157
src/main/vue/src/pagesPre/Product.vue

@@ -2,45 +2,80 @@
     <div class="conatiner">
         <el-breadcrumb separator-class="el-icon-arrow-right" class="Breadcrumb">
             <template v-for="(item,index) in hrefHistory">
-                <el-breadcrumb-item v-if="index<hrefHistory.length-1" :to="{ path: item.href }">{{item.name}}</el-breadcrumb-item>
+                <el-breadcrumb-item v-if="index<hrefHistory.length-1" :replace='true'>
+                    <a href="javaScript:void(0)" @click="goHistory(index)"> {{item.name}}</a>
+                </el-breadcrumb-item>
                 <el-breadcrumb-item v-else>{{item.name}}</el-breadcrumb-item>
             </template>
 
         </el-breadcrumb>
 
         <div class="goods">
-            <div class="goodsImg" :style="{backgroundImage:'url('+item.image+')'}">
+            <div class="goodsImg" :style="{backgroundImage:'url('+shopInfo.image+')'}">
 
             </div>
-            <div class="shop">
-                <div class="goodsInfo">
-                    <div class="title">
-                        <div class="name">{{shopInfo.storeName}}</div>
-                        <img src="../assetsPre/location_pre.png" alt="">
-                        <div class="address">{{shopInfo.citye}}</div>
-                    </div>
-                    <div class="titlesub">
-                        {{shopInfo.description}}
-                    </div>
-                    <div class="subtitle">
-                        <span>响应时间 :</span>
-                        <span>{{shopInfo.responseTime}}分钟</span>
+
+            <div class="infos">
+                <div class="title">
+                    {{shopInfo.title}}
+                </div>
+                <div class="price">
+                    <div class="left">
+                        <div class="price-text">价格</div>
+                        <div class="price-text">起定量</div>
                     </div>
-                    <div class="subtitle">
-                        <span>返片率 :</span>
-                        <span>{{shopInfo.reworkRate}}%</span>
+                    <div class="price-item" v-for="item in shopInfo.productPriceList">
+                        <div class="priceNum">
+                            <small>¥</small>{{item.price}}</div>
+                        <div class="price-text" v-if="item.maxCounts&&item.minCounts">{{item.minCounts}}-{{item.maxCounts}}张</div>
+                        <div class="price-text" v-else-if='item.minCounts'>{{item.minCounts}}张以上</div>
+                        <div class="price-text" v-else-if='item.maxCounts'>{{item.maxCounts}}张以下</div>
                     </div>
 
-                    <div class="collection">
-                        <img src="../assetsPre/Star.png" alt="">
-                        <span>收藏店铺</span>
-                    </div>
+                </div>
 
-                    <div class="ask">
-                        <img src="../assetsPre/kefu.png" alt="">
-                        <span>在线咨询</span>
-                    </div>
+                <div class="comment">
+                    <span>评价</span>
+                    <el-rate allow-half class="star" disabled v-model="commentVal" :colors="['#E96400', '#E96400', '#E96400']" disabled-void-color="#D4D4D4"></el-rate>
+                    <span style="color:#999999;">{{commentCount}}个评价</span>
+                    <span style="color:#666;margin-left:12px;">已售</span>
+                    <span style="color:#FB6E08;margin-left:5px;">{{shopInfo.salesVolume}}份</span>
+                </div>
+                <div class="comment">
+                    <span>数量</span>
+                    <el-input-number class="buyNum" size="mini" v-model="num" :min="1"></el-input-number>
+                </div>
+
+                <!-- <button  @click="buy">立即购买</button> -->
+                <el-button type="warning" class="buy-btn" @click="buy">立即购买</el-button>
+            </div>
+            <div class="goodsInfo">
+                <div class="goodsTop">
+                    <div class="kuai"></div>
+                    <span>商家信息</span>
+                </div>
+                <div class="title">
+                    <div class="name">{{storeInfo.storeName}}</div>
+                    <img src="../assetsPre/location_pre.png" alt="">
+                    <div class="address">{{storeInfo.citye}}</div>
+                </div>
+                <div class="titlesub">
+                    {{storeInfo.description}}
+                </div>
+                <div class="subtitle">
+                    <span>响应时间 :</span>
+                    <span>{{storeInfo.responseTime}}分钟</span>
+                </div>
+                <div class="subtitle">
+                    <span>返片率 :</span>
+                    <span>{{storeInfo.reworkRate}}%</span>
+                </div>
+
+                <div class="ask">
+                    <img src="../assetsPre/kefu.png" alt="">
+                    <span>在线咨询</span>
                 </div>
+
                 <img src="../assetsPre/levelA.png" alt="" class="level">
             </div>
 
@@ -48,27 +83,16 @@
 
         <div class="goodsList">
             <el-tabs class="goodsTab" v-model="activeName">
-                <el-tab-pane label="在售商品" name="first">
-                    <div class="allGoods">
-                        <template v-for="(item,index) in goodsList">
-                            <div class="goods-item">
-                                <div class="icon" :style="{backgroundImage:'url('+item.image+')'}"></div>
-                                <div class="title">{{item.title}}</div>
-                                <div class="subTitle">
-                                    <span>¥{{item.price}}</span>
-                                    <span style="margin-left:3px;">已售</span>
-                                    <span style="color:#FB6E08">{{item.salesVolume}}</span>
-                                </div>
-                            </div>
-
-                            <div class="line" v-if="(index+1)%4==0"></div>
-                        </template>
-
+                <el-tab-pane label="商品详情" name="first">
+                    <div class="imgList">
+                        <img :src="item.image" v-for="item in shopInfo.productImageList" alt="">
+                    </div>
+                </el-tab-pane>
+                <el-tab-pane label="服务详情" name="second">
+                    <div class="serviceDetai">
+                        {{shopInfo.serviceDetail}}
                     </div>
-
                 </el-tab-pane>
-                <el-tab-pane :label="'店铺评价 ('+(shopInfo.commentCount||'0')+')'" name="second">店铺评价({{shopInfo.commentCount}})</el-tab-pane>
-                <el-tab-pane label="最近成单" name="third">最近成单</el-tab-pane>
             </el-tabs>
         </div>
     </div>
@@ -77,42 +101,35 @@
 <script>
 import { mapState } from 'vuex'
 export default {
-    name: 'shop',
+    name: 'product',
     data() {
         return {
             shopInfo: {},
             activeName: 'first',
-            goodsList: []
+            goodsList: [],
+            commentCount: 0,
+            commentVal: 4,
+            num: 1,
+            storeInfo: {},
+            hrefHistory: []
         }
     },
     computed: {
-        ...mapState(['userInfo', 'hrefHistory'])
+        ...mapState(['userInfo'])
     },
     mounted() {
-        var list = []
-        this.hrefHistory.forEach((item, index) => {
-            if (index < 3) {
-                list.push(item)
+        console.log(this.$route.query.breHref)
+        var breHrefs = this.$route.query.breHref.split('_;')
+        breHrefs.forEach(item => {
+            if (item) {
+                var jsonp = {
+                    name: item.split(',')[0],
+                    href: item.split(',')[1]
+                }
+                this.hrefHistory.push(jsonp)
             }
         })
 
-        console.log(list)
-
-        if (list.length == 0) {
-            list.push({
-                name: '首页',
-                href: '/'
-            })
-        }
-
-        list.push({
-            name: document.title,
-            href: this.$route.fullPath
-        })
-
-
-        this.$store.commit('updateHrefHistory', list)
-
         this.$http.get({
             url: '/productInfo/getOne',
             data: {
@@ -121,11 +138,28 @@ export default {
         }).then(res => {
             if (res.success) {
                 this.shopInfo = res.data
+                this.storeInfo = res.data.storeInfo
                 document.title = res.data.title
-                var list = this.hrefHistory
-                list[list.length - 1].name = res.data.title
-                this.$store.commit('updateHrefHistory', list)
+                var jsonp = {
+                    name: res.data.title,
+                    href: this.$route.name
+                }
+                this.hrefHistory.push(jsonp)
+
+            }
+        }).catch(e => {
+            console.log(e)
+        })
 
+        this.$http.get({
+            url: '/productComment/count',
+            data: {
+                prodcutId: this.$route.query.id
+            }
+        }).then(res => {
+            if (res.success) {
+                this.commentCount = res.data.commentCount
+                this.commentVal = parseFloat(res.data.starLevel)
             }
         }).catch(e => {
             console.log(e)
@@ -151,6 +185,27 @@ export default {
     methods: {
         scrollMenu() {
 
+        },
+        goHistory(i) {
+            this.$router.go(i - this.hrefHistory.length + 1)
+        },
+        buy() {
+            if (!this.userInfo) {
+                this.$router.push({
+                    name: 'login'
+                })
+                return
+            }
+
+
+            this.$router.push({
+                name: 'submit',
+                query: {
+                    productId: this.shopInfo.id,
+                    storeId: this.shopInfo.storeId,
+                    num: this.num
+                }
+            })
         }
     }
 }
@@ -178,10 +233,11 @@ export default {
     border: 1px solid rgba(234, 234, 234, 1);
 
     .shop {
-        width: 375px;
+        width: 350px;
         display: inline-block;
         height: 274px;
         vertical-align: middle;
+        border-left: 1px solid #eaeaea;
     }
 
     .level {
@@ -189,10 +245,14 @@ export default {
         vertical-align: top;
         width: 58.5px;
         height: 30px;
+        position: absolute;
+        right: 0;
+        top: 0;
     }
 
     .goodsImg {
-        height: 268px;
+        width: 360px;
+        height: 270px;
         border-radius: 4px;
         background-position: center center;
         background-size: cover;
@@ -201,118 +261,228 @@ export default {
         vertical-align: middle;
     }
 
-    .goodsInfo {
+    .infos {
+        width: 385px;
+        height: 270px;
         display: inline-block;
         vertical-align: middle;
-        margin-left: 24px;
-        height: 268px;
-        overflow: hidden;
-        position: relative;
-    }
-
-    .title {
-        overflow: hidden;
+        padding: 0 26px 0 21px;
 
-        .name {
-            display: inline-block;
-            overflow: hidden;
-            text-overflow: ellipsis;
-            white-space: nowrap;
-            font-size: 18px;
+        .title {
             font-size: 24px;
             font-family: MicrosoftYaHei;
             color: rgba(51, 51, 51, 1);
             line-height: 31px;
-            vertical-align: middle;
-            max-width: 400px;
+            overflow: hidden;
+            text-overflow: ellipsis;
+            white-space: nowrap;
+            width: 385px;
         }
 
-        img {
-            width: 12px;
-            height: 15px;
-            margin: 0 6px 2px 17px;
-            vertical-align: bottom;
+        .price {
+            padding: 0 17px;
+            width: 324px;
+            height: 88px;
+            background: rgba(254, 168, 60, 0.15);
+            margin-top: 15px;
+
+            .left {
+                font-size: 12px;
+                font-family: MicrosoftYaHei;
+                color: rgba(102, 102, 102, 1);
+                line-height: 44px;
+                display: inline-block;
+                vertical-align: middle;
+                width: 60px;
+            }
+
+            .price-item {
+                width: 88px;
+                font-size: 12px;
+                font-family: MicrosoftYaHei;
+                color: rgba(102, 102, 102, 1);
+                line-height: 44px;
+                display: inline-block;
+                vertical-align: middle;
+
+                .priceNum {
+                    font-size: 20px;
+                    color: #fb6e08;
+
+                    small {
+                        font-size: 14px;
+                        margin-right: 5px;
+                    }
+                }
+            }
         }
 
-        .address {
+        .comment {
+            margin-top: 15px;
+            span {
+                font-size: 12px;
+                font-family: MicrosoftYaHei;
+                color: rgba(102, 102, 102, 1);
+                line-height: 16px;
+                vertical-align: middle;
+            }
+
+            .star {
+                display: inline-block;
+                vertical-align: middle;
+                margin-left: 16px;
+            }
+        }
+
+        .buyNum {
             display: inline-block;
-            font-size: 12px;
-            font-family: PingFangSC;
-            font-weight: bold;
-            color: rgba(11, 158, 192, 1);
-            line-height: 17px;
-            vertical-align: bottom;
+            vertical-align: middle;
+            margin-left: 20px;
+            width: 103px;
+            height: 27px;
         }
-    }
 
-    .titlesub {
-        font-size: 14px;
-        font-family: MicrosoftYaHei;
-        color: rgba(153, 153, 153, 1);
-        line-height: 19px;
-        margin-top: 14px;
+        .buy-btn {
+            display: block;
+            margin: 15px 0 0 44px;
+            width: 106px;
+            // height: 36px;
+            // background: rgba(251, 110, 8, 1);
+            border-radius: 3px;
+            font-size: 14px;
+        }
     }
 
-    .subtitle {
-        margin-top: 10px;
-        span {
-            font-size: 14px;
-            font-family: MicrosoftYaHei;
+    .goodsInfo {
+        padding-left: 32px;
+        width: 320px;
+        display: inline-block;
+        vertical-align: middle;
+        height: 270px;
+        overflow: hidden;
+        position: relative;
+        border-left: 1px solid #eaeaea;
+        .goodsTop {
+            .kuai {
+                width: 4px;
+                height: 14px;
+                background: rgba(11, 158, 192, 1);
+                display: inline-block;
+                vertical-align: middle;
+            }
+            span {
+                font-size: 16px;
+                font-family: MicrosoftYaHei;
+                color: rgba(11, 158, 192, 1);
+                line-height: 21px;
+                vertical-align: middle;
+                margin-left: 8px;
+            }
+        }
+        .title {
+            overflow: hidden;
+            margin-top: 10px;
 
-            line-height: 16px;
-            &:first-child {
-                color: #666666;
+            .name {
+                display: inline-block;
+                overflow: hidden;
+                text-overflow: ellipsis;
+                white-space: nowrap;
+                font-size: 18px;
+                font-family: MicrosoftYaHei;
+                color: rgba(51, 51, 51, 1);
+                line-height: 24px;
+                vertical-align: middle;
+                max-width: 250px;
             }
-            &:last-child {
-                color: #fb6e08;
+
+            img {
+                width: 12px;
+                height: 15px;
+                margin: 0 6px 0px 8px;
+                vertical-align: middle;
+            }
+
+            .address {
+                display: inline-block;
+                font-size: 12px;
+                font-family: PingFangSC;
+                font-weight: bold;
+                color: rgba(11, 158, 192, 1);
+                line-height: 17px;
+                vertical-align: middle;
             }
         }
-    }
 
-    .collection {
-        width: 152px;
-        height: 39px;
-        border-radius: 3px;
-        border: 1px solid rgba(253, 149, 1, 1);
-        text-align: center;
-        line-height: 39px;
-        margin-top: 20px;
-        cursor: pointer;
-        span {
+        .titlesub {
             font-size: 14px;
             font-family: MicrosoftYaHei;
-            color: #fb6e08;
+            color: rgba(153, 153, 153, 1);
             line-height: 19px;
-            vertical-align: middle;
+            margin-top: 12px;
         }
 
-        img {
-            width: 20px;
-            height: 20px;
-            margin-right: 10px;
-            vertical-align: middle;
+        .subtitle {
+            margin-top: 10px;
+            span {
+                font-size: 14px;
+                font-family: MicrosoftYaHei;
+
+                line-height: 16px;
+                &:first-child {
+                    color: #666666;
+                }
+                &:last-child {
+                    color: #fb6e08;
+                }
+            }
         }
-    }
-    .ask {
-        line-height: 32px;
-        position: absolute;
-        bottom: 0;
-        left: 0;
-        cursor: pointer;
-        span {
-            font-size: 12px;
-            font-family: PingFangSC;
-            font-weight: 500;
-            color: rgba(153, 153, 153, 1);
-            line-height: 17px;
-            vertical-align: middle;
-            margin-left: 10px;
+
+        .collection {
+            width: 152px;
+            height: 39px;
+            border-radius: 3px;
+            border: 1px solid rgba(253, 149, 1, 1);
+            text-align: center;
+            line-height: 39px;
+            margin-top: 20px;
+            cursor: pointer;
+            span {
+                font-size: 14px;
+                font-family: MicrosoftYaHei;
+                color: #fb6e08;
+                line-height: 19px;
+                vertical-align: middle;
+            }
+
+            img {
+                width: 20px;
+                height: 20px;
+                margin-right: 10px;
+                vertical-align: middle;
+            }
         }
+        .ask {
+            line-height: 32px;
+            position: absolute;
+            bottom: 0;
+            left: 32px;
+            cursor: pointer;
+            span {
+                font-size: 12px;
+                font-family: PingFangSC;
+                font-weight: 500;
+                color: rgba(153, 153, 153, 1);
+                line-height: 17px;
+                vertical-align: middle;
+                margin-left: 10px;
+            }
 
-        img {
-            width: 38px;
-            height: 32px;
-            vertical-align: middle;
+            img {
+                width: 38px;
+                height: 32px;
+                vertical-align: middle;
+            }
         }
     }
 }
@@ -398,4 +568,23 @@ export default {
         }
     }
 }
+
+.imgList {
+    padding-right: 20px;
+    padding-bottom: 20px;
+    img {
+        display: block;
+        width: 100%;
+        height: auto;
+    }
+}
+
+.serviceDetai {
+    padding-right: 20px;
+    padding-bottom: 20px;
+    font-size: 14px;
+    font-family: MicrosoftYaHei;
+    color: rgba(51, 51, 51, 1);
+    line-height: 19px;
+}
 </style>

+ 120 - 34
src/main/vue/src/pagesPre/Shop.vue

@@ -2,7 +2,9 @@
     <div class="conatiner">
         <el-breadcrumb separator-class="el-icon-arrow-right" class="Breadcrumb">
             <template v-for="(item,index) in hrefHistory">
-                <el-breadcrumb-item v-if="index<hrefHistory.length-1" :to="{ path: item.href }">{{item.name}}</el-breadcrumb-item>
+                <el-breadcrumb-item v-if="index<hrefHistory.length-1">
+                    <a href="javaScript:void(0)" @click="goHistory(index)"> {{item.name}}</a>
+                </el-breadcrumb-item>
                 <el-breadcrumb-item v-else>{{item.name}}</el-breadcrumb-item>
             </template>
 
@@ -28,10 +30,13 @@
                     <span>{{shopInfo.reworkRate}}%</span>
                 </div>
 
-                <div class="collection">
+                <!-- <div class="collection">
                     <img src="../assetsPre/Star.png" alt="">
                     <span>收藏店铺</span>
-                </div>
+                </div> -->
+
+                <el-button v-if="collectID" type="warning" icon="el-icon-star-on" @click="collect" class="collection" size="mini">已收藏</el-button>
+                <el-button v-else type="warning" icon="el-icon-star-off" @click="collect" class="collection" size="mini" plain>收藏店铺</el-button>
 
                 <div class="ask">
                     <img src="../assetsPre/kefu.png" alt="">
@@ -47,7 +52,7 @@
                 <el-tab-pane label="在售商品" name="first">
                     <div class="allGoods">
                         <template v-for="(item,index) in goodsList">
-                            <router-link :to='{name:"product",query:{id:item.id}}' class="goods-item">
+                            <router-link :to='{name:"product",query:{id:item.id,breHref:breHref}}' class="goods-item">
                                 <div class="icon" :style="{backgroundImage:'url('+item.image+')'}"></div>
                                 <div class="title">{{item.title}}</div>
                                 <div class="subTitle">
@@ -78,38 +83,30 @@ export default {
         return {
             shopInfo: {},
             activeName: 'first',
-            goodsList: []
+            goodsList: [],
+            hrefHistory: [],
+            collectID: 0
         }
     },
     computed: {
-        ...mapState(['userInfo', 'hrefHistory'])
+        ...mapState(['userInfo']),
+        breHref() {
+            var str = this.$route.query.breHref
+            str += this.shopInfo.storeName + ',' + this.$route.name + '_;'
+            return str
+        }
     },
     mounted() {
-        var list = []
-        this.hrefHistory.forEach((item, index) => {
-            if (index < 2) {
-                list.push(item)
+        var breHrefs = this.$route.query.breHref.split('_;')
+        breHrefs.forEach(item => {
+            if (item) {
+                var jsonp = {
+                    name: item.split(',')[0],
+                    href: item.split(',')[1]
+                }
+                this.hrefHistory.push(jsonp)
             }
-
         })
-
-        console.log(list)
-
-        if (list.length == 0) {
-            list.push({
-                name: '首页',
-                href: '/'
-            })
-        }
-
-        list.push({
-            name: document.title,
-            href: this.$route.fullPath
-        })
-
-
-        this.$store.commit('updateHrefHistory', list)
-
         this.$http.get({
             url: '/storeInfo/getOne',
             data: {
@@ -119,9 +116,29 @@ export default {
             if (res.success) {
                 this.shopInfo = res.data
                 document.title = res.data.storeName
-                var list = this.hrefHistory
-                list[list.length - 1].name = res.data.storeName
-                this.$store.commit('updateHrefHistory', list)
+                var jsonp = {
+                    name: res.data.storeName,
+                    href: this.$route.name
+                }
+                this.hrefHistory.push(jsonp)
+                // this.$store.commit('updateHrefHistory', list)
+                if (this.userInfo) {
+                    this.$http.get({
+                        url: '/storeCollection/getOne',
+                        data: {
+                            userId: this.userInfo.id,
+                            targetId: this.shopInfo.id
+                        }
+                    }).then(res => {
+                        if (res.success) {
+                            if (res.data) {
+                                this.collectID = res.data.id
+                            }
+
+                        }
+                    })
+                }
+
 
             }
         }).catch(e => {
@@ -144,10 +161,80 @@ export default {
             console.log(e)
         })
 
+
+
+
     },
     methods: {
         scrollMenu() {
 
+        },
+        goHistory(i) {
+            this.$router.go(i - this.hrefHistory.length + 1)
+        },
+        collect() {
+            console.log('aaaaaa')
+            if (!this.userInfo) {
+                this.$confirm('<img src="' + require('../assetsPre/fail.png') + '" style="width:48px;height:47px;vertical-align: middle;"><span style="font-size:24px;font-family:MicrosoftYaHei;color:rgba(51,51,51,1);margin-left:12px;line-height:17px;vertical-align: middle;">用户未登录</span>', '', {
+                    confirmButtonText: '去登录',
+                    cancelButtonText: '取消',
+                    dangerouslyUseHTMLString: true,
+                    center: true,
+                    cancelButtonClass: 'btn-cancel',
+                    confirmButtonClass: 'btn-confirm',
+                    closeOnClickModal: false,
+                }).then(() => {
+                    this.$router.push({
+                        name: 'login'
+                    })
+
+                }).catch(() => {
+                });
+            }
+            else {
+
+                if (this.collectID) {
+                    this.$http.post({
+                        url: '/storeCollection/del',
+                        data: {
+                            id: this.collectID
+                        }
+                    }).then(res => {
+                        if (res.success) {
+                            this.$message({
+                                message: '取消收藏成功',
+                                type: 'success'
+                            });
+
+                            this.collectID = 0
+
+                        }
+                    })
+                }
+                else {
+                    this.$http.post({
+                        url: '/storeCollection/save',
+                        data: {
+                            userId: this.userInfo.id,
+                            targetId: this.shopInfo.id,
+                            createUser: this.userInfo.nickname
+                        }
+                    }).then(res => {
+                        if (res.success) {
+                            this.$message({
+                                message: '收藏成功',
+                                type: 'success'
+                            });
+
+                            this.collectID = res.data
+
+
+                        }
+                    })
+                }
+
+
+            }
         }
     }
 }
@@ -262,11 +349,10 @@ export default {
 
     .collection {
         width: 152px;
-        height: 39px;
+        // height: 39px;
         border-radius: 3px;
         border: 1px solid rgba(253, 149, 1, 1);
         text-align: center;
-        line-height: 39px;
         margin-top: 20px;
         cursor: pointer;
         span {

+ 781 - 0
src/main/vue/src/pagesPre/Submit.vue

@@ -0,0 +1,781 @@
+<template>
+    <div class="conatiner">
+        <div class="address" v-if="this.typeFlag[productInfo.typeFlag] == '实体商品'">
+            <div class="page-title">
+                <span>收货人信息</span>
+                <el-button type="text" class="btn-right" icon="el-icon-plus" @click="openAddressEdit(-1)">新增收货地址</el-button>
+            </div>
+            <div class="addressDetail">
+                <div class="nothing" v-if="userAddress.length==0">
+                    暂无数据
+                </div>
+                <template v-else>
+                    <div class="address-item" v-if="isMore||userAddressID==item.id" @click="item.isChoose=!item.isChoose" :class="{isActive:item.isChoose}" v-for="(item,index) in userAddress">
+                        <el-button size="medium" @click.stop='' icon="el-icon-check" class="realName" v-if="item.id==userAddressID">{{item.realName}}</el-button>
+                        <el-button size="medium" @click.stop='userAddressID=item.id' class="realName" v-else>{{item.realName}}</el-button>
+                        <span style="margin-left:27px;">{{item.realName}}</span>
+                        <span style="margin-left:27px;">{{item.address.join(' ')}}</span>
+                        <span>{{item.addressDetail}}</span>
+                        <span>{{getPhone(item.telephone)}}</span>
+                        <el-button class="defalt" type="info" size="mini" v-if="item.defaultFlag">默认地址</el-button>
+
+                        <div style='float:right;margin:5px 23px 0 0;' v-if="item.isChoose">
+                            <el-button type="text" size="mini" @click.stop="setDefaultNow(item.id)">设为默认地址</el-button>
+                            <el-button type="text" size="mini" @click.stop="openAddressEdit(index)">编辑</el-button>
+                            <el-button type="text" size="mini" @click.stop="del(item.id)">删除</el-button>
+                        </div>
+                    </div>
+                    <template v-if="userAddress.length>1">
+                        <el-button type="text" class="more" v-if="!isMore" @click="isMore=true">更多地址
+                            <i class="el-icon-arrow-down  el-icon--right"></i>
+                        </el-button>
+
+                        <el-button type="text" class="more" v-else @click="isMore=false">收起地址
+                            <i class="el-icon-arrow-up  el-icon--right"></i>
+                        </el-button>
+                    </template>
+                </template>
+            </div>
+        </div>
+        <div class="orderDetail">
+            <div class="page-title">确认订单信息</div>
+            <div class="order" v-if="productInfo.storeInfo">
+                <div class="order-top">
+                    <span style="width:293px">商品名称</span>
+                    <span style="width:198px">单价</span>
+                    <span style="width:198px">数量</span>
+                    <span style="width:198px">优惠</span>
+                    <span style="width:198px">小计</span>
+                    <!-- <span style="width:165px">补充</span> -->
+                </div>
+                <div class="order-shop">
+                    <span>
+                        店铺:{{productInfo.storeInfo.storeName}}
+                    </span>
+
+                    <img src="../assetsPre/kefu.png" alt="">
+                </div>
+
+                <div class="order-Detail">
+                    <div style="width:293px">
+                        <div class="icon" :style="{backgroundImage:'url('+productInfo.image+')'}"></div>
+                        <div class="content">
+                            <div class="title"> {{productInfo.title}}</div>
+                            <div class="taocan">{{menu}}</div>
+                        </div>
+                    </div>
+                    <div style="width:198px;font-size:12px;color:rgba(253,149,1,1);">{{price}}</div>
+                    <div style="width:198px">
+                        <el-input-number class="buyNum" size="mini" v-model="num" :min="1"></el-input-number>
+                    </div>
+                    <div style="width:198px;font-size:14px;color:#333">{{gift}}</div>
+                    <div style="width:198px;font-size:20px;color:#FC2703;">{{totalPrice}}</div>
+                    <!-- <div style="width:165px">补充</div> -->
+                </div>
+
+                <div class="remark">
+                    <div class="title">
+                        <span>备注要求</span>
+                        <span>单张图片要求上传后单独备注,其他要求如交付时间等可在此标记</span>
+                    </div>
+                    <div class="content">
+                        <el-input type="textarea" resize='none' :autosize="{ minRows: 2}" placeholder="请输入内容" v-model="remark">
+                        </el-input>
+
+                    </div>
+                </div>
+            </div>
+
+            <div class="bottom">
+                <div class="price">
+                    <span>实付款:</span>
+                    <span>¥</span>
+                    <span>{{totalPrice}}</span>
+                </div>
+
+                <div style="overflow:hidden">
+                    <div class="address-order" v-if="userAddressID">
+                        寄送至:{{useAddress.address.join(' ')}} {{useAddress.addressDetail}} 收货人: {{useAddress.realName}} {{getPhone(useAddress.telephone)}}
+                    </div>
+
+                </div>
+
+                <el-button class='submit' type="primary" @click="submit">提交订单</el-button>
+            </div>
+        </div>
+
+        <el-dialog width="576px" title="新增收货人地址" :visible.sync="dialogVisible">
+            <el-form :model="ruleForm" ref="ruleForm" label-width="100px" class="demo-ruleForm">
+                <el-form-item label="所在区域" required>
+                    <el-cascader :options="cityData" :props='{value:"name",label:"name"}' v-model="ruleForm.address">
+                    </el-cascader>
+                </el-form-item>
+                <el-form-item label="详细地址" required>
+                    <el-input type="textarea" :autosize="{ minRows: 2, maxRows: 4}" placeholder="请输入内容" v-model="ruleForm.addressDetail">
+                    </el-input>
+                </el-form-item>
+                <el-form-item label="邮政编码">
+                    <el-input v-model="ruleForm.postcode"></el-input>
+                </el-form-item>
+                <el-form-item label="收货人姓名" required>
+                    <el-input v-model="ruleForm.realName"></el-input>
+                </el-form-item>
+                <el-form-item label="收货人电话" required>
+                    <el-input v-model="ruleForm.telephone"></el-input>
+                </el-form-item>
+                <el-form-item label="设为默认">
+                    <el-switch v-model="ruleForm.defaultFlag"></el-switch>
+                </el-form-item>
+                <el-form-item>
+                    <el-button type="primary" @click="submitForm()">保存</el-button>
+                </el-form-item>
+            </el-form>
+        </el-dialog>
+
+    </div>
+</template>
+
+<script>
+import miniHead from '../components/MiniHead'
+import menuFoot from '../pagesPre/MenuFoot'
+import { mapState } from 'vuex'
+import cityData from '../city'
+export default {
+    name: 'submit',
+    data() {
+        return {
+            cityData,
+            tableData3: [],
+            productInfo: {},
+            num: 1,
+            remark: '',
+            userAddress: [],
+            dialogVisible: false,
+            ruleForm: {
+                address: [],
+                addressDetail: '',
+                postcode: '',
+                realName: '',
+                telephone: "",
+                defaultFlag: true
+            },
+            isMore: false,
+            userAddressID: 0
+        }
+    },
+    mounted() {
+        this.$http.get({
+            url: '/productInfo/getOne',
+            data: {
+                id: this.$route.query.productId
+            }
+        }).then(res => {
+            if (res.success) {
+                this.productInfo = res.data
+
+                if (this.typeFlag[res.data.typeFlag] == '实体商品') {
+                    this.getUserAddress()
+                }
+            }
+        }).catch(e => {
+            console.log(e)
+        })
+        this.num = this.$route.query.num
+
+
+
+    },
+    computed: {
+        ...mapState(['userInfo', 'typeFlag']),
+        price() {
+            var money = 0;
+            if (this.productInfo.productPriceList) {
+                this.productInfo.productPriceList.forEach(item => {
+                    if (item.maxCounts && item.minCounts && this.num < item.maxCounts && this.num >= item.minCounts) {
+                        money = item.price
+                    } else if (!item.maxCounts && this.num >= item.minCounts) {
+                        money = item.price
+                    } else if (!item.minCounts && this.num < item.maxCounts) {
+                        money = item.price
+                    }
+                })
+            }
+
+            return money
+        },
+        totalPrice() {
+            var money = this.price * this.num;
+
+            return money
+        },
+        gift() {
+            var str = ''
+            if (this.productInfo.productPriceList) {
+                this.productInfo.productPriceList.forEach(item => {
+                    if (item.maxCounts && item.minCounts && this.num < item.maxCounts && this.num >= item.minCounts) {
+                        str = item.minCounts + '到' + item.maxCounts + '张优惠'
+                    } else if (!item.maxCounts && this.num >= item.minCounts) {
+                        str = item.minCounts + '张以上优惠'
+                    } else if (!item.minCounts && this.num < item.maxCounts) {
+                        str = item.maxCounts + '张以下优惠'
+                    }
+                })
+            }
+            return str
+        },
+        menu() {
+            var str = ''
+            if (this.productInfo.productPriceList) {
+                this.productInfo.productPriceList.forEach(item => {
+                    if (item.maxCounts && item.minCounts && this.num < item.maxCounts && this.num >= item.minCounts) {
+                        str = item.name
+                    } else if (!item.maxCounts && this.num >= item.minCounts) {
+                        str = item.name
+                    } else if (!item.minCounts && this.num < item.maxCounts) {
+                        str = item.name
+                    }
+                })
+            }
+            return str
+        },
+        useAddress() {
+            var jsonp = {
+                address: [''],
+                addressDetail: '',
+                postcode: '',
+                realName: '',
+                telephone: "",
+                defaultFlag: true
+            }
+            if (this.userAddressID) {
+                this.userAddress.forEach(item => {
+                    if (item.id == this.userAddressID) {
+                        jsonp = item
+                    }
+                })
+            }
+
+            return jsonp
+        },
+        specification() {
+            var id = ''
+            if (this.productInfo.productPriceList) {
+                this.productInfo.productPriceList.forEach(item => {
+                    if (item.maxCounts && item.minCounts && this.num < item.maxCounts && this.num >= item.minCounts) {
+                        id = item.id
+                    } else if (!item.maxCounts && this.num >= item.minCounts) {
+                        id = item.id
+                    } else if (!item.minCounts && this.num < item.maxCounts) {
+                        id = item.id
+                    }
+                })
+            }
+            return id
+        }
+    },
+    methods: {
+        cleanChoose() {
+            this.userAddress.forEach(item => {
+                item.isChoose = false
+            })
+        },
+        submit() {
+            if (this.typeFlag[this.productInfo.typeFlag] == '实体商品' && !this.userAddressID) {
+                this.$message({
+                    message: '请选择收货地址',
+                    type: 'warning'
+                });
+
+                return
+            }
+            var data = {
+                productId: this.$route.query.productId,
+                storeId: this.$route.query.storeId,
+                userId: this.userInfo.id,
+                quantity: this.num,
+                productType: this.productInfo.typeFlag,
+                unitPrice: this.price,
+                productName: this.productInfo.title,
+                specification: this.menu,
+                remark: this.remark
+            }
+            if (this.userAddressID) {
+                data.userAddressID = this.userAddressID
+            }
+            this.$http.post({
+                url: '/userOrder/save',
+                data: data
+            }).then(res => {
+                if (res.success) {
+
+                    this.$confirm('<img src="' + require('../assetsPre/success.png') + '" style="width:48px;height:47px;vertical-align: middle;"><span style="font-size:24px;font-family:MicrosoftYaHei;color:rgba(51,51,51,1);margin-left:12px;line-height:17px;vertical-align: middle;">提交订单成功</span>', '', {
+                        confirmButtonText: '去支付',
+                        cancelButtonText: '返回订单管理',
+                        dangerouslyUseHTMLString: true,
+                        center: true,
+                        cancelButtonClass: 'btn-cancel',
+                        confirmButtonClass: 'btn-confirm',
+                        closeOnClickModal: false,
+                    }).then(() => {
+                        this.$router.push({
+                            name: 'payOrder',
+                            query: {
+                                orderId: res.data
+                            }
+                        })
+
+                    }).catch(() => {
+                        this.$router.push({
+                            name: 'payOrder',
+                            query: {
+                                orderId: res.data
+                            }
+                        })
+
+                    });
+                }
+            }).catch(e => {
+                console.log(e)
+            })
+        },
+        getUserAddress() {
+            this.$http.get({
+                url: '/userAddress/all',
+                data: {
+                    userId: this.userInfo.id
+                }
+            }).then(res => {
+                if (res.success) {
+                    res.data.forEach(item => {
+                        item.defaultFlag = item.defaultFlag == 'Y'
+                        item.address = item.address.split(',')
+                        item.isChoose = false
+                    })
+                    this.userAddress = res.data
+                    if (res.data.length > 0) {
+                        this.userAddressID = res.data[0].id
+                    }
+                }
+            }).catch(e => {
+                console.log(e)
+            })
+        },
+        submitForm() {
+            // ruleForm: {
+            //         city: [],
+            //         address: '',
+            //         code: '',
+            //         name: '',
+            //         phone: "",
+            //         delivery: true
+            //     }
+            if (this.ruleForm.address.length == 0) {
+                this.$message({
+                    message: '请选择所在区域',
+                    type: 'warning'
+                });
+
+                return
+            }
+
+
+            if (!this.ruleForm.addressDetail) {
+                this.$message({
+                    message: '请填写详细地址',
+                    type: 'warning'
+                });
+
+                return
+            }
+
+            if (!this.ruleForm.realName) {
+                this.$message({
+                    message: '请填写收货人姓名',
+                    type: 'warning'
+                });
+
+                return
+            }
+            if (!this.checkPhone(this.ruleForm.telephone)) {
+                this.$message({
+                    message: '请输入正确电话格式',
+                    type: 'warning'
+                });
+
+                return
+            }
+
+            var data = JSON.parse(JSON.stringify(this.ruleForm))
+
+            if (!data.userId) {
+                data.userId = this.userInfo.id
+            }
+
+            data.address = data.address.join(',')
+            data.defaultFlag = data.defaultFlag ? 'Y' : 'N'
+
+
+            this.$http.post({
+                url: data.id ? '/userAddress/update' : '/userAddress/save',
+                data: data
+            }).then(res => {
+                if (res.success) {
+                    var id = ''
+                    if (data.id) {
+                        id = data.id
+                    }
+                    else {
+                        id = res.data
+                    }
+
+                    console.log(id)
+
+                    if (data.defaultFlag == 'Y') {
+                        this.setDefault(id).then(() => {
+                            this.$message({
+                                message: '收货地址保存成功',
+                                type: 'success'
+                            });
+                            this.dialogVisible = false
+
+                            this.getUserAddress()
+                            this.cleanChoose()
+                        })
+                    }
+                    else {
+                        this.$message({
+                            message: '收货地址保存成功',
+                            type: 'success'
+                        });
+                        this.dialogVisible = false
+
+                        this.getUserAddress()
+                        this.cleanChoose()
+                    }
+
+
+                }
+            })
+
+
+
+        },
+        setDefaultNow(id) {
+            this.setDefault(id).then(() => {
+                this.$message({
+                    message: '设置默认地址成功',
+                    type: 'success'
+                });
+                this.getUserAddress()
+            })
+        },
+        setDefault(id) {
+
+            console.log(id)
+
+            return new Promise((resolve, reject) => {
+                this.$http.post({
+                    url: '/userAddress/setDefault',
+                    data: {
+                        userId: this.userInfo.id,
+                        addressId: id
+                    }
+                }).then(res => {
+                    if (res.success) {
+
+                        resolve()
+
+                    }
+                })
+            })
+
+        },
+        del(id) {
+            this.$http.post({
+                url: '/userAddress/del',
+                data: {
+                    id: id
+                }
+            }).then(res => {
+                if (res.success) {
+                    this.$message({
+                        message: '删除成功',
+                        type: 'success'
+                    });
+                    this.getUserAddress()
+
+
+                }
+            })
+        },
+        openAddressEdit(index) {
+            if (index == -1) {
+                this.ruleForm = {
+                    address: [],
+                    addressDetail: '',
+                    postcode: '',
+                    realName: '',
+                    telephone: "",
+                    defaultFlag: true
+                }
+            }
+            else {
+                this.ruleForm = JSON.parse(JSON.stringify(this.userAddress[index]))
+            }
+
+            this.dialogVisible = true
+        },
+        getPhone(phone) {
+            if (phone.length == 11) {
+                var str = phone.substr(0, 3)
+                str += '****'
+                str += phone.substr(phone.length - 4, 4)
+                return str
+            }
+            else {
+                return ''
+            }
+
+        }
+    },
+    components: {
+        miniHead, menuFoot
+    }
+}
+</script>
+
+<style lang="less" scoped>
+.conatiner {
+    .address {
+        background: rgba(255, 255, 255, 1);
+        border-radius: 2px;
+        border: 1px solid rgba(234, 234, 234, 1);
+        margin-bottom: 20px;
+        padding: 0 20px;
+
+        .addressDetail {
+            transition: height ease-in-out 0.3s;
+            .nothing {
+                font-size: 12px;
+                color: #999;
+                line-height: 40px;
+                text-align: center;
+            }
+
+            .address-item {
+                margin-top: 17px;
+                .realName {
+                    width: 145px;
+                    border: 1px solid rgba(234, 234, 234, 1);
+                }
+
+                span {
+                    font-size: 12px;
+                    font-family: MicrosoftYaHei;
+                    color: rgba(51, 51, 51, 1);
+                    line-height: 16px;
+                    vertical-align: middle;
+                }
+
+                .defalt {
+                    color: #333;
+                    margin-left: 11px;
+                }
+
+                &.isActive {
+                    background: rgba(238, 236, 233, 1);
+                }
+            }
+
+            .more {
+                font-size: 12px;
+                font-family: MicrosoftYaHei;
+                color: rgba(51, 51, 51, 1);
+                line-height: 16px;
+            }
+            min-height: 45px;
+        }
+    }
+    .orderDetail {
+        background-color: #fff;
+        border-radius: 4px;
+        border: 1px solid rgba(234, 234, 234, 1);
+        padding-left: 20px;
+    }
+
+    .page-title {
+        font-size: 14px;
+        font-family: MicrosoftYaHei;
+        color: rgba(51, 51, 51, 1);
+        line-height: 48px;
+        // padding: 22px 0 14px;
+        border-bottom: 1px solid rgba(216, 216, 216, 1);
+        .btn-right {
+            float: right;
+            margin-top: 5px;
+        }
+    }
+
+    .order {
+        margin: 11px 41px 0 5px;
+        border: 1px solid rgba(234, 234, 234, 1);
+        .order-top {
+            span {
+                display: inline-block;
+                text-align: center;
+                line-height: 40px;
+                font-size: 12px;
+                font-family: MicrosoftYaHei;
+                color: rgba(108, 108, 108, 1);
+            }
+        }
+
+        .order-shop {
+            padding-left: 21px;
+            border-top: 1px solid rgba(234, 234, 234, 1);
+            line-height: 40px;
+            span {
+                font-size: 14px;
+                font-family: MicrosoftYaHei;
+                color: rgba(108, 108, 108, 1);
+                line-height: 19px;
+                vertical-align: middle;
+            }
+
+            img {
+                width: 30px;
+                height: 26px;
+                margin-left: 5px;
+                vertical-align: middle;
+            }
+        }
+
+        .order-Detail {
+            padding: 16px 0 14px;
+            div {
+                display: inline-block;
+                text-align: center;
+                vertical-align: middle;
+
+                .icon {
+                    width: 80px;
+                    height: 60px;
+                    border-radius: 4px;
+                    background-repeat: no-repeat;
+                    background-position: center center;
+                    background-size: cover;
+                }
+
+                .content {
+                    margin-left: 15px;
+                    text-align: left;
+                    width: 150px;
+                    vertical-align: top;
+                    .title {
+                        font-size: 14px;
+                        font-family: MicrosoftYaHei;
+                        color: rgba(51, 51, 51, 1);
+                        line-height: 19px;
+                        display: block;
+                        text-align: left;
+                        width: 150px;
+                        overflow: hidden;
+                        text-overflow: ellipsis;
+                        white-space: nowrap;
+                    }
+
+                    .taocan {
+                        font-size: 12px;
+                        font-family: MicrosoftYaHei;
+                        color: rgba(11, 158, 192, 1);
+                        line-height: 16px;
+                        display: block;
+                        text-align: left;
+                        margin-top: 11px;
+                    }
+                }
+            }
+        }
+
+        .remark {
+            padding: 13px 300px 20px 22px;
+            .title {
+                span {
+                    &:first-child {
+                        font-size: 14px;
+                        font-family: MicrosoftYaHei;
+                        color: rgba(253, 149, 1, 1);
+                        line-height: 16px;
+                    }
+
+                    &:last-child {
+                        font-size: 12px;
+                        font-family: MicrosoftYaHei;
+                        color: #666;
+                        line-height: 16px;
+                        margin-left: 10px;
+                    }
+                }
+            }
+
+            .content {
+                margin-top: 5px;
+            }
+        }
+    }
+
+    .bottom {
+        padding-right: 40px;
+        overflow: hidden;
+        padding-bottom: 67px;
+        .price {
+            line-height: 40px;
+            text-align: right;
+            margin-top: 23px;
+            span {
+                display: inline-block;
+                vertical-align: bottom;
+
+                &:first-child {
+                    color: #333;
+                    font-size: 14px;
+                    line-height: 30px;
+                }
+
+                &:nth-child(2) {
+                    color: #999;
+                    font-size: 30px;
+                }
+
+                &:nth-child(3) {
+                    color: #fc2703;
+                    font-size: 30px;
+                }
+            }
+        }
+
+        .address-order {
+            font-size: 12px;
+            font-family: MicrosoftYaHei;
+            color: rgba(102, 102, 102, 1);
+            line-height: 16px;
+            height: 31px;
+            background: rgba(245, 245, 245, 1);
+            padding: 0 10px;
+            line-height: 31px;
+            // display: inline-block;
+            width: auto;
+            float: right;
+            margin-top: 4px;
+        }
+
+        .submit {
+            width: 176px;
+            height: 40px;
+            border-radius: 2px;
+            float: right;
+            margin-top: 18px;
+        }
+    }
+}
+</style>

+ 193 - 0
src/main/vue/src/pagesPre/UserCenter.vue

@@ -0,0 +1,193 @@
+<template>
+
+    <el-container class="conatinerPage">
+        <el-header height='106px'>
+            <mini-head></mini-head>
+            <div class="Head">
+                <div class="HeadContent">
+                    <img class="logo" src="../assetsPre/logoWhite.png" alt="">
+                    <div class="title">
+                        个人中心
+                    </div>
+
+                    <div class="menu">
+                        <div class="menu-item" @click="nowMenu=0">
+                            首页
+                        </div>
+                        <div class="menu-item" @click="nowMenu=1">
+                            账户设置
+                        </div>
+
+                        <i class="el-icon-caret-top sanjiao" :style="{left:nowMenu*80+3+'px'}"></i>
+                    </div>
+
+                    <el-input placeholder="请输入内容" v-model="search" class="use-search">
+                        <template slot="append">
+                            <button>搜索</button>
+                        </template>
+
+                    </el-input>
+                </div>
+            </div>
+        </el-header>
+        <el-main>
+            <div class="order">
+                <el-container>
+                    <el-aside width="150px" class="aside">
+                        <el-menu :default-active="nowStep" class="el-menu-vertical-demo">
+                            <el-menu-item index="1">
+                                <span slot="title">订单管理</span>
+                            </el-menu-item>
+                            <el-menu-item index="2">
+                                <span slot="title">我的收藏</span>
+                            </el-menu-item>
+                            <el-menu-item index="3">
+                                <span slot="title">我的评价</span>
+                            </el-menu-item>
+                            <el-menu-item index="4">
+                                <span slot="title">我的图库</span>
+                            </el-menu-item>
+                            <el-menu-item index="5">
+                                <span slot="title">我的优惠券</span>
+                            </el-menu-item>
+                        </el-menu>
+                    </el-aside>
+                    <el-main style="padding-left:20px">
+                        <router-view ref='child'></router-view>
+                    </el-main>
+                </el-container>
+
+            </div>
+        </el-main>
+        <el-footer height='104px'>
+            <logo-foot :isBottom='isBottom'></logo-foot>
+        </el-footer>
+    </el-container>
+
+</template>
+
+<script>
+import miniHead from '../components/MiniHead'
+import menuFoot from '../pagesPre/MenuFoot'
+import logoFoot from '../pagesPre/LogoFoot'
+export default {
+    name: 'order',
+    data() {
+        return {
+            nowMenu: 0,
+            isBottom: false,
+            search: '',
+            nowStep: "0"
+        }
+    },
+    watch: {
+        $route() {
+            this.getStep()
+        }
+    },
+    computed: {
+    },
+    mounted() {
+        this.getStep()
+    },
+    methods: {
+        getStep() {
+            if (this.$route.name == 'submit') {
+                this.nowStep = "1"
+            }
+            else if (this.$route.name == 'payOrder') {
+                this.nowStep = "2"
+            }
+        }
+
+    },
+    components: {
+        miniHead, menuFoot, logoFoot
+    }
+}
+</script>
+
+<style lang="less" scoped>
+.conatinerPage {
+    background: #f9f9f9;
+    position: absolute;
+    top: 0;
+    left: 0;
+    width: 100%;
+    height: 100%;
+    min-width: 1190px;
+}
+.Head {
+    height: 70px;
+    background: #0b9ec0;
+    box-shadow: 0px 1px 2px 0px rgba(199, 199, 199, 0.5);
+    .HeadContent {
+        width: 1190px;
+        margin: auto;
+        height: 70px;
+        line-height: 70px;
+
+        img {
+            width: 300px;
+            height: 54px;
+            vertical-align: middle;
+        }
+
+        .title {
+            font-size: 20px;
+            font-family: MicrosoftYaHei;
+            color: rgba(255, 255, 255, 1);
+            line-height: 26px;
+            padding: 0 15px;
+            border-left: 1px solid #fff;
+            vertical-align: middle;
+            display: inline-block;
+            margin-left: 16px;
+        }
+
+        .menu {
+            display: inline-block;
+            line-height: 70px;
+            position: relative;
+            font-size: 14px;
+            font-family: MicrosoftYaHei;
+            color: rgba(255, 255, 255, 1);
+            margin-left: 78px;
+
+            .menu-item {
+                display: inline-block;
+                cursor: pointer;
+                margin-right: 40px;
+            }
+
+            .sanjiao {
+                position: absolute;
+                font-size: 24px;
+                bottom: 0;
+                line-height: 8px;
+                color: #f9f9f9;
+                left: 3px;
+                transition: left 0.3s ease-in-out;
+            }
+        }
+
+        .use-search {
+            float: right;
+            width: 335px;
+            margin-top: 17px;
+        }
+    }
+}
+
+.order {
+    width: 1190px;
+    margin: 20px auto;
+}
+
+.aside {
+    background: rgba(255, 255, 255, 1);
+    border-radius: 4px;
+    border: 1px solid rgba(234, 234, 234, 1);
+    padding: 10px 0;
+}
+</style>

+ 161 - 0
src/main/vue/src/pagesPre/UserCenterHome.vue

@@ -0,0 +1,161 @@
+<template>
+    <div class="conatiner">
+        <div class="top" v-if="userInfo">
+            <div class="top-item" style="width:34%;text-align:left">
+                <div class="icon" :style="{backgroundImage:'url('+userInfo.icon+')'}"></div>
+                <div class="name">
+                    <div class="title">{{userInfo.nickname}}</div>
+                    <div class="level">
+                        <i class="el-icon-star-on"></i>
+                        <span class="sub">1</span>
+                    </div>
+                </div>
+            </div>
+            <div class="top-item" style="width:22%">
+                我的收货地址
+            </div>
+            <div class="top-item" style="width:22%">
+                我的优惠券
+            </div>
+            <div class="top-item" style="width:22%">
+                我的积分
+            </div>
+        </div>
+
+        <div class="contentTitle">
+            最新订单进展
+        </div>
+
+        <div class="content">
+            <div class="orderList">
+                <order-item v-for="item in orderList" :info='item'></order-item>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script>
+import { mapState } from 'vuex'
+import orderItem from '../components/OrderItem'
+export default {
+    name: 'order',
+    data() {
+        return {
+            orderList: []
+        }
+    },
+    computed: {
+        ...mapState(['userInfo']),
+    },
+    mounted() {
+        this.$http.get({
+            url: '/userOrder/page',
+            data: {
+                userId: this.userInfo.userId,
+                pageNumber: 3,
+                currentPage: 1
+            }
+        }).then(res => {
+            if (res.success) {
+                this.orderList = res.data.pp
+            }
+        }).catch(e => {
+            console.log(e)
+
+        })
+
+    },
+    methods: {
+
+
+    },
+    components: {
+        orderItem
+    }
+}
+</script>
+
+<style lang="less" scoped>
+.top {
+    height: 95px;
+    background: rgba(255, 255, 255, 1);
+    border-radius: 4px;
+    border: 1px solid rgba(234, 234, 234, 1);
+    font-size: 0;
+    line-height: 95px;
+
+    .top-item {
+        display: inline-block;
+        font-size: 14px;
+        font-family: MicrosoftYaHei;
+        color: rgba(51, 51, 51, 1);
+        line-height: 19px;
+        vertical-align: middle;
+        text-align: center;
+        box-sizing: border-box;
+
+        .icon {
+            width: 55px;
+            height: 55px;
+            box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.2);
+            background-position: center center;
+            background-repeat: no-repeat;
+            background-size: cover;
+            border-radius: 100%;
+            display: inline-block;
+            vertical-align: middle;
+            margin-left: 27px;
+        }
+
+        .name {
+            display: inline-block;
+            margin-left: 10px;
+            vertical-align: middle;
+            .title {
+                display: block;
+                font-size: 16px;
+                font-family: MicrosoftYaHei;
+                color: rgba(51, 51, 51, 1);
+                line-height: 21px;
+            }
+
+            .level {
+                color: #e2b83a;
+                display: block;
+                margin-top: 8px;
+                font-size: 0;
+                i {
+                    font-size: 20px;
+                }
+
+                .sub {
+                    font-size: 16px;
+                    vertical-align: bottom;
+                    display: inline-block;
+                    transform: scale(0.5, 0.5);
+                }
+            }
+        }
+
+        &:not(:first-child) {
+            border-left: 1px solid #ebebeb;
+        }
+    }
+}
+
+.contentTitle {
+    font-size: 14px;
+    font-family: MicrosoftYaHei-Bold;
+    font-weight: bold;
+    color: rgba(51, 51, 51, 1);
+    line-height: 19px;
+    padding: 20px 0 17px;
+}
+
+.content {
+    min-height: 455px;
+    background: rgba(255, 255, 255, 1);
+    border-radius: 4px;
+    border: 1px solid rgba(234, 234, 234, 1);
+}
+</style>

+ 128 - 0
src/main/vue/src/pagesPre/UserOrder.vue

@@ -0,0 +1,128 @@
+<template>
+    <div class="conatiner">
+        <div class="top" v-if="userInfo">
+            <div class="top-item" style="width:34%;text-align:left">
+                <div class="icon" :style="{backgroundImage:'url('+userInfo.icon+')'}"></div>
+                <div class="name">
+                    <div class="title">{{userInfo.nickname}}</div>
+                    <div class="level">
+                        <i class="el-icon-star-on"></i>
+                        <span class="sub">1</span>
+                    </div>
+                </div>
+            </div>
+            <div class="top-item" style="width:22%">
+                我的收货地址
+            </div>
+            <div class="top-item" style="width:22%">
+                我的优惠券
+            </div>
+            <div class="top-item" style="width:22%">
+                我的积分
+            </div>
+        </div>
+
+        <div class="contentTitle">
+            最新订单进展
+        </div>
+
+        <div class="orderList">
+            <order-item></order-item>
+        </div>
+    </div>
+</template>
+
+<script>
+import { mapState } from 'vuex'
+import orderItem from '../components/OrderItem'
+export default {
+    name: 'order',
+    data() {
+        return {
+
+        }
+    },
+    computed: {
+        ...mapState(['userInfo']),
+    },
+    mounted() {
+
+    },
+    methods: {
+
+
+    },
+    components: {
+        orderItem
+    }
+}
+</script>
+
+<style lang="less" scoped>
+.top {
+    height: 95px;
+    background: rgba(255, 255, 255, 1);
+    border-radius: 4px;
+    border: 1px solid rgba(234, 234, 234, 1);
+    font-size: 0;
+    line-height: 95px;
+
+    .top-item {
+        display: inline-block;
+        font-size: 14px;
+        font-family: MicrosoftYaHei;
+        color: rgba(51, 51, 51, 1);
+        line-height: 19px;
+        vertical-align: middle;
+        text-align: center;
+        box-sizing: border-box;
+
+        .icon {
+            width: 55px;
+            height: 55px;
+            box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.2);
+            background-position: center center;
+            background-repeat: no-repeat;
+            background-size: cover;
+            border-radius: 100%;
+            display: inline-block;
+            vertical-align: middle;
+            margin-left: 27px;
+        }
+
+        .name {
+            display: inline-block;
+            margin-left: 10px;
+            vertical-align: middle;
+            .title {
+                display: block;
+                font-size: 16px;
+                font-family: MicrosoftYaHei;
+                color: rgba(51, 51, 51, 1);
+                line-height: 21px;
+            }
+
+            .level {
+                color: #e2b83a;
+                display: block;
+                margin-top: 8px;
+                font-size: 0;
+                i {
+                    font-size: 20px;
+                }
+
+                .sub {
+                    font-size: 16px;
+                    vertical-align: bottom;
+                    display: inline-block;
+                    transform: scale(0.5, 0.5);
+                }
+            }
+        }
+
+        &:not(:first-child) {
+            border-left: 1px solid #ebebeb;
+        }
+    }
+}
+</style>

+ 73 - 25
src/main/vue/src/routerPre/index.js

@@ -79,14 +79,54 @@ const router = new Router({
                     meta: {
                         title: '商品详情'
                     }
-                },
-                {
-                    path: '/customer',
-                    name: 'customer',
-                    component: () =>
-                        import ('../pagesPre/Customer')
                 }
             ]
+        }, {
+            path: '/',
+            component: () =>
+                import ('../pagesPre/Order'),
+            children: [{
+                path: '/submit',
+                name: 'submit',
+                component: () =>
+                    import ('../pagesPre/Submit'),
+                meta: {
+                    title: '确认订单',
+                    checkLogin: true
+                }
+            }, {
+                path: '/payOrder',
+                name: 'payOrder',
+                component: () =>
+                    import ('../pagesPre/PayOrder'),
+                meta: {
+                    title: '支付订单',
+                    checkLogin: true
+                }
+            }]
+        }, {
+            path: '/',
+            component: () =>
+                import ('../pagesPre/UserCenter'),
+            children: [{
+                path: '/userCenterHome',
+                name: 'userCenterHome',
+                component: () =>
+                    import ('../pagesPre/UserCenterHome'),
+                meta: {
+                    title: '个人中心——首页',
+                    checkLogin: true
+                }
+            }, {
+                path: '/userOrder',
+                name: 'userOrder',
+                component: () =>
+                    import ('../pagesPre/UserOrder'),
+                meta: {
+                    title: '个人中心——订单管理',
+                    checkLogin: true
+                }
+            }]
         },
         {
             path: '/login',
@@ -115,25 +155,33 @@ router.beforeEach((to, from, next) => {
         window.open(url);
         return;
     }
-    next()
-        // if (!store.state.userInfo && to.path !== '/login') {
-        //     axios.get('/userInfo/getUserInfo').then(res => {
-        //         if (res.status === 200) {
-        //             if (res.data.success && res.data.data) {
-        //                 store.commit('updateUserInfo', res.data.data);
-        //                 next();
-        //                 return;
-        //             }
-        //         }
-        //         next('/login');
-        //     }).catch(() => {
-        //         next('/login');
-        //     })
-        // } else if (!to.matched.length) {
-        //     next('/404');
-        // } else {
-        //     next();
-        // }
+
+    if (!store.state.userInfo && to.path !== '/login') {
+        axios.get('/userInfo/getUserInfo').then(res => {
+            if (res.status === 200) {
+                if (res.data.success && res.data.data) {
+                    store.commit('updateUserInfo', res.data.data);
+                    next()
+                    return;
+                }
+            }
+            if (to.meta.checkLogin) {
+                next('/login');
+            } else {
+                next();
+            }
+        }).catch(() => {
+            if (to.meta.checkLogin) {
+                next('/login');
+            } else {
+                next();
+            }
+        })
+    } else if (!to.matched.length) {
+        next('/404');
+    } else {
+        next();
+    }
 });
 router.afterEach((to, from) => {
     window.onresize();

+ 2 - 1
src/main/vue/src/vuexPre/index.js

@@ -10,7 +10,8 @@ export default new Vuex.Store({
         userInfo: null,
         locationInfo: null,
         serviceType: [],
-        hrefHistory: []
+        hrefHistory: [],
+        typeFlag: ['修图', '实体商品'], //产品分类 0.修图; 1.实体商品
     },
     mutations: {
         updateTableHeight(state, height) {

Some files were not shown because too many files changed in this diff