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' => '输入框', 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/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..1c4b4f8a9 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/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 @@
--
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; }, 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); + // } + // } }, }); }, 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 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 { 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