From d7c60b817bf37ffd9d2ed65703baeb655aedd1a6 Mon Sep 17 00:00:00 2001 From: hupeng Date: Mon, 17 Feb 2020 10:22:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=AF=AD=E6=B3=95=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .eslintignore | 1 + src/api/yxStoreOrder.js | 2 +- src/components/file-upload/index.vue | 30 +- src/components/material/index.vue | 677 ++++++++++++------------ src/components/pic-upload-two/index.vue | 12 +- src/components/pic-upload/index.vue | 12 +- src/components/pic-upload2/index.vue | 82 --- src/utils/index.js | 4 +- src/views/activity/bargain/form.vue | 20 +- src/views/activity/bargain/index.vue | 10 +- src/views/activity/combination/form.vue | 18 +- src/views/activity/seckill/form.vue | 18 +- src/views/components/Editor.vue | 2 +- src/views/dashboard/PanelGroup.vue | 2 +- src/views/dashboard/PanelGroupT.vue | 2 +- src/views/dashboard/YshopInfo.vue | 24 +- src/views/home.vue | 2 - src/views/monitor/log/mlog.vue | 11 +- src/views/monitor/online/indext.vue | 2 +- src/views/shop/cate/form.vue | 121 ----- src/views/shop/cate/index.vue | 8 +- src/views/shop/goods/form.vue | 14 +- src/views/shop/order/detail.vue | 2 +- src/views/shop/order/edit.vue | 10 +- src/views/shop/order/form.vue | 19 +- src/views/shop/order/index.vue | 98 ++-- src/views/shop/order/refund.vue | 10 +- src/views/shop/order/remark.vue | 8 +- src/views/shop/set/act.vue | 2 +- src/views/shop/set/actform.vue | 8 +- src/views/shop/set/form.vue | 8 +- src/views/shop/set/menuform.vue | 8 +- src/views/shop/set/usermenu.vue | 2 +- src/views/shop/set/usermenuform.vue | 8 +- src/views/shop/user/index.vue | 18 +- src/views/shop/userlevel/form.vue | 14 +- src/views/wechat/article/form.vue | 8 +- src/views/wechat/config/index.vue | 10 +- src/views/wechat/config/pay.vue | 4 +- vue.config.js | 2 +- 40 files changed, 567 insertions(+), 746 deletions(-) delete mode 100644 src/components/pic-upload2/index.vue delete mode 100644 src/views/shop/cate/form.vue 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 @@