@10yun/cv-mobile-ui 0.5.29 → 0.5.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +5 -1
- package/plugins/luch-request/adapters/index.js +131 -0
- package/plugins/luch-request/core/InterceptorManager.js +50 -0
- package/plugins/luch-request/core/Request.js +199 -0
- package/plugins/luch-request/core/buildFullPath.js +20 -0
- package/plugins/luch-request/core/defaults.js +32 -0
- package/plugins/luch-request/core/dispatchRequest.js +5 -0
- package/plugins/luch-request/core/mergeConfig.js +125 -0
- package/plugins/luch-request/core/settle.js +16 -0
- package/plugins/luch-request/helpers/buildURL.js +71 -0
- package/plugins/luch-request/helpers/combineURLs.js +12 -0
- package/plugins/luch-request/helpers/isAbsoluteURL.js +14 -0
- package/plugins/luch-request/index.d.ts +197 -0
- package/plugins/luch-request/index.js +2 -0
- package/plugins/luch-request/readme.md +3 -0
- package/plugins/luch-request/utils/clone.js +264 -0
- package/plugins/luch-request/utils.js +131 -0
- package/plugins/request.js +2 -2
- package/ui-cv/components/cv-btn-base/cv-btn-base.vue +1 -1
- package/ui-cv/components/cv-form-item/cv-form-item.vue +1 -1
- package/ui-fireui/fui-actionsheet/fui-actionsheet.vue +202 -0
- package/ui-fireui/fui-alert/fui-alert.vue +141 -0
- package/ui-fireui/fui-badge/fui-badge.vue +158 -0
- package/ui-fireui/fui-bottom-navigation/fui-bottom-navigation.vue +390 -0
- package/ui-fireui/fui-bottom-popup/fui-bottom-popup.vue +100 -0
- package/ui-fireui/fui-bubble-popup/fui-bubble-popup.vue +236 -0
- package/ui-fireui/fui-button/fui-button.vue +424 -0
- package/ui-fireui/fui-calendar/fui-calendar.js +915 -0
- package/ui-fireui/fui-calendar/fui-calendar.vue +868 -0
- package/ui-fireui/fui-card/fui-card.vue +231 -0
- package/ui-fireui/fui-cascade-selection/fui-cascade-selection.vue +538 -0
- package/ui-fireui/fui-circular-progress/fui-circular-progress.vue +261 -0
- package/ui-fireui/fui-collapse/fui-collapse.vue +179 -0
- package/ui-fireui/fui-countdown/fui-countdown.vue +301 -0
- package/ui-fireui/fui-datetime/fui-datetime.vue +570 -0
- package/ui-fireui/fui-divider/fui-divider.vue +118 -0
- package/ui-fireui/fui-drawer/fui-drawer.vue +103 -0
- package/ui-fireui/fui-dropdown-list/fui-dropdown-list.vue +70 -0
- package/ui-fireui/fui-fab/fui-fab.vue +284 -0
- package/ui-fireui/fui-footer/fui-footer.vue +131 -0
- package/ui-fireui/fui-grid/fui-grid.vue +42 -0
- package/ui-fireui/fui-grid-item/fui-grid-item.vue +142 -0
- package/ui-fireui/fui-icon/fui-icon.vue +820 -0
- package/ui-fireui/fui-image-cropper/fui-image-cropper.vue +1058 -0
- package/ui-fireui/fui-image-group/fui-image-group.vue +149 -0
- package/ui-fireui/fui-keyboard/fui-keyboard.vue +254 -0
- package/ui-fireui/fui-keyboard-input/fui-keyboard-input.vue +78 -0
- package/ui-fireui/fui-list-cell/fui-list-cell.vue +178 -0
- package/ui-fireui/fui-list-view/fui-list-view.vue +87 -0
- package/ui-fireui/fui-loading/fui-loading.vue +78 -0
- package/ui-fireui/fui-loadmore/fui-loadmore.vue +163 -0
- package/ui-fireui/fui-modal/fui-modal.vue +392 -0
- package/ui-fireui/fui-navigation-bar/fui-navigation-bar.vue +180 -0
- package/ui-fireui/fui-no-data/fui-no-data.vue +116 -0
- package/ui-fireui/fui-nomore/fui-nomore.vue +116 -0
- package/ui-fireui/fui-numberbox/fui-numberbox.vue +234 -0
- package/ui-fireui/fui-numberbox-border/fui-numberbox-border.vue +232 -0
- package/ui-fireui/fui-picture-cropper/fui-picture-cropper.vue +682 -0
- package/ui-fireui/fui-picture-cropper/fui-picture-cropper.wxs +560 -0
- package/ui-fireui/fui-rate/fui-rate.vue +167 -0
- package/ui-fireui/fui-round-progress/fui-round-progress.vue +306 -0
- package/ui-fireui/fui-scroll-top/fui-scroll-top.vue +189 -0
- package/ui-fireui/fui-sharemodel/fui-sharemodel.vue +181 -0
- package/ui-fireui/fui-skeleton/fui-skeleton.vue +248 -0
- package/ui-fireui/fui-steps/fui-steps.vue +214 -0
- package/ui-fireui/fui-sticky/fui-sticky.vue +155 -0
- package/ui-fireui/fui-sticky-wxs/fui-sticky-wxs.vue +133 -0
- package/ui-fireui/fui-sticky-wxs/fui-sticky.wxs +44 -0
- package/ui-fireui/fui-swipe-action/fui-swipe-action.vue +301 -0
- package/ui-fireui/fui-tabbar/fui-tabbar.vue +283 -0
- package/ui-fireui/fui-tabs/fui-tabs.vue +284 -0
- package/ui-fireui/fui-tabs2/fui-tabs2.vue +284 -0
- package/ui-fireui/fui-tag/fui-tag.vue +374 -0
- package/ui-fireui/fui-time-axis/fui-time-axis.vue +36 -0
- package/ui-fireui/fui-timeaxis-item/fui-timeaxis-item.vue +48 -0
- package/ui-fireui/fui-tips/fui-tips.vue +161 -0
- package/ui-fireui/fui-toast/fui-toast.vue +117 -0
- package/ui-fireui/fui-top-dropdown/fui-top-dropdown.vue +129 -0
- package/ui-fireui/fui-upload/fui-upload.vue +446 -0
- package/ui-fireui/fui-uploadsamll/fui-uploadsamll.vue +472 -0
- package/uview-plus/README.md +2 -2
- package/uview-plus/changelog-wu-tool.md +21 -0
- package/uview-plus/changelog-wu.md +91 -0
- package/uview-plus/components/u-action-sheet/_doc/changelog.md +12 -0
- package/uview-plus/components/u-action-sheet/_doc/package.json +92 -0
- package/uview-plus/components/u-action-sheet/_doc/readme.md +16 -0
- package/uview-plus/components/u-action-sheet/u-action-sheet.vue +8 -8
- package/uview-plus/components/u-album/u-album.vue +1 -1
- package/uview-plus/components/u-alert/u-alert.vue +5 -5
- package/uview-plus/components/u-app-update/_doc/changelog.md +26 -0
- package/uview-plus/components/u-app-update/_doc/package.json +89 -0
- package/uview-plus/components/u-app-update/_doc/readme.md +16 -0
- package/uview-plus/components/u-app-update/config.js +120 -0
- package/uview-plus/components/u-app-update/img/act.png +0 -0
- package/uview-plus/components/u-app-update/img/appUploadAlertBoxBg.png +0 -0
- package/uview-plus/components/u-app-update/img/close.png +0 -0
- package/uview-plus/components/u-app-update/js-sdk/checkVersion.js +81 -0
- package/uview-plus/components/u-app-update/js-sdk/silentlyAppUpdate.js +41 -0
- package/uview-plus/components/u-app-update/pages/index.vue +8 -0
- package/uview-plus/components/u-app-update/u-app-update.vue +583 -0
- package/uview-plus/components/u-avatar/u-avatar.vue +2 -2
- package/uview-plus/components/u-avatar-group/u-avatar-group.vue +79 -3
- package/uview-plus/components/u-back-top/u-back-top.vue +4 -4
- package/uview-plus/components/u-badge/u-badge.vue +1 -1
- package/uview-plus/components/u-button/u-button.vue +8 -8
- package/uview-plus/components/u-button-wu/_doc/changelog.md +6 -0
- package/uview-plus/components/u-button-wu/_doc/package.json +89 -0
- package/uview-plus/components/u-button-wu/_doc/readme.md +16 -0
- package/uview-plus/components/u-button-wu/u-button-wu.vue +522 -0
- package/uview-plus/components/u-button-wu/vue.scss +81 -0
- package/uview-plus/components/u-calendar/u-calendar.vue +5 -6
- package/uview-plus/components/u-calendar-wu/_doc/changelog.md +145 -0
- package/uview-plus/components/u-calendar-wu/_doc/package.json +90 -0
- package/uview-plus/components/u-calendar-wu/_doc/readme.md +16 -0
- package/uview-plus/components/u-calendar-wu/calendar.js +664 -0
- package/uview-plus/components/u-calendar-wu/i18n/en.json +14 -0
- package/uview-plus/components/u-calendar-wu/i18n/index.js +8 -0
- package/uview-plus/components/u-calendar-wu/i18n/zh-Hans.json +14 -0
- package/uview-plus/components/u-calendar-wu/i18n/zh-Hant.json +14 -0
- package/uview-plus/components/u-calendar-wu/props.js +166 -0
- package/uview-plus/components/u-calendar-wu/style.css +196 -0
- package/uview-plus/components/u-calendar-wu/u-calendar-wu.vue +921 -0
- package/uview-plus/components/u-calendar-wu/util.js +552 -0
- package/uview-plus/components/u-calendar-wu/wu-calendar-block/props.js +73 -0
- package/uview-plus/components/u-calendar-wu/wu-calendar-block/wu-calendar-block.vue +122 -0
- package/uview-plus/components/u-calendar-wu/wu-calendar-item/props.js +55 -0
- package/uview-plus/components/u-calendar-wu/wu-calendar-item/wu-calendar-item.vue +293 -0
- package/uview-plus/components/u-car-keyboard/u-car-keyboard.vue +2 -2
- package/uview-plus/components/u-card/u-card.vue +139 -3
- package/uview-plus/components/u-cell/_doc/changelog.md +6 -0
- package/uview-plus/components/u-cell/_doc/package.json +89 -0
- package/uview-plus/components/u-cell/_doc/readme.md +25 -0
- package/uview-plus/components/u-cell/u-cell.vue +4 -4
- package/uview-plus/components/u-cell-group/u-cell-group.vue +2 -2
- package/uview-plus/components/u-checkbox/_doc/changelog.md +8 -0
- package/uview-plus/components/u-checkbox/_doc/package.json +88 -0
- package/uview-plus/components/u-checkbox/_doc/readme.md +25 -0
- package/uview-plus/components/u-checkbox/u-checkbox.vue +4 -4
- package/uview-plus/components/u-checkbox-group/u-checkbox-group.vue +1 -1
- package/uview-plus/components/u-code/_doc/changelog.md +6 -0
- package/uview-plus/components/u-code/_doc/package.json +86 -0
- package/uview-plus/components/u-code/_doc/readme.md +16 -0
- package/uview-plus/components/u-code/u-code.vue +1 -1
- package/uview-plus/components/u-code-input/u-code-input.vue +1 -1
- package/uview-plus/components/u-col/u-col.vue +1 -1
- package/uview-plus/components/u-collapse/u-collapse.vue +2 -2
- package/uview-plus/components/u-collapse-item/u-collapse-item.vue +218 -3
- package/uview-plus/components/u-column-notice/u-column-notice.vue +3 -3
- package/uview-plus/components/u-count-down/u-count-down.vue +1 -1
- package/uview-plus/components/u-count-to/u-count-to.vue +1 -1
- package/uview-plus/components/u-datetime-picker/u-datetime-picker.vue +3 -3
- package/uview-plus/components/u-divider/u-divider.vue +3 -3
- package/uview-plus/components/u-drag-sort/_doc/changelog.md +0 -0
- package/uview-plus/components/u-drag-sort/_doc/package.json +85 -0
- package/uview-plus/components/u-drag-sort/_doc/readme.md +16 -0
- package/uview-plus/components/u-drag-sort/u-drag-sort.vue +3 -0
- package/uview-plus/components/u-dropdown/u-dropdown.vue +3 -3
- package/uview-plus/components/u-dropdown-item/u-dropdown-item.vue +1 -1
- package/uview-plus/components/u-empty/u-empty.vue +30 -4
- package/uview-plus/components/u-form-item/u-form-item.vue +4 -4
- package/uview-plus/components/u-gap/_doc/changelog.md +4 -0
- package/uview-plus/components/u-gap/_doc/package.json +86 -0
- package/uview-plus/components/u-gap/_doc/readme.md +22 -0
- package/uview-plus/components/u-gap/u-gap.vue +1 -1
- package/uview-plus/components/u-grid/u-grid.vue +1 -1
- package/uview-plus/components/u-grid-item/u-grid-item.vue +1 -1
- package/uview-plus/components/u-icon/_doc/changelog.md +10 -0
- package/uview-plus/components/u-icon/_doc/package.json +85 -0
- package/uview-plus/components/u-icon/_doc/readme.md +10 -0
- package/uview-plus/components/u-icon/icon.js +23 -25
- package/uview-plus/components/u-icon/icons.js +213 -213
- package/uview-plus/components/u-icon/style.css +3 -3
- package/uview-plus/components/u-icon/u-icon.vue +1 -1
- package/uview-plus/components/u-icon/u-icon2.vue +149 -0
- package/uview-plus/components/u-image/u-image.vue +5 -5
- package/uview-plus/components/u-image-wu/_doc/changelog.md +21 -0
- package/uview-plus/components/u-image-wu/_doc/package.json +88 -0
- package/uview-plus/components/u-image-wu/_doc/readme.md +11 -0
- package/uview-plus/components/u-image-wu/props.js +94 -0
- package/uview-plus/components/u-image-wu/u-image-wu.vue +243 -0
- package/uview-plus/components/u-index-anchor/u-index-anchor.vue +1 -1
- package/uview-plus/components/u-index-list/u-index-list.vue +2 -2
- package/uview-plus/components/u-input/_doc/changelog.md +6 -0
- package/uview-plus/components/u-input/_doc/package.json +88 -0
- package/uview-plus/components/u-input/_doc/readme.md +16 -0
- package/uview-plus/components/u-input/u-input.vue +4 -4
- package/uview-plus/components/u-keyboard/u-keyboard.vue +6 -6
- package/uview-plus/components/u-lazy-load/u-lazy-load.vue +257 -3
- package/uview-plus/components/u-line/_doc/changelog.md +8 -0
- package/uview-plus/components/u-line/_doc/package.json +86 -0
- package/uview-plus/components/u-line/_doc/readme.md +16 -0
- package/uview-plus/components/u-line/u-line.vue +1 -1
- package/uview-plus/components/u-line-progress/u-line-progress.vue +1 -1
- package/uview-plus/components/u-link/_doc/changelog.md +8 -0
- package/uview-plus/components/u-link/_doc/package.json +86 -0
- package/uview-plus/components/u-link/_doc/readme.md +20 -0
- package/uview-plus/components/u-link/u-link.vue +1 -1
- package/uview-plus/components/u-list/u-list.vue +1 -1
- package/uview-plus/components/u-list-item/u-list-item.vue +1 -1
- package/uview-plus/components/u-loading-icon/_doc/changelog.md +12 -0
- package/uview-plus/components/u-loading-icon/_doc/package.json +86 -0
- package/uview-plus/components/u-loading-icon/_doc/readme.md +16 -0
- package/uview-plus/components/u-loading-icon/props.js +1 -1
- package/uview-plus/components/u-loading-icon/u-loading-icon.vue +191 -3
- package/uview-plus/components/u-loading-page/u-loading-page.vue +4 -4
- package/uview-plus/components/u-loadmore/u-loadmore.vue +4 -4
- package/uview-plus/components/u-mask/u-mask.vue +120 -113
- package/uview-plus/components/u-message-input/u-message-input.vue +1 -1
- package/uview-plus/components/u-modal/u-modal.vue +6 -6
- package/uview-plus/components/u-navbar/_doc/changelog.md +6 -0
- package/uview-plus/components/u-navbar/_doc/package.json +89 -0
- package/uview-plus/components/u-navbar/_doc/readme.md +16 -0
- package/uview-plus/components/u-navbar/u-navbar.vue +4 -4
- package/uview-plus/components/u-navbar-mini/u-navbar-mini.vue +2 -2
- package/uview-plus/components/u-navbar-wu/props.js +102 -0
- package/uview-plus/components/u-navbar-wu/u-navbar-wu.vue +196 -0
- package/uview-plus/components/u-no-network/u-no-network.vue +5 -5
- package/uview-plus/components/u-notice-bar/u-notice-bar.vue +5 -5
- package/uview-plus/components/u-notify/u-notify.vue +6 -6
- package/uview-plus/components/u-number-box/_doc/changelog.md +19 -0
- package/uview-plus/components/u-number-box/_doc/package.json +88 -0
- package/uview-plus/components/u-number-box/_doc/readme.md +16 -0
- package/uview-plus/components/u-number-box/u-number-box.vue +9 -3
- package/uview-plus/components/u-number-keyboard/u-number-keyboard.vue +1 -1
- package/uview-plus/components/u-overlay/_doc/changelog.md +4 -0
- package/uview-plus/components/u-overlay/_doc/package.json +88 -0
- package/uview-plus/components/u-overlay/_doc/readme.md +16 -0
- package/uview-plus/components/u-overlay/u-overlay.vue +3 -3
- package/uview-plus/components/u-picker/u-picker.vue +5 -5
- package/uview-plus/components/u-popup/_doc/changelog.md +4 -0
- package/uview-plus/components/u-popup/_doc/package.json +92 -0
- package/uview-plus/components/u-popup/_doc/readme.md +16 -0
- package/uview-plus/components/u-popup/u-popup.vue +8 -8
- package/uview-plus/components/u-popup-wu/keypress.js +45 -0
- package/uview-plus/components/u-popup-wu/u-popup-wu.vue +519 -0
- package/uview-plus/components/u-radio/_doc/changelog.md +6 -0
- package/uview-plus/components/u-radio/_doc/package.json +88 -0
- package/uview-plus/components/u-radio/_doc/readme.md +25 -0
- package/uview-plus/components/u-radio/u-radio.vue +4 -4
- package/uview-plus/components/u-radio-group/u-radio-group.vue +1 -1
- package/uview-plus/components/u-rate/u-rate.vue +5 -5
- package/uview-plus/components/u-read-more/u-read-more.vue +126 -3
- package/uview-plus/components/u-row/_doc/changelog.md +8 -0
- package/uview-plus/components/u-row/_doc/package.json +86 -0
- package/uview-plus/components/u-row/_doc/readme.md +16 -0
- package/uview-plus/components/u-row/u-row.vue +1 -1
- package/uview-plus/components/u-row-notice/u-row-notice.vue +3 -3
- package/uview-plus/components/u-safe-bottom/_doc/changelog.md +6 -0
- package/uview-plus/components/u-safe-bottom/_doc/package.json +86 -0
- package/uview-plus/components/u-safe-bottom/_doc/readme.md +16 -0
- package/uview-plus/components/u-safe-bottom/u-safe-bottom.vue +48 -3
- package/uview-plus/components/u-search/u-search.vue +4 -4
- package/uview-plus/components/u-select/u-select.vue +175 -3
- package/uview-plus/components/u-skeleton/u-skeleton.vue +3 -3
- package/uview-plus/components/u-sku-wu/_doc/changelog.md +27 -0
- package/uview-plus/components/u-sku-wu/_doc/package.json +93 -0
- package/uview-plus/components/u-sku-wu/_doc/readme.md +16 -0
- package/uview-plus/components/u-sku-wu/props.js +86 -0
- package/uview-plus/components/u-sku-wu/style.css +271 -0
- package/uview-plus/components/u-sku-wu/u-sku-wu.vue +864 -0
- package/uview-plus/components/u-status-bar/_doc/changelog.md +4 -0
- package/uview-plus/components/u-status-bar/_doc/package.json +86 -0
- package/uview-plus/components/u-status-bar/_doc/readme.md +16 -0
- package/uview-plus/components/u-status-bar/u-status-bar.vue +1 -1
- package/uview-plus/components/u-steps/u-steps.vue +1 -1
- package/uview-plus/components/u-steps-item/u-steps-item.vue +7 -7
- package/uview-plus/components/u-sticky/u-sticky.vue +1 -1
- package/uview-plus/components/u-subsection/u-subsection.vue +1 -1
- package/uview-plus/components/u-swipe-action/u-swipe-action.vue +1 -1
- package/uview-plus/components/u-swipe-action-item/u-swipe-action-item.vue +3 -3
- package/uview-plus/components/u-swiper/u-swiper.vue +1 -1
- package/uview-plus/components/u-swiper-indicator/u-swiper-indicator.vue +1 -1
- package/uview-plus/components/u-switch/u-switch.vue +2 -2
- package/uview-plus/components/u-tabbar/u-tabbar.vue +2 -2
- package/uview-plus/components/u-tabbar-item/u-tabbar-item.vue +9 -4
- package/uview-plus/components/u-table/u-table.vue +1 -1
- package/uview-plus/components/u-tabs/u-tabs.vue +3 -3
- package/uview-plus/components/u-tag/u-tag.vue +5 -5
- package/uview-plus/components/u-text/_doc/changelog.md +10 -0
- package/uview-plus/components/u-text/_doc/package.json +89 -0
- package/uview-plus/components/u-text/_doc/readme.md +20 -0
- package/uview-plus/components/u-text/u-text.vue +159 -3
- package/uview-plus/components/u-textarea/_doc/changelog.md +6 -0
- package/uview-plus/components/u-textarea/_doc/package.json +86 -0
- package/uview-plus/components/u-textarea/_doc/readme.md +25 -0
- package/uview-plus/components/u-toast/u-toast.vue +8 -8
- package/uview-plus/components/u-tooltip/u-tooltip.vue +6 -6
- package/uview-plus/components/u-transition/_doc/changelog.md +14 -0
- package/uview-plus/components/u-transition/_doc/package.json +86 -0
- package/uview-plus/components/u-transition/_doc/readme.md +16 -0
- package/uview-plus/components/u-transition-wu/createAnimation.js +148 -0
- package/uview-plus/components/u-transition-wu/props.js +32 -0
- package/uview-plus/components/u-transition-wu/u-transition.vue +300 -0
- package/uview-plus/components/u-upload/u-upload.vue +10 -10
- package/uview-plus/components/u-verification-code/u-verification-code.vue +161 -0
- package/uview-plus/components/u-waterfall/u-waterfall.vue +221 -3
- package/uview-plus/index.js +109 -94
- package/uview-plus/libs/config/config.js +46 -48
- package/uview-plus/libs/css/color.scss +32 -311
- package/uview-plus/libs/css/components-wu.scss +30 -0
- package/uview-plus/libs/css/vue.scss +10 -10
- package/uview-plus/libs/ctocode/index.js +120 -0
- package/uview-plus/libs/function/calc.js +61 -55
- package/uview-plus/libs/function/color/color-convert/CHANGELOG.md +54 -0
- package/uview-plus/libs/function/color/color-convert/LICENSE +21 -0
- package/uview-plus/libs/function/color/color-convert/README.md +68 -0
- package/uview-plus/libs/function/color/color-convert/conversions.js +839 -0
- package/uview-plus/libs/function/color/color-convert/index.js +81 -0
- package/uview-plus/libs/function/color/color-convert/package.json +48 -0
- package/uview-plus/libs/function/color/color-convert/route.js +97 -0
- package/uview-plus/libs/function/color/color-name/LICENSE +8 -0
- package/uview-plus/libs/function/color/color-name/README.md +11 -0
- package/uview-plus/libs/function/color/color-name/index.js +152 -0
- package/uview-plus/libs/function/color/color-name/package.json +28 -0
- package/uview-plus/libs/function/color/color-string/LICENSE +21 -0
- package/uview-plus/libs/function/color/color-string/README.md +62 -0
- package/uview-plus/libs/function/color/color-string/index.js +244 -0
- package/uview-plus/libs/function/color/color-string/package.json +39 -0
- package/uview-plus/libs/function/color/color.js +496 -0
- package/uview-plus/libs/function/color/index.js +158 -0
- package/uview-plus/libs/function/color/is-arrayish/LICENSE +21 -0
- package/uview-plus/libs/function/color/is-arrayish/README.md +16 -0
- package/uview-plus/libs/function/color/is-arrayish/index.js +9 -0
- package/uview-plus/libs/function/color/is-arrayish/package.json +45 -0
- package/uview-plus/libs/function/color/is-arrayish/yarn-error.log +1443 -0
- package/uview-plus/libs/function/color/simple-swizzle/LICENSE +21 -0
- package/uview-plus/libs/function/color/simple-swizzle/README.md +39 -0
- package/uview-plus/libs/function/color/simple-swizzle/index.js +29 -0
- package/uview-plus/libs/function/color/simple-swizzle/package.json +36 -0
- package/uview-plus/libs/function/colorGradient.js +108 -106
- package/uview-plus/libs/function/debounce.js +17 -17
- package/uview-plus/libs/function/digit.js +1 -3
- package/uview-plus/libs/function/http.js +3 -3
- package/uview-plus/libs/function/index-wu.js +198 -0
- package/uview-plus/libs/function/index.js +579 -566
- package/uview-plus/libs/function/platform.js +18 -18
- package/uview-plus/libs/function/test.js +135 -137
- package/uview-plus/libs/function/throttle.js +17 -17
- package/uview-plus/libs/luch-request/core/Request.js +199 -199
- package/uview-plus/libs/mixin/mpMixin.js +1 -0
- package/uview-plus/libs/mixin/openType.js +33 -0
- package/uview-plus/libs/util/async-validator.js +1343 -1343
- package/uview-plus/libs/util/dayjs.js +404 -0
- package/uview-plus/libs/util/route.js +101 -105
- package/uview-plus/package-wu-tool.json +84 -0
- package/uview-plus/package-wu.json +112 -0
- package/uview-plus/package.json +106 -95
- package/uview-plus/readme-wu.md +148 -0
- package/uview-ui/index.js +51 -52
- package/plugins/uni-upgrade.js +0 -294
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
## u-action-sheet 操作菜单
|
|
2
|
+
|
|
3
|
+
> **组件名:u-action-sheet**
|
|
4
|
+
|
|
5
|
+
本组件用于从底部弹出一个操作菜单,供用户选择并返回结果。
|
|
6
|
+
|
|
7
|
+
## [查看文档](https://ijry.github.io/uview-plus/components/popup.html)
|
|
8
|
+
|
|
9
|
+
## [更多组件, 请查看 `u-ui` 组件库](https://ext.dcloud.net.cn/plugin?name=u--ui)
|
|
10
|
+
(请勿下载插件zip)
|
|
11
|
+
|
|
12
|
+
<a href="https://ext.dcloud.net.cn/plugin?name=u--ui">
|
|
13
|
+
<img src="https://wuui.cn/intr.png">
|
|
14
|
+
</a>
|
|
15
|
+
|
|
16
|
+
**如使用过程中有任何问题,或者您对u-ui有一些好的建议。<br>欢迎加入 [u-ui 交流群](https://ijry.github.io/uview-plus/components/qqFeedBack.html)**
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<up-popup :show="show" mode="bottom" @close="closeHandler" :safeAreaInsetBottom="safeAreaInsetBottom" :round="round">
|
|
3
3
|
<view class="u-action-sheet">
|
|
4
4
|
<view class="u-action-sheet__header" v-if="title">
|
|
5
5
|
<text class="u-action-sheet__header__title u-line-1">{{ title }}</text>
|
|
6
6
|
<view class="u-action-sheet__header__icon-wrap" @tap.stop="cancel">
|
|
7
|
-
<
|
|
7
|
+
<up-icon name="close" size="17" color="#c8c9cc" bold></up-icon>
|
|
8
8
|
</view>
|
|
9
9
|
</view>
|
|
10
10
|
<text
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
{{ description }}
|
|
20
20
|
</text>
|
|
21
21
|
<slot>
|
|
22
|
-
<
|
|
22
|
+
<up-line v-if="description"></up-line>
|
|
23
23
|
<scroll-view scroll-y class="u-action-sheet__item-wrap" :style="{ maxHeight: wrapMaxHeight }">
|
|
24
24
|
<view :key="index" v-for="(item, index) in actions">
|
|
25
25
|
<!-- #ifdef MP -->
|
|
@@ -53,16 +53,16 @@
|
|
|
53
53
|
<text class="u-action-sheet__item-wrap__item__name" :style="[itemStyle(index)]">{{ item.name }}</text>
|
|
54
54
|
<text v-if="item.subname" class="u-action-sheet__item-wrap__item__subname">{{ item.subname }}</text>
|
|
55
55
|
</template>
|
|
56
|
-
<
|
|
56
|
+
<up-loading-icon v-else custom-class="van-action-sheet__loading" size="18" mode="circle" />
|
|
57
57
|
</view>
|
|
58
58
|
<!-- #ifdef MP -->
|
|
59
59
|
</button>
|
|
60
60
|
<!-- #endif -->
|
|
61
|
-
<
|
|
61
|
+
<up-line v-if="index !== actions.length - 1"></up-line>
|
|
62
62
|
</view>
|
|
63
63
|
</scroll-view>
|
|
64
64
|
</slot>
|
|
65
|
-
<
|
|
65
|
+
<up-gap bgColor="#eaeaec" height="6" v-if="cancelText"></up-gap>
|
|
66
66
|
<view
|
|
67
67
|
class="u-action-sheet__item-wrap__item u-action-sheet__cancel"
|
|
68
68
|
hover-class="u-action-sheet--hover"
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
<text @touchmove.stop.prevent :hover-stay-time="150" class="u-action-sheet__cancel-text">{{ cancelText }}</text>
|
|
73
73
|
</view>
|
|
74
74
|
</view>
|
|
75
|
-
</
|
|
75
|
+
</up-popup>
|
|
76
76
|
</template>
|
|
77
77
|
<script>
|
|
78
78
|
import { openType } from '../../libs/mixin/openType';
|
|
@@ -112,7 +112,7 @@ import { addUnit } from '../../libs/function/index';
|
|
|
112
112
|
* @event {Function} error 当使用开放能力时,发生错误的回调,openType="error"时有效
|
|
113
113
|
* @event {Function} launchapp 打开 APP 成功的回调,openType="launchApp"时有效
|
|
114
114
|
* @event {Function} opensetting 在打开授权设置页后回调,openType="openSetting"时有效
|
|
115
|
-
* @example <
|
|
115
|
+
* @example <up-action-sheet :actions="list" :title="title" :show="show"></up-action-sheet>
|
|
116
116
|
*/
|
|
117
117
|
export default {
|
|
118
118
|
name: 'u-action-sheet',
|
|
@@ -81,7 +81,7 @@ const dom = uni.requireNativePlugin('dom');
|
|
|
81
81
|
* @property {Boolean} autoWrap 自适应换行模式,不受rowCount限制,图片会自动换行 (默认 false )
|
|
82
82
|
* @property {String} unit 图片单位 (默认 px )
|
|
83
83
|
* @event {Function} albumWidth 某些特殊的情况下,需要让文字与相册的宽度相等,这里事件的形式对外发送 (回调参数 width )
|
|
84
|
-
* @example <
|
|
84
|
+
* @example <up-album :urls="urls2" @albumWidth="width => albumWidth = width" multipleSize="68" ></up-album>
|
|
85
85
|
*/
|
|
86
86
|
export default {
|
|
87
87
|
name: 'u-album',
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<up-transition mode="fade" :show="show">
|
|
3
3
|
<view class="u-alert" :class="[`u-alert--${type}--${effect}`]" @tap.stop="clickHandler" :style="[addStyle(customStyle)]">
|
|
4
4
|
<view class="u-alert__icon" v-if="showIcon">
|
|
5
|
-
<
|
|
5
|
+
<up-icon :name="iconName" size="18" :color="iconColor"></up-icon>
|
|
6
6
|
</view>
|
|
7
7
|
<view
|
|
8
8
|
class="u-alert__content"
|
|
@@ -40,10 +40,10 @@
|
|
|
40
40
|
</text>
|
|
41
41
|
</view>
|
|
42
42
|
<view class="u-alert__close" v-if="closable" @tap.stop="closeHandler">
|
|
43
|
-
<
|
|
43
|
+
<up-icon name="close" :color="iconColor" size="15"></up-icon>
|
|
44
44
|
</view>
|
|
45
45
|
</view>
|
|
46
|
-
</
|
|
46
|
+
</up-transition>
|
|
47
47
|
</template>
|
|
48
48
|
<script>
|
|
49
49
|
import { props } from './props';
|
|
@@ -66,7 +66,7 @@ import { addUnit, addStyle } from '../../libs/function/index';
|
|
|
66
66
|
* @property {Object} customStyle 定义需要用到的外部样式
|
|
67
67
|
* @event {Function} click 点击组件时触发
|
|
68
68
|
* @event {Function} close 点击关闭按钮时触发
|
|
69
|
-
* @example <
|
|
69
|
+
* @example <up-alert :title="title" type = "warning" :closable="closable" :description = "description"></up-alert>
|
|
70
70
|
*/
|
|
71
71
|
export default {
|
|
72
72
|
name: 'u-alert',
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
## 1.1.2(2024-05-08)
|
|
2
|
+
更新域名
|
|
3
|
+
## 1.1.1(2024-03-20)
|
|
4
|
+
修复res冲突,删除多余依赖组件文件
|
|
5
|
+
## 1.1.0(2024-03-20)
|
|
6
|
+
修改组件内名称,更改组件依赖方式
|
|
7
|
+
## 1.0.9(2024-02-27)
|
|
8
|
+
修复重复res名称带来的影响
|
|
9
|
+
## 1.0.8(2024-02-27)
|
|
10
|
+
修复APP更新组件清理缓存错误的方法
|
|
11
|
+
## 1.0.7(2023-09-22)
|
|
12
|
+
静默更新完成后,改为确认框,让用户手动确认,优化流程,更贴近用户使用场景
|
|
13
|
+
## 1.0.6(2023-09-22)
|
|
14
|
+
将热更新重启,改为原生方法杀死app,让用户手动重启, 来解决热更新样式错乱的bug
|
|
15
|
+
## 1.0.5(2023-09-09)
|
|
16
|
+
比对版本成功后将强制安装,不在二次比对,因为客户手机可能存在安装包缓存
|
|
17
|
+
## 1.0.4(2023-09-06)
|
|
18
|
+
增加检测更新平台platform字段
|
|
19
|
+
## 1.0.3(2023-09-05)
|
|
20
|
+
修复没有与后台比对版本的bug
|
|
21
|
+
## 1.0.2(2023-09-05)
|
|
22
|
+
修复v2、v3 promise化差异带来的bug
|
|
23
|
+
## 1.0.1(2023-09-04)
|
|
24
|
+
修复checkVersion 执行错误的reject
|
|
25
|
+
## 1.0.0(2023-09-04)
|
|
26
|
+
app升级、整包更新、热更新、强制更新、ios跳转更新、android跳转应用市场,间隔式提醒用户更新,所有细节都可在config.js中修改。
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "u-app-update",
|
|
3
|
+
"displayName": "app更新【支持热更新】【强制更新】【ios跳转更新】【间隔式提醒用户更新】【vue3+2】",
|
|
4
|
+
"version": "1.1.2",
|
|
5
|
+
"description": "app升级、整包更新、热更新、强制更新、ios跳转更新、android跳转应用市场,间隔提醒更新,所有细节都可在config.js种修改。",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"app更新",
|
|
8
|
+
"热更新",
|
|
9
|
+
"强制更新",
|
|
10
|
+
"间隔式提醒用户更新",
|
|
11
|
+
"ios&android跳转更新"
|
|
12
|
+
],
|
|
13
|
+
"repository": "",
|
|
14
|
+
"engines": {
|
|
15
|
+
"HBuilderX": "^3.4.15"
|
|
16
|
+
},
|
|
17
|
+
"dcloudext": {
|
|
18
|
+
"type": "component-vue",
|
|
19
|
+
"sale": {
|
|
20
|
+
"regular": {
|
|
21
|
+
"price": "0.00"
|
|
22
|
+
},
|
|
23
|
+
"sourcecode": {
|
|
24
|
+
"price": "0.00"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"contact": {
|
|
28
|
+
"qq": "1317948850"
|
|
29
|
+
},
|
|
30
|
+
"declaration": {
|
|
31
|
+
"ads": "无",
|
|
32
|
+
"data": "插件不采集任何数据",
|
|
33
|
+
"permissions": "无"
|
|
34
|
+
},
|
|
35
|
+
"npmurl": ""
|
|
36
|
+
},
|
|
37
|
+
"uni_modules": {
|
|
38
|
+
"dependencies": [
|
|
39
|
+
"uni-icons",
|
|
40
|
+
"uni-popup",
|
|
41
|
+
"uni-transition"
|
|
42
|
+
],
|
|
43
|
+
"platforms": {
|
|
44
|
+
"cloud": {
|
|
45
|
+
"tcb": "y",
|
|
46
|
+
"aliyun": "y",
|
|
47
|
+
"alipay": "n"
|
|
48
|
+
},
|
|
49
|
+
"client": {
|
|
50
|
+
"Vue": {
|
|
51
|
+
"vue2": "y",
|
|
52
|
+
"vue3": "y"
|
|
53
|
+
},
|
|
54
|
+
"App": {
|
|
55
|
+
"app-vue": "y",
|
|
56
|
+
"app-nvue": "n"
|
|
57
|
+
},
|
|
58
|
+
"H5-mobile": {
|
|
59
|
+
"Safari": "n",
|
|
60
|
+
"Android Browser": "n",
|
|
61
|
+
"微信浏览器(Android)": "n",
|
|
62
|
+
"QQ浏览器(Android)": "n"
|
|
63
|
+
},
|
|
64
|
+
"H5-pc": {
|
|
65
|
+
"Chrome": "n",
|
|
66
|
+
"IE": "n",
|
|
67
|
+
"Edge": "n",
|
|
68
|
+
"Firefox": "n",
|
|
69
|
+
"Safari": "n"
|
|
70
|
+
},
|
|
71
|
+
"小程序": {
|
|
72
|
+
"微信": "n",
|
|
73
|
+
"阿里": "n",
|
|
74
|
+
"百度": "n",
|
|
75
|
+
"字节跳动": "n",
|
|
76
|
+
"QQ": "n",
|
|
77
|
+
"钉钉": "n",
|
|
78
|
+
"快手": "n",
|
|
79
|
+
"飞书": "n",
|
|
80
|
+
"京东": "n"
|
|
81
|
+
},
|
|
82
|
+
"快应用": {
|
|
83
|
+
"华为": "n",
|
|
84
|
+
"联盟": "n"
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# u-app-update app更新
|
|
2
|
+
|
|
3
|
+
> **组件名:u-app-update**
|
|
4
|
+
|
|
5
|
+
app升级、整包更新、热更新、强制更新、ios跳转更新、android跳转应用市场,间隔式提醒用户更新,所有细节都可在config.js中修改。
|
|
6
|
+
|
|
7
|
+
## [查看文档](https://ijry.github.io/uview-plus/components/appUpdate.html)
|
|
8
|
+
|
|
9
|
+
## [更多组件, 请查看 `u-ui` 组件库](https://ext.dcloud.net.cn/plugin?name=u--ui)
|
|
10
|
+
(请勿下载插件zip)
|
|
11
|
+
|
|
12
|
+
<a href="https://ext.dcloud.net.cn/plugin?name=u--ui">
|
|
13
|
+
<img src="https://wuui.cn/intr.png">
|
|
14
|
+
</a>
|
|
15
|
+
|
|
16
|
+
**如使用过程中有任何问题,或者您对u-ui有一些好的建议。<br>欢迎加入 [u-ui 交流群](https://ijry.github.io/uview-plus/components/qqFeedBack.html)**
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
// props里设置的是默认样式 使用组件时可以被覆盖
|
|
3
|
+
props: {
|
|
4
|
+
// 主题颜色
|
|
5
|
+
themeColor: {
|
|
6
|
+
default: '#61d287',
|
|
7
|
+
type: String
|
|
8
|
+
},
|
|
9
|
+
// 背景色
|
|
10
|
+
bgColor: {
|
|
11
|
+
default: '#fff',
|
|
12
|
+
type: String
|
|
13
|
+
},
|
|
14
|
+
// 版本号字体颜色
|
|
15
|
+
versionColor: {
|
|
16
|
+
default: '#fff',
|
|
17
|
+
type: String
|
|
18
|
+
},
|
|
19
|
+
// 关闭图标颜色
|
|
20
|
+
closeIconColor: {
|
|
21
|
+
default: '#fff',
|
|
22
|
+
type: String
|
|
23
|
+
},
|
|
24
|
+
// 关闭图标大小
|
|
25
|
+
closeIconSize: {
|
|
26
|
+
default: 26,
|
|
27
|
+
type: Number
|
|
28
|
+
},
|
|
29
|
+
// 更新标题文字颜色
|
|
30
|
+
titleColor: {
|
|
31
|
+
default: '#5e5e5e',
|
|
32
|
+
type: String
|
|
33
|
+
},
|
|
34
|
+
// 更新内容文字颜色
|
|
35
|
+
contentColor: {
|
|
36
|
+
default: '#878787',
|
|
37
|
+
type: String
|
|
38
|
+
},
|
|
39
|
+
// 短期内不更新图标大小
|
|
40
|
+
notRemindIconSize: {
|
|
41
|
+
default: 22,
|
|
42
|
+
type: Number
|
|
43
|
+
},
|
|
44
|
+
// 短期内不更新选中图标颜色
|
|
45
|
+
notRemindIconActColor: {
|
|
46
|
+
default: '',
|
|
47
|
+
type: String
|
|
48
|
+
},
|
|
49
|
+
// 短期内不更新未选中图标颜色
|
|
50
|
+
notRemindIconNotActColor: {
|
|
51
|
+
default: '#9d9d9d',
|
|
52
|
+
type: String
|
|
53
|
+
},
|
|
54
|
+
// 短期内不更新选中文字颜色
|
|
55
|
+
notRemindTextActColor: {
|
|
56
|
+
default: '#6b6b6b',
|
|
57
|
+
type: String
|
|
58
|
+
},
|
|
59
|
+
// 短期内不更新未选中文字颜色
|
|
60
|
+
notRemindTextNotActColor: {
|
|
61
|
+
default: '#9d9d9d',
|
|
62
|
+
type: String
|
|
63
|
+
},
|
|
64
|
+
// 下载按钮ios文字
|
|
65
|
+
downloadBtnTextIOS: {
|
|
66
|
+
default: '立即跳转更新',
|
|
67
|
+
type: String
|
|
68
|
+
},
|
|
69
|
+
// 下载按钮Android文字
|
|
70
|
+
downloadBtnTextAndroid: {
|
|
71
|
+
default: '立即升级',
|
|
72
|
+
type: String
|
|
73
|
+
},
|
|
74
|
+
// 下载中文字提示
|
|
75
|
+
downLoadingText: {
|
|
76
|
+
default: '安装包下载中,请稍后',
|
|
77
|
+
type: String
|
|
78
|
+
},
|
|
79
|
+
// 下载完成文字提示
|
|
80
|
+
downloadSuccessText: {
|
|
81
|
+
default: '下载完成,立即安装',
|
|
82
|
+
type: String
|
|
83
|
+
},
|
|
84
|
+
// wgt安装中显示文字
|
|
85
|
+
wgtInstallingText: {
|
|
86
|
+
default: '正在安装....',
|
|
87
|
+
type: String
|
|
88
|
+
},
|
|
89
|
+
// wgt安装完成重启显示文字
|
|
90
|
+
wgtInstalledText: {
|
|
91
|
+
default: '安装完毕,点击重启',
|
|
92
|
+
type: String
|
|
93
|
+
},
|
|
94
|
+
// 按钮背景色
|
|
95
|
+
btnBgColor: {
|
|
96
|
+
default: '',
|
|
97
|
+
type: String
|
|
98
|
+
},
|
|
99
|
+
// 按钮文字颜色
|
|
100
|
+
btnColor: {
|
|
101
|
+
default: '#fff',
|
|
102
|
+
type: String
|
|
103
|
+
},
|
|
104
|
+
// 进度条颜色
|
|
105
|
+
progressColor: {
|
|
106
|
+
default: '',
|
|
107
|
+
type: String
|
|
108
|
+
},
|
|
109
|
+
// 进度条文字样式
|
|
110
|
+
progressTextColor: {
|
|
111
|
+
default: '#4c4c4c',
|
|
112
|
+
type: String
|
|
113
|
+
},
|
|
114
|
+
// 提示用户更新的间隔时间 单位day
|
|
115
|
+
intervalAlertUserUpdateDay: {
|
|
116
|
+
default: 7,
|
|
117
|
+
type: Number
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
};
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import config from '../config.js';
|
|
2
|
+
/**
|
|
3
|
+
* 对比版本号,如需要,请自行修改判断规则
|
|
4
|
+
* 支持比对 ("3.0.0.0.0.1.0.1", "3.0.0.0.0.1") ("3.0.0.1", "3.0") ("3.1.1", "3.1.1.1") 之类的
|
|
5
|
+
* @param {Object} v1
|
|
6
|
+
* @param {Object} v2
|
|
7
|
+
* v1 > v2 return 1
|
|
8
|
+
* v1 < v2 return -1
|
|
9
|
+
* v1 == v2 return 0
|
|
10
|
+
*/
|
|
11
|
+
function compare(v1 = '0', v2 = '0') {
|
|
12
|
+
v1 = String(v1).split('.')
|
|
13
|
+
v2 = String(v2).split('.')
|
|
14
|
+
const minVersionLens = Math.min(v1.length, v2.length);
|
|
15
|
+
|
|
16
|
+
let result = 0;
|
|
17
|
+
for (let i = 0; i < minVersionLens; i++) {
|
|
18
|
+
const curV1 = Number(v1[i])
|
|
19
|
+
const curV2 = Number(v2[i])
|
|
20
|
+
|
|
21
|
+
if (curV1 > curV2) {
|
|
22
|
+
result = 1
|
|
23
|
+
break;
|
|
24
|
+
} else if (curV1 < curV2) {
|
|
25
|
+
result = -1
|
|
26
|
+
break;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
if (result === 0 && (v1.length !== v2.length)) {
|
|
31
|
+
const v1BiggerThenv2 = v1.length > v2.length;
|
|
32
|
+
const maxLensVersion = v1BiggerThenv2 ? v1 : v2;
|
|
33
|
+
for (let i = minVersionLens; i < maxLensVersion.length; i++) {
|
|
34
|
+
const curVersion = Number(maxLensVersion[i])
|
|
35
|
+
if (curVersion > 0) {
|
|
36
|
+
v1BiggerThenv2 ? result = 1 : result = -1
|
|
37
|
+
break;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
return result;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* 检测升级 使用说明
|
|
47
|
+
* 1. 通过请求获取后台返回的更新信息
|
|
48
|
+
* 2. 获取后台更新信息后 和 应用本身的版本(manifest.json里的versionName)做对比。
|
|
49
|
+
* 3. 如果后台版本比应用本身的版本大 且 后台本次更新的平台里含有 用户的系统环境则触发更新,否则一律不触发更新。
|
|
50
|
+
*/
|
|
51
|
+
export default function checkVersion() {
|
|
52
|
+
return new Promise((resolve, reject) => {
|
|
53
|
+
// #ifdef APP-PLUS
|
|
54
|
+
uni.getSystemInfo({
|
|
55
|
+
success: (info) => {
|
|
56
|
+
// app系统环境
|
|
57
|
+
let appPlatform = info.platform;
|
|
58
|
+
// 获取本机版本号
|
|
59
|
+
plus.runtime.getProperty(plus.runtime.appid, (wgtinfo) => {
|
|
60
|
+
// 请补充这个请求即可正常使用
|
|
61
|
+
uni.request({
|
|
62
|
+
url: '',
|
|
63
|
+
success: (res=>{
|
|
64
|
+
res = res.data;
|
|
65
|
+
if(compare(res.version, wgtinfo.version) === 1 && res.platform.indexOf(appPlatform) !== -1) {
|
|
66
|
+
res.appPlatform = appPlatform;
|
|
67
|
+
resolve(res);
|
|
68
|
+
} else {
|
|
69
|
+
reject('当前版本已经是最新的,不需要更新')
|
|
70
|
+
}
|
|
71
|
+
}),
|
|
72
|
+
fail: (err)=>{
|
|
73
|
+
reject(err);
|
|
74
|
+
}
|
|
75
|
+
})
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
// #endif
|
|
80
|
+
})
|
|
81
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import checkVersion from './checkVersion.js';
|
|
2
|
+
import config from '../config.js';
|
|
3
|
+
|
|
4
|
+
export default function silentlyAppUpdate() {
|
|
5
|
+
checkVersion().then(res => {
|
|
6
|
+
// 静默更新
|
|
7
|
+
if (res.is_silently) {
|
|
8
|
+
let dtask = plus.downloader.createDownload(res.url, {force: true}, (download, status) => {
|
|
9
|
+
if (status == 200) {
|
|
10
|
+
plus.runtime.install(download.filename, {
|
|
11
|
+
force: false
|
|
12
|
+
}, installRes => {
|
|
13
|
+
uni.showModal({
|
|
14
|
+
title: '更新提示',
|
|
15
|
+
content: '新版本已就绪,请重启应用查看',
|
|
16
|
+
showCancel: false,
|
|
17
|
+
success: function (ures) {
|
|
18
|
+
if (ures.confirm) {
|
|
19
|
+
// 由于h5+的热更新重启存在样式错误的问题
|
|
20
|
+
// 因此只能用原生的方法退出app并杀死后台
|
|
21
|
+
if (res.appPlatform == 'android') {
|
|
22
|
+
let main = plus.android.runtimeMainActivity();
|
|
23
|
+
// 热更新之后需要杀死进程重新打开,需要引入安卓system的类来实现
|
|
24
|
+
let system = plus.android.importClass('java.lang.System')
|
|
25
|
+
system.exit(0);
|
|
26
|
+
}else{
|
|
27
|
+
plus.ios.import('UIApplication').sharedApplication().performSelector('exit');
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
}, err => {
|
|
33
|
+
console.log(err);
|
|
34
|
+
})
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
dtask.start();
|
|
39
|
+
}
|
|
40
|
+
})
|
|
41
|
+
}
|