first commit
This commit is contained in:
15
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/config/color.js
vendored
Normal file
15
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/config/color.js
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
"use strict";
|
||||
const color = {
|
||||
primary: "#3c9cff",
|
||||
info: "#909399",
|
||||
default: "#909399",
|
||||
warning: "#f9ae3d",
|
||||
error: "#f56c6c",
|
||||
success: "#5ac725",
|
||||
mainColor: "#303133",
|
||||
contentColor: "#606266",
|
||||
tipsColor: "#909399",
|
||||
lightColor: "#c0c4cc",
|
||||
borderColor: "#e4e7ed"
|
||||
};
|
||||
exports.color = color;
|
||||
59
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/config/config.js
vendored
Normal file
59
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/config/config.js
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
"use strict";
|
||||
const version = "3";
|
||||
{
|
||||
console.log(`
|
||||
%c uview-plus V${version} %c https://uview-plus.jiangruyi.com/
|
||||
|
||||
`, "color: #ffffff; background: #3c9cff; padding:5px 0;", "color: #3c9cff;background: #ffffff; padding:5px 0;");
|
||||
}
|
||||
const config = {
|
||||
v: version,
|
||||
version,
|
||||
// 主题名称
|
||||
type: [
|
||||
"primary",
|
||||
"success",
|
||||
"info",
|
||||
"error",
|
||||
"warning"
|
||||
],
|
||||
// 颜色部分,本来可以通过scss的:export导出供js使用,但是奈何nvue不支持
|
||||
color: {
|
||||
"u-primary": "#2979ff",
|
||||
"u-warning": "#ff9900",
|
||||
"u-success": "#19be6b",
|
||||
"u-error": "#fa3534",
|
||||
"u-info": "#909399",
|
||||
"u-main-color": "#303133",
|
||||
"u-content-color": "#606266",
|
||||
"u-tips-color": "#909399",
|
||||
"u-light-color": "#c0c4cc",
|
||||
"up-primary": "#2979ff",
|
||||
"up-warning": "#ff9900",
|
||||
"up-success": "#19be6b",
|
||||
"up-error": "#fa3534",
|
||||
"up-info": "#909399",
|
||||
"up-main-color": "#303133",
|
||||
"up-content-color": "#606266",
|
||||
"up-tips-color": "#909399",
|
||||
"up-light-color": "#c0c4cc"
|
||||
},
|
||||
// 字体图标地址
|
||||
iconUrl: "https://at.alicdn.com/t/font_2225171_8kdcwk4po24.ttf",
|
||||
// 自定义图标
|
||||
customIcon: {
|
||||
family: "",
|
||||
url: ""
|
||||
},
|
||||
customIcons: {},
|
||||
// 自定义图标与unicode对应关系
|
||||
// 默认单位,可以通过配置为rpx,那么在用于传入组件大小参数为数值时,就默认为rpx
|
||||
unit: "px",
|
||||
// 拦截器
|
||||
interceptor: {
|
||||
navbarLeftClick: null
|
||||
},
|
||||
// 只加载一次字体
|
||||
loadFontOnce: false
|
||||
};
|
||||
exports.config = config;
|
||||
204
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/config/props.js
vendored
Normal file
204
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/config/props.js
vendored
Normal file
@@ -0,0 +1,204 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../../common/vendor.js");
|
||||
const uni_modules_uviewPlus_libs_config_config = require("./config.js");
|
||||
const uni_modules_uviewPlus_libs_config_zIndex = require("./zIndex.js");
|
||||
const uni_modules_uviewPlus_libs_config_color = require("./color.js");
|
||||
const uni_modules_uviewPlus_libs_function_http = require("../function/http.js");
|
||||
const uni_modules_uviewPlus_libs_function_index = require("../function/index.js");
|
||||
const uni_modules_uviewPlus_components_uActionSheet_actionSheet = require("../../components/u-action-sheet/actionSheet.js");
|
||||
const uni_modules_uviewPlus_components_uAlbum_album = require("../../components/u-album/album.js");
|
||||
const uni_modules_uviewPlus_components_uAlert_alert = require("../../components/u-alert/alert.js");
|
||||
const uni_modules_uviewPlus_components_uAvatar_avatar = require("../../components/u-avatar/avatar.js");
|
||||
const uni_modules_uviewPlus_components_uAvatarGroup_avatarGroup = require("../../components/u-avatar-group/avatarGroup.js");
|
||||
const uni_modules_uviewPlus_components_uBackTop_backtop = require("../../components/u-back-top/backtop.js");
|
||||
const uni_modules_uviewPlus_components_uBadge_badge = require("../../components/u-badge/badge.js");
|
||||
const uni_modules_uviewPlus_components_uButton_button = require("../../components/u-button/button.js");
|
||||
const uni_modules_uviewPlus_components_uCalendar_calendar = require("../../components/u-calendar/calendar.js");
|
||||
const uni_modules_uviewPlus_components_uCarKeyboard_carKeyboard = require("../../components/u-car-keyboard/carKeyboard.js");
|
||||
const uni_modules_uviewPlus_components_uCard_card = require("../../components/u-card/card.js");
|
||||
const uni_modules_uviewPlus_components_uCell_cell = require("../../components/u-cell/cell.js");
|
||||
const uni_modules_uviewPlus_components_uCellGroup_cellGroup = require("../../components/u-cell-group/cellGroup.js");
|
||||
const uni_modules_uviewPlus_components_uCheckbox_checkbox = require("../../components/u-checkbox/checkbox.js");
|
||||
const uni_modules_uviewPlus_components_uCheckboxGroup_checkboxGroup = require("../../components/u-checkbox-group/checkboxGroup.js");
|
||||
const uni_modules_uviewPlus_components_uCircleProgress_circleProgress = require("../../components/u-circle-progress/circleProgress.js");
|
||||
const uni_modules_uviewPlus_components_uCode_code = require("../../components/u-code/code.js");
|
||||
const uni_modules_uviewPlus_components_uCodeInput_codeInput = require("../../components/u-code-input/codeInput.js");
|
||||
const uni_modules_uviewPlus_components_uCol_col = require("../../components/u-col/col.js");
|
||||
const uni_modules_uviewPlus_components_uCollapse_collapse = require("../../components/u-collapse/collapse.js");
|
||||
const uni_modules_uviewPlus_components_uCollapseItem_collapseItem = require("../../components/u-collapse-item/collapseItem.js");
|
||||
const uni_modules_uviewPlus_components_uColumnNotice_columnNotice = require("../../components/u-column-notice/columnNotice.js");
|
||||
const uni_modules_uviewPlus_components_uCountDown_countDown = require("../../components/u-count-down/countDown.js");
|
||||
const uni_modules_uviewPlus_components_uCountTo_countTo = require("../../components/u-count-to/countTo.js");
|
||||
const uni_modules_uviewPlus_components_uDatetimePicker_datetimePicker = require("../../components/u-datetime-picker/datetimePicker.js");
|
||||
const uni_modules_uviewPlus_components_uDivider_divider = require("../../components/u-divider/divider.js");
|
||||
const uni_modules_uviewPlus_components_uEmpty_empty = require("../../components/u-empty/empty.js");
|
||||
const uni_modules_uviewPlus_components_uForm_form = require("../../components/u-form/form.js");
|
||||
const uni_modules_uviewPlus_components_uFormItem_formItem = require("../../components/u-form-item/formItem.js");
|
||||
const uni_modules_uviewPlus_components_uGap_gap = require("../../components/u-gap/gap.js");
|
||||
const uni_modules_uviewPlus_components_uGrid_grid = require("../../components/u-grid/grid.js");
|
||||
const uni_modules_uviewPlus_components_uGridItem_gridItem = require("../../components/u-grid-item/gridItem.js");
|
||||
const uni_modules_uviewPlus_components_uIcon_icon = require("../../components/u-icon/icon.js");
|
||||
const uni_modules_uviewPlus_components_uImage_image = require("../../components/u-image/image.js");
|
||||
const uni_modules_uviewPlus_components_uIndexAnchor_indexAnchor = require("../../components/u-index-anchor/indexAnchor.js");
|
||||
const uni_modules_uviewPlus_components_uIndexList_indexList = require("../../components/u-index-list/indexList.js");
|
||||
const uni_modules_uviewPlus_components_uInput_input = require("../../components/u-input/input.js");
|
||||
const uni_modules_uviewPlus_components_uKeyboard_keyboard = require("../../components/u-keyboard/keyboard.js");
|
||||
const uni_modules_uviewPlus_components_uLine_line = require("../../components/u-line/line.js");
|
||||
const uni_modules_uviewPlus_components_uLineProgress_lineProgress = require("../../components/u-line-progress/lineProgress.js");
|
||||
const uni_modules_uviewPlus_components_uLink_link = require("../../components/u-link/link.js");
|
||||
const uni_modules_uviewPlus_components_uList_list = require("../../components/u-list/list.js");
|
||||
const uni_modules_uviewPlus_components_uListItem_listItem = require("../../components/u-list-item/listItem.js");
|
||||
const uni_modules_uviewPlus_components_uLoadingIcon_loadingIcon = require("../../components/u-loading-icon/loadingIcon.js");
|
||||
const uni_modules_uviewPlus_components_uLoadingPage_loadingPage = require("../../components/u-loading-page/loadingPage.js");
|
||||
const uni_modules_uviewPlus_components_uLoadmore_loadmore = require("../../components/u-loadmore/loadmore.js");
|
||||
const uni_modules_uviewPlus_components_uModal_modal = require("../../components/u-modal/modal.js");
|
||||
const uni_modules_uviewPlus_components_uNavbar_navbar = require("../../components/u-navbar/navbar.js");
|
||||
const uni_modules_uviewPlus_components_uNoNetwork_noNetwork = require("../../components/u-no-network/noNetwork.js");
|
||||
const uni_modules_uviewPlus_components_uNoticeBar_noticeBar = require("../../components/u-notice-bar/noticeBar.js");
|
||||
const uni_modules_uviewPlus_components_uNotify_notify = require("../../components/u-notify/notify.js");
|
||||
const uni_modules_uviewPlus_components_uNumberBox_numberBox = require("../../components/u-number-box/numberBox.js");
|
||||
const uni_modules_uviewPlus_components_uNumberKeyboard_numberKeyboard = require("../../components/u-number-keyboard/numberKeyboard.js");
|
||||
const uni_modules_uviewPlus_components_uOverlay_overlay = require("../../components/u-overlay/overlay.js");
|
||||
const uni_modules_uviewPlus_components_uParse_parse = require("../../components/u-parse/parse.js");
|
||||
const uni_modules_uviewPlus_components_uPicker_picker = require("../../components/u-picker/picker.js");
|
||||
const uni_modules_uviewPlus_components_uPopup_popup = require("../../components/u-popup/popup.js");
|
||||
const uni_modules_uviewPlus_components_uRadio_radio = require("../../components/u-radio/radio.js");
|
||||
const uni_modules_uviewPlus_components_uRadioGroup_radioGroup = require("../../components/u-radio-group/radioGroup.js");
|
||||
const uni_modules_uviewPlus_components_uRate_rate = require("../../components/u-rate/rate.js");
|
||||
const uni_modules_uviewPlus_components_uReadMore_readMore = require("../../components/u-read-more/readMore.js");
|
||||
const uni_modules_uviewPlus_components_uRow_row = require("../../components/u-row/row.js");
|
||||
const uni_modules_uviewPlus_components_uRowNotice_rowNotice = require("../../components/u-row-notice/rowNotice.js");
|
||||
const uni_modules_uviewPlus_components_uScrollList_scrollList = require("../../components/u-scroll-list/scrollList.js");
|
||||
const uni_modules_uviewPlus_components_uSearch_search = require("../../components/u-search/search.js");
|
||||
const uni_modules_uviewPlus_components_uSection_section = require("../../components/u-section/section.js");
|
||||
const uni_modules_uviewPlus_components_uSkeleton_skeleton = require("../../components/u-skeleton/skeleton.js");
|
||||
const uni_modules_uviewPlus_components_uSlider_slider = require("../../components/u-slider/slider.js");
|
||||
const uni_modules_uviewPlus_components_uStatusBar_statusBar = require("../../components/u-status-bar/statusBar.js");
|
||||
const uni_modules_uviewPlus_components_uSteps_steps = require("../../components/u-steps/steps.js");
|
||||
const uni_modules_uviewPlus_components_uStepsItem_stepsItem = require("../../components/u-steps-item/stepsItem.js");
|
||||
const uni_modules_uviewPlus_components_uSticky_sticky = require("../../components/u-sticky/sticky.js");
|
||||
const uni_modules_uviewPlus_components_uSubsection_subsection = require("../../components/u-subsection/subsection.js");
|
||||
const uni_modules_uviewPlus_components_uSwipeAction_swipeAction = require("../../components/u-swipe-action/swipeAction.js");
|
||||
const uni_modules_uviewPlus_components_uSwipeActionItem_swipeActionItem = require("../../components/u-swipe-action-item/swipeActionItem.js");
|
||||
const uni_modules_uviewPlus_components_uSwiper_swiper = require("../../components/u-swiper/swiper.js");
|
||||
const uni_modules_uviewPlus_components_uSwiperIndicator_swipterIndicator = require("../../components/u-swiper-indicator/swipterIndicator.js");
|
||||
const uni_modules_uviewPlus_components_uSwitch_switch = require("../../components/u-switch/switch.js");
|
||||
const uni_modules_uviewPlus_components_uTabbar_tabbar = require("../../components/u-tabbar/tabbar.js");
|
||||
const uni_modules_uviewPlus_components_uTabbarItem_tabbarItem = require("../../components/u-tabbar-item/tabbarItem.js");
|
||||
const uni_modules_uviewPlus_components_uTabs_tabs = require("../../components/u-tabs/tabs.js");
|
||||
const uni_modules_uviewPlus_components_uTag_tag = require("../../components/u-tag/tag.js");
|
||||
const uni_modules_uviewPlus_components_uText_text = require("../../components/u-text/text.js");
|
||||
const uni_modules_uviewPlus_components_uTextarea_textarea = require("../../components/u-textarea/textarea.js");
|
||||
const uni_modules_uviewPlus_components_uToast_toast = require("../../components/u-toast/toast.js");
|
||||
const uni_modules_uviewPlus_components_uToolbar_toolbar = require("../../components/u-toolbar/toolbar.js");
|
||||
const uni_modules_uviewPlus_components_uTooltip_tooltip = require("../../components/u-tooltip/tooltip.js");
|
||||
const uni_modules_uviewPlus_components_uTransition_transition = require("../../components/u-transition/transition.js");
|
||||
const uni_modules_uviewPlus_components_uUpload_upload = require("../../components/u-upload/upload.js");
|
||||
const props = {
|
||||
...uni_modules_uviewPlus_components_uActionSheet_actionSheet.ActionSheet,
|
||||
...uni_modules_uviewPlus_components_uAlbum_album.Album,
|
||||
...uni_modules_uviewPlus_components_uAlert_alert.Alert,
|
||||
...uni_modules_uviewPlus_components_uAvatar_avatar.Avatar,
|
||||
...uni_modules_uviewPlus_components_uAvatarGroup_avatarGroup.AvatarGroup,
|
||||
...uni_modules_uviewPlus_components_uBackTop_backtop.Backtop,
|
||||
...uni_modules_uviewPlus_components_uBadge_badge.Badge,
|
||||
...uni_modules_uviewPlus_components_uButton_button.Button,
|
||||
...uni_modules_uviewPlus_components_uCalendar_calendar.Calendar,
|
||||
...uni_modules_uviewPlus_components_uCarKeyboard_carKeyboard.CarKeyboard,
|
||||
...uni_modules_uviewPlus_components_uCard_card.Card,
|
||||
...uni_modules_uviewPlus_components_uCell_cell.Cell,
|
||||
...uni_modules_uviewPlus_components_uCellGroup_cellGroup.CellGroup,
|
||||
...uni_modules_uviewPlus_components_uCheckbox_checkbox.Checkbox,
|
||||
...uni_modules_uviewPlus_components_uCheckboxGroup_checkboxGroup.CheckboxGroup,
|
||||
...uni_modules_uviewPlus_components_uCircleProgress_circleProgress.CircleProgress,
|
||||
...uni_modules_uviewPlus_components_uCode_code.Code,
|
||||
...uni_modules_uviewPlus_components_uCodeInput_codeInput.CodeInput,
|
||||
...uni_modules_uviewPlus_components_uCol_col.Col,
|
||||
...uni_modules_uviewPlus_components_uCollapse_collapse.Collapse,
|
||||
...uni_modules_uviewPlus_components_uCollapseItem_collapseItem.CollapseItem,
|
||||
...uni_modules_uviewPlus_components_uColumnNotice_columnNotice.ColumnNotice,
|
||||
...uni_modules_uviewPlus_components_uCountDown_countDown.CountDown,
|
||||
...uni_modules_uviewPlus_components_uCountTo_countTo.CountTo,
|
||||
...uni_modules_uviewPlus_components_uDatetimePicker_datetimePicker.DatetimePicker,
|
||||
...uni_modules_uviewPlus_components_uDivider_divider.Divider,
|
||||
...uni_modules_uviewPlus_components_uEmpty_empty.Empty,
|
||||
...uni_modules_uviewPlus_components_uForm_form.Form,
|
||||
...uni_modules_uviewPlus_components_uFormItem_formItem.FormItem,
|
||||
...uni_modules_uviewPlus_components_uGap_gap.Gap,
|
||||
...uni_modules_uviewPlus_components_uGrid_grid.Grid,
|
||||
...uni_modules_uviewPlus_components_uGridItem_gridItem.GridItem,
|
||||
...uni_modules_uviewPlus_components_uIcon_icon.Icon,
|
||||
...uni_modules_uviewPlus_components_uImage_image.Image,
|
||||
...uni_modules_uviewPlus_components_uIndexAnchor_indexAnchor.IndexAnchor,
|
||||
...uni_modules_uviewPlus_components_uIndexList_indexList.IndexList,
|
||||
...uni_modules_uviewPlus_components_uInput_input.Input,
|
||||
...uni_modules_uviewPlus_components_uKeyboard_keyboard.Keyboard,
|
||||
...uni_modules_uviewPlus_components_uLine_line.Line,
|
||||
...uni_modules_uviewPlus_components_uLineProgress_lineProgress.LineProgress,
|
||||
...uni_modules_uviewPlus_components_uLink_link.Link,
|
||||
...uni_modules_uviewPlus_components_uList_list.List,
|
||||
...uni_modules_uviewPlus_components_uListItem_listItem.ListItem,
|
||||
...uni_modules_uviewPlus_components_uLoadingIcon_loadingIcon.LoadingIcon,
|
||||
...uni_modules_uviewPlus_components_uLoadingPage_loadingPage.LoadingPage,
|
||||
...uni_modules_uviewPlus_components_uLoadmore_loadmore.Loadmore,
|
||||
...uni_modules_uviewPlus_components_uModal_modal.Modal,
|
||||
...uni_modules_uviewPlus_components_uNavbar_navbar.Navbar,
|
||||
...uni_modules_uviewPlus_components_uNoNetwork_noNetwork.NoNetwork,
|
||||
...uni_modules_uviewPlus_components_uNoticeBar_noticeBar.NoticeBar,
|
||||
...uni_modules_uviewPlus_components_uNotify_notify.Notify,
|
||||
...uni_modules_uviewPlus_components_uNumberBox_numberBox.NumberBox,
|
||||
...uni_modules_uviewPlus_components_uNumberKeyboard_numberKeyboard.NumberKeyboard,
|
||||
...uni_modules_uviewPlus_components_uOverlay_overlay.Overlay,
|
||||
...uni_modules_uviewPlus_components_uParse_parse.Parse,
|
||||
...uni_modules_uviewPlus_components_uPicker_picker.Picker,
|
||||
...uni_modules_uviewPlus_components_uPopup_popup.Popup,
|
||||
...uni_modules_uviewPlus_components_uRadio_radio.Radio,
|
||||
...uni_modules_uviewPlus_components_uRadioGroup_radioGroup.RadioGroup,
|
||||
...uni_modules_uviewPlus_components_uRate_rate.Rate,
|
||||
...uni_modules_uviewPlus_components_uReadMore_readMore.ReadMore,
|
||||
...uni_modules_uviewPlus_components_uRow_row.Row,
|
||||
...uni_modules_uviewPlus_components_uRowNotice_rowNotice.RowNotice,
|
||||
...uni_modules_uviewPlus_components_uScrollList_scrollList.ScrollList,
|
||||
...uni_modules_uviewPlus_components_uSearch_search.Search,
|
||||
...uni_modules_uviewPlus_components_uSection_section.Section,
|
||||
...uni_modules_uviewPlus_components_uSkeleton_skeleton.Skeleton,
|
||||
...uni_modules_uviewPlus_components_uSlider_slider.Slider,
|
||||
...uni_modules_uviewPlus_components_uStatusBar_statusBar.StatusBar,
|
||||
...uni_modules_uviewPlus_components_uSteps_steps.Steps,
|
||||
...uni_modules_uviewPlus_components_uStepsItem_stepsItem.StepsItem,
|
||||
...uni_modules_uviewPlus_components_uSticky_sticky.Sticky,
|
||||
...uni_modules_uviewPlus_components_uSubsection_subsection.Subsection,
|
||||
...uni_modules_uviewPlus_components_uSwipeAction_swipeAction.SwipeAction,
|
||||
...uni_modules_uviewPlus_components_uSwipeActionItem_swipeActionItem.SwipeActionItem,
|
||||
...uni_modules_uviewPlus_components_uSwiper_swiper.Swiper,
|
||||
...uni_modules_uviewPlus_components_uSwiperIndicator_swipterIndicator.SwipterIndicator,
|
||||
...uni_modules_uviewPlus_components_uSwitch_switch.Switch,
|
||||
...uni_modules_uviewPlus_components_uTabbar_tabbar.Tabbar,
|
||||
...uni_modules_uviewPlus_components_uTabbarItem_tabbarItem.TabbarItem,
|
||||
...uni_modules_uviewPlus_components_uTabs_tabs.Tabs,
|
||||
...uni_modules_uviewPlus_components_uTag_tag.Tag,
|
||||
...uni_modules_uviewPlus_components_uText_text.Text,
|
||||
...uni_modules_uviewPlus_components_uTextarea_textarea.Textarea,
|
||||
...uni_modules_uviewPlus_components_uToast_toast.Toast,
|
||||
...uni_modules_uviewPlus_components_uToolbar_toolbar.Toolbar,
|
||||
...uni_modules_uviewPlus_components_uTooltip_tooltip.Tooltip,
|
||||
...uni_modules_uviewPlus_components_uTransition_transition.Transition,
|
||||
...uni_modules_uviewPlus_components_uUpload_upload.Upload
|
||||
};
|
||||
function setConfig(configs) {
|
||||
uni_modules_uviewPlus_libs_function_index.shallowMerge(uni_modules_uviewPlus_libs_config_config.config, configs.config || {});
|
||||
uni_modules_uviewPlus_libs_function_index.shallowMerge(props, configs.props || {});
|
||||
uni_modules_uviewPlus_libs_function_index.shallowMerge(uni_modules_uviewPlus_libs_config_color.color, configs.color || {});
|
||||
uni_modules_uviewPlus_libs_function_index.shallowMerge(uni_modules_uviewPlus_libs_config_zIndex.zIndex, configs.zIndex || {});
|
||||
}
|
||||
if (common_vendor.index && common_vendor.index.upuiParams) {
|
||||
console.log("setting uview-plus");
|
||||
let temp = common_vendor.index.upuiParams();
|
||||
if (temp.httpIns) {
|
||||
temp.httpIns(uni_modules_uviewPlus_libs_function_http.http);
|
||||
}
|
||||
if (temp.options) {
|
||||
setConfig(temp.options);
|
||||
}
|
||||
}
|
||||
exports.props = props;
|
||||
13
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/config/zIndex.js
vendored
Normal file
13
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/config/zIndex.js
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
"use strict";
|
||||
const zIndex = {
|
||||
toast: 10090,
|
||||
noNetwork: 10080,
|
||||
// popup包含popup,actionsheet,keyboard,picker的值
|
||||
popup: 10075,
|
||||
mask: 10070,
|
||||
navbar: 980,
|
||||
topTips: 975,
|
||||
sticky: 970,
|
||||
indexListSticky: 965
|
||||
};
|
||||
exports.zIndex = zIndex;
|
||||
63
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/function/calc.js
vendored
Normal file
63
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/function/calc.js
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
"use strict";
|
||||
function add(arg1, arg2) {
|
||||
var r1, r2, m;
|
||||
try {
|
||||
r1 = arg1.toString().split(".")[1].length;
|
||||
} catch (e) {
|
||||
r1 = 0;
|
||||
}
|
||||
try {
|
||||
r2 = arg2.toString().split(".")[1].length;
|
||||
} catch (e) {
|
||||
r2 = 0;
|
||||
}
|
||||
m = Math.pow(10, Math.max(r1, r2));
|
||||
return (arg1 * m + arg2 * m) / m;
|
||||
}
|
||||
function sub(arg1, arg2) {
|
||||
var r1, r2, m, n;
|
||||
try {
|
||||
r1 = arg1.toString().split(".")[1].length;
|
||||
} catch (e) {
|
||||
r1 = 0;
|
||||
}
|
||||
try {
|
||||
r2 = arg2.toString().split(".")[1].length;
|
||||
} catch (e) {
|
||||
r2 = 0;
|
||||
}
|
||||
m = Math.pow(10, Math.max(r1, r2));
|
||||
n = r1 >= r2 ? r1 : r2;
|
||||
return Math.abs(((arg1 * m - arg2 * m) / m).toFixed(n));
|
||||
}
|
||||
function mul(a, b) {
|
||||
var c = 0, d = a.toString(), e = b.toString();
|
||||
try {
|
||||
c += d.split(".")[1].length;
|
||||
} catch (f) {
|
||||
}
|
||||
try {
|
||||
c += e.split(".")[1].length;
|
||||
} catch (f) {
|
||||
}
|
||||
return Number(d.replace(".", "")) * Number(e.replace(".", "")) / Math.pow(10, c);
|
||||
}
|
||||
function div(a, b) {
|
||||
var c, d, e = 0, f = 0;
|
||||
try {
|
||||
e = a.toString().split(".")[1].length;
|
||||
} catch (g) {
|
||||
}
|
||||
try {
|
||||
f = b.toString().split(".")[1].length;
|
||||
} catch (g) {
|
||||
}
|
||||
return c = Number(a.toString().replace(".", "")), d = Number(b.toString().replace(".", "")), xyutil.mul(c / d, Math.pow(10, f - e));
|
||||
}
|
||||
const calc = {
|
||||
add,
|
||||
sub,
|
||||
mul,
|
||||
div
|
||||
};
|
||||
exports.calc = calc;
|
||||
113
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/function/colorGradient.js
vendored
Normal file
113
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/function/colorGradient.js
vendored
Normal file
@@ -0,0 +1,113 @@
|
||||
"use strict";
|
||||
function colorGradient(startColor = "rgb(0, 0, 0)", endColor = "rgb(255, 255, 255)", step = 10) {
|
||||
const startRGB = hexToRgb(startColor, false);
|
||||
const startR = startRGB[0];
|
||||
const startG = startRGB[1];
|
||||
const startB = startRGB[2];
|
||||
const endRGB = hexToRgb(endColor, false);
|
||||
const endR = endRGB[0];
|
||||
const endG = endRGB[1];
|
||||
const endB = endRGB[2];
|
||||
const sR = (endR - startR) / step;
|
||||
const sG = (endG - startG) / step;
|
||||
const sB = (endB - startB) / step;
|
||||
const colorArr = [];
|
||||
for (let i = 0; i < step; i++) {
|
||||
let hex = rgbToHex(`rgb(${Math.round(sR * i + startR)},${Math.round(sG * i + startG)},${Math.round(sB * i + startB)})`);
|
||||
if (i === 0)
|
||||
hex = rgbToHex(startColor);
|
||||
if (i === step - 1)
|
||||
hex = rgbToHex(endColor);
|
||||
colorArr.push(hex);
|
||||
}
|
||||
return colorArr;
|
||||
}
|
||||
function hexToRgb(sColor, str = true) {
|
||||
const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
|
||||
sColor = String(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;
|
||||
}
|
||||
const sColorChange = [];
|
||||
for (let i = 1; i < 7; i += 2) {
|
||||
sColorChange.push(parseInt(`0x${sColor.slice(i, i + 2)}`));
|
||||
}
|
||||
if (!str) {
|
||||
return sColorChange;
|
||||
}
|
||||
return `rgb(${sColorChange[0]},${sColorChange[1]},${sColorChange[2]})`;
|
||||
}
|
||||
if (/^(rgb|RGB)/.test(sColor)) {
|
||||
const arr = sColor.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
|
||||
return arr.map((val) => Number(val));
|
||||
}
|
||||
return sColor;
|
||||
}
|
||||
function rgbToHex(rgb) {
|
||||
const _this = rgb;
|
||||
const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
|
||||
if (/^(rgb|RGB)/.test(_this)) {
|
||||
const 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;
|
||||
if (hex === "0") {
|
||||
hex += hex;
|
||||
}
|
||||
strHex += hex;
|
||||
}
|
||||
if (strHex.length !== 7) {
|
||||
strHex = _this;
|
||||
}
|
||||
return strHex;
|
||||
}
|
||||
if (reg.test(_this)) {
|
||||
const aNum = _this.replace(/#/, "").split("");
|
||||
if (aNum.length === 6) {
|
||||
return _this;
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
function colorToRgba(color, alpha) {
|
||||
color = rgbToHex(color);
|
||||
const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
|
||||
let sColor = String(color).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;
|
||||
}
|
||||
const sColorChange = [];
|
||||
for (let i = 1; i < 7; i += 2) {
|
||||
sColorChange.push(parseInt(`0x${sColor.slice(i, i + 2)}`));
|
||||
}
|
||||
return `rgba(${sColorChange.join(",")},${alpha})`;
|
||||
}
|
||||
return sColor;
|
||||
}
|
||||
const colorGradient$1 = {
|
||||
colorGradient,
|
||||
hexToRgb,
|
||||
rgbToHex,
|
||||
colorToRgba
|
||||
};
|
||||
exports.colorGradient = colorGradient$1;
|
||||
exports.colorGradient$1 = colorGradient;
|
||||
19
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/function/debounce.js
vendored
Normal file
19
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/function/debounce.js
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
"use strict";
|
||||
let timeout = null;
|
||||
function debounce(func, wait = 500, immediate = false) {
|
||||
if (timeout !== null)
|
||||
clearTimeout(timeout);
|
||||
if (immediate) {
|
||||
const callNow = !timeout;
|
||||
timeout = setTimeout(() => {
|
||||
timeout = null;
|
||||
}, wait);
|
||||
if (callNow)
|
||||
typeof func === "function" && func();
|
||||
} else {
|
||||
timeout = setTimeout(() => {
|
||||
typeof func === "function" && func();
|
||||
}, wait);
|
||||
}
|
||||
}
|
||||
exports.debounce = debounce;
|
||||
63
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/function/digit.js
vendored
Normal file
63
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/function/digit.js
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
"use strict";
|
||||
function strip(num, precision = 15) {
|
||||
return +parseFloat(Number(num).toPrecision(precision));
|
||||
}
|
||||
function digitLength(num) {
|
||||
const eSplit = num.toString().split(/[eE]/);
|
||||
const len = (eSplit[0].split(".")[1] || "").length - +(eSplit[1] || 0);
|
||||
return len > 0 ? len : 0;
|
||||
}
|
||||
function float2Fixed(num) {
|
||||
if (num.toString().indexOf("e") === -1) {
|
||||
return Number(num.toString().replace(".", ""));
|
||||
}
|
||||
const dLen = digitLength(num);
|
||||
return dLen > 0 ? strip(Number(num) * Math.pow(10, dLen)) : Number(num);
|
||||
}
|
||||
function checkBoundary(num) {
|
||||
{
|
||||
if (num > Number.MAX_SAFE_INTEGER || num < Number.MIN_SAFE_INTEGER) {
|
||||
console.warn(`${num} 超出了精度限制,结果可能不正确`);
|
||||
}
|
||||
}
|
||||
}
|
||||
function iteratorOperation(arr, operation) {
|
||||
const [num1, num2, ...others] = arr;
|
||||
let res = operation(num1, num2);
|
||||
others.forEach((num) => {
|
||||
res = operation(res, num);
|
||||
});
|
||||
return res;
|
||||
}
|
||||
function times(...nums) {
|
||||
if (nums.length > 2) {
|
||||
return iteratorOperation(nums, times);
|
||||
}
|
||||
const [num1, num2] = nums;
|
||||
const num1Changed = float2Fixed(num1);
|
||||
const num2Changed = float2Fixed(num2);
|
||||
const baseNum = digitLength(num1) + digitLength(num2);
|
||||
const leftValue = num1Changed * num2Changed;
|
||||
checkBoundary(leftValue);
|
||||
return leftValue / Math.pow(10, baseNum);
|
||||
}
|
||||
function divide(...nums) {
|
||||
if (nums.length > 2) {
|
||||
return iteratorOperation(nums, divide);
|
||||
}
|
||||
const [num1, num2] = nums;
|
||||
const num1Changed = float2Fixed(num1);
|
||||
const num2Changed = float2Fixed(num2);
|
||||
checkBoundary(num1Changed);
|
||||
checkBoundary(num2Changed);
|
||||
return times(num1Changed / num2Changed, strip(Math.pow(10, digitLength(num2) - digitLength(num1))));
|
||||
}
|
||||
function round(num, ratio) {
|
||||
const base = Math.pow(10, ratio);
|
||||
let result = divide(Math.round(Math.abs(times(num, base))), base);
|
||||
if (num < 0 && result !== 0) {
|
||||
result = times(result, -1);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
exports.round = round;
|
||||
4
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/function/http.js
vendored
Normal file
4
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/function/http.js
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
"use strict";
|
||||
const uni_modules_uviewPlus_libs_luchRequest_core_Request = require("../luch-request/core/Request.js");
|
||||
const http = new uni_modules_uviewPlus_libs_luchRequest_core_Request.Request();
|
||||
exports.http = http;
|
||||
597
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/function/index.js
vendored
Normal file
597
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/function/index.js
vendored
Normal file
@@ -0,0 +1,597 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../../common/vendor.js");
|
||||
const uni_modules_uviewPlus_libs_function_test = require("./test.js");
|
||||
const uni_modules_uviewPlus_libs_function_digit = require("./digit.js");
|
||||
const uni_modules_uviewPlus_libs_config_config = require("../config/config.js");
|
||||
function range(min = 0, max = 0, value = 0) {
|
||||
return Math.max(min, Math.min(max, Number(value)));
|
||||
}
|
||||
function getPx(value, unit = false) {
|
||||
if (uni_modules_uviewPlus_libs_function_test.number(value)) {
|
||||
return unit ? `${value}px` : Number(value);
|
||||
}
|
||||
if (/(rpx|upx)$/.test(value)) {
|
||||
return unit ? `${common_vendor.index.upx2px(parseInt(value))}px` : Number(common_vendor.index.upx2px(parseInt(value)));
|
||||
}
|
||||
return unit ? `${parseInt(value)}px` : parseInt(value);
|
||||
}
|
||||
function rpx2px(value) {
|
||||
return common_vendor.index.rpx2px(value);
|
||||
}
|
||||
function sleep(value = 30) {
|
||||
return new Promise((resolve) => {
|
||||
setTimeout(() => {
|
||||
resolve();
|
||||
}, value);
|
||||
});
|
||||
}
|
||||
function os() {
|
||||
return common_vendor.index.getDeviceInfo().platform.toLowerCase();
|
||||
}
|
||||
function sys() {
|
||||
return common_vendor.index.getSystemInfoSync();
|
||||
}
|
||||
function getWindowInfo() {
|
||||
let ret = {};
|
||||
ret = common_vendor.index.getWindowInfo();
|
||||
return ret;
|
||||
}
|
||||
function random(min, max) {
|
||||
if (min >= 0 && max > 0 && max >= min) {
|
||||
const gab = max - min + 1;
|
||||
return Math.floor(Math.random() * gab + min);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
function guid(len = 32, firstU = true, radix = null) {
|
||||
const chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");
|
||||
const uuid = [];
|
||||
radix = radix || chars.length;
|
||||
if (len) {
|
||||
for (let i = 0; i < len; i++)
|
||||
uuid[i] = chars[0 | Math.random() * radix];
|
||||
} else {
|
||||
let r;
|
||||
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 & 3 | 8 : r];
|
||||
}
|
||||
}
|
||||
}
|
||||
if (firstU) {
|
||||
uuid.shift();
|
||||
return `u${uuid.join("")}`;
|
||||
}
|
||||
return uuid.join("");
|
||||
}
|
||||
function $parent(name = void 0) {
|
||||
let parent = this.$parent;
|
||||
while (parent) {
|
||||
name = name.replace(/up-([a-zA-Z0-9-_]+)/g, "u-$1");
|
||||
if (parent.$options && parent.$options.name !== name) {
|
||||
parent = parent.$parent;
|
||||
} else {
|
||||
return parent;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
function addStyle(customStyle, target = "object") {
|
||||
if (uni_modules_uviewPlus_libs_function_test.empty(customStyle) || typeof customStyle === "object" && target === "object" || target === "string" && typeof customStyle === "string") {
|
||||
return customStyle;
|
||||
}
|
||||
if (target === "object") {
|
||||
customStyle = trim(customStyle);
|
||||
const styleArray = customStyle.split(";");
|
||||
const style = {};
|
||||
for (let i = 0; i < styleArray.length; i++) {
|
||||
if (styleArray[i]) {
|
||||
const item = styleArray[i].split(":");
|
||||
style[trim(item[0])] = trim(item[1]);
|
||||
}
|
||||
}
|
||||
return style;
|
||||
}
|
||||
let string = "";
|
||||
if (typeof customStyle === "object") {
|
||||
customStyle.forEach((val, i) => {
|
||||
const key = i.replace(/([A-Z])/g, "-$1").toLowerCase();
|
||||
string += `${key}:${val};`;
|
||||
});
|
||||
}
|
||||
return trim(string);
|
||||
}
|
||||
function addUnit(value = "auto", unit = "") {
|
||||
if (!unit) {
|
||||
unit = uni_modules_uviewPlus_libs_config_config.config.unit || "px";
|
||||
}
|
||||
if (unit == "rpx" && uni_modules_uviewPlus_libs_function_test.number(String(value))) {
|
||||
value = value * 2;
|
||||
}
|
||||
value = String(value);
|
||||
return uni_modules_uviewPlus_libs_function_test.number(value) ? `${value}${unit}` : value;
|
||||
}
|
||||
function deepClone(obj) {
|
||||
if ([null, void 0, NaN, false].includes(obj))
|
||||
return obj;
|
||||
if (typeof obj !== "object" && typeof obj !== "function") {
|
||||
return obj;
|
||||
}
|
||||
const o = uni_modules_uviewPlus_libs_function_test.array(obj) ? [] : {};
|
||||
for (const i in obj) {
|
||||
if (obj.hasOwnProperty(i)) {
|
||||
o[i] = typeof obj[i] === "object" ? deepClone(obj[i]) : obj[i];
|
||||
}
|
||||
}
|
||||
return o;
|
||||
}
|
||||
function deepMerge(targetOrigin = {}, source = {}) {
|
||||
let target = deepClone(targetOrigin);
|
||||
if (typeof target !== "object" || typeof source !== "object")
|
||||
return false;
|
||||
for (const prop in source) {
|
||||
if (!source.hasOwnProperty(prop))
|
||||
continue;
|
||||
if (prop in target) {
|
||||
if (source[prop] == null) {
|
||||
target[prop] = source[prop];
|
||||
} else 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;
|
||||
}
|
||||
function shallowMerge(target, source = {}) {
|
||||
if (typeof target !== "object" || typeof source !== "object")
|
||||
return false;
|
||||
for (const prop in source) {
|
||||
if (!source.hasOwnProperty(prop))
|
||||
continue;
|
||||
if (prop in target) {
|
||||
if (source[prop] == null) {
|
||||
target[prop] = source[prop];
|
||||
} else 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] = shallowMerge(target[prop], source[prop]);
|
||||
}
|
||||
} else {
|
||||
target[prop] = source[prop];
|
||||
}
|
||||
}
|
||||
return target;
|
||||
}
|
||||
function error(err) {
|
||||
{
|
||||
console.error(`uView提示:${err}`);
|
||||
}
|
||||
}
|
||||
function randomArray(array = []) {
|
||||
return array.sort(() => Math.random() - 0.5);
|
||||
}
|
||||
if (!String.prototype.padStart) {
|
||||
String.prototype.padStart = function(maxLength, fillString = " ") {
|
||||
if (Object.prototype.toString.call(fillString) !== "[object String]") {
|
||||
throw new TypeError(
|
||||
"fillString must be String"
|
||||
);
|
||||
}
|
||||
const str = this;
|
||||
if (str.length >= maxLength)
|
||||
return String(str);
|
||||
const fillLength = maxLength - str.length;
|
||||
let times = Math.ceil(fillLength / fillString.length);
|
||||
while (times >>= 1) {
|
||||
fillString += fillString;
|
||||
if (times === 1) {
|
||||
fillString += fillString;
|
||||
}
|
||||
}
|
||||
return fillString.slice(0, fillLength) + str;
|
||||
};
|
||||
}
|
||||
function timeFormat(dateTime = null, formatStr = "yyyy-mm-dd") {
|
||||
let date;
|
||||
if (!dateTime) {
|
||||
date = /* @__PURE__ */ new Date();
|
||||
} else if (/^\d{10}$/.test(dateTime.toString().trim())) {
|
||||
date = new Date(dateTime * 1e3);
|
||||
} else if (typeof dateTime === "string" && /^\d+$/.test(dateTime.trim())) {
|
||||
date = new Date(Number(dateTime));
|
||||
} else if (typeof dateTime === "string" && /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/.test(dateTime)) {
|
||||
date = new Date(dateTime);
|
||||
} else {
|
||||
date = new Date(
|
||||
typeof dateTime === "string" ? dateTime.replace(/-/g, "/") : dateTime
|
||||
);
|
||||
}
|
||||
const timeSource = {
|
||||
"y": date.getFullYear().toString(),
|
||||
// 年
|
||||
"m": (date.getMonth() + 1).toString().padStart(2, "0"),
|
||||
// 月
|
||||
"d": date.getDate().toString().padStart(2, "0"),
|
||||
// 日
|
||||
"h": date.getHours().toString().padStart(2, "0"),
|
||||
// 时
|
||||
"M": date.getMinutes().toString().padStart(2, "0"),
|
||||
// 分
|
||||
"s": date.getSeconds().toString().padStart(2, "0")
|
||||
// 秒
|
||||
// 有其他格式化字符需求可以继续添加,必须转化成字符串
|
||||
};
|
||||
for (const key in timeSource) {
|
||||
const [ret] = new RegExp(`${key}+`).exec(formatStr) || [];
|
||||
if (ret) {
|
||||
const beginIndex = key === "y" && ret.length === 2 ? 2 : 0;
|
||||
formatStr = formatStr.replace(ret, timeSource[key].slice(beginIndex));
|
||||
}
|
||||
}
|
||||
return formatStr;
|
||||
}
|
||||
function timeFrom(timestamp = null, format = "yyyy-mm-dd") {
|
||||
if (timestamp == null)
|
||||
timestamp = Number(/* @__PURE__ */ new Date());
|
||||
timestamp = parseInt(timestamp);
|
||||
if (timestamp.toString().length == 10)
|
||||
timestamp *= 1e3;
|
||||
let timer = (/* @__PURE__ */ new Date()).getTime() - timestamp;
|
||||
timer = parseInt(timer / 1e3);
|
||||
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 < 2592e3):
|
||||
tips = `${parseInt(timer / 86400)}天前`;
|
||||
break;
|
||||
default:
|
||||
if (format === false) {
|
||||
if (timer >= 2592e3 && timer < 365 * 86400) {
|
||||
tips = `${parseInt(timer / (86400 * 30))}个月前`;
|
||||
} else {
|
||||
tips = `${parseInt(timer / (86400 * 365))}年前`;
|
||||
}
|
||||
} else {
|
||||
tips = timeFormat(timestamp, format);
|
||||
}
|
||||
}
|
||||
return tips;
|
||||
}
|
||||
function trim(str, pos = "both") {
|
||||
str = String(str);
|
||||
if (pos == "both") {
|
||||
return str.replace(/^\s+|\s+$/g, "");
|
||||
}
|
||||
if (pos == "left") {
|
||||
return str.replace(/^\s*/, "");
|
||||
}
|
||||
if (pos == "right") {
|
||||
return str.replace(/(\s*$)/g, "");
|
||||
}
|
||||
if (pos == "all") {
|
||||
return str.replace(/\s+/g, "");
|
||||
}
|
||||
return str;
|
||||
}
|
||||
function queryParams(data = {}, isPrefix = true, arrayFormat = "brackets") {
|
||||
const prefix = isPrefix ? "?" : "";
|
||||
const _result = [];
|
||||
if (["indices", "brackets", "repeat", "comma"].indexOf(arrayFormat) == -1)
|
||||
arrayFormat = "brackets";
|
||||
for (const key in data) {
|
||||
const value = data[key];
|
||||
if (["", void 0, null].indexOf(value) >= 0) {
|
||||
continue;
|
||||
}
|
||||
if (value.constructor === Array) {
|
||||
switch (arrayFormat) {
|
||||
case "indices":
|
||||
for (let i = 0; i < value.length; i++) {
|
||||
_result.push(`${key}[${i}]=${value[i]}`);
|
||||
}
|
||||
break;
|
||||
case "brackets":
|
||||
value.forEach((_value) => {
|
||||
_result.push(`${key}[]=${_value}`);
|
||||
});
|
||||
break;
|
||||
case "repeat":
|
||||
value.forEach((_value) => {
|
||||
_result.push(`${key}=${_value}`);
|
||||
});
|
||||
break;
|
||||
case "comma":
|
||||
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("&") : "";
|
||||
}
|
||||
function toast(title, duration = 2e3) {
|
||||
common_vendor.index.showToast({
|
||||
title: String(title),
|
||||
icon: "none",
|
||||
duration
|
||||
});
|
||||
}
|
||||
function type2icon(type = "success", fill = false) {
|
||||
if (["primary", "info", "error", "warning", "success"].indexOf(type) == -1)
|
||||
type = "success";
|
||||
let iconName = "";
|
||||
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";
|
||||
}
|
||||
if (fill)
|
||||
iconName += "-fill";
|
||||
return iconName;
|
||||
}
|
||||
function priceFormat(number, decimals = 0, decimalPoint = ".", thousandsSeparator = ",") {
|
||||
number = `${number}`.replace(/[^0-9+-Ee.]/g, "");
|
||||
const n = !isFinite(+number) ? 0 : +number;
|
||||
const prec = !isFinite(+decimals) ? 0 : Math.abs(decimals);
|
||||
const sep = typeof thousandsSeparator === "undefined" ? "," : thousandsSeparator;
|
||||
const dec = typeof decimalPoint === "undefined" ? "." : decimalPoint;
|
||||
let s = "";
|
||||
s = (prec ? uni_modules_uviewPlus_libs_function_digit.round(n, prec) + "" : `${Math.round(n)}`).split(".");
|
||||
const re = /(-?\d+)(\d{3})/;
|
||||
while (re.test(s[0])) {
|
||||
s[0] = s[0].replace(re, `$1${sep}$2`);
|
||||
}
|
||||
if ((s[1] || "").length < prec) {
|
||||
s[1] = s[1] || "";
|
||||
s[1] += new Array(prec - s[1].length + 1).join("0");
|
||||
}
|
||||
return s.join(dec);
|
||||
}
|
||||
function getDuration(value, unit = true) {
|
||||
const valueNum = parseInt(value);
|
||||
if (unit) {
|
||||
if (/s$/.test(value))
|
||||
return value;
|
||||
return value > 30 ? `${value}ms` : `${value}s`;
|
||||
}
|
||||
if (/ms$/.test(value))
|
||||
return valueNum;
|
||||
if (/s$/.test(value))
|
||||
return valueNum > 30 ? valueNum : valueNum * 1e3;
|
||||
return valueNum;
|
||||
}
|
||||
function padZero(value) {
|
||||
return `00${value}`.slice(-2);
|
||||
}
|
||||
function formValidate(instance, event) {
|
||||
const formItem = $parent.call(instance, "u-form-item");
|
||||
const form = $parent.call(instance, "u-form");
|
||||
if (formItem && form) {
|
||||
form.validateField(formItem.prop, () => {
|
||||
}, event);
|
||||
}
|
||||
}
|
||||
function getProperty(obj, key) {
|
||||
if (typeof obj !== "object" || null == obj) {
|
||||
return "";
|
||||
}
|
||||
if (typeof key !== "string" || key === "") {
|
||||
return "";
|
||||
}
|
||||
if (key.indexOf(".") !== -1) {
|
||||
const keys = key.split(".");
|
||||
let firstObj = obj[keys[0]] || {};
|
||||
for (let i = 1; i < keys.length; i++) {
|
||||
if (firstObj) {
|
||||
firstObj = firstObj[keys[i]];
|
||||
}
|
||||
}
|
||||
return firstObj;
|
||||
}
|
||||
return obj[key];
|
||||
}
|
||||
function setProperty(obj, key, value) {
|
||||
if (typeof obj !== "object" || null == obj) {
|
||||
return;
|
||||
}
|
||||
const inFn = function(_obj, keys, v) {
|
||||
if (keys.length === 1) {
|
||||
_obj[keys[0]] = v;
|
||||
return;
|
||||
}
|
||||
while (keys.length > 1) {
|
||||
const k = keys[0];
|
||||
if (!_obj[k] || typeof _obj[k] !== "object") {
|
||||
_obj[k] = {};
|
||||
}
|
||||
keys.shift();
|
||||
inFn(_obj[k], keys, v);
|
||||
}
|
||||
};
|
||||
if (typeof key !== "string" || key === "")
|
||||
;
|
||||
else if (key.indexOf(".") !== -1) {
|
||||
const keys = key.split(".");
|
||||
inFn(obj, keys, value);
|
||||
} else {
|
||||
obj[key] = value;
|
||||
}
|
||||
}
|
||||
function page() {
|
||||
const pages2 = getCurrentPages();
|
||||
return `/${pages2[pages2.length - 1].route || ""}`;
|
||||
}
|
||||
function pages() {
|
||||
const pages2 = getCurrentPages();
|
||||
return pages2;
|
||||
}
|
||||
function getValueByPath(obj, path) {
|
||||
const pathArr = path.split(".");
|
||||
return pathArr.reduce((acc, curr) => {
|
||||
return acc && acc[curr] !== void 0 ? acc[curr] : void 0;
|
||||
}, obj);
|
||||
}
|
||||
function genLightColor(textColor, lightness = 95) {
|
||||
const rgb = parseColorWithoutDOM(textColor);
|
||||
const hsl = rgbToHsl(rgb.r, rgb.g, rgb.b);
|
||||
const bgHsl = {
|
||||
h: hsl.h,
|
||||
s: hsl.s,
|
||||
l: Math.min(lightness, 95)
|
||||
};
|
||||
return hslToHex(bgHsl.h, bgHsl.s, bgHsl.l);
|
||||
}
|
||||
function parseColorWithoutDOM(colorStr) {
|
||||
const str = colorStr.toLowerCase().trim();
|
||||
if (str.startsWith("#")) {
|
||||
const hex = str.replace("#", "");
|
||||
const fullHex = hex.length === 3 ? hex.split("").map((c) => c + c).join("") : hex;
|
||||
return {
|
||||
r: parseInt(fullHex.substring(0, 2), 16),
|
||||
g: parseInt(fullHex.substring(2, 4), 16),
|
||||
b: parseInt(fullHex.substring(4, 6), 16)
|
||||
};
|
||||
}
|
||||
const rgbMatch = str.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/);
|
||||
if (rgbMatch) {
|
||||
return {
|
||||
r: +rgbMatch[1],
|
||||
g: +rgbMatch[2],
|
||||
b: +rgbMatch[3]
|
||||
};
|
||||
}
|
||||
throw new Error("Invalid color format");
|
||||
}
|
||||
function rgbToHsl(r, g, b) {
|
||||
r /= 255, g /= 255, b /= 255;
|
||||
const max = Math.max(r, g, b), min = Math.min(r, g, b);
|
||||
let h, s, l = (max + min) / 2;
|
||||
if (max === min) {
|
||||
h = s = 0;
|
||||
} else {
|
||||
const d = max - min;
|
||||
s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
|
||||
switch (max) {
|
||||
case r:
|
||||
h = (g - b) / d + (g < b ? 6 : 0);
|
||||
break;
|
||||
case g:
|
||||
h = (b - r) / d + 2;
|
||||
break;
|
||||
case b:
|
||||
h = (r - g) / d + 4;
|
||||
break;
|
||||
}
|
||||
h = (h * 60).toFixed(1);
|
||||
}
|
||||
return { h: +h, s: +(s * 100).toFixed(1), l: +(l * 100).toFixed(1) };
|
||||
}
|
||||
function hslToHex(h, s, l) {
|
||||
l /= 100;
|
||||
const a = s * Math.min(l, 1 - l) / 100;
|
||||
const f = (n) => {
|
||||
const k = (n + h / 30) % 12;
|
||||
const color = l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);
|
||||
return Math.round(255 * color).toString(16).padStart(2, "0");
|
||||
};
|
||||
return `#${f(0)}${f(8)}${f(4)}`;
|
||||
}
|
||||
const index = {
|
||||
range,
|
||||
getPx,
|
||||
sleep,
|
||||
os,
|
||||
sys,
|
||||
getWindowInfo,
|
||||
random,
|
||||
guid,
|
||||
$parent,
|
||||
addStyle,
|
||||
addUnit,
|
||||
deepClone,
|
||||
deepMerge,
|
||||
shallowMerge,
|
||||
error,
|
||||
randomArray,
|
||||
timeFormat,
|
||||
timeFrom,
|
||||
trim,
|
||||
queryParams,
|
||||
toast,
|
||||
type2icon,
|
||||
priceFormat,
|
||||
getDuration,
|
||||
padZero,
|
||||
formValidate,
|
||||
getProperty,
|
||||
setProperty,
|
||||
page,
|
||||
pages,
|
||||
getValueByPath,
|
||||
genLightColor,
|
||||
rpx2px
|
||||
};
|
||||
exports.$parent = $parent;
|
||||
exports.addStyle = addStyle;
|
||||
exports.addUnit = addUnit;
|
||||
exports.deepClone = deepClone;
|
||||
exports.deepMerge = deepMerge;
|
||||
exports.error = error;
|
||||
exports.formValidate = formValidate;
|
||||
exports.genLightColor = genLightColor;
|
||||
exports.getWindowInfo = getWindowInfo;
|
||||
exports.index = index;
|
||||
exports.os = os;
|
||||
exports.padZero = padZero;
|
||||
exports.page = page;
|
||||
exports.queryParams = queryParams;
|
||||
exports.range = range;
|
||||
exports.shallowMerge = shallowMerge;
|
||||
exports.sleep = sleep;
|
||||
exports.toast = toast;
|
||||
7
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/function/platform.js
vendored
Normal file
7
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/function/platform.js
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
"use strict";
|
||||
let platform = "none";
|
||||
platform = "vue3";
|
||||
platform = "mp";
|
||||
platform = "weixin";
|
||||
const platform$1 = platform;
|
||||
exports.platform = platform$1;
|
||||
201
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/function/test.js
vendored
Normal file
201
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/function/test.js
vendored
Normal file
@@ -0,0 +1,201 @@
|
||||
"use strict";
|
||||
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);
|
||||
}
|
||||
function url(value) {
|
||||
return /^((https|http|ftp|rtsp|mms):\/\/)(([0-9a-zA-Z_!~*'().&=+$%-]+: )?[0-9a-zA-Z_!~*'().&=+$%-]+@)?(([0-9]{1,3}.){3}[0-9]{1,3}|([0-9a-zA-Z_!~*'()-]+.)*([0-9a-zA-Z][0-9a-zA-Z-]{0,61})?[0-9a-zA-Z].[a-zA-Z]{2,6})(:[0-9]{1,4})?((\/?)|(\/[0-9a-zA-Z_!~*'().;?:@&=+$,%#-]+)+\/?)$/.test(value);
|
||||
}
|
||||
function date(value) {
|
||||
if (!value)
|
||||
return false;
|
||||
if (typeof value === "number") {
|
||||
if (value.toString().length !== 10 && value.toString().length !== 13) {
|
||||
return false;
|
||||
}
|
||||
return !isNaN(new Date(value).getTime());
|
||||
}
|
||||
if (typeof value === "string") {
|
||||
const numV = Number(value);
|
||||
if (!isNaN(numV)) {
|
||||
if (numV.toString().length === 10 || numV.toString().length === 13) {
|
||||
return !isNaN(new Date(numV).getTime());
|
||||
}
|
||||
}
|
||||
if (value.length < 10 || value.length > 19) {
|
||||
return false;
|
||||
}
|
||||
const dateRegex = /^\d{4}[-\/]\d{2}[-\/]\d{2}( \d{1,2}:\d{2}(:\d{2})?)?$/;
|
||||
if (!dateRegex.test(value)) {
|
||||
return false;
|
||||
}
|
||||
const dateValue = new Date(value);
|
||||
return !isNaN(dateValue.getTime());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
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*|\.\d+|\d\.\d+e\+\d+)$/.test(value);
|
||||
}
|
||||
function string(value) {
|
||||
return typeof value === "string";
|
||||
}
|
||||
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 = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF]$)|([DF][A-HJ-NP-Z0-9][0-9]{4}$))/;
|
||||
const creg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领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);
|
||||
}
|
||||
if (value.length === 8) {
|
||||
return xreg.test(value);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
function amount(value) {
|
||||
return /^[1-9]\d*(,\d{3})*(\.\d{1,2})?$|^0\.\d{1,2}$/.test(value);
|
||||
}
|
||||
function chinese(value) {
|
||||
const reg = /^[\u4e00-\u9fa5]+$/gi;
|
||||
return reg.test(value);
|
||||
}
|
||||
function letter(value) {
|
||||
return /^[a-zA-Z]*$/.test(value);
|
||||
}
|
||||
function enOrNum(value) {
|
||||
const reg = /^[0-9a-zA-Z]*$/g;
|
||||
return reg.test(value);
|
||||
}
|
||||
function contains(value, param) {
|
||||
return value.indexOf(param) >= 0;
|
||||
}
|
||||
function range(value, param) {
|
||||
return value >= param[0] && value <= param[1];
|
||||
}
|
||||
function rangeLength(value, param) {
|
||||
return value.length >= param[0] && value.length <= param[1];
|
||||
}
|
||||
function landline(value) {
|
||||
const 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 (value === 0 || isNaN(value))
|
||||
return true;
|
||||
break;
|
||||
case "object":
|
||||
if (value === null || value.length === 0)
|
||||
return true;
|
||||
for (const i in value) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
function jsonString(value) {
|
||||
if (typeof value === "string") {
|
||||
try {
|
||||
const obj = JSON.parse(value);
|
||||
if (typeof obj === "object" && obj) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
function array(value) {
|
||||
if (typeof Array.isArray === "function") {
|
||||
return Array.isArray(value);
|
||||
}
|
||||
return Object.prototype.toString.call(value) === "[object Array]";
|
||||
}
|
||||
function object(value) {
|
||||
return Object.prototype.toString.call(value) === "[object Object]";
|
||||
}
|
||||
function objectPromise(value) {
|
||||
return Object.prototype.toString.call(value) === "[object Promise]";
|
||||
}
|
||||
function code(value, len = 6) {
|
||||
return new RegExp(`^\\d{${len}}$`).test(value);
|
||||
}
|
||||
function func(value) {
|
||||
return typeof value === "function";
|
||||
}
|
||||
function promise(value) {
|
||||
return objectPromise(value) && func(value.then) && func(value.catch);
|
||||
}
|
||||
function image(value) {
|
||||
const newValue = value.split("?")[0];
|
||||
const IMAGE_REGEXP = /\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i;
|
||||
return IMAGE_REGEXP.test(newValue);
|
||||
}
|
||||
function video(value) {
|
||||
const VIDEO_REGEXP = /\.(mp4|mpg|mpeg|dat|asf|avi|rm|rmvb|mov|wmv|flv|mkv|m3u8)/i;
|
||||
return VIDEO_REGEXP.test(value);
|
||||
}
|
||||
function regExp(o) {
|
||||
return o && Object.prototype.toString.call(o) === "[object RegExp]";
|
||||
}
|
||||
const test = {
|
||||
email,
|
||||
mobile,
|
||||
url,
|
||||
date,
|
||||
dateISO,
|
||||
number,
|
||||
digits,
|
||||
idCard,
|
||||
carNo,
|
||||
amount,
|
||||
chinese,
|
||||
letter,
|
||||
enOrNum,
|
||||
contains,
|
||||
range,
|
||||
rangeLength,
|
||||
empty,
|
||||
isEmpty: empty,
|
||||
jsonString,
|
||||
landline,
|
||||
object,
|
||||
array,
|
||||
code,
|
||||
func,
|
||||
promise,
|
||||
video,
|
||||
image,
|
||||
regExp,
|
||||
string
|
||||
};
|
||||
exports.array = array;
|
||||
exports.empty = empty;
|
||||
exports.number = number;
|
||||
exports.test = test;
|
||||
20
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/function/throttle.js
vendored
Normal file
20
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/function/throttle.js
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
"use strict";
|
||||
let flag;
|
||||
function throttle(func, wait = 500, immediate = true) {
|
||||
if (immediate) {
|
||||
if (!flag) {
|
||||
flag = true;
|
||||
typeof func === "function" && func();
|
||||
setTimeout(() => {
|
||||
flag = false;
|
||||
}, wait);
|
||||
}
|
||||
} else if (!flag) {
|
||||
flag = true;
|
||||
setTimeout(() => {
|
||||
flag = false;
|
||||
typeof func === "function" && func();
|
||||
}, wait);
|
||||
}
|
||||
}
|
||||
exports.throttle = throttle;
|
||||
801
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/i18n/index.js
vendored
Normal file
801
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/i18n/index.js
vendored
Normal file
@@ -0,0 +1,801 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../../common/vendor.js");
|
||||
const zhHans = {
|
||||
"up.common.cancel": "取消",
|
||||
"up.common.confirm": "确定",
|
||||
"up.common.start": "开始",
|
||||
"up.common.end": "结束",
|
||||
"up.common.stop": "停止",
|
||||
"up.common.copy": "复制",
|
||||
"up.common.none": "暂无",
|
||||
"up.common.tip": "提示",
|
||||
"up.common.success": "成功",
|
||||
"up.common.fail": "失败",
|
||||
"up.common.close": "关闭",
|
||||
"up.common.preview": "预览",
|
||||
"up.common.re-select": "重选",
|
||||
"up.common.rotate": "旋转",
|
||||
"up.common.pleaseChoose": "请选择",
|
||||
"up.common.loading": "加载中",
|
||||
"up.common.loading2": "正在加载",
|
||||
"up.common.inOperation": "操作中",
|
||||
"up.common.settings": "设置",
|
||||
"up.common.retry": "重试",
|
||||
"up.common.search": "搜索",
|
||||
"up.common.more": "更多",
|
||||
"up.common.video": "视频",
|
||||
"up.common.file": "文件",
|
||||
"up.week.one": "一",
|
||||
"up.week.two": "二",
|
||||
"up.week.three": "三",
|
||||
"up.week.four": "四",
|
||||
"up.week.five": "五",
|
||||
"up.week.six": "六",
|
||||
"up.week.seven": "日",
|
||||
"up.barcode.error": "生成条码失败",
|
||||
"up.calendar.chooseDates": "日期选择",
|
||||
"up.calendar.disabled": "该日期已禁用",
|
||||
"up.calendar.daysExceed": "选择天数不能超过{days}天",
|
||||
"up.cityLocate.locateCity": "定位城市",
|
||||
"up.cityLocate.fail": "定位失败,请点击重试。",
|
||||
"up.cityLocate.locating": "定位中",
|
||||
"up.code.send": "获取验证码",
|
||||
"up.code.resendAfter": "X秒重新获取",
|
||||
"up.code.resend": "重新获取",
|
||||
"up.cropper.emptyWidhtOrHeight": "裁剪框的宽或高没有设置",
|
||||
"up.empty.car": "购物车为空",
|
||||
"up.empty.page": "页面不存在",
|
||||
"up.empty.search": "没有搜索结果",
|
||||
"up.empty.address": "没有收货地址",
|
||||
"up.empty.wifi": "没有WiFi",
|
||||
"up.empty.order": "订单为空",
|
||||
"up.empty.coupon": "没有优惠券",
|
||||
"up.empty.favor": "暂无收藏",
|
||||
"up.empty.permission": "无权限",
|
||||
"up.empty.history": "无历史记录",
|
||||
"up.empty.news": "无新闻列表",
|
||||
"up.empty.message": "消息列表为空",
|
||||
"up.empty.list": "列表为空",
|
||||
"up.empty.data": "数据为空",
|
||||
"up.empty.comment": "暂无评论",
|
||||
"up.link.copyed": "链接已复制,请在浏览器打开",
|
||||
"up.loadmoe.loadmore": "加载更多",
|
||||
"up.loadmoe.nomore": "没有更多了",
|
||||
"up.noNetwork.text": "哎呀,网络信号丢失",
|
||||
"up.noNetwork.pleaseCheck": "请检查网络,或前往",
|
||||
"up.noNetwork.connect": "网络已连接",
|
||||
"up.noNetwork.disconnect": "无网络连接",
|
||||
"up.pagination.previous": "上一页",
|
||||
"up.pagination.next": "下一页",
|
||||
"up.pullRefresh.pull": "下拉刷新",
|
||||
"up.pullRefresh.release": "释放刷新",
|
||||
"up.pullRefresh.refreshing": "正在刷新",
|
||||
"up.readMore.expand": "展开阅读全文",
|
||||
"up.readMore.fold": "收起",
|
||||
"up.search.placeholder": "请输入关键字",
|
||||
"up.signature.penSize": "笔画大小",
|
||||
"up.signature.penColor": "笔画颜色",
|
||||
"up.upload.sizeExceed": "超过大小限制",
|
||||
"up.upload.uploading": "上传中",
|
||||
"up.upload.previewImageFail": "预览图片失败",
|
||||
"up.upload.previewVideoFail": "预览视频失败",
|
||||
"up.goodsSku.stock": "库存",
|
||||
"up.goodsSku.price": "价格",
|
||||
"up.goodsSku.amount": "件",
|
||||
"up.goodsSku.choosed": "已选",
|
||||
"up.goodsSku.buyAmount": "购买数量"
|
||||
};
|
||||
const zhHant = {
|
||||
"up.common.cancel": "取消",
|
||||
"up.common.confirm": "確定",
|
||||
"up.common.start": "開始",
|
||||
"up.common.end": "結束",
|
||||
"up.common.stop": "停止",
|
||||
"up.common.copy": "複製",
|
||||
"up.common.none": "暫無",
|
||||
"up.common.tip": "提示",
|
||||
"up.common.success": "成功",
|
||||
"up.common.fail": "失敗",
|
||||
"up.common.close": "關閉",
|
||||
"up.common.preview": "預覽",
|
||||
"up.common.re-select": "重選",
|
||||
"up.common.rotate": "旋轉",
|
||||
"up.common.pleaseChoose": "請選擇",
|
||||
"up.common.loading": "加載中",
|
||||
"up.common.loading2": "正在加載",
|
||||
"up.common.inOperation": "操作中",
|
||||
"up.common.settings": "設置",
|
||||
"up.common.retry": "重試",
|
||||
"up.common.search": "搜索",
|
||||
"up.common.more": "更多",
|
||||
"up.common.video": "視頻",
|
||||
"up.common.file": "文件",
|
||||
"up.week.one": "一",
|
||||
"up.week.two": "二",
|
||||
"up.week.three": "三",
|
||||
"up.week.four": "四",
|
||||
"up.week.five": "五",
|
||||
"up.week.six": "六",
|
||||
"up.week.seven": "日",
|
||||
"up.barcode.error": "生成條碼失敗",
|
||||
"up.calendar.chooseDates": "日期選擇",
|
||||
"up.calendar.disabled": "該日期已禁用",
|
||||
"up.calendar.daysExceed": "選擇天數不能超過{days}天",
|
||||
"up.cityLocate.locateCity": "定位城市",
|
||||
"up.cityLocate.fail": "定位失敗,請點擊重試。",
|
||||
"up.cityLocate.locating": "定位中",
|
||||
"up.code.send": "獲取驗證碼",
|
||||
"up.code.resendAfter": "X秒重新獲取",
|
||||
"up.code.resend": "重新獲取",
|
||||
"up.cropper.emptyWidhtOrHeight": "裁剪框的寬或高沒有設置",
|
||||
"up.empty.car": "購物車為空",
|
||||
"up.empty.page": "頁面不存在",
|
||||
"up.empty.search": "沒有搜索結果",
|
||||
"up.empty.address": "沒有收貨地址",
|
||||
"up.empty.wifi": "沒有WiFi",
|
||||
"up.empty.order": "訂單為空",
|
||||
"up.empty.coupon": "沒有優惠券",
|
||||
"up.empty.favor": "暫無收藏",
|
||||
"up.empty.permission": "無權限",
|
||||
"up.empty.history": "無歷史記錄",
|
||||
"up.empty.news": "無新聞列表",
|
||||
"up.empty.message": "消息列表為空",
|
||||
"up.empty.list": "列表為空",
|
||||
"up.empty.data": "數據為空",
|
||||
"up.empty.comment": "暫無評論",
|
||||
"up.link.copyed": "鏈接已複製,請在瀏覽器打開",
|
||||
"up.loadmoe.loadmore": "加載更多",
|
||||
"up.loadmoe.nomore": "沒有更多了",
|
||||
"up.noNetwork.text": "哎呀,網絡信號丟失",
|
||||
"up.noNetwork.pleaseCheck": "請檢查網絡,或前往",
|
||||
"up.noNetwork.connect": "網絡已連接",
|
||||
"up.noNetwork.disconnect": "無網絡連接",
|
||||
"up.pagination.previous": "上一頁",
|
||||
"up.pagination.next": "下一頁",
|
||||
"up.pullRefresh.pull": "下拉刷新",
|
||||
"up.pullRefresh.release": "釋放刷新",
|
||||
"up.pullRefresh.refreshing": "正在刷新",
|
||||
"up.readMore.expand": "展開閱讀全文",
|
||||
"up.readMore.fold": "收起",
|
||||
"up.search.placeholder": "請輸入關鍵字",
|
||||
"up.signature.penSize": "筆畫大小",
|
||||
"up.signature.penColor": "筆畫顏色",
|
||||
"up.upload.sizeExceed": "超過大小限制",
|
||||
"up.upload.uploading": "上傳中",
|
||||
"up.upload.previewImageFail": "預覽圖片失敗",
|
||||
"up.upload.previewVideoFail": "預覽視頻失敗",
|
||||
"up.goodsSku.stock": "庫存",
|
||||
"up.goodsSku.price": "價格",
|
||||
"up.goodsSku.amount": "件",
|
||||
"up.goodsSku.choosed": "已選",
|
||||
"up.goodsSku.buyAmount": "購買數量"
|
||||
};
|
||||
const en = {
|
||||
"up.common.cancel": "Cancel",
|
||||
"up.common.confirm": "Confirm",
|
||||
"up.common.start": "Start",
|
||||
"up.common.end": "End",
|
||||
"up.common.stop": "Stop",
|
||||
"up.common.copy": "Copy",
|
||||
"up.common.none": "None",
|
||||
"up.common.tip": "Tip",
|
||||
"up.common.success": "Success",
|
||||
"up.common.fail": "Fail",
|
||||
"up.common.close": "Close",
|
||||
"up.common.preview": "Preview",
|
||||
"up.common.re-select": "Re-select",
|
||||
"up.common.rotate": "Rotate",
|
||||
"up.common.pleaseChoose": "Please choose",
|
||||
"up.common.loading": "Loading",
|
||||
"up.common.loading2": "Loading",
|
||||
"up.common.inOperation": "In operation",
|
||||
"up.common.settings": "Settings",
|
||||
"up.common.retry": "Retry",
|
||||
"up.common.search": "Search",
|
||||
"up.common.more": "More",
|
||||
"up.common.video": "Video",
|
||||
"up.common.file": "File",
|
||||
"up.week.one": "Mon",
|
||||
"up.week.two": "Tue",
|
||||
"up.week.three": "Wed",
|
||||
"up.week.four": "Thu",
|
||||
"up.week.five": "Fri",
|
||||
"up.week.six": "Sat",
|
||||
"up.week.seven": "Sun",
|
||||
"up.barcode.error": "Failed to generate barcode",
|
||||
"up.calendar.chooseDates": "Date selection",
|
||||
"up.calendar.disabled": "This date is disabled",
|
||||
"up.calendar.daysExceed": "The number of selected days cannot exceed {days} days",
|
||||
"up.cityLocate.locateCity": "Locate city",
|
||||
"up.cityLocate.fail": "Location failed, please click to retry.",
|
||||
"up.cityLocate.locating": "Locating",
|
||||
"up.code.send": "Get verification code",
|
||||
"up.code.resendAfter": "Resend after X seconds",
|
||||
"up.code.resend": "Resend",
|
||||
"up.cropper.emptyWidhtOrHeight": "The width or height of the cropping box is not set",
|
||||
"up.empty.car": "Shopping cart is empty",
|
||||
"up.empty.page": "Page not found",
|
||||
"up.empty.search": "No search results",
|
||||
"up.empty.address": "No shipping address",
|
||||
"up.empty.wifi": "No WiFi",
|
||||
"up.empty.order": "Order is empty",
|
||||
"up.empty.coupon": "No coupons",
|
||||
"up.empty.favor": "No favorites",
|
||||
"up.empty.permission": "No permission",
|
||||
"up.empty.history": "No history",
|
||||
"up.empty.news": "No news list",
|
||||
"up.empty.message": "Message list is empty",
|
||||
"up.empty.list": "List is empty",
|
||||
"up.empty.data": "Data is empty",
|
||||
"up.empty.comment": "No comments",
|
||||
"up.link.copyed": "Link copied, please open in browser",
|
||||
"up.loadmoe.loadmore": "Load more",
|
||||
"up.loadmoe.nomore": "No more",
|
||||
"up.noNetwork.text": "Oops, network signal lost",
|
||||
"up.noNetwork.pleaseCheck": "Please check the network, or go to",
|
||||
"up.noNetwork.connect": "Network connected",
|
||||
"up.noNetwork.disconnect": "No network connection",
|
||||
"up.pagination.previous": "Previous",
|
||||
"up.pagination.next": "Next",
|
||||
"up.pullRefresh.pull": "Pull to refresh",
|
||||
"up.pullRefresh.release": "Release to refresh",
|
||||
"up.pullRefresh.refreshing": "Refreshing",
|
||||
"up.readMore.expand": "Expand to read more",
|
||||
"up.readMore.fold": "Collapse",
|
||||
"up.search.placeholder": "Please enter keywords",
|
||||
"up.signature.penSize": "Stroke size",
|
||||
"up.signature.penColor": "Stroke color",
|
||||
"up.upload.sizeExceed": "Size limit exceeded",
|
||||
"up.upload.uploading": "Uploading",
|
||||
"up.upload.previewImageFail": "Failed to preview image",
|
||||
"up.upload.previewVideoFail": "Failed to preview video",
|
||||
"up.goodsSku.stock": "Stock",
|
||||
"up.goodsSku.price": "Price",
|
||||
"up.goodsSku.amount": "Items",
|
||||
"up.goodsSku.choosed": "Selected",
|
||||
"up.goodsSku.buyAmount": "Quantity"
|
||||
};
|
||||
const es = {
|
||||
"up.common.cancel": "Cancelar",
|
||||
"up.common.confirm": "Confirmar",
|
||||
"up.common.start": "Iniciar",
|
||||
"up.common.end": "Finalizar",
|
||||
"up.common.stop": "Detener",
|
||||
"up.common.copy": "Copiar",
|
||||
"up.common.none": "Ninguno",
|
||||
"up.common.tip": "Consejo",
|
||||
"up.common.success": "Éxito",
|
||||
"up.common.fail": "Fallido",
|
||||
"up.common.close": "Cerrar",
|
||||
"up.common.preview": "Vista previa",
|
||||
"up.common.re-select": "Re seleccionar",
|
||||
"up.common.rotate": "Rotar",
|
||||
"up.common.pleaseChoose": "Por favor seleccione",
|
||||
"up.common.loading": "Cargando",
|
||||
"up.common.loading2": "Cargando",
|
||||
"up.common.inOperation": "En operación",
|
||||
"up.common.settings": "Configuración",
|
||||
"up.common.retry": "Reintentar",
|
||||
"up.common.search": "Buscar",
|
||||
"up.common.more": "Más",
|
||||
"up.common.video": "Vídeo",
|
||||
"up.common.file": "Archivo",
|
||||
"up.week.one": "Lun",
|
||||
"up.week.two": "Mar",
|
||||
"up.week.three": "Mié",
|
||||
"up.week.four": "Jue",
|
||||
"up.week.five": "Vie",
|
||||
"up.week.six": "Sáb",
|
||||
"up.week.seven": "Dom",
|
||||
"up.barcode.error": "Error al generar código de barras",
|
||||
"up.calendar.chooseDates": "Selección de fecha",
|
||||
"up.calendar.disabled": "Esta fecha está deshabilitada",
|
||||
"up.calendar.daysExceed": "Los días seleccionados no pueden exceder {days} días",
|
||||
"up.cityLocate.locateCity": "Localizar ciudad",
|
||||
"up.cityLocate.fail": "Error de localización, haga clic para reintentar.",
|
||||
"up.cityLocate.locating": "Localizando",
|
||||
"up.code.send": "Obtener código de verificación",
|
||||
"up.code.resendAfter": "Reenviar en X segundos",
|
||||
"up.code.resend": "Reenviar",
|
||||
"up.cropper.emptyWidhtOrHeight": "El ancho o alto del recorte no está configurado",
|
||||
"up.empty.car": "Carrito de compras vacío",
|
||||
"up.empty.page": "Página no encontrada",
|
||||
"up.empty.search": "Sin resultados de búsqueda",
|
||||
"up.empty.address": "Sin dirección de envío",
|
||||
"up.empty.wifi": "Sin WiFi",
|
||||
"up.empty.order": "Pedido vacío",
|
||||
"up.empty.coupon": "Sin cupones",
|
||||
"up.empty.favor": "Sin favoritos",
|
||||
"up.empty.permission": "Sin permisos",
|
||||
"up.empty.history": "Sin historial",
|
||||
"up.empty.news": "Sin noticias",
|
||||
"up.empty.message": "Lista de mensajes vacía",
|
||||
"up.empty.list": "Lista vacía",
|
||||
"up.empty.data": "Datos vacíos",
|
||||
"up.empty.comment": "Sin comentarios",
|
||||
"up.link.copyed": "Enlace copiado, por favor abra en el navegador",
|
||||
"up.loadmoe.loadmore": "Cargar más",
|
||||
"up.loadmoe.nomore": "No hay más",
|
||||
"up.noNetwork.text": "¡Ups! Se perdió la señal de red",
|
||||
"up.noNetwork.pleaseCheck": "Por favor verifique la red, o vaya a",
|
||||
"up.noNetwork.connect": "Red conectada",
|
||||
"up.noNetwork.disconnect": "Sin conexión a internet",
|
||||
"up.pagination.previous": "Página anterior",
|
||||
"up.pagination.next": "Página siguiente",
|
||||
"up.pullRefresh.pull": "Deslizar hacia abajo para actualizar",
|
||||
"up.pullRefresh.release": "Soltar para actualizar",
|
||||
"up.pullRefresh.refreshing": "Actualizando",
|
||||
"up.readMore.expand": "Expandir para leer más",
|
||||
"up.readMore.fold": "Contraer",
|
||||
"up.search.placeholder": "Ingrese palabra clave",
|
||||
"up.signature.penSize": "Tamaño del trazo",
|
||||
"up.signature.penColor": "Color del trazo",
|
||||
"up.upload.sizeExceed": "Excede el límite de tamaño",
|
||||
"up.upload.uploading": "Subiendo",
|
||||
"up.upload.previewImageFail": "Error al previsualizar imagen",
|
||||
"up.upload.previewVideoFail": "Error al previsualizar vídeo",
|
||||
"up.goodsSku.stock": "Inventario",
|
||||
"up.goodsSku.price": "Precio",
|
||||
"up.goodsSku.amount": "Piezas",
|
||||
"up.goodsSku.choosed": "Seleccionado",
|
||||
"up.goodsSku.buyAmount": "Cantidad"
|
||||
};
|
||||
const fr = {
|
||||
"up.common.cancel": "Annuler",
|
||||
"up.common.confirm": "Confirmer",
|
||||
"up.common.start": "Démarrer",
|
||||
"up.common.end": "Terminer",
|
||||
"up.common.stop": "Arrêter",
|
||||
"up.common.copy": "Copier",
|
||||
"up.common.none": "Aucun",
|
||||
"up.common.tip": "Conseil",
|
||||
"up.common.success": "Succès",
|
||||
"up.common.fail": "Échec",
|
||||
"up.common.close": "Fermer",
|
||||
"up.common.preview": "Aperçu",
|
||||
"up.common.re-select": "Resélectionner",
|
||||
"up.common.rotate": "Rotation",
|
||||
"up.common.pleaseChoose": "Veuillez choisir",
|
||||
"up.common.loading": "Chargement",
|
||||
"up.common.loading2": "Chargement en cours",
|
||||
"up.common.inOperation": "En cours d'opération",
|
||||
"up.common.settings": "Paramètres",
|
||||
"up.common.retry": "Réessayer",
|
||||
"up.common.search": "Rechercher",
|
||||
"up.common.more": "Plus",
|
||||
"up.common.video": "Vidéo",
|
||||
"up.common.file": "Fichier",
|
||||
"up.week.one": "Lun",
|
||||
"up.week.two": "Mar",
|
||||
"up.week.three": "Mer",
|
||||
"up.week.four": "Jeu",
|
||||
"up.week.five": "Ven",
|
||||
"up.week.six": "Sam",
|
||||
"up.week.seven": "Dim",
|
||||
"up.barcode.error": "Échec de génération du code-barres",
|
||||
"up.calendar.chooseDates": "Sélection de dates",
|
||||
"up.calendar.disabled": "Cette date est désactivée",
|
||||
"up.calendar.daysExceed": "Le nombre de jours sélectionnés ne peut pas dépasser {days} jours",
|
||||
"up.cityLocate.locateCity": "Localiser la ville",
|
||||
"up.cityLocate.fail": "Échec de localisation, veuillez cliquer pour réessayer.",
|
||||
"up.cityLocate.locating": "Localisation en cours",
|
||||
"up.code.send": "Obtenir le code de vérification",
|
||||
"up.code.resendAfter": "Renvoyer dans X secondes",
|
||||
"up.code.resend": "Renvoyer",
|
||||
"up.cropper.emptyWidhtOrHeight": "La largeur ou la hauteur de recadrage n'est pas définie",
|
||||
"up.empty.car": "Panier vide",
|
||||
"up.empty.page": "Page introuvable",
|
||||
"up.empty.search": "Aucun résultat de recherche",
|
||||
"up.empty.address": "Aucune adresse de livraison",
|
||||
"up.empty.wifi": "Aucun Wi-Fi",
|
||||
"up.empty.order": "Commande vide",
|
||||
"up.empty.coupon": "Aucun coupon",
|
||||
"up.empty.favor": "Aucun favori",
|
||||
"up.empty.permission": "Aucune autorisation",
|
||||
"up.empty.history": "Aucun historique",
|
||||
"up.empty.news": "Aucune actualité",
|
||||
"up.empty.message": "Liste de messages vide",
|
||||
"up.empty.list": "Liste vide",
|
||||
"up.empty.data": "Données vides",
|
||||
"up.empty.comment": "Aucun commentaire",
|
||||
"up.link.copyed": "Lien copié, veuillez ouvrir dans le navigateur",
|
||||
"up.loadmoe.loadmore": "Charger plus",
|
||||
"up.loadmoe.nomore": "Plus de contenu",
|
||||
"up.noNetwork.text": "Oups, le signal réseau est perdu",
|
||||
"up.noNetwork.pleaseCheck": "Veuillez vérifier le réseau, ou aller à",
|
||||
"up.noNetwork.connect": "Réseau connecté",
|
||||
"up.noNetwork.disconnect": "Aucune connexion réseau",
|
||||
"up.pagination.previous": "Page précédente",
|
||||
"up.pagination.next": "Page suivante",
|
||||
"up.pullRefresh.pull": "Tirer pour actualiser",
|
||||
"up.pullRefresh.release": "Relâcher pour actualiser",
|
||||
"up.pullRefresh.refreshing": "Actualisation en cours",
|
||||
"up.readMore.expand": "Développer pour lire la suite",
|
||||
"up.readMore.fold": "Réduire",
|
||||
"up.search.placeholder": "Veuillez saisir un mot-clé",
|
||||
"up.signature.penSize": "Taille du trait",
|
||||
"up.signature.penColor": "Couleur du trait",
|
||||
"up.upload.sizeExceed": "Dépassement de la limite de taille",
|
||||
"up.upload.uploading": "Téléchargement en cours",
|
||||
"up.upload.previewImageFail": "Échec de l'aperçu de l'image",
|
||||
"up.upload.previewVideoFail": "Échec de l'aperçu de la vidéo",
|
||||
"up.goodsSku.stock": "Stock",
|
||||
"up.goodsSku.price": "Prix",
|
||||
"up.goodsSku.amount": "Pièces",
|
||||
"up.goodsSku.choosed": "Sélectionné",
|
||||
"up.goodsSku.buyAmount": "Quantité"
|
||||
};
|
||||
const de = {
|
||||
"up.common.cancel": "Abbrechen",
|
||||
"up.common.confirm": "Bestätigen",
|
||||
"up.common.start": "Start",
|
||||
"up.common.end": "Ende",
|
||||
"up.common.stop": "Stopp",
|
||||
"up.common.copy": "Kopieren",
|
||||
"up.common.none": "Keine",
|
||||
"up.common.tip": "Hinweis",
|
||||
"up.common.success": "Erfolg",
|
||||
"up.common.fail": "Fehlgeschlagen",
|
||||
"up.common.close": "Schließen",
|
||||
"up.common.preview": "Vorschau",
|
||||
"up.common.re-select": "Erneut auswählen",
|
||||
"up.common.rotate": "Drehen",
|
||||
"up.common.pleaseChoose": "Bitte wählen",
|
||||
"up.common.loading": "Laden",
|
||||
"up.common.loading2": "Wird geladen",
|
||||
"up.common.inOperation": "In Bearbeitung",
|
||||
"up.common.settings": "Einstellungen",
|
||||
"up.common.retry": "Wiederholen",
|
||||
"up.common.search": "Suchen",
|
||||
"up.common.more": "Mehr",
|
||||
"up.common.video": "Video",
|
||||
"up.common.file": "Datei",
|
||||
"up.week.one": "Mo",
|
||||
"up.week.two": "Di",
|
||||
"up.week.three": "Mi",
|
||||
"up.week.four": "Do",
|
||||
"up.week.five": "Fr",
|
||||
"up.week.six": "Sa",
|
||||
"up.week.seven": "So",
|
||||
"up.barcode.error": "Barcode-Generierung fehlgeschlagen",
|
||||
"up.calendar.chooseDates": "Datumsauswahl",
|
||||
"up.calendar.disabled": "Dieses Datum ist deaktiviert",
|
||||
"up.calendar.daysExceed": "Die Anzahl der ausgewählten Tage darf {days} Tage nicht überschreiten",
|
||||
"up.cityLocate.locateCity": "Stadt lokalisieren",
|
||||
"up.cityLocate.fail": "Lokalisierung fehlgeschlagen, bitte klicken Sie zum Wiederholen.",
|
||||
"up.cityLocate.locating": "Lokalisierung läuft",
|
||||
"up.code.send": "Bestätigungscode erhalten",
|
||||
"up.code.resendAfter": "Erneut senden in X Sekunden",
|
||||
"up.code.resend": "Erneut senden",
|
||||
"up.cropper.emptyWidhtOrHeight": "Breite oder Höhe des Zuschneidebereichs nicht festgelegt",
|
||||
"up.empty.car": "Warenkorb ist leer",
|
||||
"up.empty.page": "Seite existiert nicht",
|
||||
"up.empty.search": "Keine Suchergebnisse",
|
||||
"up.empty.address": "Keine Lieferadresse",
|
||||
"up.empty.wifi": "Kein WLAN",
|
||||
"up.empty.order": "Bestellungen sind leer",
|
||||
"up.empty.coupon": "Keine Gutscheine",
|
||||
"up.empty.favor": "Keine Favoriten",
|
||||
"up.empty.permission": "Keine Berechtigung",
|
||||
"up.empty.history": "Kein Verlauf",
|
||||
"up.empty.news": "Keine Nachrichtenliste",
|
||||
"up.empty.message": "Nachrichtenliste ist leer",
|
||||
"up.empty.list": "Liste ist leer",
|
||||
"up.empty.data": "Daten sind leer",
|
||||
"up.empty.comment": "Keine Kommentare",
|
||||
"up.link.copyed": "Link kopiert, bitte im Browser öffnen",
|
||||
"up.loadmoe.loadmore": "Mehr laden",
|
||||
"up.loadmoe.nomore": "Keine weiteren Daten",
|
||||
"up.noNetwork.text": "Ups, Netzwerksignal verloren",
|
||||
"up.noNetwork.pleaseCheck": "Bitte überprüfen Sie das Netzwerk oder gehen Sie zu",
|
||||
"up.noNetwork.connect": "Netzwerk verbunden",
|
||||
"up.noNetwork.disconnect": "Keine Netzwerkverbindung",
|
||||
"up.pagination.previous": "Vorherige Seite",
|
||||
"up.pagination.next": "Nächste Seite",
|
||||
"up.pullRefresh.pull": "Zum Aktualisieren nach unten ziehen",
|
||||
"up.pullRefresh.release": "Loslassen zum Aktualisieren",
|
||||
"up.pullRefresh.refreshing": "Aktualisierung läuft",
|
||||
"up.readMore.expand": "Erweitern zum vollständigen Lesen",
|
||||
"up.readMore.fold": "Einklappen",
|
||||
"up.search.placeholder": "Bitte Schlüsselwort eingeben",
|
||||
"up.signature.penSize": "Strichstärke",
|
||||
"up.signature.penColor": "Strichfarbe",
|
||||
"up.upload.sizeExceed": "Größenbegrenzung überschritten",
|
||||
"up.upload.uploading": "Upload läuft",
|
||||
"up.upload.previewImageFail": "Bildvorschau fehlgeschlagen",
|
||||
"up.upload.previewVideoFail": "Videovorschau fehlgeschlagen",
|
||||
"up.goodsSku.stock": "Lagerbestand",
|
||||
"up.goodsSku.price": "Preis",
|
||||
"up.goodsSku.amount": "Stück",
|
||||
"up.goodsSku.choosed": "Ausgewählt",
|
||||
"up.goodsSku.buyAmount": "Anzahl"
|
||||
};
|
||||
const ko = {
|
||||
"up.common.cancel": "취소",
|
||||
"up.common.confirm": "확인",
|
||||
"up.common.start": "시작",
|
||||
"up.common.end": "종료",
|
||||
"up.common.stop": "정지",
|
||||
"up.common.copy": "복사",
|
||||
"up.common.none": "없음",
|
||||
"up.common.tip": "팁",
|
||||
"up.common.success": "성공",
|
||||
"up.common.fail": "실패",
|
||||
"up.common.close": "닫기",
|
||||
"up.common.preview": "미리보기",
|
||||
"up.common.re-select": "재선택",
|
||||
"up.common.rotate": "회전",
|
||||
"up.common.pleaseChoose": "선택해주세요",
|
||||
"up.common.loading": "로딩중",
|
||||
"up.common.loading2": "로딩중",
|
||||
"up.common.inOperation": "작업중",
|
||||
"up.common.settings": "설정",
|
||||
"up.common.retry": "재시도",
|
||||
"up.common.search": "검색",
|
||||
"up.common.more": "더보기",
|
||||
"up.common.video": "비디오",
|
||||
"up.common.file": "파일",
|
||||
"up.week.one": "월",
|
||||
"up.week.two": "화",
|
||||
"up.week.three": "수",
|
||||
"up.week.four": "목",
|
||||
"up.week.five": "금",
|
||||
"up.week.six": "토",
|
||||
"up.week.seven": "일",
|
||||
"up.barcode.error": "바코드 생성 실패",
|
||||
"up.calendar.chooseDates": "날짜 선택",
|
||||
"up.calendar.disabled": "해당 날짜는 사용할 수 없습니다",
|
||||
"up.calendar.daysExceed": "선택한 날짜 수가 {days}일을 초과할 수 없습니다",
|
||||
"up.cityLocate.locateCity": "도시 위치 찾기",
|
||||
"up.cityLocate.fail": "위치 찾기 실패, 다시 시도하려면 클릭하세요.",
|
||||
"up.cityLocate.locating": "위치 찾는 중",
|
||||
"up.code.send": "인증코드 받기",
|
||||
"up.code.resendAfter": "X초 후 재전송",
|
||||
"up.code.resend": "재전송",
|
||||
"up.cropper.emptyWidhtOrHeight": "자르기 영역의 너비 또는 높이가 설정되지 않았습니다",
|
||||
"up.empty.car": "장바구니가 비어 있습니다",
|
||||
"up.empty.page": "페이지가 존재하지 않습니다",
|
||||
"up.empty.search": "검색 결과가 없습니다",
|
||||
"up.empty.address": "배송 주소가 없습니다",
|
||||
"up.empty.wifi": "Wi-Fi가 없습니다",
|
||||
"up.empty.order": "주문이 없습니다",
|
||||
"up.empty.coupon": "쿠폰이 없습니다",
|
||||
"up.empty.favor": "즐겨찾기가 없습니다",
|
||||
"up.empty.permission": "권한이 없습니다",
|
||||
"up.empty.history": "기록이 없습니다",
|
||||
"up.empty.news": "뉴스가 없습니다",
|
||||
"up.empty.message": "메시지가 없습니다",
|
||||
"up.empty.list": "목록이 비어 있습니다",
|
||||
"up.empty.data": "데이터가 없습니다",
|
||||
"up.empty.comment": "댓글이 없습니다",
|
||||
"up.link.copyed": "링크가 복사되었습니다. 브라우저에서 열어주세요",
|
||||
"up.loadmoe.loadmore": "더 불러오기",
|
||||
"up.loadmoe.nomore": "더 이상 데이터가 없습니다",
|
||||
"up.noNetwork.text": "네트워크 신호가 없습니다",
|
||||
"up.noNetwork.pleaseCheck": "네트워크를 확인하거나 이동하세요",
|
||||
"up.noNetwork.connect": "네트워크 연결됨",
|
||||
"up.noNetwork.disconnect": "네트워크 연결 끊김",
|
||||
"up.pagination.previous": "이전 페이지",
|
||||
"up.pagination.next": "다음 페이지",
|
||||
"up.pullRefresh.pull": "당겨서 새로고침",
|
||||
"up.pullRefresh.release": "놓아서 새로고침",
|
||||
"up.pullRefresh.refreshing": "새로고침 중",
|
||||
"up.readMore.expand": "펼쳐서 전체 보기",
|
||||
"up.readMore.fold": "접기",
|
||||
"up.search.placeholder": "키워드를 입력하세요",
|
||||
"up.signature.penSize": "선 굵기",
|
||||
"up.signature.penColor": "선 색상",
|
||||
"up.upload.sizeExceed": "용량 제한 초과",
|
||||
"up.upload.uploading": "업로드 중",
|
||||
"up.upload.previewImageFail": "이미지 미리보기 실패",
|
||||
"up.upload.previewVideoFail": "비디오 미리보기 실패",
|
||||
"up.goodsSku.stock": "재고",
|
||||
"up.goodsSku.price": "가격",
|
||||
"up.goodsSku.amount": "개",
|
||||
"up.goodsSku.choosed": "선택됨",
|
||||
"up.goodsSku.buyAmount": "구매 수량"
|
||||
};
|
||||
const ja = {
|
||||
"up.common.cancel": "キャンセル",
|
||||
"up.common.confirm": "確認",
|
||||
"up.common.start": "開始",
|
||||
"up.common.end": "終了",
|
||||
"up.common.stop": "停止",
|
||||
"up.common.copy": "コピー",
|
||||
"up.common.none": "なし",
|
||||
"up.common.tip": "ヒント",
|
||||
"up.common.success": "成功",
|
||||
"up.common.fail": "失敗",
|
||||
"up.common.close": "閉じる",
|
||||
"up.common.preview": "プレビュー",
|
||||
"up.common.re-select": "再選択",
|
||||
"up.common.rotate": "回転",
|
||||
"up.common.pleaseChoose": "選択してください",
|
||||
"up.common.loading": "読み込み中",
|
||||
"up.common.loading2": "読み込み中",
|
||||
"up.common.inOperation": "操作中",
|
||||
"up.common.settings": "設定",
|
||||
"up.common.retry": "再試行",
|
||||
"up.common.search": "検索",
|
||||
"up.common.more": "もっと見る",
|
||||
"up.common.video": "ビデオ",
|
||||
"up.common.file": "ファイル",
|
||||
"up.week.one": "月",
|
||||
"up.week.two": "火",
|
||||
"up.week.three": "水",
|
||||
"up.week.four": "木",
|
||||
"up.week.five": "金",
|
||||
"up.week.six": "土",
|
||||
"up.week.seven": "日",
|
||||
"up.barcode.error": "バーコードの生成に失敗しました",
|
||||
"up.calendar.chooseDates": "日付選択",
|
||||
"up.calendar.disabled": "この日付は無効です",
|
||||
"up.calendar.daysExceed": "選択日数は{days}日を超えることはできません",
|
||||
"up.cityLocate.locateCity": "都市の位置を特定",
|
||||
"up.cityLocate.fail": "位置特定に失敗しました。再試行するにはクリックしてください。",
|
||||
"up.cityLocate.locating": "位置特定中",
|
||||
"up.code.send": "認証コードを取得",
|
||||
"up.code.resendAfter": "X秒後に再送信",
|
||||
"up.code.resend": "再送信",
|
||||
"up.cropper.emptyWidhtOrHeight": "切り抜き枠の幅または高さが設定されていません",
|
||||
"up.empty.car": "ショッピングカートは空です",
|
||||
"up.empty.page": "ページが存在しません",
|
||||
"up.empty.search": "検索結果がありません",
|
||||
"up.empty.address": "配送先住所がありません",
|
||||
"up.empty.wifi": "Wi-Fiがありません",
|
||||
"up.empty.order": "注文がありません",
|
||||
"up.empty.coupon": "クーポンがありません",
|
||||
"up.empty.favor": "お気に入りがありません",
|
||||
"up.empty.permission": "権限がありません",
|
||||
"up.empty.history": "履歴がありません",
|
||||
"up.empty.news": "ニュースがありません",
|
||||
"up.empty.message": "メッセージがありません",
|
||||
"up.empty.list": "リストが空です",
|
||||
"up.empty.data": "データがありません",
|
||||
"up.empty.comment": "コメントがありません",
|
||||
"up.link.copyed": "リンクがコピーされました。ブラウザで開いてください",
|
||||
"up.loadmoe.loadmore": "さらに読み込む",
|
||||
"up.loadmoe.nomore": "これ以上データがありません",
|
||||
"up.noNetwork.text": "ネットワーク信号が失われました",
|
||||
"up.noNetwork.pleaseCheck": "ネットワークを確認するか、移動してください",
|
||||
"up.noNetwork.connect": "ネットワーク接続済み",
|
||||
"up.noNetwork.disconnect": "ネットワーク未接続",
|
||||
"up.pagination.previous": "前へ",
|
||||
"up.pagination.next": "次へ",
|
||||
"up.pullRefresh.pull": "引き下げて更新",
|
||||
"up.pullRefresh.release": "指を離して更新",
|
||||
"up.pullRefresh.refreshing": "更新中",
|
||||
"up.readMore.expand": "全文表示",
|
||||
"up.readMore.fold": "折りたたむ",
|
||||
"up.search.placeholder": "キーワードを入力してください",
|
||||
"up.signature.penSize": "線の太さ",
|
||||
"up.signature.penColor": "線の色",
|
||||
"up.upload.sizeExceed": "サイズ制限を超えています",
|
||||
"up.upload.uploading": "アップロード中",
|
||||
"up.upload.previewImageFail": "画像プレビュー失敗",
|
||||
"up.upload.previewVideoFail": "ビデオプレビュー失敗",
|
||||
"up.goodsSku.stock": "在庫",
|
||||
"up.goodsSku.price": "価格",
|
||||
"up.goodsSku.amount": "個",
|
||||
"up.goodsSku.choosed": "選択済み",
|
||||
"up.goodsSku.buyAmount": "購入数量"
|
||||
};
|
||||
const ru = {
|
||||
"up.common.cancel": "Отмена",
|
||||
"up.common.confirm": "Подтвердить",
|
||||
"up.common.start": "Начало",
|
||||
"up.common.end": "Конец",
|
||||
"up.common.stop": "Стоп",
|
||||
"up.common.copy": "Копировать",
|
||||
"up.common.none": "Нет",
|
||||
"up.common.tip": "Подсказка",
|
||||
"up.common.success": "Успех",
|
||||
"up.common.fail": "Ошибка",
|
||||
"up.common.close": "Закрыть",
|
||||
"up.common.preview": "Предпросмотр",
|
||||
"up.common.re-select": "Выбрать снова",
|
||||
"up.common.rotate": "Повернуть",
|
||||
"up.common.pleaseChoose": "Пожалуйста, выберите",
|
||||
"up.common.loading": "Загрузка",
|
||||
"up.common.loading2": "Загружается",
|
||||
"up.common.inOperation": "В процессе",
|
||||
"up.common.settings": "Настройки",
|
||||
"up.common.retry": "Повторить",
|
||||
"up.common.search": "Поиск",
|
||||
"up.common.more": "Больше",
|
||||
"up.common.video": "Видео",
|
||||
"up.common.file": "Файл",
|
||||
"up.week.one": "Пн",
|
||||
"up.week.two": "Вт",
|
||||
"up.week.three": "Ср",
|
||||
"up.week.four": "Чт",
|
||||
"up.week.five": "Пт",
|
||||
"up.week.six": "Сб",
|
||||
"up.week.seven": "Вс",
|
||||
"up.barcode.error": "Ошибка генерации штрихкода",
|
||||
"up.calendar.chooseDates": "Выбор даты",
|
||||
"up.calendar.disabled": "Эта дата отключена",
|
||||
"up.calendar.daysExceed": "Количество выбранных дней не может превышать {days} дней",
|
||||
"up.cityLocate.locateCity": "Определение города",
|
||||
"up.cityLocate.fail": "Ошибка определения местоположения, нажмите для повтора.",
|
||||
"up.cityLocate.locating": "Определение местоположения",
|
||||
"up.code.send": "Получить код подтверждения",
|
||||
"up.code.resendAfter": "Повторная отправка через X секунд",
|
||||
"up.code.resend": "Отправить снова",
|
||||
"up.cropper.emptyWidhtOrHeight": "Ширина или высота области обрезки не задана",
|
||||
"up.empty.car": "Корзина пуста",
|
||||
"up.empty.page": "Страница не существует",
|
||||
"up.empty.search": "Нет результатов поиска",
|
||||
"up.empty.address": "Нет адреса доставки",
|
||||
"up.empty.wifi": "Нет Wi-Fi",
|
||||
"up.empty.order": "Заказы отсутствуют",
|
||||
"up.empty.coupon": "Нет купонов",
|
||||
"up.empty.favor": "Нет избранного",
|
||||
"up.empty.permission": "Нет разрешения",
|
||||
"up.empty.history": "Нет истории",
|
||||
"up.empty.news": "Нет новостей",
|
||||
"up.empty.message": "Список сообщений пуст",
|
||||
"up.empty.list": "Список пуст",
|
||||
"up.empty.data": "Нет данных",
|
||||
"up.empty.comment": "Нет комментариев",
|
||||
"up.link.copyed": "Ссылка скопирована, откройте в браузере",
|
||||
"up.loadmoe.loadmore": "Загрузить еще",
|
||||
"up.loadmoe.nomore": "Больше нет данных",
|
||||
"up.noNetwork.text": "Ой, потеряно сетевое соединение",
|
||||
"up.noNetwork.pleaseCheck": "Проверьте сеть или перейдите к",
|
||||
"up.noNetwork.connect": "Сеть подключена",
|
||||
"up.noNetwork.disconnect": "Нет сетевого подключения",
|
||||
"up.pagination.previous": "Предыдущая страница",
|
||||
"up.pagination.next": "Следующая страница",
|
||||
"up.pullRefresh.pull": "Потяните вниз для обновления",
|
||||
"up.pullRefresh.release": "Отпустите для обновления",
|
||||
"up.pullRefresh.refreshing": "Обновление",
|
||||
"up.readMore.expand": "Развернуть для полного чтения",
|
||||
"up.readMore.fold": "Свернуть",
|
||||
"up.search.placeholder": "Введите ключевое слово",
|
||||
"up.signature.penSize": "Размер штриха",
|
||||
"up.signature.penColor": "Цвет штриха",
|
||||
"up.upload.sizeExceed": "Превышен лимит размера",
|
||||
"up.upload.uploading": "Загрузка",
|
||||
"up.upload.previewImageFail": "Ошибка предпросмотра изображения",
|
||||
"up.upload.previewVideoFail": "Ошибка предпросмотра видео",
|
||||
"up.goodsSku.stock": "Запас",
|
||||
"up.goodsSku.price": "Цена",
|
||||
"up.goodsSku.amount": "Штук",
|
||||
"up.goodsSku.choosed": "Выбрано",
|
||||
"up.goodsSku.buyAmount": "Количество"
|
||||
};
|
||||
let settings = {
|
||||
lang: common_vendor.index.getLocale(),
|
||||
locales: {
|
||||
en,
|
||||
es,
|
||||
fr,
|
||||
de,
|
||||
ko,
|
||||
ja,
|
||||
ru,
|
||||
"zh-Hant": zhHant,
|
||||
"zh-Hans": zhHans
|
||||
}
|
||||
};
|
||||
common_vendor.index.onLocaleChange((locale) => {
|
||||
settings.lang = locale;
|
||||
});
|
||||
function t(value, params = {}) {
|
||||
if (value) {
|
||||
let lang = settings.lang;
|
||||
if (!settings.locales[settings.lang]) {
|
||||
lang = "zh-Hans";
|
||||
}
|
||||
let result = settings.locales[lang][value] || value;
|
||||
Object.keys(params).forEach((key) => {
|
||||
const reg = new RegExp(`{${key}}`, "g");
|
||||
result = result.replace(reg, params[key]);
|
||||
});
|
||||
return result;
|
||||
} else {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
exports.t = t;
|
||||
61
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/luch-request/adapters/index.js
vendored
Normal file
61
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/luch-request/adapters/index.js
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../../../common/vendor.js");
|
||||
const uni_modules_uviewPlus_libs_luchRequest_helpers_buildURL = require("../helpers/buildURL.js");
|
||||
const uni_modules_uviewPlus_libs_luchRequest_core_buildFullPath = require("../core/buildFullPath.js");
|
||||
const uni_modules_uviewPlus_libs_luchRequest_core_settle = require("../core/settle.js");
|
||||
const uni_modules_uviewPlus_libs_luchRequest_utils = require("../utils.js");
|
||||
const mergeKeys = (keys, config2) => {
|
||||
const config = {};
|
||||
keys.forEach((prop) => {
|
||||
if (!uni_modules_uviewPlus_libs_luchRequest_utils.isUndefined(config2[prop])) {
|
||||
config[prop] = config2[prop];
|
||||
}
|
||||
});
|
||||
return config;
|
||||
};
|
||||
const adapter = (config) => new Promise((resolve, reject) => {
|
||||
const fullPath = uni_modules_uviewPlus_libs_luchRequest_helpers_buildURL.buildURL(uni_modules_uviewPlus_libs_luchRequest_core_buildFullPath.buildFullPath(config.baseURL, config.url), config.params);
|
||||
const _config = {
|
||||
url: fullPath,
|
||||
header: config.header,
|
||||
complete: (response) => {
|
||||
config.fullPath = fullPath;
|
||||
response.config = config;
|
||||
try {
|
||||
if (typeof response.data === "string") {
|
||||
response.data = JSON.parse(response.data);
|
||||
}
|
||||
} catch (e) {
|
||||
}
|
||||
uni_modules_uviewPlus_libs_luchRequest_core_settle.settle(resolve, reject, response);
|
||||
}
|
||||
};
|
||||
let requestTask;
|
||||
if (config.method === "UPLOAD") {
|
||||
delete _config.header["content-type"];
|
||||
delete _config.header["Content-Type"];
|
||||
const otherConfig = {
|
||||
filePath: config.filePath,
|
||||
name: config.name
|
||||
};
|
||||
const optionalKeys = [
|
||||
"formData"
|
||||
];
|
||||
requestTask = common_vendor.index.uploadFile({ ..._config, ...otherConfig, ...mergeKeys(optionalKeys, config) });
|
||||
} else if (config.method === "DOWNLOAD") {
|
||||
requestTask = common_vendor.index.downloadFile(_config);
|
||||
} else {
|
||||
const optionalKeys = [
|
||||
"data",
|
||||
"method",
|
||||
"timeout",
|
||||
"dataType",
|
||||
"responseType"
|
||||
];
|
||||
requestTask = common_vendor.index.request({ ..._config, ...mergeKeys(optionalKeys, config) });
|
||||
}
|
||||
if (config.getTask) {
|
||||
config.getTask(requestTask, config);
|
||||
}
|
||||
});
|
||||
exports.adapter = adapter;
|
||||
24
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/luch-request/core/InterceptorManager.js
vendored
Normal file
24
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/luch-request/core/InterceptorManager.js
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
"use strict";
|
||||
function InterceptorManager() {
|
||||
this.handlers = [];
|
||||
}
|
||||
InterceptorManager.prototype.use = function use(fulfilled, rejected) {
|
||||
this.handlers.push({
|
||||
fulfilled,
|
||||
rejected
|
||||
});
|
||||
return this.handlers.length - 1;
|
||||
};
|
||||
InterceptorManager.prototype.eject = function eject(id) {
|
||||
if (this.handlers[id]) {
|
||||
this.handlers[id] = null;
|
||||
}
|
||||
};
|
||||
InterceptorManager.prototype.forEach = function forEach(fn) {
|
||||
this.handlers.forEach((h) => {
|
||||
if (h !== null) {
|
||||
fn(h);
|
||||
}
|
||||
});
|
||||
};
|
||||
exports.InterceptorManager = InterceptorManager;
|
||||
144
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/luch-request/core/Request.js
vendored
Normal file
144
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/luch-request/core/Request.js
vendored
Normal file
@@ -0,0 +1,144 @@
|
||||
"use strict";
|
||||
const uni_modules_uviewPlus_libs_luchRequest_core_dispatchRequest = require("./dispatchRequest.js");
|
||||
const uni_modules_uviewPlus_libs_luchRequest_core_InterceptorManager = require("./InterceptorManager.js");
|
||||
const uni_modules_uviewPlus_libs_luchRequest_core_mergeConfig = require("./mergeConfig.js");
|
||||
const uni_modules_uviewPlus_libs_luchRequest_core_defaults = require("./defaults.js");
|
||||
const uni_modules_uviewPlus_libs_luchRequest_utils = require("../utils.js");
|
||||
const uni_modules_uviewPlus_libs_luchRequest_utils_clone = require("../utils/clone.js");
|
||||
class Request {
|
||||
/**
|
||||
* @param {Object} arg - 全局配置
|
||||
* @param {String} arg.baseURL - 全局根路径
|
||||
* @param {Object} arg.header - 全局header
|
||||
* @param {String} arg.method = [GET|POST|PUT|DELETE|CONNECT|HEAD|OPTIONS|TRACE] - 全局默认请求方式
|
||||
* @param {String} arg.dataType = [json] - 全局默认的dataType
|
||||
* @param {String} arg.responseType = [text|arraybuffer] - 全局默认的responseType。支付宝小程序不支持
|
||||
* @param {Object} arg.custom - 全局默认的自定义参数
|
||||
* @param {Number} arg.timeout - 全局默认的超时时间,单位 ms。默认60000。H5(HBuilderX 2.9.9+)、APP(HBuilderX 2.9.9+)、微信小程序(2.10.0)、支付宝小程序
|
||||
* @param {Boolean} arg.sslVerify - 全局默认的是否验证 ssl 证书。默认true.仅App安卓端支持(HBuilderX 2.3.3+)
|
||||
* @param {Boolean} arg.withCredentials - 全局默认的跨域请求时是否携带凭证(cookies)。默认false。仅H5支持(HBuilderX 2.6.15+)
|
||||
* @param {Boolean} arg.firstIpv4 - 全DNS解析时优先使用ipv4。默认false。仅 App-Android 支持 (HBuilderX 2.8.0+)
|
||||
* @param {Function(statusCode):Boolean} arg.validateStatus - 全局默认的自定义验证器。默认statusCode >= 200 && statusCode < 300
|
||||
*/
|
||||
constructor(arg = {}) {
|
||||
if (!uni_modules_uviewPlus_libs_luchRequest_utils.isPlainObject(arg)) {
|
||||
arg = {};
|
||||
console.warn("设置全局参数必须接收一个Object");
|
||||
}
|
||||
this.config = uni_modules_uviewPlus_libs_luchRequest_utils_clone.clone({ ...uni_modules_uviewPlus_libs_luchRequest_core_defaults.defaults, ...arg });
|
||||
this.interceptors = {
|
||||
request: new uni_modules_uviewPlus_libs_luchRequest_core_InterceptorManager.InterceptorManager(),
|
||||
response: new uni_modules_uviewPlus_libs_luchRequest_core_InterceptorManager.InterceptorManager()
|
||||
};
|
||||
}
|
||||
/**
|
||||
* @Function
|
||||
* @param {Request~setConfigCallback} f - 设置全局默认配置
|
||||
*/
|
||||
setConfig(f) {
|
||||
this.config = f(this.config);
|
||||
}
|
||||
middleware(config) {
|
||||
config = uni_modules_uviewPlus_libs_luchRequest_core_mergeConfig.mergeConfig(this.config, config);
|
||||
const chain = [uni_modules_uviewPlus_libs_luchRequest_core_dispatchRequest.dispatchRequest, void 0];
|
||||
let promise = Promise.resolve(config);
|
||||
this.interceptors.request.forEach((interceptor) => {
|
||||
chain.unshift(interceptor.fulfilled, interceptor.rejected);
|
||||
});
|
||||
this.interceptors.response.forEach((interceptor) => {
|
||||
chain.push(interceptor.fulfilled, interceptor.rejected);
|
||||
});
|
||||
while (chain.length) {
|
||||
promise = promise.then(chain.shift(), chain.shift());
|
||||
}
|
||||
return promise;
|
||||
}
|
||||
/**
|
||||
* @Function
|
||||
* @param {Object} config - 请求配置项
|
||||
* @prop {String} options.url - 请求路径
|
||||
* @prop {Object} options.data - 请求参数
|
||||
* @prop {Object} [options.responseType = config.responseType] [text|arraybuffer] - 响应的数据类型
|
||||
* @prop {Object} [options.dataType = config.dataType] - 如果设为 json,会尝试对返回的数据做一次 JSON.parse
|
||||
* @prop {Object} [options.header = config.header] - 请求header
|
||||
* @prop {Object} [options.method = config.method] - 请求方法
|
||||
* @returns {Promise<unknown>}
|
||||
*/
|
||||
request(config = {}) {
|
||||
return this.middleware(config);
|
||||
}
|
||||
get(url, options = {}) {
|
||||
return this.middleware({
|
||||
url,
|
||||
method: "GET",
|
||||
...options
|
||||
});
|
||||
}
|
||||
post(url, data, options = {}) {
|
||||
return this.middleware({
|
||||
url,
|
||||
data,
|
||||
method: "POST",
|
||||
...options
|
||||
});
|
||||
}
|
||||
put(url, data, options = {}) {
|
||||
return this.middleware({
|
||||
url,
|
||||
data,
|
||||
method: "PUT",
|
||||
...options
|
||||
});
|
||||
}
|
||||
delete(url, data, options = {}) {
|
||||
return this.middleware({
|
||||
url,
|
||||
data,
|
||||
method: "DELETE",
|
||||
...options
|
||||
});
|
||||
}
|
||||
connect(url, data, options = {}) {
|
||||
return this.middleware({
|
||||
url,
|
||||
data,
|
||||
method: "CONNECT",
|
||||
...options
|
||||
});
|
||||
}
|
||||
head(url, data, options = {}) {
|
||||
return this.middleware({
|
||||
url,
|
||||
data,
|
||||
method: "HEAD",
|
||||
...options
|
||||
});
|
||||
}
|
||||
options(url, data, options = {}) {
|
||||
return this.middleware({
|
||||
url,
|
||||
data,
|
||||
method: "OPTIONS",
|
||||
...options
|
||||
});
|
||||
}
|
||||
trace(url, data, options = {}) {
|
||||
return this.middleware({
|
||||
url,
|
||||
data,
|
||||
method: "TRACE",
|
||||
...options
|
||||
});
|
||||
}
|
||||
upload(url, config = {}) {
|
||||
config.url = url;
|
||||
config.method = "UPLOAD";
|
||||
return this.middleware(config);
|
||||
}
|
||||
download(url, config = {}) {
|
||||
config.url = url;
|
||||
config.method = "DOWNLOAD";
|
||||
return this.middleware(config);
|
||||
}
|
||||
}
|
||||
exports.Request = Request;
|
||||
10
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/luch-request/core/buildFullPath.js
vendored
Normal file
10
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/luch-request/core/buildFullPath.js
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
"use strict";
|
||||
const uni_modules_uviewPlus_libs_luchRequest_helpers_isAbsoluteURL = require("../helpers/isAbsoluteURL.js");
|
||||
const uni_modules_uviewPlus_libs_luchRequest_helpers_combineURLs = require("../helpers/combineURLs.js");
|
||||
function buildFullPath(baseURL, requestedURL) {
|
||||
if (baseURL && !uni_modules_uviewPlus_libs_luchRequest_helpers_isAbsoluteURL.isAbsoluteURL(requestedURL)) {
|
||||
return uni_modules_uviewPlus_libs_luchRequest_helpers_combineURLs.combineURLs(baseURL, requestedURL);
|
||||
}
|
||||
return requestedURL;
|
||||
}
|
||||
exports.buildFullPath = buildFullPath;
|
||||
14
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/luch-request/core/defaults.js
vendored
Normal file
14
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/luch-request/core/defaults.js
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
"use strict";
|
||||
const defaults = {
|
||||
baseURL: "",
|
||||
header: {},
|
||||
method: "GET",
|
||||
dataType: "json",
|
||||
responseType: "text",
|
||||
custom: {},
|
||||
timeout: 6e4,
|
||||
validateStatus: function validateStatus(status) {
|
||||
return status >= 200 && status < 300;
|
||||
}
|
||||
};
|
||||
exports.defaults = defaults;
|
||||
@@ -0,0 +1,4 @@
|
||||
"use strict";
|
||||
const uni_modules_uviewPlus_libs_luchRequest_adapters_index = require("../adapters/index.js");
|
||||
const dispatchRequest = (config) => uni_modules_uviewPlus_libs_luchRequest_adapters_index.adapter(config);
|
||||
exports.dispatchRequest = dispatchRequest;
|
||||
52
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/luch-request/core/mergeConfig.js
vendored
Normal file
52
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/luch-request/core/mergeConfig.js
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
"use strict";
|
||||
const uni_modules_uviewPlus_libs_luchRequest_utils = require("../utils.js");
|
||||
const mergeKeys = (keys, globalsConfig, config2) => {
|
||||
const config = {};
|
||||
keys.forEach((prop) => {
|
||||
if (!uni_modules_uviewPlus_libs_luchRequest_utils.isUndefined(config2[prop])) {
|
||||
config[prop] = config2[prop];
|
||||
} else if (!uni_modules_uviewPlus_libs_luchRequest_utils.isUndefined(globalsConfig[prop])) {
|
||||
config[prop] = globalsConfig[prop];
|
||||
}
|
||||
});
|
||||
return config;
|
||||
};
|
||||
const mergeConfig = (globalsConfig, config2 = {}) => {
|
||||
const method = config2.method || globalsConfig.method || "GET";
|
||||
let config = {
|
||||
baseURL: globalsConfig.baseURL || "",
|
||||
method,
|
||||
url: config2.url || "",
|
||||
params: config2.params || {},
|
||||
custom: { ...globalsConfig.custom || {}, ...config2.custom || {} },
|
||||
header: uni_modules_uviewPlus_libs_luchRequest_utils.deepMerge(globalsConfig.header || {}, config2.header || {})
|
||||
};
|
||||
const defaultToConfig2Keys = ["getTask", "validateStatus"];
|
||||
config = { ...config, ...mergeKeys(defaultToConfig2Keys, globalsConfig, config2) };
|
||||
if (method === "DOWNLOAD")
|
||||
;
|
||||
else if (method === "UPLOAD") {
|
||||
delete config.header["content-type"];
|
||||
delete config.header["Content-Type"];
|
||||
const uploadKeys = [
|
||||
"filePath",
|
||||
"name",
|
||||
"formData"
|
||||
];
|
||||
uploadKeys.forEach((prop) => {
|
||||
if (!uni_modules_uviewPlus_libs_luchRequest_utils.isUndefined(config2[prop])) {
|
||||
config[prop] = config2[prop];
|
||||
}
|
||||
});
|
||||
} else {
|
||||
const defaultsKeys = [
|
||||
"data",
|
||||
"timeout",
|
||||
"dataType",
|
||||
"responseType"
|
||||
];
|
||||
config = { ...config, ...mergeKeys(defaultsKeys, globalsConfig, config2) };
|
||||
}
|
||||
return config;
|
||||
};
|
||||
exports.mergeConfig = mergeConfig;
|
||||
11
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/luch-request/core/settle.js
vendored
Normal file
11
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/luch-request/core/settle.js
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
"use strict";
|
||||
function settle(resolve, reject, response) {
|
||||
const { validateStatus } = response.config;
|
||||
const status = response.statusCode;
|
||||
if (status && (!validateStatus || validateStatus(status))) {
|
||||
resolve(response);
|
||||
} else {
|
||||
reject(response);
|
||||
}
|
||||
}
|
||||
exports.settle = settle;
|
||||
44
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/luch-request/helpers/buildURL.js
vendored
Normal file
44
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/luch-request/helpers/buildURL.js
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
"use strict";
|
||||
const uni_modules_uviewPlus_libs_luchRequest_utils = require("../utils.js");
|
||||
function encode(val) {
|
||||
return encodeURIComponent(val).replace(/%40/gi, "@").replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
||||
}
|
||||
function buildURL(url, params) {
|
||||
if (!params) {
|
||||
return url;
|
||||
}
|
||||
let serializedParams;
|
||||
if (uni_modules_uviewPlus_libs_luchRequest_utils.isURLSearchParams(params)) {
|
||||
serializedParams = params.toString();
|
||||
} else {
|
||||
const parts = [];
|
||||
uni_modules_uviewPlus_libs_luchRequest_utils.forEach(params, (val, key) => {
|
||||
if (val === null || typeof val === "undefined") {
|
||||
return;
|
||||
}
|
||||
if (uni_modules_uviewPlus_libs_luchRequest_utils.isArray(val)) {
|
||||
key = `${key}[]`;
|
||||
} else {
|
||||
val = [val];
|
||||
}
|
||||
uni_modules_uviewPlus_libs_luchRequest_utils.forEach(val, (v) => {
|
||||
if (uni_modules_uviewPlus_libs_luchRequest_utils.isDate(v)) {
|
||||
v = v.toISOString();
|
||||
} else if (uni_modules_uviewPlus_libs_luchRequest_utils.isObject(v)) {
|
||||
v = JSON.stringify(v);
|
||||
}
|
||||
parts.push(`${encode(key)}=${encode(v)}`);
|
||||
});
|
||||
});
|
||||
serializedParams = parts.join("&");
|
||||
}
|
||||
if (serializedParams) {
|
||||
const hashmarkIndex = url.indexOf("#");
|
||||
if (hashmarkIndex !== -1) {
|
||||
url = url.slice(0, hashmarkIndex);
|
||||
}
|
||||
url += (url.indexOf("?") === -1 ? "?" : "&") + serializedParams;
|
||||
}
|
||||
return url;
|
||||
}
|
||||
exports.buildURL = buildURL;
|
||||
5
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/luch-request/helpers/combineURLs.js
vendored
Normal file
5
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/luch-request/helpers/combineURLs.js
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
"use strict";
|
||||
function combineURLs(baseURL, relativeURL) {
|
||||
return relativeURL ? `${baseURL.replace(/\/+$/, "")}/${relativeURL.replace(/^\/+/, "")}` : baseURL;
|
||||
}
|
||||
exports.combineURLs = combineURLs;
|
||||
@@ -0,0 +1,5 @@
|
||||
"use strict";
|
||||
function isAbsoluteURL(url) {
|
||||
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
|
||||
}
|
||||
exports.isAbsoluteURL = isAbsoluteURL;
|
||||
2
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/luch-request/index.js
vendored
Normal file
2
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/luch-request/index.js
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
"use strict";
|
||||
const uni_modules_uviewPlus_libs_luchRequest_core_Request = require("./core/Request.js");
|
||||
63
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/luch-request/utils.js
vendored
Normal file
63
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/luch-request/utils.js
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
"use strict";
|
||||
const { toString } = Object.prototype;
|
||||
function isArray(val) {
|
||||
return toString.call(val) === "[object Array]";
|
||||
}
|
||||
function isObject(val) {
|
||||
return val !== null && typeof val === "object";
|
||||
}
|
||||
function isDate(val) {
|
||||
return toString.call(val) === "[object Date]";
|
||||
}
|
||||
function isURLSearchParams(val) {
|
||||
return typeof URLSearchParams !== "undefined" && val instanceof URLSearchParams;
|
||||
}
|
||||
function forEach(obj, fn) {
|
||||
if (obj === null || typeof obj === "undefined") {
|
||||
return;
|
||||
}
|
||||
if (typeof obj !== "object") {
|
||||
obj = [obj];
|
||||
}
|
||||
if (isArray(obj)) {
|
||||
for (let i = 0, l = obj.length; i < l; i++) {
|
||||
fn.call(null, obj[i], i, obj);
|
||||
}
|
||||
} else {
|
||||
for (const key in obj) {
|
||||
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
||||
fn.call(null, obj[key], key, obj);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
function isPlainObject(obj) {
|
||||
return Object.prototype.toString.call(obj) === "[object Object]";
|
||||
}
|
||||
function deepMerge() {
|
||||
const result = {};
|
||||
function assignValue(val, key) {
|
||||
if (typeof result[key] === "object" && typeof val === "object") {
|
||||
result[key] = deepMerge(result[key], val);
|
||||
} else if (typeof val === "object") {
|
||||
result[key] = deepMerge({}, val);
|
||||
} else {
|
||||
result[key] = val;
|
||||
}
|
||||
}
|
||||
for (let i = 0, l = arguments.length; i < l; i++) {
|
||||
forEach(arguments[i], assignValue);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
function isUndefined(val) {
|
||||
return typeof val === "undefined";
|
||||
}
|
||||
exports.deepMerge = deepMerge;
|
||||
exports.forEach = forEach;
|
||||
exports.isArray = isArray;
|
||||
exports.isDate = isDate;
|
||||
exports.isObject = isObject;
|
||||
exports.isPlainObject = isPlainObject;
|
||||
exports.isURLSearchParams = isURLSearchParams;
|
||||
exports.isUndefined = isUndefined;
|
||||
195
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/luch-request/utils/clone.js
vendored
Normal file
195
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/luch-request/utils/clone.js
vendored
Normal file
@@ -0,0 +1,195 @@
|
||||
"use strict";
|
||||
var clone = function() {
|
||||
function _instanceof(obj, type) {
|
||||
return type != null && obj instanceof type;
|
||||
}
|
||||
var nativeMap;
|
||||
try {
|
||||
nativeMap = Map;
|
||||
} catch (_) {
|
||||
nativeMap = function() {
|
||||
};
|
||||
}
|
||||
var nativeSet;
|
||||
try {
|
||||
nativeSet = Set;
|
||||
} catch (_) {
|
||||
nativeSet = function() {
|
||||
};
|
||||
}
|
||||
var nativePromise;
|
||||
try {
|
||||
nativePromise = Promise;
|
||||
} catch (_) {
|
||||
nativePromise = function() {
|
||||
};
|
||||
}
|
||||
function clone2(parent, circular, depth, prototype, includeNonEnumerable) {
|
||||
if (typeof circular === "object") {
|
||||
depth = circular.depth;
|
||||
prototype = circular.prototype;
|
||||
includeNonEnumerable = circular.includeNonEnumerable;
|
||||
circular = circular.circular;
|
||||
}
|
||||
var allParents = [];
|
||||
var allChildren = [];
|
||||
var useBuffer = typeof Buffer != "undefined";
|
||||
if (typeof circular == "undefined")
|
||||
circular = true;
|
||||
if (typeof depth == "undefined")
|
||||
depth = Infinity;
|
||||
function _clone(parent2, depth2) {
|
||||
if (parent2 === null)
|
||||
return null;
|
||||
if (depth2 === 0)
|
||||
return parent2;
|
||||
var child;
|
||||
var proto;
|
||||
if (typeof parent2 != "object") {
|
||||
return parent2;
|
||||
}
|
||||
if (_instanceof(parent2, nativeMap)) {
|
||||
child = new nativeMap();
|
||||
} else if (_instanceof(parent2, nativeSet)) {
|
||||
child = new nativeSet();
|
||||
} else if (_instanceof(parent2, nativePromise)) {
|
||||
child = new nativePromise(function(resolve, reject) {
|
||||
parent2.then(function(value) {
|
||||
resolve(_clone(value, depth2 - 1));
|
||||
}, function(err) {
|
||||
reject(_clone(err, depth2 - 1));
|
||||
});
|
||||
});
|
||||
} else if (clone2.__isArray(parent2)) {
|
||||
child = [];
|
||||
} else if (clone2.__isRegExp(parent2)) {
|
||||
child = new RegExp(parent2.source, __getRegExpFlags(parent2));
|
||||
if (parent2.lastIndex)
|
||||
child.lastIndex = parent2.lastIndex;
|
||||
} else if (clone2.__isDate(parent2)) {
|
||||
child = new Date(parent2.getTime());
|
||||
} else if (useBuffer && Buffer.isBuffer(parent2)) {
|
||||
if (Buffer.from) {
|
||||
child = Buffer.from(parent2);
|
||||
} else {
|
||||
child = new Buffer(parent2.length);
|
||||
parent2.copy(child);
|
||||
}
|
||||
return child;
|
||||
} else if (_instanceof(parent2, Error)) {
|
||||
child = Object.create(parent2);
|
||||
} else {
|
||||
if (typeof prototype == "undefined") {
|
||||
proto = Object.getPrototypeOf(parent2);
|
||||
child = Object.create(proto);
|
||||
} else {
|
||||
child = Object.create(prototype);
|
||||
proto = prototype;
|
||||
}
|
||||
}
|
||||
if (circular) {
|
||||
var index = allParents.indexOf(parent2);
|
||||
if (index != -1) {
|
||||
return allChildren[index];
|
||||
}
|
||||
allParents.push(parent2);
|
||||
allChildren.push(child);
|
||||
}
|
||||
if (_instanceof(parent2, nativeMap)) {
|
||||
parent2.forEach(function(value, key) {
|
||||
var keyChild = _clone(key, depth2 - 1);
|
||||
var valueChild = _clone(value, depth2 - 1);
|
||||
child.set(keyChild, valueChild);
|
||||
});
|
||||
}
|
||||
if (_instanceof(parent2, nativeSet)) {
|
||||
parent2.forEach(function(value) {
|
||||
var entryChild = _clone(value, depth2 - 1);
|
||||
child.add(entryChild);
|
||||
});
|
||||
}
|
||||
for (var i in parent2) {
|
||||
var attrs = Object.getOwnPropertyDescriptor(parent2, i);
|
||||
if (attrs) {
|
||||
child[i] = _clone(parent2[i], depth2 - 1);
|
||||
}
|
||||
try {
|
||||
var objProperty = Object.getOwnPropertyDescriptor(parent2, i);
|
||||
if (objProperty.set === "undefined") {
|
||||
continue;
|
||||
}
|
||||
child[i] = _clone(parent2[i], depth2 - 1);
|
||||
} catch (e) {
|
||||
if (e instanceof TypeError) {
|
||||
continue;
|
||||
} else if (e instanceof ReferenceError) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (Object.getOwnPropertySymbols) {
|
||||
var symbols = Object.getOwnPropertySymbols(parent2);
|
||||
for (var i = 0; i < symbols.length; i++) {
|
||||
var symbol = symbols[i];
|
||||
var descriptor = Object.getOwnPropertyDescriptor(parent2, symbol);
|
||||
if (descriptor && !descriptor.enumerable && !includeNonEnumerable) {
|
||||
continue;
|
||||
}
|
||||
child[symbol] = _clone(parent2[symbol], depth2 - 1);
|
||||
Object.defineProperty(child, symbol, descriptor);
|
||||
}
|
||||
}
|
||||
if (includeNonEnumerable) {
|
||||
var allPropertyNames = Object.getOwnPropertyNames(parent2);
|
||||
for (var i = 0; i < allPropertyNames.length; i++) {
|
||||
var propertyName = allPropertyNames[i];
|
||||
var descriptor = Object.getOwnPropertyDescriptor(parent2, propertyName);
|
||||
if (descriptor && descriptor.enumerable) {
|
||||
continue;
|
||||
}
|
||||
child[propertyName] = _clone(parent2[propertyName], depth2 - 1);
|
||||
Object.defineProperty(child, propertyName, descriptor);
|
||||
}
|
||||
}
|
||||
return child;
|
||||
}
|
||||
return _clone(parent, depth);
|
||||
}
|
||||
clone2.clonePrototype = function clonePrototype(parent) {
|
||||
if (parent === null)
|
||||
return null;
|
||||
var c = function() {
|
||||
};
|
||||
c.prototype = parent;
|
||||
return new c();
|
||||
};
|
||||
function __objToStr(o) {
|
||||
return Object.prototype.toString.call(o);
|
||||
}
|
||||
clone2.__objToStr = __objToStr;
|
||||
function __isDate(o) {
|
||||
return typeof o === "object" && __objToStr(o) === "[object Date]";
|
||||
}
|
||||
clone2.__isDate = __isDate;
|
||||
function __isArray(o) {
|
||||
return typeof o === "object" && __objToStr(o) === "[object Array]";
|
||||
}
|
||||
clone2.__isArray = __isArray;
|
||||
function __isRegExp(o) {
|
||||
return typeof o === "object" && __objToStr(o) === "[object RegExp]";
|
||||
}
|
||||
clone2.__isRegExp = __isRegExp;
|
||||
function __getRegExpFlags(re) {
|
||||
var flags = "";
|
||||
if (re.global)
|
||||
flags += "g";
|
||||
if (re.ignoreCase)
|
||||
flags += "i";
|
||||
if (re.multiline)
|
||||
flags += "m";
|
||||
return flags;
|
||||
}
|
||||
clone2.__getRegExpFlags = __getRegExpFlags;
|
||||
return clone2;
|
||||
}();
|
||||
exports.clone = clone;
|
||||
16
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/mixin/button.js
vendored
Normal file
16
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/mixin/button.js
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
"use strict";
|
||||
const uni_modules_uviewPlus_libs_vue = require("../vue.js");
|
||||
const buttonMixin = uni_modules_uviewPlus_libs_vue.defineMixin({
|
||||
props: {
|
||||
lang: String,
|
||||
sessionFrom: String,
|
||||
sendMessageTitle: String,
|
||||
sendMessagePath: String,
|
||||
sendMessageImg: String,
|
||||
showMessageCard: Boolean,
|
||||
appParameter: String,
|
||||
formType: String,
|
||||
openType: String
|
||||
}
|
||||
});
|
||||
exports.buttonMixin = buttonMixin;
|
||||
139
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/mixin/mixin.js
vendored
Normal file
139
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/mixin/mixin.js
vendored
Normal file
@@ -0,0 +1,139 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../../common/vendor.js");
|
||||
const uni_modules_uviewPlus_libs_vue = require("../vue.js");
|
||||
const uni_modules_uviewPlus_libs_function_index = require("../function/index.js");
|
||||
const uni_modules_uviewPlus_libs_function_test = require("../function/test.js");
|
||||
const uni_modules_uviewPlus_libs_util_route = require("../util/route.js");
|
||||
const mixin = uni_modules_uviewPlus_libs_vue.defineMixin({
|
||||
// 定义每个组件都可能需要用到的外部样式以及类名
|
||||
props: {
|
||||
// 每个组件都有的父组件传递的样式,可以为字符串或者对象形式
|
||||
customStyle: {
|
||||
type: [Object, String],
|
||||
default: () => ({})
|
||||
},
|
||||
customClass: {
|
||||
type: String,
|
||||
default: ""
|
||||
},
|
||||
// 跳转的页面路径
|
||||
url: {
|
||||
type: String,
|
||||
default: ""
|
||||
},
|
||||
// 页面跳转的类型
|
||||
linkType: {
|
||||
type: String,
|
||||
default: "navigateTo"
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
onLoad() {
|
||||
this.$u.getRect = this.$uGetRect;
|
||||
},
|
||||
created() {
|
||||
this.$u.getRect = this.$uGetRect;
|
||||
},
|
||||
computed: {
|
||||
// 在2.x版本中,将会把$u挂载到uni对象下,导致在模板中无法使用uni.$u.xxx形式
|
||||
// 所以这里通过computed计算属性将其附加到this.$u上,就可以在模板或者js中使用uni.$u.xxx
|
||||
// 只在nvue环境通过此方式引入完整的$u,其他平台会出现性能问题,非nvue则按需引入(主要原因是props过大)
|
||||
$u() {
|
||||
return uni_modules_uviewPlus_libs_function_index.deepMerge(common_vendor.index.$u, {
|
||||
props: void 0,
|
||||
http: void 0,
|
||||
mixin: void 0
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 生成bem规则类名
|
||||
* 由于微信小程序,H5,nvue之间绑定class的差异,无法通过:class="[bem()]"的形式进行同用
|
||||
* 故采用如下折中做法,最后返回的是数组(一般平台)或字符串(支付宝和字节跳动平台),类似['a', 'b', 'c']或'a b c'的形式
|
||||
* @param {String} name 组件名称
|
||||
* @param {Array} fixed 一直会存在的类名
|
||||
* @param {Array} change 会根据变量值为true或者false而出现或者隐藏的类名
|
||||
* @returns {Array|string}
|
||||
*/
|
||||
bem() {
|
||||
return function(name, fixed, change) {
|
||||
const prefix = `u-${name}--`;
|
||||
const classes = {};
|
||||
if (fixed) {
|
||||
fixed.map((item) => {
|
||||
classes[prefix + this[item]] = true;
|
||||
});
|
||||
}
|
||||
if (change) {
|
||||
change.map((item) => {
|
||||
this[item] ? classes[prefix + item] = this[item] : delete classes[prefix + item];
|
||||
});
|
||||
}
|
||||
return Object.keys(classes);
|
||||
};
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 跳转某一个页面
|
||||
openPage(urlKey = "url") {
|
||||
const url = this[urlKey];
|
||||
if (url) {
|
||||
uni_modules_uviewPlus_libs_util_route.route({ type: this.linkType, url });
|
||||
}
|
||||
},
|
||||
navTo(url = "", linkType = "navigateTo") {
|
||||
uni_modules_uviewPlus_libs_util_route.route({ type: this.linkType, url });
|
||||
},
|
||||
// 查询节点信息
|
||||
// 目前此方法在支付宝小程序中无法获取组件跟接点的尺寸,为支付宝的bug(2020-07-21)
|
||||
// 解决办法为在组件根部再套一个没有任何作用的view元素
|
||||
$uGetRect(selector, all) {
|
||||
return new Promise((resolve) => {
|
||||
common_vendor.index.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 = "") {
|
||||
if (!this.parent)
|
||||
this.parent = {};
|
||||
this.parent = uni_modules_uviewPlus_libs_function_index.$parent.call(this, parentName);
|
||||
if (this.parent.children) {
|
||||
this.parent.children.indexOf(this) === -1 && this.parent.children.push(this);
|
||||
}
|
||||
if (this.parent && this.parentData) {
|
||||
Object.keys(this.parentData).map((key) => {
|
||||
this.parentData[key] = this.parent[key];
|
||||
});
|
||||
}
|
||||
},
|
||||
// 阻止事件冒泡
|
||||
preventEvent(e) {
|
||||
e && typeof e.stopPropagation === "function" && e.stopPropagation();
|
||||
},
|
||||
// 空操作
|
||||
noop(e) {
|
||||
this.preventEvent(e);
|
||||
}
|
||||
},
|
||||
onReachBottom() {
|
||||
common_vendor.index.$emit("uOnReachBottom");
|
||||
},
|
||||
beforeUnmount() {
|
||||
if (this.parent && uni_modules_uviewPlus_libs_function_test.test.array(this.parent.children)) {
|
||||
const childrenList = this.parent.children;
|
||||
childrenList.map((child, index) => {
|
||||
if (child === this) {
|
||||
childrenList.splice(index, 1);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
exports.mixin = mixin;
|
||||
9
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/mixin/mpMixin.js
vendored
Normal file
9
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/mixin/mpMixin.js
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
"use strict";
|
||||
const uni_modules_uviewPlus_libs_vue = require("../vue.js");
|
||||
const mpMixin = uni_modules_uviewPlus_libs_vue.defineMixin({
|
||||
// 将自定义节点设置成虚拟的,更加接近Vue组件的表现,能更好的使用flex属性
|
||||
options: {
|
||||
virtualHost: true
|
||||
}
|
||||
});
|
||||
exports.mpMixin = mpMixin;
|
||||
28
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/mixin/openType.js
vendored
Normal file
28
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/mixin/openType.js
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
"use strict";
|
||||
const uni_modules_uviewPlus_libs_vue = require("../vue.js");
|
||||
const openType = uni_modules_uviewPlus_libs_vue.defineMixin({
|
||||
props: {
|
||||
openType: String
|
||||
},
|
||||
methods: {
|
||||
onGetUserInfo(event) {
|
||||
this.$emit("getuserinfo", event.detail);
|
||||
},
|
||||
onContact(event) {
|
||||
this.$emit("contact", event.detail);
|
||||
},
|
||||
onGetPhoneNumber(event) {
|
||||
this.$emit("getphonenumber", event.detail);
|
||||
},
|
||||
onError(event) {
|
||||
this.$emit("error", event.detail);
|
||||
},
|
||||
onLaunchApp(event) {
|
||||
this.$emit("launchapp", event.detail);
|
||||
},
|
||||
onOpenSetting(event) {
|
||||
this.$emit("opensetting", event.detail);
|
||||
}
|
||||
}
|
||||
});
|
||||
exports.openType = openType;
|
||||
841
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/util/calendar.js
vendored
Normal file
841
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/util/calendar.js
vendored
Normal file
@@ -0,0 +1,841 @@
|
||||
"use strict";
|
||||
var Calendar = {
|
||||
/**
|
||||
* 农历1900-2100的润大小信息表
|
||||
* @Array Of Property
|
||||
* @return Hex
|
||||
*/
|
||||
lunarInfo: [
|
||||
19416,
|
||||
19168,
|
||||
42352,
|
||||
21717,
|
||||
53856,
|
||||
55632,
|
||||
91476,
|
||||
22176,
|
||||
39632,
|
||||
21970,
|
||||
// 1900-1909
|
||||
19168,
|
||||
42422,
|
||||
42192,
|
||||
53840,
|
||||
119381,
|
||||
46400,
|
||||
54944,
|
||||
44450,
|
||||
38320,
|
||||
84343,
|
||||
// 1910-1919
|
||||
18800,
|
||||
42160,
|
||||
46261,
|
||||
27216,
|
||||
27968,
|
||||
109396,
|
||||
11104,
|
||||
38256,
|
||||
21234,
|
||||
18800,
|
||||
// 1920-1929
|
||||
25958,
|
||||
54432,
|
||||
59984,
|
||||
28309,
|
||||
23248,
|
||||
11104,
|
||||
100067,
|
||||
37600,
|
||||
116951,
|
||||
51536,
|
||||
// 1930-1939
|
||||
54432,
|
||||
120998,
|
||||
46416,
|
||||
22176,
|
||||
107956,
|
||||
9680,
|
||||
37584,
|
||||
53938,
|
||||
43344,
|
||||
46423,
|
||||
// 1940-1949
|
||||
27808,
|
||||
46416,
|
||||
86869,
|
||||
19872,
|
||||
42416,
|
||||
83315,
|
||||
21168,
|
||||
43432,
|
||||
59728,
|
||||
27296,
|
||||
// 1950-1959
|
||||
44710,
|
||||
43856,
|
||||
19296,
|
||||
43748,
|
||||
42352,
|
||||
21088,
|
||||
62051,
|
||||
55632,
|
||||
23383,
|
||||
22176,
|
||||
// 1960-1969
|
||||
38608,
|
||||
19925,
|
||||
19152,
|
||||
42192,
|
||||
54484,
|
||||
53840,
|
||||
54616,
|
||||
46400,
|
||||
46752,
|
||||
103846,
|
||||
// 1970-1979
|
||||
38320,
|
||||
18864,
|
||||
43380,
|
||||
42160,
|
||||
45690,
|
||||
27216,
|
||||
27968,
|
||||
44870,
|
||||
43872,
|
||||
38256,
|
||||
// 1980-1989
|
||||
19189,
|
||||
18800,
|
||||
25776,
|
||||
29859,
|
||||
59984,
|
||||
27480,
|
||||
23232,
|
||||
43872,
|
||||
38613,
|
||||
37600,
|
||||
// 1990-1999
|
||||
51552,
|
||||
55636,
|
||||
54432,
|
||||
55888,
|
||||
30034,
|
||||
22176,
|
||||
43959,
|
||||
9680,
|
||||
37584,
|
||||
51893,
|
||||
// 2000-2009
|
||||
43344,
|
||||
46240,
|
||||
47780,
|
||||
44368,
|
||||
21977,
|
||||
19360,
|
||||
42416,
|
||||
86390,
|
||||
21168,
|
||||
43312,
|
||||
// 2010-2019
|
||||
31060,
|
||||
27296,
|
||||
44368,
|
||||
23378,
|
||||
19296,
|
||||
42726,
|
||||
42208,
|
||||
53856,
|
||||
60005,
|
||||
54576,
|
||||
// 2020-2029
|
||||
23200,
|
||||
30371,
|
||||
38608,
|
||||
19195,
|
||||
19152,
|
||||
42192,
|
||||
118966,
|
||||
53840,
|
||||
54560,
|
||||
56645,
|
||||
// 2030-2039
|
||||
46496,
|
||||
22224,
|
||||
21938,
|
||||
18864,
|
||||
42359,
|
||||
42160,
|
||||
43600,
|
||||
111189,
|
||||
27936,
|
||||
44448,
|
||||
// 2040-2049
|
||||
/** Add By JJonline@JJonline.Cn**/
|
||||
84835,
|
||||
37744,
|
||||
18936,
|
||||
18800,
|
||||
25776,
|
||||
92326,
|
||||
59984,
|
||||
27424,
|
||||
108228,
|
||||
43744,
|
||||
// 2050-2059
|
||||
41696,
|
||||
53987,
|
||||
51552,
|
||||
54615,
|
||||
54432,
|
||||
55888,
|
||||
23893,
|
||||
22176,
|
||||
42704,
|
||||
21972,
|
||||
// 2060-2069
|
||||
21200,
|
||||
43448,
|
||||
43344,
|
||||
46240,
|
||||
46758,
|
||||
44368,
|
||||
21920,
|
||||
43940,
|
||||
42416,
|
||||
21168,
|
||||
// 2070-2079
|
||||
45683,
|
||||
26928,
|
||||
29495,
|
||||
27296,
|
||||
44368,
|
||||
84821,
|
||||
19296,
|
||||
42352,
|
||||
21732,
|
||||
53600,
|
||||
// 2080-2089
|
||||
59752,
|
||||
54560,
|
||||
55968,
|
||||
92838,
|
||||
22224,
|
||||
19168,
|
||||
43476,
|
||||
41680,
|
||||
53584,
|
||||
62034,
|
||||
// 2090-2099
|
||||
54560
|
||||
],
|
||||
// 2100
|
||||
/**
|
||||
* 公历每个月份的天数普通表
|
||||
* @Array Of Property
|
||||
* @return Number
|
||||
*/
|
||||
solarMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],
|
||||
/**
|
||||
* 天干地支之天干速查表
|
||||
* @Array Of Property trans["甲","乙","丙","丁","戊","己","庚","辛","壬","癸"]
|
||||
* @return Cn string
|
||||
*/
|
||||
Gan: ["甲", "乙", "丙", "丁", "戊", "己", "庚", "辛", "壬", "癸"],
|
||||
/**
|
||||
* 天干地支之地支速查表
|
||||
* @Array Of Property
|
||||
* @trans["子","丑","寅","卯","辰","巳","午","未","申","酉","戌","亥"]
|
||||
* @return Cn string
|
||||
*/
|
||||
Zhi: ["子", "丑", "寅", "卯", "辰", "巳", "午", "未", "申", "酉", "戌", "亥"],
|
||||
/**
|
||||
* 天干地支之地支速查表<=>生肖
|
||||
* @Array Of Property
|
||||
* @trans["鼠","牛","虎","兔","龙","蛇","马","羊","猴","鸡","狗","猪"]
|
||||
* @return Cn string
|
||||
*/
|
||||
Animals: ["鼠", "牛", "虎", "兔", "龙", "蛇", "马", "羊", "猴", "鸡", "狗", "猪"],
|
||||
/**
|
||||
* 24节气速查表
|
||||
* @Array Of Property
|
||||
* @trans["小寒","大寒","立春","雨水","惊蛰","春分","清明","谷雨","立夏","小满","芒种","夏至","小暑","大暑","立秋","处暑","白露","秋分","寒露","霜降","立冬","小雪","大雪","冬至"]
|
||||
* @return Cn string
|
||||
*/
|
||||
solarTerm: ["小寒", "大寒", "立春", "雨水", "惊蛰", "春分", "清明", "谷雨", "立夏", "小满", "芒种", "夏至", "小暑", "大暑", "立秋", "处暑", "白露", "秋分", "寒露", "霜降", "立冬", "小雪", "大雪", "冬至"],
|
||||
/**
|
||||
* 1900-2100各年的24节气日期速查表
|
||||
* @Array Of Property
|
||||
* @return 0x string For splice
|
||||
*/
|
||||
sTermInfo: [
|
||||
"9778397bd097c36b0b6fc9274c91aa",
|
||||
"97b6b97bd19801ec9210c965cc920e",
|
||||
"97bcf97c3598082c95f8c965cc920f",
|
||||
"97bd0b06bdb0722c965ce1cfcc920f",
|
||||
"b027097bd097c36b0b6fc9274c91aa",
|
||||
"97b6b97bd19801ec9210c965cc920e",
|
||||
"97bcf97c359801ec95f8c965cc920f",
|
||||
"97bd0b06bdb0722c965ce1cfcc920f",
|
||||
"b027097bd097c36b0b6fc9274c91aa",
|
||||
"97b6b97bd19801ec9210c965cc920e",
|
||||
"97bcf97c359801ec95f8c965cc920f",
|
||||
"97bd0b06bdb0722c965ce1cfcc920f",
|
||||
"b027097bd097c36b0b6fc9274c91aa",
|
||||
"9778397bd19801ec9210c965cc920e",
|
||||
"97b6b97bd19801ec95f8c965cc920f",
|
||||
"97bd09801d98082c95f8e1cfcc920f",
|
||||
"97bd097bd097c36b0b6fc9210c8dc2",
|
||||
"9778397bd197c36c9210c9274c91aa",
|
||||
"97b6b97bd19801ec95f8c965cc920e",
|
||||
"97bd09801d98082c95f8e1cfcc920f",
|
||||
"97bd097bd097c36b0b6fc9210c8dc2",
|
||||
"9778397bd097c36c9210c9274c91aa",
|
||||
"97b6b97bd19801ec95f8c965cc920e",
|
||||
"97bcf97c3598082c95f8e1cfcc920f",
|
||||
"97bd097bd097c36b0b6fc9210c8dc2",
|
||||
"9778397bd097c36c9210c9274c91aa",
|
||||
"97b6b97bd19801ec9210c965cc920e",
|
||||
"97bcf97c3598082c95f8c965cc920f",
|
||||
"97bd097bd097c35b0b6fc920fb0722",
|
||||
"9778397bd097c36b0b6fc9274c91aa",
|
||||
"97b6b97bd19801ec9210c965cc920e",
|
||||
"97bcf97c3598082c95f8c965cc920f",
|
||||
"97bd097bd097c35b0b6fc920fb0722",
|
||||
"9778397bd097c36b0b6fc9274c91aa",
|
||||
"97b6b97bd19801ec9210c965cc920e",
|
||||
"97bcf97c359801ec95f8c965cc920f",
|
||||
"97bd097bd097c35b0b6fc920fb0722",
|
||||
"9778397bd097c36b0b6fc9274c91aa",
|
||||
"97b6b97bd19801ec9210c965cc920e",
|
||||
"97bcf97c359801ec95f8c965cc920f",
|
||||
"97bd097bd097c35b0b6fc920fb0722",
|
||||
"9778397bd097c36b0b6fc9274c91aa",
|
||||
"97b6b97bd19801ec9210c965cc920e",
|
||||
"97bcf97c359801ec95f8c965cc920f",
|
||||
"97bd097bd07f595b0b6fc920fb0722",
|
||||
"9778397bd097c36b0b6fc9210c8dc2",
|
||||
"9778397bd19801ec9210c9274c920e",
|
||||
"97b6b97bd19801ec95f8c965cc920f",
|
||||
"97bd07f5307f595b0b0bc920fb0722",
|
||||
"7f0e397bd097c36b0b6fc9210c8dc2",
|
||||
"9778397bd097c36c9210c9274c920e",
|
||||
"97b6b97bd19801ec95f8c965cc920f",
|
||||
"97bd07f5307f595b0b0bc920fb0722",
|
||||
"7f0e397bd097c36b0b6fc9210c8dc2",
|
||||
"9778397bd097c36c9210c9274c91aa",
|
||||
"97b6b97bd19801ec9210c965cc920e",
|
||||
"97bd07f1487f595b0b0bc920fb0722",
|
||||
"7f0e397bd097c36b0b6fc9210c8dc2",
|
||||
"9778397bd097c36b0b6fc9274c91aa",
|
||||
"97b6b97bd19801ec9210c965cc920e",
|
||||
"97bcf7f1487f595b0b0bb0b6fb0722",
|
||||
"7f0e397bd097c35b0b6fc920fb0722",
|
||||
"9778397bd097c36b0b6fc9274c91aa",
|
||||
"97b6b97bd19801ec9210c965cc920e",
|
||||
"97bcf7f1487f595b0b0bb0b6fb0722",
|
||||
"7f0e397bd097c35b0b6fc920fb0722",
|
||||
"9778397bd097c36b0b6fc9274c91aa",
|
||||
"97b6b97bd19801ec9210c965cc920e",
|
||||
"97bcf7f1487f531b0b0bb0b6fb0722",
|
||||
"7f0e397bd097c35b0b6fc920fb0722",
|
||||
"9778397bd097c36b0b6fc9274c91aa",
|
||||
"97b6b97bd19801ec9210c965cc920e",
|
||||
"97bcf7f1487f531b0b0bb0b6fb0722",
|
||||
"7f0e397bd07f595b0b6fc920fb0722",
|
||||
"9778397bd097c36b0b6fc9274c91aa",
|
||||
"97b6b97bd19801ec9210c9274c920e",
|
||||
"97bcf7f0e47f531b0b0bb0b6fb0722",
|
||||
"7f0e397bd07f595b0b0bc920fb0722",
|
||||
"9778397bd097c36b0b6fc9210c91aa",
|
||||
"97b6b97bd197c36c9210c9274c920e",
|
||||
"97bcf7f0e47f531b0b0bb0b6fb0722",
|
||||
"7f0e397bd07f595b0b0bc920fb0722",
|
||||
"9778397bd097c36b0b6fc9210c8dc2",
|
||||
"9778397bd097c36c9210c9274c920e",
|
||||
"97b6b7f0e47f531b0723b0b6fb0722",
|
||||
"7f0e37f5307f595b0b0bc920fb0722",
|
||||
"7f0e397bd097c36b0b6fc9210c8dc2",
|
||||
"9778397bd097c36b0b70c9274c91aa",
|
||||
"97b6b7f0e47f531b0723b0b6fb0721",
|
||||
"7f0e37f1487f595b0b0bb0b6fb0722",
|
||||
"7f0e397bd097c35b0b6fc9210c8dc2",
|
||||
"9778397bd097c36b0b6fc9274c91aa",
|
||||
"97b6b7f0e47f531b0723b0b6fb0721",
|
||||
"7f0e27f1487f595b0b0bb0b6fb0722",
|
||||
"7f0e397bd097c35b0b6fc920fb0722",
|
||||
"9778397bd097c36b0b6fc9274c91aa",
|
||||
"97b6b7f0e47f531b0723b0b6fb0721",
|
||||
"7f0e27f1487f531b0b0bb0b6fb0722",
|
||||
"7f0e397bd097c35b0b6fc920fb0722",
|
||||
"9778397bd097c36b0b6fc9274c91aa",
|
||||
"97b6b7f0e47f531b0723b0b6fb0721",
|
||||
"7f0e27f1487f531b0b0bb0b6fb0722",
|
||||
"7f0e397bd097c35b0b6fc920fb0722",
|
||||
"9778397bd097c36b0b6fc9274c91aa",
|
||||
"97b6b7f0e47f531b0723b0b6fb0721",
|
||||
"7f0e27f1487f531b0b0bb0b6fb0722",
|
||||
"7f0e397bd07f595b0b0bc920fb0722",
|
||||
"9778397bd097c36b0b6fc9274c91aa",
|
||||
"97b6b7f0e47f531b0723b0787b0721",
|
||||
"7f0e27f0e47f531b0b0bb0b6fb0722",
|
||||
"7f0e397bd07f595b0b0bc920fb0722",
|
||||
"9778397bd097c36b0b6fc9210c91aa",
|
||||
"97b6b7f0e47f149b0723b0787b0721",
|
||||
"7f0e27f0e47f531b0723b0b6fb0722",
|
||||
"7f0e397bd07f595b0b0bc920fb0722",
|
||||
"9778397bd097c36b0b6fc9210c8dc2",
|
||||
"977837f0e37f149b0723b0787b0721",
|
||||
"7f07e7f0e47f531b0723b0b6fb0722",
|
||||
"7f0e37f5307f595b0b0bc920fb0722",
|
||||
"7f0e397bd097c35b0b6fc9210c8dc2",
|
||||
"977837f0e37f14998082b0787b0721",
|
||||
"7f07e7f0e47f531b0723b0b6fb0721",
|
||||
"7f0e37f1487f595b0b0bb0b6fb0722",
|
||||
"7f0e397bd097c35b0b6fc9210c8dc2",
|
||||
"977837f0e37f14998082b0787b06bd",
|
||||
"7f07e7f0e47f531b0723b0b6fb0721",
|
||||
"7f0e27f1487f531b0b0bb0b6fb0722",
|
||||
"7f0e397bd097c35b0b6fc920fb0722",
|
||||
"977837f0e37f14998082b0787b06bd",
|
||||
"7f07e7f0e47f531b0723b0b6fb0721",
|
||||
"7f0e27f1487f531b0b0bb0b6fb0722",
|
||||
"7f0e397bd097c35b0b6fc920fb0722",
|
||||
"977837f0e37f14998082b0787b06bd",
|
||||
"7f07e7f0e47f531b0723b0b6fb0721",
|
||||
"7f0e27f1487f531b0b0bb0b6fb0722",
|
||||
"7f0e397bd07f595b0b0bc920fb0722",
|
||||
"977837f0e37f14998082b0787b06bd",
|
||||
"7f07e7f0e47f531b0723b0b6fb0721",
|
||||
"7f0e27f1487f531b0b0bb0b6fb0722",
|
||||
"7f0e397bd07f595b0b0bc920fb0722",
|
||||
"977837f0e37f14998082b0787b06bd",
|
||||
"7f07e7f0e47f149b0723b0787b0721",
|
||||
"7f0e27f0e47f531b0b0bb0b6fb0722",
|
||||
"7f0e397bd07f595b0b0bc920fb0722",
|
||||
"977837f0e37f14998082b0723b06bd",
|
||||
"7f07e7f0e37f149b0723b0787b0721",
|
||||
"7f0e27f0e47f531b0723b0b6fb0722",
|
||||
"7f0e397bd07f595b0b0bc920fb0722",
|
||||
"977837f0e37f14898082b0723b02d5",
|
||||
"7ec967f0e37f14998082b0787b0721",
|
||||
"7f07e7f0e47f531b0723b0b6fb0722",
|
||||
"7f0e37f1487f595b0b0bb0b6fb0722",
|
||||
"7f0e37f0e37f14898082b0723b02d5",
|
||||
"7ec967f0e37f14998082b0787b0721",
|
||||
"7f07e7f0e47f531b0723b0b6fb0722",
|
||||
"7f0e37f1487f531b0b0bb0b6fb0722",
|
||||
"7f0e37f0e37f14898082b0723b02d5",
|
||||
"7ec967f0e37f14998082b0787b06bd",
|
||||
"7f07e7f0e47f531b0723b0b6fb0721",
|
||||
"7f0e37f1487f531b0b0bb0b6fb0722",
|
||||
"7f0e37f0e37f14898082b072297c35",
|
||||
"7ec967f0e37f14998082b0787b06bd",
|
||||
"7f07e7f0e47f531b0723b0b6fb0721",
|
||||
"7f0e27f1487f531b0b0bb0b6fb0722",
|
||||
"7f0e37f0e37f14898082b072297c35",
|
||||
"7ec967f0e37f14998082b0787b06bd",
|
||||
"7f07e7f0e47f531b0723b0b6fb0721",
|
||||
"7f0e27f1487f531b0b0bb0b6fb0722",
|
||||
"7f0e37f0e366aa89801eb072297c35",
|
||||
"7ec967f0e37f14998082b0787b06bd",
|
||||
"7f07e7f0e47f149b0723b0787b0721",
|
||||
"7f0e27f1487f531b0b0bb0b6fb0722",
|
||||
"7f0e37f0e366aa89801eb072297c35",
|
||||
"7ec967f0e37f14998082b0723b06bd",
|
||||
"7f07e7f0e47f149b0723b0787b0721",
|
||||
"7f0e27f0e47f531b0723b0b6fb0722",
|
||||
"7f0e37f0e366aa89801eb072297c35",
|
||||
"7ec967f0e37f14998082b0723b06bd",
|
||||
"7f07e7f0e37f14998083b0787b0721",
|
||||
"7f0e27f0e47f531b0723b0b6fb0722",
|
||||
"7f0e37f0e366aa89801eb072297c35",
|
||||
"7ec967f0e37f14898082b0723b02d5",
|
||||
"7f07e7f0e37f14998082b0787b0721",
|
||||
"7f07e7f0e47f531b0723b0b6fb0722",
|
||||
"7f0e36665b66aa89801e9808297c35",
|
||||
"665f67f0e37f14898082b0723b02d5",
|
||||
"7ec967f0e37f14998082b0787b0721",
|
||||
"7f07e7f0e47f531b0723b0b6fb0722",
|
||||
"7f0e36665b66a449801e9808297c35",
|
||||
"665f67f0e37f14898082b0723b02d5",
|
||||
"7ec967f0e37f14998082b0787b06bd",
|
||||
"7f07e7f0e47f531b0723b0b6fb0721",
|
||||
"7f0e36665b66a449801e9808297c35",
|
||||
"665f67f0e37f14898082b072297c35",
|
||||
"7ec967f0e37f14998082b0787b06bd",
|
||||
"7f07e7f0e47f531b0723b0b6fb0721",
|
||||
"7f0e26665b66a449801e9808297c35",
|
||||
"665f67f0e37f1489801eb072297c35",
|
||||
"7ec967f0e37f14998082b0787b06bd",
|
||||
"7f07e7f0e47f531b0723b0b6fb0721",
|
||||
"7f0e27f1487f531b0b0bb0b6fb0722"
|
||||
],
|
||||
/**
|
||||
* 数字转中文速查表
|
||||
* @Array Of Property
|
||||
* @trans ['日','一','二','三','四','五','六','七','八','九','十']
|
||||
* @return Cn string
|
||||
*/
|
||||
nStr1: ["日", "一", "二", "三", "四", "五", "六", "七", "八", "九", "十"],
|
||||
/**
|
||||
* 日期转农历称呼速查表
|
||||
* @Array Of Property
|
||||
* @trans ['初','十','廿','卅']
|
||||
* @return Cn string
|
||||
*/
|
||||
nStr2: ["初", "十", "廿", "卅"],
|
||||
/**
|
||||
* 月份转农历称呼速查表
|
||||
* @Array Of Property
|
||||
* @trans ['正','一','二','三','四','五','六','七','八','九','十','冬','腊']
|
||||
* @return Cn string
|
||||
*/
|
||||
nStr3: ["正", "二", "三", "四", "五", "六", "七", "八", "九", "十", "冬", "腊"],
|
||||
/**
|
||||
* 返回农历y年一整年的总天数
|
||||
* @param lunar Year
|
||||
* @return Number
|
||||
* @eg:var count = calendar.lYearDays(1987) ;//count=387
|
||||
*/
|
||||
lYearDays: function(y) {
|
||||
var i;
|
||||
var sum = 348;
|
||||
for (i = 32768; i > 8; i >>= 1) {
|
||||
sum += this.lunarInfo[y - 1900] & i ? 1 : 0;
|
||||
}
|
||||
return sum + this.leapDays(y);
|
||||
},
|
||||
/**
|
||||
* 返回农历y年闰月是哪个月;若y年没有闰月 则返回0
|
||||
* @param lunar Year
|
||||
* @return Number (0-12)
|
||||
* @eg:var leapMonth = calendar.leapMonth(1987) ;//leapMonth=6
|
||||
*/
|
||||
leapMonth: function(y) {
|
||||
return this.lunarInfo[y - 1900] & 15;
|
||||
},
|
||||
/**
|
||||
* 返回农历y年闰月的天数 若该年没有闰月则返回0
|
||||
* @param lunar Year
|
||||
* @return Number (0、29、30)
|
||||
* @eg:var leapMonthDay = calendar.leapDays(1987) ;//leapMonthDay=29
|
||||
*/
|
||||
leapDays: function(y) {
|
||||
if (this.leapMonth(y)) {
|
||||
return this.lunarInfo[y - 1900] & 65536 ? 30 : 29;
|
||||
}
|
||||
return 0;
|
||||
},
|
||||
/**
|
||||
* 返回农历y年m月(非闰月)的总天数,计算m为闰月时的天数请使用leapDays方法
|
||||
* @param lunar Year
|
||||
* @return Number (-1、29、30)
|
||||
* @eg:var MonthDay = calendar.monthDays(1987,9) ;//MonthDay=29
|
||||
*/
|
||||
monthDays: function(y, m) {
|
||||
if (m > 12 || m < 1) {
|
||||
return -1;
|
||||
}
|
||||
return this.lunarInfo[y - 1900] & 65536 >> m ? 30 : 29;
|
||||
},
|
||||
/**
|
||||
* 返回公历(!)y年m月的天数
|
||||
* @param solar Year
|
||||
* @return Number (-1、28、29、30、31)
|
||||
* @eg:var solarMonthDay = calendar.leapDays(1987) ;//solarMonthDay=30
|
||||
*/
|
||||
solarDays: function(y, m) {
|
||||
if (m > 12 || m < 1) {
|
||||
return -1;
|
||||
}
|
||||
var ms = m - 1;
|
||||
if (ms == 1) {
|
||||
return y % 4 == 0 && y % 100 != 0 || y % 400 == 0 ? 29 : 28;
|
||||
} else {
|
||||
return this.solarMonth[ms];
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 农历年份转换为干支纪年
|
||||
* @param lYear 农历年的年份数
|
||||
* @return Cn string
|
||||
*/
|
||||
toGanZhiYear: function(lYear) {
|
||||
var ganKey = (lYear - 3) % 10;
|
||||
var zhiKey = (lYear - 3) % 12;
|
||||
if (ganKey == 0)
|
||||
ganKey = 10;
|
||||
if (zhiKey == 0)
|
||||
zhiKey = 12;
|
||||
return this.Gan[ganKey - 1] + this.Zhi[zhiKey - 1];
|
||||
},
|
||||
/**
|
||||
* 公历月、日判断所属星座
|
||||
* @param cMonth [description]
|
||||
* @param cDay [description]
|
||||
* @return Cn string
|
||||
*/
|
||||
toAstro: function(cMonth, cDay) {
|
||||
var s = "魔羯水瓶双鱼白羊金牛双子巨蟹狮子处女天秤天蝎射手魔羯";
|
||||
var arr = [20, 19, 21, 21, 21, 22, 23, 23, 23, 23, 22, 22];
|
||||
return s.substr(cMonth * 2 - (cDay < arr[cMonth - 1] ? 2 : 0), 2) + "座";
|
||||
},
|
||||
/**
|
||||
* 传入offset偏移量返回干支
|
||||
* @param offset 相对甲子的偏移量
|
||||
* @return Cn string
|
||||
*/
|
||||
toGanZhi: function(offset) {
|
||||
return this.Gan[offset % 10] + this.Zhi[offset % 12];
|
||||
},
|
||||
/**
|
||||
* 传入公历(!)y年获得该年第n个节气的公历日期
|
||||
* @param y公历年(1900-2100);n二十四节气中的第几个节气(1~24);从n=1(小寒)算起
|
||||
* @return day Number
|
||||
* @eg:var _24 = calendar.getTerm(1987,3) ;//_24=4;意即1987年2月4日立春
|
||||
*/
|
||||
getTerm: function(y, n) {
|
||||
if (y < 1900 || y > 2100) {
|
||||
return -1;
|
||||
}
|
||||
if (n < 1 || n > 24) {
|
||||
return -1;
|
||||
}
|
||||
var _table = this.sTermInfo[y - 1900];
|
||||
var _info = [
|
||||
parseInt("0x" + _table.substr(0, 5)).toString(),
|
||||
parseInt("0x" + _table.substr(5, 5)).toString(),
|
||||
parseInt("0x" + _table.substr(10, 5)).toString(),
|
||||
parseInt("0x" + _table.substr(15, 5)).toString(),
|
||||
parseInt("0x" + _table.substr(20, 5)).toString(),
|
||||
parseInt("0x" + _table.substr(25, 5)).toString()
|
||||
];
|
||||
var _calday = [
|
||||
_info[0].substr(0, 1),
|
||||
_info[0].substr(1, 2),
|
||||
_info[0].substr(3, 1),
|
||||
_info[0].substr(4, 2),
|
||||
_info[1].substr(0, 1),
|
||||
_info[1].substr(1, 2),
|
||||
_info[1].substr(3, 1),
|
||||
_info[1].substr(4, 2),
|
||||
_info[2].substr(0, 1),
|
||||
_info[2].substr(1, 2),
|
||||
_info[2].substr(3, 1),
|
||||
_info[2].substr(4, 2),
|
||||
_info[3].substr(0, 1),
|
||||
_info[3].substr(1, 2),
|
||||
_info[3].substr(3, 1),
|
||||
_info[3].substr(4, 2),
|
||||
_info[4].substr(0, 1),
|
||||
_info[4].substr(1, 2),
|
||||
_info[4].substr(3, 1),
|
||||
_info[4].substr(4, 2),
|
||||
_info[5].substr(0, 1),
|
||||
_info[5].substr(1, 2),
|
||||
_info[5].substr(3, 1),
|
||||
_info[5].substr(4, 2)
|
||||
];
|
||||
return parseInt(_calday[n - 1]);
|
||||
},
|
||||
/**
|
||||
* 传入农历数字月份返回汉语通俗表示法
|
||||
* @param lunar month
|
||||
* @return Cn string
|
||||
* @eg:var cnMonth = calendar.toChinaMonth(12) ;//cnMonth='腊月'
|
||||
*/
|
||||
toChinaMonth: function(m) {
|
||||
if (m > 12 || m < 1) {
|
||||
return -1;
|
||||
}
|
||||
var s = this.nStr3[m - 1];
|
||||
s += "月";
|
||||
return s;
|
||||
},
|
||||
/**
|
||||
* 传入农历日期数字返回汉字表示法
|
||||
* @param lunar day
|
||||
* @return Cn string
|
||||
* @eg:var cnDay = calendar.toChinaDay(21) ;//cnMonth='廿一'
|
||||
*/
|
||||
toChinaDay: function(d) {
|
||||
var s;
|
||||
switch (d) {
|
||||
case 10:
|
||||
s = "初十";
|
||||
break;
|
||||
case 20:
|
||||
s = "二十";
|
||||
break;
|
||||
case 30:
|
||||
s = "三十";
|
||||
break;
|
||||
default:
|
||||
s = this.nStr2[Math.floor(d / 10)];
|
||||
s += this.nStr1[d % 10];
|
||||
}
|
||||
return s;
|
||||
},
|
||||
/**
|
||||
* 年份转生肖[!仅能大致转换] => 精确划分生肖分界线是“立春”
|
||||
* @param y year
|
||||
* @return Cn string
|
||||
* @eg:var animal = calendar.getAnimal(1987) ;//animal='兔'
|
||||
*/
|
||||
getAnimal: function(y) {
|
||||
return this.Animals[(y - 4) % 12];
|
||||
},
|
||||
/**
|
||||
* 传入阳历年月日获得详细的公历、农历object信息 <=>JSON
|
||||
* @param y solar year
|
||||
* @param m solar month
|
||||
* @param d solar day
|
||||
* @return JSON object
|
||||
* @eg:console.log(calendar.solar2lunar(1987,11,01));
|
||||
*/
|
||||
solar2lunar: function(y, m, d) {
|
||||
if (y < 1900 || y > 2100) {
|
||||
return -1;
|
||||
}
|
||||
if (y == 1900 && m == 1 && d < 31) {
|
||||
return -1;
|
||||
}
|
||||
if (!y) {
|
||||
var objDate = /* @__PURE__ */ new Date();
|
||||
} else {
|
||||
var objDate = new Date(y, parseInt(m) - 1, d);
|
||||
}
|
||||
var i;
|
||||
var leap = 0;
|
||||
var temp = 0;
|
||||
var y = objDate.getFullYear();
|
||||
var m = objDate.getMonth() + 1;
|
||||
var d = objDate.getDate();
|
||||
var offset = (Date.UTC(objDate.getFullYear(), objDate.getMonth(), objDate.getDate()) - Date.UTC(1900, 0, 31)) / 864e5;
|
||||
for (i = 1900; i < 2101 && offset > 0; i++) {
|
||||
temp = this.lYearDays(i);
|
||||
offset -= temp;
|
||||
}
|
||||
if (offset < 0) {
|
||||
offset += temp;
|
||||
i--;
|
||||
}
|
||||
var isTodayObj = /* @__PURE__ */ new Date();
|
||||
var isToday = false;
|
||||
if (isTodayObj.getFullYear() == y && isTodayObj.getMonth() + 1 == m && isTodayObj.getDate() == d) {
|
||||
isToday = true;
|
||||
}
|
||||
var nWeek = objDate.getDay();
|
||||
var cWeek = this.nStr1[nWeek];
|
||||
if (nWeek == 0) {
|
||||
nWeek = 7;
|
||||
}
|
||||
var year = i;
|
||||
var leap = this.leapMonth(i);
|
||||
var isLeap = false;
|
||||
for (i = 1; i < 13 && offset > 0; i++) {
|
||||
if (leap > 0 && i == leap + 1 && isLeap == false) {
|
||||
--i;
|
||||
isLeap = true;
|
||||
temp = this.leapDays(year);
|
||||
} else {
|
||||
temp = this.monthDays(year, i);
|
||||
}
|
||||
if (isLeap == true && i == leap + 1) {
|
||||
isLeap = false;
|
||||
}
|
||||
offset -= temp;
|
||||
}
|
||||
if (offset == 0 && leap > 0 && i == leap + 1) {
|
||||
if (isLeap) {
|
||||
isLeap = false;
|
||||
} else {
|
||||
isLeap = true;
|
||||
--i;
|
||||
}
|
||||
}
|
||||
if (offset < 0) {
|
||||
offset += temp;
|
||||
--i;
|
||||
}
|
||||
var month = i;
|
||||
var day = offset + 1;
|
||||
var sm = m - 1;
|
||||
var gzY = this.toGanZhiYear(year);
|
||||
var firstNode = this.getTerm(y, m * 2 - 1);
|
||||
var secondNode = this.getTerm(y, m * 2);
|
||||
var gzM = this.toGanZhi((y - 1900) * 12 + m + 11);
|
||||
if (d >= firstNode) {
|
||||
gzM = this.toGanZhi((y - 1900) * 12 + m + 12);
|
||||
}
|
||||
var isTerm = false;
|
||||
var Term = null;
|
||||
if (firstNode == d) {
|
||||
isTerm = true;
|
||||
Term = this.solarTerm[m * 2 - 2];
|
||||
}
|
||||
if (secondNode == d) {
|
||||
isTerm = true;
|
||||
Term = this.solarTerm[m * 2 - 1];
|
||||
}
|
||||
var dayCyclical = Date.UTC(y, sm, 1, 0, 0, 0, 0) / 864e5 + 25567 + 10;
|
||||
var gzD = this.toGanZhi(dayCyclical + d - 1);
|
||||
var astro = this.toAstro(m, d);
|
||||
return { "lYear": year, "lMonth": month, "lDay": day, "Animal": this.getAnimal(year), "IMonthCn": (isLeap ? "闰" : "") + this.toChinaMonth(month), "IDayCn": this.toChinaDay(day), "cYear": y, "cMonth": m, "cDay": d, "gzYear": gzY, "gzMonth": gzM, "gzDay": gzD, "isToday": isToday, "isLeap": isLeap, "nWeek": nWeek, "ncWeek": "星期" + cWeek, "isTerm": isTerm, "Term": Term, "astro": astro };
|
||||
},
|
||||
/**
|
||||
* 传入农历年月日以及传入的月份是否闰月获得详细的公历、农历object信息 <=>JSON
|
||||
* @param y lunar year
|
||||
* @param m lunar month
|
||||
* @param d lunar day
|
||||
* @param isLeapMonth lunar month is leap or not.[如果是农历闰月第四个参数赋值true即可]
|
||||
* @return JSON object
|
||||
* @eg:console.log(calendar.lunar2solar(1987,9,10));
|
||||
*/
|
||||
lunar2solar: function(y, m, d, isLeapMonth) {
|
||||
var isLeapMonth = !!isLeapMonth;
|
||||
var leapMonth = this.leapMonth(y);
|
||||
this.leapDays(y);
|
||||
if (isLeapMonth && leapMonth != m) {
|
||||
return -1;
|
||||
}
|
||||
if (y == 2100 && m == 12 && d > 1 || y == 1900 && m == 1 && d < 31) {
|
||||
return -1;
|
||||
}
|
||||
var day = this.monthDays(y, m);
|
||||
var _day = day;
|
||||
if (isLeapMonth) {
|
||||
_day = this.leapDays(y, m);
|
||||
}
|
||||
if (y < 1900 || y > 2100 || d > _day) {
|
||||
return -1;
|
||||
}
|
||||
var offset = 0;
|
||||
for (var i = 1900; i < y; i++) {
|
||||
offset += this.lYearDays(i);
|
||||
}
|
||||
var leap = 0;
|
||||
var isAdd = false;
|
||||
for (var i = 1; i < m; i++) {
|
||||
leap = this.leapMonth(y);
|
||||
if (!isAdd) {
|
||||
if (leap <= i && leap > 0) {
|
||||
offset += this.leapDays(y);
|
||||
isAdd = true;
|
||||
}
|
||||
}
|
||||
offset += this.monthDays(y, i);
|
||||
}
|
||||
if (isLeapMonth) {
|
||||
offset += day;
|
||||
}
|
||||
var stmap = Date.UTC(1900, 1, 30, 0, 0, 0);
|
||||
var calObj = new Date((offset + d - 31) * 864e5 + stmap);
|
||||
var cY = calObj.getUTCFullYear();
|
||||
var cM = calObj.getUTCMonth() + 1;
|
||||
var cD = calObj.getUTCDate();
|
||||
return this.solar2lunar(cY, cM, cD);
|
||||
}
|
||||
};
|
||||
exports.Calendar = Calendar;
|
||||
102
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/util/route.js
vendored
Normal file
102
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/util/route.js
vendored
Normal file
@@ -0,0 +1,102 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../../common/vendor.js");
|
||||
const uni_modules_uviewPlus_libs_function_index = require("../function/index.js");
|
||||
class Router {
|
||||
constructor() {
|
||||
this.config = {
|
||||
type: "navigateTo",
|
||||
url: "",
|
||||
delta: 1,
|
||||
// navigateBack页面后退时,回退的层数
|
||||
params: {},
|
||||
// 传递的参数
|
||||
animationType: "pop-in",
|
||||
// 窗口动画,只在APP有效
|
||||
animationDuration: 300,
|
||||
// 窗口动画持续时间,单位毫秒,只在APP有效
|
||||
intercept: false
|
||||
// 是否需要拦截
|
||||
};
|
||||
this.route = this.route.bind(this);
|
||||
}
|
||||
// 判断url前面是否有"/",如果没有则加上,否则无法跳转
|
||||
addRootPath(url) {
|
||||
return url[0] === "/" ? url : `/${url}`;
|
||||
}
|
||||
// 整合路由参数
|
||||
mixinParam(url, params) {
|
||||
url = url && this.addRootPath(url);
|
||||
let query = "";
|
||||
if (/.*\/.*\?.*=.*/.test(url)) {
|
||||
query = uni_modules_uviewPlus_libs_function_index.queryParams(params, false);
|
||||
return url += `&${query}`;
|
||||
}
|
||||
query = uni_modules_uviewPlus_libs_function_index.queryParams(params);
|
||||
return url += query;
|
||||
}
|
||||
// 对外的方法名称
|
||||
async route(options = {}, params = {}) {
|
||||
let mergeConfig = {};
|
||||
if (typeof options === "string") {
|
||||
mergeConfig.url = this.mixinParam(options, params);
|
||||
mergeConfig.type = "navigateTo";
|
||||
} else {
|
||||
mergeConfig = uni_modules_uviewPlus_libs_function_index.deepMerge(this.config, options);
|
||||
mergeConfig.url = this.mixinParam(options.url, options.params);
|
||||
}
|
||||
if (mergeConfig.url === uni_modules_uviewPlus_libs_function_index.page())
|
||||
return;
|
||||
if (params.intercept) {
|
||||
this.config.intercept = params.intercept;
|
||||
}
|
||||
mergeConfig.params = params;
|
||||
mergeConfig = uni_modules_uviewPlus_libs_function_index.deepMerge(this.config, mergeConfig);
|
||||
if (typeof common_vendor.index.$u.routeIntercept === "function") {
|
||||
const isNext = await new Promise((resolve, reject) => {
|
||||
common_vendor.index.$u.routeIntercept(mergeConfig, resolve);
|
||||
});
|
||||
isNext && this.openPage(mergeConfig);
|
||||
} else {
|
||||
this.openPage(mergeConfig);
|
||||
}
|
||||
}
|
||||
// 执行路由跳转
|
||||
openPage(config) {
|
||||
const {
|
||||
url,
|
||||
type,
|
||||
delta,
|
||||
animationType,
|
||||
animationDuration
|
||||
} = config;
|
||||
if (config.type == "navigateTo" || config.type == "to") {
|
||||
common_vendor.index.navigateTo({
|
||||
url,
|
||||
animationType,
|
||||
animationDuration
|
||||
});
|
||||
}
|
||||
if (config.type == "redirectTo" || config.type == "redirect") {
|
||||
common_vendor.index.redirectTo({
|
||||
url
|
||||
});
|
||||
}
|
||||
if (config.type == "switchTab" || config.type == "tab") {
|
||||
common_vendor.index.switchTab({
|
||||
url
|
||||
});
|
||||
}
|
||||
if (config.type == "reLaunch" || config.type == "launch") {
|
||||
common_vendor.index.reLaunch({
|
||||
url
|
||||
});
|
||||
}
|
||||
if (config.type == "navigateBack" || config.type == "back") {
|
||||
common_vendor.index.navigateBack({
|
||||
delta
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
const route = new Router().route;
|
||||
exports.route = route;
|
||||
5
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/vue.js
vendored
Normal file
5
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/vue.js
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
"use strict";
|
||||
const defineMixin = (options) => {
|
||||
return options;
|
||||
};
|
||||
exports.defineMixin = defineMixin;
|
||||
Reference in New Issue
Block a user