From d5317aef1dbb595923af02ede8bfa33ba37d6eb6 Mon Sep 17 00:00:00 2001 From: z8018 <1282578289@qq.com> Date: 星期五, 01 八月 2025 09:36:22 +0800 Subject: [PATCH] 代码第一次提交 --- 代码管理/SMTPDA/static/index-selected.png | 0 代码管理/SMTPDA/uview-ui/components/u-parse/libs/MpHtmlParser.js | 580 代码管理/SMTPDA/uview-ui/libs/function/route.js | 122 代码管理/SMTPDA/uview-ui/components/u-line/u-line.vue | 84 代码管理/SMTPDA/uni_modules/uni-forms/components/uni-forms/uni-forms.vue | 397 代码管理/SMTPDA/uni_modules/uni-scss/readme.md | 4 代码管理/SMTPDA/uni_modules/uni-segmented-control/readme.md | 13 代码管理/SMTPDA/uview-ui/components/u-form-item/u-form-item.vue | 431 代码管理/SMTPDA/pages.json | 100 代码管理/SMTPDA/uni_modules/uni-easyinput/changelog.md | 89 代码管理/SMTPDA/uni_modules/uni-combox/package.json | 90 代码管理/SMTPDA/components/CustomModal.vue | 153 代码管理/SMTPDA/services/orderMatService.js | 75 代码管理/SMTPDA/index.html | 20 代码管理/SMTPDA/uview-ui/components/u-empty/u-empty.vue | 193 代码管理/SMTPDA/uni_modules/uni-group/readme.md | 9 代码管理/SMTPDA/uni_modules/uni-popup/components/uni-popup/i18n/zh-Hant.json | 7 代码管理/SMTPDA/uview-ui/components/u-loading-page/u-loading-page.vue | 25 代码管理/SMTPDA/uview-ui/iconfont.css | 910 + 代码管理/SMTPDA/uni_modules/uni-nav-bar/changelog.md | 51 代码管理/SMTPDA/uni_modules/uni-forms/components/uni-forms/utils.js | 293 代码管理/SMTPDA/services/activationService.js | 236 代码管理/SMTPDA/services/materialService.js | 31 代码管理/SMTPDA/uview-ui/components/u-dropdown/u-dropdown.vue | 298 代码管理/SMTPDA/uview-ui/components/u-lazy-load/u-lazy-load.vue | 244 代码管理/SMTPDA/static/success.mp3 | 0 代码管理/SMTPDA/components/uni-section/uni-section.vue | 136 代码管理/SMTPDA/uview-ui/components/u-col/u-col.vue | 156 代码管理/SMTPDA/uni_modules/uni-id/readme.md | 33 代码管理/SMTPDA/config/config.js | 8 代码管理/SMTPDA/common/utils.js | 21 代码管理/SMTPDA/uview-ui/components/u-calendar/u-calendar.vue | 639 代码管理/SMTPDA/uview-ui/components/u-grid-item/u-grid-item.vue | 126 代码管理/SMTPDA/uni_modules/uni-id/uniCloud/cloudfunctions/common/uni-id/index.js | 1 代码管理/SMTPDA/components/CustomToast.vue | 362 代码管理/SMTPDA/uni_modules/uni-load-more/changelog.md | 19 代码管理/SMTPDA/uview-ui/components/u-index-anchor/u-index-anchor.vue | 89 代码管理/SMTPDA/uview-ui/components/u-line-progress/u-line-progress.vue | 147 代码管理/SMTPDA/uview-ui/components/u-mask/u-mask.vue | 123 代码管理/SMTPDA/uni_modules/uni-icons/readme.md | 8 代码管理/SMTPDA/uni_modules/uni-transition/components/uni-transition/uni-transition.vue | 286 代码管理/SMTPDA/common/sqlite.js | 279 代码管理/SMTPDA/uni_modules/uni-transition/changelog.md | 22 代码管理/SMTPDA/uview-ui/components/u-top-tips/u-top-tips.vue | 121 代码管理/SMTPDA/uview-ui/components/u-no-network/u-no-network.vue | 233 代码管理/SMTPDA/uni_modules/uni-list/components/uni-list/uni-list.vue | 123 代码管理/SMTPDA/uview-ui/components/u-slider/u-slider.vue | 257 代码管理/SMTPDA/LICENSE | 21 代码管理/SMTPDA/uview-ui/libs/function/toast.js | 9 代码管理/SMTPDA/Image/scan.html | 3 代码管理/SMTPDA/uni_modules/uni-list/changelog.md | 40 代码管理/SMTPDA/uni_modules/uni-popup/readme.md | 17 代码管理/SMTPDA/uview-ui/components/u-checkbox-group/u-checkbox-group.vue | 123 代码管理/SMTPDA/uview-ui/components/u-navbar/u-navbar.vue | 315 代码管理/SMTPDA/App.uvue | 46 代码管理/SMTPDA/uni_modules/uni-tag/readme.md | 13 代码管理/SMTPDA/uview-ui/components/u-avatar-cropper/weCropper.js | 1265 + 代码管理/SMTPDA/uview-ui/components/u-icon/u-icon.vue | 336 代码管理/SMTPDA/uview-ui/libs/function/sys.js | 9 代码管理/SMTPDA/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar.vue | 357 代码管理/SMTPDA/uview-ui/libs/function/getParent.js | 47 代码管理/SMTPDA/uview-ui/components/u-sticky/u-sticky.vue | 157 代码管理/SMTPDA/uview-ui/libs/function/randomArray.js | 7 代码管理/SMTPDA/uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.vue | 639 代码管理/SMTPDA/uni_modules/uni-list/components/uni-list-chat/uni-list-chat.vue | 571 代码管理/SMTPDA/uview-ui/package.json | 39 代码管理/SMTPDA/uni_modules/uni-card/readme.md | 12 代码管理/SMTPDA/uni_modules/uni-badge/changelog.md | 31 代码管理/SMTPDA/uni_modules/uni-search-bar/components/uni-search-bar/i18n/en.json | 4 代码管理/SMTPDA/static/index.png | 0 代码管理/SMTPDA/uview-ui/components/u-button/u-button.vue | 596 代码管理/SMTPDA/uview-ui/components/u-search/u-search.vue | 342 代码管理/SMTPDA/pages/create/sortdrag.vue | 233 代码管理/SMTPDA/static/barcode.svg | 1 代码管理/SMTPDA/uview-ui/index.js | 141 代码管理/SMTPDA/uni_modules/uni-list/readme.md | 346 代码管理/SMTPDA/uni_modules/uni-scss/index.scss | 1 代码管理/SMTPDA/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue | 399 代码管理/SMTPDA/uview-ui/components/u-index-list/u-index-list.vue | 315 代码管理/SMTPDA/common/toast.js | 96 代码管理/SMTPDA/uni_modules/uni-easyinput/components/uni-easyinput/common.js | 56 代码管理/SMTPDA/uview-ui/components/u-column-notice/u-column-notice.vue | 237 代码管理/SMTPDA/uni_modules/uni-popup/components/uni-popup-dialog/keypress.js | 45 代码管理/SMTPDA/uni_modules/uni-popup/components/uni-popup/popup.js | 26 代码管理/SMTPDA/uview-ui/components/u-collapse/u-collapse.vue | 99 代码管理/SMTPDA/uview-ui/components/u-number-box/u-number-box.vue | 363 代码管理/SMTPDA/uni_modules/uni-list/components/uni-list-chat/uni-list-chat.scss | 58 代码管理/SMTPDA/static/fail.mp3 | 0 代码管理/SMTPDA/uni_modules/uni-scss/styles/setting/_space.scss | 56 代码管理/SMTPDA/package.json | 11 代码管理/SMTPDA/uview-ui/libs/util/async-validator.js | 1356 + 代码管理/SMTPDA/Image/wslogo.png | 0 代码管理/SMTPDA/uview-ui/components/u-parse/libs/config.js | 80 代码管理/SMTPDA/uview-ui/libs/function/deepClone.js | 23 代码管理/SMTPDA/uview-ui/libs/util/emitter.js | 51 代码管理/SMTPDA/uview-ui/components/u-image/u-image.vue | 266 代码管理/SMTPDA/uview-ui/libs/function/md5.js | 385 代码管理/SMTPDA/uview-ui/libs/function/bem.js | 5 代码管理/SMTPDA/uview-ui/libs/function/color.js | 37 代码管理/SMTPDA/components/uni-section/config.json | 12 代码管理/SMTPDA/static/center.png | 0 代码管理/SMTPDA/uni_modules/uni-scss/styles/setting/_border.scss | 3 代码管理/SMTPDA/uni_modules/uni-scss/package.json | 82 代码管理/SMTPDA/uni_modules/uni-scss/variables.scss | 62 代码管理/SMTPDA/uview-ui/libs/css/style.vue.scss | 175 代码管理/SMTPDA/uni_modules/uni-badge/package.json | 85 代码管理/SMTPDA/uni_modules/uni-search-bar/package.json | 89 代码管理/SMTPDA/uni_modules/uni-popup/components/uni-popup-share/uni-popup-share.vue | 187 代码管理/SMTPDA/uni_modules/uni-icons/components/uni-icons/icons.js | 1169 + 代码管理/SMTPDA/uni_modules/uni-data-select/package.json | 85 代码管理/SMTPDA/uni_modules/uni-forms/package.json | 88 代码管理/SMTPDA/services/customerService.js | 17 代码管理/SMTPDA/uni_modules/uni-nav-bar/readme.md | 15 代码管理/SMTPDA/uview-ui/components/u-toast/u-toast.vue | 220 代码管理/SMTPDA/uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog.vue | 275 代码管理/SMTPDA/uni_modules/uni-data-select/changelog.md | 24 代码管理/SMTPDA/uni_modules/uni-data-select/components/uni-data-select/uni-data-select.vue | 449 代码管理/SMTPDA/services/scanrecordService.js | 57 代码管理/SMTPDA/static/center-selected.png | 0 代码管理/SMTPDA/uni_modules/uni-list/components/uni-list/uni-refresh.vue | 65 代码管理/SMTPDA/uni_modules/uni-popup/components/uni-popup/uni-popup.vue | 473 代码管理/SMTPDA/uview-ui/theme.scss | 38 代码管理/SMTPDA/uview-ui/components/u-steps/u-steps.vue | 200 代码管理/SMTPDA/config/activation.js | 34 代码管理/SMTPDA/uni_modules/uni-id/package.json | 80 代码管理/SMTPDA/uview-ui/components/u-th/u-th.vue | 62 代码管理/SMTPDA/uni.scss | 5 代码管理/SMTPDA/uni_modules/uni-segmented-control/components/uni-segmented-control/uni-segmented-control.vue | 145 代码管理/SMTPDA/pages/login/login.vue | 245 代码管理/SMTPDA/uni_modules/uni-search-bar/components/uni-search-bar/i18n/zh-Hant.json | 4 .gitignore | 1 代码管理/SMTPDA/.hbuilderx/launch.json | 20 代码管理/SMTPDA/uni_modules/uni-icons/components/uni-icons/uni.ttf | 0 代码管理/SMTPDA/uview-ui/components/u-gap/u-gap.vue | 54 代码管理/SMTPDA/uview-ui/components/u-cell-item/u-cell-item.vue | 316 代码管理/SMTPDA/uview-ui/libs/css/common.scss | 176 代码管理/SMTPDA/uni_modules/uni-forms/changelog.md | 90 代码管理/SMTPDA/uni_modules/uni-icons/changelog.md | 22 代码管理/SMTPDA/uview-ui/components/u-verification-code/u-verification-code.vue | 164 代码管理/SMTPDA/uni_modules/uni-load-more/components/uni-load-more/i18n/en.json | 5 代码管理/SMTPDA/uni_modules/uni-scss/styles/setting/_color.scss | 66 代码管理/SMTPDA/uview-ui/libs/util/city.js | 1 代码管理/SMTPDA/uni_modules/uni-badge/readme.md | 10 代码管理/SMTPDA/uni_modules/uni-id/changelog.md | 24 代码管理/SMTPDA/uview-ui/libs/util/area.js | 1 代码管理/SMTPDA/static/wlogo.png | 0 代码管理/SMTPDA/uview-ui/components/u-card/u-card.vue | 299 代码管理/SMTPDA/uni_modules/uni-list/components/uni-list/uni-refresh.wxs | 87 代码管理/SMTPDA/components/BaseModal.vue | 240 代码管理/SMTPDA/uview-ui/components/u-modal/u-modal.vue | 283 代码管理/SMTPDA/uview-ui/components/u-select/u-select.vue | 417 代码管理/SMTPDA/services/authService.js | 57 代码管理/SMTPDA/uni_modules/uni-id/uniCloud/cloudfunctions/common/uni-id/package-lock.json | 11 代码管理/SMTPDA/uview-ui/components/u-tr/u-tr.vue | 25 代码管理/SMTPDA/uni_modules/uni-icons/package.json | 86 代码管理/SMTPDA/uni_modules/uni-scss/styles/tools/functions.scss | 19 代码管理/SMTPDA/uni_modules/uni-search-bar/changelog.md | 33 代码管理/SMTPDA/uni_modules/uni-search-bar/components/uni-search-bar/i18n/zh-Hans.json | 4 代码管理/SMTPDA/uview-ui/components/u-row-notice/u-row-notice.vue | 269 代码管理/SMTPDA/uni_modules/uni-card/package.json | 90 代码管理/SMTPDA/uview-ui/components/u-full-screen/u-full-screen.vue | 52 代码管理/SMTPDA/uview-ui/components/u-loading/u-loading.vue | 103 代码管理/SMTPDA/uni_modules/uni-card/changelog.md | 26 代码管理/SMTPDA/uni_modules/uni-popup/components/uni-popup/i18n/en.json | 7 代码管理/SMTPDA/uview-ui/components/u-section/u-section.vue | 154 代码管理/SMTPDA/readme.md | 39 代码管理/SMTPDA/uni_modules/uni-data-checkbox/readme.md | 18 代码管理/SMTPDA/uni_modules/uni-scss/changelog.md | 8 代码管理/SMTPDA/uni_modules/uni-load-more/readme.md | 14 代码管理/SMTPDA/.eslintignore | 3 代码管理/SMTPDA/uview-ui/components/u-keyboard/u-keyboard.vue | 217 代码管理/SMTPDA/static/scan.svg | 3 代码管理/SMTPDA/uview-ui/libs/mixin/mixin.js | 64 代码管理/SMTPDA/static/favicon.ico | 0 代码管理/SMTPDA/uview-ui/libs/store/index.js | 19 代码管理/SMTPDA/uview-ui/components/u-divider/u-divider.vue | 153 代码管理/SMTPDA/uview-ui/libs/function/$parent.js | 18 代码管理/SMTPDA/uni_modules/uni-transition/components/uni-transition/createAnimation.js | 131 代码管理/SMTPDA/uview-ui/components/u-form/u-form.vue | 134 代码管理/SMTPDA/uview-ui/components/u-table/u-table.vue | 84 代码管理/SMTPDA/main.js | 24 代码管理/SMTPDA/pages/index/index.vue | 1147 + 代码管理/SMTPDA/uni_modules/uni-data-select/readme.md | 8 代码管理/SMTPDA/uview-ui/libs/function/queryParams.js | 58 代码管理/SMTPDA/uni_modules/uni-scss/styles/setting/_text.scss | 24 代码管理/SMTPDA/pages/test.vue | 968 + 代码管理/SMTPDA/uni_modules/uni-card/components/uni-card/uni-card.vue | 270 代码管理/SMTPDA/static/logo.png | 0 代码管理/SMTPDA/uni_modules/uni-popup/components/uni-popup/keypress.js | 45 代码管理/SMTPDA/uni_modules/uni-scss/theme.scss | 31 代码管理/SMTPDA/uview-ui/components/u-rate/u-rate.vue | 275 代码管理/SMTPDA/uview-ui/components/u-tag/u-tag.vue | 294 代码管理/SMTPDA/services/seqService.js | 35 代码管理/SMTPDA/uview-ui/components/u-parse/libs/trees.vue | 505 代码管理/SMTPDA/uview-ui/components/u-swipe-action/u-swipe-action.vue | 255 代码管理/SMTPDA/services/orderService.js | 213 代码管理/SMTPDA/uni_modules/uni-easyinput/package.json | 87 代码管理/SMTPDA/uni_modules/uni-load-more/components/uni-load-more/i18n/zh-Hans.json | 5 代码管理/SMTPDA/uview-ui/components/u-avatar/u-avatar.vue | 244 代码管理/SMTPDA/App.vue | 102 代码管理/SMTPDA/pages/system/activation.vue | 770 代码管理/SMTPDA/uni_modules/uni-combox/readme.md | 11 代码管理/SMTPDA/uni_modules/uni-nav-bar/package.json | 86 代码管理/SMTPDA/uni_modules/uni-load-more/package.json | 86 代码管理/SMTPDA/static/wechat-qrcode.jpg | 0 代码管理/SMTPDA/common/sql.js | 233 代码管理/SMTPDA/uview-ui/components/u-popup/u-popup.vue | 456 代码管理/SMTPDA/uview-ui/components/u-input/u-input.vue | 387 代码管理/SMTPDA/uview-ui/components/u-link/u-link.vue | 89 代码管理/SMTPDA/Image/wselogo.png | 0 代码管理/SMTPDA/uni_modules/uni-popup/components/uni-popup/i18n/index.js | 8 代码管理/SMTPDA/uview-ui/libs/util/province.js | 1 代码管理/SMTPDA/uni_modules/uni-badge/components/uni-badge/uni-badge.vue | 268 代码管理/SMTPDA/uni_modules/uni-scss/styles/setting/_radius.scss | 55 代码管理/SMTPDA/uview-ui/components/u-switch/u-switch.vue | 163 代码管理/SMTPDA/uview-ui/components/u-car-keyboard/u-car-keyboard.vue | 257 代码管理/SMTPDA/pages/create/create.vue | 1043 + 代码管理/SMTPDA/uview-ui/libs/request/index.js | 169 代码管理/SMTPDA/uview-ui/components/u-waterfall/u-waterfall.vue | 176 代码管理/SMTPDA/uni_modules/uni-icons/components/uni-icons/uniicons.ttf | 0 代码管理/SMTPDA/uview-ui/components/u-back-top/u-back-top.vue | 153 代码管理/SMTPDA/uview-ui/components/u-dropdown-item/u-dropdown-item.vue | 132 代码管理/SMTPDA/uview-ui/libs/function/throttle.js | 32 代码管理/SMTPDA/uni_modules/uni-id/uniCloud/cloudfunctions/common/uni-id/package.json | 16 代码管理/SMTPDA/uview-ui/LICENSE | 21 代码管理/SMTPDA/uview-ui/libs/function/colorGradient.js | 134 代码管理/SMTPDA/uview-ui/components/u-td/u-td.vue | 66 代码管理/SMTPDA/uview-ui/components/u-radio/u-radio.vue | 271 代码管理/SMTPDA/services/deviceService.js | 80 代码管理/SMTPDA/static/history.svg | 3 代码管理/SMTPDA/uni_modules/uni-scss/styles/setting/_styles.scss | 167 代码管理/SMTPDA/uni_modules/uni-popup/components/uni-popup/i18n/zh-Hans.json | 7 代码管理/SMTPDA/uview-ui/components/u-parse/u-parse.vue | 645 代码管理/SMTPDA/main.uts | 9 代码管理/SMTPDA/uni_modules/uni-group/components/uni-group/uni-group.vue | 134 代码管理/SMTPDA/uview-ui/components/u-avatar-cropper/u-avatar-cropper.vue | 290 代码管理/SMTPDA/uni_modules/uni-list/components/uni-list-item/uni-list-item.vue | 530 代码管理/SMTPDA/uview-ui/components/u-cell-group/u-cell-group.vue | 70 代码管理/SMTPDA/uview-ui/components/u-tabs/u-tabs.vue | 368 代码管理/SMTPDA/uview-ui/libs/css/color.scss | 155 代码管理/SMTPDA/uni_modules/uni-id/uniCloud/cloudfunctions/common/uni-id/LICENSE.md | 201 代码管理/SMTPDA/uview-ui/components/u-count-down/u-count-down.vue | 318 代码管理/SMTPDA/store/index.js | 32 代码管理/SMTPDA/uni_modules/uni-search-bar/components/uni-search-bar/uni-search-bar.vue | 298 代码管理/SMTPDA/uview-ui/libs/function/timeFormat.js | 51 代码管理/SMTPDA/uni_modules/uni-tag/components/uni-tag/uni-tag.vue | 252 代码管理/SMTPDA/uni_modules/uni-popup/package.json | 87 代码管理/SMTPDA/uview-ui/components/u-upload/u-upload.vue | 654 代码管理/SMTPDA/static/list.svg | 3 代码管理/SMTPDA/uview-ui/libs/css/style.components.scss | 7 代码管理/SMTPDA/uview-ui/libs/function/guid.js | 41 代码管理/SMTPDA/uni_modules/uni-data-checkbox/components/uni-data-checkbox/uni-data-checkbox.vue | 821 代码管理/SMTPDA/uview-ui/components/u-loadmore/u-loadmore.vue | 203 代码管理/SMTPDA/uni_modules/uni-scss/styles/index.scss | 7 代码管理/SMTPDA/static/wslogo.png | 0 代码管理/SMTPDA/common/http.interceptor.js | 135 代码管理/SMTPDA/uview-ui/components/u-count-to/u-count-to.vue | 241 代码管理/SMTPDA/uni_modules/uni-forms/components/uni-forms/validate.js | 486 代码管理/SMTPDA/uview-ui/components/u-parse/libs/handler.wxs | 22 代码管理/SMTPDA/Image/wlogo.png | 0 代码管理/SMTPDA/uview-ui/libs/function/deepMerge.js | 30 代码管理/SMTPDA/uview-ui/components/u-row/u-row.vue | 84 代码管理/SMTPDA/uview-ui/components/u-checkbox/u-checkbox.vue | 284 代码管理/SMTPDA/uview-ui/libs/function/type2icon.js | 35 代码管理/SMTPDA/services/materialContentService.js | 57 代码管理/SMTPDA/static/111logo.png | 0 代码管理/SMTPDA/Image/logo.png | 0 代码管理/SMTPDA/uni_modules/uni-popup/changelog.md | 68 代码管理/SMTPDA/uni_modules/uni-list/components/uni-list-ad/uni-list-ad.vue | 107 代码管理/SMTPDA/uview-ui/components/u-grid/u-grid.vue | 108 代码管理/SMTPDA/uview-ui/libs/function/random.js | 10 代码管理/SMTPDA/vue.config.js | 8 代码管理/SMTPDA/package-lock.json | 125 代码管理/SMTPDA/common/initdb.js | 0 代码管理/SMTPDA/uni_modules/uni-list/package.json | 88 代码管理/SMTPDA/services/exprotService.js | 20 代码管理/SMTPDA/uview-ui/libs/css/style.h5.scss | 8 代码管理/SMTPDA/uni_modules/uni-transition/package.json | 84 代码管理/SMTPDA/uni_modules/uni-easyinput/readme.md | 11 代码管理/SMTPDA/uview-ui/libs/css/style.mp.scss | 72 代码管理/SMTPDA/static/repeat.mp3 | 0 代码管理/SMTPDA/uni_modules/uni-scss/styles/setting/_variables.scss | 146 代码管理/SMTPDA/uni_modules/uni-search-bar/components/uni-search-bar/i18n/index.js | 8 代码管理/SMTPDA/uni_modules/uni-tag/package.json | 87 代码管理/SMTPDA/uview-ui/components/u-time-line-item/u-time-line-item.vue | 83 代码管理/SMTPDA/uview-ui/index.scss | 23 README.md | 41 代码管理/SMTPDA/uni_modules/uni-icons/components/uni-icons/uni-icons.vue | 96 代码管理/SMTPDA/uni_modules/uni-tag/changelog.md | 21 代码管理/SMTPDA/uni_modules/uni-icons/components/uni-icons/uniicons.css | 663 代码管理/SMTPDA/components/uni-section/readme.md | 30 代码管理/SMTPDA/uview-ui/libs/config/config.js | 15 代码管理/SMTPDA/uni_modules/uni-forms/components/uni-forms-item/uni-forms-item.vue | 631 代码管理/SMTPDA/uni_modules/uni-forms/readme.md | 23 代码管理/SMTPDA/uview-ui/components/u-swiper/u-swiper.vue | 340 代码管理/SMTPDA/uview-ui/libs/function/test.js | 232 代码管理/SMTPDA/Image/barcode.svg | 1 代码管理/SMTPDA/uview-ui/components/u-subsection/u-subsection.vue | 355 代码管理/SMTPDA/uview-ui/components/u-badge/u-badge.vue | 216 代码管理/SMTPDA/uview-ui/components/u-number-keyboard/u-number-keyboard.vue | 158 代码管理/SMTPDA/uview-ui/components/u-skeleton/u-skeleton.vue | 199 代码管理/SMTPDA/uview-ui/components/u-time-line/u-time-line.vue | 43 代码管理/SMTPDA/uni_modules/uni-popup/components/uni-popup-message/uni-popup-message.vue | 143 代码管理/SMTPDA/Image/wechat-qrcode.jpg | 0 代码管理/SMTPDA/uview-ui/README.md | 106 代码管理/SMTPDA/uview-ui/components/u-read-more/u-read-more.vue | 179 代码管理/SMTPDA/uview-ui/components/u-circle-progress/u-circle-progress.vue | 220 代码管理/SMTPDA/components/toast-message.vue | 401 代码管理/SMTPDA/uni_modules/uni-search-bar/readme.md | 14 代码管理/SMTPDA/uni_modules/uni-combox/changelog.md | 15 代码管理/SMTPDA/uview-ui/components/u-picker/u-picker.vue | 676 代码管理/SMTPDA/uview-ui/libs/function/timeFrom.js | 47 代码管理/SMTPDA/uview-ui/libs/function/addUnit.js | 8 代码管理/SMTPDA/uview-ui/libs/function/trim.js | 15 代码管理/SMTPDA/common/dbconfig.js | 57 代码管理/SMTPDA/uni_modules/uni-combox/components/uni-combox/uni-combox.vue | 275 代码管理/SMTPDA/uview-ui/libs/css/style.nvue.scss | 3 代码管理/SMTPDA/template.h5.html | 24 代码管理/SMTPDA/uni_modules/uni-load-more/components/uni-load-more/i18n/zh-Hant.json | 5 代码管理/SMTPDA/uview-ui/libs/config/zIndex.js | 20 代码管理/SMTPDA/.vscode/launch.json | 15 代码管理/SMTPDA/uview-ui/components/u-message-input/u-message-input.vue | 311 代码管理/SMTPDA/uni_modules/uni-group/package.json | 87 代码管理/SMTPDA/uview-ui/components/u-tabbar/u-tabbar.vue | 330 代码管理/SMTPDA/uview-ui/components/u-collapse-item/u-collapse-item.vue | 204 代码管理/SMTPDA/pages/order/detail.vue | 1204 + 代码管理/SMTPDA/uni_modules/uni-segmented-control/package.json | 87 代码管理/SMTPDA/uview-ui/libs/function/debounce.js | 29 代码管理/SMTPDA/uview-ui/components/u-parse/libs/CssHandler.js | 100 代码管理/SMTPDA/uni_modules/uni-data-checkbox/changelog.md | 45 代码管理/SMTPDA/uni_modules/uni-transition/readme.md | 11 代码管理/SMTPDA/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-status-bar.vue | 24 代码管理/SMTPDA/uview-ui/components/u-action-sheet/u-action-sheet.vue | 190 代码管理/SMTPDA/uview-ui/components/u-tabs-swiper/u-tabs-swiper.vue | 488 代码管理/SMTPDA/uview-ui/components/u-field/u-field.vue | 384 代码管理/SMTPDA/uni_modules/uni-load-more/components/uni-load-more/i18n/index.js | 8 代码管理/SMTPDA/uview-ui/components/u-alert-tips/u-alert-tips.vue | 256 代码管理/SMTPDA/uni_modules/uni-segmented-control/changelog.md | 9 代码管理/SMTPDA/uni_modules/uni-data-checkbox/package.json | 84 代码管理/SMTPDA/uni_modules/uni-group/changelog.md | 16 代码管理/SMTPDA/uview-ui/components/u-notice-bar/u-notice-bar.vue | 272 代码管理/SMTPDA/uview-ui/components/u-radio-group/u-radio-group.vue | 128 代码管理/SMTPDA/manifest.json | 137 代码管理/SMTPDA/uview-ui/libs/mixin/mpShare.js | 18 344 files changed, 53,136 insertions(+), 0 deletions(-) diff --git a/.gitignore b/.gitignore index 0dfb828..3e25e62 100644 --- a/.gitignore +++ b/.gitignore @@ -265,3 +265,4 @@ *.bin /WIDESEAWCS_Server/.vs/ProjectEvaluation /WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/DesignTimeBuild +/浠g爜绠$悊/SMTPDA/unpackage diff --git a/README.md b/README.md index 5d58e6e..09e44e6 100644 --- a/README.md +++ b/README.md @@ -2,3 +2,44 @@ SMT闃查敊鏂橮DA + + +**1.璁㈠崟鍒涘缓涓庤鍗曞彿鐢熸垚** + +鏂板缓璁㈠崟鏃讹紝鐢ㄦ埛鐐瑰嚮鎸夐挳瑙﹀彂绯荤粺鑷姩鐢熸垚鍞竴璁㈠崟鍙凤紙闇�婊¤冻鍞竴鎬т笌鍙鎬ц姹傦紝閫氬父缁撳悎鏃堕棿鎴充笌搴忓垪鍙峰疄鐜帮級銆� + +**2.璁㈠崟鍙蜂笌绾歌川鍗曟嵁缁戝畾** + +鐢熸垚璁㈠崟鍙峰悗锛岄�氳繃鎷嶇収鏂瑰紡灏嗚鍗曞彿涓庣焊璐ㄥ崟鎹繘琛屽叧鑱旂粦瀹氾紝纭繚鐗╃悊鍗曟嵁涓庣郴缁熻鍗曠殑瀵瑰簲鍏崇郴銆� + +**3.鏍稿績鐗╂枡鏁版嵁鎻愬彇** + +浠庢暟鎹簱涓绱㈠凡璁板綍鐨勬牳蹇冪墿鏂欐暟鎹紝浣滀负鍚庣画鎿嶄綔鐨勫熀鍑嗕俊鎭�� + +**4.鏍稿績鐗╂枡杈撳叆涓庝繚瀛�** + +鐢ㄦ埛鍙�夋嫨浠庢暟鎹簱涓凡瀛樺湪鐨勬牳蹇冪墿鏂欐暟鎹紝鎴栨墜鍔ㄨ緭鍏ユ柊寤虹殑鏍稿績鐗╂枡淇℃伅銆傝嫢涓烘墜鍔ㄨ緭鍏ワ紝闇�灏嗚緭鍏ュ唴瀹逛繚瀛樿嚦鏁版嵁搴擄紝纭繚鏁版嵁瀹屾暣鎬с�� + +**5.閫夐」鍗$敓鎴愪笌鎶樺彔閫昏緫** + +鐐瑰嚮纭鍚庯紝绯荤粺鏍规嵁鐢ㄦ埛杈撳叆鎴栭�夋嫨鐨勬牳蹇冪墿鏂欏湪椤甸潰鍔ㄦ�佺敓鎴愬搴旂殑Tab閫夐」鍗°�傝嫢閫夐」鍗℃暟閲忚秴杩�4涓紝瓒呭嚭閮ㄥ垎鑷姩鎶樺彔锛屼繚鎸佺晫闈㈢畝娲佹�с�� +**6.棣栨浜岀淮鐮佹壂鎻忎笌淇℃伅鏍稿** +璁㈠崟棣栨鎵弿鏍稿績鐗╂枡浜岀淮鐮佹椂锛岀郴缁熷皢鎵弿缁撴灉灞曠ず浜庡脊妗嗕腑銆備汉宸ラ渶浠庡脊妗嗘暟鎹腑閫夋嫨闇�鏍稿鐨勮繛缁枃瀛椾俊鎭锛堣嚦灏戦�夋嫨涓�娈碉級锛屼綔涓哄悗缁牳瀵圭殑鏍囧噯銆� +**7.鎵弿淇℃伅灞曠ず** +鎵弿鏃堕渶灏嗘彁鍙栫殑淇℃伅鍦ㄦ壂鎻忛〉闈㈠垪琛ㄤ腑灞曠ず锛屽苟鎸夋壂鎻忔椂闂村�掑簭鎺掑垪銆� +**8.鍚庣画浜岀淮鐮佹壂鎻忎笌閿欒鍒ゅ畾** +鍚庣画鎵弿鏃讹紝绯荤粺鑷姩姣斿褰撳墠鎵弿缁撴灉鏄惁鍖呭惈棣栨閫夋嫨鐨勮繛缁枃瀛椾俊鎭細 + +- 鑻ュ寘鍚紝鍒ゅ畾涓烘壂鎻忔棤閿欒锛� +- 鑻ヤ笉鍖呭惈锛屽脊绐楁彁绀烘壂鎻忛敊璇紝骞惰Е鍙戣闊虫挱鎶ヨ繘琛岃绀� + +**9.浜哄伐鏍″娴佺▼涓�鑷存��** +鑻ュ悗缁渶浜哄伐鏍″锛岄渶涓ユ牸閬靛惊棣栨鎵弿鐨勬祦绋嬶紙灞曠ず寮规銆侀�夋嫨杩炵画鏁版嵁娈碉級锛岀‘淇濇牳瀵硅鍒欑粺涓�銆� +**10.璁㈠崟瀹屾垚涓庣姸鎬佹洿鏂�** +璁㈠崟瀹屾垚鍚庯紝绯荤粺灏嗚鍗曠姸鎬佷慨鏀逛负鈥滃凡瀹屾垚鈥濓紝骞舵敮鎸佽嚜瀹氫箟鏁版嵁淇濆瓨鏃堕棿锛堝璁剧疆淇濈暀鍛ㄦ湡鎴栬嚜鍔ㄥ綊妗h鍒欙級銆� +**11.鏁版嵁杩芥函** +鍦ㄨ缃繚鐣欏懆鏈熷唴锛屽彲鍦ㄥ巻鍙叉暟鎹晫闈㈡悳绱㈡煡璇笂鏂欎俊鎭�� +**12.璇曠敤鏃堕棿** +璁剧疆璇曠敤鏈熻繃鏈熸棩鏈燂紝浠ラ槻姝㈠畨瑁呭寘娉勯湶鍚庤浠栦汉闈炴硶鍏嶈垂浣跨敤銆� +**13.杞欢婵�娲讳娇鐢�** +璇曠敤鏈熼棿鍙皢璁惧纭欢淇℃伅缁戝畾鐢熸垚璁惧杩愯鐮侊紝杩涜�屽熀浜庤杩愯鐮佸湪鍙︿竴绯荤粺涓敓鎴愯澶囨縺娲荤爜锛屾縺娲荤爜鏀寔璁惧畾鏈夋晥鏈熼檺銆� diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/.eslintignore" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/.eslintignore" new file mode 100644 index 0000000..8ec7403 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/.eslintignore" @@ -0,0 +1,3 @@ +unpackage +node_modules +uview-ui diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/.hbuilderx/launch.json" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/.hbuilderx/launch.json" new file mode 100644 index 0000000..4ccd172 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/.hbuilderx/launch.json" @@ -0,0 +1,20 @@ +{ + // launch.json 閰嶇疆浜嗗惎鍔ㄨ皟璇曟椂鐩稿叧璁剧疆锛宑onfigurations涓嬭妭鐐瑰悕绉板彲涓� app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/ + // launchtype椤瑰彲閰嶇疆鍊间负local鎴杛emote, local浠h〃鍓嶇杩炴湰鍦颁簯鍑芥暟锛宺emote浠h〃鍓嶇杩炰簯绔簯鍑芥暟 + "version" : "0.0", + "configurations" : [ + { + "app-plus" : { + "launchtype" : "local" + }, + "default" : { + "launchtype" : "local" + }, + "type" : "uniCloud" + }, + { + "playground" : "custom", + "type" : "uni-app:app-android" + } + ] +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/.vscode/launch.json" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/.vscode/launch.json" new file mode 100644 index 0000000..39a8bad --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/.vscode/launch.json" @@ -0,0 +1,15 @@ +{ + // 浣跨敤 IntelliSense 浜嗚В鐩稿叧灞炴�с�� + // 鎮仠浠ユ煡鐪嬬幇鏈夊睘鎬х殑鎻忚堪銆� + // 娆蹭簡瑙f洿澶氫俊鎭紝璇疯闂�: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "chrome", + "request": "launch", + "name": "閽堝 localhost 鍚姩 Chrome", + "url": "http://localhost:8080", + "webRoot": "${workspaceFolder}" + } + ] +} \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/App.uvue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/App.uvue" new file mode 100644 index 0000000..c125536 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/App.uvue" @@ -0,0 +1,46 @@ +<script lang="uts"> + let firstBackTime = 0 + export default { + onLaunch: function () { + console.log('App Launch') + }, + onShow: function () { + console.log('App Show') + }, + onHide: function () { + console.log('App Hide') + }, + // #ifdef APP-ANDROID + onLastPageBackPress: function () { + console.log('App LastPageBackPress') + if (firstBackTime == 0) { + uni.showToast({ + title: '鍐嶆寜涓�娆¢��鍑哄簲鐢�', + position: 'bottom', + }) + firstBackTime = Date.now() + setTimeout(() => { + firstBackTime = 0 + }, 2000) + } else if (Date.now() - firstBackTime < 2000) { + firstBackTime = Date.now() + uni.exit() + } + }, + // #endif + onExit: function () { + console.log('App Exit') + }, + } +</script> + +<style> + /*姣忎釜椤甸潰鍏叡css */ + .uni-row { + flex-direction: row; + } + + .uni-column { + flex-direction: column; + } +</style> \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/App.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/App.vue" new file mode 100644 index 0000000..c39a59c --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/App.vue" @@ -0,0 +1,102 @@ +<script> + import activationService from './services/activationService' + import { + initDatabase, + query + } from './common/sqlite' + + export default { + onLaunch() { + try { + // #ifdef APP-PLUS + initDatabase(); + // #endif + + } catch (e) { + console.log('鏁版嵁搴撳垵濮嬪寲澶辫触', e); + } + // const activationStatus = activationService.checkActivationStatus() + + // 灏嗘縺娲荤姸鎬佷繚瀛樺埌鍏ㄥ眬鍙橀噺 + // this.globalData = { + // activationStatus: activationStatus + // } + }, + onShow() { + this.$nextTick(() => { + setTimeout(() => { + // 妫�鏌ユ縺娲荤姸鎬� + activationService.checkDataCount().then(result => { + if (result.expStatus) { + uni.redirectTo({ + url: '/pages/system/activation' + }) + } + }) + }, 1000) + }) + }, + onHide: function() { + console.log('App Hide') + }, + methods: { + toggleTheme() { + this.$store.dispatch('toggleTheme') + } + }, + computed: { + theme() { + return this.$store.state.theme + } + }, + watch: { + theme(newVal) { + // 搴旂敤涓婚鏍峰紡 + document.documentElement.setAttribute('data-theme', newVal) + } + } + } +</script> + +<style lang="scss"> + @import "uview-ui/index.scss"; + + /* 涓婚鍙橀噺 */ + :root { + --bg-color: #f5f7fa; + --text-color: #333; + --card-bg: #fff; + --border-color: #eee; + --shadow-color: rgba(0, 0, 0, 0.05); + } + + [data-theme="dark"] { + --bg-color: #1a1a2e; + --text-color: #fff; + --card-bg: rgba(255, 255, 255, 0.1); + --border-color: rgba(255, 255, 255, 0.1); + --shadow-color: rgba(0, 0, 0, 0.2); + } + + /* 涓婚鍒囨崲鎸夐挳 */ + .theme-toggle { + position: fixed; + right: 30rpx; + top: 30rpx; + z-index: 999; + width: 80rpx; + height: 80rpx; + border-radius: 50%; + background-color: var(--card-bg); + display: flex; + justify-content: center; + align-items: center; + box-shadow: 0 2rpx 10rpx var(--shadow-color); + } + + /* 姣忎釜椤甸潰鍏叡css */ + page { + background-color: var(--bg-color); + color: var(--text-color); + } +</style> \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/Image/barcode.svg" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/Image/barcode.svg" new file mode 100644 index 0000000..c7ee1c7 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/Image/barcode.svg" @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M2 4h2v16H2V4zm4 0h1v16H6V4zm2 0h3v16H8V4zm5 0h1v16h-1V4zm3 0h1v16h-1V4zm3 0h1v16h-1V4zm2 0h2v16h-2V4z"/></svg> \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/Image/logo.png" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/Image/logo.png" new file mode 100644 index 0000000..09b151c --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/Image/logo.png" Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/Image/scan.html" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/Image/scan.html" new file mode 100644 index 0000000..9037ad1 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/Image/scan.html" @@ -0,0 +1,3 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"> + <path d="M4 4h4V2H2v6h2V4zm16-2h-6v2h4v4h2V2zM4 20v-4H2v6h6v-2H4zm18 0h-4v2h6v-6h-2v4zM19 8H5v8h14V8z"/> +</svg> \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/Image/wechat-qrcode.jpg" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/Image/wechat-qrcode.jpg" new file mode 100644 index 0000000..34521c2 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/Image/wechat-qrcode.jpg" Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/Image/wlogo.png" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/Image/wlogo.png" new file mode 100644 index 0000000..69a2cea --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/Image/wlogo.png" Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/Image/wselogo.png" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/Image/wselogo.png" new file mode 100644 index 0000000..cd3f07e --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/Image/wselogo.png" Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/Image/wslogo.png" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/Image/wslogo.png" new file mode 100644 index 0000000..66bec7b --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/Image/wslogo.png" Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/LICENSE" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/LICENSE" new file mode 100644 index 0000000..8e39ead --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/LICENSE" @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 www.uviewui.com + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/common/dbconfig.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/common/dbconfig.js" new file mode 100644 index 0000000..f8f6b6c --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/common/dbconfig.js" @@ -0,0 +1,57 @@ +/** + * 鏁版嵁搴撻厤缃枃浠� + * 鍖呭惈鏁版嵁搴撳悕绉般�佺増鏈�佹縺娲讳俊鎭瓑閰嶇疆 + */ + +// 鏁版嵁搴撳熀鏈厤缃� +const dbConfig = { + // 鏁版嵁搴撳悕绉� + dbName: 'smtpda.db', + // 鏁版嵁搴撶増鏈� + dbVersion: '1.0', + // 鏁版嵁搴撹矾寰勶紙浼唬鐮侊紝瀹為檯杩愯鏃朵細鏍规嵁骞冲彴纭畾锛� + dbPath: '_doc/smtpda.db', + // API閰嶇疆 + apiConfig: { + baseUrl: '', + timeout: 30000 + } +}; + +// 婵�娲讳笌璇曠敤鐩稿叧閰嶇疆 +const activationConfig = { + // 璇曠敤鏈熼檺锛堝ぉ锛� + trialDays: 30, + // 榛樿杩囨湡鏃堕棿锛堝綋鍓嶆棩鏈� + 璇曠敤澶╂暟锛� + defaultExpireDate: new Date(new Date().getTime() + 30 * 24 * 60 * 60 * 1000).toISOString().split('T')[0], + // 婵�娲荤姸鎬� + isActivated: false, + // 璁惧淇℃伅锛堜吉浠g爜锛屽疄闄呰繍琛屾椂浼氳幏鍙栫湡瀹炶澶囦俊鎭級 + deviceInfo: { + uuid: '', + platform: '', + model: '', + manufacturer: '' + } +}; + +// 璁㈠崟閰嶇疆 +const orderConfig = { + // 璁㈠崟鏁版嵁淇濈暀澶╂暟 + retentionDays: 90, + // 璁㈠崟鍙峰墠缂� + orderPrefix: 'SMT', + // 璁㈠崟鐘舵�� + orderStatus: { + CREATED: 'created', + IN_PROGRESS: 'in_progress', + COMPLETED: 'completed', + ARCHIVED: 'archived' + } +}; + +export { + dbConfig, + activationConfig, + orderConfig +}; \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/common/http.interceptor.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/common/http.interceptor.js" new file mode 100644 index 0000000..18bbb68 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/common/http.interceptor.js" @@ -0,0 +1,135 @@ +// let baseUrl = 'http://10.1.105.155:9995' +// let baseUrl = 'http://10.1.211.101:9004' +let baseUrl = 'http://115.159.85.185:9892' +// let baseUrl = 'http://192.168.43.71:9995' +// let baseUrl = 'http://47.112.196.253:8881' + +const install = (Vue, vm) => { + // 姝や负鑷畾涔夐厤缃弬鏁帮紝鍏蜂綋鍙傛暟瑙佷笂鏂硅鏄� + Vue.prototype.$u.http.setConfig({ + baseUrl: baseUrl, + loadingText: '鍔姏鍔犺浇涓瓇', + loadingTime: 5000, + originalData: true, + // ...... + }); + + // 璇锋眰鎷︽埅锛岄厤缃甌oken绛夊弬鏁� + Vue.prototype.$u.http.interceptor.request = (config) => { + // 寮曠敤token + // 鏂瑰紡涓�锛屽瓨鏀惧湪vuex鐨則oken锛屽亣璁句娇鐢ㄤ簡uView灏佽鐨剉uex鏂瑰紡 + // 瑙侊細https://uviewui.com/components/globalVariable.html + // config.header.token = vm.token; + + // 鏂瑰紡浜岋紝濡傛灉娌℃湁浣跨敤uView灏佽鐨剉uex鏂规硶锛岄偅涔堥渶瑕佷娇鐢�$store.state鑾峰彇 + // config.header.token = vm.$store.state.token; + + // 鏂瑰紡涓夛紝濡傛灉token鏀惧湪浜唃lobalData锛岄�氳繃getApp().globalData鑾峰彇 + // config.header.token = getApp().globalData.username; + + // 鏂瑰紡鍥涳紝濡傛灉token鏀惧湪浜哠torage鏈湴瀛樺偍涓紝鎷︽埅鏄瘡娆¤姹傞兘鎵ц鐨� + // 鎵�浠ュ摢鎬曟偍閲嶆柊鐧诲綍淇敼浜哠torage锛屼笅涓�娆$殑璇锋眰灏嗕細鏄渶鏂板�� + // const token = uni.getStorageSync('token'); + // config.header.token = token; + // debugger + // var aaa = "Bearer " + uni.getStorageSync('jo_id_token'); + // var bbb = "a" + uni.getStorageSync('remAcc'); + // var ccc = "a" + uni.getStorageSync('remPwd'); + // var ddd = "a" + uni.getStorageSync('acc'); + // var eee = "a" + uni.getStorageSync('pwd'); + config.header.Token = 'xxxxxx'; + config.header.Authorization = "Bearer " + uni.getStorageSync('jo_id_token'); + // 鍙互瀵规煇涓猽rl杩涜鐗瑰埆澶勭悊锛屾url鍙傛暟涓簍his.$u.get(url)涓殑url鍊� + if (config.url == '/api/User/login') config.header.noToken = true; + // 鏈�鍚庨渶瑕佸皢config杩涜return + return config; + // 濡傛灉return涓�涓猣alse鍊硷紝鍒欎細鍙栨秷鏈璇锋眰 + // if(config.url == '/user/rest') return false; // 鍙栨秷鏌愭璇锋眰 + } + + // 鍝嶅簲鎷︽埅锛屽垽鏂姸鎬佺爜鏄惁閫氳繃 + Vue.prototype.$u.http.interceptor.response = (res) => { + if(!res.statusCode){ + if (res.errMsg) { + vm.$u.toast("璇锋眰澶辫触,璇锋鏌ュ悗鍙扮▼搴忔槸鍚︽墦寮�,閿欒淇℃伅:" + res.errMsg); + return false; + } + } + + if (res.statusCode == 200) { + // res涓烘湇鍔$杩斿洖鍊硷紝鍙兘鏈塩ode锛宺esult绛夊瓧娈� + // 杩欓噷瀵箁es.result杩涜杩斿洖锛屽皢浼氬湪this.$u.post(url).then(res => {})鐨則hen鍥炶皟涓殑res鐨勫埌 + // 濡傛灉閰嶇疆浜唎riginalData涓簍rue锛岃鐣欐剰杩欓噷鐨勮繑鍥炲�� + return res.data; + } else if (res.statusCode == 401) { + // 鍋囪201涓簍oken澶辨晥锛岃繖閲岃烦杞櫥褰� + vm.$u.toast('楠岃瘉澶辫触锛岃閲嶆柊鐧诲綍'); + setTimeout(() => { + // 姝や负uView鐨勬柟娉曪紝璇﹁璺敱鐩稿叧鏂囨。 + vm.$u.route('/pages/login/login') + }, 1500) + return false; + } else if (res.statusCode == 202) { + // 濡傛灉杩斿洖false锛屽垯浼氳皟鐢≒romise鐨剅eject鍥炶皟锛� + // 骞跺皢杩涘叆this.$u.post(url).then().catch(res=>{})鐨刢atch鍥炶皟涓紝res涓烘湇鍔$鐨勮繑鍥炲�� + vm.$u.post("/api/User/replaceToken").then(res => { + if (x.data.status) { + vm.$u.vuex('vuex_token', x.data.data) + vm.$u.route({ + type: "navigateBack", + delta: -1 + }) + } else { + console.log(x.data.message); + vm.$u.toast('楠岃瘉杩囨湡锛岃閲嶆柊鐧诲綍'); + setTimeout(() => { + // 姝や负uView鐨勬柟娉曪紝璇﹁璺敱鐩稿叧鏂囨。 + vm.$u.route('/pages/login/login') + }, 1500) + } + }).catch(err => { + uni.reLaunch({ + url: '/pages/login/login' + }); + }) + // uni.request({ + // url: "http://192.168.12.245:8099/api/User/replaceToken", + // param: {}, + // method: 'POST', + // responseType: "text", + // header: { + // Authorization: "Bearer " + vm.vuex_token + // }, + // async: false, + // success: function(x) { + // if (x.data.status) { + // vm.$u.vuex('vuex_token',x.data.data) + // vm.$u.route({ + // type: "navigateBack", + // delta: -1 + // }) + // } else { + // console.log(x.data.message); + // vm.$u.toast('楠岃瘉杩囨湡锛岃閲嶆柊鐧诲綍'); + // setTimeout(() => { + // // 姝や负uView鐨勬柟娉曪紝璇﹁璺敱鐩稿叧鏂囨。 + // vm.$u.route('/pages/user/login') + // }, 1500) + // } + // }, + // errror: function(ex) { + // console.log(ex); + // uni.reLaunch({ + // url: '/pages/user/login' + // }); + // }, + // }); + return false; + } + } +} + +export default { + install, + baseUrl +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/common/initdb.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/common/initdb.js" new file mode 100644 index 0000000..e69de29 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/common/initdb.js" diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/common/sql.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/common/sql.js" new file mode 100644 index 0000000..3510c4e --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/common/sql.js" @@ -0,0 +1,233 @@ +/** + * SQL璇彞瀹氫箟鏂囦欢 + * 鍖呭惈鍒涘缓琛ㄧ殑SQL璇彞鍜屽叾浠栧父鐢⊿QL鏌ヨ + */ + +/** + * id:涓婚敭 + * username:鐢ㄦ埛鍚� + * password:瀵嗙爜 + * real_name:鐪熷疄濮撳悕 + * role:瑙掕壊 + * last_login_time:涓婃鐧诲綍浜嬩欢 + */ +// 鍒涘缓鐢ㄦ埛琛� +const createUserTable = ` +CREATE TABLE IF NOT EXISTS users ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + username TEXT NOT NULL UNIQUE, + password TEXT NOT NULL, + real_name TEXT, + role TEXT DEFAULT 'user', + create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + last_login_time TIMESTAMP +)`; + +/** + * id:涓婚敭 + * orderNo:璁㈠崟鍙� + * status:鐘舵�� + * originalDoc:鍘熷鍗曟嵁 + * customer:瀹㈡埛 + * createUserId:鍒涘缓浜篿d + * createTime:鍒涘缓鏃堕棿 + * completeTime:瀹屾垚鏃堕棿 + * remark:澶囨敞 + */ +// 鍒涘缓璁㈠崟琛� +const createOrderTable = ` +CREATE TABLE IF NOT EXISTS orders ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + orderNo TEXT NOT NULL UNIQUE, + status TEXT DEFAULT 'pedding', + originalDoc TEXT, + customer TEXT, + createUserId INTEGER, + createTime TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + completeTime TIMESTAMP, + remark TEXT +)`; + +/** + * id:涓婚敭 + * name:鐗╂枡鍚嶇О + * create_time:鍒涘缓鏃堕棿 + */ +// 鍒涘缓鏍稿績鐗╂枡琛� +const createCoreMaterialTable = ` +CREATE TABLE IF NOT EXISTS core_materials ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + name TEXT NOT NULL, + create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP +)`; + +/** + * id:涓婚敭 + * orderNo:璁㈠崟鍙� + * material_name:鐗╂枡鍚嶇О + * tab_order:tab鎺掑簭 + */ +// 鍒涘缓璁㈠崟鐗╂枡鍏宠仈琛� +const createOrderMaterialTable = ` +CREATE TABLE IF NOT EXISTS order_materials ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + orderNo TEXT NOT NULL, + material_name TEXT NOT NULL, + tab_order INTEGER +)`; + +/** + * id:涓婚敭 + * orderNo:璁㈠崟鍙� + * material_name:鐗╂枡鍚嶇О + * reference_content:鏍囧畾淇℃伅 + * reference_content_index:鏍囧畾淇℃伅绱㈠紩 + * original_content:浜岀淮鐮佸師濮嬩俊鎭� + */ +//鐗╂枡鏍囧畾淇℃伅琛� +const createMaterialContentTable = ` +CREATE TABLE IF NOT EXISTS materials_content ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + orderNo TEXT NOT NULL, + material_name TEXT NOT NULL, + reference_content TEXT, + reference_content_index TEXT, + original_content TEXT +)`; + +/** + * id:涓婚敭 + * orderNo:璁㈠崟鍙� + * materialName:鐗╂枡鍚嶇О + * scan_content:鎵弿淇℃伅 + * reference_content:鏍囧畾淇℃伅 + * is_matched:鏄惁鍖归厤 + * scan_time:鎵弿鏃堕棿 + */ +// 鍒涘缓鎵弿璁板綍琛� +const createScanRecordTable = ` +CREATE TABLE IF NOT EXISTS scan_records ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + orderNo TEXT NOT NULL, + materialName TEXT NOT NULL, + scan_content TEXT NOT NULL, + reference_content TEXT, + is_matched BOOLEAN, + scan_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP +)`; + +// 鍒涘缓婵�娲讳俊鎭〃(鏆傛椂鏃犵敤) +const createActivationTable = ` +CREATE TABLE IF NOT EXISTS activation_info ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + device_uuid TEXT NOT NULL UNIQUE, + device_info TEXT, + runtime_code TEXT, + activation_code TEXT, + is_activated BOOLEAN DEFAULT 0, + trial_start_date DATE, + trial_end_date DATE, + activation_date DATE, + expiration_date DATE +)`; + +// 鍒涘缓绯荤粺璁剧疆琛�(鏆傛椂鏃犵敤) +const createSettingsTable = ` +CREATE TABLE IF NOT EXISTS settings ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + setting_key TEXT NOT NULL UNIQUE, + setting_value TEXT, + setting_desc TEXT, + update_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP +)`; + +/** + * id:涓婚敭 + * seq:搴忓彿 + * date:鏃堕棿 + */ +//搴忓垪琛� +const createSeqTable = ` +CREATE TABLE IF NOT EXISTS seq ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + seq INTEGER NOT NULL, + date TEXT NOT NULL +)`; + +/** + * id:涓婚敭 + * customerName:瀹㈡埛鍚嶇О + * create_time:鍒涘缓鏃堕棿 + */ +//瀹㈡埛琛� +const createCustomerTable = ` +CREATE TABLE IF NOT EXISTS customers ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + customerName TEXT NOT NULL, + create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP +)`; + +// 鍒濆鍖栫郴缁熻缃� +const initSettings = ` +INSERT OR IGNORE INTO settings (setting_key, setting_value, setting_desc) VALUES +('retention_days', '90', '璁㈠崟鏁版嵁淇濈暀澶╂暟') +`; + +// 鍒濆鍖栫鐞嗗憳璐︽埛 +const initAdminUser = ` +INSERT OR IGNORE INTO users (username, password, real_name, role) VALUES +('admin', '8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92', '绯荤粺绠$悊鍛�', 'admin') +`; + +const initSeq = ` +INSERT OR IGNORE INTO seq (seq, date) VALUES (1, CURRENT_DATE) +` + +// 瀵煎嚭鎵�鏈塖QL璇彞 +export const createTables = [ + createUserTable, + createOrderTable, + createCoreMaterialTable, + createOrderMaterialTable, + createScanRecordTable, + createActivationTable, + createSettingsTable, + createMaterialContentTable, + createSeqTable, + createCustomerTable +]; + +// 瀵煎嚭鍒濆鍖栨暟鎹殑SQL璇彞 +export const initData = [ + initSettings, + initAdminUser, + initSeq +]; + +// 甯哥敤鏌ヨ璇彞 +export const queries = { + // 鐢ㄦ埛鐩稿叧 + getUserByUsername: 'SELECT * FROM users WHERE username = ?', + updateUserLastLogin: 'UPDATE users SET last_login_time = CURRENT_TIMESTAMP WHERE id = ?', + + // 璁㈠崟鐩稿叧 + createOrder: 'INSERT INTO orders (order_no, order_name, create_user_id) VALUES (?, ?, ?)', + updateOrderStatus: 'UPDATE orders SET order_status = ? WHERE id = ?', + getOrderById: 'SELECT * FROM orders WHERE id = ?', + getOrderByNo: 'SELECT * FROM orders WHERE order_no = ?', + getRecentOrders: 'SELECT * FROM orders ORDER BY create_time DESC LIMIT ?', + + // 鏍稿績鐗╂枡鐩稿叧 + getAllMaterials: 'SELECT * FROM core_materials ORDER BY last_used_time DESC', + getMaterialById: 'SELECT * FROM core_materials WHERE id = ?', + getMaterialByCode: 'SELECT * FROM core_materials WHERE material_code = ?', + updateMaterialLastUsed: 'UPDATE core_materials SET last_used_time = CURRENT_TIMESTAMP WHERE id = ?', + + // 鎵弿璁板綍鐩稿叧 + addScanRecord: 'INSERT INTO scan_records (order_id, material_id, scan_content, reference_content, is_matched, scan_user_id) VALUES (?, ?, ?, ?, ?, ?)', + getScanRecordsByOrderId: 'SELECT * FROM scan_records WHERE order_id = ? ORDER BY scan_time DESC', + + // 婵�娲荤浉鍏� + getActivationInfo: 'SELECT * FROM activation_info WHERE device_uuid = ?', + updateActivationCode: 'UPDATE activation_info SET activation_code = ?, is_activated = 1, activation_date = CURRENT_DATE, expiration_date = ? WHERE device_uuid = ?' +}; \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/common/sqlite.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/common/sqlite.js" new file mode 100644 index 0000000..c38779f --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/common/sqlite.js" @@ -0,0 +1,279 @@ +/** + * SQLite鏁版嵁搴撴搷浣滄ā鍧� + * 鎻愪緵鏁版嵁搴撳垵濮嬪寲銆佹墽琛孲QL璇彞銆佹煡璇㈡暟鎹瓑鍔熻兘 + */ + +import { + dbConfig +} from './dbconfig.js'; +import { + createTables, + initData +} from './sql.js'; + +/** + * 鍒濆鍖栨暟鎹簱 + * @returns {Promise} 杩斿洖Promise瀵硅薄 + */ +export const initDatabase = () => { + return new Promise((resolve, reject) => { + // 鍒涘缓琛� + createAllTables() + .then(() => { + // 鍒濆鍖栨暟鎹� + return initializeData(); + }) + .then(() => { + resolve(); + }) + .catch(err => { + console.error('鏁版嵁搴撳垵濮嬪寲澶辫触', err); + reject(err); + }); + + }); +}; + +/** + * 鍒涘缓鎵�鏈夎〃 + * @returns {Promise} 杩斿洖Promise瀵硅薄 + */ +const createAllTables = () => { + return new Promise(async (resolve, reject) => { + try { + for (const sql of createTables) { + await executeSql(sql); + } + resolve(); + } catch (error) { + reject(error); + } + }); +}; + +/** + * 鍒濆鍖栨暟鎹� + * @returns {Promise} 杩斿洖Promise瀵硅薄 + */ +const initializeData = () => { + return new Promise(async (resolve, reject) => { + try { + for (const sql of initData) { + await executeSql(sql); + } + resolve(); + } catch (error) { + reject(error); + } + }); +}; + +/** + * 鎵цSQL璇彞 + * @param {string} sql SQL璇彞 + * @param {Array} params 鍙傛暟鏁扮粍 + * @returns {Promise} 杩斿洖Promise瀵硅薄 + */ +export const executeSql = (sql, params = []) => { + return new Promise((resolve, reject) => { + try { + openDatabase() + let exeSql = formatSQL(sql, params); + // console.log(exeSql) + plus.sqlite.executeSql({ + name: dbConfig.dbName, + sql: exeSql, + success: (e) => { + resolve(e); + }, + fail: (e) => { + console.error('SQL鎵ц澶辫触', sql, params, e); + reject(e); + } + }); + } catch (e) { + console.log('executeSql鎵цSQL璇彞澶辫触', e) + } finally { + closeDatabase(); + } + + }); +}; + +/** + * 鏌ヨ鏁版嵁 + * @param {string} sql SQL鏌ヨ璇彞 + * @param {Array} params 鍙傛暟鏁扮粍 + * @returns {Promise<Array>} 杩斿洖鏌ヨ缁撴灉鏁扮粍 + */ +export const query = (sql, params = []) => { + return new Promise((resolve, reject) => { + let exeSql = formatSQL(sql, params); + try { + // console.log(exeSql) + openDatabase() + plus.sqlite.selectSql({ + name: dbConfig.dbName, + sql: exeSql, + success: (e) => { + resolve(e); + }, + fail: (e) => { + console.error('鏌ヨ澶辫触', sql, params, e); + reject(e); + } + }); + } catch (e) { + console.log(`query鎵цSQL璇彞澶辫触銆�${exeSql}銆慲, e) + } finally { + closeDatabase(); + } + }); +}; + +/** + * 寮�濮嬩簨鍔� + * @returns {Promise} 杩斿洖Promise瀵硅薄 + */ +export const beginTransaction = () => { + return executeSql('BEGIN TRANSACTION'); +}; + +/** + * 鎻愪氦浜嬪姟 + * @returns {Promise} 杩斿洖Promise瀵硅薄 + */ +export const commitTransaction = () => { + return executeSql('COMMIT'); +}; + +/** + * 鍥炴粴浜嬪姟 + * @returns {Promise} 杩斿洖Promise瀵硅薄 + */ +export const rollbackTransaction = () => { + return executeSql('ROLLBACK'); +}; + +/** + * 鎻掑叆鏁版嵁骞惰繑鍥炴彃鍏ョ殑ID + * @param {string} tableName 琛ㄥ悕 + * @param {Object} data 瑕佹彃鍏ョ殑鏁版嵁瀵硅薄 + * @returns {Promise<number>} 杩斿洖鎻掑叆鐨処D + */ +export const insert = async (tableName, data) => { + const keys = Object.keys(data); + const values = Object.values(data); + const placeholders = keys.map(() => '?').join(','); + + // console.log(data) + const sql = `INSERT INTO ${tableName} (${keys.join(',')}) VALUES (${placeholders})`; + + await executeSql(sql, values); + + // 鑾峰彇鏈�鍚庢彃鍏ョ殑ID + const result = await query("SELECT * from sqlite_sequence where name = '" + tableName + "'"); + return result[0].seq; +}; + +/** + * 鏇存柊鏁版嵁 + * @param {string} tableName 琛ㄥ悕 + * @param {Object} data 瑕佹洿鏂扮殑鏁版嵁瀵硅薄 + * @param {string} whereClause WHERE瀛愬彞 + * @param {Array} whereParams WHERE瀛愬彞鍙傛暟 + * @returns {Promise} 杩斿洖Promise瀵硅薄 + */ +export const update = (tableName, data, whereClause, whereParams = []) => { + const keys = Object.keys(data); + const values = Object.values(data); + + const setClause = keys.map(key => `${key} = ?`).join(','); + + const sql = `UPDATE ${tableName} SET ${setClause} WHERE ${whereClause}`; + + return executeSql(sql, [...values, ...whereParams]); +}; + +/** + * 鍒犻櫎鏁版嵁 + * @param {string} tableName 琛ㄥ悕 + * @param {string} whereClause WHERE瀛愬彞 + * @param {Array} whereParams WHERE瀛愬彞鍙傛暟 + * @returns {Promise} 杩斿洖Promise瀵硅薄 + */ +export const deleteData = (tableName, whereClause, whereParams = []) => { + const sql = `DELETE FROM ${tableName} WHERE ${whereClause}`; + + return executeSql(sql, whereParams); +}; + +// 鎵撳紑/鍒涘缓鏁版嵁搴� +const openDatabase = () => { + // #ifdef APP-PLUS + return new Promise((resolve, reject) => { + plus.sqlite.openDatabase({ + name: dbConfig.dbName, + path: dbConfig.dbPath, + version: dbConfig.dbVersion, + success: (e) => { + resolve(e) + }, + fail: (e) => reject(`鏁版嵁搴撴墦寮�澶辫触: ${JSON.stringify(e)}`) + }); + }); + // #endif +} + +/** + * 鍏抽棴鏁版嵁搴� + * @returns {Promise} 杩斿洖Promise瀵硅薄 + */ +const closeDatabase = () => { + return new Promise((resolve, reject) => { + plus.sqlite.closeDatabase({ + name: dbConfig.dbName, + path: dbConfig.dbPath, + success: (e) => resolve(e), + fail: (e) => reject(`鏁版嵁搴撳叧闂け璐�: ${JSON.stringify(e)}`) + }); + }); +} + +/** + * 妫�鏌ユ暟鎹簱鏄惁宸插垵濮嬪寲 + * @returns {boolean} 鏄惁宸插垵濮嬪寲 + */ +export const isDatabaseInitialized = () => { + return db !== null; +}; + +/** + * 鑾峰彇鏁版嵁搴撲俊鎭� + * @returns {Object} 鏁版嵁搴撲俊鎭� + */ +export const getDatabaseInfo = () => { + return { + name: dbConfig.dbName, + version: dbConfig.dbVersion, + path: dbConfig.dbPath + }; +}; + +// SQL鏍煎紡鍖栧伐鍏峰嚱鏁� +// SQL鏍煎紡鍖栧伐鍏峰嚱鏁� +const formatSQL = (sql, params) => { + try { + return sql.replace(/\?/g, (match) => { + const value = params.shift(); + // 澶勭悊涓嶅悓绫诲瀷鐨勬暟鎹� + if (value === null || value === undefined) return 'NULL'; + if (typeof value === 'string') return `'${value.replace(/'/g, "''")}'`; + if (value instanceof Date) return `'${value.toISOString()}'`; + return value; + }); + } catch (e) { + console.error('SQL鏍煎紡鍖栭敊璇�', e); + } + +} \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/common/toast.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/common/toast.js" new file mode 100644 index 0000000..e38b1cf --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/common/toast.js" @@ -0,0 +1,96 @@ +import Vue from 'vue' +import SuperToast from '@/components/toast-message' + +const Toast = { + install(Vue, options = {}) { + // 瀹夊叏妫�娴嬫祻瑙堝櫒鐜 + const isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' + + // 鍒涘缓瀹夊叏鐨凞OM鎿嶄綔鏂规硶 + const safeDOM = { + createContainer: () => { + if (!isBrowser) return null + + const container = document.createElement('div') + container.className = 'uni-toast-container' + document.body.appendChild(container) + return container + }, + removeContainer: (container) => { + if (isBrowser && container && container.parentNode) { + document.body.removeChild(container) + } + } + } + + let toastInstance = null + let currentContainer = null + + Vue.prototype.$toast = (options) => { + // 澶勭悊闈炴祻瑙堝櫒鐜 + if (!isBrowser) { + console.warn('[Toast] 褰撳墠鐜涓嶆敮鎸丏OM鎿嶄綔') + return { + close: () => {}, + update: () => {} + } + } + + // 娓呯悊鏃у疄渚� + if (toastInstance) { + toastInstance.$destroy() + safeDOM.removeContainer(currentContainer) + } + + // 鍒涘缓鏂板疄渚� + currentContainer = safeDOM.createContainer() + const config = typeof options === 'string' ? + { + message: options + } : + options + + toastInstance = new Vue({ + render: h => h(SuperToast, { + props: { + ...config, + showClose: config.showClose ?? true + }, + on: { + close: () => { + setTimeout(() => { + toastInstance.$destroy() + safeDOM.removeContainer(currentContainer) + currentContainer = null + }, 300) + } + } + }) + }).$mount(currentContainer) + + // 杩斿洖鎺у埗鍣� + return { + close: () => toastInstance?.$children[0]?.hide(), + update: (newOptions) => { + if (toastInstance?.$children[0]) { + Object.assign(toastInstance.$children[0].$props, newOptions) + } + } + } + } + + // 蹇嵎鏂规硶 + const types = ['info', 'success', 'warning', 'error', 'loading'] + types.forEach(type => { + Vue.prototype.$toast[type] = (message, duration = 2000) => { + return Vue.prototype.$toast({ + type, + message, + duration + }) + } + }) + } +} + +Vue.use(Toast) \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/common/utils.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/common/utils.js" new file mode 100644 index 0000000..e78ca93 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/common/utils.js" @@ -0,0 +1,21 @@ +/** + * 鏍煎紡鍖栨棩鏈� + * @param {string|Date} date 鏃ユ湡瀛楃涓叉垨Date瀵硅薄 + * @returns {string} 鏍煎紡鍖栧悗鐨勬棩鏈熷瓧绗︿覆 + */ +export function formatDate(date) { + if (!date) return '' + + const d = new Date(date) + const year = d.getFullYear() + const month = String(d.getMonth() + 1).padStart(2, '0') + const day = String(d.getDate()).padStart(2, '0') + const hours = String(d.getHours()).padStart(2, '0') + const minutes = String(d.getMinutes()).padStart(2, '0') + + return `${year}-${month}-${day} ${hours}:${minutes}` +} + +/** + * 鍏朵粬宸ュ叿鍑芥暟鍙互鍦ㄨ繖閲屾坊鍔� + */ \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/components/BaseModal.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/components/BaseModal.vue" new file mode 100644 index 0000000..20fabf8 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/components/BaseModal.vue" @@ -0,0 +1,240 @@ +<template> + <view v-if="visible" class="modal-container" @touchmove.stop.prevent> + <!-- 閬僵灞� --> + <view class="modal-mask" @click="handleMaskClick"></view> + + <!-- 寮圭獥涓讳綋 --> + <view class="modal-content" :class="['modal-animation-' + animationType, customClass]" + :style="{ width: width }"> + <!-- 鏍囬鍖� --> + <view class="modal-header" v-if="title || $slots.header"> + <slot name="header"> + <text class="modal-title">{{ title }}</text> + </slot> + <view v-if="showClose" class="close-btn" @click="close"> + <text class="iconfont icon-close">脳</text> + </view> + </view> + + <!-- 鍐呭鍖� --> + <view class="modal-body"> + <slot></slot> + </view> + + <!-- 搴曢儴鎸夐挳鍖� --> + <view v-if="showFooter || $slots.footer" class="modal-footer"> + <slot name="footer"> + <button class="modal-btn cancel-btn" @click="handleCancel">{{ cancelText }}</button> + <button class="modal-btn confirm-btn" @click="handleConfirm">{{ confirmText }}</button> + </slot> + </view> + </view> + </view> +</template> + +<script> + export default { + name: 'BaseModal', + props: { + value: { // Vue2鐨剉-model浼犲�� + type: Boolean, + default: false + }, + title: String, + width: { + type: String, + default: '600rpx' + }, + cancelText: { + type: String, + default: '鍙栨秷' + }, + confirmText: { + type: String, + default: '纭畾' + }, + showClose: { + type: Boolean, + default: true + }, + showFooter: { + type: Boolean, + default: true + }, + maskClosable: { + type: Boolean, + default: true + }, + animationType: { + type: String, + default: 'fade', // fade/scale/slide-up + validator: (val) => ['fade', 'scale', 'slide-up'].includes(val) + }, + customClass: String + }, + data() { + return { + visible: this.value + } + }, + watch: { + value(newVal) { + this.visible = newVal + }, + visible(newVal) { + this.$emit('input', newVal) // Vue2鐨剉-model浜嬩欢 + } + }, + methods: { + close() { + this.visible = false + this.$emit('close') + }, + handleMaskClick() { + if (this.maskClosable) this.close() + }, + handleCancel() { + this.$emit('cancel') + this.close() + }, + handleConfirm() { + this.$emit('confirm') + } + } + } +</script> + +<style scoped> + /* 鍩虹甯冨眬 */ + .modal-container { + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + z-index: 9999; + display: flex; + justify-content: center; + align-items: center; + } + + .modal-mask { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: rgba(0, 0, 0, 0.5); + } + + .modal-content { + position: relative; + background-color: #fff; + border-radius: 16rpx; + box-shadow: 0 10rpx 30rpx rgba(0, 0, 0, 0.2); + overflow: hidden; + z-index: 1; + } + + /* 鍔ㄧ敾鏁堟灉 */ + .modal-animation-fade { + opacity: 0; + transition: opacity 0.3s; + } + + .modal-animation-scale { + opacity: 0; + transform: scale(0.8); + transition: all 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28); + } + + .modal-animation-slide-up { + opacity: 0; + transform: translateY(100px); + transition: all 0.3s ease-out; + } + + .modal-container[v-if] .modal-animation-fade, + .modal-container[v-if] .modal-animation-scale, + .modal-container[v-if] .modal-animation-slide-up { + opacity: 1; + transform: scale(1) translateY(0); + } + + /* 澶撮儴鏍峰紡 */ + .modal-header { + padding: 30rpx; + display: flex; + justify-content: space-between; + align-items: center; + border-bottom: 1rpx solid #f5f5f5; + } + + .modal-title { + font-size: 32rpx; + font-weight: bold; + color: #333; + } + + .close-btn { + width: 40rpx; + height: 40rpx; + display: flex; + justify-content: center; + align-items: center; + color: #999; + font-size: 36rpx; + } + + /* 鍐呭鍖烘牱寮� */ + .modal-body { + padding: 30rpx; + max-height: 60vh; + overflow-y: auto; + } + + /* 搴曢儴鎸夐挳鍖� */ + .modal-footer { + display: flex; + justify-content: flex-end; + /* 鎸夐挳鍙冲榻� */ + align-items: center; + padding: 30rpx; + border-top: 1rpx solid #f5f5f5; + } + + .modal-btn { + height: 70rpx; + min-width: 160rpx; + margin: 0; + margin-left: 20rpx; + padding: 0 30rpx; + border-radius: 35rpx; + font-size: 28rpx; + line-height: 70rpx; + } + + .cancel-btn { + background-color: #f5f5f5; + color: #666; + } + + .confirm-btn { + height: 70rpx; + min-width: 160rpx; + margin: 0; + margin-left: 20rpx; + padding: 0 30rpx; + border-radius: 35rpx; + font-size: 28rpx; + line-height: 70rpx; + background-color: #007AFF; + color: #fff; + } + + .modal-content { + /* 寮哄埗鏄剧ず */ + opacity: 1 !important; + transform: none !important; + } +</style> \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/components/CustomModal.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/components/CustomModal.vue" new file mode 100644 index 0000000..585b7b7 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/components/CustomModal.vue" @@ -0,0 +1,153 @@ +<template> + <base-modal v-model="visible" :title="title" :width="width" :animation-type="animationType" :show-close="showClose" + :show-footer="showFooter" :mask-closable="maskClosable" :custom-class="customClass" @confirm="handleConfirm" + @cancel="handleCancel" @close="handleClose"> + <!-- 鍐呭鎻掓Ы --> + <slot name="content"> + <view class="custom-content"> + <image v-if="imageUrl" class="custom-image" :src="imageUrl" mode="aspectFit" /> + <text class="custom-text">{{ content }}</text> + </view> + </slot> + + <!-- 搴曢儴鎻掓Ы --> + <template v-if="!hideFooter" #footer> + <slot name="footer"> + <button v-if="showCancelBtn" class="custom-btn cancel-btn" + @click="handleCancel">{{ cancelText }}</button> + <button class="custom-btn confirm-btn" :style="confirmBtnStyle" @click="handleConfirm"> + {{ confirmText }} + <image v-if="confirmIcon" class="btn-icon" :src="confirmIcon" /> + </button> + </slot> + </template> + </base-modal> +</template> + +<script> + // 纭繚璺緞姝g‘ + import BaseModal from '@/components/BaseModal.vue' + export default { + components: { + BaseModal + }, + name: 'CustomModal', + props: { + value: Boolean, + title: String, + content: String, + imageUrl: String, + confirmText: { + type: String, + default: '纭' + }, + cancelText: { + type: String, + default: '鍙栨秷' + }, + confirmIcon: String, + width: { + type: String, + default: '650rpx' + }, + animationType: { + type: String, + default: 'fade' + }, + showClose: { + type: Boolean, + default: true + }, + showFooter: { + type: Boolean, + default: true + }, + showCancelBtn: { + type: Boolean, + default: true + }, + maskClosable: { + type: Boolean, + default: true + }, + hideFooter: Boolean, + customClass: String, + confirmBtnStyle: { + type: Object, + default: () => ({ + background: 'linear-gradient(to right, #4facfe, #00f2fe)' + }) + } + }, + data() { + return { + visible: this.value + } + }, + watch: { + value(newVal) { + this.visible = newVal + }, + visible(newVal) { + this.$emit('input', newVal) + } + }, + methods: { + handleConfirm() { + this.$emit('confirm') + }, + handleCancel() { + this.$emit('cancel') + this.visible = false + }, + handleClose() { + this.$emit('close') + } + } + } +</script> + +<style scoped> + .custom-content { + padding: 20rpx; + } + + .custom-image { + width: 100%; + height: 300rpx; + border-radius: 8rpx; + margin-bottom: 20rpx; + } + + .custom-text { + font-size: 28rpx; + color: #666; + line-height: 1.6; + } + + .custom-btn { + height: 70rpx; + min-width: 160rpx; + margin: 0; + margin-left: 20rpx; + padding: 0 30rpx; + border-radius: 35rpx; + font-size: 28rpx; + line-height: 70rpx; + } + + .cancel-btn { + background-color: #f5f5f5; + color: #666; + } + + .confirm-btn { + color: #fff; + } + + .btn-icon { + width: 30rpx; + height: 30rpx; + margin-left: 10rpx; + } +</style> \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/components/CustomToast.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/components/CustomToast.vue" new file mode 100644 index 0000000..b85a5ef --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/components/CustomToast.vue" @@ -0,0 +1,362 @@ +<template> + <!-- 涓诲鍣� - 甯﹀叆鍦哄姩鐢� --> + <transition :name="animationType"> + <view v-if="visible" class="super-toast" :class="[position, type, { 'has-icon': showIcon }]" + :style="toastStyle"> + <!-- 鍥炬爣瀹瑰櫒锛堝乏渚э級 --> + <view v-if="showIcon" class="icon-box" :style="iconBoxStyle"> + <template v-if="!isLoading"> + <uni-icons v-if="!customIcon" :type="iconTypeMap[type]" size="22" :color="iconColor" /> + <image v-else :src="customIcon" class="custom-icon" mode="aspectFit" /> + </template> + <uni-icons v-else type="refresh" size="22" :color="iconColor" class="loading-rotate" /> + </view> + + <!-- 鏂囧瓧鍐呭锛堜腑闂达級 --> + <text class="content-text" :style="{ color: textColor }"> + {{ message }} + </text> + + <!-- 鍏抽棴鎸夐挳锛堝彸渚э級 --> + <view v-if="showClose" class="close-btn" @click="handleClose"> + <uni-icons type="closeempty" size="16" :color="closeColor" /> + </view> + + <!-- 杩涘害鏉★紙搴曢儴锛� --> + <view v-if="showProgressBar" class="progress-bar" :style="progressBarStyle"></view> + </view> + </transition> +</template> + +<script> + const DEFAULT_DURATION = 2000 + const TYPE_CONFIG = { + info: { + icon: 'info', + bg: 'rgba(24, 144, 255, 0.9)', + iconColor: '#fff', + progressColor: '#1890ff' + }, + success: { + icon: 'checkmarkempty', + bg: 'rgba(82, 196, 26, 0.9)', + iconColor: '#fff', + progressColor: '#52c41a' + }, + warning: { + icon: 'alert', + bg: 'rgba(250, 173, 20, 0.9)', + iconColor: '#fff', + progressColor: '#faad14' + }, + error: { + icon: 'closeempty', + bg: 'rgba(245, 34, 45, 0.9)', + iconColor: '#fff', + progressColor: '#f5222d' + }, + loading: { + icon: 'refresh', + bg: 'rgba(24, 144, 255, 0.9)', + iconColor: '#fff', + progressColor: '#1890ff' + } + } + + export default { + name: 'SuperToast', + props: { + }, + data() { + return { + visible: false, + progress: 100, + timer: null, + progressTimer: null, + message: '', + type: 'info', + position: 'center', + duration: 2000, + bgColor: '', + textColor: '#fff', + iconColor: '', + closeColor: 'rgba(255,255,255,0.7)', + progressColor: '', + showIcon: true, + showClose: false, + showProgressBar: true, + customIcon: '', + isLoading: false, + animationType: 'fade' + } + }, + computed: { + toastStyle() { + const typeConfig = TYPE_CONFIG[this.type] + return { + backgroundColor: this.bgColor || typeConfig.bg, + boxShadow: `0 4px 12px ${this.bgColor || typeConfig.bg}33` + } + }, + iconBoxStyle() { + return { + backgroundColor: this.bgColor ? + `${this.bgColor}33` : `${TYPE_CONFIG[this.type].bg}33` + } + }, + progressBarStyle() { + const typeConfig = TYPE_CONFIG[this.type] + return { + width: `${this.progress}%`, + backgroundColor: this.progressColor || typeConfig.progressColor + } + }, + iconTypeMap() { + return Object.fromEntries( + Object.entries(TYPE_CONFIG).map(([key, val]) => [key, val.icon]) + ) + } + }, + methods: { + show(config) { + this.message = config.message; + this.clearTimers() + this.progress = 100 // 閲嶇疆杩涘害鏉� + this.visible = true + this.startCountdown() + }, + hide() { + this.visible = false + this.clearTimers() + this.$emit('close') + }, + handleClose() { + this.hide() + this.$emit('close-click') + }, + startCountdown() { + this.clearTimers() + + if (this.duration <= 0) return + + // 涓昏鏃跺櫒 + this.timer = setTimeout(() => { + this.hide() + }, this.duration) + + // 杩涘害鏉″姩鐢� + if (this.showProgressBar) { + const interval = 50 + const steps = this.duration / interval + const stepSize = 100 / steps + + this.progressTimer = setInterval(() => { + this.progress -= stepSize + if (this.progress <= 0) { + clearInterval(this.progressTimer) + } + }, interval) + } + }, + clearTimers() { + clearTimeout(this.timer) + clearInterval(this.progressTimer) + } + }, + beforeDestroy() { + this.clearTimers() + // 纭繚DOM鑺傜偣琚Щ闄� + if (this.$el && this.$el.parentNode) { + this.$el.parentNode.removeChild(this.$el) + } + } + } +</script> + +<style lang="scss" scoped> + /* 鍩虹瀹瑰櫒鏍峰紡 */ + .super-toast { + position: fixed; + left: 50%; + transform: translateX(-50%); + min-width: 280px; + max-width: 90%; + padding: 16px 20px; + border-radius: 12px; + display: flex; + align-items: center; + z-index: 9999; + box-sizing: border-box; + transition: all 0.3s ease; + + /* 鐜荤拑鎷熸�佹晥鏋� */ + backdrop-filter: blur(10px); + -webkit-backdrop-filter: blur(10px); + background: rgba(255, 255, 255, 0.15); + box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1); + border: 1px solid rgba(255, 255, 255, 0.18); + + /* 鏂囧瓧涓嶅彲閫変腑 */ + user-select: none; + } + + /* 浣嶇疆璋冩暣 */ + .top { + top: 20%; + animation: slideDown 0.4s cubic-bezier(0.22, 0.61, 0.36, 1); + } + + .center { + top: 50%; + transform: translate(-50%, -50%); + animation: fadeIn 0.3s ease-out; + } + + .bottom { + bottom: 15%; + animation: slideUp 0.4s cubic-bezier(0.22, 0.61, 0.36, 1); + } + + /* 鍥炬爣鍖哄煙 */ + .icon-box { + width: 28px; + height: 28px; + border-radius: 50%; + display: flex; + justify-content: center; + align-items: center; + margin-right: 12px; + flex-shrink: 0; + + .custom-icon { + width: 20px; + height: 20px; + } + + .loading-rotate { + animation: rotate 1s linear infinite; + } + } + + /* 鍐呭鏂囧瓧 */ + .content-text { + font-size: 15px; + line-height: 1.5; + font-weight: 500; + flex: 1; + text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); + } + + /* 鍏抽棴鎸夐挳 */ + .close-btn { + width: 24px; + height: 24px; + border-radius: 50%; + display: flex; + justify-content: center; + align-items: center; + margin-left: 8px; + cursor: pointer; + transition: all 0.2s; + + &:active { + background: rgba(255, 255, 255, 0.2); + transform: scale(0.9); + } + } + + /* 杩涘害鏉� */ + .progress-bar { + position: absolute; + bottom: 0; + left: 0; + height: 3px; + border-radius: 0 0 12px 12px; + transition: width 0.1s linear; + } + + /* 鍔ㄧ敾瀹氫箟 */ + @keyframes fadeIn { + from { + opacity: 0; + } + + to { + opacity: 1; + } + } + + @keyframes slideDown { + from { + opacity: 0; + transform: translate(-50%, -20px); + } + + to { + opacity: 1; + transform: translate(-50%, 0); + } + } + + @keyframes slideUp { + from { + opacity: 0; + transform: translate(-50%, 20px); + } + + to { + opacity: 1; + transform: translate(-50%, 0); + } + } + + @keyframes rotate { + from { + transform: rotate(0deg); + } + + to { + transform: rotate(360deg); + } + } + + /* 鍝嶅簲寮忚皟鏁� */ + @media (max-width: 480px) { + .super-toast { + min-width: 240px; + padding: 12px 16px; + + .content-text { + font-size: 14px; + } + } + } + + .v-enter-active, + .v-leave-active { + transition: all 0.3s ease; + } + + .v-enter-from, + .v-leave-to { + opacity: 0; + transform: translate(-50%, 20px); + } + + .v-enter-to, + .v-leave-from { + opacity: 1; + transform: translate(-50%, 0); + } + + /* 閽堝涓嶅悓浣嶇疆璋冩暣鍔ㄧ敾 */ + .top .v-enter-from, + .top .v-leave-to { + transform: translate(-50%, -20px); + } + + .center .v-enter-from, + .center .v-leave-to { + transform: translate(-50%, -50%) scale(0.9); + } +</style> \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/components/toast-message.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/components/toast-message.vue" new file mode 100644 index 0000000..1ab6ce2 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/components/toast-message.vue" @@ -0,0 +1,401 @@ +<template> + <!-- 涓诲鍣� - 甯﹀叆鍦哄姩鐢� --> + <transition :name="animationType"> + <view v-if="visible" class="super-toast" :class="[position, type, { 'has-icon': showIcon }]" + :style="toastStyle"> + <!-- 鍥炬爣瀹瑰櫒锛堝乏渚э級 --> + <view v-if="showIcon" class="icon-box" :style="iconBoxStyle"> + <template v-if="!isLoading"> + <uni-icons v-if="!customIcon" :type="iconTypeMap[type]" size="22" :color="iconColor" /> + <image v-else :src="customIcon" class="custom-icon" mode="aspectFit" /> + </template> + <uni-icons v-else type="refresh" size="22" :color="iconColor" class="loading-rotate" /> + </view> + + <!-- 鏂囧瓧鍐呭锛堜腑闂达級 --> + <text class="content-text" :style="{ color: textColor }"> + {{ message }} + </text> + + <!-- 鍏抽棴鎸夐挳锛堝彸渚э級 --> + <view v-if="showClose" class="close-btn" @click="handleClose"> + <uni-icons type="closeempty" size="16" :color="closeColor" /> + </view> + + <!-- 杩涘害鏉★紙搴曢儴锛� --> + <view v-if="showProgressBar" class="progress-bar" :style="progressBarStyle"></view> + </view> + </transition> +</template> + +<script> + const DEFAULT_DURATION = 2000 + const TYPE_CONFIG = { + info: { + icon: 'info', + bg: 'rgba(24, 144, 255, 0.9)', + iconColor: '#fff', + progressColor: '#1890ff' + }, + success: { + icon: 'checkmarkempty', + bg: 'rgba(82, 196, 26, 0.9)', + iconColor: '#fff', + progressColor: '#52c41a' + }, + warning: { + icon: 'alert', + bg: 'rgba(250, 173, 20, 0.9)', + iconColor: '#fff', + progressColor: '#faad14' + }, + error: { + icon: 'closeempty', + bg: 'rgba(245, 34, 45, 0.9)', + iconColor: '#fff', + progressColor: '#f5222d' + }, + loading: { + icon: 'refresh', + bg: 'rgba(24, 144, 255, 0.9)', + iconColor: '#fff', + progressColor: '#1890ff' + } + } + + export default { + name: 'SuperToast', + props: { + // 鍩虹閰嶇疆 + message: { + type: String, + required: true + }, + type: { + type: String, + default: 'info', + validator: val => Object.keys(TYPE_CONFIG).includes(val) + }, + position: { + type: String, + default: 'center', + validator: val => ['top', 'center', 'bottom'].includes(val) + }, + duration: { + type: Number, + default: DEFAULT_DURATION + }, + + // 瑙嗚瀹氬埗 + bgColor: String, + textColor: { + type: String, + default: '#fff' + }, + iconColor: String, + closeColor: { + type: String, + default: 'rgba(255,255,255,0.7)' + }, + progressColor: String, + + // 鍔熻兘寮�鍏� + showIcon: { + type: Boolean, + default: true + }, + showClose: { + type: Boolean, + default: false + }, + showProgressBar: { + type: Boolean, + default: true + }, + customIcon: String, + isLoading: Boolean, + + // 楂樼骇鍔ㄧ敾 + animationType: { + type: String, + default: 'fade', + validator: val => ['fade', 'slide', 'zoom'].includes(val) + } + }, + data() { + return { + visible: false, + progress: 100, + timer: null, + progressTimer: null + } + }, + computed: { + toastStyle() { + const typeConfig = TYPE_CONFIG[this.type] + return { + backgroundColor: this.bgColor || typeConfig.bg, + boxShadow: `0 4px 12px ${this.bgColor || typeConfig.bg}33` + } + }, + iconBoxStyle() { + return { + backgroundColor: this.bgColor ? + `${this.bgColor}33` : `${TYPE_CONFIG[this.type].bg}33` + } + }, + progressBarStyle() { + const typeConfig = TYPE_CONFIG[this.type] + return { + width: `${this.progress}%`, + backgroundColor: this.progressColor || typeConfig.progressColor + } + }, + iconTypeMap() { + return Object.fromEntries( + Object.entries(TYPE_CONFIG).map(([key, val]) => [key, val.icon]) + ) + } + }, + methods: { + show() { + this.clearTimers() + this.progress = 100 // 閲嶇疆杩涘害鏉� + this.visible = true + this.startCountdown() + }, + hide() { + this.visible = false + this.clearTimers() + this.$emit('close') + }, + handleClose() { + this.hide() + this.$emit('close-click') + }, + startCountdown() { + this.clearTimers() + + if (this.duration <= 0) return + + // 涓昏鏃跺櫒 + this.timer = setTimeout(() => { + this.hide() + }, this.duration) + + // 杩涘害鏉″姩鐢� + if (this.showProgressBar) { + const interval = 50 + const steps = this.duration / interval + const stepSize = 100 / steps + + this.progressTimer = setInterval(() => { + this.progress -= stepSize + if (this.progress <= 0) { + clearInterval(this.progressTimer) + } + }, interval) + } + }, + clearTimers() { + clearTimeout(this.timer) + clearInterval(this.progressTimer) + } + }, + beforeDestroy() { + this.clearTimers() + // 纭繚DOM鑺傜偣琚Щ闄� + if (this.$el && this.$el.parentNode) { + this.$el.parentNode.removeChild(this.$el) + } + } + } +</script> + +<style lang="scss" scoped> + /* 鍩虹瀹瑰櫒鏍峰紡 */ + .super-toast { + position: fixed; + left: 50%; + transform: translateX(-50%); + min-width: 280px; + max-width: 90%; + padding: 16px 20px; + border-radius: 12px; + display: flex; + align-items: center; + z-index: 9999; + box-sizing: border-box; + transition: all 0.3s ease; + + /* 鐜荤拑鎷熸�佹晥鏋� */ + backdrop-filter: blur(10px); + -webkit-backdrop-filter: blur(10px); + background: rgba(255, 255, 255, 0.15); + box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1); + border: 1px solid rgba(255, 255, 255, 0.18); + + /* 鏂囧瓧涓嶅彲閫変腑 */ + user-select: none; + } + + /* 浣嶇疆璋冩暣 */ + .top { + top: 20%; + animation: slideDown 0.4s cubic-bezier(0.22, 0.61, 0.36, 1); + } + + .center { + top: 50%; + transform: translate(-50%, -50%); + animation: fadeIn 0.3s ease-out; + } + + .bottom { + bottom: 15%; + animation: slideUp 0.4s cubic-bezier(0.22, 0.61, 0.36, 1); + } + + /* 鍥炬爣鍖哄煙 */ + .icon-box { + width: 28px; + height: 28px; + border-radius: 50%; + display: flex; + justify-content: center; + align-items: center; + margin-right: 12px; + flex-shrink: 0; + + .custom-icon { + width: 20px; + height: 20px; + } + + .loading-rotate { + animation: rotate 1s linear infinite; + } + } + + /* 鍐呭鏂囧瓧 */ + .content-text { + font-size: 15px; + line-height: 1.5; + font-weight: 500; + flex: 1; + text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); + } + + /* 鍏抽棴鎸夐挳 */ + .close-btn { + width: 24px; + height: 24px; + border-radius: 50%; + display: flex; + justify-content: center; + align-items: center; + margin-left: 8px; + cursor: pointer; + transition: all 0.2s; + + &:active { + background: rgba(255, 255, 255, 0.2); + transform: scale(0.9); + } + } + + /* 杩涘害鏉� */ + .progress-bar { + position: absolute; + bottom: 0; + left: 0; + height: 3px; + border-radius: 0 0 12px 12px; + transition: width 0.1s linear; + } + + /* 鍔ㄧ敾瀹氫箟 */ + @keyframes fadeIn { + from { + opacity: 0; + } + + to { + opacity: 1; + } + } + + @keyframes slideDown { + from { + opacity: 0; + transform: translate(-50%, -20px); + } + + to { + opacity: 1; + transform: translate(-50%, 0); + } + } + + @keyframes slideUp { + from { + opacity: 0; + transform: translate(-50%, 20px); + } + + to { + opacity: 1; + transform: translate(-50%, 0); + } + } + + @keyframes rotate { + from { + transform: rotate(0deg); + } + + to { + transform: rotate(360deg); + } + } + + /* 鍝嶅簲寮忚皟鏁� */ + @media (max-width: 480px) { + .super-toast { + min-width: 240px; + padding: 12px 16px; + + .content-text { + font-size: 14px; + } + } + } + + .v-enter-active, + .v-leave-active { + transition: all 0.3s ease; + } + + .v-enter-from, + .v-leave-to { + opacity: 0; + transform: translate(-50%, 20px); + } + + .v-enter-to, + .v-leave-from { + opacity: 1; + transform: translate(-50%, 0); + } + + /* 閽堝涓嶅悓浣嶇疆璋冩暣鍔ㄧ敾 */ + .top .v-enter-from, + .top .v-leave-to { + transform: translate(-50%, -20px); + } + + .center .v-enter-from, + .center .v-leave-to { + transform: translate(-50%, -50%) scale(0.9); + } +</style> \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/components/uni-section/config.json" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/components/uni-section/config.json" new file mode 100644 index 0000000..43d5d01 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/components/uni-section/config.json" @@ -0,0 +1,12 @@ +{ + "id": "99999", + "name": "Section", + "desc": "鏍囬鏍�", + "edition": "0.0.1", + "url": "section", + "type": "甯冨眬缁勪欢", + "path": "https://ext.dcloud.net.cn/plugin?id=", + "hidden": true, + "test":true, + "update_log": [] +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/components/uni-section/readme.md" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/components/uni-section/readme.md" new file mode 100644 index 0000000..c5998fa --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/components/uni-section/readme.md" @@ -0,0 +1,30 @@ +### Section 鏍囬鏍� + +鏍囬鏍忥紝鐢ㄤ簬鏄剧ず鏍囬锛岀粍浠跺悕锛歚`uni-section``锛屼唬鐮佸潡锛� uSection銆� + +### 浣跨敤鏂瑰紡 + +鍦� ``script`` 涓紩鐢ㄧ粍浠� + +```javascript +import uniSection from "@/components/uni-section/uni-section.vue" +export default { + components: {uniSection} +} +``` + +鍦� ``template`` 涓娇鐢ㄧ粍浠� + +```html +<uni-section title="鍙湁涓绘爣棰�"></uni-section> +<uni-section title="绔栫嚎瑁呴グ" sub-title="鍓爣棰�" type="line"></uni-section> +<uni-section title="鍦嗗舰瑁呴グ" sub-title="鍓爣棰�" type="circle"></uni-section> +``` + +### 灞炴�ц鏄� + +|灞炴�у悕 |绫诲瀷 |榛樿鍊� |璇存槑 | +|--- |---- |--- |--- | +|type |String |- |鏍囬瑁呴グ绫诲瀷 锛屽彲閫夊�硷細line锛堢珫绾匡級銆乧ircle锛堝渾褰級| +|title |String |- |涓绘爣棰� | +|sub-title |String |- |鍓爣棰� | diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/components/uni-section/uni-section.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/components/uni-section/uni-section.vue" new file mode 100644 index 0000000..52a1567 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/components/uni-section/uni-section.vue" @@ -0,0 +1,136 @@ +<template> + <view class="uni-section" nvue> + <view v-if="type" class="uni-section__head"> + <view :class="type" class="uni-section__head-tag" /> + </view> + <view class="uni-section__content"> + <text :class="{'distraction':!subTitle}" class="uni-section__content-title">{{ title }}</text> + <text v-if="subTitle" class="uni-section__content-sub">{{ subTitle }}</text> + </view> + <slot /> + </view> +</template> + +<script> + + /** + * Section 鏍囬鏍� + * @description 鏍囬鏍� + * @property {String} type = [line|circle] 鏍囬瑁呴グ绫诲瀷 + * @value line 绔栫嚎 + * @value circle 鍦嗗舰 + * @property {String} title 涓绘爣棰� + * @property {String} subTitle 鍓爣棰� + */ + + export default { + name: 'UniSection', + props: { + type: { + type: String, + default: '' + }, + title: { + type: String, + default: '' + }, + subTitle: { + type: String, + default: '' + } + }, + data() { + return {} + }, + watch: { + title(newVal) { + if (uni.report && newVal !== '') { + uni.report('title', newVal) + } + } + }, + methods: { + onClick() { + this.$emit('click') + } + } + } +</script> +<style lang="scss" scoped> + .uni-section { + position: relative; + /* #ifndef APP-NVUE */ + display: flex; + /* #endif */ + margin-top: 10px; + flex-direction: row; + align-items: center; + padding: 0 10px; + height: 50px; + background-color: $uni-bg-color-grey; + /* #ifdef APP-NVUE */ + // border-bottom-color: $uni-border-color; + // border-bottom-style: solid; + // border-bottom-width: 0.5px; + /* #endif */ + font-weight: normal; + } + /* #ifndef APP-NVUE */ + // .uni-section:after { + // position: absolute; + // bottom: 0; + // right: 0; + // left: 0; + // height: 1px; + // content: ''; + // -webkit-transform: scaleY(.5); + // transform: scaleY(.5); + // background-color: $uni-border-color; + // } + /* #endif */ + + .uni-section__head { + flex-direction: row; + justify-content: center; + align-items: center; + margin-right: 10px; + } + + .line { + height: 15px; + background-color: $uni-text-color-disable; + border-radius: 5px; + width: 3px; + } + + .circle { + width: 8px; + height: 8px; + border-top-right-radius: 50px; + border-top-left-radius: 50px; + border-bottom-left-radius: 50px; + border-bottom-right-radius: 50px; + background-color: $uni-text-color-disable; + } + + .uni-section__content { + flex-direction: column; + flex: 1; + color: $uni-text-color; + } + + .uni-section__content-title { + font-size: $uni-font-size-base; + color: $uni-text-color; + } + + .distraction { + flex-direction: row; + align-items: center; + } + + .uni-section__content-sub { + font-size: $uni-font-size-sm; + color: $uni-text-color-grey; + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/config/activation.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/config/activation.js" new file mode 100644 index 0000000..20ccfe3 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/config/activation.js" @@ -0,0 +1,34 @@ +// 婵�娲荤郴缁熷叏灞�閰嶇疆 +export const ActivationConfig = { + // 鏄惁涓鸿皟璇曠増鏈� + isDebugVersion: false, + + // 鏄惁涓轰娇鐢ㄧ増鏈� + isTrialVersion: true, + + //鏄惁涓烘寮忕増鏈� + isProductionVersion: false, + + // 璇曠敤澶╂暟锛堥潪璋冭瘯鐗堟湰锛� + trialDays: 30, + + // 璋冭瘯鐗堟湰鍥哄畾鏈夋晥鏈� + debugExpiryDate: '2025-09-30', + + // 婵�娲荤姸鎬� + isActivated: false, + + expStatus: false, + + // 鏈湴瀛樺偍閿悕 + storageKeys: { + debugActivationInfo: 'debugActivationInfo', + activationInfo: 'activationInfo', + runningCode: 'runningCode', + validActivationCode: 'validActivationCode', + savedActivationCode: 'savedActivationCode', + isDebugVersion: 'isDebugVersion', + isActivated: 'isActivated', + expStatus: 'expStatus' + } +} \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/config/config.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/config/config.js" new file mode 100644 index 0000000..c74971a --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/config/config.js" @@ -0,0 +1,8 @@ +export const config = { + // 鏈湴瀛樺偍閿悕 + storageKeys: { + userInfo: 'userInfo', + authToken: 'authToken', + tokenExpiry: 'tokenExpiry' + } +} \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/index.html" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/index.html" new file mode 100644 index 0000000..8ac465c --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/index.html" @@ -0,0 +1,20 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="UTF-8" /> + <script> + var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || + CSS.supports('top: constant(a)')) + document.write( + '<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + + (coverSupport ? ', viewport-fit=cover' : '') + '" />') + </script> + <title></title> + <!--preload-links--> + <!--app-context--> + </head> + <body> + <div id="app"><!--app-html--></div> + <script type="module" src="/main"></script> + </body> +</html> \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/main.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/main.js" new file mode 100644 index 0000000..758b9b1 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/main.js" @@ -0,0 +1,24 @@ +import Vue from 'vue' +import App from './App' +import uView from 'uview-ui' +import CryptoJS from 'crypto-js' +Vue.use(uView) +import store from './store' + +Vue.config.productionTip = false + +// 娉ㄥ唽鍏ㄥ眬鍔犲瘑鏂规硶 +Vue.prototype.$sha256 = (str) => { + return CryptoJS.SHA256(str).toString() +} + +App.mpType = 'app' + +const app = new Vue({ + store, + ...App +}) +// 鍒濆鍖栦富棰� +app.$store.dispatch('initTheme') + +app.$mount() \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/main.uts" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/main.uts" new file mode 100644 index 0000000..8bdcc86 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/main.uts" @@ -0,0 +1,9 @@ +import App from './App.uvue' + +import { createSSRApp } from 'vue' +export function createApp() { + const app = createSSRApp(App) + return { + app + } +} \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/manifest.json" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/manifest.json" new file mode 100644 index 0000000..fde190f --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/manifest.json" @@ -0,0 +1,137 @@ +{ + "name" : "SMT闃查敊绯荤粺", + "appid" : "__UNI__BFEF6BA", + "description" : "", + "versionName" : "1.0.0", + "versionCode" : 107, + "transformPx" : false, + /* 5+App鐗规湁鐩稿叧 */ + "app-plus" : { + "safearea" : { + "bottom" : { + "offset" : "none" + } + }, + "usingComponents" : true, + "nvueCompiler" : "uni-app", + "compilerVersion" : 4, + "splashscreen" : { + "alwaysShowBeforeRender" : true, + "waiting" : true, + "autoclose" : true, + "delay" : 0 + }, + /* 妯″潡閰嶇疆 */ + "modules" : { + "Barcode" : {}, + "Bluetooth" : {}, + "SQLite" : {}, + "Camera" : {} + }, + "plugins" : { + "sqlite" : { + "version" : "1.0.0", + "provider" : "uni-sqlite" + } + }, + /* 搴旂敤鍙戝竷淇℃伅 */ + "distribute" : { + /* android鎵撳寘閰嶇疆 */ + "android" : { + "permissions" : [ + "<uses-feature android:name=\"android.hardware.camera\"/>", + "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>", + "<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>", + "<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>", + "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>", + "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>", + "<uses-permission android:name=\"android.permission.CALL_PHONE\"/>", + "<uses-permission android:name=\"android.permission.CAMERA\"/>", + "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>", + "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>", + "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>", + "<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>", + "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>", + "<uses-permission android:name=\"android.permission.READ_LOGS\"/>", + "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>", + "<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>", + "<uses-permission android:name=\"android.permission.VIBRATE\"/>", + "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>", + "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>", + "<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>", + "<uses-permission android:name=\"android.permission.READ_EXTERNAL_STORAGE\"/>" + ], + "minSdkVersion" : 21 + }, + /* ios鎵撳寘閰嶇疆 */ + "ios" : { + "dSYMs" : false + }, + /* SDK閰嶇疆 */ + "sdkConfigs" : { + "ad" : {} + }, + "icons" : { + "android" : { + "hdpi" : "unpackage/res/icons/72x72.png", + "xhdpi" : "unpackage/res/icons/96x96.png", + "xxhdpi" : "unpackage/res/icons/144x144.png", + "xxxhdpi" : "unpackage/res/icons/192x192.png" + }, + "ios" : { + "appstore" : "unpackage/res/icons/1024x1024.png", + "ipad" : { + "app" : "unpackage/res/icons/76x76.png", + "app@2x" : "unpackage/res/icons/152x152.png", + "notification" : "unpackage/res/icons/20x20.png", + "notification@2x" : "unpackage/res/icons/40x40.png", + "proapp@2x" : "unpackage/res/icons/167x167.png", + "settings" : "unpackage/res/icons/29x29.png", + "settings@2x" : "unpackage/res/icons/58x58.png", + "spotlight" : "unpackage/res/icons/40x40.png", + "spotlight@2x" : "unpackage/res/icons/80x80.png" + }, + "iphone" : { + "app@2x" : "unpackage/res/icons/120x120.png", + "app@3x" : "unpackage/res/icons/180x180.png", + "notification@2x" : "unpackage/res/icons/40x40.png", + "notification@3x" : "unpackage/res/icons/60x60.png", + "settings@2x" : "unpackage/res/icons/58x58.png", + "settings@3x" : "unpackage/res/icons/87x87.png", + "spotlight@2x" : "unpackage/res/icons/80x80.png", + "spotlight@3x" : "unpackage/res/icons/120x120.png" + } + } + }, + "splashscreen" : { + "androidStyle" : "default" + } + } + }, + /* 蹇簲鐢ㄧ壒鏈夌浉鍏� */ + "quickapp" : {}, + /* 灏忕▼搴忕壒鏈夌浉鍏� */ + "mp-weixin" : { + "appid" : "wxc256e348c4032ebd", + "setting" : { + "urlCheck" : false + }, + "usingComponents" : true + }, + "mp-alipay" : { + "usingComponents" : true + }, + "mp-baidu" : { + "usingComponents" : true + }, + "mp-toutiao" : { + "usingComponents" : true + }, + "h5" : { + "template" : "template.h5.html", + "router" : { + "mode" : "history" + } + }, + "fallbackLocale" : "zh-Hans" +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/package-lock.json" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/package-lock.json" new file mode 100644 index 0000000..f3b49f1 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/package-lock.json" @@ -0,0 +1,125 @@ +{ + "requires": true, + "lockfileVersion": 1, + "dependencies": { + "@fortawesome/fontawesome-free": { + "version": "6.7.2", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/@fortawesome/fontawesome-free/-/fontawesome-free-6.7.2.tgz", + "integrity": "sha512-JUOtgFW6k9u4Y+xeIaEiLr3+cjoUPiAuLXoyKOJSia6Duzb7pq+A76P9ZdPDoAoxHdHzq6gE9/jKBGXlZT8FbA==" + }, + "adler-32": { + "version": "1.3.1", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/adler-32/-/adler-32-1.3.1.tgz", + "integrity": "sha512-ynZ4w/nUUv5rrsR8UUGoe1VC9hZj6V5hU9Qw1HlMDJGEJw5S7TfTErWTjMys6M7vr0YWcPqs3qAr4ss0nDfP+A==" + }, + "babel-runtime": { + "version": "6.26.0", + "resolved": "https://registry.npmmirror.com/babel-runtime/-/babel-runtime-6.26.0.tgz", + "integrity": "sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g==", + "requires": { + "core-js": "^2.4.0", + "regenerator-runtime": "^0.11.0" + } + }, + "cfb": { + "version": "1.2.2", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/cfb/-/cfb-1.2.2.tgz", + "integrity": "sha512-KfdUZsSOw19/ObEWasvBP/Ac4reZvAGauZhs6S/gqNhXhI7cKwvlH7ulj+dOEYnca4bm4SGo8C1bTAQvnTjgQA==", + "requires": { + "adler-32": "~1.3.0", + "crc-32": "~1.2.0" + } + }, + "codepage": { + "version": "1.15.0", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/codepage/-/codepage-1.15.0.tgz", + "integrity": "sha512-3g6NUTPd/YtuuGrhMnOMRjFc+LJw/bnMp3+0r/Wcz3IXUuCosKRJvMphm5+Q+bvTVGcJJuRvVLuYba+WojaFaA==" + }, + "core-js": { + "version": "2.6.12", + "resolved": "https://registry.npmmirror.com/core-js/-/core-js-2.6.12.tgz", + "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==" + }, + "crc-32": { + "version": "1.2.2", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/crc-32/-/crc-32-1.2.2.tgz", + "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==" + }, + "crypto-js": { + "version": "4.2.0", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/crypto-js/-/crypto-js-4.2.0.tgz", + "integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==" + }, + "frac": { + "version": "1.1.2", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/frac/-/frac-1.1.2.tgz", + "integrity": "sha512-w/XBfkibaTl3YDqASwfDUqkna4Z2p9cFSr1aHDt0WoMTECnRfBOv2WArlZILlqgWlmdIlALXGpM2AOhEk5W3IA==" + }, + "regenerator-runtime": { + "version": "0.11.1", + "resolved": "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==" + }, + "sortablejs": { + "version": "1.14.0", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/sortablejs/-/sortablejs-1.14.0.tgz", + "integrity": "sha512-pBXvQCs5/33fdN1/39pPL0NZF20LeRbLQ5jtnheIPN9JQAaufGjKdWduZn4U7wCtVuzKhmRkI0DFYHYRbB2H1w==" + }, + "ssf": { + "version": "0.11.2", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/ssf/-/ssf-0.11.2.tgz", + "integrity": "sha512-+idbmIXoYET47hH+d7dfm2epdOMUDjqcB4648sTZ+t2JwoyBFL/insLfB/racrDmsKB3diwsDA696pZMieAC5g==", + "requires": { + "frac": "~1.1.2" + } + }, + "uni-sqlite": { + "version": "0.0.1", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/uni-sqlite/-/uni-sqlite-0.0.1.tgz", + "integrity": "sha512-Itx2ntuocMvYchNZDXU4SF8Z6TvyFZ0ADNHhS69hk3v91gxPzmWc6rqL41yr92hASzp/Az+w1bjxdBqOqESPpQ==" + }, + "uview-ui": { + "version": "file:uview-ui" + }, + "vue-touch-keyboard": { + "version": "0.3.2", + "resolved": "https://registry.npmmirror.com/vue-touch-keyboard/-/vue-touch-keyboard-0.3.2.tgz", + "integrity": "sha512-+GAZSMdiPfop2At9fhGLzs2Jodd6BQla4q4Mm+VkpQLUaxmFFU64NWsjxvkkYjncAgbv/oO5wi+rM1X4eVHCbg==", + "requires": { + "babel-runtime": "^6.26.0" + } + }, + "vuedraggable": { + "version": "4.1.0", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/vuedraggable/-/vuedraggable-4.1.0.tgz", + "integrity": "sha512-FU5HCWBmsf20GpP3eudURW3WdWTKIbEIQxh9/8GE806hydR9qZqRRxRE3RjqX7PkuLuMQG/A7n3cfj9rCEchww==", + "requires": { + "sortablejs": "1.14.0" + } + }, + "wmf": { + "version": "1.0.2", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/wmf/-/wmf-1.0.2.tgz", + "integrity": "sha512-/p9K7bEh0Dj6WbXg4JG0xvLQmIadrner1bi45VMJTfnbVHsc7yIajZyoSoK60/dtVBs12Fm6WkUI5/3WAVsNMw==" + }, + "word": { + "version": "0.3.0", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/word/-/word-0.3.0.tgz", + "integrity": "sha512-OELeY0Q61OXpdUfTp+oweA/vtLVg5VDOXh+3he3PNzLGG/y0oylSOC1xRVj0+l4vQ3tj/bB1HVHv1ocXkQceFA==" + }, + "xlsx": { + "version": "0.18.5", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/xlsx/-/xlsx-0.18.5.tgz", + "integrity": "sha512-dmg3LCjBPHZnQp5/F/+nnTa+miPJxUXB6vtk42YjBBKayDNagxGEeIdWApkYPOf3Z3pm3k62Knjzp7lMeTEtFQ==", + "requires": { + "adler-32": "~1.3.0", + "cfb": "~1.2.1", + "codepage": "~1.15.0", + "crc-32": "~1.2.1", + "ssf": "~0.11.2", + "wmf": "~1.0.1", + "word": "~0.3.0" + } + } + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/package.json" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/package.json" new file mode 100644 index 0000000..420f089 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/package.json" @@ -0,0 +1,11 @@ +{ + "dependencies": { + "@fortawesome/fontawesome-free": "^6.7.2", + "crypto-js": "^4.2.0", + "uni-sqlite": "0.0.1", + "uview-ui": "file:uview-ui", + "vue-touch-keyboard": "^0.3.2", + "vuedraggable": "^4.1.0", + "xlsx": "^0.18.5" + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/pages.json" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/pages.json" new file mode 100644 index 0000000..322fbe6 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/pages.json" @@ -0,0 +1,100 @@ +{ + "pages": [{ + "path": "pages/index/index", + "style": { + "navigationBarTitleText": "璁㈠崟鍒楄〃", + "app-plus": { + "titleNView": { + "buttons": [{ + "text": "鈽�", + "fontSrc": "/static/iconfont.ttf", + "fontSize": "22px", + "color": "#333333" + }] + } + } + } + }, + { + "path": "pages/create/create", + "style": { + "navigationBarTitleText": "鍒涘缓璁㈠崟", + "app-plus": { + "titleNView": { + "buttons": [{ + "text": "\u2000", + "fontSrc": "/static/iconfont.ttf", + "fontSize": "22px" + }] + } + } + } + }, + { + "path": "pages/create/sortdrag", + "style": { + "navigationBarTitleText": "鎷栨嫿鎺掑簭" + } + }, + { + "path": "pages/login/login", + "style": { + "navigationBarTitleText": "鐧诲綍" + } + }, + { + "path": "pages/system/activation", + "style": { + "navigationBarTitleText": "婵�娲�", + "app-plus": { + "titleNView": { + "buttons": [{ + "text": "鈽�", + "fontSrc": "/static/iconfont.ttf", + "fontSize": "22px", + "color": "#333333" + }] + } + } + } + }, + { + "path": "pages/test", + "style": { + "navigationBarTitleText": "婵�娲�" + } + }, + { + "path": "pages/order/detail", + "style": { + "navigationBarTitleText": "璁㈠崟璇︽儏", + "app-plus": { + "titleNView": { + "buttons": [{ + "text": "鈽�", + "fontSrc": "/static/iconfont.ttf", + "fontSize": "22px", + "color": "#333333" + }] + } + } + } + } + ], + "globalStyle": { + "navigationBarTextStyle": "black", + "navigationBarTitleText": "uni-app", + "navigationBarBackgroundColor": "#F8F8F8", + "backgroundColor": "#F8F8F8" + }, + "condition" : { //妯″紡閰嶇疆锛屼粎寮�鍙戞湡闂寸敓鏁� + "current": 0, //褰撳墠婵�娲荤殑妯″紡(list 鐨勭储寮曢」) + "list": [ + { + "name": "", //妯″紡鍚嶇О + "path": "", //鍚姩椤甸潰锛屽繀閫� + "query": "" //鍚姩鍙傛暟锛屽湪椤甸潰鐨刼nLoad鍑芥暟閲岄潰寰楀埌 + } + ] + } +} \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/pages/create/create.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/pages/create/create.vue" new file mode 100644 index 0000000..c6ebac6 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/pages/create/create.vue" @@ -0,0 +1,1043 @@ +<template> + <view class="create-container"> + <!-- 琛ㄥ崟鍖哄煙 --> + <view class="form-content"> + <!-- 璁㈠崟鍙锋樉绀� --> + <view class="order-no-section"> + <text class="order-no-label">璁㈠崟缂栧彿锛�</text> + <text class="order-no-value">{{orderNo || '鐐瑰嚮鐢熸垚璁㈠崟鍙�'}}</text> + </view> + <view class="order-no-section"> + <text class="order-no-label">瀹㈡埛锛�</text> + <text class="order-no-value" @click="openCustomerDialog">{{customer || '鐐瑰嚮閫夋嫨瀹㈡埛'}}</text> + </view> + + <!-- 鏍稿績鐗╂枡閫夋嫨 --> + <view class="material-section"> + <view class="section-title" v-if="addOrOnlyAdjust != 2"> + <text>鏍稿績鐗╂枡閫夋嫨</text> + <button class="mini-btn" @click="openMaterialDialog"> + <uni-icons type="plus" size="16"></uni-icons>閫夋嫨鐗╂枡 + </button> + </view> + + <!-- 宸查�夌墿鏂欏垪琛� --> + <view class="container" v-if="selectedMaterials.length > 0"> + <view class="sortable-list" ref="list"> + <view v-for="(item, index) in selectedMaterials" :key="item.name" class="sortable-item" :class="{ + 'dragging': draggingId === item.id, + 'drop-target': dropTargetIndex === index + }" :data-id="item.id" :data-index="index" @touchstart="startDrag(item.name, $event, index)" + @touchmove="handleDrag($event)" @touchend="endDrag" @touchcancel="endDrag"> + <view class="item-content"> + <text>{{ item.name }}</text> + <text class="position">浣嶇疆: {{ index + 1 }}</text> + <view class="drag-handle" v-show="addOrOnlyAdjust != 3">鈽�</view> + <uni-icons type="trash" size="16" color="#f56c6c" @click="removeMaterial(item)" + v-show="addOrOnlyAdjust != 2"> + </uni-icons> + </view> + </view> + </view> + </view> + + <view v-else class="empty-tip"> + <uni-icons type="list" size="40" color="#ccc"></uni-icons> + <text>鏆傛棤鐗╂枡锛岃鐐瑰嚮涓婃柟鎸夐挳娣诲姞</text> + </view> + </view> + + <!-- 鎻愪氦鎸夐挳 --> + <view + style="position: sticky; bottom: 20px; margin-top: auto; padding: 20rpx 0; background: linear-gradient(to top, white 60%, transparent);"> + <button class="submit-btn" @click="submitForm">鎻愪氦璁㈠崟</button> + </view> + </view> + + <!-- 閫夋嫨鐗╂枡寮圭獥 --> + <uni-popup ref="materialDialog" type="bottom" @change="onMaterialDialogChange"> + <view class="material-dialog"> + <view class="dialog-header"> + <text class="dialog-title">閫夋嫨鏍稿績鐗╂枡</text> + <uni-icons type="close" size="24" @click="closeMaterialDialog"></uni-icons> + </view> + + <view class="dialog-content"> + <!-- 娣诲姞鏂扮墿鏂� --> + <view class="add-material"> + <uni-forms-item label="鐗╂枡鍚嶇О"> + <uni-easyinput v-model="newMaterial.name" placeholder="杈撳叆鐗╂枡鍚嶇О" /> + </uni-forms-item> + <button class="add-btn" @click="addNewMaterial">娣诲姞</button> + </view> + + <!-- 鐗╂枡鍒楄〃 --> + <scroll-view scroll-y class="material-options"> + <view class="material-option" v-for="(item,index) in materials" :key="item.name" + @click="selectMaterial(item)" :class="{'selected-option': isMaterialSelected(item)}"> + <view class="material-info"> + <text class="material-name">{{item.name}}</text> + </view> + <uni-icons type="checkmark" size="20" color="#2979ff" v-if="isMaterialSelected(item)" + style="position: absolute; right: 10px;"></uni-icons> + </view> + </scroll-view> + </view> + + <view class="dialog-footer"> + <button class="confirm-btn" @click="confirmSelection">纭畾</button> + </view> + </view> + </uni-popup> + + <!-- 閫夋嫨瀹㈡埛寮圭獥 --> + <uni-popup ref="customerDialog" type="bottom"> + <view class="material-dialog"> + <view class="dialog-header"> + <text class="dialog-title">閫夋嫨瀹㈡埛</text> + <uni-icons type="close" size="24" @click="closeCustomerDialog"></uni-icons> + </view> + + <view class="dialog-content"> + <!-- 娣诲姞鏂板鎴� --> + <view class="add-material"> + <uni-forms-item label="瀹㈡埛鍚嶇О"> + <uni-easyinput v-model="newCustomer.customerName" placeholder="杈撳叆瀹㈡埛鍚嶇О" /> + </uni-forms-item> + <button class="add-btn" @click="addNewCustomer">娣诲姞</button> + </view> + + <!-- 鐗╂枡鍒楄〃 --> + <scroll-view scroll-y class="material-options"> + <view class="material-option" v-for="(item,index) in customers" :key="item.customerName" + @click="selectCustomer(item)" :class="{'selected-option': isCustomerSelected(item)}"> + <view class="material-info"> + <text class="material-name">{{item.customerName}}</text> + </view> + <uni-icons type="checkmark" size="20" color="#2979ff" v-if="isCustomerSelected(item)" + style="position: absolute; right: 10px;"></uni-icons> + </view> + </scroll-view> + </view> + + <view class="dialog-footer"> + <button class="confirm-btn" @click="confirmCusSelection">纭畾</button> + </view> + </view> + </uni-popup> + </view> +</template> + +<script> + export default { + data() { + return { + orderNo: "", + showMaterialDialog: false, + // 妯℃嫙鐗╂枡鏁版嵁 + materials: [], + selectedMaterials: [], // 宸查�夌墿鏂� + tempSelected: [], // 涓存椂閫夋嫨鐨勭墿鏂� + newMaterial: { + name: "" + }, + draggingId: null, + dropTargetIndex: -1, + addOrOnlyAdjust: 1, + checkedMat: [], + customer: '', + newCustomer: { + customerName: "" + }, + tempCustomer: '', + customers: [] + }; + }, + mounted() {}, + onShow() { + if (this.addOrOnlyAdjust == 1) { + uni.setNavigationBarTitle({ + title: '鍒涘缓璁㈠崟' + }) + } else if (this.addOrOnlyAdjust == 2) { + uni.setNavigationBarTitle({ + title: '璋冩暣椤哄簭' + }) + } else if (this.addOrOnlyAdjust == 3) { + uni.setNavigationBarTitle({ + title: '缂栬緫璁㈠崟' + }) + } + }, + onLoad(orderInfo) { + if (orderInfo) { + this.addOrOnlyAdjust = orderInfo.addOrOnlyAdjust; + this.orderNo = orderInfo.orderNo; + this.customer = orderInfo.customer; + if (orderInfo.materials) { + const materials = JSON.parse(decodeURIComponent(orderInfo.materials)); + this.selectedMaterials = materials; + this.checkedMat = materials; + } + if (this.addOrOnlyAdjust != 2) { + //#ifdef APP-PLUS + const materialService = require('@/services/materialService').default + materialService.getAllMaterials().then(x => { + this.materials = x; + }); + //#endif + } + if (this.addOrOnlyAdjust == 1) { + //#ifdef APP-PLUS + const customerService = require('@/services/customerService.js').default + customerService.getCustomers().then(x => { + this.customers = x; + }); + //#endif + } + } + + }, + methods: { + async startDrag(id, e, index) { + if (this.addOrOnlyAdjust == 3) return + + this.draggingId = id + this.currentIndex = index + this.dropTargetIndex = -1 + + // 鑾峰彇鍏冪礌鍜屽垪琛ㄧ殑绮剧‘浣嶇疆 + await this.getScrollPosition() + await this.getItemDimensions() + await this.getListPosition() + + // 璁$畻鐩稿浜庡垪琛ㄩ《閮ㄧ殑璧峰浣嶇疆 + this.startY = e.touches[0].clientY - this.listTop + this.scrollTop + this.currentY = this.startY + }, + + handleDrag(e) { + if (this.addOrOnlyAdjust == 3) return + + if (!this.draggingId) return + + e.preventDefault() + + // 璁$畻鐩稿浜庡垪琛ㄩ《閮ㄧ殑褰撳墠浣嶇疆 + this.currentY = e.touches[0].clientY - this.listTop + this.scrollTop + + // 璁$畻搴旇鏀剧疆鐨勪綅缃储寮� + const newIndex = Math.floor(this.currentY / this.itemHeight) + + // 杈圭晫妫�鏌� + const clampedIndex = Math.max(0, Math.min(newIndex, this.selectedMaterials.length - 1)) + + // 鏇存柊鐩爣浣嶇疆 + this.dropTargetIndex = clampedIndex + + // 濡傛灉浣嶇疆鍙戠敓鍙樺寲锛屽垯鎵ц浜ゆ崲 + if (clampedIndex !== this.currentIndex) { + this.swapItems(clampedIndex) + } + }, + + swapItems(newIndex) { + if (this.addOrOnlyAdjust == 3) return + + const items = [...this.selectedMaterials] + const draggingItem = items.find(item => item.name === this.draggingId) + const oldIndex = items.indexOf(draggingItem) + + // 鎵ц浣嶇疆浜ゆ崲 + items.splice(oldIndex, 1) + items.splice(newIndex, 0, draggingItem) + + this.selectedMaterials = items + this.currentIndex = newIndex + }, + + endDrag() { + if (this.addOrOnlyAdjust == 3) return + + if (!this.draggingId) return + + // 鍚屾鍥炲師濮嬫暟鎹� + this.items = this.selectedMaterials.map(item => { + const { + uniqueKey, + ...rest + } = item + return rest + }) + + // 閲嶇疆鐘舵�� + this.draggingId = null + this.dropTargetIndex = -1 + this.currentIndex = -1 + }, + + async getItemDimensions() { + return new Promise(resolve => { + const query = uni.createSelectorQuery().in(this) + query.select('.sortable-item').boundingClientRect() + query.exec(res => { + if (res[0]) this.itemHeight = res[0].height + resolve() + }) + }) + }, + + async getScrollPosition() { + return new Promise(resolve => { + const query = uni.createSelectorQuery().in(this) + query.selectViewport().scrollOffset() + query.exec(res => { + this.scrollTop = res[0]?.scrollTop || 0 + resolve() + }) + }) + }, + + async getListPosition() { + return new Promise(resolve => { + const query = uni.createSelectorQuery().in(this) + query.select('.sortable-list').boundingClientRect() + query.exec(res => { + this.listTop = res[0]?.top || 0 + resolve() + }) + }) + }, + + openCustomerDialog() { + if (this.addOrOnlyAdjust == 1) { + this.$refs.customerDialog.open(); + } + }, + + selectCustomer(item) { + if (this.tempCustomer == item.customerName) { + this.tempCustomer = ''; + } else { + this.tempCustomer = item.customerName; + } + }, + + isCustomerSelected(item) { + return this.tempCustomer === item.customerName; + }, + + closeCustomerDialog() { + this.$refs.customerDialog.close(); + }, + + //纭閫夋嫨鐨勫鎴� + confirmCusSelection() { + if (!this.tempCustomer || !this.tempCustomer.trim() || this.tempCustomer.trim().length == 0) { + uni.showToast({ + title: "璇烽�夋嫨瀹㈡埛", + icon: "none" + }); + return; + } + + this.customer = this.tempCustomer; + + this.closeCustomerDialog(); + }, + + //娣诲姞鏂板鎴� + async addNewCustomer() { + if (!this.newCustomer.customerName || !this.newCustomer.customerName.trim()) { + uni.showToast({ + title: "璇疯緭鍏ユ湁鏁堢殑瀹㈡埛鍚嶇О", + icon: "none" + }); + return; + } + + if (this.customers.find(x => x.customerName === this.newCustomer.customerName)) { + uni.showToast({ + title: "瀹㈡埛宸插瓨鍦�", + icon: "error" + }); + return; + } + + const newItem = { + customerName: this.newCustomer.customerName.trim(), + }; + this.customers.unshift(newItem); + this.tempCustomer = this.newCustomer.customerName.trim(); + this.newCustomer = { + customerName: "" + }; + + //#ifdef APP-PLUS + const customerService = require('@/services/customerService').default + await customerService.addCustomer(newItem.customerName); + //#endif + }, + + //鑾峰彇鏍峰紡 + getItemStyle(item) { + if (item.id !== this.draggingId) return {} + + // 璁$畻鐩稿浜庡垪琛ㄩ《閮ㄧ殑鍋忕Щ閲� + const offset = this.currentY - this.startY + + return { + transform: `translateY(${offset}px)`, + transition: 'none', + zIndex: 100, + opacity: 0.9, + position: 'relative' + } + }, + + //鎵撳紑鐗╂枡閫夋嫨寮圭獥 + openMaterialDialog() { + this.showMaterialDialog = true; + this.tempSelected = [...this.selectedMaterials]; + + // 纭繚寮圭獥缁勪欢宸插噯澶囧ソ + this.$nextTick(() => { + if (this.$refs.materialDialog) { + this.$refs.materialDialog.open(); + } + }); + }, + + //鍏抽棴鐗╂枡閫夋嫨寮圭獥 + closeMaterialDialog() { + this.$refs.materialDialog.close(); + }, + + //鐗╂枡寮圭獥change浜嬩欢 + onMaterialDialogChange(e) { + this.showMaterialDialog = e.show; + if (!e.show) { + this.tempSelected = []; + } + }, + + //閫夋嫨鐗╂枡 + selectMaterial(item) { + if (this.checkedMat.find(x => x.name === item.name)) return + + // 鍒涘缓鏂版暟缁勭‘淇濆搷搴斿紡 + const newSelected = [...this.tempSelected]; + const index = newSelected.findIndex(m => m.name === item.name); + + if (index === -1) { + newSelected.push({ + ...item + }); + } else { + newSelected.splice(index, 1); + } + + // 浣跨敤Vue.set纭繚鍝嶅簲寮� + this.$set(this, "tempSelected", newSelected); + }, + + //鐗╂枡鏄惁琚�変腑 + isMaterialSelected(item) { + return this.tempSelected.some(m => m.name === item.name); + }, + + //娣诲姞鐗╂枡 + async addNewMaterial() { + if (!this.newMaterial.name || !this.newMaterial.name.trim()) { + uni.showToast({ + title: "璇疯緭鍏ユ湁鏁堢殑鐗╂枡鍚嶇О", + icon: "none" + }); + return; + } + + if (this.materials.find(x => x.name === this.newMaterial.name)) { + uni.showToast({ + title: "鐗╂枡宸插瓨鍦�", + icon: "none" + }); + return; + } + + const newItem = { + name: this.newMaterial.name.trim(), + }; + this.materials.unshift(newItem); + this.tempSelected.push(newItem); + this.newMaterial = { + name: "" + }; + + //#ifdef APP-PLUS + const materialService = require('@/services/materialService').default + await materialService.saveMaterial(newItem); + //#endif + }, + + //纭閫夋嫨 + confirmSelection() { + // 1. 楠岃瘉鏄惁鏈夐�夋嫨鐗╂枡 + if (this.tempSelected.length === 0) { + uni.showToast({ + title: "璇疯嚦灏戦�夋嫨涓�涓墿鏂�", + icon: "none" + }); + return; + } + + // 2. 鏁版嵁鏍煎紡楠岃瘉鍜岃浆鎹� + this.selectedMaterials = this.tempSelected.map(item => { + if (!item || typeof item !== "object") { + return { + id: Date.now().toString(), + name: "鏈懡鍚嶇墿鏂�" + }; + } + + return { + id: item.id || Date.now().toString(), + name: typeof item.name === "string" ? item.name : "鏈懡鍚嶇墿鏂�" + }; + }); + + // 3. 鍏抽棴寮圭獥鍓嶆樉绀烘垚鍔熸彁绀� + uni.showToast({ + title: `宸查�夋嫨${this.tempSelected.length}涓墿鏂檂, + icon: "success" + }); + + // 4. 鍏抽棴寮圭獥 + this.closeMaterialDialog(); + }, + + //绉婚櫎鐗╂枡 + async removeMaterial(item) { + let delConfirm = true; + + if (this.addOrOnlyAdjust == 3) { + //#ifdef APP-PLUS + const scanrecordService = require('@/services/scanrecordService').default + const records = await scanrecordService.getScanRecords(this.orderNo, item.name) + if (records && records.length > 0) { + uni.showToast({ + title: "宸叉湁鎵弿璁板綍", + icon: "error" + }); + return; + } + uni.showModal({ + title: '鎻愮ず', + content: `纭瑕佸垹闄ょ墿鏂欍��${item.name}銆戝悧?`, + success: async (res) => { + if (res.confirm) { + const orderMatService = require('@/services/orderMatService').default + await orderMatService.deleteOrderMat(this.orderNo, item.name); + + uni.showToast({ + title: "鍒犻櫎鎴愬姛", + icon: "success" + }) + + if (delConfirm) { + if (!item || !item.id) return; + + const index = this.selectedMaterials.findIndex(m => m?.id === item.id); + if (index !== -1) { + this.selectedMaterials.splice(index, 1); + } + } + + } else { + delConfirm = false; + } + } + }) + //#endif + } else { + if (delConfirm) { + if (!item || !item.id) return; + + const index = this.selectedMaterials.findIndex(m => m?.id === item.id); + if (index !== -1) { + this.selectedMaterials.splice(index, 1); + } + } + } + + + }, + + // + isMobileDevice() { + try { + const systemInfo = uni.getSystemInfoSync(); + return ( + systemInfo.platform === "android" || systemInfo.platform === "ios" + ); + } catch (e) { + console.warn("鑾峰彇璁惧淇℃伅澶辫触", e); + return false; + } + }, + + // + async submitForm() { + try { + if (!this.orderNo) { + uni.showToast({ + title: "璇峰厛鐢熸垚璁㈠崟鍙�", + icon: "none" + }); + return; + } + + if (this.selectedMaterials.length === 0) { + uni.showToast({ + title: "璇疯嚦灏戦�夋嫨涓�涓墿鏂�", + icon: "none" + }); + return; + } + + if (this.addOrOnlyAdjust == 1) { + if (!this.tempCustomer || !this.tempCustomer.trim() || this.tempCustomer.trim().length == 0) { + uni.showToast({ + title: "璇烽�夋嫨瀹㈡埛", + icon: "none" + }); + return; + } + + //#ifdef APP-PLUS + const orderMatService = require('@/services/orderMatService').default + await orderMatService.saveOrderMaterials(this.orderNo, this.selectedMaterials); + + const orderService = require('@/services/orderService.js').default + await orderService.updateOrderCustomer(this.orderNo, this.customer); + + //#endif + } else if (this.addOrOnlyAdjust == 2) { + //#ifdef APP-PLUS + const orderMatService = require('@/services/orderMatService').default + await orderMatService.updateMatOrder(this.orderNo, this.selectedMaterials); + //#endif + } else if (this.addOrOnlyAdjust == 3) { + const materials = this.selectedMaterials.filter(x => !this.checkedMat.includes(x.name)) + const orderMatService = require('@/services/orderMatService').default + await orderMatService.saveOrderMaterials(this.orderNo, materials); + } + + // 璺宠浆鍒拌鍗曡鎯呴〉 + uni.redirectTo({ + url: `/pages/order/detail?orderNo=${encodeURIComponent( + this.orderNo + )}&createTime=${encodeURIComponent( + new Date().toLocaleString() + )}&materials=${encodeURIComponent( + JSON.stringify(this.selectedMaterials) + )}&customer=${this.customer}&dealOrView=1`, + success: () => { + this.orderNo = ''; + }, + fail: err => { + console.error("璺宠浆璁㈠崟璇︽儏澶辫触:", err); + uni.showToast({ + title: "璺宠浆澶辫触锛岃閲嶈瘯", + icon: "none" + }); + } + }); + } catch (e) { + console.log(e) + } + + } + } + }; +</script> + +<style lang="scss"> + .create-container { + height: 100vh; + display: flex; + flex-direction: column; + background-color: #f5f7fa; + + .form-content { + flex: 1; + padding: 20rpx; + background-color: #fff; + margin: 20rpx; + border-radius: 16rpx; + box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.05); + display: flex; + flex-direction: column; + position: relative; + padding-bottom: 120rpx; + /* 涓哄簳閮ㄦ寜閽暀鍑虹┖闂� */ + } + + .order-no-section { + padding: 24rpx; + background-color: #f8f8f8; + border-radius: 8rpx; + margin-bottom: 30rpx; + display: flex; + align-items: center; + cursor: pointer; + + .order-no-label { + font-size: 28rpx; + color: #666; + } + + .order-no-value { + font-size: 30rpx; + font-weight: bold; + color: #2979ff; + flex: 1; + } + } + + .material-section { + margin-bottom: 40rpx; + + .section-title { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 20rpx; + font-size: 32rpx; + font-weight: bold; + color: #333; + + .mini-btn { + height: 50rpx; + line-height: 50rpx; + font-size: 24rpx; + background-color: #2979ff; + color: #fff; + } + } + + .empty-tip { + padding: 40rpx 0; + text-align: center; + color: #999; + font-size: 28rpx; + } + } + + .material-list { + margin-top: 20rpx; + border-radius: 8rpx; + overflow: hidden; + min-height: 200rpx; + max-height: 60vh; + overflow-y: auto; + padding-right: 10rpx; + background-color: #fff; + border: 1rpx solid #eee; + + /* 鑷畾涔夋粴鍔ㄦ潯鏍峰紡 */ + &::-webkit-scrollbar { + width: 6rpx; + } + + &::-webkit-scrollbar-track { + background: #f1f1f1; + border-radius: 10rpx; + } + + &::-webkit-scrollbar-thumb { + background: #c1c1c1; + border-radius: 10rpx; + } + + &::-webkit-scrollbar-thumb:hover { + background: #a8a8a8; + } + + &.mobile-drag { + -webkit-touch-callout: none; + -webkit-user-select: none; + user-select: none; + + .material-item { + padding: 24rpx; + background: #f8f8f8; + border-radius: 8rpx; + margin-bottom: 10rpx; + touch-action: manipulation; + } + + .drag-handle { + display: none; + } + } + } + + .material-item { + padding: 24rpx; + border-bottom: 1rpx solid #eee; + display: flex; + align-items: center; + background-color: #fff; + transition: all 0.3s ease; + + &.sortable-chosen { + background-color: #f0f7ff; + box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1); + } + + .drag-handle { + color: #999; + margin-right: 20rpx; + padding: 10rpx; + } + + .material-image { + width: 80rpx; + height: 80rpx; + border-radius: 8rpx; + margin-right: 20rpx; + background-color: #f5f5f5; + } + + .material-info { + flex: 1; + min-width: 0; + } + + .material-name-simple { + font-size: 28rpx; + color: #333; + flex: 1; + margin: 0 20rpx; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } + + .material-spec { + font-size: 24rpx; + color: #999; + display: block; + margin-bottom: 8rpx; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } + + .delete-icon { + color: #ff4d4f; + margin-left: 20rpx; + padding: 10rpx; + } + } + + .empty-tip { + display: flex; + flex-direction: column; + align-items: center; + padding: 60rpx 0; + color: #999; + font-size: 28rpx; + + text { + margin-top: 20rpx; + } + } + + .submit-btn { + margin-top: 40rpx; + background-color: #2979ff; + color: #fff; + height: 80rpx; + line-height: 80rpx; + border-radius: 40rpx; + font-size: 30rpx; + } + + /* 鐗╂枡閫夋嫨寮圭獥鏍峰紡 */ + .material-dialog { + background-color: #fff; + border-radius: 16rpx 16rpx 0 0; + max-height: 80vh; + display: flex; + flex-direction: column; + + .dialog-header { + padding: 24rpx; + display: flex; + justify-content: space-between; + align-items: center; + border-bottom: 1rpx solid #eee; + + .dialog-title { + font-size: 32rpx; + font-weight: bold; + } + } + + .dialog-content { + flex: 1; + overflow: hidden; + display: flex; + flex-direction: column; + } + + .add-material { + padding: 20rpx; + border-bottom: 1rpx solid #eee; + + .add-btn { + margin-top: 20rpx; + background-color: #2979ff; + color: #fff; + } + } + + .material-options { + flex: 1; + padding: 0 20rpx; + width: calc(100% - 40rpx); + height: 50vh; + /* 璁剧疆鍥哄畾楂樺害 */ + overflow-y: auto; + /* 纭繚鍨傜洿婊氬姩 */ + + /* 婊氬姩鏉℃牱寮� */ + &::-webkit-scrollbar { + width: 8rpx; + } + + &::-webkit-scrollbar-track { + background: #f1f1f1; + border-radius: 4rpx; + } + + &::-webkit-scrollbar-thumb { + background: #888; + border-radius: 4rpx; + } + + &::-webkit-scrollbar-thumb:hover { + background: #555; + } + } + + .material-option { + padding: 24rpx 0; + display: flex; + align-items: center; + justify-content: space-between; + border-bottom: 1rpx solid #f5f5f5; + transition: background-color 0.3s ease; + + &.selected-option { + background-color: #d0e9ff; + } + + .material-info { + flex: 1; + } + + .material-name { + font-size: 28rpx; + color: #333; + } + + .material-spec { + font-size: 24rpx; + color: #999; + } + } + + .dialog-footer { + padding: 20rpx; + border-top: 1rpx solid #eee; + + .confirm-btn { + background-color: #2979ff; + color: #fff; + } + } + } + } + + .container { + padding: 0px; + } + + .sortable-list { + background-color: #f5f5f5; + border-radius: 8px; + padding: 10px; + position: relative; + } + + .sortable-item { + margin-bottom: 10px; + transition: transform 0.2s; + position: relative; + } + + .item-content { + height: 60px; + background-color: #fff; + border-radius: 8px; + display: flex; + align-items: center; + justify-content: space-between; + padding: 0 15px; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); + } + + .sortable-item.dragging .item-content { + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); + background-color: #f8fbff; + } + + .sortable-item.drop-target .item-content { + background-color: #f0f7ff; + border: 1px dashed #4a90e2; + } + + // 琛ㄥ崟item鏍峰紡 + .uni-forms-item { + display: flex; + margin-bottom: 20rpx; + align-items: center; + + .uni-forms-item__label { + width: 150rpx !important; + flex: none; + font-size: 28rpx; + color: #666; + padding-right: 20rpx; + text-align: right; + } + + .uni-forms-item__content { + flex: 1; + min-width: 0; + } + } + + .position { + color: #888; + font-size: 12px; + } + + .drag-handle { + color: #ccc; + font-size: 20px; + padding: 0 10px; + } +</style> \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/pages/create/sortdrag.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/pages/create/sortdrag.vue" new file mode 100644 index 0000000..de897a9 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/pages/create/sortdrag.vue" @@ -0,0 +1,233 @@ +<template> + <view class="container"> + <view class="sortable-list" ref="list"> + <view + v-for="(item, index) in visibleItems" + :key="item.uniqueKey" + class="sortable-item" + :class="{ + 'dragging': draggingId === item.id, + 'drop-target': dropTargetIndex === index + }" + :data-id="item.id" + :data-index="index" + @touchstart="startDrag(item.id, $event, index)" + @touchmove="handleDrag($event)" + @touchend="endDrag" + @touchcancel="endDrag" + > + <view class="item-content"> + <text>{{ item.name }}</text> + <text class="position">浣嶇疆: {{ index + 1 }}</text> + <view class="drag-handle">鈽�</view> + </view> + </view> + </view> + </view> +</template> + +<script> +let keyCounter = 0 + +export default { + data() { + return { + items: [ + { id: 1, name: '椤圭洰A' }, + { id: 2, name: '椤圭洰B' }, + { id: 3, name: '椤圭洰C' }, + { id: 4, name: '椤圭洰D' }, + { id: 5, name: '椤圭洰E' } + ], + visibleItems: [], + draggingId: null, + startY: 0, + currentY: 0, + itemHeight: 60, + scrollTop: 0, + dropTargetIndex: -1, + currentIndex: -1, + listTop: 0 + } + }, + created() { + this.initItems() + }, + mounted() { + this.getListPosition() + }, + methods: { + initItems() { + this.visibleItems = this.items.map(item => ({ + ...item, + uniqueKey: `item-${item.id}-${keyCounter++}` + })) + }, + + async startDrag(id, e, index) { + this.draggingId = id + this.currentIndex = index + this.dropTargetIndex = -1 + + // 鑾峰彇鍏冪礌鍜屽垪琛ㄧ殑绮剧‘浣嶇疆 + await this.getScrollPosition() + await this.getItemDimensions() + await this.getListPosition() + + // 璁$畻鐩稿浜庡垪琛ㄩ《閮ㄧ殑璧峰浣嶇疆 + this.startY = e.touches[0].clientY - this.listTop + this.scrollTop + this.currentY = this.startY + }, + + handleDrag(e) { + if (!this.draggingId) return + + e.preventDefault() + + // 璁$畻鐩稿浜庡垪琛ㄩ《閮ㄧ殑褰撳墠浣嶇疆 + this.currentY = e.touches[0].clientY - this.listTop + this.scrollTop + + // 璁$畻搴旇鏀剧疆鐨勪綅缃储寮� + const newIndex = Math.floor(this.currentY / this.itemHeight) + + // 杈圭晫妫�鏌� + const clampedIndex = Math.max(0, Math.min(newIndex, this.visibleItems.length - 1)) + + // 鏇存柊鐩爣浣嶇疆 + this.dropTargetIndex = clampedIndex + + // 濡傛灉浣嶇疆鍙戠敓鍙樺寲锛屽垯鎵ц浜ゆ崲 + if (clampedIndex !== this.currentIndex) { + this.swapItems(clampedIndex) + } + }, + + swapItems(newIndex) { + const items = [...this.visibleItems] + const draggingItem = items.find(item => item.id === this.draggingId) + const oldIndex = items.indexOf(draggingItem) + + // 鎵ц浣嶇疆浜ゆ崲 + items.splice(oldIndex, 1) + items.splice(newIndex, 0, draggingItem) + + this.visibleItems = items + this.currentIndex = newIndex + }, + + endDrag() { + if (!this.draggingId) return + + // 鍚屾鍥炲師濮嬫暟鎹� + this.items = this.visibleItems.map(item => { + const { uniqueKey, ...rest } = item + return rest + }) + + // 閲嶇疆鐘舵�� + this.draggingId = null + this.dropTargetIndex = -1 + this.currentIndex = -1 + }, + + async getItemDimensions() { + return new Promise(resolve => { + const query = uni.createSelectorQuery().in(this) + query.select('.sortable-item').boundingClientRect() + query.exec(res => { + if (res[0]) this.itemHeight = res[0].height + resolve() + }) + }) + }, + + async getScrollPosition() { + return new Promise(resolve => { + const query = uni.createSelectorQuery().in(this) + query.selectViewport().scrollOffset() + query.exec(res => { + this.scrollTop = res[0]?.scrollTop || 0 + resolve() + }) + }) + }, + + async getListPosition() { + return new Promise(resolve => { + const query = uni.createSelectorQuery().in(this) + query.select('.sortable-list').boundingClientRect() + query.exec(res => { + this.listTop = res[0]?.top || 0 + resolve() + }) + }) + }, + + getItemStyle(item) { + if (item.id !== this.draggingId) return {} + + // 璁$畻鐩稿浜庡垪琛ㄩ《閮ㄧ殑鍋忕Щ閲� + const offset = this.currentY - this.startY + + return { + transform: `translateY(${offset}px)`, + transition: 'none', + zIndex: 100, + opacity: 0.9, + position: 'relative' + } + } + } +} +</script> + +<style> +.container { + padding: 20px; +} + +.sortable-list { + background-color: #f5f5f5; + border-radius: 8px; + padding: 10px; + position: relative; +} + +.sortable-item { + margin-bottom: 10px; + transition: transform 0.2s; + position: relative; +} + +.item-content { + height: 60px; + background-color: #fff; + border-radius: 8px; + display: flex; + align-items: center; + justify-content: space-between; + padding: 0 15px; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); +} + +.sortable-item.dragging .item-content { + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); + background-color: #f8fbff; +} + +.sortable-item.drop-target .item-content { + background-color: #f0f7ff; + border: 1px dashed #4a90e2; +} + +.position { + color: #888; + font-size: 12px; +} + +.drag-handle { + color: #ccc; + font-size: 20px; + padding: 0 10px; +} +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/pages/index/index.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/pages/index/index.vue" new file mode 100644 index 0000000..983b968 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/pages/index/index.vue" @@ -0,0 +1,1147 @@ +<template> + <view class="order-container"> + <!-- 椤堕儴鎼滅储鍖哄煙 --> + <view class="search-bar"> + <view class="search-box"> + <uni-easyinput v-model="searchQuery" placeholder="璇疯緭鍏ヨ鍗曞彿鎼滅储" prefixIcon="search" + @iconClick="handleSearchIconClick" /> + <view class="filter-icon" @click="showFilterPopup"> + <uni-icons type="filter" size="24" color="#666"></uni-icons> + </view> + </view> + </view> + + <!-- 鐘舵�佺瓫閫夊櫒 --> + <scroll-view class="status-filter" scroll-x> + <view v-for="status in statusFilters" :key="status.value" class="filter-item" + :class="{active: activeStatus === status.value}" @click="changeStatus(status.value)"> + <text>{{status.label}}</text> + <view class="status-indicator" :style="{background: status.color}"></view> + </view> + </scroll-view> + + <!-- 璁㈠崟鍒楄〃 - 娣诲姞铏氭嫙鍒楄〃浼樺寲 --> + <scroll-view class="order-list" scroll-y :style="{height: `calc(100vh - ${isH5 ? '180px' : '260rpx'})`}" + @scrolltolower="loadMore" @refresherrefresh="refreshList" refresher-enabled + :refresher-triggered="refreshing" enable-back-to-top :scroll-with-animation="true"> + <view v-for="(order, index) in orderList" :key="index" class="order-item" @click="showOrderDetail(order)"> + <view class="order-header"> + <text class="order-no">璁㈠崟鍙�: {{order.orderNo}}</text> + <uni-tag :text="getStatus(order.status)" :type="getStatusType(order.status)" size="small" /> + </view> + <view class="order-info"> + <text class="create-time">瀹㈡埛淇℃伅: {{order.customer}}</text> + </view> + <view class="order-info"> + <text class="create-time">鍒涘缓鏃堕棿: {{formatDisplayDate(order.createTime)}}</text> + <text class="material-count">鐗╂枡: {{order.materials?order.materials.length:0}}绉�</text> + </view> + </view> + <uni-load-more :status="loadStatus"></uni-load-more> + </scroll-view> + + <!-- 搴曢儴鎿嶄綔鎸夐挳 --> + <view class="action-btn" @click="showCreateOrderPopup"> + <uni-icons type="plus-filled" size="30" color="#fff"></uni-icons> + </view> + + <!-- 绛涢�夊脊绐� --> + <uni-popup ref="filterPopup" type="bottom"> + <view class="filter-popup"> + <view class="popup-header"> + <text>绛涢�夋潯浠�</text> + <uni-icons type="close" size="24" @click="hideFilterPopup"></uni-icons> + </view> + <view class="filter-content"> + <uni-forms ref="filterForm"> + <uni-forms-item label="璁㈠崟鍙�" name="orderNo"> + <uni-easyinput v-model="filterForm.orderNo" placeholder="璇疯緭鍏ヨ鍗曞彿" /> + </uni-forms-item> + <!-- <uni-forms-item label="鍒涘缓鏃堕棿" name="createTime"> + <uni-datetime-picker v-model="filterForm.createTime" type="daterange" :clear-icon="true" + start-placeholder="寮�濮嬫棩鏈�" end-placeholder="缁撴潫鏃ユ湡" /> + </uni-forms-item> --> + </uni-forms> + <button class="submit-btn" @click="submitFilter">纭绛涢��</button> + </view> + </view> + </uni-popup> + + <!-- 璁㈠崟璇︽儏寮圭獥 --> + <uni-popup ref="detailPopup" type="bottom"> + <view class="detail-popup"> + <view class="popup-header"> + <text>璁㈠崟璇︽儏</text> + <uni-icons type="close" size="24" @click="hideDetailPopup"></uni-icons> + </view> + <scroll-view class="detail-content" scroll-y> + <view class="detail-section"> + <text class="section-title">鍩烘湰淇℃伅</text> + <view class="info-row"> + <text>璁㈠崟鍙�:</text> + <text>{{currentOrder.orderNo}}</text> + </view> + <view class="info-row"> + <text>瀹㈡埛淇℃伅:</text> + <text>{{currentOrder.customer}}</text> + </view> + <view class="info-row"> + <text>鐘舵��:</text> + <uni-tag :text="getStatus(currentOrder.status)" :type="getStatusType(currentOrder.status)" + size="small" /> + </view> + <view class="info-row"> + <text>鍒涘缓鏃堕棿:</text> + <text>{{formatDisplayDate(currentOrder.createTime)}}</text> + </view> + </view> + <view class="detail-section"> + <text class="section-title">鐗╂枡娓呭崟</text> + <view v-for="material in currentOrder.materials" :key="material.id" class="material-item"> + <text class="material-name">{{material.material_name}}</text> + <text class="material-quantity">{{material.quantity}}浠�</text> + </view> + </view> + </scroll-view> + <view class="detail-footer"> + <button class="submit-btn" @click="goToDetail"> + {{currentOrder.status !== 'completed' ? '澶勭悊璁㈠崟':'鏌ョ湅璁㈠崟'}} + </button> + </view> + </view> + </uni-popup> + + <!-- 鏂板缓璁㈠崟寮圭獥 --> + <uni-popup ref="createOrderPopup" type="bottom"> + <view class="create-popup"> + <view class="popup-header"> + <text>鏂板缓璁㈠崟</text> + <uni-icons type="close" size="24" @click="hideCreateOrderPopup"></uni-icons> + </view> + <scroll-view class="create-content" scroll-y> + <uni-forms ref="createForm"> + <uni-forms-item label="璁㈠崟缂栧彿"> + <view class="order-no-section" @click="generateOrderNo"> + <text class="order-no-value">{{createForm.orderNo || '鐐瑰嚮鐢熸垚璁㈠崟鍙�'}}</text> + </view> + </uni-forms-item> + + <uni-forms-item label="鍘熷鍗曟嵁" name="originalDoc"> + <view class="doc-upload"> + <button class="upload-btn" @click="takePhoto" + v-if="!createForm.originalDoc">鎷嶇収涓婁紶</button> + <view class="doc-preview" v-if="createForm.originalDoc"> + <image :src="createForm.originalDoc" mode="aspectFit"></image> + <uni-icons type="close" size="24" @click="removeOriginalDoc"></uni-icons> + </view> + </view> + </uni-forms-item> + + <uni-forms-item label="璁㈠崟澶囨敞" name="remark"> + <uni-easyinput v-model="createForm.remark" placeholder="璇疯緭鍏ヨ鍗曞娉�" type="textarea" /> + </uni-forms-item> + + </uni-forms> + <button class="submit-btn" @click="submitCreateOrder">鎻愪氦璁㈠崟</button> + </scroll-view> + </view> + </uni-popup> + + <!-- 渚ц竟鎿嶄綔寮圭獥 --> + <uni-popup ref="sideActionPopup" type="right"> + <view class="side-action-popup"> + <view class="popup-header"> + <uni-icons type="close" size="24" @click="hideSideActionPopup"></uni-icons> + </view> + + <!-- 鐢ㄦ埛淇℃伅鍖哄煙 --> + <view class="user-info-section"> + <view class="avatar"> + <text>{{userInfo.username ? userInfo.username.substring(0, 1).toUpperCase() : 'U'}}</text> + </view> + <view class="user-details"> + <text class="nickname">{{userInfo.username || '鐢ㄦ埛'}}</text> + <text class="role">{{userInfo.role || '鏅�氱敤鎴�'}}</text> + </view> + </view> + + <view class="side-action-content"> + <!-- <view class="action-item" @click="goToScan"> + <uni-icons type="scan" size="24" color="#409eff"></uni-icons> + <text>鎵爜</text> + </view> + <view class="action-item" @click="goToHistory"> + <uni-icons type="calendar" size="24" color="#409eff"></uni-icons> + <text>鍘嗗彶璁板綍</text> + </view> + <view class="action-item" @click="goToSettings"> + <uni-icons type="gear" size="24" color="#409eff"></uni-icons> + <text>璁剧疆</text> + </view> --> + <view class="action-item" @click="activateSoftware"> + <uni-icons type="star" size="24" color="#409eff"></uni-icons> + <text>婵�娲昏蒋浠�</text> + </view> + <view class="action-item logout" @click="logout"> + <uni-icons type="poweroff" size="24" color="#f56c6c"></uni-icons> + <text>閫�鍑虹櫥褰�</text> + </view> + </view> + </view> + </uni-popup> + </view> +</template> + +<script> + import orderservice from '@/services/orderService' + import { + config + } from '@/config/config' + + export default { + components: {}, + onShow() { + this.loadOrders() + }, + created() { + // 娉ㄥ唽orderservice鍒癡ue瀹炰緥 + this.$orderservice = orderservice + }, + // 澶勭悊瀵艰埅鏍忔寜閽偣鍑� + onNavigationBarButtonTap() { + this.$refs.sideActionPopup.open() + }, + data() { + return { + isH5: false, + // 鎼滅储鐩稿叧 + searchQuery: '', + filterForm: { + orderNo: '', + createTime: [] + }, + + // 鐘舵�佺瓫閫� + statusFilters: [{ + label: '鍏ㄩ儴', + value: 'all', + color: '#42b983' + }, + { + label: '寰呭鐞�', + value: 'pending', + color: '#e6a23c' + }, + { + label: '澶勭悊涓�', + value: 'processing', + color: '#409eff' + }, + { + label: '宸插畬鎴�', + value: 'completed', + color: '#67c23a' + }, + // { + // label: '宸插彇娑�', + // value: 'cancelled', + // color: '#f56c6c' + // } + ], + activeStatus: 'all', + + // 璁㈠崟鍒楄〃 + orderList: [], + currentPage: 1, + pageSize: 10, + loadStatus: 'more', + refreshing: false, + + // 褰撳墠閫変腑璁㈠崟 + currentOrder: { + orderNo: '', + status: '', + statusText: '', + createTime: '', + customer: '', + materials: [] + }, + + // 鏂板缓璁㈠崟 + createForm: { + orderNo: '', + remark: '', + originalDoc: '', + customer: '' + }, + + // 鐢ㄦ埛淇℃伅 + userInfo: {} + } + }, + onLoad() { + this.createForm.orderNo = ''; + const user = uni.getStorageSync(config.storageKeys.userInfo); + if (user) { + this.userInfo = user; + } else { + uni.redirectTo({ + url: '/pages/login/login' + }) + } + }, + methods: { + getStatus(status) { + const statusTexts = { + pending: '寰呭鐞�', + processing: '澶勭悊涓�', + completed: '宸插畬鎴�', + cancelled: '宸插彇娑�' + } + + return statusTexts[status]; + }, + + async generateOrderNo() { + // console.log(this.createForm); + if (!this.createForm.orderNo || this.createForm.orderNo.length === 0) { + const date = new Date(); + //#ifdef APP-PLUS + const seqService = require("@/services/seqService.js").default; + const result = await seqService.getOrderSeq(); + this.createForm.orderNo = `ORD-${date.getFullYear()}${(date.getMonth() + 1) + .toString() + .padStart(2, "0")}${date + .getDate() + .toString() + .padStart(2, "0")}-${result.toString().padStart(4, "0")}`; + //#endif + + //#ifdef H5 + const random = Math.floor(Math.random() * 10000); + this.createForm.orderNo = `ORD-${date.getFullYear()}${(date.getMonth() + 1) + .toString() + .padStart(2, "0")}${date + .getDate() + .toString() + .padStart(2, "0")}-${random.toString().padStart(4, "0")}`; + //#endif + } + }, + + // 鎼滅储鐩稿叧鏂规硶 + handleSearchIconClick() { + this.searchQuery = '' + this.$refs.filterPopup.open() + }, + + showFilterPopup() { + if (!this.$refs.filterPopup) { + console.error('filterPopup ref not found') + return + } + this.$refs.filterPopup.open() + }, + + hideFilterPopup() { + this.$refs.filterPopup.close() + }, + + submitFilter() { + this.hideFilterPopup() + this.refreshList() + }, + + // 鐘舵�佺瓫閫夋柟娉� + changeStatus(status) { + this.activeStatus = status + this.refreshList() + }, + + getStatusType(status) { + const map = { + pending: 'warning', + processing: 'primary', + completed: 'success', + cancelled: 'error' + } + return map[status] || 'default' + }, + + // 鏍煎紡鍖栨棩鏈熸樉绀� + formatDisplayDate(dateString) { + if (!dateString) return '' + const date = new Date(dateString) + return `${date.getFullYear()}-${(date.getMonth() + 1).toString().padStart(2, '0')}-${date.getDate().toString().padStart(2, '0')} ${date.getHours().toString().padStart(2, '0')}:${date.getMinutes().toString().padStart(2, '0')}` + }, + + // 璁㈠崟鍒楄〃鏂规硶 + async loadOrders() { + try { + const orderService = require('@/services/orderService').default + // #ifdef H5 + // 涓存椂浣跨敤妯℃嫙鏁版嵁 + const mockData2 = orderService.getMockOrders(this.pageSize) + + if (this.currentPage === 1) { + this.orderList = mockData2 + } else { + this.orderList = [...this.orderList, ...mockData2] + } + this.loadStatus = mockData2.length < this.pageSize ? 'noMore' : 'more' + // #endif + + // #ifdef APP-PLUS + const mockData = await orderService.getOrderList(this.activeStatus, this.filterForm.orderNo, + null, + this.currentPage, this.pageSize) + + if (this.currentPage === 1) { + this.orderList = mockData + } else { + this.orderList = [...this.orderList, ...mockData] + } + + this.loadStatus = mockData.length < this.pageSize ? 'noMore' : 'more' + // #endif + + } catch (error) { + console.error(error) + uni.showToast({ + title: '鍔犺浇澶辫触', + icon: 'none' + }) + } + }, + + async refreshList() { + this.refreshing = true + this.currentPage = 1 + await this.loadOrders() + this.refreshing = false + }, + + async loadMore() { + if (this.loadStatus === 'noMore') return + this.currentPage++ + await this.loadOrders() + }, + + // 璁㈠崟璇︽儏鏂规硶 + async showOrderDetail(order) { + + const materials = order.materials; + + const scanrecordService = require('@/services/scanrecordService').default + + for (var index = 0; index < materials.length; index++) { + var element = materials[index]; + //#ifdef APP-PLUS + const scanrecords = await scanrecordService.getScanRecord( + order.orderNo, element.material_name); + order.materials[index].quantity = scanrecords[0].quantity; + //#endif + } + this.currentOrder = order + this.$refs.detailPopup.open() + }, + + hideDetailPopup() { + this.$refs.detailPopup.close() + }, + + goToDetail() { + this.hideDetailPopup() + + if (this.currentOrder.status !== 'completed') { + const tabs = this.currentOrder.materials.map(mat => ({ + ...mat, + name: mat.material_name + })) + + if (this.currentOrder.materials.length > 0) { + this.createForm.orderNo = ''; + this.createForm.originalDoc = ''; + this.createForm.remark = ''; + // 璺宠浆鍒拌鍗曡鎯呴〉 + uni.navigateTo({ + url: `/pages/order/detail?orderNo=${encodeURIComponent( + this.currentOrder.orderNo + )}&createTime=${encodeURIComponent( + this.currentOrder.createTime.toLocaleString() + )}&materials=${encodeURIComponent( + JSON.stringify(tabs) + )}&customer=${this.currentOrder.customer}`, + success: () => {}, + fail: err => { + console.error("璺宠浆璁㈠崟璇︽儏澶辫触:", err); + uni.showToast({ + title: "璺宠浆澶辫触锛岃閲嶈瘯", + icon: "none" + }); + } + }); + } else { + this.createForm.orderNo = ''; + this.createForm.originalDoc = ''; + this.createForm.remark = ''; + uni.navigateTo({ + url: `/pages/create/create?orderNo=${this.currentOrder.orderNo}&addOrOnlyAdjust=1&customer=${this.currentOrder.customer}` + }) + } + } else { + const tabs = this.currentOrder.materials.map(mat => ({ + ...mat, + name: mat.material_name + })) + // 璺宠浆鍒拌鍗曡鎯呴〉 + uni.navigateTo({ + url: `/pages/order/detail?orderNo=${encodeURIComponent( + this.currentOrder.orderNo + )}&createTime=${encodeURIComponent( + this.currentOrder.createTime.toLocaleString() + )}&materials=${encodeURIComponent( + JSON.stringify(tabs) + )}&dealOrView=2&customer=${this.currentOrder.customer}`, + success: () => {}, + fail: err => { + console.error("璺宠浆璁㈠崟璇︽儏澶辫触:", err); + uni.showToast({ + title: "璺宠浆澶辫触锛岃閲嶈瘯", + icon: "none" + }); + } + }); + } + + }, + + // 鏂板缓璁㈠崟鏂规硶 + showCreateOrderPopup() { + this.$refs.createOrderPopup.open() + }, + + hideCreateOrderPopup() { + this.$refs.createOrderPopup.close() + // this.createForm = { + // orderNo: '', + // remark: '', + // originalDoc: '' + // } + }, + + // 鎷嶇収涓婁紶鍘熷鍗曟嵁 + takePhoto() { + uni.chooseImage({ + count: 1, + sourceType: ['camera'], + success: (res) => { + this.createForm.originalDoc = res.tempFilePaths[0] + + uni.saveImageToPhotosAlbum({ + filePath: this.createForm.originalDoc, + success: () => console.log("宸蹭繚瀛樺埌鐩稿唽") + }); + } + }) + }, + + // 鍒犻櫎鍘熷鍗曟嵁 + removeOriginalDoc() { + this.createForm.originalDoc = '' + }, + + async submitCreateOrder() { + if (!this.createForm.originalDoc) { + uni.showToast({ + title: '璇蜂笂浼犲師濮嬪崟鎹�', + icon: 'none' + }) + return + } + + if (!this.createForm.orderNo || this.createForm.orderNo.length === 0) { + uni.showToast({ + title: '璇风敓鎴愯鍗曞彿', + icon: 'none' + }) + return + } + + try { + // #ifdef APP-PLUS + await this.$orderservice.createOrder(this.createForm) + // #endif + + const order = this.createForm.orderNo; + const cust = this.createForm.customer; + this.createForm.orderNo = ''; + this.createForm.originalDoc = ''; + this.createForm.remark = ''; + this.createForm.customer = ''; + uni.showToast({ + title: '鍒涘缓鎴愬姛', + icon: 'success' + }) + uni.navigateTo({ + url: `/pages/create/create?orderNo=${order}&addOrOnlyAdjust=1&customer=${cust}` + }) + this.hideCreateOrderPopup() + // this.refreshList() + } catch (error) { + console.error(error) + uni.showToast({ + title: '鍒涘缓澶辫触', + icon: 'none' + }) + } + }, + + // 渚ц竟鎿嶄綔寮圭獥鏂规硶 + hideSideActionPopup() { + this.$refs.sideActionPopup.close() + }, + + goToScan() { + this.hideSideActionPopup() + uni.scanCode({ + success: (res) => { + uni.showToast({ + title: '鎵爜鎴愬姛', + icon: 'success' + }) + // 杩欓噷鍙互鏍规嵁鎵爜缁撴灉杩涜鐩稿簲鐨勫鐞� + }, + fail: () => { + uni.showToast({ + title: '鎵爜澶辫触', + icon: 'none' + }) + } + }) + }, + + goToHistory() { + this.hideSideActionPopup() + uni.navigateTo({ + url: '/pages/history/history' + }) + }, + + goToSettings() { + this.hideSideActionPopup() + uni.navigateTo({ + url: '/pages/settings/settings' + }) + }, + + // 婵�娲昏蒋浠� + activateSoftware() { + uni.navigateTo({ + url: '/pages/system/activation', + success: () => {}, + fail: (err) => { + console.error('璺宠浆婵�娲婚〉闈㈠け璐�:', err) + uni.showToast({ + title: '璺宠浆澶辫触锛岃閲嶈瘯', + icon: 'none' + }) + } + }) + }, + + // 閫�鍑虹櫥褰� + logout() { + uni.showModal({ + title: '鎻愮ず', + content: '纭畾瑕侀��鍑虹櫥褰曞悧锛�', + success: (res) => { + if (res.confirm) { + // 杩欓噷鍙互娣诲姞閫�鍑虹櫥褰曠殑閫昏緫 + uni.showLoading({ + title: '姝e湪閫�鍑�' + }) + + // 妯℃嫙閫�鍑鸿繃绋� + setTimeout(() => { + uni.hideLoading() + // 娓呴櫎鐢ㄦ埛淇℃伅 + + uni.setStorageSync(config.storageKeys.userInfo, null) + uni.setStorageSync(config.storageKeys.authToken, null) + uni.setStorageSync(config.storageKeys.tokenExpiry, null) + + // 璺宠浆鍒扮櫥褰曢〉闈� + uni.reLaunch({ + url: '/pages/login/login' + }) + }, 1000) + } + } + }) + } + }, + + mounted() { + this.loadOrders() + } + } +</script> + +<style lang="scss"> + .order-container { + height: 100vh; + display: flex; + flex-direction: column; + background-color: #f5f7fa; + + // 鎼滅储鏍忔牱寮� + .search-bar { + padding: 20rpx; + background-color: #fff; + box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05); + + .search-box { + display: flex; + align-items: center; + + .filter-icon { + margin-left: 20rpx; + padding: 10rpx; + } + } + } + + // 鐘舵�佺瓫閫夊櫒鏍峰紡 + .status-filter { + white-space: nowrap; + padding: 20rpx; + background-color: #fff; + border-bottom: 1rpx solid #eee; + width: calc(100% - 20px); + + .filter-item { + display: inline-flex; + flex-direction: column; + align-items: center; + padding: 0 30rpx; + position: relative; + + &.active { + text { + color: #409eff; + font-weight: bold; + } + } + + text { + font-size: 28rpx; + color: #666; + } + + .status-indicator { + width: 40rpx; + height: 6rpx; + border-radius: 3rpx; + margin-top: 10rpx; + } + } + } + + // 璁㈠崟鍒楄〃鏍峰紡 + .order-list { + flex: 1; + background-color: #f5f7fa; + padding-bottom: 180rpx; + /* 澧炲姞搴曢儴绌洪棿锛岄槻姝㈡寜閽伄鎸� */ + + .order-item { + margin: 20rpx; + padding: 30rpx; + background-color: #fff; + border-radius: 16rpx; + box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.05); + + .order-header { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 20rpx; + + .order-no { + font-size: 30rpx; + font-weight: bold; + color: #333; + } + + .uni-tag { + margin-left: 10rpx; + } + } + + .order-info { + display: flex; + justify-content: space-between; + font-size: 26rpx; + color: #999; + + .create-time { + flex: 1; + } + + .material-count { + text-align: right; + min-width: 120rpx; + } + } + } + } + + // 搴曢儴鎿嶄綔鎸夐挳 + .action-btn { + position: fixed; + right: 40rpx; + bottom: 80rpx; + width: 100rpx; + height: 100rpx; + border-radius: 50%; + background-color: #409eff; + display: flex; + justify-content: center; + align-items: center; + box-shadow: 0 4rpx 20rpx rgba(64, 158, 255, 0.3); + z-index: 99; + box-sizing: border-box; + } + + // 寮圭獥鍏叡鏍峰紡 + .popup-header { + display: flex; + justify-content: space-between; + align-items: center; + padding: 30rpx; + border-bottom: 1rpx solid #eee; + + text { + font-size: 32rpx; + font-weight: bold; + } + } + + // 琛ㄥ崟item鏍峰紡 + .uni-forms-item { + display: flex; + margin-bottom: 20rpx; + align-items: center; + + .uni-forms-item__label { + width: 150rpx !important; + flex: none; + font-size: 28rpx; + color: #666; + padding-right: 20rpx; + text-align: right; + } + + .uni-forms-item__content { + flex: 1; + min-width: 0; + } + } + + // 绛涢�夊脊绐楁牱寮� + .filter-popup { + background-color: #fff; + border-radius: 30rpx 30rpx 0 0; + width: 100%; + box-sizing: border-box; + + .filter-content { + padding: 30rpx; + width: 100%; + box-sizing: border-box; + bottom: 50px; + + .submit-btn { + margin-top: 40rpx; + background-color: #409eff; + color: #fff; + width: 100%; + box-sizing: border-box; + padding: 0 20rpx; + bottom: 20px; + } + + .uni-easyinput, + .uni-datetime-picker { + width: 100% !important; + box-sizing: border-box; + } + } + } + + // 璇︽儏寮圭獥鏍峰紡 + .detail-popup { + background-color: #fff; + border-radius: 30rpx 30rpx 0 0; + max-height: 70vh; + display: flex; + flex-direction: column; + + .detail-content { + padding: 30rpx; + flex: 1; + overflow-y: auto; + width: calc(100% - 32px); + bottom: 50px; + + .detail-section { + margin-bottom: 40rpx; + + .section-title { + display: block; + font-size: 30rpx; + font-weight: bold; + margin-bottom: 20rpx; + color: #333; + } + + .info-row { + display: flex; + justify-content: space-between; + margin-bottom: 15rpx; + font-size: 28rpx; + color: #666; + } + + .material-item { + display: flex; + justify-content: space-between; + padding: 20rpx 0; + border-bottom: 1rpx solid #f5f5f5; + + .material-name { + font-size: 28rpx; + color: #333; + } + + .material-quantity { + font-size: 28rpx; + color: #409eff; + } + } + + .action-btn { + margin-top: 40rpx; + background-color: #409eff; + color: #fff; + } + } + } + } + + // 鏂板缓璁㈠崟寮圭獥鏍峰紡 + .create-popup { + background-color: #fff; + border-radius: 30rpx 30rpx 0 0; + max-height: 70vh; + width: 100%; + box-sizing: border-box; + padding: 0 20rpx; + padding-bottom: 40px; + + .create-content { + padding: 30rpx; + max-height: calc(70vh - 120rpx); + width: 100%; + box-sizing: border-box; + bottom: 50px; + + .doc-upload { + margin-bottom: 30rpx; + + .upload-btn { + background-color: #409eff; + color: #fff; + font-size: 28rpx; + height: 80rpx; + line-height: 80rpx; + } + + .doc-preview { + margin-top: 20rpx; + position: relative; + border: 1rpx dashed #ddd; + padding: 20rpx; + border-radius: 8rpx; + + image { + width: 100%; + height: 250rpx; + margin-bottom: 20rpx; + } + + .uni-icons { + position: absolute; + right: 10rpx; + top: 10rpx; + background-color: rgba(0, 0, 0, 0.5); + color: #fff; + border-radius: 50%; + padding: 5rpx; + } + } + } + + .submit-btn { + margin: 40rpx 0 20rpx; + background-color: #409eff; + color: #fff; + position: sticky; + z-index: 1; + } + } + } + } + + .order-no-section { + padding: 24rpx; + background-color: #f8f8f8; + border-radius: 8rpx; + margin-bottom: 30rpx; + display: flex; + align-items: center; + cursor: pointer; + + .order-no-label { + font-size: 28rpx; + color: #666; + } + + .order-no-value { + font-size: 30rpx; + font-weight: bold; + color: #2979ff; + flex: 1; + } + } + + .detail-footer { + padding: 20rpx 30rpx; + background: #fff; + border-top: 1rpx solid #eee; + } + + .submit-btn { + width: 100%; + height: 80rpx; + line-height: 80rpx; + background: #2979ff; + color: #fff; + border-radius: 40rpx; + font-size: 28rpx; + margin: 0; + } + + // 渚ц竟鎿嶄綔寮圭獥鏍峰紡 + .side-action-popup { + background-color: #fff; + height: 100%; + width: 60vw; + display: flex; + flex-direction: column; + + .popup-header { + padding: 30rpx; + border-bottom: 1rpx solid #eee; + display: flex; + justify-content: flex-end; + + text { + font-size: 32rpx; + font-weight: bold; + } + } + + // 鐢ㄦ埛淇℃伅鍖哄煙鏍峰紡 + .user-info-section { + display: flex; + align-items: center; + padding: 40rpx 30rpx; + background-color: #f8f9fa; + border-bottom: 1rpx solid #eee; + + .avatar { + width: 100rpx; + height: 100rpx; + border-radius: 50%; + background-color: #409eff; + display: flex; + justify-content: center; + align-items: center; + margin-right: 20rpx; + + text { + color: #fff; + font-size: 40rpx; + font-weight: bold; + } + } + + .user-details { + display: flex; + flex-direction: column; + + .nickname { + font-size: 32rpx; + font-weight: bold; + color: #333; + margin-bottom: 10rpx; + } + + .role { + font-size: 24rpx; + color: #666; + background-color: #e6f1fc; + padding: 4rpx 12rpx; + border-radius: 20rpx; + display: inline-block; + } + } + } + + .side-action-content { + padding: 30rpx; + flex: 1; + display: flex; + flex-direction: column; + + .action-item { + display: flex; + align-items: center; + padding: 30rpx 0; + border-bottom: 1rpx solid #f5f5f5; + + text { + margin-left: 20rpx; + font-size: 30rpx; + color: #333; + } + + &:active { + background-color: #f9f9f9; + } + + &.logout { + margin-top: auto; // 灏嗛��鍑虹櫥褰曟寜閽帹鍒板簳閮� + border-top: 1rpx solid #eee; + border-bottom: none; + + text { + color: #f56c6c; + } + } + } + } + } +</style> \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/pages/login/login.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/pages/login/login.vue" new file mode 100644 index 0000000..a7eb244 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/pages/login/login.vue" @@ -0,0 +1,245 @@ +<template> + <view class="login-container"> + <!-- 涓婚鍒囨崲鎸夐挳 --> + <!-- <view class="theme-toggle" @click="toggleTheme"> + <uni-icon :name="themeIcon" size="40"></uni-icon> + </view> --> + + <!-- 椤堕儴logo --> + <view class="logo-container"> + <image src="/static/logo.png" mode="aspectFit" class="logo"></image> + <view class="software-title"> + <text class="title-text">SMT闃查敊绯荤粺</text> + <text class="welcome-text">娆㈣繋浣跨敤锛岃鐧诲綍鎮ㄧ殑璐﹀彿</text> + </view> + </view> + <!-- 鐧诲綍琛ㄥ崟 --> + <view class="form-container"> + <uni-forms :model="form" ref="uForm"> + <uni-forms-item label="璐﹀彿" prop="username"> + <uni-easyinput v-model="form.username" placeholder="璇疯緭鍏ヨ处鍙�" /> + </uni-forms-item> + + <uni-forms-item label="瀵嗙爜" prop="password"> + <uni-easyinput v-model="form.password" placeholder="璇疯緭鍏ュ瘑鐮�" type="password" /> + </uni-forms-item> + </uni-forms> + + <!-- 鐧诲綍鎸夐挳 --> + <uni-button type="primary" @click="handleLogin" :loading="loading" class="login-btn"> + 鐧诲綍 + </uni-button> + + <!-- 婵�娲诲叆鍙� --> + <!-- <view class="activation-tip"> + 棣栨浣跨敤锛�<text class="link" @click="goActivation">婵�娲昏蒋浠�</text> + </view> --> + </view> + + <!-- 璇曠敤鏈熸彁绀� --> + <!-- <view class="trial-tip" v-if="trialDays > 0"> + 鍓╀綑璇曠敤鏈燂細{{trialDays}}澶� + </view> --> + </view> + +</template> + +<script> + import { + config + } from '@/config/config' + export default { + data() { + return { + form: { + username: '', + password: '' + }, + loading: false, + trialDays: 7 // 榛樿璇曠敤鏈�7澶� + } + }, + computed: { + themeIcon() { + return this.$store.state.theme === 'light' ? 'moon' : 'sun' + } + }, + methods: { + // 鐧诲綍澶勭悊 + async handleLogin() { + // 楠岃瘉杈撳叆 + if (!this.form.username || !this.form.password) { + uni.showToast({ + title: '璇疯緭鍏ョ敤鎴峰悕鍜屽瘑鐮�', + icon: 'none' + }) + return + } + + this.loading = true + + try { + // 璋冪敤authService杩涜鐧诲綍楠岃瘉 + const authService = require('@/services/authService').default + const { + userInfo, + token, + expiryDate + } = await authService.login( + this.form.username, + this.form.password + ) + + // 瀛樺偍鐧诲綍淇℃伅 + uni.setStorageSync(config.storageKeys.userInfo, userInfo) + uni.setStorageSync(config.storageKeys.authToken, token) + uni.setStorageSync(config.storageKeys.tokenExpiry, expiryDate) + + uni.showToast({ + title: '鐧诲綍鎴愬姛', + icon: 'success' + }) + + // 璺宠浆鍒伴椤� + uni.redirectTo({ + url: '/pages/index/index' + }) + } catch (error) { + console.error('鐧诲綍澶辫触:', error) + uni.showToast({ + title: error.message || '鐧诲綍澶辫触锛岃閲嶈瘯', + icon: 'none' + }) + } finally { + this.loading = false + } + }, + // 璺宠浆婵�娲婚〉闈� + goActivation() { + uni.navigateTo({ + url: '/pages/system/activation', + success: () => {}, + fail: (err) => { + console.error('璺宠浆婵�娲婚〉闈㈠け璐�:', err) + uni.showToast({ + title: '璺宠浆澶辫触锛岃閲嶈瘯', + icon: 'none' + }) + } + }) + }, + // 鍒囨崲涓婚 + toggleTheme() { + this.$store.dispatch('toggleTheme') + } + } + } +</script> + +<style lang="scss" scoped> + .login-header { + text-align: center; + margin-bottom: 40px; + } + + .login-header h1 { + color: black; + font-size: 2.5rem; + margin-bottom: 10px; + text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); + } + + .login-header p { + color: rgba(0, 0, 0, 0.8); + font-size: 0.9rem; + } + + .login-container { + padding: 40rpx; + height: 100vh; + display: flex; + flex-direction: column; + background-color: var(--bg-color); + + .theme-toggle { + position: absolute; + right: 30rpx; + top: 30rpx; + z-index: 999; + width: 80rpx; + height: 80rpx; + border-radius: 50%; + background-color: var(--card-bg); + display: flex; + justify-content: center; + align-items: center; + box-shadow: 0 2rpx 10rpx var(--shadow-color); + } + + .logo-container { + flex: 1.2; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + margin-bottom: 60rpx; + + .logo { + width: 400rpx; + height: 400rpx; + margin-bottom: 30rpx; + margin-top: -150px; + } + + .software-title { + display: flex; + flex-direction: column; + align-items: center; + margin-top: -60px; + + .title-text { + font-size: 52rpx; + font-weight: 600; + color: var(--text-color); + margin-bottom: 20rpx; + letter-spacing: 3rpx; + text-shadow: 0 2rpx 6rpx rgba(0, 0, 0, 0.1); + } + + .welcome-text { + font-size: 30rpx; + color: var(--text-color); + opacity: 0.75; + letter-spacing: 1rpx; + } + } + } + + .form-container { + flex: 2; + margin-top: -60px; + + .login-btn { + margin-top: 60rpx; + } + + .activation-tip { + margin-top: 30rpx; + text-align: center; + color: var(--text-color); + opacity: 0.7; + + .link { + color: #2979ff; + margin-left: 10rpx; + } + } + } + + .trial-tip { + text-align: center; + color: #f56c6c; + margin-bottom: 30rpx; + } + } +</style> \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/pages/order/detail.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/pages/order/detail.vue" new file mode 100644 index 0000000..7bdf452 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/pages/order/detail.vue" @@ -0,0 +1,1204 @@ +<template> + <view class="order-detail-container"> + <!-- 椤堕儴璁㈠崟淇℃伅 --> + <view class="order-header"> + <view class="order-info"> + <text class="info-label">璁㈠崟缂栧彿锛�</text> + <text class="info-value">{{orderInfo.orderNo}}</text> + </view> + <view class="order-info"> + <text class="info-label">瀹㈡埛锛�</text> + <text class="info-value">{{orderInfo.customer}}</text> + </view> + <view class="order-info"> + <text class="info-label">鍒涘缓鏃堕棿锛�</text> + <text class="info-value">{{formatDisplayDate(orderInfo.createTime)}}</text> + </view> + </view> + + <!-- 鐗╂枡Tabs --> + <view class="material-tabs"> + <scroll-view scroll-x class="tabs-scroll"> + <view class="tabs-container"> + <!-- 鍙樉绀哄墠3涓猅ab --> + <view v-for="(tab, index) in tabs.slice(0, 3)" :key="index" class="tab-item" + :class="{'active': activeTab === index}" @click="switchTab(index)"> + <text>{{tab.name}}</text> + </view> + + <!-- 涓嬫媺鎸夐挳 --> + <view class="dropdown-btn" :class="{'active': activeTab >= 3}" v-if="tabs.length > 3" + @click="toggleCollapse"> + <text>{{activeTab >= 3 ? tabs[activeTab].name : '鏇村'}}</text> + <uni-icons :type="isCollapsed ? 'arrowdown' : 'arrowup'" size="16"></uni-icons> + </view> + </view> + </scroll-view> + + <!-- 涓嬫媺鑿滃崟 --> + <view class="dropdown-menu" v-if="!isCollapsed && tabs.length > 3"> + <view v-for="(tab, index) in tabs.slice(3)" :key="index + 3" class="dropdown-item" + :class="{'active': activeTab === index + 3}" @click="switchTab(index + 3)"> + <text>{{tab.name}}</text> + </view> + </view> + </view> + + <!-- Tab鍐呭鍖� --> + <view class="tab-content"> + <!-- 鎵爜杈撳叆妗� --> + <view class="scan-section" v-if="dealOrView == 1"> + <uni-easyinput v-model="scanInput" placeholder="璇锋壂鎻忎簩缁寸爜" @confirm="handleScanInput" :focus="focus" + :disabled="inputDisable" clearable></uni-easyinput> + </view> + + <!-- 鎵弿璁板綍 --> + <view class="scan-records"> + <view class="section-title"> + <text>鎵弿璁板綍</text> + <text class="record-count">({{currentRecords.length}})</text> + </view> + + <scroll-view scroll-y class="record-list"> + <view v-for="(record, index) in currentRecords" :key="index" class="record-item" + @click="viewScanRecord(record.id)"> + <view class="record-header"> + <text class="record-time">鎵弿鏃堕棿: {{ formatDisplayDate(record.scan_time)}}</text> + <text class="record-index">搴忓彿: {{currentRecords.length - index}}</text> + </view> + <view class="record-calibration">鏍囧畾淇℃伅: {{record.reference_content}}</view> + <view class="record-status" :class="{'error': !record.is_matched}"> + {{record.is_matched ? '鉁�' : '鉁�'}} + </view> + </view> + </scroll-view> + </view> + </view> + + <!-- 棣栨鎵弿寮圭獥 --> + <uni-popup ref="firstScanPopup" type="dialog"> + <view class="scan-popup"> + <view class="popup-header"> + <text>{{confirmHiden?'璇烽�夋嫨鏍稿鏍囧噯':'璇锋煡鐪嬫牳瀵规爣鍑�'}}</text> + </view> + <view class="popup-content"> + <view class="scan-textarea"> + <scroll-view scroll-y class="record-list"> + <view class="text-line"> + <view v-for="(char, index) in formattedText" :key="index" class="text-char" + :class="{'selected': selectedSegments.includes(index)}" + @click="confirmHiden?toggleSegment(index):()=>{}"> + {{char}} + </view> + </view> + </scroll-view> + </view> + <view class="selection-info"> + <text>宸查�夋嫨:</text> + <block v-if="getSelectedSegments().length > 0"> + <text v-for="(segment, idx) in getSelectedSegments()" :key="idx"> + {{segment.text}} + <text v-if="idx < getSelectedSegments().length - 1">|</text> + </text> + </block> + <text v-else>鏃�</text> + </view> + </view> + <view class="popup-footer"> + <button class="confirm-btn" v-show="confirmHiden" @click="confirmSelection">纭</button> + </view> + </view> + </uni-popup> + + <!-- 閿欒鎻愮ず寮圭獥 --> + <uni-popup ref="errorPopup" type="dialog"> + <view class="error-popup"> + <view class="popup-header"> + <text>鎵弿閿欒</text> + </view> + <view class="popup-content"> + <text>褰撳墠鎵弿缁撴灉涓嶇鍚堟牳瀵规爣鍑�</text> + </view> + <view class="popup-footer"> + <button class="confirm-btn" @click="closeErrorPopup">纭畾</button> + </view> + </view> + </uni-popup> + + <!-- 鏌ョ湅鐗╂枡淇℃伅 --> + <uni-popup ref="viewScanRecord" type="dialog"> + <view class="scan-popup"> + <view class="popup-header"> + <text>鏌ョ湅鐗╂枡淇℃伅</text> + </view> + <view class="popup-content"> + <view> + <text style="font-size: 16px;">璁㈠崟缂栧彿锛�</text> + <text + style="font-size: 16px;font-weight: bold;color: #2979ff;">{{currentScanRecord.orderNo}}</text> + </view> + <view> + <text style="font-size: 16px;">鎵弿鏃堕棿锛�</text> + <text + style="font-size: 16px;font-weight: bold;">{{formatDisplayDate(currentScanRecord.scan_time)}}</text> + </view> + <view> + <text style="font-size: 16px;">鐗╂枡鍚嶇О锛�</text> + <text + style="font-size: 16px;font-weight: bold;color: #2979ff;">{{currentScanRecord.materialName}}</text> + </view> + <view> + <text style="font-size: 16px;">鏍囧畾淇℃伅锛�</text> + <text + style="overflow-wrap: break-word;font-size: 16px;font-weight: bold;color: #2979ff;">{{currentScanRecord.reference_content}}</text> + </view> + <view> + <text style="font-size: 16px;">浜岀淮鐮佷俊鎭細</text> + <text + style="overflow-wrap: break-word;font-size: 16px;font-weight: bold;">{{currentScanRecord.scan_content}}</text> + </view> + </view> + </view> + </uni-popup> + + <!-- 鏌ョ湅鍘熷鍗曟嵁 --> + <uni-popup ref="viewOrderImg" type="dialog"> + <view class="scan-popup"> + <view class="popup-header"> + <text>鏌ョ湅鍘熷鍗曟嵁</text> + </view> + <view class="popup-content"> + <view class="doc-preview" v-if="originalDoc"> + <image :src="originalDoc" mode="aspectFit" @click="previewImage"></image> + </view> + </view> + </view> + </uni-popup> + + <!-- 鍦╰emplate涓坊鍔犱晶杈瑰脊绐� --> + <uni-popup ref="sideActionPopup" type="right"> + <view class="side-action-popup"> + <view class="popup-header"> + <text>璁㈠崟鎿嶄綔</text> + <uni-icons type="close" size="24" @click="hideSideActionPopup"></uni-icons> + </view> + + <view class="side-action-content"> + <view class="action-item" @click="viewCalibration"> + <uni-icons type="eye" size="24" color="#2979ff"></uni-icons> + <text>鏌ョ湅褰撳墠鏍囧畾鍐呭</text> + </view> + + <view class="action-item" @click="viewOrderImg"> + <uni-icons type="image" size="24" color="#2979ff"></uni-icons> + <text>鏌ョ湅鍘熷鍗曟嵁</text> + </view> + + <view class="action-item" @click="editMat" v-if="dealOrView == 1"> + <uni-icons type="compose" size="24" color="#2979ff"></uni-icons> + <text>缂栬緫鐗╂枡</text> + </view> + + <view class="action-item" @click="adjustSeq" v-if="dealOrView == 1"> + <uni-icons type="list" size="24" color="#2979ff"></uni-icons> + <text>璋冩暣椤哄簭</text> + </view> + + <!-- <view class="action-item" @click="exportData"> + <uni-icons type="download" size="24" color="#2979ff"></uni-icons> + <text>瀵煎嚭鏁版嵁</text> + </view> --> + + <view class="action-item logout" @click="endOrder" v-if="dealOrView == 1"> + <uni-icons type="minus" size="24" color="#f56c6c"></uni-icons> + <text>缁撴潫鍗曟嵁</text> + </view> + </view> + </view> + </uni-popup> + </view> +</template> + +<script> + export default { + data() { + return { + orderInfo: { + orderNo: "", + createTime: "", + customer: "" + }, + tabs: [], // 鐗╂枡Tabs + activeTab: 0, + scanRecords: {}, // 鍚勭墿鏂欑殑鎵弿璁板綍 {鐗╂枡ID: [璁板綍鏁扮粍]} + verificationData: {}, // 鍚勭墿鏂欑殑楠岃瘉鏁版嵁 {鐗╂枡ID: [楠岃瘉鏂囨湰鏁扮粍]} + scanResult: "", // 褰撳墠鎵弿缁撴灉 + scanInput: "", // 鎵爜杈撳叆 + textSegments: [], // 鏂囨湰鍒嗘 + selectedSegments: [], // 閫変腑鐨勬枃鏈 + isFirstScan: {}, // 璁板綍鍚勭墿鏂欐槸鍚︽槸棣栨鎵弿 + isCollapsed: true, // 鏄惁鎶樺彔澶氫綑Tabs + selectedText: "", // 閫変腑鐨勬枃鏈唴瀹� + tempScanInput: '', + currentRecords: [], + focus: true, + confirmHiden: true, + inputDisable: false, + dealOrView: 1, + isFirstLoad: true, + currentScanRecord: { + scan_time: '', + reference_content: '', + is_matched: '', + orderNo: '', + materialName: '', + scan_content: '', + id: 0 + }, + originalDoc: '' + }; + }, + // 娣诲姞瀵艰埅鏍忔寜閽偣鍑诲鐞� + onNavigationBarButtonTap() { + uni.hideKeyboard(); + this.$refs.sideActionPopup.open(); + }, + computed: { + // 鏍煎紡鍖栨枃鏈负琛屽拰鍗曡瘝鐨勪簩缁存暟缁� + formattedText() { + // 鐩存帴杩斿洖瀛楃鏁扮粍 + return this.textSegments || []; + } + }, + created() { + this.isFirstLoad = false + }, + onShow() { + try { + //#ifdef APP-PLUS + if (this.orderInfo.orderNo.length > 0 && !this.isFirstLoad) { + const orderMatService = require('@/services/orderMatService').default + orderMatService.getMaterials(this.orderInfo.orderNo).then(res => { + // 鎺ユ敹鐗╂枡鍒楄〃 + if (res) { + this.tabs = res.map(m => ({ + id: m.id, + name: m.material_name + })); + // 鍒濆鍖栨壂鎻忕姸鎬� + this.tabs.forEach(tab => { + const scanrecordService = require('@/services/scanrecordService').default + scanrecordService.getScanRecords(this.orderInfo.orderNo, tab.name).then( + res => { + this.scanRecords[tab.name] = res.length > 0 ? res : []; + this.isFirstScan[tab.name] = res.length > 0 ? false : true; + + const materialId = this.tabs[this.activeTab]?.name; + this.currentRecords = materialId ? this.scanRecords[ + materialId] || [] : []; + }); + + const materialContentService = require('@/services/materialContentService') + .default + materialContentService.getMaterialContent(this.orderInfo.orderNo, tab.name) + .then(res => { + this.verificationData[tab.name] = []; + for (var index = 0; index < res.length; index++) { + var element = res[index]; + const text = element.reference_content.split('@#@'); + this.verificationData[tab.name].push(text); + } + }); + }); + } + }); + } + //#endif + if (!this.tabs || this.tabs.length == 0) { + uni.redirectTo({ + url: '/pages/index/index' + }) + } + } catch (e) { + console.error('detail.onShow', e) + } + }, + onLoad(options) { + try { + // 鎺ユ敹璁㈠崟淇℃伅 + if (options.orderNo && options.createTime) { + this.orderInfo = { + orderNo: options.orderNo, + createTime: options.createTime, + customer: options.customer || "鏆傛棤淇℃伅" + }; + } + + if (options.dealOrView) { + this.dealOrView = options.dealOrView; + } + + // 鎺ユ敹鐗╂枡鍒楄〃 + if (options.materials) { + const materials = JSON.parse(decodeURIComponent(options.materials)); + this.tabs = materials.map(m => ({ + id: m.id, + name: m.name + })); + //#ifdef APP-PLUS + // 鍒濆鍖栨壂鎻忕姸鎬� + this.tabs.forEach(tab => { + const scanrecordService = require('@/services/scanrecordService').default + scanrecordService.getScanRecords(this.orderInfo.orderNo, tab.name).then(res => { + + this.scanRecords[tab.name] = res.length > 0 ? res : []; + this.isFirstScan[tab.name] = res.length > 0 ? false : true; + + const materialId = this.tabs[this.activeTab]?.name; + this.currentRecords = materialId ? this.scanRecords[materialId] || [] : []; + }); + + const materialContentService = require('@/services/materialContentService').default + materialContentService.getMaterialContent(this.orderInfo.orderNo, tab.name).then(res => { + this.verificationData[tab.name] = []; + for (var index = 0; index < res.length; index++) { + var element = res[index]; + const text = element.reference_content.split('@#@'); + this.verificationData[tab.name].push(text); + } + }); + }); + //#endif + } + } catch (e) { + console.error('detail.onload', e) + } + }, + methods: { + formatDisplayDate(dateString) { + if (!dateString) return '' + const date = new Date(dateString) + return `${date.getFullYear()}-${(date.getMonth() + 1).toString().padStart(2, '0')}-${date.getDate().toString().padStart(2, '0')} ${date.getHours().toString().padStart(2, '0')}:${date.getMinutes().toString().padStart(2, '0')}` + }, + + // 鏄剧ず渚ц竟寮圭獥 + showSideActionPopup() { + this.$refs.sideActionPopup.open(); + }, + + // 闅愯棌渚ц竟寮圭獥 + hideSideActionPopup() { + this.$refs.sideActionPopup.close(); + }, + + // 鏌ョ湅鏍囧畾鍐呭 + async viewCalibration() { + this.confirmHiden = false; + const materialId = this.tabs[this.activeTab]?.name; + this.selectedSegments = []; + this.textSegments = []; + const materialContentService = require('@/services/materialContentService').default + const matContent = await materialContentService.getAMaterialContent(this.orderInfo.orderNo, + materialId); + if (matContent.length > 0) { + const contentIndexes = matContent[0].reference_content_index.split("@#@"); + let contentIndex = []; + if (contentIndexes.length > 1) { + for (var index = 0; index < contentIndexes.length - 1; index++) { + if (index === 0) { + let arr1 = JSON.parse(contentIndexes[index]) + let arr2 = JSON.parse(contentIndexes[index + 1]) + contentIndex = arr1.concat(arr2); + } else { + let arr2 = Array.from(contentIndexes[index + 1]) + contentIndex = contentIndex.concat(arr2); + } + } + } else { + contentIndex = JSON.parse(contentIndexes[0]) + } + + this.textSegments = Array.from(matContent[0].original_content); + this.selectedSegments = contentIndex; + + this.$refs.firstScanPopup.open(); + + this.hideSideActionPopup(); + } else { + uni.showToast({ + title: '鏆傛湭鏍囧畾鍐呭', + icon: 'error' + }) + } + }, + + //缂栬緫鐗╂枡 + editMat() { + uni.redirectTo({ + url: `/pages/create/create?orderNo=${this.orderInfo.orderNo}&materials=${encodeURIComponent( + JSON.stringify(this.tabs) + )}&addOrOnlyAdjust=3&customer=${this.orderInfo.customer}` + }) + }, + + //鐗╂枡鎺掑簭璋冩暣 + adjustSeq() { + uni.redirectTo({ + url: `/pages/create/create?orderNo=${this.orderInfo.orderNo}&materials=${encodeURIComponent( + JSON.stringify(this.tabs) + )}&addOrOnlyAdjust=2&customer=${this.orderInfo.customer}` + }) + }, + + // 缁撴潫鍗曟嵁 + async endOrder() { + this.hideSideActionPopup(); + uni.showModal({ + title: "鎻愮ず", + content: "纭畾瑕佺粨鏉熷綋鍓嶅崟鎹悧锛�", + success: async res => { + if (res.confirm) { + + const orderService = require('@/services/orderService').default + await orderService.updateOrderStatus(this.orderInfo.orderNo, 'completed') + + uni.showToast({ + title: "鍗曟嵁宸茬粨鏉�", + icon: "success" + }); + + uni.redirectTo({ + url: '/pages/index/index' + }) + // 杩欓噷鍙互娣诲姞缁撴潫鍗曟嵁鐨勯�昏緫 + } + } + }); + }, + + //鏌ョ湅鎵弿璁板綍 + viewScanRecord(id) { + const materialId = this.tabs[this.activeTab]?.name; + this.currentScanRecord = this.scanRecords[materialId].find(x => x.id == id) + this.$refs.viewScanRecord.open(); + }, + + //棰勮鍥剧墖 + previewImage() { + this.hideSideActionPopup(); + uni.previewImage({ + urls: [this.originalDoc], // 闇�浼犲叆鏁扮粍锛屽嵆浣垮彧鏈変竴寮犲浘 + current: 0 // 褰撳墠鏄剧ず鍥剧墖鐨勭储寮� + }); + }, + + //鏌ョ湅璁㈠崟鍥剧墖 + async viewOrderImg() { + this.hideSideActionPopup(); + //#ifdef APP-PLUS + const orderService = require('@/services/orderService').default + const order = await orderService.getOrderByOrderNo(this.orderInfo.orderNo); + this.originalDoc = order.originalDoc; + //#endif + + //#ifdef H5 + this.originalDoc = '../../static/logo.png' + //#endif + + this.$refs.viewOrderImg.open(); + }, + + // 鍒囨崲Tab + switchTab(index) { + this.activeTab = index; + // 閫夋嫨鍚庤嚜鍔ㄦ姌鍙犱笅鎷夎彍鍗� + if (!this.isCollapsed) { + this.isCollapsed = true; + } + + const materialId = this.tabs[this.activeTab]?.name; + this.currentRecords = materialId ? this.scanRecords[materialId] || [] : []; + }, + + // 澶勭悊鎵爜杈撳叆 + async handleScanInput() { + this.inputDisable = true; + this.confirmHiden = true; + this.focus = false; + this.tempScanInput = this.scanInput; + const currentMaterial = this.tabs[this.activeTab]; + if (!currentMaterial || !this.scanInput) return; + + await this.handleScanResult(this.tempScanInput, currentMaterial.name); + // this.focus = true; + + this.$nextTick(() => { + this.scanInput = ""; // 娓呯┖杈撳叆妗� + }) + + setTimeout(() => { + this.inputDisable = false; + this.focus = true; + }, 1000) + }, + + // 澶勭悊鎵爜缁撴灉 + async handleScanResult(result, materialId) { + try { + this.scanResult = result; + + //#ifdef H5 + this.processFirstScan(result, materialId); + //#endif + + //#ifdef APP-PLUS + if (this.isFirstScan[materialId]) { + // 棣栨鎵弿澶勭悊 + this.processFirstScan(result, materialId); + } else { + // 鍚庣画鎵弿澶勭悊 + await this.processSubsequentScan(result, materialId); + } + //#endif + } catch (e) { + console.error('handleScanResult', e) + } + + }, + + // 澶勭悊棣栨鎵弿 + processFirstScan(result, materialId) { + try { + // 灏嗘枃鏈媶鍒嗕负瀛楃鏁扮粍 + this.textSegments = Array.from(result); + this.selectedSegments = []; + this.selectedText = ""; + + // 鏄剧ず閫夋嫨寮圭獥 + this.$refs.firstScanPopup.open(); + } catch (e) { + console.error('processFirstScan', e); + } + }, + + // 澶勭悊鍚庣画鎵弿 + async processSubsequentScan(result, materialId) { + try { + let isValid = false; + let text = []; + const verificationTexts = this.verificationData[materialId]; + for (var index = 0; index < verificationTexts.length; index++) { + var element = verificationTexts[index]; + isValid = element.every(text => result.includes(text)); + if (isValid) { + text = element; + break; + } + } + + if (isValid) { + // 璁板綍鎵弿缁撴灉 + await this.recordScanResult(result, materialId, isValid, text); + } else { + // 鏃犳晥鏃舵樉绀洪敊璇� + this.$refs.errorPopup.open(); + this.playErrorSound(); + } + } catch (e) { + console.error('processSubsequentScan', e) + } + }, + + // 璁板綍鎵弿缁撴灉 + async recordScanResult(result, materialId, isValid, text = []) { + let scantime = this.formatDisplayDate(new Date().toISOString()) + const record = { + scan_time: scantime, + reference_content: this.verificationData[materialId] ? + this.verificationData[materialId].join(" | ") : "鏃犳爣瀹氫俊鎭�", + is_matched: isValid, + orderNo: this.orderInfo.orderNo, + materialName: materialId, + scan_content: result + }; + let contents = this.getSelectedSegments(); + if (text.length > 0) { + contents = text; + } + //#ifdef APP-PLUS + const scanrecordService = require('@/services/scanrecordService').default + const id = await scanrecordService.saveScanRecord(this.orderInfo.orderNo, this.tabs[this.activeTab] + .name, this + .tempScanInput, contents); + //#endif + + record.id = id; + this.scanRecords[materialId].unshift(record); // 浣跨敤unshift纭繚鍊掑簭 + }, + + // 纭閫夋嫨 + async confirmSelection() { + const materialId = this.tabs[this.activeTab].name; + + // 鏍囪涓洪潪棣栨鎵弿 + this.isFirstScan[materialId] = false; + + const contents = this.getSelectedSegments(); + + if (contents.length === 0) { + uni.showToast({ + title: "鏈�夋嫨闇�瑕佹爣瀹氱殑鏂囧瓧淇℃伅", + icon: "exception" + }); + return; + } + + // 鍏抽棴寮圭獥 + this.$refs.firstScanPopup.close(); + + let texts = [] + for (var index = 0; index < contents.length; index++) { + var element = contents[index]; + texts.push(element.text); + } + + // 淇濆瓨楠岃瘉鏁版嵁 + this.verificationData[materialId].push(texts); + + // 璁板綍鎵弿缁撴灉 + await this.recordScanResult(this.scanResult, materialId, true); + + //#ifdef APP-PLUS + const materialContentService = require('@/services/materialContentService').default + await materialContentService.saveMaterialContent(this.orderInfo.orderNo, this.tabs[this.activeTab] + .name, this + .tempScanInput, contents); + + const orderService = require('@/services/orderService').default + await orderService.updateOrderStatus(this.orderInfo.orderNo, 'processing') + //#endif + }, + + // 鍏抽棴閿欒寮圭獥 + closeErrorPopup() { + this.$refs.errorPopup.close(); + }, + + // 鎾斁閿欒澹伴煶 + playErrorSound() { + const innerAudioContext = uni.createInnerAudioContext(); + innerAudioContext.src = "/static/fail.mp3"; + innerAudioContext.play(); + }, + + // 鏍煎紡鍖栨椂闂� + formatTime(date) { + const h = date + .getHours() + .toString() + .padStart(2, "0"); + const m = date + .getMinutes() + .toString() + .padStart(2, "0"); + const s = date + .getSeconds() + .toString() + .padStart(2, "0"); + return `${h}:${m}:${s}`; + }, + + // 鍒囨崲鎶樺彔鐘舵�� + toggleCollapse() { + this.isCollapsed = !this.isCollapsed; + }, + + // 鑾峰彇鍒嗘鍚庣殑閫変腑鏂囨湰 + getSelectedSegments() { + if (!this.selectedSegments || this.selectedSegments.length === 0) + return []; + + // 瀵归�変腑鐨勭储寮曡繘琛屾帓搴� + const sorted = [...this.selectedSegments].sort((a, b) => a - b); + + const segments = []; + let currentSegment = [sorted[0]]; + + for (let i = 1; i < sorted.length; i++) { + if (sorted[i] === sorted[i - 1] + 1) { + // 杩炵画瀛楃锛屽姞鍏ュ綋鍓嶆 + currentSegment.push(sorted[i]); + } else { + // 涓嶈繛缁紝淇濆瓨褰撳墠娈靛苟寮�濮嬫柊娈� + segments.push(currentSegment); + currentSegment = [sorted[i]]; + } + } + segments.push(currentSegment); + + let content = segments.map(segment => ({ + text: segment.map(index => this.textSegments[index]).join(""), + indexes: segment + })); + + return content; + }, + + // 鏇存柊閫変腑鏂囨湰鏄剧ず + updateSelectedText() { + const segments = this.getSelectedSegments(); + this.selectedText = segments.map(s => s.text).join(" | "); + }, + + // 閫夋嫨鏂囨湰娈� + toggleSegment(index) { + const idx = this.selectedSegments.indexOf(index); + if (idx === -1) { + this.selectedSegments.push(index); + } else { + this.selectedSegments.splice(idx, 1); + } + this.updateSelectedText(); + } + } + }; +</script> + +<style lang="scss"> + /* 娣诲姞渚ц竟寮圭獥鏍峰紡 */ + .side-action-popup { + width: 70vw; + height: 100%; + background-color: #fff; + + .popup-header { + padding: 30rpx; + display: flex; + justify-content: space-between; + align-items: center; + border-bottom: 1rpx solid #eee; + + text { + font-size: 32rpx; + font-weight: bold; + } + } + + .side-action-content { + padding: 30rpx; + + .action-item { + display: flex; + align-items: center; + padding: 30rpx 0; + border-bottom: 1rpx solid #f5f5f5; + + text { + margin-left: 20rpx; + font-size: 30rpx; + } + + &.logout { + color: #f56c6c; + } + } + } + } + + /* 涓婚鍙橀噺 */ + $primary-color: #2979ff; + $primary-gradient: linear-gradient(135deg, #2979ff, #00b0ff); + $success-color: #52c41a; + $error-color: #f5222d; + $text-color: #333; + $text-light: #666; + $text-lighter: #999; + $border-color: rgba(41, 121, 255, 0.1); + $bg-color: #f5f9ff; + $card-bg: #fff; + $shadow-sm: 0 2rpx 8rpx rgba(0, 0, 0, 0.05); + $shadow-md: 0 4rpx 12rpx rgba(0, 0, 0, 0.08); + $shadow-lg: 0 8rpx 24rpx rgba(0, 0, 0, 0.1); + + .order-detail-container { + height: 100vh; + display: flex; + flex-direction: column; + background-color: #f5f7fa; + + .order-header { + padding: 20rpx; + background-color: #fff; + margin-bottom: 20rpx; + box-shadow: 0 2rpx 6rpx rgba(0, 0, 0, 0.05); + + .order-info { + display: flex; + margin-bottom: 10rpx; + font-size: 28rpx; + + .info-label { + color: #666; + width: 150rpx; + } + + .info-value { + color: #333; + font-weight: bold; + } + } + } + + .material-tabs { + background-color: #fff; + padding: 0 20rpx; + border-bottom: 1rpx solid #eee; + position: relative; + + .tabs-scroll { + width: 100%; + white-space: nowrap; + + .tabs-container { + display: inline-flex; + align-items: center; + height: 80rpx; + + .tab-item { + flex-shrink: 0; + display: flex; + align-items: center; + padding: 0 30rpx; + height: 100%; + font-size: 28rpx; + color: #666; + position: relative; + + &.active { + color: #2979ff; + font-weight: bold; + + &::after { + content: ""; + position: absolute; + bottom: 0; + left: 30rpx; + right: 30rpx; + height: 4rpx; + background-color: #2979ff; + } + } + } + + .dropdown-btn { + flex-shrink: 0; + display: flex; + align-items: center; + padding: 0 20rpx; + height: 60rpx; + font-size: 28rpx; + color: #666; + background-color: #f5f7fa; + border-radius: 8rpx; + margin-left: 10rpx; + max-width: 180rpx; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + + &.active { + color: #2979ff; + font-weight: bold; + } + + &:active { + background-color: #e8e8e8; + } + + uni-icons { + margin-left: 10rpx; + flex-shrink: 0; + } + } + } + } + + .dropdown-menu { + position: absolute; + top: 80rpx; + left: 20rpx; + right: 20rpx; + background-color: #fff; + border-radius: 8rpx; + box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1); + z-index: 100; + max-height: 400rpx; + overflow-y: auto; + animation: fadeInDown 0.3s; + + .dropdown-item { + padding: 20rpx 30rpx; + font-size: 28rpx; + color: #666; + border-bottom: 1rpx solid #f5f5f5; + + &.active { + color: #2979ff; + background-color: #f0f7ff; + } + + &:last-child { + border-bottom: none; + } + } + } + } + + @keyframes fadeInDown { + from { + opacity: 0; + transform: translateY(-10rpx); + } + + to { + opacity: 1; + transform: translateY(0); + } + } + + .tab-content { + flex: 1; + display: flex; + flex-direction: column; + padding: 20rpx; + background-color: #fff; + margin: 20rpx; + border-radius: 16rpx; + box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.05); + + .scan-section { + margin-bottom: 30rpx; + padding: 20rpx; + background-color: #fff; + border-radius: 8rpx; + border: 1rpx solid #eee; + + ::v-deep .uni-easyinput__content { + min-height: 100rpx; + + .uni-easyinput__input { + font-size: 36rpx; + text-align: center; + } + } + } + + .scan-records { + flex: 1; + display: flex; + flex-direction: column; + + .section-title { + font-size: 28rpx; + color: #333; + margin-bottom: 20rpx; + display: flex; + align-items: center; + + .record-count { + color: #999; + margin-left: 10rpx; + font-size: 24rpx; + } + } + + .record-list { + flex: 1; + border: 1rpx solid #eee; + border-radius: 8rpx; + // padding: 0 20rpx; + width: calc(100% - 24px); + padding: 12px; + } + + .record-item { + padding: 20rpx; + border-bottom: 1rpx solid #f5f5f5; + position: relative; + + .record-header { + display: flex; + justify-content: space-between; + margin-bottom: 10rpx; + + .record-time { + font-size: 26rpx; + color: #666; + } + + .record-index { + font-size: 26rpx; + color: #2979ff; + font-weight: bold; + } + } + + .record-calibration { + font-size: 26rpx; + color: #333; + margin-bottom: 10rpx; + word-break: break-all; + } + + .record-data { + font-size: 26rpx; + color: #666; + word-break: break-all; + margin-bottom: 10rpx; + } + + .record-status { + position: absolute; + right: 20rpx; + bottom: 20rpx; + font-size: 32rpx; + + &.error { + color: #f5222d; + } + } + } + } + } + + .scan-popup, + .error-popup { + background-color: #fff; + border-radius: 16rpx; + width: 80vw; + max-width: 600rpx; + overflow: hidden; + + .popup-header { + padding: 24rpx; + text-align: center; + font-size: 32rpx; + font-weight: bold; + border-bottom: 1rpx solid #eee; + } + + .popup-content { + padding: 24rpx; + + .scan-textarea { + width: 99%; + height: 400px; + border: 1rpx solid #eee; + border-radius: 8rpx; + padding: 16rpx; + margin-bottom: 20rpx; + font-size: 40rpx; + display: flex; + overflow: hidden; + position: relative; + + .text-line { + display: flex; + flex-wrap: wrap; + gap: 8rpx; + margin-bottom: 10rpx; + + .text-char { + display: inline-flex; + justify-content: center; + align-items: center; + width: 35px; + height: 35px; + cursor: pointer; + transition: all 0.2s ease; + border-radius: 8rpx; + background-color: #f5f5f5; + font-size: 40rpx; + + &.selected { + background: linear-gradient(135deg, #2979ff, #00b0ff); + color: white; + box-shadow: 0 2rpx 8rpx rgba(41, 121, 255, 0.3); + transform: scale(1.1); + } + + &:active { + transform: scale(0.95); + } + } + } + } + + .text-selection { + display: flex; + flex-wrap: wrap; + gap: 10rpx; + + .text-segment { + padding: 8rpx 16rpx; + background-color: #f5f5f5; + border-radius: 8rpx; + font-size: 26rpx; + color: #333; + + &.selected { + background-color: #d0e9ff; + color: #2979ff; + } + } + } + } + + .popup-footer { + padding: 25rpx; + border-top: 1rpx solid rgba(41, 121, 255, 0.1); + background-color: #f8fafc; + + .confirm-btn { + background: linear-gradient(to right, #2979ff, #00b0ff); + color: #fff; + height: 90rpx; + line-height: 90rpx; + border-radius: 45rpx; + font-size: 30rpx; + box-shadow: 0 4rpx 12rpx rgba(41, 121, 255, 0.3); + transition: all 0.3s ease; + + &:active { + transform: translateY(2rpx); + box-shadow: 0 2rpx 6rpx rgba(41, 121, 255, 0.3); + } + } + } + } + } + + .doc-preview { + margin-top: 20rpx; + position: relative; + border: 1rpx dashed #ddd; + padding: 20rpx; + border-radius: 8rpx; + + image { + width: 100%; + height: 300px; + margin-bottom: 20rpx; + } + + .uni-icons { + position: absolute; + right: 10rpx; + top: 10rpx; + background-color: rgba(0, 0, 0, 0.5); + color: #fff; + border-radius: 50%; + padding: 5rpx; + } + } +</style> \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/pages/system/activation.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/pages/system/activation.vue" new file mode 100644 index 0000000..92f4f87 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/pages/system/activation.vue" @@ -0,0 +1,770 @@ +<template> + <view class="activation-container"> + <!-- 璁惧淇℃伅鍗$墖 --> + <view class="info-card"> + <view class="card-title"> + 璁惧淇℃伅 + <text class="debug-badge" v-if="isDebugVersion">璇曠敤鐗堟湰</text> + </view> + <view class="info-item"> + <text class="label">璁惧鍚嶇О锛�</text> + <text class="value">{{ deviceInfo.name }}</text> + </view> + <view class="info-item"> + <text class="label">鎿嶄綔绯荤粺锛�</text> + <text class="value">{{ deviceInfo.os }}</text> + </view> + <view class="info-item"> + <text class="label">CPU鍨嬪彿锛�</text> + <text class="value">{{ deviceInfo.cpu }}</text> + </view> + <view class="info-item"> + <text class="label">璁惧ID锛�</text> + <text class="value">{{ deviceInfo.deviceId }}</text> + </view> + </view> + + <!-- 杩愯鐮侀儴鍒� --> + <view class="code-card" v-if="!isDebugVersion"> + <view class="card-title"> + 璁惧杩愯鐮� + <text class="debug-badge" v-if="isDebugVersion">璇曠敤鐗堟湰</text> + </view> + <view class="code-display"> + <text class="code-text">{{ runningCode || '鐐瑰嚮鐢熸垚杩愯鐮�' }}</text> + </view> + <view class="code-actions"> + <button class="action-btn generate" @click="generateRunningCode" + :disabled="runningCode.length !== 0">鐢熸垚杩愯鐮�</button> + <button class="action-btn copy" @click="copyRunningCode" + :disabled="runningCode.length === 0">澶嶅埗杩愯鐮�</button> + </view> + <view class="code-tip" v-if="isDebugVersion">璇曠敤鐗堟湰鏃犻渶鎻愪氦杩愯鐮佽幏鍙栨縺娲荤爜锛岀郴缁熷凡鑷姩婵�娲�</view> + <view class="code-tip" v-else>璇峰皢杩愯鐮佹彁浜ょ粰绯荤粺绠$悊鍛橈紝鑾峰彇婵�娲荤爜</view> + </view> + + <!-- 婵�娲荤爜杈撳叆閮ㄥ垎 --> + <view class="activation-form"> + <!-- 璇曠敤鐗堟湰淇℃伅 --> + <template v-if="isDebugVersion"> + <view class="card-title">璇曠敤鐗堟湰淇℃伅</view> + <view class="debug-info"> + <text :class="debugTextClass">褰撳墠涓鸿瘯鐢ㄧ増鏈紝{{expStatus ? "宸茶繃鏈�":"宸茶嚜鍔ㄦ縺娲�"}} + </text> + <text></text> + <!-- <text :class="debugTextClass">鏈夋晥鏈熻嚦锛歿{ ActivationConfig.debugExpiryDate }}</text> --> + </view> + </template> + + <!-- 姝e紡鐗堟湰婵�娲荤爜杈撳叆 --> + <template v-else> + <view class="card-title">婵�娲荤郴缁�</view> + <view class="input-group"> + <input class="activation-input" v-model="activationCode" placeholder="璇疯緭鍏ユ縺娲荤爜" + :disabled="isActivated" /> + <button class="action-btn activate" @click="activateSystem" + :disabled="!activationCode || isActivated">{{ isActivated ? '宸叉縺娲�' : '婵�娲�' }}</button> + </view> + </template> + </view> + + <!-- 婵�娲荤姸鎬� --> + <view class="status-card" v-if="isActivated && !isDebugVersion"> + <view class="card-title"> + 婵�娲荤姸鎬� + <text class="debug-badge" v-if="isDebugVersion">璇曠敤鐗堟湰</text> + </view> + <view class="status-info"> + <view class="status-item"> + <text class="label">鐘舵�侊細</text> + <text class="value success">{{ isDebugVersion ? '宸叉縺娲伙紙璇曠敤鐗堟湰锛�' : '宸叉縺娲�' }}</text> + </view> + <!-- <view class="status-item"> + <text class="label">婵�娲绘椂闂达細</text> + <text class="value">{{ activationInfo.activatedDate }}</text> + </view> + <view class="status-item"> + <text class="label">鏈夋晥鏈熻嚦锛�</text> + <text class="value"> + {{ activationInfo.expiryDate }} + <span v-if="isDebugVersion">(鍥哄畾)</span> + </text> + </view> + <view class="status-item"> + <text class="label">鍓╀綑澶╂暟锛�</text> + <text class="value" :class="{'debug-days': isDebugVersion}">{{ activationInfo.daysLeft }}澶�</text> + </view> --> + </view> + </view> + + <!-- 搴曢儴璇存槑 --> + <view class="footer-note"> + <text>濡傞渶甯姪锛岃鑱旂郴绯荤粺绠$悊鍛�</text> + <text class="contact">鑱旂郴鐢佃瘽锛�17377884651</text> + <view class="wechat-link" @click="showWechatQRCode"> + <text>鏌ョ湅寰俊浜岀淮鐮�</text> + </view> + + <!-- <view class="wechat-link" @click="gotoIndex" v-if="!expStatus"> + <text>杩斿洖棣栭〉</text> + </view> --> + </view> + + <!-- 寰俊浜岀淮鐮佸脊绐� --> + <BaseModal v-model="qrCodeVisible" title="寰俊浜岀淮鐮�" :showFooter="false" animationType="scale"> + <view class="qrcode-container"> + <image class="qrcode-image" src="/static/wechat-qrcode.jpg" @click="previewImage" mode="aspectFit"> + </image> + <text class="qrcode-tip">鎵弿涓婃柟浜岀淮鐮佹坊鍔犲鏈嶅井淇�</text> + </view> + </BaseModal> + </view> +</template> + +<script> + import activationService from "@/services/activationService"; + import { + ActivationConfig + } from "@/config/activation"; + import BaseModal from "@/components/BaseModal.vue"; + + export default { + components: { + BaseModal + }, + data() { + return { + // 娣诲姞ActivationConfig鍒癲ata涓� + ActivationConfig, + // 璁惧淇℃伅 + deviceInfo: { + name: "", + os: "", + cpu: "", + deviceId: "" + }, + // 杩愯鐮� + runningCode: "", + // 婵�娲荤爜 + activationCode: "", + // 婵�娲讳俊鎭粠鍏ㄥ眬鑾峰彇 + activationInfo: getApp().globalData.activationStatus || { + activatedDate: "", + expiryDate: "", + daysLeft: 0, + isDebug: false, + isTrial: false + }, + // 璇曠敤鐗堟湰鏍囧織 + isDebugVersion: ActivationConfig.isDebugVersion, + debugTextClass: "debug-text", + daysLeft: 0, + // 寰俊浜岀淮鐮佸脊绐楁帶鍒� + qrCodeVisible: false, + expStatus: false + }; + }, + + computed: { + // 鏄惁宸叉縺娲� + isActivated() { + return this.activationInfo && this.activationInfo.isValid; + } + }, + + created() { + // 鑾峰彇璁惧淇℃伅 + this.getDeviceInfo(); + + // 妫�鏌ユ縺娲荤姸鎬� + // this.checkActivationStatus(); + + // 妫�鏌ユ湰鍦板瓨鍌ㄤ腑鏄惁鏈夎繍琛岀爜 + const savedCode = uni.getStorageSync( + ActivationConfig.storageKeys.runningCode + ); + if (savedCode) { + this.runningCode = savedCode; + } else if (ActivationConfig.isDebugVersion) { + // 璇曠敤鐗堟湰锛氬鏋滄病鏈夎繍琛岀爜锛岃嚜鍔ㄧ敓鎴愪竴涓� + this.generateRunningCode(); + } + // const activationStatus = activationService.checkActivationStatus() + // this.daysLeft = activationStatus.daysLeft; + // if (activationStatus.daysLeft <= 0) { + // this.debugTextClass = 'debug-exp-text'; + // // uni.showModal({ + // // title: '鎻愮ず', + // // content: '璇曠敤鏃堕棿宸插埌锛岃鑱旂郴绠$悊鍛�', + // // showCancel: false + // // }) + // }else{ + // this.debugTextClass = 'debug-text'; + // } + activationService.checkDataCount().then(result => { + this.expStatus = result.expStatus; + if (this.expStatus) { + this.debugTextClass = 'debug-exp-text'; + } + }) + }, + + methods: { + // 鑾峰彇璁惧淇℃伅 + async getDeviceInfo() { + try { + const systemInfo = uni.getSystemInfoSync(); + const platform = systemInfo.platform; + const deviceBrand = systemInfo.brand; + const deviceModel = systemInfo.model; + + // 鍒濆鍖栬澶囦俊鎭� + this.deviceInfo = { + name: `${deviceBrand} ${deviceModel}`, + os: systemInfo.system, + cpu: platform === "android" ? + "ARM澶勭悊鍣�" : platform === "ios" ? + "Apple澶勭悊鍣�" : "Intel澶勭悊鍣�", + deviceId: "鑾峰彇涓�..." // 鍒濆鍊� + }; + + // 鑾峰彇璁惧鍞竴鏍囪瘑 + let deviceId = ""; + + try { + // 灏濊瘯鑾峰彇璁惧鍞竴鏍囪瘑 + if (platform === "android") { + // Android鍙互浣跨敤deviceId + deviceId = systemInfo.deviceId || systemInfo.uuid; + } else if (platform === "ios") { + // iOS鍙互浣跨敤uuid + deviceId = systemInfo.uuid; + } + + // 濡傛灉娌℃湁鑾峰彇鍒帮紝鐢熸垚涓�涓敮涓�鏍囪瘑 + if (!deviceId) { + deviceId = this.generateDeviceUniqueId(); + } + + // 浣跨敤璁惧鍞竴鏍囪瘑浣滀负deviceId鍦板潃鐨勬浛浠� + this.deviceInfo.deviceId = deviceId; + } catch (e) { + console.error("鑾峰彇璁惧鏍囪瘑澶辫触:", e); + this.deviceInfo.deviceId = this.generateDeviceUniqueId(); + } + } catch (error) { + console.error("鑾峰彇璁惧淇℃伅澶辫触:", error); + // 浣跨敤妯℃嫙鏁版嵁浣滀负鍚庡 + this.deviceInfo = { + name: "鏈煡璁惧", + os: "鏈煡绯荤粺", + cpu: "鏈煡澶勭悊鍣�", + deviceId: this.generateDeviceUniqueId() + }; + } + }, + + gotoIndex() { + uni.redirectTo({ + url: '/pages/index/index' + }) + }, + + previewImage() { + uni.previewImage({ + urls: ['/static/wechat-qrcode.jpg'], // 闇�浼犲叆鏁扮粍锛屽嵆浣垮彧鏈変竴寮犲浘 + current: 0 // 褰撳墠鏄剧ず鍥剧墖鐨勭储寮� + }); + }, + + // 鐢熸垚璁惧鍞竴鏍囪瘑绗� + generateDeviceUniqueId() { + // 浣跨敤璁惧淇℃伅鍜屾椂闂存埑鐢熸垚涓�涓敮涓�鏍囪瘑绗� + const timestamp = Date.now().toString(36); + const randomStr = Math.random() + .toString(36) + .substr(2, 8); + return `DEV-${timestamp}-${randomStr}`.toUpperCase(); + }, + + // 妫�鏌ユ縺娲荤姸鎬� + checkActivationStatus() { + // 浣跨敤activationService妫�鏌ユ縺娲荤姸鎬� + const status = activationService.checkActivationStatus(); + this.activationInfo = status; + + // 鏇存柊鍏ㄥ眬鐘舵�� + getApp().globalData.activationStatus = status; + + return status; + }, + + // 鐢熸垚璁惧杩愯鐮� + generateRunningCode() { + try { + // 鏄剧ず鍔犺浇鐘舵�� + uni.showLoading({ + title: "姝e湪鐢熸垚杩愯鐮�..." + }); + + // 浣跨敤activationService鐢熸垚杩愯鐮� + this.runningCode = activationService.generateRunningCode( + this.deviceInfo.deviceId + ); + + // 淇濆瓨杩愯鐮佸埌鏈湴瀛樺偍 + uni.setStorageSync( + ActivationConfig.storageKeys.runningCode, + this.runningCode + ); + + uni.hideLoading(); + } catch (error) { + uni.hideLoading(); + uni.showToast({ + title: "鐢熸垚杩愯鐮佸け璐�", + icon: "none" + }); + console.error("鐢熸垚杩愯鐮佸け璐�:", error); + } + }, + + // 澶嶅埗杩愯鐮佸埌鍓创鏉� + copyRunningCode() { + if (!this.runningCode) { + uni.showToast({ + title: "璇峰厛鐢熸垚杩愯鐮�", + icon: "none" + }); + return; + } + + uni.setClipboardData({ + data: this.runningCode, + success: () => { + uni.showToast({ + title: "杩愯鐮佸凡澶嶅埗", + icon: "success" + }); + } + }); + }, + + // 婵�娲荤郴缁� + activateSystem() { + if (!this.activationCode) { + uni.showToast({ + title: "璇疯緭鍏ユ縺娲荤爜", + icon: "none" + }); + return; + } + + // 鏄剧ず鍔犺浇鐘舵�� + uni.showLoading({ + title: "姝e湪婵�娲�..." + }); + + try { + // 璋冪敤婵�娲绘湇鍔� + const result = activationService.activateWithCode(this.activationCode); + + uni.hideLoading(); + + if (result.success) { + // 婵�娲绘垚鍔� + this.activationInfo = result.activationInfo; + + // 鏇存柊鍏ㄥ眬鐘舵�� + getApp().globalData.activationStatus = result.activationInfo; + + uni.showToast({ + title: "婵�娲绘垚鍔�", + icon: "success" + }); + } else { + // 婵�娲诲け璐� + uni.showToast({ + title: result.message || "婵�娲诲け璐�", + icon: "none" + }); + } + } catch (error) { + uni.hideLoading(); + uni.showToast({ + title: "婵�娲昏繃绋嬪嚭閿�", + icon: "none" + }); + console.error("婵�娲荤郴缁熷け璐�:", error); + } + }, + + // 鏄剧ず寰俊浜岀淮鐮佸脊绐� + showWechatQRCode() { + this.qrCodeVisible = true; + } + } + }; +</script> + +<style lang="scss" scoped> + .activation-container { + padding: 30rpx; + min-height: 100vh; + display: flex; + flex-direction: column; + background-color: var(--bg-color); + background-image: linear-gradient(135deg, + rgba(0, 0, 0, 0.02) 25%, + transparent 25%, + transparent 50%, + rgba(0, 0, 0, 0.02) 50%, + rgba(0, 0, 0, 0.02) 75%, + transparent 75%, + transparent); + background-size: 40rpx 40rpx; + overflow-y: auto; + + // 璇曠敤鐗堟湰淇℃伅鏍峰紡 + .debug-info { + background-color: rgba(41, 121, 255, 0.1); + border-radius: 10rpx; + padding: 20rpx; + margin-bottom: 15rpx; + border-left: 4rpx solid #2979ff; + display: flex; + flex-direction: column; + + .debug-text { + font-size: 28rpx; + color: #2979ff; + margin-bottom: 10rpx; + font-weight: 500; + + &:last-child { + margin-bottom: 0; + } + } + + .debug-exp-text { + font-size: 28rpx; + color: red; + margin-bottom: 10rpx; + font-weight: 500; + + &:last-child { + margin-bottom: 0; + } + } + } + + // 璇曠敤鐗堟湰鏍囪 + .debug-badge { + display: inline-block; + background-color: #2979ff; + color: white; + font-size: 20rpx; + padding: 4rpx 10rpx; + border-radius: 20rpx; + margin-left: 10rpx; + vertical-align: middle; + font-weight: normal; + } + + // 璇曠敤鐗堟湰鍓╀綑澶╂暟鏍峰紡 + .debug-days { + color: #2979ff !important; + font-weight: bold; + } + + .info-card, + .code-card, + .activation-form, + .status-card { + background-color: var(--card-bg); + border-radius: 16rpx; + padding: 25rpx; + margin-bottom: 25rpx; + box-shadow: 0 8rpx 20rpx var(--shadow-color); + position: relative; + overflow: hidden; + + &::before { + content: ""; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 4rpx; + background: linear-gradient(90deg, #2979ff, #5e35b1); + } + } + + .card-title { + font-size: 30rpx; + font-weight: bold; + color: var(--text-color); + margin-bottom: 20rpx; + border-bottom: 1px solid rgba(0, 0, 0, 0.1); + padding-bottom: 15rpx; + position: relative; + + &::after { + content: ""; + position: absolute; + bottom: -1px; + left: 0; + width: 50rpx; + height: 3rpx; + background: linear-gradient(90deg, #2979ff, #5e35b1); + } + } + + .info-item { + display: flex; + margin-bottom: 15rpx; + align-items: center; + + .label { + width: 140rpx; + color: var(--text-color); + opacity: 0.7; + font-size: 26rpx; + } + + .value { + flex: 1; + color: var(--text-color); + font-size: 26rpx; + font-weight: 500; + background-color: rgba(0, 0, 0, 0.03); + padding: 8rpx 15rpx; + border-radius: 6rpx; + border-left: 3rpx solid #2979ff; + } + } + + .code-display { + background: linear-gradient(145deg, + rgba(0, 0, 0, 0.03), + rgba(0, 0, 0, 0.06)); + padding: 20rpx; + border-radius: 10rpx; + margin-bottom: 20rpx; + min-height: 70rpx; + display: flex; + align-items: center; + justify-content: center; + position: relative; + overflow: hidden; + + .code-text { + font-family: "Courier New", monospace; + font-size: 26rpx; + color: var(--text-color); + word-break: break-all; + text-align: center; + } + } + + .code-actions { + display: flex; + justify-content: space-between; + margin-bottom: 15rpx; + + .action-btn { + flex: 1; + margin: 0 8rpx; + font-size: 26rpx; + height: 80rpx; + line-height: 80rpx; + border-radius: 40rpx; + transition: all 0.3s ease; + border: none; + + &.generate { + background: linear-gradient(135deg, #2979ff, #5e35b1); + color: #fff; + box-shadow: 0 4rpx 10rpx rgba(41, 121, 255, 0.3); + + &:active { + transform: translateY(2rpx); + box-shadow: 0 2rpx 5rpx rgba(41, 121, 255, 0.3); + } + } + + &.copy { + background: linear-gradient(135deg, #67c23a, #009688); + color: #fff; + box-shadow: 0 4rpx 10rpx rgba(103, 194, 58, 0.3); + + &:active { + transform: translateY(2rpx); + box-shadow: 0 2rpx 5rpx rgba(103, 194, 58, 0.3); + } + } + + &:first-child { + margin-left: 0; + } + + &:last-child { + margin-right: 0; + } + + &[disabled] { + background: linear-gradient(135deg, #c0c4cc, #909399); + color: #fff; + box-shadow: none; + } + } + } + + .code-tip { + font-size: 22rpx; + color: var(--text-color); + opacity: 0.6; + text-align: center; + margin-top: 12rpx; + font-style: italic; + } + + .activation-form { + .input-group { + display: flex; + align-items: center; + + .activation-input { + flex: 1; + height: 80rpx; + border: 1px solid rgba(0, 0, 0, 0.1); + border-radius: 40rpx; + padding: 0 20rpx; + margin-right: 15rpx; + font-size: 26rpx; + background-color: rgba(0, 0, 0, 0.02); + color: var(--text-color); + transition: all 0.3s ease; + + &:focus { + border-color: #2979ff; + box-shadow: 0 0 0 2rpx rgba(41, 121, 255, 0.1); + } + } + + .action-btn { + width: 150rpx; + height: 80rpx; + line-height: 80rpx; + background: linear-gradient(135deg, #2979ff, #5e35b1); + color: #fff; + font-size: 26rpx; + border-radius: 40rpx; + box-shadow: 0 4rpx 10rpx rgba(41, 121, 255, 0.3); + transition: all 0.3s ease; + border: none; + + &:active { + transform: translateY(2rpx); + box-shadow: 0 2rpx 5rpx rgba(41, 121, 255, 0.3); + } + + &[disabled] { + background: linear-gradient(135deg, #c0c4cc, #909399); + box-shadow: none; + } + } + } + } + + .status-card { + .status-info { + .status-item { + display: flex; + margin-bottom: 15rpx; + align-items: center; + + .label { + width: 160rpx; + color: var(--text-color); + opacity: 0.7; + font-size: 26rpx; + } + + .value { + flex: 1; + color: var(--text-color); + font-size: 26rpx; + font-weight: 500; + background-color: rgba(0, 0, 0, 0.03); + padding: 8rpx 15rpx; + border-radius: 6rpx; + + &.success { + color: #67c23a; + border-left: 3rpx solid #67c23a; + } + + &.warning { + color: #e6a23c; + border-left: 3rpx solid #e6a23c; + } + } + } + } + } + + .footer-note { + text-align: center; + font-size: 22rpx; + color: var(--text-color); + opacity: 0.6; + margin-top: 30rpx; + margin-bottom: 20rpx; + + .contact { + display: inline-block; + margin-left: 10rpx; + color: #2979ff; + font-weight: 500; + text-decoration: underline; + } + + .wechat-link { + margin-top: 15rpx; + color: #2979ff; + font-size: 24rpx; + font-weight: 500; + text-decoration: underline; + cursor: pointer; + + &:active { + opacity: 0.8; + } + } + } + + // 浜岀淮鐮佸脊绐楁牱寮� + .qrcode-container { + display: flex; + flex-direction: column; + align-items: center; + padding: 20rpx; + + .qrcode-image { + width: 400rpx; + height: 400rpx; + margin-bottom: 20rpx; + border-radius: 10rpx; + box-shadow: 0 4rpx 10rpx rgba(0, 0, 0, 0.1); + } + + .qrcode-tip { + font-size: 26rpx; + color: var(--text-color); + opacity: 0.8; + text-align: center; + } + } + } +</style> \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/pages/test.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/pages/test.vue" new file mode 100644 index 0000000..1a3250a --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/pages/test.vue" @@ -0,0 +1,968 @@ +<template> + <view class="order-detail-container"> + <!-- 椤堕儴璁㈠崟淇℃伅 --> + <view class="order-header"> + <view class="order-info"> + <text class="info-label">璁㈠崟缂栧彿锛�</text> + <text class="info-value">{{orderInfo.orderNo}}</text> + </view> + <view class="order-info"> + <text class="info-label">鍒涘缓鏃堕棿锛�</text> + <text class="info-value">{{formatDisplayDate(orderInfo.createTime)}}</text> + </view> + </view> + + <!-- 鐗╂枡Tabs --> + <view class="material-tabs"> + <scroll-view scroll-x class="tabs-scroll"> + <view class="tabs-container"> + <!-- 鍙樉绀哄墠3涓猅ab --> + <view v-for="(tab, index) in tabs.slice(0, 3)" :key="index" class="tab-item" + :class="{'active': activeTab === index}" @click="switchTab(index)"> + <text>{{tab.name}}</text> + </view> + + <!-- 涓嬫媺鎸夐挳 --> + <view class="dropdown-btn" :class="{'active': activeTab >= 3}" v-if="tabs.length > 3" + @click="toggleCollapse"> + <text>{{activeTab >= 3 ? tabs[activeTab].name : '鏇村'}}</text> + <uni-icons :type="isCollapsed ? 'arrowdown' : 'arrowup'" size="16"></uni-icons> + </view> + </view> + </scroll-view> + + <!-- 涓嬫媺鑿滃崟 --> + <view class="dropdown-menu" v-if="!isCollapsed && tabs.length > 3"> + <view v-for="(tab, index) in tabs.slice(3)" :key="index + 3" class="dropdown-item" + :class="{'active': activeTab === index + 3}" @click="switchTab(index + 3)"> + <text>{{tab.name}}</text> + </view> + </view> + </view> + + <!-- Tab鍐呭鍖� --> + <view class="tab-content"> + <!-- 鎵爜杈撳叆妗� --> + <view class="scan-section"> + <uni-easyinput v-model="scanInput" placeholder="璇锋壂鎻忎簩缁寸爜" @confirm="handleScanInput" :focus="focus" + clearable></uni-easyinput> + </view> + + <!-- 鎵弿璁板綍 --> + <view class="scan-records"> + <view class="section-title"> + <text>鎵弿璁板綍</text> + <text class="record-count">({{currentRecords.length}})</text> + </view> + + <scroll-view scroll-y class="record-list"> + <view v-for="(record, index) in currentRecords" :key="index" class="record-item"> + <view class="record-header"> + <text class="record-time">鎵弿鏃堕棿: {{ formatDisplayDate(record.scan_time)}}</text> + <text class="record-index">搴忓彿: {{currentRecords.length - index}}</text> + </view> + <view class="record-calibration">鏍囧畾淇℃伅: {{record.reference_content}}</view> + <view class="record-status" :class="{'error': !record.is_matched}"> + {{record.is_matched ? '鉁�' : '鉁�'}} + </view> + </view> + </scroll-view> + </view> + </view> + + <!-- 棣栨鎵弿寮圭獥 --> + <uni-popup ref="firstScanPopup" type="dialog"> + <view class="scan-popup"> + <view class="popup-header"> + <text>{{confirmHiden?'璇烽�夋嫨鏍稿鏍囧噯':'璇锋煡鐪嬫牳瀵规爣鍑�'}}</text> + </view> + <view class="popup-content"> + <view class="scan-textarea"> + <view class="text-line"> + <view v-for="(char, index) in formattedText" :key="index" class="text-char" + :class="{'selected': selectedSegments.includes(index)}" + @click="confirmHiden?toggleSegment(index):()=>{}"> + {{char}} + </view> + </view> + </view> + <view class="selection-info"> + <text>宸查�夋嫨:</text> + <block v-if="getSelectedSegments().length > 0"> + <text v-for="(segment, idx) in getSelectedSegments()" :key="idx"> + {{segment.text}} + <text v-if="idx < getSelectedSegments().length - 1">|</text> + </text> + </block> + <text v-else>鏃�</text> + </view> + </view> + <view class="popup-footer"> + <button class="confirm-btn" v-show="confirmHiden" @click="confirmSelection">纭</button> + </view> + </view> + </uni-popup> + + <!-- 閿欒鎻愮ず寮圭獥 --> + <uni-popup ref="errorPopup" type="dialog"> + <view class="error-popup"> + <view class="popup-header"> + <text>鎵弿閿欒</text> + </view> + <view class="popup-content"> + <text>褰撳墠鎵弿缁撴灉涓嶇鍚堟牳瀵规爣鍑�</text> + </view> + <view class="popup-footer"> + <button class="confirm-btn" @click="closeErrorPopup">纭畾</button> + </view> + </view> + </uni-popup> + + <!-- 鍦╰emplate涓坊鍔犱晶杈瑰脊绐� --> + <uni-popup ref="sideActionPopup" type="right"> + <view class="side-action-popup"> + <view class="popup-header"> + <text>璁㈠崟鎿嶄綔</text> + <uni-icons type="close" size="24" @click="hideSideActionPopup"></uni-icons> + </view> + + <view class="side-action-content"> + <view class="action-item" @click="viewCalibration"> + <uni-icons type="eye" size="24" color="#2979ff"></uni-icons> + <text>鏌ョ湅褰撳墠鏍囧畾鍐呭</text> + </view> + + <!-- <view class="action-item" @click=""> + <uni-icons type="settings-filled" size="24" color="#2979ff"></uni-icons> + <text>灞忚斀杞欢鐩�</text> + </view> --> + + <view class="action-item logout" @click="endOrder"> + <uni-icons type="poweroff" size="24" color="#f56c6c"></uni-icons> + <text>缁撴潫鍗曟嵁</text> + </view> + </view> + </view> + </uni-popup> + </view> +</template> + +<script> + export default { + data() { + return { + orderInfo: { + orderNo: "", + createTime: "" + }, + tabs: [], // 鐗╂枡Tabs + activeTab: 0, + scanRecords: {}, // 鍚勭墿鏂欑殑鎵弿璁板綍 {鐗╂枡ID: [璁板綍鏁扮粍]} + verificationData: {}, // 鍚勭墿鏂欑殑楠岃瘉鏁版嵁 {鐗╂枡ID: [楠岃瘉鏂囨湰鏁扮粍]} + scanResult: "", // 褰撳墠鎵弿缁撴灉 + scanInput: "", // 鎵爜杈撳叆 + textSegments: [], // 鏂囨湰鍒嗘 + selectedSegments: [], // 閫変腑鐨勬枃鏈 + isFirstScan: {}, // 璁板綍鍚勭墿鏂欐槸鍚︽槸棣栨鎵弿 + isCollapsed: true, // 鏄惁鎶樺彔澶氫綑Tabs + selectedText: "", // 閫変腑鐨勬枃鏈唴瀹� + tempScanInput: '', + currentRecords: [], + focus: true, + confirmHiden: true + }; + }, + // 娣诲姞瀵艰埅鏍忔寜閽偣鍑诲鐞� + onNavigationBarButtonTap() { + this.$refs.sideActionPopup.open(); + }, + computed: { + // 鏍煎紡鍖栨枃鏈负琛屽拰鍗曡瘝鐨勪簩缁存暟缁� + formattedText() { + // 鐩存帴杩斿洖瀛楃鏁扮粍 + return this.textSegments || []; + } + }, + onLoad(options) { + try { + // 鎺ユ敹璁㈠崟淇℃伅 + if (options.orderNo && options.createTime) { + this.orderInfo = { + orderNo: options.orderNo, + createTime: options.createTime + }; + } + + // 鎺ユ敹鐗╂枡鍒楄〃 + if (options.materials) { + const materials = JSON.parse(decodeURIComponent(options.materials)); + this.tabs = materials.map(m => ({ + id: m.id, + name: m.name + })); + //#ifdef APP-PLUS + // 鍒濆鍖栨壂鎻忕姸鎬� + this.tabs.forEach(tab => { + const scanrecordService = require('@/services/scanrecordService').default + scanrecordService.getScanRecords(this.orderInfo.orderNo, tab.name).then(res => { + + this.scanRecords[tab.name] = res.length > 0 ? res : []; + this.isFirstScan[tab.name] = res.length > 0 ? false : true; + + const materialId = this.tabs[this.activeTab]?.name; + this.currentRecords = materialId ? this.scanRecords[materialId] || [] : []; + }); + + const materialContentService = require('@/services/materialContentService').default + materialContentService.getMaterialContent(this.orderInfo.orderNo, tab.name).then(res => { + this.verificationData[tab.name] = []; + for (var index = 0; index < res.length; index++) { + var element = res[index]; + const text = element.reference_content.split('@#@'); + this.verificationData[tab.name].push(text); + } + }); + }); + //#endif + } + } catch (e) { + console.error('detail.onload', e) + } + + }, + methods: { + formatDisplayDate(dateString) { + if (!dateString) return '' + const date = new Date(dateString) + return `${date.getFullYear()}-${(date.getMonth() + 1).toString().padStart(2, '0')}-${date.getDate().toString().padStart(2, '0')} ${date.getHours().toString().padStart(2, '0')}:${date.getMinutes().toString().padStart(2, '0')}` + }, + + // 鏄剧ず渚ц竟寮圭獥 + showSideActionPopup() { + this.$refs.sideActionPopup.open(); + }, + + // 闅愯棌渚ц竟寮圭獥 + hideSideActionPopup() { + this.$refs.sideActionPopup.close(); + }, + + // 鏌ョ湅鏍囧畾鍐呭 + async viewCalibration() { + this.confirmHiden = false; + const materialId = this.tabs[this.activeTab]?.name; + this.selectedSegments = []; + this.textSegments = []; + const materialContentService = require('@/services/materialContentService').default + const matContent = await materialContentService.getAMaterialContent(this.orderInfo.orderNo, + materialId); + if (matContent.length > 0) { + const contentIndexes = matContent[0].reference_content_index.split("@#@"); + let contentIndex = []; + if (contentIndexes.length > 1) { + for (var index = 0; index < contentIndexes.length - 1; index++) { + if (index === 0) { + let arr1 = JSON.parse(contentIndexes[index]) + let arr2 = JSON.parse(contentIndexes[index + 1]) + contentIndex = arr1.concat(arr2); + } else { + let arr2 = Array.from(contentIndexes[index + 1]) + contentIndex = contentIndex.concat(arr2); + } + } + } else { + contentIndex = JSON.parse(contentIndexes[0]) + } + + this.textSegments = Array.from(matContent[0].original_content); + this.selectedSegments = contentIndex; + + this.$refs.firstScanPopup.open(); + + this.hideSideActionPopup(); + } else { + uni.showToast({ + title: '鏆傛湭鏍囧畾鍐呭', + icon: 'error' + }) + } + }, + + // 缁撴潫鍗曟嵁 + async endOrder() { + this.hideSideActionPopup(); + uni.showModal({ + title: "鎻愮ず", + content: "纭畾瑕佺粨鏉熷綋鍓嶅崟鎹悧锛�", + success: async res => { + if (res.confirm) { + + const orderService = require('@/services/orderService').default + await orderService.updateOrderStatus(this.orderInfo.orderNo, 'completed') + + uni.showToast({ + title: "鍗曟嵁宸茬粨鏉�", + icon: "success" + }); + + uni.redirectTo({ + url: '/pages/index/index' + }) + // 杩欓噷鍙互娣诲姞缁撴潫鍗曟嵁鐨勯�昏緫 + } + } + }); + }, + + // 鍒囨崲Tab + switchTab(index) { + this.activeTab = index; + // 閫夋嫨鍚庤嚜鍔ㄦ姌鍙犱笅鎷夎彍鍗� + if (!this.isCollapsed) { + this.isCollapsed = true; + } + + const materialId = this.tabs[this.activeTab]?.name; + this.currentRecords = materialId ? this.scanRecords[materialId] || [] : []; + }, + + // 澶勭悊鎵爜杈撳叆 + async handleScanInput() { + this.confirmHiden = true; + this.focus = false; + this.tempScanInput = this.scanInput; + const currentMaterial = this.tabs[this.activeTab]; + if (!currentMaterial || !this.scanInput) return; + + + await this.handleScanResult(this.tempScanInput, currentMaterial.name); + this.focus = true; + + this.$nextTick(() => { + this.scanInput = ""; // 娓呯┖杈撳叆妗� + }) + }, + + // 澶勭悊鎵爜缁撴灉 + async handleScanResult(result, materialId) { + try { + this.scanResult = result; + + if (this.isFirstScan[materialId]) { + // 棣栨鎵弿澶勭悊 + this.processFirstScan(result, materialId); + } else { + // 鍚庣画鎵弿澶勭悊 + await this.processSubsequentScan(result, materialId); + } + } catch (e) { + console.error('handleScanResult', e) + } + + }, + + // 澶勭悊棣栨鎵弿 + processFirstScan(result, materialId) { + try { + // 灏嗘枃鏈媶鍒嗕负瀛楃鏁扮粍 + this.textSegments = Array.from(result); + this.selectedSegments = []; + this.selectedText = ""; + + // 鏄剧ず閫夋嫨寮圭獥 + this.$refs.firstScanPopup.open(); + } catch (e) { + console.error('processFirstScan', e); + } + }, + + // 澶勭悊鍚庣画鎵弿 + async processSubsequentScan(result, materialId) { + try { + let isValid = false; + let text = []; + const verificationTexts = this.verificationData[materialId]; + for (var index = 0; index < verificationTexts.length; index++) { + var element = verificationTexts[index]; + isValid = element.every(text => result.includes(text)); + if (isValid) { + text = element; + break; + } + } + + if (isValid) { + // 璁板綍鎵弿缁撴灉 + await this.recordScanResult(result, materialId, isValid, text); + } else { + // 鏃犳晥鏃舵樉绀洪敊璇� + this.$refs.errorPopup.open(); + this.playErrorSound(); + } + } catch (e) { + console.error('processSubsequentScan', e) + } + }, + + // 璁板綍鎵弿缁撴灉 + async recordScanResult(result, materialId, isValid, text = []) { + let scantime = this.formatDisplayDate(new Date().toISOString()) + const record = { + scan_time: scantime, + reference_content: this.verificationData[materialId] ? + this.verificationData[materialId].join(" | ") : "鏃犳爣瀹氫俊鎭�", + is_matched: isValid + }; + let contents = this.getSelectedSegments(); + if (text.length > 0) { + contents = text; + } + //#ifdef APP-PLUS + const scanrecordService = require('@/services/scanrecordService').default + await scanrecordService.saveScanRecord(this.orderInfo.orderNo, this.tabs[this.activeTab] + .name, this + .tempScanInput, contents); + //#endif + + this.scanRecords[materialId].unshift(record); // 浣跨敤unshift纭繚鍊掑簭 + }, + + // 纭閫夋嫨 + async confirmSelection() { + const materialId = this.tabs[this.activeTab].name; + + // 鏍囪涓洪潪棣栨鎵弿 + this.isFirstScan[materialId] = false; + + const contents = this.getSelectedSegments(); + + if(contents.length === 0){ + uni.showToast({ + title: "鏈�夋嫨闇�瑕佹爣瀹氱殑鏂囧瓧淇℃伅", + icon: "exception" + }); + return; + } + + // 鍏抽棴寮圭獥 + this.$refs.firstScanPopup.close(); + + let texts = [] + for (var index = 0; index < contents.length; index++) { + var element = contents[index]; + texts.push(element.text); + } + + // 淇濆瓨楠岃瘉鏁版嵁 + this.verificationData[materialId].push(texts); + + // 璁板綍鎵弿缁撴灉 + await this.recordScanResult(this.scanResult, materialId, true); + + //#ifdef APP-PLUS + const materialContentService = require('@/services/materialContentService').default + await materialContentService.saveMaterialContent(this.orderInfo.orderNo, this.tabs[this.activeTab] + .name, this + .tempScanInput, contents); + + const orderService = require('@/services/orderService').default + await orderService.updateOrderStatus(this.orderInfo.orderNo, 'processing') + //#endif + }, + + // 鍏抽棴閿欒寮圭獥 + closeErrorPopup() { + this.$refs.errorPopup.close(); + }, + + // 鎾斁閿欒澹伴煶 + playErrorSound() { + const innerAudioContext = uni.createInnerAudioContext(); + innerAudioContext.src = "/static/error.mp3"; + innerAudioContext.play(); + }, + + // 鏍煎紡鍖栨椂闂� + formatTime(date) { + const h = date + .getHours() + .toString() + .padStart(2, "0"); + const m = date + .getMinutes() + .toString() + .padStart(2, "0"); + const s = date + .getSeconds() + .toString() + .padStart(2, "0"); + return `${h}:${m}:${s}`; + }, + + // 鍒囨崲鎶樺彔鐘舵�� + toggleCollapse() { + this.isCollapsed = !this.isCollapsed; + }, + + // 鑾峰彇鍒嗘鍚庣殑閫変腑鏂囨湰 + getSelectedSegments() { + if (!this.selectedSegments || this.selectedSegments.length === 0) + return []; + + // 瀵归�変腑鐨勭储寮曡繘琛屾帓搴� + const sorted = [...this.selectedSegments].sort((a, b) => a - b); + + const segments = []; + let currentSegment = [sorted[0]]; + + for (let i = 1; i < sorted.length; i++) { + if (sorted[i] === sorted[i - 1] + 1) { + // 杩炵画瀛楃锛屽姞鍏ュ綋鍓嶆 + currentSegment.push(sorted[i]); + } else { + // 涓嶈繛缁紝淇濆瓨褰撳墠娈靛苟寮�濮嬫柊娈� + segments.push(currentSegment); + currentSegment = [sorted[i]]; + } + } + segments.push(currentSegment); + + let content = segments.map(segment => ({ + text: segment.map(index => this.textSegments[index]).join(""), + indexes: segment + })); + + return content; + }, + + // 鏇存柊閫変腑鏂囨湰鏄剧ず + updateSelectedText() { + const segments = this.getSelectedSegments(); + this.selectedText = segments.map(s => s.text).join(" | "); + }, + + // 閫夋嫨鏂囨湰娈� + toggleSegment(index) { + const idx = this.selectedSegments.indexOf(index); + if (idx === -1) { + this.selectedSegments.push(index); + } else { + this.selectedSegments.splice(idx, 1); + } + this.updateSelectedText(); + } + } + }; +</script> + +<style lang="scss"> + /* 娣诲姞渚ц竟寮圭獥鏍峰紡 */ + .side-action-popup { + width: 70vw; + height: 100%; + background-color: #fff; + + .popup-header { + padding: 30rpx; + display: flex; + justify-content: space-between; + align-items: center; + border-bottom: 1rpx solid #eee; + + text { + font-size: 32rpx; + font-weight: bold; + } + } + + .side-action-content { + padding: 30rpx; + + .action-item { + display: flex; + align-items: center; + padding: 30rpx 0; + border-bottom: 1rpx solid #f5f5f5; + + text { + margin-left: 20rpx; + font-size: 30rpx; + } + + &.logout { + color: #f56c6c; + } + } + } + } + + /* 涓婚鍙橀噺 */ + $primary-color: #2979ff; + $primary-gradient: linear-gradient(135deg, #2979ff, #00b0ff); + $success-color: #52c41a; + $error-color: #f5222d; + $text-color: #333; + $text-light: #666; + $text-lighter: #999; + $border-color: rgba(41, 121, 255, 0.1); + $bg-color: #f5f9ff; + $card-bg: #fff; + $shadow-sm: 0 2rpx 8rpx rgba(0, 0, 0, 0.05); + $shadow-md: 0 4rpx 12rpx rgba(0, 0, 0, 0.08); + $shadow-lg: 0 8rpx 24rpx rgba(0, 0, 0, 0.1); + + .order-detail-container { + height: 100vh; + display: flex; + flex-direction: column; + background-color: #f5f7fa; + + .order-header { + padding: 20rpx; + background-color: #fff; + margin-bottom: 20rpx; + box-shadow: 0 2rpx 6rpx rgba(0, 0, 0, 0.05); + + .order-info { + display: flex; + margin-bottom: 10rpx; + font-size: 28rpx; + + .info-label { + color: #666; + width: 150rpx; + } + + .info-value { + color: #333; + font-weight: bold; + } + } + } + + .material-tabs { + background-color: #fff; + padding: 0 20rpx; + border-bottom: 1rpx solid #eee; + position: relative; + + .tabs-scroll { + width: 100%; + white-space: nowrap; + + .tabs-container { + display: inline-flex; + align-items: center; + height: 80rpx; + + .tab-item { + flex-shrink: 0; + display: flex; + align-items: center; + padding: 0 30rpx; + height: 100%; + font-size: 28rpx; + color: #666; + position: relative; + + &.active { + color: #2979ff; + font-weight: bold; + + &::after { + content: ""; + position: absolute; + bottom: 0; + left: 30rpx; + right: 30rpx; + height: 4rpx; + background-color: #2979ff; + } + } + } + + .dropdown-btn { + flex-shrink: 0; + display: flex; + align-items: center; + padding: 0 20rpx; + height: 60rpx; + font-size: 28rpx; + color: #666; + background-color: #f5f7fa; + border-radius: 8rpx; + margin-left: 10rpx; + max-width: 180rpx; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + + &.active { + color: #2979ff; + font-weight: bold; + } + + &:active { + background-color: #e8e8e8; + } + + uni-icons { + margin-left: 10rpx; + flex-shrink: 0; + } + } + } + } + + .dropdown-menu { + position: absolute; + top: 80rpx; + left: 20rpx; + right: 20rpx; + background-color: #fff; + border-radius: 8rpx; + box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1); + z-index: 100; + max-height: 400rpx; + overflow-y: auto; + animation: fadeInDown 0.3s; + + .dropdown-item { + padding: 20rpx 30rpx; + font-size: 28rpx; + color: #666; + border-bottom: 1rpx solid #f5f5f5; + + &.active { + color: #2979ff; + background-color: #f0f7ff; + } + + &:last-child { + border-bottom: none; + } + } + } + } + + @keyframes fadeInDown { + from { + opacity: 0; + transform: translateY(-10rpx); + } + + to { + opacity: 1; + transform: translateY(0); + } + } + + .tab-content { + flex: 1; + display: flex; + flex-direction: column; + padding: 20rpx; + background-color: #fff; + margin: 20rpx; + border-radius: 16rpx; + box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.05); + + .scan-section { + margin-bottom: 30rpx; + padding: 20rpx; + background-color: #fff; + border-radius: 8rpx; + border: 1rpx solid #eee; + + ::v-deep .uni-easyinput__content { + min-height: 100rpx; + + .uni-easyinput__input { + font-size: 36rpx; + text-align: center; + } + } + } + + .scan-records { + flex: 1; + display: flex; + flex-direction: column; + + .section-title { + font-size: 28rpx; + color: #333; + margin-bottom: 20rpx; + display: flex; + align-items: center; + + .record-count { + color: #999; + margin-left: 10rpx; + font-size: 24rpx; + } + } + + .record-list { + flex: 1; + border: 1rpx solid #eee; + border-radius: 8rpx; + // padding: 0 20rpx; + width: calc(100% - 24px); + padding: 12px; + } + + .record-item { + padding: 20rpx; + border-bottom: 1rpx solid #f5f5f5; + position: relative; + + .record-header { + display: flex; + justify-content: space-between; + margin-bottom: 10rpx; + + .record-time { + font-size: 26rpx; + color: #666; + } + + .record-index { + font-size: 26rpx; + color: #2979ff; + font-weight: bold; + } + } + + .record-calibration { + font-size: 26rpx; + color: #333; + margin-bottom: 10rpx; + word-break: break-all; + } + + .record-data { + font-size: 26rpx; + color: #666; + word-break: break-all; + margin-bottom: 10rpx; + } + + .record-status { + position: absolute; + right: 20rpx; + bottom: 20rpx; + font-size: 32rpx; + + &.error { + color: #f5222d; + } + } + } + } + } + + .scan-popup, + .error-popup { + background-color: #fff; + border-radius: 16rpx; + width: 80vw; + max-width: 600rpx; + overflow: hidden; + + .popup-header { + padding: 24rpx; + text-align: center; + font-size: 32rpx; + font-weight: bold; + border-bottom: 1rpx solid #eee; + } + + .popup-content { + padding: 24rpx; + + .scan-textarea { + width: 100%; + min-height: 200rpx; + border: 1rpx solid #eee; + border-radius: 8rpx; + padding: 16rpx; + margin-bottom: 20rpx; + font-size: 40rpx; + + .text-line { + display: flex; + flex-wrap: wrap; + gap: 8rpx; + margin-bottom: 10rpx; + + .text-char { + display: inline-flex; + justify-content: center; + align-items: center; + width: 50rpx; + height: 50rpx; + cursor: pointer; + transition: all 0.2s ease; + border-radius: 8rpx; + background-color: #f5f5f5; + font-size: 36rpx; + + &.selected { + background: linear-gradient(135deg, #2979ff, #00b0ff); + color: white; + box-shadow: 0 2rpx 8rpx rgba(41, 121, 255, 0.3); + transform: scale(1.1); + } + + &:active { + transform: scale(0.95); + } + } + } + } + + .text-selection { + display: flex; + flex-wrap: wrap; + gap: 10rpx; + + .text-segment { + padding: 8rpx 16rpx; + background-color: #f5f5f5; + border-radius: 8rpx; + font-size: 26rpx; + color: #333; + + &.selected { + background-color: #d0e9ff; + color: #2979ff; + } + } + } + } + + .popup-footer { + padding: 25rpx; + border-top: 1rpx solid rgba(41, 121, 255, 0.1); + background-color: #f8fafc; + + .confirm-btn { + background: linear-gradient(to right, #2979ff, #00b0ff); + color: #fff; + height: 90rpx; + line-height: 90rpx; + border-radius: 45rpx; + font-size: 30rpx; + box-shadow: 0 4rpx 12rpx rgba(41, 121, 255, 0.3); + transition: all 0.3s ease; + + &:active { + transform: translateY(2rpx); + box-shadow: 0 2rpx 6rpx rgba(41, 121, 255, 0.3); + } + } + } + } + } +</style> \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/readme.md" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/readme.md" new file mode 100644 index 0000000..ca798d9 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/readme.md" @@ -0,0 +1,39 @@ +**1.璁㈠崟鍒涘缓涓庤鍗曞彿鐢熸垚** + +鏂板缓璁㈠崟鏃讹紝鐢ㄦ埛鐐瑰嚮鎸夐挳瑙﹀彂绯荤粺鑷姩鐢熸垚鍞竴璁㈠崟鍙凤紙闇�婊¤冻鍞竴鎬т笌鍙鎬ц姹傦紝閫氬父缁撳悎鏃堕棿鎴充笌搴忓垪鍙峰疄鐜帮級銆� + +**2.璁㈠崟鍙蜂笌绾歌川鍗曟嵁缁戝畾** + +鐢熸垚璁㈠崟鍙峰悗锛岄�氳繃鎷嶇収鏂瑰紡灏嗚鍗曞彿涓庣焊璐ㄥ崟鎹繘琛屽叧鑱旂粦瀹氾紝纭繚鐗╃悊鍗曟嵁涓庣郴缁熻鍗曠殑瀵瑰簲鍏崇郴銆� + +**3.鏍稿績鐗╂枡鏁版嵁鎻愬彇** + +浠庢暟鎹簱涓绱㈠凡璁板綍鐨勬牳蹇冪墿鏂欐暟鎹紝浣滀负鍚庣画鎿嶄綔鐨勫熀鍑嗕俊鎭�� + +**4.鏍稿績鐗╂枡杈撳叆涓庝繚瀛�** + +鐢ㄦ埛鍙�夋嫨浠庢暟鎹簱涓凡瀛樺湪鐨勬牳蹇冪墿鏂欐暟鎹紝鎴栨墜鍔ㄨ緭鍏ユ柊寤虹殑鏍稿績鐗╂枡淇℃伅銆傝嫢涓烘墜鍔ㄨ緭鍏ワ紝闇�灏嗚緭鍏ュ唴瀹逛繚瀛樿嚦鏁版嵁搴擄紝纭繚鏁版嵁瀹屾暣鎬с�� + +**5.閫夐」鍗$敓鎴愪笌鎶樺彔閫昏緫** + +鐐瑰嚮纭鍚庯紝绯荤粺鏍规嵁鐢ㄦ埛杈撳叆鎴栭�夋嫨鐨勬牳蹇冪墿鏂欏湪椤甸潰鍔ㄦ�佺敓鎴愬搴旂殑Tab閫夐」鍗°�傝嫢閫夐」鍗℃暟閲忚秴杩�4涓紝瓒呭嚭閮ㄥ垎鑷姩鎶樺彔锛屼繚鎸佺晫闈㈢畝娲佹�с�� +**6.棣栨浜岀淮鐮佹壂鎻忎笌淇℃伅鏍稿** +璁㈠崟棣栨鎵弿鏍稿績鐗╂枡浜岀淮鐮佹椂锛岀郴缁熷皢鎵弿缁撴灉灞曠ず浜庡脊妗嗕腑銆備汉宸ラ渶浠庡脊妗嗘暟鎹腑閫夋嫨闇�鏍稿鐨勮繛缁枃瀛椾俊鎭锛堣嚦灏戦�夋嫨涓�娈碉級锛屼綔涓哄悗缁牳瀵圭殑鏍囧噯銆� +**7.鎵弿淇℃伅灞曠ず** +鎵弿鏃堕渶灏嗘彁鍙栫殑淇℃伅鍦ㄦ壂鎻忛〉闈㈠垪琛ㄤ腑灞曠ず锛屽苟鎸夋壂鎻忔椂闂村�掑簭鎺掑垪銆� +**8.鍚庣画浜岀淮鐮佹壂鎻忎笌閿欒鍒ゅ畾** +鍚庣画鎵弿鏃讹紝绯荤粺鑷姩姣斿褰撳墠鎵弿缁撴灉鏄惁鍖呭惈棣栨閫夋嫨鐨勮繛缁枃瀛椾俊鎭細 + +- 鑻ュ寘鍚紝鍒ゅ畾涓烘壂鎻忔棤閿欒锛� +- 鑻ヤ笉鍖呭惈锛屽脊绐楁彁绀烘壂鎻忛敊璇紝骞惰Е鍙戣闊虫挱鎶ヨ繘琛岃绀� + +**9.浜哄伐鏍″娴佺▼涓�鑷存��** +鑻ュ悗缁渶浜哄伐鏍″锛岄渶涓ユ牸閬靛惊棣栨鎵弿鐨勬祦绋嬶紙灞曠ず寮规銆侀�夋嫨杩炵画鏁版嵁娈碉級锛岀‘淇濇牳瀵硅鍒欑粺涓�銆� +**10.璁㈠崟瀹屾垚涓庣姸鎬佹洿鏂�** +璁㈠崟瀹屾垚鍚庯紝绯荤粺灏嗚鍗曠姸鎬佷慨鏀逛负鈥滃凡瀹屾垚鈥濓紝骞舵敮鎸佽嚜瀹氫箟鏁版嵁淇濆瓨鏃堕棿锛堝璁剧疆淇濈暀鍛ㄦ湡鎴栬嚜鍔ㄥ綊妗h鍒欙級銆� +**11.鏁版嵁杩芥函** +鍦ㄨ缃繚鐣欏懆鏈熷唴锛屽彲鍦ㄥ巻鍙叉暟鎹晫闈㈡悳绱㈡煡璇笂鏂欎俊鎭�� +**12.璇曠敤鏃堕棿** +璁剧疆璇曠敤鏈熻繃鏈熸棩鏈燂紝浠ラ槻姝㈠畨瑁呭寘娉勯湶鍚庤浠栦汉闈炴硶鍏嶈垂浣跨敤銆� +**13.杞欢婵�娲讳娇鐢�** +璇曠敤鏈熼棿鍙皢璁惧纭欢淇℃伅缁戝畾鐢熸垚璁惧杩愯鐮侊紝杩涜�屽熀浜庤杩愯鐮佸湪鍙︿竴绯荤粺涓敓鎴愯澶囨縺娲荤爜锛屾縺娲荤爜鏀寔璁惧畾鏈夋晥鏈熼檺銆� \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/services/activationService.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/services/activationService.js" new file mode 100644 index 0000000..661ca94 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/services/activationService.js" @@ -0,0 +1,236 @@ +import { + query +} from '../common/sqlite' +import { + ActivationConfig +} from '../config/activation' + +// 鏍煎紡鍖栨棩鏈熶负 YYYY-MM-DD +function formatDate(date) { + const year = date.getFullYear() + const month = (date.getMonth() + 1).toString().padStart(2, '0') + const day = date.getDate().toString().padStart(2, '0') + return `${year}-${month}-${day}` +} + +// 璁$畻鍓╀綑澶╂暟 +function calculateDaysLeft(expiryDate) { + const now = new Date() + return Math.ceil((new Date(expiryDate) - now) / (1000 * 60 * 60 * 24)) +} + +export default { + + async checkDataCount() { + try { + if (ActivationConfig.isDebugVersion) { + //#ifdef APP-PLUS + const orderCounts = await query('select count(*) AS orderCount from orders'); + const orderCount = orderCounts[0].orderCount; + + const detailCounts = await query('select count(*) AS detailCount from scan_records'); + const detailCount = detailCounts[0].detailCount; + + if (orderCount > 20 || detailCount > 2000) { + return { + expStatus: true, + message: '璇曠敤鐗堝凡鍒颁娇鐢ㄦ湡锛岃鑱旂郴绠$悊鍛樻縺娲�' + } + } + //#endif + } + // 涓存椂浣跨敤锛屽悗缁啀鏀规縺娲绘娴� + return { + expStatus: false + } + + } catch (e) { + console.log(e); + return { + expStatus: true, + message: e + } + } + }, + + // 浣跨敤婵�娲荤爜婵�娲荤郴缁� + activateWithCode(activationCode) { + // 楠岃瘉婵�娲荤爜鏍煎紡 + if (!activationCode || typeof activationCode !== 'string' || activationCode.length < 10) { + return { + success: false, + message: '婵�娲荤爜鏍煎紡涓嶆纭�' + } + } + + // 鍦ㄥ疄闄呭簲鐢ㄤ腑锛岃繖閲屽簲璇ュ彂閫佽姹傚埌鏈嶅姟鍣ㄩ獙璇佹縺娲荤爜 + // 杩欓噷绠�鍖栧鐞嗭紝鍙鏌ユ縺娲荤爜鍓嶇紑 + if (activationCode.startsWith('SMTPDA-')) { + const now = new Date() + // 鍋囪婵�娲荤爜鏈夋晥鏈熶负1骞� + const expiryDate = new Date() + expiryDate.setFullYear(now.getFullYear() + 1) + + const activationInfo = { + activatedDate: formatDate(now), + expiryDate: formatDate(expiryDate), + daysLeft: calculateDaysLeft(formatDate(expiryDate)), + isTrial: false, + isDebug: false, + isValid: true + } + + // 淇濆瓨鍒版湰鍦板瓨鍌� + uni.setStorageSync(ActivationConfig.storageKeys.activationInfo, JSON.stringify(activationInfo)) + + return { + success: true, + message: '绯荤粺宸叉垚鍔熸縺娲�', + activationInfo + } + } else { + return { + success: false, + message: '鏃犳晥鐨勬縺娲荤爜' + } + } + }, + + // 婵�娲昏皟璇曠増鏈� + activateDebugVersion() { + const now = new Date() + const activationInfo = { + activatedDate: formatDate(now), + expiryDate: ActivationConfig.debugExpiryDate, + daysLeft: calculateDaysLeft(ActivationConfig.debugExpiryDate), + isTrial: false, + isDebug: true + } + + // 淇濆瓨鍒版湰鍦板瓨鍌� + uni.setStorageSync(ActivationConfig.storageKeys.debugActivationInfo, JSON.stringify(activationInfo)) + + return activationInfo + }, + + // 婵�娲昏瘯鐢ㄧ増鏈� + activateTrialVersion() { + const now = new Date() + const expiryDate = new Date() + expiryDate.setDate(now.getDate() + ActivationConfig.trialDays) + + const activationInfo = { + activatedDate: formatDate(now), + expiryDate: formatDate(expiryDate), + daysLeft: ActivationConfig.trialDays, + isTrial: true, + isDebug: false + } + + // 淇濆瓨鍒版湰鍦板瓨鍌� + uni.setStorageSync(ActivationConfig.storageKeys.activationInfo, JSON.stringify(activationInfo)) + + return activationInfo + }, + + // 妫�鏌ユ縺娲荤姸鎬� + checkActivationStatus() { + + // 浠庢湰鍦板瓨鍌ㄨ幏鍙栨縺娲荤姸鎬� + const isActivated = uni.getStorageSync(ActivationConfig.storageKeys.isActivated) + if (isActivated) { + // 濡傛灉宸叉縺娲伙紝鐩存帴杩斿洖婵�娲讳俊鎭� + const activationInfo = uni.getStorageSync(ActivationConfig.storageKeys.activationInfo) + if (activationInfo) { + try { + const info = JSON.parse(activationInfo) + return { + ...info, + daysLeft: calculateDaysLeft(info.expiryDate), + isValid: true + } + } catch (e) { + console.error('婵�娲讳俊鎭В鏋愬け璐�:', e) + } + } + } + + // 妫�鏌ユ槸鍚︿负璋冭瘯鐗堟湰 + const isDebugVersion = ActivationConfig.isDebugVersion + + if (isDebugVersion) { + // 璋冭瘯鐗堟湰閫昏緫 + const debugActivationInfo = uni.getStorageSync(ActivationConfig.storageKeys.debugActivationInfo) + + if (debugActivationInfo) { + try { + const info = JSON.parse(debugActivationInfo) + const now = new Date() + const expiryDate = new Date(info.expiryDate) + + if (expiryDate > now) { + uni.setStorageSync(ActivationConfig.storageKeys.isActivated, true) + // 璋冭瘯鐗堟湰婵�娲绘湁鏁� + return { + ...info, + daysLeft: calculateDaysLeft(info.expiryDate), + isValid: true + } + } else { + return { + success: false, + daysLeft: calculateDaysLeft(info.expiryDate), + message: '璋冭瘯鐗堟湰宸茶繃鏈�' + } + } + } catch (e) { + console.error('璋冭瘯婵�娲讳俊鎭В鏋愬け璐�:', e) + } + } + + // 濡傛灉娌℃湁鏈夋晥鐨勮皟璇曟縺娲讳俊鎭紝閲嶆柊婵�娲� + return this.activateDebugVersion() + } else { + // 闈炶皟璇曠増鏈�昏緫 + const activationInfo = uni.getStorageSync(ActivationConfig.storageKeys.activationInfo) + + if (activationInfo) { + try { + const info = JSON.parse(activationInfo) + const now = new Date() + const expiryDate = new Date(info.expiryDate) + + if (expiryDate > now) { + // 璇曠敤鐗堟湰婵�娲绘湁鏁� + return { + ...info, + daysLeft: calculateDaysLeft(info.expiryDate), + isValid: true + } + } + } catch (e) { + console.error('婵�娲讳俊鎭В鏋愬け璐�:', e) + } + } + + // 濡傛灉娌℃湁鏈夋晥鐨勬縺娲讳俊鎭紝婵�娲昏瘯鐢ㄧ増鏈� + return this.activateTrialVersion() + } + }, + + // 鐢熸垚璁惧杩愯鐮� + generateRunningCode(deviceId) { + // 鑾峰彇褰撳墠鏃堕棿鎴� + const timestamp = Math.floor(Date.now() / 1000) + + // 鐢熸垚闅忔満鏁� + const randomStr = Math.random().toString(36).substr(2, 8).toUpperCase() + + // 鏍煎紡鍖栬澶嘔D锛堝彧淇濈暀瀛楁瘝鏁板瓧锛� + const formattedDeviceId = (deviceId || '').replace(/[^a-zA-Z0-9]/g, '') + + // 鐢熸垚杩愯鐮� + const prefix = ActivationConfig.isDebugVersion ? 'SMTPDA-DEBUG' : 'SMTPDA' + return `${prefix}-${timestamp}-${formattedDeviceId}-${randomStr}` + } +} \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/services/authService.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/services/authService.js" new file mode 100644 index 0000000..89e9109 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/services/authService.js" @@ -0,0 +1,57 @@ +import CryptoJS from 'crypto-js' +import { + query, + executeSql +} from '@/common/sqlite.js' + +export default { + // 楠岃瘉鐢ㄦ埛鐧诲綍 + async login(username, password) { + if (!username || !password) { + throw new Error('璇疯緭鍏ョ敤鎴峰悕鍜屽瘑鐮�') + } + + if (username === 'admin' && password === '<PASSWORD>') { + return { + userInfo: { + username: 'admin', + role: 'admin', + id: 0, + realname: '瓒呯骇绠$悊鍛�' + + }, + token: 'generated_token_' + Date.now(), + expiryDate: new Date(Date.now() + 7 * 24 * 60 * 60 * 1000).getTime() + } + } + + // 瀵嗙爜鍔犲瘑 + const encryptedPassword = CryptoJS.SHA256(password).toString(); + + // 鏌ヨ鐢ㄦ埛 + const user = await query( + 'SELECT * FROM users WHERE username = ? AND password = ?', + [username, encryptedPassword] + ) + + if (!user || user.length === 0) { + throw new Error('鐢ㄦ埛鍚嶆垨瀵嗙爜閿欒') + } + + // 鐢熸垚token鍜岃繃鏈熸椂闂� + const token = 'generated_token_' + Date.now() + const expiresIn = 7 * 24 * 60 * 60 * 1000 // 7澶� + const expiryDate = new Date(Date.now() + expiresIn).getTime() + + return { + userInfo: { + username: user[0].username, + role: user[0].role || 'user', + id: user[0].id, + realname: user[0].real_name + }, + token, + expiryDate + } + } +} \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/services/customerService.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/services/customerService.js" new file mode 100644 index 0000000..e3322b8 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/services/customerService.js" @@ -0,0 +1,17 @@ +import { + insert, query +} from "../common/sqlite" + + +export default { + async addCustomer(name) { + await insert('customers', { + customerName: name + }); + }, + + async getCustomers(){ + const customers = await query('select * from customers'); + return customers; + } +} \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/services/deviceService.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/services/deviceService.js" new file mode 100644 index 0000000..757022a --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/services/deviceService.js" @@ -0,0 +1,80 @@ +import { checkActivation } from './activationService'; + +// 鑾峰彇璁惧淇℃伅 +export const getDeviceInfo = () => { + try { + const device = uni.getDeviceInfo(); + return { + id: device.deviceId || 'unknown', + model: device.model || 'unknown', + brand: device.brand || 'unknown', + system: device.system || 'unknown', + version: device.version || 'unknown' + }; + } catch (error) { + console.error('鑾峰彇璁惧淇℃伅澶辫触:', error); + return { + id: 'error', + model: 'error', + brand: 'error', + system: 'error', + version: 'error' + }; + } +}; + +// 妫�鏌ヨ瘯鐢ㄦ湡鐘舵�� +export const checkTrialStatus = async () => { + try { + // 妫�鏌ユ縺娲荤姸鎬� + const activation = await checkActivation(); + if (activation.isValid) { + return { isTrial: false, isValid: true }; + } + + // 妫�鏌ヨ瘯鐢ㄦ湡 + const trialEndDate = new Date('2023-12-31'); // 搴斾粠绯荤粺璁剧疆鑾峰彇 + const today = new Date(); + const isTrial = today <= trialEndDate; + + return { + isTrial, + isValid: isTrial, + daysLeft: isTrial ? Math.ceil((trialEndDate - today) / (1000 * 60 * 60 * 24)) : 0, + trialEndDate: trialEndDate.toISOString().split('T')[0] + }; + + } catch (error) { + console.error('妫�鏌ヨ瘯鐢ㄦ湡鐘舵�佸け璐�:', error); + return { isTrial: false, isValid: false }; + } +}; + +// 鍏ㄥ眬璇曠敤鏈熸鏌ユ嫤鎴� +export const setupTrialInterceptor = () => { + // 搴旂敤鍚姩鏃舵鏌� + uni.onAppShow(() => { + checkTrialStatus().then(status => { + if (!status.isValid) { + uni.redirectTo({ + url: '/pages/system/activation' + }); + } + }); + }); + + // 璺敱璺宠浆鍓嶆鏌� + uni.addInterceptor('navigateTo', { + invoke(args) { + return checkTrialStatus().then(status => { + if (!status.isValid && !args.url.includes('/system/activation')) { + uni.redirectTo({ + url: '/pages/system/activation' + }); + return false; + } + return true; + }); + } + }); +}; \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/services/exprotService.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/services/exprotService.js" new file mode 100644 index 0000000..64261ff --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/services/exprotService.js" @@ -0,0 +1,20 @@ +import { query } from "../common/sqlite" + + +export default { + async getOrdersData(orderNo){ + const orderData = await query(`SELECT ROW_NUMBER() OVER (ORDER BY material_name) AS rowNum, tempOrders.orderNo, customer, material_name, createTime FROM + (SELECT * FROM orders WHERE orderNo = ?) tempOrders JOIN + (SELECT * FROM order_materials WHERE orderNo = ?) tempMats + ON tempOrders.orderNo = tempMats.orderNo`,[orderNo, orderNo]); + + return orderData; + }, + + async getOrderScanData(orderNo, matName){ + const scanData = await query(`SELECT ROW_NUMBER() OVER (ORDER BY scan_time) AS rowNum, orderNo, materialName, scan_content, reference_content, scan_time FROM + scan_records WHERE orderNo = ? AND materialName = ?`,[orderNo, matName]) + + return scanData; + } +} \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/services/materialContentService.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/services/materialContentService.js" new file mode 100644 index 0000000..02cc609 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/services/materialContentService.js" @@ -0,0 +1,57 @@ +import { + insert, + query +} from "../common/sqlite"; + +export default { + async saveMaterialContent(orderNo, materialName, originalContent, contents) { + const reference = { + reference_content_index: '', + reference_content: '' + } + for (var index = 0; index < contents.length; index++) { + var element = contents[index]; + if (index > 0) { + reference.reference_content += '@#@' + reference.reference_content_index += '@#@' + } + reference.reference_content += element.text; + + reference.reference_content_index += JSON.stringify(element.indexes); + } + + let counts = await query("select count(*) AS count from materials_content where reference_content like '%" + + reference.reference_content + "%' and orderNo = ?", [orderNo]); + if (counts[0].count === 0) { + await insert('materials_content', { + orderNo: orderNo, + material_name: materialName, + reference_content_index: reference.reference_content_index, + original_content: originalContent, + reference_content: reference.reference_content + }) + } + }, + + async getMaterialContent(orderNo, materialName) { + try { + const contents = await query( + 'select reference_content from materials_content where orderNo = ? and material_name = ?', + [orderNo, materialName]); + return contents; + } catch (e) { + console.error('getMaterialContent', e) + } + }, + + async getAMaterialContent(orderNo, materialName) { + try { + const contents = await query( + 'select * from materials_content where orderNo = ? and material_name = ?', + [orderNo, materialName]); + return contents; + } catch (e) { + console.error('getAMaterialContent', e) + } + }, +} \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/services/materialService.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/services/materialService.js" new file mode 100644 index 0000000..ec029c1 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/services/materialService.js" @@ -0,0 +1,31 @@ +import { + insert, + query +} from "../common/sqlite"; + + +export default { + // 鑾峰彇鎵�鏈夌墿鏂� + async getAllMaterials() { + try { + const materials = await query('select * from core_materials'); + return materials; + } catch (e) { + console.error('鐗╂枡鏌ヨ閿欒', e); + } + }, + + // 淇濆瓨鐗╂枡 + async saveMaterial(materialData) { + try { + await insert('core_materials', materialData); + } catch (e) { + console.error('淇濆瓨鐗╂枡閿欒', e); + } + }, + + // 閫氳繃浜岀淮鐮佹煡鎵剧墿鏂� + findMaterialByQRCode(qrCode) { + + } +} \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/services/orderMatService.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/services/orderMatService.js" new file mode 100644 index 0000000..c08c140 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/services/orderMatService.js" @@ -0,0 +1,75 @@ +import { + deleteData, + insert, + query, + update +} from "../common/sqlite"; + + +export default { + async saveOrderMaterials(orderNo, materials) { + try { + for (var i = 0; i < materials.length; i++) { + + const result = await query('select * from order_materials where orderNo = ? and material_name = ?', + [orderNo, + materials[i].name + ]); + + if (result.length === 0) { + await insert('order_materials', { + orderNo: orderNo, + material_name: materials[i].name, + tab_order: i + 1 + }); + } + } + } catch (e) { + console.error('璁㈠崟鐗╂枡鍏崇郴娣诲姞閿欒', e); + throw new Error('璁㈠崟鐗╂枡鍏崇郴娣诲姞閿欒' + e) + } + }, + + async updateMatOrder(orderNo, materials) { + try { + for (var i = 0; i < materials.length; i++) { + + const result = await query('select * from order_materials where orderNo = ? and material_name = ?', + [orderNo, + materials[i].name + ]); + + if (result.length === 1) { + await update('order_materials', { + tab_order: i + 1 + }, ' orderNo = ? and material_name = ? ', [orderNo, + materials[i].name + ]); + } + } + } catch (e) { + console.error('璁㈠崟鐗╂枡鎺掑簭淇敼閿欒', e); + throw new Error('璁㈠崟鐗╂枡鎺掑簭淇敼閿欒' + e) + } + }, + + async deleteOrderMat(orderNo, matName) { + try { + await deleteData('order_materials', ' orderNo = ? and material_name = ? ', [orderNo, matName]) + } catch (e) { + console.error('璁㈠崟鐗╂枡鍒犻櫎閿欒', e); + throw new Error('璁㈠崟鐗╂枡鍒犻櫎閿欒' + e) + } + }, + + async getMaterials(orderNo) { + try { + const materials = await query('select * from order_materials where orderNo = ? order by tab_order', [ + orderNo + ]); + return materials; + } catch (e) { + console.error('鐗╂枡鏌ヨ閿欒', e) + } + } +} \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/services/orderService.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/services/orderService.js" new file mode 100644 index 0000000..4c50264 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/services/orderService.js" @@ -0,0 +1,213 @@ +import db, { + query, + executeSql, + update +} from '@/common/sqlite' // 瀵煎叆宸查厤缃殑鏁版嵁搴撹繛鎺� +import { + formatDate +} from '@/common/utils' // 瀵煎叆宸ュ叿鍑芥暟 + +import { + config +} from '@/config/config' + +import orderMatService from './orderMatService' + +export default { + /** + * 鑾峰彇妯℃嫙璁㈠崟鏁版嵁 + * @param {number} count 鐢熸垚鐨勬暟閲� + * @returns {Array} 妯℃嫙璁㈠崟鍒楄〃 + */ + getMockOrders(count = 10) { + const statuses = ['pending', 'processing', 'completed', 'cancelled'] + const statusTexts = { + pending: '寰呭鐞�', + processing: '澶勭悊涓�', + completed: '宸插畬鎴�', + cancelled: '宸插彇娑�' + } + const materials = ['閽㈡潗', '閾濇潗', '閾滄潗', '濉戞枡', '鏈ㄦ潗'] + + return Array.from({ + length: count + }, (_, i) => { + const status = statuses[i % statuses.length] + return { + id: i + 1, + orderNo: `ORD${10000 + i}`, + status, + statusText: statusTexts[status], + createTime: new Date(Date.now() - i * 3600000).toISOString(), + materials: Array.from({ + length: Math.ceil(Math.random() * 3) + }, (_, j) => ({ + id: j + 1, + name: materials[j % materials.length], + quantity: Math.ceil(Math.random() * 10) + })) + } + }) + }, + + + /** + * 鑾峰彇璁㈠崟鍒楄〃 + * @param {Object} params 鏌ヨ鍙傛暟 + * @param {string} params.status 璁㈠崟鐘舵�� + * @param {string} params.orderNo 璁㈠崟鍙� + * @param {Array} params.createTime 鍒涘缓鏃堕棿鑼冨洿 + * @param {number} params.page 椤电爜 + * @param {number} params.pageSize 姣忛〉鏉℃暟 + * @returns {Promise<Array>} 璁㈠崟鍒楄〃 + */ + async getOrderList( + status, + orderNo, + createTime, + page = 1, + pageSize = 10 + ) { + try { + // 鏋勫缓鏌ヨ鏉′欢鍜屽弬鏁� + let whereClause = '' + let whereArgs = [] + // 鐘舵�佺瓫閫� + if (status && status != 'all') { + whereClause += 'status = ?' + whereArgs.push(status) + } + + // 璁㈠崟鍙锋悳绱� + if (orderNo) { + if (whereClause) whereClause += ' AND ' + whereClause += 'orderNo LIKE ?' + whereArgs.push(`%${orderNo}%`) + } + + // 鏃堕棿鑼冨洿绛涢�� + if (createTime && createTime.length === 2) { + if (whereClause) whereClause += ' AND ' + whereClause += 'createTime BETWEEN ? AND ?' + whereArgs.push(createTime[0], createTime[1]) + } + + // 鎵ц鏌ヨ + const sql = + `SELECT * FROM orders ${whereClause ? 'WHERE ' + whereClause : ''} ORDER BY createTime DESC LIMIT ? OFFSET ? ` + const queryArgs = [...whereArgs, pageSize, (page - 1) * pageSize] + + const res = await query( + sql, queryArgs + ) + + let orders = []; + + for (var index = 0; index < res.length; index++) { + var element = res[index]; + const materials = await orderMatService.getMaterials(element.orderNo); + orders.push({ + orderNo: element.orderNo, + materials + }) + } + + // 鏍煎紡鍖栬繑鍥炴暟鎹� + return res.map(order => ({ + ...order, + materials: orders.find(x => x.orderNo == order.orderNo).materials, + createTime: formatDate(order.createTime) // 鏍煎紡鍖栨棩鏈� + })) + + // return res; + } catch (error) { + console.error('鑾峰彇璁㈠崟鍒楄〃澶辫触:', error) + throw error + } + }, + + /** + * 鍒涘缓鏂拌鍗� + * @param {Object} orderData 璁㈠崟鏁版嵁 + * @param {string} orderData.remark 澶囨敞 + * @param {string} orderData.originalDoc 鍘熷鍗曟嵁 + * @param {Array} orderData.images 鍏朵粬鍥剧墖 + * @returns {Promise<Object>} 鍒涘缓鐨勮鍗� + */ + async createOrder(orderData) { + try { + + let userInfo = uni.getStorageSync(config.storageKeys.userInfo); + if (!userInfo) { + throw new Error('鐢ㄦ埛鏈櫥褰�') + } + + // 鐢熸垚璁㈠崟鍩烘湰淇℃伅 + const orderNo = orderData.orderNo + const createTime = new Date().toISOString() + const status = 'pending' + + // 鎵ц鎻掑叆 + const sql = ` + INSERT INTO orders (orderNo, remark, originalDoc, createTime, status, createUserId, customer) + VALUES (?, ?, ?, ?, ?, ?, ?) + ` + const args = [ + orderData.orderNo, + orderData.remark, + orderData.originalDoc, + createTime, + status, + userInfo.id, + orderData.customer + ] + + const res = await executeSql( + sql, + args + ) + + // 杩斿洖鍒涘缓鐨勮鍗� + return { + id: res.insertId, + orderNo, + ...orderData, + createTime: formatDate(createTime), + status, + statusText: '寰呭鐞�' + } + } catch (error) { + console.error('鍒涘缓璁㈠崟澶辫触:', error) + throw error + } + }, + + async updateOrderStatus(orderNo, status) { + try { + update('orders', { + status: status + }, ' orderNo = ?', [orderNo]); + } catch (e) { + console.error('updateOrderStatus', e) + } + + }, + + async getOrderByOrderNo(orderNo) { + try { + // 鎵ц鏌ヨ + const sql = + `SELECT * FROM orders WHERE orderNo = ?` + const result = await query(sql, [orderNo]); + return result[0]; + } catch (e) { + console.log(e) + } + }, + + async updateOrderCustomer(orderNo, name) { + update('orders', { + customer: name + }, ' orderNo = ?', [orderNo]); + } +} \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/services/scanrecordService.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/services/scanrecordService.js" new file mode 100644 index 0000000..7a7896c --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/services/scanrecordService.js" @@ -0,0 +1,57 @@ +import { + insert, + query +} from "../common/sqlite" + +export default { + async getScanRecord(orderNo, materialName) { + try { + return query('select count(*) AS quantity from scan_records where orderNo = ? and materialName = ?', [ + orderNo, + materialName + ]) + } catch (e) { + console.error('getScanRecord', e) + } + }, + + async getScanRecords(orderNo, materialName) { + try { + return query('select * from scan_records where orderNo = ? and materialName = ? order by scan_time desc', [orderNo, + materialName + ]) + } catch (e) { + console.error('getScanRecord', e) + } + }, + + async saveScanRecord(orderNo, materialName, scanContent, contents) { + try { + let referenceContent = ''; + const createTime = new Date().toISOString() + + if (typeof contents[0] == 'object') { + for (var index = 0; index < contents.length; index++) { + var element = contents[index]; + if (index > 0) { + referenceContent += '@#@' + } + referenceContent += element.text; + } + } else { + referenceContent = contents.join("@#@") + } + + return await insert('scan_records', { + orderNo: orderNo, + materialName: materialName, + scan_content: scanContent, + reference_content: referenceContent, + is_matched: true, + scan_time: createTime + }) + } catch (e) { + console.error('saveScanRecord', e) + } + } +} \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/services/seqService.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/services/seqService.js" new file mode 100644 index 0000000..7debde0 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/services/seqService.js" @@ -0,0 +1,35 @@ +import { + initData +} from "../common/sql"; +import { + executeSql, + query +} from "../common/sqlite" + +export default { + async getOrderSeq() { + const seqs = await query('select * from seq where id = 1'); + if (seqs.length === 0) { + await executeSql(initData.initSeq); + return 1; + } else { + const date = new Date(); + const currentDate = `${date.getFullYear()}-${(date.getMonth() + 1) + .toString() + .padStart(2, "0")}-${date + .getDate() + .toString() + .padStart(2, "0")}` + if (seqs[0].date === currentDate) { + const result = seqs[0].seq + 1; + const sql = 'UPDATE seq set seq = ' + result + `, date = '${currentDate}' where id = 1`; + await executeSql(sql); + return seqs[0].seq; + } else { + const sql = `UPDATE seq set seq = 2, date = '${currentDate}' where id = 1`; + await executeSql(sql); + return 1; + } + } + } +} \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/static/111logo.png" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/static/111logo.png" new file mode 100644 index 0000000..05b3aed --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/static/111logo.png" Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/static/barcode.svg" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/static/barcode.svg" new file mode 100644 index 0000000..c7ee1c7 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/static/barcode.svg" @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M2 4h2v16H2V4zm4 0h1v16H6V4zm2 0h3v16H8V4zm5 0h1v16h-1V4zm3 0h1v16h-1V4zm3 0h1v16h-1V4zm2 0h2v16h-2V4z"/></svg> \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/static/center-selected.png" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/static/center-selected.png" new file mode 100644 index 0000000..2dd1645 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/static/center-selected.png" Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/static/center.png" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/static/center.png" new file mode 100644 index 0000000..a09652e --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/static/center.png" Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/static/fail.mp3" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/static/fail.mp3" new file mode 100644 index 0000000..2fa6557 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/static/fail.mp3" Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/static/favicon.ico" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/static/favicon.ico" new file mode 100644 index 0000000..e0af368 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/static/favicon.ico" Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/static/history.svg" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/static/history.svg" new file mode 100644 index 0000000..3ee367a --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/static/history.svg" @@ -0,0 +1,3 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="white"> + <path d="M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200zm61.8-104.4l-84.9-61.7c-3.1-2.3-4.9-5.9-4.9-9.7V116c0-6.6 5.4-12 12-12h32c6.6 0 12 5.4 12 12v141.7l66.8 48.6c5.4 3.9 6.5 11.4 2.6 16.8L334.6 349c-3.9 5.3-11.4 6.5-16.8 2.6z"/> +</svg> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/static/index-selected.png" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/static/index-selected.png" new file mode 100644 index 0000000..c472a9b --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/static/index-selected.png" Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/static/index.png" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/static/index.png" new file mode 100644 index 0000000..be67af7 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/static/index.png" Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/static/list.svg" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/static/list.svg" new file mode 100644 index 0000000..222961f --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/static/list.svg" @@ -0,0 +1,3 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"> + <path d="M3 13h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm4 4h14v-2H7v2zm0 4h14v-2H7v2zM7 7v2h14V7H7z" /> +</svg> \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/static/logo.png" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/static/logo.png" new file mode 100644 index 0000000..09b151c --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/static/logo.png" Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/static/repeat.mp3" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/static/repeat.mp3" new file mode 100644 index 0000000..afee142 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/static/repeat.mp3" Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/static/scan.svg" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/static/scan.svg" new file mode 100644 index 0000000..9037ad1 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/static/scan.svg" @@ -0,0 +1,3 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"> + <path d="M4 4h4V2H2v6h2V4zm16-2h-6v2h4v4h2V2zM4 20v-4H2v6h6v-2H4zm18 0h-4v2h6v-6h-2v4zM19 8H5v8h14V8z"/> +</svg> \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/static/success.mp3" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/static/success.mp3" new file mode 100644 index 0000000..07e69f5 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/static/success.mp3" Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/static/wechat-qrcode.jpg" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/static/wechat-qrcode.jpg" new file mode 100644 index 0000000..34521c2 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/static/wechat-qrcode.jpg" Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/static/wlogo.png" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/static/wlogo.png" new file mode 100644 index 0000000..69a2cea --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/static/wlogo.png" Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/static/wslogo.png" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/static/wslogo.png" new file mode 100644 index 0000000..66bec7b --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/static/wslogo.png" Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/store/index.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/store/index.js" new file mode 100644 index 0000000..1565afa --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/store/index.js" @@ -0,0 +1,32 @@ +import Vue from 'vue' +import Vuex from 'vuex' + +Vue.use(Vuex) + +const store = new Vuex.Store({ + state: { + theme: 'light' // 榛樿娴呰壊涓婚 + }, + mutations: { + setTheme(state, theme) { + state.theme = theme + // 淇濆瓨鍒版湰鍦板瓨鍌� + uni.setStorageSync('theme', theme) + } + }, + actions: { + initTheme({ commit }) { + // 浠庢湰鍦板瓨鍌ㄨ鍙栦富棰樿缃� + const savedTheme = uni.getStorageSync('theme') + if (savedTheme) { + commit('setTheme', savedTheme) + } + }, + toggleTheme({ commit, state }) { + const newTheme = state.theme === 'light' ? 'dark' : 'light' + commit('setTheme', newTheme) + } + } +}) + +export default store \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/template.h5.html" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/template.h5.html" new file mode 100644 index 0000000..383b1b5 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/template.h5.html" @@ -0,0 +1,24 @@ +<!DOCTYPE html> +<html lang="zh-CN"> + <head> + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <link rel="shortcut icon" type="image/x-icon" href="static/favicon.ico"> + <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> + <title> + <%= htmlWebpackPlugin.options.title %> + </title> + <script> + document.addEventListener('DOMContentLoaded', function() { + document.documentElement.style.fontSize = document.documentElement.clientWidth / 20 + 'px' + }) + </script> + <link rel="stylesheet" href="<%= BASE_URL %>static/index.css" /> + </head> + <body> + <noscript> + <strong>鏈珯鐐瑰繀椤昏寮�鍚疛avaScript鎵嶈兘杩愯</strong> + </noscript> + <div id="app"></div> + </body> +</html> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni.scss" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni.scss" new file mode 100644 index 0000000..4da3de1 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni.scss" @@ -0,0 +1,5 @@ +/** + * 涓嬫柟寮曞叆鐨勪负uView UI鐨勯泦鎴愭牱寮忔枃浠讹紝涓簊css棰勫鐞嗗櫒锛屽叾涓寘鍚簡涓�浜�"u-"寮�澶寸殑鑷畾涔夊彉閲� + * uView鑷畾涔夌殑css绫诲悕鍜宻css鍙橀噺锛屽潎浠�"u-"寮�澶达紝涓嶄細閫犳垚鍐茬獊锛岃鏀惧績浣跨敤 + */ +@import 'uview-ui/theme.scss'; \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-badge/changelog.md" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-badge/changelog.md" new file mode 100644 index 0000000..56581c4 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-badge/changelog.md" @@ -0,0 +1,31 @@ +## 1.2.1锛�2022-09-05锛� +- 淇 褰� text 瓒呰繃 max-num 鏃讹紝badge 鐨勫搴﹁绠楁槸鏍规嵁 text 鐨勯暱搴﹁绠楋紝鏇存敼涓� css 璁$畻瀹為檯灞曠ず瀹藉害锛岃瑙�:[https://ask.dcloud.net.cn/question/150473](https://ask.dcloud.net.cn/question/150473) +## 1.2.0锛�2021-11-19锛� +- 浼樺寲 缁勪欢UI锛屽苟鎻愪緵璁捐璧勬簮锛岃瑙�:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 鏂囨。杩佺Щ锛岃瑙�:[https://uniapp.dcloud.io/component/uniui/uni-badge](https://uniapp.dcloud.io/component/uniui/uni-badge) +## 1.1.7锛�2021-11-08锛� +- 浼樺寲 鍗囩骇ui +- 淇敼 size 灞炴�ч粯璁ゅ�艰皟鏁翠负 small +- 淇敼 type 灞炴�э紝榛樿鍊艰皟鏁翠负 error锛宨nfo 鏇挎崲 default +## 1.1.6锛�2021-09-22锛� +- 淇 鍦ㄥ瓧鑺傚皬绋嬪簭涓婃牱寮忎笉鐢熸晥鐨� bug +## 1.1.5锛�2021-07-30锛� +- 缁勪欢鍏煎 vue3锛屽浣曞垱寤簐ue3椤圭洰锛岃瑙� [uni-app 椤圭洰鏀寔 vue3 浠嬬粛](https://ask.dcloud.net.cn/article/37834) +## 1.1.4锛�2021-07-29锛� +- 淇 鍘绘帀 nvue 涓嶆敮鎸乧ss 鐨� align-self 灞炴�э紝nvue 涓嬩笉鏆傛敮鎸� absolute 灞炴�� +## 1.1.3锛�2021-06-24锛� +- 浼樺寲 绀轰緥椤圭洰 +## 1.1.1锛�2021-05-12锛� +- 鏂板 缁勪欢绀轰緥鍦板潃 +## 1.1.0锛�2021-05-12锛� +- 鏂板 uni-badge 鐨� absolute 灞炴�э紝鏀寔瀹氫綅 +- 鏂板 uni-badge 鐨� offset 灞炴�э紝鏀寔瀹氫綅鍋忕Щ +- 鏂板 uni-badge 鐨� is-dot 灞炴�э紝鏀寔浠呮樉绀烘湁涓�涓皬鐐� +- 鏂板 uni-badge 鐨� max-num 灞炴�э紝鏀寔鑷畾涔夊皝椤剁殑鏁板瓧鍊硷紝瓒呰繃 99 鏄剧ず99+ +- 浼樺寲 uni-badge 灞炴�� custom-style锛� 鏀寔浠ュ璞″舰寮忚嚜瀹氫箟鏍峰紡 +## 1.0.7锛�2021-05-07锛� +- 淇 uni-badge 鍦� App 绔紝鏁板瓧灏忎簬10鏃朵笉鏄渾褰㈢殑bug +- 淇 uni-badge 鍦ㄧ埗鍏冪礌涓嶆槸 flex 甯冨眬鏃讹紝瀹藉害缂╁皬鐨刡ug +- 鏂板 uni-badge 灞炴�� custom-style锛� 鏀寔鑷畾涔夋牱寮� +## 1.0.6锛�2021-02-04锛� +- 璋冩暣涓簎ni_modules鐩綍瑙勮寖 diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-badge/components/uni-badge/uni-badge.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-badge/components/uni-badge/uni-badge.vue" new file mode 100644 index 0000000..498bb1c --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-badge/components/uni-badge/uni-badge.vue" @@ -0,0 +1,268 @@ +<template> + <view class="uni-badge--x"> + <slot /> + <text v-if="text" :class="classNames" :style="[positionStyle, customStyle, dotStyle]" + class="uni-badge" @click="onClick()">{{displayValue}}</text> + </view> +</template> + +<script> + /** + * Badge 鏁板瓧瑙掓爣 + * @description 鏁板瓧瑙掓爣涓�鑸拰鍏跺畠鎺т欢锛堝垪琛ㄣ��9瀹牸绛夛級閰嶅悎浣跨敤锛岀敤浜庤繘琛屾暟閲忔彁绀猴紝榛樿涓哄疄蹇冪伆鑹茶儗鏅� + * @tutorial https://ext.dcloud.net.cn/plugin?id=21 + * @property {String} text 瑙掓爣鍐呭 + * @property {String} size = [normal|small] 瑙掓爣鍐呭 + * @property {String} type = [info|primary|success|warning|error] 棰滆壊绫诲瀷 + * @value info 鐏拌壊 + * @value primary 钃濊壊 + * @value success 缁胯壊 + * @value warning 榛勮壊 + * @value error 绾㈣壊 + * @property {String} inverted = [true|false] 鏄惁鏃犻渶鑳屾櫙棰滆壊 + * @property {Number} maxNum 灞曠ず灏侀《鐨勬暟瀛楀�硷紝瓒呰繃 99 鏄剧ず 99+ + * @property {String} absolute = [rightTop|rightBottom|leftBottom|leftTop] 寮�鍚粷瀵瑰畾浣�, 瑙掓爣灏嗗畾浣嶅埌鍏跺寘瑁圭殑鏍囩鐨勫洓瑙掍笂 + * @value rightTop 鍙充笂 + * @value rightBottom 鍙充笅 + * @value leftTop 宸︿笂 + * @value leftBottom 宸︿笅 + * @property {Array[number]} offset 璺濆畾浣嶈涓績鐐圭殑鍋忕Щ閲忥紝鍙湁瀛樺湪 absolute 灞炴�ф椂鏈夋晥锛屼緥濡傦細[-10, -10] 琛ㄧず鍚戝鍋忕Щ 10px锛孾10, 10] 琛ㄧず鍚� absolute 鎸囧畾鐨勫唴鍋忕Щ 10px + * @property {String} isDot = [true|false] 鏄惁鏄剧ず涓轰竴涓皬鐐� + * @event {Function} click 鐐瑰嚮 Badge 瑙﹀彂浜嬩欢 + * @example <uni-badge text="1"></uni-badge> + */ + + export default { + name: 'UniBadge', + emits: ['click'], + props: { + type: { + type: String, + default: 'error' + }, + inverted: { + type: Boolean, + default: false + }, + isDot: { + type: Boolean, + default: false + }, + maxNum: { + type: Number, + default: 99 + }, + absolute: { + type: String, + default: '' + }, + offset: { + type: Array, + default () { + return [0, 0] + } + }, + text: { + type: [String, Number], + default: '' + }, + size: { + type: String, + default: 'small' + }, + customStyle: { + type: Object, + default () { + return {} + } + } + }, + data() { + return {}; + }, + computed: { + width() { + return String(this.text).length * 8 + 12 + }, + classNames() { + const { + inverted, + type, + size, + absolute + } = this + return [ + inverted ? 'uni-badge--' + type + '-inverted' : '', + 'uni-badge--' + type, + 'uni-badge--' + size, + absolute ? 'uni-badge--absolute' : '' + ].join(' ') + }, + positionStyle() { + if (!this.absolute) return {} + let w = this.width / 2, + h = 10 + if (this.isDot) { + w = 5 + h = 5 + } + const x = `${- w + this.offset[0]}px` + const y = `${- h + this.offset[1]}px` + + const whiteList = { + rightTop: { + right: x, + top: y + }, + rightBottom: { + right: x, + bottom: y + }, + leftBottom: { + left: x, + bottom: y + }, + leftTop: { + left: x, + top: y + } + } + const match = whiteList[this.absolute] + return match ? match : whiteList['rightTop'] + }, + dotStyle() { + if (!this.isDot) return {} + return { + width: '10px', + minWidth: '0', + height: '10px', + padding: '0', + borderRadius: '10px' + } + }, + displayValue() { + const { + isDot, + text, + maxNum + } = this + return isDot ? '' : (Number(text) > maxNum ? `${maxNum}+` : text) + } + }, + methods: { + onClick() { + this.$emit('click'); + } + } + }; +</script> + +<style lang="scss" > + $uni-primary: #2979ff !default; + $uni-success: #4cd964 !default; + $uni-warning: #f0ad4e !default; + $uni-error: #dd524d !default; + $uni-info: #909399 !default; + + + $bage-size: 12px; + $bage-small: scale(0.8); + + .uni-badge--x { + /* #ifdef APP-NVUE */ + // align-self: flex-start; + /* #endif */ + /* #ifndef APP-NVUE */ + display: inline-block; + /* #endif */ + position: relative; + } + + .uni-badge--absolute { + position: absolute; + } + + .uni-badge--small { + transform: $bage-small; + transform-origin: center center; + } + + .uni-badge { + /* #ifndef APP-NVUE */ + display: flex; + overflow: hidden; + box-sizing: border-box; + /* #endif */ + justify-content: center; + flex-direction: row; + height: 20px; + min-width: 20px; + padding: 0 4px; + line-height: 18px; + color: #fff; + border-radius: 100px; + background-color: $uni-info; + background-color: transparent; + border: 1px solid #fff; + text-align: center; + font-family: 'Helvetica Neue', Helvetica, sans-serif; + font-feature-settings: "tnum"; + font-size: $bage-size; + /* #ifdef H5 */ + z-index: 999; + cursor: pointer; + /* #endif */ + + &--info { + color: #fff; + background-color: $uni-info; + } + + &--primary { + background-color: $uni-primary; + } + + &--success { + background-color: $uni-success; + } + + &--warning { + background-color: $uni-warning; + } + + &--error { + background-color: $uni-error; + } + + &--inverted { + padding: 0 5px 0 0; + color: $uni-info; + } + + &--info-inverted { + color: $uni-info; + background-color: transparent; + } + + &--primary-inverted { + color: $uni-primary; + background-color: transparent; + } + + &--success-inverted { + color: $uni-success; + background-color: transparent; + } + + &--warning-inverted { + color: $uni-warning; + background-color: transparent; + } + + &--error-inverted { + color: $uni-error; + background-color: transparent; + } + + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-badge/package.json" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-badge/package.json" new file mode 100644 index 0000000..7a34d9c --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-badge/package.json" @@ -0,0 +1,85 @@ +{ + "id": "uni-badge", + "displayName": "uni-badge 鏁板瓧瑙掓爣", + "version": "1.2.1", + "description": "鏁板瓧瑙掓爣锛堝窘绔狅級缁勪欢锛屽湪鍏冪礌鍛ㄥ洿灞曠ず娑堟伅鎻愰啋锛屼竴鑸敤浜庡垪琛ㄣ�佷節瀹牸銆佹寜閽瓑鍦版柟銆�", + "keywords": [ + "", + "badge", + "uni-ui", + "uniui", + "鏁板瓧瑙掓爣", + "寰界珷" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "" + }, + "directories": { + "example": "../../temps/example_temps" + }, +"dcloudext": { + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "鏃�", + "data": "鏃�", + "permissions": "鏃�" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui", + "type": "component-vue" + }, + "uni_modules": { + "dependencies": ["uni-scss"], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "寰俊娴忚鍣�(Android)": "y", + "QQ娴忚鍣�(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "灏忕▼搴�": { + "寰俊": "y", + "闃块噷": "y", + "鐧惧害": "y", + "瀛楄妭璺冲姩": "y", + "QQ": "y" + }, + "蹇簲鐢�": { + "鍗庝负": "y", + "鑱旂洘": "y" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-badge/readme.md" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-badge/readme.md" new file mode 100644 index 0000000..bdf175d --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-badge/readme.md" @@ -0,0 +1,10 @@ +## Badge 鏁板瓧瑙掓爣 +> **缁勪欢鍚嶏細uni-badge** +> 浠g爜鍧楋細 `uBadge` + +鏁板瓧瑙掓爣涓�鑸拰鍏跺畠鎺т欢锛堝垪琛ㄣ��9瀹牸绛夛級閰嶅悎浣跨敤锛岀敤浜庤繘琛屾暟閲忔彁绀猴紝榛樿涓哄疄蹇冪伆鑹茶儗鏅紝 + +### [鏌ョ湅鏂囨。](https://uniapp.dcloud.io/component/uniui/uni-badge) +#### 濡備娇鐢ㄨ繃绋嬩腑鏈変换浣曢棶棰橈紝鎴栬�呮偍瀵箄ni-ui鏈変竴浜涘ソ鐨勫缓璁紝娆㈣繋鍔犲叆 uni-ui 浜ゆ祦缇わ細871950839 + + diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-card/changelog.md" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-card/changelog.md" new file mode 100644 index 0000000..c3cd8c4 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-card/changelog.md" @@ -0,0 +1,26 @@ +## 1.3.1锛�2021-12-20锛� +- 淇 鍦╲ue椤甸潰涓嬬暐缂╁浘鏄剧ず涓嶆甯哥殑bug +## 1.3.0锛�2021-11-19锛� +- 閲嶆瀯鎻掓Ы鐨勭敤娉� 锛宧eader 鏇挎崲涓� title +- 鏂板 actions 鎻掓Ы +- 鏂板 cover 灏侀潰鍥惧睘鎬у拰鎻掓Ы +- 鏂板 padding 鍐呭榛樿鍐呰竟璺濈 +- 鏂板 margin 鍗$墖榛樿澶栬竟璺濈 +- 鏂板 spacing 鍗$墖榛樿鍐呰竟璺� +- 鏂板 shadow 鍗$墖闃村奖灞炴�� +- 鍙栨秷 mode 灞炴�э紝鍙娇鐢ㄧ粍鍚堟彃妲戒唬鏇� +- 鍙栨秷 note 灞炴�� 锛屼娇鐢╝ctions鎻掓Ы浠f浛 +- 浼樺寲 缁勪欢UI锛屽苟鎻愪緵璁捐璧勬簮锛岃瑙�:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 鏂囨。杩佺Щ锛岃瑙�:[https://uniapp.dcloud.io/component/uniui/uni-card](https://uniapp.dcloud.io/component/uniui/uni-card) +## 1.2.1锛�2021-07-30锛� +- 浼樺寲 vue3涓嬩簨浠惰鍛婄殑闂 +## 1.2.0锛�2021-07-13锛� +- 缁勪欢鍏煎 vue3锛屽浣曞垱寤簐ue3椤圭洰璇﹁ [uni-app 椤圭洰鏀寔 vue3 浠嬬粛](https://ask.dcloud.net.cn/article/37834) +## 1.1.8锛�2021-07-01锛� +- 浼樺寲 鍥炬枃鍗$墖鏃犲浘鐗囧姞杞芥椂锛屾彁渚涘崰浣嶅浘鏍� +- 鏂板 header 鎻掓Ы锛岃嚜瀹氫箟鍗$墖澶撮儴锛� 鍥炬枃鍗$墖 mode="style" 鏃讹紝涓嶆敮鎸侊級 +- 淇 thumbnail 涓嶅瓨鍦ㄤ粛鐒跺崰浣嶇殑 bug +## 1.1.7锛�2021-05-12锛� +- 鏂板 缁勪欢绀轰緥鍦板潃 +## 1.1.6锛�2021-02-04锛� +- 璋冩暣涓簎ni_modules鐩綍瑙勮寖 diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-card/components/uni-card/uni-card.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-card/components/uni-card/uni-card.vue" new file mode 100644 index 0000000..38cf594 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-card/components/uni-card/uni-card.vue" @@ -0,0 +1,270 @@ +<template> + <view class="uni-card" :class="{ 'uni-card--full': isFull, 'uni-card--shadow': isShadow,'uni-card--border':border}" + :style="{'margin':isFull?0:margin,'padding':spacing,'box-shadow':isShadow?shadow:''}"> + <!-- 灏侀潰 --> + <slot name="cover"> + <view v-if="cover" class="uni-card__cover"> + <image class="uni-card__cover-image" mode="widthFix" @click="onClick('cover')" :src="cover"></image> + </view> + </slot> + <slot name="title"> + <view v-if="title || extra" class="uni-card__header"> + <!-- 鍗$墖鏍囬 --> + <view class="uni-card__header-box" @click="onClick('title')"> + <view v-if="thumbnail" class="uni-card__header-avatar"> + <image class="uni-card__header-avatar-image" :src="thumbnail" mode="aspectFit" /> + </view> + <view class="uni-card__header-content"> + <text class="uni-card__header-content-title uni-ellipsis">{{ title }}</text> + <text v-if="title&&subTitle" + class="uni-card__header-content-subtitle uni-ellipsis">{{ subTitle }}</text> + </view> + </view> + <view class="uni-card__header-extra" @click="onClick('extra')"> + <text class="uni-card__header-extra-text">{{ extra }}</text> + </view> + </view> + </slot> + <!-- 鍗$墖鍐呭 --> + <view class="uni-card__content" :style="{padding:padding}" @click="onClick('content')"> + <slot></slot> + </view> + <view class="uni-card__actions" @click="onClick('actions')"> + <slot name="actions"></slot> + </view> + </view> +</template> + +<script> + /** + * Card 鍗$墖 + * @description 鍗$墖瑙嗗浘缁勪欢 + * @tutorial https://ext.dcloud.net.cn/plugin?id=22 + * @property {String} title 鏍囬鏂囧瓧 + * @property {String} subTitle 鍓爣棰� + * @property {Number} padding 鍐呭鍐呰竟璺� + * @property {Number} margin 鍗$墖澶栬竟璺� + * @property {Number} spacing 鍗$墖鍐呰竟璺� + * @property {String} extra 鏍囬棰濆淇℃伅 + * @property {String} cover 灏侀潰鍥撅紙鏈湴璺緞闇�瑕佸紩鍏ワ級 + * @property {String} thumbnail 鏍囬宸︿晶缂╃暐鍥� + * @property {Boolean} is-full = [true | false] 鍗$墖鍐呭鏄惁閫氭爮锛屼负 true 鏃跺皢鍘婚櫎padding鍊� + * @property {Boolean} is-shadow = [true | false] 鍗$墖鍐呭鏄惁寮�鍚槾褰� + * @property {String} shadow 鍗$墖闃村奖 + * @property {Boolean} border 鍗$墖杈规 + * @event {Function} click 鐐瑰嚮 Card 瑙﹀彂浜嬩欢 + */ + export default { + name: 'UniCard', + emits: ['click'], + props: { + title: { + type: String, + default: '' + }, + subTitle: { + type: String, + default: '' + }, + padding: { + type: String, + default: '10px' + }, + margin: { + type: String, + default: '15px' + }, + spacing: { + type: String, + default: '0 10px' + }, + extra: { + type: String, + default: '' + }, + cover: { + type: String, + default: '' + }, + thumbnail: { + type: String, + default: '' + }, + isFull: { + // 鍐呭鍖哄煙鏄惁閫氭爮 + type: Boolean, + default: false + }, + isShadow: { + // 鏄惁寮�鍚槾褰� + type: Boolean, + default: true + }, + shadow: { + type: String, + default: '0px 0px 3px 1px rgba(0, 0, 0, 0.08)' + }, + border: { + type: Boolean, + default: true + } + }, + methods: { + onClick(type) { + this.$emit('click', type) + } + } + } +</script> + +<style lang="scss"> + $uni-border-3: #EBEEF5 !default; + $uni-shadow-base:0 0px 6px 1px rgba($color: #a5a5a5, $alpha: 0.2) !default; + $uni-main-color: #3a3a3a !default; + $uni-base-color: #6a6a6a !default; + $uni-secondary-color: #909399 !default; + $uni-spacing-sm: 8px !default; + $uni-border-color:$uni-border-3; + $uni-shadow: $uni-shadow-base; + $uni-card-title: 15px; + $uni-cart-title-color:$uni-main-color; + $uni-card-subtitle: 12px; + $uni-cart-subtitle-color:$uni-secondary-color; + $uni-card-spacing: 10px; + $uni-card-content-color: $uni-base-color; + + .uni-card { + margin: $uni-card-spacing; + padding: 0 $uni-spacing-sm; + border-radius: 4px; + overflow: hidden; + font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, SimSun, sans-serif; + background-color: #fff; + flex: 1; + + .uni-card__cover { + position: relative; + margin-top: $uni-card-spacing; + flex-direction: row; + overflow: hidden; + border-radius: 4px; + .uni-card__cover-image { + flex: 1; + // width: 100%; + /* #ifndef APP-PLUS */ + vertical-align: middle; + /* #endif */ + } + } + + .uni-card__header { + display: flex; + border-bottom: 1px $uni-border-color solid; + flex-direction: row; + align-items: center; + padding: $uni-card-spacing; + overflow: hidden; + + .uni-card__header-box { + /* #ifndef APP-NVUE */ + display: flex; + /* #endif */ + flex: 1; + flex-direction: row; + align-items: center; + overflow: hidden; + } + + .uni-card__header-avatar { + width: 40px; + height: 40px; + overflow: hidden; + border-radius: 5px; + margin-right: $uni-card-spacing; + .uni-card__header-avatar-image { + flex: 1; + width: 40px; + height: 40px; + } + } + + .uni-card__header-content { + /* #ifndef APP-NVUE */ + display: flex; + /* #endif */ + flex-direction: column; + justify-content: center; + flex: 1; + // height: 40px; + overflow: hidden; + + .uni-card__header-content-title { + font-size: $uni-card-title; + color: $uni-cart-title-color; + // line-height: 22px; + } + + .uni-card__header-content-subtitle { + font-size: $uni-card-subtitle; + margin-top: 5px; + color: $uni-cart-subtitle-color; + } + } + + .uni-card__header-extra { + line-height: 12px; + + .uni-card__header-extra-text { + font-size: 12px; + color: $uni-cart-subtitle-color; + } + } + } + + .uni-card__content { + padding: $uni-card-spacing; + font-size: 14px; + color: $uni-card-content-color; + line-height: 22px; + } + + .uni-card__actions { + font-size: 12px; + } + } + + .uni-card--border { + border: 1px solid $uni-border-color; + } + + .uni-card--shadow { + position: relative; + /* #ifndef APP-NVUE */ + box-shadow: $uni-shadow; + /* #endif */ + } + + .uni-card--full { + margin: 0; + border-left-width: 0; + border-left-width: 0; + border-radius: 0; + } + + /* #ifndef APP-NVUE */ + .uni-card--full:after { + border-radius: 0; + } + + /* #endif */ + .uni-ellipsis { + /* #ifndef APP-NVUE */ + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + /* #endif */ + /* #ifdef APP-NVUE */ + lines: 1; + /* #endif */ + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-card/package.json" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-card/package.json" new file mode 100644 index 0000000..f16224d --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-card/package.json" @@ -0,0 +1,90 @@ +{ + "id": "uni-card", + "displayName": "uni-card 鍗$墖", + "version": "1.3.1", + "description": "Card 缁勪欢锛屾彁渚涘父瑙佺殑鍗$墖鏍峰紡銆�", + "keywords": [ + "uni-ui", + "uniui", + "card", + "", + "鍗$墖" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "" + }, + "directories": { + "example": "../../temps/example_temps" + }, + "dcloudext": { + "category": [ + "鍓嶇缁勪欢", + "閫氱敤缁勪欢" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "鏃�", + "data": "鏃�", + "permissions": "鏃�" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" + }, + "uni_modules": { + "dependencies": [ + "uni-icons", + "uni-scss" + ], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "寰俊娴忚鍣�(Android)": "y", + "QQ娴忚鍣�(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "灏忕▼搴�": { + "寰俊": "y", + "闃块噷": "y", + "鐧惧害": "y", + "瀛楄妭璺冲姩": "y", + "QQ": "y" + }, + "蹇簲鐢�": { + "鍗庝负": "u", + "鑱旂洘": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-card/readme.md" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-card/readme.md" new file mode 100644 index 0000000..7434e71 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-card/readme.md" @@ -0,0 +1,12 @@ + + +## Card 鍗$墖 +> **缁勪欢鍚嶏細uni-card** +> 浠g爜鍧楋細 `uCard` + +鍗$墖瑙嗗浘缁勪欢銆� + +### [鏌ョ湅鏂囨。](https://uniapp.dcloud.io/component/uniui/uni-card) +#### 濡備娇鐢ㄨ繃绋嬩腑鏈変换浣曢棶棰橈紝鎴栬�呮偍瀵箄ni-ui鏈変竴浜涘ソ鐨勫缓璁紝娆㈣繋鍔犲叆 uni-ui 浜ゆ祦缇わ細871950839 + + diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-combox/changelog.md" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-combox/changelog.md" new file mode 100644 index 0000000..23c2748 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-combox/changelog.md" @@ -0,0 +1,15 @@ +## 1.0.1锛�2021-11-23锛� +- 浼樺寲 label銆乴abel-width 灞炴�� +## 1.0.0锛�2021-11-19锛� +- 浼樺寲 缁勪欢UI锛屽苟鎻愪緵璁捐璧勬簮锛岃瑙�:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 鏂囨。杩佺Щ锛岃瑙�:[https://uniapp.dcloud.io/component/uniui/uni-combox](https://uniapp.dcloud.io/component/uniui/uni-combox) +## 0.1.0锛�2021-07-30锛� +- 缁勪欢鍏煎 vue3锛屽浣曞垱寤簐ue3椤圭洰锛岃瑙� [uni-app 椤圭洰鏀寔 vue3 浠嬬粛](https://ask.dcloud.net.cn/article/37834) +## 0.0.6锛�2021-05-12锛� +- 鏂板 缁勪欢绀轰緥鍦板潃 +## 0.0.5锛�2021-04-21锛� +- 浼樺寲 娣诲姞渚濊禆 uni-icons, 瀵煎叆鍚庤嚜鍔ㄤ笅杞戒緷璧� +## 0.0.4锛�2021-02-05锛� +- 浼樺寲 缁勪欢寮曠敤鍏崇郴锛岄�氳繃uni_modules寮曠敤缁勪欢 +## 0.0.3锛�2021-02-04锛� +- 璋冩暣涓簎ni_modules鐩綍瑙勮寖 diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-combox/components/uni-combox/uni-combox.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-combox/components/uni-combox/uni-combox.vue" new file mode 100644 index 0000000..d4cb79d --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-combox/components/uni-combox/uni-combox.vue" @@ -0,0 +1,275 @@ +<template> + <view class="uni-combox" :class="border ? '' : 'uni-combox__no-border'"> + <view v-if="label" class="uni-combox__label" :style="labelStyle"> + <text>{{label}}</text> + </view> + <view class="uni-combox__input-box"> + <input class="uni-combox__input" type="text" :placeholder="placeholder" + placeholder-class="uni-combox__input-plac" v-model="inputVal" @input="onInput" @focus="onFocus" +@blur="onBlur" /> + <uni-icons :type="showSelector? 'top' : 'bottom'" size="14" color="#999" @click="toggleSelector"> + </uni-icons> + </view> + <view class="uni-combox__selector" v-if="showSelector"> + <view class="uni-popper__arrow"></view> + <scroll-view scroll-y="true" class="uni-combox__selector-scroll"> + <view class="uni-combox__selector-empty" v-if="filterCandidatesLength === 0"> + <text>{{emptyTips}}</text> + </view> + <view class="uni-combox__selector-item" v-for="(item,index) in filterCandidates" :key="index" + @click="onSelectorClick(index)"> + <text>{{item}}</text> + </view> + </scroll-view> + </view> + </view> +</template> + +<script> + /** + * Combox 缁勫悎杈撳叆妗� + * @description 缁勫悎杈撳叆妗嗕竴鑸敤浜庢棦鍙互杈撳叆涔熷彲浠ラ�夋嫨鐨勫満鏅� + * @tutorial https://ext.dcloud.net.cn/plugin?id=1261 + * @property {String} label 宸︿晶鏂囧瓧 + * @property {String} labelWidth 宸︿晶鍐呭瀹藉害 + * @property {String} placeholder 杈撳叆妗嗗崰浣嶇 + * @property {Array} candidates 鍊欓�夐」鍒楄〃 + * @property {String} emptyTips 绛涢�夌粨鏋滀负绌烘椂鏄剧ず鐨勬枃瀛� + * @property {String} value 缁勫悎妗嗙殑鍊� + */ + export default { + name: 'uniCombox', + emits: ['input', 'update:modelValue'], + props: { + border: { + type: Boolean, + default: true + }, + label: { + type: String, + default: '' + }, + labelWidth: { + type: String, + default: 'auto' + }, + placeholder: { + type: String, + default: '' + }, + candidates: { + type: Array, + default () { + return [] + } + }, + emptyTips: { + type: String, + default: '鏃犲尮閰嶉」' + }, + // #ifndef VUE3 + value: { + type: [String, Number], + default: '' + }, + // #endif + // #ifdef VUE3 + modelValue: { + type: [String, Number], + default: '' + }, + // #endif + }, + data() { + return { + showSelector: false, + inputVal: '' + } + }, + computed: { + labelStyle() { + if (this.labelWidth === 'auto') { + return "" + } + return `width: ${this.labelWidth}` + }, + filterCandidates() { + return this.candidates.filter((item) => { + return item.toString().indexOf(this.inputVal) > -1 + }) + }, + filterCandidatesLength() { + return this.filterCandidates.length + } + }, + watch: { + // #ifndef VUE3 + value: { + handler(newVal) { + this.inputVal = newVal + }, + immediate: true + }, + // #endif + // #ifdef VUE3 + modelValue: { + handler(newVal) { + this.inputVal = newVal + }, + immediate: true + }, + // #endif + }, + methods: { + toggleSelector() { + this.showSelector = !this.showSelector + }, + onFocus() { + this.showSelector = true + }, + onBlur() { + setTimeout(() => { + this.showSelector = false + }, 153) + }, + onSelectorClick(index) { + this.inputVal = this.filterCandidates[index] + this.showSelector = false + this.$emit('input', this.inputVal) + this.$emit('update:modelValue', this.inputVal) + }, + onInput() { + setTimeout(() => { + this.$emit('input', this.inputVal) + this.$emit('update:modelValue', this.inputVal) + }) + } + } + } +</script> + +<style lang="scss" scoped> + .uni-combox { + font-size: 14px; + border: 1px solid #DCDFE6; + border-radius: 4px; + padding: 6px 10px; + position: relative; + /* #ifndef APP-NVUE */ + display: flex; + /* #endif */ + // height: 40px; + flex-direction: row; + align-items: center; + // border-bottom: solid 1px #DDDDDD; + } + + .uni-combox__label { + font-size: 16px; + line-height: 22px; + padding-right: 10px; + color: #999999; + } + + .uni-combox__input-box { + position: relative; + /* #ifndef APP-NVUE */ + display: flex; + /* #endif */ + flex: 1; + flex-direction: row; + align-items: center; + } + + .uni-combox__input { + flex: 1; + font-size: 14px; + height: 22px; + line-height: 22px; + } + + .uni-combox__input-plac { + font-size: 14px; + color: #999; + } + + .uni-combox__selector { + /* #ifndef APP-NVUE */ + box-sizing: border-box; + /* #endif */ + position: absolute; + top: calc(100% + 12px); + left: 0; + width: 100%; + background-color: #FFFFFF; + border: 1px solid #EBEEF5; + border-radius: 6px; + box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); + z-index: 2; + padding: 4px 0; + } + + .uni-combox__selector-scroll { + /* #ifndef APP-NVUE */ + max-height: 200px; + box-sizing: border-box; + /* #endif */ + } + + .uni-combox__selector-empty, + .uni-combox__selector-item { + /* #ifndef APP-NVUE */ + display: flex; + cursor: pointer; + /* #endif */ + line-height: 36px; + font-size: 14px; + text-align: center; + // border-bottom: solid 1px #DDDDDD; + padding: 0px 10px; + } + + .uni-combox__selector-item:hover { + background-color: #f9f9f9; + } + + .uni-combox__selector-empty:last-child, + .uni-combox__selector-item:last-child { + /* #ifndef APP-NVUE */ + border-bottom: none; + /* #endif */ + } + + // picker 寮瑰嚭灞傞�氱敤鐨勬寚绀哄皬涓夎 + .uni-popper__arrow, + .uni-popper__arrow::after { + position: absolute; + display: block; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; + border-width: 6px; + } + + .uni-popper__arrow { + filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.03)); + top: -6px; + left: 10%; + margin-right: 3px; + border-top-width: 0; + border-bottom-color: #EBEEF5; + } + + .uni-popper__arrow::after { + content: " "; + top: 1px; + margin-left: -6px; + border-top-width: 0; + border-bottom-color: #fff; + } + + .uni-combox__no-border { + border: none; + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-combox/package.json" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-combox/package.json" new file mode 100644 index 0000000..4a05c3f --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-combox/package.json" @@ -0,0 +1,90 @@ +{ + "id": "uni-combox", + "displayName": "uni-combox 缁勫悎妗�", + "version": "1.0.1", + "description": "鍙互閫夋嫨涔熷彲浠ヨ緭鍏ョ殑琛ㄥ崟椤� ", + "keywords": [ + "uni-ui", + "uniui", + "combox", + "缁勫悎妗�", + "select" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "" + }, + "directories": { + "example": "../../temps/example_temps" + }, + "dcloudext": { + "category": [ + "鍓嶇缁勪欢", + "閫氱敤缁勪欢" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "鏃�", + "data": "鏃�", + "permissions": "鏃�" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" + }, + "uni_modules": { + "dependencies": [ + "uni-scss", + "uni-icons" + ], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "n" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "寰俊娴忚鍣�(Android)": "y", + "QQ娴忚鍣�(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "灏忕▼搴�": { + "寰俊": "y", + "闃块噷": "y", + "鐧惧害": "y", + "瀛楄妭璺冲姩": "y", + "QQ": "y" + }, + "蹇簲鐢�": { + "鍗庝负": "u", + "鑱旂洘": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-combox/readme.md" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-combox/readme.md" new file mode 100644 index 0000000..ffa2cc8 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-combox/readme.md" @@ -0,0 +1,11 @@ + + +## Combox 缁勫悎妗� +> **缁勪欢鍚嶏細uni-combox** +> 浠g爜鍧楋細 `uCombox` + + +缁勫悎妗嗙粍浠躲�� + +### [鏌ョ湅鏂囨。](https://uniapp.dcloud.io/component/uniui/uni-combox) +#### 濡備娇鐢ㄨ繃绋嬩腑鏈変换浣曢棶棰橈紝鎴栬�呮偍瀵箄ni-ui鏈変竴浜涘ソ鐨勫缓璁紝娆㈣繋鍔犲叆 uni-ui 浜ゆ祦缇わ細871950839 \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-data-checkbox/changelog.md" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-data-checkbox/changelog.md" new file mode 100644 index 0000000..c7a468a --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-data-checkbox/changelog.md" @@ -0,0 +1,45 @@ +## 1.0.3锛�2022-09-16锛� +- 鍙互浣跨敤 uni-scss 鎺у埗涓婚鑹� +## 1.0.2锛�2022-06-30锛� +- 浼樺寲 鍦� uni-forms 涓殑渚濊禆娉ㄥ叆鏂瑰紡 +## 1.0.1锛�2022-02-07锛� +- 淇 multiple 涓� true 鏃讹紝v-model 鐨勫�间负 null 鎶ラ敊鐨� bug +## 1.0.0锛�2021-11-19锛� +- 浼樺寲 缁勪欢UI锛屽苟鎻愪緵璁捐璧勬簮锛岃瑙�:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 鏂囨。杩佺Щ锛岃瑙�:[https://uniapp.dcloud.io/component/uniui/uni-data-checkbox](https://uniapp.dcloud.io/component/uniui/uni-data-checkbox) +## 0.2.5锛�2021-08-23锛� +- 淇 鍦╱ni-forms涓� modelValue 涓笉瀛樺湪褰撳墠瀛楁锛屽綋鍓嶅瓧娈靛繀濉啓涔熶笉鍙備笌鏍¢獙鐨勯棶棰� +## 0.2.4锛�2021-08-17锛� +- 淇 鍗曢�� list 妯″紡涓� 锛宨con 涓� left 鏃讹紝閫変腑鍥炬爣涓嶆樉绀虹殑闂 +## 0.2.3锛�2021-08-11锛� +- 淇 鍦� uni-forms 涓噸缃〃鍗曪紝閿欒淇℃伅鏃犳硶娓呴櫎鐨勯棶棰� +## 0.2.2锛�2021-07-30锛� +- 浼樺寲 鍦╱ni-forms缁勪欢锛屼笌label涓嶅榻愮殑闂 +## 0.2.1锛�2021-07-27锛� +- 淇 鍗曢�夐粯璁ゅ�间负0涓嶈兘閫変腑鐨凚ug +## 0.2.0锛�2021-07-13锛� +- 缁勪欢鍏煎 vue3锛屽浣曞垱寤簐ue3椤圭洰锛岃瑙� [uni-app 椤圭洰鏀寔 vue3 浠嬬粛](https://ask.dcloud.net.cn/article/37834) +## 0.1.11锛�2021-07-06锛� +- 浼樺寲 鍒犻櫎鏃犵敤鏃ュ織 +## 0.1.10锛�2021-07-05锛� +- 淇 鐢� 0.1.9 寮曡捣鐨勯潪 nvue 绔浘鏍囦笉鏄剧ず鐨勯棶棰� +## 0.1.9锛�2021-07-05锛� +- 淇 nvue 榛戞鏍峰紡闂 +## 0.1.8锛�2021-06-28锛� +- 淇 selectedTextColor 灞炴�т笉鐢熸晥鐨凚ug +## 0.1.7锛�2021-06-02锛� +- 鏂板 map 灞炴�э紝鍙互鏂逛究鏄犲皠text/value灞炴�� +## 0.1.6锛�2021-05-26锛� +- 淇 涓嶅叧鑱旀湇鍔$┖闂寸殑鎯呭喌涓嬬粍浠舵姤閿欑殑Bug +## 0.1.5锛�2021-05-12锛� +- 鏂板 缁勪欢绀轰緥鍦板潃 +## 0.1.4锛�2021-04-09锛� +- 淇 nvue 涓嬫棤娉曢�変腑鐨勯棶棰� +## 0.1.3锛�2021-03-22锛� +- 鏂板 disabled灞炴�� +## 0.1.2锛�2021-02-24锛� +- 浼樺寲 榛樿棰滆壊鏄剧ず +## 0.1.1锛�2021-02-24锛� +- 鏂板 鏀寔nvue +## 0.1.0锛�2021-02-18锛� +- 鈥滄殏鏃犳暟鎹�濇樉绀哄眳涓� diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-data-checkbox/components/uni-data-checkbox/uni-data-checkbox.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-data-checkbox/components/uni-data-checkbox/uni-data-checkbox.vue" new file mode 100644 index 0000000..3c75d9f --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-data-checkbox/components/uni-data-checkbox/uni-data-checkbox.vue" @@ -0,0 +1,821 @@ +<template> + <view class="uni-data-checklist" :style="{'margin-top':isTop+'px'}"> + <template v-if="!isLocal"> + <view class="uni-data-loading"> + <uni-load-more v-if="!mixinDatacomErrorMessage" status="loading" iconType="snow" :iconSize="18" :content-text="contentText"></uni-load-more> + <text v-else>{{mixinDatacomErrorMessage}}</text> + </view> + </template> + <template v-else> + <checkbox-group v-if="multiple" class="checklist-group" :class="{'is-list':mode==='list' || wrap}" @change="chagne"> + <label class="checklist-box" :class="['is--'+mode,item.selected?'is-checked':'',(disabled || !!item.disabled)?'is-disable':'',index!==0&&mode==='list'?'is-list-border':'']" + :style="item.styleBackgroud" v-for="(item,index) in dataList" :key="index"> + <checkbox class="hidden" hidden :disabled="disabled || !!item.disabled" :value="item[map.value]+''" :checked="item.selected" /> + <view v-if="(mode !=='tag' && mode !== 'list') || ( mode === 'list' && icon === 'left')" class="checkbox__inner" :style="item.styleIcon"> + <view class="checkbox__inner-icon"></view> + </view> + <view class="checklist-content" :class="{'list-content':mode === 'list' && icon ==='left'}"> + <text class="checklist-text" :style="item.styleIconText">{{item[map.text]}}</text> + <view v-if="mode === 'list' && icon === 'right'" class="checkobx__list" :style="item.styleBackgroud"></view> + </view> + </label> + </checkbox-group> + <radio-group v-else class="checklist-group" :class="{'is-list':mode==='list','is-wrap':wrap}" @change="chagne"> + <!-- --> + <label class="checklist-box" :class="['is--'+mode,item.selected?'is-checked':'',(disabled || !!item.disabled)?'is-disable':'',index!==0&&mode==='list'?'is-list-border':'']" + :style="item.styleBackgroud" v-for="(item,index) in dataList" :key="index"> + <radio class="hidden" hidden :disabled="disabled || item.disabled" :value="item[map.value]+''" :checked="item.selected" /> + <view v-if="(mode !=='tag' && mode !== 'list') || ( mode === 'list' && icon === 'left')" class="radio__inner" + :style="item.styleBackgroud"> + <view class="radio__inner-icon" :style="item.styleIcon"></view> + </view> + <view class="checklist-content" :class="{'list-content':mode === 'list' && icon ==='left'}"> + <text class="checklist-text" :style="item.styleIconText">{{item[map.text]}}</text> + <view v-if="mode === 'list' && icon === 'right'" :style="item.styleRightIcon" class="checkobx__list"></view> + </view> + </label> + </radio-group> + </template> + </view> +</template> + +<script> + /** + * DataChecklist 鏁版嵁閫夋嫨鍣� + * @description 閫氳繃鏁版嵁娓叉煋 checkbox 鍜� radio + * @tutorial https://ext.dcloud.net.cn/plugin?id=xxx + * @property {String} mode = [default| list | button | tag] 鏄剧ず妯″紡 + * @value default 榛樿妯帓妯″紡 + * @value list 鍒楄〃妯″紡 + * @value button 鎸夐挳妯″紡 + * @value tag 鏍囩妯″紡 + * @property {Boolean} multiple = [true|false] 鏄惁澶氶�� + * @property {Array|String|Number} value 榛樿鍊� + * @property {Array} localdata 鏈湴鏁版嵁 锛屾牸寮� [{text:'',value:''}] + * @property {Number|String} min 鏈�灏忛�夋嫨涓暟 锛宮ultiple涓簍rue鏃剁敓鏁� + * @property {Number|String} max 鏈�澶ч�夋嫨涓暟 锛宮ultiple涓簍rue鏃剁敓鏁� + * @property {Boolean} wrap 鏄惁鎹㈣鏄剧ず + * @property {String} icon = [left|right] list 鍒楄〃妯″紡涓媔con鏄剧ず浣嶇疆 + * @property {Boolean} selectedColor 閫変腑棰滆壊 + * @property {Boolean} emptyText 娌℃湁鏁版嵁鏃舵樉绀虹殑鏂囧瓧 锛屾湰鍦版暟鎹棤鏁� + * @property {Boolean} selectedTextColor 閫変腑鏂囨湰棰滆壊锛屽涓嶅~鍐欏垯鑷姩鏄剧ず + * @property {Object} map 瀛楁鏄犲皠锛� 榛樿 map={text:'text',value:'value'} + * @value left 宸︿晶鏄剧ず + * @value right 鍙充晶鏄剧ず + * @event {Function} change 閫変腑鍙戠敓鍙樺寲瑙﹀彂 + */ + + export default { + name: 'uniDataChecklist', + mixins: [uniCloud.mixinDatacom || {}], + emits:['input','update:modelValue','change'], + props: { + mode: { + type: String, + default: 'default' + }, + + multiple: { + type: Boolean, + default: false + }, + value: { + type: [Array, String, Number], + default () { + return '' + } + }, + // TODO vue3 + modelValue: { + type: [Array, String, Number], + default() { + return ''; + } + }, + localdata: { + type: Array, + default () { + return [] + } + }, + min: { + type: [Number, String], + default: '' + }, + max: { + type: [Number, String], + default: '' + }, + wrap: { + type: Boolean, + default: false + }, + icon: { + type: String, + default: 'left' + }, + selectedColor: { + type: String, + default: '' + }, + selectedTextColor: { + type: String, + default: '' + }, + emptyText:{ + type: String, + default: '鏆傛棤鏁版嵁' + }, + disabled:{ + type: Boolean, + default: false + }, + map:{ + type: Object, + default(){ + return { + text:'text', + value:'value' + } + } + } + }, + watch: { + localdata: { + handler(newVal) { + this.range = newVal + this.dataList = this.getDataList(this.getSelectedValue(newVal)) + }, + deep: true + }, + mixinDatacomResData(newVal) { + this.range = newVal + this.dataList = this.getDataList(this.getSelectedValue(newVal)) + }, + value(newVal) { + this.dataList = this.getDataList(newVal) + // fix by mehaotian is_reset 鍦� uni-forms 涓畾涔� + // if(!this.is_reset){ + // this.is_reset = false + // this.formItem && this.formItem.setValue(newVal) + // } + }, + modelValue(newVal) { + this.dataList = this.getDataList(newVal); + // if(!this.is_reset){ + // this.is_reset = false + // this.formItem && this.formItem.setValue(newVal) + // } + } + }, + data() { + return { + dataList: [], + range: [], + contentText: { + contentdown: '鏌ョ湅鏇村', + contentrefresh: '鍔犺浇涓�', + contentnomore: '娌℃湁鏇村' + }, + isLocal:true, + styles: { + selectedColor: '#2979ff', + selectedTextColor: '#666', + }, + isTop:0 + }; + }, + computed:{ + dataValue(){ + if(this.value === '')return this.modelValue + if(this.modelValue === '') return this.value + return this.value + } + }, + created() { + // this.form = this.getForm('uniForms') + // this.formItem = this.getForm('uniFormsItem') + // this.formItem && this.formItem.setValue(this.value) + + // if (this.formItem) { + // this.isTop = 6 + // if (this.formItem.name) { + // // 濡傛灉瀛樺湪name娣诲姞榛樿鍊�,鍚﹀垯formData 涓笉瀛樺湪杩欎釜瀛楁涓嶆牎楠� + // if(!this.is_reset){ + // this.is_reset = false + // this.formItem.setValue(this.dataValue) + // } + // this.rename = this.formItem.name + // this.form.inputChildrens.push(this) + // } + // } + + if (this.localdata && this.localdata.length !== 0) { + this.isLocal = true + this.range = this.localdata + this.dataList = this.getDataList(this.getSelectedValue(this.range)) + } else { + if (this.collection) { + this.isLocal = false + this.loadData() + } + } + }, + methods: { + loadData() { + this.mixinDatacomGet().then(res=>{ + this.mixinDatacomResData = res.result.data + if(this.mixinDatacomResData.length === 0){ + this.isLocal = false + this.mixinDatacomErrorMessage = this.emptyText + }else{ + this.isLocal = true + } + }).catch(err=>{ + this.mixinDatacomErrorMessage = err.message + }) + }, + /** + * 鑾峰彇鐖跺厓绱犲疄渚� + */ + getForm(name = 'uniForms') { + let parent = this.$parent; + let parentName = parent.$options.name; + while (parentName !== name) { + parent = parent.$parent; + if (!parent) return false + parentName = parent.$options.name; + } + return parent; + }, + chagne(e) { + const values = e.detail.value + + let detail = { + value: [], + data: [] + } + + if (this.multiple) { + this.range.forEach(item => { + + if (values.includes(item[this.map.value] + '')) { + detail.value.push(item[this.map.value]) + detail.data.push(item) + } + }) + } else { + const range = this.range.find(item => (item[this.map.value] + '') === values) + if (range) { + detail = { + value: range[this.map.value], + data: range + } + } + } + // this.formItem && this.formItem.setValue(detail.value) + // TODO 鍏煎 vue2 + this.$emit('input', detail.value); + // // TOTO 鍏煎 vue3 + this.$emit('update:modelValue', detail.value); + this.$emit('change', { + detail + }) + if (this.multiple) { + // 濡傛灉 v-model 娌℃湁缁戝畾 锛屽垯璧板唴閮ㄩ�昏緫 + // if (this.value.length === 0) { + this.dataList = this.getDataList(detail.value, true) + // } + } else { + this.dataList = this.getDataList(detail.value) + } + }, + + /** + * 鑾峰彇娓叉煋鐨勬柊鏁扮粍 + * @param {Object} value 閫変腑鍐呭 + */ + getDataList(value) { + // 瑙i櫎寮曠敤鍏崇郴锛岀牬鍧忓師寮曠敤鍏崇郴锛岄伩鍏嶆薄鏌撴簮鏁版嵁 + let dataList = JSON.parse(JSON.stringify(this.range)) + let list = [] + if (this.multiple) { + if (!Array.isArray(value)) { + value = [] + } + } + dataList.forEach((item, index) => { + item.disabled = item.disable || item.disabled || false + if (this.multiple) { + if (value.length > 0) { + let have = value.find(val => val === item[this.map.value]) + item.selected = have !== undefined + } else { + item.selected = false + } + } else { + item.selected = value === item[this.map.value] + } + + list.push(item) + }) + return this.setRange(list) + }, + /** + * 澶勭悊鏈�澶ф渶灏忓�� + * @param {Object} list + */ + setRange(list) { + let selectList = list.filter(item => item.selected) + let min = Number(this.min) || 0 + let max = Number(this.max) || '' + list.forEach((item, index) => { + if (this.multiple) { + if (selectList.length <= min) { + let have = selectList.find(val => val[this.map.value] === item[this.map.value]) + if (have !== undefined) { + item.disabled = true + } + } + + if (selectList.length >= max && max !== '') { + let have = selectList.find(val => val[this.map.value] === item[this.map.value]) + if (have === undefined) { + item.disabled = true + } + } + } + this.setStyles(item, index) + list[index] = item + }) + return list + }, + /** + * 璁剧疆 class + * @param {Object} item + * @param {Object} index + */ + setStyles(item, index) { + // 璁剧疆鑷畾涔夋牱寮� + item.styleBackgroud = this.setStyleBackgroud(item) + item.styleIcon = this.setStyleIcon(item) + item.styleIconText = this.setStyleIconText(item) + item.styleRightIcon = this.setStyleRightIcon(item) + }, + + /** + * 鑾峰彇閫変腑鍊� + * @param {Object} range + */ + getSelectedValue(range) { + if (!this.multiple) return this.dataValue + let selectedArr = [] + range.forEach((item) => { + if (item.selected) { + selectedArr.push(item[this.map.value]) + } + }) + return this.dataValue.length > 0 ? this.dataValue : selectedArr + }, + + /** + * 璁剧疆鑳屾櫙鏍峰紡 + */ + setStyleBackgroud(item) { + let styles = {} + let selectedColor = this.selectedColor?this.selectedColor:'#2979ff' + if (this.selectedColor) { + if (this.mode !== 'list') { + styles['border-color'] = item.selected?selectedColor:'#DCDFE6' + } + if (this.mode === 'tag') { + styles['background-color'] = item.selected? selectedColor:'#f5f5f5' + } + } + let classles = '' + for (let i in styles) { + classles += `${i}:${styles[i]};` + } + return classles + }, + setStyleIcon(item) { + let styles = {} + let classles = '' + if (this.selectedColor) { + let selectedColor = this.selectedColor?this.selectedColor:'#2979ff' + styles['background-color'] = item.selected?selectedColor:'#fff' + styles['border-color'] = item.selected?selectedColor:'#DCDFE6' + + if(!item.selected && item.disabled){ + styles['background-color'] = '#F2F6FC' + styles['border-color'] = item.selected?selectedColor:'#DCDFE6' + } + } + for (let i in styles) { + classles += `${i}:${styles[i]};` + } + return classles + }, + setStyleIconText(item) { + let styles = {} + let classles = '' + if (this.selectedColor) { + let selectedColor = this.selectedColor?this.selectedColor:'#2979ff' + if (this.mode === 'tag') { + styles.color = item.selected?(this.selectedTextColor?this.selectedTextColor:'#fff'):'#666' + } else { + styles.color = item.selected?(this.selectedTextColor?this.selectedTextColor:selectedColor):'#666' + } + if(!item.selected && item.disabled){ + styles.color = '#999' + } + } + for (let i in styles) { + classles += `${i}:${styles[i]};` + } + return classles + }, + setStyleRightIcon(item) { + let styles = {} + let classles = '' + if (this.mode === 'list') { + styles['border-color'] = item.selected?this.styles.selectedColor:'#DCDFE6' + } + for (let i in styles) { + classles += `${i}:${styles[i]};` + } + + return classles + } + } + } +</script> + +<style lang="scss"> + $uni-primary: #2979ff !default; + $border-color: #DCDFE6; + $disable:0.4; + + @mixin flex { + /* #ifndef APP-NVUE */ + display: flex; + /* #endif */ + } + + .uni-data-loading { + @include flex; + flex-direction: row; + justify-content: center; + align-items: center; + height: 36px; + padding-left: 10px; + color: #999; + } + + .uni-data-checklist { + position: relative; + z-index: 0; + flex: 1; + // 澶氶�夋牱寮� + .checklist-group { + @include flex; + flex-direction: row; + flex-wrap: wrap; + + &.is-list { + flex-direction: column; + } + + .checklist-box { + @include flex; + flex-direction: row; + align-items: center; + position: relative; + margin: 5px 0; + margin-right: 25px; + + .hidden { + position: absolute; + opacity: 0; + } + + // 鏂囧瓧鏍峰紡 + .checklist-content { + @include flex; + flex: 1; + flex-direction: row; + align-items: center; + justify-content: space-between; + .checklist-text { + font-size: 14px; + color: #666; + margin-left: 5px; + line-height: 14px; + } + + .checkobx__list { + border-right-width: 1px; + border-right-color: #007aff; + border-right-style: solid; + border-bottom-width:1px; + border-bottom-color: #007aff; + border-bottom-style: solid; + height: 12px; + width: 6px; + left: -5px; + transform-origin: center; + transform: rotate(45deg); + opacity: 0; + } + } + + // 澶氶�夋牱寮� + .checkbox__inner { + /* #ifndef APP-NVUE */ + flex-shrink: 0; + box-sizing: border-box; + /* #endif */ + position: relative; + width: 16px; + height: 16px; + border: 1px solid $border-color; + border-radius: 4px; + background-color: #fff; + z-index: 1; + .checkbox__inner-icon { + position: absolute; + /* #ifdef APP-NVUE */ + top: 2px; + /* #endif */ + /* #ifndef APP-NVUE */ + top: 1px; + /* #endif */ + left: 5px; + height: 8px; + width: 4px; + border-right-width: 1px; + border-right-color: #fff; + border-right-style: solid; + border-bottom-width:1px ; + border-bottom-color: #fff; + border-bottom-style: solid; + opacity: 0; + transform-origin: center; + transform: rotate(40deg); + } + } + + // 鍗曢�夋牱寮� + .radio__inner { + @include flex; + /* #ifndef APP-NVUE */ + flex-shrink: 0; + box-sizing: border-box; + /* #endif */ + justify-content: center; + align-items: center; + position: relative; + width: 16px; + height: 16px; + border: 1px solid $border-color; + border-radius: 16px; + background-color: #fff; + z-index: 1; + + .radio__inner-icon { + width: 8px; + height: 8px; + border-radius: 10px; + opacity: 0; + } + } + + // 榛樿鏍峰紡 + &.is--default { + + // 绂佺敤 + &.is-disable { + /* #ifdef H5 */ + cursor: not-allowed; + /* #endif */ + .checkbox__inner { + background-color: #F2F6FC; + border-color: $border-color; + /* #ifdef H5 */ + cursor: not-allowed; + /* #endif */ + } + + .radio__inner { + background-color: #F2F6FC; + border-color: $border-color; + } + .checklist-text { + color: #999; + } + } + + // 閫変腑 + &.is-checked { + .checkbox__inner { + border-color: $uni-primary; + background-color: $uni-primary; + + .checkbox__inner-icon { + opacity: 1; + transform: rotate(45deg); + } + } + .radio__inner { + border-color: $uni-primary; + .radio__inner-icon { + opacity: 1; + background-color: $uni-primary; + } + } + .checklist-text { + color: $uni-primary; + } + // 閫変腑绂佺敤 + &.is-disable { + .checkbox__inner { + opacity: $disable; + } + + .checklist-text { + opacity: $disable; + } + .radio__inner { + opacity: $disable; + } + } + } + } + + // 鎸夐挳鏍峰紡 + &.is--button { + margin-right: 10px; + padding: 5px 10px; + border: 1px $border-color solid; + border-radius: 3px; + transition: border-color 0.2s; + + // 绂佺敤 + &.is-disable { + /* #ifdef H5 */ + cursor: not-allowed; + /* #endif */ + border: 1px #eee solid; + opacity: $disable; + .checkbox__inner { + background-color: #F2F6FC; + border-color: $border-color; + /* #ifdef H5 */ + cursor: not-allowed; + /* #endif */ + } + .radio__inner { + background-color: #F2F6FC; + border-color: $border-color; + /* #ifdef H5 */ + cursor: not-allowed; + /* #endif */ + } + .checklist-text { + color: #999; + } + } + + &.is-checked { + border-color: $uni-primary; + .checkbox__inner { + border-color: $uni-primary; + background-color: $uni-primary; + .checkbox__inner-icon { + opacity: 1; + transform: rotate(45deg); + } + } + + .radio__inner { + border-color: $uni-primary; + + .radio__inner-icon { + opacity: 1; + background-color: $uni-primary; + } + } + + .checklist-text { + color: $uni-primary; + } + + // 閫変腑绂佺敤 + &.is-disable { + opacity: $disable; + } + } + } + + // 鏍囩鏍峰紡 + &.is--tag { + margin-right: 10px; + padding: 5px 10px; + border: 1px $border-color solid; + border-radius: 3px; + background-color: #f5f5f5; + + .checklist-text { + margin: 0; + color: #666; + } + + // 绂佺敤 + &.is-disable { + /* #ifdef H5 */ + cursor: not-allowed; + /* #endif */ + opacity: $disable; + } + + &.is-checked { + background-color: $uni-primary; + border-color: $uni-primary; + + .checklist-text { + color: #fff; + } + } + } + // 鍒楄〃鏍峰紡 + &.is--list { + /* #ifndef APP-NVUE */ + display: flex; + /* #endif */ + padding: 10px 15px; + padding-left: 0; + margin: 0; + + &.is-list-border { + border-top: 1px #eee solid; + } + + // 绂佺敤 + &.is-disable { + /* #ifdef H5 */ + cursor: not-allowed; + /* #endif */ + .checkbox__inner { + background-color: #F2F6FC; + border-color: $border-color; + /* #ifdef H5 */ + cursor: not-allowed; + /* #endif */ + } + .checklist-text { + color: #999; + } + } + + &.is-checked { + .checkbox__inner { + border-color: $uni-primary; + background-color: $uni-primary; + + .checkbox__inner-icon { + opacity: 1; + transform: rotate(45deg); + } + } + .radio__inner { + .radio__inner-icon { + opacity: 1; + } + } + .checklist-text { + color: $uni-primary; + } + + .checklist-content { + .checkobx__list { + opacity: 1; + border-color: $uni-primary; + } + } + + // 閫変腑绂佺敤 + &.is-disable { + .checkbox__inner { + opacity: $disable; + } + + .checklist-text { + opacity: $disable; + } + } + } + } + } + } + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-data-checkbox/package.json" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-data-checkbox/package.json" new file mode 100644 index 0000000..113c350 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-data-checkbox/package.json" @@ -0,0 +1,84 @@ +{ + "id": "uni-data-checkbox", + "displayName": "uni-data-checkbox 鏁版嵁閫夋嫨鍣�", + "version": "1.0.3", + "description": "閫氳繃鏁版嵁椹卞姩鐨勫崟閫夋鍜屽閫夋", + "keywords": [ + "uni-ui", + "checkbox", + "鍗曢��", + "澶氶��", + "鍗曢�夊閫�" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "^3.1.1" + }, + "directories": { + "example": "../../temps/example_temps" + }, +"dcloudext": { + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "鏃�", + "data": "鏃�", + "permissions": "鏃�" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui", + "type": "component-vue" + }, + "uni_modules": { + "dependencies": ["uni-load-more","uni-scss"], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "寰俊娴忚鍣�(Android)": "y", + "QQ娴忚鍣�(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "灏忕▼搴�": { + "寰俊": "y", + "闃块噷": "y", + "鐧惧害": "y", + "瀛楄妭璺冲姩": "y", + "QQ": "y" + }, + "蹇簲鐢�": { + "鍗庝负": "u", + "鑱旂洘": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-data-checkbox/readme.md" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-data-checkbox/readme.md" new file mode 100644 index 0000000..6eb253d --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-data-checkbox/readme.md" @@ -0,0 +1,18 @@ + + +## DataCheckbox 鏁版嵁椹卞姩鐨勫崟閫夊閫夋 +> **缁勪欢鍚嶏細uni-data-checkbox** +> 浠g爜鍧楋細 `uDataCheckbox` + + +鏈粍浠舵槸鍩轰簬uni-app鍩虹缁勪欢checkbox鐨勫皝瑁呫�傛湰缁勪欢瑕佽В鍐抽棶棰樺寘鎷細 + +1. 鏁版嵁缁戝畾鍨嬬粍浠讹細缁欐湰缁勪欢缁戝畾涓�涓猟ata锛屼細鑷姩娓叉煋涓�缁勫�欓�夊唴瀹广�傚啀浠ュ線锛屽紑鍙戣�呴渶瑕佺紪鍐欎笉灏戜唬鐮佸疄鐜扮被浼煎姛鑳� +2. 鑷姩鐨勮〃鍗曟牎楠岋細缁勪欢缁戝畾浜哾ata锛屼笖绗﹀悎[uni-forms](https://ext.dcloud.net.cn/plugin?id=2773)缁勪欢鐨勮〃鍗曟牎楠岃鑼冿紝鎼厤浣跨敤浼氳嚜鍔ㄥ疄鐜拌〃鍗曟牎楠� +3. 鏈粍浠跺悎骞朵簡鍗曢�夊閫� +4. 鏈粍浠舵湁鑻ュ共椋庢牸閫夋嫨锛屽鏅�氱殑鍗曢�夊閫夋銆佸苟鍒梑utton椋庢牸銆乼ag椋庢牸銆傚紑鍙戣�呭彲浠ュ揩閫熼�夋嫨闇�瑕佺殑椋庢牸銆備絾浣滀负涓�涓皝瑁呯粍浠讹紝鏍峰紡浠g爜铏界劧涓嶇敤鑷繁鍐欎簡锛屽嵈浼氱壓鐗蹭竴瀹氱殑鏍峰紡鑷畾涔夋�� + +鍦╱niCloud寮�鍙戜腑锛宍DB Schema`涓厤缃簡enum鏋氫妇绛夌被鍨嬪悗锛屽湪web鎺у埗鍙扮殑[鑷姩鐢熸垚琛ㄥ崟](https://uniapp.dcloud.io/uniCloud/schema?id=autocode)鍔熻兘涓紝浼氳嚜鍔ㄧ敓鎴恅`uni-data-checkbox``缁勪欢骞剁粦瀹氬ソdata + +### [鏌ョ湅鏂囨。](https://uniapp.dcloud.io/component/uniui/uni-data-checkbox) +#### 濡備娇鐢ㄨ繃绋嬩腑鏈変换浣曢棶棰橈紝鎴栬�呮偍瀵箄ni-ui鏈変竴浜涘ソ鐨勫缓璁紝娆㈣繋鍔犲叆 uni-ui 浜ゆ祦缇わ細871950839 \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-data-select/changelog.md" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-data-select/changelog.md" new file mode 100644 index 0000000..bff499d --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-data-select/changelog.md" @@ -0,0 +1,24 @@ +## 0.2.0锛�2022-12-30锛� +- 淇 娓呯┖閫夐」鍚庡娆℃墽琛� change +## 0.1.9锛�2022-09-05锛� +- 淇 寰俊灏忕▼搴忎笅鎷夋鍑虹幇鍚庨�夋嫨浼氱偣鍑诲埌钂欐澘鍚庨潰鐨勮緭鍏ユ +## 0.1.8锛�2022-08-29锛� +- 淇 鐐瑰嚮鐨勪綅缃笉鍑嗙‘ +## 0.1.7锛�2022-08-12锛� +- 鏂板 鏀寔 disabled 灞炴�� +## 0.1.6锛�2022-07-06锛� +- 淇 pc绔搴﹀紓甯哥殑bug +## 0.1.5 +- 淇 pc绔搴﹀紓甯哥殑bug +## 0.1.4锛�2022-07-05锛� +- 浼樺寲 鏄剧ず鏍峰紡 +## 0.1.3锛�2022-06-02锛� +- 淇 localdata 璧嬪�间笉鐢熸晥鐨� bug +- 鏂板 鏀寔 uni.scss 淇敼棰滆壊 +- 鏂板 鏀寔閫夐」绂佺敤锛堟暟鎹�夐」璁剧疆 disabled: true 鍗崇鐢級 +## 0.1.2锛�2022-05-08锛� +- 淇 褰� value 涓� 0 鏃堕�夋嫨涓嶇敓鏁堢殑 bug +## 0.1.1锛�2022-05-07锛� +- 鏂板 璁颁綇涓婃鐨勯�夐」锛堜粎 collection 瀛樺湪鏃舵湁鏁堬級 +## 0.1.0锛�2022-04-22锛� +- 鍒濆鍖� diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-data-select/components/uni-data-select/uni-data-select.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-data-select/components/uni-data-select/uni-data-select.vue" new file mode 100644 index 0000000..62bb2fd --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-data-select/components/uni-data-select/uni-data-select.vue" @@ -0,0 +1,449 @@ +<template> + <view class="uni-stat__select"> + <span v-if="label" class="uni-label-text hide-on-phone">{{label + '锛�'}}</span> + <view class="uni-stat-box" :class="{'uni-stat__actived': current}"> + <view class="uni-select" :class="{'uni-select--disabled':disabled}"> + <view class="uni-select__input-box" @click="toggleSelector"> + <view v-if="current" class="uni-select__input-text">{{current}}</view> + <view v-else class="uni-select__input-text uni-select__input-placeholder">{{typePlaceholder}}</view> + <uni-icons v-if="current && clear" type="clear" color="#c0c4cc" size="24" @click="clearVal" /> + <uni-icons v-else :type="showSelector? 'top' : 'bottom'" size="14" color="#999" /> + </view> + <view class="uni-select--mask" v-if="showSelector" @click="toggleSelector" /> + <view class="uni-select__selector" v-if="showSelector"> + <view class="uni-popper__arrow"></view> + <scroll-view scroll-y="true" class="uni-select__selector-scroll"> + <view class="uni-select__selector-empty" v-if="mixinDatacomResData.length === 0"> + <text>{{emptyTips}}</text> + </view> + <view v-else class="uni-select__selector-item" v-for="(item,index) in mixinDatacomResData" :key="index" + @click="change(item)"> + <text :class="{'uni-select__selector__disabled': item.disable}">{{formatItemName(item)}}</text> + </view> + </scroll-view> + </view> + </view> + </view> + </view> +</template> + +<script> + /** + * DataChecklist 鏁版嵁閫夋嫨鍣� + * @description 閫氳繃鏁版嵁娓叉煋鐨勪笅鎷夋缁勪欢 + * @tutorial https://uniapp.dcloud.io/component/uniui/uni-data-select + * @property {String} value 榛樿鍊� + * @property {Array} localdata 鏈湴鏁版嵁 锛屾牸寮� [{text:'',value:''}] + * @property {Boolean} clear 鏄惁鍙互娓呯┖宸查�夐」 + * @property {Boolean} emptyText 娌℃湁鏁版嵁鏃舵樉绀虹殑鏂囧瓧 锛屾湰鍦版暟鎹棤鏁� + * @property {String} label 宸︿晶鏍囬 + * @property {String} placeholder 杈撳叆妗嗙殑鎻愮ず鏂囧瓧 + * @property {Boolean} disabled 鏄惁绂佺敤 + * @event {Function} change 閫変腑鍙戠敓鍙樺寲瑙﹀彂 + */ + + export default { + name: "uni-stat-select", + mixins: [uniCloud.mixinDatacom || {}], + data() { + return { + showSelector: false, + current: '', + mixinDatacomResData: [], + apps: [], + channels: [] + }; + }, + props: { + localdata: { + type: Array, + default () { + return [] + } + }, + value: { + type: [String, Number], + default: '' + }, + modelValue: { + type: [String, Number], + default: '' + }, + label: { + type: String, + default: '' + }, + placeholder: { + type: String, + default: '璇烽�夋嫨' + }, + emptyTips: { + type: String, + default: '鏃犻�夐」' + }, + clear: { + type: Boolean, + default: true + }, + defItem: { + type: Number, + default: 0 + }, + disabled: { + type: Boolean, + default: false + } + }, + created() { + this.last = `${this.collection}_last_selected_option_value` + if (this.collection && !this.localdata.length) { + this.query(); + } + }, + computed: { + typePlaceholder() { + const text = { + 'opendb-stat-app-versions': '鐗堟湰', + 'opendb-app-channels': '娓犻亾', + 'opendb-app-list': '搴旂敤' + } + const common = this.placeholder + const placeholder = text[this.collection] + return placeholder ? + common + placeholder : + common + } + }, + watch: { + localdata: { + immediate: true, + handler(val, old) { + if (Array.isArray(val) && old !== val) { + this.mixinDatacomResData = val + } + } + }, + // #ifndef VUE3 + value() { + this.initDefVal() + }, + // #endif + // #ifdef VUE3 + modelValue() { + this.initDefVal() + }, + // #endif + mixinDatacomResData: { + immediate: true, + handler(val) { + if (val.length) { + this.initDefVal() + } + } + } + }, + methods: { + // 鎵ц鏁版嵁搴撴煡璇� + query(){ + this.mixinDatacomEasyGet(); + }, + // 鐩戝惉鏌ヨ鏉′欢鍙樻洿浜嬩欢 + onMixinDatacomPropsChange(){ + this.query(); + }, + initDefVal() { + let defValue = '' + if ((this.value || this.value === 0) && !this.isDisabled(this.value)) { + defValue = this.value + } else if ((this.modelValue || this.modelValue === 0) && !this.isDisabled(this.modelValue)) { + defValue = this.modelValue + } else { + let strogeValue + if (this.collection) { + strogeValue = uni.getStorageSync(this.last) + } + if (strogeValue || strogeValue === 0) { + defValue = strogeValue + } else { + let defItem = '' + if (this.defItem > 0 && this.defItem <= this.mixinDatacomResData.length) { + defItem = this.mixinDatacomResData[this.defItem - 1].value + } + defValue = defItem + } + if (defValue || defValue === 0) { + this.emit(defValue) + } + } + const def = this.mixinDatacomResData.find(item => item.value === defValue) + this.current = def ? this.formatItemName(def) : '' + }, + + /** + * @param {[String, Number]} value + * 鍒ゆ柇鐢ㄦ埛缁欑殑 value 鏄惁鍚屾椂涓虹鐢ㄧ姸鎬� + */ + isDisabled(value) { + let isDisabled = false; + + this.mixinDatacomResData.forEach(item => { + if (item.value === value) { + isDisabled = item.disable + } + }) + + return isDisabled; + }, + + clearVal() { + this.emit('') + if (this.collection) { + uni.removeStorageSync(this.last) + } + }, + change(item) { + if (!item.disable) { + this.showSelector = false + this.current = this.formatItemName(item) + this.emit(item.value) + } + }, + emit(val) { + this.$emit('change', val) + this.$emit('input', val) + this.$emit('update:modelValue', val) + if (this.collection) { + uni.setStorageSync(this.last, val) + } + }, + + toggleSelector() { + if (this.disabled) { + return + } + + this.showSelector = !this.showSelector + }, + formatItemName(item) { + let { + text, + value, + channel_code + } = item + channel_code = channel_code ? `(${channel_code})` : '' + return this.collection.indexOf('app-list') > 0 ? + `${text}(${value})` : + ( + text ? + text : + `鏈懡鍚�${channel_code}` + ) + } + } + } +</script> + +<style lang="scss"> + $uni-base-color: #6a6a6a !default; + $uni-main-color: #333 !default; + $uni-secondary-color: #909399 !default; + $uni-border-3: #e5e5e5; + + + /* #ifndef APP-NVUE */ + @media screen and (max-width: 500px) { + .hide-on-phone { + display: none; + } + } + + /* #endif */ + .uni-stat__select { + display: flex; + align-items: center; + // padding: 15px; + cursor: pointer; + width: 100%; + flex: 1; + box-sizing: border-box; + } + + .uni-stat-box { + width: 100%; + flex: 1; + } + + .uni-stat__actived { + width: 100%; + flex: 1; + // outline: 1px solid #2979ff; + } + + .uni-label-text { + font-size: 14px; + font-weight: bold; + color: $uni-base-color; + margin: auto 0; + margin-right: 5px; + } + + .uni-select { + font-size: 14px; + border: 1px solid $uni-border-3; + box-sizing: border-box; + border-radius: 4px; + padding: 0 5px; + padding-left: 10px; + position: relative; + /* #ifndef APP-NVUE */ + display: flex; + user-select: none; + /* #endif */ + flex-direction: row; + align-items: center; + border-bottom: solid 1px $uni-border-3; + width: 100%; + flex: 1; + height: 35px; + + &--disabled { + background-color: #f5f7fa; + cursor: not-allowed; + } + } + + .uni-select__label { + font-size: 16px; + // line-height: 22px; + height: 35px; + padding-right: 10px; + color: $uni-secondary-color; + } + + .uni-select__input-box { + height: 35px; + position: relative; + /* #ifndef APP-NVUE */ + display: flex; + /* #endif */ + flex: 1; + flex-direction: row; + align-items: center; + } + + .uni-select__input { + flex: 1; + font-size: 14px; + height: 22px; + line-height: 22px; + } + + .uni-select__input-plac { + font-size: 14px; + color: $uni-secondary-color; + } + + .uni-select__selector { + /* #ifndef APP-NVUE */ + box-sizing: border-box; + /* #endif */ + position: absolute; + top: calc(100% + 12px); + left: 0; + width: 100%; + background-color: #FFFFFF; + border: 1px solid #EBEEF5; + border-radius: 6px; + box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); + z-index: 3; + padding: 4px 0; + } + + .uni-select__selector-scroll { + /* #ifndef APP-NVUE */ + max-height: 200px; + box-sizing: border-box; + /* #endif */ + } + + .uni-select__selector-empty, + .uni-select__selector-item { + /* #ifndef APP-NVUE */ + display: flex; + cursor: pointer; + /* #endif */ + line-height: 35px; + font-size: 14px; + text-align: center; + /* border-bottom: solid 1px $uni-border-3; */ + padding: 0px 10px; + } + + .uni-select__selector-item:hover { + background-color: #f9f9f9; + } + + .uni-select__selector-empty:last-child, + .uni-select__selector-item:last-child { + /* #ifndef APP-NVUE */ + border-bottom: none; + /* #endif */ + } + + .uni-select__selector__disabled { + opacity: 0.4; + cursor: default; + } + + /* picker 寮瑰嚭灞傞�氱敤鐨勬寚绀哄皬涓夎 */ + .uni-popper__arrow, + .uni-popper__arrow::after { + position: absolute; + display: block; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; + border-width: 6px; + } + + .uni-popper__arrow { + filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.03)); + top: -6px; + left: 10%; + margin-right: 3px; + border-top-width: 0; + border-bottom-color: #EBEEF5; + } + + .uni-popper__arrow::after { + content: " "; + top: 1px; + margin-left: -6px; + border-top-width: 0; + border-bottom-color: #fff; + } + + .uni-select__input-text { + // width: 280px; + width: 100%; + color: $uni-main-color; + white-space: nowrap; + text-overflow: ellipsis; + -o-text-overflow: ellipsis; + overflow: hidden; + } + + .uni-select__input-placeholder { + color: $uni-base-color; + font-size: 12px; + } + + .uni-select--mask { + position: fixed; + top: 0; + bottom: 0; + right: 0; + left: 0; + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-data-select/package.json" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-data-select/package.json" new file mode 100644 index 0000000..f90c686 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-data-select/package.json" @@ -0,0 +1,85 @@ +{ + "id": "uni-data-select", + "displayName": "uni-data-select 涓嬫媺妗嗛�夋嫨鍣�", + "version": "0.2.0", + "description": "閫氳繃鏁版嵁椹卞姩鐨勪笅鎷夋閫夋嫨鍣�", + "keywords": [ + "uni-ui", + "select", + "uni-data-select", + "涓嬫媺妗�", + "涓嬫媺閫�" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "^3.1.1" + }, + "directories": { + "example": "../../temps/example_temps" + }, +"dcloudext": { + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "鏃�", + "data": "鏃�", + "permissions": "鏃�" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui", + "type": "component-vue" + }, + "uni_modules": { + "dependencies": ["uni-load-more"], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "u", + "app-nvue": "n" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "寰俊娴忚鍣�(Android)": "y", + "QQ娴忚鍣�(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "灏忕▼搴�": { + "寰俊": "y", + "闃块噷": "u", + "鐧惧害": "u", + "瀛楄妭璺冲姩": "u", + "QQ": "u", + "浜笢": "u" + }, + "蹇簲鐢�": { + "鍗庝负": "u", + "鑱旂洘": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-data-select/readme.md" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-data-select/readme.md" new file mode 100644 index 0000000..eb58de3 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-data-select/readme.md" @@ -0,0 +1,8 @@ +## DataSelect 涓嬫媺妗嗛�夋嫨鍣� +> **缁勪欢鍚嶏細uni-data-select** +> 浠g爜鍧楋細 `uDataSelect` + +褰撻�夐」杩囧鏃讹紝浣跨敤涓嬫媺鑿滃崟灞曠ず骞堕�夋嫨鍐呭 + +### [鏌ョ湅鏂囨。](https://uniapp.dcloud.io/component/uniui/uni-data-select) +#### 濡備娇鐢ㄨ繃绋嬩腑鏈変换浣曢棶棰橈紝鎴栬�呮偍瀵箄ni-ui鏈変竴浜涘ソ鐨勫缓璁紝娆㈣繋鍔犲叆 uni-ui 浜ゆ祦缇わ細871950839 diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-easyinput/changelog.md" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-easyinput/changelog.md" new file mode 100644 index 0000000..3f9d3b3 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-easyinput/changelog.md" @@ -0,0 +1,89 @@ +## 1.1.5锛�2022-11-29锛� +- 浼樺寲 涓婚鏍峰紡 +## 1.1.4锛�2022-10-27锛� +- 淇 props 涓儗鏅鑹叉棤榛樿鍊肩殑bug +## 1.1.0锛�2022-06-30锛� + +- 鏂板 鍦� uni-forms 1.4.0 涓娇鐢ㄥ彲浠ュ湪 blur 鏃舵牎楠屽唴瀹� +- 鏂板 clear 浜嬩欢锛岀偣鍑诲彸渚у弶鍙峰浘鏍囪Е鍙� +- 鏂板 change 浜嬩欢 锛屼粎鍦ㄨ緭鍏ユ澶卞幓鐒︾偣鎴栫敤鎴锋寜涓嬪洖杞︽椂瑙﹀彂 +- 浼樺寲 缁勪欢鏍峰紡锛岀粍浠惰幏鍙栫劍鐐规椂楂樹寒鏄剧ず锛屽浘鏍囬鑹茶皟鏁寸瓑 + +## 1.0.5锛�2022-06-07锛� + +- 浼樺寲 clearable 鏄剧ず绛栫暐 + +## 1.0.4锛�2022-06-07锛� + +- 浼樺寲 clearable 鏄剧ず绛栫暐 + +## 1.0.3锛�2022-05-20锛� + +- 淇 鍏抽棴鍥炬爣鏌愪簺鎯呭喌涓嬫棤娉曞彇娑堢殑 bug + +## 1.0.2锛�2022-04-12锛� + +- 淇 榛樿鍊间笉鐢熸晥鐨� bug + +## 1.0.1锛�2022-04-02锛� + +- 淇 value 涓嶈兘涓� 0 鐨� bug + +## 1.0.0锛�2021-11-19锛� + +- 浼樺寲 缁勪欢 UI锛屽苟鎻愪緵璁捐璧勬簮锛岃瑙�:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 鏂囨。杩佺Щ锛岃瑙�:[https://uniapp.dcloud.io/component/uniui/uni-easyinput](https://uniapp.dcloud.io/component/uniui/uni-easyinput) + +## 0.1.4锛�2021-08-20锛� + +- 淇 鍦� uni-forms 鐨勫姩鎬佽〃鍗曚腑榛樿鍊兼牎楠屼笉閫氳繃鐨� bug + +## 0.1.3锛�2021-08-11锛� + +- 淇 鍦� uni-forms 涓噸缃〃鍗曪紝閿欒淇℃伅鏃犳硶娓呴櫎鐨勯棶棰� + +## 0.1.2锛�2021-07-30锛� + +- 浼樺寲 vue3 涓嬩簨浠惰鍛婄殑闂 + +## 0.1.1 + +- 浼樺寲 errorMessage 灞炴�ф敮鎸� Boolean 绫诲瀷 + +## 0.1.0锛�2021-07-13锛� + +- 缁勪欢鍏煎 vue3锛屽浣曞垱寤� vue3 椤圭洰锛岃瑙� [uni-app 椤圭洰鏀寔 vue3 浠嬬粛](https://ask.dcloud.net.cn/article/37834) + +## 0.0.16锛�2021-06-29锛� + +- 淇 confirmType 灞炴�э紙浠� type="text" 鐢熸晥锛夊鑷村琛屾枃鏈鏃犳硶鎹㈣鐨� bug + +## 0.0.15锛�2021-06-21锛� + +- 淇 passwordIcon 灞炴�ф嫾鍐欓敊璇殑 bug + +## 0.0.14锛�2021-06-18锛� + +- 鏂板 passwordIcon 灞炴�э紝褰� type=password 鏃舵槸鍚︽樉绀哄皬鐪肩潧鍥炬爣 +- 淇 confirmType 灞炴�т笉鐢熸晥鐨勯棶棰� + +## 0.0.13锛�2021-06-04锛� + +- 淇 disabled 鐘舵�佸彲娓呭嚭鍐呭鐨� bug + +## 0.0.12锛�2021-05-12锛� + +- 鏂板 缁勪欢绀轰緥鍦板潃 + +## 0.0.11锛�2021-05-07锛� + +- 淇 input-border 灞炴�т笉鐢熸晥鐨勯棶棰� + +## 0.0.10锛�2021-04-30锛� + +- 淇 ios 閬尅鏂囧瓧銆佹樉绀轰竴鍗婄殑闂 + +## 0.0.9锛�2021-02-05锛� + +- 璋冩暣涓� uni_modules 鐩綍瑙勮寖 +- 浼樺寲 鍏煎 nvue 椤甸潰 diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-easyinput/components/uni-easyinput/common.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-easyinput/components/uni-easyinput/common.js" new file mode 100644 index 0000000..df9abe1 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-easyinput/components/uni-easyinput/common.js" @@ -0,0 +1,56 @@ +/** + * @desc 鍑芥暟闃叉姈 + * @param func 鐩爣鍑芥暟 + * @param wait 寤惰繜鎵ц姣鏁� + * @param immediate true - 绔嬪嵆鎵ц锛� false - 寤惰繜鎵ц + */ +export const debounce = function(func, wait = 1000, immediate = true) { + let timer; + console.log(1); + return function() { + console.log(123); + let context = this, + args = arguments; + if (timer) clearTimeout(timer); + if (immediate) { + let callNow = !timer; + timer = setTimeout(() => { + timer = null; + }, wait); + if (callNow) func.apply(context, args); + } else { + timer = setTimeout(() => { + func.apply(context, args); + }, wait) + } + } +} +/** + * @desc 鍑芥暟鑺傛祦 + * @param func 鍑芥暟 + * @param wait 寤惰繜鎵ц姣鏁� + * @param type 1 浣跨敤琛ㄦ椂闂存埑锛屽湪鏃堕棿娈靛紑濮嬬殑鏃跺�欒Е鍙� 2 浣跨敤琛ㄥ畾鏃跺櫒锛屽湪鏃堕棿娈电粨鏉熺殑鏃跺�欒Е鍙� + */ +export const throttle = (func, wait = 1000, type = 1) => { + let previous = 0; + let timeout; + return function() { + let context = this; + let args = arguments; + if (type === 1) { + let now = Date.now(); + + if (now - previous > wait) { + func.apply(context, args); + previous = now; + } + } else if (type === 2) { + if (!timeout) { + timeout = setTimeout(() => { + timeout = null; + func.apply(context, args) + }, wait) + } + } + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.vue" new file mode 100644 index 0000000..e7e8bba --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.vue" @@ -0,0 +1,639 @@ +<template> + <view class="uni-easyinput" :class="{ 'uni-easyinput-error': msg }" :style="boxStyle"> + <view class="uni-easyinput__content" :class="inputContentClass" :style="inputContentStyle"> + <uni-icons v-if="prefixIcon" class="content-clear-icon" :type="prefixIcon" color="#c0c4cc" @click="onClickIcon('prefix')" size="22"></uni-icons> + <textarea + v-if="type === 'textarea'" + class="uni-easyinput__content-textarea" + :class="{ 'input-padding': inputBorder }" + :name="name" + :value="val" + :placeholder="placeholder" + :placeholderStyle="placeholderStyle" + :disabled="disabled" + placeholder-class="uni-easyinput__placeholder-class" + :maxlength="inputMaxlength" + :focus="focused" + :autoHeight="autoHeight" + @input="onInput" + @blur="_Blur" + @focus="_Focus" + @confirm="onConfirm" + ></textarea> + <input + v-else + :type="type === 'password' ? 'text' : type" + class="uni-easyinput__content-input" + :style="inputStyle" + :name="name" + :value="val" + :password="!showPassword && type === 'password'" + :placeholder="placeholder" + :placeholderStyle="placeholderStyle" + placeholder-class="uni-easyinput__placeholder-class" + :disabled="disabled" + :maxlength="inputMaxlength" + :focus="focused" + :confirmType="confirmType" + @focus="_Focus" + @blur="_Blur" + @input="onInput" + @confirm="onConfirm" + /> + <template v-if="type === 'password' && passwordIcon"> + <!-- 寮�鍚瘑鐮佹椂鏄剧ず灏忕溂鐫� --> + <uni-icons + v-if="isVal" + class="content-clear-icon" + :class="{ 'is-textarea-icon': type === 'textarea' }" + :type="showPassword ? 'eye-slash-filled' : 'eye-filled'" + :size="22" + :color="focusShow ? primaryColor : '#c0c4cc'" + @click="onEyes" + ></uni-icons> + </template> + <template v-else-if="suffixIcon"> + <uni-icons v-if="suffixIcon" class="content-clear-icon" :type="suffixIcon" color="#c0c4cc" @click="onClickIcon('suffix')" size="22"></uni-icons> + </template> + <template v-else> + <uni-icons + v-if="clearable && isVal && !disabled && type !== 'textarea'" + class="content-clear-icon" + :class="{ 'is-textarea-icon': type === 'textarea' }" + type="clear" + :size="clearSize" + :color="msg ? '#dd524d' : focusShow ? primaryColor : '#c0c4cc'" + @click="onClear" + ></uni-icons> + </template> + <slot name="right"></slot> + </view> + </view> +</template> + +<script> +/** + * Easyinput 杈撳叆妗� + * @description 姝ょ粍浠跺彲浠ュ疄鐜拌〃鍗曠殑杈撳叆涓庢牎楠岋紝鍖呮嫭 "text" 鍜� "textarea" 绫诲瀷銆� + * @tutorial https://ext.dcloud.net.cn/plugin?id=3455 + * @property {String} value 杈撳叆鍐呭 + * @property {String } type 杈撳叆妗嗙殑绫诲瀷锛堥粯璁ext锛� password/text/textarea/.. + * @value text 鏂囨湰杈撳叆閿洏 + * @value textarea 澶氳鏂囨湰杈撳叆閿洏 + * @value password 瀵嗙爜杈撳叆閿洏 + * @value number 鏁板瓧杈撳叆閿洏锛屾敞鎰廼OS涓奱pp-vue寮瑰嚭鐨勬暟瀛楅敭鐩樺苟闈�9瀹牸鏂瑰紡 + * @value idcard 韬唤璇佽緭鍏ラ敭鐩橈紝淇°�佹敮浠樺疂銆佺櫨搴︺�丵Q灏忕▼搴� + * @value digit 甯﹀皬鏁扮偣鐨勬暟瀛楅敭鐩� 锛孉pp鐨刵vue椤甸潰銆佸井淇°�佹敮浠樺疂銆佺櫨搴︺�佸ご鏉°�丵Q灏忕▼搴忔敮鎸� + * @property {Boolean} clearable 鏄惁鏄剧ず鍙充晶娓呯┖鍐呭鐨勫浘鏍囨帶浠讹紝鐐瑰嚮鍙竻绌鸿緭鍏ユ鍐呭锛堥粯璁rue锛� + * @property {Boolean} autoHeight 鏄惁鑷姩澧為珮杈撳叆鍖哄煙锛宼ype涓簍extarea鏃舵湁鏁堬紙榛樿true锛� + * @property {String } placeholder 杈撳叆妗嗙殑鎻愮ず鏂囧瓧 + * @property {String } placeholderStyle placeholder鐨勬牱寮�(鍐呰仈鏍峰紡锛屽瓧绗︿覆)锛屽"color: #ddd" + * @property {Boolean} focus 鏄惁鑷姩鑾峰緱鐒︾偣锛堥粯璁alse锛� + * @property {Boolean} disabled 鏄惁绂佺敤锛堥粯璁alse锛� + * @property {Number } maxlength 鏈�澶ц緭鍏ラ暱搴︼紝璁剧疆涓� -1 鐨勬椂鍊欎笉闄愬埗鏈�澶ч暱搴︼紙榛樿140锛� + * @property {String } confirmType 璁剧疆閿洏鍙充笅瑙掓寜閽殑鏂囧瓧锛屼粎鍦╰ype="text"鏃剁敓鏁堬紙榛樿done锛� + * @property {Number } clearSize 娓呴櫎鍥炬爣鐨勫ぇ灏忥紝鍗曚綅px锛堥粯璁�15锛� + * @property {String} prefixIcon 杈撳叆妗嗗ご閮ㄥ浘鏍� + * @property {String} suffixIcon 杈撳叆妗嗗熬閮ㄥ浘鏍� + * @property {String} primaryColor 璁剧疆涓婚鑹诧紙榛樿#2979ff锛� + * @property {Boolean} trim 鏄惁鑷姩鍘婚櫎涓ょ鐨勭┖鏍� + * @value both 鍘婚櫎涓ょ绌烘牸 + * @value left 鍘婚櫎宸︿晶绌烘牸 + * @value right 鍘婚櫎鍙充晶绌烘牸 + * @value start 鍘婚櫎宸︿晶绌烘牸 + * @value end 鍘婚櫎鍙充晶绌烘牸 + * @value all 鍘婚櫎鍏ㄩ儴绌烘牸 + * @value none 涓嶅幓闄ょ┖鏍� + * @property {Boolean} inputBorder 鏄惁鏄剧ずinput杈撳叆妗嗙殑杈规锛堥粯璁rue锛� + * @property {Boolean} passwordIcon type=password鏃舵槸鍚︽樉绀哄皬鐪肩潧鍥炬爣 + * @property {Object} styles 鑷畾涔夐鑹� + * @event {Function} input 杈撳叆妗嗗唴瀹瑰彂鐢熷彉鍖栨椂瑙﹀彂 + * @event {Function} focus 杈撳叆妗嗚幏寰楃劍鐐规椂瑙﹀彂 + * @event {Function} blur 杈撳叆妗嗗け鍘荤劍鐐规椂瑙﹀彂 + * @event {Function} confirm 鐐瑰嚮瀹屾垚鎸夐挳鏃惰Е鍙� + * @event {Function} iconClick 鐐瑰嚮鍥炬爣鏃惰Е鍙� + * @example <uni-easyinput v-model="mobile"></uni-easyinput> + */ +function obj2strClass(obj) { + let classess = ''; + for (let key in obj) { + const val = obj[key]; + if (val) { + classess += `${key} `; + } + } + return classess; +} + +function obj2strStyle(obj) { + let style = ''; + for (let key in obj) { + const val = obj[key]; + style += `${key}:${val};`; + } + return style; +} +export default { + name: 'uni-easyinput', + emits: ['click', 'iconClick', 'update:modelValue', 'input', 'focus', 'blur', 'confirm', 'clear', 'eyes', 'change'], + model: { + prop: 'modelValue', + event: 'update:modelValue' + }, + options: { + virtualHost: true + }, + inject: { + form: { + from: 'uniForm', + default: null + }, + formItem: { + from: 'uniFormItem', + default: null + } + }, + props: { + name: String, + value: [Number, String], + modelValue: [Number, String], + type: { + type: String, + default: 'text' + }, + clearable: { + type: Boolean, + default: true + }, + autoHeight: { + type: Boolean, + default: false + }, + placeholder: { + type: String, + default: ' ' + }, + placeholderStyle: String, + focus: { + type: Boolean, + default: false + }, + disabled: { + type: Boolean, + default: false + }, + maxlength: { + type: [Number, String], + default: 140 + }, + confirmType: { + type: String, + default: 'done' + }, + clearSize: { + type: [Number, String], + default: 24 + }, + inputBorder: { + type: Boolean, + default: true + }, + prefixIcon: { + type: String, + default: '' + }, + suffixIcon: { + type: String, + default: '' + }, + trim: { + type: [Boolean, String], + default: true + }, + passwordIcon: { + type: Boolean, + default: true + }, + primaryColor: { + type: String, + default: '#2979ff' + }, + styles: { + type: Object, + default() { + return { + color: '#333', + backgroundColor: '#fff', + disableColor: '#F7F6F6', + borderColor: '#e5e5e5' + }; + } + }, + errorMessage: { + type: [String, Boolean], + default: '' + } + }, + data() { + return { + focused: false, + val: '', + showMsg: '', + border: false, + isFirstBorder: false, + showClearIcon: false, + showPassword: false, + focusShow: false, + localMsg: '', + isEnter: false // 鐢ㄤ簬鍒ゆ柇褰撳墠鏄惁鏄娇鐢ㄥ洖杞︽搷浣� + }; + }, + computed: { + // 杈撳叆妗嗗唴鏄惁鏈夊�� + isVal() { + const val = this.val; + // fixed by mehaotian 澶勭悊鍊间负0鐨勬儏鍐碉紝瀛楃涓�0涓嶅湪澶勭悊鑼冨洿 + if (val || val === 0) { + return true; + } + return false; + }, + + msg() { + // console.log('computed', this.form, this.formItem); + // if (this.form) { + // return this.errorMessage || this.formItem.errMsg; + // } + // TODO 澶勭悊澶存潯 formItem 涓� errMsg 涓嶆洿鏂扮殑闂 + return this.localMsg || this.errorMessage; + }, + // 鍥犱负uniapp鐨刬nput缁勪欢鐨刴axlength缁勪欢蹇呴』瑕佹暟鍊硷紝杩欓噷杞负鏁板�硷紝鐢ㄦ埛鍙互浼犲叆瀛楃涓叉暟鍊� + inputMaxlength() { + return Number(this.maxlength); + }, + + // 澶勭悊澶栧眰鏍峰紡鐨剆tyle + boxStyle() { + return `color:${this.inputBorder && this.msg ? '#e43d33' : this.styles.color};`; + }, + // input 鍐呭鐨勭被鍜屾牱寮忓鐞� + inputContentClass() { + return obj2strClass({ + 'is-input-border': this.inputBorder, + 'is-input-error-border': this.inputBorder && this.msg, + 'is-textarea': this.type === 'textarea', + 'is-disabled': this.disabled, + 'is-focused': this.focusShow + }); + }, + inputContentStyle() { + const focusColor = this.focusShow ? this.primaryColor : this.styles.borderColor; + const borderColor = this.inputBorder && this.msg ? '#dd524d' : focusColor; + return obj2strStyle({ + 'border-color': borderColor || '#e5e5e5', + 'background-color': this.disabled ? this.styles.disableColor : this.styles.backgroundColor + }); + }, + // input鍙充晶鏍峰紡 + inputStyle() { + const paddingRight = this.type === 'password' || this.clearable || this.prefixIcon ? '' : '10px'; + return obj2strStyle({ + 'padding-right': paddingRight, + 'padding-left': this.prefixIcon ? '' : '10px' + }); + } + }, + watch: { + value(newVal) { + this.val = newVal; + }, + modelValue(newVal) { + this.val = newVal; + }, + focus(newVal) { + this.$nextTick(() => { + this.focused = this.focus; + this.focusShow = this.focus; + }); + } + }, + created() { + this.init(); + // TODO 澶勭悊澶存潯vue3 computed 涓嶇洃鍚� inject 鏇存敼鐨勯棶棰橈紙formItem.errMsg锛� + if (this.form && this.formItem) { + this.$watch('formItem.errMsg', newVal => { + this.localMsg = newVal; + }); + } + }, + mounted() { + this.$nextTick(() => { + this.focused = this.focus; + this.focusShow = this.focus; + }); + }, + methods: { + /** + * 鍒濆鍖栧彉閲忓�� + */ + init() { + if (this.value || this.value === 0) { + this.val = this.value; + } else if (this.modelValue || this.modelValue === 0) { + this.val = this.modelValue; + } else { + this.val = null; + } + }, + + /** + * 鐐瑰嚮鍥炬爣鏃惰Е鍙� + * @param {Object} type + */ + onClickIcon(type) { + this.$emit('iconClick', type); + }, + + /** + * 鏄剧ず闅愯棌鍐呭锛屽瘑鐮佹鏃剁敓鏁� + */ + onEyes() { + this.showPassword = !this.showPassword; + this.$emit('eyes', this.showPassword); + }, + + /** + * 杈撳叆鏃惰Е鍙� + * @param {Object} event + */ + onInput(event) { + let value = event.detail.value; + // 鍒ゆ柇鏄惁鍘婚櫎绌烘牸 + if (this.trim) { + if (typeof this.trim === 'boolean' && this.trim) { + value = this.trimStr(value); + } + if (typeof this.trim === 'string') { + value = this.trimStr(value, this.trim); + } + } + if (this.errMsg) this.errMsg = ''; + this.val = value; + // TODO 鍏煎 vue2 + this.$emit('input', value); + // TODO銆�鍏煎銆�vue3 + this.$emit('update:modelValue', value); + }, + + /** + * 澶栭儴璋冪敤鏂规硶 + * 鑾峰彇鐒︾偣鏃惰Е鍙� + * @param {Object} event + */ + onFocus() { + this.$nextTick(() => { + this.focused = true; + }); + this.$emit('focus', null); + }, + + _Focus(event) { + this.focusShow = true; + this.$emit('focus', event); + }, + + /** + * 澶栭儴璋冪敤鏂规硶 + * 澶卞幓鐒︾偣鏃惰Е鍙� + * @param {Object} event + */ + onBlur() { + this.focused = false; + this.$emit('focus', null); + }, + _Blur(event) { + let value = event.detail.value; + this.focusShow = false; + this.$emit('blur', event); + // 鏍规嵁绫诲瀷杩斿洖鍊硷紝鍦╡vent涓幏鍙栫殑鍊肩悊璁轰笂璁查兘鏄痵tring + if (this.isEnter === false) { + this.$emit('change', this.val); + } + // 澶卞幓鐒︾偣鏃跺弬涓庤〃鍗曟牎楠� + if (this.form && this.formItem) { + const { validateTrigger } = this.form; + if (validateTrigger === 'blur') { + this.formItem.onFieldChange(); + } + } + }, + + /** + * 鎸変笅閿洏鐨勫彂閫侀敭 + * @param {Object} e + */ + onConfirm(e) { + this.$emit('confirm', this.val); + this.isEnter = true; + this.$emit('change', this.val); + this.$nextTick(() => { + this.isEnter = false; + }); + }, + + /** + * 娓呯悊鍐呭 + * @param {Object} event + */ + onClear(event) { + this.val = ''; + // TODO 鍏煎 vue2 + this.$emit('input', ''); + // TODO 鍏煎 vue2 + // TODO銆�鍏煎銆�vue3 + this.$emit('update:modelValue', ''); + // 鐐瑰嚮鍙夊彿瑙﹀彂 + this.$emit('clear'); + }, + + /** + * 鍘婚櫎绌烘牸 + */ + trimStr(str, pos = 'both') { + if (pos === 'both') { + return str.trim(); + } else if (pos === 'left') { + return str.trimLeft(); + } else if (pos === 'right') { + return str.trimRight(); + } else if (pos === 'start') { + return str.trimStart(); + } else if (pos === 'end') { + return str.trimEnd(); + } else if (pos === 'all') { + return str.replace(/\s+/g, ''); + } else if (pos === 'none') { + return str; + } + return str; + } + } +}; +</script> + +<style lang="scss"> +$uni-error: #e43d33; +$uni-border-1: #dcdfe6 !default; + +.uni-easyinput { + /* #ifndef APP-NVUE */ + width: 100%; + /* #endif */ + flex: 1; + position: relative; + text-align: left; + color: #333; + font-size: 14px; +} + +.uni-easyinput__content { + flex: 1; + /* #ifndef APP-NVUE */ + width: 100%; + display: flex; + box-sizing: border-box; + // min-height: 36px; + /* #endif */ + flex-direction: row; + align-items: center; + // 澶勭悊border鍔ㄧ敾鍒氬紑濮嬫樉绀洪粦鑹茬殑闂 + border-color: #fff; + transition-property: border-color; + transition-duration: 0.3s; +} + +.uni-easyinput__content-input { + /* #ifndef APP-NVUE */ + width: auto; + /* #endif */ + position: relative; + overflow: hidden; + flex: 1; + line-height: 1; + font-size: 14px; + height: 35px; + // min-height: 36px; +} + +.uni-easyinput__placeholder-class { + color: #999; + font-size: 12px; + // font-weight: 200; +} + +.is-textarea { + align-items: flex-start; +} + +.is-textarea-icon { + margin-top: 5px; +} + +.uni-easyinput__content-textarea { + position: relative; + overflow: hidden; + flex: 1; + line-height: 1.5; + font-size: 14px; + margin: 6px; + margin-left: 0; + height: 80px; + min-height: 80px; + /* #ifndef APP-NVUE */ + min-height: 80px; + width: auto; + /* #endif */ +} + +.input-padding { + padding-left: 10px; +} + +.content-clear-icon { + padding: 0 5px; +} + +.label-icon { + margin-right: 5px; + margin-top: -1px; +} + +// 鏄剧ず杈规 +.is-input-border { + /* #ifndef APP-NVUE */ + display: flex; + box-sizing: border-box; + /* #endif */ + flex-direction: row; + align-items: center; + border: 1px solid $uni-border-1; + border-radius: 4px; + /* #ifdef MP-ALIPAY */ + overflow: hidden; + /* #endif */ +} + +.uni-error-message { + position: absolute; + bottom: -17px; + left: 0; + line-height: 12px; + color: $uni-error; + font-size: 12px; + text-align: left; +} + +.uni-error-msg--boeder { + position: relative; + bottom: 0; + line-height: 22px; +} + +.is-input-error-border { + border-color: $uni-error; + + .uni-easyinput__placeholder-class { + color: mix(#fff, $uni-error, 50%); + } +} + +.uni-easyinput--border { + margin-bottom: 0; + padding: 10px 15px; + // padding-bottom: 0; + border-top: 1px #eee solid; +} + +.uni-easyinput-error { + padding-bottom: 0; +} + +.is-first-border { + /* #ifndef APP-NVUE */ + border: none; + /* #endif */ + /* #ifdef APP-NVUE */ + border-width: 0; + /* #endif */ +} + +.is-disabled { + background-color: #f7f6f6; + color: #d5d5d5; + + .uni-easyinput__placeholder-class { + color: #d5d5d5; + font-size: 12px; + } +} +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-easyinput/package.json" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-easyinput/package.json" new file mode 100644 index 0000000..63d07fb --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-easyinput/package.json" @@ -0,0 +1,87 @@ +{ + "id": "uni-easyinput", + "displayName": "uni-easyinput 澧炲己杈撳叆妗�", + "version": "1.1.5", + "description": "Easyinput 缁勪欢鏄鍘熺敓input缁勪欢鐨勫寮�", + "keywords": [ + "uni-ui", + "uniui", + "input", + "uni-easyinput", + "杈撳叆妗�" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "" + }, + "directories": { + "example": "../../temps/example_temps" + }, +"dcloudext": { + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "鏃�", + "data": "鏃�", + "permissions": "鏃�" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui", + "type": "component-vue" + }, + "uni_modules": { + "dependencies": [ + "uni-scss", + "uni-icons" + ], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "寰俊娴忚鍣�(Android)": "y", + "QQ娴忚鍣�(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "灏忕▼搴�": { + "寰俊": "y", + "闃块噷": "y", + "鐧惧害": "y", + "瀛楄妭璺冲姩": "y", + "QQ": "y" + }, + "蹇簲鐢�": { + "鍗庝负": "u", + "鑱旂洘": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-easyinput/readme.md" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-easyinput/readme.md" new file mode 100644 index 0000000..f1faf8f --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-easyinput/readme.md" @@ -0,0 +1,11 @@ + + +### Easyinput 澧炲己杈撳叆妗� +> **缁勪欢鍚嶏細uni-easyinput** +> 浠g爜鍧楋細 `uEasyinput` + + +easyinput 缁勪欢鏄鍘熺敓input缁勪欢鐨勫寮� 锛屾槸涓撻棬涓洪厤鍚堣〃鍗曠粍浠禰uni-forms](https://ext.dcloud.net.cn/plugin?id=2773)鑰岃璁$殑锛宔asyinput 鍐呯疆浜嗚竟妗嗭紝鍥炬爣绛夛紝鍚屾椂鍖呭惈 input 鎵�鏈夊姛鑳� + +### [鏌ョ湅鏂囨。](https://uniapp.dcloud.io/component/uniui/uni-easyinput) +#### 濡備娇鐢ㄨ繃绋嬩腑鏈変换浣曢棶棰橈紝鎴栬�呮偍瀵箄ni-ui鏈変竴浜涘ソ鐨勫缓璁紝娆㈣繋鍔犲叆 uni-ui 浜ゆ祦缇わ細871950839 \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-forms/changelog.md" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-forms/changelog.md" new file mode 100644 index 0000000..c358a21 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-forms/changelog.md" @@ -0,0 +1,90 @@ +## 1.4.8锛�2022-08-23锛� +- 浼樺寲 鏍规嵁 rules 鑷姩娣诲姞 required 鐨勯棶棰� +## 1.4.7锛�2022-08-22锛� +- 淇 item 鏈缃� require 灞炴�э紝rules 璁剧疆 require 鍚庯紝鏄熷彿涔熸樉绀虹殑 bug锛岃瑙侊細[https://ask.dcloud.net.cn/question/151540](https://ask.dcloud.net.cn/question/151540) +## 1.4.6锛�2022-07-13锛� +- 淇 model 闇�瑕佹牎楠岀殑鍊兼病鏈夊0鏄庡搴斿瓧娈垫椂锛屽鑷寸涓�娆′笉瑙﹀彂鏍¢獙鐨刡ug +## 1.4.5锛�2022-07-05锛� +- 鏂板 鏇村琛ㄥ崟绀轰緥 +- 浼樺寲 瀛愯〃鍗曠粍浠惰繃鏈熸彁绀虹殑闂 +- 浼樺寲 瀛愯〃鍗曠粍浠秛ni-datetime-picker銆乽ni-data-select銆乽ni-data-picker鐨勬樉绀烘牱寮� +## 1.4.4锛�2022-07-04锛� +- 鏇存柊 鍒犻櫎缁勪欢鏃ュ織 +## 1.4.3锛�2022-07-04锛� +- 淇 鐢� 1.4.0 寮曞彂鐨� label 鎻掓Ы涓嶇敓鏁堢殑bug +## 1.4.2锛�2022-07-04锛� +- 淇 瀛愮粍浠舵壘涓嶅埌 setValue 鎶ラ敊鐨刡ug +## 1.4.1锛�2022-07-04锛� +- 淇 uni-data-picker 鍦� uni-forms-item 涓姤閿欑殑bug +- 淇 uni-data-picker 鍦� uni-forms-item 涓搴︿笉姝g‘鐨刡ug +## 1.4.0锛�2022-06-30锛� +- 銆愰噸瑕併�戠粍浠堕�昏緫閲嶆瀯锛岄儴鍒嗙敤娉曠敤鏃х増鏈笉鍏煎锛岃娉ㄦ剰鍏煎闂 +- 銆愰噸瑕併�戠粍浠朵娇鐢� Provide/Inject 鏂瑰紡娉ㄥ叆渚濊禆锛屾彁渚涗簡鑷畾涔夎〃鍗曠粍浠惰皟鐢� uni-forms 鏍¢獙琛ㄥ崟鐨勮兘鍔� +- 鏂板 model 灞炴�э紝绛夊悓浜庡師 value/modelValue 灞炴�э紝鏃у睘鎬у嵆灏嗗簾寮� +- 鏂板 validateTrigger 灞炴�х殑 blur 鍊硷紝浠� uni-easyinput 鐢熸晥 +- 鏂板 onFieldChange 鏂规硶锛屽彲浠ュ瀛愯〃鍗曡繘琛屾牎楠岋紝鍙浛浠inddata鏂规硶 +- 鏂板 瀛愯〃鍗曠殑 setRules 鏂规硶锛岄厤鍚堣嚜瀹氫箟鏍¢獙鍑芥暟浣跨敤 +- 鏂板 uni-forms-item 鐨� setRules 鏂规硶锛岄厤缃姩鎬佽〃鍗曚娇鐢ㄥ彲鍔ㄦ�佹洿鏂版牎楠岃鍒� +- 浼樺寲 鍔ㄦ�佽〃鍗曟牎楠屾柟寮忥紝搴熷純鎷兼帴name鐨勬柟寮� +## 1.3.3锛�2022-06-22锛� +- 淇 琛ㄥ崟鏍¢獙椤哄簭鏃犲簭闂 +## 1.3.2锛�2021-12-09锛� +- +## 1.3.1锛�2021-11-19锛� +- 淇 label 鎻掓Ы涓嶇敓鏁堢殑bug +## 1.3.0锛�2021-11-19锛� +- 浼樺寲 缁勪欢UI锛屽苟鎻愪緵璁捐璧勬簮锛岃瑙�:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 鏂囨。杩佺Щ锛岃瑙�:[https://uniapp.dcloud.io/component/uniui/uni-forms](https://uniapp.dcloud.io/component/uniui/uni-forms) +## 1.2.7锛�2021-08-13锛� +- 淇 娌℃湁娣诲姞鏍¢獙瑙勫垯鐨勫瓧娈典緷鐒舵姤閿欑殑Bug +## 1.2.6锛�2021-08-11锛� +- 淇 閲嶇疆琛ㄥ崟閿欒淇℃伅鏃犳硶娓呴櫎鐨勯棶棰� +## 1.2.5锛�2021-08-11锛� +- 浼樺寲 缁勪欢鏂囨。 +## 1.2.4锛�2021-08-11锛� +- 淇 琛ㄥ崟楠岃瘉鍙敓鏁堜竴娆$殑闂 +## 1.2.3锛�2021-07-30锛� +- 浼樺寲 vue3涓嬩簨浠惰鍛婄殑闂 +## 1.2.2锛�2021-07-26锛� +- 淇 vue2 涓嬫潯浠剁紪璇戝鑷磀estroyed鐢熷懡鍛ㄦ湡澶辨晥鐨凚ug +- 淇 1.2.1 寮曡捣鐨勭ず渚嬪湪灏忕▼搴忓钩鍙版姤閿欑殑Bug +## 1.2.1锛�2021-07-22锛� +- 淇 鍔ㄦ�佹牎楠岃〃鍗曪紝榛樿鍊间负绌虹殑鎯呭喌涓嬫牎楠屽け鏁堢殑Bug +- 淇 涓嶆寚瀹歯ame灞炴�ф椂锛岃繍琛屾姤閿欑殑Bug +- 浼樺寲 label榛樿瀹藉害浠�65璋冩暣鑷�70锛屼娇required涓簍rue涓斿洓瀛楁椂涓嶆崲琛� +- 浼樺寲 缁勪欢绀轰緥锛屾柊澧炲姩鎬佹牎楠岀ず渚嬩唬鐮� +- 浼樺寲 缁勪欢鏂囨。锛屼娇鐢ㄦ柟寮忔洿娓呮櫚 +## 1.2.0锛�2021-07-13锛� +- 缁勪欢鍏煎 vue3锛屽浣曞垱寤簐ue3椤圭洰锛岃瑙� [uni-app 椤圭洰鏀寔 vue3 浠嬬粛](https://ask.dcloud.net.cn/article/37834) +## 1.1.2锛�2021-06-25锛� +- 淇 pattern 灞炴�у湪寰俊灏忕▼搴忓钩鍙版棤鏁堢殑闂 +## 1.1.1锛�2021-06-22锛� +- 淇 validate-trigger灞炴�т负submit涓攅rr-show-type灞炴�т负toast鏃朵笉鑳藉脊鍑虹殑Bug +## 1.1.0锛�2021-06-22锛� +- 淇 鍙啓setRules鏂规硶鑰屽鑷存牎楠屼笉鐢熸晥鐨凚ug +- 淇 鐢变笂涓姙娉曞紩鍙戠殑閿欒鎻愮ず鏂囧瓧閿欎綅鐨凚ug +## 1.0.48锛�2021-06-21锛� +- 淇 涓嶈缃� label 灞炴�� 锛屾棤娉曡缃甽abel鎻掓Ы鐨勯棶棰� +## 1.0.47锛�2021-06-21锛� +- 淇 涓嶈缃甽abel灞炴�э紝label-width灞炴�т笉鐢熸晥鐨刡ug +- 淇 setRules 鏂规硶涓巖ules灞炴�у啿绐佺殑闂 +## 1.0.46锛�2021-06-04锛� +- 淇 鍔ㄦ�佸垹鍑忔暟鎹鑷存姤閿欑殑闂 +## 1.0.45锛�2021-06-04锛� +- 鏂板 modelValue 灞炴�� 锛寁alue 鍗冲皢搴熷純 +## 1.0.44锛�2021-06-02锛� +- 鏂板 uni-forms-item 鍙互璁剧疆鍗曠嫭鐨� rules +- 鏂板 validate 浜嬩欢澧炲姞 keepitem 鍙傛暟锛屽彲浠ラ�夋嫨閭d簺瀛楁涓嶈繃婊� +- 浼樺寲 submit 浜嬩欢閲嶅懡鍚嶄负 validate +## 1.0.43锛�2021-05-12锛� +- 鏂板 缁勪欢绀轰緥鍦板潃 +## 1.0.42锛�2021-04-30锛� +- 淇 鑷畾涔夋楠屽櫒澶辨晥鐨勯棶棰� +## 1.0.41锛�2021-03-05锛� +- 鏇存柊 鏍¢獙鍣� +- 淇 琛ㄥ崟瑙勫垯璁剧疆绫诲瀷涓� number 鐨勬儏鍐典笅锛屽�间负0鏍¢獙澶辫触鐨凚ug +## 1.0.40锛�2021-03-04锛� +- 淇 鍔ㄦ�佹樉绀簎ni-forms-item鐨勬儏鍐典笅锛宻ubmit 鏂规硶鑾峰彇鍊奸敊璇殑Bug +## 1.0.39锛�2021-02-05锛� +- 璋冩暣涓簎ni_modules鐩綍瑙勮寖 +- 淇 鏍¢獙鍣ㄤ紶鍏� int 绛夌被鍨� 锛岃繑鍥濻tring绫诲瀷鐨凚ug diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-forms/components/uni-forms-item/uni-forms-item.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-forms/components/uni-forms-item/uni-forms-item.vue" new file mode 100644 index 0000000..ce7c460 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-forms/components/uni-forms-item/uni-forms-item.vue" @@ -0,0 +1,631 @@ +<template> + <view class="uni-forms-item" + :class="['is-direction-' + localLabelPos ,border?'uni-forms-item--border':'' ,border && isFirstBorder?'is-first-border':'']"> + <slot name="label"> + <view class="uni-forms-item__label" :class="{'no-label':!label && !isRequired}" + :style="{width:localLabelWidth,justifyContent: localLabelAlign}"> + <text v-if="isRequired" class="is-required">*</text> + <text>{{label}}</text> + </view> + </slot> + <!-- #ifndef APP-NVUE --> + <view class="uni-forms-item__content"> + <slot></slot> + <view class="uni-forms-item__error" :class="{'msg--active':msg}"> + <text>{{msg}}</text> + </view> + </view> + <!-- #endif --> + <!-- #ifdef APP-NVUE --> + <view class="uni-forms-item__nuve-content"> + <view class="uni-forms-item__content"> + <slot></slot> + </view> + <view class="uni-forms-item__error" :class="{'msg--active':msg}"> + <text class="error-text">{{msg}}</text> + </view> + </view> + <!-- #endif --> + </view> +</template> + +<script> + /** + * uni-fomrs-item 琛ㄥ崟瀛愮粍浠� + * @description uni-fomrs-item 琛ㄥ崟瀛愮粍浠讹紝鎻愪緵浜嗗熀纭�甯冨眬宸茬粡鏍¢獙鑳藉姏 + * @tutorial https://ext.dcloud.net.cn/plugin?id=2773 + * @property {Boolean} required 鏄惁蹇呭~锛屽乏杈规樉绀虹孩鑹�"*"鍙� + * @property {String } label 杈撳叆妗嗗乏杈圭殑鏂囧瓧鎻愮ず + * @property {Number } labelWidth label鐨勫搴︼紝鍗曚綅px锛堥粯璁�65锛� + * @property {String } labelAlign = [left|center|right] label鐨勬枃瀛楀榻愭柟寮忥紙榛樿left锛� + * @value left label 宸︿晶鏄剧ず + * @value center label 灞呬腑 + * @value right label 鍙充晶瀵归綈 + * @property {String } errorMessage 鏄剧ず鐨勯敊璇彁绀哄唴瀹癸紝濡傛灉涓虹┖瀛楃涓叉垨鑰協alse锛屽垯涓嶆樉绀洪敊璇俊鎭� + * @property {String } name 琛ㄥ崟鍩熺殑灞炴�у悕锛屽湪浣跨敤鏍¢獙瑙勫垯鏃跺繀濉� + * @property {String } leftIcon 銆�1.4.0搴熷純銆憀abel宸﹁竟鐨勫浘鏍囷紝闄� uni-ui 鐨勫浘鏍囧悕绉� + * @property {String } iconColor 銆�1.4.0搴熷純銆戝乏杈归�氳繃icon閰嶇疆鐨勫浘鏍囩殑棰滆壊锛堥粯璁�#606266锛� + * @property {String} validateTrigger = [bind|submit|blur] 銆�1.4.0搴熷純銆戞牎楠岃Е鍙戝櫒鏂瑰紡 榛樿 submit + * @value bind 鍙戠敓鍙樺寲鏃惰Е鍙� + * @value submit 鎻愪氦鏃惰Е鍙� + * @value blur 澶卞幓鐒︾偣瑙﹀彂 + * @property {String } labelPosition = [top|left] 銆�1.4.0搴熷純銆憀abel鐨勬枃瀛楃殑浣嶇疆锛堥粯璁eft锛� + * @value top 椤堕儴鏄剧ず label + * @value left 宸︿晶鏄剧ず label + */ + + export default { + name: 'uniFormsItem', + options: { + virtualHost: true + }, + provide() { + return { + uniFormItem: this + } + }, + inject: { + form: { + from: 'uniForm', + default: null + }, + }, + props: { + // 琛ㄥ崟鏍¢獙瑙勫垯 + rules: { + type: Array, + default () { + return null; + } + }, + // 琛ㄥ崟鍩熺殑灞炴�у悕锛屽湪浣跨敤鏍¢獙瑙勫垯鏃跺繀濉� + name: { + type: [String, Array], + default: '' + }, + required: { + type: Boolean, + default: false + }, + label: { + type: String, + default: '' + }, + // label鐨勫搴� 锛岄粯璁� 80 + labelWidth: { + type: [String, Number], + default: '' + }, + // label 灞呬腑鏂瑰紡锛岄粯璁� left 鍙栧�� left/center/right + labelAlign: { + type: String, + default: '' + }, + // 寮哄埗鏄剧ず閿欒淇℃伅 + errorMessage: { + type: [String, Boolean], + default: '' + }, + // 1.4.0 寮冪敤锛岀粺涓�浣跨敤 form 鐨勬牎楠屾椂鏈� + // validateTrigger: { + // type: String, + // default: '' + // }, + // 1.4.0 寮冪敤锛岀粺涓�浣跨敤 form 鐨刲abel 浣嶇疆 + // labelPosition: { + // type: String, + // default: '' + // }, + // 1.4.0 浠ヤ笅灞炴�у凡缁忓簾寮冿紝璇蜂娇鐢� #label 鎻掓Ы浠f浛 + leftIcon: String, + iconColor: { + type: String, + default: '#606266' + }, + }, + data() { + return { + errMsg: '', + isRequired: false, + userRules: null, + localLabelAlign: 'left', + localLabelWidth: '65px', + localLabelPos: 'left', + border: false, + isFirstBorder: false, + }; + }, + computed: { + // 澶勭悊閿欒淇℃伅 + msg() { + return this.errorMessage || this.errMsg; + } + }, + watch: { + // 瑙勫垯鍙戠敓鍙樺寲閫氱煡瀛愮粍浠舵洿鏂� + 'form.formRules'(val) { + // TODO 澶勭悊澶存潯vue3 watch涓嶇敓鏁堢殑闂 + // #ifndef MP-TOUTIAO + this.init() + // #endif + }, + 'form.labelWidth'(val) { + // 瀹藉害 + this.localLabelWidth = this._labelWidthUnit(val) + + }, + 'form.labelPosition'(val) { + // 鏍囩浣嶇疆 + this.localLabelPos = this._labelPosition() + }, + 'form.labelAlign'(val) { + + } + }, + created() { + this.init(true) + if (this.name && this.form) { + // TODO 澶勭悊澶存潯vue3 watch涓嶇敓鏁堢殑闂 + // #ifdef MP-TOUTIAO + this.$watch('form.formRules', () => { + this.init() + }) + // #endif + + // 鐩戝惉鍙樺寲 + this.$watch( + () => { + const val = this.form._getDataValue(this.name, this.form.localData) + return val + }, + (value, oldVal) => { + const isEqual = this.form._isEqual(value, oldVal) + // 绠�鍗曞垽鏂墠鍚庡�肩殑鍙樺寲锛屽彧鏈夊彂鐢熷彉鍖栨墠浼氬彂鐢熸牎楠� + // TODO 濡傛灉 oldVal = undefined 锛岄偅涔堝ぇ姒傜巼鏄簮鏁版嵁閲屾病鏈夊�煎鑷� 锛岃繖涓儏鍐典笉鍝︽牎楠� ,鍙兘涓嶄弗璋� 锛岄渶瑕佸湪鍋氳瀵� + // fix by mehaotian 鏆傛椂鍙栨秷 && oldVal !== undefined 锛屽鏋渇ormData 涓笉瀛樺湪锛屽彲鑳戒細涓嶆牎楠� + if (!isEqual) { + const val = this.itemSetValue(value) + this.onFieldChange(val, false) + } + }, { + immediate: false + } + ); + } + + }, + // #ifndef VUE3 + destroyed() { + if (this.__isUnmounted) return + this.unInit() + }, + // #endif + // #ifdef VUE3 + unmounted() { + this.__isUnmounted = true + this.unInit() + }, + // #endif + methods: { + /** + * 澶栭儴璋冪敤鏂规硶 + * 璁剧疆瑙勫垯 锛屼富瑕佺敤浜庡皬绋嬪簭鑷畾涔夋楠岃鍒� + * @param {Array} rules 瑙勫垯婧愭暟鎹� + */ + setRules(rules = null) { + this.userRules = rules + this.init(false) + }, + // 鍏煎鑰佺増鏈〃鍗曠粍浠� + setValue() { + // console.log('setValue 鏂规硶宸茬粡寮冪敤锛岃浣跨敤鏈�鏂扮増鏈殑 uni-forms 琛ㄥ崟缁勪欢浠ュ強鍏朵粬鍏宠仈缁勪欢銆�'); + }, + /** + * 澶栭儴璋冪敤鏂规硶 + * 鏍¢獙鏁版嵁 + * @param {any} value 闇�瑕佹牎楠岀殑鏁版嵁 + * @param {boolean} 鏄惁绔嬪嵆鏍¢獙 + * @return {Array|null} 鏍¢獙鍐呭 + */ + async onFieldChange(value, formtrigger = true) { + const { + formData, + localData, + errShowType, + validateCheck, + validateTrigger, + _isRequiredField, + _realName + } = this.form + const name = _realName(this.name) + if (!value) { + value = this.form.formData[name] + } + // fixd by mehaotian 涓嶅湪鏍¢獙鍓嶆竻绌轰俊鎭紝瑙e喅闂睆鐨勯棶棰� + // this.errMsg = ''; + + // fix by mehaotian 瑙e喅娌℃湁妫�楠岃鍒欑殑鎯呭喌涓嬶紝鎶涘嚭閿欒鐨勯棶棰� + const ruleLen = this.itemRules.rules && this.itemRules.rules.length + if (!this.validator || !ruleLen || ruleLen === 0) return; + + // 妫�楠屾椂鏈� + // let trigger = this.isTrigger(this.itemRules.validateTrigger, this.validateTrigger, validateTrigger); + const isRequiredField = _isRequiredField(this.itemRules.rules || []); + let result = null; + // 鍙湁绛変簬 bind 鏃� 锛屾墠鑳藉紑鍚椂瀹炴牎楠� + if (validateTrigger === 'bind' || formtrigger) { + // 鏍¢獙褰撳墠琛ㄥ崟椤� + result = await this.validator.validateUpdate({ + [name]: value + }, + formData + ); + + // 鍒ゆ柇鏄惁蹇呭~,闈炲繀濉紝涓嶅~涓嶆牎楠岋紝濉啓鎵嶆牎楠� ,鏆傛椂鍙鐞� undefined 鍜岀┖鐨勬儏鍐� + if (!isRequiredField && (value === undefined || value === '')) { + result = null; + } + + // 鍒ゆ柇閿欒淇℃伅鏄剧ず绫诲瀷 + if (result && result.errorMessage) { + if (errShowType === 'undertext') { + // 鑾峰彇閿欒淇℃伅 + this.errMsg = !result ? '' : result.errorMessage; + } + if (errShowType === 'toast') { + uni.showToast({ + title: result.errorMessage || '鏍¢獙閿欒', + icon: 'none' + }); + } + if (errShowType === 'modal') { + uni.showModal({ + title: '鎻愮ず', + content: result.errorMessage || '鏍¢獙閿欒' + }); + } + } else { + this.errMsg = '' + } + // 閫氱煡 form 缁勪欢鏇存柊浜嬩欢 + validateCheck(result ? result : null) + } else { + this.errMsg = '' + } + return result ? result : null; + }, + /** + * 鍒濆缁勪欢鏁版嵁 + */ + init(type = false) { + const { + validator, + formRules, + childrens, + formData, + localData, + _realName, + labelWidth, + _getDataValue, + _setDataValue + } = this.form || {} + // 瀵归綈鏂瑰紡 + this.localLabelAlign = this._justifyContent() + // 瀹藉害 + this.localLabelWidth = this._labelWidthUnit(labelWidth) + // 鏍囩浣嶇疆 + this.localLabelPos = this._labelPosition() + this.isRequired = this.required + // 灏嗛渶瑕佹牎楠岀殑瀛愮粍浠跺姞鍏orm 闃熷垪 + this.form && type && childrens.push(this) + + if (!validator || !formRules) return + // 鍒ゆ柇绗竴涓� item + if (!this.form.isFirstBorder) { + this.form.isFirstBorder = true; + this.isFirstBorder = true; + } + + // 鍒ゆ柇 group 閲岀殑绗竴涓� item + if (this.group) { + if (!this.group.isFirstBorder) { + this.group.isFirstBorder = true; + this.isFirstBorder = true; + } + } + this.border = this.form.border; + // 鑾峰彇瀛愬煙鐨勭湡瀹炲悕绉� + const name = _realName(this.name) + const itemRule = this.userRules || this.rules + if (typeof formRules === 'object' && itemRule) { + // 瀛愯鍒欐浛鎹㈢埗瑙勫垯 + formRules[name] = { + rules: itemRule + } + validator.updateSchema(formRules); + } + // 娉ㄥ唽鏍¢獙瑙勫垯 + const itemRules = formRules[name] || {} + this.itemRules = itemRules + // 娉ㄥ唽鏍¢獙鍑芥暟 + this.validator = validator + // 榛樿鍊艰祴浜� + this.itemSetValue(_getDataValue(this.name, localData)) + this.isRequired = this._isRequired() + + }, + unInit() { + if (this.form) { + const { + childrens, + formData, + _realName + } = this.form + childrens.forEach((item, index) => { + if (item === this) { + this.form.childrens.splice(index, 1) + delete formData[_realName(item.name)] + } + }) + } + }, + // 璁剧疆item 鐨勫�� + itemSetValue(value) { + const name = this.form._realName(this.name) + const rules = this.itemRules.rules || [] + const val = this.form._getValue(name, value, rules) + this.form._setDataValue(name, this.form.formData, val) + return val + }, + + /** + * 绉婚櫎璇ヨ〃鍗曢」鐨勬牎楠岀粨鏋� + */ + clearValidate() { + this.errMsg = ''; + }, + + // 鏄惁鏄剧ず鏄熷彿 + _isRequired() { + // TODO 涓嶆牴鎹鍒欐樉绀� 鏄熷彿锛岃�冭檻鍚庣画鍏煎 + // if (this.form) { + // if (this.form._isRequiredField(this.itemRules.rules || []) && this.required) { + // return true + // } + // return false + // } + return this.required + }, + + // 澶勭悊瀵归綈鏂瑰紡 + _justifyContent() { + if (this.form) { + const { + labelAlign + } = this.form + let labelAli = this.labelAlign ? this.labelAlign : labelAlign; + if (labelAli === 'left') return 'flex-start'; + if (labelAli === 'center') return 'center'; + if (labelAli === 'right') return 'flex-end'; + } + return 'flex-start'; + }, + // 澶勭悊 label瀹藉害鍗曚綅 ,缁ф壙鐖跺厓绱犵殑鍊� + _labelWidthUnit(labelWidth) { + + // if (this.form) { + // const { + // labelWidth + // } = this.form + return this.num2px(this.labelWidth ? this.labelWidth : (labelWidth || (this.label ? 65 : 'auto'))) + // } + // return '65px' + }, + // 澶勭悊 label 浣嶇疆 + _labelPosition() { + if (this.form) return this.form.labelPosition || 'left' + return 'left' + + }, + + /** + * 瑙﹀彂鏃舵満 + * @param {Object} rule 褰撳墠瑙勫垯鍐呮椂鏈� + * @param {Object} itemRlue 褰撳墠缁勪欢鏃舵満 + * @param {Object} parentRule 鐖剁粍浠舵椂鏈� + */ + isTrigger(rule, itemRlue, parentRule) { + // bind submit + if (rule === 'submit' || !rule) { + if (rule === undefined) { + if (itemRlue !== 'bind') { + if (!itemRlue) { + return parentRule === '' ? 'bind' : 'submit'; + } + return 'submit'; + } + return 'bind'; + } + return 'submit'; + } + return 'bind'; + }, + num2px(num) { + if (typeof num === 'number') { + return `${num}px` + } + return num + } + } + }; +</script> + +<style lang="scss"> + .uni-forms-item { + position: relative; + display: flex; + /* #ifdef APP-NVUE */ + // 鍦� nvue 涓紝浣跨敤 margin-bottom error 淇℃伅浼氳闅愯棌 + padding-bottom: 22px; + /* #endif */ + /* #ifndef APP-NVUE */ + margin-bottom: 22px; + /* #endif */ + flex-direction: row; + + &__label { + display: flex; + flex-direction: row; + align-items: center; + text-align: left; + font-size: 14px; + color: #606266; + height: 36px; + padding: 0 12px 0 0; + /* #ifndef APP-NVUE */ + vertical-align: middle; + flex-shrink: 0; + /* #endif */ + + /* #ifndef APP-NVUE */ + box-sizing: border-box; + + /* #endif */ + &.no-label { + padding: 0; + } + } + + &__content { + /* #ifndef MP-TOUTIAO */ + // display: flex; + // align-items: center; + /* #endif */ + position: relative; + font-size: 14px; + flex: 1; + /* #ifndef APP-NVUE */ + box-sizing: border-box; + /* #endif */ + flex-direction: row; + + /* #ifndef APP || H5 || MP-WEIXIN || APP-NVUE */ + // TODO 鍥犱负灏忕▼搴忓钩鍙颁細澶氫竴灞傛爣绛捐妭鐐� 锛屾墍浠ラ渶瑕佸湪澶氫綑鑺傜偣缁ф壙褰撳墠鏍峰紡 + &>uni-easyinput, + &>uni-data-picker { + width: 100%; + } + + /* #endif */ + + } + + & .uni-forms-item__nuve-content { + display: flex; + flex-direction: column; + flex: 1; + } + + &__error { + color: #f56c6c; + font-size: 12px; + line-height: 1; + padding-top: 4px; + position: absolute; + /* #ifndef APP-NVUE */ + top: 100%; + left: 0; + transition: transform 0.3s; + transform: translateY(-100%); + /* #endif */ + /* #ifdef APP-NVUE */ + bottom: 5px; + /* #endif */ + + opacity: 0; + + .error-text { + // 鍙湁 nvue 涓嬭繖涓牱寮忔墠鐢熸晥 + color: #f56c6c; + font-size: 12px; + } + + &.msg--active { + opacity: 1; + transform: translateY(0%); + } + } + + // 浣嶇疆淇グ鏍峰紡 + &.is-direction-left { + flex-direction: row; + } + + &.is-direction-top { + flex-direction: column; + + .uni-forms-item__label { + padding: 0 0 8px; + line-height: 1.5715; + text-align: left; + /* #ifndef APP-NVUE */ + white-space: initial; + /* #endif */ + } + } + + .is-required { + // color: $uni-color-error; + color: #dd524d; + font-weight: bold; + } + } + + + .uni-forms-item--border { + margin-bottom: 0; + padding: 10px 0; + // padding-bottom: 0; + border-top: 1px #eee solid; + + /* #ifndef APP-NVUE */ + .uni-forms-item__content { + flex-direction: column; + justify-content: flex-start; + align-items: flex-start; + + .uni-forms-item__error { + position: relative; + top: 5px; + left: 0; + padding-top: 0; + } + } + + /* #endif */ + + /* #ifdef APP-NVUE */ + display: flex; + flex-direction: column; + + .uni-forms-item__error { + position: relative; + top: 0px; + left: 0; + padding-top: 0; + margin-top: 5px; + } + + /* #endif */ + + } + + .is-first-border { + /* #ifndef APP-NVUE */ + border: none; + /* #endif */ + /* #ifdef APP-NVUE */ + border-width: 0; + /* #endif */ + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-forms/components/uni-forms/uni-forms.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-forms/components/uni-forms/uni-forms.vue" new file mode 100644 index 0000000..ed2f6d9 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-forms/components/uni-forms/uni-forms.vue" @@ -0,0 +1,397 @@ +<template> + <view class="uni-forms"> + <form> + <slot></slot> + </form> + </view> +</template> + +<script> + import Validator from './validate.js'; + import { + deepCopy, + getValue, + isRequiredField, + setDataValue, + getDataValue, + realName, + isRealName, + rawData, + isEqual + } from './utils.js' + + // #ifndef VUE3 + // 鍚庣画浼氭參鎱㈠簾寮冭繖涓柟娉� + import Vue from 'vue'; + Vue.prototype.binddata = function(name, value, formName) { + if (formName) { + this.$refs[formName].setValue(name, value); + } else { + let formVm; + for (let i in this.$refs) { + const vm = this.$refs[i]; + if (vm && vm.$options && vm.$options.name === 'uniForms') { + formVm = vm; + break; + } + } + if (!formVm) return console.error('褰撳墠 uni-froms 缁勪欢缂哄皯 ref 灞炴��'); + formVm.setValue(name, value); + } + }; + // #endif + /** + * Forms 琛ㄥ崟 + * @description 鐢辫緭鍏ユ銆侀�夋嫨鍣ㄣ�佸崟閫夋銆佸閫夋绛夋帶浠剁粍鎴愶紝鐢ㄤ互鏀堕泦銆佹牎楠屻�佹彁浜ゆ暟鎹� + * @tutorial https://ext.dcloud.net.cn/plugin?id=2773 + * @property {Object} rules 琛ㄥ崟鏍¢獙瑙勫垯 + * @property {String} validateTrigger = [bind|submit|blur] 鏍¢獙瑙﹀彂鍣ㄦ柟寮� 榛樿 submit + * @value bind 鍙戠敓鍙樺寲鏃惰Е鍙� + * @value submit 鎻愪氦鏃惰Е鍙� + * @value blur 澶卞幓鐒︾偣鏃惰Е鍙� + * @property {String} labelPosition = [top|left] label 浣嶇疆 榛樿 left + * @value top 椤堕儴鏄剧ず label + * @value left 宸︿晶鏄剧ず label + * @property {String} labelWidth label 瀹藉害锛岄粯璁� 65px + * @property {String} labelAlign = [left|center|right] label 灞呬腑鏂瑰紡 榛樿 left + * @value left label 宸︿晶鏄剧ず + * @value center label 灞呬腑 + * @value right label 鍙充晶瀵归綈 + * @property {String} errShowType = [undertext|toast|modal] 鏍¢獙閿欒淇℃伅鎻愮ず鏂瑰紡 + * @value undertext 閿欒淇℃伅鍦ㄥ簳閮ㄦ樉绀� + * @value toast 閿欒淇℃伅toast鏄剧ず + * @value modal 閿欒淇℃伅modal鏄剧ず + * @event {Function} submit 鎻愪氦鏃惰Е鍙� + * @event {Function} validate 鏍¢獙缁撴灉鍙戠敓鍙樺寲瑙﹀彂 + */ + export default { + name: 'uniForms', + emits: ['validate', 'submit'], + options: { + virtualHost: true + }, + props: { + // 鍗冲皢寮冪敤 + value: { + type: Object, + default () { + return null; + } + }, + // vue3 鏇挎崲 value 灞炴�� + modelValue: { + type: Object, + default () { + return null; + } + }, + // 1.4.0 寮�濮嬪皢涓嶆敮鎸� v-model 锛屼笖搴熷純 value 鍜� modelValue + model: { + type: Object, + default () { + return null; + } + }, + // 琛ㄥ崟鏍¢獙瑙勫垯 + rules: { + type: Object, + default () { + return {}; + } + }, + //鏍¢獙閿欒淇℃伅鎻愮ず鏂瑰紡 榛樿 undertext 鍙栧�� [undertext|toast|modal] + errShowType: { + type: String, + default: 'undertext' + }, + // 鏍¢獙瑙﹀彂鍣ㄦ柟寮� 榛樿 bind 鍙栧�� [bind|submit] + validateTrigger: { + type: String, + default: 'submit' + }, + // label 浣嶇疆锛岄粯璁� left 鍙栧�� top/left + labelPosition: { + type: String, + default: 'left' + }, + // label 瀹藉害 + labelWidth: { + type: [String, Number], + default: '' + }, + // label 灞呬腑鏂瑰紡锛岄粯璁� left 鍙栧�� left/center/right + labelAlign: { + type: String, + default: 'left' + }, + border: { + type: Boolean, + default: false + } + }, + provide() { + return { + uniForm: this + } + }, + data() { + return { + // 琛ㄥ崟鏈湴鍊肩殑璁板綍锛屼笉搴旇涓庝紶濡傜殑鍊艰繘琛屽叧鑱� + formData: {}, + formRules: {} + }; + }, + computed: { + // 璁$畻鏁版嵁婧愬彉鍖栫殑 + localData() { + const localVal = this.model || this.modelValue || this.value + if (localVal) { + return deepCopy(localVal) + } + return {} + } + }, + watch: { + // 鐩戝惉鏁版嵁鍙樺寲 ,鏆傛椂涓嶄娇鐢紝闇�瑕佸崟鐙祴鍊� + // localData: {}, + // 鐩戝惉瑙勫垯鍙樺寲 + rules: { + handler: function(val, oldVal) { + this.setRules(val) + }, + deep: true, + immediate: true + } + }, + created() { + // #ifdef VUE3 + let getbinddata = getApp().$vm.$.appContext.config.globalProperties.binddata + if (!getbinddata) { + getApp().$vm.$.appContext.config.globalProperties.binddata = function(name, value, formName) { + if (formName) { + this.$refs[formName].setValue(name, value); + } else { + let formVm; + for (let i in this.$refs) { + const vm = this.$refs[i]; + if (vm && vm.$options && vm.$options.name === 'uniForms') { + formVm = vm; + break; + } + } + if (!formVm) return console.error('褰撳墠 uni-froms 缁勪欢缂哄皯 ref 灞炴��'); + formVm.setValue(name, value); + } + } + } + // #endif + + // 瀛愮粍浠跺疄渚嬫暟缁� + this.childrens = [] + // TODO 鍏煎鏃х増 uni-data-picker ,鏂扮増鏈腑鏃犳晥锛屽彧鏄伩鍏嶆姤閿� + this.inputChildrens = [] + this.setRules(this.rules) + }, + methods: { + /** + * 澶栭儴璋冪敤鏂规硶 + * 璁剧疆瑙勫垯 锛屼富瑕佺敤浜庡皬绋嬪簭鑷畾涔夋楠岃鍒� + * @param {Array} rules 瑙勫垯婧愭暟鎹� + */ + setRules(rules) { + // TODO 鏈夊彲鑳藉瓙缁勪欢鍚堝苟瑙勫垯鐨勬椂鏈烘瘮杩欎釜瑕佹棭锛屾墍浠ラ渶瑕佸悎骞跺璞� 锛岃�屼笉鏄洿鎺ヨ祴鍊硷紝鍙兘浼氳瑕嗙洊 + this.formRules = Object.assign({}, this.formRules, rules) + // 鍒濆鍖栨牎楠屽嚱鏁� + this.validator = new Validator(rules); + }, + + /** + * 澶栭儴璋冪敤鏂规硶 + * 璁剧疆鏁版嵁锛岀敤浜庤缃〃鍗曟暟鎹紝鍏紑缁欑敤鎴蜂娇鐢� 锛� 涓嶆敮鎸佸湪鍔ㄦ�佽〃鍗曚腑浣跨敤 + * @param {Object} key + * @param {Object} value + */ + setValue(key, value) { + let example = this.childrens.find(child => child.name === key); + if (!example) return null; + this.formData[key] = getValue(key, value, (this.formRules[key] && this.formRules[key].rules) || []) + return example.onFieldChange(this.formData[key]); + }, + + /** + * 澶栭儴璋冪敤鏂规硶 + * 鎵嬪姩鎻愪氦鏍¢獙琛ㄥ崟 + * 瀵规暣涓〃鍗曡繘琛屾牎楠岀殑鏂规硶锛屽弬鏁颁负涓�涓洖璋冨嚱鏁般�� + * @param {Array} keepitem 淇濈暀涓嶅弬涓庢牎楠岀殑瀛楁 + * @param {type} callback 鏂规硶鍥炶皟 + */ + validate(keepitem, callback) { + return this.checkAll(this.formData, keepitem, callback); + }, + + /** + * 澶栭儴璋冪敤鏂规硶 + * 閮ㄥ垎琛ㄥ崟鏍¢獙 + * @param {Array|String} props 闇�瑕佹牎楠岀殑瀛楁 + * @param {Function} 鍥炶皟鍑芥暟 + */ + validateField(props = [], callback) { + props = [].concat(props); + let invalidFields = {}; + this.childrens.forEach(item => { + const name = realName(item.name) + if (props.indexOf(name) !== -1) { + invalidFields = Object.assign({}, invalidFields, { + [name]: this.formData[name] + }); + } + }); + return this.checkAll(invalidFields, [], callback); + }, + + /** + * 澶栭儴璋冪敤鏂规硶 + * 绉婚櫎琛ㄥ崟椤圭殑鏍¢獙缁撴灉銆備紶鍏ュ緟绉婚櫎鐨勮〃鍗曢」鐨� prop 灞炴�ф垨鑰� prop 缁勬垚鐨勬暟缁勶紝濡備笉浼犲垯绉婚櫎鏁翠釜琛ㄥ崟鐨勬牎楠岀粨鏋� + * @param {Array|String} props 闇�瑕佺Щ闄ゆ牎楠岀殑瀛楁 锛屼笉濉负鎵�鏈� + */ + clearValidate(props = []) { + props = [].concat(props); + this.childrens.forEach(item => { + if (props.length === 0) { + item.errMsg = ''; + } else { + const name = realName(item.name) + if (props.indexOf(name) !== -1) { + item.errMsg = ''; + } + } + }); + }, + + /** + * 澶栭儴璋冪敤鏂规硶 锛屽嵆灏嗗簾寮� + * 鎵嬪姩鎻愪氦鏍¢獙琛ㄥ崟 + * 瀵规暣涓〃鍗曡繘琛屾牎楠岀殑鏂规硶锛屽弬鏁颁负涓�涓洖璋冨嚱鏁般�� + * @param {Array} keepitem 淇濈暀涓嶅弬涓庢牎楠岀殑瀛楁 + * @param {type} callback 鏂规硶鍥炶皟 + */ + submit(keepitem, callback, type) { + for (let i in this.dataValue) { + const itemData = this.childrens.find(v => v.name === i); + if (itemData) { + if (this.formData[i] === undefined) { + this.formData[i] = this._getValue(i, this.dataValue[i]); + } + } + } + + if (!type) { + console.warn('submit 鏂规硶鍗冲皢搴熷純锛岃浣跨敤validate鏂规硶浠f浛锛�'); + } + + return this.checkAll(this.formData, keepitem, callback, 'submit'); + }, + + // 鏍¢獙鎵�鏈� + async checkAll(invalidFields, keepitem, callback, type) { + // 涓嶅瓨鍦ㄦ牎楠岃鍒� 锛屽垯鍋滄鏍¢獙娴佺▼ + if (!this.validator) return + let childrens = [] + // 澶勭悊鍙備笌鏍¢獙鐨刬tem瀹炰緥 + for (let i in invalidFields) { + const item = this.childrens.find(v => realName(v.name) === i) + if (item) { + childrens.push(item) + } + } + + // 濡傛灉validate绗竴涓弬鏁版槸funciont ,閭e氨璧板洖璋� + if (!callback && typeof keepitem === 'function') { + callback = keepitem; + } + + let promise; + // 濡傛灉涓嶅瓨鍦ㄥ洖璋冿紝閭d箞浣跨敤 Promise 鏂瑰紡杩斿洖 + if (!callback && typeof callback !== 'function' && Promise) { + promise = new Promise((resolve, reject) => { + callback = function(valid, invalidFields) { + !valid ? resolve(invalidFields) : reject(valid); + }; + }); + } + + let results = []; + // 閬垮厤寮曠敤閿欎贡 锛屽缓璁嫹璐濆璞″鐞� + let tempFormData = JSON.parse(JSON.stringify(invalidFields)) + // 鎵�鏈夊瓙缁勪欢鍙備笌鏍¢獙,浣跨敤 for 鍙互浣跨敤 awiat + for (let i in childrens) { + const child = childrens[i] + let name = realName(child.name); + const result = await child.onFieldChange(tempFormData[name]); + if (result) { + results.push(result); + // toast ,modal 鍙渶瑕佹墽琛岀涓�娆″氨鍙互 + if (this.errShowType === 'toast' || this.errShowType === 'modal') break; + } + } + + + if (Array.isArray(results)) { + if (results.length === 0) results = null; + } + if (Array.isArray(keepitem)) { + keepitem.forEach(v => { + let vName = realName(v); + let value = getDataValue(v, this.localData) + if (value !== undefined) { + tempFormData[vName] = value + } + }); + } + + // TODO submit 鍗冲皢搴熷純 + if (type === 'submit') { + this.$emit('submit', { + detail: { + value: tempFormData, + errors: results + } + }); + } else { + this.$emit('validate', results); + } + + // const resetFormData = rawData(tempFormData, this.localData, this.name) + let resetFormData = {} + resetFormData = rawData(tempFormData, this.name) + callback && typeof callback === 'function' && callback(results, resetFormData); + + if (promise && callback) { + return promise; + } else { + return null; + } + + }, + + /** + * 杩斿洖validate浜嬩欢 + * @param {Object} result + */ + validateCheck(result) { + this.$emit('validate', result); + }, + _getValue: getValue, + _isRequiredField: isRequiredField, + _setDataValue: setDataValue, + _getDataValue: getDataValue, + _realName: realName, + _isRealName: isRealName, + _isEqual: isEqual + } + }; +</script> + +<style lang="scss"> + .uni-forms {} +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-forms/components/uni-forms/utils.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-forms/components/uni-forms/utils.js" new file mode 100644 index 0000000..6da2421 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-forms/components/uni-forms/utils.js" @@ -0,0 +1,293 @@ +/** + * 绠�鍗曞鐞嗗璞℃嫹璐� + * @param {Obejct} 琚嫹璐濆璞� + * @@return {Object} 鎷疯礉瀵硅薄 + */ +export const deepCopy = (val) => { + return JSON.parse(JSON.stringify(val)) +} +/** + * 杩囨护鏁板瓧绫诲瀷 + * @param {String} format 鏁板瓧绫诲瀷 + * @@return {Boolean} 杩斿洖鏄惁涓烘暟瀛楃被鍨� + */ +export const typeFilter = (format) => { + return format === 'int' || format === 'double' || format === 'number' || format === 'timestamp'; +} + +/** + * 鎶� value 杞崲鎴愭寚瀹氱殑绫诲瀷锛岀敤浜庡鐞嗗垵濮嬪�硷紝鍘熷洜鏄垵濮嬪�奸渶瑕佸叆搴撲笉鑳戒负 undefined + * @param {String} key 瀛楁鍚� + * @param {any} value 瀛楁鍊� + * @param {Object} rules 琛ㄥ崟鏍¢獙瑙勫垯 + */ +export const getValue = (key, value, rules) => { + const isRuleNumType = rules.find(val => val.format && typeFilter(val.format)); + const isRuleBoolType = rules.find(val => (val.format && val.format === 'boolean') || val.format === 'bool'); + // 杈撳叆绫诲瀷涓� number + if (!!isRuleNumType) { + if (!value && value !== 0) { + value = null + } else { + value = isNumber(Number(value)) ? Number(value) : value + } + } + + // 杈撳叆绫诲瀷涓� boolean + if (!!isRuleBoolType) { + value = isBoolean(value) ? value : false + } + + return value; +} + +/** + * 鑾峰彇琛ㄥ崟鏁版嵁 + * @param {String|Array} name 鐪熷疄鍚嶇О锛岄渶瑕佷娇鐢� realName 鑾峰彇 + * @param {Object} data 鍘熷鏁版嵁 + * @param {any} value 闇�瑕佽缃殑鍊� + */ +export const setDataValue = (field, formdata, value) => { + formdata[field] = value + return value || '' +} + +/** + * 鑾峰彇琛ㄥ崟鏁版嵁 + * @param {String|Array} field 鐪熷疄鍚嶇О锛岄渶瑕佷娇鐢� realName 鑾峰彇 + * @param {Object} data 鍘熷鏁版嵁 + */ +export const getDataValue = (field, data) => { + return objGet(data, field) +} + +/** + * 鑾峰彇琛ㄥ崟绫诲瀷 + * @param {String|Array} field 鐪熷疄鍚嶇О锛岄渶瑕佷娇鐢� realName 鑾峰彇 + */ +export const getDataValueType = (field, data) => { + const value = getDataValue(field, data) + return { + type: type(value), + value + } +} + +/** + * 鑾峰彇琛ㄥ崟鍙敤鐨勭湡瀹瀗ame + * @param {String|Array} name 琛ㄥ崟name + * @@return {String} 琛ㄥ崟鍙敤鐨勭湡瀹瀗ame + */ +export const realName = (name, data = {}) => { + const base_name = _basePath(name) + if (typeof base_name === 'object' && Array.isArray(base_name) && base_name.length > 1) { + const realname = base_name.reduce((a, b) => a += `#${b}`, '_formdata_') + return realname + } + return base_name[0] || name +} + +/** + * 鍒ゆ柇鏄惁琛ㄥ崟鍙敤鐨勭湡瀹瀗ame + * @param {String|Array} name 琛ㄥ崟name + * @@return {String} 琛ㄥ崟鍙敤鐨勭湡瀹瀗ame + */ +export const isRealName = (name) => { + const reg = /^_formdata_#*/ + return reg.test(name) +} + +/** + * 鑾峰彇琛ㄥ崟鏁版嵁鐨勫師濮嬫牸寮� + * @@return {Object|Array} object 闇�瑕佽В鏋愮殑鏁版嵁 + */ +export const rawData = (object = {}, name) => { + let newData = JSON.parse(JSON.stringify(object)) + let formData = {} + for(let i in newData){ + let path = name2arr(i) + objSet(formData,path,newData[i]) + } + return formData +} + +/** + * 鐪熷疄name杩樺師涓� array + * @param {*} name + */ +export const name2arr = (name) => { + let field = name.replace('_formdata_#', '') + field = field.split('#').map(v => (isNumber(v) ? Number(v) : v)) + return field +} + +/** + * 瀵硅薄涓缃�� + * @param {Object|Array} object 婧愭暟鎹� + * @param {String| Array} path 'a.b.c' 鎴� ['a',0,'b','c'] + * @param {String} value 闇�瑕佽缃殑鍊� + */ +export const objSet = (object, path, value) => { + if (typeof object !== 'object') return object; + _basePath(path).reduce((o, k, i, _) => { + if (i === _.length - 1) { + // 鑻ラ亶鍘嗙粨鏉熺洿鎺ヨ祴鍊� + o[k] = value + return null + } else if (k in o) { + // 鑻ュ瓨鍦ㄥ搴旇矾寰勶紝鍒欒繑鍥炴壘鍒扮殑瀵硅薄锛岃繘琛屼笅涓�娆¢亶鍘� + return o[k] + } else { + // 鑻ヤ笉瀛樺湪瀵瑰簲璺緞锛屽垯鍒涘缓瀵瑰簲瀵硅薄锛岃嫢涓嬩竴璺緞鏄暟瀛楋紝鏂板璞¤祴鍊间负绌烘暟缁勶紝鍚﹀垯璧嬪�间负绌哄璞� + o[k] = /^[0-9]{1,}$/.test(_[i + 1]) ? [] : {} + return o[k] + } + }, object) + // 杩斿洖object + return object; +} + +// 澶勭悊 path锛� path鏈変笁绉嶅舰寮忥細'a[0].b.c'銆�'a.0.b.c' 鍜� ['a','0','b','c']锛岄渶瑕佺粺涓�澶勭悊鎴愭暟缁勶紝渚夸簬鍚庣画浣跨敤 +function _basePath(path) { + // 鑻ユ槸鏁扮粍锛屽垯鐩存帴杩斿洖 + if (Array.isArray(path)) return path + // 鑻ユ湁 '[',']'锛屽垯鏇挎崲鎴愬皢 '[' 鏇挎崲鎴� '.',鍘绘帀 ']' + return path.replace(/\[/g, '.').replace(/\]/g, '').split('.') +} + +/** + * 浠庡璞′腑鑾峰彇鍊� + * @param {Object|Array} object 婧愭暟鎹� + * @param {String| Array} path 'a.b.c' 鎴� ['a',0,'b','c'] + * @param {String} defaultVal 濡傛灉鏃犳硶浠庤皟鐢ㄩ摼涓幏鍙栧�肩殑榛樿鍊� + */ +export const objGet = (object, path, defaultVal = 'undefined') => { + // 鍏堝皢path澶勭悊鎴愮粺涓�鏍煎紡 + let newPath = _basePath(path) + // 閫掑綊澶勭悊锛岃繑鍥炴渶鍚庣粨鏋� + let val = newPath.reduce((o, k) => { + return (o || {})[k] + }, object); + return !val || val !== undefined ? val : defaultVal +} + + +/** + * 鏄惁涓� number 绫诲瀷 + * @param {any} num 闇�瑕佸垽鏂殑鍊� + * @return {Boolean} 鏄惁涓� number + */ +export const isNumber = (num) => { + return !isNaN(Number(num)) +} + +/** + * 鏄惁涓� boolean 绫诲瀷 + * @param {any} bool 闇�瑕佸垽鏂殑鍊� + * @return {Boolean} 鏄惁涓� boolean + */ +export const isBoolean = (bool) => { + return (typeof bool === 'boolean') +} +/** + * 鏄惁鏈夊繀濉瓧娈� + * @param {Object} rules 瑙勫垯 + * @return {Boolean} 鏄惁鏈夊繀濉瓧娈� + */ +export const isRequiredField = (rules) => { + let isNoField = false; + for (let i = 0; i < rules.length; i++) { + const ruleData = rules[i]; + if (ruleData.required) { + isNoField = true; + break; + } + } + return isNoField; +} + + +/** + * 鑾峰彇鏁版嵁绫诲瀷 + * @param {Any} obj 闇�瑕佽幏鍙栨暟鎹被鍨嬬殑鍊� + */ +export const type = (obj) => { + var class2type = {}; + + // 鐢熸垚class2type鏄犲皠 + "Boolean Number String Function Array Date RegExp Object Error".split(" ").map(function(item, index) { + class2type["[object " + item + "]"] = item.toLowerCase(); + }) + if (obj == null) { + return obj + ""; + } + return typeof obj === "object" || typeof obj === "function" ? + class2type[Object.prototype.toString.call(obj)] || "object" : + typeof obj; +} + +/** + * 鍒ゆ柇涓や釜鍊兼槸鍚︾浉绛� + * @param {any} a 鍊� + * @param {any} b 鍊� + * @return {Boolean} 鏄惁鐩哥瓑 + */ +export const isEqual = (a, b) => { + //濡傛灉a鍜宐鏈潵灏卞叏绛� + if (a === b) { + //鍒ゆ柇鏄惁涓�0鍜�-0 + return a !== 0 || 1 / a === 1 / b; + } + //鍒ゆ柇鏄惁涓簄ull鍜寀ndefined + if (a == null || b == null) { + return a === b; + } + //鎺ヤ笅鏉ュ垽鏂璦鍜宐鐨勬暟鎹被鍨� + var classNameA = toString.call(a), + classNameB = toString.call(b); + //濡傛灉鏁版嵁绫诲瀷涓嶇浉绛夛紝鍒欒繑鍥瀎alse + if (classNameA !== classNameB) { + return false; + } + //濡傛灉鏁版嵁绫诲瀷鐩哥瓑锛屽啀鏍规嵁涓嶅悓鏁版嵁绫诲瀷鍒嗗埆鍒ゆ柇 + switch (classNameA) { + case '[object RegExp]': + case '[object String]': + //杩涜瀛楃涓茶浆鎹㈡瘮杈� + return '' + a === '' + b; + case '[object Number]': + //杩涜鏁板瓧杞崲姣旇緝,鍒ゆ柇鏄惁涓篘aN + if (+a !== +a) { + return +b !== +b; + } + //鍒ゆ柇鏄惁涓�0鎴�-0 + return +a === 0 ? 1 / +a === 1 / b : +a === +b; + case '[object Date]': + case '[object Boolean]': + return +a === +b; + } + //濡傛灉鏄璞$被鍨� + if (classNameA == '[object Object]') { + //鑾峰彇a鍜宐鐨勫睘鎬ч暱搴� + var propsA = Object.getOwnPropertyNames(a), + propsB = Object.getOwnPropertyNames(b); + if (propsA.length != propsB.length) { + return false; + } + for (var i = 0; i < propsA.length; i++) { + var propName = propsA[i]; + //濡傛灉瀵瑰簲灞炴�у搴斿�间笉鐩哥瓑锛屽垯杩斿洖false + if (a[propName] !== b[propName]) { + return false; + } + } + return true; + } + //濡傛灉鏄暟缁勭被鍨� + if (classNameA == '[object Array]') { + if (a.toString() == b.toString()) { + return true; + } + return false; + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-forms/components/uni-forms/validate.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-forms/components/uni-forms/validate.js" new file mode 100644 index 0000000..1834c6c --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-forms/components/uni-forms/validate.js" @@ -0,0 +1,486 @@ +var pattern = { + email: /^\S+?@\S+?\.\S+?$/, + idcard: /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/, + url: new RegExp( + "^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$", + 'i') +}; + +const FORMAT_MAPPING = { + "int": 'integer', + "bool": 'boolean', + "double": 'number', + "long": 'number', + "password": 'string' + // "fileurls": 'array' +} + +function formatMessage(args, resources = '') { + var defaultMessage = ['label'] + defaultMessage.forEach((item) => { + if (args[item] === undefined) { + args[item] = '' + } + }) + + let str = resources + for (let key in args) { + let reg = new RegExp('{' + key + '}') + str = str.replace(reg, args[key]) + } + return str +} + +function isEmptyValue(value, type) { + if (value === undefined || value === null) { + return true; + } + + if (typeof value === 'string' && !value) { + return true; + } + + if (Array.isArray(value) && !value.length) { + return true; + } + + if (type === 'object' && !Object.keys(value).length) { + return true; + } + + return false; +} + +const types = { + integer(value) { + return types.number(value) && parseInt(value, 10) === value; + }, + string(value) { + return typeof value === 'string'; + }, + number(value) { + if (isNaN(value)) { + return false; + } + return typeof value === 'number'; + }, + "boolean": function(value) { + return typeof value === 'boolean'; + }, + "float": function(value) { + return types.number(value) && !types.integer(value); + }, + array(value) { + return Array.isArray(value); + }, + object(value) { + return typeof value === 'object' && !types.array(value); + }, + date(value) { + return value instanceof Date; + }, + timestamp(value) { + if (!this.integer(value) || Math.abs(value).toString().length > 16) { + return false + } + return true; + }, + file(value) { + return typeof value.url === 'string'; + }, + email(value) { + return typeof value === 'string' && !!value.match(pattern.email) && value.length < 255; + }, + url(value) { + return typeof value === 'string' && !!value.match(pattern.url); + }, + pattern(reg, value) { + try { + return new RegExp(reg).test(value); + } catch (e) { + return false; + } + }, + method(value) { + return typeof value === 'function'; + }, + idcard(value) { + return typeof value === 'string' && !!value.match(pattern.idcard); + }, + 'url-https'(value) { + return this.url(value) && value.startsWith('https://'); + }, + 'url-scheme'(value) { + return value.startsWith('://'); + }, + 'url-web'(value) { + return false; + } +} + +class RuleValidator { + + constructor(message) { + this._message = message + } + + async validateRule(fieldKey, fieldValue, value, data, allData) { + var result = null + + let rules = fieldValue.rules + + let hasRequired = rules.findIndex((item) => { + return item.required + }) + if (hasRequired < 0) { + if (value === null || value === undefined) { + return result + } + if (typeof value === 'string' && !value.length) { + return result + } + } + + var message = this._message + + if (rules === undefined) { + return message['default'] + } + + for (var i = 0; i < rules.length; i++) { + let rule = rules[i] + let vt = this._getValidateType(rule) + + Object.assign(rule, { + label: fieldValue.label || `["${fieldKey}"]` + }) + + if (RuleValidatorHelper[vt]) { + result = RuleValidatorHelper[vt](rule, value, message) + if (result != null) { + break + } + } + + if (rule.validateExpr) { + let now = Date.now() + let resultExpr = rule.validateExpr(value, allData, now) + if (resultExpr === false) { + result = this._getMessage(rule, rule.errorMessage || this._message['default']) + break + } + } + + if (rule.validateFunction) { + result = await this.validateFunction(rule, value, data, allData, vt) + if (result !== null) { + break + } + } + } + + if (result !== null) { + result = message.TAG + result + } + + return result + } + + async validateFunction(rule, value, data, allData, vt) { + let result = null + try { + let callbackMessage = null + const res = await rule.validateFunction(rule, value, allData || data, (message) => { + callbackMessage = message + }) + if (callbackMessage || (typeof res === 'string' && res) || res === false) { + result = this._getMessage(rule, callbackMessage || res, vt) + } + } catch (e) { + result = this._getMessage(rule, e.message, vt) + } + return result + } + + _getMessage(rule, message, vt) { + return formatMessage(rule, message || rule.errorMessage || this._message[vt] || message['default']) + } + + _getValidateType(rule) { + var result = '' + if (rule.required) { + result = 'required' + } else if (rule.format) { + result = 'format' + } else if (rule.arrayType) { + result = 'arrayTypeFormat' + } else if (rule.range) { + result = 'range' + } else if (rule.maximum !== undefined || rule.minimum !== undefined) { + result = 'rangeNumber' + } else if (rule.maxLength !== undefined || rule.minLength !== undefined) { + result = 'rangeLength' + } else if (rule.pattern) { + result = 'pattern' + } else if (rule.validateFunction) { + result = 'validateFunction' + } + return result + } +} + +const RuleValidatorHelper = { + required(rule, value, message) { + if (rule.required && isEmptyValue(value, rule.format || typeof value)) { + return formatMessage(rule, rule.errorMessage || message.required); + } + + return null + }, + + range(rule, value, message) { + const { + range, + errorMessage + } = rule; + + let list = new Array(range.length); + for (let i = 0; i < range.length; i++) { + const item = range[i]; + if (types.object(item) && item.value !== undefined) { + list[i] = item.value; + } else { + list[i] = item; + } + } + + let result = false + if (Array.isArray(value)) { + result = (new Set(value.concat(list)).size === list.length); + } else { + if (list.indexOf(value) > -1) { + result = true; + } + } + + if (!result) { + return formatMessage(rule, errorMessage || message['enum']); + } + + return null + }, + + rangeNumber(rule, value, message) { + if (!types.number(value)) { + return formatMessage(rule, rule.errorMessage || message.pattern.mismatch); + } + + let { + minimum, + maximum, + exclusiveMinimum, + exclusiveMaximum + } = rule; + let min = exclusiveMinimum ? value <= minimum : value < minimum; + let max = exclusiveMaximum ? value >= maximum : value > maximum; + + if (minimum !== undefined && min) { + return formatMessage(rule, rule.errorMessage || message['number'][exclusiveMinimum ? + 'exclusiveMinimum' : 'minimum' + ]) + } else if (maximum !== undefined && max) { + return formatMessage(rule, rule.errorMessage || message['number'][exclusiveMaximum ? + 'exclusiveMaximum' : 'maximum' + ]) + } else if (minimum !== undefined && maximum !== undefined && (min || max)) { + return formatMessage(rule, rule.errorMessage || message['number'].range) + } + + return null + }, + + rangeLength(rule, value, message) { + if (!types.string(value) && !types.array(value)) { + return formatMessage(rule, rule.errorMessage || message.pattern.mismatch); + } + + let min = rule.minLength; + let max = rule.maxLength; + let val = value.length; + + if (min !== undefined && val < min) { + return formatMessage(rule, rule.errorMessage || message['length'].minLength) + } else if (max !== undefined && val > max) { + return formatMessage(rule, rule.errorMessage || message['length'].maxLength) + } else if (min !== undefined && max !== undefined && (val < min || val > max)) { + return formatMessage(rule, rule.errorMessage || message['length'].range) + } + + return null + }, + + pattern(rule, value, message) { + if (!types['pattern'](rule.pattern, value)) { + return formatMessage(rule, rule.errorMessage || message.pattern.mismatch); + } + + return null + }, + + format(rule, value, message) { + var customTypes = Object.keys(types); + var format = FORMAT_MAPPING[rule.format] ? FORMAT_MAPPING[rule.format] : (rule.format || rule.arrayType); + + if (customTypes.indexOf(format) > -1) { + if (!types[format](value)) { + return formatMessage(rule, rule.errorMessage || message.typeError); + } + } + + return null + }, + + arrayTypeFormat(rule, value, message) { + if (!Array.isArray(value)) { + return formatMessage(rule, rule.errorMessage || message.typeError); + } + + for (let i = 0; i < value.length; i++) { + const element = value[i]; + let formatResult = this.format(rule, element, message) + if (formatResult !== null) { + return formatResult + } + } + + return null + } +} + +class SchemaValidator extends RuleValidator { + + constructor(schema, options) { + super(SchemaValidator.message); + + this._schema = schema + this._options = options || null + } + + updateSchema(schema) { + this._schema = schema + } + + async validate(data, allData) { + let result = this._checkFieldInSchema(data) + if (!result) { + result = await this.invokeValidate(data, false, allData) + } + return result.length ? result[0] : null + } + + async validateAll(data, allData) { + let result = this._checkFieldInSchema(data) + if (!result) { + result = await this.invokeValidate(data, true, allData) + } + return result + } + + async validateUpdate(data, allData) { + let result = this._checkFieldInSchema(data) + if (!result) { + result = await this.invokeValidateUpdate(data, false, allData) + } + return result.length ? result[0] : null + } + + async invokeValidate(data, all, allData) { + let result = [] + let schema = this._schema + for (let key in schema) { + let value = schema[key] + let errorMessage = await this.validateRule(key, value, data[key], data, allData) + if (errorMessage != null) { + result.push({ + key, + errorMessage + }) + if (!all) break + } + } + return result + } + + async invokeValidateUpdate(data, all, allData) { + let result = [] + for (let key in data) { + let errorMessage = await this.validateRule(key, this._schema[key], data[key], data, allData) + if (errorMessage != null) { + result.push({ + key, + errorMessage + }) + if (!all) break + } + } + return result + } + + _checkFieldInSchema(data) { + var keys = Object.keys(data) + var keys2 = Object.keys(this._schema) + if (new Set(keys.concat(keys2)).size === keys2.length) { + return '' + } + + var noExistFields = keys.filter((key) => { + return keys2.indexOf(key) < 0; + }) + var errorMessage = formatMessage({ + field: JSON.stringify(noExistFields) + }, SchemaValidator.message.TAG + SchemaValidator.message['defaultInvalid']) + return [{ + key: 'invalid', + errorMessage + }] + } +} + +function Message() { + return { + TAG: "", + default: '楠岃瘉閿欒', + defaultInvalid: '鎻愪氦鐨勫瓧娈祘field}鍦ㄦ暟鎹簱涓苟涓嶅瓨鍦�', + validateFunction: '楠岃瘉鏃犳晥', + required: '{label}蹇呭~', + 'enum': '{label}瓒呭嚭鑼冨洿', + timestamp: '{label}鏍煎紡鏃犳晥', + whitespace: '{label}涓嶈兘涓虹┖', + typeError: '{label}绫诲瀷鏃犳晥', + date: { + format: '{label}鏃ユ湡{value}鏍煎紡鏃犳晥', + parse: '{label}鏃ユ湡鏃犳硶瑙f瀽,{value}鏃犳晥', + invalid: '{label}鏃ユ湡{value}鏃犳晥' + }, + length: { + minLength: '{label}闀垮害涓嶈兘灏戜簬{minLength}', + maxLength: '{label}闀垮害涓嶈兘瓒呰繃{maxLength}', + range: '{label}蹇呴』浠嬩簬{minLength}鍜寋maxLength}涔嬮棿' + }, + number: { + minimum: '{label}涓嶈兘灏忎簬{minimum}', + maximum: '{label}涓嶈兘澶т簬{maximum}', + exclusiveMinimum: '{label}涓嶈兘灏忎簬绛変簬{minimum}', + exclusiveMaximum: '{label}涓嶈兘澶т簬绛変簬{maximum}', + range: '{label}蹇呴』浠嬩簬{minimum}and{maximum}涔嬮棿' + }, + pattern: { + mismatch: '{label}鏍煎紡涓嶅尮閰�' + } + }; +} + + +SchemaValidator.message = new Message(); + +export default SchemaValidator diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-forms/package.json" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-forms/package.json" new file mode 100644 index 0000000..e3736c4 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-forms/package.json" @@ -0,0 +1,88 @@ +{ + "id": "uni-forms", + "displayName": "uni-forms 琛ㄥ崟", + "version": "1.4.8", + "description": "鐢辫緭鍏ユ銆侀�夋嫨鍣ㄣ�佸崟閫夋銆佸閫夋绛夋帶浠剁粍鎴愶紝鐢ㄤ互鏀堕泦銆佹牎楠屻�佹彁浜ゆ暟鎹�", + "keywords": [ + "uni-ui", + "琛ㄥ崟", + "鏍¢獙", + "琛ㄥ崟鏍¢獙", + "琛ㄥ崟楠岃瘉" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "" + }, + "directories": { + "example": "../../temps/example_temps" + }, +"dcloudext": { + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "鏃�", + "data": "鏃�", + "permissions": "鏃�" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui", + "type": "component-vue" + }, + "uni_modules": { + "dependencies": [ + "uni-scss", + "uni-icons" + ], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "寰俊娴忚鍣�(Android)": "y", + "QQ娴忚鍣�(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "灏忕▼搴�": { + "寰俊": "y", + "闃块噷": "y", + "鐧惧害": "y", + "瀛楄妭璺冲姩": "y", + "QQ": "y", + "浜笢": "u" + }, + "蹇簲鐢�": { + "鍗庝负": "u", + "鑱旂洘": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-forms/readme.md" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-forms/readme.md" new file mode 100644 index 0000000..63d5a04 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-forms/readme.md" @@ -0,0 +1,23 @@ + + +## Forms 琛ㄥ崟 + +> **缁勪欢鍚嶏細uni-forms** +> 浠g爜鍧楋細 `uForms`銆乣uni-forms-item` +> 鍏宠仈缁勪欢锛歚uni-forms-item`銆乣uni-easyinput`銆乣uni-data-checkbox`銆乣uni-group`銆� + + +uni-app鐨勫唴缃粍浠跺凡缁忔湁浜� `<form>`缁勪欢锛岀敤浜庢彁浜よ〃鍗曞唴瀹广�� + +鐒惰�屽嚑涔庢瘡涓〃鍗曢兘闇�瑕佸仛琛ㄥ崟楠岃瘉锛屼负浜嗘柟渚垮仛琛ㄥ崟楠岃瘉锛屽噺灏戦噸澶嶅紑鍙戯紝`uni ui` 鍙堝熀浜� `<form>`缁勪欢灏佽浜� `<uni-forms>`缁勪欢锛屽唴缃簡琛ㄥ崟楠岃瘉鍔熻兘銆� + +`<uni-forms>` 鎻愪緵浜� `rules`灞炴�ф潵鎻忚堪鏍¢獙瑙勫垯銆乣<uni-forms-item>`瀛愮粍浠舵潵鍖呰9鍏蜂綋鐨勮〃鍗曢」锛屼互鍙婄粰鍘熺敓鎴栦笁鏂圭粍浠舵彁渚涗簡 `binddata()` 鏉ヨ缃〃鍗曞�笺�� + +姣忎釜瑕佹牎楠岀殑琛ㄥ崟椤癸紝涓嶇input杩樻槸checkbox锛岄兘蹇呴』鏀惧湪`<uni-forms-item>`缁勪欢涓紝涓斾竴涓猔<uni-forms-item>`缁勪欢鍙兘鏀剧疆涓�涓〃鍗曢」銆� + +`<uni-forms-item>`缁勪欢鍐呴儴棰勭暀浜嗘樉绀篹rror message鐨勫尯鍩燂紝榛樿鏄湪琛ㄥ崟椤圭殑搴曢儴銆� + +鍙﹀锛宍<uni-forms>`缁勪欢涓嬮潰鐨勫悇涓〃鍗曢」锛屽彲浠ラ�氳繃`<uni-group>`鍖呰9涓轰笉鍚岀殑鍒嗙粍銆傚悓涓�`<uni-group>`涓嬬殑涓嶅悓琛ㄥ崟椤圭洰灏嗚仛鎷㈠湪涓�璧凤紝鍚屽叾浠杇roup淇濇寔鍨傜洿闂磋窛銆俙<uni-group>`浠呭奖鍝嶈瑙夋晥鏋溿�� + +### [鏌ョ湅鏂囨。](https://uniapp.dcloud.io/component/uniui/uni-forms) +#### 濡備娇鐢ㄨ繃绋嬩腑鏈変换浣曢棶棰橈紝鎴栬�呮偍瀵箄ni-ui鏈変竴浜涘ソ鐨勫缓璁紝娆㈣繋鍔犲叆 uni-ui 浜ゆ祦缇わ細871950839 \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-group/changelog.md" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-group/changelog.md" new file mode 100644 index 0000000..a7024fd --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-group/changelog.md" @@ -0,0 +1,16 @@ +## 1.2.2锛�2022-05-30锛� +- 鏂板 stat灞炴�э紝鏄惁寮�鍚痷ni缁熻鍔熻兘 +## 1.2.1锛�2021-11-22锛� +- 淇 vue3涓煇浜泂css鍙橀噺鏃犳硶鎵惧埌鐨勯棶棰� +## 1.2.0锛�2021-11-19锛� +- 浼樺寲 缁勪欢UI锛屽苟鎻愪緵璁捐璧勬簮锛岃瑙�:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 鏂囨。杩佺Щ锛岃瑙�:[https://uniapp.dcloud.io/component/uniui/uni-group](https://uniapp.dcloud.io/component/uniui/uni-group) +## 1.1.7锛�2021-11-08锛� +## 1.1.0锛�2021-07-30锛� +- 缁勪欢鍏煎 vue3锛屽浣曞垱寤簐ue3椤圭洰锛岃瑙� [uni-app 椤圭洰鏀寔 vue3 浠嬬粛](https://ask.dcloud.net.cn/article/37834) +- 浼樺寲 缁勪欢鏂囨。 +## 1.0.3锛�2021-05-12锛� +- 鏂板 缁勪欢绀轰緥鍦板潃 +## 1.0.2锛�2021-02-05锛� +- 璋冩暣涓簎ni_modules鐩綍瑙勮寖 +- 浼樺寲 鍏煎 nvue 椤甸潰 diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-group/components/uni-group/uni-group.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-group/components/uni-group/uni-group.vue" new file mode 100644 index 0000000..3425ecd --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-group/components/uni-group/uni-group.vue" @@ -0,0 +1,134 @@ +<template> + <view class="uni-group" :class="['uni-group--'+mode ,margin?'group-margin':'']" :style="{marginTop: `${top}px` }"> + <slot name="title"> + <view v-if="title" class="uni-group__title" :style="{'padding-left':border?'30px':'15px'}"> + <text class="uni-group__title-text">{{ title }}</text> + </view> + </slot> + <view class="uni-group__content" :class="{'group-conent-padding':border}"> + <slot /> + </view> + </view> +</template> + +<script> + /** + * Group 鍒嗙粍 + * @description 琛ㄥ崟瀛楁鍒嗙粍 + * @tutorial https://ext.dcloud.net.cn/plugin?id=3281 + * @property {String} title 涓绘爣棰� + * @property {Number} top 鍒嗙粍闂撮殧 + * @property {Number} mode 妯″紡 + */ + export default { + name: 'uniGroup', + emits:['click'], + props: { + title: { + type: String, + default: '' + }, + top: { + type: [Number, String], + default: 10 + }, + mode: { + type: String, + default: 'default' + }, + stat:{ + type: Boolean, + default: false + } + }, + data() { + return { + margin: false, + border: false + } + }, + watch: { + title(newVal) { + if (uni.report && this.stat && newVal !== '') { + uni.report('title', newVal) + } + } + }, + created() { + this.form = this.getForm() + if (this.form) { + this.margin = true + this.border = this.form.border + } + }, + methods: { + /** + * 鑾峰彇鐖跺厓绱犲疄渚� + */ + getForm() { + let parent = this.$parent; + let parentName = parent.$options.name; + while (parentName !== 'uniForms') { + parent = parent.$parent; + if (!parent) return false + parentName = parent.$options.name; + } + return parent; + }, + onClick() { + this.$emit('click') + } + } + } +</script> +<style lang="scss" > + .uni-group { + background: #fff; + margin-top: 10px; + // border: 1px red solid; + } + + .group-margin { + // margin: 0 -15px; + } + + .uni-group__title { + /* #ifndef APP-NVUE */ + display: flex; + /* #endif */ + flex-direction: row; + align-items: center; + padding-left: 15px; + height: 40px; + background-color: #eee; + font-weight: normal; + color: #666; + } + + .uni-group__content { + padding: 15px; + // padding-bottom: 5px; + // background-color: #FFF; + } + + .group-conent-padding { + padding: 0 15px; + } + + .uni-group__title-text { + font-size: 14px; + color: #666; + } + + .distraction { + flex-direction: row; + align-items: center; + } + + .uni-group--card { + margin: 10px; + border-radius: 5px; + overflow: hidden; + box-shadow: 0 0 5px 1px rgba($color: #000000, $alpha: 0.08); + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-group/package.json" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-group/package.json" new file mode 100644 index 0000000..ea00a08 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-group/package.json" @@ -0,0 +1,87 @@ +{ + "id": "uni-group", + "displayName": "uni-group 鍒嗙粍", + "version": "1.2.2", + "description": "鍒嗙粍缁勪欢鍙敤浜庡皢缁勪欢鐢ㄤ簬鍒嗙粍锛屾坊鍔犻棿闅旓紝浠ヤ骇鐢熸槑鏄剧殑鍖哄潡", + "keywords": [ + "uni-ui", + "uniui", + "group", + "鍒嗙粍", + "" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "" + }, + "directories": { + "example": "../../temps/example_temps" + }, + "dcloudext": { + "category": [ + "鍓嶇缁勪欢", + "閫氱敤缁勪欢" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "鏃�", + "data": "鏃�", + "permissions": "鏃�" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" + }, + "uni_modules": { + "dependencies": ["uni-scss"], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "寰俊娴忚鍣�(Android)": "y", + "QQ娴忚鍣�(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "灏忕▼搴�": { + "寰俊": "y", + "闃块噷": "y", + "鐧惧害": "y", + "瀛楄妭璺冲姩": "y", + "QQ": "y" + }, + "蹇簲鐢�": { + "鍗庝负": "u", + "鑱旂洘": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-group/readme.md" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-group/readme.md" new file mode 100644 index 0000000..bae67f4 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-group/readme.md" @@ -0,0 +1,9 @@ + +## Group 鍒嗙粍 +> **缁勪欢鍚嶏細uni-group** +> 浠g爜鍧楋細 `uGroup` + +鍒嗙粍缁勪欢鍙敤浜庡皢缁勪欢鍒嗙粍锛屾坊鍔犻棿闅旓紝浠ヤ骇鐢熸槑鏄剧殑鍖哄潡銆� + +### [鏌ョ湅鏂囨。](https://uniapp.dcloud.io/component/uniui/uni-group) +#### 濡備娇鐢ㄨ繃绋嬩腑鏈変换浣曢棶棰橈紝鎴栬�呮偍瀵箄ni-ui鏈変竴浜涘ソ鐨勫缓璁紝娆㈣繋鍔犲叆 uni-ui 浜ゆ祦缇わ細871950839 \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-icons/changelog.md" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-icons/changelog.md" new file mode 100644 index 0000000..6449885 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-icons/changelog.md" @@ -0,0 +1,22 @@ +## 1.3.5锛�2022-01-24锛� +- 浼樺寲 size 灞炴�у彲浠ヤ紶鍏ヤ笉甯﹀崟浣嶇殑瀛楃涓叉暟鍊� +## 1.3.4锛�2022-01-24锛� +- 浼樺寲 size 鏀寔鍏朵粬鍗曚綅 +## 1.3.3锛�2022-01-17锛� +- 淇 nvue 鏈変簺鍥炬爣涓嶆樉绀虹殑bug锛屽吋瀹硅�佺増鏈浘鏍� +## 1.3.2锛�2021-12-01锛� +- 浼樺寲 绀轰緥鍙鍒跺浘鏍囧悕绉� +## 1.3.1锛�2021-11-23锛� +- 浼樺寲 鍏煎鏃х粍浠� type 鍊� +## 1.3.0锛�2021-11-19锛� +- 鏂板 鏇村鍥炬爣 +- 浼樺寲 鑷畾涔夊浘鏍囦娇鐢ㄦ柟寮� +- 浼樺寲 缁勪欢UI锛屽苟鎻愪緵璁捐璧勬簮锛岃瑙�:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 鏂囨。杩佺Щ锛岃瑙�:[https://uniapp.dcloud.io/component/uniui/uni-icons](https://uniapp.dcloud.io/component/uniui/uni-icons) +## 1.1.7锛�2021-11-08锛� +## 1.2.0锛�2021-07-30锛� +- 缁勪欢鍏煎 vue3锛屽浣曞垱寤簐ue3椤圭洰锛岃瑙� [uni-app 椤圭洰鏀寔 vue3 浠嬬粛](https://ask.dcloud.net.cn/article/37834) +## 1.1.5锛�2021-05-12锛� +- 鏂板 缁勪欢绀轰緥鍦板潃 +## 1.1.4锛�2021-02-05锛� +- 璋冩暣涓簎ni_modules鐩綍瑙勮寖 diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-icons/components/uni-icons/icons.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-icons/components/uni-icons/icons.js" new file mode 100644 index 0000000..7889936 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-icons/components/uni-icons/icons.js" @@ -0,0 +1,1169 @@ +export default { + "id": "2852637", + "name": "uniui鍥炬爣搴�", + "font_family": "uniicons", + "css_prefix_text": "uniui-", + "description": "", + "glyphs": [ + { + "icon_id": "25027049", + "name": "yanse", + "font_class": "color", + "unicode": "e6cf", + "unicode_decimal": 59087 + }, + { + "icon_id": "25027048", + "name": "wallet", + "font_class": "wallet", + "unicode": "e6b1", + "unicode_decimal": 59057 + }, + { + "icon_id": "25015720", + "name": "settings-filled", + "font_class": "settings-filled", + "unicode": "e6ce", + "unicode_decimal": 59086 + }, + { + "icon_id": "25015434", + "name": "shimingrenzheng-filled", + "font_class": "auth-filled", + "unicode": "e6cc", + "unicode_decimal": 59084 + }, + { + "icon_id": "24934246", + "name": "shop-filled", + "font_class": "shop-filled", + "unicode": "e6cd", + "unicode_decimal": 59085 + }, + { + "icon_id": "24934159", + "name": "staff-filled-01", + "font_class": "staff-filled", + "unicode": "e6cb", + "unicode_decimal": 59083 + }, + { + "icon_id": "24932461", + "name": "VIP-filled", + "font_class": "vip-filled", + "unicode": "e6c6", + "unicode_decimal": 59078 + }, + { + "icon_id": "24932462", + "name": "plus_circle_fill", + "font_class": "plus-filled", + "unicode": "e6c7", + "unicode_decimal": 59079 + }, + { + "icon_id": "24932463", + "name": "folder_add-filled", + "font_class": "folder-add-filled", + "unicode": "e6c8", + "unicode_decimal": 59080 + }, + { + "icon_id": "24932464", + "name": "yanse-filled", + "font_class": "color-filled", + "unicode": "e6c9", + "unicode_decimal": 59081 + }, + { + "icon_id": "24932465", + "name": "tune-filled", + "font_class": "tune-filled", + "unicode": "e6ca", + "unicode_decimal": 59082 + }, + { + "icon_id": "24932455", + "name": "a-rilidaka-filled", + "font_class": "calendar-filled", + "unicode": "e6c0", + "unicode_decimal": 59072 + }, + { + "icon_id": "24932456", + "name": "notification-filled", + "font_class": "notification-filled", + "unicode": "e6c1", + "unicode_decimal": 59073 + }, + { + "icon_id": "24932457", + "name": "wallet-filled", + "font_class": "wallet-filled", + "unicode": "e6c2", + "unicode_decimal": 59074 + }, + { + "icon_id": "24932458", + "name": "paihangbang-filled", + "font_class": "medal-filled", + "unicode": "e6c3", + "unicode_decimal": 59075 + }, + { + "icon_id": "24932459", + "name": "gift-filled", + "font_class": "gift-filled", + "unicode": "e6c4", + "unicode_decimal": 59076 + }, + { + "icon_id": "24932460", + "name": "fire-filled", + "font_class": "fire-filled", + "unicode": "e6c5", + "unicode_decimal": 59077 + }, + { + "icon_id": "24928001", + "name": "refreshempty", + "font_class": "refreshempty", + "unicode": "e6bf", + "unicode_decimal": 59071 + }, + { + "icon_id": "24926853", + "name": "location-ellipse", + "font_class": "location-filled", + "unicode": "e6af", + "unicode_decimal": 59055 + }, + { + "icon_id": "24926735", + "name": "person-filled", + "font_class": "person-filled", + "unicode": "e69d", + "unicode_decimal": 59037 + }, + { + "icon_id": "24926703", + "name": "personadd-filled", + "font_class": "personadd-filled", + "unicode": "e698", + "unicode_decimal": 59032 + }, + { + "icon_id": "24923351", + "name": "back", + "font_class": "back", + "unicode": "e6b9", + "unicode_decimal": 59065 + }, + { + "icon_id": "24923352", + "name": "forward", + "font_class": "forward", + "unicode": "e6ba", + "unicode_decimal": 59066 + }, + { + "icon_id": "24923353", + "name": "arrowthinright", + "font_class": "arrow-right", + "unicode": "e6bb", + "unicode_decimal": 59067 + }, + { + "icon_id": "24923353", + "name": "arrowthinright", + "font_class": "arrowthinright", + "unicode": "e6bb", + "unicode_decimal": 59067 + }, + { + "icon_id": "24923354", + "name": "arrowthinleft", + "font_class": "arrow-left", + "unicode": "e6bc", + "unicode_decimal": 59068 + }, + { + "icon_id": "24923354", + "name": "arrowthinleft", + "font_class": "arrowthinleft", + "unicode": "e6bc", + "unicode_decimal": 59068 + }, + { + "icon_id": "24923355", + "name": "arrowthinup", + "font_class": "arrow-up", + "unicode": "e6bd", + "unicode_decimal": 59069 + }, + { + "icon_id": "24923355", + "name": "arrowthinup", + "font_class": "arrowthinup", + "unicode": "e6bd", + "unicode_decimal": 59069 + }, + { + "icon_id": "24923356", + "name": "arrowthindown", + "font_class": "arrow-down", + "unicode": "e6be", + "unicode_decimal": 59070 + },{ + "icon_id": "24923356", + "name": "arrowthindown", + "font_class": "arrowthindown", + "unicode": "e6be", + "unicode_decimal": 59070 + }, + { + "icon_id": "24923349", + "name": "arrowdown", + "font_class": "bottom", + "unicode": "e6b8", + "unicode_decimal": 59064 + },{ + "icon_id": "24923349", + "name": "arrowdown", + "font_class": "arrowdown", + "unicode": "e6b8", + "unicode_decimal": 59064 + }, + { + "icon_id": "24923346", + "name": "arrowright", + "font_class": "right", + "unicode": "e6b5", + "unicode_decimal": 59061 + }, + { + "icon_id": "24923346", + "name": "arrowright", + "font_class": "arrowright", + "unicode": "e6b5", + "unicode_decimal": 59061 + }, + { + "icon_id": "24923347", + "name": "arrowup", + "font_class": "top", + "unicode": "e6b6", + "unicode_decimal": 59062 + }, + { + "icon_id": "24923347", + "name": "arrowup", + "font_class": "arrowup", + "unicode": "e6b6", + "unicode_decimal": 59062 + }, + { + "icon_id": "24923348", + "name": "arrowleft", + "font_class": "left", + "unicode": "e6b7", + "unicode_decimal": 59063 + }, + { + "icon_id": "24923348", + "name": "arrowleft", + "font_class": "arrowleft", + "unicode": "e6b7", + "unicode_decimal": 59063 + }, + { + "icon_id": "24923334", + "name": "eye", + "font_class": "eye", + "unicode": "e651", + "unicode_decimal": 58961 + }, + { + "icon_id": "24923335", + "name": "eye-filled", + "font_class": "eye-filled", + "unicode": "e66a", + "unicode_decimal": 58986 + }, + { + "icon_id": "24923336", + "name": "eye-slash", + "font_class": "eye-slash", + "unicode": "e6b3", + "unicode_decimal": 59059 + }, + { + "icon_id": "24923337", + "name": "eye-slash-filled", + "font_class": "eye-slash-filled", + "unicode": "e6b4", + "unicode_decimal": 59060 + }, + { + "icon_id": "24923305", + "name": "info-filled", + "font_class": "info-filled", + "unicode": "e649", + "unicode_decimal": 58953 + }, + { + "icon_id": "24923299", + "name": "reload-01", + "font_class": "reload", + "unicode": "e6b2", + "unicode_decimal": 59058 + }, + { + "icon_id": "24923195", + "name": "mic_slash_fill", + "font_class": "micoff-filled", + "unicode": "e6b0", + "unicode_decimal": 59056 + }, + { + "icon_id": "24923165", + "name": "map-pin-ellipse", + "font_class": "map-pin-ellipse", + "unicode": "e6ac", + "unicode_decimal": 59052 + }, + { + "icon_id": "24923166", + "name": "map-pin", + "font_class": "map-pin", + "unicode": "e6ad", + "unicode_decimal": 59053 + }, + { + "icon_id": "24923167", + "name": "location", + "font_class": "location", + "unicode": "e6ae", + "unicode_decimal": 59054 + }, + { + "icon_id": "24923064", + "name": "starhalf", + "font_class": "starhalf", + "unicode": "e683", + "unicode_decimal": 59011 + }, + { + "icon_id": "24923065", + "name": "star", + "font_class": "star", + "unicode": "e688", + "unicode_decimal": 59016 + }, + { + "icon_id": "24923066", + "name": "star-filled", + "font_class": "star-filled", + "unicode": "e68f", + "unicode_decimal": 59023 + }, + { + "icon_id": "24899646", + "name": "a-rilidaka", + "font_class": "calendar", + "unicode": "e6a0", + "unicode_decimal": 59040 + }, + { + "icon_id": "24899647", + "name": "fire", + "font_class": "fire", + "unicode": "e6a1", + "unicode_decimal": 59041 + }, + { + "icon_id": "24899648", + "name": "paihangbang", + "font_class": "medal", + "unicode": "e6a2", + "unicode_decimal": 59042 + }, + { + "icon_id": "24899649", + "name": "font", + "font_class": "font", + "unicode": "e6a3", + "unicode_decimal": 59043 + }, + { + "icon_id": "24899650", + "name": "gift", + "font_class": "gift", + "unicode": "e6a4", + "unicode_decimal": 59044 + }, + { + "icon_id": "24899651", + "name": "link", + "font_class": "link", + "unicode": "e6a5", + "unicode_decimal": 59045 + }, + { + "icon_id": "24899652", + "name": "notification", + "font_class": "notification", + "unicode": "e6a6", + "unicode_decimal": 59046 + }, + { + "icon_id": "24899653", + "name": "staff", + "font_class": "staff", + "unicode": "e6a7", + "unicode_decimal": 59047 + }, + { + "icon_id": "24899654", + "name": "VIP", + "font_class": "vip", + "unicode": "e6a8", + "unicode_decimal": 59048 + }, + { + "icon_id": "24899655", + "name": "folder_add", + "font_class": "folder-add", + "unicode": "e6a9", + "unicode_decimal": 59049 + }, + { + "icon_id": "24899656", + "name": "tune", + "font_class": "tune", + "unicode": "e6aa", + "unicode_decimal": 59050 + }, + { + "icon_id": "24899657", + "name": "shimingrenzheng", + "font_class": "auth", + "unicode": "e6ab", + "unicode_decimal": 59051 + }, + { + "icon_id": "24899565", + "name": "person", + "font_class": "person", + "unicode": "e699", + "unicode_decimal": 59033 + }, + { + "icon_id": "24899566", + "name": "email-filled", + "font_class": "email-filled", + "unicode": "e69a", + "unicode_decimal": 59034 + }, + { + "icon_id": "24899567", + "name": "phone-filled", + "font_class": "phone-filled", + "unicode": "e69b", + "unicode_decimal": 59035 + }, + { + "icon_id": "24899568", + "name": "phone", + "font_class": "phone", + "unicode": "e69c", + "unicode_decimal": 59036 + }, + { + "icon_id": "24899570", + "name": "email", + "font_class": "email", + "unicode": "e69e", + "unicode_decimal": 59038 + }, + { + "icon_id": "24899571", + "name": "personadd", + "font_class": "personadd", + "unicode": "e69f", + "unicode_decimal": 59039 + }, + { + "icon_id": "24899558", + "name": "chatboxes-filled", + "font_class": "chatboxes-filled", + "unicode": "e692", + "unicode_decimal": 59026 + }, + { + "icon_id": "24899559", + "name": "contact", + "font_class": "contact", + "unicode": "e693", + "unicode_decimal": 59027 + }, + { + "icon_id": "24899560", + "name": "chatbubble-filled", + "font_class": "chatbubble-filled", + "unicode": "e694", + "unicode_decimal": 59028 + }, + { + "icon_id": "24899561", + "name": "contact-filled", + "font_class": "contact-filled", + "unicode": "e695", + "unicode_decimal": 59029 + }, + { + "icon_id": "24899562", + "name": "chatboxes", + "font_class": "chatboxes", + "unicode": "e696", + "unicode_decimal": 59030 + }, + { + "icon_id": "24899563", + "name": "chatbubble", + "font_class": "chatbubble", + "unicode": "e697", + "unicode_decimal": 59031 + }, + { + "icon_id": "24881290", + "name": "upload-filled", + "font_class": "upload-filled", + "unicode": "e68e", + "unicode_decimal": 59022 + }, + { + "icon_id": "24881292", + "name": "upload", + "font_class": "upload", + "unicode": "e690", + "unicode_decimal": 59024 + }, + { + "icon_id": "24881293", + "name": "weixin", + "font_class": "weixin", + "unicode": "e691", + "unicode_decimal": 59025 + }, + { + "icon_id": "24881274", + "name": "compose", + "font_class": "compose", + "unicode": "e67f", + "unicode_decimal": 59007 + }, + { + "icon_id": "24881275", + "name": "qq", + "font_class": "qq", + "unicode": "e680", + "unicode_decimal": 59008 + }, + { + "icon_id": "24881276", + "name": "download-filled", + "font_class": "download-filled", + "unicode": "e681", + "unicode_decimal": 59009 + }, + { + "icon_id": "24881277", + "name": "pengyouquan", + "font_class": "pyq", + "unicode": "e682", + "unicode_decimal": 59010 + }, + { + "icon_id": "24881279", + "name": "sound", + "font_class": "sound", + "unicode": "e684", + "unicode_decimal": 59012 + }, + { + "icon_id": "24881280", + "name": "trash-filled", + "font_class": "trash-filled", + "unicode": "e685", + "unicode_decimal": 59013 + }, + { + "icon_id": "24881281", + "name": "sound-filled", + "font_class": "sound-filled", + "unicode": "e686", + "unicode_decimal": 59014 + }, + { + "icon_id": "24881282", + "name": "trash", + "font_class": "trash", + "unicode": "e687", + "unicode_decimal": 59015 + }, + { + "icon_id": "24881284", + "name": "videocam-filled", + "font_class": "videocam-filled", + "unicode": "e689", + "unicode_decimal": 59017 + }, + { + "icon_id": "24881285", + "name": "spinner-cycle", + "font_class": "spinner-cycle", + "unicode": "e68a", + "unicode_decimal": 59018 + }, + { + "icon_id": "24881286", + "name": "weibo", + "font_class": "weibo", + "unicode": "e68b", + "unicode_decimal": 59019 + }, + { + "icon_id": "24881288", + "name": "videocam", + "font_class": "videocam", + "unicode": "e68c", + "unicode_decimal": 59020 + }, + { + "icon_id": "24881289", + "name": "download", + "font_class": "download", + "unicode": "e68d", + "unicode_decimal": 59021 + }, + { + "icon_id": "24879601", + "name": "help", + "font_class": "help", + "unicode": "e679", + "unicode_decimal": 59001 + }, + { + "icon_id": "24879602", + "name": "navigate-filled", + "font_class": "navigate-filled", + "unicode": "e67a", + "unicode_decimal": 59002 + }, + { + "icon_id": "24879603", + "name": "plusempty", + "font_class": "plusempty", + "unicode": "e67b", + "unicode_decimal": 59003 + }, + { + "icon_id": "24879604", + "name": "smallcircle", + "font_class": "smallcircle", + "unicode": "e67c", + "unicode_decimal": 59004 + }, + { + "icon_id": "24879605", + "name": "minus-filled", + "font_class": "minus-filled", + "unicode": "e67d", + "unicode_decimal": 59005 + }, + { + "icon_id": "24879606", + "name": "micoff", + "font_class": "micoff", + "unicode": "e67e", + "unicode_decimal": 59006 + }, + { + "icon_id": "24879588", + "name": "closeempty", + "font_class": "closeempty", + "unicode": "e66c", + "unicode_decimal": 58988 + }, + { + "icon_id": "24879589", + "name": "clear", + "font_class": "clear", + "unicode": "e66d", + "unicode_decimal": 58989 + }, + { + "icon_id": "24879590", + "name": "navigate", + "font_class": "navigate", + "unicode": "e66e", + "unicode_decimal": 58990 + }, + { + "icon_id": "24879591", + "name": "minus", + "font_class": "minus", + "unicode": "e66f", + "unicode_decimal": 58991 + }, + { + "icon_id": "24879592", + "name": "image", + "font_class": "image", + "unicode": "e670", + "unicode_decimal": 58992 + }, + { + "icon_id": "24879593", + "name": "mic", + "font_class": "mic", + "unicode": "e671", + "unicode_decimal": 58993 + }, + { + "icon_id": "24879594", + "name": "paperplane", + "font_class": "paperplane", + "unicode": "e672", + "unicode_decimal": 58994 + }, + { + "icon_id": "24879595", + "name": "close", + "font_class": "close", + "unicode": "e673", + "unicode_decimal": 58995 + }, + { + "icon_id": "24879596", + "name": "help-filled", + "font_class": "help-filled", + "unicode": "e674", + "unicode_decimal": 58996 + }, + { + "icon_id": "24879597", + "name": "plus-filled", + "font_class": "paperplane-filled", + "unicode": "e675", + "unicode_decimal": 58997 + }, + { + "icon_id": "24879598", + "name": "plus", + "font_class": "plus", + "unicode": "e676", + "unicode_decimal": 58998 + }, + { + "icon_id": "24879599", + "name": "mic-filled", + "font_class": "mic-filled", + "unicode": "e677", + "unicode_decimal": 58999 + }, + { + "icon_id": "24879600", + "name": "image-filled", + "font_class": "image-filled", + "unicode": "e678", + "unicode_decimal": 59000 + }, + { + "icon_id": "24855900", + "name": "locked-filled", + "font_class": "locked-filled", + "unicode": "e668", + "unicode_decimal": 58984 + }, + { + "icon_id": "24855901", + "name": "info", + "font_class": "info", + "unicode": "e669", + "unicode_decimal": 58985 + }, + { + "icon_id": "24855903", + "name": "locked", + "font_class": "locked", + "unicode": "e66b", + "unicode_decimal": 58987 + }, + { + "icon_id": "24855884", + "name": "camera-filled", + "font_class": "camera-filled", + "unicode": "e658", + "unicode_decimal": 58968 + }, + { + "icon_id": "24855885", + "name": "chat-filled", + "font_class": "chat-filled", + "unicode": "e659", + "unicode_decimal": 58969 + }, + { + "icon_id": "24855886", + "name": "camera", + "font_class": "camera", + "unicode": "e65a", + "unicode_decimal": 58970 + }, + { + "icon_id": "24855887", + "name": "circle", + "font_class": "circle", + "unicode": "e65b", + "unicode_decimal": 58971 + }, + { + "icon_id": "24855888", + "name": "checkmarkempty", + "font_class": "checkmarkempty", + "unicode": "e65c", + "unicode_decimal": 58972 + }, + { + "icon_id": "24855889", + "name": "chat", + "font_class": "chat", + "unicode": "e65d", + "unicode_decimal": 58973 + }, + { + "icon_id": "24855890", + "name": "circle-filled", + "font_class": "circle-filled", + "unicode": "e65e", + "unicode_decimal": 58974 + }, + { + "icon_id": "24855891", + "name": "flag", + "font_class": "flag", + "unicode": "e65f", + "unicode_decimal": 58975 + }, + { + "icon_id": "24855892", + "name": "flag-filled", + "font_class": "flag-filled", + "unicode": "e660", + "unicode_decimal": 58976 + }, + { + "icon_id": "24855893", + "name": "gear-filled", + "font_class": "gear-filled", + "unicode": "e661", + "unicode_decimal": 58977 + }, + { + "icon_id": "24855894", + "name": "home", + "font_class": "home", + "unicode": "e662", + "unicode_decimal": 58978 + }, + { + "icon_id": "24855895", + "name": "home-filled", + "font_class": "home-filled", + "unicode": "e663", + "unicode_decimal": 58979 + }, + { + "icon_id": "24855896", + "name": "gear", + "font_class": "gear", + "unicode": "e664", + "unicode_decimal": 58980 + }, + { + "icon_id": "24855897", + "name": "smallcircle-filled", + "font_class": "smallcircle-filled", + "unicode": "e665", + "unicode_decimal": 58981 + }, + { + "icon_id": "24855898", + "name": "map-filled", + "font_class": "map-filled", + "unicode": "e666", + "unicode_decimal": 58982 + }, + { + "icon_id": "24855899", + "name": "map", + "font_class": "map", + "unicode": "e667", + "unicode_decimal": 58983 + }, + { + "icon_id": "24855825", + "name": "refresh-filled", + "font_class": "refresh-filled", + "unicode": "e656", + "unicode_decimal": 58966 + }, + { + "icon_id": "24855826", + "name": "refresh", + "font_class": "refresh", + "unicode": "e657", + "unicode_decimal": 58967 + }, + { + "icon_id": "24855808", + "name": "cloud-upload", + "font_class": "cloud-upload", + "unicode": "e645", + "unicode_decimal": 58949 + }, + { + "icon_id": "24855809", + "name": "cloud-download-filled", + "font_class": "cloud-download-filled", + "unicode": "e646", + "unicode_decimal": 58950 + }, + { + "icon_id": "24855810", + "name": "cloud-download", + "font_class": "cloud-download", + "unicode": "e647", + "unicode_decimal": 58951 + }, + { + "icon_id": "24855811", + "name": "cloud-upload-filled", + "font_class": "cloud-upload-filled", + "unicode": "e648", + "unicode_decimal": 58952 + }, + { + "icon_id": "24855813", + "name": "redo", + "font_class": "redo", + "unicode": "e64a", + "unicode_decimal": 58954 + }, + { + "icon_id": "24855814", + "name": "images-filled", + "font_class": "images-filled", + "unicode": "e64b", + "unicode_decimal": 58955 + }, + { + "icon_id": "24855815", + "name": "undo-filled", + "font_class": "undo-filled", + "unicode": "e64c", + "unicode_decimal": 58956 + }, + { + "icon_id": "24855816", + "name": "more", + "font_class": "more", + "unicode": "e64d", + "unicode_decimal": 58957 + }, + { + "icon_id": "24855817", + "name": "more-filled", + "font_class": "more-filled", + "unicode": "e64e", + "unicode_decimal": 58958 + }, + { + "icon_id": "24855818", + "name": "undo", + "font_class": "undo", + "unicode": "e64f", + "unicode_decimal": 58959 + }, + { + "icon_id": "24855819", + "name": "images", + "font_class": "images", + "unicode": "e650", + "unicode_decimal": 58960 + }, + { + "icon_id": "24855821", + "name": "paperclip", + "font_class": "paperclip", + "unicode": "e652", + "unicode_decimal": 58962 + }, + { + "icon_id": "24855822", + "name": "settings", + "font_class": "settings", + "unicode": "e653", + "unicode_decimal": 58963 + }, + { + "icon_id": "24855823", + "name": "search", + "font_class": "search", + "unicode": "e654", + "unicode_decimal": 58964 + }, + { + "icon_id": "24855824", + "name": "redo-filled", + "font_class": "redo-filled", + "unicode": "e655", + "unicode_decimal": 58965 + }, + { + "icon_id": "24841702", + "name": "list", + "font_class": "list", + "unicode": "e644", + "unicode_decimal": 58948 + }, + { + "icon_id": "24841489", + "name": "mail-open-filled", + "font_class": "mail-open-filled", + "unicode": "e63a", + "unicode_decimal": 58938 + }, + { + "icon_id": "24841491", + "name": "hand-thumbsdown-filled", + "font_class": "hand-down-filled", + "unicode": "e63c", + "unicode_decimal": 58940 + }, + { + "icon_id": "24841492", + "name": "hand-thumbsdown", + "font_class": "hand-down", + "unicode": "e63d", + "unicode_decimal": 58941 + }, + { + "icon_id": "24841493", + "name": "hand-thumbsup-filled", + "font_class": "hand-up-filled", + "unicode": "e63e", + "unicode_decimal": 58942 + }, + { + "icon_id": "24841494", + "name": "hand-thumbsup", + "font_class": "hand-up", + "unicode": "e63f", + "unicode_decimal": 58943 + }, + { + "icon_id": "24841496", + "name": "heart-filled", + "font_class": "heart-filled", + "unicode": "e641", + "unicode_decimal": 58945 + }, + { + "icon_id": "24841498", + "name": "mail-open", + "font_class": "mail-open", + "unicode": "e643", + "unicode_decimal": 58947 + }, + { + "icon_id": "24841488", + "name": "heart", + "font_class": "heart", + "unicode": "e639", + "unicode_decimal": 58937 + }, + { + "icon_id": "24839963", + "name": "loop", + "font_class": "loop", + "unicode": "e633", + "unicode_decimal": 58931 + }, + { + "icon_id": "24839866", + "name": "pulldown", + "font_class": "pulldown", + "unicode": "e632", + "unicode_decimal": 58930 + }, + { + "icon_id": "24813798", + "name": "scan", + "font_class": "scan", + "unicode": "e62a", + "unicode_decimal": 58922 + }, + { + "icon_id": "24813786", + "name": "bars", + "font_class": "bars", + "unicode": "e627", + "unicode_decimal": 58919 + }, + { + "icon_id": "24813788", + "name": "cart-filled", + "font_class": "cart-filled", + "unicode": "e629", + "unicode_decimal": 58921 + }, + { + "icon_id": "24813790", + "name": "checkbox", + "font_class": "checkbox", + "unicode": "e62b", + "unicode_decimal": 58923 + }, + { + "icon_id": "24813791", + "name": "checkbox-filled", + "font_class": "checkbox-filled", + "unicode": "e62c", + "unicode_decimal": 58924 + }, + { + "icon_id": "24813794", + "name": "shop", + "font_class": "shop", + "unicode": "e62f", + "unicode_decimal": 58927 + }, + { + "icon_id": "24813795", + "name": "headphones", + "font_class": "headphones", + "unicode": "e630", + "unicode_decimal": 58928 + }, + { + "icon_id": "24813796", + "name": "cart", + "font_class": "cart", + "unicode": "e631", + "unicode_decimal": 58929 + } + ] +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-icons/components/uni-icons/uni-icons.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-icons/components/uni-icons/uni-icons.vue" new file mode 100644 index 0000000..86e7444 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-icons/components/uni-icons/uni-icons.vue" @@ -0,0 +1,96 @@ +<template> + <!-- #ifdef APP-NVUE --> + <text :style="{ color: color, 'font-size': iconSize }" class="uni-icons" @click="_onClick">{{unicode}}</text> + <!-- #endif --> + <!-- #ifndef APP-NVUE --> + <text :style="{ color: color, 'font-size': iconSize }" class="uni-icons" :class="['uniui-'+type,customPrefix,customPrefix?type:'']" @click="_onClick"></text> + <!-- #endif --> +</template> + +<script> + import icons from './icons.js'; + const getVal = (val) => { + const reg = /^[0-9]*$/g + return (typeof val === 'number' ||銆�reg.test(val) )? val + 'px' : val; + } + // #ifdef APP-NVUE + var domModule = weex.requireModule('dom'); + import iconUrl from './uniicons.ttf' + domModule.addRule('fontFace', { + 'fontFamily': "uniicons", + 'src': "url('"+iconUrl+"')" + }); + // #endif + + /** + * Icons 鍥炬爣 + * @description 鐢ㄤ簬灞曠ず icons 鍥炬爣 + * @tutorial https://ext.dcloud.net.cn/plugin?id=28 + * @property {Number} size 鍥炬爣澶у皬 + * @property {String} type 鍥炬爣鍥炬锛屽弬鑰冪ず渚� + * @property {String} color 鍥炬爣棰滆壊 + * @property {String} customPrefix 鑷畾涔夊浘鏍� + * @event {Function} click 鐐瑰嚮 Icon 瑙﹀彂浜嬩欢 + */ + export default { + name: 'UniIcons', + emits:['click'], + props: { + type: { + type: String, + default: '' + }, + color: { + type: String, + default: '#333333' + }, + size: { + type: [Number, String], + default: 16 + }, + customPrefix:{ + type: String, + default: '' + } + }, + data() { + return { + icons: icons.glyphs + } + }, + computed:{ + unicode(){ + let code = this.icons.find(v=>v.font_class === this.type) + if(code){ + return unescape(`%u${code.unicode}`) + } + return '' + }, + iconSize(){ + return getVal(this.size) + } + }, + methods: { + _onClick() { + this.$emit('click') + } + } + } +</script> + +<style lang="scss"> + /* #ifndef APP-NVUE */ + @import './uniicons.css'; + @font-face { + font-family: uniicons; + src: url('./uniicons.ttf') format('truetype'); + } + + /* #endif */ + .uni-icons { + font-family: uniicons; + text-decoration: none; + text-align: center; + } + +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-icons/components/uni-icons/uni.ttf" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-icons/components/uni-icons/uni.ttf" new file mode 100644 index 0000000..60a1968 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-icons/components/uni-icons/uni.ttf" Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-icons/components/uni-icons/uniicons.css" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-icons/components/uni-icons/uniicons.css" new file mode 100644 index 0000000..2f56eab --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-icons/components/uni-icons/uniicons.css" @@ -0,0 +1,663 @@ +.uniui-color:before { + content: "\e6cf"; +} + +.uniui-wallet:before { + content: "\e6b1"; +} + +.uniui-settings-filled:before { + content: "\e6ce"; +} + +.uniui-auth-filled:before { + content: "\e6cc"; +} + +.uniui-shop-filled:before { + content: "\e6cd"; +} + +.uniui-staff-filled:before { + content: "\e6cb"; +} + +.uniui-vip-filled:before { + content: "\e6c6"; +} + +.uniui-plus-filled:before { + content: "\e6c7"; +} + +.uniui-folder-add-filled:before { + content: "\e6c8"; +} + +.uniui-color-filled:before { + content: "\e6c9"; +} + +.uniui-tune-filled:before { + content: "\e6ca"; +} + +.uniui-calendar-filled:before { + content: "\e6c0"; +} + +.uniui-notification-filled:before { + content: "\e6c1"; +} + +.uniui-wallet-filled:before { + content: "\e6c2"; +} + +.uniui-medal-filled:before { + content: "\e6c3"; +} + +.uniui-gift-filled:before { + content: "\e6c4"; +} + +.uniui-fire-filled:before { + content: "\e6c5"; +} + +.uniui-refreshempty:before { + content: "\e6bf"; +} + +.uniui-location-filled:before { + content: "\e6af"; +} + +.uniui-person-filled:before { + content: "\e69d"; +} + +.uniui-personadd-filled:before { + content: "\e698"; +} + +.uniui-back:before { + content: "\e6b9"; +} + +.uniui-forward:before { + content: "\e6ba"; +} + +.uniui-arrow-right:before { + content: "\e6bb"; +} + +.uniui-arrowthinright:before { + content: "\e6bb"; +} + +.uniui-arrow-left:before { + content: "\e6bc"; +} + +.uniui-arrowthinleft:before { + content: "\e6bc"; +} + +.uniui-arrow-up:before { + content: "\e6bd"; +} + +.uniui-arrowthinup:before { + content: "\e6bd"; +} + +.uniui-arrow-down:before { + content: "\e6be"; +} + +.uniui-arrowthindown:before { + content: "\e6be"; +} + +.uniui-bottom:before { + content: "\e6b8"; +} + +.uniui-arrowdown:before { + content: "\e6b8"; +} + +.uniui-right:before { + content: "\e6b5"; +} + +.uniui-arrowright:before { + content: "\e6b5"; +} + +.uniui-top:before { + content: "\e6b6"; +} + +.uniui-arrowup:before { + content: "\e6b6"; +} + +.uniui-left:before { + content: "\e6b7"; +} + +.uniui-arrowleft:before { + content: "\e6b7"; +} + +.uniui-eye:before { + content: "\e651"; +} + +.uniui-eye-filled:before { + content: "\e66a"; +} + +.uniui-eye-slash:before { + content: "\e6b3"; +} + +.uniui-eye-slash-filled:before { + content: "\e6b4"; +} + +.uniui-info-filled:before { + content: "\e649"; +} + +.uniui-reload:before { + content: "\e6b2"; +} + +.uniui-micoff-filled:before { + content: "\e6b0"; +} + +.uniui-map-pin-ellipse:before { + content: "\e6ac"; +} + +.uniui-map-pin:before { + content: "\e6ad"; +} + +.uniui-location:before { + content: "\e6ae"; +} + +.uniui-starhalf:before { + content: "\e683"; +} + +.uniui-star:before { + content: "\e688"; +} + +.uniui-star-filled:before { + content: "\e68f"; +} + +.uniui-calendar:before { + content: "\e6a0"; +} + +.uniui-fire:before { + content: "\e6a1"; +} + +.uniui-medal:before { + content: "\e6a2"; +} + +.uniui-font:before { + content: "\e6a3"; +} + +.uniui-gift:before { + content: "\e6a4"; +} + +.uniui-link:before { + content: "\e6a5"; +} + +.uniui-notification:before { + content: "\e6a6"; +} + +.uniui-staff:before { + content: "\e6a7"; +} + +.uniui-vip:before { + content: "\e6a8"; +} + +.uniui-folder-add:before { + content: "\e6a9"; +} + +.uniui-tune:before { + content: "\e6aa"; +} + +.uniui-auth:before { + content: "\e6ab"; +} + +.uniui-person:before { + content: "\e699"; +} + +.uniui-email-filled:before { + content: "\e69a"; +} + +.uniui-phone-filled:before { + content: "\e69b"; +} + +.uniui-phone:before { + content: "\e69c"; +} + +.uniui-email:before { + content: "\e69e"; +} + +.uniui-personadd:before { + content: "\e69f"; +} + +.uniui-chatboxes-filled:before { + content: "\e692"; +} + +.uniui-contact:before { + content: "\e693"; +} + +.uniui-chatbubble-filled:before { + content: "\e694"; +} + +.uniui-contact-filled:before { + content: "\e695"; +} + +.uniui-chatboxes:before { + content: "\e696"; +} + +.uniui-chatbubble:before { + content: "\e697"; +} + +.uniui-upload-filled:before { + content: "\e68e"; +} + +.uniui-upload:before { + content: "\e690"; +} + +.uniui-weixin:before { + content: "\e691"; +} + +.uniui-compose:before { + content: "\e67f"; +} + +.uniui-qq:before { + content: "\e680"; +} + +.uniui-download-filled:before { + content: "\e681"; +} + +.uniui-pyq:before { + content: "\e682"; +} + +.uniui-sound:before { + content: "\e684"; +} + +.uniui-trash-filled:before { + content: "\e685"; +} + +.uniui-sound-filled:before { + content: "\e686"; +} + +.uniui-trash:before { + content: "\e687"; +} + +.uniui-videocam-filled:before { + content: "\e689"; +} + +.uniui-spinner-cycle:before { + content: "\e68a"; +} + +.uniui-weibo:before { + content: "\e68b"; +} + +.uniui-videocam:before { + content: "\e68c"; +} + +.uniui-download:before { + content: "\e68d"; +} + +.uniui-help:before { + content: "\e679"; +} + +.uniui-navigate-filled:before { + content: "\e67a"; +} + +.uniui-plusempty:before { + content: "\e67b"; +} + +.uniui-smallcircle:before { + content: "\e67c"; +} + +.uniui-minus-filled:before { + content: "\e67d"; +} + +.uniui-micoff:before { + content: "\e67e"; +} + +.uniui-closeempty:before { + content: "\e66c"; +} + +.uniui-clear:before { + content: "\e66d"; +} + +.uniui-navigate:before { + content: "\e66e"; +} + +.uniui-minus:before { + content: "\e66f"; +} + +.uniui-image:before { + content: "\e670"; +} + +.uniui-mic:before { + content: "\e671"; +} + +.uniui-paperplane:before { + content: "\e672"; +} + +.uniui-close:before { + content: "\e673"; +} + +.uniui-help-filled:before { + content: "\e674"; +} + +.uniui-paperplane-filled:before { + content: "\e675"; +} + +.uniui-plus:before { + content: "\e676"; +} + +.uniui-mic-filled:before { + content: "\e677"; +} + +.uniui-image-filled:before { + content: "\e678"; +} + +.uniui-locked-filled:before { + content: "\e668"; +} + +.uniui-info:before { + content: "\e669"; +} + +.uniui-locked:before { + content: "\e66b"; +} + +.uniui-camera-filled:before { + content: "\e658"; +} + +.uniui-chat-filled:before { + content: "\e659"; +} + +.uniui-camera:before { + content: "\e65a"; +} + +.uniui-circle:before { + content: "\e65b"; +} + +.uniui-checkmarkempty:before { + content: "\e65c"; +} + +.uniui-chat:before { + content: "\e65d"; +} + +.uniui-circle-filled:before { + content: "\e65e"; +} + +.uniui-flag:before { + content: "\e65f"; +} + +.uniui-flag-filled:before { + content: "\e660"; +} + +.uniui-gear-filled:before { + content: "\e661"; +} + +.uniui-home:before { + content: "\e662"; +} + +.uniui-home-filled:before { + content: "\e663"; +} + +.uniui-gear:before { + content: "\e664"; +} + +.uniui-smallcircle-filled:before { + content: "\e665"; +} + +.uniui-map-filled:before { + content: "\e666"; +} + +.uniui-map:before { + content: "\e667"; +} + +.uniui-refresh-filled:before { + content: "\e656"; +} + +.uniui-refresh:before { + content: "\e657"; +} + +.uniui-cloud-upload:before { + content: "\e645"; +} + +.uniui-cloud-download-filled:before { + content: "\e646"; +} + +.uniui-cloud-download:before { + content: "\e647"; +} + +.uniui-cloud-upload-filled:before { + content: "\e648"; +} + +.uniui-redo:before { + content: "\e64a"; +} + +.uniui-images-filled:before { + content: "\e64b"; +} + +.uniui-undo-filled:before { + content: "\e64c"; +} + +.uniui-more:before { + content: "\e64d"; +} + +.uniui-more-filled:before { + content: "\e64e"; +} + +.uniui-undo:before { + content: "\e64f"; +} + +.uniui-images:before { + content: "\e650"; +} + +.uniui-paperclip:before { + content: "\e652"; +} + +.uniui-settings:before { + content: "\e653"; +} + +.uniui-search:before { + content: "\e654"; +} + +.uniui-redo-filled:before { + content: "\e655"; +} + +.uniui-list:before { + content: "\e644"; +} + +.uniui-mail-open-filled:before { + content: "\e63a"; +} + +.uniui-hand-down-filled:before { + content: "\e63c"; +} + +.uniui-hand-down:before { + content: "\e63d"; +} + +.uniui-hand-up-filled:before { + content: "\e63e"; +} + +.uniui-hand-up:before { + content: "\e63f"; +} + +.uniui-heart-filled:before { + content: "\e641"; +} + +.uniui-mail-open:before { + content: "\e643"; +} + +.uniui-heart:before { + content: "\e639"; +} + +.uniui-loop:before { + content: "\e633"; +} + +.uniui-pulldown:before { + content: "\e632"; +} + +.uniui-scan:before { + content: "\e62a"; +} + +.uniui-bars:before { + content: "\e627"; +} + +.uniui-cart-filled:before { + content: "\e629"; +} + +.uniui-checkbox:before { + content: "\e62b"; +} + +.uniui-checkbox-filled:before { + content: "\e62c"; +} + +.uniui-shop:before { + content: "\e62f"; +} + +.uniui-headphones:before { + content: "\e630"; +} + +.uniui-cart:before { + content: "\e631"; +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-icons/components/uni-icons/uniicons.ttf" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-icons/components/uni-icons/uniicons.ttf" new file mode 100644 index 0000000..835f33b --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-icons/components/uni-icons/uniicons.ttf" Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-icons/package.json" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-icons/package.json" new file mode 100644 index 0000000..d1c4e77 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-icons/package.json" @@ -0,0 +1,86 @@ +{ + "id": "uni-icons", + "displayName": "uni-icons 鍥炬爣", + "version": "1.3.5", + "description": "鍥炬爣缁勪欢锛岀敤浜庡睍绀虹Щ鍔ㄧ甯歌鐨勫浘鏍囷紝鍙嚜瀹氫箟棰滆壊銆佸ぇ灏忋��", + "keywords": [ + "uni-ui", + "uniui", + "icon", + "鍥炬爣" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "^3.2.14" + }, + "directories": { + "example": "../../temps/example_temps" + }, + "dcloudext": { + "category": [ + "鍓嶇缁勪欢", + "閫氱敤缁勪欢" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "鏃�", + "data": "鏃�", + "permissions": "鏃�" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" + }, + "uni_modules": { + "dependencies": ["uni-scss"], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "寰俊娴忚鍣�(Android)": "y", + "QQ娴忚鍣�(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "灏忕▼搴�": { + "寰俊": "y", + "闃块噷": "y", + "鐧惧害": "y", + "瀛楄妭璺冲姩": "y", + "QQ": "y" + }, + "蹇簲鐢�": { + "鍗庝负": "u", + "鑱旂洘": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-icons/readme.md" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-icons/readme.md" new file mode 100644 index 0000000..86234ba --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-icons/readme.md" @@ -0,0 +1,8 @@ +## Icons 鍥炬爣 +> **缁勪欢鍚嶏細uni-icons** +> 浠g爜鍧楋細 `uIcons` + +鐢ㄤ簬灞曠ず icons 鍥炬爣 銆� + +### [鏌ョ湅鏂囨。](https://uniapp.dcloud.io/component/uniui/uni-icons) +#### 濡備娇鐢ㄨ繃绋嬩腑鏈変换浣曢棶棰橈紝鎴栬�呮偍瀵箄ni-ui鏈変竴浜涘ソ鐨勫缓璁紝娆㈣繋鍔犲叆 uni-ui 浜ゆ祦缇わ細871950839 diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-id/changelog.md" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-id/changelog.md" new file mode 100644 index 0000000..634061e --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-id/changelog.md" @@ -0,0 +1,24 @@ +## 3.1.0锛�2021-04-19锛� +- 澧炲姞瀵圭敤鎴峰悕銆侀偖绠便�佸瘑鐮佸瓧娈电殑涓ょ鍘荤┖鏍� +- 榛樿蹇界暐鐢ㄦ埛鍚嶃�侀偖绠辩殑澶у皬鍐� [璇︽儏](https://uniapp.dcloud.net.cn/uniCloud/uni-id?id=case-sensitive) +- 淇 customToken瀵煎嚭async鏂规硶鎶ラ敊鐨凚ug +## 3.0.12锛�2021-04-13锛� +- 璋冩暣bindTokenToDevice榛樿鍊间负false +## 3.0.11锛�2021-04-12锛� +- 淇3.0.7鐗堟湰寮曞嚭鐨勫涓敤鎴疯闂椂鍙兘鍑虹幇30201鎶ラ敊鐨凚ug +## 3.0.10锛�2021-04-08锛� +- 浼樺寲閿欒鎻愮ず +## 3.0.9锛�2021-04-08锛� +- bindMobile鎺ュ彛鏀寔閫氳繃涓�閿櫥褰曠殑鏂瑰紡缁戝畾 +- 浼樺寲閿欒鎻愮ず +## 3.0.8锛�2021-03-19锛� +- 淇 3.0.7鐗堟湰鏌愪簺鎯呭喌涓嬬敓鎴恡oken鎶ラ敊鐨凚ug +## 3.0.7锛�2021-03-19锛� +- 鏂板 鏀寔uni-config-center锛屾洿鏂皍ni-id鏃犻』鍐嶆媴蹇冮厤缃瑕嗙洊 [璇︽儏](https://uniapp.dcloud.io/uniCloud/uni-id?id=uni-config-center) +- 鏂板 鑷畾涔塼oken鍐呭锛屽彲浠ョ紦瀛樿鑹叉潈闄愪箣澶栫殑鏇村淇℃伅鍒板鎴风 [璇︽儏](https://uniapp.dcloud.io/uniCloud/uni-id?id=custom-token) +- 鏂板 鏀寔浼犲叆context鑾峰彇uni-id瀹炰緥锛岄槻姝㈠崟瀹炰緥澶氬苟鍙戞椂鍏ㄥ眬context娣蜂贡 [璇︽儏](https://uniapp.dcloud.io/uniCloud/uni-id?id=create-instance) +## 3.0.6锛�2021-03-05锛� +- 鏂板[uniID.wxBizDataCrypt](https://uniapp.dcloud.io/uniCloud/uni-id?id=%e5%be%ae%e4%bf%a1%e6%95%b0%e6%8d%ae%e8%a7%a3%e5%af%86)鏂规硶 +- 浼樺寲loginByApple鏂规硶锛屾彁楂樻帴鍙e搷搴旈�熷害 +## 3.0.5锛�2021-02-03锛� +- 璋冩暣涓簎ni_modules鐩綍瑙勮寖 diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-id/package.json" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-id/package.json" new file mode 100644 index 0000000..a8db1fc --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-id/package.json" @@ -0,0 +1,80 @@ +{ + "id": "uni-id", + "displayName": "uni-id鍏叡妯″潡", + "version": "3.1.0", + "description": "绠�鍗曘�佺粺涓�銆佸彲鎵╁睍鐨勭敤鎴蜂腑蹇�", + "keywords": [ + "uniid", + "uni-id", + "鐢ㄦ埛绠$悊", + "鐢ㄦ埛涓績", + "鐭俊楠岃瘉鐮�" +], + "repository": "https://gitee.com/dcloud/uni-id.git", + "engines": { + "HBuilderX": "^3.1.0" + }, + "dcloudext": { + "category": [ + "uniCloud", + "浜戝嚱鏁版ā鏉�" + ], + "sale": { + "regular": { + "price": 0 + }, + "sourcecode": { + "price": 0 + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "鏃�", + "data": "鏃�", + "permissions": "鏃�" + }, + "npmurl": "" + }, + "uni_modules": { + "dependencies": ["uni-config-center"], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "u", + "app-nvue": "u" + }, + "H5-mobile": { + "Safari": "u", + "Android Browser": "u", + "寰俊娴忚鍣�(Android)": "u", + "QQ娴忚鍣�(Android)": "u" + }, + "H5-pc": { + "Chrome": "u", + "IE": "u", + "Edge": "u", + "Firefox": "u", + "Safari": "u" + }, + "灏忕▼搴�": { + "寰俊": "u", + "闃块噷": "u", + "鐧惧害": "u", + "瀛楄妭璺冲姩": "u", + "QQ": "u" + }, + "蹇簲鐢�": { + "鍗庝负": "u", + "鑱旂洘": "u" + } + } + } + } +} \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-id/readme.md" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-id/readme.md" new file mode 100644 index 0000000..ea7751c --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-id/readme.md" @@ -0,0 +1,33 @@ +**鏂囨。宸茬Щ鑷砙uni-id鏂囨。](https://uniapp.dcloud.net.cn/uniCloud/uni-id)** + +> 涓�鑸瑄ni-id鍗囩骇澶х増鏈椂涓轰笉鍏煎鏇存柊锛屼粠浣庣増鏈縼绉诲埌楂樼増鏈鍙傝�冿細[uni-id杩佺Щ鎸囧崡](https://uniapp.dcloud.net.cn/uniCloud/uni-id?id=migration) + +## 閲嶈鍗囩骇璇存槑 + +**uni-id 3.x鐗堟湰锛屾惌閰嶇殑uniCloud admin鐗堟湰闇�澶т簬1.2.10銆�** + +### 缂撳瓨瑙掕壊鏉冮檺 + +鑷猔uni-id 3.0.0`璧凤紝鏀寔鍦╰oken鍐呯紦瀛樼敤鎴风殑瑙掕壊鏉冮檺锛岄粯璁ゅ紑鍚鍔熻兘锛屽悇鐧诲綍鎺ュ彛鐨刵eedPermission鍙傛暟涓嶅啀鐢熸晥銆傚闇�鍏抽棴璇峰湪config鍐呴厤缃甡"removePermissionAndRoleFromToken": true`銆� + +涓轰粈涔堣缂撳瓨瑙掕壊鏉冮檺锛熻鐭ラ亾浜戞暟鎹簱鏄寜鐓ц鍐欐鏁版潵鏀跺彇璐圭敤鐨勶紝骞朵笖璇诲啓鏁版嵁搴撲細鎷栨參鎺ュ彛鍝嶅簲閫熷害銆傛湭閰嶇疆`"removePermissionAndRoleFromToken": true`鐨勬儏鍐典笅锛屽彲浠ュ湪璋冪敤checkToken鎺ュ彛鏃朵笉鏌ヨ鏁版嵁搴撹幏鍙栫敤鎴疯鑹叉潈闄愩�� + +璇︾粏checkToken娴佺▼濡備笅锛� + + + +鍙互鐪嬪嚭锛屾棫鐗坱oken锛坮emovePermissionAndRoleFromToken涓簍rue鏃剁敓鎴愮殑锛夊湪checkToken鏃跺闇�杩斿洖鏉冮檺闇�瑕佽繘琛屼袱娆℃暟鎹簱鏌ヨ銆傛柊鐗坱oken涓嶉渶瑕佹煡搴撳嵆鍙繑鍥炴潈闄愪俊鎭�� + +**娉ㄦ剰** + +- 鐢变簬瑙掕壊鏉冮檺缂撳瓨鍦╰oken鍐咃紝鍙兘浼氬瓨鍦ㄦ潈闄愬凡缁忔洿鏂颁絾鏄敤鎴穞oken鏈繃鏈熶箣鍓嶄緷鐒舵槸鏃х増瑙掕壊鏉冮檺鐨勬儏鍐点�傚彲浠ヨ皟鐭竴浜泃oken杩囨湡鏃堕棿鏉ュ噺灏戣繖绉嶆儏鍐电殑褰卞搷銆� +- admin瑙掕壊token鍐呬笉鍖呭惈permission锛屽闇�鑷鍒ゆ柇鐢ㄦ埛鏄惁鏈夋煇涓潈闄愶紝瑕佹敞鎰廰dmin瑙掕壊闇�瑕侀澶栧垽鏂竴涓嬶紝鍐欐硶濡備笅 + ```js + const { + role, + permission + } = await uniID.checkToken(event.uniIdToken) + if(role.includes('admin') || permission.includes('your permission id')) { + // 褰撳墠瑙掕壊鎷ユ湁'your permission id'瀵瑰簲鐨勬潈闄� + } + ``` \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-id/uniCloud/cloudfunctions/common/uni-id/LICENSE.md" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-id/uniCloud/cloudfunctions/common/uni-id/LICENSE.md" new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-id/uniCloud/cloudfunctions/common/uni-id/LICENSE.md" @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-id/uniCloud/cloudfunctions/common/uni-id/index.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-id/uniCloud/cloudfunctions/common/uni-id/index.js" new file mode 100644 index 0000000..33e4758 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-id/uniCloud/cloudfunctions/common/uni-id/index.js" @@ -0,0 +1 @@ +"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var t=e(require("fs")),r=e(require("path")),n=e(require("crypto")),i=e(require("querystring")),o=e(require("buffer")),s=e(require("stream")),a=e(require("util"));class c extends Error{constructor(e){super(e.message),this.errMsg=e.message||"",Object.defineProperties(this,{message:{get(){return`errCode: ${e.code||""} | errMsg: `+this.errMsg},set(e){this.errMsg=e}}})}}const u=Object.prototype.toString,f=Object.prototype.hasOwnProperty;function d(e,t){return f.call(e,t)}function l(e){return"[object Object]"===u.call(e)}function p(e){return"function"==typeof e}function m(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}const h=/_(\w)/g,g=/[A-Z]/g;function y(e){return e.replace(h,(e,t)=>t?t.toUpperCase():"")}function w(e){return e.replace(g,e=>"_"+e.toLowerCase())}function v(e,t){let r,n;switch(t){case"snake2camel":n=y,r=h;break;case"camel2snake":n=w,r=g}for(const i in e)if(d(e,i)&&r.test(i)){const r=n(i);e[r]=e[i],delete e[i],l(e[r])?e[r]=v(e[r],t):Array.isArray(e[r])&&(e[r]=e[r].map(e=>v(e,t)))}return e}function b(e){return v(e,"snake2camel")}function _(e){return v(e,"camel2snake")}function E(e){return function(e,t="-"){e=e||new Date;const r=[];return r.push(e.getFullYear()),r.push(("00"+(e.getMonth()+1)).substr(-2)),r.push(("00"+e.getDate()).substr(-2)),r.join(t)}(e=e||new Date)+" "+function(e,t=":"){e=e||new Date;const r=[];return r.push(("00"+e.getHours()).substr(-2)),r.push(("00"+e.getMinutes()).substr(-2)),r.push(("00"+e.getSeconds()).substr(-2)),r.join(t)}(e)}function S(){"development"===process.env.NODE_ENV&&console.log(...arguments)}function x(e=6){let t="";for(let r=0;r<e;r++)t+=Math.floor(10*Math.random());return t}function k(e){return Array.from(new Set(e))}function C(e={},t){if(!t||!e)return e;const r=["_pre","_purify","_post"];t._pre&&(e=t._pre(e));let n={shouldDelete:new Set([])};if(t._purify){const e=t._purify;for(const t in e)e[t]=new Set(e[t]);n=Object.assign(n,e)}if(l(t))for(const i in t){const o=t[i];p(o)&&-1===r.indexOf(i)?e[i]=o(e):"string"==typeof o&&-1===r.indexOf(i)&&(e[i]=e[o],n.shouldDelete.add(o))}else p(t)&&(e=t(e));if(n.shouldDelete)for(const t of n.shouldDelete)delete e[t];return t._post&&(e=t._post(e)),e}function j(e,t){const r=new e(t);return new Proxy(r,{get:function(e,t){if("function"==typeof e[t]&&0!==t.indexOf("_")&&e._protocols&&e._protocols[t]){const r=e._protocols[t];return async function(n){n=C(n,r.args);let i=await e[t](n);return i=C(i,r.returnValue),i}}return e[t]}})}function T(e){let t,r,n=e-Date.now(),i="鍚�";n<0&&(i="鍓�",n=-n);const o=Math.floor(n/1e3),s=Math.floor(o/60),a=Math.floor(s/60),c=Math.floor(a/24),u=Math.floor(c/30),f=Math.floor(u/12);switch(!0){case f>0:t=f,r="骞�";break;case u>0:t=u,r="鏈�";break;case c>0:t=c,r="澶�";break;case a>0:t=a,r="灏忔椂";break;case s>0:t=s,r="鍒嗛挓";break;default:t=o,r="绉�"}return`${t}${r}${i}`}const I=async function(){};function P(e){return I.constructor===e.constructor?async function(){const t=await e.apply(this,arguments);return l(t)&&t.msg&&(t.message=t.msg),t}:function(){const t=e.apply(this,arguments);return l(t)&&t.msg&&(t.message=t.msg),t}}const R=uniCloud.database(),A=R.collection("uni-id-users"),O=R.collection("opendb-verify-codes"),M=R.collection("uni-id-roles"),D=R.collection("uni-id-permissions"),L=90002;async function B({name:e,url:t,data:r,options:n,defaultOptions:i}){let o={};const s=_(Object.assign({},r));s&&s.access_token&&delete s.access_token;try{n=Object.assign({},i,n,{data:s}),o=await uniCloud.httpclient.request(t,n)}catch(t){return function(e,t){throw new c({code:t.code||-2,message:t.message||e+" fail"})}(e,t)}let a=o.data;const u=o.headers["content-type"];if(!Buffer.isBuffer(a)||0!==u.indexOf("text/plain")&&0!==u.indexOf("application/json"))Buffer.isBuffer(a)&&(a={buffer:a,contentType:u});else try{a=JSON.parse(a.toString())}catch(e){a=a.toString()}return b(function(e,t){if(t.errcode)throw new c({code:t.errcode||-2,message:t.errmsg||e+" fail"});return delete t.errcode,delete t.errmsg,{...t,errMsg:e+" ok",errCode:0}}(e,a||{errCode:-2,errMsg:"Request failed"}))}function N(e,t){let r="";if(t&&t.accessToken){r=`${e.indexOf("?")>-1?"&":"?"}access_token=${t.accessToken}`}return`${e}${r}`}class ${constructor(e){this.options=Object.assign({baseUrl:"https://api.weixin.qq.com",timeout:5e3},e)}async _requestWxOpenapi({name:e,url:t,data:r,options:n}){const i={method:"GET",dataType:"json",dataAsQueryString:!0,timeout:this.options.timeout};return await B({name:"auth."+e,url:`${this.options.baseUrl}${N(t,r)}`,data:r,options:n,defaultOptions:i})}async code2Session(e){return await this._requestWxOpenapi({name:"code2Session",url:"/sns/jscode2session",data:{grant_type:"authorization_code",appid:this.options.appId,secret:this.options.secret,js_code:e}})}async getOauthAccessToken(e){return await this._requestWxOpenapi({name:"getOauthAccessToken",url:"/sns/oauth2/access_token",data:{grant_type:"authorization_code",appid:this.options.appId,secret:this.options.secret,code:e}})}}const K={RSA:"RSA-SHA1",RSA2:"RSA-SHA256"};var V={code2Session:{returnValue:{openid:"userId"}}};class U extends class{constructor(e={}){if(!e.appId)throw new Error("appId required");if(!e.privateKey)throw new Error("privateKey required");const t={gateway:"https://openapi.alipay.com/gateway.do",timeout:5e3,charset:"utf-8",version:"1.0",signType:"RSA2",timeOffset:-(new Date).getTimezoneOffset()/60,keyType:"PKCS8"};e.sandbox&&(e.gateway="https://openapi.alipaydev.com/gateway.do"),this.options=Object.assign({},t,e);const r="PKCS8"===this.options.keyType?"PRIVATE KEY":"RSA PRIVATE KEY";this.options.privateKey=this._formatKey(this.options.privateKey,r),this.options.alipayPublicKey&&(this.options.alipayPublicKey=this._formatKey(this.options.alipayPublicKey,"PUBLIC KEY"))}_formatKey(e,t){return`-----BEGIN ${t}-----\n${e}\n-----END ${t}-----`}_formatUrl(e,t){let r=e;const n=["app_id","method","format","charset","sign_type","sign","timestamp","version","notify_url","return_url","auth_token","app_auth_token"];for(const e in t)if(n.indexOf(e)>-1){const n=encodeURIComponent(t[e]);r=`${r}${r.includes("?")?"&":"?"}${e}=${n}`,delete t[e]}return{execParams:t,url:r}}_getSign(e,t){const r=t.bizContent||null;delete t.bizContent;const i=Object.assign({method:e,appId:this.options.appId,charset:this.options.charset,version:this.options.version,signType:this.options.signType,timestamp:E((o=this.options.timeOffset,new Date(Date.now()+6e4*((new Date).getTimezoneOffset()+60*(o||0)))))},t);var o;r&&(i.bizContent=JSON.stringify(_(r)));const s=_(i),a=Object.keys(s).sort().map(e=>{let t=s[e];return"[object String]"!==Array.prototype.toString.call(t)&&(t=JSON.stringify(t)),`${e}=${t}`}).join("&"),c=n.createSign(K[this.options.signType]).update(a,"utf8").sign(this.options.privateKey,"base64");return Object.assign(s,{sign:c})}async _exec(e,t={},r={}){const n=this._getSign(e,t),{url:i,execParams:o}=this._formatUrl(this.options.gateway,n),{status:s,data:a}=await uniCloud.httpclient.request(i,{method:"POST",data:o,dataType:"text",timeout:this.options.timeout});if(200!==s)throw new Error("request fail");const c=JSON.parse(a),u=e.replace(/\./g,"_")+"_response",f=c[u],d=c.error_response;if(f){if(!r.validateSign||this._checkResponseSign(a,u)){if(!f.code||"10000"===f.code){return{errCode:0,errMsg:f.msg||"",...b(f)}}const e=f.sub_code?`${f.sub_code} ${f.sub_msg}`:""+(f.msg||"unkonwn error");throw new Error(e)}throw new Error("杩斿洖缁撴灉绛惧悕閿欒")}if(d)throw new Error(d.sub_msg||d.msg||"鎺ュ彛杩斿洖閿欒");throw new Error("request fail")}_checkResponseSign(e,t){if(!this.options.alipayPublicKey||""===this.options.alipayPublicKey)return console.warn("options.alipayPublicKey is empty"),!0;if(!e)return!1;const r=this._getSignStr(e,t),i=JSON.parse(e).sign,o=n.createVerify(K[this.options.signType]);return o.update(r,"utf8"),o.verify(this.options.alipayPublicKey,i,"base64")}_getSignStr(e,t){let r=e.trim();const n=e.indexOf(t+'"'),i=e.lastIndexOf('"sign"');return r=r.substr(n+t.length+1),r=r.substr(0,i),r=r.replace(/^[^{]*{/g,"{"),r=r.replace(/\}([^}]*)$/g,"}"),r}_notifyRSACheck(e,t,r){const i=Object.keys(e).sort().filter(e=>e).map(t=>{let r=e[t];return"[object String]"!==Array.prototype.toString.call(r)&&(r=JSON.stringify(r)),`${t}=${decodeURIComponent(r)}`}).join("&");return n.createVerify(K[r]).update(i,"utf8").verify(this.options.alipayPublicKey,t,"base64")}_checkNotifySign(e){const t=e.sign;if(!this.options.alipayPublicKey||!t)return!1;const r=e.sign_type||this.options.signType||"RSA2",n={...e};delete n.sign,n.sign_type=r;return!!this._notifyRSACheck(n,t,r)||(delete n.sign_type,this._notifyRSACheck(n,t,r))}_verifyNotify(e){if(!e.headers)throw new Error("閫氱煡鏍煎紡涓嶆纭�");let t;for(const r in e.headers)"content-type"===r.toLowerCase()&&(t=e.headers[r]);if(!1!==e.isBase64Encoded&&-1===t.indexOf("application/x-www-form-urlencoded"))throw new Error("閫氱煡鏍煎紡涓嶆纭�");const r=i.parse(e.body);if(this._checkNotifySign(r))return b(r);throw new Error("閫氱煡楠岀鏈�氳繃")}}{constructor(e){super(e),this._protocols=V}async code2Session(e){return await this._exec("alipay.system.oauth.token",{grantType:"authorization_code",code:e})}}function q(e){var t=e[0];return t<"0"||t>"7"?"00"+e:e}function H(e){var t=e.toString(16);return t.length%2?"0"+t:t}function F(e){if(e<=127)return H(e);var t=H(e);return H(128+t.length/2)+t}function J(e,t){return e(t={exports:{}},t.exports),t.exports}var G=J((function(e,t){var r=o.Buffer;function n(e,t){for(var r in e)t[r]=e[r]}function i(e,t,n){return r(e,t,n)}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?e.exports=o:(n(o,t),t.Buffer=i),i.prototype=Object.create(r.prototype),n(r,i),i.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return r(e,t,n)},i.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var i=r(e);return void 0!==t?"string"==typeof n?i.fill(t,n):i.fill(t):i.fill(0),i},i.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r(e)},i.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o.SlowBuffer(e)}})),z=(G.Buffer,G.Buffer);function W(e){if(this.buffer=null,this.writable=!0,this.readable=!0,!e)return this.buffer=z.alloc(0),this;if("function"==typeof e.pipe)return this.buffer=z.alloc(0),e.pipe(this),this;if(e.length||"object"==typeof e)return this.buffer=e,this.writable=!1,process.nextTick(function(){this.emit("end",e),this.readable=!1,this.emit("close")}.bind(this)),this;throw new TypeError("Unexpected data type ("+typeof e+")")}a.inherits(W,s),W.prototype.write=function(e){this.buffer=z.concat([this.buffer,z.from(e)]),this.emit("data",e)},W.prototype.end=function(e){e&&this.write(e),this.emit("end",e),this.emit("close"),this.writable=!1,this.readable=!1};var X=W,Y=o.Buffer,Z=o.SlowBuffer,Q=ee;function ee(e,t){if(!Y.isBuffer(e)||!Y.isBuffer(t))return!1;if(e.length!==t.length)return!1;for(var r=0,n=0;n<e.length;n++)r|=e[n]^t[n];return 0===r}ee.install=function(){Y.prototype.equal=Z.prototype.equal=function(e){return ee(this,e)}};var te=Y.prototype.equal,re=Z.prototype.equal;function ne(e){return(e/8|0)+(e%8==0?0:1)}ee.restore=function(){Y.prototype.equal=te,Z.prototype.equal=re};var ie={ES256:ne(256),ES384:ne(384),ES512:ne(521)};var oe=function(e){var t=ie[e];if(t)return t;throw new Error('Unknown algorithm "'+e+'"')},se=G.Buffer;function ae(e){if(se.isBuffer(e))return e;if("string"==typeof e)return se.from(e,"base64");throw new TypeError("ECDSA signature must be a Base64 string or a Buffer")}function ce(e,t,r){for(var n=0;t+n<r&&0===e[t+n];)++n;return e[t+n]>=128&&--n,n}var ue={derToJose:function(e,t){e=ae(e);var r=oe(t),n=r+1,i=e.length,o=0;if(48!==e[o++])throw new Error('Could not find expected "seq"');var s=e[o++];if(129===s&&(s=e[o++]),i-o<s)throw new Error('"seq" specified length of "'+s+'", only "'+(i-o)+'" remaining');if(2!==e[o++])throw new Error('Could not find expected "int" for "r"');var a=e[o++];if(i-o-2<a)throw new Error('"r" specified length of "'+a+'", only "'+(i-o-2)+'" available');if(n<a)throw new Error('"r" specified length of "'+a+'", max of "'+n+'" is acceptable');var c=o;if(o+=a,2!==e[o++])throw new Error('Could not find expected "int" for "s"');var u=e[o++];if(i-o!==u)throw new Error('"s" specified length of "'+u+'", expected "'+(i-o)+'"');if(n<u)throw new Error('"s" specified length of "'+u+'", max of "'+n+'" is acceptable');var f=o;if((o+=u)!==i)throw new Error('Expected to consume entire buffer, but "'+(i-o)+'" bytes remain');var d=r-a,l=r-u,p=se.allocUnsafe(d+a+l+u);for(o=0;o<d;++o)p[o]=0;e.copy(p,o,c+Math.max(-d,0),c+a);for(var m=o=r;o<m+l;++o)p[o]=0;return e.copy(p,o,f+Math.max(-l,0),f+u),p=(p=p.toString("base64")).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")},joseToDer:function(e,t){e=ae(e);var r=oe(t),n=e.length;if(n!==2*r)throw new TypeError('"'+t+'" signatures must be "'+2*r+'" bytes, saw "'+n+'"');var i=ce(e,0,r),o=ce(e,r,e.length),s=r-i,a=r-o,c=2+s+1+1+a,u=c<128,f=se.allocUnsafe((u?2:3)+c),d=0;return f[d++]=48,u?f[d++]=c:(f[d++]=129,f[d++]=255&c),f[d++]=2,f[d++]=s,i<0?(f[d++]=0,d+=e.copy(f,d,0,r)):d+=e.copy(f,d,i,r),f[d++]=2,f[d++]=a,o<0?(f[d++]=0,e.copy(f,d,r)):e.copy(f,d,r+o),f}},fe=G.Buffer,de="secret must be a string or buffer",le="key must be a string or a buffer",pe="function"==typeof n.createPublicKey;function me(e){if(!fe.isBuffer(e)&&"string"!=typeof e){if(!pe)throw we(le);if("object"!=typeof e)throw we(le);if("string"!=typeof e.type)throw we(le);if("string"!=typeof e.asymmetricKeyType)throw we(le);if("function"!=typeof e.export)throw we(le)}}function he(e){if(!fe.isBuffer(e)&&"string"!=typeof e&&"object"!=typeof e)throw we("key must be a string, a buffer or an object")}function ge(e){return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function ye(e){var t=4-(e=e.toString()).length%4;if(4!==t)for(var r=0;r<t;++r)e+="=";return e.replace(/\-/g,"+").replace(/_/g,"/")}function we(e){var t=[].slice.call(arguments,1),r=a.format.bind(a,e).apply(null,t);return new TypeError(r)}function ve(e){var t;return t=e,fe.isBuffer(t)||"string"==typeof t||(e=JSON.stringify(e)),e}function be(e){return function(t,r){!function(e){if(!fe.isBuffer(e)){if("string"==typeof e)return e;if(!pe)throw we(de);if("object"!=typeof e)throw we(de);if("secret"!==e.type)throw we(de);if("function"!=typeof e.export)throw we(de)}}(r),t=ve(t);var i=n.createHmac("sha"+e,r);return ge((i.update(t),i.digest("base64")))}}function _e(e){return function(t,r,n){var i=be(e)(t,n);return Q(fe.from(r),fe.from(i))}}function Ee(e){return function(t,r){he(r),t=ve(t);var i=n.createSign("RSA-SHA"+e);return ge((i.update(t),i.sign(r,"base64")))}}function Se(e){return function(t,r,i){me(i),t=ve(t),r=ye(r);var o=n.createVerify("RSA-SHA"+e);return o.update(t),o.verify(i,r,"base64")}}function xe(e){return function(t,r){he(r),t=ve(t);var i=n.createSign("RSA-SHA"+e);return ge((i.update(t),i.sign({key:r,padding:n.constants.RSA_PKCS1_PSS_PADDING,saltLength:n.constants.RSA_PSS_SALTLEN_DIGEST},"base64")))}}function ke(e){return function(t,r,i){me(i),t=ve(t),r=ye(r);var o=n.createVerify("RSA-SHA"+e);return o.update(t),o.verify({key:i,padding:n.constants.RSA_PKCS1_PSS_PADDING,saltLength:n.constants.RSA_PSS_SALTLEN_DIGEST},r,"base64")}}function Ce(e){var t=Ee(e);return function(){var r=t.apply(null,arguments);return r=ue.derToJose(r,"ES"+e)}}function je(e){var t=Se(e);return function(r,n,i){return n=ue.joseToDer(n,"ES"+e).toString("base64"),t(r,n,i)}}function Te(){return function(){return""}}function Ie(){return function(e,t){return""===t}}pe&&(le+=" or a KeyObject",de+="or a KeyObject");var Pe=function(e){var t={hs:be,rs:Ee,ps:xe,es:Ce,none:Te},r={hs:_e,rs:Se,ps:ke,es:je,none:Ie},n=e.match(/^(RS|PS|ES|HS)(256|384|512)$|^(none)$/i);if(!n)throw we('"%s" is not a valid algorithm.\n Supported algorithms are:\n "HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "PS256", "PS384", "PS512", "ES256", "ES384", "ES512" and "none".',e);var i=(n[1]||n[3]).toLowerCase(),o=n[2];return{sign:t[i](o),verify:r[i](o)}},Re=o.Buffer,Ae=function(e){return"string"==typeof e?e:"number"==typeof e||Re.isBuffer(e)?e.toString():JSON.stringify(e)},Oe=G.Buffer;function Me(e,t){return Oe.from(e,t).toString("base64").replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function De(e){var t=e.header,r=e.payload,n=e.secret||e.privateKey,i=e.encoding,o=Pe(t.alg),s=function(e,t,r){r=r||"utf8";var n=Me(Ae(e),"binary"),i=Me(Ae(t),r);return a.format("%s.%s",n,i)}(t,r,i),c=o.sign(s,n);return a.format("%s.%s",s,c)}function Le(e){var t=e.secret||e.privateKey||e.key,r=new X(t);this.readable=!0,this.header=e.header,this.encoding=e.encoding,this.secret=this.privateKey=this.key=r,this.payload=new X(e.payload),this.secret.once("close",function(){!this.payload.writable&&this.readable&&this.sign()}.bind(this)),this.payload.once("close",function(){!this.secret.writable&&this.readable&&this.sign()}.bind(this))}a.inherits(Le,s),Le.prototype.sign=function(){try{var e=De({header:this.header,payload:this.payload.buffer,secret:this.secret.buffer,encoding:this.encoding});return this.emit("done",e),this.emit("data",e),this.emit("end"),this.readable=!1,e}catch(e){this.readable=!1,this.emit("error",e),this.emit("close")}},Le.sign=De;var Be=Le,Ne=G.Buffer,$e=/^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/;function Ke(e){if(function(e){return"[object Object]"===Object.prototype.toString.call(e)}(e))return e;try{return JSON.parse(e)}catch(e){return}}function Ve(e){var t=e.split(".",1)[0];return Ke(Ne.from(t,"base64").toString("binary"))}function Ue(e){return e.split(".")[2]}function qe(e){return $e.test(e)&&!!Ve(e)}function He(e,t,r){if(!t){var n=new Error("Missing algorithm parameter for jws.verify");throw n.code="MISSING_ALGORITHM",n}var i=Ue(e=Ae(e)),o=function(e){return e.split(".",2).join(".")}(e);return Pe(t).verify(o,i,r)}function Fe(e,t){if(t=t||{},!qe(e=Ae(e)))return null;var r=Ve(e);if(!r)return null;var n=function(e,t){t=t||"utf8";var r=e.split(".")[1];return Ne.from(r,"base64").toString(t)}(e);return("JWT"===r.typ||t.json)&&(n=JSON.parse(n,t.encoding)),{header:r,payload:n,signature:Ue(e)}}function Je(e){var t=(e=e||{}).secret||e.publicKey||e.key,r=new X(t);this.readable=!0,this.algorithm=e.algorithm,this.encoding=e.encoding,this.secret=this.publicKey=this.key=r,this.signature=new X(e.signature),this.secret.once("close",function(){!this.signature.writable&&this.readable&&this.verify()}.bind(this)),this.signature.once("close",function(){!this.secret.writable&&this.readable&&this.verify()}.bind(this))}a.inherits(Je,s),Je.prototype.verify=function(){try{var e=He(this.signature.buffer,this.algorithm,this.key.buffer),t=Fe(this.signature.buffer,this.encoding);return this.emit("done",e,t),this.emit("data",e),this.emit("end"),this.readable=!1,e}catch(e){this.readable=!1,this.emit("error",e),this.emit("close")}},Je.decode=Fe,Je.isValid=qe,Je.verify=He;var Ge=Je,ze={ALGORITHMS:["HS256","HS384","HS512","RS256","RS384","RS512","PS256","PS384","PS512","ES256","ES384","ES512"],sign:Be.sign,verify:Ge.verify,decode:Ge.decode,isValid:Ge.isValid,createSign:function(e){return new Be(e)},createVerify:function(e){return new Ge(e)}},We=function(e,t){t=t||{};var r=ze.decode(e,t);if(!r)return null;var n=r.payload;if("string"==typeof n)try{var i=JSON.parse(n);null!==i&&"object"==typeof i&&(n=i)}catch(e){}return!0===t.complete?{header:r.header,payload:n,signature:r.signature}:n},Xe=function(e,t){Error.call(this,e),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name="JsonWebTokenError",this.message=e,t&&(this.inner=t)};(Xe.prototype=Object.create(Error.prototype)).constructor=Xe;var Ye=Xe,Ze=function(e,t){Ye.call(this,e),this.name="NotBeforeError",this.date=t};(Ze.prototype=Object.create(Ye.prototype)).constructor=Ze;var Qe=Ze,et=function(e,t){Ye.call(this,e),this.name="TokenExpiredError",this.expiredAt=t};(et.prototype=Object.create(Ye.prototype)).constructor=et;var tt=et,rt=1e3,nt=60*rt,it=60*nt,ot=24*it,st=function(e,t){t=t||{};var r=typeof e;if("string"===r&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var r=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*r;case"weeks":case"week":case"w":return 6048e5*r;case"days":case"day":case"d":return r*ot;case"hours":case"hour":case"hrs":case"hr":case"h":return r*it;case"minutes":case"minute":case"mins":case"min":case"m":return r*nt;case"seconds":case"second":case"secs":case"sec":case"s":return r*rt;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}(e);if("number"===r&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=ot)return at(e,t,ot,"day");if(t>=it)return at(e,t,it,"hour");if(t>=nt)return at(e,t,nt,"minute");if(t>=rt)return at(e,t,rt,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=ot)return Math.round(e/ot)+"d";if(t>=it)return Math.round(e/it)+"h";if(t>=nt)return Math.round(e/nt)+"m";if(t>=rt)return Math.round(e/rt)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function at(e,t,r,n){var i=t>=1.5*r;return Math.round(e/r)+" "+n+(i?"s":"")}var ct=function(e,t){var r=t||Math.floor(Date.now()/1e3);if("string"==typeof e){var n=st(e);if(void 0===n)return;return Math.floor(r+n/1e3)}return"number"==typeof e?r+e:void 0},ut=J((function(e,t){var r;t=e.exports=J,r="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},t.SEMVER_SPEC_VERSION="2.0.0";var n=Number.MAX_SAFE_INTEGER||9007199254740991,i=t.re=[],o=t.src=[],s=0,a=s++;o[a]="0|[1-9]\\d*";var c=s++;o[c]="[0-9]+";var u=s++;o[u]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var f=s++;o[f]="("+o[a]+")\\.("+o[a]+")\\.("+o[a]+")";var d=s++;o[d]="("+o[c]+")\\.("+o[c]+")\\.("+o[c]+")";var l=s++;o[l]="(?:"+o[a]+"|"+o[u]+")";var p=s++;o[p]="(?:"+o[c]+"|"+o[u]+")";var m=s++;o[m]="(?:-("+o[l]+"(?:\\."+o[l]+")*))";var h=s++;o[h]="(?:-?("+o[p]+"(?:\\."+o[p]+")*))";var g=s++;o[g]="[0-9A-Za-z-]+";var y=s++;o[y]="(?:\\+("+o[g]+"(?:\\."+o[g]+")*))";var w=s++,v="v?"+o[f]+o[m]+"?"+o[y]+"?";o[w]="^"+v+"$";var b="[v=\\s]*"+o[d]+o[h]+"?"+o[y]+"?",_=s++;o[_]="^"+b+"$";var E=s++;o[E]="((?:<|>)?=?)";var S=s++;o[S]=o[c]+"|x|X|\\*";var x=s++;o[x]=o[a]+"|x|X|\\*";var k=s++;o[k]="[v=\\s]*("+o[x]+")(?:\\.("+o[x]+")(?:\\.("+o[x]+")(?:"+o[m]+")?"+o[y]+"?)?)?";var C=s++;o[C]="[v=\\s]*("+o[S]+")(?:\\.("+o[S]+")(?:\\.("+o[S]+")(?:"+o[h]+")?"+o[y]+"?)?)?";var j=s++;o[j]="^"+o[E]+"\\s*"+o[k]+"$";var T=s++;o[T]="^"+o[E]+"\\s*"+o[C]+"$";var I=s++;o[I]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var P=s++;o[P]="(?:~>?)";var R=s++;o[R]="(\\s*)"+o[P]+"\\s+",i[R]=new RegExp(o[R],"g");var A=s++;o[A]="^"+o[P]+o[k]+"$";var O=s++;o[O]="^"+o[P]+o[C]+"$";var M=s++;o[M]="(?:\\^)";var D=s++;o[D]="(\\s*)"+o[M]+"\\s+",i[D]=new RegExp(o[D],"g");var L=s++;o[L]="^"+o[M]+o[k]+"$";var B=s++;o[B]="^"+o[M]+o[C]+"$";var N=s++;o[N]="^"+o[E]+"\\s*("+b+")$|^$";var $=s++;o[$]="^"+o[E]+"\\s*("+v+")$|^$";var K=s++;o[K]="(\\s*)"+o[E]+"\\s*("+b+"|"+o[k]+")",i[K]=new RegExp(o[K],"g");var V=s++;o[V]="^\\s*("+o[k]+")\\s+-\\s+("+o[k]+")\\s*$";var U=s++;o[U]="^\\s*("+o[C]+")\\s+-\\s+("+o[C]+")\\s*$";var q=s++;o[q]="(<|>)?=?\\s*\\*";for(var H=0;H<35;H++)r(H,o[H]),i[H]||(i[H]=new RegExp(o[H]));function F(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof J)return e;if("string"!=typeof e)return null;if(e.length>256)return null;if(!(t.loose?i[_]:i[w]).test(e))return null;try{return new J(e,t)}catch(e){return null}}function J(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof J){if(e.loose===t.loose)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>256)throw new TypeError("version is longer than 256 characters");if(!(this instanceof J))return new J(e,t);r("SemVer",e,t),this.options=t,this.loose=!!t.loose;var o=e.trim().match(t.loose?i[_]:i[w]);if(!o)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+o[1],this.minor=+o[2],this.patch=+o[3],this.major>n||this.major<0)throw new TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>n||this.patch<0)throw new TypeError("Invalid patch version");o[4]?this.prerelease=o[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t<n)return t}return e})):this.prerelease=[],this.build=o[5]?o[5].split("."):[],this.format()}t.parse=F,t.valid=function(e,t){var r=F(e,t);return r?r.version:null},t.clean=function(e,t){var r=F(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null},t.SemVer=J,J.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version},J.prototype.toString=function(){return this.version},J.prototype.compare=function(e){return r("SemVer.compare",this.version,this.options,e),e instanceof J||(e=new J(e,this.options)),this.compareMain(e)||this.comparePre(e)},J.prototype.compareMain=function(e){return e instanceof J||(e=new J(e,this.options)),z(this.major,e.major)||z(this.minor,e.minor)||z(this.patch,e.patch)},J.prototype.comparePre=function(e){if(e instanceof J||(e=new J(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;var t=0;do{var n=this.prerelease[t],i=e.prerelease[t];if(r("prerelease compare",t,n,i),void 0===n&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===n)return-1;if(n!==i)return z(n,i)}while(++t)},J.prototype.inc=function(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{for(var r=this.prerelease.length;--r>=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);-1===r&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},t.inc=function(e,t,r,n){"string"==typeof r&&(n=r,r=void 0);try{return new J(e,r).inc(t,n).version}catch(e){return null}},t.diff=function(e,t){if(Z(e,t))return null;var r=F(e),n=F(t),i="";if(r.prerelease.length||n.prerelease.length){i="pre";var o="prerelease"}for(var s in r)if(("major"===s||"minor"===s||"patch"===s)&&r[s]!==n[s])return i+s;return o},t.compareIdentifiers=z;var G=/^[0-9]+$/;function z(e,t){var r=G.test(e),n=G.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:e<t?-1:1}function W(e,t,r){return new J(e,r).compare(new J(t,r))}function X(e,t,r){return W(e,t,r)>0}function Y(e,t,r){return W(e,t,r)<0}function Z(e,t,r){return 0===W(e,t,r)}function Q(e,t,r){return 0!==W(e,t,r)}function ee(e,t,r){return W(e,t,r)>=0}function te(e,t,r){return W(e,t,r)<=0}function re(e,t,r,n){switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return Z(e,r,n);case"!=":return Q(e,r,n);case">":return X(e,r,n);case">=":return ee(e,r,n);case"<":return Y(e,r,n);case"<=":return te(e,r,n);default:throw new TypeError("Invalid operator: "+t)}}function ne(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof ne){if(e.loose===!!t.loose)return e;e=e.value}if(!(this instanceof ne))return new ne(e,t);r("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===ie?this.value="":this.value=this.operator+this.semver.version,r("comp",this)}t.rcompareIdentifiers=function(e,t){return z(t,e)},t.major=function(e,t){return new J(e,t).major},t.minor=function(e,t){return new J(e,t).minor},t.patch=function(e,t){return new J(e,t).patch},t.compare=W,t.compareLoose=function(e,t){return W(e,t,!0)},t.rcompare=function(e,t,r){return W(t,e,r)},t.sort=function(e,r){return e.sort((function(e,n){return t.compare(e,n,r)}))},t.rsort=function(e,r){return e.sort((function(e,n){return t.rcompare(e,n,r)}))},t.gt=X,t.lt=Y,t.eq=Z,t.neq=Q,t.gte=ee,t.lte=te,t.cmp=re,t.Comparator=ne;var ie={};function oe(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof oe)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new oe(e.raw,t);if(e instanceof ne)return new oe(e.value,t);if(!(this instanceof oe))return new oe(e,t);if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((function(e){return this.parseRange(e.trim())}),this).filter((function(e){return e.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function se(e){return!e||"x"===e.toLowerCase()||"*"===e}function ae(e,t,r,n,i,o,s,a,c,u,f,d,l){return((t=se(r)?"":se(n)?">="+r+".0.0":se(i)?">="+r+"."+n+".0":">="+t)+" "+(a=se(c)?"":se(u)?"<"+(+c+1)+".0.0":se(f)?"<"+c+"."+(+u+1)+".0":d?"<="+c+"."+u+"."+f+"-"+d:"<="+a)).trim()}function ce(e,t,n){for(var i=0;i<e.length;i++)if(!e[i].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(i=0;i<e.length;i++)if(r(e[i].semver),e[i].semver!==ie&&e[i].semver.prerelease.length>0){var o=e[i].semver;if(o.major===t.major&&o.minor===t.minor&&o.patch===t.patch)return!0}return!1}return!0}function ue(e,t,r){try{t=new oe(t,r)}catch(e){return!1}return t.test(e)}function fe(e,t,r,n){var i,o,s,a,c;switch(e=new J(e,n),t=new oe(t,n),r){case">":i=X,o=te,s=Y,a=">",c=">=";break;case"<":i=Y,o=ee,s=X,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(ue(e,t,n))return!1;for(var u=0;u<t.set.length;++u){var f=t.set[u],d=null,l=null;if(f.forEach((function(e){e.semver===ie&&(e=new ne(">=0.0.0")),d=d||e,l=l||e,i(e.semver,d.semver,n)?d=e:s(e.semver,l.semver,n)&&(l=e)})),d.operator===a||d.operator===c)return!1;if((!l.operator||l.operator===a)&&o(e,l.semver))return!1;if(l.operator===c&&s(e,l.semver))return!1}return!0}ne.prototype.parse=function(e){var t=this.options.loose?i[N]:i[$],r=e.match(t);if(!r)throw new TypeError("Invalid comparator: "+e);this.operator=r[1],"="===this.operator&&(this.operator=""),r[2]?this.semver=new J(r[2],this.options.loose):this.semver=ie},ne.prototype.toString=function(){return this.value},ne.prototype.test=function(e){return r("Comparator.test",e,this.options.loose),this.semver===ie||("string"==typeof e&&(e=new J(e,this.options)),re(e,this.operator,this.semver,this.options))},ne.prototype.intersects=function(e,t){if(!(e instanceof ne))throw new TypeError("a Comparator is required");var r;if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return r=new oe(e.value,t),ue(this.value,r,t);if(""===e.operator)return r=new oe(this.value,t),ue(e.semver,r,t);var n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),i=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),o=this.semver.version===e.semver.version,s=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),a=re(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),c=re(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return n||i||o&&s||a||c},t.Range=oe,oe.prototype.format=function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range},oe.prototype.toString=function(){return this.range},oe.prototype.parseRange=function(e){var t=this.options.loose;e=e.trim();var n=t?i[U]:i[V];e=e.replace(n,ae),r("hyphen replace",e),e=e.replace(i[K],"$1$2$3"),r("comparator trim",e,i[K]),e=(e=(e=e.replace(i[R],"$1~")).replace(i[D],"$1^")).split(/\s+/).join(" ");var o=t?i[N]:i[$],s=e.split(" ").map((function(e){return function(e,t){return r("comp",e,t),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){r("caret",e,t);var n=t.loose?i[B]:i[L];return e.replace(n,(function(t,n,i,o,s){var a;return r("caret",e,t,n,i,o,s),se(n)?a="":se(i)?a=">="+n+".0.0 <"+(+n+1)+".0.0":se(o)?a="0"===n?">="+n+"."+i+".0 <"+n+"."+(+i+1)+".0":">="+n+"."+i+".0 <"+(+n+1)+".0.0":s?(r("replaceCaret pr",s),a="0"===n?"0"===i?">="+n+"."+i+"."+o+"-"+s+" <"+n+"."+i+"."+(+o+1):">="+n+"."+i+"."+o+"-"+s+" <"+n+"."+(+i+1)+".0":">="+n+"."+i+"."+o+"-"+s+" <"+(+n+1)+".0.0"):(r("no pr"),a="0"===n?"0"===i?">="+n+"."+i+"."+o+" <"+n+"."+i+"."+(+o+1):">="+n+"."+i+"."+o+" <"+n+"."+(+i+1)+".0":">="+n+"."+i+"."+o+" <"+(+n+1)+".0.0"),r("caret return",a),a}))}(e,t)})).join(" ")}(e,t),r("caret",e),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){var n=t.loose?i[O]:i[A];return e.replace(n,(function(t,n,i,o,s){var a;return r("tilde",e,t,n,i,o,s),se(n)?a="":se(i)?a=">="+n+".0.0 <"+(+n+1)+".0.0":se(o)?a=">="+n+"."+i+".0 <"+n+"."+(+i+1)+".0":s?(r("replaceTilde pr",s),a=">="+n+"."+i+"."+o+"-"+s+" <"+n+"."+(+i+1)+".0"):a=">="+n+"."+i+"."+o+" <"+n+"."+(+i+1)+".0",r("tilde return",a),a}))}(e,t)})).join(" ")}(e,t),r("tildes",e),e=function(e,t){return r("replaceXRanges",e,t),e.split(/\s+/).map((function(e){return function(e,t){e=e.trim();var n=t.loose?i[T]:i[j];return e.replace(n,(function(t,n,i,o,s,a){r("xRange",e,t,n,i,o,s,a);var c=se(i),u=c||se(o),f=u||se(s);return"="===n&&f&&(n=""),c?t=">"===n||"<"===n?"<0.0.0":"*":n&&f?(u&&(o=0),s=0,">"===n?(n=">=",u?(i=+i+1,o=0,s=0):(o=+o+1,s=0)):"<="===n&&(n="<",u?i=+i+1:o=+o+1),t=n+i+"."+o+"."+s):u?t=">="+i+".0.0 <"+(+i+1)+".0.0":f&&(t=">="+i+"."+o+".0 <"+i+"."+(+o+1)+".0"),r("xRange return",t),t}))}(e,t)})).join(" ")}(e,t),r("xrange",e),e=function(e,t){return r("replaceStars",e,t),e.trim().replace(i[q],"")}(e,t),r("stars",e),e}(e,this.options)}),this).join(" ").split(/\s+/);return this.options.loose&&(s=s.filter((function(e){return!!e.match(o)}))),s=s.map((function(e){return new ne(e,this.options)}),this)},oe.prototype.intersects=function(e,t){if(!(e instanceof oe))throw new TypeError("a Range is required");return this.set.some((function(r){return r.every((function(r){return e.set.some((function(e){return e.every((function(e){return r.intersects(e,t)}))}))}))}))},t.toComparators=function(e,t){return new oe(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))},oe.prototype.test=function(e){if(!e)return!1;"string"==typeof e&&(e=new J(e,this.options));for(var t=0;t<this.set.length;t++)if(ce(this.set[t],e,this.options))return!0;return!1},t.satisfies=ue,t.maxSatisfying=function(e,t,r){var n=null,i=null;try{var o=new oe(t,r)}catch(e){return null}return e.forEach((function(e){o.test(e)&&(n&&-1!==i.compare(e)||(i=new J(n=e,r)))})),n},t.minSatisfying=function(e,t,r){var n=null,i=null;try{var o=new oe(t,r)}catch(e){return null}return e.forEach((function(e){o.test(e)&&(n&&1!==i.compare(e)||(i=new J(n=e,r)))})),n},t.minVersion=function(e,t){e=new oe(e,t);var r=new J("0.0.0");if(e.test(r))return r;if(r=new J("0.0.0-0"),e.test(r))return r;r=null;for(var n=0;n<e.set.length;++n){e.set[n].forEach((function(e){var t=new J(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":r&&!X(r,t)||(r=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}}))}if(r&&e.test(r))return r;return null},t.validRange=function(e,t){try{return new oe(e,t).range||"*"}catch(e){return null}},t.ltr=function(e,t,r){return fe(e,t,"<",r)},t.gtr=function(e,t,r){return fe(e,t,">",r)},t.outside=fe,t.prerelease=function(e,t){var r=F(e,t);return r&&r.prerelease.length?r.prerelease:null},t.intersects=function(e,t,r){return e=new oe(e,r),t=new oe(t,r),e.intersects(t)},t.coerce=function(e){if(e instanceof J)return e;if("string"!=typeof e)return null;var t=e.match(i[I]);if(null==t)return null;return F(t[1]+"."+(t[2]||"0")+"."+(t[3]||"0"))}})),ft=(ut.SEMVER_SPEC_VERSION,ut.re,ut.src,ut.parse,ut.valid,ut.clean,ut.SemVer,ut.inc,ut.diff,ut.compareIdentifiers,ut.rcompareIdentifiers,ut.major,ut.minor,ut.patch,ut.compare,ut.compareLoose,ut.rcompare,ut.sort,ut.rsort,ut.gt,ut.lt,ut.eq,ut.neq,ut.gte,ut.lte,ut.cmp,ut.Comparator,ut.Range,ut.toComparators,ut.satisfies,ut.maxSatisfying,ut.minSatisfying,ut.minVersion,ut.validRange,ut.ltr,ut.gtr,ut.outside,ut.prerelease,ut.intersects,ut.coerce,ut.satisfies(process.version,"^6.12.0 || >=8.0.0")),dt=["RS256","RS384","RS512","ES256","ES384","ES512"],lt=["RS256","RS384","RS512"],pt=["HS256","HS384","HS512"];ft&&(dt.splice(3,0,"PS256","PS384","PS512"),lt.splice(3,0,"PS256","PS384","PS512"));var mt=/^\s+|\s+$/g,ht=/^[-+]0x[0-9a-f]+$/i,gt=/^0b[01]+$/i,yt=/^0o[0-7]+$/i,wt=/^(?:0|[1-9]\d*)$/,vt=parseInt;function bt(e){return e!=e}function _t(e,t){return function(e,t){for(var r=-1,n=e?e.length:0,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}(t,(function(t){return e[t]}))}var Et,St,xt=Object.prototype,kt=xt.hasOwnProperty,Ct=xt.toString,jt=xt.propertyIsEnumerable,Tt=(Et=Object.keys,St=Object,function(e){return Et(St(e))}),It=Math.max;function Pt(e,t){var r=Ot(e)||function(e){return function(e){return Lt(e)&&Mt(e)}(e)&&kt.call(e,"callee")&&(!jt.call(e,"callee")||"[object Arguments]"==Ct.call(e))}(e)?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],n=r.length,i=!!n;for(var o in e)!t&&!kt.call(e,o)||i&&("length"==o||At(o,n))||r.push(o);return r}function Rt(e){if(r=(t=e)&&t.constructor,n="function"==typeof r&&r.prototype||xt,t!==n)return Tt(e);var t,r,n,i=[];for(var o in Object(e))kt.call(e,o)&&"constructor"!=o&&i.push(o);return i}function At(e,t){return!!(t=null==t?9007199254740991:t)&&("number"==typeof e||wt.test(e))&&e>-1&&e%1==0&&e<t}var Ot=Array.isArray;function Mt(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}(e.length)&&!function(e){var t=Dt(e)?Ct.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)}function Dt(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Lt(e){return!!e&&"object"==typeof e}var Bt=function(e,t,r,n){var i;e=Mt(e)?e:(i=e)?_t(i,function(e){return Mt(e)?Pt(e):Rt(e)}(i)):[],r=r&&!n?function(e){var t=function(e){if(!e)return 0===e?e:0;if((e=function(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||Lt(e)&&"[object Symbol]"==Ct.call(e)}(e))return NaN;if(Dt(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Dt(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(mt,"");var r=gt.test(e);return r||yt.test(e)?vt(e.slice(2),r?2:8):ht.test(e)?NaN:+e}(e))===1/0||e===-1/0){return 17976931348623157e292*(e<0?-1:1)}return e==e?e:0}(e),r=t%1;return t==t?r?t-r:t:0}(r):0;var o=e.length;return r<0&&(r=It(o+r,0)),function(e){return"string"==typeof e||!Ot(e)&&Lt(e)&&"[object String]"==Ct.call(e)}(e)?r<=o&&e.indexOf(t,r)>-1:!!o&&function(e,t,r){if(t!=t)return function(e,t,r,n){for(var i=e.length,o=r+(n?1:-1);n?o--:++o<i;)if(t(e[o],o,e))return o;return-1}(e,bt,r);for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}(e,t,r)>-1},Nt=Object.prototype.toString;var $t=function(e){return!0===e||!1===e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Boolean]"==Nt.call(e)},Kt=/^\s+|\s+$/g,Vt=/^[-+]0x[0-9a-f]+$/i,Ut=/^0b[01]+$/i,qt=/^0o[0-7]+$/i,Ht=parseInt,Ft=Object.prototype.toString;function Jt(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var Gt=function(e){return"number"==typeof e&&e==function(e){var t=function(e){if(!e)return 0===e?e:0;if((e=function(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==Ft.call(e)}(e))return NaN;if(Jt(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Jt(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(Kt,"");var r=Ut.test(e);return r||qt.test(e)?Ht(e.slice(2),r?2:8):Vt.test(e)?NaN:+e}(e))===1/0||e===-1/0){return 17976931348623157e292*(e<0?-1:1)}return e==e?e:0}(e),r=t%1;return t==t?r?t-r:t:0}(e)},zt=Object.prototype.toString;var Wt=function(e){return"number"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Number]"==zt.call(e)};var Xt=Function.prototype,Yt=Object.prototype,Zt=Xt.toString,Qt=Yt.hasOwnProperty,er=Zt.call(Object),tr=Yt.toString,rr=function(e,t){return function(r){return e(t(r))}}(Object.getPrototypeOf,Object);var nr=function(e){if(!function(e){return!!e&&"object"==typeof e}(e)||"[object Object]"!=tr.call(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e))return!1;var t=rr(e);if(null===t)return!0;var r=Qt.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&Zt.call(r)==er},ir=Object.prototype.toString,or=Array.isArray;var sr=function(e){return"string"==typeof e||!or(e)&&function(e){return!!e&&"object"==typeof e}(e)&&"[object String]"==ir.call(e)},ar=/^\s+|\s+$/g,cr=/^[-+]0x[0-9a-f]+$/i,ur=/^0b[01]+$/i,fr=/^0o[0-7]+$/i,dr=parseInt,lr=Object.prototype.toString;function pr(e,t){var r;if("function"!=typeof t)throw new TypeError("Expected a function");return e=function(e){var t=function(e){if(!e)return 0===e?e:0;if((e=function(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==lr.call(e)}(e))return NaN;if(mr(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=mr(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(ar,"");var r=ur.test(e);return r||fr.test(e)?dr(e.slice(2),r?2:8):cr.test(e)?NaN:+e}(e))===1/0||e===-1/0){return 17976931348623157e292*(e<0?-1:1)}return e==e?e:0}(e),r=t%1;return t==t?r?t-r:t:0}(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=void 0),r}}function mr(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var hr=function(e){return pr(2,e)},gr=["RS256","RS384","RS512","ES256","ES384","ES512","HS256","HS384","HS512","none"];ft&&gr.splice(3,0,"PS256","PS384","PS512");var yr={expiresIn:{isValid:function(e){return Gt(e)||sr(e)&&e},message:'"expiresIn" should be a number of seconds or string representing a timespan'},notBefore:{isValid:function(e){return Gt(e)||sr(e)&&e},message:'"notBefore" should be a number of seconds or string representing a timespan'},audience:{isValid:function(e){return sr(e)||Array.isArray(e)},message:'"audience" must be a string or array'},algorithm:{isValid:Bt.bind(null,gr),message:'"algorithm" must be a valid string enum value'},header:{isValid:nr,message:'"header" must be an object'},encoding:{isValid:sr,message:'"encoding" must be a string'},issuer:{isValid:sr,message:'"issuer" must be a string'},subject:{isValid:sr,message:'"subject" must be a string'},jwtid:{isValid:sr,message:'"jwtid" must be a string'},noTimestamp:{isValid:$t,message:'"noTimestamp" must be a boolean'},keyid:{isValid:sr,message:'"keyid" must be a string'},mutatePayload:{isValid:$t,message:'"mutatePayload" must be a boolean'}},wr={iat:{isValid:Wt,message:'"iat" should be a number of seconds'},exp:{isValid:Wt,message:'"exp" should be a number of seconds'},nbf:{isValid:Wt,message:'"nbf" should be a number of seconds'}};function vr(e,t,r,n){if(!nr(r))throw new Error('Expected "'+n+'" to be a plain object.');Object.keys(r).forEach((function(i){var o=e[i];if(o){if(!o.isValid(r[i]))throw new Error(o.message)}else if(!t)throw new Error('"'+i+'" is not allowed in "'+n+'"')}))}var br={audience:"aud",issuer:"iss",subject:"sub",jwtid:"jti"},_r=["expiresIn","notBefore","noTimestamp","audience","issuer","subject","jwtid"],Er=function(e,t,r,n){var i;if("function"!=typeof r||n||(n=r,r={}),r||(r={}),r=Object.assign({},r),i=n||function(e,t){if(e)throw e;return t},r.clockTimestamp&&"number"!=typeof r.clockTimestamp)return i(new Ye("clockTimestamp must be a number"));if(void 0!==r.nonce&&("string"!=typeof r.nonce||""===r.nonce.trim()))return i(new Ye("nonce must be a non-empty string"));var o=r.clockTimestamp||Math.floor(Date.now()/1e3);if(!e)return i(new Ye("jwt must be provided"));if("string"!=typeof e)return i(new Ye("jwt must be a string"));var s,a=e.split(".");if(3!==a.length)return i(new Ye("jwt malformed"));try{s=We(e,{complete:!0})}catch(e){return i(e)}if(!s)return i(new Ye("invalid token"));var c,u=s.header;if("function"==typeof t){if(!n)return i(new Ye("verify must be called asynchronous if secret or public key is provided as a callback"));c=t}else c=function(e,r){return r(null,t)};return c(u,(function(t,n){if(t)return i(new Ye("error in secret or public key callback: "+t.message));var c,f=""!==a[2].trim();if(!f&&n)return i(new Ye("jwt signature is required"));if(f&&!n)return i(new Ye("secret or public key must be provided"));if(f||r.algorithms||(r.algorithms=["none"]),r.algorithms||(r.algorithms=~n.toString().indexOf("BEGIN CERTIFICATE")||~n.toString().indexOf("BEGIN PUBLIC KEY")?dt:~n.toString().indexOf("BEGIN RSA PUBLIC KEY")?lt:pt),!~r.algorithms.indexOf(s.header.alg))return i(new Ye("invalid algorithm"));try{c=ze.verify(e,s.header.alg,n)}catch(e){return i(e)}if(!c)return i(new Ye("invalid signature"));var d=s.payload;if(void 0!==d.nbf&&!r.ignoreNotBefore){if("number"!=typeof d.nbf)return i(new Ye("invalid nbf value"));if(d.nbf>o+(r.clockTolerance||0))return i(new Qe("jwt not active",new Date(1e3*d.nbf)))}if(void 0!==d.exp&&!r.ignoreExpiration){if("number"!=typeof d.exp)return i(new Ye("invalid exp value"));if(o>=d.exp+(r.clockTolerance||0))return i(new tt("jwt expired",new Date(1e3*d.exp)))}if(r.audience){var l=Array.isArray(r.audience)?r.audience:[r.audience];if(!(Array.isArray(d.aud)?d.aud:[d.aud]).some((function(e){return l.some((function(t){return t instanceof RegExp?t.test(e):t===e}))})))return i(new Ye("jwt audience invalid. expected: "+l.join(" or ")))}if(r.issuer&&("string"==typeof r.issuer&&d.iss!==r.issuer||Array.isArray(r.issuer)&&-1===r.issuer.indexOf(d.iss)))return i(new Ye("jwt issuer invalid. expected: "+r.issuer));if(r.subject&&d.sub!==r.subject)return i(new Ye("jwt subject invalid. expected: "+r.subject));if(r.jwtid&&d.jti!==r.jwtid)return i(new Ye("jwt jwtid invalid. expected: "+r.jwtid));if(r.nonce&&d.nonce!==r.nonce)return i(new Ye("jwt nonce invalid. expected: "+r.nonce));if(r.maxAge){if("number"!=typeof d.iat)return i(new Ye("iat required when maxAge is specified"));var p=ct(r.maxAge,d.iat);if(void 0===p)return i(new Ye('"maxAge" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'));if(o>=p+(r.clockTolerance||0))return i(new tt("maxAge exceeded",new Date(1e3*p)))}if(!0===r.complete){var m=s.signature;return i(null,{header:u,payload:d,signature:m})}return i(null,d)}))},Sr=function(e,t,r,n){"function"==typeof r?(n=r,r={}):r=r||{};var i="object"==typeof e&&!Buffer.isBuffer(e),o=Object.assign({alg:r.algorithm||"HS256",typ:i?"JWT":void 0,kid:r.keyid},r.header);function s(e){if(n)return n(e);throw e}if(!t&&"none"!==r.algorithm)return s(new Error("secretOrPrivateKey must have a value"));if(void 0===e)return s(new Error("payload is required"));if(i){try{!function(e){vr(wr,!0,e,"payload")}(e)}catch(e){return s(e)}r.mutatePayload||(e=Object.assign({},e))}else{var a=_r.filter((function(e){return void 0!==r[e]}));if(a.length>0)return s(new Error("invalid "+a.join(",")+" option for "+typeof e+" payload"))}if(void 0!==e.exp&&void 0!==r.expiresIn)return s(new Error('Bad "options.expiresIn" option the payload already has an "exp" property.'));if(void 0!==e.nbf&&void 0!==r.notBefore)return s(new Error('Bad "options.notBefore" option the payload already has an "nbf" property.'));try{!function(e){vr(yr,!1,e,"options")}(r)}catch(e){return s(e)}var c=e.iat||Math.floor(Date.now()/1e3);if(r.noTimestamp?delete e.iat:i&&(e.iat=c),void 0!==r.notBefore){try{e.nbf=ct(r.notBefore,c)}catch(e){return s(e)}if(void 0===e.nbf)return s(new Error('"notBefore" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}if(void 0!==r.expiresIn&&"object"==typeof e){try{e.exp=ct(r.expiresIn,c)}catch(e){return s(e)}if(void 0===e.exp)return s(new Error('"expiresIn" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}Object.keys(br).forEach((function(t){var n=br[t];if(void 0!==r[t]){if(void 0!==e[n])return s(new Error('Bad "options.'+t+'" option. The payload already has an "'+n+'" property.'));e[n]=r[t]}}));var u=r.encoding||"utf8";if("function"!=typeof n)return ze.sign({header:o,payload:e,secret:t,encoding:u});n=n&&hr(n),ze.createSign({header:o,privateKey:t,payload:e,encoding:u}).once("error",n).once("done",(function(e){n(null,e)}))};let xr=[];class kr{constructor(e){this.fetched=!1,this.options=Object.assign({baseUrl:"https://appleid.apple.com",timeout:1e4},e)}async _fetch(e,t){const{baseUrl:r}=this.options;return uniCloud.httpclient.request(r+e,t)}async verifyIdentityToken(e){const t=e.split(".")[0],r=JSON.parse(Buffer.from(t,"base64").toString()).kid;if(!xr.length)try{xr=await this.getAuthKeys()}catch(e){return{code:10705,msg:e.message}}let n=this.getUsedKey(xr,r);if(!Object.keys(n).length&&!this.fetched){try{xr=await this.getAuthKeys()}catch(e){return{code:10705,msg:e.message}}n=this.getUsedKey(xr,r)}let i=null;try{i=Er(e,function(e,t){var r=Buffer.from(e,"base64"),n=Buffer.from(t,"base64"),i=r.toString("hex"),o=n.toString("hex");i=q(i),o=q(o);var s=i.length/2,a=o.length/2,c=F(s),u=F(a),f="30"+F(s+a+c.length/2+u.length/2+2)+"02"+c+i+"02"+u+o;return"-----BEGIN RSA PUBLIC KEY-----\n"+Buffer.from(f,"hex").toString("base64").match(/.{1,64}/g).join("\n")+"\n-----END RSA PUBLIC KEY-----\n"}(n.n,n.e),{algorithms:n.alg})}catch(e){return{code:10705,msg:e.message}}return{code:0,msg:i}}async getAuthKeys(){const{status:e,data:t}=await this._fetch("/auth/keys",{method:"GET",dataType:"json",timeout:this.options.timeout});if(this.fetched=!0,200!==e)throw new Error("request fail");return t.keys}getUsedKey(e,t){let r={};for(let n=0;n<e.length;n++){const i=e[n];if(i.kid===t){r=i;break}}return r}}var Cr=function(e={}){return e.appId=e.appid,e.secret=e.appsecret,j($,e)},jr=function(e={}){return e.appId=e.appid,j(U,e)},Tr=function(e={}){return j(kr,e)};function Ir(e=6){const t=["2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","J","K","L","M","N","P","Q","R","S","T","U","V","W","X","Y","Z"];let r="";for(let n=0;n<e;n++)r+=t[Math.floor(Math.random()*t.length)];return r}const Pr=uniCloud.database().command;const Rr=uniCloud.database();const Ar=uniCloud.database();async function Or(e){const t=["apiKey","apiSecret"];for(let r=0,n=t.length;r<n;r++){const n=t[r];if(!e[n])throw new Error("璇峰湪config.json涓璼ervice.univerify涓嬮厤缃�"+n)}if(!e.openid||!e.access_token)throw new Error("涓�閿櫥褰曢渶瑕佷紶閫抩penid鍜宎ccess_token");return function(e){const t={0:"鎴愬姛",4e3:"缂哄け鍙傛暟",4001:"apiKey涓嶅瓨鍦�",4002:"sign鏍¢獙涓嶉�氳繃",4003:"appid涓嶅瓨鍦�",4004:"搴旂敤鏈紑閫氫竴閿櫥褰曟湇鍔�",4005:"搴旂敤寮�閫氱殑涓�閿櫥褰曟湇鍔℃鍦ㄥ鏍镐腑",4006:"鏈嶅姟绌洪棿涓嶅湪鐧藉悕鍗曚腑",4100:"璐︽埛浣欓涓嶈冻",5e3:"鑾峰彇鎵嬫満鍙峰け璐ワ紝璇风◢鍚庨噸璇�(鎴栧叾浠栨湭鐭ラ敊璇�)"};return{...e,msg:t[e.code]?"[getPhoneNumber] 鑾峰彇鎵嬫満鍙�: "+t[e.code]:e.errMsg}}(await uniCloud.getPhoneNumber({provider:"univerify",...e}))}const Mr=uniCloud.database();const Dr=uniCloud.database();const Lr=uniCloud.database();const Br=uniCloud.database().command;const Nr=uniCloud.database();const $r=uniCloud.database();const Kr=uniCloud.database();const Vr=uniCloud.database();const Ur=uniCloud.database();const qr=uniCloud.database().command;const Hr=uniCloud.database();var Fr=Object.freeze({__proto__:null,getUserInfo:async function({uid:e,field:t}){const r={};if(t&&t.length)for(let e=0;e<t.length;e++)r[t[e]]=!0;let n;return n=t&&t.length?await A.doc(e).field(r).get():await A.doc(e).get(),0===n.data.length?{code:80301,msg:"鏈煡璇㈠埌鐢ㄦ埛淇℃伅"}:{code:0,msg:"鑾峰彇鐢ㄦ埛淇℃伅鎴愬姛",userInfo:n.data[0]}},getUserInfoByToken:async function(e){const t=this._verifyToken(e);return t.code||(delete t.iat,delete t.exp),t},resetPwd:async function({uid:e,password:t}){const{passwordHash:r,version:n}=this.encryptPwd(t),i={password:r,token:[]};return n&&(i.password_secret_version=n),S("upRes",await A.doc(e).update(i)),{code:0,msg:"瀵嗙爜閲嶇疆鎴愬姛"}},setAvatar:async function(e){return S("setAvatar -> upRes",await A.doc(e.uid).update({avatar:e.avatar})),{code:0,msg:"澶村儚璁剧疆鎴愬姛"}},updatePwd:async function(e){const t=await A.doc(e.uid).get();if(t&&t.data&&t.data.length>0){if(0===this._checkPwd(t.data[0],e.oldPassword).code){const{passwordHash:r,version:n}=this.encryptPwd(e.newPassword),i={password:r,token:[]};n&&(i.password_secret_version=n);return S("upRes",await A.doc(t.data[0]._id).update(i)),{code:0,msg:"淇敼鎴愬姛"}}return{code:40202,msg:"鏃у瘑鐮侀敊璇�"}}return{code:40201,msg:"鐢ㄦ埛涓嶅瓨鍦�"}},updateUser:async function(e){const t=e.uid;if(!t)return{code:80101,msg:"缂哄皯uid鍙傛暟"};delete e.uid;const{username:r,email:n}=e,{usernameToLowerCase:i,emailToLowerCase:o}=this._getConfig();let s=r&&r.trim(),a=n&&n.trim();return s&&(i&&(s=s.toLowerCase()),e.username=s),a&&(o&&(a=a.toLowerCase()),e.email=a),S("update -> upRes",await A.doc(t).update(e)),{code:0,msg:"淇敼鎴愬姛"}},_getAlipayApi:function({platform:e}={}){const t=e||this.context.PLATFORM;if(!t)throw new Error("鏈兘鑾峰彇瀹㈡埛绔钩鍙颁俊鎭紝璇蜂富鍔ㄤ紶鍏latform");const r=this._getConfig(t);if(!r.oauth||!r.oauth.alipay)throw new Error(`璇峰湪鍏敤妯″潡uni-id鐨刢onfig.json鎴杋nit鏂规硶涓坊鍔�${t}骞冲彴鏀粯瀹濈櫥褰曢厤缃」`);return["appid","privateKey"].forEach(e=>{if(!r.oauth.alipay[e])throw new Error(`璇峰湪鍏敤妯″潡uni-id鐨刢onfig.json鎴杋nit鏂规硶涓坊鍔犻厤缃」锛�${t}.oauth.alipay.${e}`)}),jr({...r.oauth.alipay,clientType:t})},_getValidInviteCode:async function({inviteCode:e}){let t,r=10;e?(r=1,t=e):t=Ir();let n=!1;try{for(;r>0&&!n;){r--;if(0===(await A.where({invite_code:t}).get()).data.length){n=!0;break}t=Ir()}return n?{code:0,inviteCode:t}:e?{code:80401,msg:"閭�璇风爜閲嶅锛岃缃け璐�"}:{code:80402,msg:"閭�璇风爜璁剧疆澶辫触绋嶅悗鍐嶈瘯"}}catch(e){return{code:90001,msg:"鏁版嵁搴撹鍐欏紓甯�"}}},_addUser:async function(e,t={}){const r=this._getConfig(),n={...e,register_date:Date.now(),register_ip:this.context.CLIENTIP},i=(await A.add(n)).id;let o;if(r.removePermissionAndRoleFromToken){const e=t.needPermission;o=await this.createToken({uid:i,needPermission:e})}else{const t=e.role||[];let r;r=0===t.length||t.includes("admin")?[]:await this._getPermissionListByRoleList(t),o=await this.createToken({uid:i,role:t,permission:r})}const{token:s,tokenExpired:a}=o;return await A.doc(i).update({token:[s]}),{token:s,tokenExpired:a,uid:i,type:"register",userInfo:Object.assign({},n,{token:s})}},_loginExec:async function(e,t={}){if(1===e.status)return{code:10001,msg:"璐﹀彿宸茬鐢�"};const r=this._getConfig();let n=e.token||[];"string"==typeof n&&(n=[n]);const i=this._getExpiredToken(n);let o;if(n=n.filter(e=>-1===i.indexOf(e)),r.removePermissionAndRoleFromToken){const r=t.needPermission;o=await this.createToken({uid:e._id,needPermission:r})}else{const t=e.role||[];let r;r=0===t.length||t.includes("admin")?[]:await this._getPermissionListByRoleList(t),o=await this.createToken({uid:e._id,role:t,permission:r})}const{token:s,tokenExpired:a}=o;n.push(s),e.token=n;const c={last_login_date:Date.now(),last_login_ip:this.context.CLIENTIP,token:n,...t.extraData};await A.doc(e._id).update(c);const u=Object.assign({},e,c);return{code:0,msg:"鐧诲綍鎴愬姛",token:s,uid:u._id,username:u.username,type:"login",userInfo:u,tokenExpired:a}},_registerExec:async function(e,t={}){const{my_invite_code:r}=e;if(this._getConfig().autoSetInviteCode||r){const t=await this._getValidInviteCode({inviteCode:r});if(t.code>0)return t;e.my_invite_code=t.inviteCode}return{code:0,msg:"娉ㄥ唽鎴愬姛",...await this._addUser(e,t)}},_getWeixinApi:function({platform:e}={}){const t=e||this.context.PLATFORM;if(!t)throw new Error("鏈兘鑾峰彇瀹㈡埛绔钩鍙颁俊鎭紝璇蜂富鍔ㄤ紶鍏latform");const r=this._getConfig(t);if(!r.oauth||!r.oauth.weixin)throw new Error(`璇峰湪鍏敤妯″潡uni-id鐨刢onfig.json鎴杋nit鏂规硶涓坊鍔�${t}骞冲彴寰俊鐧诲綍閰嶇疆椤筦);return["appid","appsecret"].forEach(e=>{if(!r.oauth.weixin[e])throw new Error(`璇峰湪鍏敤妯″潡uni-id鐨刢onfig.json鎴杋nit鏂规硶涓坊鍔犻厤缃」锛�${t}.oauth.weixin.${e}`)}),Cr({...r.oauth.weixin,clientType:t})},_getMatchedUser:function(e,t){if(0===e.length)return{code:10002,msg:"鐢ㄦ埛涓嶅瓨鍦�"};let r;const n={},i={};for(let r=e.length-1;r>=0;r--){const o=e[r];for(let s=0;s<t.length;s++){const{field:a,value:c,fallbackValue:u}=t[s];c&&o[a]===c?(n[a]=o,e.splice(r,1)):u&&o[a]===u&&(n[a]||(n[a]=o),i[a]=!0,e.splice(r,1))}}const o=Object.keys(n);let s;switch(o.length){case 0:r=e[0],e.splice(0,1);break;case 1:s=o[0],r=n[s];break;default:return{code:10003,msg:"鍖归厤鍒板涓处鍙凤紝璇疯仈绯荤鐞嗗憳澶勭悊"}}return e.length>0?{code:10003,msg:"鍖归厤鍒板涓处鍙凤紝璇疯仈绯荤鐞嗗憳澶勭悊"}:{code:0,msg:"",userMatched:r,fieldMatched:s,isFallbackValueMatched:!!s&&i[s]}},acceptInvite:async function({uid:e,inviteCode:t}){const r=await A.where({_id:Pr.neq(e),inviter_uid:Pr.not(Pr.all([e])),my_invite_code:t}).get();if(1!==r.data.length)return{code:80501,msg:"閭�璇风爜鏃犳晥"};const n=[r.data[0]._id].concat(r.data[0].inviter_uid||[]),i=await A.doc(e).field({my_invite_code:!0,inviter_uid:!0}).get();if(0===i.data.length)return{code:80502,msg:"uid閿欒鐢ㄦ埛涓嶅瓨鍦�"};if(i.data[0].inviter_uid&&i.data[0].inviter_uid.length>0)return{code:80503,msg:"閭�璇风爜涓嶅彲淇敼"};const o=Date.now();return await A.doc(e).update({inviter_uid:n,invite_time:o}),await A.where({inviter_uid:e}).update({inviter_uid:Pr.push(n)}),{code:0,msg:"閭�璇风爜濉啓鎴愬姛"}},getInvitedUser:async function({uid:e,level:t=1,limit:r=20,offset:n=0,needTotal:i=!1}){const o={code:0,msg:"鑾峰彇閭�璇峰垪琛ㄦ垚鍔�",invitedUser:(await A.where({["inviter_uid."+(t-1)]:e}).field({_id:!0,username:!0,mobile:!0,invite_time:!0}).orderBy("invite_time","desc").skip(n).limit(r).get()).data};if(i){const r=await A.where({["inviter_uid."+(t-1)]:e}).count();o.total=r.total}return o},setUserInviteCode:async function({uid:e,myInviteCode:t}){const r=await this._getValidInviteCode({inviteCode:t});return r.code>0?r:(await A.doc(e).update({my_invite_code:r.inviteCode}),{code:0,msg:"閭�璇风爜璁剧疆鎴愬姛",myInviteCode:r.inviteCode})},loginByAlipay:async function(e){let t=e;"string"==typeof e&&(t={code:e});const r=t.needPermission,n=t.platform||this.context.PLATFORM,{openid:i}=await this._getAlipayApi({platform:n}).code2Session(t.code);if(!i)return{code:10501,msg:"鑾峰彇openid澶辫触"};const o=await A.where({ali_openid:i}).get();if(o&&o.data&&o.data.length>0){const e=o.data[0],t=await this._loginExec(e,{needPermission:r});if(0!==t.code)return t;const{userInfo:n}=t;return{...t,openid:i,mobileConfirmed:1===n.mobile_confirmed,emailConfirmed:1===n.email_confirmed}}{const e={ali_openid:i};e.my_invite_code=t.myInviteCode,e.role=t.role;const n=await this._registerExec(e,{needPermission:r});return 0!==n.code?n:{...n,openid:i,mobileConfirmed:!1,emailConfirmed:!1}}},loginByEmail:async function({email:e,code:t,password:r,myInviteCode:n,type:i,needPermission:o,role:s}){if(!(e=e&&e.trim()))return{code:L,msg:"閭涓嶅彲涓虹┖"};const{emailToLowerCase:a}=this._getConfig();let c=e;a&&(c=e.toLowerCase());const u=await this.verifyCode({email:c,code:t,type:i||"login"});if(0!==u.code)return u;let f={email:e,email_confirmed:1};const d={field:"email",value:e},l=Rr.command;c!==e&&(f=l.or(f,{email:c,email_confirmed:1}),d.fallbackValue=c);const p=await A.where(f).get();if(p&&p.data&&p.data.length>0){if("register"===i)return{code:10301,msg:"姝ら偖绠卞凡娉ㄥ唽"};const e=this._getMatchedUser(p.data,[d]);if(e.code)return e;const{userMatched:t}=e,r=await this._loginExec(t,{needPermission:o});return 0!==r.code?r:{...r,email:c}}{if("login"===i)return{code:10302,msg:"姝ら偖绠卞皻鏈敞鍐�"};const e={email:c,email_confirmed:1},t=r&&r.trim();if(t){const{passwordHash:r,version:n}=this.encryptPwd(t);e.password=r,n&&(e.password_secret_version=n)}e.my_invite_code=n,e.role=s;const a=await this._registerExec(e,{needPermission:o});return 0!==a.code?a:{...a,email:c}}},loginBySms:async function({mobile:e,code:t,password:r,inviteCode:n,myInviteCode:i,type:o,needPermission:s,role:a}){if(!(e=e&&e.trim()))return{code:L,msg:"鎵嬫満鍙风爜涓嶅彲涓虹┖"};const c=this._getConfig();if(c.forceInviteCode&&!o)throw new Error("[loginBySms]寮哄埗浣跨敤閭�璇风爜娉ㄥ唽鏃讹紝闇�鎸囨槑type涓簉egister杩樻槸login");const u=await this.verifyCode({mobile:e,code:t,type:o||"login"});if(0!==u.code)return u;const f={mobile:e,mobile_confirmed:1},d=await A.where(f).get();if(d&&d.data&&d.data.length>0){if("register"===o)return{code:10201,msg:"姝ゆ墜鏈哄彿宸叉敞鍐�"};const t=d.data[0],r=await this._loginExec(t,{needPermission:s});return 0!==r.code?r:{...r,mobile:e}}{const t=Date.now();if("login"===o)return{code:10203,msg:"姝ゆ墜鏈哄彿灏氭湭娉ㄥ唽"};const u={mobile:e,mobile_confirmed:1,register_ip:this.context.CLIENTIP,register_date:t},f=r&&r.trim();if(f){const{passwordHash:e,version:t}=this.encryptPwd(f);u.password=e,t&&(u.password_secret_version=t)}if(n){const e=await A.where({my_invite_code:n}).get();if(1!==e.data.length)return{code:10202,msg:"閭�璇风爜鏃犳晥"};u.inviter_uid=[e.data[0]._id].concat(e.data[0].inviter_uid||[]),u.invite_time=t}else if(c.forceInviteCode)return{code:10202,msg:"閭�璇风爜鏃犳晥"};u.my_invite_code=i,u.role=a;const d=await this._registerExec(u,{needPermission:s});return 0!==d.code?d:{...d,mobile:e}}},loginByWeixin:async function(e){let t=e;"string"==typeof e&&(t={code:e});const r=t.needPermission,n=t.platform||this.context.PLATFORM,{openid:i,unionid:o,sessionKey:s}=await this._getWeixinApi({platform:n})["mp-weixin"===n?"code2Session":"getOauthAccessToken"](t.code);if(!i)return{code:10401,msg:"鑾峰彇openid澶辫触"};const a=Ar.command,c=[{wx_openid:{[n]:i}}];o&&c.push({wx_unionid:o});const u=await A.where(a.or(...c)).get();if(u&&u.data&&u.data.length>0){const e=u.data[0],t={wx_openid:{[n]:i}};o&&(t.wx_unionid=o);const a=await this._loginExec(e,{needPermission:r,extraData:t});if(0!==a.code)return a;const{userInfo:c}=a;return{...a,openid:i,unionid:o,sessionKey:s,mobileConfirmed:1===c.mobile_confirmed,emailConfirmed:1===c.email_confirmed}}{const e={wx_openid:{[n]:i},wx_unionid:o},a=t.myInviteCode;e.my_invite_code=a,e.role=t.role;const c=await this._registerExec(e,{needPermission:r});return 0!==c.code?c:{...c,openid:i,unionid:o,sessionKey:s,mobileConfirmed:!1,emailConfirmed:!1}}},loginByUniverify:async function({openid:e,access_token:t,password:r,inviteCode:n,myInviteCode:i,type:o,needPermission:s,role:a}){const c=this._getConfig(),u=c&&c.service&&c.service.univerify;if(!u)throw new Error("璇峰湪config.json涓厤缃畇ervice.univerify涓嬩竴閿櫥褰曠浉鍏冲弬鏁�");if(c.forceInviteCode&&!o)throw new Error("[loginByUniverify] 寮哄埗浣跨敤閭�璇风爜娉ㄥ唽鏃讹紝闇�鎸囨槑type涓簉egister杩樻槸login");const f=await Or({...u,openid:e,access_token:t});if(0!==f.code)return f;const d=String(f.phoneNumber),l=await A.where({mobile:d}).get();if(l&&l.data&&l.data.length>0){if("register"===o)return{code:10601,msg:"姝ゆ墜鏈哄彿宸叉敞鍐�"};const e=l.data[0],t=await this._loginExec(e,{needPermission:s});return 0!==t.code?t:{...t,mobile:d}}if("login"===o)return{code:10602,msg:"姝ゆ墜鏈哄彿灏氭湭娉ㄥ唽"};const p=Date.now(),m={mobile:d,my_invite_code:i,mobile_confirmed:1,role:a},h=r&&r.trim();if(h){const{passwordHash:e,version:t}=this.encryptPwd(h);m.password=e,t&&(m.password_secret_version=t)}if(n){let e=await A.where({my_invite_code:n}).get();if(1!==e.data.length)return{code:10202,msg:"閭�璇风爜鏃犳晥"};e=e.data[0],m.inviter_uid=[e._id].concat(e.inviter_uid||[]),m.invite_time=p}else if(c.forceInviteCode)return{code:10202,msg:"閭�璇风爜鏃犳晥"};m.my_invite_code=i;const g=await this._registerExec(m,{needPermission:s});return 0!==g.code?g:{...g,mobile:d}},loginByApple:async function({nickName:e,fullName:t,email:r,authorizationCode:n,identityToken:i,realUserStatus:o,inviteCode:s,myInviteCode:a,type:c,needPermission:u,platform:f,role:d}){const l=this._getConfig(),p=l&&l["app-plus"]&&l["app-plus"].oauth&&l["app-plus"].oauth.apple;if(!p)throw new Error("璇峰湪config.json鎴杋nit鏂规硶涓紝app-plus.oauth.apple 涓嬮厤缃浉鍏冲弬鏁�");const{bundleId:m}=p;if(!m)throw new Error("璇峰湪config.json鎴杋nit鏂规硶涓� app-plus.oauth.apple 涓嬮厤缃産undleId");if(!i)throw new Error("[loginByApple] 鑻规灉鐧诲綍闇�瑕佷紶閫抜dentityToken");const h=f||this.context.PLATFORM;t=e||(t&&Object.keys(t).length>0?t.familyName+t.givenName:"");const{code:g,msg:y}=await Tr({clientType:h}).verifyIdentityToken(i);if(0!==g)return{code:g,msg:y};const{iss:w,sub:v,aud:b,email:_}=y;if("https://appleid.apple.com"!==w)return{code:10706,msg:"绛惧彂鏈烘瀯妫�楠屽け璐�"};if(!v)return{code:10701,msg:"鑾峰彇鐢ㄦ埛鍞竴鏍囪瘑绗﹀け璐�"};if(m!==b)return{code:10702,msg:"bundleId鏍¢獙澶辫触锛岃纭閰嶇疆鍚庨噸璇�"};const E=t||"鏂扮敤鎴�"+_.split("@")[0],S=await A.where({apple_openid:v}).get();if(S&&S.data&&S.data.length>0){if("register"===c)return{code:10703,msg:"姝よ处鎴峰凡娉ㄥ唽"};const e=S.data[0],t=await this._loginExec(e,{needPermission:u});return 0!==t.code?t:{...t,openid:v}}if("login"===c)return{code:10704,msg:"姝よ处鎴峰皻鏈敞鍐�"};const x={nickname:E,apple_openid:v,my_invite_code:a,role:d},k=await this._registerExec(x,{needPermission:u});return 0!==k.code?k:{...k,openid:v}},login:async function({username:e,password:t,queryField:r=[],needPermission:n}){const i=Mr.command,o=[];r&&r.length||(r=["username"]),r.length>1&&console.warn("妫�娴嬪埌褰撳墠浣跨敤queryField鍖归厤澶氬瓧娈佃繘琛岀櫥褰曟搷浣滐紝闇�瑕佹敞鎰忥細uni-id骞舵湭闄愬埗鐢ㄦ埛鍚嶄笉鑳芥槸鎵嬫満鍙锋垨閭锛岄渶瑕佸紑鍙戣�呰嚜琛岄檺鍒躲�傚惁鍒欏彲鑳藉嚭鐜扮敤鎴疯緭鍏bc@xx.com浼氬悓鏃跺尮閰嶅埌閭涓烘鍊肩殑鐢ㄦ埛鍜岀敤鎴峰悕涓烘鍊肩殑鐢ㄦ埛锛屽鑷寸櫥褰曞け璐�");const{usernameToLowerCase:s,emailToLowerCase:a,passwordErrorLimit:c,passwordErrorRetryTime:u}=this._getConfig(),f={email:{email_confirmed:1},mobile:{mobile_confirmed:1}},d={},l=e.trim();if(!l)return{code:L,msg:"鐢ㄦ埛鍚嶄笉鍙负绌�"};s&&(d.username=l.toLowerCase()),a&&(d.email=l.toLowerCase());const p=[];r.forEach(t=>{o.push({[t]:e,...f[t]});const r={field:t,value:e};"username"===t&&d.username!==e?(o.push({[t]:d.username,...f[t]}),r.fallbackValue=d.username):"email"===t&&d.email!==e&&(o.push({[t]:d.email,...f[t]}),r.fallbackValue=d.email),p.push(r)});const m=await A.where(i.or(...o)).limit(1).get(),h=this.context.CLIENTIP,g=this._getMatchedUser(m.data,p);if(g.code)return g;const{userMatched:y}=g;let w=y.login_ip_limit||[];w=w.filter(e=>e.last_error_time>Date.now()-1e3*u);let v=w.find(e=>e.ip===h);if(v&&v.error_times>=c)return{code:10103,msg:`瀵嗙爜閿欒娆℃暟杩囧锛岃${T(v.last_error_time+1e3*u)}鍐嶈瘯銆俙};const b=t&&t.trim();if(!b)return{code:L,msg:"瀵嗙爜涓嶅彲涓虹┖"};const _=this._checkPwd(y,b);if(0===_.code){const e=w.indexOf(v);e>-1&&w.splice(e,1);const t={login_ip_limit:w},{passwordHash:r,passwordVersion:i}=_;r&&i&&(t.password=r,t.password_secret_version=i);const o=await this._loginExec(y,{needPermission:n,extraData:t});return o.code,o}return v?(v.error_times++,v.last_error_time=Date.now()):(v={ip:h,error_times:1,last_error_time:Date.now()},w.push(v)),await A.doc(y._id).update({login_ip_limit:w}),{code:10102,msg:"瀵嗙爜閿欒"}},register:async function(e){const t=[],r=[{name:"username",desc:"鐢ㄦ埛鍚�"},{name:"email",desc:"閭",extraCond:{email_confirmed:1}},{name:"mobile",desc:"鎵嬫満鍙�",extraCond:{mobile_confirmed:1}}],{usernameToLowerCase:n,emailToLowerCase:i}=this._getConfig(),o=e.needPermission;if(void 0!==o&&delete e.needPermission,r.forEach(r=>{const o=r.name;let s=e[o]&&e[o].trim();s?(("username"===r.name&&n||"email"===r.name&&i)&&(s=s.toLowerCase()),e[o]=s,t.push({[o]:s,...r.extraCond})):delete e[o]}),0===t.length)return{code:20101,msg:"鐢ㄦ埛鍚嶃�侀偖绠便�佹墜鏈哄彿涓嶅彲鍚屾椂涓虹┖"};const{username:s,email:a,mobile:c,myInviteCode:u}=e,f=Dr.command,d=await A.where(f.or(...t)).get();if(d&&d.data.length>0){const t=d.data[0];for(let n=0;n<r.length;n++){const i=r[n];let o=!0;if(i.extraCond&&(o=Object.keys(i.extraCond).every(e=>t[e]===i.extraCond[e])),t[i.name]===e[i.name]&&o)return{code:20102,msg:i.desc+"宸插瓨鍦�"}}}const l=e.password&&e.password.trim();if(!l)return{code:L,msg:"瀵嗙爜涓嶅彲涓虹┖"};const{passwordHash:p,version:m}=this.encryptPwd(l);e.password=p,m&&(e.password_secret_version=m),e.my_invite_code=u,delete e.myInviteCode;const h=await this._registerExec(e,{needPermission:o});return 0!==h.code?h:{...h,username:s,email:a,mobile:c}},logout:async function(e){const t=await this.checkToken(e);if(t.code&&t.code>0)return t;const r=Lr.command;return await A.doc(t.uid).update({token:r.pull(e)}),{code:0,msg:"閫�鍑烘垚鍔�"}},getRoleByUid:async function({uid:e}){if(!e)return{code:"PARAMETER_ERROR",msg:"鐢ㄦ埛Id涓嶈兘涓虹┖"};const t=await A.doc(e).get();return 0===t.data.length?{code:"USER_NOT_EXIST",msg:"鐢ㄦ埛涓嶅瓨鍦�"}:{code:0,msg:"鑾峰彇瑙掕壊鎴愬姛",role:t.data[0].role||[]}},getPermissionByRole:async function({roleID:e}){if(!e)return{code:"PARAMETER_ERROR",msg:"瑙掕壊ID涓嶈兘涓虹┖"};if("admin"===e){return{code:0,msg:"鑾峰彇鏉冮檺鎴愬姛",permission:(await D.limit(1e4).get()).data.map(e=>e.permission_id)}}const t=await M.where({role_id:e}).get();return 0===t.data.length?{code:"ROLE_NOT_EXIST",msg:"瑙掕壊涓嶅瓨鍦�"}:{code:0,msg:"鑾峰彇鏉冮檺鎴愬姛",permission:t.data[0].permission||[]}},getPermissionByUid:async function({uid:e}){const t=await A.aggregate().match({_id:e}).project({role:!0}).unwind("$role").lookup({from:"uni-id-roles",localField:"role",foreignField:"role_id",as:"roleDetail"}).unwind("$roleDetail").replaceRoot({newRoot:"$roleDetail"}).end(),r=[];return t.data.forEach(e=>{Array.prototype.push.apply(r,e.permission)}),{code:0,msg:"鑾峰彇鏉冮檺鎴愬姛",permission:k(r)}},bindRole:async function({uid:e,roleList:t,reset:r=!1}){const n={};return"string"==typeof t&&(t=[t]),n.role=r?t:Br.push(t),await A.doc(e).update(n),{code:0,msg:"瑙掕壊缁戝畾鎴愬姛"}},bindPermission:async function({roleID:e,permissionList:t,reset:r=!1}){const n={};return"string"==typeof t&&(t=[t]),n.permission=r?t:Br.push(t),await M.where({role_id:e}).update(n),{code:0,msg:"鏉冮檺缁戝畾鎴愬姛"}},unbindRole:async function({uid:e,roleList:t}){return"string"==typeof t&&(t=[t]),await A.doc(e).update({role:Br.pull(Br.in(t))}),{code:0,msg:"瑙掕壊瑙g粦鎴愬姛"}},unbindPermission:async function({roleID:e,permissionList:t}){return"string"==typeof t&&(t=[t]),await M.where({role_id:e}).update({permission:Br.pull(Br.in(t))}),{code:0,msg:"鏉冮檺瑙g粦鎴愬姛"}},addRole:async function({roleID:e,roleName:t,comment:r,permission:n=[]}){return e?"admin"===e?{code:"PARAMETER_ERROR",msg:"涓嶅彲鏂板roleID涓篴dmin鐨勮鑹�"}:(await M.add({role_id:e,role_name:t,comment:r,permission:n,create_date:Date.now()}),{code:0,msg:"瑙掕壊鏂板鎴愬姛"}):{code:"PARAMETER_ERROR",msg:"roleID涓嶈兘涓虹┖"}},addPermission:async function({permissionID:e,permissionName:t,comment:r}){return e?(await D.add({permission_id:e,permission_name:t,comment:r,create_date:Date.now()}),{code:0,msg:"鏉冮檺鏂板鎴愬姛"}):{code:"PARAMETER_ERROR",msg:"permissionID涓嶈兘涓虹┖"}},getRoleList:async function({limit:e=20,offset:t=0,needTotal:r=!0}){const n={code:0,msg:"鑾峰彇瑙掕壊鍒楄〃鎴愬姛",roleList:(await M.skip(t).limit(e).get()).data};if(r){const{total:e}=await M.where({_id:Br.exists(!0)}).count();n.total=e}return n},getRoleInfo:async function(e){const t=await M.where({role_id:e}).get();return 0===t.data.length?{code:"ROLE_ID_NOT_EXISTS",msg:"瑙掕壊ID涓嶅瓨鍦�"}:{code:0,...t.data[0]}},updateRole:async function({roleID:e,roleName:t,comment:r,permission:n}){return e?(await M.where({role_id:e}).update({role_name:t,comment:r,permission:n}),{code:0,msg:"瑙掕壊鏇存柊鎴愬姛"}):{code:"PARAMETER_ERROR",msg:"鍙傛暟閿欒锛宺oleID涓嶈兘涓虹┖"}},deleteRole:async function({roleID:e}){const t=m(e);if("string"===t)e=[e];else if("array"!==t)throw new Error("roleID鍙兘涓哄瓧绗︿覆鎴栬�呮暟缁�");return await M.where({role_id:Br.in(e)}).remove(),await A.where({role:Br.elemMatch(Br.in(e))}).update({role:Br.pullAll(e)}),{code:0,msg:"瑙掕壊鍒犻櫎鎴愬姛"}},getPermissionList:async function({limit:e=20,offset:t=0,needTotal:r=!0}){const n={code:0,msg:"鑾峰彇鏉冮檺鍒楄〃鎴愬姛",permissionList:(await D.skip(t).limit(e).get()).data};if(r){const{total:e}=await D.where({_id:Br.exists(!0)}).count();n.total=e}return n},getPermissionInfo:async function(e){const t=await D.where({permission_id:e}).get();return 0===t.data.length?{code:"PERMISSION_ID_NOT_EXISTS",msg:"鏉冮檺ID涓嶅瓨鍦�"}:{code:0,...t.data[0]}},updatePermission:async function({permissionID:e,permissionName:t,comment:r}){return e?(await D.where({permission_id:e}).update({permission_name:t,comment:r}),{code:0,msg:"鏉冮檺鏇存柊鎴愬姛"}):{code:"PARAMETER_ERROR",msg:"鍙傛暟閿欒锛宲ermissionID涓嶈兘涓虹┖"}},deletePermission:async function({permissionID:e}){const t=m(e);if("string"===t)e=[e];else if("array"!==t)throw new Error("permissionID鍙兘涓哄瓧绗︿覆鎴栬�呮暟缁�");return await D.where({permission_id:Br.in(e)}).remove(),await M.where({permission:Br.elemMatch(Br.in(e))}).update({permission:Br.pullAll(e)}),{code:0,msg:"鏉冮檺鍒犻櫎鎴愬姛"}},bindAlipay:async function({uid:e,code:t,platform:r}){const n=r||this.context.PLATFORM,{openid:i}=await this._getAlipayApi({platform:n}).code2Session(t);if(!i)return{code:60401,msg:"鑾峰彇openid澶辫触"};const o=await A.where({ali_openid:i}).get();return o&&o.data&&o.data.length>0?{code:60402,msg:"鏀粯瀹濈粦瀹氬け璐ワ紝姝よ处鍙峰凡琚粦瀹�"}:(await A.doc(e).update({ali_openid:i}),{code:0,openid:i,msg:"缁戝畾鎴愬姛"})},bindEmail:async function({uid:e,email:t,code:r}){if(!(t=t&&t.trim()))return{code:L,msg:"閭涓嶅彲涓虹┖"};const{emailToLowerCase:n}=this._getConfig();n&&(t=t.toLowerCase());const i=await A.where({email:t,email_confirmed:1}).limit(1).get();if(i&&i.data.length>0)return{code:60201,msg:"姝ら偖绠卞凡琚粦瀹�"};if(r){const e=await this.verifyCode({email:t,code:r,type:"bind"});if(0!==e.code)return e}return await A.doc(e).update({email:t,email_confirmed:1}),{code:0,msg:"閭缁戝畾鎴愬姛",email:t}},bindMobile:async function({uid:e,mobile:t,code:r,openid:n,access_token:i,type:o="sms"}){if("univerify"===o){const e=this._getConfig(),r=e&&e.service&&e.service.univerify;if(!r)throw new Error("璇峰湪config.json涓厤缃畇ervice.univerify涓嬩竴閿櫥褰曠浉鍏冲弬鏁�");const o=await Or({...r,openid:n,access_token:i});if(0!==o.code)return o;t=""+o.phoneNumber}const s=await A.where({mobile:t,mobile_confirmed:1}).count();if(s&&s.total>0)return{code:60101,msg:"姝ゆ墜鏈哄彿宸茶缁戝畾"};if("sms"===o&&r){const e=await this.verifyCode({mobile:t,code:r,type:"bind"});if(0!==e.code)return e}return S("bindMobile -> upRes",await A.doc(e).update({mobile:t,mobile_confirmed:1})),{code:0,msg:"鎵嬫満鍙风爜缁戝畾鎴愬姛",mobile:t}},bindWeixin:async function({uid:e,code:t,platform:r}){const n=r||this.context.PLATFORM,{openid:i,unionid:o}=await this._getWeixinApi({platform:n})["mp-weixin"===n?"code2Session":"getOauthAccessToken"](t);if(!i)return{code:60301,msg:"鑾峰彇openid澶辫触"};const s=Nr.command,a=[{wx_openid:{[n]:i}}];o&&a.push({wx_unionid:o});const c=await A.where(s.or(...a)).get();if(c&&c.data&&c.data.length>0)return{code:60302,msg:"寰俊缁戝畾澶辫触锛屾寰俊璐﹀彿宸茶缁戝畾"};const u={wx_openid:{[n]:i}};return o&&(u.wx_unionid=o),await A.doc(e).update(u),{code:0,openid:i,unionid:o,msg:"缁戝畾鎴愬姛"}},unbindAlipay:async function(e){const t=$r.command,r=await A.doc(e).update({ali_openid:t.remove()});return S("upRes:",r),1===r.updated?{code:0,msg:"鏀粯瀹濊В缁戞垚鍔�"}:{code:70401,msg:"鏀粯瀹濊В缁戝け璐ワ紝璇风◢鍚庡啀璇�"}},unbindEmail:async function({uid:e,email:t,code:r}){if(t=t&&t.trim(),!e||!t)return{code:L,msg:(e?"閭":"鐢ㄦ埛Id")+"涓嶅彲涓虹┖"};const{emailToLowerCase:n}=this._getConfig();if(r){const e=await this.verifyCode({email:t,code:r,type:"unbind"});if(0!==e.code)return e}const i=Kr.command;let o={_id:e,email:t};if(n){const r=t.toLowerCase();r!==t&&(o=i.or(o,{_id:e,email:r}))}return 1===(await A.where(o).update({email:i.remove(),email_confirmed:i.remove()})).updated?{code:0,msg:"閭瑙g粦鎴愬姛"}:{code:70201,msg:"閭瑙g粦澶辫触锛岃绋嶅悗鍐嶈瘯"}},unbindMobile:async function({uid:e,mobile:t,code:r}){if(r){const e=await this.verifyCode({mobile:t,code:r,type:"unbind"});if(0!==e.code)return e}const n=Vr.command;return 1===(await A.where({_id:e,mobile:t}).update({mobile:n.remove(),mobile_confirmed:n.remove()})).updated?{code:0,msg:"鎵嬫満鍙疯В缁戞垚鍔�"}:{code:70101,msg:"鎵嬫満鍙疯В缁戝け璐ワ紝璇风◢鍚庡啀璇�"}},unbindWeixin:async function(e){const t=Ur.command,r=await A.doc(e).update({wx_openid:t.remove(),wx_unionid:t.remove()});return S("upRes:",r),1===r.updated?{code:0,msg:"寰俊瑙g粦鎴愬姛"}:{code:70301,msg:"寰俊瑙g粦澶辫触锛岃绋嶅悗鍐嶈瘯"}},code2SessionAlipay:async function(e){let t=e;"string"==typeof e&&(t={code:e});try{const e=t.platform||this.context.PLATFORM,r=await this._getAlipayApi({platform:e}).code2Session(t.code);return r.openid?{code:0,msg:"",...r}:{code:80701,msg:"鑾峰彇openid澶辫触"}}catch(e){return{code:80702,msg:e.message}}},code2SessionWeixin:async function(e){let t=e;"string"==typeof e&&(t={code:e});try{const e=t.platform||this.context.PLATFORM,r=await this._getWeixinApi({platform:e})["mp-weixin"===e?"code2Session":"getOauthAccessToken"](t.code);return r.openid?{code:0,msg:"",...r}:{code:80601,msg:"鑾峰彇openid澶辫触"}}catch(e){return{code:80602,msg:e.message}}},verifyAppleIdentityToken:async function({identityToken:e,platform:t}){const r=t||this.context.PLATFORM,{code:n,msg:i}=await Tr({clientType:r}).verifyIdentityToken(e);return 0!==n?{code:n,msg:i}:{code:n,msg:"楠岃瘉閫氳繃",...i}},wxBizDataCrypt:async function({code:e,sessionKey:t,encryptedData:r,iv:i}){if(!r)return{code:80805,msg:"encryptedData涓嶅彲涓虹┖"};if(!i)return{code:80806,msg:"iv涓嶅彲涓虹┖"};if(!e&&!t)return{code:80804,msg:"code鎴杝essionKey蹇呴』鏈夊叾涓竴涓�"};const o=this._getWeixinApi();if(!t){const r=await o.code2Session(e);if(!r.sessionKey)return{code:80801,msg:"sessionKey鑾峰彇澶辫触"};t=r.sessionKey}t=Buffer.from(t,"base64"),r=Buffer.from(r,"base64"),i=Buffer.from(i,"base64");try{var s=n.createDecipheriv("aes-128-cbc",t,i);s.setAutoPadding(!0);var a=s.update(r,"binary","utf8");a+=s.final("utf8"),a=JSON.parse(a)}catch(e){return{code:80802,msg:"瑙e瘑澶辫触锛�"+e.message}}return a.watermark.appid!==o.options.appId?{code:80803,msg:"appid涓嶅尮閰�"}:{code:0,msg:"瑙e瘑鎴愬姛",...a}},encryptPwd:function(e,{value:t,version:r}={}){if(!(e=e&&e.trim()))throw new Error("瀵嗙爜涓嶅彲涓虹┖");if(!t){const e=this._getConfig(),{passwordSecret:n}=e;if("array"===m(n)){const e=n.sort((e,t)=>e.version-t.version);t=e[e.length-1].value,r=e[e.length-1].version}else t=n}if(!t)throw new Error("passwordSecret涓嶆纭�");const i=n.createHmac("sha1",t.toString("ascii"));return i.update(e),{passwordHash:i.digest("hex"),version:r}},checkToken:async function(e,{needPermission:t,needUserInfo:r=!0}={}){const n=this._getConfig();try{const i=this._verifyToken(e);if(i.code)return i;const{uid:o,needPermission:s,role:a,permission:c,exp:u}=i,f=a&&c;t=void 0===t?s:t;const d=n.removePermissionAndRoleFromToken||!f||r,l=!n.removePermissionAndRoleFromToken&&!f||n.removePermissionAndRoleFromToken&&f||n.tokenExpiresThreshold&&u-Date.now()/1e3<n.tokenExpiresThreshold;let p={};if(d||l){const t=await A.doc(o).get();if(!t.data||0===t.data.length||!t.data[0].token)return{code:30202,msg:"token涓嶅悎娉曪紝璇烽噸鏂扮櫥褰�"};if(p=t.data[0],1===p.status)return{code:10001,msg:"璐﹀彿宸茬鐢�"};let r=p.token;if(r?"string"==typeof r&&(r=[r]):r=[],-1===r.indexOf(e))return{code:30202,msg:"token涓嶅悎娉曪紝璇烽噸鏂扮櫥褰�"}}const m={code:0,msg:"token鏍¢獙閫氳繃",uid:o};let h,g;if(f&&(m.role=a,m.permission=c),r&&(m.userInfo=p),(!f&&t||l)&&(h=m.role=p.role||[],g=0===h.length||h.includes("admin")?m.permission=[]:m.permission=await this._getPermissionListByRoleList(m.role),t&&(m.role=h,m.permission=g)),l){let e;e=n.removePermissionAndRoleFromToken?await this.createToken({uid:o,needPermission:s}):await this.createToken({uid:o,role:h,permission:g});let t=p.token;t?"string"==typeof t&&(t=[t]):t=[];const r=this._getExpiredToken(t);return t=t.filter(e=>-1===r.indexOf(e)),t.push(e.token),await A.doc(o).update({token:t,last_login_date:Date.now(),last_login_ip:this.context.CLIENTIP}),{...m,...e}}return m}catch(e){return{code:90001,msg:"鏁版嵁搴撹鍐欏紓甯革細"+e.message,err:e}}},createToken:function({uid:e,needPermission:t,role:r,permission:n}){if(!e)return{code:30101,msg:"缂哄皯uid鍙傛暟"};const i={uid:e,needPermission:t,role:r,permission:n},o=this._getConfig();if(!this.interceptorMap.has("customToken")){const e={...i};return this._createTokenInternal({signContent:e,config:o})}const s=this.interceptorMap.get("customToken");if("function"!=typeof s)throw new Error("custom-token.js搴斿鍑轰竴涓猣unction");const a=s(i);return a instanceof Promise?a.then(e=>this._createTokenInternal({signContent:e,config:o})):this._createTokenInternal({signContent:a,config:o})},_checkPwd:function(e,t){if(!t)return{code:1,message:"瀵嗙爜涓嶈兘涓虹┖"};const{password:r,password_secret_version:n}=e,i=this._getConfig(),{passwordSecret:o}=i,s=m(o);if("string"===s){const{passwordHash:e}=this.encryptPwd(t,{value:o});return e===r?{code:0,message:"瀵嗙爜鏍¢獙閫氳繃"}:{code:2,message:"瀵嗙爜涓嶆纭�"}}if("array"!==s)throw new Error("config鍐卲asswordSecret绫诲瀷閿欒锛屽彧鍙缃畇tring绫诲瀷鍜宎rray绫诲瀷");const a=o.sort((e,t)=>e.version-t.version);let c;if(c=n?a.find(e=>e.version===n):a[0],!c)return{code:3,message:"secretVersion涓嶆纭�"};const u=a[a.length-1],{passwordHash:f}=this.encryptPwd(t,c);if(f===r){const e={code:0,message:"瀵嗙爜鏍¢獙閫氳繃"};if(c!==u){const{passwordHash:r,version:n}=this.encryptPwd(t,u);e.passwordHash=r,e.passwordVersion=n}return e}return{code:4,message:""}},_verifyToken:function(e){const t=this._getConfig();let r;try{r=Er(e,t.tokenSecret)}catch(e){return"TokenExpiredError"===e.name?{code:30203,msg:"token宸茶繃鏈燂紝璇烽噸鏂扮櫥褰�",err:e}:{code:30204,msg:"闈炴硶token",err:e}}return t.bindTokenToDevice&&r.clientId&&r.clientId!==this._getClientUaHash()?{code:30201,msg:"token涓嶅悎娉曪紝璇烽噸鏂扮櫥褰�"}:r},_getExpiredToken:function(e){const t=this._getConfig(),r=[];return e.forEach(e=>{try{Er(e,t.tokenSecret)}catch(t){r.push(e)}}),r},_getPermissionListByRoleList:async function(e){if(!Array.isArray(e))return[];if(0===e.length)return[];if(e.includes("admin")){return(await D.limit(500).get()).data.map(e=>e.permission_id)}const t=await M.where({role_id:qr.in(e)}).get(),r=[];return t.data.forEach(e=>{Array.prototype.push.apply(r,e.permission)}),k(r)},_getClientUaHash:function(){const e=n.createHash("md5"),t=/MicroMessenger/i.test(this.context.CLIENTUA)?this.context.CLIENTUA.replace(/(MicroMessenger\S+).*/i,"$1"):this.context.CLIENTUA;return e.update(t),e.digest("hex")},_createTokenInternal:function({signContent:e,config:t}){return"object"!==m(e)?{code:30101,msg:"token瀵瑰簲鐨刾ayload涓哄璞′笖蹇呴』鍖呭惈uid"}:e.uid?(t.bindTokenToDevice&&(e.clientId=this._getClientUaHash()),{token:Sr(e,t.tokenSecret,{expiresIn:t.tokenExpiresIn}),tokenExpired:Date.now()+1e3*t.tokenExpiresIn}):{code:30101,msg:"token瀵瑰簲鐨刾ayload蹇呴』鍖呭惈uid"}},setVerifyCode:async function({mobile:e,email:t,code:r,expiresIn:n,type:i}){if(t=t&&t.trim(),e=e&&e.trim(),t){const{emailToLowerCase:e}=this._getConfig();e&&(t=t.toLowerCase())}if(!e&&!t||e&&t)return{code:50101,msg:"鎵嬫満鍙峰拰閭蹇呴』涓斿彧鑳界粰瀹氬叾涓竴涓�"};r||(r=x()),n||(n=180);const o=Date.now(),s={mobile:e,email:t,type:i,code:r,state:0,ip:this.context.CLIENTIP,created_at:o,expired_at:o+1e3*n};return S("addRes",await O.add(s)),{code:0,mobile:e,email:t}},verifyCode:async function({mobile:e,email:t,code:r,type:n}){if(t=t&&t.trim(),e=e&&e.trim(),t){const{emailToLowerCase:e}=this._getConfig();e&&(t=t.toLowerCase())}if(!e&&!t||e&&t)return{code:50201,msg:"鎵嬫満鍙峰拰閭蹇呴』涓斿彧鑳界粰瀹氬叾涓竴涓�"};const i=Hr.command,o=Date.now(),s={mobile:e,email:t,type:n,code:r,state:0,expired_at:i.gt(o)},a=await O.where(s).orderBy("created_at","desc").limit(1).get();if(S("verifyRecord:",a),a&&a.data&&a.data.length>0){const e=a.data[0];return S("upRes",await O.doc(e._id).update({state:1})),{code:0,msg:"楠岃瘉閫氳繃"}}return{code:50202,msg:"楠岃瘉鐮侀敊璇垨宸插け鏁�"}},sendSmsCode:async function({mobile:e,code:t,type:r,templateId:n}){if(!e)throw new Error("鎵嬫満鍙风爜涓嶅彲涓虹┖");if(t||(t=x()),!r)throw new Error("楠岃瘉鐮佺被鍨嬩笉鍙负绌�");const i=this._getConfig();let o=i&&i.service&&i.service.sms;if(!o)throw new Error("璇峰湪config.json鎴杋nit鏂规硶涓厤缃畇ervice.sms涓嬬煭淇$浉鍏冲弬鏁�");o=Object.assign({codeExpiresIn:300},o);const s=["smsKey","smsSecret"];if(!n&&!o.name)throw new Error("涓嶄紶鍏emplateId鏃跺簲鍦╟onfig.json鎴杋nit鏂规硶鍐卻ervice.sms涓嬮厤缃畁ame瀛楁浠ユ纭娇鐢╱niID_code妯℃澘");for(let e=0,t=s.length;e<t;e++){const t=s[e];if(!o[t])throw new Error("璇峰湪config.json鎴杋nit鏂规硶涓璼ervice.sms涓嬮厤缃�"+t)}const{name:a,smsKey:c,smsSecret:u,codeExpiresIn:f}=o;let d;switch(r){case"login":d="鐧诲綍";break;default:d="楠岃瘉鎵嬫満鍙�"}try{const i={name:a,code:t,action:d,expMinute:""+Math.round(f/60)};a&&(i.name=a),await uniCloud.sendSms({smsKey:c,smsSecret:u,phone:e,templateId:n||"uniID_code",data:i});const o=await this.setVerifyCode({mobile:e,code:t,expiresIn:f,type:r});return o.code>=0?o:{code:0,msg:"楠岃瘉鐮佸彂閫佹垚鍔�"}}catch(e){return{code:50301,msg:"楠岃瘉鐮佸彂閫佸け璐�, "+e.message}}}});let Jr;try{Jr=require("uni-config-center")}catch(e){}const Gr="\n浼犲叆閰嶇疆鐨勬柟寮忔湁浠ヤ笅鍑犵锛歕n- 鍦╱ni-config-center鍏叡妯″潡鐨剈ni-id鐩綍涓嬫斁缃甤onfig.json鏂囦欢锛堟帹鑽愶級\n- 鍦╱ni-id鍏叡妯″潡鐨勭洰褰曚笅鏀剧疆config.json鏂囦欢\n- 浣跨敤init鏂规硶浼犲叆閰嶇疆\n- 濡傛灉浣跨敤uni-config-center涓擧BuilderX鐗堟湰浣庝簬3.1.8锛屾壒閲忎笂浼犱簯鍑芥暟鍙婂叕鍏辨ā鍧楀悗闇�瑕佸啀鍗曠嫭涓婁紶涓�娆ni-id";class zr{constructor({context:e,config:t}={}){const r=Jr&&Jr({pluginId:"uni-id"});this.pluginConfig=r,this.config=t||this._getConfigContent(),Object.defineProperty(this,"context",{get:()=>e||global.__ctx__}),this.interceptorMap=new Map,r&&r.hasFile("custom-token.js")&&this.setInterceptor("customToken",require(r.resolve("custom-token.js")))}_getConfigContent(){if(this.pluginConfig&&this.pluginConfig.hasFile("config.json")){this._hasConfigFile=!0;try{return this.pluginConfig.config()}catch(e){return}}const e=r.resolve(__dirname,"config.json");this._hasConfigFile=t.existsSync(e);try{return require(e)}catch(e){}}init(e){this.config=e}setInterceptor(e,t){this.interceptorMap.set(e,t)}_getConfig(e){const t=this.config&&0!==Object.keys(this.config).length;if(this._hasConfigFile&&!t)throw new Error("璇风‘淇濆叕鐢ㄦā鍧梪ni-id瀵瑰簲鐨勯厤缃枃浠舵牸寮忔纭紙涓嶅彲鍖呭惈娉ㄩ噴锛�"+Gr);if(!t)throw new Error("鍏敤妯″潡uni-id缂哄皯閰嶇疆淇℃伅"+Gr);const r=Object.assign(this.config,this.config[e||this.context.PLATFORM])||{},n=Object.assign({bindTokenToDevice:!1,tokenExpiresIn:7200,tokenExpiresThreshold:1200,passwordErrorLimit:6,passwordErrorRetryTime:3600,usernameToLowerCase:!0,emailToLowerCase:!0},r);return["passwordSecret","tokenSecret","tokenExpiresIn","passwordErrorLimit","passwordErrorRetryTime"].forEach(e=>{if(!n||!n[e])throw new Error("璇峰湪鍏敤妯″潡uni-id鐨勯厤缃俊鎭腑鍐呮坊鍔犻厤缃」锛�"+e)}),n}}for(const e in Fr)zr.prototype[e]=P(Fr[e]);function Wr({context:e,config:t}={}){const r=new zr({context:e,config:t}),n=new Proxy(r,{get(e,t){if(t in e)return"function"==typeof e[t]?e[t].bind(n):e[t]}});return n}zr.prototype.createInstance=Wr;var Xr=Wr();module.exports=Xr; diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-id/uniCloud/cloudfunctions/common/uni-id/package-lock.json" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-id/uniCloud/cloudfunctions/common/uni-id/package-lock.json" new file mode 100644 index 0000000..b925303 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-id/uniCloud/cloudfunctions/common/uni-id/package-lock.json" @@ -0,0 +1,11 @@ +{ + "name": "uni-id", + "version": "3.1.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "uni-config-center": { + "version": "file:../../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center" + } + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-id/uniCloud/cloudfunctions/common/uni-id/package.json" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-id/uniCloud/cloudfunctions/common/uni-id/package.json" new file mode 100644 index 0000000..b431f55 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-id/uniCloud/cloudfunctions/common/uni-id/package.json" @@ -0,0 +1,16 @@ +{ + "name": "uni-id", + "version": "3.1.0", + "description": "uni-id for uniCloud", + "main": "index.js", + "homepage": "https://uniapp.dcloud.io/uniCloud/uni-id", + "repository": { + "type": "git", + "url": "git+https://gitee.com/dcloud/uni-id.git" + }, + "author": "", + "license": "Apache-2.0", + "dependencies": { + "uni-config-center": "file:../../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center" + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-list/changelog.md" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-list/changelog.md" new file mode 100644 index 0000000..2836bf5 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-list/changelog.md" @@ -0,0 +1,40 @@ +## 1.2.10锛�2022-11-23锛� +淇 uni-list-item 缁勪欢 keep-scroll-position 灞炴�� 鏃犳硶璁剧疆涓篺alse鐨勯敊璇� +## 1.2.9锛�2022-11-22锛� +- 淇 uni-list-chat 鍦╲ue3涓嬭烦杞姤閿欑殑bug +## 1.2.8锛�2022-11-21锛� +- 淇 uni-list-chat avatar灞炴�� 鍊间负鏈湴璺緞鏃堕敊璇殑闂 +## 1.2.7锛�2022-11-21锛� +- 淇 uni-list-chat avatar灞炴�� 鍦ㄨ吘璁簯鐗坲niCloud涓嬮敊璇殑闂 +## 1.2.6锛�2022-11-18锛� +- 淇 uni-list-chat note灞炴�� 鏀寔锛氣�滆崏绋库�濆瓧鏍峰姛鑳� 鏂囨湰灏�1浣嶇殑闂 +## 1.2.5锛�2022-11-15锛� +- 淇 uni-list-item 鐨� customStyle 灞炴�� padding鍊煎湪 H5绔� 鏃犳晥鐨刡ug +## 1.2.4锛�2022-11-15锛� +- 淇 uni-list-item 鐨� customStyle 灞炴�� padding鍊煎湪nvue锛坴ue2锛変笅鏃犳晥鐨刡ug +## 1.2.3锛�2022-11-14锛� +- uni-list-chat 鏂板 avatar 鏀寔 fileId +## 1.2.2锛�2022-11-11锛� +- uni-list 鏂板灞炴�� render-reverse 璇︽儏鍙傝�冿細[https://uniapp.dcloud.net.cn/component/list.html](https://uniapp.dcloud.net.cn/component/list.html) +- uni-list-chat note灞炴�� 鏀寔锛氣�滆崏绋库�濆瓧鏍� 鍔犵孩鏄剧ず 璇︽儏鍙傝�僽ni-im锛歔https://ext.dcloud.net.cn/plugin?name=uni-im](https://ext.dcloud.net.cn/plugin?name=uni-im) +- uni-list-item 鏂板灞炴�� customStyle 鏀寔璁剧疆padding銆乥ackgroundColor +## 1.2.1锛�2022-03-30锛� +- 鍒犻櫎鏃犵敤鏂囦欢 +## 1.2.0锛�2021-11-23锛� +- 浼樺寲 缁勪欢UI锛屽苟鎻愪緵璁捐璧勬簮锛岃瑙�:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 鏂囨。杩佺Щ锛岃瑙�:[https://uniapp.dcloud.io/component/uniui/uni-list](https://uniapp.dcloud.io/component/uniui/uni-list) +## 1.1.3锛�2021-08-30锛� +- 淇 鍦╲ue3涓璽o灞炴�у湪鍙戣搴旂敤鐨勬椂鍊欐姤閿欑殑bug +## 1.1.2锛�2021-07-30锛� +- 浼樺寲 vue3涓嬩簨浠惰鍛婄殑闂 +## 1.1.1锛�2021-07-21锛� +- 淇 涓庡叾浠栫粍浠跺祵濂椾娇鐢ㄦ椂锛岀偣鍑诲け鏁堢殑Bug +## 1.1.0锛�2021-07-13锛� +- 缁勪欢鍏煎 vue3锛屽浣曞垱寤簐ue3椤圭洰锛岃瑙� [uni-app 椤圭洰鏀寔 vue3 浠嬬粛](https://ask.dcloud.net.cn/article/37834) +## 1.0.17锛�2021-05-12锛� +- 鏂板 缁勪欢绀轰緥鍦板潃 +## 1.0.16锛�2021-02-05锛� +- 浼樺寲 缁勪欢寮曠敤鍏崇郴锛岄�氳繃uni_modules寮曠敤缁勪欢 +## 1.0.15锛�2021-02-05锛� +- 璋冩暣涓簎ni_modules鐩綍瑙勮寖 +- 淇 uni-list-chat 瑙掓爣鏄剧ず涓嶆甯哥殑闂 diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-list/components/uni-list-ad/uni-list-ad.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-list/components/uni-list-ad/uni-list-ad.vue" new file mode 100644 index 0000000..b9349c2 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-list/components/uni-list-ad/uni-list-ad.vue" @@ -0,0 +1,107 @@ +<template> + <!-- #ifdef APP-NVUE --> + <cell> + <!-- #endif --> + <view class="uni-list-ad"> + <view v-if="borderShow" :class="{'uni-list--border':border,'uni-list-item--first':isFirstChild}"></view> + <ad style="width: 200px;height: 300px;border-width: 1px;border-color: red;border-style: solid;" adpid="1111111111" + unit-id="" appid="" apid="" type="feed" @error="aderror" @close="closeAd"></ad> + </view> + <!-- #ifdef APP-NVUE --> + </cell> + <!-- #endif --> + +</template> + +<script> + // #ifdef APP-NVUE + const dom = uni.requireNativePlugin('dom'); + // #endif + export default { + name: 'UniListAd', + props: { + title: { + type: String, + default: '', + + } + }, + // inject: ['list'], + data() { + return { + isFirstChild: false, + border: false, + borderShow: true, + } + }, + + mounted() { + this.list = this.getForm() + if (this.list) { + if (!this.list.firstChildAppend) { + this.list.firstChildAppend = true + this.isFirstChild = true + } + this.border = this.list.border + } + }, + methods: { + /** + * 鑾峰彇鐖跺厓绱犲疄渚� + */ + getForm(name = 'uniList') { + let parent = this.$parent; + let parentName = parent.$options.name; + while (parentName !== name) { + parent = parent.$parent; + if (!parent) return false + parentName = parent.$options.name; + } + return parent; + }, + aderror(e) { + console.log("aderror: " + JSON.stringify(e.detail)); + }, + closeAd(e) { + this.borderShow = false + } + } + } +</script> + +<style lang="scss" > + .uni-list-ad { + position: relative; + border: 1px red solid; + } + + .uni-list--border { + position: relative; + padding-bottom: 1px; + /* #ifdef APP-PLUS */ + border-top-color: $uni-border-color; + border-top-style: solid; + border-top-width: 0.5px; + /* #endif */ + margin-left: $uni-spacing-row-lg; + } + + /* #ifndef APP-NVUE */ + .uni-list--border:after { + position: absolute; + top: 0; + right: 0; + left: 0; + height: 1px; + content: ''; + -webkit-transform: scaleY(.5); + transform: scaleY(.5); + background-color: $uni-border-color; + } + + .uni-list-item--first:after { + height: 0px; + } + + /* #endif */ +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-list/components/uni-list-chat/uni-list-chat.scss" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-list/components/uni-list-chat/uni-list-chat.scss" new file mode 100644 index 0000000..311f8d9 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-list/components/uni-list-chat/uni-list-chat.scss" @@ -0,0 +1,58 @@ +/** + * 杩欓噷鏄� uni-list 缁勪欢鍐呯疆鐨勫父鐢ㄦ牱寮忓彉閲� + * 濡傛灉闇�瑕佽鐩栨牱寮忥紝杩欓噷鎻愪緵浜嗗熀鏈殑缁勪欢鏍峰紡鍙橀噺锛屾偍鍙互灏濊瘯淇敼杩欓噷鐨勫彉閲忥紝鍘诲畬鎴愭牱寮忔浛鎹紝鑰屼笉鐢ㄥ幓淇敼婧愮爜 + * + */ + +// 鑳屾櫙鑹� +$background-color : #fff; +// 鍒嗗壊绾块鑹� +$divide-line-color : #e5e5e5; + +// 榛樿澶村儚澶у皬锛屽闇�瑕佷慨鏀规鍊硷紝娉ㄦ剰鍚屾淇敼 js 涓殑鍊� const avatarWidth = xx 锛岀洰鍓嶅彧鏀寔鏂瑰舰澶村儚 +// nvue 椤甸潰涓嶆敮鎸佷慨鏀瑰ご鍍忓ぇ灏� +$avatar-width : 45px ; + +// 澶村儚杈规 +$avatar-border-radius: 5px; +$avatar-border-color: #eee; +$avatar-border-width: 1px; + +// 鏍囬鏂囧瓧鏍峰紡 +$title-size : 16px; +$title-color : #3b4144; +$title-weight : normal; + +// 鎻忚堪鏂囧瓧鏍峰紡 +$note-size : 12px; +$note-color : #999; +$note-weight : normal; + +// 鍙充晶棰濆鍐呭榛樿鏍峰紡 +$right-text-size : 12px; +$right-text-color : #999; +$right-text-weight : normal; + +// 瑙掓爣鏍峰紡 +// nvue 椤甸潰涓嶆敮鎸佷慨鏀瑰渾鐐逛綅缃互鍙婂ぇ灏� +// 瑙掓爣鍦ㄥ乏渚ф椂锛岃鏍囩殑浣嶇疆锛岄粯璁や负 0 锛岃礋鏁板乏/涓嬬Щ鍔紝姝f暟鍙�/涓婄Щ鍔� +$badge-left: 0px; +$badge-top: 0px; + +// 鏄剧ず鍦嗙偣鏃讹紝鍦嗙偣澶у皬 +$dot-width: 10px; +$dot-height: 10px; + +// 鏄剧ず瑙掓爣鏃讹紝瑙掓爣澶у皬鍜屽瓧浣撳ぇ灏� +$badge-size : 18px; +$badge-font : 12px; +// 鏄剧ず瑙掓爣鏃讹紝瑙掓爣鍓嶆櫙鑹� +$badge-color : #fff; +// 鏄剧ず瑙掓爣鏃讹紝瑙掓爣鑳屾櫙鑹� +$badge-background-color : #ff5a5f; +// 鏄剧ず瑙掓爣鏃讹紝瑙掓爣宸﹀彸闂磋窛 +$badge-space : 6px; + +// 鐘舵�佹牱寮� +// 閫変腑棰滆壊 +$hover : #f5f5f5; diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-list/components/uni-list-chat/uni-list-chat.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-list/components/uni-list-chat/uni-list-chat.vue" new file mode 100644 index 0000000..43e8542 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-list/components/uni-list-chat/uni-list-chat.vue" @@ -0,0 +1,571 @@ +<template> + <!-- #ifdef APP-NVUE --> + <cell> + <!-- #endif --> + <view :hover-class="!clickable && !link ? '' : 'uni-list-chat--hover'" class="uni-list-chat" @click.stop="onClick"> + <view :class="{ 'uni-list--border': border, 'uni-list-chat--first': isFirstChild }"></view> + <view class="uni-list-chat__container"> + <view class="uni-list-chat__header-warp"> + <view v-if="avatarCircle || avatarList.length === 0" class="uni-list-chat__header" :class="{ 'header--circle': avatarCircle }"> + <image class="uni-list-chat__header-image" :class="{ 'header--circle': avatarCircle }" :src="avatarUrl" mode="aspectFill"></image> + </view> + <!-- 澶村儚缁� --> + <view v-else class="uni-list-chat__header"> + <view v-for="(item, index) in avatarList" :key="index" class="uni-list-chat__header-box" :class="computedAvatar" + :style="{ width: imageWidth + 'px', height: imageWidth + 'px' }"> + <image class="uni-list-chat__header-image" :style="{ width: imageWidth + 'px', height: imageWidth + 'px' }" :src="item.url" + mode="aspectFill"></image> + </view> + </view> + </view> + <view v-if="badgeText && badgePositon === 'left'" class="uni-list-chat__badge uni-list-chat__badge-pos" :class="[isSingle]"> + <text class="uni-list-chat__badge-text">{{ badgeText === 'dot' ? '' : badgeText }}</text> + </view> + <view class="uni-list-chat__content"> + <view class="uni-list-chat__content-main"> + <text class="uni-list-chat__content-title uni-ellipsis">{{ title }}</text> + <view style="flex-direction: row;"> + <text class="draft" v-if="isDraft">[鑽夌]</text> + <text class="uni-list-chat__content-note uni-ellipsis">{{isDraft?note.slice(14):note}}</text> + </view> + </view> + <view class="uni-list-chat__content-extra"> + <slot> + <text class="uni-list-chat__content-extra-text">{{ time }}</text> + <view v-if="badgeText && badgePositon === 'right'" class="uni-list-chat__badge" :class="[isSingle, badgePositon === 'right' ? 'uni-list-chat--right' : '']"> + <text class="uni-list-chat__badge-text">{{ badgeText === 'dot' ? '' : badgeText }}</text> + </view> + </slot> + </view> + </view> + </view> + </view> + <!-- #ifdef APP-NVUE --> + </cell> + <!-- #endif --> +</template> + +<script> + // 澶村儚澶у皬 + const avatarWidth = 45; + + /** + * ListChat 鑱婂ぉ鍒楄〃 + * @description 鑱婂ぉ鍒楄〃,鐢ㄤ簬鍒涘缓鑱婂ぉ绫诲垪琛� + * @tutorial https://ext.dcloud.net.cn/plugin?id=24 + * @property {String} title 鏍囬 + * @property {String} note 鎻忚堪 + * @property {Boolean} clickable = [true|false] 鏄惁寮�鍚偣鍑诲弽棣堬紝榛樿涓篺alse + * @property {String} badgeText 鏁板瓧瑙掓爣鍐呭 + * @property {String} badgePositon = [left|right] 瑙掓爣浣嶇疆锛岄粯璁や负 right + * @property {String} link = [false锝渘avigateTo|redirectTo|reLaunch|switchTab] 鏄惁灞曠ず鍙充晶绠ご骞跺紑鍚偣鍑诲弽棣堬紝榛樿涓篺alse + * @value false 涓嶅紑鍚� + * @value navigateTo 鍚� uni.navigateTo() + * @value redirectTo 鍚� uni.redirectTo() + * @value reLaunch 鍚� uni.reLaunch() + * @value switchTab 鍚� uni.switchTab() + * @property {String | PageURIString} to 璺宠浆鐩爣椤甸潰 + * @property {String} time 鍙充晶鏃堕棿鏄剧ず + * @property {Boolean} avatarCircle = [true|false] 鏄惁鏄剧ず鍦嗗舰澶村儚锛岄粯璁や负false + * @property {String} avatar 澶村儚鍦板潃锛宎vatarCircle 涓嶅~鏃剁敓鏁� + * @property {Array} avatarList 澶村儚缁勶紝鏍煎紡涓� [{url:''}] + * @event {Function} click 鐐瑰嚮 uniListChat 瑙﹀彂浜嬩欢 + */ + export default { + name: 'UniListChat', + emits:['click'], + props: { + title: { + type: String, + default: '' + }, + note: { + type: String, + default: '' + }, + clickable: { + type: Boolean, + default: false + }, + link: { + type: [Boolean, String], + default: false + }, + to: { + type: String, + default: '' + }, + badgeText: { + type: [String, Number], + default: '' + }, + badgePositon: { + type: String, + default: 'right' + }, + time: { + type: String, + default: '' + }, + avatarCircle: { + type: Boolean, + default: false + }, + avatar: { + type: String, + default: '' + }, + avatarList: { + type: Array, + default () { + return []; + } + } + }, + // inject: ['list'], + computed: { + isDraft(){ + return this.note.slice(0,14) == '[uni-im-draft]' + }, + isSingle() { + if (this.badgeText === 'dot') { + return 'uni-badge--dot'; + } else { + const badgeText = this.badgeText.toString(); + if (badgeText.length > 1) { + return 'uni-badge--complex'; + } else { + return 'uni-badge--single'; + } + } + }, + computedAvatar() { + if (this.avatarList.length > 4) { + this.imageWidth = avatarWidth * 0.31; + return 'avatarItem--3'; + } else if (this.avatarList.length > 1) { + this.imageWidth = avatarWidth * 0.47; + return 'avatarItem--2'; + } else { + this.imageWidth = avatarWidth; + return 'avatarItem--1'; + } + } + }, + watch: { + avatar:{ + handler(avatar) { + if(avatar.substr(0,8) == 'cloud://'){ + uniCloud.getTempFileURL({ + fileList: [avatar] + }).then(res=>{ + // console.log(res); + // 鍏煎uniCloud绉佹湁鍖栭儴缃� + let fileList = res.fileList || res.result.fileList + this.avatarUrl = fileList[0].tempFileURL + }) + }else{ + this.avatarUrl = avatar + } + }, + immediate: true + } + }, + data() { + return { + isFirstChild: false, + border: true, + // avatarList: 3, + imageWidth: 50, + avatarUrl:'' + }; + }, + mounted() { + this.list = this.getForm() + if (this.list) { + if (!this.list.firstChildAppend) { + this.list.firstChildAppend = true; + this.isFirstChild = true; + } + this.border = this.list.border; + } + }, + methods: { + /** + * 鑾峰彇鐖跺厓绱犲疄渚� + */ + getForm(name = 'uniList') { + let parent = this.$parent; + let parentName = parent.$options.name; + while (parentName !== name) { + parent = parent.$parent; + if (!parent) return false + parentName = parent.$options.name; + } + return parent; + }, + onClick() { + if (this.to !== '') { + this.openPage(); + return; + } + + if (this.clickable || this.link) { + this.$emit('click', { + data: {} + }); + } + }, + openPage() { + if (['navigateTo', 'redirectTo', 'reLaunch', 'switchTab'].indexOf(this.link) !== -1) { + this.pageApi(this.link); + } else { + this.pageApi('navigateTo'); + } + }, + pageApi(api) { + uni[api]({ + url: this.to, + success: res => { + this.$emit('click', { + data: res + }); + }, + fail: err => { + this.$emit('click', { + data: err + }); + console.error(err.errMsg); + } + }); + } + } + }; +</script> + +<style lang="scss" > + $uni-font-size-lg:16px; + $uni-spacing-row-sm: 5px; + $uni-spacing-row-base: 10px; + $uni-spacing-row-lg: 15px; + $background-color: #fff; + $divide-line-color: #e5e5e5; + $avatar-width: 45px; + $avatar-border-radius: 5px; + $avatar-border-color: #eee; + $avatar-border-width: 1px; + $title-size: 16px; + $title-color: #3b4144; + $title-weight: normal; + $note-size: 12px; + $note-color: #999; + $note-weight: normal; + $right-text-size: 12px; + $right-text-color: #999; + $right-text-weight: normal; + $badge-left: 0px; + $badge-top: 0px; + $dot-width: 10px; + $dot-height: 10px; + $badge-size: 18px; + $badge-font: 12px; + $badge-color: #fff; + $badge-background-color: #ff5a5f; + $badge-space: 6px; + $hover: #f5f5f5; + + .uni-list-chat { + font-size: $uni-font-size-lg; + position: relative; + flex-direction: column; + justify-content: space-between; + background-color: $background-color; + } + + // .uni-list-chat--disabled { + // opacity: 0.3; + // } + + .uni-list-chat--hover { + background-color: $hover; + } + + .uni-list--border { + position: relative; + margin-left: $uni-spacing-row-lg; + /* #ifdef APP-PLUS */ + border-top-color: $divide-line-color; + border-top-style: solid; + border-top-width: 0.5px; + /* #endif */ + } + + /* #ifndef APP-NVUE */ + .uni-list--border:after { + position: absolute; + top: 0; + right: 0; + left: 0; + height: 1px; + content: ''; + -webkit-transform: scaleY(0.5); + transform: scaleY(0.5); + background-color: $divide-line-color; + } + + .uni-list-item--first:after { + height: 0px; + } + + /* #endif */ + + .uni-list-chat--first { + border-top-width: 0px; + } + + .uni-ellipsis { + /* #ifndef APP-NVUE */ + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + /* #endif */ + /* #ifdef APP-NVUE */ + lines: 1; + /* #endif */ + } + + .uni-ellipsis-2 { + /* #ifndef APP-NVUE */ + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + /* #endif */ + + /* #ifdef APP-NVUE */ + lines: 2; + /* #endif */ + } + + .uni-list-chat__container { + position: relative; + /* #ifndef APP-NVUE */ + display: flex; + /* #endif */ + flex-direction: row; + flex: 1; + padding: $uni-spacing-row-base $uni-spacing-row-lg; + position: relative; + overflow: hidden; + } + + .uni-list-chat__header-warp { + position: relative; + } + + .uni-list-chat__header { + /* #ifndef APP-NVUE */ + display: flex; + align-content: center; + /* #endif */ + flex-direction: row; + justify-content: center; + align-items: center; + flex-wrap: wrap-reverse; + /* #ifdef APP-NVUE */ + width: 50px; + height: 50px; + /* #endif */ + /* #ifndef APP-NVUE */ + width: $avatar-width; + height: $avatar-width; + /* #endif */ + + border-radius: $avatar-border-radius; + border-color: $avatar-border-color; + border-width: $avatar-border-width; + border-style: solid; + overflow: hidden; + } + + .uni-list-chat__header-box { + /* #ifndef APP-PLUS */ + box-sizing: border-box; + display: flex; + width: $avatar-width; + height: $avatar-width; + /* #endif */ + /* #ifdef APP-NVUE */ + width: 50px; + height: 50px; + /* #endif */ + overflow: hidden; + border-radius: 2px; + } + + .uni-list-chat__header-image { + margin: 1px; + /* #ifdef APP-NVUE */ + width: 50px; + height: 50px; + /* #endif */ + /* #ifndef APP-NVUE */ + width: $avatar-width; + height: $avatar-width; + /* #endif */ + } + + /* #ifndef APP-NVUE */ + .uni-list-chat__header-image { + display: block; + width: 100%; + height: 100%; + } + + .avatarItem--1 { + width: 100%; + height: 100%; + } + + .avatarItem--2 { + width: 47%; + height: 47%; + } + + .avatarItem--3 { + width: 32%; + height: 32%; + } + + /* #endif */ + .header--circle { + border-radius: 50%; + } + + .uni-list-chat__content { + /* #ifndef APP-NVUE */ + display: flex; + /* #endif */ + flex-direction: row; + flex: 1; + overflow: hidden; + padding: 2px 0; + } + + .uni-list-chat__content-main { + /* #ifndef APP-NVUE */ + display: flex; + /* #endif */ + flex-direction: column; + justify-content: space-between; + padding-left: $uni-spacing-row-base; + flex: 1; + overflow: hidden; + } + + .uni-list-chat__content-title { + font-size: $title-size; + color: $title-color; + font-weight: $title-weight; + overflow: hidden; + } + + .draft ,.uni-list-chat__content-note { + margin-top: 3px; + color: $note-color; + font-size: $note-size; + font-weight: $title-weight; + overflow: hidden; + } + .draft{ + color: #eb3a41; + /* #ifndef APP-NVUE */ + flex-shrink: 0; + /* #endif */ + padding-right: 3px; + } + + .uni-list-chat__content-extra { + /* #ifndef APP-NVUE */ + flex-shrink: 0; + display: flex; + /* #endif */ + flex-direction: column; + justify-content: space-between; + align-items: flex-end; + margin-left: 5px; + } + + .uni-list-chat__content-extra-text { + color: $right-text-color; + font-size: $right-text-size; + font-weight: $right-text-weight; + overflow: hidden; + } + + .uni-list-chat__badge-pos { + position: absolute; + /* #ifdef APP-NVUE */ + left: 55px; + top: 3px; + /* #endif */ + /* #ifndef APP-NVUE */ + left: calc(#{$avatar-width} + 10px - #{$badge-space} + #{$badge-left}); + top: calc(#{$uni-spacing-row-base}/ 2 + 1px + #{$badge-top}); + /* #endif */ + } + + .uni-list-chat__badge { + /* #ifndef APP-NVUE */ + display: flex; + /* #endif */ + justify-content: center; + align-items: center; + border-radius: 100px; + background-color: $badge-background-color; + } + + .uni-list-chat__badge-text { + color: $badge-color; + font-size: $badge-font; + } + + .uni-badge--single { + /* #ifndef APP-NVUE */ + // left: calc(#{$avatar-width} + 7px + #{$badge-left}); + /* #endif */ + width: $badge-size; + height: $badge-size; + } + + .uni-badge--complex { + /* #ifdef APP-NVUE */ + left: 50px; + /* #endif */ + /* #ifndef APP-NVUE */ + width: auto; + /* #endif */ + height: $badge-size; + padding: 0 $badge-space; + } + + .uni-badge--dot { + /* #ifdef APP-NVUE */ + left: 60px; + top: 6px; + /* #endif */ + /* #ifndef APP-NVUE */ + left: calc(#{$avatar-width} + 15px - #{$dot-width}/ 2 + 1px + #{$badge-left}); + /* #endif */ + width: $dot-width; + height: $dot-height; + padding: 0; + } + + .uni-list-chat--right { + /* #ifdef APP-NVUE */ + left: 0; + /* #endif */ + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-list/components/uni-list-item/uni-list-item.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-list/components/uni-list-item/uni-list-item.vue" new file mode 100644 index 0000000..06782c1 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-list/components/uni-list-item/uni-list-item.vue" @@ -0,0 +1,530 @@ +<template> + <!-- #ifdef APP-NVUE --> + <cell :keep-scroll-position="keepScrollPosition"> + <!-- #endif --> + <view :class="{ 'uni-list-item--disabled': disabled }" :style="{'background-color':customStyle.backgroundColor}" + :hover-class="(!clickable && !link) || disabled || showSwitch ? '' : 'uni-list-item--hover'" + class="uni-list-item" @click="onClick"> + <view v-if="!isFirstChild" class="border--left" :class="{ 'uni-list--border': border }"></view> + <view class="uni-list-item__container" + :class="{ 'container--right': showArrow || link, 'flex--direction': direction === 'column'}" + :style="{paddingTop:padding.top,paddingLeft:padding.left,paddingRight:padding.right,paddingBottom:padding.bottom}"> + <slot name="header"> + <view class="uni-list-item__header"> + <view v-if="thumb" class="uni-list-item__icon"> + <image :src="thumb" class="uni-list-item__icon-img" :class="['uni-list--' + thumbSize]" /> + </view> + <view v-else-if="showExtraIcon" class="uni-list-item__icon"> + <uni-icons :color="extraIcon.color" :size="extraIcon.size" :type="extraIcon.type" /> + </view> + </view> + </slot> + <slot name="body"> + <view class="uni-list-item__content" + :class="{ 'uni-list-item__content--center': thumb || showExtraIcon || showBadge || showSwitch }"> + <text v-if="title" class="uni-list-item__content-title" + :class="[ellipsis !== 0 && ellipsis <= 2 ? 'uni-ellipsis-' + ellipsis : '']">{{ title }}</text> + <text v-if="note" class="uni-list-item__content-note">{{ note }}</text> + </view> + </slot> + <slot name="footer"> + <view v-if="rightText || showBadge || showSwitch" class="uni-list-item__extra" + :class="{ 'flex--justify': direction === 'column' }"> + <text v-if="rightText" class="uni-list-item__extra-text">{{ rightText }}</text> + <uni-badge v-if="showBadge" :type="badgeType" :text="badgeText" :custom-style="badgeStyle" /> + <switch v-if="showSwitch" :disabled="disabled" :checked="switchChecked" + @change="onSwitchChange" /> + </view> + </slot> + </view> + <uni-icons v-if="showArrow || link" :size="16" class="uni-icon-wrapper" color="#bbb" type="arrowright" /> + </view> + <!-- #ifdef APP-NVUE --> + </cell> + <!-- #endif --> +</template> + +<script> + /** + * ListItem 鍒楄〃瀛愮粍浠� + * @description 鍒楄〃瀛愮粍浠� + * @tutorial https://ext.dcloud.net.cn/plugin?id=24 + * @property {String} title 鏍囬 + * @property {String} note 鎻忚堪 + * @property {String} thumb 宸︿晶缂╃暐鍥撅紝鑻humb鏈夊�硷紝鍒欎笉浼氭樉绀烘墿灞曞浘鏍� + * @property {String} thumbSize = [lg|base|sm] 鐣ョ缉鍥惧ぇ灏� + * @value lg 澶у浘 + * @value base 涓�鑸� + * @value sm 灏忓浘 + * @property {String} badgeText 鏁板瓧瑙掓爣鍐呭 + * @property {String} badgeType 鏁板瓧瑙掓爣绫诲瀷锛屽弬鑰僛uni-icons](https://ext.dcloud.net.cn/plugin?id=21) + * @property {Object} badgeStyle 鏁板瓧瑙掓爣鏍峰紡 + * @property {String} rightText 鍙充晶鏂囧瓧鍐呭 + * @property {Boolean} disabled = [true|false] 鏄惁绂佺敤 + * @property {Boolean} clickable = [true|false] 鏄惁寮�鍚偣鍑诲弽棣� + * @property {String} link = [navigateTo|redirectTo|reLaunch|switchTab] 鏄惁灞曠ず鍙充晶绠ご骞跺紑鍚偣鍑诲弽棣� + * @value navigateTo 鍚� uni.navigateTo() + * @value redirectTo 鍚� uni.redirectTo() + * @value reLaunch 鍚� uni.reLaunch() + * @value switchTab 鍚� uni.switchTab() + * @property {String | PageURIString} to 璺宠浆鐩爣椤甸潰 + * @property {Boolean} showBadge = [true|false] 鏄惁鏄剧ず鏁板瓧瑙掓爣 + * @property {Boolean} showSwitch = [true|false] 鏄惁鏄剧ずSwitch + * @property {Boolean} switchChecked = [true|false] Switch鏄惁琚�変腑 + * @property {Boolean} showExtraIcon = [true|false] 宸︿晶鏄惁鏄剧ず鎵╁睍鍥炬爣 + * @property {Object} extraIcon 鎵╁睍鍥炬爣鍙傛暟锛屾牸寮忎负 {color: '#4cd964',size: '22',type: 'spinner'} + * @property {String} direction = [row|column] 鎺掔増鏂瑰悜 + * @value row 姘村钩鎺掑垪 + * @value column 鍨傜洿鎺掑垪 + * @event {Function} click 鐐瑰嚮 uniListItem 瑙﹀彂浜嬩欢 + * @event {Function} switchChange 鐐瑰嚮鍒囨崲 Switch 鏃惰Е鍙� + */ + export default { + name: 'UniListItem', + emits: ['click', 'switchChange'], + props: { + direction: { + type: String, + default: 'row' + }, + title: { + type: String, + default: '' + }, + note: { + type: String, + default: '' + }, + ellipsis: { + type: [Number, String], + default: 0 + }, + disabled: { + type: [Boolean, String], + default: false + }, + clickable: { + type: Boolean, + default: false + }, + showArrow: { + type: [Boolean, String], + default: false + }, + link: { + type: [Boolean, String], + default: false + }, + to: { + type: String, + default: '' + }, + showBadge: { + type: [Boolean, String], + default: false + }, + showSwitch: { + type: [Boolean, String], + default: false + }, + switchChecked: { + type: [Boolean, String], + default: false + }, + badgeText: { + type: String, + default: '' + }, + badgeType: { + type: String, + default: 'success' + }, + badgeStyle: { + type: Object, + default () { + return {} + } + }, + rightText: { + type: String, + default: '' + }, + thumb: { + type: String, + default: '' + }, + thumbSize: { + type: String, + default: 'base' + }, + showExtraIcon: { + type: [Boolean, String], + default: false + }, + extraIcon: { + type: Object, + default () { + return { + type: '', + color: '#000000', + size: 20 + }; + } + }, + border: { + type: Boolean, + default: true + }, + customStyle: { + type: Object, + default () { + return { + padding: '', + backgroundColor: '#FFFFFF' + } + } + }, + keepScrollPosition: { + type: Boolean, + default: false + } + }, + watch: { + 'customStyle.padding': { + handler(padding) { + if(typeof padding == 'number'){ + padding += '' + } + let paddingArr = padding.split(' ') + if (paddingArr.length === 1) { + this.padding = { + "top": padding, + "right": padding, + "bottom": padding, + "left": padding + } + } else if (paddingArr.length === 2) { + this.padding = { + "top": padding[0], + "right": padding[1], + "bottom": padding[0], + "left": padding[1] + } + } else if (paddingArr.length === 4) { + this.padding = { + "top": padding[0], + "right": padding[1], + "bottom": padding[2], + "left": padding[3] + } + } + }, + immediate: true + } + }, + // inject: ['list'], + data() { + return { + isFirstChild: false, + padding: { + top: "", + right: "", + bottom: "", + left: "" + } + }; + }, + mounted() { + this.list = this.getForm() + // 鍒ゆ柇鏄惁瀛樺湪 uni-list 缁勪欢 + if (this.list) { + if (!this.list.firstChildAppend) { + this.list.firstChildAppend = true; + this.isFirstChild = true; + } + } + }, + methods: { + /** + * 鑾峰彇鐖跺厓绱犲疄渚� + */ + getForm(name = 'uniList') { + let parent = this.$parent; + let parentName = parent.$options.name; + while (parentName !== name) { + parent = parent.$parent; + if (!parent) return false + parentName = parent.$options.name; + } + return parent; + }, + onClick() { + if (this.to !== '') { + this.openPage(); + return; + } + if (this.clickable || this.link) { + this.$emit('click', { + data: {} + }); + } + }, + onSwitchChange(e) { + this.$emit('switchChange', e.detail); + }, + openPage() { + if (['navigateTo', 'redirectTo', 'reLaunch', 'switchTab'].indexOf(this.link) !== -1) { + this.pageApi(this.link); + } else { + this.pageApi('navigateTo'); + } + }, + pageApi(api) { + let callback = { + url: this.to, + success: res => { + this.$emit('click', { + data: res + }); + }, + fail: err => { + this.$emit('click', { + data: err + }); + } + } + switch (api) { + case 'navigateTo': + uni.navigateTo(callback) + break + case 'redirectTo': + uni.redirectTo(callback) + break + case 'reLaunch': + uni.reLaunch(callback) + break + case 'switchTab': + uni.switchTab(callback) + break + default: + uni.navigateTo(callback) + } + } + } + }; +</script> + +<style lang="scss"> + $uni-font-size-sm:12px; + $uni-font-size-base:14px; + $uni-font-size-lg:16px; + $uni-spacing-col-lg: 12px; + $uni-spacing-row-lg: 15px; + $uni-img-size-sm:20px; + $uni-img-size-base:26px; + $uni-img-size-lg:40px; + $uni-border-color:#e5e5e5; + $uni-bg-color-hover:#f1f1f1; + $uni-text-color-grey:#999; + $list-item-pd: $uni-spacing-col-lg $uni-spacing-row-lg; + + .uni-list-item { + /* #ifndef APP-NVUE */ + display: flex; + /* #endif */ + font-size: $uni-font-size-lg; + position: relative; + justify-content: space-between; + align-items: center; + background-color: #fff; + flex-direction: row; + /* #ifdef H5 */ + cursor: pointer; + /* #endif */ + } + + .uni-list-item--disabled { + opacity: 0.3; + } + + .uni-list-item--hover { + background-color: $uni-bg-color-hover; + } + + .uni-list-item__container { + position: relative; + /* #ifndef APP-NVUE */ + display: flex; + /* #endif */ + flex-direction: row; + padding: $list-item-pd; + padding-left: $uni-spacing-row-lg; + flex: 1; + overflow: hidden; + // align-items: center; + } + + .container--right { + padding-right: 0; + } + + // .border--left { + // margin-left: $uni-spacing-row-lg; + // } + .uni-list--border { + position: absolute; + top: 0; + right: 0; + left: 0; + /* #ifdef APP-NVUE */ + border-top-color: $uni-border-color; + border-top-style: solid; + border-top-width: 0.5px; + /* #endif */ + } + + /* #ifndef APP-NVUE */ + .uni-list--border:after { + position: absolute; + top: 0; + right: 0; + left: 0; + height: 1px; + content: ''; + -webkit-transform: scaleY(0.5); + transform: scaleY(0.5); + background-color: $uni-border-color; + } + + /* #endif */ + .uni-list-item__content { + /* #ifndef APP-NVUE */ + display: flex; + /* #endif */ + padding-right: 8px; + flex: 1; + color: #3b4144; + // overflow: hidden; + flex-direction: column; + justify-content: space-between; + overflow: hidden; + } + + .uni-list-item__content--center { + justify-content: center; + } + + .uni-list-item__content-title { + font-size: $uni-font-size-base; + color: #3b4144; + overflow: hidden; + } + + .uni-list-item__content-note { + margin-top: 6rpx; + color: $uni-text-color-grey; + font-size: $uni-font-size-sm; + overflow: hidden; + } + + .uni-list-item__extra { + // width: 25%; + /* #ifndef APP-NVUE */ + display: flex; + /* #endif */ + flex-direction: row; + justify-content: flex-end; + align-items: center; + } + + .uni-list-item__header { + /* #ifndef APP-NVUE */ + display: flex; + /* #endif */ + flex-direction: row; + align-items: center; + } + + .uni-list-item__icon { + margin-right: 18rpx; + flex-direction: row; + justify-content: center; + align-items: center; + } + + .uni-list-item__icon-img { + /* #ifndef APP-NVUE */ + display: block; + /* #endif */ + height: $uni-img-size-base; + width: $uni-img-size-base; + margin-right: 10px; + } + + .uni-icon-wrapper { + /* #ifndef APP-NVUE */ + display: flex; + /* #endif */ + align-items: center; + padding: 0 10px; + } + + .flex--direction { + flex-direction: column; + /* #ifndef APP-NVUE */ + align-items: initial; + /* #endif */ + } + + .flex--justify { + /* #ifndef APP-NVUE */ + justify-content: initial; + /* #endif */ + } + + .uni-list--lg { + height: $uni-img-size-lg; + width: $uni-img-size-lg; + } + + .uni-list--base { + height: $uni-img-size-base; + width: $uni-img-size-base; + } + + .uni-list--sm { + height: $uni-img-size-sm; + width: $uni-img-size-sm; + } + + .uni-list-item__extra-text { + color: $uni-text-color-grey; + font-size: $uni-font-size-sm; + } + + .uni-ellipsis-1 { + /* #ifndef APP-NVUE */ + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + /* #endif */ + /* #ifdef APP-NVUE */ + lines: 1; + text-overflow: ellipsis; + /* #endif */ + } + + .uni-ellipsis-2 { + /* #ifndef APP-NVUE */ + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + /* #endif */ + /* #ifdef APP-NVUE */ + lines: 2; + text-overflow: ellipsis; + /* #endif */ + } +</style> \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-list/components/uni-list/uni-list.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-list/components/uni-list/uni-list.vue" new file mode 100644 index 0000000..6ef5972 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-list/components/uni-list/uni-list.vue" @@ -0,0 +1,123 @@ +<template> + <!-- #ifndef APP-NVUE --> + <view class="uni-list uni-border-top-bottom"> + <view v-if="border" class="uni-list--border-top"></view> + <slot /> + <view v-if="border" class="uni-list--border-bottom"></view> + </view> + <!-- #endif --> + <!-- #ifdef APP-NVUE --> + <list :bounce="false" :scrollable="true" show-scrollbar :render-reverse="renderReverse" @scroll="scroll" class="uni-list" :class="{ 'uni-list--border': border }" :enableBackToTop="enableBackToTop" + loadmoreoffset="15"> + <slot /> + </list> + <!-- #endif --> +</template> + +<script> + /** + * List 鍒楄〃 + * @description 鍒楄〃缁勪欢 + * @tutorial https://ext.dcloud.net.cn/plugin?id=24 + * @property {String} border = [true|false] 鏍囬 + */ + export default { + name: 'uniList', + 'mp-weixin': { + options: { + multipleSlots: false + } + }, + props: { + stackFromEnd:{ + type: Boolean, + default:false + }, + enableBackToTop: { + type: [Boolean, String], + default: false + }, + scrollY: { + type: [Boolean, String], + default: false + }, + border: { + type: Boolean, + default: true + }, + renderReverse:{ + type: Boolean, + default: false + } + }, + // provide() { + // return { + // list: this + // }; + // }, + created() { + this.firstChildAppend = false; + }, + methods: { + loadMore(e) { + this.$emit('scrolltolower'); + }, + scroll(e) { + this.$emit('scroll', e); + } + } + }; +</script> +<style lang="scss"> + $uni-bg-color:#ffffff; + $uni-border-color:#e5e5e5; + + .uni-list { + /* #ifndef APP-NVUE */ + display: flex; + /* #endif */ + background-color: $uni-bg-color; + position: relative; + flex-direction: column; + } + + .uni-list--border { + position: relative; + /* #ifdef APP-NVUE */ + border-top-color: $uni-border-color; + border-top-style: solid; + border-top-width: 0.5px; + border-bottom-color: $uni-border-color; + border-bottom-style: solid; + border-bottom-width: 0.5px; + /* #endif */ + z-index: -1; + } + + /* #ifndef APP-NVUE */ + + .uni-list--border-top { + position: absolute; + top: 0; + right: 0; + left: 0; + height: 1px; + -webkit-transform: scaleY(0.5); + transform: scaleY(0.5); + background-color: $uni-border-color; + z-index: 1; + } + + .uni-list--border-bottom { + position: absolute; + bottom: 0; + right: 0; + left: 0; + height: 1px; + -webkit-transform: scaleY(0.5); + transform: scaleY(0.5); + background-color: $uni-border-color; + } + + /* #endif */ +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-list/components/uni-list/uni-refresh.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-list/components/uni-list/uni-refresh.vue" new file mode 100644 index 0000000..3b4c5a2 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-list/components/uni-list/uni-refresh.vue" @@ -0,0 +1,65 @@ +<template> + <!-- #ifdef APP-NVUE --> + <refresh :display="display" @refresh="onrefresh" @pullingdown="onpullingdown"> + <slot /> + </refresh> + <!-- #endif --> + <!-- #ifndef APP-NVUE --> + <view ref="uni-refresh" class="uni-refresh" v-show="isShow"> + <slot /> + </view> + <!-- #endif --> +</template> + +<script> + export default { + name: 'UniRefresh', + props: { + display: { + type: [String], + default: "hide" + } + }, + data() { + return { + pulling: false + } + }, + computed: { + isShow() { + if (this.display === "show" || this.pulling === true) { + return true; + } + return false; + } + }, + created() {}, + methods: { + onchange(value) { + this.pulling = value; + }, + onrefresh(e) { + this.$emit("refresh", e); + }, + onpullingdown(e) { + // #ifdef APP-NVUE + this.$emit("pullingdown", e); + // #endif + // #ifndef APP-NVUE + var detail = { + viewHeight: 90, + pullingDistance: e.height + } + this.$emit("pullingdown", detail); + // #endif + } + } + } +</script> + +<style> + .uni-refresh { + height: 0; + overflow: hidden; + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-list/components/uni-list/uni-refresh.wxs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-list/components/uni-list/uni-refresh.wxs" new file mode 100644 index 0000000..818a6b7 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-list/components/uni-list/uni-refresh.wxs" @@ -0,0 +1,87 @@ +var pullDown = { + threshold: 95, + maxHeight: 200, + callRefresh: 'onrefresh', + callPullingDown: 'onpullingdown', + refreshSelector: '.uni-refresh' +}; + +function ready(newValue, oldValue, ownerInstance, instance) { + var state = instance.getState() + state.canPullDown = newValue; + // console.log(newValue); +} + +function touchStart(e, instance) { + var state = instance.getState(); + state.refreshInstance = instance.selectComponent(pullDown.refreshSelector); + state.canPullDown = (state.refreshInstance != null && state.refreshInstance != undefined); + if (!state.canPullDown) { + return + } + + // console.log("touchStart"); + + state.height = 0; + state.touchStartY = e.touches[0].pageY || e.changedTouches[0].pageY; + state.refreshInstance.setStyle({ + 'height': 0 + }); + state.refreshInstance.callMethod("onchange", true); +} + +function touchMove(e, ownerInstance) { + var instance = e.instance; + var state = instance.getState(); + if (!state.canPullDown) { + return + } + + var oldHeight = state.height; + var endY = e.touches[0].pageY || e.changedTouches[0].pageY; + var height = endY - state.touchStartY; + if (height > pullDown.maxHeight) { + return; + } + + var refreshInstance = state.refreshInstance; + refreshInstance.setStyle({ + 'height': height + 'px' + }); + + height = height < pullDown.maxHeight ? height : pullDown.maxHeight; + state.height = height; + refreshInstance.callMethod(pullDown.callPullingDown, { + height: height + }); +} + +function touchEnd(e, ownerInstance) { + var state = e.instance.getState(); + if (!state.canPullDown) { + return + } + + state.refreshInstance.callMethod("onchange", false); + + var refreshInstance = state.refreshInstance; + if (state.height > pullDown.threshold) { + refreshInstance.callMethod(pullDown.callRefresh); + return; + } + + refreshInstance.setStyle({ + 'height': 0 + }); +} + +function propObserver(newValue, oldValue, instance) { + pullDown = newValue; +} + +module.exports = { + touchmove: touchMove, + touchstart: touchStart, + touchend: touchEnd, + propObserver: propObserver +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-list/package.json" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-list/package.json" new file mode 100644 index 0000000..87b35d4 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-list/package.json" @@ -0,0 +1,88 @@ +{ + "id": "uni-list", + "displayName": "uni-list 鍒楄〃", + "version": "1.2.10", + "description": "List 缁勪欢 锛屽府鍔╀娇鐢ㄨ�呭揩閫熸瀯寤哄垪琛ㄣ��", + "keywords": [ + "", + "uni-ui", + "uniui", + "鍒楄〃", + "", + "list" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "" + }, + "directories": { + "example": "../../temps/example_temps" + }, +"dcloudext": { + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "鏃�", + "data": "鏃�", + "permissions": "鏃�" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui", + "type": "component-vue" + }, + "uni_modules": { + "dependencies": [ + "uni-badge", + "uni-icons" + ], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "寰俊娴忚鍣�(Android)": "y", + "QQ娴忚鍣�(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "灏忕▼搴�": { + "寰俊": "y", + "闃块噷": "y", + "鐧惧害": "y", + "瀛楄妭璺冲姩": "y", + "QQ": "y" + }, + "蹇簲鐢�": { + "鍗庝负": "u", + "鑱旂洘": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-list/readme.md" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-list/readme.md" new file mode 100644 index 0000000..32c2865 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-list/readme.md" @@ -0,0 +1,346 @@ +## List 鍒楄〃 +> **缁勪欢鍚嶏細uni-list** +> 浠g爜鍧楋細 `uList`銆乣uListItem` +> 鍏宠仈缁勪欢锛歚uni-list-item`銆乣uni-badge`銆乣uni-icons`銆乣uni-list-chat`銆乣uni-list-ad` + + +List 鍒楄〃缁勪欢锛屽寘鍚熀鏈垪琛ㄦ牱寮忋�佸彲鎵╁睍鎻掓Ы鏈哄埗銆侀暱鍒楄〃鎬ц兘浼樺寲銆佸绔吋瀹广�� + +鍦╲ue椤甸潰閲岋紝瀹冮粯璁や娇鐢ㄩ〉闈㈢骇婊氬姩銆傚湪app-nvue椤甸潰閲岋紝瀹冮粯璁や娇鐢ㄥ師鐢焞ist缁勪欢婊氬姩銆傝繖鏍风殑闀垮垪琛紝鍦ㄦ粴鍔ㄥ嚭灞忓箷澶栧悗锛岀郴缁熶細鍥炴敹涓嶅彲瑙佸尯鍩熺殑娓叉煋鍐呭瓨璧勬簮锛屼笉浼氶�犳垚婊氬姩瓒婇暱鎵嬫満瓒婂崱鐨勯棶棰樸�� + +uni-list缁勪欢鏄埗瀹瑰櫒锛岄噷闈㈢殑鏍稿績鏄痷ni-list-item瀛愮粍浠讹紝瀹冧唬琛ㄥ垪琛ㄤ腑鐨勪竴涓彲閲嶅琛岋紝瀛愮粍浠跺彲浠ユ棤闄愬惊鐜�� + +uni-list-item鏈夊緢澶氶鏍硷紝uni-list-item缁勪欢閫氳繃鍐呯疆鐨勫睘鎬э紝婊¤冻涓�浜涘父鐢ㄧ殑鍦烘櫙銆傚綋鍐呯疆灞炴�т笉婊¤冻闇�姹傛椂锛屽彲浠ラ�氳繃鎵╁睍鎻掓Ы鏉ヨ嚜瀹氫箟鍒楄〃鍐呭銆� + +鍐呯疆灞炴�у彲浠ヨ鐩栫殑鍦烘櫙鍖呮嫭锛氬鑸垪琛ㄣ�佽缃垪琛ㄣ�佸皬鍥炬爣鍒楄〃銆侀�氫俊褰曞垪琛ㄣ�佽亰澶╄褰曞垪琛ㄣ�� + +娑夊強寰堝澶у浘鎴栦赴瀵屽唴瀹圭殑鍒楄〃锛屾瘮濡傜被浠婃棩澶存潯鐨勬柊闂诲垪琛ㄣ�佺被娣樺疂鐨勭數鍟嗗垪琛紝闇�瑕侀�氳繃鎵╁睍鎻掓Ы瀹炵幇銆� + +涓嬫枃鍧囨湁鏍蜂緥缁欏嚭銆� + +uni-list涓嶅寘鍚笅鎷夊埛鏂板拰涓婃媺缈婚〉銆備笂鎷夌炕椤靛彟瑙佺粍浠讹細[uni-load-more](https://ext.dcloud.net.cn/plugin?id=29) + + +### 瀹夎鏂瑰紡 + +鏈粍浠剁鍚圼easycom](https://uniapp.dcloud.io/collocation/pages?id=easycom)瑙勮寖锛宍HBuilderX 2.5.5`璧凤紝鍙渶灏嗘湰缁勪欢瀵煎叆椤圭洰锛屽湪椤甸潰`template`涓嵆鍙洿鎺ヤ娇鐢紝鏃犻渶鍦ㄩ〉闈腑`import`鍜屾敞鍐宍components`銆� + +濡傞渶閫氳繃`npm`鏂瑰紡浣跨敤`uni-ui`缁勪欢锛屽彟瑙佹枃妗o細[https://ext.dcloud.net.cn/plugin?id=55](https://ext.dcloud.net.cn/plugin?id=55) + +> **娉ㄦ剰浜嬮」** +> 涓轰簡閬垮厤閿欒浣跨敤锛岀粰澶у甯︽潵涓嶅ソ鐨勫紑鍙戜綋楠岋紝璇峰湪浣跨敤缁勪欢鍓嶄粩缁嗛槄璇讳笅闈㈢殑娉ㄦ剰浜嬮」锛屽彲浠ュ府浣犻伩鍏嶄竴浜涢敊璇�� +> - 缁勪欢闇�瑕佷緷璧� `sass` 鎻掍欢 锛岃鑷鎵嬪姩瀹夎 +> - 缁勪欢鍐呴儴渚濊禆 `'uni-icons'` 銆乣uni-badge` 缁勪欢 +> - `uni-list` 鍜� `uni-list-item` 闇�瑕侀厤濂椾娇鐢紝鏆備笉鏀寔鍗曠嫭浣跨敤 `uni-list-item` +> - 鍙湁寮�鍚偣鍑诲弽棣堝悗锛屼細鏈夌偣鍑婚�変腑鏁堟灉 +> - 浣跨敤鎻掓Ы鏃讹紝鍙互瀹屽叏鑷畾涔夊唴瀹� +> - note 銆乺ightText 灞炴�ф殏鏃舵病鍋氶檺鍒讹紝涓嶆敮鎸佹枃瀛楁孩鍑洪殣钘忥紝浣跨敤鏃跺簲璇ユ帶鍒堕暱搴︽樉绀烘垨閫氳繃榛樿鎻掓Ы鑷鎵╁睍 +> - 鏀粯瀹濆皬绋嬪簭骞冲彴闇�瑕佸湪鏀粯瀹濆皬绋嬪簭寮�鍙戣�呭伐鍏烽噷寮�鍚� component2 缂栬瘧妯″紡锛屽紑鍚柟寮忥細 璇︽儏 --> 椤圭洰閰嶇疆 --> 鍚敤 component2 缂栬瘧 +> - 濡傛灉闇�瑕佷慨鏀� `switch`銆乣badge` 鏍峰紡锛岃浣跨敤鎻掓Ы鑷畾涔� +> - 鍦� `HBuilderX` 浣庣増鏈腑锛屽彲鑳戒細鍑虹幇缁勪欢鏄剧ず `undefined` 鐨勯棶棰橈紝璇峰崌绾ф渶鏂扮殑 `HBuilderX` 鎴栬�� `cli` +> - 濡備娇鐢ㄨ繃绋嬩腑鏈変换浣曢棶棰橈紝鎴栬�呮偍瀵箄ni-ui鏈変竴浜涘ソ鐨勫缓璁紝娆㈣繋鍔犲叆 uni-ui 浜ゆ祦缇わ細871950839 + + +### 鍩烘湰鐢ㄦ硶 + +- 璁剧疆 `title` 灞炴�э紝鍙互鏄剧ず鍒楄〃鏍囬 +- 璁剧疆 `disabled` 灞炴�э紝鍙互绂佺敤褰撳墠椤� + +```html +<uni-list> + <uni-list-item title="鍒楄〃鏂囧瓧" ></uni-list-item> + <uni-list-item :disabled="true" title="鍒楄〃绂佺敤鐘舵��" ></uni-list-item> +</uni-list> + +``` + +### 澶氳鍐呭鏄剧ず + +- 璁剧疆 `note` 灞炴�� 锛屽彲浠ュ湪绗簩琛屾樉绀烘弿杩版枃鏈俊鎭� + +```html +<uni-list> + <uni-list-item title="鍒楄〃鏂囧瓧" note="鍒楄〃鎻忚堪淇℃伅"></uni-list-item> + <uni-list-item :disabled="true" title="鍒楄〃鏂囧瓧" note="鍒楄〃绂佺敤鐘舵��"></uni-list-item> +</uni-list> + +``` + +### 鍙充晶鏄剧ず瑙掓爣銆乻witch + +- 璁剧疆 `show-badge` 灞炴�� 锛屽彲浠ユ樉绀鸿鏍囧唴瀹� +- 璁剧疆 `show-switch` 灞炴�э紝鍙互鏄剧ず switch 寮�鍏� + +```html +<uni-list> + <uni-list-item title="鍒楄〃鍙充晶鏄剧ず瑙掓爣" :show-badge="true" badge-text="12" ></uni-list-item> + <uni-list-item title="鍒楄〃鍙充晶鏄剧ず switch" :show-switch="true" @switchChange="switchChange" ></uni-list-item> +</uni-list> + +``` + +### 宸︿晶鏄剧ず鐣ョ缉鍥俱�佸浘鏍� + +- 璁剧疆 `thumb` 灞炴�� 锛屽彲浠ュ湪鍒楄〃宸︿晶鏄剧ず鐣ョ缉鍥� +- 璁剧疆 `show-extra-icon` 灞炴�э紝骞舵寚瀹� `extra-icon` 鍙互鍦ㄥ乏渚ф樉绀哄浘鏍� + +```html + <uni-list> + <uni-list-item title="鍒楄〃宸︿晶甯︾暐缂╁浘" note="鍒楄〃鎻忚堪淇℃伅" thumb="https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/460d46d0-4fcc-11eb-8ff1-d5dcf8779628.png" + thumb-size="lg" rightText="鍙充晶鏂囧瓧"></uni-list-item> + <uni-list-item :show-extra-icon="true" :extra-icon="extraIcon1" title="鍒楄〃宸︿晶甯︽墿灞曞浘鏍�" ></uni-list-item> +</uni-list> +``` + +### 寮�鍚偣鍑诲弽棣堝拰鍙充晶绠ご +- 璁剧疆 `clickable` 涓� `true` 锛屽垯琛ㄧず杩欐槸涓�涓彲鐐瑰嚮鐨勫垪琛紝浼氶粯璁ょ粰涓�涓偣鍑绘晥鏋滐紝骞跺彲浠ョ洃鍚� `click` 浜嬩欢 +- 璁剧疆 `link` 灞炴�э紝浼氳嚜鍔ㄥ紑鍚偣鍑诲弽棣堬紝骞剁粰鍒楄〃鍙充晶娣诲姞涓�涓澶� +- 璁剧疆 `to` 灞炴�э紝鍙互璺宠浆椤甸潰锛宍link` 鐨勫�艰〃绀鸿烦杞柟寮忥紝濡傛灉涓嶆寚瀹氾紝榛樿涓� `navigateTo` + +```html + +<uni-list> + <uni-list-item title="寮�鍚偣鍑诲弽棣�" clickable @click="onClick" ></uni-list-item> + <uni-list-item title="榛樿 navigateTo 鏂瑰紡璺宠浆椤甸潰" link to="/pages/vue/index/index" @click="onClick($event,1)" ></uni-list-item> + <uni-list-item title="reLaunch 鏂瑰紡璺宠浆椤甸潰" link="reLaunch" to="/pages/vue/index/index" @click="onClick($event,1)" ></uni-list-item> +</uni-list> + +``` + + +### 鑱婂ぉ鍒楄〃绀轰緥 +- 璁剧疆 `clickable` 涓� `true` 锛屽垯琛ㄧず杩欐槸涓�涓彲鐐瑰嚮鐨勫垪琛紝浼氶粯璁ょ粰涓�涓偣鍑绘晥鏋滐紝骞跺彲浠ョ洃鍚� `click` 浜嬩欢 +- 璁剧疆 `link` 灞炴�э紝浼氳嚜鍔ㄥ紑鍚偣鍑诲弽棣堬紝`link` 鐨勫�艰〃绀鸿烦杞柟寮忥紝濡傛灉涓嶆寚瀹氾紝榛樿涓� `navigateTo` +- 璁剧疆 `to` 灞炴�э紝鍙互璺宠浆椤甸潰 +- `time` 灞炴�э紝閫氬父浼氳缃垚鏃堕棿鏄剧ず锛屼絾鏄繖涓睘鎬т笉浠呬粎鍙互璁剧疆鏃堕棿锛屼綘鍙互浼犲叆浠讳綍鏂囨湰锛屾敞鎰忔枃鏈暱搴﹀彲鑳戒細褰卞搷鏄剧ず +- `avatar` 鍜� `avatarList` 灞炴�у悓鏃跺彧浼氭湁涓�涓敓鏁堬紝鍚屾椂璁剧疆鐨勮瘽锛宍avatarList` 灞炴�х殑闀垮害澶т簬1 锛宍avatar` 灞炴�у皢澶辨晥 +- 鍙互閫氳繃榛樿鎻掓Ы鑷畾涔夊垪琛ㄥ彸渚у唴瀹� + +```html + +<uni-list> + <uni-list :border="true"> + <!-- 鏄剧ず鍦嗗舰澶村儚 --> + <uni-list-chat :avatar-circle="true" title="uni-app" avatar="https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/460d46d0-4fcc-11eb-8ff1-d5dcf8779628.png" note="鎮ㄦ敹鍒颁竴鏉℃柊鐨勬秷鎭�" time="2020-02-02 20:20" ></uni-list-chat> + <!-- 鍙充晶甯﹁鏍� --> + <uni-list-chat title="uni-app" avatar="https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/460d46d0-4fcc-11eb-8ff1-d5dcf8779628.png" note="鎮ㄦ敹鍒颁竴鏉℃柊鐨勬秷鎭�" time="2020-02-02 20:20" badge-text="12" :badge-style="{backgroundColor:'#FF80AB'}"></uni-list-chat> + <!-- 澶村儚鏄剧ず鍦嗙偣 --> + <uni-list-chat title="uni-app" avatar="https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/460d46d0-4fcc-11eb-8ff1-d5dcf8779628.png" note="鎮ㄦ敹鍒颁竴鏉℃柊鐨勬秷鎭�" time="2020-02-02 20:20" badge-positon="left" badge-text="dot"></uni-list-chat> + <!-- 澶村儚鏄剧ず瑙掓爣 --> + <uni-list-chat title="uni-app" avatar="https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/460d46d0-4fcc-11eb-8ff1-d5dcf8779628.png" note="鎮ㄦ敹鍒颁竴鏉℃柊鐨勬秷鎭�" time="2020-02-02 20:20" badge-positon="left" badge-text="99"></uni-list-chat> + <!-- 鏄剧ず澶氬ご鍍� --> + <uni-list-chat title="uni-app" :avatar-list="avatarList" note="鎮ㄦ敹鍒颁竴鏉℃柊鐨勬秷鎭�" time="2020-02-02 20:20" badge-positon="left" badge-text="dot"></uni-list-chat> + <!-- 鑷畾涔夊彸渚у唴瀹� --> + <uni-list-chat title="uni-app" :avatar-list="avatarList" note="鎮ㄦ敹鍒颁竴鏉℃柊鐨勬秷鎭�" time="2020-02-02 20:20" badge-positon="left" badge-text="dot"> + <view class="chat-custom-right"> + <text class="chat-custom-text">鍒氬垰</text> + <!-- 闇�瑕佷娇鐢� uni-icons 璇疯嚜琛屽紩鍏� --> + <uni-icons type="star-filled" color="#999" size="18"></uni-icons> + </view> + </uni-list-chat> + </uni-list> +</uni-list> + +``` + +```javascript + +export default { + components: {}, + data() { + return { + avatarList: [{ + url: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/460d46d0-4fcc-11eb-8ff1-d5dcf8779628.png' + }, { + url: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/460d46d0-4fcc-11eb-8ff1-d5dcf8779628.png' + }, { + url: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/460d46d0-4fcc-11eb-8ff1-d5dcf8779628.png' + }] + } + } +} + +``` + + +```css + +.chat-custom-right { + flex: 1; + /* #ifndef APP-NVUE */ + display: flex; + /* #endif */ + flex-direction: column; + justify-content: space-between; + align-items: flex-end; +} + +.chat-custom-text { + font-size: 12px; + color: #999; +} + +``` + +## API + +### List Props + +灞炴�у悕 |绫诲瀷 |榛樿鍊� | 璇存槑 +:-: |:-: |:-: | :-: +border |Boolean |true | 鏄惁鏄剧ず杈规 + + +### ListItem Props + +灞炴�у悕 |绫诲瀷 |榛樿鍊� | 璇存槑 +:-: |:-: |:-: | :-: +title |String |- | 鏍囬 +note |String |- | 鎻忚堪 +ellipsis |Number |0 | title 鏄惁婧㈠嚭闅愯棌锛屽彲閫夊�硷紝0:榛樿; 1:鏄剧ず涓�琛�; 2:鏄剧ず涓よ;銆恘vue 鏆備笉鏀寔銆� +thumb |String |- | 宸︿晶缂╃暐鍥撅紝鑻humb鏈夊�硷紝鍒欎笉浼氭樉绀烘墿灞曞浘鏍� +thumbSize |String |medium | 鐣ョ缉鍥惧昂瀵革紝鍙�夊�硷紝lg:澶у浘; medium:涓�鑸�; sm:灏忓浘; +showBadge |Boolean |false | 鏄惁鏄剧ず鏁板瓧瑙掓爣 +badgeText |String |- | 鏁板瓧瑙掓爣鍐呭 +badgeType |String |- | 鏁板瓧瑙掓爣绫诲瀷锛屽弬鑰僛uni-icons](https://ext.dcloud.net.cn/plugin?id=21) +badgeStyle |Object |- | 鏁板瓧瑙掓爣鏍峰紡锛屼娇鐢╱ni-badge鐨刢ustom-style鍙傛暟 +rightText |String |- | 鍙充晶鏂囧瓧鍐呭 +disabled |Boolean |false | 鏄惁绂佺敤 +showArrow |Boolean |true | 鏄惁鏄剧ず绠ご鍥炬爣 +link |String |navigateTo | 鏂伴〉闈㈣烦杞柟寮忥紝鍙�夊�艰涓嬭〃 +to |String |- | 鏂伴〉闈㈣烦杞湴鍧�锛屽濉啓姝ゅ睘鎬э紝click 浼氳繑鍥為〉闈㈡槸鍚﹁烦杞垚鍔� +clickable |Boolean |false | 鏄惁寮�鍚偣鍑诲弽棣� +showSwitch |Boolean |false | 鏄惁鏄剧ずSwitch +switchChecked |Boolean |false | Switch鏄惁琚�変腑 +showExtraIcon |Boolean |false | 宸︿晶鏄惁鏄剧ず鎵╁睍鍥炬爣 +extraIcon |Object |- | 鎵╁睍鍥炬爣鍙傛暟锛屾牸寮忎负 ``{color: '#4cd964',size: '22',type: 'spinner'}``锛屽弬鑰� [uni-icons](https://ext.dcloud.net.cn/plugin?id=28) +direction | String |row | 鎺掔増鏂瑰悜锛屽彲閫夊�硷紝row:姘村钩鎺掑垪; column:鍨傜洿鎺掑垪; 3涓彃妲芥槸姘村钩鎺掕繕鏄瀭鐩存帓锛屼篃鍙楁灞炴�ф帶鍒� + + +#### Link Options + +灞炴�у悕 | 璇存槑 +:-: | :-: +navigateTo | 鍚� uni.navigateTo() +redirectTo | 鍚� uni.reLaunch() +reLaunch | 鍚� uni.reLaunch() +switchTab | 鍚� uni.switchTab() + +### ListItem Events + +浜嬩欢绉板悕 |璇存槑 |杩斿洖鍙傛暟 +:-: |:-: |:-: +click |鐐瑰嚮 uniListItem 瑙﹀彂浜嬩欢锛岄渶寮�鍚偣鍑诲弽棣� |- +switchChange |鐐瑰嚮鍒囨崲 Switch 鏃惰Е鍙戯紝闇�鏄剧ず switch |e={value:checked} + + + +### ListItem Slots + +鍚嶇О | 璇存槑 +:-: | :-: +header | 宸�/涓婂唴瀹规彃妲斤紝鍙畬鍏ㄨ嚜瀹氫箟榛樿鏄剧ず +body | 涓棿鍐呭鎻掓Ы锛屽彲瀹屽叏鑷畾涔変腑闂村唴瀹� +footer | 鍙�/涓嬪唴瀹规彃妲斤紝鍙畬鍏ㄨ嚜瀹氫箟鍙充晶鍐呭 + + +> **閫氳繃鎻掓Ы鎵╁睍** +> 闇�瑕佹敞鎰忕殑鏄綋浣跨敤鎻掓Ы鏃讹紝鍐呯疆鏍峰紡灏嗕細澶辨晥锛屽彧淇濈暀鎺掔増鏍峰紡锛屾鏃剁殑鏍峰紡闇�瑕佸紑鍙戣�呰嚜宸卞疄鐜� +> 濡傛灉 `uni-list-item` 缁勪欢鍐呯疆灞炴�ф牱寮忔棤娉曟弧瓒抽渶姹傦紝鍙互浣跨敤鎻掓Ы鏉ヨ嚜瀹氫箟uni-list-item閲岀殑鍐呭銆� +> uni-list-item鎻愪緵浜�3涓彲鎵╁睍鐨勬彃妲斤細`header`銆乣body`銆乣footer` +> - 褰� `direction` 灞炴�т负 `row` 鏃惰〃绀烘按骞虫帓鍒楋紝姝ゆ椂 `header` 琛ㄧず鍒楄〃鐨勫乏杈归儴鍒嗭紝`body` 琛ㄧず鍒楄〃鐨勪腑闂撮儴鍒嗭紝`footer` 琛ㄧず鍒楄〃鐨勫彸杈归儴鍒� +> - 褰� `direction` 灞炴�т负 `column` 鏃惰〃绀哄瀭鐩存帓鍒楋紝姝ゆ椂 `header` 琛ㄧず鍒楄〃鐨勪笂杈归儴鍒嗭紝`body` 琛ㄧず鍒楄〃鐨勪腑闂撮儴鍒嗭紝`footer` 琛ㄧず鍒楄〃鐨勪笅杈归儴鍒� +> 寮�鍙戣�呭彲浠ュ彧鐢�1涓彃妲斤紝涔熷彲浠�3涓竴璧蜂娇鐢ㄣ�傚湪鎻掓Ы涓彲鑷富缂栧啓view鏍囩锛屽疄鐜拌嚜宸辨墍闇�鐨勬晥鏋溿�� + + +**绀轰緥** + +```html +<uni-list> + <uni-list-item title="鑷畾涔夊彸渚ф彃妲�" note="鍒楄〃鎻忚堪淇℃伅" link> + <template slot="header"> + <image class="slot-image" src="/static/logo.png" mode="widthFix"></image> + </template> + </uni-list-item> + <uni-list-item> + <!-- 鑷畾涔� header --> + <view slot="header" class="slot-box"><image class="slot-image" src="/static/logo.png" mode="widthFix"></image></view> + <!-- 鑷畾涔� body --> + <text slot="body" class="slot-box slot-text">鑷畾涔夋彃妲�</text> + <!-- 鑷畾涔� footer--> + <template slot="footer"> + <image class="slot-image" src="/static/logo.png" mode="widthFix"></image> + </template> + </uni-list-item> +</uni-list> +``` + + + + + +### ListItemChat Props + +灞炴�у悕 |绫诲瀷 |榛樿鍊� | 璇存槑 +:-: |:-: |:-: | :-: +title |String |- | 鏍囬 +note |String |- | 鎻忚堪 +clickable |Boolean |false | 鏄惁寮�鍚偣鍑诲弽棣� +badgeText |String |- | 鏁板瓧瑙掓爣鍐呭锛岃缃负 `dot` 灏嗘樉绀哄渾鐐� +badgePositon |String |right | 瑙掓爣浣嶇疆 +link |String |navigateTo | 鏄惁灞曠ず鍙充晶绠ご骞跺紑鍚偣鍑诲弽棣堬紝鍙�夊�艰涓嬭〃 +clickable |Boolean |false | 鏄惁寮�鍚偣鍑诲弽棣� +to |String |- | 璺宠浆椤甸潰鍦板潃锛屽濉啓姝ゅ睘鎬э紝click 浼氳繑鍥為〉闈㈡槸鍚﹁烦杞垚鍔� +time |String |- | 鍙充晶鏃堕棿鏄剧ず +avatarCircle |Boolean |false | 鏄惁鏄剧ず鍦嗗舰澶村儚 +avatar |String |- | 澶村儚鍦板潃锛宎vatarCircle 涓嶅~鏃剁敓鏁� +avatarList |Array |- | 澶村儚缁勶紝鏍煎紡涓� [{url:''}] + +#### Link Options + +灞炴�у悕 | 璇存槑 +:-: | :-: +navigateTo | 鍚� uni.navigateTo() +redirectTo | 鍚� uni.reLaunch() +reLaunch | 鍚� uni.reLaunch() +switchTab | 鍚� uni.switchTab() + +### ListItemChat Slots + +鍚嶇О | 璇存槑 +:- | :- +default | 鑷畾涔夊垪琛ㄥ彸渚у唴瀹癸紙鍖呮嫭鏃堕棿鍜岃鏍囨樉绀猴級 + +### ListItemChat Events +浜嬩欢绉板悕 | 璇存槑 | 杩斿洖鍙傛暟 +:-: | :-: | :-: +@click | 鐐瑰嚮 uniListChat 瑙﹀彂浜嬩欢 | {data:{}} 锛屽鏈� to 灞炴�э紝浼氳繑鍥為〉闈㈣烦杞俊鎭� + + + + + + +## 鍩轰簬uni-list鎵╁睍鐨勯〉闈㈡ā鏉� + +閫氳繃鎵╁睍鎻掓Ы锛屽彲瀹炵幇澶氱甯歌鏍峰紡鐨勫垪琛� + +**鏂伴椈鍒楄〃绫�** + +1. 浜戠涓�浣撴贩鍚堝竷灞�锛歔https://ext.dcloud.net.cn/plugin?id=2546](https://ext.dcloud.net.cn/plugin?id=2546) +2. 浜戠涓�浣撳瀭鐩村竷灞�锛屽ぇ鍥炬ā寮忥細[https://ext.dcloud.net.cn/plugin?id=2583](https://ext.dcloud.net.cn/plugin?id=2583) +3. 浜戠涓�浣撳瀭鐩村竷灞�锛屽琛屽浘鏂囨贩鎺掞細[https://ext.dcloud.net.cn/plugin?id=2584](https://ext.dcloud.net.cn/plugin?id=2584) +4. 浜戠涓�浣撳瀭鐩村竷灞�锛屽鍥炬ā寮忥細[https://ext.dcloud.net.cn/plugin?id=2585](https://ext.dcloud.net.cn/plugin?id=2585) +5. 浜戠涓�浣撴按骞冲竷灞�锛屽乏鍥惧彸鏂囷細[https://ext.dcloud.net.cn/plugin?id=2586](https://ext.dcloud.net.cn/plugin?id=2586) +6. 浜戠涓�浣撴按骞冲竷灞�锛屽乏鏂囧彸鍥撅細[https://ext.dcloud.net.cn/plugin?id=2587](https://ext.dcloud.net.cn/plugin?id=2587) +7. 浜戠涓�浣撳瀭鐩村竷灞�锛屾棤鍥炬ā寮忥紝涓绘爣棰�+鍓爣棰橈細[https://ext.dcloud.net.cn/plugin?id=2588](https://ext.dcloud.net.cn/plugin?id=2588) + +**鍟嗗搧鍒楄〃绫�** + +1. 浜戠涓�浣撳垪琛�/瀹牸瑙嗗浘浜掑垏锛歔https://ext.dcloud.net.cn/plugin?id=2651](https://ext.dcloud.net.cn/plugin?id=2651) +2. 浜戠涓�浣撳垪琛紙瀹牸妯″紡锛夛細[https://ext.dcloud.net.cn/plugin?id=2671](https://ext.dcloud.net.cn/plugin?id=2671) +3. 浜戠涓�浣撳垪琛紙鍒楄〃妯″紡锛夛細[https://ext.dcloud.net.cn/plugin?id=2672](https://ext.dcloud.net.cn/plugin?id=2672) + +## 缁勪欢绀轰緥 + +鐐瑰嚮鏌ョ湅锛歔https://hellouniapp.dcloud.net.cn/pages/extUI/list/list](https://hellouniapp.dcloud.net.cn/pages/extUI/list/list) \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-load-more/changelog.md" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-load-more/changelog.md" new file mode 100644 index 0000000..8f03f1d --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-load-more/changelog.md" @@ -0,0 +1,19 @@ +## 1.3.3锛�2022-01-20锛� +- 鏂板 showText灞炴�� 锛屾槸鍚︽樉绀烘枃鏈� +## 1.3.2锛�2022-01-19锛� +- 淇 nvue 骞冲彴涓嬩笉鏄剧ず鏂囨湰鐨刡ug +## 1.3.1锛�2022-01-19锛� +- 淇 寰俊灏忕▼搴忓钩鍙版牱寮忛�夋嫨鍣ㄦ姤璀﹀憡鐨勯棶棰� +## 1.3.0锛�2021-11-19锛� +- 浼樺寲 缁勪欢UI锛屽苟鎻愪緵璁捐璧勬簮锛岃瑙�:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 鏂囨。杩佺Щ锛岃瑙�:[https://uniapp.dcloud.io/component/uniui/uni-load-more](https://uniapp.dcloud.io/component/uniui/uni-load-more) +## 1.2.1锛�2021-08-24锛� +- 鏂板 鏀寔鍥介檯鍖� +## 1.2.0锛�2021-07-30锛� +- 缁勪欢鍏煎 vue3锛屽浣曞垱寤簐ue3椤圭洰锛岃瑙� [uni-app 椤圭洰鏀寔 vue3 浠嬬粛](https://ask.dcloud.net.cn/article/37834) +## 1.1.8锛�2021-05-12锛� +- 鏂板 缁勪欢绀轰緥鍦板潃 +## 1.1.7锛�2021-03-30锛� +- 淇 uni-load-more 鍦ㄩ椤典娇鐢ㄦ椂锛宧5 骞冲彴鎶� 'uni is not defined' 鐨� bug +## 1.1.6锛�2021-02-05锛� +- 璋冩暣涓簎ni_modules鐩綍瑙勮寖 diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-load-more/components/uni-load-more/i18n/en.json" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-load-more/components/uni-load-more/i18n/en.json" new file mode 100644 index 0000000..a4f14a5 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-load-more/components/uni-load-more/i18n/en.json" @@ -0,0 +1,5 @@ +{ + "uni-load-more.contentdown": "Pull up to show more", + "uni-load-more.contentrefresh": "loading...", + "uni-load-more.contentnomore": "No more data" +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-load-more/components/uni-load-more/i18n/index.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-load-more/components/uni-load-more/i18n/index.js" new file mode 100644 index 0000000..de7509c --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-load-more/components/uni-load-more/i18n/index.js" @@ -0,0 +1,8 @@ +import en from './en.json' +import zhHans from './zh-Hans.json' +import zhHant from './zh-Hant.json' +export default { + en, + 'zh-Hans': zhHans, + 'zh-Hant': zhHant +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-load-more/components/uni-load-more/i18n/zh-Hans.json" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-load-more/components/uni-load-more/i18n/zh-Hans.json" new file mode 100644 index 0000000..f15d510 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-load-more/components/uni-load-more/i18n/zh-Hans.json" @@ -0,0 +1,5 @@ +{ + "uni-load-more.contentdown": "涓婃媺鏄剧ず鏇村", + "uni-load-more.contentrefresh": "姝e湪鍔犺浇...", + "uni-load-more.contentnomore": "娌℃湁鏇村鏁版嵁浜�" +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-load-more/components/uni-load-more/i18n/zh-Hant.json" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-load-more/components/uni-load-more/i18n/zh-Hant.json" new file mode 100644 index 0000000..a255c6d --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-load-more/components/uni-load-more/i18n/zh-Hant.json" @@ -0,0 +1,5 @@ +{ + "uni-load-more.contentdown": "涓婃媺椤ず鏇村", + "uni-load-more.contentrefresh": "姝e湪鍔犺級...", + "uni-load-more.contentnomore": "娌掓湁鏇村鏁告摎浜�" +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue" new file mode 100644 index 0000000..e5eff4d --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue" @@ -0,0 +1,399 @@ +<template> + <view class="uni-load-more" @click="onClick"> + <!-- #ifdef APP-NVUE --> + <loading-indicator v-if="!webviewHide && status === 'loading' && showIcon" + :style="{color: color,width:iconSize+'px',height:iconSize+'px'}" :animating="true" + class="uni-load-more__img uni-load-more__img--nvue"></loading-indicator> + <!-- #endif --> + <!-- #ifdef H5 --> + <svg width="24" height="24" viewBox="25 25 50 50" + v-if="!webviewHide && (iconType==='circle' || iconType==='auto' && platform === 'android') && status === 'loading' && showIcon" + :style="{width:iconSize+'px',height:iconSize+'px'}" + class="uni-load-more__img uni-load-more__img--android-H5"> + <circle cx="50" cy="50" r="20" fill="none" :style="{color:color}" :stroke-width="3"></circle> + </svg> + <!-- #endif --> + <!-- #ifndef APP-NVUE || H5 --> + <view + v-if="!webviewHide && (iconType==='circle' || iconType==='auto' && platform === 'android') && status === 'loading' && showIcon" + :style="{width:iconSize+'px',height:iconSize+'px'}" + class="uni-load-more__img uni-load-more__img--android-MP"> + <view class="uni-load-more__img-icon" :style="{borderTopColor:color,borderTopWidth:iconSize/12}"></view> + <view class="uni-load-more__img-icon" :style="{borderTopColor:color,borderTopWidth:iconSize/12}"></view> + <view class="uni-load-more__img-icon" :style="{borderTopColor:color,borderTopWidth:iconSize/12}"></view> + </view> + <!-- #endif --> + <!-- #ifndef APP-NVUE --> + <view v-else-if="!webviewHide && status === 'loading' && showIcon" + :style="{width:iconSize+'px',height:iconSize+'px'}" class="uni-load-more__img uni-load-more__img--ios-H5"> + <image :src="imgBase64" mode="widthFix"></image> + </view> + <!-- #endif --> + <text v-if="showText" class="uni-load-more__text" + :style="{color: color}">{{ status === 'more' ? contentdownText : status === 'loading' ? contentrefreshText : contentnomoreText }}</text> + </view> +</template> + +<script> + let platform + setTimeout(() => { + platform = uni.getSystemInfoSync().platform + }, 16) + + import { + initVueI18n + } from '@dcloudio/uni-i18n' + import messages from './i18n/index.js' + const { + t + } = initVueI18n(messages) + + /** + * LoadMore 鍔犺浇鏇村 + * @description 鐢ㄤ簬鍒楄〃涓紝鍋氭粴鍔ㄥ姞杞戒娇鐢紝灞曠ず loading 鐨勫悇绉嶇姸鎬� + * @tutorial https://ext.dcloud.net.cn/plugin?id=29 + * @property {String} status = [more|loading|noMore] loading 鐨勭姸鎬� + * @value more loading鍓� + * @value loading loading涓� + * @value noMore 娌℃湁鏇村浜� + * @property {Number} iconSize 鎸囧畾鍥炬爣澶у皬 + * @property {Boolean} iconSize = [true|false] 鏄惁鏄剧ず loading 鍥炬爣 + * @property {String} iconType = [snow|circle|auto] 鎸囧畾鍥炬爣鏍峰紡 + * @value snow ios闆姳鍔犺浇鏍峰紡 + * @value circle 瀹夊崜鍞ら啋鍔犺浇鏍峰紡 + * @value auto 鏍规嵁骞冲彴鑷姩閫夋嫨鍔犺浇鏍峰紡 + * @property {String} color 鍥炬爣鍜屾枃瀛楅鑹� + * @property {Object} contentText 鍚勭姸鎬佹枃瀛楄鏄庯紝鍊间负锛歿contentdown: "涓婃媺鏄剧ず鏇村",contentrefresh: "姝e湪鍔犺浇...",contentnomore: "娌℃湁鏇村鏁版嵁浜�"} + * @event {Function} clickLoadMore 鐐瑰嚮鍔犺浇鏇村鏃惰Е鍙� + */ + export default { + name: 'UniLoadMore', + emits: ['clickLoadMore'], + props: { + status: { + // 涓婃媺鐨勭姸鎬侊細more-loading鍓嶏紱loading-loading涓紱noMore-娌℃湁鏇村浜� + type: String, + default: 'more' + }, + showIcon: { + type: Boolean, + default: true + }, + iconType: { + type: String, + default: 'auto' + }, + iconSize: { + type: Number, + default: 24 + }, + color: { + type: String, + default: '#777777' + }, + contentText: { + type: Object, + default () { + return { + contentdown: '', + contentrefresh: '', + contentnomore: '' + } + } + }, + showText: { + type: Boolean, + default: true + } + }, + data() { + return { + webviewHide: false, + platform: platform, + imgBase64: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QzlBMzU3OTlEOUM0MTFFOUI0NTZDNERBQURBQzI4RkUiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QzlBMzU3OUFEOUM0MTFFOUI0NTZDNERBQURBQzI4RkUiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDOUEzNTc5N0Q5QzQxMUU5QjQ1NkM0REFBREFDMjhGRSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDOUEzNTc5OEQ5QzQxMUU5QjQ1NkM0REFBREFDMjhGRSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pt+ALSwAAA6CSURBVHja1FsLkFZV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' + } + }, + computed: { + iconSnowWidth() { + return (Math.floor(this.iconSize / 24) || 1) * 2 + }, + contentdownText() { + return this.contentText.contentdown || t("uni-load-more.contentdown") + }, + contentrefreshText() { + return this.contentText.contentrefresh || t("uni-load-more.contentrefresh") + }, + contentnomoreText() { + return this.contentText.contentnomore || t("uni-load-more.contentnomore") + } + }, + mounted() { + // #ifdef APP-PLUS + var pages = getCurrentPages(); + var page = pages[pages.length - 1]; + var currentWebview = page.$getAppWebview(); + currentWebview.addEventListener('hide', () => { + this.webviewHide = true + }) + currentWebview.addEventListener('show', () => { + this.webviewHide = false + }) + // #endif + }, + methods: { + onClick() { + this.$emit('clickLoadMore', { + detail: { + status: this.status, + } + }) + } + } + } +</script> + +<style lang="scss" > + .uni-load-more { + /* #ifndef APP-NVUE */ + display: flex; + /* #endif */ + flex-direction: row; + height: 40px; + align-items: center; + justify-content: center; + } + + .uni-load-more__text { + font-size: 14px; + margin-left: 8px; + } + + .uni-load-more__img { + width: 24px; + height: 24px; + // margin-right: 8px; + } + + .uni-load-more__img--nvue { + color: #666666; + } + + .uni-load-more__img--android, + .uni-load-more__img--ios { + width: 24px; + height: 24px; + transform: rotate(0deg); + } + + /* #ifndef APP-NVUE */ + .uni-load-more__img--android { + animation: loading-ios 1s 0s linear infinite; + } + + @keyframes loading-android { + 0% { + transform: rotate(0deg); + } + + 100% { + transform: rotate(360deg); + } + } + + .uni-load-more__img--ios-H5 { + position: relative; + animation: loading-ios-H5 1s 0s step-end infinite; + } + + .uni-load-more__img--ios-H5 image { + position: absolute; + width: 100%; + height: 100%; + left: 0; + top: 0; + } + + @keyframes loading-ios-H5 { + 0% { + transform: rotate(0deg); + } + + 8% { + transform: rotate(30deg); + } + + 16% { + transform: rotate(60deg); + } + + 24% { + transform: rotate(90deg); + } + + 32% { + transform: rotate(120deg); + } + + 40% { + transform: rotate(150deg); + } + + 48% { + transform: rotate(180deg); + } + + 56% { + transform: rotate(210deg); + } + + 64% { + transform: rotate(240deg); + } + + 73% { + transform: rotate(270deg); + } + + 82% { + transform: rotate(300deg); + } + + 91% { + transform: rotate(330deg); + } + + 100% { + transform: rotate(360deg); + } + } + + /* #endif */ + + /* #ifdef H5 */ + .uni-load-more__img--android-H5 { + animation: loading-android-H5-rotate 2s linear infinite; + transform-origin: center center; + } + + .uni-load-more__img--android-H5 circle { + display: inline-block; + animation: loading-android-H5-dash 1.5s ease-in-out infinite; + stroke: currentColor; + stroke-linecap: round; + } + + @keyframes loading-android-H5-rotate { + 0% { + transform: rotate(0deg); + } + + 100% { + transform: rotate(360deg); + } + } + + @keyframes loading-android-H5-dash { + 0% { + stroke-dasharray: 1, 200; + stroke-dashoffset: 0; + } + + 50% { + stroke-dasharray: 90, 150; + stroke-dashoffset: -40; + } + + 100% { + stroke-dasharray: 90, 150; + stroke-dashoffset: -120; + } + } + + /* #endif */ + + /* #ifndef APP-NVUE || H5 */ + .uni-load-more__img--android-MP { + position: relative; + width: 24px; + height: 24px; + transform: rotate(0deg); + animation: loading-ios 1s 0s ease infinite; + } + + .uni-load-more__img--android-MP .uni-load-more__img-icon { + position: absolute; + box-sizing: border-box; + width: 100%; + height: 100%; + border-radius: 50%; + border: solid 2px transparent; + border-top: solid 2px #777777; + transform-origin: center; + } + + .uni-load-more__img--android-MP .uni-load-more__img-icon:nth-child(1) { + animation: loading-android-MP-1 1s 0s linear infinite; + } + + .uni-load-more__img--android-MP .uni-load-more__img-icon:nth-child(2) { + animation: loading-android-MP-2 1s 0s linear infinite; + } + + .uni-load-more__img--android-MP .uni-load-more__img-icon:nth-child(3) { + animation: loading-android-MP-3 1s 0s linear infinite; + } + + @keyframes loading-android { + 0% { + transform: rotate(0deg); + } + + 100% { + transform: rotate(360deg); + } + } + + @keyframes loading-android-MP-1 { + 0% { + transform: rotate(0deg); + } + + 50% { + transform: rotate(90deg); + } + + 100% { + transform: rotate(360deg); + } + } + + @keyframes loading-android-MP-2 { + 0% { + transform: rotate(0deg); + } + + 50% { + transform: rotate(180deg); + } + + 100% { + transform: rotate(360deg); + } + } + + @keyframes loading-android-MP-3 { + 0% { + transform: rotate(0deg); + } + + 50% { + transform: rotate(270deg); + } + + 100% { + transform: rotate(360deg); + } + } + + /* #endif */ +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-load-more/package.json" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-load-more/package.json" new file mode 100644 index 0000000..2fa6f04 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-load-more/package.json" @@ -0,0 +1,86 @@ +{ + "id": "uni-load-more", + "displayName": "uni-load-more 鍔犺浇鏇村", + "version": "1.3.3", + "description": "LoadMore 缁勪欢锛屽父鐢ㄥ湪鍒楄〃閲岄潰锛屽仛婊氬姩鍔犺浇浣跨敤銆�", + "keywords": [ + "uni-ui", + "uniui", + "鍔犺浇鏇村", + "load-more" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "" + }, + "directories": { + "example": "../../temps/example_temps" + }, + "dcloudext": { + "category": [ + "鍓嶇缁勪欢", + "閫氱敤缁勪欢" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "鏃�", + "data": "鏃�", + "permissions": "鏃�" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" + }, + "uni_modules": { + "dependencies": ["uni-scss"], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "寰俊娴忚鍣�(Android)": "y", + "QQ娴忚鍣�(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "灏忕▼搴�": { + "寰俊": "y", + "闃块噷": "y", + "鐧惧害": "y", + "瀛楄妭璺冲姩": "y", + "QQ": "y" + }, + "蹇簲鐢�": { + "鍗庝负": "u", + "鑱旂洘": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-load-more/readme.md" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-load-more/readme.md" new file mode 100644 index 0000000..54dc1fa --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-load-more/readme.md" @@ -0,0 +1,14 @@ + + +### LoadMore 鍔犺浇鏇村 +> **缁勪欢鍚嶏細uni-load-more** +> 浠g爜鍧楋細 `uLoadMore` + + +鐢ㄤ簬鍒楄〃涓紝鍋氭粴鍔ㄥ姞杞戒娇鐢紝灞曠ず loading 鐨勫悇绉嶇姸鎬併�� + + +### [鏌ョ湅鏂囨。](https://uniapp.dcloud.io/component/uniui/uni-load-more) +#### 濡備娇鐢ㄨ繃绋嬩腑鏈変换浣曢棶棰橈紝鎴栬�呮偍瀵箄ni-ui鏈変竴浜涘ソ鐨勫缓璁紝娆㈣繋鍔犲叆 uni-ui 浜ゆ祦缇わ細871950839 + + diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-nav-bar/changelog.md" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-nav-bar/changelog.md" new file mode 100644 index 0000000..0f9a2f1 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-nav-bar/changelog.md" @@ -0,0 +1,51 @@ +## 1.3.11锛�2023-03-29锛� +- 淇 鑷畾涔夌姸鎬佹爮楂樺害闂姩BUG +## 1.3.10锛�2023-03-29锛� +- 淇 鏆楅粦妯″紡涓嬭竟绾块鑹查敊璇殑bug +## 1.3.9锛�2022-10-13锛� +- 淇 鏉′欢缂栬瘧閿欒鐨刡ug +## 1.3.8锛�2022-10-12锛� +- 淇 nvue 鐜 fixed 涓� true 鐨勬儏鍐典笅锛屾棤娉曠疆椤剁殑 bug +## 1.3.7锛�2022-08-11锛� +- 淇 nvue 鐜涓� fixed 涓� true 鐨勬儏鍐典笅锛屾棤娉曠疆椤剁殑 bug +## 1.3.6锛�2022-06-30锛� +- 淇 缁勪欢绀轰緥涓彃妲界敤娉曟棤娉曟樉绀哄唴瀹圭殑bug +## 1.3.5锛�2022-05-24锛� +- 鏂板 stat 灞炴�� 锛屽彲寮�鍚粺璁itle 涓婃姤 锛屼粎浣跨敤浜唗itle 灞炴�т笖椤圭洰寮�鍚簡uni缁熻鐢熸晥 +## 1.3.4锛�2022-01-24锛� +- 鏇存柊 缁勪欢绀轰緥 +## 1.3.3锛�2022-01-24锛� +- 鏂板 left-width/right-width灞炴�� 锛屽彲淇敼宸﹀彸涓や晶鐨勫搴� +## 1.3.2锛�2022-01-18锛� +- 淇 鍦╲ue涓嬶紝鏍囬涓嶅瀭鐩村眳涓殑bug +## 1.3.1锛�2022-01-18锛� +- 淇 height 灞炴�х被鍨嬮敊璇� +## 1.3.0锛�2022-01-18锛� +- 鏂板 height 灞炴��,鍙慨鏀圭粍浠堕珮搴� +- 鏂板 dark 灞炴�у彲鍙紑鍚殫榛戞ā寮� +- 浼樺寲 鏍囬瀛楁暟杩囧鏄剧ず鐪佺暐鍙� +- 浼樺寲 鎻掓Ы锛屾彃鍏ュ唴瀹瑰彲瀹屽叏瑕嗙洊 +## 1.2.1锛�2022-01-10锛� +- 淇 color 灞炴�т笉鐢熸晥鐨刡ug +## 1.2.0锛�2021-11-19锛� +- 浼樺寲 缁勪欢UI锛屽苟鎻愪緵璁捐璧勬簮锛岃瑙�:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 鏂囨。杩佺Щ锛岃瑙�:[https://uniapp.dcloud.io/component/uniui/uni-nav-bar](https://uniapp.dcloud.io/component/uniui/uni-nav-bar) +## 1.1.0锛�2021-07-30锛� +- 缁勪欢鍏煎 vue3锛屽浣曞垱寤簐ue3椤圭洰锛岃瑙� [uni-app 椤圭洰鏀寔 vue3 浠嬬粛](https://ask.dcloud.net.cn/article/37834) +## 1.0.11锛�2021-05-12锛� +- 鏂板 缁勪欢绀轰緥鍦板潃 +## 1.0.10锛�2021-04-30锛� +- 淇 鍦╪vue涓媐ixed涓簍rue锛屽搴︿笉鑳芥拺婊$殑Bug +## 1.0.9锛�2021-04-21锛� +- 浼樺寲 娣诲姞渚濊禆 uni-icons, 瀵煎叆鍚庤嚜鍔ㄤ笅杞戒緷璧� +## 1.0.8锛�2021-04-14锛� +- uni-ui 淇 uni-nav-bar 褰� fixed 灞炴�т负 true 鏃堕摵涓嶆弧灞忓箷鐨� bug + +## 1.0.7锛�2021-02-25锛� +- 淇 easycom 涓嬶紝鎵句笉鍒� uni-status-bar 鐨刡ug + +## 1.0.6锛�2021-02-05锛� +- 浼樺寲 缁勪欢寮曠敤鍏崇郴锛岄�氳繃uni_modules寮曠敤缁勪欢 + +## 1.0.5锛�2021-02-05锛� +- 璋冩暣涓簎ni_modules鐩綍瑙勮寖 diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar.vue" new file mode 100644 index 0000000..c890860 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar.vue" @@ -0,0 +1,357 @@ +<template> + <view class="uni-navbar" :class="{'uni-dark':dark, 'uni-nvue-fixed': fixed}"> + <view class="uni-navbar__content" :class="{ 'uni-navbar--fixed': fixed, 'uni-navbar--shadow': shadow, 'uni-navbar--border': border }" + :style="{ 'background-color': themeBgColor, 'border-bottom-color':themeColor }" > + <status-bar v-if="statusBar" /> + <view :style="{ color: themeColor,backgroundColor: themeBgColor ,height:navbarHeight}" + class="uni-navbar__header"> + <view @tap="onClickLeft" class="uni-navbar__header-btns uni-navbar__header-btns-left" + :style="{width:leftIconWidth}"> + <slot name="left"> + <view class="uni-navbar__content_view" v-if="leftIcon.length > 0"> + <uni-icons :color="themeColor" :type="leftIcon" size="20" /> + </view> + <view :class="{ 'uni-navbar-btn-icon-left': !leftIcon.length > 0 }" class="uni-navbar-btn-text" + v-if="leftText.length"> + <text :style="{ color: themeColor, fontSize: '12px' }">{{ leftText }}</text> + </view> + </slot> + </view> + <view class="uni-navbar__header-container " @tap="onClickTitle"> + <slot> + <view class="uni-navbar__header-container-inner" v-if="title.length>0"> + <text class="uni-nav-bar-text uni-ellipsis-1" + :style="{color: themeColor }">{{ title }}</text> + </view> + </slot> + </view> + <view @click="onClickRight" class="uni-navbar__header-btns uni-navbar__header-btns-right" + :style="{width:rightIconWidth}"> + <slot name="right"> + <view v-if="rightIcon.length"> + <uni-icons :color="themeColor" :type="rightIcon" size="22" /> + </view> + <view class="uni-navbar-btn-text" v-if="rightText.length && !rightIcon.length"> + <text class="uni-nav-bar-right-text" :style="{ color: themeColor}">{{ rightText }}</text> + </view> + </slot> + </view> + </view> + </view> + <!-- #ifndef APP-NVUE --> + <view class="uni-navbar__placeholder" v-if="fixed"> + <status-bar v-if="statusBar" /> + <view class="uni-navbar__placeholder-view" :style="{ height:navbarHeight}" /> + </view> + <!-- #endif --> + </view> +</template> + +<script> + import statusBar from "./uni-status-bar.vue"; + const getVal = (val) => typeof val === 'number' ? val + 'px' : val; + + /** + * + * + * NavBar 鑷畾涔夊鑸爮 + * @description 瀵艰埅鏍忕粍浠讹紝涓昏鐢ㄤ簬澶撮儴瀵艰埅 + * @tutorial https://ext.dcloud.net.cn/plugin?id=52 + * @property {Boolean} dark 寮�鍚粦鏆楁ā寮� + * @property {String} title 鏍囬鏂囧瓧 + * @property {String} leftText 宸︿晶鎸夐挳鏂囨湰 + * @property {String} rightText 鍙充晶鎸夐挳鏂囨湰 + * @property {String} leftIcon 宸︿晶鎸夐挳鍥炬爣锛堝浘鏍囩被鍨嬪弬鑰� [Icon 鍥炬爣](http://ext.dcloud.net.cn/plugin?id=28) type 灞炴�э級 + * @property {String} rightIcon 鍙充晶鎸夐挳鍥炬爣锛堝浘鏍囩被鍨嬪弬鑰� [Icon 鍥炬爣](http://ext.dcloud.net.cn/plugin?id=28) type 灞炴�э級 + * @property {String} color 鍥炬爣鍜屾枃瀛楅鑹� + * @property {String} backgroundColor 瀵艰埅鏍忚儗鏅鑹� + * @property {Boolean} fixed = [true|false] 鏄惁鍥哄畾椤堕儴 + * @property {Boolean} statusBar = [true|false] 鏄惁鍖呭惈鐘舵�佹爮 + * @property {Boolean} shadow = [true|false] 瀵艰埅鏍忎笅鏄惁鏈夐槾褰� + * @property {Boolean} stat 鏄惁寮�鍚粺璁℃爣棰樹笂鎶� + * @event {Function} clickLeft 宸︿晶鎸夐挳鐐瑰嚮鏃惰Е鍙� + * @event {Function} clickRight 鍙充晶鎸夐挳鐐瑰嚮鏃惰Е鍙� + * @event {Function} clickTitle 涓棿鏍囬鐐瑰嚮鏃惰Е鍙� + */ + export default { + name: "UniNavBar", + components: { + statusBar + }, + emits: ['clickLeft', 'clickRight', 'clickTitle'], + props: { + dark: { + type: Boolean, + default: false + }, + title: { + type: String, + default: "" + }, + leftText: { + type: String, + default: "" + }, + rightText: { + type: String, + default: "" + }, + leftIcon: { + type: String, + default: "" + }, + rightIcon: { + type: String, + default: "" + }, + fixed: { + type: [Boolean, String], + default: false + }, + color: { + type: String, + default: "" + }, + backgroundColor: { + type: String, + default: "" + }, + statusBar: { + type: [Boolean, String], + default: false + }, + shadow: { + type: [Boolean, String], + default: false + }, + border: { + type: [Boolean, String], + default: true + }, + height: { + type: [Number, String], + default: 44 + }, + leftWidth: { + type: [Number, String], + default: 60 + }, + rightWidth: { + type: [Number, String], + default: 60 + }, + stat: { + type: [Boolean, String], + default: '' + } + }, + computed: { + themeBgColor() { + if (this.dark) { + // 榛樿鍊� + if (this.backgroundColor) { + return this.backgroundColor + } else { + return this.dark ? '#333' : '#FFF' + } + } + return this.backgroundColor || '#FFF' + }, + themeColor() { + if (this.dark) { + // 榛樿鍊� + if (this.color) { + return this.color + } else { + return this.dark ? '#fff' : '#333' + } + } + return this.color || '#333' + }, + navbarHeight() { + return getVal(this.height) + }, + leftIconWidth() { + return getVal(this.leftWidth) + }, + rightIconWidth() { + return getVal(this.rightWidth) + } + }, + mounted() { + if (uni.report && this.stat && this.title !== '') { + uni.report('title', this.title) + } + }, + methods: { + onClickLeft() { + this.$emit("clickLeft"); + }, + onClickRight() { + this.$emit("clickRight"); + }, + onClickTitle() { + this.$emit("clickTitle"); + } + } + }; +</script> + +<style lang="scss" scoped> + $nav-height: 44px; + + .uni-nvue-fixed { + /* #ifdef APP-NVUE */ + position: sticky; + /* #endif */ + } + .uni-navbar { + // box-sizing: border-box; + } + + .uni-nav-bar-text { + /* #ifdef APP-PLUS */ + font-size: 34rpx; + /* #endif */ + /* #ifndef APP-PLUS */ + font-size: 14px; + /* #endif */ + } + + .uni-nav-bar-right-text { + font-size: 12px; + } + + .uni-navbar__content { + position: relative; + // background-color: #fff; + // box-sizing: border-box; + background-color: transparent; + } + + .uni-navbar__content_view { + // box-sizing: border-box; + } + + .uni-navbar-btn-text { + /* #ifndef APP-NVUE */ + display: flex; + /* #endif */ + flex-direction: column; + justify-content: flex-start; + align-items: center; + line-height: 12px; + } + + .uni-navbar__header { + /* #ifndef APP-NVUE */ + display: flex; + /* #endif */ + padding: 0 10px; + flex-direction: row; + height: $nav-height; + font-size: 12px; + } + + .uni-navbar__header-btns { + /* #ifndef APP-NVUE */ + overflow: hidden; + display: flex; + /* #endif */ + flex-wrap: nowrap; + flex-direction: row; + width: 120rpx; + // padding: 0 6px; + justify-content: center; + align-items: center; + /* #ifdef H5 */ + cursor: pointer; + /* #endif */ + } + + .uni-navbar__header-btns-left { + /* #ifndef APP-NVUE */ + display: flex; + /* #endif */ + width: 120rpx; + justify-content: flex-start; + align-items: center; + } + + .uni-navbar__header-btns-right { + /* #ifndef APP-NVUE */ + display: flex; + /* #endif */ + flex-direction: row; + // width: 150rpx; + // padding-right: 30rpx; + justify-content: flex-end; + align-items: center; + } + + .uni-navbar__header-container { + /* #ifndef APP-NVUE */ + display: flex; + /* #endif */ + flex: 1; + padding: 0 10px; + overflow: hidden; + } + + .uni-navbar__header-container-inner { + /* #ifndef APP-NVUE */ + display: flex; + /* #endif */ + flex: 1; + flex-direction: row; + align-items: center; + justify-content: center; + font-size: 12px; + overflow: hidden; + // box-sizing: border-box; + } + + + .uni-navbar__placeholder-view { + height: $nav-height; + } + + .uni-navbar--fixed { + position: fixed; + z-index: 998; + /* #ifdef H5 */ + left: var(--window-left); + right: var(--window-right); + /* #endif */ + /* #ifndef H5 */ + left: 0; + right: 0; + /* #endif */ + + } + + .uni-navbar--shadow { + box-shadow: 0 1px 6px #ccc; + } + + .uni-navbar--border { + border-bottom-width: 1rpx; + border-bottom-style: solid; + border-bottom-color: #eee; + } + + .uni-ellipsis-1 { + overflow: hidden; + /* #ifndef APP-NVUE */ + white-space: nowrap; + text-overflow: ellipsis; + /* #endif */ + /* #ifdef APP-NVUE */ + lines: 1; + text-overflow: ellipsis; + /* #endif */ + } + + // 鏆椾富棰橀厤缃� + .uni-dark {} +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-status-bar.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-status-bar.vue" new file mode 100644 index 0000000..4ac73ae --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-status-bar.vue" @@ -0,0 +1,24 @@ +<template> + <view :style="{ height: statusBarHeight }" class="uni-status-bar"> + <slot /> + </view> +</template> + +<script> + export default { + name: 'UniStatusBar', + data() { + return { + statusBarHeight: uni.getSystemInfoSync().statusBarHeight + 'px' + } + } + } +</script> + +<style lang="scss" > + .uni-status-bar { + // width: 750rpx; + height: 20px; + // height: var(--status-bar-height); + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-nav-bar/package.json" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-nav-bar/package.json" new file mode 100644 index 0000000..240ae95 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-nav-bar/package.json" @@ -0,0 +1,86 @@ +{ + "id": "uni-nav-bar", + "displayName": "uni-nav-bar 鑷畾涔夊鑸爮", + "version": "1.3.11", + "description": "鑷畾涔夊鑸爮缁勪欢锛屼富瑕佺敤浜庡ご閮ㄥ鑸��", + "keywords": [ + "uni-ui", + "瀵艰埅", + "瀵艰埅鏍�", + "鑷畾涔夊鑸爮" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "" + }, + "directories": { + "example": "../../temps/example_temps" + }, +"dcloudext": { + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "鏃�", + "data": "鏃�", + "permissions": "鏃�" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui", + "type": "component-vue" + }, + "uni_modules": { + "dependencies": [ + "uni-scss", + "uni-icons" + ], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "寰俊娴忚鍣�(Android)": "y", + "QQ娴忚鍣�(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "灏忕▼搴�": { + "寰俊": "y", + "闃块噷": "y", + "鐧惧害": "y", + "瀛楄妭璺冲姩": "y", + "QQ": "y" + }, + "蹇簲鐢�": { + "鍗庝负": "u", + "鑱旂洘": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-nav-bar/readme.md" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-nav-bar/readme.md" new file mode 100644 index 0000000..3934b32 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-nav-bar/readme.md" @@ -0,0 +1,15 @@ + + +## NavBar 瀵艰埅鏍� +> **缁勪欢鍚嶏細uni-nav-bar** +> 浠g爜鍧楋細 `uNavBar` + +瀵艰埅鏍忕粍浠讹紝涓昏鐢ㄤ簬澶撮儴瀵艰埅銆� + +### [鏌ョ湅鏂囨。](https://uniapp.dcloud.io/component/uniui/uni-nav-bar) +#### 濡備娇鐢ㄨ繃绋嬩腑鏈変换浣曢棶棰橈紝鎴栬�呮偍瀵箄ni-ui鏈変竴浜涘ソ鐨勫缓璁紝娆㈣繋鍔犲叆 uni-ui 浜ゆ祦缇わ細871950839 + + + + + diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-popup/changelog.md" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-popup/changelog.md" new file mode 100644 index 0000000..bc59f07 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-popup/changelog.md" @@ -0,0 +1,68 @@ +## 1.8.3锛�2023-04-17锛� +- 淇 uni-popup 閲嶅鎵撳紑鏃剁殑 bug +## 1.8.2锛�2023-02-02锛� +- uni-popup-dialog 缁勪欢鏂板 inputType 灞炴�� +## 1.8.1锛�2022-12-01锛� +- 淇 nvue 涓� v-show 鎶ラ敊 +## 1.8.0锛�2022-11-29锛� +- 浼樺寲 涓婚鏍峰紡 +## 1.7.9锛�2022-04-02锛� +- 淇 寮瑰嚭灞傚唴閮ㄦ棤娉曟粴鍔ㄧ殑bug +## 1.7.8锛�2022-03-28锛� +- 淇 灏忕▼搴忎腑楂樺害閿欒鐨刡ug +## 1.7.7锛�2022-03-17锛� +- 淇 蹇�熻皟鐢╫pen鍑虹幇闂鐨凚ug +## 1.7.6锛�2022-02-14锛� +- 淇 safeArea 灞炴�т笉鑳借缃负false鐨刡ug +## 1.7.5锛�2022-01-19锛� +- 淇 isMaskClick 澶辨晥鐨刡ug +## 1.7.4锛�2022-01-19锛� +- 鏂板 cancelText \ confirmText 灞炴�� 锛屽彲鑷畾涔夋枃鏈� +- 鏂板 maskBackgroundColor 灞炴�� 锛屽彲浠ヤ慨鏀硅挋鐗堥鑹� +- 浼樺寲 maskClick灞炴�� 鏇存柊涓� isMaskClick 锛岃В鍐冲井淇″皬绋嬪簭璀﹀憡鐨勯棶棰� +## 1.7.3锛�2022-01-13锛� +- 淇 璁剧疆 safeArea 灞炴�т笉鐢熸晥鐨刡ug +## 1.7.2锛�2021-11-26锛� +- 浼樺寲 缁勪欢绀轰緥 +## 1.7.1锛�2021-11-26锛� +- 淇 vuedoc 鏂囧瓧閿欒 +## 1.7.0锛�2021-11-19锛� +- 浼樺寲 缁勪欢UI锛屽苟鎻愪緵璁捐璧勬簮锛岃瑙�:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 鏂囨。杩佺Щ锛岃瑙�:[https://uniapp.dcloud.io/component/uniui/uni-popup](https://uniapp.dcloud.io/component/uniui/uni-popup) +## 1.6.2锛�2021-08-24锛� +- 鏂板 鏀寔鍥介檯鍖� +## 1.6.1锛�2021-07-30锛� +- 浼樺寲 vue3涓嬩簨浠惰鍛婄殑闂 +## 1.6.0锛�2021-07-13锛� +- 缁勪欢鍏煎 vue3锛屽浣曞垱寤簐ue3椤圭洰锛岃瑙� [uni-app 椤圭洰鏀寔 vue3 浠嬬粛](https://ask.dcloud.net.cn/article/37834) +## 1.5.0锛�2021-06-23锛� +- 鏂板 mask-click 閬僵灞傜偣鍑讳簨浠� +## 1.4.5锛�2021-06-22锛� +- 淇 nvue 骞冲彴涓棿寮瑰嚭鍚庯紝鐐瑰嚮鍐呭锛屽啀鐐瑰嚮閬僵鏃犳硶鍏抽棴鐨凚ug +## 1.4.4锛�2021-06-18锛� +- 淇 H5骞冲彴涓棿寮瑰嚭鍚庯紝鐐瑰嚮鍐呭锛屽啀鐐瑰嚮閬僵鏃犳硶鍏抽棴鐨凚ug +## 1.4.3锛�2021-06-08锛� +- 淇 閿欒鐨� watch 瀛楁 +- 淇 safeArea 灞炴�т笉鐢熸晥鐨勯棶棰� +- 淇 鐐瑰嚮鍐呭锛屽啀鐐瑰嚮閬僵鏃犳硶鍏抽棴鐨凚ug +## 1.4.2锛�2021-05-12锛� +- 鏂板 缁勪欢绀轰緥鍦板潃 +## 1.4.1锛�2021-04-29锛� +- 淇 缁勪欢鍐呮斁缃� input 銆乼extarea 缁勪欢锛屾棤娉曡仛鐒︾殑闂 +## 1.4.0 锛�2021-04-29锛� +- 鏂板 type 灞炴�х殑 left\right 鍊硷紝鏀寔宸﹀彸寮瑰嚭 +- 鏂板 open(String:type) 鏂规硶鍙傛暟 锛屽彲浠ョ渷鐣� type 灞炴�� 锛岀洿鎺ヤ紶鍏ョ被鍨嬫墦寮�鎸囧畾寮圭獥 +- 鏂板 backgroundColor 灞炴�э紝鍙畾涔変富绐楀彛鑳屾櫙鑹�,榛樿涓嶆樉绀鸿儗鏅壊 +- 鏂板 safeArea 灞炴�э紝鏄惁閫傞厤搴曢儴瀹夊叏鍖� +- 淇 App\h5\寰俊灏忕▼搴忓簳閮ㄥ畨鍏ㄥ尯鍗犱綅涓嶅鐨凚ug +- 淇 App 绔脊鍑虹瓑寰呯殑Bug +- 浼樺寲 鎻愬崌浣庨厤璁惧鎬ц兘锛屼紭鍖栧姩鐢诲崱椤块棶棰� +- 浼樺寲 鏇寸畝鍗曠殑缁勪欢鑷畾涔夋柟寮� +## 1.2.9锛�2021-02-05锛� +- 浼樺寲 缁勪欢寮曠敤鍏崇郴锛岄�氳繃uni_modules寮曠敤缁勪欢 +## 1.2.8锛�2021-02-05锛� +- 璋冩暣涓簎ni_modules鐩綍瑙勮寖 +## 1.2.7锛�2021-02-05锛� +- 璋冩暣涓簎ni_modules鐩綍瑙勮寖 +- 鏂板 鏀寔 PC 绔� +- 鏂板 uni-popup-message 銆乽ni-popup-dialog鎵╁睍缁勪欢鏀寔 PC 绔� diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-popup/components/uni-popup-dialog/keypress.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-popup/components/uni-popup-dialog/keypress.js" new file mode 100644 index 0000000..6ef26a2 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-popup/components/uni-popup-dialog/keypress.js" @@ -0,0 +1,45 @@ +// #ifdef H5 +export default { + name: 'Keypress', + props: { + disable: { + type: Boolean, + default: false + } + }, + mounted () { + const keyNames = { + esc: ['Esc', 'Escape'], + tab: 'Tab', + enter: 'Enter', + space: [' ', 'Spacebar'], + up: ['Up', 'ArrowUp'], + left: ['Left', 'ArrowLeft'], + right: ['Right', 'ArrowRight'], + down: ['Down', 'ArrowDown'], + delete: ['Backspace', 'Delete', 'Del'] + } + const listener = ($event) => { + if (this.disable) { + return + } + const keyName = Object.keys(keyNames).find(key => { + const keyName = $event.key + const value = keyNames[key] + return value === keyName || (Array.isArray(value) && value.includes(keyName)) + }) + if (keyName) { + // 閬垮厤鍜屽叾浠栨寜閿簨浠跺啿绐� + setTimeout(() => { + this.$emit(keyName, {}) + }, 0) + } + } + document.addEventListener('keyup', listener) + this.$once('hook:beforeDestroy', () => { + document.removeEventListener('keyup', listener) + }) + }, + render: () => {} +} +// #endif diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog.vue" new file mode 100644 index 0000000..b5eee79 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog.vue" @@ -0,0 +1,275 @@ +<template> + <view class="uni-popup-dialog"> + <view class="uni-dialog-title"> + <text class="uni-dialog-title-text" :class="['uni-popup__'+dialogType]">{{titleText}}</text> + </view> + <view v-if="mode === 'base'" class="uni-dialog-content"> + <slot> + <text class="uni-dialog-content-text">{{content}}</text> + </slot> + </view> + <view v-else class="uni-dialog-content"> + <slot> + <input class="uni-dialog-input" v-model="val" :type="inputType" :placeholder="placeholderText" :focus="focus" > + </slot> + </view> + <view class="uni-dialog-button-group"> + <view class="uni-dialog-button" @click="closeDialog"> + <text class="uni-dialog-button-text">{{closeText}}</text> + </view> + <view class="uni-dialog-button uni-border-left" @click="onOk"> + <text class="uni-dialog-button-text uni-button-color">{{okText}}</text> + </view> + </view> + + </view> +</template> + +<script> + import popup from '../uni-popup/popup.js' + import { + initVueI18n + } from '@dcloudio/uni-i18n' + import messages from '../uni-popup/i18n/index.js' + const { t } = initVueI18n(messages) + /** + * PopUp 寮瑰嚭灞�-瀵硅瘽妗嗘牱寮� + * @description 寮瑰嚭灞�-瀵硅瘽妗嗘牱寮� + * @tutorial https://ext.dcloud.net.cn/plugin?id=329 + * @property {String} value input 妯″紡涓嬬殑榛樿鍊� + * @property {String} placeholder input 妯″紡涓嬭緭鍏ユ彁绀� + * @property {String} type = [success|warning|info|error] 涓婚鏍峰紡 + * @value success 鎴愬姛 + * @value warning 鎻愮ず + * @value info 娑堟伅 + * @value error 閿欒 + * @property {String} mode = [base|input] 妯″紡銆� + * @value base 鍩虹瀵硅瘽妗� + * @value input 鍙緭鍏ュ璇濇 + * @property {String} content 瀵硅瘽妗嗗唴瀹� + * @property {Boolean} beforeClose 鏄惁鎷︽埅鍙栨秷浜嬩欢 + * @event {Function} confirm 鐐瑰嚮纭鎸夐挳瑙﹀彂 + * @event {Function} close 鐐瑰嚮鍙栨秷鎸夐挳瑙﹀彂 + */ + + export default { + name: "uniPopupDialog", + mixins: [popup], + emits:['confirm','close'], + props: { + inputType:{ + type: String, + default: 'text' + }, + value: { + type: [String, Number], + default: '' + }, + placeholder: { + type: [String, Number], + default: '' + }, + type: { + type: String, + default: 'error' + }, + mode: { + type: String, + default: 'base' + }, + title: { + type: String, + default: '' + }, + content: { + type: String, + default: '' + }, + beforeClose: { + type: Boolean, + default: false + }, + cancelText:{ + type: String, + default: '' + }, + confirmText:{ + type: String, + default: '' + } + }, + data() { + return { + dialogType: 'error', + focus: false, + val: "" + } + }, + computed: { + okText() { + return this.confirmText || t("uni-popup.ok") + }, + closeText() { + return this.cancelText || t("uni-popup.cancel") + }, + placeholderText() { + return this.placeholder || t("uni-popup.placeholder") + }, + titleText() { + return this.title || t("uni-popup.title") + } + }, + watch: { + type(val) { + this.dialogType = val + }, + mode(val) { + if (val === 'input') { + this.dialogType = 'info' + } + }, + value(val) { + this.val = val + } + }, + created() { + // 瀵硅瘽妗嗛伄缃╀笉鍙偣鍑� + this.popup.disableMask() + // this.popup.closeMask() + if (this.mode === 'input') { + this.dialogType = 'info' + this.val = this.value + } else { + this.dialogType = this.type + } + }, + mounted() { + this.focus = true + }, + methods: { + /** + * 鐐瑰嚮纭鎸夐挳 + */ + onOk() { + if (this.mode === 'input'){ + this.$emit('confirm', this.val) + }else{ + this.$emit('confirm') + } + if(this.beforeClose) return + this.popup.close() + }, + /** + * 鐐瑰嚮鍙栨秷鎸夐挳 + */ + closeDialog() { + this.$emit('close') + if(this.beforeClose) return + this.popup.close() + }, + close(){ + this.popup.close() + } + } + } +</script> + +<style lang="scss" > + .uni-popup-dialog { + width: 300px; + border-radius: 11px; + background-color: #fff; + } + + .uni-dialog-title { + /* #ifndef APP-NVUE */ + display: flex; + /* #endif */ + flex-direction: row; + justify-content: center; + padding-top: 25px; + } + + .uni-dialog-title-text { + font-size: 16px; + font-weight: 500; + } + + .uni-dialog-content { + /* #ifndef APP-NVUE */ + display: flex; + /* #endif */ + flex-direction: row; + justify-content: center; + align-items: center; + padding: 20px; + } + + .uni-dialog-content-text { + font-size: 14px; + color: #6C6C6C; + } + + .uni-dialog-button-group { + /* #ifndef APP-NVUE */ + display: flex; + /* #endif */ + flex-direction: row; + border-top-color: #f5f5f5; + border-top-style: solid; + border-top-width: 1px; + } + + .uni-dialog-button { + /* #ifndef APP-NVUE */ + display: flex; + /* #endif */ + + flex: 1; + flex-direction: row; + justify-content: center; + align-items: center; + height: 45px; + } + + .uni-border-left { + border-left-color: #f0f0f0; + border-left-style: solid; + border-left-width: 1px; + } + + .uni-dialog-button-text { + font-size: 16px; + color: #333; + } + + .uni-button-color { + color: #007aff; + } + + .uni-dialog-input { + flex: 1; + font-size: 14px; + border: 1px #eee solid; + height: 40px; + padding: 0 10px; + border-radius: 5px; + color: #555; + } + + .uni-popup__success { + color: #4cd964; + } + + .uni-popup__warn { + color: #f0ad4e; + } + + .uni-popup__error { + color: #dd524d; + } + + .uni-popup__info { + color: #909399; + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-popup/components/uni-popup-message/uni-popup-message.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-popup/components/uni-popup-message/uni-popup-message.vue" new file mode 100644 index 0000000..91370a8 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-popup/components/uni-popup-message/uni-popup-message.vue" @@ -0,0 +1,143 @@ +<template> + <view class="uni-popup-message"> + <view class="uni-popup-message__box fixforpc-width" :class="'uni-popup__'+type"> + <slot> + <text class="uni-popup-message-text" :class="'uni-popup__'+type+'-text'">{{message}}</text> + </slot> + </view> + </view> +</template> + +<script> + import popup from '../uni-popup/popup.js' + /** + * PopUp 寮瑰嚭灞�-娑堟伅鎻愮ず + * @description 寮瑰嚭灞�-娑堟伅鎻愮ず + * @tutorial https://ext.dcloud.net.cn/plugin?id=329 + * @property {String} type = [success|warning|info|error] 涓婚鏍峰紡 + * @value success 鎴愬姛 + * @value warning 鎻愮ず + * @value info 娑堟伅 + * @value error 閿欒 + * @property {String} message 娑堟伅鎻愮ず鏂囧瓧 + * @property {String} duration 鏄剧ず鏃堕棿锛岃缃负 0 鍒欎笉浼氳嚜鍔ㄥ叧闂� + */ + + export default { + name: 'uniPopupMessage', + mixins:[popup], + props: { + /** + * 涓婚 success/warning/info/error 榛樿 success + */ + type: { + type: String, + default: 'success' + }, + /** + * 娑堟伅鏂囧瓧 + */ + message: { + type: String, + default: '' + }, + /** + * 鏄剧ず鏃堕棿锛岃缃负 0 鍒欎笉浼氳嚜鍔ㄥ叧闂� + */ + duration: { + type: Number, + default: 3000 + }, + maskShow:{ + type:Boolean, + default:false + } + }, + data() { + return {} + }, + created() { + this.popup.maskShow = this.maskShow + this.popup.messageChild = this + }, + methods: { + timerClose(){ + if(this.duration === 0) return + clearTimeout(this.timer) + this.timer = setTimeout(()=>{ + this.popup.close() + },this.duration) + } + } + } +</script> +<style lang="scss" > + .uni-popup-message { + /* #ifndef APP-NVUE */ + display: flex; + /* #endif */ + flex-direction: row; + justify-content: center; + } + + .uni-popup-message__box { + background-color: #e1f3d8; + padding: 10px 15px; + border-color: #eee; + border-style: solid; + border-width: 1px; + flex: 1; + } + + @media screen and (min-width: 500px) { + .fixforpc-width { + margin-top: 20px; + border-radius: 4px; + flex: none; + min-width: 380px; + /* #ifndef APP-NVUE */ + max-width: 50%; + /* #endif */ + /* #ifdef APP-NVUE */ + max-width: 500px; + /* #endif */ + } + } + + .uni-popup-message-text { + font-size: 14px; + padding: 0; + } + + .uni-popup__success { + background-color: #e1f3d8; + } + + .uni-popup__success-text { + color: #67C23A; + } + + .uni-popup__warn { + background-color: #faecd8; + } + + .uni-popup__warn-text { + color: #E6A23C; + } + + .uni-popup__error { + background-color: #fde2e2; + } + + .uni-popup__error-text { + color: #F56C6C; + } + + .uni-popup__info { + background-color: #F2F6FC; + } + + .uni-popup__info-text { + color: #909399; + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-popup/components/uni-popup-share/uni-popup-share.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-popup/components/uni-popup-share/uni-popup-share.vue" new file mode 100644 index 0000000..5be7624 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-popup/components/uni-popup-share/uni-popup-share.vue" @@ -0,0 +1,187 @@ +<template> + <view class="uni-popup-share"> + <view class="uni-share-title"><text class="uni-share-title-text">{{shareTitleText}}</text></view> + <view class="uni-share-content"> + <view class="uni-share-content-box"> + <view class="uni-share-content-item" v-for="(item,index) in bottomData" :key="index" @click.stop="select(item,index)"> + <image class="uni-share-image" :src="item.icon" mode="aspectFill"></image> + <text class="uni-share-text">{{item.text}}</text> + </view> + + </view> + </view> + <view class="uni-share-button-box"> + <button class="uni-share-button" @click="close">{{cancelText}}</button> + </view> + </view> +</template> + +<script> + import popup from '../uni-popup/popup.js' + import { + initVueI18n + } from '@dcloudio/uni-i18n' + import messages from '../uni-popup/i18n/index.js' + const { t } = initVueI18n(messages) + export default { + name: 'UniPopupShare', + mixins:[popup], + emits:['select'], + props: { + title: { + type: String, + default: '' + }, + beforeClose: { + type: Boolean, + default: false + } + }, + data() { + return { + bottomData: [{ + text: '寰俊', + icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/c2b17470-50be-11eb-b680-7980c8a877b8.png', + name: 'wx' + }, + { + text: '鏀粯瀹�', + icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/d684ae40-50be-11eb-8ff1-d5dcf8779628.png', + name: 'wx' + }, + { + text: 'QQ', + icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/e7a79520-50be-11eb-b997-9918a5dda011.png', + name: 'qq' + }, + { + text: '鏂版氮', + icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/0dacdbe0-50bf-11eb-8ff1-d5dcf8779628.png', + name: 'sina' + }, + // { + // text: '鐧惧害', + // icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/1ec6e920-50bf-11eb-8a36-ebb87efcf8c0.png', + // name: 'copy' + // }, + // { + // text: '鍏朵粬', + // icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/2e0fdfe0-50bf-11eb-b997-9918a5dda011.png', + // name: 'more' + // } + ] + } + }, + created() {}, + computed: { + cancelText() { + return t("uni-popup.cancel") + }, + shareTitleText() { + return this.title || t("uni-popup.shareTitle") + } + }, + methods: { + /** + * 閫夋嫨鍐呭 + */ + select(item, index) { + this.$emit('select', { + item, + index + }) + this.close() + + }, + /** + * 鍏抽棴绐楀彛 + */ + close() { + if(this.beforeClose) return + this.popup.close() + } + } + } +</script> +<style lang="scss" > + .uni-popup-share { + background-color: #fff; + border-top-left-radius: 11px; + border-top-right-radius: 11px; + } + .uni-share-title { + /* #ifndef APP-NVUE */ + display: flex; + /* #endif */ + flex-direction: row; + align-items: center; + justify-content: center; + height: 40px; + } + .uni-share-title-text { + font-size: 14px; + color: #666; + } + .uni-share-content { + /* #ifndef APP-NVUE */ + display: flex; + /* #endif */ + flex-direction: row; + justify-content: center; + padding-top: 10px; + } + + .uni-share-content-box { + /* #ifndef APP-NVUE */ + display: flex; + /* #endif */ + flex-direction: row; + flex-wrap: wrap; + width: 360px; + } + + .uni-share-content-item { + width: 90px; + /* #ifndef APP-NVUE */ + display: flex; + /* #endif */ + flex-direction: column; + justify-content: center; + padding: 10px 0; + align-items: center; + } + + .uni-share-content-item:active { + background-color: #f5f5f5; + } + + .uni-share-image { + width: 30px; + height: 30px; + } + + .uni-share-text { + margin-top: 10px; + font-size: 14px; + color: #3B4144; + } + + .uni-share-button-box { + /* #ifndef APP-NVUE */ + display: flex; + /* #endif */ + flex-direction: row; + padding: 10px 15px; + } + + .uni-share-button { + flex: 1; + border-radius: 50px; + color: #666; + font-size: 16px; + } + + .uni-share-button::after { + border-radius: 50px; + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-popup/components/uni-popup/i18n/en.json" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-popup/components/uni-popup/i18n/en.json" new file mode 100644 index 0000000..7f1bd06 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-popup/components/uni-popup/i18n/en.json" @@ -0,0 +1,7 @@ +{ + "uni-popup.cancel": "cancel", + "uni-popup.ok": "ok", + "uni-popup.placeholder": "pleace enter", + "uni-popup.title": "Hint", + "uni-popup.shareTitle": "Share to" +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-popup/components/uni-popup/i18n/index.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-popup/components/uni-popup/i18n/index.js" new file mode 100644 index 0000000..de7509c --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-popup/components/uni-popup/i18n/index.js" @@ -0,0 +1,8 @@ +import en from './en.json' +import zhHans from './zh-Hans.json' +import zhHant from './zh-Hant.json' +export default { + en, + 'zh-Hans': zhHans, + 'zh-Hant': zhHant +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-popup/components/uni-popup/i18n/zh-Hans.json" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-popup/components/uni-popup/i18n/zh-Hans.json" new file mode 100644 index 0000000..5e3003c --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-popup/components/uni-popup/i18n/zh-Hans.json" @@ -0,0 +1,7 @@ +{ + "uni-popup.cancel": "鍙栨秷", + "uni-popup.ok": "纭畾", + "uni-popup.placeholder": "璇疯緭鍏�", + "uni-popup.title": "鎻愮ず", + "uni-popup.shareTitle": "鍒嗕韩鍒�" +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-popup/components/uni-popup/i18n/zh-Hant.json" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-popup/components/uni-popup/i18n/zh-Hant.json" new file mode 100644 index 0000000..13e39eb --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-popup/components/uni-popup/i18n/zh-Hant.json" @@ -0,0 +1,7 @@ +{ + "uni-popup.cancel": "鍙栨秷", + "uni-popup.ok": "纰哄畾", + "uni-popup.placeholder": "璜嬭几鍏�", + "uni-popup.title": "鎻愮ず", + "uni-popup.shareTitle": "鍒嗕韩鍒�" +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-popup/components/uni-popup/keypress.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-popup/components/uni-popup/keypress.js" new file mode 100644 index 0000000..62dda46 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-popup/components/uni-popup/keypress.js" @@ -0,0 +1,45 @@ +// #ifdef H5 +export default { + name: 'Keypress', + props: { + disable: { + type: Boolean, + default: false + } + }, + mounted () { + const keyNames = { + esc: ['Esc', 'Escape'], + tab: 'Tab', + enter: 'Enter', + space: [' ', 'Spacebar'], + up: ['Up', 'ArrowUp'], + left: ['Left', 'ArrowLeft'], + right: ['Right', 'ArrowRight'], + down: ['Down', 'ArrowDown'], + delete: ['Backspace', 'Delete', 'Del'] + } + const listener = ($event) => { + if (this.disable) { + return + } + const keyName = Object.keys(keyNames).find(key => { + const keyName = $event.key + const value = keyNames[key] + return value === keyName || (Array.isArray(value) && value.includes(keyName)) + }) + if (keyName) { + // 閬垮厤鍜屽叾浠栨寜閿簨浠跺啿绐� + setTimeout(() => { + this.$emit(keyName, {}) + }, 0) + } + } + document.addEventListener('keyup', listener) + // this.$once('hook:beforeDestroy', () => { + // document.removeEventListener('keyup', listener) + // }) + }, + render: () => {} +} +// #endif diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-popup/components/uni-popup/popup.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-popup/components/uni-popup/popup.js" new file mode 100644 index 0000000..c4e5781 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-popup/components/uni-popup/popup.js" @@ -0,0 +1,26 @@ + +export default { + data() { + return { + + } + }, + created(){ + this.popup = this.getParent() + }, + methods:{ + /** + * 鑾峰彇鐖跺厓绱犲疄渚� + */ + getParent(name = 'uniPopup') { + let parent = this.$parent; + let parentName = parent.$options.name; + while (parentName !== name) { + parent = parent.$parent; + if (!parent) return false + parentName = parent.$options.name; + } + return parent; + }, + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-popup/components/uni-popup/uni-popup.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-popup/components/uni-popup/uni-popup.vue" new file mode 100644 index 0000000..54afee2 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-popup/components/uni-popup/uni-popup.vue" @@ -0,0 +1,473 @@ +<template> + <view v-if="showPopup" class="uni-popup" :class="[popupstyle, isDesktop ? 'fixforpc-z-index' : '']"> + <view @touchstart="touchstart"> + <uni-transition key="1" v-if="maskShow" name="mask" mode-class="fade" :styles="maskClass" + :duration="duration" :show="showTrans" @click="onTap" /> + <uni-transition key="2" :mode-class="ani" name="content" :styles="transClass" :duration="duration" + :show="showTrans" @click="onTap"> + <view class="uni-popup__wrapper" :style="{ backgroundColor: bg }" :class="[popupstyle]" @click="clear"> + <slot /> + </view> + </uni-transition> + </view> + <!-- #ifdef H5 --> + <keypress v-if="maskShow" @esc="onTap" /> + <!-- #endif --> + </view> +</template> + +<script> + // #ifdef H5 + import keypress from './keypress.js' + // #endif + + /** + * PopUp 寮瑰嚭灞� + * @description 寮瑰嚭灞傜粍浠讹紝涓轰簡瑙e喅閬僵寮瑰眰鐨勯棶棰� + * @tutorial https://ext.dcloud.net.cn/plugin?id=329 + * @property {String} type = [top|center|bottom|left|right|message|dialog|share] 寮瑰嚭鏂瑰紡 + * @value top 椤堕儴寮瑰嚭 + * @value center 涓棿寮瑰嚭 + * @value bottom 搴曢儴寮瑰嚭 + * @value left 宸︿晶寮瑰嚭 + * @value right 鍙充晶寮瑰嚭 + * @value message 娑堟伅鎻愮ず + * @value dialog 瀵硅瘽妗� + * @value share 搴曢儴鍒嗕韩绀轰緥 + * @property {Boolean} animation = [true|false] 鏄惁寮�鍚姩鐢� + * @property {Boolean} maskClick = [true|false] 钂欑増鐐瑰嚮鏄惁鍏抽棴寮圭獥(搴熷純) + * @property {Boolean} isMaskClick = [true|false] 钂欑増鐐瑰嚮鏄惁鍏抽棴寮圭獥 + * @property {String} backgroundColor 涓荤獥鍙h儗鏅壊 + * @property {String} maskBackgroundColor 钂欑増棰滆壊 + * @property {Boolean} safeArea 鏄惁閫傞厤搴曢儴瀹夊叏鍖� + * @event {Function} change 鎵撳紑鍏抽棴寮圭獥瑙﹀彂锛宔={show: false} + * @event {Function} maskClick 鐐瑰嚮閬僵瑙﹀彂 + */ + + export default { + name: 'uniPopup', + components: { + // #ifdef H5 + keypress + // #endif + }, + emits: ['change', 'maskClick'], + props: { + // 寮�鍚姩鐢� + animation: { + type: Boolean, + default: true + }, + // 寮瑰嚭灞傜被鍨嬶紝鍙�夊�硷紝top: 椤堕儴寮瑰嚭灞傦紱bottom锛氬簳閮ㄥ脊鍑哄眰锛沜enter锛氬叏灞忓脊鍑哄眰 + // message: 娑堟伅鎻愮ず ; dialog : 瀵硅瘽妗� + type: { + type: String, + default: 'center' + }, + // maskClick + isMaskClick: { + type: Boolean, + default: null + }, + // TODO 2 涓増鏈悗搴熷純灞炴�� 锛屼娇鐢� isMaskClick + maskClick: { + type: Boolean, + default: null + }, + backgroundColor: { + type: String, + default: 'none' + }, + safeArea: { + type: Boolean, + default: true + }, + maskBackgroundColor: { + type: String, + default: 'rgba(0, 0, 0, 0.4)' + }, + }, + + watch: { + /** + * 鐩戝惉type绫诲瀷 + */ + type: { + handler: function(type) { + if (!this.config[type]) return + this[this.config[type]](true) + }, + immediate: true + }, + isDesktop: { + handler: function(newVal) { + if (!this.config[newVal]) return + this[this.config[this.type]](true) + }, + immediate: true + }, + /** + * 鐩戝惉閬僵鏄惁鍙偣鍑� + * @param {Object} val + */ + maskClick: { + handler: function(val) { + this.mkclick = val + }, + immediate: true + }, + isMaskClick: { + handler: function(val) { + this.mkclick = val + }, + immediate: true + }, + // H5 涓嬬姝㈠簳閮ㄦ粴鍔� + showPopup(show) { + // #ifdef H5 + // fix by mehaotian 澶勭悊 h5 婊氬姩绌块�忕殑闂 + document.getElementsByTagName('body')[0].style.overflow = show ? 'hidden' : 'visible' + // #endif + } + }, + data() { + return { + duration: 300, + ani: [], + showPopup: false, + showTrans: false, + popupWidth: 0, + popupHeight: 0, + config: { + top: 'top', + bottom: 'bottom', + center: 'center', + left: 'left', + right: 'right', + message: 'top', + dialog: 'center', + share: 'bottom' + }, + maskClass: { + position: 'fixed', + bottom: 0, + top: 0, + left: 0, + right: 0, + backgroundColor: 'rgba(0, 0, 0, 0.4)' + }, + transClass: { + position: 'fixed', + left: 0, + right: 0 + }, + maskShow: true, + mkclick: true, + popupstyle: this.isDesktop ? 'fixforpc-top' : 'top' + } + }, + computed: { + isDesktop() { + return this.popupWidth >= 500 && this.popupHeight >= 500 + }, + bg() { + if (this.backgroundColor === '' || this.backgroundColor === 'none') { + return 'transparent' + } + return this.backgroundColor + } + }, + mounted() { + const fixSize = () => { + const { + windowWidth, + windowHeight, + windowTop, + safeArea, + screenHeight, + safeAreaInsets + } = uni.getSystemInfoSync() + this.popupWidth = windowWidth + this.popupHeight = windowHeight + (windowTop || 0) + // TODO fix by mehaotian 鏄惁閫傞厤搴曢儴瀹夊叏鍖� ,鐩墠寰俊ios 銆佸拰 app ios 璁$畻鏈夊樊寮傦紝闇�瑕佹鏋朵慨澶� + if (safeArea && this.safeArea) { + // #ifdef MP-WEIXIN + this.safeAreaInsets = screenHeight - safeArea.bottom + // #endif + // #ifndef MP-WEIXIN + this.safeAreaInsets = safeAreaInsets.bottom + // #endif + } else { + this.safeAreaInsets = 0 + } + } + fixSize() + // #ifdef H5 + // window.addEventListener('resize', fixSize) + // this.$once('hook:beforeDestroy', () => { + // window.removeEventListener('resize', fixSize) + // }) + // #endif + }, + // #ifndef VUE3 + // TODO vue2 + destroyed() { + this.setH5Visible() + }, + // #endif + // #ifdef VUE3 + // TODO vue3 + unmounted() { + this.setH5Visible() + }, + // #endif + created() { + // this.mkclick = this.isMaskClick || this.maskClick + if (this.isMaskClick === null && this.maskClick === null) { + this.mkclick = true + } else { + this.mkclick = this.isMaskClick !== null ? this.isMaskClick : this.maskClick + } + if (this.animation) { + this.duration = 300 + } else { + this.duration = 0 + } + // TODO 澶勭悊 message 缁勪欢鐢熷懡鍛ㄦ湡寮傚父鐨勯棶棰� + this.messageChild = null + // TODO 瑙e喅澶存潯鍐掓场鐨勯棶棰� + this.clearPropagation = false + this.maskClass.backgroundColor = this.maskBackgroundColor + }, + methods: { + setH5Visible() { + // #ifdef H5 + // fix by mehaotian 澶勭悊 h5 婊氬姩绌块�忕殑闂 + document.getElementsByTagName('body')[0].style.overflow = 'visible' + // #endif + }, + /** + * 鍏敤鏂规硶锛屼笉鏄剧ず閬僵灞� + */ + closeMask() { + this.maskShow = false + }, + /** + * 鍏敤鏂规硶锛岄伄缃╁眰绂佹鐐瑰嚮 + */ + disableMask() { + this.mkclick = false + }, + // TODO nvue 鍙栨秷鍐掓场 + clear(e) { + // #ifndef APP-NVUE + e.stopPropagation() + // #endif + this.clearPropagation = true + }, + + open(direction) { + // fix by mehaotian 澶勭悊蹇�熸墦寮�鍏抽棴鐨勬儏鍐� + if (this.showPopup) { + return + } + let innerType = ['top', 'center', 'bottom', 'left', 'right', 'message', 'dialog', 'share'] + if (!(direction && innerType.indexOf(direction) !== -1)) { + direction = this.type + } + if (!this.config[direction]) { + console.error('缂哄皯绫诲瀷锛�', direction) + return + } + this[this.config[direction]]() + this.$emit('change', { + show: true, + type: direction + }) + }, + close(type) { + this.showTrans = false + this.$emit('change', { + show: false, + type: this.type + }) + clearTimeout(this.timer) + // // 鑷畾涔夊叧闂簨浠� + // this.customOpen && this.customClose() + this.timer = setTimeout(() => { + this.showPopup = false + }, 300) + }, + // TODO 澶勭悊鍐掓场浜嬩欢锛屽ご鏉$殑鍐掓场浜嬩欢鏈夐棶棰� 锛屽厛杩欐牱鍏煎 + touchstart() { + this.clearPropagation = false + }, + + onTap() { + if (this.clearPropagation) { + // fix by mehaotian 鍏煎 nvue + this.clearPropagation = false + return + } + this.$emit('maskClick') + if (!this.mkclick) return + this.close() + }, + /** + * 椤堕儴寮瑰嚭鏍峰紡澶勭悊 + */ + top(type) { + this.popupstyle = this.isDesktop ? 'fixforpc-top' : 'top' + this.ani = ['slide-top'] + this.transClass = { + position: 'fixed', + left: 0, + right: 0, + backgroundColor: this.bg + } + // TODO 鍏煎 type 灞炴�� 锛屽悗缁細搴熷純 + if (type) return + this.showPopup = true + this.showTrans = true + this.$nextTick(() => { + if (this.messageChild && this.type === 'message') { + this.messageChild.timerClose() + } + }) + }, + /** + * 搴曢儴寮瑰嚭鏍峰紡澶勭悊 + */ + bottom(type) { + this.popupstyle = 'bottom' + this.ani = ['slide-bottom'] + this.transClass = { + position: 'fixed', + left: 0, + right: 0, + bottom: 0, + paddingBottom: this.safeAreaInsets + 'px', + backgroundColor: this.bg + } + // TODO 鍏煎 type 灞炴�� 锛屽悗缁細搴熷純 + if (type) return + this.showPopup = true + this.showTrans = true + }, + /** + * 涓棿寮瑰嚭鏍峰紡澶勭悊 + */ + center(type) { + this.popupstyle = 'center' + this.ani = ['zoom-out', 'fade'] + this.transClass = { + position: 'fixed', + /* #ifndef APP-NVUE */ + display: 'flex', + flexDirection: 'column', + /* #endif */ + bottom: 0, + left: 0, + right: 0, + top: 0, + justifyContent: 'center', + alignItems: 'center' + } + // TODO 鍏煎 type 灞炴�� 锛屽悗缁細搴熷純 + if (type) return + this.showPopup = true + this.showTrans = true + }, + left(type) { + this.popupstyle = 'left' + this.ani = ['slide-left'] + this.transClass = { + position: 'fixed', + left: 0, + bottom: 0, + top: 0, + backgroundColor: this.bg, + /* #ifndef APP-NVUE */ + display: 'flex', + flexDirection: 'column' + /* #endif */ + } + // TODO 鍏煎 type 灞炴�� 锛屽悗缁細搴熷純 + if (type) return + this.showPopup = true + this.showTrans = true + }, + right(type) { + this.popupstyle = 'right' + this.ani = ['slide-right'] + this.transClass = { + position: 'fixed', + bottom: 0, + right: 0, + top: 0, + backgroundColor: this.bg, + /* #ifndef APP-NVUE */ + display: 'flex', + flexDirection: 'column' + /* #endif */ + } + // TODO 鍏煎 type 灞炴�� 锛屽悗缁細搴熷純 + if (type) return + this.showPopup = true + this.showTrans = true + } + } + } +</script> +<style lang="scss"> + .uni-popup { + position: fixed; + /* #ifndef APP-NVUE */ + z-index: 99; + + /* #endif */ + &.top, + &.left, + &.right { + /* #ifdef H5 */ + top: var(--window-top); + /* #endif */ + /* #ifndef H5 */ + top: 0; + /* #endif */ + } + + .uni-popup__wrapper { + /* #ifndef APP-NVUE */ + display: block; + /* #endif */ + position: relative; + + /* iphonex 绛夊畨鍏ㄥ尯璁剧疆锛屽簳閮ㄥ畨鍏ㄥ尯閫傞厤 */ + /* #ifndef APP-NVUE */ + // padding-bottom: constant(safe-area-inset-bottom); + // padding-bottom: env(safe-area-inset-bottom); + /* #endif */ + &.left, + &.right { + /* #ifdef H5 */ + padding-top: var(--window-top); + /* #endif */ + /* #ifndef H5 */ + padding-top: 0; + /* #endif */ + flex: 1; + } + } + } + + .fixforpc-z-index { + /* #ifndef APP-NVUE */ + z-index: 999; + /* #endif */ + } + + .fixforpc-top { + top: 0; + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-popup/package.json" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-popup/package.json" new file mode 100644 index 0000000..f40556b --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-popup/package.json" @@ -0,0 +1,87 @@ +{ + "id": "uni-popup", + "displayName": "uni-popup 寮瑰嚭灞�", + "version": "1.8.3", + "description": " Popup 缁勪欢锛屾彁渚涘父鐢ㄧ殑寮瑰眰", + "keywords": [ + "uni-ui", + "寮瑰嚭灞�", + "寮圭獥", + "popup", + "寮规" + ], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "" + }, + "directories": { + "example": "../../temps/example_temps" + }, + "dcloudext": { + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "鏃�", + "data": "鏃�", + "permissions": "鏃�" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui", + "type": "component-vue" + }, + "uni_modules": { + "dependencies": [ + "uni-scss", + "uni-transition" + ], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "寰俊娴忚鍣�(Android)": "y", + "QQ娴忚鍣�(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "灏忕▼搴�": { + "寰俊": "y", + "闃块噷": "y", + "鐧惧害": "y", + "瀛楄妭璺冲姩": "y", + "QQ": "y" + }, + "蹇簲鐢�": { + "鍗庝负": "u", + "鑱旂洘": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-popup/readme.md" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-popup/readme.md" new file mode 100644 index 0000000..fdad4b3 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-popup/readme.md" @@ -0,0 +1,17 @@ + + +## Popup 寮瑰嚭灞� +> **缁勪欢鍚嶏細uni-popup** +> 浠g爜鍧楋細 `uPopup` +> 鍏宠仈缁勪欢锛歚uni-transition` + + +寮瑰嚭灞傜粍浠讹紝鍦ㄥ簲鐢ㄤ腑寮瑰嚭涓�涓秷鎭彁绀虹獥鍙c�佹彁绀烘绛� + +### [鏌ョ湅鏂囨。](https://uniapp.dcloud.io/component/uniui/uni-popup) +#### 濡備娇鐢ㄨ繃绋嬩腑鏈変换浣曢棶棰橈紝鎴栬�呮偍瀵箄ni-ui鏈変竴浜涘ソ鐨勫缓璁紝娆㈣繋鍔犲叆 uni-ui 浜ゆ祦缇わ細871950839 + + + + + diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-scss/changelog.md" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-scss/changelog.md" new file mode 100644 index 0000000..b863bb0 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-scss/changelog.md" @@ -0,0 +1,8 @@ +## 1.0.3锛�2022-01-21锛� +- 浼樺寲 缁勪欢绀轰緥 +## 1.0.2锛�2021-11-22锛� +- 淇 / 绗﹀彿鍦� vue 涓嶅悓鐗堟湰鍏煎闂寮曡捣鐨勬姤閿欓棶棰� +## 1.0.1锛�2021-11-22锛� +- 淇 vue3涓璼css璇硶鍏煎闂 +## 1.0.0锛�2021-11-18锛� +- init diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-scss/index.scss" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-scss/index.scss" new file mode 100644 index 0000000..1744a5f --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-scss/index.scss" @@ -0,0 +1 @@ +@import './styles/index.scss'; diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-scss/package.json" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-scss/package.json" new file mode 100644 index 0000000..7cc0ccb --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-scss/package.json" @@ -0,0 +1,82 @@ +{ + "id": "uni-scss", + "displayName": "uni-scss 杈呭姪鏍峰紡", + "version": "1.0.3", + "description": "uni-sass鏄痷ni-ui鎻愪緵鐨勪竴濂楀叏灞�鏍峰紡 锛岄�氳繃涓�浜涚畝鍗曠殑绫诲悕鍜宻ass鍙橀噺锛屽疄鐜扮畝鍗曠殑椤甸潰甯冨眬鎿嶄綔锛屾瘮濡傞鑹层�佽竟璺濄�佸渾瑙掔瓑銆�", + "keywords": [ + "uni-scss", + "uni-ui", + "杈呭姪鏍峰紡" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "^3.1.0" + }, + "dcloudext": { + "category": [ + "JS SDK", + "閫氱敤 SDK" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "鏃�", + "data": "鏃�", + "permissions": "鏃�" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" + }, + "uni_modules": { + "dependencies": [], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "u" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "寰俊娴忚鍣�(Android)": "y", + "QQ娴忚鍣�(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "灏忕▼搴�": { + "寰俊": "y", + "闃块噷": "y", + "鐧惧害": "y", + "瀛楄妭璺冲姩": "y", + "QQ": "y" + }, + "蹇簲鐢�": { + "鍗庝负": "n", + "鑱旂洘": "n" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-scss/readme.md" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-scss/readme.md" new file mode 100644 index 0000000..b7d1c25 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-scss/readme.md" @@ -0,0 +1,4 @@ +`uni-sass` 鏄� `uni-ui`鎻愪緵鐨勪竴濂楀叏灞�鏍峰紡 锛岄�氳繃涓�浜涚畝鍗曠殑绫诲悕鍜宍sass`鍙橀噺锛屽疄鐜扮畝鍗曠殑椤甸潰甯冨眬鎿嶄綔锛屾瘮濡傞鑹层�佽竟璺濄�佸渾瑙掔瓑銆� + +### [鏌ョ湅鏂囨。](https://uniapp.dcloud.io/component/uniui/uni-sass) +#### 濡備娇鐢ㄨ繃绋嬩腑鏈変换浣曢棶棰橈紝鎴栬�呮偍瀵箄ni-ui鏈変竴浜涘ソ鐨勫缓璁紝娆㈣繋鍔犲叆 uni-ui 浜ゆ祦缇わ細871950839 \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-scss/styles/index.scss" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-scss/styles/index.scss" new file mode 100644 index 0000000..ffac4fe --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-scss/styles/index.scss" @@ -0,0 +1,7 @@ +@import './setting/_variables.scss'; +@import './setting/_border.scss'; +@import './setting/_color.scss'; +@import './setting/_space.scss'; +@import './setting/_radius.scss'; +@import './setting/_text.scss'; +@import './setting/_styles.scss'; diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-scss/styles/setting/_border.scss" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-scss/styles/setting/_border.scss" new file mode 100644 index 0000000..12a11c3 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-scss/styles/setting/_border.scss" @@ -0,0 +1,3 @@ +.uni-border { + border: 1px $uni-border-1 solid; +} \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-scss/styles/setting/_color.scss" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-scss/styles/setting/_color.scss" new file mode 100644 index 0000000..1ededd9 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-scss/styles/setting/_color.scss" @@ -0,0 +1,66 @@ + +// TODO 鏆傛椂涓嶉渶瑕� class 锛岄渶瑕佺敤鎴蜂娇鐢ㄥ彉閲忓疄鐜� 锛屽鏋滀娇鐢ㄧ被鍚嶅叾瀹炲苟涓嶆帹鑽� +// @mixin get-styles($k,$c) { +// @if $k == size or $k == weight{ +// font-#{$k}:#{$c} +// }@else{ +// #{$k}:#{$c} +// } +// } +$uni-ui-color:( + // 涓昏壊 + primary: $uni-primary, + primary-disable: $uni-primary-disable, + primary-light: $uni-primary-light, + // 杈呭姪鑹� + success: $uni-success, + success-disable: $uni-success-disable, + success-light: $uni-success-light, + warning: $uni-warning, + warning-disable: $uni-warning-disable, + warning-light: $uni-warning-light, + error: $uni-error, + error-disable: $uni-error-disable, + error-light: $uni-error-light, + info: $uni-info, + info-disable: $uni-info-disable, + info-light: $uni-info-light, + // 涓�ц壊 + main-color: $uni-main-color, + base-color: $uni-base-color, + secondary-color: $uni-secondary-color, + extra-color: $uni-extra-color, + // 鑳屾櫙鑹� + bg-color: $uni-bg-color, + // 杈规棰滆壊 + border-1: $uni-border-1, + border-2: $uni-border-2, + border-3: $uni-border-3, + border-4: $uni-border-4, + // 榛戣壊 + black:$uni-black, + // 鐧借壊 + white:$uni-white, + // 閫忔槑 + transparent:$uni-transparent +) !default; +@each $key, $child in $uni-ui-color { + .uni-#{"" + $key} { + color: $child; + } + .uni-#{"" + $key}-bg { + background-color: $child; + } +} +.uni-shadow-sm { + box-shadow: $uni-shadow-sm; +} +.uni-shadow-base { + box-shadow: $uni-shadow-base; +} +.uni-shadow-lg { + box-shadow: $uni-shadow-lg; +} +.uni-mask { + background-color:$uni-mask; +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-scss/styles/setting/_radius.scss" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-scss/styles/setting/_radius.scss" new file mode 100644 index 0000000..9a0428b --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-scss/styles/setting/_radius.scss" @@ -0,0 +1,55 @@ +@mixin radius($r,$d:null ,$important: false){ + $radius-value:map-get($uni-radius, $r) if($important, !important, null); + // Key exists within the $uni-radius variable + @if (map-has-key($uni-radius, $r) and $d){ + @if $d == t { + border-top-left-radius:$radius-value; + border-top-right-radius:$radius-value; + }@else if $d == r { + border-top-right-radius:$radius-value; + border-bottom-right-radius:$radius-value; + }@else if $d == b { + border-bottom-left-radius:$radius-value; + border-bottom-right-radius:$radius-value; + }@else if $d == l { + border-top-left-radius:$radius-value; + border-bottom-left-radius:$radius-value; + }@else if $d == tl { + border-top-left-radius:$radius-value; + }@else if $d == tr { + border-top-right-radius:$radius-value; + }@else if $d == br { + border-bottom-right-radius:$radius-value; + }@else if $d == bl { + border-bottom-left-radius:$radius-value; + } + }@else{ + border-radius:$radius-value; + } +} + +@each $key, $child in $uni-radius { + @if($key){ + .uni-radius-#{"" + $key} { + @include radius($key) + } + }@else{ + .uni-radius { + @include radius($key) + } + } +} + +@each $direction in t, r, b, l,tl, tr, br, bl { + @each $key, $child in $uni-radius { + @if($key){ + .uni-radius-#{"" + $direction}-#{"" + $key} { + @include radius($key,$direction,false) + } + }@else{ + .uni-radius-#{$direction} { + @include radius($key,$direction,false) + } + } + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-scss/styles/setting/_space.scss" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-scss/styles/setting/_space.scss" new file mode 100644 index 0000000..3c89528 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-scss/styles/setting/_space.scss" @@ -0,0 +1,56 @@ + +@mixin fn($space,$direction,$size,$n) { + @if $n { + #{$space}-#{$direction}: #{$size*$uni-space-root}px + } @else { + #{$space}-#{$direction}: #{-$size*$uni-space-root}px + } +} +@mixin get-styles($direction,$i,$space,$n){ + @if $direction == t { + @include fn($space, top,$i,$n); + } + @if $direction == r { + @include fn($space, right,$i,$n); + } + @if $direction == b { + @include fn($space, bottom,$i,$n); + } + @if $direction == l { + @include fn($space, left,$i,$n); + } + @if $direction == x { + @include fn($space, left,$i,$n); + @include fn($space, right,$i,$n); + } + @if $direction == y { + @include fn($space, top,$i,$n); + @include fn($space, bottom,$i,$n); + } + @if $direction == a { + @if $n { + #{$space}:#{$i*$uni-space-root}px; + } @else { + #{$space}:#{-$i*$uni-space-root}px; + } + } +} + +@each $orientation in m,p { + $space: margin; + @if $orientation == m { + $space: margin; + } @else { + $space: padding; + } + @for $i from 0 through 16 { + @each $direction in t, r, b, l, x, y, a { + .uni-#{$orientation}#{$direction}-#{$i} { + @include get-styles($direction,$i,$space,true); + } + .uni-#{$orientation}#{$direction}-n#{$i} { + @include get-styles($direction,$i,$space,false); + } + } + } +} \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-scss/styles/setting/_styles.scss" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-scss/styles/setting/_styles.scss" new file mode 100644 index 0000000..689afec --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-scss/styles/setting/_styles.scss" @@ -0,0 +1,167 @@ +/* #ifndef APP-NVUE */ + +$-color-white:#fff; +$-color-black:#000; +@mixin base-style($color) { + color: #fff; + background-color: $color; + border-color: mix($-color-black, $color, 8%); + &:not([hover-class]):active { + background: mix($-color-black, $color, 10%); + border-color: mix($-color-black, $color, 20%); + color: $-color-white; + outline: none; + } +} +@mixin is-color($color) { + @include base-style($color); + &[loading] { + @include base-style($color); + &::before { + margin-right:5px; + } + } + &[disabled] { + &, + &[loading], + &:not([hover-class]):active { + color: $-color-white; + border-color: mix(darken($color,10%), $-color-white); + background-color: mix($color, $-color-white); + } + } + +} +@mixin base-plain-style($color) { + color:$color; + background-color: mix($-color-white, $color, 90%); + border-color: mix($-color-white, $color, 70%); + &:not([hover-class]):active { + background: mix($-color-white, $color, 80%); + color: $color; + outline: none; + border-color: mix($-color-white, $color, 50%); + } +} +@mixin is-plain($color){ + &[plain] { + @include base-plain-style($color); + &[loading] { + @include base-plain-style($color); + &::before { + margin-right:5px; + } + } + &[disabled] { + &, + &:active { + color: mix($-color-white, $color, 40%); + background-color: mix($-color-white, $color, 90%); + border-color: mix($-color-white, $color, 80%); + } + } + } +} + + +.uni-btn { + margin: 5px; + color: #393939; + border:1px solid #ccc; + font-size: 16px; + font-weight: 200; + background-color: #F9F9F9; + // TODO 鏆傛椂澶勭悊杈规闅愯棌涓�杈圭殑闂 + overflow: visible; + &::after{ + border: none; + } + + &:not([type]),&[type=default] { + color: #999; + &[loading] { + background: none; + &::before { + margin-right:5px; + } + } + + + + &[disabled]{ + color: mix($-color-white, #999, 60%); + &, + &[loading], + &:active { + color: mix($-color-white, #999, 60%); + background-color: mix($-color-white,$-color-black , 98%); + border-color: mix($-color-white, #999, 85%); + } + } + + &[plain] { + color: #999; + background: none; + border-color: $uni-border-1; + &:not([hover-class]):active { + background: none; + color: mix($-color-white, $-color-black, 80%); + border-color: mix($-color-white, $-color-black, 90%); + outline: none; + } + &[disabled]{ + &, + &[loading], + &:active { + background: none; + color: mix($-color-white, #999, 60%); + border-color: mix($-color-white, #999, 85%); + } + } + } + } + + &:not([hover-class]):active { + color: mix($-color-white, $-color-black, 50%); + } + + &[size=mini] { + font-size: 16px; + font-weight: 200; + border-radius: 8px; + } + + + + &.uni-btn-small { + font-size: 14px; + } + &.uni-btn-mini { + font-size: 12px; + } + + &.uni-btn-radius { + border-radius: 999px; + } + &[type=primary] { + @include is-color($uni-primary); + @include is-plain($uni-primary) + } + &[type=success] { + @include is-color($uni-success); + @include is-plain($uni-success) + } + &[type=error] { + @include is-color($uni-error); + @include is-plain($uni-error) + } + &[type=warning] { + @include is-color($uni-warning); + @include is-plain($uni-warning) + } + &[type=info] { + @include is-color($uni-info); + @include is-plain($uni-info) + } +} +/* #endif */ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-scss/styles/setting/_text.scss" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-scss/styles/setting/_text.scss" new file mode 100644 index 0000000..a34d08f --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-scss/styles/setting/_text.scss" @@ -0,0 +1,24 @@ +@mixin get-styles($k,$c) { + @if $k == size or $k == weight{ + font-#{$k}:#{$c} + }@else{ + #{$k}:#{$c} + } +} + +@each $key, $child in $uni-headings { + /* #ifndef APP-NVUE */ + .uni-#{$key} { + @each $k, $c in $child { + @include get-styles($k,$c) + } + } + /* #endif */ + /* #ifdef APP-NVUE */ + .container .uni-#{$key} { + @each $k, $c in $child { + @include get-styles($k,$c) + } + } + /* #endif */ +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-scss/styles/setting/_variables.scss" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-scss/styles/setting/_variables.scss" new file mode 100644 index 0000000..557d3d7 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-scss/styles/setting/_variables.scss" @@ -0,0 +1,146 @@ +// @use "sass:math"; +@import '../tools/functions.scss'; +// 闂磋窛鍩虹鍊嶆暟 +$uni-space-root: 2 !default; +// 杈规鍗婂緞榛樿鍊� +$uni-radius-root:5px !default; +$uni-radius: () !default; +// 杈规鍗婂緞鏂偣 +$uni-radius: map-deep-merge( + ( + 0: 0, + // TODO 褰撳墠鐗堟湰鏆傛椂涓嶆敮鎸� sm 灞炴�� + // 'sm': math.div($uni-radius-root, 2), + null: $uni-radius-root, + 'lg': $uni-radius-root * 2, + 'xl': $uni-radius-root * 6, + 'pill': 9999px, + 'circle': 50% + ), + $uni-radius +); +// 瀛椾綋瀹舵棌 +$body-font-family: 'Roboto', sans-serif !default; +// 鏂囨湰 +$heading-font-family: $body-font-family !default; +$uni-headings: () !default; +$letterSpacing: -0.01562em; +$uni-headings: map-deep-merge( + ( + 'h1': ( + size: 32px, + weight: 300, + line-height: 50px, + // letter-spacing:-0.01562em + ), + 'h2': ( + size: 28px, + weight: 300, + line-height: 40px, + // letter-spacing: -0.00833em + ), + 'h3': ( + size: 24px, + weight: 400, + line-height: 32px, + // letter-spacing: normal + ), + 'h4': ( + size: 20px, + weight: 400, + line-height: 30px, + // letter-spacing: 0.00735em + ), + 'h5': ( + size: 16px, + weight: 400, + line-height: 24px, + // letter-spacing: normal + ), + 'h6': ( + size: 14px, + weight: 500, + line-height: 18px, + // letter-spacing: 0.0125em + ), + 'subtitle': ( + size: 12px, + weight: 400, + line-height: 20px, + // letter-spacing: 0.00937em + ), + 'body': ( + font-size: 14px, + font-weight: 400, + line-height: 22px, + // letter-spacing: 0.03125em + ), + 'caption': ( + 'size': 12px, + 'weight': 400, + 'line-height': 20px, + // 'letter-spacing': 0.03333em, + // 'text-transform': false + ) + ), + $uni-headings +); + + + +// 涓昏壊 +$uni-primary: #2979ff !default; +$uni-primary-disable:lighten($uni-primary,20%) !default; +$uni-primary-light: lighten($uni-primary,25%) !default; + +// 杈呭姪鑹� +// 闄や簡涓昏壊澶栫殑鍦烘櫙鑹诧紝闇�瑕佸湪涓嶅悓鐨勫満鏅腑浣跨敤锛堜緥濡傚嵄闄╄壊琛ㄧず鍗遍櫓鐨勬搷浣滐級銆� +$uni-success: #18bc37 !default; +$uni-success-disable:lighten($uni-success,20%) !default; +$uni-success-light: lighten($uni-success,25%) !default; + +$uni-warning: #f3a73f !default; +$uni-warning-disable:lighten($uni-warning,20%) !default; +$uni-warning-light: lighten($uni-warning,25%) !default; + +$uni-error: #e43d33 !default; +$uni-error-disable:lighten($uni-error,20%) !default; +$uni-error-light: lighten($uni-error,25%) !default; + +$uni-info: #8f939c !default; +$uni-info-disable:lighten($uni-info,20%) !default; +$uni-info-light: lighten($uni-info,25%) !default; + +// 涓�ц壊 +// 涓�ц壊鐢ㄤ簬鏂囨湰銆佽儗鏅拰杈规棰滆壊銆傞�氳繃杩愮敤涓嶅悓鐨勪腑鎬ц壊锛屾潵琛ㄧ幇灞傛缁撴瀯銆� +$uni-main-color: #3a3a3a !default; // 涓昏鏂囧瓧 +$uni-base-color: #6a6a6a !default; // 甯歌鏂囧瓧 +$uni-secondary-color: #909399 !default; // 娆¤鏂囧瓧 +$uni-extra-color: #c7c7c7 !default; // 杈呭姪璇存槑 + +// 杈规棰滆壊 +$uni-border-1: #F0F0F0 !default; +$uni-border-2: #EDEDED !default; +$uni-border-3: #DCDCDC !default; +$uni-border-4: #B9B9B9 !default; + +// 甯歌鑹� +$uni-black: #000000 !default; +$uni-white: #ffffff !default; +$uni-transparent: rgba($color: #000000, $alpha: 0) !default; + +// 鑳屾櫙鑹� +$uni-bg-color: #f7f7f7 !default; + +/* 姘村钩闂磋窛 */ +$uni-spacing-sm: 8px !default; +$uni-spacing-base: 15px !default; +$uni-spacing-lg: 30px !default; + +// 闃村奖 +$uni-shadow-sm:0 0 5px rgba($color: #d8d8d8, $alpha: 0.5) !default; +$uni-shadow-base:0 1px 8px 1px rgba($color: #a5a5a5, $alpha: 0.2) !default; +$uni-shadow-lg:0px 1px 10px 2px rgba($color: #a5a4a4, $alpha: 0.5) !default; + +// 钂欑増 +$uni-mask: rgba($color: #000000, $alpha: 0.4) !default; diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-scss/styles/tools/functions.scss" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-scss/styles/tools/functions.scss" new file mode 100644 index 0000000..ac6f63e --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-scss/styles/tools/functions.scss" @@ -0,0 +1,19 @@ +// 鍚堝苟 map +@function map-deep-merge($parent-map, $child-map){ + $result: $parent-map; + @each $key, $child in $child-map { + $parent-has-key: map-has-key($result, $key); + $parent-value: map-get($result, $key); + $parent-type: type-of($parent-value); + $child-type: type-of($child); + $parent-is-map: $parent-type == map; + $child-is-map: $child-type == map; + + @if (not $parent-has-key) or ($parent-type != $child-type) or (not ($parent-is-map and $child-is-map)){ + $result: map-merge($result, ( $key: $child )); + }@else { + $result: map-merge($result, ( $key: map-deep-merge($parent-value, $child) )); + } + } + @return $result; +}; diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-scss/theme.scss" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-scss/theme.scss" new file mode 100644 index 0000000..80ee62f --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-scss/theme.scss" @@ -0,0 +1,31 @@ +// 闂磋窛鍩虹鍊嶆暟 +$uni-space-root: 2; +// 杈规鍗婂緞榛樿鍊� +$uni-radius-root:5px; +// 涓昏壊 +$uni-primary: #2979ff; +// 杈呭姪鑹� +$uni-success: #4cd964; +// 璀﹀憡鑹� +$uni-warning: #f0ad4e; +// 閿欒鑹� +$uni-error: #dd524d; +// 鎻忚堪鑹� +$uni-info: #909399; +// 涓�ц壊 +$uni-main-color: #303133; +$uni-base-color: #606266; +$uni-secondary-color: #909399; +$uni-extra-color: #C0C4CC; +// 鑳屾櫙鑹� +$uni-bg-color: #f5f5f5; +// 杈规棰滆壊 +$uni-border-1: #DCDFE6; +$uni-border-2: #E4E7ED; +$uni-border-3: #EBEEF5; +$uni-border-4: #F2F6FC; + +// 甯歌鑹� +$uni-black: #000000; +$uni-white: #ffffff; +$uni-transparent: rgba($color: #000000, $alpha: 0); diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-scss/variables.scss" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-scss/variables.scss" new file mode 100644 index 0000000..1c062d4 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-scss/variables.scss" @@ -0,0 +1,62 @@ +@import './styles/setting/_variables.scss'; +// 闂磋窛鍩虹鍊嶆暟 +$uni-space-root: 2; +// 杈规鍗婂緞榛樿鍊� +$uni-radius-root:5px; + +// 涓昏壊 +$uni-primary: #2979ff; +$uni-primary-disable:mix(#fff,$uni-primary,50%); +$uni-primary-light: mix(#fff,$uni-primary,80%); + +// 杈呭姪鑹� +// 闄や簡涓昏壊澶栫殑鍦烘櫙鑹诧紝闇�瑕佸湪涓嶅悓鐨勫満鏅腑浣跨敤锛堜緥濡傚嵄闄╄壊琛ㄧず鍗遍櫓鐨勬搷浣滐級銆� +$uni-success: #18bc37; +$uni-success-disable:mix(#fff,$uni-success,50%); +$uni-success-light: mix(#fff,$uni-success,80%); + +$uni-warning: #f3a73f; +$uni-warning-disable:mix(#fff,$uni-warning,50%); +$uni-warning-light: mix(#fff,$uni-warning,80%); + +$uni-error: #e43d33; +$uni-error-disable:mix(#fff,$uni-error,50%); +$uni-error-light: mix(#fff,$uni-error,80%); + +$uni-info: #8f939c; +$uni-info-disable:mix(#fff,$uni-info,50%); +$uni-info-light: mix(#fff,$uni-info,80%); + +// 涓�ц壊 +// 涓�ц壊鐢ㄤ簬鏂囨湰銆佽儗鏅拰杈规棰滆壊銆傞�氳繃杩愮敤涓嶅悓鐨勪腑鎬ц壊锛屾潵琛ㄧ幇灞傛缁撴瀯銆� +$uni-main-color: #3a3a3a; // 涓昏鏂囧瓧 +$uni-base-color: #6a6a6a; // 甯歌鏂囧瓧 +$uni-secondary-color: #909399; // 娆¤鏂囧瓧 +$uni-extra-color: #c7c7c7; // 杈呭姪璇存槑 + +// 杈规棰滆壊 +$uni-border-1: #F0F0F0; +$uni-border-2: #EDEDED; +$uni-border-3: #DCDCDC; +$uni-border-4: #B9B9B9; + +// 甯歌鑹� +$uni-black: #000000; +$uni-white: #ffffff; +$uni-transparent: rgba($color: #000000, $alpha: 0); + +// 鑳屾櫙鑹� +$uni-bg-color: #f7f7f7; + +/* 姘村钩闂磋窛 */ +$uni-spacing-sm: 8px; +$uni-spacing-base: 15px; +$uni-spacing-lg: 30px; + +// 闃村奖 +$uni-shadow-sm:0 0 5px rgba($color: #d8d8d8, $alpha: 0.5); +$uni-shadow-base:0 1px 8px 1px rgba($color: #a5a5a5, $alpha: 0.2); +$uni-shadow-lg:0px 1px 10px 2px rgba($color: #a5a4a4, $alpha: 0.5); + +// 钂欑増 +$uni-mask: rgba($color: #000000, $alpha: 0.4); diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-search-bar/changelog.md" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-search-bar/changelog.md" new file mode 100644 index 0000000..b41fdd3 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-search-bar/changelog.md" @@ -0,0 +1,33 @@ +## 1.2.3锛�2022-05-24锛� +- 鏂板 readonly 灞炴�э紝缁勪欢鍙 +## 1.2.2锛�2022-05-06锛� +- 淇 vue3 input 浜嬩欢涓嶇敓鏁堢殑bug +## 1.2.1锛�2022-05-06锛� +- 淇 澶氫綑浠g爜瀵艰嚧鐨刡ug +## 1.2.0锛�2021-11-19锛� +- 浼樺寲 缁勪欢UI锛屽苟鎻愪緵璁捐璧勬簮锛岃瑙�:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 鏂囨。杩佺Щ锛岃瑙�:[https://uniapp.dcloud.io/component/uniui/uni-search-bar](https://uniapp.dcloud.io/component/uniui/uni-search-bar) +## 1.1.2锛�2021-08-30锛� +- 淇 value 灞炴�т笌 modelValue 灞炴�т笉鍏煎鐨凚ug +## 1.1.1锛�2021-08-24锛� +- 鏂板 鏀寔鍥介檯鍖� +## 1.1.0锛�2021-07-30锛� +- 缁勪欢鍏煎 vue3锛屽浣曞垱寤簐ue3椤圭洰锛岃瑙� [uni-app 椤圭洰鏀寔 vue3 浠嬬粛](https://ask.dcloud.net.cn/article/37834) +## 1.0.9锛�2021-05-12锛� +- 鏂板 椤圭洰绀轰緥鍦板潃 +## 1.0.8锛�2021-04-21锛� +- 浼樺寲 娣诲姞渚濊禆 uni-icons, 瀵煎叆鍚庤嚜鍔ㄤ笅杞戒緷璧� +## 1.0.7锛�2021-04-15锛� +- uni-ui 鏂板 uni-search-bar 鐨� focus 浜嬩欢 + +## 1.0.6锛�2021-02-05锛� +- 浼樺寲 缁勪欢寮曠敤鍏崇郴锛岄�氳繃uni_modules寮曠敤缁勪欢 + +## 1.0.5锛�2021-02-05锛� +- 璋冩暣涓簎ni_modules鐩綍瑙勮寖 +- 鏂板 鏀寔鍙屽悜缁戝畾 +- 鏇存敼 input 浜嬩欢鐨勮繑鍥炲�硷紝e={value:Number} --> e=value +- 鏂板 鏀寔鍥炬爣鎻掓Ы +- 鏂板 鏀寔 clear銆乥lur 浜嬩欢 +- 鏂板 鏀寔 focus 灞炴�� +- 鍘绘帀缁勪欢鑳屾櫙鑹� diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-search-bar/components/uni-search-bar/i18n/en.json" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-search-bar/components/uni-search-bar/i18n/en.json" new file mode 100644 index 0000000..dd083a5 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-search-bar/components/uni-search-bar/i18n/en.json" @@ -0,0 +1,4 @@ +{ + "uni-search-bar.cancel": "cancel", + "uni-search-bar.placeholder": "Search enter content" +} \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-search-bar/components/uni-search-bar/i18n/index.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-search-bar/components/uni-search-bar/i18n/index.js" new file mode 100644 index 0000000..de7509c --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-search-bar/components/uni-search-bar/i18n/index.js" @@ -0,0 +1,8 @@ +import en from './en.json' +import zhHans from './zh-Hans.json' +import zhHant from './zh-Hant.json' +export default { + en, + 'zh-Hans': zhHans, + 'zh-Hant': zhHant +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-search-bar/components/uni-search-bar/i18n/zh-Hans.json" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-search-bar/components/uni-search-bar/i18n/zh-Hans.json" new file mode 100644 index 0000000..d4e5c12 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-search-bar/components/uni-search-bar/i18n/zh-Hans.json" @@ -0,0 +1,4 @@ +{ + "uni-search-bar.cancel": "cancel", + "uni-search-bar.placeholder": "璇疯緭鍏ユ悳绱㈠唴瀹�" +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-search-bar/components/uni-search-bar/i18n/zh-Hant.json" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-search-bar/components/uni-search-bar/i18n/zh-Hant.json" new file mode 100644 index 0000000..318b6ef --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-search-bar/components/uni-search-bar/i18n/zh-Hant.json" @@ -0,0 +1,4 @@ +{ + "uni-search-bar.cancel": "cancel", + "uni-search-bar.placeholder": "璜嬭几鍏ユ悳绱㈠収瀹�" +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-search-bar/components/uni-search-bar/uni-search-bar.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-search-bar/components/uni-search-bar/uni-search-bar.vue" new file mode 100644 index 0000000..5a518a8 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-search-bar/components/uni-search-bar/uni-search-bar.vue" @@ -0,0 +1,298 @@ +<template> + <view class="uni-searchbar"> + <view :style="{borderRadius:radius+'px',backgroundColor: bgColor}" class="uni-searchbar__box" + @click="searchClick"> + <view class="uni-searchbar__box-icon-search"> + <slot name="searchIcon"> + <uni-icons color="#c0c4cc" size="18" type="search" /> + </slot> + </view> + <input v-if="show || searchVal" :focus="showSync" :disabled="readonly" :placeholder="placeholderText" :maxlength="maxlength" + class="uni-searchbar__box-search-input" confirm-type="search" type="text" v-model="searchVal" + @confirm="confirm" @blur="blur" @focus="emitFocus" /> + <text v-else class="uni-searchbar__text-placeholder">{{ placeholder }}</text> + <view v-if="show && (clearButton==='always'||clearButton==='auto'&&searchVal!=='') &&!readonly" + class="uni-searchbar__box-icon-clear" @click="clear"> + <slot name="clearIcon"> + <uni-icons color="#c0c4cc" size="20" type="clear" /> + </slot> + </view> + </view> + <text @click="cancel" class="uni-searchbar__cancel" + v-if="cancelButton ==='always' || show && cancelButton ==='auto'">{{cancelTextI18n}}</text> + </view> +</template> + +<script> + import { + initVueI18n + } from '@dcloudio/uni-i18n' + import messages from './i18n/index.js' + const { + t + } = initVueI18n(messages) + + /** + * SearchBar 鎼滅储鏍� + * @description 鎼滅储鏍忕粍浠讹紝閫氬父鐢ㄤ簬鎼滅储鍟嗗搧銆佹枃绔犵瓑 + * @tutorial https://ext.dcloud.net.cn/plugin?id=866 + * @property {Number} radius 鎼滅储鏍忓渾瑙� + * @property {Number} maxlength 杈撳叆鏈�澶ч暱搴� + * @property {String} placeholder 鎼滅储鏍廝laceholder + * @property {String} clearButton = [always|auto|none] 鏄惁鏄剧ず娓呴櫎鎸夐挳 + * @value always 涓�鐩存樉绀� + * @value auto 杈撳叆妗嗕笉涓虹┖鏃舵樉绀� + * @value none 涓�鐩翠笉鏄剧ず + * @property {String} cancelButton = [always|auto|none] 鏄惁鏄剧ず鍙栨秷鎸夐挳 + * @value always 涓�鐩存樉绀� + * @value auto 杈撳叆妗嗕笉涓虹┖鏃舵樉绀� + * @value none 涓�鐩翠笉鏄剧ず + * @property {String} cancelText 鍙栨秷鎸夐挳鐨勬枃瀛� + * @property {String} bgColor 杈撳叆妗嗚儗鏅鑹� + * @property {Boolean} focus 鏄惁鑷姩鑱氱劍 + * @property {Boolean} readonly 缁勪欢鍙锛屼笉鑳芥湁浠讳綍鎿嶄綔锛屽彧鍋氬睍绀� + * @event {Function} confirm uniSearchBar 鐨勮緭鍏ユ confirm 浜嬩欢锛岃繑鍥炲弬鏁颁负uniSearchBar鐨剉alue锛宔={value:Number} + * @event {Function} input uniSearchBar 鐨� value 鏀瑰彉鏃惰Е鍙戜簨浠讹紝杩斿洖鍙傛暟涓簎niSearchBar鐨剉alue锛宔=value + * @event {Function} cancel 鐐瑰嚮鍙栨秷鎸夐挳鏃惰Е鍙戜簨浠讹紝杩斿洖鍙傛暟涓簎niSearchBar鐨剉alue锛宔={value:Number} + * @event {Function} clear 鐐瑰嚮娓呴櫎鎸夐挳鏃惰Е鍙戜簨浠讹紝杩斿洖鍙傛暟涓簎niSearchBar鐨剉alue锛宔={value:Number} + * @event {Function} blur input澶卞幓鐒︾偣鏃惰Е鍙戜簨浠讹紝杩斿洖鍙傛暟涓簎niSearchBar鐨剉alue锛宔={value:Number} + */ + + export default { + name: "UniSearchBar", + emits: ['input', 'update:modelValue', 'clear', 'cancel', 'confirm', 'blur', 'focus'], + props: { + placeholder: { + type: String, + default: "" + }, + radius: { + type: [Number, String], + default: 5 + }, + clearButton: { + type: String, + default: "auto" + }, + cancelButton: { + type: String, + default: "auto" + }, + cancelText: { + type: String, + default: '鍙栨秷' + }, + bgColor: { + type: String, + default: "#F8F8F8" + }, + maxlength: { + type: [Number, String], + default: 100 + }, + value: { + type: [Number, String], + default: "" + }, + modelValue: { + type: [Number, String], + default: "" + }, + focus: { + type: Boolean, + default: false + }, + readonly: { + type: Boolean, + default: false + } + }, + data() { + return { + show: false, + showSync: false, + searchVal: '' + } + }, + computed: { + cancelTextI18n() { + return this.cancelText || t("uni-search-bar.cancel") + }, + placeholderText() { + return this.placeholder || t("uni-search-bar.placeholder") + } + }, + watch: { + // #ifndef VUE3 + value: { + immediate: true, + handler(newVal) { + this.searchVal = newVal + if (newVal) { + this.show = true + } + } + }, + // #endif + // #ifdef VUE3 + modelValue: { + immediate: true, + handler(newVal) { + this.searchVal = newVal + if (newVal) { + this.show = true + } + } + }, + // #endif + focus: { + immediate: true, + handler(newVal) { + if (newVal) { + if(this.readonly) return + this.show = true; + this.$nextTick(() => { + this.showSync = true + }) + } + } + }, + searchVal(newVal, oldVal) { + this.$emit("input", newVal) + // #ifdef VUE3 + this.$emit("update:modelValue", newVal) + // #endif + } + }, + methods: { + searchClick() { + if(this.readonly) return + if (this.show) { + return + } + this.show = true; + this.$nextTick(() => { + this.showSync = true + }) + }, + clear() { + this.$emit("clear", { + value: this.searchVal + }) + this.searchVal = "" + }, + cancel() { + if(this.readonly) return + this.$emit("cancel", { + value: this.searchVal + }); + this.searchVal = "" + this.show = false + this.showSync = false + // #ifndef APP-PLUS + uni.hideKeyboard() + // #endif + // #ifdef APP-PLUS + plus.key.hideSoftKeybord() + // #endif + }, + confirm() { + // #ifndef APP-PLUS + uni.hideKeyboard(); + // #endif + // #ifdef APP-PLUS + plus.key.hideSoftKeybord() + // #endif + this.$emit("confirm", { + value: this.searchVal + }) + }, + blur() { + // #ifndef APP-PLUS + uni.hideKeyboard(); + // #endif + // #ifdef APP-PLUS + plus.key.hideSoftKeybord() + // #endif + this.$emit("blur", { + value: this.searchVal + }) + }, + emitFocus(e) { + this.$emit("focus", e.detail) + } + } + }; +</script> + +<style lang="scss"> + $uni-searchbar-height: 36px; + + .uni-searchbar { + /* #ifndef APP-NVUE */ + display: flex; + /* #endif */ + flex-direction: row; + position: relative; + padding: 10px; + // background-color: #fff; + } + + .uni-searchbar__box { + /* #ifndef APP-NVUE */ + display: flex; + box-sizing: border-box; + /* #endif */ + overflow: hidden; + position: relative; + flex: 1; + justify-content: center; + flex-direction: row; + align-items: center; + height: $uni-searchbar-height; + padding: 5px 8px 5px 0px; + } + + .uni-searchbar__box-icon-search { + /* #ifndef APP-NVUE */ + display: flex; + /* #endif */ + flex-direction: row; + // width: 32px; + padding: 0 8px; + justify-content: center; + align-items: center; + color: #B3B3B3; + } + + .uni-searchbar__box-search-input { + flex: 1; + font-size: 14px; + color: #333; + } + + .uni-searchbar__box-icon-clear { + align-items: center; + line-height: 24px; + padding-left: 8px; + /* #ifdef H5 */ + cursor: pointer; + /* #endif */ + } + + .uni-searchbar__text-placeholder { + font-size: 14px; + color: #B3B3B3; + margin-left: 5px; + } + + .uni-searchbar__cancel { + padding-left: 10px; + line-height: $uni-searchbar-height; + font-size: 14px; + color: #333333; + /* #ifdef H5 */ + cursor: pointer; + /* #endif */ + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-search-bar/package.json" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-search-bar/package.json" new file mode 100644 index 0000000..9352c57 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-search-bar/package.json" @@ -0,0 +1,89 @@ +{ + "id": "uni-search-bar", + "displayName": "uni-search-bar 鎼滅储鏍�", + "version": "1.2.3", + "description": "鎼滅储鏍忕粍浠讹紝閫氬父鐢ㄤ簬鎼滅储鍟嗗搧銆佹枃绔犵瓑", + "keywords": [ + "uni-ui", + "uniui", + "鎼滅储妗�", + "鎼滅储鏍�" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "" + }, + "directories": { + "example": "../../temps/example_temps" + }, + "dcloudext": { + "category": [ + "鍓嶇缁勪欢", + "閫氱敤缁勪欢" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "鏃�", + "data": "鏃�", + "permissions": "鏃�" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" + }, + "uni_modules": { + "dependencies": [ + "uni-scss", + "uni-icons" + ], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "寰俊娴忚鍣�(Android)": "y", + "QQ娴忚鍣�(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "灏忕▼搴�": { + "寰俊": "y", + "闃块噷": "y", + "鐧惧害": "y", + "瀛楄妭璺冲姩": "y", + "QQ": "y" + }, + "蹇簲鐢�": { + "鍗庝负": "u", + "鑱旂洘": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-search-bar/readme.md" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-search-bar/readme.md" new file mode 100644 index 0000000..253092f --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-search-bar/readme.md" @@ -0,0 +1,14 @@ + + +## SearchBar 鎼滅储鏍� + +> **缁勪欢鍚嶏細uni-search-bar** +> 浠g爜鍧楋細 `uSearchBar` + + +鎼滅储鏍忕粍浠� + +### [鏌ョ湅鏂囨。](https://uniapp.dcloud.io/component/uniui/uni-search-bar) +#### 濡備娇鐢ㄨ繃绋嬩腑鏈変换浣曢棶棰橈紝鎴栬�呮偍瀵箄ni-ui鏈変竴浜涘ソ鐨勫缓璁紝娆㈣繋鍔犲叆 uni-ui 浜ゆ祦缇わ細871950839 + + diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-segmented-control/changelog.md" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-segmented-control/changelog.md" new file mode 100644 index 0000000..a44385d --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-segmented-control/changelog.md" @@ -0,0 +1,9 @@ +## 1.2.0锛�2021-11-19锛� +- 浼樺寲 缁勪欢UI锛屽苟鎻愪緵璁捐璧勬簮锛岃瑙�:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 鏂囨。杩佺Щ锛岃瑙�:[https://uniapp.dcloud.io/component/uniui/uni-segmented-control](https://uniapp.dcloud.io/component/uniui/uni-segmented-control) +## 1.1.0锛�2021-07-30锛� +- 缁勪欢鍏煎 vue3锛屽浣曞垱寤簐ue3椤圭洰锛岃瑙� [uni-app 椤圭洰鏀寔 vue3 浠嬬粛](https://ask.dcloud.net.cn/article/37834) +## 1.0.5锛�2021-05-12锛� +- 鏂板 椤圭洰绀轰緥鍦板潃 +## 1.0.4锛�2021-02-05锛� +- 璋冩暣涓簎ni_modules鐩綍瑙勮寖 diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-segmented-control/components/uni-segmented-control/uni-segmented-control.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-segmented-control/components/uni-segmented-control/uni-segmented-control.vue" new file mode 100644 index 0000000..044a495 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-segmented-control/components/uni-segmented-control/uni-segmented-control.vue" @@ -0,0 +1,145 @@ +<template> + <view :class="[styleType === 'text'?'segmented-control--text' : 'segmented-control--button' ]" + :style="{ borderColor: styleType === 'text' ? '' : activeColor }" class="segmented-control"> + <view v-for="(item, index) in values" :class="[ styleType === 'text' ? '': 'segmented-control__item--button', + index === currentIndex&&styleType === 'button' ? 'segmented-control__item--button--active': '', + index === 0&&styleType === 'button' ? 'segmented-control__item--button--first': '', + index === values.length - 1&&styleType === 'button' ? 'segmented-control__item--button--last': '' ]" :key="index" + :style="{ backgroundColor: index === currentIndex && styleType === 'button' ? activeColor : '',borderColor: index === currentIndex&&styleType === 'text'||styleType === 'button'?activeColor:'transparent' }" + class="segmented-control__item" @click="_onClick(index)"> + <view> + <text :style="{color: + index === currentIndex + ? styleType === 'text' + ? activeColor + : '#fff' + : styleType === 'text' + ? '#000' + : activeColor}" class="segmented-control__text" :class="styleType === 'text' && index === currentIndex ? 'segmented-control__item--text': ''">{{ item }}</text> + </view> + + </view> + </view> +</template> + +<script> + /** + * SegmentedControl 鍒嗘鍣� + * @description 鐢ㄤ綔涓嶅悓瑙嗗浘鐨勬樉绀� + * @tutorial https://ext.dcloud.net.cn/plugin?id=54 + * @property {Number} current 褰撳墠閫変腑鐨則ab绱㈠紩鍊硷紝浠�0璁℃暟 + * @property {String} styleType = [button|text] 鍒嗘鍣ㄦ牱寮忕被鍨� + * @value button 鎸夐挳绫诲瀷 + * @value text 鏂囧瓧绫诲瀷 + * @property {String} activeColor 閫変腑鐨勬爣绛捐儗鏅壊涓庤竟妗嗛鑹� + * @property {Array} values 閫夐」鏁扮粍 + * @event {Function} clickItem 缁勪欢瑙﹀彂鐐瑰嚮浜嬩欢鏃惰Е鍙戯紝e={currentIndex} + */ + + export default { + name: 'UniSegmentedControl', + emits: ['clickItem'], + props: { + current: { + type: Number, + default: 0 + }, + values: { + type: Array, + default () { + return [] + } + }, + activeColor: { + type: String, + default: '#2979FF' + }, + styleType: { + type: String, + default: 'button' + } + }, + data() { + return { + currentIndex: 0 + } + }, + watch: { + current(val) { + if (val !== this.currentIndex) { + this.currentIndex = val + } + } + }, + created() { + this.currentIndex = this.current + }, + methods: { + _onClick(index) { + if (this.currentIndex !== index) { + this.currentIndex = index + this.$emit('clickItem', { + currentIndex: index + }) + } + } + } + } +</script> + +<style lang="scss" scoped> + .segmented-control { + /* #ifndef APP-NVUE */ + display: flex; + box-sizing: border-box; + /* #endif */ + flex-direction: row; + height: 36px; + overflow: hidden; + /* #ifdef H5 */ + cursor: pointer; + /* #endif */ + } + + .segmented-control__item { + /* #ifndef APP-NVUE */ + display: inline-flex; + box-sizing: border-box; + /* #endif */ + position: relative; + flex: 1; + justify-content: center; + align-items: center; + } + + .segmented-control__item--button { + border-style: solid; + border-top-width: 1px; + border-bottom-width: 1px; + border-right-width: 1px; + border-left-width: 0; + } + + .segmented-control__item--button--first { + border-left-width: 1px; + border-top-left-radius: 5px; + border-bottom-left-radius: 5px; + } + + .segmented-control__item--button--last { + border-top-right-radius: 5px; + border-bottom-right-radius: 5px; + } + + .segmented-control__item--text { + border-bottom-style: solid; + border-bottom-width: 2px; + padding: 6px 0; + } + + .segmented-control__text { + font-size: 14px; + line-height: 20px; + text-align: center; + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-segmented-control/package.json" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-segmented-control/package.json" new file mode 100644 index 0000000..6cae41d --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-segmented-control/package.json" @@ -0,0 +1,87 @@ +{ + "id": "uni-segmented-control", + "displayName": "uni-segmented-control 鍒嗘鍣�", + "version": "1.2.0", + "description": "鍒嗘鍣ㄧ敱鑷冲皯 2 涓垎娈垫帶浠剁粍鎴愶紝鐢ㄤ綔涓嶅悓瑙嗗浘鐨勬樉绀�", + "keywords": [ + "uni-ui", + "uniui", + "鍒嗘鍣�", + "segement", + "椤堕儴閫夋嫨" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "" + }, + "directories": { + "example": "../../temps/example_temps" + }, + "dcloudext": { + "category": [ + "鍓嶇缁勪欢", + "閫氱敤缁勪欢" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "鏃�", + "data": "鏃�", + "permissions": "鏃�" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" + }, + "uni_modules": { + "dependencies": ["uni-scss"], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "寰俊娴忚鍣�(Android)": "y", + "QQ娴忚鍣�(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "灏忕▼搴�": { + "寰俊": "y", + "闃块噷": "y", + "鐧惧害": "y", + "瀛楄妭璺冲姩": "y", + "QQ": "y" + }, + "蹇簲鐢�": { + "鍗庝负": "u", + "鑱旂洘": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-segmented-control/readme.md" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-segmented-control/readme.md" new file mode 100644 index 0000000..3527b03 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-segmented-control/readme.md" @@ -0,0 +1,13 @@ + + +## SegmentedControl 鍒嗘鍣� +> **缁勪欢鍚嶏細uni-segmented-control** +> 浠g爜鍧楋細 `uSegmentedControl` + + +鐢ㄤ綔涓嶅悓瑙嗗浘鐨勬樉绀� + +### [鏌ョ湅鏂囨。](https://uniapp.dcloud.io/component/uniui/uni-segmented-control) +#### 濡備娇鐢ㄨ繃绋嬩腑鏈変换浣曢棶棰橈紝鎴栬�呮偍瀵箄ni-ui鏈変竴浜涘ソ鐨勫缓璁紝娆㈣繋鍔犲叆 uni-ui 浜ゆ祦缇わ細871950839 + + diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-tag/changelog.md" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-tag/changelog.md" new file mode 100644 index 0000000..c0c5839 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-tag/changelog.md" @@ -0,0 +1,21 @@ +## 2.1.0锛�2021-11-19锛� +- 浼樺寲 缁勪欢UI锛屽苟鎻愪緵璁捐璧勬簮锛岃瑙�:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 鏂囨。杩佺Щ锛岃瑙�:[https://uniapp.dcloud.io/component/uniui/uni-tag](https://uniapp.dcloud.io/component/uniui/uni-tag) +## 2.0.0锛�2021-11-09锛� +- 鏂板 鎻愪緵缁勪欢璁捐璧勬簮锛岀粍浠舵牱寮忚皟鏁� +- 绉婚櫎 鎻掓Ы +- 绉婚櫎 type 灞炴�х殑 royal 閫夐」 +## 1.1.1锛�2021-08-11锛� +- type 涓嶆槸 default 鏃讹紝size 涓� small 瀛椾綋澶у皬鏄剧ず涓嶆纭� +## 1.1.0锛�2021-07-30锛� +- 缁勪欢鍏煎 vue3锛屽浣曞垱寤簐ue3椤圭洰锛岃瑙� [uni-app 椤圭洰鏀寔 vue3 浠嬬粛](https://ask.dcloud.net.cn/article/37834) +## 1.0.7锛�2021-06-18锛� +- 淇 uni-tag 鍦ㄥ瓧鑺傝烦鍔ㄥ皬绋嬪簭涓� css 绫诲悕缂栬瘧閿欒鐨� bug +## 1.0.6锛�2021-06-04锛� +- 淇 鏈畾涔� sass 鍙橀噺 "$uni-color-royal" 鐨刡ug +## 1.0.5锛�2021-05-10锛� +- 淇 royal 绫诲瀷鏃犳晥鐨刡ug +- 淇 uni-tag 瀹藉害涓嶈嚜閫傚簲鐨刡ug +- 鏂板 uni-tag 鏀寔灞炴�� custom-style 鑷畾涔夋牱寮� +## 1.0.4锛�2021-02-05锛� +- 璋冩暣涓簎ni_modules鐩綍瑙勮寖 diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-tag/components/uni-tag/uni-tag.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-tag/components/uni-tag/uni-tag.vue" new file mode 100644 index 0000000..418c955 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-tag/components/uni-tag/uni-tag.vue" @@ -0,0 +1,252 @@ +<template> + <text class="uni-tag" v-if="text" :class="classes" :style="customStyle" @click="onClick">{{text}}</text> +</template> + +<script> + /** + * Tag 鏍囩 + * @description 鐢ㄤ簬灞曠ず1涓垨澶氫釜鏂囧瓧鏍囩锛屽彲鐐瑰嚮鍒囨崲閫変腑銆佷笉閫変腑鐨勭姸鎬� + * @tutorial https://ext.dcloud.net.cn/plugin?id=35 + * @property {String} text 鏍囩鍐呭 + * @property {String} size = [default|small|mini] 澶у皬灏哄 + * @value default 姝e父 + * @value small 灏忓昂瀵� + * @value mini 杩蜂綘灏哄 + * @property {String} type = [default|primary|success锝渨arning锝渆rror] 棰滆壊绫诲瀷 + * @value default 鐏拌壊 + * @value primary 钃濊壊 + * @value success 缁胯壊 + * @value warning 榛勮壊 + * @value error 绾㈣壊 + * @property {Boolean} disabled = [true|false] 鏄惁涓虹鐢ㄧ姸鎬� + * @property {Boolean} inverted = [true|false] 鏄惁鏃犻渶鑳屾櫙棰滆壊锛堢┖蹇冩爣绛撅級 + * @property {Boolean} circle = [true|false] 鏄惁涓哄渾瑙� + * @event {Function} click 鐐瑰嚮 Tag 瑙﹀彂浜嬩欢 + */ + + export default { + name: "UniTag", + emits: ['click'], + props: { + type: { + // 鏍囩绫诲瀷default銆乸rimary銆乻uccess銆亀arning銆乪rror銆乺oyal + type: String, + default: "default" + }, + size: { + // 鏍囩澶у皬 normal, small + type: String, + default: "normal" + }, + // 鏍囩鍐呭 + text: { + type: String, + default: "" + }, + disabled: { + // 鏄惁涓虹鐢ㄧ姸鎬� + type: [Boolean, String], + default: false + }, + inverted: { + // 鏄惁涓虹┖蹇� + type: [Boolean, String], + default: false + }, + circle: { + // 鏄惁涓哄渾瑙掓牱寮� + type: [Boolean, String], + default: false + }, + mark: { + // 鏄惁涓烘爣璁版牱寮� + type: [Boolean, String], + default: false + }, + customStyle: { + type: String, + default: '' + } + }, + computed: { + classes() { + const { + type, + disabled, + inverted, + circle, + mark, + size, + isTrue + } = this + const classArr = [ + 'uni-tag--' + type, + 'uni-tag--' + size, + isTrue(disabled) ? 'uni-tag--disabled' : '', + isTrue(inverted) ? 'uni-tag--' + type + '--inverted' : '', + isTrue(circle) ? 'uni-tag--circle' : '', + isTrue(mark) ? 'uni-tag--mark' : '', + // type === 'default' ? 'uni-tag--default' : 'uni-tag-text', + isTrue(inverted) ? 'uni-tag--inverted uni-tag-text--' + type : '', + size === 'small' ? 'uni-tag-text--small' : '' + ] + // 杩斿洖绫荤殑瀛楃涓诧紝鍏煎瀛楄妭灏忕▼搴� + return classArr.join(' ') + } + }, + methods: { + isTrue(value) { + return value === true || value === 'true' + }, + onClick() { + if (this.isTrue(this.disabled)) return + this.$emit("click"); + } + } + }; +</script> + +<style lang="scss" scoped> + $uni-primary: #2979ff !default; + $uni-success: #18bc37 !default; + $uni-warning: #f3a73f !default; + $uni-error: #e43d33 !default; + $uni-info: #8f939c !default; + + + $tag-default-pd: 4px 7px; + $tag-small-pd: 2px 5px; + $tag-mini-pd: 1px 3px; + + .uni-tag { + line-height: 14px; + font-size: 12px; + font-weight: 200; + padding: $tag-default-pd; + color: #fff; + border-radius: 3px; + background-color: $uni-info; + border-width: 1rpx; + border-style: solid; + border-color: $uni-info; + /* #ifdef H5 */ + cursor: pointer; + /* #endif */ + + // size attr + &--default { + font-size: 12px; + } + + &--default--inverted { + color: $uni-info; + border-color: $uni-info; + } + + &--small { + padding: $tag-small-pd; + font-size: 12px; + border-radius: 2px; + } + + &--mini { + padding: $tag-mini-pd; + font-size: 12px; + border-radius: 2px; + } + + // type attr + &--primary { + background-color: $uni-primary; + border-color: $uni-primary; + color: #fff; + } + + &--success { + color: #fff; + background-color: $uni-success; + border-color: $uni-success; + } + + &--warning { + color: #fff; + background-color: $uni-warning; + border-color: $uni-warning; + } + + &--error { + color: #fff; + background-color: $uni-error; + border-color: $uni-error; + } + + &--primary--inverted { + color: $uni-primary; + border-color: $uni-primary; + } + + &--success--inverted { + color: $uni-success; + border-color: $uni-success; + } + + &--warning--inverted { + color: $uni-warning; + border-color: $uni-warning; + } + + &--error--inverted { + color: $uni-error; + border-color: $uni-error; + } + + &--inverted { + background-color: #fff; + } + + // other attr + &--circle { + border-radius: 15px !important; + } + + &--mark { + border-top-left-radius: 0 !important; + border-bottom-left-radius: 0 !important; + border-top-right-radius: 15px !important; + border-bottom-right-radius: 15px !important; + } + + &--disabled { + opacity: 0.5; + /* #ifdef H5 */ + cursor: not-allowed; + /* #endif */ + } + } + + + .uni-tag-text { + color: #fff; + font-size: 14px; + + &--primary { + color: $uni-primary; + } + + &--success { + color: $uni-success; + } + + &--warning { + color: $uni-warning; + } + + &--error { + color: $uni-error; + } + + &--small { + font-size: 12px; + } + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-tag/package.json" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-tag/package.json" new file mode 100644 index 0000000..1878088 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-tag/package.json" @@ -0,0 +1,87 @@ +{ + "id": "uni-tag", + "displayName": "uni-tag 鏍囩", + "version": "2.1.0", + "description": "Tag 缁勪欢锛岀敤浜庡睍绀�1涓垨澶氫釜鏂囧瓧鏍囩锛屽彲鐐瑰嚮鍒囨崲閫変腑銆佷笉閫変腑鐨勭姸鎬併��", + "keywords": [ + "uni-ui", + "uniui", + "", + "tag", + "鏍囩" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "" + }, + "directories": { + "example": "../../temps/example_temps" + }, + "dcloudext": { + "category": [ + "鍓嶇缁勪欢", + "閫氱敤缁勪欢" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "鏃�", + "data": "鏃�", + "permissions": "鏃�" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" + }, + "uni_modules": { + "dependencies": ["uni-scss"], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "寰俊娴忚鍣�(Android)": "y", + "QQ娴忚鍣�(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "灏忕▼搴�": { + "寰俊": "y", + "闃块噷": "y", + "鐧惧害": "y", + "瀛楄妭璺冲姩": "y", + "QQ": "y" + }, + "蹇簲鐢�": { + "鍗庝负": "u", + "鑱旂洘": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-tag/readme.md" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-tag/readme.md" new file mode 100644 index 0000000..6e78ff5 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-tag/readme.md" @@ -0,0 +1,13 @@ + + +## Tag 鏍囩 +> **缁勪欢鍚嶏細uni-tag** +> 浠g爜鍧楋細 `uTag` + + +鐢ㄤ簬灞曠ず1涓垨澶氫釜鏂囧瓧鏍囩锛屽彲鐐瑰嚮鍒囨崲閫変腑銆佷笉閫変腑鐨勭姸鎬� 銆� + +### [鏌ョ湅鏂囨。](https://uniapp.dcloud.io/component/uniui/uni-tag) +#### 濡備娇鐢ㄨ繃绋嬩腑鏈変换浣曢棶棰橈紝鎴栬�呮偍瀵箄ni-ui鏈変竴浜涘ソ鐨勫缓璁紝娆㈣繋鍔犲叆 uni-ui 浜ゆ祦缇わ細871950839 + + diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-transition/changelog.md" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-transition/changelog.md" new file mode 100644 index 0000000..70c1cd4 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-transition/changelog.md" @@ -0,0 +1,22 @@ +## 1.3.2锛�2023-05-04锛� +- 淇 NVUE 骞冲彴鎶ラ敊鐨勯棶棰� +## 1.3.1锛�2021-11-23锛� +- 淇 init 鏂规硶鍒濆鍖栭棶棰� +## 1.3.0锛�2021-11-19锛� +- 浼樺寲 缁勪欢UI锛屽苟鎻愪緵璁捐璧勬簮锛岃瑙�:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 鏂囨。杩佺Щ锛岃瑙�:[https://uniapp.dcloud.io/component/uniui/uni-transition](https://uniapp.dcloud.io/component/uniui/uni-transition) +## 1.2.1锛�2021-09-27锛� +- 淇 init 鏂规硶涓嶇敓鏁堢殑 Bug +## 1.2.0锛�2021-07-30锛� +- 缁勪欢鍏煎 vue3锛屽浣曞垱寤� vue3 椤圭洰锛岃瑙� [uni-app 椤圭洰鏀寔 vue3 浠嬬粛](https://ask.dcloud.net.cn/article/37834) +## 1.1.1锛�2021-05-12锛� +- 鏂板 绀轰緥鍦板潃 +- 淇 绀轰緥椤圭洰缂哄皯缁勪欢鐨� Bug +## 1.1.0锛�2021-04-22锛� +- 鏂板 閫氳繃鏂规硶鑷畾涔夊姩鐢� +- 鏂板 custom-class 闈� NVUE 骞冲彴鏀寔鑷畾涔� class 瀹氬埗鏍峰紡 +- 浼樺寲 鍔ㄧ敾瑙﹀彂閫昏緫锛屼娇鍔ㄧ敾鏇存祦鐣� +- 浼樺寲 鏀寔鍗曠嫭鐨勫姩鐢荤被鍨� +- 浼樺寲 鏂囨。绀轰緥 +## 1.0.2锛�2021-02-05锛� +- 璋冩暣涓� uni_modules 鐩綍瑙勮寖 diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-transition/components/uni-transition/createAnimation.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-transition/components/uni-transition/createAnimation.js" new file mode 100644 index 0000000..8f89b18 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-transition/components/uni-transition/createAnimation.js" @@ -0,0 +1,131 @@ +// const defaultOption = { +// duration: 300, +// timingFunction: 'linear', +// delay: 0, +// transformOrigin: '50% 50% 0' +// } +// #ifdef APP-NVUE +const nvueAnimation = uni.requireNativePlugin('animation') +// #endif +class MPAnimation { + constructor(options, _this) { + this.options = options + // 鍦╥OS10+QQ灏忕▼搴忓钩鍙颁笅锛屼紶缁欏師鐢熺殑瀵硅薄涓�瀹氭槸涓櫘閫氬璞¤�屼笉鏄疨roxy瀵硅薄锛屽惁鍒欎細鎶arameter should be Object instead of ProxyObject鐨勯敊璇� + this.animation = uni.createAnimation({ + ...options + }) + this.currentStepAnimates = {} + this.next = 0 + this.$ = _this + + } + + _nvuePushAnimates(type, args) { + let aniObj = this.currentStepAnimates[this.next] + let styles = {} + if (!aniObj) { + styles = { + styles: {}, + config: {} + } + } else { + styles = aniObj + } + if (animateTypes1.includes(type)) { + if (!styles.styles.transform) { + styles.styles.transform = '' + } + let unit = '' + if(type === 'rotate'){ + unit = 'deg' + } + styles.styles.transform += `${type}(${args+unit}) ` + } else { + styles.styles[type] = `${args}` + } + this.currentStepAnimates[this.next] = styles + } + _animateRun(styles = {}, config = {}) { + let ref = this.$.$refs['ani'].ref + if (!ref) return + return new Promise((resolve, reject) => { + nvueAnimation.transition(ref, { + styles, + ...config + }, res => { + resolve() + }) + }) + } + + _nvueNextAnimate(animates, step = 0, fn) { + let obj = animates[step] + if (obj) { + let { + styles, + config + } = obj + this._animateRun(styles, config).then(() => { + step += 1 + this._nvueNextAnimate(animates, step, fn) + }) + } else { + this.currentStepAnimates = {} + typeof fn === 'function' && fn() + this.isEnd = true + } + } + + step(config = {}) { + // #ifndef APP-NVUE + this.animation.step(config) + // #endif + // #ifdef APP-NVUE + this.currentStepAnimates[this.next].config = Object.assign({}, this.options, config) + this.currentStepAnimates[this.next].styles.transformOrigin = this.currentStepAnimates[this.next].config.transformOrigin + this.next++ + // #endif + return this + } + + run(fn) { + // #ifndef APP-NVUE + this.$.animationData = this.animation.export() + this.$.timer = setTimeout(() => { + typeof fn === 'function' && fn() + }, this.$.durationTime) + // #endif + // #ifdef APP-NVUE + this.isEnd = false + let ref = this.$.$refs['ani'] && this.$.$refs['ani'].ref + if(!ref) return + this._nvueNextAnimate(this.currentStepAnimates, 0, fn) + this.next = 0 + // #endif + } +} + + +const animateTypes1 = ['matrix', 'matrix3d', 'rotate', 'rotate3d', 'rotateX', 'rotateY', 'rotateZ', 'scale', 'scale3d', + 'scaleX', 'scaleY', 'scaleZ', 'skew', 'skewX', 'skewY', 'translate', 'translate3d', 'translateX', 'translateY', + 'translateZ' +] +const animateTypes2 = ['opacity', 'backgroundColor'] +const animateTypes3 = ['width', 'height', 'left', 'right', 'top', 'bottom'] +animateTypes1.concat(animateTypes2, animateTypes3).forEach(type => { + MPAnimation.prototype[type] = function(...args) { + // #ifndef APP-NVUE + this.animation[type](...args) + // #endif + // #ifdef APP-NVUE + this._nvuePushAnimates(type, args) + // #endif + return this + } +}) + +export function createAnimation(option, _this) { + if(!_this) return + clearTimeout(_this.timer) + return new MPAnimation(option, _this) +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-transition/components/uni-transition/uni-transition.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-transition/components/uni-transition/uni-transition.vue" new file mode 100644 index 0000000..bfbba93 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-transition/components/uni-transition/uni-transition.vue" @@ -0,0 +1,286 @@ +<template> + <!-- #ifndef APP-NVUE --> + <view v-show="isShow" ref="ani" :animation="animationData" :class="customClass" :style="transformStyles" @click="onClick"><slot></slot></view> + <!-- #endif --> + <!-- #ifdef APP-NVUE --> + <view v-if="isShow" ref="ani" :animation="animationData" :class="customClass" :style="transformStyles" @click="onClick"><slot></slot></view> + <!-- #endif --> +</template> + +<script> +import { createAnimation } from './createAnimation' + +/** + * Transition 杩囨浮鍔ㄧ敾 + * @description 绠�鍗曡繃娓″姩鐢荤粍浠� + * @tutorial https://ext.dcloud.net.cn/plugin?id=985 + * @property {Boolean} show = [false|true] 鎺у埗缁勪欢鏄剧ず鎴栭殣钘� + * @property {Array|String} modeClass = [fade|slide-top|slide-right|slide-bottom|slide-left|zoom-in|zoom-out] 杩囨浮鍔ㄧ敾绫诲瀷 + * @value fade 娓愰殣娓愬嚭杩囨浮 + * @value slide-top 鐢变笂鑷充笅杩囨浮 + * @value slide-right 鐢卞彸鑷冲乏杩囨浮 + * @value slide-bottom 鐢变笅鑷充笂杩囨浮 + * @value slide-left 鐢卞乏鑷冲彸杩囨浮 + * @value zoom-in 鐢卞皬鍒板ぇ杩囨浮 + * @value zoom-out 鐢卞ぇ鍒板皬杩囨浮 + * @property {Number} duration 杩囨浮鍔ㄧ敾鎸佺画鏃堕棿 + * @property {Object} styles 缁勪欢鏍峰紡锛屽悓 css 鏍峰紡锛屾敞鎰忓甫鈥�-鈥樿繛鎺ョ鐨勫睘鎬ч渶瑕佷娇鐢ㄥ皬椹煎嘲鍐欐硶濡傦細`backgroundColor:red` + */ +export default { + name: 'uniTransition', + emits:['click','change'], + props: { + show: { + type: Boolean, + default: false + }, + modeClass: { + type: [Array, String], + default() { + return 'fade' + } + }, + duration: { + type: Number, + default: 300 + }, + styles: { + type: Object, + default() { + return {} + } + }, + customClass:{ + type: String, + default: '' + }, + onceRender:{ + type:Boolean, + default:false + }, + }, + data() { + return { + isShow: false, + transform: '', + opacity: 1, + animationData: {}, + durationTime: 300, + config: {} + } + }, + watch: { + show: { + handler(newVal) { + if (newVal) { + this.open() + } else { + // 閬垮厤涓婃潵灏辨墽琛� close,瀵艰嚧鍔ㄧ敾閿欎贡 + if (this.isShow) { + this.close() + } + } + }, + immediate: true + } + }, + computed: { + // 鐢熸垚鏍峰紡鏁版嵁 + stylesObject() { + let styles = { + ...this.styles, + 'transition-duration': this.duration / 1000 + 's' + } + let transform = '' + for (let i in styles) { + let line = this.toLine(i) + transform += line + ':' + styles[i] + ';' + } + return transform + }, + // 鍒濆鍖栧姩鐢绘潯浠� + transformStyles() { + return 'transform:' + this.transform + ';' + 'opacity:' + this.opacity + ';' + this.stylesObject + } + }, + created() { + // 鍔ㄧ敾榛樿閰嶇疆 + this.config = { + duration: this.duration, + timingFunction: 'ease', + transformOrigin: '50% 50%', + delay: 0 + } + this.durationTime = this.duration + }, + methods: { + /** + * ref 瑙﹀彂 鍒濆鍖栧姩鐢� + */ + init(obj = {}) { + if (obj.duration) { + this.durationTime = obj.duration + } + this.animation = createAnimation(Object.assign(this.config, obj),this) + }, + /** + * 鐐瑰嚮缁勪欢瑙﹀彂鍥炶皟 + */ + onClick() { + this.$emit('click', { + detail: this.isShow + }) + }, + /** + * ref 瑙﹀彂 鍔ㄧ敾鍒嗙粍 + * @param {Object} obj + */ + step(obj, config = {}) { + if (!this.animation) return + for (let i in obj) { + try { + if(typeof obj[i] === 'object'){ + this.animation[i](...obj[i]) + }else{ + this.animation[i](obj[i]) + } + } catch (e) { + console.error(`鏂规硶 ${i} 涓嶅瓨鍦╜) + } + } + this.animation.step(config) + return this + }, + /** + * ref 瑙﹀彂 鎵ц鍔ㄧ敾 + */ + run(fn) { + if (!this.animation) return + this.animation.run(fn) + }, + // 寮�濮嬭繃搴﹀姩鐢� + open() { + clearTimeout(this.timer) + this.transform = '' + this.isShow = true + let { opacity, transform } = this.styleInit(false) + if (typeof opacity !== 'undefined') { + this.opacity = opacity + } + this.transform = transform + // 纭繚鍔ㄦ�佹牱寮忓凡缁忕敓鏁堝悗锛屾墽琛屽姩鐢伙紝濡傛灉涓嶅姞 nextTick 锛屼細瀵艰嚧 wx 鍔ㄧ敾鎵ц寮傚父 + this.$nextTick(() => { + // TODO 瀹氭椂鍣ㄤ繚璇佸姩鐢诲畬鍏ㄦ墽琛岋紝鐩墠鏈変簺闂锛屽悗闈細鍙栨秷瀹氭椂鍣� + this.timer = setTimeout(() => { + this.animation = createAnimation(this.config, this) + this.tranfromInit(false).step() + this.animation.run() + this.$emit('change', { + detail: this.isShow + }) + }, 20) + }) + }, + // 鍏抽棴杩囧害鍔ㄧ敾 + close(type) { + if (!this.animation) return + this.tranfromInit(true) + .step() + .run(() => { + this.isShow = false + this.animationData = null + this.animation = null + let { opacity, transform } = this.styleInit(false) + this.opacity = opacity || 1 + this.transform = transform + this.$emit('change', { + detail: this.isShow + }) + }) + }, + // 澶勭悊鍔ㄧ敾寮�濮嬪墠鐨勯粯璁ゆ牱寮� + styleInit(type) { + let styles = { + transform: '' + } + let buildStyle = (type, mode) => { + if (mode === 'fade') { + styles.opacity = this.animationType(type)[mode] + } else { + styles.transform += this.animationType(type)[mode] + ' ' + } + } + if (typeof this.modeClass === 'string') { + buildStyle(type, this.modeClass) + } else { + this.modeClass.forEach(mode => { + buildStyle(type, mode) + }) + } + return styles + }, + // 澶勭悊鍐呯疆缁勫悎鍔ㄧ敾 + tranfromInit(type) { + let buildTranfrom = (type, mode) => { + let aniNum = null + if (mode === 'fade') { + aniNum = type ? 0 : 1 + } else { + aniNum = type ? '-100%' : '0' + if (mode === 'zoom-in') { + aniNum = type ? 0.8 : 1 + } + if (mode === 'zoom-out') { + aniNum = type ? 1.2 : 1 + } + if (mode === 'slide-right') { + aniNum = type ? '100%' : '0' + } + if (mode === 'slide-bottom') { + aniNum = type ? '100%' : '0' + } + } + this.animation[this.animationMode()[mode]](aniNum) + } + if (typeof this.modeClass === 'string') { + buildTranfrom(type, this.modeClass) + } else { + this.modeClass.forEach(mode => { + buildTranfrom(type, mode) + }) + } + + return this.animation + }, + animationType(type) { + return { + fade: type ? 1 : 0, + 'slide-top': `translateY(${type ? '0' : '-100%'})`, + 'slide-right': `translateX(${type ? '0' : '100%'})`, + 'slide-bottom': `translateY(${type ? '0' : '100%'})`, + 'slide-left': `translateX(${type ? '0' : '-100%'})`, + 'zoom-in': `scaleX(${type ? 1 : 0.8}) scaleY(${type ? 1 : 0.8})`, + 'zoom-out': `scaleX(${type ? 1 : 1.2}) scaleY(${type ? 1 : 1.2})` + } + }, + // 鍐呯疆鍔ㄧ敾绫诲瀷涓庡疄闄呭姩鐢诲搴斿瓧鍏� + animationMode() { + return { + fade: 'opacity', + 'slide-top': 'translateY', + 'slide-right': 'translateX', + 'slide-bottom': 'translateY', + 'slide-left': 'translateX', + 'zoom-in': 'scale', + 'zoom-out': 'scale' + } + }, + // 椹煎嘲杞腑妯嚎 + toLine(name) { + return name.replace(/([A-Z])/g, '-$1').toLowerCase() + } + } +} +</script> + +<style></style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-transition/package.json" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-transition/package.json" new file mode 100644 index 0000000..ea995a2 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-transition/package.json" @@ -0,0 +1,84 @@ +{ + "id": "uni-transition", + "displayName": "uni-transition 杩囨浮鍔ㄧ敾", + "version": "1.3.2", + "description": "鍏冪礌鐨勭畝鍗曡繃娓″姩鐢�", + "keywords": [ + "uni-ui", + "uniui", + "鍔ㄧ敾", + "杩囨浮", + "杩囨浮鍔ㄧ敾" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "" + }, + "directories": { + "example": "../../temps/example_temps" + }, +"dcloudext": { + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "鏃�", + "data": "鏃�", + "permissions": "鏃�" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui", + "type": "component-vue" + }, + "uni_modules": { + "dependencies": ["uni-scss"], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "寰俊娴忚鍣�(Android)": "y", + "QQ娴忚鍣�(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "灏忕▼搴�": { + "寰俊": "y", + "闃块噷": "y", + "鐧惧害": "y", + "瀛楄妭璺冲姩": "y", + "QQ": "y" + }, + "蹇簲鐢�": { + "鍗庝负": "u", + "鑱旂洘": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-transition/readme.md" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-transition/readme.md" new file mode 100644 index 0000000..2f8a77e --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uni_modules/uni-transition/readme.md" @@ -0,0 +1,11 @@ + + +## Transition 杩囨浮鍔ㄧ敾 +> **缁勪欢鍚嶏細uni-transition** +> 浠g爜鍧楋細 `uTransition` + + +鍏冪礌杩囨浮鍔ㄧ敾 + +### [鏌ョ湅鏂囨。](https://uniapp.dcloud.io/component/uniui/uni-transition) +#### 濡備娇鐢ㄨ繃绋嬩腑鏈変换浣曢棶棰橈紝鎴栬�呮偍瀵箄ni-ui鏈変竴浜涘ソ鐨勫缓璁紝娆㈣繋鍔犲叆 uni-ui 浜ゆ祦缇わ細871950839 \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/LICENSE" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/LICENSE" new file mode 100644 index 0000000..8e39ead --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/LICENSE" @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 www.uviewui.com + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/README.md" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/README.md" new file mode 100644 index 0000000..06d5676 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/README.md" @@ -0,0 +1,106 @@ +<p align="center"> + <img alt="logo" src="https://uviewui.com/common/logo.png" width="120" height="120" style="margin-bottom: 10px;"> +</p> +<h3 align="center" style="margin: 30px 0 30px;font-weight: bold;font-size:40px;">uView</h3> +<h3 align="center">澶氬钩鍙板揩閫熷紑鍙戠殑UI妗嗘灦</h3> + + +## 璇存槑 + +uView UI锛屾槸[uni-app](https://uniapp.dcloud.io/)鐢熸�佷紭绉�鐨刄I妗嗘灦锛屽叏闈㈢殑缁勪欢鍜屼究鎹风殑宸ュ叿浼氳鎮ㄤ俊鎵嬫媹鏉ワ紝濡傞奔寰楁按 + +## 鐗规�� + +- 鍏煎瀹夊崜锛宨OS锛屽井淇″皬绋嬪簭锛孒5锛孮Q灏忕▼搴忥紝鐧惧害灏忕▼搴忥紝鏀粯瀹濆皬绋嬪簭锛屽ご鏉″皬绋嬪簭 +- 60+绮鹃�夌粍浠讹紝鍔熻兘涓板瘜锛屽绔吋瀹癸紝璁╂偍蹇�熼泦鎴愶紝寮�绠卞嵆鐢� +- 浼楀璐村績鐨凧S鍒╁櫒锛岃鎮ㄩ闀栧湪鎵嬶紝鍙箣鍗虫潵锛岀櫨姝ョ┛鏉� +- 浼楀鐨勫父鐢ㄩ〉闈㈠拰甯冨眬锛岃鎮ㄤ笓娉ㄩ�昏緫锛屼簨鍗婂姛鍊� +- 璇﹀敖鐨勬枃妗f敮鎸侊紝鐜颁唬鍖栫殑婕旂ず鏁堟灉 +- 鎸夐渶寮曞叆锛岀簿绠�鎵撳寘浣撶Н + + +## 瀹夎 + +```bash +# npm鏂瑰紡瀹夎 +npm i uview-ui +``` + +## 蹇�熶笂鎵� + +1. `main.js`寮曞叆uView搴� +```js +// main.js +import uView from 'uview-ui'; +Vue.use(uView); +``` + +2. `App.vue`寮曞叆鍩虹鏍峰紡(娉ㄦ剰style鏍囩闇�澹版槑scss灞炴�ф敮鎸�) +```css +/* App.vue */ +<style lang="scss"> +@import "uview-ui/index.scss"; +</style> +``` + +3. `uni.scss`寮曞叆鍏ㄥ眬scss鍙橀噺鏂囦欢 +```css +/* uni.scss */ +@import "uview-ui/theme.scss"; +``` + +4. `pages.json`閰嶇疆easycom瑙勫垯(鎸夐渶寮曞叆) + +```js +// pages.json +{ + "easycom": { + // npm瀹夎鐨勬柟寮忎笉闇�瑕佸墠闈㈢殑"@/"锛屼笅杞藉畨瑁呯殑鏂瑰紡闇�瑕�"@/" + // npm瀹夎鏂瑰紡 + "^u-(.*)": "uview-ui/components/u-$1/u-$1.vue" + // 涓嬭浇瀹夎鏂瑰紡 + // "^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue" + }, + // 姝や负鏈韩宸叉湁鐨勫唴瀹� + "pages": [ + // ...... + ] +} +``` + +璇烽�氳繃[蹇�熶笂鎵媇(https://uviewui.com/components/quickstart.html)浜嗚В鏇磋缁嗙殑鍐呭 + +## 浣跨敤鏂规硶 +閰嶇疆easycom瑙勫垯鍚庯紝鑷姩鎸夐渶寮曞叆锛屾棤闇�`import`缁勪欢锛岀洿鎺ュ紩鐢ㄥ嵆鍙�� + +```html +<template> + <u-button>鎸夐挳</u-button> +</template> +``` + +璇烽�氳繃[蹇�熶笂鎵媇(https://uviewui.com/components/quickstart.html)浜嗚В鏇磋缁嗙殑鍐呭 + +## 閾炬帴 + +- [瀹樻柟鏂囨。](https://uviewui.com/) +- [鏇存柊鏃ュ織](https://uviewui.com/components/changelog.html) +- [鍗囩骇鎸囧崡](https://uviewui.com/components/changelog.html) +- [鍏充簬鎴戜滑](https://uviewui.com/cooperation/about.html) + +## 棰勮 + +鎮ㄥ彲浠ラ�氳繃**寰俊**鎵爜锛屾煡鐪嬫渶浣崇殑婕旂ず鏁堟灉銆� +<br> +<br> +<img src="https://uviewui.com/common/weixin_mini_qrcode.png" width="220" height="220" > + +<!-- ## 鎹愯禒uView鐨勭爺鍙� + +uView鏂囨。鍜屾簮鐮佸叏閮ㄥ紑婧愬厤璐癸紝濡傛灉鎮ㄨ涓簎View甯埌浜嗘偍鐨勫紑鍙戝伐浣滐紝鎮ㄥ彲浠ユ崘璧爑View鐨勭爺鍙戝伐浣滐紝鎹愯禒鏃犻棬妲涳紝鍝�曟槸涓�鏉彲涔愪篃濂�(鐩镐俊杩欐瘮鎵撹祻涓绘挱鏇存湁鎰忎箟)銆� + +<img src="https://uviewui.com/common/wechat.png" width="220" > +<img style="margin-left: 100px;" src="https://uviewui.com/common/alipay.png" width="220" > + --> +## 鐗堟潈淇℃伅 +uView閬靛惊[MIT](https://en.wikipedia.org/wiki/MIT_License)寮�婧愬崗璁紝鎰忓懗鐫�鎮ㄦ棤闇�鏀粯浠讳綍璐圭敤锛屼篃鏃犻渶鎺堟潈锛屽嵆鍙皢uView搴旂敤鍒版偍鐨勪骇鍝佷腑銆� diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-action-sheet/u-action-sheet.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-action-sheet/u-action-sheet.vue" new file mode 100644 index 0000000..722b668 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-action-sheet/u-action-sheet.vue" @@ -0,0 +1,190 @@ +<template> + <u-popup mode="bottom" :border-radius="borderRadius" :popup="false" v-model="value" :maskCloseAble="maskCloseAble" + length="auto" :safeAreaInsetBottom="safeAreaInsetBottom" @close="popupClose" :z-index="uZIndex"> + <view class="u-tips u-border-bottom" v-if="tips.text" :style="[tipsStyle]"> + {{tips.text}} + </view> + <block v-for="(item, index) in list" :key="index"> + <view + @touchmove.stop.prevent + @tap="itemClick(index)" + :style="[itemStyle(index)]" + class="u-action-sheet-item u-line-1" + :class="[index < list.length - 1 ? 'u-border-bottom' : '']" + :hover-stay-time="150" + > + <text>{{item.text}}</text> + <text class="u-action-sheet-item__subtext u-line-1" v-if="item.subText">{{item.subText}}</text> + </view> + </block> + <view class="u-gab" v-if="cancelBtn"> + </view> + <view @touchmove.stop.prevent class="u-actionsheet-cancel u-action-sheet-item" hover-class="u-hover-class" + :hover-stay-time="150" v-if="cancelBtn" @tap="close">{{cancelText}}</view> + </u-popup> +</template> + +<script> + /** + * actionSheet 鎿嶄綔鑿滃崟 + * @description 鏈粍浠剁敤浜庝粠搴曢儴寮瑰嚭涓�涓搷浣滆彍鍗曪紝渚涚敤鎴烽�夋嫨骞惰繑鍥炵粨鏋溿�傛湰缁勪欢鍔熻兘绫讳技浜巙ni鐨剈ni.showActionSheetAPI锛岄厤缃洿鍔犵伒娲伙紝鎵�鏈夊钩鍙伴兘琛ㄧ幇涓�鑷淬�� + * @tutorial https://www.uviewui.com/components/actionSheet.html + * @property {Array<Object>} list 鎸夐挳鐨勬枃瀛楁暟缁勶紝瑙佸畼鏂规枃妗gず渚� + * @property {Object} tips 椤堕儴鐨勬彁绀烘枃瀛楋紝瑙佸畼鏂规枃妗gず渚� + * @property {String} cancel-text 鍙栨秷鎸夐挳鐨勬彁绀烘枃瀛� + * @property {Boolean} cancel-btn 鏄惁鏄剧ず搴曢儴鐨勫彇娑堟寜閽紙榛樿true锛� + * @property {Number String} border-radius 寮瑰嚭閮ㄥ垎椤堕儴宸﹀彸鐨勫渾瑙掑�硷紝鍗曚綅rpx锛堥粯璁�0锛� + * @property {Boolean} mask-close-able 鐐瑰嚮閬僵鏄惁鍙互鍏抽棴锛堥粯璁rue锛� + * @property {Boolean} safe-area-inset-bottom 鏄惁寮�鍚簳閮ㄥ畨鍏ㄥ尯閫傞厤锛堥粯璁alse锛� + * @property {Number String} z-index z-index鍊硷紙榛樿1075锛� + * @property {String} cancel-text 鍙栨秷鎸夐挳鐨勬彁绀烘枃瀛� + * @event {Function} click 鐐瑰嚮ActionSheet鍒楄〃椤规椂瑙﹀彂 + * @event {Function} close 鐐瑰嚮鍙栨秷鎸夐挳鏃惰Е鍙� + * @example <u-action-sheet :list="list" @click="click" v-model="show"></u-action-sheet> + */ + export default { + name: "u-action-sheet", + props: { + // 鐐瑰嚮閬僵鏄惁鍙互鍏抽棴actionsheet + maskCloseAble: { + type: Boolean, + default: true + }, + // 鎸夐挳鐨勬枃瀛楁暟缁勶紝鍙互鑷畾涔夐鑹插拰瀛椾綋澶у皬锛屽瓧浣撳崟浣嶄负rpx + list: { + type: Array, + default () { + // 濡備笅 + // return [{ + // text: '纭畾', + // color: '', + // fontSize: '' + // }] + return []; + } + }, + // 椤堕儴鐨勬彁绀烘枃瀛� + tips: { + type: Object, + default () { + return { + text: '', + color: '', + fontSize: '26' + } + } + }, + // 搴曢儴鐨勫彇娑堟寜閽� + cancelBtn: { + type: Boolean, + default: true + }, + // 鏄惁寮�鍚簳閮ㄥ畨鍏ㄥ尯閫傞厤锛屽紑鍚殑璇濓紝浼氬湪iPhoneX鏈哄瀷搴曢儴娣诲姞涓�瀹氱殑鍐呰竟璺� + safeAreaInsetBottom: { + type: Boolean, + default: false + }, + // 閫氳繃鍙屽悜缁戝畾鎺у埗缁勪欢鐨勫脊鍑轰笌鏀惰捣 + value: { + type: Boolean, + default: false + }, + // 寮瑰嚭鐨勯《閮ㄥ渾瑙掑�� + borderRadius: { + type: [String, Number], + default: 0 + }, + // 寮瑰嚭鐨剒-index鍊� + zIndex: { + type: [String, Number], + default: 0 + }, + // 鍙栨秷鎸夐挳鐨勬枃瀛楁彁绀� + cancelText: { + type: String, + default: '鍙栨秷' + } + }, + computed: { + // 椤堕儴鎻愮ず鐨勬牱寮� + tipsStyle() { + let style = {}; + if (this.tips.color) style.color = this.tips.color; + if (this.tips.fontSize) style.fontSize = this.tips.fontSize + 'rpx'; + return style; + }, + // 鎿嶄綔椤圭洰鐨勬牱寮� + itemStyle() { + return (index) => { + let style = {}; + if (this.list[index].color) style.color = this.list[index].color; + if (this.list[index].fontSize) style.fontSize = this.list[index].fontSize + 'rpx'; + // 閫夐」琚鐢ㄧ殑鏍峰紡 + if (this.list[index].disabled) style.color = '#c0c4cc'; + return style; + } + }, + uZIndex() { + // 濡傛灉鐢ㄦ埛鏈変紶閫抸-index鍊硷紝浼樺厛浣跨敤 + return this.zIndex ? this.zIndex : this.$u.zIndex.popup; + } + }, + methods: { + // 鐐瑰嚮鍙栨秷鎸夐挳 + close() { + // 鍙戦�乮nput浜嬩欢锛屽苟涓嶄細浣滅敤浜庣埗缁勪欢锛岃�屾槸瑕佽缃粍浠跺唴閮ㄩ�氳繃props浼犻�掔殑value鍙傛暟 + // 杩欐槸涓�涓獀ue鍙戦�佷簨浠剁殑鐗规畩鐢ㄦ硶 + this.popupClose(); + this.$emit('close'); + }, + // 寮圭獥鍏抽棴 + popupClose() { + this.$emit('input', false); + }, + // 鐐瑰嚮鏌愪竴涓猧tem + itemClick(index) { + // disabled鐨勯」绂佹鐐瑰嚮 + if(this.list[index].disabled) return; + this.$emit('click', index); + this.$emit('input', false); + } + } + } +</script> + +<style lang="scss" scoped> + @import "../../libs/css/style.components.scss"; + + .u-tips { + font-size: 26rpx; + text-align: center; + padding: 34rpx 0; + line-height: 1; + color: $u-tips-color; + } + + .u-action-sheet-item { + @include vue-flex;; + line-height: 1; + justify-content: center; + align-items: center; + font-size: 32rpx; + padding: 34rpx 0; + flex-direction: column; + } + + .u-action-sheet-item__subtext { + font-size: 24rpx; + color: $u-tips-color; + margin-top: 20rpx; + } + + .u-gab { + height: 12rpx; + background-color: rgb(234, 234, 236); + } + + .u-actionsheet-cancel { + color: $u-main-color; + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-alert-tips/u-alert-tips.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-alert-tips/u-alert-tips.vue" new file mode 100644 index 0000000..e81fc37 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-alert-tips/u-alert-tips.vue" @@ -0,0 +1,256 @@ +<template> + <view class="u-alert-tips" v-if="show" :class="[ + !show ? 'u-close-alert-tips': '', + type ? 'u-alert-tips--bg--' + type + '-light' : '', + type ? 'u-alert-tips--border--' + type + '-disabled' : '', + ]" :style="{ + backgroundColor: bgColor, + borderColor: borderColor + }"> + <view class="u-icon-wrap"> + <u-icon v-if="showIcon" :name="uIcon" :size="description ? 40 : 32" class="u-icon" :color="uIconType" :custom-style="iconStyle"></u-icon> + </view> + <view class="u-alert-content" @tap.stop="click"> + <view class="u-alert-title" :style="[uTitleStyle]"> + {{title}} + </view> + <view v-if="description" class="u-alert-desc" :style="[descStyle]"> + {{description}} + </view> + </view> + <view class="u-icon-wrap"> + <u-icon @click="close" v-if="closeAble && !closeText" hoverClass="u-type-error-hover-color" name="close" color="#c0c4cc" + :size="22" class="u-close-icon" :style="{ + top: description ? '18rpx' : '24rpx' + }"></u-icon> + </view> + <text v-if="closeAble && closeText" class="u-close-text" :style="{ + top: description ? '18rpx' : '24rpx' + }">{{closeText}}</text> + </view> +</template> + +<script> + /** + * alertTips 璀﹀憡鎻愮ず + * @description 璀﹀憡鎻愮ず锛屽睍鐜伴渶瑕佸叧娉ㄧ殑淇℃伅 + * @tutorial https://uviewui.com/components/alertTips.html + * @property {String} title 鏄剧ず鐨勬爣棰樻枃瀛� + * @property {String} description 杈呭姪鎬ф枃瀛楋紝棰滆壊姣攖itle娴呬竴鐐癸紝瀛楀彿涔熷皬涓�鐐癸紝鍙�� + * @property {String} type 鍏抽棴鎸夐挳(榛樿涓哄弶鍙穒con鍥炬爣) + * @property {String} icon 鍥炬爣鍚嶇О + * @property {Object} icon-style 鍥炬爣鐨勬牱寮忥紝瀵硅薄褰㈠紡 + * @property {Object} title-style 鏍囬鐨勬牱寮忥紝瀵硅薄褰㈠紡 + * @property {Object} desc-style 鎻忚堪鐨勬牱寮忥紝瀵硅薄褰㈠紡 + * @property {String} close-able 鐢ㄦ枃瀛楁浛浠e叧闂浘鏍囷紝close-able涓簍rue鏃舵湁鏁� + * @property {Boolean} show-icon 鏄惁鏄剧ず宸﹁竟鐨勮緟鍔╁浘鏍� + * @property {Boolean} show 鏄剧ず鎴栭殣钘忕粍浠� + * @event {Function} click 鐐瑰嚮缁勪欢鏃惰Е鍙� + * @event {Function} close 鐐瑰嚮鍏抽棴鎸夐挳鏃惰Е鍙� + */ + export default { + name: 'u-alert-tips', + props: { + // 鏄剧ず鏂囧瓧 + title: { + type: String, + default: '' + }, + // 涓婚锛宻uccess/warning/info/error + type: { + type: String, + default: 'warning' + }, + // 杈呭姪鎬ф枃瀛� + description: { + type: String, + default: '' + }, + // 鏄惁鍙叧闂� + closeAble: { + type: Boolean, + default: false + }, + // 鍏抽棴鎸夐挳鑷畾涔夋枃鏈� + closeText: { + type: String, + default: '' + }, + // 鏄惁鏄剧ず鍥炬爣 + showIcon: { + type: Boolean, + default: false + }, + // 鏂囧瓧棰滆壊锛屽鏋滃畾涔変簡color鍊硷紝icon浼氬け鏁� + color: { + type: String, + default: '' + }, + // 鑳屾櫙棰滆壊 + bgColor: { + type: String, + default: '' + }, + // 杈规棰滆壊 + borderColor: { + type: String, + default: '' + }, + // 鏄惁鏄剧ず + show: { + type: Boolean, + default: true + }, + // 宸﹁竟鏄剧ず鐨刬con + icon: { + type: String, + default: '' + }, + // icon鐨勬牱寮� + iconStyle: { + type: Object, + default() { + return {} + } + }, + // 鏍囬鐨勬牱寮� + titleStyle: { + type: Object, + default() { + return {} + } + }, + // 鎻忚堪鏂囧瓧鐨勬牱寮� + descStyle: { + type: Object, + default() { + return {} + } + }, + }, + data() { + return { + } + }, + computed: { + uTitleStyle() { + let style = {}; + // 濡傛灉鏈夋弿杩版枃瀛楃殑璇濓紝鏍囬杩涜鍔犵矖 + style.fontWeight = this.description ? 500 : 'normal'; + // 灏嗙敤鎴蜂紶鍏ユ牱寮忓璞″拰style鍚堝苟锛屼紶鍏ョ殑浼樺厛绾ф瘮style楂橈紝鍚屽睘鎬т細琚鐩� + return this.$u.deepMerge(style, this.titleStyle); + }, + uIcon() { + // 濡傛灉鏈夎缃甶con鍚嶇О灏变娇鐢紝鍚﹀垯鏍规嵁type涓婚锛屾帹瀹氫竴涓粯璁ょ殑鍥炬爣 + return this.icon ? this.icon : this.$u.type2icon(this.type); + }, + uIconType() { + // 濡傛灉鏈夎缃浘鏍囩殑鏍峰紡锛屼紭鍏堜娇鐢紝娌℃湁鐨勮瘽锛屽垯鐢╰ype鐨勬牱寮� + return Object.keys(this.iconStyle).length ? '' : this.type; + } + }, + methods: { + // 鐐瑰嚮鍐呭 + click() { + this.$emit('click'); + }, + // 鐐瑰嚮鍏抽棴鎸夐挳 + close() { + this.$emit('close'); + } + } + } +</script> + +<style lang="scss" scoped> + @import "../../libs/css/style.components.scss"; + + .u-alert-tips { + @include vue-flex; + align-items: center; + padding: 16rpx 30rpx; + border-radius: 8rpx; + position: relative; + transition: all 0.3s linear; + border: 1px solid #fff; + + &--bg--primary-light { + background-color: $u-type-primary-light; + } + + &--bg--info-light { + background-color: $u-type-info-light; + } + + &--bg--success-light { + background-color: $u-type-success-light; + } + + &--bg--warning-light { + background-color: $u-type-warning-light; + } + + &--bg--error-light { + background-color: $u-type-error-light; + } + + &--border--primary-disabled { + border-color: $u-type-primary-disabled; + } + + &--border--success-disabled { + border-color: $u-type-success-disabled; + } + + &--border--error-disabled { + border-color: $u-type-error-disabled; + } + + &--border--warning-disabled { + border-color: $u-type-warning-disabled; + } + + &--border--info-disabled { + border-color: $u-type-info-disabled; + } + } + + .u-close-alert-tips { + opacity: 0; + visibility: hidden; + } + + .u-icon { + margin-right: 16rpx; + } + + .u-alert-title { + font-size: 28rpx; + color: $u-main-color; + } + + .u-alert-desc { + font-size: 26rpx; + text-align: left; + color: $u-content-color; + } + + .u-close-icon { + position: absolute; + top: 20rpx; + right: 20rpx; + } + + .u-close-hover { + color: red; + } + + .u-close-text { + font-size: 24rpx; + color: $u-tips-color; + position: absolute; + top: 20rpx; + right: 20rpx; + line-height: 1; + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-avatar-cropper/u-avatar-cropper.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-avatar-cropper/u-avatar-cropper.vue" new file mode 100644 index 0000000..a48dd54 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-avatar-cropper/u-avatar-cropper.vue" @@ -0,0 +1,290 @@ +<template> + <view class="content"> + <view class="cropper-wrapper" :style="{ height: cropperOpt.height + 'px' }"> + <canvas + class="cropper" + :disable-scroll="true" + @touchstart="touchStart" + @touchmove="touchMove" + @touchend="touchEnd" + :style="{ width: cropperOpt.width, height: cropperOpt.height, backgroundColor: 'rgba(0, 0, 0, 0.8)' }" + canvas-id="cropper" + id="cropper" + ></canvas> + <canvas + class="cropper" + :disable-scroll="true" + :style="{ + position: 'fixed', + top: `-${cropperOpt.width * cropperOpt.pixelRatio}px`, + left: `-${cropperOpt.height * cropperOpt.pixelRatio}px`, + width: `${cropperOpt.width * cropperOpt.pixelRatio}px`, + height: `${cropperOpt.height * cropperOpt.pixelRatio}` + }" + canvas-id="targetId" + id="targetId" + ></canvas> + </view> + <view class="cropper-buttons safe-area-padding" :style="{ height: bottomNavHeight + 'px' }"> + <!-- #ifdef H5 --> + <view class="upload" @tap="uploadTap">閫夋嫨鍥剧墖</view> + <!-- #endif --> + <!-- #ifndef H5 --> + <view class="upload" @tap="uploadTap">閲嶆柊閫夋嫨</view> + <!-- #endif --> + <view class="getCropperImage" @tap="getCropperImage(false)">纭畾</view> + </view> + </view> +</template> + +<script> +import WeCropper from './weCropper.js'; +export default { + props: { + // 瑁佸壀鐭╁舰妗嗙殑鏍峰紡锛屽叾涓彲鍖呭惈鐨勫睘鎬т负lineWidth-杈规瀹藉害(鍗曚綅rpx)锛宑olor: 杈规棰滆壊锛� + // mask-閬僵棰滆壊锛屼竴鑸缃负涓�涓猺gba鐨勯�忔槑搴︼紝濡�"rgba(0, 0, 0, 0.35)" + boundStyle: { + type: Object, + default() { + return { + lineWidth: 4, + borderColor: 'rgb(245, 245, 245)', + mask: 'rgba(0, 0, 0, 0.35)' + }; + } + } + // // 瑁佸壀妗嗗搴︼紝鍗曚綅rpx + // rectWidth: { + // type: [String, Number], + // default: 400 + // }, + // // 瑁佸壀妗嗛珮搴︼紝鍗曚綅rpx + // rectHeight: { + // type: [String, Number], + // default: 400 + // }, + // // 杈撳嚭鍥剧墖瀹藉害锛屽崟浣峳px + // destWidth: { + // type: [String, Number], + // default: 400 + // }, + // // 杈撳嚭鍥剧墖楂樺害锛屽崟浣峳px + // destHeight: { + // type: [String, Number], + // default: 400 + // }, + // // 杈撳嚭鐨勫浘鐗囩被鍨嬶紝濡傛灉鍙戠幇瑁佸壀鐨勫浘鐗囧緢澶э紝鍙兘鏄洜涓鸿缃负浜�"png"锛屾敼鎴�"jpg"鍗冲彲 + // fileType: { + // type: String, + // default: 'jpg', + // }, + // // 鐢熸垚鐨勫浘鐗囪川閲� + // // H5涓婃棤鏁堬紝鐩墠涓嶈�冭檻浣跨敤姝ゅ弬鏁� + // quality: { + // type: [Number, String], + // default: 1 + // } + }, + data() { + return { + // 搴曢儴瀵艰埅鐨勯珮搴� + bottomNavHeight: 50, + originWidth: 200, + width: 0, + height: 0, + cropperOpt: { + id: 'cropper', + targetId: 'targetCropper', + pixelRatio: 1, + width: 0, + height: 0, + scale: 2.5, + zoom: 8, + cut: { + x: (this.width - this.originWidth) / 2, + y: (this.height - this.originWidth) / 2, + width: this.originWidth, + height: this.originWidth + }, + boundStyle: { + lineWidth: uni.upx2px(this.boundStyle.lineWidth), + mask: this.boundStyle.mask, + color: this.boundStyle.borderColor + } + }, + // 瑁佸壀妗嗗拰杈撳嚭鍥剧墖鐨勫昂瀵革紝楂樺害榛樿绛変簬瀹藉害 + // 杈撳嚭鍥剧墖瀹藉害锛屽崟浣峱x + destWidth: 200, + // 瑁佸壀妗嗗搴︼紝鍗曚綅px + rectWidth: 200, + // 杈撳嚭鐨勫浘鐗囩被鍨嬶紝濡傛灉'png'绫诲瀷鍙戠幇瑁佸壀鐨勫浘鐗囧お澶э紝鏀规垚"jpg"鍗冲彲 + fileType: 'jpg', + src: '', // 閫夋嫨鐨勫浘鐗囪矾寰勶紝鐢ㄤ簬鍦ㄧ偣鍑荤‘瀹氭椂锛屽垽鏂槸鍚﹂�夋嫨浜嗗浘鐗� + }; + }, + onLoad(option) { + let rectInfo = uni.getSystemInfoSync(); + this.width = rectInfo.windowWidth; + this.height = rectInfo.windowHeight - this.bottomNavHeight; + this.cropperOpt.width = this.width; + this.cropperOpt.height = this.height; + this.cropperOpt.pixelRatio = rectInfo.pixelRatio; + + if (option.destWidth) this.destWidth = option.destWidth; + if (option.rectWidth) { + let rectWidth = Number(option.rectWidth); + this.cropperOpt.cut = { + x: (this.width - rectWidth) / 2, + y: (this.height - rectWidth) / 2, + width: rectWidth, + height: rectWidth + }; + } + this.rectWidth = option.rectWidth; + if (option.fileType) this.fileType = option.fileType; + // 鍒濆鍖� + this.cropper = new WeCropper(this.cropperOpt) + .on('ready', ctx => { + // wecropper is ready for work! + }) + .on('beforeImageLoad', ctx => { + // before picture loaded, i can do something + }) + .on('imageLoad', ctx => { + // picture loaded + }) + .on('beforeDraw', (ctx, instance) => { + // before canvas draw,i can do something + }); + // 璁剧疆瀵艰埅鏍忔牱寮忥紝浠ュ厤鐢ㄦ埛鍦╬age.json涓病鏈夎缃负榛戣壊鑳屾櫙 + uni.setNavigationBarColor({ + frontColor: '#ffffff', + backgroundColor: '#000000' + }); + uni.chooseImage({ + count: 1, // 榛樿9 + sizeType: ['compressed'], // 鍙互鎸囧畾鏄師鍥捐繕鏄帇缂╁浘锛岄粯璁や簩鑰呴兘鏈� + sourceType: ['album', 'camera'], // 鍙互鎸囧畾鏉ユ簮鏄浉鍐岃繕鏄浉鏈猴紝榛樿浜岃�呴兘鏈� + success: res => { + this.src = res.tempFilePaths[0]; + // 鑾峰彇瑁佸壀鍥剧墖璧勬簮鍚庯紝缁檇ata娣诲姞src灞炴�у強鍏跺�� + this.cropper.pushOrign(this.src); + } + }); + }, + methods: { + touchStart(e) { + this.cropper.touchStart(e); + }, + touchMove(e) { + this.cropper.touchMove(e); + }, + touchEnd(e) { + this.cropper.touchEnd(e); + }, + getCropperImage(isPre = false) { + if(!this.src) return this.$u.toast('璇峰厛閫夋嫨鍥剧墖鍐嶈鍓�'); + + let cropper_opt = { + destHeight: Number(this.destWidth), // uni.canvasToTempFilePath瑕佹眰杩欎簺鍙傛暟涓烘暟鍊� + destWidth: Number(this.destWidth), + fileType: this.fileType + }; + this.cropper.getCropperImage(cropper_opt, (path, err) => { + if (err) { + uni.showModal({ + title: '娓╅Θ鎻愮ず', + content: err.message + }); + } else { + if (isPre) { + uni.previewImage({ + current: '', // 褰撳墠鏄剧ず鍥剧墖鐨� http 閾炬帴 + urls: [path] // 闇�瑕侀瑙堢殑鍥剧墖 http 閾炬帴鍒楄〃 + }); + } else { + uni.$emit('uAvatarCropper', path); + this.$u.route({ + type: 'back' + }); + } + } + }); + }, + uploadTap() { + const self = this; + uni.chooseImage({ + count: 1, // 榛樿9 + sizeType: ['original', 'compressed'], // 鍙互鎸囧畾鏄師鍥捐繕鏄帇缂╁浘锛岄粯璁や簩鑰呴兘鏈� + sourceType: ['album', 'camera'], // 鍙互鎸囧畾鏉ユ簮鏄浉鍐岃繕鏄浉鏈猴紝榛樿浜岃�呴兘鏈� + success: (res) => { + self.src = res.tempFilePaths[0]; + // 鑾峰彇瑁佸壀鍥剧墖璧勬簮鍚庯紝缁檇ata娣诲姞src灞炴�у強鍏跺�� + + self.cropper.pushOrign(this.src); + } + }); + } + } +}; +</script> + +<style scoped lang="scss"> +@import '../../libs/css/style.components.scss'; + +.content { + background: rgba(255, 255, 255, 1); +} + +.cropper { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 11; +} + +.cropper-buttons { + background-color: #000000; + color: #eee; +} + +.cropper-wrapper { + position: relative; + @include vue-flex; + flex-direction: row; + justify-content: space-between; + align-items: center; + width: 100%; + background-color: #000; +} + +.cropper-buttons { + width: 100vw; + @include vue-flex; + flex-direction: row; + justify-content: space-between; + align-items: center; + position: fixed; + bottom: 0; + left: 0; + font-size: 28rpx; +} + +.cropper-buttons .upload, +.cropper-buttons .getCropperImage { + width: 50%; + text-align: center; +} + +.cropper-buttons .upload { + text-align: left; + padding-left: 50rpx; +} + +.cropper-buttons .getCropperImage { + text-align: right; + padding-right: 50rpx; +} +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-avatar-cropper/weCropper.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-avatar-cropper/weCropper.js" new file mode 100644 index 0000000..df02483 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-avatar-cropper/weCropper.js" @@ -0,0 +1,1265 @@ +/** + * we-cropper v1.3.9 + * (c) 2020 dlhandsome + * @license MIT + */ +(function(global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global.WeCropper = factory()); +}(this, (function() { + 'use strict'; + + var device = void 0; + var TOUCH_STATE = ['touchstarted', 'touchmoved', 'touchended']; + + function firstLetterUpper(str) { + return str.charAt(0).toUpperCase() + str.slice(1) + } + + function setTouchState(instance) { + var arg = [], + len = arguments.length - 1; + while (len-- > 0) arg[len] = arguments[len + 1]; + + TOUCH_STATE.forEach(function(key, i) { + if (arg[i] !== undefined) { + instance[key] = arg[i]; + } + }); + } + + function validator(instance, o) { + Object.defineProperties(instance, o); + } + + function getDevice() { + if (!device) { + device = uni.getSystemInfoSync(); + } + return device + } + + var tmp = {}; + + var ref = getDevice(); + var pixelRatio = ref.pixelRatio; + + var DEFAULT = { + id: { + default: 'cropper', + get: function get() { + return tmp.id + }, + set: function set(value) { + if (typeof(value) !== 'string') { + console.error(("id锛�" + value + " is invalid")); + } + tmp.id = value; + } + }, + width: { + default: 750, + get: function get() { + return tmp.width + }, + set: function set(value) { + if (typeof(value) !== 'number') { + console.error(("width锛�" + value + " is invalid")); + } + tmp.width = value; + } + }, + height: { + default: 750, + get: function get() { + return tmp.height + }, + set: function set(value) { + if (typeof(value) !== 'number') { + console.error(("height锛�" + value + " is invalid")); + } + tmp.height = value; + } + }, + pixelRatio: { + default: pixelRatio, + get: function get() { + return tmp.pixelRatio + }, + set: function set(value) { + if (typeof(value) !== 'number') { + console.error(("pixelRatio锛�" + value + " is invalid")); + } + tmp.pixelRatio = value; + } + }, + scale: { + default: 2.5, + get: function get() { + return tmp.scale + }, + set: function set(value) { + if (typeof(value) !== 'number') { + console.error(("scale锛�" + value + " is invalid")); + } + tmp.scale = value; + } + }, + zoom: { + default: 5, + get: function get() { + return tmp.zoom + }, + set: function set(value) { + if (typeof(value) !== 'number') { + console.error(("zoom锛�" + value + " is invalid")); + } else if (value < 0 || value > 10) { + console.error("zoom should be ranged in 0 ~ 10"); + } + tmp.zoom = value; + } + }, + src: { + default: '', + get: function get() { + return tmp.src + }, + set: function set(value) { + if (typeof(value) !== 'string') { + console.error(("src锛�" + value + " is invalid")); + } + tmp.src = value; + } + }, + cut: { + default: {}, + get: function get() { + return tmp.cut + }, + set: function set(value) { + if (typeof(value) !== 'object') { + console.error(("cut锛�" + value + " is invalid")); + } + tmp.cut = value; + } + }, + boundStyle: { + default: {}, + get: function get() { + return tmp.boundStyle + }, + set: function set(value) { + if (typeof(value) !== 'object') { + console.error(("boundStyle锛�" + value + " is invalid")); + } + tmp.boundStyle = value; + } + }, + onReady: { + default: null, + get: function get() { + return tmp.ready + }, + set: function set(value) { + tmp.ready = value; + } + }, + onBeforeImageLoad: { + default: null, + get: function get() { + return tmp.beforeImageLoad + }, + set: function set(value) { + tmp.beforeImageLoad = value; + } + }, + onImageLoad: { + default: null, + get: function get() { + return tmp.imageLoad + }, + set: function set(value) { + tmp.imageLoad = value; + } + }, + onBeforeDraw: { + default: null, + get: function get() { + return tmp.beforeDraw + }, + set: function set(value) { + tmp.beforeDraw = value; + } + } + }; + + var ref$1 = getDevice(); + var windowWidth = ref$1.windowWidth; + + function prepare() { + var self = this; + + // v1.4.0 鐗堟湰涓皢涓嶅啀鑷姩缁戝畾we-cropper瀹炰緥 + self.attachPage = function() { + var pages = getCurrentPages(); + // 鑾峰彇鍒板綋鍓峱age涓婁笅鏂� + var pageContext = pages[pages.length - 1]; + // 鎶妕his渚濋檮鍦≒age涓婁笅鏂囩殑wecropper灞炴�т笂锛屼究浜庡湪page閽╁瓙鍑芥暟涓闂� + Object.defineProperty(pageContext, 'wecropper', { + get: function get() { + console.warn( + 'Instance will not be automatically bound to the page after v1.4.0\n\n' + + 'Please use a custom instance name instead\n\n' + + 'Example: \n' + + 'this.mycropper = new WeCropper(options)\n\n' + + '// ...\n' + + 'this.mycropper.getCropperImage()' + ); + return self + }, + configurable: true + }); + }; + + self.createCtx = function() { + var id = self.id; + var targetId = self.targetId; + + if (id) { + self.ctx = self.ctx || uni.createCanvasContext(id); + self.targetCtx = self.targetCtx || uni.createCanvasContext(targetId); + } else { + console.error("constructor: create canvas context failed, 'id' must be valuable"); + } + }; + + self.deviceRadio = windowWidth / 750; + } + + var commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== + 'undefined' ? self : {}; + + + + + + function createCommonjsModule(fn, module) { + return module = { + exports: {} + }, fn(module, module.exports), module.exports; + } + + var tools = createCommonjsModule(function(module, exports) { + /** + * String type check + */ + exports.isStr = function(v) { + return typeof v === 'string'; + }; + /** + * Number type check + */ + exports.isNum = function(v) { + return typeof v === 'number'; + }; + /** + * Array type check + */ + exports.isArr = Array.isArray; + /** + * undefined type check + */ + exports.isUndef = function(v) { + return v === undefined; + }; + + exports.isTrue = function(v) { + return v === true; + }; + + exports.isFalse = function(v) { + return v === false; + }; + /** + * Function type check + */ + exports.isFunc = function(v) { + return typeof v === 'function'; + }; + /** + * Quick object check - this is primarily used to tell + * Objects from primitive values when we know the value + * is a JSON-compliant type. + */ + exports.isObj = exports.isObject = function(obj) { + return obj !== null && typeof obj === 'object' + }; + + /** + * Strict object type check. Only returns true + * for plain JavaScript objects. + */ + var _toString = Object.prototype.toString; + exports.isPlainObject = function(obj) { + return _toString.call(obj) === '[object Object]' + }; + + /** + * Check whether the object has the property. + */ + var hasOwnProperty = Object.prototype.hasOwnProperty; + exports.hasOwn = function(obj, key) { + return hasOwnProperty.call(obj, key) + }; + + /** + * Perform no operation. + * Stubbing args to make Flow happy without leaving useless transpiled code + * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/) + */ + exports.noop = function(a, b, c) {}; + + /** + * Check if val is a valid array index. + */ + exports.isValidArrayIndex = function(val) { + var n = parseFloat(String(val)); + return n >= 0 && Math.floor(n) === n && isFinite(val) + }; + }); + + var tools_7 = tools.isFunc; + var tools_10 = tools.isPlainObject; + + var EVENT_TYPE = ['ready', 'beforeImageLoad', 'beforeDraw', 'imageLoad']; + + function observer() { + var self = this; + + self.on = function(event, fn) { + if (EVENT_TYPE.indexOf(event) > -1) { + if (tools_7(fn)) { + event === 'ready' ? + fn(self) : + self[("on" + (firstLetterUpper(event)))] = fn; + } + } else { + console.error(("event: " + event + " is invalid")); + } + return self + }; + } + + function wxPromise(fn) { + return function(obj) { + var args = [], + len = arguments.length - 1; + while (len-- > 0) args[len] = arguments[len + 1]; + + if (obj === void 0) obj = {}; + return new Promise(function(resolve, reject) { + obj.success = function(res) { + resolve(res); + }; + obj.fail = function(err) { + reject(err); + }; + fn.apply(void 0, [obj].concat(args)); + }) + } + } + + function draw(ctx, reserve) { + if (reserve === void 0) reserve = false; + + return new Promise(function(resolve) { + ctx.draw(reserve, resolve); + }) + } + + var getImageInfo = wxPromise(uni.getImageInfo); + + var canvasToTempFilePath = wxPromise(uni.canvasToTempFilePath); + + var base64 = createCommonjsModule(function(module, exports) { + /*! http://mths.be/base64 v0.1.0 by @mathias | MIT license */ + (function(root) { + + // Detect free variables `exports`. + var freeExports = 'object' == 'object' && exports; + + // Detect free variable `module`. + var freeModule = 'object' == 'object' && module && + module.exports == freeExports && module; + + // Detect free variable `global`, from Node.js or Browserified code, and use + // it as `root`. + var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal; + if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) { + root = freeGlobal; + } + + /*--------------------------------------------------------------------------*/ + + var InvalidCharacterError = function(message) { + this.message = message; + }; + InvalidCharacterError.prototype = new Error; + InvalidCharacterError.prototype.name = 'InvalidCharacterError'; + + var error = function(message) { + // Note: the error messages used throughout this file match those used by + // the native `atob`/`btoa` implementation in Chromium. + throw new InvalidCharacterError(message); + }; + + var TABLE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; + // http://whatwg.org/html/common-microsyntaxes.html#space-character + var REGEX_SPACE_CHARACTERS = /[\t\n\f\r ]/g; + + // `decode` is designed to be fully compatible with `atob` as described in the + // HTML Standard. http://whatwg.org/html/webappapis.html#dom-windowbase64-atob + // The optimized base64-decoding algorithm used is based on @atk鈥檚 excellent + // implementation. https://gist.github.com/atk/1020396 + var decode = function(input) { + input = String(input) + .replace(REGEX_SPACE_CHARACTERS, ''); + var length = input.length; + if (length % 4 == 0) { + input = input.replace(/==?$/, ''); + length = input.length; + } + if ( + length % 4 == 1 || + // http://whatwg.org/C#alphanumeric-ascii-characters + /[^+a-zA-Z0-9/]/.test(input) + ) { + error( + 'Invalid character: the string to be decoded is not correctly encoded.' + ); + } + var bitCounter = 0; + var bitStorage; + var buffer; + var output = ''; + var position = -1; + while (++position < length) { + buffer = TABLE.indexOf(input.charAt(position)); + bitStorage = bitCounter % 4 ? bitStorage * 64 + buffer : buffer; + // Unless this is the first of a group of 4 characters鈥� + if (bitCounter++ % 4) { + // 鈥onvert the first 8 bits to a single ASCII character. + output += String.fromCharCode( + 0xFF & bitStorage >> (-2 * bitCounter & 6) + ); + } + } + return output; + }; + + // `encode` is designed to be fully compatible with `btoa` as described in the + // HTML Standard: http://whatwg.org/html/webappapis.html#dom-windowbase64-btoa + var encode = function(input) { + input = String(input); + if (/[^\0-\xFF]/.test(input)) { + // Note: no need to special-case astral symbols here, as surrogates are + // matched, and the input is supposed to only contain ASCII anyway. + error( + 'The string to be encoded contains characters outside of the ' + + 'Latin1 range.' + ); + } + var padding = input.length % 3; + var output = ''; + var position = -1; + var a; + var b; + var c; + var buffer; + // Make sure any padding is handled outside of the loop. + var length = input.length - padding; + + while (++position < length) { + // Read three bytes, i.e. 24 bits. + a = input.charCodeAt(position) << 16; + b = input.charCodeAt(++position) << 8; + c = input.charCodeAt(++position); + buffer = a + b + c; + // Turn the 24 bits into four chunks of 6 bits each, and append the + // matching character for each of them to the output. + output += ( + TABLE.charAt(buffer >> 18 & 0x3F) + + TABLE.charAt(buffer >> 12 & 0x3F) + + TABLE.charAt(buffer >> 6 & 0x3F) + + TABLE.charAt(buffer & 0x3F) + ); + } + + if (padding == 2) { + a = input.charCodeAt(position) << 8; + b = input.charCodeAt(++position); + buffer = a + b; + output += ( + TABLE.charAt(buffer >> 10) + + TABLE.charAt((buffer >> 4) & 0x3F) + + TABLE.charAt((buffer << 2) & 0x3F) + + '=' + ); + } else if (padding == 1) { + buffer = input.charCodeAt(position); + output += ( + TABLE.charAt(buffer >> 2) + + TABLE.charAt((buffer << 4) & 0x3F) + + '==' + ); + } + + return output; + }; + + var base64 = { + 'encode': encode, + 'decode': decode, + 'version': '0.1.0' + }; + + // Some AMD build optimizers, like r.js, check for specific condition patterns + // like the following: + if ( + typeof undefined == 'function' && + typeof undefined.amd == 'object' && + undefined.amd + ) { + undefined(function() { + return base64; + }); + } else if (freeExports && !freeExports.nodeType) { + if (freeModule) { // in Node.js or RingoJS v0.8.0+ + freeModule.exports = base64; + } else { // in Narwhal or RingoJS v0.7.0- + for (var key in base64) { + base64.hasOwnProperty(key) && (freeExports[key] = base64[key]); + } + } + } else { // in Rhino or a web browser + root.base64 = base64; + } + + }(commonjsGlobal)); + }); + + function makeURI(strData, type) { + return 'data:' + type + ';base64,' + strData + } + + function fixType(type) { + type = type.toLowerCase().replace(/jpg/i, 'jpeg'); + var r = type.match(/png|jpeg|bmp|gif/)[0]; + return 'image/' + r + } + + function encodeData(data) { + var str = ''; + if (typeof data === 'string') { + str = data; + } else { + for (var i = 0; i < data.length; i++) { + str += String.fromCharCode(data[i]); + } + } + return base64.encode(str) + } + + /** + * 鑾峰彇鍥惧儚鍖哄煙闅愬惈鐨勫儚绱犳暟鎹� + * @param canvasId canvas鏍囪瘑 + * @param x 灏嗚琚彁鍙栫殑鍥惧儚鏁版嵁鐭╁舰鍖哄煙鐨勫乏涓婅 x 鍧愭爣 + * @param y 灏嗚琚彁鍙栫殑鍥惧儚鏁版嵁鐭╁舰鍖哄煙鐨勫乏涓婅 y 鍧愭爣 + * @param width 灏嗚琚彁鍙栫殑鍥惧儚鏁版嵁鐭╁舰鍖哄煙鐨勫搴� + * @param height 灏嗚琚彁鍙栫殑鍥惧儚鏁版嵁鐭╁舰鍖哄煙鐨勯珮搴� + * @param done 瀹屾垚鍥炶皟 + */ + function getImageData(canvasId, x, y, width, height, done) { + uni.canvasGetImageData({ + canvasId: canvasId, + x: x, + y: y, + width: width, + height: height, + success: function success(res) { + done(res, null); + }, + fail: function fail(res) { + done(null, res); + } + }); + } + + /** + * 鐢熸垚bmp鏍煎紡鍥剧墖 + * 鎸夌収瑙勫垯鐢熸垚鍥剧墖鍝嶅簲澶村拰鍝嶅簲浣� + * @param oData 鐢ㄦ潵鎻忚堪 canvas 鍖哄煙闅愬惈鐨勫儚绱犳暟鎹� { data, width, height } = oData + * @returns {*} base64瀛楃涓� + */ + function genBitmapImage(oData) { + // + // BITMAPFILEHEADER: http://msdn.microsoft.com/en-us/library/windows/desktop/dd183374(v=vs.85).aspx + // BITMAPINFOHEADER: http://msdn.microsoft.com/en-us/library/dd183376.aspx + // + var biWidth = oData.width; + var biHeight = oData.height; + var biSizeImage = biWidth * biHeight * 3; + var bfSize = biSizeImage + 54; // total header size = 54 bytes + + // + // typedef struct tagBITMAPFILEHEADER { + // WORD bfType; + // DWORD bfSize; + // WORD bfReserved1; + // WORD bfReserved2; + // DWORD bfOffBits; + // } BITMAPFILEHEADER; + // + var BITMAPFILEHEADER = [ + // WORD bfType -- The file type signature; must be "BM" + 0x42, 0x4D, + // DWORD bfSize -- The size, in bytes, of the bitmap file + bfSize & 0xff, bfSize >> 8 & 0xff, bfSize >> 16 & 0xff, bfSize >> 24 & 0xff, + // WORD bfReserved1 -- Reserved; must be zero + 0, 0, + // WORD bfReserved2 -- Reserved; must be zero + 0, 0, + // DWORD bfOffBits -- The offset, in bytes, from the beginning of the BITMAPFILEHEADER structure to the bitmap bits. + 54, 0, 0, 0 + ]; + + // + // typedef struct tagBITMAPINFOHEADER { + // DWORD biSize; + // LONG biWidth; + // LONG biHeight; + // WORD biPlanes; + // WORD biBitCount; + // DWORD biCompression; + // DWORD biSizeImage; + // LONG biXPelsPerMeter; + // LONG biYPelsPerMeter; + // DWORD biClrUsed; + // DWORD biClrImportant; + // } BITMAPINFOHEADER, *PBITMAPINFOHEADER; + // + var BITMAPINFOHEADER = [ + // DWORD biSize -- The number of bytes required by the structure + 40, 0, 0, 0, + // LONG biWidth -- The width of the bitmap, in pixels + biWidth & 0xff, biWidth >> 8 & 0xff, biWidth >> 16 & 0xff, biWidth >> 24 & 0xff, + // LONG biHeight -- The height of the bitmap, in pixels + biHeight & 0xff, biHeight >> 8 & 0xff, biHeight >> 16 & 0xff, biHeight >> 24 & 0xff, + // WORD biPlanes -- The number of planes for the target device. This value must be set to 1 + 1, 0, + // WORD biBitCount -- The number of bits-per-pixel, 24 bits-per-pixel -- the bitmap + // has a maximum of 2^24 colors (16777216, Truecolor) + 24, 0, + // DWORD biCompression -- The type of compression, BI_RGB (code 0) -- uncompressed + 0, 0, 0, 0, + // DWORD biSizeImage -- The size, in bytes, of the image. This may be set to zero for BI_RGB bitmaps + biSizeImage & 0xff, biSizeImage >> 8 & 0xff, biSizeImage >> 16 & 0xff, biSizeImage >> 24 & 0xff, + // LONG biXPelsPerMeter, unused + 0, 0, 0, 0, + // LONG biYPelsPerMeter, unused + 0, 0, 0, 0, + // DWORD biClrUsed, the number of color indexes of palette, unused + 0, 0, 0, 0, + // DWORD biClrImportant, unused + 0, 0, 0, 0 + ]; + + var iPadding = (4 - ((biWidth * 3) % 4)) % 4; + + var aImgData = oData.data; + + var strPixelData = ''; + var biWidth4 = biWidth << 2; + var y = biHeight; + var fromCharCode = String.fromCharCode; + + do { + var iOffsetY = biWidth4 * (y - 1); + var strPixelRow = ''; + for (var x = 0; x < biWidth; x++) { + var iOffsetX = x << 2; + strPixelRow += fromCharCode(aImgData[iOffsetY + iOffsetX + 2]) + + fromCharCode(aImgData[iOffsetY + iOffsetX + 1]) + + fromCharCode(aImgData[iOffsetY + iOffsetX]); + } + + for (var c = 0; c < iPadding; c++) { + strPixelRow += String.fromCharCode(0); + } + + strPixelData += strPixelRow; + } while (--y) + + var strEncoded = encodeData(BITMAPFILEHEADER.concat(BITMAPINFOHEADER)) + encodeData(strPixelData); + + return strEncoded + } + + /** + * 杞崲涓哄浘鐗嘼ase64 + * @param canvasId canvas鏍囪瘑 + * @param x 灏嗚琚彁鍙栫殑鍥惧儚鏁版嵁鐭╁舰鍖哄煙鐨勫乏涓婅 x 鍧愭爣 + * @param y 灏嗚琚彁鍙栫殑鍥惧儚鏁版嵁鐭╁舰鍖哄煙鐨勫乏涓婅 y 鍧愭爣 + * @param width 灏嗚琚彁鍙栫殑鍥惧儚鏁版嵁鐭╁舰鍖哄煙鐨勫搴� + * @param height 灏嗚琚彁鍙栫殑鍥惧儚鏁版嵁鐭╁舰鍖哄煙鐨勯珮搴� + * @param type 杞崲鍥剧墖绫诲瀷 + * @param done 瀹屾垚鍥炶皟 + */ + function convertToImage(canvasId, x, y, width, height, type, done) { + if (done === void 0) done = function() {}; + + if (type === undefined) { + type = 'png'; + } + type = fixType(type); + if (/bmp/.test(type)) { + getImageData(canvasId, x, y, width, height, function(data, err) { + var strData = genBitmapImage(data); + tools_7(done) && done(makeURI(strData, 'image/' + type), err); + }); + } else { + console.error('鏆備笉鏀寔鐢熸垚\'' + type + '\'绫诲瀷鐨刡ase64鍥剧墖'); + } + } + + var CanvasToBase64 = { + convertToImage: convertToImage, + // convertToPNG: function (width, height, done) { + // return convertToImage(width, height, 'png', done) + // }, + // convertToJPEG: function (width, height, done) { + // return convertToImage(width, height, 'jpeg', done) + // }, + // convertToGIF: function (width, height, done) { + // return convertToImage(width, height, 'gif', done) + // }, + convertToBMP: function(ref, done) { + if (ref === void 0) ref = {}; + var canvasId = ref.canvasId; + var x = ref.x; + var y = ref.y; + var width = ref.width; + var height = ref.height; + if (done === void 0) done = function() {}; + + return convertToImage(canvasId, x, y, width, height, 'bmp', done) + } + }; + + function methods() { + var self = this; + + var boundWidth = self.width; // 瑁佸壀妗嗛粯璁ゅ搴︼紝鍗虫暣涓敾甯冨搴� + var boundHeight = self.height; // 瑁佸壀妗嗛粯璁ら珮搴︼紝鍗虫暣涓敾甯冮珮搴� + + var id = self.id; + var targetId = self.targetId; + var pixelRatio = self.pixelRatio; + + var ref = self.cut; + var x = ref.x; + if (x === void 0) x = 0; + var y = ref.y; + if (y === void 0) y = 0; + var width = ref.width; + if (width === void 0) width = boundWidth; + var height = ref.height; + if (height === void 0) height = boundHeight; + + self.updateCanvas = function(done) { + if (self.croperTarget) { + // 鐢诲竷缁樺埗鍥剧墖 + self.ctx.drawImage( + self.croperTarget, + self.imgLeft, + self.imgTop, + self.scaleWidth, + self.scaleHeight + ); + } + tools_7(self.onBeforeDraw) && self.onBeforeDraw(self.ctx, self); + + self.setBoundStyle(self.boundStyle); // 璁剧疆杈圭晫鏍峰紡 + + self.ctx.draw(false, done); + return self + }; + + self.pushOrigin = self.pushOrign = function(src) { + self.src = src; + + tools_7(self.onBeforeImageLoad) && self.onBeforeImageLoad(self.ctx, self); + + return getImageInfo({ + src: src + }) + .then(function(res) { + var innerAspectRadio = res.width / res.height; + var customAspectRadio = width / height; + + self.croperTarget = res.path; + + if (innerAspectRadio < customAspectRadio) { + self.rectX = x; + self.baseWidth = width; + self.baseHeight = width / innerAspectRadio; + self.rectY = y - Math.abs((height - self.baseHeight) / 2); + } else { + self.rectY = y; + self.baseWidth = height * innerAspectRadio; + self.baseHeight = height; + self.rectX = x - Math.abs((width - self.baseWidth) / 2); + } + + self.imgLeft = self.rectX; + self.imgTop = self.rectY; + self.scaleWidth = self.baseWidth; + self.scaleHeight = self.baseHeight; + + self.update(); + + return new Promise(function(resolve) { + self.updateCanvas(resolve); + }) + }) + .then(function() { + tools_7(self.onImageLoad) && self.onImageLoad(self.ctx, self); + }) + }; + + self.removeImage = function() { + self.src = ''; + self.croperTarget = ''; + return draw(self.ctx) + }; + + self.getCropperBase64 = function(done) { + if (done === void 0) done = function() {}; + + CanvasToBase64.convertToBMP({ + canvasId: id, + x: x, + y: y, + width: width, + height: height + }, done); + }; + + self.getCropperImage = function(opt, fn) { + var customOptions = opt; + + var canvasOptions = { + canvasId: id, + x: x, + y: y, + width: width, + height: height + }; + + var task = function() { + return Promise.resolve(); + }; + + if ( + tools_10(customOptions) && + customOptions.original + ) { + // original mode + task = function() { + self.targetCtx.drawImage( + self.croperTarget, + self.imgLeft * pixelRatio, + self.imgTop * pixelRatio, + self.scaleWidth * pixelRatio, + self.scaleHeight * pixelRatio + ); + + canvasOptions = { + canvasId: targetId, + x: x * pixelRatio, + y: y * pixelRatio, + width: width * pixelRatio, + height: height * pixelRatio + }; + + return draw(self.targetCtx) + }; + } + + return task() + .then(function() { + if (tools_10(customOptions)) { + canvasOptions = Object.assign({}, canvasOptions, customOptions); + } + + if (tools_7(customOptions)) { + fn = customOptions; + } + + var arg = canvasOptions.componentContext ? + [canvasOptions, canvasOptions.componentContext] : + [canvasOptions]; + + return canvasToTempFilePath.apply(null, arg) + }) + .then(function(res) { + var tempFilePath = res.tempFilePath; + + return tools_7(fn) ? + fn.call(self, tempFilePath, null) : + tempFilePath + }) + .catch(function(err) { + if (tools_7(fn)) { + fn.call(self, null, err); + } else { + throw err + } + }) + }; + } + + /** + * 鑾峰彇鏈�鏂扮缉鏀惧�� + * @param oldScale 涓婁竴娆¤Е鎽哥粨鏉熷悗鐨勭缉鏀惧�� + * @param oldDistance 涓婁竴娆¤Е鎽哥粨鏉熷悗鐨勫弻鎸囪窛绂� + * @param zoom 缂╂斁绯绘暟 + * @param touch0 绗竴鎸噒ouch瀵硅薄 + * @param touch1 绗簩鎸噒ouch瀵硅薄 + * @returns {*} + */ + var getNewScale = function(oldScale, oldDistance, zoom, touch0, touch1) { + var xMove, yMove, newDistance; + // 璁$畻浜屾寚鏈�鏂拌窛绂� + xMove = Math.round(touch1.x - touch0.x); + yMove = Math.round(touch1.y - touch0.y); + newDistance = Math.round(Math.sqrt(xMove * xMove + yMove * yMove)); + + return oldScale + 0.001 * zoom * (newDistance - oldDistance) + }; + + function update() { + var self = this; + + if (!self.src) { + return + } + + self.__oneTouchStart = function(touch) { + self.touchX0 = Math.round(touch.x); + self.touchY0 = Math.round(touch.y); + }; + + self.__oneTouchMove = function(touch) { + var xMove, yMove; + // 璁$畻鍗曟寚绉诲姩鐨勮窛绂� + if (self.touchended) { + return self.updateCanvas() + } + xMove = Math.round(touch.x - self.touchX0); + yMove = Math.round(touch.y - self.touchY0); + + var imgLeft = Math.round(self.rectX + xMove); + var imgTop = Math.round(self.rectY + yMove); + + self.outsideBound(imgLeft, imgTop); + + self.updateCanvas(); + }; + + self.__twoTouchStart = function(touch0, touch1) { + var xMove, yMove, oldDistance; + + self.touchX1 = Math.round(self.rectX + self.scaleWidth / 2); + self.touchY1 = Math.round(self.rectY + self.scaleHeight / 2); + + // 璁$畻涓ゆ寚璺濈 + xMove = Math.round(touch1.x - touch0.x); + yMove = Math.round(touch1.y - touch0.y); + oldDistance = Math.round(Math.sqrt(xMove * xMove + yMove * yMove)); + + self.oldDistance = oldDistance; + }; + + self.__twoTouchMove = function(touch0, touch1) { + var oldScale = self.oldScale; + var oldDistance = self.oldDistance; + var scale = self.scale; + var zoom = self.zoom; + + self.newScale = getNewScale(oldScale, oldDistance, zoom, touch0, touch1); + + // 璁惧畾缂╂斁鑼冨洿 + self.newScale <= 1 && (self.newScale = 1); + self.newScale >= scale && (self.newScale = scale); + + self.scaleWidth = Math.round(self.newScale * self.baseWidth); + self.scaleHeight = Math.round(self.newScale * self.baseHeight); + var imgLeft = Math.round(self.touchX1 - self.scaleWidth / 2); + var imgTop = Math.round(self.touchY1 - self.scaleHeight / 2); + + self.outsideBound(imgLeft, imgTop); + + self.updateCanvas(); + }; + + self.__xtouchEnd = function() { + self.oldScale = self.newScale; + self.rectX = self.imgLeft; + self.rectY = self.imgTop; + }; + } + + var handle = { + // 鍥剧墖鎵嬪娍鍒濆鐩戞祴 + touchStart: function touchStart(e) { + var self = this; + var ref = e.touches; + var touch0 = ref[0]; + var touch1 = ref[1]; + + if (!self.src) { + return + } + + setTouchState(self, true, null, null); + + // 璁$畻绗竴涓Е鎽哥偣鐨勪綅缃紝骞跺弬鐓ф敼鐐硅繘琛岀缉鏀� + self.__oneTouchStart(touch0); + + // 涓ゆ寚鎵嬪娍瑙﹀彂 + if (e.touches.length >= 2) { + self.__twoTouchStart(touch0, touch1); + } + }, + + // 鍥剧墖鎵嬪娍鍔ㄦ�佺缉鏀� + touchMove: function touchMove(e) { + var self = this; + var ref = e.touches; + var touch0 = ref[0]; + var touch1 = ref[1]; + + if (!self.src) { + return + } + + setTouchState(self, null, true); + + // 鍗曟寚鎵嬪娍鏃惰Е鍙� + if (e.touches.length === 1) { + self.__oneTouchMove(touch0); + } + // 涓ゆ寚鎵嬪娍瑙﹀彂 + if (e.touches.length >= 2) { + self.__twoTouchMove(touch0, touch1); + } + }, + + touchEnd: function touchEnd(e) { + var self = this; + + if (!self.src) { + return + } + + setTouchState(self, false, false, true); + self.__xtouchEnd(); + } + }; + + function cut() { + var self = this; + var boundWidth = self.width; // 瑁佸壀妗嗛粯璁ゅ搴︼紝鍗虫暣涓敾甯冨搴� + var boundHeight = self.height; + // 瑁佸壀妗嗛粯璁ら珮搴︼紝鍗虫暣涓敾甯冮珮搴� + var ref = self.cut; + var x = ref.x; + if (x === void 0) x = 0; + var y = ref.y; + if (y === void 0) y = 0; + var width = ref.width; + if (width === void 0) width = boundWidth; + var height = ref.height; + if (height === void 0) height = boundHeight; + + /** + * 璁剧疆杈圭晫 + * @param imgLeft 鍥剧墖宸︿笂瑙掓í鍧愭爣鍊� + * @param imgTop 鍥剧墖宸︿笂瑙掔旱鍧愭爣鍊� + */ + self.outsideBound = function(imgLeft, imgTop) { + self.imgLeft = imgLeft >= x ? + x : + self.scaleWidth + imgLeft - x <= width ? + x + width - self.scaleWidth : + imgLeft; + + self.imgTop = imgTop >= y ? + y : + self.scaleHeight + imgTop - y <= height ? + y + height - self.scaleHeight : + imgTop; + }; + + /** + * 璁剧疆杈圭晫鏍峰紡 + * @param color 杈圭晫棰滆壊 + */ + self.setBoundStyle = function(ref) { + if (ref === void 0) ref = {}; + var color = ref.color; + if (color === void 0) color = '#04b00f'; + var mask = ref.mask; + if (mask === void 0) mask = 'rgba(0, 0, 0, 0.3)'; + var lineWidth = ref.lineWidth; + if (lineWidth === void 0) lineWidth = 1; + + var half = lineWidth / 2; + var boundOption = [{ + start: { + x: x - half, + y: y + 10 - half + }, + step1: { + x: x - half, + y: y - half + }, + step2: { + x: x + 10 - half, + y: y - half + } + }, + { + start: { + x: x - half, + y: y + height - 10 + half + }, + step1: { + x: x - half, + y: y + height + half + }, + step2: { + x: x + 10 - half, + y: y + height + half + } + }, + { + start: { + x: x + width - 10 + half, + y: y - half + }, + step1: { + x: x + width + half, + y: y - half + }, + step2: { + x: x + width + half, + y: y + 10 - half + } + }, + { + start: { + x: x + width + half, + y: y + height - 10 + half + }, + step1: { + x: x + width + half, + y: y + height + half + }, + step2: { + x: x + width - 10 + half, + y: y + height + half + } + } + ]; + + // 缁樺埗鍗婇�忔槑灞� + self.ctx.beginPath(); + self.ctx.setFillStyle(mask); + self.ctx.fillRect(0, 0, x, boundHeight); + self.ctx.fillRect(x, 0, width, y); + self.ctx.fillRect(x, y + height, width, boundHeight - y - height); + self.ctx.fillRect(x + width, 0, boundWidth - x - width, boundHeight); + self.ctx.fill(); + + boundOption.forEach(function(op) { + self.ctx.beginPath(); + self.ctx.setStrokeStyle(color); + self.ctx.setLineWidth(lineWidth); + self.ctx.moveTo(op.start.x, op.start.y); + self.ctx.lineTo(op.step1.x, op.step1.y); + self.ctx.lineTo(op.step2.x, op.step2.y); + self.ctx.stroke(); + }); + }; + } + + var version = "1.3.9"; + + var WeCropper = function WeCropper(params) { + var self = this; + var _default = {}; + + validator(self, DEFAULT); + + Object.keys(DEFAULT).forEach(function(key) { + _default[key] = DEFAULT[key].default; + }); + Object.assign(self, _default, params); + + self.prepare(); + self.attachPage(); + self.createCtx(); + self.observer(); + self.cutt(); + self.methods(); + self.init(); + self.update(); + + return self + }; + + WeCropper.prototype.init = function init() { + var self = this; + var src = self.src; + + self.version = version; + + typeof self.onReady === 'function' && self.onReady(self.ctx, self); + + if (src) { + self.pushOrign(src); + } else { + self.updateCanvas(); + } + setTouchState(self, false, false, false); + + self.oldScale = 1; + self.newScale = 1; + + return self + }; + + Object.assign(WeCropper.prototype, handle); + + WeCropper.prototype.prepare = prepare; + WeCropper.prototype.observer = observer; + WeCropper.prototype.methods = methods; + WeCropper.prototype.cutt = cut; + WeCropper.prototype.update = update; + + return WeCropper; + +}))); diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-avatar/u-avatar.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-avatar/u-avatar.vue" new file mode 100644 index 0000000..289b9b0 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-avatar/u-avatar.vue" @@ -0,0 +1,244 @@ +<template> + <view class="u-avatar" :style="[wrapStyle]" @tap="click"> + <image + @error="loadError" + :style="[imgStyle]" + class="u-avatar__img" + v-if="!uText && avatar" + :src="avatar" + :mode="imgMode" + ></image> + <text class="u-line-1" v-else-if="uText" :style="{ + fontSize: '38rpx' + }">{{uText}}</text> + <slot v-else></slot> + <view class="u-avatar__sex" v-if="showSex" :class="['u-avatar__sex--' + sexIcon]" :style="[uSexStyle]"> + <u-icon :name="sexIcon" size="20"></u-icon> + </view> + <view class="u-avatar__level" v-if="showLevel" :style="[uLevelStyle]"> + <u-icon :name="levelIcon" size="20"></u-icon> + </view> + </view> +</template> + +<script> + let base64Avatar = "data:image/jpg;base64,/9j/4QAYRXhpZgAASUkqAAgAAAAAAAAAAAAAAP/sABFEdWNreQABAAQAAAA8AAD/4QMraHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLwA8P3hwYWNrZXQgYmVnaW49Iu+7vyIgaWQ9Ilc1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCI/PiA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJBZG9iZSBYTVAgQ29yZSA1LjMtYzAxMSA2Ni4xNDU2NjEsIDIwMTIvMDIvMDYtMTQ6NTY6MjcgICAgICAgICI+IDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+IDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bXA6Q3JlYXRvclRvb2w9IkFkb2JlIFBob3Rvc2hvcCBDUzYgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjREMEQwRkY0RjgwNDExRUE5OTY2RDgxODY3NkJFODMxIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjREMEQwRkY1RjgwNDExRUE5OTY2RDgxODY3NkJFODMxIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NEQwRDBGRjJGODA0MTFFQTk5NjZEODE4Njc2QkU4MzEiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NEQwRDBGRjNGODA0MTFFQTk5NjZEODE4Njc2QkU4MzEiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz7/7gAOQWRvYmUAZMAAAAAB/9sAhAAGBAQEBQQGBQUGCQYFBgkLCAYG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"; + /** + * avatar 澶村儚 + * @description 鏈粍浠朵竴鑸敤浜庡睍绀哄ご鍍忕殑鍦版柟锛屽涓汉涓績锛屾垨鑰呰瘎璁哄垪琛ㄩ〉鐨勭敤鎴峰ご鍍忓睍绀虹瓑鍦烘墍銆� + * @tutorial https://www.uviewui.com/components/avatar.html + * @property {String} bg-color 鑳屾櫙棰滆壊锛屼竴鑸樉绀烘枃瀛楁椂鐢紙榛樿#ffffff锛� + * @property {String} src 澶村儚璺緞锛屽鍔犺浇澶辫触锛屽皢浼氭樉绀洪粯璁ゅご鍍� + * @property {String Number} size 澶村儚灏哄锛屽彲浠ヤ负鎸囧畾瀛楃涓�(large, default, mini)锛屾垨鑰呮暟鍊硷紝鍗曚綅rpx锛堥粯璁efault锛� + * @property {String} mode 鏄剧ず绫诲瀷锛岃涓婃柟璇存槑锛堥粯璁ircle锛� + * @property {String} sex-icon 鎬у埆鍥炬爣锛宮an-鐢凤紝woman-濂筹紙榛樿man锛� + * @property {String} level-icon 绛夌骇鍥炬爣锛堥粯璁evel锛� + * @property {String} sex-bg-color 鎬у埆鍥炬爣鑳屾櫙棰滆壊 + * @property {String} level-bg-color 绛夌骇鍥炬爣鑳屾櫙棰滆壊 + * @property {String} show-sex 鏄惁鏄剧ず鎬у埆鍥炬爣锛堥粯璁alse锛� + * @property {String} show-level 鏄惁鏄剧ず绛夌骇鍥炬爣锛堥粯璁alse锛� + * @property {String} img-mode 澶村儚鍥剧墖鐨勮鍓被鍨嬶紝涓巙ni鐨刬mage缁勪欢鐨刴ode鍙傛暟涓�鑷达紝濡傛晥鏋滆揪涓嶅埌闇�姹傦紝鍙皾璇曚紶widthFix鍊硷紙榛樿aspectFill锛� + * @property {String} index 鐢ㄦ埛浼犻�掔殑鏍囪瘑绗﹀�硷紝濡傛灉鏄垪琛ㄥ惊鐜紝鍙┛v-for鐨刬ndex鍊� + * @event {Function} click 澶村儚琚偣鍑� + * @example <u-avatar :src="src"></u-avatar> + */ + export default { + name: 'u-avatar', + props: { + // 鑳屾櫙棰滆壊 + bgColor: { + type: String, + default: 'transparent' + }, + // 澶村儚璺緞 + src: { + type: String, + default: '' + }, + // 灏哄锛宭arge-澶э紝default-涓瓑锛宮ini-灏忥紝濡傛灉涓烘暟鍊硷紝鍒欏崟浣嶄负rpx + // 瀹藉害绛変簬楂樺害 + size: { + type: [String, Number], + default: 'default' + }, + // 澶村儚妯″瀷锛宻quare-甯﹀渾瑙掓柟褰紝circle-鍦嗗舰 + mode: { + type: String, + default: 'circle' + }, + // 鏂囧瓧鍐呭 + text: { + type: String, + default: '' + }, + // 鍥剧墖鐨勮鍓ā鍨� + imgMode: { + type: String, + default: 'aspectFill' + }, + // 鏍囪瘑绗� + index: { + type: [String, Number], + default: '' + }, + // 鍙充笂瑙掓�у埆瑙掓爣锛宮an-鐢凤紝woman-濂� + sexIcon: { + type: String, + default: 'man' + }, + // 鍙充笅瑙掔殑绛夌骇鍥炬爣 + levelIcon: { + type: String, + default: 'level' + }, + // 鍙充笅瑙掔瓑绾у浘鏍囪儗鏅鑹� + levelBgColor: { + type: String, + default: '' + }, + // 鍙充笂瑙掓�у埆鍥炬爣鐨勮儗鏅鑹� + sexBgColor: { + type: String, + default: '' + }, + // 鏄惁鏄剧ず鎬у埆鍥炬爣 + showSex: { + type: Boolean, + default: false + }, + // 鏄惁鏄剧ず绛夌骇鍥炬爣 + showLevel: { + type: Boolean, + default: false + } + }, + data() { + return { + error: false, + // 澶村儚鐨勫湴鍧�锛屽洜涓哄鏋滃姞杞介敊璇紝闇�瑕佽祴鍊间负榛樿鍥剧墖锛宲rops鍊兼棤娉曚慨鏀癸紝鎵�浠ラ渶瑕佷竴涓腑闂村�� + avatar: this.src ? this.src : base64Avatar, + } + }, + watch: { + src(n) { + // 鐢ㄦ埛鍙兘浼氬湪澶村儚鍔犺浇澶辫触鏃讹紝鍐嶆淇敼澶村儚鍊硷紝鎵�浠ラ渶瑕侀噸鏂拌祴鍊� + if(!n) { + // 濡傛灉浼犲叆null鎴栬��''锛屾垨鑰卽ndefined锛屾樉绀洪粯璁ゅご鍍� + this.avatar = base64Avatar; + this.error = true; + } else { + this.avatar = n; + this.error = false; + } + } + }, + computed: { + wrapStyle() { + let style = {}; + style.height = this.size == 'large' ? '120rpx' : this.size == 'default' ? + '90rpx' : this.size == 'mini' ? '70rpx' : this.size + 'rpx'; + style.width = style.height; + style.flex = `0 0 ${style.height}`; + style.backgroundColor = this.bgColor; + style.borderRadius = this.mode == 'circle' ? '500px' : '5px'; + if(this.text) style.padding = `0 6rpx`; + return style; + }, + imgStyle() { + let style = {}; + style.borderRadius = this.mode == 'circle' ? '500px' : '5px'; + return style; + }, + // 鍙栧瓧绗︿覆鐨勭涓�涓瓧绗� + uText() { + return String(this.text)[0]; + }, + // 鎬у埆鍥炬爣鐨勮嚜瀹氫箟鏍峰紡 + uSexStyle() { + let style = {}; + if(this.sexBgColor) style.backgroundColor = this.sexBgColor; + return style; + }, + // 绛夌骇鍥炬爣鐨勮嚜瀹氫箟鏍峰紡 + uLevelStyle() { + let style = {}; + if(this.levelBgColor) style.backgroundColor = this.levelBgColor; + return style; + } + }, + methods: { + // 鍥剧墖鍔犺浇閿欒鏃讹紝鏄剧ず榛樿澶村儚 + loadError() { + this.error = true; + this.avatar = base64Avatar; + }, + click() { + this.$emit('click', this.index); + } + } + } +</script> + +<style lang="scss" scoped> + @import "../../libs/css/style.components.scss"; + + .u-avatar { + /* #ifndef APP-NVUE */ + display: inline-flex; + /* #endif */ + align-items: center; + justify-content: center; + font-size: 28rpx; + color: $u-content-color; + border-radius: 10px; + position: relative; + + &__img { + width: 100%; + height: 100%; + } + + &__sex { + position: absolute; + width: 32rpx; + color: #ffffff; + height: 32rpx; + @include vue-flex; + justify-content: center; + align-items: center; + border-radius: 100rpx; + top: 5%; + z-index: 1; + right: -7%; + border: 1px #ffffff solid; + + &--man { + background-color: $u-type-primary; + } + + &--woman { + background-color: $u-type-error; + } + + &--none { + background-color: $u-type-warning; + } + } + + &__level { + position: absolute; + width: 32rpx; + color: #ffffff; + height: 32rpx; + @include vue-flex; + justify-content: center; + align-items: center; + border-radius: 100rpx; + bottom: 5%; + z-index: 1; + right: -7%; + border: 1px #ffffff solid; + background-color: $u-type-warning; + } + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-back-top/u-back-top.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-back-top/u-back-top.vue" new file mode 100644 index 0000000..7970fc7 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-back-top/u-back-top.vue" @@ -0,0 +1,153 @@ +<template> + <view @tap="backToTop" class="u-back-top" :class="['u-back-top--mode--' + mode]" :style="[{ + bottom: bottom + 'rpx', + right: right + 'rpx', + borderRadius: mode == 'circle' ? '10000rpx' : '8rpx', + zIndex: uZIndex, + opacity: opacity + }, customStyle]"> + <view class="u-back-top__content" v-if="!$slots.default && !$slots.$default"> + <u-icon @click="backToTop" :name="icon" :custom-style="iconStyle"></u-icon> + <view class="u-back-top__content__tips"> + {{tips}} + </view> + </view> + <slot v-else /> + </view> +</template> + +<script> + export default { + name: 'u-back-top', + props: { + // 杩斿洖椤堕儴鐨勫舰鐘讹紝circle-鍦嗗舰锛宻quare-鏂瑰舰 + mode: { + type: String, + default: 'circle' + }, + // 鑷畾涔夊浘鏍� + icon: { + type: String, + default: 'arrow-upward' + }, + // 鎻愮ず鏂囧瓧 + tips: { + type: String, + default: '' + }, + // 杩斿洖椤堕儴婊氬姩鏃堕棿 + duration: { + type: [Number, String], + default: 100 + }, + // 婊氬姩璺濈 + scrollTop: { + type: [Number, String], + default: 0 + }, + // 璺濈椤堕儴澶氬皯璺濈鏄剧ず锛屽崟浣峳px + top: { + type: [Number, String], + default: 400 + }, + // 杩斿洖椤堕儴鎸夐挳鍒板簳閮ㄧ殑璺濈锛屽崟浣峳px + bottom: { + type: [Number, String], + default: 200 + }, + // 杩斿洖椤堕儴鎸夐挳鍒板彸杈圭殑璺濈锛屽崟浣峳px + right: { + type: [Number, String], + default: 40 + }, + // 灞傜骇 + zIndex: { + type: [Number, String], + default: '9' + }, + // 鍥炬爣鐨勬牱寮忥紝瀵硅薄褰㈠紡 + iconStyle: { + type: Object, + default() { + return { + color: '#909399', + fontSize: '38rpx' + } + } + }, + // 鏁翠釜缁勪欢鐨勬牱寮� + customStyle: { + type: Object, + default() { + return {} + } + } + }, + watch: { + showBackTop(nVal, oVal) { + // 褰撶粍浠剁殑鏄剧ず涓庨殣钘忕姸鎬佸彂鐢熻烦鍙樻椂锛屼慨鏀圭粍浠剁殑灞傜骇鍜屼笉閫忔槑搴� + // 璁╃粍浠舵湁鏄剧ず鍜屾秷澶辩殑鍔ㄧ敾鏁堟灉锛屽鏋滅敤v-if鎺у埗缁勪欢鐘舵�侊紝灏嗘棤璁剧疆鍔ㄧ敾鏁堟灉 + if(nVal) { + this.uZIndex = this.zIndex; + this.opacity = 1; + } else { + this.uZIndex = -1; + this.opacity = 0; + } + } + }, + computed: { + showBackTop() { + // 鐢变簬scrollTop涓洪〉闈㈢殑婊氬姩璺濈锛岄粯璁や负px鍗曚綅锛岃繖閲屽皢鐢ㄤ簬浼犲叆鐨則op(rpx)鍊� + // 杞负px鐢ㄤ簬姣旇緝锛屽鏋滄粴鍔ㄦ潯鍒伴《鐨勮窛绂诲ぇ浜庤瀹氱殑璺濈锛屽氨鏄剧ず杩斿洖椤堕儴鐨勬寜閽� + return this.scrollTop > uni.upx2px(this.top); + }, + }, + data() { + return { + // 涓嶉�忔槑搴︼紝涓轰簡璁╃粍浠舵湁涓�涓樉绀哄拰闅愯棌鐨勮繃娓″姩鐢� + opacity: 0, + // 缁勪欢鐨剒-index鍊硷紝闅愯棌鏃惰缃负-1锛屽氨浼氱湅涓嶅埌 + uZIndex: -1 + } + }, + methods: { + backToTop() { + uni.pageScrollTo({ + scrollTop: 0, + duration: this.duration + }); + } + } + } +</script> + +<style lang="scss" scoped> + @import "../../libs/css/style.components.scss"; + + .u-back-top { + width: 80rpx; + height: 80rpx; + position: fixed; + z-index: 9; + @include vue-flex; + flex-direction: column; + justify-content: center; + background-color: #E1E1E1; + color: $u-content-color; + align-items: center; + transition: opacity 0.4s; + + &__content { + @include vue-flex; + flex-direction: column; + align-items: center; + + &__tips { + font-size: 24rpx; + transform: scale(0.8); + line-height: 1; + } + } + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-badge/u-badge.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-badge/u-badge.vue" new file mode 100644 index 0000000..e85b133 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-badge/u-badge.vue" @@ -0,0 +1,216 @@ +<template> + <view v-if="show" class="u-badge" :class="[ + isDot ? 'u-badge-dot' : '', + size == 'mini' ? 'u-badge-mini' : '', + type ? 'u-badge--bg--' + type : '' + ]" :style="[{ + top: offset[0] + 'rpx', + right: offset[1] + 'rpx', + fontSize: fontSize + 'rpx', + position: absolute ? 'absolute' : 'static', + color: color, + backgroundColor: bgColor + }, boxStyle]" + > + {{showText}} + </view> +</template> + +<script> + /** + * badge 瑙掓爣 + * @description 鏈粍浠朵竴鑸敤浜庡睍绀哄ご鍍忕殑鍦版柟锛屽涓汉涓績锛屾垨鑰呰瘎璁哄垪琛ㄩ〉鐨勭敤鎴峰ご鍍忓睍绀虹瓑鍦烘墍銆� + * @tutorial https://www.uviewui.com/components/badge.html + * @property {String Number} count 灞曠ず鐨勬暟瀛楋紝澶т簬 overflowCount 鏃舵樉绀轰负 ${overflowCount}+锛屼负0涓攕how-zero涓篺alse鏃堕殣钘� + * @property {Boolean} is-dot 涓嶅睍绀烘暟瀛楋紝鍙湁涓�涓皬鐐癸紙榛樿false锛� + * @property {Boolean} absolute 缁勪欢鏄惁缁濆瀹氫綅锛屼负true鏃讹紝offset鍙傛暟鎵嶆湁鏁堬紙榛樿true锛� + * @property {String Number} overflow-count 灞曠ず灏侀《鐨勬暟瀛楀�硷紙榛樿99锛� + * @property {String} type 浣跨敤棰勮鐨勮儗鏅鑹诧紙榛樿error锛� + * @property {Boolean} show-zero 褰撴暟鍊间负 0 鏃讹紝鏄惁灞曠ず Badge锛堥粯璁alse锛� + * @property {String} size Badge鐨勫昂瀵革紝璁句负mini浼氬緱鍒板皬涓�鍙风殑Badge锛堥粯璁efault锛� + * @property {Array} offset 璁剧疆badge鐨勪綅缃亸绉伙紝鏍煎紡涓� [x, y]锛屼篃鍗宠缃殑涓簍op鍜宺ight鐨勫�硷紝鍗曚綅rpx銆俛bsolute涓簍rue鏃舵湁鏁堬紙榛樿[20, 20]锛� + * @property {String} color 瀛椾綋棰滆壊锛堥粯璁�#ffffff锛� + * @property {String} bgColor 鑳屾櫙棰滆壊锛屼紭鍏堢骇姣攖ype楂橈紝濡傝缃紝type鍙傛暟浼氬け鏁� + * @property {Boolean} is-center 缁勪欢涓績鐐规槸鍚﹀拰鐖剁粍浠跺彸涓婅閲嶅悎锛屼紭鍏堢骇姣攐ffset楂橈紝濡傝缃紝offset鍙傛暟浼氬け鏁堬紙榛樿false锛� + * @example <u-badge type="error" count="7"></u-badge> + */ + export default { + name: 'u-badge', + props: { + // primary,warning,success,error,info + type: { + type: String, + default: 'error' + }, + // default, mini + size: { + type: String, + default: 'default' + }, + //鏄惁鏄渾鐐� + isDot: { + type: Boolean, + default: false + }, + // 鏄剧ず鐨勬暟鍊煎唴瀹� + count: { + type: [Number, String], + }, + // 灞曠ず灏侀《鐨勬暟瀛楀�� + overflowCount: { + type: Number, + default: 99 + }, + // 褰撴暟鍊间负 0 鏃讹紝鏄惁灞曠ず Badge + showZero: { + type: Boolean, + default: false + }, + // 浣嶇疆鍋忕Щ + offset: { + type: Array, + default: () => { + return [20, 20] + } + }, + // 鏄惁寮�鍚粷瀵瑰畾浣嶏紝寮�鍚簡offset鎵嶄細璧蜂綔鐢� + absolute: { + type: Boolean, + default: true + }, + // 瀛椾綋澶у皬 + fontSize: { + type: [String, Number], + default: '24' + }, + // 瀛椾綋婕旂ず + color: { + type: String, + default: '#ffffff' + }, + // badge鐨勮儗鏅鑹� + bgColor: { + type: String, + default: '' + }, + // 鏄惁璁゜adge缁勪欢鐨勪腑蹇冪偣鍜岀埗缁勪欢鍙充笂瑙掗噸鍚堬紝閰嶇疆鐨勮瘽锛宱ffset灏嗕細澶辨晥 + isCenter: { + type: Boolean, + default: false + } + }, + computed: { + // 鏄惁灏哹adge涓績涓庣埗缁勪欢鍙充笂瑙掗噸鍚� + boxStyle() { + let style = {}; + if(this.isCenter) { + style.top = 0; + style.right = 0; + // Y杞�-50%锛屾剰鍛崇潃badge鍚戜笂绉诲姩浜哹adge鑷韩楂樺害涓�鍗婏紝X杞�50%锛屾剰鍛崇潃鍚戝彸绉诲姩浜嗚嚜韬搴︿竴鍗� + style.transform = "translateY(-50%) translateX(50%)"; + } else { + style.top = this.offset[0] + 'rpx'; + style.right = this.offset[1] + 'rpx'; + style.transform = "translateY(0) translateX(0)"; + } + // 濡傛灉灏哄涓簃ini锛屽悗鎺ヤ笂scal() + if(this.size == 'mini') { + style.transform = style.transform + " scale(0.8)"; + } + return style; + }, + // isDot绫诲瀷鏃讹紝涓嶆樉绀烘枃瀛� + showText() { + if(this.isDot) return ''; + else { + if(this.count > this.overflowCount) return `${this.overflowCount}+`; + else return this.count; + } + }, + // 鏄惁鏄剧ず缁勪欢 + show() { + // 濡傛灉count鐨勫�间负0锛屽苟涓攕howZero璁剧疆涓篺alse锛屼笉鏄剧ず缁勪欢 + if(this.count == 0 && this.showZero == false) return false; + else return true; + } + } + } +</script> + +<style lang="scss" scoped> + @import "../../libs/css/style.components.scss"; + + .u-badge { + /* #ifndef APP-NVUE */ + display: inline-flex; + /* #endif */ + justify-content: center; + align-items: center; + line-height: 24rpx; + padding: 4rpx 8rpx; + border-radius: 100rpx; + z-index: 9; + + &--bg--primary { + background-color: $u-type-primary; + } + + &--bg--error { + background-color: $u-type-error; + } + + &--bg--success { + background-color: $u-type-success; + } + + &--bg--info { + background-color: $u-type-info; + } + + &--bg--warning { + background-color: $u-type-warning; + } + } + + .u-badge-dot { + height: 16rpx; + width: 16rpx; + border-radius: 100rpx; + line-height: 1; + } + + .u-badge-mini { + transform: scale(0.8); + transform-origin: center center; + } + + // .u-primary { + // background: $u-type-primary; + // color: #fff; + // } + + // .u-error { + // background: $u-type-error; + // color: #fff; + // } + + // .u-warning { + // background: $u-type-warning; + // color: #fff; + // } + + // .u-success { + // background: $u-type-success; + // color: #fff; + // } + + // .u-black { + // background: #585858; + // color: #fff; + // } + + .u-info { + background-color: $u-type-info; + color: #fff; + } +</style> \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-button/u-button.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-button/u-button.vue" new file mode 100644 index 0000000..82c3a6f --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-button/u-button.vue" @@ -0,0 +1,596 @@ +<template> + <button + id="u-wave-btn" + class="u-btn u-line-1 u-fix-ios-appearance" + :class="[ + 'u-size-' + size, + plain ? 'u-btn--' + type + '--plain' : '', + loading ? 'u-loading' : '', + shape == 'circle' ? 'u-round-circle' : '', + hairLine ? showHairLineBorder : 'u-btn--bold-border', + 'u-btn--' + type, + disabled ? `u-btn--${type}--disabled` : '', + ]" + :hover-start-time="Number(hoverStartTime)" + :hover-stay-time="Number(hoverStayTime)" + :disabled="disabled" + :form-type="formType" + :open-type="openType" + :app-parameter="appParameter" + :hover-stop-propagation="hoverStopPropagation" + :send-message-title="sendMessageTitle" + send-message-path="sendMessagePath" + :lang="lang" + :data-name="dataName" + :session-from="sessionFrom" + :send-message-img="sendMessageImg" + :show-message-card="showMessageCard" + @getphonenumber="getphonenumber" + @getuserinfo="getuserinfo" + @error="error" + @opensetting="opensetting" + @launchapp="launchapp" + :style="[customStyle, { + overflow: ripple ? 'hidden' : 'visible' + }]" + @tap.stop="click($event)" + :hover-class="getHoverClass" + :loading="loading" + > + <slot></slot> + <view + v-if="ripple" + class="u-wave-ripple" + :class="[waveActive ? 'u-wave-active' : '']" + :style="{ + top: rippleTop + 'px', + left: rippleLeft + 'px', + width: fields.targetWidth + 'px', + height: fields.targetWidth + 'px', + 'background-color': rippleBgColor || 'rgba(0, 0, 0, 0.15)' + }" + ></view> + </button> +</template> + +<script> +/** + * button 鎸夐挳 + * @description Button 鎸夐挳 + * @tutorial https://www.uviewui.com/components/button.html + * @property {String} size 鎸夐挳鐨勫ぇ灏� + * @property {Boolean} ripple 鏄惁寮�鍚偣鍑绘按娉㈢汗鏁堟灉 + * @property {String} ripple-bg-color 姘存尝绾圭殑鑳屾櫙鑹诧紝ripple涓簍rue鏃舵湁鏁� + * @property {String} type 鎸夐挳鐨勬牱寮忕被鍨� + * @property {Boolean} plain 鎸夐挳鏄惁闀傜┖锛岃儗鏅壊閫忔槑 + * @property {Boolean} disabled 鏄惁绂佺敤 + * @property {Boolean} hair-line 鏄惁鏄剧ず鎸夐挳鐨勭粏杈规(榛樿true) + * @property {Boolean} shape 鎸夐挳澶栬褰㈢姸锛岃鏂囨。璇存槑 + * @property {Boolean} loading 鎸夐挳鍚嶇О鍓嶆槸鍚﹀甫 loading 鍥炬爣(App-nvue 骞冲彴锛屽湪 ios 涓婁负闆姳锛孉ndroid涓婁负鍦嗗湀) + * @property {String} form-type 鐢ㄤ簬 <form> 缁勪欢锛岀偣鍑诲垎鍒細瑙﹀彂 <form> 缁勪欢鐨� submit/reset 浜嬩欢 + * @property {String} open-type 寮�鏀捐兘鍔� + * @property {String} data-name 棰濆浼犲弬鍙傛暟锛岀敤浜庡皬绋嬪簭鐨刣ata-xxx灞炴�э紝閫氳繃target.dataset.name鑾峰彇 + * @property {String} hover-class 鎸囧畾鎸夐挳鎸変笅鍘荤殑鏍峰紡绫汇�傚綋 hover-class="none" 鏃讹紝娌℃湁鐐瑰嚮鎬佹晥鏋�(App-nvue 骞冲彴鏆備笉鏀寔) + * @property {Number} hover-start-time 鎸変綇鍚庡涔呭嚭鐜扮偣鍑绘�侊紝鍗曚綅姣 + * @property {Number} hover-stay-time 鎵嬫寚鏉惧紑鍚庣偣鍑绘�佷繚鐣欐椂闂达紝鍗曚綅姣 + * @property {Object} custom-style 瀵规寜閽殑鑷畾涔夋牱寮忥紝瀵硅薄褰㈠紡锛岃鏂囨。璇存槑 + * @event {Function} click 鎸夐挳鐐瑰嚮 + * @event {Function} getphonenumber open-type="getPhoneNumber"鏃舵湁鏁� + * @event {Function} getuserinfo 鐢ㄦ埛鐐瑰嚮璇ユ寜閽椂锛屼細杩斿洖鑾峰彇鍒扮殑鐢ㄦ埛淇℃伅锛屼粠杩斿洖鍙傛暟鐨刣etail涓幏鍙栧埌鐨勫�煎悓uni.getUserInfo + * @event {Function} error 褰撲娇鐢ㄥ紑鏀捐兘鍔涙椂锛屽彂鐢熼敊璇殑鍥炶皟 + * @event {Function} opensetting 鍦ㄦ墦寮�鎺堟潈璁剧疆椤靛苟鍏抽棴鍚庡洖璋� + * @event {Function} launchapp 鎵撳紑 APP 鎴愬姛鐨勫洖璋� + * @example <u-button>鏈堣惤</u-button> + */ +export default { + name: 'u-button', + props: { + // 鏄惁缁嗚竟妗� + hairLine: { + type: Boolean, + default: true + }, + // 鎸夐挳鐨勯缃牱寮忥紝default锛宲rimary锛宔rror锛寃arning锛宻uccess + type: { + type: String, + default: 'default' + }, + // 鎸夐挳灏哄锛宒efault锛宮edium锛宮ini + size: { + type: String, + default: 'default' + }, + // 鎸夐挳褰㈢姸锛宑ircle锛堜袱杈逛负鍗婂渾锛夛紝square锛堝甫鍦嗚锛� + shape: { + type: String, + default: 'square' + }, + // 鎸夐挳鏄惁闀傜┖ + plain: { + type: Boolean, + default: false + }, + // 鏄惁绂佹鐘舵�� + disabled: { + type: Boolean, + default: false + }, + // 鏄惁鍔犺浇涓� + loading: { + type: Boolean, + default: false + }, + // 寮�鏀捐兘鍔涳紝鍏蜂綋璇风湅uniapp绋冲畾鍏充簬button缁勪欢閮ㄥ垎璇存槑 + // https://uniapp.dcloud.io/component/button + openType: { + type: String, + default: '' + }, + // 鐢ㄤ簬 <form> 缁勪欢锛岀偣鍑诲垎鍒細瑙﹀彂 <form> 缁勪欢鐨� submit/reset 浜嬩欢 + // 鍙栧�间负submit锛堟彁浜よ〃鍗曪級锛宺eset锛堥噸缃〃鍗曪級 + formType: { + type: String, + default: '' + }, + // 鎵撳紑 APP 鏃讹紝鍚� APP 浼犻�掔殑鍙傛暟锛宱pen-type=launchApp鏃舵湁鏁� + // 鍙井淇″皬绋嬪簭銆丵Q灏忕▼搴忔湁鏁� + appParameter: { + type: String, + default: '' + }, + // 鎸囧畾鏄惁闃绘鏈妭鐐圭殑绁栧厛鑺傜偣鍑虹幇鐐瑰嚮鎬侊紝寰俊灏忕▼搴忔湁鏁� + hoverStopPropagation: { + type: Boolean, + default: false + }, + // 鎸囧畾杩斿洖鐢ㄦ埛淇℃伅鐨勮瑷�锛寊h_CN 绠�浣撲腑鏂囷紝zh_TW 绻佷綋涓枃锛宔n 鑻辨枃銆傚彧寰俊灏忕▼搴忔湁鏁� + lang: { + type: String, + default: 'en' + }, + // 浼氳瘽鏉ユ簮锛宱pen-type="contact"鏃舵湁鏁堛�傚彧寰俊灏忕▼搴忔湁鏁� + sessionFrom: { + type: String, + default: '' + }, + // 浼氳瘽鍐呮秷鎭崱鐗囨爣棰橈紝open-type="contact"鏃舵湁鏁� + // 榛樿褰撳墠鏍囬锛屽彧寰俊灏忕▼搴忔湁鏁� + sendMessageTitle: { + type: String, + default: '' + }, + // 浼氳瘽鍐呮秷鎭崱鐗囩偣鍑昏烦杞皬绋嬪簭璺緞锛宱pen-type="contact"鏃舵湁鏁� + // 榛樿褰撳墠鍒嗕韩璺緞锛屽彧寰俊灏忕▼搴忔湁鏁� + sendMessagePath: { + type: String, + default: '' + }, + // 浼氳瘽鍐呮秷鎭崱鐗囧浘鐗囷紝open-type="contact"鏃舵湁鏁� + // 榛樿褰撳墠椤甸潰鎴浘锛屽彧寰俊灏忕▼搴忔湁鏁� + sendMessageImg: { + type: String, + default: '' + }, + // 鏄惁鏄剧ず浼氳瘽鍐呮秷鎭崱鐗囷紝璁剧疆姝ゅ弬鏁颁负 true锛岀敤鎴疯繘鍏ュ鏈嶄細璇濅細鍦ㄥ彸涓嬭鏄剧ず"鍙兘瑕佸彂閫佺殑灏忕▼搴�"鎻愮ず锛� + // 鐢ㄦ埛鐐瑰嚮鍚庡彲浠ュ揩閫熷彂閫佸皬绋嬪簭娑堟伅锛宱pen-type="contact"鏃舵湁鏁� + showMessageCard: { + type: Boolean, + default: false + }, + // 鎵嬫寚鎸夛紙瑙︽懜锛夋寜閽椂鎸夐挳鏃剁殑鑳屾櫙棰滆壊 + hoverBgColor: { + type: String, + default: '' + }, + // 姘存尝绾圭殑鑳屾櫙棰滆壊 + rippleBgColor: { + type: String, + default: '' + }, + // 鏄惁寮�鍚按娉㈢汗鏁堟灉 + ripple: { + type: Boolean, + default: false + }, + // 鎸変笅鐨勭被鍚� + hoverClass: { + type: String, + default: '' + }, + // 鑷畾涔夋牱寮忥紝瀵硅薄褰㈠紡 + customStyle: { + type: Object, + default() { + return {}; + } + }, + // 棰濆浼犲弬鍙傛暟锛岀敤浜庡皬绋嬪簭鐨刣ata-xxx灞炴�э紝閫氳繃target.dataset.name鑾峰彇 + dataName: { + type: String, + default: '' + }, + // 鑺傛祦锛屼竴瀹氭椂闂村唴鍙兘瑙﹀彂涓�娆� + throttleTime: { + type: [String, Number], + default: 1000 + }, + // 鎸変綇鍚庡涔呭嚭鐜扮偣鍑绘�侊紝鍗曚綅姣 + hoverStartTime: { + type: [String, Number], + default: 20 + }, + // 鎵嬫寚鏉惧紑鍚庣偣鍑绘�佷繚鐣欐椂闂达紝鍗曚綅姣 + hoverStayTime: { + type: [String, Number], + default: 150 + }, + }, + computed: { + // 褰撴病鏈変紶bgColor鍙橀噺鏃讹紝鎸夐挳鎸変笅鍘荤殑棰滆壊绫诲悕 + getHoverClass() { + // 濡傛灉寮�鍚按娉㈢汗鏁堟灉锛屽垯涓嶅惎鐢╤over-class鏁堟灉 + if (this.loading || this.disabled || this.ripple || this.hoverClass) return ''; + let hoverClass = ''; + hoverClass = this.plain ? 'u-' + this.type + '-plain-hover' : 'u-' + this.type + '-hover'; + return hoverClass; + }, + // 鍦�'primary', 'success', 'error', 'warning'绫诲瀷涓嬶紝涓嶆樉绀鸿竟妗嗭紝鍚﹀垯浼氶�犳垚鍥涜鏈夋瘺鍒虹幇璞� + showHairLineBorder() { + if (['primary', 'success', 'error', 'warning'].indexOf(this.type) >= 0 && !this.plain) { + return ''; + } else { + return 'u-hairline-border'; + } + } + }, + data() { + return { + rippleTop: 0, // 姘存尝绾圭殑璧风偣Y鍧愭爣鍒版寜閽笂杈圭晫鐨勮窛绂� + rippleLeft: 0, // 姘存尝绾硅捣鐐筙鍧愭爣鍒版寜閽乏杈圭晫鐨勮窛绂� + fields: {}, // 娉㈢汗鎸夐挳鑺傜偣淇℃伅 + waveActive: false // 婵�娲绘按娉㈢汗 + }; + }, + methods: { + // 鎸夐挳鐐瑰嚮 + click(e) { + // 杩涜鑺傛祦鎺у埗锛屾瘡this.throttle姣鍐咃紝鍙湪寮�濮嬪鎵ц + this.$u.throttle(() => { + // 濡傛灉鎸夐挳鏃禿isabled鍜宭oading鐘舵�侊紝涓嶈Е鍙戞按娉㈢汗鏁堟灉 + if (this.loading === true || this.disabled === true) return; + // 鏄惁寮�鍚按娉㈢汗鏁堟灉 + if (this.ripple) { + // 姣忔鐐瑰嚮鏃讹紝绉婚櫎涓婁竴娆$殑绫伙紝鍐嶆娣诲姞锛屾墠鑳借Е鍙戝姩鐢绘晥鏋� + this.waveActive = false; + this.$nextTick(function() { + this.getWaveQuery(e); + }); + } + this.$emit('click', e); + }, this.throttleTime); + }, + // 鏌ヨ鎸夐挳鐨勮妭鐐逛俊鎭� + getWaveQuery(e) { + this.getElQuery().then(res => { + // 鏌ヨ杩斿洖鐨勬槸涓�涓暟缁勮妭鐐� + let data = res[0]; + // 鏌ヨ涓嶅埌鑺傜偣淇℃伅锛屼笉鎿嶄綔 + if (!data.width || !data.width) return; + // 姘存尝绾圭殑鏈�缁堝舰鎬佹槸涓�涓鏂瑰舰(閫氳繃border-radius璁╁叾鍙樹负涓�涓渾褰�)锛岃繖閲岃淇濊瘉姝f柟褰㈢殑杈归暱绛変簬鎸夐挳鐨勬渶闀胯竟 + // 鏈�缁堢殑鏂瑰舰锛堝彉鎹㈠悗鐨勫渾褰級鎵嶈兘瑕嗙洊鏁翠釜鎸夐挳 + data.targetWidth = data.height > data.width ? data.height : data.width; + if (!data.targetWidth) return; + this.fields = data; + let touchesX = '', + touchesY = ''; + // #ifdef MP-BAIDU + touchesX = e.changedTouches[0].clientX; + touchesY = e.changedTouches[0].clientY; + // #endif + // #ifdef MP-ALIPAY + touchesX = e.detail.clientX; + touchesY = e.detail.clientY; + // #endif + // #ifndef MP-BAIDU || MP-ALIPAY + touchesX = e.touches[0].clientX; + touchesY = e.touches[0].clientY; + // #endif + // 鑾峰彇瑙︽懜鐐圭浉瀵逛簬鎸夐挳涓婅竟鍜屽乏杈圭殑x鍜寉鍧愭爣锛屽師鐞嗘槸閫氳繃灞忓箷鐨勮Е鎽哥偣锛坱ouchesY锛夛紝鍑忓幓鎸夐挳鐨勪笂杈圭晫data.top + // 浣嗘槸鐢变簬`transform-origin`榛樿鏄痗enter锛屾墍浠ヨ繖閲屽啀鍑忓幓鍗婂緞鎵嶆槸姘存尝绾箆iew搴旇鐨勪綅缃� + // 鎬荤殑鏉ヨ锛屽氨鏄妸姘存尝绾圭殑鐭╁舰锛堝彉鎹㈠悗鐨勫渾褰級鐨勪腑蹇冪偣锛岀Щ鍔ㄥ埌鎴戜滑鐨勮Е鎽哥偣浣嶇疆 + this.rippleTop = touchesY - data.top - data.targetWidth / 2; + this.rippleLeft = touchesX - data.left - data.targetWidth / 2; + this.$nextTick(() => { + this.waveActive = true; + }); + }); + }, + // 鑾峰彇鑺傜偣淇℃伅 + getElQuery() { + return new Promise(resolve => { + let queryInfo = ''; + // 鑾峰彇鍏冪礌鑺傜偣淇℃伅锛岃鏌ョ湅uniapp鐩稿叧鏂囨。 + // https://uniapp.dcloud.io/api/ui/nodes-info?id=nodesrefboundingclientrect + queryInfo = uni.createSelectorQuery().in(this); + //#ifdef MP-ALIPAY + queryInfo = uni.createSelectorQuery(); + //#endif + queryInfo.select('.u-btn').boundingClientRect(); + queryInfo.exec(data => { + resolve(data); + }); + }); + }, + // 涓嬮潰涓哄鎺niapp瀹樻柟鎸夐挳寮�鏀捐兘鍔涗簨浠跺洖璋冪殑瀵规帴 + getphonenumber(res) { + this.$emit('getphonenumber', res); + }, + getuserinfo(res) { + this.$emit('getuserinfo', res); + }, + error(res) { + this.$emit('error', res); + }, + opensetting(res) { + this.$emit('opensetting', res); + }, + launchapp(res) { + this.$emit('launchapp', res); + } + } +}; +</script> + +<style scoped lang="scss"> +@import '../../libs/css/style.components.scss'; +.u-btn::after { + border: none; +} + +.u-btn { + position: relative; + border: 0; + //border-radius: 10rpx; + /* #ifndef APP-NVUE */ + display: inline-flex; + /* #endif */ + // 閬垮厤杈规鏌愪簺鍦烘櫙鍙兘琚�滆鍓�濓紝涓嶈兘璁剧疆涓篽idden + overflow: visible; + line-height: 1; + @include vue-flex; + align-items: center; + justify-content: center; + cursor: pointer; + padding: 0 40rpx; + z-index: 1; + box-sizing: border-box; + transition: all 0.15s; + + &--bold-border { + border: 1px solid #ffffff; + } + + &--default { + color: $u-content-color; + border-color: #c0c4cc; + background-color: #ffffff; + } + + &--primary { + color: #ffffff; + border-color: $u-type-primary; + background-color: $u-type-primary; + } + + &--success { + color: #ffffff; + border-color: $u-type-success; + background-color: $u-type-success; + } + + &--error { + color: #ffffff; + border-color: $u-type-error; + background-color: $u-type-error; + } + + &--warning { + color: #ffffff; + border-color: $u-type-warning; + background-color: $u-type-warning; + } + + &--default--disabled { + color: #ffffff; + border-color: #e4e7ed; + background-color: #ffffff; + } + + &--primary--disabled { + color: #ffffff!important; + border-color: $u-type-primary-disabled!important; + background-color: $u-type-primary-disabled!important; + } + + &--success--disabled { + color: #ffffff!important; + border-color: $u-type-success-disabled!important; + background-color: $u-type-success-disabled!important; + } + + &--error--disabled { + color: #ffffff!important; + border-color: $u-type-error-disabled!important; + background-color: $u-type-error-disabled!important; + } + + &--warning--disabled { + color: #ffffff!important; + border-color: $u-type-warning-disabled!important; + background-color: $u-type-warning-disabled!important; + } + + &--primary--plain { + color: $u-type-primary!important; + border-color: $u-type-primary-disabled!important; + background-color: $u-type-primary-light!important; + } + + &--success--plain { + color: $u-type-success!important; + border-color: $u-type-success-disabled!important; + background-color: $u-type-success-light!important; + } + + &--error--plain { + color: $u-type-error!important; + border-color: $u-type-error-disabled!important; + background-color: $u-type-error-light!important; + } + + &--warning--plain { + color: $u-type-warning!important; + border-color: $u-type-warning-disabled!important; + background-color: $u-type-warning-light!important; + } +} + +.u-hairline-border:after { + content: ' '; + position: absolute; + pointer-events: none; + // 璁剧疆涓篵order-box锛屾剰鍛崇潃涓嬮潰鐨剆cale缂╁皬涓�0.5锛屽疄闄呬笂缂╁皬鐨勬槸浼厓绱犵殑鍐呭锛坆order-box鎰忓懗鐫�鍐呭涓嶅惈border锛� + box-sizing: border-box; + // 涓績鐐逛綔涓哄彉褰�(scale())鐨勫師鐐� + -webkit-transform-origin: 0 0; + transform-origin: 0 0; + left: 0; + top: 0; + width: 199.8%; + height: 199.7%; + -webkit-transform: scale(0.5, 0.5); + transform: scale(0.5, 0.5); + border: 1px solid currentColor; + z-index: 1; +} + +.u-wave-ripple { + z-index: 0; + position: absolute; + border-radius: 100%; + background-clip: padding-box; + pointer-events: none; + user-select: none; + transform: scale(0); + opacity: 1; + transform-origin: center; +} + +.u-wave-ripple.u-wave-active { + opacity: 0; + transform: scale(2); + transition: opacity 1s linear, transform 0.4s linear; +} + +.u-round-circle { + border-radius: 100rpx; +} + +.u-round-circle::after { + border-radius: 100rpx; +} + +.u-loading::after { + background-color: hsla(0, 0%, 100%, 0.35); +} + +.u-size-default { + font-size: 30rpx; + height: 80rpx; + line-height: 80rpx; +} + +.u-size-medium { + /* #ifndef APP-NVUE */ + display: inline-flex; + /* #endif */ + width: auto; + font-size: 26rpx; + height: 70rpx; + line-height: 70rpx; + padding: 0 80rpx; +} + +.u-size-mini { + /* #ifndef APP-NVUE */ + display: inline-flex; + /* #endif */ + width: auto; + font-size: 22rpx; + padding-top: 1px; + height: 50rpx; + line-height: 50rpx; + padding: 0 20rpx; +} + +.u-primary-plain-hover { + color: #ffffff !important; + background: $u-type-primary-dark !important; +} + +.u-default-plain-hover { + color: $u-type-primary-dark !important; + background: $u-type-primary-light !important; +} + +.u-success-plain-hover { + color: #ffffff !important; + background: $u-type-success-dark !important; +} + +.u-warning-plain-hover { + color: #ffffff !important; + background: $u-type-warning-dark !important; +} + +.u-error-plain-hover { + color: #ffffff !important; + background: $u-type-error-dark !important; +} + +.u-info-plain-hover { + color: #ffffff !important; + background: $u-type-info-dark !important; +} + +.u-default-hover { + color: $u-type-primary-dark !important; + border-color: $u-type-primary-dark !important; + background-color: $u-type-primary-light !important; +} + +.u-primary-hover { + background: $u-type-primary-dark !important; + color: #fff; +} + +.u-success-hover { + background: $u-type-success-dark !important; + color: #fff; +} + +.u-info-hover { + background: $u-type-info-dark !important; + color: #fff; +} + +.u-warning-hover { + background: $u-type-warning-dark !important; + color: #fff; +} + +.u-error-hover { + background: $u-type-error-dark !important; + color: #fff; +} +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-calendar/u-calendar.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-calendar/u-calendar.vue" new file mode 100644 index 0000000..6602bd0 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-calendar/u-calendar.vue" @@ -0,0 +1,639 @@ +<template> + <u-popup closeable :maskCloseAble="maskCloseAble" mode="bottom" :popup="false" v-model="value" length="auto" + :safeAreaInsetBottom="safeAreaInsetBottom" @close="close" :z-index="uZIndex" :border-radius="borderRadius" :closeable="closeable"> + <view class="u-calendar"> + <view class="u-calendar__header"> + <view class="u-calendar__header__text" v-if="!$slots['tooltip']"> + {{toolTip}} + </view> + <slot v-else name="tooltip" /> + </view> + <view class="u-calendar__action u-flex u-row-center"> + <view class="u-calendar__action__icon"> + <u-icon v-if="changeYear" name="arrow-left-double" :color="yearArrowColor" @click="changeYearHandler(0)"></u-icon> + </view> + <view class="u-calendar__action__icon"> + <u-icon v-if="changeMonth" name="arrow-left" :color="monthArrowColor" @click="changeMonthHandler(0)"></u-icon> + </view> + <view class="u-calendar__action__text">{{ showTitle }}</view> + <view class="u-calendar__action__icon"> + <u-icon v-if="changeMonth" name="arrow-right" :color="monthArrowColor" @click="changeMonthHandler(1)"></u-icon> + </view> + <view class="u-calendar__action__icon"> + <u-icon v-if="changeYear" name="arrow-right-double" :color="yearArrowColor" @click="changeYearHandler(1)"></u-icon> + </view> + </view> + <view class="u-calendar__week-day"> + <view class="u-calendar__week-day__text" v-for="(item, index) in weekDayZh" :key="index">{{item}}</view> + </view> + <view class="u-calendar__content"> + <!-- 鍓嶇疆绌虹櫧閮ㄥ垎 --> + <block v-for="(item, index) in weekdayArr" :key="index"> + <view class="u-calendar__content__item"></view> + </block> + <view class="u-calendar__content__item" :class="{ + 'u-hover-class':openDisAbled(year,month,index+1), + 'u-calendar__content--start-date': (mode == 'range' && startDate==`${year}-${month}-${index+1}`) || mode== 'date', + 'u-calendar__content--end-date':(mode== 'range' && endDate==`${year}-${month}-${index+1}`) || mode == 'date' + }" :style="{backgroundColor: getColor(index,1)}" v-for="(item, index) in daysArr" :key="index" + @tap="dateClick(index)"> + <view class="u-calendar__content__item__inner" :style="{color: getColor(index,2)}"> + <view>{{ index + 1 }}</view> + </view> + <view class="u-calendar__content__item__tips" :style="{color:activeColor}" v-if="mode== 'range' && startDate==`${year}-${month}-${index+1}` && startDate!=endDate">{{startText}}</view> + <view class="u-calendar__content__item__tips" :style="{color:activeColor}" v-if="mode== 'range' && endDate==`${year}-${month}-${index+1}`">{{endText}}</view> + </view> + <view class="u-calendar__content__bg-month">{{month}}</view> + </view> + <view class="u-calendar__bottom"> + <view class="u-calendar__bottom__choose"> + <text>{{mode == 'date' ? activeDate : startDate}}</text> + <text v-if="endDate">鑷硔{endDate}}</text> + </view> + <view class="u-calendar__bottom__btn"> + <u-button :type="btnType" shape="circle" size="default" @click="btnFix(false)">纭畾</u-button> + </view> + </view> + </view> + </u-popup> +</template> +<script> + /** + * calendar 鏃ュ巻 + * @description 姝ょ粍浠剁敤浜庡崟涓�夋嫨鏃ユ湡锛岃寖鍥撮�夋嫨鏃ユ湡绛夛紝鏃ュ巻琚寘瑁瑰湪搴曢儴寮硅捣鐨勫鍣ㄤ腑銆� + * @tutorial http://uviewui.com/components/calendar.html + * @property {String} mode 閫夋嫨鏃ユ湡鐨勬ā寮忥紝date-涓哄崟涓棩鏈燂紝range-涓洪�夋嫨鏃ユ湡鑼冨洿 + * @property {Boolean} v-model 甯冨皵鍊煎彉閲忥紝鐢ㄤ簬鎺у埗鏃ュ巻鐨勫脊鍑轰笌鏀惰捣 + * @property {Boolean} safe-area-inset-bottom 鏄惁寮�鍚簳閮ㄥ畨鍏ㄥ尯閫傞厤(榛樿false) + * @property {Boolean} change-year 鏄惁鏄剧ず椤堕儴鐨勫垏鎹㈠勾浠芥柟鍚戠殑鎸夐挳(榛樿true) + * @property {Boolean} change-month 鏄惁鏄剧ず椤堕儴鐨勫垏鎹㈡湀浠芥柟鍚戠殑鎸夐挳(榛樿true) + * @property {String Number} max-year 鍙垏鎹㈢殑鏈�澶у勾浠�(榛樿2050) + * @property {String Number} min-year 鏈�灏忓彲閫夋棩鏈�(榛樿1950) + * @property {String Number} min-date 鍙垏鎹㈢殑鏈�灏忓勾浠�(榛樿1950-01-01) + * @property {String Number} max-date 鏈�澶у彲閫夋棩鏈�(榛樿褰撳墠鏃ユ湡) + * @property {String Number} 寮圭獥椤堕儴宸﹀彸涓よ竟鐨勫渾瑙掑�硷紝鍗曚綅rpx(榛樿20) + * @property {Boolean} mask-close-able 鏄惁鍏佽閫氳繃鐐瑰嚮閬僵鍏抽棴鏃ュ巻(榛樿true) + * @property {String} month-arrow-color 鏈堜唤鍒囨崲鎸夐挳绠ご棰滆壊(榛樿#606266) + * @property {String} year-arrow-color 骞翠唤鍒囨崲鎸夐挳绠ご棰滆壊(榛樿#909399) + * @property {String} color 鏃ユ湡瀛椾綋鐨勯粯璁ら鑹�(榛樿#303133) + * @property {String} active-bg-color 璧峰/缁撴潫鏃ユ湡鎸夐挳鐨勮儗鏅壊(榛樿#2979ff) + * @property {String Number} z-index 寮瑰嚭鏃剁殑z-index鍊�(榛樿10075) + * @property {String} active-color 璧峰/缁撴潫鏃ユ湡鎸夐挳鐨勫瓧浣撻鑹�(榛樿#ffffff) + * @property {String} range-bg-color 璧峰/缁撴潫鏃ユ湡涔嬮棿鐨勫尯鍩熺殑鑳屾櫙棰滆壊(榛樿rgba(41,121,255,0.13)) + * @property {String} range-color 閫夋嫨鑼冨洿鍐呭瓧浣撻鑹�(榛樿#2979ff) + * @property {String} start-text 璧峰鏃ユ湡搴曢儴鐨勬彁绀烘枃瀛�(榛樿 '寮�濮�') + * @property {String} end-text 缁撴潫鏃ユ湡搴曢儴鐨勬彁绀烘枃瀛�(榛樿 '缁撴潫') + * @property {String} btn-type 搴曢儴纭畾鎸夐挳鐨勪富棰�(榛樿 'primary') + * @property {String} toolTip 椤堕儴鎻愮ず鏂囧瓧锛屽璁剧疆鍚嶄负tooltip鐨剆lot锛屾鍙傛暟灏嗗け鏁�(榛樿 '閫夋嫨鏃ユ湡') + * @property {Boolean} closeable 鏄惁鏄剧ず鍙充笂瑙掔殑鍏抽棴鍥炬爣(榛樿true) + * @example <u-calendar v-model="show" :mode="mode"></u-calendar> + */ + + export default { + name: 'u-calendar', + props: { + safeAreaInsetBottom: { + type: Boolean, + default: false + }, + // 鏄惁鍏佽閫氳繃鐐瑰嚮閬僵鍏抽棴Picker + maskCloseAble: { + type: Boolean, + default: true + }, + // 閫氳繃鍙屽悜缁戝畾鎺у埗缁勪欢鐨勫脊鍑轰笌鏀惰捣 + value: { + type: Boolean, + default: false + }, + // 寮瑰嚭鐨剒-index鍊� + zIndex: { + type: [String, Number], + default: 0 + }, + // 鏄惁鍏佽鍒囨崲骞翠唤 + changeYear: { + type: Boolean, + default: true + }, + // 鏄惁鍏佽鍒囨崲鏈堜唤 + changeMonth: { + type: Boolean, + default: true + }, + // date-鍗曚釜鏃ユ湡閫夋嫨锛宺ange-寮�濮嬫棩鏈�+缁撴潫鏃ユ湡閫夋嫨 + mode: { + type: String, + default: 'date' + }, + // 鍙垏鎹㈢殑鏈�澶у勾浠� + maxYear: { + type: [Number, String], + default: 2050 + }, + // 鍙垏鎹㈢殑鏈�灏忓勾浠� + minYear: { + type: [Number, String], + default: 1950 + }, + // 鏈�灏忓彲閫夋棩鏈�(涓嶅湪鑼冨洿鍐呮棩鏈熺鐢ㄤ笉鍙��) + minDate: { + type: [Number, String], + default: '1950-01-01' + }, + /** + * 鏈�澶у彲閫夋棩鏈� + * 榛樿鏈�澶у�间负浠婂ぉ锛屼箣鍚庣殑鏃ユ湡涓嶅彲閫� + * 2030-12-31 + * */ + maxDate: { + type: [Number, String], + default: '' + }, + // 寮圭獥椤堕儴宸﹀彸涓よ竟鐨勫渾瑙掑�� + borderRadius: { + type: [String, Number], + default: 20 + }, + // 鏈堜唤鍒囨崲鎸夐挳绠ご棰滆壊 + monthArrowColor: { + type: String, + default: '#606266' + }, + // 骞翠唤鍒囨崲鎸夐挳绠ご棰滆壊 + yearArrowColor: { + type: String, + default: '#909399' + }, + // 榛樿鏃ユ湡瀛椾綋棰滆壊 + color: { + type: String, + default: '#303133' + }, + // 閫変腑|璧峰缁撴潫鏃ユ湡鑳屾櫙鑹� + activeBgColor: { + type: String, + default: '#2979ff' + }, + // 閫変腑|璧峰缁撴潫鏃ユ湡瀛椾綋棰滆壊 + activeColor: { + type: String, + default: '#ffffff' + }, + // 鑼冨洿鍐呮棩鏈熻儗鏅壊 + rangeBgColor: { + type: String, + default: 'rgba(41,121,255,0.13)' + }, + // 鑼冨洿鍐呮棩鏈熷瓧浣撻鑹� + rangeColor: { + type: String, + default: '#2979ff' + }, + // mode=range鏃剁敓鏁堬紝璧峰鏃ユ湡鑷畾涔夋枃妗� + startText: { + type: String, + default: '寮�濮�' + }, + // mode=range鏃剁敓鏁堬紝缁撴潫鏃ユ湡鑷畾涔夋枃妗� + endText: { + type: String, + default: '缁撴潫' + }, + //鎸夐挳鏍峰紡绫诲瀷 + btnType: { + type: String, + default: 'primary' + }, + // 褰撳墠閫変腑鏃ユ湡甯﹂�変腑鏁堟灉 + isActiveCurrent: { + type: Boolean, + default: true + }, + // 鍒囨崲骞存湀鏄惁瑙﹀彂浜嬩欢 mode=date鏃剁敓鏁� + isChange: { + type: Boolean, + default: false + }, + // 鏄惁鏄剧ず鍙充笂瑙掔殑鍏抽棴鍥炬爣 + closeable: { + type: Boolean, + default: true + }, + // 椤堕儴鐨勬彁绀烘枃瀛� + toolTip: { + type: String, + default: '閫夋嫨鏃ユ湡' + } + }, + data() { + return { + // 鏄熸湡鍑�,鍊间负1-7 + weekday: 1, + weekdayArr:[], + // 褰撳墠鏈堟湁澶氬皯澶� + days: 0, + daysArr:[], + showTitle: '', + year: 2020, + month: 0, + day: 0, + startYear: 0, + startMonth: 0, + startDay: 0, + endYear: 0, + endMonth: 0, + endDay: 0, + today: '', + activeDate: '', + startDate: '', + endDate: '', + isStart: true, + min: null, + max: null, + weekDayZh: ['鏃�', '涓�', '浜�', '涓�', '鍥�', '浜�', '鍏�'] + }; + }, + computed: { + dataChange() { + return `${this.mode}-${this.minDate}-${this.maxDate}`; + }, + uZIndex() { + // 濡傛灉鐢ㄦ埛鏈変紶閫抸-index鍊硷紝浼樺厛浣跨敤 + return this.zIndex ? this.zIndex : this.$u.zIndex.popup; + } + }, + watch: { + dataChange(val) { + this.init() + } + }, + created() { + this.init() + }, + methods: { + getColor(index, type) { + let color = type == 1 ? '' : this.color; + let day = index + 1 + let date = `${this.year}-${this.month}-${day}` + let timestamp = new Date(date.replace(/\-/g, '/')).getTime(); + let start = this.startDate.replace(/\-/g, '/') + let end = this.endDate.replace(/\-/g, '/') + if ((this.isActiveCurrent && this.activeDate == date) || this.startDate == date || this.endDate == date) { + color = type == 1 ? this.activeBgColor : this.activeColor; + } else if (this.endDate && timestamp > new Date(start).getTime() && timestamp < new Date(end).getTime()) { + color = type == 1 ? this.rangeBgColor : this.rangeColor; + } + return color; + }, + init() { + let now = new Date(); + this.year = now.getFullYear(); + this.month = now.getMonth() + 1; + this.day = now.getDate(); + this.today = `${now.getFullYear()}-${now.getMonth() + 1}-${now.getDate()}`; + this.activeDate = this.today; + this.min = this.initDate(this.minDate); + this.max = this.initDate(this.maxDate || this.today); + this.startDate = ""; + this.startYear = 0; + this.startMonth = 0; + this.startDay = 0; + this.endYear = 0; + this.endMonth = 0; + this.endDay = 0; + this.endDate = ""; + this.isStart = true; + this.changeData(); + }, + //鏃ユ湡澶勭悊 + initDate(date) { + let fdate = date.split('-'); + return { + year: Number(fdate[0] || 1920), + month: Number(fdate[1] || 1), + day: Number(fdate[2] || 1) + } + }, + openDisAbled: function(year, month, day) { + let bool = true; + let date = `${year}/${month}/${day}`; + // let today = this.today.replace(/\-/g, '/'); + let min = `${this.min.year}/${this.min.month}/${this.min.day}`; + let max = `${this.max.year}/${this.max.month}/${this.max.day}`; + let timestamp = new Date(date).getTime(); + if (timestamp >= new Date(min).getTime() && timestamp <= new Date(max).getTime()) { + bool = false; + } + return bool; + }, + generateArray: function(start, end) { + return Array.from(new Array(end + 1).keys()).slice(start); + }, + formatNum: function(num) { + return num < 10 ? '0' + num : num + ''; + }, + //涓�涓湀鏈夊灏戝ぉ + getMonthDay(year, month) { + let days = new Date(year, month, 0).getDate(); + return days; + }, + getWeekday(year, month) { + let date = new Date(`${year}/${month}/01 00:00:00`); + return date.getDay(); + }, + checkRange(year) { + let overstep = false; + if (year < this.minYear || year > this.maxYear) { + uni.showToast({ + title: "鏃ユ湡瓒呭嚭鑼冨洿鍟", + icon: 'none' + }) + overstep = true; + } + return overstep; + }, + changeMonthHandler(isAdd) { + if (isAdd) { + let month = this.month + 1; + let year = month > 12 ? this.year + 1 : this.year; + if (!this.checkRange(year)) { + this.month = month > 12 ? 1 : month; + this.year = year; + this.changeData(); + } + + } else { + let month = this.month - 1; + let year = month < 1 ? this.year - 1 : this.year; + if (!this.checkRange(year)) { + this.month = month < 1 ? 12 : month; + this.year = year; + this.changeData(); + } + } + }, + changeYearHandler(isAdd) { + let year = isAdd ? this.year + 1 : this.year - 1; + if (!this.checkRange(year)) { + this.year = year; + this.changeData(); + } + }, + changeData() { + this.days = this.getMonthDay(this.year, this.month); + this.daysArr=this.generateArray(1,this.days) + this.weekday = this.getWeekday(this.year, this.month); + this.weekdayArr=this.generateArray(1,this.weekday) + this.showTitle = `${this.year}骞�${this.month}鏈坄; + if (this.isChange && this.mode == 'date') { + this.btnFix(true); + } + }, + dateClick: function(day) { + day += 1; + if (!this.openDisAbled(this.year, this.month, day)) { + this.day = day; + let date = `${this.year}-${this.month}-${day}`; + if (this.mode == 'date') { + this.activeDate = date; + } else { + let compare = new Date(date.replace(/\-/g, '/')).getTime() < new Date(this.startDate.replace(/\-/g, '/')).getTime() + if (this.isStart || compare) { + this.startDate = date; + this.startYear = this.year; + this.startMonth = this.month; + this.startDay = this.day; + this.endYear = 0; + this.endMonth = 0; + this.endDay = 0; + this.endDate = ""; + this.activeDate = ""; + this.isStart = false; + } else { + this.endDate = date; + this.endYear = this.year; + this.endMonth = this.month; + this.endDay = this.day; + this.isStart = true; + } + } + } + }, + close() { + // 淇敼閫氳繃v-model缁戝畾鐨勭埗缁勪欢鍙橀噺鐨勫�间负false锛屼粠鑰岄殣钘忔棩鍘嗗脊绐� + this.$emit('input', false); + }, + getWeekText(date) { + date = new Date(`${date.replace(/\-/g, '/')} 00:00:00`); + let week = date.getDay(); + return '鏄熸湡' + ['鏃�', '涓�', '浜�', '涓�', '鍥�', '浜�', '鍏�'][week]; + }, + btnFix(show) { + if (!show) { + this.close(); + } + if (this.mode == 'date') { + let arr = this.activeDate.split('-') + let year = this.isChange ? this.year : Number(arr[0]); + let month = this.isChange ? this.month : Number(arr[1]); + let day = this.isChange ? this.day : Number(arr[2]); + //褰撳墠鏈堟湁澶氬皯澶� + let days = this.getMonthDay(year, month); + let result = `${year}-${this.formatNum(month)}-${this.formatNum(day)}`; + let weekText = this.getWeekText(result); + let isToday = false; + if (`${year}-${month}-${day}` == this.today) { + //浠婂ぉ + isToday = true; + } + this.$emit('change', { + year: year, + month: month, + day: day, + days: days, + result: result, + week: weekText, + isToday: isToday, + // switch: show //鏄惁鏄垏鎹㈠勾鏈堟搷浣� + }); + } else { + if (!this.startDate || !this.endDate) return; + let startMonth = this.formatNum(this.startMonth); + let startDay = this.formatNum(this.startDay); + let startDate = `${this.startYear}-${startMonth}-${startDay}`; + let startWeek = this.getWeekText(startDate) + + let endMonth = this.formatNum(this.endMonth); + let endDay = this.formatNum(this.endDay); + let endDate = `${this.endYear}-${endMonth}-${endDay}`; + let endWeek = this.getWeekText(endDate); + this.$emit('change', { + startYear: this.startYear, + startMonth: this.startMonth, + startDay: this.startDay, + startDate: startDate, + startWeek: startWeek, + endYear: this.endYear, + endMonth: this.endMonth, + endDay: this.endDay, + endDate: endDate, + endWeek: endWeek + }); + } + } + } + }; +</script> + +<style scoped lang="scss"> + @import "../../libs/css/style.components.scss"; + + .u-calendar { + color: $u-content-color; + + &__header { + width: 100%; + box-sizing: border-box; + font-size: 30rpx; + background-color: #fff; + color: $u-main-color; + + &__text { + margin-top: 30rpx; + padding: 0 60rpx; + @include vue-flex; + justify-content: center; + align-items: center; + } + } + + &__action { + padding: 40rpx 0 40rpx 0; + + &__icon { + margin: 0 16rpx; + } + + &__text { + padding: 0 16rpx; + color: $u-main-color; + font-size: 32rpx; + line-height: 32rpx; + font-weight: bold; + } + } + + &__week-day { + @include vue-flex; + align-items: center; + justify-content: center; + padding: 6px 0; + overflow: hidden; + + &__text { + flex: 1; + text-align: center; + } + } + + &__content { + width: 100%; + @include vue-flex; + flex-wrap: wrap; + padding: 6px 0; + box-sizing: border-box; + background-color: #fff; + position: relative; + + &--end-date { + border-top-right-radius: 8rpx; + border-bottom-right-radius: 8rpx; + } + + &--start-date { + border-top-left-radius: 8rpx; + border-bottom-left-radius: 8rpx; + } + + &__item { + width: 14.2857%; + @include vue-flex; + align-items: center; + justify-content: center; + padding: 6px 0; + overflow: hidden; + position: relative; + z-index: 2; + + &__inner { + height: 84rpx; + @include vue-flex; + align-items: center; + justify-content: center; + flex-direction: column; + font-size: 32rpx; + position: relative; + border-radius: 50%; + + &__desc { + width: 100%; + font-size: 24rpx; + line-height: 24rpx; + transform: scale(0.75); + transform-origin: center center; + position: absolute; + left: 0; + text-align: center; + bottom: 2rpx; + } + } + + &__tips { + width: 100%; + font-size: 24rpx; + line-height: 24rpx; + position: absolute; + left: 0; + transform: scale(0.8); + transform-origin: center center; + text-align: center; + bottom: 8rpx; + z-index: 2; + } + } + + &__bg-month { + position: absolute; + font-size: 130px; + line-height: 130px; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + color: #e4e7ed; + z-index: 1; + } + } + + &__bottom { + width: 100%; + @include vue-flex; + align-items: center; + justify-content: center; + flex-direction: column; + background-color: #fff; + padding: 0 40rpx 30rpx; + box-sizing: border-box; + font-size: 24rpx; + color: $u-tips-color; + + &__choose { + height: 50rpx; + } + + &__btn { + width: 100%; + } + } + } +</style> \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-car-keyboard/u-car-keyboard.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-car-keyboard/u-car-keyboard.vue" new file mode 100644 index 0000000..84b1467 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-car-keyboard/u-car-keyboard.vue" @@ -0,0 +1,257 @@ +<template> + <view class="u-keyboard" @touchmove.stop.prevent="() => {}"> + <view class="u-keyboard-grids"> + <block> + <view class="u-keyboard-grids-item" v-for="(group, i) in abc ? EngKeyBoardList : areaList" :key="i"> + <view :hover-stay-time="100" @tap="carInputClick(i, j)" hover-class="u-carinput-hover" class="u-keyboard-grids-btn" + v-for="(item, j) in group" :key="j"> + {{ item }} + </view> + </view> + <view @touchstart="backspaceClick" @touchend="clearTimer" :hover-stay-time="100" class="u-keyboard-back" + hover-class="u-hover-class"> + <u-icon :size="38" name="backspace" :bold="true"></u-icon> + </view> + <view :hover-stay-time="100" class="u-keyboard-change" hover-class="u-carinput-hover" @tap="changeCarInputMode"> + <text class="zh" :class="[!abc ? 'active' : 'inactive']">涓�</text> + / + <text class="en" :class="[abc ? 'active' : 'inactive']">鑻�</text> + </view> + </block> + </view> + </view> +</template> + +<script> + export default { + name: "u-keyboard", + props: { + // 鏄惁鎵撲贡閿洏鎸夐敭鐨勯『搴� + random: { + type: Boolean, + default: false + } + }, + data() { + return { + // 杞︾墝杈撳叆鏃讹紝abc=true涓鸿緭鍏ヨ溅鐗屽彿鐮侊紝bac=false涓鸿緭鍏ョ渷浠戒腑鏂囩畝绉� + abc: false + }; + }, + computed: { + areaList() { + let data = [ + '浜�', + '娌�', + '绮�', + '娲�', + '鍐�', + '璞�', + '浜�', + '杈�', + '榛�', + '婀�', + '鐨�', + '椴�', + '鑻�', + '娴�', + '璧�', + '閯�', + '妗�', + '鐢�', + '鏅�', + '闄�', + '钂�', + '鍚�', + '闂�', + '璐�', + '娓�', + '宸�', + '闈�', + '鐞�', + '瀹�', + '鎸�', + '钘�', + '娓�', + '婢�', + '鏂�', + '浣�', + '瀛�' + ]; + let tmp = []; + // 鎵撲贡椤哄簭 + if (this.random) data = this.$u.randomArray(data); + // 鍒囧壊鎴愪簩缁存暟缁� + tmp[0] = data.slice(0, 10); + tmp[1] = data.slice(10, 20); + tmp[2] = data.slice(20, 30); + tmp[3] = data.slice(30, 36); + return tmp; + }, + EngKeyBoardList() { + let data = [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 0, + 'Q', + 'W', + 'E', + 'R', + 'T', + 'Y', + 'U', + 'I', + 'O', + 'P', + 'A', + 'S', + 'D', + 'F', + 'G', + 'H', + 'J', + 'K', + 'L', + 'Z', + 'X', + 'C', + 'V', + 'B', + 'N', + 'M' + ]; + let tmp = []; + if (this.random) data = this.$u.randomArray(data); + tmp[0] = data.slice(0, 10); + tmp[1] = data.slice(10, 20); + tmp[2] = data.slice(20, 30); + tmp[3] = data.slice(30, 36); + return tmp; + } + }, + methods: { + // 鐐瑰嚮閿洏鎸夐挳 + carInputClick(i, j) { + let value = ''; + // 涓嶅悓妯″紡锛岃幏鍙栦笉鍚屾暟缁勭殑鍊� + if (this.abc) value = this.EngKeyBoardList[i][j]; + else value = this.areaList[i][j]; + this.$emit('change', value); + }, + // 淇敼姹借溅鐗岄敭鐩樼殑杈撳叆妯″紡锛屼腑鏂噟鑻辨枃 + changeCarInputMode() { + this.abc = !this.abc; + }, + // 鐐瑰嚮閫�鏍奸敭 + backspaceClick() { + this.$emit('backspace'); + clearInterval(this.timer); //鍐嶆娓呯┖瀹氭椂鍣紝闃叉閲嶅娉ㄥ唽瀹氭椂鍣� + this.timer = null; + this.timer = setInterval(() => { + this.$emit('backspace'); + }, 250); + }, + clearTimer() { + clearInterval(this.timer); + this.timer = null; + }, + } + }; +</script> + +<style lang="scss" scoped> + @import "../../libs/css/style.components.scss"; + + .u-keyboard-grids { + background: rgb(215, 215, 217); + padding: 24rpx 0; + position: relative; + } + + .u-keyboard-grids-item { + @include vue-flex; + align-items: center; + justify-content: center; + } + + .u-keyboard-grids-btn { + text-decoration: none; + width: 62rpx; + flex: 0 0 64rpx; + height: 80rpx; + /* #ifndef APP-NVUE */ + display: inline-flex; + /* #endif */ + font-size: 36rpx; + text-align: center; + line-height: 80rpx; + background-color: #fff; + margin: 8rpx 5rpx; + border-radius: 8rpx; + box-shadow: 0 2rpx 0rpx #888992; + font-weight: 500; + justify-content: center; + } + + .u-carinput-hover { + background-color: rgb(185, 188, 195) !important; + } + + .u-keyboard-back { + position: absolute; + width: 96rpx; + right: 22rpx; + bottom: 32rpx; + height: 80rpx; + background-color: rgb(185, 188, 195); + @include vue-flex; + align-items: center; + border-radius: 8rpx; + justify-content: center; + box-shadow: 0 2rpx 0rpx #888992; + } + + .u-keyboard-change { + font-size: 24rpx; + box-shadow: 0 2rpx 0rpx #888992; + position: absolute; + width: 96rpx; + left: 22rpx; + line-height: 1; + bottom: 32rpx; + height: 80rpx; + background-color: #ffffff; + @include vue-flex; + align-items: center; + border-radius: 8rpx; + justify-content: center; + } + + .u-keyboard-change .inactive.zh { + transform: scale(0.85) translateY(-10rpx); + } + + .u-keyboard-change .inactive.en { + transform: scale(0.85) translateY(10rpx); + } + + .u-keyboard-change .active { + color: rgb(237, 112, 64); + font-size: 30rpx; + } + + .u-keyboard-change .zh { + transform: translateY(-10rpx); + } + + .u-keyboard-change .en { + transform: translateY(10rpx); + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-card/u-card.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-card/u-card.vue" new file mode 100644 index 0000000..a3cb2aa --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-card/u-card.vue" @@ -0,0 +1,299 @@ +<template> + <view + class="u-card" + @tap.stop="click" + :class="{ 'u-border': border, 'u-card-full': full, 'u-card--border': borderRadius > 0 }" + :style="{ + borderRadius: borderRadius + 'rpx', + margin: margin, + boxShadow: boxShadow + }" + > + <view + v-if="showHead" + class="u-card__head" + :style="[{padding: padding + 'rpx'}, headStyle]" + :class="{ + 'u-border-bottom': headBorderBottom + }" + @tap="headClick" + > + <view v-if="!$slots.head" class="u-flex u-row-between"> + <view class="u-card__head--left u-flex u-line-1" v-if="title"> + <image + :src="thumb" + class="u-card__head--left__thumb" + mode="aspectfull" + v-if="thumb" + :style="{ + height: thumbWidth + 'rpx', + width: thumbWidth + 'rpx', + borderRadius: thumbCircle ? '100rpx' : '6rpx' + }" + ></image> + <text + class="u-card__head--left__title u-line-1" + :style="{ + fontSize: titleSize + 'rpx', + color: titleColor + }" + > + {{ title }} + </text> + </view> + <view class="u-card__head--right u-line-1" v-if="subTitle"> + <text + class="u-card__head__title__text" + :style="{ + fontSize: subTitleSize + 'rpx', + color: subTitleColor + }" + > + {{ subTitle }} + </text> + </view> + </view> + <slot name="head" v-else /> + </view> + <view @tap="bodyClick" class="u-card__body" :style="[{padding: padding + 'rpx'}, bodyStyle]"><slot name="body" /></view> + <view + v-if="showFoot" + class="u-card__foot" + @tap="footClick" + :style="[{padding: $slots.foot ? padding + 'rpx' : 0}, footStyle]" + :class="{ + 'u-border-top': footBorderTop + }" + > + <slot name="foot" /> + </view> + </view> +</template> + +<script> +/** + * card 鍗$墖 + * @description 鍗$墖缁勪欢涓�鑸敤浜庡涓垪琛ㄦ潯鐩紝涓旈鏍肩粺涓�鐨勫満鏅� + * @tutorial https://www.uviewui.com/components/card.html + * @property {Boolean} full 鍗$墖涓庡睆骞曚袱渚ф槸鍚︾暀绌洪殭锛堥粯璁alse锛� + * @property {String} title 澶撮儴宸﹁竟鐨勬爣棰� + * @property {String} title-color 鏍囬棰滆壊锛堥粯璁�#303133锛� + * @property {String | Number} title-size 鏍囬瀛椾綋澶у皬锛屽崟浣峳px锛堥粯璁�30锛� + * @property {String} sub-title 澶撮儴鍙宠竟鐨勫壇鏍囬 + * @property {String} sub-title-color 鍓爣棰橀鑹诧紙榛樿#909399锛� + * @property {String | Number} sub-title-size 鍓爣棰樺瓧浣撳ぇ灏忥紙榛樿26锛� + * @property {Boolean} border 鏄惁鏄剧ず杈规锛堥粯璁rue锛� + * @property {String | Number} index 鐢ㄤ簬鏍囪瘑鐐瑰嚮浜嗙鍑犱釜鍗$墖 + * @property {String} box-shadow 鍗$墖澶栧洿闃村奖锛屽瓧绗︿覆褰㈠紡锛堥粯璁one锛� + * @property {String} margin 鍗$墖涓庡睆骞曚袱杈瑰拰涓婁笅鍏冪礌鐨勯棿璺濓紝闇�甯﹀崟浣嶏紝濡�"30rpx 20rpx"锛堥粯璁�30rpx锛� + * @property {String | Number} border-radius 鍗$墖鏁翠綋鐨勫渾瑙掑�硷紝鍗曚綅rpx锛堥粯璁�16锛� + * @property {Object} head-style 澶撮儴鑷畾涔夋牱寮忥紝瀵硅薄褰㈠紡 + * @property {Object} body-style 涓儴鑷畾涔夋牱寮忥紝瀵硅薄褰㈠紡 + * @property {Object} foot-style 搴曢儴鑷畾涔夋牱寮忥紝瀵硅薄褰㈠紡 + * @property {Boolean} head-border-bottom 鏄惁鏄剧ず澶撮儴鐨勪笅杈规锛堥粯璁rue锛� + * @property {Boolean} foot-border-top 鏄惁鏄剧ず搴曢儴鐨勪笂杈规锛堥粯璁rue锛� + * @property {Boolean} show-head 鏄惁鏄剧ず澶撮儴锛堥粯璁rue锛� + * @property {Boolean} show-head 鏄惁鏄剧ず灏鹃儴锛堥粯璁rue锛� + * @property {String} thumb 缂╃暐鍥捐矾寰勶紝濡傝缃皢鏄剧ず鍦ㄦ爣棰樼殑宸﹁竟锛屼笉寤鸿浣跨敤鐩稿璺緞 + * @property {String | Number} thumb-width 缂╃暐鍥剧殑瀹藉害锛岄珮绛変簬瀹斤紝鍗曚綅rpx锛堥粯璁�60锛� + * @property {Boolean} thumb-circle 缂╃暐鍥炬槸鍚︿负鍦嗗舰锛堥粯璁alse锛� + * @event {Function} click 鏁翠釜鍗$墖浠绘剰浣嶇疆琚偣鍑绘椂瑙﹀彂 + * @event {Function} head-click 鍗$墖澶撮儴琚偣鍑绘椂瑙﹀彂 + * @event {Function} body-click 鍗$墖涓讳綋閮ㄥ垎琚偣鍑绘椂瑙﹀彂 + * @event {Function} foot-click 鍗$墖搴曢儴閮ㄥ垎琚偣鍑绘椂瑙﹀彂 + * @example <u-card padding="30" title="card"></u-card> + */ +export default { + name: 'u-card', + props: { + // 涓庡睆骞曚袱渚ф槸鍚︾暀绌洪殭 + full: { + type: Boolean, + default: false + }, + // 鏍囬 + title: { + type: String, + default: '' + }, + // 鏍囬棰滆壊 + titleColor: { + type: String, + default: '#303133' + }, + // 鏍囬瀛椾綋澶у皬锛屽崟浣峳px + titleSize: { + type: [Number, String], + default: '30' + }, + // 鍓爣棰� + subTitle: { + type: String, + default: '' + }, + // 鍓爣棰橀鑹� + subTitleColor: { + type: String, + default: '#909399' + }, + // 鍓爣棰樺瓧浣撳ぇ灏忥紝鍗曚綅rpx + subTitleSize: { + type: [Number, String], + default: '26' + }, + // 鏄惁鏄剧ず澶栭儴杈规锛屽彧瀵筬ull=false鏃舵湁鏁�(鍗$墖涓庤竟妗嗘湁绌洪殭鏃�) + border: { + type: Boolean, + default: true + }, + // 鐢ㄤ簬鏍囪瘑鐐瑰嚮浜嗙鍑犱釜 + index: { + type: [Number, String, Object], + default: '' + }, + // 鐢ㄤ簬闅斿紑涓婁笅宸﹀彸鐨勮竟璺濓紝甯﹀崟浣嶇殑鍐欐硶锛屽锛�"30rpx 30rpx"锛�"20rpx 20rpx 30rpx 30rpx" + margin: { + type: String, + default: '30rpx' + }, + // card鍗$墖鐨勫渾瑙� + borderRadius: { + type: [Number, String], + default: '16' + }, + // 澶撮儴鑷畾涔夋牱寮忥紝瀵硅薄褰㈠紡 + headStyle: { + type: Object, + default() { + return {}; + } + }, + // 涓讳綋鑷畾涔夋牱寮忥紝瀵硅薄褰㈠紡 + bodyStyle: { + type: Object, + default() { + return {}; + } + }, + // 搴曢儴鑷畾涔夋牱寮忥紝瀵硅薄褰㈠紡 + footStyle: { + type: Object, + default() { + return {}; + } + }, + // 澶撮儴鏄惁涓嬭竟妗� + headBorderBottom: { + type: Boolean, + default: true + }, + // 搴曢儴鏄惁鏈変笂杈规 + footBorderTop: { + type: Boolean, + default: true + }, + // 鏍囬宸﹁竟鐨勭缉鐣ュ浘 + thumb: { + type: String, + default: '' + }, + // 缂╃暐鍥惧楂橈紝鍗曚綅rpx + thumbWidth: { + type: [String, Number], + default: '60' + }, + // 缂╃暐鍥炬槸鍚︿负鍦嗗舰 + thumbCircle: { + type: Boolean, + default: false + }, + // 缁檋ead锛宐ody锛宖oot鐨勫唴杈硅窛 + padding: { + type: [String, Number], + default: '30' + }, + // 鏄惁鏄剧ず澶撮儴 + showHead: { + type: Boolean, + default: true + }, + // 鏄惁鏄剧ず灏鹃儴 + showFoot: { + type: Boolean, + default: true + }, + // 鍗$墖澶栧洿闃村奖锛屽瓧绗︿覆褰㈠紡 + boxShadow: { + type: String, + default: 'none' + } + }, + data() { + return {}; + }, + methods: { + click() { + this.$emit('click', this.index); + }, + headClick() { + this.$emit('head-click', this.index); + }, + bodyClick() { + this.$emit('body-click', this.index); + }, + footClick() { + this.$emit('foot-click', this.index); + } + } +}; +</script> + +<style lang="scss" scoped> +@import "../../libs/css/style.components.scss"; + +.u-card { + position: relative; + overflow: hidden; + font-size: 28rpx; + background-color: #ffffff; + box-sizing: border-box; + + &-full { + // 濡傛灉鏄笌灞忓箷涔嬮棿涓嶇暀绌洪殭锛屽簲璇ヨ缃乏鍙宠竟璺濅负0 + margin-left: 0 !important; + margin-right: 0 !important; + width: 100%; + } + + &--border:after { + border-radius: 16rpx; + } + + &__head { + &--left { + color: $u-main-color; + + &__thumb { + margin-right: 16rpx; + } + + &__title { + max-width: 400rpx; + } + } + + &--right { + color: $u-tips-color; + margin-left: 6rpx; + } + } + + &__body { + color: $u-content-color; + } + + &__foot { + color: $u-tips-color; + } +} +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-cell-group/u-cell-group.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-cell-group/u-cell-group.vue" new file mode 100644 index 0000000..3fbca72 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-cell-group/u-cell-group.vue" @@ -0,0 +1,70 @@ +<template> + <view class="u-cell-box"> + <view class="u-cell-title" v-if="title" :style="[titleStyle]"> + {{title}} + </view> + <view class="u-cell-item-box" :class="{'u-border-bottom u-border-top': border}"> + <slot /> + </view> + </view> +</template> + +<script> + /** + * cellGroup 鍗曞厓鏍肩埗缁勪欢Group + * @description cell鍗曞厓鏍间竴鑸敤浜庝竴缁勫垪琛ㄧ殑鎯呭喌锛屾瘮濡備釜浜轰腑蹇冮〉锛岃缃〉绛夈�傛惌閰島-cell-item + * @tutorial https://www.uviewui.com/components/cell.html + * @property {String} title 鍒嗙粍鏍囬 + * @property {Boolean} border 鏄惁鏄剧ず澶栬竟妗嗭紙榛樿true锛� + * @property {Object} title-style 鍒嗙粍鏍囬鐨勭殑鏍峰紡锛屽璞″舰寮忥紝濡倇'font-size': '24rpx'} 鎴� {'fontSize': '24rpx'} + * @example <u-cell-group title="璁剧疆鍠滃ソ"> + */ + export default { + name: "u-cell-group", + props: { + // 鍒嗙粍鏍囬 + title: { + type: String, + default: '' + }, + // 鏄惁鏄剧ず鍒嗙粍list涓婁笅杈规 + border: { + type: Boolean, + default: true + }, + // 鍒嗙粍鏍囬鐨勬牱寮忥紝瀵硅薄褰㈠紡锛屾敞鎰忛┘宄板睘鎬у啓娉� + // 绫讳技 {'font-size': '24rpx'} 鍜� {'fontSize': '24rpx'} + titleStyle: { + type: Object, + default () { + return {}; + } + } + }, + data() { + return { + index: 0, + } + }, + } +</script> + +<style lang="scss" scoped> + @import "../../libs/css/style.components.scss"; + + .u-cell-box { + width: 100%; + } + + .u-cell-title { + padding: 30rpx 32rpx 10rpx 32rpx; + font-size: 30rpx; + text-align: left; + color: $u-tips-color; + } + + .u-cell-item-box { + background-color: #FFFFFF; + flex-direction: row; + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-cell-item/u-cell-item.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-cell-item/u-cell-item.vue" new file mode 100644 index 0000000..055af3a --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-cell-item/u-cell-item.vue" @@ -0,0 +1,316 @@ +<template> + <view + @tap="click" + class="u-cell" + :class="{ 'u-border-bottom': borderBottom, 'u-border-top': borderTop, 'u-col-center': center, 'u-cell--required': required }" + hover-stay-time="150" + :hover-class="hoverClass" + :style="{ + backgroundColor: bgColor + }" + > + <u-icon :size="iconSize" :name="icon" v-if="icon" :custom-style="iconStyle" class="u-cell__left-icon-wrap"></u-icon> + <view class="u-flex" v-else> + <slot name="icon"></slot> + </view> + <view + class="u-cell_title" + :style="[ + { + width: titleWidth ? titleWidth + 'rpx' : 'auto' + }, + titleStyle + ]" + > + <block v-if="title !== ''">{{ title }}</block> + <slot name="title" v-else></slot> + + <view class="u-cell__label" v-if="label || $slots.label" :style="[labelStyle]"> + <block v-if="label !== ''">{{ label }}</block> + <slot name="label" v-else></slot> + </view> + </view> + + <view class="u-cell__value" :style="[valueStyle]"> + <block class="u-cell__value" v-if="value !== ''">{{ value }}</block> + <slot v-else></slot> + </view> + <view class="u-flex u-cell_right" v-if="$slots['right-icon']"> + <slot name="right-icon"></slot> + </view> + <u-icon v-if="arrow" name="arrow-right" :style="[arrowStyle]" class="u-icon-wrap u-cell__right-icon-wrap"></u-icon> + </view> +</template> + +<script> +/** + * cellItem 鍗曞厓鏍糏tem + * @description cell鍗曞厓鏍间竴鑸敤浜庝竴缁勫垪琛ㄧ殑鎯呭喌锛屾瘮濡備釜浜轰腑蹇冮〉锛岃缃〉绛夈�傛惌閰島-cell-group浣跨敤 + * @tutorial https://www.uviewui.com/components/cell.html + * @property {String} title 宸︿晶鏍囬 + * @property {String} icon 宸︿晶鍥炬爣鍚嶏紝鍙敮鎸乽View鍐呯疆鍥炬爣锛岃Icon 鍥炬爣 + * @property {Object} icon-style 宸﹁竟鍥炬爣鐨勬牱寮忥紝瀵硅薄褰㈠紡 + * @property {String} value 鍙充晶鍐呭 + * @property {String} label 鏍囬涓嬫柟鐨勬弿杩颁俊鎭� + * @property {Boolean} border-bottom 鏄惁鏄剧ずcell鐨勪笅杈规锛堥粯璁rue锛� + * @property {Boolean} border-top 鏄惁鏄剧ずcell鐨勪笂杈规锛堥粯璁alse锛� + * @property {Boolean} center 鏄惁浣垮唴瀹瑰瀭鐩村眳涓紙榛樿false锛� + * @property {String} hover-class 鏄惁寮�鍚偣鍑诲弽棣堬紝none涓烘棤鏁堟灉锛堥粯璁rue锛� + * // @property {Boolean} border-gap border-bottom涓簍rue鏃讹紝Cell鍒楄〃涓棿鐨勬潯鐩殑涓嬭竟妗嗘槸鍚︿笌宸﹁竟鏈変竴涓棿闅旓紙榛樿true锛� + * @property {Boolean} arrow 鏄惁鏄剧ず鍙充晶绠ご锛堥粯璁rue锛� + * @property {Boolean} required 绠ご鏂瑰悜锛屽彲閫夊�硷紙榛樿right锛� + * @property {Boolean} arrow-direction 鏄惁鏄剧ず宸﹁竟琛ㄧず蹇呭~鐨勬槦鍙凤紙榛樿false锛� + * @property {Object} title-style 鏍囬鏍峰紡锛屽璞″舰寮� + * @property {Object} value-style 鍙充晶鍐呭鏍峰紡锛屽璞″舰寮� + * @property {Object} label-style 鏍囬涓嬫柟鎻忚堪淇℃伅鐨勬牱寮忥紝瀵硅薄褰㈠紡 + * @property {String} bg-color 鑳屾櫙棰滆壊锛堥粯璁ransparent锛� + * @property {String Number} index 鐢ㄤ簬鍦╟lick浜嬩欢鍥炶皟涓繑鍥烇紝鏍囪瘑褰撳墠鏄鍑犱釜Item + * @property {String Number} title-width 鏍囬鐨勫搴︼紝鍗曚綅rpx + * @example <u-cell-item icon="integral-fill" title="浼氬憳绛夌骇" value="鏂扮増鏈�"></u-cell-item> + */ +export default { + name: 'u-cell-item', + props: { + // 宸︿晶鍥炬爣鍚嶇О(鍙兘uView鍐呯疆鍥炬爣)锛屾垨鑰呭浘鏍噑rc + icon: { + type: String, + default: '' + }, + // 宸︿晶鏍囬 + title: { + type: [String, Number], + default: '' + }, + // 鍙充晶鍐呭 + value: { + type: [String, Number], + default: '' + }, + // 鏍囬涓嬫柟鐨勬弿杩颁俊鎭� + label: { + type: [String, Number], + default: '' + }, + // 鏄惁鏄剧ず涓嬭竟妗� + borderBottom: { + type: Boolean, + default: true + }, + // 鏄惁鏄剧ず涓婅竟妗� + borderTop: { + type: Boolean, + default: false + }, + // 澶氫釜cell涓紝涓棿鐨刢ell鏄剧ず涓嬪垝绾挎椂锛屼笅鍒掔嚎鏄惁缁欎竴涓埌宸﹁竟鐨勮窛绂� + // 1.4.0鐗堟湰搴熼櫎姝ゅ弬鏁帮紝榛樿杈规鐢眀order-top鍜宐order-bottom鎻愪緵锛屾鍙傛暟浼氶�犳垚骞叉壈 + // borderGap: { + // type: Boolean, + // default: true + // }, + // 鏄惁寮�鍚偣鍑诲弽棣堬紝鍗崇偣鍑绘椂cell鑳屾櫙涓虹伆鑹诧紝none涓烘棤鏁堟灉 + hoverClass: { + type: String, + default: 'u-cell-hover' + }, + // 鏄惁鏄剧ず鍙充晶绠ご + arrow: { + type: Boolean, + default: true + }, + // 鍐呭鏄惁鍨傜洿灞呬腑 + center: { + type: Boolean, + default: false + }, + // 鏄惁鏄剧ず宸﹁竟琛ㄧず蹇呭~鐨勬槦鍙� + required: { + type: Boolean, + default: false + }, + // 鏍囬鐨勫搴︼紝鍗曚綅rpx + titleWidth: { + type: [Number, String], + default: '' + }, + // 鍙充晶绠ご鏂瑰悜锛屽彲閫夊�硷細right|up|down锛岄粯璁や负right + arrowDirection: { + type: String, + default: 'right' + }, + // 鎺у埗鏍囬鐨勬牱寮� + titleStyle: { + type: Object, + default() { + return {}; + } + }, + // 鍙充晶鏄剧ず鍐呭鐨勬牱寮� + valueStyle: { + type: Object, + default() { + return {}; + } + }, + // 鎻忚堪淇℃伅鐨勬牱寮� + labelStyle: { + type: Object, + default() { + return {}; + } + }, + // 鑳屾櫙棰滆壊 + bgColor: { + type: String, + default: 'transparent' + }, + // 鐢ㄤ簬璇嗗埆琚偣鍑荤殑鏄鍑犱釜cell + index: { + type: [String, Number], + default: '' + }, + // 鏄惁浣跨敤lable鎻掓Ы + useLabelSlot: { + type: Boolean, + default: false + }, + // 宸﹁竟鍥炬爣鐨勫ぇ灏忥紝鍗曚綅rpx锛屽彧瀵逛紶鍏con瀛楁鏃舵湁鏁� + iconSize: { + type: [Number, String], + default: 34 + }, + // 宸﹁竟鍥炬爣鐨勬牱寮忥紝瀵硅薄褰㈠紡 + iconStyle: { + type: Object, + default() { + return {} + } + }, + }, + data() { + return { + + }; + }, + computed: { + arrowStyle() { + let style = {}; + if (this.arrowDirection == 'up') style.transform = 'rotate(-90deg)'; + else if (this.arrowDirection == 'down') style.transform = 'rotate(90deg)'; + else style.transform = 'rotate(0deg)'; + return style; + } + }, + methods: { + click() { + this.$emit('click', this.index); + } + } +}; +</script> + +<style lang="scss" scoped> +@import "../../libs/css/style.components.scss"; +.u-cell { + @include vue-flex; + align-items: center; + position: relative; + /* #ifndef APP-NVUE */ + box-sizing: border-box; + /* #endif */ + width: 100%; + padding: 26rpx 32rpx; + font-size: 28rpx; + line-height: 54rpx; + color: $u-content-color; + background-color: #fff; + text-align: left; +} + +.u-cell_title { + font-size: 28rpx; +} + +.u-cell__left-icon-wrap { + margin-right: 10rpx; + font-size: 32rpx; +} + +.u-cell__right-icon-wrap { + margin-left: 10rpx; + color: #969799; + font-size: 28rpx; +} + +.u-cell__left-icon-wrap, +.u-cell__right-icon-wrap { + @include vue-flex; + align-items: center; + height: 48rpx; +} + +.u-cell-border:after { + position: absolute; + /* #ifndef APP-NVUE */ + box-sizing: border-box; + content: ' '; + pointer-events: none; + border-bottom: 1px solid $u-border-color; + /* #endif */ + right: 0; + left: 0; + top: 0; + transform: scaleY(0.5); +} + +.u-cell-border { + position: relative; +} + +.u-cell__label { + margin-top: 6rpx; + font-size: 26rpx; + line-height: 36rpx; + color: $u-tips-color; + /* #ifndef APP-NVUE */ + word-wrap: break-word; + /* #endif */ +} + +.u-cell__value { + overflow: hidden; + text-align: right; + /* #ifndef APP-NVUE */ + vertical-align: middle; + /* #endif */ + color: $u-tips-color; + font-size: 26rpx; +} + +.u-cell__title, +.u-cell__value { + flex: 1; +} + +.u-cell--required { + /* #ifndef APP-NVUE */ + overflow: visible; + /* #endif */ + @include vue-flex; + align-items: center; +} + +.u-cell--required:before { + position: absolute; + /* #ifndef APP-NVUE */ + content: '*'; + /* #endif */ + left: 8px; + margin-top: 4rpx; + font-size: 14px; + color: $u-type-error; +} + +.u-cell_right { + line-height: 1; +} +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-checkbox-group/u-checkbox-group.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-checkbox-group/u-checkbox-group.vue" new file mode 100644 index 0000000..6a149b3 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-checkbox-group/u-checkbox-group.vue" @@ -0,0 +1,123 @@ +<template> + <view class="u-checkbox-group u-clearfix"> + <slot></slot> + </view> +</template> + +<script> + import Emitter from '../../libs/util/emitter.js'; + /** + * checkboxGroup 寮�鍏抽�夋嫨鍣ㄧ埗缁勪欢Group + * @description 澶嶉�夋缁勪欢涓�鑸敤浜庨渶瑕佸涓�夋嫨鐨勫満鏅紝璇ョ粍浠跺姛鑳藉畬鏁达紝浣跨敤鏂逛究 + * @tutorial https://www.uviewui.com/components/checkbox.html + * @property {String Number} max 鏈�澶氳兘閫変腑澶氬皯涓猚heckbox锛堥粯璁�999锛� + * @property {String Number} size 缁勪欢鏁翠綋鐨勫ぇ灏忥紝鍗曚綅rpx锛堥粯璁�40锛� + * @property {Boolean} disabled 鏄惁绂佺敤鎵�鏈塩heckbox锛堥粯璁alse锛� + * @property {String Number} icon-size 鍥炬爣澶у皬锛屽崟浣峳px锛堥粯璁�20锛� + * @property {Boolean} label-disabled 鏄惁绂佹鐐瑰嚮鏂囨湰鎿嶄綔checkbox(榛樿false) + * @property {String} width 瀹藉害锛岄渶甯﹀崟浣� + * @property {String} width 瀹藉害锛岄渶甯﹀崟浣� + * @property {String} shape 澶栬褰㈢姸锛宻hape-鏂瑰舰锛宑ircle-鍦嗗舰(榛樿circle) + * @property {Boolean} wrap 鏄惁姣忎釜checkbox閮芥崲琛岋紙榛樿false锛� + * @property {String} active-color 閫変腑鏃剁殑棰滆壊锛屽簲鐢ㄥ埌鎵�鏈夊瓙Checkbox缁勪欢锛堥粯璁�#2979ff锛� + * @event {Function} change 浠讳竴涓猚heckbox鐘舵�佸彂鐢熷彉鍖栨椂瑙﹀彂锛屽洖璋冧负涓�涓璞� + * @example <u-checkbox-group></u-checkbox-group> + */ + export default { + name: 'u-checkbox-group', + mixins: [Emitter], + props: { + // 鏈�澶氳兘閫変腑澶氬皯涓猚heckbox + max: { + type: [Number, String], + default: 999 + }, + // 鎵�鏈夐�変腑椤圭殑 name + // value: { + // default: Array, + // default() { + // return [] + // } + // }, + // 鏄惁绂佺敤鎵�鏈夊閫夋 + disabled: { + type: Boolean, + default: false + }, + // 鍦ㄨ〃鍗曞唴鎻愪氦鏃剁殑鏍囪瘑绗� + name: { + type: [Boolean, String], + default: '' + }, + // 鏄惁绂佹鐐瑰嚮鎻愮ず璇�変腑澶嶉�夋 + labelDisabled: { + type: Boolean, + default: false + }, + // 褰㈢姸锛宻quare涓烘柟褰紝circle涓哄師鍨� + shape: { + type: String, + default: 'square' + }, + // 閫変腑鐘舵�佷笅鐨勯鑹� + activeColor: { + type: String, + default: '#2979ff' + }, + // 缁勪欢鐨勬暣浣撳ぇ灏� + size: { + type: [String, Number], + default: 34 + }, + // 姣忎釜checkbox鍗爑-checkbox-group鐨勫搴� + width: { + type: String, + default: 'auto' + }, + // 鏄惁姣忎釜checkbox閮芥崲琛� + wrap: { + type: Boolean, + default: false + }, + // 鍥炬爣鐨勫ぇ灏忥紝鍗曚綅rpx + iconSize: { + type: [String, Number], + default: 20 + }, + }, + data() { + return { + } + }, + created() { + // 濡傛灉灏哻hildren瀹氫箟鍦╠ata涓紝鍦ㄥ井淇″皬绋嬪簭浼氶�犳垚寰幆寮曠敤鑰屾姤閿� + this.children = []; + }, + methods: { + emitEvent() { + let values = []; + this.children.map(val => { + if(val.value) values.push(val.name); + }) + this.$emit('change', values); + // 鍙戝嚭浜嬩欢锛岀敤浜庡湪琛ㄥ崟缁勪欢涓祵鍏heckbox鐨勬儏鍐碉紝杩涜楠岃瘉 + // 鐢变簬澶存潯灏忕▼搴忔墽琛岃繜閽濓紝鏁呴渶瑕佺敤鍑犲崄姣鐨勫欢鏃� + setTimeout(() => { + // 灏嗗綋鍓嶇殑鍊煎彂閫佸埌 u-form-item 杩涜鏍¢獙 + this.dispatch('u-form-item', 'on-form-change', values); + }, 60) + } + } + } +</script> + +<style lang="scss" scoped> + @import "../../libs/css/style.components.scss"; + + .u-checkbox-group { + /* #ifndef MP || APP-NVUE */ + display: inline-flex; + flex-wrap: wrap; + /* #endif */ + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-checkbox/u-checkbox.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-checkbox/u-checkbox.vue" new file mode 100644 index 0000000..9414461 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-checkbox/u-checkbox.vue" @@ -0,0 +1,284 @@ +<template> + <view class="u-checkbox" :style="[checkboxStyle]"> + <view class="u-checkbox__icon-wrap" @tap="toggle" :class="[iconClass]" :style="[iconStyle]"> + <u-icon class="u-checkbox__icon-wrap__icon" name="checkbox-mark" :size="checkboxIconSize" :color="iconColor"/> + </view> + <view class="u-checkbox__label" @tap="onClickLabel" :style="{ + fontSize: $u.addUnit(labelSize) + }"> + <slot /> + </view> + </view> +</template> + +<script> + /** + * checkbox 澶嶉�夋 + * @description 璇ョ粍浠堕渶瑕佹惌閰峜heckboxGroup缁勪欢浣跨敤锛屼互渚跨敤鎴疯繘琛屾搷浣滄椂锛岃幏寰楀綋鍓嶅閫夋缁勭殑閫変腑鎯呭喌銆� + * @tutorial https://www.uviewui.com/components/checkbox.html + * @property {String Number} icon-size 鍥炬爣澶у皬锛屽崟浣峳px锛堥粯璁�20锛� + * @property {String Number} label-size label瀛椾綋澶у皬锛屽崟浣峳px锛堥粯璁�28锛� + * @property {String Number} name checkbox缁勪欢鐨勬爣绀虹 + * @property {String} shape 褰㈢姸锛岃瀹樼綉璇存槑锛堥粯璁ircle锛� + * @property {Boolean} disabled 鏄惁绂佺敤 + * @property {Boolean} label-disabled 鏄惁绂佹鐐瑰嚮鏂囨湰鎿嶄綔checkbox + * @property {String} active-color 閫変腑鏃剁殑棰滆壊锛屽璁剧疆CheckboxGroup鐨刟ctive-color灏嗗け鏁� + * @event {Function} change 鏌愪釜checkbox鐘舵�佸彂鐢熷彉鍖栨椂瑙﹀彂锛屽洖璋冧负涓�涓璞� + * @example <u-checkbox v-model="checked" :disabled="false">澶╂动</u-checkbox> + */ + export default { + name: "u-checkbox", + props: { + // checkbox鐨勫悕绉� + name: { + type: [String, Number], + default: '' + }, + // 褰㈢姸锛宻quare涓烘柟褰紝circle涓哄師鍨� + shape: { + type: String, + default: '' + }, + // 鏄惁涓洪�変腑鐘舵�� + value: { + type: Boolean, + default: false + }, + // 鏄惁绂佺敤 + disabled: { + type: [String, Boolean], + default: '' + }, + // 鏄惁绂佹鐐瑰嚮鎻愮ず璇�変腑澶嶉�夋 + labelDisabled: { + type: [String, Boolean], + default: '' + }, + // 閫変腑鐘舵�佷笅鐨勯鑹诧紝濡傝缃鍊硷紝灏嗕細瑕嗙洊checkboxGroup鐨刟ctiveColor鍊� + activeColor: { + type: String, + default: '' + }, + // 鍥炬爣鐨勫ぇ灏忥紝鍗曚綅rpx + iconSize: { + type: [String, Number], + default: '' + }, + // label鐨勫瓧浣撳ぇ灏忥紝rpx鍗曚綅 + labelSize: { + type: [String, Number], + default: '' + }, + // 缁勪欢鐨勬暣浣撳ぇ灏� + size: { + type: [String, Number], + default: '' + }, + }, + data() { + return { + parentDisabled: false, + newParams: {}, + }; + }, + created() { + // 鏀粯瀹濆皬绋嬪簭涓嶆敮鎸乸rovide/inject锛屾墍浠ヤ娇鐢ㄨ繖涓柟娉曡幏鍙栨暣涓埗缁勪欢锛屽湪created瀹氫箟锛岄伩鍏嶅惊鐜簲鐢� + this.parent = this.$u.$parent.call(this, 'u-checkbox-group'); + // 濡傛灉瀛樺湪u-checkbox-group锛屽皢鏈粍浠剁殑this濉炶繘鐖剁粍浠剁殑children涓� + this.parent && this.parent.children.push(this); + }, + computed: { + // 鏄惁绂佺敤锛屽鏋滅埗缁勪欢u-checkbox-group绂佺敤鐨勮瘽锛屽皢浼氬拷鐣ュ瓙缁勪欢鐨勯厤缃� + isDisabled() { + return this.disabled !== '' ? this.disabled : this.parent ? this.parent.disabled : false; + }, + // 鏄惁绂佺敤label鐐瑰嚮 + isLabelDisabled() { + return this.labelDisabled !== '' ? this.labelDisabled : this.parent ? this.parent.labelDisabled : false; + }, + // 缁勪欢灏哄锛屽搴攕ize鐨勫�硷紝榛樿鍊间负34rpx + checkboxSize() { + return this.size ? this.size : (this.parent ? this.parent.size : 34); + }, + // 缁勪欢鐨勫嬀閫夊浘鏍囩殑灏哄锛岄粯璁�20 + checkboxIconSize() { + return this.iconSize ? this.iconSize : (this.parent ? this.parent.iconSize : 20); + }, + // 缁勪欢閫変腑婵�娲绘椂鐨勯鑹� + elActiveColor() { + return this.activeColor ? this.activeColor : (this.parent ? this.parent.activeColor : 'primary'); + }, + // 缁勪欢鐨勫舰鐘� + elShape() { + return this.shape ? this.shape : (this.parent ? this.parent.shape : 'square'); + }, + iconStyle() { + let style = {}; + // 鏃㈣鍒ゆ柇鏄惁鎵嬪姩绂佺敤锛岃繕瑕佸垽鏂敤鎴穠-model缁戝畾鐨勫�硷紝濡傛灉缁戝畾涓篺alse锛岄偅涔堜篃鏃犳硶閫変腑 + if (this.elActiveColor && this.value && !this.isDisabled) { + style.borderColor = this.elActiveColor; + style.backgroundColor = this.elActiveColor; + } + style.width = this.$u.addUnit(this.checkboxSize); + style.height = this.$u.addUnit(this.checkboxSize); + return style; + }, + // checkbox鍐呴儴鐨勫嬀閫夊浘鏍囷紝濡傛灉閫変腑鐘舵�侊紝涓虹櫧鑹诧紝鍚﹀垯涓洪�忔槑鑹插嵆鍙� + iconColor() { + return this.value ? '#ffffff' : 'transparent'; + }, + iconClass() { + let classes = []; + classes.push('u-checkbox__icon-wrap--' + this.elShape); + if (this.value == true) classes.push('u-checkbox__icon-wrap--checked'); + if (this.isDisabled) classes.push('u-checkbox__icon-wrap--disabled'); + if (this.value && this.isDisabled) classes.push('u-checkbox__icon-wrap--disabled--checked'); + // 鏀粯瀹濆皬绋嬪簭鏃犳硶鍔ㄦ�佺粦瀹氫竴涓暟缁勭被鍚嶏紝鍚﹀垯瑙f瀽鍑烘潵鐨勭粨鏋滀細甯︽湁","锛岃�屽鑷村け鏁� + return classes.join(' '); + }, + checkboxStyle() { + let style = {}; + if(this.parent && this.parent.width) { + style.width = this.parent.width; + // #ifdef MP + // 鍚勫灏忕▼搴忓洜涓哄畠浠壒娈婄殑缂栬瘧缁撴瀯锛屼娇鐢╢loat甯冨眬 + style.float = 'left'; + // #endif + // #ifndef MP + // H5鍜孉PP浣跨敤flex甯冨眬 + style.flex = `0 0 ${this.parent.width}`; + // #endif + } + if(this.parent && this.parent.wrap) { + style.width = '100%'; + // #ifndef MP + // H5鍜孉PP浣跨敤flex甯冨眬锛屽皢瀹藉害璁剧疆100%锛屽嵆鍙嚜鍔ㄦ崲琛� + style.flex = '0 0 100%'; + // #endif + } + return style; + } + }, + methods: { + onClickLabel() { + if (!this.isLabelDisabled && !this.isDisabled) { + this.setValue(); + } + }, + toggle() { + if (!this.isDisabled) { + this.setValue(); + } + }, + emitEvent() { + this.$emit('change', { + value: !this.value, + name: this.name + }) + // 鎵ц鐖剁粍浠秛-checkbox-group鐨勪簨浠舵柟娉� + // 绛夊緟涓嬩竴涓懆鏈熷啀鎵ц锛屽洜涓簍his.$emit('input')浣滅敤浜庣埗缁勪欢锛屽啀鍙嶉鍒板瓙缁勪欢鍐呴儴锛岄渶瑕佹椂闂� + setTimeout(() => { + if(this.parent && this.parent.emitEvent) this.parent.emitEvent(); + }, 80); + }, + // 璁剧疆input鐨勫�硷紝杩欓噷閫氳繃input浜嬩欢锛岃缃�氳繃v-model缁戝畾鐨勭粍浠剁殑鍊� + setValue() { + // 鍒ゆ柇鏄惁瓒呰繃浜嗗彲閫夌殑鏈�澶ф暟閲� + let checkedNum = 0; + if(this.parent && this.parent.children) { + // 鍙鐖剁粍浠剁殑鏌愪竴涓瓙鍏冪礌鐨剉alue涓簍rue锛屽氨鍔�1(宸叉湁鐨勯�変腑鏁伴噺) + this.parent.children.map(val => { + if (val.value) checkedNum++; + }) + } + // 濡傛灉鍘熸潵涓洪�変腑鐘舵�侊紝閭d箞鍙互鍙栨秷 + if (this.value == true) { + this.emitEvent(); + this.$emit('input', !this.value); + } else { + // 濡傛灉瓒呭嚭鏈�澶氬彲閫夐」锛屾彁绀� + if(this.parent && checkedNum >= this.parent.max) { + return this.$u.toast(`鏈�澶氬彲閫�${this.parent.max}椤筦); + } + // 濡傛灉鍘熸潵涓烘湭閫変腑鐘舵�侊紝闇�瑕侀�変腑鐨勬暟閲忓皯浜庣埗缁勪欢涓缃殑max鍊硷紝鎵嶅彲浠ラ�変腑 + this.emitEvent(); + this.$emit('input', !this.value); + } + } + } + }; +</script> + +<style lang="scss" scoped> + @import "../../libs/css/style.components.scss"; + + .u-checkbox { + /* #ifndef APP-NVUE */ + display: inline-flex; + /* #endif */ + align-items: center; + overflow: hidden; + user-select: none; + line-height: 1.8; + + &__icon-wrap { + color: $u-content-color; + flex: none; + display: -webkit-flex; + @include vue-flex; + align-items: center; + justify-content: center; + box-sizing: border-box; + width: 42rpx; + height: 42rpx; + color: transparent; + text-align: center; + transition-property: color, border-color, background-color; + font-size: 20px; + border: 1px solid #c8c9cc; + transition-duration: 0.2s; + + /* #ifdef MP-TOUTIAO */ + // 澶存潯灏忕▼搴忓吋瀹规�ч棶棰橈紝闇�瑕佽缃楂樹负0锛屽惁鍒欏浘鏍囧亸涓� + &__icon { + line-height: 0; + } + /* #endif */ + + &--circle { + border-radius: 100%; + } + + &--square { + border-radius: 6rpx; + } + + &--checked { + color: #fff; + background-color: $u-type-primary; + border-color: $u-type-primary; + } + + &--disabled { + background-color: #ebedf0; + border-color: #c8c9cc; + } + + &--disabled--checked { + color: #c8c9cc !important; + } + } + + &__label { + word-wrap: break-word; + margin-left: 10rpx; + margin-right: 24rpx; + color: $u-content-color; + font-size: 30rpx; + + &--disabled { + color: #c8c9cc; + } + } + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-circle-progress/u-circle-progress.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-circle-progress/u-circle-progress.vue" new file mode 100644 index 0000000..46e7c18 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-circle-progress/u-circle-progress.vue" @@ -0,0 +1,220 @@ +<template> + <view + class="u-circle-progress" + :style="{ + width: widthPx + 'px', + height: widthPx + 'px', + backgroundColor: bgColor + }" + > + <!-- 鏀粯瀹濆皬绋嬪簭涓嶆敮鎸乧anvas-id灞炴�э紝蹇呴』鐢╥d灞炴�� --> + <canvas + class="u-canvas-bg" + :canvas-id="elBgId" + :id="elBgId" + :style="{ + width: widthPx + 'px', + height: widthPx + 'px' + }" + ></canvas> + <canvas + class="u-canvas" + :canvas-id="elId" + :id="elId" + :style="{ + width: widthPx + 'px', + height: widthPx + 'px' + }" + ></canvas> + <slot></slot> + </view> +</template> + +<script> +/** + * circleProgress 鐜舰杩涘害鏉� + * @description 灞曠ず鎿嶄綔鎴栦换鍔$殑褰撳墠杩涘害锛屾瘮濡備笂浼犳枃浠讹紝鏄竴涓渾褰㈢殑杩涘害鏉°�傛敞鎰忥細姝ょ粍浠剁殑percent鍊煎彧鑳藉姩鎬佸鍔狅紝涓嶈兘鍔ㄦ�佸噺灏戙�� + * @tutorial https://www.uviewui.com/components/circleProgress.html + * @property {String Number} percent 鍦嗙幆杩涘害鐧惧垎姣斿�硷紝涓烘暟鍊肩被鍨嬶紝0-100 + * @property {String} inactive-color 鍦嗙幆鐨勫簳鑹诧紝榛樿涓虹伆鑹�(璇ュ�兼棤娉曞姩鎬佸彉鏇�)锛堥粯璁�#ececec锛� + * @property {String} active-color 鍦嗙幆婵�娲婚儴鍒嗙殑棰滆壊(璇ュ�兼棤娉曞姩鎬佸彉鏇�)锛堥粯璁�#19be6b锛� + * @property {String Number} width 鏁翠釜鍦嗙幆缁勪欢鐨勫搴︼紝楂樺害榛樿绛変簬瀹藉害鍊硷紝鍗曚綅rpx锛堥粯璁�200锛� + * @property {String Number} border-width 鍦嗙幆鐨勮竟妗嗗搴︼紝鍗曚綅rpx锛堥粯璁�14锛� + * @property {String Number} duration 鏁翠釜鍦嗙幆鎵ц涓�鍦堢殑鏃堕棿锛屽崟浣峬s锛堥粯璁ゅ憿1500锛� + * @property {String} type 濡傝缃紝active-color鍊煎皢浼氬け鏁� + * @property {String} bg-color 鏁翠釜缁勪欢鑳屾櫙棰滆壊锛岄粯璁や负鐧借壊 + * @example <u-circle-progress active-color="#2979ff" :percent="80"></u-circle-progress> + */ +export default { + name: 'u-circle-progress', + props: { + // 鍦嗙幆杩涘害鐧惧垎姣斿�� + percent: { + type: Number, + default: 0, + // 闄愬埗鍊煎湪0鍒�100涔嬮棿 + validator: val => { + return val >= 0 && val <= 100; + } + }, + // 搴曢儴鍦嗙幆鐨勯鑹诧紙鐏拌壊鐨勫渾鐜級 + inactiveColor: { + type: String, + default: '#ececec' + }, + // 鍦嗙幆婵�娲婚儴鍒嗙殑棰滆壊 + activeColor: { + type: String, + default: '#19be6b' + }, + // 鍦嗙幆绾挎潯鐨勫搴︼紝鍗曚綅rpx + borderWidth: { + type: [Number, String], + default: 14 + }, + // 鏁翠釜鍦嗗舰鐨勫搴︼紝鍗曚綅rpx + width: { + type: [Number, String], + default: 200 + }, + // 鏁翠釜鍦嗙幆鎵ц涓�鍦堢殑鏃堕棿锛屽崟浣峬s + duration: { + type: [Number, String], + default: 1500 + }, + // 涓婚绫诲瀷 + type: { + type: String, + default: '' + }, + // 鏁翠釜鍦嗙幆杩涘害鍖哄煙鐨勮儗鏅壊 + bgColor: { + type: String, + default: '#ffffff' + } + }, + data() { + return { + // #ifdef MP-WEIXIN + elBgId: 'uCircleProgressBgId', // 寰俊灏忕▼搴忎腑涓嶈兘浣跨敤this.$u.guid()褰㈠紡鍔ㄦ�佺敓鎴恑d鍊硷紝鍚﹀垯浼氭姤閿� + elId: 'uCircleProgressElId', + // #endif + // #ifndef MP-WEIXIN + elBgId: this.$u.guid(), // 闈炲井淇$鐨勬椂鍊欙紝闇�鐢ㄥ姩鎬佺殑id锛屽惁鍒欎竴涓〉闈㈠涓渾褰㈣繘搴︽潯缁勪欢鏁版嵁浼氭贩涔� + elId: this.$u.guid(), + // #endif + widthPx: uni.upx2px(this.width), // 杞垚px鍚庣殑鏁翠釜缁勪欢鐨勮儗鏅搴� + borderWidthPx: uni.upx2px(this.borderWidth), // 杞垚px鍚庣殑鍦嗙幆鐨勫搴� + startAngle: -Math.PI / 2, // canvas鐢诲渾鐨勮捣濮嬭搴︼紝榛樿涓�3鐐归挓鏂瑰悜锛屽畾浣嶅埌12鐐归挓鏂瑰悜 + progressContext: null, // 娲诲姩鍦嗙殑canvas涓婁笅鏂� + newPercent: 0, // 褰撳姩鎬佷慨鏀硅繘搴﹀�肩殑鏃跺�欙紝淇濆瓨杩涘害鍊肩殑鍙樺寲鍓嶅悗鍊硷紝鐢ㄤ簬姣旇緝鐢� + oldPercent: 0 // 褰撳姩鎬佷慨鏀硅繘搴﹀�肩殑鏃跺�欙紝淇濆瓨杩涘害鍊肩殑鍙樺寲鍓嶅悗鍊硷紝鐢ㄤ簬姣旇緝鐢� + }; + }, + watch: { + percent(nVal, oVal = 0) { + if (nVal > 100) nVal = 100; + if (nVal < 0) oVal = 0; + // 姝ゅ�煎叾瀹炵瓑浜巘his.percent锛屽懡鍚嶄竴涓柊 + this.newPercent = nVal; + this.oldPercent = oVal; + setTimeout(() => { + // 鏃犺鏄櫨鍒嗘瘮鍊煎鍔犺繕鏄噺灏戯紝闇�瑕佹搷浣滆繕鏄師鏉ョ殑鏃х殑鐧惧垎姣斿�� + // 灏嗘鍊煎噺灏戞垨鑰呮柊澧炲埌鏂扮殑鐧惧垎姣斿�� + this.drawCircleByProgress(oVal); + }, 50); + } + }, + created() { + // 璧嬪�硷紝鐢ㄤ簬鍔犺浇鍚庣涓�涓敾鍦嗕娇鐢� + this.newPercent = this.percent; + this.oldPercent = 0; + }, + computed: { + // 鏈塼ype涓婚鏃讹紝浼樺厛璧蜂綔鐢� + circleColor() { + if (['success', 'error', 'info', 'primary', 'warning'].indexOf(this.type) >= 0) return this.$u.color[this.type]; + else return this.activeColor; + } + }, + mounted() { + // 鍦╤5绔紝蹇呴』瑕佸仛涓�鐐瑰欢鏃舵墠璧蜂綔鐢紝this.$nextTick()鏃犳晥(HX2.4.7) + setTimeout(() => { + this.drawProgressBg(); + this.drawCircleByProgress(this.oldPercent); + }, 50); + }, + methods: { + drawProgressBg() { + let ctx = uni.createCanvasContext(this.elBgId, this); + ctx.setLineWidth(this.borderWidthPx); // 璁剧疆鍦嗙幆瀹藉害 + ctx.setStrokeStyle(this.inactiveColor); // 绾挎潯棰滆壊 + ctx.beginPath(); // 寮�濮嬫弿缁樿矾寰� + // 璁剧疆涓�涓師鐐�(110,110)锛屽崐寰勪负100鐨勫渾鐨勮矾寰勫埌褰撳墠璺緞 + let radius = this.widthPx / 2; + ctx.arc(radius, radius, radius - this.borderWidthPx, 0, 2 * Math.PI, false); + ctx.stroke(); // 瀵硅矾寰勮繘琛屾弿缁� + ctx.draw(); + }, + drawCircleByProgress(progress) { + // 绗竴娆℃搷浣滆繘搴︾幆鏃跺皢涓婁笅鏂囦繚瀛樺埌浜唗his.data涓紝鐩存帴浣跨敤鍗冲彲 + let ctx = this.progressContext; + if (!ctx) { + ctx = uni.createCanvasContext(this.elId, this); + this.progressContext = ctx; + } + // 琛ㄧず杩涘害鐨勪袱绔负鍦嗗舰 + ctx.setLineCap('round'); + // 璁剧疆绾挎潯鐨勫搴﹀拰棰滆壊 + ctx.setLineWidth(this.borderWidthPx); + ctx.setStrokeStyle(this.circleColor); + // 灏嗘�昏繃娓℃椂闂撮櫎浠�100锛屽緱鍑烘瘡淇敼鐧惧垎涔嬩竴杩涘害鎵�闇�鐨勬椂闂� + let time = Math.floor(this.duration / 100); + // 缁撴潫瑙掔殑璁$畻渚濇嵁涓猴細灏�2蟺鍒嗕负100浠斤紝涔樹互褰撳墠鐨勮繘搴﹀�硷紝寰楀嚭缁堟鐐圭殑寮у害鍊硷紝鍔犺捣濮嬭锛屼负鏁翠釜鍦嗕粠榛樿鐨� + // 3鐐归挓鏂瑰悜寮�濮嬬敾鍥撅紝杞负鏇村ソ鐞嗚В鐨�12鐐归挓鏂瑰悜寮�濮嬩綔鍥撅紝杩欓渶瑕佽捣濮嬭鍜岀粓姝㈣鍚屾椂鍔犱笂this.startAngle鍊� + let endAngle = ((2 * Math.PI) / 100) * progress + this.startAngle; + ctx.beginPath(); + // 鍗婂緞涓烘暣涓猚anvas瀹藉害鐨勪竴鍗� + let radius = this.widthPx / 2; + ctx.arc(radius, radius, radius - this.borderWidthPx, this.startAngle, endAngle, false); + ctx.stroke(); + ctx.draw(); + // 濡傛灉鍙樻洿鍚庢柊鍊煎ぇ浜庢棫鍊硷紝鎰忓懗鐫�澧炲ぇ浜嗙櫨鍒嗘瘮 + if (this.newPercent > this.oldPercent) { + // 姣忔閫掑鐧惧垎涔嬩竴 + progress++; + // 濡傛灉鏂板鍚庣殑鍊硷紝澶т簬闇�瑕佽缃殑鍊肩櫨鍒嗘瘮鍊硷紝鍋滄缁х画澧炲姞 + if (progress > this.newPercent) return; + } else { + // 鍚岀悊浜庝笂闈� + progress--; + if (progress < this.newPercent) return; + } + setTimeout(() => { + // 瀹氭椂鍣紝姣忔鎿嶄綔闂撮殧涓簍ime鍊硷紝涓轰簡璁╄繘搴︽潯鏈夊姩鐢绘晥鏋� + this.drawCircleByProgress(progress); + }, time); + } + } +}; +</script> + +<style lang="scss" scoped> +@import "../../libs/css/style.components.scss"; +.u-circle-progress { + position: relative; + /* #ifndef APP-NVUE */ + display: inline-flex; + /* #endif */ + align-items: center; + justify-content: center; +} + +.u-canvas-bg { + position: absolute; +} + +.u-canvas { + position: absolute; +} +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-col/u-col.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-col/u-col.vue" new file mode 100644 index 0000000..3b6cc64 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-col/u-col.vue" @@ -0,0 +1,156 @@ +<template> + <view class="u-col" :class="[ + 'u-col-' + span + ]" :style="{ + padding: `0 ${Number(gutter)/2 + 'rpx'}`, + marginLeft: 100 / 12 * offset + '%', + flex: `0 0 ${100 / 12 * span}%`, + alignItems: uAlignItem, + justifyContent: uJustify, + textAlign: textAlign + }" + @tap="click"> + <slot></slot> + </view> +</template> + +<script> + /** + * col 甯冨眬鍗曞厓鏍� + * @description 閫氳繃鍩虹鐨� 12 鍒嗘爮锛岃繀閫熺畝渚垮湴鍒涘缓甯冨眬锛堟惌閰�<u-row>浣跨敤锛� + * @tutorial https://www.uviewui.com/components/layout.html + * @property {String Number} span 鏍呮牸鍗犳嵁鐨勫垪鏁帮紝鎬�12绛夊垎锛堥粯璁�0锛� + * @property {String} text-align 鏂囧瓧姘村钩瀵归綈鏂瑰紡锛堥粯璁eft锛� + * @property {String Number} offset 鍒嗘爮宸﹁竟鍋忕Щ锛岃绠楁柟寮忎笌span鐩稿悓锛堥粯璁�0锛� + * @example <u-col span="3"><view class="demo-layout bg-purple"></view></u-col> + */ + export default { + name: "u-col", + props: { + // 鍗犵埗瀹瑰櫒瀹藉害鐨勫灏戠瓑鍒嗭紝鎬诲垎涓�12浠� + span: { + type: [Number, String], + default: 12 + }, + // 鎸囧畾鏍呮牸宸︿晶鐨勯棿闅旀暟(鎬�12鏍�) + offset: { + type: [Number, String], + default: 0 + }, + // 姘村钩鎺掑垪鏂瑰紡锛屽彲閫夊�间负`start`(鎴朻flex-start`)銆乣end`(鎴朻flex-end`)銆乣center`銆乣around`(鎴朻space-around`)銆乣between`(鎴朻space-between`) + justify: { + type: String, + default: 'start' + }, + // 鍨傜洿瀵归綈鏂瑰紡锛屽彲閫夊�间负top銆乧enter銆乥ottom + align: { + type: String, + default: 'center' + }, + // 鏂囧瓧瀵归綈鏂瑰紡 + textAlign: { + type: String, + default: 'left' + }, + // 鏄惁闃绘浜嬩欢浼犳挱 + stop: { + type: Boolean, + default: true + } + }, + data() { + return { + gutter: 20, // 缁檆ol娣诲姞闂磋窛锛屽乏鍙宠竟璺濆悇鍗犱竴鍗婏紝浠庣埗缁勪欢u-row鑾峰彇 + } + }, + created() { + this.parent = false; + }, + mounted() { + // 鑾峰彇鐖剁粍浠跺疄渚嬶紝骞惰祴鍊肩粰瀵瑰簲鐨勫弬鏁� + this.parent = this.$u.$parent.call(this, 'u-row'); + if (this.parent) { + this.gutter = this.parent.gutter; + } + }, + computed: { + uJustify() { + if (this.justify == 'end' || this.justify == 'start') return 'flex-' + this.justify; + else if (this.justify == 'around' || this.justify == 'between') return 'space-' + this.justify; + else return this.justify; + }, + uAlignItem() { + if (this.align == 'top') return 'flex-start'; + if (this.align == 'bottom') return 'flex-end'; + else return this.align; + } + }, + methods: { + click(e) { + this.$emit('click'); + } + } + } +</script> + +<style lang="scss"> + @import "../../libs/css/style.components.scss"; + + .u-col { + /* #ifdef MP-WEIXIN || MP-QQ || MP-TOUTIAO */ + float: left; + /* #endif */ + } + + .u-col-0 { + width: 0; + } + + .u-col-1 { + width: calc(100%/12); + } + + .u-col-2 { + width: calc(100%/12 * 2); + } + + .u-col-3 { + width: calc(100%/12 * 3); + } + + .u-col-4 { + width: calc(100%/12 * 4); + } + + .u-col-5 { + width: calc(100%/12 * 5); + } + + .u-col-6 { + width: calc(100%/12 * 6); + } + + .u-col-7 { + width: calc(100%/12 * 7); + } + + .u-col-8 { + width: calc(100%/12 * 8); + } + + .u-col-9 { + width: calc(100%/12 * 9); + } + + .u-col-10 { + width: calc(100%/12 * 10); + } + + .u-col-11 { + width: calc(100%/12 * 11); + } + + .u-col-12 { + width: calc(100%/12 * 12); + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-collapse-item/u-collapse-item.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-collapse-item/u-collapse-item.vue" new file mode 100644 index 0000000..3b66bfa --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-collapse-item/u-collapse-item.vue" @@ -0,0 +1,204 @@ +<template> + <view class="u-collapse-item" :style="[itemStyle]"> + <view :hover-stay-time="200" class="u-collapse-head" @tap.stop="headClick" :hover-class="hoverClass" :style="[headStyle]"> + <block v-if="!$slots['title-all']"> + <view v-if="!$slots['title']" class="u-collapse-title u-line-1" :style="[{ textAlign: align ? align : 'left' }, + isShow && activeStyle && !arrow ? activeStyle : '']"> + {{ title }} + </view> + <slot v-else name="title" /> + <view class="u-icon-wrap"> + <u-icon v-if="arrow" :color="arrowColor" :class="{ 'u-arrow-down-icon-active': isShow }" + class="u-arrow-down-icon" name="arrow-down"></u-icon> + </view> + </block> + <slot v-else name="title-all" /> + </view> + <view class="u-collapse-body" :style="[{ + height: isShow ? height + 'px' : '0' + }]"> + <view class="u-collapse-content" :id="elId" :style="[bodyStyle]"> + <slot></slot> + </view> + </view> + </view> +</template> + +<script> + /** + * collapseItem 鎵嬮鐞碔tem + * @description 閫氳繃鎶樺彔闈㈡澘鏀剁撼鍐呭鍖哄煙锛堟惌閰島-collapse浣跨敤锛� + * @tutorial https://www.uviewui.com/components/collapse.html + * @property {String} title 闈㈡澘鏍囬 + * @property {String Number} index 涓昏鐢ㄤ簬浜嬩欢鐨勫洖璋冿紝鏍囪瘑閭d釜Item琚偣鍑� + * @property {Boolean} disabled 闈㈡澘鏄惁鍙互鎵撳紑鎴栨敹璧凤紙榛樿false锛� + * @property {Boolean} open 璁剧疆鏌愪釜闈㈡澘鐨勫垵濮嬬姸鎬佹槸鍚︽墦寮�锛堥粯璁alse锛� + * @property {String Number} name 鍞竴鏍囪瘑绗︼紝濡備笉璁剧疆锛岄粯璁ょ敤褰撳墠collapse-item鐨勭储寮曞�� + * @property {String} align 鏍囬鐨勫榻愭柟寮忥紙榛樿left锛� + * @property {Object} active-style 涓嶆樉绀虹澶存椂锛屽彲浠ユ坊鍔犲綋鍓嶉�夋嫨鐨刢ollapse-item娲诲姩鏍峰紡锛屽璞″舰寮� + * @event {Function} change 鏌愪釜item琚墦寮�鎴栬�呮敹璧锋椂瑙﹀彂 + * @example <u-collapse-item :title="item.head" v-for="(item, index) in itemList" :key="index">{{item.body}}</u-collapse-item> + */ + export default { + name: "u-collapse-item", + props: { + // 鏍囬 + title: { + type: String, + default: '' + }, + // 鏍囬鐨勫榻愭柟寮� + align: { + type: String, + default: 'left' + }, + // 鏄惁鍙互鐐瑰嚮鏀惰捣 + disabled: { + type: Boolean, + default: false + }, + // collapse鏄剧ず涓庡惁 + open: { + type: Boolean, + default: false + }, + // 鍞竴鏍囪瘑绗� + name: { + type: [Number, String], + default: '' + }, + //娲诲姩鏍峰紡 + activeStyle: { + type: Object, + default () { + return {} + } + }, + // 鏍囪瘑褰撳墠涓虹鍑犱釜 + index: { + type: [String, Number], + default: '' + } + }, + data() { + return { + isShow: false, + elId: this.$u.guid(), + height: 0, // body鍐呭鐨勯珮搴� + headStyle: {}, // 澶撮儴鏍峰紡锛屽璞″舰寮� + bodyStyle: {}, // 涓讳綋閮ㄥ垎鏍峰紡 + itemStyle: {}, // 姣忎釜item鐨勬暣浣撴牱寮� + arrowColor: '', // 绠ご鐨勯鑹� + hoverClass: '', // 澶撮儴鎸変笅鏃剁殑鏁堟灉鏍峰紡绫� + arrow: true, // 鏄惁鏄剧ず鍙充晶绠ご + + }; + }, + watch: { + open(val) { + this.isShow = val; + } + }, + created() { + this.parent = false; + // 鑾峰彇u-collapse鐨勪俊鎭紝鏀惧湪u-collapse鏄负浜嗘柟渚匡紝涓嶇敤姣忎釜u-collapse-item鍐欎竴閬� + this.isShow = this.open; + }, + methods: { + // 寮傛鑾峰彇鍐呭锛屾垨鑰呭姩鎬佷慨鏀逛簡鍐呭鏃讹紝闇�瑕侀噸鏂板垵濮嬪寲 + init() { + this.parent = this.$u.$parent.call(this, 'u-collapse'); + if(this.parent) { + this.nameSync = this.name ? this.name : this.parent.childrens.length; + this.parent.childrens.push(this); + this.headStyle = this.parent.headStyle; + this.bodyStyle = this.parent.bodyStyle; + this.arrowColor = this.parent.arrowColor; + this.hoverClass = this.parent.hoverClass; + this.arrow = this.parent.arrow; + this.itemStyle = this.parent.itemStyle; + } + this.$nextTick(() => { + this.queryRect(); + }); + }, + // 鐐瑰嚮collapsehead澶撮儴 + headClick() { + if (this.disabled) return; + if (this.parent && this.parent.accordion == true) { + this.parent.childrens.map(val => { + // 鑷韩涓嶈缃负false锛屽洜涓哄悗闈㈡湁this.isShow = !this.isShow;澶勭悊浜� + if (this != val) { + val.isShow = false; + } + }); + } + + this.isShow = !this.isShow; + // 瑙﹀彂鏈粍浠剁殑浜嬩欢 + this.$emit('change', { + index: this.index, + show: this.isShow + }) + // 鍙湁鍦ㄦ墦寮�鏃舵墠鍙戝嚭浜嬩欢 + if (this.isShow) this.parent && this.parent.onChange(); + this.$forceUpdate(); + }, + // 鏌ヨ鍐呭楂樺害 + queryRect() { + // $uGetRect涓簎View鑷甫鐨勮妭鐐规煡璇㈢畝鍖栨柟娉曪紝璇﹁鏂囨。浠嬬粛锛歨ttps://www.uviewui.com/js/getRect.html + // 缁勪欢鍐呴儴涓�鑸敤this.$uGetRect锛屽澶栫殑涓簍his.$u.getRect锛屼簩鑰呭姛鑳戒竴鑷达紝鍚嶇О涓嶅悓 + this.$uGetRect('#' + this.elId).then(res => { + this.height = res.height; + }) + } + }, + mounted() { + this.init(); + } + }; +</script> + +<style lang="scss" scoped> + @import "../../libs/css/style.components.scss"; + + .u-collapse-head { + position: relative; + @include vue-flex; + justify-content: space-between; + align-items: center; + color: $u-main-color; + font-size: 30rpx; + line-height: 1; + padding: 24rpx 0; + text-align: left; + } + + .u-collapse-title { + flex: 1; + overflow: hidden; + } + + .u-arrow-down-icon { + transition: all 0.3s; + margin-right: 20rpx; + margin-left: 14rpx; + } + + .u-arrow-down-icon-active { + transform: rotate(180deg); + transform-origin: center center; + } + + .u-collapse-body { + overflow: hidden; + transition: all 0.3s; + } + + .u-collapse-content { + overflow: hidden; + font-size: 28rpx; + color: $u-tips-color; + text-align: left; + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-collapse/u-collapse.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-collapse/u-collapse.vue" new file mode 100644 index 0000000..8572957 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-collapse/u-collapse.vue" @@ -0,0 +1,99 @@ +<template> + <view class="u-collapse"> + <slot /> + </view> +</template> + +<script> + /** + * collapse 鎵嬮鐞� + * @description 閫氳繃鎶樺彔闈㈡澘鏀剁撼鍐呭鍖哄煙 + * @tutorial https://www.uviewui.com/components/collapse.html + * @property {Boolean} accordion 鏄惁鎵嬮鐞存ā寮忥紙榛樿true锛� + * @property {Boolean} arrow 鏄惁鏄剧ず鏍囬鍙充晶鐨勭澶达紙榛樿true锛� + * @property {String} arrow-color 鏍囬鍙充晶绠ご鐨勯鑹诧紙榛樿#909399锛� + * @property {Object} head-style 鏍囬鑷畾涔夋牱寮忥紝瀵硅薄褰㈠紡 + * @property {Object} body-style 涓讳綋鑷畾涔夋牱寮忥紝瀵硅薄褰㈠紡 + * @property {String} hover-class 鏍峰紡绫诲悕锛屾寜涓嬫椂鏈夋晥锛堥粯璁-hover-class锛� + * @event {Function} change 褰撳墠婵�娲婚潰鏉垮睍寮�鏃惰Е鍙�(濡傛灉鏄墜椋庣惔妯″紡锛屽弬鏁癮ctiveNames绫诲瀷涓篠tring锛屽惁鍒欎负Array) + * @example <u-collapse></u-collapse> + */ + export default { + name:"u-collapse", + props: { + // 鏄惁鎵嬮鐞存ā寮� + accordion: { + type: Boolean, + default: true + }, + // 澶撮儴鐨勬牱寮� + headStyle: { + type: Object, + default () { + return {} + } + }, + // 涓讳綋鐨勬牱寮� + bodyStyle: { + type: Object, + default () { + return {} + } + }, + // 姣忎竴涓猧tem鐨勬牱寮� + itemStyle: { + type: Object, + default () { + return {} + } + }, + // 鏄惁鏄剧ず鍙充晶鐨勭澶� + arrow: { + type: Boolean, + default: true + }, + // 绠ご鐨勯鑹� + arrowColor: { + type: String, + default: '#909399' + }, + // 鏍囬閮ㄥ垎鎸夊帇鏃剁殑鏍峰紡绫伙紝"none"涓烘棤鏁堟灉 + hoverClass: { + type: String, + default: 'u-hover-class' + } + }, + created() { + this.childrens = [] + }, + data() { + return { + + } + }, + methods: { + // 閲嶆柊鍒濆鍖栦竴娆″唴閮ㄧ殑鎵�鏈夊瓙鍏冪礌鐨勯珮搴﹁绠楋紝鐢ㄤ簬寮傛鑾峰彇鏁版嵁娓叉煋鐨勬儏鍐� + init() { + this.childrens.forEach((vm, index) => { + vm.init(); + }) + }, + // collapse item琚偣鍑伙紝鐢眂ollapse item璋冪敤鐖剁粍浠舵柟娉� + onChange() { + let activeItem = []; + this.childrens.forEach((vm, index) => { + if (vm.isShow) { + activeItem.push(vm.nameSync); + } + }) + // 濡傛灉鏄墜椋庣惔妯″紡锛屽彧鏈変竴涓尮閰嶇粨鏋滐紝涔熷嵆activeItem闀垮害涓�1锛屽皢鍏惰浆涓哄瓧绗︿覆 + if (this.accordion) activeItem = activeItem.join(''); + this.$emit('change', activeItem); + } + } + } +</script> + +<style lang="scss" scoped> + @import "../../libs/css/style.components.scss"; +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-column-notice/u-column-notice.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-column-notice/u-column-notice.vue" new file mode 100644 index 0000000..dd8bd31 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-column-notice/u-column-notice.vue" @@ -0,0 +1,237 @@ +<template> + <view + class="u-notice-bar" + :style="{ + background: computeBgColor, + padding: padding + }" + :class="[ + type ? `u-type-${type}-light-bg` : '' + ]" + > + <view class="u-icon-wrap"> + <u-icon class="u-left-icon" v-if="volumeIcon" name="volume-fill" :size="volumeSize" :color="computeColor"></u-icon> + </view> + <swiper :disable-touch="disableTouch" @change="change" :autoplay="autoplay && playState == 'play'" :vertical="vertical" circular :interval="duration" class="u-swiper"> + <swiper-item v-for="(item, index) in list" :key="index" class="u-swiper-item"> + <view + class="u-news-item u-line-1" + :style="[textStyle]" + @tap="click(index)" + :class="['u-type-' + type]" + > + {{ item }} + </view> + </swiper-item> + </swiper> + <view class="u-icon-wrap"> + <u-icon @click="getMore" class="u-right-icon" v-if="moreIcon" name="arrow-right" :size="26" :color="computeColor"></u-icon> + <u-icon @click="close" class="u-right-icon" v-if="closeIcon" name="close" :size="24" :color="computeColor"></u-icon> + </view> + </view> +</template> + +<script> +export default { + props: { + // 鏄剧ず鐨勫唴瀹癸紝鏁扮粍 + list: { + type: Array, + default() { + return []; + } + }, + // 鏄剧ず鐨勪富棰橈紝success|error|primary|info|warning + type: { + type: String, + default: 'warning' + }, + // 鏄惁鏄剧ず宸︿晶鐨勯煶閲忓浘鏍� + volumeIcon: { + type: Boolean, + default: true + }, + // 鏄惁鏄剧ず鍙充晶鐨勫彸绠ご鍥炬爣 + moreIcon: { + type: Boolean, + default: false + }, + // 鏄惁鏄剧ず鍙充晶鐨勫叧闂浘鏍� + closeIcon: { + type: Boolean, + default: false + }, + // 鏄惁鑷姩鎾斁 + autoplay: { + type: Boolean, + default: true + }, + // 鏂囧瓧棰滆壊锛屽悇鍥炬爣涔熶細浣跨敤鏂囧瓧棰滆壊 + color: { + type: String, + default: '' + }, + // 鑳屾櫙棰滆壊 + bgColor: { + type: String, + default: '' + }, + // 婊氬姩鏂瑰悜锛宺ow-姘村钩婊氬姩锛宑olumn-鍨傜洿婊氬姩 + direction: { + type: String, + default: 'row' + }, + // 鏄惁鏄剧ず + show: { + type: Boolean, + default: true + }, + // 瀛椾綋澶у皬锛屽崟浣峳px + fontSize: { + type: [Number, String], + default: 26 + }, + // 婊氬姩涓�涓懆鏈熺殑鏃堕棿闀匡紝鍗曚綅ms + duration: { + type: [Number, String], + default: 2000 + }, + // 闊抽噺鍠囧彮鐨勫ぇ灏� + volumeSize: { + type: [Number, String], + default: 34 + }, + // 姘村钩婊氬姩鏃剁殑婊氬姩閫熷害锛屽嵆姣忕婊氬姩澶氬皯rpx锛岃繖鏈夊埄浜庢帶鍒舵枃瀛楁棤璁哄灏戞椂锛岄兘鑳芥湁涓�涓亽瀹氱殑閫熷害 + speed: { + type: Number, + default: 160 + }, + // 姘村钩婊氬姩鏃讹紝鏄惁閲囩敤琛旀帴褰㈠紡婊氬姩 + isCircular: { + type: Boolean, + default: true + }, + // 婊氬姩鏂瑰悜锛宧orizontal-姘村钩婊氬姩锛寁ertical-鍨傜洿婊氬姩 + mode: { + type: String, + default: 'horizontal' + }, + // 鎾斁鐘舵�侊紝play-鎾斁锛宲aused-鏆傚仠 + playState: { + type: String, + default: 'play' + }, + // 鏄惁绂佹鐢ㄦ墜婊戝姩鍒囨崲 + // 鐩墠HX2.6.11锛屽彧鏀寔App 2.5.5+銆丠5 2.5.5+銆佹敮浠樺疂灏忕▼搴忋�佸瓧鑺傝烦鍔ㄥ皬绋嬪簭 + disableTouch: { + type: Boolean, + default: true + }, + // 閫氱煡鐨勮竟璺� + padding: { + type: [Number, String], + default: '18rpx 24rpx' + } + }, + computed: { + // 璁$畻瀛椾綋棰滆壊锛屽鏋滄病鏈夎嚜瀹氫箟鐨勶紝灏辩敤uview涓婚棰滆壊 + computeColor() { + if (this.color) return this.color; + // 濡傛灉鏄棤涓婚锛屽氨榛樿浣跨敤content-color + else if(this.type == 'none') return '#606266'; + else return this.type; + }, + // 鏂囧瓧鍐呭鐨勬牱寮� + textStyle() { + let style = {}; + if (this.color) style.color = this.color; + else if(this.type == 'none') style.color = '#606266'; + style.fontSize = this.fontSize + 'rpx'; + return style; + }, + // 鍨傜洿鎴栬�呮按骞虫粴鍔� + vertical() { + if(this.mode == 'horizontal') return false; + else return true; + }, + // 璁$畻鑳屾櫙棰滆壊 + computeBgColor() { + if (this.bgColor) return this.bgColor; + else if(this.type == 'none') return 'transparent'; + } + }, + data() { + return { + // animation: false + }; + }, + methods: { + // 鐐瑰嚮閫氬憡鏍� + click(index) { + this.$emit('click', index); + }, + // 鐐瑰嚮鍏抽棴鎸夐挳 + close() { + this.$emit('close'); + }, + // 鐐瑰嚮鏇村绠ご鎸夐挳 + getMore() { + this.$emit('getMore'); + }, + change(e) { + let index = e.detail.current; + if(index == this.list.length - 1) { + this.$emit('end'); + } + } + } +}; +</script> + +<style lang="scss" scoped> +@import "../../libs/css/style.components.scss"; + +.u-notice-bar { + width: 100%; + @include vue-flex; + align-items: center; + justify-content: center; + flex-wrap: nowrap; + padding: 18rpx 24rpx; + overflow: hidden; +} + +.u-swiper { + font-size: 26rpx; + height: 32rpx; + @include vue-flex; + align-items: center; + flex: 1; + margin-left: 12rpx; +} + +.u-swiper-item { + @include vue-flex; + align-items: center; + overflow: hidden; +} + +.u-news-item { + overflow: hidden; +} + +.u-right-icon { + margin-left: 12rpx; + /* #ifndef APP-NVUE */ + display: inline-flex; + /* #endif */ + align-items: center; +} + +.u-left-icon { + /* #ifndef APP-NVUE */ + display: inline-flex; + /* #endif */ + align-items: center; +} +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-count-down/u-count-down.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-count-down/u-count-down.vue" new file mode 100644 index 0000000..7285d67 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-count-down/u-count-down.vue" @@ -0,0 +1,318 @@ +<template> + <view class="u-countdown"> + <view class="u-countdown-item" :style="[itemStyle]" v-if="showDays && (hideZeroDay || (!hideZeroDay && d != '00'))"> + <view class="u-countdown-time" :style="[letterStyle]"> + {{ d }} + </view> + </view> + <view + class="u-countdown-colon" + :style="{fontSize: separatorSize + 'rpx', color: separatorColor, paddingBottom: separator == 'colon' ? '4rpx' : 0}" + v-if="showDays && (hideZeroDay || (!hideZeroDay && d != '00'))" + > + {{ separator == 'colon' ? ':' : '澶�' }} + </view> + <view class="u-countdown-item" :style="[itemStyle]" v-if="showHours"> + <view class="u-countdown-time" :style="{ fontSize: fontSize + 'rpx', color: color}"> + {{ h }} + </view> + </view> + <view + class="u-countdown-colon" + :style="{fontSize: separatorSize + 'rpx', color: separatorColor, paddingBottom: separator == 'colon' ? '4rpx' : 0}" + v-if="showHours" + > + {{ separator == 'colon' ? ':' : '鏃�' }} + </view> + <view class="u-countdown-item" :style="[itemStyle]" v-if="showMinutes"> + <view class="u-countdown-time" :style="{ fontSize: fontSize + 'rpx', color: color}"> + {{ i }} + </view> + </view> + <view + class="u-countdown-colon" + :style="{fontSize: separatorSize + 'rpx', color: separatorColor, paddingBottom: separator == 'colon' ? '4rpx' : 0}" + v-if="showMinutes" + > + {{ separator == 'colon' ? ':' : '鍒�' }} + </view> + <view class="u-countdown-item" :style="[itemStyle]" v-if="showSeconds"> + <view class="u-countdown-time" :style="{ fontSize: fontSize + 'rpx', color: color}"> + {{ s }} + </view> + </view> + <view + class="u-countdown-colon" + :style="{fontSize: separatorSize + 'rpx', color: separatorColor, paddingBottom: separator == 'colon' ? '4rpx' : 0}" + v-if="showSeconds && separator == 'zh'" + > + 绉� + </view> + </view> +</template> + +<script> +/** + * countDown 鍊掕鏃� + * @description 璇ョ粍浠朵竴鑸娇鐢ㄤ簬鏌愪釜娲诲姩鐨勬埅姝㈡椂闂翠笂锛岄�氳繃鏁板瓧鐨勫彉鍖栵紝缁欑敤鎴锋槑纭殑鏃堕棿鎰熷彈锛屾彁绀虹敤鎴疯繘琛屾煇涓�涓涓烘搷浣溿�� + * @tutorial https://www.uviewui.com/components/countDown.html + * @property {String Number} timestamp 鍊掕鏃讹紝鍗曚綅涓虹 + * @property {Boolean} autoplay 鏄惁鑷姩寮�濮嬪�掕鏃讹紝濡傛灉涓篺alse锛岄渶鎵嬪姩璋冪敤寮�濮嬫柟娉曘�傝瀹樼綉璇存槑锛堥粯璁rue锛� + * @property {String} separator 鍒嗛殧绗︼紝colon涓鸿嫳鏂囧啋鍙凤紝zh涓轰腑鏂囷紙榛樿colon锛� + * @property {String Number} separator-size 鍒嗛殧绗︾殑瀛椾綋澶у皬锛屽崟浣峳px锛堥粯璁�30锛� + * @property {String} separator-color 鍒嗛殧绗︾殑棰滆壊锛堥粯璁�#303133锛� + * @property {String Number} font-size 鍊掕鏃跺瓧浣撳ぇ灏忥紝鍗曚綅rpx锛堥粯璁�30锛� + * @property {Boolean} show-border 鏄惁鏄剧ず鍊掕鏃舵暟瀛楃殑杈规锛堥粯璁alse锛� + * @property {Boolean} hide-zero-day 褰�"澶�"鐨勯儴鍒嗕负0鏃讹紝闅愯棌璇ュ瓧娈� 锛堥粯璁rue锛� + * @property {String} border-color 鏁板瓧杈规鐨勯鑹诧紙榛樿#303133锛� + * @property {String} bg-color 鍊掕鏃舵暟瀛楃殑鑳屾櫙棰滆壊锛堥粯璁�#ffffff锛� + * @property {String} color 鍊掕鏃舵暟瀛楃殑棰滆壊锛堥粯璁�#303133锛� + * @property {String} height 鏁板瓧楂樺害鍊�(瀹藉害绛夊悓姝ゅ��)锛岃缃竟妗嗘椂鐪嬫儏鍐垫槸鍚﹂渶瑕佽缃鍊硷紝鍗曚綅rpx锛堥粯璁uto锛� + * @property {Boolean} show-days 鏄惁鏄剧ず鍊掕鏃剁殑"澶�"閮ㄥ垎锛堥粯璁rue锛� + * @property {Boolean} show-hours 鏄惁鏄剧ず鍊掕鏃剁殑"鏃�"閮ㄥ垎锛堥粯璁rue锛� + * @property {Boolean} show-minutes 鏄惁鏄剧ず鍊掕鏃剁殑"鍒�"閮ㄥ垎锛堥粯璁rue锛� + * @property {Boolean} show-seconds 鏄惁鏄剧ず鍊掕鏃剁殑"绉�"閮ㄥ垎锛堥粯璁rue锛� + * @event {Function} end 鍊掕鏃剁粨鏉� + * @event {Function} change 姣忕瑙﹀彂涓�娆★紝鍥炶皟涓哄綋鍓嶅墿浣欑殑鍊掕绉掓暟 + * @example <u-count-down ref="uCountDown" :timestamp="86400" :autoplay="false"></u-count-down> + */ +export default { + name: 'u-count-down', + props: { + // 鍊掕鏃剁殑鏃堕棿锛岀涓哄崟浣� + timestamp: { + type: [Number, String], + default: 0 + }, + // 鏄惁鑷姩寮�濮嬪�掕鏃� + autoplay: { + type: Boolean, + default: true + }, + // 鐢ㄨ嫳鏂囧啋鍙�(colon)鎴栬�呬腑鏂�(zh)褰撳仛鍒嗛殧绗︼紝false鐨勬椂鍊欎负涓枃锛屽锛�"11:22"鎴�"11鏃�22绉�" + separator: { + type: String, + default: 'colon' + }, + // 鍒嗛殧绗︾殑澶у皬锛屽崟浣峳px + separatorSize: { + type: [Number, String], + default: 30 + }, + // 鍒嗛殧绗﹂鑹� + separatorColor: { + type: String, + default: "#303133" + }, + // 瀛椾綋棰滆壊 + color: { + type: String, + default: '#303133' + }, + // 瀛椾綋澶у皬锛屽崟浣峳px + fontSize: { + type: [Number, String], + default: 30 + }, + // 鑳屾櫙棰滆壊 + bgColor: { + type: String, + default: '#fff' + }, + // 鏁板瓧妗嗛珮搴︼紝鍗曚綅rpx + height: { + type: [Number, String], + default: 'auto' + }, + // 鏄惁鏄剧ず鏁板瓧妗� + showBorder: { + type: Boolean, + default: false + }, + // 杈规棰滆壊 + borderColor: { + type: String, + default: '#303133' + }, + // 鏄惁鏄剧ず绉� + showSeconds: { + type: Boolean, + default: true + }, + // 鏄惁鏄剧ず鍒嗛挓 + showMinutes: { + type: Boolean, + default: true + }, + // 鏄惁鏄剧ず灏忔椂 + showHours: { + type: Boolean, + default: true + }, + // 鏄惁鏄剧ず鈥滃ぉ鈥� + showDays: { + type: Boolean, + default: true + }, + // 褰�"澶�"鐨勯儴鍒嗕负0鏃讹紝涓嶆樉绀� + hideZeroDay: { + type: Boolean, + default: false + } + }, + watch: { + // 鐩戝惉鏃堕棿鎴崇殑鍙樺寲 + timestamp(newVal, oldVal) { + // 濡傛灉鍊掕鏃堕棿鍙戠敓鍙樺寲锛屾竻闄ゅ畾鏃跺櫒锛岄噸鏂板紑濮嬪�掕鏃� + this.clearTimer(); + this.start(); + } + }, + data() { + return { + d: '00', // 澶╃殑榛樿鍊� + h: '00', // 灏忔椂鐨勯粯璁ゅ�� + i: '00', // 鍒嗛挓鐨勯粯璁ゅ�� + s: '00', // 绉掔殑榛樿鍊� + timer: null ,// 瀹氭椂鍣� + seconds: 0, // 璁板綍涓嶅仠鍊掕杩囩▼涓彉鍖栫殑绉掓暟 + }; + }, + computed: { + // 鍊掕鏃秈tem鐨勬牱寮忥紝item涓哄垎鍒殑鏃跺垎绉掗儴鍒嗙殑鏁板瓧 + itemStyle() { + let style = {}; + if(this.height) { + style.height = this.height + 'rpx'; + style.width = this.height + 'rpx'; + } + if(this.showBorder) { + style.borderStyle = 'solid'; + style.borderColor = this.borderColor; + style.borderWidth = '1px'; + } + if(this.bgColor) { + style.backgroundColor = this.bgColor; + } + return style; + }, + // 鍊掕鏃舵暟瀛楃殑鏍峰紡 + letterStyle() { + let style = {}; + if(this.fontSize) style.fontSize = this.fontSize + 'rpx'; + if(this.color) style.color = this.color; + return style; + } + }, + mounted() { + // 濡傛灉鑷姩鍊掕鏃� + this.autoplay && this.timestamp && this.start(); + }, + methods: { + // 鍊掕鏃� + start() { + // 閬垮厤鍙兘鍑虹幇鐨勫�掕鏃堕噸鍙犳儏鍐� + this.clearTimer(); + if (this.timestamp <= 0) return; + this.seconds = Number(this.timestamp); + this.formatTime(this.seconds); + this.timer = setInterval(() => { + this.seconds--; + // 鍙戝嚭change浜嬩欢 + this.$emit('change', this.seconds); + if (this.seconds < 0) { + return this.end(); + } + this.formatTime(this.seconds); + }, 1000); + }, + // 鏍煎紡鍖栨椂闂� + formatTime(seconds) { + // 灏忎簬绛変簬0鐨勮瘽锛岀粨鏉熷�掕鏃� + seconds <= 0 && this.end(); + let [day, hour, minute, second] = [0, 0, 0, 0]; + day = Math.floor(seconds / (60 * 60 * 24)); + // 鍒ゆ柇鏄惁鏄剧ず鈥滃ぉ鈥濆弬鏁帮紝濡傛灉涓嶆樉绀猴紝灏嗗ぉ閮ㄥ垎鐨勫�硷紝鍔犲叆鍒板皬鏃朵腑 + // hour涓虹粰鍚庨潰璁$畻绉掑拰鍒嗙瓑鐢ㄧ殑(鍩轰簬鏄剧ず澶╃殑鍓嶆彁涓嬭绠�) + hour = Math.floor(seconds / (60 * 60)) - day * 24; + // showHour涓洪渶瑕佹樉绀虹殑灏忔椂 + let showHour = null; + if(this.showDays) { + showHour = hour; + } else { + // 濡傛灉涓嶆樉绀哄ぉ鏁帮紝灏嗏�滃ぉ鈥濋儴鍒嗙殑鏃堕棿鎶樼畻鍒板皬鏃朵腑鍘� + showHour = Math.floor(seconds / (60 * 60)); + } + minute = Math.floor(seconds / 60) - hour * 60 - day * 24 * 60; + second = Math.floor(seconds) - day * 24 * 60 * 60 - hour * 60 * 60 - minute * 60; + // 濡傛灉灏忎簬10锛屽湪鍓嶉潰琛ヤ笂涓�涓�"0" + showHour = showHour < 10 ? '0' + showHour : showHour; + minute = minute < 10 ? '0' + minute : minute; + second = second < 10 ? '0' + second : second; + day = day < 10 ? '0' + day : day; + this.d = day; + this.h = showHour; + this.i = minute; + this.s = second; + }, + // 鍋滄鍊掕鏃� + end() { + this.clearTimer(); + this.$emit('end', {}); + }, + // 娓呴櫎瀹氭椂鍣� + clearTimer() { + if(this.timer) { + // 娓呴櫎瀹氭椂鍣� + clearInterval(this.timer); + this.timer = null; + } + } + }, + beforeDestroy() { + clearInterval(this.timer); + this.timer = null; + } +}; +</script> + +<style scoped lang="scss"> + @import "../../libs/css/style.components.scss"; + + .u-countdown { + /* #ifndef APP-NVUE */ + display: inline-flex; + /* #endif */ + align-items: center; + } + + .u-countdown-item { + @include vue-flex; + align-items: center; + justify-content: center; + padding: 2rpx; + border-radius: 6rpx; + white-space: nowrap; + transform: translateZ(0); + } + + .u-countdown-time { + margin: 0; + padding: 0; + line-height: 1; + } + + .u-countdown-colon { + @include vue-flex; + justify-content: center; + padding: 0 5rpx; + line-height: 1; + align-items: center; + padding-bottom: 4rpx; + } + + .u-countdown-scale { + transform: scale(0.9); + transform-origin: center center; + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-count-to/u-count-to.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-count-to/u-count-to.vue" new file mode 100644 index 0000000..053dc5f --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-count-to/u-count-to.vue" @@ -0,0 +1,241 @@ +<template> + <view + class="u-count-num" + :style="{ + fontSize: fontSize + 'rpx', + fontWeight: bold ? 'bold' : 'normal', + color: color + }" + > + {{ displayValue }} + </view> +</template> + +<script> +/** + * countTo 鏁板瓧婊氬姩 + * @description 璇ョ粍浠朵竴鑸敤浜庨渶瑕佹粴鍔ㄦ暟瀛楀埌鏌愪竴涓�肩殑鍦烘櫙锛岀洰鏍囪姹傛槸涓�涓�掑鐨勫�笺�� + * @tutorial https://www.uviewui.com/components/countTo.html + * @property {String Number} start-val 寮�濮嬪�� + * @property {String Number} end-val 缁撴潫鍊� + * @property {String Number} duration 婊氬姩杩囩▼鎵�闇�鐨勬椂闂达紝鍗曚綅ms锛堥粯璁�2000锛� + * @property {Boolean} autoplay 鏄惁鑷姩寮�濮嬫粴鍔紙榛樿true锛� + * @property {String Number} decimals 瑕佹樉绀虹殑灏忔暟浣嶆暟锛岃瀹樼綉璇存槑锛堥粯璁�0锛� + * @property {Boolean} use-easing 婊氬姩缁撴潫鏃讹紝鏄惁缂撳姩缁撳熬锛岃瀹樼綉璇存槑锛堥粯璁rue锛� + * @property {String} separator 鍗冧綅鍒嗛殧绗︼紝瑙佸畼缃戣鏄� + * @property {String} color 瀛椾綋棰滆壊锛堥粯璁�#303133锛� + * @property {String Number} font-size 瀛椾綋澶у皬锛屽崟浣峳px锛堥粯璁�50锛� + * @property {Boolean} bold 瀛椾綋鏄惁鍔犵矖锛堥粯璁alse锛� + * @event {Function} end 鏁板�兼粴鍔ㄥ埌鐩爣鍊兼椂瑙﹀彂 + * @example <u-count-to ref="uCountTo" :end-val="endVal" :autoplay="autoplay"></u-count-to> + */ +export default { + name: 'u-count-to', + props: { + // 寮�濮嬬殑鏁板�硷紝榛樿浠�0澧為暱鍒版煇涓�涓暟 + startVal: { + type: [Number, String], + default: 0 + }, + // 瑕佹粴鍔ㄧ殑鐩爣鏁板�硷紝蹇呴』 + endVal: { + type: [Number, String], + default: 0, + required: true + }, + // 婊氬姩鍒扮洰鏍囨暟鍊肩殑鍔ㄧ敾鎸佺画鏃堕棿锛屽崟浣嶄负姣锛坢s锛� + duration: { + type: [Number, String], + default: 2000 + }, + // 璁剧疆鏁板�煎悗鏄惁鑷姩寮�濮嬫粴鍔� + autoplay: { + type: Boolean, + default: true + }, + // 瑕佹樉绀虹殑灏忔暟浣嶆暟 + decimals: { + type: [Number, String], + default: 0 + }, + // 鏄惁鍦ㄥ嵆灏嗗埌杈剧洰鏍囨暟鍊肩殑鏃跺�欙紝浣跨敤缂撴參婊氬姩鐨勬晥鏋� + useEasing: { + type: Boolean, + default: true + }, + // 鍗佽繘鍒跺垎鍓� + decimal: { + type: [Number, String], + default: '.' + }, + // 瀛椾綋棰滆壊 + color: { + type: String, + default: '#303133' + }, + // 瀛椾綋澶у皬 + fontSize: { + type: [Number, String], + default: 50 + }, + // 鏄惁鍔犵矖瀛椾綋 + bold: { + type: Boolean, + default: false + }, + // 鍗冧綅鍒嗛殧绗︼紝绫讳技閲戦鐨勫垎鍓�(锟�23,321.05涓殑",") + separator: { + type: String, + default: '' + } + }, + data() { + return { + localStartVal: this.startVal, + displayValue: this.formatNumber(this.startVal), + printVal: null, + paused: false, // 鏄惁鏆傚仠 + localDuration: Number(this.duration), + startTime: null, // 寮�濮嬬殑鏃堕棿 + timestamp: null, // 鏃堕棿鎴� + remaining: null, // 鍋滅暀鐨勬椂闂� + rAF: null, + lastTime: 0 // 涓婁竴娆$殑鏃堕棿 + }; + }, + computed: { + countDown() { + return this.startVal > this.endVal; + } + }, + watch: { + startVal() { + this.autoplay && this.start(); + }, + endVal() { + this.autoplay && this.start(); + } + }, + mounted() { + this.autoplay && this.start(); + }, + methods: { + easingFn(t, b, c, d) { + return (c * (-Math.pow(2, (-10 * t) / d) + 1) * 1024) / 1023 + b; + }, + requestAnimationFrame(callback) { + const currTime = new Date().getTime(); + // 涓轰簡浣縮etTimteout鐨勫敖鍙兘鐨勬帴杩戞瘡绉�60甯х殑鏁堟灉 + const timeToCall = Math.max(0, 16 - (currTime - this.lastTime)); + const id = setTimeout(() => { + callback(currTime + timeToCall); + }, timeToCall); + this.lastTime = currTime + timeToCall; + return id; + }, + + cancelAnimationFrame(id) { + clearTimeout(id); + }, + // 寮�濮嬫粴鍔ㄦ暟瀛� + start() { + this.localStartVal = this.startVal; + this.startTime = null; + this.localDuration = this.duration; + this.paused = false; + this.rAF = this.requestAnimationFrame(this.count); + }, + // 鏆傚畾鐘舵�侊紝閲嶆柊鍐嶅紑濮嬫粴鍔紱鎴栬�呮粴鍔ㄧ姸鎬佷笅锛屾殏鍋� + reStart() { + if (this.paused) { + this.resume(); + this.paused = false; + } else { + this.stop(); + this.paused = true; + } + }, + // 鏆傚仠 + stop() { + this.cancelAnimationFrame(this.rAF); + }, + // 閲嶆柊寮�濮�(鏆傚仠鐨勬儏鍐典笅) + resume() { + this.startTime = null; + this.localDuration = this.remaining; + this.localStartVal = this.printVal; + this.requestAnimationFrame(this.count); + }, + // 閲嶇疆 + reset() { + this.startTime = null; + this.cancelAnimationFrame(this.rAF); + this.displayValue = this.formatNumber(this.startVal); + }, + count(timestamp) { + if (!this.startTime) this.startTime = timestamp; + this.timestamp = timestamp; + const progress = timestamp - this.startTime; + this.remaining = this.localDuration - progress; + if (this.useEasing) { + if (this.countDown) { + this.printVal = this.localStartVal - this.easingFn(progress, 0, this.localStartVal - this.endVal, this.localDuration); + } else { + this.printVal = this.easingFn(progress, this.localStartVal, this.endVal - this.localStartVal, this.localDuration); + } + } else { + if (this.countDown) { + this.printVal = this.localStartVal - (this.localStartVal - this.endVal) * (progress / this.localDuration); + } else { + this.printVal = this.localStartVal + (this.endVal - this.localStartVal) * (progress / this.localDuration); + } + } + if (this.countDown) { + this.printVal = this.printVal < this.endVal ? this.endVal : this.printVal; + } else { + this.printVal = this.printVal > this.endVal ? this.endVal : this.printVal; + } + this.displayValue = this.formatNumber(this.printVal); + if (progress < this.localDuration) { + this.rAF = this.requestAnimationFrame(this.count); + } else { + this.$emit('end'); + } + }, + // 鍒ゆ柇鏄惁鏁板瓧 + isNumber(val) { + return !isNaN(parseFloat(val)); + }, + formatNumber(num) { + // 灏唍um杞负Number绫诲瀷锛屽洜涓哄叾鍊煎彲鑳戒负瀛楃涓叉暟鍊硷紝璋冪敤toFixed浼氭姤閿� + num = Number(num); + num = num.toFixed(Number(this.decimals)); + num += ''; + const x = num.split('.'); + let x1 = x[0]; + const x2 = x.length > 1 ? this.decimal + x[1] : ''; + const rgx = /(\d+)(\d{3})/; + if (this.separator && !this.isNumber(this.separator)) { + while (rgx.test(x1)) { + x1 = x1.replace(rgx, '$1' + this.separator + '$2'); + } + } + return x1 + x2; + }, + destroyed() { + this.cancelAnimationFrame(this.rAF); + } + } +}; +</script> + +<style lang="scss" scoped> +@import "../../libs/css/style.components.scss"; + +.u-count-num { + /* #ifndef APP-NVUE */ + display: inline-flex; + /* #endif */ + text-align: center; +} +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-divider/u-divider.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-divider/u-divider.vue" new file mode 100644 index 0000000..6f8d7e6 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-divider/u-divider.vue" @@ -0,0 +1,153 @@ +<template> + <view class="u-divider" :style="{ + height: height == 'auto' ? 'auto' : height + 'rpx', + backgroundColor: bgColor, + marginBottom: marginBottom + 'rpx', + marginTop: marginTop + 'rpx' + }" @tap="click"> + <view class="u-divider-line" :class="[type ? 'u-divider-line--bordercolor--' + type : '']" :style="[lineStyle]"></view> + <view v-if="useSlot" class="u-divider-text" :style="{ + color: color, + fontSize: fontSize + 'rpx' + }"><slot /></view> + <view class="u-divider-line" :class="[type ? 'u-divider-line--bordercolor--' + type : '']" :style="[lineStyle]"></view> + </view> +</template> + +<script> +/** + * divider 鍒嗗壊绾� + * @description 鍖洪殧鍐呭鐨勫垎鍓茬嚎锛屼竴鑸敤浜庨〉闈㈠簳閮�"娌℃湁鏇村"鐨勬彁绀恒�� + * @tutorial https://www.uviewui.com/components/divider.html + * @property {String Number} half-width 鏂囧瓧宸︽垨鍙宠竟绾挎潯瀹藉害锛屾暟鍊兼垨鐧惧垎姣旓紝鏁板�兼椂鍗曚綅涓簉px + * @property {String} border-color 绾挎潯棰滆壊锛屼紭鍏堢骇楂樹簬type锛堥粯璁�#dcdfe6锛� + * @property {String} color 鏂囧瓧棰滆壊锛堥粯璁�#909399锛� + * @property {String Number} fontSize 瀛椾綋澶у皬锛屽崟浣峳px锛堥粯璁�26锛� + * @property {String} bg-color 鏁翠釜divider鐨勮儗鏅鑹诧紙榛樿鍛�#ffffff锛� + * @property {String Number} height 鏁翠釜divider鐨勯珮搴︼紝鍗曚綅rpx锛堥粯璁�40锛� + * @property {String} type 灏嗙嚎鏉¤缃富棰樿壊锛堥粯璁rimary锛� + * @property {Boolean} useSlot 鏄惁浣跨敤slot浼犲叆鍐呭锛屽鏋滀笉浼犲叆锛屼腑闂翠笉浼氭湁绌洪殭锛堥粯璁rue锛� + * @property {String Number} margin-top 涓庡墠涓�涓粍浠剁殑璺濈锛屽崟浣峳px锛堥粯璁�0锛� + * @property {String Number} margin-bottom 涓庡悗涓�涓粍浠剁殑璺濈锛屽崟浣峳px锛�0锛� + * @event {Function} click divider缁勪欢琚偣鍑绘椂瑙﹀彂 + * @example <u-divider color="#fa3534">闀挎渤钀芥棩鍦�</u-divider> + */ +export default { + name: 'u-divider', + props: { + // 鍗曚竴杈筪ivider妯嚎鐨勫搴�(鏁板��)锛屽崟浣峳px銆傛垨鑰呯櫨鍒嗘瘮 + halfWidth: { + type: [Number, String], + default: 150 + }, + // divider妯嚎鐨勯鑹诧紝濡傝缃紝 + borderColor: { + type: String, + default: '#dcdfe6' + }, + // 涓婚鑹诧紝鍙互鏄痯rimary|info|success|warning|error涔嬩竴鍊� + type: { + type: String, + default: 'primary' + }, + // 鏂囧瓧棰滆壊 + color: { + type: String, + default: '#909399' + }, + // 鏂囧瓧澶у皬锛屽崟浣峳px + fontSize: { + type: [Number, String], + default: 26 + }, + // 鏁翠釜divider鐨勮儗鏅鑹� + bgColor: { + type: String, + default: '#ffffff' + }, + // 鏁翠釜divider鐨勯珮搴﹀崟浣峳px + height: { + type: [Number, String], + default: 'auto' + }, + // 涓婅竟璺� + marginTop: { + type: [String, Number], + default: 0 + }, + // 涓嬭竟璺� + marginBottom: { + type: [String, Number], + default: 0 + }, + // 鏄惁浣跨敤slot浼犲叆鍐呭锛屽鏋滀笉鐢╯lot浼犲叆鍐呭锛屽厛鐨勪腑闂村氨涓嶄細鏈夌┖闅� + useSlot: { + type: Boolean, + default: true + } + }, + computed: { + lineStyle() { + let style = {}; + if(String(this.halfWidth).indexOf('%') != -1) style.width = this.halfWidth; + else style.width = this.halfWidth + 'rpx'; + // borderColor浼樺厛绾ч珮浜巘ype鍊� + if(this.borderColor) style.borderColor = this.borderColor; + return style; + } + }, + methods: { + click() { + this.$emit('click'); + } + } +}; +</script> + +<style lang="scss" scoped> +@import "../../libs/css/style.components.scss"; +.u-divider { + width: 100%; + position: relative; + text-align: center; + @include vue-flex; + justify-content: center; + align-items: center; + overflow: hidden; + flex-direction: row; +} + +.u-divider-line { + border-bottom: 1px solid $u-border-color; + transform: scale(1, 0.5); + transform-origin: center; + + &--bordercolor--primary { + border-color: $u-type-primary; + } + + &--bordercolor--success { + border-color: $u-type-success; + } + + &--bordercolor--error { + border-color: $u-type-primary; + } + + &--bordercolor--info { + border-color: $u-type-info; + } + + &--bordercolor--warning { + border-color: $u-type-warning; + } +} + +.u-divider-text { + white-space: nowrap; + padding: 0 16rpx; + /* #ifndef APP-NVUE */ + display: inline-flex; + /* #endif */ +} +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-dropdown-item/u-dropdown-item.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-dropdown-item/u-dropdown-item.vue" new file mode 100644 index 0000000..ba60d8f --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-dropdown-item/u-dropdown-item.vue" @@ -0,0 +1,132 @@ +<template> + <view class="u-dropdown-item" v-if="active" @touchmove.stop.prevent="() => {}" @tap.stop.prevent="() => {}"> + <block v-if="!$slots.default && !$slots.$default"> + <scroll-view scroll-y="true" :style="{ + height: $u.addUnit(height) + }"> + <view class="u-dropdown-item__options"> + <u-cell-group> + <u-cell-item @click="cellClick(item.value)" :arrow="false" :title="item.label" v-for="(item, index) in options" + :key="index" :title-style="{ + color: value == item.value ? activeColor : inactiveColor + }"> + <u-icon v-if="value == item.value" name="checkbox-mark" :color="activeColor" size="32"></u-icon> + </u-cell-item> + </u-cell-group> + </view> + </scroll-view> + </block> + <slot v-else /> + </view> +</template> + +<script> + /** + * dropdown-item 涓嬫媺鑿滃崟 + * @description 璇ョ粍浠朵竴鑸敤浜庡悜涓嬪睍寮�鑿滃崟锛屽悓鏃跺彲鍒囨崲澶氫釜閫夐」鍗$殑鍦烘櫙 + * @tutorial http://uviewui.com/components/dropdown.html + * @property {String | Number} v-model 鍙屽悜缁戝畾閫夐」鍗¢�夋嫨鍊� + * @property {String} title 鑿滃崟椤规爣棰� + * @property {Array[Object]} options 閫夐」鏁版嵁锛屽鏋滀紶鍏ヤ簡榛樿slot锛屾鍙傛暟鏃犳晥 + * @property {Boolean} disabled 鏄惁绂佺敤姝ら�夐」鍗★紙榛樿false锛� + * @property {String | Number} duration 閫夐」鍗″睍寮�鍜屾敹璧风殑杩囨浮鏃堕棿锛屽崟浣峬s锛堥粯璁�300锛� + * @property {String | Number} height 寮圭獥涓嬫媺鍐呭鐨勯珮搴�(鍐呭瓒呭嚭灏嗕細婊氬姩)锛堥粯璁uto锛� + * @example <u-dropdown-item title="鏍囬"></u-dropdown-item> + */ + export default { + name: 'u-dropdown-item', + props: { + // 褰撳墠閫変腑椤圭殑value鍊� + value: { + type: [Number, String, Array], + default: '' + }, + // 鑿滃崟椤规爣棰� + title: { + type: [String, Number], + default: '' + }, + // 閫夐」鏁版嵁锛屽鏋滀紶鍏ヤ簡榛樿slot锛屾鍙傛暟鏃犳晥 + options: { + type: Array, + default () { + return [] + } + }, + // 鏄惁绂佺敤姝よ彍鍗曢」 + disabled: { + type: Boolean, + default: false + }, + // 涓嬫媺寮圭獥鐨勯珮搴� + height: { + type: [Number, String], + default: 'auto' + }, + }, + data() { + return { + active: false, // 褰撳墠椤规槸鍚﹀浜庡睍寮�鐘舵�� + activeColor: '#2979ff', // 婵�娲绘椂宸﹁竟鏂囧瓧鍜屽彸杈瑰鍕惧浘鏍囩殑棰滆壊 + inactiveColor: '#606266', // 鏈縺娲绘椂宸﹁竟鏂囧瓧鍜屽彸杈瑰鍕惧浘鏍囩殑棰滆壊 + } + }, + computed: { + // 鐩戝惉props鏄惁鍙戠敓浜嗗彉鍖栵紝鏈変簺鍊奸渶瑕佷紶閫掔粰鐖剁粍浠秛-dropdown锛屾棤娉曞弻鍚戠粦瀹� + propsChange() { + return `${this.title}-${this.disabled}`; + } + }, + watch: { + propsChange(n) { + // 褰撳�煎彉鍖栨椂锛岄�氱煡鐖剁粍浠堕噸鏂板垵濮嬪寲锛岃鐖剁粍浠舵墽琛屾瘡涓瓙缁勪欢鐨刬nit()鏂规硶 + // 灏嗘墍鏈夊瓙缁勪欢鏁版嵁閲嶆柊鏁寸悊涓�閬� + if (this.parent) this.parent.init(); + } + }, + created() { + // 鐖剁粍浠剁殑瀹炰緥 + this.parent = false; + }, + methods: { + init() { + // 鑾峰彇鐖剁粍浠秛-dropdown + let parent = this.$u.$parent.call(this, 'u-dropdown'); + if (parent) { + this.parent = parent; + // 灏嗗瓙缁勪欢鐨勬縺娲婚鑹查厤缃负鐖剁粍浠惰缃殑婵�娲诲拰鏈縺娲绘椂鐨勯鑹� + this.activeColor = parent.activeColor; + this.inactiveColor = parent.inactiveColor; + // 灏嗘湰缁勪欢鐨則his锛屾斁鍏ュ埌鐖剁粍浠剁殑children鏁扮粍涓紝璁╃埗缁勪欢鍙互鎿嶄綔鏈�(瀛�)缁勪欢鐨勬柟娉曞拰灞炴�� + // push杩涘幓鍓嶏紝鏄惧垽鏂槸鍚﹀凡缁忓瓨鍦ㄤ簡鏈疄渚嬶紝鍥犱负鍦ㄥ瓙缁勪欢鍐呴儴鏁版嵁鍙樺寲鏃讹紝浼氶�氳繃鐖剁粍浠堕噸鏂板垵濮嬪寲瀛愮粍浠� + let exist = parent.children.find(val => { + return this === val; + }) + if (!exist) parent.children.push(this); + if (parent.children.length == 1) this.active = true; + // 鐖剁粍浠舵棤娉曠洃鍚琧hildren鐨勫彉鍖栵紝鏁呭皢瀛愮粍浠剁殑title锛屼紶鍏ョ埗缁勪欢鐨刴enuList鏁扮粍涓� + parent.menuList.push({ + title: this.title, + disabled: this.disabled + }); + } + }, + // cell琚偣鍑� + cellClick(value) { + // 淇敼閫氳繃v-model缁戝畾鐨勫�� + this.$emit('input', value); + // 閫氱煡鐖剁粍浠�(u-dropdown)鏀惰捣鑿滃崟 + this.parent.close(); + // 鍙戝嚭浜嬩欢锛屾姏鍑哄綋鍓嶅嬀閫夐」鐨剉alue + this.$emit('change', value); + } + }, + mounted() { + this.init(); + } + } +</script> + +<style scoped lang="scss"> + @import "../../libs/css/style.components.scss"; +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-dropdown/u-dropdown.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-dropdown/u-dropdown.vue" new file mode 100644 index 0000000..a62e469 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-dropdown/u-dropdown.vue" @@ -0,0 +1,298 @@ +<template> + <view class="u-dropdown"> + <view class="u-dropdown__menu" :style="{ + height: $u.addUnit(height) + }" :class="{ + 'u-border-bottom': borderBottom + }"> + <view class="u-dropdown__menu__item" v-for="(item, index) in menuList" :key="index" @tap.stop="menuClick(index)"> + <view class="u-flex"> + <text class="u-dropdown__menu__item__text" :style="{ + color: item.disabled ? '#c0c4cc' : (index === current || highlightIndex == index) ? activeColor : inactiveColor, + fontSize: $u.addUnit(titleSize) + }">{{item.title}}</text> + <view class="u-dropdown__menu__item__arrow" :class="{ + 'u-dropdown__menu__item__arrow--rotate': index === current + }"> + <u-icon :custom-style="{display: 'flex'}" :name="menuIcon" :size="$u.addUnit(menuIconSize)" :color="index === current || highlightIndex == index ? activeColor : '#c0c4cc'"></u-icon> + </view> + </view> + </view> + </view> + <view class="u-dropdown__content" :style="[contentStyle, { + transition: `opacity ${duration / 1000}s linear`, + top: $u.addUnit(height), + height: contentHeight + 'px' + }]" + @tap="maskClick" @touchmove.stop.prevent> + <view @tap.stop.prevent class="u-dropdown__content__popup" :style="[popupStyle]"> + <slot></slot> + </view> + <view class="u-dropdown__content__mask"></view> + </view> + </view> +</template> + +<script> + /** + * dropdown 涓嬫媺鑿滃崟 + * @description 璇ョ粍浠朵竴鑸敤浜庡悜涓嬪睍寮�鑿滃崟锛屽悓鏃跺彲鍒囨崲澶氫釜閫夐」鍗$殑鍦烘櫙 + * @tutorial http://uviewui.com/components/dropdown.html + * @property {String} active-color 鏍囬鍜岄�夐」鍗¢�変腑鐨勯鑹诧紙榛樿#2979ff锛� + * @property {String} inactive-color 鏍囬鍜岄�夐」鍗℃湭閫変腑鐨勯鑹诧紙榛樿#606266锛� + * @property {Boolean} close-on-click-mask 鐐瑰嚮閬僵鏄惁鍏抽棴鑿滃崟锛堥粯璁rue锛� + * @property {Boolean} close-on-click-self 鐐瑰嚮褰撳墠婵�娲婚」鏍囬鏄惁鍏抽棴鑿滃崟锛堥粯璁rue锛� + * @property {String | Number} duration 閫夐」鍗″睍寮�鍜屾敹璧风殑杩囨浮鏃堕棿锛屽崟浣峬s锛堥粯璁�300锛� + * @property {String | Number} height 鏍囬鑿滃崟鐨勯珮搴︼紝鍗曚綅浠绘剰锛堥粯璁�80锛� + * @property {String | Number} border-radius 鑿滃崟灞曞紑鍐呭涓嬫柟鐨勫渾瑙掑�硷紝鍗曚綅浠绘剰锛堥粯璁�0锛� + * @property {Boolean} border-bottom 鏍囬鑿滃崟鏄惁鏄剧ず涓嬭竟妗嗭紙榛樿false锛� + * @property {String | Number} title-size 鏍囬鐨勫瓧浣撳ぇ灏忥紝鍗曚綅浠绘剰锛屾暟鍊奸粯璁や负rpx鍗曚綅锛堥粯璁�28锛� + * @event {Function} open 涓嬫媺鑿滃崟琚墦寮�鏃惰Е鍙� + * @event {Function} close 涓嬫媺鑿滃崟琚叧闂椂瑙﹀彂 + * @example <u-dropdown></u-dropdown> + */ + export default { + name: 'u-dropdown', + props: { + // 鑿滃崟鏍囬鍜岄�夐」鐨勬縺娲绘�侀鑹� + activeColor: { + type: String, + default: '#2979ff' + }, + // 鑿滃崟鏍囬鍜岄�夐」鐨勬湭婵�娲绘�侀鑹� + inactiveColor: { + type: String, + default: '#606266' + }, + // 鐐瑰嚮閬僵鏄惁鍏抽棴鑿滃崟 + closeOnClickMask: { + type: Boolean, + default: true + }, + // 鐐瑰嚮褰撳墠婵�娲婚」鏍囬鏄惁鍏抽棴鑿滃崟 + closeOnClickSelf: { + type: Boolean, + default: true + }, + // 杩囨浮鏃堕棿 + duration: { + type: [Number, String], + default: 300 + }, + // 鏍囬鑿滃崟鐨勯珮搴︼紝鍗曚綅浠绘剰锛屾暟鍊奸粯璁や负rpx鍗曚綅 + height: { + type: [Number, String], + default: 80 + }, + // 鏄惁鏄剧ず涓嬭竟妗� + borderBottom: { + type: Boolean, + default: false + }, + // 鏍囬鐨勫瓧浣撳ぇ灏� + titleSize: { + type: [Number, String], + default: 28 + }, + // 涓嬫媺鍑烘潵鐨勫唴瀹归儴鍒嗙殑鍦嗚鍊� + borderRadius: { + type: [Number, String], + default: 0 + }, + // 鑿滃崟鍙充晶鐨刬con鍥炬爣 + menuIcon: { + type: String, + default: 'arrow-down' + }, + // 鑿滃崟鍙充晶鍥炬爣鐨勫ぇ灏� + menuIconSize: { + type: [Number, String], + default: 26 + } + }, + data() { + return { + showDropdown: true, // 鏄惁鎵撳紑涓嬫潵鑿滃崟, + menuList: [], // 鏄剧ず鐨勮彍鍗� + active: false, // 涓嬫媺鑿滃崟鐨勭姸鎬� + // 褰撳墠鏄鍑犱釜鑿滃崟澶勪簬婵�娲荤姸鎬侊紝灏忕▼搴忎腑姝ゅ涓嶈兘鍐欐垚false鎴栬��""锛屽惁鍒欏悗缁皢current璧嬪�间负0锛� + // 鏃犺兘鐨凾X娌℃湁浣跨敤===鑰屾槸浣跨敤==鍒ゆ柇锛屽鑷寸▼搴忚涓哄墠鍚庝簩鑰呮病鏈夊彉鍖栵紝浠庤�屼笉浼氳Е鍙戣鍥炬洿鏂� + current: 99999, + // 澶栧眰鍐呭鐨勬牱寮忥紝鍒濆鏃跺浜庡簳灞傦紝涓旈�忔槑 + contentStyle: { + zIndex: -1, + opacity: 0 + }, + // 璁╂煇涓彍鍗曚繚鎸侀珮浜殑鐘舵�� + highlightIndex: 99999, + contentHeight: 0 + } + }, + computed: { + // 涓嬫媺鍑烘潵閮ㄥ垎鐨勬牱寮� + popupStyle() { + let style = {}; + // 杩涜Y杞翠綅绉伙紝灞曞紑鐘舵�佹椂锛屾仮澶嶅師浣嶃�傛敹榻愮姸鎬佹椂锛屽線涓婁綅绉�100%锛岃繘琛岄殣钘� + style.transform = `translateY(${this.active ? 0 : '-100%'})` + style['transition-duration'] = this.duration / 1000 + 's'; + style.borderRadius = `0 0 ${this.$u.addUnit(this.borderRadius)} ${this.$u.addUnit(this.borderRadius)}`; + return style; + } + }, + created() { + // 寮曠敤鎵�鏈夊瓙缁勪欢(u-dropdown-item)鐨則his锛屼笉鑳藉湪data涓0鏄庡彉閲忥紝鍚﹀垯鍦ㄥ井淇″皬绋嬪簭浼氶�犳垚寰幆寮曠敤鑰屾姤閿� + this.children = []; + }, + mounted() { + this.getContentHeight(); + }, + methods: { + init() { + // 褰撴煇涓瓙缁勪欢鍐呭鍙樺寲鏃讹紝瑙﹀彂鐖剁粍浠剁殑init锛岀埗缁勪欢鍐嶈姣忎竴涓瓙缁勪欢閲嶆柊鍒濆鍖栦竴閬� + // 浠ヤ繚璇佹暟鎹殑姝g‘鎬� + this.menuList = []; + this.children.map(child => { + child.init(); + }) + }, + // 鐐瑰嚮鑿滃崟 + menuClick(index) { + // 鍒ゆ柇鏄惁琚鐢� + if (this.menuList[index].disabled) return; + // 濡傛灉鐐瑰嚮鏃剁殑绱㈠紩鍜屽綋鍓嶆縺娲婚」绱㈠紩鐩稿悓锛屾剰鍛崇潃鐐瑰嚮浜嗘縺娲婚」锛岄渶瑕佹敹璧蜂笅鎷夎彍鍗� + if (index === this.current && this.closeOnClickSelf) { + this.close(); + // 绛夊姩鐢荤粨鏉熷悗锛屽啀绉婚櫎涓嬫媺鑿滃崟涓殑鍐呭锛屽惁鍒欑洿鎺ョЩ闄わ紝涔熷氨娌℃湁涓嬫媺鑿滃崟鏀惰捣鐨勬晥鏋滀簡 + setTimeout(() => { + this.children[index].active = false; + }, this.duration) + return; + } + this.open(index); + }, + // 鎵撳紑涓嬫媺鑿滃崟 + open(index) { + // 閲嶇疆楂樹寒绱㈠紩锛屽惁鍒欎細閫犳垚澶氫釜鑿滃崟鍚屾椂楂樹寒 + // this.highlightIndex = 9999; + // 灞曞紑鏃讹紝璁剧疆涓嬫媺鍐呭鐨勬牱寮� + this.contentStyle = { + zIndex: 11, + } + // 鏍囪灞曞紑鐘舵�佷互鍙婂綋鍓嶅睍寮�椤圭殑绱㈠紩 + this.active = true; + this.current = index; + // 鍘嗛亶鎵�鏈夌殑瀛愬厓绱狅紝灏嗙储寮曞尮閰嶇殑椤规爣璁颁负婵�娲荤姸鎬侊紝鍥犱负瀛愬厓绱犳槸閫氳繃v-if鎺у埗鍒囨崲鐨� + // 涔嬫墍浠ヤ笉鏄洜display: none锛屾槸鍥犱负nvue娌℃湁display杩欎釜灞炴�� + this.children.map((val, idx) => { + val.active = index == idx ? true : false; + }) + this.$emit('open', this.current); + }, + // 璁剧疆涓嬫媺鑿滃崟澶勪簬鏀惰捣鐘舵�� + close() { + this.$emit('close', this.current); + // 璁剧疆涓烘敹璧风姸鎬侊紝鍚屾椂current褰掍綅锛岃缃负绌哄瓧绗︿覆 + this.active = false; + this.current = 99999; + // 涓嬫媺鍐呭鐨勬牱寮忚繘琛岃皟鏁达紝涓嶉�忔槑搴﹁缃负0 + this.contentStyle = { + zIndex: -1, + opacity: 0 + } + }, + // 鐐瑰嚮閬僵 + maskClick() { + // 濡傛灉涓嶅厑璁哥偣鍑婚伄缃╋紝鐩存帴杩斿洖 + if (!this.closeOnClickMask) return; + this.close(); + }, + // 澶栭儴鎵嬪姩璁剧疆鏌愪釜鑿滃崟楂樹寒 + highlight(index = undefined) { + this.highlightIndex = index !== undefined ? index : 99999; + }, + // 鑾峰彇涓嬫媺鑿滃崟鍐呭鐨勯珮搴� + getContentHeight() { + // 杩欓噷鐨勫師鐞嗕负锛屽洜涓篸ropdown缁勪欢鏄浉瀵瑰畾浣嶇殑锛屽畠鐨勪笅鎷夊嚭鏉ョ殑鍐呭锛屽繀椤荤粰瀹氫竴涓珮搴� + // 鎵嶈兘璁╅伄缃╁崰婊¤彍鍗曚竴涓嬶紝鐩村埌灞忓箷搴曢儴鐨勯珮搴� + // this.$u.sys()涓簎View灏佽鐨勮幏鍙栬澶囦俊鎭殑鏂规硶 + let windowHeight = this.$u.sys().windowHeight; + this.$uGetRect('.u-dropdown__menu').then(res => { + // 杩欓噷鑾峰彇鐨勬槸dropdown鐨勫昂瀵革紝鍦℉5涓婏紝uniapp鑾峰彇灏哄鏄湁bug鐨�(浠ュ墠鎻愬嚭淇杩囷紝鍚庢潵鍙堝嚭鐜颁簡姝ug锛岀洰鍓峢x2.8.11鐗堟湰) + // H5绔痓ug琛ㄧ幇涓哄厓绱犲昂瀵哥殑top鍊间负瀵艰埅鏍忓簳閮ㄥ埌鍒板厓绱犵殑涓婅竟娌跨殑璺濈锛屼絾鏄厓绱犵殑bottom鍊肩‘鏄鑸爮椤堕儴鍒板厓绱犲簳閮ㄧ殑璺濈 + // 浜岃�呮槸浜掔浉鐭涚浘鐨勶紝鏈川鍘熷洜鏄疕5绔鑸爮闈炲師鐢燂紝uni鐨勫紑鍙戣�呭ぇ鎰忛�犳垚 + // 杩欓噷鍙栬彍鍗曟爮鐨刡otton鍊煎悎鐞嗙殑锛屼笉鑳界敤res.top锛屽惁鍒欓〉闈細閫犳垚婊氬姩 + this.contentHeight = windowHeight - res.bottom; + }) + } + } + } +</script> + +<style scoped lang="scss"> + @import "../../libs/css/style.components.scss"; + + .u-dropdown { + flex: 1; + width: 100%; + position: relative; + + &__menu { + @include vue-flex; + position: relative; + z-index: 11; + height: 80rpx; + + &__item { + flex: 1; + @include vue-flex; + justify-content: center; + align-items: center; + + &__text { + font-size: 28rpx; + color: $u-content-color; + } + + &__arrow { + margin-left: 6rpx; + transition: transform .3s; + align-items: center; + @include vue-flex; + + &--rotate { + transform: rotate(180deg); + } + } + } + } + + &__content { + position: absolute; + z-index: 8; + width: 100%; + left: 0px; + bottom: 0; + overflow: hidden; + + + &__mask { + position: absolute; + z-index: 9; + background: rgba(0, 0, 0, .3); + width: 100%; + left: 0; + top: 0; + bottom: 0; + } + + &__popup { + position: relative; + z-index: 10; + transition: all 0.3s; + transform: translate3D(0, -100%, 0); + overflow: hidden; + } + } + + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-empty/u-empty.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-empty/u-empty.vue" new file mode 100644 index 0000000..2c77b24 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-empty/u-empty.vue" @@ -0,0 +1,193 @@ +<template> + <view class="u-empty" v-if="show" :style="{ + marginTop: marginTop + 'rpx' + }"> + <u-icon + :name="src ? src : 'empty-' + mode" + :custom-style="iconStyle" + :label="text ? text : icons[mode]" + label-pos="bottom" + :label-color="color" + :label-size="fontSize" + :size="iconSize" + :color="iconColor" + margin-top="14" + ></u-icon> + <view class="u-slot-wrap"> + <slot name="bottom"></slot> + </view> + </view> +</template> + +<script> + /** + * empty 鍐呭涓虹┖ + * @description 璇ョ粍浠剁敤浜庨渶瑕佸姞杞藉唴瀹癸紝浣嗘槸鍔犺浇鐨勭涓�椤垫暟鎹氨涓虹┖锛屾彁绀轰竴涓�"娌℃湁鍐呭"鐨勫満鏅紝 鎴戜滑绮惧績鎸戦�変簡鍗佸嚑涓満鏅殑鍥炬爣锛屾柟渚挎偍浣跨敤銆� + * @tutorial https://www.uviewui.com/components/empty.html + * @property {String} color 鏂囧瓧棰滆壊锛堥粯璁�#c0c4cc锛� + * @property {String} text 鏂囧瓧鎻愮ず锛堥粯璁も�滄棤鍐呭鈥濓級 + * @property {String} src 鑷畾涔夊浘鏍囪矾寰勶紝濡傚畾涔夛紝mode鍙傛暟浼氬け鏁� + * @property {String Number} font-size 鎻愮ず鏂囧瓧鐨勫ぇ灏忥紝鍗曚綅rpx锛堥粯璁�28锛� + * @property {String} mode 鍐呯疆鐨勫浘鏍囷紝瑙佸畼缃戣鏄庯紙榛樿data锛� + * @property {String Number} img-width 鍥炬爣鐨勫搴︼紝鍗曚綅rpx锛堥粯璁�240锛� + * @property {String} img-height 鍥炬爣鐨勯珮搴︼紝鍗曚綅rpx锛堥粯璁uto锛� + * @property {String Number} margin-top 缁勪欢璺濈涓婁竴涓厓绱犱箣闂寸殑璺濈锛堥粯璁�0锛� + * @property {Boolean} show 鏄惁鏄剧ず缁勪欢锛堥粯璁rue锛� + * @event {Function} click 鐐瑰嚮缁勪欢鏃惰Е鍙� + * @event {Function} close 鐐瑰嚮鍏抽棴鎸夐挳鏃惰Е鍙� + * @example <u-empty text="鎵�璋撲紛浜猴紝鍦ㄦ按涓�鏂�" mode="list"></u-empty> + */ + export default { + name: "u-empty", + props: { + // 鍥炬爣璺緞 + src: { + type: String, + default: '' + }, + // 鎻愮ず鏂囧瓧 + text: { + type: String, + default: '' + }, + // 鏂囧瓧棰滆壊 + color: { + type: String, + default: '#c0c4cc' + }, + // 鍥炬爣鐨勯鑹� + iconColor: { + type: String, + default: '#c0c4cc' + }, + // 鍥炬爣鐨勫ぇ灏� + iconSize: { + type: [String, Number], + default: 120 + }, + // 鏂囧瓧澶у皬锛屽崟浣峳px + fontSize: { + type: [String, Number], + default: 26 + }, + // 閫夋嫨棰勭疆鐨勫浘鏍囩被鍨� + mode: { + type: String, + default: 'data' + }, + // 鍥炬爣瀹藉害锛屽崟浣峳px + imgWidth: { + type: [String, Number], + default: 120 + }, + // 鍥炬爣楂樺害锛屽崟浣峳px + imgHeight: { + type: [String, Number], + default: 'auto' + }, + // 鏄惁鏄剧ず缁勪欢 + show: { + type: Boolean, + default: true + }, + // 缁勪欢璺濈涓婁竴涓厓绱犱箣闂寸殑璺濈 + marginTop: { + type: [String, Number], + default: 0 + }, + iconStyle: { + type: Object, + default() { + return {} + } + } + }, + data() { + return { + icons: { + car: '璐墿杞︿负绌�', + page: '椤甸潰涓嶅瓨鍦�', + search: '娌℃湁鎼滅储缁撴灉', + address: '娌℃湁鏀惰揣鍦板潃', + wifi: '娌℃湁WiFi', + order: '璁㈠崟涓虹┖', + coupon: '娌℃湁浼樻儬鍒�', + favor: '鏆傛棤鏀惰棌', + permission: '鏃犳潈闄�', + history: '鏃犲巻鍙茶褰�', + news: '鏃犳柊闂诲垪琛�', + message: '娑堟伅鍒楄〃涓虹┖', + list: '鍒楄〃涓虹┖', + data: '鏁版嵁涓虹┖' + }, + // icons: [{ + // icon: 'car', + // text: '璐墿杞︿负绌�' + // },{ + // icon: 'page', + // text: '椤甸潰涓嶅瓨鍦�' + // },{ + // icon: 'search', + // text: '娌℃湁鎼滅储缁撴灉' + // },{ + // icon: 'address', + // text: '娌℃湁鏀惰揣鍦板潃' + // },{ + // icon: 'wifi', + // text: '娌℃湁WiFi' + // },{ + // icon: 'order', + // text: '璁㈠崟涓虹┖' + // },{ + // icon: 'coupon', + // text: '娌℃湁浼樻儬鍒�' + // },{ + // icon: 'favor', + // text: '鏆傛棤鏀惰棌' + // },{ + // icon: 'permission', + // text: '鏃犳潈闄�' + // },{ + // icon: 'history', + // text: '鏃犲巻鍙茶褰�' + // },{ + // icon: 'news', + // text: '鏃犳柊闂诲垪琛�' + // },{ + // icon: 'message', + // text: '娑堟伅鍒楄〃涓虹┖' + // },{ + // icon: 'list', + // text: '鍒楄〃涓虹┖' + // },{ + // icon: 'data', + // text: '鏁版嵁涓虹┖' + // }], + + } + } + } +</script> + +<style scoped lang="scss"> + @import "../../libs/css/style.components.scss"; + + .u-empty { + @include vue-flex; + flex-direction: column; + justify-content: center; + align-items: center; + height: 100%; + } + + .u-image { + margin-bottom: 20rpx; + } + + .u-slot-wrap { + @include vue-flex; + justify-content: center; + align-items: center; + margin-top: 20rpx; + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-field/u-field.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-field/u-field.vue" new file mode 100644 index 0000000..b562798 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-field/u-field.vue" @@ -0,0 +1,384 @@ +<template> + <view class="u-field" :class="{'u-border-top': borderTop, 'u-border-bottom': borderBottom }"> + <view class="u-field-inner" :class="[type == 'textarea' ? 'u-textarea-inner' : '', 'u-label-postion-' + labelPosition]"> + <view class="u-label" :class="[required ? 'u-required' : '']" :style="{ + justifyContent: justifyContent, + flex: labelPosition == 'left' ? `0 0 ${labelWidth}rpx` : '1' + }"> + <view class="u-icon-wrap" v-if="icon"> + <u-icon size="32" :custom-style="iconStyle" :name="icon" :color="iconColor" class="u-icon"></u-icon> + </view> + <slot name="icon"></slot> + <text class="u-label-text" :class="[this.$slots.icon || icon ? 'u-label-left-gap' : '']">{{ label }}</text> + </view> + <view class="fild-body"> + <view class="u-flex-1 u-flex" :style="[inputWrapStyle]"> + <textarea v-if="type == 'textarea'" class="u-flex-1 u-textarea-class" :style="[fieldStyle]" :value="value" + :placeholder="placeholder" :placeholderStyle="placeholderStyle" :disabled="disabled" :maxlength="inputMaxlength" + :focus="focus" :autoHeight="autoHeight" :fixed="fixed" @input="onInput" @blur="onBlur" @focus="onFocus" @confirm="onConfirm" + @tap="fieldClick" /> + <input + v-else + :style="[fieldStyle]" + :type="type" + class="u-flex-1 u-field__input-wrap" + :value="value" + :password="password || this.type === 'password'" + :placeholder="placeholder" + :placeholderStyle="placeholderStyle" + :disabled="disabled" + :maxlength="inputMaxlength" + :focus="focus" + :confirmType="confirmType" + @focus="onFocus" + @blur="onBlur" + @input="onInput" + @confirm="onConfirm" + @tap="fieldClick" + /> + </view> + <u-icon :size="clearSize" v-if="clearable && value != '' && focused" name="close-circle-fill" color="#c0c4cc" class="u-clear-icon" @click="onClear"/> + <view class="u-button-wrap"><slot name="right" /></view> + <u-icon v-if="rightIcon" @click="rightIconClick" :name="rightIcon" color="#c0c4cc" :style="[rightIconStyle]" size="26" class="u-arror-right" /> + </view> + </view> + <view v-if="errorMessage !== false && errorMessage != ''" class="u-error-message" :style="{ + paddingLeft: labelWidth + 'rpx' + }">{{ errorMessage }}</view> + </view> +</template> + +<script> +/** + * field 杈撳叆妗� + * @description 鍊熷姪姝ょ粍浠讹紝鍙互瀹炵幇琛ㄥ崟鐨勮緭鍏ワ紝 鏈�"text"鍜�"textarea"绫诲瀷鐨勶紝姝ゅ锛屽�熷姪uView鐨刾icker鍜宎ctionSheet缁勪欢鍙互蹇�熷疄鐜颁笂鎷夎彍鍗曪紝鏃堕棿锛屽湴鍖洪�夋嫨绛夛紝 涓鸿〃鍗曡В鍐虫柟妗堢殑鍒╁櫒銆� + * @tutorial https://www.uviewui.com/components/field.html + * @property {String} type 杈撳叆妗嗙殑绫诲瀷锛堥粯璁ext锛� + * @property {String} icon label宸﹁竟鐨勫浘鏍囷紝闄恥View鐨勫浘鏍囧悕绉� + * @property {Object} icon-style 宸﹁竟鍥炬爣鐨勬牱寮忥紝瀵硅薄褰㈠紡 + * @property {Boolean} right-icon 杈撳叆妗嗗彸杈圭殑鍥炬爣鍚嶇О锛岄檺uView鐨勫浘鏍囧悕绉帮紙榛樿false锛� + * @property {Boolean} required 鏄惁蹇呭~锛屽乏杈规偍鏄剧ず绾㈣壊"*"鍙凤紙榛樿false锛� + * @property {String} label 杈撳叆妗嗗乏杈圭殑鏂囧瓧鎻愮ず + * @property {Boolean} password 鏄惁瀵嗙爜杈撳叆鏂瑰紡(鐢ㄧ偣鏇挎崲鏂囧瓧)锛宼ype涓簍ext鏃舵湁鏁堬紙榛樿false锛� + * @property {Boolean} clearable 鏄惁鏄剧ず鍙充晶娓呯┖鍐呭鐨勫浘鏍囨帶浠�(杈撳叆妗嗘湁鍐呭锛屼笖鑾峰緱鐒︾偣鏃舵墠鏄剧ず)锛岀偣鍑诲彲娓呯┖杈撳叆妗嗗唴瀹癸紙榛樿true锛� + * @property {Number String} label-width label鐨勫搴︼紝鍗曚綅rpx锛堥粯璁�130锛� + * @property {String} label-align label鐨勬枃瀛楀榻愭柟寮忥紙榛樿left锛� + * @property {Object} field-style 鑷畾涔夎緭鍏ユ鐨勬牱寮忥紝瀵硅薄褰㈠紡 + * @property {Number | String} clear-size 娓呴櫎鍥炬爣鐨勫ぇ灏忥紝鍗曚綅rpx锛堥粯璁�30锛� + * @property {String} input-align 杈撳叆妗嗗唴瀹瑰榻愭柟寮忥紙榛樿left锛� + * @property {Boolean} border-bottom 鏄惁鏄剧ずfield鐨勪笅杈规锛堥粯璁rue锛� + * @property {Boolean} border-top 鏄惁鏄剧ずfield鐨勪笂杈规锛堥粯璁alse锛� + * @property {String} icon-color 宸﹁竟閫氳繃icon閰嶇疆鐨勫浘鏍囩殑棰滆壊锛堥粯璁�#606266锛� + * @property {Boolean} auto-height 鏄惁鑷姩澧為珮杈撳叆鍖哄煙锛宼ype涓簍extarea鏃舵湁鏁堬紙榛樿true锛� + * @property {String Boolean} error-message 鏄剧ず鐨勯敊璇彁绀哄唴瀹癸紝濡傛灉涓虹┖瀛楃涓叉垨鑰協alse锛屽垯涓嶆樉绀洪敊璇俊鎭� + * @property {String} placeholder 杈撳叆妗嗙殑鎻愮ず鏂囧瓧 + * @property {String} placeholder-style placeholder鐨勬牱寮�(鍐呰仈鏍峰紡锛屽瓧绗︿覆)锛屽"color: #ddd" + * @property {Boolean} focus 鏄惁鑷姩鑾峰緱鐒︾偣锛堥粯璁alse锛� + * @property {Boolean} fixed 濡傛灉type涓簍extarea锛屼笖鍦ㄤ竴涓�"position:fixed"鐨勫尯鍩燂紝闇�瑕佹寚鏄庝负true锛堥粯璁alse锛� + * @property {Boolean} disabled 鏄惁涓嶅彲杈撳叆锛堥粯璁alse锛� + * @property {Number String} maxlength 鏈�澶ц緭鍏ラ暱搴︼紝璁剧疆涓� -1 鐨勬椂鍊欎笉闄愬埗鏈�澶ч暱搴︼紙榛樿140锛� + * @property {String} confirm-type 璁剧疆閿洏鍙充笅瑙掓寜閽殑鏂囧瓧锛屼粎鍦╰ype="text"鏃剁敓鏁堬紙榛樿done锛� + * @event {Function} input 杈撳叆妗嗗唴瀹瑰彂鐢熷彉鍖栨椂瑙﹀彂 + * @event {Function} focus 杈撳叆妗嗚幏寰楃劍鐐规椂瑙﹀彂 + * @event {Function} blur 杈撳叆妗嗗け鍘荤劍鐐规椂瑙﹀彂 + * @event {Function} confirm 鐐瑰嚮瀹屾垚鎸夐挳鏃惰Е鍙� + * @event {Function} right-icon-click 閫氳繃right-icon鐢熸垚鐨勫浘鏍囪鐐瑰嚮鏃惰Е鍙� + * @event {Function} click 杈撳叆妗嗚鐐瑰嚮鎴栬�呴�氳繃right-icon鐢熸垚鐨勫浘鏍囪鐐瑰嚮鏃惰Е鍙戯紝杩欐牱璁捐鏄�冭檻鍒颁紶閫掑彸杈圭殑鍥炬爣锛屼竴鑸兘涓洪渶瑕佸脊鍑�"picker"绛夋搷浣滄椂鐨勫満鏅紝鐐瑰嚮鍊掍笁瑙掑浘鏍囷紝鐞嗗簲鍙戝嚭姝や簨浠讹紝瑙佷笂鏂硅鏄� + * @example <u-field v-model="mobile" label="鎵嬫満鍙�" required :error-message="errorMessage"></u-field> + */ +export default { + name:"u-field", + props: { + icon: String, + rightIcon: String, + // arrowDirection: { + // type: String, + // default: 'right' + // }, + required: Boolean, + label: String, + password: Boolean, + clearable: { + type: Boolean, + default: true + }, + // 宸﹁竟鏍囬鐨勫搴﹀崟浣峳px + labelWidth: { + type: [Number, String], + default: 130 + }, + // 瀵归綈鏂瑰紡锛宭eft|center|right + labelAlign: { + type: String, + default: 'left' + }, + inputAlign: { + type: String, + default: 'left' + }, + iconColor: { + type: String, + default: '#606266' + }, + autoHeight: { + type: Boolean, + default: true + }, + errorMessage: { + type: [String, Boolean], + default: '' + }, + placeholder: String, + placeholderStyle: String, + focus: Boolean, + fixed: Boolean, + value: [Number, String], + type: { + type: String, + default: 'text' + }, + disabled: { + type: Boolean, + default: false + }, + maxlength: { + type: [Number, String], + default: 140 + }, + confirmType: { + type: String, + default: 'done' + }, + // lable鐨勪綅缃紝鍙�変负 left-宸﹁竟锛宼op-涓婅竟 + labelPosition: { + type: String, + default: 'left' + }, + // 杈撳叆妗嗙殑鑷畾涔夋牱寮� + fieldStyle: { + type: Object, + default() { + return {} + } + }, + // 娓呴櫎鎸夐挳鐨勫ぇ灏� + clearSize: { + type: [Number, String], + default: 30 + }, + // lable宸﹁竟鐨勫浘鏍囨牱寮忥紝瀵硅薄褰㈠紡 + iconStyle: { + type: Object, + default() { + return {} + } + }, + // 鏄惁鏄剧ず涓婅竟妗� + borderTop: { + type: Boolean, + default: false + }, + // 鏄惁鏄剧ず涓嬭竟妗� + borderBottom: { + type: Boolean, + default: true + }, + // 鏄惁鑷姩鍘婚櫎涓ょ鐨勭┖鏍� + trim: { + type: Boolean, + default: true + } + }, + data() { + return { + focused: false, + itemIndex: 0, + }; + }, + computed: { + inputWrapStyle() { + let style = {}; + style.textAlign = this.inputAlign; + // 鍒ゆ柇lable鐨勪綅缃紝濡傛灉鏄痩eft鐨勮瘽锛岃input宸﹁竟涓よ竟鏈夐棿闅� + if(this.labelPosition == 'left') { + style.margin = `0 8rpx`; + } else { + // 濡傛灉lable鏄痶op鐨勶紝input鐨勫乏杈瑰氨娌″繀瑕佹湁闂撮殭浜� + style.marginRight = `8rpx`; + } + return style; + }, + rightIconStyle() { + let style = {}; + if (this.arrowDirection == 'top') style.transform = 'roate(-90deg)'; + if (this.arrowDirection == 'bottom') style.transform = 'roate(90deg)'; + else style.transform = 'roate(0deg)'; + return style; + }, + labelStyle() { + let style = {}; + if(this.labelAlign == 'left') style.justifyContent = 'flext-start'; + if(this.labelAlign == 'center') style.justifyContent = 'center'; + if(this.labelAlign == 'right') style.justifyContent = 'flext-end'; + return style; + }, + // uni涓嶆敮鎸佸湪computed涓啓style.justifyContent = 'center'鐨勫舰寮忥紝鏁呯敤姝ゆ柟娉� + justifyContent() { + if(this.labelAlign == 'left') return 'flex-start'; + if(this.labelAlign == 'center') return 'center'; + if(this.labelAlign == 'right') return 'flex-end'; + }, + // 鍥犱负uniapp鐨刬nput缁勪欢鐨刴axlength缁勪欢蹇呴』瑕佹暟鍊硷紝杩欓噷杞负鏁板�硷紝缁欑敤鎴峰彲浠ヤ紶鍏ュ瓧绗︿覆鏁板�� + inputMaxlength() { + return Number(this.maxlength) + }, + // label鐨勪綅缃� + fieldInnerStyle() { + let style = {}; + if(this.labelPosition == 'left') { + style.flexDirection = 'row'; + } else { + style.flexDirection = 'column'; + } + + return style; + } + }, + methods: { + onInput(event) { + let value = event.detail.value; + // 鍒ゆ柇鏄惁鍘婚櫎绌烘牸 + if(this.trim) value = this.$u.trim(value); + this.$emit('input', value); + }, + onFocus(event) { + this.focused = true; + this.$emit('focus', event); + }, + onBlur(event) { + // 鏈�寮�濮嬩娇鐢ㄧ殑鏄洃鍚浘鏍嘆touchstart浜嬩欢锛岃嚜浠巋x2.8.4鍚庯紝姝ゆ柟娉曞湪寰俊灏忕▼搴忓嚭閿� + // 杩欓噷鏀逛负鐩戝惉鐐瑰嚮浜嬩欢锛屾墜鐐瑰嚮娓呴櫎鍥炬爣鏃讹紝鍚屾椂涔熷彂鐢熶簡@blur浜嬩欢锛屽鑷村浘鏍囨秷澶辫�屾棤娉曠偣鍑伙紝杩欓噷鍋氫竴涓欢鏃� + setTimeout(() => { + this.focused = false; + }, 100) + this.$emit('blur', event); + }, + onConfirm(e) { + this.$emit('confirm', e.detail.value); + }, + onClear(event) { + this.$emit('input', ''); + }, + rightIconClick() { + this.$emit('right-icon-click'); + this.$emit('click'); + }, + fieldClick() { + this.$emit('click'); + } + } +}; +</script> + +<style lang="scss" scoped> +@import "../../libs/css/style.components.scss"; + +.u-field { + font-size: 28rpx; + padding: 20rpx 28rpx; + text-align: left; + position: relative; + color: $u-main-color; +} + +.u-field-inner { + @include vue-flex; + align-items: center; +} + +.u-textarea-inner { + align-items: flex-start; +} + +.u-textarea-class { + min-height: 96rpx; + width: auto; + font-size: 28rpx; +} + +.fild-body { + @include vue-flex; + flex: 1; + align-items: center; +} + +.u-arror-right { + margin-left: 8rpx; +} + +.u-label-text { + /* #ifndef APP-NVUE */ + display: inline-flex; + /* #endif */ +} + +.u-label-left-gap { + margin-left: 6rpx; +} + +.u-label-postion-top { + flex-direction: column; + align-items: flex-start; +} + +.u-label { + width: 130rpx; + flex: 1 1 130rpx; + text-align: left; + position: relative; + @include vue-flex; + align-items: center; +} + +.u-required::before { + content: '*'; + position: absolute; + left: -16rpx; + font-size: 14px; + color: $u-type-error; + height: 9px; + line-height: 1; +} + +.u-field__input-wrap { + position: relative; + overflow: hidden; + font-size: 28rpx; + height: 48rpx; + flex: 1; + width: auto; +} + +.u-clear-icon { + @include vue-flex; + align-items: center; +} + +.u-error-message { + color: $u-type-error; + font-size: 26rpx; + text-align: left; +} + +.placeholder-style { + color: rgb(150, 151, 153); +} + +.u-input-class { + font-size: 28rpx; +} + +.u-button-wrap { + margin-left: 8rpx; +} +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-form-item/u-form-item.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-form-item/u-form-item.vue" new file mode 100644 index 0000000..d6b8c8b --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-form-item/u-form-item.vue" @@ -0,0 +1,431 @@ +<template> + <view class="u-form-item" :class="{'u-border-bottom': elBorderBottom, 'u-form-item__border-bottom--error': validateState === 'error' && showError('border-bottom')}"> + <view class="u-form-item__body" :style="{ + flexDirection: elLabelPosition == 'left' ? 'row' : 'column' + }"> + <!-- 寰俊灏忕▼搴忎腑锛屽皢涓�涓弬鏁拌缃┖瀛楃涓诧紝缁撴灉浼氬彉鎴愬瓧绗︿覆"true" --> + <view class="u-form-item--left" :style="{ + width: uLabelWidth, + flex: `0 0 ${uLabelWidth}`, + marginBottom: elLabelPosition == 'left' ? 0 : '10rpx', + }"> + <!-- 涓轰簡鍧楀榻� --> + <view class="u-form-item--left__content" v-if="required || leftIcon || label"> + <!-- nvue涓嶆敮鎸佷吉鍏冪礌before --> + <text v-if="required" class="u-form-item--left__content--required">*</text> + <view class="u-form-item--left__content__icon" v-if="leftIcon"> + <u-icon :name="leftIcon" :custom-style="leftIconStyle"></u-icon> + </view> + <view class="u-form-item--left__content__label" :style="[elLabelStyle, { + 'justify-content': elLabelAlign == 'left' ? 'flex-start' : elLabelAlign == 'center' ? 'center' : 'flex-end' + }]"> + {{label}} + </view> + </view> + </view> + <view class="u-form-item--right u-flex"> + <view class="u-form-item--right__content"> + <view class="u-form-item--right__content__slot "> + <slot /> + </view> + <view class="u-form-item--right__content__icon u-flex" v-if="$slots.right || rightIcon"> + <u-icon :custom-style="rightIconStyle" v-if="rightIcon" :name="rightIcon"></u-icon> + <slot name="right" /> + </view> + </view> + </view> + </view> + <view class="u-form-item__message" v-if="validateState === 'error' && showError('message')" :style="{ + paddingLeft: elLabelPosition == 'left' ? $u.addUnit(elLabelWidth) : '0', + }">{{validateMessage}}</view> + </view> +</template> + +<script> + import Emitter from '../../libs/util/emitter.js'; + import schema from '../../libs/util/async-validator'; + // 鍘婚櫎璀﹀憡淇℃伅 + schema.warning = function() {}; + + /** + * form-item 琛ㄥ崟item + * @description 姝ょ粍浠朵竴鑸敤浜庤〃鍗曞満鏅紝鍙互閰嶇疆Input杈撳叆妗嗭紝Select寮瑰嚭妗嗭紝杩涜琛ㄥ崟楠岃瘉绛夈�� + * @tutorial http://uviewui.com/components/form.html + * @property {String} label 宸︿晶鎻愮ず鏂囧瓧 + * @property {Object} prop 琛ㄥ崟鍩焟odel瀵硅薄鐨勫睘鎬у悕锛屽湪浣跨敤 validate銆乺esetFields 鏂规硶鐨勬儏鍐典笅锛岃灞炴�ф槸蹇呭~鐨� + * @property {Boolean} border-bottom 鏄惁鏄剧ず琛ㄥ崟鍩熺殑涓嬪垝绾胯竟妗� + * @property {String} label-position 琛ㄥ崟鍩熸彁绀烘枃瀛楃殑浣嶇疆锛宭eft-宸︿晶锛宼op-涓婃柟 + * @property {String Number} label-width 鎻愮ず鏂囧瓧鐨勫搴︼紝鍗曚綅rpx锛堥粯璁�90锛� + * @property {Object} label-style lable鐨勬牱寮忥紝瀵硅薄褰㈠紡 + * @property {String} label-align lable鐨勫榻愭柟寮� + * @property {String} right-icon 鍙充晶鑷畾涔夊瓧浣撳浘鏍�(闄恥View鍐呯疆鍥炬爣)鎴栧浘鐗囧湴鍧� + * @property {String} left-icon 宸︿晶鑷畾涔夊瓧浣撳浘鏍�(闄恥View鍐呯疆鍥炬爣)鎴栧浘鐗囧湴鍧� + * @property {Object} left-icon-style 宸︿晶鍥炬爣鐨勬牱寮忥紝瀵硅薄褰㈠紡 + * @property {Object} right-icon-style 鍙充晶鍥炬爣鐨勬牱寮忥紝瀵硅薄褰㈠紡 + * @property {Boolean} required 鏄惁鏄剧ず宸﹁竟鐨�"*"鍙凤紝杩欓噷浠呰捣灞曠ず浣滅敤锛屽闇�鏍¢獙蹇呭~锛岃閫氳繃rules閰嶇疆蹇呭~瑙勫垯(榛樿false) + * @example <u-form-item label="濮撳悕"><u-input v-model="form.name" /></u-form-item> + */ + + export default { + name: 'u-form-item', + mixins: [Emitter], + inject: { + uForm: { + default () { + return null + } + } + }, + props: { + // input鐨刲abel鎻愮ず璇� + label: { + type: String, + default: '' + }, + // 缁戝畾鐨勫�� + prop: { + type: String, + default: '' + }, + // 鏄惁鏄剧ず琛ㄥ崟鍩熺殑涓嬪垝绾胯竟妗� + borderBottom: { + type: [String, Boolean], + default: '' + }, + // label鐨勪綅缃紝left-宸﹁竟锛宼op-涓婅竟 + labelPosition: { + type: String, + default: '' + }, + // label鐨勫搴︼紝鍗曚綅rpx + labelWidth: { + type: [String, Number], + default: '' + }, + // lable鐨勬牱寮忥紝瀵硅薄褰㈠紡 + labelStyle: { + type: Object, + default () { + return {} + } + }, + // lable瀛椾綋鐨勫榻愭柟寮� + labelAlign: { + type: String, + default: '' + }, + // 鍙充晶鍥炬爣 + rightIcon: { + type: String, + default: '' + }, + // 宸︿晶鍥炬爣 + leftIcon: { + type: String, + default: '' + }, + // 宸︿晶鍥炬爣鐨勬牱寮� + leftIconStyle: { + type: Object, + default () { + return {} + } + }, + // 宸︿晶鍥炬爣鐨勬牱寮� + rightIconStyle: { + type: Object, + default () { + return {} + } + }, + // 鏄惁鏄剧ず宸﹁竟鐨勫繀濉槦鍙凤紝鍙綔鏄剧ず鐢紝鍏蜂綋鏍¢獙蹇呭~鐨勯�昏緫锛岃鍦╮ules涓厤缃� + required: { + type: Boolean, + default: false + } + }, + data() { + return { + initialValue: '', // 瀛樺偍鐨勯粯璁ゅ�� + // isRequired: false, // 鏄惁蹇呭~锛岀敱浜庝汉鎬у寲鑰冭檻锛屽繀濉�"*"鍙烽�氳繃props鐨剅equired閰嶇疆锛屼笉鍐嶉�氳繃rules鐨勮鍒欒嚜鍔ㄧ敓鎴� + validateState: '', // 鏄惁鏍¢獙鎴愬姛 + validateMessage: '', // 鏍¢獙澶辫触鐨勬彁绀鸿 + // 鏈夐敊璇椂鐨勬彁绀烘柟寮忥紝message-鎻愮ず淇℃伅锛宐order-濡傛灉input璁剧疆浜嗚竟妗嗭紝鍙樻垚鍛堢孩鑹诧紝 + errorType: ['message'], + fieldValue: '', // 鑾峰彇褰撳墠瀛愮粍浠秈nput鐨勮緭鍏ョ殑鍊� + // 鐖剁粍浠剁殑鍙傛暟锛屽湪computed璁$畻涓紝鏃犳硶寰楃煡this.parent鍙戠敓鍙樺寲锛屾晠灏嗙埗缁勪欢鐨勫弬鏁板�硷紝鏀惧埌data涓� + parentData: { + borderBottom: true, + labelWidth: 90, + labelPosition: 'left', + labelStyle: {}, + labelAlign: 'left', + } + }; + }, + watch: { + validateState(val) { + this.broadcastInputError(); + }, + // 鐩戝惉u-form缁勪欢鐨別rrorType鐨勫彉鍖� + "uForm.errorType"(val) { + this.errorType = val; + this.broadcastInputError(); + }, + }, + computed: { + // 璁$畻鍚庣殑label瀹藉害锛岀敱浜庨渶瑕佸涓垽鏂紝鏁呮斁鍒癱omputed涓� + uLabelWidth() { + // 濡傛灉鐢ㄦ埛璁剧疆label涓虹┖瀛楃涓�(寰俊灏忕▼搴忕┖瀛楃涓叉渶缁堜細鍙樻垚瀛楃涓茬殑'true')锛屾剰鍛崇潃瑕佸皢label鐨勪綅缃搴﹁缃负auto + return this.elLabelPosition == 'left' ? (this.label === 'true' || this.label === '' ? 'auto' : this.$u.addUnit(this + .elLabelWidth)) : '100%'; + }, + showError() { + return type => { + // 濡傛灉errorType鏁扮粍涓惈鏈塶one锛屾垨鑰卼oast鎻愮ず绫诲瀷 + if (this.errorType.indexOf('none') >= 0) return false; + else if (this.errorType.indexOf(type) >= 0) return true; + else return false; + } + }, + // label鐨勫搴� + elLabelWidth() { + // label榛樿瀹藉害涓�90锛屼紭鍏堜娇鐢ㄦ湰缁勪欢鐨勫�硷紝濡傛灉娌℃湁(濡傛灉璁剧疆涓�0锛屼篃绠楁槸閰嶇疆浜嗗�硷紝渚濈劧璧锋晥)锛屽垯鐢╱-form鐨勫�� + return (this.labelWidth != 0 || this.labelWidth != '') ? this.labelWidth : (this.parentData.labelWidth ? this.parentData + .labelWidth : + 90); + }, + // label鐨勬牱寮� + elLabelStyle() { + return Object.keys(this.labelStyle).length ? this.labelStyle : (this.parentData.labelStyle ? this.parentData.labelStyle : + {}); + }, + // label鐨勪綅缃紝宸︿晶鎴栬�呬笂鏂� + elLabelPosition() { + return this.labelPosition ? this.labelPosition : (this.parentData.labelPosition ? this.parentData.labelPosition : + 'left'); + }, + // label鐨勫榻愭柟寮� + elLabelAlign() { + return this.labelAlign ? this.labelAlign : (this.parentData.labelAlign ? this.parentData.labelAlign : 'left'); + }, + // label鐨勪笅鍒掔嚎 + elBorderBottom() { + // 瀛愮粍浠剁殑borderBottom榛樿涓虹┖瀛楃涓诧紝濡傛灉涓嶇瓑浜庣┖瀛楃涓诧紝鎰忓懗鐫�瀛愮粍浠惰缃簡鍊硷紝浼樺厛浣跨敤瀛愮粍浠剁殑鍊� + return this.borderBottom !== '' ? this.borderBottom : this.parentData.borderBottom ? this.parentData.borderBottom : + true; + } + }, + methods: { + broadcastInputError() { + // 瀛愮粍浠跺彂鍑轰簨浠讹紝绗笁涓弬鏁颁负true鎴栬�協alse锛宼rue浠h〃鏈夐敊璇� + this.broadcast('u-input', 'on-form-item-error', this.validateState === 'error' && this.showError('border')); + }, + // 鍒ゆ柇鏄惁闇�瑕乺equired鏍¢獙 + setRules() { + let that = this; + // 鐢变簬浜烘�у寲鑰冭檻锛屽繀濉�"*"鍙烽�氳繃props鐨剅equired閰嶇疆锛屼笉鍐嶉�氳繃rules鐨勮鍒欒嚜鍔ㄧ敓鎴� + // 浠庣埗缁勪欢u-form鎷垮埌褰撳墠u-form-item闇�瑕侀獙璇� 鐨勮鍒� + // let rules = this.getRules(); + // if (rules.length) { + // this.isRequired = rules.some(rule => { + // // 濡傛灉鏈夊繀濉」锛屽氨杩斿洖锛屾病鏈夌殑璇濓紝灏辨槸undefined + // return rule.required; + // }); + // } + + // blur浜嬩欢 + this.$on('on-form-blur', that.onFieldBlur); + // change浜嬩欢 + this.$on('on-form-change', that.onFieldChange); + }, + + // 浠巙-form鐨剅ules灞炴�т腑锛屽彇鍑哄綋鍓島-form-item鐨勬牎楠岃鍒� + getRules() { + // 鐖剁粍浠剁殑鎵�鏈夎鍒� + let rules = this.parent.rules; + rules = rules ? rules[this.prop] : []; + // 淇濊瘉杩斿洖鐨勬槸涓�涓暟缁勫舰寮� + return [].concat(rules || []); + }, + + // blur浜嬩欢鏃惰繘琛岃〃鍗曟牎楠� + onFieldBlur() { + this.validation('blur'); + }, + + // change浜嬩欢杩涜琛ㄥ崟鏍¢獙 + onFieldChange() { + this.validation('change'); + }, + + // 杩囨护鍑虹鍚堣姹傜殑rule瑙勫垯 + getFilteredRule(triggerType = '') { + let rules = this.getRules(); + // 鏁翠綋楠岃瘉琛ㄥ崟鏃讹紝triggerType涓虹┖瀛楃涓诧紝姝ゆ椂杩斿洖鎵�鏈夎鍒欒繘琛岄獙璇� + if (!triggerType) return rules; + // 鍘嗛亶鍒ゆ柇瑙勫垯鏄惁鏈夊搴旂殑浜嬩欢锛屾瘮濡俠lur锛宑hange瑙﹀彂绛夌殑浜嬩欢 + // 浣跨敤indexOf鍒ゆ柇锛屾槸鍥犱负鏌愪簺鏃跺�欒缃殑楠岃瘉瑙勫垯鐨則rigger灞炴�у彲鑳戒负澶氫釜锛屾瘮濡俒'blur','change'] + // 鏌愪簺鍦烘櫙鍙兘鐨勫垽鏂鍒欙紝鍙兘涓嶅瓨鍦╰rigger灞炴�э紝鏁呭厛鍒ゆ柇鏄惁瀛樺湪姝ゅ睘鎬� + return rules.filter(res => res.trigger && res.trigger.indexOf(triggerType) !== -1); + }, + + // 鏍¢獙鏁版嵁 + validation(trigger, callback = () => {}) { + // 妫�楠屼箣闂达紝鍏堣幏鍙栭渶瑕佹牎楠岀殑鍊� + this.fieldValue = this.parent.model[this.prop]; + // blur鍜宑hange鏄惁鏈夊綋鍓嶆柟寮忕殑鏍¢獙瑙勫垯 + let rules = this.getFilteredRule(trigger); + // 鍒ゆ柇鏄惁鏈夐獙璇佽鍒欙紝濡傛灉娌℃湁瑙勫垯锛屼篃璋冪敤鍥炶皟鏂规硶锛屽惁鍒欑埗缁勪欢u-form浼氬洜涓� + // 瀵筩ount鍙橀噺鐨勭粺璁¢敊璇�屾棤娉曡繘鍏ヤ笂涓�灞傜殑鍥炶皟 + if (!rules || rules.length === 0) { + return callback(''); + } + // 璁剧疆褰撳墠鐨勮濉紝鏍囪瘑涓烘牎楠屼腑 + this.validateState = 'validating'; + // 璋冪敤async-validator鐨勬柟娉� + let validator = new schema({ + [this.prop]: rules + }); + validator.validate({ + [this.prop]: this.fieldValue + }, { + firstFields: true + }, (errors, fields) => { + // 璁板綍鐘舵�佸拰鎶ラ敊淇℃伅 + this.validateState = !errors ? 'success' : 'error'; + this.validateMessage = errors ? errors[0].message : ''; + // 璋冪敤鍥炶皟鏂规硶 + callback(this.validateMessage); + }); + }, + + // 娓呯┖褰撳墠鐨剈-form-item + resetField() { + this.parent.model[this.prop] = this.initialValue; + // 璁剧疆涓篳success`鐘舵�侊紝鍙槸涓轰簡娓呯┖閿欒鏍囪 + this.validateState = 'success'; + } + }, + + // 缁勪欢鍒涘缓瀹屾垚鏃讹紝灏嗗綋鍓嶅疄渚嬩繚瀛樺埌u-form涓� + mounted() { + // 鏀粯瀹濄�佸ご鏉″皬绋嬪簭涓嶆敮鎸乸rovide/inject锛屾墍浠ヤ娇鐢ㄨ繖涓柟娉曡幏鍙栨暣涓埗缁勪欢锛屽湪created瀹氫箟锛岄伩鍏嶅惊鐜簲鐢� + this.parent = this.$u.$parent.call(this, 'u-form'); + if (this.parent) { + // 鍘嗛亶parentData涓殑灞炴�э紝灏唒arent涓殑鍚屽悕灞炴�ц祴鍊肩粰parentData + Object.keys(this.parentData).map(key => { + this.parentData[key] = this.parent[key]; + }); + // 濡傛灉娌℃湁浼犲叆prop锛屾垨鑰卽Form涓虹┖(濡傛灉u-form-input鍗曠嫭浣跨敤锛屽氨涓嶄細鏈塽Form娉ㄥ叆)锛屽氨涓嶈繘琛屾牎楠� + if (this.prop) { + // 灏嗘湰瀹炰緥娣诲姞鍒扮埗缁勪欢涓� + this.parent.fields.push(this); + this.errorType = this.parent.errorType; + // 璁剧疆鍒濆鍊� + this.initialValue = this.fieldValue; + // 娣诲姞琛ㄥ崟鏍¢獙锛岃繖閲屽繀椤昏鍐欏湪$nextTick涓紝鍥犱负u-form鐨剅ules鏄�氳繃ref鎵嬪姩浼犲叆鐨� + // 涓嶅湪$nextTick涓殑璇濓紝鍙兘浼氶�犳垚鎵ц姝ゅ浠g爜鏃讹紝鐖剁粍浠惰繕娌¢�氳繃ref鎶婅鍒欑粰u-form锛屽鑷磋鍒欎负绌� + this.$nextTick(() => { + this.setRules(); + }) + } + } + }, + + // 缁勪欢閿�姣佸墠锛屽皢瀹炰緥浠巙-form鐨勭紦瀛樹腑绉婚櫎 + beforeDestroy() { + // 濡傛灉褰撳墠娌℃湁prop鐨勮瘽琛ㄧず褰撳墠涓嶈杩涜鍒犻櫎锛堝洜涓烘病鏈夋敞鍏ワ級 + if (this.parent && this.prop) { + this.parent.fields.map((item, index) => { + if (item === this) this.parent.fields.splice(index, 1); + }) + } + }, + }; +</script> + +<style lang="scss" scoped> + @import "../../libs/css/style.components.scss"; + + .u-form-item { + @include vue-flex; + // align-items: flex-start; + padding: 20rpx 0; + font-size: 28rpx; + color: $u-main-color; + box-sizing: border-box; + line-height: $u-form-item-height; + flex-direction: column; + + &__border-bottom--error:after { + border-color: $u-type-error; + } + + &__body { + @include vue-flex; + } + + &--left { + @include vue-flex; + align-items: center; + + &__content { + position: relative; + @include vue-flex; + align-items: center; + padding-right: 10rpx; + flex: 1; + + &__icon { + margin-right: 8rpx; + } + + &--required { + position: absolute; + left: -16rpx; + vertical-align: middle; + color: $u-type-error; + padding-top: 6rpx; + } + + &__label { + @include vue-flex; + align-items: center; + flex: 1; + } + } + } + + &--right { + flex: 1; + + &__content { + @include vue-flex; + align-items: center; + flex: 1; + + &__slot { + flex: 1; + /* #ifndef MP */ + @include vue-flex; + align-items: center; + /* #endif */ + } + + &__icon { + margin-left: 10rpx; + color: $u-light-color; + font-size: 30rpx; + } + } + } + + &__message { + font-size: 24rpx; + line-height: 24rpx; + color: $u-type-error; + margin-top: 12rpx; + } + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-form/u-form.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-form/u-form.vue" new file mode 100644 index 0000000..bdbafaf --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-form/u-form.vue" @@ -0,0 +1,134 @@ +<template> + <view class="u-form"><slot /></view> +</template> + +<script> + /** + * form 琛ㄥ崟 + * @description 姝ょ粍浠朵竴鑸敤浜庤〃鍗曞満鏅紝鍙互閰嶇疆Input杈撳叆妗嗭紝Select寮瑰嚭妗嗭紝杩涜琛ㄥ崟楠岃瘉绛夈�� + * @tutorial http://uviewui.com/components/form.html + * @property {Object} model 琛ㄥ崟鏁版嵁瀵硅薄 + * @property {Boolean} border-bottom 鏄惁鏄剧ず琛ㄥ崟鍩熺殑涓嬪垝绾胯竟妗� + * @property {String} label-position 琛ㄥ崟鍩熸彁绀烘枃瀛楃殑浣嶇疆锛宭eft-宸︿晶锛宼op-涓婃柟 + * @property {String Number} label-width 鎻愮ず鏂囧瓧鐨勫搴︼紝鍗曚綅rpx锛堥粯璁�90锛� + * @property {Object} label-style lable鐨勬牱寮忥紝瀵硅薄褰㈠紡 + * @property {String} label-align lable鐨勫榻愭柟寮� + * @property {Object} rules 閫氳繃ref璁剧疆锛岃瀹樼綉璇存槑 + * @property {Array} error-type 閿欒鐨勬彁绀烘柟寮忥紝鏁扮粍褰㈠紡锛岃涓婃柟璇存槑(榛樿['message']) + * @example <u-form :model="form" ref="uForm"></u-form> + */ + +export default { + name: 'u-form', + props: { + // 褰撳墠form鐨勯渶瑕侀獙璇佸瓧娈电殑闆嗗悎 + model: { + type: Object, + default() { + return {}; + } + }, + // 楠岃瘉瑙勫垯 + // rules: { + // type: [Object, Function, Array], + // default() { + // return {}; + // } + // }, + // 鏈夐敊璇椂鐨勬彁绀烘柟寮忥紝message-鎻愮ず淇℃伅锛宐order-濡傛灉input璁剧疆浜嗚竟妗嗭紝鍙樻垚鍛堢孩鑹诧紝 + // border-bottom-涓嬭竟妗嗗憟鐜扮孩鑹诧紝none-鏃犳彁绀� + errorType: { + type: Array, + default() { + return ['message', 'toast'] + } + }, + // 鏄惁鏄剧ず琛ㄥ崟鍩熺殑涓嬪垝绾胯竟妗� + borderBottom: { + type: Boolean, + default: true + }, + // label鐨勪綅缃紝left-宸﹁竟锛宼op-涓婅竟 + labelPosition: { + type: String, + default: 'left' + }, + // label鐨勫搴︼紝鍗曚綅rpx + labelWidth: { + type: [String, Number], + default: 90 + }, + // lable瀛椾綋鐨勫榻愭柟寮� + labelAlign: { + type: String, + default: 'left' + }, + // lable鐨勬牱寮忥紝瀵硅薄褰㈠紡 + labelStyle: { + type: Object, + default() { + return {} + } + }, + }, + provide() { + return { + uForm: this + }; + }, + data() { + return { + rules: {} + }; + }, + created() { + // 瀛樺偍褰撳墠form涓嬬殑鎵�鏈塽-form-item鐨勫疄渚� + // 涓嶈兘瀹氫箟鍦╠ata涓紝鍚﹀垯寰俊灏忕▼搴忎細閫犳垚寰幆寮曠敤鑰屾姤閿� + this.fields = []; + }, + methods: { + setRules(rules) { + this.rules = rules; + }, + // 娓呯┖鎵�鏈塽-form-item缁勪欢鐨勫唴瀹癸紝鏈川涓婃槸璋冪敤浜唘-form-item缁勪欢涓殑resetField()鏂规硶 + resetFields() { + this.fields.map(field => { + field.resetField(); + }); + }, + // 鏍¢獙鍏ㄩ儴鏁版嵁 + validate(callback) { + return new Promise(resolve => { + // 瀵规墍鏈夌殑u-form-item杩涜鏍¢獙 + let valid = true; // 榛樿閫氳繃 + let count = 0; // 鐢ㄤ簬鏍囪鏄惁妫�鏌ュ畬姣� + let errorArr = []; // 瀛樻斁閿欒淇℃伅 + this.fields.map(field => { + // 璋冪敤姣忎竴涓猽-form-item瀹炰緥鐨剉alidation鐨勬牎楠屾柟娉� + field.validation('', error => { + // 濡傛灉浠绘剰涓�涓猽-form-item鏍¢獙涓嶉�氳繃锛屽氨鎰忓懗鐫�鏁翠釜琛ㄥ崟涓嶉�氳繃 + if (error) { + valid = false; + errorArr.push(error); + } + // 褰撳巻閬嶄簡鎵�鏈夌殑u-form-item鏃讹紝璋冪敤promise鐨則hen鏂规硶 + if (++count === this.fields.length) { + resolve(valid); // 杩涘叆promise鐨則hen鏂规硶 + // 鍒ゆ柇鏄惁璁剧疆浜唗oast鐨勬彁绀烘柟寮忥紝鍙彁绀烘渶鍓嶉潰鐨勮〃鍗曞煙鐨勭涓�涓敊璇俊鎭� + if(this.errorType.indexOf('none') === -1 && this.errorType.indexOf('toast') >= 0 && errorArr.length) { + this.$u.toast(errorArr[0]); + } + // 璋冪敤鍥炶皟鏂规硶 + if (typeof callback == 'function') callback(valid); + } + }); + }); + }); + } + } +}; +</script> + +<style scoped lang="scss"> +@import "../../libs/css/style.components.scss"; +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-full-screen/u-full-screen.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-full-screen/u-full-screen.vue" new file mode 100644 index 0000000..4f7e7d9 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-full-screen/u-full-screen.vue" @@ -0,0 +1,52 @@ +<template> + <u-modal v-model="show" :show-cancel-button="true" confirm-text="鍗囩骇" title="鍙戠幇鏂扮増鏈�" @cancel="cancel" @confirm="confirm"> + <view class="u-update-content"> + <rich-text :nodes="content"></rich-text> + </view> + </u-modal> +</template> + +<script> + export default { + data() { + return { + show: false, + content: ` + 1. 淇badge缁勪欢鐨剆ize鍙傛暟鏃犳晥闂<br> + 2. 鏂板Modal妯℃�佹缁勪欢<br> + 3. 鏂板鍘嬬獥灞忕粍浠讹紝鍙互鍦ˋPP涓婁互寮圭獥鐨勫舰寮忛伄鐩栧鑸爮鍜屽簳閮╰abbar<br> + 4. 淇閿洏缁勪欢鍦ㄥ井淇″皬绋嬪簭涓婇伄缃╂棤鏁堢殑闂 + `, + } + }, + onReady() { + this.show = true; + }, + methods: { + cancel() { + this.closeModal(); + }, + confirm() { + this.closeModal(); + }, + closeModal() { + uni.navigateBack(); + } + } + } +</script> + +<style scoped lang="scss"> + @import "../../libs/css/style.components.scss"; + + .u-full-content { + background-color: #00C777; + } + + .u-update-content { + font-size: 26rpx; + color: $u-content-color; + line-height: 1.7; + padding: 30rpx; + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-gap/u-gap.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-gap/u-gap.vue" new file mode 100644 index 0000000..6c01f94 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-gap/u-gap.vue" @@ -0,0 +1,54 @@ +<template> + <view class="u-gap" :style="[gapStyle]"></view> +</template> + +<script> +/** + * gap 闂撮殧妲� + * @description 璇ョ粍浠朵竴鑸敤浜庡唴瀹瑰潡涔嬮棿鐨勭敤涓�涓伆鑹插潡闅斿紑鐨勫満鏅紝鏂逛究鐢ㄦ埛椋庢牸缁熶竴锛屽噺灏戝伐浣滈噺 + * @tutorial https://www.uviewui.com/components/gap.html + * @property {String} bg-color 鑳屾櫙棰滆壊锛堥粯璁�#f3f4f6锛� + * @property {String Number} height 鍒嗗壊妲介珮搴︼紝鍗曚綅rpx锛堥粯璁�30锛� + * @property {String Number} margin-top 涓庡墠涓�涓粍浠剁殑璺濈锛屽崟浣峳px锛堥粯璁�0锛� + * @property {String Number} margin-bottom 涓庡悗涓�涓粍浠剁殑璺濈锛屽崟浣峳px锛�0锛� + * @example <u-gap height="80" bg-color="#bbb"></u-gap> + */ +export default { + name: "u-gap", + props: { + bgColor: { + type: String, + default: 'transparent ' // 鑳屾櫙閫忔槑 + }, + // 楂樺害 + height: { + type: [String, Number], + default: 30 + }, + // 涓庝笂涓�涓粍浠剁殑璺濈 + marginTop: { + type: [String, Number], + default: 0 + }, + // 涓庝笅涓�涓粍浠剁殑璺濈 + marginBottom: { + type: [String, Number], + default: 0 + }, + }, + computed: { + gapStyle() { + return { + backgroundColor: this.bgColor, + height: this.height + 'rpx', + marginTop: this.marginTop + 'rpx', + marginBottom: this.marginBottom + 'rpx' + }; + } + } +}; +</script> + +<style lang="scss" scoped> + @import "../../libs/css/style.components.scss"; +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-grid-item/u-grid-item.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-grid-item/u-grid-item.vue" new file mode 100644 index 0000000..0773307 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-grid-item/u-grid-item.vue" @@ -0,0 +1,126 @@ +<template> + <view class="u-grid-item" :hover-class="parentData.hoverClass" + :hover-stay-time="200" @tap="click" :style="{ + background: bgColor, + width: width, + }"> + <view class="u-grid-item-box" :style="[customStyle]" :class="[parentData.border ? 'u-border-right u-border-bottom' : '']"> + <slot /> + </view> + </view> +</template> + +<script> + /** + * gridItem 鎻愮ず + * @description 瀹牸缁勪欢涓�鑸敤浜庡悓鏃跺睍绀哄涓悓绫婚」鐩殑鍦烘櫙锛屽彲浠ョ粰瀹牸鐨勯」鐩缃窘鏍囩粍浠�(badge)锛屾垨鑰呭浘鏍囩瓑锛屼篃鍙互鎵╁睍涓哄乏鍙虫粦鍔ㄧ殑杞挱褰㈠紡銆傛惌閰島-grid浣跨敤 + * @tutorial https://www.uviewui.com/components/grid.html + * @property {String} bg-color 瀹牸鐨勮儗鏅鑹诧紙榛樿#ffffff锛� + * @property {String Number} index 鐐瑰嚮瀹牸鏃讹紝杩斿洖鐨勫�� + * @property {Object} custom-style 鑷畾涔夋牱寮忥紝瀵硅薄褰㈠紡 + * @event {Function} click 鐐瑰嚮瀹牸瑙﹀彂 + * @example <u-grid-item></u-grid-item> + */ + export default { + name: "u-grid-item", + props: { + // 鑳屾櫙棰滆壊 + bgColor: { + type: String, + default: '#ffffff' + }, + // 鐐瑰嚮鏃惰繑鍥炵殑index + index: { + type: [Number, String], + default: '' + }, + // 鑷畾涔夋牱寮忥紝瀵硅薄褰㈠紡 + customStyle: { + type: Object, + default() { + return { + padding: '30rpx 0' + } + } + } + }, + data() { + return { + parentData: { + hoverClass: '', // 鎸変笅鍘荤殑鏃跺�欙紝鏄惁鏄剧ず鑳屾櫙鐏拌壊 + col: 3, // 鐖剁粍浠跺垝鍒嗙殑瀹牸鏁� + border: true, // 鏄惁鏄剧ず杈规锛屾牴鎹埗缁勪欢鍐冲畾 + } + }; + }, + created() { + // 鐖剁粍浠剁殑瀹炰緥 + this.updateParentData(); + // this.parent鍦╱pdateParentData()涓畾涔� + this.parent.children.push(this); + }, + computed: { + // 姣忎釜grid-item鐨勫搴� + width() { + return 100 / Number(this.parentData.col) + '%'; + }, + }, + methods: { + // 鑾峰彇鐖剁粍浠剁殑鍙傛暟 + updateParentData() { + // 姝ゆ柟娉曞啓鍦╩ixin涓� + this.getParentData('u-grid'); + }, + click() { + this.$emit('click', this.index); + this.parent && this.parent.click(this.index); + } + } + }; +</script> + +<style scoped lang="scss"> + @import "../../libs/css/style.components.scss"; + + .u-grid-item { + box-sizing: border-box; + background: #fff; + @include vue-flex; + align-items: center; + justify-content: center; + position: relative; + flex-direction: column; + + /* #ifdef MP */ + position: relative; + float: left; + /* #endif */ + } + + .u-grid-item-hover { + background: #f7f7f7 !important; + } + + .u-grid-marker-box { + position: absolute; + /* #ifndef APP-NVUE */ + display: inline-flex; + /* #endif */ + line-height: 0; + } + + .u-grid-marker-wrap { + position: absolute; + } + + .u-grid-item-box { + padding: 30rpx 0; + @include vue-flex; + align-items: center; + justify-content: center; + flex-direction: column; + flex: 1; + width: 100%; + height: 100%; + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-grid/u-grid.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-grid/u-grid.vue" new file mode 100644 index 0000000..6588c06 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-grid/u-grid.vue" @@ -0,0 +1,108 @@ +<template> + <view class="u-grid" :class="{'u-border-top u-border-left': border}" :style="[gridStyle]"><slot /></view> +</template> + +<script> +/** + * grid 瀹牸甯冨眬 + * @description 瀹牸缁勪欢涓�鑸敤浜庡悓鏃跺睍绀哄涓悓绫婚」鐩殑鍦烘櫙锛屽彲浠ョ粰瀹牸鐨勯」鐩缃窘鏍囩粍浠�(badge)锛屾垨鑰呭浘鏍囩瓑锛屼篃鍙互鎵╁睍涓哄乏鍙虫粦鍔ㄧ殑杞挱褰㈠紡銆� + * @tutorial https://www.uviewui.com/components/grid.html + * @property {String Number} col 瀹牸鐨勫垪鏁帮紙榛樿3锛� + * @property {Boolean} border 鏄惁鏄剧ず瀹牸鐨勮竟妗嗭紙榛樿true锛� + * @property {Boolean} hover-class 鐐瑰嚮瀹牸鐨勬椂鍊欙紝鏄惁鏄剧ず鎸変笅鐨勭伆鑹茶儗鏅紙榛樿false锛� + * @event {Function} click 鐐瑰嚮瀹牸瑙﹀彂 + * @example <u-grid :col="3" @click="click"></u-grid> + */ +export default { + name: 'u-grid', + props: { + // 鍒嗘垚鍑犲垪 + col: { + type: [Number, String], + default: 3 + }, + // 鏄惁鏄剧ず杈规 + border: { + type: Boolean, + default: true + }, + // 瀹牸瀵归綈鏂瑰紡锛岃〃鐜颁负鏁伴噺灏戠殑鏃跺�欙紝闈犲乏锛屽眳涓紝杩樻槸闈犲彸 + align: { + type: String, + default: 'left' + }, + // 瀹牸鎸夊帇鏃剁殑鏍峰紡绫伙紝"none"涓烘棤鏁堟灉 + hoverClass: { + type: String, + default: 'u-hover-class' + } + }, + data() { + return { + index: 0, + } + }, + watch: { + // 褰撶埗缁勪欢闇�瑕佸瓙缁勪欢闇�瑕佸叡浜殑鍙傛暟鍙戠敓浜嗗彉鍖栵紝鎵嬪姩閫氱煡瀛愮粍浠� + parentData() { + if(this.children.length) { + this.children.map(child => { + // 鍒ゆ柇瀛愮粍浠�(u-radio)濡傛灉鏈塽pdateParentData鏂规硶鐨勮瘽锛屽氨灏辨墽琛�(鎵ц鐨勭粨鏋滄槸瀛愮粍浠堕噸鏂颁粠鐖剁粍浠舵媺鍙栦簡鏈�鏂扮殑鍊�) + typeof(child.updateParentData) == 'function' && child.updateParentData(); + }) + } + }, + }, + created() { + // 濡傛灉灏哻hildren瀹氫箟鍦╠ata涓紝鍦ㄥ井淇″皬绋嬪簭浼氶�犳垚寰幆寮曠敤鑰屾姤閿� + this.children = []; + }, + computed: { + // 璁$畻鐖剁粍浠剁殑鍊兼槸鍚﹀彂鐢熷彉鍖� + parentData() { + return [this.hoverClass, this.col, this.size, this.border]; + }, + // 瀹牸瀵归綈鏂瑰紡 + gridStyle() { + let style = {}; + switch(this.align) { + case 'left': + style.justifyContent = 'flex-start'; + break; + case 'center': + style.justifyContent = 'center'; + break; + case 'right': + style.justifyContent = 'flex-end'; + break; + default: style.justifyContent = 'flex-start'; + }; + return style; + } + }, + methods: { + click(index) { + this.$emit('click', index); + } + } +}; +</script> + +<style scoped lang="scss"> +@import "../../libs/css/style.components.scss"; + +.u-grid { + width: 100%; + /* #ifdef MP */ + position: relative; + box-sizing: border-box; + overflow: hidden; + /* #endif */ + + /* #ifndef MP */ + @include vue-flex; + flex-wrap: wrap; + align-items: center; + /* #endif */ +} +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-icon/u-icon.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-icon/u-icon.vue" new file mode 100644 index 0000000..db1b019 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-icon/u-icon.vue" @@ -0,0 +1,336 @@ +<template> + <view :style="[customStyle]" class="u-icon" @tap="click" :class="['u-icon--' + labelPos]"> + <image class="u-icon__img" v-if="isImg" :src="name" :mode="imgMode" :style="[imgStyle]"></image> + <text v-else class="u-icon__icon" :class="customClass" :style="[iconStyle]" :hover-class="hoverClass" + @touchstart="touchstart"> + <text v-if="showDecimalIcon" :style="[decimalIconStyle]" :class="decimalIconClass" :hover-class="hoverClass" + class="u-icon__decimal"> + </text> + </text> + <!-- 杩欓噷杩涜绌哄瓧绗︿覆鍒ゆ柇锛屽鏋滀粎浠呮槸v-if="label"锛屽彲鑳戒細鍑虹幇浼犻��0鐨勬椂鍊欙紝缁撴灉涔熸棤娉曟樉绀� --> + <text v-if="label !== ''" class="u-icon__label" :style="{ + color: labelColor, + fontSize: $u.addUnit(labelSize), + marginLeft: labelPos == 'right' ? $u.addUnit(marginLeft) : 0, + marginTop: labelPos == 'bottom' ? $u.addUnit(marginTop) : 0, + marginRight: labelPos == 'left' ? $u.addUnit(marginRight) : 0, + marginBottom: labelPos == 'top' ? $u.addUnit(marginBottom) : 0, + }">{{ label }} + </text> + </view> +</template> + +<script> +/** + * icon 鍥炬爣 + * @description 鍩轰簬瀛椾綋鐨勫浘鏍囬泦锛屽寘鍚簡澶у鏁板父瑙佸満鏅殑鍥炬爣銆� + * @tutorial https://www.uviewui.com/components/icon.html + * @property {String} name 鍥炬爣鍚嶇О锛岃绀轰緥鍥炬爣闆� + * @property {String} color 鍥炬爣棰滆壊锛堥粯璁nherit锛� + * @property {String | Number} size 鍥炬爣瀛椾綋澶у皬锛屽崟浣峳px锛堥粯璁�32锛� + * @property {String | Number} label-size label瀛椾綋澶у皬锛屽崟浣峳px锛堥粯璁�28锛� + * @property {String} label 鍥炬爣鍙充晶鐨刲abel鏂囧瓧锛堥粯璁�28锛� + * @property {String} label-pos label鏂囧瓧鐩稿浜庡浘鏍囩殑浣嶇疆锛屽彧鑳絩ight鎴朾ottom锛堥粯璁ight锛� + * @property {String} label-color label瀛椾綋棰滆壊锛堥粯璁�#606266锛� + * @property {Object} custom-style icon鐨勬牱寮忥紝瀵硅薄褰㈠紡 + * @property {String} custom-prefix 鑷畾涔夊瓧浣撳浘鏍囧簱鏃讹紝闇�瑕佸啓涓婃鍊� + * @property {String | Number} margin-left label鍦ㄥ彸渚ф椂涓庡浘鏍囩殑璺濈锛屽崟浣峳px锛堥粯璁�6锛� + * @property {String | Number} margin-top label鍦ㄤ笅鏂规椂涓庡浘鏍囩殑璺濈锛屽崟浣峳px锛堥粯璁�6锛� + * @property {String | Number} margin-bottom label鍦ㄤ笂鏂规椂涓庡浘鏍囩殑璺濈锛屽崟浣峳px锛堥粯璁�6锛� + * @property {String | Number} margin-right label鍦ㄥ乏渚ф椂涓庡浘鏍囩殑璺濈锛屽崟浣峳px锛堥粯璁�6锛� + * @property {String} label-pos label鐩稿浜庡浘鏍囩殑浣嶇疆锛屽彧鑳絩ight鎴朾ottom锛堥粯璁ight锛� + * @property {String} index 涓�涓敤浜庡尯鍒嗗涓浘鏍囩殑鍊硷紝鐐瑰嚮鍥炬爣鏃堕�氳繃click浜嬩欢浼犲嚭 + * @property {String} hover-class 鍥炬爣鎸変笅鍘荤殑鏍峰紡绫伙紝鐢ㄦ硶鍚寀ni鐨剉iew缁勪欢鐨刪over-class鍙傛暟锛岃鎯呰瀹樼綉 + * @property {String} width 鏄剧ず鍥剧墖灏忓浘鏍囨椂鐨勫搴� + * @property {String} height 鏄剧ず鍥剧墖灏忓浘鏍囨椂鐨勯珮搴� + * @property {String} top 鍥炬爣鍦ㄥ瀭鐩存柟鍚戜笂鐨勫畾浣� + * @property {String} top 鍥炬爣鍦ㄥ瀭鐩存柟鍚戜笂鐨勫畾浣� + * @property {String} top 鍥炬爣鍦ㄥ瀭鐩存柟鍚戜笂鐨勫畾浣� + * @property {Boolean} show-decimal-icon 鏄惁涓篋ecimalIcon + * @property {String} inactive-color 鑳屾櫙棰滆壊锛屽彲鎺ュ彈涓婚鑹诧紝浠匘ecimal鏃舵湁鏁� + * @property {String | Number} percent 鏄剧ず鐨勭櫨鍒嗘瘮锛屼粎Decimal鏃舵湁鏁� + * @event {Function} click 鐐瑰嚮鍥炬爣鏃惰Е鍙� + * @example <u-icon name="photo" color="#2979ff" size="28"></u-icon> + */ +export default { + name: 'u-icon', + props: { + // 鍥炬爣绫诲悕 + name: { + type: String, + default: '' + }, + // 鍥炬爣棰滆壊锛屽彲鎺ュ彈涓婚鑹� + color: { + type: String, + default: '' + }, + // 瀛椾綋澶у皬锛屽崟浣峳px + size: { + type: [Number, String], + default: 'inherit' + }, + // 鏄惁鏄剧ず绮椾綋 + bold: { + type: Boolean, + default: false + }, + // 鐐瑰嚮鍥炬爣鐨勬椂鍊欎紶閫掍簨浠跺嚭鍘荤殑index锛堢敤浜庡尯鍒嗙偣鍑讳簡鍝竴涓級 + index: { + type: [Number, String], + default: '' + }, + // 瑙︽懜鍥炬爣鏃剁殑绫诲悕 + hoverClass: { + type: String, + default: '' + }, + // 鑷畾涔夋墿灞曞墠缂�锛屾柟渚跨敤鎴锋墿灞曡嚜宸辩殑鍥炬爣搴� + customPrefix: { + type: String, + default: 'uicon' + }, + // 鍥炬爣鍙宠竟鎴栬�呬笅闈㈢殑鏂囧瓧 + label: { + type: [String, Number], + default: '' + }, + // label鐨勪綅缃紝鍙兘鍙宠竟鎴栬�呬笅杈� + labelPos: { + type: String, + default: 'right' + }, + // label鐨勫ぇ灏� + labelSize: { + type: [String, Number], + default: '28' + }, + // label鐨勯鑹� + labelColor: { + type: String, + default: '#606266' + }, + // label涓庡浘鏍囩殑璺濈(妯悜鎺掑垪) + marginLeft: { + type: [String, Number], + default: '6' + }, + // label涓庡浘鏍囩殑璺濈(绔栧悜鎺掑垪) + marginTop: { + type: [String, Number], + default: '6' + }, + // label涓庡浘鏍囩殑璺濈(绔栧悜鎺掑垪) + marginRight: { + type: [String, Number], + default: '6' + }, + // label涓庡浘鏍囩殑璺濈(绔栧悜鎺掑垪) + marginBottom: { + type: [String, Number], + default: '6' + }, + // 鍥剧墖鐨刴ode + imgMode: { + type: String, + default: 'widthFix' + }, + // 鑷畾涔夋牱寮� + customStyle: { + type: Object, + default() { + return {} + } + }, + // 鐢ㄤ簬鏄剧ず鍥剧墖灏忓浘鏍囨椂锛屽浘鐗囩殑瀹藉害 + width: { + type: [String, Number], + default: '' + }, + // 鐢ㄤ簬鏄剧ず鍥剧墖灏忓浘鏍囨椂锛屽浘鐗囩殑楂樺害 + height: { + type: [String, Number], + default: '' + }, + // 鐢ㄤ簬瑙e喅鏌愪簺鎯呭喌涓嬶紝璁╁浘鏍囧瀭鐩村眳涓殑鐢ㄩ�� + top: { + type: [String, Number], + default: 0 + }, + // 鏄惁涓篋ecimalIcon + showDecimalIcon: { + type: Boolean, + default: false + }, + // 鑳屾櫙棰滆壊锛屽彲鎺ュ彈涓婚鑹诧紝浠匘ecimal鏃舵湁鏁� + inactiveColor: { + type: String, + default: '#ececec' + }, + // 鏄剧ず鐨勭櫨鍒嗘瘮锛屼粎Decimal鏃舵湁鏁� + percent: { + type: [Number, String], + default: '50' + } + }, + computed: { + customClass() { + let classes = [] + classes.push(this.customPrefix + '-' + this.name) + // uView鐨勮嚜瀹氫箟鍥炬爣绫诲悕涓簎-iconfont + if (this.customPrefix == 'uicon') { + classes.push('u-iconfont') + } else { + classes.push(this.customPrefix) + } + // 涓婚鑹诧紝閫氳繃绫婚厤缃� + if (this.showDecimalIcon && this.inactiveColor && this.$u.config.type.includes(this.inactiveColor)) { + classes.push('u-icon__icon--' + this.inactiveColor) + } else if (this.color && this.$u.config.type.includes(this.color)) classes.push('u-icon__icon--' + this.color) + // 闃块噷锛屽ご鏉★紝鐧惧害灏忕▼搴忛�氳繃鏁扮粍缁戝畾绫诲悕鏃讹紝鏃犳硶鐩存帴浣跨敤[a, b, c]鐨勫舰寮忥紝鍚﹀垯鏃犳硶璇嗗埆 + // 鏁呴渶灏嗗叾鎷嗘垚涓�涓瓧绗︿覆鐨勫舰寮忥紝閫氳繃绌烘牸闅斿紑鍚勪釜绫诲悕 + //#ifdef MP-ALIPAY || MP-TOUTIAO || MP-BAIDU + classes = classes.join(' ') + //#endif + return classes + }, + iconStyle() { + let style = {} + style = { + fontSize: this.size == 'inherit' ? 'inherit' : this.$u.addUnit(this.size), + fontWeight: this.bold ? 'bold' : 'normal', + // 鏌愪簺鐗规畩鎯呭喌闇�瑕佽缃竴涓埌椤堕儴鐨勮窛绂伙紝鎵嶈兘鏇村ソ鐨勫瀭鐩村眳涓� + top: this.$u.addUnit(this.top) + } + // 闈炰富棰樿壊鍊兼椂锛屾墠褰撲綔棰滆壊鍊� + if (this.showDecimalIcon && this.inactiveColor && !this.$u.config.type.includes(this.inactiveColor)) { + style.color = this.inactiveColor + } else if (this.color && !this.$u.config.type.includes(this.color)) style.color = this.color + + return style + }, + // 鍒ゆ柇浼犲叆鐨刵ame灞炴�э紝鏄惁鍥剧墖璺緞锛屽彧瑕佸甫鏈�"/"鍧囪涓烘槸鍥剧墖褰㈠紡 + isImg() { + return this.name.indexOf('/') !== -1 + }, + imgStyle() { + let style = {} + // 濡傛灉璁剧疆width鍜宧eight灞炴�э紝鍒欎紭鍏堜娇鐢紝鍚﹀垯浣跨敤size灞炴�� + style.width = this.width ? this.$u.addUnit(this.width) : this.$u.addUnit(this.size) + style.height = this.height ? this.$u.addUnit(this.height) : this.$u.addUnit(this.size) + return style + }, + decimalIconStyle() { + let style = {} + style = { + fontSize: this.size == 'inherit' ? 'inherit' : this.$u.addUnit(this.size), + fontWeight: this.bold ? 'bold' : 'normal', + // 鏌愪簺鐗规畩鎯呭喌闇�瑕佽缃竴涓埌椤堕儴鐨勮窛绂伙紝鎵嶈兘鏇村ソ鐨勫瀭鐩村眳涓� + top: this.$u.addUnit(this.top), + width: this.percent + '%' + } + // 闈炰富棰樿壊鍊兼椂锛屾墠褰撲綔棰滆壊鍊� + if (this.color && !this.$u.config.type.includes(this.color)) style.color = this.color + return style + }, + decimalIconClass() { + let classes = [] + classes.push(this.customPrefix + '-' + this.name) + // uView鐨勮嚜瀹氫箟鍥炬爣绫诲悕涓簎-iconfont + if (this.customPrefix == 'uicon') { + classes.push('u-iconfont') + } else { + classes.push(this.customPrefix) + } + // 涓婚鑹诧紝閫氳繃绫婚厤缃� + if (this.color && this.$u.config.type.includes(this.color)) classes.push('u-icon__icon--' + this.color) + else classes.push('u-icon__icon--primary') + // 闃块噷锛屽ご鏉★紝鐧惧害灏忕▼搴忛�氳繃鏁扮粍缁戝畾绫诲悕鏃讹紝鏃犳硶鐩存帴浣跨敤[a, b, c]鐨勫舰寮忥紝鍚﹀垯鏃犳硶璇嗗埆 + // 鏁呴渶灏嗗叾鎷嗘垚涓�涓瓧绗︿覆鐨勫舰寮忥紝閫氳繃绌烘牸闅斿紑鍚勪釜绫诲悕 + //#ifdef MP-ALIPAY || MP-TOUTIAO || MP-BAIDU + classes = classes.join(' ') + //#endif + return classes + } + }, + methods: { + click() { + this.$emit('click', this.index) + }, + touchstart() { + this.$emit('touchstart', this.index) + } + } +} +</script> + +<style scoped lang="scss"> +@import "../../libs/css/style.components.scss"; +@import '../../iconfont.css'; + +.u-icon { + display: inline-flex; + align-items: center; + + &--left { + flex-direction: row-reverse; + align-items: center; + } + + &--right { + flex-direction: row; + align-items: center; + } + + &--top { + flex-direction: column-reverse; + justify-content: center; + } + + &--bottom { + flex-direction: column; + justify-content: center; + } + + &__icon { + position: relative; + + &--primary { + color: $u-type-primary; + } + + &--success { + color: $u-type-success; + } + + &--error { + color: $u-type-error; + } + + &--warning { + color: $u-type-warning; + } + + &--info { + color: $u-type-info; + } + } + + &__decimal { + position: absolute; + top: 0; + left: 0; + display: inline-block; + overflow: hidden; + } + + &__img { + height: auto; + will-change: transform; + } + + &__label { + line-height: 1; + } +} +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-image/u-image.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-image/u-image.vue" new file mode 100644 index 0000000..9af036f --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-image/u-image.vue" @@ -0,0 +1,266 @@ +<template> + <view class="u-image" @tap="onClick" :style="[wrapStyle, backgroundStyle]"> + <image + v-if="!isError" + :src="src" + :mode="mode" + @error="onErrorHandler" + @load="onLoadHandler" + :lazy-load="lazyLoad" + class="u-image__image" + :style="{ + borderRadius: shape == 'circle' ? '50%' : $u.addUnit(borderRadius) + }" + ></image> + <view + v-if="showLoading && loading" + class="u-image__loading" + :style="{ + borderRadius: shape == 'circle' ? '50%' : $u.addUnit(borderRadius), + backgroundColor: this.bgColor + }" + > + <slot v-if="$slots.loading" name="loading" /> + <u-icon v-else :name="loadingIcon" :width="width" :height="height"></u-icon> + </view> + <view + v-if="showError && isError && !loading" + class="u-image__error" + :style="{ + borderRadius: shape == 'circle' ? '50%' : $u.addUnit(borderRadius) + }" + > + <slot v-if="$slots.error" name="error" /> + <u-icon v-else :name="errorIcon" :width="width" :height="height"></u-icon> + </view> + </view> +</template> + +<script> +/** + * Image 鍥剧墖 + * @description 姝ょ粍浠朵负uni-app鐨刬mage缁勪欢鐨勫姞寮虹増锛屽湪缁ф壙浜嗗師鏈夊姛鑳藉锛岃繕鏀寔娣″叆鍔ㄧ敾銆佸姞杞戒腑銆佸姞杞藉け璐ユ彁绀恒�佸渾瑙掑�煎拰褰㈢姸绛夈�� + * @tutorial https://uviewui.com/components/image.html + * @property {String} src 鍥剧墖鍦板潃 + * @property {String} mode 瑁佸壀妯″紡锛岃瀹樼綉璇存槑 + * @property {String | Number} width 瀹藉害锛屽崟浣嶄换鎰忥紝濡傛灉涓烘暟鍊硷紝鍒欎负rpx鍗曚綅锛堥粯璁�100%锛� + * @property {String | Number} height 楂樺害锛屽崟浣嶄换鎰忥紝濡傛灉涓烘暟鍊硷紝鍒欎负rpx鍗曚綅锛堥粯璁� auto锛� + * @property {String} shape 鍥剧墖褰㈢姸锛宑ircle-鍦嗗舰锛宻quare-鏂瑰舰锛堥粯璁quare锛� + * @property {String | Number} border-radius 鍦嗚鍊硷紝鍗曚綅浠绘剰锛屽鏋滀负鏁板�硷紝鍒欎负rpx鍗曚綅锛堥粯璁� 0锛� + * @property {Boolean} lazy-load 鏄惁鎳掑姞杞斤紝浠呭井淇″皬绋嬪簭銆丄pp銆佺櫨搴﹀皬绋嬪簭銆佸瓧鑺傝烦鍔ㄥ皬绋嬪簭鏈夋晥锛堥粯璁� true锛� + * @property {Boolean} show-menu-by-longpress 鏄惁寮�鍚暱鎸夊浘鐗囨樉绀鸿瘑鍒皬绋嬪簭鐮佽彍鍗曪紝浠呭井淇″皬绋嬪簭鏈夋晥锛堥粯璁� false锛� + * @property {String} loading-icon 鍔犺浇涓殑鍥炬爣锛屾垨鑰呭皬鍥剧墖锛堥粯璁� photo锛� + * @property {String} error-icon 鍔犺浇澶辫触鐨勫浘鏍囷紝鎴栬�呭皬鍥剧墖锛堥粯璁� error-circle锛� + * @property {Boolean} show-loading 鏄惁鏄剧ず鍔犺浇涓殑鍥炬爣鎴栬�呰嚜瀹氫箟鐨剆lot锛堥粯璁� true锛� + * @property {Boolean} show-error 鏄惁鏄剧ず鍔犺浇閿欒鐨勫浘鏍囨垨鑰呰嚜瀹氫箟鐨剆lot锛堥粯璁� true锛� + * @property {Boolean} fade 鏄惁闇�瑕佹贰鍏ユ晥鏋滐紙榛樿 true锛� + * @property {String Number} width 浼犲叆鍥剧墖璺緞鏃跺浘鐗囩殑瀹藉害 + * @property {String Number} height 浼犲叆鍥剧墖璺緞鏃跺浘鐗囩殑楂樺害 + * @property {Boolean} webp 鍙敮鎸佺綉缁滆祫婧愶紝鍙寰俊灏忕▼搴忔湁鏁堬紙榛樿 false锛� + * @property {String | Number} duration 鎼厤fade鍙傛暟鐨勮繃娓℃椂闂达紝鍗曚綅ms锛堥粯璁� 500锛� + * @event {Function} click 鐐瑰嚮鍥剧墖鏃惰Е鍙� + * @event {Function} error 鍥剧墖鍔犺浇澶辫触鏃惰Е鍙� + * @event {Function} load 鍥剧墖鍔犺浇鎴愬姛鏃惰Е鍙� + * @example <u-image width="100%" height="300rpx" :src="src"></u-image> + */ +export default { + name: 'u-image', + props: { + // 鍥剧墖鍦板潃 + src: { + type: String, + default: '' + }, + // 瑁佸壀妯″紡 + mode: { + type: String, + default: 'aspectFill' + }, + // 瀹藉害锛屽崟浣嶄换鎰� + width: { + type: [String, Number], + default: '100%' + }, + // 楂樺害锛屽崟浣嶄换鎰� + height: { + type: [String, Number], + default: 'auto' + }, + // 鍥剧墖褰㈢姸锛宑ircle-鍦嗗舰锛宻quare-鏂瑰舰 + shape: { + type: String, + default: 'square' + }, + // 鍦嗚锛屽崟浣嶄换鎰� + borderRadius: { + type: [String, Number], + default: 0 + }, + // 鏄惁鎳掑姞杞斤紝寰俊灏忕▼搴忋�丄pp銆佺櫨搴﹀皬绋嬪簭銆佸瓧鑺傝烦鍔ㄥ皬绋嬪簭 + lazyLoad: { + type: Boolean, + default: true + }, + // 寮�鍚暱鎸夊浘鐗囨樉绀鸿瘑鍒井淇″皬绋嬪簭鐮佽彍鍗� + showMenuByLongpress: { + type: Boolean, + default: true + }, + // 鍔犺浇涓殑鍥炬爣锛屾垨鑰呭皬鍥剧墖 + loadingIcon: { + type: String, + default: 'photo' + }, + // 鍔犺浇澶辫触鐨勫浘鏍囷紝鎴栬�呭皬鍥剧墖 + errorIcon: { + type: String, + default: 'error-circle' + }, + // 鏄惁鏄剧ず鍔犺浇涓殑鍥炬爣鎴栬�呰嚜瀹氫箟鐨剆lot + showLoading: { + type: Boolean, + default: true + }, + // 鏄惁鏄剧ず鍔犺浇閿欒鐨勫浘鏍囨垨鑰呰嚜瀹氫箟鐨剆lot + showError: { + type: Boolean, + default: true + }, + // 鏄惁闇�瑕佹贰鍏ユ晥鏋� + fade: { + type: Boolean, + default: true + }, + // 鍙敮鎸佺綉缁滆祫婧愶紝鍙寰俊灏忕▼搴忔湁鏁� + webp: { + type: Boolean, + default: false + }, + // 杩囨浮鏃堕棿锛屽崟浣峬s + duration: { + type: [String, Number], + default: 500 + }, + // 鑳屾櫙棰滆壊锛岀敤浜庢繁鑹查〉闈㈠姞杞藉浘鐗囨椂锛屼负浜嗗拰鑳屾櫙鑹茶瀺鍚� + bgColor: { + type: String, + default: '#f3f4f6' + } + }, + data() { + return { + // 鍥剧墖鏄惁鍔犺浇閿欒锛屽鏋滄槸锛屽垯鏄剧ず閿欒鍗犱綅鍥� + isError: false, + // 鍒濆鍖栫粍浠舵椂锛岄粯璁や负鍔犺浇涓姸鎬� + loading: true, + // 涓嶉�忔槑搴︼紝涓轰簡瀹炵幇娣″叆娣″嚭鐨勬晥鏋� + opacity: 1, + // 杩囨浮鏃堕棿锛屽洜涓簆rops鐨勫�兼棤娉曚慨鏀癸紝鏁呴渶瑕佷竴涓腑闂村�� + durationTime: this.duration, + // 鍥剧墖鍔犺浇瀹屾垚鏃讹紝鍘绘帀鑳屾櫙棰滆壊锛屽洜涓哄鏋滄槸png鍥剧墖锛屽氨浼氭樉绀虹伆鑹茬殑鑳屾櫙 + backgroundStyle: {} + }; + }, + watch: { + src: { + immediate: true, + handler (n) { + if(!n) { + // 濡傛灉浼犲叆null鎴栬��''锛屾垨鑰協alse锛屾垨鑰卽ndefined锛屾爣璁颁负閿欒鐘舵�� + this.isError = true; + this.loading = false; + } else { + this.isError = false; + } + } + } + }, + computed: { + wrapStyle() { + let style = {}; + // 閫氳繃璋冪敤addUnit()鏂规硶锛屽鏋滄湁鍗曚綅锛屽鐧惧垎姣旓紝px鍗曚綅绛夛紝鐩存帴杩斿洖锛屽鏋滄槸绾补鐨勬暟鍊硷紝鍒欏姞涓妑px鍗曚綅 + style.width = this.$u.addUnit(this.width); + style.height = this.$u.addUnit(this.height); + // 濡傛灉鏄厤缃簡鍦嗗舰锛岃缃�50%鐨勫渾瑙掞紝鍚﹀垯鎸夌収榛樿鐨勯厤缃�� + style.borderRadius = this.shape == 'circle' ? '50%' : this.$u.addUnit(this.borderRadius); + // 濡傛灉璁剧疆鍦嗚锛屽繀椤昏鏈塰idden锛屽惁鍒欏彲鑳藉渾瑙掓棤鏁� + style.overflow = this.borderRadius > 0 ? 'hidden' : 'visible'; + if (this.fade) { + style.opacity = this.opacity; + style.transition = `opacity ${Number(this.durationTime) / 1000}s ease-in-out`; + } + return style; + } + }, + methods: { + // 鐐瑰嚮鍥剧墖 + onClick() { + this.$emit('click'); + }, + // 鍥剧墖鍔犺浇澶辫触 + onErrorHandler(err) { + this.loading = false; + this.isError = true; + this.$emit('error', err); + }, + // 鍥剧墖鍔犺浇瀹屾垚锛屾爣璁發oading缁撴潫 + onLoadHandler() { + this.loading = false; + this.isError = false; + this.$emit('load'); + // 濡傛灉涓嶉渶瑕佸姩鐢绘晥鏋滐紝灏变笉鎵ц涓嬫柟浠g爜锛屽悓鏃剁Щ闄ゅ姞杞芥椂鐨勮儗鏅鑹� + // 鍚﹀垯鏃犻渶fade鏁堟灉鏃讹紝png鍥剧墖渚濈劧鑳界湅鍒颁笅鏂圭殑鑳屾櫙鑹� + if (!this.fade) return this.removeBgColor(); + // 鍘熸潵opacity涓�1(涓嶉�忔槑锛屾槸涓轰簡鏄剧ず鍗犱綅鍥�)锛屾敼鎴�0(閫忔槑锛屾剰鍛崇潃璇ュ厓绱犳樉绀虹殑鏄儗鏅鑹诧紝榛樿鐨勭伆鑹�)锛屽啀鏀规垚1锛屾槸涓轰簡鑾峰緱杩囨浮鏁堟灉 + this.opacity = 0; + // 杩欓噷璁剧疆涓�0锛屾槸涓轰簡鍥剧墖灞曠ず鍒拌儗鏅叏閫忔槑杩欎釜杩囩▼鏃堕棿涓�0锛屽欢鏃朵箣鍚庡欢鏃朵箣鍚庨噸鏂拌缃负duration锛屾槸涓轰簡鑾峰緱鑳屾櫙閫忔槑(鐏拌壊) + // 鍒板浘鐗囧睍绀虹殑杩囩▼涓殑娣″叆鏁堟灉 + this.durationTime = 0; + // 寤舵椂50ms锛屽惁鍒欏湪娴忚鍣℉5锛岃繃娓℃晥鏋滄棤鏁� + setTimeout(() => { + this.durationTime = this.duration; + this.opacity = 1; + setTimeout(() => { + this.removeBgColor(); + }, this.durationTime); + }, 50); + }, + // 绉婚櫎鍥剧墖鐨勮儗鏅壊 + removeBgColor() { + // 娣″叆鍔ㄧ敾杩囨浮瀹屾垚鍚庯紝灏嗚儗鏅缃负閫忔槑鑹诧紝鍚﹀垯png鍥剧墖浼氱湅鍒扮伆鑹茬殑鑳屾櫙 + this.backgroundStyle = { + backgroundColor: 'transparent' + }; + } + } +}; +</script> + +<style scoped lang="scss"> +@import '../../libs/css/style.components.scss'; + +.u-image { + position: relative; + transition: opacity 0.5s ease-in-out; + + &__image { + width: 100%; + height: 100%; + } + + &__loading, + &__error { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + @include vue-flex; + align-items: center; + justify-content: center; + background-color: $u-bg-color; + color: $u-tips-color; + font-size: 46rpx; + } +} +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-index-anchor/u-index-anchor.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-index-anchor/u-index-anchor.vue" new file mode 100644 index 0000000..5038827 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-index-anchor/u-index-anchor.vue" @@ -0,0 +1,89 @@ +<template> + <!-- 鏀粯瀹濆皬绋嬪簭浣跨敤$u.getRect()鑾峰彇缁勪欢鐨勬牴鍏冪礌灏哄锛屾墍浠ュ湪澶栭潰濂椾竴涓�"澹�" --> + <view> + <view class="u-index-anchor-wrapper" :id="$u.guid()" :style="[wrapperStyle]"> + <view class="u-index-anchor " :class="[active ? 'u-index-anchor--active' : '']" :style="[customAnchorStyle]"> + <slot v-if="useSlot" /> + <block v-else> + <text>{{ index }}</text> + </block> + </view> + </view> + </view> +</template> + +<script> + /** + * indexAnchor 绱㈠紩鍒楄〃閿氱偣 + * @description 閫氳繃鎶樺彔闈㈡澘鏀剁撼鍐呭鍖哄煙,鎼厤<u-index-anchor>浣跨敤 + * @tutorial https://www.uviewui.com/components/indexList.html#indexanchor-props + * @property {Boolean} use-slot 鏄惁浣跨敤鑷畾涔夊唴瀹圭殑鎻掓Ы锛堥粯璁alse锛� + * @property {String Number} index 绱㈠紩瀛楃锛屽鏋滃畾涔変簡use-slot锛屾鍙傛暟鑷姩澶辨晥 + * @property {Object} custStyle 鑷畾涔夋牱寮忥紝瀵硅薄褰㈠紡锛屽"{color: 'red'}" + * @event {Function} default 閿氱偣浣嶇疆鏄剧ず鍐呭锛岄粯璁や负绱㈠紩瀛楃 + * @example <u-index-anchor :index="item" /> + */ + export default { + name: "u-index-anchor", + props: { + useSlot: { + type: Boolean, + default: false + }, + index: { + type: String, + default: '' + }, + customStyle: { + type: Object, + default () { + return {} + } + } + }, + data() { + return { + active: false, + wrapperStyle: {}, + anchorStyle: {} + } + }, + created() { + this.parent = false; + }, + mounted() { + this.parent = this.$u.$parent.call(this, 'u-index-list'); + if(this.parent) { + this.parent.children.push(this); + this.parent.updateData(); + } + }, + computed: { + customAnchorStyle() { + return Object.assign(this.anchorStyle, this.customStyle); + } + } + } +</script> + +<style lang="scss" scoped> + @import "../../libs/css/style.components.scss"; + + .u-index-anchor { + box-sizing: border-box; + padding: 14rpx 24rpx; + color: #606266; + width: 100%; + font-weight: 500; + font-size: 28rpx; + line-height: 1.2; + background-color: rgb(245, 245, 245); + } + + .u-index-anchor--active { + right: 0; + left: 0; + color: #2979ff; + background-color: #fff; + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-index-list/u-index-list.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-index-list/u-index-list.vue" new file mode 100644 index 0000000..30fcda0 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-index-list/u-index-list.vue" @@ -0,0 +1,315 @@ +<template> + <!-- 鏀粯瀹濆皬绋嬪簭浣跨敤$u.getRect()鑾峰彇缁勪欢鐨勬牴鍏冪礌灏哄锛屾墍浠ュ湪澶栭潰濂椾竴涓�"澹�" --> + <view> + <view class="u-index-bar"> + <slot /> + <view v-if="showSidebar" class="u-index-bar__sidebar" @touchstart.stop.prevent="onTouchMove" @touchmove.stop.prevent="onTouchMove" + @touchend.stop.prevent="onTouchStop" @touchcancel.stop.prevent="onTouchStop"> + <view v-for="(item, index) in indexList" :key="index" class="u-index-bar__index" :style="{zIndex: zIndex + 1, color: activeAnchorIndex === index ? activeColor : ''}" + :data-index="index"> + {{ item }} + </view> + </view> + <view class="u-indexed-list-alert" v-if="touchmove && indexList[touchmoveIndex]" :style="{ + zIndex: alertZIndex + }"> + <text>{{indexList[touchmoveIndex]}}</text> + </view> + </view> + </view> +</template> + +<script> + var indexList = function() { + var indexList = []; + var charCodeOfA = 'A'.charCodeAt(0); + for (var i = 0; i < 26; i++) { + indexList.push(String.fromCharCode(charCodeOfA + i)); + } + return indexList; + }; + + /** + * indexList 绱㈠紩鍒楄〃 + * @description 閫氳繃鎶樺彔闈㈡澘鏀剁撼鍐呭鍖哄煙,鎼厤<u-index-anchor>浣跨敤 + * @tutorial https://www.uviewui.com/components/indexList.html#indexanchor-props + * @property {Number String} scroll-top 褰撳墠婊氬姩楂樺害锛岃嚜瀹氫箟缁勪欢鏃犳硶鑾峰緱婊氬姩鏉′簨浠讹紝鎵�浠ヤ緷璧栨帴鍏ユ柟浼犲叆 + * @property {Array} index-list 绱㈠紩瀛楃鍒楄〃锛屾暟缁勶紙榛樿A-Z锛� + * @property {Number String} z-index 閿氱偣鍚搁《鏃剁殑灞傜骇锛堥粯璁�965锛� + * @property {Boolean} sticky 鏄惁寮�鍚敋鐐硅嚜鍔ㄥ惛椤讹紙榛樿true锛� + * @property {Number String} offset-top 閿氱偣鑷姩鍚搁《鏃朵笌椤堕儴鐨勮窛绂伙紙榛樿0锛� + * @property {String} highlight-color 閿氱偣鍜屽彸杈圭储寮曞瓧绗﹂珮浜鑹诧紙榛樿#2979ff锛� + * @event {Function} select 閫変腑鍙宠竟绱㈠紩瀛楃鏃惰Е鍙� + * @example <u-index-list :scrollTop="scrollTop"></u-index-list> + */ + export default { + name: "u-index-list", + props: { + sticky: { + type: Boolean, + default: true + }, + zIndex: { + type: [Number, String], + default: '' + }, + scrollTop: { + type: [Number, String], + default: 0, + }, + offsetTop: { + type: [Number, String], + default: 0 + }, + indexList: { + type: Array, + default () { + return indexList() + } + }, + activeColor: { + type: String, + default: '#2979ff' + } + }, + created() { + // #ifdef H5 + this.stickyOffsetTop = this.offsetTop ? uni.upx2px(this.offsetTop) : 44; + // #endif + // #ifndef H5 + this.stickyOffsetTop = this.offsetTop ? uni.upx2px(this.offsetTop) : 0; + // #endif + // 鍙兘鍦╟reated鐢熷懡鍛ㄦ湡瀹氫箟children锛屽鏋滃湪data瀹氫箟锛屼細鍥犱负寰幆寮曠敤鑰屾姤閿� + this.children = []; + }, + data() { + return { + activeAnchorIndex: 0, + showSidebar: true, + // children: [], + touchmove: false, + touchmoveIndex: 0, + } + }, + watch: { + scrollTop() { + this.updateData() + } + }, + computed: { + // 寮瑰嚭toast鐨剒-index鍊� + alertZIndex() { + return this.$u.zIndex.toast; + } + }, + methods: { + updateData() { + this.timer && clearTimeout(this.timer); + this.timer = setTimeout(() => { + this.showSidebar = !!this.children.length; + this.setRect().then(() => { + this.onScroll(); + }); + }, 0); + }, + setRect() { + return Promise.all([ + this.setAnchorsRect(), + this.setListRect(), + this.setSiderbarRect() + ]); + }, + setAnchorsRect() { + return Promise.all(this.children.map((anchor, index) => anchor + .$uGetRect('.u-index-anchor-wrapper') + .then((rect) => { + Object.assign(anchor, { + height: rect.height, + top: rect.top + }); + }))); + }, + setListRect() { + return this.$uGetRect('.u-index-bar').then((rect) => { + Object.assign(this, { + height: rect.height, + top: rect.top + this.scrollTop + }); + }); + }, + setSiderbarRect() { + return this.$uGetRect('.u-index-bar__sidebar').then(rect => { + this.sidebar = { + height: rect.height, + top: rect.top + }; + }); + }, + getActiveAnchorIndex() { + const { + children + } = this; + const { + sticky + } = this; + for (let i = this.children.length - 1; i >= 0; i--) { + const preAnchorHeight = i > 0 ? children[i - 1].height : 0; + const reachTop = sticky ? preAnchorHeight : 0; + if (reachTop >= children[i].top) { + return i; + } + } + return -1; + }, + onScroll() { + const { + children = [] + } = this; + if (!children.length) { + return; + } + const { + sticky, + stickyOffsetTop, + zIndex, + scrollTop, + activeColor + } = this; + const active = this.getActiveAnchorIndex(); + this.activeAnchorIndex = active; + if (sticky) { + let isActiveAnchorSticky = false; + if (active !== -1) { + isActiveAnchorSticky = + children[active].top <= 0; + } + children.forEach((item, index) => { + if (index === active) { + let wrapperStyle = ''; + let anchorStyle = { + color: `${activeColor}` + }; + if (isActiveAnchorSticky) { + wrapperStyle = { + height: `${children[index].height}px` + }; + anchorStyle = { + position: 'fixed', + top: `${stickyOffsetTop}px`, + zIndex: `${zIndex ? zIndex : this.$u.zIndex.indexListSticky}`, + color: `${activeColor}` + }; + } + item.active = active; + item.wrapperStyle = wrapperStyle; + item.anchorStyle = anchorStyle; + } else if (index === active - 1) { + const currentAnchor = children[index]; + const currentOffsetTop = currentAnchor.top; + const targetOffsetTop = index === children.length - 1 ? + this.top : + children[index + 1].top; + const parentOffsetHeight = targetOffsetTop - currentOffsetTop; + const translateY = parentOffsetHeight - currentAnchor.height; + const anchorStyle = { + position: 'relative', + transform: `translate3d(0, ${translateY}px, 0)`, + zIndex: `${zIndex ? zIndex : this.$u.zIndex.indexListSticky}`, + color: `${activeColor}` + }; + item.active = active; + item.anchorStyle = anchorStyle; + } else { + item.active = false; + item.anchorStyle = ''; + item.wrapperStyle = ''; + } + }); + } + }, + onTouchMove(event) { + this.touchmove = true; + const sidebarLength = this.children.length; + const touch = event.touches[0]; + const itemHeight = this.sidebar.height / sidebarLength; + let clientY = 0; + clientY = touch.clientY; + let index = Math.floor((clientY - this.sidebar.top) / itemHeight); + if (index < 0) { + index = 0; + } else if (index > sidebarLength - 1) { + index = sidebarLength - 1; + } + this.touchmoveIndex = index; + this.scrollToAnchor(index); + }, + onTouchStop() { + this.touchmove = false; + this.scrollToAnchorIndex = null; + }, + scrollToAnchor(index) { + if (this.scrollToAnchorIndex === index) { + return; + } + this.scrollToAnchorIndex = index; + const anchor = this.children.find((item) => item.index === this.indexList[index]); + if (anchor) { + this.$emit('select', anchor.index); + uni.pageScrollTo({ + duration: 0, + scrollTop: anchor.top + this.scrollTop + }); + } + } + } + }; +</script> + +<style lang="scss" scoped> + @import "../../libs/css/style.components.scss"; + + .u-index-bar { + position: relative + } + + .u-index-bar__sidebar { + position: fixed; + top: 50%; + right: 0; + @include vue-flex; + flex-direction: column; + text-align: center; + transform: translateY(-50%); + user-select: none; + z-index: 99; + } + + .u-index-bar__index { + font-weight: 500; + padding: 8rpx 18rpx; + font-size: 22rpx; + line-height: 1 + } + + .u-indexed-list-alert { + position: fixed; + width: 120rpx; + height: 120rpx; + right: 90rpx; + top: 50%; + margin-top: -60rpx; + border-radius: 24rpx; + font-size: 50rpx; + color: #fff; + background-color: rgba(0, 0, 0, 0.65); + @include vue-flex; + justify-content: center; + align-items: center; + padding: 0; + z-index: 9999999; + } + + .u-indexed-list-alert text { + line-height: 50rpx; + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-input/u-input.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-input/u-input.vue" new file mode 100644 index 0000000..f2aea72 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-input/u-input.vue" @@ -0,0 +1,387 @@ +<template> + <view + class="u-input" + :class="{ + 'u-input--border': border, + 'u-input--error': validateState + }" + :style="{ + padding: `0 ${border ? 20 : 0}rpx`, + borderColor: borderColor, + textAlign: inputAlign + }" + @tap.stop="inputClick" + > + <textarea + v-if="type == 'textarea'" + class="u-input__input u-input__textarea" + :style="[getStyle]" + :value="defaultValue" + :placeholder="placeholder" + :placeholderStyle="placeholderStyle" + :disabled="disabled" + :maxlength="inputMaxlength" + :fixed="fixed" + :focus="focus" + :autoHeight="autoHeight" + :selection-end="uSelectionEnd" + :selection-start="uSelectionStart" + :cursor-spacing="getCursorSpacing" + :show-confirm-bar="showConfirmbar" + @input="handleInput" + @blur="handleBlur" + @focus="onFocus" + @confirm="onConfirm" + /> + <input + v-else + class="u-input__input" + :type="type == 'password' ? 'text' : type" + :style="[getStyle]" + :value="defaultValue" + :password="type == 'password' && !showPassword" + :placeholder="placeholder" + :placeholderStyle="placeholderStyle" + :disabled="disabled || type === 'select'" + :maxlength="inputMaxlength" + :focus="focus" + :confirmType="confirmType" + :cursor-spacing="getCursorSpacing" + :selection-end="uSelectionEnd" + :selection-start="uSelectionStart" + :show-confirm-bar="showConfirmbar" + @focus="onFocus" + @blur="handleBlur" + @input="handleInput" + @confirm="onConfirm" + /> + <view class="u-input__right-icon u-flex"> + <view class="u-input__right-icon__clear u-input__right-icon__item" @tap="onClear" v-if="clearable && value != '' && focused"> + <u-icon size="32" name="close-circle-fill" color="#c0c4cc"/> + </view> + <view class="u-input__right-icon__clear u-input__right-icon__item" v-if="passwordIcon && type == 'password'"> + <u-icon size="32" :name="!showPassword ? 'eye' : 'eye-fill'" color="#c0c4cc" @click="showPassword = !showPassword"/> + </view> + <view class="u-input__right-icon--select u-input__right-icon__item" v-if="type == 'select'" :class="{ + 'u-input__right-icon--select--reverse': selectOpen + }"> + <u-icon name="arrow-down-fill" size="26" color="#c0c4cc"></u-icon> + </view> + </view> + </view> +</template> + +<script> +import Emitter from '../../libs/util/emitter.js'; + +/** + * input 杈撳叆妗� + * @description 姝ょ粍浠朵负涓�涓緭鍏ユ锛岄粯璁ゆ病鏈夎竟妗嗗拰鏍峰紡锛屾槸涓撻棬涓洪厤鍚堣〃鍗曠粍浠秛-form鑰岃璁$殑锛屽埄鐢ㄥ畠鍙互蹇�熷疄鐜拌〃鍗曢獙璇侊紝杈撳叆鍐呭锛屼笅鎷夐�夋嫨绛夊姛鑳姐�� + * @tutorial http://uviewui.com/components/input.html + * @property {String} type 妯″紡閫夋嫨锛岃瀹樼綉璇存槑 + * @property {Boolean} clearable 鏄惁鏄剧ず鍙充晶鐨勬竻闄ゅ浘鏍�(榛樿true) + * @property {} v-model 鐢ㄤ簬鍙屽悜缁戝畾杈撳叆妗嗙殑鍊� + * @property {String} input-align 杈撳叆妗嗘枃瀛楃殑瀵归綈鏂瑰紡(榛樿left) + * @property {String} placeholder placeholder鏄剧ず鍊�(榛樿 '璇疯緭鍏ュ唴瀹�') + * @property {Boolean} disabled 鏄惁绂佺敤杈撳叆妗�(榛樿false) + * @property {String Number} maxlength 杈撳叆妗嗙殑鏈�澶у彲杈撳叆闀垮害(榛樿140) + * @property {String Number} selection-start 鍏夋爣璧峰浣嶇疆锛岃嚜鍔ㄨ仛鐒︽椂鏈夋晥锛岄渶涓巗election-end鎼厤浣跨敤锛堥粯璁�-1锛� + * @property {String Number} maxlength 鍏夋爣缁撴潫浣嶇疆锛岃嚜鍔ㄨ仛鐒︽椂鏈夋晥锛岄渶涓巗election-start鎼厤浣跨敤锛堥粯璁�-1锛� + * @property {String Number} cursor-spacing 鎸囧畾鍏夋爣涓庨敭鐩樼殑璺濈锛屽崟浣峱x(榛樿0) + * @property {String} placeholderStyle placeholder鐨勬牱寮忥紝瀛楃涓插舰寮忥紝濡�"color: red;"(榛樿 "color: #c0c4cc;") + * @property {String} confirm-type 璁剧疆閿洏鍙充笅瑙掓寜閽殑鏂囧瓧锛屼粎鍦╰ype涓簍ext鏃剁敓鏁�(榛樿done) + * @property {Object} custom-style 鑷畾涔夎緭鍏ユ鐨勬牱寮忥紝瀵硅薄褰㈠紡 + * @property {Boolean} focus 鏄惁鑷姩鑾峰緱鐒︾偣(榛樿false) + * @property {Boolean} fixed 濡傛灉type涓簍extarea锛屼笖鍦ㄤ竴涓�"position:fixed"鐨勫尯鍩燂紝闇�瑕佹寚鏄庝负true(榛樿false) + * @property {Boolean} password-icon type涓簆assword鏃讹紝鏄惁鏄剧ず鍙充晶鐨勫瘑鐮佹煡鐪嬪浘鏍�(榛樿true) + * @property {Boolean} border 鏄惁鏄剧ず杈规(榛樿false) + * @property {String} border-color 杈撳叆妗嗙殑杈规棰滆壊(榛樿#dcdfe6) + * @property {Boolean} auto-height 鏄惁鑷姩澧為珮杈撳叆鍖哄煙锛宼ype涓簍extarea鏃舵湁鏁�(榛樿true) + * @property {String Number} height 楂樺害锛屽崟浣峳px(text绫诲瀷鏃朵负70锛宼extarea鏃朵负100) + * @example <u-input v-model="value" :type="type" :border="border" /> + */ +export default { + name: 'u-input', + mixins: [Emitter], + props: { + value: { + type: [String, Number], + default: '' + }, + // 杈撳叆妗嗙殑绫诲瀷锛宼extarea锛宼ext锛宯umber + type: { + type: String, + default: 'text' + }, + inputAlign: { + type: String, + default: 'left' + }, + placeholder: { + type: String, + default: '璇疯緭鍏ュ唴瀹�' + }, + disabled: { + type: Boolean, + default: false + }, + maxlength: { + type: [Number, String], + default: 140 + }, + placeholderStyle: { + type: String, + default: 'color: #c0c4cc;' + }, + confirmType: { + type: String, + default: 'done' + }, + // 杈撳叆妗嗙殑鑷畾涔夋牱寮� + customStyle: { + type: Object, + default() { + return {}; + } + }, + // 濡傛灉 textarea 鏄湪涓�涓� position:fixed 鐨勫尯鍩燂紝闇�瑕佹樉绀烘寚瀹氬睘鎬� fixed 涓� true + fixed: { + type: Boolean, + default: false + }, + // 鏄惁鑷姩鑾峰緱鐒︾偣 + focus: { + type: Boolean, + default: false + }, + // 瀵嗙爜绫诲瀷鏃讹紝鏄惁鏄剧ず鍙充晶鐨勫瘑鐮佸浘鏍� + passwordIcon: { + type: Boolean, + default: true + }, + // input|textarea鏄惁鏄剧ず杈规 + border: { + type: Boolean, + default: false + }, + // 杈撳叆妗嗙殑杈规棰滆壊 + borderColor: { + type: String, + default: '#dcdfe6' + }, + autoHeight: { + type: Boolean, + default: true + }, + // type=select鏃讹紝鏃嬭浆鍙充晶鐨勫浘鏍囷紝鏍囪瘑褰撳墠澶勪簬鎵撳紑杩樻槸鍏抽棴select鐨勭姸鎬� + // open-鎵撳紑锛宑lose-鍏抽棴 + selectOpen: { + type: Boolean, + default: false + }, + // 楂樺害锛屽崟浣峳px + height: { + type: [Number, String], + default: '' + }, + // 鏄惁鍙竻绌� + clearable: { + type: Boolean, + default: true + }, + // 鎸囧畾鍏夋爣涓庨敭鐩樼殑璺濈锛屽崟浣� px + cursorSpacing: { + type: [Number, String], + default: 0 + }, + // 鍏夋爣璧峰浣嶇疆锛岃嚜鍔ㄨ仛鐒︽椂鏈夋晥锛岄渶涓巗election-end鎼厤浣跨敤 + selectionStart: { + type: [Number, String], + default: -1 + }, + // 鍏夋爣缁撴潫浣嶇疆锛岃嚜鍔ㄨ仛鐒︽椂鏈夋晥锛岄渶涓巗election-start鎼厤浣跨敤 + selectionEnd: { + type: [Number, String], + default: -1 + }, + // 鏄惁鑷姩鍘婚櫎涓ょ鐨勭┖鏍� + trim: { + type: Boolean, + default: true + }, + // 鏄惁鏄剧ず閿洏涓婃柟甯︽湁鈥濆畬鎴愨�滄寜閽偅涓�鏍� + showConfirmbar:{ + type:Boolean, + default:true + } + }, + data() { + return { + defaultValue: this.value, + inputHeight: 70, // input鐨勯珮搴� + textareaHeight: 100, // textarea鐨勯珮搴� + validateState: false, // 褰撳墠input鐨勯獙璇佺姸鎬侊紝鐢ㄤ簬閿欒鏃讹紝杈规鏄惁鏀逛负绾㈣壊 + focused: false, // 褰撳墠鏄惁澶勪簬鑾峰緱鐒︾偣鐨勭姸鎬� + showPassword: false, // 鏄惁棰勮瀵嗙爜 + lastValue: '', // 鐢ㄤ簬澶存潯灏忕▼搴忥紝鍒ゆ柇@input涓紝鍓嶅悗鐨勫�兼槸鍚﹀彂鐢熶簡鍙樺寲锛屽洜涓哄ご鏉′腑鏂囦笅锛屾寜涓嬮敭娌℃湁杈撳叆鍐呭锛屼篃浼氳Е鍙慇input鏃堕棿 + }; + }, + watch: { + value(nVal, oVal) { + this.defaultValue = nVal; + // 褰撳�煎彂鐢熷彉鍖栵紝涓斾负select绫诲瀷鏃�(姝ゆ椂input琚缃负disabled锛屼笉浼氳Е鍙慇input浜嬩欢)锛屾ā鎷熻Е鍙慇input浜嬩欢 + if(nVal != oVal && this.type == 'select') this.handleInput({ + detail: { + value: nVal + } + }) + }, + }, + computed: { + // 鍥犱负uniapp鐨刬nput缁勪欢鐨刴axlength缁勪欢蹇呴』瑕佹暟鍊硷紝杩欓噷杞负鏁板�硷紝缁欑敤鎴峰彲浠ヤ紶鍏ュ瓧绗︿覆鏁板�� + inputMaxlength() { + return Number(this.maxlength); + }, + getStyle() { + let style = {}; + // 濡傛灉娌℃湁鑷畾涔夐珮搴︼紝灏辨牴鎹畉ype涓篿nput杩樻槸textare鏉ュ垎閰嶄竴涓粯璁ょ殑楂樺害 + style.minHeight = this.height ? this.height + 'rpx' : this.type == 'textarea' ? + this.textareaHeight + 'rpx' : this.inputHeight + 'rpx'; + style = Object.assign(style, this.customStyle); + return style; + }, + // + getCursorSpacing() { + return Number(this.cursorSpacing); + }, + // 鍏夋爣璧峰浣嶇疆 + uSelectionStart() { + return String(this.selectionStart); + }, + // 鍏夋爣缁撴潫浣嶇疆 + uSelectionEnd() { + return String(this.selectionEnd); + } + }, + created() { + // 鐩戝惉u-form-item鍙戝嚭鐨勯敊璇簨浠讹紝灏嗚緭鍏ユ杈规鍙樼孩鑹� + this.$on('on-form-item-error', this.onFormItemError); + }, + methods: { + /** + * change 浜嬩欢 + * @param event + */ + handleInput(event) { + let value = event.detail.value; + // 鍒ゆ柇鏄惁鍘婚櫎绌烘牸 + if(this.trim) value = this.$u.trim(value); + // vue 鍘熺敓鐨勬柟娉� return 鍑哄幓 + this.$emit('input', value); + // 褰撳墠model 璧嬪�� + this.defaultValue = value; + // 杩囦竴涓敓鍛藉懆鏈熷啀鍙戦�佷簨浠剁粰u-form-item锛屽惁鍒檛his.$emit('input')鏇存柊浜嗙埗缁勪欢鐨勫�硷紝浣嗘槸寰俊灏忕▼搴忎笂 + // 灏氭湭鏇存柊鍒皍-form-item锛屽鑷磋幏鍙栫殑鍊间负绌猴紝浠庤�屾牎楠屾贩璁� + // 杩欓噷涓嶈兘寤舵椂鏃堕棿澶煭锛屾垨鑰呬娇鐢╰his.$nextTick锛屽惁鍒欏湪澶存潯涓婏紝浼氶�犳垚娣蜂贡 + setTimeout(() => { + // 澶存潯灏忕▼搴忕敱浜庤嚜韬玝ug锛屽鑷翠腑鏂囦笅锛屾瘡鎸変笅涓�涓敭(灏氭湭瀹屾垚杈撳叆)锛岄兘浼氳Е鍙戜竴娆input锛屽鑷撮敊璇紝杩欓噷杩涜鍒ゆ柇澶勭悊 + // #ifdef MP-TOUTIAO + if(this.$u.trim(value) == this.lastValue) return ; + this.lastValue = value; + // #endif + // 灏嗗綋鍓嶇殑鍊煎彂閫佸埌 u-form-item 杩涜鏍¢獙 + this.dispatch('u-form-item', 'on-form-change', value); + }, 40) + }, + /** + * blur 浜嬩欢 + * @param event + */ + handleBlur(event) { + // 鏈�寮�濮嬩娇鐢ㄧ殑鏄洃鍚浘鏍嘆touchstart浜嬩欢锛岃嚜浠巋x2.8.4鍚庯紝姝ゆ柟娉曞湪寰俊灏忕▼搴忓嚭閿� + // 杩欓噷鏀逛负鐩戝惉鐐瑰嚮浜嬩欢锛屾墜鐐瑰嚮娓呴櫎鍥炬爣鏃讹紝鍚屾椂涔熷彂鐢熶簡@blur浜嬩欢锛屽鑷村浘鏍囨秷澶辫�屾棤娉曠偣鍑伙紝杩欓噷鍋氫竴涓欢鏃� + setTimeout(() => { + this.focused = false; + }, 100) + // vue 鍘熺敓鐨勬柟娉� return 鍑哄幓 + this.$emit('blur', event.detail.value); + setTimeout(() => { + // 澶存潯灏忕▼搴忕敱浜庤嚜韬玝ug锛屽鑷翠腑鏂囦笅锛屾瘡鎸変笅涓�涓敭(灏氭湭瀹屾垚杈撳叆)锛岄兘浼氳Е鍙戜竴娆input锛屽鑷撮敊璇紝杩欓噷杩涜鍒ゆ柇澶勭悊 + // #ifdef MP-TOUTIAO + if(this.$u.trim(value) == this.lastValue) return ; + this.lastValue = value; + // #endif + // 灏嗗綋鍓嶇殑鍊煎彂閫佸埌 u-form-item 杩涜鏍¢獙 + this.dispatch('u-form-item', 'on-form-blur', event.detail.value); + }, 40) + }, + onFormItemError(status) { + this.validateState = status; + }, + onFocus(event) { + this.focused = true; + this.$emit('focus'); + }, + onConfirm(e) { + this.$emit('confirm', e.detail.value); + }, + onClear(event) { + this.$emit('input', ''); + }, + inputClick() { + this.$emit('click'); + } + } +}; +</script> + +<style lang="scss" scoped> +@import "../../libs/css/style.components.scss"; + +.u-input { + position: relative; + flex: 1; + @include vue-flex; + + &__input { + //height: $u-form-item-height; + font-size: 28rpx; + color: $u-main-color; + flex: 1; + } + + &__textarea { + width: auto; + font-size: 28rpx; + color: $u-main-color; + padding: 10rpx 0; + line-height: normal; + flex: 1; + } + + &--border { + border-radius: 6rpx; + border-radius: 4px; + border: 1px solid $u-form-item-border-color; + } + + &--error { + border-color: $u-type-error!important; + } + + &__right-icon { + + &__item { + margin-left: 10rpx; + } + + &--select { + transition: transform .4s; + + &--reverse { + transform: rotate(-180deg); + } + } + } +} +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-keyboard/u-keyboard.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-keyboard/u-keyboard.vue" new file mode 100644 index 0000000..1904a2b --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-keyboard/u-keyboard.vue" @@ -0,0 +1,217 @@ +<template> + <u-popup class="" :mask="mask" :maskCloseAble="maskCloseAble" mode="bottom" :popup="false" v-model="value" length="auto" + :safeAreaInsetBottom="safeAreaInsetBottom" @close="popupClose" :zIndex="uZIndex"> + <slot /> + <view class="u-tooltip" v-if="tooltip"> + <view class="u-tooltip-item u-tooltip-cancel" hover-class="u-tooltip-cancel-hover" @tap="onCancel"> + {{cancelBtn ? cancelText : ''}} + </view> + <view v-if="showTips" class="u-tooltip-item u-tooltip-tips"> + {{tips ? tips : mode == 'number' ? '鏁板瓧閿洏' : mode == 'card' ? '韬唤璇侀敭鐩�' : '杞︾墝鍙烽敭鐩�'}} + </view> + <view v-if="confirmBtn" @tap="onConfirm" class="u-tooltip-item u-tooltips-submit" hover-class="u-tooltips-submit-hover"> + {{confirmBtn ? confirmText : ''}} + </view> + </view> + <block v-if="mode == 'number' || mode == 'card'"> + <u-number-keyboard :random="random" @backspace="backspace" @change="change" :mode="mode" :dotEnabled="dotEnabled"></u-number-keyboard> + </block> + <block v-else> + <u-car-keyboard :random="random" @backspace="backspace" @change="change"></u-car-keyboard> + </block> + </u-popup> +</template> + +<script> + /** + * keyboard 閿洏 + * @description 姝や负uViw鑷畾涔夌殑閿洏闈㈡澘锛屽唴鍚簡鏁板瓧閿洏锛岃溅鐗屽彿閿紝韬唤璇佸彿閿洏3涓ā寮忥紝閮芥湁鍙互鎵撲贡鎸夐敭椤哄簭鐨勯�夐」銆� + * @tutorial https://www.uviewui.com/components/keyboard.html + * @property {String} mode 閿洏绫诲瀷锛岃瀹樼綉鍩烘湰浣跨敤鐨勮鏄庯紙榛樿number锛� + * @property {Boolean} dot-enabled 鏄惁鏄剧ず"."鎸夐敭锛屽彧鍦╩ode=number鏃舵湁鏁堬紙榛樿true锛� + * @property {Boolean} tooltip 鏄惁鏄剧ず閿洏椤堕儴宸ュ叿鏉★紙榛樿true锛� + * @property {String} tips 宸ュ叿鏉′腑闂寸殑鎻愮ず鏂囧瓧锛岃涓婃柟鍩烘湰浣跨敤鐨勮鏄庯紝濡備笉闇�瑕侊紝璇蜂紶""绌哄瓧绗� + * @property {Boolean} cancel-btn 鏄惁鏄剧ず宸ュ叿鏉″乏杈圭殑"鍙栨秷"鎸夐挳锛堥粯璁rue锛� + * @property {Boolean} confirm-btn 鏄惁鏄剧ず宸ュ叿鏉″彸杈圭殑"瀹屾垚"鎸夐挳锛堥粯璁rue锛� + * @property {Boolean} mask 鏄惁鏄剧ず閬僵锛堥粯璁rue锛� + * @property {String} confirm-text 纭鎸夐挳鐨勬枃瀛� + * @property {String} cancel-text 鍙栨秷鎸夐挳鐨勬枃瀛� + * @property {Number String} z-index 寮瑰嚭閿洏鐨剒-index鍊硷紙榛樿1075锛� + * @property {Boolean} random 鏄惁鎵撲贡閿洏鎸夐敭鐨勯『搴忥紙榛樿false锛� + * @property {Boolean} safe-area-inset-bottom 鏄惁寮�鍚簳閮ㄥ畨鍏ㄥ尯閫傞厤锛堥粯璁alse锛� + * @property {Boolean} mask-close-able 鏄惁鍏佽鐐瑰嚮閬僵鏀惰捣閿洏锛堥粯璁rue锛� + * @event {Function} change 鎸夐敭琚偣鍑�(涓嶅寘鍚��鏍奸敭琚偣鍑�) + * @event {Function} cancel 閿洏椤堕儴宸ュ叿鏉″乏杈圭殑"鍙栨秷"鎸夐挳琚偣鍑� + * @event {Function} confirm 閿洏椤堕儴宸ュ叿鏉″彸杈圭殑"瀹屾垚"鎸夐挳琚偣鍑� + * @event {Function} backspace 閿洏閫�鏍奸敭琚偣鍑� + * @example <u-keyboard mode="number" v-model="show"></u-keyboard> + */ + export default { + name: "u-keyboard", + props: { + // 閿洏鐨勭被鍨嬶紝number-鏁板瓧閿洏锛宑ard-韬唤璇侀敭鐩橈紝car-杞︾墝鍙烽敭鐩� + mode: { + type: String, + default: 'number' + }, + // 鏄惁鏄剧ず閿洏鐨�"."绗﹀彿 + dotEnabled: { + type: Boolean, + default: true + }, + // 鏄惁鏄剧ず椤堕儴宸ュ叿鏉� + tooltip: { + type: Boolean, + default: true + }, + // 鏄惁鏄剧ず宸ュ叿鏉′腑闂寸殑鎻愮ず + showTips: { + type: Boolean, + default: true + }, + // 宸ュ叿鏉′腑闂寸殑鎻愮ず鏂囧瓧 + tips: { + type: String, + default: '' + }, + // 鏄惁鏄剧ず宸ュ叿鏉″乏杈圭殑"鍙栨秷"鎸夐挳 + cancelBtn: { + type: Boolean, + default: true + }, + // 鏄惁鏄剧ず宸ュ叿鏉″彸杈圭殑"瀹屾垚"鎸夐挳 + confirmBtn: { + type: Boolean, + default: true + }, + // 鏄惁鎵撲贡閿洏鎸夐敭鐨勯『搴� + random: { + type: Boolean, + default: false + }, + // 鏄惁寮�鍚簳閮ㄥ畨鍏ㄥ尯閫傞厤锛屽紑鍚殑璇濓紝浼氬湪iPhoneX鏈哄瀷搴曢儴娣诲姞涓�瀹氱殑鍐呰竟璺� + safeAreaInsetBottom: { + type: Boolean, + default: false + }, + // 鏄惁鍏佽閫氳繃鐐瑰嚮閬僵鍏抽棴閿洏 + maskCloseAble: { + type: Boolean, + default: true + }, + // 閫氳繃鍙屽悜缁戝畾鎺у埗閿洏鐨勫脊鍑轰笌鏀惰捣 + value: { + type: Boolean, + default: false + }, + // 鏄惁鏄剧ず閬僵锛屾煇浜涙椂鍊欐暟瀛楅敭鐩樻椂锛岀敤鎴峰笇鏈涚湅鍒拌嚜宸辩殑鏁板�硷紝鎵�浠ュ彲鑳戒笉鎯宠閬僵 + mask: { + type: Boolean, + default: true + }, + // z-index鍊� + zIndex: { + type: [Number, String], + default: '' + }, + // 鍙栨秷鎸夐挳鐨勬枃瀛� + cancelText: { + type: String, + default: '鍙栨秷' + }, + // 纭鎸夐挳鐨勬枃瀛� + confirmText: { + type: String, + default: '纭' + } + }, + data() { + return { + //show: false + } + }, + computed: { + uZIndex() { + return this.zIndex ? this.zIndex : this.$u.zIndex.popup; + } + }, + methods: { + change(e) { + this.$emit('change', e); + }, + // 閿洏鍏抽棴 + popupClose() { + // 閫氳繃鍙戦�乮nput杩欎釜鐗规畩鐨勪簨浠跺悕锛屽彲浠ヤ慨鏀圭埗缁勪欢浼犵粰props鐨剉alue鐨勫彉閲忥紝涔熷嵆鍙屽悜缁戝畾 + this.$emit('input', false); + }, + // 杈撳叆瀹屾垚 + onConfirm() { + this.popupClose(); + this.$emit('confirm'); + }, + // 鍙栨秷杈撳叆 + onCancel() { + this.popupClose(); + this.$emit('cancel'); + }, + // 閫�鏍奸敭 + backspace() { + this.$emit('backspace'); + }, + // 鍏抽棴閿洏 + // close() { + // this.show = false; + // }, + // // 鎵撳紑閿洏 + // open() { + // this.show = true; + // } + } + } +</script> + +<style lang="scss" scoped> + @import "../../libs/css/style.components.scss"; + + .u-keyboard { + position: relative; + z-index: 1003; + } + + .u-tooltip { + @include vue-flex; + justify-content: space-between; + } + + .u-tooltip-item { + color: #333333; + flex: 0 0 33.333333%; + text-align: center; + padding: 20rpx 10rpx; + font-size: 28rpx; + } + + .u-tooltips-submit { + text-align: right; + flex-grow: 1; + flex-wrap: 0; + padding-right: 40rpx; + color: $u-type-primary; + } + + .u-tooltip-cancel { + text-align: left; + flex-grow: 1; + flex-wrap: 0; + padding-left: 40rpx; + color: #888888; + } + + .u-tooltips-submit-hover { + color: $u-type-success; + } + + .u-tooltip-cancel-hover { + color: #333333; + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-lazy-load/u-lazy-load.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-lazy-load/u-lazy-load.vue" new file mode 100644 index 0000000..429a680 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-lazy-load/u-lazy-load.vue" @@ -0,0 +1,244 @@ +<template> + <view class="u-wrap" :style="{ + opacity: Number(opacity), + borderRadius: borderRadius + 'rpx', + // 鍥犱负time鍊奸渶瑕佹敼鍙�,鎵�浠ヤ笉鐩存帴鐢╠uration鍊�(涓嶈兘鏀瑰彉鐖剁粍浠秔rop浼犺繃鏉ョ殑鍊�) + transition: `opacity ${time / 1000}s ease-in-out` + }" + :class="'u-lazy-item-' + elIndex"> + <view :class="'u-lazy-item-' + elIndex"> + <image :style="{borderRadius: borderRadius + 'rpx', height: imgHeight}" v-if="!isError" class="u-lazy-item" + :src="isShow ? image : loadingImg" :mode="imgMode" @load="imgLoaded" @error="loadError" @tap="clickImg"></image> + <image :style="{borderRadius: borderRadius + 'rpx', height: imgHeight}" class="u-lazy-item error" v-else :src="errorImg" + :mode="imgMode" @load="errorImgLoaded" @tap="clickImg"></image> + </view> + </view> +</template> + +<script> + /** + * lazyLoad 鎳掑姞杞� + * @description 鎳掑姞杞戒娇鐢ㄧ殑鍦烘櫙涓猴細椤甸潰鏈夊緢澶氬浘鐗囨椂锛孉PP浼氬悓鏃跺姞杞芥墍鏈夌殑鍥剧墖锛屽鑷撮〉闈㈠崱椤匡紝鍚勪釜浣嶇疆鐨勫浘鐗囧嚭鐜板墠鍚庝笉涓�鑷寸瓑. + * @tutorial https://www.uviewui.com/components/lazyLoad.html + * @property {String Number} index 鐢ㄦ埛鑷畾涔夊�硷紝鍦ㄤ簨浠惰Е鍙戞椂鍥炶皟锛岀敤浠ュ尯鍒嗘槸鍝釜鍥剧墖 + * @property {String} image 鍥剧墖璺緞 + * @property {String} loading-img 棰勫姞杞芥椂鐨勫崰浣嶅浘 + * @property {String} error-img 鍥剧墖鍔犺浇鍑洪敊鏃剁殑鍗犱綅鍥� + * @property {String} threshold 瑙﹀彂鍔犺浇鏃剁殑浣嶇疆锛岃涓婃柟璇存槑锛屽崟浣� rpx锛堥粯璁�300锛� + * @property {String Number} duration 鍥剧墖鍔犺浇鎴愬姛鏃讹紝娣″叆娣″嚭鏃堕棿锛屽崟浣峬s锛堥粯璁わ級 + * @property {String} effect 鍥剧墖鍔犺浇鎴愬姛鏃讹紝娣″叆娣″嚭鐨刢ss鍔ㄧ敾鏁堟灉锛堥粯璁ase-in-out锛� + * @property {Boolean} is-effect 鍥剧墖鍔犺浇鎴愬姛鏃讹紝鏄惁鍚敤娣″叆娣″嚭鏁堟灉锛堥粯璁rue锛� + * @property {String Number} border-radius 鍥剧墖鍦嗚鍊硷紝鍗曚綅rpx锛堥粯璁�0锛� + * @property {String Number} height 鍥剧墖楂樺害锛屾敞鎰忥細瀹為檯楂樺害鍙兘鍙梚mg-mode鍙傛暟褰卞搷锛堥粯璁�450锛� + * @property {String Number} mg-mode 鍥剧墖鐨勮鍓ā寮忥紝璇﹁image缁勪欢瑁佸壀妯″紡锛堥粯璁idthFix锛� + * @event {Function} click 鐐瑰嚮鍥剧墖鏃惰Е鍙� + * @event {Function} load 鍥剧墖鍔犺浇鎴愬姛鏃惰Е鍙� + * @event {Function} error 鍥剧墖鍔犺浇澶辫触鏃惰Е鍙� + * @example <u-lazy-load :image="image" :loading-img="loadingImg" :error-img="errorImg"></u-lazy-load> + */ + export default { + name: 'u-lazy-load', + props: { + index: { + type: [Number, String] + }, + // 瑕佹樉绀虹殑鍥剧墖 + image: { + type: String, + default: '' + }, + // 鍥剧墖瑁佸壀妯″紡 + imgMode: { + type: String, + default: 'widthFix' + }, + // 鍗犱綅鍥剧墖璺緞 + loadingImg: { + type: String, + default: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAMAAAC3Ycb+AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUM0QjNBQjkyQUQ2MTFFQTlCNUQ4RTIzNDE5RUIxNjciIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUM0QjNBQkEyQUQ2MTFFQTlCNUQ4RTIzNDE5RUIxNjciPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QzRCM0FCNzJBRDYxMUVBOUI1RDhFMjM0MTlFQjE2NyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QzRCM0FCODJBRDYxMUVBOUI1RDhFMjM0MTlFQjE2NyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PtRHfPcAAAAzUExURZWVldfX18PDw62trZubm9zc3Li4uKGhoebm5tLS0uHh4c3Nzaenp729vcjIyLKysuvr6141L40AAAcXSURBVHja7NzZlqpGAEBR5lG0//9rIw7IJKJi4or7PGTdtN10wr5SVAEGf/qqArsAiIAAERAgAgJEQIAIiIAAERAgAgJEQIAIiIAAERAgAgJEQIAIiIAAERAgAgJEQIAIiIAAERAgAgJEQIAIiIAAERAgAgJEQIAIiIAAERAgAgJEQIAIiIAAERAgAgJEQIAIiIAAERAgAgJEQIAIiIAAERAgAgJEQIAICBABERAgAgJEQIAICBABERAgAgJEQIAICBABERAgAgJEQIAICBABERAgAgJEQIAICBABERAgAgJEQIAICBABERAgAgJEQIAICBABERAgAgJEQIAICBABERAgAgJEQIAICBABERAg+nmQFMi5Jis+sIniED23jSzIgLTtg2D//iYme/8QBM/9lQ+CAEhbNLM3N9hEHAThX7GPCiBfAxK1b51kD+R7QMLjXg7iCsgWIPUh7pfVozG791oeBPngm48G583uW5GkBvI+SBaM2xXDn1oqum423bX/mgF5FySc2cv93Voug9TdZotsggnkBZB2NzbhrSY5HnoG07jei8dvzsJB/c3W60SALILE46+WCztsbhPR7R2VJq0ukEcT49nyy8QhaKcRa3fYHZD4+ufqOJAcgDz8/59vtw1I3QP5K6JsOG0vm3hce4I8LQp/BaRZGJC3AAn7IKOKXbC+7EdA5vdmmVwOLksgRThqOqiH4XEGsht+peoPUE8U/jJIO5OLH4GEwUslV5G0PTBG5Uiw/Y2jyigO3l9HAHKv9PYb82LloH74dZBoBUgar+l48NsNvtD0fkez9iwrAvIYZDRCl+Xs149Hm/KZmQ+QjUCiO1ei4ru7EsgnQYrkznlQb7thCuRfAzlOAPN72427P4VA/i2Q/DKT/Ls/VR8fvIBsDZIuz7TPF6TCbnk4GJkB2RokejTjuE7/unlgCuSTIO0Cy+Plp6vDfnQlBchy8QtjSHVd3EgmK1bHLm+H6+nXYbz2DuQRSPnqoL7vvq0u70on4zvxgCyWD3b9UyDVdW24PaWaiGTnFZJwPIQAebDpIKheBIm7n124ZthMJipAlkqHO+IZkP1tbfzOJark/A7MgKyvvl60fRqkvXfhuow+t9+q00+0/yyBrK8ZngOtBzldhw2X9tvpNGty0gvkmbPeJ0Cy/r09s/stbmfo0yMWkEdjevgKyOn2t2pxv7UXoibTdCDLje9/Ww1ymqzn87dbp92242ZmMRjI8hASvwKSLq4udqN6ksw8nxXN3tszD9L8Gkg+2mFrQYql5az4tvFj5xOx4VwnSdeBtGdyPwUytxK77pBVlNHdO7OK3rh/eTPUvdutT3fO52tuHMqD4N7llv8pyOQQ//w19YVDfX27+Sfuby9/6nau4pdA8vEdOZuChEH/quHt0Jg+IRJ/5+PrHwKZXfjbDiS73Zo7mu5UkzX7uTsXe0e/7nC3ePf1O69+BUg2XDfZCqSqOu7rGVf8cHBe8zhC2b61dtUHXv0OkGo6ZL4JkpbRYXdUaFevivx2M/1GIOctNh949TtAoumQ+TpIHMX54CJu+8BDd8FkE5BqcZh/59XvAClmTvKfB0nDqIlHo3T70SftyW1eX9dXtgQJqs1f/Q6QaOa/7wmQKtxH8eiGoCRuovODIO3VxOMmruZbHrLyD7z6DSDtGyT7ew1kf9hNn07c986JTovzzem0Id9wUG+Vk/IDr34DSNR7huZJkMFT6vEhqrPx/j5cnlZML8N6/PAzh9Y99Flm5Yde/c9BquDOkvkKkMP58dA4qi9vivE8JOvGz/j8FokfPpr288+pH2ZPOZrLmeGD+7KOh6dqYWJ48ki7yUg0tz0go/fv/LLddfV3sgOLJyaGPY/zrSlh1a36Arkzoue9CyG35ze6E6/dzO2Ga0EGHqdRJIkfn9/8OEjTW8Vq91ZWh39FeehWA7Nu9ft8CpUEk1WWOyDF0OPyEU2Pnzf/bZC0P6IPzmAvu7KauQBVrgKpJ0tG2arHzX8e5Pb3PezNs/PrX+3JMyCLn9XXf37tPFHvt09WfCDDjx+yyn1/p1V11j7GnB/q3leLuVva79S/tzed+db08YpF4uOZtmz/9oXWMq6BCAgQAQEiIEAERECACAgQAQEiIEAERECACAgQAQEiIEAERECACAgQAQEiIEAERECACAgQAQEiIEAERECACAgQAQEiIEAERECACAgQAQEiIEAERECACAgQAQEiIEAERECACAgQAQEiIEAERECACAgQAQEiIEAEBIiACAgQAQEiIEAEBIiACAgQAQEiIEAEBIiACAgQAQEiIEAEBIiACAgQAQEiIEAEBIiACAgQAQEiIEAEBIiACAgQAQEiIEAEBIiACAgQAQEiIEAEBIiACAgQAQEiIEAEBIiACAgQAQEiIEAEBIiAALELvqt/BBgACqVeUBXxcCkAAAAASUVORK5CYII=' + }, + // 鍔犺浇澶辫触鐨勯敊璇崰浣嶅浘 + errorImg: { + type: String, + default: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAMAAAC3Ycb+AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6ODdDMjhENDYyQUQ2MTFFQTlDQ0VBODgxQjFFOEEyMEMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6ODdDMjhENDcyQUQ2MTFFQTlDQ0VBODgxQjFFOEEyMEMiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4N0MyOEQ0NDJBRDYxMUVBOUNDRUE4ODFCMUU4QTIwQyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4N0MyOEQ0NTJBRDYxMUVBOUNDRUE4ODFCMUU4QTIwQyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PhLwhikAAAAzUExURZWVldfX162t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' + }, + // 鍥剧墖杩涘叆鍙鍖哄煙鍓嶅灏戝儚绱犳椂锛屽崟浣峳px锛屽紑濮嬪姞杞藉浘鐗� + // 璐熸暟涓哄浘鐗囪秴鍑哄睆骞曞簳閮ㄥ灏戣窛绂诲悗瑙﹀彂鎳掑姞杞斤紝姝f暟涓哄浘鐗囬《閮ㄨ窛绂诲睆骞曞簳閮ㄥ灏戣窛绂绘椂瑙﹀彂(鍥剧墖杩樻病鍑虹幇鍦ㄥ睆骞曚笂) + threshold: { + type: [Number, String], + default: 100 + }, + // 娣″叆娣″嚭鍔ㄧ敾鐨勮繃娓℃椂闂� + duration: { + type: [Number, String], + default: 500 + }, + // 娓℃晥鏋滅殑閫熷害鏇茬嚎锛屽悇涓箣闂村樊鍒笉澶э紝鍥犱负杩欐槸娣″叆娣″嚭锛屼笖鏃堕棿寰堢煭锛屼笉鏄偅浜涘彉褰㈡垨鑰呯Щ鍔ㄧ殑鎯呭喌锛屼細鏄庢樉 + // linear|ease|ease-in|ease-out|ease-in-out|cubic-bezier(n,n,n,n); + effect: { + type: String, + default: 'ease-in-out' + }, + // 鏄惁浣跨敤杩囨浮鏁堟灉 + isEffect: { + type: Boolean, + default: true + }, + // 鍦嗚鍊� + borderRadius: { + type: [Number, String], + default: 0 + }, + // 鍥剧墖楂樺害锛屽崟浣峳px + height: { + type: [Number, String], + default: '450' + } + }, + data() { + return { + isShow: false, + opacity: 1, + time: this.duration, + loadStatus: '', // 榛樿鏄噿鍔犺浇涓殑鐘舵�� + isError: false, // 鍥剧墖鍔犺浇澶辫触 + elIndex: this.$u.guid() + } + }, + computed: { + // 灏唗hreshold浠巖px杞负px + getThreshold() { + // 鍏堝彇缁濆鍊硷紝鍥犱负threshold鍙兘鏄礋鏁帮紝鏈�鍚庢牴鎹畉his.threshold鏄鏁版垨鑰呰礋鏁帮紝閲嶆柊杩樺師 + let thresholdPx = uni.upx2px(Math.abs(this.threshold)); + return this.threshold < 0 ? -thresholdPx : thresholdPx; + }, + // 璁$畻鍥剧墖鐨勯珮搴︼紝鍙兘涓篴uto锛屽甫%锛屾垨鑰呯洿鎺ユ暟鍊� + imgHeight() { + return this.$u.addUnit(this.height); + } + }, + created() { + // 鐢变簬涓�浜涚壒娈婂師鍥狅紝涓嶈兘灏嗘鍙橀噺鏀惧埌data涓畾涔� + this.observer = {}; + }, + watch: { + isShow(nVal) { + // 濡傛灉鏄笉寮�鍚繃娓℃晥鏋滐紝鐩存帴杩斿洖 + if (!this.isEffect) return; + this.time = 0; + // 鍘熸潵opacity涓�1(涓嶉�忔槑锛屾槸涓轰簡鏄剧ず鍗犱綅鍥�)锛屾敼鎴�0(閫忔槑锛屾剰鍛崇潃璇ュ厓绱犳樉绀虹殑鏄儗鏅鑹诧紝榛樿鐨勭櫧鑹�)锛屽啀鏀规垚1锛屾槸涓轰簡鑾峰緱杩囨浮鏁堟灉 + this.opacity = 0; + // 寤舵椂30ms锛屽惁鍒欏湪娴忚鍣℉5锛岃繃娓℃晥鏋滄棤鏁� + setTimeout(() => { + this.time = this.duration; + this.opacity = 1; + }, 30) + }, + // 鍥剧墖璺緞鍙戠敓鍙樺寲鏃讹紝闇�瑕侀噸鏂版爣璁颁竴浜涘彉閲忥紝鍚﹀垯浼氫竴鐩村崱鍦ㄦ煇涓�涓姸鎬侊紝姣斿isError + image(n) { + if(!n) { + // 濡傛灉浼犲叆null鎴栬��''锛屾垨鑰卽ndefined锛屾爣璁颁负閿欒鐘舵�� + this.isError = true; + } else { + this.init(); + this.isError = false; + } + } + }, + methods: { + // 鐢ㄤ簬閲嶆柊鍒濆鍖� + init() { + this.isError = false; + this.loadStatus = ''; + }, + // 鐐瑰嚮鍥剧墖瑙﹀彂鐨勪簨浠�,loadlazy-杩樻槸鎳掑姞杞戒腑鐘舵�侊紝loading-鍥剧墖姝e湪鍔犺浇锛宭oaded-鍥剧墖鍔犲姞杞藉畬鎴� + clickImg() { + let whichImg = ''; + // 濡傛灉isShow涓篺alse锛屾剰鍛崇潃鍥剧墖杩樻病寮�濮嬪姞杞斤紝鐐瑰嚮鐨勫彧鑳芥槸鏈�寮�濮嬬殑鍗犱綅鍥� + if (this.isShow == false) whichImg = 'lazyImg'; + // 濡傛灉isError涓簍rue锛屾剰鍛崇潃鍥剧墖鍔犺浇澶辫触锛岃繖鏄彧鍓╀笅閿欒鐨勫崰浣嶅浘锛屾墍浠ョ偣鍑荤殑鍙兘鏄敊璇崰浣嶅浘 + // 褰撶劧锛屼篃鍙互缁欓敊璇殑鍗犱綅鍥惧厓绱犵粦瀹氱偣鍑讳簨浠讹紝鐪嬩綘鍠滄~ + else if (this.isError == true) whichImg = 'errorImg'; + // 鎬诲叡涓夊紶鍥剧墖锛岄櫎浜嗕袱涓崰浣嶅浘锛屽墿涓嬬殑鍙兘鏄甯哥殑閭e紶鍥剧墖浜� + else whichImg = 'realImg'; + // 鍙�氱煡褰撳墠鍥剧墖鐨刬ndex + this.$emit('click', this.index); + }, + // 鍥剧墖鍔犺浇瀹屾垚浜嬩欢锛屽彲鑳芥槸鍔犺浇鍗犱綅鍥炬椂瑙﹀彂锛屼篃鍙兘鏄姞杞界湡姝g殑鍥剧墖瀹屾垚鏃惰Е鍙戯紝閫氳繃isShow鍖哄垎 + imgLoaded() { + // 鍗犱綅鍥惧姞杞藉畬鎴� + if (this.loadStatus == '') { + this.loadStatus = 'lazyed'; + } + // 鐪熸鐨勫浘鐗囧姞杞藉畬鎴� + else if (this.loadStatus == 'lazyed') { + this.loadStatus = 'loaded'; + this.$emit('load', this.index); + } + }, + // 閿欒鐨勫浘鐗囧姞杞藉畬鎴� + errorImgLoaded() { + this.$emit('error', this.index); + }, + // 鍥剧墖鍔犺浇澶辫触 + loadError() { + this.isError = true; + }, + disconnectObserver(observerName) { + const observer = this[observerName]; + observer && observer.disconnect(); + }, + }, + beforeDestroy() { + // 閿�姣侀〉闈㈡椂锛屽彲鑳借繕娌¤Е鍙戞煇寮犲緢搴曢儴鐨勬噿鍔犺浇鍥剧墖锛屾墍浠ユ妸杩欎釜浜嬩欢缁欏幓鎺� + //observer.disconnect(); + }, + mounted() { + // 姝OnReachBottom浜嬩欢鐢眒ixin.js鍙戝嚭锛岀洰鐨勬槸璁╅〉闈㈠埌搴曟椂锛屼繚璇佹墍鏈夊浘鐗囬兘杩涜鍔犺浇锛屽仛鍒扮粷瀵圭ǔ瀹氫笖鍙潬 + this.$nextTick(() => { + uni.$once('uOnReachBottom', () => { + if (!this.isShow) this.isShow = true; + }); + }) + // mounted鐨勬椂鍊欙紝涓嶄竴瀹氭寕杞戒簡杩欎釜鍏冪礌锛屽欢鏃�30ms锛屽惁鍒欎細鎶ラ敊鎴栬�呬笉鎶ラ敊锛屼絾鏄篃娌℃湁鏁堟灉 + setTimeout(() => { + // 杩欓噷鏄粍浠跺唴鑾峰彇甯冨眬鐘舵�侊紝涓嶈兘鐢╱ni.createIntersectionObserver锛岃�屽繀椤荤敤this.createIntersectionObserver + this.disconnectObserver('contentObserver'); + const contentObserver = uni.createIntersectionObserver(this); + // 瑕佺悊瑙h繖閲屾�庝箞璁$畻鐨勶紝璇风湅杩欎釜锛� + // https://blog.csdn.net/qq_25324335/article/details/83687695 + contentObserver.relativeToViewport({ + bottom: this.getThreshold, + }).observe('.u-lazy-item-' + this.elIndex, (res) => { + if (res.intersectionRatio > 0) { + // 鎳掑姞杞界姸鎬佹敼鍙� + this.isShow = true; + // 濡傛灉鍥剧墖宸茬粡鍔犺浇锛屽幓鎺夌洃鍚紝鍑忓皯鎬ц兘鐨勬秷鑰� + this.disconnectObserver('contentObserver'); + } + }) + this.contentObserver = contentObserver; + }, 30) + } + } +</script> + +<style scoped lang="scss"> + @import "../../libs/css/style.components.scss"; + + .u-wrap { + background-color: #eee; + overflow: hidden; + } + + .u-lazy-item { + width: 100%; + // 楠楃郴缁熷紑鍚‖浠跺姞閫� + transform: transition3d(0, 0, 0); + // 闃叉鍥剧墖鍔犺浇鈥滈棯涓�涓嬧�� + will-change: transform; + /* #ifndef APP-NVUE */ + display: block; + /* #endif */ + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-line-progress/u-line-progress.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-line-progress/u-line-progress.vue" new file mode 100644 index 0000000..77e2da2 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-line-progress/u-line-progress.vue" @@ -0,0 +1,147 @@ +<template> + <view class="u-progress" :style="{ + borderRadius: round ? '100rpx' : 0, + height: height + 'rpx', + backgroundColor: inactiveColor + }"> + <view :class="[ + type ? `u-type-${type}-bg` : '', + striped ? 'u-striped' : '', + striped && stripedActive ? 'u-striped-active' : '' + ]" class="u-active" :style="[progressStyle]"> + <slot v-if="$slots.default || $slots.$default" /> + <block v-else-if="showPercent"> + {{percent + '%'}} + </block> + </view> + </view> +</template> + +<script> + /** + * lineProgress 绾垮瀷杩涘害鏉� + * @description 灞曠ず鎿嶄綔鎴栦换鍔$殑褰撳墠杩涘害锛屾瘮濡備笂浼犳枃浠讹紝鏄竴涓嚎褰㈢殑杩涘害鏉°�� + * @tutorial https://www.uviewui.com/components/lineProgress.html + * @property {String Number} percent 杩涘害鏉$櫨鍒嗘瘮鍊硷紝涓烘暟鍊肩被鍨嬶紝0-100 + * @property {Boolean} round 杩涘害鏉′袱绔槸鍚︿负鍗婂渾锛堥粯璁rue锛� + * @property {String} type 濡傝缃紝active-color鍊煎皢浼氬け鏁� + * @property {String} active-color 杩涘害鏉℃縺娲婚儴鍒嗙殑棰滆壊锛堥粯璁�#19be6b锛� + * @property {String} inactive-color 杩涘害鏉$殑搴曡壊锛堥粯璁�#ececec锛� + * @property {Boolean} show-percent 鏄惁鍦ㄨ繘搴︽潯鍐呴儴鏄剧ず褰撳墠鐨勭櫨鍒嗘瘮鍊兼暟鍊硷紙榛樿true锛� + * @property {String Number} height 杩涘害鏉$殑楂樺害锛屽崟浣峳px锛堥粯璁�28锛� + * @property {Boolean} striped 鏄惁鏄剧ず杩涘害鏉℃縺娲婚儴鍒嗙殑鏉$汗锛堥粯璁alse锛� + * @property {Boolean} striped-active 鏉$汗鏄惁鍏锋湁鍔ㄦ�佹晥鏋滐紙榛樿false锛� + * @example <u-line-progress :percent="70" :show-percent="true"></u-line-progress> + */ + export default { + name: "u-line-progress", + props: { + // 涓ょ鏄惁鏄剧ず鍗婂渾褰� + round: { + type: Boolean, + default: true + }, + // 涓婚棰滆壊 + type: { + type: String, + default: '' + }, + // 婵�娲婚儴鍒嗙殑棰滆壊 + activeColor: { + type: String, + default: '#19be6b' + }, + inactiveColor: { + type: String, + default: '#ececec' + }, + // 杩涘害鐧惧垎姣旓紝鏁板�� + percent: { + type: Number, + default: 0 + }, + // 鏄惁鍦ㄨ繘搴︽潯鍐呴儴鏄剧ず鐧惧垎姣旂殑鍊� + showPercent: { + type: Boolean, + default: true + }, + // 杩涘害鏉$殑楂樺害锛屽崟浣峳px + height: { + type: [Number, String], + default: 28 + }, + // 鏄惁鏄剧ず鏉$汗 + striped: { + type: Boolean, + default: false + }, + // 鏉$汗鏄惁鏄剧ず娲诲姩鐘舵�� + stripedActive: { + type: Boolean, + default: false + } + }, + data() { + return { + + } + }, + computed: { + progressStyle() { + let style = {}; + style.width = this.percent + '%'; + if(this.activeColor) style.backgroundColor = this.activeColor; + return style; + } + }, + methods: { + + } + } +</script> + +<style lang="scss" scoped> + @import "../../libs/css/style.components.scss"; + + .u-progress { + overflow: hidden; + height: 15px; + /* #ifndef APP-NVUE */ + display: inline-flex; + /* #endif */ + align-items: center; + width: 100%; + border-radius: 100rpx; + } + + .u-active { + width: 0; + height: 100%; + align-items: center; + @include vue-flex; + justify-items: flex-end; + justify-content: space-around; + font-size: 20rpx; + color: #ffffff; + transition: all 0.4s ease; + } + + .u-striped { + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-size: 39px 39px; + } + + .u-striped-active { + animation: progress-stripes 2s linear infinite; + } + + @keyframes progress-stripes { + 0% { + background-position: 0 0; + } + + 100% { + background-position: 39px 0; + } + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-line/u-line.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-line/u-line.vue" new file mode 100644 index 0000000..c56fbc3 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-line/u-line.vue" @@ -0,0 +1,84 @@ +<template> + <view class="u-line" :style="[lineStyle]"> + + </view> +</template> + +<script> + /** + * line 绾挎潯 + * @description 姝ょ粍浠朵竴鑸敤浜庢樉绀轰竴鏍圭嚎鏉★紝鐢ㄤ簬鍒嗛殧鍐呭鍧楋紝鏈夋í鍚戝拰绔栧悜涓ょ妯″紡锛屼笖鑳借缃�0.5px绾挎潯锛屼娇鐢ㄤ篃寰堢畝鍗� + * @tutorial https://www.uviewui.com/components/line.html + * @property {String} color 绾挎潯鐨勯鑹�(榛樿#e4e7ed) + * @property {String} length 闀垮害锛岀珫鍚戞椂琛ㄧ幇涓洪珮搴︼紝妯悜鏃惰〃鐜颁负闀垮害锛屽彲浠ヤ负鐧惧垎姣旓紝甯px鍗曚綅鐨勫�肩瓑 + * @property {String} direction 绾挎潯鐨勬柟鍚戯紝row-妯悜锛宑ol-绔栧悜(榛樿row) + * @property {String} border-style 绾挎潯鐨勭被鍨嬶紝solid-瀹炵嚎锛宒ashed-鏂瑰舰铏氱嚎锛宒otted-鍦嗙偣铏氱嚎(榛樿solid) + * @property {Boolean} hair-line 鏄惁鏄剧ず缁嗙嚎鏉�(榛樿true) + * @property {String} margin 绾挎潯涓庝笂涓嬪乏鍙冲厓绱犵殑闂磋窛锛屽瓧绗︿覆褰㈠紡锛屽"30rpx" + * @example <u-line color="red"></u-line> + */ + export default { + name: 'u-line', + props: { + color: { + type: String, + default: '#e4e7ed' + }, + // 闀垮害锛岀珫鍚戞椂琛ㄧ幇涓洪珮搴︼紝妯悜鏃惰〃鐜颁负闀垮害锛屽彲浠ヤ负鐧惧垎姣旓紝甯px鍗曚綅鐨勫�肩瓑 + length: { + type: String, + default: '100%' + }, + // 绾挎潯鏂瑰悜锛宑ol-绔栧悜锛宺ow-妯悜 + direction: { + type: String, + default: 'row' + }, + // 鏄惁鏄剧ず缁嗚竟妗� + hairLine: { + type: Boolean, + default: true + }, + // 绾挎潯涓庝笂涓嬪乏鍙冲厓绱犵殑闂磋窛锛屽瓧绗︿覆褰㈠紡锛屽"30rpx"銆�"20rpx 30rpx" + margin: { + type: String, + default: '0' + }, + // 绾挎潯鐨勭被鍨嬶紝solid-瀹炵嚎锛宒ashed-鏂瑰舰铏氱嚎锛宒otted-鍦嗙偣铏氱嚎 + borderStyle: { + type: String, + default: 'solid' + } + }, + computed: { + lineStyle() { + let style = {}; + style.margin = this.margin; + // 濡傛灉鏄按骞崇嚎鏉★紝杈规楂樺害涓�1px锛屽啀閫氳繃transform缂╁皬涓�鍗婏紝灏辨槸0.5px浜� + if(this.direction == 'row') { + // 姝ゅ閲囩敤鍏煎鍒嗗紑鍐欙紝鍏煎nvue鐨勫啓娉� + style.borderBottomWidth = '1px'; + style.borderBottomStyle = this.borderStyle; + style.width = this.$u.addUnit(this.length); + if(this.hairLine) style.transform = 'scaleY(0.5)'; + } else { + // 濡傛灉鏄珫鍚戠嚎鏉★紝杈规瀹藉害涓�1px锛屽啀閫氳繃transform缂╁皬涓�鍗婏紝灏辨槸0.5px浜� + style.borderLeftWidth = '1px'; + style.borderLeftStyle = this.borderStyle; + style.height = this.$u.addUnit(this.length); + if(this.hairLine) style.transform = 'scaleX(0.5)'; + } + style.borderColor = this.color; + return style; + } + } + } +</script> + +<style scoped lang="scss"> + @import "../../libs/css/style.components.scss"; + + .u-line { + vertical-align: middle; + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-link/u-link.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-link/u-link.vue" new file mode 100644 index 0000000..2dd2a73 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-link/u-link.vue" @@ -0,0 +1,89 @@ +<template> + <text class="u-link" @tap.stop="openLink" :style="{ + color: color, + fontSize: fontSize + 'rpx', + borderBottom: underLine ? `1px solid ${lineColor ? lineColor : color}` : 'none', + paddingBottom: underLine ? '0rpx' : '0' + }"> + <slot></slot> + </text> +</template> + +<script> + /** + * link 瓒呴摼鎺� + * @description 璇ョ粍浠朵负瓒呴摼鎺ョ粍浠讹紝鍦ㄤ笉鍚屽钩鍙版湁涓嶅悓琛ㄧ幇褰㈠紡锛氬湪APP骞冲彴浼氶�氳繃plus鐜鎵撳紑鍐呯疆娴忚鍣紝鍦ㄥ皬绋嬪簭涓妸閾炬帴澶嶅埗鍒扮矘璐存澘锛屽悓鏃舵彁绀轰俊鎭紝鍦℉5涓�氳繃window.open鎵撳紑閾炬帴銆� + * @tutorial https://www.uviewui.com/components/link.html + * @property {String} color 鏂囧瓧棰滆壊锛堥粯璁�#606266锛� + * @property {String Number} font-size 瀛椾綋澶у皬锛屽崟浣峳px锛堥粯璁�28锛� + * @property {Boolean} under-line 鏄惁鏄剧ず涓嬪垝绾匡紙榛樿false锛� + * @property {String} href 璺宠浆鐨勯摼鎺ワ紝瑕佸甫涓奾ttp(s) + * @property {String} line-color 涓嬪垝绾块鑹诧紝榛樿鍚宑olor鍙傛暟棰滆壊 + * @property {String} mp-tips 鍚勪釜灏忕▼搴忓钩鍙版妸閾炬帴澶嶅埗鍒扮矘璐存澘鍚庣殑鎻愮ず璇紙榛樿鈥滈摼鎺ュ凡澶嶅埗锛岃鍦ㄦ祻瑙堝櫒鎵撳紑鈥濓級 + * @example <u-link href="http://www.uviewui.com">铚�閬撻毦锛岄毦浜庝笂闈掑ぉ</u-link> + */ + export default { + name: "u-link", + props: { + // 鏂囧瓧棰滆壊 + color: { + type: String, + default: '#2979ff' + }, + // 瀛椾綋澶у皬锛屽崟浣峳px + fontSize: { + type: [String, Number], + default: 28 + }, + // 鏄惁鏄剧ず涓嬪垝绾� + underLine: { + type: Boolean, + default: false + }, + // 瑕佽烦杞殑閾炬帴 + href: { + type: String, + default: '' + }, + // 灏忕▼搴忎腑澶嶅埗鍒扮矘璐存澘鐨勬彁绀鸿 + mpTips: { + type: String, + default: '閾炬帴宸插鍒讹紝璇峰湪娴忚鍣ㄦ墦寮�' + }, + // 涓嬪垝绾块鑹� + lineColor: { + type: String, + default: '' + } + }, + methods: { + openLink() { + // #ifdef APP-PLUS + plus.runtime.openURL(this.href) + // #endif + // #ifdef H5 + window.open(this.href) + // #endif + // #ifdef MP + uni.setClipboardData({ + data: this.href, + success: () => { + uni.hideToast(); + this.$nextTick(() => { + this.$u.toast(this.mpTips); + }) + } + }); + // #endif + } + } + } +</script> + +<style lang="scss" scoped> + @import "../../libs/css/style.components.scss"; + + .u-link { + line-height: 1; + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-loading-page/u-loading-page.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-loading-page/u-loading-page.vue" new file mode 100644 index 0000000..7e04401 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-loading-page/u-loading-page.vue" @@ -0,0 +1,25 @@ +<template> + <view class="u-loading-page"> + + </view> +</template> + +<script> + export default { + props: { + + }, + data() { + return { + + } + }, + methods: { + + } + } +</script> + +<style lang="scss" scoped> + +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-loading/u-loading.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-loading/u-loading.vue" new file mode 100644 index 0000000..c747f64 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-loading/u-loading.vue" @@ -0,0 +1,103 @@ +<template> + <view v-if="show" class="u-loading" :class="mode == 'circle' ? 'u-loading-circle' : 'u-loading-flower'" :style="[cricleStyle]"> + </view> +</template> + +<script> + /** + * loading 鍔犺浇鍔ㄧ敾 + * @description 璀︽缁勪欢涓轰竴涓皬鍔ㄧ敾锛岀洰鍓嶇敤鍦╱View鐨刲oadmore鍔犺浇鏇村鍜宻witch寮�鍏崇瓑缁勪欢鐨勬鍦ㄥ姞杞界姸鎬佸満鏅�� + * @tutorial https://www.uviewui.com/components/loading.html + * @property {String} mode 妯″紡閫夋嫨锛岃瀹樼綉璇存槑锛堥粯璁ircle锛� + * @property {String} color 鍔ㄧ敾娲诲姩鍖哄煙鐨勯鑹诧紝鍙 mode = flower 妯″紡鏈夋晥锛堥粯璁�#c7c7c7锛� + * @property {String Number} size 鍔犺浇鍥炬爣鐨勫ぇ灏忥紝鍗曚綅rpx锛堥粯璁�34锛� + * @property {Boolean} show 鏄惁鏄剧ず鍔ㄧ敾锛堥粯璁rue锛� + * @example <u-loading mode="circle"></u-loading> + */ + export default { + name: "u-loading", + props: { + // 鍔ㄧ敾鐨勭被鍨� + mode: { + type: String, + default: 'circle' + }, + // 鍔ㄧ敾鐨勯鑹� + color: { + type: String, + default: '#c7c7c7' + }, + // 鍔犺浇鍥炬爣鐨勫ぇ灏忥紝鍗曚綅rpx + size: { + type: [String, Number], + default: '34' + }, + // 鏄惁鏄剧ず鍔ㄧ敾 + show: { + type: Boolean, + default: true + } + }, + computed: { + // 鍔犺浇涓渾鍦堝姩鐢荤殑鏍峰紡 + cricleStyle() { + let style = {}; + style.width = this.size + 'rpx'; + style.height = this.size + 'rpx'; + if (this.mode == 'circle') style.borderColor = `#e4e4e4 #e4e4e4 #e4e4e4 ${this.color ? this.color : '#c7c7c7'}`; + return style; + }, + } + } +</script> + +<style lang="scss" scoped> + @import "../../libs/css/style.components.scss"; + + .u-loading-circle { + /* #ifndef APP-NVUE */ + display: inline-flex; + /* #endif */ + vertical-align: middle; + width: 28rpx; + height: 28rpx; + background: 0 0; + border-radius: 50%; + border: 2px solid; + border-color: #e5e5e5 #e5e5e5 #e5e5e5 #8f8d8e; + animation: u-circle 1s linear infinite; + } + + .u-loading-flower { + width: 20px; + height: 20px; + display: inline-block; + vertical-align: middle; + -webkit-animation: a 1s steps(12) infinite; + animation: u-flower 1s steps(12) infinite; + background: transparent url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMjAiIGhlaWdodD0iMTIwIiB2aWV3Qm94PSIwIDAgMTAwIDEwMCI+PHBhdGggZmlsbD0ibm9uZSIgZD0iTTAgMGgxMDB2MTAwSDB6Ii8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjRTlFOUU5IiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAgLTMwKSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iIzk4OTY5NyIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgzMCAxMDUuOTggNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjOUI5OTlBIiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKDYwIDc1Ljk4IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0EzQTFBMiIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSg5MCA2NSA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNBQkE5QUEiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoMTIwIDU4LjY2IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0IyQjJCMiIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgxNTAgNTQuMDIgNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjQkFCOEI5IiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKDE4MCA1MCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNDMkMwQzEiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTE1MCA0NS45OCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNDQkNCQ0IiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTEyMCA0MS4zNCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNEMkQyRDIiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTkwIDM1IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0RBREFEQSIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgtNjAgMjQuMDIgNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjRTJFMkUyIiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKC0zMCAtNS45OCA2NSkiLz48L3N2Zz4=) no-repeat; + background-size: 100%; + } + + @keyframes u-flower { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + + to { + -webkit-transform: rotate(1turn); + transform: rotate(1turn); + } + } + + @-webkit-keyframes u-circle { + 0% { + transform: rotate(0); + } + + 100% { + transform: rotate(360deg); + } + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-loadmore/u-loadmore.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-loadmore/u-loadmore.vue" new file mode 100644 index 0000000..6b852a8 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-loadmore/u-loadmore.vue" @@ -0,0 +1,203 @@ +<template> + <view class="u-load-more-wrap" :style="{ + backgroundColor: bgColor, + marginBottom: marginBottom + 'rpx', + marginTop: marginTop + 'rpx', + height: $u.addUnit(height) + }"> + <u-line color="#d4d4d4" length="50"></u-line> + <!-- 鍔犺浇涓拰娌℃湁鏇村鐨勭姸鎬佹墠鏄剧ず涓よ竟鐨勬í绾� --> + <view :class="status == 'loadmore' || status == 'nomore' ? 'u-more' : ''" class="u-load-more-inner"> + <view class="u-loadmore-icon-wrap"> + <u-loading class="u-loadmore-icon" :color="iconColor" :mode="iconType == 'circle' ? 'circle' : 'flower'" :show="status == 'loading' && icon"></u-loading> + </view> + <!-- 濡傛灉娌℃湁鏇村鐨勭姸鎬佷笅锛屾樉绀哄唴瀹逛负dot锛堢矖鐐癸級锛屽姞杞界壒瀹氭牱寮� --> + <view class="u-line-1" :style="[loadTextStyle]" :class="[(status == 'nomore' && isDot == true) ? 'u-dot-text' : 'u-more-text']" @tap="loadMore"> + {{ showText }} + </view> + </view> + <u-line color="#d4d4d4" length="50"></u-line> + </view> +</template> + +<script> + /** + * loadmore 鍔犺浇鏇村 + * @description 姝ょ粍浠朵竴鑸敤浜庢爣璇嗛〉闈㈠簳閮ㄥ姞杞芥暟鎹椂鐨勭姸鎬併�� + * @tutorial https://www.uviewui.com/components/loadMore.html + * @property {String} status 缁勪欢鐘舵�侊紙榛樿loadmore锛� + * @property {String} bg-color 缁勪欢鑳屾櫙棰滆壊锛屽湪椤甸潰鏄潪鐧借壊鏃朵細鐢ㄥ埌锛堥粯璁�#ffffff锛� + * @property {Boolean} icon 鍔犺浇涓椂鏄惁鏄剧ず鍥炬爣锛堥粯璁rue锛� + * @property {String} icon-type 鍔犺浇涓椂鐨勫浘鏍囩被鍨嬶紙榛樿circle锛� + * @property {String} icon-color icon-type涓篶ircle鏃舵湁鏁堬紝鍔犺浇涓殑鍔ㄧ敾鍥炬爣鐨勯鑹诧紙榛樿#b7b7b7锛� + * @property {Boolean} is-dot status涓簄omore鏃讹紝鍐呭鏄剧ず涓轰竴涓�"鈼�"锛堥粯璁alse锛� + * @property {String} color 瀛椾綋棰滆壊锛堥粯璁�#606266锛� + * @property {String Number} margin-top 鍒颁笂涓�涓浉閭诲厓绱犵殑璺濈 + * @property {String Number} margin-bottom 鍒颁笅涓�涓浉閭诲厓绱犵殑璺濈 + * @property {Object} load-text 鑷畾涔夋樉绀虹殑鏂囧瓧锛岃涓婃柟璇存槑绀轰緥 + * @event {Function} loadmore status涓簂oadmore鏃讹紝鐐瑰嚮缁勪欢浼氬彂鍑烘浜嬩欢 + * @example <u-loadmore :status="status" icon-type="iconType" load-text="loadText" /> + */ + export default { + name: "u-loadmore", + props: { + // 缁勪欢鑳屾櫙鑹� + bgColor: { + type: String, + default: 'transparent' + }, + // 鏄惁鏄剧ず鍔犺浇涓殑鍥炬爣 + icon: { + type: Boolean, + default: true + }, + // 瀛椾綋澶у皬 + fontSize: { + type: String, + default: '28' + }, + // 瀛椾綋棰滆壊 + color: { + type: String, + default: '#606266' + }, + // 缁勪欢鐘舵�侊紝loadmore-鍔犺浇鍓嶇殑鐘舵�侊紝loading-鍔犺浇涓殑鐘舵�侊紝nomore-娌℃湁鏇村鐨勭姸鎬� + status: { + type: String, + default: 'loadmore' + }, + // 鍔犺浇涓姸鎬佺殑鍥炬爣锛宖lower-鑺辨湹鐘跺浘鏍囷紝circle-鍦嗗湀鐘跺浘鏍� + iconType: { + type: String, + default: 'circle' + }, + // 鏄剧ず鐨勬枃瀛� + loadText: { + type: Object, + default () { + return { + loadmore: '鍔犺浇鏇村', + loading: '姝e湪鍔犺浇...', + nomore: '娌℃湁鏇村浜�' + } + } + }, + // 鍦ㄢ�滄病鏈夋洿澶氣�濈姸鎬佷笅锛屾槸鍚︽樉绀虹矖鐐� + isDot: { + type: Boolean, + default: false + }, + // 鍔犺浇涓樉绀哄渾鍦堝姩鐢绘椂锛屽姩鐢荤殑棰滆壊 + iconColor: { + type: String, + default: '#b7b7b7' + }, + // 涓婅竟璺� + marginTop: { + type: [String, Number], + default: 0 + }, + // 涓嬭竟璺� + marginBottom: { + type: [String, Number], + default: 0 + }, + // 楂樺害锛屽崟浣峳px + height: { + type: [String, Number], + default: 'auto' + } + }, + data() { + return { + // 绮楃偣 + dotText: "鈼�" + } + }, + computed: { + // 鍔犺浇鐨勬枃瀛楁樉绀虹殑鏍峰紡 + loadTextStyle() { + return { + color: this.color, + fontSize: this.fontSize + 'rpx', + position: 'relative', + zIndex: 1, + backgroundColor: this.bgColor, + // 濡傛灉鏄姞杞戒腑鐘舵�侊紝鍔ㄧ敾鍜屾枃瀛楅渶瑕佽窛绂昏繎涓�鐐� + } + }, + // 鍔犺浇涓渾鍦堝姩鐢荤殑鏍峰紡 + cricleStyle() { + return { + borderColor: `#e5e5e5 #e5e5e5 #e5e5e5 ${this.circleColor}` + } + }, + // 鍔犺浇涓姳鏈靛姩鐢诲舰寮� + // 鍔ㄧ敾鐢眀ase64鍥剧墖鐢熸垚锛屾殏涓嶆敮鎸佷慨鏀� + flowerStyle() { + return { + } + }, + // 鏄剧ず鐨勬彁绀烘枃瀛� + showText() { + let text = ''; + if(this.status == 'loadmore') text = this.loadText.loadmore; + else if(this.status == 'loading') text = this.loadText.loading; + else if(this.status == 'nomore' && this.isDot) text = this.dotText; + else text = this.loadText.nomore; + return text; + } + }, + methods: { + loadMore() { + // 鍙湁鍦ㄢ�滃姞杞芥洿澶氣�濈殑鐘舵�佷笅鎵嶅彂閫佺偣鍑讳簨浠讹紝鍐呭涓嶆弧涓�灞忔椂鏃犳硶瑙﹀彂搴曢儴涓婃媺浜嬩欢锛屾墍浠ラ渶瑕佺偣鍑绘潵瑙﹀彂 + if(this.status == 'loadmore') this.$emit('loadmore'); + } + } + } +</script> + +<style scoped lang="scss"> + @import "../../libs/css/style.components.scss"; + + /* #ifdef MP */ + // 鍦╩p.scss涓紝璧嬩簣浜唘-line涓篺lex: 1锛岃繖閲岄渶瑕佷竴涓槑纭殑闀垮害锛屾墍浠ラ噸缃帀瀹� + // 鍦ㄧ粍浠跺唴閮紝鎶婄粍浠跺悕(u-line)褰撳仛閫夋嫨鍣紝鍦ㄥ井淇″紑鍙戝伐鍏蜂細鎻愮ず涓嶅悎娉曪紝浣嗕笉褰卞搷浣跨敤 + u-line { + flex: none; + } + /* #endif */ + + .u-load-more-wrap { + @include vue-flex; + justify-content: center; + align-items: center; + } + + .u-load-more-inner { + @include vue-flex; + justify-content: center; + align-items: center; + padding: 0 12rpx; + } + + .u-more { + position: relative; + @include vue-flex; + justify-content: center; + } + + .u-dot-text { + font-size: 28rpx; + } + + .u-loadmore-icon-wrap { + margin-right: 8rpx; + } + + .u-loadmore-icon { + @include vue-flex; + align-items: center; + justify-content: center; + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-mask/u-mask.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-mask/u-mask.vue" new file mode 100644 index 0000000..0b55d9d --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-mask/u-mask.vue" @@ -0,0 +1,123 @@ +<template> + <view class="u-mask" hover-stop-propagation :style="[maskStyle, zoomStyle]" @tap="click" @touchmove.stop.prevent="() => {}" :class="{ + 'u-mask-zoom': zoom, + 'u-mask-show': show + }"> + <slot /> + </view> +</template> + +<script> + /** + * mask 閬僵 + * @description 鍒涘缓涓�涓伄缃╁眰锛岀敤浜庡己璋冪壒瀹氱殑椤甸潰鍏冪礌锛屽苟闃绘鐢ㄦ埛瀵归伄缃╀笅灞傜殑鍐呭杩涜鎿嶄綔锛屼竴鑸敤浜庡脊绐楀満鏅� + * @tutorial https://www.uviewui.com/components/mask.html + * @property {Boolean} show 鏄惁鏄剧ず閬僵锛堥粯璁alse锛� + * @property {String Number} z-index z-index 灞傜骇锛堥粯璁�1070锛� + * @property {Object} custom-style 鑷畾涔夋牱寮忓璞★紝瑙佷笂鏂硅鏄� + * @property {String Number} duration 鍔ㄧ敾鏃堕暱锛屽崟浣嶆绉掞紙榛樿300锛� + * @property {Boolean} zoom 鏄惁浣跨敤scale瀵归伄缃╄繘琛岀缉鏀撅紙榛樿true锛� + * @property {Boolean} mask-click-able 閬僵鏄惁鍙偣鍑伙紝涓篺alse鏃剁偣鍑讳笉浼氬彂閫乧lick浜嬩欢锛堥粯璁rue锛� + * @event {Function} click mask-click-able涓簍rue鏃讹紝鐐瑰嚮閬僵鍙戦�佹浜嬩欢 + * @example <u-mask :show="show" @click="show = false"></u-mask> + */ + export default { + name: "u-mask", + props: { + // 鏄惁鏄剧ず閬僵 + show: { + type: Boolean, + default: false + }, + // 灞傜骇z-index + zIndex: { + type: [Number, String], + default: '' + }, + // 鐢ㄦ埛鑷畾涔夋牱寮� + customStyle: { + type: Object, + default () { + return {} + } + }, + // 閬僵鐨勫姩鐢绘牱寮忥紝 鏄惁浣跨敤浣跨敤zoom杩涜scale杩涜缂╂斁 + zoom: { + type: Boolean, + default: true + }, + // 閬僵鐨勮繃娓℃椂闂达紝鍗曚綅涓簃s + duration: { + type: [Number, String], + default: 300 + }, + // 鏄惁鍙互閫氳繃鐐瑰嚮閬僵杩涜鍏抽棴 + maskClickAble: { + type: Boolean, + default: true + } + }, + data() { + return { + zoomStyle: { + transform: '' + }, + scale: 'scale(1.2, 1.2)' + } + }, + watch: { + show(n) { + if(n && this.zoom) { + // 褰撳睍绀洪伄缃╃殑鏃跺�欙紝璁剧疆scale涓�1锛岃揪鍒扮缉灏�(鍘熸潵涓�1.2)鐨勬晥鏋� + this.zoomStyle.transform = 'scale(1, 1)'; + } else if(!n && this.zoom) { + // 褰撻殣钘忛伄缃╃殑鏃跺�欙紝璁剧疆scale涓�1.2锛岃揪鍒版斁澶�(鍥犱负鏄剧ず閬僵鏃跺凡閲嶇疆涓�1)鐨勬晥鏋� + this.zoomStyle.transform = this.scale; + } + } + }, + computed: { + maskStyle() { + let style = {}; + style.backgroundColor = "rgba(0, 0, 0, 0.6)"; + if(this.show) style.zIndex = this.zIndex ? this.zIndex : this.$u.zIndex.mask; + else style.zIndex = -1; + style.transition = `all ${this.duration / 1000}s ease-in-out`; + // 鍒ゆ柇鐢ㄦ埛浼犻�掔殑瀵硅薄鏄惁涓虹┖锛屼笉涓虹┖灏辫繘琛屽悎骞� + if (Object.keys(this.customStyle).length) style = { + ...style, + ...this.customStyle + }; + return style; + } + }, + methods: { + click() { + if (!this.maskClickAble) return; + this.$emit('click'); + } + } + } +</script> + +<style lang="scss" scoped> + @import "../../libs/css/style.components.scss"; + + .u-mask { + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + opacity: 0; + transition: transform 0.3s; + } + + .u-mask-show { + opacity: 1; + } + + .u-mask-zoom { + transform: scale(1.2, 1.2); + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-message-input/u-message-input.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-message-input/u-message-input.vue" new file mode 100644 index 0000000..41e0719 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-message-input/u-message-input.vue" @@ -0,0 +1,311 @@ +<template> + <view class="u-char-box"> + <view class="u-char-flex"> + <input :disabled="disabledKeyboard" :value="valueModel" type="number" :focus="focus" :maxlength="maxlength" class="u-input" @input="getVal"/> + <view v-for="(item, index) in loopCharArr" :key="index"> + <view :class="[breathe && charArrLength == index ? 'u-breathe' : '', 'u-char-item', + charArrLength === index && mode == 'box' ? 'u-box-active' : '', + mode === 'box' ? 'u-box' : '']" :style="{ + fontWeight: bold ? 'bold' : 'normal', + fontSize: fontSize + 'rpx', + width: width + 'rpx', + height: width + 'rpx', + color: inactiveColor, + borderColor: charArrLength === index && mode == 'box' ? activeColor : inactiveColor + }"> + <view class="u-placeholder-line" :style="{ + display: charArrLength === index ? 'block' : 'none', + height: width * 0.5 +'rpx' + }" + v-if="mode !== 'middleLine'" + ></view> + <view v-if="mode === 'middleLine' && charArrLength <= index" :class="[breathe && charArrLength == index ? 'u-breathe' : '', charArrLength === index ? 'u-middle-line-active' : '']" + class="u-middle-line" :style="{height: bold ? '4px' : '2px', background: charArrLength === index ? activeColor : inactiveColor}"></view> + <view v-if="mode === 'bottomLine'" :class="[breathe && charArrLength == index ? 'u-breathe' : '', charArrLength === index ? 'u-buttom-line-active' : '']" + class="u-bottom-line" :style="{height: bold ? '4px' : '2px', background: charArrLength === index ? activeColor : inactiveColor}"></view> + <block v-if="!dotFill"> {{ charArr[index] ? charArr[index] : ''}}</block> + <block v-else> + <text class="u-dot">{{ charArr[index] ? '鈼�' : ''}}</text> + </block> + </view> + </view> + </view> + </view> +</template> + +<script> + /** + * messageInput 楠岃瘉鐮佽緭鍏ユ + * @description 璇ョ粍浠朵竴鑸敤浜庨獙璇佺敤鎴风煭淇¢獙璇佺爜鐨勫満鏅紝涔熷彲浠ョ粨鍚坲View鐨勯敭鐩樼粍浠朵娇鐢� + * @tutorial https://www.uviewui.com/components/messageInput.html + * @property {String Number} maxlength 杈撳叆瀛楃涓暟锛堥粯璁�4锛� + * @property {Boolean} dot-fill 鏄惁鐢ㄥ渾鐐瑰~鍏咃紙榛樿false锛� + * @property {String} mode 妯″紡閫夋嫨锛岃涓婃柟"鍩烘湰浣跨敤"璇存槑锛堥粯璁ox锛� + * @property {String Number} value 棰勭疆鍊� + * @property {Boolean} breathe 鏄惁寮�鍚懠鍚告晥鏋滐紝瑙佷笂鏂硅鏄庯紙榛樿true锛� + * @property {Boolean} focus 鏄惁鑷姩鑾峰彇鐒︾偣锛堥粯璁alse锛� + * @property {Boolean} bold 瀛椾綋鍜岃緭鍏ユí绾挎槸鍚﹀姞绮楋紙榛樿true锛� + * @property {String Number} font-size 瀛椾綋澶у皬锛屽崟浣峳px锛堥粯璁�60锛� + * @property {String} active-color 褰撳墠婵�娲昏緭鍏ユ鐨勬牱寮忥紙榛樿#2979ff锛� + * @property {String} inactive-color 闈炴縺娲昏緭鍏ユ鐨勬牱寮忥紝鏂囧瓧棰滆壊鍚屾鍊硷紙榛樿#606266锛� + * @property {String | Number} width 杈撳叆妗嗗搴︼紝鍗曚綅rpx锛岄珮绛変簬瀹斤紙榛樿80锛� + * @property {Boolean} disabled-keyboard 绂佹鐐瑰嚮杈撳叆妗嗗敜璧风郴缁熼敭鐩橈紙榛樿false锛� + * @event {Function} change 杈撳叆鍐呭鍙戠敓鏀瑰彉鏃惰Е鍙戯紝鍏蜂綋瑙佸畼缃戣鏄� + * @event {Function} finish 杈撳叆瀛楃涓暟杈緈axlength鍊兼椂瑙﹀彂锛岃瀹樼綉璇存槑 + * @example <u-message-input mode="bottomLine"></u-message-input> + */ + export default { + name: "u-message-input", + props: { + // 鏈�澶ц緭鍏ラ暱搴� + maxlength: { + type: [Number, String], + default: 4 + }, + // 鏄惁鐢ㄥ渾鐐瑰~鍏� + dotFill: { + type: Boolean, + default: false + }, + // 鏄剧ず妯″紡锛宐ox-鐩掑瓙妯″紡锛宐ottomLine-妯嚎鍦ㄥ簳閮ㄦā寮忥紝middleLine-妯嚎鍦ㄤ腑閮ㄦā寮� + mode: { + type: String, + default: "box" + }, + // 棰勭疆鍊� + value: { + type: [String, Number], + default: '' + }, + // 褰撳墠婵�娲昏緭鍏tem锛屾槸鍚﹀甫鏈夊懠鍚告晥鏋� + breathe: { + type: Boolean, + default: true + }, + // 鏄惁鑷姩鑾峰彇鐒︾偣 + focus: { + type: Boolean, + default: false + }, + // 瀛椾綋鏄惁鍔犵矖 + bold: { + type: Boolean, + default: false + }, + // 瀛椾綋澶у皬 + fontSize: { + type: [String, Number], + default: 60 + }, + // 婵�娲绘牱寮� + activeColor: { + type: String, + default: '#2979ff' + }, + // 鏈縺娲荤殑鏍峰紡 + inactiveColor: { + type: String, + default: '#606266' + }, + // 杈撳叆妗嗙殑澶у皬锛屽崟浣峳px锛屽绛変簬楂� + width: { + type: [Number, String], + default: '80' + }, + // 鏄惁闅愯棌鍘熺敓閿洏锛屽鏋滄兂鐢ㄨ嚜瀹氫箟閿洏鐨勮瘽锛岄渶璁剧疆姝ゅ弬鏁颁负true + disabledKeyboard: { + type: Boolean, + default: false + } + }, + watch: { + // maxlength: { + // // 姝ゅ�艰缃负true锛屼細鍦ㄧ粍浠跺姞杞藉悗鏃犻渶maxlength鍙樺寲灏变細鎵ц涓�娆℃湰鐩戝惉鍑芥暟锛屾棤闇�鍐峜reated鐢熷懡鍛ㄦ湡涓鐞� + // immediate: true, + // handler(val) { + // this.maxlength = Number(val); + // } + // }, + value: { + immediate: true, + handler(val) { + // 杞负瀛楃涓� + val = String(val); + // 瓒呭嚭閮ㄥ垎鎴帀 + this.valueModel = val.substring(0, this.maxlength); + } + }, + }, + data() { + return { + valueModel: "" + } + }, + computed: { + // 鏄惁鏄剧ず鍛煎惛鐏晥鏋� + animationClass() { + return (index) => { + if (this.breathe && this.charArr.length == index) return 'u-breathe'; + else return ''; + } + }, + // 鐢ㄤ簬鏄剧ず瀛楃 + charArr() { + return this.valueModel.split(''); + }, + charArrLength() { + return this.charArr.length; + }, + // 鏍规嵁闀垮害锛屽惊鐜緭鍏ユ鐨勪釜鏁帮紝鍥犱负澶存潯灏忕▼搴忔暟鍊间笉鑳界敤浜巚-for + loopCharArr() { + return new Array(this.maxlength); + } + }, + methods: { + getVal(e) { + let { + value + } = e.detail + this.valueModel = value; + // 鍒ゆ柇闀垮害鏄惁瓒呭嚭浜唌axlength鍊硷紝鐞嗚涓婁笉浼氬彂鐢燂紝鍥犱负input缁勪欢璁剧疆浜唌axlength灞炴�у�� + if (String(value).length > this.maxlength) return; + // 鏈揪鍒癿axlength涔嬪墠锛屽彂閫乧hange浜嬩欢锛岃揪鍒板悗鍙戦�乫inish浜嬩欢 + this.$emit('change', value); + if (String(value).length == this.maxlength) { + this.$emit('finish', value); + } + } + } + } +</script> + +<style scoped lang="scss"> + @import "../../libs/css/style.components.scss"; + + @keyframes breathe { + 0% { + opacity: 0.3; + } + + 50% { + opacity: 1; + } + + 100% { + opacity: 0.3; + } + } + + .u-char-box { + text-align: center; + } + + .u-char-flex { + @include vue-flex; + justify-content: center; + flex-wrap: wrap; + position: relative; + } + + .u-input { + position: absolute; + top: 0; + left: -100%; + width: 200%; + height: 100%; + text-align: left; + z-index: 9; + opacity: 0; + background: none; + } + + .u-char-item { + position: relative; + width: 90rpx; + height: 90rpx; + margin: 10rpx 10rpx; + font-size: 60rpx; + font-weight: bold; + color: $u-main-color; + line-height: 90rpx; + @include vue-flex; + justify-content: center; + align-items: center; + } + + .u-middle-line { + border: none; + } + + .u-box { + box-sizing: border-box; + border: 2rpx solid #cccccc; + border-radius: 6rpx; + } + + .u-box-active { + overflow: hidden; + animation-timing-function: ease-in-out; + animation-duration: 1500ms; + animation-iteration-count: infinite; + animation-direction: alternate; + border: 2rpx solid $u-type-primary; + } + + .u-middle-line-active { + background: $u-type-primary; + } + + .u-breathe { + animation: breathe 2s infinite ease; + } + + .u-placeholder-line { + /* #ifndef APP-NVUE */ + display: none; + /* #endif */ + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + width: 2rpx; + height: 40rpx; + background: #333333; + animation: twinkling 1.5s infinite ease; + } + + .u-animation-breathe { + animation-name: breathe; + } + + .u-dot { + font-size: 34rpx; + line-height: 34rpx; + } + + .u-middle-line { + height: 4px; + background: #000000; + width: 80%; + position: absolute; + border-radius: 2px; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + } + + .u-buttom-line-active { + background: $u-type-primary; + } + + .u-bottom-line { + height: 4px; + background: #000000; + width: 80%; + position: absolute; + border-radius: 2px; + bottom: 0; + left: 50%; + transform: translate(-50%); + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-modal/u-modal.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-modal/u-modal.vue" new file mode 100644 index 0000000..ce58113 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-modal/u-modal.vue" @@ -0,0 +1,283 @@ +<template> + <view> + <u-popup :zoom="zoom" mode="center" :popup="false" :z-index="uZIndex" v-model="value" :length="width" + :mask-close-able="maskCloseAble" :border-radius="borderRadius" @close="popupClose" :negative-top="negativeTop"> + <view class="u-model"> + <view v-if="showTitle" class="u-model__title u-line-1" :style="[titleStyle]">{{ title }}</view> + <view class="u-model__content"> + <view :style="[contentStyle]" v-if="$slots.default || $slots.$default"> + <slot /> + </view> + <view v-else class="u-model__content__message" :style="[contentStyle]">{{ content }}</view> + </view> + <view class="u-model__footer u-border-top" v-if="showCancelButton || showConfirmButton"> + <view v-if="showCancelButton" :hover-stay-time="100" hover-class="u-model__btn--hover" class="u-model__footer__button" + :style="[cancelBtnStyle]" @tap="cancel"> + {{cancelText}} + </view> + <view v-if="showConfirmButton || $slots['confirm-button']" :hover-stay-time="100" :hover-class="asyncClose ? 'none' : 'u-model__btn--hover'" + class="u-model__footer__button hairline-left" :style="[confirmBtnStyle]" @tap="confirm"> + <slot v-if="$slots['confirm-button']" name="confirm-button"></slot> + <block v-else> + <u-loading mode="circle" :color="confirmColor" v-if="loading"></u-loading> + <block v-else> + {{confirmText}} + </block> + </block> + </view> + </view> + </view> + </u-popup> + </view> +</template> + +<script> + /** + * modal 妯℃�佹 + * @description 寮瑰嚭妯℃�佹锛屽父鐢ㄤ簬娑堟伅鎻愮ず銆佹秷鎭‘璁ゃ�佸湪褰撳墠椤甸潰鍐呭畬鎴愮壒瀹氱殑浜や簰鎿嶄綔 + * @tutorial https://www.uviewui.com/components/modal.html + * @property {Boolean} value 鏄惁鏄剧ず妯℃�佹 + * @property {String | Number} z-index 灞傜骇 + * @property {String} title 妯℃�佹鏍囬锛堥粯璁�"鎻愮ず"锛� + * @property {String | Number} width 妯℃�佹瀹藉害锛堥粯璁�600锛� + * @property {String} content 妯℃�佹鍐呭锛堥粯璁�"鍐呭"锛� + * @property {Boolean} show-title 鏄惁鏄剧ず鏍囬锛堥粯璁rue锛� + * @property {Boolean} async-close 鏄惁寮傛鍏抽棴锛屽彧瀵圭‘瀹氭寜閽湁鏁堬紙榛樿false锛� + * @property {Boolean} show-confirm-button 鏄惁鏄剧ず纭鎸夐挳锛堥粯璁rue锛� + * @property {Stringr | Number} negative-top modal寰�涓婂亸绉荤殑鍊� + * @property {Boolean} show-cancel-button 鏄惁鏄剧ず鍙栨秷鎸夐挳锛堥粯璁alse锛� + * @property {Boolean} mask-close-able 鏄惁鍏佽鐐瑰嚮閬僵鍏抽棴modal锛堥粯璁alse锛� + * @property {String} confirm-text 纭鎸夐挳鐨勬枃瀛楀唴瀹癸紙榛樿"纭"锛� + * @property {String} cancel-text 鍙栨秷鎸夐挳鐨勬枃瀛楀唴瀹癸紙榛樿"鍙栨秷"锛� + * @property {String} cancel-color 鍙栨秷鎸夐挳鐨勯鑹诧紙榛樿"#606266"锛� + * @property {String} confirm-color 纭鎸夐挳鐨勬枃瀛楀唴瀹癸紙榛樿"#2979ff"锛� + * @property {String | Number} border-radius 妯℃�佹鍦嗚鍊硷紝鍗曚綅rpx锛堥粯璁�16锛� + * @property {Object} title-style 鑷畾涔夋爣棰樻牱寮忥紝瀵硅薄褰㈠紡 + * @property {Object} content-style 鑷畾涔夊唴瀹规牱寮忥紝瀵硅薄褰㈠紡 + * @property {Object} cancel-style 鑷畾涔夊彇娑堟寜閽牱寮忥紝瀵硅薄褰㈠紡 + * @property {Object} confirm-style 鑷畾涔夌‘璁ゆ寜閽牱寮忥紝瀵硅薄褰㈠紡 + * @property {Boolean} zoom 鏄惁寮�鍚缉鏀炬ā寮忥紙榛樿true锛� + * @event {Function} confirm 纭鎸夐挳琚偣鍑� + * @event {Function} cancel 鍙栨秷鎸夐挳琚偣鍑� + * @example <u-modal :src="title" :content="content"></u-modal> + */ + export default { + name: 'u-modal', + props: { + // 鏄惁鏄剧ずModal + value: { + type: Boolean, + default: false + }, + // 灞傜骇z-index + zIndex: { + type: [Number, String], + default: '' + }, + // 鏍囬 + title: { + type: [String], + default: '鎻愮ず' + }, + // 寮圭獥瀹藉害锛屽彲浠ユ槸鏁板��(rpx)锛岀櫨鍒嗘瘮锛宎uto绛� + width: { + type: [Number, String], + default: 600 + }, + // 寮圭獥鍐呭 + content: { + type: String, + default: '鍐呭' + }, + // 鏄惁鏄剧ず鏍囬 + showTitle: { + type: Boolean, + default: true + }, + // 鏄惁鏄剧ず纭鎸夐挳 + showConfirmButton: { + type: Boolean, + default: true + }, + // 鏄惁鏄剧ず鍙栨秷鎸夐挳 + showCancelButton: { + type: Boolean, + default: false + }, + // 纭鏂囨 + confirmText: { + type: String, + default: '纭' + }, + // 鍙栨秷鏂囨 + cancelText: { + type: String, + default: '鍙栨秷' + }, + // 纭鎸夐挳棰滆壊 + confirmColor: { + type: String, + default: '#2979ff' + }, + // 鍙栨秷鏂囧瓧棰滆壊 + cancelColor: { + type: String, + default: '#606266' + }, + // 鍦嗚鍊� + borderRadius: { + type: [Number, String], + default: 16 + }, + // 鏍囬鐨勬牱寮� + titleStyle: { + type: Object, + default () { + return {} + } + }, + // 鍐呭鐨勬牱寮� + contentStyle: { + type: Object, + default () { + return {} + } + }, + // 鍙栨秷鎸夐挳鐨勬牱寮� + cancelStyle: { + type: Object, + default () { + return {} + } + }, + // 纭畾鎸夐挳鐨勬牱寮� + confirmStyle: { + type: Object, + default () { + return {} + } + }, + // 鏄惁寮�鍚缉鏀炬晥鏋� + zoom: { + type: Boolean, + default: true + }, + // 鏄惁寮傛鍏抽棴锛屽彧瀵圭‘瀹氭寜閽湁鏁� + asyncClose: { + type: Boolean, + default: false + }, + // 鏄惁鍏佽鐐瑰嚮閬僵鍏抽棴modal + maskCloseAble: { + type: Boolean, + default: false + }, + // 缁欎竴涓礋鐨刴argin-top锛屽線涓婂亸绉伙紝閬垮厤鍜岄敭鐩橀噸鍚堢殑鎯呭喌 + negativeTop: { + type: [String, Number], + default: 0 + } + }, + data() { + return { + loading: false, // 纭鎸夐挳鏄惁姝e湪鍔犺浇涓� + } + }, + computed: { + cancelBtnStyle() { + return Object.assign({ + color: this.cancelColor + }, this.cancelStyle); + }, + confirmBtnStyle() { + return Object.assign({ + color: this.confirmColor + }, this.confirmStyle); + }, + uZIndex() { + return this.zIndex ? this.zIndex : this.$u.zIndex.popup; + } + }, + watch: { + // 濡傛灉鏄紓姝ュ叧闂椂锛屽閮ㄤ慨鏀箆-model鐨勫�间负false鏃讹紝閲嶇疆鍐呴儴鐨刲oading鐘舵�� + // 閬垮厤涓嬫鎵撳紑鐨勬椂鍊欙紝鐘舵�佹贩涔� + value(n) { + if (n === true) this.loading = false; + } + }, + methods: { + confirm() { + // 寮傛鍏抽棴 + if (this.asyncClose) { + this.loading = true; + } else { + this.$emit('input', false); + } + this.$emit('confirm'); + }, + cancel() { + this.$emit('cancel'); + this.$emit('input', false); + // 鐩墠popup寮圭獥鍏抽棴鏈変竴涓欢鏃舵搷浣滐紝姝ゅ鍋氫竴涓欢鏃� + // 閬垮厤纭鎸夐挳鏂囧瓧鍙樻垚浜�"纭畾"瀛楁牱锛宮odal杩樻病娑堝け锛岄�犳垚瑙嗚涓嶅ソ鐨勬晥鏋� + setTimeout(() => { + this.loading = false; + }, 300); + }, + // 鐐瑰嚮閬僵鍏抽棴modal锛岃缃畍-model鐨勫�间负false锛屽惁鍒欐棤娉曠浜屾寮硅捣modal + popupClose() { + this.$emit('input', false); + }, + // 娓呴櫎鍔犺浇涓殑鐘舵�� + clearLoading() { + this.loading = false; + } + } + }; +</script> + +<style lang="scss" scoped> + @import "../../libs/css/style.components.scss"; + + .u-model { + height: auto; + overflow: hidden; + font-size: 32rpx; + background-color: #fff; + + &__btn--hover { + background-color: rgb(230, 230, 230); + } + + &__title { + padding-top: 48rpx; + font-weight: 500; + text-align: center; + color: $u-main-color; + } + + &__content { + &__message { + padding: 48rpx; + font-size: 30rpx; + text-align: center; + color: $u-content-color; + } + } + + &__footer { + @include vue-flex; + + &__button { + flex: 1; + height: 100rpx; + line-height: 100rpx; + font-size: 32rpx; + box-sizing: border-box; + cursor: pointer; + text-align: center; + border-radius: 4rpx; + } + } + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-navbar/u-navbar.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-navbar/u-navbar.vue" new file mode 100644 index 0000000..450242e --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-navbar/u-navbar.vue" @@ -0,0 +1,315 @@ +<template> + <view class=""> + <view class="u-navbar" :style="[navbarStyle]" :class="{ 'u-navbar-fixed': isFixed, 'u-border-bottom': borderBottom }"> + <view class="u-status-bar" :style="{ height: statusBarHeight + 'px' }"></view> + <view class="u-navbar-inner" :style="[navbarInnerStyle]"> + <view class="u-back-wrap" v-if="isBack" @tap="goBack"> + <view class="u-icon-wrap"> + <u-icon :name="backIconName" :color="backIconColor" :size="backIconSize"></u-icon> + </view> + <view class="u-icon-wrap u-back-text u-line-1" v-if="backText" :style="[backTextStyle]">{{ backText }}</view> + </view> + <view class="u-navbar-content-title" v-if="title" :style="[titleStyle]"> + <view + class="u-title u-line-1" + :style="{ + color: titleColor, + fontSize: titleSize + 'rpx', + fontWeight: titleBold ? 'bold' : 'normal' + }"> + {{ title }} + </view> + </view> + <view class="u-slot-content"> + <slot></slot> + </view> + <view class="u-slot-right"> + <slot name="right"></slot> + </view> + </view> + </view> + <!-- 瑙e喅fixed瀹氫綅鍚庡鑸爮濉岄櫡鐨勯棶棰� --> + <view class="u-navbar-placeholder" v-if="isFixed && !immersive" :style="{ width: '100%', height: Number(navbarHeight) + statusBarHeight + 'px' }"></view> + </view> +</template> + +<script> + // 鑾峰彇绯荤粺鐘舵�佹爮鐨勯珮搴� + let systemInfo = uni.getSystemInfoSync(); + let menuButtonInfo = {}; + // 濡傛灉鏄皬绋嬪簭锛岃幏鍙栧彸涓婅鑳跺泭鐨勫昂瀵镐俊鎭紝閬垮厤瀵艰埅鏍忓彸渚у唴瀹逛笌鑳跺泭閲嶅彔(鏀粯瀹濆皬绋嬪簭闈炴湰API锛屽皻鏈吋瀹�) + // #ifdef MP-WEIXIN || MP-BAIDU || MP-TOUTIAO || MP-QQ + menuButtonInfo = uni.getMenuButtonBoundingClientRect(); + // #endif + /** + * navbar 鑷畾涔夊鑸爮 + * @description 姝ょ粍浠朵竴鑸敤浜庡湪鐗规畩鎯呭喌涓嬶紝闇�瑕佽嚜瀹氫箟瀵艰埅鏍忕殑鏃跺�欑敤鍒帮紝涓�鑸缓璁娇鐢╱niapp鑷甫鐨勫鑸爮銆� + * @tutorial https://www.uviewui.com/components/navbar.html + * @property {String Number} height 瀵艰埅鏍忛珮搴�(涓嶅寘鎷姸鎬佹爮楂樺害鍦ㄥ唴锛屽唴閮ㄨ嚜鍔ㄥ姞涓�)锛屾敞鎰忚繖閲岀殑鍗曚綅鏄痯x锛堥粯璁�44锛� + * @property {String} back-icon-color 宸﹁竟杩斿洖鍥炬爣鐨勯鑹诧紙榛樿#606266锛� + * @property {String} back-icon-name 宸﹁竟杩斿洖鍥炬爣鐨勫悕绉帮紝鍙兘涓簎View鑷甫鐨勫浘鏍囷紙榛樿arrow-left锛� + * @property {String Number} back-icon-size 宸﹁竟杩斿洖鍥炬爣鐨勫ぇ灏忥紝鍗曚綅rpx锛堥粯璁�30锛� + * @property {String} back-text 杩斿洖鍥炬爣鍙宠竟鐨勮緟鍔╂彁绀烘枃瀛� + * @property {Object} back-text-style 杩斿洖鍥炬爣鍙宠竟鐨勮緟鍔╂彁绀烘枃瀛楃殑鏍峰紡锛屽璞″舰寮忥紙榛樿{ color: '#606266' }锛� + * @property {String} title 瀵艰埅鏍忔爣棰橈紝濡傝缃负绌哄瓧绗︼紝灏嗕細闅愯棌鏍囬鍗犱綅鍖哄煙 + * @property {String Number} title-width 瀵艰埅鏍忔爣棰樼殑鏈�澶у搴︼紝鍐呭瓒呭嚭浼氫互鐪佺暐鍙烽殣钘忥紝鍗曚綅rpx锛堥粯璁�250锛� + * @property {String} title-color 鏍囬鐨勯鑹诧紙榛樿#606266锛� + * @property {String Number} title-size 瀵艰埅鏍忔爣棰樺瓧浣撳ぇ灏忥紝鍗曚綅rpx锛堥粯璁�32锛� + * @property {Function} custom-back 鑷畾涔夎繑鍥為�昏緫鏂规硶 + * @property {String Number} z-index 鍥哄畾鍦ㄩ《閮ㄦ椂鐨剒-index鍊硷紙榛樿980锛� + * @property {Boolean} is-back 鏄惁鏄剧ず瀵艰埅鏍忓乏杈硅繑鍥炲浘鏍囧拰杈呭姪鏂囧瓧锛堥粯璁rue锛� + * @property {Object} background 瀵艰埅鏍忚儗鏅缃紝瑙佸畼缃戣鏄庯紙榛樿{ background: '#ffffff' }锛� + * @property {Boolean} is-fixed 瀵艰埅鏍忔槸鍚﹀浐瀹氬湪椤堕儴锛堥粯璁rue锛� + * @property {Boolean} immersive 娌夋蹈寮忥紝鍏佽fixed瀹氫綅鍚庡鑸爮濉岄櫡锛屼粎fixed瀹氫綅涓嬬敓鏁堬紙榛樿false锛� + * @property {Boolean} border-bottom 瀵艰埅鏍忓簳閮ㄦ槸鍚︽樉绀轰笅杈规锛屽瀹氫箟浜嗚緝娣辩殑鑳屾櫙棰滆壊锛屽彲鍙栨秷姝ゅ�硷紙榛樿true锛� + * @example <u-navbar back-text="杩斿洖" title="鍓戞湭閰嶅Ε锛屽嚭闂ㄥ凡鏄睙婀�"></u-navbar> + */ + export default { + name: "u-navbar", + props: { + // 瀵艰埅鏍忛珮搴︼紝鍗曚綅px锛岄潪rpx + height: { + type: [String, Number], + default: '' + }, + // 杩斿洖绠ご鐨勯鑹� + backIconColor: { + type: String, + default: '#606266' + }, + // 宸﹁竟杩斿洖鐨勫浘鏍� + backIconName: { + type: String, + default: 'nav-back' + }, + // 宸﹁竟杩斿洖鍥炬爣鐨勫ぇ灏忥紝rpx + backIconSize: { + type: [String, Number], + default: '44' + }, + // 杩斿洖鐨勬枃瀛楁彁绀� + backText: { + type: String, + default: '' + }, + // 杩斿洖鐨勬枃瀛楃殑 鏍峰紡 + backTextStyle: { + type: Object, + default () { + return { + color: '#606266' + } + } + }, + // 瀵艰埅鏍忔爣棰� + title: { + type: String, + default: '' + }, + // 鏍囬鐨勫搴︼紝濡傛灉闇�瑕佽嚜瀹氫箟鍙充晶鍐呭锛屼笖鍙充晶鍐呭寰堝鏃讹紝鍙兘闇�瑕佸噺灏戣繖涓搴︼紝鍗曚綅rpx + titleWidth: { + type: [String, Number], + default: '250' + }, + // 鏍囬鐨勯鑹� + titleColor: { + type: String, + default: '#606266' + }, + // 鏍囬瀛椾綋鏄惁鍔犵矖 + titleBold: { + type: Boolean, + default: false + }, + // 鏍囬鐨勫瓧浣撳ぇ灏� + titleSize: { + type: [String, Number], + default: 32 + }, + isBack: { + type: [Boolean, String], + default: true + }, + // 瀵硅薄褰㈠紡锛屽洜涓虹敤鎴峰彲鑳藉畾涔変竴涓函鑹诧紝鎴栬�呯嚎鎬ф笎鍙樼殑棰滆壊 + background: { + type: Object, + default () { + return { + background: '#ffffff' + } + } + }, + // 瀵艰埅鏍忔槸鍚﹀浐瀹氬湪椤堕儴 + isFixed: { + type: Boolean, + default: true + }, + // 鏄惁娌夋蹈寮忥紝鍏佽fixed瀹氫綅鍚庡鑸爮濉岄櫡锛屼粎fixed瀹氫綅涓嬬敓鏁� + immersive: { + type: Boolean, + default: false + }, + // 鏄惁鏄剧ず瀵艰埅鏍忕殑涓嬭竟妗� + borderBottom: { + type: Boolean, + default: true + }, + zIndex: { + type: [String, Number], + default: '' + }, + // 鑷畾涔夎繑鍥為�昏緫 + customBack: { + type: Function, + default: null + } + }, + data() { + return { + menuButtonInfo: menuButtonInfo, + statusBarHeight: systemInfo.statusBarHeight + }; + }, + computed: { + // 瀵艰埅鏍忓唴閮ㄧ洅瀛愮殑鏍峰紡 + navbarInnerStyle() { + let style = {}; + // 瀵艰埅鏍忓搴︼紝濡傛灉鍦ㄥ皬绋嬪簭涓嬶紝瀵艰埅鏍忓搴︿负鑳跺泭鐨勫乏杈瑰埌灞忓箷宸﹁竟鐨勮窛绂� + style.height = this.navbarHeight + 'px'; + // // 濡傛灉鏄悇瀹跺皬绋嬪簭锛屽鑸爮鍐呴儴鐨勫搴﹂渶瑕佸噺灏戝彸杈硅兌鍥婄殑瀹藉害 + // #ifdef MP + let rightButtonWidth = systemInfo.windowWidth - menuButtonInfo.left; + style.marginRight = rightButtonWidth + 'px'; + // #endif + return style; + }, + // 鏁翠釜瀵艰埅鏍忕殑鏍峰紡 + navbarStyle() { + let style = {}; + style.zIndex = this.zIndex ? this.zIndex : this.$u.zIndex.navbar; + // 鍚堝苟鐢ㄦ埛浼犻�掔殑鑳屾櫙鑹插璞� + Object.assign(style, this.background); + return style; + }, + // 瀵艰埅涓棿鐨勬爣棰樼殑鏍峰紡 + titleStyle() { + let style = {}; + // #ifndef MP + style.left = (systemInfo.windowWidth - uni.upx2px(this.titleWidth)) / 2 + 'px'; + style.right = (systemInfo.windowWidth - uni.upx2px(this.titleWidth)) / 2 + 'px'; + // #endif + // #ifdef MP + // 姝ゅ鏄负浜嗚鏍囬鏄剧ず鍖哄煙鍗充娇鍦ㄥ皬绋嬪簭鏈夊彸渚ц兌鍥婄殑鎯呭喌涓嬩篃鑳藉浜庡睆骞曠殑涓棿锛屾槸閫氳繃缁濆瀹氫綅瀹炵幇鐨� + let rightButtonWidth = systemInfo.windowWidth - menuButtonInfo.left; + style.left = (systemInfo.windowWidth - uni.upx2px(this.titleWidth)) / 2 + 'px'; + style.right = rightButtonWidth - (systemInfo.windowWidth - uni.upx2px(this.titleWidth)) / 2 + rightButtonWidth + + 'px'; + // #endif + style.width = uni.upx2px(this.titleWidth) + 'px'; + return style; + }, + // 杞崲瀛楃鏁板�间负鐪熸鐨勬暟鍊� + navbarHeight() { + // #ifdef APP-PLUS || H5 + return this.height ? this.height : 44; + // #endif + // #ifdef MP + // 灏忕▼搴忕壒鍒鐞嗭紝璁╁鑸爮楂樺害 = 鑳跺泭楂樺害 + 涓ゅ�嶈兌鍥婇《閮ㄤ笌鐘舵�佹爮搴曢儴鐨勮窛绂讳箣宸�(鐩稿綋浜庡悓鏃惰幏寰椾簡瀵艰埅鏍忓簳閮ㄤ笌鑳跺泭搴曢儴鐨勮窛绂�) + // 姝ゆ柟娉曟湁缂洪櫡锛屾殏涓嶇敤(浼氬鑷村皯浜嗗嚑涓猵x)锛岄噰鐢ㄧ洿鎺ュ浐瀹氬�肩殑鏂瑰紡 + // return menuButtonInfo.height + (menuButtonInfo.top - this.statusBarHeight) * 2;//瀵艰埅楂樺害 + let height = systemInfo.platform == 'ios' ? 44 : 48; + return this.height ? this.height : height; + // #endif + } + }, + created() {}, + methods: { + goBack() { + // 濡傛灉鑷畾涔変簡鐐瑰嚮杩斿洖鎸夐挳鐨勫嚱鏁帮紝鍒欐墽琛岋紝鍚﹀垯鎵ц杩斿洖閫昏緫 + if (typeof this.customBack === 'function') { + // 鍦ㄥ井淇★紝鏀粯瀹濈瓑鐜(H5姝e父)锛屼細瀵艰嚧鐖剁粍浠跺畾涔夌殑customBack()鍑芥暟浣撲腑鐨則his鍙樻垚瀛愮粍浠剁殑this + // 閫氳繃bind()鏂规硶锛岀粦瀹氱埗缁勪欢鐨則his锛岃this.customBack()鐨則his涓虹埗缁勪欢鐨勪笂涓嬫枃 + this.customBack.bind(this.$u.$parent.call(this))(); + } else { + uni.navigateBack(); + } + } + } + }; +</script> + +<style scoped lang="scss"> + @import "../../libs/css/style.components.scss"; + + .u-navbar { + width: 100%; + } + + .u-navbar-fixed { + position: fixed; + left: 0; + right: 0; + top: 0; + z-index: 991; + } + + .u-status-bar { + width: 100%; + } + + .u-navbar-inner { + @include vue-flex; + justify-content: space-between; + position: relative; + align-items: center; + } + + .u-back-wrap { + @include vue-flex; + align-items: center; + flex: 1; + flex-grow: 0; + padding: 14rpx 14rpx 14rpx 24rpx; + } + + .u-back-text { + padding-left: 4rpx; + font-size: 30rpx; + } + + .u-navbar-content-title { + @include vue-flex; + align-items: center; + justify-content: center; + flex: 1; + position: absolute; + left: 0; + right: 0; + height: 60rpx; + text-align: center; + flex-shrink: 0; + } + + .u-navbar-centent-slot { + flex: 1; + } + + .u-title { + line-height: 60rpx; + font-size: 32rpx; + flex: 1; + } + + .u-navbar-right { + flex: 1; + @include vue-flex; + align-items: center; + justify-content: flex-end; + } + + .u-slot-content { + flex: 1; + @include vue-flex; + align-items: center; + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-no-network/u-no-network.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-no-network/u-no-network.vue" new file mode 100644 index 0000000..51d9f4f --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-no-network/u-no-network.vue" @@ -0,0 +1,233 @@ +<template> + <view class="u-no-network" v-if="!isConnected" :style="{'z-index': uZIndex}" @touchmove.stop.prevent="() => {}"> + <view class="u-inner"> + <image class="u-error-icon" :src="image" mode="widthFix"></image> + <view class="u-tips"> + {{tips}} + </view> + <!-- 鍙湁APP骞冲彴锛屾墠鑳借烦杞缃〉锛屽洜涓洪渶瑕佽皟鐢╬lus鐜 --> + <!-- #ifdef APP-PLUS --> + <view class="u-to-setting"> + 璇锋鏌ョ綉缁滐紝鎴栧墠寰�<text class="u-setting-btn" @tap="openSettings">璁剧疆</text> + </view> + <!-- #endif --> + <view class="u-retry" :hover-stay-time="150" @tap="retry" hover-class="u-retry-hover"> + 閲嶈瘯 + </view> + </view> + </view> +</template> + +<script> + /** + * noNetwork 鏃犵綉缁滄彁绀� + * @description 璇ョ粍浠舵棤闇�浠讳綍閰嶇疆锛屽紩鍏ュ嵆鍙紝鍐呴儴鑷姩澶勭悊鎵�鏈夊姛鑳藉拰浜嬩欢銆� + * @tutorial https://www.uviewui.com/components/noNetwork.html + * @property {String} tips 娌℃湁缃戠粶鏃剁殑鎻愮ず璇紙榛樿鍝庡憖锛岀綉缁滀俊鍙蜂涪澶憋級 + * @property {String Number} zIndex 缁勪欢鐨剒-index鍊硷紙榛樿1080锛� + * @property {String} image 鏃犵綉缁滅殑鍥剧墖鎻愮ず锛屽彲鐢ㄧ殑src鍦板潃鎴朾ase64鍥剧墖 + * @event {Function} retry 鐢ㄦ埛鐐瑰嚮椤甸潰鐨�"閲嶈瘯"鎸夐挳鏃惰Е鍙� + * @example <u-no-network></u-no-network> + */ + export default { + name: "u-no-network", + props: { + // 椤甸潰鏂囧瓧鎻愮ず + tips: { + type: String, + default: '鍝庡憖锛岀綉缁滀俊鍙蜂涪澶�' + }, + // 涓�涓獄-index鍊硷紝鐢ㄤ簬璁剧疆娌℃湁缃戠粶杩欎釜缁勪欢鐨勫眰娆★紝鍥犱负椤甸潰鍙兘浼氭湁鍏朵粬瀹氫綅鐨勫厓绱犲眰绾ц繃楂橈紝瀵艰嚧姝ょ粍浠惰瑕嗙洊 + zIndex: { + type: [Number, String], + default: '' + }, + // image 娌℃湁缃戠粶鐨勫浘鐗囨彁绀� + image: { + type: String, + default: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAEYCAMAAABFglBLAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6M0U3MjVFMzQwNEY1MTFFQUE4MTNDOUEzMTVBREMxQjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6M0U3MjVFMzUwNEY1MTFFQUE4MTNDOUEzMTVBREMxQjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDozRTcyNUUzMjA0RjUxMUVBQTgxM0M5QTMxNUFEQzFCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDozRTcyNUUzMzA0RjUxMUVBQTgxM0M5QTMxNUFEQzFCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PkHIU9QAAAMAUExURdHW2OWiou7u7tve4dnc3/vw8N3g4sPCwvjn5+jo6M7Q0u6+vtyEhPXY2Li+wuikpPXW1uXo6dba3Pbg4Na5u+qurqqyt/HJydjb3fjo6LrAxO7Bwey1td6MjOrs7fbc3OTn6Maytf7+/vz19eqqqrzCxvzz87a8wLO6vuqxsf78/PDFxenr7L/FyNTY26+2u/z09MjMzqy0udnZ2dvb27G4vMjN0O7v8P339+Ll5u3v8NDS1ODj5frt7bC3vP76+u24uOKamtTW2MTIy9zc3N7e3vPQ0OCTk8DGyfDDw9LR0c7S1LussNbY2fPOztLU1cLHyrK6vvji4vrv78bKzPX29/np6crP0vjk5Ozu78bLzuepqczR1MHFyMDEyOq1tfTS0vP09cLIy9DU173Ex8bGxvHy88/U18vO0LK4vM7OzsTKzcPJzPLMzM/T1sbMz8HJy+7FxbW8wNTW18XKzvb3+MjLzczP0d3e3+Dh4r3Dxtna29zd3rK5vdPU1cfM0Prq6uOenuPm58HGyfHz8/ro6Lq/w8nO0bzCxcrKytjZ2uXm5vTU1LvBxbW7v+rp6eefn/39/eLi4u3t7Ozs7Pj4+Pr6+vX19fHx8erq6vPz8+Xl5ff39+fn5/v7+/z8/PLx8fX09Pb29ri4uOTk5PHw8OPj4/Py8ubm5vn5+e3s7Pb19fTz8/f29tfX1+7t7cvQ0+zr6/Ly8u3t7fr5+efm5quzuOvq6vT19uvr6/j5+a61uuy6uvb39/T09Ojn5+jq6621uvn6+t/i5KyzuPn4+Le+wvv6+s3S1fj4+fDw8OHk5vv7/Pr7++Xk5LS7v7y8vObl5fz9/ff4+OTj48DEx8XJy+Hk5euysu/x8re9wfn5+v38/Pv8/Pr6++vt7uLi4+Pi4ubl5uXk5dPV1tbV1fHMzNPX2e7u7ejn6PT19fX19PDw7/b29f39/vnr6+Hh4a+3u+7t7q61uePi48PHyf35+enp6fLz9PPz8qmxtuDg4N/f3/Dv7////////1cfN/UAAAEAdFJOU////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wBT9wclAAAlqElEQVR42uydCXwUVZrAk5CEJBAQshACCGyjIRwBJR0It6JBGZZBkRtm5PBgFXAXHBghqAMz6LjGTrd9n7lvwn0JQhARxYNxVJTMwcwOM+7uzK6Z3VXcrnTXVr2q6q7urrvfq26c+n4egXTSVfXv993veym4JkklKdoj0IBoogHRgGiiAdGAaKIB0YBoogHRgGiiAdFEA6IBUVuwx+vqet/v1YAkhxwmcNT9gvjnsAYkGcT7eN1TtThe+1TdL2o1IEkg+rrvUV90MF9oQBIqv6ijF4a3d51XA5J4jVVXx3z587ojGpDEm/QwkO9pQJJB2CvksAYk8fJUXT31xZG63ppRTwI5QgcgR35Rd1MDkgxSX1f31P33P1V3i3u936HUyc3edWSsjuEakKRRW3r9kVv+JrRsrwbklpKTnXs+z0wfONOtAUm8rJu55oqfkZ0TOzUgCZS3Zh7s54+S5RqQhNGYMsnPISkakCSiQcjkNzUgasvUDaVsBF1fb9GXd//B0ziliPzjEA2IujLqGRaMST+cawgLNpn4q30aEDV1Va+dYRqzNy00RMoYUmdpQNTzcb8sCtuKH8w9Z4iWLuIbVzQgapmOBedDOO6c0WjgENK2vKwBUUUmvBSiUbrqxwZuOU18d5MGhEe/dI6a2WvIxA0HX1hfvH7V8gUpA9Mz3x/VuVTRLxvwdAhH5aJjBj4hv39QAxIl743ITHm6azBPnOCfVLwlc6pR3upYFbLjvIuDlEUqRYZo38JYS4gVt5rNZhMQO46byksoMeG4w8QIjtvMpJA/wP1EdZ0bKvkitkh555mBA3zSLnBlSFnNnlJvEJJ95ItW3pJAamvtZhy3m/T0g7fhthJGiG+EviYgmEJ/wHFP6GsbnlZSoicoucxmGwHVguPTBz543C9LHky/Jnql1w5KxWGo8KsThsAFYneYMOb5mlnP11ZCrwOPjfgGI8RqsZuZtUOsFmbllFhZP+zEbc8vGcqzMibv7qos3rd7Mg+TrQv2vCVkiLYc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" + } + }, + data() { + return { + isConnected: true, // 鏄惁鏈夌綉缁滆繛鎺� + networkType: "none", // 缃戠粶绫诲瀷 + } + }, + computed: { + uZIndex() { + return this.zIndex ? this.zIndex : this.$u.zIndex.noNetwork; + } + }, + mounted() { + this.isIOS = (uni.getSystemInfoSync().platform === 'ios'); + uni.onNetworkStatusChange((res) => { + this.isConnected = res.isConnected; + this.networkType = res.networkType; + }); + uni.getNetworkType({ + success: (res) => { + this.networkType = res.networkType; + if (res.networkType == 'none') { + this.isConnected = false; + } else { + this.isConnected = true; + } + } + }); + }, + methods: { + retry() { + // 閲嶆柊妫�鏌ョ綉缁� + uni.getNetworkType({ + success: (res) => { + this.networkType = res.networkType; + if (res.networkType == 'none') { + uni.showToast({ + title: '鏃犵綉缁滆繛鎺�', + icon: 'none', + position: 'top' + }) + this.isConnected = false; + } else { + uni.showToast({ + title: '缃戠粶宸茶繛鎺�', + icon: 'none', + position: 'top' + }) + this.isConnected = true; + } + } + }); + this.$emit('retry'); + }, + async openSettings() { + if (this.networkType == "none") { + this.openSystemSettings(); + return; + } + }, + openAppSettings() { + this.gotoAppSetting(); + }, + openSystemSettings() { + // 浠ヤ笅鏂规硶鏉ヨ嚜5+鑼冪暣锛屽闇�娣辩┒锛岃鑷鏌ラ槄鐩稿叧鏂囨。 + // https://ask.dcloud.net.cn/docs/ + if (this.isIOS) { + this.gotoiOSSetting(); + } else { + this.gotoAndroidSetting(); + } + }, + network() { + var result = null; + var cellularData = plus.ios.newObject("CTCellularData"); + var state = cellularData.plusGetAttribute("restrictedState"); + if (state == 0) { + result = null; + } else if (state == 2) { + result = 1; + } else if (state == 1) { + result = 2; + } + plus.ios.deleteObject(cellularData); + return result; + }, + gotoAppSetting() { + if (this.isIOS) { + var UIApplication = plus.ios.import("UIApplication"); + var application2 = UIApplication.sharedApplication(); + var NSURL2 = plus.ios.import("NSURL"); + var setting2 = NSURL2.URLWithString("app-settings:"); + application2.openURL(setting2); + plus.ios.deleteObject(setting2); + plus.ios.deleteObject(NSURL2); + plus.ios.deleteObject(application2); + } else { + var Intent = plus.android.importClass("android.content.Intent"); + var Settings = plus.android.importClass("android.provider.Settings"); + var Uri = plus.android.importClass("android.net.Uri"); + var mainActivity = plus.android.runtimeMainActivity(); + var intent = new Intent(); + intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS); + var uri = Uri.fromParts("package", mainActivity.getPackageName(), null); + intent.setData(uri); + mainActivity.startActivity(intent); + } + }, + gotoiOSSetting() { + var UIApplication = plus.ios.import("UIApplication"); + var application2 = UIApplication.sharedApplication(); + var NSURL2 = plus.ios.import("NSURL"); + var setting2 = NSURL2.URLWithString("App-prefs:root=General"); + application2.openURL(setting2); + plus.ios.deleteObject(setting2); + plus.ios.deleteObject(NSURL2); + plus.ios.deleteObject(application2); + }, + gotoAndroidSetting() { + var Intent = plus.android.importClass("android.content.Intent"); + var Settings = plus.android.importClass("android.provider.Settings"); + var mainActivity = plus.android.runtimeMainActivity(); + var intent = new Intent(Settings.ACTION_SETTINGS); + mainActivity.startActivity(intent); + } + } + } +</script> + +<style lang="scss" scoped> + @import "../../libs/css/style.components.scss"; + + .u-no-network { + background-color: #fff; + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + } + + .u-inner { + height: 100vh; + @include vue-flex; + flex-direction: column; + align-items: center; + justify-content: center; + margin-top: -15%; + } + + .u-tips { + color: $u-tips-color; + font-size: 28rpx; + padding: 30rpx 0; + } + + .u-error-icon { + width: 300rpx; + } + + .u-to-setting { + color: $u-light-color; + font-size: 26rpx; + } + + .u-setting-btn { + font-size: 26rpx; + color: $u-type-primary; + } + + .u-retry { + margin-top: 30rpx; + border: 1px solid $u-tips-color; + color: $u-tips-color; + font-size: 28rpx; + padding: 6rpx 30rpx; + border-radius: 3px; + } + + .u-retry-hover { + color: #fff; + background-color: $u-tips-color; + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-notice-bar/u-notice-bar.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-notice-bar/u-notice-bar.vue" new file mode 100644 index 0000000..41a6cc4 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-notice-bar/u-notice-bar.vue" @@ -0,0 +1,272 @@ +<template> + <view class="u-notice-bar-wrap" v-if="isShow" :style="{ + borderRadius: borderRadius + 'rpx', + }"> + <block v-if="mode == 'horizontal' && isCircular"> + <u-row-notice + :type="type" + :color="color" + :bgColor="bgColor" + :list="list" + :volumeIcon="volumeIcon" + :moreIcon="moreIcon" + :volumeSize="volumeSize" + :closeIcon="closeIcon" + :mode="mode" + :fontSize="fontSize" + :speed="speed" + :playState="playState" + :padding="padding" + @getMore="getMore" + @close="close" + @click="click" + ></u-row-notice> + </block> + <block v-if="mode == 'vertical' || (mode == 'horizontal' && !isCircular)"> + <u-column-notice + :type="type" + :color="color" + :bgColor="bgColor" + :list="list" + :volumeIcon="volumeIcon" + :moreIcon="moreIcon" + :closeIcon="closeIcon" + :mode="mode" + :volumeSize="volumeSize" + :disable-touch="disableTouch" + :fontSize="fontSize" + :duration="duration" + :playState="playState" + :padding="padding" + @getMore="getMore" + @close="close" + @click="click" + @end="end" + ></u-column-notice> + </block> + </view> +</template> +<script> +/** + * noticeBar 婊氬姩閫氱煡 + * @description 璇ョ粍浠剁敤浜庢粴鍔ㄩ�氬憡鍦烘櫙锛屾湁澶氱妯″紡鍙緵閫夋嫨 + * @tutorial https://www.uviewui.com/components/noticeBar.html + * @property {Array} list 婊氬姩鍐呭锛屾暟缁勫舰寮忥紝瑙佷笂鏂硅鏄� + * @property {String} type 鏄剧ず鐨勪富棰橈紙榛樿warning锛� + * @property {Boolean} volume-icon 鏄惁鏄剧ず灏忓枃鍙浘鏍囷紙榛樿true锛� + * @property {Boolean} more-icon 鏄惁鏄剧ず鍙宠竟鐨勫悜鍙崇澶达紙榛樿false锛� + * @property {Boolean} close-icon 鏄惁鏄剧ず鍏抽棴鍥炬爣锛堥粯璁alse锛� + * @property {Boolean} autoplay 鏄惁鑷姩鎾斁锛堥粯璁rue锛� + * @property {String} color 鏂囧瓧棰滆壊 + * @property {String Number} bg-color 鑳屾櫙棰滆壊 + * @property {String} mode 婊氬姩妯″紡锛堥粯璁orizontal锛� + * @property {Boolean} show 鏄惁鏄剧ず锛堥粯璁rue锛� + * @property {String Number} font-size 瀛椾綋澶у皬锛屽崟浣峳px锛堥粯璁�28锛� + * @property {String Number} volume-size 宸﹁竟鍠囧彮鐨勫ぇ灏忥紙榛樿34锛� + * @property {String Number} duration 婊氬姩鍛ㄦ湡鏃堕暱锛屽彧瀵规杩涙ā寮忔湁鏁堬紝妯悜琛旀帴妯″紡鏃犳晥锛屽崟浣峬s锛堥粯璁�2000锛� + * @property {String Number} speed 姘村钩婊氬姩鏃剁殑婊氬姩閫熷害锛屽嵆姣忕绉诲姩澶氬皯璺濈锛屽彧瀵规按骞宠鎺ユ柟寮忔湁鏁堬紝鍗曚綅rpx锛堥粯璁�160锛� + * @property {String Number} font-size 瀛椾綋澶у皬锛屽崟浣峳px锛堥粯璁�28锛� + * @property {Boolean} is-circular mode涓篽orizontal鏃讹紝鎸囨槑鏄惁姘村钩琛旀帴婊氬姩锛堥粯璁rue锛� + * @property {String} play-state 鎾斁鐘舵�侊紝play - 鎾斁锛宲aused - 鏆傚仠锛堥粯璁lay锛� + * @property {String Nubmer} border-radius 閫氱煡鏍忓渾瑙掞紙榛樿涓�0锛� + * @property {String Nubmer} padding 鍐呰竟璺濓紝瀛楃涓诧紝涓庢櫘閫氱殑鍐呰竟璺漜ss鍐欐硶涓�鐩达紙榛樿"18rpx 24rpx"锛� + * @property {Boolean} no-list-hidden 鍒楄〃涓虹┖鏃讹紝鏄惁鏄剧ず缁勪欢锛堥粯璁alse锛� + * @property {Boolean} disable-touch 鏄惁绂佹閫氳繃鎵嬪姩婊戝姩鍒囨崲閫氱煡锛屽彧鏈塵ode = vertical锛屾垨鑰卪ode = horizontal涓攊s-circular = false鏃舵湁鏁堬紙榛樿true锛� + * @event {Function} click 鐐瑰嚮閫氬憡鏂囧瓧瑙﹀彂锛屽彧鏈塵ode = vertical锛屾垨鑰卪ode = horizontal涓攊s-circular = false鏃舵湁鏁� + * @event {Function} close 鐐瑰嚮鍙充晶鍏抽棴鍥炬爣瑙﹀彂 + * @event {Function} getMore 鐐瑰嚮鍙充晶鍚戝彸鍥炬爣瑙﹀彂 + * @event {Function} end 鍒楄〃鐨勬秷鎭瘡娆¤鎾斁涓�涓懆鏈熸椂瑙﹀彂锛屽彧鏈塵ode = vertical锛屾垨鑰卪ode = horizontal涓攊s-circular = false鏃舵湁鏁� + * @example <u-notice-bar :more-icon="true" :list="list"></u-notice-bar> + */ +export default { + name: "u-notice-bar", + props: { + // 鏄剧ず鐨勫唴瀹癸紝鏁扮粍 + list: { + type: Array, + default() { + return []; + } + }, + // 鏄剧ず鐨勪富棰橈紝success|error|primary|info|warning + type: { + type: String, + default: 'warning' + }, + // 鏄惁鏄剧ず宸︿晶鐨勯煶閲忓浘鏍� + volumeIcon: { + type: Boolean, + default: true + }, + // 闊抽噺鍠囧彮鐨勫ぇ灏� + volumeSize: { + type: [Number, String], + default: 34 + }, + // 鏄惁鏄剧ず鍙充晶鐨勫彸绠ご鍥炬爣 + moreIcon: { + type: Boolean, + default: false + }, + // 鏄惁鏄剧ず鍙充晶鐨勫叧闂浘鏍� + closeIcon: { + type: Boolean, + default: false + }, + // 鏄惁鑷姩鎾斁 + autoplay: { + type: Boolean, + default: true + }, + // 鏂囧瓧棰滆壊锛屽悇鍥炬爣涔熶細浣跨敤鏂囧瓧棰滆壊 + color: { + type: String, + default: '' + }, + // 鑳屾櫙棰滆壊 + bgColor: { + type: String, + default: '' + }, + // 婊氬姩鏂瑰悜锛宧orizontal-姘村钩婊氬姩锛寁ertical-鍨傜洿婊氬姩 + mode: { + type: String, + default: 'horizontal' + }, + // 鏄惁鏄剧ず + show: { + type: Boolean, + default: true + }, + // 瀛椾綋澶у皬锛屽崟浣峳px + fontSize: { + type: [Number, String], + default: 28 + }, + // 婊氬姩涓�涓懆鏈熺殑鏃堕棿闀匡紝鍗曚綅ms + duration: { + type: [Number, String], + default: 2000 + }, + // 姘村钩婊氬姩鏃剁殑婊氬姩閫熷害锛屽嵆姣忕婊氬姩澶氬皯rpx锛岃繖鏈夊埄浜庢帶鍒舵枃瀛楁棤璁哄灏戞椂锛岄兘鑳芥湁涓�涓亽瀹氱殑閫熷害 + speed: { + type: [Number, String], + default: 160 + }, + // 姘村钩婊氬姩鏃讹紝鏄惁閲囩敤琛旀帴褰㈠紡婊氬姩 + // 姘村钩琛旀帴妯″紡锛岄噰鐢ㄧ殑鏄痵wiper缁勪欢锛屾按骞虫粴鍔� + isCircular: { + type: Boolean, + default: true + }, + // 鎾斁鐘舵�侊紝play-鎾斁锛宲aused-鏆傚仠 + playState: { + type: String, + default: 'play' + }, + // 鏄惁绂佹鐢ㄦ墜婊戝姩鍒囨崲 + // 鐩墠HX2.6.11锛屽彧鏀寔App 2.5.5+銆丠5 2.5.5+銆佹敮浠樺疂灏忕▼搴忋�佸瓧鑺傝烦鍔ㄥ皬绋嬪簭 + disableTouch: { + type: Boolean, + default: true + }, + // 婊氬姩閫氱煡璁剧疆鍦嗚 + borderRadius: { + type: [Number, String], + default: 0 + }, + // 閫氱煡鐨勮竟璺� + padding: { + type: [Number, String], + default: '18rpx 24rpx' + }, + // list鍒楄〃涓虹┖鏃讹紝鏄惁鏄剧ず缁勪欢 + noListHidden: { + type: Boolean, + default: true + } + }, + computed: { + // 濡傛灉璁剧疆show涓篺alse锛屾垨鑰呰缃簡noListHidden涓簍rue锛屼笖list闀垮害鍙堜负闆剁殑璇濓紝闅愯棌缁勪欢 + isShow() { + if(this.show == false || (this.noListHidden == true && this.list.length == 0)) return false; + else return true; + } + }, + methods: { + // 鐐瑰嚮閫氬憡鏍� + click(index) { + this.$emit('click', index); + }, + // 鐐瑰嚮鍏抽棴鎸夐挳 + close() { + this.$emit('close'); + }, + // 鐐瑰嚮鏇村绠ご鎸夐挳 + getMore() { + this.$emit('getMore'); + }, + // 婊氬姩涓�涓懆鏈熺粨鏉燂紝鍙鍨傜洿锛屾垨鑰呮按骞虫杩涘舰寮忔湁鏁� + end() { + this.$emit('end'); + } + } +}; +</script> + +<style lang="scss" scoped> +@import "../../libs/css/style.components.scss"; + +.u-notice-bar-wrap { + overflow: hidden; +} + +.u-notice-bar { + padding: 18rpx 24rpx; + overflow: hidden; +} + +.u-direction-row { + @include vue-flex; + align-items: center; + justify-content: space-between; +} + +.u-left-icon { + @include vue-flex; + align-items: center; +} + +.u-notice-box { + flex: 1; + @include vue-flex; + overflow: hidden; + margin-left: 12rpx; +} + +.u-right-icon { + margin-left: 12rpx; + @include vue-flex; + align-items: center; +} + +.u-notice-content { + line-height: 1; + white-space: nowrap; + font-size: 26rpx; + animation: u-loop-animation 10s linear infinite both; + text-align: right; + // 杩欎竴鍙ュ緢閲嶈锛屼负浜嗚兘璁╂粴鍔ㄥ乏鍙宠繛鎺ヨ捣鏉� + padding-left: 100%; +} + +@keyframes u-loop-animation { + 0% { + transform: translate3d(0, 0, 0); + } + + 100% { + transform: translate3d(-100%, 0, 0); + } +} +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-number-box/u-number-box.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-number-box/u-number-box.vue" new file mode 100644 index 0000000..54a679e --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-number-box/u-number-box.vue" @@ -0,0 +1,363 @@ +<template> + <view class="u-numberbox"> + <view class="u-icon-minus" @touchstart.stop.prevent="btnTouchStart('minus')" @touchend.stop.prevent="clearTimer" :class="{ 'u-icon-disabled': disabled || inputVal <= min }" + :style="{ + background: bgColor, + height: inputHeight + 'rpx', + color: color + }"> + <u-icon name="minus" :size="size"></u-icon> + </view> + <input :disabled="disabledInput || disabled" :cursor-spacing="getCursorSpacing" :class="{ 'u-input-disabled': disabled }" + v-model="inputVal" class="u-number-input" @blur="onBlur" @focus="onFocus" + type="number" :style="{ + color: color, + fontSize: size + 'rpx', + background: bgColor, + height: inputHeight + 'rpx', + width: inputWidth + 'rpx' + }" /> + <view class="u-icon-plus" @touchstart.stop.prevent="btnTouchStart('plus')" @touchend.stop.prevent="clearTimer" :class="{ 'u-icon-disabled': disabled || inputVal >= max }" + :style="{ + background: bgColor, + height: inputHeight + 'rpx', + color: color + }"> + <u-icon name="plus" :size="size"></u-icon> + </view> + </view> +</template> + +<script> + /** + * numberBox 姝ヨ繘鍣� + * @description 璇ョ粍浠朵竴鑸敤浜庡晢鍩庤喘鐗╅�夋嫨鐗╁搧鏁伴噺鐨勫満鏅�傛敞鎰忥細璇ヨ緭鍏ユ鍙兘杈撳叆澶т簬鎴栫瓑浜�0鐨勬暣鏁帮紝涓嶆敮鎸佸皬鏁拌緭鍏� + * @tutorial https://www.uviewui.com/components/numberBox.html + * @property {Number} value 杈撳叆妗嗗垵濮嬪�硷紙榛樿1锛� + * @property {String} bg-color 杈撳叆妗嗗拰鎸夐挳鐨勮儗鏅鑹诧紙榛樿#F2F3F5锛� + * @property {Number} min 鐢ㄦ埛鍙緭鍏ョ殑鏈�灏忓�硷紙榛樿0锛� + * @property {Number} max 鐢ㄦ埛鍙緭鍏ョ殑鏈�澶у�硷紙榛樿99999锛� + * @property {Number} step 姝ラ暱锛屾瘡娆″姞鎴栧噺鐨勫�硷紙榛樿1锛� + * @property {Boolean} disabled 鏄惁绂佺敤鎿嶄綔锛岀鐢ㄥ悗鏃犳硶鍔犲噺鎴栨墜鍔ㄤ慨鏀硅緭鍏ユ鐨勫�硷紙榛樿false锛� + * @property {Boolean} disabled-input 鏄惁绂佹杈撳叆妗嗘墜鍔ㄨ緭鍏ュ�硷紙榛樿false锛� + * @property {Boolean} positive-integer 鏄惁鍙兘杈撳叆姝f暣鏁帮紙榛樿true锛� + * @property {String | Number} size 杈撳叆妗嗘枃瀛楀拰鎸夐挳瀛椾綋澶у皬锛屽崟浣峳px锛堥粯璁�26锛� + * @property {String} color 杈撳叆妗嗘枃瀛楀拰鍔犲噺鎸夐挳鍥炬爣鐨勯鑹诧紙榛樿#323233锛� + * @property {String | Number} input-width 杈撳叆妗嗗搴︼紝鍗曚綅rpx锛堥粯璁�80锛� + * @property {String | Number} input-height 杈撳叆妗嗗拰鎸夐挳鐨勯珮搴︼紝鍗曚綅rpx锛堥粯璁�50锛� + * @property {String | Number} index 浜嬩欢鍥炶皟鏃剁敤浠ュ尯鍒嗗綋鍓嶅彂鐢熷彉鍖栫殑鏄摢涓緭鍏ユ + * @property {Boolean} long-press 鏄惁寮�鍚暱鎸夎繛缁�掑鎴栭�掑噺(榛樿true) + * @property {String | Number} press-time 寮�鍚暱鎸夎Е鍙戝悗锛屾瘡瑙﹀彂涓�娆¢渶瑕佸涔咃紝鍗曚綅ms(榛樿250) + * @property {String | Number} cursor-spacing 鎸囧畾鍏夋爣浜庨敭鐩樼殑璺濈锛岄伩鍏嶉敭鐩橀伄鎸¤緭鍏ユ锛屽崟浣峳px锛堥粯璁�200锛� + * @event {Function} change 杈撳叆妗嗗唴瀹瑰彂鐢熷彉鍖栨椂瑙﹀彂锛屽璞″舰寮� + * @event {Function} blur 杈撳叆妗嗗け鍘荤劍鐐规椂瑙﹀彂锛屽璞″舰寮� + * @event {Function} minus 鐐瑰嚮鍑忓皯鎸夐挳鏃惰Е鍙�(鎸夐挳鍙偣鍑绘儏鍐典笅)锛屽璞″舰寮� + * @event {Function} plus 鐐瑰嚮澧炲姞鎸夐挳鏃惰Е鍙�(鎸夐挳鍙偣鍑绘儏鍐典笅)锛屽璞″舰寮� + * @example <u-number-box :min="1" :max="100"></u-number-box> + */ + export default { + name: "u-number-box", + props: { + // 棰勬樉绀虹殑鏁板瓧 + value: { + type: Number, + default: 1 + }, + // 鑳屾櫙棰滆壊 + bgColor: { + type: String, + default: '#F2F3F5' + }, + // 鏈�灏忓�� + min: { + type: Number, + default: 0 + }, + // 鏈�澶у�� + max: { + type: Number, + default: 99999 + }, + // 姝ヨ繘鍊硷紝姣忔鍔犳垨鍑忕殑鍊� + step: { + type: Number, + default: 1 + }, + // 鏄惁绂佺敤鍔犲噺鎿嶄綔 + disabled: { + type: Boolean, + default: false + }, + // input鐨勫瓧浣撳ぇ灏忥紝鍗曚綅rpx + size: { + type: [Number, String], + default: 26 + }, + // 鍔犲噺鍥炬爣鐨勯鑹� + color: { + type: String, + default: '#323233' + }, + // input瀹藉害锛屽崟浣峳px + inputWidth: { + type: [Number, String], + default: 80 + }, + // input楂樺害锛屽崟浣峳px + inputHeight: { + type: [Number, String], + default: 50 + }, + // index绱㈠紩锛岀敤浜庡垪琛ㄤ腑浣跨敤锛岃鐢ㄦ埛鐭ラ亾鏄摢涓猲umberbox鍙戠敓浜嗗彉鍖栵紝涓�鑸娇鐢╢or寰幆鍑烘潵鐨刬ndex鍊煎嵆鍙� + index: { + type: [Number, String], + default: '' + }, + // 鏄惁绂佺敤杈撳叆妗嗭紝涓巇isabled浣滅敤浜庤緭鍏ユ鏃讹紝涓篛R鐨勫叧绯伙紝鍗虫兂瑕佺鐢ㄨ緭鍏ユ锛屽張鍙互鍔犲噺鐨勮瘽 + // 璁剧疆disabled涓篺alse锛宒isabledInput涓簍rue鍗冲彲 + disabledInput: { + type: Boolean, + default: false + }, + // 杈撳叆妗嗕簬閿洏涔嬮棿鐨勮窛绂� + cursorSpacing: { + type: [Number, String], + default: 100 + }, + // 鏄惁寮�鍚暱鎸夎繛缁�掑鎴栭�掑噺 + longPress: { + type: Boolean, + default: true + }, + // 寮�鍚暱鎸夎Е鍙戝悗锛屾瘡瑙﹀彂涓�娆¢渶瑕佸涔� + pressTime: { + type: [Number, String], + default: 250 + }, + // 鏄惁鍙兘杈撳叆澶т簬鎴栫瓑浜�0鐨勬暣鏁�(姝f暣鏁�) + positiveInteger: { + type: Boolean, + default: true + } + }, + watch: { + value(v1, v2) { + // 鍙湁value鐨勬敼鍙樻槸鏉ヨ嚜澶栭儴鐨勬椂鍊欙紝鎵嶅幓鍚屾inputVal鐨勫�硷紝鍚﹀垯浼氶�犳垚寰幆閿欒 + if(!this.changeFromInner) { + this.inputVal = v1; + // 鍥犱负inputVal鍙樺寲鍚庯紝浼氳Е鍙憈his.handleChange()锛屽湪鍏朵腑changeFromInner浼氬啀娆¤璁剧疆涓簍rue锛� + // 閫犳垚澶栭潰淇敼鍊硷紝涔熷鑷磋璁や负鏄唴閮ㄤ慨鏀圭殑娣蜂贡锛岃繖閲岃繘琛宼his.$nextTick寤舵椂锛屼繚璇佸湪杩愯鍛ㄦ湡鐨勬渶鍚庡 + // 灏哻hangeFromInner璁剧疆涓篺alse + this.$nextTick(function(){ + this.changeFromInner = false; + }) + } + }, + inputVal(v1, v2) { + // 涓轰簡璁╃敤鎴疯兘澶熷垹闄ゆ墍鏈夎緭鍏ュ�硷紝閲嶆柊杈撳叆鍐呭锛屽垹闄ゆ墍鏈夊�煎悗锛屽唴瀹逛负绌哄瓧绗︿覆 + if (v1 == '') return; + let value = 0; + // 棣栧厛鍒ゆ柇鏄惁鏁板�硷紝骞朵笖鍦╩in鍜宮ax涔嬮棿锛屽鏋滀笉鏄紝浣跨敤鍘熸潵鍊� + let tmp = this.$u.test.number(v1); + if (tmp && v1 >= this.min && v1 <= this.max) value = v1; + else value = v2; + // 鍒ゆ柇鏄惁鍙兘杈撳叆澶т簬绛変簬0鐨勬暣鏁� + if(this.positiveInteger) { + // 灏忎簬0锛屾垨鑰呭甫鏈夊皬鏁扮偣锛� + if(v1 < 0 || String(v1).indexOf('.') !== -1) { + value = v2; + // 鍙屽悜缁戝畾input鐨勫�硷紝蹇呴』瑕佷娇鐢�$nextTick淇敼鏄剧ず鐨勫�� + this.$nextTick(() => { + this.inputVal = v2; + }) + } + } + // 鍙戝嚭change浜嬩欢 + this.handleChange(value, 'change'); + } + }, + data() { + return { + inputVal: 1, // 杈撳叆妗嗕腑鐨勫�硷紝涓嶈兘鐩存帴浣跨敤props涓殑value锛屽洜涓哄簲璇ユ敼鍙榩rops鐨勭姸鎬� + timer: null, // 鐢ㄤ綔闀挎寜鐨勫畾鏃跺櫒 + changeFromInner: false, // 鍊煎彂鐢熷彉鍖栵紝鏄潵鑷唴閮ㄨ繕鏄閮� + innerChangeTimer: null, // 鍐呴儴瀹氭椂鍣� + }; + }, + created() { + this.inputVal = Number(this.value); + }, + computed: { + getCursorSpacing() { + // 鍏堝皢鍊艰浆涓簆x鍗曚綅锛屽啀杞负鏁板�� + return Number(uni.upx2px(this.cursorSpacing)); + } + }, + methods: { + // 鐐瑰嚮閫�鏍奸敭 + btnTouchStart(callback) { + // 鍏堟墽琛屼竴閬嶆柟娉曪紝鍚﹀垯浼氶�犳垚鏉惧紑鎵嬫椂锛屽氨鎵ц浜哻learTimer锛屽鑷存棤娉曞疄鐜板姛鑳� + this[callback](); + // 濡傛灉娌″紑鍚暱鎸夊姛鑳斤紝鐩存帴杩斿洖 + if (!this.longPress) return; + clearInterval(this.timer); //鍐嶆娓呯┖瀹氭椂鍣紝闃叉閲嶅娉ㄥ唽瀹氭椂鍣� + this.timer = null; + this.timer = setInterval(() => { + // 鎵ц鍔犳垨鍑忓嚱鏁� + this[callback](); + }, this.pressTime); + }, + clearTimer() { + this.$nextTick(() => { + clearInterval(this.timer); + this.timer = null; + }) + }, + minus() { + this.computeVal('minus'); + }, + plus() { + this.computeVal('plus'); + }, + // 涓轰簡淇濊瘉灏忔暟鐩稿姞鍑忓嚭鐜扮簿搴︽孩鍑虹殑闂 + calcPlus(num1, num2) { + let baseNum, baseNum1, baseNum2; + try { + baseNum1 = num1.toString().split('.')[1].length; + } catch (e) { + baseNum1 = 0; + } + try { + baseNum2 = num2.toString().split('.')[1].length; + } catch (e) { + baseNum2 = 0; + } + baseNum = Math.pow(10, Math.max(baseNum1, baseNum2)); + let precision = baseNum1 >= baseNum2 ? baseNum1 : baseNum2; //绮惧害 + return ((num1 * baseNum + num2 * baseNum) / baseNum).toFixed(precision); + }, + // 涓轰簡淇濊瘉灏忔暟鐩稿姞鍑忓嚭鐜扮簿搴︽孩鍑虹殑闂 + calcMinus(num1, num2) { + let baseNum, baseNum1, baseNum2; + try { + baseNum1 = num1.toString().split('.')[1].length; + } catch (e) { + baseNum1 = 0; + } + try { + baseNum2 = num2.toString().split('.')[1].length; + } catch (e) { + baseNum2 = 0; + } + baseNum = Math.pow(10, Math.max(baseNum1, baseNum2)); + let precision = baseNum1 >= baseNum2 ? baseNum1 : baseNum2; + return ((num1 * baseNum - num2 * baseNum) / baseNum).toFixed(precision); + }, + computeVal(type) { + uni.hideKeyboard(); + if (this.disabled) return; + let value = 0; + // 鍑� + if (type === 'minus') { + value = this.calcMinus(this.inputVal, this.step); + } else if (type === 'plus') { + value = this.calcPlus(this.inputVal, this.step); + } + // 鍒ゆ柇鏄惁灏忎簬鏈�灏忓�煎拰澶т簬鏈�澶у�� + if (value < this.min || value > this.max) { + return; + } + this.inputVal = value; + this.handleChange(value, type); + }, + // 澶勭悊鐢ㄦ埛鎵嬪姩杈撳叆鐨勬儏鍐� + onBlur(event) { + let val = 0; + let value = event.detail.value; + // 濡傛灉涓洪潪0-9鏁板瓧缁勬垚锛屾垨鑰呭叾绗竴浣嶆暟鍊间负0锛岀洿鎺ヨ鍏剁瓑浜巑in鍊� + // 杩欓噷涓嶇洿鎺ュ垽鏂槸鍚︽鏁存暟锛屾槸鍥犱负鐢ㄦ埛浼犻�掔殑props min鍊煎彲鑳戒负0 + if (!/(^\d+$)/.test(value) || value[0] == 0) val = this.min; + val = +value; + if (val > this.max) { + val = this.max; + } else if (val < this.min) { + val = this.min; + } + this.$nextTick(() => { + this.inputVal = val; + }) + this.handleChange(val, 'blur'); + }, + // 杈撳叆妗嗚幏寰楃劍鐐逛簨浠� + onFocus() { + this.$emit('focus'); + }, + handleChange(value, type) { + if (this.disabled) return; + // 娓呴櫎瀹氭椂鍣紝閬垮厤閫犳垚娣蜂贡 + if(this.innerChangeTimer) { + clearTimeout(this.innerChangeTimer); + this.innerChangeTimer = null; + } + // 鍙戝嚭input浜嬩欢锛屼慨鏀归�氳繃v-model缁戝畾鐨勫�硷紝杈惧埌鍙屽悜缁戝畾鐨勬晥鏋� + this.changeFromInner = true; + // 涓�瀹氭椂闂村唴锛屾竻闄hangeFromInner鏍囪锛屽惁鍒欏唴閮ㄥ�兼敼鍙樺悗 + // 澶栭儴閫氳繃绋嬪簭淇敼value鍊硷紝灏嗕細鏃犳晥 + this.innerChangeTimer = setTimeout(() => { + this.changeFromInner = false; + }, 150); + this.$emit('input', Number(value)); + this.$emit(type, { + // 杞负Number绫诲瀷 + value: Number(value), + index: this.index + }) + } + } + }; +</script> + +<style lang="scss" scoped> + @import "../../libs/css/style.components.scss"; + + .u-numberbox { + display: inline-flex; + align-items: center; + } + + .u-number-input { + position: relative; + text-align: center; + padding: 0; + margin: 0 6rpx; + @include vue-flex; + align-items: center; + justify-content: center; + } + + .u-icon-plus, + .u-icon-minus { + width: 60rpx; + @include vue-flex; + justify-content: center; + align-items: center; + } + + .u-icon-plus { + border-radius: 0 8rpx 8rpx 0; + } + + .u-icon-minus { + border-radius: 8rpx 0 0 8rpx; + } + + .u-icon-disabled { + color: #c8c9cc !important; + background: #f7f8fa !important; + } + + .u-input-disabled { + color: #c8c9cc !important; + background-color: #f2f3f5 !important; + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-number-keyboard/u-number-keyboard.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-number-keyboard/u-number-keyboard.vue" new file mode 100644 index 0000000..6425a1f --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-number-keyboard/u-number-keyboard.vue" @@ -0,0 +1,158 @@ +<template> + <view class="u-keyboard" @touchmove.stop.prevent="() => {}"> + <view class="u-keyboard-grids"> + <view + class="u-keyboard-grids-item" + :class="[btnBgGray(index) ? 'u-bg-gray' : '', index <= 2 ? 'u-border-top' : '', index < 9 ? 'u-border-bottom' : '', (index + 1) % 3 != 0 ? 'u-border-right' : '']" + :style="[itemStyle(index)]" + v-for="(item, index) in numList" + :key="index" + :hover-class="hoverClass(index)" + :hover-stay-time="100" + @tap="keyboardClick(item)"> + <view class="u-keyboard-grids-btn">{{ item }}</view> + </view> + <view class="u-keyboard-grids-item u-bg-gray" hover-class="u-hover-class" :hover-stay-time="100" @touchstart.stop="backspaceClick" + @touchend="clearTimer"> + <view class="u-keyboard-back u-keyboard-grids-btn"> + <u-icon name="backspace" :size="38" :bold="true"></u-icon> + </view> + </view> + </view> + </view> +</template> + +<script> + export default { + props: { + // 閿洏鐨勭被鍨嬶紝number-鏁板瓧閿洏锛宑ard-韬唤璇侀敭鐩� + mode: { + type: String, + default: 'number' + }, + // 鏄惁鏄剧ず閿洏鐨�"."绗﹀彿 + dotEnabled: { + type: Boolean, + default: true + }, + // 鏄惁鎵撲贡閿洏鎸夐敭鐨勯『搴� + random: { + type: Boolean, + default: false + } + }, + data() { + return { + backspace: 'backspace', // 閫�鏍奸敭鍐呭 + dot: '.', // 鐐� + timer: null, // 闀挎寜澶氭鍒犻櫎鐨勪簨浠剁洃鍚� + cardX: 'X' // 韬唤璇佺殑X绗﹀彿 + }; + }, + computed: { + // 閿洏闇�瑕佹樉绀虹殑鍐呭 + numList() { + let tmp = []; + if (!this.dotEnabled && this.mode == 'number') { + if (!this.random) { + return [1, 2, 3, 4, 5, 6, 7, 8, 9, 0]; + } else { + return this.$u.randomArray([1, 2, 3, 4, 5, 6, 7, 8, 9, 0]); + } + } else if (this.dotEnabled && this.mode == 'number') { + if (!this.random) { + return [1, 2, 3, 4, 5, 6, 7, 8, 9, this.dot, 0]; + } else { + return this.$u.randomArray([1, 2, 3, 4, 5, 6, 7, 8, 9, this.dot, 0]); + } + } else if (this.mode == 'card') { + if (!this.random) { + return [1, 2, 3, 4, 5, 6, 7, 8, 9, this.cardX, 0]; + } else { + return this.$u.randomArray([1, 2, 3, 4, 5, 6, 7, 8, 9, this.cardX, 0]); + } + } + }, + // 鎸夐敭鐨勬牱寮忥紝鍦ㄩ潪涔卞簭&&鏁板瓧閿洏&&涓嶆樉绀虹偣鎸夐挳鏃讹紝index涓�9鏃讹紝鎸夐敭鍗犱綅涓や釜绌洪棿 + itemStyle() { + return index => { + let style = {}; + if (this.mode == 'number' && !this.dotEnabled && index == 9) style.flex = '0 0 66.6666666666%'; + return style; + }; + }, + // 鏄惁璁╂寜閿樉绀虹伆鑹诧紝鍙湪闈炰贡搴�&&鏁板瓧閿洏&&涓斿厑璁哥偣鎸夐敭鐨勬椂鍊� + btnBgGray() { + return index => { + if (!this.random && index == 9 && (this.mode != 'number' || (this.mode == 'number' && this.dotEnabled))) return true; + else return false; + }; + }, + hoverClass() { + return index => { + if (!this.random && index == 9 && (this.mode == 'number' && this.dotEnabled || this.mode == 'card')) return 'u-hover-class'; + else return 'u-keyboard-hover'; + } + } + }, + methods: { + // 鐐瑰嚮閫�鏍奸敭 + backspaceClick() { + this.$emit('backspace'); + clearInterval(this.timer); //鍐嶆娓呯┖瀹氭椂鍣紝闃叉閲嶅娉ㄥ唽瀹氭椂鍣� + this.timer = null; + this.timer = setInterval(() => { + this.$emit('backspace'); + }, 250); + }, + clearTimer() { + clearInterval(this.timer); + this.timer = null; + }, + // 鑾峰彇閿洏鏄剧ず鐨勫唴瀹� + keyboardClick(val) { + // 鍏佽閿洏鏄剧ず鐐规ā寮忓拰瑙﹀彂闈炵偣鎸夐敭鏃讹紝灏嗗唴瀹硅浆涓烘暟瀛楃被鍨� + if (this.dotEnabled && val != this.dot && val != this.cardX) val = Number(val); + this.$emit('change', val); + } + } + }; +</script> + +<style lang="scss" scoped> + @import "../../libs/css/style.components.scss"; + + .u-keyboard { + position: relative; + z-index: 1003; + } + + .u-keyboard-grids { + @include vue-flex; + flex-wrap: wrap; + } + + .u-keyboard-grids-item { + flex: 0 0 33.3333333333%; + text-align: center; + font-size: 50rpx; + color: #333; + @include vue-flex; + align-items: center; + justify-content: center; + height: 110rpx; + font-weight: 500; + } + + .u-bg-gray { + background-color: $u-border-color; + } + + .u-keyboard-back { + font-size: 36rpx; + } + + .u-keyboard-hover { + background-color: #e7e6eb; + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-parse/libs/CssHandler.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-parse/libs/CssHandler.js" new file mode 100644 index 0000000..75c6015 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-parse/libs/CssHandler.js" @@ -0,0 +1,100 @@ +const cfg = require('./config.js'), + isLetter = c => (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'); + +function CssHandler(tagStyle) { + var styles = Object.assign(Object.create(null), cfg.userAgentStyles); + for (var item in tagStyle) + styles[item] = (styles[item] ? styles[item] + ';' : '') + tagStyle[item]; + this.styles = styles; +} +CssHandler.prototype.getStyle = function(data) { + this.styles = new parser(data, this.styles).parse(); +} +CssHandler.prototype.match = function(name, attrs) { + var tmp, matched = (tmp = this.styles[name]) ? tmp + ';' : ''; + if (attrs.class) { + var items = attrs.class.split(' '); + for (var i = 0, item; item = items[i]; i++) + if (tmp = this.styles['.' + item]) + matched += tmp + ';'; + } + if (tmp = this.styles['#' + attrs.id]) + matched += tmp + ';'; + return matched; +} +module.exports = CssHandler; + +function parser(data, init) { + this.data = data; + this.floor = 0; + this.i = 0; + this.list = []; + this.res = init; + this.state = this.Space; +} +parser.prototype.parse = function() { + for (var c; c = this.data[this.i]; this.i++) + this.state(c); + return this.res; +} +parser.prototype.section = function() { + return this.data.substring(this.start, this.i); +} +// 鐘舵�佹満 +parser.prototype.Space = function(c) { + if (c == '.' || c == '#' || isLetter(c)) { + this.start = this.i; + this.state = this.Name; + } else if (c == '/' && this.data[this.i + 1] == '*') + this.Comment(); + else if (!cfg.blankChar[c] && c != ';') + this.state = this.Ignore; +} +parser.prototype.Comment = function() { + this.i = this.data.indexOf('*/', this.i) + 1; + if (!this.i) this.i = this.data.length; + this.state = this.Space; +} +parser.prototype.Ignore = function(c) { + if (c == '{') this.floor++; + else if (c == '}' && !--this.floor) { + this.list = []; + this.state = this.Space; + } +} +parser.prototype.Name = function(c) { + if (cfg.blankChar[c]) { + this.list.push(this.section()); + this.state = this.NameSpace; + } else if (c == '{') { + this.list.push(this.section()); + this.Content(); + } else if (c == ',') { + this.list.push(this.section()); + this.Comma(); + } else if (!isLetter(c) && (c < '0' || c > '9') && c != '-' && c != '_') + this.state = this.Ignore; +} +parser.prototype.NameSpace = function(c) { + if (c == '{') this.Content(); + else if (c == ',') this.Comma(); + else if (!cfg.blankChar[c]) this.state = this.Ignore; +} +parser.prototype.Comma = function() { + while (cfg.blankChar[this.data[++this.i]]); + if (this.data[this.i] == '{') this.Content(); + else { + this.start = this.i--; + this.state = this.Name; + } +} +parser.prototype.Content = function() { + this.start = ++this.i; + if ((this.i = this.data.indexOf('}', this.i)) == -1) this.i = this.data.length; + var content = this.section(); + for (var i = 0, item; item = this.list[i++];) + if (this.res[item]) this.res[item] += ';' + content; + else this.res[item] = content; + this.list = []; + this.state = this.Space; +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-parse/libs/MpHtmlParser.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-parse/libs/MpHtmlParser.js" new file mode 100644 index 0000000..aeb0fc3 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-parse/libs/MpHtmlParser.js" @@ -0,0 +1,580 @@ +/** + * html 瑙f瀽鍣� + * @tutorial https://github.com/jin-yufeng/Parser + * @version 20201029 + * @author JinYufeng + * @listens MIT + */ +const cfg = require('./config.js'), + blankChar = cfg.blankChar, + CssHandler = require('./CssHandler.js'), + windowWidth = uni.getSystemInfoSync().windowWidth; +var emoji; + +function MpHtmlParser(data, options = {}) { + this.attrs = {}; + this.CssHandler = new CssHandler(options.tagStyle, windowWidth); + this.data = data; + this.domain = options.domain; + this.DOM = []; + this.i = this.start = this.audioNum = this.imgNum = this.videoNum = 0; + options.prot = (this.domain || '').includes('://') ? this.domain.split('://')[0] : 'http'; + this.options = options; + this.state = this.Text; + this.STACK = []; + // 宸ュ叿鍑芥暟 + this.bubble = () => { + for (var i = this.STACK.length, item; item = this.STACK[--i];) { + if (cfg.richOnlyTags[item.name]) return false; + item.c = 1; + } + return true; + } + this.decode = (val, amp) => { + var i = -1, + j, en; + while (1) { + if ((i = val.indexOf('&', i + 1)) == -1) break; + if ((j = val.indexOf(';', i + 2)) == -1) break; + if (val[i + 1] == '#') { + en = parseInt((val[i + 2] == 'x' ? '0' : '') + val.substring(i + 2, j)); + if (!isNaN(en)) val = val.substr(0, i) + String.fromCharCode(en) + val.substr(j + 1); + } else { + en = val.substring(i + 1, j); + if (cfg.entities[en] || en == amp) + val = val.substr(0, i) + (cfg.entities[en] || '&') + val.substr(j + 1); + } + } + return val; + } + this.getUrl = url => { + if (url[0] == '/') { + if (url[1] == '/') url = this.options.prot + ':' + url; + else if (this.domain) url = this.domain + url; + } else if (this.domain && url.indexOf('data:') != 0 && !url.includes('://')) + url = this.domain + '/' + url; + return url; + } + this.isClose = () => this.data[this.i] == '>' || (this.data[this.i] == '/' && this.data[this.i + 1] == '>'); + this.section = () => this.data.substring(this.start, this.i); + this.parent = () => this.STACK[this.STACK.length - 1]; + this.siblings = () => this.STACK.length ? this.parent().children : this.DOM; +} +MpHtmlParser.prototype.parse = function() { + if (emoji) this.data = emoji.parseEmoji(this.data); + for (var c; c = this.data[this.i]; this.i++) + this.state(c); + if (this.state == this.Text) this.setText(); + while (this.STACK.length) this.popNode(this.STACK.pop()); + return this.DOM; +} +// 璁剧疆灞炴�� +MpHtmlParser.prototype.setAttr = function() { + var name = this.attrName.toLowerCase(), + val = this.attrVal; + if (cfg.boolAttrs[name]) this.attrs[name] = 'T'; + else if (val) { + if (name == 'src' || (name == 'data-src' && !this.attrs.src)) this.attrs.src = this.getUrl(this.decode(val, 'amp')); + else if (name == 'href' || name == 'style') this.attrs[name] = this.decode(val, 'amp'); + else if (name.substr(0, 5) != 'data-') this.attrs[name] = val; + } + this.attrVal = ''; + while (blankChar[this.data[this.i]]) this.i++; + if (this.isClose()) this.setNode(); + else { + this.start = this.i; + this.state = this.AttrName; + } +} +// 璁剧疆鏂囨湰鑺傜偣 +MpHtmlParser.prototype.setText = function() { + var back, text = this.section(); + if (!text) return; + text = (cfg.onText && cfg.onText(text, () => back = true)) || text; + if (back) { + this.data = this.data.substr(0, this.start) + text + this.data.substr(this.i); + let j = this.start + text.length; + for (this.i = this.start; this.i < j; this.i++) this.state(this.data[this.i]); + return; + } + if (!this.pre) { + // 鍚堝苟绌虹櫧绗� + var flag, tmp = []; + for (let i = text.length, c; c = text[--i];) + if (!blankChar[c]) { + tmp.unshift(c); + if (!flag) flag = 1; + } else { + if (tmp[0] != ' ') tmp.unshift(' '); + if (c == '\n' && flag == void 0) flag = 0; + } + if (flag == 0) return; + text = tmp.join(''); + } + this.siblings().push({ + type: 'text', + text: this.decode(text) + }); +} +// 璁剧疆鍏冪礌鑺傜偣 +MpHtmlParser.prototype.setNode = function() { + var node = { + name: this.tagName.toLowerCase(), + attrs: this.attrs + }, + close = cfg.selfClosingTags[node.name]; + if (this.options.nodes.length) node.type = 'node'; + this.attrs = {}; + if (!cfg.ignoreTags[node.name]) { + // 澶勭悊灞炴�� + var attrs = node.attrs, + style = this.CssHandler.match(node.name, attrs, node) + (attrs.style || ''), + styleObj = {}; + if (attrs.id) { + if (this.options.compress & 1) attrs.id = void 0; + else if (this.options.useAnchor) this.bubble(); + } + if ((this.options.compress & 2) && attrs.class) attrs.class = void 0; + switch (node.name) { + case 'a': + case 'ad': // #ifdef APP-PLUS + case 'iframe': + // #endif + this.bubble(); + break; + case 'font': + if (attrs.color) { + styleObj['color'] = attrs.color; + attrs.color = void 0; + } + if (attrs.face) { + styleObj['font-family'] = attrs.face; + attrs.face = void 0; + } + if (attrs.size) { + var size = parseInt(attrs.size); + if (size < 1) size = 1; + else if (size > 7) size = 7; + var map = ['xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large']; + styleObj['font-size'] = map[size - 1]; + attrs.size = void 0; + } + break; + case 'embed': + // #ifndef APP-PLUS + var src = node.attrs.src || '', + type = node.attrs.type || ''; + if (type.includes('video') || src.includes('.mp4') || src.includes('.3gp') || src.includes('.m3u8')) + node.name = 'video'; + else if (type.includes('audio') || src.includes('.m4a') || src.includes('.wav') || src.includes('.mp3') || src.includes( + '.aac')) + node.name = 'audio'; + else break; + if (node.attrs.autostart) + node.attrs.autoplay = 'T'; + node.attrs.controls = 'T'; + // #endif + // #ifdef APP-PLUS + this.bubble(); + break; + // #endif + case 'video': + case 'audio': + if (!attrs.id) attrs.id = node.name + (++this[`${node.name}Num`]); + else this[`${node.name}Num`]++; + if (node.name == 'video') { + if (this.videoNum > 3) + node.lazyLoad = 1; + if (attrs.width) { + styleObj.width = parseFloat(attrs.width) + (attrs.width.includes('%') ? '%' : 'px'); + attrs.width = void 0; + } + if (attrs.height) { + styleObj.height = parseFloat(attrs.height) + (attrs.height.includes('%') ? '%' : 'px'); + attrs.height = void 0; + } + } + if (!attrs.controls && !attrs.autoplay) attrs.controls = 'T'; + attrs.source = []; + if (attrs.src) { + attrs.source.push(attrs.src); + attrs.src = void 0; + } + this.bubble(); + break; + case 'td': + case 'th': + if (attrs.colspan || attrs.rowspan) + for (var k = this.STACK.length, item; item = this.STACK[--k];) + if (item.name == 'table') { + item.flag = 1; + break; + } + } + if (attrs.align) { + if (node.name == 'table') { + if (attrs.align == 'center') styleObj['margin-inline-start'] = styleObj['margin-inline-end'] = 'auto'; + else styleObj['float'] = attrs.align; + } else styleObj['text-align'] = attrs.align; + attrs.align = void 0; + } + // 鍘嬬缉 style + var styles = style.split(';'); + style = ''; + for (var i = 0, len = styles.length; i < len; i++) { + var info = styles[i].split(':'); + if (info.length < 2) continue; + let key = info[0].trim().toLowerCase(), + value = info.slice(1).join(':').trim(); + if (value[0] == '-' || value.includes('safe')) + style += `;${key}:${value}`; + else if (!styleObj[key] || value.includes('import') || !styleObj[key].includes('import')) + styleObj[key] = value; + } + if (node.name == 'img') { + if (attrs.src && !attrs.ignore) { + if (this.bubble()) + attrs.i = (this.imgNum++).toString(); + else attrs.ignore = 'T'; + } + if (attrs.ignore) { + style += ';-webkit-touch-callout:none'; + styleObj['max-width'] = '100%'; + } + var width; + if (styleObj.width) width = styleObj.width; + else if (attrs.width) width = attrs.width.includes('%') ? attrs.width : parseFloat(attrs.width) + 'px'; + if (width) { + styleObj.width = width; + attrs.width = '100%'; + if (parseInt(width) > windowWidth) { + styleObj.height = ''; + if (attrs.height) attrs.height = void 0; + } + } + if (styleObj.height) { + attrs.height = styleObj.height; + styleObj.height = ''; + } else if (attrs.height && !attrs.height.includes('%')) + attrs.height = parseFloat(attrs.height) + 'px'; + } + for (var key in styleObj) { + var value = styleObj[key]; + if (!value) continue; + if (key.includes('flex') || key == 'order' || key == 'self-align') node.c = 1; + // 濉厖閾炬帴 + if (value.includes('url')) { + var j = value.indexOf('('); + if (j++ != -1) { + while (value[j] == '"' || value[j] == "'" || blankChar[value[j]]) j++; + value = value.substr(0, j) + this.getUrl(value.substr(j)); + } + } + // 杞崲 rpx + else if (value.includes('rpx')) + value = value.replace(/[0-9.]+\s*rpx/g, $ => parseFloat($) * windowWidth / 750 + 'px'); + else if (key == 'white-space' && value.includes('pre') && !close) + this.pre = node.pre = true; + style += `;${key}:${value}`; + } + style = style.substr(1); + if (style) attrs.style = style; + if (!close) { + node.children = []; + if (node.name == 'pre' && cfg.highlight) { + this.remove(node); + this.pre = node.pre = true; + } + this.siblings().push(node); + this.STACK.push(node); + } else if (!cfg.filter || cfg.filter(node, this) != false) + this.siblings().push(node); + } else { + if (!close) this.remove(node); + else if (node.name == 'source') { + var parent = this.parent(); + if (parent && (parent.name == 'video' || parent.name == 'audio') && node.attrs.src) + parent.attrs.source.push(node.attrs.src); + } else if (node.name == 'base' && !this.domain) this.domain = node.attrs.href; + } + if (this.data[this.i] == '/') this.i++; + this.start = this.i + 1; + this.state = this.Text; +} +// 绉婚櫎鏍囩 +MpHtmlParser.prototype.remove = function(node) { + var name = node.name, + j = this.i; + // 澶勭悊 svg + var handleSvg = () => { + var src = this.data.substring(j, this.i + 1); + node.attrs.xmlns = 'http://www.w3.org/2000/svg'; + for (var key in node.attrs) { + if (key == 'viewbox') src = ` viewBox="${node.attrs.viewbox}"` + src; + else if (key != 'style') src = ` ${key}="${node.attrs[key]}"` + src; + } + src = '<svg' + src; + var parent = this.parent(); + if (node.attrs.width == '100%' && parent && (parent.attrs.style || '').includes('inline')) + parent.attrs.style = 'width:300px;max-width:100%;' + parent.attrs.style; + this.siblings().push({ + name: 'img', + attrs: { + src: 'data:image/svg+xml;utf8,' + src.replace(/#/g, '%23'), + style: node.attrs.style, + ignore: 'T' + } + }) + } + if (node.name == 'svg' && this.data[j] == '/') return handleSvg(this.i++); + while (1) { + if ((this.i = this.data.indexOf('</', this.i + 1)) == -1) { + if (name == 'pre' || name == 'svg') this.i = j; + else this.i = this.data.length; + return; + } + this.start = (this.i += 2); + while (!blankChar[this.data[this.i]] && !this.isClose()) this.i++; + if (this.section().toLowerCase() == name) { + // 浠g爜鍧楅珮浜� + if (name == 'pre') { + this.data = this.data.substr(0, j + 1) + cfg.highlight(this.data.substring(j + 1, this.i - 5), node.attrs) + this.data + .substr(this.i - 5); + return this.i = j; + } else if (name == 'style') + this.CssHandler.getStyle(this.data.substring(j + 1, this.i - 7)); + else if (name == 'title') + this.DOM.title = this.data.substring(j + 1, this.i - 7); + if ((this.i = this.data.indexOf('>', this.i)) == -1) this.i = this.data.length; + if (name == 'svg') handleSvg(); + return; + } + } +} +// 鑺傜偣鍑烘爤澶勭悊 +MpHtmlParser.prototype.popNode = function(node) { + // 绌虹櫧绗﹀鐞� + if (node.pre) { + node.pre = this.pre = void 0; + for (let i = this.STACK.length; i--;) + if (this.STACK[i].pre) + this.pre = true; + } + var siblings = this.siblings(), + len = siblings.length, + childs = node.children; + if (node.name == 'head' || (cfg.filter && cfg.filter(node, this) == false)) + return siblings.pop(); + var attrs = node.attrs; + // 鏇挎崲涓�浜涙爣绛惧悕 + if (cfg.blockTags[node.name]) node.name = 'div'; + else if (!cfg.trustTags[node.name]) node.name = 'span'; + // 澶勭悊鍒楄〃 + if (node.c && (node.name == 'ul' || node.name == 'ol')) { + if ((node.attrs.style || '').includes('list-style:none')) { + for (let i = 0, child; child = childs[i++];) + if (child.name == 'li') + child.name = 'div'; + } else if (node.name == 'ul') { + var floor = 1; + for (let i = this.STACK.length; i--;) + if (this.STACK[i].name == 'ul') floor++; + if (floor != 1) + for (let i = childs.length; i--;) + childs[i].floor = floor; + } else { + for (let i = 0, num = 1, child; child = childs[i++];) + if (child.name == 'li') { + child.type = 'ol'; + child.num = ((num, type) => { + if (type == 'a') return String.fromCharCode(97 + (num - 1) % 26); + if (type == 'A') return String.fromCharCode(65 + (num - 1) % 26); + if (type == 'i' || type == 'I') { + num = (num - 1) % 99 + 1; + var one = ['I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX'], + ten = ['X', 'XX', 'XXX', 'XL', 'L', 'LX', 'LXX', 'LXXX', 'XC'], + res = (ten[Math.floor(num / 10) - 1] || '') + (one[num % 10 - 1] || ''); + if (type == 'i') return res.toLowerCase(); + return res; + } + return num; + })(num++, attrs.type) + '.'; + } + } + } + // 澶勭悊琛ㄦ牸 + if (node.name == 'table') { + var padding = parseFloat(attrs.cellpadding), + spacing = parseFloat(attrs.cellspacing), + border = parseFloat(attrs.border); + if (node.c) { + if (isNaN(padding)) padding = 2; + if (isNaN(spacing)) spacing = 2; + } + if (border) attrs.style = `border:${border}px solid gray;${attrs.style || ''}`; + if (node.flag && node.c) { + // 鏈� colspan 鎴� rowspan 涓斿惈鏈夐摼鎺ョ殑琛ㄦ牸杞负 grid 甯冨眬瀹炵幇 + attrs.style = `${attrs.style || ''};${spacing ? `;grid-gap:${spacing}px` : ';border-left:0;border-top:0'}`; + var row = 1, + col = 1, + colNum, + trs = [], + children = [], + map = {}; + (function f(ns) { + for (var i = 0; i < ns.length; i++) { + if (ns[i].name == 'tr') trs.push(ns[i]); + else f(ns[i].children || []); + } + })(node.children) + for (let i = 0; i < trs.length; i++) { + for (let j = 0, td; td = trs[i].children[j]; j++) { + if (td.name == 'td' || td.name == 'th') { + while (map[row + '.' + col]) col++; + var cell = { + name: 'div', + c: 1, + attrs: { + style: (td.attrs.style || '') + (border ? `;border:${border}px solid gray` + (spacing ? '' : + ';border-right:0;border-bottom:0') : '') + (padding ? `;padding:${padding}px` : '') + }, + children: td.children + } + if (td.attrs.colspan) { + cell.attrs.style += ';grid-column-start:' + col + ';grid-column-end:' + (col + parseInt(td.attrs.colspan)); + if (!td.attrs.rowspan) cell.attrs.style += ';grid-row-start:' + row + ';grid-row-end:' + (row + 1); + col += parseInt(td.attrs.colspan) - 1; + } + if (td.attrs.rowspan) { + cell.attrs.style += ';grid-row-start:' + row + ';grid-row-end:' + (row + parseInt(td.attrs.rowspan)); + if (!td.attrs.colspan) cell.attrs.style += ';grid-column-start:' + col + ';grid-column-end:' + (col + 1); + for (var k = 1; k < td.attrs.rowspan; k++) map[(row + k) + '.' + col] = 1; + } + children.push(cell); + col++; + } + } + if (!colNum) { + colNum = col - 1; + attrs.style += `;grid-template-columns:repeat(${colNum},auto)` + } + col = 1; + row++; + } + node.children = children; + } else { + attrs.style = `border-spacing:${spacing}px;${attrs.style || ''}`; + if (border || padding) + (function f(ns) { + for (var i = 0, n; n = ns[i]; i++) { + if (n.name == 'th' || n.name == 'td') { + if (border) n.attrs.style = `border:${border}px solid gray;${n.attrs.style || ''}`; + if (padding) n.attrs.style = `padding:${padding}px;${n.attrs.style || ''}`; + } else f(n.children || []); + } + })(childs) + } + if (this.options.autoscroll) { + var table = Object.assign({}, node); + node.name = 'div'; + node.attrs = { + style: 'overflow:scroll' + } + node.children = [table]; + } + } + this.CssHandler.pop && this.CssHandler.pop(node); + // 鑷姩鍘嬬缉 + if (node.name == 'div' && !Object.keys(attrs).length && childs.length == 1 && childs[0].name == 'div') + siblings[len - 1] = childs[0]; +} +// 鐘舵�佹満 +MpHtmlParser.prototype.Text = function(c) { + if (c == '<') { + var next = this.data[this.i + 1], + isLetter = c => (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'); + if (isLetter(next)) { + this.setText(); + this.start = this.i + 1; + this.state = this.TagName; + } else if (next == '/') { + this.setText(); + if (isLetter(this.data[++this.i + 1])) { + this.start = this.i + 1; + this.state = this.EndTag; + } else this.Comment(); + } else if (next == '!' || next == '?') { + this.setText(); + this.Comment(); + } + } +} +MpHtmlParser.prototype.Comment = function() { + var key; + if (this.data.substring(this.i + 2, this.i + 4) == '--') key = '-->'; + else if (this.data.substring(this.i + 2, this.i + 9) == '[CDATA[') key = ']]>'; + else key = '>'; + if ((this.i = this.data.indexOf(key, this.i + 2)) == -1) this.i = this.data.length; + else this.i += key.length - 1; + this.start = this.i + 1; + this.state = this.Text; +} +MpHtmlParser.prototype.TagName = function(c) { + if (blankChar[c]) { + this.tagName = this.section(); + while (blankChar[this.data[this.i]]) this.i++; + if (this.isClose()) this.setNode(); + else { + this.start = this.i; + this.state = this.AttrName; + } + } else if (this.isClose()) { + this.tagName = this.section(); + this.setNode(); + } +} +MpHtmlParser.prototype.AttrName = function(c) { + if (c == '=' || blankChar[c] || this.isClose()) { + this.attrName = this.section(); + if (blankChar[c]) + while (blankChar[this.data[++this.i]]); + if (this.data[this.i] == '=') { + while (blankChar[this.data[++this.i]]); + this.start = this.i--; + this.state = this.AttrValue; + } else this.setAttr(); + } +} +MpHtmlParser.prototype.AttrValue = function(c) { + if (c == '"' || c == "'") { + this.start++; + if ((this.i = this.data.indexOf(c, this.i + 1)) == -1) return this.i = this.data.length; + this.attrVal = this.section(); + this.i++; + } else { + for (; !blankChar[this.data[this.i]] && !this.isClose(); this.i++); + this.attrVal = this.section(); + } + this.setAttr(); +} +MpHtmlParser.prototype.EndTag = function(c) { + if (blankChar[c] || c == '>' || c == '/') { + var name = this.section().toLowerCase(); + for (var i = this.STACK.length; i--;) + if (this.STACK[i].name == name) break; + if (i != -1) { + var node; + while ((node = this.STACK.pop()).name != name) this.popNode(node); + this.popNode(node); + } else if (name == 'p' || name == 'br') + this.siblings().push({ + name, + attrs: {} + }); + this.i = this.data.indexOf('>', this.i); + this.start = this.i + 1; + if (this.i == -1) this.i = this.data.length; + else this.state = this.Text; + } +} +module.exports = MpHtmlParser; diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-parse/libs/config.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-parse/libs/config.js" new file mode 100644 index 0000000..1f772e9 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-parse/libs/config.js" @@ -0,0 +1,80 @@ +/* 閰嶇疆鏂囦欢 */ +var cfg = { + // 鍑洪敊鍗犱綅鍥� + errorImg: null, + // 杩囨护鍣ㄥ嚱鏁� + filter: null, + // 浠g爜楂樹寒鍑芥暟 + highlight: null, + // 鏂囨湰澶勭悊鍑芥暟 + onText: null, + // 瀹炰綋缂栫爜鍒楄〃 + entities: { + quot: '"', + apos: "'", + semi: ';', + nbsp: '\xA0', + ensp: '\u2002', + emsp: '\u2003', + ndash: '鈥�', + mdash: '鈥�', + middot: '路', + lsquo: '鈥�', + rsquo: '鈥�', + ldquo: '鈥�', + rdquo: '鈥�', + bull: '鈥�', + hellip: '鈥�' + }, + blankChar: makeMap(' ,\xA0,\t,\r,\n,\f'), + boolAttrs: makeMap('allowfullscreen,autoplay,autostart,controls,ignore,loop,muted'), + // 鍧楃骇鏍囩锛屽皢琚浆涓� div + blockTags: makeMap('address,article,aside,body,caption,center,cite,footer,header,html,nav,pre,section'), + // 灏嗚绉婚櫎鐨勬爣绛� + ignoreTags: makeMap('area,base,canvas,frame,iframe,input,link,map,meta,param,script,source,style,svg,textarea,title,track,wbr'), + // 鍙兘琚� rich-text 鏄剧ず鐨勬爣绛� + richOnlyTags: makeMap('a,colgroup,fieldset,legend'), + // 鑷棴鍚堢殑鏍囩 + selfClosingTags: makeMap('area,base,br,col,circle,ellipse,embed,frame,hr,img,input,line,link,meta,param,path,polygon,rect,source,track,use,wbr'), + // 淇′换鐨勬爣绛� + trustTags: makeMap('a,abbr,ad,audio,b,blockquote,br,code,col,colgroup,dd,del,dl,dt,div,em,fieldset,h1,h2,h3,h4,h5,h6,hr,i,img,ins,label,legend,li,ol,p,q,source,span,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,title,ul,video'), + // 榛樿鐨勬爣绛炬牱寮� + userAgentStyles: { + address: 'font-style:italic', + big: 'display:inline;font-size:1.2em', + blockquote: 'background-color:#f6f6f6;border-left:3px solid #dbdbdb;color:#6c6c6c;padding:5px 0 5px 10px', + caption: 'display:table-caption;text-align:center', + center: 'text-align:center', + cite: 'font-style:italic', + dd: 'margin-left:40px', + mark: 'background-color:yellow', + pre: 'font-family:monospace;white-space:pre;overflow:scroll', + s: 'text-decoration:line-through', + small: 'display:inline;font-size:0.8em', + u: 'text-decoration:underline' + } +} + +function makeMap(str) { + var map = Object.create(null), + list = str.split(','); + for (var i = list.length; i--;) + map[list[i]] = true; + return map; +} + +// #ifdef MP-WEIXIN +if (wx.canIUse('editor')) { + cfg.blockTags.pre = void 0; + cfg.ignoreTags.rp = true; + Object.assign(cfg.richOnlyTags, makeMap('bdi,bdo,caption,rt,ruby')); + Object.assign(cfg.trustTags, makeMap('bdi,bdo,caption,pre,rt,ruby')); +} +// #endif + +// #ifdef APP-PLUS +cfg.ignoreTags.iframe = void 0; +Object.assign(cfg.trustTags, makeMap('embed,iframe')); +// #endif + +module.exports = cfg; diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-parse/libs/handler.wxs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-parse/libs/handler.wxs" new file mode 100644 index 0000000..d3b1aaa --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-parse/libs/handler.wxs" @@ -0,0 +1,22 @@ +var inline = { + abbr: 1, + b: 1, + big: 1, + code: 1, + del: 1, + em: 1, + i: 1, + ins: 1, + label: 1, + q: 1, + small: 1, + span: 1, + strong: 1, + sub: 1, + sup: 1 +} +module.exports = { + use: function(item) { + return !item.c && !inline[item.name] && (item.attrs.style || '').indexOf('display:inline') == -1 + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-parse/libs/trees.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-parse/libs/trees.vue" new file mode 100644 index 0000000..2b24820 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-parse/libs/trees.vue" @@ -0,0 +1,505 @@ +<template> + <view :class="'interlayer '+(c||'')" :style="s"> + <block v-for="(n, i) in nodes" v-bind:key="i"> + <!--鍥剧墖--> + <view v-if="n.name=='img'" :class="'_img '+n.attrs.class" :style="n.attrs.style" :data-attrs="n.attrs" @tap.stop="imgtap"> + <rich-text v-if="ctrl[i]!=0" :nodes="[{attrs:{src:loading&&(ctrl[i]||0)<2?loading:(lazyLoad&&!ctrl[i]?placeholder:(ctrl[i]==3?errorImg:n.attrs.src||'')),alt:n.attrs.alt||'',width:n.attrs.width||'',style:'-webkit-touch-callout:none;max-width:100%;display:block'+(n.attrs.height?';height:'+n.attrs.height:'')},name:'img'}]" /> + <image class="_image" :src="lazyLoad&&!ctrl[i]?placeholder:n.attrs.src" :lazy-load="lazyLoad" + :show-menu-by-longpress="!n.attrs.ignore" :data-i="i" :data-index="n.attrs.i" data-source="img" @load="loadImg" + @error="error" /> + </view> + <!--鏂囨湰--> + <text v-else-if="n.type=='text'" decode>{{n.text}}</text> + <!--#ifndef MP-BAIDU--> + <text v-else-if="n.name=='br'">\n</text> + <!--#endif--> + <!--瑙嗛--> + <view v-else-if="((n.lazyLoad&&!n.attrs.autoplay)||(n.name=='video'&&!loadVideo))&&ctrl[i]==undefined" :id="n.attrs.id" + :class="'_video '+(n.attrs.class||'')" :style="n.attrs.style" :data-i="i" @tap.stop="_loadVideo" /> + <video v-else-if="n.name=='video'" :id="n.attrs.id" :class="n.attrs.class" :style="n.attrs.style" :autoplay="n.attrs.autoplay||ctrl[i]==0" + :controls="n.attrs.controls" :loop="n.attrs.loop" :muted="n.attrs.muted" :poster="n.attrs.poster" :src="n.attrs.source[ctrl[i]||0]" + :unit-id="n.attrs['unit-id']" :data-id="n.attrs.id" :data-i="i" data-source="video" @error="error" @play="play" /> + <!--闊抽--> + <audio v-else-if="n.name=='audio'" :ref="n.attrs.id" :class="n.attrs.class" :style="n.attrs.style" :author="n.attrs.author" + :autoplay="n.attrs.autoplay" :controls="n.attrs.controls" :loop="n.attrs.loop" :name="n.attrs.name" :poster="n.attrs.poster" + :src="n.attrs.source[ctrl[i]||0]" :data-i="i" :data-id="n.attrs.id" data-source="audio" @error.native="error" + @play.native="play" /> + <!--閾炬帴--> + <view v-else-if="n.name=='a'" :id="n.attrs.id" :class="'_a '+(n.attrs.class||'')" hover-class="_hover" :style="n.attrs.style" + :data-attrs="n.attrs" @tap.stop="linkpress"> + <trees class="_span" c="_span" :nodes="n.children" /> + </view> + <!--骞垮憡--> + <!--<ad v-else-if="n.name=='ad'" :class="n.attrs.class" :style="n.attrs.style" :unit-id="n.attrs['unit-id']" :appid="n.attrs.appid" :apid="n.attrs.apid" :type="n.attrs.type" :adpid="n.attrs.adpid" data-source="ad" @error="error" />--> + <!--鍒楄〃--> + <view v-else-if="n.name=='li'" :id="n.attrs.id" :class="n.attrs.class" :style="(n.attrs.style||'')+';display:flex;flex-direction:row'"> + <view v-if="n.type=='ol'" class="_ol-bef">{{n.num}}</view> + <view v-else class="_ul-bef"> + <view v-if="n.floor%3==0" class="_ul-p1">鈻�</view> + <view v-else-if="n.floor%3==2" class="_ul-p2" /> + <view v-else class="_ul-p1" style="border-radius:50%">鈻�</view> + </view> + <trees class="_li" c="_li" :nodes="n.children" :lazyLoad="lazyLoad" :loading="loading" /> + </view> + <!--琛ㄦ牸--> + <view v-else-if="n.name=='table'&&n.c&&n.flag" :id="n.attrs.id" :class="n.attrs.class" :style="(n.attrs.style||'')+';display:grid'"> + <trees v-for="(cell,n) in n.children" v-bind:key="n" :class="cell.attrs.class" :c="cell.attrs.class" :style="cell.attrs.style" + :s="cell.attrs.style" :nodes="cell.children" /> + </view> + <view v-else-if="n.name=='table'&&n.c" :id="n.attrs.id" :class="n.attrs.class" :style="(n.attrs.style||'')+';display:table'"> + <view v-for="(tbody, o) in n.children" v-bind:key="o" :class="tbody.attrs.class" :style="(tbody.attrs.style||'')+(tbody.name[0]=='t'?';display:table-'+(tbody.name=='tr'?'row':'row-group'):'')"> + <view v-for="(tr, p) in tbody.children" v-bind:key="p" :class="tr.attrs.class" :style="(tr.attrs.style||'')+(tr.name[0]=='t'?';display:table-'+(tr.name=='tr'?'row':'cell'):'')"> + <trees v-if="tr.name=='td'" :nodes="tr.children" /> + <trees v-else v-for="(td, q) in tr.children" v-bind:key="q" :class="td.attrs.class" :c="td.attrs.class" :style="(td.attrs.style||'')+(td.name[0]=='t'?';display:table-'+(td.name=='tr'?'row':'cell'):'')" + :s="(td.attrs.style||'')+(td.name[0]=='t'?';display:table-'+(td.name=='tr'?'row':'cell'):'')" :nodes="td.children" /> + </view> + </view> + </view> + <!--#ifdef APP-PLUS--> + <iframe v-else-if="n.name=='iframe'" :style="n.attrs.style" :allowfullscreen="n.attrs.allowfullscreen" :frameborder="n.attrs.frameborder" + :width="n.attrs.width" :height="n.attrs.height" :src="n.attrs.src" /> + <embed v-else-if="n.name=='embed'" :style="n.attrs.style" :width="n.attrs.width" :height="n.attrs.height" :src="n.attrs.src" /> + <!--#endif--> + <!--瀵屾枃鏈�--> + <!--#ifdef MP-WEIXIN || MP-QQ || APP-PLUS--> + <rich-text v-else-if="handler.use(n)" :id="n.attrs.id" :class="'_p __'+n.name" :nodes="[n]" /> + <!--#endif--> + <!--#ifndef MP-WEIXIN || MP-QQ || APP-PLUS--> + <rich-text v-else-if="!n.c" :id="n.attrs.id" :nodes="[n]" style="display:inline" /> + <!--#endif--> + <trees v-else :class="(n.attrs.id||'')+' _'+n.name+' '+(n.attrs.class||'')" :c="(n.attrs.id||'')+' _'+n.name+' '+(n.attrs.class||'')" + :style="n.attrs.style" :s="n.attrs.style" :nodes="n.children" :lazyLoad="lazyLoad" :loading="loading" /> + </block> + </view> +</template> +<script module="handler" lang="wxs" src="./handler.wxs"></script> +<script> + global.Parser = {}; + import trees from './trees' + const errorImg = require('../libs/config.js').errorImg; + export default { + components: { + trees + }, + name: 'trees', + data() { + return { + ctrl: [], + placeholder: 'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="300" height="225"/>', + errorImg, + loadVideo: typeof plus == 'undefined', + // #ifndef MP-ALIPAY + c: '', + s: '' + // #endif + } + }, + props: { + nodes: Array, + lazyLoad: Boolean, + loading: String, + // #ifdef MP-ALIPAY + c: String, + s: String + // #endif + }, + mounted() { + for (this.top = this.$parent; this.top.$options.name != 'parser'; this.top = this.top.$parent); + this.init(); + }, + // #ifdef APP-PLUS + beforeDestroy() { + this.observer && this.observer.disconnect(); + }, + // #endif + methods: { + init() { + for (var i = this.nodes.length, n; n = this.nodes[--i];) { + if (n.name == 'img') { + this.top.imgList.setItem(n.attrs.i, n.attrs['original-src'] || n.attrs.src); + // #ifdef APP-PLUS + if (this.lazyLoad && !this.observer) { + this.observer = uni.createIntersectionObserver(this).relativeToViewport({ + top: 500, + bottom: 500 + }); + setTimeout(() => { + this.observer.observe('._img', res => { + if (res.intersectionRatio) { + for (var j = this.nodes.length; j--;) + if (this.nodes[j].name == 'img') + this.$set(this.ctrl, j, 1); + this.observer.disconnect(); + } + }) + }, 0) + } + // #endif + } else if (n.name == 'video' || n.name == 'audio') { + var ctx; + if (n.name == 'video') { + ctx = uni.createVideoContext(n.attrs.id + // #ifndef MP-BAIDU + , this + // #endif + ); + } else if (this.$refs[n.attrs.id]) + ctx = this.$refs[n.attrs.id][0]; + if (ctx) { + ctx.id = n.attrs.id; + this.top.videoContexts.push(ctx); + } + } + } + // #ifdef APP-PLUS + // APP 涓婇伩鍏� video 閿欎綅闇�瑕佸欢鏃舵覆鏌� + setTimeout(() => { + this.loadVideo = true; + }, 1000) + // #endif + }, + play(e) { + var contexts = this.top.videoContexts; + if (contexts.length > 1 && this.top.autopause) + for (var i = contexts.length; i--;) + if (contexts[i].id != e.currentTarget.dataset.id) + contexts[i].pause(); + }, + imgtap(e) { + var attrs = e.currentTarget.dataset.attrs; + if (!attrs.ignore) { + var preview = true, + data = { + id: e.target.id, + src: attrs.src, + ignore: () => preview = false + }; + global.Parser.onImgtap && global.Parser.onImgtap(data); + this.top.$emit('imgtap', data); + if (preview) { + var urls = this.top.imgList, + current = urls[attrs.i] ? parseInt(attrs.i) : (urls = [attrs.src], 0); + uni.previewImage({ + current, + urls + }) + } + } + }, + loadImg(e) { + var i = e.currentTarget.dataset.i; + if (this.lazyLoad && !this.ctrl[i]) { + // #ifdef QUICKAPP-WEBVIEW + this.$set(this.ctrl, i, 0); + this.$nextTick(function() { + // #endif + // #ifndef APP-PLUS + this.$set(this.ctrl, i, 1); + // #endif + // #ifdef QUICKAPP-WEBVIEW + }) + // #endif + } else if (this.loading && this.ctrl[i] != 2) { + // #ifdef QUICKAPP-WEBVIEW + this.$set(this.ctrl, i, 0); + this.$nextTick(function() { + // #endif + this.$set(this.ctrl, i, 2); + // #ifdef QUICKAPP-WEBVIEW + }) + // #endif + } + }, + linkpress(e) { + var jump = true, + attrs = e.currentTarget.dataset.attrs; + attrs.ignore = () => jump = false; + global.Parser.onLinkpress && global.Parser.onLinkpress(attrs); + this.top.$emit('linkpress', attrs); + if (jump) { + // #ifdef MP + if (attrs['app-id']) { + return uni.navigateToMiniProgram({ + appId: attrs['app-id'], + path: attrs.path + }) + } + // #endif + if (attrs.href) { + if (attrs.href[0] == '#') { + if (this.top.useAnchor) + this.top.navigateTo({ + id: attrs.href.substring(1) + }) + } else if (attrs.href.indexOf('http') == 0 || attrs.href.indexOf('//') == 0) { + // #ifdef APP-PLUS + plus.runtime.openWeb(attrs.href); + // #endif + // #ifndef APP-PLUS + uni.setClipboardData({ + data: attrs.href, + success: () => + uni.showToast({ + title: '閾炬帴宸插鍒�' + }) + }) + // #endif + } else + uni.navigateTo({ + url: attrs.href, + fail() { + uni.switchTab({ + url: attrs.href, + }) + } + }) + } + } + }, + error(e) { + var target = e.currentTarget, + source = target.dataset.source, + i = target.dataset.i; + if (source == 'video' || source == 'audio') { + // 鍔犺浇鍏朵粬 source + var index = this.ctrl[i] ? this.ctrl[i].i + 1 : 1; + if (index < this.nodes[i].attrs.source.length) + this.$set(this.ctrl, i, index); + if (e.detail.__args__) + e.detail = e.detail.__args__[0]; + } else if (errorImg && source == 'img') { + this.top.imgList.setItem(target.dataset.index, errorImg); + this.$set(this.ctrl, i, 3); + } + this.top && this.top.$emit('error', { + source, + target, + errMsg: e.detail.errMsg + }); + }, + _loadVideo(e) { + this.$set(this.ctrl, e.target.dataset.i, 0); + } + } + } +</script> + +<style> + /* 鍦ㄨ繖閲屽紩鍏ヨ嚜瀹氫箟鏍峰紡 */ + + /* 閾炬帴鍜屽浘鐗囨晥鏋� */ + ._a { + display: inline; + padding: 1.5px 0 1.5px 0; + color: #366092; + word-break: break-all; + } + + ._hover { + text-decoration: underline; + opacity: 0.7; + } + + ._img { + display: inline-block; + max-width: 100%; + overflow: hidden; + } + + /* #ifdef MP-WEIXIN */ + :host { + display: inline; + } + + /* #endif */ + + /* #ifndef MP-ALIPAY || APP-PLUS */ + .interlayer { + display: inherit; + flex-direction: inherit; + flex-wrap: inherit; + align-content: inherit; + align-items: inherit; + justify-content: inherit; + width: 100%; + white-space: inherit; + } + + /* #endif */ + + ._b, + ._strong { + font-weight: bold; + } + + /* #ifndef MP-ALIPAY */ + ._blockquote, + ._div, + ._p, + ._ol, + ._ul, + ._li { + display: block; + } + + /* #endif */ + + ._code { + font-family: monospace; + } + + ._del { + text-decoration: line-through; + } + + ._em, + ._i { + font-style: italic; + } + + ._h1 { + font-size: 2em; + } + + ._h2 { + font-size: 1.5em; + } + + ._h3 { + font-size: 1.17em; + } + + ._h5 { + font-size: 0.83em; + } + + ._h6 { + font-size: 0.67em; + } + + ._h1, + ._h2, + ._h3, + ._h4, + ._h5, + ._h6 { + display: block; + font-weight: bold; + } + + ._image { + display: block; + width: 100%; + height: 360px; + margin-top: -360px; + opacity: 0; + } + + ._ins { + text-decoration: underline; + } + + ._li { + flex: 1; + width: 0; + } + + ._ol-bef { + width: 36px; + margin-right: 5px; + text-align: right; + } + + ._ul-bef { + display: block; + margin: 0 12px 0 23px; + line-height: normal; + } + + ._ol-bef, + ._ul-bef { + flex: none; + user-select: none; + } + + ._ul-p1 { + display: inline-block; + width: 0.3em; + height: 0.3em; + overflow: hidden; + line-height: 0.3em; + } + + ._ul-p2 { + display: inline-block; + width: 0.23em; + height: 0.23em; + border: 0.05em solid black; + border-radius: 50%; + } + + ._q::before { + content: '"'; + } + + ._q::after { + content: '"'; + } + + ._sub { + font-size: smaller; + vertical-align: sub; + } + + ._sup { + font-size: smaller; + vertical-align: super; + } + + /* #ifdef MP-ALIPAY || APP-PLUS || QUICKAPP-WEBVIEW */ + ._abbr, + ._b, + ._code, + ._del, + ._em, + ._i, + ._ins, + ._label, + ._q, + ._span, + ._strong, + ._sub, + ._sup { + display: inline; + } + + /* #endif */ + + /* #ifdef MP-WEIXIN || MP-QQ */ + .__bdo, + .__bdi, + .__ruby, + .__rt { + display: inline-block; + } + + /* #endif */ + ._video { + position: relative; + display: inline-block; + width: 300px; + height: 225px; + background-color: black; + } + + ._video::after { + position: absolute; + top: 50%; + left: 50%; + margin: -15px 0 0 -15px; + content: ''; + border-color: transparent transparent transparent white; + border-style: solid; + border-width: 15px 0 15px 30px; + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-parse/u-parse.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-parse/u-parse.vue" new file mode 100644 index 0000000..57a105e --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-parse/u-parse.vue" @@ -0,0 +1,645 @@ +<template> + <view> + <slot v-if="!nodes.length" /> + <!--#ifdef APP-PLUS-NVUE--> + <web-view id="_top" ref="web" :style="'margin-top:-2px;height:'+height+'px'" @onPostMessage="_message" /> + <!--#endif--> + <!--#ifndef APP-PLUS-NVUE--> + <view id="_top" :style="showAm+(selectable?';user-select:text;-webkit-user-select:text':'')"> + <!--#ifdef H5 || MP-360--> + <div :id="'rtf'+uid"></div> + <!--#endif--> + <!--#ifndef H5 || MP-360--> + <trees :nodes="nodes" :lazyLoad="lazyLoad" :loading="loadingImg" /> + <!--#endif--> + </view> + <!--#endif--> + </view> +</template> + +<script> + var search; + // #ifndef H5 || APP-PLUS-NVUE || MP-360 + import trees from './libs/trees'; + var cache = {}, + // #ifdef MP-WEIXIN || MP-TOUTIAO + fs = uni.getFileSystemManager ? uni.getFileSystemManager() : null, + // #endif + Parser = require('./libs/MpHtmlParser.js'); + var dom; + // 璁$畻 cache 鐨� key + function hash(str) { + for (var i = str.length, val = 5381; i--;) + val += (val << 5) + str.charCodeAt(i); + return val; + } + // #endif + // #ifdef H5 || APP-PLUS-NVUE || MP-360 + var { + windowWidth, + platform + } = uni.getSystemInfoSync(), + cfg = require('./libs/config.js'); + // #endif + // #ifdef APP-PLUS-NVUE + var weexDom = weex.requireModule('dom'); + // #endif + /** + * Parser 瀵屾枃鏈粍浠� + * @tutorial https://github.com/jin-yufeng/Parser + * @property {String} html 瀵屾枃鏈暟鎹� + * @property {Boolean} autopause 鏄惁鍦ㄦ挱鏀句竴涓棰戞椂鑷姩鏆傚仠鍏朵粬瑙嗛 + * @property {Boolean} autoscroll 鏄惁鑷姩缁欐墍鏈夎〃鏍兼坊鍔犱竴涓粴鍔ㄥ眰 + * @property {Boolean} autosetTitle 鏄惁鑷姩灏� title 鏍囩涓殑鍐呭璁剧疆鍒伴〉闈㈡爣棰� + * @property {Number} compress 鍘嬬缉绛夌骇 + * @property {String} domain 鍥剧墖銆佽棰戠瓑閾炬帴鐨勪富鍩熷悕 + * @property {Boolean} lazyLoad 鏄惁寮�鍚浘鐗囨噿鍔犺浇 + * @property {String} loadingImg 鍥剧墖鍔犺浇瀹屾垚鍓嶇殑鍗犱綅鍥� + * @property {Boolean} selectable 鏄惁寮�鍚暱鎸夊鍒� + * @property {Object} tagStyle 鏍囩鐨勯粯璁ゆ牱寮� + * @property {Boolean} showWithAnimation 鏄惁浣跨敤娓愭樉鍔ㄧ敾 + * @property {Boolean} useAnchor 鏄惁浣跨敤閿氱偣 + * @property {Boolean} useCache 鏄惁缂撳瓨瑙f瀽缁撴灉 + * @event {Function} parse 瑙f瀽瀹屾垚浜嬩欢 + * @event {Function} load dom 鍔犺浇瀹屾垚浜嬩欢 + * @event {Function} ready 鎵�鏈夊浘鐗囧姞杞藉畬姣曚簨浠� + * @event {Function} error 閿欒浜嬩欢 + * @event {Function} imgtap 鍥剧墖鐐瑰嚮浜嬩欢 + * @event {Function} linkpress 閾炬帴鐐瑰嚮浜嬩欢 + * @author JinYufeng + * @version 20201029 + * @listens MIT + */ + export default { + name: 'parser', + data() { + return { + // #ifdef H5 || MP-360 + uid: this._uid, + // #endif + // #ifdef APP-PLUS-NVUE + height: 1, + // #endif + // #ifndef APP-PLUS-NVUE + showAm: '', + // #endif + nodes: [] + } + }, + // #ifndef H5 || APP-PLUS-NVUE || MP-360 + components: { + trees + }, + // #endif + props: { + html: String, + autopause: { + type: Boolean, + default: true + }, + autoscroll: Boolean, + autosetTitle: { + type: Boolean, + default: true + }, + // #ifndef H5 || APP-PLUS-NVUE || MP-360 + compress: Number, + loadingImg: String, + useCache: Boolean, + // #endif + domain: String, + lazyLoad: Boolean, + selectable: Boolean, + tagStyle: Object, + showWithAnimation: Boolean, + useAnchor: Boolean + }, + watch: { + html(html) { + this.setContent(html); + } + }, + created() { + // 鍥剧墖鏁扮粍 + this.imgList = []; + this.imgList.each = function(f) { + for (var i = 0, len = this.length; i < len; i++) + this.setItem(i, f(this[i], i, this)); + } + this.imgList.setItem = function(i, src) { + if (i == void 0 || !src) return; + // #ifndef MP-ALIPAY || APP-PLUS + // 鍘婚噸 + if (src.indexOf('http') == 0 && this.includes(src)) { + var newSrc = src.split('://')[0]; + for (var j = newSrc.length, c; c = src[j]; j++) { + if (c == '/' && src[j - 1] != '/' && src[j + 1] != '/') break; + newSrc += Math.random() > 0.5 ? c.toUpperCase() : c; + } + newSrc += src.substr(j); + return this[i] = newSrc; + } + // #endif + this[i] = src; + // 鏆傚瓨 data src + if (src.includes('data:image')) { + var filePath, info = src.match(/data:image\/(\S+?);(\S+?),(.+)/); + if (!info) return; + // #ifdef MP-WEIXIN || MP-TOUTIAO + filePath = `${wx.env.USER_DATA_PATH}/${Date.now()}.${info[1]}`; + fs && fs.writeFile({ + filePath, + data: info[3], + encoding: info[2], + success: () => this[i] = filePath + }) + // #endif + // #ifdef APP-PLUS + filePath = `_doc/parser_tmp/${Date.now()}.${info[1]}`; + var bitmap = new plus.nativeObj.Bitmap(); + bitmap.loadBase64Data(src, () => { + bitmap.save(filePath, {}, () => { + bitmap.clear() + this[i] = filePath; + }) + }) + // #endif + } + } + }, + mounted() { + // #ifdef H5 || MP-360 + this.document = document.getElementById('rtf' + this._uid); + // #endif + // #ifndef H5 || APP-PLUS-NVUE || MP-360 + if (dom) this.document = new dom(this); + // #endif + if (search) this.search = args => search(this, args); + // #ifdef APP-PLUS-NVUE + this.document = this.$refs.web; + setTimeout(() => { + // #endif + if (this.html) this.setContent(this.html); + // #ifdef APP-PLUS-NVUE + }, 30) + // #endif + }, + beforeDestroy() { + // #ifdef H5 || MP-360 + if (this._observer) this._observer.disconnect(); + // #endif + this.imgList.each(src => { + // #ifdef APP-PLUS + if (src && src.includes('_doc')) { + plus.io.resolveLocalFileSystemURL(src, entry => { + entry.remove(); + }); + } + // #endif + // #ifdef MP-WEIXIN || MP-TOUTIAO + if (src && src.includes(uni.env.USER_DATA_PATH)) + fs && fs.unlink({ + filePath: src + }) + // #endif + }) + clearInterval(this._timer); + }, + methods: { + // 璁剧疆瀵屾枃鏈唴瀹� + setContent(html, append) { + // #ifdef APP-PLUS-NVUE + if (!html) + return this.height = 1; + if (append) + this.$refs.web.evalJs("var b=document.createElement('div');b.innerHTML='" + html.replace(/'/g, "\\'") + + "';document.getElementById('parser').appendChild(b)"); + else { + html = + '<meta charset="utf-8" /><meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"><style>html,body{width:100%;height:100%;overflow:hidden}body{margin:0}</style><base href="' + + this.domain + '"><div id="parser"' + (this.selectable ? '>' : ' style="user-select:none">') + this._handleHtml(html).replace(/\n/g, '\\n') + + '</div><script>"use strict";function e(e){if(window.__dcloud_weex_postMessage||window.__dcloud_weex_){var t={data:[e]};window.__dcloud_weex_postMessage?window.__dcloud_weex_postMessage(t):window.__dcloud_weex_.postMessage(JSON.stringify(t))}}document.body.onclick=function(){e({action:"click"})},' + + (this.showWithAnimation ? 'document.body.style.animation="_show .5s",' : '') + + 'setTimeout(function(){e({action:"load",text:document.body.innerText,height:document.getElementById("parser").scrollHeight})},50);\x3c/script>'; + if (platform == 'android') html = html.replace(/%/g, '%25'); + this.$refs.web.evalJs("document.write('" + html.replace(/'/g, "\\'") + "');document.close()"); + } + this.$refs.web.evalJs( + 'var t=document.getElementsByTagName("title");t.length&&e({action:"getTitle",title:t[0].innerText});for(var o,n=document.getElementsByTagName("style"),r=1;o=n[r++];)o.innerHTML=o.innerHTML.replace(/body/g,"#parser");for(var a,c=document.getElementsByTagName("img"),s=[],i=0==c.length,d=0,l=0,g=0;a=c[l];l++)parseInt(a.style.width||a.getAttribute("width"))>' + + windowWidth + '&&(a.style.height="auto"),a.onload=function(){++d==c.length&&(i=!0)},a.onerror=function(){++d==c.length&&(i=!0),' + (cfg.errorImg ? 'this.src="' + cfg.errorImg + '",' : '') + + 'e({action:"error",source:"img",target:this})},a.hasAttribute("ignore")||"A"==a.parentElement.nodeName||(a.i=g++,s.push(a.getAttribute("original-src")||a.src||a.getAttribute("data-src")),a.onclick=function(t){t.stopPropagation(),e({action:"preview",img:{i:this.i,src:this.src}})});e({action:"getImgList",imgList:s});for(var u,m=document.getElementsByTagName("a"),f=0;u=m[f];f++)u.onclick=function(m){m.stopPropagation();var t,o=this.getAttribute("href");if("#"==o[0]){var n=document.getElementById(o.substr(1));n&&(t=n.offsetTop)}return e({action:"linkpress",href:o,offset:t}),!1};for(var h,y=document.getElementsByTagName("video"),v=0;h=y[v];v++)h.style.maxWidth="100%",h.onerror=function(){e({action:"error",source:"video",target:this})}' + + (this.autopause ? ',h.onplay=function(){for(var e,t=0;e=y[t];t++)e!=this&&e.pause()}' : '') + + ';for(var _,p=document.getElementsByTagName("audio"),w=0;_=p[w];w++)_.onerror=function(){e({action:"error",source:"audio",target:this})};' + + (this.autoscroll ? 'for(var T,E=document.getElementsByTagName("table"),B=0;T=E[B];B++){var N=document.createElement("div");N.style.overflow="scroll",T.parentNode.replaceChild(N,T),N.appendChild(T)}' : '') + + 'var x=document.getElementById("parser");clearInterval(window.timer),window.timer=setInterval(function(){i&&clearInterval(window.timer),e({action:"ready",ready:i,height:x.scrollHeight})},350)' + ) + this.nodes = [1]; + // #endif + // #ifdef H5 || MP-360 + if (!html) { + if (this.rtf && !append) this.rtf.parentNode.removeChild(this.rtf); + return; + } + var div = document.createElement('div'); + if (!append) { + if (this.rtf) this.rtf.parentNode.removeChild(this.rtf); + this.rtf = div; + } else { + if (!this.rtf) this.rtf = div; + else this.rtf.appendChild(div); + } + div.innerHTML = this._handleHtml(html, append); + for (var styles = this.rtf.getElementsByTagName('style'), i = 0, style; style = styles[i++];) { + style.innerHTML = style.innerHTML.replace(/body/g, '#rtf' + this._uid); + style.setAttribute('scoped', 'true'); + } + // 鎳掑姞杞� + if (!this._observer && this.lazyLoad && IntersectionObserver) { + this._observer = new IntersectionObserver(changes => { + for (let item, i = 0; item = changes[i++];) { + if (item.isIntersecting) { + item.target.src = item.target.getAttribute('data-src'); + item.target.removeAttribute('data-src'); + this._observer.unobserve(item.target); + } + } + }, { + rootMargin: '500px 0px 500px 0px' + }) + } + var _ts = this; + // 鑾峰彇鏍囬 + var title = this.rtf.getElementsByTagName('title'); + if (title.length && this.autosetTitle) + uni.setNavigationBarTitle({ + title: title[0].innerText + }) + // 濉厖 domain + var fill = target => { + var src = target.getAttribute('src'); + if (this.domain && src) { + if (src[0] == '/') { + if (src[1] == '/') + target.src = (this.domain.includes('://') ? this.domain.split('://')[0] : '') + ':' + src; + else target.src = this.domain + src; + } else if (!src.includes('://') && src.indexOf('data:') != 0) target.src = this.domain + '/' + src; + } + } + // 鍥剧墖澶勭悊 + this.imgList.length = 0; + var imgs = this.rtf.getElementsByTagName('img'); + for (let i = 0, j = 0, img; img = imgs[i]; i++) { + if (parseInt(img.style.width || img.getAttribute('width')) > windowWidth) + img.style.height = 'auto'; + fill(img); + if (!img.hasAttribute('ignore') && img.parentElement.nodeName != 'A') { + img.i = j++; + _ts.imgList.push(img.getAttribute('original-src') || img.src || img.getAttribute('data-src')); + img.onclick = function(e) { + e.stopPropagation(); + var preview = true; + this.ignore = () => preview = false; + _ts.$emit('imgtap', this); + if (preview) { + uni.previewImage({ + current: this.i, + urls: _ts.imgList + }); + } + } + } + img.onerror = function() { + if (cfg.errorImg) + _ts.imgList[this.i] = this.src = cfg.errorImg; + _ts.$emit('error', { + source: 'img', + target: this + }); + } + if (_ts.lazyLoad && this._observer && img.src && img.i != 0) { + img.setAttribute('data-src', img.src); + img.removeAttribute('src'); + this._observer.observe(img); + } + } + // 閾炬帴澶勭悊 + var links = this.rtf.getElementsByTagName('a'); + for (var link of links) { + link.onclick = function(e) { + e.stopPropagation(); + var jump = true, + href = this.getAttribute('href'); + _ts.$emit('linkpress', { + href, + ignore: () => jump = false + }); + if (jump && href) { + if (href[0] == '#') { + if (_ts.useAnchor) { + _ts.navigateTo({ + id: href.substr(1) + }) + } + } else if (href.indexOf('http') == 0 || href.indexOf('//') == 0) + return true; + else + uni.navigateTo({ + url: href + }) + } + return false; + } + } + // 瑙嗛澶勭悊 + var videos = this.rtf.getElementsByTagName('video'); + _ts.videoContexts = videos; + for (let video, i = 0; video = videos[i++];) { + fill(video); + video.style.maxWidth = '100%'; + video.onerror = function() { + _ts.$emit('error', { + source: 'video', + target: this + }); + } + video.onplay = function() { + if (_ts.autopause) + for (let item, i = 0; item = _ts.videoContexts[i++];) + if (item != this) item.pause(); + } + } + // 闊抽澶勭悊 + var audios = this.rtf.getElementsByTagName('audio'); + for (var audio of audios) { + fill(audio); + audio.onerror = function() { + _ts.$emit('error', { + source: 'audio', + target: this + }); + } + } + // 琛ㄦ牸澶勭悊 + if (this.autoscroll) { + var tables = this.rtf.getElementsByTagName('table'); + for (var table of tables) { + let div = document.createElement('div'); + div.style.overflow = 'scroll'; + table.parentNode.replaceChild(div, table); + div.appendChild(table); + } + } + if (!append) this.document.appendChild(this.rtf); + this.$nextTick(() => { + this.nodes = [1]; + this.$emit('load'); + }); + setTimeout(() => this.showAm = '', 500); + // #endif + // #ifndef APP-PLUS-NVUE + // #ifndef H5 || MP-360 + var nodes; + if (!html) return this.nodes = []; + var parser = new Parser(html, this); + // 缂撳瓨璇诲彇 + if (this.useCache) { + var hashVal = hash(html); + if (cache[hashVal]) + nodes = cache[hashVal]; + else { + nodes = parser.parse(); + cache[hashVal] = nodes; + } + } else nodes = parser.parse(); + this.$emit('parse', nodes); + if (append) this.nodes = this.nodes.concat(nodes); + else this.nodes = nodes; + if (nodes.length && nodes.title && this.autosetTitle) + uni.setNavigationBarTitle({ + title: nodes.title + }) + if (this.imgList) this.imgList.length = 0; + this.videoContexts = []; + this.$nextTick(() => { + (function f(cs) { + for (var i = cs.length; i--;) { + if (cs[i].top) { + cs[i].controls = []; + cs[i].init(); + f(cs[i].$children); + } + } + })(this.$children) + this.$emit('load'); + }) + // #endif + var height; + clearInterval(this._timer); + this._timer = setInterval(() => { + // #ifdef H5 || MP-360 + this.rect = this.rtf.getBoundingClientRect(); + // #endif + // #ifndef H5 || MP-360 + uni.createSelectorQuery().in(this) + .select('#_top').boundingClientRect().exec(res => { + if (!res) return; + this.rect = res[0]; + // #endif + if (this.rect.height == height) { + this.$emit('ready', this.rect) + clearInterval(this._timer); + } + height = this.rect.height; + // #ifndef H5 || MP-360 + }); + // #endif + }, 350); + if (this.showWithAnimation && !append) this.showAm = 'animation:_show .5s'; + // #endif + }, + // 鑾峰彇鏂囨湰鍐呭 + getText(ns = this.nodes) { + var txt = ''; + // #ifdef APP-PLUS-NVUE + txt = this._text; + // #endif + // #ifdef H5 || MP-360 + txt = this.rtf.innerText; + // #endif + // #ifndef H5 || APP-PLUS-NVUE || MP-360 + for (var i = 0, n; n = ns[i++];) { + if (n.type == 'text') txt += n.text.replace(/ /g, '\u00A0').replace(/</g, '<').replace(/>/g, '>') + .replace(/&/g, '&'); + else if (n.type == 'br') txt += '\n'; + else { + // 鍧楃骇鏍囩鍓嶅悗鍔犳崲琛� + var block = n.name == 'p' || n.name == 'div' || n.name == 'tr' || n.name == 'li' || (n.name[0] == 'h' && n.name[1] > + '0' && n.name[1] < '7'); + if (block && txt && txt[txt.length - 1] != '\n') txt += '\n'; + if (n.children) txt += this.getText(n.children); + if (block && txt[txt.length - 1] != '\n') txt += '\n'; + else if (n.name == 'td' || n.name == 'th') txt += '\t'; + } + } + // #endif + return txt; + }, + // 閿氱偣璺宠浆 + in (obj) { + if (obj.page && obj.selector && obj.scrollTop) this._in = obj; + }, + navigateTo(obj) { + if (!this.useAnchor) return obj.fail && obj.fail('Anchor is disabled'); + // #ifdef APP-PLUS-NVUE + if (!obj.id) + weexDom.scrollToElement(this.$refs.web); + else + this.$refs.web.evalJs('var pos=document.getElementById("' + obj.id + + '");if(pos)post({action:"linkpress",href:"#",offset:pos.offsetTop+' + (obj.offset || 0) + '})'); + obj.success && obj.success(); + // #endif + // #ifndef APP-PLUS-NVUE + var d = ' '; + // #ifdef MP-WEIXIN || MP-QQ || MP-TOUTIAO + d = '>>>'; + // #endif + var selector = uni.createSelectorQuery().in(this._in ? this._in.page : this).select((this._in ? this._in.selector : + '#_top') + (obj.id ? `${d}#${obj.id},${this._in?this._in.selector:'#_top'}${d}.${obj.id}` : '')).boundingClientRect(); + if (this._in) selector.select(this._in.selector).scrollOffset().select(this._in.selector).boundingClientRect(); + else selector.selectViewport().scrollOffset(); + selector.exec(res => { + if (!res[0]) return obj.fail && obj.fail('Label not found') + var scrollTop = res[1].scrollTop + res[0].top - (res[2] ? res[2].top : 0) + (obj.offset || 0); + if (this._in) this._in.page[this._in.scrollTop] = scrollTop; + else uni.pageScrollTo({ + scrollTop, + duration: 300 + }) + obj.success && obj.success(); + }) + // #endif + }, + // 鑾峰彇瑙嗛瀵硅薄 + getVideoContext(id) { + // #ifndef APP-PLUS-NVUE + if (!id) return this.videoContexts; + else + for (var i = this.videoContexts.length; i--;) + if (this.videoContexts[i].id == id) return this.videoContexts[i]; + // #endif + }, + // #ifdef H5 || APP-PLUS-NVUE || MP-360 + _handleHtml(html, append) { + if (!append) { + // 澶勭悊 tag-style 鍜� userAgentStyles + var style = '<style>@keyframes _show{0%{opacity:0}100%{opacity:1}}img{max-width:100%}'; + for (var item in cfg.userAgentStyles) + style += `${item}{${cfg.userAgentStyles[item]}}`; + for (item in this.tagStyle) + style += `${item}{${this.tagStyle[item]}}`; + style += '</style>'; + html = style + html; + } + // 澶勭悊 rpx + if (html.includes('rpx')) + html = html.replace(/[0-9.]+\s*rpx/g, $ => (parseFloat($) * windowWidth / 750) + 'px'); + return html; + }, + // #endif + // #ifdef APP-PLUS-NVUE + _message(e) { + // 鎺ユ敹 web-view 娑堟伅 + var d = e.detail.data[0]; + switch (d.action) { + case 'load': + this.$emit('load'); + this.height = d.height; + this._text = d.text; + break; + case 'getTitle': + if (this.autosetTitle) + uni.setNavigationBarTitle({ + title: d.title + }) + break; + case 'getImgList': + this.imgList.length = 0; + for (var i = d.imgList.length; i--;) + this.imgList.setItem(i, d.imgList[i]); + break; + case 'preview': + var preview = true; + d.img.ignore = () => preview = false; + this.$emit('imgtap', d.img); + if (preview) + uni.previewImage({ + current: d.img.i, + urls: this.imgList + }) + break; + case 'linkpress': + var jump = true, + href = d.href; + this.$emit('linkpress', { + href, + ignore: () => jump = false + }) + if (jump && href) { + if (href[0] == '#') { + if (this.useAnchor) + weexDom.scrollToElement(this.$refs.web, { + offset: d.offset + }) + } else if (href.includes('://')) + plus.runtime.openWeb(href); + else + uni.navigateTo({ + url: href + }) + } + break; + case 'error': + if (d.source == 'img' && cfg.errorImg) + this.imgList.setItem(d.target.i, cfg.errorImg); + this.$emit('error', { + source: d.source, + target: d.target + }) + break; + case 'ready': + this.height = d.height; + if (d.ready) uni.createSelectorQuery().in(this).select('#_top').boundingClientRect().exec(res => { + this.rect = res[0]; + this.$emit('ready', res[0]); + }) + break; + case 'click': + this.$emit('click'); + this.$emit('tap'); + } + }, + // #endif + } + } +</script> + +<style> + @keyframes _show { + 0% { + opacity: 0; + } + + 100% { + opacity: 1; + } + } + + /* #ifdef MP-WEIXIN */ + :host { + display: block; + overflow: auto; + -webkit-overflow-scrolling: touch; + } + + /* #endif */ +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-picker/u-picker.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-picker/u-picker.vue" new file mode 100644 index 0000000..68212a4 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-picker/u-picker.vue" @@ -0,0 +1,676 @@ +<template> + <u-popup :maskCloseAble="maskCloseAble" mode="bottom" :popup="false" v-model="value" length="auto" :safeAreaInsetBottom="safeAreaInsetBottom" @close="close" :z-index="uZIndex"> + <view class="u-datetime-picker"> + <view class="u-picker-header" @touchmove.stop.prevent=""> + <view class="u-btn-picker u-btn-picker--tips" + :style="{ color: cancelColor }" + hover-class="u-opacity" + :hover-stay-time="150" + @tap="getResult('cancel')" + >{{cancelText}}</view> + <view class="u-picker__title">{{ title }}</view> + <view + class="u-btn-picker u-btn-picker--primary" + :style="{ color: moving ? cancelColor : confirmColor }" + hover-class="u-opacity" + :hover-stay-time="150" + @touchmove.stop="" + @tap.stop="getResult('confirm')" + > + {{confirmText}} + </view> + </view> + <view class="u-picker-body"> + <picker-view v-if="mode == 'region'" :value="valueArr" @change="change" class="u-picker-view" @pickstart="pickstart" @pickend="pickend"> + <picker-view-column v-if="!reset && params.province"> + <view class="u-column-item" v-for="(item, index) in provinces" :key="index"> + <view class="u-line-1">{{ item.label }}</view> + </view> + </picker-view-column> + <picker-view-column v-if="!reset && params.city"> + <view class="u-column-item" v-for="(item, index) in citys" :key="index"> + <view class="u-line-1">{{ item.label }}</view> + </view> + </picker-view-column> + <picker-view-column v-if="!reset && params.area"> + <view class="u-column-item" v-for="(item, index) in areas" :key="index"> + <view class="u-line-1">{{ item.label }}</view> + </view> + </picker-view-column> + </picker-view> + <picker-view v-else-if="mode == 'time'" :value="valueArr" @change="change" class="u-picker-view" @pickstart="pickstart" @pickend="pickend"> + <picker-view-column v-if="!reset && params.year"> + <view class="u-column-item" v-for="(item, index) in years" :key="index"> + {{ item }} + <text class="u-text" v-if="showTimeTag">骞�</text> + </view> + </picker-view-column> + <picker-view-column v-if="!reset && params.month"> + <view class="u-column-item" v-for="(item, index) in months" :key="index"> + {{ formatNumber(item) }} + <text class="u-text" v-if="showTimeTag">鏈�</text> + </view> + </picker-view-column> + <picker-view-column v-if="!reset && params.day"> + <view class="u-column-item" v-for="(item, index) in days" :key="index"> + {{ formatNumber(item) }} + <text class="u-text" v-if="showTimeTag">鏃�</text> + </view> + </picker-view-column> + <picker-view-column v-if="!reset && params.hour"> + <view class="u-column-item" v-for="(item, index) in hours" :key="index"> + {{ formatNumber(item) }} + <text class="u-text" v-if="showTimeTag">鏃�</text> + </view> + </picker-view-column> + <picker-view-column v-if="!reset && params.minute"> + <view class="u-column-item" v-for="(item, index) in minutes" :key="index"> + {{ formatNumber(item) }} + <text class="u-text" v-if="showTimeTag">鍒�</text> + </view> + </picker-view-column> + <picker-view-column v-if="!reset && params.second"> + <view class="u-column-item" v-for="(item, index) in seconds" :key="index"> + {{ formatNumber(item) }} + <text class="u-text" v-if="showTimeTag">绉�</text> + </view> + </picker-view-column> + </picker-view> + <picker-view v-else-if="mode == 'selector'" :value="valueArr" @change="change" class="u-picker-view" @pickstart="pickstart" @pickend="pickend"> + <picker-view-column v-if="!reset"> + <view class="u-column-item" v-for="(item, index) in range" :key="index"> + <view class="u-line-1">{{ getItemValue(item, 'selector') }}</view> + </view> + </picker-view-column> + </picker-view> + <picker-view v-else-if="mode == 'multiSelector'" :value="valueArr" @change="change" class="u-picker-view" @pickstart="pickstart" @pickend="pickend"> + <picker-view-column v-if="!reset" v-for="(item, index) in range" :key="index"> + <view class="u-column-item" v-for="(item1, index1) in item" :key="index1"> + <view class="u-line-1">{{ getItemValue(item1, 'multiSelector') }}</view> + </view> + </picker-view-column> + </picker-view> + </view> + </view> + </u-popup> +</template> + +<script> +import provinces from '../../libs/util/province.js'; +import citys from '../../libs/util/city.js'; +import areas from '../../libs/util/area.js'; + +/** + * picker picker寮瑰嚭閫夋嫨鍣� + * @description 姝ら�夋嫨鍣ㄦ湁涓ょ寮瑰嚭妯″紡锛氫竴鏄椂闂存ā寮忥紝鍙互閰嶇疆骞达紝鏃ワ紝鏈堬紝鏃讹紝鍒嗭紝绉掑弬鏁� 浜屾槸鍦板尯妯″紡锛屽彲浠ラ厤缃渷锛屽競锛屽尯鍙傛暟 + * @tutorial https://www.uviewui.com/components/picker.html + * @property {Object} params 闇�瑕佹樉绀虹殑鍙傛暟锛岃瀹樼綉璇存槑 + * @property {String} mode 妯″紡閫夋嫨锛宺egion-鍦板尯绫诲瀷锛宼ime-鏃堕棿绫诲瀷锛堥粯璁ime锛� + * @property {String Number} start-year 鍙�夌殑寮�濮嬪勾浠斤紝mode=time鏃舵湁鏁堬紙榛樿1950锛� + * @property {String Number} end-year 鍙�夌殑缁撴潫骞翠唤锛宮ode=time鏃舵湁鏁堬紙榛樿2050锛� + * @property {Boolean} safe-area-inset-bottom 鏄惁寮�鍚簳閮ㄥ畨鍏ㄥ尯閫傞厤锛堥粯璁alse锛� + * @property {Boolean} show-time-tag 鏃堕棿妯″紡鏃讹紝鏄惁鏄剧ず鍚庨潰鐨勫勾鏈堟棩涓枃鎻愮ず + * @property {String} cancel-color 鍙栨秷鎸夐挳鐨勯鑹诧紙榛樿#606266锛� + * @property {String} confirm-color 纭鎸夐挳鐨勯鑹诧紙榛樿#2979ff锛� + * @property {String} default-time 榛樿閫変腑鐨勬椂闂达紝mode=time鏃舵湁鏁� + * @property {String} confirm-text 纭鎸夐挳鐨勬枃瀛� + * @property {String} cancel-text 鍙栨秷鎸夐挳鐨勬枃瀛� + * @property {String} default-region 榛樿閫変腑鐨勫湴鍖猴紝涓枃褰㈠紡锛宮ode=region鏃舵湁鏁� + * @property {String} default-code 榛樿閫変腑鐨勫湴鍖猴紝缂栧彿褰㈠紡锛宮ode=region鏃舵湁鏁� + * @property {Boolean} mask-close-able 鏄惁鍏佽閫氳繃鐐瑰嚮閬僵鍏抽棴Picker锛堥粯璁rue锛� + * @property {String Number} z-index 寮瑰嚭鏃剁殑z-index鍊硷紙榛樿1075锛� + * @property {Array} default-selector 鏁扮粍褰㈠紡锛屽叾涓瘡涓�椤硅〃绀洪�夋嫨浜唕ange瀵瑰簲椤逛腑鐨勭鍑犱釜 + * @property {Array} range 鑷畾涔夐�夋嫨鐨勬暟鎹紝mode=selector鎴杕ode=multiSelector鏃舵湁鏁� + * @property {String} range-key 褰搑ange鍙傛暟鐨勫厓绱犱负瀵硅薄鏃讹紝鎸囧畾Object涓殑鍝釜key鐨勫�间綔涓洪�夋嫨鍣ㄦ樉绀哄唴瀹� + * @event {Function} confirm 鐐瑰嚮纭畾鎸夐挳锛岃繑鍥炲綋鍓嶉�夋嫨鐨勫�� + * @event {Function} cancel 鐐瑰嚮鍙栨秷鎸夐挳锛岃繑鍥炲綋鍓嶉�夋嫨鐨勫�� + * @example <u-picker v-model="show" mode="time"></u-picker> + */ +export default { + name: 'u-picker', + props: { + // picker涓渶瑕佹樉绀虹殑鍙傛暟 + params: { + type: Object, + default() { + return { + year: true, + month: true, + day: true, + hour: false, + minute: false, + second: false, + province: true, + city: true, + area: true, + timestamp: true, + }; + } + }, + // 褰搈ode=selector鎴栬�卪ode=multiSelector鏃讹紝鎻愪緵鐨勬暟缁� + range: { + type: Array, + default() { + return []; + } + }, + // 褰搈ode=selector鎴栬�卪ode=multiSelector鏃讹紝鎻愪緵鐨勯粯璁ら�変腑鐨勪笅鏍� + defaultSelector: { + type: Array, + default() { + return [0]; + } + }, + // 褰� range 鏄竴涓� Array锛淥bject锛� 鏃讹紝閫氳繃 range-key 鏉ユ寚瀹� Object 涓� key 鐨勫�间綔涓洪�夋嫨鍣ㄦ樉绀哄唴瀹� + rangeKey: { + type: String, + default: '' + }, + // 妯″紡閫夋嫨锛宺egion-鍦板尯绫诲瀷锛宼ime-鏃堕棿绫诲瀷锛宻elector-鍗曞垪妯″紡锛宮ultiSelector-澶氬垪妯″紡 + mode: { + type: String, + default: 'time' + }, + // 骞翠唤寮�濮嬫椂闂� + startYear: { + type: [String, Number], + default: 1950 + }, + // 骞翠唤缁撴潫鏃堕棿 + endYear: { + type: [String, Number], + default: 2050 + }, + // "鍙栨秷"鎸夐挳鐨勯鑹� + cancelColor: { + type: String, + default: '#606266' + }, + // "纭畾"鎸夐挳鐨勯鑹� + confirmColor: { + type: String, + default: '#2979ff' + }, + // 榛樿鏄剧ず鐨勬椂闂达紝2025-07-02 || 2025-07-02 13:01:00 || 2025/07/02 + defaultTime: { + type: String, + default: '' + }, + // 榛樿鏄剧ず鐨勫湴鍖猴紝鍙紶绫讳技["娌冲寳鐪�", "绉︾殗宀涘競", "鍖楁埓娌冲尯"] + defaultRegion: { + type: Array, + default() { + return []; + } + }, + // 鏃堕棿妯″紡鏃讹紝鏄惁鏄剧ず鍚庨潰鐨勫勾鏈堟棩涓枃鎻愮ず + showTimeTag: { + type: Boolean, + default: true + }, + // 榛樿鏄剧ず鍦板尯鐨勭紪鐮侊紝defaultRegion鍜宎reaCode鍚屾椂瀛樺湪锛宎reaCode浼樺厛锛屽彲浼犵被浼糩"13", "1303", "130304"] + areaCode: { + type: Array, + default() { + return []; + } + }, + safeAreaInsetBottom: { + type: Boolean, + default: false + }, + // 鏄惁鍏佽閫氳繃鐐瑰嚮閬僵鍏抽棴Picker + maskCloseAble: { + type: Boolean, + default: true + }, + // 閫氳繃鍙屽悜缁戝畾鎺у埗缁勪欢鐨勫脊鍑轰笌鏀惰捣 + value: { + type: Boolean, + default: false + }, + // 寮瑰嚭鐨剒-index鍊� + zIndex: { + type: [String, Number], + default: 0 + }, + // 椤堕儴鏍囬 + title: { + type: String, + default: '' + }, + // 鍙栨秷鎸夐挳鐨勬枃瀛� + cancelText: { + type: String, + default: '鍙栨秷' + }, + // 纭鎸夐挳鐨勬枃瀛� + confirmText: { + type: String, + default: '纭' + } + }, + data() { + return { + years: [], + months: [], + days: [], + hours: [], + minutes: [], + seconds: [], + year: 0, + month: 0, + day: 0, + hour: 0, + minute: 0, + second: 0, + reset: false, + startDate: '', + endDate: '', + valueArr: [], + provinces: provinces, + citys: citys[0], + areas: areas[0][0], + province: 0, + city: 0, + area: 0, + moving: false // 鍒楁槸鍚﹁繕鍦ㄦ粦鍔ㄤ腑锛屽井淇″皬绋嬪簭濡傛灉鍦ㄦ粦鍔ㄤ腑灏辩偣纭畾锛岀粨鏋滃彲鑳戒笉鍑嗙‘ + }; + }, + mounted() { + this.init(); + }, + computed: { + propsChange() { + // 寮曠敤杩欏嚑涓彉閲忥紝鏄负浜嗙洃鍚叾鍙樺寲 + return `${this.mode}-${this.defaultTime}-${this.startYear}-${this.endYear}-${this.defaultRegion}-${this.areaCode}`; + }, + regionChange() { + // 寮曠敤杩欏嚑涓彉閲忥紝鏄负浜嗙洃鍚叾鍙樺寲 + return `${this.province}-${this.city}`; + }, + yearAndMonth() { + return `${this.year}-${this.month}`; + }, + uZIndex() { + // 濡傛灉鐢ㄦ埛鏈変紶閫抸-index鍊硷紝浼樺厛浣跨敤 + return this.zIndex ? this.zIndex : this.$u.zIndex.popup; + } + }, + watch: { + propsChange() { + this.reset = true; + setTimeout(() => this.init(), 10); + }, + // 濡傛灉鍦板尯鍙戠敓鍙樺寲锛屼负浜嗚picker鑱斿姩璧锋潵锛屽繀椤婚噸缃畉his.citys鍜宼his.areas + regionChange(val) { + this.citys = citys[this.province]; + this.areas = areas[this.province][this.city]; + }, + // watch鐩戝惉鏈堜唤鐨勫彉鍖栵紝瀹炴椂鍙樻洿鏃ョ殑澶╂暟锛屽洜涓轰笉鍚屾湀浠斤紝澶╂暟涓嶄竴鏍� + // 涓�涓湀鍙兘鏈�30锛�31澶╋紝鐢氳嚦闂板勾2鏈堢殑29澶╋紝骞冲勾2鏈�28澶� + yearAndMonth(val) { + if (this.params.year) this.setDays(); + }, + // 寰俊鍜孮Q灏忕▼搴忕敱浜庝竴浜涘鎬殑鍘熷洜(鏁呭悓鏃跺鎵�鏈夊钩鍙板潎鍒濆鍖栦竴閬�)锛岄渶瑕侀噸鏂板垵濮嬪寲鎵嶈兘鏄剧ず姝g‘鐨勫�� + value(n) { + if (n) { + this.reset = true; + setTimeout(() => this.init(), 10); + } + } + }, + methods: { + // 鏍囪瘑婊戝姩寮�濮嬶紝鍙湁寰俊灏忕▼搴忔墠鏈夎繖鏍风殑浜嬩欢 + pickstart() { + // #ifdef MP-WEIXIN + this.moving = true; + // #endif + }, + // 鏍囪瘑婊戝姩缁撴潫 + pickend() { + // #ifdef MP-WEIXIN + this.moving = false; + // #endif + }, + // 瀵瑰崟鍒楀拰澶氬垪褰㈠紡鐨勫垽鏂槸鍚︽湁浼犲叆鍙橀噺鐨勬儏鍐� + getItemValue(item, mode) { + // 鐩墠(2020-05-25)uni-app瀵瑰井淇″皬绋嬪簭缂栬瘧鏈夐敊璇紝瀵艰嚧v-if涓篺alse涓殑鍐呭涔熸墽琛岋紝閿欒瀵艰嚧 + // 鍗曞垪妯″紡鎴栬�呭鍒楁ā寮忎腑鐨刧etItemValue鍚屾椂琚墽琛岋紝鏁呭湪杩欓噷鍐嶅姞涓�灞傚垽鏂� + if (this.mode == mode) { + return typeof item == 'object' ? item[this.rangeKey] : item; + } + }, + // 灏忎簬10鍓嶉潰琛�0锛岀敤浜庢湀浠斤紝鏃ユ湡锛屾椂鍒嗙绛� + formatNumber(num) { + return +num < 10 ? '0' + num : String(num); + }, + // 鐢熸垚閫掕繘鐨勬暟缁� + generateArray: function(start, end) { + // 杞负鏁板�兼牸寮忥紝鍚﹀垯鐢ㄦ埛缁檈nd-year绛変紶閫掑瓧绗︿覆鍊兼椂锛屼笅闈㈢殑end+1浼氬鑷村瓧绗︿覆鎷兼帴锛岃�屼笉鏄浉鍔� + start = Number(start); + end = Number(end); + end = end > start ? end : start; + // 鐢熸垚鏁扮粍锛岃幏鍙栧叾涓殑绱㈠紩锛屽苟鍓嚭鏉� + return [...Array(end + 1).keys()].slice(start); + }, + getIndex: function(arr, val) { + let index = arr.indexOf(val); + // 濡傛灉index涓�-1(鍗虫壘涓嶅埌index鍊�)锛寏(-1)=-(-1)-1=0锛屽鑷存潯浠朵笉鎴愮珛 + return ~index ? index : 0; + }, + //鏃ユ湡鏃堕棿澶勭悊 + initTimeValue() { + // 鏍煎紡鍖栨椂闂达紝鍦↖E娴忚鍣�(uni涓嶅瓨鍦ㄦ鎯呭喌)锛屾棤娉曡瘑鍒棩鏈熼棿鐨�"-"闂撮殧绗﹀彿 + let fdate = this.defaultTime.replace(/\-/g, '/'); + fdate = fdate && fdate.indexOf('/') == -1 ? `2020/01/01 ${fdate}` : fdate; + let time = null; + if (fdate) time = new Date(fdate); + else time = new Date(); + // 鑾峰彇骞存棩鏈堟椂鍒嗙 + this.year = time.getFullYear(); + this.month = Number(time.getMonth()) + 1; + this.day = time.getDate(); + this.hour = time.getHours(); + this.minute = time.getMinutes(); + this.second = time.getSeconds(); + }, + init() { + this.valueArr = []; + this.reset = false; + if (this.mode == 'time') { + this.initTimeValue(); + if (this.params.year) { + this.valueArr.push(0); + this.setYears(); + } + if (this.params.month) { + this.valueArr.push(0); + this.setMonths(); + } + if (this.params.day) { + this.valueArr.push(0); + this.setDays(); + } + if (this.params.hour) { + this.valueArr.push(0); + this.setHours(); + } + if (this.params.minute) { + this.valueArr.push(0); + this.setMinutes(); + } + if (this.params.second) { + this.valueArr.push(0); + this.setSeconds(); + } + } else if (this.mode == 'region') { + if (this.params.province) { + this.valueArr.push(0); + this.setProvinces(); + } + if (this.params.city) { + this.valueArr.push(0); + this.setCitys(); + } + if (this.params.area) { + this.valueArr.push(0); + this.setAreas(); + } + } else if (this.mode == 'selector') { + this.valueArr = this.defaultSelector; + } else if (this.mode == 'multiSelector') { + this.valueArr = this.defaultSelector; + this.multiSelectorValue = this.defaultSelector; + } + this.$forceUpdate(); + }, + // 璁剧疆picker鐨勬煇涓�鍒楀�� + setYears() { + // 鑾峰彇骞翠唤闆嗗悎 + this.years = this.generateArray(this.startYear, this.endYear); + // 璁剧疆this.valueArr鏌愪竴椤圭殑鍊硷紝鏄负浜嗚picker棰勯�変腑鏌愪竴涓�� + this.valueArr.splice(this.valueArr.length - 1, 1, this.getIndex(this.years, this.year)); + }, + setMonths() { + this.months = this.generateArray(1, 12); + this.valueArr.splice(this.valueArr.length - 1, 1, this.getIndex(this.months, this.month)); + }, + setDays() { + let totalDays = new Date(this.year, this.month, 0).getDate(); + this.days = this.generateArray(1, totalDays); + let index = 0; + // 杩欓噷涓嶈兘浣跨敤绫讳技setMonths()涓殑this.valueArr.splice(this.valueArr.length - 1, xxx)鍋氭硶 + // 鍥犱负this.month鍜宼his.year鍙樺寲鏃讹紝浼氳Е鍙憌atch涓殑this.setDays()锛屽鑷磘his.valueArr.length璁$畻鏈夎 + if (this.params.year && this.params.month) index = 2; + else if (this.params.month) index = 1; + else if (this.params.year) index = 1; + else index = 0; + // 褰撴湀浠藉彉鍖栨椂锛屼細瀵艰嚧鏃ユ湡鐨勫ぉ鏁颁篃浼氬彉鍖栵紝濡傛灉鍘熸潵閫夌殑澶╂暟澶т簬鍙樺寲鍚庣殑澶╂暟锛屽垯閲嶇疆涓哄彉鍖栧悗鐨勬渶澶у�� + // 姣斿鍘熸潵閫変腑3鏈�31鏃ワ紝璋冩暣涓�2鏈堝悗锛屾棩鏈熷彉涓烘渶澶�29锛岃繖鏃跺鏋渄ay鍊肩户缁负31鏄剧劧涓嶅悎鐞嗭紝浜庢槸灏嗗叾缃负29(picker-column浠�1寮�濮�) + if(this.day > this.days.length) this.day = this.days.length; + this.valueArr.splice(index, 1, this.getIndex(this.days, this.day)); + }, + setHours() { + this.hours = this.generateArray(0, 23); + this.valueArr.splice(this.valueArr.length - 1, 1, this.getIndex(this.hours, this.hour)); + }, + setMinutes() { + this.minutes = this.generateArray(0, 59); + this.valueArr.splice(this.valueArr.length - 1, 1, this.getIndex(this.minutes, this.minute)); + }, + setSeconds() { + this.seconds = this.generateArray(0, 59); + this.valueArr.splice(this.valueArr.length - 1, 1, this.getIndex(this.seconds, this.second)); + }, + setProvinces() { + // 鍒ゆ柇鏄惁闇�瑕乸rovince鍙傛暟 + if (!this.params.province) return; + let tmp = ''; + let useCode = false; + // 濡傛灉鍚屾椂閰嶇疆浜哾efaultRegion鍜宎reaCode锛屼紭鍏堜娇鐢╝reaCode鍙傛暟 + if (this.areaCode.length) { + tmp = this.areaCode[0]; + useCode = true; + } else if (this.defaultRegion.length) tmp = this.defaultRegion[0]; + else tmp = 0; + // 鍘嗛亶鐪佷唤鏁扮粍鍖归厤 + provinces.map((v, k) => { + if (useCode ? v.value == tmp : v.label == tmp) { + tmp = k; + } + }); + this.province = tmp; + this.provinces = provinces; + // 璁剧疆榛樿鐪佷唤鐨勫�� + this.valueArr.splice(0, 1, this.province); + }, + setCitys() { + if (!this.params.city) return; + let tmp = ''; + let useCode = false; + if (this.areaCode.length) { + tmp = this.areaCode[1]; + useCode = true; + } else if (this.defaultRegion.length) tmp = this.defaultRegion[1]; + else tmp = 0; + citys[this.province].map((v, k) => { + if (useCode ? v.value == tmp : v.label == tmp) { + tmp = k; + } + }); + this.city = tmp; + this.citys = citys[this.province]; + this.valueArr.splice(1, 1, this.city); + }, + setAreas() { + if (!this.params.area) return; + let tmp = ''; + let useCode = false; + if (this.areaCode.length) { + tmp = this.areaCode[2]; + useCode = true; + } else if (this.defaultRegion.length) tmp = this.defaultRegion[2]; + else tmp = 0; + areas[this.province][this.city].map((v, k) => { + if (useCode ? v.value == tmp : v.label == tmp) { + tmp = k; + } + }); + this.area = tmp; + this.areas = areas[this.province][this.city]; + this.valueArr.splice(2, 1, this.area); + }, + close() { + this.$emit('input', false); + }, + // 鐢ㄦ埛鏇存敼picker鐨勫垪閫夐」 + change(e) { + this.valueArr = e.detail.value; + let i = 0; + if (this.mode == 'time') { + // 杩欓噷浣跨敤i++锛屾槸鍥犱负this.valueArr鏁扮粍鐨勯暱搴︽槸涓嶇‘瀹氶暱搴︾殑锛屽畠鏍规嵁this.params鐨勫�兼潵閰嶇疆闀垮害 + // 杩涘叆if瑙勫垯锛宨浼氬姞1锛屼繚璇佷簡鑳借幏鍙栧噯纭殑鍊� + if (this.params.year) this.year = this.years[this.valueArr[i++]]; + if (this.params.month) this.month = this.months[this.valueArr[i++]]; + if (this.params.day) this.day = this.days[this.valueArr[i++]]; + if (this.params.hour) this.hour = this.hours[this.valueArr[i++]]; + if (this.params.minute) this.minute = this.minutes[this.valueArr[i++]]; + if (this.params.second) this.second = this.seconds[this.valueArr[i++]]; + } else if (this.mode == 'region') { + if (this.params.province) this.province = this.valueArr[i++]; + if (this.params.city) this.city = this.valueArr[i++]; + if (this.params.area) this.area = this.valueArr[i++]; + } else if (this.mode == 'multiSelector') { + let index = null; + // 瀵规瘮鍓嶅悗涓や釜鏁扮粍锛屽鎵惧彉鏇寸殑鏄摢涓�鍒楋紝濡傛灉鏌愪竴涓厓绱犱笉鍚岋紝鍗冲彲鍒ゅ畾璇ュ垪鍙戠敓浜嗗彉鍖� + this.defaultSelector.map((val, idx) => { + if (val != e.detail.value[idx]) index = idx; + }); + // 涓轰簡璁╃敤鎴峰澶氬垪鍙樺寲鏃讹紝瀵瑰姩鎬佽缃叾浠栧垪鐨勫彉鏇� + if (index != null) { + this.$emit('columnchange', { + column: index, + index: e.detail.value[index] + }); + } + } + }, + // 鐢ㄦ埛鐐瑰嚮纭畾鎸夐挳 + getResult(event = null) { + // #ifdef MP-WEIXIN + if (this.moving) return; + // #endif + let result = {}; + // 鍙繑鍥炵敤鎴峰湪this.params涓厤缃簡涓簍rue鐨勫瓧娈� + if (this.mode == 'time') { + if (this.params.year) result.year = this.formatNumber(this.year || 0); + if (this.params.month) result.month = this.formatNumber(this.month || 0); + if (this.params.day) result.day = this.formatNumber(this.day || 0); + if (this.params.hour) result.hour = this.formatNumber(this.hour || 0); + if (this.params.minute) result.minute = this.formatNumber(this.minute || 0); + if (this.params.second) result.second = this.formatNumber(this.second || 0); + if (this.params.timestamp) result.timestamp = this.getTimestamp(); + } else if (this.mode == 'region') { + if (this.params.province) result.province = provinces[this.province]; + if (this.params.city) result.city = citys[this.province][this.city]; + if (this.params.area) result.area = areas[this.province][this.city][this.area]; + } else if (this.mode == 'selector') { + result = this.valueArr; + } else if (this.mode == 'multiSelector') { + result = this.valueArr; + } + if (event) this.$emit(event, result); + this.close(); + }, + // 鑾峰彇鏃堕棿鎴� + getTimestamp() { + // yyyy-mm-dd涓哄畨鍗撳啓娉曪紝涓嶆敮鎸乮OS锛岄渶瑕佷娇鐢�"/"鍒嗛殧锛屾墠鑳戒簩鑰呭吋瀹� + let time = this.year + '/' + this.month + '/' + this.day + ' ' + this.hour + ':' + this.minute + ':' + this.second; + return new Date(time).getTime() / 1000; + } + } +}; +</script> + +<style lang="scss" scoped> +@import '../../libs/css/style.components.scss'; + +.u-datetime-picker { + position: relative; + z-index: 999; +} + +.u-picker-view { + height: 100%; + box-sizing: border-box; +} + +.u-picker-header { + width: 100%; + height: 90rpx; + padding: 0 40rpx; + @include vue-flex; + justify-content: space-between; + align-items: center; + box-sizing: border-box; + font-size: 30rpx; + background: #fff; + position: relative; +} + +.u-picker-header::after { + content: ''; + position: absolute; + border-bottom: 1rpx solid #eaeef1; + -webkit-transform: scaleY(0.5); + transform: scaleY(0.5); + bottom: 0; + right: 0; + left: 0; +} + +.u-picker__title { + color: $u-content-color; +} + +.u-picker-body { + width: 100%; + height: 500rpx; + overflow: hidden; + background-color: #fff; +} + +.u-column-item { + @include vue-flex; + align-items: center; + justify-content: center; + font-size: 32rpx; + color: $u-main-color; + padding: 0 8rpx; +} + +.u-text { + font-size: 24rpx; + padding-left: 8rpx; +} + +.u-btn-picker { + padding: 16rpx; + box-sizing: border-box; + text-align: center; + text-decoration: none; +} + +.u-opacity { + opacity: 0.5; +} + +.u-btn-picker--primary { + color: $u-type-primary; +} + +.u-btn-picker--tips { + color: $u-tips-color; +} +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-popup/u-popup.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-popup/u-popup.vue" new file mode 100644 index 0000000..69c0ec8 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-popup/u-popup.vue" @@ -0,0 +1,456 @@ +<template> + <view v-if="visibleSync" :style="[customStyle, { + zIndex: uZindex - 1 + }]" class="u-drawer" hover-stop-propagation> + <u-mask :duration="duration" :custom-style="maskCustomStyle" :maskClickAble="maskCloseAble" :z-index="uZindex - 2" :show="showDrawer && mask" @click="maskClick"></u-mask> + <view + class="u-drawer-content" + @tap="modeCenterClose(mode)" + :class="[ + safeAreaInsetBottom ? 'safe-area-inset-bottom' : '', + 'u-drawer-' + mode, + showDrawer ? 'u-drawer-content-visible' : '', + zoom && mode == 'center' ? 'u-animation-zoom' : '' + ]" + @touchmove.stop.prevent + @tap.stop.prevent + :style="[style]" + > + <view class="u-mode-center-box" @tap.stop.prevent @touchmove.stop.prevent v-if="mode == 'center'" :style="[centerStyle]"> + <u-icon + @click="close" + v-if="closeable" + class="u-close" + :class="['u-close--' + closeIconPos]" + :name="closeIcon" + :color="closeIconColor" + :size="closeIconSize" + ></u-icon> + <scroll-view class="u-drawer__scroll-view" scroll-y="true"> + <slot /> + </scroll-view> + </view> + <scroll-view class="u-drawer__scroll-view" scroll-y="true" v-else> + <slot /> + </scroll-view> + <view @tap="close" class="u-close" :class="['u-close--' + closeIconPos]"> + <u-icon + v-if="mode != 'center' && closeable" + :name="closeIcon" + :color="closeIconColor" + :size="closeIconSize" + ></u-icon> + </view> + </view> + </view> +</template> + +<script> +/** + * popup 寮圭獥 + * @description 寮瑰嚭灞傚鍣紝鐢ㄤ簬灞曠ず寮圭獥銆佷俊鎭彁绀虹瓑鍐呭锛屾敮鎸佷笂銆佷笅銆佸乏銆佸彸鍜屼腑閮ㄥ脊鍑恒�傜粍浠跺彧鎻愪緵瀹瑰櫒锛屽唴閮ㄥ唴瀹圭敱鐢ㄦ埛鑷畾涔� + * @tutorial https://www.uviewui.com/components/popup.html + * @property {String} mode 寮瑰嚭鏂瑰悜锛堥粯璁eft锛� + * @property {Boolean} mask 鏄惁鏄剧ず閬僵锛堥粯璁rue锛� + * @property {Stringr | Number} length mode=left | 瑙佸畼缃戣鏄庯紙榛樿auto锛� + * @property {Boolean} zoom 鏄惁寮�鍚缉鏀惧姩鐢伙紝鍙湪mode涓篶enter鏃舵湁鏁堬紙榛樿true锛� + * @property {Boolean} safe-area-inset-bottom 鏄惁寮�鍚簳閮ㄥ畨鍏ㄥ尯閫傞厤锛堥粯璁alse锛� + * @property {Boolean} mask-close-able 鐐瑰嚮閬僵鏄惁鍙互鍏抽棴寮瑰嚭灞傦紙榛樿true锛� + * @property {Object} custom-style 鐢ㄦ埛鑷畾涔夋牱寮� + * @property {Stringr | Number} negative-top 涓儴寮瑰嚭鏃讹紝寰�涓婂亸绉荤殑鍊� + * @property {Numberr | String} border-radius 寮圭獥鍦嗚鍊硷紙榛樿0锛� + * @property {Numberr | String} z-index 寮瑰嚭鍐呭鐨剒-index鍊硷紙榛樿1075锛� + * @property {Boolean} closeable 鏄惁鏄剧ず鍏抽棴鍥炬爣锛堥粯璁alse锛� + * @property {String} close-icon 鍏抽棴鍥炬爣鐨勫悕绉帮紝鍙兘uView鐨勫唴缃浘鏍� + * @property {String} close-icon-pos 鑷畾涔夊叧闂浘鏍囦綅缃紙榛樿top-right锛� + * @property {String} close-icon-color 鍏抽棴鍥炬爣鐨勯鑹诧紙榛樿#909399锛� + * @property {Number | String} close-icon-size 鍏抽棴鍥炬爣鐨勫ぇ灏忥紝鍗曚綅rpx锛堥粯璁�30锛� + * @event {Function} open 寮瑰嚭灞傛墦寮� + * @event {Function} close 寮瑰嚭灞傛敹璧� + * @example <u-popup v-model="show"><view>鍑烘筏娉ヨ�屼笉鏌擄紝婵竻娑熻�屼笉濡�</view></u-popup> + */ +export default { + name: 'u-popup', + props: { + /** + * 鏄剧ず鐘舵�� + */ + show: { + type: Boolean, + default: false + }, + /** + * 寮瑰嚭鏂瑰悜锛宭eft|right|top|bottom|center + */ + mode: { + type: String, + default: 'left' + }, + /** + * 鏄惁鏄剧ず閬僵 + */ + mask: { + type: Boolean, + default: true + }, + // 鎶藉眽鐨勫搴�(mode=left|right)锛屾垨鑰呴珮搴�(mode=top|bottom)锛屽崟浣峳px锛屾垨鑰�"auto" + // 鎴栬�呯櫨鍒嗘瘮"50%"锛岃〃绀虹敱鍐呭鎾戝紑楂樺害鎴栬�呭搴� + length: { + type: [Number, String], + default: 'auto' + }, + // 鏄惁寮�鍚缉鏀惧姩鐢伙紝鍙湪mode=center鏃舵湁鏁� + zoom: { + type: Boolean, + default: true + }, + // 鏄惁寮�鍚簳閮ㄥ畨鍏ㄥ尯閫傞厤锛屽紑鍚殑璇濓紝浼氬湪iPhoneX鏈哄瀷搴曢儴娣诲姞涓�瀹氱殑鍐呰竟璺� + safeAreaInsetBottom: { + type: Boolean, + default: false + }, + // 鏄惁鍙互閫氳繃鐐瑰嚮閬僵杩涜鍏抽棴 + maskCloseAble: { + type: Boolean, + default: true + }, + // 鐢ㄦ埛鑷畾涔夋牱寮� + customStyle: { + type: Object, + default() { + return {}; + } + }, + value: { + type: Boolean, + default: false + }, + // 姝や负鍐呴儴鍙傛暟锛屼笉鍦ㄦ枃妗e澶栦娇鐢紝涓轰簡瑙e喅Picker鍜宬eyboard绛夎瀺鍚堜簡寮圭獥鐨勭粍浠� + // 瀵箆-model鍙屽悜缁戝畾澶氬眰璋冪敤閫犳垚鎶ラ敊涓嶈兘淇敼props鍊肩殑闂 + popup: { + type: Boolean, + default: true + }, + // 鏄剧ず鏄剧ず寮圭獥鐨勫渾瑙掞紝鍗曚綅rpx + borderRadius: { + type: [Number, String], + default: 0 + }, + zIndex: { + type: [Number, String], + default: '' + }, + // 鏄惁鏄剧ず鍏抽棴鍥炬爣 + closeable: { + type: Boolean, + default: false + }, + // 鍏抽棴鍥炬爣鐨勫悕绉帮紝鍙兘uView鐨勫唴缃浘鏍� + closeIcon: { + type: String, + default: 'close' + }, + // 鑷畾涔夊叧闂浘鏍囦綅缃紝top-left涓哄乏涓婅锛宼op-right涓哄彸涓婅锛宐ottom-left涓哄乏涓嬭锛宐ottom-right涓哄彸涓嬭 + closeIconPos: { + type: String, + default: 'top-right' + }, + // 鍏抽棴鍥炬爣鐨勯鑹� + closeIconColor: { + type: String, + default: '#909399' + }, + // 鍏抽棴鍥炬爣鐨勫ぇ灏忥紝鍗曚綅rpx + closeIconSize: { + type: [String, Number], + default: '30' + }, + // 瀹藉害锛屽彧瀵瑰乏锛屽彸锛屼腑閮ㄥ脊鍑烘椂璧蜂綔鐢紝鍗曚綅rpx锛屾垨鑰�"auto" + // 鎴栬�呯櫨鍒嗘瘮"50%"锛岃〃绀虹敱鍐呭鎾戝紑楂樺害鎴栬�呭搴︼紝浼樺厛绾ч珮浜巐ength鍙傛暟 + width: { + type: String, + default: '' + }, + // 楂樺害锛屽彧瀵逛笂锛屼笅锛屼腑閮ㄥ脊鍑烘椂璧蜂綔鐢紝鍗曚綅rpx锛屾垨鑰�"auto" + // 鎴栬�呯櫨鍒嗘瘮"50%"锛岃〃绀虹敱鍐呭鎾戝紑楂樺害鎴栬�呭搴︼紝浼樺厛绾ч珮浜巐ength鍙傛暟 + height: { + type: String, + default: '' + }, + // 缁欎竴涓礋鐨刴argin-top锛屽線涓婂亸绉伙紝閬垮厤鍜岄敭鐩橀噸鍚堢殑鎯呭喌锛屼粎鍦╩ode=center鏃舵湁鏁� + negativeTop: { + type: [String, Number], + default: 0 + }, + // 閬僵鐨勬牱寮忥紝涓�鑸敤浜庝慨鏀归伄缃╃殑閫忔槑搴� + maskCustomStyle: { + type: Object, + default() { + return {} + } + }, + // 閬僵鎵撳紑鎴栨敹璧风殑鍔ㄧ敾杩囨浮鏃堕棿锛屽崟浣峬s + duration: { + type: [String, Number], + default: 250 + } + }, + data() { + return { + visibleSync: false, + showDrawer: false, + timer: null, + closeFromInner: false, // value鐨勫�兼敼鍙橈紝鏄彂鐢熷湪鍐呴儴杩樻槸澶栭儴 + }; + }, + computed: { + // 鏍规嵁mode鐨勪綅缃紝璁惧畾鍏跺脊绐楃殑瀹藉害(mode = left|right)锛屾垨鑰呴珮搴�(mode = top|bottom) + style() { + let style = {}; + // 濡傛灉鏄乏杈规垨鑰呬笂杈瑰脊鍑烘椂锛岄渶瑕佺粰translate璁剧疆涓鸿礋鍊硷紝鐢ㄤ簬闅愯棌 + if (this.mode == 'left' || this.mode == 'right') { + style = { + width: this.width ? this.getUnitValue(this.width) : this.getUnitValue(this.length), + height: '100%', + transform: `translate3D(${this.mode == 'left' ? '-100%' : '100%'},0px,0px)` + }; + } else if (this.mode == 'top' || this.mode == 'bottom') { + style = { + width: '100%', + height: this.height ? this.getUnitValue(this.height) : this.getUnitValue(this.length), + transform: `translate3D(0px,${this.mode == 'top' ? '-100%' : '100%'},0px)` + }; + } + style.zIndex = this.uZindex; + // 濡傛灉鐢ㄦ埛璁剧疆浜哹orderRadius鍊硷紝娣诲姞寮圭獥鐨勫渾瑙� + if (this.borderRadius) { + switch (this.mode) { + case 'left': + style.borderRadius = `0 ${this.borderRadius}rpx ${this.borderRadius}rpx 0`; + break; + case 'top': + style.borderRadius = `0 0 ${this.borderRadius}rpx ${this.borderRadius}rpx`; + break; + case 'right': + style.borderRadius = `${this.borderRadius}rpx 0 0 ${this.borderRadius}rpx`; + break; + case 'bottom': + style.borderRadius = `${this.borderRadius}rpx ${this.borderRadius}rpx 0 0`; + break; + default: + } + // 涓嶅姞鍙兘鍦嗚鏃犳晥 + style.overflow = 'hidden'; + } + if(this.duration) style.transition = `all ${this.duration / 1000}s linear`; + return style; + }, + // 涓儴寮圭獥鐨勭壒鏈夋牱寮� + centerStyle() { + let style = {}; + style.width = this.width ? this.getUnitValue(this.width) : this.getUnitValue(this.length); + // 涓儴寮瑰嚭鐨勬ā寮忥紝濡傛灉娌℃湁璁剧疆楂樺害锛屽氨鐢╝uto鍊硷紝鐢卞唴瀹规拺寮�楂樺害 + style.height = this.height ? this.getUnitValue(this.height) : 'auto'; + style.zIndex = this.uZindex; + style.marginTop = `-${this.$u.addUnit(this.negativeTop)}`; + if (this.borderRadius) { + style.borderRadius = `${this.borderRadius}rpx`; + // 涓嶅姞鍙兘鍦嗚鏃犳晥 + style.overflow = 'hidden'; + } + return style; + }, + // 璁$畻鏁寸悊鍚庣殑z-index鍊� + uZindex() { + return this.zIndex ? this.zIndex : this.$u.zIndex.popup; + } + }, + watch: { + value(val) { + if (val) { + this.open(); + } else if(!this.closeFromInner) { + this.close(); + } + this.closeFromInner = false; + } + }, + mounted() { + // 缁勪欢娓叉煋瀹屾垚鏃讹紝妫�鏌alue鏄惁涓簍rue锛屽鏋滄槸锛屽脊鍑簆opup + this.value && this.open(); + }, + methods: { + // 鍒ゆ柇浼犲叆鐨勫�硷紝鏄惁甯︽湁鍗曚綅锛屽鏋滄病鏈夛紝灏遍粯璁ょ敤rpx鍗曚綅 + getUnitValue(val) { + if(/(%|px|rpx|auto)$/.test(val)) return val; + else return val + 'rpx' + }, + // 閬僵琚偣鍑� + maskClick() { + this.close(); + }, + close() { + // 鏍囪鍏抽棴鏄唴閮ㄥ彂鐢熺殑锛屽惁鍒欎慨鏀逛簡value鍊硷紝瀵艰嚧watch涓value妫�娴嬶紝瀵艰嚧鍐嶆墽琛屼竴閬峜lose + // 閫犳垚@close浜嬩欢瑙﹀彂涓ゆ + this.closeFromInner = true; + this.change('showDrawer', 'visibleSync', false); + }, + // 涓儴寮瑰嚭鏃讹紝闇�瑕�.u-drawer-content灏嗗眳涓唴瀹癸紝姝ゅ厓绱犱細閾烘弧灞忓箷锛岀偣鍑婚渶瑕佸叧闂脊绐� + // 璁╁叾鍙湪mode=center鏃惰捣浣滅敤 + modeCenterClose(mode) { + if (mode != 'center' || !this.maskCloseAble) return; + this.close(); + }, + open() { + this.change('visibleSync', 'showDrawer', true); + }, + // 姝ゅ鐨勫師鐞嗘槸锛屽叧闂椂鍏堥�氳繃鍔ㄧ敾闅愯棌寮圭獥鍜岄伄缃╋紝鍐嶇Щ闄ゆ暣涓粍浠� + // 鎵撳紑鏃讹紝鍏堟覆鏌撶粍浠讹紝寤舵椂涓�瀹氭椂闂村啀璁╅伄缃╁拰寮圭獥鐨勫姩鐢昏捣浣滅敤 + change(param1, param2, status) { + // 濡傛灉this.popup涓篺alse锛屾剰鍛崇潃涓簆icker锛宎ctionsheet绛夌粍浠惰皟鐢ㄤ簡popup缁勪欢 + if (this.popup == true) { + this.$emit('input', status); + } + this[param1] = status; + if(status) { + // #ifdef H5 || MP + this.timer = setTimeout(() => { + this[param2] = status; + this.$emit(status ? 'open' : 'close'); + }, 50); + // #endif + // #ifndef H5 || MP + this.$nextTick(() => { + this[param2] = status; + this.$emit(status ? 'open' : 'close'); + }) + // #endif + } else { + this.timer = setTimeout(() => { + this[param2] = status; + this.$emit(status ? 'open' : 'close'); + }, this.duration); + } + } + } +}; +</script> + +<style scoped lang="scss"> +@import "../../libs/css/style.components.scss"; + +.u-drawer { + /* #ifndef APP-NVUE */ + display: block; + /* #endif */ + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + overflow: hidden; +} + +.u-drawer-content { + /* #ifndef APP-NVUE */ + display: block; + /* #endif */ + position: absolute; + z-index: 1003; + transition: all 0.25s linear; +} + +.u-drawer__scroll-view { + width: 100%; + height: 100%; +} + +.u-drawer-left { + top: 0; + bottom: 0; + left: 0; + background-color: #ffffff; +} + +.u-drawer-right { + right: 0; + top: 0; + bottom: 0; + background-color: #ffffff; +} + +.u-drawer-top { + top: 0; + left: 0; + right: 0; + background-color: #ffffff; +} + +.u-drawer-bottom { + bottom: 0; + left: 0; + right: 0; + background-color: #ffffff; +} + +.u-drawer-center { + @include vue-flex; + flex-direction: column; + bottom: 0; + left: 0; + right: 0; + top: 0; + justify-content: center; + align-items: center; + opacity: 0; + z-index: 99999; +} + +.u-mode-center-box { + min-width: 100rpx; + min-height: 100rpx; + /* #ifndef APP-NVUE */ + display: block; + /* #endif */ + position: relative; + background-color: #ffffff; +} + +.u-drawer-content-visible.u-drawer-center { + transform: scale(1); + opacity: 1; +} + +.u-animation-zoom { + transform: scale(1.15); +} + +.u-drawer-content-visible { + transform: translate3D(0px, 0px, 0px) !important; +} + +.u-close { + position: absolute; + z-index: 3; +} + +.u-close--top-left { + top: 30rpx; + left: 30rpx; +} + +.u-close--top-right { + top: 30rpx; + right: 30rpx; +} + +.u-close--bottom-left { + bottom: 30rpx; + left: 30rpx; +} + +.u-close--bottom-right { + right: 30rpx; + bottom: 30rpx; +} +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-radio-group/u-radio-group.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-radio-group/u-radio-group.vue" new file mode 100644 index 0000000..2172eb2 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-radio-group/u-radio-group.vue" @@ -0,0 +1,128 @@ +<template> + <view class="u-radio-group u-clearfix"> + <slot></slot> + </view> +</template> + +<script> + import Emitter from '../../libs/util/emitter.js'; + /** + * radioRroup 鍗曢�夋鐖剁粍浠� + * @description 鍗曢�夋鐢ㄤ簬鏈変竴涓�夋嫨锛岀敤鎴峰彧鑳介�夋嫨鍏朵腑涓�涓殑鍦烘櫙銆傛惌閰島-radio浣跨敤 + * @tutorial https://www.uviewui.com/components/radio.html + * @property {Boolean} disabled 鏄惁绂佺敤鎵�鏈塺adio锛堥粯璁alse锛� + * @property {String Number} size 缁勪欢鏁翠綋鐨勫ぇ灏忥紝鍗曚綅rpx锛堥粯璁�40锛� + * @property {String} active-color 閫変腑鏃剁殑棰滆壊锛屽簲鐢ㄥ埌鎵�鏈夊瓙Radio缁勪欢锛堥粯璁�#2979ff锛� + * @property {String Number} icon-size 鍥炬爣澶у皬锛屽崟浣峳px锛堥粯璁�20锛� + * @property {String} shape 澶栬褰㈢姸锛宻hape-鏂瑰舰锛宑ircle-鍦嗗舰(榛樿circle) + * @property {Boolean} label-disabled 鏄惁绂佹鐐瑰嚮鏂囨湰鎿嶄綔checkbox(榛樿false) + * @property {String} width 瀹藉害锛岄渶甯﹀崟浣� + * @property {Boolean} wrap 鏄惁姣忎釜radio閮芥崲琛岋紙榛樿false锛� + * @event {Function} change 浠讳竴涓猺adio鐘舵�佸彂鐢熷彉鍖栨椂瑙﹀彂 + * @example <u-radio-group v-model="value"></u-radio-group> + */ + export default { + name: "u-radio-group", + mixins: [Emitter], + props: { + // 鏄惁绂佺敤鎵�鏈夊崟閫夋 + disabled: { + type: Boolean, + default: false + }, + // 鍖归厤鏌愪竴涓猺adio缁勪欢锛屽鏋滄煇涓猺adio鐨刵ame鍊肩瓑浜庢鍊硷紝閭d箞杩欎釜radio灏辫浼氶�変腑 + value: { + type: [String, Number], + default: '' + }, + // 閫変腑鐘舵�佷笅鐨勯鑹� + activeColor: { + type: String, + default: '#2979ff' + }, + // 缁勪欢鐨勬暣浣撳ぇ灏� + size: { + type: [String, Number], + default: 34 + }, + // 鏄惁绂佹鐐瑰嚮鎻愮ず璇�変腑澶嶉�夋 + labelDisabled: { + type: Boolean, + default: false + }, + // 褰㈢姸锛宻quare涓烘柟褰紝circle涓哄師鍨� + shape: { + type: String, + default: 'circle' + }, + // 鍥炬爣鐨勫ぇ灏忥紝鍗曚綅rpx + iconSize: { + type: [String, Number], + default: 20 + }, + // 姣忎釜checkbox鍗爑-checkbox-group鐨勫搴� + width: { + type: [String, Number], + default: 'auto' + }, + // 鏄惁姣忎釜checkbox閮芥崲琛� + wrap: { + type: Boolean, + default: false + } + }, + created() { + // 濡傛灉灏哻hildren瀹氫箟鍦╠ata涓紝鍦ㄥ井淇″皬绋嬪簭浼氶�犳垚寰幆寮曠敤鑰屾姤閿� + this.children = []; + }, + watch: { + // 褰撶埗缁勪欢闇�瑕佸瓙缁勪欢闇�瑕佸叡浜殑鍙傛暟鍙戠敓浜嗗彉鍖栵紝鎵嬪姩閫氱煡瀛愮粍浠� + parentData() { + if(this.children.length) { + this.children.map(child => { + // 鍒ゆ柇瀛愮粍浠�(u-radio)濡傛灉鏈塽pdateParentData鏂规硶鐨勮瘽锛屽氨灏辨墽琛�(鎵ц鐨勭粨鏋滄槸瀛愮粍浠堕噸鏂颁粠鐖剁粍浠舵媺鍙栦簡鏈�鏂扮殑鍊�) + typeof(child.updateParentData) == 'function' && child.updateParentData(); + }) + } + }, + }, + computed: { + // 杩欓噷computed鐨勫彉閲忥紝閮芥槸瀛愮粍浠秛-radio闇�瑕佺敤鍒扮殑锛岀敱浜庡ご鏉″皬绋嬪簭鐨勫吋瀹规�у樊寮傦紝瀛愮粍浠舵棤娉曞疄鏃剁洃鍚埗缁勪欢鍙傛暟鐨勫彉鍖� + // 鎵�浠ラ渶瑕佹墜鍔ㄩ�氱煡瀛愮粍浠讹紝杩欓噷杩斿洖涓�涓猵arentData鍙橀噺锛屼緵watch鐩戝惉锛屽湪鍏朵腑鍘婚�氱煡姣忎竴涓瓙缁勪欢閲嶆柊浠庣埗缁勪欢(u-radio-group) + // 鎷夊彇鐖剁粍浠舵柊鐨勫彉鍖栧悗鐨勫弬鏁� + parentData() { + return [this.value, this.disabled, this.activeColor, this.size, this.labelDisabled, this.shape, this.iconSize, this.width, this.wrap]; + } + }, + methods: { + // 璇ユ柟娉曟湁瀛愮粍浠秗adio璋冪敤锛屽綋涓�涓猺adio琚�変腑鐨勬椂鍊欙紝缁欑埗缁勪欢璁剧疆value鍊�(props浼犻�掔殑value) + setValue(val) { + // 閫氳繃瀛愮粍浠朵紶閫掕繃鏉ョ殑val鍊�(姝よ閫変腑鐨勫瓙缁勪欢鍐呴儴宸插皢parentValue璁剧疆绛変簬val鐨勫��)锛屽皢鍏朵粬 + // u-radio璁剧疆鏈�変腑鐨勭姸鎬� + this.children.map(child => { + if(child.parentData.value != val) child.parentData.value = ''; + }) + // 閫氳繃emit浜嬩欢锛岃缃埗缁勪欢閫氳繃v-model鍙屽悜缁戝畾鐨勫�� + this.$emit('input', val); + this.$emit('change', val); + // 绛夊緟涓嬩竴涓懆鏈熷啀鎵ц锛屽洜涓簍his.$emit('input')浣滅敤浜庣埗缁勪欢锛屽啀鍙嶉鍒板瓙缁勪欢鍐呴儴锛岄渶瑕佹椂闂� + // 鐢变簬澶存潯灏忕▼搴忔墽琛岃繜閽濓紝鏁呴渶瑕佺敤鍑犲崄姣鐨勫欢鏃� + setTimeout(() => { + // 灏嗗綋鍓嶇殑鍊煎彂閫佸埌 u-form-item 杩涜鏍¢獙 + this.dispatch('u-form-item', 'on-form-change', val); + }, 60) + } + } + } +</script> + +<style lang="scss" scoped> + @import "../../libs/css/style.components.scss"; + + .u-radio-group { + /* #ifndef MP || APP-NVUE */ + display: inline-flex; + flex-wrap: wrap; + /* #endif */ + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-radio/u-radio.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-radio/u-radio.vue" new file mode 100644 index 0000000..1d9a439 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-radio/u-radio.vue" @@ -0,0 +1,271 @@ +<template> + <view class="u-radio" :style="[radioStyle]"> + <view class="u-radio__icon-wrap" @tap="toggle" :class="[iconClass]" :style="[iconStyle]"> + <u-icon + class="u-radio__icon-wrap__icon" + name="checkbox-mark" + :size="elIconSize" + :color="iconColor"/> + </view> + <view class="u-radio__label" @tap="onClickLabel" :style="{ + fontSize: $u.addUnit(labelSize) + }"> + <slot /> + </view> + </view> +</template> + +<script> + /** + * radio 鍗曢�夋 + * @description 鍗曢�夋鐢ㄤ簬鏈変竴涓�夋嫨锛岀敤鎴峰彧鑳介�夋嫨鍏朵腑涓�涓殑鍦烘櫙銆傛惌閰島-radio-group浣跨敤 + * @tutorial https://www.uviewui.com/components/radio.html + * @property {String Number} icon-size 鍥炬爣澶у皬锛屽崟浣峳px锛堥粯璁�24锛� + * @property {String Number} label-size label瀛椾綋澶у皬锛屽崟浣峳px锛堥粯璁�28锛� + * @property {String Number} name radio缁勪欢鐨勬爣绀虹 + * @property {String} shape 褰㈢姸锛岃涓婃柟璇存槑锛堥粯璁ircle锛� + * @property {Boolean} disabled 鏄惁绂佺敤锛堥粯璁alse锛� + * @property {Boolean} label-disabled 鐐瑰嚮鏂囨湰鏄惁鍙互鎿嶄綔radio锛堥粯璁rue锛� + * @property {String} active-color 閫変腑鏃剁殑棰滆壊锛屽璁剧疆parent鐨刟ctive-color灏嗗け鏁� + * @event {Function} change 鏌愪釜radio鐘舵�佸彂鐢熷彉鍖栨椂瑙﹀彂(閫変腑鐘舵��) + * @example <u-radio :label-disabled="false">闂ㄦ帺榛勬槒锛屾棤璁$暀鏄ヤ綇</u-radio> + */ + export default { + name: "u-radio", + props: { + // radio鐨勫悕绉� + name: { + type: [String, Number], + default: '' + }, + // 褰㈢姸锛宻quare涓烘柟褰紝circle涓哄師鍨� + shape: { + type: String, + default: '' + }, + // 鏄惁绂佺敤 + disabled: { + type: [String, Boolean], + default: '' + }, + // 鏄惁绂佹鐐瑰嚮鎻愮ず璇�変腑澶嶉�夋 + labelDisabled: { + type: [String, Boolean], + default: '' + }, + // 閫変腑鐘舵�佷笅鐨勯鑹诧紝濡傝缃鍊硷紝灏嗕細瑕嗙洊parent鐨刟ctiveColor鍊� + activeColor: { + type: String, + default: '' + }, + // 鍥炬爣鐨勫ぇ灏忥紝鍗曚綅rpx + iconSize: { + type: [String, Number], + default: '' + }, + // label鐨勫瓧浣撳ぇ灏忥紝rpx鍗曚綅 + labelSize: { + type: [String, Number], + default: '' + }, + }, + data() { + return { + // 鐖剁粍浠剁殑榛樿鍊硷紝鍥犱负澶存潯灏忕▼搴忎笉鏀寔鍦╟omputed涓娇鐢╰his.parent.shape鐨勫舰寮� + // 鏁呭彧鑳戒娇鐢ㄥ姝ゆ柟娉� + parentData: { + iconSize: null, + labelDisabled: null, + disabled: null, + shape: null, + activeColor: null, + size: null, + width: null, + height: null, + value: null, + wrap: null + } + }; + }, + created() { + this.parent = false; + // 鏀粯瀹濆皬绋嬪簭涓嶆敮鎸乸rovide/inject锛屾墍浠ヤ娇鐢ㄨ繖涓柟娉曡幏鍙栨暣涓埗缁勪欢锛屽湪created瀹氫箟锛岄伩鍏嶅惊鐜紩鐢� + this.updateParentData(); + this.parent.children.push(this); + }, + computed: { + // 鏄惁绂佺敤锛屽鏋滅埗缁勪欢u-raios-group绂佺敤鐨勮瘽锛屽皢浼氬拷鐣ュ瓙缁勪欢鐨勯厤缃� + elDisabled() { + return this.disabled !== '' ? this.disabled : this.parentData.disabled !== null ? this.parentData.disabled : false; + }, + // 鏄惁绂佺敤label鐐瑰嚮 + elLabelDisabled() { + return this.labelDisabled !== '' ? this.labelDisabled : this.parentData.labelDisabled !== null ? this.parentData.labelDisabled : false; + }, + // 缁勪欢灏哄锛屽搴攕ize鐨勫�硷紝榛樿鍊间负34rpx + elSize() { + return this.size ? this.size : (this.parentData.size ? this.parentData.size : 34); + }, + // 缁勪欢鐨勫嬀閫夊浘鏍囩殑灏哄锛岄粯璁�20 + elIconSize() { + return this.iconSize ? this.iconSize : (this.parentData.iconSize ? this.parentData.iconSize : 20); + }, + // 缁勪欢閫変腑婵�娲绘椂鐨勯鑹� + elActiveColor() { + return this.activeColor ? this.activeColor : (this.parentData.activeColor ? this.parentData.activeColor : 'primary'); + }, + // 缁勪欢鐨勫舰鐘� + elShape() { + return this.shape ? this.shape : (this.parentData.shape ? this.parentData.shape : 'circle'); + }, + // 璁剧疆radio鐨勭姸鎬侊紝瑕佹眰radio鐨刵ame绛変簬parent鐨剉alue鏃舵墠涓洪�変腑鐘舵�� + iconStyle() { + let style = {}; + if (this.elActiveColor && this.parentData.value == this.name && !this.elDisabled) { + style.borderColor = this.elActiveColor; + style.backgroundColor = this.elActiveColor; + } + style.width = this.$u.addUnit(this.elSize); + style.height = this.$u.addUnit(this.elSize); + return style; + }, + iconColor() { + return this.name == this.parentData.value ? '#ffffff' : 'transparent'; + }, + iconClass() { + let classes = []; + classes.push('u-radio__icon-wrap--' + this.elShape); + if (this.name == this.parentData.value) classes.push('u-radio__icon-wrap--checked'); + if (this.elDisabled) classes.push('u-radio__icon-wrap--disabled'); + if (this.name == this.parentData.value && this.elDisabled) classes.push( + 'u-radio__icon-wrap--disabled--checked'); + // 鏀粯瀹濆皬绋嬪簭鏃犳硶鍔ㄦ�佺粦瀹氫竴涓暟缁勭被鍚嶏紝鍚﹀垯瑙f瀽鍑烘潵鐨勭粨鏋滀細甯︽湁","锛岃�屽鑷村け鏁� + return classes.join(' '); + }, + radioStyle() { + let style = {}; + if (this.parentData.width) { + style.width = this.$u.addUnit(this.parentData.width); + // #ifdef MP + // 鍚勫灏忕▼搴忓洜涓哄畠浠壒娈婄殑缂栬瘧缁撴瀯锛屼娇鐢╢loat甯冨眬 + style.float = 'left'; + // #endif + // #ifndef MP + // H5鍜孉PP浣跨敤flex甯冨眬 + style.flex = `0 0 ${this.$u.addUnit(this.parentData.width)}`; + // #endif + } + if (this.parentData.wrap) { + style.width = '100%'; + // #ifndef MP + // H5鍜孉PP浣跨敤flex甯冨眬锛屽皢瀹藉害璁剧疆100%锛屽嵆鍙嚜鍔ㄦ崲琛� + style.flex = '0 0 100%'; + // #endif + } + return style; + } + }, + methods: { + updateParentData() { + this.getParentData('u-radio-group'); + }, + onClickLabel() { + if (!this.elLabelDisabled && !this.elDisabled) { + this.setRadioCheckedStatus(); + } + }, + toggle() { + if (!this.elDisabled) { + this.setRadioCheckedStatus(); + } + }, + emitEvent() { + // u-radio鐨刵ame涓嶇瓑浜庣埗缁勪欢鐨剉-model鐨勫�兼椂(鎰忓懗鐫�鏈�変腑)锛屾墠鍙戝嚭浜嬩欢锛岄伩鍏嶅娆$偣鍑昏Е鍙戜簨浠� + if(this.parentData.value != this.name) this.$emit('change', this.name); + }, + // 鏀瑰彉缁勪欢閫変腑鐘舵�� + // 杩欓噷鐨勬敼鍙樼殑渚濇嵁鏄紝鏇存敼鏈粍浠剁殑parentData.value鍊间负鏈粍浠剁殑name鍊硷紝鍚屾椂閫氳繃鐖剁粍浠堕亶鍘嗘墍鏈塽-radio瀹炰緥 + // 灏嗘湰缁勪欢澶栫殑鍏朵粬u-radio鐨刾arentData.value閮借缃负绌�(鐢眂omputed璁$畻鍚庯紝閮借鍙栨秷閫変腑鐘舵��)锛屽洜鑰屽彧鍓╀笅涓�涓负閫変腑鐘舵�� + setRadioCheckedStatus() { + this.emitEvent(); + if(this.parent) { + this.parent.setValue(this.name); + this.parentData.value = this.name; + } + } + } + }; +</script> + +<style lang="scss" scoped> + @import "../../libs/css/style.components.scss"; + + .u-radio { + /* #ifndef APP-NVUE */ + display: inline-flex; + /* #endif */ + align-items: center; + overflow: hidden; + user-select: none; + line-height: 1.8; + + &__icon-wrap { + color: $u-content-color; + @include vue-flex; + flex: none; + align-items: center; + justify-content: center; + box-sizing: border-box; + width: 42rpx; + height: 42rpx; + color: transparent; + text-align: center; + transition-property: color, border-color, background-color; + font-size: 20px; + border: 1px solid #c8c9cc; + transition-duration: 0.2s; + + /* #ifdef MP-TOUTIAO */ + // 澶存潯灏忕▼搴忓吋瀹规�ч棶棰橈紝闇�瑕佽缃楂樹负0锛屽惁鍒欏浘鏍囧亸涓� + &__icon { + line-height: 0; + } + /* #endif */ + + &--circle { + border-radius: 100%; + } + + &--square { + border-radius: 3px; + } + + &--checked { + color: #fff; + background-color: #2979ff; + border-color: #2979ff; + } + + &--disabled { + background-color: #ebedf0; + border-color: #c8c9cc; + } + + &--disabled--checked { + color: #c8c9cc !important; + } + } + + &__label { + word-wrap: break-word; + margin-left: 10rpx; + margin-right: 24rpx; + color: $u-content-color; + font-size: 30rpx; + + &--disabled { + color: #c8c9cc; + } + } + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-rate/u-rate.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-rate/u-rate.vue" new file mode 100644 index 0000000..1e44d56 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-rate/u-rate.vue" @@ -0,0 +1,275 @@ +<template> + <view class="u-rate" :id="elId" @touchmove.stop.prevent="touchMove"> + <view class="u-star-wrap" v-for="(item, index) in count" :key="index" :class="[elClass]"> + <u-icon + :name="activeIndex > index ? elActiveIcon : inactiveIcon" + @click="click(index + 1, $event)" + :color="activeIndex > index ? elActiveColor : inactiveColor" + :custom-style="{ + fontSize: size + 'rpx', + padding: `0 ${gutter / 2 + 'rpx'}` + }" + :custom-prefix="customPrefix" + :show-decimal-icon="showDecimalIcon(index)" + :percent="decimal" + :inactive-color="inactiveColor" + ></u-icon> + </view> + </view> +</template> + +<script>/** + * rate 璇勫垎 + * @description 璇ョ粍浠朵竴鑸敤浜庢弧鎰忓害璋冩煡锛屾槦鍨嬭瘎鍒嗙殑鍦烘櫙 + * @tutorial https://www.uviewui.com/components/rate.html + * @property {String Number} count 鏈�澶氬彲閫夌殑鏄熸槦鏁伴噺锛堥粯璁�5锛� + * @property {String Number} current 榛樿閫変腑鐨勬槦鏄熸暟閲忥紙榛樿0锛� + * @property {Boolean} disabled 鏄惁绂佹鐢ㄦ埛鎿嶄綔锛堥粯璁alse锛� + * @property {String Number} size 鏄熸槦鐨勫ぇ灏忥紝鍗曚綅rpx锛堥粯璁�32锛� + * @property {String} inactive-color 鏈�変腑鏄熸槦鐨勯鑹诧紙榛樿#b2b2b2锛� + * @property {String} active-color 閫変腑鐨勬槦鏄熼鑹诧紙榛樿#FA3534锛� + * @property {String} active-icon 閫変腑鏃剁殑鍥炬爣鍚嶏紝鍙兘涓簎View鐨勫唴缃浘鏍囷紙榛樿star-fill锛� + * @property {String} inactive-icon 鏈�変腑鏃剁殑鍥炬爣鍚嶏紝鍙兘涓簎View鐨勫唴缃浘鏍囷紙榛樿star锛� + * @property {String} gutter 鏄熸槦涔嬮棿鐨勮窛绂伙紙榛樿10锛� + * @property {String Number} min-count 鏈�灏戦�変腑鏄熸槦鐨勪釜鏁帮紙榛樿0锛� + * @property {Boolean} allow-half 鏄惁鍏佽鍗婃槦閫夋嫨锛堥粯璁alse锛� + * @event {Function} change 閫変腑鐨勬槦鏄熷彂鐢熷彉鍖栨椂瑙﹀彂 + * @example <u-rate :count="count" :current="2"></u-rate> + */ + +export default { + name: 'u-rate', + props: { + // 鐢ㄤ簬v-model鍙屽悜缁戝畾閫変腑鐨勬槦鏄熸暟閲� + // 1.4.5鐗堟柊澧� + value: { + type: [Number, String], + default: -1 + }, + // 瑕佹樉绀虹殑鏄熸槦鏁伴噺 + count: { + type: [Number, String], + default: 5 + }, + // 褰撳墠闇�瑕侀粯璁ら�変腑鐨勬槦鏄�(閫変腑鐨勪釜鏁�) + // 1.4.5鍚庨�氳繃value鍙屽悜缁戝畾锛屼笉鍐嶅缓璁娇鐢ㄦ鍙傛暟 + current: { + type: [Number, String], + default: 0 + }, + // 鏄惁涓嶅彲閫変腑 + disabled: { + type: Boolean, + default: false + }, + // 鏄熸槦鐨勫ぇ灏忥紝鍗曚綅rpx + size: { + type: [Number, String], + default: 32 + }, + // 鏈�変腑鏃剁殑棰滆壊 + inactiveColor: { + type: String, + default: '#b2b2b2' + }, + // 閫変腑鐨勯鑹� + activeColor: { + type: String, + default: '#FA3534' + }, + // 鏄熸槦涔嬮棿鐨勯棿璺濓紝鍗曚綅rpx + gutter: { + type: [Number, String], + default: 10 + }, + // 鏈�灏戣兘閫夋嫨鐨勬槦鏄熶釜鏁� + minCount: { + type: [Number, String], + default: 0 + }, + // 鏄惁鍏佽鍗婃槦(鍔熻兘灏氭湭瀹炵幇) + allowHalf: { + type: Boolean, + default: false + }, + // 閫変腑鏃剁殑鍥炬爣(鏄熸槦) + activeIcon: { + type: String, + default: 'star-fill' + }, + // 鏈�変腑鏃剁殑鍥炬爣(鏄熸槦) + inactiveIcon: { + type: String, + default: 'star' + }, + // 鑷畾涔夋墿灞曞墠缂�锛屾柟渚跨敤鎴锋墿灞曡嚜宸辩殑鍥炬爣搴� + customPrefix: { + type: String, + default: 'uicon' + }, + colors: { + type: Array, + default() { + return [] + } + }, + icons: { + type: Array, + default() { + return [] + } + } + }, + data() { + return { + // 鐢熸垚涓�涓敮涓�id锛屽惁鍒欎竴涓〉闈㈠涓瘎鍒嗙粍浠讹紝浼氶�犳垚鍐茬獊 + elId: this.$u.guid(), + elClass: this.$u.guid(), + starBoxLeft: 0, // 璇勫垎鐩掑瓙宸﹁竟鍒板睆骞曞乏杈圭殑璺濈锛岀敤浜庢粦鍔ㄩ�夋嫨鏃惰绠楄窛绂� + // 褰撳墠婵�娲荤殑鏄熸槦鐨刬ndex锛屽鏋滃瓨鍦╲alue锛屼紭鍏堜娇鐢╲alue锛屽洜涓哄畠鍙互鍙屽悜缁戝畾(1.4.5鏂板) + activeIndex: this.value != -1 ? this.value : this.current, + starWidth: 0, // 姣忎釜鏄熸槦鐨勫搴� + starWidthArr: [] //姣忎釜鏄熸槦鏈�鍙宠竟鍒扮粍浠剁洅瀛愭渶宸﹁竟鐨勮窛绂� + } + }, + watch: { + current(val) { + this.activeIndex = val + }, + value(val) { + this.activeIndex = val + } + }, + computed: { + decimal() { + if (this.disabled) { + return this.activeIndex * 100 % 100 + } else if (this.allowHalf) { + return 50 + } + }, + elActiveIcon() { + const len = this.icons.length + // 姝ゅ瑙勫垯绫讳技浜庝笅鏂圭殑elActiveColor鍙傛暟锛岄兘鏄牴鎹竴瀹氱殑瑙勫垯锛屾樉绀轰笉鍚岀殑鍥炬爣 + // 缁撴灉鍙兘濡傛锛歩cons鍙傛暟浼犻�掍簡3涓浘鏍囷紝褰撻�変腑涓や釜鏃讹紝鐢ㄧ涓�涓浘鏍囷紝4涓椂锛岀敤绗簩涓浘鏍� + // 绗笁涓椂锛岀敤绗笁涓浘鏍囦綔涓烘縺娲荤殑鍥炬爣 + if (len && len <= this.count) { + const step = Math.round(this.activeIndex / Math.round(this.count / len)) + if (step < 1) return this.icons[0] + if (step > len) return this.icons[len - 1] + return this.icons[step - 1] + } + return this.activeIcon + }, + elActiveColor() { + const len = this.colors.length + // 濡傛灉鏈夎缃甤olors鍙傛暟(姝ゅ弬鏁扮敤浜庡皢鍥炬爣鍒嗘锛屾瘮濡備竴鍏�5棰楁槦锛宑olors浼�3涓鑹插�硷紝閭d箞鏍规嵁涓�瀹氱殑瑙勫垯锛�2棰楁槦鍙兘涓虹涓�涓鑹� + // 4棰楁槦涓虹浜屼釜棰滆壊鍊硷紝5棰楁槦涓虹涓変釜棰滆壊鍊�) + if (len && len <= this.count) { + const step = Math.round(this.activeIndex / Math.round(this.count / len)) + if (step < 1) return this.colors[0] + if (step > len) return this.colors[len - 1] + return this.colors[step - 1] + } + return this.activeColor + } + }, + methods: { + // 鑾峰彇璇勫垎缁勪欢鐩掑瓙鐨勫竷灞�淇℃伅 + getElRectById() { + // uView灏佽鐨勮幏鍙栬妭鐐圭殑鏂规硶锛岃瑙佹枃妗� + this.$u.getRect('#' + this.elId).then(res => { + this.starBoxLeft = res.left + }) + }, + // 鑾峰彇鍗曚釜鏄熸槦鐨勫昂瀵� + getElRectByClass() { + // uView灏佽鐨勮幏鍙栬妭鐐圭殑鏂规硶锛岃瑙佹枃妗� + this.$u.getRect('.' + this.elClass).then(res => { + this.starWidth = res.width + // 鎶婃瘡涓槦鏄熷彸杈瑰埌缁勪欢鐩掑瓙宸﹁竟鐨勮窛绂绘斁鍏ユ暟缁勪腑 + for (let i = 0; i < this.count; i++) { + this.starWidthArr[i] = (i + 1) * this.starWidth + } + }) + }, + // 鎵嬫寚婊戝姩 + touchMove(e) { + if (this.disabled) { + return + } + if (!e.changedTouches[0]) { + return + } + const movePageX = e.changedTouches[0].pageX + // 婊戝姩鐐圭浉瀵逛簬璇勫垎鐩掑瓙宸﹁竟鐨勮窛绂� + const distance = movePageX - this.starBoxLeft + + // 濡傛灉婊戝姩鍒颁簡璇勫垎鐩掑瓙鐨勫乏杈圭晫锛屽氨璁剧疆涓�0鏄� + if (distance <= 0) { + this.activeIndex = 0 + } + // 婊戝姩鐨勮窛绂伙紝鐩稿綋浜庡灏戦鏄熸槦 + let index = Math.ceil(distance / this.starWidth) + this.activeIndex = index > this.count ? this.count : index + // 瀵规渶灏戦鏄熸槦鐨勯檺鍒� + if (this.activeIndex < this.minCount) this.activeIndex = this.minCount + this.emitEvent() + }, + // 閫氳繃鐐瑰嚮锛岀洿鎺ラ�変腑 + click(index, e) { + if (this.disabled) { + return + } + // 鍗婃槦閫夋嫨锛屽皻鏈疄鐜� + if (this.allowHalf) { + } + // 瀵圭涓�涓槦鏄熺壒娈婂鐞嗭紝鍙湁涓�涓殑鏃跺�欙紝鐐瑰嚮鍙互鍙栨秷锛屽惁鍒欐棤娉曚綔0鏄熻瘎浠� + if (index == 1) { + if (this.activeIndex == 1) { + this.activeIndex = 0 + } else { + this.activeIndex = 1 + } + } else { + this.activeIndex = index + } + // 瀵规渶灏戦鏄熸槦鐨勯檺鍒� + if (this.activeIndex < this.minCount) this.activeIndex = this.minCount + this.emitEvent() + }, + // 鍙戝嚭浜嬩欢 + emitEvent() { + // 鍙戝嚭change浜嬩欢 + this.$emit('change', this.activeIndex) + // 鍚屾椂淇敼鍙屽悜缁戝畾鐨剉alue鐨勫�� + if (this.value != -1) { + this.$emit('input', this.activeIndex) + } + }, + showDecimalIcon(index) { + return this.disabled && parseInt(this.activeIndex) === index + } + }, + mounted() { + this.getElRectById() + this.getElRectByClass() + } +} +</script> + +<style scoped lang="scss"> +@import "../../libs/css/style.components.scss"; + +.u-rate { + display: -webkit-inline-flex; + display: inline-flex; + align-items: center; + margin: 0; + padding: 0; +} + +.u-icon { + box-sizing: border-box; +} +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-read-more/u-read-more.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-read-more/u-read-more.vue" new file mode 100644 index 0000000..a77a44f --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-read-more/u-read-more.vue" @@ -0,0 +1,179 @@ +<template> + <view class=""> + <view class="u-content" :class="[elId]" :style="{ + height: isLongContent && !showMore ? showHeight + 'rpx' : 'auto', + textIndent: textIndent + }"> + <slot></slot> + </view> + <view @tap="toggleReadMore" v-if="isLongContent" class="u-content__showmore-wrap" + :class="{ 'u-content__show-more': showMore }" + :style="[innerShadowStyle]"> + <text class="u-content__showmore-wrap__readmore-btn" :style="{ + fontSize: fontSize + 'rpx', + color: color + }"> + {{ showMore ? openText : closeText }} + </text> + <view class="u-content__showmore-wrap__readmore-btn__icon u-flex"> + <u-icon :color="color" :size="fontSize" :name="showMore ? 'arrow-up' : 'arrow-down'"></u-icon> + </view> + </view> + </view> +</template> + +<script> + /** + * readMore 闃呰鏇村 + * @description 璇ョ粍浠朵竴鑸敤浜庡唴瀹硅緝闀匡紝棰勫厛鏀惰捣涓�閮ㄥ垎锛岀偣鍑诲睍寮�鍏ㄩ儴鍐呭鐨勫満鏅�� + * @tutorial https://www.uviewui.com/components/readMore.html + * @property {String Number} show-height 鍐呭瓒呭嚭姝ら珮搴︽墠浼氭樉绀哄睍寮�鍏ㄦ枃鎸夐挳锛屽崟浣峳px锛堥粯璁�400锛� + * @property {Boolean} toggle 灞曞紑鍚庢槸鍚︽樉绀烘敹璧锋寜閽紙榛樿false锛� + * @property {String} close-text 鍏抽棴鏃剁殑鎻愮ず鏂囧瓧锛堥粯璁も�滃睍寮�闃呰鍏ㄦ枃鈥濓級 + * @property {String Number} font-size 鎻愮ず鏂囧瓧鐨勫ぇ灏忥紝鍗曚綅rpx锛堥粯璁�28锛� + * @property {String} text-indent 娈佃惤棣栬缂╄繘鐨勫瓧绗︿釜鏁帮紙榛樿2em锛� + * @property {String} open-text 灞曞紑鏃剁殑鎻愮ず鏂囧瓧锛堥粯璁も�滄敹璧封�濓級 + * @property {String} color 鎻愮ず鏂囧瓧鐨勯鑹诧紙榛樿#2979ff锛� + * @example <u-read-more><rich-text :nodes="content"></rich-text></u-read-more> + */ + export default { + name: "u-read-more", + props: { + // 榛樿鐨勬樉绀哄崰浣嶉珮搴︼紝鍗曚綅涓簉px + showHeight: { + type: [Number, String], + default: 400 + }, + // 灞曞紑鍚庢槸鍚︽樉绀�"鏀惰捣"鎸夐挳 + toggle: { + type: Boolean, + default: false + }, + // 鍏抽棴鏃剁殑鎻愮ず鏂囧瓧 + closeText: { + type: String, + default: '灞曞紑闃呰鍏ㄦ枃' + }, + // 灞曞紑鏃剁殑鎻愮ず鏂囧瓧 + openText: { + type: String, + default: '鏀惰捣' + }, + // 鎻愮ず鐨勬枃瀛楅鑹� + color: { + type: String, + default: '#2979ff' + }, + // 鎻愮ず鏂囧瓧鐨勫ぇ灏� + fontSize: { + type: [String, Number], + default: 28 + }, + // 鏄惁鏄剧ず闃村奖 + shadowStyle: { + type: Object, + default () { + return { + backgroundImage: "linear-gradient(-180deg, rgba(255, 255, 255, 0) 0%, #fff 80%)", + paddingTop: "300rpx", + marginTop: "-300rpx" + } + } + }, + // 娈佃惤棣栬缂╄繘鐨勫瓧绗︿釜鏁� + textIndent: { + type: String, + default: '2em' + }, + // open鍜宑lose浜嬩欢鏃讹紝灏嗘鍙傛暟杩斿洖鍦ㄥ洖璋冨弬鏁颁腑 + index: { + type: [Number, String], + default: '' + } + }, + watch: { + paramsChange(val) { + this.init(); + } + }, + computed: { + paramsChange() { + return `${this.toggle}-${this.showHeight}`; + }, + // 灞曞紑鍚庢棤闇�闃村奖锛屾敹璧锋椂鎵嶉渶瑕侀槾褰辨牱寮� + innerShadowStyle() { + if (this.showMore) return {}; + else return this.shadowStyle + } + }, + data() { + return { + isLongContent: false, // 鏄惁闇�瑕侀殣钘忎竴閮ㄥ垎鍐呭 + showMore: false, // 褰撳墠闅愯棌涓庢樉绀虹殑鐘舵�侊紝true-鏄剧ず锛宖alse-鏀惰捣 + elId: this.$u.guid(), // 鐢熸垚鍞竴class + }; + }, + mounted() { + this.$nextTick(() => { + this.init(); + }) + }, + methods: { + init() { + this.$uGetRect('.' + this.elId).then(res => { + // 鍒ゆ柇楂樺害锛屽鏋滅湡瀹炲唴瀹归珮搴﹀ぇ浜庡崰浣嶉珮搴︼紝鍒欐樉绀烘敹璧蜂笌灞曞紑鐨勬帶鍒舵寜閽� + if (res.height > uni.upx2px(this.showHeight)) { + this.isLongContent = true; + this.showMore = false; + } + }) + }, + // 灞曞紑鎴栬�呮敹璧� + toggleReadMore() { + this.showMore = !this.showMore; + // 濡傛灉toggle涓篺alse锛岄殣钘�"鏀惰捣"閮ㄥ垎鐨勫唴瀹� + if (this.toggle == false) this.isLongContent = false; + // 鍙戝嚭鎵撳紑鎴栬�呮敹榻愮殑浜嬩欢 + this.$emit(this.showMore ? 'open' : 'close', this.index); + } + } + }; +</script> + +<style lang="scss" scoped> + @import "../../libs/css/style.components.scss"; + + .u-content { + font-size: 30rpx; + color: $u-content-color; + line-height: 1.8; + text-align: left; + overflow: hidden; + + &__show-more { + padding-top: 0; + background: none; + margin-top: 20rpx; + } + + &__showmore-wrap { + position: relative; + width: 100%; + padding-bottom: 26rpx; + @include vue-flex; + align-items: center; + justify-content: center; + + &__readmore-btn { + @include vue-flex; + align-items: center; + justify-content: center; + line-height: 1; + + &__icon { + margin-left: 14rpx; + } + } + } + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-row-notice/u-row-notice.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-row-notice/u-row-notice.vue" new file mode 100644 index 0000000..f4683f1 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-row-notice/u-row-notice.vue" @@ -0,0 +1,269 @@ +<template> + <view + v-if="show" + class="u-notice-bar" + :style="{ + background: computeBgColor, + padding: padding + }" + :class="[ + type ? `u-type-${type}-light-bg` : '' + ]" + > + <view class="u-direction-row"> + <view class="u-icon-wrap"> + <u-icon class="u-left-icon" v-if="volumeIcon" name="volume-fill" :size="volumeSize" :color="computeColor"></u-icon> + </view> + <view class="u-notice-box" id="u-notice-box"> + <view + class="u-notice-content" + id="u-notice-content" + :style="{ + animationDuration: animationDuration, + animationPlayState: animationPlayState, + }" + > + <text class="u-notice-text" @tap="click" :style="[textStyle]" + :class="['u-type-' + type]">{{showText}}</text> + </view> + </view> + <view class="u-icon-wrap"> + <u-icon @click="getMore" class="u-right-icon" v-if="moreIcon" name="arrow-right" :size="26" :color="computeColor"></u-icon> + <u-icon @click="close" class="u-right-icon" v-if="closeIcon" name="close" :size="24" :color="computeColor"></u-icon> + </view> + </view> + </view> +</template> +<script> +export default { + props: { + // 鏄剧ず鐨勫唴瀹癸紝鏁扮粍 + list: { + type: Array, + default() { + return []; + } + }, + // 鏄剧ず鐨勪富棰橈紝success|error|primary|info|warning|none + // none涓婚榛樿涓洪�忔槑鑳屾櫙锛岄粦鑹�(contentColor)瀛椾綋 + type: { + type: String, + default: 'warning' + }, + // 鏄惁鏄剧ず宸︿晶鐨勯煶閲忓浘鏍� + volumeIcon: { + type: Boolean, + default: true + }, + // 鏄惁鏄剧ず鍙充晶鐨勫彸绠ご鍥炬爣 + moreIcon: { + type: Boolean, + default: false + }, + // 鏄惁鏄剧ず鍙充晶鐨勫叧闂浘鏍� + closeIcon: { + type: Boolean, + default: false + }, + // 鏄惁鑷姩鎾斁 + autoplay: { + type: Boolean, + default: true + }, + // 鏂囧瓧棰滆壊锛屽悇鍥炬爣涔熶細浣跨敤鏂囧瓧棰滆壊 + color: { + type: String, + default: '' + }, + // 鑳屾櫙棰滆壊 + bgColor: { + type: String, + default: '' + }, + // 鏄惁鏄剧ず + show: { + type: Boolean, + default: true + }, + // 瀛椾綋澶у皬锛屽崟浣峳px + fontSize: { + type: [Number, String], + default: 26 + }, + // 闊抽噺鍠囧彮鐨勫ぇ灏� + volumeSize: { + type: [Number, String], + default: 34 + }, + // 姘村钩婊氬姩鏃剁殑婊氬姩閫熷害锛屽嵆姣忕婊氬姩澶氬皯rpx锛岃繖鏈夊埄浜庢帶鍒舵枃瀛楁棤璁哄灏戞椂锛岄兘鑳芥湁涓�涓亽瀹氱殑閫熷害 + speed: { + type: [Number, String], + default: 160 + }, + // 鎾斁鐘舵�侊紝play-鎾斁锛宲aused-鏆傚仠 + playState: { + type: String, + default: 'play' + }, + // 閫氱煡鐨勮竟璺� + padding: { + type: [Number, String], + default: '18rpx 24rpx' + } + }, + data() { + return { + textWidth: 0, // 婊氬姩鐨勬枃瀛楀搴� + boxWidth: 0, // 渚涙枃瀛楁粴鍔ㄧ殑鐖剁洅瀛愮殑瀹藉害锛屽拰鍓嶈�呬竴璧蜂负浜嗚绠楁粴鍔ㄩ�熷害 + animationDuration: '10s', // 鍔ㄧ敾鎵ц鏃堕棿 + animationPlayState: 'paused', // 鍔ㄧ敾鐨勫紑濮嬪拰缁撴潫鎵ц + showText: '' // 鏄剧ず鐨勬枃鏈� + }; + }, + watch: { + list: { + immediate: true, + handler(val) { + this.showText = val.join('锛�'); + this.$nextTick(() => { + this.initSize(); + }); + } + }, + playState(val) { + if(val == 'play') this.animationPlayState = 'running'; + else this.animationPlayState = 'paused'; + }, + speed(val) { + this.initSize(); + } + }, + computed: { + // 璁$畻瀛椾綋棰滆壊锛屽鏋滄病鏈夎嚜瀹氫箟鐨勶紝灏辩敤uview涓婚棰滆壊 + computeColor() { + if (this.color) return this.color; + // 濡傛灉鏄棤涓婚锛屽氨榛樿浣跨敤content-color + else if(this.type == 'none') return '#606266'; + else return this.type; + }, + // 鏂囧瓧鍐呭鐨勬牱寮� + textStyle() { + let style = {}; + if (this.color) style.color = this.color; + else if(this.type == 'none') style.color = '#606266'; + style.fontSize = this.fontSize + 'rpx'; + return style; + }, + // 璁$畻鑳屾櫙棰滆壊 + computeBgColor() { + if (this.bgColor) return this.bgColor; + else if(this.type == 'none') return 'transparent'; + } + }, + mounted() { + this.$nextTick(() => { + this.initSize(); + }); + }, + methods: { + initSize() { + let query = [], + boxWidth = 0, + textWidth = 0; + let textQuery = new Promise((resolve, reject) => { + uni.createSelectorQuery() + .in(this) + .select(`#u-notice-content`) + .boundingClientRect() + .exec(ret => { + this.textWidth = ret[0].width; + resolve(); + }); + }); + query.push(textQuery); + Promise.all(query).then(() => { + // 鏍规嵁t=s/v(鏃堕棿=璺▼/閫熷害)锛岃繖閲屼负浣曚笉闇�瑕佸姞涓�#u-notice-box鐨勫搴︼紝鍥犱负涓缃簡.u-notice-content鏍峰紡涓缃簡padding-left: 100% + // 鎭板阀璁$畻鍑烘潵鐨勭粨鏋滀腑宸茬粡鍖呭惈浜�#u-notice-box鐨勫搴� + this.animationDuration = `${this.textWidth / uni.upx2px(this.speed)}s`; + // 杩欓噷蹇呴』杩欐牱寮�濮嬪姩鐢伙紝鍚﹀垯鍦ˋPP涓婂姩鐢婚�熷害涓嶄細鏀瑰彉(HX鐗堟湰2.4.6锛孖OS13) + this.animationPlayState = 'paused'; + setTimeout(() => { + if(this.playState == 'play' && this.autoplay) this.animationPlayState = 'running'; + }, 10); + }); + }, + // 鐐瑰嚮閫氬憡鏍� + click(index) { + this.$emit('click'); + }, + // 鐐瑰嚮鍏抽棴鎸夐挳 + close() { + this.$emit('close'); + }, + // 鐐瑰嚮鏇村绠ご鎸夐挳 + getMore() { + this.$emit('getMore'); + } + } +}; +</script> + +<style lang="scss" scoped> +@import "../../libs/css/style.components.scss"; + +.u-notice-bar { + padding: 18rpx 24rpx; + overflow: hidden; +} + +.u-direction-row { + @include vue-flex; + align-items: center; + justify-content: space-between; +} + +.u-left-icon { + /* #ifndef APP-NVUE */ + display: inline-flex; + /* #endif */ + align-items: center; +} + +.u-notice-box { + flex: 1; + @include vue-flex; + overflow: hidden; + margin-left: 12rpx; +} + +.u-right-icon { + margin-left: 12rpx; + display: inline-flex; + align-items: center; +} + +.u-notice-content { + animation: u-loop-animation 10s linear infinite both; + text-align: right; + // 杩欎竴鍙ュ緢閲嶈锛屼负浜嗚兘璁╂粴鍔ㄥ乏鍙宠繛鎺ヨ捣鏉� + padding-left: 100%; + @include vue-flex; + flex-wrap: nowrap; +} + +.u-notice-text { + font-size: 26rpx; + word-break: keep-all; + white-space: nowrap +} + +@keyframes u-loop-animation { + 0% { + transform: translate3d(0, 0, 0); + } + + 100% { + transform: translate3d(-100%, 0, 0); + } +} +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-row/u-row.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-row/u-row.vue" new file mode 100644 index 0000000..915dfa6 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-row/u-row.vue" @@ -0,0 +1,84 @@ +<template> + <view class="u-row" :style="{ + alignItems: uAlignItem, + justifyContent: uJustify + }" + @tap="click" + > + <slot /> + </view> +</template> + +<script> + /** + * row 琛屽竷灞� + * @description 閫氳繃鍩虹鐨� 12 鍒嗘爮锛岃繀閫熺畝渚垮湴鍒涘缓甯冨眬銆� + * @tutorial https://www.uviewui.com/components/layout.html#row-props + * @property {String Number} gutter 鏍呮牸闂撮殧锛屽乏鍙冲悇涓烘鍊肩殑涓�鍗婏紝鍗曚綅rpx锛堥粯璁�0锛� + * @property {String} justify 姘村钩鎺掑垪鏂瑰紡(寰俊灏忕▼搴忔殏涓嶆敮鎸�)榛樿锛坰tart(鎴杅lex-start)锛� + * @property {String} align 鍨傜洿鎺掑垪鏂瑰紡锛堥粯璁enter锛� + * @example <u-row gutter="16"></u-row> + */ + export default { + name: "u-row", + props: { + // 缁檆ol娣诲姞闂磋窛锛屽乏鍙宠竟璺濆悇鍗犱竴鍗� + gutter: { + type: [String, Number], + default: 20 + }, + // 姘村钩鎺掑垪鏂瑰紡锛屽彲閫夊�间负`start`(鎴朻flex-start`)銆乣end`(鎴朻flex-end`)銆乣center`銆乣around`(鎴朻space-around`)銆乣between`(鎴朻space-between`) + justify: { + type: String, + default: 'start' + }, + // 鍨傜洿瀵归綈鏂瑰紡锛屽彲閫夊�间负top銆乧enter銆乥ottom + align: { + type: String, + default: 'center' + }, + // 鏄惁闃绘浜嬩欢浼犳挱 + stop: { + type: Boolean, + default: true + } + }, + computed: { + uJustify() { + if (this.justify == 'end' || this.justify == 'start') return 'flex-' + this.justify; + else if (this.justify == 'around' || this.justify == 'between') return 'space-' + this.justify; + else return this.justify; + }, + uAlignItem() { + if (this.align == 'top') return 'flex-start'; + if (this.align == 'bottom') return 'flex-end'; + else return this.align; + } + }, + methods: { + click(e) { + this.$emit('click'); + } + } + } +</script> + +<style lang="scss"> + @import "../../libs/css/style.components.scss"; + + .u-row { + // 鐢变簬寰俊灏忕▼搴忕紪璇戝悗濂囨�殑椤甸潰缁撴瀯锛屽彧鑳戒娇鐢╢loat甯冨眬瀹炵幇锛宖lex鏃犳硶瀹炵幇 + /* #ifndef MP-WEIXIN || MP-QQ || MP-TOUTIAO */ + @include vue-flex; + /* #endif */ + flex-wrap: wrap; + } + + .u-row:after { + /* #ifdef MP-WEIXIN || MP-QQ || MP-TOUTIAO */ + display: table; + clear: both; + content: ""; + /* #endif */ + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-search/u-search.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-search/u-search.vue" new file mode 100644 index 0000000..206f661 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-search/u-search.vue" @@ -0,0 +1,342 @@ +<template> + <view class="u-search" @tap="clickHandler" :style="{ + margin: margin, + }"> + <view + class="u-content" + :style="{ + backgroundColor: bgColor, + borderRadius: shape == 'round' ? '100rpx' : '10rpx', + border: borderStyle, + height: height + 'rpx' + }" + > + <view class="u-icon-wrap"> + <u-icon class="u-clear-icon" :size="30" :name="searchIcon" :color="searchIconColor ? searchIconColor : color"></u-icon> + </view> + <input + confirm-type="search" + @blur="blur" + :value="value" + @confirm="search" + @input="inputChange" + :disabled="disabled" + @focus="getFocus" + :focus="focus" + :maxlength="maxlength" + placeholder-class="u-placeholder-class" + :placeholder="placeholder" + :placeholder-style="`color: ${placeholderColor}`" + class="u-input" + type="text" + :style="[{ + textAlign: inputAlign, + color: color, + backgroundColor: bgColor, + }, inputStyle]" + /> + <view class="u-close-wrap" v-if="keyword && clearabled && focused" @tap="clear"> + <u-icon class="u-clear-icon" name="close-circle-fill" size="34" color="#c0c4cc"></u-icon> + </view> + </view> + <view :style="[actionStyle]" class="u-action" + :class="[showActionBtn || show ? 'u-action-active' : '']" + @tap.stop.prevent="custom" + >{{ actionText }}</view> + </view> +</template> + +<script> +/** + * search 鎼滅储妗� + * @description 鎼滅储缁勪欢锛岄泦鎴愪簡甯歌鎼滅储妗嗘墍闇�鍔熻兘锛岀敤鎴峰彲浠ヤ竴閿紩鍏ワ紝寮�绠卞嵆鐢ㄣ�� + * @tutorial https://www.uviewui.com/components/search.html + * @property {String} shape 鎼滅储妗嗗舰鐘讹紝round-鍦嗗舰锛宻quare-鏂瑰舰锛堥粯璁ound锛� + * @property {String} bg-color 鎼滅储妗嗚儗鏅鑹诧紙榛樿#f2f2f2锛� + * @property {String} border-color 杈规棰滆壊锛岄厤缃簡棰滆壊锛屾墠浼氭湁杈规 + * @property {String} placeholder 鍗犱綅鏂囧瓧鍐呭锛堥粯璁も�滆杈撳叆鍏抽敭瀛椻�濓級 + * @property {Boolean} clearabled 鏄惁鍚敤娓呴櫎鎺т欢锛堥粯璁rue锛� + * @property {Boolean} focus 鏄惁鑷姩鑾峰緱鐒︾偣锛堥粯璁alse锛� + * @property {Boolean} show-action 鏄惁鏄剧ず鍙充晶鎺т欢锛堥粯璁rue锛� + * @property {String} action-text 鍙充晶鎺т欢鏂囧瓧锛堥粯璁も�滄悳绱⑩�濓級 + * @property {Object} action-style 鍙充晶鎺т欢鐨勬牱寮忥紝瀵硅薄褰㈠紡 + * @property {String} input-align 杈撳叆妗嗗唴瀹规按骞冲榻愭柟寮忥紙榛樿left锛� + * @property {Object} input-style 鑷畾涔夎緭鍏ユ鏍峰紡锛屽璞″舰寮� + * @property {Boolean} disabled 鏄惁鍚敤杈撳叆妗嗭紙榛樿false锛� + * @property {String} search-icon-color 鎼滅储鍥炬爣鐨勯鑹诧紝榛樿鍚岃緭鍏ユ瀛椾綋棰滆壊 + * @property {String} color 杈撳叆妗嗗瓧浣撻鑹诧紙榛樿#606266锛� + * @property {String} placeholder-color placeholder鐨勯鑹诧紙榛樿#909399锛� + * @property {String} search-icon 杈撳叆妗嗗乏杈圭殑鍥炬爣锛屽彲浠ヤ负uView鍥炬爣鍚嶇О鎴栧浘鐗囪矾寰� + * @property {String} margin 缁勪欢涓庡叾浠栦笂涓嬪乏鍙冲厓绱犱箣闂寸殑璺濈锛屽甫鍗曚綅鐨勫瓧绗︿覆褰㈠紡锛屽"30rpx" + * @property {Boolean} animation 鏄惁寮�鍚姩鐢伙紝瑙佷笂鏂硅鏄庯紙榛樿false锛� + * @property {String} value 杈撳叆妗嗗垵濮嬪�� + * @property {String | Number} maxlength 杈撳叆妗嗘渶澶ц兘杈撳叆鐨勯暱搴︼紝-1涓轰笉闄愬埗闀垮害 + * @property {Boolean} input-style input杈撳叆妗嗙殑鏍峰紡锛屽彲浠ュ畾涔夋枃瀛楅鑹诧紝澶у皬绛夛紝瀵硅薄褰㈠紡 + * @property {String | Number} height 杈撳叆妗嗛珮搴︼紝鍗曚綅rpx锛堥粯璁�64锛� + * @event {Function} change 杈撳叆妗嗗唴瀹瑰彂鐢熷彉鍖栨椂瑙﹀彂 + * @event {Function} search 鐢ㄦ埛纭畾鎼滅储鏃惰Е鍙戯紝鐢ㄦ埛鎸夊洖杞﹂敭锛屾垨鑰呮墜鏈洪敭鐩樺彸涓嬭鐨�"鎼滅储"閿椂瑙﹀彂 + * @event {Function} custom 鐢ㄦ埛鐐瑰嚮鍙充晶鎺т欢鏃惰Е鍙� + * @event {Function} clear 鐢ㄦ埛鐐瑰嚮娓呴櫎鎸夐挳鏃惰Е鍙� + * @example <u-search placeholder="鏃ョ収棣欑倝鐢熺传鐑�" v-model="keyword"></u-search> + */ +export default { + name: "u-search", + props: { + // 鎼滅储妗嗗舰鐘讹紝round-鍦嗗舰锛宻quare-鏂瑰舰 + shape: { + type: String, + default: 'round' + }, + // 鎼滅储妗嗚儗鏅壊锛岄粯璁ゅ��#f2f2f2 + bgColor: { + type: String, + default: '#f2f2f2' + }, + // 鍗犱綅鎻愮ず鏂囧瓧 + placeholder: { + type: String, + default: '璇疯緭鍏ュ叧閿瓧' + }, + // 鏄惁鍚敤娓呴櫎鎺т欢 + clearabled: { + type: Boolean, + default: true + }, + // 鏄惁鑷姩鑱氱劍 + focus: { + type: Boolean, + default: false + }, + // 鏄惁鍦ㄦ悳绱㈡鍙充晶鏄剧ず鍙栨秷鎸夐挳 + showAction: { + type: Boolean, + default: true + }, + // 鍙宠竟鎺т欢鐨勬牱寮� + actionStyle: { + type: Object, + default() { + return {}; + } + }, + // 鍙栨秷鎸夐挳鏂囧瓧 + actionText: { + type: String, + default: '鎼滅储' + }, + // 杈撳叆妗嗗唴瀹瑰榻愭柟寮忥紝鍙�夊�间负 left|center|right + inputAlign: { + type: String, + default: 'left' + }, + // 鏄惁鍚敤杈撳叆妗� + disabled: { + type: Boolean, + default: false + }, + // 寮�鍚痵howAction鏃讹紝鏄惁鍦╥nput鑾峰彇鐒︾偣鏃舵墠鏄剧ず + animation: { + type: Boolean, + default: false + }, + // 杈规棰滆壊锛屽彧瑕侀厤缃簡棰滆壊锛屾墠浼氭湁杈规 + borderColor: { + type: String, + default: 'none' + }, + // 杈撳叆妗嗙殑鍒濆鍖栧唴瀹� + value: { + type: String, + default: '' + }, + // 鎼滅储妗嗛珮搴︼紝鍗曚綅rpx + height: { + type: [Number, String], + default: 64 + }, + // input杈撳叆妗嗙殑鏍峰紡锛屽彲浠ュ畾涔夋枃瀛楅鑹诧紝澶у皬绛夛紝瀵硅薄褰㈠紡 + inputStyle: { + type: Object, + default() { + return {} + } + }, + // 杈撳叆妗嗘渶澶ц兘杈撳叆鐨勯暱搴︼紝-1涓轰笉闄愬埗闀垮害(鏉ヨ嚜uniapp鏂囨。) + maxlength: { + type: [Number, String], + default: '-1' + }, + // 鎼滅储鍥炬爣鐨勯鑹诧紝榛樿鍚岃緭鍏ユ瀛椾綋棰滆壊 + searchIconColor: { + type: String, + default: '' + }, + // 杈撳叆妗嗗瓧浣撻鑹� + color: { + type: String, + default: '#606266' + }, + // placeholder鐨勯鑹� + placeholderColor: { + type: String, + default: '#909399' + }, + // 缁勪欢涓庡叾浠栦笂涓嬪乏鍙冲厓绱犱箣闂寸殑璺濈锛屽甫鍗曚綅鐨勫瓧绗︿覆褰㈠紡锛屽"30rpx"銆�"30rpx 20rpx"绛夊啓娉� + margin: { + type: String, + default: '0' + }, + // 宸﹁竟杈撳叆妗嗙殑鍥炬爣锛屽彲浠ヤ负uView鍥炬爣鍚嶇О鎴栧浘鐗囪矾寰� + searchIcon: { + type: String, + default: 'search' + } + }, + data() { + return { + keyword: '', + showClear: false, // 鏄惁鏄剧ず鍙宠竟鐨勬竻闄ゅ浘鏍� + show: false, + // 鏍囪input褰撳墠鐘舵�佹槸鍚﹀浜庤仛鐒︿腑锛屽鏋滄槸锛屾墠浼氭樉绀哄彸渚х殑娓呴櫎鎺т欢 + focused: this.focus + // 缁戝畾杈撳叆妗嗙殑鍊� + // inputValue: this.value + }; + }, + watch: { + keyword(nVal) { + // 鍙屽悜缁戝畾鍊硷紝璁﹙-model缁戝畾鐨勫�煎弻鍚戝彉鍖� + this.$emit('input', nVal); + // 瑙﹀彂change浜嬩欢锛屼簨浠舵晥鏋滃拰v-model鍙屽悜缁戝畾鐨勬晥鏋滀竴鏍凤紝璁╃敤鎴峰涓�涓�夋嫨 + this.$emit('change', nVal); + }, + value: { + immediate: true, + handler(nVal) { + this.keyword = nVal; + } + } + }, + computed: { + showActionBtn() { + if (!this.animation && this.showAction) return true; + else return false; + }, + // 鏍峰紡锛屾牴鎹敤鎴蜂紶鍏ョ殑棰滆壊鍊肩敓鎴愶紝濡傛灉涓嶄紶鍏ワ紝榛樿涓簄one + borderStyle() { + if (this.borderColor) return `1px solid ${this.borderColor}`; + else return 'none'; + }, + }, + methods: { + // 鐩墠HX2.6.9 v-model鍙屽悜缁戝畾鏃犳晥锛屾晠鐩戝惉input浜嬩欢鑾峰彇杈撳叆妗嗗唴瀹圭殑鍙樺寲 + inputChange(e) { + this.keyword = e.detail.value; + }, + // 娓呯┖杈撳叆 + // 涔熷彲浠ヤ綔涓虹敤鎴烽�氳繃this.$refs褰㈠紡璋冪敤娓呯┖杈撳叆妗嗗唴瀹� + clear() { + this.keyword = ''; + // 寤跺悗鍙戝嚭浜嬩欢锛岄伩鍏嶅湪鐖剁粍浠剁洃鍚琧lear浜嬩欢鏃讹紝value涓烘洿鏂板墠鐨勫��(涓嶄负绌�) + this.$nextTick(() => { + this.$emit('clear'); + }) + }, + // 纭畾鎼滅储 + search(e) { + this.$emit('search', e.detail.value); + try{ + // 鏀惰捣閿洏 + uni.hideKeyboard(); + }catch(e){} + }, + // 鐐瑰嚮鍙宠竟鑷畾涔夋寜閽殑浜嬩欢 + custom() { + this.$emit('custom', this.keyword); + try{ + // 鏀惰捣閿洏 + uni.hideKeyboard(); + }catch(e){} + }, + // 鑾峰彇鐒︾偣 + getFocus() { + this.focused = true; + // 寮�鍚彸渚ф悳绱㈡寜閽睍寮�鐨勫姩鐢绘晥鏋� + if (this.animation && this.showAction) this.show = true; + this.$emit('focus', this.keyword); + }, + // 澶卞幓鐒︾偣 + blur() { + // 鏈�寮�濮嬩娇鐢ㄧ殑鏄洃鍚浘鏍嘆touchstart浜嬩欢锛岃嚜浠巋x2.8.4鍚庯紝姝ゆ柟娉曞湪寰俊灏忕▼搴忓嚭閿� + // 杩欓噷鏀逛负鐩戝惉鐐瑰嚮浜嬩欢锛屾墜鐐瑰嚮娓呴櫎鍥炬爣鏃讹紝鍚屾椂涔熷彂鐢熶簡@blur浜嬩欢锛屽鑷村浘鏍囨秷澶辫�屾棤娉曠偣鍑伙紝杩欓噷鍋氫竴涓欢鏃� + setTimeout(() => { + this.focused = false; + }, 100) + this.show = false; + this.$emit('blur', this.keyword); + }, + // 鐐瑰嚮鎼滅储妗嗭紝鍙湁disabled=true鏃舵墠鍙戝嚭浜嬩欢锛屽洜涓虹姝簡杈撳叆锛屾剰鍛崇潃鏄兂璺宠浆鐪熸鐨勬悳绱㈤〉 + clickHandler() { + if(this.disabled) this.$emit('click'); + } + } +}; +</script> + +<style lang="scss" scoped> +@import "../../libs/css/style.components.scss"; + +.u-search { + @include vue-flex; + align-items: center; + flex: 1; +} + +.u-content { + @include vue-flex; + align-items: center; + padding: 0 18rpx; + flex: 1; +} + +.u-clear-icon { + @include vue-flex; + align-items: center; +} + +.u-input { + flex: 1; + font-size: 28rpx; + line-height: 1; + margin: 0 10rpx; + color: $u-tips-color; +} + +.u-close-wrap { + width: 40rpx; + height: 100%; + @include vue-flex; + align-items: center; + justify-content: center; + border-radius: 50%; +} + +.u-placeholder-class { + color: $u-tips-color; +} + +.u-action { + font-size: 28rpx; + color: $u-main-color; + width: 0; + overflow: hidden; + transition: all 0.3s; + white-space: nowrap; + text-align: center; +} + +.u-action-active { + width: 80rpx; + margin-left: 10rpx; +} +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-section/u-section.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-section/u-section.vue" new file mode 100644 index 0000000..02293ce --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-section/u-section.vue" @@ -0,0 +1,154 @@ +<template> + <view class="u-section"> + <view class="u-section__title" :style="{ + fontWeight: bold ? 'bold' : 'normal', + color: color, + fontSize: fontSize + 'rpx', + paddingLeft: showLine ? (fontSize * 0.7) + 'rpx' : 0 + }" :class="{ + 'u-section--line': showLine + }"> + <view class="u-section__title__icon-wrap u-flex" :style="[lineStyle]" v-if="showLine"> + <u-icon top="0" name="column-line" :size="fontSize * 1.25" bold :color="lineColor ? lineColor : color"></u-icon> + </view> + <text class="u-flex u-section__title__text">{{title}}</text> + </view> + <view class="u-section__right-info" v-if="right || $slots.right" :style="{ + color: subColor + }" @tap="rightClick"> + <slot name="right" v-if="$slots.right" /> + <block v-else> + {{subTitle}} + <view class="u-section__right-info__icon-arrow u-flex" v-if="arrow"> + <u-icon name="arrow-right" size="24" :color="subColor"></u-icon> + </view> + </block> + </view> + </view> +</template> + +<script> + /** + * section 鏌ョ湅鏇村 + * @description 璇ョ粍浠朵竴鑸敤浜庡垎绫讳俊鎭湁寰堝锛屼絾鏄檺浜庣瘒骞呭彧鑳藉垪鍑轰竴閮ㄥ垎锛岃鐢ㄦ埛閫氳繃"鏌ョ湅鏇村"鑾峰緱鏇村淇℃伅鐨勫満鏅紝瀹為檯鏁堟灉瑙佹紨绀恒�� + * @tutorial https://www.uviewui.com/components/section.html + * @property {String} title 宸﹁竟涓绘爣棰� + * @property {String} sub-title 鍙宠竟鍓爣棰橈紙榛樿鏇村锛� + * @property {Boolean} right 鏄惁鏄剧ず鍙宠竟鐨勫唴瀹癸紙榛樿true锛� + * @property {Boolean} showLine 鏄惁鏄剧ず宸﹁竟鐨勭珫鏉★紙榛樿true锛� + * @property {Boolean} arrow 鏄惁鏄剧ず鍙宠竟绠ご锛堥粯璁rue锛� + * @property {String Number} font-size 涓绘爣棰樼殑瀛椾綋澶у皬锛堥粯璁�28锛� + * @property {Boolean} bold 涓绘爣棰樻槸鍚﹀姞绮楋紙榛樿true锛� + * @property {String} color 涓绘爣棰橀鑹诧紙榛樿#303133锛� + * @event {Function} click 缁勪欢鍙充晶鐨勫唴瀹硅鐐瑰嚮鏃惰Е鍙戯紝鐢ㄤ簬璺宠浆"鏇村" + * @example <u-section title="浠婃棩鐑棬" :right="false"></u-section> + */ + export default { + name: "u-section", + props: { + // 鏍囬淇℃伅 + title: { + type: String, + default: '' + }, + // 鍙宠竟鍓爣棰樺唴瀹� + subTitle: { + type: String, + default: '鏇村' + }, + // 鏄惁鏄剧ず鍙宠竟鐨勫唴瀹� + right: { + type: Boolean, + default: true + }, + fontSize: { + type: [Number, String], + default: 28 + }, + // 涓绘爣棰樻槸鍚﹀姞绮� + bold: { + type: Boolean, + default: true + }, + // 涓绘爣棰樼殑棰滆壊 + color: { + type: String, + default: '#303133' + }, + // 鍙宠竟鍓爣棰樼殑棰滆壊 + subColor: { + type: String, + default: '#909399' + }, + // 鏄惁鏄剧ず宸﹁竟鐨勭珫鏉� + showLine: { + type: Boolean, + default: true + }, + // 宸﹁竟绔栫嚎鐨勯鑹� + lineColor: { + type: String, + default: '' + }, + // 鏄惁鏄剧ず鍙宠竟绠ご + arrow: { + type: Boolean, + default: true + }, + }, + computed: { + // 宸﹁竟绔栨潯鐨勬牱寮� + lineStyle() { + // 鐢变簬瀹夊崜鍜宨OS鐨勶紝闇�瑕佺◢寰皟鏁寸粷瀵瑰畾浣嶇殑top鍊硷紝鎵嶈兘璁╁乏杈圭殑绔栫嚎鍜屽彸杈圭殑鏂囧瓧鍨傜洿灞呬腑 + return { + // 鐢变簬绔栫嚎涓哄瓧浣撳浘鏍囷紝鍏锋湁姣斿疄闄呯嚎瀹芥洿瀹界殑瀹藉害锛屾墍浠ヤ篃闇�瑕佹牴鎹瓧浣撴墦涓嬪姩鎬佽皟鏁� + left: -(Number(this.fontSize) * 0.9) + 'rpx', + top: -(Number(this.fontSize) * (this.$u.os() == 'ios' ? 0.14 : 0.15)) + 'rpx', + } + } + }, + methods: { + rightClick() { + this.$emit('click'); + } + } + } +</script> + +<style lang="scss" scoped> + @import "../../libs/css/style.components.scss"; + + .u-section { + @include vue-flex; + justify-content: space-between; + align-items: center; + width: 100%; + + &__title { + position: relative; + font-size: 28rpx; + padding-left: 20rpx; + @include vue-flex; + align-items: center; + + &__icon-wrap { + position: absolute; + } + + &__text { + line-height: 1; + } + } + + &__right-info { + color: $u-tips-color; + font-size: 26rpx; + @include vue-flex; + align-items: center; + + &__icon-arrow { + margin-left: 6rpx; + } + } + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-select/u-select.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-select/u-select.vue" new file mode 100644 index 0000000..1285845 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-select/u-select.vue" @@ -0,0 +1,417 @@ +<template> + <view class="u-select"> + <!-- <view class="u-select__action" :class="{ + 'u-select--border': border + }" @tap.stop="selectHandler"> + <view class="u-select__action__icon" :class="{ + 'u-select__action__icon--reverse': value == true + }"> + <u-icon name="arrow-down-fill" size="26" color="#c0c4cc"></u-icon> + </view> + </view> --> + <u-popup :maskCloseAble="maskCloseAble" mode="bottom" :popup="false" v-model="value" length="auto" :safeAreaInsetBottom="safeAreaInsetBottom" @close="close" :z-index="uZIndex"> + <view class="u-select"> + <view class="u-select__header" @touchmove.stop.prevent=""> + <view + class="u-select__header__cancel u-select__header__btn" + :style="{ color: cancelColor }" + hover-class="u-hover-class" + :hover-stay-time="150" + @tap="getResult('cancel')" + > + {{cancelText}} + </view> + <view class="u-select__header__title"> + {{title}} + </view> + <view + class="u-select__header__confirm u-select__header__btn" + :style="{ color: moving ? cancelColor : confirmColor }" + hover-class="u-hover-class" + :hover-stay-time="150" + @touchmove.stop="" + @tap.stop="getResult('confirm')" + > + {{confirmText}} + </view> + </view> + <view class="u-select__body"> + <picker-view @change="columnChange" class="u-select__body__picker-view" :value="defaultSelector" @pickstart="pickstart" @pickend="pickend"> + <picker-view-column v-for="(item, index) in columnData" :key="index"> + <view class="u-select__body__picker-view__item" v-for="(item1, index1) in item" :key="index1"> + <view class="u-line-1">{{ item1[labelName] }}</view> + </view> + </picker-view-column> + </picker-view> + </view> + </view> + </u-popup> + </view> +</template> + +<script> + /** + * select 鍒楅�夋嫨鍣� + * @description 姝ら�夋嫨鍣ㄧ敤浜庡崟鍒楋紝澶氬垪锛屽鍒楄仈鍔ㄧ殑閫夋嫨鍦烘櫙銆�(浠�1.3.0鐗堟湰璧凤紝涓嶅缓璁娇鐢≒icker缁勪欢鐨勫崟鍒楀拰澶氬垪妯″紡锛孲elect缁勪欢鏄笓闂ㄤ负鍒楅�夋嫨鑰屾瀯閫犵殑缁勪欢锛屾洿绠�鍗曟槗鐢ㄣ��) + * @tutorial http://uviewui.com/components/select.html + * @property {String} mode 妯″紡閫夋嫨锛�"single-column"-鍗曞垪妯″紡锛�"mutil-column"-澶氬垪妯″紡锛�"mutil-column-auto"-澶氬垪鑱斿姩妯″紡 + * @property {Array} list 鍒楁暟鎹紝鏁扮粍褰㈠紡锛岃瀹樼綉璇存槑 + * @property {Boolean} v-model 甯冨皵鍊煎彉閲忥紝鐢ㄤ簬鎺у埗閫夋嫨鍣ㄧ殑寮瑰嚭涓庢敹璧� + * @property {Boolean} safe-area-inset-bottom 鏄惁寮�鍚簳閮ㄥ畨鍏ㄥ尯閫傞厤(榛樿false) + * @property {String} cancel-color 鍙栨秷鎸夐挳鐨勯鑹诧紙榛樿#606266锛� + * @property {String} confirm-color 纭鎸夐挳鐨勯鑹�(榛樿#2979ff) + * @property {String} confirm-text 纭鎸夐挳鐨勬枃瀛� + * @property {String} cancel-text 鍙栨秷鎸夐挳鐨勬枃瀛� + * @property {String} default-value 鎻愪緵鐨勯粯璁ら�変腑鐨勪笅鏍囷紝瑙佸畼缃戣鏄� + * @property {Boolean} mask-close-able 鏄惁鍏佽閫氳繃鐐瑰嚮閬僵鍏抽棴Picker(榛樿true) + * @property {String Number} z-index 寮瑰嚭鏃剁殑z-index鍊�(榛樿10075) + * @property {String} value-name 鑷畾涔塴ist鏁版嵁鐨剉alue灞炴�у悕 1.3.6 + * @property {String} label-name 鑷畾涔塴ist鏁版嵁鐨刲abel灞炴�у悕 1.3.6 + * @property {String} child-name 鑷畾涔塴ist鏁版嵁鐨刢hildren灞炴�у悕锛屽彧瀵瑰鍒楄仈鍔ㄦā寮忔湁鏁� 1.3.7 + * @event {Function} confirm 鐐瑰嚮纭畾鎸夐挳锛岃繑鍥炲綋鍓嶉�夋嫨鐨勫�� + * @example <u-select v-model="show" :list="list"></u-select> + */ + +export default { + props: { + // 鍒楁暟鎹� + list: { + type: Array, + default() { + return []; + } + }, + // 鏄惁鏄剧ず杈规 + border: { + type: Boolean, + default: true + }, + // 閫氳繃鍙屽悜缁戝畾鎺у埗缁勪欢鐨勫脊鍑轰笌鏀惰捣 + value: { + type: Boolean, + default: false + }, + // "鍙栨秷"鎸夐挳鐨勯鑹� + cancelColor: { + type: String, + default: '#606266' + }, + // "纭畾"鎸夐挳鐨勯鑹� + confirmColor: { + type: String, + default: '#2979ff' + }, + // 寮瑰嚭鐨剒-index鍊� + zIndex: { + type: [String, Number], + default: 0 + }, + safeAreaInsetBottom: { + type: Boolean, + default: false + }, + // 鏄惁鍏佽閫氳繃鐐瑰嚮閬僵鍏抽棴Picker + maskCloseAble: { + type: Boolean, + default: true + }, + // 鎻愪緵鐨勯粯璁ら�変腑鐨勪笅鏍� + defaultValue: { + type: Array, + default() { + return [0]; + } + }, + // 妯″紡閫夋嫨锛宻ingle-column-鍗曞垪锛宮util-column-澶氬垪锛宮util-column-auto-澶氬垪鑱斿姩 + mode: { + type: String, + default: 'single-column' + }, + // 鑷畾涔塿alue灞炴�у悕 + valueName: { + type: String, + default: 'value' + }, + // 鑷畾涔塴abel灞炴�у悕 + labelName: { + type: String, + default: 'label' + }, + // 鑷畾涔夊鍒楄仈鍔ㄦā寮忕殑children灞炴�у悕 + childName: { + type: String, + default: 'children' + }, + // 椤堕儴鏍囬 + title: { + type: String, + default: '' + }, + // 鍙栨秷鎸夐挳鐨勬枃瀛� + cancelText: { + type: String, + default: '鍙栨秷' + }, + // 纭鎸夐挳鐨勬枃瀛� + confirmText: { + type: String, + default: '纭' + } + }, + data() { + return { + // 鐢ㄤ簬鍒楁敼鍙樻椂锛屼繚瀛樺綋鍓嶇殑绱㈠紩锛屼笅涓�娆″彉鍖栨椂姣旇緝寰楀嚭鏄摢涓�鍒楀彂鐢熶簡鍙樺寲 + defaultSelector: [0], + // picker-view鐨勬暟鎹� + columnData: [], + // 姣忔闃熷垪鍙戠敓鍙樺寲鏃讹紝淇濆瓨閫夋嫨鐨勭粨鏋� + selectValue: [], + // 涓婁竴娆″垪鍙樺寲鏃剁殑index + lastSelectIndex: [], + // 鍒楁暟 + columnNum: 0, + // 鍒楁槸鍚﹁繕鍦ㄦ粦鍔ㄤ腑锛屽井淇″皬绋嬪簭濡傛灉鍦ㄦ粦鍔ㄤ腑灏辩偣纭畾锛岀粨鏋滃彲鑳戒笉鍑嗙‘ + moving: false + }; + }, + watch: { + // 鍦╯elect寮硅捣鐨勬椂鍊欙紝閲嶆柊鍒濆鍖栨墍鏈夋暟鎹� + value: { + immediate: true, + handler(val) { + if(val) setTimeout(() => this.init(), 10); + } + }, + }, + computed: { + uZIndex() { + // 濡傛灉鐢ㄦ埛鏈変紶閫抸-index鍊硷紝浼樺厛浣跨敤 + return this.zIndex ? this.zIndex : this.$u.zIndex.popup; + }, + }, + methods: { + // 鏍囪瘑婊戝姩寮�濮嬶紝鍙湁寰俊灏忕▼搴忔墠鏈夎繖鏍风殑浜嬩欢 + pickstart() { + // #ifdef MP-WEIXIN + this.moving = true; + // #endif + }, + // 鏍囪瘑婊戝姩缁撴潫 + pickend() { + // #ifdef MP-WEIXIN + this.moving = false; + // #endif + }, + init() { + this.setColumnNum(); + this.setDefaultSelector(); + this.setColumnData(); + this.setSelectValue(); + }, + // 鑾峰彇榛樿閫変腑鍒椾笅鏍� + setDefaultSelector() { + // 濡傛灉娌℃湁浼犲叆榛樿閫変腑鐨勫�硷紝鐢熸垚闀垮害涓篶olumnNum锛岀敤0濉厖鐨勬暟缁� + this.defaultSelector = this.defaultValue.length == this.columnNum ? this.defaultValue : Array(this.columnNum).fill(0); + this.lastSelectIndex = this.$u.deepClone(this.defaultSelector); + }, + // 璁$畻鍒楁暟 + setColumnNum() { + // 鍗曞垪鐨勫垪鏁颁负1 + if(this.mode == 'single-column') this.columnNum = 1; + // 澶氬垪鏃讹紝this.list鏁扮粍闀垮害灏辨槸鍒楁暟 + else if(this.mode == 'mutil-column') this.columnNum = this.list.length; + // 澶氬垪鑱斿姩鏃讹紝閫氳繃鍘嗛亶this.list鐨勭涓�涓厓绱狅紝寰楀嚭鏈夊灏戝垪 + else if(this.mode == 'mutil-column-auto') { + let num = 1; + let column = this.list; + // 鍙鏈夊厓绱犲苟涓旂涓�涓厓绱犳湁children灞炴�э紝缁х画鍘嗛亶 + while(column[0][this.childName]) { + column = column[0] ? column[0][this.childName] : {}; + num ++; + } + this.columnNum = num; + } + }, + // 鑾峰彇闇�瑕佸睍绀哄湪picker涓殑鍒楁暟鎹� + setColumnData() { + let data = []; + this.selectValue = []; + if(this.mode == 'mutil-column-auto') { + // 鑾峰緱鎵�鏈夋暟鎹腑鐨勭涓�涓厓绱� + let column = this.list[this.defaultSelector.length ? this.defaultSelector[0] : 0]; + // 閫氳繃寰幆鎵�鏈夌殑鍒楁暟锛屽啀鏍规嵁璁惧畾鍒楃殑鏁扮粍锛屽緱鍑哄綋鍓嶉渶瑕佹覆鏌撶殑鏁翠釜鍒楁暟缁� + for (let i = 0; i < this.columnNum; i++) { + // 绗竴鍒楅粯璁や负鏁翠釜list鏁扮粍 + if (i == 0) { + data[i] = this.list; + column = column[this.childName]; + } else { + // 澶т簬绗竴鍒楁椂锛屽垽鏂槸鍚︽湁榛樿閫変腑鐨勶紝濡傛灉娌℃湁灏辩敤璇ュ垪鐨勭涓�椤� + data[i] = column; + column = column[this.defaultSelector[i]][this.childName]; + } + } + } else if(this.mode == 'single-column') { + data[0] = this.list; + } else { + data = this.list; + } + this.columnData = data; + }, + // 鑾峰彇榛樿閫変腑鐨勫�硷紝濡傛灉娌℃湁璁剧疆defaultValue锛屽氨榛樿閫変腑姣忓垪鐨勭涓�涓� + setSelectValue() { + let tmp = null; + for(let i = 0; i < this.columnNum; i++) { + tmp = this.columnData[i][this.defaultSelector[i]]; + let data = { + value: tmp ? tmp[this.valueName] : null, + label: tmp ? tmp[this.labelName] : null + }; + // 鍒ゆ柇鏄惁瀛樺湪棰濆鐨勫弬鏁帮紝濡傛灉瀛樺湪锛屽氨杩斿洖 + if(tmp && tmp.extra) data.extra = tmp.extra; + this.selectValue.push(data) + } + }, + // 鍒楅�夐」 + columnChange(e) { + let index = null; + let columnIndex = e.detail.value; + // 鐢变簬鍚庨潰鏄渶瑕乸ush杩涙暟缁勭殑锛屾墍浠ラ渶瑕佸厛娓呯┖鏁扮粍 + this.selectValue = []; + if(this.mode == 'mutil-column-auto') { + // 瀵规瘮鍓嶅悗涓や釜鏁扮粍锛屽鎵惧彉鏇寸殑鏄摢涓�鍒楋紝濡傛灉鏌愪竴涓厓绱犱笉鍚岋紝鍗冲彲鍒ゅ畾璇ュ垪鍙戠敓浜嗗彉鍖� + this.lastSelectIndex.map((val, idx) => { + if (val != columnIndex[idx]) index = idx; + }); + this.defaultSelector = columnIndex; + for (let i = index + 1; i < this.columnNum; i++) { + // 褰撳墠鍙樺寲鍒楃殑涓嬩竴鍒楃殑鏁版嵁锛岄渶瑕佽幏鍙栦笂涓�鍒楃殑鏁版嵁锛屽悓鏃堕渶瑕佹寚瀹氭槸涓婁竴鍒楃殑绗嚑涓殑children锛屽啀寰�鍚庣殑 + // 榛樿鏄槦鍒楃殑绗竴涓负榛樿閫夐」 + this.columnData[i] = this.columnData[i - 1][i - 1 == index ? columnIndex[index] : 0][this.childName]; + // 鏀瑰彉鐨勫垪涔嬪悗鐨勬墍鏈夊垪锛岄粯璁ら�変腑绗竴涓� + this.defaultSelector[i] = 0; + } + // 鍦ㄥ巻閬嶇殑杩囩▼涓紝鍙兘鐢变簬涓婁竴姝ヤ慨鏀箃his.columnData锛屽鑷翠骇鐢熻繛閿佸弽搴旓紝绋嬪簭瑙﹀彂columnChange锛屼細鏈夊娆¤皟鐢� + // 鍙湁鍦ㄦ渶鍚庝竴娆℃暟鎹ǔ瀹氬悗鐨勭粨鏋滄槸姝g‘鐨勶紝姝ゅ墠鐨勫巻閬嶄腑锛屽彲鑳戒細浜х敓undefined锛屾晠闇�瑕佸垽鏂� + columnIndex.map((item, index) => { + let data = this.columnData[index][columnIndex[index]]; + let tmp = { + value: data ? data[this.valueName] : null, + label: data ? data[this.labelName] : null, + }; + // 鍒ゆ柇鏄惁鏈夐渶瑕侀澶栨惡甯︾殑鍙傛暟 + if(data && data.extra !== undefined) tmp.extra = data.extra; + this.selectValue.push(tmp); + + }) + // 淇濆瓨杩欎竴娆$殑缁撴灉锛岀敤浜庝笅娆″垪鍙戠敓鍙樺寲鏃朵綔姣旇緝 + this.lastSelectIndex = columnIndex; + } else if(this.mode == 'single-column') { + let data = this.columnData[0][columnIndex[0]]; + // 鍒濆榛樿閫変腑鍊� + let tmp = { + value: data ? data[this.valueName] : null, + label: data ? data[this.labelName] : null, + }; + // 鍒ゆ柇鏄惁鏈夐渶瑕侀澶栨惡甯︾殑鍙傛暟 + if(data && data.extra !== undefined) tmp.extra = data.extra; + this.selectValue.push(tmp); + } else if(this.mode == 'mutil-column') { + // 鍒濆榛樿閫変腑鍊� + columnIndex.map((item, index) => { + let data = this.columnData[index][columnIndex[index]]; + // 鍒濆榛樿閫変腑鍊� + let tmp = { + value: data ? data[this.valueName] : null, + label: data ? data[this.labelName] : null, + }; + // 鍒ゆ柇鏄惁鏈夐渶瑕侀澶栨惡甯︾殑鍙傛暟 + if(data && data.extra !== undefined) tmp.extra = data.extra; + this.selectValue.push(tmp); + }) + } + }, + close() { + this.$emit('input', false); + }, + // 鐐瑰嚮纭畾鎴栬�呭彇娑� + getResult(event = null) { + // #ifdef MP-WEIXIN + if (this.moving) return; + // #endif + if (event) this.$emit(event, this.selectValue); + this.close(); + }, + selectHandler() { + this.$emit('click'); + } + } +}; +</script> + +<style scoped lang="scss"> +@import "../../libs/css/style.components.scss"; + +.u-select { + + &__action { + position: relative; + line-height: $u-form-item-height; + height: $u-form-item-height; + + &__icon { + position: absolute; + right: 20rpx; + top: 50%; + transition: transform .4s; + transform: translateY(-50%); + z-index: 1; + + &--reverse { + transform: rotate(-180deg) translateY(50%); + } + } + } + + &__hader { + &__title { + color: $u-content-color; + } + } + + &--border { + border-radius: 6rpx; + border-radius: 4px; + border: 1px solid $u-form-item-border-color; + } + + &__header { + @include vue-flex; + align-items: center; + justify-content: space-between; + height: 80rpx; + padding: 0 40rpx; + } + + &__body { + width: 100%; + height: 500rpx; + overflow: hidden; + background-color: #fff; + + &__picker-view { + height: 100%; + box-sizing: border-box; + + &__item { + @include vue-flex; + align-items: center; + justify-content: center; + font-size: 32rpx; + color: $u-main-color; + padding: 0 8rpx; + } + } + } +} +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-skeleton/u-skeleton.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-skeleton/u-skeleton.vue" new file mode 100644 index 0000000..c8cb19e --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-skeleton/u-skeleton.vue" @@ -0,0 +1,199 @@ +<template> + <view v-if="loading" :style="{ + width: windowWinth + 'px', + height: windowHeight + 'px', + backgroundColor: bgColor, + position: 'absolute', + left: left + 'px', + top: top + 'px', + zIndex: 9998, + overflow: 'hidden' + }" + @touchmove.stop.prevent> + <view v-for="(item, index) in RectNodes" :key="$u.guid()" :class="[animation ? 'skeleton-fade' : '']" :style="{ + width: item.width + 'px', + height: item.height + 'px', + backgroundColor: elColor, + position: 'absolute', + left: (item.left - left) + 'px', + top: (item.top - top) + 'px' + }"></view> + <view v-for="(item, index) in circleNodes" :key="$u.guid()" :class="animation ? 'skeleton-fade' : ''" :style="{ + width: item.width + 'px', + height: item.height + 'px', + backgroundColor: elColor, + borderRadius: item.width/2 + 'px', + position: 'absolute', + left: (item.left - left) + 'px', + top: (item.top - top) + 'px' + }"></view> + <view v-for="(item, index) in filletNodes" :key="$u.guid()" :class="animation ? 'skeleton-fade' : ''" :style="{ + width: item.width + 'px', + height: item.height + 'px', + backgroundColor: elColor, + borderRadius: borderRadius + 'rpx', + position: 'absolute', + left: (item.left - left) + 'px', + top: (item.top - top) + 'px' + }"></view> + </view> +</template> + +<script> + /** + * skeleton 楠ㄦ灦灞� + * @description 楠ㄦ灦灞忎竴鑸敤浜庨〉闈㈠湪璇锋眰杩滅▼鏁版嵁灏氭湭瀹屾垚鏃讹紝椤甸潰鐢ㄧ伆鑹插潡棰勬樉绀烘湰鏉ョ殑椤甸潰缁撴瀯锛岀粰鐢ㄦ埛鏇村ソ鐨勪綋楠屻�� + * @tutorial https://www.uviewui.com/components/skeleton.html + * @property {String} el-color 楠ㄦ灦鍧楃姸鍏冪礌鐨勮儗鏅鑹诧紙榛樿#e5e5e5锛� + * @property {String} bg-color 楠ㄦ灦缁勪欢鑳屾櫙棰滆壊锛堥粯璁�#ffffff锛� + * @property {Boolean} animation 楠ㄦ灦鍧楁槸鍚︽樉绀哄姩鐢绘晥鏋滐紙榛樿false锛� + * @property {String Number} border-radius u-skeleton-fillet绫诲悕鍏冪礌锛屽搴旂殑楠ㄦ灦鍧楃殑鍦嗚澶у皬锛屽崟浣峳px锛堥粯璁�10锛� + * @property {Boolean} loading 鏄惁鏄剧ず楠ㄦ灦缁勪欢锛岃姹傚畬鎴愬悗锛屽皢姝ゅ�艰缃负false锛堥粯璁rue锛� + * @example <u-skeleton :loading="true" :animation="true"></u-skeleton> + */ + export default { + name: "u-skeleton", + props: { + // 闇�瑕佹覆鏌撶殑鍏冪礌鑳屾櫙棰滆壊锛屽崄鍏繘鍒舵垨鑰卹gb绛夐兘鍙互 + elColor: { + type: String, + default: '#e5e5e5' + }, + // 鏁翠釜楠ㄦ灦灞忛〉闈㈢殑鑳屾櫙棰滆壊 + bgColor: { + type: String, + default: '#ffffff' + }, + // 鏄惁鏄剧ず鍔犺浇鍔ㄧ敾 + animation: { + type: Boolean, + default: false + }, + // 鍦嗚鍊硷紝鍙绫诲悕涓簎-skeleton-fillet鐨勫厓绱犵敓鏁堬紝涓烘暟鍊硷紝涓嶅甫鍗曚綅 + borderRadius: { + type: [String, Number], + default: "10" + }, + // 鏄惁鏄剧ず楠ㄦ灦锛宼rue-鏄剧ず锛宖alse-闅愯棌 + loading: { + type: Boolean, + default: true + } + }, + data() { + return { + windowWinth: 750, // 楠ㄦ灦灞忓搴� + windowHeight: 1500, // 楠ㄦ灦灞忛珮搴� + filletNodes: [], // 鍦嗚鍏冪礌 + circleNodes: [], // 鍦嗗舰鍏冪礌 + RectNodes: [], // 鐭╁舰鍏冪礌 + top: 0, + left: 0, + } + }, + methods: { + // 鏌ヨ鍚勮妭鐐圭殑淇℃伅 + selecterQueryInfo() { + // 鑾峰彇鏁翠釜鐖剁粍浠跺鍣ㄧ殑楂樺害锛屽綋鍋氶鏋跺睆鐨勯珮搴� + // 鍦ㄥ井淇″皬绋嬪簭涓紝濡傛灉鎶婇鏋跺睆鏀惧叆缁勪欢涓娇鐢ㄧ殑璇濓紝闇�瑕佽皟in(this)涓婁笅鏂囦负鐖剁粍浠舵墠鏈夋晥 + let query = ''; + // #ifdef MP-WEIXIN + query = uni.createSelectorQuery().in(this.$parent); + // #endif + // #ifndef MP-WEIXIN + query = uni.createSelectorQuery() + // #endif + query.selectAll('.u-skeleton').boundingClientRect().exec((res) => { + this.windowHeight = res[0][0].height; + this.windowWinth = res[0][0].width; + this.top = res[0][0].bottom - res[0][0].height; + this.left = res[0][0].left; + }); + // 鐭╁舰楠ㄦ灦鍏冪礌 + this.getRectEls(); + // 鍦嗗舰楠ㄦ灦鍏冪礌 + this.getCircleEls(); + // 鍦嗚楠ㄦ灦鍏冪礌 + this.getFilletEls(); + }, + // 鐭╁舰鍏冪礌鍒楄〃 + getRectEls() { + let query = ''; + // 鍦ㄥ井淇″皬绋嬪簭涓紝濡傛灉鎶婇鏋跺睆鏀惧叆缁勪欢涓娇鐢ㄧ殑璇濓紝闇�瑕佽皟in(this)涓婁笅鏂囦负鐖剁粍浠舵墠鏈夋晥 + // #ifdef MP-WEIXIN + query = uni.createSelectorQuery().in(this.$parent); + // #endif + // #ifndef MP-WEIXIN + query = uni.createSelectorQuery() + // #endif + query.selectAll('.u-skeleton-rect').boundingClientRect().exec((res) => { + this.RectNodes = res[0]; + }); + }, + // 鍦嗚鍏冪礌鍒楄〃 + getFilletEls() { + let query = ''; + // 鍦ㄥ井淇″皬绋嬪簭涓紝濡傛灉鎶婇鏋跺睆鏀惧叆缁勪欢涓娇鐢ㄧ殑璇濓紝闇�瑕佽皟in(this)涓婁笅鏂囦负鐖剁粍浠舵墠鏈夋晥 + // #ifdef MP-WEIXIN + query = uni.createSelectorQuery().in(this.$parent); + // #endif + // #ifndef MP-WEIXIN + query = uni.createSelectorQuery() + // #endif + query.selectAll('.u-skeleton-fillet').boundingClientRect().exec((res) => { + this.filletNodes = res[0]; + }); + }, + // 鍦嗗舰鍏冪礌鍒楄〃 + getCircleEls() { + let query = ''; + // 鍦ㄥ井淇″皬绋嬪簭涓紝濡傛灉鎶婇鏋跺睆鏀惧叆缁勪欢涓娇鐢ㄧ殑璇濓紝闇�瑕佽皟in(this)涓婁笅鏂囦负鐖剁粍浠舵墠鏈夋晥 + // #ifdef MP-WEIXIN + query = uni.createSelectorQuery().in(this.$parent); + // #endif + // #ifndef MP-WEIXIN + query = uni.createSelectorQuery() + // #endif + query.selectAll('.u-skeleton-circle').boundingClientRect().exec((res) => { + this.circleNodes = res[0]; + }); + } + }, + // 缁勪欢琚寕杞� + mounted() { + // 鑾峰彇绯荤粺淇℃伅 + let systemInfo = uni.getSystemInfoSync(); + this.windowHeight = systemInfo.windowHeight; + this.windowWinth = systemInfo.windowWidth; + this.selecterQueryInfo(); + } + } +</script> + +<style lang="scss" scoped> + @import "../../libs/css/style.components.scss"; + + .skeleton-fade { + width: 100%; + height: 100%; + background: rgb(194, 207, 214); + animation-duration: 1.5s; + animation-name: blink; + animation-timing-function: ease-in-out; + animation-iteration-count: infinite; + } + + @keyframes blink { + 0% { + opacity: 1; + } + + 50% { + opacity: 0.4; + } + + 100% { + opacity: 1; + } + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-slider/u-slider.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-slider/u-slider.vue" new file mode 100644 index 0000000..6d21b92 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-slider/u-slider.vue" @@ -0,0 +1,257 @@ +<template> + <view class="u-slider" @tap="onClick" :class="[disabled ? 'u-slider--disabled' : '']" :style="{ + backgroundColor: inactiveColor + }"> + <view + class="u-slider__gap" + :style="[ + barStyle, + { + height: height + 'rpx', + backgroundColor: activeColor + } + ]" + > + <view class="u-slider__button-wrap" @touchstart="onTouchStart" + @touchmove="onTouchMove" @touchend="onTouchEnd" + @touchcancel="onTouchEnd"> + <slot v-if="$slots.default || $slots.$default"/> + <view v-else class="u-slider__button" :style="[blockStyle, { + height: blockWidth + 'rpx', + width: blockWidth + 'rpx', + backgroundColor: blockColor + }]"></view> + </view> + </view> + </view> +</template> + +<script> +/** + * slider 婊戝潡閫夋嫨鍣� + * @tutorial https://uviewui.com/components/slider.html + * @property {Number | String} value 婊戝潡榛樿鍊硷紙榛樿0锛� + * @property {Number | String} min 鏈�灏忓�硷紙榛樿0锛� + * @property {Number | String} max 鏈�澶у�硷紙榛樿100锛� + * @property {Number | String} step 姝ラ暱锛堥粯璁�1锛� + * @property {Number | String} blockWidth 婊戝潡瀹藉害锛岄珮绛変簬瀹斤紙30锛� + * @property {Number | String} height 婊戝潡鏉¢珮搴︼紝鍗曚綅rpx锛堥粯璁�6锛� + * @property {String} inactiveColor 搴曢儴鏉¤儗鏅鑹诧紙榛樿#c0c4cc锛� + * @property {String} activeColor 搴曢儴閫夋嫨閮ㄥ垎鐨勮儗鏅鑹诧紙榛樿#2979ff锛� + * @property {String} blockColor 婊戝潡棰滆壊锛堥粯璁�#ffffff锛� + * @property {Object} blockStyle 缁欐粦鍧楄嚜瀹氫箟鏍峰紡锛屽璞″舰寮� + * @property {Boolean} disabled 鏄惁绂佺敤婊戝潡(榛樿涓篺alse) + * @event {Function} start 婊戝姩瑙﹀彂 + * @event {Function} moving 姝e湪婊戝姩涓� + * @event {Function} end 婊戝姩缁撴潫 + * @example <u-slider v-model="value" /> + */ +export default { + name: 'u-slider', + props: { + // 褰撳墠杩涘害鐧惧垎姣斿�硷紝鑼冨洿0-100 + value: { + type: [Number, String], + default: 0 + }, + // 鏄惁绂佺敤婊戝潡 + disabled: { + type: Boolean, + default: false + }, + // 婊戝潡瀹藉害锛岄珮绛変簬瀹斤紝鍗曚綅rpx + blockWidth: { + type: [Number, String], + default: 30 + }, + // 鏈�灏忓�� + min: { + type: [Number, String], + default: 0 + }, + // 鏈�澶у�� + max: { + type: [Number, String], + default: 100 + }, + // 姝ヨ繘鍊� + step: { + type: [Number, String], + default: 1 + }, + // 婊戝潡鏉¢珮搴︼紝鍗曚綅rpx + height: { + type: [Number, String], + default: 6 + }, + // 杩涘害鏉$殑婵�娲婚儴鍒嗛鑹� + activeColor: { + type: String, + default: '#2979ff' + }, + // 杩涘害鏉$殑鑳屾櫙棰滆壊 + inactiveColor: { + type: String, + default: '#c0c4cc' + }, + // 婊戝潡鐨勮儗鏅鑹� + blockColor: { + type: String, + default: '#ffffff' + }, + // 鐢ㄦ埛瀵规粦鍧楃殑鑷畾涔夐鑹� + blockStyle: { + type: Object, + default() { + return {}; + } + }, + }, + data() { + return { + startX: 0, + status: 'end', + newValue: 0, + distanceX: 0, + startValue: 0, + barStyle: {}, + sliderRect: { + left: 0, + width: 0 + } + }; + }, + watch: { + value(n) { + // 鍙湁鍦ㄩ潪婊戝姩鐘舵�佹椂锛屾墠鍙互閫氳繃value鏇存柊婊戝潡鍊硷紝杩欓噷鐩戝惉锛屾槸涓轰簡璁╃敤鎴疯Е鍙� + if(this.status == 'end') this.updateValue(this.value, false); + } + }, + created() { + this.updateValue(this.value, false); + }, + mounted() { + // 鑾峰彇婊戝潡鏉$殑灏哄淇℃伅 + this.$uGetRect('.u-slider').then(rect => { + this.sliderRect = rect; + }); + }, + methods: { + onTouchStart(event) { + if (this.disabled) return; + this.startX = 0; + // 瑙︽懜鐐归泦 + let touches = event.touches[0]; + // 瑙︽懜鐐瑰埌灞忓箷宸﹁竟鐨勮窛绂� + this.startX = touches.clientX; + // 姝ゅ鐨則his.value铏戒负props鍊硷紝浣嗘槸閫氳繃$emit('input')杩涜浜嗕慨鏀� + this.startValue = this.format(this.value); + // 鏍囩ず褰撳墠鐨勭姸鎬佷负寮�濮嬭Е鎽告粦鍔� + this.status = 'start'; + }, + onTouchMove(event) { + if (this.disabled) return; + // 杩炵画瑙︽懜鐨勮繃绋嬩細涓�鐩磋Е鍙戞湰鏂规硶锛屼絾鍙湁鎵嬫寚瑙﹀彂涓旂Щ鍔ㄤ簡鎵嶈璁や负鏄嫋鍔ㄤ簡锛屾墠鍙戝嚭浜嬩欢 + // 瑙︽懜鍚庣涓�娆$Щ鍔ㄥ凡缁忓皢status璁剧疆涓簃oving鐘舵�侊紝鏁呰Е鎽哥浜屾绉诲姩涓嶄細瑙﹀彂鏈簨浠� + if (this.status == 'start') this.$emit('start'); + let touches = event.touches[0]; + // 婊戝潡鐨勫乏杈逛笉涓�瀹氳窡灞忓箷宸﹁竟鎺ュ¥锛屾墍浠ラ渶瑕佸噺鍘绘渶澶栧眰鐖跺厓绱犵殑宸﹁竟鍊� + this.distanceX = touches.clientX - this.sliderRect.left; + // 鑾峰緱绉诲姩璺濈瀵规暣涓粦鍧楃殑鐧惧垎姣斿�硷紝姝や负甯︽湁澶氫綅灏忔暟鐨勫�硷紝涓嶈兘鐢ㄦ鏇存柊瑙嗗浘 + // 鍚﹀垯閫犳垚閫氫俊闃诲锛岄渶瑕佹瘡鏀瑰彉涓�涓猻tep鍊兼椂淇敼涓�娆¤鍥� + this.newValue = (this.distanceX / this.sliderRect.width) * 100; + this.status = 'moving'; + // 鍙戝嚭moving浜嬩欢 + this.$emit('moving'); + this.updateValue(this.newValue, true); + }, + onTouchEnd() { + if (this.disabled) return; + if (this.status === 'moving') { + this.updateValue(this.newValue, false); + this.$emit('end'); + } + this.status = 'end'; + }, + updateValue(value, drag) { + // 鍘绘帀灏忔暟閮ㄥ垎锛屽悓鏃朵篃鏄step姝ヨ繘鐨勫鐞� + const width = this.format(value); + // 涓嶅厑璁告粦鍔ㄧ殑鍊艰秴杩噈ax鏈�澶у�硷紝鐧惧垎姣斾篃涓嶈兘瓒呰繃100 + if(width > this.max || width > 100) return; + // 璁剧疆绉诲姩鐨勭櫨鍒嗘瘮鍊� + let barStyle = { + width: width + '%' + }; + // 绉诲姩鏈熼棿鏃犻渶杩囨浮鍔ㄧ敾 + if (drag == true) { + barStyle.transition = 'none'; + } else { + // 闈炵Щ鍔ㄦ湡闂达紝鍒犳帀瀵硅繃娓′负绌虹殑澹版槑锛岃css涓殑澹版槑璧锋晥 + delete barStyle.transition; + } + // 淇敼value鍊� + this.$emit('input', width); + this.barStyle = barStyle; + }, + format(value) { + // 灏嗗皬鏁板彉鎴愭暣鏁帮紝涓轰簡鍑忓皯瀵硅鍥剧殑鏇存柊锛岄�犳垚瑙嗗浘灞備笌閫昏緫灞傜殑闃诲 + return Math.round(Math.max(this.min, Math.min(value, this.max)) / this.step) * this.step; + }, + onClick(event) { + if (this.disabled) return; + // 鐩存帴鐐瑰嚮婊戝潡鐨勬儏鍐碉紝璁$畻鏂瑰紡涓巓nTouchMove鏂规硶鐩稿悓 + const value = ((event.detail.x - this.sliderRect.left) / this.sliderRect.width) * 100; + this.updateValue(value, false); + } + } +}; +</script> + +<style lang="scss" scoped> +@import "../../libs/css/style.components.scss"; + +.u-slider { + position: relative; + border-radius: 999px; + border-radius: 999px; + background-color: #ebedf0; +} + +.u-slider:before { + position: absolute; + right: 0; + left: 0; + content: ''; + top: -8px; + bottom: -8px; + z-index: -1; +} + +.u-slider__gap { + position: relative; + border-radius: inherit; + transition: width 0.2s; + transition: width 0.2s; + background-color: #1989fa; +} + +.u-slider__button { + width: 24px; + height: 24px; + border-radius: 50%; + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); + background-color: #fff; + cursor: pointer; +} + +.u-slider__button-wrap { + position: absolute; + top: 50%; + right: 0; + transform: translate3d(50%, -50%, 0); +} + +.u-slider--disabled { + opacity: 0.5; +} +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-steps/u-steps.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-steps/u-steps.vue" new file mode 100644 index 0000000..a72cfcf --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-steps/u-steps.vue" @@ -0,0 +1,200 @@ +<template> + <view class=""> + <view + class="u-steps" + :style="{ + flexDirection: direction + }" + > + <view class="u-steps__item" + :class="['u-steps__item--' + direction]" + v-for="(item, index) in list" :key="index" + > + <view + class="u-steps__item__num" + v-if="mode == 'number'" + :style="{ + backgroundColor: current < index ? 'transparent' : activeColor, + borderColor: current < index ? unActiveColor : activeColor + }" + > + <text v-if="current < index" :style="{ + color: current < index ? unActiveColor : activeColor, + }"> + {{ index + 1 }} + </text> + <u-icon v-else size="22" color="#ffffff" :name="icon"></u-icon> + </view> + <view class="u-steps__item__dot" v-if="mode == 'dot'" :style="{ + backgroundColor: index <= current ? activeColor : unActiveColor + }"></view> + <text class="u-line-1" :style="{ + color: index <= current ? activeColor : unActiveColor, + }" :class="['u-steps__item__text--' + direction]"> + {{ item.name }} + </text> + <view class="u-steps__item__line" :class="['u-steps__item__line--' + mode]" v-if="index < list.length - 1"> + <u-line :direction="direction" length="100%" :hair-line="false" :color="unActiveColor"></u-line> + </view> + </view> + </view> + </view> +</template> + +<script> +/** + * steps 姝ラ鏉� + * @description 璇ョ粍浠朵竴鑸敤浜庡畬鎴愪竴涓换鍔¤鍒嗗嚑涓楠わ紝鏍囪瘑鐩墠澶勪簬绗嚑姝ョ殑鍦烘櫙銆� + * @tutorial https://www.uviewui.com/components/steps.html + * @property {String} mode 璁剧疆妯″紡锛堥粯璁ot锛� + * @property {Array} list 鏁拌酱鏉℃暟鎹紝鏁扮粍銆傚叿浣撹涓婃柟绀轰緥 + * @property {String} type type涓婚锛堥粯璁rimary锛� + * @property {String} direction row-妯悜锛宑olumn-绔栧悜锛堥粯璁ow锛� + * @property {Number String} current 璁剧疆褰撳墠澶勪簬绗嚑姝� + * @property {String} active-color 宸插畬鎴愭楠ょ殑婵�娲婚鑹诧紝濡傝缃紝type鍊间細澶辨晥 + * @property {String} un-active-color 鏈縺娲荤殑棰滆壊锛岀敤浜庤〃绀烘湭瀹屾垚姝ラ鐨勯鑹诧紙榛樿#606266锛� + * @example <u-steps :list="numList" active-color="#fa3534"></u-steps> + */ +export default { + name: 'u-steps', + props: { + // 姝ラ鏉$殑绫诲瀷锛宒ot|number + mode: { + type: String, + default: 'dot' + }, + // 姝ラ鏉$殑鏁版嵁 + list: { + type: Array, + default() { + return []; + } + }, + // 涓婚绫诲瀷, primary|success|info|warning|error + type: { + type: String, + default: 'primary' + }, + // 褰撳墠鍝竴姝ユ槸婵�娲荤殑 + current: { + type: [Number, String], + default: 0 + }, + // 婵�娲绘楠ょ殑棰滆壊 + activeColor: { + type: String, + default: '#2979ff' + }, + // 鏈縺娲荤殑棰滆壊 + unActiveColor: { + type: String, + default: '#909399' + }, + // 鑷畾涔夊浘鏍� + icon: { + type: String, + default: 'checkmark' + }, + // step鐨勬帓鍒楁柟鍚戯紝row-妯悜锛宑olumn-绔栧悜 + direction: { + type: String, + default: 'row' + } + }, + data() { + return {}; + }, +}; +</script> + +<style lang="scss" scoped> +@import '../../libs/css/style.components.scss'; + +$u-steps-item-number-width: 44rpx; +$u-steps-item-dot-width: 20rpx; + +.u-steps { + @include vue-flex; + + .u-steps__item { + flex: 1; + text-align: center; + position: relative; + min-width: 100rpx; + font-size: 26rpx; + color: #8799a3; + @include vue-flex; + justify-content: center; + flex-direction: column; + align-items: center; + + &--row { + @include vue-flex; + flex-direction: column; + + .u-steps__item__line { + position: absolute; + z-index: 0; + left: 75%; + width: 50%; + + &--dot { + top: calc(#{$u-steps-item-dot-width} / 2); + } + + &--number { + top: calc(#{$u-steps-item-number-width} / 2); + } + } + } + + &--column { + @include vue-flex; + flex-direction: row; + justify-content: flex-start; + min-height: 120rpx; + + .u-steps__item__line { + position: absolute; + z-index: 0; + height: 50%; + top: 75%; + + &--dot { + left: calc(#{$u-steps-item-dot-width} / 2); + } + + &--number { + left: calc(#{$u-steps-item-number-width} / 2); + } + } + } + + &__num { + @include vue-flex; + align-items: center; + justify-content: center; + width: $u-steps-item-number-width; + height: $u-steps-item-number-width; + border: 1px solid #8799a3; + border-radius: 50%; + overflow: hidden; + } + + &__dot { + width: $u-steps-item-dot-width; + height: $u-steps-item-dot-width; + @include vue-flex; + border-radius: 50%; + } + + &__text--row { + margin-top: 14rpx; + } + + &__text--column { + margin-left: 14rpx; + } + } +} +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-sticky/u-sticky.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-sticky/u-sticky.vue" new file mode 100644 index 0000000..d9bc34c --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-sticky/u-sticky.vue" @@ -0,0 +1,157 @@ +<template> + <view class=""> + <view class="u-sticky-wrap" :class="[elClass]" :style="{ + height: fixed ? height + 'px' : 'auto', + backgroundColor: bgColor + }"> + <view class="u-sticky" :style="{ + position: fixed ? 'fixed' : 'static', + top: stickyTop + 'px', + left: left + 'px', + width: width == 'auto' ? 'auto' : width + 'px', + zIndex: uZIndex + }"> + <slot></slot> + </view> + </view> + </view> +</template> + +<script> + /** + * sticky 鍚搁《 + * @description 璇ョ粍浠朵笌CSS涓璸osition: sticky灞炴�у疄鐜扮殑鏁堟灉涓�鑷达紝褰撶粍浠惰揪鍒伴璁剧殑鍒伴《閮ㄨ窛绂绘椂锛� 灏变細鍥哄畾鍦ㄦ寚瀹氫綅缃紝缁勪欢浣嶇疆澶т簬棰勮鐨勯《閮ㄨ窛绂绘椂锛屼細閲嶆柊鎸夌収姝e父鐨勫竷灞�鎺掑垪銆� + * @tutorial https://www.uviewui.com/components/sticky.html + * @property {String Number} offset-top 鍚搁《鏃朵笌椤堕儴鐨勮窛绂伙紝鍗曚綅rpx锛堥粯璁�0锛� + * @property {String Number} index 鑷畾涔夋爣璇嗭紝鐢ㄤ簬鍖哄垎鏄摢涓�涓粍浠� + * @property {Boolean} enable 鏄惁寮�鍚惛椤跺姛鑳斤紙榛樿true锛� + * @property {String} bg-color 缁勪欢鑳屾櫙棰滆壊锛堥粯璁�#ffffff锛� + * @property {String Number} z-index 鍚搁《鏃剁殑z-index鍊硷紙榛樿970锛� + * @property {String Number} h5-nav-height 瀵艰埅鏍忛珮搴︼紝鑷畾涔夊鑸爮鏃�(鏃犲鑸爮鏃堕渶璁剧疆涓�0)锛岄渶瑕佷紶鍏ユ鍊硷紝鍗曚綅px锛堥粯璁�44锛� + * @event {Function} fixed 缁勪欢鍚搁《鏃惰Е鍙� + * @event {Function} unfixed 缁勪欢鍙栨秷鍚搁《鏃惰Е鍙� + * @example <u-sticky offset-top="200"><view>濉炰笅绉嬫潵椋庢櫙寮傦紝琛¢槼闆佸幓鏃犵暀鎰�</view></u-sticky> + */ + export default { + name: "u-sticky", + props: { + // 鍚搁《瀹瑰櫒鍒伴《閮ㄦ煇涓窛绂荤殑鏃跺�欙紝杩涜鍚搁《锛屽湪H5骞冲彴锛孨avigationBar涓�44px + offsetTop: { + type: [Number, String], + default: 0 + }, + //鍒楄〃涓殑绱㈠紩鍊� + index: { + type: [Number, String], + default: '' + }, + // 鏄惁寮�鍚惛椤跺姛鑳� + enable: { + type: Boolean, + default: true + }, + // h5椤堕儴瀵艰埅鏍忕殑楂樺害 + h5NavHeight: { + type: [Number, String], + default: 44 + }, + // 鍚搁《鍖哄煙鐨勮儗鏅鑹� + bgColor: { + type: String, + default: '#ffffff' + }, + // z-index鍊� + zIndex: { + type: [Number, String], + default: '' + } + }, + data() { + return { + fixed: false, + height: 'auto', + stickyTop: 0, + elClass: this.$u.guid(), + left: 0, + width: 'auto', + }; + }, + watch: { + offsetTop(val) { + this.initObserver(); + }, + enable(val) { + if (val == false) { + this.fixed = false; + this.disconnectObserver('contentObserver'); + } else { + this.initObserver(); + } + } + }, + computed: { + uZIndex() { + return this.zIndex ? this.zIndex : this.$u.zIndex.sticky; + } + }, + mounted() { + this.initObserver(); + }, + methods: { + initObserver() { + if (!this.enable) return; + // #ifdef H5 + this.stickyTop = this.offsetTop != 0 ? uni.upx2px(this.offsetTop) + this.h5NavHeight : this.h5NavHeight; + // #endif + // #ifndef H5 + this.stickyTop = this.offsetTop != 0 ? uni.upx2px(this.offsetTop) : 0; + // #endif + + this.disconnectObserver('contentObserver'); + this.$uGetRect('.' + this.elClass).then((res) => { + this.height = res.height; + this.left = res.left; + this.width = res.width; + this.$nextTick(() => { + this.observeContent(); + }); + }); + }, + observeContent() { + this.disconnectObserver('contentObserver'); + const contentObserver = this.createIntersectionObserver({ + thresholds: [0.95, 0.98, 1] + }); + contentObserver.relativeToViewport({ + top: -this.stickyTop + }); + contentObserver.observe('.' + this.elClass, res => { + if (!this.enable) return; + this.setFixed(res.boundingClientRect.top); + }); + this.contentObserver = contentObserver; + }, + setFixed(top) { + const fixed = top < this.stickyTop; + if (fixed) this.$emit('fixed', this.index); + else if(this.fixed) this.$emit('unfixed', this.index); + this.fixed = fixed; + }, + disconnectObserver(observerName) { + const observer = this[observerName]; + observer && observer.disconnect(); + }, + }, + beforeDestroy() { + this.disconnectObserver('contentObserver'); + } + }; +</script> + +<style scoped lang="scss"> + @import "../../libs/css/style.components.scss"; + + .u-sticky { + z-index: 9999999999; + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-subsection/u-subsection.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-subsection/u-subsection.vue" new file mode 100644 index 0000000..b8fbd79 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-subsection/u-subsection.vue" @@ -0,0 +1,355 @@ +<template> + <view class="u-subsection" :style="[subsectionStyle]"> + <view class="u-item u-line-1" :style="[itemStyle(index)]" @tap="click(index)" :class="[noBorderRight(index), 'u-item-' + index]" + v-for="(item, index) in listInfo" :key="index"> + <view :style="[textStyle(index)]" class="u-item-text u-line-1">{{ item.name }}</view> + </view> + <view class="u-item-bg" :style="[itemBarStyle]"></view> + </view> +</template> + +<script> + /** + * subsection 鍒嗘鍣� + * @description 璇ュ垎娈靛櫒涓�鑸敤浜庣敤鎴蜂粠鍑犱釜閫夐」涓�夋嫨鏌愪竴涓殑鍦烘櫙 + * @tutorial https://www.uviewui.com/components/subsection.html + * @property {Array} list 閫夐」鐨勬暟缁勶紝褰㈠紡瑙佷笂鏂�"鍩烘湰浣跨敤" + * @property {String Number} current 鍒濆鍖栨椂榛樿閫変腑鐨勯�夐」绱㈠紩鍊硷紙榛樿0锛� + * @property {String} active-color 婵�娲绘椂鐨勯鑹诧紝mode涓簊ubsection鏃跺浐瀹氫负鐧借壊锛堥粯璁�#303133锛� + * @property {String} inactive-color 鏈縺娲绘椂瀛椾綋鐨勯鑹诧紝mode涓簊ubsection鏃舵棤鏁堬紙榛樿#606266锛� + * @property {String} mode 妯″紡閫夋嫨锛岃瀹樼綉"妯″紡閫夋嫨"璇存槑锛堥粯璁utton锛� + * @property {String Number} font-size 瀛椾綋澶у皬锛屽崟浣峳px锛堥粯璁�28锛� + * @property {String Number} height 缁勪欢楂樺害锛屽崟浣峳px锛堥粯璁�70锛� + * @property {Boolean} animation 鏄惁寮�鍚姩鐢绘晥鏋滐紝瑙佷笂鏂硅鏄庯紙榛樿true锛� + * @property {Boolean} bold 婵�娲婚�夐」鐨勫瓧浣撴槸鍚﹀姞绮楋紙榛樿true锛� + * @property {String} bg-color 缁勪欢鑳屾櫙棰滆壊锛宮ode涓篵utton鏃舵湁鏁堬紙榛樿#eeeeef锛� + * @property {String} button-color 鎸夐挳鑳屾櫙棰滆壊锛宮ode涓篵utton鏃舵湁鏁堬紙榛樿#ffffff锛� + * @event {Function} change 鍒嗘鍣ㄩ�夐」鍙戠敓鏀瑰彉鏃惰Е鍙� + * @example <u-subsection active-color="#ff9900"></u-subsection> + */ + export default { + name: "u-subsection", + props: { + // tab鐨勬暟鎹� + list: { + type: Array, + default () { + return []; + } + }, + // 褰撳墠娲诲姩鐨則ab鐨刬ndex + current: { + type: [Number, String], + default: 0 + }, + // 婵�娲荤殑棰滆壊 + activeColor: { + type: String, + default: '#303133' + }, + // 鏈縺娲荤殑棰滆壊 + inactiveColor: { + type: String, + default: '#606266' + }, + // 妯″紡閫夋嫨锛宮ode=button涓烘寜閽舰寮忥紝mode=subsection鏃朵负鍒嗘妯″紡 + mode: { + type: String, + default: 'button' + }, + // 瀛椾綋澶у皬锛屽崟浣峳px + fontSize: { + type: [Number, String], + default: 28 + }, + // 鏄惁寮�鍚姩鐢绘晥鏋� + animation: { + type: Boolean, + default: true + }, + // 缁勪欢鐨勯珮搴︼紝鍗曚綅rpx + height: { + type: [Number, String], + default: 70 + }, + // 婵�娲籺ab鐨勫瓧浣撴槸鍚﹀姞绮� + bold: { + type: Boolean, + default: true + }, + // mode=button鏃讹紝缁勪欢鑳屾櫙棰滆壊 + bgColor: { + type: String, + default: '#eeeeef' + }, + // mode = button鏃讹紝婊戝潡鑳屾櫙棰滆壊 + buttonColor: { + type: String, + default: '#ffffff' + }, + // 鍦ㄥ垏鎹㈠垎娈靛櫒鐨勬椂鍊欙紝鏄惁璁╄澶囬渿涓�涓� + vibrateShort: { + type: Boolean, + default: false + } + }, + data() { + return { + listInfo: [], + itemBgStyle: { + width: 0, + left: 0, + backgroundColor: '#ffffff', + height: '100%', + transition: '' + }, + currentIndex: this.current, + buttonPadding: 3, // mode = button 鏃讹紝缁勪欢鐨勫唴杈硅窛 + borderRadius: 5, // 鍦嗚鍊� + firstTimeVibrateShort: true // 缁勪欢鍒濆鍖栨椂锛屼細瑙﹀彂current鍙樺寲锛屾鏃朵笉搴旈渿鍔� + }; + }, + watch: { + current: { + immediate: true, + handler(nVal) { + this.currentIndex = nVal; + this.changeSectionStatus(nVal); + } + } + }, + created() { + // 灏唋ist鐨勬暟鎹紝浼犲叆listInfo鏁扮粍锛屽洜涓轰笉鑳戒慨鏀筽rops浼犻�掔殑list鍊� + // 鍙互鎺ュ彈鐩存帴鏁扮粍褰㈠紡锛屾垨鑰呮暟缁勫厓绱犱负瀵硅薄鐨勫舰寮忥紝濡傦細['绠�浠�', '璇勮'],鎴栬�匸{name: '绠�浠�'}, {name: '璇勮'}] + this.listInfo = this.list.map((val, index) => { + if (typeof val != 'object') { + let obj = { + width: 0, + name: val + }; + return obj; + } else { + val.width = 0; + return val; + } + }); + }, + computed: { + // 璁剧疆mode=subsection鏃讹紝婊戝潡鐗规湁鐨勬牱寮� + noBorderRight() { + return index => { + if (this.mode != 'subsection') return; + let classs = ''; + // 涓嶆樉绀哄彸杈圭殑杈规 + if (index < this.list.length - 1) classs += ' u-none-border-right'; + // 鏄剧ず鏁翠釜缁勪欢鐨勫乏鍙宠竟鍦嗚 + if (index == 0) classs += ' u-item-first'; + if (index == this.list.length - 1) classs += ' u-item-last'; + return classs; + }; + }, + // 鏂囧瓧鐨勬牱寮� + textStyle() { + return index => { + let style = {}; + // 璁剧疆瀛椾綋棰滆壊 + if (this.mode == 'subsection') { + if (index == this.currentIndex) { + style.color = '#ffffff'; + } else { + style.color = this.activeColor; + } + } else { + if (index == this.currentIndex) { + style.color = this.activeColor; + } else { + style.color = this.inactiveColor; + } + } + // 瀛椾綋鍔犵矖 + if (index == this.currentIndex && this.bold) style.fontWeight = 'bold'; + // 鏂囧瓧澶у皬 + style.fontSize = this.fontSize + 'rpx'; + return style; + }; + }, + // 姣忎釜鍒嗘鍣╥tem鐨勬牱寮� + itemStyle() { + return index => { + let style = {}; + if (this.mode == 'subsection') { + // 璁剧疆border鐨勬牱寮� + style.borderColor = this.activeColor; + style.borderWidth = '1px'; + style.borderStyle = 'solid'; + } + return style; + }; + }, + // mode=button鏃讹紝澶栧眰view鐨勬牱寮� + subsectionStyle() { + let style = {}; + style.height = uni.upx2px(this.height) + 'px'; + if (this.mode == 'button') { + style.backgroundColor = this.bgColor; + style.padding = `${this.buttonPadding}px`; + style.borderRadius = `${this.borderRadius}px`; + } + return style; + }, + // 婊戝潡鐨勬牱寮� + itemBarStyle() { + let style = {}; + style.backgroundColor = this.activeColor; + style.zIndex = 1; + if (this.mode == 'button') { + style.backgroundColor = this.buttonColor; + style.borderRadius = `${this.borderRadius}px`; + style.bottom = `${this.buttonPadding}px`; + style.height = uni.upx2px(this.height) - this.buttonPadding * 2 + 'px'; + style.zIndex = 0; + } + return Object.assign(this.itemBgStyle, style); + } + }, + mounted() { + setTimeout(() => { + this.getTabsInfo(); + }, 10); + }, + methods: { + // 鏀瑰彉婊戝潡鐨勬牱寮� + changeSectionStatus(nVal) { + if (this.mode == 'subsection') { + // 鏍规嵁婊戝潡鍦ㄦ渶宸﹁竟鍜屾渶鍙宠竟鏃讹紝鏄剧ず宸﹁竟鍜屽彸杈圭殑鍦嗚 + if (nVal == this.list.length - 1) { + this.itemBgStyle.borderRadius = `0 ${this.buttonPadding}px ${this.buttonPadding}px 0`; + } + if (nVal == 0) { + this.itemBgStyle.borderRadius = `${this.buttonPadding}px 0 0 ${this.buttonPadding}px`; + } + if (nVal > 0 && nVal < this.list.length - 1) { + this.itemBgStyle.borderRadius = '0'; + } + } + // 鏇存柊婊戝潡鐨勪綅缃� + setTimeout(() => { + this.itemBgLeft(); + }, 10); + if (this.vibrateShort && !this.firstTimeVibrateShort) { + // 浣挎墜鏈轰骇鐢熺煭淇冮渿鍔紝寰俊灏忕▼搴忔湁鏁堬紝APP(HX 2.6.8)鍜孒5鏃犳晥 + // #ifndef H5 + uni.vibrateShort(); + // #endif + } + // 绗竴娆¤繃鍚庯紝璁剧疆firstTimeVibrateShort涓篺alse锛岃鍏朵笅涓�娆″彲浠ラ渿鍔�(濡傛灉鍏佽闇囧姩鐨勮瘽) + this.firstTimeVibrateShort = false; + }, + click(index) { + // 涓嶅厑璁哥偣鍑诲綋鍓嶆縺娲婚�夐」 + if (index == this.currentIndex) return; + this.currentIndex = index; + this.changeSectionStatus(index); + this.$emit('change', Number(index)); + }, + // 鑾峰彇鍚勪釜tab鐨勮妭鐐逛俊鎭� + getTabsInfo() { + let view = uni.createSelectorQuery().in(this); + for (let i = 0; i < this.list.length; i++) { + view.select('.u-item-' + i).boundingClientRect(); + } + view.exec(res => { + if (!res.length) { + setTimeout(() => { + this.getTabsInfo(); + return; + }, 10); + } + // 灏嗗垎娈靛櫒姣忎釜item鐨勫搴︼紝鏀惧叆listInfo鏁扮粍 + res.map((val, index) => { + this.listInfo[index].width = val.width; + }); + // 鍒濆鍖栨粦鍧楃殑瀹藉害 + if (this.mode == 'subsection') { + this.itemBgStyle.width = this.listInfo[0].width + 'px'; + } else if (this.mode == 'button') { + this.itemBgStyle.width = this.listInfo[0].width + 'px'; + } + // 鍒濆鍖栨粦鍧楃殑浣嶇疆 + this.itemBgLeft(); + }); + }, + itemBgLeft() { + // 鏍规嵁鏄惁寮�鍚姩鐢绘晥鏋滐紝 + if (this.animation) { + this.itemBgStyle.transition = 'all 0.35s'; + } else { + this.itemBgStyle.transition = 'all 0s'; + } + let left = 0; + // 璁$畻褰撳墠娲昏穬item鍒扮粍浠跺乏杈圭殑璺濈 + this.listInfo.map((val, index) => { + if (index < this.currentIndex) left += val.width; + }); + // 鏍规嵁mode涓嶅悓妯″紡锛岃绠楁粦鍧楅渶瑕佺Щ鍔ㄧ殑璺濈 + if (this.mode == 'subsection') { + this.itemBgStyle.left = left + 'px'; + } else if (this.mode == 'button') { + this.itemBgStyle.left = left + this.buttonPadding + 'px'; + } + } + } + }; +</script> + +<style lang="scss" scoped> + @import "../../libs/css/style.components.scss"; + + .u-subsection { + @include vue-flex; + align-items: center; + overflow: hidden; + position: relative; + } + + .u-item { + flex: 1; + text-align: center; + font-size: 26rpx; + height: 100%; + @include vue-flex; + align-items: center; + justify-content: center; + color: $u-main-color; + padding: 0 6rpx; + } + + .u-item-bg { + background-color: $u-type-primary; + position: absolute; + z-index: -1; + } + + .u-none-border-right { + border-right: none !important; + } + + .u-item-first { + border-top-left-radius: 8rpx; + border-bottom-left-radius: 8rpx; + } + + .u-item-last { + border-top-right-radius: 8rpx; + border-bottom-right-radius: 8rpx; + } + + .u-item-text { + transition: all 0.35s; + color: $u-main-color; + @include vue-flex; + align-items: center; + position: relative; + z-index: 3; + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-swipe-action/u-swipe-action.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-swipe-action/u-swipe-action.vue" new file mode 100644 index 0000000..13fb33c --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-swipe-action/u-swipe-action.vue" @@ -0,0 +1,255 @@ +<template> + <view class=""> + <movable-area class="u-swipe-action" :style="{ backgroundColor: bgColor }"> + <movable-view + class="u-swipe-view" + @change="change" + @touchend="touchend" + @touchstart="touchstart" + direction="horizontal" + :disabled="disabled" + :x="moveX" + :style="{ + width: movableViewWidth ? movableViewWidth : '100%' + }" + > + <view + class="u-swipe-content" + @tap.stop="contentClick" + > + <slot></slot> + </view> + <view class="u-swipe-del" v-if="showBtn" @tap.stop="btnClick(index)" :style="[btnStyle(item.style)]" v-for="(item, index) in options" :key="index"> + <view class="u-btn-text">{{ item.text }}</view> + </view> + </movable-view> + </movable-area> + </view> +</template> + +<script> +/** + * swipeAction 宸︽粦鍗曞厓鏍� + * @description 璇ョ粍浠朵竴鑸敤浜庡乏婊戝敜鍑烘搷浣滆彍鍗曠殑鍦烘櫙锛岀敤鐨勬渶澶氱殑鏄乏婊戝垹闄ゆ搷浣溿�� + * @tutorial https://www.uviewui.com/components/swipeAction.html + * @property {String} bg-color 鏁翠釜缁勪欢鑳屾櫙棰滆壊锛堥粯璁�#ffffff锛� + * @property {Array} options 鏁扮粍褰㈠紡锛屽彲浠ラ厤缃儗鏅鑹插拰鏂囧瓧 + * @property {String Number} index 鏍囪瘑绗︼紝鐐瑰嚮鏃跺�欑敤浜庡尯鍒嗙偣鍑讳簡鍝竴涓紝鐢╲-for寰幆鏃剁殑index鍗冲彲 + * @property {String Number} btn-width 鎸夐挳瀹藉害锛屽崟浣峳px锛堥粯璁�180锛� + * @property {Boolean} disabled 鏄惁绂佹鏌愪釜swipeAction婊戝姩锛堥粯璁alse锛� + * @property {Boolean} show 鎵撳紑鎴栬�呭叧闂煇涓粍浠讹紙榛樿false锛� + * @event {Function} click 鐐瑰嚮缁勪欢鏃惰Е鍙� + * @event {Function} close 缁勪欢瑙﹀彂鍏抽棴鐘舵�佹椂 + * @event {Function} content-click 鐐瑰嚮鍐呭鏃惰Е鍙� + * @event {Function} open 缁勪欢瑙﹀彂鎵撳紑鐘舵�佹椂 + * @example <u-swipe-action btn-text="鏀惰棌">...</u-swipe-action> + */ +export default { + name: 'u-swipe-action', + props: { + // index鍊硷紝鐢ㄤ簬寰楃煡鐐瑰嚮鍒犻櫎鐨勬槸鍝釜鎸夐挳 + index: { + type: [Number, String], + default: '' + }, + // 婊戝姩鎸夐挳鐨勫搴︼紝鍗曚綅涓簉px + btnWidth: { + type: [String, Number], + default: 180 + }, + // 鏄惁绂佹鏌愪釜action婊戝姩 + disabled: { + type: Boolean, + default: false + }, + // 鎵撳紑鎴栬�呭叧闂粍浠� + show: { + type: Boolean, + default: false + }, + // 缁勪欢鑳屾櫙棰滆壊 + bgColor: { + type: String, + default: '#ffffff' + }, + // 鏄惁浣挎墜鏈哄彂鐢熺煭淇冮渿鍔紝鐩墠鍙湪iOS鐨勫井淇″皬绋嬪簭鏈夋晥(2020-05-06) + vibrateShort: { + type: Boolean, + default: false + }, + // 鎸夐挳鎿嶄綔鍙傛暟 + options: { + type: Array, + default() { + return []; + } + } + }, + watch: { + show: { + immediate: true, + handler(nVal, oVal) { + if (nVal) { + this.open(); + } else { + this.close(); + } + } + } + }, + data() { + return { + moveX: 0, // movable-view鍏冪礌鍦▁杞翠笂闇�瑕佺Щ鍔ㄧ殑鐩爣绉诲姩璺濈锛岀敤浜庡睍寮�鎴栨敹璧锋粦鍔ㄧ殑鎸夐挳 + scrollX: 0, // movable-view绉诲姩杩囩▼涓骇鐢熺殑change浜嬩欢涓殑x杞寸Щ鍔ㄥ�� + status: false, // 婊戝姩鐨勭姸鎬侊紝琛ㄧず褰撳墠鏄睍寮�杩樻槸鍏抽棴鎸夐挳鐨勭姸鎬� + movableAreaWidth: 0, // 婊戝姩鍖哄煙 + elId: this.$u.guid(), // id锛岀敤浜庨�氱煡鍙﹀缁勪欢鍏抽棴鏃剁殑璇嗗埆 + showBtn: false, // 鍒氬紑濮嬫覆鏌撹鍥炬椂涓嶆樉绀哄彸杈圭殑鎸夐挳锛岄伩鍏嶈鍥鹃棯鍔� + }; + }, + computed: { + movableViewWidth() { + return this.movableAreaWidth + this.allBtnWidth + 'px'; + }, + innerBtnWidth() { + return uni.upx2px(this.btnWidth); + }, + allBtnWidth() { + return uni.upx2px(this.btnWidth) * this.options.length; + }, + btnStyle() { + return style => { + let css = {}; + style.width = this.btnWidth + 'rpx'; + return style; + }; + } + }, + mounted() { + this.getActionRect(); + }, + methods: { + // 鐐瑰嚮鎸夐挳 + btnClick(index) { + this.status = false; + // this.index涓虹偣鍑荤殑鍑犱釜缁勪欢锛宨ndex涓虹偣鍑绘煇涓粍浠剁殑绗嚑涓寜閽�(options鏁扮粍鐨勭储寮�) + this.$emit('click', this.index, index); + }, + // movable-view鍏冪礌绉诲姩浜嬩欢 + change(e) { + this.scrollX = e.detail.x; + }, + // 鍏抽棴鎸夐挳鐘舵�� + close() { + this.moveX = 0; + this.status = false; + }, + // 鎵撳紑鎸夐挳鐨勭姸鎬� + open() { + if (this.disabled) return; + this.moveX = -this.allBtnWidth; + this.status = true; + }, + // 鐢ㄦ埛鎵嬫寚绂诲紑movable-view鍏冪礌锛屽仠姝㈣Е鎽� + touchend() { + this.moveX = this.scrollX; + // 鍋滄瑙︽懜鏃跺�欙紝鍒ゆ柇褰撳墠鏄睍寮�杩樻槸鍏抽棴鐘舵�� + // 鍏抽棴鐘舵�� + // 杩欎竴姝ュ緢閲嶈锛岄渶瑕佸厛缁檛his.moveX涓�涓彉鍖栫殑闅忔満鍊硷紝鍚﹀垯鍥犱负鍓嶅悗璁剧疆鐨勪负鍚屼竴涓�� + // props鍗曞悜鏁版嵁娴佺殑鍘熷洜锛屽鑷磎ovable-view鍏冪礌涓嶄細鍙戠敓鍙樺寲锛屽垏璁帮紝璇﹁鏂囨。锛� + // https://uniapp.dcloud.io/use?id=%e5%b8%b8%e8%a7%81%e9%97%ae%e9%a2%98 + this.$nextTick(function() { + if (this.status == false) { + // 鍏抽棴鐘舵�佸乏婊戯紝浜х敓鐨剎杞翠綅绉讳负璐熷�硷紝涔熷氨鏄婊戝姩鐨勮窛绂诲ぇ浜庢寜閽殑鍥涘垎涔嬩竴瀹藉害锛岃嚜鍔ㄥ睍寮�鎸夐挳 + if (this.scrollX <= -this.allBtnWidth / 4) { + this.moveX = -this.allBtnWidth; // 鎸夐挳瀹藉害鐨勮礋鍊硷紝鍗充负灞曞紑鐘舵�乵ovable-view鍏冪礌宸︽粦鐨勮窛绂� + this.status = true; // 鏍囧織褰撳墠涓哄睍寮�鐘舵�� + this.emitOpenEvent(); + // 浜х敓闇囧姩鏁堟灉 + if (this.vibrateShort) uni.vibrateShort(); + } else { + this.moveX = 0; // 濡傛灉璺濈娌℃湁鎸夐挳瀹藉害鐨勫洓鍒嗕箣涓�锛岃嚜鍔ㄦ敹璧� + this.status = false; + this.emitCloseEvent(); + } + } else { + // 濡傛灉鍦ㄦ墦寮�鐨勭姸鎬佷笅锛屽彸婊戝姩鐨勮窛绂籜杞村亸绉昏秴杩囨寜閽殑鍥涘垎涔嬩竴(璐熷�煎弽杩囨潵鐨勫洓鍒嗕箣涓�)锛岃嚜鍔ㄦ敹璧锋寜閽� + if (this.scrollX > (-this.allBtnWidth * 3) / 4) { + this.moveX = 0; + this.$nextTick(() => { + this.moveX = 101; + }); + this.status = false; + this.emitCloseEvent(); + } else { + this.moveX = -this.allBtnWidth; + this.status = true; + this.emitOpenEvent(); + } + } + }); + }, + emitOpenEvent() { + this.$emit('open', this.index); + }, + emitCloseEvent() { + this.$emit('close', this.index); + }, + // 寮�濮嬭Е鎽� + touchstart() {}, + getActionRect() { + this.$uGetRect('.u-swipe-action').then(res => { + this.movableAreaWidth = res.width; + // 绛夎鍥炬洿鏂板畬鍚庯紝鍐嶆樉绀哄彸杈圭殑鍙粦鍔ㄦ寜閽紝闃叉杩欎簺鎸夐挳浼�"闂竴涓�" + this.$nextTick(() => { + this.showBtn = true; + }) + }); + }, + // 鐐瑰嚮鍐呭瑙﹀彂浜嬩欢 + contentClick() { + // 鐐瑰嚮鍐呭鏃讹紝濡傛灉褰撳墠涓烘墦寮�鐘舵�侊紝鏀惰捣缁勪欢 + if (this.status == true) { + this.status = 'close'; + this.moveX = 0; + } + this.$emit('content-click', this.index); + } + } +}; +</script> + +<style scoped lang="scss"> +@import "../../libs/css/style.components.scss"; + +.u-swipe-action { + width: auto; + height: initial; + position: relative; + overflow: hidden; +} + +.u-swipe-view { + @include vue-flex; + height: initial; + position: relative; + /* 杩欎竴鍙ュ緢鍏抽敭锛岃鐩栭粯璁ょ殑缁濆瀹氫綅 */ +} + +.u-swipe-content { + flex: 1; +} + +.u-swipe-del { + position: relative; + font-size: 30rpx; + color: #ffffff; +} + +.u-btn-text { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); +} +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-swiper/u-swiper.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-swiper/u-swiper.vue" new file mode 100644 index 0000000..b6e7e81 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-swiper/u-swiper.vue" @@ -0,0 +1,340 @@ +<template> + <view class="u-swiper-wrap" :style="{ + borderRadius: `${borderRadius}rpx` + }"> + <swiper :current="elCurrent" @change="change" @animationfinish="animationfinish" :interval="interval" :circular="circular" :duration="duration" :autoplay="autoplay" + :previous-margin="effect3d ? effect3dPreviousMargin + 'rpx' : '0'" :next-margin="effect3d ? effect3dPreviousMargin + 'rpx' : '0'" + :style="{ + height: height + 'rpx', + backgroundColor: bgColor + }"> + <swiper-item class="u-swiper-item" v-for="(item, index) in list" :key="index"> + <view class="u-list-image-wrap" @tap.stop.prevent="listClick(index)" :class="[uCurrent != index ? 'u-list-scale' : '']" :style="{ + borderRadius: `${borderRadius}rpx`, + transform: effect3d && uCurrent != index ? 'scaleY(0.9)' : 'scaleY(1)', + margin: effect3d && uCurrent != index ? '0 20rpx' : 0, + }"> + <image class="u-swiper-image" :src="item[name] || item" :mode="imgMode"></image> + <view v-if="title && item.title" class="u-swiper-title u-line-1" :style="[{ + 'padding-bottom': titlePaddingBottom + }, titleStyle]"> + {{ item.title }} + </view> + </view> + </swiper-item> + </swiper> + <view class="u-swiper-indicator" :style="{ + top: indicatorPos == 'topLeft' || indicatorPos == 'topCenter' || indicatorPos == 'topRight' ? '12rpx' : 'auto', + bottom: indicatorPos == 'bottomLeft' || indicatorPos == 'bottomCenter' || indicatorPos == 'bottomRight' ? '12rpx' : 'auto', + justifyContent: justifyContent, + padding: `0 ${effect3d ? '74rpx' : '24rpx'}` + }"> + <block v-if="mode == 'rect'"> + <view class="u-indicator-item-rect" :class="{ 'u-indicator-item-rect-active': index == uCurrent }" v-for="(item, index) in list" + :key="index"></view> + </block> + <block v-if="mode == 'dot'"> + <view class="u-indicator-item-dot" :class="{ 'u-indicator-item-dot-active': index == uCurrent }" v-for="(item, index) in list" + :key="index"></view> + </block> + <block v-if="mode == 'round'"> + <view class="u-indicator-item-round" :class="{ 'u-indicator-item-round-active': index == uCurrent }" v-for="(item, index) in list" + :key="index"></view> + </block> + <block v-if="mode == 'number'"> + <view class="u-indicator-item-number">{{ uCurrent + 1 }}/{{ list.length }}</view> + </block> + </view> + </view> +</template> + +<script> + /** + * swiper 杞挱鍥� + * @description 璇ョ粍浠朵竴鑸敤浜庡鑸疆鎾紝骞垮憡灞曠ず绛夊満鏅�,鍙紑绠卞嵆鐢� + * @tutorial https://www.uviewui.com/components/swiper.html + * @property {Array} list 杞挱鍥炬暟鎹紝瑙佸畼缃�"鍩烘湰浣跨敤"璇存槑 + * @property {Boolean} title 鏄惁鏄剧ず鏍囬鏂囧瓧锛岄渶瑕侀厤鍚坙ist鍙傛暟锛岃瀹樼綉璇存槑锛堥粯璁alse锛� + * @property {String} mode 鎸囩ず鍣ㄦā寮忥紝瑙佸畼缃戣鏄庯紙榛樿round锛� + * @property {String Number} height 杞挱鍥剧粍浠堕珮搴︼紝鍗曚綅rpx锛堥粯璁�250锛� + * @property {String} indicator-pos 鎸囩ず鍣ㄧ殑浣嶇疆锛堥粯璁ottomCenter锛� + * @property {Boolean} effect3d 鏄惁寮�鍚�3D鏁堟灉锛堥粯璁alse锛� + * @property {Boolean} autoplay 鏄惁鑷姩鎾斁锛堥粯璁rue锛� + * @property {String Number} interval 鑷姩杞挱鏃堕棿闂撮殧锛屽崟浣峬s锛堥粯璁�2500锛� + * @property {Boolean} circular 鏄惁琛旀帴鎾斁锛岃瀹樼綉璇存槑锛堥粯璁rue锛� + * @property {String} bg-color 鑳屾櫙棰滆壊锛堥粯璁�#f3f4f6锛� + * @property {String Number} border-radius 杞挱鍥惧渾瑙掑�硷紝鍗曚綅rpx锛堥粯璁�8锛� + * @property {Object} title-style 鑷畾涔夋爣棰樻牱寮� + * @property {String Number} effect3d-previous-margin mode = true妯″紡鐨勬儏鍐典笅锛屾縺娲婚」涓庡墠鍚庨」涔嬮棿鐨勮窛绂伙紝鍗曚綅rpx锛堥粯璁�50锛� + * @property {String} img-mode 鍥剧墖鐨勮鍓ā寮忥紝璇﹁image缁勪欢瑁佸壀妯″紡锛堥粯璁spectFill锛� + * @event {Function} click 鐐瑰嚮杞挱鍥炬椂瑙﹀彂 + * @example <u-swiper :list="list" mode="dot" indicator-pos="bottomRight"></u-swiper> + */ + export default { + name: "u-swiper", + props: { + // 杞挱鍥剧殑鏁版嵁,鏍煎紡濡傦細[{image: 'xxxx', title: 'xxxx'}锛寋image: 'yyyy', title: 'yyyy'}]锛屽叾涓璽itle瀛楁鍙�� + list: { + type: Array, + default () { + return []; + } + }, + // 鏄惁鏄剧ずtitle鏍囬 + title: { + type: Boolean, + default: false + }, + // 鐢ㄦ埛鑷畾涔夌殑鎸囩ず鍣ㄧ殑鏍峰紡 + indicator: { + type: Object, + default () { + return {}; + } + }, + // 鍦嗚鍊� + borderRadius: { + type: [Number, String], + default: 8 + }, + // 闅斿涔呰嚜鍔ㄥ垏鎹� + interval: { + type: [String, Number], + default: 3000 + }, + // 鎸囩ず鍣ㄧ殑妯″紡锛宺ect|dot|number|round + mode: { + type: String, + default: 'round' + }, + // list鐨勯珮搴︼紝鍗曚綅rpx + height: { + type: [Number, String], + default: 250 + }, + // 鎸囩ず鍣ㄧ殑浣嶇疆锛宼opLeft|topCenter|topRight|bottomLeft|bottomCenter|bottomRight + indicatorPos: { + type: String, + default: 'bottomCenter' + }, + // 鏄惁寮�鍚缉鏀炬晥鏋� + effect3d: { + type: Boolean, + default: false + }, + // 3D妯″紡鐨勬儏鍐典笅锛屾縺娲籭tem涓庡墠鍚巌tem涔嬮棿鐨勮窛绂伙紝鍗曚綅rpx + effect3dPreviousMargin: { + type: [Number, String], + default: 50 + }, + // 鏄惁鑷姩鎾斁 + autoplay: { + type: Boolean, + default: true + }, + // 鑷姩杞挱鏃堕棿闂撮殧锛屽崟浣峬s + duration: { + type: [Number, String], + default: 500 + }, + // 鏄惁琛旀帴婊戝姩锛屽嵆鍒版渶鍚庝竴寮犳椂鎺ョ潃婊戝姩锛屾槸鍚﹁嚜鍔ㄥ垏鎹㈠埌绗竴寮� + circular: { + type: Boolean, + default: true + }, + // 鍥剧墖鐨勮鍓ā寮� + imgMode: { + type: String, + default: 'aspectFill' + }, + // 浠巐ist鏁扮粍涓鍙栫殑鍥剧墖鐨勫睘鎬у悕 + name: { + type: String, + default: 'image' + }, + // 鑳屾櫙棰滆壊 + bgColor: { + type: String, + default: '#f3f4f6' + }, + // 鍒濆鍖栨椂锛岄粯璁ゆ樉绀虹鍑犻」 + current: { + type: [Number, String], + default: 0 + }, + // 鏍囬鐨勬牱寮忥紝瀵硅薄褰㈠紡 + titleStyle: { + type: Object, + default() { + return {} + } + } + }, + watch: { + // 濡傛灉澶栭儴鐨刲ist鍙戠敓鍙樺寲锛屽垽鏂暱搴︽槸鍚﹁淇敼锛屽鏋滃墠鍚庨暱搴︿笉涓�鑷达紝閲嶇疆uCurrent鍊硷紝閬垮厤婧㈠嚭 + list(nVal, oVal) { + if(nVal.length !== oVal.length) this.uCurrent = 0; + }, + // 鐩戝惉澶栭儴current鐨勫彉鍖栵紝瀹炴椂淇敼鍐呴儴渚濊禆浜庢娴媢Current鍊硷紝濡傛灉鏇存柊浜哻urrent锛岃�屼笉鏄洿鏂皍Current锛� + // 灏变細閿欎贡锛屽洜涓烘寚绀哄櫒鏄緷璧栦簬uCurrent鐨� + current(n) { + this.uCurrent = n; + } + }, + data() { + return { + uCurrent: this.current // 褰撳墠娲昏穬鐨剆wiper-item鐨刬ndex + }; + }, + computed: { + justifyContent() { + if (this.indicatorPos == 'topLeft' || this.indicatorPos == 'bottomLeft') return 'flex-start'; + if (this.indicatorPos == 'topCenter' || this.indicatorPos == 'bottomCenter') return 'center'; + if (this.indicatorPos == 'topRight' || this.indicatorPos == 'bottomRight') return 'flex-end'; + }, + titlePaddingBottom() { + let tmp = 0; + if (this.mode == 'none') return '12rpx'; + if (['bottomLeft', 'bottomCenter', 'bottomRight'].indexOf(this.indicatorPos) >= 0 && this.mode == 'number') { + tmp = '60rpx'; + } else if (['bottomLeft', 'bottomCenter', 'bottomRight'].indexOf(this.indicatorPos) >= 0 && this.mode != 'number') { + tmp = '40rpx'; + } else { + tmp = '12rpx'; + } + return tmp; + }, + // 鍥犱负uni鐨剆wiper缁勪欢鐨刢urrent鍙傛暟鍙帴鍙桸umber绫诲瀷锛岃繖閲屽仛涓�涓浆鎹� + elCurrent() { + return Number(this.current); + } + }, + methods: { + listClick(index) { + this.$emit('click', index); + }, + change(e) { + let current = e.detail.current; + this.uCurrent = current; + // 鍙戝嚭change浜嬩欢锛岃〃绀哄綋鍓嶈嚜鍔ㄥ垏鎹㈢殑index锛屼粠0寮�濮� + this.$emit('change', current); + }, + // 澶存潯灏忕▼搴忎笉鏀寔animationfinish浜嬩欢锛屾敼鐢眂hange浜嬩欢 + // 鏆備笉鐩戝惉姝や簨浠讹紝鍥犱负涓嶅啀缁檚wiper缁戝畾uCurrent灞炴�� + animationfinish(e) { + // #ifndef MP-TOUTIAO + // this.uCurrent = e.detail.current; + // #endif + } + } + }; +</script> + +<style lang="scss" scoped> + @import "../../libs/css/style.components.scss"; + + .u-swiper-wrap { + position: relative; + overflow: hidden; + transform: translateY(0); + } + + .u-swiper-image { + width: 100%; + will-change: transform; + height: 100%; + /* #ifndef APP-NVUE */ + display: block; + /* #endif */ + /* #ifdef H5 */ + pointer-events: none; + /* #endif */ + } + + .u-swiper-indicator { + padding: 0 24rpx; + position: absolute; + @include vue-flex; + width: 100%; + z-index: 1; + } + + .u-indicator-item-rect { + width: 26rpx; + height: 8rpx; + margin: 0 6rpx; + transition: all 0.5s; + background-color: rgba(0, 0, 0, 0.3); + } + + .u-indicator-item-rect-active { + background-color: rgba(255, 255, 255, 0.8); + } + + .u-indicator-item-dot { + width: 14rpx; + height: 14rpx; + margin: 0 6rpx; + border-radius: 20rpx; + transition: all 0.5s; + background-color: rgba(0, 0, 0, 0.3); + } + + .u-indicator-item-dot-active { + background-color: rgba(255, 255, 255, 0.8); + } + + .u-indicator-item-round { + width: 14rpx; + height: 14rpx; + margin: 0 6rpx; + border-radius: 20rpx; + transition: all 0.5s; + background-color: rgba(0, 0, 0, 0.3); + } + + .u-indicator-item-round-active { + width: 34rpx; + background-color: rgba(255, 255, 255, 0.8); + } + + .u-indicator-item-number { + padding: 6rpx 16rpx; + line-height: 1; + background-color: rgba(0, 0, 0, 0.3); + border-radius: 100rpx; + font-size: 26rpx; + color: rgba(255, 255, 255, 0.8); + } + + .u-list-scale { + transform-origin: center center; + } + + .u-list-image-wrap { + width: 100%; + height: 100%; + flex: 1; + transition: all 0.5s; + overflow: hidden; + box-sizing: content-box; + position: relative; + } + + .u-swiper-title { + position: absolute; + background-color: rgba(0, 0, 0, 0.3); + bottom: 0; + left: 0; + width: 100%; + font-size: 28rpx; + padding: 12rpx 24rpx; + color: rgba(255, 255, 255, 0.9); + } + + .u-swiper-item { + @include vue-flex; + overflow: hidden; + align-items: center; + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-switch/u-switch.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-switch/u-switch.vue" new file mode 100644 index 0000000..dd8e4bb --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-switch/u-switch.vue" @@ -0,0 +1,163 @@ +<template> + <view class="u-switch" :class="[value == true ? 'u-switch--on' : '', disabled ? 'u-switch--disabled' : '']" @tap="onClick" + :style="[switchStyle]"> + <view class="u-switch__node node-class" :style="{ + width: $u.addUnit(this.size), + height: $u.addUnit(this.size) + }"> + <u-loading :show="loading" class="u-switch__loading" :size="size * 0.6" :color="loadingColor" /> + </view> + </view> +</template> + +<script> + /** + * switch 寮�鍏抽�夋嫨鍣� + * @description 閫夋嫨寮�鍏充竴鑸敤浜庡彧鏈変袱涓�夋嫨锛屼笖鍙兘閫夊叾涓�鐨勫満鏅�� + * @tutorial https://www.uviewui.com/components/switch.html + * @property {Boolean} loading 鏄惁澶勪簬鍔犺浇涓紙榛樿false锛� + * @property {Boolean} disabled 鏄惁绂佺敤锛堥粯璁alse锛� + * @property {String Number} size 寮�鍏冲昂瀵革紝鍗曚綅rpx锛堥粯璁�50锛� + * @property {String} active-color 鎵撳紑鏃剁殑鑳屾櫙鑹诧紙榛樿#2979ff锛� + * @property {Boolean} inactive-color 鍏抽棴鏃剁殑鑳屾櫙鑹诧紙榛樿#ffffff锛� + * @property {Boolean | Number | String} active-value 鎵撳紑閫夋嫨鍣ㄦ椂閫氳繃change浜嬩欢鍙戝嚭鐨勫�硷紙榛樿true锛� + * @property {Boolean | Number | String} inactive-value 鍏抽棴閫夋嫨鍣ㄦ椂閫氳繃change浜嬩欢鍙戝嚭鐨勫�硷紙榛樿false锛� + * @event {Function} change 鍦╯witch鎵撳紑鎴栧叧闂椂瑙﹀彂 + * @example <u-switch v-model="checked" active-color="red" inactive-color="#eee"></u-switch> + */ + export default { + name: "u-switch", + props: { + // 鏄惁涓哄姞杞戒腑鐘舵�� + loading: { + type: Boolean, + default: false + }, + // 鏄惁涓虹鐢ㄨ濉� + disabled: { + type: Boolean, + default: false + }, + // 寮�鍏冲昂瀵革紝鍗曚綅rpx + size: { + type: [Number, String], + default: 50 + }, + // 鎵撳紑鏃剁殑鑳屾櫙棰滆壊 + activeColor: { + type: String, + default: '#2979ff' + }, + // 鍏抽棴鏃剁殑鑳屾櫙棰滆壊 + inactiveColor: { + type: String, + default: '#ffffff' + }, + // 閫氳繃v-model鍙屽悜缁戝畾鐨勫�� + value: { + type: Boolean, + default: false + }, + // 鏄惁浣挎墜鏈哄彂鐢熺煭淇冮渿鍔紝鐩墠鍙湪iOS鐨勫井淇″皬绋嬪簭鏈夋晥(2020-05-06) + vibrateShort: { + type: Boolean, + default: false + }, + // 鎵撳紑閫夋嫨鍣ㄦ椂鐨勫�� + activeValue: { + type: [Number, String, Boolean], + default: true + }, + // 鍏抽棴閫夋嫨鍣ㄦ椂鐨勫�� + inactiveValue: { + type: [Number, String, Boolean], + default: false + }, + }, + data() { + return { + + } + }, + computed: { + switchStyle() { + let style = {}; + style.fontSize = this.size + 'rpx'; + style.backgroundColor = this.value ? this.activeColor : this.inactiveColor; + return style; + }, + loadingColor() { + return this.value ? this.activeColor : null; + } + }, + methods: { + onClick() { + if (!this.disabled && !this.loading) { + // 浣挎墜鏈轰骇鐢熺煭淇冮渿鍔紝寰俊灏忕▼搴忔湁鏁堬紝APP(HX 2.6.8)鍜孒5鏃犳晥 + if(this.vibrateShort) uni.vibrateShort(); + this.$emit('input', !this.value); + // 鏀惧埌涓嬩竴涓敓鍛藉懆鏈燂紝鍥犱负鍙屽悜缁戝畾鐨剉alue淇敼鐖剁粍浠剁姸鎬侀渶瑕佹椂闂达紝涓旀槸寮傛鐨� + this.$nextTick(() => { + this.$emit('change', this.value ? this.activeValue : this.inactiveValue); + }) + } + } + } + }; +</script> + +<style lang="scss" scoped> + @import "../../libs/css/style.components.scss"; + + .u-switch { + position: relative; + /* #ifndef APP-NVUE */ + display: inline-block; + /* #endif */ + box-sizing: initial; + width: 2em; + height: 1em; + background-color: #fff; + border: 1px solid rgba(0, 0, 0, 0.1); + border-radius: 1em; + transition: background-color 0.3s; + font-size: 50rpx; + } + + .u-switch__node { + @include vue-flex; + align-items: center; + justify-content: center; + position: absolute; + top: 0; + left: 0; + border-radius: 100%; + z-index: 1; + background-color: #fff; + background-color: #fff; + box-shadow: 0 3px 1px 0 rgba(0, 0, 0, 0.05), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 3px 3px 0 rgba(0, 0, 0, 0.05); + box-shadow: 0 3px 1px 0 rgba(0, 0, 0, 0.05), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 3px 3px 0 rgba(0, 0, 0, 0.05); + transition: transform 0.3s cubic-bezier(0.3, 1.05, 0.4, 1.05); + transition: transform 0.3s cubic-bezier(0.3, 1.05, 0.4, 1.05), -webkit-transform 0.3s cubic-bezier(0.3, 1.05, 0.4, 1.05); + transition: transform cubic-bezier(0.3, 1.05, 0.4, 1.05); + transition: transform 0.3s cubic-bezier(0.3, 1.05, 0.4, 1.05) + } + + .u-switch__loading { + @include vue-flex; + align-items: center; + justify-content: center; + } + + .u-switch--on { + background-color: #1989fa; + } + + .u-switch--on .u-switch__node { + transform: translateX(100%); + } + + .u-switch--disabled { + opacity: 0.4; + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-tabbar/u-tabbar.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-tabbar/u-tabbar.vue" new file mode 100644 index 0000000..8f1cbca --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-tabbar/u-tabbar.vue" @@ -0,0 +1,330 @@ +<template> + <view v-if="show" class="u-tabbar" @touchmove.stop.prevent="() => {}"> + <view class="u-tabbar__content safe-area-inset-bottom" :style="{ + height: $u.addUnit(height), + backgroundColor: bgColor, + }" :class="{ + 'u-border-top': borderTop + }"> + <view class="u-tabbar__content__item" v-for="(item, index) in list" :key="index" :class="{ + 'u-tabbar__content__circle': midButton &&item.midButton + }" @tap.stop="clickHandler(index)" :style="{ + backgroundColor: bgColor + }"> + <view :class="[ + midButton && item.midButton ? 'u-tabbar__content__circle__button' : 'u-tabbar__content__item__button' + ]"> + <u-icon + :size="midButton && item.midButton ? midButtonSize : iconSize" + :name="elIconPath(index)" + img-mode="scaleToFill" + :color="elColor(index)" + :custom-prefix="item.customIcon ? 'custom-icon' : 'uicon'" + ></u-icon> + <u-badge :count="item.count" :is-dot="item.isDot" + v-if="item.count" + :offset="[-2, getOffsetRight(item.count, item.isDot)]" + ></u-badge> + </view> + <view class="u-tabbar__content__item__text" :style="{ + color: elColor(index) + }"> + <text class="u-line-1">{{item.text}}</text> + </view> + </view> + <view v-if="midButton" class="u-tabbar__content__circle__border" :class="{ + 'u-border': borderTop, + }" :style="{ + backgroundColor: bgColor, + left: midButtonLeft + }"> + </view> + </view> + <!-- 杩欓噷鍔犱笂涓�涓�48rpx鐨勯珮搴�,鏄负浜嗗楂樻湁鍑歌捣鎸夐挳鏃剁殑闃插闄烽珮搴�(涔熷嵆鎸夐挳鍑稿嚭鏉ラ儴鍒嗙殑楂樺害) --> + <view class="u-fixed-placeholder safe-area-inset-bottom" :style="{ + height: `calc(${$u.addUnit(height)} + ${midButton ? 48 : 0}rpx)`, + }"></view> + </view> +</template> + +<script> + export default { + props: { + // 鏄剧ず涓庡惁 + show: { + type: Boolean, + default: true + }, + // 閫氳繃v-model缁戝畾current鍊� + value: { + type: [String, Number], + default: 0 + }, + // 鏁翠釜tabbar鐨勮儗鏅鑹� + bgColor: { + type: String, + default: '#ffffff' + }, + // tabbar鐨勯珮搴︼紝榛樿50px锛屽崟浣嶄换鎰忥紝濡傛灉涓烘暟鍊硷紝鍒欎负rpx鍗曚綅 + height: { + type: [String, Number], + default: '50px' + }, + // 闈炲嚫璧峰浘鏍囩殑澶у皬锛屽崟浣嶄换鎰忥紝鏁板�奸粯璁px + iconSize: { + type: [String, Number], + default: 40 + }, + // 鍑歌捣鐨勫浘鏍囩殑澶у皬锛屽崟浣嶄换鎰忥紝鏁板�奸粯璁px + midButtonSize: { + type: [String, Number], + default: 90 + }, + // 婵�娲绘椂鐨勬紨绀猴紝鍖呮嫭瀛椾綋鍥炬爣锛屾彁绀烘枃瀛楃瓑鐨勬紨绀� + activeColor: { + type: String, + default: '#303133' + }, + // 鏈縺娲绘椂鐨勯鑹� + inactiveColor: { + type: String, + default: '#606266' + }, + // 鏄惁鏄剧ず涓儴鐨勫嚫璧锋寜閽� + midButton: { + type: Boolean, + default: false + }, + // 閰嶇疆鍙傛暟 + list: { + type: Array, + default () { + return [] + } + }, + // 鍒囨崲鍓嶇殑鍥炶皟 + beforeSwitch: { + type: Function, + default: null + }, + // 鏄惁鏄剧ず椤堕儴鐨勬í绾� + borderTop: { + type: Boolean, + default: true + }, + // 鏄惁闅愯棌鍘熺敓tabbar + hideTabBar: { + type: Boolean, + default: true + }, + }, + data() { + return { + // 鐢变簬瀹夊崜澶彍浜嗭紝閫氳繃css灞呬腑鍑歌捣鎸夐挳鐨勫灞傚厓绱犳湁璇樊锛屾晠閫氳繃js璁$畻灏嗗叾灞呬腑 + midButtonLeft: '50%', + pageUrl: '', // 褰撳墠椤甸潰URL + } + }, + created() { + // 鏄惁闅愯棌鍘熺敓tabbar + if(this.hideTabBar) uni.hideTabBar(); + // 鑾峰彇寮曞叆浜唘-tabbar椤甸潰鐨勮矾鐢卞湴鍧�锛岃鍦板潃娌℃湁璺緞鍓嶉潰鐨�"/" + let pages = getCurrentPages(); + // 椤甸潰鏍堜腑鐨勬渶鍚庝竴涓嵆涓洪」涓哄綋鍓嶉〉闈紝route灞炴�т负椤甸潰璺緞 + this.pageUrl = pages[pages.length - 1].route; + }, + computed: { + elIconPath() { + return (index) => { + // 鍘嗛亶u-tabbar鐨勬瘡涓�椤筰tem鏃讹紝鍒ゆ柇鏄惁浼犲叆浜唒agePath鍙傛暟锛屽鏋滀紶鍏ヤ簡 + // 鍜宒ata涓殑pageUrl鍙傛暟瀵规瘮锛屽鏋滅浉绛夛紝鍗冲彲鍒ゆ柇褰撳墠鐨刬tem瀵瑰簲褰撳墠鐨則abbar椤甸潰锛岃缃珮浜浘鏍� + // 閲囩敤杩欎釜鏂规硶锛屽彲浠ユ棤闇�浣跨敤v-model缁戝畾鐨剉alue鍊� + let pagePath = this.list[index].pagePath; + // 濡傛灉瀹氫箟浜唒agePath灞炴�э紝鎰忓懗鐫�浣跨敤绯荤粺鑷甫tabbar鏂规锛屽惁鍒欎娇鐢ㄤ竴涓〉闈㈢敤鍑犱釜缁勪欢妯℃嫙tabbar椤甸潰鐨勬柟妗� + // 杩欎袱涓柟妗堝澶勭悊tabbar item鐨勬縺娲讳笌鍚︽柟寮忎笉涓�鏍� + if(pagePath) { + if(pagePath == this.pageUrl || pagePath == '/' + this.pageUrl) { + return this.list[index].selectedIconPath; + } else { + return this.list[index].iconPath; + } + } else { + // 鏅�氭柟妗堜腑锛岀储寮曠瓑浜巚-model鍊兼椂锛屽嵆涓烘縺娲婚」 + return index == this.value ? this.list[index].selectedIconPath : this.list[index].iconPath + } + } + }, + elColor() { + return (index) => { + // 鍒ゆ柇鏂规硶鍚岀悊浜巈lIconPath + let pagePath = this.list[index].pagePath; + if(pagePath) { + if(pagePath == this.pageUrl || pagePath == '/' + this.pageUrl) return this.activeColor; + else return this.inactiveColor; + } else { + return index == this.value ? this.activeColor : this.inactiveColor; + } + } + } + }, + mounted() { + this.midButton && this.getMidButtonLeft(); + }, + methods: { + async clickHandler(index) { + if(this.beforeSwitch && typeof(this.beforeSwitch) === 'function') { + // 鎵ц鍥炶皟锛屽悓鏃朵紶鍏ョ储寮曞綋浣滃弬鏁� + // 鍦ㄥ井淇★紝鏀粯瀹濈瓑鐜(H5姝e父)锛屼細瀵艰嚧鐖剁粍浠跺畾涔夌殑customBack()鍑芥暟浣撲腑鐨則his鍙樻垚瀛愮粍浠剁殑this + // 閫氳繃bind()鏂规硶锛岀粦瀹氱埗缁勪欢鐨則his锛岃this.customBack()鐨則his涓虹埗缁勪欢鐨勪笂涓嬫枃 + let beforeSwitch = this.beforeSwitch.bind(this.$u.$parent.call(this))(index); + // 鍒ゆ柇鏄惁杩斿洖浜唒romise + if (!!beforeSwitch && typeof beforeSwitch.then === 'function') { + await beforeSwitch.then(res => { + // promise杩斿洖鎴愬姛锛� + this.switchTab(index); + }).catch(err => { + + }) + } else if(beforeSwitch === true) { + // 濡傛灉杩斿洖true + this.switchTab(index); + } + } else { + this.switchTab(index); + } + }, + // 鍒囨崲tab + switchTab(index) { + // 鍙戝嚭浜嬩欢鍜屼慨鏀箆-model缁戝畾鐨勫�� + this.$emit('change', index); + // 濡傛灉鏈夐厤缃畃agePath灞炴�э紝浣跨敤uni.switchTab杩涜璺宠浆 + if(this.list[index].pagePath) { + uni.switchTab({ + url: this.list[index].pagePath + }) + } else { + // 濡傛灉閰嶇疆浜唒apgePath灞炴�э紝灏嗕笉浼氬弻鍚戠粦瀹歷-model浼犲叆鐨剉alue鍊� + // 鍥犱负杩欎釜妯″紡涓嬶紝涓嶅啀闇�瑕乿-model缁戝畾鐨剉alue鍊间簡锛岃�屾槸閫氳繃getCurrentPages()閫傞厤 + this.$emit('input', index); + } + }, + // 璁$畻瑙掓爣鐨剅ight鍊� + getOffsetRight(count, isDot) { + // 鐐圭被鍨嬶紝count澶т簬9(涓や綅鏁�)锛屽垎鍒缃笉鍚岀殑right鍊硷紝閬垮厤浣嶇疆澶尋 + if(isDot) { + return -20; + } else if(count > 9) { + return -40; + } else { + return -30; + } + }, + // 鑾峰彇鍑歌捣鎸夐挳澶栧眰鍏冪礌鐨刲eft鍊硷紝璁╁叾姘村钩灞呬腑 + getMidButtonLeft() { + let windowWidth = this.$u.sys().windowWidth; + // 鐢变簬瀹夊崜涓璫ss璁$畻left: 50%鐨勭粨鏋滀笉鍑嗙‘锛屾晠鐢╦s璁$畻 + this.midButtonLeft = (windowWidth / 2) + 'px'; + } + } + } +</script> + +<style scoped lang="scss"> + @import "../../libs/css/style.components.scss"; + .u-fixed-placeholder { + /* #ifndef APP-NVUE */ + box-sizing: content-box; + /* #endif */ + } + + .u-tabbar { + + &__content { + @include vue-flex; + align-items: center; + position: relative; + position: fixed; + bottom: 0; + left: 0; + width: 100%; + z-index: 998; + /* #ifndef APP-NVUE */ + box-sizing: content-box; + /* #endif */ + + &__circle__border { + border-radius: 100%; + width: 110rpx; + height: 110rpx; + top: -48rpx; + position: absolute; + z-index: 4; + background-color: #ffffff; + // 鐢变簬瀹夊崜鐨勬棤鑳斤紝瀵艰嚧鍙湁3涓猼abbar item鏃讹紝姝ss璁$畻鏂瑰紡鏈夎宸� + // 鏁呬娇鐢╦s璁$畻鐨勫舰寮忔潵瀹氫綅锛屾澶勪笉娉ㄩ噴锛屾槸鍥犱负js璁$畻鏈夊欢鍚庯紝閬垮厤鍑虹幇浣嶇疆闂姩 + left: 50%; + transform: translateX(-50%); + + &:after { + border-radius: 100px; + } + } + + &__item { + flex: 1; + justify-content: center; + height: 100%; + padding: 12rpx 0; + @include vue-flex; + flex-direction: column; + align-items: center; + position: relative; + + &__button { + position: absolute; + top: 14rpx; + left: 50%; + transform: translateX(-50%); + } + + &__text { + color: $u-content-color; + font-size: 26rpx; + line-height: 28rpx; + position: absolute; + bottom: 14rpx; + left: 50%; + transform: translateX(-50%); + width: 100%; + text-align: center; + } + } + + &__circle { + position: relative; + @include vue-flex; + flex-direction: column; + justify-content: space-between; + z-index: 10; + /* #ifndef APP-NVUE */ + height: calc(100% - 1px); + /* #endif */ + + &__button { + width: 90rpx; + height: 90rpx; + border-radius: 100%; + @include vue-flex; + justify-content: center; + align-items: center; + position: absolute; + background-color: #ffffff; + top: -40rpx; + left: 50%; + z-index: 6; + transform: translateX(-50%); + } + } + } + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-table/u-table.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-table/u-table.vue" new file mode 100644 index 0000000..79df16f --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-table/u-table.vue" @@ -0,0 +1,84 @@ +<template> + <view class="u-table" :style="[tableStyle]"> + <slot /> + </view> +</template> + +<script> + /** + * table 琛ㄦ牸 + * @description 琛ㄦ牸缁勪欢涓�鑸敤浜庡睍绀哄ぇ閲忕粨鏋勫寲鏁版嵁鐨勫満鏅� + * @tutorial https://www.uviewui.com/components/table.html + * @property {String} border-color 琛ㄦ牸杈规鐨勯鑹诧紙榛樿#e4e7ed锛� + * @property {String} bg-color 琛ㄦ牸鐨勮儗鏅鑹诧紙榛樿#ffffff锛� + * @property {String} align 鍗曞厓鏍肩殑鍐呭瀵归綈鏂瑰紡锛屼綔鐢ㄧ被浼糲ss鐨則ext-align锛堥粯璁enter锛� + * @property {String} padding 鍗曞厓鏍肩殑鍐呰竟璺濓紝鍚宑ss鐨刾adding鍐欐硶锛堥粯璁�10rpx 0锛� + * @property {String Number} font-size 鍗曞厓鏍煎瓧浣撳ぇ灏忥紝鍗曚綅rpx锛堥粯璁�28锛� + * @property {String} color 鍗曞厓鏍煎瓧浣撻鑹诧紙榛樿#606266锛� + * @property {Object} th-style th鍗曞厓鏍肩殑鏍峰紡锛屽璞″舰寮�(灏唗h鎵�闇�鍙傛暟鏀惧湪table缁勪欢锛屾槸涓轰簡閬垮厤姣忎竴涓猼h缁勪欢瑕佸啓涓�閬嶏級 + * @event {Function} click 鐐瑰嚮缁勪欢鏃惰Е鍙� + * @event {Function} close 鐐瑰嚮鍏抽棴鎸夐挳鏃惰Е鍙� + * @example <u-table></u-table> + */ + export default { + name: "u-table", + props: { + borderColor: { + type: String, + default: '#e4e7ed' + }, + align: { + type: String, + default: 'center' + }, + // td鐨勫唴杈硅窛 + padding: { + type: String, + default: '10rpx 6rpx' + }, + // 瀛椾綋澶у皬 + fontSize: { + type: [String, Number], + default: 28 + }, + // 瀛椾綋棰滆壊 + color: { + type: String, + default: '#606266' + }, + // th鐨勮嚜瀹氫箟鏍峰紡 + thStyle: { + type: Object, + default () { + return {} + } + }, + // table鐨勮儗鏅鑹� + bgColor: { + type: String, + default: '#ffffff' + } + }, + data() { + return {} + }, + computed: { + tableStyle() { + let style = {}; + style.borderLeft = `solid 1px ${this.borderColor}`; + style.borderTop = `solid 1px ${this.borderColor}`; + style.backgroundColor = this.bgColor;; + return style; + } + } + } +</script> + +<style lang="scss" scoped> + @import "../../libs/css/style.components.scss"; + + .u-table { + width: 100%; + box-sizing: border-box; + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-tabs-swiper/u-tabs-swiper.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-tabs-swiper/u-tabs-swiper.vue" new file mode 100644 index 0000000..a53e261 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-tabs-swiper/u-tabs-swiper.vue" @@ -0,0 +1,488 @@ +<template> + <view class="u-tabs" :style="{ + zIndex: zIndex, + background: bgColor + }"> + <scroll-view scroll-x class="u-scroll-view" :scroll-left="scrollLeft" scroll-with-animation :style="{ zIndex: zIndex + 1 }"> + <view class="u-tabs-scroll-box" :class="{'u-tabs-scorll-flex': !isScroll}"> + <view class="u-tabs-item" :style="[tabItemStyle(index)]" + v-for="(item, index) in getTabs" :key="index" :class="[preId + index]" @tap="emit(index)"> + <u-badge :count="item[count] || item['count'] || 0" :offset="offset" size="mini"></u-badge> + {{ item[name] || item['name']}} + </view> + <view v-if="showBar" class="u-scroll-bar" :style="[tabBarStyle]"></view> + </view> + </scroll-view> + </view> +</template> + +<script> + import colorGradient from '../../libs/function/colorGradient'; + let color = colorGradient; + const { windowWidth } = uni.getSystemInfoSync(); + const preId = 'UEl_'; + + /** + * tabsSwiper 鍏ㄥ睆閫夐」鍗� + * @description 璇ョ粍浠跺唴閮ㄥ疄鐜颁富瑕佷緷鎵樹簬uniapp鐨剆croll-view鍜宻wiper缁勪欢锛屼富瑕佺壒鑹叉槸鍒囨崲杩囩▼涓紝tabsSwiper鏂囧瓧鐨勯鑹插彲浠ユ笎鍙橈紝搴曢儴婊戝潡鍙互 璺熼殢寮忔粦鍔紝娲诲姩tab婊氬姩灞呬腑绛夈�傚簲鐢ㄥ満鏅彲浠ョ敤浜庨渶瑕佸乏鍙冲垏鎹㈤〉闈紝姣斿鍟嗗煄鐨勮鍗曚腑蹇�(寰呮敹璐�-寰呬粯娆�-寰呰瘎浠�-宸查��璐�)绛夊簲鐢ㄥ満鏅�� + * @tutorial https://www.uviewui.com/components/tabsSwiper.html + * @property {Boolean} is-scroll tabs鏄惁鍙互宸﹀彸鎷栧姩锛堥粯璁rue锛� + * @property {Array} list 鏍囩鏁扮粍锛屽厓绱犱负瀵硅薄锛屽[{name: '鎺ㄨ崘'}] + * @property {String Number} current 鎸囧畾鍝釜tab涓烘縺娲荤姸鎬侊紙榛樿0锛� + * @property {String Number} height 瀵艰埅鏍忕殑楂樺害锛屽崟浣峳px锛堥粯璁�80锛� + * @property {String Number} font-size tab鏂囧瓧澶у皬锛屽崟浣峳px锛堥粯璁�30锛� + * @property {String Number} swiper-width tabs缁勪欢澶栭儴swiper鐨勫搴︼紝榛樿涓哄睆骞曞搴︼紝鍗曚綅rpx锛堥粯璁�750锛� + * @property {String} active-color 婊戝潡鍜屾縺娲籺ab鏂囧瓧鐨勯鑹诧紙榛樿#2979ff锛� + * @property {String} inactive-color tabs鏂囧瓧棰滆壊锛堥粯璁�#303133锛� + * @property {String Number} bar-width 婊戝潡瀹藉害锛屽崟浣峳px锛堥粯璁�40锛� + * @property {String Number} bar-height 婊戝潡楂樺害锛屽崟浣峳px锛堥粯璁�6锛� + * @property {Object} bar-style 搴曢儴婊戝潡鐨勬牱寮忥紝瀵硅薄褰㈠紡 + * @property {Object} active-item-style 娲诲姩tabs item鐨勬牱寮忥紝瀵硅薄褰㈠紡 + * @property {Boolean} show-bar 鏄惁鏄剧ず搴曢儴鐨勬粦鍧楋紙榛樿true锛� + * @property {String Number} gutter 鍗曚釜tab鏍囩鐨勫乏鍙冲唴杈硅窛涔嬪拰锛屽崟浣峳px锛堥粯璁�40锛� + * @property {String} bg-color tabs瀵艰埅鏍忕殑鑳屾櫙棰滆壊锛堥粯璁�#ffffff锛� + * @property {String} name 缁勪欢鍐呴儴璇诲彇鐨刲ist鍙傛暟涓殑灞炴�у悕锛岃瀹樼綉璇存槑锛堥粯璁ame锛� + * @property {String} count 缁勪欢鍐呴儴璇诲彇鐨刲ist鍙傛暟涓殑灞炴�у悕锛坆adge寰芥爣鏁帮級锛屽悓name灞炴�х殑浣跨敤锛岃瀹樼綉璇存槑锛堥粯璁ount锛� + * @property {Array} offset 璁剧疆badge寰芥爣鏁扮殑浣嶇疆鍋忕Щ锛屾牸寮忎负 [x, y]锛屼篃鍗宠缃殑涓簍op鍜宺ight鐨勫�硷紝鍗曚綅rpx锛堥粯璁5, 20]锛� + * @property {Boolean} bold 婵�娲婚�夐」鐨勫瓧浣撴槸鍚﹀姞绮楋紙榛樿true锛� + * @event {Function} change 鐐瑰嚮鏍囩鏃惰Е鍙� + * @example <u-tabs-swiper ref="tabs" :list="list" :is-scroll="false"></u-tabs-swiper> + */ + export default { + name: "u-tabs-swiper", + props: { + // 瀵艰埅鑿滃崟鏄惁闇�瑕佹粴鍔紝濡傚彧鏈�2鎴栬��3涓殑鏃跺�欙紝灏变笉闇�瑕佹粴鍔ㄤ簡锛屾鏃朵娇鐢╢lex骞冲垎tab鐨勫搴� + isScroll: { + type: Boolean, + default: true + }, + //闇�寰幆鐨勬爣绛惧垪琛� + list: { + type: Array, + default () { + return []; + } + }, + // 褰撳墠娲诲姩tab鐨勭储寮� + current: { + type: [Number, String], + default: 0 + }, + // 瀵艰埅鏍忕殑楂樺害鍜岃楂橈紝鍗曚綅rpx + height: { + type: [Number, String], + default: 80 + }, + // 瀛椾綋澶у皬锛屽崟浣峳px + fontSize: { + type: [Number, String], + default: 30 + }, + // 杩囨浮鍔ㄧ敾鏃堕暱, 鍗曚綅s + // duration: { + // type: [Number, String], + // default: 0.5 + // }, + swiperWidth: { + //line3鐢熸晥, 澶栭儴swiper鐨勫搴�, 鍗曚綅rpx + type: [String, Number], + default: 750 + }, + // 閫変腑椤圭殑涓婚棰滆壊 + activeColor: { + type: String, + default: '#2979ff' + }, + // 鏈�変腑椤圭殑棰滆壊 + inactiveColor: { + type: String, + default: '#303133' + }, + // 鑿滃崟搴曢儴绉诲姩鐨刡ar鐨勫搴︼紝鍗曚綅rpx + barWidth: { + type: [Number, String], + default: 40 + }, + // 绉诲姩bar鐨勯珮搴� + barHeight: { + type: [Number, String], + default: 6 + }, + // 鍗曚釜tab鐨勫乏鎴栧彸鍐呰竟璺濓紙鍚勫崰涓�鍗婏級锛屽崟浣峳px + gutter: { + type: [Number, String], + default: 40 + }, + // 濡傛灉鏄粷瀵瑰畾浣嶏紝娣诲姞z-index鍊� + zIndex: { + type: [Number, String], + default: 1 + }, + // 瀵艰埅鏍忕殑鑳屾櫙棰滆壊 + bgColor: { + type: String, + default: '#ffffff' + }, + //婊氬姩鑷充腑蹇冪洰鏍囩被鍨� + autoCenterMode: { + type: String, + default: 'window' + }, + // 璇诲彇浼犲叆鐨勬暟缁勫璞$殑灞炴��(tab鍚嶇О) + name: { + type: String, + default: 'name' + }, + // 璇诲彇浼犲叆鐨勬暟缁勫璞$殑灞炴��(寰芥爣鏁�) + count: { + type: String, + default: 'count' + }, + // 寰芥爣鏁颁綅缃亸绉� + offset: { + type: Array, + default: () => { + return [5, 20] + } + }, + // 娲诲姩tab瀛椾綋鏄惁鍔犵矖 + bold: { + type: Boolean, + default: true + }, + // 褰撳墠娲诲姩tab item鐨勬牱寮� + activeItemStyle: { + type: Object, + default() { + return {} + } + }, + // 鏄惁鏄剧ず搴曢儴鐨勬粦鍧� + showBar: { + type: Boolean, + default: true + }, + // 搴曢儴婊戝潡鐨勮嚜瀹氫箟鏍峰紡 + barStyle: { + type: Object, + default() { + return {} + } + } + }, + data() { + return { + scrollLeft: 0, // 婊氬姩scroll-view鐨勫乏杈规粴鍔ㄨ窛绂� + tabQueryInfo: [], // 瀛樻斁瀵箃ab鑿滃崟鏌ヨ鍚庣殑鑺傜偣淇℃伅 + windowWidth: 0, // 灞忓箷瀹藉害锛屽崟浣嶄负px + //scrollBarLeft: 0, // 绉诲姩bar闇�瑕侀�氳繃translateX()绉诲姩鐨勮窛绂� + animationFinishCurrent: this.current, + componentsWidth: 0, + line3AddDx: 0, + line3Dx: 0, + preId, + sW: 0, + tabsInfo: [], + colorGradientArr: [], + colorStep: 100 // 涓や釜棰滆壊涔嬮棿鐨勬笎鍙樼瓑鍒� + }; + }, + computed: { + // 鑾峰彇褰撳墠娲昏穬鐨刢urrent鍊� + getCurrent() { + const current = Number(this.current); + // 鍒ゆ柇鏄惁瓒呭嚭杈圭晫 + if (current > this.getTabs.length - 1) { + return this.getTabs.length - 1; + } + if (current < 0) return 0; + return current; + }, + getTabs() { + return this.list; + }, + // 婊戝潡闇�瑕佺Щ鍔ㄧ殑璺濈 + scrollBarLeft() { + return Number(this.line3Dx) + Number(this.line3AddDx); + }, + // 婊戝潡鐨勫搴﹁浆涓簆x鍗曚綅 + barWidthPx() { + return uni.upx2px(this.barWidth); + }, + // tab鐨勬牱寮� + tabItemStyle() { + return (index) => { + let style = { + height: this.height + 'rpx', + lineHeight: this.height + 'rpx', + padding: `0 ${this.gutter / 2}rpx`, + color: this.tabsInfo.length > 0 ? (this.tabsInfo[index] ? this.tabsInfo[index].color : this.activeColor) : this.inactiveColor, + fontSize: this.fontSize + 'rpx', + zIndex: this.zIndex + 2, + fontWeight: (index == this.getCurrent && this.bold) ? 'bold' : 'normal' + }; + if(index == this.getCurrent) { + // 缁欓�変腑鐨則ab item娣诲姞澶栭儴鑷畾涔夌殑鏍峰紡 + style = Object.assign(style, this.activeItemStyle); + } + return style; + } + }, + // 搴曢儴婊戝潡鐨勬牱寮� + tabBarStyle() { + let style = { + width: this.barWidthPx + 'px', + height: this.barHeight + 'rpx', + borderRadius: '100px', + backgroundColor: this.activeColor, + left: this.scrollBarLeft + 'px' + }; + return Object.assign(style, this.barStyle); + } + }, + watch: { + current(n, o) { + this.change(n); + this.setFinishCurrent(n); + }, + list() { + this.$nextTick(() => { + this.init(); + }) + } + }, + mounted() { + this.init(); + }, + methods: { + async init() { + this.countPx(); + await this.getTabsInfo(); + this.countLine3Dx(); + this.getQuery(() => { + this.setScrollViewToCenter(); + }); + // 棰滆壊娓愬彉杩囩▼鏁扮粍 + this.colorGradientArr = color.colorGradient(this.inactiveColor, this.activeColor, this.colorStep); + }, + // 鑾峰彇鍚勪釜tab鐨勮妭鐐逛俊鎭� + getTabsInfo() { + return new Promise((resolve, reject) => { + let view = uni.createSelectorQuery().in(this); + for (let i = 0; i < this.list.length; i++) { + view.select('.' + preId + i).boundingClientRect(); + } + view.exec(res => { + const arr = []; + for (let i = 0; i < res.length; i++) { + // 缁欐瘡涓猼ab娣诲姞鍏舵枃瀛楅鑹插睘鎬� + res[i].color = this.inactiveColor; + // 褰撳墠tab鐩存帴璧嬩簣activeColor + if (i == this.getCurrent) res[i].color = this.activeColor; + arr.push(res[i]); + } + this.tabsInfo = arr; + resolve(); + }); + }) + }, + // 褰搒wiper婊戝姩缁撴潫锛岃绠楁粦鍧楁渶缁堣鍋滅暀鐨勪綅缃� + countLine3Dx() { + const tab = this.tabsInfo[this.animationFinishCurrent]; + // 璁╂粦鍧椾腑蹇冪偣鍜屽綋鍓峵ab涓績閲嶅悎 + if (tab) this.line3Dx = tab.left + tab.width / 2 - this.barWidthPx / 2 - this.tabsInfo[0].left; + }, + countPx() { + // swiper瀹藉害鐢眗px杞负px鍗曚綅锛屽洜涓篸x绛夛紝閮芥槸px鍗曚綅 + this.sW = uni.upx2px(Number(this.swiperWidth)); + }, + emit(index) { + this.$emit('change', index); + }, + change() { + this.setScrollViewToCenter(); + }, + getQuery(cb) { + try { + let view = uni.createSelectorQuery().in(this).select('.u-tabs'); + view.fields({ + size: true + }, + data => { + if (data) { + this.componentsWidth = data.width; + if (cb && typeof cb === 'function') cb(data); + } else { + this.getQuery(cb); + } + } + ).exec(); + } catch (e) { + this.componentsWidth = windowWidth; + } + }, + // 鎶婃椿鍔╰ab绉诲姩鍒板睆骞曚腑蹇冪偣 + setScrollViewToCenter() { + let tab; + tab = this.tabsInfo[this.animationFinishCurrent]; + if (tab) { + let tabCenter = tab.left + tab.width / 2; + let fatherWidth; + // 娲诲姩tab绉诲姩鍒颁腑蹇冩椂锛屼互灞忓箷杩樻槸tab缁勪欢涓哄搴︿负鍩哄噯 + if (this.autoCenterMode === 'window') { + fatherWidth = windowWidth; + } else { + fatherWidth = this.componentsWidth; + } + this.scrollLeft = tabCenter - fatherWidth / 2; + } + }, + setDx(dx) { + let nextTabIndex = dx > 0 ? this.animationFinishCurrent + 1 : this.animationFinishCurrent - 1; + // 鍒ゆ柇绱㈠紩鏄惁瓒呭嚭杈圭晫 + nextTabIndex = nextTabIndex <= 0 ? 0 : nextTabIndex; + nextTabIndex = nextTabIndex >= this.list.length ? this.list.length - 1 : nextTabIndex; + const tab = this.tabsInfo[nextTabIndex]; + // 褰撳墠tab涓績鐐箈杞村潗鏍� + let nowTab = this.tabsInfo[this.animationFinishCurrent]; + let nowTabX = nowTab.left + nowTab.width / 2; + // 涓嬩竴涓猼ab + let nextTab = this.tabsInfo[nextTabIndex]; + let nextTabX = nextTab.left + nextTab.width / 2; + // 涓や釜tab涔嬮棿鐨勮窛绂伙紝鍥犱负涓嬩竴涓猼ab鍙兘鍦ㄥ綋鍓峵ab鐨勫乏杈规垨鑰呭彸杈癸紝鍙栫粷瀵瑰�煎嵆鍙� + let distanceX = Math.abs(nextTabX - nowTabX); + this.line3AddDx = (dx / this.sW) * distanceX; + this.setTabColor(this.animationFinishCurrent, nextTabIndex, dx); + }, + // 璁剧疆tab鐨勯鑹� + setTabColor(nowTabIndex, nextTabIndex, dx) { + let colorIndex = Math.abs(Math.ceil((dx / this.sW) * 100)); + let colorLength = this.colorGradientArr.length; + // 澶勭悊瓒呭嚭绱㈠紩杈圭晫鐨勬儏鍐� + colorIndex = colorIndex >= colorLength ? colorLength - 1 : colorIndex <= 0 ? 0 : colorIndex; + // 璁剧疆涓嬩竴涓猼ab鐨勯鑹� + this.tabsInfo[nextTabIndex].color = this.colorGradientArr[colorIndex]; + // 璁剧疆褰撳墠tab鐨勯鑹� + this.tabsInfo[nowTabIndex].color = this.colorGradientArr[colorLength - 1 - colorIndex]; + }, + // swiper缁撴潫婊戝姩 + setFinishCurrent(current) { + // 濡傛灉婊戝姩鐨勭储寮曚笉涓�鑷达紝淇敼tab棰滆壊鍙樺寲锛屽洜涓哄彲鑳戒細鏈夌洿鎺ョ偣鍑籺ab鐨勬儏鍐� + this.tabsInfo.map((val, index) => { + if (current == index) val.color = this.activeColor; + else val.color = this.inactiveColor; + return val; + }); + this.line3AddDx = 0; + this.animationFinishCurrent = current; + this.countLine3Dx(); + } + } + }; +</script> + +<style scoped lang="scss"> + @import "../../libs/css/style.components.scss"; + + view, + scroll-view { + box-sizing: border-box; + } + + .u-tabs { + width: 100%; + transition-property: background-color, color; + } + + /* #ifndef APP-NVUE */ + ::-webkit-scrollbar, + ::-webkit-scrollbar, + ::-webkit-scrollbar { + display: none; + width: 0 !important; + height: 0 !important; + -webkit-appearance: none; + background: transparent; + } + /* #endif */ + + /* #ifdef H5 */ + // 閫氳繃鏍峰紡绌块�忥紝闅愯棌H5涓嬶紝scroll-view涓嬬殑婊氬姩鏉� + scroll-view ::v-deep ::-webkit-scrollbar { + display: none; + width: 0 !important; + height: 0 !important; + -webkit-appearance: none; + background: transparent; + } + + /* #endif */ + + .u-scroll-view { + width: 100%; + white-space: nowrap; + position: relative; + } + + .u-tabs-scroll-box { + position: relative; + } + + .u-tabs-scorll-flex { + @include vue-flex; + justify-content: space-between; + } + + .u-tabs-scorll-flex .u-tabs-item { + flex: 1; + } + + .u-tabs-item { + position: relative; + display: inline-block; + text-align: center; + transition-property: background-color, color, font-weight; + } + + .content { + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } + + .boxStyle { + pointer-events: none; + position: absolute; + transition-property: all; + } + + .boxStyle2 { + pointer-events: none; + position: absolute; + bottom: 0; + transition-property: all; + transform: translateY(-100%); + } + + .itemBackgroundBox { + pointer-events: none; + position: absolute; + top: 0; + transition-property: left, background-color; + @include vue-flex; + flex-direction: row; + justify-content: center; + align-items: center; + } + + .itemBackground { + height: 100%; + width: 100%; + transition-property: all; + } + + .u-scroll-bar { + position: absolute; + bottom: 4rpx; + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-tabs/u-tabs.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-tabs/u-tabs.vue" new file mode 100644 index 0000000..d25d616 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-tabs/u-tabs.vue" @@ -0,0 +1,368 @@ +<template> + <view class="u-tabs" :style="{ + background: bgColor + }"> + <!-- $u.getRect()瀵圭粍浠舵牴鑺傜偣鏃犳晥锛屽洜涓哄啓浜�.in(this)锛屾晠杩欓噷鑾峰彇鍐呭眰鎺ョ偣灏哄 --> + <view :id="id"> + <scroll-view scroll-x class="u-scroll-view" :scroll-left="scrollLeft" scroll-with-animation> + <view class="u-scroll-box" :class="{'u-tabs-scorll-flex': !isScroll}"> + <view class="u-tab-item u-line-1" :id="'u-tab-item-' + index" v-for="(item, index) in list" :key="index" @tap="clickTab(index)" + :style="[tabItemStyle(index)]"> + <u-badge :count="item[count] || item['count'] || 0" :offset="offset" size="mini"></u-badge> + {{ item[name] || item['name']}} + </view> + <view v-if="showBar" class="u-tab-bar" :style="[tabBarStyle]"></view> + </view> + </scroll-view> + </view> + </view> +</template> + +<script> + /** + * tabs 鏍囩 + * @description 璇ョ粍浠讹紝鏄竴涓猼abs鏍囩缁勪欢锛屽湪鏍囩澶氱殑鏃跺�欙紝鍙互閰嶇疆涓哄乏鍙虫粦鍔紝鏍囩灏戠殑鏃跺�欙紝鍙互绂佹婊戝姩銆� 璇ョ粍浠剁殑涓�涓壒鐐规槸閰嶇疆涓烘粴鍔ㄦā寮忔椂锛屾縺娲荤殑tab浼氳嚜鍔ㄧЩ鍔ㄥ埌缁勪欢鐨勪腑闂翠綅缃�� + * @tutorial https://www.uviewui.com/components/tabs.html + * @property {Boolean} is-scroll tabs鏄惁鍙互宸﹀彸鎷栧姩锛堥粯璁rue锛� + * @property {Array} list 鏍囩鏁扮粍锛屽厓绱犱负瀵硅薄锛屽[{name: '鎺ㄨ崘'}] + * @property {String Number} current 鎸囧畾鍝釜tab涓烘縺娲荤姸鎬侊紙榛樿0锛� + * @property {String Number} height 瀵艰埅鏍忕殑楂樺害锛屽崟浣峳px锛堥粯璁�80锛� + * @property {String Number} font-size tab鏂囧瓧澶у皬锛屽崟浣峳px锛堥粯璁�30锛� + * @property {String Number} duration 婊戝潡绉诲姩涓�娆℃墍闇�鐨勬椂闂达紝鍗曚綅绉掞紙榛樿0.5锛� + * @property {String} active-color 婊戝潡鍜屾縺娲籺ab鏂囧瓧鐨勯鑹诧紙榛樿#2979ff锛� + * @property {String} inactive-color tabs鏂囧瓧棰滆壊锛堥粯璁�#303133锛� + * @property {String Number} bar-width 婊戝潡瀹藉害锛屽崟浣峳px锛堥粯璁�40锛� + * @property {Object} active-item-style 娲诲姩tabs item鐨勬牱寮忥紝瀵硅薄褰㈠紡 + * @property {Object} bar-style 搴曢儴婊戝潡鐨勬牱寮忥紝瀵硅薄褰㈠紡 + * @property {Boolean} show-bar 鏄惁鏄剧ず搴曢儴鐨勬粦鍧楋紙榛樿true锛� + * @property {String Number} bar-height 婊戝潡楂樺害锛屽崟浣峳px锛堥粯璁�6锛� + * @property {String Number} item-width 鏍囩鐨勫搴︼紙榛樿auto锛� + * @property {String Number} gutter 鍗曚釜tab鏍囩鐨勫乏鍙冲唴杈硅窛涔嬪拰锛屽崟浣峳px锛堥粯璁�40锛� + * @property {String} bg-color tabs瀵艰埅鏍忕殑鑳屾櫙棰滆壊锛堥粯璁�#ffffff锛� + * @property {String} name 缁勪欢鍐呴儴璇诲彇鐨刲ist鍙傛暟涓殑灞炴�у悕锛坱ab鍚嶇О锛夛紝瑙佸畼缃戣鏄庯紙榛樿name锛� + * @property {String} count 缁勪欢鍐呴儴璇诲彇鐨刲ist鍙傛暟涓殑灞炴�у悕锛坆adge寰芥爣鏁帮級锛屽悓name灞炴�х殑浣跨敤锛岃瀹樼綉璇存槑锛堥粯璁ount锛� + * @property {Array} offset 璁剧疆badge寰芥爣鏁扮殑浣嶇疆鍋忕Щ锛屾牸寮忎负 [x, y]锛屼篃鍗宠缃殑涓簍op鍜宺ight鐨勫�硷紝鍗曚綅rpx锛堥粯璁5, 20]锛� + * @property {Boolean} bold 婵�娲婚�夐」鐨勫瓧浣撴槸鍚﹀姞绮楋紙榛樿true锛� + * @event {Function} change 鐐瑰嚮鏍囩鏃惰Е鍙� + * @example <u-tabs ref="tabs" :list="list" :is-scroll="false"></u-tabs> + */ + export default { + name: "u-tabs", + props: { + // 瀵艰埅鑿滃崟鏄惁闇�瑕佹粴鍔紝濡傚彧鏈�2鎴栬��3涓殑鏃跺�欙紝灏变笉闇�瑕佹粴鍔ㄤ簡锛屾鏃朵娇鐢╢lex骞冲垎tab鐨勫搴� + isScroll: { + type: Boolean, + default: true + }, + //闇�寰幆鐨勬爣绛惧垪琛� + list: { + type: Array, + default () { + return []; + } + }, + // 褰撳墠娲诲姩tab鐨勭储寮� + current: { + type: [Number, String], + default: 0 + }, + // 瀵艰埅鏍忕殑楂樺害鍜岃楂� + height: { + type: [String, Number], + default: 80 + }, + // 瀛椾綋澶у皬 + fontSize: { + type: [String, Number], + default: 30 + }, + // 杩囨浮鍔ㄧ敾鏃堕暱, 鍗曚綅ms + duration: { + type: [String, Number], + default: 0.5 + }, + // 閫変腑椤圭殑涓婚棰滆壊 + activeColor: { + type: String, + default: '#2979ff' + }, + // 鏈�変腑椤圭殑棰滆壊 + inactiveColor: { + type: String, + default: '#303133' + }, + // 鑿滃崟搴曢儴绉诲姩鐨刡ar鐨勫搴︼紝鍗曚綅rpx + barWidth: { + type: [String, Number], + default: 40 + }, + // 绉诲姩bar鐨勯珮搴� + barHeight: { + type: [String, Number], + default: 6 + }, + // 鍗曚釜tab鐨勫乏鎴栨湁鍐呰竟璺濓紙宸﹀彸鐩稿悓锛� + gutter: { + type: [String, Number], + default: 30 + }, + // 瀵艰埅鏍忕殑鑳屾櫙棰滆壊 + bgColor: { + type: String, + default: '#ffffff' + }, + // 璇诲彇浼犲叆鐨勬暟缁勫璞$殑灞炴��(tab鍚嶇О) + name: { + type: String, + default: 'name' + }, + // 璇诲彇浼犲叆鐨勬暟缁勫璞$殑灞炴��(寰芥爣鏁�) + count: { + type: String, + default: 'count' + }, + // 寰芥爣鏁颁綅缃亸绉� + offset: { + type: Array, + default: () => { + return [5, 20] + } + }, + // 娲诲姩tab瀛椾綋鏄惁鍔犵矖 + bold: { + type: Boolean, + default: true + }, + // 褰撳墠娲诲姩tab item鐨勬牱寮� + activeItemStyle: { + type: Object, + default() { + return {} + } + }, + // 鏄惁鏄剧ず搴曢儴鐨勬粦鍧� + showBar: { + type: Boolean, + default: true + }, + // 搴曢儴婊戝潡鐨勮嚜瀹氫箟鏍峰紡 + barStyle: { + type: Object, + default() { + return {} + } + }, + // 鏍囩鐨勫搴� + itemWidth: { + type: [Number, String], + default: 'auto' + } + }, + data() { + return { + scrollLeft: 0, // 婊氬姩scroll-view鐨勫乏杈规粴鍔ㄨ窛绂� + tabQueryInfo: [], // 瀛樻斁瀵箃ab鑿滃崟鏌ヨ鍚庣殑鑺傜偣淇℃伅 + componentWidth: 0, // 灞忓箷瀹藉害锛屽崟浣嶄负px + scrollBarLeft: 0, // 绉诲姩bar闇�瑕侀�氳繃translateX()绉诲姩鐨勮窛绂� + parentLeft: 0, // 鐖跺厓绱�(tabs缁勪欢)鍒板睆骞曞乏杈圭殑璺濈 + id: this.$u.guid(), // id鍊� + currentIndex: this.current, + barFirstTimeMove: true, // 婊戝潡绗竴娆$Щ鍔ㄦ椂(椤甸潰鍒氱敓鎴愭椂)锛屾棤闇�鍔ㄧ敾锛屽惁鍒欑粰浜烘�紓鐨勬劅瑙� + }; + }, + watch: { + // 鐩戝惉tab鐨勫彉鍖栵紝閲嶆柊璁$畻tab鑿滃崟鐨勫竷灞�淇℃伅锛屽洜涓哄疄闄呬娇鐢ㄤ腑鑿滃崟鍙兘鏄�氳繃 + // 鍚庡彴鑾峰彇鐨勶紙濡傛柊闂籥pp椤堕儴鐨勮彍鍗曪級锛岃幏鍙栬繑鍥為渶瑕佷竴瀹氭椂闂达紝鎵�浠ist鍙樺寲鏃讹紝閲嶆柊鑾峰彇甯冨眬淇℃伅 + list(n, o) { + // list鍙樺姩鏃讹紝閲嶅埗鍐呴儴绱㈠紩锛屽惁鍒欏彲鑳藉鑷磋秴鍑烘暟缁勮竟鐣岀殑鎯呭喌 + if(n.length !== o.length) this.currentIndex = 0; + // 鐢�$nextTick绛夊緟瑙嗗浘鏇存柊瀹屾瘯鍚庡啀璁$畻tab鐨勫眬閮ㄤ俊鎭紝鍚﹀垯鍙兘鍥犱负tab杩樻病鐢熸垚灏辫幏鍙栵紝灏变細鏈夐棶棰� + this.$nextTick(() => { + this.init(); + }); + }, + current: { + immediate: true, + handler(nVal, oVal) { + // 瑙嗗浘鏇存柊鍚庡啀鎵ц绉诲姩鎿嶄綔 + this.$nextTick(() => { + this.currentIndex = nVal; + this.scrollByIndex(); + }); + } + }, + }, + computed: { + // 绉诲姩bar鐨勬牱寮� + tabBarStyle() { + let style = { + width: this.barWidth + 'rpx', + transform: `translate(${this.scrollBarLeft}px, -100%)`, + // 婊戝潡鍦ㄩ〉闈㈡覆鏌撳悗绗竴娆℃粦鍔ㄦ椂锛屾棤闇�鍔ㄧ敾鏁堟灉 + 'transition-duration': `${this.barFirstTimeMove ? 0 : this.duration }s`, + 'background-color': this.activeColor, + height: this.barHeight + 'rpx', + // 璁剧疆涓�涓緢澶х殑鍊硷紝瀹冧細鑷姩鍙栬兘鐢ㄧ殑鏈�澶у�硷紝涓嶇敤楂樺害鐨勪竴鍗婏紝鏄洜涓洪珮搴﹀彲鑳芥槸鍗曟暟锛屼細鏈夊皬鏁板嚭鐜� + 'border-radius': `${this.barHeight / 2}px` + }; + Object.assign(style, this.barStyle); + return style; + }, + // tab鐨勬牱寮� + tabItemStyle() { + return (index) => { + let style = { + height: this.height + 'rpx', + 'line-height': this.height + 'rpx', + 'font-size': this.fontSize + 'rpx', + 'transition-duration': `${this.duration}s`, + padding: this.isScroll ? `0 ${this.gutter}rpx` : '', + flex: this.isScroll ? 'auto' : '1', + width: this.$u.addUnit(this.itemWidth) + }; + // 瀛椾綋鍔犵矖 + if (index == this.currentIndex && this.bold) style.fontWeight = 'bold'; + if (index == this.currentIndex) { + style.color = this.activeColor; + // 缁欓�変腑鐨則ab item娣诲姞澶栭儴鑷畾涔夌殑鏍峰紡 + style = Object.assign(style, this.activeItemStyle); + } else { + style.color = this.inactiveColor; + } + return style; + } + } + }, + methods: { + // 璁剧疆涓�涓猧nit鏂规硶锛屾柟渚垮澶勮皟鐢� + async init() { + // 鑾峰彇tabs缁勪欢鐨勫昂瀵镐俊鎭� + let tabRect = await this.$uGetRect('#' + this.id); + // tabs缁勪欢璺濈灞忓箷宸﹁竟鐨勫搴� + this.parentLeft = tabRect.left; + // tabs缁勪欢鐨勫搴� + this.componentWidth = tabRect.width; + this.getTabRect(); + }, + // 鐐瑰嚮鏌愪竴涓猼ab鑿滃崟 + clickTab(index) { + // 鐐瑰嚮褰撳墠娲诲姩tab锛屼笉瑙﹀彂浜嬩欢 + if(index == this.currentIndex) return ; + // 鍙戦�佷簨浠剁粰鐖剁粍浠� + this.$emit('change', index); + }, + // 鏌ヨtab鐨勫竷灞�淇℃伅 + getTabRect() { + // 鍒涘缓鑺傜偣鏌ヨ + let query = uni.createSelectorQuery().in(this); + // 鍘嗛亶鎵�鏈塼ab锛岃繖閲屾槸鎵ц浜嗘煡璇紝鏈�缁堜娇鐢╡xec()浼氫竴娆℃�ц繑鍥炴煡璇㈢殑鏁扮粍缁撴灉 + for (let i = 0; i < this.list.length; i++) { + // 鍙size鍜宺ect涓や釜鍙傛暟 + query.select(`#u-tab-item-${i}`).fields({ + size: true, + rect: true + }); + } + // 鎵ц鏌ヨ锛屼竴娆℃�ц幏鍙栧涓粨鏋� + query.exec( + function(res) { + this.tabQueryInfo = res; + // 鍒濆鍖栨粴鍔ㄦ潯鍜岀Щ鍔╞ar鐨勪綅缃� + this.scrollByIndex(); + }.bind(this) + ); + }, + // 婊氬姩scroll-view锛岃娲诲姩鐨則ab澶勪簬灞忓箷鐨勪腑闂翠綅缃� + scrollByIndex() { + // 褰撳墠娲诲姩tab鐨勫竷灞�淇℃伅锛屾湁tab鑿滃崟鐨剋idth鍜宭eft(涓哄厓绱犲乏杈圭晫鍒扮埗鍏冪礌宸﹁竟鐣岀殑璺濈)绛変俊鎭� + let tabInfo = this.tabQueryInfo[this.currentIndex]; + if (!tabInfo) return; + // 娲诲姩tab鐨勫搴� + let tabWidth = tabInfo.width; + // 娲诲姩item鐨勫乏杈瑰埌tabs缁勪欢宸﹁竟鐨勮窛绂伙紝鐢╥tem鐨刲eft鍑忓幓tabs鐨刲eft + let offsetLeft = tabInfo.left - this.parentLeft; + // 灏嗘椿鍔ㄧ殑tabs-item绉诲姩鍒板睆骞曟涓棿锛屽疄闄呬笂鏄scroll-view鐨勭Щ鍔� + let scrollLeft = offsetLeft - (this.componentWidth - tabWidth) / 2; + this.scrollLeft = scrollLeft < 0 ? 0 : scrollLeft; + // 褰撳墠娲诲姩item鐨勪腑鐐圭偣鍒板乏杈圭殑璺濈鍑忓幓婊戝潡瀹藉害鐨勪竴鍗婏紝鍗冲彲寰楀埌婊戝潡鎵�闇�鐨勭Щ鍔ㄨ窛绂� + let left = tabInfo.left + tabInfo.width / 2 - this.parentLeft; + // 璁$畻褰撳墠娲昏穬item鍒扮粍浠跺乏杈圭殑璺濈 + this.scrollBarLeft = left - uni.upx2px(this.barWidth) / 2; + // 绗竴娆$Щ鍔ㄦ粦鍧楃殑鏃跺�欙紝barFirstTimeMove涓簍rue锛屾斁鍒板欢鏃朵腑灏嗗叾璁剧疆false + // 寤舵椂鏄洜涓簊crollBarLeft浣滅敤浜巆omputed璁$畻鏃讹紝闇�瑕佷竴涓繃绋嬮渶锛屽惁鍒欏鑷村嚭閿� + if(this.barFirstTimeMove == true) { + setTimeout(() => { + this.barFirstTimeMove = false; + }, 100) + } + } + }, + mounted() { + this.init(); + } + }; +</script> + +<style lang="scss" scoped> + @import "../../libs/css/style.components.scss"; + + view, + scroll-view { + box-sizing: border-box; + } + + /* #ifndef APP-NVUE */ + ::-webkit-scrollbar, + ::-webkit-scrollbar, + ::-webkit-scrollbar { + display: none; + width: 0 !important; + height: 0 !important; + -webkit-appearance: none; + background: transparent; + } + /* #endif */ + + .u-scroll-box { + position: relative; + /* #ifdef MP-TOUTIAO */ + white-space: nowrap; + /* #endif */ + } + + /* #ifdef H5 */ + // 閫氳繃鏍峰紡绌块�忥紝闅愯棌H5涓嬶紝scroll-view涓嬬殑婊氬姩鏉� + scroll-view ::v-deep ::-webkit-scrollbar { + display: none; + width: 0 !important; + height: 0 !important; + -webkit-appearance: none; + background: transparent; + } + /* #endif */ + + .u-scroll-view { + width: 100%; + white-space: nowrap; + position: relative; + } + + .u-tab-item { + position: relative; + /* #ifndef APP-NVUE */ + display: inline-block; + /* #endif */ + text-align: center; + transition-property: background-color, color; + } + + .u-tab-bar { + position: absolute; + bottom: 0; + } + + .u-tabs-scorll-flex { + @include vue-flex; + justify-content: space-between; + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-tag/u-tag.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-tag/u-tag.vue" new file mode 100644 index 0000000..90ec3f4 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-tag/u-tag.vue" @@ -0,0 +1,294 @@ +<template> + <view v-if="show" :class="[ + disabled ? 'u-disabled' : '', + 'u-size-' + size, + 'u-shape-' + shape, + 'u-mode-' + mode + '-' + type + ]" + class="u-tag" :style="[customStyle]" @tap="clickTag"> + {{text}} + <view class="u-icon-wrap" @tap.stop> + <u-icon @click="close" size="22" v-if="closeable" :color="closeIconColor" + name="close" class="u-close-icon" :style="[iconStyle]"></u-icon> + </view> + </view> +</template> + +<script> + /** + * tag 鎻愮ず + * @description 璇ョ粍浠朵竴鑸敤浜庢爣璁板拰閫夋嫨 + * @tutorial https://www.uviewui.com/components/tag.html + * @property {String} type 涓婚绫诲瀷锛堥粯璁rimary锛� + * @property {String} size 鏍囩澶у皬锛堥粯璁efault锛� + * @property {String} shape 鏍囩褰㈢姸锛堥粯璁quare锛� + * @property {String} text 鏍囩鐨勬枃瀛楀唴瀹� + * @property {String} bg-color 鑷畾涔夋爣绛剧殑鑳屾櫙棰滆壊 + * @property {String} border-color 鏍囩鐨勮竟妗嗛鑹� + * @property {String} close-color 鍏抽棴鎸夐挳鐨勯鑹� + * @property {String Number} index 鐐瑰嚮鏍囩鏃讹紝浼氶�氳繃click浜嬩欢杩斿洖璇ュ�� + * @property {String} mode 妯″紡閫夋嫨锛岃瀹樼綉璇存槑锛堥粯璁ight锛� + * @property {Boolean} closeable 鏄惁鍙叧闂紝璁剧疆涓簍rue锛屾枃瀛楀彸杈逛細鍑虹幇涓�涓叧闂浘鏍囷紙榛樿false锛� + * @property {Boolean} show 鏍囩鏄剧ず涓庡惁锛堥粯璁rue锛� + * @event {Function} click 鐐瑰嚮鏍囩瑙﹀彂 + * @event {Function} close closeable涓簍rue鏃讹紝鐐瑰嚮鏍囩鍏抽棴鎸夐挳瑙﹀彂 + * @example <u-tag text="闆湀澶�" type="success" /> + */ + export default { + name: 'u-tag', + // 鏄惁绂佺敤杩欎釜鏍囩锛岀鐢ㄧ殑璇濓紝浼氬睆钄界偣鍑讳簨浠� + props: { + // 鏍囩绫诲瀷info銆乸rimary銆乻uccess銆亀arning銆乪rror + type: { + type: String, + default: 'primary' + }, + disabled: { + type: [Boolean, String], + default: false + }, + // 鏍囩鐨勫ぇ灏忥紝鍒嗕负default锛堥粯璁わ級锛宮ini锛堣緝灏忥級 + size: { + type: String, + default: 'default' + }, + // tag鐨勫舰鐘讹紝circle锛堜袱杈瑰崐鍦嗗舰锛�, square锛堟柟褰紝甯﹀渾瑙掞級锛宑ircleLeft锛堝乏杈规槸鍗婂渾锛夛紝circleRight锛堝彸杈规槸鍗婂渾锛� + shape: { + type: String, + default: 'square' + }, + // 鏍囩鏂囧瓧 + text: { + type: [String, Number], + default: '' + }, + // 鑳屾櫙棰滆壊锛岄粯璁や负绌哄瓧绗︿覆锛屽嵆涓嶅鐞� + bgColor: { + type: String, + default: '' + }, + // 鏍囩瀛椾綋棰滆壊锛岄粯璁や负绌哄瓧绗︿覆锛屽嵆涓嶅鐞� + color: { + type: String, + default: '' + }, + // 闀傜┖褰㈠紡鏍囩鐨勮竟妗嗛鑹� + borderColor: { + type: String, + default: '' + }, + // 鍏抽棴鎸夐挳鍥炬爣鐨勯鑹� + closeColor: { + type: String, + default: '' + }, + // 鐐瑰嚮鏃惰繑鍥炵殑绱㈠紩鍊硷紝鐢ㄤ簬鍖哄垎渚嬮亶鐨勬暟缁勫摢涓厓绱犺鐐瑰嚮浜� + index: { + type: [Number, String], + default: '' + }, + // 妯″紡閫夋嫨锛宒ark|light|plain + mode: { + type: String, + default: 'light' + }, + // 鏄惁鍙叧闂� + closeable: { + type: Boolean, + default: false + }, + // 鏄惁鏄剧ず + show: { + type: Boolean, + default: true + } + }, + data() { + return { + + } + }, + computed: { + customStyle() { + let style = {}; + // 鏂囧瓧棰滆壊锛堝鏋滄湁姝ゅ�硷紝浼氳鐩杢ype鍊肩殑棰滆壊锛� + if(this.color) style.color = this.color; + // tag鐨勮儗鏅鑹诧紙濡傛灉鏈夋鍊硷紝浼氳鐩杢ype鍊肩殑棰滆壊锛� + if(this.bgColor) style.backgroundColor = this.bgColor; + // 濡傛灉鏄晜绌哄瀷tag锛屾病鏈変紶閫掕竟妗嗛鑹诧紙borderColor锛夌殑璇濓紝浣跨敤鏂囧瓧鐨勯鑹诧紙color灞炴�э級 + if(this.mode == 'plain' && this.color && !this.borderColor) style.borderColor = this.color; + else style.borderColor = this.borderColor; + return style; + }, + iconStyle() { + if(!this.closeable) return ; + let style = {}; + if(this.size == 'mini') style.fontSize = '20rpx'; + else style.fontSize = '22rpx'; + if(this.mode == 'plain' || this.mode == 'light') style.color = this.type; + else if(this.mode == 'dark') style.color = "#ffffff"; + if(this.closeColor) style.color = this.closeColor; + return style; + }, + // 鍏抽棴鍥炬爣鐨勯鑹� + closeIconColor() { + // 濡傛灉瀹氫箟浜嗗叧闂浘鏍囩殑棰滆壊锛屽氨鐢ㄦ鍊硷紝鍚﹀垯鐢ㄥ瓧浣撻鑹茬殑鍊� + // 濡傛灉涓婇潰鐨勪簩鑰呴兘娌℃湁锛屽鏋滄槸dark娣辫壊妯″紡锛屽浘鏍囧氨涓虹櫧鑹� + // 鏈�鍚庡鏋滀笂闈㈢殑涓夎�呴兘涓嶅悎閫傦紝灏辫繑鍥瀟ype鍊肩粰鍥炬爣鑾峰彇棰滆壊 + let color = ''; + if(this.closeColor) return this.closeColor; + else if(this.color) return this.color; + else if(this.mode == 'dark') return '#ffffff'; + else return this.type; + } + }, + methods: { + // 鏍囩琚偣鍑� + clickTag() { + // 濡傛灉鏄痙isabled鐘舵�侊紝涓嶅彂閫佺偣鍑讳簨浠� + if(this.disabled) return ; + this.$emit('click', this.index); + }, + // 鐐瑰嚮鏍囩鍏抽棴鎸夐挳 + close() { + this.$emit('close', this.index); + } + } + } +</script> + +<style lang="scss" scoped> + @import "../../libs/css/style.components.scss"; + + .u-tag { + box-sizing: border-box; + align-items: center; + border-radius: 6rpx; + /* #ifndef APP-NVUE */ + display: inline-block; + /* #endif */ + line-height: 1; + } + + .u-size-default { + font-size: 22rpx; + padding: 12rpx 22rpx; + } + + .u-size-mini { + font-size: 20rpx; + padding: 6rpx 12rpx; + } + + .u-mode-light-primary { + background-color: $u-type-primary-light; + color: $u-type-primary; + border: 1px solid $u-type-primary-disabled; + } + + .u-mode-light-success { + background-color: $u-type-success-light; + color: $u-type-success; + border: 1px solid $u-type-success-disabled; + } + + .u-mode-light-error { + background-color: $u-type-error-light; + color: $u-type-error; + border: 1px solid $u-type-error-disabled; + } + + .u-mode-light-warning { + background-color: $u-type-warning-light; + color: $u-type-warning; + border: 1px solid $u-type-warning-disabled; + } + + .u-mode-light-info { + background-color: $u-type-info-light; + color: $u-type-info; + border: 1px solid $u-type-info-disabled; + } + + .u-mode-dark-primary { + background-color: $u-type-primary; + color: #FFFFFF; + } + + .u-mode-dark-success { + background-color: $u-type-success; + color: #FFFFFF; + } + + .u-mode-dark-error { + background-color: $u-type-error; + color: #FFFFFF; + } + + .u-mode-dark-warning { + background-color: $u-type-warning; + color: #FFFFFF; + } + + .u-mode-dark-info { + background-color: $u-type-info; + color: #FFFFFF; + } + + .u-mode-plain-primary { + background-color: #FFFFFF; + color: $u-type-primary; + border: 1px solid $u-type-primary; + } + + .u-mode-plain-success { + background-color: #FFFFFF; + color: $u-type-success; + border: 1px solid $u-type-success; + } + + .u-mode-plain-error { + background-color: #FFFFFF; + color: $u-type-error; + border: 1px solid $u-type-error; + } + + .u-mode-plain-warning { + background-color: #FFFFFF; + color: $u-type-warning; + border: 1px solid $u-type-warning; + } + + .u-mode-plain-info { + background-color: #FFFFFF; + color: $u-type-info; + border: 1px solid $u-type-info; + } + + .u-disabled { + opacity: 0.55; + } + + .u-shape-circle { + border-radius: 100rpx; + } + + .u-shape-circleRight { + border-radius: 0 100rpx 100rpx 0; + } + + .u-shape-circleLeft { + border-radius: 100rpx 0 0 100rpx; + } + + .u-close-icon { + margin-left: 14rpx; + font-size: 22rpx; + color: $u-type-success; + } + + .u-icon-wrap { + display: inline-flex; + transform: scale(0.86); + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-td/u-td.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-td/u-td.vue" new file mode 100644 index 0000000..b00ad8b --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-td/u-td.vue" @@ -0,0 +1,66 @@ +<template> + <view class="u-td" :style="[tdStyle]"> + <slot></slot> + </view> +</template> + +<script> + /** + * td td鍗曞厓鏍� + * @description 琛ㄦ牸缁勪欢涓�鑸敤浜庡睍绀哄ぇ閲忕粨鏋勫寲鏁版嵁鐨勫満鏅紙鎼厤u-table浣跨敤锛� + * @tutorial https://www.uviewui.com/components/table.html#td-props + * @property {String Number} width 鍗曞厓鏍煎搴︾櫨鍒嗘瘮鎴栬�呭叿浣撳甫鍗曚綅鐨勫�硷紝濡�30%锛� 200rpx绛夛紝涓�鑸娇鐢ㄧ櫨鍒嗘瘮锛屽崟鍏冩牸瀹藉害榛樿涓哄潎鍒唗r鐨勯暱搴︼紙榛樿auto锛� + * @example <u-td>浜屽勾绾�</u-td> + */ + export default { + name: "u-td", + props: { + // 瀹藉害锛岀櫨鍒嗘瘮鎴栬�呭叿浣撳甫鍗曚綅鐨勫�硷紝濡�30%锛� 200rpx绛夛紝涓�鑸娇鐢ㄧ櫨鍒嗘瘮 + width: { + type: [Number, String], + default: 'auto' + } + }, + data() { + return { + tdStyle: { + + } + } + }, + created() { + this.parent = false; + }, + mounted() { + this.parent = this.$u.$parent.call(this, 'u-table'); + if (this.parent) { + // 灏嗙埗缁勪欢鐨勭浉鍏冲弬鏁帮紝鍚堝苟鍒版湰缁勪欢 + let style = {}; + if (this.width != "auto") style.flex = `0 0 ${this.width}`; + style.textAlign = this.parent.align; + style.fontSize = this.parent.fontSize + 'rpx'; + style.padding = this.parent.padding; + style.borderBottom = `solid 1px ${this.parent.borderColor}`; + style.borderRight = `solid 1px ${this.parent.borderColor}`; + style.color = this.parent.color; + this.tdStyle = style; + } + } + }; +</script> + +<style lang="scss" scoped> + @import "../../libs/css/style.components.scss"; + + .u-td { + @include vue-flex; + flex-direction: column; + flex: 1; + justify-content: center; + font-size: 28rpx; + color: $u-content-color; + align-self: stretch; + box-sizing: border-box; + height: 100%; + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-th/u-th.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-th/u-th.vue" new file mode 100644 index 0000000..9fe5a16 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-th/u-th.vue" @@ -0,0 +1,62 @@ +<template> + <view class="u-th" :style="[thStyle]"> + <slot></slot> + </view> +</template> + +<script> + /** + * th th鍗曞厓鏍� + * @description 琛ㄦ牸缁勪欢涓�鑸敤浜庡睍绀哄ぇ閲忕粨鏋勫寲鏁版嵁鐨勫満鏅紙鎼厤u-table浣跨敤锛� + * @tutorial https://www.uviewui.com/components/table.html#td-props + * @property {String Number} width 鏍囬鍗曞厓鏍煎搴︾櫨鍒嗘瘮鎴栬�呭叿浣撳甫鍗曚綅鐨勫�硷紝濡�30%锛�200rpx绛夛紝涓�鑸娇鐢ㄧ櫨鍒嗘瘮锛屽崟鍏冩牸瀹藉害榛樿涓哄潎鍒唗r鐨勯暱搴� + * @example 鏆傛棤绀轰緥 + */ + export default { + name: "u-th", + props: { + // 瀹藉害锛岀櫨鍒嗘瘮鎴栬�呭叿浣撳甫鍗曚綅鐨勫�硷紝濡�30%锛� 200rpx绛夛紝涓�鑸娇鐢ㄧ櫨鍒嗘瘮 + width: { + type: [Number, String], + default: '' + } + }, + data() { + return { + thStyle: {} + } + }, + created() { + this.parent = false; + }, + mounted() { + this.parent = this.$u.$parent.call(this, 'u-table'); + if (this.parent) { + // 灏嗙埗缁勪欢鐨勭浉鍏冲弬鏁帮紝鍚堝苟鍒版湰缁勪欢 + let style = {}; + if (this.width) style.flex = `0 0 ${this.width}`; + style.textAlign = this.parent.align; + style.padding = this.parent.padding; + style.borderBottom = `solid 1px ${this.parent.borderColor}`; + style.borderRight = `solid 1px ${this.parent.borderColor}`; + Object.assign(style, this.parent.style); + this.thStyle = style; + } + } + }; +</script> + +<style lang="scss" scoped> + @import "../../libs/css/style.components.scss"; + + .u-th { + @include vue-flex; + flex-direction: column; + flex: 1; + justify-content: center; + font-size: 28rpx; + color: $u-main-color; + font-weight: bold; + background-color: rgb(245, 246, 248); + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-time-line-item/u-time-line-item.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-time-line-item/u-time-line-item.vue" new file mode 100644 index 0000000..be86fdc --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-time-line-item/u-time-line-item.vue" @@ -0,0 +1,83 @@ +<template> + <view class="u-time-axis-item"> + <slot name="content" /> + <view class="u-time-axis-node" :style="[nodeStyle]"> + <slot name="node"> + <view class="u-dot"> + </view> + </slot> + </view> + </view> +</template> + +<script> + /** + * timeLineItem 鏃堕棿杞碔tem + * @description 鏃堕棿杞寸粍浠朵竴鑸敤浜庣墿娴佷俊鎭睍绀猴紝鍚勭璺熸椂闂寸浉鍏崇殑璁板綍绛夊満鏅��(鎼厤u-time-line浣跨敤) + * @tutorial https://www.uviewui.com/components/timeLine.html + * @property {String} bg-color 宸﹁竟鑺傜偣鐨勮儗鏅鑹诧紝涓�鑸�氳繃slot鍐呭鑷畾涔夎儗鏅鑹插嵆鍙紙榛樿#ffffff锛� + * @property {String Number} node-top 鑺傜偣宸﹁竟鍥炬爣缁濆瀹氫綅鐨則op鍊硷紝鍗曚綅rpx + * @example <u-time-line-item node-top="2">...</u-time-line-item> + */ + export default { + name: "u-time-line-item", + props: { + // 鑺傜偣鐨勮儗鏅鑹� + bgColor: { + type: String, + default: "#ffffff" + }, + // 鑺傜偣宸﹁竟鍥炬爣缁濆瀹氫綅鐨則op鍊� + nodeTop: { + type: [String, Number], + default: "" + } + }, + data() { + return { + + } + }, + computed: { + nodeStyle() { + let style = { + backgroundColor: this.bgColor, + }; + if (this.nodeTop != "") style.top = this.nodeTop + 'rpx'; + return style; + } + } + } +</script> + +<style lang="scss" scoped> + @import "../../libs/css/style.components.scss"; + + .u-time-axis-item { + @include vue-flex; + flex-direction: column; + width: 100%; + position: relative; + margin-bottom: 32rpx; + } + + .u-time-axis-node { + position: absolute; + top: 12rpx; + left: -40rpx; + transform-origin: 0; + transform: translateX(-50%); + @include vue-flex; + align-items: center; + justify-content: center; + z-index: 1; + font-size: 24rpx; + } + + .u-dot { + height: 16rpx; + width: 16rpx; + border-radius: 100rpx; + background: #ddd; + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-time-line/u-time-line.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-time-line/u-time-line.vue" new file mode 100644 index 0000000..f3c7587 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-time-line/u-time-line.vue" @@ -0,0 +1,43 @@ +<template> + <view class="u-time-axis"> + <slot /> + </view> +</template> + +<script> + /** + * timeLine 鏃堕棿杞� + * @description 鏃堕棿杞寸粍浠朵竴鑸敤浜庣墿娴佷俊鎭睍绀猴紝鍚勭璺熸椂闂寸浉鍏崇殑璁板綍绛夊満鏅�� + * @tutorial https://www.uviewui.com/components/timeLine.html + * @example <u-time-line></u-time-line> + */ + export default { + name: "u-time-line", + data() { + return { + + } + } + } +</script> + +<style lang="scss" scoped> + @import "../../libs/css/style.components.scss"; + + .u-time-axis { + padding-left: 40rpx; + position: relative; + } + + .u-time-axis::before { + content: " "; + position: absolute; + left: 0; + top: 12rpx; + width: 1px; + bottom: 0; + border-left: 1px solid #ddd; + transform-origin: 0 0; + transform: scaleX(0.5); + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-toast/u-toast.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-toast/u-toast.vue" new file mode 100644 index 0000000..a2209a5 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-toast/u-toast.vue" @@ -0,0 +1,220 @@ +<template> + <view class="u-toast" :class="[isShow ? 'u-show' : '', 'u-type-' + tmpConfig.type, 'u-position-' + tmpConfig.position]" :style="{ + zIndex: uZIndex + }"> + <view class="u-icon-wrap"> + <u-icon v-if="tmpConfig.icon" class="u-icon" :name="iconName" :size="30" :color="tmpConfig.type"></u-icon> + </view> + <text class="u-text">{{tmpConfig.title}}</text> + </view> +</template> + +<script> + /** + * toast 娑堟伅鎻愮ず + * @description 姝ょ粍浠惰〃鐜板舰寮忕被浼紆ni鐨剈ni.showToastAPI锛屼絾涔熸湁涓嶅悓鐨勫湴鏂广�� + * @tutorial https://www.uviewui.com/components/toast.html + * @property {String} z-index toast灞曠ず鏃剁殑z-index鍊� + * @event {Function} show 鏄剧ずtoast锛屽闇�涓�杩涘叆椤甸潰灏辨樉绀簍oast锛岃鍦╫nReady鐢熷懡鍛ㄦ湡璋冪敤 + * @example <u-toast ref="uToast" /> + */ + export default { + name: "u-toast", + props: { + // z-index鍊� + zIndex: { + type: [Number, String], + default: '' + }, + }, + data() { + return { + isShow: false, + timer: null, // 瀹氭椂鍣� + config: { + params: {}, // URL璺宠浆鐨勫弬鏁帮紝瀵硅薄 + title: '', // 鏄剧ず鏂囨湰 + type: '', // 涓婚绫诲瀷锛宲rimary锛宻uccess锛宔rror锛寃arning锛宐lack + duration: 2000, // 鏄剧ず鐨勬椂闂达紝姣 + isTab: false, // 鏄惁璺宠浆tab椤甸潰 + url: '', // toast娑堝け鍚庢槸鍚﹁烦杞〉闈紝鏈夊垯璺宠浆锛屼紭鍏堢骇楂樹簬back鍙傛暟 + icon: true, // 鏄剧ず鐨勫浘鏍� + position: 'center', // toast鍑虹幇鐨勪綅缃� + callback: null, // 鎵ц瀹屽悗鐨勫洖璋冨嚱鏁� + back: false, // 缁撴潫toast鏄惁鑷姩杩斿洖涓婁竴椤� + }, + tmpConfig: {}, // 灏嗙敤鎴烽厤缃拰鍐呯疆閰嶇疆鍚堝苟鍚庣殑涓存椂閰嶇疆鍙橀噺 + }; + }, + computed: { + iconName() { + // 鍙湁涓嶄负none锛屽苟涓攖ype涓篹rror|warning|succes|info鏃跺�欙紝鎵嶆樉绀哄浘鏍� + if (['error', 'warning', 'success', 'info'].indexOf(this.tmpConfig.type) >= 0 && this.tmpConfig.icon) { + let icon = this.$u.type2icon(this.tmpConfig.type); + return icon; + } + }, + uZIndex() { + // 鏄剧ずtoast鏃跺�欙紝濡傛灉鐢ㄦ埛鏈変紶閫抸-index鍊硷紝鏈夐檺浣跨敤 + return this.isShow ? (this.zIndex ? this.zIndex : this.$u.zIndex.toast) : '999999'; + } + }, + methods: { + // 鏄剧ずtoast缁勪欢锛岀敱鐖剁粍浠堕�氳繃this.$refs.xxx.show(options)褰㈠紡璋冪敤 + show(options) { + // 涓嶉檷缁撴灉鍚堝苟鍒皌his.config鍙橀噺锛岄伩鍏嶅娆℃潯鐢╱-toast锛屽墠鍚庣殑閰嶇疆閫犳垚娣疯 + this.tmpConfig = this.$u.deepMerge(this.config, options); + if (this.timer) { + // 娓呴櫎瀹氭椂鍣� + clearTimeout(this.timer); + this.timer = null; + } + this.isShow = true; + this.timer = setTimeout(() => { + // 鍊掕鏃剁粨鏉燂紝娓呴櫎瀹氭椂鍣紝闅愯棌toast缁勪欢 + this.isShow = false; + clearTimeout(this.timer); + this.timer = null; + // 鍒ゆ柇鏄惁瀛樺湪callback鏂规硶锛屽鏋滃瓨鍦ㄥ氨鎵ц + typeof(this.tmpConfig.callback) === 'function' && this.tmpConfig.callback(); + this.timeEnd(); + }, this.tmpConfig.duration); + }, + // 闅愯棌toast缁勪欢锛岀敱鐖剁粍浠堕�氳繃this.$refs.xxx.hide()褰㈠紡璋冪敤 + hide() { + this.isShow = false; + if (this.timer) { + // 娓呴櫎瀹氭椂鍣� + clearTimeout(this.timer); + this.timer = null; + } + }, + // 鍊掕鏃剁粨鏉熶箣鍚庯紝杩涜鐨勪竴浜涙搷浣� + timeEnd() { + // 濡傛灉甯︽湁url鍊硷紝鏍规嵁isTab涓簍rue鎴栬�協alse杩涜璺宠浆 + if (this.tmpConfig.url) { + // 濡傛灉url娌℃湁"/"寮�澶达紝娣诲姞涓婏紝鍥犱负uni鐨勮矾鐢辫烦杞渶瑕�"/"寮�澶� + if (this.tmpConfig.url[0] != '/') this.tmpConfig.url = '/' + this.tmpConfig.url; + // 鍒ゆ柇鏄惁鏈変紶閫掓樉寮忕殑鍙傛暟 + if (Object.keys(this.tmpConfig.params).length) { + // 鍒ゆ柇鐢ㄦ埛浼犻�掔殑url涓紝鏄惁甯︽湁鍙傛暟 + // 浣跨敤姝e垯鍖归厤锛屼富瑕佷緷鎹槸鍒ゆ柇鏄惁鏈�"/","?","="绛夛紝濡傗��/page/index/index?name=mary" + // 濡傛灉鏈塸arams鍙傛暟锛岃浆鎹㈠悗鏃犻渶甯︿笂"?" + let query = ''; + if (/.*\/.*\?.*=.*/.test(this.tmpConfig.url)) { + // object瀵硅薄杞负get绫诲瀷鐨勫弬鏁� + query = this.$u.queryParams(this.tmpConfig.params, false); + this.tmpConfig.url = this.tmpConfig.url + "&" + query; + } else { + query = this.$u.queryParams(this.tmpConfig.params); + this.tmpConfig.url += query; + } + } + // 濡傛灉鏄烦杞瑃ab椤甸潰锛屽氨浣跨敤uni.switchTab + if (this.tmpConfig.isTab) { + uni.switchTab({ + url: this.tmpConfig.url + }); + } else { + uni.navigateTo({ + url: this.tmpConfig.url + }); + } + } else if(this.tmpConfig.back) { + // 鍥為��鍒颁笂涓�椤� + this.$u.route({ + type: 'back' + }) + } + } + } + }; +</script> + +<style lang="scss" scoped> + @import "../../libs/css/style.components.scss"; + + .u-toast { + position: fixed; + z-index: -1; + transition: opacity 0.3s; + text-align: center; + color: #fff; + border-radius: 8rpx; + background: #585858; + @include vue-flex; + align-items: center; + justify-content: center; + font-size: 28rpx; + opacity: 0; + pointer-events: none; + padding: 18rpx 40rpx; + } + + .u-toast.u-show { + opacity: 1; + } + + .u-icon { + margin-right: 10rpx; + @include vue-flex; + align-items: center; + line-height: normal; + } + + .u-position-center { + left: 50%; + top: 50%; + transform: translate(-50%,-50%); + /* #ifndef APP-NVUE */ + max-width: 70%; + /* #endif */ + } + + .u-position-top { + left: 50%; + top: 20%; + transform: translate(-50%,-50%); + } + + .u-position-bottom { + left: 50%; + bottom: 20%; + transform: translate(-50%,-50%); + } + + .u-type-primary { + color: $u-type-primary; + background-color: $u-type-primary-light; + border: 1px solid rgb(215, 234, 254); + } + + .u-type-success { + color: $u-type-success; + background-color: $u-type-success-light; + border: 1px solid #BEF5C8; + } + + .u-type-error { + color: $u-type-error; + background-color: $u-type-error-light; + border: 1px solid #fde2e2; + } + + .u-type-warning { + color: $u-type-warning; + background-color: $u-type-warning-light; + border: 1px solid #faecd8; + } + + .u-type-info { + color: $u-type-info; + background-color: $u-type-info-light; + border: 1px solid #ebeef5; + } + + .u-type-default { + color: #fff; + background-color: #585858; + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-top-tips/u-top-tips.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-top-tips/u-top-tips.vue" new file mode 100644 index 0000000..98d58df --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-top-tips/u-top-tips.vue" @@ -0,0 +1,121 @@ +<template> + <view class="u-tips" :class="['u-' + type, isShow ? 'u-tip-show' : '']" :style="{ + top: navbarHeight + 'px', + zIndex: uZIndex + }">{{ title }}</view> +</template> + +<script> + /** + * topTips 椤堕儴鎻愮ず + * @description 璇ョ粍浠朵竴鑸敤浜庨〉闈㈤《閮ㄥ悜涓嬫粦鍑轰竴涓彁绀猴紝灏斿悗鑷姩鏀惰捣鐨勫満鏅�� + * @tutorial https://www.uviewui.com/components/topTips.html + * @property {String Number} navbar-height 瀵艰埅鏍忛珮搴�(鍖呭惈鐘舵�佹爮楂樺害鍦ㄥ唴)锛屽崟浣峆X + * @property {String Number} z-index z-index鍊硷紙榛樿975锛� + * @example <u-top-tips ref="uTips"></u-top-tips> + */ + export default { + name: "u-top-tips", + props: { + // 瀵艰埅鏍忛珮搴︼紝鐢ㄤ簬鎻愮ず鐨勫垵濮嬪寲 + navbarHeight: { + type: [Number, String], + // #ifndef H5 + default: 0, + // #endif + // #ifdef H5 + default: 44, + // #endif + }, + // z-index鍊� + zIndex: { + type: [Number, String], + default: '' + } + }, + data() { + return { + timer: null, // 瀹氭椂鍣� + isShow: false, // 鏄惁鏄剧ず娑堟伅缁勪欢 + title: '', // 缁勪欢涓樉绀虹殑娑堟伅鍐呭 + type: 'primary', // 娑堟伅鐨勭被鍨嬶紙棰滆壊涓嶅悓锛夛紝primary锛宻uccess锛宔rror锛寃arning锛宨nfo + duration: 2000, // 缁勪欢鏄剧ず鐨勬椂闂达紝鍗曚綅涓烘绉� + }; + }, + computed: { + uZIndex() { + return this.zIndex ? this.zIndex : this.$u.zIndex.topTips; + } + }, + methods: { + show(config = {}) { + // 鍏堟竻闄ゅ畾鏃跺櫒锛堝彲鑳芥槸涓婁竴娆″畾涔夌殑锛岄渶瑕佹竻闄や簡鍐嶅紑濮嬫柊鐨勶級 + clearTimeout(this.timer); + // 鏃堕棿锛屽唴瀹癸紝绫诲瀷涓婚(type)绛夊弬鏁� + if (config.duration) this.duration = config.duration; + if (config.type) this.type = config.type; + this.title = config.title; + this.isShow = true; + // 鍊掕鏃� + this.timer = setTimeout(() => { + this.isShow = false; + clearTimeout(this.timer); + this.timer = null; + }, this.duration); + } + } + }; +</script> + +<style lang="scss" scoped> + @import "../../libs/css/style.components.scss"; + + view { + box-sizing: border-box; + } + + // 椤堕儴寮瑰嚭绫诲瀷鏍峰紡 + .u-tips { + width: 100%; + position: fixed; + z-index: 1; + padding: 20rpx 30rpx; + color: #FFFFFF; + font-size: 28rpx; + left: 0; + right: 0; + @include vue-flex; + align-items: center; + justify-content: center; + opacity: 0; + // 姝ゅ涓烘渶鏍稿績鐐癸紝translateY(-100%)鎰忓懗鐫�灏嗗叾浠嶻杞撮殣钘忥紙闅愯棌鍒伴《閮�(h5)鎴栬�呰瀵艰埅鏍�(app)涓嬮潰锛� + transform: translateY(-100%); + transition: all 0.35s linear; + } + + .u-tip-show { + transform: translateY(0); + opacity: 1; + z-index: 99; + } + + .u-primary { + background: $u-type-primary; + } + + .u-success { + background: $u-type-success; + } + + .u-warning { + background: $u-type-warning; + } + + .u-error { + background: $u-type-error; + } + + .u-info { + background: $u-type-info; + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-tr/u-tr.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-tr/u-tr.vue" new file mode 100644 index 0000000..06aed4a --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-tr/u-tr.vue" @@ -0,0 +1,25 @@ +<template> + <view class="u-tr"> + <slot></slot> + </view> +</template> + +<script> + /** + * tr 琛ㄦ牸琛屾爣绛� + * @description 琛ㄦ牸缁勪欢涓�鑸敤浜庡睍绀哄ぇ閲忕粨鏋勫寲鏁版嵁鐨勫満鏅紙鎼厤<u-table>浣跨敤锛� + * @tutorial https://www.uviewui.com/components/table.html + * @example <u-tr></u-tr> + */ + export default { + name: "u-tr", + } +</script> + +<style lang="scss" scoped> + @import "../../libs/css/style.components.scss"; + + .u-tr { + @include vue-flex; + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-upload/u-upload.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-upload/u-upload.vue" new file mode 100644 index 0000000..f4d4b76 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-upload/u-upload.vue" @@ -0,0 +1,654 @@ +<template> + <view class="u-upload" v-if="!disabled"> + <view + v-if="showUploadList" + class="u-list-item u-preview-wrap" + v-for="(item, index) in lists" + :key="index" + :style="{ + width: $u.addUnit(width), + height: $u.addUnit(height) + }" + > + <view + v-if="deletable" + class="u-delete-icon" + @tap.stop="deleteItem(index)" + :style="{ + background: delBgColor + }" + > + <u-icon class="u-icon" :name="delIcon" size="20" :color="delColor"></u-icon> + </view> + <u-line-progress + v-if="showProgress && item.progress > 0 && !item.error" + :show-percent="false" + height="16" + class="u-progress" + :percent="item.progress" + ></u-line-progress> + <view @tap.stop="retry(index)" v-if="item.error" class="u-error-btn">鐐瑰嚮閲嶈瘯</view> + <image @tap.stop="doPreviewImage(item.url || item.path, index)" class="u-preview-image" v-if="!item.isImage" :src="item.url || item.path" :mode="imageMode"></image> + </view> + <slot name="file" :file="lists"></slot> + <view style="display: inline-block;" @tap="selectFile" v-if="maxCount > lists.length"> + <slot name="addBtn"></slot> + <view + v-if="!customBtn" + class="u-list-item u-add-wrap" + hover-class="u-add-wrap__hover" + hover-stay-time="150" + :style="{ + width: $u.addUnit(width), + height: $u.addUnit(height) + }" + > + <u-icon name="plus" class="u-add-btn" size="40"></u-icon> + <view class="u-add-tips">{{ uploadText }}</view> + </view> + </view> + </view> +</template> + +<script> +/** + * upload 鍥剧墖涓婁紶 + * @description 璇ョ粍浠剁敤浜庝笂浼犲浘鐗囧満鏅� + * @tutorial https://www.uviewui.com/components/upload.html + * @property {String} action 鏈嶅姟鍣ㄤ笂浼犲湴鍧� + * @property {String Number} max-count 鏈�澶ч�夋嫨鍥剧墖鐨勬暟閲忥紙榛樿99锛� + * @property {Boolean} custom-btn 濡傛灉闇�瑕佽嚜瀹氫箟閫夋嫨鍥剧墖鐨勬寜閽紝璁剧疆涓簍rue锛堥粯璁alse锛� + * @property {Boolean} show-progress 鏄惁鏄剧ず杩涘害鏉★紙榛樿true锛� + * @property {Boolean} disabled 鏄惁鍚敤(鏄剧ず/绉讳粨)缁勪欢锛堥粯璁alse锛� + * @property {String} image-mode 棰勮鍥剧墖绛夋樉绀烘ā寮忥紝鍙�夊�间负uni鐨刬mage鐨刴ode灞炴�у�硷紙榛樿aspectFill锛� + * @property {String} del-icon 鍙充笂瑙掑垹闄ゅ浘鏍囧悕绉帮紝鍙兘涓簎View鍐呯疆鍥炬爣 + * @property {String} del-bg-color 鍙充笂瑙掑叧闂寜閽殑鑳屾櫙棰滆壊 + * @property {String | Number} index 鍦ㄥ悇涓洖璋冧簨浠朵腑鐨勬渶鍚庝竴涓弬鏁拌繑鍥烇紝鐢ㄤ簬鍖哄埆鏄摢涓�涓粍浠剁殑浜嬩欢 + * @property {String} del-color 鍙充笂瑙掑叧闂寜閽浘鏍囩殑棰滆壊 + * @property {Object} header 涓婁紶鎼哄甫鐨勫ご淇℃伅锛屽璞″舰寮� + * @property {Object} form-data 涓婁紶棰濆鎼哄甫鐨勫弬鏁� + * @property {String} name 涓婁紶鏂囦欢鐨勫瓧娈靛悕锛屼緵鍚庣鑾峰彇浣跨敤锛堥粯璁ile锛� + * @property {Array<String>} size-type original 鍘熷浘锛宑ompressed 鍘嬬缉鍥撅紝榛樿浜岃�呴兘鏈夛紙榛樿['original', 'compressed']锛� + * @property {Array<String>} source-type 閫夋嫨鍥剧墖鐨勬潵婧愶紝album-浠庣浉鍐岄�夊浘锛宑amera-浣跨敤鐩告満锛岄粯璁や簩鑰呴兘鏈夛紙榛樿['album', 'camera']锛� + * @property {Boolean} preview-full-image 鏄惁鍙互閫氳繃uni.previewImage棰勮宸查�夋嫨鐨勫浘鐗囷紙榛樿true锛� + * @property {Boolean} multiple 鏄惁寮�鍚浘鐗囧閫夛紝閮ㄥ垎瀹夊崜鏈哄瀷涓嶆敮鎸侊紙榛樿true锛� + * @property {Boolean} deletable 鏄惁鏄剧ず鍒犻櫎鍥剧墖鐨勬寜閽紙榛樿true锛� + * @property {String Number} max-size 閫夋嫨鍗曚釜鏂囦欢鐨勬渶澶уぇ灏忥紝鍗曚綅B(byte)锛岄粯璁や笉闄愬埗锛堥粯璁umber.MAX_VALUE锛� + * @property {Array<Object>} file-list 榛樿鏄剧ず鐨勫浘鐗囧垪琛紝鏁扮粍鍏冪礌涓哄璞★紝蹇呴』鎻愪緵url灞炴�� + * @property {Boolean} upload-text 閫夋嫨鍥剧墖鎸夐挳鐨勬彁绀烘枃瀛楋紙榛樿鈥滈�夋嫨鍥剧墖鈥濓級 + * @property {Boolean} auto-upload 閫夋嫨瀹屽浘鐗囨槸鍚﹁嚜鍔ㄤ笂浼狅紝瑙佷笂鏂硅鏄庯紙榛樿true锛� + * @property {Boolean} show-tips 鐗规畩鎯呭喌涓嬫槸鍚﹁嚜鍔ㄦ彁绀簍oast锛岃涓婃柟璇存槑锛堥粯璁rue锛� + * @property {Boolean} show-upload-list 鏄惁鏄剧ず缁勪欢鍐呴儴鐨勫浘鐗囬瑙堬紙榛樿true锛� + * @event {Function} on-oversize 鍥剧墖澶у皬瓒呭嚭鏈�澶у厑璁稿ぇ灏� + * @event {Function} on-preview 鍏ㄥ睆棰勮鍥剧墖鏃惰Е鍙� + * @event {Function} on-remove 绉婚櫎鍥剧墖鏃惰Е鍙� + * @event {Function} on-success 鍥剧墖涓婁紶鎴愬姛鏃惰Е鍙� + * @event {Function} on-change 鍥剧墖涓婁紶鍚庯紝鏃犺鎴愬姛鎴栬�呭け璐ラ兘浼氳Е鍙� + * @event {Function} on-error 鍥剧墖涓婁紶澶辫触鏃惰Е鍙� + * @event {Function} on-progress 鍥剧墖涓婁紶杩囩▼涓殑杩涘害鍙樺寲杩囩▼瑙﹀彂 + * @event {Function} on-uploaded 鎵�鏈夊浘鐗囦笂浼犲畬姣曡Е鍙� + * @event {Function} on-choose-complete 姣忔閫夋嫨鍥剧墖鍚庤Е鍙戯紝鍙槸璁╁閮ㄥ彲浠ュ緱鐭ユ瘡娆¢�夋嫨鍚庯紝鍐呴儴鐨勬枃浠跺垪琛� + * @example <u-upload :action="action" :file-list="fileList" ></u-upload> + */ +export default { + name: 'u-upload', + props: { + //鏄惁鏄剧ず缁勪欢鑷甫鐨勫浘鐗囬瑙堝姛鑳� + showUploadList: { + type: Boolean, + default: true + }, + // 鍚庣鍦板潃 + action: { + type: String, + default: '' + }, + // 鏈�澶т笂浼犳暟閲� + maxCount: { + type: [String, Number], + default: 52 + }, + // 鏄惁鏄剧ず杩涘害鏉� + showProgress: { + type: Boolean, + default: true + }, + // 鏄惁鍚敤 + disabled: { + type: Boolean, + default: false + }, + // 棰勮涓婁紶鐨勫浘鐗囨椂鐨勮鍓ā寮忥紝鍜宨mage缁勪欢mode灞炴�т竴鑷� + imageMode: { + type: String, + default: 'aspectFill' + }, + // 澶撮儴淇℃伅 + header: { + type: Object, + default() { + return {}; + } + }, + // 棰濆鎼哄甫鐨勫弬鏁� + formData: { + type: Object, + default() { + return {}; + } + }, + // 涓婁紶鐨勬枃浠跺瓧娈靛悕 + name: { + type: String, + default: 'file' + }, + // 鎵�閫夌殑鍥剧墖鐨勫昂瀵�, 鍙�夊�间负original compressed + sizeType: { + type: Array, + default() { + return ['original', 'compressed']; + } + }, + sourceType: { + type: Array, + default() { + return ['album', 'camera']; + } + }, + // 鏄惁鍦ㄧ偣鍑婚瑙堝浘鍚庡睍绀哄叏灞忓浘鐗囬瑙� + previewFullImage: { + type: Boolean, + default: true + }, + // 鏄惁寮�鍚浘鐗囧閫夛紝閮ㄥ垎瀹夊崜鏈哄瀷涓嶆敮鎸� + multiple: { + type: Boolean, + default: true + }, + // 鏄惁灞曠ず鍒犻櫎鎸夐挳 + deletable: { + type: Boolean, + default: true + }, + // 鏂囦欢澶у皬闄愬埗锛屽崟浣嶄负byte + maxSize: { + type: [String, Number], + default: Number.MAX_VALUE + }, + // 鏄剧ず宸蹭笂浼犵殑鏂囦欢鍒楄〃 + fileList: { + type: Array, + default() { + return []; + } + }, + // 涓婁紶鍖哄煙鐨勬彁绀烘枃瀛� + uploadText: { + type: String, + default: '閫夋嫨鍥剧墖' + }, + // 鏄惁鑷姩涓婁紶 + autoUpload: { + type: Boolean, + default: true + }, + // 鏄惁鏄剧ずtoast娑堟伅鎻愮ず + showTips: { + type: Boolean, + default: true + }, + // 鏄惁閫氳繃slot鑷畾涔変紶鍏ラ�夋嫨鍥炬爣鐨勬寜閽� + customBtn: { + type: Boolean, + default: false + }, + // 鍐呴儴棰勮鍥剧墖鍖哄煙鍜岄�夋嫨鍥剧墖鎸夐挳鐨勫尯鍩熷搴� + width: { + type: [String, Number], + default: 200 + }, + // 鍐呴儴棰勮鍥剧墖鍖哄煙鍜岄�夋嫨鍥剧墖鎸夐挳鐨勫尯鍩熼珮搴� + height: { + type: [String, Number], + default: 200 + }, + // 鍙充笂瑙掑叧闂寜閽殑鑳屾櫙棰滆壊 + delBgColor: { + type: String, + default: '#fa3534' + }, + // 鍙充笂瑙掑叧闂寜閽殑鍙夊彿鍥炬爣鐨勯鑹� + delColor: { + type: String, + default: '#ffffff' + }, + // 鍙充笂瑙掑垹闄ゅ浘鏍囧悕绉帮紝鍙兘涓簎View鍐呯疆鍥炬爣 + delIcon: { + type: String, + default: 'close' + }, + // 濡傛灉涓婁紶鍚庣殑杩斿洖鍊间负json瀛楃涓诧紝鏄惁鑷姩杞琷son + toJson: { + type: Boolean, + default: true + }, + // 涓婁紶鍓嶇殑閽╁瓙锛屾瘡涓枃浠朵笂浼犲墠閮戒細鎵ц + beforeUpload: { + type: Function, + default: null + }, + // 绉婚櫎鏂囦欢鍓嶇殑閽╁瓙 + beforeRemove: { + type: Function, + default: null + }, + // 鍏佽涓婁紶鐨勫浘鐗囧悗缂� + limitType:{ + type: Array, + default() { + // 鏀粯瀹濆皬绋嬪簭鐪熸満閫夋嫨鍥剧墖鐨勫悗缂�涓�"image" + // https://opendocs.alipay.com/mini/api/media-image + return ['png', 'jpg', 'jpeg', 'webp', 'gif', 'image']; + } + }, + // 鍦ㄥ悇涓洖璋冧簨浠朵腑鐨勬渶鍚庝竴涓弬鏁拌繑鍥烇紝鐢ㄤ簬鍖哄埆鏄摢涓�涓粍浠剁殑浜嬩欢 + index: { + type: [Number, String], + default: '' + } + }, + mounted() {}, + data() { + return { + lists: [], + isInCount: true, + uploading: false + }; + }, + watch: { + fileList: { + immediate: true, + handler(val) { + val.map(value => { + // 棣栧厛妫�鏌ュ唴閮ㄦ槸鍚﹀凡缁忔坊鍔犺繃杩欏紶鍥剧墖锛屽洜涓哄閮ㄧ粦瀹氫簡涓�涓璞$粰fileList鐨勮瘽(瀵硅薄寮曠敤)锛岃繘琛屼慨鏀瑰閮╢ileList + // 鏃讹紝浼氳Е鍙憌atch锛屽鑷撮噸鏂版妸鍘熸潵鐨勫浘鐗囧啀娆℃坊鍔犲埌this.lists + // 鏁扮粍鐨剆ome鏂规硶鎰忔�濇槸锛屽彧瑕佹暟缁勫厓绱犳湁浠绘剰涓�涓厓绱犳潯浠剁鍚堬紝灏辫繑鍥瀟rue锛岃�屽彟涓�涓暟缁勭殑every鏂规硶鐨勬剰鎬濇槸鏁扮粍鎵�鏈夊厓绱犻兘绗﹀悎鏉′欢鎵嶈繑鍥瀟rue + let tmp = this.lists.some(val => { + return val.url == value.url; + }) + // 濡傛灉鍐呴儴娌℃湁杩欎釜鍥剧墖(tmp涓篺alse)锛屽垯娣诲姞鍒板唴閮� + !tmp && this.lists.push({ url: value.url, error: false, progress: 100 }); + }); + } + }, + // 鐩戝惉lists鐨勫彉鍖栵紝鍙戝嚭浜嬩欢 + lists(n) { + this.$emit('on-list-change', n, this.index); + } + }, + methods: { + // 娓呴櫎鍒楄〃 + clear() { + this.lists = []; + }, + // 閲嶆柊涓婁紶闃熷垪涓笂浼犲け璐ョ殑鎵�鏈夋枃浠� + reUpload() { + this.uploadFile(); + }, + // 閫夋嫨鍥剧墖 + selectFile() { + if (this.disabled) return; + const { name = '', maxCount, multiple, maxSize, sizeType, lists, camera, compressed, maxDuration, sourceType } = this; + let chooseFile = null; + const newMaxCount = maxCount - lists.length; + // 璁剧疆涓哄彧閫夋嫨鍥剧墖鐨勬椂鍊欎娇鐢� chooseImage 鏉ュ疄鐜� + chooseFile = new Promise((resolve, reject) => { + uni.chooseImage({ + count: multiple ? (newMaxCount > 9 ? 9 : newMaxCount) : 1, + sourceType: sourceType, + sizeType, + success: resolve, + fail: reject + }); + }); + chooseFile + .then(res => { + let file = null; + let listOldLength = this.lists.length; + res.tempFiles.map((val, index) => { + // 妫�鏌ユ枃浠跺悗缂�鏄惁鍏佽锛屽鏋滀笉鍦╰his.limitType鍐咃紝灏变細杩斿洖false + if(!this.checkFileExt(val)) return ; + + // 濡傛灉鏄潪澶氶�夛紝index澶т簬绛変簬1鎴栬�呰秴鍑烘渶澶ч檺鍒舵暟閲忔椂锛屼笉澶勭悊 + if (!multiple && index >= 1) return; + if (val.size > maxSize) { + this.$emit('on-oversize', val, this.lists, this.index); + this.showToast('瓒呭嚭鍏佽鐨勬枃浠跺ぇ灏�'); + } else { + if (maxCount <= lists.length) { + this.$emit('on-exceed', val, this.lists, this.index); + this.showToast('瓒呭嚭鏈�澶у厑璁哥殑鏂囦欢涓暟'); + return; + } + lists.push({ + url: val.path, + progress: 0, + error: false, + file: val + }); + } + }); + // 姣忔鍥剧墖閫夋嫨瀹岋紝鎶涘嚭涓�涓簨浠讹紝骞跺皢褰撳墠鍐呴儴閫夋嫨鐨勫浘鐗囨暟缁勬姏鍑哄幓 + this.$emit('on-choose-complete', this.lists, this.index); + if (this.autoUpload) this.uploadFile(listOldLength); + }) + .catch(error => { + this.$emit('on-choose-fail', error); + }); + }, + // 鎻愮ず鐢ㄦ埛娑堟伅 + showToast(message, force = false) { + if (this.showTips || force) { + uni.showToast({ + title: message, + icon: 'none' + }); + } + }, + // 璇ユ柟娉曚緵鐢ㄦ埛閫氳繃ref璋冪敤锛屾墜鍔ㄤ笂浼� + upload() { + this.uploadFile(); + }, + // 瀵瑰け璐ョ殑鍥剧墖閲嶆柊涓婁紶 + retry(index) { + this.lists[index].progress = 0; + this.lists[index].error = false; + this.lists[index].response = null; + uni.showLoading({ + title: '閲嶆柊涓婁紶' + }); + this.uploadFile(index); + }, + // 涓婁紶鍥剧墖 + async uploadFile(index = 0) { + if (this.disabled) return; + if (this.uploading) return; + // 鍏ㄩ儴涓婁紶瀹屾垚 + if (index >= this.lists.length) { + this.$emit('on-uploaded', this.lists, this.index); + return; + } + // 妫�鏌ユ槸鍚︽槸宸蹭笂浼犳垨鑰呮鍦ㄤ笂浼犱腑 + if (this.lists[index].progress == 100) { + if (this.autoUpload == false) this.uploadFile(index + 1); + return; + } + // 鎵цbefore-upload閽╁瓙 + if(this.beforeUpload && typeof(this.beforeUpload) === 'function') { + // 鎵ц鍥炶皟锛屽悓鏃朵紶鍏ョ储寮曞拰鏂囦欢鍒楄〃褰撲綔鍙傛暟 + // 鍦ㄥ井淇★紝鏀粯瀹濈瓑鐜(H5姝e父)锛屼細瀵艰嚧鐖剁粍浠跺畾涔夌殑customBack()鍑芥暟浣撲腑鐨則his鍙樻垚瀛愮粍浠剁殑this + // 閫氳繃bind()鏂规硶锛岀粦瀹氱埗缁勪欢鐨則his锛岃this.customBack()鐨則his涓虹埗缁勪欢鐨勪笂涓嬫枃 + // 鍥犱负upload缁勪欢鍙兘浼氳宓屽鍦ㄥ叾浠栫粍浠跺唴锛屾瘮濡倁-form锛岃繖鏃秚his.$parent鍏跺疄涓簎-form鐨則his锛� + // 闈為〉闈㈢殑this锛屾墍浠ヨ繖閲岄渶瑕佸線涓婂巻閬嶏紝涓�鐩村鎵惧埌鏈�椤剁鐨�$parent锛岃繖閲岀敤浜唗his.$u.$parent.call(this) + // 鏄庣櫧鎰忔�濆嵆鍙紝鏃犻渶绾犵粨this.$u.$parent.call(this)鐨勭粏鑺� + let beforeResponse = this.beforeUpload.bind(this.$u.$parent.call(this))(index, this.lists); + // 鍒ゆ柇鏄惁杩斿洖浜唒romise + if (!!beforeResponse && typeof beforeResponse.then === 'function') { + await beforeResponse.then(res => { + // promise杩斿洖鎴愬姛锛屼笉杩涜鍔ㄤ綔锛岀户缁笂浼� + }).catch(err => { + // 杩涘叆catch鍥炶皟鐨勮瘽锛岀户缁笅涓�寮� + return this.uploadFile(index + 1); + }) + } else if(beforeResponse === false) { + // 濡傛灉杩斿洖false锛岀户缁笅涓�寮犲浘鐗囩殑涓婁紶 + return this.uploadFile(index + 1); + } else { + // 姝ゅ涓鸿繑鍥�"true"鐨勬儏褰紝杩欓噷涓嶅啓浠g爜锛屽氨璺宠繃姝ゅ锛岀户缁墽琛屽綋鍓嶇殑涓婁紶閫昏緫 + } + } + // 妫�鏌ヤ笂浼犲湴鍧� + if (!this.action) { + this.showToast('璇烽厤缃笂浼犲湴鍧�', true); + return; + } + this.lists[index].error = false; + this.uploading = true; + // 鍒涘缓涓婁紶瀵硅薄 + const task = uni.uploadFile({ + url: this.action, + filePath: this.lists[index].url, + name: this.name, + formData: this.formData, + header: this.header, + success: res => { + // 鍒ゆ柇鏄惁json瀛楃涓诧紝灏嗗叾杞负json鏍煎紡 + let data = this.toJson && this.$u.test.jsonString(res.data) ? JSON.parse(res.data) : res.data; + if (![200, 201, 204].includes(res.statusCode)) { + this.uploadError(index, data); + } else { + // 涓婁紶鎴愬姛 + this.lists[index].response = data; + this.lists[index].progress = 100; + this.lists[index].error = false; + this.$emit('on-success', data, index, this.lists, this.index); + } + }, + fail: e => { + this.uploadError(index, e); + }, + complete: res => { + uni.hideLoading(); + this.uploading = false; + this.uploadFile(index + 1); + this.$emit('on-change', res, index, this.lists, this.index); + } + }); + task.onProgressUpdate(res => { + if (res.progress > 0) { + this.lists[index].progress = res.progress; + this.$emit('on-progress', res, index, this.lists, this.index); + } + }); + }, + // 涓婁紶澶辫触 + uploadError(index, err) { + this.lists[index].progress = 0; + this.lists[index].error = true; + this.lists[index].response = null; + this.$emit('on-error', err, index, this.lists, this.index); + this.showToast('涓婁紶澶辫触锛岃閲嶈瘯'); + }, + // 鍒犻櫎涓�涓浘鐗� + deleteItem(index) { + uni.showModal({ + title: '鎻愮ず', + content: '鎮ㄧ‘瀹氳鍒犻櫎姝ら」鍚楋紵', + success: async (res) => { + if (res.confirm) { + // 鍏堟鏌ユ槸鍚︽湁瀹氫箟before-remove绉婚櫎鍓嶉挬瀛� + // 鎵цbefore-remove閽╁瓙 + if(this.beforeRemove && typeof(this.beforeRemove) === 'function') { + // 姝ゅ閽╁瓙鎵ц 鍘熺悊鍚宐efore-remove鍙傛暟锛岃涓婃柟娉ㄩ噴 + let beforeResponse = this.beforeRemove.bind(this.$u.$parent.call(this))(index, this.lists); + // 鍒ゆ柇鏄惁杩斿洖浜唒romise + if (!!beforeResponse && typeof beforeResponse.then === 'function') { + await beforeResponse.then(res => { + // promise杩斿洖鎴愬姛锛屼笉杩涜鍔ㄤ綔锛岀户缁笂浼� + this.handlerDeleteItem(index); + }).catch(err => { + // 濡傛灉杩涘叆promise鐨剅eject锛岀粓姝㈠垹闄ゆ搷浣� + this.showToast('宸茬粓姝㈢Щ闄�'); + }) + } else if(beforeResponse === false) { + // 杩斿洖false锛岀粓姝㈠垹闄� + this.showToast('宸茬粓姝㈢Щ闄�'); + } else { + // 濡傛灉杩斿洖true锛屾墽琛屽垹闄ゆ搷浣� + this.handlerDeleteItem(index); + } + } else { + // 濡傛灉涓嶅瓨鍦╞efore-remove閽╁瓙锛� + this.handlerDeleteItem(index); + } + } + } + }); + }, + // 鎵ц绉婚櫎鍥剧墖鐨勫姩浣滐紝涓婃柟浠g爜鍙槸鍒ゆ柇鏄惁鍙互绉婚櫎 + handlerDeleteItem(index) { + // 濡傛灉鏂囦欢姝e湪涓婁紶涓紝缁堟涓婁紶浠诲姟锛岃繘搴﹀湪0 < progress < 100鍒欐剰鍛崇潃姝e湪涓婁紶 + if (this.lists[index].process < 100 && this.lists[index].process > 0) { + typeof this.lists[index].uploadTask != 'undefined' && this.lists[index].uploadTask.abort(); + } + this.lists.splice(index, 1); + this.$forceUpdate(); + this.$emit('on-remove', index, this.lists, this.index); + this.showToast('绉婚櫎鎴愬姛'); + }, + // 鐢ㄦ埛閫氳繃ref鎵嬪姩鐨勫舰寮忥紝绉婚櫎涓�寮犲浘鐗� + remove(index) { + // 鍒ゆ柇绱㈠紩鐨勫悎娉曡寖鍥� + if (index >= 0 && index < this.lists.length) { + this.lists.splice(index, 1); + this.$emit('on-list-change', this.lists, this.index); + } + }, + // 棰勮鍥剧墖 + doPreviewImage(url, index) { + if (!this.previewFullImage) return; + const images = this.lists.map(item => item.url || item.path); + uni.previewImage({ + urls: images, + current: url, + success: () => { + this.$emit('on-preview', url, this.lists, this.index); + }, + fail: () => { + uni.showToast({ + title: '棰勮鍥剧墖澶辫触', + icon: 'none' + }); + } + }); + }, + // 鍒ゆ柇鏂囦欢鍚庣紑鏄惁鍏佽 + checkFileExt(file) { + // 妫�鏌ユ槸鍚﹀湪鍏佽鐨勫悗缂�涓� + let noArrowExt = false; + // 鑾峰彇鍚庣紑鍚� + let fileExt = ''; + const reg = /.+\./; + // 濡傛灉鏄疕5锛岄渶瑕佷粠name涓垽鏂� + // #ifdef H5 + fileExt = file.name.replace(reg, "").toLowerCase(); + // #endif + // 闈濰5锛岄渶瑕佷粠path涓鍙栧悗缂� + // #ifndef H5 + fileExt = file.path.replace(reg, "").toLowerCase(); + // #endif + // 浣跨敤鏁扮粍鐨剆ome鏂规硶锛屽彧瑕佺鍚坙imitType涓殑涓�涓紝灏辫繑鍥瀟rue + noArrowExt = this.limitType.some(ext => { + // 杞负灏忓啓 + return ext.toLowerCase() === fileExt; + }) + if(!noArrowExt) this.showToast(`涓嶅厑璁搁�夋嫨${fileExt}鏍煎紡鐨勬枃浠禶); + return noArrowExt; + } + } +}; +</script> + +<style lang="scss" scoped> +@import '../../libs/css/style.components.scss'; + +.u-upload { + @include vue-flex; + flex-wrap: wrap; + align-items: center; +} + +.u-list-item { + width: 200rpx; + height: 200rpx; + overflow: hidden; + margin: 10rpx; + background: rgb(244, 245, 246); + position: relative; + border-radius: 10rpx; + /* #ifndef APP-NVUE */ + display: flex; + /* #endif */ + align-items: center; + justify-content: center; +} + +.u-preview-wrap { + border: 1px solid rgb(235, 236, 238); +} + +.u-add-wrap { + flex-direction: column; + color: $u-content-color; + font-size: 26rpx; +} + +.u-add-tips { + margin-top: 20rpx; + line-height: 40rpx; +} + +.u-add-wrap__hover { + background-color: rgb(235, 236, 238); +} + +.u-preview-image { + display: block; + width: 100%; + height: 100%; + border-radius: 10rpx; +} + +.u-delete-icon { + position: absolute; + top: 10rpx; + right: 10rpx; + z-index: 10; + background-color: $u-type-error; + border-radius: 100rpx; + width: 44rpx; + height: 44rpx; + @include vue-flex; + align-items: center; + justify-content: center; +} + +.u-icon { + @include vue-flex; + align-items: center; + justify-content: center; +} + +.u-progress { + position: absolute; + bottom: 10rpx; + left: 8rpx; + right: 8rpx; + z-index: 9; + width: auto; +} + +.u-error-btn { + color: #ffffff; + background-color: $u-type-error; + font-size: 20rpx; + padding: 4px 0; + text-align: center; + position: absolute; + bottom: 0; + left: 0; + right: 0; + z-index: 9; + line-height: 1; +} +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-verification-code/u-verification-code.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-verification-code/u-verification-code.vue" new file mode 100644 index 0000000..b3079f4 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-verification-code/u-verification-code.vue" @@ -0,0 +1,164 @@ +<template> + <view class="u-code-wrap"> + <!-- 姝ょ粍浠跺姛鑳界敱js瀹屾垚锛屾棤闇�鍐檋tml閫昏緫 --> + </view> +</template> + +<script> + /** + * verificationCode 楠岃瘉鐮佽緭鍏ユ + * @description 鑰冭檻鍒扮敤鎴峰疄闄呭彂閫侀獙璇佺爜鐨勫満鏅紝鍙兘鏄竴涓寜閽紝涔熷彲鑳芥槸涓�娈垫枃瀛楋紝鎻愮ず璇悇鏈変笉鍚岋紝鎵�浠ユ湰缁勪欢 涓嶆彁渚涚晫闈㈡樉绀猴紝鍙彁渚涙彁绀鸿锛岀敱鐢ㄦ埛灏嗘彁绀鸿宓屽叆鍒板叿浣撶殑鍦烘櫙 + * @tutorial https://www.uviewui.com/components/verificationCode.html + * @property {Number String} seconds 鍊掕鏃舵墍闇�鐨勭鏁帮紙榛樿60锛� + * @property {String} start-text 寮�濮嬪墠鐨勬彁绀鸿锛岃瀹樼綉璇存槑锛堥粯璁よ幏鍙栭獙璇佺爜锛� + * @property {String} change-text 鍊掕鏃舵湡闂寸殑鎻愮ず璇紝蹇呴』甯︽湁瀛楁瘝"x"锛岃瀹樼綉璇存槑锛堥粯璁绉掗噸鏂拌幏鍙栵級 + * @property {String} end-text 鍊掕缁撴潫鐨勬彁绀鸿锛岃瀹樼綉璇存槑锛堥粯璁ら噸鏂拌幏鍙栵級 + * @property {Boolean} keep-running 鏄惁鍦℉5鍒锋柊鎴栧悇绔繑鍥炲啀杩涘叆鏃剁户缁�掕鏃讹紙榛樿false锛� + * @event {Function} change 鍊掕鏃舵湡闂达紝姣忕瑙﹀彂涓�娆� + * @event {Function} start 寮�濮嬪�掕鏃惰Е鍙� + * @event {Function} end 缁撴潫鍊掕鏃惰Е鍙� + * @example <u-verification-code :seconds="seconds" @end="end" @start="start" ref="uCode" + */ + export default { + name: "u-verification-code", + props: { + // 鍊掕鏃舵�荤鏁� + seconds: { + type: [String, Number], + default: 60 + }, + // 灏氭湭寮�濮嬫椂鎻愮ず + startText: { + type: String, + default: '鑾峰彇楠岃瘉鐮�' + }, + // 姝e湪鍊掕鏃朵腑鐨勬彁绀� + changeText: { + type: String, + default: 'X绉掗噸鏂拌幏鍙�' + }, + // 鍊掕鏃剁粨鏉熸椂鐨勬彁绀� + endText: { + type: String, + default: '閲嶆柊鑾峰彇' + }, + // 鏄惁鍦℉5鍒锋柊鎴栧悇绔繑鍥炲啀杩涘叆鏃剁户缁�掕鏃� + keepRunning: { + type: Boolean, + default: false + }, + // 涓轰簡鍖哄垎澶氫釜椤甸潰锛屾垨鑰呬竴涓〉闈㈠涓�掕鏃剁粍浠舵湰鍦板瓨鍌ㄧ殑缁х画鍊掕鏃跺彉浜� + uniqueKey: { + type: String, + default: '' + } + }, + data() { + return { + secNum: this.seconds, + timer: null, + canGetCode: true, // 鏄惁鍙互鎵ц楠岃瘉鐮佹搷浣� + } + }, + mounted() { + this.checkKeepRunning(); + }, + watch: { + seconds: { + immediate: true, + handler(n) { + this.secNum = n; + } + } + }, + methods: { + checkKeepRunning() { + // 鑾峰彇涓婁竴娆¢��鍑洪〉闈�(H5杩樺寘鎷埛鏂�)鏃剁殑鏃堕棿鎴筹紝濡傛灉娌℃湁涓婃鐨勪繚瀛橈紝姝ゅ�煎彲鑳戒负绌� + let lastTimestamp = Number(uni.getStorageSync(this.uniqueKey + '_$uCountDownTimestamp')); + if(!lastTimestamp) return this.changeEvent(this.startText); + // 褰撳墠绉掔殑鏃堕棿鎴� + let nowTimestamp = Math.floor((+ new Date()) / 1000); + // 鍒ゆ柇褰撳墠鐨勬椂闂存埑锛屾槸鍚﹀皬浜庝笂涓�娆$殑鏈鎸夎瀹氱粨鏉燂紝鍗存彁鍓嶇粨鏉熺殑鏃堕棿鎴� + if(this.keepRunning && lastTimestamp && lastTimestamp > nowTimestamp) { + // 鍓╀綑灏氭湭鎵ц瀹岀殑鍊掕绉掓暟 + this.secNum = lastTimestamp - nowTimestamp; + // 娓呴櫎鏈湴淇濆瓨鐨勫彉閲� + uni.removeStorageSync(this.uniqueKey + '_$uCountDownTimestamp'); + // 寮�濮嬪�掕鏃� + this.start(); + } else { + // 濡傛灉涓嶅瓨鍦ㄩ渶瑕佺户缁笂涓�娆$殑鍊掕鏃讹紝鎵ц姝e父鐨勯�昏緫 + this.changeEvent(this.startText); + } + }, + // 寮�濮嬪�掕鏃� + start() { + // 闃叉蹇�熺偣鍑昏幏鍙栭獙璇佺爜鐨勬寜閽�屽鑷村唴閮ㄤ骇鐢熷涓畾鏃跺櫒瀵艰嚧娣蜂贡 + if(this.timer) { + clearInterval(this.timer); + this.timer = null; + } + this.$emit('start'); + this.canGetCode = false; + // 杩欓噷鏀捐繖鍙ワ紝鏄负浜嗕竴寮�濮嬫椂灏辨彁绀猴紝鍚﹀垯瑕佺瓑setInterval鐨�1绉掑悗鎵嶄細鏈夋彁绀� + this.changeEvent(this.changeText.replace(/x|X/, this.secNum)); + this.setTimeToStorage(); + this.timer = setInterval(() => { + if (--this.secNum) { + // 鐢ㄥ綋鍓嶅�掕鏃剁殑绉掓暟鏇挎崲鎻愮ず瀛楃涓蹭腑鐨�"x"瀛楁瘝 + this.changeEvent(this.changeText.replace(/x|X/, this.secNum)); + } else { + clearInterval(this.timer); + this.timer = null; + this.changeEvent(this.endText); + this.secNum = this.seconds; + this.$emit('end'); + this.canGetCode = true; + } + }, 1000); + }, + // 閲嶇疆锛屽彲浠ヨ鐢ㄦ埛鍐嶆鑾峰彇楠岃瘉鐮� + reset() { + this.canGetCode = true; + clearInterval(this.timer); + this.secNum = this.seconds; + this.changeEvent(this.endText); + }, + changeEvent(text) { + this.$emit('change', text); + }, + // 淇濆瓨鏃堕棿鎴筹紝涓轰簡闃叉鍊掕鏃跺皻鏈粨鏉燂紝H5鍒锋柊鎴栬�呭悇绔殑鍙充笂瑙掕繑鍥炰笂涓�椤靛啀杩涙潵 + setTimeToStorage() { + if(!this.keepRunning || !this.timer) return; + // 璁板綍褰撳墠鐨勬椂闂存埑锛屼负浜嗕笅娆¤繘鍏ラ〉闈紝濡傛灉杩樺湪鍊掕鏃跺唴鐨勮瘽锛岀户缁�掕鏃� + // 鍊掕鏃跺皻鏈粨鏉燂紝缁撴灉澶т簬0锛涘�掕鏃跺凡缁忓紑濮嬶紝灏变細灏忎簬鍒濆鍊硷紝濡傛灉绛変簬鍒濆鍊硷紝璇存槑娌℃湁寮�濮嬪�掕鏃讹紝鏃犻渶澶勭悊 + if(this.secNum > 0 && this.secNum <= this.seconds) { + // 鑾峰彇褰撳墠鏃堕棿鎴�(+ new Date()涓虹壒娈婂啓娉�)锛岄櫎浠�1000鍙樻垚绉掞紝鍐嶅幓闄ゅ皬鏁伴儴鍒� + let nowTimestamp = Math.floor((+ new Date()) / 1000); + // 灏嗘湰璇ョ粨鏉熸椂鍊欑殑鏃堕棿鎴充繚瀛樿捣鏉� => 褰撳墠鏃堕棿鎴� + 鍓╀綑鐨勭鏁� + uni.setStorage({ + key: this.uniqueKey + '_$uCountDownTimestamp', + data: nowTimestamp + Number(this.secNum) + }) + } + } + }, + // 缁勪欢閿�姣佺殑鏃跺�欙紝娓呴櫎瀹氭椂鍣紝鍚﹀垯瀹氭椂鍣ㄤ細缁х画瀛樺湪锛岀郴缁熶笉浼氳嚜鍔ㄦ竻闄� + beforeDestroy() { + this.setTimeToStorage(); + clearTimeout(this.timer); + this.timer = null; + } + } +</script> + +<style lang="scss" scoped> + @import "../../libs/css/style.components.scss"; + + .u-code-wrap { + width: 0; + height: 0; + position: fixed; + z-index: -1; + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-waterfall/u-waterfall.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-waterfall/u-waterfall.vue" new file mode 100644 index 0000000..31964b7 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/components/u-waterfall/u-waterfall.vue" @@ -0,0 +1,176 @@ +<template> + <view class="u-waterfall"> + <view id="u-left-column" class="u-column"><slot name="left" :leftList="leftList"></slot></view> + <view id="u-right-column" class="u-column"><slot name="right" :rightList="rightList"></slot></view> + </view> +</template> + +<script> +/** + * waterfall 鐎戝竷娴� + * @description 杩欐槸涓�涓�戝竷娴佸舰寮忕殑缁勪欢锛屽唴瀹瑰垎涓哄乏鍙充袱鍒楋紝缁撳悎uView鐨勬噿鍔犺浇缁勪欢鏁堟灉鏇翠匠銆傜浉杈冧簬鏌愪簺鍙槸濂囧伓鏁板乏鍙冲垎鍒紝鎴栬�呮病鏈夊埄鐢╲ue浣滅敤鍩熸彃妲界殑鍋氭硶锛寀View鐨勭�戝竷娴佸疄鐜颁簡鐪熸鐨� 缁勪欢鍖栵紝鎼厤LazyLoad 鎳掑姞杞藉拰loadMore 鍔犺浇鏇村缁勪欢锛岃鎮ㄥ紑绠卞嵆鐢紝鐪煎墠涓�浜�� + * @tutorial https://www.uviewui.com/components/waterfall.html + * @property {Array} flow-list 鐢ㄤ簬娓叉煋鐨勬暟鎹� + * @property {String Number} add-time 鍗曟潯鏁版嵁娣诲姞鍒伴槦鍒楃殑鏃堕棿闂撮殧锛屽崟浣峬s锛岃涓婃柟娉ㄦ剰浜嬮」璇存槑锛堥粯璁�200锛� + * @example <u-waterfall :flowList="flowList"></u-waterfall> + */ +export default { + name: "u-waterfall", + props: { + value: { + // 鐎戝竷娴佹暟鎹� + type: Array, + required: true, + default: function() { + return []; + } + }, + // 姣忔鍚戠粨鏋勬彃鍏ユ暟鎹殑鏃堕棿闂撮殧锛岄棿闅旇秺闀匡紝瓒婅兘淇濊瘉涓ゅ垪楂樺害鐩歌繎锛屼絾鏄鐢ㄦ埛浣撻獙瓒婁笉濂� + // 鍗曚綅ms + addTime: { + type: [Number, String], + default: 200 + }, + // id鍊硷紝鐢ㄤ簬娓呴櫎鏌愪竴鏉℃暟鎹椂锛屾牴鎹idKey鍚嶇О鎵惧埌骞剁Щ闄わ紝濡傛暟鎹负{idx: 22, name: 'lisa'} + // 閭d箞璇ユ妸idKey璁剧疆涓篿dx + idKey: { + type: String, + default: 'id' + } + }, + data() { + return { + leftList: [], + rightList: [], + tempList: [], + children: [] + } + }, + watch: { + copyFlowList(nVal, oVal) { + // 鍙栧樊鍊硷紝鍗宠繖涓�娆℃暟缁勫彉鍖栨柊澧炵殑閮ㄥ垎 + let startIndex = Array.isArray(oVal) && oVal.length > 0 ? oVal.length : 0; + // 鎷兼帴涓婂師鏈夋暟鎹� + this.tempList = this.tempList.concat(this.cloneData(nVal.slice(startIndex))); + this.splitData(); + } + }, + mounted() { + this.tempList = this.cloneData(this.copyFlowList); + this.splitData(); + }, + computed: { + // 鐮村潖flowList鍙橀噺鐨勫紩鐢紝鍚﹀垯watch鐨勭粨鏋滄柊鏃у�兼槸涓�鏍风殑 + copyFlowList() { + return this.cloneData(this.value); + } + }, + methods: { + async splitData() { + if (!this.tempList.length) return; + let leftRect = await this.$uGetRect('#u-left-column'); + let rightRect = await this.$uGetRect('#u-right-column'); + // 濡傛灉宸﹁竟灏忎簬鎴栫瓑浜庡彸杈癸紝灏辨坊鍔犲埌宸﹁竟锛屽惁鍒欐坊鍔犲埌鍙宠竟 + let item = this.tempList[0]; + // 瑙e喅澶氭蹇�熶笂鎷夊悗锛屽彲鑳芥暟鎹細涔辩殑闂锛屽洜涓虹粡杩囦笂闈㈢殑涓や釜await鑺傜偣鏌ヨ闃诲涓�瀹氭椂闂达紝鍔犱笂鍚庨潰鐨勫畾鏃跺櫒骞叉壈 + // 鏁扮粍鍙兘鍙樻垚[]锛屽鑷存item鍊煎彲鑳戒负undefined + if(!item) return ; + if (leftRect.height < rightRect.height) { + this.leftList.push(item); + } else if (leftRect.height > rightRect.height) { + this.rightList.push(item); + } else { + // 杩欓噷鏄负浜嗕繚璇佺涓�鍜岀浜屽紶娣诲姞鏃讹紝宸﹀彸閮借兘鏈夊唴瀹� + // 鍥犱负娣诲姞绗竴寮狅紝瀹為檯闃熷垪鐨勯珮搴﹀彲鑳借繕鏄�0锛岃繖鏃堕渶瑕佹牴鎹槦鍒楀厓绱犻暱搴﹀垽鏂笅涓�涓鏀惧摢杈� + if (this.leftList.length <= this.rightList.length) { + this.leftList.push(item); + } else { + this.rightList.push(item); + } + } + // 绉婚櫎涓存椂鍒楄〃鐨勭涓�椤� + this.tempList.splice(0, 1); + // 濡傛灉涓存椂鏁扮粍杩樻湁鏁版嵁锛岀户缁惊鐜� + if (this.tempList.length) { + setTimeout(() => { + this.splitData(); + }, this.addTime) + } + }, + // 澶嶅埗鑰屼笉鏄紩鐢ㄥ璞″拰鏁扮粍 + cloneData(data) { + return JSON.parse(JSON.stringify(data)); + }, + // 娓呯┖鏁版嵁鍒楄〃 + clear() { + this.leftList = []; + this.rightList = []; + // 鍚屾椂娓呴櫎鐖剁粍浠跺垪琛ㄤ腑鐨勬暟鎹� + this.$emit('input', []); + this.tempList = []; + }, + // 娓呴櫎鏌愪竴鏉℃寚瀹氱殑鏁版嵁锛屾牴鎹甶d瀹炵幇 + remove(id) { + // 濡傛灉findIndex鎵句笉鍒板悎閫傜殑鏉′欢锛屽氨浼氳繑鍥�-1 + let index = -1; + index = this.leftList.findIndex(val => val[this.idKey] == id); + if(index != -1) { + // 濡傛灉index涓嶇瓑浜�-1锛岃鏄庡凡缁忔壘鍒颁簡瑕佹壘鐨刬d锛屾牴鎹甶ndex绱㈠紩鍒犻櫎杩欎竴鏉℃暟鎹� + this.leftList.splice(index, 1); + } else { + // 鍚岀悊浜庝笂鏂归潰鐨勬柟娉� + index = this.rightList.findIndex(val => val[this.idKey] == id); + if(index != -1) this.rightList.splice(index, 1); + } + // 鍚屾椂娓呴櫎鐖剁粍浠剁殑鏁版嵁涓殑瀵瑰簲id鐨勬潯鐩� + index = this.value.findIndex(val => val[this.idKey] == id); + if(index != -1) this.$emit('input', this.value.splice(index, 1)); + }, + // 淇敼鏌愭潯鏁版嵁鐨勬煇涓睘鎬� + modify(id, key, value) { + // 濡傛灉findIndex鎵句笉鍒板悎閫傜殑鏉′欢锛屽氨浼氳繑鍥�-1 + let index = -1; + index = this.leftList.findIndex(val => val[this.idKey] == id); + if(index != -1) { + // 濡傛灉index涓嶇瓑浜�-1锛岃鏄庡凡缁忔壘鍒颁簡瑕佹壘鐨刬d锛屼慨鏀瑰搴攌ey鐨勫�� + this.leftList[index][key] = value; + } else { + // 鍚岀悊浜庝笂鏂归潰鐨勬柟娉� + index = this.rightList.findIndex(val => val[this.idKey] == id); + if(index != -1) this.rightList[index][key] = value; + } + // 淇敼鐖剁粍浠剁殑鏁版嵁涓殑瀵瑰簲id鐨勬潯鐩� + index = this.value.findIndex(val => val[this.idKey] == id); + if(index != -1) { + // 棣栧厛澶嶅埗涓�浠絭alue鐨勬暟鎹� + let data = this.cloneData(this.value); + // 淇敼瀵瑰簲绱㈠紩鐨刱ey灞炴�х殑鍊间负value + data[index][key] = value; + // 淇敼鐖剁粍浠堕�氳繃v-model缁戝畾鐨勫彉閲忕殑鍊� + this.$emit('input', data); + } + } + } +} +</script> + +<style lang="scss" scoped> +@import "../../libs/css/style.components.scss"; + +.u-waterfall { + @include vue-flex; + flex-direction: row; + align-items: flex-start; +} + +.u-column { + @include vue-flex; + flex: 1; + flex-direction: column; + height: auto; +} + +.u-image { + width: 100%; +} +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/iconfont.css" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/iconfont.css" new file mode 100644 index 0000000..836c718 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/iconfont.css" @@ -0,0 +1,910 @@ +/* #ifdef APP-PLUS */ +@font-face { + font-family: "uicon-iconfont"; + font-weight: normal; + font-style: normal; + font-display: auto; + src: url('data:application/x-font-woff2;charset=utf-8;base64,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') format('woff2'); +} + +/* #endif */ + +/* 鏀粯瀹濓紝鐧惧害锛屽ご鏉″皬绋嬪簭鐩墠璇诲彇澶х殑鏈湴瀛椾綋鏂囦欢锛屽鑷存棤娉曟樉绀哄浘鏍囷紝鏁呯敤鍦ㄧ嚎鍔犺浇鐨勬柟寮�-2020-05-12 */ +/* #ifndef APP-PLUS */ +@font-face { + font-family: "uicon-iconfont"; + src: url('//at.alicdn.com/t/font_1529455_k4s6di1d1.eot?t=1596960292384'); + /* IE9 */ + src: url('//at.alicdn.com/t/font_1529455_k4s6di1d1.eot?t=1596960292384#iefix') format('embedded-opentype'), + /* IE6-IE8 */ + url('data:application/x-font-woff2;charset=utf-8;base64,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') format('woff2'), + url('//at.alicdn.com/t/font_1529455_k4s6di1d1.woff?t=1596960292384') format('woff'), + url('//at.alicdn.com/t/font_1529455_k4s6di1d1.ttf?t=1596960292384') format('truetype'), + /* chrome, firefox, opera, Safari, Android, iOS 4.2+ */ + url('//at.alicdn.com/t/font_1529455_k4s6di1d1.svg?t=1596960292384#iconfont') format('svg'); +} + +/* #endif */ + +.u-iconfont { + position: relative; + display: flex; + font: normal normal normal 14px/1 "uicon-iconfont"; + font-size: inherit; + text-rendering: auto; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.u-iconfont::before { + display: flex; + align-items: center; +} + +.uicon-en:before { + content: "\e70a"; +} + +.uicon-zh:before { + content: "\e692"; +} + +.uicon-level:before { + content: "\e693"; +} + +.uicon-woman:before { + content: "\e69c"; +} + +.uicon-man:before { + content: "\e697"; +} + +.uicon-column-line:before { + content: "\e68e"; +} + +.uicon-empty-page:before { + content: "\e627"; +} + +.uicon-empty-data:before { + content: "\e62f"; +} + +.uicon-empty-car:before { + content: "\e602"; +} + +.uicon-empty-order:before { + content: "\e639"; +} + +.uicon-empty-address:before { + content: "\e646"; +} + +.uicon-empty-message:before { + content: "\e6a9"; +} + +.uicon-empty-search:before { + content: "\e664"; +} + +.uicon-empty-favor:before { + content: "\e67c"; +} + +.uicon-empty-coupon:before { + content: "\e682"; +} + +.uicon-empty-history:before { + content: "\e684"; +} + +.uicon-empty-permission:before { + content: "\e686"; +} + +.uicon-empty-news:before { + content: "\e687"; +} + +.uicon-empty-wifi:before { + content: "\e688"; +} + +.uicon-empty-list:before { + content: "\e68b"; +} + +.uicon-arrow-left-double:before { + content: "\e68c"; +} + +.uicon-arrow-right-double:before { + content: "\e68d"; +} + +.uicon-red-packet:before { + content: "\e691"; +} + +.uicon-red-packet-fill:before { + content: "\e690"; +} + +.uicon-order:before { + content: "\e68f"; +} + +.uicon-nav-back-arrow:before { + content: "\e67f"; +} + +.uicon-nav-back:before { + content: "\e683"; +} + +.uicon-checkbox-mark:before { + content: "\e6a8"; +} + +.uicon-arrow-up-fill:before { + content: "\e6b0"; +} + +.uicon-arrow-down-fill:before { + content: "\e600"; +} + +.uicon-backspace:before { + content: "\e67b"; +} + +.uicon-android-circle-fill:before { + content: "\e67e"; +} + +.uicon-android-fill:before { + content: "\e67d"; +} + +.uicon-question:before { + content: "\e715"; +} + +.uicon-pause:before { + content: "\e8fa"; +} + +.uicon-close:before { + content: "\e685"; +} + +.uicon-volume-up:before { + content: "\e633"; +} + +.uicon-volume-off:before { + content: "\e644"; +} + +.uicon-info:before { + content: "\e653"; +} + +.uicon-error:before { + content: "\e6d3"; +} + +.uicon-lock-opened-fill:before { + content: "\e974"; +} + +.uicon-lock-fill:before { + content: "\e979"; +} + +.uicon-lock:before { + content: "\e97a"; +} + +.uicon-photo-fill:before { + content: "\e98b"; +} + +.uicon-photo:before { + content: "\e98d"; +} + +.uicon-account-fill:before { + content: "\e614"; +} + +.uicon-minus-people-fill:before { + content: "\e615"; +} + +.uicon-plus-people-fill:before { + content: "\e626"; +} + +.uicon-account:before { + content: "\e628"; +} + +.uicon-thumb-down-fill:before { + content: "\e726"; +} + +.uicon-thumb-down:before { + content: "\e727"; +} + +.uicon-thumb-up-fill:before { + content: "\e72f"; +} + +.uicon-thumb-up:before { + content: "\e733"; +} + +.uicon-person-delete-fill:before { + content: "\e66a"; +} + +.uicon-cut:before { + content: "\e948"; +} + +.uicon-fingerprint:before { + content: "\e955"; +} + +.uicon-home-fill:before { + content: "\e964"; +} + +.uicon-home:before { + content: "\e965"; +} + +.uicon-hourglass-half-fill:before { + content: "\e966"; +} + +.uicon-hourglass:before { + content: "\e967"; +} + +.uicon-lock-open:before { + content: "\e973"; +} + +.uicon-integral-fill:before { + content: "\e703"; +} + +.uicon-integral:before { + content: "\e704"; +} + +.uicon-coupon:before { + content: "\e8ae"; +} + +.uicon-coupon-fill:before { + content: "\e8c4"; +} + +.uicon-kefu-ermai:before { + content: "\e656"; +} + +.uicon-scan:before { + content: "\e662"; +} + +.uicon-rmb:before { + content: "\e608"; +} + +.uicon-rmb-circle-fill:before { + content: "\e657"; +} + +.uicon-rmb-circle:before { + content: "\e677"; +} + +.uicon-gift:before { + content: "\e65b"; +} + +.uicon-gift-fill:before { + content: "\e65c"; +} + +.uicon-bookmark-fill:before { + content: "\e63b"; +} + +.uicon-zhuanfa:before { + content: "\e60b"; +} + +.uicon-eye-off-outline:before { + content: "\e62b"; +} + +.uicon-eye-off:before { + content: "\e648"; +} + +.uicon-pause-circle:before { + content: "\e643"; +} + +.uicon-play-circle:before { + content: "\e647"; +} + +.uicon-pause-circle-fill:before { + content: "\e654"; +} + +.uicon-play-circle-fill:before { + content: "\e655"; +} + +.uicon-grid:before { + content: "\e673"; +} + +.uicon-play-right:before { + content: "\e610"; +} + +.uicon-play-left:before { + content: "\e66d"; +} + +.uicon-calendar:before { + content: "\e66e"; +} + +.uicon-rewind-right:before { + content: "\e66f"; +} + +.uicon-rewind-left:before { + content: "\e671"; +} + +.uicon-skip-forward-right:before { + content: "\e672"; +} + +.uicon-skip-back-left:before { + content: "\e674"; +} + +.uicon-play-left-fill:before { + content: "\e675"; +} + +.uicon-play-right-fill:before { + content: "\e676"; +} + +.uicon-grid-fill:before { + content: "\e678"; +} + +.uicon-rewind-left-fill:before { + content: "\e679"; +} + +.uicon-rewind-right-fill:before { + content: "\e67a"; +} + +.uicon-pushpin:before { + content: "\e7e3"; +} + +.uicon-star:before { + content: "\e65f"; +} + +.uicon-star-fill:before { + content: "\e669"; +} + +.uicon-server-fill:before { + content: "\e751"; +} + +.uicon-server-man:before { + content: "\e6bc"; +} + +.uicon-edit-pen:before { + content: "\e612"; +} + +.uicon-edit-pen-fill:before { + content: "\e66b"; +} + +.uicon-wifi:before { + content: "\e667"; +} + +.uicon-wifi-off:before { + content: "\e668"; +} + +.uicon-file-text:before { + content: "\e663"; +} + +.uicon-file-text-fill:before { + content: "\e665"; +} + +.uicon-more-dot-fill:before { + content: "\e630"; +} + +.uicon-minus:before { + content: "\e618"; +} + +.uicon-minus-circle:before { + content: "\e61b"; +} + +.uicon-plus:before { + content: "\e62d"; +} + +.uicon-plus-circle:before { + content: "\e62e"; +} + +.uicon-minus-circle-fill:before { + content: "\e652"; +} + +.uicon-plus-circle-fill:before { + content: "\e661"; +} + +.uicon-email:before { + content: "\e611"; +} + +.uicon-email-fill:before { + content: "\e642"; +} + +.uicon-phone:before { + content: "\e622"; +} + +.uicon-phone-fill:before { + content: "\e64f"; +} + +.uicon-clock:before { + content: "\e60f"; +} + +.uicon-car:before { + content: "\e60c"; +} + +.uicon-car-fill:before { + content: "\e636"; +} + +.uicon-warning:before { + content: "\e694"; +} + +.uicon-warning-fill:before { + content: "\e64d"; +} + +.uicon-search:before { + content: "\e62a"; +} + +.uicon-baidu-circle-fill:before { + content: "\e680"; +} + +.uicon-baidu:before { + content: "\e681"; +} + +.uicon-facebook:before { + content: "\e689"; +} + +.uicon-facebook-circle-fill:before { + content: "\e68a"; +} + +.uicon-qzone:before { + content: "\e695"; +} + +.uicon-qzone-circle-fill:before { + content: "\e696"; +} + +.uicon-moments-circel-fill:before { + content: "\e69a"; +} + +.uicon-moments:before { + content: "\e69b"; +} + +.uicon-qq-circle-fill:before { + content: "\e6a0"; +} + +.uicon-qq-fill:before { + content: "\e6a1"; +} + +.uicon-weibo:before { + content: "\e6a4"; +} + +.uicon-weibo-circle-fill:before { + content: "\e6a5"; +} + +.uicon-taobao:before { + content: "\e6a6"; +} + +.uicon-taobao-circle-fill:before { + content: "\e6a7"; +} + +.uicon-twitter:before { + content: "\e6aa"; +} + +.uicon-twitter-circle-fill:before { + content: "\e6ab"; +} + +.uicon-weixin-circle-fill:before { + content: "\e6b1"; +} + +.uicon-weixin-fill:before { + content: "\e6b2"; +} + +.uicon-zhifubao-circle-fill:before { + content: "\e6b8"; +} + +.uicon-zhifubao:before { + content: "\e6b9"; +} + +.uicon-zhihu:before { + content: "\e6ba"; +} + +.uicon-zhihu-circle-fill:before { + content: "\e709"; +} + +.uicon-list:before { + content: "\e650"; +} + +.uicon-list-dot:before { + content: "\e616"; +} + +.uicon-setting:before { + content: "\e61f"; +} + +.uicon-bell:before { + content: "\e609"; +} + +.uicon-bell-fill:before { + content: "\e640"; +} + +.uicon-attach:before { + content: "\e632"; +} + +.uicon-shopping-cart:before { + content: "\e621"; +} + +.uicon-shopping-cart-fill:before { + content: "\e65d"; +} + +.uicon-tags:before { + content: "\e629"; +} + +.uicon-share:before { + content: "\e631"; +} + +.uicon-question-circle-fill:before { + content: "\e666"; +} + +.uicon-question-circle:before { + content: "\e625"; +} + +.uicon-error-circle:before { + content: "\e624"; +} + +.uicon-checkmark-circle:before { + content: "\e63d"; +} + +.uicon-close-circle:before { + content: "\e63f"; +} + +.uicon-info-circle:before { + content: "\e660"; +} + +.uicon-md-person-add:before { + content: "\e6e4"; +} + +.uicon-md-person-fill:before { + content: "\e6ea"; +} + +.uicon-bag-fill:before { + content: "\e617"; +} + +.uicon-bag:before { + content: "\e619"; +} + +.uicon-chat-fill:before { + content: "\e61e"; +} + +.uicon-chat:before { + content: "\e620"; +} + +.uicon-more-circle:before { + content: "\e63e"; +} + +.uicon-more-circle-fill:before { + content: "\e645"; +} + +.uicon-volume:before { + content: "\e66c"; +} + +.uicon-volume-fill:before { + content: "\e670"; +} + +.uicon-reload:before { + content: "\e788"; +} + +.uicon-camera:before { + content: "\e7d7"; +} + +.uicon-heart:before { + content: "\e7df"; +} + +.uicon-heart-fill:before { + content: "\e851"; +} + +.uicon-minus-square-fill:before { + content: "\e855"; +} + +.uicon-plus-square-fill:before { + content: "\e856"; +} + +.uicon-pushpin-fill:before { + content: "\e86e"; +} + +.uicon-camera-fill:before { + content: "\e870"; +} + +.uicon-setting-fill:before { + content: "\e872"; +} + +.uicon-google:before { + content: "\e87a"; +} + +.uicon-ie:before { + content: "\e87b"; +} + +.uicon-apple-fill:before { + content: "\e881"; +} + +.uicon-chrome-circle-fill:before { + content: "\e885"; +} + +.uicon-github-circle-fill:before { + content: "\e887"; +} + +.uicon-IE-circle-fill:before { + content: "\e889"; +} + +.uicon-google-circle-fill:before { + content: "\e88a"; +} + +.uicon-arrow-down:before { + content: "\e60d"; +} + +.uicon-arrow-left:before { + content: "\e60e"; +} + +.uicon-map:before { + content: "\e61d"; +} + +.uicon-man-add-fill:before { + content: "\e64c"; +} + +.uicon-tags-fill:before { + content: "\e651"; +} + +.uicon-arrow-leftward:before { + content: "\e601"; +} + +.uicon-arrow-rightward:before { + content: "\e603"; +} + +.uicon-arrow-downward:before { + content: "\e604"; +} + +.uicon-arrow-right:before { + content: "\e605"; +} + +.uicon-arrow-up:before { + content: "\e606"; +} + +.uicon-arrow-upward:before { + content: "\e607"; +} + +.uicon-bookmark:before { + content: "\e60a"; +} + +.uicon-eye:before { + content: "\e613"; +} + +.uicon-man-delete:before { + content: "\e61a"; +} + +.uicon-man-add:before { + content: "\e61c"; +} + +.uicon-trash:before { + content: "\e623"; +} + +.uicon-error-circle-fill:before { + content: "\e62c"; +} + +.uicon-calendar-fill:before { + content: "\e634"; +} + +.uicon-checkmark-circle-fill:before { + content: "\e635"; +} + +.uicon-close-circle-fill:before { + content: "\e637"; +} + +.uicon-clock-fill:before { + content: "\e638"; +} + +.uicon-checkmark:before { + content: "\e63a"; +} + +.uicon-download:before { + content: "\e63c"; +} + +.uicon-eye-fill:before { + content: "\e641"; +} + +.uicon-mic-off:before { + content: "\e649"; +} + +.uicon-mic:before { + content: "\e64a"; +} + +.uicon-info-circle-fill:before { + content: "\e64b"; +} + +.uicon-map-fill:before { + content: "\e64e"; +} + +.uicon-trash-fill:before { + content: "\e658"; +} + +.uicon-volume-off-fill:before { + content: "\e659"; +} + +.uicon-volume-up-fill:before { + content: "\e65a"; +} + +.uicon-share-fill:before { + content: "\e65e"; +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/index.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/index.js" new file mode 100644 index 0000000..d38a3bf --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/index.js" @@ -0,0 +1,141 @@ +// 寮曞叆鍏ㄥ眬mixin +import mixin from './libs/mixin/mixin.js' +// 寮曞叆鍏充簬鏄惁mixin闆嗘垚灏忕▼搴忓垎浜殑閰嶇疆 +// import wxshare from './libs/mixin/mpShare.js' +// 鍏ㄥ眬鎸傝浇寮曞叆http鐩稿叧璇锋眰鎷︽埅鎻掍欢 +import http from './libs/request' + +function wranning(str) { + // 寮�鍙戠幆澧冭繘琛屼俊鎭緭鍑�,涓昏鏄竴浜涙姤閿欎俊鎭� + // 杩欎釜鐜鐨勬潵鐢辨槸鍦ㄧ▼搴忕紪鍐欐椂鍊�,鐐瑰嚮hx缂栬緫鍣ㄨ繍琛岃皟璇曚唬鐮佺殑鏃跺��,璇﹁: + // https://uniapp.dcloud.io/frame?id=%e5%bc%80%e5%8f%91%e7%8e%af%e5%a2%83%e5%92%8c%e7%94%9f%e4%ba%a7%e7%8e%af%e5%a2%83 + if (process.env.NODE_ENV === 'development') { + console.warn(str) + } +} + +// 灏濊瘯鍒ゆ柇鍦ㄦ牴鐩綍鐨�/store涓槸鍚︽湁$u.mixin.js锛屾鏂囦欢uView榛樿涓洪渶瑕佹寕鍦ㄥ埌鍏ㄥ眬鐨剉uex鐨剆tate鍙橀噺 +// HX2.6.11鐗堟湰,鏀惧埌try涓�,鎺у埗鍙颁緷鐒朵細璀﹀憡,鏆傛椂涓嶇敤姝ゆ柟寮忥紝 +// let vuexStore = {}; +// try { +// vuexStore = require("@/store/$u.mixin.js"); +// } catch (e) { +// //TODO handle the exception +// } + +// post绫诲瀷瀵硅薄鍙傛暟杞负get绫诲瀷url鍙傛暟 +import queryParams from './libs/function/queryParams.js' +// 璺敱灏佽 +import route from './libs/function/route.js' +// 鏃堕棿鏍煎紡鍖� +import timeFormat from './libs/function/timeFormat.js' +// 鏃堕棿鎴虫牸寮忓寲,杩斿洖澶氫箙涔嬪墠 +import timeFrom from './libs/function/timeFrom.js' +// 棰滆壊娓愬彉鐩稿叧,colorGradient-棰滆壊娓愬彉,hexToRgb-鍗佸叚杩涘埗棰滆壊杞瑀gb棰滆壊,rgbToHex-rgb杞崄鍏繘鍒� +import colorGradient from './libs/function/colorGradient.js' +// 鐢熸垚鍏ㄥ眬鍞竴guid瀛楃涓� +import guid from './libs/function/guid.js' +// 涓婚鐩稿叧棰滆壊,info|success|warning|primary|default|error,姝ら鑹插凡鍦╱view.scss涓畾涔�,浣嗘槸涓簀s涓篃鑳戒娇鐢�,鏁呬篃瀹氫箟涓�浠� +import color from './libs/function/color.js' +// 鏍规嵁type鑾峰彇鍥炬爣鍚嶇О +import type2icon from './libs/function/type2icon.js' +// 鎵撲贡鏁扮粍鐨勯『搴� +import randomArray from './libs/function/randomArray.js' +// 瀵硅薄鍜屾暟缁勭殑娣卞害鍏嬮殕 +import deepClone from './libs/function/deepClone.js' +// 瀵硅薄娣卞害鎷疯礉 +import deepMerge from './libs/function/deepMerge.js' +// 娣诲姞鍗曚綅 +import addUnit from './libs/function/addUnit.js' + +// 瑙勫垯妫�楠� +import test from './libs/function/test.js' +// 闅忔満鏁� +import random from './libs/function/random.js' +// 鍘婚櫎绌烘牸 +import trim from './libs/function/trim.js' +// toast鎻愮ず锛屽uni.showToast鐨勫皝瑁� +import toast from './libs/function/toast.js' +// 鑾峰彇鐖剁粍浠跺弬鏁� +import getParent from './libs/function/getParent.js' +// 鑾峰彇鏁翠釜鐖剁粍浠� +import $parent from './libs/function/$parent.js' +// 鑾峰彇sys()鍜宱s()宸ュ叿鏂规硶 +// 鑾峰彇璁惧淇℃伅锛屾寕杞藉埌$u鐨剆ys()(system鐨勭缉鍐�)灞炴�т腑锛� +// 鍚屾椂鎶婂畨鍗撳拰ios骞冲彴鐨勫悕绉�"ios"鍜�"android"鎸傚埌$u.os()涓紝鏂逛究鍙栫敤 +import {sys, os} from './libs/function/sys.js' +// 闃叉姈鏂规硶 +import debounce from './libs/function/debounce.js' +// 鑺傛祦鏂规硶 +import throttle from './libs/function/throttle.js' + + +// 閰嶇疆淇℃伅 +import config from './libs/config/config.js' +// 鍚勪釜闇�瑕乫ixed鐨勫湴鏂圭殑z-index閰嶇疆鏂囦欢 +import zIndex from './libs/config/zIndex.js' + +const $u = { + queryParams: queryParams, + route: route, + timeFormat: timeFormat, + date: timeFormat, // 鍙﹀悕date + timeFrom, + colorGradient: colorGradient.colorGradient, + colorToRgba: colorGradient.colorToRgba, + guid, + color, + sys, + os, + type2icon, + randomArray, + wranning, + get: http.get, + post: http.post, + put: http.put, + 'delete': http.delete, + hexToRgb: colorGradient.hexToRgb, + rgbToHex: colorGradient.rgbToHex, + test, + random, + deepClone, + deepMerge, + getParent, + $parent, + addUnit, + trim, + type: ['primary', 'success', 'error', 'warning', 'info'], + http, + toast, + config, // uView閰嶇疆淇℃伅鐩稿叧锛屾瘮濡傜増鏈彿 + zIndex, + debounce, + throttle, +} + +// $u鎸傝浇鍒皍ni瀵硅薄涓� +uni.$u = $u + +const install = Vue => { + Vue.mixin(mixin) + if (Vue.prototype.openShare) { + Vue.mixin(mpShare); + } + // Vue.mixin(vuexStore); + // 鏃堕棿鏍煎紡鍖栵紝鍚屾椂涓や釜鍚嶇О锛宒ate鍜宼imeFormat + Vue.filter('timeFormat', (timestamp, format) => { + return timeFormat(timestamp, format) + }) + Vue.filter('date', (timestamp, format) => { + return timeFormat(timestamp, format) + }) + // 灏嗗涔呬互鍓嶇殑鏂规硶锛屾敞鍏ュ埌鍏ㄥ眬杩囨护鍣� + Vue.filter('timeFrom', (timestamp, format) => { + return timeFrom(timestamp, format) + }) + Vue.prototype.$u = $u +} + +export default { + install +} \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/index.scss" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/index.scss" new file mode 100644 index 0000000..84daa72 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/index.scss" @@ -0,0 +1,23 @@ +// 寮曞叆鍏叡鍩虹绫� +@import "./libs/css/common.scss"; +@import "./libs/css/color.scss"; + +// 闈瀗vue鐨勬牱寮� +/* #ifndef APP-NVUE */ +@import "./libs/css/style.vue.scss"; +/* #endif */ + +// nvue鐨勭壒鏈夋牱寮� +/* #ifdef APP-NVUE */ +@import "./libs/css/style.nvue.scss"; +/* #endif */ + +// 灏忕▼搴忕壒鏈夌殑鏍峰紡 +/* #ifdef MP */ +@import "./libs/css/style.mp.scss"; +/* #endif */ + +// H5鐗规湁鐨勬牱寮� +/* #ifdef H5 */ +@import "./libs/css/style.h5.scss"; +/* #endif */ \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/config/config.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/config/config.js" new file mode 100644 index 0000000..ac3c65e --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/config/config.js" @@ -0,0 +1,15 @@ +// 姝ょ増鏈彂甯冧簬2020-12-17 +let version = '1.8.3'; + +export default { + v: version, + version: version, + // 涓婚鍚嶇О + type: [ + 'primary', + 'success', + 'info', + 'error', + 'warning' + ] +} \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/config/zIndex.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/config/zIndex.js" new file mode 100644 index 0000000..d60e5bd --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/config/zIndex.js" @@ -0,0 +1,20 @@ +// uniapp鍦℉5涓悇API鐨剒-index鍊煎涓嬶細 +/** + * actionsheet: 999 + * modal: 999 + * navigate: 998 + * tabbar: 998 + * toast: 999 + */ + +export default { + toast: 10090, + noNetwork: 10080, + // popup鍖呭惈popup锛宎ctionsheet锛宬eyboard锛宲icker鐨勫�� + popup: 10075, + mask: 10070, + navbar: 980, + topTips: 975, + sticky: 970, + indexListSticky: 965, +} \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/css/color.scss" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/css/color.scss" new file mode 100644 index 0000000..279bc40 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/css/color.scss" @@ -0,0 +1,155 @@ +.u-type-primary-light { + color: $u-type-primary-light; +} + +.u-type-warning-light { + color: $u-type-warning-light; +} + +.u-type-success-light { + color: $u-type-success-light; +} + +.u-type-error-light { + color: $u-type-error-light; +} + +.u-type-info-light { + color: $u-type-info-light; +} + +.u-type-primary-light-bg { + background-color: $u-type-primary-light; +} + +.u-type-warning-light-bg { + background-color: $u-type-warning-light; +} + +.u-type-success-light-bg { + background-color: $u-type-success-light; +} + +.u-type-error-light-bg { + background-color: $u-type-error-light; +} + +.u-type-info-light-bg { + background-color: $u-type-info-light; +} + +.u-type-primary-dark { + color: $u-type-primary-dark; +} + +.u-type-warning-dark { + color: $u-type-warning-dark; +} + +.u-type-success-dark { + color: $u-type-success-dark; +} + +.u-type-error-dark { + color: $u-type-error-dark; +} + +.u-type-info-dark { + color: $u-type-info-dark; +} + +.u-type-primary-dark-bg { + background-color: $u-type-primary-dark; +} + +.u-type-warning-dark-bg { + background-color: $u-type-warning-dark; +} + +.u-type-success-dark-bg { + background-color: $u-type-success-dark; +} + +.u-type-error-dark-bg { + background-color: $u-type-error-dark; +} + +.u-type-info-dark-bg { + background-color: $u-type-info-dark; +} + +.u-type-primary-disabled { + color: $u-type-primary-disabled; +} + +.u-type-warning-disabled { + color: $u-type-warning-disabled; +} + +.u-type-success-disabled { + color: $u-type-success-disabled; +} + +.u-type-error-disabled { + color: $u-type-error-disabled; +} + +.u-type-info-disabled { + color: $u-type-info-disabled; +} + +.u-type-primary { + color: $u-type-primary; +} + +.u-type-warning { + color: $u-type-warning; +} + +.u-type-success { + color: $u-type-success; +} + +.u-type-error { + color: $u-type-error; +} + +.u-type-info { + color: $u-type-info; +} + +.u-type-primary-bg { + background-color: $u-type-primary; +} + +.u-type-warning-bg { + background-color: $u-type-warning; +} + +.u-type-success-bg { + background-color: $u-type-success; +} + +.u-type-error-bg { + background-color: $u-type-error; +} + +.u-type-info-bg { + background-color: $u-type-info; +} + +.u-main-color { + color: $u-main-color; +} + +.u-content-color { + color: $u-content-color; +} + +.u-tips-color { + color: $u-tips-color; +} + +.u-light-color { + color: $u-light-color; +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/css/common.scss" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/css/common.scss" new file mode 100644 index 0000000..29eb7f4 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/css/common.scss" @@ -0,0 +1,176 @@ +.u-relative, +.u-rela { + position: relative; +} + +.u-absolute, +.u-abso { + position: absolute; +} + +// nvue涓嶈兘鐢ㄦ爣绛惧懡鍚嶆牱寮忥紝涓嶈兘鏀惧湪寰俊缁勪欢涓紝鍚﹀垯寰俊寮�鍙戝伐鍏蜂細鎶ヨ鍛婏紝鏃犳硶浣跨敤鏍囩鍚嶅綋鍋氶�夋嫨鍣� +/* #ifndef APP-NVUE */ +image { + display: inline-block; +} + +// 鍦╳eex锛屼篃鍗硁vue涓紝鎵�鏈夊厓绱犻粯璁や负border-box +view, +text { + box-sizing: border-box; +} +/* #endif */ + +.u-font-xs { + font-size: 22rpx; +} + +.u-font-sm { + font-size: 26rpx; +} + +.u-font-md { + font-size: 28rpx; +} + +.u-font-lg { + font-size: 30rpx; +} + +.u-font-xl { + font-size: 34rpx; +} + +.u-flex { + /* #ifndef APP-NVUE */ + display: flex; + /* #endif */ + flex-direction: row; + align-items: center; +} + +.u-flex-wrap { + flex-wrap: wrap; +} + +.u-flex-nowrap { + flex-wrap: nowrap; +} + +.u-col-center { + align-items: center; +} + +.u-col-top { + align-items: flex-start; +} + +.u-col-bottom { + align-items: flex-end; +} + +.u-row-center { + justify-content: center; +} + +.u-row-left { + justify-content: flex-start; +} + +.u-row-right { + justify-content: flex-end; +} + +.u-row-between { + justify-content: space-between; +} + +.u-row-around { + justify-content: space-around; +} + +.u-text-left { + text-align: left; +} + +.u-text-center { + text-align: center; +} + +.u-text-right { + text-align: right; +} + +.u-flex-col { + /* #ifndef APP-NVUE */ + display: flex; + /* #endif */ + flex-direction: column; +} + +// 瀹氫箟flex绛夊垎 +@for $i from 0 through 12 { + .u-flex-#{$i} { + flex: $i; + } +} + +// 瀹氫箟瀛椾綋(px)鍗曚綅锛屽皬浜�20閮戒负px鍗曚綅瀛椾綋 +@for $i from 9 to 20 { + .u-font-#{$i} { + font-size: $i + px; + } +} + +// 瀹氫箟瀛椾綋(rpx)鍗曚綅锛屽ぇ浜庢垨绛変簬20鐨勯兘涓簉px鍗曚綅瀛椾綋 +@for $i from 20 through 40 { + .u-font-#{$i} { + font-size: $i + rpx; + } +} + +// 瀹氫箟鍐呭杈硅窛锛屽巻閬�1-80 +@for $i from 0 through 80 { + // 鍙鍙屾暟鍜岃兘琚�5闄ゅ敖鐨勬暟 + @if $i % 2 == 0 or $i % 5 == 0 { + // 寰楀嚭锛歶-margin-30鎴栬�卽-m-30 + .u-margin-#{$i}, .u-m-#{$i} { + margin: $i + rpx!important; + } + + // 寰楀嚭锛歶-padding-30鎴栬�卽-p-30 + .u-padding-#{$i}, .u-p-#{$i} { + padding: $i + rpx!important; + } + + @each $short, $long in l left, t top, r right, b bottom { + // 缂╁啓鐗堬紝缁撴灉濡傦細 u-m-l-30 + // 瀹氫箟澶栬竟璺� + .u-m-#{$short}-#{$i} { + margin-#{$long}: $i + rpx!important; + } + + // 瀹氫箟鍐呰竟璺� + .u-p-#{$short}-#{$i} { + padding-#{$long}: $i + rpx!important; + } + + // 瀹屾暣鐗堬紝缁撴灉濡傦細u-margin-left-30 + // 瀹氫箟澶栬竟璺� + .u-margin-#{$long}-#{$i} { + margin-#{$long}: $i + rpx!important; + } + + // 瀹氫箟鍐呰竟璺� + .u-padding-#{$long}-#{$i} { + padding-#{$long}: $i + rpx!important; + } + } + } +} + +// 閲嶇疆nvue鐨勯粯璁ゅ叧浜巉lex鐨勬牱寮� +.u-reset-nvue { + flex-direction: row; + align-items: center; +} \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/css/style.components.scss" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/css/style.components.scss" new file mode 100644 index 0000000..6835876 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/css/style.components.scss" @@ -0,0 +1,7 @@ +// 瀹氫箟娣峰叆鎸囦护锛岀敤浜庡湪闈瀗vue鐜涓嬬殑flex瀹氫箟锛屽洜涓簄vue娌℃湁display灞炴�э紝浼氭姤閿� +@mixin vue-flex($direction: row) { + /* #ifndef APP-NVUE */ + display: flex; + flex-direction: $direction; + /* #endif */ +} \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/css/style.h5.scss" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/css/style.h5.scss" new file mode 100644 index 0000000..62839eb --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/css/style.h5.scss" @@ -0,0 +1,8 @@ +/* H5鐨勬椂鍊欙紝闅愯棌婊氬姩鏉� */ +::-webkit-scrollbar { + display: none; + width: 0 !important; + height: 0 !important; + -webkit-appearance: none; + background: transparent; +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/css/style.mp.scss" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/css/style.mp.scss" new file mode 100644 index 0000000..ca1d3e0 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/css/style.mp.scss" @@ -0,0 +1,72 @@ +/* start--寰俊灏忕▼搴忕紪璇戝悗椤甸潰鏈夌粍浠跺悕鐨勫厓绱狅紝鐗瑰埆澶勭悊--start */ +/* #ifdef MP-WEIXIN || MP-QQ */ +u-td, u-th { + flex: 1; + align-self: stretch; +} + +.u-td { + height: 100%; +} + +u-icon { + display: inline-flex; + align-items: center; +} + +// 鍚勫灏忕▼搴忓鏍肩粍浠跺灞傝缃负100%锛岄伩鍏嶅彈鍒扮埗鍏冪礌display: flex;鐨勫奖鍝� +u-grid { + width: 100%; + flex: 0 0 100%; +} + +// 閬垮厤灏忕▼搴忕嚎鏉$粍浠跺洜涓虹埗缁勪欢display: flex;鑰屽け鏁� +u-line { + flex: 1; +} + +u-switch { + display: inline-flex; + align-items: center; +} + +u-dropdown { + flex: 1; +} +/* #endif */ +/* end-寰俊灏忕▼搴忕紪璇戝悗椤甸潰鏈夌粍浠跺悕鐨勫厓绱狅紝鐗瑰埆澶勭悊--end */ + + +/* #ifdef MP-QQ || MP-TOUTIAO */ +// 闇�瑕佸仛杩欎竴鍒囬澶栫殑鍏煎锛岄兘鏄洜涓篢X鐨勬棤鑳� +u-icon { + line-height: 0; +} +/* #endif */ + +/* start--澶存潯灏忕▼搴忕紪璇戝悗椤甸潰鏈夌粍浠跺悕鐨勫厓绱狅紝鐗瑰埆澶勭悊--start */ +// 鐢变簬澶存潯灏忕▼搴忎笉鏀寔鐩存帴缁勪欢鍚嶅舰寮忓啓鏍峰紡锛岀洰鍓嶅彧鑳藉湪鍐欑粍浠剁殑鏃跺�欑粰缁勪欢鍔犱笂瀵瑰簲鐨勭被鍚� +/* #ifdef MP-TOUTIAO */ +.u-td, .u-th, .u-tr { + flex: 1; + align-self: stretch; +} + +.u-row, .u-col { + flex: 1; + align-self: stretch; +} + +// 閬垮厤灏忕▼搴忕嚎鏉$粍浠跺洜涓虹埗缁勪欢display: flex;鑰屽け鏁� +.u-line { + flex: 1; +} + +.u-dropdown { + flex: 1; +} +/* #endif */ +/* end-澶存潯灏忕▼搴忕紪璇戝悗椤甸潰鏈夌粍浠跺悕鐨勫厓绱狅紝鐗瑰埆澶勭悊--end */ + + + diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/css/style.nvue.scss" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/css/style.nvue.scss" new file mode 100644 index 0000000..4a6192a --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/css/style.nvue.scss" @@ -0,0 +1,3 @@ +.nvue { + font-size: 24rpx; +} \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/css/style.vue.scss" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/css/style.vue.scss" new file mode 100644 index 0000000..1ab3707 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/css/style.vue.scss" @@ -0,0 +1,175 @@ +page { + color: $u-main-color; + font-size: 28rpx; +} + +/* start--鍘婚櫎webkit鐨勯粯璁ゆ牱寮�--start */ +.u-fix-ios-appearance { + -webkit-appearance:none; +} +/* end--鍘婚櫎webkit鐨勯粯璁ゆ牱寮�--end */ + +/* start--icon鍥炬爣澶栧眰濂椾竴涓獀iew锛岃鍏惰揪鍒版洿濂界殑鍨傜洿灞呬腑鐨勬晥鏋�--start */ +.u-icon-wrap { + display: flex; + align-items: center; +} +/* end-icon鍥炬爣澶栧眰濂椾竴涓獀iew锛岃鍏惰揪鍒版洿濂界殑鍨傜洿灞呬腑鐨勬晥鏋�--end */ + +/* start--iPhoneX搴曢儴瀹夊叏鍖哄畾涔�--start */ +.safe-area-inset-bottom { + padding-bottom: 0; + padding-bottom: constant(safe-area-inset-bottom); + padding-bottom: env(safe-area-inset-bottom); +} +/* end-iPhoneX搴曢儴瀹夊叏鍖哄畾涔�--end */ + +/* start--鍚勭hover鐐瑰嚮鍙嶉鐩稿叧鐨勭被鍚�-start */ +.u-hover-class { + // background-color: #f7f8f9!important; + opacity: 0.6; +} + +.u-cell-hover { + background-color: #f7f8f9!important; +} +/* end--鍚勭hover鐐瑰嚮鍙嶉鐩稿叧鐨勭被鍚�--end */ + +/* start--鏂囨湰琛屾暟闄愬埗--start */ +.u-line-1 { + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; +} + +.u-line-2 { + -webkit-line-clamp: 2; +} + +.u-line-3 { + -webkit-line-clamp: 3; +} + +.u-line-4 { + -webkit-line-clamp: 4; +} + +.u-line-5 { + -webkit-line-clamp: 5; +} + +.u-line-2, .u-line-3, .u-line-4, .u-line-5 { + overflow: hidden; + word-break: break-all; + text-overflow: ellipsis; + display: -webkit-box; // 寮规�т几缂╃洅 + -webkit-box-orient: vertical; // 璁剧疆浼哥缉鐩掑瓙鍏冪礌鎺掑垪鏂瑰紡 +} + +/* end--鏂囨湰琛屾暟闄愬埗--end */ + + +/* start--Retina 灞忓箷涓嬬殑 1px 杈规--start */ +.u-border, +.u-border-bottom, +.u-border-left, +.u-border-right, +.u-border-top, +.u-border-top-bottom { + position: relative +} + +.u-border-bottom:after, +.u-border-left:after, +.u-border-right:after, +.u-border-top-bottom:after, +.u-border-top:after, +.u-border:after { + /* #ifndef APP-NVUE */ + content: ' '; + /* #endif */ + position: absolute; + left: 0; + top: 0; + pointer-events: none; + box-sizing: border-box; + -webkit-transform-origin: 0 0; + transform-origin: 0 0; + // 澶氬姞0.1%锛岃兘瑙e喅鏈夋椂鍊欒竟妗嗙己澶辩殑闂 + width: 199.8%; + height: 199.7%; + transform: scale(0.5, 0.5); + border: 0 solid $u-border-color; + z-index: 2; +} + +.u-border-top:after { + border-top-width: 1px +} + +.u-border-left:after { + border-left-width: 1px +} + +.u-border-right:after { + border-right-width: 1px +} + +.u-border-bottom:after { + border-bottom-width: 1px +} + +.u-border-top-bottom:after { + border-width: 1px 0 +} + +.u-border:after { + border-width: 1px +} +/* end--Retina 灞忓箷涓嬬殑 1px 杈规--end */ + + +/* start--clearfix--start */ +.u-clearfix:after, +.clearfix:after { + /* #ifndef APP-NVUE */ + content: ''; + /* #endif */ + display: table; + clear: both +} +/* end--clearfix--end */ + +/* start--楂樻柉妯$硦tabbar搴曢儴澶勭悊--start */ +.u-blur-effect-inset { + width: 750rpx; + height: var(--window-bottom); + background-color: #FFFFFF; +} +/* end--楂樻柉妯$硦tabbar搴曢儴澶勭悊--end */ + +/* start--鎻愬崌H5绔痷ni.toast()鐨勫眰绾э紝閬垮厤琚玼View鐨刴odal绛夐伄鐩�--start */ +/* #ifdef H5 */ +uni-toast { + z-index: 10090; +} +uni-toast .uni-toast { + z-index: 10090; +} +/* #endif */ +/* end--鎻愬崌H5绔痷ni.toast()鐨勫眰绾э紝閬垮厤琚玼View鐨刴odal绛夐伄鐩�--end */ + +/* start--鍘婚櫎button鐨勬墍鏈夐粯璁ゆ牱寮�--start */ +.u-reset-button { + padding: 0; + font-size: inherit; + line-height: inherit; + background-color: transparent; + color: inherit; +} + +.u-reset-button::after { + border: none; +} +/* end--鍘婚櫎button鐨勬墍鏈夐粯璁ゆ牱寮�--end */ + diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/$parent.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/$parent.js" new file mode 100644 index 0000000..80515c4 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/$parent.js" @@ -0,0 +1,18 @@ +// 鑾峰彇鐖剁粍浠剁殑鍙傛暟锛屽洜涓烘敮浠樺疂灏忕▼搴忎笉鏀寔provide/inject鐨勫啓娉� +// this.$parent鍦ㄩ潪H5涓紝鍙互鍑嗙‘鑾峰彇鍒扮埗缁勪欢锛屼絾鏄湪H5涓紝闇�瑕佸娆his.$parent.$parent.xxx +// 杩欓噷榛樿鍊肩瓑浜巙ndefined鏈夊畠鐨勫惈涔夛紝鍥犱负鏈�椤跺眰鍏冪礌(缁勪欢)鐨�$parent灏辨槸undefined锛屾剰鍛崇潃涓嶄紶name +// 鍊�(榛樿涓簎ndefined)锛屽氨鏄煡鎵炬渶椤跺眰鐨�$parent +export default function $parent(name = undefined) { + let parent = this.$parent; + // 閫氳繃while鍘嗛亶锛岃繖閲屼富瑕佹槸涓轰簡H5闇�瑕佸灞傝В鏋愮殑闂 + while (parent) { + // 鐖剁粍浠� + if (parent.$options && parent.$options.name !== name) { + // 濡傛灉缁勪欢鐨刵ame涓嶇浉绛夛紝缁х画涓婁竴绾у鎵� + parent = parent.$parent; + } else { + return parent; + } + } + return false; +} \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/addUnit.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/addUnit.js" new file mode 100644 index 0000000..247fae2 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/addUnit.js" @@ -0,0 +1,8 @@ +import validation from './test.js'; + +// 娣诲姞鍗曚綅锛屽鏋滄湁rpx锛�%锛宲x绛夊崟浣嶇粨灏炬垨鑰呭�间负auto锛岀洿鎺ヨ繑鍥烇紝鍚﹀垯鍔犱笂rpx鍗曚綅缁撳熬 +export default function addUnit(value = 'auto', unit = 'rpx') { + value = String(value); + // 鐢╱View鍐呯疆楠岃瘉瑙勫垯涓殑number鍒ゆ柇鏄惁涓烘暟鍊� + return validation.number(value) ? `${value}${unit}` : value; +} \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/bem.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/bem.js" new file mode 100644 index 0000000..05d1a36 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/bem.js" @@ -0,0 +1,5 @@ +function bem(name, conf) { + +} + +module.exports.bem = bem; diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/color.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/color.js" new file mode 100644 index 0000000..dafb8c1 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/color.js" @@ -0,0 +1,37 @@ +// 涓轰簡璁╃敤鎴疯兘澶熻嚜瀹氫箟涓婚锛屼細閫愭寮冪敤姝ゆ枃浠讹紝鍚勯鑹查�氳繃css鎻愪緵 +// 涓轰簡缁欐煇浜涚壒娈婂満鏅娇鐢ㄥ拰鍚戝悗鍏煎锛屾棤闇�鍒犻櫎姝ゆ枃浠�(2020-06-20) +let color = { + primary: "#2979ff", + primaryDark: "#2b85e4", + primaryDisabled: "#a0cfff", + primaryLight: "#ecf5ff", + bgColor: "#f3f4f6", + + info: "#909399", + infoDark: "#82848a", + infoDisabled: "#c8c9cc", + infoLight: "#f4f4f5", + + warning: "#ff9900", + warningDark: "#f29100", + warningDisabled: "#fcbd71", + warningLight: "#fdf6ec", + + error: "#fa3534", + errorDark: "#dd6161", + errorDisabled: "#fab6b6", + errorLight: "#fef0f0", + + success: "#19be6b", + successDark: "#18b566", + successDisabled: "#71d5a1", + successLight: "#dbf1e1", + + mainColor: "#303133", + contentColor: "#606266", + tipsColor: "#909399", + lightColor: "#c0c4cc", + borderColor: "#e4e7ed" +} + +export default color; \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/colorGradient.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/colorGradient.js" new file mode 100644 index 0000000..eca30a2 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/colorGradient.js" @@ -0,0 +1,134 @@ +/** + * 姹備袱涓鑹蹭箣闂寸殑娓愬彉鍊� + * @param {string} startColor 寮�濮嬬殑棰滆壊 + * @param {string} endColor 缁撴潫鐨勯鑹� + * @param {number} step 棰滆壊绛夊垎鐨勪唤棰� + * */ +function colorGradient(startColor = 'rgb(0, 0, 0)', endColor = 'rgb(255, 255, 255)', step = 10) { + let startRGB = hexToRgb(startColor, false); //杞崲涓簉gb鏁扮粍妯″紡 + let startR = startRGB[0]; + let startG = startRGB[1]; + let startB = startRGB[2]; + + let endRGB = hexToRgb(endColor, false); + let endR = endRGB[0]; + let endG = endRGB[1]; + let endB = endRGB[2]; + + let sR = (endR - startR) / step; //鎬诲樊鍊� + let sG = (endG - startG) / step; + let sB = (endB - startB) / step; + let colorArr = []; + for (let i = 0; i < step; i++) { + //璁$畻姣忎竴姝ョ殑hex鍊� + let hex = rgbToHex('rgb(' + Math.round((sR * i + startR)) + ',' + Math.round((sG * i + startG)) + ',' + Math.round((sB * + i + startB)) + ')'); + colorArr.push(hex); + } + return colorArr; +} + +// 灏唄ex琛ㄧず鏂瑰紡杞崲涓簉gb琛ㄧず鏂瑰紡(杩欓噷杩斿洖rgb鏁扮粍妯″紡) +function hexToRgb(sColor, str = true) { + let reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/; + sColor = sColor.toLowerCase(); + if (sColor && reg.test(sColor)) { + if (sColor.length === 4) { + let sColorNew = "#"; + for (let i = 1; i < 4; i += 1) { + sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1)); + } + sColor = sColorNew; + } + //澶勭悊鍏綅鐨勯鑹插�� + let sColorChange = []; + for (let i = 1; i < 7; i += 2) { + sColorChange.push(parseInt("0x" + sColor.slice(i, i + 2))); + } + if(!str) { + return sColorChange; + } else { + return `rgb(${sColorChange[0]},${sColorChange[1]},${sColorChange[2]})`; + } + } else if (/^(rgb|RGB)/.test(sColor)) { + let arr = sColor.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",") + return arr.map(val => Number(val)); + } else { + return sColor; + } +}; + +// 灏唕gb琛ㄧず鏂瑰紡杞崲涓篽ex琛ㄧず鏂瑰紡 +function rgbToHex(rgb) { + let _this = rgb; + let reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/; + if (/^(rgb|RGB)/.test(_this)) { + let aColor = _this.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(","); + let strHex = "#"; + for (let i = 0; i < aColor.length; i++) { + let hex = Number(aColor[i]).toString(16); + hex = String(hex).length == 1 ? 0 + '' + hex : hex; // 淇濊瘉姣忎釜rgb鐨勫�间负2浣� + if (hex === "0") { + hex += hex; + } + strHex += hex; + } + if (strHex.length !== 7) { + strHex = _this; + } + return strHex; + } else if (reg.test(_this)) { + let aNum = _this.replace(/#/, "").split(""); + if (aNum.length === 6) { + return _this; + } else if (aNum.length === 3) { + let numHex = "#"; + for (let i = 0; i < aNum.length; i += 1) { + numHex += (aNum[i] + aNum[i]); + } + return numHex; + } + } else { + return _this; + } +} + + +/** +* JS棰滆壊鍗佸叚杩涘埗杞崲涓簉gb鎴杛gba,杩斿洖鐨勬牸寮忎负 rgba锛�255锛�255锛�255锛�0.5锛夊瓧绗︿覆 +* sHex涓轰紶鍏ョ殑鍗佸叚杩涘埗鐨勮壊鍊� +* alpha涓簉gba鐨勯�忔槑搴� +*/ +function colorToRgba(color, alpha = 0.3) { + color = rgbToHex(color) + // 鍗佸叚杩涘埗棰滆壊鍊肩殑姝e垯琛ㄨ揪寮� + var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/ + /* 16杩涘埗棰滆壊杞负RGB鏍煎紡 */ + let sColor = color.toLowerCase() + if (sColor && reg.test(sColor)) { + if (sColor.length === 4) { + var sColorNew = '#' + for (let i = 1; i < 4; i += 1) { + sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1)) + } + sColor = sColorNew + } + // 澶勭悊鍏綅鐨勯鑹插�� + var sColorChange = [] + for (let i = 1; i < 7; i += 2) { + sColorChange.push(parseInt('0x' + sColor.slice(i, i + 2))) + } + // return sColorChange.join(',') + return 'rgba(' + sColorChange.join(',') + ',' + alpha + ')' + } + else { + return sColor + } +} + +export default { + colorGradient, + hexToRgb, + rgbToHex, + colorToRgba +} \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/debounce.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/debounce.js" new file mode 100644 index 0000000..4f1027b --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/debounce.js" @@ -0,0 +1,29 @@ +let timeout = null; + +/** + * 闃叉姈鍘熺悊锛氫竴瀹氭椂闂村唴锛屽彧鏈夋渶鍚庝竴娆℃搷浣滐紝鍐嶈繃wait姣鍚庢墠鎵ц鍑芥暟 + * + * @param {Function} func 瑕佹墽琛岀殑鍥炶皟鍑芥暟 + * @param {Number} wait 寤舵椂鐨勬椂闂� + * @param {Boolean} immediate 鏄惁绔嬪嵆鎵ц + * @return null + */ +function debounce(func, wait = 500, immediate = false) { + // 娓呴櫎瀹氭椂鍣� + if (timeout !== null) clearTimeout(timeout); + // 绔嬪嵆鎵ц锛屾绫绘儏鍐典竴鑸敤涓嶅埌 + if (immediate) { + var callNow = !timeout; + timeout = setTimeout(function() { + timeout = null; + }, wait); + if (callNow) typeof func === 'function' && func(); + } else { + // 璁剧疆瀹氭椂鍣紝褰撴渶鍚庝竴娆℃搷浣滃悗锛宼imeout涓嶄細鍐嶈娓呴櫎锛屾墍浠ュ湪寤舵椂wait姣鍚庢墽琛宖unc鍥炶皟鏂规硶 + timeout = setTimeout(function() { + typeof func === 'function' && func(); + }, wait); + } +} + +export default debounce diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/deepClone.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/deepClone.js" new file mode 100644 index 0000000..3db999a --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/deepClone.js" @@ -0,0 +1,23 @@ +// 鍒ゆ柇arr鏄惁涓轰竴涓暟缁勶紝杩斿洖涓�涓猙ool鍊� +function isArray (arr) { + return Object.prototype.toString.call(arr) === '[object Array]'; +} + +// 娣卞害鍏嬮殕 +function deepClone (obj) { + // 瀵瑰父瑙佺殑鈥滈潪鈥濆�硷紝鐩存帴杩斿洖鍘熸潵鍊� + if([null, undefined, NaN, false].includes(obj)) return obj; + if(typeof obj !== "object" && typeof obj !== 'function') { + //鍘熷绫诲瀷鐩存帴杩斿洖 + return obj; + } + var o = isArray(obj) ? [] : {}; + for(let i in obj) { + if(obj.hasOwnProperty(i)){ + o[i] = typeof obj[i] === "object" ? deepClone(obj[i]) : obj[i]; + } + } + return o; +} + +export default deepClone; diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/deepMerge.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/deepMerge.js" new file mode 100644 index 0000000..81d2d18 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/deepMerge.js" @@ -0,0 +1,30 @@ +import deepClone from "./deepClone"; + +// JS瀵硅薄娣卞害鍚堝苟 +function deepMerge(target = {}, source = {}) { + target = deepClone(target); + if (typeof target !== 'object' || typeof source !== 'object') return false; + for (var prop in source) { + if (!source.hasOwnProperty(prop)) continue; + if (prop in target) { + if (typeof target[prop] !== 'object') { + target[prop] = source[prop]; + } else { + if (typeof source[prop] !== 'object') { + target[prop] = source[prop]; + } else { + if (target[prop].concat && source[prop].concat) { + target[prop] = target[prop].concat(source[prop]); + } else { + target[prop] = deepMerge(target[prop], source[prop]); + } + } + } + } else { + target[prop] = source[prop]; + } + } + return target; +} + +export default deepMerge; \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/getParent.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/getParent.js" new file mode 100644 index 0000000..9cb45c4 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/getParent.js" @@ -0,0 +1,47 @@ +// 鑾峰彇鐖剁粍浠剁殑鍙傛暟锛屽洜涓烘敮浠樺疂灏忕▼搴忎笉鏀寔provide/inject鐨勫啓娉� +// this.$parent鍦ㄩ潪H5涓紝鍙互鍑嗙‘鑾峰彇鍒扮埗缁勪欢锛屼絾鏄湪H5涓紝闇�瑕佸娆his.$parent.$parent.xxx +export default function getParent(name, keys) { + let parent = this.$parent; + // 閫氳繃while鍘嗛亶锛岃繖閲屼富瑕佹槸涓轰簡H5闇�瑕佸灞傝В鏋愮殑闂 + while (parent) { + // 鐖剁粍浠� + if (parent.$options.name !== name) { + // 濡傛灉缁勪欢鐨刵ame涓嶇浉绛夛紝缁х画涓婁竴绾у鎵� + parent = parent.$parent; + } else { + let data = {}; + // 鍒ゆ柇keys鏄惁鏁扮粍锛屽鏋滀紶杩囨潵鐨勬槸涓�涓暟缁勶紝閭d箞鐩存帴浣跨敤鏁扮粍鍏冪礌鍊煎綋鍋氶敭鍊煎幓鐖剁粍浠跺鎵� + if(Array.isArray(keys)) { + keys.map(val => { + data[val] = parent[val] ? parent[val] : ''; + }) + } else { + // 鍘嗛亶浼犺繃鏉ョ殑瀵硅薄鍙傛暟 + for(let i in keys) { + // 濡傛灉瀛愮粍浠舵湁姝ゅ�煎垯鐢紝鏃犳鍊煎垯鐢ㄧ埗缁勪欢鐨勫�� + // 鍒ゆ柇鏄惁绌烘暟缁勶紝濡傛灉鏄紝鍒欑敤鐖剁粍浠剁殑鍊硷紝鍚﹀垯鐢ㄥ瓙缁勪欢鐨勫�� + if(Array.isArray(keys[i])) { + if(keys[i].length) { + data[i] = keys[i]; + } else { + data[i] = parent[i]; + } + } else if(keys[i].constructor === Object) { + // 鍒ゆ柇鏄惁瀵硅薄锛屽鏋滄槸瀵硅薄锛屼笖鏈夊睘鎬э紝閭d箞浣跨敤瀛愮粍浠剁殑鍊硷紝鍚﹀垯浣跨敤鐖剁粍浠剁殑鍊� + if(Object.keys(keys[i]).length) { + data[i] = keys[i]; + } else { + data[i] = parent[i]; + } + } else { + // 鍙瀛愮粍浠舵湁浼犲�硷紝鍗充娇鏄痜alse鍊硷紝涔熸槸鈥滀紶鍊尖�濅簡锛屼篃闇�瑕佽鐩栫埗缁勪欢鐨勫悓鍚嶅弬鏁� + data[i] = (keys[i] || keys[i] === false) ? keys[i] : parent[i]; + } + } + } + return data; + } + } + + return {}; +} \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/guid.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/guid.js" new file mode 100644 index 0000000..8497664 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/guid.js" @@ -0,0 +1,41 @@ +/** + * 鏈畻娉曟潵婧愪簬绠�涔﹀紑婧愪唬鐮侊紝璇﹁锛歨ttps://www.jianshu.com/p/fdbf293d0a85 + * 鍏ㄥ眬鍞竴鏍囪瘑绗︼紙uuid锛孏lobally Unique Identifier锛�,涔熺О浣� uuid(Universally Unique IDentifier) + * 涓�鑸敤浜庡涓粍浠朵箣闂�,缁欏畠涓�涓敮涓�鐨勬爣璇嗙,鎴栬�卾-for寰幆鐨勬椂鍊�,濡傛灉浣跨敤鏁扮粍鐨刬ndex鍙兘浼氬鑷存洿鏂板垪琛ㄥ嚭鐜伴棶棰� + * 鏈�鍙兘鐨勬儏鍐垫槸宸︽粦鍒犻櫎item鎴栬�呭鏌愭潯淇℃伅娴�"涓嶅枩娆�"骞跺幓鎺夊畠鐨勬椂鍊�,浼氬鑷寸粍浠跺唴鐨勬暟鎹彲鑳藉嚭鐜伴敊涔� + * v-for鐨勬椂鍊�,鎺ㄨ崘浣跨敤鍚庣杩斿洖鐨刬d鑰屼笉鏄惊鐜殑index + * @param {Number} len uuid鐨勯暱搴� + * @param {Boolean} firstU 灏嗚繑鍥炵殑棣栧瓧姣嶇疆涓�"u" + * @param {Nubmer} radix 鐢熸垚uuid鐨勫熀鏁�(鎰忓懗鐫�杩斿洖鐨勫瓧绗︿覆閮芥槸杩欎釜鍩烘暟),2-浜岃繘鍒�,8-鍏繘鍒�,10-鍗佽繘鍒�,16-鍗佸叚杩涘埗 + */ +function guid(len = 32, firstU = true, radix = null) { + let chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split(''); + let uuid = []; + radix = radix || chars.length; + + if (len) { + // 濡傛灉鎸囧畾uuid闀垮害,鍙槸鍙栭殢鏈虹殑瀛楃,0|x涓轰綅杩愮畻,鑳藉幓鎺墄鐨勫皬鏁颁綅,杩斿洖鏁存暟浣� + for (let i = 0; i < len; i++) uuid[i] = chars[0 | Math.random() * radix]; + } else { + let r; + // rfc4122鏍囧噯瑕佹眰杩斿洖鐨剈uid涓�,鏌愪簺浣嶄负鍥哄畾鐨勫瓧绗� + uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-'; + uuid[14] = '4'; + + for (let i = 0; i < 36; i++) { + if (!uuid[i]) { + r = 0 | Math.random() * 16; + uuid[i] = chars[(i == 19) ? (r & 0x3) | 0x8 : r]; + } + } + } + // 绉婚櫎绗竴涓瓧绗�,骞剁敤u鏇夸唬,鍥犱负绗竴涓瓧绗︿负鏁板�兼椂,璇uuid涓嶈兘鐢ㄤ綔id鎴栬�卌lass + if (firstU) { + uuid.shift(); + return 'u' + uuid.join(''); + } else { + return uuid.join(''); + } +} + +export default guid; diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/md5.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/md5.js" new file mode 100644 index 0000000..8d541a1 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/md5.js" @@ -0,0 +1,385 @@ +/* + * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message + * Digest Algorithm, as defined in RFC 1321. + * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009 + * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet + * Distributed under the BSD License + * See http://pajhome.org.uk/crypt/md5 for more info. + */ + +/* + * Configurable variables. You may need to tweak these to be compatible with + * the server-side, but the defaults work in most cases. + */ +var hexcase = 0; /* hex output format. 0 - lowercase; 1 - uppercase */ +var b64pad = ""; /* base-64 pad character. "=" for strict RFC compliance */ + +/* + * These are the functions you'll usually want to call + * They take string arguments and return either hex or base-64 encoded strings + */ +function hex_md5(s) { return rstr2hex(rstr_md5(str2rstr_utf8(s))); } +function b64_md5(s) { return rstr2b64(rstr_md5(str2rstr_utf8(s))); } +function any_md5(s, e) { return rstr2any(rstr_md5(str2rstr_utf8(s)), e); } +function hex_hmac_md5(k, d) + { return rstr2hex(rstr_hmac_md5(str2rstr_utf8(k), str2rstr_utf8(d))); } +function b64_hmac_md5(k, d) + { return rstr2b64(rstr_hmac_md5(str2rstr_utf8(k), str2rstr_utf8(d))); } +function any_hmac_md5(k, d, e) + { return rstr2any(rstr_hmac_md5(str2rstr_utf8(k), str2rstr_utf8(d)), e); } + +/* + * Perform a simple self-test to see if the VM is working + */ +function md5_vm_test() +{ + return hex_md5("abc").toLowerCase() == "900150983cd24fb0d6963f7d28e17f72"; +} + +/* + * Calculate the MD5 of a raw string + */ +function rstr_md5(s) +{ + return binl2rstr(binl_md5(rstr2binl(s), s.length * 8)); +} + +/* + * Calculate the HMAC-MD5, of a key and some data (raw strings) + */ +function rstr_hmac_md5(key, data) +{ + var bkey = rstr2binl(key); + if(bkey.length > 16) bkey = binl_md5(bkey, key.length * 8); + + var ipad = Array(16), opad = Array(16); + for(var i = 0; i < 16; i++) + { + ipad[i] = bkey[i] ^ 0x36363636; + opad[i] = bkey[i] ^ 0x5C5C5C5C; + } + + var hash = binl_md5(ipad.concat(rstr2binl(data)), 512 + data.length * 8); + return binl2rstr(binl_md5(opad.concat(hash), 512 + 128)); +} + +/* + * Convert a raw string to a hex string + */ +function rstr2hex(input) +{ + try { hexcase } catch(e) { hexcase=0; } + var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef"; + var output = ""; + var x; + for(var i = 0; i < input.length; i++) + { + x = input.charCodeAt(i); + output += hex_tab.charAt((x >>> 4) & 0x0F) + + hex_tab.charAt( x & 0x0F); + } + return output; +} + +/* + * Convert a raw string to a base-64 string + */ +function rstr2b64(input) +{ + try { b64pad } catch(e) { b64pad=''; } + var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + var output = ""; + var len = input.length; + for(var i = 0; i < len; i += 3) + { + var triplet = (input.charCodeAt(i) << 16) + | (i + 1 < len ? input.charCodeAt(i+1) << 8 : 0) + | (i + 2 < len ? input.charCodeAt(i+2) : 0); + for(var j = 0; j < 4; j++) + { + if(i * 8 + j * 6 > input.length * 8) output += b64pad; + else output += tab.charAt((triplet >>> 6*(3-j)) & 0x3F); + } + } + return output; +} + +/* + * Convert a raw string to an arbitrary string encoding + */ +function rstr2any(input, encoding) +{ + var divisor = encoding.length; + var i, j, q, x, quotient; + + /* Convert to an array of 16-bit big-endian values, forming the dividend */ + var dividend = Array(Math.ceil(input.length / 2)); + for(i = 0; i < dividend.length; i++) + { + dividend[i] = (input.charCodeAt(i * 2) << 8) | input.charCodeAt(i * 2 + 1); + } + + /* + * Repeatedly perform a long division. The binary array forms the dividend, + * the length of the encoding is the divisor. Once computed, the quotient + * forms the dividend for the next step. All remainders are stored for later + * use. + */ + var full_length = Math.ceil(input.length * 8 / + (Math.log(encoding.length) / Math.log(2))); + var remainders = Array(full_length); + for(j = 0; j < full_length; j++) + { + quotient = Array(); + x = 0; + for(i = 0; i < dividend.length; i++) + { + x = (x << 16) + dividend[i]; + q = Math.floor(x / divisor); + x -= q * divisor; + if(quotient.length > 0 || q > 0) + quotient[quotient.length] = q; + } + remainders[j] = x; + dividend = quotient; + } + + /* Convert the remainders to the output string */ + var output = ""; + for(i = remainders.length - 1; i >= 0; i--) + output += encoding.charAt(remainders[i]); + + return output; +} + +/* + * Encode a string as utf-8. + * For efficiency, this assumes the input is valid utf-16. + */ +function str2rstr_utf8(input) +{ + var output = ""; + var i = -1; + var x, y; + + while(++i < input.length) + { + /* Decode utf-16 surrogate pairs */ + x = input.charCodeAt(i); + y = i + 1 < input.length ? input.charCodeAt(i + 1) : 0; + if(0xD800 <= x && x <= 0xDBFF && 0xDC00 <= y && y <= 0xDFFF) + { + x = 0x10000 + ((x & 0x03FF) << 10) + (y & 0x03FF); + i++; + } + + /* Encode output as utf-8 */ + if(x <= 0x7F) + output += String.fromCharCode(x); + else if(x <= 0x7FF) + output += String.fromCharCode(0xC0 | ((x >>> 6 ) & 0x1F), + 0x80 | ( x & 0x3F)); + else if(x <= 0xFFFF) + output += String.fromCharCode(0xE0 | ((x >>> 12) & 0x0F), + 0x80 | ((x >>> 6 ) & 0x3F), + 0x80 | ( x & 0x3F)); + else if(x <= 0x1FFFFF) + output += String.fromCharCode(0xF0 | ((x >>> 18) & 0x07), + 0x80 | ((x >>> 12) & 0x3F), + 0x80 | ((x >>> 6 ) & 0x3F), + 0x80 | ( x & 0x3F)); + } + return output; +} + +/* + * Encode a string as utf-16 + */ +function str2rstr_utf16le(input) +{ + var output = ""; + for(var i = 0; i < input.length; i++) + output += String.fromCharCode( input.charCodeAt(i) & 0xFF, + (input.charCodeAt(i) >>> 8) & 0xFF); + return output; +} + +function str2rstr_utf16be(input) +{ + var output = ""; + for(var i = 0; i < input.length; i++) + output += String.fromCharCode((input.charCodeAt(i) >>> 8) & 0xFF, + input.charCodeAt(i) & 0xFF); + return output; +} + +/* + * Convert a raw string to an array of little-endian words + * Characters >255 have their high-byte silently ignored. + */ +function rstr2binl(input) +{ + var output = Array(input.length >> 2); + for(var i = 0; i < output.length; i++) + output[i] = 0; + for(var i = 0; i < input.length * 8; i += 8) + output[i>>5] |= (input.charCodeAt(i / 8) & 0xFF) << (i%32); + return output; +} + +/* + * Convert an array of little-endian words to a string + */ +function binl2rstr(input) +{ + var output = ""; + for(var i = 0; i < input.length * 32; i += 8) + output += String.fromCharCode((input[i>>5] >>> (i % 32)) & 0xFF); + return output; +} + +/* + * Calculate the MD5 of an array of little-endian words, and a bit length. + */ +function binl_md5(x, len) +{ + /* append padding */ + x[len >> 5] |= 0x80 << ((len) % 32); + x[(((len + 64) >>> 9) << 4) + 14] = len; + + var a = 1732584193; + var b = -271733879; + var c = -1732584194; + var d = 271733878; + + for(var i = 0; i < x.length; i += 16) + { + var olda = a; + var oldb = b; + var oldc = c; + var oldd = d; + + a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936); + d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586); + c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819); + b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330); + a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897); + d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426); + c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341); + b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983); + a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416); + d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417); + c = md5_ff(c, d, a, b, x[i+10], 17, -42063); + b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162); + a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682); + d = md5_ff(d, a, b, c, x[i+13], 12, -40341101); + c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290); + b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329); + + a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510); + d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632); + c = md5_gg(c, d, a, b, x[i+11], 14, 643717713); + b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302); + a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691); + d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083); + c = md5_gg(c, d, a, b, x[i+15], 14, -660478335); + b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848); + a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438); + d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690); + c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961); + b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501); + a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467); + d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784); + c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473); + b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734); + + a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558); + d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463); + c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562); + b = md5_hh(b, c, d, a, x[i+14], 23, -35309556); + a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060); + d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353); + c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632); + b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640); + a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174); + d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222); + c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979); + b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189); + a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487); + d = md5_hh(d, a, b, c, x[i+12], 11, -421815835); + c = md5_hh(c, d, a, b, x[i+15], 16, 530742520); + b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651); + + a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844); + d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415); + c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905); + b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055); + a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571); + d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606); + c = md5_ii(c, d, a, b, x[i+10], 15, -1051523); + b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799); + a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359); + d = md5_ii(d, a, b, c, x[i+15], 10, -30611744); + c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380); + b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649); + a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070); + d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379); + c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259); + b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551); + + a = safe_add(a, olda); + b = safe_add(b, oldb); + c = safe_add(c, oldc); + d = safe_add(d, oldd); + } + return Array(a, b, c, d); +} + +/* + * These functions implement the four basic operations the algorithm uses. + */ +function md5_cmn(q, a, b, x, s, t) +{ + return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s),b); +} +function md5_ff(a, b, c, d, x, s, t) +{ + return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t); +} +function md5_gg(a, b, c, d, x, s, t) +{ + return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t); +} +function md5_hh(a, b, c, d, x, s, t) +{ + return md5_cmn(b ^ c ^ d, a, b, x, s, t); +} +function md5_ii(a, b, c, d, x, s, t) +{ + return md5_cmn(c ^ (b | (~d)), a, b, x, s, t); +} + +/* + * Add integers, wrapping at 2^32. This uses 16-bit operations internally + * to work around bugs in some JS interpreters. + */ +function safe_add(x, y) +{ + var lsw = (x & 0xFFFF) + (y & 0xFFFF); + var msw = (x >> 16) + (y >> 16) + (lsw >> 16); + return (msw << 16) | (lsw & 0xFFFF); +} + +/* + * Bitwise rotate a 32-bit number to the left. + */ +function bit_rol(num, cnt) +{ + return (num << cnt) | (num >>> (32 - cnt)); +} + +module.exports = { + md5 : function(str){ + return hex_md5(str); + } +} \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/queryParams.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/queryParams.js" new file mode 100644 index 0000000..81c7e5e --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/queryParams.js" @@ -0,0 +1,58 @@ +/** + * 瀵硅薄杞瑄rl鍙傛暟 + * @param {*} data,瀵硅薄 + * @param {*} isPrefix,鏄惁鑷姩鍔犱笂"?" + */ +function queryParams(data = {}, isPrefix = true, arrayFormat = 'brackets') { + let prefix = isPrefix ? '?' : '' + let _result = [] + if (['indices', 'brackets', 'repeat', 'comma'].indexOf(arrayFormat) == -1) arrayFormat = 'brackets'; + for (let key in data) { + let value = data[key] + // 鍘绘帀涓虹┖鐨勫弬鏁� + if (['', undefined, null].indexOf(value) >= 0) { + continue; + } + // 濡傛灉鍊间负鏁扮粍锛屽彟琛屽鐞� + if (value.constructor === Array) { + // e.g. {ids: [1, 2, 3]} + switch (arrayFormat) { + case 'indices': + // 缁撴灉: ids[0]=1&ids[1]=2&ids[2]=3 + for (let i = 0; i < value.length; i++) { + _result.push(key + '[' + i + ']=' + value[i]) + } + break; + case 'brackets': + // 缁撴灉: ids[]=1&ids[]=2&ids[]=3 + value.forEach(_value => { + _result.push(key + '[]=' + _value) + }) + break; + case 'repeat': + // 缁撴灉: ids=1&ids=2&ids=3 + value.forEach(_value => { + _result.push(key + '=' + _value) + }) + break; + case 'comma': + // 缁撴灉: ids=1,2,3 + let commaStr = ""; + value.forEach(_value => { + commaStr += (commaStr ? "," : "") + _value; + }) + _result.push(key + '=' + commaStr) + break; + default: + value.forEach(_value => { + _result.push(key + '[]=' + _value) + }) + } + } else { + _result.push(key + '=' + value) + } + } + return _result.length ? prefix + _result.join('&') : '' +} + +export default queryParams; diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/random.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/random.js" new file mode 100644 index 0000000..e155279 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/random.js" @@ -0,0 +1,10 @@ +function random(min, max) { + if (min >= 0 && max > 0 && max >= min) { + let gab = max - min + 1; + return Math.floor(Math.random() * gab + min); + } else { + return 0; + } +} + +export default random; diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/randomArray.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/randomArray.js" new file mode 100644 index 0000000..590a048 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/randomArray.js" @@ -0,0 +1,7 @@ +// 鎵撲贡鏁扮粍 +function randomArray(array = []) { + // 鍘熺悊鏄痵ort鎺掑簭,Math.random()浜х敓0<= x < 1涔嬮棿鐨勬暟,浼氬鑷磝-0.05澶т簬鎴栬�呭皬浜�0 + return array.sort(() => Math.random() - 0.5); +} + +export default randomArray diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/route.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/route.js" new file mode 100644 index 0000000..28a81b7 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/route.js" @@ -0,0 +1,122 @@ +/** + * 璺敱璺宠浆鏂规硶锛岃鏂规硶鐩稿浜庣洿鎺ヤ娇鐢╱ni.xxx鐨勫ソ澶勬槸浣跨敤鏇村姞绠�鍗曞揩鎹� + * 骞朵笖甯︽湁璺敱鎷︽埅鍔熻兘 + */ + +class Router { + constructor() { + // 鍘熷灞炴�у畾涔� + this.config = { + type: 'navigateTo', + url: '', + delta: 1, // navigateBack椤甸潰鍚庨��鏃�,鍥為��鐨勫眰鏁� + params: {}, // 浼犻�掔殑鍙傛暟 + animationType: 'pop-in', // 绐楀彛鍔ㄧ敾,鍙湪APP鏈夋晥 + animationDuration: 300, // 绐楀彛鍔ㄧ敾鎸佺画鏃堕棿,鍗曚綅姣,鍙湪APP鏈夋晥 + intercept: false, // 鏄惁闇�瑕佹嫤鎴� + } + // 鍥犱负route鏂规硶鏄渶瑕佸澶栬祴鍊肩粰鍙﹀鐨勫璞′娇鐢紝鍚屾椂route鍐呴儴鏈変娇鐢╰his锛屼細瀵艰嚧route澶卞幓涓婁笅鏂� + // 杩欓噷鍦ㄦ瀯閫犲嚱鏁颁腑杩涜this缁戝畾 + this.route = this.route.bind(this) + } + + // 鍒ゆ柇url鍓嶉潰鏄惁鏈�"/"锛屽鏋滄病鏈夊垯鍔犱笂锛屽惁鍒欐棤娉曡烦杞� + addRootPath(url) { + return url[0] === '/' ? url : `/${url}` + } + + // 鏁村悎璺敱鍙傛暟 + mixinParam(url, params) { + url = url && this.addRootPath(url) + + // 浣跨敤姝e垯鍖归厤锛屼富瑕佷緷鎹槸鍒ゆ柇鏄惁鏈�"/","?","="绛夛紝濡傗��/page/index/index?name=mary" + // 濡傛灉鏈塽rl涓湁get鍙傛暟锛岃浆鎹㈠悗鏃犻渶甯︿笂"?" + let query = '' + if (/.*\/.*\?.*=.*/.test(url)) { + // object瀵硅薄杞负get绫诲瀷鐨勫弬鏁� + query = uni.$u.queryParams(params, false); + // 鍥犱负宸叉湁get鍙傛暟,鎵�浠ュ悗闈㈡嫾鎺ョ殑鍙傛暟闇�瑕佸甫涓�"&"闅斿紑 + return url += "&" + query + } else { + // 鐩存帴鎷兼帴鍙傛暟锛屽洜涓烘澶剈rl涓病鏈夊悗闈㈢殑query鍙傛暟锛屼篃灏辨病鏈�"?/&"涔嬬被鐨勭鍙� + query = uni.$u.queryParams(params); + return url += query + } + } + + // 瀵瑰鐨勬柟娉曞悕绉� + async route(options = {}, params = {}) { + // 鍚堝苟鐢ㄦ埛鐨勯厤缃拰鍐呴儴鐨勯粯璁ら厤缃� + let mergeConfig = {} + + if (typeof options === 'string') { + // 濡傛灉options涓哄瓧绗︿覆锛屽垯涓簉oute(url, params)鐨勫舰寮� + mergeConfig.url = this.mixinParam(options, params) + mergeConfig.type = 'navigateTo' + } else { + mergeConfig = uni.$u.deepClone(options, this.config) + // 鍚﹀垯姝e父浣跨敤mergeConfig涓殑url鍜宲arams杩涜鎷兼帴 + mergeConfig.url = this.mixinParam(options.url, options.params) + } + + if(params.intercept) { + this.config.intercept = params.intercept + } + // params鍙傛暟涔熷甫缁欐嫤鎴櫒 + mergeConfig.params = params + // 鍚堝苟鍐呭閮ㄥ弬鏁� + mergeConfig = uni.$u.deepMerge(this.config, mergeConfig) + // 鍒ゆ柇鐢ㄦ埛鏄惁瀹氫箟浜嗘嫤鎴櫒 + if (typeof uni.$u.routeIntercept === 'function') { + // 瀹氫竴涓猵romise锛屾牴鎹敤鎴锋墽琛宺esolve(true)鎴栬�卹esolve(false)鏉ュ喅瀹氭槸鍚﹁繘琛岃矾鐢辫烦杞� + const isNext = await new Promise((resolve, reject) => { + uni.$u.routeIntercept(mergeConfig, resolve) + }) + // 濡傛灉isNext涓簍rue锛屽垯鎵ц璺敱璺宠浆 + isNext && this.openPage(mergeConfig) + } else { + this.openPage(mergeConfig) + } + } + + // 鎵ц璺敱璺宠浆 + openPage(config) { + // 瑙f瀯鍙傛暟 + const { + url, + type, + delta, + animationType, + animationDuration + } = config + if (config.type == 'navigateTo' || config.type == 'to') { + uni.navigateTo({ + url, + animationType, + animationDuration + }); + } + if (config.type == 'redirectTo' || config.type == 'redirect') { + uni.redirectTo({ + url + }); + } + if (config.type == 'switchTab' || config.type == 'tab') { + uni.switchTab({ + url + }); + } + if (config.type == 'reLaunch' || config.type == 'launch') { + uni.reLaunch({ + url + }); + } + if (config.type == 'navigateBack' || config.type == 'back') { + uni.navigateBack({ + delta + }); + } + } +} + +export default (new Router()).route \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/sys.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/sys.js" new file mode 100644 index 0000000..00f6a28 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/sys.js" @@ -0,0 +1,9 @@ +export function os() { + return uni.getSystemInfoSync().platform; +}; + +export function sys() { + return uni.getSystemInfoSync(); +} + + diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/test.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/test.js" new file mode 100644 index 0000000..b8418a6 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/test.js" @@ -0,0 +1,232 @@ +/** + * 楠岃瘉鐢靛瓙閭鏍煎紡 + */ +function email(value) { + return /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/.test(value); +} + +/** + * 楠岃瘉鎵嬫満鏍煎紡 + */ +function mobile(value) { + return /^1[23456789]\d{9}$/.test(value) +} + +/** + * 楠岃瘉URL鏍煎紡 + */ +function url(value) { + return /http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w-.\/?%&=]*)?/.test(value) +} + +/** + * 楠岃瘉鏃ユ湡鏍煎紡 + */ +function date(value) { + return !/Invalid|NaN/.test(new Date(value).toString()) +} + +/** + * 楠岃瘉ISO绫诲瀷鐨勬棩鏈熸牸寮� + */ +function dateISO(value) { + return /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(value) +} + +/** + * 楠岃瘉鍗佽繘鍒舵暟瀛� + */ +function number(value) { + return /^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(value) +} + +/** + * 楠岃瘉鏁存暟 + */ +function digits(value) { + return /^\d+$/.test(value) +} + +/** + * 楠岃瘉韬唤璇佸彿鐮� + */ +function idCard(value) { + return /^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/.test( + value) +} + +/** + * 鏄惁杞︾墝鍙� + */ +function carNo(value) { + // 鏂拌兘婧愯溅鐗� + const xreg = /^[浜触娌笣鍐�璞簯杈介粦婀樼殩椴佹柊鑻忔禉璧i剛妗傜敇鏅嬭挋闄曞悏闂借吹绮ら潚钘忓窛瀹佺惣浣块A-Z]{1}[A-Z]{1}(([0-9]{5}[DF]$)|([DF][A-HJ-NP-Z0-9][0-9]{4}$))/; + // 鏃ц溅鐗� + const creg = /^[浜触娌笣鍐�璞簯杈介粦婀樼殩椴佹柊鑻忔禉璧i剛妗傜敇鏅嬭挋闄曞悏闂借吹绮ら潚钘忓窛瀹佺惣浣块A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9鎸傚璀︽腐婢砞{1}$/; + if (value.length === 7) { + return creg.test(value); + } else if (value.length === 8) { + return xreg.test(value); + } else { + return false; + } +} + +/** + * 閲戦,鍙厑璁�2浣嶅皬鏁� + */ +function amount(value) { + //閲戦锛屽彧鍏佽淇濈暀涓や綅灏忔暟 + return /^[1-9]\d*(,\d{3})*(\.\d{1,2})?$|^0\.\d{1,2}$/.test(value); +} + +/** + * 涓枃 + */ +function chinese(value) { + let reg = /^[\u4e00-\u9fa5]+$/gi; + return reg.test(value); +} + +/** + * 鍙兘杈撳叆瀛楁瘝 + */ +function letter(value) { + return /^[a-zA-Z]*$/.test(value); +} + +/** + * 鍙兘鏄瓧姣嶆垨鑰呮暟瀛� + */ +function enOrNum(value) { + //鑻辨枃鎴栬�呮暟瀛� + let reg = /^[0-9a-zA-Z]*$/g; + return reg.test(value); +} + +/** + * 楠岃瘉鏄惁鍖呭惈鏌愪釜鍊� + */ +function contains(value, param) { + return value.indexOf(param) >= 0 +} + +/** + * 楠岃瘉涓�涓�艰寖鍥碵min, max] + */ +function range(value, param) { + return value >= param[0] && value <= param[1] +} + +/** + * 楠岃瘉涓�涓暱搴﹁寖鍥碵min, max] + */ +function rangeLength(value, param) { + return value.length >= param[0] && value.length <= param[1] +} + +/** + * 鏄惁鍥哄畾鐢佃瘽 + */ +function landline(value) { + let reg = /^\d{3,4}-\d{7,8}(-\d{3,4})?$/; + return reg.test(value); +} + +/** + * 鍒ゆ柇鏄惁涓虹┖ + */ +function empty(value) { + switch (typeof value) { + case 'undefined': + return true; + case 'string': + if (value.replace(/(^[ \t\n\r]*)|([ \t\n\r]*$)/g, '').length == 0) return true; + break; + case 'boolean': + if (!value) return true; + break; + case 'number': + if (0 === value || isNaN(value)) return true; + break; + case 'object': + if (null === value || value.length === 0) return true; + for (var i in value) { + return false; + } + return true; + } + return false; +} + +/** + * 鏄惁json瀛楃涓� + */ +function jsonString(value) { + if (typeof value == 'string') { + try { + var obj = JSON.parse(value); + if (typeof obj == 'object' && obj) { + return true; + } else { + return false; + } + } catch (e) { + return false; + } + } + return false; +} + + +/** + * 鏄惁鏁扮粍 + */ +function array(value) { + if (typeof Array.isArray === "function") { + return Array.isArray(value); + } else { + return Object.prototype.toString.call(value) === "[object Array]"; + } +} + +/** + * 鏄惁瀵硅薄 + */ +function object(value) { + return Object.prototype.toString.call(value) === '[object Object]'; +} + +/** + * 鏄惁鐭俊楠岃瘉鐮� + */ +function code(value, len = 6) { + return new RegExp(`^\\d{${len}}$`).test(value); +} + + +export default { + email, + mobile, + url, + date, + dateISO, + number, + digits, + idCard, + carNo, + amount, + chinese, + letter, + enOrNum, + contains, + range, + rangeLength, + empty, + isEmpty: empty, + jsonString, + landline, + object, + array, + code +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/throttle.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/throttle.js" new file mode 100644 index 0000000..ad830b2 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/throttle.js" @@ -0,0 +1,32 @@ +let timer, flag; +/** + * 鑺傛祦鍘熺悊锛氬湪涓�瀹氭椂闂村唴锛屽彧鑳借Е鍙戜竴娆� + * + * @param {Function} func 瑕佹墽琛岀殑鍥炶皟鍑芥暟 + * @param {Number} wait 寤舵椂鐨勬椂闂� + * @param {Boolean} immediate 鏄惁绔嬪嵆鎵ц + * @return null + */ +function throttle(func, wait = 500, immediate = true) { + if (immediate) { + if (!flag) { + flag = true; + // 濡傛灉鏄珛鍗虫墽琛岋紝鍒欏湪wait姣鍐呭紑濮嬫椂鎵ц + typeof func === 'function' && func(); + timer = setTimeout(() => { + flag = false; + }, wait); + } + } else { + if (!flag) { + flag = true + // 濡傛灉鏄潪绔嬪嵆鎵ц锛屽垯鍦╳ait姣鍐呯殑缁撴潫澶勬墽琛� + timer = setTimeout(() => { + flag = false + typeof func === 'function' && func(); + }, wait); + } + + } +}; +export default throttle diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/timeFormat.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/timeFormat.js" new file mode 100644 index 0000000..0372f2f --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/timeFormat.js" @@ -0,0 +1,51 @@ +// padStart 鐨� polyfill锛屽洜涓烘煇浜涙満鍨嬫垨鎯呭喌锛岃繕鏃犳硶鏀寔es7鐨刾adStart锛屾瘮濡傜數鑴戠増鐨勫井淇″皬绋嬪簭 +// 鎵�浠ヨ繖閲屽仛涓�涓吋瀹筽olyfill鐨勫吋瀹瑰鐞� +if (!String.prototype.padStart) { + // 涓轰簡鏂逛究琛ㄧず杩欓噷 fillString 鐢ㄤ簡ES6 鐨勯粯璁ゅ弬鏁帮紝涓嶅奖鍝嶇悊瑙� + String.prototype.padStart = function(maxLength, fillString = ' ') { + if (Object.prototype.toString.call(fillString) !== "[object String]") throw new TypeError( + 'fillString must be String') + let str = this + // 杩斿洖 String(str) 杩欓噷鏄负浜嗕娇杩斿洖鐨勫�兼槸瀛楃涓插瓧闈㈤噺锛屽湪鎺у埗鍙颁腑鏇寸鍚堢洿瑙� + if (str.length >= maxLength) return String(str) + + let fillLength = maxLength - str.length, + times = Math.ceil(fillLength / fillString.length) + while (times >>= 1) { + fillString += fillString + if (times === 1) { + fillString += fillString + } + } + return fillString.slice(0, fillLength) + str; + } +} + +// 鍏朵粬鏇村鏄牸寮忓寲鏈夊涓�: +// yyyy:mm:dd|yyyy:mm|yyyy骞磎m鏈坉d鏃yyyy骞磎m鏈坉d鏃� hh鏃禡M鍒嗙瓑,鍙嚜瀹氫箟缁勫悎 +function timeFormat(dateTime = null, fmt = 'yyyy-mm-dd') { + // 濡傛灉涓簄ull,鍒欐牸寮忓寲褰撳墠鏃堕棿 + if (!dateTime) dateTime = Number(new Date()); + // 濡傛灉dateTime闀垮害涓�10鎴栬��13锛屽垯涓虹鍜屾绉掔殑鏃堕棿鎴筹紝濡傛灉瓒呰繃13浣嶏紝鍒欎负鍏朵粬鐨勬椂闂存牸寮� + if (dateTime.toString().length == 10) dateTime *= 1000; + let date = new Date(dateTime); + let ret; + let opt = { + "y+": date.getFullYear().toString(), // 骞� + "m+": (date.getMonth() + 1).toString(), // 鏈� + "d+": date.getDate().toString(), // 鏃� + "h+": date.getHours().toString(), // 鏃� + "M+": date.getMinutes().toString(), // 鍒� + "s+": date.getSeconds().toString() // 绉� + // 鏈夊叾浠栨牸寮忓寲瀛楃闇�姹傚彲浠ョ户缁坊鍔狅紝蹇呴』杞寲鎴愬瓧绗︿覆 + }; + for (let k in opt) { + ret = new RegExp("(" + k + ")").exec(fmt); + if (ret) { + fmt = fmt.replace(ret[1], (ret[1].length == 1) ? (opt[k]) : (opt[k].padStart(ret[1].length, "0"))) + }; + }; + return fmt; +} + +export default timeFormat diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/timeFrom.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/timeFrom.js" new file mode 100644 index 0000000..68cd990 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/timeFrom.js" @@ -0,0 +1,47 @@ +import timeFormat from '../../libs/function/timeFormat.js'; + +/** + * 鏃堕棿鎴宠浆涓哄涔呬箣鍓� + * @param String timestamp 鏃堕棿鎴� + * @param String | Boolean format 濡傛灉涓烘椂闂存牸寮忓瓧绗︿覆锛岃秴鍑轰竴瀹氭椂闂磋寖鍥达紝杩斿洖鍥哄畾鐨勬椂闂存牸寮忥紱 + * 濡傛灉涓哄竷灏斿�糵alse锛屾棤璁轰粈涔堟椂闂达紝閮借繑鍥炲涔呬互鍓嶇殑鏍煎紡 + */ +function timeFrom(dateTime = null, format = 'yyyy-mm-dd') { + // 濡傛灉涓簄ull,鍒欐牸寮忓寲褰撳墠鏃堕棿 + if (!dateTime) dateTime = Number(new Date()); + // 濡傛灉dateTime闀垮害涓�10鎴栬��13锛屽垯涓虹鍜屾绉掔殑鏃堕棿鎴筹紝濡傛灉瓒呰繃13浣嶏紝鍒欎负鍏朵粬鐨勬椂闂存牸寮� + if (dateTime.toString().length == 10) dateTime *= 1000; + let timestamp = + new Date(Number(dateTime)); + + let timer = (Number(new Date()) - timestamp) / 1000; + // 濡傛灉灏忎簬5鍒嗛挓,鍒欒繑鍥�"鍒氬垰",鍏朵粬浠ユ绫绘帹 + let tips = ''; + switch (true) { + case timer < 300: + tips = '鍒氬垰'; + break; + case timer >= 300 && timer < 3600: + tips = parseInt(timer / 60) + '鍒嗛挓鍓�'; + break; + case timer >= 3600 && timer < 86400: + tips = parseInt(timer / 3600) + '灏忔椂鍓�'; + break; + case timer >= 86400 && timer < 2592000: + tips = parseInt(timer / 86400) + '澶╁墠'; + break; + default: + // 濡傛灉format涓篺alse锛屽垯鏃犺浠�涔堟椂闂存埑锛岄兘鏄剧ずxx涔嬪墠 + if(format === false) { + if(timer >= 2592000 && timer < 365 * 86400) { + tips = parseInt(timer / (86400 * 30)) + '涓湀鍓�'; + } else { + tips = parseInt(timer / (86400 * 365)) + '骞村墠'; + } + } else { + tips = timeFormat(timestamp, format); + } + } + return tips; +} + +export default timeFrom; diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/toast.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/toast.js" new file mode 100644 index 0000000..91afa73 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/toast.js" @@ -0,0 +1,9 @@ +function toast(title, duration = 1500) { + uni.showToast({ + title: title, + icon: 'none', + duration: duration + }) +} + +export default toast diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/trim.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/trim.js" new file mode 100644 index 0000000..72adc37 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/trim.js" @@ -0,0 +1,15 @@ +function trim(str, pos = 'both') { + if (pos == 'both') { + return str.replace(/^\s+|\s+$/g, ""); + } else if (pos == "left") { + return str.replace(/^\s*/, ''); + } else if (pos == 'right') { + return str.replace(/(\s*$)/g, ""); + } else if (pos == 'all') { + return str.replace(/\s+/g, ""); + } else { + return str; + } +} + +export default trim diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/type2icon.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/type2icon.js" new file mode 100644 index 0000000..23cb40e --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/function/type2icon.js" @@ -0,0 +1,35 @@ +/** + * 鏍规嵁涓婚type鍊�,鑾峰彇瀵瑰簲鐨勫浘鏍� + * @param String type 涓婚鍚嶇О,primary|info|error|warning|success + * @param String fill 鏄惁浣跨敤fill濉厖瀹炰綋鐨勫浘鏍� + */ +function type2icon(type = 'success', fill = false) { + // 濡傛灉闈為缃��,榛樿涓簊uccess + if (['primary', 'info', 'error', 'warning', 'success'].indexOf(type) == -1) type = 'success'; + let iconName = ''; + // 鐩墠(2019-12-12),info鍜宲rimary浣跨敤鍚屼竴涓浘鏍� + switch (type) { + case 'primary': + iconName = 'info-circle'; + break; + case 'info': + iconName = 'info-circle'; + break; + case 'error': + iconName = 'close-circle'; + break; + case 'warning': + iconName = 'error-circle'; + break; + case 'success': + iconName = 'checkmark-circle'; + break; + default: + iconName = 'checkmark-circle'; + } + // 鏄惁鏄疄浣撶被鍨�,鍔犱笂-fill,鍦╥con缁勪欢搴撲腑,瀹炰綋鐨勭被鍚嶆槸鍚庨潰鍔�-fill鐨� + if (fill) iconName += '-fill'; + return iconName; +} + +export default type2icon diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/mixin/mixin.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/mixin/mixin.js" new file mode 100644 index 0000000..e388986 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/mixin/mixin.js" @@ -0,0 +1,64 @@ +module.exports = { + data() { + return {} + }, + onLoad() { + // getRect鎸傝浇鍒�$u涓婏紝鍥犱负杩欐柟娉曢渶瑕佷娇鐢╥n(this)锛屾墍浠ユ棤娉曟妸瀹冪嫭绔嬫垚涓�涓崟鐙殑鏂囦欢瀵煎嚭 + this.$u.getRect = this.$uGetRect + }, + methods: { + // 鏌ヨ鑺傜偣淇℃伅 + // 鐩墠姝ゆ柟娉曞湪鏀粯瀹濆皬绋嬪簭涓棤娉曡幏鍙栫粍浠惰窡鎺ョ偣鐨勫昂瀵革紝涓烘敮浠樺疂鐨刡ug(2020-07-21) + // 瑙e喅鍔炴硶涓哄湪缁勪欢鏍归儴鍐嶅涓�涓病鏈変换浣曚綔鐢ㄧ殑view鍏冪礌 + $uGetRect(selector, all) { + return new Promise(resolve => { + uni.createSelectorQuery(). + in(this)[all ? 'selectAll' : 'select'](selector) + .boundingClientRect(rect => { + if (all && Array.isArray(rect) && rect.length) { + resolve(rect) + } + if (!all && rect) { + resolve(rect) + } + }) + .exec() + }) + }, + getParentData(parentName = '') { + // 閬垮厤鍦╟reated涓幓瀹氫箟parent鍙橀噺 + if(!this.parent) this.parent = false; + // 杩欓噷鐨勬湰璐ㄥ師鐞嗘槸锛岄�氳繃鑾峰彇鐖剁粍浠跺疄渚�(涔熷嵆u-radio-group鐨則his) + // 灏嗙埗缁勪欢this涓搴旂殑鍙傛暟锛岃祴鍊肩粰鏈粍浠�(u-radio鐨則his)鐨刾arentData瀵硅薄涓搴旂殑灞炴�� + // 涔嬫墍浠ラ渶瑕佽繖涔堝仛锛屾槸鍥犱负鎵�鏈夌涓紝澶存潯灏忕▼搴忎笉鏀寔閫氳繃this.parent.xxx鍘荤洃鍚埗缁勪欢鍙傛暟鐨勫彉鍖� + this.parent = this.$u.$parent.call(this, parentName); + if(this.parent) { + // 鍘嗛亶parentData涓殑灞炴�э紝灏唒arent涓殑鍚屽悕灞炴�ц祴鍊肩粰parentData + Object.keys(this.parentData).map(key => { + this.parentData[key] = this.parent[key]; + }); + } + }, + // 闃绘浜嬩欢鍐掓场 + preventEvent(e) { + e && e.stopPropagation && e.stopPropagation() + } + }, + onReachBottom() { + uni.$emit('uOnReachBottom') + }, + beforeDestroy() { + // 鍒ゆ柇褰撳墠椤甸潰鏄惁瀛樺湪parent鍜宑hldren锛屼竴鑸湪checkbox鍜宑heckbox-group鐖跺瓙鑱斿姩鐨勫満鏅細鏈夋鎯呭喌 + // 缁勪欢閿�姣佹椂锛岀Щ闄ゅ瓙缁勪欢鍦ㄧ埗缁勪欢children鏁扮粍涓殑瀹炰緥锛岄噴鏀捐祫婧愶紝閬垮厤鏁版嵁娣蜂贡 + if(this.parent && uni.$u.test.array(this.parent.children)) { + // 缁勪欢閿�姣佹椂锛岀Щ闄ょ埗缁勪欢涓殑children鏁扮粍涓搴旂殑瀹炰緥 + const childrenList = this.parent.children + childrenList.map((child, index) => { + // 濡傛灉鐩哥瓑锛屽垯绉婚櫎 + if(child === this) { + childrenList.splice(index, 1) + } + }) + } + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/mixin/mpShare.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/mixin/mpShare.js" new file mode 100644 index 0000000..057d369 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/mixin/mpShare.js" @@ -0,0 +1,18 @@ +module.exports = { + onLoad() { + // 璁剧疆榛樿鐨勮浆鍙戝弬鏁� + this.$u.mpShare = { + title: '', // 榛樿涓哄皬绋嬪簭鍚嶇О + path: '', // 榛樿涓哄綋鍓嶉〉闈㈣矾寰� + imageUrl: '' // 榛樿涓哄綋鍓嶉〉闈㈢殑鎴浘 + } + }, + onShareAppMessage() { + return this.$u.mpShare + }, + // #ifdef MP-WEIXIN + onShareTimeline() { + return this.$u.mpShare + } + // #endif +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/request/index.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/request/index.js" new file mode 100644 index 0000000..1f5f471 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/request/index.js" @@ -0,0 +1,169 @@ +import deepMerge from "../function/deepMerge"; +import validate from "../function/test"; +class Request { + // 璁剧疆鍏ㄥ眬榛樿閰嶇疆 + setConfig(customConfig) { + // 娣卞害鍚堝苟瀵硅薄锛屽惁鍒欎細閫犳垚瀵硅薄娣卞眰灞炴�т涪澶� + this.config = deepMerge(this.config, customConfig); + } + + // 涓昏璇锋眰閮ㄥ垎 + request(options = {}) { + // 妫�鏌ヨ姹傛嫤鎴� + if (this.interceptor.request && typeof this.interceptor.request === 'function') { + let tmpConfig = {}; + let interceptorRequest = this.interceptor.request(options); + if (interceptorRequest === false) { + // 杩斿洖涓�涓浜巔ending鐘舵�佷腑鐨凱romise锛屾潵鍙栨秷鍘焢romise锛岄伩鍏嶈繘鍏hen()鍥炶皟 + return new Promise(()=>{}); + } + this.options = interceptorRequest; + } + options.dataType = options.dataType || this.config.dataType; + options.responseType = options.responseType || this.config.responseType; + options.url = options.url || ''; + options.params = options.params || {}; + options.header = Object.assign({}, this.config.header, options.header); + options.method = options.method || this.config.method; + + return new Promise((resolve, reject) => { + options.complete = (response) => { + // 璇锋眰杩斿洖鍚庯紝闅愯棌loading(濡傛灉璇锋眰杩斿洖蹇殑璇濓紝鍙兘浼氭病鏈塴oading) + uni.hideLoading(); + // 娓呴櫎瀹氭椂鍣紝濡傛灉璇锋眰鍥炴潵浜嗭紝灏辨棤闇�loading + clearTimeout(this.config.timer); + this.config.timer = null; + // 鍒ゆ柇鐢ㄦ埛瀵规嫤鎴繑鍥炴暟鎹殑瑕佹眰锛屽鏋渙riginalData涓簍rue锛岃繑鍥炴墍鏈夌殑鏁版嵁(response)鍒版嫤鎴櫒锛屽惁鍒欏彧杩斿洖response.data + if(this.config.originalData) { + // 鍒ゆ柇鏄惁瀛樺湪鎷︽埅鍣� + if (this.interceptor.response && typeof this.interceptor.response === 'function') { + let resInterceptors = this.interceptor.response(response); + // 濡傛灉鎷︽埅鍣ㄤ笉杩斿洖false锛屽氨灏嗘嫤鎴櫒杩斿洖鐨勫唴瀹圭粰this.$u.post鐨則hen鍥炶皟 + if (resInterceptors !== false) { + resolve(resInterceptors); + } else { + // 濡傛灉鎷︽埅鍣ㄨ繑鍥瀎alse锛屾剰鍛崇潃鎷︽埅鍣ㄥ畾涔夎�呰涓鸿繑鍥炴湁闂锛岀洿鎺ユ帴鍏atch鍥炶皟 + reject(response); + } + } else { + // 濡傛灉瑕佹眰杩斿洖鍘熷鏁版嵁锛屽氨绠楁病鏈夋嫤鎴櫒锛屼篃杩斿洖鏈�鍘熷鐨勬暟鎹� + resolve(response); + } + } else { + if (response.statusCode == 200) { + if (this.interceptor.response && typeof this.interceptor.response === 'function') { + let resInterceptors = this.interceptor.response(response.data); + if (resInterceptors !== false) { + resolve(resInterceptors); + } else { + reject(response.data); + } + } else { + // 濡傛灉涓嶆槸杩斿洖鍘熷鏁版嵁(originalData=false)锛屼笖娌℃湁鎷︽埅鍣ㄧ殑鎯呭喌涓嬶紝杩斿洖绾暟鎹粰then鍥炶皟 + resolve(response.data); + } + } else { + // 涓嶈繑鍥炲師濮嬫暟鎹殑鎯呭喌涓嬶紝鏈嶅姟鍣ㄧ姸鎬佺爜涓嶄负200锛宮odal寮规鎻愮ず + // if(response.errMsg) { + // uni.showModal({ + // title: response.errMsg + // }); + // } + reject(response) + } + } + } + + // 鍒ゆ柇鐢ㄦ埛浼犻�掔殑URL鏄惁/寮�澶�,濡傛灉涓嶆槸,鍔犱笂/锛岃繖閲屼娇鐢ㄤ簡uView鐨則est.js楠岃瘉搴撶殑url()鏂规硶 + options.url = validate.url(options.url) ? options.url : (this.config.baseUrl + (options.url.indexOf('/') == 0 ? + options.url : '/' + options.url)); + + // 鏄惁鏄剧ずloading + // 鍔犱竴涓槸鍚﹀凡鏈塼imer瀹氭椂鍣ㄧ殑鍒ゆ柇锛屽惁鍒欐湁涓や釜鍚屾椂璇锋眰鐨勬椂鍊欙紝鍚庤�呬細娓呴櫎鍓嶈�呯殑瀹氭椂鍣╥d + // 鑰屾病鏈夋竻闄ゅ墠鑰呯殑瀹氭椂鍣紝瀵艰嚧鍓嶈�呰秴鏃讹紝涓�鐩存樉绀簂oading + if(this.config.showLoading && !this.config.timer) { + this.config.timer = setTimeout(() => { + uni.showLoading({ + title: this.config.loadingText, + mask: this.config.loadingMask + }) + this.config.timer = null; + }, this.config.loadingTime); + } + uni.request(options); + }) + // .catch(res => { + // // 濡傛灉杩斿洖reject()锛屼笉璁╁叾杩涘叆this.$u.post().then().catch()鍚庨潰鐨刢atct() + // // 鍥犱负寰堝浜洪兘浼氬繕浜嗗啓鍚庨潰鐨刢atch()锛屽鑷存姤閿欐崟鑾蜂笉鍒癱atch + // return new Promise(()=>{}); + // }) + } + + constructor() { + this.config = { + baseUrl: '', // 璇锋眰鐨勬牴鍩熷悕 + // 榛樿鐨勮姹傚ご + header: {}, + method: 'POST', + // 璁剧疆涓簀son锛岃繑鍥炲悗uni.request浼氬鏁版嵁杩涜涓�娆SON.parse + dataType: 'json', + // 姝ゅ弬鏁版棤闇�澶勭悊锛屽洜涓�5+鍜屾敮浠樺疂灏忕▼搴忎笉鏀寔锛岄粯璁や负text鍗冲彲 + responseType: 'text', + showLoading: true, // 鏄惁鏄剧ず璇锋眰涓殑loading + loadingText: '璇锋眰涓�...', + loadingTime: 800, // 鍦ㄦ鏃堕棿鍐咃紝璇锋眰杩樻病鍥炴潵鐨勮瘽锛屽氨鏄剧ず鍔犺浇涓姩鐢伙紝鍗曚綅ms + timer: null, // 瀹氭椂鍣� + originalData: false, // 鏄惁鍦ㄦ嫤鎴櫒涓繑鍥炴湇鍔$鐨勫師濮嬫暟鎹紝瑙佹枃妗h鏄� + loadingMask: true, // 灞曠ずloading鐨勬椂鍊欙紝鏄惁缁欎竴涓�忔槑鐨勮挋灞傦紝闃叉瑙︽懜绌块�� + } + + // 鎷︽埅鍣� + this.interceptor = { + // 璇锋眰鍓嶇殑鎷︽埅 + request: null, + // 璇锋眰鍚庣殑鎷︽埅 + response: null + } + + // get璇锋眰 + this.get = (url, data = {}, header = {}) => { + return this.request({ + method: 'GET', + url, + header, + data + }) + } + + // post璇锋眰 + this.post = (url, data = {}, header = {}) => { + return this.request({ + url, + method: 'POST', + header, + data + }) + } + + // put璇锋眰锛屼笉鏀寔鏀粯瀹濆皬绋嬪簭(HX2.6.15) + this.put = (url, data = {}, header = {}) => { + return this.request({ + url, + method: 'PUT', + header, + data + }) + } + + // delete璇锋眰锛屼笉鏀寔鏀粯瀹濆拰澶存潯灏忕▼搴�(HX2.6.15) + this.delete = (url, data = {}, header = {}) => { + return this.request({ + url, + method: 'DELETE', + header, + data + }) + } + } +} +export default new Request diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/store/index.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/store/index.js" new file mode 100644 index 0000000..a5927b3 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/store/index.js" @@ -0,0 +1,19 @@ +// 鏆傛椂涓嶇敤vuex妯″潡鏂瑰紡瀹炵幇锛屽皢璇ユ柟娉曠洿鎺ユ斁鍏ュ埌/store/index.js涓� +const module = { + actions: { + $uStore({rootState}, params) { + let nameArr = params.name.split('.'); + if(nameArr.length >= 2) { + let obj = rootState[nameArr[0]]; + for(let i = 1; i < nameArr.length - 1; i ++) { + obj = obj[nameArr[i]]; + } + obj[nameArr[nameArr.length - 1]] = params.value; + } else { + rootState[params.name] = params.value; + } + } + } +} + +export default module \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/util/area.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/util/area.js" new file mode 100644 index 0000000..0d602e9 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/util/area.js" @@ -0,0 +1 @@ +var areaData=[[[{"label":"涓滃煄鍖�","value":"110101"},{"label":"瑗垮煄鍖�","value":"110102"},{"label":"鏈濋槼鍖�","value":"110105"},{"label":"涓板彴鍖�","value":"110106"},{"label":"鐭虫櫙灞卞尯","value":"110107"},{"label":"娴锋穩鍖�","value":"110108"},{"label":"闂ㄥご娌熷尯","value":"110109"},{"label":"鎴垮北鍖�","value":"110111"},{"label":"閫氬窞鍖�","value":"110112"},{"label":"椤轰箟鍖�","value":"110113"},{"label":"鏄屽钩鍖�","value":"110114"},{"label":"澶у叴鍖�","value":"110115"},{"label":"鎬�鏌斿尯","value":"110116"},{"label":"骞宠胺鍖�","value":"110117"},{"label":"瀵嗕簯鍖�","value":"110118"},{"label":"寤跺簡鍖�","value":"110119"}]],[[{"label":"鍜屽钩鍖�","value":"120101"},{"label":"娌充笢鍖�","value":"120102"},{"label":"娌宠タ鍖�","value":"120103"},{"label":"鍗楀紑鍖�","value":"120104"},{"label":"娌冲寳鍖�","value":"120105"},{"label":"绾㈡ˉ鍖�","value":"120106"},{"label":"涓滀附鍖�","value":"120110"},{"label":"瑗块潚鍖�","value":"120111"},{"label":"娲ュ崡鍖�","value":"120112"},{"label":"鍖楄景鍖�","value":"120113"},{"label":"姝︽竻鍖�","value":"120114"},{"label":"瀹濆澔鍖�","value":"120115"},{"label":"婊ㄦ捣鏂板尯","value":"120116"},{"label":"瀹佹渤鍖�","value":"120117"},{"label":"闈欐捣鍖�","value":"120118"},{"label":"钃熷窞鍖�","value":"120119"}]],[[{"label":"闀垮畨鍖�","value":"130102"},{"label":"妗ヨタ鍖�","value":"130104"},{"label":"鏂板崕鍖�","value":"130105"},{"label":"浜曢檳鐭垮尯","value":"130107"},{"label":"瑁曞崕鍖�","value":"130108"},{"label":"钘佸煄鍖�","value":"130109"},{"label":"楣挎硥鍖�","value":"130110"},{"label":"鏍惧煄鍖�","value":"130111"},{"label":"浜曢檳鍘�","value":"130121"},{"label":"姝e畾鍘�","value":"130123"},{"label":"琛屽攼鍘�","value":"130125"},{"label":"鐏靛鍘�","value":"130126"},{"label":"楂橀倯鍘�","value":"130127"},{"label":"娣辨辰鍘�","value":"130128"},{"label":"璧炵殗鍘�","value":"130129"},{"label":"鏃犳瀬鍘�","value":"130130"},{"label":"骞冲北鍘�","value":"130131"},{"label":"鍏冩皬鍘�","value":"130132"},{"label":"璧靛幙","value":"130133"},{"label":"鐭冲搴勯珮鏂版妧鏈骇涓氬紑鍙戝尯","value":"130171"},{"label":"鐭冲搴勫惊鐜寲宸ュ洯鍖�","value":"130172"},{"label":"杈涢泦甯�","value":"130181"},{"label":"鏅嬪窞甯�","value":"130183"},{"label":"鏂颁箰甯�","value":"130184"}],[{"label":"璺崡鍖�","value":"130202"},{"label":"璺寳鍖�","value":"130203"},{"label":"鍙ゅ喍鍖�","value":"130204"},{"label":"寮�骞冲尯","value":"130205"},{"label":"涓板崡鍖�","value":"130207"},{"label":"涓版鼎鍖�","value":"130208"},{"label":"鏇瑰鐢稿尯","value":"130209"},{"label":"婊﹀幙","value":"130223"},{"label":"婊﹀崡鍘�","value":"130224"},{"label":"涔愪涵鍘�","value":"130225"},{"label":"杩佽タ鍘�","value":"130227"},{"label":"鐜夌敯鍘�","value":"130229"},{"label":"鍞愬北甯傝姦鍙扮粡娴庢妧鏈紑鍙戝尯","value":"130271"},{"label":"鍞愬北甯傛眽娌界鐞嗗尯","value":"130272"},{"label":"鍞愬北楂樻柊鎶�鏈骇涓氬紑鍙戝尯","value":"130273"},{"label":"娌冲寳鍞愬北娴锋腐缁忔祹寮�鍙戝尯","value":"130274"},{"label":"閬靛寲甯�","value":"130281"},{"label":"杩佸畨甯�","value":"130283"}],[{"label":"娴锋腐鍖�","value":"130302"},{"label":"灞辨捣鍏冲尯","value":"130303"},{"label":"鍖楁埓娌冲尯","value":"130304"},{"label":"鎶氬畞鍖�","value":"130306"},{"label":"闈掗緳婊℃棌鑷不鍘�","value":"130321"},{"label":"鏄岄粠鍘�","value":"130322"},{"label":"鍗㈤緳鍘�","value":"130324"},{"label":"绉︾殗宀涘競缁忔祹鎶�鏈紑鍙戝尯","value":"130371"},{"label":"鍖楁埓娌虫柊鍖�","value":"130372"}],[{"label":"閭北鍖�","value":"130402"},{"label":"涓涘彴鍖�","value":"130403"},{"label":"澶嶅叴鍖�","value":"130404"},{"label":"宄板嘲鐭垮尯","value":"130406"},{"label":"鑲ヤ埂鍖�","value":"130407"},{"label":"姘稿勾鍖�","value":"130408"},{"label":"涓存汲鍘�","value":"130423"},{"label":"鎴愬畨鍘�","value":"130424"},{"label":"澶у悕鍘�","value":"130425"},{"label":"娑夊幙","value":"130426"},{"label":"纾佸幙","value":"130427"},{"label":"閭卞幙","value":"130430"},{"label":"楦℃辰鍘�","value":"130431"},{"label":"骞垮钩鍘�","value":"130432"},{"label":"棣嗛櫠鍘�","value":"130433"},{"label":"榄忓幙","value":"130434"},{"label":"鏇插懆鍘�","value":"130435"},{"label":"閭兏缁忔祹鎶�鏈紑鍙戝尯","value":"130471"},{"label":"閭兏鍐�鍗楁柊鍖�","value":"130473"},{"label":"姝﹀畨甯�","value":"130481"}],[{"label":"妗ヤ笢鍖�","value":"130502"},{"label":"妗ヨタ鍖�","value":"130503"},{"label":"閭㈠彴鍘�","value":"130521"},{"label":"涓村煄鍘�","value":"130522"},{"label":"鍐呬笜鍘�","value":"130523"},{"label":"鏌忎埂鍘�","value":"130524"},{"label":"闅嗗哀鍘�","value":"130525"},{"label":"浠诲幙","value":"130526"},{"label":"鍗楀拰鍘�","value":"130527"},{"label":"瀹佹檵鍘�","value":"130528"},{"label":"宸ㄩ箍鍘�","value":"130529"},{"label":"鏂版渤鍘�","value":"130530"},{"label":"骞垮畻鍘�","value":"130531"},{"label":"骞充埂鍘�","value":"130532"},{"label":"濞佸幙","value":"130533"},{"label":"娓呮渤鍘�","value":"130534"},{"label":"涓磋タ鍘�","value":"130535"},{"label":"娌冲寳閭㈠彴缁忔祹寮�鍙戝尯","value":"130571"},{"label":"鍗楀甯�","value":"130581"},{"label":"娌欐渤甯�","value":"130582"}],[{"label":"绔炵鍖�","value":"130602"},{"label":"鑾叉睜鍖�","value":"130606"},{"label":"婊″煄鍖�","value":"130607"},{"label":"娓呰嫅鍖�","value":"130608"},{"label":"寰愭按鍖�","value":"130609"},{"label":"娑炴按鍘�","value":"130623"},{"label":"闃滃钩鍘�","value":"130624"},{"label":"瀹氬叴鍘�","value":"130626"},{"label":"鍞愬幙","value":"130627"},{"label":"楂橀槼鍘�","value":"130628"},{"label":"瀹瑰煄鍘�","value":"130629"},{"label":"娑炴簮鍘�","value":"130630"},{"label":"鏈涢兘鍘�","value":"130631"},{"label":"瀹夋柊鍘�","value":"130632"},{"label":"鏄撳幙","value":"130633"},{"label":"鏇查槼鍘�","value":"130634"},{"label":"锠″幙","value":"130635"},{"label":"椤哄钩鍘�","value":"130636"},{"label":"鍗氶噹鍘�","value":"130637"},{"label":"闆勫幙","value":"130638"},{"label":"淇濆畾楂樻柊鎶�鏈骇涓氬紑鍙戝尯","value":"130671"},{"label":"淇濆畾鐧芥矡鏂板煄","value":"130672"},{"label":"娑垮窞甯�","value":"130681"},{"label":"瀹氬窞甯�","value":"130682"},{"label":"瀹夊浗甯�","value":"130683"},{"label":"楂樼搴楀競","value":"130684"}],[{"label":"妗ヤ笢鍖�","value":"130702"},{"label":"妗ヨタ鍖�","value":"130703"},{"label":"瀹e寲鍖�","value":"130705"},{"label":"涓嬭姳鍥尯","value":"130706"},{"label":"涓囧叏鍖�","value":"130708"},{"label":"宕囩ぜ鍖�","value":"130709"},{"label":"寮犲寳鍘�","value":"130722"},{"label":"搴蜂繚鍘�","value":"130723"},{"label":"娌芥簮鍘�","value":"130724"},{"label":"灏氫箟鍘�","value":"130725"},{"label":"钄氬幙","value":"130726"},{"label":"闃冲師鍘�","value":"130727"},{"label":"鎬�瀹夊幙","value":"130728"},{"label":"鎬�鏉ュ幙","value":"130730"},{"label":"娑块箍鍘�","value":"130731"},{"label":"璧ゅ煄鍘�","value":"130732"},{"label":"寮犲鍙e競楂樻柊鎶�鏈骇涓氬紑鍙戝尯","value":"130771"},{"label":"寮犲鍙e競瀵熷寳绠$悊鍖�","value":"130772"},{"label":"寮犲鍙e競濉炲寳绠$悊鍖�","value":"130773"}],[{"label":"鍙屾ˉ鍖�","value":"130802"},{"label":"鍙屾沪鍖�","value":"130803"},{"label":"楣版墜钀ュ瓙鐭垮尯","value":"130804"},{"label":"鎵垮痉鍘�","value":"130821"},{"label":"鍏撮殕鍘�","value":"130822"},{"label":"婊﹀钩鍘�","value":"130824"},{"label":"闅嗗寲鍘�","value":"130825"},{"label":"涓板畞婊℃棌鑷不鍘�","value":"130826"},{"label":"瀹藉煄婊℃棌鑷不鍘�","value":"130827"},{"label":"鍥村満婊℃棌钂欏彜鏃忚嚜娌诲幙","value":"130828"},{"label":"鎵垮痉楂樻柊鎶�鏈骇涓氬紑鍙戝尯","value":"130871"},{"label":"骞虫硥甯�","value":"130881"}],[{"label":"鏂板崕鍖�","value":"130902"},{"label":"杩愭渤鍖�","value":"130903"},{"label":"娌у幙","value":"130921"},{"label":"闈掑幙","value":"130922"},{"label":"涓滃厜鍘�","value":"130923"},{"label":"娴峰叴鍘�","value":"130924"},{"label":"鐩愬北鍘�","value":"130925"},{"label":"鑲冨畞鍘�","value":"130926"},{"label":"鍗楃毊鍘�","value":"130927"},{"label":"鍚存ˉ鍘�","value":"130928"},{"label":"鐚幙","value":"130929"},{"label":"瀛熸潙鍥炴棌鑷不鍘�","value":"130930"},{"label":"娌冲寳娌у窞缁忔祹寮�鍙戝尯","value":"130971"},{"label":"娌у窞楂樻柊鎶�鏈骇涓氬紑鍙戝尯","value":"130972"},{"label":"娌у窞娓ゆ捣鏂板尯","value":"130973"},{"label":"娉婂ご甯�","value":"130981"},{"label":"浠讳笜甯�","value":"130982"},{"label":"榛勯獏甯�","value":"130983"},{"label":"娌抽棿甯�","value":"130984"}],[{"label":"瀹夋鍖�","value":"131002"},{"label":"骞块槼鍖�","value":"131003"},{"label":"鍥哄畨鍘�","value":"131022"},{"label":"姘告竻鍘�","value":"131023"},{"label":"棣欐渤鍘�","value":"131024"},{"label":"澶у煄鍘�","value":"131025"},{"label":"鏂囧畨鍘�","value":"131026"},{"label":"澶у巶鍥炴棌鑷不鍘�","value":"131028"},{"label":"寤婂潑缁忔祹鎶�鏈紑鍙戝尯","value":"131071"},{"label":"闇稿窞甯�","value":"131081"},{"label":"涓夋渤甯�","value":"131082"}],[{"label":"妗冨煄鍖�","value":"131102"},{"label":"鍐�宸炲尯","value":"131103"},{"label":"鏋e己鍘�","value":"131121"},{"label":"姝﹂倯鍘�","value":"131122"},{"label":"姝﹀己鍘�","value":"131123"},{"label":"楗堕槼鍘�","value":"131124"},{"label":"瀹夊钩鍘�","value":"131125"},{"label":"鏁呭煄鍘�","value":"131126"},{"label":"鏅幙","value":"131127"},{"label":"闃滃煄鍘�","value":"131128"},{"label":"娌冲寳琛℃按缁忔祹寮�鍙戝尯","value":"131171"},{"label":"琛℃按婊ㄦ箹鏂板尯","value":"131172"},{"label":"娣卞窞甯�","value":"131182"}]],[[{"label":"灏忓簵鍖�","value":"140105"},{"label":"杩庢辰鍖�","value":"140106"},{"label":"鏉忚姳宀尯","value":"140107"},{"label":"灏栬崏鍧尯","value":"140108"},{"label":"涓囨煆鏋楀尯","value":"140109"},{"label":"鏅嬫簮鍖�","value":"140110"},{"label":"娓呭緪鍘�","value":"140121"},{"label":"闃虫洸鍘�","value":"140122"},{"label":"濞勭儲鍘�","value":"140123"},{"label":"灞辫タ杞瀷缁煎悎鏀归潻绀鸿寖鍖�","value":"140171"},{"label":"鍙や氦甯�","value":"140181"}],[{"label":"鍩庡尯","value":"140202"},{"label":"鐭垮尯","value":"140203"},{"label":"鍗楅儕鍖�","value":"140211"},{"label":"鏂拌崳鍖�","value":"140212"},{"label":"闃抽珮鍘�","value":"140221"},{"label":"澶╅晣鍘�","value":"140222"},{"label":"骞跨伒鍘�","value":"140223"},{"label":"鐏典笜鍘�","value":"140224"},{"label":"娴戞簮鍘�","value":"140225"},{"label":"宸︿簯鍘�","value":"140226"},{"label":"澶у悓鍘�","value":"140227"},{"label":"灞辫タ澶у悓缁忔祹寮�鍙戝尯","value":"140271"}],[{"label":"鍩庡尯","value":"140302"},{"label":"鐭垮尯","value":"140303"},{"label":"閮婂尯","value":"140311"},{"label":"骞冲畾鍘�","value":"140321"},{"label":"鐩傚幙","value":"140322"},{"label":"灞辫タ闃虫硥缁忔祹寮�鍙戝尯","value":"140371"}],[{"label":"鍩庡尯","value":"140402"},{"label":"閮婂尯","value":"140411"},{"label":"闀挎不鍘�","value":"140421"},{"label":"瑗勫灒鍘�","value":"140423"},{"label":"灞暀鍘�","value":"140424"},{"label":"骞抽『鍘�","value":"140425"},{"label":"榛庡煄鍘�","value":"140426"},{"label":"澹跺叧鍘�","value":"140427"},{"label":"闀垮瓙鍘�","value":"140428"},{"label":"姝︿埂鍘�","value":"140429"},{"label":"娌佸幙","value":"140430"},{"label":"娌佹簮鍘�","value":"140431"},{"label":"灞辫タ闀挎不楂樻柊鎶�鏈骇涓氬洯鍖�","value":"140471"},{"label":"娼炲煄甯�","value":"140481"}],[{"label":"鍩庡尯","value":"140502"},{"label":"娌佹按鍘�","value":"140521"},{"label":"闃冲煄鍘�","value":"140522"},{"label":"闄靛窛鍘�","value":"140524"},{"label":"娉藉窞鍘�","value":"140525"},{"label":"楂樺钩甯�","value":"140581"}],[{"label":"鏈斿煄鍖�","value":"140602"},{"label":"骞抽瞾鍖�","value":"140603"},{"label":"灞遍槾鍘�","value":"140621"},{"label":"搴斿幙","value":"140622"},{"label":"鍙崇帀鍘�","value":"140623"},{"label":"鎬�浠佸幙","value":"140624"},{"label":"灞辫タ鏈斿窞缁忔祹寮�鍙戝尯","value":"140671"}],[{"label":"姒嗘鍖�","value":"140702"},{"label":"姒嗙ぞ鍘�","value":"140721"},{"label":"宸︽潈鍘�","value":"140722"},{"label":"鍜岄『鍘�","value":"140723"},{"label":"鏄旈槼鍘�","value":"140724"},{"label":"瀵块槼鍘�","value":"140725"},{"label":"澶胺鍘�","value":"140726"},{"label":"绁佸幙","value":"140727"},{"label":"骞抽仴鍘�","value":"140728"},{"label":"鐏电煶鍘�","value":"140729"},{"label":"浠嬩紤甯�","value":"140781"}],[{"label":"鐩愭箹鍖�","value":"140802"},{"label":"涓寸寳鍘�","value":"140821"},{"label":"涓囪崳鍘�","value":"140822"},{"label":"闂诲枩鍘�","value":"140823"},{"label":"绋峰北鍘�","value":"140824"},{"label":"鏂扮粵鍘�","value":"140825"},{"label":"缁涘幙","value":"140826"},{"label":"鍨f洸鍘�","value":"140827"},{"label":"澶忓幙","value":"140828"},{"label":"骞抽檰鍘�","value":"140829"},{"label":"鑺煄鍘�","value":"140830"},{"label":"姘告祹甯�","value":"140881"},{"label":"娌虫触甯�","value":"140882"}],[{"label":"蹇诲簻鍖�","value":"140902"},{"label":"瀹氳鍘�","value":"140921"},{"label":"浜斿彴鍘�","value":"140922"},{"label":"浠e幙","value":"140923"},{"label":"绻佸硻鍘�","value":"140924"},{"label":"瀹佹鍘�","value":"140925"},{"label":"闈欎箰鍘�","value":"140926"},{"label":"绁炴睜鍘�","value":"140927"},{"label":"浜斿鍘�","value":"140928"},{"label":"宀㈠矚鍘�","value":"140929"},{"label":"娌虫洸鍘�","value":"140930"},{"label":"淇濆痉鍘�","value":"140931"},{"label":"鍋忓叧鍘�","value":"140932"},{"label":"浜斿彴灞遍鏅悕鑳滃尯","value":"140971"},{"label":"鍘熷钩甯�","value":"140981"}],[{"label":"灏ч兘鍖�","value":"141002"},{"label":"鏇叉矁鍘�","value":"141021"},{"label":"缈煎煄鍘�","value":"141022"},{"label":"瑗勬本鍘�","value":"141023"},{"label":"娲礊鍘�","value":"141024"},{"label":"鍙ゅ幙","value":"141025"},{"label":"瀹夋辰鍘�","value":"141026"},{"label":"娴北鍘�","value":"141027"},{"label":"鍚夊幙","value":"141028"},{"label":"涔″畞鍘�","value":"141029"},{"label":"澶у畞鍘�","value":"141030"},{"label":"闅板幙","value":"141031"},{"label":"姘稿拰鍘�","value":"141032"},{"label":"钂插幙","value":"141033"},{"label":"姹捐タ鍘�","value":"141034"},{"label":"渚┈甯�","value":"141081"},{"label":"闇嶅窞甯�","value":"141082"}],[{"label":"绂荤煶鍖�","value":"141102"},{"label":"鏂囨按鍘�","value":"141121"},{"label":"浜ゅ煄鍘�","value":"141122"},{"label":"鍏村幙","value":"141123"},{"label":"涓村幙","value":"141124"},{"label":"鏌虫灄鍘�","value":"141125"},{"label":"鐭虫ゼ鍘�","value":"141126"},{"label":"宀氬幙","value":"141127"},{"label":"鏂瑰北鍘�","value":"141128"},{"label":"涓槼鍘�","value":"141129"},{"label":"浜ゅ彛鍘�","value":"141130"},{"label":"瀛濅箟甯�","value":"141181"},{"label":"姹鹃槼甯�","value":"141182"}]],[[{"label":"鏂板煄鍖�","value":"150102"},{"label":"鍥炴皯鍖�","value":"150103"},{"label":"鐜夋硥鍖�","value":"150104"},{"label":"璧涚綍鍖�","value":"150105"},{"label":"鍦熼粯鐗瑰乏鏃�","value":"150121"},{"label":"鎵樺厠鎵樺幙","value":"150122"},{"label":"鍜屾灄鏍煎皵鍘�","value":"150123"},{"label":"娓呮按娌冲幙","value":"150124"},{"label":"姝﹀窛鍘�","value":"150125"},{"label":"鍛煎拰娴╃壒閲戞捣宸ヤ笟鍥尯","value":"150171"},{"label":"鍛煎拰娴╃壒缁忔祹鎶�鏈紑鍙戝尯","value":"150172"}],[{"label":"涓滄渤鍖�","value":"150202"},{"label":"鏄嗛兘浠戝尯","value":"150203"},{"label":"闈掑北鍖�","value":"150204"},{"label":"鐭虫嫄鍖�","value":"150205"},{"label":"鐧戒簯閯傚崥鐭垮尯","value":"150206"},{"label":"涔濆師鍖�","value":"150207"},{"label":"鍦熼粯鐗瑰彸鏃�","value":"150221"},{"label":"鍥洪槼鍘�","value":"150222"},{"label":"杈惧皵缃曡寕鏄庡畨鑱斿悎鏃�","value":"150223"},{"label":"鍖呭ご绋�鍦熼珮鏂版妧鏈骇涓氬紑鍙戝尯","value":"150271"}],[{"label":"娴峰媰婀惧尯","value":"150302"},{"label":"娴峰崡鍖�","value":"150303"},{"label":"涔岃揪鍖�","value":"150304"}],[{"label":"绾㈠北鍖�","value":"150402"},{"label":"鍏冨疂灞卞尯","value":"150403"},{"label":"鏉惧北鍖�","value":"150404"},{"label":"闃块瞾绉戝皵娌佹棗","value":"150421"},{"label":"宸存灄宸︽棗","value":"150422"},{"label":"宸存灄鍙虫棗","value":"150423"},{"label":"鏋楄タ鍘�","value":"150424"},{"label":"鍏嬩粈鍏嬭吘鏃�","value":"150425"},{"label":"缈佺墰鐗规棗","value":"150426"},{"label":"鍠�鍠囨瞾鏃�","value":"150428"},{"label":"瀹佸煄鍘�","value":"150429"},{"label":"鏁栨眽鏃�","value":"150430"}],[{"label":"绉戝皵娌佸尯","value":"150502"},{"label":"绉戝皵娌佸乏缈间腑鏃�","value":"150521"},{"label":"绉戝皵娌佸乏缈煎悗鏃�","value":"150522"},{"label":"寮�椴佸幙","value":"150523"},{"label":"搴撲鸡鏃�","value":"150524"},{"label":"濂堟浖鏃�","value":"150525"},{"label":"鎵庨瞾鐗规棗","value":"150526"},{"label":"閫氳窘缁忔祹鎶�鏈紑鍙戝尯","value":"150571"},{"label":"闇嶆灄閮嫆甯�","value":"150581"}],[{"label":"涓滆儨鍖�","value":"150602"},{"label":"搴峰反浠�鍖�","value":"150603"},{"label":"杈炬媺鐗规棗","value":"150621"},{"label":"鍑嗘牸灏旀棗","value":"150622"},{"label":"閯傛墭鍏嬪墠鏃�","value":"150623"},{"label":"閯傛墭鍏嬫棗","value":"150624"},{"label":"鏉敠鏃�","value":"150625"},{"label":"涔屽鏃�","value":"150626"},{"label":"浼婇噾闇嶆礇鏃�","value":"150627"}],[{"label":"娴锋媺灏斿尯","value":"150702"},{"label":"鎵庤祲璇哄皵鍖�","value":"150703"},{"label":"闃胯崳鏃�","value":"150721"},{"label":"鑾姏杈剧摝杈炬枴灏旀棌鑷不鏃�","value":"150722"},{"label":"閯備鸡鏄ヨ嚜娌绘棗","value":"150723"},{"label":"閯傛俯鍏嬫棌鑷不鏃�","value":"150724"},{"label":"闄堝反灏旇檸鏃�","value":"150725"},{"label":"鏂板反灏旇檸宸︽棗","value":"150726"},{"label":"鏂板反灏旇檸鍙虫棗","value":"150727"},{"label":"婊℃床閲屽競","value":"150781"},{"label":"鐗欏厠鐭冲競","value":"150782"},{"label":"鎵庡叞灞競","value":"150783"},{"label":"棰濆皵鍙ょ撼甯�","value":"150784"},{"label":"鏍规渤甯�","value":"150785"}],[{"label":"涓存渤鍖�","value":"150802"},{"label":"浜斿師鍘�","value":"150821"},{"label":"纾村彛鍘�","value":"150822"},{"label":"涔屾媺鐗瑰墠鏃�","value":"150823"},{"label":"涔屾媺鐗逛腑鏃�","value":"150824"},{"label":"涔屾媺鐗瑰悗鏃�","value":"150825"},{"label":"鏉敠鍚庢棗","value":"150826"}],[{"label":"闆嗗畞鍖�","value":"150902"},{"label":"鍗撹祫鍘�","value":"150921"},{"label":"鍖栧痉鍘�","value":"150922"},{"label":"鍟嗛兘鍘�","value":"150923"},{"label":"鍏村拰鍘�","value":"150924"},{"label":"鍑夊煄鍘�","value":"150925"},{"label":"瀵熷搱灏斿彸缈煎墠鏃�","value":"150926"},{"label":"瀵熷搱灏斿彸缈间腑鏃�","value":"150927"},{"label":"瀵熷搱灏斿彸缈煎悗鏃�","value":"150928"},{"label":"鍥涘瓙鐜嬫棗","value":"150929"},{"label":"涓伴晣甯�","value":"150981"}],[{"label":"涔屽叞娴╃壒甯�","value":"152201"},{"label":"闃垮皵灞卞競","value":"152202"},{"label":"绉戝皵娌佸彸缈煎墠鏃�","value":"152221"},{"label":"绉戝皵娌佸彸缈间腑鏃�","value":"152222"},{"label":"鎵庤祲鐗规棗","value":"152223"},{"label":"绐佹硥鍘�","value":"152224"}],[{"label":"浜岃繛娴╃壒甯�","value":"152501"},{"label":"閿℃灄娴╃壒甯�","value":"152502"},{"label":"闃垮反鍢庢棗","value":"152522"},{"label":"鑻忓凹鐗瑰乏鏃�","value":"152523"},{"label":"鑻忓凹鐗瑰彸鏃�","value":"152524"},{"label":"涓滀箤鐝犵﹩娌佹棗","value":"152525"},{"label":"瑗夸箤鐝犵﹩娌佹棗","value":"152526"},{"label":"澶粏瀵烘棗","value":"152527"},{"label":"闀堕粍鏃�","value":"152528"},{"label":"姝i暥鐧芥棗","value":"152529"},{"label":"姝h摑鏃�","value":"152530"},{"label":"澶氫鸡鍘�","value":"152531"},{"label":"涔屾媺鐩栫濮斾細","value":"152571"}],[{"label":"闃挎媺鍠勫乏鏃�","value":"152921"},{"label":"闃挎媺鍠勫彸鏃�","value":"152922"},{"label":"棰濇祹绾虫棗","value":"152923"},{"label":"鍐呰挋鍙ら樋鎷夊杽缁忔祹寮�鍙戝尯","value":"152971"}]],[[{"label":"鍜屽钩鍖�","value":"210102"},{"label":"娌堟渤鍖�","value":"210103"},{"label":"澶т笢鍖�","value":"210104"},{"label":"鐨囧鍖�","value":"210105"},{"label":"閾佽タ鍖�","value":"210106"},{"label":"鑻忓灞尯","value":"210111"},{"label":"娴戝崡鍖�","value":"210112"},{"label":"娌堝寳鏂板尯","value":"210113"},{"label":"浜庢椽鍖�","value":"210114"},{"label":"杈戒腑鍖�","value":"210115"},{"label":"搴峰钩鍘�","value":"210123"},{"label":"娉曞簱鍘�","value":"210124"},{"label":"鏂版皯甯�","value":"210181"}],[{"label":"涓北鍖�","value":"210202"},{"label":"瑗垮矖鍖�","value":"210203"},{"label":"娌欐渤鍙e尯","value":"210204"},{"label":"鐢樹簳瀛愬尯","value":"210211"},{"label":"鏃呴『鍙e尯","value":"210212"},{"label":"閲戝窞鍖�","value":"210213"},{"label":"鏅叞搴楀尯","value":"210214"},{"label":"闀挎捣鍘�","value":"210224"},{"label":"鐡︽埧搴楀競","value":"210281"},{"label":"搴勬渤甯�","value":"210283"}],[{"label":"閾佷笢鍖�","value":"210302"},{"label":"閾佽タ鍖�","value":"210303"},{"label":"绔嬪北鍖�","value":"210304"},{"label":"鍗冨北鍖�","value":"210311"},{"label":"鍙板畨鍘�","value":"210321"},{"label":"宀博婊℃棌鑷不鍘�","value":"210323"},{"label":"娴峰煄甯�","value":"210381"}],[{"label":"鏂版姎鍖�","value":"210402"},{"label":"涓滄床鍖�","value":"210403"},{"label":"鏈涜姳鍖�","value":"210404"},{"label":"椤哄煄鍖�","value":"210411"},{"label":"鎶氶『鍘�","value":"210421"},{"label":"鏂板婊℃棌鑷不鍘�","value":"210422"},{"label":"娓呭師婊℃棌鑷不鍘�","value":"210423"}],[{"label":"骞冲北鍖�","value":"210502"},{"label":"婧箹鍖�","value":"210503"},{"label":"鏄庡北鍖�","value":"210504"},{"label":"鍗楄姮鍖�","value":"210505"},{"label":"鏈邯婊℃棌鑷不鍘�","value":"210521"},{"label":"妗撲粊婊℃棌鑷不鍘�","value":"210522"}],[{"label":"鍏冨疂鍖�","value":"210602"},{"label":"鎸叴鍖�","value":"210603"},{"label":"鎸畨鍖�","value":"210604"},{"label":"瀹界敻婊℃棌鑷不鍘�","value":"210624"},{"label":"涓滄腐甯�","value":"210681"},{"label":"鍑ゅ煄甯�","value":"210682"}],[{"label":"鍙ゅ鍖�","value":"210702"},{"label":"鍑屾渤鍖�","value":"210703"},{"label":"澶拰鍖�","value":"210711"},{"label":"榛戝北鍘�","value":"210726"},{"label":"涔夊幙","value":"210727"},{"label":"鍑屾捣甯�","value":"210781"},{"label":"鍖楅晣甯�","value":"210782"}],[{"label":"绔欏墠鍖�","value":"210802"},{"label":"瑗垮競鍖�","value":"210803"},{"label":"椴呴奔鍦堝尯","value":"210804"},{"label":"鑰佽竟鍖�","value":"210811"},{"label":"鐩栧窞甯�","value":"210881"},{"label":"澶х煶妗ュ競","value":"210882"}],[{"label":"娴峰窞鍖�","value":"210902"},{"label":"鏂伴偙鍖�","value":"210903"},{"label":"澶钩鍖�","value":"210904"},{"label":"娓呮渤闂ㄥ尯","value":"210905"},{"label":"缁嗘渤鍖�","value":"210911"},{"label":"闃滄柊钂欏彜鏃忚嚜娌诲幙","value":"210921"},{"label":"褰版鍘�","value":"210922"}],[{"label":"鐧藉鍖�","value":"211002"},{"label":"鏂囧湥鍖�","value":"211003"},{"label":"瀹忎紵鍖�","value":"211004"},{"label":"寮撻暱宀尯","value":"211005"},{"label":"澶瓙娌冲尯","value":"211011"},{"label":"杈介槼鍘�","value":"211021"},{"label":"鐏甯�","value":"211081"}],[{"label":"鍙屽彴瀛愬尯","value":"211102"},{"label":"鍏撮殕鍙板尯","value":"211103"},{"label":"澶ф醇鍖�","value":"211104"},{"label":"鐩樺北鍘�","value":"211122"}],[{"label":"閾跺窞鍖�","value":"211202"},{"label":"娓呮渤鍖�","value":"211204"},{"label":"閾佸箔鍘�","value":"211221"},{"label":"瑗夸赴鍘�","value":"211223"},{"label":"鏄屽浘鍘�","value":"211224"},{"label":"璋冨叺灞卞競","value":"211281"},{"label":"寮�鍘熷競","value":"211282"}],[{"label":"鍙屽鍖�","value":"211302"},{"label":"榫欏煄鍖�","value":"211303"},{"label":"鏈濋槼鍘�","value":"211321"},{"label":"寤哄钩鍘�","value":"211322"},{"label":"鍠�鍠囨瞾宸︾考钂欏彜鏃忚嚜娌诲幙","value":"211324"},{"label":"鍖楃エ甯�","value":"211381"},{"label":"鍑屾簮甯�","value":"211382"}],[{"label":"杩炲北鍖�","value":"211402"},{"label":"榫欐腐鍖�","value":"211403"},{"label":"鍗楃エ鍖�","value":"211404"},{"label":"缁ヤ腑鍘�","value":"211421"},{"label":"寤烘槍鍘�","value":"211422"},{"label":"鍏村煄甯�","value":"211481"}]],[[{"label":"鍗楀叧鍖�","value":"220102"},{"label":"瀹藉煄鍖�","value":"220103"},{"label":"鏈濋槼鍖�","value":"220104"},{"label":"浜岄亾鍖�","value":"220105"},{"label":"缁垮洯鍖�","value":"220106"},{"label":"鍙岄槼鍖�","value":"220112"},{"label":"涔濆彴鍖�","value":"220113"},{"label":"鍐滃畨鍘�","value":"220122"},{"label":"闀挎槬缁忔祹鎶�鏈紑鍙戝尯","value":"220171"},{"label":"闀挎槬鍑�鏈堥珮鏂版妧鏈骇涓氬紑鍙戝尯","value":"220172"},{"label":"闀挎槬楂樻柊鎶�鏈骇涓氬紑鍙戝尯","value":"220173"},{"label":"闀挎槬姹借溅缁忔祹鎶�鏈紑鍙戝尯","value":"220174"},{"label":"姒嗘爲甯�","value":"220182"},{"label":"寰锋儬甯�","value":"220183"}],[{"label":"鏄岄倯鍖�","value":"220202"},{"label":"榫欐江鍖�","value":"220203"},{"label":"鑸硅惀鍖�","value":"220204"},{"label":"涓版弧鍖�","value":"220211"},{"label":"姘稿悏鍘�","value":"220221"},{"label":"鍚夋灄缁忔祹寮�鍙戝尯","value":"220271"},{"label":"鍚夋灄楂樻柊鎶�鏈骇涓氬紑鍙戝尯","value":"220272"},{"label":"鍚夋灄涓浗鏂板姞鍧¢鍝佸尯","value":"220273"},{"label":"铔熸渤甯�","value":"220281"},{"label":"妗︾敻甯�","value":"220282"},{"label":"鑸掑叞甯�","value":"220283"},{"label":"纾愮煶甯�","value":"220284"}],[{"label":"閾佽タ鍖�","value":"220302"},{"label":"閾佷笢鍖�","value":"220303"},{"label":"姊ㄦ爲鍘�","value":"220322"},{"label":"浼婇�氭弧鏃忚嚜娌诲幙","value":"220323"},{"label":"鍏富宀競","value":"220381"},{"label":"鍙岃窘甯�","value":"220382"}],[{"label":"榫欏北鍖�","value":"220402"},{"label":"瑗垮畨鍖�","value":"220403"},{"label":"涓滀赴鍘�","value":"220421"},{"label":"涓滆窘鍘�","value":"220422"}],[{"label":"涓滄槍鍖�","value":"220502"},{"label":"浜岄亾姹熷尯","value":"220503"},{"label":"閫氬寲鍘�","value":"220521"},{"label":"杈夊崡鍘�","value":"220523"},{"label":"鏌虫渤鍘�","value":"220524"},{"label":"姊呮渤鍙e競","value":"220581"},{"label":"闆嗗畨甯�","value":"220582"}],[{"label":"娴戞睙鍖�","value":"220602"},{"label":"姹熸簮鍖�","value":"220605"},{"label":"鎶氭澗鍘�","value":"220621"},{"label":"闈栧畤鍘�","value":"220622"},{"label":"闀跨櫧鏈濋矞鏃忚嚜娌诲幙","value":"220623"},{"label":"涓存睙甯�","value":"220681"}],[{"label":"瀹佹睙鍖�","value":"220702"},{"label":"鍓嶉儹灏旂綏鏂挋鍙ゆ棌鑷不鍘�","value":"220721"},{"label":"闀垮箔鍘�","value":"220722"},{"label":"涔惧畨鍘�","value":"220723"},{"label":"鍚夋灄鏉惧師缁忔祹寮�鍙戝尯","value":"220771"},{"label":"鎵朵綑甯�","value":"220781"}],[{"label":"娲寳鍖�","value":"220802"},{"label":"闀囪祲鍘�","value":"220821"},{"label":"閫氭鍘�","value":"220822"},{"label":"鍚夋灄鐧藉煄缁忔祹寮�鍙戝尯","value":"220871"},{"label":"娲崡甯�","value":"220881"},{"label":"澶у畨甯�","value":"220882"}],[{"label":"寤跺悏甯�","value":"222401"},{"label":"鍥句滑甯�","value":"222402"},{"label":"鏁﹀寲甯�","value":"222403"},{"label":"鐝叉槬甯�","value":"222404"},{"label":"榫欎簳甯�","value":"222405"},{"label":"鍜岄緳甯�","value":"222406"},{"label":"姹竻鍘�","value":"222424"},{"label":"瀹夊浘鍘�","value":"222426"}]],[[{"label":"閬撻噷鍖�","value":"230102"},{"label":"鍗楀矖鍖�","value":"230103"},{"label":"閬撳鍖�","value":"230104"},{"label":"骞虫埧鍖�","value":"230108"},{"label":"鏉惧寳鍖�","value":"230109"},{"label":"棣欏潑鍖�","value":"230110"},{"label":"鍛煎叞鍖�","value":"230111"},{"label":"闃垮煄鍖�","value":"230112"},{"label":"鍙屽煄鍖�","value":"230113"},{"label":"渚濆叞鍘�","value":"230123"},{"label":"鏂规鍘�","value":"230124"},{"label":"瀹惧幙","value":"230125"},{"label":"宸村溅鍘�","value":"230126"},{"label":"鏈ㄥ叞鍘�","value":"230127"},{"label":"閫氭渤鍘�","value":"230128"},{"label":"寤跺鍘�","value":"230129"},{"label":"灏氬織甯�","value":"230183"},{"label":"浜斿父甯�","value":"230184"}],[{"label":"榫欐矙鍖�","value":"230202"},{"label":"寤哄崕鍖�","value":"230203"},{"label":"閾侀攱鍖�","value":"230204"},{"label":"鏄傛槀婧尯","value":"230205"},{"label":"瀵屾媺灏斿熀鍖�","value":"230206"},{"label":"纰惧瓙灞卞尯","value":"230207"},{"label":"姊呴噷鏂揪鏂″皵鏃忓尯","value":"230208"},{"label":"榫欐睙鍘�","value":"230221"},{"label":"渚濆畨鍘�","value":"230223"},{"label":"娉版潵鍘�","value":"230224"},{"label":"鐢樺崡鍘�","value":"230225"},{"label":"瀵岃鍘�","value":"230227"},{"label":"鍏嬪北鍘�","value":"230229"},{"label":"鍏嬩笢鍘�","value":"230230"},{"label":"鎷滄硥鍘�","value":"230231"},{"label":"璁锋渤甯�","value":"230281"}],[{"label":"楦″啝鍖�","value":"230302"},{"label":"鎭掑北鍖�","value":"230303"},{"label":"婊撮亾鍖�","value":"230304"},{"label":"姊ㄦ爲鍖�","value":"230305"},{"label":"鍩庡瓙娌冲尯","value":"230306"},{"label":"楹诲北鍖�","value":"230307"},{"label":"楦′笢鍘�","value":"230321"},{"label":"铏庢灄甯�","value":"230381"},{"label":"瀵嗗北甯�","value":"230382"}],[{"label":"鍚戦槼鍖�","value":"230402"},{"label":"宸ュ啘鍖�","value":"230403"},{"label":"鍗楀北鍖�","value":"230404"},{"label":"鍏村畨鍖�","value":"230405"},{"label":"涓滃北鍖�","value":"230406"},{"label":"鍏村北鍖�","value":"230407"},{"label":"钀濆寳鍘�","value":"230421"},{"label":"缁ユ花鍘�","value":"230422"}],[{"label":"灏栧北鍖�","value":"230502"},{"label":"宀笢鍖�","value":"230503"},{"label":"鍥涙柟鍙板尯","value":"230505"},{"label":"瀹濆北鍖�","value":"230506"},{"label":"闆嗚搐鍘�","value":"230521"},{"label":"鍙嬭皧鍘�","value":"230522"},{"label":"瀹濇竻鍘�","value":"230523"},{"label":"楗舵渤鍘�","value":"230524"}],[{"label":"钀ㄥ皵鍥惧尯","value":"230602"},{"label":"榫欏嚖鍖�","value":"230603"},{"label":"璁╄儭璺尯","value":"230604"},{"label":"绾㈠矖鍖�","value":"230605"},{"label":"澶у悓鍖�","value":"230606"},{"label":"鑲囧窞鍘�","value":"230621"},{"label":"鑲囨簮鍘�","value":"230622"},{"label":"鏋楃敻鍘�","value":"230623"},{"label":"鏉滃皵浼壒钂欏彜鏃忚嚜娌诲幙","value":"230624"},{"label":"澶у簡楂樻柊鎶�鏈骇涓氬紑鍙戝尯","value":"230671"}],[{"label":"浼婃槬鍖�","value":"230702"},{"label":"鍗楀矓鍖�","value":"230703"},{"label":"鍙嬪ソ鍖�","value":"230704"},{"label":"瑗挎灄鍖�","value":"230705"},{"label":"缈犲肠鍖�","value":"230706"},{"label":"鏂伴潚鍖�","value":"230707"},{"label":"缇庢邯鍖�","value":"230708"},{"label":"閲戝北灞尯","value":"230709"},{"label":"浜旇惀鍖�","value":"230710"},{"label":"涔岄┈娌冲尯","value":"230711"},{"label":"姹ゆ椇娌冲尯","value":"230712"},{"label":"甯﹀箔鍖�","value":"230713"},{"label":"涔屼紛宀尯","value":"230714"},{"label":"绾㈡槦鍖�","value":"230715"},{"label":"涓婄敇宀尯","value":"230716"},{"label":"鍢夎崼鍘�","value":"230722"},{"label":"閾佸姏甯�","value":"230781"}],[{"label":"鍚戦槼鍖�","value":"230803"},{"label":"鍓嶈繘鍖�","value":"230804"},{"label":"涓滈鍖�","value":"230805"},{"label":"閮婂尯","value":"230811"},{"label":"妗﹀崡鍘�","value":"230822"},{"label":"妗﹀窛鍘�","value":"230826"},{"label":"姹ゅ師鍘�","value":"230828"},{"label":"鍚屾睙甯�","value":"230881"},{"label":"瀵岄敠甯�","value":"230882"},{"label":"鎶氳繙甯�","value":"230883"}],[{"label":"鏂板叴鍖�","value":"230902"},{"label":"妗冨北鍖�","value":"230903"},{"label":"鑼勫瓙娌冲尯","value":"230904"},{"label":"鍕冨埄鍘�","value":"230921"}],[{"label":"涓滃畨鍖�","value":"231002"},{"label":"闃虫槑鍖�","value":"231003"},{"label":"鐖辨皯鍖�","value":"231004"},{"label":"瑗垮畨鍖�","value":"231005"},{"label":"鏋楀彛鍘�","value":"231025"},{"label":"鐗′腹姹熺粡娴庢妧鏈紑鍙戝尯","value":"231071"},{"label":"缁ヨ姮娌冲競","value":"231081"},{"label":"娴锋灄甯�","value":"231083"},{"label":"瀹佸畨甯�","value":"231084"},{"label":"绌嗘1甯�","value":"231085"},{"label":"涓滃畞甯�","value":"231086"}],[{"label":"鐖辫緣鍖�","value":"231102"},{"label":"瀚╂睙鍘�","value":"231121"},{"label":"閫婂厠鍘�","value":"231123"},{"label":"瀛欏惔鍘�","value":"231124"},{"label":"鍖楀畨甯�","value":"231181"},{"label":"浜斿ぇ杩炴睜甯�","value":"231182"}],[{"label":"鍖楁灄鍖�","value":"231202"},{"label":"鏈涘鍘�","value":"231221"},{"label":"鍏拌タ鍘�","value":"231222"},{"label":"闈掑唸鍘�","value":"231223"},{"label":"搴嗗畨鍘�","value":"231224"},{"label":"鏄庢按鍘�","value":"231225"},{"label":"缁ユ1鍘�","value":"231226"},{"label":"瀹夎揪甯�","value":"231281"},{"label":"鑲囦笢甯�","value":"231282"},{"label":"娴蜂鸡甯�","value":"231283"}],[{"label":"鍔犳牸杈惧鍖�","value":"232701"},{"label":"鏉惧箔鍖�","value":"232702"},{"label":"鏂版灄鍖�","value":"232703"},{"label":"鍛间腑鍖�","value":"232704"},{"label":"鍛肩帥鍘�","value":"232721"},{"label":"濉旀渤鍘�","value":"232722"},{"label":"婕犳渤鍘�","value":"232723"}]],[[{"label":"榛勬郸鍖�","value":"310101"},{"label":"寰愭眹鍖�","value":"310104"},{"label":"闀垮畞鍖�","value":"310105"},{"label":"闈欏畨鍖�","value":"310106"},{"label":"鏅檧鍖�","value":"310107"},{"label":"铏瑰彛鍖�","value":"310109"},{"label":"鏉ㄦ郸鍖�","value":"310110"},{"label":"闂佃鍖�","value":"310112"},{"label":"瀹濆北鍖�","value":"310113"},{"label":"鍢夊畾鍖�","value":"310114"},{"label":"娴︿笢鏂板尯","value":"310115"},{"label":"閲戝北鍖�","value":"310116"},{"label":"鏉炬睙鍖�","value":"310117"},{"label":"闈掓郸鍖�","value":"310118"},{"label":"濂夎搐鍖�","value":"310120"},{"label":"宕囨槑鍖�","value":"310151"}]],[[{"label":"鐜勬鍖�","value":"320102"},{"label":"绉︽樊鍖�","value":"320104"},{"label":"寤洪偤鍖�","value":"320105"},{"label":"榧撴ゼ鍖�","value":"320106"},{"label":"娴﹀彛鍖�","value":"320111"},{"label":"鏍栭湠鍖�","value":"320113"},{"label":"闆ㄨ姳鍙板尯","value":"320114"},{"label":"姹熷畞鍖�","value":"320115"},{"label":"鍏悎鍖�","value":"320116"},{"label":"婧ф按鍖�","value":"320117"},{"label":"楂樻烦鍖�","value":"320118"}],[{"label":"閿″北鍖�","value":"320205"},{"label":"鎯犲北鍖�","value":"320206"},{"label":"婊ㄦ箹鍖�","value":"320211"},{"label":"姊佹邯鍖�","value":"320213"},{"label":"鏂板惔鍖�","value":"320214"},{"label":"姹熼槾甯�","value":"320281"},{"label":"瀹滃叴甯�","value":"320282"}],[{"label":"榧撴ゼ鍖�","value":"320302"},{"label":"浜戦緳鍖�","value":"320303"},{"label":"璐炬豹鍖�","value":"320305"},{"label":"娉夊北鍖�","value":"320311"},{"label":"閾滃北鍖�","value":"320312"},{"label":"涓板幙","value":"320321"},{"label":"娌涘幙","value":"320322"},{"label":"鐫㈠畞鍘�","value":"320324"},{"label":"寰愬窞缁忔祹鎶�鏈紑鍙戝尯","value":"320371"},{"label":"鏂版矀甯�","value":"320381"},{"label":"閭冲窞甯�","value":"320382"}],[{"label":"澶╁畞鍖�","value":"320402"},{"label":"閽熸ゼ鍖�","value":"320404"},{"label":"鏂板寳鍖�","value":"320411"},{"label":"姝﹁繘鍖�","value":"320412"},{"label":"閲戝潧鍖�","value":"320413"},{"label":"婧ч槼甯�","value":"320481"}],[{"label":"铏庝笜鍖�","value":"320505"},{"label":"鍚翠腑鍖�","value":"320506"},{"label":"鐩稿煄鍖�","value":"320507"},{"label":"濮戣嫃鍖�","value":"320508"},{"label":"鍚存睙鍖�","value":"320509"},{"label":"鑻忓窞宸ヤ笟鍥尯","value":"320571"},{"label":"甯哥啛甯�","value":"320581"},{"label":"寮犲娓競","value":"320582"},{"label":"鏄嗗北甯�","value":"320583"},{"label":"澶粨甯�","value":"320585"}],[{"label":"宕囧窛鍖�","value":"320602"},{"label":"娓椄鍖�","value":"320611"},{"label":"閫氬窞鍖�","value":"320612"},{"label":"娴峰畨鍘�","value":"320621"},{"label":"濡備笢鍘�","value":"320623"},{"label":"鍗楅�氱粡娴庢妧鏈紑鍙戝尯","value":"320671"},{"label":"鍚笢甯�","value":"320681"},{"label":"濡傜殝甯�","value":"320682"},{"label":"娴烽棬甯�","value":"320684"}],[{"label":"杩炰簯鍖�","value":"320703"},{"label":"娴峰窞鍖�","value":"320706"},{"label":"璧f鍖�","value":"320707"},{"label":"涓滄捣鍘�","value":"320722"},{"label":"鐏屼簯鍘�","value":"320723"},{"label":"鐏屽崡鍘�","value":"320724"},{"label":"杩炰簯娓粡娴庢妧鏈紑鍙戝尯","value":"320771"},{"label":"杩炰簯娓珮鏂版妧鏈骇涓氬紑鍙戝尯","value":"320772"}],[{"label":"娣畨鍖�","value":"320803"},{"label":"娣槾鍖�","value":"320804"},{"label":"娓呮睙娴﹀尯","value":"320812"},{"label":"娲辰鍖�","value":"320813"},{"label":"娑熸按鍘�","value":"320826"},{"label":"鐩辩湙鍘�","value":"320830"},{"label":"閲戞箹鍘�","value":"320831"},{"label":"娣畨缁忔祹鎶�鏈紑鍙戝尯","value":"320871"}],[{"label":"浜箹鍖�","value":"320902"},{"label":"鐩愰兘鍖�","value":"320903"},{"label":"澶т赴鍖�","value":"320904"},{"label":"鍝嶆按鍘�","value":"320921"},{"label":"婊ㄦ捣鍘�","value":"320922"},{"label":"闃滃畞鍘�","value":"320923"},{"label":"灏勯槼鍘�","value":"320924"},{"label":"寤烘箹鍘�","value":"320925"},{"label":"鐩愬煄缁忔祹鎶�鏈紑鍙戝尯","value":"320971"},{"label":"涓滃彴甯�","value":"320981"}],[{"label":"骞块櫟鍖�","value":"321002"},{"label":"閭楁睙鍖�","value":"321003"},{"label":"姹熼兘鍖�","value":"321012"},{"label":"瀹濆簲鍘�","value":"321023"},{"label":"鎵窞缁忔祹鎶�鏈紑鍙戝尯","value":"321071"},{"label":"浠緛甯�","value":"321081"},{"label":"楂橀偖甯�","value":"321084"}],[{"label":"浜彛鍖�","value":"321102"},{"label":"娑﹀窞鍖�","value":"321111"},{"label":"涓瑰緬鍖�","value":"321112"},{"label":"闀囨睙鏂板尯","value":"321171"},{"label":"涓归槼甯�","value":"321181"},{"label":"鎵腑甯�","value":"321182"},{"label":"鍙ュ甯�","value":"321183"}],[{"label":"娴烽櫟鍖�","value":"321202"},{"label":"楂樻腐鍖�","value":"321203"},{"label":"濮滃牥鍖�","value":"321204"},{"label":"娉板窞鍖昏嵂楂樻柊鎶�鏈骇涓氬紑鍙戝尯","value":"321271"},{"label":"鍏村寲甯�","value":"321281"},{"label":"闈栨睙甯�","value":"321282"},{"label":"娉板叴甯�","value":"321283"}],[{"label":"瀹垮煄鍖�","value":"321302"},{"label":"瀹胯鲍鍖�","value":"321311"},{"label":"娌槼鍘�","value":"321322"},{"label":"娉楅槼鍘�","value":"321323"},{"label":"娉楁椽鍘�","value":"321324"},{"label":"瀹胯縼缁忔祹鎶�鏈紑鍙戝尯","value":"321371"}]],[[{"label":"涓婂煄鍖�","value":"330102"},{"label":"涓嬪煄鍖�","value":"330103"},{"label":"姹熷共鍖�","value":"330104"},{"label":"鎷卞鍖�","value":"330105"},{"label":"瑗挎箹鍖�","value":"330106"},{"label":"婊ㄦ睙鍖�","value":"330108"},{"label":"钀у北鍖�","value":"330109"},{"label":"浣欐澀鍖�","value":"330110"},{"label":"瀵岄槼鍖�","value":"330111"},{"label":"涓村畨鍖�","value":"330112"},{"label":"妗愬簮鍘�","value":"330122"},{"label":"娣冲畨鍘�","value":"330127"},{"label":"寤哄痉甯�","value":"330182"}],[{"label":"娴锋洐鍖�","value":"330203"},{"label":"姹熷寳鍖�","value":"330205"},{"label":"鍖椾粦鍖�","value":"330206"},{"label":"闀囨捣鍖�","value":"330211"},{"label":"閯炲窞鍖�","value":"330212"},{"label":"濂夊寲鍖�","value":"330213"},{"label":"璞″北鍘�","value":"330225"},{"label":"瀹佹捣鍘�","value":"330226"},{"label":"浣欏甯�","value":"330281"},{"label":"鎱堟邯甯�","value":"330282"}],[{"label":"楣垮煄鍖�","value":"330302"},{"label":"榫欐咕鍖�","value":"330303"},{"label":"鐡捣鍖�","value":"330304"},{"label":"娲炲ご鍖�","value":"330305"},{"label":"姘稿槈鍘�","value":"330324"},{"label":"骞抽槼鍘�","value":"330326"},{"label":"鑻嶅崡鍘�","value":"330327"},{"label":"鏂囨垚鍘�","value":"330328"},{"label":"娉伴『鍘�","value":"330329"},{"label":"娓╁窞缁忔祹鎶�鏈紑鍙戝尯","value":"330371"},{"label":"鐟炲畨甯�","value":"330381"},{"label":"涔愭竻甯�","value":"330382"}],[{"label":"鍗楁箹鍖�","value":"330402"},{"label":"绉�娲插尯","value":"330411"},{"label":"鍢夊杽鍘�","value":"330421"},{"label":"娴风洂鍘�","value":"330424"},{"label":"娴峰畞甯�","value":"330481"},{"label":"骞虫箹甯�","value":"330482"},{"label":"妗愪埂甯�","value":"330483"}],[{"label":"鍚村叴鍖�","value":"330502"},{"label":"鍗楁禂鍖�","value":"330503"},{"label":"寰锋竻鍘�","value":"330521"},{"label":"闀垮叴鍘�","value":"330522"},{"label":"瀹夊悏鍘�","value":"330523"}],[{"label":"瓒婂煄鍖�","value":"330602"},{"label":"鏌ˉ鍖�","value":"330603"},{"label":"涓婅櫈鍖�","value":"330604"},{"label":"鏂版槍鍘�","value":"330624"},{"label":"璇告毃甯�","value":"330681"},{"label":"宓婂窞甯�","value":"330683"}],[{"label":"濠哄煄鍖�","value":"330702"},{"label":"閲戜笢鍖�","value":"330703"},{"label":"姝︿箟鍘�","value":"330723"},{"label":"娴︽睙鍘�","value":"330726"},{"label":"纾愬畨鍘�","value":"330727"},{"label":"鍏版邯甯�","value":"330781"},{"label":"涔変箤甯�","value":"330782"},{"label":"涓滈槼甯�","value":"330783"},{"label":"姘稿悍甯�","value":"330784"}],[{"label":"鏌煄鍖�","value":"330802"},{"label":"琛㈡睙鍖�","value":"330803"},{"label":"甯稿北鍘�","value":"330822"},{"label":"寮�鍖栧幙","value":"330824"},{"label":"榫欐父鍘�","value":"330825"},{"label":"姹熷北甯�","value":"330881"}],[{"label":"瀹氭捣鍖�","value":"330902"},{"label":"鏅檧鍖�","value":"330903"},{"label":"宀卞北鍘�","value":"330921"},{"label":"宓婃硹鍘�","value":"330922"}],[{"label":"妞掓睙鍖�","value":"331002"},{"label":"榛勫博鍖�","value":"331003"},{"label":"璺ˉ鍖�","value":"331004"},{"label":"涓夐棬鍘�","value":"331022"},{"label":"澶╁彴鍘�","value":"331023"},{"label":"浠欏眳鍘�","value":"331024"},{"label":"娓╁箔甯�","value":"331081"},{"label":"涓存捣甯�","value":"331082"},{"label":"鐜夌幆甯�","value":"331083"}],[{"label":"鑾查兘鍖�","value":"331102"},{"label":"闈掔敯鍘�","value":"331121"},{"label":"缂欎簯鍘�","value":"331122"},{"label":"閬傛槍鍘�","value":"331123"},{"label":"鏉鹃槼鍘�","value":"331124"},{"label":"浜戝拰鍘�","value":"331125"},{"label":"搴嗗厓鍘�","value":"331126"},{"label":"鏅畞鐣叉棌鑷不鍘�","value":"331127"},{"label":"榫欐硥甯�","value":"331181"}]],[[{"label":"鐟舵捣鍖�","value":"340102"},{"label":"搴愰槼鍖�","value":"340103"},{"label":"铚�灞卞尯","value":"340104"},{"label":"鍖呮渤鍖�","value":"340111"},{"label":"闀夸赴鍘�","value":"340121"},{"label":"鑲ヤ笢鍘�","value":"340122"},{"label":"鑲ヨタ鍘�","value":"340123"},{"label":"搴愭睙鍘�","value":"340124"},{"label":"鍚堣偉楂樻柊鎶�鏈骇涓氬紑鍙戝尯","value":"340171"},{"label":"鍚堣偉缁忔祹鎶�鏈紑鍙戝尯","value":"340172"},{"label":"鍚堣偉鏂扮珯楂樻柊鎶�鏈骇涓氬紑鍙戝尯","value":"340173"},{"label":"宸㈡箹甯�","value":"340181"}],[{"label":"闀滄箹鍖�","value":"340202"},{"label":"寮嬫睙鍖�","value":"340203"},{"label":"楦犳睙鍖�","value":"340207"},{"label":"涓夊北鍖�","value":"340208"},{"label":"鑺滄箹鍘�","value":"340221"},{"label":"绻佹槍鍘�","value":"340222"},{"label":"鍗楅櫟鍘�","value":"340223"},{"label":"鏃犱负鍘�","value":"340225"},{"label":"鑺滄箹缁忔祹鎶�鏈紑鍙戝尯","value":"340271"},{"label":"瀹夊窘鑺滄箹闀挎睙澶фˉ缁忔祹寮�鍙戝尯","value":"340272"}],[{"label":"榫欏瓙婀栧尯","value":"340302"},{"label":"铓屽北鍖�","value":"340303"},{"label":"绂逛細鍖�","value":"340304"},{"label":"娣笂鍖�","value":"340311"},{"label":"鎬�杩滃幙","value":"340321"},{"label":"浜旀渤鍘�","value":"340322"},{"label":"鍥洪晣鍘�","value":"340323"},{"label":"铓屽煚甯傞珮鏂版妧鏈紑鍙戝尯","value":"340371"},{"label":"铓屽煚甯傜粡娴庡紑鍙戝尯","value":"340372"}],[{"label":"澶ч�氬尯","value":"340402"},{"label":"鐢板搴靛尯","value":"340403"},{"label":"璋㈠闆嗗尯","value":"340404"},{"label":"鍏叕灞卞尯","value":"340405"},{"label":"娼橀泦鍖�","value":"340406"},{"label":"鍑ゅ彴鍘�","value":"340421"},{"label":"瀵垮幙","value":"340422"}],[{"label":"鑺卞北鍖�","value":"340503"},{"label":"闆ㄥ北鍖�","value":"340504"},{"label":"鍗氭湜鍖�","value":"340506"},{"label":"褰撴秱鍘�","value":"340521"},{"label":"鍚北鍘�","value":"340522"},{"label":"鍜屽幙","value":"340523"}],[{"label":"鏉滈泦鍖�","value":"340602"},{"label":"鐩稿北鍖�","value":"340603"},{"label":"鐑堝北鍖�","value":"340604"},{"label":"婵夋邯鍘�","value":"340621"}],[{"label":"閾滃畼鍖�","value":"340705"},{"label":"涔夊畨鍖�","value":"340706"},{"label":"閮婂尯","value":"340711"},{"label":"鏋為槼鍘�","value":"340722"}],[{"label":"杩庢睙鍖�","value":"340802"},{"label":"澶ц鍖�","value":"340803"},{"label":"瀹滅鍖�","value":"340811"},{"label":"鎬�瀹佸幙","value":"340822"},{"label":"娼滃北鍘�","value":"340824"},{"label":"澶箹鍘�","value":"340825"},{"label":"瀹挎澗鍘�","value":"340826"},{"label":"鏈涙睙鍘�","value":"340827"},{"label":"宀宠タ鍘�","value":"340828"},{"label":"瀹夊窘瀹夊簡缁忔祹寮�鍙戝尯","value":"340871"},{"label":"妗愬煄甯�","value":"340881"}],[{"label":"灞邯鍖�","value":"341002"},{"label":"榛勫北鍖�","value":"341003"},{"label":"寰藉窞鍖�","value":"341004"},{"label":"姝欏幙","value":"341021"},{"label":"浼戝畞鍘�","value":"341022"},{"label":"榛熷幙","value":"341023"},{"label":"绁侀棬鍘�","value":"341024"}],[{"label":"鐞呯悐鍖�","value":"341102"},{"label":"鍗楄隘鍖�","value":"341103"},{"label":"鏉ュ畨鍘�","value":"341122"},{"label":"鍏ㄦ鍘�","value":"341124"},{"label":"瀹氳繙鍘�","value":"341125"},{"label":"鍑ら槼鍘�","value":"341126"},{"label":"鑻忔粊鐜颁唬浜т笟鍥�","value":"341171"},{"label":"婊佸窞缁忔祹鎶�鏈紑鍙戝尯","value":"341172"},{"label":"澶╅暱甯�","value":"341181"},{"label":"鏄庡厜甯�","value":"341182"}],[{"label":"棰嶅窞鍖�","value":"341202"},{"label":"棰嶄笢鍖�","value":"341203"},{"label":"棰嶆硥鍖�","value":"341204"},{"label":"涓存硥鍘�","value":"341221"},{"label":"澶拰鍘�","value":"341222"},{"label":"闃滃崡鍘�","value":"341225"},{"label":"棰嶄笂鍘�","value":"341226"},{"label":"闃滈槼鍚堣偉鐜颁唬浜т笟鍥尯","value":"341271"},{"label":"闃滈槼缁忔祹鎶�鏈紑鍙戝尯","value":"341272"},{"label":"鐣岄甯�","value":"341282"}],[{"label":"鍩囨ˉ鍖�","value":"341302"},{"label":"鐮�灞卞幙","value":"341321"},{"label":"钀у幙","value":"341322"},{"label":"鐏电挧鍘�","value":"341323"},{"label":"娉楀幙","value":"341324"},{"label":"瀹垮窞椹瀺灞辩幇浠d骇涓氬洯鍖�","value":"341371"},{"label":"瀹垮窞缁忔祹鎶�鏈紑鍙戝尯","value":"341372"}],[{"label":"閲戝畨鍖�","value":"341502"},{"label":"瑁曞畨鍖�","value":"341503"},{"label":"鍙堕泦鍖�","value":"341504"},{"label":"闇嶉偙鍘�","value":"341522"},{"label":"鑸掑煄鍘�","value":"341523"},{"label":"閲戝鍘�","value":"341524"},{"label":"闇嶅北鍘�","value":"341525"}],[{"label":"璋煄鍖�","value":"341602"},{"label":"娑¢槼鍘�","value":"341621"},{"label":"钂欏煄鍘�","value":"341622"},{"label":"鍒╄緵鍘�","value":"341623"}],[{"label":"璐垫睜鍖�","value":"341702"},{"label":"涓滆嚦鍘�","value":"341721"},{"label":"鐭冲彴鍘�","value":"341722"},{"label":"闈掗槼鍘�","value":"341723"}],[{"label":"瀹e窞鍖�","value":"341802"},{"label":"閮庢邯鍘�","value":"341821"},{"label":"骞垮痉鍘�","value":"341822"},{"label":"娉惧幙","value":"341823"},{"label":"缁╂邯鍘�","value":"341824"},{"label":"鏃屽痉鍘�","value":"341825"},{"label":"瀹e煄甯傜粡娴庡紑鍙戝尯","value":"341871"},{"label":"瀹佸浗甯�","value":"341881"}]],[[{"label":"榧撴ゼ鍖�","value":"350102"},{"label":"鍙版睙鍖�","value":"350103"},{"label":"浠撳北鍖�","value":"350104"},{"label":"椹熬鍖�","value":"350105"},{"label":"鏅嬪畨鍖�","value":"350111"},{"label":"闂戒警鍘�","value":"350121"},{"label":"杩炴睙鍘�","value":"350122"},{"label":"缃楁簮鍘�","value":"350123"},{"label":"闂芥竻鍘�","value":"350124"},{"label":"姘告嘲鍘�","value":"350125"},{"label":"骞虫江鍘�","value":"350128"},{"label":"绂忔竻甯�","value":"350181"},{"label":"闀夸箰甯�","value":"350182"}],[{"label":"鎬濇槑鍖�","value":"350203"},{"label":"娴锋钵鍖�","value":"350205"},{"label":"婀栭噷鍖�","value":"350206"},{"label":"闆嗙編鍖�","value":"350211"},{"label":"鍚屽畨鍖�","value":"350212"},{"label":"缈斿畨鍖�","value":"350213"}],[{"label":"鍩庡帰鍖�","value":"350302"},{"label":"娑垫睙鍖�","value":"350303"},{"label":"鑽斿煄鍖�","value":"350304"},{"label":"绉�灞垮尯","value":"350305"},{"label":"浠欐父鍘�","value":"350322"}],[{"label":"姊呭垪鍖�","value":"350402"},{"label":"涓夊厓鍖�","value":"350403"},{"label":"鏄庢邯鍘�","value":"350421"},{"label":"娓呮祦鍘�","value":"350423"},{"label":"瀹佸寲鍘�","value":"350424"},{"label":"澶х敯鍘�","value":"350425"},{"label":"灏ゆ邯鍘�","value":"350426"},{"label":"娌欏幙","value":"350427"},{"label":"灏嗕箰鍘�","value":"350428"},{"label":"娉板畞鍘�","value":"350429"},{"label":"寤哄畞鍘�","value":"350430"},{"label":"姘稿畨甯�","value":"350481"}],[{"label":"椴ゅ煄鍖�","value":"350502"},{"label":"涓版辰鍖�","value":"350503"},{"label":"娲涙睙鍖�","value":"350504"},{"label":"娉夋腐鍖�","value":"350505"},{"label":"鎯犲畨鍘�","value":"350521"},{"label":"瀹夋邯鍘�","value":"350524"},{"label":"姘告槬鍘�","value":"350525"},{"label":"寰峰寲鍘�","value":"350526"},{"label":"閲戦棬鍘�","value":"350527"},{"label":"鐭崇嫯甯�","value":"350581"},{"label":"鏅嬫睙甯�","value":"350582"},{"label":"鍗楀畨甯�","value":"350583"}],[{"label":"鑺楀煄鍖�","value":"350602"},{"label":"榫欐枃鍖�","value":"350603"},{"label":"浜戦渼鍘�","value":"350622"},{"label":"婕虫郸鍘�","value":"350623"},{"label":"璇忓畨鍘�","value":"350624"},{"label":"闀挎嘲鍘�","value":"350625"},{"label":"涓滃北鍘�","value":"350626"},{"label":"鍗楅潠鍘�","value":"350627"},{"label":"骞冲拰鍘�","value":"350628"},{"label":"鍗庡畨鍘�","value":"350629"},{"label":"榫欐捣甯�","value":"350681"}],[{"label":"寤跺钩鍖�","value":"350702"},{"label":"寤洪槼鍖�","value":"350703"},{"label":"椤烘槍鍘�","value":"350721"},{"label":"娴﹀煄鍘�","value":"350722"},{"label":"鍏夋辰鍘�","value":"350723"},{"label":"鏉炬邯鍘�","value":"350724"},{"label":"鏀垮拰鍘�","value":"350725"},{"label":"閭垫甯�","value":"350781"},{"label":"姝﹀し灞卞競","value":"350782"},{"label":"寤虹摨甯�","value":"350783"}],[{"label":"鏂扮綏鍖�","value":"350802"},{"label":"姘稿畾鍖�","value":"350803"},{"label":"闀挎眬鍘�","value":"350821"},{"label":"涓婃澀鍘�","value":"350823"},{"label":"姝﹀钩鍘�","value":"350824"},{"label":"杩炲煄鍘�","value":"350825"},{"label":"婕冲钩甯�","value":"350881"}],[{"label":"钑夊煄鍖�","value":"350902"},{"label":"闇炴郸鍘�","value":"350921"},{"label":"鍙ょ敯鍘�","value":"350922"},{"label":"灞忓崡鍘�","value":"350923"},{"label":"瀵垮畞鍘�","value":"350924"},{"label":"鍛ㄥ畞鍘�","value":"350925"},{"label":"鏌樿崳鍘�","value":"350926"},{"label":"绂忓畨甯�","value":"350981"},{"label":"绂忛紟甯�","value":"350982"}]],[[{"label":"涓滄箹鍖�","value":"360102"},{"label":"瑗挎箹鍖�","value":"360103"},{"label":"闈掍簯璋卞尯","value":"360104"},{"label":"婀鹃噷鍖�","value":"360105"},{"label":"闈掑北婀栧尯","value":"360111"},{"label":"鏂板缓鍖�","value":"360112"},{"label":"鍗楁槍鍘�","value":"360121"},{"label":"瀹変箟鍘�","value":"360123"},{"label":"杩涜搐鍘�","value":"360124"}],[{"label":"鏄屾睙鍖�","value":"360202"},{"label":"鐝犲北鍖�","value":"360203"},{"label":"娴鍘�","value":"360222"},{"label":"涔愬钩甯�","value":"360281"}],[{"label":"瀹夋簮鍖�","value":"360302"},{"label":"婀樹笢鍖�","value":"360313"},{"label":"鑾茶姳鍘�","value":"360321"},{"label":"涓婃牀鍘�","value":"360322"},{"label":"鑺︽邯鍘�","value":"360323"}],[{"label":"婵傛邯鍖�","value":"360402"},{"label":"娴旈槼鍖�","value":"360403"},{"label":"鏌存鍖�","value":"360404"},{"label":"姝﹀畞鍘�","value":"360423"},{"label":"淇按鍘�","value":"360424"},{"label":"姘镐慨鍘�","value":"360425"},{"label":"寰峰畨鍘�","value":"360426"},{"label":"閮芥槍鍘�","value":"360428"},{"label":"婀栧彛鍘�","value":"360429"},{"label":"褰辰鍘�","value":"360430"},{"label":"鐟炴槍甯�","value":"360481"},{"label":"鍏遍潚鍩庡競","value":"360482"},{"label":"搴愬北甯�","value":"360483"}],[{"label":"娓濇按鍖�","value":"360502"},{"label":"鍒嗗疁鍘�","value":"360521"}],[{"label":"鏈堟箹鍖�","value":"360602"},{"label":"浣欐睙鍘�","value":"360622"},{"label":"璐垫邯甯�","value":"360681"}],[{"label":"绔犺础鍖�","value":"360702"},{"label":"鍗楀悍鍖�","value":"360703"},{"label":"璧e幙鍖�","value":"360704"},{"label":"淇′赴鍘�","value":"360722"},{"label":"澶т綑鍘�","value":"360723"},{"label":"涓婄姽鍘�","value":"360724"},{"label":"宕囦箟鍘�","value":"360725"},{"label":"瀹夎繙鍘�","value":"360726"},{"label":"榫欏崡鍘�","value":"360727"},{"label":"瀹氬崡鍘�","value":"360728"},{"label":"鍏ㄥ崡鍘�","value":"360729"},{"label":"瀹侀兘鍘�","value":"360730"},{"label":"浜庨兘鍘�","value":"360731"},{"label":"鍏村浗鍘�","value":"360732"},{"label":"浼氭槍鍘�","value":"360733"},{"label":"瀵讳箤鍘�","value":"360734"},{"label":"鐭冲煄鍘�","value":"360735"},{"label":"鐟為噾甯�","value":"360781"}],[{"label":"鍚夊窞鍖�","value":"360802"},{"label":"闈掑師鍖�","value":"360803"},{"label":"鍚夊畨鍘�","value":"360821"},{"label":"鍚夋按鍘�","value":"360822"},{"label":"宄℃睙鍘�","value":"360823"},{"label":"鏂板共鍘�","value":"360824"},{"label":"姘镐赴鍘�","value":"360825"},{"label":"娉板拰鍘�","value":"360826"},{"label":"閬傚窛鍘�","value":"360827"},{"label":"涓囧畨鍘�","value":"360828"},{"label":"瀹夌鍘�","value":"360829"},{"label":"姘告柊鍘�","value":"360830"},{"label":"浜曞唸灞卞競","value":"360881"}],[{"label":"琚佸窞鍖�","value":"360902"},{"label":"濂夋柊鍘�","value":"360921"},{"label":"涓囪浇鍘�","value":"360922"},{"label":"涓婇珮鍘�","value":"360923"},{"label":"瀹滀赴鍘�","value":"360924"},{"label":"闈栧畨鍘�","value":"360925"},{"label":"閾滈紦鍘�","value":"360926"},{"label":"涓板煄甯�","value":"360981"},{"label":"妯熸爲甯�","value":"360982"},{"label":"楂樺畨甯�","value":"360983"}],[{"label":"涓村窛鍖�","value":"361002"},{"label":"涓滀埂鍖�","value":"361003"},{"label":"鍗楀煄鍘�","value":"361021"},{"label":"榛庡窛鍘�","value":"361022"},{"label":"鍗椾赴鍘�","value":"361023"},{"label":"宕囦粊鍘�","value":"361024"},{"label":"涔愬畨鍘�","value":"361025"},{"label":"瀹滈粍鍘�","value":"361026"},{"label":"閲戞邯鍘�","value":"361027"},{"label":"璧勬邯鍘�","value":"361028"},{"label":"骞挎槍鍘�","value":"361030"}],[{"label":"淇″窞鍖�","value":"361102"},{"label":"骞夸赴鍖�","value":"361103"},{"label":"涓婇ザ鍘�","value":"361121"},{"label":"鐜夊北鍘�","value":"361123"},{"label":"閾呭北鍘�","value":"361124"},{"label":"妯嘲鍘�","value":"361125"},{"label":"寮嬮槼鍘�","value":"361126"},{"label":"浣欏共鍘�","value":"361127"},{"label":"閯遍槼鍘�","value":"361128"},{"label":"涓囧勾鍘�","value":"361129"},{"label":"濠烘簮鍘�","value":"361130"},{"label":"寰峰叴甯�","value":"361181"}]],[[{"label":"鍘嗕笅鍖�","value":"370102"},{"label":"甯備腑鍖�","value":"370103"},{"label":"妲愯崼鍖�","value":"370104"},{"label":"澶╂ˉ鍖�","value":"370105"},{"label":"鍘嗗煄鍖�","value":"370112"},{"label":"闀挎竻鍖�","value":"370113"},{"label":"绔犱笜鍖�","value":"370114"},{"label":"骞抽槾鍘�","value":"370124"},{"label":"娴庨槼鍘�","value":"370125"},{"label":"鍟嗘渤鍘�","value":"370126"},{"label":"娴庡崡楂樻柊鎶�鏈骇涓氬紑鍙戝尯","value":"370171"}],[{"label":"甯傚崡鍖�","value":"370202"},{"label":"甯傚寳鍖�","value":"370203"},{"label":"榛勫矝鍖�","value":"370211"},{"label":"宕傚北鍖�","value":"370212"},{"label":"鏉庢钵鍖�","value":"370213"},{"label":"鍩庨槼鍖�","value":"370214"},{"label":"鍗冲ⅷ鍖�","value":"370215"},{"label":"闈掑矝楂樻柊鎶�鏈骇涓氬紑鍙戝尯","value":"370271"},{"label":"鑳跺窞甯�","value":"370281"},{"label":"骞冲害甯�","value":"370283"},{"label":"鑾辫タ甯�","value":"370285"}],[{"label":"娣勫窛鍖�","value":"370302"},{"label":"寮犲簵鍖�","value":"370303"},{"label":"鍗氬北鍖�","value":"370304"},{"label":"涓存穭鍖�","value":"370305"},{"label":"鍛ㄦ潙鍖�","value":"370306"},{"label":"妗撳彴鍘�","value":"370321"},{"label":"楂橀潚鍘�","value":"370322"},{"label":"娌傛簮鍘�","value":"370323"}],[{"label":"甯備腑鍖�","value":"370402"},{"label":"钖涘煄鍖�","value":"370403"},{"label":"宄勫煄鍖�","value":"370404"},{"label":"鍙板効搴勫尯","value":"370405"},{"label":"灞变涵鍖�","value":"370406"},{"label":"婊曞窞甯�","value":"370481"}],[{"label":"涓滆惀鍖�","value":"370502"},{"label":"娌冲彛鍖�","value":"370503"},{"label":"鍨﹀埄鍖�","value":"370505"},{"label":"鍒╂触鍘�","value":"370522"},{"label":"骞块ザ鍘�","value":"370523"},{"label":"涓滆惀缁忔祹鎶�鏈紑鍙戝尯","value":"370571"},{"label":"涓滆惀娓粡娴庡紑鍙戝尯","value":"370572"}],[{"label":"鑺濈綐鍖�","value":"370602"},{"label":"绂忓北鍖�","value":"370611"},{"label":"鐗熷钩鍖�","value":"370612"},{"label":"鑾卞北鍖�","value":"370613"},{"label":"闀垮矝鍘�","value":"370634"},{"label":"鐑熷彴楂樻柊鎶�鏈骇涓氬紑鍙戝尯","value":"370671"},{"label":"鐑熷彴缁忔祹鎶�鏈紑鍙戝尯","value":"370672"},{"label":"榫欏彛甯�","value":"370681"},{"label":"鑾遍槼甯�","value":"370682"},{"label":"鑾卞窞甯�","value":"370683"},{"label":"钃幈甯�","value":"370684"},{"label":"鎷涜繙甯�","value":"370685"},{"label":"鏍栭湠甯�","value":"370686"},{"label":"娴烽槼甯�","value":"370687"}],[{"label":"娼嶅煄鍖�","value":"370702"},{"label":"瀵掍涵鍖�","value":"370703"},{"label":"鍧婂瓙鍖�","value":"370704"},{"label":"濂庢枃鍖�","value":"370705"},{"label":"涓存湊鍘�","value":"370724"},{"label":"鏄屼箰鍘�","value":"370725"},{"label":"娼嶅潑婊ㄦ捣缁忔祹鎶�鏈紑鍙戝尯","value":"370772"},{"label":"闈掑窞甯�","value":"370781"},{"label":"璇稿煄甯�","value":"370782"},{"label":"瀵垮厜甯�","value":"370783"},{"label":"瀹変笜甯�","value":"370784"},{"label":"楂樺瘑甯�","value":"370785"},{"label":"鏄岄倯甯�","value":"370786"}],[{"label":"浠诲煄鍖�","value":"370811"},{"label":"鍏栧窞鍖�","value":"370812"},{"label":"寰北鍘�","value":"370826"},{"label":"楸煎彴鍘�","value":"370827"},{"label":"閲戜埂鍘�","value":"370828"},{"label":"鍢夌ゥ鍘�","value":"370829"},{"label":"姹朵笂鍘�","value":"370830"},{"label":"娉楁按鍘�","value":"370831"},{"label":"姊佸北鍘�","value":"370832"},{"label":"娴庡畞楂樻柊鎶�鏈骇涓氬紑鍙戝尯","value":"370871"},{"label":"鏇查槣甯�","value":"370881"},{"label":"閭瑰煄甯�","value":"370883"}],[{"label":"娉板北鍖�","value":"370902"},{"label":"宀卞渤鍖�","value":"370911"},{"label":"瀹侀槼鍘�","value":"370921"},{"label":"涓滃钩鍘�","value":"370923"},{"label":"鏂版嘲甯�","value":"370982"},{"label":"鑲ュ煄甯�","value":"370983"}],[{"label":"鐜繝鍖�","value":"371002"},{"label":"鏂囩櫥鍖�","value":"371003"},{"label":"濞佹捣鐏偓楂樻妧鏈骇涓氬紑鍙戝尯","value":"371071"},{"label":"濞佹捣缁忔祹鎶�鏈紑鍙戝尯","value":"371072"},{"label":"濞佹捣涓存腐缁忔祹鎶�鏈紑鍙戝尯","value":"371073"},{"label":"鑽f垚甯�","value":"371082"},{"label":"涔冲北甯�","value":"371083"}],[{"label":"涓滄腐鍖�","value":"371102"},{"label":"宀氬北鍖�","value":"371103"},{"label":"浜旇幉鍘�","value":"371121"},{"label":"鑾掑幙","value":"371122"},{"label":"鏃ョ収缁忔祹鎶�鏈紑鍙戝尯","value":"371171"},{"label":"鏃ョ収鍥介檯娴锋磱鍩�","value":"371172"}],[{"label":"鑾卞煄鍖�","value":"371202"},{"label":"閽㈠煄鍖�","value":"371203"}],[{"label":"鍏板北鍖�","value":"371302"},{"label":"缃楀簞鍖�","value":"371311"},{"label":"娌充笢鍖�","value":"371312"},{"label":"娌傚崡鍘�","value":"371321"},{"label":"閮煄鍘�","value":"371322"},{"label":"娌傛按鍘�","value":"371323"},{"label":"鍏伴櫟鍘�","value":"371324"},{"label":"璐瑰幙","value":"371325"},{"label":"骞抽倯鍘�","value":"371326"},{"label":"鑾掑崡鍘�","value":"371327"},{"label":"钂欓槾鍘�","value":"371328"},{"label":"涓存箔鍘�","value":"371329"},{"label":"涓存矀楂樻柊鎶�鏈骇涓氬紑鍙戝尯","value":"371371"},{"label":"涓存矀缁忔祹鎶�鏈紑鍙戝尯","value":"371372"},{"label":"涓存矀涓存腐缁忔祹寮�鍙戝尯","value":"371373"}],[{"label":"寰峰煄鍖�","value":"371402"},{"label":"闄靛煄鍖�","value":"371403"},{"label":"瀹佹触鍘�","value":"371422"},{"label":"搴嗕簯鍘�","value":"371423"},{"label":"涓撮倯鍘�","value":"371424"},{"label":"榻愭渤鍘�","value":"371425"},{"label":"骞冲師鍘�","value":"371426"},{"label":"澶忔触鍘�","value":"371427"},{"label":"姝﹀煄鍘�","value":"371428"},{"label":"寰峰窞缁忔祹鎶�鏈紑鍙戝尯","value":"371471"},{"label":"寰峰窞杩愭渤缁忔祹寮�鍙戝尯","value":"371472"},{"label":"涔愰櫟甯�","value":"371481"},{"label":"绂瑰煄甯�","value":"371482"}],[{"label":"涓滄槍搴滃尯","value":"371502"},{"label":"闃宠胺鍘�","value":"371521"},{"label":"鑾樺幙","value":"371522"},{"label":"鑼屽钩鍘�","value":"371523"},{"label":"涓滈樋鍘�","value":"371524"},{"label":"鍐犲幙","value":"371525"},{"label":"楂樺攼鍘�","value":"371526"},{"label":"涓存竻甯�","value":"371581"}],[{"label":"婊ㄥ煄鍖�","value":"371602"},{"label":"娌惧寲鍖�","value":"371603"},{"label":"鎯犳皯鍘�","value":"371621"},{"label":"闃充俊鍘�","value":"371622"},{"label":"鏃犳#鍘�","value":"371623"},{"label":"鍗氬叴鍘�","value":"371625"},{"label":"閭瑰钩鍘�","value":"371626"}],[{"label":"鐗′腹鍖�","value":"371702"},{"label":"瀹氶櫠鍖�","value":"371703"},{"label":"鏇瑰幙","value":"371721"},{"label":"鍗曞幙","value":"371722"},{"label":"鎴愭鍘�","value":"371723"},{"label":"宸ㄩ噹鍘�","value":"371724"},{"label":"閮撳煄鍘�","value":"371725"},{"label":"閯勫煄鍘�","value":"371726"},{"label":"涓滄槑鍘�","value":"371728"},{"label":"鑿忔辰缁忔祹鎶�鏈紑鍙戝尯","value":"371771"},{"label":"鑿忔辰楂樻柊鎶�鏈紑鍙戝尯","value":"371772"}]],[[{"label":"涓師鍖�","value":"410102"},{"label":"浜屼竷鍖�","value":"410103"},{"label":"绠″煄鍥炴棌鍖�","value":"410104"},{"label":"閲戞按鍖�","value":"410105"},{"label":"涓婅鍖�","value":"410106"},{"label":"鎯犳祹鍖�","value":"410108"},{"label":"涓墴鍘�","value":"410122"},{"label":"閮戝窞缁忔祹鎶�鏈紑鍙戝尯","value":"410171"},{"label":"閮戝窞楂樻柊鎶�鏈骇涓氬紑鍙戝尯","value":"410172"},{"label":"閮戝窞鑸┖娓粡娴庣患鍚堝疄楠屽尯","value":"410173"},{"label":"宸╀箟甯�","value":"410181"},{"label":"鑽ラ槼甯�","value":"410182"},{"label":"鏂板瘑甯�","value":"410183"},{"label":"鏂伴儜甯�","value":"410184"},{"label":"鐧诲皝甯�","value":"410185"}],[{"label":"榫欎涵鍖�","value":"410202"},{"label":"椤烘渤鍥炴棌鍖�","value":"410203"},{"label":"榧撴ゼ鍖�","value":"410204"},{"label":"绂圭帇鍙板尯","value":"410205"},{"label":"绁ョ鍖�","value":"410212"},{"label":"鏉炲幙","value":"410221"},{"label":"閫氳鍘�","value":"410222"},{"label":"灏夋皬鍘�","value":"410223"},{"label":"鍏拌�冨幙","value":"410225"}],[{"label":"鑰佸煄鍖�","value":"410302"},{"label":"瑗垮伐鍖�","value":"410303"},{"label":"鐎嶆渤鍥炴棌鍖�","value":"410304"},{"label":"娑цタ鍖�","value":"410305"},{"label":"鍚夊埄鍖�","value":"410306"},{"label":"娲涢緳鍖�","value":"410311"},{"label":"瀛熸触鍘�","value":"410322"},{"label":"鏂板畨鍘�","value":"410323"},{"label":"鏍惧窛鍘�","value":"410324"},{"label":"宓╁幙","value":"410325"},{"label":"姹濋槼鍘�","value":"410326"},{"label":"瀹滈槼鍘�","value":"410327"},{"label":"娲涘畞鍘�","value":"410328"},{"label":"浼婂窛鍘�","value":"410329"},{"label":"娲涢槼楂樻柊鎶�鏈骇涓氬紑鍙戝尯","value":"410371"},{"label":"鍋冨笀甯�","value":"410381"}],[{"label":"鏂板崕鍖�","value":"410402"},{"label":"鍗笢鍖�","value":"410403"},{"label":"鐭抽緳鍖�","value":"410404"},{"label":"婀涙渤鍖�","value":"410411"},{"label":"瀹濅赴鍘�","value":"410421"},{"label":"鍙跺幙","value":"410422"},{"label":"椴佸北鍘�","value":"410423"},{"label":"閮忓幙","value":"410425"},{"label":"骞抽《灞遍珮鏂版妧鏈骇涓氬紑鍙戝尯","value":"410471"},{"label":"骞抽《灞卞競鏂板煄鍖�","value":"410472"},{"label":"鑸為挗甯�","value":"410481"},{"label":"姹濆窞甯�","value":"410482"}],[{"label":"鏂囧嘲鍖�","value":"410502"},{"label":"鍖楀叧鍖�","value":"410503"},{"label":"娈烽兘鍖�","value":"410505"},{"label":"榫欏畨鍖�","value":"410506"},{"label":"瀹夐槼鍘�","value":"410522"},{"label":"姹ら槾鍘�","value":"410523"},{"label":"婊戝幙","value":"410526"},{"label":"鍐呴粍鍘�","value":"410527"},{"label":"瀹夐槼楂樻柊鎶�鏈骇涓氬紑鍙戝尯","value":"410571"},{"label":"鏋楀窞甯�","value":"410581"}],[{"label":"楣ゅ北鍖�","value":"410602"},{"label":"灞卞煄鍖�","value":"410603"},{"label":"娣囨花鍖�","value":"410611"},{"label":"娴氬幙","value":"410621"},{"label":"娣囧幙","value":"410622"},{"label":"楣ゅ缁忔祹鎶�鏈紑鍙戝尯","value":"410671"}],[{"label":"绾㈡棗鍖�","value":"410702"},{"label":"鍗花鍖�","value":"410703"},{"label":"鍑ゆ硥鍖�","value":"410704"},{"label":"鐗ч噹鍖�","value":"410711"},{"label":"鏂颁埂鍘�","value":"410721"},{"label":"鑾峰槈鍘�","value":"410724"},{"label":"鍘熼槼鍘�","value":"410725"},{"label":"寤舵触鍘�","value":"410726"},{"label":"灏佷笜鍘�","value":"410727"},{"label":"闀垮灒鍘�","value":"410728"},{"label":"鏂颁埂楂樻柊鎶�鏈骇涓氬紑鍙戝尯","value":"410771"},{"label":"鏂颁埂缁忔祹鎶�鏈紑鍙戝尯","value":"410772"},{"label":"鏂颁埂甯傚钩鍘熷煄涔′竴浣撳寲绀鸿寖鍖�","value":"410773"},{"label":"鍗緣甯�","value":"410781"},{"label":"杈夊幙甯�","value":"410782"}],[{"label":"瑙f斁鍖�","value":"410802"},{"label":"涓珯鍖�","value":"410803"},{"label":"椹潙鍖�","value":"410804"},{"label":"灞遍槼鍖�","value":"410811"},{"label":"淇鍘�","value":"410821"},{"label":"鍗氱埍鍘�","value":"410822"},{"label":"姝﹂櫉鍘�","value":"410823"},{"label":"娓╁幙","value":"410825"},{"label":"鐒︿綔鍩庝埂涓�浣撳寲绀鸿寖鍖�","value":"410871"},{"label":"娌侀槼甯�","value":"410882"},{"label":"瀛熷窞甯�","value":"410883"}],[{"label":"鍗庨緳鍖�","value":"410902"},{"label":"娓呬赴鍘�","value":"410922"},{"label":"鍗椾箰鍘�","value":"410923"},{"label":"鑼冨幙","value":"410926"},{"label":"鍙板墠鍘�","value":"410927"},{"label":"婵槼鍘�","value":"410928"},{"label":"娌冲崡婵槼宸ヤ笟鍥尯","value":"410971"},{"label":"婵槼缁忔祹鎶�鏈紑鍙戝尯","value":"410972"}],[{"label":"榄忛兘鍖�","value":"411002"},{"label":"寤哄畨鍖�","value":"411003"},{"label":"閯㈤櫟鍘�","value":"411024"},{"label":"瑗勫煄鍘�","value":"411025"},{"label":"璁告槍缁忔祹鎶�鏈紑鍙戝尯","value":"411071"},{"label":"绂瑰窞甯�","value":"411081"},{"label":"闀胯憶甯�","value":"411082"}],[{"label":"婧愭眹鍖�","value":"411102"},{"label":"閮惧煄鍖�","value":"411103"},{"label":"鍙櫟鍖�","value":"411104"},{"label":"鑸為槼鍘�","value":"411121"},{"label":"涓撮鍘�","value":"411122"},{"label":"婕渤缁忔祹鎶�鏈紑鍙戝尯","value":"411171"}],[{"label":"婀栨花鍖�","value":"411202"},{"label":"闄曞窞鍖�","value":"411203"},{"label":"娓戞睜鍘�","value":"411221"},{"label":"鍗㈡皬鍘�","value":"411224"},{"label":"娌冲崡涓夐棬宄$粡娴庡紑鍙戝尯","value":"411271"},{"label":"涔夐┈甯�","value":"411281"},{"label":"鐏靛疂甯�","value":"411282"}],[{"label":"瀹涘煄鍖�","value":"411302"},{"label":"鍗ч緳鍖�","value":"411303"},{"label":"鍗楀彫鍘�","value":"411321"},{"label":"鏂瑰煄鍘�","value":"411322"},{"label":"瑗垮场鍘�","value":"411323"},{"label":"闀囧钩鍘�","value":"411324"},{"label":"鍐呬埂鍘�","value":"411325"},{"label":"娣呭窛鍘�","value":"411326"},{"label":"绀炬棗鍘�","value":"411327"},{"label":"鍞愭渤鍘�","value":"411328"},{"label":"鏂伴噹鍘�","value":"411329"},{"label":"妗愭煆鍘�","value":"411330"},{"label":"鍗楅槼楂樻柊鎶�鏈骇涓氬紑鍙戝尯","value":"411371"},{"label":"鍗楅槼甯傚煄涔′竴浣撳寲绀鸿寖鍖�","value":"411372"},{"label":"閭撳窞甯�","value":"411381"}],[{"label":"姊佸洯鍖�","value":"411402"},{"label":"鐫㈤槼鍖�","value":"411403"},{"label":"姘戞潈鍘�","value":"411421"},{"label":"鐫㈠幙","value":"411422"},{"label":"瀹侀櫟鍘�","value":"411423"},{"label":"鏌樺煄鍘�","value":"411424"},{"label":"铏炲煄鍘�","value":"411425"},{"label":"澶忛倯鍘�","value":"411426"},{"label":"璞笢缁煎悎鐗╂祦浜т笟鑱氶泦鍖�","value":"411471"},{"label":"娌冲崡鍟嗕笜缁忔祹寮�鍙戝尯","value":"411472"},{"label":"姘稿煄甯�","value":"411481"}],[{"label":"娴夋渤鍖�","value":"411502"},{"label":"骞虫ˉ鍖�","value":"411503"},{"label":"缃楀北鍘�","value":"411521"},{"label":"鍏夊北鍘�","value":"411522"},{"label":"鏂板幙","value":"411523"},{"label":"鍟嗗煄鍘�","value":"411524"},{"label":"鍥哄鍘�","value":"411525"},{"label":"娼㈠窛鍘�","value":"411526"},{"label":"娣花鍘�","value":"411527"},{"label":"鎭幙","value":"411528"},{"label":"淇¢槼楂樻柊鎶�鏈骇涓氬紑鍙戝尯","value":"411571"}],[{"label":"宸濇眹鍖�","value":"411602"},{"label":"鎵舵矡鍘�","value":"411621"},{"label":"瑗垮崕鍘�","value":"411622"},{"label":"鍟嗘按鍘�","value":"411623"},{"label":"娌堜笜鍘�","value":"411624"},{"label":"閮稿煄鍘�","value":"411625"},{"label":"娣槼鍘�","value":"411626"},{"label":"澶悍鍘�","value":"411627"},{"label":"楣块倯鍘�","value":"411628"},{"label":"娌冲崡鍛ㄥ彛缁忔祹寮�鍙戝尯","value":"411671"},{"label":"椤瑰煄甯�","value":"411681"}],[{"label":"椹垮煄鍖�","value":"411702"},{"label":"瑗垮钩鍘�","value":"411721"},{"label":"涓婅敗鍘�","value":"411722"},{"label":"骞宠垎鍘�","value":"411723"},{"label":"姝i槼鍘�","value":"411724"},{"label":"纭北鍘�","value":"411725"},{"label":"娉岄槼鍘�","value":"411726"},{"label":"姹濆崡鍘�","value":"411727"},{"label":"閬傚钩鍘�","value":"411728"},{"label":"鏂拌敗鍘�","value":"411729"},{"label":"娌冲崡椹婚┈搴楃粡娴庡紑鍙戝尯","value":"411771"}],[{"label":"娴庢簮甯�","value":"419001"}]],[[{"label":"姹熷哺鍖�","value":"420102"},{"label":"姹熸眽鍖�","value":"420103"},{"label":"纭氬彛鍖�","value":"420104"},{"label":"姹夐槼鍖�","value":"420105"},{"label":"姝︽槍鍖�","value":"420106"},{"label":"闈掑北鍖�","value":"420107"},{"label":"娲北鍖�","value":"420111"},{"label":"涓滆タ婀栧尯","value":"420112"},{"label":"姹夊崡鍖�","value":"420113"},{"label":"钄$敻鍖�","value":"420114"},{"label":"姹熷鍖�","value":"420115"},{"label":"榛勯檪鍖�","value":"420116"},{"label":"鏂版床鍖�","value":"420117"}],[{"label":"榛勭煶娓尯","value":"420202"},{"label":"瑗垮灞卞尯","value":"420203"},{"label":"涓嬮檰鍖�","value":"420204"},{"label":"閾佸北鍖�","value":"420205"},{"label":"闃虫柊鍘�","value":"420222"},{"label":"澶у喍甯�","value":"420281"}],[{"label":"鑼呯鍖�","value":"420302"},{"label":"寮犳咕鍖�","value":"420303"},{"label":"閮ч槼鍖�","value":"420304"},{"label":"閮цタ鍘�","value":"420322"},{"label":"绔瑰北鍘�","value":"420323"},{"label":"绔规邯鍘�","value":"420324"},{"label":"鎴垮幙","value":"420325"},{"label":"涓规睙鍙e競","value":"420381"}],[{"label":"瑗块櫟鍖�","value":"420502"},{"label":"浼嶅宀楀尯","value":"420503"},{"label":"鐐瑰啗鍖�","value":"420504"},{"label":"鐚囦涵鍖�","value":"420505"},{"label":"澶烽櫟鍖�","value":"420506"},{"label":"杩滃畨鍘�","value":"420525"},{"label":"鍏村北鍘�","value":"420526"},{"label":"绉綊鍘�","value":"420527"},{"label":"闀块槼鍦熷鏃忚嚜娌诲幙","value":"420528"},{"label":"浜斿嘲鍦熷鏃忚嚜娌诲幙","value":"420529"},{"label":"瀹滈兘甯�","value":"420581"},{"label":"褰撻槼甯�","value":"420582"},{"label":"鏋濇睙甯�","value":"420583"}],[{"label":"瑗勫煄鍖�","value":"420602"},{"label":"妯婂煄鍖�","value":"420606"},{"label":"瑗勫窞鍖�","value":"420607"},{"label":"鍗楁汲鍘�","value":"420624"},{"label":"璋峰煄鍘�","value":"420625"},{"label":"淇濆悍鍘�","value":"420626"},{"label":"鑰佹渤鍙e競","value":"420682"},{"label":"鏋i槼甯�","value":"420683"},{"label":"瀹滃煄甯�","value":"420684"}],[{"label":"姊佸瓙婀栧尯","value":"420702"},{"label":"鍗庡鍖�","value":"420703"},{"label":"閯傚煄鍖�","value":"420704"}],[{"label":"涓滃疂鍖�","value":"420802"},{"label":"鎺囧垁鍖�","value":"420804"},{"label":"浜北鍘�","value":"420821"},{"label":"娌欐磱鍘�","value":"420822"},{"label":"閽熺ゥ甯�","value":"420881"}],[{"label":"瀛濆崡鍖�","value":"420902"},{"label":"瀛濇槍鍘�","value":"420921"},{"label":"澶ф偀鍘�","value":"420922"},{"label":"浜戞ⅵ鍘�","value":"420923"},{"label":"搴斿煄甯�","value":"420981"},{"label":"瀹夐檰甯�","value":"420982"},{"label":"姹夊窛甯�","value":"420984"}],[{"label":"娌欏競鍖�","value":"421002"},{"label":"鑽嗗窞鍖�","value":"421003"},{"label":"鍏畨鍘�","value":"421022"},{"label":"鐩戝埄鍘�","value":"421023"},{"label":"姹熼櫟鍘�","value":"421024"},{"label":"鑽嗗窞缁忔祹鎶�鏈紑鍙戝尯","value":"421071"},{"label":"鐭抽甯�","value":"421081"},{"label":"娲箹甯�","value":"421083"},{"label":"鏉炬粙甯�","value":"421087"}],[{"label":"榛勫窞鍖�","value":"421102"},{"label":"鍥㈤鍘�","value":"421121"},{"label":"绾㈠畨鍘�","value":"421122"},{"label":"缃楃敯鍘�","value":"421123"},{"label":"鑻卞北鍘�","value":"421124"},{"label":"娴犳按鍘�","value":"421125"},{"label":"钑叉槬鍘�","value":"421126"},{"label":"榛勬鍘�","value":"421127"},{"label":"榫欐劅婀栫鐞嗗尯","value":"421171"},{"label":"楹诲煄甯�","value":"421181"},{"label":"姝︾┐甯�","value":"421182"}],[{"label":"鍜稿畨鍖�","value":"421202"},{"label":"鍢夐奔鍘�","value":"421221"},{"label":"閫氬煄鍘�","value":"421222"},{"label":"宕囬槼鍘�","value":"421223"},{"label":"閫氬北鍘�","value":"421224"},{"label":"璧ゅ甯�","value":"421281"}],[{"label":"鏇鹃兘鍖�","value":"421303"},{"label":"闅忓幙","value":"421321"},{"label":"骞挎按甯�","value":"421381"}],[{"label":"鎭╂柦甯�","value":"422801"},{"label":"鍒╁窛甯�","value":"422802"},{"label":"寤哄鍘�","value":"422822"},{"label":"宸翠笢鍘�","value":"422823"},{"label":"瀹f仼鍘�","value":"422825"},{"label":"鍜镐赴鍘�","value":"422826"},{"label":"鏉ュ嚖鍘�","value":"422827"},{"label":"楣ゅ嘲鍘�","value":"422828"}],[{"label":"浠欐甯�","value":"429004"},{"label":"娼滄睙甯�","value":"429005"},{"label":"澶╅棬甯�","value":"429006"},{"label":"绁炲啘鏋舵灄鍖�","value":"429021"}]],[[{"label":"鑺欒搲鍖�","value":"430102"},{"label":"澶╁績鍖�","value":"430103"},{"label":"宀抽簱鍖�","value":"430104"},{"label":"寮�绂忓尯","value":"430105"},{"label":"闆ㄨ姳鍖�","value":"430111"},{"label":"鏈涘煄鍖�","value":"430112"},{"label":"闀挎矙鍘�","value":"430121"},{"label":"娴忛槼甯�","value":"430181"},{"label":"瀹佷埂甯�","value":"430182"}],[{"label":"鑽峰鍖�","value":"430202"},{"label":"鑺︽窞鍖�","value":"430203"},{"label":"鐭冲嘲鍖�","value":"430204"},{"label":"澶╁厓鍖�","value":"430211"},{"label":"鏍床鍘�","value":"430221"},{"label":"鏀稿幙","value":"430223"},{"label":"鑼堕櫟鍘�","value":"430224"},{"label":"鐐庨櫟鍘�","value":"430225"},{"label":"浜戦緳绀鸿寖鍖�","value":"430271"},{"label":"閱撮櫟甯�","value":"430281"}],[{"label":"闆ㄦ箹鍖�","value":"430302"},{"label":"宀冲鍖�","value":"430304"},{"label":"婀樻江鍘�","value":"430321"},{"label":"婀栧崡婀樻江楂樻柊鎶�鏈骇涓氬洯鍖�","value":"430371"},{"label":"婀樻江鏄北绀鸿寖鍖�","value":"430372"},{"label":"婀樻江涔濆崕绀鸿寖鍖�","value":"430373"},{"label":"婀樹埂甯�","value":"430381"},{"label":"闊跺北甯�","value":"430382"}],[{"label":"鐝犳櫀鍖�","value":"430405"},{"label":"闆佸嘲鍖�","value":"430406"},{"label":"鐭抽紦鍖�","value":"430407"},{"label":"钂告箻鍖�","value":"430408"},{"label":"鍗楀渤鍖�","value":"430412"},{"label":"琛¢槼鍘�","value":"430421"},{"label":"琛″崡鍘�","value":"430422"},{"label":"琛″北鍘�","value":"430423"},{"label":"琛′笢鍘�","value":"430424"},{"label":"绁佷笢鍘�","value":"430426"},{"label":"琛¢槼缁煎悎淇濈◣鍖�","value":"430471"},{"label":"婀栧崡琛¢槼楂樻柊鎶�鏈骇涓氬洯鍖�","value":"430472"},{"label":"婀栧崡琛¢槼鏉炬湪缁忔祹寮�鍙戝尯","value":"430473"},{"label":"鑰掗槼甯�","value":"430481"},{"label":"甯稿畞甯�","value":"430482"}],[{"label":"鍙屾竻鍖�","value":"430502"},{"label":"澶хゥ鍖�","value":"430503"},{"label":"鍖楀鍖�","value":"430511"},{"label":"閭典笢鍘�","value":"430521"},{"label":"鏂伴偟鍘�","value":"430522"},{"label":"閭甸槼鍘�","value":"430523"},{"label":"闅嗗洖鍘�","value":"430524"},{"label":"娲炲彛鍘�","value":"430525"},{"label":"缁ュ畞鍘�","value":"430527"},{"label":"鏂板畞鍘�","value":"430528"},{"label":"鍩庢鑻楁棌鑷不鍘�","value":"430529"},{"label":"姝﹀唸甯�","value":"430581"}],[{"label":"宀抽槼妤煎尯","value":"430602"},{"label":"浜戞邯鍖�","value":"430603"},{"label":"鍚涘北鍖�","value":"430611"},{"label":"宀抽槼鍘�","value":"430621"},{"label":"鍗庡鍘�","value":"430623"},{"label":"婀橀槾鍘�","value":"430624"},{"label":"骞虫睙鍘�","value":"430626"},{"label":"宀抽槼甯傚眻鍘熺鐞嗗尯","value":"430671"},{"label":"姹ㄧ綏甯�","value":"430681"},{"label":"涓存箻甯�","value":"430682"}],[{"label":"姝﹂櫟鍖�","value":"430702"},{"label":"榧庡煄鍖�","value":"430703"},{"label":"瀹変埂鍘�","value":"430721"},{"label":"姹夊鍘�","value":"430722"},{"label":"婢у幙","value":"430723"},{"label":"涓存晶鍘�","value":"430724"},{"label":"妗冩簮鍘�","value":"430725"},{"label":"鐭抽棬鍘�","value":"430726"},{"label":"甯稿痉甯傝タ娲炲涵绠$悊鍖�","value":"430771"},{"label":"娲ュ競甯�","value":"430781"}],[{"label":"姘稿畾鍖�","value":"430802"},{"label":"姝﹂櫟婧愬尯","value":"430811"},{"label":"鎱堝埄鍘�","value":"430821"},{"label":"妗戞鍘�","value":"430822"}],[{"label":"璧勯槼鍖�","value":"430902"},{"label":"璧北鍖�","value":"430903"},{"label":"鍗楀幙","value":"430921"},{"label":"妗冩睙鍘�","value":"430922"},{"label":"瀹夊寲鍘�","value":"430923"},{"label":"鐩婇槼甯傚ぇ閫氭箹绠$悊鍖�","value":"430971"},{"label":"婀栧崡鐩婇槼楂樻柊鎶�鏈骇涓氬洯鍖�","value":"430972"},{"label":"娌呮睙甯�","value":"430981"}],[{"label":"鍖楁箹鍖�","value":"431002"},{"label":"鑻忎粰鍖�","value":"431003"},{"label":"妗傞槼鍘�","value":"431021"},{"label":"瀹滅珷鍘�","value":"431022"},{"label":"姘稿叴鍘�","value":"431023"},{"label":"鍢夌鍘�","value":"431024"},{"label":"涓存鍘�","value":"431025"},{"label":"姹濆煄鍘�","value":"431026"},{"label":"妗備笢鍘�","value":"431027"},{"label":"瀹変粊鍘�","value":"431028"},{"label":"璧勫叴甯�","value":"431081"}],[{"label":"闆堕櫟鍖�","value":"431102"},{"label":"鍐锋按婊╁尯","value":"431103"},{"label":"绁侀槼鍘�","value":"431121"},{"label":"涓滃畨鍘�","value":"431122"},{"label":"鍙岀墝鍘�","value":"431123"},{"label":"閬撳幙","value":"431124"},{"label":"姹熸案鍘�","value":"431125"},{"label":"瀹佽繙鍘�","value":"431126"},{"label":"钃濆北鍘�","value":"431127"},{"label":"鏂扮敯鍘�","value":"431128"},{"label":"姹熷崕鐟舵棌鑷不鍘�","value":"431129"},{"label":"姘稿窞缁忔祹鎶�鏈紑鍙戝尯","value":"431171"},{"label":"姘稿窞甯傞噾娲炵鐞嗗尯","value":"431172"},{"label":"姘稿窞甯傚洖榫欏湬绠$悊鍖�","value":"431173"}],[{"label":"楣ゅ煄鍖�","value":"431202"},{"label":"涓柟鍘�","value":"431221"},{"label":"娌呴櫟鍘�","value":"431222"},{"label":"杈版邯鍘�","value":"431223"},{"label":"婧嗘郸鍘�","value":"431224"},{"label":"浼氬悓鍘�","value":"431225"},{"label":"楹婚槼鑻楁棌鑷不鍘�","value":"431226"},{"label":"鏂版檭渚楁棌鑷不鍘�","value":"431227"},{"label":"鑺锋睙渚楁棌鑷不鍘�","value":"431228"},{"label":"闈栧窞鑻楁棌渚楁棌鑷不鍘�","value":"431229"},{"label":"閫氶亾渚楁棌鑷不鍘�","value":"431230"},{"label":"鎬�鍖栧競娲睙绠$悊鍖�","value":"431271"},{"label":"娲睙甯�","value":"431281"}],[{"label":"濞勬槦鍖�","value":"431302"},{"label":"鍙屽嘲鍘�","value":"431321"},{"label":"鏂板寲鍘�","value":"431322"},{"label":"鍐锋按姹熷競","value":"431381"},{"label":"娑熸簮甯�","value":"431382"}],[{"label":"鍚夐甯�","value":"433101"},{"label":"娉告邯鍘�","value":"433122"},{"label":"鍑ゅ嚢鍘�","value":"433123"},{"label":"鑺卞灒鍘�","value":"433124"},{"label":"淇濋潠鍘�","value":"433125"},{"label":"鍙や笀鍘�","value":"433126"},{"label":"姘搁『鍘�","value":"433127"},{"label":"榫欏北鍘�","value":"433130"},{"label":"婀栧崡鍚夐缁忔祹寮�鍙戝尯","value":"433172"},{"label":"婀栧崡姘搁『缁忔祹寮�鍙戝尯","value":"433173"}]],[[{"label":"鑽旀咕鍖�","value":"440103"},{"label":"瓒婄鍖�","value":"440104"},{"label":"娴风彔鍖�","value":"440105"},{"label":"澶╂渤鍖�","value":"440106"},{"label":"鐧戒簯鍖�","value":"440111"},{"label":"榛勫煍鍖�","value":"440112"},{"label":"鐣鍖�","value":"440113"},{"label":"鑺遍兘鍖�","value":"440114"},{"label":"鍗楁矙鍖�","value":"440115"},{"label":"浠庡寲鍖�","value":"440117"},{"label":"澧炲煄鍖�","value":"440118"}],[{"label":"姝︽睙鍖�","value":"440203"},{"label":"娴堟睙鍖�","value":"440204"},{"label":"鏇叉睙鍖�","value":"440205"},{"label":"濮嬪叴鍘�","value":"440222"},{"label":"浠佸寲鍘�","value":"440224"},{"label":"缈佹簮鍘�","value":"440229"},{"label":"涔虫簮鐟舵棌鑷不鍘�","value":"440232"},{"label":"鏂颁赴鍘�","value":"440233"},{"label":"涔愭槍甯�","value":"440281"},{"label":"鍗楅泟甯�","value":"440282"}],[{"label":"缃楁箹鍖�","value":"440303"},{"label":"绂忕敯鍖�","value":"440304"},{"label":"鍗楀北鍖�","value":"440305"},{"label":"瀹濆畨鍖�","value":"440306"},{"label":"榫欏矖鍖�","value":"440307"},{"label":"鐩愮敯鍖�","value":"440308"},{"label":"榫欏崕鍖�","value":"440309"},{"label":"鍧北鍖�","value":"440310"}],[{"label":"棣欐床鍖�","value":"440402"},{"label":"鏂楅棬鍖�","value":"440403"},{"label":"閲戞咕鍖�","value":"440404"}],[{"label":"榫欐箹鍖�","value":"440507"},{"label":"閲戝钩鍖�","value":"440511"},{"label":"婵犳睙鍖�","value":"440512"},{"label":"娼槼鍖�","value":"440513"},{"label":"娼崡鍖�","value":"440514"},{"label":"婢勬捣鍖�","value":"440515"},{"label":"鍗楁境鍘�","value":"440523"}],[{"label":"绂呭煄鍖�","value":"440604"},{"label":"鍗楁捣鍖�","value":"440605"},{"label":"椤哄痉鍖�","value":"440606"},{"label":"涓夋按鍖�","value":"440607"},{"label":"楂樻槑鍖�","value":"440608"}],[{"label":"钃睙鍖�","value":"440703"},{"label":"姹熸捣鍖�","value":"440704"},{"label":"鏂颁細鍖�","value":"440705"},{"label":"鍙板北甯�","value":"440781"},{"label":"寮�骞冲競","value":"440783"},{"label":"楣ゅ北甯�","value":"440784"},{"label":"鎭╁钩甯�","value":"440785"}],[{"label":"璧ゅ潕鍖�","value":"440802"},{"label":"闇炲北鍖�","value":"440803"},{"label":"鍧″ご鍖�","value":"440804"},{"label":"楹荤珷鍖�","value":"440811"},{"label":"閬傛邯鍘�","value":"440823"},{"label":"寰愰椈鍘�","value":"440825"},{"label":"寤夋睙甯�","value":"440881"},{"label":"闆峰窞甯�","value":"440882"},{"label":"鍚村窛甯�","value":"440883"}],[{"label":"鑼傚崡鍖�","value":"440902"},{"label":"鐢电櫧鍖�","value":"440904"},{"label":"楂樺窞甯�","value":"440981"},{"label":"鍖栧窞甯�","value":"440982"},{"label":"淇″疁甯�","value":"440983"}],[{"label":"绔窞鍖�","value":"441202"},{"label":"榧庢箹鍖�","value":"441203"},{"label":"楂樿鍖�","value":"441204"},{"label":"骞垮畞鍘�","value":"441223"},{"label":"鎬�闆嗗幙","value":"441224"},{"label":"灏佸紑鍘�","value":"441225"},{"label":"寰峰簡鍘�","value":"441226"},{"label":"鍥涗細甯�","value":"441284"}],[{"label":"鎯犲煄鍖�","value":"441302"},{"label":"鎯犻槼鍖�","value":"441303"},{"label":"鍗氱綏鍘�","value":"441322"},{"label":"鎯犱笢鍘�","value":"441323"},{"label":"榫欓棬鍘�","value":"441324"}],[{"label":"姊呮睙鍖�","value":"441402"},{"label":"姊呭幙鍖�","value":"441403"},{"label":"澶у煍鍘�","value":"441422"},{"label":"涓伴『鍘�","value":"441423"},{"label":"浜斿崕鍘�","value":"441424"},{"label":"骞宠繙鍘�","value":"441426"},{"label":"钑夊箔鍘�","value":"441427"},{"label":"鍏村畞甯�","value":"441481"}],[{"label":"鍩庡尯","value":"441502"},{"label":"娴蜂赴鍘�","value":"441521"},{"label":"闄嗘渤鍘�","value":"441523"},{"label":"闄嗕赴甯�","value":"441581"}],[{"label":"婧愬煄鍖�","value":"441602"},{"label":"绱噾鍘�","value":"441621"},{"label":"榫欏窛鍘�","value":"441622"},{"label":"杩炲钩鍘�","value":"441623"},{"label":"鍜屽钩鍘�","value":"441624"},{"label":"涓滄簮鍘�","value":"441625"}],[{"label":"姹熷煄鍖�","value":"441702"},{"label":"闃充笢鍖�","value":"441704"},{"label":"闃宠タ鍘�","value":"441721"},{"label":"闃虫槬甯�","value":"441781"}],[{"label":"娓呭煄鍖�","value":"441802"},{"label":"娓呮柊鍖�","value":"441803"},{"label":"浣涘唸鍘�","value":"441821"},{"label":"闃冲北鍘�","value":"441823"},{"label":"杩炲北澹棌鐟舵棌鑷不鍘�","value":"441825"},{"label":"杩炲崡鐟舵棌鑷不鍘�","value":"441826"},{"label":"鑻卞痉甯�","value":"441881"},{"label":"杩炲窞甯�","value":"441882"}],[{"label":"涓滆帪甯�","value":"441900"}],[{"label":"涓北甯�","value":"442000"}],[{"label":"婀樻ˉ鍖�","value":"445102"},{"label":"娼畨鍖�","value":"445103"},{"label":"楗跺钩鍘�","value":"445122"}],[{"label":"姒曞煄鍖�","value":"445202"},{"label":"鎻笢鍖�","value":"445203"},{"label":"鎻タ鍘�","value":"445222"},{"label":"鎯犳潵鍘�","value":"445224"},{"label":"鏅畞甯�","value":"445281"}],[{"label":"浜戝煄鍖�","value":"445302"},{"label":"浜戝畨鍖�","value":"445303"},{"label":"鏂板叴鍘�","value":"445321"},{"label":"閮佸崡鍘�","value":"445322"},{"label":"缃楀畾甯�","value":"445381"}]],[[{"label":"鍏村畞鍖�","value":"450102"},{"label":"闈掔鍖�","value":"450103"},{"label":"姹熷崡鍖�","value":"450105"},{"label":"瑗夸埂濉樺尯","value":"450107"},{"label":"鑹簡鍖�","value":"450108"},{"label":"閭曞畞鍖�","value":"450109"},{"label":"姝﹂福鍖�","value":"450110"},{"label":"闅嗗畨鍘�","value":"450123"},{"label":"椹北鍘�","value":"450124"},{"label":"涓婃灄鍘�","value":"450125"},{"label":"瀹鹃槼鍘�","value":"450126"},{"label":"妯幙","value":"450127"}],[{"label":"鍩庝腑鍖�","value":"450202"},{"label":"楸煎嘲鍖�","value":"450203"},{"label":"鏌冲崡鍖�","value":"450204"},{"label":"鏌冲寳鍖�","value":"450205"},{"label":"鏌虫睙鍖�","value":"450206"},{"label":"鏌冲煄鍘�","value":"450222"},{"label":"楣垮鍘�","value":"450223"},{"label":"铻嶅畨鍘�","value":"450224"},{"label":"铻嶆按鑻楁棌鑷不鍘�","value":"450225"},{"label":"涓夋睙渚楁棌鑷不鍘�","value":"450226"}],[{"label":"绉�宄板尯","value":"450302"},{"label":"鍙犲僵鍖�","value":"450303"},{"label":"璞″北鍖�","value":"450304"},{"label":"涓冩槦鍖�","value":"450305"},{"label":"闆佸北鍖�","value":"450311"},{"label":"涓存鍖�","value":"450312"},{"label":"闃虫湐鍘�","value":"450321"},{"label":"鐏靛窛鍘�","value":"450323"},{"label":"鍏ㄥ窞鍘�","value":"450324"},{"label":"鍏村畨鍘�","value":"450325"},{"label":"姘哥鍘�","value":"450326"},{"label":"鐏岄槼鍘�","value":"450327"},{"label":"榫欒儨鍚勬棌鑷不鍘�","value":"450328"},{"label":"璧勬簮鍘�","value":"450329"},{"label":"骞充箰鍘�","value":"450330"},{"label":"鑽旀郸鍘�","value":"450331"},{"label":"鎭煄鐟舵棌鑷不鍘�","value":"450332"}],[{"label":"涓囩鍖�","value":"450403"},{"label":"闀挎床鍖�","value":"450405"},{"label":"榫欏湬鍖�","value":"450406"},{"label":"鑻嶆ⅶ鍘�","value":"450421"},{"label":"钘ゅ幙","value":"450422"},{"label":"钂欏北鍘�","value":"450423"},{"label":"宀戞邯甯�","value":"450481"}],[{"label":"娴峰煄鍖�","value":"450502"},{"label":"閾舵捣鍖�","value":"450503"},{"label":"閾佸北娓尯","value":"450512"},{"label":"鍚堟郸鍘�","value":"450521"}],[{"label":"娓彛鍖�","value":"450602"},{"label":"闃插煄鍖�","value":"450603"},{"label":"涓婃�濆幙","value":"450621"},{"label":"涓滃叴甯�","value":"450681"}],[{"label":"閽﹀崡鍖�","value":"450702"},{"label":"閽﹀寳鍖�","value":"450703"},{"label":"鐏靛北鍘�","value":"450721"},{"label":"娴﹀寳鍘�","value":"450722"}],[{"label":"娓寳鍖�","value":"450802"},{"label":"娓崡鍖�","value":"450803"},{"label":"瑕冨鍖�","value":"450804"},{"label":"骞冲崡鍘�","value":"450821"},{"label":"妗傚钩甯�","value":"450881"}],[{"label":"鐜夊窞鍖�","value":"450902"},{"label":"绂忕坏鍖�","value":"450903"},{"label":"瀹瑰幙","value":"450921"},{"label":"闄嗗窛鍘�","value":"450922"},{"label":"鍗氱櫧鍘�","value":"450923"},{"label":"鍏翠笟鍘�","value":"450924"},{"label":"鍖楁祦甯�","value":"450981"}],[{"label":"鍙虫睙鍖�","value":"451002"},{"label":"鐢伴槼鍘�","value":"451021"},{"label":"鐢颁笢鍘�","value":"451022"},{"label":"骞虫灉鍘�","value":"451023"},{"label":"寰蜂繚鍘�","value":"451024"},{"label":"閭e潯鍘�","value":"451026"},{"label":"鍑屼簯鍘�","value":"451027"},{"label":"涔愪笟鍘�","value":"451028"},{"label":"鐢版灄鍘�","value":"451029"},{"label":"瑗挎灄鍘�","value":"451030"},{"label":"闅嗘灄鍚勬棌鑷不鍘�","value":"451031"},{"label":"闈栬タ甯�","value":"451081"}],[{"label":"鍏鍖�","value":"451102"},{"label":"骞虫鍖�","value":"451103"},{"label":"鏄钩鍘�","value":"451121"},{"label":"閽熷北鍘�","value":"451122"},{"label":"瀵屽窛鐟舵棌鑷不鍘�","value":"451123"}],[{"label":"閲戝煄姹熷尯","value":"451202"},{"label":"瀹滃窞鍖�","value":"451203"},{"label":"鍗椾腹鍘�","value":"451221"},{"label":"澶╁敞鍘�","value":"451222"},{"label":"鍑ゅ北鍘�","value":"451223"},{"label":"涓滃叞鍘�","value":"451224"},{"label":"缃楀煄浠浆鏃忚嚜娌诲幙","value":"451225"},{"label":"鐜睙姣涘崡鏃忚嚜娌诲幙","value":"451226"},{"label":"宸撮┈鐟舵棌鑷不鍘�","value":"451227"},{"label":"閮藉畨鐟舵棌鑷不鍘�","value":"451228"},{"label":"澶у寲鐟舵棌鑷不鍘�","value":"451229"}],[{"label":"鍏村鍖�","value":"451302"},{"label":"蹇诲煄鍘�","value":"451321"},{"label":"璞″窞鍘�","value":"451322"},{"label":"姝﹀鍘�","value":"451323"},{"label":"閲戠鐟舵棌鑷不鍘�","value":"451324"},{"label":"鍚堝北甯�","value":"451381"}],[{"label":"姹熷窞鍖�","value":"451402"},{"label":"鎵剁互鍘�","value":"451421"},{"label":"瀹佹槑鍘�","value":"451422"},{"label":"榫欏窞鍘�","value":"451423"},{"label":"澶ф柊鍘�","value":"451424"},{"label":"澶╃瓑鍘�","value":"451425"},{"label":"鍑ゥ甯�","value":"451481"}]],[[{"label":"绉�鑻卞尯","value":"460105"},{"label":"榫欏崕鍖�","value":"460106"},{"label":"鐞煎北鍖�","value":"460107"},{"label":"缇庡叞鍖�","value":"460108"}],[{"label":"娴锋鍖�","value":"460202"},{"label":"鍚夐槼鍖�","value":"460203"},{"label":"澶╂动鍖�","value":"460204"},{"label":"宕栧窞鍖�","value":"460205"}],[{"label":"瑗挎矙缇ゅ矝","value":"460321"},{"label":"鍗楁矙缇ゅ矝","value":"460322"},{"label":"涓矙缇ゅ矝鐨勫矝绀佸強鍏舵捣鍩�","value":"460323"}],[{"label":"鍎嬪窞甯�","value":"460400"}],[{"label":"浜旀寚灞卞競","value":"469001"},{"label":"鐞兼捣甯�","value":"469002"},{"label":"鏂囨槍甯�","value":"469005"},{"label":"涓囧畞甯�","value":"469006"},{"label":"涓滄柟甯�","value":"469007"},{"label":"瀹氬畨鍘�","value":"469021"},{"label":"灞槍鍘�","value":"469022"},{"label":"婢勮繄鍘�","value":"469023"},{"label":"涓撮珮鍘�","value":"469024"},{"label":"鐧芥矙榛庢棌鑷不鍘�","value":"469025"},{"label":"鏄屾睙榛庢棌鑷不鍘�","value":"469026"},{"label":"涔愪笢榛庢棌鑷不鍘�","value":"469027"},{"label":"闄垫按榛庢棌鑷不鍘�","value":"469028"},{"label":"淇濅涵榛庢棌鑻楁棌鑷不鍘�","value":"469029"},{"label":"鐞间腑榛庢棌鑻楁棌鑷不鍘�","value":"469030"}]],[[{"label":"涓囧窞鍖�","value":"500101"},{"label":"娑櫟鍖�","value":"500102"},{"label":"娓濅腑鍖�","value":"500103"},{"label":"澶ф浮鍙e尯","value":"500104"},{"label":"姹熷寳鍖�","value":"500105"},{"label":"娌欏潽鍧濆尯","value":"500106"},{"label":"涔濋緳鍧″尯","value":"500107"},{"label":"鍗楀哺鍖�","value":"500108"},{"label":"鍖楃鍖�","value":"500109"},{"label":"缍︽睙鍖�","value":"500110"},{"label":"澶ц冻鍖�","value":"500111"},{"label":"娓濆寳鍖�","value":"500112"},{"label":"宸村崡鍖�","value":"500113"},{"label":"榛旀睙鍖�","value":"500114"},{"label":"闀垮鍖�","value":"500115"},{"label":"姹熸触鍖�","value":"500116"},{"label":"鍚堝窛鍖�","value":"500117"},{"label":"姘稿窛鍖�","value":"500118"},{"label":"鍗楀窛鍖�","value":"500119"},{"label":"鐠у北鍖�","value":"500120"},{"label":"閾滄鍖�","value":"500151"},{"label":"娼煎崡鍖�","value":"500152"},{"label":"鑽f槍鍖�","value":"500153"},{"label":"寮�宸炲尯","value":"500154"},{"label":"姊佸钩鍖�","value":"500155"},{"label":"姝﹂殕鍖�","value":"500156"}],[{"label":"鍩庡彛鍘�","value":"500229"},{"label":"涓伴兘鍘�","value":"500230"},{"label":"鍨睙鍘�","value":"500231"},{"label":"蹇犲幙","value":"500233"},{"label":"浜戦槼鍘�","value":"500235"},{"label":"濂夎妭鍘�","value":"500236"},{"label":"宸北鍘�","value":"500237"},{"label":"宸邯鍘�","value":"500238"},{"label":"鐭虫煴鍦熷鏃忚嚜娌诲幙","value":"500240"},{"label":"绉�灞卞湡瀹舵棌鑻楁棌鑷不鍘�","value":"500241"},{"label":"閰夐槼鍦熷鏃忚嫍鏃忚嚜娌诲幙","value":"500242"},{"label":"褰按鑻楁棌鍦熷鏃忚嚜娌诲幙","value":"500243"}]],[[{"label":"閿︽睙鍖�","value":"510104"},{"label":"闈掔緤鍖�","value":"510105"},{"label":"閲戠墰鍖�","value":"510106"},{"label":"姝︿警鍖�","value":"510107"},{"label":"鎴愬崕鍖�","value":"510108"},{"label":"榫欐硥椹垮尯","value":"510112"},{"label":"闈掔櫧姹熷尯","value":"510113"},{"label":"鏂伴兘鍖�","value":"510114"},{"label":"娓╂睙鍖�","value":"510115"},{"label":"鍙屾祦鍖�","value":"510116"},{"label":"閮兘鍖�","value":"510117"},{"label":"閲戝爞鍘�","value":"510121"},{"label":"澶ч倯鍘�","value":"510129"},{"label":"钂叉睙鍘�","value":"510131"},{"label":"鏂版触鍘�","value":"510132"},{"label":"閮芥睙鍫板競","value":"510181"},{"label":"褰窞甯�","value":"510182"},{"label":"閭涘磧甯�","value":"510183"},{"label":"宕囧窞甯�","value":"510184"},{"label":"绠�闃冲競","value":"510185"}],[{"label":"鑷祦浜曞尯","value":"510302"},{"label":"璐′簳鍖�","value":"510303"},{"label":"澶у畨鍖�","value":"510304"},{"label":"娌挎哗鍖�","value":"510311"},{"label":"鑽e幙","value":"510321"},{"label":"瀵岄『鍘�","value":"510322"}],[{"label":"涓滃尯","value":"510402"},{"label":"瑗垮尯","value":"510403"},{"label":"浠佸拰鍖�","value":"510411"},{"label":"绫虫槗鍘�","value":"510421"},{"label":"鐩愯竟鍘�","value":"510422"}],[{"label":"姹熼槼鍖�","value":"510502"},{"label":"绾虫邯鍖�","value":"510503"},{"label":"榫欓┈娼尯","value":"510504"},{"label":"娉稿幙","value":"510521"},{"label":"鍚堟睙鍘�","value":"510522"},{"label":"鍙欐案鍘�","value":"510524"},{"label":"鍙よ敽鍘�","value":"510525"}],[{"label":"鏃岄槼鍖�","value":"510603"},{"label":"缃楁睙鍖�","value":"510604"},{"label":"涓睙鍘�","value":"510623"},{"label":"骞挎眽甯�","value":"510681"},{"label":"浠�閭″競","value":"510682"},{"label":"缁电甯�","value":"510683"}],[{"label":"娑煄鍖�","value":"510703"},{"label":"娓镐粰鍖�","value":"510704"},{"label":"瀹夊窞鍖�","value":"510705"},{"label":"涓夊彴鍘�","value":"510722"},{"label":"鐩愪涵鍘�","value":"510723"},{"label":"姊撴郊鍘�","value":"510725"},{"label":"鍖楀窛缇屾棌鑷不鍘�","value":"510726"},{"label":"骞虫鍘�","value":"510727"},{"label":"姹熸补甯�","value":"510781"}],[{"label":"鍒╁窞鍖�","value":"510802"},{"label":"鏄寲鍖�","value":"510811"},{"label":"鏈濆ぉ鍖�","value":"510812"},{"label":"鏃鸿媿鍘�","value":"510821"},{"label":"闈掑窛鍘�","value":"510822"},{"label":"鍓戦榿鍘�","value":"510823"},{"label":"鑻嶆邯鍘�","value":"510824"}],[{"label":"鑸瑰北鍖�","value":"510903"},{"label":"瀹夊眳鍖�","value":"510904"},{"label":"钃邯鍘�","value":"510921"},{"label":"灏勬椽鍘�","value":"510922"},{"label":"澶ц嫳鍘�","value":"510923"}],[{"label":"甯備腑鍖�","value":"511002"},{"label":"涓滃叴鍖�","value":"511011"},{"label":"濞佽繙鍘�","value":"511024"},{"label":"璧勪腑鍘�","value":"511025"},{"label":"鍐呮睙缁忔祹寮�鍙戝尯","value":"511071"},{"label":"闅嗘槍甯�","value":"511083"}],[{"label":"甯備腑鍖�","value":"511102"},{"label":"娌欐咕鍖�","value":"511111"},{"label":"浜旈�氭ˉ鍖�","value":"511112"},{"label":"閲戝彛娌冲尯","value":"511113"},{"label":"鐘嶄负鍘�","value":"511123"},{"label":"浜曠爺鍘�","value":"511124"},{"label":"澶规睙鍘�","value":"511126"},{"label":"娌愬窛鍘�","value":"511129"},{"label":"宄ㄨ竟褰濇棌鑷不鍘�","value":"511132"},{"label":"椹竟褰濇棌鑷不鍘�","value":"511133"},{"label":"宄ㄧ湁灞卞競","value":"511181"}],[{"label":"椤哄簡鍖�","value":"511302"},{"label":"楂樺潽鍖�","value":"511303"},{"label":"鍢夐櫟鍖�","value":"511304"},{"label":"鍗楅儴鍘�","value":"511321"},{"label":"钀ュ北鍘�","value":"511322"},{"label":"钃畨鍘�","value":"511323"},{"label":"浠檱鍘�","value":"511324"},{"label":"瑗垮厖鍘�","value":"511325"},{"label":"闃嗕腑甯�","value":"511381"}],[{"label":"涓滃潯鍖�","value":"511402"},{"label":"褰北鍖�","value":"511403"},{"label":"浠佸鍘�","value":"511421"},{"label":"娲泤鍘�","value":"511423"},{"label":"涓规1鍘�","value":"511424"},{"label":"闈掔鍘�","value":"511425"}],[{"label":"缈犲睆鍖�","value":"511502"},{"label":"鍗楁邯鍖�","value":"511503"},{"label":"瀹滃鍘�","value":"511521"},{"label":"姹熷畨鍘�","value":"511523"},{"label":"闀垮畞鍘�","value":"511524"},{"label":"楂樺幙","value":"511525"},{"label":"鐝欏幙","value":"511526"},{"label":"绛犺繛鍘�","value":"511527"},{"label":"鍏存枃鍘�","value":"511528"},{"label":"灞忓北鍘�","value":"511529"}],[{"label":"骞垮畨鍖�","value":"511602"},{"label":"鍓嶉攱鍖�","value":"511603"},{"label":"宀虫睜鍘�","value":"511621"},{"label":"姝﹁儨鍘�","value":"511622"},{"label":"閭绘按鍘�","value":"511623"},{"label":"鍗庤摜甯�","value":"511681"}],[{"label":"閫氬窛鍖�","value":"511702"},{"label":"杈惧窛鍖�","value":"511703"},{"label":"瀹f眽鍘�","value":"511722"},{"label":"寮�姹熷幙","value":"511723"},{"label":"澶х鍘�","value":"511724"},{"label":"娓犲幙","value":"511725"},{"label":"杈惧窞缁忔祹寮�鍙戝尯","value":"511771"},{"label":"涓囨簮甯�","value":"511781"}],[{"label":"闆ㄥ煄鍖�","value":"511802"},{"label":"鍚嶅北鍖�","value":"511803"},{"label":"鑽ョ粡鍘�","value":"511822"},{"label":"姹夋簮鍘�","value":"511823"},{"label":"鐭虫鍘�","value":"511824"},{"label":"澶╁叏鍘�","value":"511825"},{"label":"鑺﹀北鍘�","value":"511826"},{"label":"瀹濆叴鍘�","value":"511827"}],[{"label":"宸村窞鍖�","value":"511902"},{"label":"鎭╅槼鍖�","value":"511903"},{"label":"閫氭睙鍘�","value":"511921"},{"label":"鍗楁睙鍘�","value":"511922"},{"label":"骞虫槍鍘�","value":"511923"},{"label":"宸翠腑缁忔祹寮�鍙戝尯","value":"511971"}],[{"label":"闆佹睙鍖�","value":"512002"},{"label":"瀹夊渤鍘�","value":"512021"},{"label":"涔愯嚦鍘�","value":"512022"}],[{"label":"椹皵搴峰競","value":"513201"},{"label":"姹跺窛鍘�","value":"513221"},{"label":"鐞嗗幙","value":"513222"},{"label":"鑼傚幙","value":"513223"},{"label":"鏉炬綐鍘�","value":"513224"},{"label":"涔濆娌熷幙","value":"513225"},{"label":"閲戝窛鍘�","value":"513226"},{"label":"灏忛噾鍘�","value":"513227"},{"label":"榛戞按鍘�","value":"513228"},{"label":"澹ゅ鍘�","value":"513230"},{"label":"闃垮潩鍘�","value":"513231"},{"label":"鑻ュ皵鐩栧幙","value":"513232"},{"label":"绾㈠師鍘�","value":"513233"}],[{"label":"搴峰畾甯�","value":"513301"},{"label":"娉稿畾鍘�","value":"513322"},{"label":"涓瑰反鍘�","value":"513323"},{"label":"涔濋緳鍘�","value":"513324"},{"label":"闆呮睙鍘�","value":"513325"},{"label":"閬撳瓪鍘�","value":"513326"},{"label":"鐐夐湇鍘�","value":"513327"},{"label":"鐢樺瓬鍘�","value":"513328"},{"label":"鏂伴緳鍘�","value":"513329"},{"label":"寰锋牸鍘�","value":"513330"},{"label":"鐧界帀鍘�","value":"513331"},{"label":"鐭虫笭鍘�","value":"513332"},{"label":"鑹茶揪鍘�","value":"513333"},{"label":"鐞嗗鍘�","value":"513334"},{"label":"宸村鍘�","value":"513335"},{"label":"涔″煄鍘�","value":"513336"},{"label":"绋诲煄鍘�","value":"513337"},{"label":"寰楄崳鍘�","value":"513338"}],[{"label":"瑗挎槍甯�","value":"513401"},{"label":"鏈ㄩ噷钘忔棌鑷不鍘�","value":"513422"},{"label":"鐩愭簮鍘�","value":"513423"},{"label":"寰锋槍鍘�","value":"513424"},{"label":"浼氱悊鍘�","value":"513425"},{"label":"浼氫笢鍘�","value":"513426"},{"label":"瀹佸崡鍘�","value":"513427"},{"label":"鏅牸鍘�","value":"513428"},{"label":"甯冩嫋鍘�","value":"513429"},{"label":"閲戦槼鍘�","value":"513430"},{"label":"鏄鍘�","value":"513431"},{"label":"鍠滃痉鍘�","value":"513432"},{"label":"鍐曞畞鍘�","value":"513433"},{"label":"瓒婅タ鍘�","value":"513434"},{"label":"鐢樻礇鍘�","value":"513435"},{"label":"缇庡鍘�","value":"513436"},{"label":"闆锋尝鍘�","value":"513437"}]],[[{"label":"鍗楁槑鍖�","value":"520102"},{"label":"浜戝博鍖�","value":"520103"},{"label":"鑺辨邯鍖�","value":"520111"},{"label":"涔屽綋鍖�","value":"520112"},{"label":"鐧戒簯鍖�","value":"520113"},{"label":"瑙傚北婀栧尯","value":"520115"},{"label":"寮�闃冲幙","value":"520121"},{"label":"鎭兘鍘�","value":"520122"},{"label":"淇枃鍘�","value":"520123"},{"label":"娓呴晣甯�","value":"520181"}],[{"label":"閽熷北鍖�","value":"520201"},{"label":"鍏灊鐗瑰尯","value":"520203"},{"label":"姘村煄鍘�","value":"520221"},{"label":"鐩樺窞甯�","value":"520281"}],[{"label":"绾㈣姳宀楀尯","value":"520302"},{"label":"姹囧窛鍖�","value":"520303"},{"label":"鎾窞鍖�","value":"520304"},{"label":"妗愭鍘�","value":"520322"},{"label":"缁ラ槼鍘�","value":"520323"},{"label":"姝e畨鍘�","value":"520324"},{"label":"閬撶湡浠′浆鏃忚嫍鏃忚嚜娌诲幙","value":"520325"},{"label":"鍔″窛浠′浆鏃忚嫍鏃忚嚜娌诲幙","value":"520326"},{"label":"鍑ゅ唸鍘�","value":"520327"},{"label":"婀勬江鍘�","value":"520328"},{"label":"浣欏簡鍘�","value":"520329"},{"label":"涔犳按鍘�","value":"520330"},{"label":"璧ゆ按甯�","value":"520381"},{"label":"浠佹��甯�","value":"520382"}],[{"label":"瑗跨鍖�","value":"520402"},{"label":"骞冲潩鍖�","value":"520403"},{"label":"鏅畾鍘�","value":"520422"},{"label":"闀囧畞甯冧緷鏃忚嫍鏃忚嚜娌诲幙","value":"520423"},{"label":"鍏冲箔甯冧緷鏃忚嫍鏃忚嚜娌诲幙","value":"520424"},{"label":"绱簯鑻楁棌甯冧緷鏃忚嚜娌诲幙","value":"520425"}],[{"label":"涓冩槦鍏冲尯","value":"520502"},{"label":"澶ф柟鍘�","value":"520521"},{"label":"榛旇タ鍘�","value":"520522"},{"label":"閲戞矙鍘�","value":"520523"},{"label":"缁囬噾鍘�","value":"520524"},{"label":"绾抽泹鍘�","value":"520525"},{"label":"濞佸畞褰濇棌鍥炴棌鑻楁棌鑷不鍘�","value":"520526"},{"label":"璧珷鍘�","value":"520527"}],[{"label":"纰ф睙鍖�","value":"520602"},{"label":"涓囧北鍖�","value":"520603"},{"label":"姹熷彛鍘�","value":"520621"},{"label":"鐜夊睆渚楁棌鑷不鍘�","value":"520622"},{"label":"鐭抽槨鍘�","value":"520623"},{"label":"鎬濆崡鍘�","value":"520624"},{"label":"鍗版睙鍦熷鏃忚嫍鏃忚嚜娌诲幙","value":"520625"},{"label":"寰锋睙鍘�","value":"520626"},{"label":"娌挎渤鍦熷鏃忚嚜娌诲幙","value":"520627"},{"label":"鏉炬鑻楁棌鑷不鍘�","value":"520628"}],[{"label":"鍏翠箟甯�","value":"522301"},{"label":"鍏翠粊鍘�","value":"522322"},{"label":"鏅畨鍘�","value":"522323"},{"label":"鏅撮殕鍘�","value":"522324"},{"label":"璐炰赴鍘�","value":"522325"},{"label":"鏈涜盁鍘�","value":"522326"},{"label":"鍐屼酣鍘�","value":"522327"},{"label":"瀹夐緳鍘�","value":"522328"}],[{"label":"鍑噷甯�","value":"522601"},{"label":"榛勫钩鍘�","value":"522622"},{"label":"鏂界鍘�","value":"522623"},{"label":"涓夌鍘�","value":"522624"},{"label":"闀囪繙鍘�","value":"522625"},{"label":"宀戝珐鍘�","value":"522626"},{"label":"澶╂煴鍘�","value":"522627"},{"label":"閿﹀睆鍘�","value":"522628"},{"label":"鍓戞渤鍘�","value":"522629"},{"label":"鍙版睙鍘�","value":"522630"},{"label":"榛庡钩鍘�","value":"522631"},{"label":"姒曟睙鍘�","value":"522632"},{"label":"浠庢睙鍘�","value":"522633"},{"label":"闆峰北鍘�","value":"522634"},{"label":"楹绘睙鍘�","value":"522635"},{"label":"涓瑰鍘�","value":"522636"}],[{"label":"閮藉寑甯�","value":"522701"},{"label":"绂忔硥甯�","value":"522702"},{"label":"鑽旀尝鍘�","value":"522722"},{"label":"璐靛畾鍘�","value":"522723"},{"label":"鐡畨鍘�","value":"522725"},{"label":"鐙北鍘�","value":"522726"},{"label":"骞冲鍘�","value":"522727"},{"label":"缃楃敻鍘�","value":"522728"},{"label":"闀块『鍘�","value":"522729"},{"label":"榫欓噷鍘�","value":"522730"},{"label":"鎯犳按鍘�","value":"522731"},{"label":"涓夐兘姘存棌鑷不鍘�","value":"522732"}]],[[{"label":"浜斿崕鍖�","value":"530102"},{"label":"鐩橀緳鍖�","value":"530103"},{"label":"瀹樻浮鍖�","value":"530111"},{"label":"瑗垮北鍖�","value":"530112"},{"label":"涓滃窛鍖�","value":"530113"},{"label":"鍛堣础鍖�","value":"530114"},{"label":"鏅嬪畞鍖�","value":"530115"},{"label":"瀵屾皯鍘�","value":"530124"},{"label":"瀹滆壇鍘�","value":"530125"},{"label":"鐭虫灄褰濇棌鑷不鍘�","value":"530126"},{"label":"宓╂槑鍘�","value":"530127"},{"label":"绂勫姖褰濇棌鑻楁棌鑷不鍘�","value":"530128"},{"label":"瀵荤敻鍥炴棌褰濇棌鑷不鍘�","value":"530129"},{"label":"瀹夊畞甯�","value":"530181"}],[{"label":"楹掗簾鍖�","value":"530302"},{"label":"娌剧泭鍖�","value":"530303"},{"label":"椹緳鍘�","value":"530321"},{"label":"闄嗚壇鍘�","value":"530322"},{"label":"甯堝畻鍘�","value":"530323"},{"label":"缃楀钩鍘�","value":"530324"},{"label":"瀵屾簮鍘�","value":"530325"},{"label":"浼氭辰鍘�","value":"530326"},{"label":"瀹e▉甯�","value":"530381"}],[{"label":"绾㈠鍖�","value":"530402"},{"label":"姹熷窛鍖�","value":"530403"},{"label":"婢勬睙鍘�","value":"530422"},{"label":"閫氭捣鍘�","value":"530423"},{"label":"鍗庡畞鍘�","value":"530424"},{"label":"鏄撻棬鍘�","value":"530425"},{"label":"宄ㄥ北褰濇棌鑷不鍘�","value":"530426"},{"label":"鏂板钩褰濇棌鍌f棌鑷不鍘�","value":"530427"},{"label":"鍏冩睙鍝堝凹鏃忓綕鏃忓偅鏃忚嚜娌诲幙","value":"530428"}],[{"label":"闅嗛槼鍖�","value":"530502"},{"label":"鏂界敻鍘�","value":"530521"},{"label":"榫欓櫟鍘�","value":"530523"},{"label":"鏄屽畞鍘�","value":"530524"},{"label":"鑵惧啿甯�","value":"530581"}],[{"label":"鏄槼鍖�","value":"530602"},{"label":"椴佺敻鍘�","value":"530621"},{"label":"宸у鍘�","value":"530622"},{"label":"鐩愭触鍘�","value":"530623"},{"label":"澶у叧鍘�","value":"530624"},{"label":"姘稿杽鍘�","value":"530625"},{"label":"缁ユ睙鍘�","value":"530626"},{"label":"闀囬泟鍘�","value":"530627"},{"label":"褰濊壇鍘�","value":"530628"},{"label":"濞佷俊鍘�","value":"530629"},{"label":"姘村瘜鍘�","value":"530630"}],[{"label":"鍙ゅ煄鍖�","value":"530702"},{"label":"鐜夐緳绾宠タ鏃忚嚜娌诲幙","value":"530721"},{"label":"姘歌儨鍘�","value":"530722"},{"label":"鍗庡潽鍘�","value":"530723"},{"label":"瀹佽挆褰濇棌鑷不鍘�","value":"530724"}],[{"label":"鎬濊寘鍖�","value":"530802"},{"label":"瀹佹幢鍝堝凹鏃忓綕鏃忚嚜娌诲幙","value":"530821"},{"label":"澧ㄦ睙鍝堝凹鏃忚嚜娌诲幙","value":"530822"},{"label":"鏅笢褰濇棌鑷不鍘�","value":"530823"},{"label":"鏅胺鍌f棌褰濇棌鑷不鍘�","value":"530824"},{"label":"闀囨矃褰濇棌鍝堝凹鏃忔媺绁滄棌鑷不鍘�","value":"530825"},{"label":"姹熷煄鍝堝凹鏃忓綕鏃忚嚜娌诲幙","value":"530826"},{"label":"瀛熻繛鍌f棌鎷夌鏃忎饯鏃忚嚜娌诲幙","value":"530827"},{"label":"婢滄钵鎷夌鏃忚嚜娌诲幙","value":"530828"},{"label":"瑗跨洘浣ゆ棌鑷不鍘�","value":"530829"}],[{"label":"涓寸繑鍖�","value":"530902"},{"label":"鍑ゅ簡鍘�","value":"530921"},{"label":"浜戝幙","value":"530922"},{"label":"姘稿痉鍘�","value":"530923"},{"label":"闀囧悍鍘�","value":"530924"},{"label":"鍙屾睙鎷夌鏃忎饯鏃忓竷鏈楁棌鍌f棌鑷不鍘�","value":"530925"},{"label":"鑰块┈鍌f棌浣ゆ棌鑷不鍘�","value":"530926"},{"label":"娌ф簮浣ゆ棌鑷不鍘�","value":"530927"}],[{"label":"妤氶泟甯�","value":"532301"},{"label":"鍙屾煆鍘�","value":"532322"},{"label":"鐗熷畾鍘�","value":"532323"},{"label":"鍗楀崕鍘�","value":"532324"},{"label":"濮氬畨鍘�","value":"532325"},{"label":"澶у鍘�","value":"532326"},{"label":"姘镐粊鍘�","value":"532327"},{"label":"鍏冭皨鍘�","value":"532328"},{"label":"姝﹀畾鍘�","value":"532329"},{"label":"绂勪赴鍘�","value":"532331"}],[{"label":"涓棫甯�","value":"532501"},{"label":"寮�杩滃競","value":"532502"},{"label":"钂欒嚜甯�","value":"532503"},{"label":"寮ュ嫆甯�","value":"532504"},{"label":"灞忚竟鑻楁棌鑷不鍘�","value":"532523"},{"label":"寤烘按鍘�","value":"532524"},{"label":"鐭冲睆鍘�","value":"532525"},{"label":"娉歌タ鍘�","value":"532527"},{"label":"鍏冮槼鍘�","value":"532528"},{"label":"绾㈡渤鍘�","value":"532529"},{"label":"閲戝钩鑻楁棌鐟舵棌鍌f棌鑷不鍘�","value":"532530"},{"label":"缁挎槬鍘�","value":"532531"},{"label":"娌冲彛鐟舵棌鑷不鍘�","value":"532532"}],[{"label":"鏂囧北甯�","value":"532601"},{"label":"鐮氬北鍘�","value":"532622"},{"label":"瑗跨暣鍘�","value":"532623"},{"label":"楹绘牀鍧″幙","value":"532624"},{"label":"椹叧鍘�","value":"532625"},{"label":"涓樺寳鍘�","value":"532626"},{"label":"骞垮崡鍘�","value":"532627"},{"label":"瀵屽畞鍘�","value":"532628"}],[{"label":"鏅椽甯�","value":"532801"},{"label":"鍕愭捣鍘�","value":"532822"},{"label":"鍕愯厞鍘�","value":"532823"}],[{"label":"澶х悊甯�","value":"532901"},{"label":"婕炬繛褰濇棌鑷不鍘�","value":"532922"},{"label":"绁ヤ簯鍘�","value":"532923"},{"label":"瀹惧窛鍘�","value":"532924"},{"label":"寮ユ浮鍘�","value":"532925"},{"label":"鍗楁锭褰濇棌鑷不鍘�","value":"532926"},{"label":"宸嶅北褰濇棌鍥炴棌鑷不鍘�","value":"532927"},{"label":"姘稿钩鍘�","value":"532928"},{"label":"浜戦緳鍘�","value":"532929"},{"label":"娲辨簮鍘�","value":"532930"},{"label":"鍓戝窛鍘�","value":"532931"},{"label":"楣ゅ簡鍘�","value":"532932"}],[{"label":"鐟炰附甯�","value":"533102"},{"label":"鑺掑競","value":"533103"},{"label":"姊佹渤鍘�","value":"533122"},{"label":"鐩堟睙鍘�","value":"533123"},{"label":"闄囧窛鍘�","value":"533124"}],[{"label":"娉告按甯�","value":"533301"},{"label":"绂忚础鍘�","value":"533323"},{"label":"璐″北鐙緳鏃忔�掓棌鑷不鍘�","value":"533324"},{"label":"鍏板潽鐧芥棌鏅背鏃忚嚜娌诲幙","value":"533325"}],[{"label":"棣欐牸閲屾媺甯�","value":"533401"},{"label":"寰烽挦鍘�","value":"533422"},{"label":"缁磋タ鍌堝兂鏃忚嚜娌诲幙","value":"533423"}]],[[{"label":"鍩庡叧鍖�","value":"540102"},{"label":"鍫嗛緳寰峰簡鍖�","value":"540103"},{"label":"鏋楀懆鍘�","value":"540121"},{"label":"褰撻泟鍘�","value":"540122"},{"label":"灏兼湪鍘�","value":"540123"},{"label":"鏇叉按鍘�","value":"540124"},{"label":"杈惧瓬鍘�","value":"540126"},{"label":"澧ㄧ宸ュ崱鍘�","value":"540127"},{"label":"鏍煎皵鏈ㄨ棌闈掑伐涓氬洯鍖�","value":"540171"},{"label":"鎷夎惃缁忔祹鎶�鏈紑鍙戝尯","value":"540172"},{"label":"瑗胯棌鏂囧寲鏃呮父鍒涙剰鍥尯","value":"540173"},{"label":"杈惧瓬宸ヤ笟鍥尯","value":"540174"}],[{"label":"妗戠彔瀛滃尯","value":"540202"},{"label":"鍗楁湪鏋楀幙","value":"540221"},{"label":"姹熷瓬鍘�","value":"540222"},{"label":"瀹氭棩鍘�","value":"540223"},{"label":"钀ㄨ喀鍘�","value":"540224"},{"label":"鎷夊瓬鍘�","value":"540225"},{"label":"鏄備粊鍘�","value":"540226"},{"label":"璋㈤�氶棬鍘�","value":"540227"},{"label":"鐧芥湕鍘�","value":"540228"},{"label":"浠佸竷鍘�","value":"540229"},{"label":"搴烽┈鍘�","value":"540230"},{"label":"瀹氱粨鍘�","value":"540231"},{"label":"浠插反鍘�","value":"540232"},{"label":"浜氫笢鍘�","value":"540233"},{"label":"鍚夐殕鍘�","value":"540234"},{"label":"鑱傛媺鏈ㄥ幙","value":"540235"},{"label":"钀ㄥ槑鍘�","value":"540236"},{"label":"宀楀反鍘�","value":"540237"}],[{"label":"鍗¤嫢鍖�","value":"540302"},{"label":"姹熻揪鍘�","value":"540321"},{"label":"璐¤鍘�","value":"540322"},{"label":"绫讳箤榻愬幙","value":"540323"},{"label":"涓侀潚鍘�","value":"540324"},{"label":"瀵熼泤鍘�","value":"540325"},{"label":"鍏鍘�","value":"540326"},{"label":"宸﹁础鍘�","value":"540327"},{"label":"鑺掑悍鍘�","value":"540328"},{"label":"娲涢殕鍘�","value":"540329"},{"label":"杈瑰潩鍘�","value":"540330"}],[{"label":"宸村疁鍖�","value":"540402"},{"label":"宸ュ竷姹熻揪鍘�","value":"540421"},{"label":"绫虫灄鍘�","value":"540422"},{"label":"澧ㄨ劚鍘�","value":"540423"},{"label":"娉㈠瘑鍘�","value":"540424"},{"label":"瀵熼殔鍘�","value":"540425"},{"label":"鏈楀幙","value":"540426"}],[{"label":"涔冧笢鍖�","value":"540502"},{"label":"鎵庡泭鍘�","value":"540521"},{"label":"璐″槑鍘�","value":"540522"},{"label":"妗戞棩鍘�","value":"540523"},{"label":"鐞肩粨鍘�","value":"540524"},{"label":"鏇叉澗鍘�","value":"540525"},{"label":"鎺編鍘�","value":"540526"},{"label":"娲涙墡鍘�","value":"540527"},{"label":"鍔犳煡鍘�","value":"540528"},{"label":"闅嗗瓙鍘�","value":"540529"},{"label":"閿欓偅鍘�","value":"540530"},{"label":"娴崱瀛愬幙","value":"540531"}],[{"label":"閭f洸鍘�","value":"542421"},{"label":"鍢夐粠鍘�","value":"542422"},{"label":"姣斿鍘�","value":"542423"},{"label":"鑱傝崳鍘�","value":"542424"},{"label":"瀹夊鍘�","value":"542425"},{"label":"鐢虫墡鍘�","value":"542426"},{"label":"绱㈠幙","value":"542427"},{"label":"鐝垐鍘�","value":"542428"},{"label":"宸撮潚鍘�","value":"542429"},{"label":"灏肩帥鍘�","value":"542430"},{"label":"鍙屾箹鍘�","value":"542431"}],[{"label":"鏅叞鍘�","value":"542521"},{"label":"鏈揪鍘�","value":"542522"},{"label":"鍣跺皵鍘�","value":"542523"},{"label":"鏃ュ湡鍘�","value":"542524"},{"label":"闈╁悏鍘�","value":"542525"},{"label":"鏀瑰垯鍘�","value":"542526"},{"label":"鎺嫟鍘�","value":"542527"}]],[[{"label":"鏂板煄鍖�","value":"610102"},{"label":"纰戞灄鍖�","value":"610103"},{"label":"鑾叉箹鍖�","value":"610104"},{"label":"鐏炴ˉ鍖�","value":"610111"},{"label":"鏈ぎ鍖�","value":"610112"},{"label":"闆佸鍖�","value":"610113"},{"label":"闃庤壇鍖�","value":"610114"},{"label":"涓存郊鍖�","value":"610115"},{"label":"闀垮畨鍖�","value":"610116"},{"label":"楂橀櫟鍖�","value":"610117"},{"label":"閯犻倯鍖�","value":"610118"},{"label":"钃濈敯鍘�","value":"610122"},{"label":"鍛ㄨ嚦鍘�","value":"610124"}],[{"label":"鐜嬬泭鍖�","value":"610202"},{"label":"鍗板彴鍖�","value":"610203"},{"label":"鑰�宸炲尯","value":"610204"},{"label":"瀹滃悰鍘�","value":"610222"}],[{"label":"娓花鍖�","value":"610302"},{"label":"閲戝彴鍖�","value":"610303"},{"label":"闄堜粨鍖�","value":"610304"},{"label":"鍑ょ繑鍘�","value":"610322"},{"label":"宀愬北鍘�","value":"610323"},{"label":"鎵堕鍘�","value":"610324"},{"label":"鐪夊幙","value":"610326"},{"label":"闄囧幙","value":"610327"},{"label":"鍗冮槼鍘�","value":"610328"},{"label":"楹熸父鍘�","value":"610329"},{"label":"鍑ゅ幙","value":"610330"},{"label":"澶櫧鍘�","value":"610331"}],[{"label":"绉﹂兘鍖�","value":"610402"},{"label":"鏉ㄩ櫟鍖�","value":"610403"},{"label":"娓煄鍖�","value":"610404"},{"label":"涓夊師鍘�","value":"610422"},{"label":"娉鹃槼鍘�","value":"610423"},{"label":"涔惧幙","value":"610424"},{"label":"绀兼硥鍘�","value":"610425"},{"label":"姘稿鍘�","value":"610426"},{"label":"褰幙","value":"610427"},{"label":"闀挎鍘�","value":"610428"},{"label":"鏃倯鍘�","value":"610429"},{"label":"娣冲寲鍘�","value":"610430"},{"label":"姝﹀姛鍘�","value":"610431"},{"label":"鍏村钩甯�","value":"610481"}],[{"label":"涓存腑鍖�","value":"610502"},{"label":"鍗庡窞鍖�","value":"610503"},{"label":"娼煎叧鍘�","value":"610522"},{"label":"澶ц崝鍘�","value":"610523"},{"label":"鍚堥槼鍘�","value":"610524"},{"label":"婢勫煄鍘�","value":"610525"},{"label":"钂插煄鍘�","value":"610526"},{"label":"鐧芥按鍘�","value":"610527"},{"label":"瀵屽钩鍘�","value":"610528"},{"label":"闊╁煄甯�","value":"610581"},{"label":"鍗庨槾甯�","value":"610582"}],[{"label":"瀹濆鍖�","value":"610602"},{"label":"瀹夊鍖�","value":"610603"},{"label":"寤堕暱鍘�","value":"610621"},{"label":"寤跺窛鍘�","value":"610622"},{"label":"瀛愰暱鍘�","value":"610623"},{"label":"蹇椾腹鍘�","value":"610625"},{"label":"鍚磋捣鍘�","value":"610626"},{"label":"鐢樻硥鍘�","value":"610627"},{"label":"瀵屽幙","value":"610628"},{"label":"娲涘窛鍘�","value":"610629"},{"label":"瀹滃窛鍘�","value":"610630"},{"label":"榛勯緳鍘�","value":"610631"},{"label":"榛勯櫟鍘�","value":"610632"}],[{"label":"姹夊彴鍖�","value":"610702"},{"label":"鍗楅儜鍖�","value":"610703"},{"label":"鍩庡浐鍘�","value":"610722"},{"label":"娲嬪幙","value":"610723"},{"label":"瑗夸埂鍘�","value":"610724"},{"label":"鍕夊幙","value":"610725"},{"label":"瀹佸己鍘�","value":"610726"},{"label":"鐣ラ槼鍘�","value":"610727"},{"label":"闀囧反鍘�","value":"610728"},{"label":"鐣欏潩鍘�","value":"610729"},{"label":"浣涘潽鍘�","value":"610730"}],[{"label":"姒嗛槼鍖�","value":"610802"},{"label":"妯北鍖�","value":"610803"},{"label":"搴滆胺鍘�","value":"610822"},{"label":"闈栬竟鍘�","value":"610824"},{"label":"瀹氳竟鍘�","value":"610825"},{"label":"缁ュ痉鍘�","value":"610826"},{"label":"绫宠剛鍘�","value":"610827"},{"label":"浣冲幙","value":"610828"},{"label":"鍚村牎鍘�","value":"610829"},{"label":"娓呮锭鍘�","value":"610830"},{"label":"瀛愭床鍘�","value":"610831"},{"label":"绁炴湪甯�","value":"610881"}],[{"label":"姹夋花鍖�","value":"610902"},{"label":"姹夐槾鍘�","value":"610921"},{"label":"鐭虫硥鍘�","value":"610922"},{"label":"瀹侀檿鍘�","value":"610923"},{"label":"绱槼鍘�","value":"610924"},{"label":"宀氱殝鍘�","value":"610925"},{"label":"骞冲埄鍘�","value":"610926"},{"label":"闀囧潽鍘�","value":"610927"},{"label":"鏃槼鍘�","value":"610928"},{"label":"鐧芥渤鍘�","value":"610929"}],[{"label":"鍟嗗窞鍖�","value":"611002"},{"label":"娲涘崡鍘�","value":"611021"},{"label":"涓瑰嚖鍘�","value":"611022"},{"label":"鍟嗗崡鍘�","value":"611023"},{"label":"灞遍槼鍘�","value":"611024"},{"label":"闀囧畨鍘�","value":"611025"},{"label":"鏌炴按鍘�","value":"611026"}]],[[{"label":"鍩庡叧鍖�","value":"620102"},{"label":"涓冮噷娌冲尯","value":"620103"},{"label":"瑗垮浐鍖�","value":"620104"},{"label":"瀹夊畞鍖�","value":"620105"},{"label":"绾㈠彜鍖�","value":"620111"},{"label":"姘哥櫥鍘�","value":"620121"},{"label":"鐨嬪叞鍘�","value":"620122"},{"label":"姒嗕腑鍘�","value":"620123"},{"label":"鍏板窞鏂板尯","value":"620171"}],[{"label":"鍢夊唱鍏冲競","value":"620201"}],[{"label":"閲戝窛鍖�","value":"620302"},{"label":"姘告槍鍘�","value":"620321"}],[{"label":"鐧介摱鍖�","value":"620402"},{"label":"骞冲窛鍖�","value":"620403"},{"label":"闈栬繙鍘�","value":"620421"},{"label":"浼氬畞鍘�","value":"620422"},{"label":"鏅嘲鍘�","value":"620423"}],[{"label":"绉﹀窞鍖�","value":"620502"},{"label":"楹︾Н鍖�","value":"620503"},{"label":"娓呮按鍘�","value":"620521"},{"label":"绉﹀畨鍘�","value":"620522"},{"label":"鐢樿胺鍘�","value":"620523"},{"label":"姝﹀北鍘�","value":"620524"},{"label":"寮犲宸濆洖鏃忚嚜娌诲幙","value":"620525"}],[{"label":"鍑夊窞鍖�","value":"620602"},{"label":"姘戝嫟鍘�","value":"620621"},{"label":"鍙ゆ氮鍘�","value":"620622"},{"label":"澶╃钘忔棌鑷不鍘�","value":"620623"}],[{"label":"鐢樺窞鍖�","value":"620702"},{"label":"鑲冨崡瑁曞浐鏃忚嚜娌诲幙","value":"620721"},{"label":"姘戜箰鍘�","value":"620722"},{"label":"涓存辰鍘�","value":"620723"},{"label":"楂樺彴鍘�","value":"620724"},{"label":"灞变腹鍘�","value":"620725"}],[{"label":"宕嗗硳鍖�","value":"620802"},{"label":"娉惧窛鍘�","value":"620821"},{"label":"鐏靛彴鍘�","value":"620822"},{"label":"宕囦俊鍘�","value":"620823"},{"label":"鍗庝涵鍘�","value":"620824"},{"label":"搴勬氮鍘�","value":"620825"},{"label":"闈欏畞鍘�","value":"620826"},{"label":"骞冲噳宸ヤ笟鍥尯","value":"620871"}],[{"label":"鑲冨窞鍖�","value":"620902"},{"label":"閲戝鍘�","value":"620921"},{"label":"鐡滃窞鍘�","value":"620922"},{"label":"鑲冨寳钂欏彜鏃忚嚜娌诲幙","value":"620923"},{"label":"闃垮厠濉炲搱钀ㄥ厠鏃忚嚜娌诲幙","value":"620924"},{"label":"鐜夐棬甯�","value":"620981"},{"label":"鏁︾厡甯�","value":"620982"}],[{"label":"瑗垮嘲鍖�","value":"621002"},{"label":"搴嗗煄鍘�","value":"621021"},{"label":"鐜幙","value":"621022"},{"label":"鍗庢睜鍘�","value":"621023"},{"label":"鍚堟按鍘�","value":"621024"},{"label":"姝e畞鍘�","value":"621025"},{"label":"瀹佸幙","value":"621026"},{"label":"闀囧師鍘�","value":"621027"}],[{"label":"瀹夊畾鍖�","value":"621102"},{"label":"閫氭腑鍘�","value":"621121"},{"label":"闄囪タ鍘�","value":"621122"},{"label":"娓簮鍘�","value":"621123"},{"label":"涓存串鍘�","value":"621124"},{"label":"婕冲幙","value":"621125"},{"label":"宀峰幙","value":"621126"}],[{"label":"姝﹂兘鍖�","value":"621202"},{"label":"鎴愬幙","value":"621221"},{"label":"鏂囧幙","value":"621222"},{"label":"瀹曟槍鍘�","value":"621223"},{"label":"搴峰幙","value":"621224"},{"label":"瑗垮拰鍘�","value":"621225"},{"label":"绀煎幙","value":"621226"},{"label":"寰藉幙","value":"621227"},{"label":"涓ゅ綋鍘�","value":"621228"}],[{"label":"涓村甯�","value":"622901"},{"label":"涓村鍘�","value":"622921"},{"label":"搴蜂箰鍘�","value":"622922"},{"label":"姘搁潠鍘�","value":"622923"},{"label":"骞挎渤鍘�","value":"622924"},{"label":"鍜屾斂鍘�","value":"622925"},{"label":"涓滀埂鏃忚嚜娌诲幙","value":"622926"},{"label":"绉煶灞变繚瀹夋棌涓滀埂鏃忔拻鎷夋棌鑷不鍘�","value":"622927"}],[{"label":"鍚堜綔甯�","value":"623001"},{"label":"涓存江鍘�","value":"623021"},{"label":"鍗撳凹鍘�","value":"623022"},{"label":"鑸熸洸鍘�","value":"623023"},{"label":"杩儴鍘�","value":"623024"},{"label":"鐜涙洸鍘�","value":"623025"},{"label":"纰屾洸鍘�","value":"623026"},{"label":"澶忔渤鍘�","value":"623027"}]],[[{"label":"鍩庝笢鍖�","value":"630102"},{"label":"鍩庝腑鍖�","value":"630103"},{"label":"鍩庤タ鍖�","value":"630104"},{"label":"鍩庡寳鍖�","value":"630105"},{"label":"澶ч�氬洖鏃忓湡鏃忚嚜娌诲幙","value":"630121"},{"label":"婀熶腑鍘�","value":"630122"},{"label":"婀熸簮鍘�","value":"630123"}],[{"label":"涔愰兘鍖�","value":"630202"},{"label":"骞冲畨鍖�","value":"630203"},{"label":"姘戝拰鍥炴棌鍦熸棌鑷不鍘�","value":"630222"},{"label":"浜掑姪鍦熸棌鑷不鍘�","value":"630223"},{"label":"鍖栭殕鍥炴棌鑷不鍘�","value":"630224"},{"label":"寰寲鎾掓媺鏃忚嚜娌诲幙","value":"630225"}],[{"label":"闂ㄦ簮鍥炴棌鑷不鍘�","value":"632221"},{"label":"绁佽繛鍘�","value":"632222"},{"label":"娴锋檹鍘�","value":"632223"},{"label":"鍒氬療鍘�","value":"632224"}],[{"label":"鍚屼粊鍘�","value":"632321"},{"label":"灏栨墡鍘�","value":"632322"},{"label":"娉藉簱鍘�","value":"632323"},{"label":"娌冲崡钂欏彜鏃忚嚜娌诲幙","value":"632324"}],[{"label":"鍏卞拰鍘�","value":"632521"},{"label":"鍚屽痉鍘�","value":"632522"},{"label":"璐靛痉鍘�","value":"632523"},{"label":"鍏存捣鍘�","value":"632524"},{"label":"璐靛崡鍘�","value":"632525"}],[{"label":"鐜涙瞾鍘�","value":"632621"},{"label":"鐝帥鍘�","value":"632622"},{"label":"鐢樺痉鍘�","value":"632623"},{"label":"杈炬棩鍘�","value":"632624"},{"label":"涔呮不鍘�","value":"632625"},{"label":"鐜涘鍘�","value":"632626"}],[{"label":"鐜夋爲甯�","value":"632701"},{"label":"鏉傚鍘�","value":"632722"},{"label":"绉板鍘�","value":"632723"},{"label":"娌诲鍘�","value":"632724"},{"label":"鍥婅唉鍘�","value":"632725"},{"label":"鏇查夯鑾卞幙","value":"632726"}],[{"label":"鏍煎皵鏈ㄥ競","value":"632801"},{"label":"寰蜂护鍝堝競","value":"632802"},{"label":"涔屽叞鍘�","value":"632821"},{"label":"閮藉叞鍘�","value":"632822"},{"label":"澶╁郴鍘�","value":"632823"},{"label":"澶ф煷鏃﹁鏀垮鍛樹細","value":"632857"},{"label":"鍐锋箹琛屾斂濮斿憳浼�","value":"632858"},{"label":"鑼礀琛屾斂濮斿憳浼�","value":"632859"}]],[[{"label":"鍏村簡鍖�","value":"640104"},{"label":"瑗垮鍖�","value":"640105"},{"label":"閲戝嚖鍖�","value":"640106"},{"label":"姘稿畞鍘�","value":"640121"},{"label":"璐哄叞鍘�","value":"640122"},{"label":"鐏垫甯�","value":"640181"}],[{"label":"澶ф鍙e尯","value":"640202"},{"label":"鎯犲啘鍖�","value":"640205"},{"label":"骞崇綏鍘�","value":"640221"}],[{"label":"鍒╅�氬尯","value":"640302"},{"label":"绾㈠鍫″尯","value":"640303"},{"label":"鐩愭睜鍘�","value":"640323"},{"label":"鍚屽績鍘�","value":"640324"},{"label":"闈掗摐宄″競","value":"640381"}],[{"label":"鍘熷窞鍖�","value":"640402"},{"label":"瑗垮悏鍘�","value":"640422"},{"label":"闅嗗痉鍘�","value":"640423"},{"label":"娉炬簮鍘�","value":"640424"},{"label":"褰槼鍘�","value":"640425"}],[{"label":"娌欏潯澶村尯","value":"640502"},{"label":"涓畞鍘�","value":"640521"},{"label":"娴峰師鍘�","value":"640522"}]],[[{"label":"澶╁北鍖�","value":"650102"},{"label":"娌欎緷宸村厠鍖�","value":"650103"},{"label":"鏂板競鍖�","value":"650104"},{"label":"姘寸(娌熷尯","value":"650105"},{"label":"澶村悲娌冲尯","value":"650106"},{"label":"杈惧潅鍩庡尯","value":"650107"},{"label":"绫充笢鍖�","value":"650109"},{"label":"涔岄瞾鏈ㄩ綈鍘�","value":"650121"},{"label":"涔岄瞾鏈ㄩ綈缁忔祹鎶�鏈紑鍙戝尯","value":"650171"},{"label":"涔岄瞾鏈ㄩ綈楂樻柊鎶�鏈骇涓氬紑鍙戝尯","value":"650172"}],[{"label":"鐙北瀛愬尯","value":"650202"},{"label":"鍏嬫媺鐜涗緷鍖�","value":"650203"},{"label":"鐧界⒈婊╁尯","value":"650204"},{"label":"涔屽皵绂惧尯","value":"650205"}],[{"label":"楂樻槍鍖�","value":"650402"},{"label":"閯杽鍘�","value":"650421"},{"label":"鎵樺厠閫婂幙","value":"650422"}],[{"label":"浼婂窞鍖�","value":"650502"},{"label":"宸撮噷鍧ゅ搱钀ㄥ厠鑷不鍘�","value":"650521"},{"label":"浼婂惥鍘�","value":"650522"}],[{"label":"鏄屽悏甯�","value":"652301"},{"label":"闃滃悍甯�","value":"652302"},{"label":"鍛煎浘澹佸幙","value":"652323"},{"label":"鐜涚撼鏂幙","value":"652324"},{"label":"濂囧彴鍘�","value":"652325"},{"label":"鍚夋湪钀ㄥ皵鍘�","value":"652327"},{"label":"鏈ㄥ瀿鍝堣惃鍏嬭嚜娌诲幙","value":"652328"}],[{"label":"鍗氫箰甯�","value":"652701"},{"label":"闃挎媺灞卞彛甯�","value":"652702"},{"label":"绮炬渤鍘�","value":"652722"},{"label":"娓╂硥鍘�","value":"652723"}],[{"label":"搴撳皵鍕掑競","value":"652801"},{"label":"杞彴鍘�","value":"652822"},{"label":"灏夌妬鍘�","value":"652823"},{"label":"鑻ョ緦鍘�","value":"652824"},{"label":"涓旀湯鍘�","value":"652825"},{"label":"鐒夎�嗗洖鏃忚嚜娌诲幙","value":"652826"},{"label":"鍜岄潤鍘�","value":"652827"},{"label":"鍜岀鍘�","value":"652828"},{"label":"鍗氭箹鍘�","value":"652829"},{"label":"搴撳皵鍕掔粡娴庢妧鏈紑鍙戝尯","value":"652871"}],[{"label":"闃垮厠鑻忓競","value":"652901"},{"label":"娓╁鍘�","value":"652922"},{"label":"搴撹溅鍘�","value":"652923"},{"label":"娌欓泤鍘�","value":"652924"},{"label":"鏂板拰鍘�","value":"652925"},{"label":"鎷滃煄鍘�","value":"652926"},{"label":"涔屼粈鍘�","value":"652927"},{"label":"闃跨摝鎻愬幙","value":"652928"},{"label":"鏌潽鍘�","value":"652929"}],[{"label":"闃垮浘浠�甯�","value":"653001"},{"label":"闃垮厠闄跺幙","value":"653022"},{"label":"闃垮悎濂囧幙","value":"653023"},{"label":"涔屾伆鍘�","value":"653024"}],[{"label":"鍠�浠�甯�","value":"653101"},{"label":"鐤忛檮鍘�","value":"653121"},{"label":"鐤忓嫆鍘�","value":"653122"},{"label":"鑻卞悏娌欏幙","value":"653123"},{"label":"娉芥櫘鍘�","value":"653124"},{"label":"鑾庤溅鍘�","value":"653125"},{"label":"鍙跺煄鍘�","value":"653126"},{"label":"楹︾洊鎻愬幙","value":"653127"},{"label":"宀虫櫘婀栧幙","value":"653128"},{"label":"浼藉笀鍘�","value":"653129"},{"label":"宸存鍘�","value":"653130"},{"label":"濉斾粈搴撳皵骞插鍚夊厠鑷不鍘�","value":"653131"}],[{"label":"鍜岀敯甯�","value":"653201"},{"label":"鍜岀敯鍘�","value":"653221"},{"label":"澧ㄧ帀鍘�","value":"653222"},{"label":"鐨北鍘�","value":"653223"},{"label":"娲涙郸鍘�","value":"653224"},{"label":"绛栧嫆鍘�","value":"653225"},{"label":"浜庣敯鍘�","value":"653226"},{"label":"姘戜赴鍘�","value":"653227"}],[{"label":"浼婂畞甯�","value":"654002"},{"label":"濂庡悲甯�","value":"654003"},{"label":"闇嶅皵鏋滄柉甯�","value":"654004"},{"label":"浼婂畞鍘�","value":"654021"},{"label":"瀵熷竷鏌ュ皵閿′集鑷不鍘�","value":"654022"},{"label":"闇嶅煄鍘�","value":"654023"},{"label":"宸╃暀鍘�","value":"654024"},{"label":"鏂版簮鍘�","value":"654025"},{"label":"鏄嫃鍘�","value":"654026"},{"label":"鐗瑰厠鏂幙","value":"654027"},{"label":"灏煎嫆鍏嬪幙","value":"654028"}],[{"label":"濉斿煄甯�","value":"654201"},{"label":"涔岃嫃甯�","value":"654202"},{"label":"棰濇晱鍘�","value":"654221"},{"label":"娌欐咕鍘�","value":"654223"},{"label":"鎵橀噷鍘�","value":"654224"},{"label":"瑁曟皯鍘�","value":"654225"},{"label":"鍜屽竷鍏嬭禌灏旇挋鍙よ嚜娌诲幙","value":"654226"}],[{"label":"闃垮嫆娉板競","value":"654301"},{"label":"甯冨皵娲ュ幙","value":"654321"},{"label":"瀵岃暣鍘�","value":"654322"},{"label":"绂忔捣鍘�","value":"654323"},{"label":"鍝堝反娌冲幙","value":"654324"},{"label":"闈掓渤鍘�","value":"654325"},{"label":"鍚夋湪涔冨幙","value":"654326"}],[{"label":"鐭虫渤瀛愬競","value":"659001"},{"label":"闃挎媺灏斿競","value":"659002"},{"label":"鍥炬湪鑸掑厠甯�","value":"659003"},{"label":"浜斿娓犲競","value":"659004"},{"label":"閾侀棬鍏冲競","value":"659006"}]],[[{"label":"鍙板寳","value":"660101"}],[{"label":"楂橀泟","value":"660201"}],[{"label":"鍩洪殕","value":"660301"}],[{"label":"鍙颁腑","value":"660401"}],[{"label":"鍙板崡","value":"660501"}],[{"label":"鏂扮","value":"660601"}],[{"label":"鍢変箟","value":"660701"}],[{"label":"瀹滃叞","value":"660801"}],[{"label":"妗冨洯","value":"660901"}],[{"label":"鑻楁牀","value":"661001"}],[{"label":"褰板寲","value":"661101"}],[{"label":"鍗楁姇","value":"661201"}],[{"label":"浜戞灄","value":"661301"}],[{"label":"灞忎笢","value":"661401"}],[{"label":"鍙颁笢","value":"661501"}],[{"label":"鑺辫幉","value":"661601"}],[{"label":"婢庢箹","value":"661701"}]],[[{"label":"棣欐腐宀�","value":"670101"}],[{"label":"涔濋緳","value":"670201"}],[{"label":"鏂扮晫","value":"670301"}]],[[{"label":"婢抽棬鍗婂矝","value":"680101"}],[{"label":"姘逛粩宀�","value":"680201"}],[{"label":"璺幆宀�","value":"680301"}],[{"label":"璺肮鍩�","value":"680401"}]]];export default areaData; \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/util/async-validator.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/util/async-validator.js" new file mode 100644 index 0000000..d7215b9 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/util/async-validator.js" @@ -0,0 +1,1356 @@ +function _extends() { + _extends = Object.assign || function(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + + return target; + }; + + return _extends.apply(this, arguments); +} + +/* eslint no-console:0 */ +var formatRegExp = /%[sdj%]/g; +var warning = function warning() {}; // don't print warning message when in production env or node runtime + +if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV !== 'production' && typeof window !== + 'undefined' && typeof document !== 'undefined') { + warning = function warning(type, errors) { + if (typeof console !== 'undefined' && console.warn) { + if (errors.every(function(e) { + return typeof e === 'string'; + })) { + console.warn(type, errors); + } + } + }; +} + +function convertFieldsError(errors) { + if (!errors || !errors.length) return null; + var fields = {}; + errors.forEach(function(error) { + var field = error.field; + fields[field] = fields[field] || []; + fields[field].push(error); + }); + return fields; +} + +function format() { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + var i = 1; + var f = args[0]; + var len = args.length; + + if (typeof f === 'function') { + return f.apply(null, args.slice(1)); + } + + if (typeof f === 'string') { + var str = String(f).replace(formatRegExp, function(x) { + if (x === '%%') { + return '%'; + } + + if (i >= len) { + return x; + } + + switch (x) { + case '%s': + return String(args[i++]); + + case '%d': + return Number(args[i++]); + + case '%j': + try { + return JSON.stringify(args[i++]); + } catch (_) { + return '[Circular]'; + } + + break; + + default: + return x; + } + }); + + for (var arg = args[i]; i < len; arg = args[++i]) { + str += " " + arg; + } + + return str; + } + + return f; +} + +function isNativeStringType(type) { + return type === 'string' || type === 'url' || type === 'hex' || type === 'email' || type === 'pattern'; +} + +function isEmptyValue(value, type) { + if (value === undefined || value === null) { + return true; + } + + if (type === 'array' && Array.isArray(value) && !value.length) { + return true; + } + + if (isNativeStringType(type) && typeof value === 'string' && !value) { + return true; + } + + return false; +} + +function asyncParallelArray(arr, func, callback) { + var results = []; + var total = 0; + var arrLength = arr.length; + + function count(errors) { + results.push.apply(results, errors); + total++; + + if (total === arrLength) { + callback(results); + } + } + + arr.forEach(function(a) { + func(a, count); + }); +} + +function asyncSerialArray(arr, func, callback) { + var index = 0; + var arrLength = arr.length; + + function next(errors) { + if (errors && errors.length) { + callback(errors); + return; + } + + var original = index; + index = index + 1; + + if (original < arrLength) { + func(arr[original], next); + } else { + callback([]); + } + } + + next([]); +} + +function flattenObjArr(objArr) { + var ret = []; + Object.keys(objArr).forEach(function(k) { + ret.push.apply(ret, objArr[k]); + }); + return ret; +} + +function asyncMap(objArr, option, func, callback) { + if (option.first) { + var _pending = new Promise(function(resolve, reject) { + var next = function next(errors) { + callback(errors); + return errors.length ? reject({ + errors: errors, + fields: convertFieldsError(errors) + }) : resolve(); + }; + + var flattenArr = flattenObjArr(objArr); + asyncSerialArray(flattenArr, func, next); + }); + + _pending["catch"](function(e) { + return e; + }); + + return _pending; + } + + var firstFields = option.firstFields || []; + + if (firstFields === true) { + firstFields = Object.keys(objArr); + } + + var objArrKeys = Object.keys(objArr); + var objArrLength = objArrKeys.length; + var total = 0; + var results = []; + var pending = new Promise(function(resolve, reject) { + var next = function next(errors) { + results.push.apply(results, errors); + total++; + + if (total === objArrLength) { + callback(results); + return results.length ? reject({ + errors: results, + fields: convertFieldsError(results) + }) : resolve(); + } + }; + + if (!objArrKeys.length) { + callback(results); + resolve(); + } + + objArrKeys.forEach(function(key) { + var arr = objArr[key]; + + if (firstFields.indexOf(key) !== -1) { + asyncSerialArray(arr, func, next); + } else { + asyncParallelArray(arr, func, next); + } + }); + }); + pending["catch"](function(e) { + return e; + }); + return pending; +} + +function complementError(rule) { + return function(oe) { + if (oe && oe.message) { + oe.field = oe.field || rule.fullField; + return oe; + } + + return { + message: typeof oe === 'function' ? oe() : oe, + field: oe.field || rule.fullField + }; + }; +} + +function deepMerge(target, source) { + if (source) { + for (var s in source) { + if (source.hasOwnProperty(s)) { + var value = source[s]; + + if (typeof value === 'object' && typeof target[s] === 'object') { + target[s] = _extends({}, target[s], {}, value); + } else { + target[s] = value; + } + } + } + } + + return target; +} + +/** + * Rule for validating required fields. + * + * @param rule The validation rule. + * @param value The value of the field on the source object. + * @param source The source object being validated. + * @param errors An array of errors that this rule may add + * validation errors to. + * @param options The validation options. + * @param options.messages The validation messages. + */ + +function required(rule, value, source, errors, options, type) { + if (rule.required && (!source.hasOwnProperty(rule.field) || isEmptyValue(value, type || rule.type))) { + errors.push(format(options.messages.required, rule.fullField)); + } +} + +/** + * Rule for validating whitespace. + * + * @param rule The validation rule. + * @param value The value of the field on the source object. + * @param source The source object being validated. + * @param errors An array of errors that this rule may add + * validation errors to. + * @param options The validation options. + * @param options.messages The validation messages. + */ + +function whitespace(rule, value, source, errors, options) { + if (/^\s+$/.test(value) || value === '') { + errors.push(format(options.messages.whitespace, rule.fullField)); + } +} + +/* eslint max-len:0 */ + +var pattern = { + // http://emailregex.com/ + email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/, + url: new RegExp( + "^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$", + 'i'), + hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i +}; +var types = { + integer: function integer(value) { + return types.number(value) && parseInt(value, 10) === value; + }, + "float": function float(value) { + return types.number(value) && !types.integer(value); + }, + array: function array(value) { + return Array.isArray(value); + }, + regexp: function regexp(value) { + if (value instanceof RegExp) { + return true; + } + + try { + return !!new RegExp(value); + } catch (e) { + return false; + } + }, + date: function date(value) { + return typeof value.getTime === 'function' && typeof value.getMonth === 'function' && typeof value.getYear === + 'function'; + }, + number: function number(value) { + if (isNaN(value)) { + return false; + } + + // 淇敼婧愮爜锛屽皢瀛楃涓叉暟鍊煎厛杞负鏁板�� + return typeof +value === 'number'; + }, + object: function object(value) { + return typeof value === 'object' && !types.array(value); + }, + method: function method(value) { + return typeof value === 'function'; + }, + email: function email(value) { + return typeof value === 'string' && !!value.match(pattern.email) && value.length < 255; + }, + url: function url(value) { + return typeof value === 'string' && !!value.match(pattern.url); + }, + hex: function hex(value) { + return typeof value === 'string' && !!value.match(pattern.hex); + } +}; +/** + * Rule for validating the type of a value. + * + * @param rule The validation rule. + * @param value The value of the field on the source object. + * @param source The source object being validated. + * @param errors An array of errors that this rule may add + * validation errors to. + * @param options The validation options. + * @param options.messages The validation messages. + */ + +function type(rule, value, source, errors, options) { + if (rule.required && value === undefined) { + required(rule, value, source, errors, options); + return; + } + + var custom = ['integer', 'float', 'array', 'regexp', 'object', 'method', 'email', 'number', 'date', 'url', 'hex']; + var ruleType = rule.type; + + if (custom.indexOf(ruleType) > -1) { + if (!types[ruleType](value)) { + errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type)); + } // straight typeof check + + } else if (ruleType && typeof value !== rule.type) { + errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type)); + } +} + +/** + * Rule for validating minimum and maximum allowed values. + * + * @param rule The validation rule. + * @param value The value of the field on the source object. + * @param source The source object being validated. + * @param errors An array of errors that this rule may add + * validation errors to. + * @param options The validation options. + * @param options.messages The validation messages. + */ + +function range(rule, value, source, errors, options) { + var len = typeof rule.len === 'number'; + var min = typeof rule.min === 'number'; + var max = typeof rule.max === 'number'; // 姝e垯鍖归厤鐮佺偣鑼冨洿浠嶶+010000涓�鐩村埌U+10FFFF鐨勬枃瀛楋紙琛ュ厖骞抽潰Supplementary Plane锛� + + var spRegexp = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g; + var val = value; + var key = null; + var num = typeof value === 'number'; + var str = typeof value === 'string'; + var arr = Array.isArray(value); + + if (num) { + key = 'number'; + } else if (str) { + key = 'string'; + } else if (arr) { + key = 'array'; + } // if the value is not of a supported type for range validation + // the validation rule rule should use the + // type property to also test for a particular type + + + if (!key) { + return false; + } + + if (arr) { + val = value.length; + } + + if (str) { + // 澶勭悊鐮佺偣澶т簬U+010000鐨勬枃瀛條ength灞炴�т笉鍑嗙‘鐨刡ug锛屽"馉馉馉".lenght !== 3 + val = value.replace(spRegexp, '_').length; + } + + if (len) { + if (val !== rule.len) { + errors.push(format(options.messages[key].len, rule.fullField, rule.len)); + } + } else if (min && !max && val < rule.min) { + errors.push(format(options.messages[key].min, rule.fullField, rule.min)); + } else if (max && !min && val > rule.max) { + errors.push(format(options.messages[key].max, rule.fullField, rule.max)); + } else if (min && max && (val < rule.min || val > rule.max)) { + errors.push(format(options.messages[key].range, rule.fullField, rule.min, rule.max)); + } +} + +var ENUM = 'enum'; +/** + * Rule for validating a value exists in an enumerable list. + * + * @param rule The validation rule. + * @param value The value of the field on the source object. + * @param source The source object being validated. + * @param errors An array of errors that this rule may add + * validation errors to. + * @param options The validation options. + * @param options.messages The validation messages. + */ + +function enumerable(rule, value, source, errors, options) { + rule[ENUM] = Array.isArray(rule[ENUM]) ? rule[ENUM] : []; + + if (rule[ENUM].indexOf(value) === -1) { + errors.push(format(options.messages[ENUM], rule.fullField, rule[ENUM].join(', '))); + } +} + +/** + * Rule for validating a regular expression pattern. + * + * @param rule The validation rule. + * @param value The value of the field on the source object. + * @param source The source object being validated. + * @param errors An array of errors that this rule may add + * validation errors to. + * @param options The validation options. + * @param options.messages The validation messages. + */ + +function pattern$1(rule, value, source, errors, options) { + if (rule.pattern) { + if (rule.pattern instanceof RegExp) { + // if a RegExp instance is passed, reset `lastIndex` in case its `global` + // flag is accidentally set to `true`, which in a validation scenario + // is not necessary and the result might be misleading + rule.pattern.lastIndex = 0; + + if (!rule.pattern.test(value)) { + errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern)); + } + } else if (typeof rule.pattern === 'string') { + var _pattern = new RegExp(rule.pattern); + + if (!_pattern.test(value)) { + errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern)); + } + } + } +} + +var rules = { + required: required, + whitespace: whitespace, + type: type, + range: range, + "enum": enumerable, + pattern: pattern$1 +}; + +/** + * Performs validation for string types. + * + * @param rule The validation rule. + * @param value The value of the field on the source object. + * @param callback The callback function. + * @param source The source object being validated. + * @param options The validation options. + * @param options.messages The validation messages. + */ + +function string(rule, value, callback, source, options) { + var errors = []; + var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); + + if (validate) { + if (isEmptyValue(value, 'string') && !rule.required) { + return callback(); + } + + rules.required(rule, value, source, errors, options, 'string'); + + if (!isEmptyValue(value, 'string')) { + rules.type(rule, value, source, errors, options); + rules.range(rule, value, source, errors, options); + rules.pattern(rule, value, source, errors, options); + + if (rule.whitespace === true) { + rules.whitespace(rule, value, source, errors, options); + } + } + } + + callback(errors); +} + +/** + * Validates a function. + * + * @param rule The validation rule. + * @param value The value of the field on the source object. + * @param callback The callback function. + * @param source The source object being validated. + * @param options The validation options. + * @param options.messages The validation messages. + */ + +function method(rule, value, callback, source, options) { + var errors = []; + var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); + + if (validate) { + if (isEmptyValue(value) && !rule.required) { + return callback(); + } + + rules.required(rule, value, source, errors, options); + + if (value !== undefined) { + rules.type(rule, value, source, errors, options); + } + } + + callback(errors); +} + +/** + * Validates a number. + * + * @param rule The validation rule. + * @param value The value of the field on the source object. + * @param callback The callback function. + * @param source The source object being validated. + * @param options The validation options. + * @param options.messages The validation messages. + */ + +function number(rule, value, callback, source, options) { + var errors = []; + var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); + + if (validate) { + if (value === '') { + value = undefined; + } + + if (isEmptyValue(value) && !rule.required) { + return callback(); + } + + rules.required(rule, value, source, errors, options); + + if (value !== undefined) { + rules.type(rule, value, source, errors, options); + rules.range(rule, value, source, errors, options); + } + } + + callback(errors); +} + +/** + * Validates a boolean. + * + * @param rule The validation rule. + * @param value The value of the field on the source object. + * @param callback The callback function. + * @param source The source object being validated. + * @param options The validation options. + * @param options.messages The validation messages. + */ + +function _boolean(rule, value, callback, source, options) { + var errors = []; + var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); + + if (validate) { + if (isEmptyValue(value) && !rule.required) { + return callback(); + } + + rules.required(rule, value, source, errors, options); + + if (value !== undefined) { + rules.type(rule, value, source, errors, options); + } + } + + callback(errors); +} + +/** + * Validates the regular expression type. + * + * @param rule The validation rule. + * @param value The value of the field on the source object. + * @param callback The callback function. + * @param source The source object being validated. + * @param options The validation options. + * @param options.messages The validation messages. + */ + +function regexp(rule, value, callback, source, options) { + var errors = []; + var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); + + if (validate) { + if (isEmptyValue(value) && !rule.required) { + return callback(); + } + + rules.required(rule, value, source, errors, options); + + if (!isEmptyValue(value)) { + rules.type(rule, value, source, errors, options); + } + } + + callback(errors); +} + +/** + * Validates a number is an integer. + * + * @param rule The validation rule. + * @param value The value of the field on the source object. + * @param callback The callback function. + * @param source The source object being validated. + * @param options The validation options. + * @param options.messages The validation messages. + */ + +function integer(rule, value, callback, source, options) { + var errors = []; + var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); + + if (validate) { + if (isEmptyValue(value) && !rule.required) { + return callback(); + } + + rules.required(rule, value, source, errors, options); + + if (value !== undefined) { + rules.type(rule, value, source, errors, options); + rules.range(rule, value, source, errors, options); + } + } + + callback(errors); +} + +/** + * Validates a number is a floating point number. + * + * @param rule The validation rule. + * @param value The value of the field on the source object. + * @param callback The callback function. + * @param source The source object being validated. + * @param options The validation options. + * @param options.messages The validation messages. + */ + +function floatFn(rule, value, callback, source, options) { + var errors = []; + var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); + + if (validate) { + if (isEmptyValue(value) && !rule.required) { + return callback(); + } + + rules.required(rule, value, source, errors, options); + + if (value !== undefined) { + rules.type(rule, value, source, errors, options); + rules.range(rule, value, source, errors, options); + } + } + + callback(errors); +} + +/** + * Validates an array. + * + * @param rule The validation rule. + * @param value The value of the field on the source object. + * @param callback The callback function. + * @param source The source object being validated. + * @param options The validation options. + * @param options.messages The validation messages. + */ + +function array(rule, value, callback, source, options) { + var errors = []; + var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); + + if (validate) { + if (isEmptyValue(value, 'array') && !rule.required) { + return callback(); + } + + rules.required(rule, value, source, errors, options, 'array'); + + if (!isEmptyValue(value, 'array')) { + rules.type(rule, value, source, errors, options); + rules.range(rule, value, source, errors, options); + } + } + + callback(errors); +} + +/** + * Validates an object. + * + * @param rule The validation rule. + * @param value The value of the field on the source object. + * @param callback The callback function. + * @param source The source object being validated. + * @param options The validation options. + * @param options.messages The validation messages. + */ + +function object(rule, value, callback, source, options) { + var errors = []; + var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); + + if (validate) { + if (isEmptyValue(value) && !rule.required) { + return callback(); + } + + rules.required(rule, value, source, errors, options); + + if (value !== undefined) { + rules.type(rule, value, source, errors, options); + } + } + + callback(errors); +} + +var ENUM$1 = 'enum'; +/** + * Validates an enumerable list. + * + * @param rule The validation rule. + * @param value The value of the field on the source object. + * @param callback The callback function. + * @param source The source object being validated. + * @param options The validation options. + * @param options.messages The validation messages. + */ + +function enumerable$1(rule, value, callback, source, options) { + var errors = []; + var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); + + if (validate) { + if (isEmptyValue(value) && !rule.required) { + return callback(); + } + + rules.required(rule, value, source, errors, options); + + if (value !== undefined) { + rules[ENUM$1](rule, value, source, errors, options); + } + } + + callback(errors); +} + +/** + * Validates a regular expression pattern. + * + * Performs validation when a rule only contains + * a pattern property but is not declared as a string type. + * + * @param rule The validation rule. + * @param value The value of the field on the source object. + * @param callback The callback function. + * @param source The source object being validated. + * @param options The validation options. + * @param options.messages The validation messages. + */ + +function pattern$2(rule, value, callback, source, options) { + var errors = []; + var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); + + if (validate) { + if (isEmptyValue(value, 'string') && !rule.required) { + return callback(); + } + + rules.required(rule, value, source, errors, options); + + if (!isEmptyValue(value, 'string')) { + rules.pattern(rule, value, source, errors, options); + } + } + + callback(errors); +} + +function date(rule, value, callback, source, options) { + var errors = []; + var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); + + if (validate) { + if (isEmptyValue(value) && !rule.required) { + return callback(); + } + + rules.required(rule, value, source, errors, options); + + if (!isEmptyValue(value)) { + var dateObject; + + if (typeof value === 'number') { + dateObject = new Date(value); + } else { + dateObject = value; + } + + rules.type(rule, dateObject, source, errors, options); + + if (dateObject) { + rules.range(rule, dateObject.getTime(), source, errors, options); + } + } + } + + callback(errors); +} + +function required$1(rule, value, callback, source, options) { + var errors = []; + var type = Array.isArray(value) ? 'array' : typeof value; + rules.required(rule, value, source, errors, options, type); + callback(errors); +} + +function type$1(rule, value, callback, source, options) { + var ruleType = rule.type; + var errors = []; + var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); + + if (validate) { + if (isEmptyValue(value, ruleType) && !rule.required) { + return callback(); + } + + rules.required(rule, value, source, errors, options, ruleType); + + if (!isEmptyValue(value, ruleType)) { + rules.type(rule, value, source, errors, options); + } + } + + callback(errors); +} + +/** + * Performs validation for any type. + * + * @param rule The validation rule. + * @param value The value of the field on the source object. + * @param callback The callback function. + * @param source The source object being validated. + * @param options The validation options. + * @param options.messages The validation messages. + */ + +function any(rule, value, callback, source, options) { + var errors = []; + var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); + + if (validate) { + if (isEmptyValue(value) && !rule.required) { + return callback(); + } + + rules.required(rule, value, source, errors, options); + } + + callback(errors); +} + +var validators = { + string: string, + method: method, + number: number, + "boolean": _boolean, + regexp: regexp, + integer: integer, + "float": floatFn, + array: array, + object: object, + "enum": enumerable$1, + pattern: pattern$2, + date: date, + url: type$1, + hex: type$1, + email: type$1, + required: required$1, + any: any +}; + +function newMessages() { + return { + "default": 'Validation error on field %s', + required: '%s is required', + "enum": '%s must be one of %s', + whitespace: '%s cannot be empty', + date: { + format: '%s date %s is invalid for format %s', + parse: '%s date could not be parsed, %s is invalid ', + invalid: '%s date %s is invalid' + }, + types: { + string: '%s is not a %s', + method: '%s is not a %s (function)', + array: '%s is not an %s', + object: '%s is not an %s', + number: '%s is not a %s', + date: '%s is not a %s', + "boolean": '%s is not a %s', + integer: '%s is not an %s', + "float": '%s is not a %s', + regexp: '%s is not a valid %s', + email: '%s is not a valid %s', + url: '%s is not a valid %s', + hex: '%s is not a valid %s' + }, + string: { + len: '%s must be exactly %s characters', + min: '%s must be at least %s characters', + max: '%s cannot be longer than %s characters', + range: '%s must be between %s and %s characters' + }, + number: { + len: '%s must equal %s', + min: '%s cannot be less than %s', + max: '%s cannot be greater than %s', + range: '%s must be between %s and %s' + }, + array: { + len: '%s must be exactly %s in length', + min: '%s cannot be less than %s in length', + max: '%s cannot be greater than %s in length', + range: '%s must be between %s and %s in length' + }, + pattern: { + mismatch: '%s value %s does not match pattern %s' + }, + clone: function clone() { + var cloned = JSON.parse(JSON.stringify(this)); + cloned.clone = this.clone; + return cloned; + } + }; +} +var messages = newMessages(); + +/** + * Encapsulates a validation schema. + * + * @param descriptor An object declaring validation rules + * for this schema. + */ + +function Schema(descriptor) { + this.rules = null; + this._messages = messages; + this.define(descriptor); +} + +Schema.prototype = { + messages: function messages(_messages) { + if (_messages) { + this._messages = deepMerge(newMessages(), _messages); + } + + return this._messages; + }, + define: function define(rules) { + if (!rules) { + throw new Error('Cannot configure a schema with no rules'); + } + + if (typeof rules !== 'object' || Array.isArray(rules)) { + throw new Error('Rules must be an object'); + } + + this.rules = {}; + var z; + var item; + + for (z in rules) { + if (rules.hasOwnProperty(z)) { + item = rules[z]; + this.rules[z] = Array.isArray(item) ? item : [item]; + } + } + }, + validate: function validate(source_, o, oc) { + var _this = this; + + if (o === void 0) { + o = {}; + } + + if (oc === void 0) { + oc = function oc() {}; + } + + var source = source_; + var options = o; + var callback = oc; + + if (typeof options === 'function') { + callback = options; + options = {}; + } + + if (!this.rules || Object.keys(this.rules).length === 0) { + if (callback) { + callback(); + } + + return Promise.resolve(); + } + + function complete(results) { + var i; + var errors = []; + var fields = {}; + + function add(e) { + if (Array.isArray(e)) { + var _errors; + + errors = (_errors = errors).concat.apply(_errors, e); + } else { + errors.push(e); + } + } + + for (i = 0; i < results.length; i++) { + add(results[i]); + } + + if (!errors.length) { + errors = null; + fields = null; + } else { + fields = convertFieldsError(errors); + } + + callback(errors, fields); + } + + if (options.messages) { + var messages$1 = this.messages(); + + if (messages$1 === messages) { + messages$1 = newMessages(); + } + + deepMerge(messages$1, options.messages); + options.messages = messages$1; + } else { + options.messages = this.messages(); + } + + var arr; + var value; + var series = {}; + var keys = options.keys || Object.keys(this.rules); + keys.forEach(function(z) { + arr = _this.rules[z]; + value = source[z]; + arr.forEach(function(r) { + var rule = r; + + if (typeof rule.transform === 'function') { + if (source === source_) { + source = _extends({}, source); + } + + value = source[z] = rule.transform(value); + } + + if (typeof rule === 'function') { + rule = { + validator: rule + }; + } else { + rule = _extends({}, rule); + } + + rule.validator = _this.getValidationMethod(rule); + rule.field = z; + rule.fullField = rule.fullField || z; + rule.type = _this.getType(rule); + + if (!rule.validator) { + return; + } + + series[z] = series[z] || []; + series[z].push({ + rule: rule, + value: value, + source: source, + field: z + }); + }); + }); + var errorFields = {}; + return asyncMap(series, options, function(data, doIt) { + var rule = data.rule; + var deep = (rule.type === 'object' || rule.type === 'array') && (typeof rule.fields === 'object' || typeof rule.defaultField === + 'object'); + deep = deep && (rule.required || !rule.required && data.value); + rule.field = data.field; + + function addFullfield(key, schema) { + return _extends({}, schema, { + fullField: rule.fullField + "." + key + }); + } + + function cb(e) { + if (e === void 0) { + e = []; + } + + var errors = e; + + if (!Array.isArray(errors)) { + errors = [errors]; + } + + if (!options.suppressWarning && errors.length) { + Schema.warning('async-validator:', errors); + } + + if (errors.length && rule.message) { + errors = [].concat(rule.message); + } + + errors = errors.map(complementError(rule)); + + if (options.first && errors.length) { + errorFields[rule.field] = 1; + return doIt(errors); + } + + if (!deep) { + doIt(errors); + } else { + // if rule is required but the target object + // does not exist fail at the rule level and don't + // go deeper + if (rule.required && !data.value) { + if (rule.message) { + errors = [].concat(rule.message).map(complementError(rule)); + } else if (options.error) { + errors = [options.error(rule, format(options.messages.required, rule.field))]; + } else { + errors = []; + } + + return doIt(errors); + } + + var fieldsSchema = {}; + + if (rule.defaultField) { + for (var k in data.value) { + if (data.value.hasOwnProperty(k)) { + fieldsSchema[k] = rule.defaultField; + } + } + } + + fieldsSchema = _extends({}, fieldsSchema, {}, data.rule.fields); + + for (var f in fieldsSchema) { + if (fieldsSchema.hasOwnProperty(f)) { + var fieldSchema = Array.isArray(fieldsSchema[f]) ? fieldsSchema[f] : [fieldsSchema[f]]; + fieldsSchema[f] = fieldSchema.map(addFullfield.bind(null, f)); + } + } + + var schema = new Schema(fieldsSchema); + schema.messages(options.messages); + + if (data.rule.options) { + data.rule.options.messages = options.messages; + data.rule.options.error = options.error; + } + + schema.validate(data.value, data.rule.options || options, function(errs) { + var finalErrors = []; + + if (errors && errors.length) { + finalErrors.push.apply(finalErrors, errors); + } + + if (errs && errs.length) { + finalErrors.push.apply(finalErrors, errs); + } + + doIt(finalErrors.length ? finalErrors : null); + }); + } + } + + var res; + + if (rule.asyncValidator) { + res = rule.asyncValidator(rule, data.value, cb, data.source, options); + } else if (rule.validator) { + res = rule.validator(rule, data.value, cb, data.source, options); + + if (res === true) { + cb(); + } else if (res === false) { + cb(rule.message || rule.field + " fails"); + } else if (res instanceof Array) { + cb(res); + } else if (res instanceof Error) { + cb(res.message); + } + } + + if (res && res.then) { + res.then(function() { + return cb(); + }, function(e) { + return cb(e); + }); + } + }, function(results) { + complete(results); + }); + }, + getType: function getType(rule) { + if (rule.type === undefined && rule.pattern instanceof RegExp) { + rule.type = 'pattern'; + } + + if (typeof rule.validator !== 'function' && rule.type && !validators.hasOwnProperty(rule.type)) { + throw new Error(format('Unknown rule type %s', rule.type)); + } + + return rule.type || 'string'; + }, + getValidationMethod: function getValidationMethod(rule) { + if (typeof rule.validator === 'function') { + return rule.validator; + } + + var keys = Object.keys(rule); + var messageIndex = keys.indexOf('message'); + + if (messageIndex !== -1) { + keys.splice(messageIndex, 1); + } + + if (keys.length === 1 && keys[0] === 'required') { + return validators.required; + } + + return validators[this.getType(rule)] || false; + } +}; + +Schema.register = function register(type, validator) { + if (typeof validator !== 'function') { + throw new Error('Cannot register a validator by type, validator is not a function'); + } + + validators[type] = validator; +}; + +Schema.warning = warning; +Schema.messages = messages; + +export default Schema; +//# sourceMappingURL=index.js.map diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/util/city.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/util/city.js" new file mode 100644 index 0000000..94169eb --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/util/city.js" @@ -0,0 +1 @@ +var cityData=[[{"label":"甯傝緰鍖�","value":"1101"}],[{"label":"甯傝緰鍖�","value":"1201"}],[{"label":"鐭冲搴勫競","value":"1301"},{"label":"鍞愬北甯�","value":"1302"},{"label":"绉︾殗宀涘競","value":"1303"},{"label":"閭兏甯�","value":"1304"},{"label":"閭㈠彴甯�","value":"1305"},{"label":"淇濆畾甯�","value":"1306"},{"label":"寮犲鍙e競","value":"1307"},{"label":"鎵垮痉甯�","value":"1308"},{"label":"娌у窞甯�","value":"1309"},{"label":"寤婂潑甯�","value":"1310"},{"label":"琛℃按甯�","value":"1311"}],[{"label":"澶師甯�","value":"1401"},{"label":"澶у悓甯�","value":"1402"},{"label":"闃虫硥甯�","value":"1403"},{"label":"闀挎不甯�","value":"1404"},{"label":"鏅嬪煄甯�","value":"1405"},{"label":"鏈斿窞甯�","value":"1406"},{"label":"鏅嬩腑甯�","value":"1407"},{"label":"杩愬煄甯�","value":"1408"},{"label":"蹇诲窞甯�","value":"1409"},{"label":"涓存本甯�","value":"1410"},{"label":"鍚曟甯�","value":"1411"}],[{"label":"鍛煎拰娴╃壒甯�","value":"1501"},{"label":"鍖呭ご甯�","value":"1502"},{"label":"涔屾捣甯�","value":"1503"},{"label":"璧ゅ嘲甯�","value":"1504"},{"label":"閫氳窘甯�","value":"1505"},{"label":"閯傚皵澶氭柉甯�","value":"1506"},{"label":"鍛间鸡璐濆皵甯�","value":"1507"},{"label":"宸村溅娣栧皵甯�","value":"1508"},{"label":"涔屽叞瀵熷竷甯�","value":"1509"},{"label":"鍏村畨鐩�","value":"1522"},{"label":"閿℃灄閮嫆鐩�","value":"1525"},{"label":"闃挎媺鍠勭洘","value":"1529"}],[{"label":"娌堥槼甯�","value":"2101"},{"label":"澶ц繛甯�","value":"2102"},{"label":"闉嶅北甯�","value":"2103"},{"label":"鎶氶『甯�","value":"2104"},{"label":"鏈邯甯�","value":"2105"},{"label":"涓逛笢甯�","value":"2106"},{"label":"閿﹀窞甯�","value":"2107"},{"label":"钀ュ彛甯�","value":"2108"},{"label":"闃滄柊甯�","value":"2109"},{"label":"杈介槼甯�","value":"2110"},{"label":"鐩橀敠甯�","value":"2111"},{"label":"閾佸箔甯�","value":"2112"},{"label":"鏈濋槼甯�","value":"2113"},{"label":"钁姦宀涘競","value":"2114"}],[{"label":"闀挎槬甯�","value":"2201"},{"label":"鍚夋灄甯�","value":"2202"},{"label":"鍥涘钩甯�","value":"2203"},{"label":"杈芥簮甯�","value":"2204"},{"label":"閫氬寲甯�","value":"2205"},{"label":"鐧藉北甯�","value":"2206"},{"label":"鏉惧師甯�","value":"2207"},{"label":"鐧藉煄甯�","value":"2208"},{"label":"寤惰竟鏈濋矞鏃忚嚜娌诲窞","value":"2224"}],[{"label":"鍝堝皵婊ㄥ競","value":"2301"},{"label":"榻愰綈鍝堝皵甯�","value":"2302"},{"label":"楦¤タ甯�","value":"2303"},{"label":"楣ゅ矖甯�","value":"2304"},{"label":"鍙岄腑灞卞競","value":"2305"},{"label":"澶у簡甯�","value":"2306"},{"label":"浼婃槬甯�","value":"2307"},{"label":"浣虫湪鏂競","value":"2308"},{"label":"涓冨彴娌冲競","value":"2309"},{"label":"鐗′腹姹熷競","value":"2310"},{"label":"榛戞渤甯�","value":"2311"},{"label":"缁ュ寲甯�","value":"2312"},{"label":"澶у叴瀹夊箔鍦板尯","value":"2327"}],[{"label":"甯傝緰鍖�","value":"3101"}],[{"label":"鍗椾含甯�","value":"3201"},{"label":"鏃犻敗甯�","value":"3202"},{"label":"寰愬窞甯�","value":"3203"},{"label":"甯稿窞甯�","value":"3204"},{"label":"鑻忓窞甯�","value":"3205"},{"label":"鍗楅�氬競","value":"3206"},{"label":"杩炰簯娓競","value":"3207"},{"label":"娣畨甯�","value":"3208"},{"label":"鐩愬煄甯�","value":"3209"},{"label":"鎵窞甯�","value":"3210"},{"label":"闀囨睙甯�","value":"3211"},{"label":"娉板窞甯�","value":"3212"},{"label":"瀹胯縼甯�","value":"3213"}],[{"label":"鏉窞甯�","value":"3301"},{"label":"瀹佹尝甯�","value":"3302"},{"label":"娓╁窞甯�","value":"3303"},{"label":"鍢夊叴甯�","value":"3304"},{"label":"婀栧窞甯�","value":"3305"},{"label":"缁嶅叴甯�","value":"3306"},{"label":"閲戝崕甯�","value":"3307"},{"label":"琛㈠窞甯�","value":"3308"},{"label":"鑸熷北甯�","value":"3309"},{"label":"鍙板窞甯�","value":"3310"},{"label":"涓芥按甯�","value":"3311"}],[{"label":"鍚堣偉甯�","value":"3401"},{"label":"鑺滄箹甯�","value":"3402"},{"label":"铓屽煚甯�","value":"3403"},{"label":"娣崡甯�","value":"3404"},{"label":"椹瀺灞卞競","value":"3405"},{"label":"娣寳甯�","value":"3406"},{"label":"閾滈櫟甯�","value":"3407"},{"label":"瀹夊簡甯�","value":"3408"},{"label":"榛勫北甯�","value":"3410"},{"label":"婊佸窞甯�","value":"3411"},{"label":"闃滈槼甯�","value":"3412"},{"label":"瀹垮窞甯�","value":"3413"},{"label":"鍏畨甯�","value":"3415"},{"label":"浜冲窞甯�","value":"3416"},{"label":"姹犲窞甯�","value":"3417"},{"label":"瀹e煄甯�","value":"3418"}],[{"label":"绂忓窞甯�","value":"3501"},{"label":"鍘﹂棬甯�","value":"3502"},{"label":"鑾嗙敯甯�","value":"3503"},{"label":"涓夋槑甯�","value":"3504"},{"label":"娉夊窞甯�","value":"3505"},{"label":"婕冲窞甯�","value":"3506"},{"label":"鍗楀钩甯�","value":"3507"},{"label":"榫欏博甯�","value":"3508"},{"label":"瀹佸痉甯�","value":"3509"}],[{"label":"鍗楁槍甯�","value":"3601"},{"label":"鏅痉闀囧競","value":"3602"},{"label":"钀嶄埂甯�","value":"3603"},{"label":"涔濇睙甯�","value":"3604"},{"label":"鏂颁綑甯�","value":"3605"},{"label":"楣版江甯�","value":"3606"},{"label":"璧e窞甯�","value":"3607"},{"label":"鍚夊畨甯�","value":"3608"},{"label":"瀹滄槬甯�","value":"3609"},{"label":"鎶氬窞甯�","value":"3610"},{"label":"涓婇ザ甯�","value":"3611"}],[{"label":"娴庡崡甯�","value":"3701"},{"label":"闈掑矝甯�","value":"3702"},{"label":"娣勫崥甯�","value":"3703"},{"label":"鏋e簞甯�","value":"3704"},{"label":"涓滆惀甯�","value":"3705"},{"label":"鐑熷彴甯�","value":"3706"},{"label":"娼嶅潑甯�","value":"3707"},{"label":"娴庡畞甯�","value":"3708"},{"label":"娉板畨甯�","value":"3709"},{"label":"濞佹捣甯�","value":"3710"},{"label":"鏃ョ収甯�","value":"3711"},{"label":"鑾辫姕甯�","value":"3712"},{"label":"涓存矀甯�","value":"3713"},{"label":"寰峰窞甯�","value":"3714"},{"label":"鑱婂煄甯�","value":"3715"},{"label":"婊ㄥ窞甯�","value":"3716"},{"label":"鑿忔辰甯�","value":"3717"}],[{"label":"閮戝窞甯�","value":"4101"},{"label":"寮�灏佸競","value":"4102"},{"label":"娲涢槼甯�","value":"4103"},{"label":"骞抽《灞卞競","value":"4104"},{"label":"瀹夐槼甯�","value":"4105"},{"label":"楣ゅ甯�","value":"4106"},{"label":"鏂颁埂甯�","value":"4107"},{"label":"鐒︿綔甯�","value":"4108"},{"label":"婵槼甯�","value":"4109"},{"label":"璁告槍甯�","value":"4110"},{"label":"婕渤甯�","value":"4111"},{"label":"涓夐棬宄″競","value":"4112"},{"label":"鍗楅槼甯�","value":"4113"},{"label":"鍟嗕笜甯�","value":"4114"},{"label":"淇¢槼甯�","value":"4115"},{"label":"鍛ㄥ彛甯�","value":"4116"},{"label":"椹婚┈搴楀競","value":"4117"},{"label":"鐪佺洿杈栧幙绾ц鏀垮尯鍒�","value":"4190"}],[{"label":"姝︽眽甯�","value":"4201"},{"label":"榛勭煶甯�","value":"4202"},{"label":"鍗佸牥甯�","value":"4203"},{"label":"瀹滄槍甯�","value":"4205"},{"label":"瑗勯槼甯�","value":"4206"},{"label":"閯傚窞甯�","value":"4207"},{"label":"鑽嗛棬甯�","value":"4208"},{"label":"瀛濇劅甯�","value":"4209"},{"label":"鑽嗗窞甯�","value":"4210"},{"label":"榛勫唸甯�","value":"4211"},{"label":"鍜稿畞甯�","value":"4212"},{"label":"闅忓窞甯�","value":"4213"},{"label":"鎭╂柦鍦熷鏃忚嫍鏃忚嚜娌诲窞","value":"4228"},{"label":"鐪佺洿杈栧幙绾ц鏀垮尯鍒�","value":"4290"}],[{"label":"闀挎矙甯�","value":"4301"},{"label":"鏍床甯�","value":"4302"},{"label":"婀樻江甯�","value":"4303"},{"label":"琛¢槼甯�","value":"4304"},{"label":"閭甸槼甯�","value":"4305"},{"label":"宀抽槼甯�","value":"4306"},{"label":"甯稿痉甯�","value":"4307"},{"label":"寮犲鐣屽競","value":"4308"},{"label":"鐩婇槼甯�","value":"4309"},{"label":"閮村窞甯�","value":"4310"},{"label":"姘稿窞甯�","value":"4311"},{"label":"鎬�鍖栧競","value":"4312"},{"label":"濞勫簳甯�","value":"4313"},{"label":"婀樿タ鍦熷鏃忚嫍鏃忚嚜娌诲窞","value":"4331"}],[{"label":"骞垮窞甯�","value":"4401"},{"label":"闊跺叧甯�","value":"4402"},{"label":"娣卞湷甯�","value":"4403"},{"label":"鐝犳捣甯�","value":"4404"},{"label":"姹曞ご甯�","value":"4405"},{"label":"浣涘北甯�","value":"4406"},{"label":"姹熼棬甯�","value":"4407"},{"label":"婀涙睙甯�","value":"4408"},{"label":"鑼傚悕甯�","value":"4409"},{"label":"鑲囧簡甯�","value":"4412"},{"label":"鎯犲窞甯�","value":"4413"},{"label":"姊呭窞甯�","value":"4414"},{"label":"姹曞熬甯�","value":"4415"},{"label":"娌虫簮甯�","value":"4416"},{"label":"闃虫睙甯�","value":"4417"},{"label":"娓呰繙甯�","value":"4418"},{"label":"涓滆帪甯�","value":"4419"},{"label":"涓北甯�","value":"4420"},{"label":"娼窞甯�","value":"4451"},{"label":"鎻槼甯�","value":"4452"},{"label":"浜戞诞甯�","value":"4453"}],[{"label":"鍗楀畞甯�","value":"4501"},{"label":"鏌冲窞甯�","value":"4502"},{"label":"妗傛灄甯�","value":"4503"},{"label":"姊у窞甯�","value":"4504"},{"label":"鍖楁捣甯�","value":"4505"},{"label":"闃插煄娓競","value":"4506"},{"label":"閽﹀窞甯�","value":"4507"},{"label":"璐垫腐甯�","value":"4508"},{"label":"鐜夋灄甯�","value":"4509"},{"label":"鐧捐壊甯�","value":"4510"},{"label":"璐哄窞甯�","value":"4511"},{"label":"娌虫睜甯�","value":"4512"},{"label":"鏉ュ甯�","value":"4513"},{"label":"宕囧乏甯�","value":"4514"}],[{"label":"娴峰彛甯�","value":"4601"},{"label":"涓変簹甯�","value":"4602"},{"label":"涓夋矙甯�","value":"4603"},{"label":"鍎嬪窞甯�","value":"4604"},{"label":"鐪佺洿杈栧幙绾ц鏀垮尯鍒�","value":"4690"}],[{"label":"甯傝緰鍖�","value":"5001"},{"label":"鍘�","value":"5002"}],[{"label":"鎴愰兘甯�","value":"5101"},{"label":"鑷础甯�","value":"5103"},{"label":"鏀�鏋濊姳甯�","value":"5104"},{"label":"娉稿窞甯�","value":"5105"},{"label":"寰烽槼甯�","value":"5106"},{"label":"缁甸槼甯�","value":"5107"},{"label":"骞垮厓甯�","value":"5108"},{"label":"閬傚畞甯�","value":"5109"},{"label":"鍐呮睙甯�","value":"5110"},{"label":"涔愬北甯�","value":"5111"},{"label":"鍗楀厖甯�","value":"5113"},{"label":"鐪夊北甯�","value":"5114"},{"label":"瀹滃甯�","value":"5115"},{"label":"骞垮畨甯�","value":"5116"},{"label":"杈惧窞甯�","value":"5117"},{"label":"闆呭畨甯�","value":"5118"},{"label":"宸翠腑甯�","value":"5119"},{"label":"璧勯槼甯�","value":"5120"},{"label":"闃垮潩钘忔棌缇屾棌鑷不宸�","value":"5132"},{"label":"鐢樺瓬钘忔棌鑷不宸�","value":"5133"},{"label":"鍑夊北褰濇棌鑷不宸�","value":"5134"}],[{"label":"璐甸槼甯�","value":"5201"},{"label":"鍏洏姘村競","value":"5202"},{"label":"閬典箟甯�","value":"5203"},{"label":"瀹夐『甯�","value":"5204"},{"label":"姣曡妭甯�","value":"5205"},{"label":"閾滀粊甯�","value":"5206"},{"label":"榛旇タ鍗楀竷渚濇棌鑻楁棌鑷不宸�","value":"5223"},{"label":"榛斾笢鍗楄嫍鏃忎緱鏃忚嚜娌诲窞","value":"5226"},{"label":"榛斿崡甯冧緷鏃忚嫍鏃忚嚜娌诲窞","value":"5227"}],[{"label":"鏄嗘槑甯�","value":"5301"},{"label":"鏇查潠甯�","value":"5303"},{"label":"鐜夋邯甯�","value":"5304"},{"label":"淇濆北甯�","value":"5305"},{"label":"鏄�氬競","value":"5306"},{"label":"涓芥睙甯�","value":"5307"},{"label":"鏅幢甯�","value":"5308"},{"label":"涓存钵甯�","value":"5309"},{"label":"妤氶泟褰濇棌鑷不宸�","value":"5323"},{"label":"绾㈡渤鍝堝凹鏃忓綕鏃忚嚜娌诲窞","value":"5325"},{"label":"鏂囧北澹棌鑻楁棌鑷不宸�","value":"5326"},{"label":"瑗垮弻鐗堢撼鍌f棌鑷不宸�","value":"5328"},{"label":"澶х悊鐧芥棌鑷不宸�","value":"5329"},{"label":"寰峰畯鍌f棌鏅鏃忚嚜娌诲窞","value":"5331"},{"label":"鎬掓睙鍌堝兂鏃忚嚜娌诲窞","value":"5333"},{"label":"杩簡钘忔棌鑷不宸�","value":"5334"}],[{"label":"鎷夎惃甯�","value":"5401"},{"label":"鏃ュ杸鍒欏競","value":"5402"},{"label":"鏄岄兘甯�","value":"5403"},{"label":"鏋楄姖甯�","value":"5404"},{"label":"灞卞崡甯�","value":"5405"},{"label":"閭f洸鍦板尯","value":"5424"},{"label":"闃块噷鍦板尯","value":"5425"}],[{"label":"瑗垮畨甯�","value":"6101"},{"label":"閾滃窛甯�","value":"6102"},{"label":"瀹濋浮甯�","value":"6103"},{"label":"鍜搁槼甯�","value":"6104"},{"label":"娓崡甯�","value":"6105"},{"label":"寤跺畨甯�","value":"6106"},{"label":"姹変腑甯�","value":"6107"},{"label":"姒嗘灄甯�","value":"6108"},{"label":"瀹夊悍甯�","value":"6109"},{"label":"鍟嗘礇甯�","value":"6110"}],[{"label":"鍏板窞甯�","value":"6201"},{"label":"鍢夊唱鍏冲競","value":"6202"},{"label":"閲戞槍甯�","value":"6203"},{"label":"鐧介摱甯�","value":"6204"},{"label":"澶╂按甯�","value":"6205"},{"label":"姝﹀▉甯�","value":"6206"},{"label":"寮犳帠甯�","value":"6207"},{"label":"骞冲噳甯�","value":"6208"},{"label":"閰掓硥甯�","value":"6209"},{"label":"搴嗛槼甯�","value":"6210"},{"label":"瀹氳タ甯�","value":"6211"},{"label":"闄囧崡甯�","value":"6212"},{"label":"涓村鍥炴棌鑷不宸�","value":"6229"},{"label":"鐢樺崡钘忔棌鑷不宸�","value":"6230"}],[{"label":"瑗垮畞甯�","value":"6301"},{"label":"娴蜂笢甯�","value":"6302"},{"label":"娴峰寳钘忔棌鑷不宸�","value":"6322"},{"label":"榛勫崡钘忔棌鑷不宸�","value":"6323"},{"label":"娴峰崡钘忔棌鑷不宸�","value":"6325"},{"label":"鏋滄礇钘忔棌鑷不宸�","value":"6326"},{"label":"鐜夋爲钘忔棌鑷不宸�","value":"6327"},{"label":"娴疯タ钂欏彜鏃忚棌鏃忚嚜娌诲窞","value":"6328"}],[{"label":"閾跺窛甯�","value":"6401"},{"label":"鐭冲槾灞卞競","value":"6402"},{"label":"鍚村繝甯�","value":"6403"},{"label":"鍥哄師甯�","value":"6404"},{"label":"涓崼甯�","value":"6405"}],[{"label":"涔岄瞾鏈ㄩ綈甯�","value":"6501"},{"label":"鍏嬫媺鐜涗緷甯�","value":"6502"},{"label":"鍚愰瞾鐣競","value":"6504"},{"label":"鍝堝瘑甯�","value":"6505"},{"label":"鏄屽悏鍥炴棌鑷不宸�","value":"6523"},{"label":"鍗氬皵濉旀媺钂欏彜鑷不宸�","value":"6527"},{"label":"宸撮煶閮钂欏彜鑷不宸�","value":"6528"},{"label":"闃垮厠鑻忓湴鍖�","value":"6529"},{"label":"鍏嬪瓬鍕掕嫃鏌皵鍏嬪瓬鑷不宸�","value":"6530"},{"label":"鍠�浠�鍦板尯","value":"6531"},{"label":"鍜岀敯鍦板尯","value":"6532"},{"label":"浼婄妬鍝堣惃鍏嬭嚜娌诲窞","value":"6540"},{"label":"濉斿煄鍦板尯","value":"6542"},{"label":"闃垮嫆娉板湴鍖�","value":"6543"},{"label":"鑷不鍖虹洿杈栧幙绾ц鏀垮尯鍒�","value":"6590"}],[{"label":"鍙板寳","value":"6601"},{"label":"楂橀泟","value":"6602"},{"label":"鍩洪殕","value":"6603"},{"label":"鍙颁腑","value":"6604"},{"label":"鍙板崡","value":"6605"},{"label":"鏂扮","value":"6606"},{"label":"鍢変箟","value":"6607"},{"label":"瀹滃叞","value":"6608"},{"label":"妗冨洯","value":"6609"},{"label":"鑻楁牀","value":"6610"},{"label":"褰板寲","value":"6611"},{"label":"鍗楁姇","value":"6612"},{"label":"浜戞灄","value":"6613"},{"label":"灞忎笢","value":"6614"},{"label":"鍙颁笢","value":"6615"},{"label":"鑺辫幉","value":"6616"},{"label":"婢庢箹","value":"6617"}],[{"label":"棣欐腐宀�","value":"6701"},{"label":"涔濋緳","value":"6702"},{"label":"鏂扮晫","value":"6703"}],[{"label":"婢抽棬鍗婂矝","value":"6801"},{"label":"姘逛粩宀�","value":"6802"},{"label":"璺幆宀�","value":"6803"},{"label":"璺肮鍩�","value":"6804"}]];export default cityData; \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/util/emitter.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/util/emitter.js" new file mode 100644 index 0000000..228016e --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/util/emitter.js" @@ -0,0 +1,51 @@ +/** + * 閫掑綊浣跨敤 call 鏂瑰紡this鎸囧悜 + * @param componentName // 闇�瑕佹壘鐨勭粍浠剁殑鍚嶇О + * @param eventName // 浜嬩欢鍚嶇О + * @param params // 闇�瑕佷紶閫掔殑鍙傛暟 + */ +function broadcast(componentName, eventName, params) { + // 寰幆瀛愯妭鐐规壘鍒板悕绉颁竴鏍风殑瀛愯妭鐐� 鍚﹀垯 閫掑綊 褰撳墠瀛愯妭鐐� + this.$children.map(child=>{ + if (componentName===child.$options.name) { + child.$emit.apply(child,[eventName].concat(params)) + }else { + broadcast.apply(child,[componentName,eventName].concat(params)) + } + }) +} +export default { + methods: { + /** + * 娲惧彂 (鍚戜笂鏌ユ壘) (涓�涓�) + * @param componentName // 闇�瑕佹壘鐨勭粍浠剁殑鍚嶇О + * @param eventName // 浜嬩欢鍚嶇О + * @param params // 闇�瑕佷紶閫掔殑鍙傛暟 + */ + dispatch(componentName, eventName, params) { + let parent = this.$parent || this.$root;//$parent 鎵惧埌鏈�杩戠殑鐖惰妭鐐� $root 鏍硅妭鐐� + let name = parent.$options.name; // 鑾峰彇褰撳墠缁勪欢瀹炰緥鐨刵ame + // 濡傛灉褰撳墠鏈夎妭鐐� && 褰撳墠娌″悕绉� 涓� 褰撳墠鍚嶇О绛変簬闇�瑕佷紶杩涙潵鐨勫悕绉扮殑鏃跺�欏氨鍘绘煡鎵惧綋鍓嶇殑鑺傜偣 + // 寰幆鍑哄綋鍓嶅悕绉扮殑涓�鏍风殑缁勪欢瀹炰緥 + while (parent && (!name||name!==componentName)) { + parent = parent.$parent; + if (parent) { + name = parent.$options.name; + } + } + // 鏈夎妭鐐硅〃绀哄綋鍓嶆壘鍒颁簡name涓�鏍风殑瀹炰緥 + if (parent) { + parent.$emit.apply(parent,[eventName].concat(params)) + } + }, + /** + * 骞挎挱 (鍚戜笅鏌ユ壘) (骞挎挱澶氫釜) + * @param componentName // 闇�瑕佹壘鐨勭粍浠剁殑鍚嶇О + * @param eventName // 浜嬩欢鍚嶇О + * @param params // 闇�瑕佷紶閫掔殑鍙傛暟 + */ + broadcast(componentName, eventName, params) { + broadcast.call(this,componentName, eventName, params) + } + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/util/province.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/util/province.js" new file mode 100644 index 0000000..436b190 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/libs/util/province.js" @@ -0,0 +1 @@ +var provinceData=[{"label":"鍖椾含甯�","value":"11"},{"label":"澶╂触甯�","value":"12"},{"label":"娌冲寳鐪�","value":"13"},{"label":"灞辫タ鐪�","value":"14"},{"label":"鍐呰挋鍙よ嚜娌诲尯","value":"15"},{"label":"杈藉畞鐪�","value":"21"},{"label":"鍚夋灄鐪�","value":"22"},{"label":"榛戦緳姹熺渷","value":"23"},{"label":"涓婃捣甯�","value":"31"},{"label":"姹熻嫃鐪�","value":"32"},{"label":"娴欐睙鐪�","value":"33"},{"label":"瀹夊窘鐪�","value":"34"},{"label":"绂忓缓鐪�","value":"35"},{"label":"姹熻タ鐪�","value":"36"},{"label":"灞变笢鐪�","value":"37"},{"label":"娌冲崡鐪�","value":"41"},{"label":"婀栧寳鐪�","value":"42"},{"label":"婀栧崡鐪�","value":"43"},{"label":"骞夸笢鐪�","value":"44"},{"label":"骞胯タ澹棌鑷不鍖�","value":"45"},{"label":"娴峰崡鐪�","value":"46"},{"label":"閲嶅簡甯�","value":"50"},{"label":"鍥涘窛鐪�","value":"51"},{"label":"璐靛窞鐪�","value":"52"},{"label":"浜戝崡鐪�","value":"53"},{"label":"瑗胯棌鑷不鍖�","value":"54"},{"label":"闄曡タ鐪�","value":"61"},{"label":"鐢樿們鐪�","value":"62"},{"label":"闈掓捣鐪�","value":"63"},{"label":"瀹佸鍥炴棌鑷不鍖�","value":"64"},{"label":"鏂扮枂缁村惥灏旇嚜娌诲尯","value":"65"},{"label":"鍙版咕","value":"66"},{"label":"棣欐腐","value":"67"},{"label":"婢抽棬","value":"68"}];export default provinceData; \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/package.json" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/package.json" new file mode 100644 index 0000000..dc0767c --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/package.json" @@ -0,0 +1,39 @@ +{ + "name": "uview-ui", + "version": "1.8.3", + "description": "uView UI锛屾槸uni-app鐢熸�佷紭绉�鐨刄I妗嗘灦锛屽叏闈㈢殑缁勪欢鍜屼究鎹风殑宸ュ叿浼氳鎮ㄤ俊鎵嬫媹鏉ワ紝濡傞奔寰楁按", + "main": "index.js", + "keywords": [ + "uview", + "uView", + "uni-app", + "uni-app ui", + "uniapp", + "uviewui", + "uview ui", + "uviewUI", + "uViewui", + "uViewUI", + "uView UI", + "uni ui", + "uni UI", + "uniapp ui", + "ui", + "UI妗嗘灦", + "uniapp ui妗嗘灦", + "uniapp UI" + ], + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "" + }, + "devDependencies": { + "node-sass": "^4.14.0", + "sass-loader": "^8.0.2" + }, + "author": "uView", + "license": "MIT" +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/theme.scss" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/theme.scss" new file mode 100644 index 0000000..f3bb36d --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/uview-ui/theme.scss" @@ -0,0 +1,38 @@ +// 姝ゆ枃浠朵负uView鐨勪富棰樺彉閲忥紝杩欎簺鍙橀噺鐩墠鍙兘閫氳繃uni.scss寮曞叆鎵嶆湁鏁堬紝鍙﹀鐢变簬 +// uni.scss涓紩鍏ョ殑鏍峰紡浼氬悓鏃舵贩鍏ュ埌鍏ㄥ眬鏍峰紡鏂囦欢鍜屽崟鐙瘡涓�涓〉闈㈢殑鏍峰紡涓紝閫犳垚寰俊绋嬪簭鍖呭お澶э紝 +// 鏁卽ni.scss鍙缓璁斁scss鍙橀噺鍚嶇浉鍏虫牱寮忥紝鍏朵粬鐨勬牱寮忓彲浠ラ�氳繃main.js鎴栬�匒pp.vue寮曞叆 + +$u-main-color: #303133; +$u-content-color: #606266; +$u-tips-color: #909399; +$u-light-color: #c0c4cc; +$u-border-color: #e4e7ed; +$u-bg-color: #f3f4f6; + +$u-type-primary: #2979ff; +$u-type-primary-light: #ecf5ff; +$u-type-primary-disabled: #a0cfff; +$u-type-primary-dark: #2b85e4; + +$u-type-warning: #ff9900; +$u-type-warning-disabled: #fcbd71; +$u-type-warning-dark: #f29100; +$u-type-warning-light: #fdf6ec; + +$u-type-success: #19be6b; +$u-type-success-disabled: #71d5a1; +$u-type-success-dark: #18b566; +$u-type-success-light: #dbf1e1; + +$u-type-error: #fa3534; +$u-type-error-disabled: #fab6b6; +$u-type-error-dark: #dd6161; +$u-type-error-light: #fef0f0; + +$u-type-info: #909399; +$u-type-info-disabled: #c8c9cc; +$u-type-info-dark: #82848a; +$u-type-info-light: #f4f4f5; + +$u-form-item-height: 70rpx; +$u-form-item-border-color: #dcdfe6; diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/vue.config.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/vue.config.js" new file mode 100644 index 0000000..91b7bf7 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/SMTPDA/vue.config.js" @@ -0,0 +1,8 @@ +module.exports = { + // 閰嶇疆璺緞鍒悕 + configureWebpack: { + devServer: { + disableHostCheck: true + } + } +} -- Gitblit v1.9.3