From 0faa495d95e82f3be14d59925e3bf6bbf8053a70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A5=9D=E6=A2=A6=E5=9B=AD?= Date: Tue, 27 Feb 2024 16:51:34 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E5=8D=8A=E6=88=90=E5=93=81-=E4=BA=A7?= =?UTF-8?q?=E5=93=81=E7=AE=A1=E7=90=86=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/admin/product/post/_product_id.vue | 3 +- pages/admin/products.vue | 236 +++++++++++++++-------- 2 files changed, 157 insertions(+), 82 deletions(-) diff --git a/pages/admin/product/post/_product_id.vue b/pages/admin/product/post/_product_id.vue index 2427d0b..faaf91a 100644 --- a/pages/admin/product/post/_product_id.vue +++ b/pages/admin/product/post/_product_id.vue @@ -62,7 +62,7 @@ import {mapState} from 'vuex'; import apiConfig from '~/config/api.config'; export default { - name: "PostArticle", + name: "PostProducts", middleware: 'auth', validate({params, store}) { if (typeof params.product_id === 'undefined') { @@ -379,6 +379,7 @@ export default { window.onbeforeunload = null; }, async mounted() { + console.log('??') if (!this.hasPermissions) { return } diff --git a/pages/admin/products.vue b/pages/admin/products.vue index f94ae64..9286384 100644 --- a/pages/admin/products.vue +++ b/pages/admin/products.vue @@ -1,83 +1,125 @@ From 0e669aab002c3a63f62ce68d7c5acd1a7154882d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A5=9D=E6=A2=A6=E5=9B=AD?= Date: Wed, 6 Mar 2024 16:49:05 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E6=9A=82=E5=AD=98-fix=E5=88=B7=E6=96=B0?= =?UTF-8?q?=E8=B7=AF=E7=94=B1=E8=B7=B3=E8=BD=AC=E4=B8=A2=E5=A4=B1=E5=92=8C?= =?UTF-8?q?name=E4=B8=8D=E5=AD=98=E5=9C=A8bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/ImgCropper.vue | 5 - pages/admin.vue | 24 +- .../admin/{products.vue => product/index.vue} | 115 ++- pages/admin/product/post/_product_id.vue | 853 +++++++++--------- pages/user/settings/account.vue | 3 +- 5 files changed, 499 insertions(+), 501 deletions(-) rename pages/admin/{products.vue => product/index.vue} (67%) diff --git a/components/ImgCropper.vue b/components/ImgCropper.vue index 8b0e8b9..3c45736 100644 --- a/components/ImgCropper.vue +++ b/components/ImgCropper.vue @@ -75,13 +75,8 @@ export default { methods: { onSubmit() { this.$refs.cropper.getCropData(data => { - // console.log(data) this.$emit('onSubmit',data) }); - - /* - this.$emit('onSubmit',this.cropImg) - */ }, onOpen() { this.oldAvatarUrl = JSON.parse(JSON.stringify(this.avatarUrl)) diff --git a/pages/admin.vue b/pages/admin.vue index d5bd9a0..ca02b03 100644 --- a/pages/admin.vue +++ b/pages/admin.vue @@ -1,13 +1,13 @@