From 3f4396598a143d4606ff20965f0acaa328087dd5 Mon Sep 17 00:00:00 2001 From: From-wh Date: Thu, 27 Apr 2023 11:38:55 +0800 Subject: [PATCH 1/8] =?UTF-8?q?feat:=20=E5=90=8E=E5=8F=B0=E5=A4=B4?= =?UTF-8?q?=E5=83=8F=E5=8F=8A=E7=BC=96=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/admin/package.json | 1 + template/admin/src/api/setting.js | 15 + .../admin/src/components/cropperImg/index.vue | 280 ++++++++++++++++++ .../src/layout/navBars/breadcrumb/user.vue | 6 +- .../admin/src/pages/setting/user/index.vue | 31 +- template/admin/src/store/module/userInfo.js | 3 + 6 files changed, 332 insertions(+), 4 deletions(-) create mode 100644 template/admin/src/components/cropperImg/index.vue diff --git a/template/admin/package.json b/template/admin/package.json index 99d6bc30c..6bf1853e9 100644 --- a/template/admin/package.json +++ b/template/admin/package.json @@ -60,6 +60,7 @@ "vue-awesome-swiper": "^4.1.1", "vue-clipboard2": "^0.3.3", "vue-codemirror": "^4.0.6", + "vue-cropper": "^0.5.11", "vue-happy-scroll": "^2.1.1", "vue-i18n": "^7.8.0", "vue-pickers": "^2.5.3", diff --git a/template/admin/src/api/setting.js b/template/admin/src/api/setting.js index 3a581e0a0..fe8914ce6 100644 --- a/template/admin/src/api/setting.js +++ b/template/admin/src/api/setting.js @@ -9,6 +9,7 @@ // +---------------------------------------------------------------------- import request from '@/libs/request'; +import { getCookies } from '@/libs/util'; /** * @description 设置 系统设置 应用设置头部 @@ -1122,3 +1123,17 @@ export function codeCrud(data) { data, }); } +/** + * @description 图片上传 + */ +export function fileUpload(data) { + return request({ + url: `file/upload`, + method: 'post', + headers: { + 'Authori-zation': 'Bearer ' + getCookies('token'), + 'content-type': 'multipart/form-data;' + 'Bearer ' + getCookies('token'), + }, + data, + }); +} diff --git a/template/admin/src/components/cropperImg/index.vue b/template/admin/src/components/cropperImg/index.vue new file mode 100644 index 000000000..de55fb16d --- /dev/null +++ b/template/admin/src/components/cropperImg/index.vue @@ -0,0 +1,280 @@ + + + + + diff --git a/template/admin/src/layout/navBars/breadcrumb/user.vue b/template/admin/src/layout/navBars/breadcrumb/user.vue index 7b15cfd32..b47c09baa 100644 --- a/template/admin/src/layout/navBars/breadcrumb/user.vue +++ b/template/admin/src/layout/navBars/breadcrumb/user.vue @@ -54,7 +54,7 @@ - + {{ getUserInfos.account === '' ? 'test' : getUserInfos.account }} @@ -262,8 +262,8 @@ export default { align-items: center; white-space: nowrap; &-photo { - width: 25px; - height: 25px; + width: 30px; + height: 30px; border-radius: 100%; } } diff --git a/template/admin/src/pages/setting/user/index.vue b/template/admin/src/pages/setting/user/index.vue index 73a3ada2b..6df404d89 100644 --- a/template/admin/src/pages/setting/user/index.vue +++ b/template/admin/src/pages/setting/user/index.vue @@ -2,6 +2,12 @@
+ +
+ + +
+
@@ -22,14 +28,19 @@
+ + +
- diff --git a/template/admin/src/store/module/userInfo.js b/template/admin/src/store/module/userInfo.js index 577687e51..04bc31a49 100644 --- a/template/admin/src/store/module/userInfo.js +++ b/template/admin/src/store/module/userInfo.js @@ -59,6 +59,9 @@ export default { userRealName(state, realName) { state.userInfo.real_name = realName; }, + userRealHeadPic(state, headPic) { + state.userInfo.head_pic = headPic; + }, uniqueAuth(state, uniqueAuth) { state.uniqueAuth = uniqueAuth; }, From 487909a8946be111e81f4a7a8dd27d1c360c6d71 Mon Sep 17 00:00:00 2001 From: From-wh Date: Thu, 27 Apr 2023 11:39:15 +0800 Subject: [PATCH 2/8] =?UTF-8?q?improve:=20=E4=BB=A3=E7=A0=81=E7=94=9F?= =?UTF-8?q?=E6=88=90=E5=88=A0=E9=99=A4=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/pages/system/codeGeneration/components/TableForm.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template/admin/src/pages/system/codeGeneration/components/TableForm.vue b/template/admin/src/pages/system/codeGeneration/components/TableForm.vue index 952298ad0..84d08611a 100644 --- a/template/admin/src/pages/system/codeGeneration/components/TableForm.vue +++ b/template/admin/src/pages/system/codeGeneration/components/TableForm.vue @@ -77,7 +77,7 @@
--
From 422cb2858557858afe29a3fc7df3911cd9b1329c Mon Sep 17 00:00:00 2001 From: From-wh Date: Thu, 27 Apr 2023 11:39:40 +0800 Subject: [PATCH 3/8] =?UTF-8?q?improve:=20=E5=9C=B0=E5=9D=80=E5=88=B7?= =?UTF-8?q?=E6=96=B0;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/uni-app/pages/goods/order_confirm/index.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/template/uni-app/pages/goods/order_confirm/index.vue b/template/uni-app/pages/goods/order_confirm/index.vue index 4e38c72b3..e36f8abfb 100644 --- a/template/uni-app/pages/goods/order_confirm/index.vue +++ b/template/uni-app/pages/goods/order_confirm/index.vue @@ -338,7 +338,7 @@ } ], - virtual_type: 0, + virtual_type: 0, allPrice: 0, formContent: '', payType: '', //支付方式 @@ -946,6 +946,7 @@ onAddress: function() { let that = this; if (this.addressInfo.real_name) { + this.$refs.addressWindow.getAddressList(); that.textareaStatus = false; that.address.address = true; that.pagesUrl = '/pages/users/user_address_list/index?news=' + this.news + '&cartId=' + this @@ -954,6 +955,7 @@ this.pinkId + '&couponId=' + this.couponId; + } else { uni.navigateTo({ url: '/pages/users/user_address/index?cartId=' + this.cartId + '&pinkId=' + this From 68b99f531af16c329f24b1e4cbfb5cedde1167f3 Mon Sep 17 00:00:00 2001 From: liaofei <136327134@qq.com> Date: Thu, 27 Apr 2023 11:49:42 +0800 Subject: [PATCH 4/8] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/app/services/system/SystemCrudServices.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crmeb/app/services/system/SystemCrudServices.php b/crmeb/app/services/system/SystemCrudServices.php index 251872c38..0109ef53f 100644 --- a/crmeb/app/services/system/SystemCrudServices.php +++ b/crmeb/app/services/system/SystemCrudServices.php @@ -148,6 +148,10 @@ class SystemCrudServices extends BaseServices 'addSoftDelete', ], 'form' => [ + [ + 'value' => '', + 'label' => '请选择', + ], [ 'value' => 'input', 'label' => '输入框', From c6b814af07aef882c95573a5054cc9a61724f7f7 Mon Sep 17 00:00:00 2001 From: From-wh Date: Thu, 27 Apr 2023 16:23:47 +0800 Subject: [PATCH 5/8] =?UTF-8?q?style:=20=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/admin/package-lock.json | 5 +++++ template/admin/src/pages/setting/user/index.vue | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/template/admin/package-lock.json b/template/admin/package-lock.json index 3a8b9ed35..1af86ccc8 100644 --- a/template/admin/package-lock.json +++ b/template/admin/package-lock.json @@ -23078,6 +23078,11 @@ "diff-match-patch": "^1.0.0" } }, + "vue-cropper": { + "version": "0.5.11", + "resolved": "https://registry.npmmirror.com/vue-cropper/-/vue-cropper-0.5.11.tgz", + "integrity": "sha512-UeA3qL2BLCTGkOEAxEsxSNFO+qLYAn6YRHv4oS32cP9lMhF1vFmnAf/z+ZamtR0/Fh3sbZeZUCLVR2Ol2/dpTQ==" + }, "vue-eslint-parser": { "version": "7.11.0", "resolved": "https://registry.npmmirror.com/vue-eslint-parser/-/vue-eslint-parser-7.11.0.tgz", diff --git a/template/admin/src/pages/setting/user/index.vue b/template/admin/src/pages/setting/user/index.vue index 6df404d89..1c4b4f8a9 100644 --- a/template/admin/src/pages/setting/user/index.vue +++ b/template/admin/src/pages/setting/user/index.vue @@ -28,7 +28,7 @@ - + From 43e7a1f5a1b89c91b94d0a8aa728e1acfffb424b Mon Sep 17 00:00:00 2001 From: From-wh Date: Thu, 27 Apr 2023 16:24:12 +0800 Subject: [PATCH 6/8] =?UTF-8?q?improve:=20=E9=89=B4=E6=9D=83=E5=88=A4?= =?UTF-8?q?=E6=96=AD=E5=8F=96=E6=B6=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/admin/src/utils/auth.js | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/template/admin/src/utils/auth.js b/template/admin/src/utils/auth.js index ab0a7bcf9..7d071744d 100644 --- a/template/admin/src/utils/auth.js +++ b/template/admin/src/utils/auth.js @@ -19,15 +19,14 @@ export default { async install(Vue, options) { Vue.directive('auth', { inserted(el, binding, vnode) { - const { value } = binding; - const access = store.state.userInfo.access; - - if (value && value instanceof Array && value.length && access && access.length) { - const isPermission = includeArray(value, access); - if (!isPermission) { - el.parentNode && el.parentNode.removeChild(el); - } - } + // const { value } = binding; + // const access = store.state.userInfo.access; + // if (value && value instanceof Array && value.length && access && access.length) { + // const isPermission = includeArray(value, access); + // if (!isPermission) { + // el.parentNode && el.parentNode.removeChild(el); + // } + // } }, }); }, From 2eb9f1493b7781cf3dd7a9addd69a64fe3766f3f Mon Sep 17 00:00:00 2001 From: From-wh Date: Thu, 27 Apr 2023 16:24:43 +0800 Subject: [PATCH 7/8] =?UTF-8?q?style:=20=E5=88=86=E7=B1=BB1=E5=BA=95?= =?UTF-8?q?=E9=83=A8=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/uni-app/pages/goods_cate/goods_cate1.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/template/uni-app/pages/goods_cate/goods_cate1.vue b/template/uni-app/pages/goods_cate/goods_cate1.vue index 499690b5f..3787ec6e6 100644 --- a/template/uni-app/pages/goods_cate/goods_cate1.vue +++ b/template/uni-app/pages/goods_cate/goods_cate1.vue @@ -346,7 +346,8 @@ overflow: hidden; padding: 0 14rpx; background-color: #fff; - position: relative; + position: relative; + padding-bottom: 200rpx; } .productSort .conter .listw { From 2b15d4b54724832cc6b1bdeb985139180bef2f9a Mon Sep 17 00:00:00 2001 From: From-wh Date: Thu, 27 Apr 2023 16:45:22 +0800 Subject: [PATCH 8/8] =?UTF-8?q?improve:=20=E4=BC=98=E5=8C=96=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E8=B0=83=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/order_addcart/order_addcart.vue | 27 ++++++++++++++----- 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/template/uni-app/pages/order_addcart/order_addcart.vue b/template/uni-app/pages/order_addcart/order_addcart.vue index 63ed85267..cdeed1abd 100644 --- a/template/uni-app/pages/order_addcart/order_addcart.vue +++ b/template/uni-app/pages/order_addcart/order_addcart.vue @@ -258,18 +258,18 @@ this.canShow = false if (this.isLogin == true) { this.hotPage = 1; - this.hostProduct = [], - this.hotScroll = false, - this.getHostProduct(); + this.hostProduct = [] + this.hotScroll = false + this.getHostProduct(); this.loadend = false; this.page = 1; this.cartList.valid = []; - this.getCartList(); + this.getCartList(1); this.loadendInvalid = false; this.pageInvalid = 1; this.cartList.invalid = []; this.getInvalidList(); - this.getCartNum(); + // this.getCartNum(); this.goodsHidden = true; this.footerswitch = true; this.hostProduct = []; @@ -769,7 +769,7 @@ }) }); }, - async getCartList() { + async getCartList(init) { uni.showLoading({ title: this.$t(`加载中`), mask: true @@ -782,6 +782,21 @@ } getCartCounts().then(async c => { that.cartCount = c.data.count; + if (init) { + this.adding = false + this.$store.commit('indexData/setCartNum', c.data.count > 99 ? '..' : c.data + .count) + if (c.data.count > 0) { + wx.setTabBarBadge({ + index: 2, + text: c.data.count + '' + }) + } else { + wx.hideTabBarRedDot({ + index: 2 + }) + } + } for (let i = 0; i < Math.ceil(c.data.ids.length / that.limit); i++) { let cartList = await this.getCartData(data) let valid = cartList.valid