@10yun/cv-mobile-ui 0.5.56 → 0.5.58
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/{ui-sdks → other}/qiun-data-charts/js_sdk/u-charts/config-ucharts.js +605 -605
- package/{ui-sdks → other}/qiun-data-charts/package.json +2 -1
- package/other/qiun-data-charts_2.5.0-20230101_example/App.vue +20 -0
- package/other/qiun-data-charts_2.5.0-20230101_example/common/uni-icons.css +542 -0
- package/other/qiun-data-charts_2.5.0-20230101_example/common/uni.css +246 -0
- package/other/qiun-data-charts_2.5.0-20230101_example/components/qiun-title-bar/qiun-title-bar.vue +51 -0
- package/other/qiun-data-charts_2.5.0-20230101_example/components/test-charts/test-charts.vue +48 -0
- package/other/qiun-data-charts_2.5.0-20230101_example/main.js +13 -0
- package/other/qiun-data-charts_2.5.0-20230101_example/manifest.json +75 -0
- package/other/qiun-data-charts_2.5.0-20230101_example/mockdata/demodata.json +448 -0
- package/other/qiun-data-charts_2.5.0-20230101_example/mockdata/mapdata.json +1 -0
- package/other/qiun-data-charts_2.5.0-20230101_example/pages/canvas/canvas.vue +142 -0
- package/other/qiun-data-charts_2.5.0-20230101_example/pages/echarts/echarts.vue +228 -0
- package/other/qiun-data-charts_2.5.0-20230101_example/pages/format-e/format-e.vue +113 -0
- package/other/qiun-data-charts_2.5.0-20230101_example/pages/format-u/format-u.vue +110 -0
- package/other/qiun-data-charts_2.5.0-20230101_example/pages/index/index.vue +58 -0
- package/other/qiun-data-charts_2.5.0-20230101_example/pages/layout/layout.vue +174 -0
- package/other/qiun-data-charts_2.5.0-20230101_example/pages/other/other.vue +233 -0
- package/other/qiun-data-charts_2.5.0-20230101_example/pages/tab/tab.vue +115 -0
- package/other/qiun-data-charts_2.5.0-20230101_example/pages/ucharts/ucharts.vue +339 -0
- package/other/qiun-data-charts_2.5.0-20230101_example/pages/unicloud/unicloud.vue +117 -0
- package/other/qiun-data-charts_2.5.0-20230101_example/pages/updata/updata.vue +212 -0
- package/other/qiun-data-charts_2.5.0-20230101_example/pages.json +79 -0
- package/other/qiun-data-charts_2.5.0-20230101_example/static/logo.png +0 -0
- package/other/qiun-data-charts_2.5.0-20230101_example/uni.scss +76 -0
- package/other/qiun-data-charts_2.5.0-20230101_example/uniCloud-aliyun/database/db_init.json +455 -0
- package/other/qiun-data-charts_2.5.0-20230101_example/uniCloud-aliyun/database/qiun-charts-demo.schema.json +76 -0
- package/other/{u-parse-2019 → u-parse}/components/wxParseTemplate0.vue +2 -1
- package/other/{u-parse-2019 → u-parse}/libs/html2json.js +2 -2
- package/other/{uParse → u-parse}/libs/wxDiscode.js +1 -1
- package/other/u-parse/readme.md +102 -0
- package/other/{u-parse-2019 → u-parse}/u-parse.vue +1 -6
- package/other/u-parse2026/libs/html2json.js +2 -2
- package/other/u-parse2026/libs/wxDiscode.js +1 -1
- package/other/u-parse2026/u-parse.css +1 -0
- package/other/u-parse2026/u-parse.vue +1 -3
- package/other/uParse2/components/wxParseAudio.vue +1 -0
- package/other/{uParse → uParse2}/components/wxParseImg.vue +4 -4
- package/other/{uParse → uParse2}/components/wxParseTable.vue +15 -6
- package/other/{uParse → uParse2}/components/wxParseTemplate0.vue +7 -6
- package/other/{uParse → uParse2}/components/wxParseTemplate1.vue +10 -0
- package/other/{uParse → uParse2}/libs/html2json.js +2 -2
- package/other/{u-parse-2019 → uParse2}/libs/wxDiscode.js +1 -1
- package/other/{uParse/wxParse.css → uParse2/u-parse.css} +4 -4
- package/other/{uParse/wxParse.vue → uParse2/u-parse.vue} +18 -11
- package/other/uParse2/u-parse2.css +264 -0
- package/package.json +1 -1
- package/ui-cv/components/cv-dialog-bottom/cv-dialog-bottom.vue +35 -58
- package/ui-cv/components/cv-dialog-full/cv-dialog-full.vue +55 -62
- package/ui-cv/components/cv-dialog-share/cv-dialog-share.vue +7 -7
- package/ui-cv/components/cv-dialog-share/share.vue +1 -10
- package/ui-cv/components/cv-dialog-share/tui-share.vue +2 -2
- package/ui-cv/components/cv-filter-hm/cv-filter-hm.vue +8 -6
- package/ui-cv/components/cv-geo-local/cv-geo-local.vue +1 -1
- package/ui-cv/components/cv-icons/cv-icons.vue +29 -62
- package/ui-cv/components/cv-icons/iconfont/font-default-icons.js +127 -131
- package/ui-cv/components/cv-input-password/cv-input-password.vue +1 -1
- package/ui-cv/components/cv-mask-svg/cv-mask-svg.vue +1 -1
- package/ui-cv/components/cv-mask-svg/mixins.js +16 -12
- package/ui-cv/components/cv-upload-image/cv-upload-image.vue +4 -4
- package/ui-cv/components/cv-upload-image/demo.vue +1 -1
- package/ui-fireui/components/u-share-model/u-share-model.vue +1 -1
- package/ui-fireui/components/u-uploadsamll/u-uploadsamll.vue +1 -1
- package/uview-plus/components/u-button/props-old.js +159 -0
- package/uview-plus/components/u-button/props.js +7 -0
- package/uview-plus/components/u-button/u-button-old.vue +476 -0
- package/uview-plus/components/u-button/u-button-wu.vue +13 -10
- package/uview-plus/components/u-button/u-button.vue +47 -14
- package/uview-plus/components/u-form/form.js +13 -12
- package/uview-plus/components/u-parse/README.md +192 -0
- package/uview-plus/components/u-parse/changelog.md +163 -0
- package/uview-plus/components/u-parse/node/node.vue +37 -3
- package/{uni-ui/lib/uni-breadcrumb → uview-plus/components/u-parse}/package.json +24 -29
- package/uview-plus/components/u-parse/parser.js +8 -3
- package/uview-plus/components/u-parse/static/app-plus/up-parse/js/handler.js +1 -0
- package/uview-plus/components/u-parse/static/app-plus/up-parse/local-2.5.2.html +29 -0
- package/uview-plus/components/u-parse/u-parse.vue +29 -1
- package/uview-plus/components/u-upload/file.js +186 -0
- package/uview-plus/components/u-upload/props-old.js +176 -0
- package/uview-plus/components/u-upload/props.js +12 -0
- package/uview-plus/components/u-upload/u-upload.vue +100 -15
- package/uview-plus/components/u-upload/u-upload2.vue +854 -0
- package/uview-plus/libs/mixin/openType.js +35 -0
- package/other/lime-painter2/README2.md +0 -576
- package/other/lime-painter2/changelog.md +0 -225
- package/other/lime-painter2/package.json +0 -93
- package/other/lime-painter2/readme.md +0 -758
- package/other/lime-painter2/test.md +0 -45
- package/other/qiun-data-charts/qiun-data-charts.vue +0 -1618
- package/other/u-parse-2019/readme.md +0 -99
- package/other/uParse/components/style.css +0 -1
- package/other/uParse/components/wxParseAudio.vue +0 -1
- package/other/xt-parse/changelog.md +0 -41
- package/other/xt-parse/node/node.vue +0 -752
- package/other/xt-parse/package.json +0 -129
- package/other/xt-parse/parser.js +0 -1461
- package/other/xt-parse/props.js +0 -49
- package/other/xt-parse/readme.md +0 -145
- package/other/xt-parse/static/app-plus/u-parse/js/handler.js +0 -1
- package/other/xt-parse/u-parse.vue +0 -510
- package/plugins/luch-request/adapters/index.js +0 -131
- package/plugins/luch-request/core/InterceptorManager.js +0 -50
- package/plugins/luch-request/core/Request.js +0 -199
- package/plugins/luch-request/core/buildFullPath.js +0 -20
- package/plugins/luch-request/core/defaults.js +0 -32
- package/plugins/luch-request/core/dispatchRequest.js +0 -5
- package/plugins/luch-request/core/mergeConfig.js +0 -125
- package/plugins/luch-request/core/settle.js +0 -16
- package/plugins/luch-request/helpers/buildURL.js +0 -71
- package/plugins/luch-request/helpers/combineURLs.js +0 -12
- package/plugins/luch-request/helpers/isAbsoluteURL.js +0 -14
- package/plugins/luch-request/index.d.ts +0 -197
- package/plugins/luch-request/index.js +0 -2
- package/plugins/luch-request/readme.md +0 -3
- package/plugins/luch-request/utils/clone.js +0 -260
- package/plugins/luch-request/utils.js +0 -131
- package/ui-cv/components/cv-cell-row/cv-cell-row.vue +0 -220
- package/ui-cv/components/cv-dialog-share/uni-popup-share.vue +0 -139
- package/ui-cv/components/cv-icons/iconfont/font-action-icons.js +0 -73
- package/ui-cv/components/cv-icons/iconfont/font-action.css +0 -7
- package/ui-cv/components/cv-icons/iconfont/font-action.js +0 -5
- package/ui-cv/components/cv-icons/iconfont/font-arrow-icons.js +0 -47
- package/ui-cv/components/cv-icons/iconfont/font-arrow.css +0 -6
- package/ui-cv/components/cv-icons/iconfont/font-arrow.js +0 -5
- package/ui-cv/components/cv-icons/iconfont/font-base-icons.js +0 -92
- package/ui-cv/components/cv-icons/iconfont/font-base.css +0 -6
- package/ui-cv/components/cv-icons/iconfont/font-base.js +0 -5
- package/ui-cv/components/cv-icons/iconfont/font-mall-icons.js +0 -35
- package/ui-cv/components/cv-icons/iconfont/font-mall.css +0 -7
- package/ui-cv/components/cv-icons/iconfont/font-mall.js +0 -5
- package/ui-cv/components/cv-icons/iconfont/font-media-icons.js +0 -45
- package/ui-cv/components/cv-icons/iconfont/font-media.css +0 -7
- package/ui-cv/components/cv-icons/iconfont/font-media.js +0 -5
- package/ui-cv/components/cv-icons/iconfont/font-order-icons.js +0 -34
- package/ui-cv/components/cv-icons/iconfont/font-order.css +0 -6
- package/ui-cv/components/cv-icons/iconfont/font-order.js +0 -5
- package/ui-cv/components/cv-icons/iconfont/font-people-icons.js +0 -49
- package/ui-cv/components/cv-icons/iconfont/font-people.css +0 -7
- package/ui-cv/components/cv-icons/iconfont/font-people.js +0 -5
- package/ui-cv/components/cv-icons/iconfont/font-status-icons.js +0 -34
- package/ui-cv/components/cv-icons/iconfont/font-status.css +0 -6
- package/ui-cv/components/cv-icons/iconfont/font-status.js +0 -5
- package/ui-cv/components/cv-icons/iconfont/font-wallet-icons.js +0 -17
- package/ui-cv/components/cv-icons/iconfont/font-wallet.css +0 -6
- package/ui-cv/components/cv-icons/iconfont/font-wallet.js +0 -5
- package/ui-cv/components/cv-icons/icons/default-icons.js +0 -132
- package/ui-cv/components/cv-icons/icons/icons-action.js +0 -72
- package/ui-cv/components/cv-icons/icons/icons-arrow.js +0 -46
- package/ui-cv/components/cv-icons/icons/icons-base.js +0 -89
- package/ui-cv/components/cv-icons/icons/icons-mall.js +0 -34
- package/ui-cv/components/cv-icons/icons/icons-media.js +0 -44
- package/ui-cv/components/cv-icons/icons/icons-order.js +0 -33
- package/ui-cv/components/cv-icons/icons/icons-people.js +0 -46
- package/ui-cv/components/cv-icons/icons/icons-status.js +0 -32
- package/ui-cv/components/cv-icons/icons/icons-wallet.js +0 -15
- package/ui-sdks/sdk-app-update/img/logo.png +0 -0
- package/ui-sdks/sdk-app-update/img/update_bg.png +0 -0
- package/ui-sdks/sdk-app-update/img/update_bg_top.png +0 -0
- package/ui-sdks/sdk-app-update/sdk-app-update.vue +0 -396
- package/ui-sdks/sdk-app-update/xxxx +0 -62
- package/ui-sdks/sdk-privacy-policy/sdk-privacy-policy.vue +0 -113
- package/ui-sdks/sdk-u-charts/config-echarts.js +0 -420
- package/ui-sdks/sdk-u-charts/config-ucharts.js +0 -630
- package/ui-sdks/sdk-u-charts/u-charts.js +0 -7398
- package/ui-sdks/sdk-u-charts/u-charts.min.js +0 -1
- package/ui-sdks/sdk-webview-main/WebViewMain.vue +0 -1
- package/ui-sdks/sdk-webview-main/main.js +0 -0
- package/ui-sdks/sdk-webview-main/mixin.js +0 -0
- package/uni-ui/lib/uni-badge/changelog.md +0 -33
- package/uni-ui/lib/uni-badge/package.json +0 -107
- package/uni-ui/lib/uni-badge/readme.md +0 -8
- package/uni-ui/lib/uni-breadcrumb/changelog.md +0 -6
- package/uni-ui/lib/uni-breadcrumb/readme.md +0 -66
- package/uni-ui/lib/uni-calendar/changelog.md +0 -30
- package/uni-ui/lib/uni-calendar/package.json +0 -105
- package/uni-ui/lib/uni-calendar/readme.md +0 -103
- package/uni-ui/lib/uni-card/changelog.md +0 -26
- package/uni-ui/lib/uni-card/package.json +0 -107
- package/uni-ui/lib/uni-card/readme.md +0 -10
- package/uni-ui/lib/uni-collapse/changelog.md +0 -48
- package/uni-ui/lib/uni-collapse/package.json +0 -106
- package/uni-ui/lib/uni-collapse/readme.md +0 -11
- package/uni-ui/lib/uni-combox/changelog.md +0 -17
- package/uni-ui/lib/uni-combox/package.json +0 -107
- package/uni-ui/lib/uni-combox/readme.md +0 -10
- package/uni-ui/lib/uni-countdown/changelog.md +0 -30
- package/uni-ui/lib/uni-countdown/package.json +0 -105
- package/uni-ui/lib/uni-countdown/readme.md +0 -9
- package/uni-ui/lib/uni-data-checkbox/changelog.md +0 -51
- package/uni-ui/lib/uni-data-checkbox/package.json +0 -107
- package/uni-ui/lib/uni-data-checkbox/readme.md +0 -17
- package/uni-ui/lib/uni-data-picker/changelog.md +0 -81
- package/uni-ui/lib/uni-data-picker/package.json +0 -109
- package/uni-ui/lib/uni-data-picker/readme.md +0 -21
- package/uni-ui/lib/uni-data-select/changelog.md +0 -51
- package/uni-ui/lib/uni-data-select/package.json +0 -106
- package/uni-ui/lib/uni-data-select/readme.md +0 -7
- package/uni-ui/lib/uni-dateformat/changelog.md +0 -10
- package/uni-ui/lib/uni-dateformat/package.json +0 -107
- package/uni-ui/lib/uni-dateformat/readme.md +0 -10
- package/uni-ui/lib/uni-datetime-picker/changelog.md +0 -177
- package/uni-ui/lib/uni-datetime-picker/package.json +0 -107
- package/uni-ui/lib/uni-datetime-picker/readme.md +0 -20
- package/uni-ui/lib/uni-drawer/changelog.md +0 -13
- package/uni-ui/lib/uni-drawer/package.json +0 -106
- package/uni-ui/lib/uni-drawer/readme.md +0 -9
- package/uni-ui/lib/uni-easyinput/changelog.md +0 -121
- package/uni-ui/lib/uni-easyinput/package.json +0 -107
- package/uni-ui/lib/uni-easyinput/readme.md +0 -10
- package/uni-ui/lib/uni-fab/changelog.md +0 -25
- package/uni-ui/lib/uni-fab/package.json +0 -107
- package/uni-ui/lib/uni-fab/readme.md +0 -8
- package/uni-ui/lib/uni-fav/changelog.md +0 -19
- package/uni-ui/lib/uni-fav/package.json +0 -106
- package/uni-ui/lib/uni-fav/readme.md +0 -9
- package/uni-ui/lib/uni-file-picker/changelog.md +0 -91
- package/uni-ui/lib/uni-file-picker/package.json +0 -105
- package/uni-ui/lib/uni-file-picker/readme.md +0 -10
- package/uni-ui/lib/uni-forms/changelog.md +0 -100
- package/uni-ui/lib/uni-forms/package.json +0 -107
- package/uni-ui/lib/uni-forms/readme.md +0 -22
- package/uni-ui/lib/uni-goods-nav/changelog.md +0 -18
- package/uni-ui/lib/uni-goods-nav/package.json +0 -105
- package/uni-ui/lib/uni-goods-nav/readme.md +0 -9
- package/uni-ui/lib/uni-grid/changelog.md +0 -13
- package/uni-ui/lib/uni-grid/package.json +0 -106
- package/uni-ui/lib/uni-grid/readme.md +0 -10
- package/uni-ui/lib/uni-group/changelog.md +0 -16
- package/uni-ui/lib/uni-group/package.json +0 -106
- package/uni-ui/lib/uni-group/readme.md +0 -8
- package/uni-ui/lib/uni-icons/changelog.md +0 -44
- package/uni-ui/lib/uni-icons/package.json +0 -111
- package/uni-ui/lib/uni-icons/readme.md +0 -7
- package/uni-ui/lib/uni-indexed-list/changelog.md +0 -19
- package/uni-ui/lib/uni-indexed-list/package.json +0 -107
- package/uni-ui/lib/uni-indexed-list/readme.md +0 -10
- package/uni-ui/lib/uni-link/changelog.md +0 -17
- package/uni-ui/lib/uni-link/package.json +0 -106
- package/uni-ui/lib/uni-link/readme.md +0 -10
- package/uni-ui/lib/uni-list/changelog.md +0 -52
- package/uni-ui/lib/uni-list/package.json +0 -108
- package/uni-ui/lib/uni-list/readme.md +0 -44
- package/uni-ui/lib/uni-load-more/changelog.md +0 -27
- package/uni-ui/lib/uni-load-more/package.json +0 -105
- package/uni-ui/lib/uni-load-more/readme.md +0 -12
- package/uni-ui/lib/uni-nav-bar/changelog.md +0 -64
- package/uni-ui/lib/uni-nav-bar/package.json +0 -106
- package/uni-ui/lib/uni-nav-bar/readme.md +0 -13
- package/uni-ui/lib/uni-notice-bar/changelog.md +0 -22
- package/uni-ui/lib/uni-notice-bar/package.json +0 -107
- package/uni-ui/lib/uni-notice-bar/readme.md +0 -11
- package/uni-ui/lib/uni-number-box/changelog.md +0 -39
- package/uni-ui/lib/uni-number-box/package.json +0 -104
- package/uni-ui/lib/uni-number-box/readme.md +0 -11
- package/uni-ui/lib/uni-pagination/changelog.md +0 -27
- package/uni-ui/lib/uni-pagination/package.json +0 -106
- package/uni-ui/lib/uni-pagination/readme.md +0 -10
- package/uni-ui/lib/uni-popup/changelog.md +0 -102
- package/uni-ui/lib/uni-popup/package.json +0 -107
- package/uni-ui/lib/uni-popup/readme.md +0 -15
- package/uni-ui/lib/uni-rate/changelog.md +0 -27
- package/uni-ui/lib/uni-rate/package.json +0 -106
- package/uni-ui/lib/uni-rate/readme.md +0 -11
- package/uni-ui/lib/uni-row/changelog.md +0 -10
- package/uni-ui/lib/uni-row/package.json +0 -106
- package/uni-ui/lib/uni-row/readme.md +0 -9
- package/uni-ui/lib/uni-scss/changelog.md +0 -8
- package/uni-ui/lib/uni-scss/package.json +0 -99
- package/uni-ui/lib/uni-scss/readme.md +0 -3
- package/uni-ui/lib/uni-search-bar/changelog.md +0 -47
- package/uni-ui/lib/uni-search-bar/package.json +0 -106
- package/uni-ui/lib/uni-search-bar/readme.md +0 -12
- package/uni-ui/lib/uni-section/changelog.md +0 -2
- package/uni-ui/lib/uni-section/package.json +0 -104
- package/uni-ui/lib/uni-section/readme.md +0 -7
- package/uni-ui/lib/uni-segmented-control/changelog.md +0 -15
- package/uni-ui/lib/uni-segmented-control/package.json +0 -106
- package/uni-ui/lib/uni-segmented-control/readme.md +0 -11
- package/uni-ui/lib/uni-steps/changelog.md +0 -18
- package/uni-ui/lib/uni-steps/package.json +0 -106
- package/uni-ui/lib/uni-steps/readme.md +0 -11
- package/uni-ui/lib/uni-swipe-action/changelog.md +0 -60
- package/uni-ui/lib/uni-swipe-action/package.json +0 -113
- package/uni-ui/lib/uni-swipe-action/readme.md +0 -10
- package/uni-ui/lib/uni-swiper-dot/changelog.md +0 -12
- package/uni-ui/lib/uni-swiper-dot/package.json +0 -106
- package/uni-ui/lib/uni-swiper-dot/readme.md +0 -10
- package/uni-ui/lib/uni-table/changelog.md +0 -35
- package/uni-ui/lib/uni-table/package.json +0 -106
- package/uni-ui/lib/uni-table/readme.md +0 -11
- package/uni-ui/lib/uni-tag/changelog.md +0 -25
- package/uni-ui/lib/uni-tag/package.json +0 -106
- package/uni-ui/lib/uni-tag/readme.md +0 -11
- package/uni-ui/lib/uni-title/changelog.md +0 -10
- package/uni-ui/lib/uni-title/package.json +0 -107
- package/uni-ui/lib/uni-title/readme.md +0 -12
- package/uni-ui/lib/uni-tooltip/changelog.md +0 -16
- package/uni-ui/lib/uni-tooltip/package.json +0 -104
- package/uni-ui/lib/uni-tooltip/readme.md +0 -7
- package/uni-ui/lib/uni-transition/changelog.md +0 -31
- package/uni-ui/lib/uni-transition/package.json +0 -112
- package/uni-ui/lib/uni-transition/readme.md +0 -10
- package/uni-ui/lib/uni-ui/changelog.md +0 -639
- package/uni-ui/lib/uni-ui/package.json +0 -148
- package/uni-ui/lib/uni-ui/readme.md +0 -247
- package/uview-plus/libs/mixin/openType2.js +0 -60
- /package/other/{lime-painter2/components/lime-painter → lime-painter/components/lime-painter2}/canvas.js +0 -0
- /package/other/{lime-painter2/components/lime-painter → lime-painter/components/lime-painter2}/draw.js +0 -0
- /package/other/{lime-painter2/components/lime-painter → lime-painter/components/lime-painter2}/draw2.js +0 -0
- /package/other/{lime-painter2/components/lime-painter → lime-painter/components/lime-painter2}/gradient.js +0 -0
- /package/other/{lime-painter2/components/lime-painter → lime-painter/components/lime-painter2}/index.vue +0 -0
- /package/other/{lime-painter2/components/lime-painter → lime-painter/components/lime-painter2}/index2.vue +0 -0
- /package/other/{lime-painter2/components/lime-painter → lime-painter/components/lime-painter2}/layout.js +0 -0
- /package/other/{lime-painter2/components/lime-painter → lime-painter/components/lime-painter2}/qrcode.js +0 -0
- /package/other/{lime-painter2/components/lime-painter → lime-painter/components/lime-painter2}/utils.js +0 -0
- /package/{ui-sdks → other}/qiun-data-charts/changelog.md +0 -0
- /package/{ui-sdks → other}/qiun-data-charts/components/qiun-data-charts/qiun-data-charts.vue +0 -0
- /package/{ui-sdks → other}/qiun-data-charts/components/qiun-error/qiun-error.vue +0 -0
- /package/{ui-sdks → other}/qiun-data-charts/components/qiun-loading/loading1.vue +0 -0
- /package/{ui-sdks → other}/qiun-data-charts/components/qiun-loading/loading2.vue +0 -0
- /package/{ui-sdks → other}/qiun-data-charts/components/qiun-loading/loading3.vue +0 -0
- /package/{ui-sdks → other}/qiun-data-charts/components/qiun-loading/loading4.vue +0 -0
- /package/{ui-sdks → other}/qiun-data-charts/components/qiun-loading/loading5.vue +0 -0
- /package/{ui-sdks → other}/qiun-data-charts/components/qiun-loading/qiun-loading.vue +0 -0
- /package/{ui-sdks → other}/qiun-data-charts/js_sdk/u-charts/config-echarts.js +0 -0
- /package/{ui-sdks → other}/qiun-data-charts/js_sdk/u-charts/readme.md +0 -0
- /package/{ui-sdks → other}/qiun-data-charts/js_sdk/u-charts/u-charts.js +0 -0
- /package/{ui-sdks → other}/qiun-data-charts/js_sdk/u-charts/u-charts.min.js +0 -0
- /package/{ui-sdks/sdk-u-charts → other/qiun-data-charts/js_sdk2}/app-echarts.min.js +0 -0
- /package/{ui-sdks/sdk-u-charts → other/qiun-data-charts/js_sdk2}/h5-echarts.min.js +0 -0
- /package/{ui-sdks → other}/qiun-data-charts/license.md +0 -0
- /package/{ui-sdks → other}/qiun-data-charts/readme.md +0 -0
- /package/{ui-sdks → other}/qiun-data-charts/static/app-plus/echarts.min.js +0 -0
- /package/{ui-sdks → other}/qiun-data-charts/static/h5/echarts.min.js +0 -0
- /package/{ui-sdks → other}/tui-clipboard/tui-clipboard.js +0 -0
- /package/other/{u-parse-2019 → u-parse}/components/wxParseAudio.vue +0 -0
- /package/other/{u-parse-2019 → u-parse}/components/wxParseImg.vue +0 -0
- /package/other/{u-parse-2019 → u-parse}/components/wxParseTemplate1.vue +0 -0
- /package/other/{u-parse-2019 → u-parse}/components/wxParseTemplate10.vue +0 -0
- /package/other/{u-parse-2019 → u-parse}/components/wxParseTemplate11.vue +0 -0
- /package/other/{u-parse-2019 → u-parse}/components/wxParseTemplate2.vue +0 -0
- /package/other/{u-parse-2019 → u-parse}/components/wxParseTemplate3.vue +0 -0
- /package/other/{u-parse-2019 → u-parse}/components/wxParseTemplate4.vue +0 -0
- /package/other/{u-parse-2019 → u-parse}/components/wxParseTemplate5.vue +0 -0
- /package/other/{u-parse-2019 → u-parse}/components/wxParseTemplate6.vue +0 -0
- /package/other/{u-parse-2019 → u-parse}/components/wxParseTemplate7.vue +0 -0
- /package/other/{u-parse-2019 → u-parse}/components/wxParseTemplate8.vue +0 -0
- /package/other/{u-parse-2019 → u-parse}/components/wxParseTemplate9.vue +0 -0
- /package/other/{u-parse-2019 → u-parse}/components/wxParseVideo.vue +0 -0
- /package/other/{u-parse-2019 → u-parse}/libs/htmlparser.js +0 -0
- /package/other/{u-parse-2019 → u-parse}/u-parse.css +0 -0
- /package/other/{uParse → uParse2}/components/wxParseTemplate10.vue +0 -0
- /package/other/{uParse → uParse2}/components/wxParseTemplate11.vue +0 -0
- /package/other/{uParse → uParse2}/components/wxParseTemplate2.vue +0 -0
- /package/other/{uParse → uParse2}/components/wxParseTemplate3.vue +0 -0
- /package/other/{uParse → uParse2}/components/wxParseTemplate4.vue +0 -0
- /package/other/{uParse → uParse2}/components/wxParseTemplate5.vue +0 -0
- /package/other/{uParse → uParse2}/components/wxParseTemplate6.vue +0 -0
- /package/other/{uParse → uParse2}/components/wxParseTemplate7.vue +0 -0
- /package/other/{uParse → uParse2}/components/wxParseTemplate8.vue +0 -0
- /package/other/{uParse → uParse2}/components/wxParseTemplate9.vue +0 -0
- /package/other/{uParse → uParse2}/components/wxParseVideo.vue +0 -0
- /package/other/{uParse → uParse2}/editor.css +0 -0
- /package/other/{uParse → uParse2}/libs/htmlparser.js +0 -0
- /package/{other/xt-parse/static/app-plus/u-parse → uview-plus/components/u-parse/static/app-plus/up-parse}/js/handler2.js +0 -0
- /package/{other/xt-parse/static/app-plus/u-parse → uview-plus/components/u-parse/static/app-plus/up-parse}/js/uni.webview.min.js +0 -0
- /package/{other/xt-parse/static/app-plus/u-parse → uview-plus/components/u-parse/static/app-plus/up-parse}/js/uni.webview.min2.js +0 -0
- /package/{other/xt-parse/static/app-plus/u-parse → uview-plus/components/u-parse/static/app-plus/up-parse}/local.html +0 -0
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @Class Request
|
|
3
|
-
* @description luch-request http请求插件
|
|
4
|
-
* @Author lu-ch
|
|
5
|
-
* @Email webwork.s@qq.com
|
|
6
|
-
* 文档: https://www.quanzhan.co/luch-request/
|
|
7
|
-
* github: https://github.com/lei-mu/luch-request
|
|
8
|
-
* DCloud: http://ext.dcloud.net.cn/plugin?id=392
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
import dispatchRequest from './dispatchRequest';
|
|
12
|
-
import InterceptorManager from './InterceptorManager';
|
|
13
|
-
import mergeConfig from './mergeConfig';
|
|
14
|
-
import defaults from './defaults';
|
|
15
|
-
import { isPlainObject } from '../utils';
|
|
16
|
-
import clone from '../utils/clone';
|
|
17
|
-
|
|
18
|
-
export default class Request {
|
|
19
|
-
/**
|
|
20
|
-
* @param {Object} arg - 全局配置
|
|
21
|
-
* @param {String} arg.baseURL - 全局根路径
|
|
22
|
-
* @param {Object} arg.header - 全局header
|
|
23
|
-
* @param {String} arg.method = [GET|POST|PUT|DELETE|CONNECT|HEAD|OPTIONS|TRACE] - 全局默认请求方式
|
|
24
|
-
* @param {String} arg.dataType = [json] - 全局默认的dataType
|
|
25
|
-
* @param {String} arg.responseType = [text|arraybuffer] - 全局默认的responseType。支付宝小程序不支持
|
|
26
|
-
* @param {Object} arg.custom - 全局默认的自定义参数
|
|
27
|
-
* @param {Number} arg.timeout - 全局默认的超时时间,单位 ms。默认60000。H5(HBuilderX 2.9.9+)、APP(HBuilderX 2.9.9+)、微信小程序(2.10.0)、支付宝小程序
|
|
28
|
-
* @param {Boolean} arg.sslVerify - 全局默认的是否验证 ssl 证书。默认true.仅App安卓端支持(HBuilderX 2.3.3+)
|
|
29
|
-
* @param {Boolean} arg.withCredentials - 全局默认的跨域请求时是否携带凭证(cookies)。默认false。仅H5支持(HBuilderX 2.6.15+)
|
|
30
|
-
* @param {Boolean} arg.firstIpv4 - 全DNS解析时优先使用ipv4。默认false。仅 App-Android 支持 (HBuilderX 2.8.0+)
|
|
31
|
-
* @param {Function(statusCode):Boolean} arg.validateStatus - 全局默认的自定义验证器。默认statusCode >= 200 && statusCode < 300
|
|
32
|
-
*/
|
|
33
|
-
constructor(arg = {}) {
|
|
34
|
-
if (!isPlainObject(arg)) {
|
|
35
|
-
arg = {};
|
|
36
|
-
console.warn('设置全局参数必须接收一个Object');
|
|
37
|
-
}
|
|
38
|
-
this.config = clone({ ...defaults, ...arg });
|
|
39
|
-
this.interceptors = {
|
|
40
|
-
request: new InterceptorManager(),
|
|
41
|
-
response: new InterceptorManager()
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* @Function
|
|
47
|
-
* @param {Request~setConfigCallback} f - 设置全局默认配置
|
|
48
|
-
*/
|
|
49
|
-
setConfig(f) {
|
|
50
|
-
this.config = f(this.config);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
middleware(config) {
|
|
54
|
-
config = mergeConfig(this.config, config);
|
|
55
|
-
let chain = [dispatchRequest, undefined];
|
|
56
|
-
let promise = Promise.resolve(config);
|
|
57
|
-
|
|
58
|
-
this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
|
|
59
|
-
chain.unshift(interceptor.fulfilled, interceptor.rejected);
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
|
|
63
|
-
chain.push(interceptor.fulfilled, interceptor.rejected);
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
while (chain.length) {
|
|
67
|
-
promise = promise.then(chain.shift(), chain.shift());
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
return promise;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* @Function
|
|
75
|
-
* @param {Object} config - 请求配置项
|
|
76
|
-
* @prop {String} options.url - 请求路径
|
|
77
|
-
* @prop {Object} options.data - 请求参数
|
|
78
|
-
* @prop {Object} [options.responseType = config.responseType] [text|arraybuffer] - 响应的数据类型
|
|
79
|
-
* @prop {Object} [options.dataType = config.dataType] - 如果设为 json,会尝试对返回的数据做一次 JSON.parse
|
|
80
|
-
* @prop {Object} [options.header = config.header] - 请求header
|
|
81
|
-
* @prop {Object} [options.method = config.method] - 请求方法
|
|
82
|
-
* @returns {Promise<unknown>}
|
|
83
|
-
*/
|
|
84
|
-
request(config = {}) {
|
|
85
|
-
return this.middleware(config);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
get(url, options = {}) {
|
|
89
|
-
return this.middleware({
|
|
90
|
-
url,
|
|
91
|
-
method: 'GET',
|
|
92
|
-
...options
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
post(url, data, options = {}) {
|
|
97
|
-
return this.middleware({
|
|
98
|
-
url,
|
|
99
|
-
data,
|
|
100
|
-
method: 'POST',
|
|
101
|
-
...options
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
// #ifndef MP-ALIPAY || MP-KUAISHOU || MP-JD
|
|
106
|
-
put(url, data, options = {}) {
|
|
107
|
-
return this.middleware({
|
|
108
|
-
url,
|
|
109
|
-
data,
|
|
110
|
-
method: 'PUT',
|
|
111
|
-
...options
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
// #endif
|
|
116
|
-
|
|
117
|
-
// #ifdef APP-PLUS || H5 || MP-WEIXIN || MP-BAIDU
|
|
118
|
-
delete(url, data, options = {}) {
|
|
119
|
-
return this.middleware({
|
|
120
|
-
url,
|
|
121
|
-
data,
|
|
122
|
-
method: 'DELETE',
|
|
123
|
-
...options
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
// #endif
|
|
128
|
-
|
|
129
|
-
// #ifdef H5 || MP-WEIXIN
|
|
130
|
-
connect(url, data, options = {}) {
|
|
131
|
-
return this.middleware({
|
|
132
|
-
url,
|
|
133
|
-
data,
|
|
134
|
-
method: 'CONNECT',
|
|
135
|
-
...options
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
// #endif
|
|
140
|
-
|
|
141
|
-
// #ifdef H5 || MP-WEIXIN || MP-BAIDU
|
|
142
|
-
head(url, data, options = {}) {
|
|
143
|
-
return this.middleware({
|
|
144
|
-
url,
|
|
145
|
-
data,
|
|
146
|
-
method: 'HEAD',
|
|
147
|
-
...options
|
|
148
|
-
});
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
// #endif
|
|
152
|
-
|
|
153
|
-
// #ifdef APP-PLUS || H5 || MP-WEIXIN || MP-BAIDU
|
|
154
|
-
options(url, data, options = {}) {
|
|
155
|
-
return this.middleware({
|
|
156
|
-
url,
|
|
157
|
-
data,
|
|
158
|
-
method: 'OPTIONS',
|
|
159
|
-
...options
|
|
160
|
-
});
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
// #endif
|
|
164
|
-
|
|
165
|
-
// #ifdef H5 || MP-WEIXIN
|
|
166
|
-
trace(url, data, options = {}) {
|
|
167
|
-
return this.middleware({
|
|
168
|
-
url,
|
|
169
|
-
data,
|
|
170
|
-
method: 'TRACE',
|
|
171
|
-
...options
|
|
172
|
-
});
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
// #endif
|
|
176
|
-
|
|
177
|
-
upload(url, config = {}) {
|
|
178
|
-
config.url = url;
|
|
179
|
-
config.method = 'UPLOAD';
|
|
180
|
-
return this.middleware(config);
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
download(url, config = {}) {
|
|
184
|
-
config.url = url;
|
|
185
|
-
config.method = 'DOWNLOAD';
|
|
186
|
-
return this.middleware(config);
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
get version() {
|
|
190
|
-
return '3.1.0';
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
/**
|
|
195
|
-
* setConfig回调
|
|
196
|
-
* @return {Object} - 返回操作后的config
|
|
197
|
-
* @callback Request~setConfigCallback
|
|
198
|
-
* @param {Object} config - 全局默认config
|
|
199
|
-
*/
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
import isAbsoluteURL from '../helpers/isAbsoluteURL';
|
|
4
|
-
import combineURLs from '../helpers/combineURLs';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Creates a new URL by combining the baseURL with the requestedURL,
|
|
8
|
-
* only when the requestedURL is not already an absolute URL.
|
|
9
|
-
* If the requestURL is absolute, this function returns the requestedURL untouched.
|
|
10
|
-
*
|
|
11
|
-
* @param {string} baseURL The base URL
|
|
12
|
-
* @param {string} requestedURL Absolute or relative URL to combine
|
|
13
|
-
* @returns {string} The combined full path
|
|
14
|
-
*/
|
|
15
|
-
export default function buildFullPath(baseURL, requestedURL) {
|
|
16
|
-
if (baseURL && !isAbsoluteURL(requestedURL)) {
|
|
17
|
-
return combineURLs(baseURL, requestedURL);
|
|
18
|
-
}
|
|
19
|
-
return requestedURL;
|
|
20
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 默认的全局配置
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
baseURL: '',
|
|
7
|
-
header: {},
|
|
8
|
-
method: 'GET',
|
|
9
|
-
dataType: 'json',
|
|
10
|
-
paramsSerializer: null,
|
|
11
|
-
// #ifndef MP-ALIPAY
|
|
12
|
-
responseType: 'text',
|
|
13
|
-
// #endif
|
|
14
|
-
custom: {},
|
|
15
|
-
// #ifdef H5 || APP-PLUS || MP-WEIXIN || MP-ALIPAY || MP-TOUTIAO || MP-KUAISHOU
|
|
16
|
-
timeout: 60000,
|
|
17
|
-
// #endif
|
|
18
|
-
// #ifdef APP-PLUS
|
|
19
|
-
sslVerify: true,
|
|
20
|
-
// #endif
|
|
21
|
-
// #ifdef H5
|
|
22
|
-
withCredentials: false,
|
|
23
|
-
// #endif
|
|
24
|
-
// #ifdef APP-PLUS
|
|
25
|
-
firstIpv4: false,
|
|
26
|
-
// #endif
|
|
27
|
-
validateStatus: function validateStatus(status) {
|
|
28
|
-
return status >= 200 && status < 300;
|
|
29
|
-
},
|
|
30
|
-
// 是否尝试将响应数据json化
|
|
31
|
-
forcedJSONParsing: true
|
|
32
|
-
};
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
import { deepMerge, isUndefined } from '../utils';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* 合并局部配置优先的配置,如果局部有该配置项则用局部,如果全局有该配置项则用全局
|
|
5
|
-
* @param {Array} keys - 配置项
|
|
6
|
-
* @param {Object} globalsConfig - 当前的全局配置
|
|
7
|
-
* @param {Object} config2 - 局部配置
|
|
8
|
-
* @return {{}}
|
|
9
|
-
*/
|
|
10
|
-
const mergeKeys = (keys, globalsConfig, config2) => {
|
|
11
|
-
let config = {};
|
|
12
|
-
keys.forEach((prop) => {
|
|
13
|
-
if (!isUndefined(config2[prop])) {
|
|
14
|
-
config[prop] = config2[prop];
|
|
15
|
-
} else if (!isUndefined(globalsConfig[prop])) {
|
|
16
|
-
config[prop] = globalsConfig[prop];
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
return config;
|
|
20
|
-
};
|
|
21
|
-
/**
|
|
22
|
-
*
|
|
23
|
-
* @param globalsConfig - 当前实例的全局配置
|
|
24
|
-
* @param config2 - 当前的局部配置
|
|
25
|
-
* @return - 合并后的配置
|
|
26
|
-
*/
|
|
27
|
-
export default (globalsConfig, config2 = {}) => {
|
|
28
|
-
const method = config2.method || globalsConfig.method || 'GET';
|
|
29
|
-
let config = {
|
|
30
|
-
baseURL: config2.baseURL || globalsConfig.baseURL || '',
|
|
31
|
-
method: method,
|
|
32
|
-
url: config2.url || '',
|
|
33
|
-
params: config2.params || {},
|
|
34
|
-
custom: { ...(globalsConfig.custom || {}), ...(config2.custom || {}) },
|
|
35
|
-
header: deepMerge(globalsConfig.header || {}, config2.header || {})
|
|
36
|
-
};
|
|
37
|
-
const defaultToConfig2Keys = ['getTask', 'validateStatus', 'paramsSerializer', 'forcedJSONParsing'];
|
|
38
|
-
config = { ...config, ...mergeKeys(defaultToConfig2Keys, globalsConfig, config2) };
|
|
39
|
-
|
|
40
|
-
// eslint-disable-next-line no-empty
|
|
41
|
-
if (method === 'DOWNLOAD') {
|
|
42
|
-
const downloadKeys = [
|
|
43
|
-
// #ifdef H5 || APP-PLUS || MP-WEIXIN || MP-ALIPAY || MP-TOUTIAO || MP-KUAISHOU
|
|
44
|
-
'timeout',
|
|
45
|
-
// #endif
|
|
46
|
-
// #ifdef MP
|
|
47
|
-
'filePath'
|
|
48
|
-
// #endif
|
|
49
|
-
];
|
|
50
|
-
config = { ...config, ...mergeKeys(downloadKeys, globalsConfig, config2) };
|
|
51
|
-
} else if (method === 'UPLOAD') {
|
|
52
|
-
delete config.header['content-type'];
|
|
53
|
-
delete config.header['Content-Type'];
|
|
54
|
-
const uploadKeys = [
|
|
55
|
-
// #ifdef APP-PLUS || H5
|
|
56
|
-
'files',
|
|
57
|
-
// #endif
|
|
58
|
-
// #ifdef MP-ALIPAY
|
|
59
|
-
'fileType',
|
|
60
|
-
// #endif
|
|
61
|
-
// #ifdef H5
|
|
62
|
-
'file',
|
|
63
|
-
// #endif
|
|
64
|
-
'filePath',
|
|
65
|
-
'name',
|
|
66
|
-
// #ifdef H5 || APP-PLUS || MP-WEIXIN || MP-ALIPAY || MP-TOUTIAO || MP-KUAISHOU
|
|
67
|
-
'timeout',
|
|
68
|
-
// #endif
|
|
69
|
-
'formData'
|
|
70
|
-
];
|
|
71
|
-
uploadKeys.forEach((prop) => {
|
|
72
|
-
if (!isUndefined(config2[prop])) {
|
|
73
|
-
config[prop] = config2[prop];
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
// #ifdef H5 || APP-PLUS || MP-WEIXIN || MP-ALIPAY || MP-TOUTIAO || MP-KUAISHOU
|
|
77
|
-
if (isUndefined(config.timeout) && !isUndefined(globalsConfig.timeout)) {
|
|
78
|
-
config['timeout'] = globalsConfig['timeout'];
|
|
79
|
-
}
|
|
80
|
-
// #endif
|
|
81
|
-
} else {
|
|
82
|
-
const defaultsKeys = [
|
|
83
|
-
'data',
|
|
84
|
-
// #ifdef H5 || APP-PLUS || MP-ALIPAY || MP-WEIXIN
|
|
85
|
-
'timeout',
|
|
86
|
-
// #endif
|
|
87
|
-
'dataType',
|
|
88
|
-
// #ifndef MP-ALIPAY
|
|
89
|
-
'responseType',
|
|
90
|
-
// #endif
|
|
91
|
-
// #ifdef APP-PLUS
|
|
92
|
-
'sslVerify',
|
|
93
|
-
// #endif
|
|
94
|
-
// #ifdef H5
|
|
95
|
-
'withCredentials',
|
|
96
|
-
// #endif
|
|
97
|
-
// #ifdef APP-PLUS
|
|
98
|
-
'firstIpv4',
|
|
99
|
-
// #endif
|
|
100
|
-
// #ifdef MP-WEIXIN
|
|
101
|
-
'enableHttp2',
|
|
102
|
-
'enableQuic',
|
|
103
|
-
// #endif
|
|
104
|
-
// #ifdef MP-TOUTIAO || MP-WEIXIN
|
|
105
|
-
'enableCache',
|
|
106
|
-
// #endif
|
|
107
|
-
// #ifdef MP-WEIXIN
|
|
108
|
-
'enableHttpDNS',
|
|
109
|
-
'httpDNSServiceId',
|
|
110
|
-
'enableChunked',
|
|
111
|
-
'forceCellularNetwork',
|
|
112
|
-
// #endif
|
|
113
|
-
// #ifdef MP-ALIPAY
|
|
114
|
-
'enableCookie',
|
|
115
|
-
// #endif
|
|
116
|
-
// #ifdef MP-BAIDU
|
|
117
|
-
'cloudCache',
|
|
118
|
-
'defer'
|
|
119
|
-
// #endif
|
|
120
|
-
];
|
|
121
|
-
config = { ...config, ...mergeKeys(defaultsKeys, globalsConfig, config2) };
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
return config;
|
|
125
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Resolve or reject a Promise based on response status.
|
|
3
|
-
*
|
|
4
|
-
* @param {Function} resolve A function that resolves the promise.
|
|
5
|
-
* @param {Function} reject A function that rejects the promise.
|
|
6
|
-
* @param {object} response The response.
|
|
7
|
-
*/
|
|
8
|
-
export default function settle(resolve, reject, response) {
|
|
9
|
-
const validateStatus = response.config.validateStatus;
|
|
10
|
-
const status = response.statusCode;
|
|
11
|
-
if (status && (!validateStatus || validateStatus(status))) {
|
|
12
|
-
resolve(response);
|
|
13
|
-
} else {
|
|
14
|
-
reject(response);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
import * as utils from './../utils';
|
|
4
|
-
|
|
5
|
-
function encode(val) {
|
|
6
|
-
return encodeURIComponent(val)
|
|
7
|
-
.replace(/%40/gi, '@')
|
|
8
|
-
.replace(/%3A/gi, ':')
|
|
9
|
-
.replace(/%24/g, '$')
|
|
10
|
-
.replace(/%2C/gi, ',')
|
|
11
|
-
.replace(/%20/g, '+')
|
|
12
|
-
.replace(/%5B/gi, '[')
|
|
13
|
-
.replace(/%5D/gi, ']');
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Build a URL by appending params to the end
|
|
18
|
-
*
|
|
19
|
-
* @param {string} url The base of the url (e.g., http://www.google.com)
|
|
20
|
-
* @param {object} [params] The params to be appended
|
|
21
|
-
* @returns {string} The formatted url
|
|
22
|
-
*/
|
|
23
|
-
export default function buildURL(url, params, paramsSerializer) {
|
|
24
|
-
/*eslint no-param-reassign:0*/
|
|
25
|
-
if (!params) {
|
|
26
|
-
return url;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
var serializedParams;
|
|
30
|
-
if (paramsSerializer) {
|
|
31
|
-
serializedParams = paramsSerializer(params);
|
|
32
|
-
} else if (utils.isURLSearchParams(params)) {
|
|
33
|
-
serializedParams = params.toString();
|
|
34
|
-
} else {
|
|
35
|
-
var parts = [];
|
|
36
|
-
|
|
37
|
-
utils.forEach(params, function serialize(val, key) {
|
|
38
|
-
if (val === null || typeof val === 'undefined') {
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
if (utils.isArray(val)) {
|
|
43
|
-
key = key + '[]';
|
|
44
|
-
} else {
|
|
45
|
-
val = [val];
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
utils.forEach(val, function parseValue(v) {
|
|
49
|
-
if (utils.isDate(v)) {
|
|
50
|
-
v = v.toISOString();
|
|
51
|
-
} else if (utils.isObject(v)) {
|
|
52
|
-
v = JSON.stringify(v);
|
|
53
|
-
}
|
|
54
|
-
parts.push(encode(key) + '=' + encode(v));
|
|
55
|
-
});
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
serializedParams = parts.join('&');
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
if (serializedParams) {
|
|
62
|
-
var hashmarkIndex = url.indexOf('#');
|
|
63
|
-
if (hashmarkIndex !== -1) {
|
|
64
|
-
url = url.slice(0, hashmarkIndex);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
return url;
|
|
71
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Creates a new URL by combining the specified URLs
|
|
5
|
-
*
|
|
6
|
-
* @param {string} baseURL The base URL
|
|
7
|
-
* @param {string} relativeURL The relative URL
|
|
8
|
-
* @returns {string} The combined URL
|
|
9
|
-
*/
|
|
10
|
-
export default function combineURLs(baseURL, relativeURL) {
|
|
11
|
-
return relativeURL ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '') : baseURL;
|
|
12
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Determines whether the specified URL is absolute
|
|
5
|
-
*
|
|
6
|
-
* @param {string} url The URL to test
|
|
7
|
-
* @returns {boolean} True if the specified URL is absolute, otherwise false
|
|
8
|
-
*/
|
|
9
|
-
export default function isAbsoluteURL(url) {
|
|
10
|
-
// A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
|
|
11
|
-
// RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
|
|
12
|
-
// by any combination of letters, digits, plus, period, or hyphen.
|
|
13
|
-
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
|
|
14
|
-
}
|
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
export type HttpTask = UniApp.RequestTask | UniApp.UploadTask | UniApp.DownloadTask;
|
|
2
|
-
|
|
3
|
-
export type HttpRequestTask = UniApp.RequestTask;
|
|
4
|
-
|
|
5
|
-
export type HttpUploadTask = UniApp.UploadTask;
|
|
6
|
-
|
|
7
|
-
export type HttpDownloadTask = UniApp.DownloadTask;
|
|
8
|
-
|
|
9
|
-
export type HttpMethod =
|
|
10
|
-
"GET"
|
|
11
|
-
| "POST"
|
|
12
|
-
| "PUT"
|
|
13
|
-
| "DELETE"
|
|
14
|
-
| "CONNECT"
|
|
15
|
-
| "HEAD"
|
|
16
|
-
| "OPTIONS"
|
|
17
|
-
| "TRACE"
|
|
18
|
-
| "UPLOAD"
|
|
19
|
-
| "DOWNLOAD";
|
|
20
|
-
|
|
21
|
-
export type HttpRequestHeader = Record<string, string>;
|
|
22
|
-
|
|
23
|
-
export type HttpParams = Record<string, any>;
|
|
24
|
-
|
|
25
|
-
export type HttpData = Record<string, any>;
|
|
26
|
-
|
|
27
|
-
export type HttpResponseType = 'arraybuffer' | 'text';
|
|
28
|
-
|
|
29
|
-
export type HttpCustom = Record<string, any>;
|
|
30
|
-
|
|
31
|
-
export type HttpFileType = 'image' | 'video' | 'audio';
|
|
32
|
-
|
|
33
|
-
export type HttpFormData = Record<string, any>;
|
|
34
|
-
|
|
35
|
-
export type HttpResponseHeader = Record<string, string> & {
|
|
36
|
-
"set-cookie"?: string[]
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
export interface HttpRequestConfig<T = HttpTask> {
|
|
40
|
-
/** @desc 请求服务器接口地址 */
|
|
41
|
-
url?: string;
|
|
42
|
-
/** @desc 请求方式,默认为 GET */
|
|
43
|
-
method?: HttpMethod;
|
|
44
|
-
/** @desc 请求基地址 */
|
|
45
|
-
baseURL?: string;
|
|
46
|
-
/** @desc 请求头信息,不能设置 Referer,App、H5 端会自动带上 cookie,且 H5 端不可手动修改 */
|
|
47
|
-
header?: HttpRequestHeader;
|
|
48
|
-
/** @desc 请求查询参数,自动拼接为查询字符串 */
|
|
49
|
-
params?: HttpParams;
|
|
50
|
-
/** @desc 请求体参数 */
|
|
51
|
-
data?: HttpData;
|
|
52
|
-
/** @desc 超时时间,单位 ms,默认为 60000,仅 H5 (HBuilderX 2.9.9+)、APP (HBuilderX 2.9.9+)、微信小程序 (2.10.0)、支付宝小程序支持 */
|
|
53
|
-
timeout?: number;
|
|
54
|
-
/** @desc 跨域请求时是否携带凭证 (cookies),默认为 false,仅 H5 (HBuilderX 2.6.15+) 支持 */
|
|
55
|
-
withCredentials?: boolean;
|
|
56
|
-
/** @desc 设置响应的数据类型,支付宝小程序不支持 */
|
|
57
|
-
responseType?: HttpResponseType;
|
|
58
|
-
/** @desc 全局自定义验证器 */
|
|
59
|
-
validateStatus?: ((statusCode: number) => boolean) | null;
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
/** params 参数自定义处理 */
|
|
63
|
-
paramsSerializer?: (params: AnyObject) => string | void;
|
|
64
|
-
|
|
65
|
-
/** @desc 默认为 json,如果设为 json,会尝试对返回的数据做一次 JSON.parse */
|
|
66
|
-
dataType?: string;
|
|
67
|
-
/** @desc DNS 解析时是否优先使用 ipv4,默认为 false,仅 App-Android (HBuilderX 2.8.0+) 支持 */
|
|
68
|
-
firstIpv4?: boolean;
|
|
69
|
-
/** @desc 是否验证 SSL 证书,默认为 true,仅 App-Android (HBuilderX 2.3.3+) 支持 */
|
|
70
|
-
sslVerify?: boolean;
|
|
71
|
-
|
|
72
|
-
/** @desc 开启 http2;微信小程序 */
|
|
73
|
-
enableHttp2?: boolean;
|
|
74
|
-
|
|
75
|
-
/** @desc 开启 quic;微信小程序 */
|
|
76
|
-
enableQuic?: boolean;
|
|
77
|
-
/** @desc 开启 cache;微信小程序、字节跳动小程序 2.31.0+ */
|
|
78
|
-
enableCache?: boolean;
|
|
79
|
-
/** @desc 开启 httpDNS;微信小程序 */
|
|
80
|
-
enableHttpDNS?: boolean;
|
|
81
|
-
/** @desc httpDNS 服务商;微信小程序 */
|
|
82
|
-
httpDNSServiceId?: string;
|
|
83
|
-
/** @desc 开启 transfer-encoding chunked;微信小程序 */
|
|
84
|
-
enableChunked?: boolean;
|
|
85
|
-
/** @desc wifi下使用移动网络发送请求;微信小程序 */
|
|
86
|
-
forceCellularNetwork?: boolean;
|
|
87
|
-
/** @desc 开启后可在headers中编辑cookie;支付宝小程序 10.2.33+ */
|
|
88
|
-
enableCookie?: boolean;
|
|
89
|
-
/** @desc 是否开启云加速;百度小程序 3.310.11+ */
|
|
90
|
-
cloudCache?: boolean | object;
|
|
91
|
-
/** @desc 控制当前请求是否延时至首屏内容渲染后发送;百度小程序 3.310.11+ */
|
|
92
|
-
defer?: boolean;
|
|
93
|
-
|
|
94
|
-
/** @desc 自定义参数 */
|
|
95
|
-
custom?: HttpCustom;
|
|
96
|
-
|
|
97
|
-
/** @desc 返回当前请求的 task 和 options,不要在这里修改 options */
|
|
98
|
-
getTask?: (task: T, options: HttpRequestConfig<T>) => void;
|
|
99
|
-
|
|
100
|
-
/** @desc 需要上传的文件列表,使用 files 时,filePath 和 name 不生效,仅支持 App、H5 (2.6.15+) */
|
|
101
|
-
files?: { name?: string; file?: File; uri: string; }[];
|
|
102
|
-
/** @desc 文件类型,仅支付宝小程序支持且为必填项 */
|
|
103
|
-
fileType?: HttpFileType;
|
|
104
|
-
/** @desc 要上传的文件对象,仅 H5 (2.6.15+) 支持 */
|
|
105
|
-
file?: File;
|
|
106
|
-
/** @desc 要上传文件资源的路径,使用 files 时,filePath 和 name 不生效 */
|
|
107
|
-
filePath?: string;
|
|
108
|
-
/** @desc 文件对应的 key,开发者在服务器端通过这个 key 可以获取到文件二进制内容,使用 files 时,filePath 和 name 不生效 */
|
|
109
|
-
name?: string;
|
|
110
|
-
/** @desc 请求中其他额外的 form data */
|
|
111
|
-
formData?: HttpFormData;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
export interface HttpResponse<T = any, D = HttpTask> {
|
|
115
|
-
data: T;
|
|
116
|
-
statusCode: number;
|
|
117
|
-
header: HttpResponseHeader;
|
|
118
|
-
config: HttpRequestConfig<D>;
|
|
119
|
-
cookies: string[];
|
|
120
|
-
errMsg: string;
|
|
121
|
-
rawData: any;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
export interface HttpUploadResponse<T = any, D = HttpTask> {
|
|
125
|
-
data: T;
|
|
126
|
-
statusCode: number;
|
|
127
|
-
config: HttpRequestConfig<D>;
|
|
128
|
-
errMsg: string;
|
|
129
|
-
rawData: any;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
export interface HttpDownloadResponse extends HttpResponse {
|
|
133
|
-
tempFilePath: string;
|
|
134
|
-
apFilePath?: string;
|
|
135
|
-
filePath?: string;
|
|
136
|
-
fileContent?: string;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
export interface HttpError<T = any, D = HttpTask> {
|
|
140
|
-
data?: T;
|
|
141
|
-
statusCode?: number;
|
|
142
|
-
header?: HttpResponseHeader;
|
|
143
|
-
config: HttpRequestConfig<D>;
|
|
144
|
-
cookies?: string[];
|
|
145
|
-
errMsg: string;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
export interface HttpPromise<T = any> extends Promise<HttpResponse<T>> {
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
export interface HttpInterceptorManager<V, E = V> {
|
|
152
|
-
use(onFulfilled?: (value: V) => V | Promise<V>, onRejected?: (error: E) => T | Promise<E>): void;
|
|
153
|
-
|
|
154
|
-
eject(id: number): void;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
export abstract class HttpRequestAbstract {
|
|
158
|
-
constructor(config?: HttpRequestConfig);
|
|
159
|
-
|
|
160
|
-
interceptors: {
|
|
161
|
-
request: HttpInterceptorManager<HttpRequestConfig>;
|
|
162
|
-
response: HttpInterceptorManager<HttpResponse, HttpError>;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
request<T = any, R = HttpResponse<T>, D = HttpRequestTask>(config: HttpRequestConfig<D>): Promise<R>;
|
|
166
|
-
|
|
167
|
-
get<T = any, R = HttpResponse<T>, D = HttpRequestTask>(url: string, config?: HttpRequestConfig<D>): Promise<R>;
|
|
168
|
-
|
|
169
|
-
delete<T = any, R = HttpResponse<T>, D = HttpRequestTask>(url: string, data?: HttpData, config?: HttpRequestConfig<D>): Promise<R>;
|
|
170
|
-
|
|
171
|
-
head<T = any, R = HttpResponse<T>, D = HttpRequestTask>(url: string, data?: HttpData, config?: HttpRequestConfig<D>): Promise<R>;
|
|
172
|
-
|
|
173
|
-
options<T = any, R = HttpResponse<T>, D = HttpRequestTask>(url: string, data?: HttpData, config?: HttpRequestConfig<D>): Promise<R>;
|
|
174
|
-
|
|
175
|
-
post<T = any, R = HttpResponse<T>, D = HttpRequestTask>(url: string, data?: HttpData, config?: HttpRequestConfig<D>): Promise<R>;
|
|
176
|
-
|
|
177
|
-
put<T = any, R = HttpResponse<T>, D = HttpRequestTask>(url: string, data?: HttpData, config?: HttpRequestConfig<D>): Promise<R>;
|
|
178
|
-
|
|
179
|
-
config: HttpRequestConfig;
|
|
180
|
-
|
|
181
|
-
setConfig<D = HttpTask>(onSend: (config: HttpRequestConfig<D>) => HttpRequestConfig<D>): void;
|
|
182
|
-
|
|
183
|
-
connect<T = any, R = HttpResponse<T>, D = HttpRequestTask>(url: string, data?: HttpData, config?: HttpRequestConfig<D>): Promise<R>;
|
|
184
|
-
|
|
185
|
-
trace<T = any, R = HttpResponse<T>, D = HttpRequestTask>(url: string, data?: HttpData, config?: HttpRequestConfig<D>): Promise<R>;
|
|
186
|
-
|
|
187
|
-
upload<T = any, R = HttpUploadResponse<T>, D = HttpUploadTask>(url: string, config?: HttpRequestConfig<D>): Promise<R>;
|
|
188
|
-
|
|
189
|
-
download<T = any, R = HttpDownloadResponse<T>, D = HttpDownloadTask>(url: string, config?: HttpRequestConfig<D>): Promise<R>;
|
|
190
|
-
|
|
191
|
-
middleware<T = any, R = HttpResponse<T>, D = HttpTask>(config: HttpRequestConfig<D>): Promise<R>;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
declare class HttpRequest extends HttpRequestAbstract {
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
export default HttpRequest;
|