panhui 7 lat temu
rodzic
commit
08f5578849
52 zmienionych plików z 5026 dodań i 1045 usunięć
  1. 1 1
      src/main/java/com/izouma/awesomeadmin/web/CompanyTypeController.java
  2. 1 1
      src/main/java/com/izouma/awesomeadmin/web/OrderImageController.java
  3. 1 1
      src/main/java/com/izouma/awesomeadmin/web/UserInfoController.java
  4. 8 530
      src/main/vue/package-lock.json
  5. 1 0
      src/main/vue/package.json
  6. 147 0
      src/main/vue/src/RongIM/index.js
  7. 0 0
      src/main/vue/src/RongIMLib.js
  8. BIN
      src/main/vue/src/assets/default-avatar.png
  9. 112 24
      src/main/vue/src/components/ImgItem.vue
  10. 1 1
      src/main/vue/src/components/ImgItemLittle.vue
  11. 13 0
      src/main/vue/src/components/MiniHead.vue
  12. 65 12
      src/main/vue/src/components/OrderItem.vue
  13. 11 0
      src/main/vue/src/components/SingleUploadTitle.vue
  14. 6 0
      src/main/vue/src/emUI.less
  15. 1 0
      src/main/vue/src/entries/index.html
  16. 12 5
      src/main/vue/src/entries/index.js
  17. 3 0
      src/main/vue/src/eventBus/index.js
  18. 55 11
      src/main/vue/src/pagesPre/App.vue
  19. 10 2
      src/main/vue/src/pagesPre/Business.vue
  20. 321 0
      src/main/vue/src/pagesPre/ChatContent.vue
  21. 26 4
      src/main/vue/src/pagesPre/CommentItem.vue
  22. 150 0
      src/main/vue/src/pagesPre/CustomerService.vue
  23. 386 0
      src/main/vue/src/pagesPre/CustomerServices.vue
  24. 8 0
      src/main/vue/src/pagesPre/GuaranteeMoney.vue
  25. 29 2
      src/main/vue/src/pagesPre/Index.vue
  26. 4 4
      src/main/vue/src/pagesPre/Login.vue
  27. 1 1
      src/main/vue/src/pagesPre/MemberPoint.vue
  28. 14 0
      src/main/vue/src/pagesPre/OrderExamine.vue
  29. 6 5
      src/main/vue/src/pagesPre/OrderPreview.vue
  30. 21 26
      src/main/vue/src/pagesPre/OrderUpload.vue
  31. 471 0
      src/main/vue/src/pagesPre/OrderUploadChange.vue
  32. 2 2
      src/main/vue/src/pagesPre/Product.vue
  33. 415 0
      src/main/vue/src/pagesPre/ProductInfo.vue
  34. 375 77
      src/main/vue/src/pagesPre/Register.vue
  35. 315 0
      src/main/vue/src/pagesPre/Search.vue
  36. 42 12
      src/main/vue/src/pagesPre/SetStoreInfo.vue
  37. 126 19
      src/main/vue/src/pagesPre/Shop.vue
  38. 265 0
      src/main/vue/src/pagesPre/ShopOrder.vue
  39. 262 0
      src/main/vue/src/pagesPre/StoreComment.vue
  40. 14 3
      src/main/vue/src/pagesPre/SystemState.vue
  41. 61 10
      src/main/vue/src/pagesPre/UserCenter.vue
  42. 1 1
      src/main/vue/src/pagesPre/UserCenterHome.vue
  43. 124 23
      src/main/vue/src/pagesPre/UserCertification.vue
  44. 26 3
      src/main/vue/src/pagesPre/UserCollection.vue
  45. 1 1
      src/main/vue/src/pagesPre/UserComment.vue
  46. 39 19
      src/main/vue/src/pagesPre/UserOrder.vue
  47. 296 0
      src/main/vue/src/pagesPre/UserProductCon.vue
  48. 211 0
      src/main/vue/src/pagesPre/UserShop.vue
  49. 69 0
      src/main/vue/src/pagesPre/UserStore.vue
  50. 399 239
      src/main/vue/src/routerPre/index.js
  51. 5 4
      src/main/vue/src/vuex/index.js
  52. 93 2
      src/main/vue/src/vuexPre/index.js

+ 1 - 1
src/main/java/com/izouma/awesomeadmin/web/CompanyTypeController.java

@@ -30,7 +30,7 @@ public class CompanyTypeController {
     /**
     * <p>获取全部记录。</p>
     */
-    @RequiresAuthentication
+//    @RequiresAuthentication
     @RequestMapping(value = "/all", method = RequestMethod.GET)
     @ResponseBody
     public Result all(CompanyType record) {

+ 1 - 1
src/main/java/com/izouma/awesomeadmin/web/OrderImageController.java

@@ -40,7 +40,7 @@ public class OrderImageController {
 
 
     /**
-     * 日志对象
+     * 日志对象zipFilesDown
      */
     private static Logger logger = Logger.getLogger(OrderImageController.class);
 

+ 1 - 1
src/main/java/com/izouma/awesomeadmin/web/UserInfoController.java

@@ -95,7 +95,7 @@ public class UserInfoController {
     /**
      * <p>根据条件获取。</p>
      */
-    @RequiresAuthentication
+
     @RequestMapping(value = "/getOne", method = RequestMethod.GET)
     @ResponseBody
     public Result getOne(UserInfo record) {

+ 8 - 530
src/main/vue/package-lock.json

@@ -1754,7 +1754,6 @@
         "anymatch": "2.0.0",
         "async-each": "1.0.1",
         "braces": "2.3.1",
-        "fsevents": "1.2.4",
         "glob-parent": "3.1.0",
         "inherits": "2.0.3",
         "is-binary-path": "1.0.1",
@@ -3809,535 +3808,6 @@
       "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
       "dev": true
     },
-    "fsevents": {
-      "version": "1.2.4",
-      "resolved": "http://registry.npm.taobao.org/fsevents/download/fsevents-1.2.4.tgz",
-      "integrity": "sha1-9B3LGvJYKvNpLaNvxVy9jhBBxCY=",
-      "dev": true,
-      "optional": true,
-      "requires": {
-        "nan": "2.11.0",
-        "node-pre-gyp": "0.10.0"
-      },
-      "dependencies": {
-        "abbrev": {
-          "version": "1.1.1",
-          "bundled": true,
-          "dev": true,
-          "optional": true
-        },
-        "ansi-regex": {
-          "version": "2.1.1",
-          "bundled": true,
-          "dev": true
-        },
-        "aproba": {
-          "version": "1.2.0",
-          "bundled": true,
-          "dev": true,
-          "optional": true
-        },
-        "are-we-there-yet": {
-          "version": "1.1.4",
-          "bundled": true,
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "delegates": "1.0.0",
-            "readable-stream": "2.3.6"
-          }
-        },
-        "balanced-match": {
-          "version": "1.0.0",
-          "bundled": true,
-          "dev": true
-        },
-        "brace-expansion": {
-          "version": "1.1.11",
-          "bundled": true,
-          "dev": true,
-          "requires": {
-            "balanced-match": "1.0.0",
-            "concat-map": "0.0.1"
-          }
-        },
-        "chownr": {
-          "version": "1.0.1",
-          "bundled": true,
-          "dev": true,
-          "optional": true
-        },
-        "code-point-at": {
-          "version": "1.1.0",
-          "bundled": true,
-          "dev": true
-        },
-        "concat-map": {
-          "version": "0.0.1",
-          "bundled": true,
-          "dev": true
-        },
-        "console-control-strings": {
-          "version": "1.1.0",
-          "bundled": true,
-          "dev": true
-        },
-        "core-util-is": {
-          "version": "1.0.2",
-          "bundled": true,
-          "dev": true,
-          "optional": true
-        },
-        "debug": {
-          "version": "2.6.9",
-          "bundled": true,
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "ms": "2.0.0"
-          }
-        },
-        "deep-extend": {
-          "version": "0.5.1",
-          "bundled": true,
-          "dev": true,
-          "optional": true
-        },
-        "delegates": {
-          "version": "1.0.0",
-          "bundled": true,
-          "dev": true,
-          "optional": true
-        },
-        "detect-libc": {
-          "version": "1.0.3",
-          "bundled": true,
-          "dev": true,
-          "optional": true
-        },
-        "fs-minipass": {
-          "version": "1.2.5",
-          "bundled": true,
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "minipass": "2.2.4"
-          }
-        },
-        "fs.realpath": {
-          "version": "1.0.0",
-          "bundled": true,
-          "dev": true,
-          "optional": true
-        },
-        "gauge": {
-          "version": "2.7.4",
-          "bundled": true,
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "aproba": "1.2.0",
-            "console-control-strings": "1.1.0",
-            "has-unicode": "2.0.1",
-            "object-assign": "4.1.1",
-            "signal-exit": "3.0.2",
-            "string-width": "1.0.2",
-            "strip-ansi": "3.0.1",
-            "wide-align": "1.1.2"
-          }
-        },
-        "glob": {
-          "version": "7.1.2",
-          "bundled": true,
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "fs.realpath": "1.0.0",
-            "inflight": "1.0.6",
-            "inherits": "2.0.3",
-            "minimatch": "3.0.4",
-            "once": "1.4.0",
-            "path-is-absolute": "1.0.1"
-          }
-        },
-        "has-unicode": {
-          "version": "2.0.1",
-          "bundled": true,
-          "dev": true,
-          "optional": true
-        },
-        "iconv-lite": {
-          "version": "0.4.21",
-          "bundled": true,
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "safer-buffer": "2.1.2"
-          }
-        },
-        "ignore-walk": {
-          "version": "3.0.1",
-          "bundled": true,
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "minimatch": "3.0.4"
-          }
-        },
-        "inflight": {
-          "version": "1.0.6",
-          "bundled": true,
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "once": "1.4.0",
-            "wrappy": "1.0.2"
-          }
-        },
-        "inherits": {
-          "version": "2.0.3",
-          "bundled": true,
-          "dev": true
-        },
-        "ini": {
-          "version": "1.3.5",
-          "bundled": true,
-          "dev": true,
-          "optional": true
-        },
-        "is-fullwidth-code-point": {
-          "version": "1.0.0",
-          "bundled": true,
-          "dev": true,
-          "requires": {
-            "number-is-nan": "1.0.1"
-          }
-        },
-        "isarray": {
-          "version": "1.0.0",
-          "bundled": true,
-          "dev": true,
-          "optional": true
-        },
-        "minimatch": {
-          "version": "3.0.4",
-          "bundled": true,
-          "dev": true,
-          "requires": {
-            "brace-expansion": "1.1.11"
-          }
-        },
-        "minimist": {
-          "version": "0.0.8",
-          "bundled": true,
-          "dev": true
-        },
-        "minipass": {
-          "version": "2.2.4",
-          "bundled": true,
-          "dev": true,
-          "requires": {
-            "safe-buffer": "5.1.1",
-            "yallist": "3.0.2"
-          }
-        },
-        "minizlib": {
-          "version": "1.1.0",
-          "bundled": true,
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "minipass": "2.2.4"
-          }
-        },
-        "mkdirp": {
-          "version": "0.5.1",
-          "bundled": true,
-          "dev": true,
-          "requires": {
-            "minimist": "0.0.8"
-          }
-        },
-        "ms": {
-          "version": "2.0.0",
-          "bundled": true,
-          "dev": true,
-          "optional": true
-        },
-        "needle": {
-          "version": "2.2.0",
-          "bundled": true,
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "debug": "2.6.9",
-            "iconv-lite": "0.4.21",
-            "sax": "1.2.4"
-          }
-        },
-        "node-pre-gyp": {
-          "version": "0.10.0",
-          "bundled": true,
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "detect-libc": "1.0.3",
-            "mkdirp": "0.5.1",
-            "needle": "2.2.0",
-            "nopt": "4.0.1",
-            "npm-packlist": "1.1.10",
-            "npmlog": "4.1.2",
-            "rc": "1.2.7",
-            "rimraf": "2.6.2",
-            "semver": "5.5.0",
-            "tar": "4.4.1"
-          }
-        },
-        "nopt": {
-          "version": "4.0.1",
-          "bundled": true,
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "abbrev": "1.1.1",
-            "osenv": "0.1.5"
-          }
-        },
-        "npm-bundled": {
-          "version": "1.0.3",
-          "bundled": true,
-          "dev": true,
-          "optional": true
-        },
-        "npm-packlist": {
-          "version": "1.1.10",
-          "bundled": true,
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "ignore-walk": "3.0.1",
-            "npm-bundled": "1.0.3"
-          }
-        },
-        "npmlog": {
-          "version": "4.1.2",
-          "bundled": true,
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "are-we-there-yet": "1.1.4",
-            "console-control-strings": "1.1.0",
-            "gauge": "2.7.4",
-            "set-blocking": "2.0.0"
-          }
-        },
-        "number-is-nan": {
-          "version": "1.0.1",
-          "bundled": true,
-          "dev": true
-        },
-        "object-assign": {
-          "version": "4.1.1",
-          "bundled": true,
-          "dev": true,
-          "optional": true
-        },
-        "once": {
-          "version": "1.4.0",
-          "bundled": true,
-          "dev": true,
-          "requires": {
-            "wrappy": "1.0.2"
-          }
-        },
-        "os-homedir": {
-          "version": "1.0.2",
-          "bundled": true,
-          "dev": true,
-          "optional": true
-        },
-        "os-tmpdir": {
-          "version": "1.0.2",
-          "bundled": true,
-          "dev": true,
-          "optional": true
-        },
-        "osenv": {
-          "version": "0.1.5",
-          "bundled": true,
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "os-homedir": "1.0.2",
-            "os-tmpdir": "1.0.2"
-          }
-        },
-        "path-is-absolute": {
-          "version": "1.0.1",
-          "bundled": true,
-          "dev": true,
-          "optional": true
-        },
-        "process-nextick-args": {
-          "version": "2.0.0",
-          "bundled": true,
-          "dev": true,
-          "optional": true
-        },
-        "rc": {
-          "version": "1.2.7",
-          "bundled": true,
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "deep-extend": "0.5.1",
-            "ini": "1.3.5",
-            "minimist": "1.2.0",
-            "strip-json-comments": "2.0.1"
-          },
-          "dependencies": {
-            "minimist": {
-              "version": "1.2.0",
-              "bundled": true,
-              "dev": true,
-              "optional": true
-            }
-          }
-        },
-        "readable-stream": {
-          "version": "2.3.6",
-          "bundled": true,
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "core-util-is": "1.0.2",
-            "inherits": "2.0.3",
-            "isarray": "1.0.0",
-            "process-nextick-args": "2.0.0",
-            "safe-buffer": "5.1.1",
-            "string_decoder": "1.1.1",
-            "util-deprecate": "1.0.2"
-          }
-        },
-        "rimraf": {
-          "version": "2.6.2",
-          "bundled": true,
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "glob": "7.1.2"
-          }
-        },
-        "safe-buffer": {
-          "version": "5.1.1",
-          "bundled": true,
-          "dev": true
-        },
-        "safer-buffer": {
-          "version": "2.1.2",
-          "bundled": true,
-          "dev": true,
-          "optional": true
-        },
-        "sax": {
-          "version": "1.2.4",
-          "bundled": true,
-          "dev": true,
-          "optional": true
-        },
-        "semver": {
-          "version": "5.5.0",
-          "bundled": true,
-          "dev": true,
-          "optional": true
-        },
-        "set-blocking": {
-          "version": "2.0.0",
-          "bundled": true,
-          "dev": true,
-          "optional": true
-        },
-        "signal-exit": {
-          "version": "3.0.2",
-          "bundled": true,
-          "dev": true,
-          "optional": true
-        },
-        "string-width": {
-          "version": "1.0.2",
-          "bundled": true,
-          "dev": true,
-          "requires": {
-            "code-point-at": "1.1.0",
-            "is-fullwidth-code-point": "1.0.0",
-            "strip-ansi": "3.0.1"
-          }
-        },
-        "string_decoder": {
-          "version": "1.1.1",
-          "bundled": true,
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "safe-buffer": "5.1.1"
-          }
-        },
-        "strip-ansi": {
-          "version": "3.0.1",
-          "bundled": true,
-          "dev": true,
-          "requires": {
-            "ansi-regex": "2.1.1"
-          }
-        },
-        "strip-json-comments": {
-          "version": "2.0.1",
-          "bundled": true,
-          "dev": true,
-          "optional": true
-        },
-        "tar": {
-          "version": "4.4.1",
-          "bundled": true,
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "chownr": "1.0.1",
-            "fs-minipass": "1.2.5",
-            "minipass": "2.2.4",
-            "minizlib": "1.1.0",
-            "mkdirp": "0.5.1",
-            "safe-buffer": "5.1.1",
-            "yallist": "3.0.2"
-          }
-        },
-        "util-deprecate": {
-          "version": "1.0.2",
-          "bundled": true,
-          "dev": true,
-          "optional": true
-        },
-        "wide-align": {
-          "version": "1.1.2",
-          "bundled": true,
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "string-width": "1.0.2"
-          }
-        },
-        "wrappy": {
-          "version": "1.0.2",
-          "bundled": true,
-          "dev": true
-        },
-        "yallist": {
-          "version": "3.0.2",
-          "bundled": true,
-          "dev": true
-        }
-      }
-    },
     "fstream": {
       "version": "1.0.11",
       "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz",
@@ -11282,6 +10752,14 @@
       "integrity": "sha1-3EJpcTMwLOMBdSQ1amxht7abShg=",
       "dev": true
     },
+    "vue2.0-zoom": {
+      "version": "2.1.1",
+      "resolved": "https://registry.npmjs.org/vue2.0-zoom/-/vue2.0-zoom-2.1.1.tgz",
+      "integrity": "sha512-6j1WFwjpRxnfHNSjBV5RwPQONCVhA7hydp3pZvVQYbwxaKCKxQfuHkuJK4qsQ4kfozSzV4zTSEJGOyMzZ59Zgw==",
+      "requires": {
+        "vue": "2.5.16"
+      }
+    },
     "vuex": {
       "version": "3.0.1",
       "resolved": "https://registry.npmjs.org/vuex/-/vuex-3.0.1.tgz",

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

@@ -31,6 +31,7 @@
     "vue-grid-layout": "^2.1.13",
     "vue-i18n": "^7.8.0",
     "vue-router": "^3.0.1",
+    "vue2.0-zoom": "^2.1.1",
     "vuex": "^3.0.1"
   },
   "devDependencies": {

+ 147 - 0
src/main/vue/src/RongIM/index.js

@@ -0,0 +1,147 @@
+import store from '../vuexPre'
+import Vue from 'vue'
+import axios from 'axios'
+const vue = new Vue()
+const _ = require('lodash')
+export default {
+    install(Vue, options) {
+        Vue.prototype.$IM = this
+    },
+    init(appKey, token) {
+        console.log(appKey, token)
+        RongIMLib.RongIMClient.init(appKey)
+
+        RongIMLib.RongIMClient.setOnReceiveMessageListener({
+            onReceived: (message) => {
+                console.log('onReceiveMessage', message)
+                if (message.messageType === RongIMClient.MessageType.TextMessage) {
+                    store.dispatch('receiveMessage', {
+                        content: message.content.content,
+                        contentType: 1,
+                        state: 0,
+                        time: message.sentTime,
+                        toUserId: store.state.userInfo.id,
+                        userId: message.senderUserId,
+                        storeId: message.content.extra ? message.content.extra : null
+                    })
+                }
+            }
+        })
+
+        RongIMLib.RongIMClient.setConnectionStatusListener({
+            onChanged: (status) => {
+                console.log(RongIMLib.ConnectionStatus[status])
+            }
+        })
+
+        console.log(token)
+        RongIMClient.connect(String(token), {
+            onSuccess: (userId) => {
+                console.log('连接成功,userId:', userId)
+                store.commit('updateIMConnected', true)
+            },
+            onTokenIncorrect: () => {
+                console.log('连接失败', 'token无效')
+            },
+            onError: (errorCode) => {
+                console.log('连接失败', RongIMLib.ErrorCode[errorCode])
+            }
+        })
+    },
+    //发送信息
+    sendMessage: (options) => {
+        let target = options.target || ''
+        let content = options.content || ''
+        let success = options.success || function() {}
+        let userId = options.userId || ''
+        let typeFlag = options.typeFlag || 0
+        let msg = new RongIMLib.TextMessage(content)
+
+        RongIMClient.getInstance().sendMessage(RongIMLib.ConversationType.PRIVATE, '' + target, msg, {
+            onSuccess: (message) => {
+                // let formData = {
+                //     'content': content,
+                //     'contentType': 1,
+                //     'state': 0,
+                //     'time': message.sentTime,
+                //     'storeId': target,
+                //     'userId': userId,
+                //     'typeFlag': typeFlag
+                // }
+
+                var formData = new FormData()
+                formData.append('content', content)
+                formData.append('contentType', 0)
+                formData.append('state', 0)
+                formData.append('time', message.sentTime)
+                formData.append('storeId', target)
+                formData.append('userId', userId)
+                formData.append('typeFlag', typeFlag)
+
+
+                // vue.$http.post(api.saveChatInfo, formData).then(res => { success(res.body.data) })
+
+                axios.post('/chatInfo/save', formData)
+                    .then(res => {
+                        if (res.success) {
+                            success(res.data)
+                        }
+                    })
+                    .catch(e => {
+                        console.log(e);
+                    })
+
+            },
+            onError: (errorCode, message) => {
+                console.log('发送失败:', RongIMLib.ErrorCode[errorCode], errorCode)
+            }
+        })
+    },
+    newConversation: (options) => {
+        let userId = store.state.userInfo.id
+        let toUserId = options.toUserId
+        let storeId = options.storeId
+        let success = options.success || function() {}
+
+        function addConversation() {
+            let index = _.findIndex(store.state.conversationList, i => {
+                    if (storeId) {
+                        return Number(i.storeId) === Number(storeId) && projectId === i.projectId
+                    } else {
+                        return Number(i.toUserId) === Number(toUserId)
+                    }
+
+                })
+                // if (index === -1) {
+                //     let newCon = {
+                //         'userId': store.state.userInfo.id,
+                //         'toUserId': toUserId
+                //     }
+
+            //     if (projectId) {
+            //         newCon.projectId = projectId
+            //             // newCon.append('projectId', projectId)
+            //     }
+            //     // return vue.$http.post(api.addConversation, newCon)
+
+            //     return axios.post('/usersSession/save', newCon)
+            // } else {
+            return new Promise((resolve, reject) => resolve())
+                // }
+        }
+
+        addConversation().then(() => {
+            return axios.get('/usersSession/all', {
+                params: {
+                    userId: store.state.userInfo.id
+                }
+            })
+        }).then(res => {
+            if (res.success) {
+                store.commit('updateConversationList', res.data)
+                success()
+            }
+        })
+
+    }
+}

Plik diff jest za duży
+ 0 - 0
src/main/vue/src/RongIMLib.js


BIN
src/main/vue/src/assets/default-avatar.png


+ 112 - 24
src/main/vue/src/components/ImgItem.vue

@@ -1,12 +1,15 @@
 <template>
     <div class="imgContent">
         <template v-if="img[label]">
-            <div class="img">
-                <div class="image" v-if="img" @click="choose" :style="imageStyle" ref="img"></div>
+            <div class="img" v-if='!(imgStyle=="storeUpload"&&img.statusFlag==2)'>
+                <!-- <div class="image" v-if="img" @click="choose" :style="imageStyle" ref="img"></div> -->
+                <img :src="img[label]+'?x-oss-process=image/resize,l_120'" @click="choose" alt="">
             </div>
-            <div class="remark" v-if="label=='originalImage'">{{img.remark}}</div>
-            <div class="remark" v-if="label=='finishedImage'">{{img.detailRemark}}</div>
+            <div class="remark" v-if='!(imgStyle=="storeUpload"&&img.statusFlag==2)'>{{img.imageName}}
+                <span v-if="label=='originalImage'">{{img.remark}}</span>
+                <span v-if="label=='finishedImage'">{{img.detailRemark}}</span>
 
+            </div>
             <div v-if="imgStyle=='examine'&&label=='finishedImage'" class="check">
                 <template v-if='!isChange'>
                     <el-button v-if="img.statusFlag==1" icon="el-icon-check" type="success" circle size="mini"></el-button>
@@ -14,23 +17,40 @@
                     <el-button v-if="img.statusFlag==2" type="danger" icon="el-icon-close" circle size="mini"></el-button>
                     <el-button @click="dialogFormVisible=true" v-else type="danger" icon="el-icon-close" circle plain size="mini"></el-button>
                 </template>
+
                 <el-button v-if="img.statusFlag==2" @click="dialogFormVisible=true" icon="el-icon-edit" circle plain size="mini"></el-button>
+
+            </div>
+            <div class="check" v-if="imgStyle=='upload'">
+                <el-button v-if="canCancel" @click="delImg" type="danger" icon="el-icon-delete" circle plain size="mini"></el-button>
+                <el-button v-if="!storeType" @click="dialogFormVisible=true" icon="el-icon-edit" circle plain size="mini"></el-button>
+                <el-button v-else @click="dialogFormVisible=true" icon="el-icon-info" circle plain size="mini"></el-button>
+            </div>
+
+            <div class="check" v-if="imgStyle=='storeUpload'">
+                <el-button v-if='img.statusFlag!=2' @click="delFinishImg" type="danger" icon="el-icon-delete" circle plain size="mini"></el-button>
+                <el-button v-if="img.detailRemark" @click="dialogFormVisible=true" icon="el-icon-info" circle plain size="mini"></el-button>
+            </div>
+
+            <div class="check" v-if="imgStyle=='showInfo'">
+                <el-button @click="dialogFormVisible=true" icon="el-icon-info" circle plain size="mini"></el-button>
             </div>
-            <el-dialog title="编辑" :visible.sync="dialogFormVisible" width='30%'>
+
+            <el-dialog :title="(storeType?'查看':'添加/修改')+'备注'" :visible.sync="dialogFormVisible" width='30%'>
                 <el-form label-width="80px">
                     <el-form-item :label="imgStyle=='examine'?'返修备注':'图片备注'">
-                        <el-input v-model="remark" auto-complete="off"></el-input>
+                        <el-input type="textarea" v-model="remark" auto-complete="off"></el-input>
                     </el-form-item>
                 </el-form>
-                <div slot="footer" class="dialog-footer">
-                    <el-button v-if="imgStyle=='upload'&&canCancel" type="danger" @click="delImg" style="float:left">删除该图片</el-button>
+                <div slot="footer" class="dialog-footer" v-if="!storeType">
                     <el-button @click="dialogFormVisible = false">取 消</el-button>
                     <el-button type="primary" @click="saveRemark">添 加</el-button>
                 </div>
             </el-dialog>
 
-            <el-dialog title="照片预览" :visible.sync="preView" width="30%">
-                <img width="100%" :src="img[label]" alt="">
+            <el-dialog :title="img.imageName+' '+imgStyleStr+'预览'" :visible.sync="preView" :width="imageStyle.width+40+'px'">
+                <img-zoom v-if="label=='finishedImage'" :src="img[label]+'?x-oss-process=image/resize,l_500'" :bigsrc="img[label]" :configs="configs"></img-zoom>
+                <img v-else :src="img[label]+'?x-oss-process=image/resize,l_500'" alt="">
             </el-dialog>
         </template>
 
@@ -39,6 +59,7 @@
 </template>
 
 <script>
+import imgZoom from 'vue2.0-zoom'
 export default {
     name: 'imgItem',
     props: {
@@ -74,48 +95,84 @@ export default {
             },
             dialogFormVisible: false,
             remark: '',
-            preView: false
+            preView: false,
+            configs: {
+                width: 200,
+                height: 200,
+                maskWidth: 100,
+                maskHeight: 100,
+                maskColor: 'red',
+                maskOpacity: 0.2
+            },
+            imgInfo: {
+                width: 0,
+                height: 0
+            },
+            storeType: false
         }
     },
     computed: {
+        imgStyleStr() {
+            var str = '原片'
+            if (this.label == 'finishedImage') {
+                str = '成片'
+            }
+            return str
+        }
     },
     created() {
         this.getImg()
-        if (this.imgStyle == 'upload') {
+        if (this.label == 'originalImage') {
             this.remark = this.img.remark
         }
         else {
             this.remark = this.img.detailRemark
         }
 
+        if (this.$route.query.type) {
+            if (this.$route.query.type == 'user') {
+                this.storeType = false
+            }
+            else { this.storeType = true }
+
+        }
+
     },
     methods: {
         choose() {
-            if (this.imgStyle == 'upload') {
-                this.dialogFormVisible = true
-            }
-            if (this.imgStyle == 'preView' || (this.imgStyle == 'examine' && this.label == 'finishedImage')) {
-                this.preView = true
-            }
+            // if (this.imgStyle == 'upload') {
+            //     this.dialogFormVisible = true
+            // }
+            // if (this.imgStyle == 'preView' || (this.imgStyle == 'examine' && this.label == 'finishedImage')) {
+            this.preView = true
+            // }
         },
         getImg() {
             if (this.img[this.label]) {
                 var img = new Image()
                 img.onload = () => {
                     var key = img.width / img.height
-                    var width = 120
-                    var height = 120
+                    var width = 500
+                    var height = 500
+
+                    this.imgInfo = {
+                        width: img.width / 2,
+                        height: img.height / 2
+                    }
                     if (key > 1) {
-                        height = img.height / img.width * 120
+                        height = img.height / img.width * 500
                     }
                     else {
-                        width = img.width / img.height * 120
+                        width = img.width / img.height * 500
                     }
                     this.imageStyle = {
                         backgroundImage: `url(${this.img[this.label]})`,
-                        width: width + 'px',
+                        width: width,
                         height: height + 'px'
                     }
+
+                    this.configs.width = width / 2
+                    this.configs.height = height / 2
                 }
                 img.src = this.img[this.label]
             }
@@ -197,8 +254,29 @@ export default {
                     this.$message.warning('失败')
                 }
             });
+        },
+        delFinishImg() {
+            var data = {
+                id: this.img.id,
+                finishedImage: 'null',
+                finishedSize: 0
+            }
+            this.$http.post({
+                url: '/orderImage/update',
+                data: data
+            }).then(res => {
+                if (res.success) {
+                    this.$message.success('成功');
+                    this.$emit('changeRemark')
+                } else {
+                    this.$message.warning('失败')
+                }
+            });
         }
 
+    },
+    components: {
+        imgZoom
     }
 }
 </script>
@@ -212,6 +290,12 @@ export default {
     height: 120px;
     line-height: 120px;
     text-align: center;
+
+    img {
+        display: inline-block;
+        vertical-align: middle;
+        cursor: pointer;
+    }
 }
 .remark {
     width: 100px;
@@ -219,12 +303,16 @@ export default {
     text-align: center;
     height: 30px;
     line-height: 30px;
-    font-size: 12px;
+    font-size: 14px;
     font-family: MicrosoftYaHei;
     color: rgba(51, 51, 51, 1);
     overflow: hidden;
     text-overflow: ellipsis;
     white-space: nowrap;
+    span {
+        color: #999;
+        font-size: 12px;
+    }
 }
 .image {
     display: inline-block;

+ 1 - 1
src/main/vue/src/components/ImgItemLittle.vue

@@ -19,7 +19,7 @@ export default {
     name: 'imgItemLittle',
     props: {
         img: {
-            type: Object,
+            type: String,
             default: {}
         }
     },

+ 13 - 0
src/main/vue/src/components/MiniHead.vue

@@ -29,6 +29,8 @@
                             </el-dropdown-menu>
                         </el-dropdown>
                         <el-button type="text" style="vertical-align: middle;margin-left:15px;color:#333" @click="goNext('userCenterHome')" size="small">个人中心</el-button>
+
+                        <el-button type="text" style="vertical-align: middle;margin-left:15px;color:#333" @click="goShop" size="small">店铺中心</el-button>
                     </div>
 
                 </div>
@@ -107,6 +109,17 @@ export default {
                 })
             }
 
+        },
+        goShop() {
+            if (!this.userInfo) {
+                this.goNext('login')
+            }
+            else if (this.userInfo.storeFlag == 'Y') {
+                this.goNext('userShop')
+            }
+            else {
+                this.goNext('userCertification')
+            }
         }
     },
     components: {

+ 65 - 12
src/main/vue/src/components/OrderItem.vue

@@ -4,10 +4,15 @@
             <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="float:right;position: relative;" v-if="type=='user'">
                 <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>
+
+            <span style="float:right;position: relative;" v-else>
+                <span style="margin-right:66px;">用户:{{info.userInfo.nickname}}</span>
+                <img style="width:30px;height:25px;position: absolute;right: 30px;top: 9px;" src="../assetsPre/kefu.png" alt="">
+            </span>
         </div>
 
         <div class="ordercontent">
@@ -21,19 +26,31 @@
                 </div>
                 <span style="width:56px;color:#FD9501">{{info.unitPrice}}</span>
                 <span style="width:56px">{{info.quantity}}</span>
-                <template v-if="info.productType==0 && info.statusFlag>1">
+                <template v-if="info.productType==0 && info.statusFlag>1&&type=='user'">
                     <div class="preview" @click="goNext('orderPreview')">
                         <img src="../assetsPre/prePhoto.png" alt="">
                         <span>照片预览</span>
                     </div>
                 </template>
-                <template v-if="statusName=='待修图'">
-                    <div class="preview">
-                        <img src="../assetsPre/excel.png" @click="goNext('orderUpload')" style="margin-left:32px;width:40px;height:39px;" alt="">
+                <template v-if="statusName=='待修图'&&type=='user'">
+                    <div class="preview" @click="goNext('orderUpload')">
+                        <img src="../assetsPre/excel.png" style="margin-left:32px;width:40px;height:39px;" alt="">
                         <span>单张修改备注</span>
                     </div>
                 </template>
 
+                <template v-if="statusName=='待修图'&&type=='shop'">
+                    <div class="preview" @click="downloadImg('original')">
+                        <img src="../assetsPre/excel.png" style="width:40px;height:39px;" alt="">
+                        <span>下载原图</span>
+                    </div>
+
+                    <div class="preview" @click="goNextquery('orderUpload',{type:'look'})" >
+                        <img src="../assetsPre/prePhoto.png" style="margin-left:32px;"  alt="">
+                        <span>查看备注</span>
+                    </div>
+                </template>
+
             </div>
             <div class="right" style="width:270px;">
                 <div class="price">
@@ -46,7 +63,7 @@
                     </span>
                 </div>
                 <div>
-                    <span class="btn">
+                    <span class="btn" v-if="type=='user'">
                         <template v-if="statusName=='待付款'">
                             <el-button type="primary" size="mini" @click="payOrder">去支付</el-button>
                         </template>
@@ -59,14 +76,27 @@
                         </template>
                         <template v-if="statusName=='待评论'">
                             <div style="display:block">
-                                <el-button type="warining" size="mini">下载成片</el-button>
+                                <el-button type="warining" size="mini" @click="downloadImg('finished')">下载成片</el-button>
                             </div>
                             <div style="display:block;margin-top:5px">
                                 <el-button type="primary" size="mini" @click="goNext('productComment')">评价对方</el-button>
                             </div>
 
                         </template>
+                        <template v-if="statusName=='订单完成'">
+                            <div style="display:block">
+                                <el-button type="warining" size="mini" @click="downloadImg('finished')">下载成片</el-button>
+                            </div>
+
+                        </template>
+
+                    </span>
 
+                    <span class="btn" v-else>
+
+                        <template v-if="statusName=='待修图'">
+                            <el-button type="primary" size="mini" @click="goNextquery('orderUploadChange',{type:1})">上传修图</el-button>
+                        </template>
                     </span>
                 </div>
             </div>
@@ -84,12 +114,24 @@
 
             <span>{{'第'+(index+1)+'次返修'}}</span>
 
-            <div class="preview" v-if="item.statusFlag==1"  @click="goNextquery('orderExamine',{repairId:item.id,isChange:1})" >
-                <img src="../assetsPre/excel.png" @click="goNext('orderUpload')" style="margin-left:50px;width:30px;height:29px;" alt="">
-                <span >修改备注</span>
+            <div class="preview" v-if="item.statusFlag==1" @click="goNextquery('orderExamine',{repairId:item.id,isChange:1,type:type})">
+                <template v-if="type=='user'">
+                    <img src="../assetsPre/excel.png" style="margin-left:50px;width:30px;height:29px;" alt="">
+                    <span>修改备注</span>
+                </template>
+                <template v-else>
+                    <img src="../assetsPre/excel.png" style="margin-left:50px;width:30px;height:29px;" alt="">
+                    <span>查看备注</span>
+                </template>
             </div>
-            <el-button v-if="item.statusFlag==1" type="text" style="float:right;margin:10px 20px 0;" size="mini">已提交</el-button>
-            <el-button v-if="item.statusFlag==2" @click="goNextquery('orderExamine',{repairId:item.id})" type="primary" style="float:right;margin:10px 20px 0;" size="mini">去审核</el-button>
+            <template v-if="type=='user'">
+                <el-button v-if="item.statusFlag==1" type="text" style="float:right;margin:10px 20px 0;" size="mini">已提交</el-button>
+                <el-button v-if="item.statusFlag==2" @click="goNextquery('orderExamine',{repairId:item.id})" type="primary" style="float:right;margin:10px 20px 0;" size="mini">去审核</el-button>
+            </template>
+            <template v-else>
+                <el-button v-if="item.statusFlag==1" @click="goNextquery('orderUploadChange',{repairId:item.id,type:type})" type="primary" style="float:right;margin:10px 20px 0;" size="mini">去上传</el-button>
+                <el-button v-if="item.statusFlag==2" type="text" style="float:right;margin:10px 20px 0;" size="mini">审核中</el-button>
+            </template>
             <el-button v-if="item.statusFlag==3" type="text" style="float:right;margin:10px 20px 0;" size="mini">已结束</el-button>
         </div>
     </div>
@@ -103,6 +145,10 @@ export default {
         info: {
             type: Object,
             default: {}
+        },
+        type: {
+            type: String,
+            default: 'user'
         }
     },
     data() {
@@ -149,6 +195,13 @@ export default {
                 name: str,
                 query: query
             })
+        },
+        downloadImg(typeFlag) {
+
+            const baseUrl = process.env.NODE_ENV === 'production' ? '../' : `http://${location.hostname}:8080`;
+
+
+            window.location.href = baseUrl + '/orderImage/zipFilesDown?orderId=' + this.info.id + '&typeFlag=' + typeFlag
         }
     }
 }

+ 11 - 0
src/main/vue/src/components/SingleUploadTitle.vue

@@ -53,6 +53,10 @@ export default {
         height: {
             type: Number,
             default: 178
+        },
+        nowIndex:{
+            type:Number,
+            default:-1
         }
     },
     data() {
@@ -71,6 +75,13 @@ export default {
             } else {
                 newVal = res.data;
             }
+            if(this.nowIndex!=-1){
+                var img=newVal
+                newVal={
+                    img:img,
+                    index:this.nowIndex
+                }
+            }
             this.$emit('input', newVal);
         },
         onError(err, file, fileList) {

+ 6 - 0
src/main/vue/src/emUI.less

@@ -379,3 +379,9 @@ a{
     color:#666;
     font-size: 20px;
 }
+
+.el-dialog__header{
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+}

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

@@ -9,6 +9,7 @@
     <script src="/static/polyfill.min.js"></script>
     <script src="/static/fontawesome-v5.2.0.js"></script>
     <script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.8&key=dd8f1d46b89cb06d842c321d0d021672"></script>
+    <script src="http://cdn.ronghub.com/RongIMLib-2.2.5.min.js"></script>
     <style>
         #app {
             width: 100%;

+ 12 - 5
src/main/vue/src/entries/index.js

@@ -10,6 +10,8 @@ import SingleUploadTitle from '../components/SingleUploadTitle'
 import VueI18n from 'vue-i18n'
 import VueAMap from 'vue-amap'
 import moment from 'moment'
+import RongIM from '../RongIM'
+Vue.use(RongIM)
 
 import '../elementVariables.scss'
 import 'normalize.css/normalize.css'
@@ -166,15 +168,20 @@ Vue.prototype.getTime = function(str) {
 }
 
 Vue.prototype.getPhone = function(phone) {
-    if (phone.length == 11) {
-        var str = phone.substr(0, 3)
-        str += '****'
-        str += phone.substr(phone.length - 4, 4)
-        return str
+    if (phone) {
+        if (phone.length == 11) {
+            var str = phone.substr(0, 3)
+            str += '****'
+            str += phone.substr(phone.length - 4, 4)
+            return str
+        } else {
+            return ''
+        }
     } else {
         return ''
     }
 
+
 }
 Vue.prototype.getMail = function(mail) {
     if (mail) {

+ 3 - 0
src/main/vue/src/eventBus/index.js

@@ -0,0 +1,3 @@
+import Vue from 'vue'
+const eventBus = new Vue()
+export default eventBus

+ 55 - 11
src/main/vue/src/pagesPre/App.vue

@@ -7,13 +7,13 @@
                     <div class="HeadTop">
                         <img class="logo" src="../assetsPre/logo.png" alt="">
                         <div class="Head-right">
-                            <el-input class="search" v-model="input" placeholder="搜索商品或服务">
+                            <el-input class="search" v-model="searchKey" placeholder="搜索店铺">
                                 <template slot="append">
-                                    <button>搜索</button>
+                                    <button @click="search">搜索</button>
                                 </template>
                             </el-input>
 
-                            <div class="shop-enter">
+                            <div class="shop-enter" @click="goNext('userCertification')">
                                 <img src="../assetsPre/shop.png" alt="">
                                 <span>入驻接单</span>
                             </div>
@@ -28,10 +28,10 @@
                             </div>
                             <transition name='slide-down'>
                                 <div class="service-content" v-if="showMenu">
-                                    <div class="serive-item" v-for="item in serviceType">
+                                    <div class="serive-item" v-for="(item,index) in serviceType">
                                         <div class="title">{{item.serviceType}}</div>
                                         <div class="serive-val-list">
-                                            <a href='#' class="service-val" v-for="todo in item.serviceTypeDetailList">{{todo.typeName}}</a>
+                                            <router-link :to='{name:"business",query:{id:(index+1),littleId:todo.id}}' class="service-val" v-for="todo in item.serviceTypeDetailList">{{todo.typeName}}</router-link>
                                         </div>
                                     </div>
                                 </div>
@@ -52,13 +52,13 @@
                 </div>
             </div>
             <keep-alive exclude="shop,product">
-            <router-view ref='child'></router-view>
+                <router-view ref='child'></router-view>
             </keep-alive>
             <logo-foot :isBottom='false'></logo-foot>
         </div>
 
         <div class="little-menu">
-            <div class="little-item">
+            <div class="little-item" @click="sendMsg('hello world')">
                 <img src="../assetsPre/fankui1.png" style="width:17px;height:18px;" alt="">
                 <div>咨询</div>
             </div>
@@ -71,6 +71,8 @@
             </div>
         </div>
 
+        <chatContent></chatContent>
+
     </div>
 </template>
 
@@ -79,10 +81,12 @@ import logo from '../components/Logo'
 import { mapState } from 'vuex'
 import logoFoot from '../pagesPre/LogoFoot'
 import miniHead from '../components/MiniHead'
+import chatContent from '../pagesPre/ChatContent'
+import eventBus from '../eventBus'
 export default {
     name: 'App',
     created() {
-
+        eventBus.$on('receiveMessage', this.onReceiveMessage)
         setTimeout(() => {
 
             console.log(this.$route.name)
@@ -150,13 +154,16 @@ export default {
         return {
             showMenu: false,
             nowMenu: 0,
-            input: '',
+            searchKey: '',
             lineLeft: -2,
             isBottom: false
         }
     },
+    beforeDestroy() {
+        eventBus.$off('receiveMessage', this.onReceiveMessage)
+    },
     computed: {
-        ...mapState(['userInfo', 'serviceType']),
+        ...mapState(['userInfo', 'serviceType', 'conversationList']),
         lineWidth() {
             var width = 40
             if (document.getElementById('menuItem' + this.nowMenu)) {
@@ -189,6 +196,19 @@ export default {
         }
     },
     methods: {
+        search() {
+            if (!this.searchKey) {
+                this.$message.warning('搜索内容不能为空!');
+                return
+            }
+
+            this.$router.push({
+                name: 'search',
+                query: {
+                    searchKey: this.searchKey
+                }
+            })
+        },
         menu() {
             this.$refs.child.scrollMenu()
         },
@@ -205,6 +225,28 @@ export default {
                     id: index
                 }
             })
+        },
+        goNext(str) {
+            this.$router.push({
+                name: str
+            })
+        },
+        onReceiveMessage(message) {
+            console.log('收到啦' + JSON.stringify(message))
+        },
+        sendMsg() {
+            var content = {
+                content: '姓名:111' + '\n手机:111' + + '\n微信:1111',
+                extra: { projectId: 1 }
+            }
+            this.$IM.sendMessage({
+                target: this.$route.query.id,
+                content: content,
+                success: (res) => {
+                    console.log(res)
+
+                }
+            })
         }
     },
     watch: {
@@ -250,7 +292,7 @@ export default {
         }
     },
     components: {
-        logo, logoFoot, miniHead
+        logo, logoFoot, miniHead, chatContent
     }
 }
 </script>
@@ -291,8 +333,10 @@ export default {
                 background: rgba(254, 168, 60, 1);
                 float: left;
                 margin-left: 5px;
+                cursor: pointer;
                 img {
                     width: 19px;
+                    height: 19px;
                     display: block;
                     float: left;
                     margin: 13px 5px 14px 12px;

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

@@ -85,9 +85,9 @@
 
             </div>
 
-            <div class="content-right">
+            <div class="content-right" v-if="hotList.length>0">
                 <div class="right-title">
-                    热门修图商
+                    热门{{serviceType[this.nowIndex].serviceType}}
                 </div>
                 <goods-little v-for="item in hotList" :info='item' style="border-top:1px solid #EAEAEA;padding:15px 0 29px"></goods-little>
             </div>
@@ -387,6 +387,12 @@ export default {
                 useFlag: 'Y',
                 advancedQuery: ''
             }
+            if (this.$route.query.littleId) {
+                data.subclass = this.$route.query.littleId
+            }
+
+
+
 
             if (this.district) {
                 data.advancedQuery += 'AND_,citye_,like_,' + JSON.parse(JSON.stringify(this.district))
@@ -427,6 +433,8 @@ export default {
                 data.orderByStr += 'rework_rate_,' + this.orderType[this.reworkOrder]
             }
 
+
+
             this.currentPage++
             this.$http.get({
                 url: '/storeInfo/page',

+ 321 - 0
src/main/vue/src/pagesPre/ChatContent.vue

@@ -0,0 +1,321 @@
+<template>
+    <div class='box'>
+        <div class="chatContent">
+            <div class="left">
+                <div class="topContent">
+                    <img class="icon" :src="userInfo.icon+'?x-oss-process=image/resize,m_fill,h_40,w_40'" alt="">
+                    <span>{{userInfo.nickname}}</span>
+                </div>
+                <div class='leftList' v-if="conversationList.length>0">
+
+                    <div class="left-item" v-for="item in conversationList">
+                        <img class="icon" :src="item.storeInfo.icon+'?x-oss-process=image/resize,m_fill,h_40,w_40'" alt="">
+                        <div class="content">
+                            <div class="name">{{item.storeInfo.storeName}}</div>
+                            <div class="subtitle" v-if="item.chatInfo">{{item.chatInfo.content}}</div>
+                        </div>
+                        <div class="time" v-if="item.amount">
+                            <el-badge :value="item.amount" :hidden='item.amount?false:true' class='item'>
+                            </el-badge>
+                            <span>{{getTime(item.updateTime)}}</span>
+                        </div>
+
+                    </div>
+
+                </div>
+
+                <div class="nothing" v-else>
+                    还没有聊天记录哦,快去和人聊天吧~
+                </div>
+
+            </div>
+
+            <div class="right">
+                <div class="topContent">
+                    <img class="icon" :src="storeInfo.icon+'?x-oss-process=image/resize,m_fill,h_40,w_40'" alt="">
+                    <span>{{storeInfo.storeName}}</span>
+                    <span style="font-size:14px;margin-left:20px;">{{storeInfo.citye}}</span>
+                </div>
+                <div class="chatList" ref='chatList'>
+                    <div class="chat-item" v-for="item in chatList" :style="{flexDirection:item.typeFlag?'row':'row-reverse'}">
+                        <img class="icon" :src="(item.typeFlag?storeInfo.icon:item.icon)+'?x-oss-process=image/resize,m_fill,h_40,w_40'" alt="">
+                        <div class="chatInfo">{{item.content}}</div>
+                    </div>
+                </div>
+                <div class="inputContent">
+                    <el-input type="textarea" maxlength="200" resize='none' :autosize="{ minRows:6}" placeholder="请输入内容" v-model="textarea3">
+                    </el-input>
+
+                    <el-button type="primary" class="submit" @click="send">发送</el-button>
+                </div>
+            </div>
+        </div>
+    </div>
+
+</template>
+
+<script>
+import { mapState } from 'vuex'
+import moment from 'moment'
+import 'moment/locale/zh-cn'
+export default {
+    created() {
+        if (this.storeId) {
+            this.getChatInfo(this.storeId)
+        }
+    },
+    name: 'chatContent',
+    data() {
+        return {
+            storeId: 1,
+            chatList: [],
+            storeInfo: {},
+            textarea3: '',
+            customerList: []
+        }
+    },
+    computed: {
+        ...mapState(['userInfo', 'conversationList']),
+    },
+    methods: {
+        getTime(str) {
+            var time = ''
+            if (str) {
+                time = moment(str).fromNow()
+            }
+            return time
+        },
+        getChatInfo(id) {
+            this.$http.get({
+                url: '/storeInfo/getOne',
+                data: {
+                    storeId: this.storeId,
+                }
+            }).then(res => {
+                if (res.success) {
+                    this.storeInfo = res.data
+                }
+            }).catch(e => {
+                console.log(e)
+            })
+            this.$http.get({
+                url: '/customerService/recently',
+                data: {
+                    storeId: this.storeId,
+                }
+            }).then(res => {
+                if (res.success) {
+                    res.data.forEach((item, index) => {
+                        if (item.checkOnlineResult.status == '1') {
+                            res.data.splice(0, 0, item)
+                        }
+                    })
+                    this.customerList = res.data
+
+                }
+            }).catch(e => {
+                console.log(e)
+            })
+
+            this.$http.get({
+                url: '/chatInfo/page',
+                data: {
+                    currentPage: 1,
+                    pageNumber: 20,
+                    storeId: this.storeId,
+                    userId: this.userInfo.id
+                }
+            }).then(res => {
+                if (res.success) {
+                    res.data.pp.forEach(item => {
+                        this.chatList.push(item)
+                    });
+
+                    // this.chatList = res.data.pp
+                    this.goBottom()
+                }
+            }).catch(e => {
+                console.log(e)
+            })
+        },
+        goBottom() {
+            setTimeout(() => {
+                this.$refs.chatList.scrollTop = this.$refs.chatList.scrollHeight
+            }, 50)
+
+        },
+        send() {
+            var customer = ''
+            if (this.customerList.length > 0) {
+                customer = this.customerList[0].username
+            }
+            this.$IM.sendMessage({
+                target: this.storeId,
+                content: this.textarea3,
+                userId: this.userInfo.id,
+                typeFlag: 0,
+                customer: customer,
+                success: (res) => {
+                    this.chatList.push(res)
+                    this.goBottom()
+                }
+            })
+        }
+    }
+}
+</script>
+
+<style lang="less" scoped>
+.box {
+    background-color: rgba(0, 0, 0, 0.3);
+    position: fixed;
+    top: 0;
+    left: 0;
+    width: 100%;
+    height: 100%;
+    z-index: 600;
+
+    .chatContent {
+        display: flex;
+        background: rgba(254, 254, 254, 1);
+        box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.5);
+        border-radius: 4px;
+        position: absolute;
+        top: 20vh;
+        left: 50%;
+        transform: translateX(-50%);
+    }
+
+    .topContent {
+        background: linear-gradient(151deg, rgba(27, 184, 172, 1) 0%, rgba(0, 142, 205, 1) 100%);
+        box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.2);
+        height: 55px;
+        padding: 0 15px;
+        line-height: 55px;
+        .icon {
+            border-radius: 100%;
+            vertical-align: middle;
+        }
+        span {
+            font-size: 22px;
+            font-weight: 400;
+            color: rgba(255, 255, 255, 1);
+            vertical-align: middle;
+            margin-left: 8px;
+        }
+    }
+
+    .leftList {
+        padding: 0 15px;
+        height: 583px;
+        overflow: auto;
+    }
+
+    .left {
+        width: 300px;
+
+        .item {
+            display: block;
+            width: 100%;
+        }
+
+        .left-item {
+            padding: 10px 0;
+            display: flex;
+            align-items: center;
+            cursor: pointer;
+
+            .icon {
+                border-radius: 100%;
+                min-width: 40px;
+            }
+
+            .content {
+                flex-grow: 1;
+                margin-left: 5px;
+                overflow: hidden;
+                .name {
+                    font-size: 16px;
+                    color: #333;
+                    overflow: hidden;
+                    text-overflow: ellipsis;
+                    white-space: nowrap;
+                }
+
+                .subtitle {
+                    font-size: 12px;
+                    color: #999;
+                    margin-top: 5px;
+                    overflow: hidden;
+                    text-overflow: ellipsis;
+                    white-space: nowrap;
+                }
+            }
+
+            .time {
+                font-size: 12px;
+                color: #999;
+                display: flex;
+                flex-direction: column;
+                text-align: right;
+                min-width: 60px;
+            }
+
+            &:not(:last-child) {
+                border-bottom: 1px solid #ebebeb;
+            }
+        }
+
+        .nothing {
+            text-align: center;
+            padding: 30px;
+            color: #999;
+            font-size: 18px;
+        }
+    }
+
+    .right {
+        width: 800px;
+
+        .chatList {
+            height: 425px;
+            overflow: auto;
+            // border-bottom: 1px solid #ebebeb;
+            padding-bottom: 20px;
+        }
+        .inputContent {
+            position: relative;
+            .submit {
+                position: absolute;
+                bottom: 16px;
+                right: 23px;
+                width: 93px;
+            }
+        }
+        .chat-item {
+            display: flex;
+            align-items: flex-start;
+            margin-top: 23px;
+            padding: 0 15px;
+            .icon {
+                min-width: 40px;
+                margin: 0 20px;
+                border-radius: 100%;
+            }
+
+            .chatInfo {
+                // flex-grow: 1;
+
+                padding: 10px 20px;
+                font-size: 14px;
+                font-weight: 400;
+                color: rgb(12, 4, 4);
+                line-height: 20px;
+                border: 1px solid #979797;
+                border-radius: 4px;
+                margin-top: 18px;
+            }
+        }
+    }
+}
+</style>

+ 26 - 4
src/main/vue/src/pagesPre/CommentItem.vue

@@ -1,17 +1,17 @@
 <template>
     <div class="comment" @click="goNext">
-        <div class='icon' :style="{backgroundImage:'url('+(type=='store'?info.userInfo.icon:info.productInfo.image)+')'}">
+        <div class='icon' :style="{backgroundImage:'url('+(type=='store'?userInfo.icon:productInfo.image)+')'}">
         </div>
         <div class="content">
-            <div class="name">{{type=='store'?info.userInfo.nickname:info.productInfo.title}}</div>
-            <el-rate v-model="info.starLevel" disabled show-score text-color="#ff9900" score-template="{value}">
+            <div class="name">{{type=='store'?userInfo.nickname:productInfo.title}}</div>
+            <el-rate v-model="starLevel" disabled show-score text-color="#ff9900" score-template="{value}">
             </el-rate>
 
             <div class="message">
                 {{info.context}}
             </div>
 
-            <div class="imgList">
+            <div class="imgList" v-if="info.productCommentImageList.length>0">
                 <imgItemLittle :img='item.imageUrl' v-for="item in info.productCommentImageList"></imgItemLittle>
             </div>
 
@@ -47,6 +47,27 @@ export default {
         }
     },
     computed: {
+        userInfo() {
+            var jsonp = {}
+            if (this.info.userInfo) {
+                jsonp = this.info.userInfo
+            }
+            return jsonp
+        },
+        productInfo(){
+             var jsonp = {}
+            if (this.info.productInfo) {
+                jsonp = this.info.productInfo
+            }
+            return jsonp
+        },
+        starLevel(){
+            var num=0
+            if(this.info.starLevel){
+                num=parseFloat(this.info.starLevel)
+            }
+            return num
+        }
     },
     mounted() {
 
@@ -82,6 +103,7 @@ export default {
         background-position: center center;
         background-size: cover;
         vertical-align: top;
+        background-color: #ebebeb;
     }
     .content {
         display: inline-block;

+ 150 - 0
src/main/vue/src/pagesPre/CustomerService.vue

@@ -0,0 +1,150 @@
+<template>
+    <div class="container">
+        <el-form :model="formData" :rules="rules" ref="form" label-width="80px" label-position="right" size="small" style="max-width: 500px;">
+            <!-- <el-form-item prop="storeId" label="店铺">
+                <el-input v-model="formData.storeId" :disabled="'storeId'==subColumn"></el-input>
+            </el-form-item> -->
+            <el-form-item prop="serviceName" label="客服名">
+                <el-input v-model="formData.serviceName" :disabled="'serviceName'==subColumn"></el-input>
+            </el-form-item>
+            <el-form-item prop="icon" label="头像">
+                <single-upload v-model="formData.icon" :disabled="'icon'==subColumn"></single-upload>
+            </el-form-item>
+            <el-form-item prop="username" label="登录名">
+                <el-input v-model="formData.username" :disabled="'username'==subColumn"></el-input>
+            </el-form-item>
+            <el-form-item prop="password" label="密码">
+                <el-input v-model="formData.password" :disabled="'password'==subColumn"></el-input>
+            </el-form-item>
+            <el-form-item prop="useFlag" label="是否可用">
+                <el-switch v-model="formData.useFlag" active-color="#13ce66" inactive-color="#ff4949" :disabled="'useFlag'==subColumn">
+                </el-switch>
+            </el-form-item>
+            <!-- <el-form-item prop="statusFlag" label="状态">
+                <el-input v-model="formData.statusFlag" :disabled="'statusFlag'==subColumn"></el-input>
+            </el-form-item> -->
+            <!-- <el-form-item prop="loginTime" label="登录时间">
+                <template>
+                    <div class="block">
+                        <el-date-picker v-model="formData.loginTime" type="datetime" value-format="timestamp" placeholder="选择日期">
+                        </el-date-picker>
+                    </div>
+                </template>
+            </el-form-item> -->
+            <el-form-item>
+                <el-button @click="onSave" :loading="$store.state.fetchingData" type="primary">保存</el-button>
+                <el-button @click="onDelete" v-if="formData.id" type="danger">删除</el-button>
+                <el-button @click="$router.go(-1)">取消</el-button>
+            </el-form-item>
+        </el-form>
+    </div>
+</template>
+<script>
+import formValidator from '../formValidator'
+import { mapState } from 'vuex'
+export default {
+    created() {
+        this.formData.storeId = this.myStoreInfo.id
+        if (this.$route.query.column) {
+            this.subColumn = this.$route.query.column.split(',')[1];
+            this.subValue = this.$route.query.column.split(',')[0];
+        }
+
+        if (this.$route.query.id) {
+            this.$http.get({
+                url: '/customerService/getOne',
+                data: {
+                    id: this.$route.query.id
+                }
+            }).then(res => {
+                if (res.success) {
+
+
+                    this.formData = res.data;
+
+                    if (this.$route.query.column) {
+                        this.formData[this.subColumn] = this.subValue;
+                    }
+
+                    this.formData.useFlag = this.formData.useFlag == 'Y' ? true : false;
+
+                }
+            })
+        } else {
+            if (this.$route.query.column) {
+                this.formData[this.subColumn] = this.subValue;
+            }
+        }
+
+    },
+    data() {
+        return {
+            saving: false,
+            formData: {
+                useFlag: true,
+            },
+            rules: {
+            },
+            subColumn: '',
+            subValue: '',
+        }
+    },
+    computed: {
+        ...mapState(['userInfo', 'myStoreInfo']),
+
+    },
+    methods: {
+        onSave() {
+            this.$refs.form.validate((valid) => {
+                if (valid) {
+                    this.submit();
+                } else {
+                    return false;
+                }
+            });
+        },
+        submit() {
+            var data = JSON.parse(JSON.stringify(this.formData));
+
+            data.useFlag = this.formData.useFlag ? 'Y' : 'N';
+
+            this.$http.post({
+                url: this.formData.id ? '/customerService/update' : '/customerService/save',
+                data: data
+            }).then(res => {
+                if (res.success) {
+                    this.$message.success('成功');
+                    this.$router.go(-1);
+                } else {
+                    this.$message.warning('失败')
+                }
+            });
+        },
+        onDelete() {
+            this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'error' }).then(() => {
+                return this.$http.post({
+                    url: '/customerService/del',
+                    data: { id: this.formData.id }
+                })
+            }).then(() => {
+                this.$message.success('删除成功');
+                this.$router.go(-1);
+            }).catch(action => {
+                if (action === 'cancel') {
+                    this.$message.info('删除取消');
+                } else {
+                    this.$message.error('删除失败');
+                }
+            })
+        },
+    }
+}
+</script>
+<style lang="less" scoped>
+.container {
+    background-color: #fff;
+    border: 1px solid #ebebeb;
+    padding: 20px;
+    border-radius: 4px;
+}
+</style>

+ 386 - 0
src/main/vue/src/pagesPre/CustomerServices.vue

@@ -0,0 +1,386 @@
+<template>
+    <div class="container">
+
+        <div class="pageTitle">
+            客服管理
+            <el-button type="primary" class="add" size="mini" @click="goNext">添加客服</el-button>
+        </div>
+
+        <div class="content" style="min-height:450px">
+            <el-table class="table" :data="tableData" row-key="id" ref="table">
+                <el-table-column type="index" align="center">
+                </el-table-column>
+                <el-table-column prop="icon" label="头像" align="center">
+                    <template slot-scope="{row}">
+                        <img :src="row.icon+'?x-oss-process=image/resize,m_mfit,h_50,w_50'" style="border-radius:100%;width:50px;height:50px" />
+                    </template>
+
+                </el-table-column>
+
+                <el-table-column prop="serviceName" label="客服名" align="center">
+                </el-table-column>
+
+                <!-- <el-table-column v-if="isColumnShow('password')" prop="password" label="密码" min-width="100">
+            </el-table-column> -->
+
+                <el-table-column prop="username" label="登录名" align="center">
+                </el-table-column>
+
+                <el-table-column prop="useFlag" label="可用标识" align="center">
+                </el-table-column>
+
+                <el-table-column prop="statusFlag" label="状态" align="center">
+                </el-table-column>
+
+                <el-table-column prop="loginTime" :formatter="DateTimeFormatter" min-width="140" label="登录时间" align="center">
+                </el-table-column>
+                <el-table-column label="操作" align="center" fixed="right" min-width="150">
+                    <template slot-scope="scope">
+                        <el-button @click="editRow(scope.row)" type="primary" size="mini" plain>编辑</el-button>
+                        <el-button @click="deleteRow(scope.row)" type="danger" size="mini" plain>删除</el-button>
+                    </template>
+                </el-table-column>
+            </el-table>
+        </div>
+
+        <div class="pagination-wrapper" v-if="totalNumber>10">
+
+            <el-pagination background @current-change="currentPageChange" :current-page="currentPage" :page-size="pageSize" layout="total, prev, pager, next" :total="totalNumber">
+            </el-pagination>
+        </div>
+
+    </div>
+</template>
+<script>
+import { mapState } from 'vuex'
+import { format } from 'date-fns'
+import zh from 'date-fns/locale/zh_cn'
+
+export default {
+    created() {
+        this.getData();
+    },
+    data() {
+        return {
+            totalNumber: 0,
+            totalPage: 10,
+            currentPage: 1,
+            pageSize: 10,
+            tableData: [],
+            filter1: '',
+            filter2: '',
+            tableColumns: [
+                {
+                    label: '店铺',
+                    value: 'storeId',
+                    show: true
+                },
+                {
+                    label: '客服名',
+                    value: 'serviceName',
+                    show: true
+                },
+                {
+                    label: '密码',
+                    value: 'password',
+                    show: true
+                },
+                {
+                    label: '登录名',
+                    value: 'username',
+                    show: true
+                },
+                {
+                    label: '头像',
+                    value: 'icon',
+                    show: true
+                },
+                {
+                    label: '可用标识',
+                    value: 'useFlag',
+                    show: true
+                },
+                {
+                    label: '状态',
+                    value: 'statusFlag',
+                    show: true
+                },
+                {
+                    label: '登录时间',
+                    value: 'loginTime',
+                    show: true
+                },
+            ],
+            multipleMode: false,
+            showAdvancedQueryDialog: false,
+            advancedQueryFields: [],
+            showTableSortDialog: false,
+            tableSortFields: [],
+            searchMethods: ['=', '!=', '>', '>=', '<', '<=', 'like'],
+            advancedQueryColumns: [
+                {
+                    label: '店铺',
+                    value: 'store_id'
+                },
+                {
+                    label: '客服名',
+                    value: 'service_name'
+                },
+                {
+                    label: '密码',
+                    value: 'password'
+                },
+                {
+                    label: '登录名',
+                    value: 'username'
+                },
+                {
+                    label: '头像',
+                    value: 'icon'
+                },
+                {
+                    label: '可用标识',
+                    value: 'use_flag'
+                },
+                {
+                    label: '状态',
+                    value: 'status_flag'
+                },
+                {
+                    label: '登录时间',
+                    value: 'login_time'
+                },
+            ],
+            advancedQuerySearchKey: '',
+            orderByStr: '',
+            imgSrc: '',
+            imageDialogVisible: false,
+        }
+    },
+    computed: {
+        ...mapState(['myStoreInfo']),
+        selection() {
+            return this.$refs.table.selection.map(i => i.id);
+        }
+    },
+    methods: {
+        pageSizeChange(size) {
+            this.currentPage = 1;
+            this.pageSize = size;
+            this.getData();
+        },
+        currentPageChange(page) {
+            this.currentPage = page;
+            this.getData();
+        },
+        getData() {
+
+            var data = {
+                currentPage: this.currentPage,
+                pageNumber: this.pageSize,
+                searchKey: this.filter1,
+                advancedQuery: this.advancedQuerySearchKey,
+                orderByStr: this.orderByStr,
+                storeId:this.myStoreInfo.id
+            }
+
+            if (this.$route.query.column) {
+                var tempColumn = this.$route.query.column;
+                data[tempColumn.split(',')[1]] = tempColumn.split(',')[0];
+            }
+
+            this.$http.get({
+                url: '/customerService/page',
+                data: data
+            }).then(res => {
+                if (res.success) {
+                    this.totalNumber = res.data.page.totalNumber;
+                    this.tableData = res.data.pp;
+                }
+            })
+        },
+        isColumnShow(column) {
+            var row = this.tableColumns.find(i => i.value === column);
+            return row ? row.show : false;
+        },
+        toggleMultipleMode(multipleMode) {
+            this.multipleMode = multipleMode;
+            if (!multipleMode) {
+                this.$refs.table.clearSelection();
+            }
+        },
+        goNext() {
+            this.$router.push({
+                path: '/customerService',
+            })
+        },
+        editRow(row) {
+            this.$router.push({
+                path: '/customerService',
+                query: {
+                    id: row.id,
+                    column: this.$route.query.column,
+                }
+            })
+        },
+        operation1() {
+            this.$notify({
+                title: '提示',
+                message: this.selection
+            });
+        },
+        operation2() {
+            this.$message('操作2');
+        },
+        addField() {
+            this.advancedQueryFields.push({
+                link: 'AND',
+                name: '',
+                searchMethod: '=',
+                value: '',
+            });
+        },
+        removeField(i) {
+            if (this.advancedQueryFields.length > 0) {
+                this.advancedQueryFields.splice(i, 1);
+            }
+        },
+        advancedQuery() {
+
+            this.advancedQuerySearchKey = '';
+
+            if (this.advancedQueryFields.length > 0) {
+
+                var templist = [];
+
+                this.advancedQueryFields.forEach(item => {
+                    if (item.link && item.name && item.searchMethod && item.value) {
+                        var tempItem = item.link + '_,' + item.name + '_,' + item.searchMethod + '_,' + item.value;
+                        templist.push(tempItem);
+                    }
+                })
+
+                if (templist.length > 0) {
+
+                    this.advancedQuerySearchKey = templist.join('_;');
+                }
+            }
+
+            this.getData();
+            this.showAdvancedQueryDialog = false;
+        },
+        addSortField() {
+            this.tableSortFields.push({
+                name: '',
+                order: 'asc',
+            });
+        },
+        removeSortField(i) {
+            if (this.tableSortFields.length > 0) {
+                this.tableSortFields.splice(i, 1);
+            }
+        },
+        tableSortQuery() {
+
+            this.orderByStr = '';
+
+            if (this.tableSortFields.length > 0) {
+
+                var templist = [];
+
+                this.tableSortFields.forEach(item => {
+                    if (item.name && item.order) {
+                        var tempItem = item.name + '_,' + item.order;
+                        templist.push(tempItem);
+                    }
+                })
+
+                if (templist.length > 0) {
+
+                    this.orderByStr = templist.join('_;');
+                }
+            }
+
+            this.getData();
+            this.showTableSortDialog = false;
+        },
+        exportExcel() {
+            window.location.href = this.$baseUrl + "/customerService/exportExcel?searchKey="
+                + this.filter1 + "&advancedQuery=" + this.advancedQuerySearchKey + "&orderByStr=" + this.orderByStr;
+        },
+        searchData() {
+            this.currentPage = 1;
+            this.getData();
+        },
+        deleteRow(row) {
+            this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'error' }).then(() => {
+                return this.$http.post({
+                    url: '/customerService/del',
+                    data: { id: row.id }
+                })
+            }).then(() => {
+                this.$message.success('删除成功');
+                this.getData();
+            }).catch(action => {
+                if (action === 'cancel') {
+                    this.$message.info('删除取消');
+                } else {
+                    this.$message.error('删除失败');
+                }
+            })
+        },
+        DateTimeFormatter(row, column, cellValue) {
+            if (cellValue) {
+                return format(cellValue, 'YYYY/MM/DD HH:mm', { locale: zh })
+            }
+
+        },
+        DateFormatter(row, column, cellValue) {
+            if (cellValue) {
+                return format(cellValue, 'YYYY/MM/DD', { locale: zh })
+            }
+
+        },
+        showImg(img) {
+            this.imgSrc = img;
+            this.imageDialogVisible = true;
+        },
+
+    }
+}
+</script>
+<style lang="less" scoped>
+.container {
+    min-height: 598px;
+    background: rgba(255, 255, 255, 1);
+    border-radius: 4px;
+    border: 1px solid rgba(234, 234, 234, 1);
+    padding: 24px;
+
+    .table {
+        border-top: 1px solid #ebebeb;
+        border-right: 1px solid #ebebeb;
+        border-left: 1px solid #ebebeb;
+        margin: 0 20px;
+        width: 95%;
+    }
+
+    .pageTitle {
+        font-size: 14px;
+        font-family: MicrosoftYaHei-Bold;
+        font-weight: bold;
+        color: rgba(51, 51, 51, 1);
+        line-height: 19px;
+        padding-bottom: 9px;
+        margin-bottom: 30px;
+        border-bottom: 1px solid #ebebeb;
+        position: relative;
+
+        .add {
+            position: absolute;
+            right: 20px;
+            top: -10px;
+        }
+    }
+}
+</style>

+ 8 - 0
src/main/vue/src/pagesPre/GuaranteeMoney.vue

@@ -17,6 +17,11 @@
         </div>
         <el-form-item label-width="0px" style="margin-top:58px;">
             <el-button :loading="$store.state.fetchingData" type="primary" @click="onSave" style="width:400px">缴纳</el-button>
+
+        </el-form-item>
+        <el-form-item label-width="0px" style="margin-top:20px;" v-if="userInfo.companyFlag=='Y'">
+            <el-button @click="pass" style="width:400px;">跳过此步骤</el-button>
+
         </el-form-item>
 
         <el-dialog title="开店协议" class="xieyi" :visible.sync="dialogVisible" width="636px">
@@ -130,6 +135,9 @@ export default {
         },
         submit() {
             this.$emit('nextStep')
+        },
+        pass() {
+            this.$emit('nextStep')
         }
 
     }

+ 29 - 2
src/main/vue/src/pagesPre/Index.vue

@@ -118,6 +118,14 @@
                         <span>新订单</span>
                         <i class="el-icon-close" id='close1' @click="hideShow2=true"></i>
                     </div>
+
+                    <div class="newShop-list">
+                        <div class="newShop-item" v-for="item in orderList">
+                            <span>{{item.userInfo.nickname}}</span>
+                            <span style="color:#1BB8AC">{{getTime(item.createTime)}}</span>
+                            <span>提交了订单</span>
+                        </div>
+                    </div>
                 </div>
             </div>
 
@@ -176,7 +184,8 @@ export default {
             bannerList: [],
             serviceGoods: {},
             loading: true,
-            newShop: []
+            newShop: [],
+            orderList: []
         }
     },
     mounted() {
@@ -197,6 +206,21 @@ export default {
             console.log(e)
         })
 
+        this.$http.get({
+            url: '/userOrder/page',
+            data: {
+                pageNumber: 4,
+                currentPage: 1
+            }
+        }).then(res => {
+            if (res.success) {
+                this.orderList = res.data.pp
+            }
+        }).catch(e => {
+            console.log(e)
+
+        })
+
 
         setTimeout(() => {
             if (document.getElementById('allConatiner').offsetWidth <= 1750 && document.getElementById('allConatiner').offsetWidth > 1390) {
@@ -281,6 +305,9 @@ export default {
             name: '首页',
             href: '/'
         }]
+
+
+
         // this.$store.commit('updateHrefHistory', list)
     },
     computed: {
@@ -685,7 +712,7 @@ export default {
 
 .minRight {
     position: absolute;
-    top: 650px;
+    top: 680px;
     right: 0;
     background-color: #fff;
     border: 1px solid #ebebeb;

+ 4 - 4
src/main/vue/src/pagesPre/Login.vue

@@ -77,7 +77,7 @@
                         </el-tab-pane>
                     </el-tabs>
                     <div class="regest">
-                        <a href="#">没有账户,立即注册>></a>
+                        <router-link :to="{name:'register'}">没有账户,立即注册>></router-link>
                     </div>
 
                 </div>
@@ -130,7 +130,8 @@ export default {
                     }).then(res => {
                         this.loading = false;
                         if (res.success) {
-                            if (history.length > 2) {
+
+                            if (history.length > 2 && !this.$route.query.goIndex) {
                                 history.back()
                             }
                             else {
@@ -138,9 +139,8 @@ export default {
                                     name: 'index'
                                 })
                             }
-                            this.$router.replace('/');
                         } else {
-                            this.$message.error('登录失败');
+                            this.$message.error('用户名或密码错误');
                         }
                     }).catch(() => {
                         this.loading = false;

+ 1 - 1
src/main/vue/src/pagesPre/MemberPoint.vue

@@ -27,7 +27,7 @@
             </div>
         </div>
 
-        <el-table class="pointTable" :data="tableData" row-key="id" ref="table">
+        <el-table class="pointTable" :data="tableData" row-key="id" ref="table" style="margin-top:10px">
 
             <el-table-column prop="orderId" label="来源/用途" min-width="320" align="center">
             </el-table-column>

+ 14 - 0
src/main/vue/src/pagesPre/OrderExamine.vue

@@ -284,6 +284,20 @@ export default {
             }
         },
         submit() {
+            if (this.$route.query.repairId) {
+                this.$http.post({
+                    url: '/orderRepair/update',
+                    data: {
+                        id: this.$route.query.repairId,
+                        statusFlag: 3
+                    }
+                }).then(res => {
+                    if (res.success) {
+
+
+                    }
+                })
+            }
             this.$http.post({
                 url: '/userOrder/update',
                 data: {

+ 6 - 5
src/main/vue/src/pagesPre/OrderPreview.vue

@@ -2,7 +2,7 @@
     <div class="container">
         <div class="top" v-if="orderInfo.productInfo">
             <span>照片预览</span>
-            <span  style="margin-left:10px;">订单号:{{orderInfo.orderCode}}</span>
+            <span style="margin-left:10px;">订单号:{{orderInfo.orderCode}}</span>
             <span style="margin-left:20px;">{{orderInfo.productInfo.title}}</span>
         </div>
 
@@ -13,15 +13,16 @@
                 <img-item v-for="(item,index) in orderImage" @changeRemark="getImage" :label='"originalImage"' :index='index' :img='item' :imgStyle='"preView"' @delImg='getImage' style="display:inline-block;margin:0 30px 0 0;vertical-align: middle;"></img-item>
             </div>
 
-            <div class="imgList" style="margin-top:50px;">
+            <div class="imgList" style="margin-top:50px;" v-if="orderInfo.statusFlag>2">
                 <div class="title" style="color:#FB6E08">成<br/>片</div>
                 <img-item v-for="(item,index) in orderImage" @changeRemark="getImage" :label='"finishedImage"' :index='index' :img='item' :imgStyle='"preView"' @delImg='getImage' style="display:inline-block;margin:0 30px 0 0;vertical-align: middle;"></img-item>
             </div>
 
         </div>
-
-        <el-pagination background @current-change="currentPageChange" :current-page="currentPage" :page-size="7" layout="total, prev, pager, next" :total="totalNumber">
-        </el-pagination>
+        <div v-if='totalNumber>7'>
+            <el-pagination background @current-change="currentPageChange" :current-page="currentPage" :page-size="7" layout="total, prev, pager, next" :total="totalNumber">
+            </el-pagination>
+        </div>
 
         <div class="bottom">
             <span v-if="canUploadNum>0">当前已上传{{orderImage.length}}张图片,还需上传{{canUploadNum}}张</span>

+ 21 - 26
src/main/vue/src/pagesPre/OrderUpload.vue

@@ -3,11 +3,11 @@
         <div class="top" v-if="orderInfo.productInfo">
             <span>订单号:{{orderInfo.orderCode}}</span>
             <span style="margin-left:20px;">{{orderInfo.productInfo.title}}</span>
-            <el-button type="primary" v-if="canUploadNum>0" class="btn" @click="dialogVisible=true">上传图片</el-button>
+            <el-button type="primary" v-if="canUploadNum>0" class="btn" @click="dialogVisible=true,upLoadImg=[],addImage=[]">上传图片</el-button>
         </div>
 
         <el-dialog title="上传图片" :visible.sync="dialogVisible" width="400px">
-            <el-upload class="upload-demo" :limit='canUploadNum' drag :action="url" multiple :on-success='handleSuccess' :on-remove="handleRemove">
+            <el-upload class="upload-demo"  :file-list="upLoadImg" drag :limit="canUploadNum" :action="url" multiple :on-success='handleSuccess' :on-remove="handleRemove">
                 <i class="el-icon-upload"></i>
                 <div class="el-upload__text">将文件拖到此处,或
                     <em>点击上传</em>
@@ -25,7 +25,7 @@
             <template v-if="orderImage.length>0">
                 <div class="title">原片</div>
                 <div class="imgList">
-                    <img-item v-for="(item,index) in orderImage" @changeRemark="getImage" :canCancel='canSubmit' :label='"originalImage"' :index='index' :img='item' :imgStyle='"upload"' @delImg='getImage' style="display:inline-block;margin:0 30px 30px 0;"></img-item>
+                    <img-item v-for="(item,index) in orderImage" @changeRemark="getImage" :canCancel='canSubmit' :storeType='true' :label='"originalImage"' :index='index' :img='item' :imgStyle='"upload"' @delImg='getImage' style="display:inline-block;margin:0 30px 30px 0;"></img-item>
                 </div>
             </template>
 
@@ -80,12 +80,12 @@ export default {
     computed: {
         ...mapState(['userInfo']),
         url() {
-            return baseUrl + '/assets/uploadFile'
+            return baseUrl + '/orderImage/uploadFileForOrder?storeId=' + this.orderInfo.storeId + '&orderId=' + this.orderInfo.id + '&userId=' + this.userInfo.id + '&typeFlag=original'
         },
         allImage() {
             var list = []
             this.addImage.forEach(item => {
-                list.push(item.originalImage)
+                list.push(item.url)
             })
             return list
         },
@@ -104,7 +104,8 @@ export default {
             dialogVisible: false,
             addImage: [],
             orderImage: [],
-            canSubmit: true
+            canSubmit: true,
+            upLoadImg:[]
         }
     },
     methods: {
@@ -133,30 +134,15 @@ export default {
             var list = []
             fileList.forEach(item => {
                 item.response.data.forEach(todo => {
-                    var jsop = {
-                        originalImage: todo,
-                        remark: ''
-                    }
-                    list.push(jsop)
+                    list.push(todo)
                 })
             })
             this.addImage = list
         },
         handleSuccess(res) {
+            console.log(res)
             res.data.forEach(item => {
-                if (this.allImage.indexOf(item) == -1 && this.addImage.length <= this.canUploadNum) {
-                    var jsop = {
-                        originalImage: item,
-                        remark: ""
-                    }
-                    this.addImage.push(jsop)
-                }
-                else if (this.addImage.length > this.canUploadNum) {
-                    this.$message({
-                        message: '已经上传' + this.addImage.length + '张图片了,请预览后确认图片',
-                        type: 'warning'
-                    });
-                }
+                this.addImage.push(item)
             })
         },
         delImg(index) {
@@ -173,10 +159,12 @@ export default {
             }
             else {
                 var data = {
-                    originalImage: this.allImage[i],
+                    originalImage: this.addImage[i].url,
                     orderId: this.orderInfo.id,
                     userId: this.userInfo.id,
-                    storeId: this.orderInfo.storeId
+                    storeId: this.orderInfo.storeId,
+                    imageName: this.addImage[i].imageName,
+                    originalSize: this.addImage[i].imageSize
 
                 }
                 this.$http.post({
@@ -192,6 +180,7 @@ export default {
             }
         },
         submit() {
+
             this.$http.post({
                 url: '/userOrder/update',
                 data: {
@@ -200,6 +189,12 @@ export default {
                 }
             }).then(res => {
                 if (res.success) {
+                    this.$http.post({
+                        url: '/orderImage/delOssImage',
+                        data: {
+                            orderId: this.orderInfo.id
+                        }
+                    })
                     this.$message.success('上传图片成功');
                     history.back()
 

+ 471 - 0
src/main/vue/src/pagesPre/OrderUploadChange.vue

@@ -0,0 +1,471 @@
+<template>
+    <div class="container">
+        <div class="top" v-if="orderInfo.productInfo">
+            <span>订单号:{{orderInfo.orderCode}}</span>
+            <span style="margin-left:20px;">{{orderInfo.productInfo.title}}</span>
+            <el-select v-if="!isChange" size="mini" style="float:right;margin-top:25px;width:120px" clearable v-model="unFinished" placeholder="筛选状态" @change="getImage">
+                <el-option key="0" label="未上传" value="1">
+                </el-option>
+                <el-option key="1" label="已上传" value="0">
+                </el-option>
+            </el-select>
+            <el-button type="primary" size="mini" style="float:right;margin-top:25px;margin-right:20px" class="btn" plain @click="dialogVisible=true,upLoadImg=[],addImage=[]">批量上传</el-button>
+        </div>
+
+        <div class="content">
+
+            <template v-if="orderImage.length>0">
+                <div class="imgList">
+                    <div class="title">原<br/>片</div>
+                    <img-item v-for="(item,index) in orderImage" @changeRemark="getImage" :label='"originalImage"' :index='index' :img='item' :imgStyle='"showInfo"' @delImg='getImage' style="display:inline-block;margin:0 30px 0 0;vertical-align: middle;"></img-item>
+                </div>
+
+                <div class="imgList" style="margin-top:50px;">
+                    <div class="title" style="color:#FB6E08">成<br/>片</div>
+                    <div style="display:inline-block;vertical-align: middle" v-for="(item,index) in orderImage">
+                        <single-upload-title v-if="!item.finishedImage||item.statusFlag==2" class="box" :nowIndex='index' :url='url' @input="changeImg" :title='"上传成片"' :width='120' :height='150'>
+                        </single-upload-title>
+                        <img-item v-if="item.finishedImage" :isChange='isChange' @changeRemark="changeRemark" :label='"finishedImage"' :index='index' :img='item' :imgStyle='"storeUpload"' @delImg='getImage' style="display:inline-block;margin:0 30px 0 0;vertical-align: middle;"></img-item>
+
+                    </div>
+                </div>
+            </template>
+            <div v-else class="nothing">
+                <img src="../assetsPre/nothingImg.png" alt="">
+                <p>没有图片哦!</p>
+            </div>
+
+        </div>
+
+        <el-pagination v-if="totalNumber>7" background :page-size="7" @current-change="currentPageChange" :current-page="currentPage" layout="total, prev, pager, next" :total="totalNumber">
+        </el-pagination>
+
+        <div class="bottom">
+            <template v-if="!isChange">
+                <!-- <span v-if="canUploadNum>0">当前已上传{{orderImage.length}}张图片,还需上传{{canUploadNum}}张</span> -->
+                <span>全部{{allNumber}}张图片,还需上传{{notUp}}张</span>
+                <el-button style="float:right;margin:10px;" v-if="!notUp" type="primary" class="btn" @click="submit">提交</el-button>
+            </template>
+
+        </div>
+
+        <el-dialog title="上传图片" :visible.sync="dialogVisible" width="400px">
+            <el-upload class="upload-demo" :file-list="upLoadImg" drag :action="url" multiple :on-success='handleSuccess' :on-remove="handleRemove">
+                <i class="el-icon-upload"></i>
+                <div class="el-upload__text">将文件拖到此处,或
+                    <em>点击上传</em>
+                </div>
+                <div class="el-upload__tip" slot="tip">只能上传jpg/png文件,当前已上传{{addImage.length}}张图片,还可以上传张</div>
+            </el-upload>
+
+            <span slot="footer" class="dialog-footer">
+                <el-button @click="dialogVisible = false">取 消</el-button>
+                <el-button type="primary" @click="upload">确 定</el-button>
+            </span>
+        </el-dialog>
+
+    </div>
+</template>
+<script>
+import { mapState } from 'vuex'
+import imgItem from '../components/ImgItem'
+import formValidator from '../formValidator'
+const baseUrl = process.env.NODE_ENV === 'production' ? '../' : 'http://localhost:8080';
+export default {
+    created() {
+        this.$http.get({
+            url: '/userOrder/getOne',
+            data: {
+                id: this.$route.query.orderId
+            }
+        }).then(res => {
+            if (res.success) {
+                this.orderInfo = res.data
+
+                this.getImage()
+            }
+        })
+
+        if (this.$route.query.isChange) {
+            this.isChange = true
+        }
+
+
+
+    },
+    computed: {
+        ...mapState(['userInfo']),
+        url() {
+            return baseUrl + '/orderImage/uploadFileForOrder?storeId=' + this.orderInfo.storeId + '&orderId=' + this.orderInfo.id + '&userId=' + this.userInfo.id + '&typeFlag=finished'
+        },
+        repairNum() {
+            var num = 0
+            if (this.orderInfo.orderRepairList.length) {
+                num = this.orderInfo.orderRepairList[this.orderInfo.orderRepairList.length - 1].typeFlag + 1
+                if (this.orderInfo.orderRepairList[this.orderInfo.orderRepairList.length - 1].statusFlag != 0) {
+                    num++
+                }
+            }
+
+            return num
+        }
+    },
+    data() {
+        return {
+            orderInfo: {},
+            dialogVisible: false,
+            addImage: [],
+            orderImage: [],
+            currentPage: 1,
+            totalNumber: 0,
+            isSuccess: false,
+            isFail: false,
+            repairId: 0,
+            isChange: false,
+            unFinished: '',
+            upLoadImg: [],
+            notUp: 0,
+            allNumber: 0,
+        }
+    },
+    methods: {
+        changeRemark() {
+            if (!this.repairId) {
+                this.$http.get({
+                    url: '/userOrder/getOne',
+                    data: {
+                        id: this.$route.query.orderId
+                    }
+                }).then(res => {
+                    if (res.success) {
+                        this.orderInfo = res.data
+                        if (this.$route.query.repairId) {
+                            this.repairId = this.$route.query.repairId
+                        }
+                        else {
+                            if (this.orderInfo.orderRepairList.length > 0) {
+                                this.repairId = this.orderInfo.orderRepairList[0].id
+                            }
+
+                        }
+                        this.getImage()
+                    }
+                })
+
+
+            }
+            else {
+                this.getImage()
+            }
+        },
+        currentPageChange(page) {
+            this.currentPage = page;
+            this.getImage();
+        },
+        getImage() {
+            var data = {
+                orderId: this.$route.query.orderId,
+                currentPage: this.currentPage,
+                pageNumber: 7,
+            }
+            if (this.unFinished) {
+                data.unFinished = this.unFinished
+            }
+
+            if (this.$route.query.repairId) {
+                data.repairId = this.$route.query.repairId
+                if (data.unFinished == '1') {
+                    data.statusFlag = 2
+                }
+                else if (data.unFinished == '0') {
+                    data.statusFlag = 0
+                }
+                data.unFinished = ''
+
+            }
+
+            this.orderImage = []
+            this.$http.get({
+                url: '/orderImage/page',
+                data: data
+            }).then(res => {
+                if (res.success) {
+                    this.orderImage = res.data.pp
+                    this.totalNumber = res.data.page.totalNumber;
+                }
+            })
+            this.$http.get({
+                url: '/orderImage/all',
+                data: {
+                    orderId: this.$route.query.orderId,
+                    unFinished: this.$route.query.repairId ? '' : 1,
+                    repairId: this.$route.query.repairId,
+                    statusFlag: this.$route.query.repairId ? 2 : ''
+                }
+            }).then(res => {
+                this.notUp = res.data.length
+            })
+
+            this.$http.get({
+                url: '/orderImage/page',
+                data: {
+                    orderId: this.$route.query.orderId,
+                    currentPage: 1,
+                    pageNumber: 1,
+                    repairId: this.$route.query.repairId,
+                }
+            }).then(res => {
+                if (res.success) {
+
+                    this.allNumber = res.data.page.totalNumber;
+                }
+            })
+        },
+        chooseImg(index) {
+            console.log(index)
+        },
+        handleRemove(file, fileList) {
+            console.log(file, fileList);
+            var list = []
+            fileList.forEach(item => {
+                item.response.data.forEach(todo => {
+                    var jsop = {
+                        originalImage: todo,
+                        remark: ''
+                    }
+                    list.push(jsop)
+                })
+            })
+            this.addImage = list
+        },
+        handleSuccess(res) {
+            res.data.forEach(item => {
+                this.addImage.push(item)
+            })
+        },
+        delImg(index) {
+            this.addImage.splice(index, 1)
+        },
+        upload() {
+            const loading = this.$loading({
+                lock: true,
+                text: '加载中',
+            });
+            var id = []
+            this.addImage.forEach(item => {
+                id.push(item.id)
+            })
+            this.$http.post({
+                url: '/orderImage/updateFinishedImages',
+                data: {
+                    imageIds: id.toString(),
+                    orderId: this.orderInfo.id
+                }
+            }).then(res => {
+                if (res.success) {
+                    loading.close();
+                    this.$message.success('成功');
+                    this.dialogVisible = false
+                    this.getImage()
+                } else {
+                    this.$message.warning('失败')
+                }
+            });
+        },
+        saveImage(i) {
+            if (i == this.allImage.length) {
+                this.$message.success('成功');
+                this.dialogVisible = false
+                this.getImage()
+            }
+            else {
+                var data = {
+                    originalImage: this.allImage[i],
+                    orderId: this.orderInfo.id,
+                    userId: this.userInfo.id,
+                    storeId: this.orderInfo.storeId
+
+                }
+                this.$http.post({
+                    url: '/orderImage/save',
+                    data: data
+                }).then(res => {
+                    if (res.success) {
+                        this.saveImage(i + 1)
+                    } else {
+                        this.$message.warning('失败')
+                    }
+                });
+            }
+        },
+        submit() {
+            this.$http.post({
+                url: '/orderImage/delOssImage',
+                data: {
+                    orderId: this.orderInfo.id
+                }
+            })
+            if (this.$route.query.repairId) {
+                if (this.orderInfo.orderRepairList.length == 3) {
+                    this.$http.post({
+                        url: '/orderRepair/update',
+                        data: {
+                            id: this.$route.query.repairId,
+                            statusFlag: 3
+                        }
+                    }).then(res => {
+                        if (res.success) {
+                            this.$http.post({
+                                url: '/userOrder/update',
+                                data: {
+                                    id: this.orderInfo.id,
+                                    statusFlag: 5
+                                }
+                            }).then(res2 => {
+                                if (res2.success) {
+                                    this.$message.success('提交成功');
+                                    history.back()
+
+                                }
+                            })
+                        }
+                    })
+                }
+                else {
+                    this.$http.post({
+                        url: '/orderRepair/update',
+                        data: {
+                            id: this.$route.query.repairId,
+                            statusFlag: 2
+                        }
+                    }).then(res => {
+                        if (res.success) {
+                            this.$message.success('提交成功');
+                            history.back()
+
+                        }
+                    })
+                }
+
+            }
+            else {
+                this.$http.post({
+                    url: '/userOrder/update',
+                    data: {
+                        id: this.orderInfo.id,
+                        statusFlag: 3
+                    }
+                }).then(res => {
+                    if (res.success) {
+                        this.$message.success('提交成功');
+                        history.back()
+
+                    }
+                })
+            }
+
+        },
+        changeImg(newVal) {
+            this.updateImg(newVal.index, newVal.img.url, newVal.img.imageSize)
+        },
+        updateImg(index, img, size) {
+            this.$http.post({
+                url: '/orderImage/update',
+                data: {
+                    id: this.orderImage[index].id,
+                    finishedImage: img,
+                    finishedSize: size,
+                    statusFlag: 0
+                }
+            }).then(res => {
+                if (res.success) {
+                    this.getImage()
+                    this.$message.success('提交成功');
+                }
+            })
+        }
+    },
+    components: {
+        imgItem
+    }
+}
+</script>
+<style lang="less" scoped>
+.container {
+    background: rgba(255, 255, 255, 1);
+    border-bottom: 1px solid rgba(234, 234, 234, 1);
+    .top {
+        height: 78px;
+        background: rgba(255, 255, 255, 1);
+        border: 1px solid rgba(234, 234, 234, 1);
+        padding: 0 30px;
+        span {
+            font-size: 18px;
+            font-family: MicrosoftYaHei;
+            color: rgba(51, 51, 51, 1);
+            line-height: 78px;
+        }
+        .btn {
+            float: right;
+            margin-top: 20px;
+        }
+    }
+
+    .content {
+        padding: 0 30px;
+        min-height: 450px;
+        .title {
+            font-size: 14px;
+            font-family: MicrosoftYaHei-Bold;
+            font-weight: bold;
+            color: rgba(11, 158, 192, 1);
+            line-height: 19px;
+            margin-bottom: 20px;
+            display: inline-block;
+            vertical-align: middle;
+            margin-right: 20px;
+        }
+
+        .imgList {
+            margin-top: 20px;
+        }
+    }
+
+    .bottom {
+        height: 58px;
+        border-top: 1px solid rgba(234, 234, 234, 1);
+        line-height: 58px;
+        padding: 0 30px;
+        margin-top: 20px;
+        span {
+            font-size: 14px;
+            color: #999;
+        }
+    }
+
+    .nothing {
+        margin-top: 20px;
+        img {
+            width: 167px;
+            height: 167px;
+            display: block;
+            margin: auto;
+        }
+
+        p {
+            font-size: 14px;
+            text-align: center;
+            color: rgba(51, 51, 51, 1);
+            line-height: 19px;
+            margin-top: 24px;
+        }
+    }
+
+    .box {
+        width: 120px;
+        height: 150px;
+        margin-right: 30px;
+        border-radius: 4px;
+    }
+}
+</style>

+ 2 - 2
src/main/vue/src/pagesPre/Product.vue

@@ -27,8 +27,8 @@
                     <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-if="item.maxCounts&&(item.minCounts||item.minCounts==0)">{{item.minCounts}}-{{item.maxCounts}}张</div>
+                        <div class="price-text" v-else-if='item.minCounts||item.minCounts==0'>{{item.minCounts}}张以上</div>
                         <div class="price-text" v-else-if='item.maxCounts'>{{item.maxCounts}}张以下</div>
                     </div>
 

+ 415 - 0
src/main/vue/src/pagesPre/ProductInfo.vue

@@ -0,0 +1,415 @@
+<template>
+    <div class="container">
+        <el-form :model="formData" :rules="rules" ref="form" label-width="80px" label-position="right" size="small" style="max-width: 800px;">
+
+            <!-- <el-form-item prop="storeId" label="店铺">
+                <el-input v-model="formData.storeId" :disabled="'storeId'==subColumn"></el-input>
+            </el-form-item> -->
+            <el-form-item prop="typeFlag" label="类型" style="max-width:400px">
+                <template>
+                    <el-select v-model="formData.typeFlag" clearable placeholder="请选择">
+                        <el-option v-for="item in typeFlagOptions" :key="item.value" :label="item.label" :value="item.value">
+                        </el-option>
+                    </el-select>
+                </template>
+            </el-form-item>
+
+            <!-- <el-form-item prop="serviceType" label="服务大类">
+                <el-select v-model="formData.serviceType" filterable placeholder="请选择" size="small">
+                    <el-option v-for="item in serviceTypes" :key="item.id" :label="item.shortName" :value="item.id">
+                    </el-option>
+                </el-select>
+
+            </el-form-item>
+
+            <el-form-item prop="subclass" label="服务小类">
+                <el-select v-model="formData.subclass" filterable placeholder="请选择" size="small">
+                    <el-option v-for="item in serviceTypeDetails[formData.serviceType]" :key="item.id" :label="item.typeName" :value="item.id">
+                    </el-option>
+                </el-select>
+
+            </el-form-item> -->
+
+            <el-form-item prop="title" label="标题" style="max-width:400px">
+                <el-input v-model="formData.title" :disabled="'title'==subColumn"></el-input>
+            </el-form-item>
+            <el-form-item prop="image" label="主图">
+                <single-upload v-model="formData.image" :disabled="'image'==subColumn"></single-upload>
+            </el-form-item>
+            <el-form-item prop="serviceDetail" label="服务详情" style="max-width:400px">
+                <el-input type="textarea" v-model="formData.serviceDetail" :disabled="'serviceDetail'==subColumn"></el-input>
+            </el-form-item>
+            <el-form-item prop="inventory" label="库存" style="max-width:400px">
+                <el-input v-model="formData.inventory" :disabled="'inventory'==subColumn"></el-input>
+            </el-form-item>
+            <el-form-item prop="price" label="默认价格">
+                <el-input-number v-model="formData.price" :min="0"></el-input-number>
+                <template v-if="levelNum.length<3">
+                    <el-button type="danger" icon="el-icon-plus" @click="addLevel" circle plain size="mini" style="margin-left:20px"></el-button>
+                    <span style="font-size:12px;color:#999;margin-left:5px;">添加梯级价格</span>
+
+                </template>
+                <span style="font-size:12px;color:rgb(255, 73, 73);margin-left:5px;">(阶梯价格提交时,最后一项的最大值会自动清空)</span>
+
+                <el-table v-if="levelNum.length>0" :data="levelNum" style="width: 100%">
+                    <el-table-column prop="name" label="名称" align="center">
+                        <template slot-scope="scope">
+                            <el-input v-model="scope.row.name" size="mini" style="width:100%"></el-input>
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="price" label="价格" align="center">
+                        <template slot-scope="scope">
+                            <el-input-number v-model="scope.row.price" :min="0" size="mini" style="width:100%"></el-input-number>
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="minCounts" label="最小值" align="center">
+                        <template slot-scope="scope">
+                            <el-input-number v-model="scope.row.minCounts" :disabled="true" size="mini" :min="getMini(scope.$index)" style="width:100%"></el-input-number>
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="maxCounts" label="最大值" align="center">
+                        <template slot-scope="scope">
+                            <el-input-number v-model="scope.row.maxCounts" @change='changeLevel(scope.$index)' size="mini" :min="scope.row.minCounts+1" style="width:100%"></el-input-number>
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="maxCounts" label="操作" align="center">
+                        <template slot-scope="scope">
+                            <el-button type="danger" @click="delLevel(scope.$index)" icon="el-icon-delete" circle plain size="mini"></el-button>
+                        </template>
+                    </el-table-column>
+                </el-table>
+            </el-form-item>
+            <el-form-item label="详情图片">
+                <el-upload :action="url" :file-list="fileList" list-type="picture-card" :on-success="handleSuccess" :on-remove="handleRemove">
+                    <i class="el-icon-plus"></i>
+                </el-upload>
+            </el-form-item>
+            <el-form-item prop="onShelf" label="上下架">
+                <el-switch v-model="formData.onShelf" active-color="#13ce66" inactive-color="#ff4949" :disabled="'onShelf'==subColumn">
+                </el-switch>
+            </el-form-item>
+            <!-- <el-form-item prop="useFlag" label="可用">
+                <el-switch v-model="formData.useFlag" active-color="#13ce66" inactive-color="#ff4949" :disabled="'useFlag'==subColumn">
+                </el-switch>
+            </el-form-item> -->
+            <!-- <el-form-item prop="hotFlag" label="热门">
+                <el-switch v-model="formData.hotFlag" active-color="#13ce66" inactive-color="#ff4949" :disabled="'hotFlag'==subColumn">
+                </el-switch>
+            </el-form-item>
+            <el-form-item prop="homeFlag" label="首页">
+                <el-switch v-model="formData.homeFlag" active-color="#13ce66" inactive-color="#ff4949" :disabled="'homeFlag'==subColumn">
+                </el-switch>
+            </el-form-item> -->
+            <!-- <el-form-item prop="rank" label="排序">
+                <el-input v-model="formData.rank" :disabled="'rank'==subColumn"></el-input>
+            </el-form-item> -->
+
+            <!-- <el-form-item prop="salesVolume" label="销量">
+                <el-input v-model="formData.salesVolume" :disabled="'salesVolume'==subColumn"></el-input>
+            </el-form-item>-->
+
+            <el-form-item>
+                <el-button @click="onSave" :loading="$store.state.fetchingData" type="primary">保存</el-button>
+                <el-button @click="onDelete" v-if="formData.id" type="danger">删除</el-button>
+                <el-button @click="$router.go(-1)">取消</el-button>
+            </el-form-item>
+        </el-form>
+    </div>
+</template>
+<script>
+import { mapState } from 'vuex'
+import formValidator from '../formValidator'
+const baseUrl = process.env.NODE_ENV === 'production' ? '../' : 'http://localhost:8080';
+export default {
+    created() {
+
+        if (this.$route.query.id) {
+            this.$http.get({
+                url: '/productInfo/getOne',
+                data: {
+                    id: this.$route.query.id
+                }
+            }).then(res => {
+                if (res.success) {
+
+
+                    this.formData = res.data;
+                    this.levelNum = res.data.productPriceList
+                    res.data.productImageList.forEach(item => {
+                        item.url = item.image
+                    })
+                    this.fileList = res.data.productImageList
+
+
+                    this.formData.hotFlag = this.formData.hotFlag == 1 ? true : false;
+                    this.formData.homeFlag = this.formData.homeFlag == 1 ? true : false;
+                    this.formData.useFlag = this.formData.useFlag == 'Y' ? true : false;
+                    this.formData.onShelf = this.formData.onShelf == 'Y' ? true : false;
+
+
+                }
+            })
+        }
+
+
+        this.$http.get({
+            url: '/serviceType/all'
+        }).then(res => {
+            if (res.success) {
+                this.serviceTypes = res.data;
+
+                this.serviceTypes.forEach(element => {
+
+                    this.serviceTypeDetails[element.id] = element.serviceTypeDetailList
+
+                });
+            }
+        });
+
+        this.formData.storeId = this.myStoreInfo.id
+        this.formData.serviceType = this.myStoreInfo.serviceType
+        this.formData.subclass = this.myStoreInfo.subclass
+
+    },
+    data() {
+        return {
+            saving: false,
+            formData: {
+                typeFlag: 0,
+                rank: 0,
+                responseTime: 0,
+                reworkRate: 0,
+                useFlag: true,
+                serviceType: 1,
+                onShelf: false,
+                price: 0
+            },
+            rules: {
+            },
+            subColumn: '',
+            subValue: '',
+            serviceTypes: [],
+            serviceTypeDetails: {},
+            typeFlagOptions: [{ label: '修图', value: 0 }, { label: '实体商品', value: 1 }],
+            levelNum: [],
+            fileList: []
+        }
+    },
+    computed: {
+        ...mapState(['userInfo', 'myStoreInfo']),
+        url() {
+            return baseUrl + '/assets/uploadFile'
+        }
+    },
+    methods: {
+        onSave() {
+            this.$refs.form.validate((valid) => {
+                if (valid) {
+                    this.submit();
+                } else {
+                    return false;
+                }
+            });
+        },
+        submit() {
+            var data = JSON.parse(JSON.stringify(this.formData));
+
+            delete data.productImageList
+            delete data.productPriceList
+            delete data.storeInfo
+
+            data.hotFlag = this.formData.hotFlag ? 1 : 0;
+            data.homeFlag = this.formData.homeFlag ? 1 : 0;
+            data.useFlag = this.formData.useFlag ? 'Y' : 'N';
+            data.onShelf = this.formData.onShelf ? 'Y' : 'N';
+
+            console.log(data)
+            this.$http.post({
+                url: this.formData.id ? '/productInfo/update' : '/productInfo/save',
+                data: data
+            }).then(res => {
+                if (res.success) {
+                    this.savePrice(0, this.formData.id ? this.formData.id : res.data)
+                    this.saveImage(0, this.formData.id ? this.formData.id : res.data)
+                    this.$message.success('成功');
+                    this.$router.go(-1);
+                } else {
+                    this.$message.warning('失败')
+                }
+            });
+        },
+        savePrice(index, id) {
+            if (index >= this.levelNum.length) {
+                return
+            }
+            else {
+                var data = JSON.parse(JSON.stringify(this.levelNum[index]));
+                data.productId = id
+                data.typeFlag = index
+                if (index == this.levelNum.length - 1) {
+                    data.maxCounts =-1
+                }
+                this.$http.post({
+                    url: data.id ? '/productPrice/update' : '/productPrice/save',
+                    data: data
+                }).then(res => {
+                    if (res.success) {
+                        this.savePrice(index + 1, id)
+                    } else {
+                        this.$message.warning('失败')
+                    }
+                })
+            }
+        },
+        saveImage(index, id) {
+            if (index >= this.fileList.length) {
+                return
+            }
+            else if (!this.fileList[index].id) {
+                var data = JSON.parse(JSON.stringify(this.fileList[index]));
+                data.productId = id
+                delete data.url
+                this.$http.post({
+                    url: '/productImage/save',
+                    data: data
+                }).then(res => {
+                    if (res.success) {
+                        this.saveImage(index + 1, id)
+                    } else {
+                        this.$message.warning('失败')
+                    }
+                })
+            }
+            else {
+                this.saveImage(index + 1, id)
+            }
+        },
+        onDelete() {
+            this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'error' }).then(() => {
+                return this.$http.post({
+                    url: '/productInfo/del',
+                    data: { id: this.formData.id }
+                })
+            }).then(() => {
+                this.$message.success('删除成功');
+                this.$router.go(-1);
+            }).catch(action => {
+                if (action === 'cancel') {
+                    this.$message.info('删除取消');
+                } else {
+                    this.$message.error('删除失败');
+                }
+            })
+        },
+        addLevel() {
+            if (this.levelNum.length > 0) {
+                if (!this.levelNum[this.levelNum.length - 1].maxCounts) {
+                    this.$message({
+                        message: '最后一项最大值未输入不能添加新的阶梯价格',
+                        type: 'warning'
+                    });
+                    return
+                }
+            }
+            this.levelNum.push({
+                name: '',
+                price: '',
+                minCounts: '',
+                maxCounts: ''
+            })
+        },
+        changeLevel(index) {
+            if (index < this.levelNum.length - 1) {
+                if (!this.levelNum[index].maxCounts) {
+                    // this.levelNum[index].maxCounts = Number(this.levelNum[index + 1].minCounts) - 1
+                    var jsonp = { ...this.levelNum[index] }
+                    jsonp.maxCounts = Number(this.levelNum[index + 1].minCounts) - 1
+                    this.$set(this.levelNum, index, jsonp)
+                    this.$message({
+                        message: '当前并不是最后一项不能清空最大值',
+                        type: 'warning'
+                    });
+
+                    return
+                }
+                else {
+                    this.levelNum[index + 1].minCounts = this.levelNum[index].maxCounts + 1
+                }
+            }
+        },
+        delLevel(index) {
+
+
+            if (this.levelNum[index].id) {
+                this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'error' }).then(() => {
+                    return this.$http.post({
+                        url: '/productPrice/del',
+                        data: { id: this.levelNum[index].id }
+                    })
+                }).then(() => {
+                    this.$message.success('删除成功');
+                    this.levelNum.splice(index, 1)
+                }).catch(action => {
+                    if (action === 'cancel') {
+                    } else {
+                        this.$message.error('删除失败');
+                    }
+                })
+            }
+            else {
+                this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'error' }).then(() => {
+                    this.levelNum.splice(index, 1)
+                    this.$message.success('删除成功');
+                }).catch(action => {
+                    if (action === 'cancel') {
+                    } else {
+                        this.$message.error('删除失败');
+                    }
+                })
+
+            }
+
+        },
+        handleSuccess(response) {
+            console.log(response)
+            var jsonp = {
+                image: response.data[0],
+                url: response.data[0]
+            }
+            this.fileList.push(jsonp)
+        },
+        handleRemove(file, fileList) {
+            console.log(file)
+            if (file.id) {
+                this.$http.post({
+                    url: '/productImage/del',
+                    data: { id: file.id }
+                }).then(() => {
+                    this.$message.success('删除成功');
+                }).catch(action => {
+
+                })
+            }
+
+
+            this.fileList = fileList
+        },
+        getMini(index) {
+            if (index == 0) {
+                return 0
+            }
+            else {
+                return Number(this.levelNum[index - 1].maxCounts) + 1
+            }
+        }
+    }
+}
+</script>
+<style lang="less" scoped>
+.container {
+    background-color: #fff;
+    padding: 20px;
+    border-radius: 4px;
+    border: 1px solid rgba(234, 234, 234, 1);
+}
+</style>

+ 375 - 77
src/main/vue/src/pagesPre/Register.vue

@@ -2,27 +2,81 @@
     <div style="padding:0 34px 0 20px;">
         <el-tabs v-model="activeName">
             <el-tab-pane label="商家注册" name="first">
+                <el-form v-if="!isSuccess1" :model="formData" :rules="rules1" ref="form1" label-width="100px" label-position="right" size="small" style="max-width: 420px;margin-top:20px;">
+                    <el-form-item prop="username" label="用户名">
+                        <el-input v-model="formData.username" placeholder="请输入用户名" maxlength="10" style="width:204px;"></el-input>
+                    </el-form-item>
+                    <el-form-item prop="password" label="设置密码">
+                        <el-input type="password" name='psd' placeholder="6-11位的字母或者数字(必须包含数字字母的组合)" v-model="formData.password" maxlength="11"></el-input>
+                    </el-form-item>
+                    <el-form-item prop="surePassword" label="确认密码">
+                        <el-input type="password" name='surepsd' placeholder="请重复输入密码" v-model="formData.surePassword" maxlength="11"></el-input>
+                    </el-form-item>
+                    <el-form-item prop="contacter" label="联系人">
+                        <el-input placeholder="请重复输入密码" v-model="formData.contacter" maxlength="8"></el-input>
+                    </el-form-item>
+                    <el-form-item prop="contactPhone" label="联系人电话">
+                        <el-input v-model="formData.contactPhone" placeholder="请输入手机号码" maxlength="11"></el-input>
+                    </el-form-item>
+                    <el-form-item prop="code" label="短信验证码">
+                        <el-input v-model="formData.code" placeholder="请输入验证码" style="width:204px;"></el-input>
+                        <el-button plain style="width:110px;" @click="startSend">{{isSend?'已发送('+startNum+'S)':'获取验证码'}}</el-button>
+                    </el-form-item>
+                    <el-form-item prop="companyName" label="企业名称">
+                        <el-input v-model="formData.companyName" placeholder="请输入企业名称" maxlength="20"></el-input>
+                    </el-form-item>
+                    <el-form-item prop="companyType" label="企业类型">
+                        <el-select v-model="formData.companyType" placeholder="请选择">
+                            <el-option v-for="item in companyTypeList" :key="item.id" :label="item.typeName" :value="item.typeName">
+                            </el-option>
+                        </el-select>
+                    </el-form-item>
+
+                    <el-form-item prop="isRead" label="">
+                        <el-checkbox v-model="formData.isRead">已阅读</el-checkbox>
+                        <el-button type="text" style="color:#FB6E08">《用户隐私协议和隐私条款》</el-button>
+                    </el-form-item>
+
+                    <el-form-item label="">
+                        <el-button type="primary" style="width:204px" @click="onSave">立即注册</el-button>
+                    </el-form-item>
+
+                </el-form>
+
+                <systemState v-else class="certain" :next='"login"' :type='"success"' :title="'注册成功!'" :subtitle='"请牢记您的用户名和密码,即可登陆。缴纳保证金后也可开店~"'></systemState>
 
             </el-tab-pane>
             <el-tab-pane label="个人注册" name="second">
-                <el-form :model="formData" :rules="rules" ref="form" label-width="80px" label-position="right" size="small" style="max-width: 500px;">
+                <el-form v-if="!isSuccess" :model="formData" :rules="rules" ref="form" label-width="100px" label-position="right" size="small" style="max-width: 420px;margin-top:20px;">
                     <el-form-item prop="username" label="用户名">
-                        <el-input v-model="formData.username"></el-input>
+                        <el-input v-model="formData.username" placeholder="请输入用户名" maxlength="10" style="width:204px;"></el-input>
                     </el-form-item>
-                    <el-form-item prop="password" label="密码">
-                        <el-input v-model="formData.password"></el-input>
+                    <el-form-item prop="password" label="设置密码">
+                        <el-input type="password" name='psd' placeholder="6-11位的字母或者数字(必须包含数字字母的组合)" v-model="formData.password" maxlength="11"></el-input>
                     </el-form-item>
                     <el-form-item prop="surePassword" label="确认密码">
-                        <el-input v-model="surePassword"></el-input>
+                        <el-input type="password" name='surepsd' placeholder="请重复输入密码" v-model="formData.surePassword" maxlength="11"></el-input>
+                    </el-form-item>
+                    <el-form-item prop="phone" label="手机号码">
+                        <el-input v-model="formData.phone" placeholder="请输入手机号码" maxlength="11"></el-input>
                     </el-form-item>
-                    <el-form-item prop="phone" label="手机">
-                        <el-input v-model="formData.phone"></el-input>
+                    <el-form-item prop="code" label="短信验证码">
+                        <el-input v-model="formData.code" placeholder="请输入验证码" style="width:204px;"></el-input>
+                        <el-button plain style="width:110px;" @click="startSend">{{isSend?'已发送('+startNum+'S)':'获取验证码'}}</el-button>
+                    </el-form-item>
+
+                    <el-form-item prop="isRead" label="">
+                        <el-checkbox v-model="formData.isRead">已阅读</el-checkbox>
+                        <el-button type="text" style="color:#FB6E08">《用户隐私协议和隐私条款》</el-button>
                     </el-form-item>
-                     <el-form-item prop="code" label="验证码">
-                        <el-input v-model="code"></el-input>
+
+                    <el-form-item label="">
+                        <el-button type="primary" style="width:204px" @click="onSave">立即注册</el-button>
                     </el-form-item>
 
                 </el-form>
+
+                <systemState v-else class="certain" :next='"login"' :type='"success"' :title="'注册成功!'" :subtitle='"请牢记您的用户名和密码,即可登陆。缴纳保证金后也可开店~"'></systemState>
             </el-tab-pane>
         </el-tabs>
 
@@ -30,68 +84,75 @@
 </template>
 <script>
 import formValidator from '../formValidator'
+import systemState from '../pagesPre/SystemState'
 
 export default {
     created() {
-        if (this.$route.query.id) {
-            this.$http.get({
-                url: '/userInfo/getOne',
-                data: {
-                    id: this.$route.query.id
-                }
-            }).then(res => {
-                if (res.success) {
-                    res.data.roleId = res.data.roleId ? res.data.roleId.split(',').map(i => Number(i)) : [];
-                    res.data.departId = res.data.departId ? res.data.departId.split(',') : [];
-                    this.formData = res.data;
-                }
-            })
-        }
-        this.$http.get({
-            url: '/sysRole/all'
-        }).then(res => {
-            if (res.success) {
-                this.roles = res.data;
-            }
-        });
+
         this.$http.get({
-            url: '/departInfo/departTree'
+            url: '/companyType/all'
         }).then(res => {
             if (res.success) {
-                const parse = (trees) => {
-                    trees.sort((a, b) => {
-                        return a.extra.sort - b.extra.sort;
-                    });
-                    return trees.map(i => {
-                        let t = {
-                            value: i.id,
-                            label: i.name,
-                            parentId: i.parentId,
-                            extra: i.extra
-                        };
-                        if (i.children instanceof Array) {
-                            t.children = parse(i.children);
-                        }
-                        return t;
-                    });
-                };
-                this.departs = parse(res.data);
+                this.companyTypeList = res.data
             }
         });
     },
     data() {
         return {
-            activeName: 'second',
+            companyTypeList: [],
+            activeName: 'first',
             saving: false,
             formData: {
-                departId: []
+                isRead: false,
             },
             rules: {
-                icon: [
-                    { required: true, message: '请上传头像', trigger: 'blur' },
-                ],
                 username: [
-                    { required: true, message: '请输入昵称', trigger: 'blur' },
+                    { required: true, message: '请输入用户名', trigger: 'blur' },
+                    {
+                        validator: (rule, value, callback) => {
+                            if (!value) {
+                                callback(new Error('请输入用户名'));
+                            } else {
+                                this.checkHas({ username: this.formData.username }).then((result) => {
+                                    if (result) {
+                                        callback(new Error('已存在该用户名'));
+                                    }
+                                    else {
+                                        callback();
+                                    }
+                                })
+                            }
+                        }, trigger: 'blur'
+                    }
+                ],
+                password: [
+                    { required: true, message: '请输入密码', trigger: 'blur' },
+                    {
+
+                        validator: (rule, value, callback) => {
+                            if (!value) {
+                                callback(new Error('请输入密码'));
+                            } else if (/^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,11}$/.test(value)) {
+                                callback();
+                            } else {
+                                callback(new Error('6-11位的字母或者数字(必须包含数字字母的组合)'));
+                            }
+                        }, trigger: 'blur'
+                    }
+                ],
+                surePassword: [
+                    { required: true, message: '请输入确认密码', trigger: 'blur' },
+                    {
+                        validator: (rule, value, callback) => {
+                            if (!value) {
+                                callback(new Error('请输入确认密码'));
+                            } else if (value == this.formData.password) {
+                                callback();
+                            } else {
+                                callback(new Error('两次密码输入不一致!'));
+                            }
+                        }, trigger: 'blur'
+                    }
                 ],
                 phone: [
                     { required: true, message: '请输入手机号', trigger: 'blur' },
@@ -107,40 +168,277 @@ export default {
                         }, trigger: 'blur'
                     }
                 ],
-                roleId: [
-                    { required: true, message: '请选择角色', trigger: 'blur' },
-                ]
+                code: [
+                    { required: true, message: '请输入短信验证码', trigger: 'blur' },
+                ],
+                isRead: [{
+                    validator: (rule, value, callback) => {
+                        if (!value) {
+                            callback(new Error('请阅读并同意协议'));
+                        } else {
+                            callback();
+                        }
+                    }, trigger: 'blur'
+                }]
+            },
+            rules1: {
+                username: [
+                    { required: true, message: '请输入用户名', trigger: 'blur' },
+                    {
+                        validator: (rule, value, callback) => {
+                            if (!value) {
+                                callback(new Error('请输入用户名'));
+                            } else {
+                                this.checkHas({ username: this.formData.username }).then((result) => {
+                                    if (result) {
+                                        callback(new Error('已存在该用户名'));
+                                    }
+                                    else {
+                                        callback();
+                                    }
+                                })
+                            }
+                        }, trigger: 'blur'
+                    }
+                ],
+                password: [
+                    { required: true, message: '请输入密码', trigger: 'blur' },
+                    {
+
+                        validator: (rule, value, callback) => {
+                            if (!value) {
+                                callback(new Error('请输入密码'));
+                            } else if (/^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,11}$/.test(value)) {
+                                callback();
+                            } else {
+                                callback(new Error('6-11位的字母或者数字(必须包含数字字母的组合)'));
+                            }
+                        }, trigger: 'blur'
+                    }
+                ],
+                surePassword: [
+                    { required: true, message: '请输入确认密码', trigger: 'blur' },
+                    {
+                        validator: (rule, value, callback) => {
+                            if (!value) {
+                                callback(new Error('请输入确认密码'));
+                            } else if (value == this.formData.password) {
+                                callback();
+                            } else {
+                                callback(new Error('两次密码输入不一致!'));
+                            }
+                        }, trigger: 'blur'
+                    }
+                ],
+                contacter: [
+                    { required: true, message: '请输入联系人', trigger: 'blur' }
+                ],
+                contactPhone: [
+                    { required: true, message: '请输入手机号', trigger: 'blur' },
+                    {
+                        validator: (rule, value, callback) => {
+                            if (!value) {
+                                callback(new Error('请输入手机号'));
+                            } else if (/^1[3-9]\d{9}$/.test(value)) {
+                                callback();
+                            } else {
+                                callback(new Error('请输入正确的手机号'));
+                            }
+                        }, trigger: 'blur'
+                    }
+                ],
+                companyName: [
+                    { required: true, message: '请输入公司名称', trigger: 'blur' },
+                ],
+                companyType: [
+                    { required: true, message: '请选择公司类型', trigger: 'blur' },
+                ],
+                code: [
+                    { required: true, message: '请输入短信验证码', trigger: 'blur' },
+                ],
+                isRead: [{
+                    validator: (rule, value, callback) => {
+                        if (!value) {
+                            callback(new Error('请阅读并同意协议'));
+                        } else {
+                            callback();
+                        }
+                    }, trigger: 'blur'
+                }]
             },
             roles: [],
             departs: [],
+            backCode: '',
+            startNum: 60,
+            isSend: false,
+            isSuccess: false,
+            isSuccess1: false
         }
     },
     methods: {
         onSave() {
-            this.$refs.form.validate((valid) => {
-                if (valid) {
-                    this.submit();
-                } else {
-                    return false;
-                }
-            });
+            if (this.activeName == 'first') {
+                this.$refs.form1.validate((valid) => {
+                    if (valid) {
+                        this.checkMes().then((result) => {
+                            console.log(result)
+                            if (result) {
+                                this.submit();
+                            }
+                        })
+
+                    } else {
+                        return false;
+                    }
+                });
+            }
+            else {
+                this.$refs.form.validate((valid) => {
+                    if (valid) {
+                        this.checkMes().then((result) => {
+                            console.log(result)
+                            if (result) {
+                                this.submit();
+                            }
+                        })
+
+                    } else {
+                        return false;
+                    }
+                });
+            }
+
         },
         submit() {
-            var data = JSON.parse(JSON.stringify(this.formData));
-            this.$http.post({
-                url: this.formData.id ? '/userInfo/update' : '/userInfo/save',
-                data: data
-            }).then(res => {
-                if (res.success) {
-                    this.$message.success('成功');
-                    this.$router.go(-1);
-                } else {
-                    this.$message.warning('失败')
+            if (this.activeName == 'second') {
+                this.$http.post({
+                    url: '/userInfo/register',
+                    data: {
+                        username: this.formData.username,
+                        nickname: this.formData.username,
+                        password: this.formData.password,
+                        phone: this.formData.phone
+                    }
+                }).then(res => {
+                    if (res.success) {
+                        this.$message.success('成功');
+                        this.isSuccess = true
+                    } else {
+                        this.$message.warning('失败')
+                    }
+                });
+            }
+            else {
+
+                this.$http.post({
+                    url: '/userInfo/register',
+                    data: {
+                        username: this.formData.username,
+                        nickname: this.formData.username,
+                        password: this.formData.password,
+                        phone: this.formData.contactPhone,
+                        contacter: this.formData.contacter,
+                        companyName: this.formData.companyName,
+                        companyType: this.formData.companyType,
+                        contactPhone: this.formData.contactPhone,
+                        companyType:'Y'
+
+                    }
+                }).then(res => {
+                    if (res.success) {
+                        this.$message.success('成功');
+                        this.isSuccess1 = true
+                    } else {
+                        this.$message.warning('失败')
+                    }
+                });
+            }
+
+
+        },
+        startSend() {
+            if (!this.checkPhone(this.formData.phone) && this.activeName == 'second') {
+                this.$message.warning('手机号格式错误')
+                return
+            }
+            else if (!this.checkPhone(this.formData.contactPhone) && this.activeName == 'first') {
+                this.$message.warning('手机号格式错误')
+                return
+            }
+
+
+            this.checkHas({ phone: (this.activeName == 'first' ? this.formData.contactPhone : this.formData.phone) }).then((result) => {
+                console.log(result)
+                if (result) {
+                    this.$message.warning('该手机号已经被用户绑定')
                 }
-            });
-        }
+                else {
+                    this.sendMeg(this.activeName == 'first' ? this.formData.contactPhone : this.formData.phone).then((json) => {
+                        if (json.success) {
+                            this.$message.success('发送成功')
+                            this.backCode = json.data
+                            this.startNum = 61
+                            this.isSend = true
+                            this.setTime()
+                        }
+                        else {
+                            this.$message.warning(json.error)
+                        }
+                    })
+                }
+            })
+
+
+        },
+        setTime() {
+            if (this.startNum == 0) {
+                this.isSend = false
+                return
+            }
+            this.startNum--
+            setTimeout(() => {
+                this.setTime()
+            }, 1000)
+        },
+        checkMes() {
+            return new Promise((resolve, reject) => {
+                if (!this.backCode) {
+                    this.$message.warning('请发送验证码')
+                    resolve(false)
+                }
+                else if (!this.formData.code) {
+                    this.$message.warning('请输入验证码')
+                    resolve(false)
+                }
+                else {
+                    this.$http.get({
+                        url: '/rong/verifyCode',
+                        data: {
+                            sessionId: this.backCode,
+                            code: this.formData.code
+                        }
+                    }).then(res => {
+                        if (res.success) {
+                            resolve(true)
+                        } else {
+                            this.$message.warning(res.error)
+                            resolve(false)
+                        }
+                    });
+                }
+
+            })
+
+
+        },
+    },
+    components: {
+        systemState
     }
 }
 </script>
 <style lang="less" scoped>
+.certain {
+    margin: 140px auto;
+}
 </style>

+ 315 - 0
src/main/vue/src/pagesPre/Search.vue

@@ -0,0 +1,315 @@
+<template>
+    <div class="conatiner">
+
+        <el-breadcrumb separator-class="el-icon-arrow-right" class="Breadcrumb">
+            <el-breadcrumb-item :replace='true' :to="{ path: '/' }">首页</el-breadcrumb-item>
+            <el-breadcrumb-item>搜索结果</el-breadcrumb-item>
+        </el-breadcrumb>
+
+        <div class="content">
+            <div class="content-left">
+                <div class="goodsList" v-if="goodsList.length>0">
+                    <goods-large :info='item' v-for="item in goodsList" style="margin:0 0 20px;"></goods-large>
+                </div>
+                <div v-else class="nothing">
+                    <img src="../assetsPre/nothingImg.png" alt="">
+                    <p>没有匹配到结果哦~<br/>看看热门推荐吧</p>
+                </div>
+
+            </div>
+
+            <div class="content-right" v-if="hotList.length>0">
+                <div class="right-title">
+                    热门推荐
+                </div>
+                <goods-little v-for="item in hotList" :info='item' style="border-top:1px solid #EAEAEA;padding:15px 0 29px"></goods-little>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script>
+import goodsLittle from '../components/GoodsLittle'
+import goodsLarge from '../components/GoodsLarge'
+import { mapState } from "vuex";
+export default {
+    name: 'home',
+    data() {
+        return {
+            address: 0,
+            level: 0,
+            time: 0,
+            nowIndex: 0,
+            bannerList: [],
+            hotList: [],
+            currentPage: 0,
+            flag: true,
+            goodsList: [],
+            cityList: [],
+            district: '',
+            credit: '',
+            advancedQuery: '',
+            timeList: [{
+                id: 1,
+                name: '0-15分钟',
+                key: 'AND_,response_time_,>=_,0_;AND_,response_time_,<_,15'
+            }, {
+                id: 2,
+                name: '15-30分钟',
+                key: 'AND_,response_time_,>=_,15_;AND_,response_time_,<_,30'
+            }, {
+                id: 3,
+                name: '30-45分钟',
+                key: 'AND_,response_time_,>=_,30_;AND_,response_time_,<_,45'
+            }, {
+                id: 4,
+                name: '45-60分钟',
+                key: 'AND_,response_time_,>=_,45_;AND_,response_time_,<_,60'
+            }, {
+                id: 5,
+                name: '60分钟以上',
+                key: 'AND_,response_time_,>=_,60'
+            }],
+            orderType: ['', 'asc', 'desc'],
+            orderByStr: '',
+            creditOrder: '',
+            responseOrder: '',
+            reworkOrder: '',
+            searchKey: ''
+        }
+    },
+    computed: {
+        ...mapState(["locationInfo", "serviceType"]),
+        locationCity() {
+            var city = ''
+            if (this.locationInfo) {
+                city = this.locationInfo.addressComponent.city.split('市')[0]
+                if (!city) {
+                    city = this.locationInfo.addressComponent.province.split('省')[0]
+                }
+            }
+            return city
+        },
+        addressFiliftLocation() {
+            var location = {
+                width: 46,
+                height: 26,
+                top: 7,
+                left: 0
+            }
+            if (document.getElementById("filit_address" + this.address)) {
+                var width = document.getElementById("filit_address" + this.address).offsetWidth
+                var height = document.getElementById("filit_address" + this.address).offsetHeight
+                var top = document.getElementById("filit_address" + this.address).offsetTop
+                var left = document.getElementById("filit_address" + this.address).offsetLeft
+                location = {
+                    width: width,
+                    height: height,
+                    top: top,
+                    left: left
+                }
+            }
+            return location
+        },
+        levelFiliftLocation() {
+            var location = {
+                width: 46,
+                height: 26,
+                top: 7,
+                left: 0
+            }
+            if (document.getElementById("filit_level" + this.level)) {
+                var width = document.getElementById("filit_level" + this.level).offsetWidth
+                var height = document.getElementById("filit_level" + this.level).offsetHeight
+                var top = document.getElementById("filit_level" + this.level).offsetTop
+                var left = document.getElementById("filit_level" + this.level).offsetLeft
+                location = {
+                    width: width,
+                    height: height,
+                    top: top,
+                    left: left
+                }
+            }
+            return location
+        },
+        timeFiliftLocation() {
+            var location = {
+                width: 46,
+                height: 26,
+                top: 7,
+                left: 0
+            }
+            if (document.getElementById("filit_time" + this.time)) {
+                var width = document.getElementById("filit_time" + this.time).offsetWidth
+                var height = document.getElementById("filit_time" + this.time).offsetHeight
+                var top = document.getElementById("filit_time" + this.time).offsetTop
+                var left = document.getElementById("filit_time" + this.time).offsetLeft
+                location = {
+                    width: width,
+                    height: height,
+                    top: top,
+                    left: left
+                }
+            }
+            return location
+        }
+    },
+    mounted() {
+
+
+        setTimeout(() => {
+            this.freash()
+        }, 500)
+    },
+    watch: {
+        $route() {
+            this.freash()
+        }
+    },
+    methods: {
+        freash() {
+            if (this.$route.query.searchKey) {
+                this.searchKey = this.$route.query.searchKey
+            }
+
+
+            var list = [{
+                name: '首页',
+                href: '/'
+            }]
+            list.push({
+                name: '搜索结果',
+                href: this.$route.name
+            })
+            this.$http.get({
+                url: '/storeInfo/page',
+                data: {
+                    currentPage: 1,
+                    pageNumber: 20,
+                    hotFlag: 1,
+                    useFlag: 'Y'
+                }
+            }).then(res => {
+                if (res.success) {
+                    this.hotList = res.data.pp
+                }
+            }).catch(e => {
+                console.log(e)
+            })
+            this.flag = true
+            this.currentPage = 0
+            this.getInfo()
+        },
+        getInfo() {
+            if (!this.flag) {
+                return
+            }
+            else {
+                this.flag = false
+            }
+            if (this.currentPage == 0) {
+                this.goodsList = []
+            }
+            var data = {
+                currentPage: this.currentPage,
+                pageNumber: 20,
+                searchKey: this.searchKey,
+                useFlag: 'Y',
+                advancedQuery: ''
+            }
+
+            console.log(data)
+
+
+
+
+            this.currentPage++
+            this.$http.get({
+                url: '/storeInfo/page',
+                data: data
+            }).then(res => {
+                if (res.success) {
+                    this.goodsList = this.goodsList.concat(res.data.pp)
+                    if (res.data.page.currentPage < res.data.page.totalPage) {
+                        this.flag = true
+                    }
+                }
+            }).catch(e => {
+                console.log(e)
+            })
+        },
+        scrollMenu() {
+            if (document.getElementById('container').scrollTop + document.body.clientHeight + 100 >= document.getElementById('container').scrollHeight) {
+                this.getInfo()
+                console.log('到底了')
+            }
+        }
+    },
+    components: {
+        goodsLittle, goodsLarge
+    }
+}
+</script>
+
+<style lang="less" scoped>
+.swiper {
+    width: 1196px;
+    height: 420px;
+    margin: auto;
+}
+.Breadcrumb {
+    width: 1196px;
+    margin: 13px auto 10px;
+}
+
+.content {
+    width: 1196px;
+    overflow: hidden;
+    margin: auto;
+    min-height: 800px;
+    padding-bottom: 20px;
+
+    .content-left {
+        width: 925px;
+        float: left;
+
+        .goodsList {
+            // padding-top: 5px;
+            padding-bottom: 20px;
+        }
+
+        .nothing {
+            margin-top: 130px;
+            img {
+                width: 167px;
+                height: 167px;
+                display: block;
+                margin: auto;
+            }
+
+            p {
+                font-size: 14px;
+                text-align: center;
+                color: rgba(51, 51, 51, 1);
+                line-height: 19px;
+                margin-top: 24px;
+            }
+        }
+    }
+
+    .content-right {
+        width: 211px;
+        float: right;
+        background-color: #fff;
+        border-radius: 4px;
+        border: 1px solid rgba(234, 234, 234, 1);
+        padding-left: 29px;
+        .right-title {
+            font-size: 16px;
+            font-family: MicrosoftYaHei;
+            color: rgba(51, 51, 51, 1);
+            line-height: 42px;
+        }
+    }
+}
+</style>

+ 42 - 12
src/main/vue/src/pagesPre/SetStoreInfo.vue

@@ -13,7 +13,7 @@
             </template>
         </el-form-item> -->
         <el-form-item prop="serviceType" label="服务类型">
-            <el-select v-model="formData.serviceType" filterable placeholder="请选择" size="small" style="width:109px;">
+            <el-select v-model="formData.serviceType" filterable placeholder="请选择" size="small" style="width:109px;" @change="formData.subclass=[]">
                 <el-option v-for="item in serviceTypes" :key="item.id" :label="item.shortName" :value="item.id">
                 </el-option>
             </el-select>
@@ -23,7 +23,7 @@
         </el-form-item>
 
         <el-form-item prop="subclass" label="服务小类">
-            <el-select v-model="formData.subclass" filterable placeholder="请选择" size="small">
+            <el-select v-model="formData.subclass" multiple placeholder="请选择" size="small">
                 <el-option v-for="item in serviceTypeDetails[formData.serviceType]" :key="item.id" :label="item.typeName" :value="item.id">
                 </el-option>
             </el-select>
@@ -62,7 +62,10 @@
         </el-form-item>
 
         <el-form-item>
-            <el-button @click="onSave" style='width:320px;' :loading="$store.state.fetchingData" type="primary">下一步</el-button>
+
+            <el-button v-if="nowStyle=='商家店铺'" @click="onSave" :loading="$store.state.fetchingData" type="primary">保存</el-button>
+            <el-button v-else @click="onSave" style='width:320px;' :loading="$store.state.fetchingData" type="primary">下一步</el-button>
+
         </el-form-item>
     </el-form>
 </template>
@@ -75,6 +78,10 @@ export default {
         typeFlag: {
             type: Number,
             default: 0
+        },
+        nowStyle: {
+            type: String,
+            default: ''
         }
     },
     created() {
@@ -82,7 +89,8 @@ export default {
         this.formData.userId = this.userInfo.id
         this.formData.userName = this.userInfo.nickname
         this.formData.address = []
-        this.formData.useFlag='N'
+        this.formData.subclass = []
+        this.formData.useFlag = 'N'
         if (this.$route.query.column) {
             this.subColumn = this.$route.query.column.split(',')[1];
             this.subValue = this.$route.query.column.split(',')[0];
@@ -100,17 +108,19 @@ export default {
                     res.data.address.push(res.data.province)
                     res.data.address.push(res.data.citye)
                     res.data.address.push(res.data.district)
+                    var subclass = res.data.subclass.split(',')
+                    res.data.subclass = []
+                    subclass.forEach(item => {
+                        res.data.subclass.push(Number(item))
+                    })
                     this.formData = res.data;
                     if (this.formData.serviceType) {
 
                         this.formData.serviceType = Number(this.formData.serviceType);
                     }
-                    if (this.formData.subclass) {
-                        this.formData.subclass = Number(this.formData.subclass);
-                    }
                     this.formData.hotFlag = this.formData.hotFlag == 1 ? true : false;
                     this.formData.homeFlag = this.formData.homeFlag == 1 ? true : false;
-                    this.formData.useFlag = this.formData.useFlag == 'Y' ? true : false;
+                    // this.formData.useFlag = this.formData.useFlag == 'Y' ? true : false;
 
                     if (this.$route.query.column) {
                         this.formData[this.subColumn] = this.subValue;
@@ -154,10 +164,10 @@ export default {
                 rank: 0,
                 responseTime: 0,
                 reworkRate: 0,
-                useFlag: true,
                 serviceType: 1,
                 storelabel: [],
-                address: []
+                address: [],
+                subclass: []
             },
             city: [],
             rules: {
@@ -216,10 +226,11 @@ export default {
 
             data.hotFlag = this.formData.hotFlag ? 1 : 0;
             data.homeFlag = this.formData.homeFlag ? 1 : 0;
-            data.useFlag = this.formData.useFlag ? 'Y' : 'N';
+            // data.useFlag = this.formData.useFlag ? 'Y' : 'N';
             data.province = this.formData.address[0]
             data.citye = this.formData.address[1]
             data.district = this.formData.address[2]
+            data.subclass = data.subclass.toString()
 
             this.$http.post({
                 url: this.formData.id ? '/storeInfo/update' : '/storeInfo/save',
@@ -227,7 +238,26 @@ export default {
             }).then(res => {
                 if (res.success) {
                     this.$message.success('成功');
-                    this.$emit('nextStep')
+                    if (this.nowStyle == '商家店铺') {
+
+
+                        this.$http.get({
+                            url: '/storeInfo/getOne',
+                            data: {
+                                userId: this.userInfo.id
+                            }
+                        }).then(res => {
+                            if (res.success) {
+                                this.$store.commit('updateStoreInfo', res.data);
+
+
+                            }
+                        })
+                    }
+                    else {
+                        this.$emit('nextStep')
+                    }
+
                 } else {
                     this.$message.warning('失败')
                 }

+ 126 - 19
src/main/vue/src/pagesPre/Shop.vue

@@ -47,7 +47,7 @@
             <img src="../assetsPre/levelA.png" alt="" class="level">
         </div>
 
-        <div class="goodsList">
+        <div class="goodsList" id='goodsList'>
             <el-tabs class="goodsTab" v-model="activeName">
                 <el-tab-pane label="在售商品" name="first">
                     <div class="allGoods">
@@ -64,12 +64,44 @@
 
                             <div class="line" v-if="(index+1)%4==0"></div>
                         </template>
-
+                        <div style="padding:20px " v-if="totalProduct>8">
+                            <el-pagination background @current-change="productCurrentChange" :current-page="productCurrent" :page-size="8" layout="total, prev, pager, next" :total="totalProduct">
+                            </el-pagination>
+                        </div>
                     </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-tab-pane :label="'店铺评价 ('+totalComment+')'" name="second">
+                    <commentItem v-for="item in commentList" :type='"store"' style="border-bottom:1px solid #ebebeb" :info='item'></commentItem>
+                    <div style="padding:20px " v-if="totalComment>8">
+                        <el-pagination background @current-change="commentCurrentChange" :current-page="commentCurrent" :page-size="8" layout="total, prev, pager, next" :total="totalComment">
+                        </el-pagination>
+                    </div>
+                </el-tab-pane>
+                <el-tab-pane label="最近成单" name="third">
+                    <template>
+                        <el-table class="pointTable" :data="orderList" style="width:95%;margin: 0 0 20px 0;">
+                            <el-table-column prop="createTime" label="交易时间" width="180" align="center">
+                                <template slot-scope="scope">
+                                    <span>{{getTime(scope.row.createTime)}}</span>
+                                </template>
+                            </el-table-column>
+                            <el-table-column prop="productInfo.title" label="商品名称" width="180" align="center">
+                            </el-table-column>
+                            <el-table-column prop="userInfo.nickname" label="交易人" align="center">
+                                <!-- <template slot-scope="scope">
+                                    <span>{{scope.row.userInfo.nickname}}</span>
+                                </template> -->
+                            </el-table-column>
+                            <el-table-column prop="totlePrice" label="交易金额" align="center">
+                            </el-table-column>
+                        </el-table>
+                        <div style="padding:20px " v-if="totalOrder>8">
+                            <el-pagination background @current-change="orderCurrentChange" :current-page="orderCurrent" :page-size="8" layout="total, prev, pager, next" :total="totalOrder">
+                            </el-pagination>
+                        </div>
+                    </template>
+                </el-tab-pane>
             </el-tabs>
         </div>
     </div>
@@ -77,6 +109,7 @@
 
 <script>
 import { mapState } from 'vuex'
+import commentItem from '../pagesPre/CommentItem'
 export default {
     name: 'shop',
     data() {
@@ -85,7 +118,15 @@ export default {
             activeName: 'first',
             goodsList: [],
             hrefHistory: [],
-            collectID: 0
+            collectID: 0,
+            commentCurrent: 1,
+            commentList: [],
+            totalComment: 0,
+            productCurrent: 1,
+            totalProduct: 0,
+            orderCurrent: 1,
+            totalOrder: 0,
+            orderList: []
         }
     },
     computed: {
@@ -146,20 +187,12 @@ export default {
         })
 
 
-        this.$http.get({
-            url: '/productInfo/all',
-            data: {
-                storeId: this.$route.query.id,
-                onShelf: 'Y',
-                useFlag: 'Y'
-            }
-        }).then(res => {
-            if (res.success) {
-                this.goodsList = res.data
-            }
-        }).catch(e => {
-            console.log(e)
-        })
+
+        this.getProduct()
+        this.getComment()
+        this.getOrder()
+
+
 
 
 
@@ -235,7 +268,81 @@ export default {
 
 
             }
+        },
+        productCurrentChange(page) {
+            this.productCurrent = page;
+            this.getProduct();
+        },
+        orderCurrentChange(page) {
+            this.orderCurrent = page;
+            this.getOrder();
+        },
+        commentCurrentChange(page) {
+            this.commentCurrent = page;
+            this.getComment();
+        },
+        getOrder() {
+            this.goodsList = []
+            this.$http.get({
+                url: '/userOrder/page',
+                data: {
+                    storeId: this.$route.query.id,
+                    onShelf: 'Y',
+                    useFlag: 'Y',
+                    currentPage: this.orderCurrent,
+                }
+            }).then(res => {
+                if (res.success) {
+                    this.orderList = res.data.pp
+                    this.totalOrder = res.data.page.totalNumber
+                }
+            }).catch(e => {
+                console.log(e)
+            })
+        },
+        getProduct() {
+            this.goodsList = []
+            this.$http.get({
+                url: '/productInfo/page',
+                data: {
+                    storeId: this.$route.query.id,
+                    onShelf: 'Y',
+                    useFlag: 'Y',
+                    currentPage: this.productCurrent,
+                }
+            }).then(res => {
+                if (res.success) {
+                    this.goodsList = res.data.pp
+                    this.totalProduct = res.data.page.totalNumber
+                }
+            }).catch(e => {
+                console.log(e)
+            })
+        },
+        getComment() {
+            this.commentList = []
+            this.$http.get({
+                url: '/productComment/page',
+                data: {
+                    storeId: this.$route.query.id,
+                    onShelf: 'Y',
+                    useFlag: 'Y',
+                    currentPage: this.commentCurrent,
+                    pageNumber: 8
+                }
+            }).then(res => {
+                if (res.success) {
+                    this.totalComment = res.data.page.totalNumber
+                    this.commentList = res.data.pp
+                }
+            }).catch(e => {
+                console.log(e)
+            })
+
         }
+    },
+    components: {
+        commentItem
     }
 }
 </script>

+ 265 - 0
src/main/vue/src/pagesPre/ShopOrder.vue

@@ -0,0 +1,265 @@
+<template>
+    <div class="conatiner">
+        <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="getOrder">
+            <el-menu-item index="1">所有订单</el-menu-item>
+            <el-menu-item index="2">待付款</el-menu-item>
+            <el-submenu index="3">
+                <template slot="title">{{getTypeName('3',activeIndex)}}</template>
+                <el-menu-item index="3-1">待上传</el-menu-item>
+                <el-menu-item index="3-2">待修图</el-menu-item>
+                <el-menu-item index="3-3">待审核</el-menu-item>
+                <el-menu-item index="3-4">返修中</el-menu-item>
+            </el-submenu>
+            <el-submenu index="4">
+                <template slot="title">{{getTypeName('4',activeIndex)}}</template>
+                <el-menu-item index="4-1">待发货</el-menu-item>
+                <el-menu-item index="4-2">待收货</el-menu-item>
+            </el-submenu>
+            <el-menu-item index="5">待评价</el-menu-item>
+            <el-menu-item index="6">退款中</el-menu-item>
+            <el-menu-item index="7">订单回收站</el-menu-item>
+        </el-menu>
+
+        <el-input size="mini" placeholder="商品名称/订单号" v-model="searchKey" class="orderSearch">
+            <el-button slot="append" icon="el-icon-search" @click="search"></el-button>
+        </el-input>
+
+        <div class="list">
+            <template v-if="orderList.length>0">
+                <div class="list-top">
+                    <div class="left" style="width:687px">
+                        <span style="width:270px">商品名称</span>
+                        <span style="width:56px">单价</span>
+                        <span style="width:56px">数量</span>
+                    </div>
+                    <div class="right" style="width:265px;">
+                        <span>实付款</span>
+                        <span>状态</span>
+                        <span>操作</span>
+                    </div>
+                </div>
+                <div class="orderList" style="min-height:562px">
+
+                    <order-item v-for="item in orderList" :info="item"  :type='"shop"'></order-item>
+
+                </div>
+            </template>
+
+            <div v-else class="nothing">
+                <img src="../assetsPre/nothingImg.png" alt="">
+                <p>还有下订单哦~</p>
+            </div>
+
+            <el-pagination v-if="totalNumber>3" background @current-change="currentPageChange" :current-page="currentPage" :page-size="3" layout="total, prev, pager, next" :total="totalNumber">
+            </el-pagination>
+        </div>
+    </div>
+</template>
+
+<script>
+import { mapState } from 'vuex'
+import orderItem from '../components/OrderItem'
+export default {
+    name: 'order',
+    data() {
+        return {
+            activeIndex: '1',
+            list: [{
+
+            }],
+            searchKey: '',
+            orderList: [],
+            currentPage: 1,
+            totalNumber: 0
+        }
+    },
+    computed: {
+        ...mapState(['userInfo','myStoreInfo'])
+    },
+    mounted() {
+        this.getData({})
+    },
+    methods: {
+        currentPageChange(page) {
+            this.currentPage = page;
+            this.getData({});
+        },
+        getOrder(key, keyPath) {
+            this.activeIndex = key
+            this.currentPage = 1
+            var jsonp = {
+                statusFlag: '',
+                productType: ''
+            }
+            switch (key) {
+                case '2':
+                    jsonp.statusFlag = 0
+                    break
+                case '3-1':
+                    jsonp.productType = 0
+                    jsonp.statusFlag = 1
+                    break
+                case '3-2':
+                    jsonp.productType = 0
+                    jsonp.statusFlag = 2
+                    break
+                case '3-3':
+                    jsonp.productType = 0
+                    jsonp.statusFlag = 3
+                    break
+                case '3-4':
+                    jsonp.productType = 0
+                    jsonp.statusFlag = 4
+                    break
+                case '4-1':
+                    jsonp.productType = 1
+                    jsonp.statusFlag = 1
+                    break
+                case '4-2':
+                    jsonp.productType = 1
+                    jsonp.statusFlag = 2
+                    break
+                case '5':
+                    jsonp.statusFlag = 5
+                    break
+                case '6':
+                    jsonp.statusFlag = 7
+                    break
+                case '7':
+                    jsonp.statusFlag = 8
+                    break
+            }
+
+            this.getData(jsonp);
+        },
+        getTypeName(index, now) {
+            if (index == '4') {
+                if (now == '4-1') {
+                    return '待发货'
+                } else if (now == '4-2') {
+                    return '待收货'
+                }
+                else {
+                    return '实体商品'
+                }
+            }
+
+            if (index == '3') {
+                if (now == '3-1') {
+                    return '待上传'
+                } else if (now == '3-2') {
+                    return '待修图'
+                } else if (now == '3-3') {
+                    return '待审核'
+                } else if (now == '3-4') {
+                    return '返修中'
+                }
+                else {
+                    return '修图商品'
+                }
+            }
+
+            return ''
+        },
+        search() {
+            console.log('aaaa')
+        },
+        getData(jsonp) {
+            var data = jsonp
+            data.storeId = this.myStoreInfo.id
+            data.pageNumber = 3
+            data.currentPage = this.currentPage
+            this.$http.get({
+                url: '/userOrder/page',
+                data: data
+            }).then(res => {
+                if (res.success) {
+                    this.totalNumber = res.data.page.totalNumber;
+                    this.orderList = res.data.pp
+                }
+            }).catch(e => {
+                console.log(e)
+            })
+        }
+
+    },
+    components: {
+        orderItem
+    }
+}
+</script>
+
+<style lang="less" scoped>
+.conatiner {
+    min-height: 734px;
+    background: rgba(255, 255, 255, 1);
+    border-radius: 4px;
+    border: 1px solid rgba(234, 234, 234, 1);
+    padding: 0 25px 0 39px;
+
+    position: relative;
+
+    .orderSearch {
+        position: absolute;
+        width: 220px;
+        height: 28px;
+        right: 25px;
+        top: 20px;
+    }
+
+    .list {
+        padding-bottom: 20px;
+    }
+
+    .list-top {
+        height: 37px;
+        line-height: 37px;
+        background: rgba(244, 244, 244, 1);
+        margin: 20px 0 17px;
+        font-size: 0;
+
+        .left {
+            display: inline-block;
+            font-size: 0;
+            vertical-align: middle;
+        }
+
+        .right {
+            display: inline-block;
+            font-size: 0;
+            vertical-align: middle;
+            span {
+                width: 33%;
+            }
+        }
+
+        span {
+            font-size: 12px;
+            font-family: MicrosoftYaHei;
+            color: rgba(108, 108, 108, 1);
+            line-height: 16px;
+            text-align: center;
+            display: inline-block;
+            vertical-align: middle;
+        }
+    }
+}
+
+.nothing {
+    margin-top: 130px;
+    img {
+        width: 167px;
+        height: 167px;
+        display: block;
+        margin: auto;
+    }
+
+    p {
+        font-size: 14px;
+        text-align: center;
+        color: rgba(51, 51, 51, 1);
+        line-height: 19px;
+        margin-top: 24px;
+    }
+}
+</style>

+ 262 - 0
src/main/vue/src/pagesPre/StoreComment.vue

@@ -0,0 +1,262 @@
+<template>
+    <div class="container">
+        <div class="list">
+            <template v-if="tableData.length>0">
+                <comment-item style="border-bottom:1px solid #ebebeb;" :type='"store"' :info='item' v-for="item in tableData"></comment-item>
+            </template>
+            <div v-else class="nothing">
+                <img src="../assetsPre/nothingImg.png" alt="">
+                <p>还没有评论哦</p>
+            </div>
+
+        </div>
+
+        <div class="pagination-wrapper" v-if="totalNumber>6" style="padding:20px;">
+
+            <el-pagination background @current-change="currentPageChange" :current-page="currentPage" :page-size="6" layout="total, prev, pager, next" :total="totalNumber">
+            </el-pagination>
+        </div>
+
+    </div>
+</template>
+<script>
+import { mapState } from 'vuex'
+import { format } from 'date-fns'
+import zh from 'date-fns/locale/zh_cn'
+import commentItem from '../pagesPre/CommentItem'
+export default {
+    created() {
+        this.getData();
+    },
+    data() {
+        return {
+            totalNumber: 0,
+            totalPage: 10,
+            currentPage: 1,
+            pageSize: 6,
+            tableData: []
+        }
+    },
+    computed: {
+        ...mapState(['userInfo', 'myStoreInfo']),
+        selection() {
+            return this.$refs.table.selection.map(i => i.id);
+        }
+    },
+    methods: {
+        pageSizeChange(size) {
+            this.currentPage = 1;
+            this.pageSize = size;
+            this.getData();
+        },
+        currentPageChange(page) {
+            this.currentPage = page;
+            this.getData();
+        },
+        getData() {
+
+            var data = {
+                currentPage: this.currentPage,
+                pageNumber: this.pageSize,
+                searchKey: this.filter1,
+                advancedQuery: this.advancedQuerySearchKey,
+                orderByStr: this.orderByStr,
+                // userId: this.userInfo.id
+                storeId: this.myStoreInfo.id
+
+            }
+
+            if (this.$route.query.column) {
+                var tempColumn = this.$route.query.column;
+                data[tempColumn.split(',')[1]] = tempColumn.split(',')[0];
+            }
+
+            this.$http.get({
+                url: '/productComment/page',
+                data: data
+            }).then(res => {
+                if (res.success) {
+                    this.totalNumber = res.data.page.totalNumber;
+                    this.tableData = res.data.pp;
+                }
+            })
+        },
+        isColumnShow(column) {
+            var row = this.tableColumns.find(i => i.value === column);
+            return row ? row.show : false;
+        },
+        toggleMultipleMode(multipleMode) {
+            this.multipleMode = multipleMode;
+            if (!multipleMode) {
+                this.$refs.table.clearSelection();
+            }
+        },
+        editRow(row) {
+            this.$router.push({
+                path: '/productComment',
+                query: {
+                    id: row.id,
+                    column: this.$route.query.column,
+                }
+            })
+        },
+        operation1() {
+            this.$notify({
+                title: '提示',
+                message: this.selection
+            });
+        },
+        operation2() {
+            this.$message('操作2');
+        },
+        addField() {
+            this.advancedQueryFields.push({
+                link: 'AND',
+                name: '',
+                searchMethod: '=',
+                value: '',
+            });
+        },
+        removeField(i) {
+            if (this.advancedQueryFields.length > 0) {
+                this.advancedQueryFields.splice(i, 1);
+            }
+        },
+        advancedQuery() {
+
+            this.advancedQuerySearchKey = '';
+
+            if (this.advancedQueryFields.length > 0) {
+
+                var templist = [];
+
+                this.advancedQueryFields.forEach(item => {
+                    if (item.link && item.name && item.searchMethod && item.value) {
+                        var tempItem = item.link + '_,' + item.name + '_,' + item.searchMethod + '_,' + item.value;
+                        templist.push(tempItem);
+                    }
+                })
+
+                if (templist.length > 0) {
+
+                    this.advancedQuerySearchKey = templist.join('_;');
+                }
+            }
+
+            this.getData();
+            this.showAdvancedQueryDialog = false;
+        },
+        addSortField() {
+            this.tableSortFields.push({
+                name: '',
+                order: 'asc',
+            });
+        },
+        removeSortField(i) {
+            if (this.tableSortFields.length > 0) {
+                this.tableSortFields.splice(i, 1);
+            }
+        },
+        tableSortQuery() {
+
+            this.orderByStr = '';
+
+            if (this.tableSortFields.length > 0) {
+
+                var templist = [];
+
+                this.tableSortFields.forEach(item => {
+                    if (item.name && item.order) {
+                        var tempItem = item.name + '_,' + item.order;
+                        templist.push(tempItem);
+                    }
+                })
+
+                if (templist.length > 0) {
+
+                    this.orderByStr = templist.join('_;');
+                }
+            }
+
+            this.getData();
+            this.showTableSortDialog = false;
+        },
+        exportExcel() {
+            window.location.href = this.$baseUrl + "/productComment/exportExcel?searchKey="
+                + this.filter1 + "&advancedQuery=" + this.advancedQuerySearchKey + "&orderByStr=" + this.orderByStr;
+        },
+        searchData() {
+            this.currentPage = 1;
+            this.getData();
+        },
+        deleteRow(row) {
+            this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'error' }).then(() => {
+                return this.$http.post({
+                    url: '/productComment/del',
+                    data: { id: row.id }
+                })
+            }).then(() => {
+                this.$message.success('删除成功');
+                this.getData();
+            }).catch(action => {
+                if (action === 'cancel') {
+                    this.$message.info('删除取消');
+                } else {
+                    this.$message.error('删除失败');
+                }
+            })
+        },
+        DateTimeFormatter(row, column, cellValue) {
+            if (cellValue) {
+                return format(cellValue, 'YYYY/MM/DD HH:mm', { locale: zh })
+            }
+
+        },
+        DateFormatter(row, column, cellValue) {
+            if (cellValue) {
+                return format(cellValue, 'YYYY/MM/DD', { locale: zh })
+            }
+
+        },
+        showImg(img) {
+            this.imgSrc = img;
+            this.imageDialogVisible = true;
+        },
+
+    },
+    components: {
+        commentItem
+    }
+}
+</script>
+<style lang="less" scoped>
+.container {
+    min-height: 598px;
+    background: rgba(255, 255, 255, 1);
+    border-radius: 4px;
+    border: 1px solid rgba(234, 234, 234, 1);
+    padding: 0 40px 0 24px;
+    .list {
+        min-height: 500px;
+        overflow: hidden;
+    }
+
+    .nothing {
+        margin-top: 136px;
+        img {
+            width: 167px;
+            height: 167px;
+            display: block;
+            margin: auto;
+        }
+
+        p {
+            font-size: 14px;
+            text-align: center;
+            color: rgba(51, 51, 51, 1);
+            line-height: 19px;
+            margin-top: 24px;
+        }
+    }
+}
+</style>

+ 14 - 3
src/main/vue/src/pagesPre/SystemState.vue

@@ -14,7 +14,9 @@
             </div>
 
         </div>
-        <el-button type="primary" class="back" @click="goHome">返回首页</el-button>
+        <el-button v-if="next=='index'" type="primary" class="back" @click="goNext('index')">返回首页</el-button>
+        <el-button v-if="next=='login'" type="primary" class="back" @click="goNext('login')">去登录</el-button>
+
     </div>
 </template>
 
@@ -35,6 +37,10 @@ export default {
         subtitle: {
             type: String,
             default: ''
+        },
+        next: {
+            type: String,
+            default: 'index'
         }
     },
     data() {
@@ -49,9 +55,14 @@ export default {
 
     },
     methods: {
-        goHome() {
+        goNext(str) {
+            var query = {}
+            if (this.$route.name == 'register') {
+                query.goIndex = 1
+            }
             this.$router.push({
-                name: 'index'
+                name: str,
+                query: query
             })
         }
 

+ 61 - 10
src/main/vue/src/pagesPre/UserCenter.vue

@@ -7,23 +7,23 @@
                 <div class="HeadContent">
                     <img class="logo" src="../assetsPre/logoWhite.png" alt="">
                     <div class="title">
-                        个人中心
+                        {{pageMenu}}
                     </div>
 
                     <div class="menu">
-                        <div class="menu-item" @click="goNext('userCenterHome')">
+                        <div class="menu-item" @click="goNext(pageMenu=='个人中心'?'userCenterHome':'userShop')">
                             首页
                         </div>
-                        <div class="menu-item" @click="goNext('userSet')">
+                        <div class="menu-item" @click="goNext(pageMenu=='个人中心'?'userSet':'customerServices')">
                             账户设置
                         </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">
+                    <el-input placeholder="请输入内容" v-model="searchKey" class="use-search">
                         <template slot="append">
-                            <button>搜索</button>
+                            <button @click="search">搜索</button>
                         </template>
 
                     </el-input>
@@ -63,7 +63,7 @@ export default {
     data() {
         return {
             isBottom: false,
-            search: '',
+            searchKey: '',
             menuList: {
                 '个人中心': {
                     '首页': [{
@@ -78,10 +78,12 @@ export default {
                         name: '我的评价',
                         index: '3',
                         href: 'userComment'
-                    }, {
-                        name: '我的图库',
-                        index: '4'
-                    }, {
+                    }
+                    // , {
+                    //     name: '我的图库',
+                    //     index: '4'
+                    // }
+                    , {
                         name: '我的积分',
                         index: '6',
                         href: 'memberPoint'
@@ -103,6 +105,35 @@ export default {
                         href: 'userCertification'
                     }],
                     '无': []
+                },
+                '商家中心': {
+                    '首页': [{
+                        name: '订单管理',
+                        index: '1',
+                        href: 'shopOrder'
+                    }, {
+                        name: '店铺管理',
+                        index: '2',
+                        href: 'userStore'
+                    }, {
+                        name: '商品管理',
+                        index: '3',
+                        href: 'userProductCon'
+                    }, {
+                        name: '店铺评论',
+                        index: '4',
+                        href:'storeComment'
+                    }, {
+                        name: '客户咨询',
+                        index: '5',
+                        href: 'userComment'
+                    }],
+                    '账户设置': [{
+                        name: '客服管理',
+                        index: '1',
+                        href: 'customerServices'
+                    }],
+                    '无': []
                 }
             }
         }
@@ -110,6 +141,13 @@ export default {
     watch: {
     },
     computed: {
+        pageMenu() {
+            var str = '个人中心'
+            if (this.$route.meta.pageMenu) {
+                str = this.$route.meta.pageMenu
+            }
+            return str
+        },
         nowMenuList() {
             var list = []
             if (this.$route.meta.pageMenu) {
@@ -144,6 +182,19 @@ export default {
                 })
             }
 
+        },
+        search() {
+            if (!this.searchKey) {
+                this.$message.warning('搜索内容不能为空!');
+                return
+            }
+
+            this.$router.push({
+                name: 'search',
+                query: {
+                    searchKey: this.searchKey
+                }
+            })
         }
     },
     components: {

+ 1 - 1
src/main/vue/src/pagesPre/UserCenterHome.vue

@@ -51,7 +51,7 @@ export default {
         this.$http.get({
             url: '/userOrder/page',
             data: {
-                userId: this.userInfo.userId,
+                userId: this.userInfo.id,
                 pageNumber: 1,
                 currentPage: 1
             }

+ 124 - 23
src/main/vue/src/pagesPre/UserCertification.vue

@@ -6,7 +6,7 @@
         <div class="content">
             <certificationStep :list='stepList' :nowStep='userInfo.approveStep'></certificationStep>
             <template v-if="userInfo.approveStep<=1">
-                <el-form class="certain" :model="formData" :rules="rules" ref="personalAuthentication" label-width="100px" label-position="right" size="small" style="max-width: 600px;">
+                <el-form v-if="userInfo.companyFlag=='N'" class="certain" :model="formData" :rules="rules" ref="personalAuthentication" label-width="100px" label-position="right" size="small" style="max-width: 600px;">
                     <el-form-item prop="realName" label="真实姓名">
                         <el-input v-model="formData.realName" style="width:320px;" placeholder="请填写您的真实姓名"></el-input>
                     </el-form-item>
@@ -24,6 +24,31 @@
                         <el-button :loading="$store.state.fetchingData" type="primary" @click="onSave" style="width:320px">下一步</el-button>
                     </el-form-item>
                 </el-form>
+                <el-form v-else class="certain" :model="formData1" :rules="rules1" ref="personalAuthentication" label-width="120px" label-position="right" size="small" style="max-width: 600px;">
+                    <el-form-item prop="company" label="公司名称">
+                        <el-input v-model="formData1.company" maxlength="30" style="width:320px;" placeholder="中英文、数字、空格或中文括号(30字以内)"></el-input>
+                    </el-form-item>
+                    <el-form-item prop="companyTime" label="公司注册时间">
+                        <el-date-picker v-model="formData1.companyTime" type="year" placeholder="请选择公司注册年份">
+                        </el-date-picker>
+                    </el-form-item>
+                    <el-form-item prop="businessNo" label="工商注册号">
+                        <el-input v-model="formData1.businessNo" style="width:320px;" maxlength="30" placeholder="英文或数字(30字以内)"></el-input>
+                    </el-form-item>
+                    <el-form-item prop="certificate" label="证件扫描">
+                        <single-upload-title v-model="formData1.certificate" style="display:inline-block" :title='"添加证件照片"' :width='200' :height='125'>
+
+                        </single-upload-title>
+                        <div class="ps">注:需要上传清晰证件照,格式jpg/jpeg/png,大小不超过10M </div>
+                    </el-form-item>
+                    <el-form-item prop="address" label="所在地">
+                        <el-cascader :options="cityData" :props='{value:"name",label:"name"}' v-model="formData1.address">
+                        </el-cascader>
+                    </el-form-item>
+                    <el-form-item>
+                        <el-button :loading="$store.state.fetchingData" type="primary" @click="onSave" style="width:320px">下一步</el-button>
+                    </el-form-item>
+                </el-form>
             </template>
 
             <template v-else-if="userInfo.approveStep==2">
@@ -52,12 +77,20 @@ import certificationStep from '../components/CertificationStep'
 import setStoreInfo from '../pagesPre/SetStoreInfo'
 import guaranteeMoney from '../pagesPre/GuaranteeMoney'
 import systemState from '../pagesPre/SystemState'
+import cityData from '../city'
+import moment from 'moment'
 export default {
     name: 'order',
     data() {
         return {
+            cityData,
             stepList: ['实名认证', '店铺信息', '缴纳质保金', '系统审核', '入驻成功'],
             formData: {},
+            formData1: {
+                company: '',
+                companyTime: '',
+                address: []
+            },
             rules: {
                 realName: [
                     { required: true, message: '请填写真实姓名', trigger: 'blur' },
@@ -80,22 +113,60 @@ export default {
                     { required: true, message: '请上传身份证照片', trigger: 'blur' },
                 ]
             },
+            rules1: {
+                company: [
+                    { required: true, message: '请输入公司名称', trigger: 'blur' },
+                ],
+                companyTime: [
+                    { required: true, message: '请选择公司注册年份', trigger: 'blur' },
+                ],
+                businessNo: [
+                    { required: true, message: '请输入工商注册号', trigger: 'blur' },
+                ],
+                certificate: [
+                    { required: true, message: '请添加证件照片', trigger: 'blur' },
+                ],
+                address: [
+                    { required: true, message: '请选择地址', trigger: 'blur' },
+                ]
+            },
+            address: []
         }
     },
     computed: {
         ...mapState(['userInfo']),
     },
     mounted() {
-        this.$http.get({
-            url: '/personalAuthentication/getOne',
-            data: {
-                userInfo: this.userInfo.id
-            }
-        }).then(res => {
-            if (res.success) {
-                this.formData = res.data;
-            }
-        })
+        if (this.userInfo.companyFlag == 'Y') {
+            this.$http.get({
+                url: '/companyAuthentication/getOne',
+                data: {
+                    userId: this.userInfo.id
+                }
+            }).then(res => {
+                if (res.success) {
+                    res.data.address = []
+                    res.data.address.push(res.data.province)
+                    res.data.address.push(res.data.city)
+                    res.data.address.push(res.data.country)
+                     res.data.companyTime=moment(res.data.companyTime).format('YYYY')
+                    this.formData1 = res.data;
+                }
+            })
+        }
+        else {
+            this.$http.get({
+                url: '/personalAuthentication/getOne',
+                data: {
+                    userId: this.userInfo.id
+                }
+            }).then(res => {
+                if (res.success) {
+                    this.formData = res.data;
+                }
+            })
+        }
+
     },
     methods: {
         onSave() {
@@ -108,19 +179,49 @@ export default {
             });
         },
         submit() {
-            console.log('aaaa')
-            var data = JSON.parse(JSON.stringify(this.formData));
-            this.$http.post({
-                url: this.formData.id ? '/personalAuthentication/update' : '/personalAuthentication/save',
-                data: data
-            }).then(res => {
-                if (res.success) {
-                    this.$message.success('提交成功');
-                    this.changeStep(2)
-                } else {
-                    this.$message.warning('失败')
+            if (this.userInfo.companyFlag == 'Y') {
+                var data = { ...this.formData1 }
+                delete data.address
+                data.province = this.formData1.address[0]
+                data.city = this.formData1.address[1]
+                data.country = this.formData1.address[2]
+                data.companyTime=Date.parse(moment(data.companyTime))
+                if (!this.formData1.id) {
+                    data.userId = this.userInfo.id
+                    data.userName = this.userInfo.username
                 }
-            });
+                this.$http.post({
+                    url: this.formData1.id ? '/companyAuthentication/update' : '/companyAuthentication/save',
+                    data: data
+                }).then(res => {
+                    if (res.success) {
+                        this.$message.success('提交成功');
+                        this.changeStep(2)
+                    } else {
+                        this.$message.warning('失败')
+                    }
+                });
+            }
+            else {
+                var data = JSON.parse(JSON.stringify(this.formData));
+                if (!this.formData.id) {
+                    data.userId = this.userInfo.id
+                    data.userName = this.userInfo.username
+                }
+                this.$http.post({
+                    url: this.formData.id ? '/personalAuthentication/update' : '/personalAuthentication/save',
+                    data: data
+                }).then(res => {
+                    if (res.success) {
+                        this.$message.success('提交成功');
+                        this.changeStep(2)
+                    } else {
+                        this.$message.warning('失败')
+                    }
+                });
+
+            }
+
         },
         changeStep(num) {
             this.$http.post({

+ 26 - 3
src/main/vue/src/pagesPre/UserCollection.vue

@@ -6,11 +6,16 @@
 
         <div class="list">
 
-            <goods-little v-for="(todo,todoIndex) in list" :info='todo.storeInfo' style="padding-left:30px;display:inline-block"></goods-little>
-
+            <template v-if="list.length>0">
+                <goods-little v-for="(todo,todoIndex) in list" :info='todo.storeInfo' style="padding-left:30px;display:inline-block"></goods-little>
+            </template>
+            <div v-else class="nothing">
+                <img src="../assetsPre/nothingImg.png" alt="">
+                <p>还有收藏任何店铺哦~</p>
+            </div>
         </div>
 
-        <el-pagination background @current-change="currentPageChange" :current-page="currentPage" :page-size="8" layout="total, prev, pager, next" :total="totalNumber">
+        <el-pagination background v-if="totalNumber>8" @current-change="currentPageChange" :current-page="currentPage" :page-size="8" layout="total, prev, pager, next" :total="totalNumber">
         </el-pagination>
     </div>
 </template>
@@ -94,6 +99,24 @@ export default {
                 border: 0;
             }
         }
+
+        .nothing {
+            margin-top: 136px;
+            img {
+                width: 167px;
+                height: 167px;
+                display: block;
+                margin: auto;
+            }
+
+            p {
+                font-size: 14px;
+                text-align: center;
+                color: rgba(51, 51, 51, 1);
+                line-height: 19px;
+                margin-top: 24px;
+            }
+        }
     }
 }
 </style>

+ 1 - 1
src/main/vue/src/pagesPre/UserComment.vue

@@ -11,7 +11,7 @@
 
         </div>
 
-        <div class="pagination-wrapper">
+        <div class="pagination-wrapper" v-if="totalNumber>6">
 
             <el-pagination background @current-change="currentPageChange" :current-page="currentPage" :page-size="6" layout="total, prev, pager, next" :total="totalNumber">
             </el-pagination>

+ 39 - 19
src/main/vue/src/pagesPre/UserOrder.vue

@@ -25,30 +25,32 @@
         </el-input>
 
         <div class="list">
-
-            <div class="list-top">
-                <div class="left" style="width:687px">
-                    <span style="width:270px">商品名称</span>
-                    <span style="width:56px">单价</span>
-                    <span style="width:56px">数量</span>
-                </div>
-                <div class="right" style="width:265px;">
-                    <span>实付款</span>
-                    <span>状态</span>
-                    <span>操作</span>
+            <template v-if="orderList.length>0">
+                <div class="list-top">
+                    <div class="left" style="width:687px">
+                        <span style="width:270px">商品名称</span>
+                        <span style="width:56px">单价</span>
+                        <span style="width:56px">数量</span>
+                    </div>
+                    <div class="right" style="width:265px;">
+                        <span>实付款</span>
+                        <span>状态</span>
+                        <span>操作</span>
+                    </div>
                 </div>
-            </div>
-            <div class="orderList" style="min-height:562px">
-                <template v-if="orderList.length>0">
+                <div class="orderList" style="min-height:562px">
+
                     <order-item v-for="item in orderList" :info="item"></order-item>
-                </template>
-                <template v-else>
-                    <div style="font-size:14px; color:#999; text-align:center">暂无数据</div>
-                </template>
 
+                </div>
+            </template>
+
+            <div v-else class="nothing">
+                <img src="../assetsPre/nothingImg.png" alt="">
+                <p>还有下订单哦~</p>
             </div>
 
-            <el-pagination background @current-change="currentPageChange" :current-page="currentPage" :page-size="3" layout="total, prev, pager, next" :total="totalNumber">
+            <el-pagination v-if="totalNumber>3" background @current-change="currentPageChange" :current-page="currentPage" :page-size="3" layout="total, prev, pager, next" :total="totalNumber">
             </el-pagination>
         </div>
     </div>
@@ -242,4 +244,22 @@ export default {
         }
     }
 }
+
+.nothing {
+    margin-top: 130px;
+    img {
+        width: 167px;
+        height: 167px;
+        display: block;
+        margin: auto;
+    }
+
+    p {
+        font-size: 14px;
+        text-align: center;
+        color: rgba(51, 51, 51, 1);
+        line-height: 19px;
+        margin-top: 24px;
+    }
+}
 </style>

+ 296 - 0
src/main/vue/src/pagesPre/UserProductCon.vue

@@ -0,0 +1,296 @@
+<template>
+    <div class="conatiner">
+        <div class="pageTitle">
+            <span>
+                商品管理
+            </span>
+
+            <div class="right">
+                <el-button type="primary" plain size="mini" @click="goNext('productInfo')">添加商品</el-button>
+                <el-button type="warning" v-if="!changeSelf" plain size="mini" @click="changeSelf=true">上下架</el-button>
+                <el-button type="warning" v-else size="mini" @click="changeSelf=false">取消上下架</el-button>
+                <el-select v-model="onShelf" @change='getProduct' clearable placeholder="筛选" size="mini" style="width:80px;margin-left:20px;">
+                    <el-option v-for="item in onShelfList" :key="item.value" :label="item.label" :value="item.value">
+                    </el-option>
+                </el-select>
+            </div>
+        </div>
+
+        <div class="content">
+            <template v-if="goodsList.length>0">
+                <div class="goodsList">
+                    <div class="goods-item" v-for="(item,index) in goodsList" @click="choose(item)">
+                        <img :src="item.image+'?x-oss-process=image/resize,m_fill,h_100,w_176'" alt="">
+                        <div class="title">{{item.title}}</div>
+                        <div class="price">
+                            <span>¥{{item.price}}</span>
+                            <small>
+                                <span style="color:#666">已售</span>
+                                <span>{{item.salesVolume}}</span>
+                            </small>
+                        </div>
+                        <template v-if="changeSelf">
+                            <div class="colorContent" v-if='item.onShelf=="Y"'>
+                                <span>已上架</span>
+                            </div>
+                            <div class="colorContent wei" v-else>
+                                <span>未上架</span>
+                            </div>
+
+                            <div class="box">
+                                <el-button type="warning" @click="changeSelfEvent(index,'Y')" class="btn" v-if='item.onShelf=="N"' icon="el-icon-upload2" circle></el-button>
+                                <el-button type="primary" @click="changeSelfEvent(index,'N')" class="btn" v-else icon="el-icon-download" circle></el-button>
+                            </div>
+                        </template>
+
+                    </div>
+                </div>
+            </template>
+            <div v-else class="nothing">
+                <img src="../assetsPre/nothingImg.png" alt="">
+                <p>{{myStoreInfo.storeName}}还没有商品哦</p>
+            </div>
+            <div style="padding:20px " v-if="totalProduct>8">
+                <el-pagination background @current-change="productCurrentChange" :current-page="productCurrent" :page-size="8" layout="total, prev, pager, next" :total="totalProduct">
+                </el-pagination>
+            </div>
+            <div class="bottom" v-if="changeSelf">
+                <el-button type="warning" plain @click="changeSelfEvent(0,'Y','all')">一键上架全部</el-button>
+                <el-button type="primary" plain @click="changeSelfEvent(0,'N','all')">一键下架全部</el-button>
+            </div>
+        </div>
+
+    </div>
+</template>
+
+<script>
+import { mapState } from 'vuex'
+import setStoreInfo from '../pagesPre/SetStoreInfo'
+export default {
+    name: 'order',
+    data() {
+        return {
+            orderList: [],
+            onShelf: '',
+            onShelfList: [{
+                value: 'Y',
+                label: '上架'
+            }, {
+                value: 'N',
+                label: '下架'
+            }],
+            goodsList: [],
+            productCurrent: 1,
+            totalProduct: 0,
+            changeSelf: false
+        }
+    },
+    computed: {
+        ...mapState(['userInfo', 'myStoreInfo']),
+    },
+    mounted() {
+        this.getProduct()
+
+    },
+    methods: {
+        getProduct() {
+            this.goodsList = []
+            this.$http.get({
+                url: '/productInfo/page',
+                data: {
+                    storeId: this.myStoreInfo.id,
+                    onShelf: this.onShelf,
+                    useFlag: 'Y',
+                    currentPage: this.productCurrent,
+                }
+            }).then(res => {
+                if (res.success) {
+                    this.goodsList = res.data.pp
+                    this.totalProduct = res.data.page.totalNumber
+                }
+            }).catch(e => {
+                console.log(e)
+            })
+        },
+        productCurrentChange(page) {
+            this.productCurrent = page;
+            this.getProduct();
+        },
+        goNext(str) {
+            this.$router.push({
+                name: str
+            })
+        },
+        choose(item) {
+            if (!this.changeSelf) {
+                this.$router.push({
+                    name: 'productInfo',
+                    query: {
+                        id: item.id
+                    }
+                })
+            }
+
+        },
+        changeSelfEvent(index, value, style) {
+            if (index >= this.goodsList.length) {
+                this.$message.success((value == 'Y' ? '上架' : '下架') + '成功')
+                this.getProduct()
+                return
+            }
+            this.$http.post({
+                url: '/productInfo/update',
+                data: {
+                    id: this.goodsList[index].id,
+                    onShelf: value
+                }
+            }).then(res => {
+                if (res.success) {
+                    if (style) {
+                        this.changeSelfEvent(index + 1, value, style)
+                    }
+                    else {
+                        this.$message.success((value == 'Y' ? '上架' : '下架') + '成功')
+                        this.goodsList[index].onShelf = value
+                    }
+
+                } else {
+                    this.$message.warning('失败')
+                }
+            })
+        },
+
+    },
+    components: {
+        setStoreInfo
+    }
+}
+</script>
+
+<style lang="less" scoped>
+.conatiner {
+    background: #fff;
+    padding: 0 6px 0 13px;
+
+    .goodsList{
+        min-height: 500px;
+    }
+
+    .pageTitle {
+        height: 47px;
+        font-size: 14px;
+        font-weight: bold;
+        color: rgba(51, 51, 51, 1);
+        line-height: 47px;
+        border-bottom: 1px solid rgba(234, 234, 234, 1);
+        margin-bottom: 10px;
+
+        .right {
+            float: right;
+            margin-right: 18px;
+        }
+    }
+
+    .nothing {
+        margin: 136px auto;
+
+        img {
+            width: 167px;
+            height: 167px;
+            display: block;
+            margin: auto;
+        }
+
+        p {
+            font-size: 14px;
+            text-align: center;
+            color: rgba(51, 51, 51, 1);
+            line-height: 19px;
+            margin-top: 24px;
+        }
+    }
+    .goodsList {
+        .goods-item {
+            padding: 20px;
+            border: 1px solid #ebebeb;
+            border-radius: 4px;
+            width: 176px;
+            display: inline-block;
+            margin-right: 30px;
+            margin-bottom: 39px;
+            position: relative;
+            cursor: pointer;
+            overflow: hidden;
+
+            img {
+                display: block;
+                border-radius: 4px;
+            }
+
+            .title {
+                font-size: 14px;
+                font-family: MicrosoftYaHei;
+                color: rgba(51, 51, 51, 1);
+                line-height: 19px;
+                overflow: hidden;
+                text-overflow: ellipsis;
+                white-space: nowrap;
+                margin-top: 8px;
+            }
+
+            .price {
+                font-size: 20px;
+                font-family: MicrosoftYaHei;
+                color: rgba(251, 110, 8, 1);
+                line-height: 26px;
+                margin-top: 7px;
+
+                small {
+                    font-size: 12px;
+                }
+            }
+
+            .colorContent {
+                background-color: #fb6e08;
+                width: 100px;
+                height: 100px;
+                position: absolute;
+                right: -50px;
+                top: -50px;
+                transform: rotate(45deg);
+                color: #fff;
+                z-index: 3;
+                span {
+                    position: absolute;
+                    bottom: 5px;
+                    left: 23px;
+                }
+
+                &.wei {
+                    background-color: #666;
+                }
+            }
+        }
+
+        .box {
+            position: absolute;
+            top: 0;
+            left: 0;
+            width: 100%;
+            height: 100%;
+            background-color: rgba(0, 0, 0, 0.2);
+            text-align: center;
+            line-height: 203px;
+            z-index: 2;
+            .btn {
+                display: inline-block;
+                vertical-align: middle;
+            }
+        }
+    }
+    .bottom {
+        padding: 10px;
+        border-top: 1px solid #ebebeb;
+    }
+}
+</style>

+ 211 - 0
src/main/vue/src/pagesPre/UserShop.vue

@@ -0,0 +1,211 @@
+<template>
+    <div class="conatiner">
+        <div class="top" v-if="userInfo">
+            <div class="top-item" style="width:28%;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>
+            <router-link :to="{name:'userSet',query:{activeName:'second'}}" class="top-item" style="width:15%">
+                账户余额
+            </router-link>
+            <router-link :to="{name:'shopOrder'}" class="top-item" style="width:15%">
+                店铺订单
+            </router-link>
+            <div class="top-item" style="width:38%">
+                存储空间
+                <div class="line">
+                    <div class="use">
+                        <span>已用 850G</span>
+                    </div>
+                    <span>可用150G</span>
+
+                </div>
+                <img style="width:17px;height:17px; vertical-align: middle;" src="../assetsPre/add.png" alt="">
+            </div>
+        </div>
+        <template v-if="orderList.length>0">
+            <div class="contentTitle">
+                最新订单进展
+            </div>
+
+            <div class="content">
+                <div class="orderList">
+                    <order-item v-for="item in orderList" :info='item' :type='"shop"'></order-item>
+                </div>
+            </div>
+        </template>
+
+    </div>
+</template>
+
+<script>
+import { mapState } from 'vuex'
+import orderItem from '../components/OrderItem'
+export default {
+    name: 'order',
+    data() {
+        return {
+            orderList: []
+        }
+    },
+    computed: {
+        ...mapState(['userInfo', 'myStoreInfo']),
+    },
+    mounted() {
+        this.$http.get({
+            url: '/userOrder/page',
+            data: {
+                storeId: this.myStoreInfo.id,
+                pageNumber: 1,
+                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;
+        }
+
+        .line {
+            width: 254px;
+            height: 16px;
+            background: rgba(234, 234, 234, 1);
+            border-radius: 12px;
+            display: inline-block;
+            vertical-align: middle;
+            font-size: 0;
+            text-align: left;
+            margin: 0 10px;
+
+            .use {
+                width: 180px;
+                height: 16px;
+                background: linear-gradient(134deg, rgba(250, 145, 34, 1) 0%, rgba(247, 107, 28, 1) 100%);
+                border-radius: 12px;
+                display: inline-block;
+
+                span {
+                    color: #fff;
+                    float: left;
+                    margin-left: 10px;
+                }
+            }
+            span {
+                font-size: 12px;
+                font-family: MicrosoftYaHei;
+                color: rgba(255, 94, 0, 1);
+                line-height: 16px;
+                text-align: right;
+                vertical-align: middle;
+                float: right;
+                margin-right: 10px;
+            }
+        }
+    }
+}
+
+.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);
+
+    .orderList {
+        margin-top: 23px;
+    }
+}
+</style>

+ 69 - 0
src/main/vue/src/pagesPre/UserStore.vue

@@ -0,0 +1,69 @@
+<template>
+    <div class="conatiner">
+        <div class="pageTitle">
+            店铺管理
+        </div>
+        <el-alert style="width:500px;margin-bottom:20px;" title="您填写的信息将在店铺前台展示给买家,请认真填写哦。" type="warning">
+        </el-alert>
+        <setStoreInfo class="certain" :nowStyle='"商家店铺"' @nextStep='changeStep(3)'></setStoreInfo>
+
+    </div>
+</template>
+
+<script>
+import { mapState } from 'vuex'
+import setStoreInfo from '../pagesPre/SetStoreInfo'
+export default {
+    name: 'order',
+    data() {
+        return {
+            orderList: []
+        }
+    },
+    computed: {
+        ...mapState(['userInfo', 'myStoreInfo']),
+    },
+    mounted() {
+        this.$http.get({
+            url: '/userOrder/page',
+            data: {
+                storeId: this.myStoreInfo.id,
+                pageNumber: 1,
+                currentPage: 1
+            }
+        }).then(res => {
+            if (res.success) {
+                this.orderList = res.data.pp
+            }
+        }).catch(e => {
+            console.log(e)
+
+        })
+
+    },
+    methods: {
+
+
+    },
+    components: {
+        setStoreInfo
+    }
+}
+</script>
+
+<style lang="less" scoped>
+.conatiner {
+    background: #fff;
+    padding: 0 6px 50px 13px;
+
+    .pageTitle {
+        padding: 18px 0 10px;
+        font-size: 14px;
+        font-weight: bold;
+        color: rgba(51, 51, 51, 1);
+        line-height: 19px;
+        border-bottom: 1px solid rgba(234, 234, 234, 1);
+        margin-bottom: 10px;
+    }
+}
+</style>

+ 399 - 239
src/main/vue/src/routerPre/index.js

@@ -2,275 +2,385 @@ import Vue from 'vue'
 import Router from 'vue-router'
 import store from '../vuexPre'
 import axios from 'axios'
+import RongIM from '../RongIM'
 
 Vue.use(Router);
 
 const router = new Router({
     routes: [{
-        path: '/',
-        component: () =>
-            import ('../pagesPre/App'),
-        children: [{
-                path: '/',
-                redirect: 'index'
-            },
-            {
-                path: '/404',
-                name: '404',
+            path: '/',
+            component: () =>
+                import ('../pagesPre/App'),
+            children: [{
+                    path: '/',
+                    redirect: 'index'
+                },
+                {
+                    path: '/index',
+                    name: 'index',
+                    component: () =>
+                        import ('../pagesPre/Index')
+                },
+                {
+                    path: '/business',
+                    name: 'business',
+                    component: () =>
+                        import ('../pagesPre/Business'),
+                    meta: {
+                        title: '修图商'
+                    }
+                },
+                {
+                    path: '/search',
+                    name: 'search',
+                    component: () =>
+                        import ('../pagesPre/Search'),
+                    meta: {
+                        title: '搜索'
+                    }
+                },
+                {
+                    path: '/about',
+                    name: 'about',
+                    component: () =>
+                        import ('../pagesPre/About'),
+                    meta: {
+                        title: '关于我们'
+                    }
+                },
+                {
+                    path: '/join',
+                    name: 'join',
+                    component: () =>
+                        import ('../pagesPre/Join'),
+                    meta: {
+                        title: '加入我们'
+                    }
+                },
+                {
+                    path: '/contact',
+                    name: 'contact',
+                    component: () =>
+                        import ('../pagesPre/Contact'),
+                    meta: {
+                        title: '联系我们'
+                    }
+                },
+                {
+                    path: '/shop',
+                    name: 'shop',
+                    component: () =>
+                        import ('../pagesPre/Shop'),
+                    meta: {
+                        title: '店铺详情'
+                    }
+                },
+                {
+                    path: '/product',
+                    name: 'product',
+                    component: () =>
+                        import ('../pagesPre/Product'),
+                    meta: {
+                        title: '商品详情'
+                    }
+                }
+            ]
+        }, {
+            path: '/',
+            component: () =>
+                import ('../pagesPre/Order'),
+            children: [{
+                path: '/submit',
+                name: 'submit',
                 component: () =>
-                    import ('../pagesPre/404')
-            },
-            {
-                path: '/index',
-                name: 'index',
+                    import ('../pagesPre/Submit'),
+                meta: {
+                    title: '确认订单',
+                    checkLogin: true
+                }
+            }, {
+                path: '/payOrder',
+                name: 'payOrder',
                 component: () =>
-                    import ('../pagesPre/Index')
-            },
-            {
-                path: '/business',
-                name: 'business',
+                    import ('../pagesPre/PayOrder'),
+                meta: {
+                    title: '支付订单',
+                    checkLogin: true
+                }
+            }]
+        }, {
+            path: '/',
+            component: () =>
+                import ('../pagesPre/UserCenter'),
+            children: [{
+                path: '/userCenterHome',
+                name: 'userCenterHome',
                 component: () =>
-                    import ('../pagesPre/Business'),
+                    import ('../pagesPre/UserCenterHome'),
                 meta: {
-                    title: '修图商'
+                    title: '个人中心——首页',
+                    checkLogin: true,
+                    pageMenu: '个人中心',
+                    pageMenu2: '首页',
                 }
-            },
-            {
-                path: '/about',
-                name: 'about',
+            }, {
+                path: '/userOrder',
+                name: 'userOrder',
                 component: () =>
-                    import ('../pagesPre/About'),
+                    import ('../pagesPre/UserOrder'),
                 meta: {
-                    title: '关于我们'
+                    title: '个人中心——订单管理',
+                    checkLogin: true,
+                    pageMenu: '个人中心',
+                    pageMenu2: '首页',
                 }
-            },
-            {
-                path: '/join',
-                name: 'join',
+            }, {
+                path: '/userSet',
+                name: 'userSet',
                 component: () =>
-                    import ('../pagesPre/Join'),
+                    import ('../pagesPre/UserSet'),
                 meta: {
-                    title: '加入我们'
+                    title: '账户设置',
+                    checkLogin: true,
+                    pageMenu: '个人中心',
+                    pageMenu2: '账户设置',
                 }
-            },
-            {
-                path: '/contact',
-                name: 'contact',
+            }, {
+                path: '/userSafe',
+                name: 'userSafe',
                 component: () =>
-                    import ('../pagesPre/Contact'),
+                    import ('../pagesPre/UserSafe'),
                 meta: {
-                    title: '联系我们'
+                    title: '安全设置',
+                    checkLogin: true,
+                    pageMenu: '个人中心',
+                    pageMenu2: '账户设置',
                 }
-            },
-            {
-                path: '/shop',
-                name: 'shop',
+            }, {
+                path: '/userCertification',
+                name: 'userCertification',
                 component: () =>
-                    import ('../pagesPre/Shop'),
+                    import ('../pagesPre/UserCertification'),
                 meta: {
-                    title: '店铺详情'
+                    title: '认证开店',
+                    checkLogin: true,
+                    pageMenu: '个人中心',
+                    pageMenu2: '账户设置',
                 }
-            },
-            {
-                path: '/product',
-                name: 'product',
+            }, {
+                path: '/userCollection',
+                name: 'userCollection',
                 component: () =>
-                    import ('../pagesPre/Product'),
+                    import ('../pagesPre/UserCollection'),
                 meta: {
-                    title: '商品详情'
+                    title: '用户收藏',
+                    checkLogin: true,
+                    pageMenu: '个人中心',
+                    pageMenu2: '首页',
                 }
-            }
-        ]
-    }, {
-        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,
-                pageMenu: '个人中心',
-                pageMenu2: '首页',
-            }
-        }, {
-            path: '/userOrder',
-            name: 'userOrder',
-            component: () =>
-                import ('../pagesPre/UserOrder'),
-            meta: {
-                title: '个人中心——订单管理',
-                checkLogin: true,
-                pageMenu: '个人中心',
-                pageMenu2: '首页',
-            }
-        }, {
-            path: '/userSet',
-            name: 'userSet',
-            component: () =>
-                import ('../pagesPre/UserSet'),
-            meta: {
-                title: '账户设置',
-                checkLogin: true,
-                pageMenu: '个人中心',
-                pageMenu2: '账户设置',
-            }
-        }, {
-            path: '/userSafe',
-            name: 'userSafe',
-            component: () =>
-                import ('../pagesPre/UserSafe'),
-            meta: {
-                title: '安全设置',
-                checkLogin: true,
-                pageMenu: '个人中心',
-                pageMenu2: '账户设置',
-            }
-        }, {
-            path: '/userCertification',
-            name: 'userCertification',
-            component: () =>
-                import ('../pagesPre/UserCertification'),
-            meta: {
-                title: '认证开店',
-                checkLogin: true,
-                pageMenu: '个人中心',
-                pageMenu2: '账户设置',
-            }
-        }, {
-            path: '/userCollection',
-            name: 'userCollection',
-            component: () =>
-                import ('../pagesPre/UserCollection'),
-            meta: {
-                title: '用户收藏',
-                checkLogin: true,
-                pageMenu: '个人中心',
-                pageMenu2: '首页',
-            }
-        }, {
-            path: '/memberPoint',
-            name: 'memberPoint',
-            component: () =>
-                import ('../pagesPre/MemberPoint'),
-            meta: {
-                title: '我的积分',
-                checkLogin: true,
-                pageMenu: '个人中心',
-                pageMenu2: '首页',
-            }
-        }, {
-            path: '/orderUpload',
-            name: 'orderUpload',
-            component: () =>
-                import ('../pagesPre/OrderUpload'),
-            meta: {
-                title: '上传照片',
-                checkLogin: true,
-                pageMenu: '个人中心',
-                pageMenu2: '无',
-            }
-        }, {
-            path: '/orderExamine',
-            name: 'orderExamine',
-            component: () =>
-                import ('../pagesPre/OrderExamine'),
-            meta: {
-                title: '审核照片',
-                checkLogin: true,
-                pageMenu: '个人中心',
-                pageMenu2: '无',
-            }
-        }, {
-            path: '/orderPreview',
-            name: 'orderPreview',
-            component: () =>
-                import ('../pagesPre/OrderPreview'),
-            meta: {
-                title: '预览照片',
-                checkLogin: true,
-                pageMenu: '个人中心',
-                pageMenu2: '无',
-            }
-        }, {
-            path: '/productComment',
-            name: 'productComment',
-            component: () =>
-                import ('../pagesPre/ProductComment'),
-            meta: {
-                title: '评论订单',
-                checkLogin: true,
-                pageMenu: '个人中心',
-                pageMenu2: '无',
-            }
+            }, {
+                path: '/memberPoint',
+                name: 'memberPoint',
+                component: () =>
+                    import ('../pagesPre/MemberPoint'),
+                meta: {
+                    title: '我的积分',
+                    checkLogin: true,
+                    pageMenu: '个人中心',
+                    pageMenu2: '首页',
+                }
+            }, {
+                path: '/orderUpload',
+                name: 'orderUpload',
+                component: () =>
+                    import ('../pagesPre/OrderUpload'),
+                meta: {
+                    title: '上传照片',
+                    checkLogin: true,
+                    pageMenu: '个人中心',
+                    pageMenu2: '无',
+                }
+            }, {
+                path: '/orderExamine',
+                name: 'orderExamine',
+                component: () =>
+                    import ('../pagesPre/OrderExamine'),
+                meta: {
+                    title: '审核照片',
+                    checkLogin: true,
+                    pageMenu: '个人中心',
+                    pageMenu2: '无',
+                }
+            }, {
+                path: '/orderPreview',
+                name: 'orderPreview',
+                component: () =>
+                    import ('../pagesPre/OrderPreview'),
+                meta: {
+                    title: '预览照片',
+                    checkLogin: true,
+                    pageMenu: '个人中心',
+                    pageMenu2: '无',
+                }
+            }, {
+                path: '/productComment',
+                name: 'productComment',
+                component: () =>
+                    import ('../pagesPre/ProductComment'),
+                meta: {
+                    title: '评论订单',
+                    checkLogin: true,
+                    pageMenu: '个人中心',
+                    pageMenu2: '无',
+                }
+            }, {
+                path: '/orderDetail',
+                name: 'orderDetail',
+                component: () =>
+                    import ('../pagesPre/OrderDetail'),
+                meta: {
+                    title: '订单详情',
+                    checkLogin: true,
+                    pageMenu: '个人中心',
+                    pageMenu2: '无',
+                }
+            }, {
+                path: '/userComment',
+                name: 'userComment',
+                component: () =>
+                    import ('../pagesPre/UserComment'),
+                meta: {
+                    title: '我的评价',
+                    checkLogin: true,
+                    pageMenu: '个人中心',
+                    pageMenu2: '首页',
+                }
+            }, {
+                path: '/userShop',
+                name: 'userShop',
+                component: () =>
+                    import ('../pagesPre/UserShop'),
+                meta: {
+                    title: '商家首页',
+                    checkLogin: true,
+                    pageMenu: '商家中心',
+                    pageMenu2: '首页',
+                }
+            }, {
+                path: '/shopOrder',
+                name: 'shopOrder',
+                component: () =>
+                    import ('../pagesPre/ShopOrder'),
+                meta: {
+                    title: '商家首页',
+                    checkLogin: true,
+                    pageMenu: '商家中心',
+                    pageMenu2: '首页',
+                }
+            }, {
+                path: '/userStore',
+                name: 'userStore',
+                component: () =>
+                    import ('../pagesPre/UserStore'),
+                meta: {
+                    title: '商家首页',
+                    checkLogin: true,
+                    pageMenu: '商家中心',
+                    pageMenu2: '首页',
+                }
+            }, {
+                path: '/userProductCon',
+                name: 'userProductCon',
+                component: () =>
+                    import ('../pagesPre/UserProductCon'),
+                meta: {
+                    title: '商家首页',
+                    checkLogin: true,
+                    pageMenu: '商家中心',
+                    pageMenu2: '首页',
+                }
+            }, {
+                path: '/productInfo',
+                name: 'productInfo',
+                component: () =>
+                    import ('../pagesPre/ProductInfo'),
+                meta: {
+                    title: '商家首页',
+                    checkLogin: true,
+                    pageMenu: '商家中心',
+                    pageMenu2: '首页',
+                }
+            }, {
+                path: '/orderUploadChange',
+                name: 'orderUploadChange',
+                component: () =>
+                    import ('../pagesPre/OrderUploadChange'),
+                meta: {
+                    title: '上传修图',
+                    checkLogin: true,
+                    pageMenu: '商家中心',
+                    pageMenu2: '首页',
+                }
+            }, {
+                path: '/storeComment',
+                name: 'storeComment',
+                component: () =>
+                    import ('../pagesPre/StoreComment'),
+                meta: {
+                    title: '店铺评论',
+                    checkLogin: true,
+                    pageMenu: '商家中心',
+                    pageMenu2: '首页',
+                }
+            }, {
+                path: '/customerServices',
+                name: 'customerServices',
+                component: () =>
+                    import ('../pagesPre/CustomerServices'),
+                meta: {
+                    title: '客服管理',
+                    checkLogin: true,
+                    pageMenu: '商家中心',
+                    pageMenu2: '账户设置',
+                }
+            }, {
+                path: '/customerService',
+                name: 'customerService',
+                component: () =>
+                    import ('../pagesPre/CustomerService'),
+                meta: {
+                    title: '客服编辑',
+                    checkLogin: true,
+                    pageMenu: '商家中心',
+                    pageMenu2: '账户设置',
+                }
+            }]
         }, {
-            path: '/orderDetail',
-            name: 'orderDetail',
+            path: '/',
             component: () =>
-                import ('../pagesPre/OrderDetail'),
-            meta: {
-                title: '订单详情',
-                checkLogin: true,
-                pageMenu: '个人中心',
-                pageMenu2: '无',
-            }
+                import ('../pagesPre/PageBottom'),
+            children: [{
+                path: '/register',
+                name: 'register',
+                component: () =>
+                    import ('../pagesPre/Register'),
+                meta: {
+                    title: '账户注册',
+                }
+            }]
         }, {
-            path: '/userComment',
-            name: 'userComment',
+            path: '/login',
+            name: 'login',
             component: () =>
-                import ('../pagesPre/UserComment'),
-            meta: {
-                title: '我的评价',
-                checkLogin: true,
-                pageMenu: '个人中心',
-                pageMenu2: '首页',
-            }
-        }]
-    }, {
-        path: '/',
-        component: () =>
-            import ('../pagesPre/PageBottom'),
-        children: [{
-            path: '/register',
-            name: 'register',
+                import ('../pagesPre/Login')
+        },
+        {
+            path: '/404',
+            name: '404',
             component: () =>
-                import ('../pagesPre/Register'),
-            meta: {
-                title: '账户注册',
-            }
-        }]
-    }, {
-        path: '/login',
-        name: 'login',
-        component: () =>
-            import ('../pagesPre/Login')
-    }]
+                import ('../pagesPre/404')
+        }
+    ]
 });
 router.beforeEach((to, from, next) => {
     //console.log(to);
@@ -292,11 +402,61 @@ router.beforeEach((to, from, next) => {
         return;
     }
 
+    if (store.state.userInfo) {
+        axios.get('/usersSession/all', {
+            params: {
+                userId: store.state.userInfo.id,
+                type: 0
+            }
+        }).then(res => {
+            if (res.data.success) {
+                store.commit('updateConversationList', res.data.data)
+            }
+        })
+    }
+
     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);
+                    axios.get('rong/getToken?rongKey=' + store.state.userInfo.id)
+                        .then(res => {
+                            if (res.data.appKey && res.data.token) {
+                                RongIM.init(res.data.appKey, res.data.token)
+                            }
+                        })
+                        .catch(e => {
+                            console.log(e)
+                        })
+
+                    axios.get('/usersSession/all', {
+                        params: {
+                            userId: store.state.userInfo.id,
+                            type: 0
+                        }
+                    }).then(res => {
+                        if (res.data.success) {
+                            store.commit('updateConversationList', res.data.data)
+                        }
+                    })
+
+
+
+                    if (store.state.userInfo.storeFlag == 'Y') {
+                        axios.get('storeInfo/getOne?userId=' + store.state.userInfo.id)
+                            .then(res => {
+                                if (res.data.success) {
+                                    store.commit('updateStoreInfo', res.data.data);
+                                }
+                            })
+                            .catch(e => {
+                                console.log(e)
+                            })
+                    }
+
+
+
                     next()
                     return;
                 }

+ 5 - 4
src/main/vue/src/vuex/index.js

@@ -7,7 +7,7 @@ export default new Vuex.Store({
     state: {
         tableHeight: 0,
         fetchingData: false,
-        userInfo: null
+        userInfo: null,
     },
     mutations: {
         updateTableHeight(state, height) {
@@ -20,6 +20,7 @@ export default new Vuex.Store({
             state.userInfo = userInfo
         }
     },
-    actions: {}
-})
-;
+    actions: {
+
+    }
+});

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

@@ -1,5 +1,8 @@
 import Vue from 'vue'
 import Vuex from 'vuex'
+import eventBus from '../eventBus'
+import axios from 'axios'
+import { stat } from 'fs';
 
 Vue.use(Vuex);
 
@@ -15,7 +18,10 @@ export default new Vuex.Store({
         orderStatus: {
             '修图': ['待付款', '待上传', '待修图', '待审片', '返修中', '待评论', '订单完成', '退款中', '取消'],
             '实体商品': ['待付款', '待发货', '已发货', '', '', '待评论', '订单完成', '退款中', '取消']
-        } //订单状态
+        }, //订单状态
+        IMConnected: false,
+        conversationList: [],
+        myStoreInfo: {}
     },
     mutations: {
         updateTableHeight(state, height) {
@@ -27,6 +33,9 @@ export default new Vuex.Store({
         updateUserInfo(state, userInfo) {
             state.userInfo = userInfo
         },
+        updateStoreInfo(state, myStoreInfo) {
+            state.myStoreInfo = myStoreInfo
+        },
         updateLocationInfo(state, location) {
             state.locationInfo = location
         },
@@ -36,6 +45,88 @@ export default new Vuex.Store({
         updateHrefHistory(state, list) {
             state.hrefHistory = list
         },
+        updateIMConnected(state, connected) {
+            state.IMConnected = connected
+        },
+        addConversation(state, conversation) {
+            state.conversationList.unshift(conversation)
+        },
+        updateOrAddConversation(state, conversation) {
+            let index = _.findIndex(state.conversationList, chr => {
+                return Number(chr.id) === Number(conversation.id)
+            })
+            if (index !== -1) {
+                Vue.set(state.conversationList, index, conversation)
+            } else {
+                state.conversationList.unshift(conversation)
+            }
+        },
+        removeConversation(state, conversation) {
+            console.log(conversation)
+            let index = _.findIndex(state.conversationList, chr => {
+                return Number(chr.id) === Number(conversation.id)
+            })
+            if (index !== -1) {
+                state.conversationList.splice(index, 1)
+            }
+        },
+        updateConversationList(state, conversationList) {
+            // state.conversationList = conversationList.map(item => {
+            //     return {
+            //         id: item.id,
+            //         time: item.chattime,
+            //         unread: item.amount,
+            //         content: item.chatInfo ? item.chatInfo.content : '',
+            //         name: item.nickName || '无名氏',
+            //         avatar: item.icon || require('../assets/default-avatar.png'),
+            //         toUserId: item.toUserId,
+            //         projectId: item.projectId,
+            //         projectInfo: item.projectInfo
+            //     }
+            // })
+            state.conversationList = conversationList
+        }
     },
-    actions: {}
+    actions: {
+        receiveMessage({ commit, state }, message) {
+            eventBus.$emit('receiveMessage', message)
+            let projectId = message.projectId
+            let index = _.findIndex(state.conversationList, i => {
+                if (Number(message.userId) === 1) {
+                    return Number(i.toUserId) === Number(message.userId)
+                } else {
+                    return Number(i.toUserId) === Number(message.userId) && Number(i.projectId) === Number(projectId)
+                }
+            })
+            let conversation
+            if (index !== -1) {
+                conversation = _.clone(state.conversationList[index])
+                conversation.unread += 1
+                conversation.time = message.receivedTime
+                conversation.content = message.content
+                commit('updateOrAddConversation', conversation)
+            } else {
+                // let newCon = {
+                //     userId: state.userInfo.id,
+                //     toUserId: message.userId
+                // }
+
+                // if (projectId) {
+                //     newCon.projectId = projectId
+                // }
+
+                // axios.post('/usersSession/save', newCon)
+                //     .then(res => {
+                //         if (res.success) {
+                //             commit('updateConversationList', res.data)
+                //         }
+                //     })
+                //     .catch(e => {
+                //         console.log(e);
+                //     })
+
+
+            }
+        }
+    }
 });

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików