diff --git a/.eslintignore b/.eslintignore index e6529fc..4fb3810 100644 --- a/.eslintignore +++ b/.eslintignore @@ -2,3 +2,4 @@ build/*.js src/assets public dist +src/views diff --git a/src/api/yxStoreOrder.js b/src/api/yxStoreOrder.js index 70e0116..cfc76d7 100644 --- a/src/api/yxStoreOrder.js +++ b/src/api/yxStoreOrder.js @@ -50,6 +50,6 @@ export function remark(data) { export function get() { return request({ url: 'api/yxExpress', - method: 'get', + method: 'get' }) } diff --git a/src/components/file-upload/index.vue b/src/components/file-upload/index.vue index 9017e44..68880fa 100644 --- a/src/components/file-upload/index.vue +++ b/src/components/file-upload/index.vue @@ -9,7 +9,7 @@ :file-list="fileList" multiple :limit="1" - > + > 点击上传 @@ -19,7 +19,13 @@ import { getToken } from '@/utils/auth' import { mapGetters } from 'vuex' export default { - data () { + props: { + value: { + default: '', + type: String + } + }, + data() { return { resourcesUrl: '', headers: { @@ -27,35 +33,29 @@ export default { } } }, - props: { - value: { - default: '', - type: String - } - }, computed: { ...mapGetters([ 'uploadApi' ]), - fileList () { - let res = [] + fileList() { + const res = [] if (this.value) { - res.push({name: this.value, url: this.resourcesUrl + this.value, response: this.value}) + res.push({ name: this.value, url: this.resourcesUrl + this.value, response: this.value }) } this.$emit('input', this.value) - console.log("res"+res) + console.log('res' + res) return res } }, methods: { // 图片上传 - handleUploadSuccess (response, file, fileList) { + handleUploadSuccess(response, file, fileList) { this.$emit('input', file.response.link) }, - handleRemove (file, fileList) { + handleRemove(file, fileList) { this.$emit('change', file) }, - beforeRemove (file, fileList) { + beforeRemove(file, fileList) { return this.$confirm(`确定移除 ${file.name}?`) } } diff --git a/src/components/material/index.vue b/src/components/material/index.vue index ec28582..7ac92f7 100644 --- a/src/components/material/index.vue +++ b/src/components/material/index.vue @@ -1,34 +1,35 @@ --> diff --git a/src/utils/index.js b/src/utils/index.js index f224280..54664f0 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -95,7 +95,7 @@ export function formatTimeTwo(time) { time = time * 1000 const d = new Date(time) return ( - d.getFullYear()+'年'+ + d.getFullYear() + '年' + (d.getMonth() + 1) + '月' + d.getDate() + @@ -105,10 +105,8 @@ export function formatTimeTwo(time) { d.getMinutes() + '分' ) - } - /** * @param {string} url * @returns {Object} diff --git a/src/views/activity/bargain/form.vue b/src/views/activity/bargain/form.vue index 1ea9cfc..d192ac1 100644 --- a/src/views/activity/bargain/form.vue +++ b/src/views/activity/bargain/form.vue @@ -30,10 +30,10 @@ - + - + @@ -98,13 +98,11 @@ - - diff --git a/src/views/shop/cate/index.vue b/src/views/shop/cate/index.vue index 8cef3f6..2091edf 100644 --- a/src/views/shop/cate/index.vue +++ b/src/views/shop/cate/index.vue @@ -16,7 +16,7 @@ - + @@ -98,16 +98,16 @@ export default { ] } }, - watch:{ + watch: { picArr: function(val) { - this.form.pic = val.join(","); + this.form.pic = val.join(',') } }, methods: { // 新增与编辑前做的操作 [CRUD.HOOK.afterToCU](crud, form) { console.log(form) - if(form.pic){ + if (form.pic) { this.picArr = form.pic.split(',') } diff --git a/src/views/shop/goods/form.vue b/src/views/shop/goods/form.vue index acf9bc3..9988df9 100644 --- a/src/views/shop/goods/form.vue +++ b/src/views/shop/goods/form.vue @@ -17,10 +17,10 @@ - + - + @@ -151,15 +151,15 @@ export default { } } }, - watch:{ + watch: { 'form.imageArr': function(val) { - if(val){ - this.form.image = val.join(","); + if (val) { + this.form.image = val.join(',') } }, 'form.sliderImageArr': function(val) { - if(val){ - this.form.sliderImage = val.join(","); + if (val) { + this.form.sliderImage = val.join(',') } } }, diff --git a/src/views/shop/order/detail.vue b/src/views/shop/order/detail.vue index fe85ecc..0ec0ad1 100644 --- a/src/views/shop/order/detail.vue +++ b/src/views/shop/order/detail.vue @@ -115,7 +115,7 @@ export default { rules: { unique: [ { required: true, message: 'please enter', trigger: 'blur' } - ], + ] } } }, diff --git a/src/views/shop/order/edit.vue b/src/views/shop/order/edit.vue index b95882d..2cec088 100644 --- a/src/views/shop/order/edit.vue +++ b/src/views/shop/order/edit.vue @@ -1,14 +1,14 @@