panhui 7 năm trước cách đây
mục cha
commit
6c15f6a354
33 tập tin đã thay đổi với 86 bổ sung92 xóa
  1. 2 17
      src/main/vue/package-lock.json
  2. 1 1
      src/main/vue/package.json
  3. 10 10
      src/main/vue/src/entries/admin.js
  4. 16 2
      src/main/vue/src/entries/index.js
  5. 5 5
      src/main/vue/src/pagesPre/App.vue
  6. 14 6
      src/main/vue/src/pagesPre/Business.vue
  7. 1 10
      src/main/vue/src/pagesPre/ChatContent.vue
  8. 11 12
      src/main/vue/src/pagesPre/Index.vue
  9. 1 1
      src/main/vue/src/pagesPre/LogoFoot.vue
  10. 14 14
      src/main/vue/src/pagesPre/Product.vue
  11. 8 10
      src/main/vue/src/pagesPre/StoreChat.vue
  12. 3 3
      src/main/vue/src/pagesPre/UserCertification.vue
  13. 0 1
      src/main/webapp/static/css/index.fc403d7e6c4154f0f1d5f314e0087ea7.css
  14. 0 0
      src/main/webapp/static/js/0.740e830a488fc4d9cbd6.js
  15. 0 0
      src/main/webapp/static/js/1.7ea428a744a3dd94387a.js
  16. 0 0
      src/main/webapp/static/js/10.6f0cfd210153eda51b82.js
  17. 0 0
      src/main/webapp/static/js/11.fb1009c44d05426b3057.js
  18. 0 0
      src/main/webapp/static/js/13.66afedb05770c6018e87.js
  19. 0 0
      src/main/webapp/static/js/14.8b4a716649847b0f2b8a.js
  20. 0 0
      src/main/webapp/static/js/16.89b97548cb9acbc51f7d.js
  21. 0 0
      src/main/webapp/static/js/17.832ab36ab0dcf72f4ecc.js
  22. 0 0
      src/main/webapp/static/js/19.12e5845853fed3d3f396.js
  23. 0 0
      src/main/webapp/static/js/2.74d7a483b287d1b41ed3.js
  24. 0 0
      src/main/webapp/static/js/20.98c854f9242d1e781937.js
  25. 0 0
      src/main/webapp/static/js/22.e236d6002d6f1a0cf208.js
  26. 0 0
      src/main/webapp/static/js/3.79267df2427cb0a262a6.js
  27. 0 0
      src/main/webapp/static/js/4.d53278ca3b4325a50617.js
  28. 0 0
      src/main/webapp/static/js/43.7dbb7c19ee5f661b845d.js
  29. 0 0
      src/main/webapp/static/js/5.722cb5ceb01ef92def87.js
  30. 0 0
      src/main/webapp/static/js/6.961eb6cd435b23974f69.js
  31. 0 0
      src/main/webapp/static/js/admin.3725b6b904015686c98e.js
  32. 0 0
      src/main/webapp/static/js/manifest.16ed0f4c6867791a12eb.js
  33. 0 0
      src/main/webapp/static/js/vendor.dca531f3c9de411dd825.js

+ 2 - 17
src/main/vue/package-lock.json

@@ -1623,7 +1623,8 @@
     "camelcase": {
       "version": "1.2.1",
       "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz",
-      "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk="
+      "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=",
+      "dev": true
     },
     "camelcase-keys": {
       "version": "2.1.0",
@@ -10625,14 +10626,6 @@
       "integrity": "sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg=",
       "dev": true
     },
-    "uppercamelcase": {
-      "version": "1.1.0",
-      "resolved": "http://registry.npm.taobao.org/uppercamelcase/download/uppercamelcase-1.1.0.tgz",
-      "integrity": "sha1-Mk2YprOvx+iolT4QZBUJsOTiP5c=",
-      "requires": {
-        "camelcase": "1.2.1"
-      }
-    },
     "uri-js": {
       "version": "3.0.2",
       "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-3.0.2.tgz",
@@ -10796,14 +10789,6 @@
       "resolved": "https://registry.npmjs.org/vue/-/vue-2.5.16.tgz",
       "integrity": "sha512-/ffmsiVuPC8PsWcFkZngdpas19ABm5mh2wA7iDqcltyCTwlgZjHGeJYOXkBMo422iPwIcviOtrTCUpSfXmToLQ=="
     },
-    "vue-amap": {
-      "version": "0.5.8",
-      "resolved": "https://registry.npmjs.org/vue-amap/-/vue-amap-0.5.8.tgz",
-      "integrity": "sha512-VWU6M58jAY4K80QGi+2tYWxvAszd/MQiWkBEYdyu2ptBHAgsNfZz2zxR1mWL32V74Q2bFoZz4yfOycMrQywlUA==",
-      "requires": {
-        "uppercamelcase": "1.1.0"
-      }
-    },
     "vue-axios": {
       "version": "2.1.1",
       "resolved": "https://registry.npmjs.org/vue-axios/-/vue-axios-2.1.1.tgz",

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

@@ -80,4 +80,4 @@
         "last 2 versions",
         "not ie <= 8"
     ]
-}
+}

+ 10 - 10
src/main/vue/src/entries/admin.js

@@ -7,12 +7,12 @@ import axios from 'axios'
 import MultiUpload from '../components/MultiUpload'
 import SingleUpload from '../components/SingleUpload'
 import VueI18n from 'vue-i18n'
-import VueAMap from 'vue-amap'
+// import VueAMap from 'vue-amap'
 
 import 'normalize.css/normalize.css'
 import 'element-ui/lib/theme-chalk/index.css'
 import '../main.less'
-import {format} from 'date-fns'
+import { format } from 'date-fns'
 import zh from 'date-fns/locale/zh_cn'
 
 VueAMap.initAMapApiLoader({
@@ -34,7 +34,7 @@ Vue.prototype.$http = {
     get(params) {
         return new Promise((resolve, reject) => {
             if (params instanceof String) {
-                params = {url: params};
+                params = { url: params };
             } else if (!params instanceof Object) {
                 reject('params error');
                 return;
@@ -55,7 +55,7 @@ Vue.prototype.$http = {
             store.commit('updateFetchingData', true);
             axios.get(params.url, {
                 params: params.data
-            }, {withCredentials: true}).then(res => {
+            }, { withCredentials: true }).then(res => {
                 store.commit('updateFetchingData', false);
                 if (res.status === 200) {
                     resolve(res.data);
@@ -82,7 +82,7 @@ Vue.prototype.$http = {
     },
     post(params) {
         if (params instanceof String) {
-            params = {url: params};
+            params = { url: params };
         } else if (!params instanceof Object) {
             reject('params error');
             return;
@@ -122,7 +122,7 @@ Vue.prototype.$http = {
         }
         return new Promise((resolve, reject) => {
             store.commit('updateFetchingData', true);
-            axios.post(params.url, data, {withCredentials: true}).then(res => {
+            axios.post(params.url, data, { withCredentials: true }).then(res => {
                 store.commit('updateFetchingData', false);
                 if (res.status === 200) {
                     resolve(res.data);
@@ -151,11 +151,11 @@ Vue.prototype.$http = {
 Vue.mixin({
     methods: {
         timeFormatter(row, column, cellValue, index) {
-            return format(new Date(cellValue), 'HH:mm', {locale: zh})
+            return format(new Date(cellValue), 'HH:mm', { locale: zh })
         },
         datetimeFormatter(row, column, cellValue, index) {
             if (!cellValue) return ''
-            return format(new Date(cellValue), 'YYYY/MM/DD HH:mm', {locale: zh})
+            return format(new Date(cellValue), 'YYYY/MM/DD HH:mm', { locale: zh })
         }
     }
 });
@@ -179,6 +179,6 @@ new Vue({
     el: '#app',
     router,
     store,
-    components: {Main},
+    components: { Main },
     template: '<Main/>'
-});
+});

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

@@ -7,8 +7,8 @@ import axios from 'axios'
 import MultiUpload from '../components/MultiUpload'
 import SingleUpload from '../components/SingleUpload'
 import SingleUploadTitle from '../components/SingleUploadTitle'
+// import moment from 'moment'
 import VueI18n from 'vue-i18n'
-import moment from 'moment'
 import RongIM from '../RongIM'
 Vue.use(RongIM)
 
@@ -18,6 +18,8 @@ import 'normalize.css/normalize.css'
 import '../mainPre.less'
 import '../emUI.less'
 import { format } from 'date-fns'
+
+import distanceInWordsToNow from 'date-fns/distance_in_words_to_now'
 import zh from 'date-fns/locale/zh_cn'
 
 
@@ -173,7 +175,8 @@ Vue.prototype.$http = {
 
 Vue.prototype.getTime = function(str) {
     if (str) {
-        return moment(str).format('YYYY-MM-DD HH:mm')
+        // return moment(str).format('YYYY-MM-DD HH:mm')
+        return format(new Date(str), 'YYYY-MM-DD HH:mm', { locale: zh })
     } else {
         return ''
     }
@@ -258,6 +261,17 @@ Vue.prototype.checkHas = function(data) {
 }
 
 
+//获取距离现在时间
+Vue.prototype.forNow = function(str) {
+    var time = ''
+    if (str) {
+        // time = moment(str).fromNow()
+        time = distanceInWordsToNow(new Date(str), { locale: zh, addSuffix: true })
+    }
+    return time
+}
+
+
 
 Vue.mixin({
     methods: {

+ 5 - 5
src/main/vue/src/pagesPre/App.vue

@@ -31,7 +31,7 @@
                                     <div class="serive-item" v-for="(item,index) in serviceType">
                                         <div class="title">{{item.serviceType}}</div>
                                         <div class="serive-val-list">
-                                            <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>
+                                            <router-link :to='{name:"business",query:{serviceId:(index+1),littleId:todo.id}}' class="service-val" v-for="todo in item.serviceTypeDetailList">{{todo.typeName}}</router-link>
                                         </div>
                                     </div>
                                 </div>
@@ -95,8 +95,8 @@ export default {
             if (this.$route.name == 'index') {
                 this.nowMenu = 0
                 this.isBottom = false
-            } else if (this.$route.name == 'business') {
-                this.nowMenu = parseInt(this.$route.query.id)
+            }else if (this.$route.name == 'business') {
+                this.nowMenu = parseInt(this.$route.query.serviceId)
                 this.isBottom = true
             } else {
                 this.nowMenu = -1
@@ -222,7 +222,7 @@ export default {
             this.$router.replace({
                 name: "business",
                 query: {
-                    id: index
+                    serviceId: index
                 }
             })
         },
@@ -283,7 +283,7 @@ export default {
                 this.isBottom = false
             }
             else if (this.$route.name == 'business') {
-                this.nowMenu = parseInt(this.$route.query.id)
+                this.nowMenu = parseInt(this.$route.query.serviceId)
                 this.isBottom = true
             }
             else {

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

@@ -141,7 +141,8 @@ export default {
             orderByStr: '',
             creditOrder: '',
             responseOrder: '',
-            reworkOrder: ''
+            reworkOrder: '',
+            queryId: 0
         }
     },
     computed: {
@@ -239,8 +240,16 @@ export default {
         }, 500)
     },
     watch: {
-        $route() {
-            this.freash()
+        "$route.query"() {
+            console.log(this.$route.query.serviceId)
+            if (this.$route.query.serviceId) {
+                if (this.nowIndex != parseInt(this.$route.query.serviceId) - 1) {
+                    this.freash()
+                }
+
+            }
+
+
         },
         address() {
             if (this.address == 0) {
@@ -313,8 +322,8 @@ export default {
     },
     methods: {
         freash() {
-            if (this.$route.query.id) {
-                this.nowIndex = parseInt(this.$route.query.id) - 1
+            if (this.$route.query.serviceId) {
+                this.nowIndex = parseInt(this.$route.query.serviceId) - 1
             }
 
             document.title = this.serviceType[this.nowIndex].shortName
@@ -413,7 +422,6 @@ export default {
 
             data.orderByStr = ''
 
-            console.log(this.creditOrder)
 
             if (this.creditOrder) {
                 data.orderByStr += 'credit_,' + this.orderType[this.creditOrder]

+ 1 - 10
src/main/vue/src/pagesPre/ChatContent.vue

@@ -17,7 +17,7 @@
                         <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>
+                            <span>{{forNow(item.updateTime)}}</span>
                         </div>
                         <div class="close" @click.stop='del(item,index)'>
                             <i class="el-icon-error"></i>
@@ -65,8 +65,6 @@
 
 <script>
 import { mapState } from 'vuex'
-import moment from 'moment'
-import 'moment/locale/zh-cn'
 import eventBus from '../eventBus'
 export default {
     created() {
@@ -171,13 +169,6 @@ export default {
             this.storeId = item.storeId
             this.getChatInfo(item.storeId)
         },
-        getTime(str) {
-            var time = ''
-            if (str) {
-                time = moment(str).fromNow()
-            }
-            return time
-        },
         getChatInfo(id) {
             this.isLeft = false
             this.chatList = []

+ 11 - 12
src/main/vue/src/pagesPre/Index.vue

@@ -53,7 +53,7 @@
                     <div class="subTitle">
                         {{item.description}}
                     </div>
-                    <router-link class='more' :to='{name:"business",query:{id:(index+1)}}'>查看更多 ></router-link>
+                    <router-link class='more' :to='{name:"business",query:{serviceId:(index+1)}}'>查看更多 ></router-link>
                 </div>
                 <div class="box-content">
                     <div class="box-left" :style="{backgroundImage:'url('+item.image+')'}"></div>
@@ -105,7 +105,7 @@
                     <div class="newShop-list">
                         <router-link :to='{name:"shop",query:{id:item.id,breHref:breHref}}' class="newShop-item" v-for="item in newShop">
                             <span>{{item.storeName}}</span>
-                            <span style="color:#1BB8AC">{{getTime(item.createTime)}}</span>
+                            <span style="color:#1BB8AC">{{forNow(item.createTime)}}</span>
                             <span>入住了平台</span>
                         </router-link>
                     </div>
@@ -121,7 +121,7 @@
                     <div class="newShop-list">
                         <div class="newShop-item" v-for="item in orderList">
                             <span>{{item.userInfo?item.userInfo.nickname:''}}</span>
-                            <span style="color:#1BB8AC">{{getTime(item.createTime)}}</span>
+                            <span style="color:#1BB8AC">{{forNow(item.createTime)}}</span>
                             <span>提交了订单</span>
                         </div>
                     </div>
@@ -169,8 +169,6 @@ window.onresize = function () {
 import goodsLittle from '../components/GoodsLittle'
 import menuFoot from '../pagesPre/MenuFoot'
 import { mapState } from 'vuex'
-import moment from 'moment'
-import 'moment/locale/zh-cn'
 export default {
     name: 'home',
     data() {
@@ -280,13 +278,14 @@ export default {
         }
     },
     methods: {
-        getTime(str) {
-            var time = ''
-            if (str) {
-                time = moment(str).fromNow()
-            }
-            return time
-        },
+        // getTime(str) {
+        //     var time = ''
+        //     if (str) {
+        //         // time = moment(str).fromNow()
+        //         time= distanceInWordsToNow(new Date(str), { locale: cn, addSuffix: true })
+        //     }
+        //     return time
+        // },
         goBanner(banner) {
             console.log(banner)
             if (banner) {

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

@@ -8,7 +8,7 @@
                             <router-link :to='{name:"index"}'>首页</router-link>
                         </li>
                         <li v-for="(item,index) in serviceType">
-                            <router-link :to='{name:"business",query:{id:(index+1)}}' class="service-val">{{item.shortName}}</router-link>
+                            <router-link :to='{name:"business",query:{serviceId:(index+1)}}' class="service-val">{{item.shortName}}</router-link>
                         </li>
                         <!-- <li>
                             <a href="#">修图商</a>

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

@@ -181,20 +181,20 @@ 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.$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)
+        // })
 
     },
     methods: {

+ 8 - 10
src/main/vue/src/pagesPre/StoreChat.vue

@@ -36,7 +36,7 @@
                             <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>
+                                <span>{{forNow(item.updateTime)}}</span>
                             </div>
                             <div class="close" @click.stop='del(item,index)'>
                                 <i class="el-icon-error"></i>
@@ -68,8 +68,6 @@
 <script>
 import { mapState } from 'vuex'
 import orderItem from '../components/OrderItem'
-import moment from 'moment'
-import 'moment/locale/zh-cn'
 import eventBus from '../eventBus'
 export default {
     name: 'order',
@@ -245,13 +243,13 @@ export default {
                 console.log(e)
             })
         },
-        getTime(str) {
-            var time = ''
-            if (str) {
-                time = moment(str).fromNow()
-            }
-            return time
-        },
+        // getTime(str) {
+        //     var time = ''
+        //     if (str) {
+        //         time = moment(str).fromNow()
+        //     }
+        //     return time
+        // },
         del(item, index) {
             console.log(item)
 

+ 3 - 3
src/main/vue/src/pagesPre/UserCertification.vue

@@ -78,7 +78,7 @@ import setStoreInfo from '../pagesPre/SetStoreInfo'
 import guaranteeMoney from '../pagesPre/GuaranteeMoney'
 import systemState from '../pagesPre/SystemState'
 import cityData from '../city'
-import moment from 'moment'
+// import moment from 'moment'
 export default {
     name: 'order',
     data() {
@@ -151,7 +151,7 @@ export default {
                         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')
+                        res.data.companyTime = format(new Date(res.data.companyTime), 'YYYY', { locale: zh })
                         this.formData1 = res.data;
                     }
 
@@ -192,7 +192,7 @@ export default {
                 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))
+                data.companyTime = Date.parse(new Date(data.companyTime))
                 if (!this.formData1.id) {
                     data.userId = this.userInfo.id
                     data.userName = this.userInfo.username

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 1
src/main/webapp/static/css/index.fc403d7e6c4154f0f1d5f314e0087ea7.css


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
src/main/webapp/static/js/0.740e830a488fc4d9cbd6.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
src/main/webapp/static/js/1.7ea428a744a3dd94387a.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
src/main/webapp/static/js/10.6f0cfd210153eda51b82.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
src/main/webapp/static/js/11.fb1009c44d05426b3057.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
src/main/webapp/static/js/13.66afedb05770c6018e87.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
src/main/webapp/static/js/14.8b4a716649847b0f2b8a.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
src/main/webapp/static/js/16.89b97548cb9acbc51f7d.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
src/main/webapp/static/js/17.832ab36ab0dcf72f4ecc.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
src/main/webapp/static/js/19.12e5845853fed3d3f396.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
src/main/webapp/static/js/2.74d7a483b287d1b41ed3.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
src/main/webapp/static/js/20.98c854f9242d1e781937.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
src/main/webapp/static/js/22.e236d6002d6f1a0cf208.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
src/main/webapp/static/js/3.79267df2427cb0a262a6.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
src/main/webapp/static/js/4.d53278ca3b4325a50617.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
src/main/webapp/static/js/43.7dbb7c19ee5f661b845d.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
src/main/webapp/static/js/5.722cb5ceb01ef92def87.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
src/main/webapp/static/js/6.961eb6cd435b23974f69.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
src/main/webapp/static/js/admin.3725b6b904015686c98e.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
src/main/webapp/static/js/manifest.16ed0f4c6867791a12eb.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
src/main/webapp/static/js/vendor.dca531f3c9de411dd825.js


Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác