diff --git a/unpackage/dist/dev/mp-weixin/app.js b/unpackage/dist/dev/mp-weixin/app.js new file mode 100644 index 0000000..8c3aa5b --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/app.js @@ -0,0 +1,61 @@ +"use strict"; +Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" }); +const common_vendor = require("./common/vendor.js"); +if (!Math) { + "./pages/index/index.js"; + "./pages/publish/publish.js"; + "./pages/certImg/certImg.js"; + "./pages/sickList/sickList.js"; + "./pages/videoList/videoList.js"; + "./pages/login/login.js"; + "./pages/caseTalk/caseTalk.js"; + "./pages/specialList/specialList.js"; + "./pages/certList/certList.js"; + "./pages/my/my.js"; + "./pages/myJoin/myJoin.js"; + "./pages/myCollect/myCollect.js"; + "./pages/detail/detail.js"; + "./pages/search/search.js"; + "./pages/web/web.js"; + "./pages/searchList/searchList.js"; + "./pages/case/case.js"; + "./pages/apply/apply.js"; + "./pages/register/register.js"; + "./pages_case/index/index.js"; +} +const _sfc_main = { + __name: "App", + setup(__props) { + common_vendor.onLaunch(() => { + common_vendor.index.__f__("log", "at App.vue:4", "App Launch"); + }); + common_vendor.onShow(() => { + common_vendor.index.__f__("log", "at App.vue:7", "App Show"); + }); + common_vendor.onHide(() => { + common_vendor.index.__f__("log", "at App.vue:11", "App Hide"); + }); + return () => { + }; + } +}; +function createApp() { + const app = common_vendor.createSSRApp(_sfc_main); + app.use(common_vendor.uviewPlus, async () => { + return { + options: { + // 修改$u.config对象的属性 + config: { + // 修改默认单位为rpx,相当于执行 uni.$u.config.unit = 'rpx' + unit: "rpx" + } + } + }; + }); + return { + app + }; +} +createApp().app.mount("#app"); +exports.createApp = createApp; +//# sourceMappingURL=../.sourcemap/mp-weixin/app.js.map diff --git a/unpackage/dist/dev/mp-weixin/app.json b/unpackage/dist/dev/mp-weixin/app.json new file mode 100644 index 0000000..4aee9ae --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/app.json @@ -0,0 +1,44 @@ +{ + "pages": [ + "pages/index/index", + "pages/publish/publish", + "pages/certImg/certImg", + "pages/sickList/sickList", + "pages/videoList/videoList", + "pages/login/login", + "pages/caseTalk/caseTalk", + "pages/specialList/specialList", + "pages/certList/certList", + "pages/my/my", + "pages/myJoin/myJoin", + "pages/myCollect/myCollect", + "pages/detail/detail", + "pages/search/search", + "pages/web/web", + "pages/searchList/searchList", + "pages/case/case", + "pages/apply/apply", + "pages/register/register" + ], + "subPackages": [ + { + "root": "pages_case", + "pages": [ + "index/index" + ] + } + ], + "window": { + "navigationBarTextStyle": "black", + "navigationBarTitleText": "uni-app", + "navigationBarBackgroundColor": "#F8F8F8", + "backgroundColor": "#F8F8F8" + }, + "plugins": { + "polyv-player": { + "version": "1.9.0", + "provider": "wx4a350a258a6f7876" + } + }, + "usingComponents": {} +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/components/backDetailNav/backDetailNav.js b/unpackage/dist/dev/mp-weixin/components/backDetailNav/backDetailNav.js new file mode 100644 index 0000000..93dca6c --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/components/backDetailNav/backDetailNav.js @@ -0,0 +1,89 @@ +"use strict"; +const common_vendor = require("../../common/vendor.js"); +const utils_navTo = require("../../utils/navTo.js"); +const common_assets = require("../../common/assets.js"); +if (!Array) { + const _easycom_u_icon2 = common_vendor.resolveComponent("u-icon"); + const _easycom_up__image2 = common_vendor.resolveComponent("up--image"); + (_easycom_u_icon2 + _easycom_up__image2)(); +} +const _easycom_u_icon = () => "../../node-modules/uview-plus/components/u-icon/u-icon.js"; +const _easycom_up__image = () => "../../node-modules/uview-plus/components/u--image/u--image.js"; +if (!Math) { + (_easycom_u_icon + _easycom_up__image)(); +} +const _sfc_main = { + __name: "backDetailNav", + props: { + navName: { + type: String, + default: "我的" + } + }, + setup(__props) { + const props = __props; + const useImg = common_vendor.ref(""); + const goBack = () => { + common_vendor.index.navigateBack({ + delta: 1 + }); + }; + const goHome = () => { + common_vendor.index.__f__("log", "at components/backDetailNav/backDetailNav.vue:62", props.navName); + if (props.navName == "肝胆相照病例交流园地") { + common_vendor.index.reLaunch({ + url: "/pages/caseTalk/caseTalk" + }); + } else { + common_vendor.index.reLaunch({ + url: "/pages/index/index" + }); + } + }; + const goMy = () => { + utils_navTo.navTo({ + url: "/pages/my/my" + }); + }; + common_vendor.onMounted(() => { + let userInfo = common_vendor.index.getStorageSync("userInfo"); + if (userInfo && userInfo.avatar) { + useImg.value = userInfo.avatar; + } + }); + return (_ctx, _cache) => { + return { + a: common_vendor.p({ + name: "arrow-left", + color: "#000", + size: "24" + }), + b: common_vendor.o(goBack), + c: common_vendor.p({ + src: common_vendor.unref(common_assets.logoImg), + width: "62rpx", + height: "62rpx", + radius: "50%" + }), + d: common_vendor.o(goHome), + e: common_vendor.t(__props.navName), + f: common_vendor.p({ + src: common_vendor.unref(common_assets.navbg), + width: "100rpx", + height: "31rpx" + }), + g: common_vendor.o(goHome), + h: common_vendor.p({ + src: useImg.value ? useImg.value : common_vendor.unref(common_assets.headImg), + width: "62rpx", + height: "62rpx", + radius: "50%" + }), + i: common_vendor.o(goMy) + }; + }; + } +}; +const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-5cef096a"]]); +wx.createComponent(Component); +//# sourceMappingURL=../../../.sourcemap/mp-weixin/components/backDetailNav/backDetailNav.js.map diff --git a/unpackage/dist/dev/mp-weixin/components/backDetailNav/backDetailNav.json b/unpackage/dist/dev/mp-weixin/components/backDetailNav/backDetailNav.json new file mode 100644 index 0000000..36c87d5 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/components/backDetailNav/backDetailNav.json @@ -0,0 +1,7 @@ +{ + "component": true, + "usingComponents": { + "u-icon": "../../node-modules/uview-plus/components/u-icon/u-icon", + "up--image": "../../node-modules/uview-plus/components/u--image/u--image" + } +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/components/backDetailNav/backDetailNav.wxml b/unpackage/dist/dev/mp-weixin/components/backDetailNav/backDetailNav.wxml new file mode 100644 index 0000000..4c3356e --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/components/backDetailNav/backDetailNav.wxml @@ -0,0 +1 @@ +{{e}} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/components/backDetailNav/backDetailNav.wxss b/unpackage/dist/dev/mp-weixin/components/backDetailNav/backDetailNav.wxss new file mode 100644 index 0000000..5f43567 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/components/backDetailNav/backDetailNav.wxss @@ -0,0 +1,91 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ +.navbox.data-v-5cef096a { + padding-bottom: 20rpx; + background-color: #f9fafb; + position: relative; + height: 200rpx; + background: radial-gradient(60% 90% at 4% 2%, #43c9c3 0%, rgba(255, 255, 255, 0) 100%); +} +.bg.data-v-5cef096a { + z-index: 0; + top: 0; + bottom: 0; + width: 100%; + position: absolute; + background: radial-gradient(43% 90% at 84% 6%, #ffd6c9 0%, rgba(255, 255, 255, 0) 100%); +} +.namebox.data-v-5cef096a { + padding-top: 102rpx; + margin: 0rpx 30rpx 0rpx; + display: flex; + align-items: center; + display: flex; + align-items: center; +} +.namebox .logo.data-v-5cef096a { + margin-left: 35rpx; +} +.namebox .back.data-v-5cef096a { + position: absolute; + left: 0; +} +.namebox .user.data-v-5cef096a { + margin-left: 55rpx; +} +.namebox .name.data-v-5cef096a { + margin-left: 16rpx; + font-size: 30rpx; + color: #111827; + position: relative; +} +.namebox .name .navbg.data-v-5cef096a { + position: absolute; + z-index: -1; + top: 10rpx; + left: 18rpx; +} +.search.data-v-5cef096a { + margin: 40rpx 30rpx 0rpx; + display: flex; + align-items: center; + justify-content: space-between; +} +.search .searchwrap.data-v-5cef096a { + display: flex; + align-items: center; + flex: 1; + padding-left: 28rpx; + margin-right: 23rpx; + height: 80rpx; + background: #fbfbfb; + box-shadow: 0px 4rpx 10rpx 0px rgba(153, 153, 153, 0.5); + border-radius: 40rpx; +} +.search .searchwrap .ipt.data-v-5cef096a { + margin-left: 15rpx; + font-size: 28rpx; +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/components/backLogoNav/backLogoNav.js b/unpackage/dist/dev/mp-weixin/components/backLogoNav/backLogoNav.js new file mode 100644 index 0000000..3f5f92a --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/components/backLogoNav/backLogoNav.js @@ -0,0 +1,54 @@ +"use strict"; +const common_vendor = require("../../common/vendor.js"); +const common_assets = require("../../common/assets.js"); +if (!Array) { + const _easycom_u_icon2 = common_vendor.resolveComponent("u-icon"); + const _easycom_up__image2 = common_vendor.resolveComponent("up--image"); + (_easycom_u_icon2 + _easycom_up__image2)(); +} +const _easycom_u_icon = () => "../../node-modules/uview-plus/components/u-icon/u-icon.js"; +const _easycom_up__image = () => "../../node-modules/uview-plus/components/u--image/u--image.js"; +if (!Math) { + (_easycom_u_icon + _easycom_up__image)(); +} +const _sfc_main = { + __name: "backLogoNav", + props: { + navName: { + type: String, + default: "我的" + } + }, + setup(__props) { + const goBack = () => { + common_vendor.index.navigateBack({ + delta: 1 + }); + }; + return (_ctx, _cache) => { + return { + a: common_vendor.p({ + name: "arrow-left", + color: "#000", + size: "24" + }), + b: common_vendor.o(goBack), + c: common_vendor.p({ + src: common_vendor.unref(common_assets.logoImg), + width: "62rpx", + height: "62rpx", + radius: "50%" + }), + d: common_vendor.t(__props.navName), + e: common_vendor.p({ + src: common_vendor.unref(common_assets.navbg), + width: "100rpx", + height: "31rpx" + }) + }; + }; + } +}; +const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-8850a534"]]); +wx.createComponent(Component); +//# sourceMappingURL=../../../.sourcemap/mp-weixin/components/backLogoNav/backLogoNav.js.map diff --git a/unpackage/dist/dev/mp-weixin/components/backLogoNav/backLogoNav.json b/unpackage/dist/dev/mp-weixin/components/backLogoNav/backLogoNav.json new file mode 100644 index 0000000..36c87d5 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/components/backLogoNav/backLogoNav.json @@ -0,0 +1,7 @@ +{ + "component": true, + "usingComponents": { + "u-icon": "../../node-modules/uview-plus/components/u-icon/u-icon", + "up--image": "../../node-modules/uview-plus/components/u--image/u--image" + } +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/components/backLogoNav/backLogoNav.wxml b/unpackage/dist/dev/mp-weixin/components/backLogoNav/backLogoNav.wxml new file mode 100644 index 0000000..afb6fe0 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/components/backLogoNav/backLogoNav.wxml @@ -0,0 +1 @@ +{{d}} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/components/backLogoNav/backLogoNav.wxss b/unpackage/dist/dev/mp-weixin/components/backLogoNav/backLogoNav.wxss new file mode 100644 index 0000000..66e689b --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/components/backLogoNav/backLogoNav.wxss @@ -0,0 +1,88 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ +.navbox.data-v-8850a534 { + padding-bottom: 20rpx; + background-color: #f9fafb; + position: relative; + height: 200rpx; + background: radial-gradient(60% 90% at 4% 2%, #43c9c3 0%, rgba(255, 255, 255, 0) 100%); +} +.bg.data-v-8850a534 { + z-index: 0; + top: 0; + bottom: 0; + width: 100%; + position: absolute; + background: radial-gradient(43% 90% at 84% 6%, #ffd6c9 0%, rgba(255, 255, 255, 0) 100%); +} +.namebox.data-v-8850a534 { + padding-top: 102rpx; + margin: 0rpx 30rpx 0rpx; + display: flex; + align-items: center; + display: flex; + align-items: center; +} +.namebox .logo.data-v-8850a534 { + margin-left: 35rpx; +} +.namebox .back.data-v-8850a534 { + position: absolute; + left: 0; +} +.namebox .name.data-v-8850a534 { + margin-left: 16rpx; + font-size: 30rpx; + color: #111827; + position: relative; +} +.namebox .name .navbg.data-v-8850a534 { + position: absolute; + z-index: -1; + top: 10rpx; + left: 18rpx; +} +.search.data-v-8850a534 { + margin: 40rpx 30rpx 0rpx; + display: flex; + align-items: center; + justify-content: space-between; +} +.search .searchwrap.data-v-8850a534 { + display: flex; + align-items: center; + flex: 1; + padding-left: 28rpx; + margin-right: 23rpx; + height: 80rpx; + background: #fbfbfb; + box-shadow: 0px 4rpx 10rpx 0px rgba(153, 153, 153, 0.5); + border-radius: 40rpx; +} +.search .searchwrap .ipt.data-v-8850a534 { + margin-left: 15rpx; + font-size: 28rpx; +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/components/backNav/backNav.js b/unpackage/dist/dev/mp-weixin/components/backNav/backNav.js new file mode 100644 index 0000000..de698b3 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/components/backNav/backNav.js @@ -0,0 +1,40 @@ +"use strict"; +const common_vendor = require("../../common/vendor.js"); +if (!Array) { + const _easycom_u_icon2 = common_vendor.resolveComponent("u-icon"); + _easycom_u_icon2(); +} +const _easycom_u_icon = () => "../../node-modules/uview-plus/components/u-icon/u-icon.js"; +if (!Math) { + _easycom_u_icon(); +} +const _sfc_main = { + __name: "backNav", + props: { + navName: { + type: String, + default: "我的" + } + }, + setup(__props) { + const goBack = () => { + common_vendor.index.navigateBack({ + delta: 1 + }); + }; + return (_ctx, _cache) => { + return { + a: common_vendor.p({ + name: "arrow-left", + color: "#000", + size: "24" + }), + b: common_vendor.o(goBack), + c: common_vendor.t(__props.navName) + }; + }; + } +}; +const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-62c96af9"]]); +wx.createComponent(Component); +//# sourceMappingURL=../../../.sourcemap/mp-weixin/components/backNav/backNav.js.map diff --git a/unpackage/dist/dev/mp-weixin/components/backNav/backNav.json b/unpackage/dist/dev/mp-weixin/components/backNav/backNav.json new file mode 100644 index 0000000..cc491b0 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/components/backNav/backNav.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "u-icon": "../../node-modules/uview-plus/components/u-icon/u-icon" + } +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/components/backNav/backNav.wxml b/unpackage/dist/dev/mp-weixin/components/backNav/backNav.wxml new file mode 100644 index 0000000..e070231 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/components/backNav/backNav.wxml @@ -0,0 +1 @@ +{{c}} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/components/backNav/backNav.wxss b/unpackage/dist/dev/mp-weixin/components/backNav/backNav.wxss new file mode 100644 index 0000000..815d4a6 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/components/backNav/backNav.wxss @@ -0,0 +1,77 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ +.navbox.data-v-62c96af9 { + padding-bottom: 20rpx; + background-color: #f9fafb; + position: relative; + height: 200rpx; + background: radial-gradient(60% 90% at 4% 2%, #43c9c3 0%, rgba(255, 255, 255, 0) 100%); +} +.navbox .bg.data-v-62c96af9 { + z-index: 0; + top: 0; + bottom: 0; + width: 100%; + position: absolute; + background: radial-gradient(43% 90% at 84% 6%, #ffd6c9 0%, rgba(255, 255, 255, 0) 100%); +} +.navbox .namebox.data-v-62c96af9 { + padding-top: 102rpx; + justify-content: center; + margin: 0rpx 30rpx 0rpx; + position: relative; + display: flex; +} +.navbox .namebox .back.data-v-62c96af9 { + position: absolute; + left: 0; +} +.navbox .namebox .name.data-v-62c96af9 { + margin-left: 16rpx; + font-size: 30rpx; + color: #111827; +} +.navbox .search.data-v-62c96af9 { + margin: 40rpx 30rpx 0rpx; + display: flex; + align-items: center; + justify-content: space-between; +} +.navbox .search .searchwrap.data-v-62c96af9 { + display: flex; + align-items: center; + flex: 1; + padding-left: 28rpx; + margin-right: 23rpx; + height: 80rpx; + background: #fbfbfb; + box-shadow: 0px 4rpx 10rpx 0px rgba(153, 153, 153, 0.5); + border-radius: 40rpx; +} +.navbox .search .searchwrap .ipt.data-v-62c96af9 { + margin-left: 15rpx; + font-size: 28rpx; +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/components/navBar/navBar.js b/unpackage/dist/dev/mp-weixin/components/navBar/navBar.js new file mode 100644 index 0000000..11ebb0a --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/components/navBar/navBar.js @@ -0,0 +1,103 @@ +"use strict"; +const common_vendor = require("../../common/vendor.js"); +const common_assets = require("../../common/assets.js"); +const utils_navTo = require("../../utils/navTo.js"); +if (!Array) { + const _easycom_up__image2 = common_vendor.resolveComponent("up--image"); + const _easycom_up_icon2 = common_vendor.resolveComponent("up-icon"); + (_easycom_up__image2 + _easycom_up_icon2)(); +} +const _easycom_up__image = () => "../../node-modules/uview-plus/components/u--image/u--image.js"; +const _easycom_up_icon = () => "../../node-modules/uview-plus/components/u-icon/u-icon.js"; +if (!Math) { + (_easycom_up__image + _easycom_up_icon)(); +} +const _sfc_main = { + __name: "navBar", + props: { + searchWord: { + type: String, + default: "" + }, + type: { + type: String, + default: "home" + }, + navName: { + type: String, + default: "肝胆相照临床病例库" + } + }, + emits: ["changeWord"], + setup(__props, { emit: __emit }) { + const userHeadImg = common_vendor.ref(""); + const keyWord = common_vendor.ref(""); + const props = __props; + const placeholder = common_vendor.ref("输入疾病名称、标题、作者搜索"); + common_vendor.watch(() => props.type, (newVal) => { + }, { immediate: true }); + common_vendor.watch(() => props.searchWord, (newVal) => { + keyWord.value = newVal; + }); + const goMy = () => { + utils_navTo.navTo({ + url: "/pages/my/my" + }); + }; + const search = () => { + if (props.type == "home") { + utils_navTo.navTo({ + url: `/pages/search/search?keyWord=${keyWord.value}&from=home` + }); + } else if (props.type == "caseTalk") { + utils_navTo.navTo({ + url: `/pages/specialList/specialList?keyWord=${keyWord.value}&from=talkHome` + }); + } + }; + common_vendor.onLoad(() => { + let userInfo = common_vendor.index.getStorageSync("userInfo"); + if (userInfo && userInfo.avatar) { + userHeadImg.value = userInfo.avatar; + } else { + userHeadImg.value = common_assets.headImg; + } + }); + return (_ctx, _cache) => { + return { + a: common_vendor.p({ + src: common_vendor.unref(common_assets.logoImg), + width: "62rpx", + height: "62rpx", + radius: "50%" + }), + b: common_vendor.t(__props.navName), + c: common_vendor.p({ + src: common_vendor.unref(common_assets.navbg), + width: "100rpx", + height: "31rpx" + }), + d: placeholder.value, + e: keyWord.value, + f: common_vendor.o(($event) => keyWord.value = $event.detail.value), + g: common_vendor.o(search), + h: common_vendor.p({ + name: "search", + size: "26", + color: "#999" + }), + i: common_vendor.o(goMy), + j: common_vendor.p({ + src: userHeadImg.value, + mode: "widthFix", + width: "62rpx", + height: "62rpx", + radius: "50%" + }) + }; + }; + } +}; +const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-fba290dc"]]); +wx.createComponent(Component); +//# sourceMappingURL=../../../.sourcemap/mp-weixin/components/navBar/navBar.js.map diff --git a/unpackage/dist/dev/mp-weixin/components/navBar/navBar.json b/unpackage/dist/dev/mp-weixin/components/navBar/navBar.json new file mode 100644 index 0000000..b625ded --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/components/navBar/navBar.json @@ -0,0 +1,7 @@ +{ + "component": true, + "usingComponents": { + "up--image": "../../node-modules/uview-plus/components/u--image/u--image", + "up-icon": "../../node-modules/uview-plus/components/u-icon/u-icon" + } +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/components/navBar/navBar.wxml b/unpackage/dist/dev/mp-weixin/components/navBar/navBar.wxml new file mode 100644 index 0000000..018aaf7 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/components/navBar/navBar.wxml @@ -0,0 +1 @@ +{{b}} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/components/navBar/navBar.wxss b/unpackage/dist/dev/mp-weixin/components/navBar/navBar.wxss new file mode 100644 index 0000000..10e7257 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/components/navBar/navBar.wxss @@ -0,0 +1,80 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ +.navbox.data-v-fba290dc { + padding-bottom: 20rpx; + background-color: #f9fafb; + position: relative; + background: radial-gradient(60% 90% at 4% 2%, #43c9c3 0%, rgba(255, 255, 255, 0) 100%); +} +.bg.data-v-fba290dc { + z-index: -1; + top: 0; + bottom: 0; + width: 100%; + position: absolute; + background: radial-gradient(43% 90% at 84% 6%, #ffd6c9 0%, rgba(255, 255, 255, 0) 100%); +} +.namebox.data-v-fba290dc { + padding-top: 102rpx; + margin: 0rpx 30rpx 0rpx; + display: flex; + align-items: center; +} +.namebox .name.data-v-fba290dc { + margin-left: 16rpx; + font-size: 30rpx; + color: #111827; + position: relative; +} +.namebox .name .navbg.data-v-fba290dc { + position: absolute; + z-index: -1; + top: 10rpx; + left: 18rpx; +} +.search.data-v-fba290dc { + margin: 40rpx 30rpx 0rpx; + display: flex; + align-items: center; + justify-content: space-between; +} +.search .searchwrap.data-v-fba290dc { + display: flex; + padding-right: 35rpx; + align-items: center; + flex: 1; + padding-left: 28rpx; + margin-right: 23rpx; + height: 80rpx; + background: #fbfbfb; + box-shadow: 0px 4rpx 10rpx 0px rgba(153, 153, 153, 0.5); + border-radius: 40rpx; +} +.search .searchwrap .ipt.data-v-fba290dc { + flex: 1; + margin-left: 15rpx; + font-size: 28rpx; +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/components/navBarSearch/navBarSearch.json b/unpackage/dist/dev/mp-weixin/components/navBarSearch/navBarSearch.json new file mode 100644 index 0000000..cddc74b --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/components/navBarSearch/navBarSearch.json @@ -0,0 +1,8 @@ +{ + "component": true, + "usingComponents": { + "u-icon": "../../node-modules/uview-plus/components/u-icon/u-icon", + "up--image": "../../node-modules/uview-plus/components/u--image/u--image", + "up-icon": "../../node-modules/uview-plus/components/u-icon/u-icon" + } +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/components/navBarSearch/navBarSearch.wxml b/unpackage/dist/dev/mp-weixin/components/navBarSearch/navBarSearch.wxml new file mode 100644 index 0000000..d3ec279 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/components/navBarSearch/navBarSearch.wxml @@ -0,0 +1 @@ +{{d}} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/components/navBarSearch/navBarSearch.wxss b/unpackage/dist/dev/mp-weixin/components/navBarSearch/navBarSearch.wxss new file mode 100644 index 0000000..0552eab --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/components/navBarSearch/navBarSearch.wxss @@ -0,0 +1,87 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ +.navbox.data-v-4eb3cf28 { + padding-bottom: 20rpx; + background-color: #f9fafb; + position: relative; + background: radial-gradient(60% 90% at 4% 2%, #43c9c3 0%, rgba(255, 255, 255, 0) 100%); +} +.bg.data-v-4eb3cf28 { + z-index: -1; + top: 0; + bottom: 0; + width: 100%; + position: absolute; + background: radial-gradient(43% 90% at 84% 6%, #ffd6c9 0%, rgba(255, 255, 255, 0) 100%); +} +.data-v-4eb3cf28 .u-image { + background: none !important; +} +.namebox.data-v-4eb3cf28 { + padding-top: 102rpx; + margin: 0rpx 30rpx 0rpx; + display: flex; + align-items: center; +} +.namebox .logo.data-v-4eb3cf28 { + margin-left: 35rpx; +} +.namebox .name.data-v-4eb3cf28 { + margin-left: 16rpx; + font-size: 30rpx; + margin-right: 200rpx; + color: #111827; + position: relative; +} +.namebox .name .navbg.data-v-4eb3cf28 { + position: absolute; + z-index: -1; + top: 10rpx; + left: 18rpx; +} +.search.data-v-4eb3cf28 { + margin: 40rpx 30rpx 0rpx; + display: flex; + align-items: center; + justify-content: space-between; +} +.search .searchwrap.data-v-4eb3cf28 { + display: flex; + padding-right: 35rpx; + align-items: center; + flex: 1; + padding-left: 28rpx; + margin-right: 23rpx; + height: 80rpx; + background: #fbfbfb; + box-shadow: 0px 4rpx 10rpx 0px rgba(153, 153, 153, 0.5); + border-radius: 40rpx; +} +.search .searchwrap .ipt.data-v-4eb3cf28 { + flex: 1; + margin-left: 15rpx; + font-size: 28rpx; +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/components/pEditor/pEditor.json b/unpackage/dist/dev/mp-weixin/components/pEditor/pEditor.json new file mode 100644 index 0000000..0220579 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/components/pEditor/pEditor.json @@ -0,0 +1,10 @@ +{ + "component": true, + "usingComponents": { + "u-icon": "../../node-modules/uview-plus/components/u-icon/u-icon", + "up--image": "../../node-modules/uview-plus/components/u--image/u--image", + "up-icon": "../../node-modules/uview-plus/components/u-icon/u-icon", + "up-popup": "../../node-modules/uview-plus/components/u-popup/u-popup", + "sv-editor": "../../uni_modules/sv-editor/components/sv-editor/sv-editor" + } +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/components/tabBar/tabBar.js b/unpackage/dist/dev/mp-weixin/components/tabBar/tabBar.js new file mode 100644 index 0000000..4736485 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/components/tabBar/tabBar.js @@ -0,0 +1,72 @@ +"use strict"; +const common_vendor = require("../../common/vendor.js"); +const common_assets = require("../../common/assets.js"); +const utils_navTo = require("../../utils/navTo.js"); +if (!Array) { + const _easycom_up_tabbar_item2 = common_vendor.resolveComponent("up-tabbar-item"); + const _easycom_up_tabbar2 = common_vendor.resolveComponent("up-tabbar"); + (_easycom_up_tabbar_item2 + _easycom_up_tabbar2)(); +} +const _easycom_up_tabbar_item = () => "../../node-modules/uview-plus/components/u-tabbar-item/u-tabbar-item.js"; +const _easycom_up_tabbar = () => "../../node-modules/uview-plus/components/u-tabbar/u-tabbar.js"; +if (!Math) { + (_easycom_up_tabbar_item + _easycom_up_tabbar)(); +} +const _sfc_main = { + __name: "tabBar", + props: { + value: { + type: Number, + default: 0 + } + }, + setup(__props) { + const handleClick = (e) => { + if (e == 0) { + utils_navTo.navTo({ + url: "/pages/index/index" + }); + } else if (e == 1) { + utils_navTo.navTo({ + url: "/pages/case/case" + }); + } else if (e == 2) { + utils_navTo.navTo({ + url: "/pages/caseTalk/caseTalk" + }); + } + }; + return (_ctx, _cache) => { + return { + a: common_vendor.o(handleClick), + b: common_vendor.p({ + text: "临床病例库", + activeIcon: common_vendor.unref(common_assets.ku_on), + inactiveIcon: common_vendor.unref(common_assets.ku) + }), + c: common_vendor.o(handleClick), + d: common_vendor.p({ + text: "互动病例", + activeIcon: common_vendor.unref(common_assets.group_on), + inactiveIcon: common_vendor.unref(common_assets.group) + }), + e: common_vendor.o(handleClick), + f: common_vendor.p({ + text: "病例交流", + activeIcon: common_vendor.unref(common_assets.talk_on), + inactiveIcon: common_vendor.unref(common_assets.talk) + }), + g: common_vendor.p({ + value: __props.value, + fixed: true, + zIndex: 99, + placeholder: false, + activeColor: "#3CC7C0", + safeAreaInsetBottom: true + }) + }; + }; + } +}; +wx.createComponent(_sfc_main); +//# sourceMappingURL=../../../.sourcemap/mp-weixin/components/tabBar/tabBar.js.map diff --git a/unpackage/dist/dev/mp-weixin/components/tabBar/tabBar.json b/unpackage/dist/dev/mp-weixin/components/tabBar/tabBar.json new file mode 100644 index 0000000..1a6142b --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/components/tabBar/tabBar.json @@ -0,0 +1,7 @@ +{ + "component": true, + "usingComponents": { + "up-tabbar-item": "../../node-modules/uview-plus/components/u-tabbar-item/u-tabbar-item", + "up-tabbar": "../../node-modules/uview-plus/components/u-tabbar/u-tabbar" + } +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/components/tabBar/tabBar.wxml b/unpackage/dist/dev/mp-weixin/components/tabBar/tabBar.wxml new file mode 100644 index 0000000..194ed59 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/components/tabBar/tabBar.wxml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/components/tabBar/tabBar.wxss b/unpackage/dist/dev/mp-weixin/components/tabBar/tabBar.wxss new file mode 100644 index 0000000..998d2bd --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/components/tabBar/tabBar.wxss @@ -0,0 +1,35 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ +.u-page__item__slot-icon { + width: 47rpx; + height: 47rpx; +} +.u-tabbar__content__item-wrapper { + border-top: 2rpx solid #f3f4f6 !important; +} +.u-tabbar-item__text { + margin-bottom: 20rpx !important; +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u--image/u--image.js b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u--image/u--image.js new file mode 100644 index 0000000..75e9e56 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u--image/u--image.js @@ -0,0 +1,44 @@ +"use strict"; +const common_vendor = require("../../../../common/vendor.js"); +const uvImage = () => "../u-image/u-image.js"; +const _sfc_main = { + name: "u--image", + mixins: [common_vendor.mpMixin, common_vendor.props, common_vendor.mixin], + components: { + uvImage + }, + emits: ["click", "error", "load"] +}; +if (!Array) { + const _component_uvImage = common_vendor.resolveComponent("uvImage"); + _component_uvImage(); +} +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + return { + a: common_vendor.o(($event) => _ctx.$emit("click")), + b: common_vendor.o(($event) => _ctx.$emit("error")), + c: common_vendor.o(($event) => _ctx.$emit("load")), + d: common_vendor.p({ + src: _ctx.src, + mode: _ctx.mode, + width: _ctx.width, + height: _ctx.height, + shape: _ctx.shape, + radius: _ctx.radius, + lazyLoad: _ctx.lazyLoad, + showMenuByLongpress: _ctx.showMenuByLongpress, + loadingIcon: _ctx.loadingIcon, + errorIcon: _ctx.errorIcon, + showLoading: _ctx.showLoading, + showError: _ctx.showError, + fade: _ctx.fade, + webp: _ctx.webp, + duration: _ctx.duration, + bgColor: _ctx.bgColor, + customStyle: _ctx.customStyle + }) + }; +} +const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]); +wx.createComponent(Component); +//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/node-modules/uview-plus/components/u--image/u--image.js.map diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u--image/u--image.json b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u--image/u--image.json new file mode 100644 index 0000000..f108e38 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u--image/u--image.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "uv-image": "../u-image/u-image" + } +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u--image/u--image.wxml b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u--image/u--image.wxml new file mode 100644 index 0000000..7badfd0 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u--image/u--image.wxml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u--image/u--image.wxss b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u--image/u--image.wxss new file mode 100644 index 0000000..e69de29 diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u--textarea/u--textarea.js b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u--textarea/u--textarea.js new file mode 100644 index 0000000..a89c9c3 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u--textarea/u--textarea.js @@ -0,0 +1,48 @@ +"use strict"; +const common_vendor = require("../../../../common/vendor.js"); +const uvTextarea = () => "../u-textarea/u-textarea.js"; +const _sfc_main = { + name: "u--textarea", + mixins: [common_vendor.mpMixin, common_vendor.props$2, common_vendor.mixin], + components: { + uvTextarea + } +}; +if (!Array) { + const _component_uvTextarea = common_vendor.resolveComponent("uvTextarea"); + _component_uvTextarea(); +} +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + return { + a: common_vendor.o((e) => _ctx.$emit("input", e)), + b: common_vendor.o((e) => _ctx.$emit("update:modelValue", e)), + c: common_vendor.p({ + value: _ctx.value, + modelValue: _ctx.modelValue, + placeholder: _ctx.placeholder, + height: _ctx.height, + confirmType: _ctx.confirmType, + disabled: _ctx.disabled, + count: _ctx.count, + focus: _ctx.focus, + autoHeight: _ctx.autoHeight, + fixed: _ctx.fixed, + cursorSpacing: _ctx.cursorSpacing, + cursor: _ctx.cursor, + showConfirmBar: _ctx.showConfirmBar, + selectionStart: _ctx.selectionStart, + selectionEnd: _ctx.selectionEnd, + adjustPosition: _ctx.adjustPosition, + disableDefaultPadding: _ctx.disableDefaultPadding, + holdKeyboard: _ctx.holdKeyboard, + maxlength: _ctx.maxlength, + border: _ctx.border, + customStyle: _ctx.customStyle, + formatter: _ctx.formatter, + ignoreCompositionEvent: _ctx.ignoreCompositionEvent + }) + }; +} +const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]); +wx.createComponent(Component); +//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/node-modules/uview-plus/components/u--textarea/u--textarea.js.map diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u--textarea/u--textarea.json b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u--textarea/u--textarea.json new file mode 100644 index 0000000..c41ea35 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u--textarea/u--textarea.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "uv-textarea": "../u-textarea/u-textarea" + } +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u--textarea/u--textarea.wxml b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u--textarea/u--textarea.wxml new file mode 100644 index 0000000..9f640ae --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u--textarea/u--textarea.wxml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u--textarea/u--textarea.wxss b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u--textarea/u--textarea.wxss new file mode 100644 index 0000000..e69de29 diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-avatar/u-avatar.js b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-avatar/u-avatar.js new file mode 100644 index 0000000..11856c1 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-avatar/u-avatar.js @@ -0,0 +1,137 @@ +"use strict"; +const common_vendor = require("../../../../common/vendor.js"); +const base64Avatar = "data:image/jpg;base64,/9j/4QAYRXhpZgAASUkqAAgAAAAAAAAAAAAAAP/sABFEdWNreQABAAQAAAA8AAD/4QMraHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLwA8P3hwYWNrZXQgYmVnaW49Iu+7vyIgaWQ9Ilc1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCI/PiA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJBZG9iZSBYTVAgQ29yZSA1LjMtYzAxMSA2Ni4xNDU2NjEsIDIwMTIvMDIvMDYtMTQ6NTY6MjcgICAgICAgICI+IDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+IDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bXA6Q3JlYXRvclRvb2w9IkFkb2JlIFBob3Rvc2hvcCBDUzYgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjREMEQwRkY0RjgwNDExRUE5OTY2RDgxODY3NkJFODMxIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjREMEQwRkY1RjgwNDExRUE5OTY2RDgxODY3NkJFODMxIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NEQwRDBGRjJGODA0MTFFQTk5NjZEODE4Njc2QkU4MzEiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NEQwRDBGRjNGODA0MTFFQTk5NjZEODE4Njc2QkU4MzEiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz7/7gAOQWRvYmUAZMAAAAAB/9sAhAAGBAQEBQQGBQUGCQYFBgkLCAYGCAsMCgoLCgoMEAwMDAwMDBAMDg8QDw4MExMUFBMTHBsbGxwfHx8fHx8fHx8fAQcHBw0MDRgQEBgaFREVGh8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx//wAARCADIAMgDAREAAhEBAxEB/8QAcQABAQEAAwEBAAAAAAAAAAAAAAUEAQMGAgcBAQAAAAAAAAAAAAAAAAAAAAAQAAIBAwICBgkDBQAAAAAAAAABAhEDBCEFMVFBYXGREiKBscHRMkJSEyOh4XLxYjNDFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMRAD8A/fAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHbHFyZ/Dam+yLA+Z2L0Pjtyj2poD4AAAAAAAAAAAAAAAAAAAAAAAAKWFs9y6lcvvwQeqj8z9wFaziY1n/HbUX9XF97A7QAGXI23EvJ1goyfzR0YEfN269jeZ+a03pNe0DIAAAAAAAAAAAAAAAAAAAACvtO3RcVkXlWutuL9YFYAAAAAOJRjKLjJVi9GmB5/csH/mu1h/in8PU+QGMAAAAAAAAAAAAAAAAAAaMDG/6MmMH8C80+xAelSSVFolwQAAAAAAAHVlWI37ErUulaPk+hgeYnCUJuElSUXRrrQHAAAAAAAAAAAAAAAAABa2Oz4bM7r4zdF2ICmAAAAAAAAAg7zZ8GX41wuJP0rRgYAAAAAAAAAAAAAAAAAD0m2R8ODaXU33tsDSAAAAAAAAAlb9HyWZcnJd9PcBHAAAAAAAAAAAAAAAAAPS7e64Vn+KA0AAAAAAAAAJm+v8Ftf3ewCKAAAAAAAAAAAAAAAAAX9muqeGo9NttP06+0DcAAAAAAAAAjb7dTu2ra+VOT9P8AQCWAAAAAAAAAAAAAAAAAUNmyPt5Ltv4bui/kuAF0AAAAAAADiUlGLlJ0SVW+oDzOXfd/Ind6JPRdS0QHSAAAAAAAAAAAAAAAAAE2nVaNcGB6Lbs6OTao9LsF51z60BrAAAAAABJ3jOVHjW3r/sa9QEgAAAAAAAAAAAAAAAAAAAPu1duWriuW34ZR4MC9hbnZyEoy8l36XwfYBsAAADaSq9EuLAlZ+7xSdrGdW9Hc5dgEdtt1erfFgAAAAAAAAAAAAAAAAADVjbblX6NR8MH80tEBRs7HYivyzlN8lovaBPzduvY0m6eK10TXtAyAarO55lpJK54orolr+4GqO/Xaea1FvqbXvA+Z77kNeW3GPbV+4DJfzcm/pcm3H6Vou5AdAFLC2ed2Pjv1txa8sV8T6wOL+yZEKu1JXFy4MDBOE4ScZxcZLinoB8gAAAAAAAAAAAB242LeyJ+C3GvN9C7QLmJtePYpKS+5c+p8F2IDYAANJqj1T4oCfk7Nj3G5Wn9qXJax7gJ93Z82D8sVNc4v30A6Xg5i42Z+iLfqARwcyT0sz9MWvWBps7LlTf5Grce9/oBTxdtxseklHxT+uWr9AGoAB138ezfj4bsFJdD6V2MCPm7RdtJzs1uW1xXzL3gTgAAAAAAAAADRhYc8q74I6RWs5ckB6GxYtWLat21SK731sDsAAAAAAAAAAAAAAAASt021NO/YjrxuQXT1oCOAAAAAAABzGLlJRSq26JAelwsWONYjbXxcZvmwO8AAAAAAAAAAAAAAAAAAef3TEWPkVivx3NY9T6UBiAAAAAABo2+VmGXblddIJ8eivRUD0oAAAAAAAAAAAAAAAAAAAYt4tKeFKVNYNSXfRgefAAAAAAAAr7VuSSWPedKaW5v1MCsAAAAAAAAAAAAAAAAAAIe6bj96Ts2n+JPzSXzP3ATgAAAAAAAAFbbt1UUrOQ9FpC4/UwK6aaqtU+DAAAAAAAAAAAAAAA4lKMIuUmoxWrb4ARNx3R3q2rLpa4Sl0y/YCcAAAAAAAAAAANmFud7G8r89r6X0dgFvGzLGRGtuWvTF6NAdwAAAAAAAAAAAy5W442PVN+K59EePp5ARMvOv5MvO6QXCC4AZwAAAAAAAAAAAAAcxlKLUotprg1owN+PvORborq+7Hnwl3gUbO74VzRydt8pKn68ANcJwmqwkpLmnUDkAAAAfNy9atqtyagut0AxXt5xIV8Fbj6lRd7Am5G65V6qUvtwfyx94GMAAAAAAAAAAAAAAAAAAAOU2nVOj5gdsc3LiqRvTpyqwOxbnnrhdfpSfrQB7pnv/AGvuS9gHXPMy5/Fem1yq0v0A6W29XqwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAf//Z"; +const _sfc_main = { + name: "u-avatar", + mixins: [common_vendor.mpMixin, common_vendor.mixin, common_vendor.props$21], + data() { + return { + // 如果配置randomBgColor参数为true,在图标或者文字的模式下,会随机从中取出一个颜色值当做背景色 + colors: [ + "#ffb34b", + "#f2bba9", + "#f7a196", + "#f18080", + "#88a867", + "#bfbf39", + "#89c152", + "#94d554", + "#f19ec2", + "#afaae4", + "#e1b0df", + "#c38cc1", + "#72dcdc", + "#9acdcb", + "#77b1cc", + "#448aca", + "#86cefa", + "#98d1ee", + "#73d1f1", + "#80a7dc" + ], + avatarUrl: this.src, + allowMp: false + }; + }, + watch: { + // 监听头像src的变化,赋值给内部的avatarUrl变量,因为图片加载失败时,需要修改图片的src为默认值 + // 而组件内部不能直接修改props的值,所以需要一个中间变量 + src: { + immediate: true, + handler(newVal) { + this.avatarUrl = newVal; + if (!newVal) { + this.errorHandler(); + } + } + } + }, + computed: { + imageStyle() { + const style = {}; + return style; + } + }, + created() { + this.init(); + }, + emits: ["click"], + methods: { + addStyle: common_vendor.addStyle, + addUnit: common_vendor.addUnit, + random: common_vendor.random, + init() { + this.allowMp = true; + }, + // 判断传入的name属性,是否图片路径,只要带有"/"均认为是图片形式 + isImg() { + return this.src.indexOf("/") !== -1; + }, + // 图片加载时失败时触发 + errorHandler() { + this.avatarUrl = this.defaultUrl || base64Avatar; + }, + clickHandler(e) { + this.$emit("click", this.name, e); + } + } +}; +if (!Array) { + const _easycom_u_icon2 = common_vendor.resolveComponent("u-icon"); + const _easycom_up_text2 = common_vendor.resolveComponent("up-text"); + (_easycom_u_icon2 + _easycom_up_text2)(); +} +const _easycom_u_icon = () => "../u-icon/u-icon.js"; +const _easycom_up_text = () => "../u-text/u-text.js"; +if (!Math) { + (_easycom_u_icon + _easycom_up_text)(); +} +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + return common_vendor.e({ + a: _ctx.mpAvatar && $data.allowMp + }, _ctx.mpAvatar && $data.allowMp ? { + b: common_vendor.s({ + width: $options.addUnit(_ctx.size), + height: $options.addUnit(_ctx.size) + }) + } : {}, { + c: _ctx.mpAvatar && $data.allowMp + }, _ctx.mpAvatar && $data.allowMp ? {} : _ctx.icon ? { + e: common_vendor.p({ + name: _ctx.icon, + size: _ctx.fontSize, + color: _ctx.color + }) + } : _ctx.text ? { + g: common_vendor.p({ + text: _ctx.text, + size: _ctx.fontSize, + color: _ctx.color, + align: "center", + customStyle: "justify-content: center" + }) + } : { + h: common_vendor.n(`u-avatar__image--${_ctx.shape}`), + i: $data.avatarUrl || _ctx.defaultUrl, + j: _ctx.mode, + k: common_vendor.o((...args) => $options.errorHandler && $options.errorHandler(...args)), + l: common_vendor.s({ + width: $options.addUnit(_ctx.size), + height: $options.addUnit(_ctx.size) + }) + }, { + d: _ctx.icon, + f: _ctx.text, + m: common_vendor.n(`u-avatar--${_ctx.shape}`), + n: common_vendor.s({ + backgroundColor: _ctx.text || _ctx.icon ? _ctx.randomBgColor ? $data.colors[_ctx.colorIndex !== "" ? _ctx.colorIndex : $options.random(0, 19)] : _ctx.bgColor : "transparent", + width: $options.addUnit(_ctx.size), + height: $options.addUnit(_ctx.size) + }), + o: common_vendor.s($options.addStyle(_ctx.customStyle)), + p: common_vendor.o((...args) => $options.clickHandler && $options.clickHandler(...args)) + }); +} +const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-14a988f2"]]); +wx.createComponent(Component); +//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/node-modules/uview-plus/components/u-avatar/u-avatar.js.map diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-avatar/u-avatar.json b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-avatar/u-avatar.json new file mode 100644 index 0000000..3185d42 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-avatar/u-avatar.json @@ -0,0 +1,7 @@ +{ + "component": true, + "usingComponents": { + "u-icon": "../u-icon/u-icon", + "up-text": "../u-text/u-text" + } +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-avatar/u-avatar.wxml b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-avatar/u-avatar.wxml new file mode 100644 index 0000000..1340ba8 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-avatar/u-avatar.wxml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-avatar/u-avatar.wxss b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-avatar/u-avatar.wxss new file mode 100644 index 0000000..bc5e488 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-avatar/u-avatar.wxss @@ -0,0 +1,68 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ +.u-empty.data-v-14a988f2, +.u-empty__wrap.data-v-14a988f2, +.u-tabs.data-v-14a988f2, +.u-tabs__wrapper.data-v-14a988f2, +.u-tabs__wrapper__scroll-view-wrapper.data-v-14a988f2, +.u-tabs__wrapper__scroll-view.data-v-14a988f2, +.u-tabs__wrapper__nav.data-v-14a988f2, +.u-tabs__wrapper__nav__line.data-v-14a988f2, +.up-empty.data-v-14a988f2, +.up-empty__wrap.data-v-14a988f2, +.up-tabs.data-v-14a988f2, +.up-tabs__wrapper.data-v-14a988f2, +.up-tabs__wrapper__scroll-view-wrapper.data-v-14a988f2, +.up-tabs__wrapper__scroll-view.data-v-14a988f2, +.up-tabs__wrapper__nav.data-v-14a988f2, +.up-tabs__wrapper__nav__line.data-v-14a988f2 { + display: flex; + flex-direction: column; + flex-shrink: 0; + flex-grow: 0; + flex-basis: auto; + align-items: stretch; + align-content: flex-start; +} +.u-avatar.data-v-14a988f2 { + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; +} +.u-avatar--circle.data-v-14a988f2 { + border-radius: 100px; +} +.u-avatar--square.data-v-14a988f2 { + border-radius: 4px; +} +.u-avatar__image--circle.data-v-14a988f2 { + border-radius: 100px; + overflow: hidden; +} +.u-avatar__image--square.data-v-14a988f2 { + border-radius: 4px; +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-badge/u-badge.js b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-badge/u-badge.js new file mode 100644 index 0000000..bbcf4a1 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-badge/u-badge.js @@ -0,0 +1,64 @@ +"use strict"; +const common_vendor = require("../../../../common/vendor.js"); +const _sfc_main = { + name: "u-badge", + mixins: [common_vendor.mpMixin, common_vendor.props$35, common_vendor.mixin], + computed: { + // 是否将badge中心与父组件右上角重合 + boxStyle() { + let style = {}; + return style; + }, + // 整个组件的样式 + badgeStyle() { + const style = {}; + if (this.color) { + style.color = this.color; + } + if (this.bgColor && !this.inverted) { + style.backgroundColor = this.bgColor; + } + if (this.absolute) { + style.position = "absolute"; + if (this.offset.length) { + const top = this.offset[0]; + const right = this.offset[1] || top; + style.top = common_vendor.addUnit(top); + style.right = common_vendor.addUnit(right); + } + } + return style; + }, + showValue() { + switch (this.numberType) { + case "overflow": + return Number(this.value) > Number(this.max) ? this.max + "+" : this.value; + case "ellipsis": + return Number(this.value) > Number(this.max) ? "..." : this.value; + case "limit": + return Number(this.value) > 999 ? Number(this.value) >= 9999 ? Math.floor(this.value / 1e4 * 100) / 100 + "w" : Math.floor(this.value / 1e3 * 100) / 100 + "k" : this.value; + default: + return Number(this.value); + } + } + }, + methods: { + addStyle: common_vendor.addStyle + } +}; +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + return common_vendor.e({ + a: _ctx.show && ((Number(_ctx.value) === 0 ? _ctx.showZero : true) || _ctx.isDot) + }, _ctx.show && ((Number(_ctx.value) === 0 ? _ctx.showZero : true) || _ctx.isDot) ? { + b: common_vendor.t(_ctx.isDot ? "" : $options.showValue), + c: common_vendor.n(_ctx.isDot ? "u-badge--dot" : "u-badge--not-dot"), + d: common_vendor.n(_ctx.inverted && "u-badge--inverted"), + e: common_vendor.n(_ctx.shape === "horn" && "u-badge--horn"), + f: common_vendor.n(`u-badge--${_ctx.type}${_ctx.inverted ? "--inverted" : ""}`), + g: common_vendor.s($options.addStyle(_ctx.customStyle)), + h: common_vendor.s($options.badgeStyle) + } : {}); +} +const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-aa9883b1"]]); +wx.createComponent(Component); +//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/node-modules/uview-plus/components/u-badge/u-badge.js.map diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-badge/u-badge.json b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-badge/u-badge.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-badge/u-badge.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-badge/u-badge.wxml b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-badge/u-badge.wxml new file mode 100644 index 0000000..fc92311 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-badge/u-badge.wxml @@ -0,0 +1 @@ +{{b}} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-badge/u-badge.wxss b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-badge/u-badge.wxss new file mode 100644 index 0000000..d86df04 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-badge/u-badge.wxss @@ -0,0 +1,104 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ +.u-empty.data-v-aa9883b1, +.u-empty__wrap.data-v-aa9883b1, +.u-tabs.data-v-aa9883b1, +.u-tabs__wrapper.data-v-aa9883b1, +.u-tabs__wrapper__scroll-view-wrapper.data-v-aa9883b1, +.u-tabs__wrapper__scroll-view.data-v-aa9883b1, +.u-tabs__wrapper__nav.data-v-aa9883b1, +.u-tabs__wrapper__nav__line.data-v-aa9883b1, +.up-empty.data-v-aa9883b1, +.up-empty__wrap.data-v-aa9883b1, +.up-tabs.data-v-aa9883b1, +.up-tabs__wrapper.data-v-aa9883b1, +.up-tabs__wrapper__scroll-view-wrapper.data-v-aa9883b1, +.up-tabs__wrapper__scroll-view.data-v-aa9883b1, +.up-tabs__wrapper__nav.data-v-aa9883b1, +.up-tabs__wrapper__nav__line.data-v-aa9883b1 { + display: flex; + flex-direction: column; + flex-shrink: 0; + flex-grow: 0; + flex-basis: auto; + align-items: stretch; + align-content: flex-start; +} +.u-badge.data-v-aa9883b1 { + border-top-right-radius: 100px; + border-top-left-radius: 100px; + border-bottom-left-radius: 100px; + border-bottom-right-radius: 100px; + display: flex; + flex-direction: row; + line-height: 11px; + text-align: center; + font-size: 11px; + color: #FFFFFF; +} +.u-badge--dot.data-v-aa9883b1 { + height: 8px; + width: 8px; +} +.u-badge--inverted.data-v-aa9883b1 { + font-size: 13px; +} +.u-badge--not-dot.data-v-aa9883b1 { + padding: 2px 5px; +} +.u-badge--horn.data-v-aa9883b1 { + border-bottom-left-radius: 0; +} +.u-badge--primary.data-v-aa9883b1 { + background-color: #3c9cff; +} +.u-badge--primary--inverted.data-v-aa9883b1 { + color: #3c9cff; +} +.u-badge--error.data-v-aa9883b1 { + background-color: #f56c6c; +} +.u-badge--error--inverted.data-v-aa9883b1 { + color: #f56c6c; +} +.u-badge--success.data-v-aa9883b1 { + background-color: #5ac725; +} +.u-badge--success--inverted.data-v-aa9883b1 { + color: #5ac725; +} +.u-badge--info.data-v-aa9883b1 { + background-color: #909399; +} +.u-badge--info--inverted.data-v-aa9883b1 { + color: #909399; +} +.u-badge--warning.data-v-aa9883b1 { + background-color: #f9ae3d; +} +.u-badge--warning--inverted.data-v-aa9883b1 { + color: #f9ae3d; +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-button/u-button.js b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-button/u-button.js new file mode 100644 index 0000000..0ccf824 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-button/u-button.js @@ -0,0 +1,201 @@ +"use strict"; +const common_vendor = require("../../../../common/vendor.js"); +const _sfc_main = { + name: "u-button", + mixins: [common_vendor.mpMixin, common_vendor.mixin, common_vendor.buttonMixin, common_vendor.openType, common_vendor.props$16], + data() { + return {}; + }, + computed: { + // 生成bem风格的类名 + bemClass() { + if (!this.color) { + return this.bem( + "button", + ["type", "shape", "size"], + ["disabled", "plain", "hairline"] + ); + } else { + return this.bem( + "button", + ["shape", "size"], + ["disabled", "plain", "hairline"] + ); + } + }, + loadingColor() { + if (this.plain) { + return this.color ? this.color : common_vendor.color[`u-${this.type}`]; + } + if (this.type === "info") { + return "#c9c9c9"; + } + return "rgb(200, 200, 200)"; + }, + iconColorCom() { + if (this.iconColor) + return this.iconColor; + if (this.plain) { + return this.color ? this.color : this.type; + } else { + return this.type === "info" ? "#000000" : "#ffffff"; + } + }, + baseColor() { + let style = {}; + if (this.color) { + style.color = this.plain ? this.color : "white"; + if (!this.plain) { + style["background-color"] = this.color; + } + if (this.color.indexOf("gradient") !== -1) { + style.borderTopWidth = 0; + style.borderRightWidth = 0; + style.borderBottomWidth = 0; + style.borderLeftWidth = 0; + if (!this.plain) { + style.backgroundImage = this.color; + } + } else { + style.borderColor = this.color; + style.borderWidth = "1px"; + style.borderStyle = "solid"; + } + } + return style; + }, + // nvue版本按钮的字体不会继承父组件的颜色,需要对每一个text组件进行单独的设置 + nvueTextStyle() { + let style = {}; + if (this.type === "info") { + style.color = "#323233"; + } + if (this.color) { + style.color = this.plain ? this.color : "white"; + } + style.fontSize = this.textSize + "px"; + return style; + }, + // 字体大小 + textSize() { + let fontSize = 14, { size } = this; + if (size === "large") + fontSize = 16; + if (size === "normal") + fontSize = 14; + if (size === "small") + fontSize = 12; + if (size === "mini") + fontSize = 10; + return fontSize; + } + }, + emits: [ + "click", + "getphonenumber", + "getuserinfo", + "error", + "opensetting", + "launchapp", + "agreeprivacyauthorization" + ], + methods: { + addStyle: common_vendor.addStyle, + clickHandler(e) { + if (!this.disabled && !this.loading) { + common_vendor.throttle(() => { + this.$emit("click", e); + }, this.throttleTime); + } + this.stop && this.preventEvent(e); + }, + // 下面为对接uniapp官方按钮开放能力事件回调的对接 + getphonenumber(res) { + this.$emit("getphonenumber", res); + }, + getuserinfo(res) { + this.$emit("getuserinfo", res); + }, + error(res) { + this.$emit("error", res); + }, + opensetting(res) { + this.$emit("opensetting", res); + }, + launchapp(res) { + this.$emit("launchapp", res); + }, + agreeprivacyauthorization(res) { + this.$emit("agreeprivacyauthorization", res); + } + } +}; +if (!Array) { + const _easycom_u_loading_icon2 = common_vendor.resolveComponent("u-loading-icon"); + const _easycom_u_icon2 = common_vendor.resolveComponent("u-icon"); + (_easycom_u_loading_icon2 + _easycom_u_icon2)(); +} +const _easycom_u_loading_icon = () => "../u-loading-icon/u-loading-icon.js"; +const _easycom_u_icon = () => "../u-icon/u-icon.js"; +if (!Math) { + (_easycom_u_loading_icon + _easycom_u_icon)(); +} +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + return common_vendor.e({ + a: _ctx.loading + }, _ctx.loading ? { + b: common_vendor.p({ + mode: _ctx.loadingMode, + size: _ctx.loadingSize * 1.15, + color: $options.loadingColor + }), + c: common_vendor.t(_ctx.loadingText || _ctx.text), + d: common_vendor.s({ + fontSize: $options.textSize + "px" + }) + } : common_vendor.e({ + e: _ctx.icon + }, _ctx.icon ? { + f: common_vendor.p({ + name: _ctx.icon, + color: $options.iconColorCom, + size: $options.textSize * 1.35, + customStyle: { + marginRight: "2px" + } + }) + } : {}, { + g: common_vendor.t(_ctx.text), + h: common_vendor.s({ + fontSize: $options.textSize + "px" + }) + }), { + i: Number(_ctx.hoverStartTime), + j: Number(_ctx.hoverStayTime), + k: _ctx.formType, + l: _ctx.openType, + m: _ctx.appParameter, + n: _ctx.hoverStopPropagation, + o: _ctx.sendMessageTitle, + p: _ctx.sendMessagePath, + q: _ctx.lang, + r: _ctx.dataName, + s: _ctx.sessionFrom, + t: _ctx.sendMessageImg, + v: _ctx.showMessageCard, + w: common_vendor.o((...args) => $options.getphonenumber && $options.getphonenumber(...args)), + x: common_vendor.o((...args) => $options.getuserinfo && $options.getuserinfo(...args)), + y: common_vendor.o((...args) => $options.error && $options.error(...args)), + z: common_vendor.o((...args) => $options.opensetting && $options.opensetting(...args)), + A: common_vendor.o((...args) => $options.launchapp && $options.launchapp(...args)), + B: common_vendor.o((...args) => $options.agreeprivacyauthorization && $options.agreeprivacyauthorization(...args)), + C: !_ctx.disabled && !_ctx.loading ? "u-button--active" : "", + D: common_vendor.s($options.baseColor), + E: common_vendor.s($options.addStyle(_ctx.customStyle)), + F: common_vendor.o((...args) => $options.clickHandler && $options.clickHandler(...args)), + G: common_vendor.n($options.bemClass) + }); +} +const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-461e713c"]]); +wx.createComponent(Component); +//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/node-modules/uview-plus/components/u-button/u-button.js.map diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-button/u-button.json b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-button/u-button.json new file mode 100644 index 0000000..9d49dfb --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-button/u-button.json @@ -0,0 +1,7 @@ +{ + "component": true, + "usingComponents": { + "u-loading-icon": "../u-loading-icon/u-loading-icon", + "u-icon": "../u-icon/u-icon" + } +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-button/u-button.wxml b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-button/u-button.wxml new file mode 100644 index 0000000..fc2a9b8 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-button/u-button.wxml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-button/u-button.wxss b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-button/u-button.wxss new file mode 100644 index 0000000..bc794ef --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-button/u-button.wxss @@ -0,0 +1,196 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ +.u-empty.data-v-461e713c, +.u-empty__wrap.data-v-461e713c, +.u-tabs.data-v-461e713c, +.u-tabs__wrapper.data-v-461e713c, +.u-tabs__wrapper__scroll-view-wrapper.data-v-461e713c, +.u-tabs__wrapper__scroll-view.data-v-461e713c, +.u-tabs__wrapper__nav.data-v-461e713c, +.u-tabs__wrapper__nav__line.data-v-461e713c, +.up-empty.data-v-461e713c, +.up-empty__wrap.data-v-461e713c, +.up-tabs.data-v-461e713c, +.up-tabs__wrapper.data-v-461e713c, +.up-tabs__wrapper__scroll-view-wrapper.data-v-461e713c, +.up-tabs__wrapper__scroll-view.data-v-461e713c, +.up-tabs__wrapper__nav.data-v-461e713c, +.up-tabs__wrapper__nav__line.data-v-461e713c { + display: flex; + flex-direction: column; + flex-shrink: 0; + flex-grow: 0; + flex-basis: auto; + align-items: stretch; + align-content: flex-start; +} +.u-button.data-v-461e713c { + width: 100%; + white-space: nowrap; +} +.u-button__text.data-v-461e713c { + white-space: nowrap; + line-height: 1; +} +.u-button.data-v-461e713c:before { + position: absolute; + top: 50%; + left: 50%; + width: 100%; + height: 100%; + border: inherit; + border-radius: inherit; + transform: translate(-50%, -50%); + opacity: 0; + content: " "; + background-color: #000; + border-color: #000; +} +.u-button--active.data-v-461e713c:before { + opacity: 0.15; +} +.u-button__icon + .u-button__text.data-v-461e713c:not(:empty), .u-button__loading-text.data-v-461e713c { + margin-left: 4px; +} +.u-button--plain.u-button--primary.data-v-461e713c { + color: #3c9cff; +} +.u-button--plain.u-button--info.data-v-461e713c { + color: #909399; +} +.u-button--plain.u-button--success.data-v-461e713c { + color: #5ac725; +} +.u-button--plain.u-button--error.data-v-461e713c { + color: #f56c6c; +} +.u-button--plain.u-button--warning.data-v-461e713c { + color: #f9ae3d; +} +.u-button.data-v-461e713c { + height: 40px; + position: relative; + align-items: center; + justify-content: center; + display: flex; + flex-direction: row; + box-sizing: border-box; + flex-direction: row; +} +.u-button__text.data-v-461e713c { + font-size: 15px; +} +.u-button__loading-text.data-v-461e713c { + font-size: 15px; + margin-left: 4px; +} +.u-button--large.data-v-461e713c { + width: 100%; + height: 50px; + padding: 0 15px; +} +.u-button--normal.data-v-461e713c { + padding: 0 12px; + font-size: 14px; +} +.u-button--small.data-v-461e713c { + min-width: 60px; + height: 30px; + padding: 0px 8px; + font-size: 12px; +} +.u-button--mini.data-v-461e713c { + height: 22px; + font-size: 10px; + min-width: 50px; + padding: 0px 8px; +} +.u-button--disabled.data-v-461e713c { + opacity: 0.5; +} +.u-button--info.data-v-461e713c { + color: #323233; + background-color: #fff; + border-color: #ebedf0; + border-width: 1px; + border-style: solid; +} +.u-button--success.data-v-461e713c { + color: #fff; + background-color: #5ac725; + border-color: #5ac725; + border-width: 1px; + border-style: solid; +} +.u-button--primary.data-v-461e713c { + color: #fff; + background-color: #3c9cff; + border-color: #3c9cff; + border-width: 1px; + border-style: solid; +} +.u-button--error.data-v-461e713c { + color: #fff; + background-color: #f56c6c; + border-color: #f56c6c; + border-width: 1px; + border-style: solid; +} +.u-button--warning.data-v-461e713c { + color: #fff; + background-color: #f9ae3d; + border-color: #f9ae3d; + border-width: 1px; + border-style: solid; +} +.u-button--block.data-v-461e713c { + display: flex; + flex-direction: row; + width: 100%; +} +.u-button--circle.data-v-461e713c { + border-top-right-radius: 100px; + border-top-left-radius: 100px; + border-bottom-left-radius: 100px; + border-bottom-right-radius: 100px; +} +.u-button--square.data-v-461e713c { + border-bottom-left-radius: 3px; + border-bottom-right-radius: 3px; + border-top-left-radius: 3px; + border-top-right-radius: 3px; +} +.u-button__icon.data-v-461e713c { + min-width: 1em; + line-height: inherit !important; + vertical-align: top; +} +.u-button--plain.data-v-461e713c { + background-color: #fff; +} +.u-button--hairline.data-v-461e713c { + border-width: 0.5px !important; +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-cell-group/u-cell-group.json b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-cell-group/u-cell-group.json new file mode 100644 index 0000000..55b89cc --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-cell-group/u-cell-group.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "u-line": "../u-line/u-line" + } +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-cell-group/u-cell-group.wxml b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-cell-group/u-cell-group.wxml new file mode 100644 index 0000000..2d0ec63 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-cell-group/u-cell-group.wxml @@ -0,0 +1 @@ +{{b}} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-cell-group/u-cell-group.wxss b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-cell-group/u-cell-group.wxss new file mode 100644 index 0000000..11e6688 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-cell-group/u-cell-group.wxss @@ -0,0 +1,63 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ +.u-empty.data-v-30c8e4c7, +.u-empty__wrap.data-v-30c8e4c7, +.u-tabs.data-v-30c8e4c7, +.u-tabs__wrapper.data-v-30c8e4c7, +.u-tabs__wrapper__scroll-view-wrapper.data-v-30c8e4c7, +.u-tabs__wrapper__scroll-view.data-v-30c8e4c7, +.u-tabs__wrapper__nav.data-v-30c8e4c7, +.u-tabs__wrapper__nav__line.data-v-30c8e4c7, +.up-empty.data-v-30c8e4c7, +.up-empty__wrap.data-v-30c8e4c7, +.up-tabs.data-v-30c8e4c7, +.up-tabs__wrapper.data-v-30c8e4c7, +.up-tabs__wrapper__scroll-view-wrapper.data-v-30c8e4c7, +.up-tabs__wrapper__scroll-view.data-v-30c8e4c7, +.up-tabs__wrapper__nav.data-v-30c8e4c7, +.up-tabs__wrapper__nav__line.data-v-30c8e4c7 { + display: flex; + flex-direction: column; + flex-shrink: 0; + flex-grow: 0; + flex-basis: auto; + align-items: stretch; + align-content: flex-start; +} +.u-cell-group.data-v-30c8e4c7 { + flex: 1; +} +.u-cell-group__title.data-v-30c8e4c7 { + padding: 16px 16px 8px; +} +.u-cell-group__title__text.data-v-30c8e4c7 { + font-size: 15px; + line-height: 16px; + color: #303133; +} +.u-cell-group__wrapper.data-v-30c8e4c7 { + position: relative; +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-cell/u-cell.js b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-cell/u-cell.js new file mode 100644 index 0000000..3259d6c --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-cell/u-cell.js @@ -0,0 +1,101 @@ +"use strict"; +const common_vendor = require("../../../../common/vendor.js"); +const _sfc_main = { + name: "u-cell", + data() { + return {}; + }, + mixins: [common_vendor.mpMixin, common_vendor.mixin, common_vendor.props$22], + computed: { + titleTextStyle() { + return common_vendor.addStyle(this.titleStyle); + } + }, + emits: ["click"], + methods: { + addStyle: common_vendor.addStyle, + testEmpty: common_vendor.test.empty, + // 点击cell + clickHandler(e) { + if (this.disabled) + return; + this.$emit("click", { + name: this.name + }); + this.openPage(); + this.stop && this.preventEvent(e); + } + } +}; +if (!Array) { + const _easycom_u_icon2 = common_vendor.resolveComponent("u-icon"); + const _easycom_u_line2 = common_vendor.resolveComponent("u-line"); + (_easycom_u_icon2 + _easycom_u_line2)(); +} +const _easycom_u_icon = () => "../u-icon/u-icon.js"; +const _easycom_u_line = () => "../u-line/u-line.js"; +if (!Math) { + (_easycom_u_icon + _easycom_u_line)(); +} +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + return common_vendor.e({ + a: _ctx.$slots.icon || _ctx.icon + }, _ctx.$slots.icon || _ctx.icon ? common_vendor.e({ + b: _ctx.$slots.icon + }, _ctx.$slots.icon ? {} : { + c: common_vendor.p({ + name: _ctx.icon, + ["custom-style"]: _ctx.iconStyle, + size: _ctx.size === "large" ? 22 : 18 + }) + }) : {}, { + d: _ctx.$slots.title || !_ctx.title + }, _ctx.$slots.title || !_ctx.title ? {} : { + e: common_vendor.t(_ctx.title), + f: common_vendor.s($options.titleTextStyle), + g: common_vendor.n(_ctx.required && "u-cell--required"), + h: common_vendor.n(_ctx.disabled && "u-cell--disabled"), + i: common_vendor.n(_ctx.size === "large" && "u-cell__title-text--large") + }, { + j: _ctx.label + }, _ctx.label ? { + k: common_vendor.t(_ctx.label), + l: common_vendor.n(_ctx.disabled && "u-cell--disabled"), + m: common_vendor.n(_ctx.size === "large" && "u-cell__label--large") + } : {}, { + n: !$options.testEmpty(_ctx.value) + }, !$options.testEmpty(_ctx.value) ? { + o: common_vendor.t(_ctx.value), + p: common_vendor.n(_ctx.disabled && "u-cell--disabled"), + q: common_vendor.n(_ctx.size === "large" && "u-cell__value--large") + } : {}, { + r: _ctx.$slots["right-icon"] || _ctx.isLink + }, _ctx.$slots["right-icon"] || _ctx.isLink ? common_vendor.e({ + s: _ctx.rightIcon && !_ctx.$slots["right-icon"] + }, _ctx.rightIcon && !_ctx.$slots["right-icon"] ? { + t: common_vendor.p({ + name: _ctx.rightIcon, + ["custom-style"]: _ctx.rightIconStyle, + color: _ctx.disabled ? "#c8c9cc" : "info", + size: _ctx.size === "large" ? 18 : 16 + }) + } : {}, { + v: common_vendor.n(`u-cell__right-icon-wrap--${_ctx.arrowDirection}`) + }) : {}, { + w: _ctx.$slots["righticon"] + }, _ctx.$slots["righticon"] ? { + x: common_vendor.n(`u-cell__right-icon-wrap--${_ctx.arrowDirection}`) + } : {}, { + y: common_vendor.n(_ctx.center && "u-cell--center"), + z: common_vendor.n(_ctx.size === "large" && "u-cell__body--large"), + A: _ctx.border + }, _ctx.border ? {} : {}, { + B: common_vendor.n(_ctx.customClass), + C: common_vendor.s($options.addStyle(_ctx.customStyle)), + D: !_ctx.disabled && (_ctx.clickable || _ctx.isLink) ? "u-cell--clickable" : "", + E: common_vendor.o((...args) => $options.clickHandler && $options.clickHandler(...args)) + }); +} +const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-b4243719"]]); +wx.createComponent(Component); +//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/node-modules/uview-plus/components/u-cell/u-cell.js.map diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-cell/u-cell.json b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-cell/u-cell.json new file mode 100644 index 0000000..9dd4979 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-cell/u-cell.json @@ -0,0 +1,7 @@ +{ + "component": true, + "usingComponents": { + "u-icon": "../u-icon/u-icon", + "u-line": "../u-line/u-line" + } +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-cell/u-cell.wxml b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-cell/u-cell.wxml new file mode 100644 index 0000000..c0d38c5 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-cell/u-cell.wxml @@ -0,0 +1 @@ +{{e}}{{k}}{{o}} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-cell/u-cell.wxss b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-cell/u-cell.wxss new file mode 100644 index 0000000..7986ec6 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-cell/u-cell.wxss @@ -0,0 +1,143 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ +.u-empty.data-v-b4243719, +.u-empty__wrap.data-v-b4243719, +.u-tabs.data-v-b4243719, +.u-tabs__wrapper.data-v-b4243719, +.u-tabs__wrapper__scroll-view-wrapper.data-v-b4243719, +.u-tabs__wrapper__scroll-view.data-v-b4243719, +.u-tabs__wrapper__nav.data-v-b4243719, +.u-tabs__wrapper__nav__line.data-v-b4243719, +.up-empty.data-v-b4243719, +.up-empty__wrap.data-v-b4243719, +.up-tabs.data-v-b4243719, +.up-tabs__wrapper.data-v-b4243719, +.up-tabs__wrapper__scroll-view-wrapper.data-v-b4243719, +.up-tabs__wrapper__scroll-view.data-v-b4243719, +.up-tabs__wrapper__nav.data-v-b4243719, +.up-tabs__wrapper__nav__line.data-v-b4243719 { + display: flex; + flex-direction: column; + flex-shrink: 0; + flex-grow: 0; + flex-basis: auto; + align-items: stretch; + align-content: flex-start; +} +.u-cell__body.data-v-b4243719 { + display: flex; + flex-direction: row; + box-sizing: border-box; + padding: 13px 15px; + font-size: 15px; + color: #303133; + align-items: center; +} +.u-cell__body__content.data-v-b4243719 { + display: flex; + flex-direction: row; + align-items: center; + flex: 1; +} +.u-cell__body--large.data-v-b4243719 { + padding-top: 13px; + padding-bottom: 13px; +} +.u-cell__left-icon-wrap.data-v-b4243719, .u-cell__right-icon-wrap.data-v-b4243719 { + display: flex; + flex-direction: row; + align-items: center; + font-size: 16px; +} +.u-cell__left-icon-wrap.data-v-b4243719 { + margin-right: 4px; +} +.u-cell__right-icon-wrap.data-v-b4243719 { + margin-left: 4px; + transition: transform 0.3s; +} +.u-cell__right-icon-wrap--up.data-v-b4243719 { + transform: rotate(-90deg); +} +.u-cell__right-icon-wrap--down.data-v-b4243719 { + transform: rotate(90deg); +} +.u-cell__title.data-v-b4243719 { + flex: 1; + display: flex; + flex-direction: column; +} +.u-cell__title-text.data-v-b4243719 { + font-size: 15px; + line-height: 22px; + color: #303133; +} +.u-cell__title-text--large.data-v-b4243719 { + font-size: 16px; +} +.u-cell__label.data-v-b4243719 { + margin-top: 5px; + font-size: 12px; + color: #909193; + line-height: 18px; +} +.u-cell__label--large.data-v-b4243719 { + font-size: 14px; +} +.u-cell__value.data-v-b4243719 { + text-align: right; + margin-left: auto; + font-size: 14px; + line-height: 24px; + color: #606266; +} +.u-cell__value--large.data-v-b4243719 { + font-size: 15px; +} +.u-cell--required.data-v-b4243719 { + overflow: visible; + display: flex; + flex-direction: row; + align-items: center; +} +.u-cell--required.data-v-b4243719:before { + position: absolute; + content: "*"; + left: -8px; + margin-top: 4rpx; + font-size: 14px; + color: #f56c6c; +} +.u-cell--clickable.data-v-b4243719 { + background-color: #f3f4f6; +} +.u-cell--disabled.data-v-b4243719 { + color: #c8c9cc; + cursor: not-allowed; +} +.u-cell--center.data-v-b4243719 { + align-items: center; +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-code/u-code.js b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-code/u-code.js new file mode 100644 index 0000000..225d861 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-code/u-code.js @@ -0,0 +1,98 @@ +"use strict"; +const common_vendor = require("../../../../common/vendor.js"); +const _sfc_main = { + name: "u-code", + mixins: [common_vendor.mpMixin, common_vendor.mixin, common_vendor.props$15], + data() { + return { + secNum: this.seconds, + timer: null, + canGetCode: true + // 是否可以执行验证码操作 + }; + }, + mounted() { + this.checkKeepRunning(); + }, + watch: { + seconds: { + immediate: true, + handler(n) { + this.secNum = n; + } + } + }, + emits: ["start", "end", "change"], + methods: { + checkKeepRunning() { + let lastTimestamp = Number(common_vendor.index.getStorageSync(this.uniqueKey + "_$uCountDownTimestamp")); + if (!lastTimestamp) + return this.changeEvent(this.startText); + let nowTimestamp = Math.floor(+/* @__PURE__ */ new Date() / 1e3); + if (this.keepRunning && lastTimestamp && lastTimestamp > nowTimestamp) { + this.secNum = lastTimestamp - nowTimestamp; + common_vendor.index.removeStorageSync(this.uniqueKey + "_$uCountDownTimestamp"); + this.start(); + } else { + this.changeEvent(this.startText); + } + }, + // 开始倒计时 + start() { + if (this.timer) { + clearInterval(this.timer); + this.timer = null; + } + this.$emit("start"); + this.canGetCode = false; + this.changeEvent(this.changeText.replace(/x|X/, this.secNum)); + this.timer = setInterval(() => { + if (--this.secNum) { + this.changeEvent(this.changeText.replace(/x|X/, this.secNum)); + } else { + clearInterval(this.timer); + this.timer = null; + this.changeEvent(this.endText); + this.secNum = this.seconds; + this.$emit("end"); + this.canGetCode = true; + } + }, 1e3); + this.setTimeToStorage(); + }, + // 重置,可以让用户再次获取验证码 + reset() { + this.canGetCode = true; + clearInterval(this.timer); + this.secNum = this.seconds; + this.changeEvent(this.endText); + }, + changeEvent(text) { + this.$emit("change", text); + }, + // 保存时间戳,为了防止倒计时尚未结束,H5刷新或者各端的右上角返回上一页再进来 + setTimeToStorage() { + if (!this.keepRunning || !this.timer) + return; + if (this.secNum > 0 && this.secNum <= this.seconds) { + let nowTimestamp = Math.floor(+/* @__PURE__ */ new Date() / 1e3); + common_vendor.index.setStorage({ + key: this.uniqueKey + "_$uCountDownTimestamp", + data: nowTimestamp + Number(this.secNum) + }); + } + } + }, + // 组件销毁的时候,清除定时器,否则定时器会继续存在,系统不会自动清除 + beforeUnmount() { + this.setTimeToStorage(); + clearTimeout(this.timer); + this.timer = null; + } +}; +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + return {}; +} +const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-ac37a9df"]]); +wx.createComponent(Component); +//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/node-modules/uview-plus/components/u-code/u-code.js.map diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-code/u-code.json b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-code/u-code.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-code/u-code.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-code/u-code.wxml b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-code/u-code.wxml new file mode 100644 index 0000000..21c4c5a --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-code/u-code.wxml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-code/u-code.wxss b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-code/u-code.wxss new file mode 100644 index 0000000..89eafe6 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-code/u-code.wxss @@ -0,0 +1,49 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ +.u-empty.data-v-ac37a9df, +.u-empty__wrap.data-v-ac37a9df, +.u-tabs.data-v-ac37a9df, +.u-tabs__wrapper.data-v-ac37a9df, +.u-tabs__wrapper__scroll-view-wrapper.data-v-ac37a9df, +.u-tabs__wrapper__scroll-view.data-v-ac37a9df, +.u-tabs__wrapper__nav.data-v-ac37a9df, +.u-tabs__wrapper__nav__line.data-v-ac37a9df, +.up-empty.data-v-ac37a9df, +.up-empty__wrap.data-v-ac37a9df, +.up-tabs.data-v-ac37a9df, +.up-tabs__wrapper.data-v-ac37a9df, +.up-tabs__wrapper__scroll-view-wrapper.data-v-ac37a9df, +.up-tabs__wrapper__scroll-view.data-v-ac37a9df, +.up-tabs__wrapper__nav.data-v-ac37a9df, +.up-tabs__wrapper__nav__line.data-v-ac37a9df { + display: flex; + flex-direction: column; + flex-shrink: 0; + flex-grow: 0; + flex-basis: auto; + align-items: stretch; + align-content: flex-start; +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-dropdown-item/u-dropdown-item.js b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-dropdown-item/u-dropdown-item.js new file mode 100644 index 0000000..7c96a33 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-dropdown-item/u-dropdown-item.js @@ -0,0 +1,118 @@ +"use strict"; +const common_vendor = require("../../../../common/vendor.js"); +const _sfc_main = { + name: "u-dropdown-item", + mixins: [common_vendor.mpMixin, common_vendor.mixin, common_vendor.props$11], + options: { + styleIsolation: "shared" + }, + data() { + return { + active: false, + // 当前项是否处于展开状态 + activeColor: "#2979ff", + // 激活时左边文字和右边对勾图标的颜色 + inactiveColor: "#606266" + // 未激活时左边文字和右边对勾图标的颜色 + }; + }, + computed: { + // 监听props是否发生了变化,有些值需要传递给父组件u-dropdown,无法双向绑定 + propsChange() { + return `${this.title}-${this.disabled}`; + } + }, + watch: { + propsChange(n) { + if (this.parent) + this.parent.init(); + } + }, + created() { + this.parent = false; + }, + emits: ["update:modelValue", "change"], + methods: { + addUnit: common_vendor.addUnit, + init() { + let parent = common_vendor.$parent.call(this, "u-dropdown"); + if (parent) { + this.parent = parent; + this.activeColor = parent.activeColor; + this.inactiveColor = parent.inactiveColor; + let exist = parent.children.find((val) => { + return this === val; + }); + if (!exist) + parent.children.push(this); + if (parent.children.length == 1) + this.active = true; + parent.menuList.push({ + title: this.title, + disabled: this.disabled + }); + } + }, + // cell被点击 + cellClick(value) { + this.$emit("update:modelValue", value); + this.parent.close(); + this.$emit("change", value); + } + }, + mounted() { + this.init(); + } +}; +if (!Array) { + const _easycom_up_icon2 = common_vendor.resolveComponent("up-icon"); + const _easycom_up_cell2 = common_vendor.resolveComponent("up-cell"); + const _easycom_up_cell_group2 = common_vendor.resolveComponent("up-cell-group"); + (_easycom_up_icon2 + _easycom_up_cell2 + _easycom_up_cell_group2)(); +} +const _easycom_up_icon = () => "../u-icon/u-icon.js"; +const _easycom_up_cell = () => "../u-cell/u-cell.js"; +const _easycom_up_cell_group = () => "../u-cell-group/u-cell-group.js"; +if (!Math) { + (_easycom_up_icon + _easycom_up_cell + _easycom_up_cell_group)(); +} +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + return common_vendor.e({ + a: $data.active + }, $data.active ? common_vendor.e({ + b: !_ctx.$slots.default && !_ctx.$slots.$default + }, !_ctx.$slots.default && !_ctx.$slots.$default ? { + c: common_vendor.f(_ctx.options, (item, index, i0) => { + return common_vendor.e({ + a: _ctx.modelValue == item.value + }, _ctx.modelValue == item.value ? { + b: "243060d4-2-" + i0 + "," + ("243060d4-1-" + i0), + c: common_vendor.p({ + name: "checkbox-mark", + color: $data.activeColor, + size: "32" + }) + } : {}, { + d: common_vendor.o(($event) => $options.cellClick(item.value), index), + e: index, + f: "243060d4-1-" + i0 + ",243060d4-0", + g: common_vendor.p({ + arrow: false, + title: item.label, + ["title-style"]: { + color: _ctx.modelValue == item.value ? $data.activeColor : $data.inactiveColor + } + }) + }); + }), + d: $options.addUnit(_ctx.height) + } : {}, { + e: common_vendor.o(() => { + }), + f: common_vendor.o(() => { + }) + }) : {}); +} +const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-243060d4"]]); +wx.createComponent(Component); +//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/node-modules/uview-plus/components/u-dropdown-item/u-dropdown-item.js.map diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-dropdown-item/u-dropdown-item.json b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-dropdown-item/u-dropdown-item.json new file mode 100644 index 0000000..dcc859b --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-dropdown-item/u-dropdown-item.json @@ -0,0 +1,8 @@ +{ + "component": true, + "usingComponents": { + "up-icon": "../u-icon/u-icon", + "up-cell": "../u-cell/u-cell", + "up-cell-group": "../u-cell-group/u-cell-group" + } +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-dropdown-item/u-dropdown-item.wxml b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-dropdown-item/u-dropdown-item.wxml new file mode 100644 index 0000000..12b2663 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-dropdown-item/u-dropdown-item.wxml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-dropdown-item/u-dropdown-item.wxss b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-dropdown-item/u-dropdown-item.wxss new file mode 100644 index 0000000..5b21af4 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-dropdown-item/u-dropdown-item.wxss @@ -0,0 +1,52 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ +.u-empty.data-v-243060d4, +.u-empty__wrap.data-v-243060d4, +.u-tabs.data-v-243060d4, +.u-tabs__wrapper.data-v-243060d4, +.u-tabs__wrapper__scroll-view-wrapper.data-v-243060d4, +.u-tabs__wrapper__scroll-view.data-v-243060d4, +.u-tabs__wrapper__nav.data-v-243060d4, +.u-tabs__wrapper__nav__line.data-v-243060d4, +.up-empty.data-v-243060d4, +.up-empty__wrap.data-v-243060d4, +.up-tabs.data-v-243060d4, +.up-tabs__wrapper.data-v-243060d4, +.up-tabs__wrapper__scroll-view-wrapper.data-v-243060d4, +.up-tabs__wrapper__scroll-view.data-v-243060d4, +.up-tabs__wrapper__nav.data-v-243060d4, +.up-tabs__wrapper__nav__line.data-v-243060d4 { + display: flex; + flex-direction: column; + flex-shrink: 0; + flex-grow: 0; + flex-basis: auto; + align-items: stretch; + align-content: flex-start; +} +.u-dropdown-item__scroll.data-v-243060d4 { + background: #ffffff; +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-dropdown/u-dropdown.js b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-dropdown/u-dropdown.js new file mode 100644 index 0000000..2febe9b --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-dropdown/u-dropdown.js @@ -0,0 +1,155 @@ +"use strict"; +const common_vendor = require("../../../../common/vendor.js"); +const _sfc_main = { + name: "u-dropdown", + mixins: [common_vendor.mpMixin, common_vendor.mixin, common_vendor.props$12], + data() { + return { + showDropdown: true, + // 是否打开下来菜单, + menuList: [], + // 显示的菜单 + active: false, + // 下拉菜单的状态 + // 当前是第几个菜单处于激活状态,小程序中此处不能写成false或者"",否则后续将current赋值为0, + // 无能的TX没有使用===而是使用==判断,导致程序认为前后二者没有变化,从而不会触发视图更新 + current: 99999, + // 外层内容的样式,初始时处于底层,且透明 + contentStyle: { + zIndex: -1, + opacity: 0 + }, + // 让某个菜单保持高亮的状态 + highlightIndex: 99999, + contentHeight: 0 + }; + }, + computed: { + // 下拉出来部分的样式 + popupStyle() { + let style = {}; + style.transform = `translateY(${this.active ? 0 : "-100%"})`; + style["transition-duration"] = this.duration / 1e3 + "s"; + style.borderRadius = `0 0 ${common_vendor.addUnit(this.borderRadius)} ${common_vendor.addUnit(this.borderRadius)}`; + return style; + } + }, + created() { + this.children = []; + }, + mounted() { + this.getContentHeight(); + }, + emits: ["open", "close"], + methods: { + addUnit: common_vendor.addUnit, + init() { + this.menuList = []; + this.children.map((child) => { + child.init(); + }); + }, + // 点击菜单 + menuClick(index) { + if (this.menuList[index].disabled) + return; + if (index === this.current && this.closeOnClickSelf) { + this.close(); + setTimeout(() => { + this.children[index].active = false; + }, this.duration); + return; + } + this.open(index); + }, + // 打开下拉菜单 + open(index) { + if (this.contentHeight < 1) + this.getContentHeight(); + this.contentStyle = { + zIndex: 11 + }; + this.active = true; + this.current = index; + this.children.map((val, idx) => { + val.active = index == idx ? true : false; + }); + this.$emit("open", this.current); + }, + // 设置下拉菜单处于收起状态 + close() { + this.$emit("close", this.current); + this.active = false; + this.current = 99999; + this.contentStyle = { + zIndex: -1, + opacity: 0 + }; + }, + // 点击遮罩 + maskClick() { + if (!this.closeOnClickMask) + return; + this.close(); + }, + // 外部手动设置某个菜单高亮 + highlight(index = void 0) { + this.highlightIndex = index !== void 0 ? index : 99999; + }, + // 获取下拉菜单内容的高度 + getContentHeight() { + let windowHeight = common_vendor.getWindowInfo().windowHeight; + this.$uGetRect(".u-dropdown__menu").then((res) => { + this.contentHeight = windowHeight - res.bottom; + }); + } + } +}; +if (!Array) { + const _easycom_u_icon2 = common_vendor.resolveComponent("u-icon"); + _easycom_u_icon2(); +} +const _easycom_u_icon = () => "../u-icon/u-icon.js"; +if (!Math) { + _easycom_u_icon(); +} +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + return { + a: common_vendor.f($data.menuList, (item, index, i0) => { + return { + a: common_vendor.t(item.title), + b: item.disabled ? "#c0c4cc" : index === $data.current || $data.highlightIndex == index ? _ctx.activeColor : _ctx.inactiveColor, + c: "d45d1d94-0-" + i0, + d: common_vendor.p({ + ["custom-style"]: { + display: "flex" + }, + name: _ctx.menuIcon, + size: $options.addUnit(_ctx.menuIconSize), + color: index === $data.current || $data.highlightIndex == index ? _ctx.activeColor : "#c0c4cc" + }), + e: index === $data.current ? 1 : "", + f: index, + g: common_vendor.o(($event) => $options.menuClick(index), index) + }; + }), + b: $options.addUnit(_ctx.titleSize), + c: $options.addUnit(_ctx.height), + d: _ctx.borderBottom ? 1 : "", + e: common_vendor.o(() => { + }), + f: common_vendor.s($options.popupStyle), + g: common_vendor.s($data.contentStyle), + h: common_vendor.s({ + transition: `opacity ${_ctx.duration / 1e3}s linear`, + top: $options.addUnit(_ctx.height), + height: $data.contentHeight + "px" + }), + i: common_vendor.o((...args) => $options.maskClick && $options.maskClick(...args)), + j: common_vendor.o(() => { + }) + }; +} +const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-d45d1d94"]]); +wx.createComponent(Component); +//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/node-modules/uview-plus/components/u-dropdown/u-dropdown.js.map diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-dropdown/u-dropdown.json b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-dropdown/u-dropdown.json new file mode 100644 index 0000000..fcde44c --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-dropdown/u-dropdown.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "u-icon": "../u-icon/u-icon" + } +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-dropdown/u-dropdown.wxml b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-dropdown/u-dropdown.wxml new file mode 100644 index 0000000..97e0a59 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-dropdown/u-dropdown.wxml @@ -0,0 +1 @@ +{{item.a}} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-dropdown/u-dropdown.wxss b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-dropdown/u-dropdown.wxss new file mode 100644 index 0000000..2bef9a0 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-dropdown/u-dropdown.wxss @@ -0,0 +1,109 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ +.u-empty.data-v-d45d1d94, +.u-empty__wrap.data-v-d45d1d94, +.u-tabs.data-v-d45d1d94, +.u-tabs__wrapper.data-v-d45d1d94, +.u-tabs__wrapper__scroll-view-wrapper.data-v-d45d1d94, +.u-tabs__wrapper__scroll-view.data-v-d45d1d94, +.u-tabs__wrapper__nav.data-v-d45d1d94, +.u-tabs__wrapper__nav__line.data-v-d45d1d94, +.up-empty.data-v-d45d1d94, +.up-empty__wrap.data-v-d45d1d94, +.up-tabs.data-v-d45d1d94, +.up-tabs__wrapper.data-v-d45d1d94, +.up-tabs__wrapper__scroll-view-wrapper.data-v-d45d1d94, +.up-tabs__wrapper__scroll-view.data-v-d45d1d94, +.up-tabs__wrapper__nav.data-v-d45d1d94, +.up-tabs__wrapper__nav__line.data-v-d45d1d94 { + display: flex; + flex-direction: column; + flex-shrink: 0; + flex-grow: 0; + flex-basis: auto; + align-items: stretch; + align-content: flex-start; +} +.u-dropdown.data-v-d45d1d94 { + flex: 1; + width: 100%; + position: relative; +} +.u-dropdown__menu.data-v-d45d1d94 { + display: flex; + flex-direction: row; + position: relative; + z-index: 11; + height: 80rpx; +} +.u-dropdown__menu__item.data-v-d45d1d94 { + flex: 1; + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; +} +.u-dropdown__menu__item .u-flex-row.data-v-d45d1d94 { + flex-direction: row; +} +.u-dropdown__menu__item__text.data-v-d45d1d94 { + font-size: 28rpx; + color: #606266; +} +.u-dropdown__menu__item__arrow.data-v-d45d1d94 { + margin-left: 6rpx; + transition: transform 0.3s; + align-items: center; + display: flex; + flex-direction: row; +} +.u-dropdown__menu__item__arrow--rotate.data-v-d45d1d94 { + transform: rotate(180deg); +} +.u-dropdown__content.data-v-d45d1d94 { + position: absolute; + z-index: 8; + width: 100%; + left: 0px; + bottom: 0; + overflow: hidden; +} +.u-dropdown__content__mask.data-v-d45d1d94 { + position: absolute; + z-index: 9; + background: rgba(0, 0, 0, 0.3); + width: 100%; + left: 0; + top: 0; + bottom: 0; +} +.u-dropdown__content__popup.data-v-d45d1d94 { + position: relative; + z-index: 10; + transition: transform 0.3s; + transform: translate3D(0, -100%, 0); + overflow: hidden; +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-empty/u-empty.js b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-empty/u-empty.js new file mode 100644 index 0000000..9fd9555 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-empty/u-empty.js @@ -0,0 +1,84 @@ +"use strict"; +const common_vendor = require("../../../../common/vendor.js"); +const _sfc_main = { + name: "u-empty", + mixins: [common_vendor.mpMixin, common_vendor.mixin, common_vendor.props$5], + data() { + return { + icons: { + car: "购物车为空", + page: "页面不存在", + search: "没有搜索结果", + address: "没有收货地址", + wifi: "没有WiFi", + order: "订单为空", + coupon: "没有优惠券", + favor: "暂无收藏", + permission: "无权限", + history: "无历史记录", + news: "无新闻列表", + message: "消息列表为空", + list: "列表为空", + data: "数据为空", + comment: "暂无评论" + } + }; + }, + computed: { + // 组件样式 + emptyStyle() { + const style = {}; + style.marginTop = common_vendor.addUnit(this.marginTop); + return common_vendor.deepMerge(common_vendor.addStyle(this.customStyle), style); + }, + // 文本样式 + textStyle() { + const style = {}; + style.color = this.textColor; + style.fontSize = common_vendor.addUnit(this.textSize); + return style; + }, + // 判断icon是否图片路径 + isSrc() { + return this.icon.indexOf("/") >= 0; + } + }, + methods: { + addUnit: common_vendor.addUnit + } +}; +if (!Array) { + const _easycom_u_icon2 = common_vendor.resolveComponent("u-icon"); + _easycom_u_icon2(); +} +const _easycom_u_icon = () => "../u-icon/u-icon.js"; +if (!Math) { + _easycom_u_icon(); +} +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + return common_vendor.e({ + a: _ctx.show + }, _ctx.show ? common_vendor.e({ + b: !$options.isSrc + }, !$options.isSrc ? { + c: common_vendor.p({ + name: _ctx.mode === "message" ? "chat" : `empty-${_ctx.mode}`, + size: _ctx.iconSize, + color: _ctx.iconColor, + ["margin-top"]: "14" + }) + } : { + d: $options.addUnit(_ctx.width), + e: $options.addUnit(_ctx.height), + f: _ctx.icon + }, { + g: common_vendor.t(_ctx.text ? _ctx.text : $data.icons[_ctx.mode]), + h: common_vendor.s($options.textStyle), + i: _ctx.$slots.default || _ctx.$slots.$default + }, _ctx.$slots.default || _ctx.$slots.$default ? {} : {}, { + j: common_vendor.s($options.emptyStyle) + }) : {}); +} +const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-bd84101d"]]); +wx.createComponent(Component); +//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/node-modules/uview-plus/components/u-empty/u-empty.js.map diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-empty/u-empty.json b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-empty/u-empty.json new file mode 100644 index 0000000..fcde44c --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-empty/u-empty.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "u-icon": "../u-icon/u-icon" + } +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-empty/u-empty.wxml b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-empty/u-empty.wxml new file mode 100644 index 0000000..9178b74 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-empty/u-empty.wxml @@ -0,0 +1 @@ +{{g}} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-empty/u-empty.wxss b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-empty/u-empty.wxss new file mode 100644 index 0000000..9f095df --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-empty/u-empty.wxss @@ -0,0 +1,70 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ +.u-empty.data-v-bd84101d, +.u-empty__wrap.data-v-bd84101d, +.u-tabs.data-v-bd84101d, +.u-tabs__wrapper.data-v-bd84101d, +.u-tabs__wrapper__scroll-view-wrapper.data-v-bd84101d, +.u-tabs__wrapper__scroll-view.data-v-bd84101d, +.u-tabs__wrapper__nav.data-v-bd84101d, +.u-tabs__wrapper__nav__line.data-v-bd84101d, +.up-empty.data-v-bd84101d, +.up-empty__wrap.data-v-bd84101d, +.up-tabs.data-v-bd84101d, +.up-tabs__wrapper.data-v-bd84101d, +.up-tabs__wrapper__scroll-view-wrapper.data-v-bd84101d, +.up-tabs__wrapper__scroll-view.data-v-bd84101d, +.up-tabs__wrapper__nav.data-v-bd84101d, +.up-tabs__wrapper__nav__line.data-v-bd84101d { + display: flex; + flex-direction: column; + flex-shrink: 0; + flex-grow: 0; + flex-basis: auto; + align-items: stretch; + align-content: flex-start; +} +.u-empty.data-v-bd84101d { + display: flex; + flex-direction: row; + flex-direction: column; + justify-content: center; + align-items: center; +} +.u-empty__text.data-v-bd84101d { + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; + margin-top: 20rpx; +} +.u-slot-wrap.data-v-bd84101d { + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; + margin-top: 20rpx; +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-form-item/u-form-item.js b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-form-item/u-form-item.js new file mode 100644 index 0000000..8827c86 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-form-item/u-form-item.js @@ -0,0 +1,137 @@ +"use strict"; +const common_vendor = require("../../../../common/vendor.js"); +const _sfc_main = { + name: "u-form-item", + mixins: [common_vendor.mpMixin, common_vendor.mixin, common_vendor.props$13], + data() { + return { + // 错误提示语 + message: "", + parentData: { + // 提示文本的位置 + labelPosition: "left", + // 提示文本对齐方式 + labelAlign: "left", + // 提示文本的样式 + labelStyle: {}, + // 提示文本的宽度 + labelWidth: 45, + // 错误提示方式 + errorType: "message" + }, + color: common_vendor.color, + itemRules: [] + }; + }, + // 组件创建完成时,将当前实例保存到u-form中 + computed: { + propsLine() { + return common_vendor.props$14.line; + } + }, + mounted() { + this.init(); + }, + emits: ["click"], + watch: { + // 监听规则的变化 + rules: { + immediate: true, + handler(n) { + this.setRules(n); + } + } + }, + methods: { + addStyle: common_vendor.addStyle, + addUnit: common_vendor.addUnit, + init() { + this.updateParentData(); + if (!this.parent) { + common_vendor.error("u-form-item需要结合u-form组件使用"); + } + }, + // 手动设置校验的规则,如果规则中有函数的话,微信小程序中会过滤掉,所以只能手动调用设置规则 + setRules(rules) { + if (rules.length === 0) { + this.itemRules = []; + return; + } + this.itemRules = rules; + }, + // 获取父组件的参数 + updateParentData() { + this.getParentData("u-form"); + }, + // 移除u-form-item的校验结果 + clearValidate() { + this.message = null; + }, + // 清空当前的组件的校验结果,并重置为初始值 + resetField() { + const value = common_vendor.getProperty(this.parent.originalModel, this.prop); + common_vendor.setProperty(this.parent.model, this.prop, value); + this.message = null; + }, + // 点击组件 + clickHandler() { + this.$emit("click"); + } + } +}; +if (!Array) { + const _easycom_u_icon2 = common_vendor.resolveComponent("u-icon"); + const _easycom_u_line2 = common_vendor.resolveComponent("u-line"); + (_easycom_u_icon2 + _easycom_u_line2)(); +} +const _easycom_u_icon = () => "../u-icon/u-icon.js"; +const _easycom_u_line = () => "../u-line/u-line.js"; +if (!Math) { + (_easycom_u_icon + _easycom_u_line)(); +} +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + return common_vendor.e({ + a: _ctx.required || _ctx.leftIcon || _ctx.label + }, _ctx.required || _ctx.leftIcon || _ctx.label ? common_vendor.e({ + b: _ctx.required + }, _ctx.required ? {} : {}, { + c: _ctx.leftIcon + }, _ctx.leftIcon ? { + d: common_vendor.p({ + name: _ctx.leftIcon, + ["custom-style"]: _ctx.leftIconStyle + }) + } : {}, { + e: common_vendor.t(_ctx.label), + f: common_vendor.s($data.parentData.labelStyle), + g: common_vendor.s({ + justifyContent: $data.parentData.labelAlign === "left" ? "flex-start" : $data.parentData.labelAlign === "center" ? "center" : "flex-end" + }), + h: $options.addUnit(_ctx.labelWidth || $data.parentData.labelWidth), + i: $data.parentData.labelPosition === "left" ? 0 : "5px" + }) : {}, { + j: _ctx.$slots.right + }, _ctx.$slots.right ? {} : {}, { + k: common_vendor.o((...args) => $options.clickHandler && $options.clickHandler(...args)), + l: common_vendor.s($options.addStyle(_ctx.customStyle)), + m: common_vendor.s({ + flexDirection: (_ctx.labelPosition || $data.parentData.labelPosition) === "left" ? "row" : "column" + }), + n: !!$data.message && $data.parentData.errorType === "message" + }, !!$data.message && $data.parentData.errorType === "message" ? { + o: common_vendor.t($data.message), + p: $options.addUnit($data.parentData.labelPosition === "top" ? 0 : _ctx.labelWidth || $data.parentData.labelWidth) + } : {}, { + q: _ctx.borderBottom + }, _ctx.borderBottom ? { + r: common_vendor.p({ + color: $data.message && $data.parentData.errorType === "border-bottom" ? $data.color.error : $options.propsLine.color, + customStyle: `margin-top: ${$data.message && $data.parentData.errorType === "message" ? "5px" : 0}` + }) + } : {}, { + s: !!$data.message && $data.parentData.errorType === "message" ? 1 : "" + }); +} +const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-b4fd400b"]]); +wx.createComponent(Component); +//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/node-modules/uview-plus/components/u-form-item/u-form-item.js.map diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-form-item/u-form-item.json b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-form-item/u-form-item.json new file mode 100644 index 0000000..9dd4979 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-form-item/u-form-item.json @@ -0,0 +1,7 @@ +{ + "component": true, + "usingComponents": { + "u-icon": "../u-icon/u-icon", + "u-line": "../u-line/u-line" + } +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-form-item/u-form-item.wxml b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-form-item/u-form-item.wxml new file mode 100644 index 0000000..36c6223 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-form-item/u-form-item.wxml @@ -0,0 +1 @@ +*{{o}} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-form-item/u-form-item.wxss b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-form-item/u-form-item.wxss new file mode 100644 index 0000000..916a1c2 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-form-item/u-form-item.wxss @@ -0,0 +1,114 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ +.u-empty.data-v-b4fd400b, +.u-empty__wrap.data-v-b4fd400b, +.u-tabs.data-v-b4fd400b, +.u-tabs__wrapper.data-v-b4fd400b, +.u-tabs__wrapper__scroll-view-wrapper.data-v-b4fd400b, +.u-tabs__wrapper__scroll-view.data-v-b4fd400b, +.u-tabs__wrapper__nav.data-v-b4fd400b, +.u-tabs__wrapper__nav__line.data-v-b4fd400b, +.up-empty.data-v-b4fd400b, +.up-empty__wrap.data-v-b4fd400b, +.up-tabs.data-v-b4fd400b, +.up-tabs__wrapper.data-v-b4fd400b, +.up-tabs__wrapper__scroll-view-wrapper.data-v-b4fd400b, +.up-tabs__wrapper__scroll-view.data-v-b4fd400b, +.up-tabs__wrapper__nav.data-v-b4fd400b, +.up-tabs__wrapper__nav__line.data-v-b4fd400b { + display: flex; + flex-direction: column; + flex-shrink: 0; + flex-grow: 0; + flex-basis: auto; + align-items: stretch; + align-content: flex-start; +} +.u-form-item.data-v-b4fd400b { + display: flex; + flex-direction: column; + font-size: 14px; + color: #303133; +} +.u-form-item__body.data-v-b4fd400b { + display: flex; + flex-direction: row; + padding: 10px 0; +} +.u-form-item__body__left.data-v-b4fd400b { + display: flex; + flex-direction: row; + align-items: center; +} +.u-form-item__body__left__content.data-v-b4fd400b { + position: relative; + display: flex; + flex-direction: row; + align-items: center; + padding-right: 10rpx; + flex: 1; +} +.u-form-item__body__left__content__icon.data-v-b4fd400b { + margin-right: 8rpx; +} +.u-form-item__body__left__content__required.data-v-b4fd400b { + position: absolute; + left: -9px; + color: #f56c6c; + line-height: 20px; + font-size: 20px; + top: 3px; +} +.u-form-item__body__left__content__label.data-v-b4fd400b { + display: flex; + flex-direction: row; + align-items: center; + flex: 1; + color: #303133; + font-size: 15px; +} +.u-form-item__body__right.data-v-b4fd400b { + flex: 1; +} +.u-form-item__body__right__content.data-v-b4fd400b { + display: flex; + flex-direction: row; + align-items: center; + flex: 1; +} +.u-form-item__body__right__content__slot.data-v-b4fd400b { + flex: 1; +} +.u-form-item__body__right__content__icon.data-v-b4fd400b { + margin-left: 10rpx; + color: #c0c4cc; + font-size: 30rpx; +} +.u-form-item__body__right__message.data-v-b4fd400b { + font-size: 12px; + line-height: 12px; + color: #f56c6c; +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-form/u-form.js b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-form/u-form.js new file mode 100644 index 0000000..1afbd64 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-form/u-form.js @@ -0,0 +1,203 @@ +"use strict"; +const common_vendor = require("../../../../common/vendor.js"); +common_vendor.Schema.warning = function() { +}; +const _sfc_main = { + name: "u-form", + mixins: [common_vendor.mpMixin, common_vendor.mixin, common_vendor.props$17], + provide() { + return { + uForm: this + }; + }, + data() { + return { + formRules: {}, + // 规则校验器 + validator: {}, + // 原始的model快照,用于resetFields方法重置表单时使用 + originalModel: null + }; + }, + watch: { + // 监听规则的变化 + rules: { + immediate: true, + handler(n) { + this.setRules(n); + } + }, + // 监听属性的变化,通知子组件u-form-item重新获取信息 + propsChange(n) { + var _a; + if ((_a = this.children) == null ? void 0 : _a.length) { + this.children.map((child) => { + typeof child.updateParentData == "function" && child.updateParentData(); + }); + } + }, + // 监听model的初始值作为重置表单的快照 + model: { + immediate: true, + handler(n) { + if (!this.originalModel) { + this.originalModel = common_vendor.deepClone(n); + } + } + } + }, + computed: { + propsChange() { + return [ + this.errorType, + this.borderBottom, + this.labelPosition, + this.labelWidth, + this.labelAlign, + this.labelStyle + ]; + } + }, + created() { + this.children = []; + }, + methods: { + // 手动设置校验的规则,如果规则中有函数的话,微信小程序中会过滤掉,所以只能手动调用设置规则 + setRules(rules) { + if (Object.keys(rules).length === 0) + return; + if (Object.keys(this.model).length === 0) { + common_vendor.error("设置rules,model必须设置!如果已经设置,请刷新页面。"); + return; + } + this.formRules = rules; + this.validator = new common_vendor.Schema(rules); + }, + // 清空所有u-form-item组件的内容,本质上是调用了u-form-item组件中的resetField()方法 + resetFields() { + this.resetModel(); + }, + // 重置model为初始值的快照 + resetModel(obj) { + this.children.map((child) => { + const prop = child == null ? void 0 : child.prop; + const value = common_vendor.getProperty(this.originalModel, prop); + common_vendor.setProperty(this.model, prop, value); + }); + }, + // 清空校验结果 + clearValidate(props2) { + props2 = [].concat(props2); + this.children.map((child) => { + if (props2[0] === void 0 || props2.includes(child.prop)) { + child.message = null; + } + }); + }, + // 对部分表单字段进行校验 + async validateField(value, callback, event = null, options) { + this.$nextTick(() => { + const errorsRes = []; + value = [].concat(value); + let promises = this.children.map((child) => { + return new Promise((resolve, reject) => { + const childErrors = []; + if (value.includes(child.prop)) { + const propertyVal = common_vendor.getProperty( + this.model, + child.prop + ); + const propertyChain = child.prop.split("."); + const propertyName = propertyChain[propertyChain.length - 1]; + let rule = []; + if (child.itemRules && child.itemRules.length > 0) { + rule = child.itemRules; + } else { + rule = this.formRules[child.prop]; + } + if (!rule) { + resolve(); + return; + } + const rules = [].concat(rule); + if (!rules.length) { + resolve(); + } + for (let i = 0; i < rules.length; i++) { + const ruleItem = rules[i]; + const trigger = [].concat(ruleItem == null ? void 0 : ruleItem.trigger); + if (event && !trigger.includes(event)) { + resolve(); + continue; + } + const validator = new common_vendor.Schema({ + [propertyName]: ruleItem + }); + validator.validate( + { + [propertyName]: propertyVal + }, + (errors, fields) => { + var _a; + if (common_vendor.test.array(errors)) { + errors.forEach((element) => { + element.prop = child.prop; + }); + errorsRes.push(...errors); + childErrors.push(...errors); + } + if (!options || (options == null ? void 0 : options.showErrorMsg) == true) { + child.message = ((_a = childErrors[0]) == null ? void 0 : _a.message) ? childErrors[0].message : null; + } + if (i == rules.length - 1) { + resolve(errorsRes); + } + } + ); + } + } else { + resolve({}); + } + }); + }); + Promise.all(promises).then((results) => { + typeof callback === "function" && callback(errorsRes); + }).catch((error2) => { + common_vendor.index.__f__("error", "at node_modules/uview-plus/components/u-form/u-form.vue:218", "An error occurred:", error2); + }); + }); + }, + /** + * 校验全部数据 + * @param {Object} options + * @param {Boolean} options.showErrorMsg -是否显示校验信息, + */ + validate(options) { + if (Object.keys(this.formRules).length === 0) { + common_vendor.error("未设置rules,请看文档说明!如果已经设置,请刷新页面。"); + return; + } + return new Promise((resolve, reject) => { + this.$nextTick(() => { + const formItemProps = this.children.map( + (item) => item.prop + ); + this.validateField(formItemProps, (errors) => { + if (errors.length) { + this.errorType === "toast" && common_vendor.toast(errors[0].message); + reject(errors); + } else { + resolve(true); + } + }, null, options); + }); + }); + } + } +}; +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + return {}; +} +const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]); +wx.createComponent(Component); +//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/node-modules/uview-plus/components/u-form/u-form.js.map diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-form/u-form.json b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-form/u-form.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-form/u-form.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-form/u-form.wxml b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-form/u-form.wxml new file mode 100644 index 0000000..292cef5 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-form/u-form.wxml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-form/u-form.wxss b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-form/u-form.wxss new file mode 100644 index 0000000..e69de29 diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-gap/u-gap.json b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-gap/u-gap.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-gap/u-gap.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-gap/u-gap.wxml b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-gap/u-gap.wxml new file mode 100644 index 0000000..09bd242 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-gap/u-gap.wxml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-gap/u-gap.wxss b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-gap/u-gap.wxss new file mode 100644 index 0000000..fbb50bd --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-gap/u-gap.wxss @@ -0,0 +1,49 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ +.u-empty.data-v-a491fc03, +.u-empty__wrap.data-v-a491fc03, +.u-tabs.data-v-a491fc03, +.u-tabs__wrapper.data-v-a491fc03, +.u-tabs__wrapper__scroll-view-wrapper.data-v-a491fc03, +.u-tabs__wrapper__scroll-view.data-v-a491fc03, +.u-tabs__wrapper__nav.data-v-a491fc03, +.u-tabs__wrapper__nav__line.data-v-a491fc03, +.up-empty.data-v-a491fc03, +.up-empty__wrap.data-v-a491fc03, +.up-tabs.data-v-a491fc03, +.up-tabs__wrapper.data-v-a491fc03, +.up-tabs__wrapper__scroll-view-wrapper.data-v-a491fc03, +.up-tabs__wrapper__scroll-view.data-v-a491fc03, +.up-tabs__wrapper__nav.data-v-a491fc03, +.up-tabs__wrapper__nav__line.data-v-a491fc03 { + display: flex; + flex-direction: column; + flex-shrink: 0; + flex-grow: 0; + flex-basis: auto; + align-items: stretch; + align-content: flex-start; +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-icon/u-icon.js b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-icon/u-icon.js new file mode 100644 index 0000000..418847c --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-icon/u-icon.js @@ -0,0 +1,96 @@ +"use strict"; +const common_vendor = require("../../../../common/vendor.js"); +const _sfc_main = { + name: "u-icon", + beforeCreate() { + }, + data() { + return {}; + }, + emits: ["click"], + mixins: [common_vendor.mpMixin, common_vendor.mixin, common_vendor.props$1], + computed: { + uClasses() { + let classes = []; + classes.push(this.customPrefix + "-" + this.name); + if (this.customPrefix == "uicon") { + classes.push("u-iconfont"); + } else { + classes.push(this.customPrefix); + } + if (this.color && common_vendor.config.type.includes(this.color)) + classes.push("u-icon__icon--" + this.color); + return classes; + }, + iconStyle() { + let style = {}; + style = { + fontSize: common_vendor.addUnit(this.size), + lineHeight: common_vendor.addUnit(this.size), + fontWeight: this.bold ? "bold" : "normal", + // 某些特殊情况需要设置一个到顶部的距离,才能更好的垂直居中 + top: common_vendor.addUnit(this.top) + }; + if (this.color && !common_vendor.config.type.includes(this.color)) + style.color = this.color; + return style; + }, + // 判断传入的name属性,是否图片路径,只要带有"/"均认为是图片形式 + isImg() { + return this.name.indexOf("/") !== -1; + }, + imgStyle() { + let style = {}; + style.width = this.width ? common_vendor.addUnit(this.width) : common_vendor.addUnit(this.size); + style.height = this.height ? common_vendor.addUnit(this.height) : common_vendor.addUnit(this.size); + return style; + }, + // 通过图标名,查找对应的图标 + icon() { + if (this.customPrefix !== "uicon") { + return this.customIcons[this.customPrefix + "-" + this.name] || this.name; + } + return common_vendor.icons["uicon-" + this.name] || this.name; + } + }, + methods: { + addStyle: common_vendor.addStyle, + addUnit: common_vendor.addUnit, + clickHandler(e) { + this.$emit("click", this.index, e); + this.stop && this.preventEvent(e); + } + } +}; +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + return common_vendor.e({ + a: $options.isImg + }, $options.isImg ? { + b: _ctx.name, + c: _ctx.imgMode, + d: common_vendor.s($options.imgStyle), + e: common_vendor.s($options.addStyle(_ctx.customStyle)) + } : { + f: common_vendor.t($options.icon), + g: common_vendor.n($options.uClasses), + h: common_vendor.s($options.iconStyle), + i: common_vendor.s($options.addStyle(_ctx.customStyle)), + j: _ctx.hoverClass + }, { + k: _ctx.label !== "" + }, _ctx.label !== "" ? { + l: common_vendor.t(_ctx.label), + m: _ctx.labelColor, + n: $options.addUnit(_ctx.labelSize), + o: _ctx.labelPos == "right" ? $options.addUnit(_ctx.space) : 0, + p: _ctx.labelPos == "bottom" ? $options.addUnit(_ctx.space) : 0, + q: _ctx.labelPos == "left" ? $options.addUnit(_ctx.space) : 0, + r: _ctx.labelPos == "top" ? $options.addUnit(_ctx.space) : 0 + } : {}, { + s: common_vendor.o((...args) => $options.clickHandler && $options.clickHandler(...args)), + t: common_vendor.n("u-icon--" + _ctx.labelPos) + }); +} +const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-1c933a9a"]]); +wx.createComponent(Component); +//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/node-modules/uview-plus/components/u-icon/u-icon.js.map diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-icon/u-icon.json b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-icon/u-icon.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-icon/u-icon.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-icon/u-icon.wxml b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-icon/u-icon.wxml new file mode 100644 index 0000000..a71e0c2 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-icon/u-icon.wxml @@ -0,0 +1 @@ +{{f}}{{l}} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-icon/u-icon.wxss b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-icon/u-icon.wxss new file mode 100644 index 0000000..60b5831 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-icon/u-icon.wxss @@ -0,0 +1,102 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ +.u-empty.data-v-1c933a9a, +.u-empty__wrap.data-v-1c933a9a, +.u-tabs.data-v-1c933a9a, +.u-tabs__wrapper.data-v-1c933a9a, +.u-tabs__wrapper__scroll-view-wrapper.data-v-1c933a9a, +.u-tabs__wrapper__scroll-view.data-v-1c933a9a, +.u-tabs__wrapper__nav.data-v-1c933a9a, +.u-tabs__wrapper__nav__line.data-v-1c933a9a, +.up-empty.data-v-1c933a9a, +.up-empty__wrap.data-v-1c933a9a, +.up-tabs.data-v-1c933a9a, +.up-tabs__wrapper.data-v-1c933a9a, +.up-tabs__wrapper__scroll-view-wrapper.data-v-1c933a9a, +.up-tabs__wrapper__scroll-view.data-v-1c933a9a, +.up-tabs__wrapper__nav.data-v-1c933a9a, +.up-tabs__wrapper__nav__line.data-v-1c933a9a { + display: flex; + flex-direction: column; + flex-shrink: 0; + flex-grow: 0; + flex-basis: auto; + align-items: stretch; + align-content: flex-start; +} +@font-face { + font-family: "uicon-iconfont"; + src: url("https://at.alicdn.com/t/font_2225171_8kdcwk4po24.ttf") format("truetype"); +} +.u-icon.data-v-1c933a9a { + display: flex; + align-items: center; +} +.u-icon--left.data-v-1c933a9a { + flex-direction: row-reverse; + align-items: center; +} +.u-icon--right.data-v-1c933a9a { + flex-direction: row; + align-items: center; +} +.u-icon--top.data-v-1c933a9a { + flex-direction: column-reverse; + justify-content: center; +} +.u-icon--bottom.data-v-1c933a9a { + flex-direction: column; + justify-content: center; +} +.u-icon__icon.data-v-1c933a9a { + font-family: uicon-iconfont; + position: relative; + display: flex; + flex-direction: row; + align-items: center; +} +.u-icon__icon--primary.data-v-1c933a9a { + color: #3c9cff; +} +.u-icon__icon--success.data-v-1c933a9a { + color: #5ac725; +} +.u-icon__icon--error.data-v-1c933a9a { + color: #f56c6c; +} +.u-icon__icon--warning.data-v-1c933a9a { + color: #f9ae3d; +} +.u-icon__icon--info.data-v-1c933a9a { + color: #909399; +} +.u-icon__img.data-v-1c933a9a { + height: auto; + will-change: transform; +} +.u-icon__label.data-v-1c933a9a { + line-height: 1; +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-image/u-image.js b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-image/u-image.js new file mode 100644 index 0000000..d0e8856 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-image/u-image.js @@ -0,0 +1,152 @@ +"use strict"; +const common_vendor = require("../../../../common/vendor.js"); +const _sfc_main = { + name: "u-image", + mixins: [common_vendor.mpMixin, common_vendor.mixin, common_vendor.props], + data() { + return { + // 图片是否加载错误,如果是,则显示错误占位图 + isError: false, + // 初始化组件时,默认为加载中状态 + loading: true, + // 不透明度,为了实现淡入淡出的效果 + opacity: 1, + // 过渡时间,因为props的值无法修改,故需要一个中间值 + durationTime: this.duration, + // 图片加载完成时,去掉背景颜色,因为如果是png图片,就会显示灰色的背景 + backgroundStyle: {}, + // 用于fade模式的控制组件显示与否 + show: false + }; + }, + watch: { + src: { + immediate: true, + handler(n) { + if (!n) { + this.isError = true; + } else { + this.isError = false; + this.loading = true; + } + } + } + }, + computed: { + transStyle() { + let style = {}; + if (this.loading || this.isError || this.width == "100%" || this.mode != "heightFix") { + style.width = this.width; + } else { + style.width = "fit-content"; + } + if (this.loading || this.isError || this.height == "100%" || this.mode != "widthFix") { + style.height = this.height; + } else { + style.height = "fit-content"; + } + return style; + }, + wrapStyle() { + let style = {}; + if (this.loading || this.isError || this.width == "100%" || this.mode != "heightFix") { + style.width = this.width; + } else { + style.width = "fit-content"; + } + if (this.loading || this.isError || this.height == "100%" || this.mode != "widthFix") { + style.height = this.height; + } else { + style.height = "fit-content"; + } + style.borderRadius = this.shape == "circle" ? "10000px" : common_vendor.addUnit(this.radius); + style.overflow = this.radius > 0 ? "hidden" : "visible"; + return common_vendor.deepMerge(style, common_vendor.addStyle(this.customStyle)); + } + }, + mounted() { + this.show = true; + }, + emits: ["click", "error", "load"], + methods: { + addUnit: common_vendor.addUnit, + // 点击图片 + onClick(e) { + this.$emit("click", e); + }, + // 图片加载失败 + onErrorHandler(err) { + this.loading = false; + this.isError = true; + this.$emit("error", err); + }, + // 图片加载完成,标记loading结束 + onLoadHandler(event) { + this.loading = false; + this.isError = false; + this.$emit("load", event); + this.removeBgColor(); + }, + // 移除图片的背景色 + removeBgColor() { + this.backgroundStyle = { + backgroundColor: this.bgColor || "#ffffff" + }; + } + } +}; +if (!Array) { + const _easycom_u_icon2 = common_vendor.resolveComponent("u-icon"); + const _easycom_u_transition2 = common_vendor.resolveComponent("u-transition"); + (_easycom_u_icon2 + _easycom_u_transition2)(); +} +const _easycom_u_icon = () => "../u-icon/u-icon.js"; +const _easycom_u_transition = () => "../u-transition/u-transition.js"; +if (!Math) { + (_easycom_u_icon + _easycom_u_transition)(); +} +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + return common_vendor.e({ + a: !$data.isError + }, !$data.isError ? { + b: _ctx.src, + c: _ctx.mode, + d: common_vendor.o((...args) => $options.onErrorHandler && $options.onErrorHandler(...args)), + e: common_vendor.o((...args) => $options.onLoadHandler && $options.onLoadHandler(...args)), + f: _ctx.showMenuByLongpress, + g: _ctx.lazyLoad, + h: $options.addUnit(_ctx.width), + i: $options.addUnit(_ctx.height), + j: _ctx.shape == "circle" ? "10000px" : $options.addUnit(_ctx.radius) + } : {}, { + k: _ctx.showLoading && $data.loading + }, _ctx.showLoading && $data.loading ? { + l: common_vendor.p({ + name: _ctx.loadingIcon + }), + m: _ctx.shape == "circle" ? "50%" : $options.addUnit(_ctx.radius), + n: this.bgColor, + o: $options.addUnit(_ctx.width), + p: $options.addUnit(_ctx.height) + } : {}, { + q: _ctx.showError && $data.isError && !$data.loading + }, _ctx.showError && $data.isError && !$data.loading ? { + r: common_vendor.p({ + name: _ctx.errorIcon + }), + s: _ctx.shape == "circle" ? "50%" : $options.addUnit(_ctx.radius) + } : {}, { + t: common_vendor.o((...args) => $options.onClick && $options.onClick(...args)), + v: common_vendor.s($options.wrapStyle), + w: common_vendor.s($data.backgroundStyle), + x: common_vendor.s($options.transStyle), + y: common_vendor.p({ + mode: "fade", + show: $data.show, + duration: _ctx.fade ? 1e3 : 0 + }) + }); +} +const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-9d58ba7c"]]); +wx.createComponent(Component); +//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/node-modules/uview-plus/components/u-image/u-image.js.map diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-image/u-image.json b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-image/u-image.json new file mode 100644 index 0000000..8a7924b --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-image/u-image.json @@ -0,0 +1,7 @@ +{ + "component": true, + "usingComponents": { + "u-icon": "../u-icon/u-icon", + "u-transition": "../u-transition/u-transition" + } +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-image/u-image.wxml b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-image/u-image.wxml new file mode 100644 index 0000000..bc786e0 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-image/u-image.wxml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-image/u-image.wxss b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-image/u-image.wxss new file mode 100644 index 0000000..0329c04 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-image/u-image.wxss @@ -0,0 +1,71 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ +.u-empty.data-v-9d58ba7c, +.u-empty__wrap.data-v-9d58ba7c, +.u-tabs.data-v-9d58ba7c, +.u-tabs__wrapper.data-v-9d58ba7c, +.u-tabs__wrapper__scroll-view-wrapper.data-v-9d58ba7c, +.u-tabs__wrapper__scroll-view.data-v-9d58ba7c, +.u-tabs__wrapper__nav.data-v-9d58ba7c, +.u-tabs__wrapper__nav__line.data-v-9d58ba7c, +.up-empty.data-v-9d58ba7c, +.up-empty__wrap.data-v-9d58ba7c, +.up-tabs.data-v-9d58ba7c, +.up-tabs__wrapper.data-v-9d58ba7c, +.up-tabs__wrapper__scroll-view-wrapper.data-v-9d58ba7c, +.up-tabs__wrapper__scroll-view.data-v-9d58ba7c, +.up-tabs__wrapper__nav.data-v-9d58ba7c, +.up-tabs__wrapper__nav__line.data-v-9d58ba7c { + display: flex; + flex-direction: column; + flex-shrink: 0; + flex-grow: 0; + flex-basis: auto; + align-items: stretch; + align-content: flex-start; +} +.u-image.data-v-9d58ba7c { + position: relative; + transition: opacity 0.5s ease-in-out; +} +.u-image__image.data-v-9d58ba7c { + width: 100%; + height: 100%; +} +.u-image__loading.data-v-9d58ba7c, .u-image__error.data-v-9d58ba7c { + position: absolute; + top: 0px; + left: 0px; + width: 100%; + height: 100%; + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; + background-color: #f3f4f6; + color: #909193; + font-size: 46rpx; +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-input/u-input.js b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-input/u-input.js new file mode 100644 index 0000000..881b97f --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-input/u-input.js @@ -0,0 +1,242 @@ +"use strict"; +const common_vendor = require("../../../../common/vendor.js"); +const _sfc_main = { + name: "u-input", + mixins: [common_vendor.mpMixin, common_vendor.mixin, common_vendor.props$3], + data() { + return { + // 清除操作 + clearInput: false, + // 输入框的值 + innerValue: "", + // 是否处于获得焦点状态 + focused: false, + // value是否第一次变化,在watch中,由于加入immediate属性,会在第一次触发,此时不应该认为value发生了变化 + firstChange: true, + // value绑定值的变化是由内部还是外部引起的 + changeFromInner: false, + // 过滤处理方法 + innerFormatter: (value) => value + }; + }, + created() { + if (this.formatter) { + this.innerFormatter = this.formatter; + } + }, + watch: { + modelValue: { + immediate: true, + handler(newVal, oldVal) { + if (this.changeFromInner || this.innerValue === newVal) { + this.changeFromInner = false; + return; + } + this.innerValue = newVal; + if (this.firstChange === false && this.changeFromInner === false) { + this.valueChange(this.innerValue, true); + } else { + if (!this.firstChange) + common_vendor.formValidate(this, "change"); + } + this.firstChange = false; + this.changeFromInner = false; + } + } + }, + computed: { + // 是否显示清除控件 + isShowClear() { + const { clearable, readonly, focused, innerValue } = this; + return !!clearable && !readonly && !!focused && innerValue !== ""; + }, + // 组件的类名 + inputClass() { + let classes = [], { border, disabled, shape } = this; + border === "surround" && (classes = classes.concat(["u-border", "u-input--radius"])); + classes.push(`u-input--${shape}`); + border === "bottom" && (classes = classes.concat([ + "u-border-bottom", + "u-input--no-radius" + ])); + return classes.join(" "); + }, + // 组件的样式 + wrapperStyle() { + const style = {}; + if (this.disabled) { + style.backgroundColor = this.disabledColor; + } + if (this.border === "none") { + style.padding = "0"; + } else { + style.paddingTop = "6px"; + style.paddingBottom = "6px"; + style.paddingLeft = "9px"; + style.paddingRight = "9px"; + } + return common_vendor.deepMerge(style, common_vendor.addStyle(this.customStyle)); + }, + // 输入框的样式 + inputStyle() { + const style = { + color: this.color, + fontSize: common_vendor.addUnit(this.fontSize), + textAlign: this.inputAlign + }; + return style; + } + }, + emits: ["update:modelValue", "focus", "blur", "change", "confirm", "clear", "keyboardheightchange", "nicknamereview"], + methods: { + // 在微信小程序中,不支持将函数当做props参数,故只能通过ref形式调用 + setFormatter(e) { + this.innerFormatter = e; + }, + // 当键盘输入时,触发input事件 + onInput(e) { + let { value = "" } = e.detail || {}; + this.innerValue = value; + this.$nextTick(() => { + let formatValue = this.innerFormatter(value); + this.innerValue = formatValue; + this.valueChange(formatValue); + }); + }, + // 输入框失去焦点时触发 + onBlur(event) { + this.$emit("blur", event.detail.value); + common_vendor.sleep(150).then(() => { + this.focused = false; + }); + common_vendor.formValidate(this, "blur"); + }, + // 输入框聚焦时触发 + onFocus(event) { + this.focused = true; + this.$emit("focus"); + }, + doFocus() { + this.$refs["input-native"].focus(); + }, + doBlur() { + this.$refs["input-native"].blur(); + }, + // 点击完成按钮时触发 + onConfirm(event) { + this.$emit("confirm", this.innerValue); + }, + // 键盘高度发生变化的时候触发此事件 + // 兼容性:微信小程序2.7.0+、App 3.1.0+ + onkeyboardheightchange(event) { + this.$emit("keyboardheightchange", event); + }, + onnicknamereview(event) { + this.$emit("nicknamereview", event); + }, + // 内容发生变化,进行处理 + valueChange(value, isOut = false) { + if (this.clearInput) { + this.innerValue = ""; + this.clearInput = false; + } + this.$nextTick(() => { + if (!isOut || this.clearInput) { + this.changeFromInner = true; + this.$emit("change", value); + this.$emit("update:modelValue", value); + } + common_vendor.formValidate(this, "change"); + }); + }, + // 点击清除控件 + onClear() { + this.clearInput = true; + this.innerValue = ""; + this.$nextTick(() => { + this.valueChange(""); + this.$emit("clear"); + }); + }, + /** + * 在安卓nvue上,事件无法冒泡 + * 在某些时间,我们希望监听u-from-item的点击事件,此时会导致点击u-form-item内的u-input后 + * 无法触发u-form-item的点击事件,这里通过手动调用u-form-item的方法进行触发 + */ + clickHandler() { + if (this.disabled || this.readonly) { + common_vendor.index.hideKeyboard(); + } + } + } +}; +if (!Array) { + const _easycom_u_icon2 = common_vendor.resolveComponent("u-icon"); + _easycom_u_icon2(); +} +const _easycom_u_icon = () => "../u-icon/u-icon.js"; +if (!Math) { + _easycom_u_icon(); +} +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + return common_vendor.e({ + a: _ctx.prefixIcon || _ctx.$slots.prefix + }, _ctx.prefixIcon || _ctx.$slots.prefix ? { + b: common_vendor.p({ + name: _ctx.prefixIcon, + size: "18", + customStyle: _ctx.prefixIconStyle + }) + } : {}, { + c: common_vendor.s($options.inputStyle), + d: _ctx.type, + e: _ctx.focus, + f: _ctx.cursor, + g: $data.innerValue, + h: _ctx.autoBlur, + i: _ctx.disabled || _ctx.readonly, + j: _ctx.maxlength, + k: _ctx.placeholder, + l: _ctx.placeholderStyle, + m: _ctx.placeholderClass, + n: _ctx.confirmType, + o: _ctx.confirmHold, + p: _ctx.holdKeyboard, + q: _ctx.cursorSpacing, + r: _ctx.adjustPosition, + s: _ctx.selectionEnd, + t: _ctx.selectionStart, + v: _ctx.password || _ctx.type === "password" || false, + w: _ctx.ignoreCompositionEvent, + x: common_vendor.o((...args) => $options.onInput && $options.onInput(...args)), + y: common_vendor.o((...args) => $options.onBlur && $options.onBlur(...args)), + z: common_vendor.o((...args) => $options.onFocus && $options.onFocus(...args)), + A: common_vendor.o((...args) => $options.onConfirm && $options.onConfirm(...args)), + B: common_vendor.o((...args) => $options.onkeyboardheightchange && $options.onkeyboardheightchange(...args)), + C: common_vendor.o((...args) => $options.onnicknamereview && $options.onnicknamereview(...args)), + D: common_vendor.o((...args) => $options.clickHandler && $options.clickHandler(...args)), + E: $options.isShowClear + }, $options.isShowClear ? { + F: common_vendor.p({ + name: "close", + size: "11", + color: "#ffffff", + customStyle: "line-height: 12px" + }), + G: common_vendor.o((...args) => $options.onClear && $options.onClear(...args)) + } : {}, { + H: _ctx.suffixIcon || _ctx.$slots.suffix + }, _ctx.suffixIcon || _ctx.$slots.suffix ? { + I: common_vendor.p({ + name: _ctx.suffixIcon, + size: "18", + customStyle: _ctx.suffixIconStyle + }) + } : {}, { + J: common_vendor.n($options.inputClass), + K: common_vendor.s($options.wrapperStyle) + }); +} +const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-5904192e"]]); +wx.createComponent(Component); +//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/node-modules/uview-plus/components/u-input/u-input.js.map diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-input/u-input.json b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-input/u-input.json new file mode 100644 index 0000000..fcde44c --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-input/u-input.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "u-icon": "../u-icon/u-icon" + } +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-input/u-input.wxml b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-input/u-input.wxml new file mode 100644 index 0000000..62cca7e --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-input/u-input.wxml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-input/u-input.wxss b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-input/u-input.wxss new file mode 100644 index 0000000..599c4a5 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-input/u-input.wxss @@ -0,0 +1,105 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ +.u-empty.data-v-5904192e, +.u-empty__wrap.data-v-5904192e, +.u-tabs.data-v-5904192e, +.u-tabs__wrapper.data-v-5904192e, +.u-tabs__wrapper__scroll-view-wrapper.data-v-5904192e, +.u-tabs__wrapper__scroll-view.data-v-5904192e, +.u-tabs__wrapper__nav.data-v-5904192e, +.u-tabs__wrapper__nav__line.data-v-5904192e, +.up-empty.data-v-5904192e, +.up-empty__wrap.data-v-5904192e, +.up-tabs.data-v-5904192e, +.up-tabs__wrapper.data-v-5904192e, +.up-tabs__wrapper__scroll-view-wrapper.data-v-5904192e, +.up-tabs__wrapper__scroll-view.data-v-5904192e, +.up-tabs__wrapper__nav.data-v-5904192e, +.up-tabs__wrapper__nav__line.data-v-5904192e { + display: flex; + flex-direction: column; + flex-shrink: 0; + flex-grow: 0; + flex-basis: auto; + align-items: stretch; + align-content: flex-start; +} +.u-input.data-v-5904192e { + display: flex; + flex-direction: row; + align-items: center; + justify-content: space-between; + flex: 1; +} +.u-input--radius.data-v-5904192e, .u-input--square.data-v-5904192e { + border-radius: 4px; +} +.u-input--no-radius.data-v-5904192e { + border-radius: 0; +} +.u-input--circle.data-v-5904192e { + border-radius: 100px; +} +.u-input__content.data-v-5904192e { + flex: 1; + display: flex; + flex-direction: row; + align-items: center; + justify-content: space-between; +} +.u-input__content__field-wrapper.data-v-5904192e { + position: relative; + display: flex; + flex-direction: row; + margin: 0; + flex: 1; +} +.u-input__content__field-wrapper__field.data-v-5904192e { + line-height: 26px; + text-align: left; + color: #303133; + height: 24px; + font-size: 15px; + flex: 1; +} +.u-input__content__clear.data-v-5904192e { + width: 20px; + height: 20px; + border-radius: 100px; + background-color: #c6c7cb; + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; + transform: scale(0.82); + margin-left: 4px; +} +.u-input__content__subfix-icon.data-v-5904192e { + margin-left: 4px; +} +.u-input__content__prefix-icon.data-v-5904192e { + margin-right: 4px; +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-line/u-line.json b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-line/u-line.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-line/u-line.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-line/u-line.wxml b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-line/u-line.wxml new file mode 100644 index 0000000..5ed941a --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-line/u-line.wxml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-line/u-line.wxss b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-line/u-line.wxss new file mode 100644 index 0000000..aff8bf4 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-line/u-line.wxss @@ -0,0 +1,52 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ +.u-empty.data-v-bbd9963c, +.u-empty__wrap.data-v-bbd9963c, +.u-tabs.data-v-bbd9963c, +.u-tabs__wrapper.data-v-bbd9963c, +.u-tabs__wrapper__scroll-view-wrapper.data-v-bbd9963c, +.u-tabs__wrapper__scroll-view.data-v-bbd9963c, +.u-tabs__wrapper__nav.data-v-bbd9963c, +.u-tabs__wrapper__nav__line.data-v-bbd9963c, +.up-empty.data-v-bbd9963c, +.up-empty__wrap.data-v-bbd9963c, +.up-tabs.data-v-bbd9963c, +.up-tabs__wrapper.data-v-bbd9963c, +.up-tabs__wrapper__scroll-view-wrapper.data-v-bbd9963c, +.up-tabs__wrapper__scroll-view.data-v-bbd9963c, +.up-tabs__wrapper__nav.data-v-bbd9963c, +.up-tabs__wrapper__nav__line.data-v-bbd9963c { + display: flex; + flex-direction: column; + flex-shrink: 0; + flex-grow: 0; + flex-basis: auto; + align-items: stretch; + align-content: flex-start; +} +.u-line.data-v-bbd9963c { + vertical-align: middle; +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-link/u-link.js b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-link/u-link.js new file mode 100644 index 0000000..8e91460 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-link/u-link.js @@ -0,0 +1,45 @@ +"use strict"; +const common_vendor = require("../../../../common/vendor.js"); +const _sfc_main = { + name: "u-link", + mixins: [common_vendor.mpMixin, common_vendor.mixin, common_vendor.props$37], + computed: { + linkStyle() { + const style = { + color: this.color, + fontSize: common_vendor.addUnit(this.fontSize), + // line-height设置为比字体大小多2px + lineHeight: common_vendor.addUnit(common_vendor.getPx(this.fontSize) + 2), + textDecoration: this.underLine ? "underline" : "none" + }; + return style; + } + }, + emits: ["click"], + methods: { + addStyle: common_vendor.addStyle, + openLink() { + common_vendor.index.setClipboardData({ + data: this.href, + success: () => { + common_vendor.index.hideToast(); + this.$nextTick(() => { + common_vendor.toast(this.mpTips); + }); + } + }); + this.$emit("click"); + } + } +}; +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + return { + a: common_vendor.t(_ctx.text), + b: common_vendor.o((...args) => $options.openLink && $options.openLink(...args)), + c: common_vendor.s($options.linkStyle), + d: common_vendor.s($options.addStyle(_ctx.customStyle)) + }; +} +const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-dedad317"]]); +wx.createComponent(Component); +//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/node-modules/uview-plus/components/u-link/u-link.js.map diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-link/u-link.json b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-link/u-link.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-link/u-link.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-link/u-link.wxml b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-link/u-link.wxml new file mode 100644 index 0000000..4e9da26 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-link/u-link.wxml @@ -0,0 +1 @@ +{{a}} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-link/u-link.wxss b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-link/u-link.wxss new file mode 100644 index 0000000..d0fad82 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-link/u-link.wxss @@ -0,0 +1,56 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ +.u-empty.data-v-dedad317, +.u-empty__wrap.data-v-dedad317, +.u-tabs.data-v-dedad317, +.u-tabs__wrapper.data-v-dedad317, +.u-tabs__wrapper__scroll-view-wrapper.data-v-dedad317, +.u-tabs__wrapper__scroll-view.data-v-dedad317, +.u-tabs__wrapper__nav.data-v-dedad317, +.u-tabs__wrapper__nav__line.data-v-dedad317, +.up-empty.data-v-dedad317, +.up-empty__wrap.data-v-dedad317, +.up-tabs.data-v-dedad317, +.up-tabs__wrapper.data-v-dedad317, +.up-tabs__wrapper__scroll-view-wrapper.data-v-dedad317, +.up-tabs__wrapper__scroll-view.data-v-dedad317, +.up-tabs__wrapper__nav.data-v-dedad317, +.up-tabs__wrapper__nav__line.data-v-dedad317 { + display: flex; + flex-direction: column; + flex-shrink: 0; + flex-grow: 0; + flex-basis: auto; + align-items: stretch; + align-content: flex-start; +} +.u-link.data-v-dedad317 { + line-height: 1; + display: flex; + flex-direction: row; + flex-wrap: wrap; + flex: 1; +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-list-item/u-list-item.js b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-list-item/u-list-item.js new file mode 100644 index 0000000..2571455 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-list-item/u-list-item.js @@ -0,0 +1,75 @@ +"use strict"; +const common_vendor = require("../../../../common/vendor.js"); +const _sfc_main = { + name: "u-list-item", + mixins: [common_vendor.mpMixin, common_vendor.mixin, common_vendor.props$23], + data() { + return { + // 节点信息 + rect: {}, + index: 0, + show: true, + sys: common_vendor.getWindowInfo() + }; + }, + computed: {}, + inject: ["uList"], + watch: { + "uList.innerScrollTop"(n) { + const preLoadScreen = this.uList.preLoadScreen; + const windowHeight = this.sys.windowHeight; + if (n <= windowHeight * preLoadScreen) { + this.parent.updateOffsetFromChild(0); + } else if (this.rect.top <= n - windowHeight * preLoadScreen) { + this.parent.updateOffsetFromChild(this.rect.top); + } + } + }, + created() { + this.parent = {}; + }, + mounted() { + this.init(); + }, + methods: { + init() { + this.updateParentData(); + this.index = this.parent.children.indexOf(this); + this.resize(); + }, + updateParentData() { + this.getParentData("u-list"); + }, + resize() { + this.queryRect(`u-list-item-${this.anchor}`).then((size) => { + const lastChild = this.parent.children[this.index - 1]; + this.rect = size; + const preLoadScreen = this.uList.preLoadScreen; + const windowHeight = this.sys.windowHeight; + if (lastChild) { + this.rect.top = lastChild.rect.top + lastChild.rect.height; + } + if (size.top >= this.uList.innerScrollTop + (1 + preLoadScreen) * windowHeight) + this.show = false; + }); + }, + // 查询元素尺寸 + queryRect(el) { + return new Promise((resolve) => { + this.$uGetRect(`.${el}`).then((size) => { + resolve(size); + }); + }); + } + } +}; +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + return { + a: `u-list-item-${_ctx.anchor}`, + b: `u-list-item-${_ctx.anchor}`, + c: common_vendor.n(`u-list-item-${_ctx.anchor}`) + }; +} +const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-32197ac9"]]); +wx.createComponent(Component); +//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/node-modules/uview-plus/components/u-list-item/u-list-item.js.map diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-list-item/u-list-item.json b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-list-item/u-list-item.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-list-item/u-list-item.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-list-item/u-list-item.wxml b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-list-item/u-list-item.wxml new file mode 100644 index 0000000..df7b2e8 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-list-item/u-list-item.wxml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-list-item/u-list-item.wxss b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-list-item/u-list-item.wxss new file mode 100644 index 0000000..0a63ccc --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-list-item/u-list-item.wxss @@ -0,0 +1,49 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ +.u-empty.data-v-32197ac9, +.u-empty__wrap.data-v-32197ac9, +.u-tabs.data-v-32197ac9, +.u-tabs__wrapper.data-v-32197ac9, +.u-tabs__wrapper__scroll-view-wrapper.data-v-32197ac9, +.u-tabs__wrapper__scroll-view.data-v-32197ac9, +.u-tabs__wrapper__nav.data-v-32197ac9, +.u-tabs__wrapper__nav__line.data-v-32197ac9, +.up-empty.data-v-32197ac9, +.up-empty__wrap.data-v-32197ac9, +.up-tabs.data-v-32197ac9, +.up-tabs__wrapper.data-v-32197ac9, +.up-tabs__wrapper__scroll-view-wrapper.data-v-32197ac9, +.up-tabs__wrapper__scroll-view.data-v-32197ac9, +.up-tabs__wrapper__nav.data-v-32197ac9, +.up-tabs__wrapper__nav__line.data-v-32197ac9 { + display: flex; + flex-direction: column; + flex-shrink: 0; + flex-grow: 0; + flex-basis: auto; + align-items: stretch; + align-content: flex-start; +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-list/u-list.js b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-list/u-list.js new file mode 100644 index 0000000..7d86073 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-list/u-list.js @@ -0,0 +1,119 @@ +"use strict"; +const common_vendor = require("../../../../common/vendor.js"); +const _sfc_main = { + name: "u-list", + mixins: [common_vendor.mpMixin, common_vendor.mixin, common_vendor.props$24], + watch: { + scrollIntoView(n) { + this.scrollIntoViewById(n); + } + }, + data() { + return { + // 记录内部滚动的距离 + innerScrollTop: 0, + // vue下,scroll-view在上拉加载时的偏移值 + offset: 0, + sys: common_vendor.getWindowInfo() + }; + }, + computed: { + listStyle() { + const style = {}; + if (this.width != 0) + style.width = common_vendor.addUnit(this.width); + if (this.height != 0) + style.height = common_vendor.addUnit(this.height); + if (!style.height) + style.height = common_vendor.addUnit(this.sys.windowHeight, "px"); + return common_vendor.deepMerge(style, common_vendor.addStyle(this.customStyle)); + } + }, + provide() { + return { + uList: this + }; + }, + created() { + this.refs = []; + this.children = []; + this.anchors = []; + }, + mounted() { + }, + emits: [ + "scroll", + "scrolltolower", + "scrolltoupper", + "refresherpulling", + "refresherrefresh", + "refresherrestore", + "refresherabort" + ], + methods: { + updateOffsetFromChild(top) { + this.offset = top; + }, + onScroll(e) { + let scrollTop = 0; + scrollTop = e.detail.scrollTop; + this.innerScrollTop = scrollTop; + this.$emit("scroll", scrollTop); + }, + scrollIntoViewById(id) { + }, + // 滚动到底部触发事件 + scrolltolower(e) { + common_vendor.sleep(30).then(() => { + this.$emit("scrolltolower"); + }); + }, + // 滚动到底部时触发,非nvue有效 + scrolltoupper(e) { + common_vendor.sleep(30).then(() => { + this.$emit("scrolltoupper"); + this.offset = 0; + }); + }, + refresherpulling(e) { + this.$emit("refresherpulling", e); + }, + refresherrefresh(e) { + this.$emit("refresherrefresh", e); + }, + refresherrestore(e) { + this.$emit("refresherrestore", e); + }, + refresherabort(e) { + this.$emit("refresherabort", e); + } + } +}; +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + return { + a: _ctx.scrollIntoView, + b: common_vendor.s($options.listStyle), + c: _ctx.scrollable, + d: Number(_ctx.scrollTop), + e: Number(_ctx.lowerThreshold), + f: Number(_ctx.upperThreshold), + g: _ctx.showScrollbar, + h: _ctx.enableBackToTop, + i: _ctx.scrollWithAnimation, + j: common_vendor.o((...args) => $options.onScroll && $options.onScroll(...args)), + k: common_vendor.o((...args) => $options.scrolltolower && $options.scrolltolower(...args)), + l: common_vendor.o((...args) => $options.scrolltoupper && $options.scrolltoupper(...args)), + m: _ctx.refresherEnabled, + n: _ctx.refresherThreshold, + o: _ctx.refresherDefaultStyle, + p: _ctx.refresherBackground, + q: _ctx.refresherTriggered, + r: common_vendor.o((...args) => $options.refresherpulling && $options.refresherpulling(...args)), + s: common_vendor.o((...args) => $options.refresherrefresh && $options.refresherrefresh(...args)), + t: common_vendor.o((...args) => $options.refresherrestore && $options.refresherrestore(...args)), + v: common_vendor.o((...args) => $options.refresherabort && $options.refresherabort(...args)) + }; +} +const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-9ad03670"]]); +wx.createComponent(Component); +//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/node-modules/uview-plus/components/u-list/u-list.js.map diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-list/u-list.json b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-list/u-list.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-list/u-list.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-list/u-list.wxml b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-list/u-list.wxml new file mode 100644 index 0000000..ef76665 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-list/u-list.wxml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-list/u-list.wxss b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-list/u-list.wxss new file mode 100644 index 0000000..9847e3a --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-list/u-list.wxss @@ -0,0 +1,53 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ +.u-empty.data-v-9ad03670, +.u-empty__wrap.data-v-9ad03670, +.u-tabs.data-v-9ad03670, +.u-tabs__wrapper.data-v-9ad03670, +.u-tabs__wrapper__scroll-view-wrapper.data-v-9ad03670, +.u-tabs__wrapper__scroll-view.data-v-9ad03670, +.u-tabs__wrapper__nav.data-v-9ad03670, +.u-tabs__wrapper__nav__line.data-v-9ad03670, +.up-empty.data-v-9ad03670, +.up-empty__wrap.data-v-9ad03670, +.up-tabs.data-v-9ad03670, +.up-tabs__wrapper.data-v-9ad03670, +.up-tabs__wrapper__scroll-view-wrapper.data-v-9ad03670, +.up-tabs__wrapper__scroll-view.data-v-9ad03670, +.up-tabs__wrapper__nav.data-v-9ad03670, +.up-tabs__wrapper__nav__line.data-v-9ad03670 { + display: flex; + flex-direction: column; + flex-shrink: 0; + flex-grow: 0; + flex-basis: auto; + align-items: stretch; + align-content: flex-start; +} +.u-list.data-v-9ad03670 { + display: flex; + flex-direction: column; +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-loading-icon/u-loading-icon.json b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-loading-icon/u-loading-icon.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-loading-icon/u-loading-icon.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-loading-icon/u-loading-icon.wxml b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-loading-icon/u-loading-icon.wxml new file mode 100644 index 0000000..de31f3d --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-loading-icon/u-loading-icon.wxml @@ -0,0 +1 @@ +{{p}} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-loading-icon/u-loading-icon.wxss b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-loading-icon/u-loading-icon.wxss new file mode 100644 index 0000000..beb1a6d --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-loading-icon/u-loading-icon.wxss @@ -0,0 +1,181 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ +.u-empty.data-v-00752c6d, +.u-empty__wrap.data-v-00752c6d, +.u-tabs.data-v-00752c6d, +.u-tabs__wrapper.data-v-00752c6d, +.u-tabs__wrapper__scroll-view-wrapper.data-v-00752c6d, +.u-tabs__wrapper__scroll-view.data-v-00752c6d, +.u-tabs__wrapper__nav.data-v-00752c6d, +.u-tabs__wrapper__nav__line.data-v-00752c6d, +.up-empty.data-v-00752c6d, +.up-empty__wrap.data-v-00752c6d, +.up-tabs.data-v-00752c6d, +.up-tabs__wrapper.data-v-00752c6d, +.up-tabs__wrapper__scroll-view-wrapper.data-v-00752c6d, +.up-tabs__wrapper__scroll-view.data-v-00752c6d, +.up-tabs__wrapper__nav.data-v-00752c6d, +.up-tabs__wrapper__nav__line.data-v-00752c6d { + display: flex; + flex-direction: column; + flex-shrink: 0; + flex-grow: 0; + flex-basis: auto; + align-items: stretch; + align-content: flex-start; +} +.u-loading-icon.data-v-00752c6d { + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; + color: #c8c9cc; +} +.u-loading-icon__text.data-v-00752c6d { + margin-left: 4px; + color: #606266; + font-size: 14px; + line-height: 20px; +} +.u-loading-icon__spinner.data-v-00752c6d { + width: 30px; + height: 30px; + position: relative; + box-sizing: border-box; + max-width: 100%; + max-height: 100%; + animation: u-rotate-00752c6d 1s linear infinite; +} +.u-loading-icon__spinner--semicircle.data-v-00752c6d { + border-width: 2px; + border-color: transparent; + border-top-right-radius: 100px; + border-top-left-radius: 100px; + border-bottom-left-radius: 100px; + border-bottom-right-radius: 100px; + border-style: solid; +} +.u-loading-icon__spinner--circle.data-v-00752c6d { + border-top-right-radius: 100px; + border-top-left-radius: 100px; + border-bottom-left-radius: 100px; + border-bottom-right-radius: 100px; + border-width: 2px; + border-top-color: #e5e5e5; + border-right-color: #e5e5e5; + border-bottom-color: #e5e5e5; + border-left-color: #e5e5e5; + border-style: solid; +} +.u-loading-icon--vertical.data-v-00752c6d { + flex-direction: column; +} +.data-v-00752c6d:host { + font-size: 0px; + line-height: 1; +} +.u-loading-icon__spinner--spinner.data-v-00752c6d { + animation-timing-function: steps(12); +} +.u-loading-icon__text.data-v-00752c6d:empty { + display: none; +} +.u-loading-icon--vertical .u-loading-icon__text.data-v-00752c6d { + margin: 6px 0 0; + color: #606266; +} +.u-loading-icon__dot.data-v-00752c6d { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; +} +.u-loading-icon__dot.data-v-00752c6d:before { + display: block; + width: 2px; + height: 25%; + margin: 0 auto; + background-color: currentColor; + border-radius: 40%; + content: " "; +} +.u-loading-icon__dot.data-v-00752c6d:nth-of-type(1) { + transform: rotate(30deg); + opacity: 1; +} +.u-loading-icon__dot.data-v-00752c6d:nth-of-type(2) { + transform: rotate(60deg); + opacity: 0.9375; +} +.u-loading-icon__dot.data-v-00752c6d:nth-of-type(3) { + transform: rotate(90deg); + opacity: 0.875; +} +.u-loading-icon__dot.data-v-00752c6d:nth-of-type(4) { + transform: rotate(120deg); + opacity: 0.8125; +} +.u-loading-icon__dot.data-v-00752c6d:nth-of-type(5) { + transform: rotate(150deg); + opacity: 0.75; +} +.u-loading-icon__dot.data-v-00752c6d:nth-of-type(6) { + transform: rotate(180deg); + opacity: 0.6875; +} +.u-loading-icon__dot.data-v-00752c6d:nth-of-type(7) { + transform: rotate(210deg); + opacity: 0.625; +} +.u-loading-icon__dot.data-v-00752c6d:nth-of-type(8) { + transform: rotate(240deg); + opacity: 0.5625; +} +.u-loading-icon__dot.data-v-00752c6d:nth-of-type(9) { + transform: rotate(270deg); + opacity: 0.5; +} +.u-loading-icon__dot.data-v-00752c6d:nth-of-type(10) { + transform: rotate(300deg); + opacity: 0.4375; +} +.u-loading-icon__dot.data-v-00752c6d:nth-of-type(11) { + transform: rotate(330deg); + opacity: 0.375; +} +.u-loading-icon__dot.data-v-00752c6d:nth-of-type(12) { + transform: rotate(360deg); + opacity: 0.3125; +} +@keyframes u-rotate-00752c6d { +0% { + transform: rotate(0deg); +} +to { + transform: rotate(1turn); +} +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-overlay/u-overlay.js b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-overlay/u-overlay.js new file mode 100644 index 0000000..9dc7159 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-overlay/u-overlay.js @@ -0,0 +1,49 @@ +"use strict"; +const common_vendor = require("../../../../common/vendor.js"); +const _sfc_main = { + name: "u-overlay", + mixins: [common_vendor.mpMixin, common_vendor.mixin, common_vendor.props$6], + computed: { + overlayStyle() { + const style = { + position: "fixed", + top: 0, + left: 0, + right: 0, + zIndex: this.zIndex, + bottom: 0, + "background-color": `rgba(0, 0, 0, ${this.opacity})` + }; + return common_vendor.deepMerge(style, common_vendor.addStyle(this.customStyle)); + } + }, + emits: ["click"], + methods: { + clickHandler() { + this.$emit("click"); + } + } +}; +if (!Array) { + const _easycom_u_transition2 = common_vendor.resolveComponent("u-transition"); + _easycom_u_transition2(); +} +const _easycom_u_transition = () => "../u-transition/u-transition.js"; +if (!Math) { + _easycom_u_transition(); +} +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + return { + a: common_vendor.o($options.clickHandler), + b: common_vendor.o(_ctx.noop), + c: common_vendor.p({ + show: _ctx.show, + ["custom-class"]: "u-overlay", + duration: _ctx.duration, + ["custom-style"]: $options.overlayStyle + }) + }; +} +const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-35f7c3e5"]]); +wx.createComponent(Component); +//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/node-modules/uview-plus/components/u-overlay/u-overlay.js.map diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-overlay/u-overlay.json b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-overlay/u-overlay.json new file mode 100644 index 0000000..164d28a --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-overlay/u-overlay.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "u-transition": "../u-transition/u-transition" + } +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-overlay/u-overlay.wxml b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-overlay/u-overlay.wxml new file mode 100644 index 0000000..25e0ca7 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-overlay/u-overlay.wxml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-overlay/u-overlay.wxss b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-overlay/u-overlay.wxss new file mode 100644 index 0000000..2b33634 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-overlay/u-overlay.wxss @@ -0,0 +1,57 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ +.u-empty.data-v-35f7c3e5, +.u-empty__wrap.data-v-35f7c3e5, +.u-tabs.data-v-35f7c3e5, +.u-tabs__wrapper.data-v-35f7c3e5, +.u-tabs__wrapper__scroll-view-wrapper.data-v-35f7c3e5, +.u-tabs__wrapper__scroll-view.data-v-35f7c3e5, +.u-tabs__wrapper__nav.data-v-35f7c3e5, +.u-tabs__wrapper__nav__line.data-v-35f7c3e5, +.up-empty.data-v-35f7c3e5, +.up-empty__wrap.data-v-35f7c3e5, +.up-tabs.data-v-35f7c3e5, +.up-tabs__wrapper.data-v-35f7c3e5, +.up-tabs__wrapper__scroll-view-wrapper.data-v-35f7c3e5, +.up-tabs__wrapper__scroll-view.data-v-35f7c3e5, +.up-tabs__wrapper__nav.data-v-35f7c3e5, +.up-tabs__wrapper__nav__line.data-v-35f7c3e5 { + display: flex; + flex-direction: column; + flex-shrink: 0; + flex-grow: 0; + flex-basis: auto; + align-items: stretch; + align-content: flex-start; +} +.u-overlay.data-v-35f7c3e5 { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: rgba(0, 0, 0, 0.7); +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-parse/node/node.js b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-parse/node/node.js new file mode 100644 index 0000000..2327e43 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-parse/node/node.js @@ -0,0 +1,390 @@ +"use strict"; +const common_vendor = require("../../../../../common/vendor.js"); +const block0 = {}; +const node = () => Promise.resolve().then(() => RDovR2l0V29ya1BsYWNlL2Nhc2VEYXRhQmFzZS9ub2RlX21vZHVsZXMvdXZpZXctcGx1cy9jb21wb25lbnRzL3UtcGFyc2Uvbm9kZS9ub2RlLnZ1ZQ); +const _sfc_main = { + name: "node", + options: { + virtualHost: true + }, + data() { + return { + ctrl: {}, + isiOS: common_vendor.index.getDeviceInfo().system.includes("iOS") + }; + }, + props: { + name: String, + attrs: { + type: Object, + default() { + return {}; + } + }, + childs: Array, + opts: Array + }, + components: { + node + }, + mounted() { + this.$nextTick(() => { + for (this.root = this.$parent; this.root.$options.name !== "u-parse"; this.root = this.root.$parent) + ; + }); + }, + beforeUnmount() { + }, + methods: { + toJSON() { + return this; + }, + /** + * @description 播放视频事件 + * @param {Event} e + */ + play(e) { + this.root.$emit("play"); + if (this.root.pauseVideo) { + let flag = false; + const id = e.target.id; + for (let i = this.root._videos.length; i--; ) { + if (this.root._videos[i].id === id) { + flag = true; + } else { + this.root._videos[i].pause(); + } + } + if (!flag) { + const ctx = common_vendor.index.createVideoContext( + id, + this + ); + ctx.id = id; + if (this.root.playbackRate) { + ctx.playbackRate(this.root.playbackRate); + } + this.root._videos.push(ctx); + } + } + }, + /** + * @description 图片点击事件 + * @param {Event} e + */ + imgTap(e) { + const node2 = this.childs[e.currentTarget.dataset.i]; + if (node2.a) { + this.linkTap(node2.a); + return; + } + if (node2.attrs.ignore) + return; + this.root.$emit("imgTap", node2.attrs); + if (this.root.previewImg) { + common_vendor.index.previewImage({ + showmenu: this.root.showImgMenu, + current: parseInt(node2.attrs.i), + urls: this.root.imgList + }); + } + }, + /** + * @description 图片长按 + */ + imgLongTap(e) { + }, + /** + * @description 图片加载完成事件 + * @param {Event} e + */ + imgLoad(e) { + const i = e.currentTarget.dataset.i; + if (!this.childs[i].w) { + this.$set(this.ctrl, i, e.detail.width); + } else if (this.opts[1] && !this.ctrl[i] || this.ctrl[i] === -1) { + this.$set(this.ctrl, i, 1); + } + this.checkReady(); + }, + /** + * @description 检查是否所有图片加载完毕 + */ + checkReady() { + if (!this.root.lazyLoad) { + this.root._unloadimgs -= 1; + if (!this.root._unloadimgs) { + setTimeout(() => { + this.root.getRect().then((rect) => { + this.root.$emit("ready", rect); + }).catch(() => { + this.root.$emit("ready", {}); + }); + }, 350); + } + } + }, + /** + * @description 链接点击事件 + * @param {Event} e + */ + linkTap(e) { + const node2 = e.currentTarget ? this.childs[e.currentTarget.dataset.i] : {}; + const attrs = node2.attrs || e; + const href = attrs.href; + this.root.$emit("linkTap", Object.assign({ + innerText: this.root.getText(node2.children || []) + // 链接内的文本内容 + }, attrs)); + if (href) { + if (href[0] === "#") { + this.root.navigateTo(href.substring(1)).catch(() => { + }); + } else if (href.split("?")[0].includes("://")) { + if (this.root.copyLink) { + common_vendor.index.setClipboardData({ + data: href, + success: () => common_vendor.index.showToast({ + title: "链接已复制" + }) + }); + } + } else { + common_vendor.index.navigateTo({ + url: href, + fail() { + common_vendor.index.switchTab({ + url: href, + fail() { + } + }); + } + }); + } + } + }, + /** + * @description 错误事件 + * @param {Event} e + */ + mediaError(e) { + const i = e.currentTarget.dataset.i; + const node2 = this.childs[i]; + if (node2.name === "video" || node2.name === "audio") { + let index = (this.ctrl[i] || 0) + 1; + if (index > node2.src.length) { + index = 0; + } + if (index < node2.src.length) { + this.$set(this.ctrl, i, index); + return; + } + } else if (node2.name === "img") { + if (this.opts[2]) { + this.$set(this.ctrl, i, -1); + } + this.checkReady(); + } + if (this.root) { + this.root.$emit("error", { + source: node2.name, + attrs: node2.attrs, + errMsg: e.detail.errMsg + }); + } + } + } +}; +if (!Array) { + const _component_node = common_vendor.resolveComponent("node"); + _component_node(); +} +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + return { + a: common_vendor.f($props.childs, (n, i, i0) => { + return common_vendor.e({ + a: n.name === "img" && !n.t && ($props.opts[1] && !$data.ctrl[i] || $data.ctrl[i] < 0) + }, n.name === "img" && !n.t && ($props.opts[1] && !$data.ctrl[i] || $data.ctrl[i] < 0) ? { + b: common_vendor.s(n.attrs.style), + c: $data.ctrl[i] < 0 ? $props.opts[2] : $props.opts[1] + } : {}, { + d: n.name === "img" && n.t + }, n.name === "img" && n.t ? { + e: common_vendor.s("display:" + n.t), + f: "", + g: i, + h: common_vendor.o((...args) => $options.imgTap && $options.imgTap(...args), i) + } : n.name === "img" ? { + j: n.attrs.id, + k: common_vendor.n("_img " + n.attrs.class), + l: common_vendor.s(($data.ctrl[i] === -1 ? "display:none;" : "") + "width:" + ($data.ctrl[i] || 1) + "px;height:1px;" + n.attrs.style), + m: n.attrs.src, + n: !n.h ? "widthFix" : !n.w ? "heightFix" : "", + o: $props.opts[0], + p: n.webp, + q: $props.opts[3] && !n.attrs.ignore, + r: !$props.opts[3] || n.attrs.ignore, + s: i, + t: common_vendor.o((...args) => $options.imgLoad && $options.imgLoad(...args), i), + v: common_vendor.o((...args) => $options.mediaError && $options.mediaError(...args), i), + w: common_vendor.o((...args) => $options.imgTap && $options.imgTap(...args), i), + x: common_vendor.o((...args) => $options.imgLongTap && $options.imgLongTap(...args), i) + } : n.text ? { + z: common_vendor.t(n.text), + A: $props.opts[4] == "force" && $data.isiOS + } : n.name === "br" ? {} : n.name === "a" ? { + D: "5640ed73-0-" + i0, + E: common_vendor.p({ + name: "span", + childs: n.children, + opts: $props.opts + }), + F: n.attrs.id, + G: common_vendor.n((n.attrs.href ? "_a " : "") + n.attrs.class), + H: common_vendor.s("display:inline;" + n.attrs.style), + I: i, + J: common_vendor.o((...args) => $options.linkTap && $options.linkTap(...args), i) + } : n.name === "video" ? { + L: n.attrs.id, + M: common_vendor.n(n.attrs.class), + N: common_vendor.s(n.attrs.style), + O: n.attrs.autoplay, + P: n.attrs.controls, + Q: n.attrs.loop, + R: n.attrs.muted, + S: n.attrs["object-fit"], + T: n.attrs.poster, + U: n.src[$data.ctrl[i] || 0], + V: i, + W: common_vendor.o((...args) => $options.play && $options.play(...args), i), + X: common_vendor.o((...args) => $options.mediaError && $options.mediaError(...args), i) + } : n.name === "audio" ? { + Z: n.attrs.id, + aa: common_vendor.n(n.attrs.class), + ab: common_vendor.s(n.attrs.style), + ac: n.attrs.author, + ad: n.attrs.controls, + ae: n.attrs.loop, + af: n.attrs.name, + ag: n.attrs.poster, + ah: n.src[$data.ctrl[i] || 0], + ai: i, + aj: common_vendor.o((...args) => $options.play && $options.play(...args), i), + ak: common_vendor.o((...args) => $options.mediaError && $options.mediaError(...args), i) + } : n.name === "table" && n.c || n.name === "li" ? common_vendor.e({ + am: n.name === "li" + }, n.name === "li" ? { + an: "5640ed73-1-" + i0, + ao: common_vendor.p({ + childs: n.children, + opts: $props.opts + }) + } : { + ap: common_vendor.f(n.children, (tbody, x, i1) => { + return common_vendor.e({ + a: tbody.name === "td" || tbody.name === "th" + }, tbody.name === "td" || tbody.name === "th" ? { + b: "5640ed73-2-" + i0 + "-" + i1, + c: common_vendor.p({ + childs: tbody.children, + opts: $props.opts + }) + } : { + d: common_vendor.f(tbody.children, (tr, y, i2) => { + return common_vendor.e({ + a: tr.name === "td" || tr.name === "th" + }, tr.name === "td" || tr.name === "th" ? { + b: "5640ed73-3-" + i0 + "-" + i1 + "-" + i2, + c: common_vendor.p({ + childs: tr.children, + opts: $props.opts + }), + d: common_vendor.n("_" + tr.name + " " + tr.attrs.class), + e: common_vendor.s(tr.attrs.style) + } : { + f: common_vendor.f(tr.children, (td, z, i3) => { + return { + a: "5640ed73-4-" + i0 + "-" + i1 + "-" + i2 + "-" + i3, + b: common_vendor.p({ + childs: td.children, + opts: $props.opts + }), + c: z, + d: common_vendor.n("_" + td.name + " " + td.attrs.class), + e: common_vendor.s(td.attrs.style) + }; + }), + g: common_vendor.n("_" + tr.name + " " + tr.attrs.class), + h: common_vendor.s(tr.attrs.style) + }, { + i: y + }); + }) + }, { + e: x, + f: common_vendor.n("_" + tbody.name + " " + tbody.attrs.class), + g: common_vendor.s(tbody.attrs.style) + }); + }) + }, { + aq: n.attrs.id, + ar: common_vendor.n("_" + n.name + " " + n.attrs.class), + as: common_vendor.s(n.attrs.style) + }) : !n.c ? { + av: n.attrs.id, + aw: common_vendor.s(n.f + ";display:inline"), + ax: $props.opts[4], + ay: $props.opts[4], + az: [n] + } : n.c === 2 ? { + aB: common_vendor.f(n.children, (n2, j, i1) => { + return { + a: j, + b: common_vendor.s(n2.f), + c: "5640ed73-5-" + i0 + "-" + i1, + d: common_vendor.p({ + name: n2.name, + attrs: n2.attrs, + childs: n2.children, + opts: $props.opts + }) + }; + }), + aC: n.attrs.id, + aD: common_vendor.n("_block _" + n.name + " " + n.attrs.class), + aE: common_vendor.s(n.f + ";" + n.attrs.style) + } : { + aF: common_vendor.s(n.f), + aG: "5640ed73-6-" + i0, + aH: common_vendor.p({ + name: n.name, + attrs: n.attrs, + childs: n.children, + opts: $props.opts + }) + }, { + i: n.name === "img", + y: n.text, + B: n.name === "br", + C: n.name === "a", + K: n.name === "video", + Y: n.name === "audio", + al: n.name === "table" && n.c || n.name === "li", + at: !n.c, + aA: n.c === 2, + aI: i + }); + }), + b: $props.attrs.id, + c: common_vendor.n("_block _" + $props.name + " " + $props.attrs.class), + d: common_vendor.s($props.attrs.style) + }; +} +if (typeof block0 === "function") + block0(_sfc_main); +const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]); +wx.createComponent(Component); +const RDovR2l0V29ya1BsYWNlL2Nhc2VEYXRhQmFzZS9ub2RlX21vZHVsZXMvdXZpZXctcGx1cy9jb21wb25lbnRzL3UtcGFyc2Uvbm9kZS9ub2RlLnZ1ZQ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ + __proto__: null +}, Symbol.toStringTag, { value: "Module" })); +//# sourceMappingURL=../../../../../../.sourcemap/mp-weixin/node-modules/uview-plus/components/u-parse/node/node.js.map diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-parse/node/node.json b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-parse/node/node.json new file mode 100644 index 0000000..7bebc99 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-parse/node/node.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "node": "./node" + } +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-parse/node/node.wxml b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-parse/node/node.wxml new file mode 100644 index 0000000..37f9a45 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-parse/node/node.wxml @@ -0,0 +1,31 @@ + + +// 行内标签列表 +var inlineTags = { + abbr: true, + b: true, + big: true, + code: true, + del: true, + em: true, + i: true, + ins: true, + label: true, + q: true, + small: true, + span: true, + strong: true, + sub: true, + sup: true +} +/** + * @description 判断是否为行内标签 + */ +module.exports = { + isInline: function (tagName, style) { + return inlineTags[tagName] || (style || '').indexOf('display:inline') !== -1 + } +} + + +{{n.z}}\n \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-parse/node/node.wxss b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-parse/node/node.wxss new file mode 100644 index 0000000..ca5c607 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-parse/node/node.wxss @@ -0,0 +1,149 @@ + +/* a 标签默认效果 */ +._a { + padding: 1.5px 0 1.5px 0; + color: #366092; + + word-break: break-all; +} + +/* a 标签点击态效果 */ +._hover { + text-decoration: underline; + opacity: 0.7; +} + +/* 图片默认效果 */ +._img { + max-width: 100%; + -webkit-touch-callout: none; +} + +/* 内部样式 */ +._block { + + display: block; +} +._b, +._strong { + font-weight: bold; +} +._code { + font-family: monospace; +} +._del { + text-decoration: line-through; +} +._em, +._i { + font-style: italic; +} +._h1 { + font-size: 2em; +} +._h2 { + font-size: 1.5em; +} +._h3 { + font-size: 1.17em; +} +._h5 { + font-size: 0.83em; +} +._h6 { + font-size: 0.67em; +} +._h1, +._h2, +._h3, +._h4, +._h5, +._h6 { + + display: block; + + font-weight: bold; +} +._image { + height: 1px; +} +._ins { + text-decoration: underline; +} +._li { + display: list-item; +} +._ol { + list-style-type: decimal; +} +._ol, +._ul { + + display: block; + + padding-left: 40px; + margin: 1em 0; +} +._q::before { + content: '"'; +} +._q::after { + content: '"'; +} +._sub { + font-size: smaller; + vertical-align: sub; +} +._sup { + font-size: smaller; + vertical-align: super; +} +._thead, +._tbody, +._tfoot { + display: table-row-group; +} +._tr { + display: table-row; +} +._td, +._th { + display: table-cell; + vertical-align: middle; +} +._th { + font-weight: bold; + text-align: center; +} +._ul { + list-style-type: disc; +} +._ul ._ul { + margin: 0; + list-style-type: circle; +} +._ul ._ul ._ul { + list-style-type: square; +} +._abbr, +._b, +._code, +._del, +._em, +._i, +._ins, +._label, +._q, +._span, +._strong, +._sub, +._sup { + display: inline; +} + + + + + + + diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-parse/u-parse.js b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-parse/u-parse.js new file mode 100644 index 0000000..82cd1ef --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-parse/u-parse.js @@ -0,0 +1,268 @@ +"use strict"; +const common_vendor = require("../../../../common/vendor.js"); +const node = () => "./node/node.js"; +const plugins = []; +const _sfc_main = { + name: "u-parse", + data() { + return { + nodes: [] + }; + }, + props: { + containerStyle: { + type: String, + default: "" + }, + content: { + type: String, + default: "" + }, + copyLink: { + type: [Boolean, String], + default: true + }, + domain: String, + errorImg: { + type: String, + default: "" + }, + lazyLoad: { + type: [Boolean, String], + default: false + }, + loadingImg: { + type: String, + default: "" + }, + pauseVideo: { + type: [Boolean, String], + default: true + }, + previewImg: { + type: [Boolean, String], + default: true + }, + scrollTable: [Boolean, String], + selectable: [Boolean, String], + setTitle: { + type: [Boolean, String], + default: true + }, + showImgMenu: { + type: [Boolean, String], + default: true + }, + tagStyle: Object, + useAnchor: [Boolean, Number] + }, + emits: ["load", "ready", "imgTap", "linkTap", "play", "error"], + components: { + node + }, + watch: { + content(content) { + this.setContent(content); + } + }, + created() { + this.plugins = []; + for (let i = plugins.length; i--; ) { + this.plugins.push(new plugins[i](this)); + } + }, + mounted() { + if (this.content && !this.nodes.length) { + this.setContent(this.content); + } + }, + beforeUnmount() { + this._hook("onDetached"); + }, + methods: { + /** + * @description 将锚点跳转的范围限定在一个 scroll-view 内 + * @param {Object} page scroll-view 所在页面的示例 + * @param {String} selector scroll-view 的选择器 + * @param {String} scrollTop scroll-view scroll-top 属性绑定的变量名 + */ + in(page, selector, scrollTop) { + if (page && selector && scrollTop) { + this._in = { + page, + selector, + scrollTop + }; + } + }, + /** + * @description 锚点跳转 + * @param {String} id 要跳转的锚点 id + * @param {Number} offset 跳转位置的偏移量 + * @returns {Promise} + */ + navigateTo(id, offset) { + return new Promise((resolve, reject) => { + if (!this.useAnchor) { + reject(Error("Anchor is disabled")); + return; + } + offset = offset || parseInt(this.useAnchor) || 0; + let deep = " "; + deep = ">>>"; + const selector = common_vendor.index.createSelectorQuery().in(this._in ? this._in.page : this).select((this._in ? this._in.selector : "._root") + (id ? `${deep}#${id}` : "")).boundingClientRect(); + if (this._in) { + selector.select(this._in.selector).scrollOffset().select(this._in.selector).boundingClientRect(); + } else { + selector.selectViewport().scrollOffset(); + } + selector.exec((res) => { + if (!res[0]) { + reject(Error("Label not found")); + return; + } + const scrollTop = res[1].scrollTop + res[0].top - (res[2] ? res[2].top : 0) + offset; + if (this._in) { + this._in.page[this._in.scrollTop] = scrollTop; + } else { + common_vendor.index.pageScrollTo({ + scrollTop, + duration: 300 + }); + } + resolve(); + }); + }); + }, + /** + * @description 获取文本内容 + * @return {String} + */ + getText(nodes) { + let text = ""; + (function traversal(nodes2) { + for (let i = 0; i < nodes2.length; i++) { + const node2 = nodes2[i]; + if (node2.type === "text") { + text += node2.text.replace(/&/g, "&"); + } else if (node2.name === "br") { + text += "\n"; + } else { + const isBlock = node2.name === "p" || node2.name === "div" || node2.name === "tr" || node2.name === "li" || node2.name[0] === "h" && node2.name[1] > "0" && node2.name[1] < "7"; + if (isBlock && text && text[text.length - 1] !== "\n") { + text += "\n"; + } + if (node2.children) { + traversal(node2.children); + } + if (isBlock && text[text.length - 1] !== "\n") { + text += "\n"; + } else if (node2.name === "td" || node2.name === "th") { + text += " "; + } + } + } + })(nodes || this.nodes); + return text; + }, + /** + * @description 获取内容大小和位置 + * @return {Promise} + */ + getRect() { + return new Promise((resolve, reject) => { + common_vendor.index.createSelectorQuery().in(this).select("#_root").boundingClientRect().exec((res) => res[0] ? resolve(res[0]) : reject(Error("Root label not found"))); + }); + }, + /** + * @description 暂停播放媒体 + */ + pauseMedia() { + for (let i = (this._videos || []).length; i--; ) { + this._videos[i].pause(); + } + }, + /** + * @description 设置媒体播放速率 + * @param {Number} rate 播放速率 + */ + setPlaybackRate(rate) { + this.playbackRate = rate; + for (let i = (this._videos || []).length; i--; ) { + this._videos[i].playbackRate(rate); + } + }, + /** + * @description 设置内容 + * @param {String} content html 内容 + * @param {Boolean} append 是否在尾部追加 + */ + setContent(content, append) { + if (!append || !this.imgList) { + this.imgList = []; + } + const nodes = new common_vendor.Parser(this).parse(content); + this.$set(this, "nodes", append ? (this.nodes || []).concat(nodes) : nodes); + this._videos = []; + this.$nextTick(() => { + this._hook("onLoad"); + this.$emit("load"); + }); + if (this.lazyLoad || this.imgList._unloadimgs < this.imgList.length / 2) { + let height = 0; + const callback = (rect) => { + if (!rect || !rect.height) + rect = {}; + if (rect.height === height) { + this.$emit("ready", rect); + } else { + height = rect.height; + setTimeout(() => { + this.getRect().then(callback).catch(callback); + }, 350); + } + }; + this.getRect().then(callback).catch(callback); + } else { + if (!this.imgList._unloadimgs) { + this.getRect().then((rect) => { + this.$emit("ready", rect); + }).catch(() => { + this.$emit("ready", {}); + }); + } + } + }, + /** + * @description 调用插件钩子函数 + */ + _hook(name) { + for (let i = plugins.length; i--; ) { + if (this.plugins[i][name]) { + this.plugins[i][name](); + } + } + } + } +}; +if (!Array) { + const _component_node = common_vendor.resolveComponent("node"); + _component_node(); +} +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + return common_vendor.e({ + a: !$data.nodes[0] + }, !$data.nodes[0] ? {} : { + b: common_vendor.p({ + childs: $data.nodes, + opts: [$props.lazyLoad, $props.loadingImg, $props.errorImg, $props.showImgMenu, $props.selectable], + name: "span" + }) + }, { + c: common_vendor.n(($props.selectable ? "_select " : "") + "_root"), + d: common_vendor.s($props.containerStyle) + }); +} +const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]); +wx.createComponent(Component); +//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/node-modules/uview-plus/components/u-parse/u-parse.js.map diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-parse/u-parse.json b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-parse/u-parse.json new file mode 100644 index 0000000..f55f207 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-parse/u-parse.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "node": "./node/node" + } +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-parse/u-parse.wxml b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-parse/u-parse.wxml new file mode 100644 index 0000000..99c1d23 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-parse/u-parse.wxml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-parse/u-parse.wxss b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-parse/u-parse.wxss new file mode 100644 index 0000000..46a562f --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-parse/u-parse.wxss @@ -0,0 +1,17 @@ + + +/* 根节点样式 */ +._root { + padding: 1px 0; + overflow-x: auto; + overflow-y: hidden; + -webkit-overflow-scrolling: touch; +} + +/* 长按复制 */ +._select { + -webkit-user-select: text; + user-select: text; +} + + diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-picker/u-picker.js b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-picker/u-picker.js new file mode 100644 index 0000000..248a526 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-picker/u-picker.js @@ -0,0 +1,289 @@ +"use strict"; +const common_vendor = require("../../../../common/vendor.js"); +const _sfc_main = { + name: "u-picker", + mixins: [common_vendor.mpMixin, common_vendor.mixin, common_vendor.props$20], + data() { + return { + // 上一次选择的列索引 + lastIndex: [], + // 索引值 ,对应picker-view的value + innerIndex: [], + // 各列的值 + innerColumns: [], + // 上一次的变化列索引 + columnIndex: 0, + showByClickInput: false, + currentActiveValue: [] + //当前用户选中,但是还没确认的值,用户没做change操作时候,点击确认可以默认选中第一个 + }; + }, + watch: { + // 监听默认索引的变化,重新设置对应的值 + defaultIndex: { + immediate: true, + deep: true, + handler(n, o) { + if (!o || n.join("/") != o.join("/")) { + this.setIndexs(n, true); + } + } + }, + // 监听columns参数的变化 + columns: { + immediate: true, + deep: true, + handler(n) { + this.setColumns(n); + } + } + }, + emits: ["close", "cancel", "confirm", "change", "update:modelValue", "update:show"], + computed: { + //已选&&已确认的值显示在input上面的文案 + inputLabel() { + let firstItem = this.innerColumns[0] && this.innerColumns[0][0]; + if (firstItem && Object.prototype.toString.call(firstItem) === "[object Object]") { + let res = this.innerColumns[0].filter((item) => this.modelValue.includes(item["id"])); + res = res.map((item) => item[this.keyName]); + return res.join("/"); + } else { + return this.modelValue.join("/"); + } + }, + //已选,待确认的值 + inputValue() { + let items = this.innerColumns.map((item, index) => item[this.innerIndex[index]]); + let res = []; + if (items[0] && Object.prototype.toString.call(items[0]) === "[object Object]") { + items.forEach((element) => { + res.push(element && element["id"]); + }); + } else { + items.forEach((element, index) => { + res.push(element); + }); + } + return res; + } + }, + methods: { + addUnit: common_vendor.addUnit, + testArray: common_vendor.test.array, + onShowByClickInput() { + if (!this.disabled) { + this.showByClickInput = !this.showByClickInput; + } + }, + // 获取item需要显示的文字,判别为对象还是文本 + getItemText(item) { + if (common_vendor.test.object(item)) { + return item[this.keyName]; + } else { + return item; + } + }, + // 关闭选择器 + closeHandler() { + if (this.closeOnClickOverlay) { + if (this.hasInput) { + this.showByClickInput = false; + } + this.$emit("update:show", false); + this.$emit("close"); + } + }, + // 点击工具栏的取消按钮 + cancel() { + if (this.hasInput) { + this.showByClickInput = false; + } + this.$emit("update:show", false); + this.$emit("cancel"); + }, + // 点击工具栏的确定按钮 + confirm() { + if (!this.currentActiveValue.length) { + let arr = [0]; + if (Array.isArray(this.defaultIndex) && this.defaultIndex.length == this.innerColumns.length) { + arr = [...this.defaultIndex]; + } else { + arr = Array(this.innerColumns.length).fill(0); + } + this.setLastIndex(arr); + this.setIndexs(arr); + } + this.$emit("update:modelValue", this.inputValue); + if (this.hasInput) { + this.showByClickInput = false; + } + this.$emit("update:show", false); + this.$emit("confirm", { + indexs: this.innerIndex, + value: this.innerColumns.map((item, index) => item[this.innerIndex[index]]), + values: this.innerColumns + }); + }, + // 选择器某一列的数据发生变化时触发 + changeHandler(e) { + const { + value + } = e.detail; + let index = 0, columnIndex = 0; + this.currentActiveValue = value; + for (let i = 0; i < value.length; i++) { + let item = value[i]; + if (item !== (this.lastIndex[i] || 0)) { + columnIndex = i; + index = item; + break; + } + } + this.columnIndex = columnIndex; + const values = this.innerColumns; + this.setLastIndex(value); + this.setIndexs(value); + if (!this.hasInput) { + this.$emit("update:modelValue", this.inputValue); + } + this.$emit("change", { + value: this.innerColumns.map((item, index2) => item[value[index2]]), + index, + indexs: value, + // values为当前变化列的数组内容 + values, + columnIndex + }); + }, + // 设置index索引,此方法可被外部调用设置 + setIndexs(index, setLastIndex) { + this.innerIndex = common_vendor.deepClone(index); + if (setLastIndex) { + this.setLastIndex(index); + } + }, + // 记录上一次的各列索引位置 + setLastIndex(index) { + this.lastIndex = common_vendor.deepClone(index); + }, + // 设置对应列选项的所有值 + setColumnValues(columnIndex, values) { + this.innerColumns.splice(columnIndex, 1, values); + this.setLastIndex(this.innerIndex.slice(0, columnIndex)); + let tmpIndex = common_vendor.deepClone(this.innerIndex); + for (let i = 0; i < this.innerColumns.length; i++) { + if (i > this.columnIndex) { + tmpIndex[i] = 0; + } + } + this.setIndexs(tmpIndex); + }, + // 获取对应列的所有选项 + getColumnValues(columnIndex) { + (async () => { + await common_vendor.sleep(); + })(); + return this.innerColumns[columnIndex]; + }, + // 设置整体各列的columns的值 + setColumns(columns) { + this.innerColumns = common_vendor.deepClone(columns); + if (this.innerIndex.length === 0) { + this.innerIndex = new Array(columns.length).fill(0); + } + }, + // 获取各列选中值对应的索引 + getIndexs() { + return this.innerIndex; + }, + // 获取各列选中的值 + getValues() { + (async () => { + await common_vendor.sleep(); + })(); + return this.innerColumns.map((item, index) => item[this.innerIndex[index]]); + } + } +}; +if (!Array) { + const _easycom_up_input2 = common_vendor.resolveComponent("up-input"); + const _easycom_u_toolbar2 = common_vendor.resolveComponent("u-toolbar"); + const _easycom_u_loading_icon2 = common_vendor.resolveComponent("u-loading-icon"); + const _easycom_u_popup2 = common_vendor.resolveComponent("u-popup"); + (_easycom_up_input2 + _easycom_u_toolbar2 + _easycom_u_loading_icon2 + _easycom_u_popup2)(); +} +const _easycom_up_input = () => "../u-input/u-input.js"; +const _easycom_u_toolbar = () => "../u-toolbar/u-toolbar.js"; +const _easycom_u_loading_icon = () => "../u-loading-icon/u-loading-icon.js"; +const _easycom_u_popup = () => "../u-popup/u-popup.js"; +if (!Math) { + (_easycom_up_input + _easycom_u_toolbar + _easycom_u_loading_icon + _easycom_u_popup)(); +} +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + return common_vendor.e({ + a: _ctx.hasInput + }, _ctx.hasInput ? { + b: common_vendor.o(($event) => $options.inputLabel = $event), + c: common_vendor.p({ + disabled: _ctx.disabled, + disabledColor: _ctx.disabledColor, + placeholder: _ctx.placeholder, + readonly: true, + border: "surround", + modelValue: $options.inputLabel + }), + d: common_vendor.o((...args) => $options.onShowByClickInput && $options.onShowByClickInput(...args)) + } : {}, { + e: _ctx.showToolbar + }, _ctx.showToolbar ? { + f: common_vendor.o($options.cancel), + g: common_vendor.o($options.confirm), + h: common_vendor.p({ + cancelColor: _ctx.cancelColor, + confirmColor: _ctx.confirmColor, + cancelText: _ctx.cancelText, + confirmText: _ctx.confirmText, + title: _ctx.title, + rightSlot: _ctx.toolbarRightSlot ? true : false + }) + } : {}, { + i: common_vendor.f($data.innerColumns, (item, index, i0) => { + return common_vendor.e({ + a: $options.testArray(item) + }, $options.testArray(item) ? { + b: common_vendor.f(item, (item1, index1, i1) => { + return { + a: common_vendor.t($options.getItemText(item1)), + b: common_vendor.n(index1 === $data.innerIndex[index] && "u-picker__view__column__item--selected"), + c: index1, + d: index1 === $data.innerIndex[index] ? "bold" : "normal" + }; + }), + c: $options.addUnit(_ctx.itemHeight), + d: $options.addUnit(_ctx.itemHeight) + } : {}, { + e: index + }); + }), + j: `height: ${$options.addUnit(_ctx.itemHeight)}`, + k: $data.innerIndex, + l: _ctx.immediateChange, + m: `${$options.addUnit(_ctx.visibleItemCount * _ctx.itemHeight)}`, + n: common_vendor.o((...args) => $options.changeHandler && $options.changeHandler(...args)), + o: _ctx.loading + }, _ctx.loading ? { + p: common_vendor.p({ + mode: "circle" + }) + } : {}, { + q: common_vendor.o($options.closeHandler), + r: common_vendor.p({ + show: _ctx.show || _ctx.hasInput && $data.showByClickInput, + mode: _ctx.popupMode, + zIndex: _ctx.zIndex + }) + }); +} +const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-1500ce68"]]); +wx.createComponent(Component); +//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/node-modules/uview-plus/components/u-picker/u-picker.js.map diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-picker/u-picker.json b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-picker/u-picker.json new file mode 100644 index 0000000..5f030ff --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-picker/u-picker.json @@ -0,0 +1,9 @@ +{ + "component": true, + "usingComponents": { + "up-input": "../u-input/u-input", + "u-toolbar": "../u-toolbar/u-toolbar", + "u-loading-icon": "../u-loading-icon/u-loading-icon", + "u-popup": "../u-popup/u-popup" + } +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-picker/u-picker.wxml b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-picker/u-picker.wxml new file mode 100644 index 0000000..810528a --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-picker/u-picker.wxml @@ -0,0 +1 @@ +{{item1.a}} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-picker/u-picker.wxss b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-picker/u-picker.wxss new file mode 100644 index 0000000..3c32ba0 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-picker/u-picker.wxss @@ -0,0 +1,97 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ +.u-empty.data-v-1500ce68, +.u-empty__wrap.data-v-1500ce68, +.u-tabs.data-v-1500ce68, +.u-tabs__wrapper.data-v-1500ce68, +.u-tabs__wrapper__scroll-view-wrapper.data-v-1500ce68, +.u-tabs__wrapper__scroll-view.data-v-1500ce68, +.u-tabs__wrapper__nav.data-v-1500ce68, +.u-tabs__wrapper__nav__line.data-v-1500ce68, +.up-empty.data-v-1500ce68, +.up-empty__wrap.data-v-1500ce68, +.up-tabs.data-v-1500ce68, +.up-tabs__wrapper.data-v-1500ce68, +.up-tabs__wrapper__scroll-view-wrapper.data-v-1500ce68, +.up-tabs__wrapper__scroll-view.data-v-1500ce68, +.up-tabs__wrapper__nav.data-v-1500ce68, +.up-tabs__wrapper__nav__line.data-v-1500ce68 { + display: flex; + flex-direction: column; + flex-shrink: 0; + flex-grow: 0; + flex-basis: auto; + align-items: stretch; + align-content: flex-start; +} +.u-picker.data-v-1500ce68 { + position: relative; +} +.u-picker-input.data-v-1500ce68 { + position: relative; +} +.u-picker-input .input-cover.data-v-1500ce68 { + opacity: 0; + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + z-index: 1; +} +.u-picker__view__column.data-v-1500ce68 { + display: flex; + flex-direction: row; + flex: 1; + justify-content: center; +} +.u-picker__view__column__item.data-v-1500ce68 { + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; + font-size: 16px; + text-align: center; + display: block; + color: #303133; +} +.u-picker__view__column__item--disabled.data-v-1500ce68 { + cursor: not-allowed; + opacity: 0.35; +} +.u-picker--loading.data-v-1500ce68 { + position: absolute; + top: 0; + right: 0; + left: 0; + bottom: 0; + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; + background-color: rgba(255, 255, 255, 0.87); + z-index: 1000; +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-popup/u-popup.js b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-popup/u-popup.js new file mode 100644 index 0000000..55afa57 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-popup/u-popup.js @@ -0,0 +1,221 @@ +"use strict"; +const common_vendor = require("../../../../common/vendor.js"); +const _sfc_main = { + name: "u-popup", + mixins: [common_vendor.mpMixin, common_vendor.mixin, common_vendor.props$4], + data() { + return { + overlayDuration: this.duration + 50 + }; + }, + watch: { + show(newValue, oldValue) { + if (newValue === true) { + const children = this.$children; + this.retryComputedComponentRect(children); + } + } + }, + computed: { + transitionStyle() { + const style = { + zIndex: this.zIndex, + position: "fixed", + display: "flex" + }; + style[this.mode] = 0; + if (this.mode === "left") { + return common_vendor.deepMerge(style, { + bottom: 0, + top: 0 + }); + } else if (this.mode === "right") { + return common_vendor.deepMerge(style, { + bottom: 0, + top: 0 + }); + } else if (this.mode === "top") { + return common_vendor.deepMerge(style, { + left: 0, + right: 0 + }); + } else if (this.mode === "bottom") { + return common_vendor.deepMerge(style, { + left: 0, + right: 0 + }); + } else if (this.mode === "center") { + return common_vendor.deepMerge(style, { + alignItems: "center", + "justify-content": "center", + top: 0, + left: 0, + right: 0, + bottom: 0 + }); + } + }, + contentStyle() { + const style = {}; + common_vendor.getWindowInfo(); + if (this.mode !== "center") { + style.flex = 1; + } + if (this.bgColor) { + style.backgroundColor = this.bgColor; + } + if (this.round) { + const value = common_vendor.addUnit(this.round); + if (this.mode === "top") { + style.borderBottomLeftRadius = value; + style.borderBottomRightRadius = value; + } else if (this.mode === "bottom") { + style.borderTopLeftRadius = value; + style.borderTopRightRadius = value; + } else if (this.mode === "center") { + style.borderRadius = value; + } + } + return common_vendor.deepMerge(style, common_vendor.addStyle(this.customStyle)); + }, + position() { + if (this.mode === "center") { + return this.zoom ? "fade-zoom" : "fade"; + } + if (this.mode === "left") { + return "slide-left"; + } + if (this.mode === "right") { + return "slide-right"; + } + if (this.mode === "bottom") { + return "slide-up"; + } + if (this.mode === "top") { + return "slide-down"; + } + } + }, + emits: ["open", "close", "click", "update:show"], + methods: { + // 点击遮罩 + overlayClick() { + if (this.closeOnClickOverlay) { + this.$emit("update:show", false); + this.$emit("close"); + } + }, + close(e) { + this.$emit("update:show", false); + this.$emit("close"); + }, + afterEnter() { + this.$emit("open"); + }, + clickHandler() { + if (this.mode === "center") { + this.overlayClick(); + } + this.$emit("click"); + }, + retryComputedComponentRect(children) { + const names = [ + "u-calendar-month", + "u-album", + "u-collapse-item", + "u-dropdown", + "u-index-item", + "u-index-list", + "u-line-progress", + "u-list-item", + "u-rate", + "u-read-more", + "u-row", + "u-row-notice", + "u-scroll-list", + "u-skeleton", + "u-slider", + "u-steps-item", + "u-sticky", + "u-subsection", + "u-swipe-action-item", + "u-tabbar", + "u-tabs", + "u-tooltip" + ]; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + const grandChild = child.$children; + if (names.includes(child.$options.name) && typeof (child == null ? void 0 : child.init) === "function") { + common_vendor.sleep(50).then(() => { + child.init(); + }); + } + if (grandChild.length) { + this.retryComputedComponentRect(grandChild); + } + } + } + } +}; +if (!Array) { + const _easycom_u_overlay2 = common_vendor.resolveComponent("u-overlay"); + const _easycom_u_status_bar2 = common_vendor.resolveComponent("u-status-bar"); + const _easycom_u_icon2 = common_vendor.resolveComponent("u-icon"); + const _easycom_u_safe_bottom2 = common_vendor.resolveComponent("u-safe-bottom"); + const _easycom_u_transition2 = common_vendor.resolveComponent("u-transition"); + (_easycom_u_overlay2 + _easycom_u_status_bar2 + _easycom_u_icon2 + _easycom_u_safe_bottom2 + _easycom_u_transition2)(); +} +const _easycom_u_overlay = () => "../u-overlay/u-overlay.js"; +const _easycom_u_status_bar = () => "../u-status-bar/u-status-bar.js"; +const _easycom_u_icon = () => "../u-icon/u-icon.js"; +const _easycom_u_safe_bottom = () => "../u-safe-bottom/u-safe-bottom.js"; +const _easycom_u_transition = () => "../u-transition/u-transition.js"; +if (!Math) { + (_easycom_u_overlay + _easycom_u_status_bar + _easycom_u_icon + _easycom_u_safe_bottom + _easycom_u_transition)(); +} +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + return common_vendor.e({ + a: _ctx.overlay + }, _ctx.overlay ? { + b: common_vendor.o($options.overlayClick), + c: common_vendor.p({ + show: _ctx.show, + zIndex: _ctx.zIndex, + duration: $data.overlayDuration, + customStyle: _ctx.overlayStyle, + opacity: _ctx.overlayOpacity + }) + } : {}, { + d: _ctx.safeAreaInsetTop + }, _ctx.safeAreaInsetTop ? {} : {}, { + e: _ctx.closeable + }, _ctx.closeable ? { + f: common_vendor.p({ + name: "close", + color: "#909399", + size: "18", + bold: true + }), + g: common_vendor.o((...args) => $options.close && $options.close(...args)), + h: common_vendor.n("u-popup__content__close--" + _ctx.closeIconPos) + } : {}, { + i: _ctx.safeAreaInsetBottom + }, _ctx.safeAreaInsetBottom ? {} : {}, { + j: common_vendor.s($options.contentStyle), + k: common_vendor.o((...args) => _ctx.noop && _ctx.noop(...args)), + l: common_vendor.o((...args) => _ctx.noop && _ctx.noop(...args)), + m: common_vendor.o($options.afterEnter), + n: common_vendor.o($options.clickHandler), + o: common_vendor.p({ + show: _ctx.show, + customStyle: $options.transitionStyle, + mode: $options.position, + duration: _ctx.duration + }), + p: common_vendor.n(_ctx.customClass) + }); +} +const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-74921bef"]]); +wx.createComponent(Component); +//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/node-modules/uview-plus/components/u-popup/u-popup.js.map diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-popup/u-popup.json b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-popup/u-popup.json new file mode 100644 index 0000000..711f35d --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-popup/u-popup.json @@ -0,0 +1,10 @@ +{ + "component": true, + "usingComponents": { + "u-overlay": "../u-overlay/u-overlay", + "u-status-bar": "../u-status-bar/u-status-bar", + "u-icon": "../u-icon/u-icon", + "u-safe-bottom": "../u-safe-bottom/u-safe-bottom", + "u-transition": "../u-transition/u-transition" + } +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-popup/u-popup.wxml b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-popup/u-popup.wxml new file mode 100644 index 0000000..eb70a3f --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-popup/u-popup.wxml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-popup/u-popup.wxss b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-popup/u-popup.wxss new file mode 100644 index 0000000..b9f4cc1 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-popup/u-popup.wxss @@ -0,0 +1,108 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ +.u-empty.data-v-74921bef, +.u-empty__wrap.data-v-74921bef, +.u-tabs.data-v-74921bef, +.u-tabs__wrapper.data-v-74921bef, +.u-tabs__wrapper__scroll-view-wrapper.data-v-74921bef, +.u-tabs__wrapper__scroll-view.data-v-74921bef, +.u-tabs__wrapper__nav.data-v-74921bef, +.u-tabs__wrapper__nav__line.data-v-74921bef, +.up-empty.data-v-74921bef, +.up-empty__wrap.data-v-74921bef, +.up-tabs.data-v-74921bef, +.up-tabs__wrapper.data-v-74921bef, +.up-tabs__wrapper__scroll-view-wrapper.data-v-74921bef, +.up-tabs__wrapper__scroll-view.data-v-74921bef, +.up-tabs__wrapper__nav.data-v-74921bef, +.up-tabs__wrapper__nav__line.data-v-74921bef { + display: flex; + flex-direction: column; + flex-shrink: 0; + flex-grow: 0; + flex-basis: auto; + align-items: stretch; + align-content: flex-start; +} +.u-popup.data-v-74921bef { + flex: 1; +} +.u-popup__content.data-v-74921bef { + background-color: #fff; + position: relative; +} +.u-popup__content--round-top.data-v-74921bef { + border-top-left-radius: 0; + border-top-right-radius: 0; + border-bottom-left-radius: 10px; + border-bottom-right-radius: 10px; +} +.u-popup__content--round-left.data-v-74921bef { + border-top-left-radius: 0; + border-top-right-radius: 10px; + border-bottom-left-radius: 0; + border-bottom-right-radius: 10px; +} +.u-popup__content--round-right.data-v-74921bef { + border-top-left-radius: 10px; + border-top-right-radius: 0; + border-bottom-left-radius: 10px; + border-bottom-right-radius: 0; +} +.u-popup__content--round-bottom.data-v-74921bef { + border-top-left-radius: 10px; + border-top-right-radius: 10px; + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; +} +.u-popup__content--round-center.data-v-74921bef { + border-top-left-radius: 10px; + border-top-right-radius: 10px; + border-bottom-left-radius: 10px; + border-bottom-right-radius: 10px; +} +.u-popup__content__close.data-v-74921bef { + position: absolute; +} +.u-popup__content__close--hover.data-v-74921bef { + opacity: 0.4; +} +.u-popup__content__close--top-left.data-v-74921bef { + top: 15px; + left: 15px; +} +.u-popup__content__close--top-right.data-v-74921bef { + top: 15px; + right: 15px; +} +.u-popup__content__close--bottom-left.data-v-74921bef { + bottom: 15px; + left: 15px; +} +.u-popup__content__close--bottom-right.data-v-74921bef { + right: 15px; + bottom: 15px; +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-radio-group/u-radio-group.js b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-radio-group/u-radio-group.js new file mode 100644 index 0000000..a39c871 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-radio-group/u-radio-group.js @@ -0,0 +1,75 @@ +"use strict"; +const common_vendor = require("../../../../common/vendor.js"); +const _sfc_main = { + name: "u-radio-group", + mixins: [common_vendor.mpMixin, common_vendor.mixin, common_vendor.props$10], + computed: { + // 这里computed的变量,都是子组件u-radio需要用到的,由于头条小程序的兼容性差异,子组件无法实时监听父组件参数的变化 + // 所以需要手动通知子组件,这里返回一个parentData变量,供watch监听,在其中去通知每一个子组件重新从父组件(u-radio-group) + // 拉取父组件新的变化后的参数 + parentData() { + return [ + this.modelValue, + this.disabled, + this.inactiveColor, + this.activeColor, + this.size, + this.labelDisabled, + this.shape, + this.iconSize, + this.borderBottom, + this.placement + ]; + }, + bemClass() { + return this.bem("radio-group", ["placement"]); + }, + radioGroupStyle() { + const style = { + gap: common_vendor.addUnit(this.gap) + }; + return common_vendor.deepMerge(style, common_vendor.addStyle(this.customStyle)); + } + }, + watch: { + // 当父组件需要子组件需要共享的参数发生了变化,手动通知子组件 + parentData() { + if (this.children.length) { + this.children.map((child) => { + typeof child.init === "function" && child.init(); + }); + } + } + }, + data() { + return {}; + }, + created() { + this.children = []; + }, + emits: ["update:modelValue", "change"], + methods: { + // 将其他的radio设置为未选中的状态 + unCheckedOther(childInstance) { + this.children.map((child) => { + if (childInstance !== child) { + child.checked = false; + } + }); + const { + name + } = childInstance; + this.$emit("update:modelValue", name); + this.$emit("change", name); + } + } +}; +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + return { + a: common_vendor.n($options.bemClass), + b: common_vendor.s($options.radioGroupStyle) + }; +} +const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-272bb654"]]); +wx.createComponent(Component); +//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/node-modules/uview-plus/components/u-radio-group/u-radio-group.js.map diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-radio-group/u-radio-group.json b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-radio-group/u-radio-group.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-radio-group/u-radio-group.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-radio-group/u-radio-group.wxml b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-radio-group/u-radio-group.wxml new file mode 100644 index 0000000..e56e0dd --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-radio-group/u-radio-group.wxml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-radio-group/u-radio-group.wxss b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-radio-group/u-radio-group.wxss new file mode 100644 index 0000000..8814d67 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-radio-group/u-radio-group.wxss @@ -0,0 +1,60 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ +.u-empty.data-v-272bb654, +.u-empty__wrap.data-v-272bb654, +.u-tabs.data-v-272bb654, +.u-tabs__wrapper.data-v-272bb654, +.u-tabs__wrapper__scroll-view-wrapper.data-v-272bb654, +.u-tabs__wrapper__scroll-view.data-v-272bb654, +.u-tabs__wrapper__nav.data-v-272bb654, +.u-tabs__wrapper__nav__line.data-v-272bb654, +.up-empty.data-v-272bb654, +.up-empty__wrap.data-v-272bb654, +.up-tabs.data-v-272bb654, +.up-tabs__wrapper.data-v-272bb654, +.up-tabs__wrapper__scroll-view-wrapper.data-v-272bb654, +.up-tabs__wrapper__scroll-view.data-v-272bb654, +.up-tabs__wrapper__nav.data-v-272bb654, +.up-tabs__wrapper__nav__line.data-v-272bb654 { + display: flex; + flex-direction: column; + flex-shrink: 0; + flex-grow: 0; + flex-basis: auto; + align-items: stretch; + align-content: flex-start; +} +.u-radio-group.data-v-272bb654 { + flex: 1; +} +.u-radio-group--row.data-v-272bb654 { + display: flex; + flex-flow: row wrap; +} +.u-radio-group--column.data-v-272bb654 { + display: flex; + flex-direction: column; +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-radio/u-radio.js b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-radio/u-radio.js new file mode 100644 index 0000000..5fd5a69 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-radio/u-radio.js @@ -0,0 +1,198 @@ +"use strict"; +const common_vendor = require("../../../../common/vendor.js"); +const _sfc_main = { + name: "u-radio", + mixins: [common_vendor.mpMixin, common_vendor.mixin, common_vendor.props$9], + data() { + return { + checked: false, + // 当你看到这段代码的时候, + // 父组件的默认值,因为头条小程序不支持在computed中使用this.parent.shape的形式 + // 故只能使用如此方法 + parentData: { + iconSize: 12, + labelDisabled: null, + disabled: null, + shape: null, + activeColor: null, + inactiveColor: null, + size: 18, + value: null, + modelValue: null, + iconColor: null, + placement: "row", + borderBottom: false, + iconPlacement: "left" + } + }; + }, + computed: { + // 是否禁用,如果父组件u-raios-group禁用的话,将会忽略子组件的配置 + elDisabled() { + return this.disabled !== "" ? this.disabled : this.parentData.disabled !== null ? this.parentData.disabled : false; + }, + // 是否禁用label点击 + elLabelDisabled() { + return this.labelDisabled !== "" ? this.labelDisabled : this.parentData.labelDisabled !== null ? this.parentData.labelDisabled : false; + }, + // 组件尺寸,对应size的值,默认值为21px + elSize() { + return this.size ? this.size : this.parentData.size ? this.parentData.size : 21; + }, + // 组件的勾选图标的尺寸,默认12px + elIconSize() { + return this.iconSize ? this.iconSize : this.parentData.iconSize ? this.parentData.iconSize : 12; + }, + // 组件选中激活时的颜色 + elActiveColor() { + return this.activeColor ? this.activeColor : this.parentData.activeColor ? this.parentData.activeColor : "#2979ff"; + }, + // 组件选未中激活时的颜色 + elInactiveColor() { + return this.inactiveColor ? this.inactiveColor : this.parentData.inactiveColor ? this.parentData.inactiveColor : "#c8c9cc"; + }, + // label的颜色 + elLabelColor() { + return this.labelColor ? this.labelColor : this.parentData.labelColor ? this.parentData.labelColor : "#606266"; + }, + // 组件的形状 + elShape() { + return this.shape ? this.shape : this.parentData.shape ? this.parentData.shape : "circle"; + }, + // label大小 + elLabelSize() { + return common_vendor.addUnit(this.labelSize ? this.labelSize : this.parentData.labelSize ? this.parentData.labelSize : "15"); + }, + elIconColor() { + const iconColor = this.iconColor ? this.iconColor : this.parentData.iconColor ? this.parentData.iconColor : "#ffffff"; + if (this.elDisabled) { + return this.checked ? this.elInactiveColor : "transparent"; + } else { + return this.checked ? iconColor : "transparent"; + } + }, + iconClasses() { + let classes = []; + classes.push("u-radio__icon-wrap--" + this.elShape); + if (this.elDisabled) { + classes.push("u-radio__icon-wrap--disabled"); + } + if (this.checked && this.elDisabled) { + classes.push("u-radio__icon-wrap--disabled--checked"); + } + return classes; + }, + iconWrapStyle() { + const style = {}; + style.backgroundColor = this.checked && !this.elDisabled ? this.elActiveColor : "#ffffff"; + style.borderColor = this.checked && !this.elDisabled ? this.elActiveColor : this.elInactiveColor; + style.width = common_vendor.addUnit(this.elSize); + style.height = common_vendor.addUnit(this.elSize); + if (this.parentData.iconPlacement === "right") { + style.marginRight = 0; + } + return style; + }, + radioStyle() { + const style = {}; + if (this.parentData.borderBottom && this.parentData.placement === "row") { + common_vendor.error("检测到您将borderBottom设置为true,需要同时将u-radio-group的placement设置为column才有效"); + } + if (this.parentData.borderBottom && this.parentData.placement === "column") { + style.paddingBottom = common_vendor.os() === "ios" ? "12px" : "8px"; + } + return common_vendor.deepMerge(style, common_vendor.addStyle(this.customStyle)); + } + }, + mounted() { + this.init(); + }, + emits: ["change"], + methods: { + init() { + this.updateParentData(); + if (!this.parent) { + common_vendor.error("u-radio必须搭配u-radio-group组件使用"); + } + this.checked = this.name === this.parentData.modelValue; + }, + updateParentData() { + this.getParentData("u-radio-group"); + }, + // 点击图标 + iconClickHandler(e) { + this.preventEvent(e); + if (!this.elDisabled) { + this.setRadioCheckedStatus(); + } + }, + // 横向两端排列时,点击组件即可触发选中事件 + wrapperClickHandler(e) { + this.parentData.iconPlacement === "right" && this.iconClickHandler(e); + }, + // 点击label + labelClickHandler(e) { + this.preventEvent(e); + if (!this.elLabelDisabled && !this.elDisabled) { + this.setRadioCheckedStatus(); + } + }, + emitEvent() { + if (!this.checked) { + this.$emit("change", this.name); + this.$nextTick(() => { + common_vendor.formValidate(this, "change"); + }); + } + }, + // 改变组件选中状态 + // 这里的改变的依据是,更改本组件的checked值为true,同时通过父组件遍历所有u-radio实例 + // 将本组件外的其他u-radio的checked都设置为false(都被取消选中状态),因而只剩下一个为选中状态 + setRadioCheckedStatus() { + this.emitEvent(); + this.checked = true; + typeof this.parent.unCheckedOther === "function" && this.parent.unCheckedOther(this); + } + } +}; +if (!Array) { + const _easycom_u_icon2 = common_vendor.resolveComponent("u-icon"); + _easycom_u_icon2(); +} +const _easycom_u_icon = () => "../u-icon/u-icon.js"; +if (!Math) { + _easycom_u_icon(); +} +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + return { + a: common_vendor.p({ + name: "checkbox-mark", + size: $options.elIconSize, + color: $options.elIconColor + }), + b: common_vendor.r("icon", { + elIconSize: $options.elIconSize, + elIconColor: $options.elIconColor + }), + c: common_vendor.o((...args) => $options.iconClickHandler && $options.iconClickHandler(...args)), + d: common_vendor.n($options.iconClasses), + e: common_vendor.s($options.iconWrapStyle), + f: common_vendor.t(_ctx.label), + g: _ctx.label, + h: $options.elDisabled ? $options.elInactiveColor : $options.elLabelColor, + i: $options.elLabelSize, + j: $options.elLabelSize, + k: common_vendor.r("label", { + label: _ctx.label, + elDisabled: $options.elDisabled + }), + l: common_vendor.o((...args) => $options.labelClickHandler && $options.labelClickHandler(...args)), + m: common_vendor.o((...args) => $options.wrapperClickHandler && $options.wrapperClickHandler(...args)), + n: common_vendor.s($options.radioStyle), + o: common_vendor.n(`u-radio-label--${$data.parentData.iconPlacement}`), + p: common_vendor.n($data.parentData.borderBottom && $data.parentData.placement === "column" && "u-border-bottom") + }; +} +const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-edf95844"]]); +wx.createComponent(Component); +//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/node-modules/uview-plus/components/u-radio/u-radio.js.map diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-radio/u-radio.json b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-radio/u-radio.json new file mode 100644 index 0000000..fcde44c --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-radio/u-radio.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "u-icon": "../u-icon/u-icon" + } +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-radio/u-radio.wxml b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-radio/u-radio.wxml new file mode 100644 index 0000000..2ddd54f --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-radio/u-radio.wxml @@ -0,0 +1 @@ +{{f}} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-radio/u-radio.wxss b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-radio/u-radio.wxss new file mode 100644 index 0000000..fa1cc43 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-radio/u-radio.wxss @@ -0,0 +1,109 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ +.u-empty.data-v-edf95844, +.u-empty__wrap.data-v-edf95844, +.u-tabs.data-v-edf95844, +.u-tabs__wrapper.data-v-edf95844, +.u-tabs__wrapper__scroll-view-wrapper.data-v-edf95844, +.u-tabs__wrapper__scroll-view.data-v-edf95844, +.u-tabs__wrapper__nav.data-v-edf95844, +.u-tabs__wrapper__nav__line.data-v-edf95844, +.up-empty.data-v-edf95844, +.up-empty__wrap.data-v-edf95844, +.up-tabs.data-v-edf95844, +.up-tabs__wrapper.data-v-edf95844, +.up-tabs__wrapper__scroll-view-wrapper.data-v-edf95844, +.up-tabs__wrapper__scroll-view.data-v-edf95844, +.up-tabs__wrapper__nav.data-v-edf95844, +.up-tabs__wrapper__nav__line.data-v-edf95844 { + display: flex; + flex-direction: column; + flex-shrink: 0; + flex-grow: 0; + flex-basis: auto; + align-items: stretch; + align-content: flex-start; +} +.u-radio.data-v-edf95844 { + display: flex; + flex-direction: row; + overflow: hidden; + flex-direction: row; + align-items: center; + margin-bottom: 5px; + margin-top: 5px; +} +.u-radio-label--left.data-v-edf95844 { + flex-direction: row; +} +.u-radio-label--right.data-v-edf95844 { + flex-direction: row-reverse; + justify-content: space-between; +} +.u-radio__icon-wrap.data-v-edf95844 { + box-sizing: border-box; + transition-property: border-color, background-color, color; + transition-duration: 0.2s; + color: #606266; + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; + color: transparent; + text-align: center; + margin-right: 6px; + font-size: 20px; + border-width: 1px; + border-color: #c8c9cc; + border-style: solid; +} +.u-radio__icon-wrap--circle.data-v-edf95844 { + border-radius: 100%; +} +.u-radio__icon-wrap--square.data-v-edf95844 { + border-radius: 3px; +} +.u-radio__icon-wrap--checked.data-v-edf95844 { + color: #fff; + background-color: red; + border-color: #2979ff; +} +.u-radio__icon-wrap--disabled.data-v-edf95844 { + background-color: #ebedf0 !important; +} +.u-radio__icon-wrap--disabled--checked.data-v-edf95844 { + color: #c8c9cc !important; +} +.u-radio__label.data-v-edf95844 { + word-wrap: break-word; + margin-left: 5px; + margin-right: 12px; + color: #606266; + font-size: 15px; +} +.u-radio__label--disabled.data-v-edf95844 { + color: #c8c9cc; +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-safe-bottom/u-safe-bottom.json b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-safe-bottom/u-safe-bottom.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-safe-bottom/u-safe-bottom.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-safe-bottom/u-safe-bottom.wxml b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-safe-bottom/u-safe-bottom.wxml new file mode 100644 index 0000000..be7e4fe --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-safe-bottom/u-safe-bottom.wxml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-safe-bottom/u-safe-bottom.wxss b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-safe-bottom/u-safe-bottom.wxss new file mode 100644 index 0000000..cab9fae --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-safe-bottom/u-safe-bottom.wxss @@ -0,0 +1,28 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ +.u-safe-bottom.data-v-3ec581de { + width: 100%; +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-status-bar/u-status-bar.json b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-status-bar/u-status-bar.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-status-bar/u-status-bar.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-status-bar/u-status-bar.wxml b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-status-bar/u-status-bar.wxml new file mode 100644 index 0000000..14e5088 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-status-bar/u-status-bar.wxml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-status-bar/u-status-bar.wxss b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-status-bar/u-status-bar.wxss new file mode 100644 index 0000000..fc08003 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-status-bar/u-status-bar.wxss @@ -0,0 +1,28 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ +.u-status-bar.data-v-c0b45a48 { + width: 100%; +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-steps-item/u-steps-item.js b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-steps-item/u-steps-item.js new file mode 100644 index 0000000..76bbbfa --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-steps-item/u-steps-item.js @@ -0,0 +1,204 @@ +"use strict"; +const common_vendor = require("../../../../common/vendor.js"); +const _sfc_main = { + name: "u-steps-item", + mixins: [common_vendor.mpMixin, common_vendor.mixin, common_vendor.props$7], + data() { + return { + index: 0, + childLength: 0, + showLine: false, + size: { + height: 0, + width: 0 + }, + parentData: { + direction: "row", + current: 0, + activeColor: "", + inactiveColor: "", + activeIcon: "", + inactiveIcon: "", + dot: false + } + }; + }, + watch: { + "parentData"(newValue, oldValue) { + } + }, + created() { + this.init(); + }, + computed: { + lineStyle() { + var _a, _b; + const style = {}; + if (this.parentData.direction === "row") { + style.width = this.size.width + "px"; + style.left = this.size.width / 2 + "px"; + } else { + style.height = this.size.height + "px"; + } + style.backgroundColor = ((_b = (_a = this.parent.children) == null ? void 0 : _a[this.index + 1]) == null ? void 0 : _b.error) ? common_vendor.color.error : this.index < this.parentData.current ? this.parentData.activeColor : this.parentData.inactiveColor; + return style; + }, + itemStyleInner() { + return { + ...this.itemStyle + }; + }, + statusClass() { + const { + index, + error + } = this; + const { + current + } = this.parentData; + if (current == index) { + return error === true ? "error" : "process"; + } else if (error) { + return "error"; + } else if (current > index) { + return "finish"; + } else { + return "wait"; + } + }, + statusColor() { + let colorTmp = ""; + switch (this.statusClass) { + case "finish": + colorTmp = this.parentData.activeColor; + break; + case "error": + colorTmp = common_vendor.color.error; + break; + case "process": + colorTmp = this.parentData.dot ? this.parentData.activeColor : "transparent"; + break; + default: + colorTmp = this.parentData.inactiveColor; + break; + } + return colorTmp; + }, + contentStyle() { + const style = {}; + if (this.parentData.direction === "column") { + style.marginLeft = this.parentData.dot ? "2px" : "6px"; + style.marginTop = this.parentData.dot ? "0px" : "6px"; + } else { + style.marginTop = this.parentData.dot ? "2px" : "6px"; + style.marginLeft = this.parentData.dot ? "2px" : "6px"; + } + return style; + } + }, + mounted() { + this.parent && this.parent.updateFromChild(); + common_vendor.sleep().then(() => { + this.getStepsItemRect(); + }); + }, + methods: { + init() { + this.updateParentData(); + if (!this.parent) { + return common_vendor.error("u-steps-item必须要搭配u-steps组件使用"); + } + this.index = this.parent.children.indexOf(this); + this.childLength = this.parent.children.length; + }, + updateParentData() { + this.getParentData("u-steps"); + }, + // 父组件数据发生变化 + updateFromParent() { + this.init(); + }, + // 获取组件的尺寸,用于设置横线的位置 + getStepsItemRect() { + this.$uGetRect(".u-steps-item").then((size) => { + this.size = size; + }); + } + } +}; +if (!Array) { + const _easycom_u_icon2 = common_vendor.resolveComponent("u-icon"); + const _easycom_up_text2 = common_vendor.resolveComponent("up-text"); + (_easycom_u_icon2 + _easycom_up_text2)(); +} +const _easycom_u_icon = () => "../u-icon/u-icon.js"; +const _easycom_up_text = () => "../u-text/u-text.js"; +if (!Math) { + (_easycom_u_icon + _easycom_up_text)(); +} +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + return common_vendor.e({ + a: $data.index + 1 < $data.childLength + }, $data.index + 1 < $data.childLength ? { + b: common_vendor.n(`u-steps-item__line--${$data.parentData.direction}`), + c: common_vendor.s($options.lineStyle) + } : {}, { + d: $data.parentData.dot + }, $data.parentData.dot ? { + e: $options.statusColor + } : $data.parentData.activeIcon || $data.parentData.inactiveIcon ? { + g: common_vendor.p({ + name: $data.index <= $data.parentData.current ? $data.parentData.activeIcon : $data.parentData.inactiveIcon, + size: _ctx.iconSize, + color: $data.index <= $data.parentData.current ? $data.parentData.activeColor : $data.parentData.inactiveColor + }) + } : common_vendor.e({ + h: $options.statusClass === "process" || $options.statusClass === "wait" + }, $options.statusClass === "process" || $options.statusClass === "wait" ? { + i: common_vendor.t($data.index + 1), + j: $data.index == $data.parentData.current ? "#ffffff" : $data.parentData.inactiveColor + } : { + k: common_vendor.p({ + color: $options.statusClass === "error" ? "error" : $data.parentData.activeColor, + size: "12", + name: $options.statusClass === "error" ? "close" : "checkmark" + }) + }, { + l: $options.statusClass === "process" ? $data.parentData.activeColor : "transparent", + m: $options.statusColor + }), { + f: $data.parentData.activeIcon || $data.parentData.inactiveIcon, + n: common_vendor.n(`u-steps-item__wrapper--${$data.parentData.direction}`), + o: common_vendor.n($data.parentData.dot && `u-steps-item__wrapper--${$data.parentData.direction}--dot`), + p: common_vendor.s($options.itemStyleInner), + q: common_vendor.r("content", { + index: $data.index + }), + r: !_ctx.$slots["content"] + }, !_ctx.$slots["content"] ? common_vendor.e({ + s: !_ctx.$slots["title"] + }, !_ctx.$slots["title"] ? { + t: common_vendor.p({ + text: _ctx.title, + type: $data.parentData.current == $data.index ? "main" : "content", + lineHeight: "20px", + size: $data.parentData.current == $data.index ? 14 : 13 + }) + } : {}, { + v: !_ctx.$slots["desc"] + }, !_ctx.$slots["desc"] ? { + w: common_vendor.p({ + text: _ctx.desc, + type: "tips", + size: "12" + }) + } : {}) : {}, { + x: common_vendor.n(`u-steps-item__content--${$data.parentData.direction}`), + y: common_vendor.n($data.parentData.current == $data.index ? "u-steps-item__content--current" : ""), + z: common_vendor.s($options.contentStyle), + A: common_vendor.n(`u-steps-item--${$data.parentData.direction}`) + }); +} +const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-9f07ce7c"]]); +wx.createComponent(Component); +//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/node-modules/uview-plus/components/u-steps-item/u-steps-item.js.map diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-steps-item/u-steps-item.json b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-steps-item/u-steps-item.json new file mode 100644 index 0000000..3185d42 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-steps-item/u-steps-item.json @@ -0,0 +1,7 @@ +{ + "component": true, + "usingComponents": { + "u-icon": "../u-icon/u-icon", + "up-text": "../u-text/u-text" + } +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-steps-item/u-steps-item.wxml b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-steps-item/u-steps-item.wxml new file mode 100644 index 0000000..b8be5e0 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-steps-item/u-steps-item.wxml @@ -0,0 +1 @@ +{{i}} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-steps-item/u-steps-item.wxss b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-steps-item/u-steps-item.wxss new file mode 100644 index 0000000..9f70147 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-steps-item/u-steps-item.wxss @@ -0,0 +1,146 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ +.u-empty.data-v-9f07ce7c, +.u-empty__wrap.data-v-9f07ce7c, +.u-tabs.data-v-9f07ce7c, +.u-tabs__wrapper.data-v-9f07ce7c, +.u-tabs__wrapper__scroll-view-wrapper.data-v-9f07ce7c, +.u-tabs__wrapper__scroll-view.data-v-9f07ce7c, +.u-tabs__wrapper__nav.data-v-9f07ce7c, +.u-tabs__wrapper__nav__line.data-v-9f07ce7c, +.up-empty.data-v-9f07ce7c, +.up-empty__wrap.data-v-9f07ce7c, +.up-tabs.data-v-9f07ce7c, +.up-tabs__wrapper.data-v-9f07ce7c, +.up-tabs__wrapper__scroll-view-wrapper.data-v-9f07ce7c, +.up-tabs__wrapper__scroll-view.data-v-9f07ce7c, +.up-tabs__wrapper__nav.data-v-9f07ce7c, +.up-tabs__wrapper__nav__line.data-v-9f07ce7c { + display: flex; + flex-direction: column; + flex-shrink: 0; + flex-grow: 0; + flex-basis: auto; + align-items: stretch; + align-content: flex-start; +} +.u-steps-item.data-v-9f07ce7c { + flex: 1; + display: flex; + flex-direction: row; +} +.u-steps-item--row.data-v-9f07ce7c { + flex-direction: column; + align-items: center; + position: relative; +} +.u-steps-item--column.data-v-9f07ce7c { + position: relative; + flex-direction: row; + justify-content: flex-start; + padding-bottom: 5px; +} +.u-steps-item__wrapper.data-v-9f07ce7c { + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; + position: relative; + background-color: #fff; + border-radius: 50px; +} +.u-steps-item__wrapper--column.data-v-9f07ce7c { + width: 20px; + height: 20px; +} +.u-steps-item__wrapper--column--dot.data-v-9f07ce7c { + height: 20px; + width: 20px; +} +.u-steps-item__wrapper--row.data-v-9f07ce7c { + width: 20px; + height: 20px; +} +.u-steps-item__wrapper--row--dot.data-v-9f07ce7c { + width: 20px; + height: 20px; +} +.u-steps-item__wrapper__circle.data-v-9f07ce7c { + width: 20px; + height: 20px; + box-sizing: border-box; + flex-shrink: 0; + border-radius: 100px; + border-width: 1px; + border-color: #909193; + border-style: solid; + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; + transition: background-color 0.3s; +} +.u-steps-item__wrapper__circle__text.data-v-9f07ce7c { + color: #909193; + font-size: 11px; + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; + text-align: center; + line-height: 11px; +} +.u-steps-item__wrapper__dot.data-v-9f07ce7c { + width: 10px; + height: 10px; + border-radius: 100px; + background-color: #606266; +} +.u-steps-item__content.data-v-9f07ce7c { + display: flex; + flex-direction: row; + flex: 1; +} +.u-steps-item__content--row.data-v-9f07ce7c { + flex-direction: column; + align-items: center; +} +.u-steps-item__content--column.data-v-9f07ce7c { + flex-direction: column; + margin-left: 6px; +} +.u-steps-item__line.data-v-9f07ce7c { + position: absolute; + background: #909193; +} +.u-steps-item__line--row.data-v-9f07ce7c { + top: 10px; + height: 1px; +} +.u-steps-item__line--column.data-v-9f07ce7c { + width: 1px; + left: 10px; +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-steps/u-steps.js b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-steps/u-steps.js new file mode 100644 index 0000000..c2cf693 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-steps/u-steps.js @@ -0,0 +1,49 @@ +"use strict"; +const common_vendor = require("../../../../common/vendor.js"); +const _sfc_main = { + name: "u-steps", + mixins: [common_vendor.mpMixin, common_vendor.mixin, common_vendor.props$8], + data() { + return {}; + }, + watch: { + children() { + this.updateChildData(); + }, + parentData() { + this.updateChildData(); + } + }, + computed: { + // 监听参数的变化,通过watch中,手动去更新子组件的数据,否则子组件不会自动变化 + parentData() { + return [this.current, this.direction, this.activeColor, this.inactiveColor, this.activeIcon, this.inactiveIcon, this.dot]; + } + }, + methods: { + // 更新子组件的数据 + updateChildData() { + this.children.map((child) => { + common_vendor.test.func((child || {}).updateFromParent()) && child.updateFromParent(); + }); + }, + // 接受子组件的通知,去修改其他子组件的数据 + updateFromChild() { + this.updateChildData(); + } + }, + created() { + this.children = []; + }, + options: { + virtualHost: false + } +}; +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + return { + a: common_vendor.n(`u-steps--${_ctx.direction}`) + }; +} +const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-30d91cab"]]); +wx.createComponent(Component); +//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/node-modules/uview-plus/components/u-steps/u-steps.js.map diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-steps/u-steps.json b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-steps/u-steps.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-steps/u-steps.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-steps/u-steps.wxml b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-steps/u-steps.wxml new file mode 100644 index 0000000..b9abb13 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-steps/u-steps.wxml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-steps/u-steps.wxss b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-steps/u-steps.wxss new file mode 100644 index 0000000..f943fae --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-steps/u-steps.wxss @@ -0,0 +1,62 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ +.u-empty.data-v-30d91cab, +.u-empty__wrap.data-v-30d91cab, +.u-tabs.data-v-30d91cab, +.u-tabs__wrapper.data-v-30d91cab, +.u-tabs__wrapper__scroll-view-wrapper.data-v-30d91cab, +.u-tabs__wrapper__scroll-view.data-v-30d91cab, +.u-tabs__wrapper__nav.data-v-30d91cab, +.u-tabs__wrapper__nav__line.data-v-30d91cab, +.up-empty.data-v-30d91cab, +.up-empty__wrap.data-v-30d91cab, +.up-tabs.data-v-30d91cab, +.up-tabs__wrapper.data-v-30d91cab, +.up-tabs__wrapper__scroll-view-wrapper.data-v-30d91cab, +.up-tabs__wrapper__scroll-view.data-v-30d91cab, +.up-tabs__wrapper__nav.data-v-30d91cab, +.up-tabs__wrapper__nav__line.data-v-30d91cab { + display: flex; + flex-direction: column; + flex-shrink: 0; + flex-grow: 0; + flex-basis: auto; + align-items: stretch; + align-content: flex-start; +} +.u-steps.data-v-30d91cab { + display: flex; + flex-direction: row; +} +.u-steps--column.data-v-30d91cab { + flex-direction: column; +} +.u-steps--row.data-v-30d91cab { + flex-direction: row; + flex: 1; + display: grid; + grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-tabbar-item/u-tabbar-item.js b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-tabbar-item/u-tabbar-item.js new file mode 100644 index 0000000..46c2a7a --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-tabbar-item/u-tabbar-item.js @@ -0,0 +1,98 @@ +"use strict"; +const common_vendor = require("../../../../common/vendor.js"); +const _sfc_main = { + name: "u-tabbar-item", + mixins: [common_vendor.mpMixin, common_vendor.mixin, common_vendor.props$25], + data() { + return { + isActive: false, + // 是否处于激活状态 + parentData: { + value: null, + activeColor: "", + inactiveColor: "" + } + }; + }, + // 微信小程序中 options 选项 + options: { + virtualHost: true + //将自定义节点设置成虚拟的,更加接近Vue组件的表现。我们不希望自定义组件的这个节点本身可以设置样式、响应 flex 布局等 + }, + created() { + this.init(); + }, + emits: ["click", "change"], + methods: { + addStyle: common_vendor.addStyle, + init() { + this.updateParentData(); + if (!this.parent) { + common_vendor.error("u-tabbar-item必须搭配u-tabbar组件使用"); + } + const index = this.parent.children.indexOf(this); + this.isActive = (this.name || index) === this.parentData.value; + }, + updateParentData() { + this.getParentData("u-tabbar"); + }, + // 此方法将会被父组件u-tabbar调用 + updateFromParent() { + this.init(); + }, + clickHandler() { + this.$nextTick(() => { + const index = this.parent.children.indexOf(this); + const name = this.name || index; + if (name !== this.parent.value) { + this.parent.$emit("change", name); + } + this.$emit("click", name); + }); + } + } +}; +if (!Array) { + const _easycom_u_icon2 = common_vendor.resolveComponent("u-icon"); + const _easycom_u_badge2 = common_vendor.resolveComponent("u-badge"); + (_easycom_u_icon2 + _easycom_u_badge2)(); +} +const _easycom_u_icon = () => "../u-icon/u-icon.js"; +const _easycom_u_badge = () => "../u-badge/u-badge.js"; +if (!Math) { + (_easycom_u_icon + _easycom_u_badge)(); +} +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + return common_vendor.e({ + a: common_vendor.t(_ctx.icon), + b: _ctx.icon + }, _ctx.icon ? { + c: common_vendor.p({ + name: _ctx.icon, + color: $data.isActive ? $data.parentData.activeColor : $data.parentData.inactiveColor, + size: 20 + }) + } : common_vendor.e({ + d: $data.isActive + }, $data.isActive ? { + e: _ctx.activeIcon + } : { + f: _ctx.inactiveIcon + }), { + g: common_vendor.p({ + absolute: true, + offset: [0, _ctx.dot ? "34rpx" : _ctx.badge > 9 ? "14rpx" : "20rpx"], + customStyle: _ctx.badgeStyle, + isDot: _ctx.dot, + value: _ctx.badge || (_ctx.dot ? 1 : null), + show: _ctx.dot || _ctx.badge > 0 + }), + h: common_vendor.t(_ctx.text), + i: $data.isActive ? $data.parentData.activeColor : $data.parentData.inactiveColor, + j: common_vendor.s($options.addStyle(_ctx.customStyle)), + k: common_vendor.o((...args) => $options.clickHandler && $options.clickHandler(...args)) + }); +} +const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-a54be951"]]); +wx.createComponent(Component); +//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/node-modules/uview-plus/components/u-tabbar-item/u-tabbar-item.js.map diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-tabbar-item/u-tabbar-item.json b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-tabbar-item/u-tabbar-item.json new file mode 100644 index 0000000..716e978 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-tabbar-item/u-tabbar-item.json @@ -0,0 +1,7 @@ +{ + "component": true, + "usingComponents": { + "u-icon": "../u-icon/u-icon", + "u-badge": "../u-badge/u-badge" + } +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-tabbar-item/u-tabbar-item.wxml b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-tabbar-item/u-tabbar-item.wxml new file mode 100644 index 0000000..16aa602 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-tabbar-item/u-tabbar-item.wxml @@ -0,0 +1 @@ +{{a}} {{h}} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-tabbar-item/u-tabbar-item.wxss b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-tabbar-item/u-tabbar-item.wxss new file mode 100644 index 0000000..405632d --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-tabbar-item/u-tabbar-item.wxss @@ -0,0 +1,77 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ +.u-empty.data-v-a54be951, +.u-empty__wrap.data-v-a54be951, +.u-tabs.data-v-a54be951, +.u-tabs__wrapper.data-v-a54be951, +.u-tabs__wrapper__scroll-view-wrapper.data-v-a54be951, +.u-tabs__wrapper__scroll-view.data-v-a54be951, +.u-tabs__wrapper__nav.data-v-a54be951, +.u-tabs__wrapper__nav__line.data-v-a54be951, +.up-empty.data-v-a54be951, +.up-empty__wrap.data-v-a54be951, +.up-tabs.data-v-a54be951, +.up-tabs__wrapper.data-v-a54be951, +.up-tabs__wrapper__scroll-view-wrapper.data-v-a54be951, +.up-tabs__wrapper__scroll-view.data-v-a54be951, +.up-tabs__wrapper__nav.data-v-a54be951, +.up-tabs__wrapper__nav__line.data-v-a54be951 { + display: flex; + flex-direction: column; + flex-shrink: 0; + flex-grow: 0; + flex-basis: auto; + align-items: stretch; + align-content: flex-start; +} +.u-tabbar-item.data-v-a54be951 { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + flex: 1; + width: 100%; + height: 100%; +} +.u-tabbar-item__icon.data-v-a54be951 { + display: flex; + flex-direction: row; + position: relative; + width: 150rpx; + justify-content: center; +} +.u-tabbar-item__text.data-v-a54be951 { + font-size: 12px; + color: #606266; +} +.data-v-a54be951:host { + flex: 1; + width: 100%; +} +.u-page__item__slot-icon.data-v-a54be951 { + width: 47rpx; + height: 47rpx; +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-tabbar/u-tabbar.js b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-tabbar/u-tabbar.js new file mode 100644 index 0000000..71e5228 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-tabbar/u-tabbar.js @@ -0,0 +1,78 @@ +"use strict"; +const common_vendor = require("../../../../common/vendor.js"); +const _sfc_main = { + name: "u-tabbar", + mixins: [common_vendor.mpMixin, common_vendor.mixin, common_vendor.props$26], + data() { + return { + placeholderHeight: 0 + }; + }, + computed: { + tabbarStyle() { + const style = { + zIndex: this.zIndex + }; + return common_vendor.deepMerge(style, common_vendor.addStyle(this.customStyle)); + }, + // 监听多个参数的变化,通过在computed执行对应的操作 + updateChild() { + return [this.value, this.activeColor, this.inactiveColor]; + }, + updatePlaceholder() { + return [this.fixed, this.placeholder]; + } + }, + watch: { + updateChild() { + this.updateChildren(); + }, + updatePlaceholder() { + this.setPlaceholderHeight(); + } + }, + created() { + this.children = []; + }, + mounted() { + this.setPlaceholderHeight(); + }, + methods: { + updateChildren() { + this.children.length && this.children.map((child) => child.updateFromParent()); + }, + // 设置用于防止塌陷元素的高度 + async setPlaceholderHeight() { + if (!this.fixed || !this.placeholder) + return; + await common_vendor.sleep(20); + this.$uGetRect(".u-tabbar__content").then(({ height = 50 }) => { + this.placeholderHeight = height; + }); + } + } +}; +if (!Array) { + const _easycom_u_safe_bottom2 = common_vendor.resolveComponent("u-safe-bottom"); + _easycom_u_safe_bottom2(); +} +const _easycom_u_safe_bottom = () => "../u-safe-bottom/u-safe-bottom.js"; +if (!Math) { + _easycom_u_safe_bottom(); +} +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + return common_vendor.e({ + a: _ctx.safeAreaInsetBottom + }, _ctx.safeAreaInsetBottom ? {} : {}, { + b: common_vendor.o((...args) => _ctx.noop && _ctx.noop(...args)), + c: common_vendor.n(_ctx.border && "u-border-top"), + d: common_vendor.n(_ctx.fixed && "u-tabbar--fixed"), + e: common_vendor.s($options.tabbarStyle), + f: _ctx.placeholder + }, _ctx.placeholder ? { + g: $data.placeholderHeight + "px" + } : {}); +} +const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-d5be2d5d"]]); +wx.createComponent(Component); +//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/node-modules/uview-plus/components/u-tabbar/u-tabbar.js.map diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-tabbar/u-tabbar.json b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-tabbar/u-tabbar.json new file mode 100644 index 0000000..0ca401a --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-tabbar/u-tabbar.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "u-safe-bottom": "../u-safe-bottom/u-safe-bottom" + } +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-tabbar/u-tabbar.wxml b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-tabbar/u-tabbar.wxml new file mode 100644 index 0000000..952f675 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-tabbar/u-tabbar.wxml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-tabbar/u-tabbar.wxss b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-tabbar/u-tabbar.wxss new file mode 100644 index 0000000..c72b124 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-tabbar/u-tabbar.wxss @@ -0,0 +1,73 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ +.u-empty.data-v-d5be2d5d, +.u-empty__wrap.data-v-d5be2d5d, +.u-tabs.data-v-d5be2d5d, +.u-tabs__wrapper.data-v-d5be2d5d, +.u-tabs__wrapper__scroll-view-wrapper.data-v-d5be2d5d, +.u-tabs__wrapper__scroll-view.data-v-d5be2d5d, +.u-tabs__wrapper__nav.data-v-d5be2d5d, +.u-tabs__wrapper__nav__line.data-v-d5be2d5d, +.up-empty.data-v-d5be2d5d, +.up-empty__wrap.data-v-d5be2d5d, +.up-tabs.data-v-d5be2d5d, +.up-tabs__wrapper.data-v-d5be2d5d, +.up-tabs__wrapper__scroll-view-wrapper.data-v-d5be2d5d, +.up-tabs__wrapper__scroll-view.data-v-d5be2d5d, +.up-tabs__wrapper__nav.data-v-d5be2d5d, +.up-tabs__wrapper__nav__line.data-v-d5be2d5d { + display: flex; + flex-direction: column; + flex-shrink: 0; + flex-grow: 0; + flex-basis: auto; + align-items: stretch; + align-content: flex-start; +} +.u-tabbar.data-v-d5be2d5d { + display: flex; + flex-direction: column; + flex: 1; + justify-content: center; +} +.u-tabbar__content.data-v-d5be2d5d { + display: flex; + flex-direction: column; + background-color: #fff; +} +.u-tabbar__content__item-wrapper.data-v-d5be2d5d { + border-top: 2rpx solid #f3f4f6 !important; + height: 74px; + display: flex; + flex-direction: row; + justify-content: space-around; +} +.u-tabbar--fixed.data-v-d5be2d5d { + position: fixed; + bottom: 0; + left: 0; + right: 0; +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-tabs/u-tabs.js b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-tabs/u-tabs.js new file mode 100644 index 0000000..2d8c8b4 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-tabs/u-tabs.js @@ -0,0 +1,261 @@ +"use strict"; +const common_vendor = require("../../../../common/vendor.js"); +const _sfc_main = { + name: "u-tabs", + mixins: [common_vendor.mpMixin, common_vendor.mixin, common_vendor.props$18], + data() { + return { + firstTime: true, + scrollLeft: 0, + scrollViewWidth: 0, + lineOffsetLeft: 0, + tabsRect: { + left: 0 + }, + innerCurrent: 0, + moving: false + }; + }, + watch: { + current: { + immediate: true, + handler(newValue, oldValue) { + if (newValue !== this.innerCurrent) { + if (typeof newValue == "string") { + this.innerCurrent = parseInt(newValue); + } else { + this.innerCurrent = newValue; + } + this.$nextTick(() => { + this.resize(); + }); + } + } + }, + // list变化时,重新渲染list各项信息 + list() { + this.$nextTick(() => { + this.resize(); + }); + } + }, + computed: { + textStyle() { + return (index) => { + const style = {}; + const customeStyle = index == this.innerCurrent ? common_vendor.addStyle(this.activeStyle) : common_vendor.addStyle(this.inactiveStyle); + if (this.list[index].disabled) { + style.color = "#c8c9cc"; + } + return common_vendor.deepMerge(customeStyle, style); + }; + }, + propsBadge() { + return common_vendor.props$14.badge; + } + }, + async mounted() { + this.init(); + }, + emits: ["click", "longPress", "change", "update:current"], + methods: { + addStyle: common_vendor.addStyle, + addUnit: common_vendor.addUnit, + setLineLeft() { + const tabItem = this.list[this.innerCurrent]; + if (!tabItem) { + return; + } + let lineOffsetLeft = this.list.slice(0, this.innerCurrent).reduce((total, curr) => total + curr.rect.width, 0); + const lineWidth = common_vendor.getPx(this.lineWidth); + this.lineOffsetLeft = lineOffsetLeft + (tabItem.rect.width - lineWidth) / 2; + if (this.firstTime) { + setTimeout(() => { + this.firstTime = false; + }, 10); + } + }, + // nvue下设置滑块的位置 + animation(x, duration = 0) { + }, + // 点击某一个标签 + clickHandler(item, index) { + this.$emit("click", { + ...item, + index + }, index); + if (item.disabled) + return; + this.innerCurrent = index; + this.resize(); + this.$emit("update:current", index); + this.$emit("change", { + ...item, + index + }, index); + }, + // 长按事件 + longPressHandler(item, index) { + this.$emit("longPress", { + ...item, + index + }); + }, + init() { + common_vendor.sleep().then(() => { + this.resize(); + }); + }, + setScrollLeft() { + if (this.innerCurrent < 0) { + this.innerCurrent = 0; + } + const tabRect = this.list[this.innerCurrent]; + const offsetLeft = this.list.slice(0, this.innerCurrent).reduce((total, curr) => { + return total + curr.rect.width; + }, 0); + const windowWidth = common_vendor.getWindowInfo().windowWidth; + let scrollLeft = offsetLeft - (this.tabsRect.width - tabRect.rect.width) / 2 - (windowWidth - this.tabsRect.right) / 2 + this.tabsRect.left / 2; + scrollLeft = Math.min(scrollLeft, this.scrollViewWidth - this.tabsRect.width); + this.scrollLeft = Math.max(0, scrollLeft); + }, + // 获取所有标签的尺寸 + resize() { + if (this.list.length === 0) { + return; + } + Promise.all([this.getTabsRect(), this.getAllItemRect()]).then(([tabsRect, itemRect = []]) => { + if (tabsRect.left > tabsRect.width) { + tabsRect.right = tabsRect.right - Math.floor(tabsRect.left / tabsRect.width) * tabsRect.width; + tabsRect.left = tabsRect.left % tabsRect.width; + } + this.tabsRect = tabsRect; + this.scrollViewWidth = 0; + itemRect.map((item, index) => { + this.scrollViewWidth += item.width; + this.list[index].rect = item; + }); + this.setLineLeft(); + this.setScrollLeft(); + }); + }, + // 获取导航菜单的尺寸 + getTabsRect() { + return new Promise((resolve) => { + this.queryRect("u-tabs__wrapper__scroll-view").then((size) => resolve(size)); + }); + }, + // 获取所有标签的尺寸 + getAllItemRect() { + return new Promise((resolve) => { + const promiseAllArr = this.list.map((item, index) => this.queryRect( + `u-tabs__wrapper__nav__item-${index}`, + true + )); + Promise.all(promiseAllArr).then((sizes) => resolve(sizes)); + }); + }, + // 获取各个标签的尺寸 + queryRect(el, item) { + return new Promise((resolve) => { + this.$uGetRect(`.${el}`).then((size) => { + resolve(size); + }); + }); + } + } +}; +if (!Array) { + const _easycom_up_icon2 = common_vendor.resolveComponent("up-icon"); + const _easycom_u_badge2 = common_vendor.resolveComponent("u-badge"); + (_easycom_up_icon2 + _easycom_u_badge2)(); +} +const _easycom_up_icon = () => "../u-icon/u-icon.js"; +const _easycom_u_badge = () => "../u-badge/u-badge.js"; +if (!Math) { + (_easycom_up_icon + _easycom_u_badge)(); +} +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + return { + a: common_vendor.f(_ctx.list, (item, index, i0) => { + return common_vendor.e(_ctx.$slots.icon ? { + a: "icon-" + i0, + b: common_vendor.r("icon", { + item, + keyName: _ctx.keyName, + index + }, i0) + } : common_vendor.e({ + c: item.icon + }, item.icon ? { + d: "0546c3e4-0-" + i0, + e: common_vendor.p({ + name: item.icon, + customStyle: $options.addStyle(_ctx.iconStyle) + }) + } : {}), _ctx.$slots.content ? { + f: "content-" + i0, + g: common_vendor.r("content", { + item, + keyName: _ctx.keyName, + index + }, i0) + } : !_ctx.$slots.content && (_ctx.$slots.default || _ctx.$slots.$default) ? { + h: "d-" + i0, + i: common_vendor.r("d", { + item, + keyName: _ctx.keyName, + index + }, i0) + } : { + j: common_vendor.t(item[_ctx.keyName]), + k: common_vendor.n(item.disabled && "u-tabs__wrapper__nav__item__text--disabled"), + l: common_vendor.s($options.textStyle(index)) + }, { + m: "0546c3e4-1-" + i0, + n: common_vendor.p({ + show: !!(item.badge && (item.badge.show || item.badge.isDot || item.badge.value)), + isDot: item.badge && item.badge.isDot || $options.propsBadge.isDot, + value: item.badge && item.badge.value || $options.propsBadge.value, + max: item.badge && item.badge.max || $options.propsBadge.max, + type: item.badge && item.badge.type || $options.propsBadge.type, + showZero: item.badge && item.badge.showZero || $options.propsBadge.showZero, + bgColor: item.badge && item.badge.bgColor || $options.propsBadge.bgColor, + color: item.badge && item.badge.color || $options.propsBadge.color, + shape: item.badge && item.badge.shape || $options.propsBadge.shape, + numberType: item.badge && item.badge.numberType || $options.propsBadge.numberType, + inverted: item.badge && item.badge.inverted || $options.propsBadge.inverted, + customStyle: "margin-left: 4px;" + }), + o: index, + p: common_vendor.o(($event) => $options.clickHandler(item, index), index), + q: common_vendor.o(($event) => $options.longPressHandler(item, index), index), + r: `u-tabs__wrapper__nav__item-${index}`, + s: common_vendor.n(`u-tabs__wrapper__nav__item-${index}`), + t: common_vendor.n(item.disabled && "u-tabs__wrapper__nav__item--disabled"), + v: common_vendor.n($data.innerCurrent == index ? "u-tabs__wrapper__nav__item-active" : "") + }); + }), + b: _ctx.$slots.icon, + c: _ctx.$slots.content, + d: !_ctx.$slots.content && (_ctx.$slots.default || _ctx.$slots.$default), + e: common_vendor.s($options.addStyle(_ctx.itemStyle)), + f: common_vendor.s({ + flex: _ctx.scrollable ? "" : 1 + }), + g: common_vendor.s({ + width: $options.addUnit(_ctx.lineWidth), + transform: `translate(${$data.lineOffsetLeft}px)`, + transitionDuration: `${$data.firstTime ? 0 : _ctx.duration}ms`, + height: $options.addUnit(_ctx.lineHeight), + background: _ctx.lineColor, + backgroundSize: _ctx.lineBgSize + }), + h: _ctx.scrollable, + i: $data.scrollLeft, + j: common_vendor.n(_ctx.customClass) + }; +} +const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-0546c3e4"]]); +wx.createComponent(Component); +//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/node-modules/uview-plus/components/u-tabs/u-tabs.js.map diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-tabs/u-tabs.json b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-tabs/u-tabs.json new file mode 100644 index 0000000..bab8d82 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-tabs/u-tabs.json @@ -0,0 +1,7 @@ +{ + "component": true, + "usingComponents": { + "up-icon": "../u-icon/u-icon", + "u-badge": "../u-badge/u-badge" + } +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-tabs/u-tabs.wxml b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-tabs/u-tabs.wxml new file mode 100644 index 0000000..a37eae0 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-tabs/u-tabs.wxml @@ -0,0 +1 @@ +{{item.j}} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-tabs/u-tabs.wxss b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-tabs/u-tabs.wxss new file mode 100644 index 0000000..7557a28 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-tabs/u-tabs.wxss @@ -0,0 +1,93 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ +.u-empty.data-v-0546c3e4, +.u-empty__wrap.data-v-0546c3e4, +.u-tabs.data-v-0546c3e4, +.u-tabs__wrapper.data-v-0546c3e4, +.u-tabs__wrapper__scroll-view-wrapper.data-v-0546c3e4, +.u-tabs__wrapper__scroll-view.data-v-0546c3e4, +.u-tabs__wrapper__nav.data-v-0546c3e4, +.u-tabs__wrapper__nav__line.data-v-0546c3e4, +.up-empty.data-v-0546c3e4, +.up-empty__wrap.data-v-0546c3e4, +.up-tabs.data-v-0546c3e4, +.up-tabs__wrapper.data-v-0546c3e4, +.up-tabs__wrapper__scroll-view-wrapper.data-v-0546c3e4, +.up-tabs__wrapper__scroll-view.data-v-0546c3e4, +.up-tabs__wrapper__nav.data-v-0546c3e4, +.up-tabs__wrapper__nav__line.data-v-0546c3e4 { + display: flex; + flex-direction: column; + flex-shrink: 0; + flex-grow: 0; + flex-basis: auto; + align-items: stretch; + align-content: flex-start; +} +.u-tabs__wrapper.data-v-0546c3e4 { + display: flex; + flex-direction: row; + align-items: center; +} +.u-tabs__wrapper__scroll-view-wrapper.data-v-0546c3e4 { + flex: 1; + overflow: auto hidden; +} +.u-tabs__wrapper__scroll-view.data-v-0546c3e4 { + display: flex; + flex-direction: row; + flex: 1; +} +.u-tabs__wrapper__nav.data-v-0546c3e4 { + display: flex; + flex-direction: row; + position: relative; +} +.u-tabs__wrapper__nav__item.data-v-0546c3e4 { + padding: 0 11px; + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; +} +.u-tabs__wrapper__nav__item__text.data-v-0546c3e4 { + font-size: 15px; + color: #606266; + white-space: nowrap !important; +} +.u-tabs__wrapper__nav__item__text--disabled.data-v-0546c3e4 { + color: #c8c9cc !important; +} +.u-tabs__wrapper__nav__line.data-v-0546c3e4 { + height: 3px; + background: #3c9cff; + width: 30px; + position: absolute; + bottom: 2px; + border-radius: 100px; + transition-property: transform; + transition-duration: 300ms; +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-text/u-text.json b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-text/u-text.json new file mode 100644 index 0000000..2056454 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-text/u-text.json @@ -0,0 +1,7 @@ +{ + "component": true, + "usingComponents": { + "u-icon": "../u-icon/u-icon", + "u-link": "../u-link/u-link" + } +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-text/u-text.wxml b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-text/u-text.wxml new file mode 100644 index 0000000..0b39b76 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-text/u-text.wxml @@ -0,0 +1 @@ +{{G}} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-text/u-text.wxss b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-text/u-text.wxss new file mode 100644 index 0000000..1d34284 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-text/u-text.wxss @@ -0,0 +1,95 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ +.u-empty.data-v-5fec1d8b, +.u-empty__wrap.data-v-5fec1d8b, +.u-tabs.data-v-5fec1d8b, +.u-tabs__wrapper.data-v-5fec1d8b, +.u-tabs__wrapper__scroll-view-wrapper.data-v-5fec1d8b, +.u-tabs__wrapper__scroll-view.data-v-5fec1d8b, +.u-tabs__wrapper__nav.data-v-5fec1d8b, +.u-tabs__wrapper__nav__line.data-v-5fec1d8b, +.up-empty.data-v-5fec1d8b, +.up-empty__wrap.data-v-5fec1d8b, +.up-tabs.data-v-5fec1d8b, +.up-tabs__wrapper.data-v-5fec1d8b, +.up-tabs__wrapper__scroll-view-wrapper.data-v-5fec1d8b, +.up-tabs__wrapper__scroll-view.data-v-5fec1d8b, +.up-tabs__wrapper__nav.data-v-5fec1d8b, +.up-tabs__wrapper__nav__line.data-v-5fec1d8b { + display: flex; + flex-direction: column; + flex-shrink: 0; + flex-grow: 0; + flex-basis: auto; + align-items: stretch; + align-content: flex-start; +} +.u-text.data-v-5fec1d8b { + display: flex; + flex-direction: row; + align-items: center; + flex-wrap: nowrap; +} +.u-text__price.data-v-5fec1d8b { + font-size: 14px; + color: #606266; +} +.u-text__value.data-v-5fec1d8b { + font-size: 14px; + display: flex; + flex-direction: row; + color: #606266; + flex-wrap: wrap; + text-overflow: ellipsis; + align-items: center; +} +.u-text__value--primary.data-v-5fec1d8b { + color: #3c9cff; +} +.u-text__value--warning.data-v-5fec1d8b { + color: #f9ae3d; +} +.u-text__value--success.data-v-5fec1d8b { + color: #5ac725; +} +.u-text__value--info.data-v-5fec1d8b { + color: #909399; +} +.u-text__value--error.data-v-5fec1d8b { + color: #f56c6c; +} +.u-text__value--main.data-v-5fec1d8b { + color: #303133; +} +.u-text__value--content.data-v-5fec1d8b { + color: #606266; +} +.u-text__value--tips.data-v-5fec1d8b { + color: #909193; +} +.u-text__value--light.data-v-5fec1d8b { + color: #c0c4cc; +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-textarea/u-textarea.js b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-textarea/u-textarea.js new file mode 100644 index 0000000..a6c7d92 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-textarea/u-textarea.js @@ -0,0 +1,145 @@ +"use strict"; +const common_vendor = require("../../../../common/vendor.js"); +const _sfc_main = { + name: "u-textarea", + mixins: [common_vendor.mpMixin, common_vendor.mixin, common_vendor.props$2], + data() { + return { + // 输入框的值 + innerValue: "", + // 是否处于获得焦点状态 + focused: false, + // value是否第一次变化,在watch中,由于加入immediate属性,会在第一次触发,此时不应该认为value发生了变化 + firstChange: true, + // value绑定值的变化是由内部还是外部引起的 + changeFromInner: false, + // 过滤处理方法 + innerFormatter: (value) => value + }; + }, + created() { + }, + watch: { + modelValue: { + immediate: true, + handler(newVal, oldVal) { + this.innerValue = newVal; + this.firstChange = false; + this.changeFromInner = false; + } + } + }, + computed: { + fieldStyle() { + let style = {}; + style["height"] = common_vendor.addUnit(this.height); + if (this.autoHeight) { + style["height"] = "auto"; + style["minHeight"] = common_vendor.addUnit(this.height); + } + return style; + }, + // 组件的类名 + textareaClass() { + let classes = [], { border, disabled } = this; + border === "surround" && (classes = classes.concat(["u-border", "u-textarea--radius"])); + border === "bottom" && (classes = classes.concat([ + "u-border-bottom", + "u-textarea--no-radius" + ])); + disabled && classes.push("u-textarea--disabled"); + return classes.join(" "); + }, + // 组件的样式 + textareaStyle() { + const style = {}; + return common_vendor.deepMerge(style, common_vendor.addStyle(this.customStyle)); + } + }, + emits: ["update:modelValue", "linechange", "focus", "blur", "change", "confirm", "keyboardheightchange"], + methods: { + addStyle: common_vendor.addStyle, + addUnit: common_vendor.addUnit, + // 在微信小程序中,不支持将函数当做props参数,故只能通过ref形式调用 + setFormatter(e) { + this.innerFormatter = e; + }, + onFocus(e) { + this.$emit("focus", e); + }, + onBlur(e) { + this.$emit("blur", e); + common_vendor.formValidate(this, "blur"); + }, + onLinechange(e) { + this.$emit("linechange", e); + }, + onInput(e) { + let { value = "" } = e.detail || {}; + const formatter = this.formatter || this.innerFormatter; + const formatValue = formatter(value); + this.innerValue = value; + this.$nextTick(() => { + this.innerValue = formatValue; + this.valueChange(); + }); + }, + // 内容发生变化,进行处理 + valueChange() { + const value = this.innerValue; + this.$nextTick(() => { + this.$emit("update:modelValue", value); + this.changeFromInner = true; + this.$emit("change", value); + common_vendor.formValidate(this, "change"); + }); + }, + onConfirm(e) { + this.$emit("confirm", e); + }, + onKeyboardheightchange(e) { + this.$emit("keyboardheightchange", e); + } + } +}; +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + return common_vendor.e({ + a: $data.innerValue, + b: common_vendor.s($options.fieldStyle), + c: _ctx.placeholder, + d: $options.addStyle(_ctx.placeholderStyle, typeof _ctx.placeholderStyle === "string" ? "string" : "object"), + e: _ctx.placeholderClass, + f: _ctx.disabled, + g: _ctx.focus, + h: _ctx.autoHeight, + i: _ctx.fixed, + j: _ctx.cursorSpacing, + k: _ctx.cursor, + l: _ctx.showConfirmBar, + m: _ctx.selectionStart, + n: _ctx.selectionEnd, + o: _ctx.adjustPosition, + p: _ctx.disableDefaultPadding, + q: _ctx.holdKeyboard, + r: _ctx.maxlength, + s: _ctx.confirmType, + t: _ctx.ignoreCompositionEvent, + v: common_vendor.o((...args) => $options.onFocus && $options.onFocus(...args)), + w: common_vendor.o((...args) => $options.onBlur && $options.onBlur(...args)), + x: common_vendor.o((...args) => $options.onLinechange && $options.onLinechange(...args)), + y: common_vendor.o((...args) => $options.onInput && $options.onInput(...args)), + z: common_vendor.o((...args) => $options.onConfirm && $options.onConfirm(...args)), + A: common_vendor.o((...args) => $options.onKeyboardheightchange && $options.onKeyboardheightchange(...args)), + B: _ctx.count + }, _ctx.count ? { + C: common_vendor.t($data.innerValue.length), + D: common_vendor.t(_ctx.maxlength), + E: _ctx.disabled ? "transparent" : "#fff" + } : {}, { + F: common_vendor.n($options.textareaClass), + G: common_vendor.s($options.textareaStyle) + }); +} +const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-31706dd7"]]); +wx.createComponent(Component); +//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/node-modules/uview-plus/components/u-textarea/u-textarea.js.map diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-textarea/u-textarea.json b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-textarea/u-textarea.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-textarea/u-textarea.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-textarea/u-textarea.wxml b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-textarea/u-textarea.wxml new file mode 100644 index 0000000..76bb3d4 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-textarea/u-textarea.wxml @@ -0,0 +1 @@ +{{C}}/{{D}} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-textarea/u-textarea.wxss b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-textarea/u-textarea.wxss new file mode 100644 index 0000000..a1ecfc9 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-textarea/u-textarea.wxss @@ -0,0 +1,82 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ +.u-empty.data-v-31706dd7, +.u-empty__wrap.data-v-31706dd7, +.u-tabs.data-v-31706dd7, +.u-tabs__wrapper.data-v-31706dd7, +.u-tabs__wrapper__scroll-view-wrapper.data-v-31706dd7, +.u-tabs__wrapper__scroll-view.data-v-31706dd7, +.u-tabs__wrapper__nav.data-v-31706dd7, +.u-tabs__wrapper__nav__line.data-v-31706dd7, +.up-empty.data-v-31706dd7, +.up-empty__wrap.data-v-31706dd7, +.up-tabs.data-v-31706dd7, +.up-tabs__wrapper.data-v-31706dd7, +.up-tabs__wrapper__scroll-view-wrapper.data-v-31706dd7, +.up-tabs__wrapper__scroll-view.data-v-31706dd7, +.up-tabs__wrapper__nav.data-v-31706dd7, +.up-tabs__wrapper__nav__line.data-v-31706dd7 { + display: flex; + flex-direction: column; + flex-shrink: 0; + flex-grow: 0; + flex-basis: auto; + align-items: stretch; + align-content: flex-start; +} +.u-textarea.data-v-31706dd7 { + border-radius: 4px; + background-color: #fff; + position: relative; + display: flex; + flex-direction: row; + flex: 1; + padding: 9px; +} +.u-textarea--radius.data-v-31706dd7 { + border-radius: 4px; +} +.u-textarea--no-radius.data-v-31706dd7 { + border-radius: 0; +} +.u-textarea--disabled.data-v-31706dd7 { + background-color: #f5f7fa; +} +.u-textarea__field.data-v-31706dd7 { + flex: 1; + font-size: 15px; + color: #606266; + width: 100%; +} +.u-textarea__count.data-v-31706dd7 { + position: absolute; + right: 5px; + bottom: 2px; + font-size: 12px; + color: #909193; + background-color: #ffffff; + padding: 1px 4px; +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-toast/u-toast.js b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-toast/u-toast.js new file mode 100644 index 0000000..21277a9 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-toast/u-toast.js @@ -0,0 +1,171 @@ +"use strict"; +const common_vendor = require("../../../../common/vendor.js"); +const _sfc_main = { + name: "u-toast", + mixins: [common_vendor.mpMixin, common_vendor.mixin], + data() { + return { + isShow: false, + timer: null, + // 定时器 + config: { + message: "", + // 显示文本 + type: "", + // 主题类型,primary,success,error,warning,black + duration: 2e3, + // 显示的时间,毫秒 + icon: true, + // 显示的图标 + position: "center", + // toast出现的位置 + complete: null, + // 执行完后的回调函数 + overlay: true, + // 是否防止触摸穿透 + loading: false + // 是否加载中状态 + }, + tmpConfig: {} + // 将用户配置和内置配置合并后的临时配置变量 + }; + }, + computed: { + iconName() { + if (!this.tmpConfig.icon || this.tmpConfig.icon == "none") { + return ""; + } + if (this.tmpConfig.icon === true) { + if (["error", "warning", "success", "primary"].includes(this.tmpConfig.type)) { + return common_vendor.type2icon(this.tmpConfig.type); + } else { + return ""; + } + } else { + return this.tmpConfig.icon; + } + }, + overlayStyle() { + const style = { + justifyContent: "center", + alignItems: "center", + display: "flex" + }; + style.backgroundColor = "rgba(0, 0, 0, 0)"; + return style; + }, + iconStyle() { + const style = {}; + style.marginRight = "4px"; + return style; + }, + loadingIconColor() { + let colorTmp = "rgb(255, 255, 255)"; + if (["error", "warning", "success", "primary"].includes(this.tmpConfig.type)) { + colorTmp = common_vendor.hexToRgb(common_vendor.color[this.tmpConfig.type]); + } + return colorTmp; + }, + // 内容盒子的样式 + contentStyle() { + const windowHeight = common_vendor.getWindowInfo().windowHeight, style = {}; + let value = 0; + if (this.tmpConfig.position === "top") { + value = -windowHeight * 0.25; + } else if (this.tmpConfig.position === "bottom") { + value = windowHeight * 0.25; + } + style.transform = `translateY(${value}px)`; + return style; + } + }, + created() { + ["primary", "success", "error", "warning", "default", "loading"].map((item) => { + this[item] = (message) => this.show({ + type: item, + message + }); + }); + }, + methods: { + // 显示toast组件,由父组件通过this.$refs.xxx.show(options)形式调用 + show(options) { + this.tmpConfig = common_vendor.deepMerge(this.config, options); + this.clearTimer(); + this.isShow = true; + if (this.tmpConfig.duration !== -1) { + this.timer = setTimeout(() => { + this.clearTimer(); + typeof this.tmpConfig.complete === "function" && this.tmpConfig.complete(); + }, this.tmpConfig.duration); + } + }, + // 隐藏toast组件,由父组件通过this.$refs.xxx.hide()形式调用 + hide() { + this.clearTimer(); + }, + clearTimer() { + this.isShow = false; + clearTimeout(this.timer); + this.timer = null; + } + }, + beforeUnmount() { + this.clearTimer(); + } +}; +if (!Array) { + const _easycom_u_loading_icon2 = common_vendor.resolveComponent("u-loading-icon"); + const _easycom_u_icon2 = common_vendor.resolveComponent("u-icon"); + const _easycom_u_gap2 = common_vendor.resolveComponent("u-gap"); + const _easycom_u_overlay2 = common_vendor.resolveComponent("u-overlay"); + (_easycom_u_loading_icon2 + _easycom_u_icon2 + _easycom_u_gap2 + _easycom_u_overlay2)(); +} +const _easycom_u_loading_icon = () => "../u-loading-icon/u-loading-icon.js"; +const _easycom_u_icon = () => "../u-icon/u-icon.js"; +const _easycom_u_gap = () => "../u-gap/u-gap.js"; +const _easycom_u_overlay = () => "../u-overlay/u-overlay.js"; +if (!Math) { + (_easycom_u_loading_icon + _easycom_u_icon + _easycom_u_gap + _easycom_u_overlay)(); +} +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + return common_vendor.e({ + a: $data.tmpConfig.type === "loading" + }, $data.tmpConfig.type === "loading" ? { + b: common_vendor.p({ + mode: "circle", + color: "rgb(255, 255, 255)", + inactiveColor: "rgb(120, 120, 120)", + size: "25" + }) + } : $data.tmpConfig.type !== "defalut" && $options.iconName ? { + d: common_vendor.p({ + name: $options.iconName, + size: "17", + color: $data.tmpConfig.type, + customStyle: $options.iconStyle + }) + } : {}, { + c: $data.tmpConfig.type !== "defalut" && $options.iconName, + e: $data.tmpConfig.type === "loading" || $data.tmpConfig.loading + }, $data.tmpConfig.type === "loading" || $data.tmpConfig.loading ? { + f: common_vendor.p({ + height: "12", + bgColor: "transparent" + }) + } : {}, { + g: common_vendor.t($data.tmpConfig.message), + h: common_vendor.n("u-toast__content__text--" + $data.tmpConfig.type), + i: common_vendor.s($options.contentStyle), + j: common_vendor.n("u-type-" + $data.tmpConfig.type), + k: common_vendor.n($data.tmpConfig.type === "loading" || $data.tmpConfig.loading ? "u-toast__content--loading" : ""), + l: common_vendor.p({ + show: $data.isShow, + zIndex: $data.tmpConfig.overlay ? 10070 : -1, + ["custom-style"]: $options.overlayStyle + }) + }); +} +const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-2232870a"]]); +wx.createComponent(Component); +//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/node-modules/uview-plus/components/u-toast/u-toast.js.map diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-toast/u-toast.json b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-toast/u-toast.json new file mode 100644 index 0000000..b14bde3 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-toast/u-toast.json @@ -0,0 +1,9 @@ +{ + "component": true, + "usingComponents": { + "u-loading-icon": "../u-loading-icon/u-loading-icon", + "u-icon": "../u-icon/u-icon", + "u-gap": "../u-gap/u-gap", + "u-overlay": "../u-overlay/u-overlay" + } +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-toast/u-toast.wxml b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-toast/u-toast.wxml new file mode 100644 index 0000000..e735e7b --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-toast/u-toast.wxml @@ -0,0 +1 @@ +{{g}} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-toast/u-toast.wxss b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-toast/u-toast.wxss new file mode 100644 index 0000000..b3dc557 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-toast/u-toast.wxss @@ -0,0 +1,112 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ +.u-empty.data-v-2232870a, +.u-empty__wrap.data-v-2232870a, +.u-tabs.data-v-2232870a, +.u-tabs__wrapper.data-v-2232870a, +.u-tabs__wrapper__scroll-view-wrapper.data-v-2232870a, +.u-tabs__wrapper__scroll-view.data-v-2232870a, +.u-tabs__wrapper__nav.data-v-2232870a, +.u-tabs__wrapper__nav__line.data-v-2232870a, +.up-empty.data-v-2232870a, +.up-empty__wrap.data-v-2232870a, +.up-tabs.data-v-2232870a, +.up-tabs__wrapper.data-v-2232870a, +.up-tabs__wrapper__scroll-view-wrapper.data-v-2232870a, +.up-tabs__wrapper__scroll-view.data-v-2232870a, +.up-tabs__wrapper__nav.data-v-2232870a, +.up-tabs__wrapper__nav__line.data-v-2232870a { + display: flex; + flex-direction: column; + flex-shrink: 0; + flex-grow: 0; + flex-basis: auto; + align-items: stretch; + align-content: flex-start; +} +.u-toast__content.data-v-2232870a { + display: flex; + flex-direction: row; + padding: 12px 20px; + border-radius: 4px; + background-color: #585858; + color: #fff; + align-items: center; + max-width: 600rpx; + position: relative; +} +.u-toast__content--loading.data-v-2232870a { + flex-direction: column; + padding: 20px 20px; +} +.u-toast__content__text.data-v-2232870a { + color: #fff; + font-size: 15px; + line-height: 15px; +} +.u-toast__content__text--default.data-v-2232870a { + color: #fff; +} +.u-toast__content__text--error.data-v-2232870a { + color: #f56c6c; +} +.u-toast__content__text--primary.data-v-2232870a { + color: #3c9cff; +} +.u-toast__content__text--success.data-v-2232870a { + color: #5ac725; +} +.u-toast__content__text--warning.data-v-2232870a { + color: #f9ae3d; +} +.u-type-primary.data-v-2232870a { + color: #3c9cff; + background-color: #ecf5ff; + border-color: #d7eafe; + border-width: 1px; +} +.u-type-success.data-v-2232870a { + color: #5ac725; + background-color: #dbf1e1; + border-color: #BEF5C8; + border-width: 1px; +} +.u-type-error.data-v-2232870a { + color: #f56c6c; + background-color: #fef0f0; + border-color: #fde2e2; + border-width: 1px; +} +.u-type-warning.data-v-2232870a { + color: #f9ae3d; + background-color: #fdf6ec; + border-color: #faecd8; + border-width: 1px; +} +.u-type-default.data-v-2232870a { + color: #fff; + background-color: #585858; +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-toolbar/u-toolbar.js b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-toolbar/u-toolbar.js new file mode 100644 index 0000000..f81ec3f --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-toolbar/u-toolbar.js @@ -0,0 +1,42 @@ +"use strict"; +const common_vendor = require("../../../../common/vendor.js"); +const _sfc_main = { + name: "u-toolbar", + mixins: [common_vendor.mpMixin, common_vendor.mixin, common_vendor.props$36], + emits: ["confirm", "cancel"], + created() { + }, + methods: { + // 点击取消按钮 + cancel() { + this.$emit("cancel"); + }, + // 点击确定按钮 + confirm() { + this.$emit("confirm"); + } + } +}; +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + return common_vendor.e({ + a: _ctx.show + }, _ctx.show ? common_vendor.e({ + b: common_vendor.t(_ctx.cancelText), + c: common_vendor.o((...args) => $options.cancel && $options.cancel(...args)), + d: _ctx.cancelColor, + e: _ctx.title + }, _ctx.title ? { + f: common_vendor.t(_ctx.title) + } : {}, { + g: !_ctx.rightSlot + }, !_ctx.rightSlot ? { + h: common_vendor.t(_ctx.confirmText), + i: common_vendor.o((...args) => $options.confirm && $options.confirm(...args)), + j: _ctx.confirmColor + } : {}, { + k: common_vendor.o((...args) => _ctx.noop && _ctx.noop(...args)) + }) : {}); +} +const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-3fd495d6"]]); +wx.createComponent(Component); +//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/node-modules/uview-plus/components/u-toolbar/u-toolbar.js.map diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-toolbar/u-toolbar.json b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-toolbar/u-toolbar.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-toolbar/u-toolbar.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-toolbar/u-toolbar.wxml b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-toolbar/u-toolbar.wxml new file mode 100644 index 0000000..fdf5d27 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-toolbar/u-toolbar.wxml @@ -0,0 +1 @@ +{{b}}{{f}}{{h}} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-toolbar/u-toolbar.wxss b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-toolbar/u-toolbar.wxss new file mode 100644 index 0000000..a9612aa --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-toolbar/u-toolbar.wxss @@ -0,0 +1,77 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ +.u-empty.data-v-3fd495d6, +.u-empty__wrap.data-v-3fd495d6, +.u-tabs.data-v-3fd495d6, +.u-tabs__wrapper.data-v-3fd495d6, +.u-tabs__wrapper__scroll-view-wrapper.data-v-3fd495d6, +.u-tabs__wrapper__scroll-view.data-v-3fd495d6, +.u-tabs__wrapper__nav.data-v-3fd495d6, +.u-tabs__wrapper__nav__line.data-v-3fd495d6, +.up-empty.data-v-3fd495d6, +.up-empty__wrap.data-v-3fd495d6, +.up-tabs.data-v-3fd495d6, +.up-tabs__wrapper.data-v-3fd495d6, +.up-tabs__wrapper__scroll-view-wrapper.data-v-3fd495d6, +.up-tabs__wrapper__scroll-view.data-v-3fd495d6, +.up-tabs__wrapper__nav.data-v-3fd495d6, +.up-tabs__wrapper__nav__line.data-v-3fd495d6 { + display: flex; + flex-direction: column; + flex-shrink: 0; + flex-grow: 0; + flex-basis: auto; + align-items: stretch; + align-content: flex-start; +} +.u-toolbar.data-v-3fd495d6 { + height: 42px; + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; +} +.u-toolbar__wrapper__cancel.data-v-3fd495d6 { + color: #909193; + font-size: 15px; + padding: 0 15px; +} +.u-toolbar__title.data-v-3fd495d6 { + color: #303133; + padding: 0 60rpx; + font-size: 16px; + flex: 1; + text-align: center; +} +.u-toolbar__wrapper__left.data-v-3fd495d6, .u-toolbar__wrapper__right.data-v-3fd495d6 { + display: flex; + flex-direction: row; +} +.u-toolbar__wrapper__confirm.data-v-3fd495d6 { + color: #3c9cff; + font-size: 15px; + padding: 0 15px; +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-transition/u-transition.json b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-transition/u-transition.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-transition/u-transition.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-transition/u-transition.wxml b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-transition/u-transition.wxml new file mode 100644 index 0000000..c287fcb --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-transition/u-transition.wxml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-transition/u-transition.wxss b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-transition/u-transition.wxss new file mode 100644 index 0000000..30a60de --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-transition/u-transition.wxss @@ -0,0 +1,144 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ +.u-empty.data-v-0573594d, +.u-empty__wrap.data-v-0573594d, +.u-tabs.data-v-0573594d, +.u-tabs__wrapper.data-v-0573594d, +.u-tabs__wrapper__scroll-view-wrapper.data-v-0573594d, +.u-tabs__wrapper__scroll-view.data-v-0573594d, +.u-tabs__wrapper__nav.data-v-0573594d, +.u-tabs__wrapper__nav__line.data-v-0573594d, +.up-empty.data-v-0573594d, +.up-empty__wrap.data-v-0573594d, +.up-tabs.data-v-0573594d, +.up-tabs__wrapper.data-v-0573594d, +.up-tabs__wrapper__scroll-view-wrapper.data-v-0573594d, +.up-tabs__wrapper__scroll-view.data-v-0573594d, +.up-tabs__wrapper__nav.data-v-0573594d, +.up-tabs__wrapper__nav__line.data-v-0573594d { + display: flex; + flex-direction: column; + flex-shrink: 0; + flex-grow: 0; + flex-basis: auto; + align-items: stretch; + align-content: flex-start; +} +/** + * vue版本动画内置的动画模式有如下: + * fade:淡入 + * zoom:缩放 + * fade-zoom:缩放淡入 + * fade-up:上滑淡入 + * fade-down:下滑淡入 + * fade-left:左滑淡入 + * fade-right:右滑淡入 + * slide-up:上滑进入 + * slide-down:下滑进入 + * slide-left:左滑进入 + * slide-right:右滑进入 + */ +.u-fade-enter-active.data-v-0573594d, +.u-fade-leave-active.data-v-0573594d { + transition-property: opacity; +} +.u-fade-enter.data-v-0573594d, +.u-fade-leave-to.data-v-0573594d { + opacity: 0; +} +.u-fade-zoom-enter.data-v-0573594d, +.u-fade-zoom-leave-to.data-v-0573594d { + transform: scale(0.95); + opacity: 0; +} +.u-fade-zoom-enter-active.data-v-0573594d, +.u-fade-zoom-leave-active.data-v-0573594d { + transition-property: transform, opacity; +} +.u-fade-down-enter-active.data-v-0573594d, +.u-fade-down-leave-active.data-v-0573594d, +.u-fade-left-enter-active.data-v-0573594d, +.u-fade-left-leave-active.data-v-0573594d, +.u-fade-right-enter-active.data-v-0573594d, +.u-fade-right-leave-active.data-v-0573594d, +.u-fade-up-enter-active.data-v-0573594d, +.u-fade-up-leave-active.data-v-0573594d { + transition-property: opacity, transform; +} +.u-fade-up-enter.data-v-0573594d, +.u-fade-up-leave-to.data-v-0573594d { + transform: translate3d(0, 100%, 0); + opacity: 0; +} +.u-fade-down-enter.data-v-0573594d, +.u-fade-down-leave-to.data-v-0573594d { + transform: translate3d(0, -100%, 0); + opacity: 0; +} +.u-fade-left-enter.data-v-0573594d, +.u-fade-left-leave-to.data-v-0573594d { + transform: translate3d(-100%, 0, 0); + opacity: 0; +} +.u-fade-right-enter.data-v-0573594d, +.u-fade-right-leave-to.data-v-0573594d { + transform: translate3d(100%, 0, 0); + opacity: 0; +} +.u-slide-down-enter-active.data-v-0573594d, +.u-slide-down-leave-active.data-v-0573594d, +.u-slide-left-enter-active.data-v-0573594d, +.u-slide-left-leave-active.data-v-0573594d, +.u-slide-right-enter-active.data-v-0573594d, +.u-slide-right-leave-active.data-v-0573594d, +.u-slide-up-enter-active.data-v-0573594d, +.u-slide-up-leave-active.data-v-0573594d { + transition-property: transform; +} +.u-slide-up-enter.data-v-0573594d, +.u-slide-up-leave-to.data-v-0573594d { + transform: translate3d(0, 100%, 0); +} +.u-slide-down-enter.data-v-0573594d, +.u-slide-down-leave-to.data-v-0573594d { + transform: translate3d(0, -100%, 0); +} +.u-slide-left-enter.data-v-0573594d, +.u-slide-left-leave-to.data-v-0573594d { + transform: translate3d(-100%, 0, 0); +} +.u-slide-right-enter.data-v-0573594d, +.u-slide-right-leave-to.data-v-0573594d { + transform: translate3d(100%, 0, 0); +} +.u-zoom-enter-active.data-v-0573594d, +.u-zoom-leave-active.data-v-0573594d { + transition-property: transform; +} +.u-zoom-enter.data-v-0573594d, +.u-zoom-leave-to.data-v-0573594d { + transform: scale(0.95); +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-upload/u-upload.js b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-upload/u-upload.js new file mode 100644 index 0000000..b91d9d9 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-upload/u-upload.js @@ -0,0 +1,335 @@ +"use strict"; +const common_vendor = require("../../../../common/vendor.js"); +const _sfc_main = { + name: "u-upload", + mixins: [common_vendor.mpMixin, common_vendor.mixin, common_vendor.mixinUpload, common_vendor.props$19], + data() { + return { + lists: [], + isInCount: true + }; + }, + watch: { + // 监听文件列表的变化,重新整理内部数据 + fileList: { + handler() { + this.formatFileList(); + }, + immediate: true, + deep: true + }, + deletable(newVal) { + this.formatFileList(); + }, + maxCount(newVal) { + this.formatFileList(); + }, + accept(newVal) { + this.formatFileList(); + } + }, + emits: ["error", "beforeRead", "oversize", "afterRead", "delete", "clickPreview"], + methods: { + addUnit: common_vendor.addUnit, + addStyle: common_vendor.addStyle, + formatFileList() { + const { + fileList = [], + maxCount + } = this; + const lists = fileList.map( + (item) => Object.assign(Object.assign({}, item), { + // 如果item.url为本地选择的blob文件的话,无法判断其为video还是image,此处优先通过accept做判断处理 + isImage: this.accept === "image" || common_vendor.test.image(item.url || item.thumb), + isVideo: this.accept === "video" || common_vendor.test.video(item.url || item.thumb), + deletable: typeof item.deletable === "boolean" ? item.deletable : this.deletable + }) + ); + this.lists = lists; + this.isInCount = lists.length < maxCount; + }, + chooseFile() { + const { + maxCount, + multiple, + lists, + disabled + } = this; + if (disabled) + return; + let capture; + try { + capture = common_vendor.test.array(this.capture) ? this.capture : this.capture.split(","); + } catch (e) { + capture = []; + } + common_vendor.chooseFile( + Object.assign({ + accept: this.accept, + extension: this.extension, + multiple: this.multiple, + capture, + compressed: this.compressed, + maxDuration: this.maxDuration, + sizeType: this.sizeType, + camera: this.camera + }, { + maxCount: maxCount - lists.length + }) + ).then((res) => { + this.onBeforeRead(multiple ? res : res[0]); + }).catch((error) => { + this.$emit("error", error); + }); + }, + // 文件读取之前 + onBeforeRead(file) { + const { + beforeRead, + useBeforeRead + } = this; + let res = true; + if (common_vendor.test.func(beforeRead)) { + res = beforeRead(file, this.getDetail()); + } + if (useBeforeRead) { + res = new Promise((resolve, reject) => { + this.$emit( + "beforeRead", + Object.assign(Object.assign({ + file + }, this.getDetail()), { + callback: (ok) => { + ok ? resolve() : reject(); + } + }) + ); + }); + } + if (!res) { + return; + } + if (common_vendor.test.promise(res)) { + res.then((data) => this.onAfterRead(data || file)); + } else { + this.onAfterRead(file); + } + }, + getDetail(index) { + return { + name: this.name, + index: index == null ? this.fileList.length : index + }; + }, + onAfterRead(file) { + const { + maxSize, + afterRead + } = this; + const oversize = Array.isArray(file) ? file.some((item) => item.size > maxSize) : file.size > maxSize; + if (oversize) { + this.$emit("oversize", Object.assign({ + file + }, this.getDetail())); + return; + } + if (typeof afterRead === "function") { + afterRead(file, this.getDetail()); + } + this.$emit("afterRead", Object.assign({ + file + }, this.getDetail())); + }, + deleteItem(index) { + this.$emit( + "delete", + Object.assign(Object.assign({}, this.getDetail(index)), { + file: this.fileList[index] + }) + ); + }, + // 预览图片 + onPreviewImage(previewItem, index) { + if (!previewItem.isImage || !this.previewFullImage) + return; + let current = 0; + const urls = []; + let imageIndex = 0; + for (var i = 0; i < this.lists.length; i++) { + const item = this.lists[i]; + if (item.isImage || item.type && item.type === "image") { + urls.push(item.url || item.thumb); + if (i === index) { + current = imageIndex; + } + imageIndex += 1; + } + } + if (urls.length < 1) { + return; + } + common_vendor.index.previewImage({ + urls, + current, + fail() { + common_vendor.toast("预览图片失败"); + } + }); + }, + onPreviewVideo(index) { + if (!this.previewFullImage) + return; + let current = 0; + const sources = []; + let videoIndex = 0; + for (var i = 0; i < this.lists.length; i++) { + const item = this.lists[i]; + if (item.isVideo || item.type && item.type === "video") { + sources.push(Object.assign(Object.assign({}, item), { + type: "video" + })); + if (i === index) { + current = videoIndex; + } + videoIndex += 1; + } + } + if (sources.length < 1) { + return; + } + common_vendor.wx$1.previewMedia({ + sources, + current, + fail() { + common_vendor.toast("预览视频失败"); + } + }); + }, + onClickPreview(item, index) { + if (!this.previewFullImage) + return; + switch (item.type) { + case "video": + this.onPreviewVideo(index); + break; + } + this.$emit( + "clickPreview", + Object.assign(Object.assign({}, item), this.getDetail(index)) + ); + } + } +}; +if (!Array) { + const _easycom_u_icon2 = common_vendor.resolveComponent("u-icon"); + const _easycom_u_loading_icon2 = common_vendor.resolveComponent("u-loading-icon"); + (_easycom_u_icon2 + _easycom_u_loading_icon2)(); +} +const _easycom_u_icon = () => "../u-icon/u-icon.js"; +const _easycom_u_loading_icon = () => "../u-loading-icon/u-loading-icon.js"; +if (!Math) { + (_easycom_u_icon + _easycom_u_loading_icon)(); +} +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + return common_vendor.e({ + a: _ctx.previewImage + }, _ctx.previewImage ? { + b: common_vendor.f($data.lists, (item, index, i0) => { + return common_vendor.e({ + a: item.isImage || item.type && item.type === "image" + }, item.isImage || item.type && item.type === "image" ? { + b: item.thumb || item.url, + c: _ctx.imageMode, + d: common_vendor.o(($event) => $options.onPreviewImage(item, index), index), + e: common_vendor.s({ + width: $options.addUnit(_ctx.width), + height: $options.addUnit(_ctx.height) + }) + } : { + f: "cafe0b2a-0-" + i0, + g: common_vendor.p({ + color: "#80CBF9", + size: "26", + name: item.isVideo || item.type && item.type === "video" ? "movie" : "folder" + }), + h: common_vendor.t(item.isVideo || item.type && item.type === "video" ? "视频" : "文件"), + i: common_vendor.o(($event) => $options.onClickPreview(item, index), index) + }, { + j: item.status === "uploading" || item.status === "failed" + }, item.status === "uploading" || item.status === "failed" ? common_vendor.e({ + k: item.status === "failed" + }, item.status === "failed" ? { + l: "cafe0b2a-1-" + i0, + m: common_vendor.p({ + name: "close-circle", + color: "#ffffff", + size: "25" + }) + } : { + n: "cafe0b2a-2-" + i0, + o: common_vendor.p({ + size: "22", + mode: "circle", + color: "#ffffff" + }) + }, { + p: item.message + }, item.message ? { + q: common_vendor.t(item.message) + } : {}) : {}, { + r: item.status !== "uploading" && (_ctx.deletable || item.deletable) + }, item.status !== "uploading" && (_ctx.deletable || item.deletable) ? { + s: "cafe0b2a-3-" + i0, + t: common_vendor.p({ + name: "close", + color: "#ffffff", + size: "10" + }), + v: common_vendor.o(($event) => $options.deleteItem(index), index) + } : {}, { + w: item.status === "success" + }, item.status === "success" ? { + x: "cafe0b2a-4-" + i0, + y: common_vendor.p({ + name: "checkmark", + color: "#ffffff", + size: "12" + }) + } : {}, { + z: index + }); + }) + } : {}, { + c: $data.isInCount + }, $data.isInCount ? common_vendor.e({ + d: _ctx.$slots.trigger + }, _ctx.$slots.trigger ? { + e: common_vendor.o((...args) => $options.chooseFile && $options.chooseFile(...args)) + } : !_ctx.$slots.trigger && (_ctx.$slots.default || _ctx.$slots.$default) ? { + g: common_vendor.o((...args) => $options.chooseFile && $options.chooseFile(...args)) + } : common_vendor.e({ + h: common_vendor.p({ + name: _ctx.uploadIcon, + size: "26", + color: _ctx.uploadIconColor + }), + i: _ctx.uploadText + }, _ctx.uploadText ? { + j: common_vendor.t(_ctx.uploadText) + } : {}, { + k: !_ctx.disabled ? "u-upload__button--hover" : "", + l: common_vendor.o((...args) => $options.chooseFile && $options.chooseFile(...args)), + m: common_vendor.n(_ctx.disabled && "u-upload__button--disabled"), + n: common_vendor.s({ + width: $options.addUnit(_ctx.width), + height: $options.addUnit(_ctx.height) + }) + }), { + f: !_ctx.$slots.trigger && (_ctx.$slots.default || _ctx.$slots.$default) + }) : {}, { + o: common_vendor.s($options.addStyle(_ctx.customStyle)) + }); +} +const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-cafe0b2a"]]); +wx.createComponent(Component); +//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/node-modules/uview-plus/components/u-upload/u-upload.js.map diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-upload/u-upload.json b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-upload/u-upload.json new file mode 100644 index 0000000..4d3fe5f --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-upload/u-upload.json @@ -0,0 +1,7 @@ +{ + "component": true, + "usingComponents": { + "u-icon": "../u-icon/u-icon", + "u-loading-icon": "../u-loading-icon/u-loading-icon" + } +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-upload/u-upload.wxml b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-upload/u-upload.wxml new file mode 100644 index 0000000..b382924 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-upload/u-upload.wxml @@ -0,0 +1 @@ +{{item.h}}{{item.q}}{{j}} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-upload/u-upload.wxss b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-upload/u-upload.wxss new file mode 100644 index 0000000..8346787 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/node-modules/uview-plus/components/u-upload/u-upload.wxss @@ -0,0 +1,172 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ +.u-empty.data-v-cafe0b2a, +.u-empty__wrap.data-v-cafe0b2a, +.u-tabs.data-v-cafe0b2a, +.u-tabs__wrapper.data-v-cafe0b2a, +.u-tabs__wrapper__scroll-view-wrapper.data-v-cafe0b2a, +.u-tabs__wrapper__scroll-view.data-v-cafe0b2a, +.u-tabs__wrapper__nav.data-v-cafe0b2a, +.u-tabs__wrapper__nav__line.data-v-cafe0b2a, +.up-empty.data-v-cafe0b2a, +.up-empty__wrap.data-v-cafe0b2a, +.up-tabs.data-v-cafe0b2a, +.up-tabs__wrapper.data-v-cafe0b2a, +.up-tabs__wrapper__scroll-view-wrapper.data-v-cafe0b2a, +.up-tabs__wrapper__scroll-view.data-v-cafe0b2a, +.up-tabs__wrapper__nav.data-v-cafe0b2a, +.up-tabs__wrapper__nav__line.data-v-cafe0b2a { + display: flex; + flex-direction: column; + flex-shrink: 0; + flex-grow: 0; + flex-basis: auto; + align-items: stretch; + align-content: flex-start; +} +.u-upload.data-v-cafe0b2a { + display: flex; + flex-direction: column; + flex: 1; +} +.u-upload__wrap.data-v-cafe0b2a { + display: flex; + flex-direction: row; + flex-wrap: wrap; + flex: 1; +} +.u-upload__wrap__preview.data-v-cafe0b2a { + border-radius: 2px; + margin: 0 8px 8px 0; + position: relative; + overflow: hidden; + display: flex; + flex-direction: row; +} +.u-upload__wrap__preview__image.data-v-cafe0b2a { + width: 80px; + height: 80px; +} +.u-upload__wrap__preview__other.data-v-cafe0b2a { + width: 80px; + height: 80px; + background-color: #f2f2f2; + flex: 1; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; +} +.u-upload__wrap__preview__other__text.data-v-cafe0b2a { + font-size: 11px; + color: #909193; + margin-top: 2px; +} +.u-upload__deletable.data-v-cafe0b2a { + position: absolute; + top: 0; + right: 0; + background-color: #373737; + height: 14px; + width: 14px; + display: flex; + flex-direction: row; + border-bottom-left-radius: 100px; + align-items: center; + justify-content: center; + z-index: 3; +} +.u-upload__deletable__icon.data-v-cafe0b2a { + position: absolute; + transform: scale(0.7); + top: 0px; + right: 0px; +} +.u-upload__success.data-v-cafe0b2a { + position: absolute; + bottom: 0; + right: 0; + display: flex; + flex-direction: row; + border-style: solid; + border-top-color: transparent; + border-left-color: transparent; + border-bottom-color: #5ac725; + border-right-color: #5ac725; + border-width: 9px; + align-items: center; + justify-content: center; +} +.u-upload__success__icon.data-v-cafe0b2a { + position: absolute; + transform: scale(0.7); + bottom: -10px; + right: -10px; +} +.u-upload__status.data-v-cafe0b2a { + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + background-color: rgba(0, 0, 0, 0.5); + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; +} +.u-upload__status__icon.data-v-cafe0b2a { + position: relative; + z-index: 1; +} +.u-upload__status__message.data-v-cafe0b2a { + font-size: 12px; + color: #FFFFFF; + margin-top: 5px; +} +.u-upload__button.data-v-cafe0b2a { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + width: 80px; + height: 80px; + background-color: #f4f5f7; + border-radius: 2px; + margin: 0 8px 8px 0; + box-sizing: border-box; +} +.u-upload__button__text.data-v-cafe0b2a { + font-size: 11px; + color: #909193; + margin-top: 2px; +} +.u-upload__button--hover.data-v-cafe0b2a { + background-color: #e6e7e9; +} +.u-upload__button--disabled.data-v-cafe0b2a { + opacity: 0.5; +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/apply/apply.js b/unpackage/dist/dev/mp-weixin/pages/apply/apply.js new file mode 100644 index 0000000..77a50ef --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/apply/apply.js @@ -0,0 +1,211 @@ +"use strict"; +const common_vendor = require("../../common/vendor.js"); +const common_assets = require("../../common/assets.js"); +if (!Array) { + const _easycom_up_input2 = common_vendor.resolveComponent("up-input"); + const _easycom_up_form_item2 = common_vendor.resolveComponent("up-form-item"); + const _easycom_up_icon2 = common_vendor.resolveComponent("up-icon"); + const _easycom_up_upload2 = common_vendor.resolveComponent("up-upload"); + const _easycom_up_form2 = common_vendor.resolveComponent("up-form"); + const _easycom_up_button2 = common_vendor.resolveComponent("up-button"); + const _easycom_up_picker2 = common_vendor.resolveComponent("up-picker"); + (_easycom_up_input2 + _easycom_up_form_item2 + _easycom_up_icon2 + _easycom_up_upload2 + _easycom_up_form2 + _easycom_up_button2 + _easycom_up_picker2)(); +} +const _easycom_up_input = () => "../../node-modules/uview-plus/components/u-input/u-input.js"; +const _easycom_up_form_item = () => "../../node-modules/uview-plus/components/u-form-item/u-form-item.js"; +const _easycom_up_icon = () => "../../node-modules/uview-plus/components/u-icon/u-icon.js"; +const _easycom_up_upload = () => "../../node-modules/uview-plus/components/u-upload/u-upload.js"; +const _easycom_up_form = () => "../../node-modules/uview-plus/components/u-form/u-form.js"; +const _easycom_up_button = () => "../../node-modules/uview-plus/components/u-button/u-button.js"; +const _easycom_up_picker = () => "../../node-modules/uview-plus/components/u-picker/u-picker.js"; +if (!Math) { + (_easycom_up_input + _easycom_up_form_item + _easycom_up_icon + _easycom_up_upload + _easycom_up_form + _easycom_up_button + QfImageCropper + _easycom_up_picker)(); +} +const QfImageCropper = () => "../../uni_modules/qf-image-cropper/components/qf-image-cropper/qf-image-cropper.js"; +const _sfc_main = { + __name: "apply", + setup(__props) { + const imgCropper = common_vendor.ref(null); + const model = common_vendor.reactive({ + name: "" + }); + const showCroper = common_vendor.ref(false); + const coperImg = common_vendor.ref(""); + const customStyle = common_vendor.reactive({ + height: "90rpx", + fontSize: "36rpx" + }); + const areacolumns = common_vendor.ref([]); + const showArea = common_vendor.ref(false); + const departcolumns = common_vendor.ref([]); + const showDepart = common_vendor.ref(false); + const titlecolumns = common_vendor.ref([]); + const showTitle = common_vendor.ref(false); + const closeArea = () => { + showArea.value = false; + }; + const confirmArea = (e) => { + showArea.value = false; + }; + const closeDepart = () => { + showDepart.value = false; + }; + const confirmDepart = (e) => { + common_vendor.index.__f__("log", "at pages/apply/apply.vue:122", e); + showDepart.value = false; + }; + const closeTitle = () => { + showTitle.value = false; + }; + const confirmTitle = (e) => { + showTitle.value = false; + }; + const afterRead = (event) => { + coperImg.value = event.file.url; + showCroper.value = true; + }; + const handleCrop = (e) => { + common_vendor.index.__f__("log", "at pages/apply/apply.vue:139", e.tempFilePath); + }; + const handleCancel = () => { + showCroper.value = false; + }; + common_vendor.onShow(() => { + }); + return (_ctx, _cache) => { + return common_vendor.e({ + a: common_vendor.o(($event) => model.name = $event), + b: common_vendor.p({ + placeholder: "请输入真实姓名", + modelValue: model.name + }), + c: common_vendor.p({ + label: "姓名", + prop: "userInfo.name", + borderBottom: true + }), + d: common_vendor.o(($event) => model.name = $event), + e: common_vendor.p({ + placeholder: "请选择医院", + modelValue: model.name + }), + f: common_vendor.p({ + name: "arrow-right" + }), + g: common_vendor.o(($event) => showArea.value = true), + h: common_vendor.p({ + label: "医院", + prop: "userInfo.name", + borderBottom: true + }), + i: common_vendor.o(($event) => model.name = $event), + j: common_vendor.p({ + placeholder: "请选择科室", + modelValue: model.name + }), + k: common_vendor.p({ + name: "arrow-right" + }), + l: common_vendor.o(($event) => showDepart.value = true), + m: common_vendor.p({ + label: "科室", + prop: "userInfo.name", + borderBottom: true + }), + n: common_vendor.o(($event) => model.name = $event), + o: common_vendor.p({ + placeholder: "请选择职称", + modelValue: model.name + }), + p: common_vendor.p({ + name: "arrow-right" + }), + q: common_vendor.o(($event) => showTitle.value = true), + r: common_vendor.p({ + label: "职称", + prop: "userInfo.name", + borderBottom: true + }), + s: common_vendor.o(($event) => model.name = $event), + t: common_vendor.p({ + placeholder: "请输入执业证号", + modelValue: model.name + }), + v: common_vendor.p({ + label: "执业证号(选填)", + prop: "userInfo.name", + borderBottom: true + }), + w: common_vendor.o(($event) => model.name = $event), + x: common_vendor.p({ + placeholder: "", + modelValue: model.name + }), + y: common_vendor.o(afterRead), + z: common_vendor.p({ + maxCount: 1 + }), + A: common_vendor.unref(common_assets.img), + B: common_vendor.p({ + name: "arrow-right" + }), + C: common_vendor.p({ + label: "执业医师资格证或工作胸牌", + prop: "userInfo.name", + borderBottom: true + }), + D: common_vendor.sr("form", "426a9ebe-0"), + E: common_vendor.p({ + labelPosition: "left", + model, + labelWidth: "115rpx" + }), + F: common_vendor.p({ + customStyle, + type: "success", + text: "提交", + color: "#3cc7c0", + size: "large" + }), + G: showCroper.value + }, showCroper.value ? { + H: common_vendor.sr(imgCropper, "426a9ebe-19", { + "k": "imgCropper" + }), + I: common_vendor.o(handleCancel), + J: common_vendor.o(handleCrop), + K: common_vendor.p({ + width: 500, + height: 500, + radius: 0, + backgroundColor: "#000", + src: coperImg.value, + zIndex: "999", + delay: "1500" + }) + } : {}, { + L: common_vendor.o(closeArea), + M: common_vendor.o(confirmArea), + N: common_vendor.p({ + show: showArea.value, + columns: areacolumns.value + }), + O: common_vendor.o(closeDepart), + P: common_vendor.o(confirmDepart), + Q: common_vendor.p({ + show: showDepart.value, + columns: departcolumns.value + }), + R: common_vendor.o(closeTitle), + S: common_vendor.o(confirmTitle), + T: common_vendor.p({ + show: showTitle.value, + columns: titlecolumns.value + }) + }); + }; + } +}; +const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-426a9ebe"]]); +wx.createPage(MiniProgramPage); +//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/apply/apply.js.map diff --git a/unpackage/dist/dev/mp-weixin/pages/apply/apply.json b/unpackage/dist/dev/mp-weixin/pages/apply/apply.json new file mode 100644 index 0000000..6bb17b9 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/apply/apply.json @@ -0,0 +1,15 @@ +{ + "navigationBarTitleText": "注册", + "enablePullDownRefresh": false, + "disableScroll": true, + "usingComponents": { + "up-input": "../../node-modules/uview-plus/components/u-input/u-input", + "up-form-item": "../../node-modules/uview-plus/components/u-form-item/u-form-item", + "up-icon": "../../node-modules/uview-plus/components/u-icon/u-icon", + "up-upload": "../../node-modules/uview-plus/components/u-upload/u-upload", + "up-form": "../../node-modules/uview-plus/components/u-form/u-form", + "up-button": "../../node-modules/uview-plus/components/u-button/u-button", + "up-picker": "../../node-modules/uview-plus/components/u-picker/u-picker", + "qf-image-cropper": "../../uni_modules/qf-image-cropper/components/qf-image-cropper/qf-image-cropper" + } +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/apply/apply.wxml b/unpackage/dist/dev/mp-weixin/pages/apply/apply.wxml new file mode 100644 index 0000000..d83dc10 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/apply/apply.wxml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/apply/apply.wxss b/unpackage/dist/dev/mp-weixin/pages/apply/apply.wxss new file mode 100644 index 0000000..b4edebd --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/apply/apply.wxss @@ -0,0 +1,95 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ +.logincontent.data-v-426a9ebe { + width: 100%; + height: 100vh; + background: #fff; +} +.logincontent .rightbox.data-v-426a9ebe { + display: flex; +} +.logincontent .uploadwraper.data-v-426a9ebe { + position: relative; + width: 140rpx; + height: 80rpx; + overflow: hidden; +} +.logincontent .uploadwraper.data-v-426a9ebe .u-upload { + width: 140rpx; + height: 80rpx; + position: relative; + z-index: 2; + opacity: 0; +} +.logincontent .uploadwraper.data-v-426a9ebe .dimg { + position: absolute; + top: 0; + bottom: 0; +} +.logincontent .smsbox.data-v-426a9ebe .u-form-item:nth-child(4) .u-form-item__body__left { + width: 240rpx !important; +} +.logincontent .smsbox.data-v-426a9ebe .u-form-item:nth-child(5) .u-form-item__body__left { + width: 418rpx !important; +} +.logincontent.data-v-426a9ebe .u-form-item__body__left__content__label { + font-size: 34rpx; + color: #000; +} +.logincontent .title.data-v-426a9ebe { + padding: 124rpx 0 64rpx 30rpx; + font-size: 46rpx; + font-stretch: normal; + letter-spacing: 2rpx; + color: #000000; +} +.logincontent.data-v-426a9ebe .u-form { + padding: 0 30rpx; +} +.logincontent .row.data-v-426a9ebe { + margin-top: 60rpx; + display: flex; + justify-content: space-between; + padding: 0 30rpx; +} +.logincontent .row .left.data-v-426a9ebe { + flex: 1; + color: #3cc7c0; + text-align: left; +} +.logincontent .row .right.data-v-426a9ebe { + flex: 1; + color: #666; + text-align: right; +} +.logincontent .row.data-v-426a9ebe .u-button--large .u-button__text { + font-size: 36rpx !important; +} +.logincontent.data-v-426a9ebe .wrap { + border-radius: 16rpx; + overflow: hidden; + border: none; +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/case/case.js b/unpackage/dist/dev/mp-weixin/pages/case/case.js new file mode 100644 index 0000000..4cf18db --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/case/case.js @@ -0,0 +1,35 @@ +"use strict"; +const common_vendor = require("../../common/vendor.js"); +if (!Math) { + tabBar(); +} +const tabBar = () => "../../components/tabBar/tabBar.js"; +const _sfc_main = { + __name: "case", + setup(__props) { + const src = common_vendor.ref(""); + common_vendor.onLoad((options) => { + { + const { envVersion } = common_vendor.index.getAccountInfoSync().miniProgram; + let token = ""; + if (envVersion == "release") { + token = common_vendor.index.getStorageSync("AUTH_TOKEN_CASEDATA"); + } else { + token = common_vendor.index.getStorageSync("DEV_AUTH_TOKEN_CASEDATA"); + } + src.value = "https://dev-caseplatform.igandan.com/web/home?token=" + token; + } + }); + return (_ctx, _cache) => { + return { + a: src.value, + b: common_vendor.p({ + value: 1 + }) + }; + }; + } +}; +const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-14eb7e01"]]); +wx.createPage(MiniProgramPage); +//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/case/case.js.map diff --git a/unpackage/dist/dev/mp-weixin/pages/case/case.json b/unpackage/dist/dev/mp-weixin/pages/case/case.json new file mode 100644 index 0000000..2adb30e --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/case/case.json @@ -0,0 +1,6 @@ +{ + "navigationBarTitleText": "互动病例", + "usingComponents": { + "tab-bar": "../../components/tabBar/tabBar" + } +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/case/case.wxml b/unpackage/dist/dev/mp-weixin/pages/case/case.wxml new file mode 100644 index 0000000..2567a89 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/case/case.wxml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/case/case.wxss b/unpackage/dist/dev/mp-weixin/pages/case/case.wxss new file mode 100644 index 0000000..672e706 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/case/case.wxss @@ -0,0 +1,7 @@ + +.page.data-v-14eb7e01{ + width:100%; + height:calc(100vh - 100rpx); + overflow-y: scroll; +} + diff --git a/unpackage/dist/dev/mp-weixin/pages/caseTalk/caseTalk.js b/unpackage/dist/dev/mp-weixin/pages/caseTalk/caseTalk.js new file mode 100644 index 0000000..beaba96 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/caseTalk/caseTalk.js @@ -0,0 +1,228 @@ +"use strict"; +const common_vendor = require("../../common/vendor.js"); +const common_assets = require("../../common/assets.js"); +const utils_navTo = require("../../utils/navTo.js"); +const api_api = require("../../api/api.js"); +if (!Array) { + const _easycom_u_icon2 = common_vendor.resolveComponent("u-icon"); + const _easycom_up__image2 = common_vendor.resolveComponent("up--image"); + const _easycom_up_icon2 = common_vendor.resolveComponent("up-icon"); + (_easycom_u_icon2 + _easycom_up__image2 + _easycom_up_icon2)(); +} +const _easycom_u_icon = () => "../../node-modules/uview-plus/components/u-icon/u-icon.js"; +const _easycom_up__image = () => "../../node-modules/uview-plus/components/u--image/u--image.js"; +const _easycom_up_icon = () => "../../node-modules/uview-plus/components/u-icon/u-icon.js"; +if (!Math) { + (navBar + _easycom_u_icon + _easycom_up__image + _easycom_up_icon + tabBar)(); +} +const navBar = () => "../../components/navBar/navBar.js"; +const tabBar = () => "../../components/tabBar/tabBar.js"; +const _sfc_main = { + __name: "caseTalk", + setup(__props) { + const numInfo = common_vendor.reactive({}); + const most_read_articles = common_vendor.ref([]); + const new_articles = common_vendor.ref([]); + const formatdate = (date) => { + return common_vendor.dayjs(date).format("YYYY-MM-DD"); + }; + const goList = (type) => { + if (type == "read") { + utils_navTo.navTo({ + url: "/pages/specialList/specialList?is_selected=1" + }); + } else { + utils_navTo.navTo({ + url: "/pages/specialList/specialList" + }); + } + }; + const getStatic = () => { + api_api.api.getExchangeStatic().then((res) => { + let result = res.data.data; + Object.assign(numInfo, result); + }); + }; + const goDetail = (id) => { + utils_navTo.navTo({ + url: `/pages/detail/detail?id=${id}&type=exchange` + }); + }; + const videoErrorCallback = (e) => { + common_vendor.index.showModal({ + content: e.target.errMsg, + showCancel: false + }); + }; + const searchList = async () => { + let searchForm = { + page: 1, + page_size: 10 + }; + api_api.api.searchExchage({ + ...searchForm + }).then((res) => { + new_articles.value = res.data.data.data; + }).catch((err) => { + }); + }; + const htmlToText = (html) => { + return html.replace(/<[^>]*>/g, "").replace(/ /gi, " ").replace(//gi, "\n").replace(/]*>/gi, "").replace(/]*>[\s\S]*?/gi, ""); + }; + const goodList = () => { + api_api.api.searchExchageGood({ + is_selected: 1, + limit: 5 + }).then((res) => { + most_read_articles.value = res.data.data; + }); + }; + const goPublish = () => { + utils_navTo.navTo({ + url: "/pages/publish/publish" + }); + }; + common_vendor.onShow(() => { + getStatic(); + goodList(); + searchList(); + }); + return (_ctx, _cache) => { + return common_vendor.e({ + a: common_vendor.p({ + navName: "肝胆相照病例交流园地", + type: "caseTalk" + }), + b: common_vendor.t(numInfo.exchange_num), + c: common_vendor.t(numInfo.exchange_collect_num), + d: common_vendor.t(numInfo.exchange_read_num), + e: most_read_articles.value.length > 0 + }, most_read_articles.value.length > 0 ? { + f: common_vendor.p({ + name: "arrow-right", + size: "16", + color: "#3CC7C0" + }), + g: common_vendor.o(($event) => goList("read")), + h: common_vendor.f(most_read_articles.value.slice(0, 3), (item, k0, i0) => { + return { + a: common_vendor.t(item.exchange_title), + b: item.exchange_id, + c: common_vendor.o(($event) => goDetail(item.exchange_id), item.exchange_id) + }; + }) + } : {}, { + i: common_vendor.p({ + name: "arrow-right", + size: "16", + color: "#3CC7C0" + }), + j: common_vendor.o(($event) => goList("new")), + k: common_vendor.f(new_articles.value, (item, k0, i0) => { + return common_vendor.e({ + a: common_vendor.t(item.exchange_title), + b: common_vendor.o(($event) => goDetail(item.exchange_id), item.exchange_id), + c: "4b2e7592-3-" + i0, + d: common_vendor.p({ + src: item.avatar ? item.avatar : common_vendor.unref(common_assets.headImg), + width: "46rpx", + height: "46rpx", + radius: "50%" + }), + e: common_vendor.t(item.user_name), + f: common_vendor.t(item.hospital_name), + g: common_vendor.o(($event) => goDetail(item.exchange_id), item.exchange_id), + h: common_vendor.t(htmlToText(item.exchange_content)), + i: common_vendor.o(($event) => goDetail(item.exchange_id), item.exchange_id), + j: item.exchange_content_image && item.exchange_content_image.length > 0 + }, item.exchange_content_image && item.exchange_content_image.length > 0 ? { + k: common_vendor.f(item.exchange_content_image, (unit, k1, i1) => { + return { + a: "4b2e7592-4-" + i0 + "-" + i1, + b: common_vendor.p({ + src: unit, + radius: "10", + width: "220rpx", + height: "220rpx" + }), + c: unit + }; + }), + l: common_vendor.o(($event) => goDetail(item.exchange_id), item.exchange_id) + } : {}, { + m: item.exchange_content_video && item.exchange_content_video.length > 0 + }, item.exchange_content_video && item.exchange_content_video.length > 0 ? { + n: common_vendor.f(item.exchange_content_video, (videoCell, index, i1) => { + return { + a: index, + b: videoCell, + c: common_vendor.o(videoErrorCallback, index) + }; + }), + o: common_vendor.o(($event) => goDetail(item.exchange_id), item.exchange_id) + } : {}, { + p: common_vendor.o(($event) => goDetail(item.exchange_id), item.exchange_id), + q: item.label && item.label.length > 0 + }, item.label && item.label.length > 0 ? { + r: common_vendor.f(item.label, (cell, k1, i1) => { + return { + a: common_vendor.t(cell.label_name), + b: cell.exchange_label_id + }; + }), + s: common_vendor.o(($event) => goDetail(item.exchange_id), item.exchange_id) + } : {}, { + t: "4b2e7592-5-" + i0, + v: common_vendor.t(item.read_num), + w: item.collect_num > 0 + }, item.collect_num > 0 ? { + x: "4b2e7592-6-" + i0, + y: common_vendor.p({ + name: "heart", + color: "#4B5563", + size: "28rpx" + }), + z: common_vendor.t(item.collect_num) + } : {}, { + A: item.comment_num > 0 + }, item.comment_num > 0 ? { + B: "4b2e7592-7-" + i0, + C: common_vendor.p({ + name: "chat", + color: "#4B5563", + size: "28rpx" + }), + D: common_vendor.t(item.comment_num) + } : {}, { + E: "4b2e7592-8-" + i0, + F: common_vendor.t(formatdate(item.push_date)), + G: common_vendor.o(($event) => goDetail(item.exchange_id), item.exchange_id), + H: item.exchange_id + }); + }), + l: common_vendor.p({ + name: "eye", + color: "#4B5563", + size: "28rpx" + }), + m: common_vendor.p({ + name: "clock", + color: "#4B5563", + size: "28rpx" + }), + n: common_vendor.p({ + value: 2 + }), + o: common_vendor.p({ + name: "plus", + color: "#fff", + size: "18" + }), + p: common_vendor.o(goPublish) + }); + }; + } +}; +const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-4b2e7592"]]); +wx.createPage(MiniProgramPage); +//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/caseTalk/caseTalk.js.map diff --git a/unpackage/dist/dev/mp-weixin/pages/caseTalk/caseTalk.json b/unpackage/dist/dev/mp-weixin/pages/caseTalk/caseTalk.json new file mode 100644 index 0000000..6a82c60 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/caseTalk/caseTalk.json @@ -0,0 +1,11 @@ +{ + "navigationBarTitleText": "肝胆相照临床病例库", + "navigationStyle": "custom", + "usingComponents": { + "u-icon": "../../node-modules/uview-plus/components/u-icon/u-icon", + "up--image": "../../node-modules/uview-plus/components/u--image/u--image", + "up-icon": "../../node-modules/uview-plus/components/u-icon/u-icon", + "nav-bar": "../../components/navBar/navBar", + "tab-bar": "../../components/tabBar/tabBar" + } +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/caseTalk/caseTalk.wxml b/unpackage/dist/dev/mp-weixin/pages/caseTalk/caseTalk.wxml new file mode 100644 index 0000000..a54b8c1 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/caseTalk/caseTalk.wxml @@ -0,0 +1 @@ +{{b}}病例数{{c}}互动数{{d}}浏览量精选病例查看更多{{item.a}}最新收录查看更多{{item.a}}{{item.e}}({{item.f}}){{item.h}}加载失败{{cell.a}}{{item.v}}{{item.z}}{{item.D}}{{item.F}} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/caseTalk/caseTalk.wxss b/unpackage/dist/dev/mp-weixin/pages/caseTalk/caseTalk.wxss new file mode 100644 index 0000000..ce55bbe --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/caseTalk/caseTalk.wxss @@ -0,0 +1,200 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ +.publish.data-v-4b2e7592 { + width: 92rpx; + height: 92rpx; + background: #3CC7C0; + border-radius: 50%; + position: fixed; + right: 30rpx; + bottom: 180rpx; + display: flex; + justify-content: center; + align-items: center; +} +.upage.data-v-4b2e7592 { + display: flex; + flex-direction: column; + height: calc(100vh - 120rpx); +} +.mostread .cell.data-v-4b2e7592 { + padding: 22rpx 0rpx !important; + margin: 0 30rpx; + display: flex; +} +.box.data-v-4b2e7592 { + flex: 1; + padding-bottom: 30rpx; + overflow-y: scroll; +} +.myVideo.data-v-4b2e7592 { + width: 100%; + border-radius: 15rpx; +} +.deal.data-v-4b2e7592 { + padding-top: 20rpx; + display: flex; + color: #4B5563; + font-size: 24rpx; + justify-content: space-between; +} +.deal .left.data-v-4b2e7592 { + display: flex; + align-items: center; +} +.deal .left .item.data-v-4b2e7592 { + width: 100rpx; +} +.deal .collect.data-v-4b2e7592 { + display: flex; + align-items: center; +} +.deal .eyebox.data-v-4b2e7592, +.deal .chat.data-v-4b2e7592 { + display: flex; + align-items: center; +} +.deal .time.data-v-4b2e7592 { + display: flex; + align-items: center; +} +.deal .num.data-v-4b2e7592 { + margin-left: 8rpx; +} +.tagbox.data-v-4b2e7592 { + margin-top: 24rpx; + display: flex; +} +.tagbox .tag.data-v-4b2e7592 { + height: 54rpx; + padding: 0 28rpx; + background: #ECFAF9; + border-radius: 30rpx; + margin-right: 12rpx; + font-size: 27rpx; + color: #3CC7C0; + display: flex; + align-items: center; + justify-content: center; +} +.doctor.data-v-4b2e7592 { + display: flex; + align-items: center; +} +.record.data-v-4b2e7592 { + padding-top: 30rpx; +} +.record .list.data-v-4b2e7592 { + margin: 30rpx 30rpx; +} +.record .list .name.data-v-4b2e7592 { + padding: 20rpx 0 20rpx 15rpx; + font-size: 27rpx; + color: #333333; +} +.record .list .content.data-v-4b2e7592 { + font-size: 27rpx; + color: #666666; + line-height: 38rpx; +} +.record .list .imgbox.data-v-4b2e7592 { + display: flex; + margin-top: 24rpx; +} +.record .list .imgbox .imgcell.data-v-4b2e7592 { + width: 220rpx; + height: 220rpx; + margin-right: 20rpx; +} +.record .list .imgbox .imgcell.data-v-4b2e7592:last-child { + margin-right: 0; +} +.special.data-v-4b2e7592 { + padding-top: 30rpx; +} +.special .list.data-v-4b2e7592 { + margin: 8rpx 0rpx 0; +} +.special .list .cell.data-v-4b2e7592 { + padding: 22rpx 30rpx; + border-bottom: 2rpx solid #f3f4f6; +} +.special .list .cell .circle.data-v-4b2e7592 { + flex-shrink: 0; + margin-top: 15rpx; + width: 15rpx; + height: 15rpx; + background: #3cc7c0; + border-radius: 50%; +} +.special .list .cell .title.data-v-4b2e7592 { + margin-left: 10rpx; + font-size: 32rpx; + color: #000000; + line-height: 46rpx; +} +.special .list .cell.data-v-4b2e7592:last-child { + border-bottom: none; +} +.titlebox.data-v-4b2e7592 { + margin: 0 30rpx; + display: flex; + justify-content: space-between; +} +.titlebox .more.data-v-4b2e7592 { + display: flex; + align-items: center; +} +.titlebox .more .morename.data-v-4b2e7592 { + margin-right: 10rpx; + font-size: 28rpx; + color: #3cc7c0; +} +.bar.data-v-4b2e7592 { + height: 16rpx; + background: #f3f4f6; +} +.databox.data-v-4b2e7592 { + height: 162rpx; + background: #ffffff; + display: flex; + padding: 0 30rpx; + justify-content: space-between; +} +.databox .cell.data-v-4b2e7592 { + flex: 1; + padding: 35rpx 0; + text-align: center; +} +.databox .cell .num.data-v-4b2e7592 { + font-size: 38rpx; + color: #3cc7c0; +} +.databox .cell .name.data-v-4b2e7592 { + margin-top: 18rpx; + font-size: 28rpx; + color: #4b5563; +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/certImg/certImg.js b/unpackage/dist/dev/mp-weixin/pages/certImg/certImg.js new file mode 100644 index 0000000..38b36a2 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/certImg/certImg.js @@ -0,0 +1,40 @@ +"use strict"; +const common_vendor = require("../../common/vendor.js"); +if (!Array) { + const _easycom_u__image2 = common_vendor.resolveComponent("u--image"); + _easycom_u__image2(); +} +const _easycom_u__image = () => "../../node-modules/uview-plus/components/u-image/u-image.js"; +if (!Math) { + (backNav + _easycom_u__image)(); +} +const backNav = () => "../../components/backNav/backNav.js"; +const _sfc_main = { + __name: "certImg", + setup(__props) { + const src = common_vendor.ref(""); + common_vendor.onLoad((options) => { + if (options.src) { + src.value = options.src; + } else { + src.value = "https://cn.bing.com//th?id=OHR.SanMiguelAzores_ZH-CN2511982585_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp"; + } + }); + return (_ctx, _cache) => { + return { + a: common_vendor.p({ + navName: "病例收录证书" + }), + b: common_vendor.p({ + showLoading: true, + src: src.value, + width: "100%", + mode: "widthFix" + }) + }; + }; + } +}; +const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-f07c1461"]]); +wx.createPage(MiniProgramPage); +//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/certImg/certImg.js.map diff --git a/unpackage/dist/dev/mp-weixin/pages/certImg/certImg.json b/unpackage/dist/dev/mp-weixin/pages/certImg/certImg.json new file mode 100644 index 0000000..7a95366 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/certImg/certImg.json @@ -0,0 +1,8 @@ +{ + "navigationBarTitleText": "肝胆相照临床病例库", + "navigationStyle": "custom", + "usingComponents": { + "u--image": "../../node-modules/uview-plus/components/u-image/u-image", + "back-nav": "../../components/backNav/backNav" + } +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/certImg/certImg.wxml b/unpackage/dist/dev/mp-weixin/pages/certImg/certImg.wxml new file mode 100644 index 0000000..30db704 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/certImg/certImg.wxml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/certImg/certImg.wxss b/unpackage/dist/dev/mp-weixin/pages/certImg/certImg.wxss new file mode 100644 index 0000000..d3bf4c9 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/certImg/certImg.wxss @@ -0,0 +1,28 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ +.imgbox.data-v-f07c1461 { + margin-top: -30rpx; +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/certList/certList.json b/unpackage/dist/dev/mp-weixin/pages/certList/certList.json new file mode 100644 index 0000000..3a78a4b --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/certList/certList.json @@ -0,0 +1,11 @@ +{ + "navigationBarTitleText": "肝胆相照临床病例库", + "navigationStyle": "custom", + "usingComponents": { + "up-tabs": "../../node-modules/uview-plus/components/u-tabs/u-tabs", + "up--image": "../../node-modules/uview-plus/components/u--image/u--image", + "up-icon": "../../node-modules/uview-plus/components/u-icon/u-icon", + "z-paging": "../../uni_modules/z-paging/components/z-paging/z-paging", + "nav-bar-search": "../../components/navBarSearch/navBarSearch" + } +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/certList/certList.wxml b/unpackage/dist/dev/mp-weixin/pages/certList/certList.wxml new file mode 100644 index 0000000..65b15ab --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/certList/certList.wxml @@ -0,0 +1 @@ +检索到:{{e}}篇文章检索到:{{g}}个视频检索词:{{i}}{{item.a}} 收录证书 {{item.d}} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/certList/certList.wxss b/unpackage/dist/dev/mp-weixin/pages/certList/certList.wxss new file mode 100644 index 0000000..d3f36de --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/certList/certList.wxss @@ -0,0 +1,150 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ +.detail.data-v-24ff958c { + background: #f9f9f9; + padding: 12rpx 30rpx; +} +.detail .desc.data-v-24ff958c { + font-size: 26rpx; + color: #4b5563; + line-height: 40rpx; +} +.detail .red.data-v-24ff958c { + color: #FF0000; +} +.tabcon.data-v-24ff958c { + margin: 0 20rpx; +} +.databox.data-v-24ff958c { + height: 162rpx; + background: #ffffff; + display: flex; + margin-bottom: 20rpx; + justify-content: space-between; +} +.databox .cell.data-v-24ff958c { + flex: 1; + padding: 35rpx 0; + text-align: center; +} +.databox .cell .num.data-v-24ff958c { + font-size: 38rpx; + color: #3cc7c0; +} +.databox .cell .name.data-v-24ff958c { + margin-top: 18rpx; + font-size: 28rpx; + color: #4b5563; +} +.data-v-24ff958c .u-flex { + display: flex; + flex-direction: row; + overflow: hidden; +} +.data-v-24ff958c .u-dropdown__menu { + background: #fff; + z-index: 1; + margin-left: -30rpx; +} +.data-v-24ff958c .u-dropdown__menu__item { + height: 74rpx; + padding: 0 20rpx; + background: #F3F4F6; + border-radius: 15rpx; + flex: none; + margin-left: 60rpx; +} +.u-page .deal.data-v-24ff958c { + margin-top: 20rpx; + display: flex; + color: #6b7280; + font-size: 24rpx; + justify-content: space-between; +} +.u-page .deal .left.data-v-24ff958c { + display: flex; + align-items: center; +} +.u-page .deal .recored.data-v-24ff958c { + display: flex; + align-items: center; + font-size: 31rpx; + color: #3CC7C0; +} +.u-page .deal .collect.data-v-24ff958c { + display: flex; + align-items: center; +} +.u-page .deal .eyebox.data-v-24ff958c { + width: 160rpx; + display: flex; + align-items: center; +} +.u-page .deal .time.data-v-24ff958c { + display: flex; + align-items: center; +} +.u-page .deal .num.data-v-24ff958c { + margin-left: 8rpx; +} +.u-page .item.data-v-24ff958c { + border-bottom: 1rpx solid #f3f4f6; + padding: 30rpx; +} +.u-page .item .title.data-v-24ff958c { + font-size: 30rpx; + color: #111827; + line-height: 46rpx; +} +.u-page .tagsbox.data-v-24ff958c { + margin-top: 20rpx; + display: flex; + flex-wrap: wrap; +} +.u-page .tagsbox .tag.data-v-24ff958c { + padding: 0 10rpx; + margin-right: 16rpx; + height: 46rpx; + line-height: 46rpx; + text-align: center; + background: rgba(60, 199, 192, 0.1); + border-radius: 8rpx; + font-weight: 400; + font-size: 24rpx; + color: #3cc7c0; +} +.detail.data-v-24ff958c { + background: #f9f9f9; + padding: 12rpx 30rpx; +} +.detail .desc.data-v-24ff958c { + font-size: 26rpx; + color: #4b5563; + line-height: 40rpx; +} +.detail .red.data-v-24ff958c { + color: #FF0000; +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/detail/detail.js b/unpackage/dist/dev/mp-weixin/pages/detail/detail.js new file mode 100644 index 0000000..90fea04 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/detail/detail.js @@ -0,0 +1,1152 @@ +"use strict"; +const common_vendor = require("../../common/vendor.js"); +const common_assets = require("../../common/assets.js"); +const api_api = require("../../api/api.js"); +if (!Array) { + const _easycom_up__image2 = common_vendor.resolveComponent("up--image"); + const _easycom_up_input2 = common_vendor.resolveComponent("up-input"); + const _easycom_up_icon2 = common_vendor.resolveComponent("up-icon"); + const _component_polyv_player = common_vendor.resolveComponent("polyv-player"); + const _easycom_up_parse2 = common_vendor.resolveComponent("up-parse"); + const _easycom_up_radio2 = common_vendor.resolveComponent("up-radio"); + const _easycom_up_radio_group2 = common_vendor.resolveComponent("up-radio-group"); + const _easycom_up_image2 = common_vendor.resolveComponent("up-image"); + const _easycom_z_paging2 = common_vendor.resolveComponent("z-paging"); + const _easycom_up__textarea2 = common_vendor.resolveComponent("up--textarea"); + const _easycom_up_upload2 = common_vendor.resolveComponent("up-upload"); + const _easycom_up_popup2 = common_vendor.resolveComponent("up-popup"); + const _easycom_up_overlay2 = common_vendor.resolveComponent("up-overlay"); + (_easycom_up__image2 + _easycom_up_input2 + _easycom_up_icon2 + _component_polyv_player + _easycom_up_parse2 + _easycom_up_radio2 + _easycom_up_radio_group2 + _easycom_up_image2 + _easycom_z_paging2 + _easycom_up__textarea2 + _easycom_up_upload2 + _easycom_up_popup2 + _easycom_up_overlay2)(); +} +const _easycom_up__image = () => "../../node-modules/uview-plus/components/u--image/u--image.js"; +const _easycom_up_input = () => "../../node-modules/uview-plus/components/u-input/u-input.js"; +const _easycom_up_icon = () => "../../node-modules/uview-plus/components/u-icon/u-icon.js"; +const _easycom_up_parse = () => "../../node-modules/uview-plus/components/u-parse/u-parse.js"; +const _easycom_up_radio = () => "../../node-modules/uview-plus/components/u-radio/u-radio.js"; +const _easycom_up_radio_group = () => "../../node-modules/uview-plus/components/u-radio-group/u-radio-group.js"; +const _easycom_up_image = () => "../../node-modules/uview-plus/components/u-image/u-image.js"; +const _easycom_z_paging = () => "../../uni_modules/z-paging/components/z-paging/z-paging.js"; +const _easycom_up__textarea = () => "../../node-modules/uview-plus/components/u--textarea/u--textarea.js"; +const _easycom_up_upload = () => "../../node-modules/uview-plus/components/u-upload/u-upload.js"; +const _easycom_up_popup = () => "../../node-modules/uview-plus/components/u-popup/u-popup.js"; +const _easycom_up_overlay = () => "../../node-modules/uview-plus/components/u-overlay/u-overlay.js"; +if (!Math) { + (backDetailNav + _easycom_up__image + _easycom_up_input + _easycom_up_icon + _easycom_up_parse + _easycom_up_radio + _easycom_up_radio_group + _easycom_up_image + _easycom_z_paging + _easycom_up__textarea + _easycom_up_upload + _easycom_up_popup + _easycom_up_overlay)(); +} +const backDetailNav = () => "../../components/backDetailNav/backDetailNav.js"; +const _sfc_main = { + __name: "detail", + setup(__props) { + const isH5 = common_vendor.ref(false); + const user_id = common_vendor.ref(""); + const paging = common_vendor.ref(null); + const dataList = common_vendor.ref([]); + const total = common_vendor.ref(0); + const imgList = common_vendor.ref([]); + const showCanvas = common_vendor.ref(false); + const showCommentDialog = common_vendor.ref(false); + const givePointValue = common_vendor.ref(5); + common_vendor.ref(0); + common_vendor.ref(0); + const showModal = common_vendor.ref(false); + const content = common_vendor.ref(""); + const type = common_vendor.ref(""); + const info = common_vendor.reactive({}); + const showDeal = common_vendor.ref(false); + const showMore = common_vendor.ref(false); + const showGive = common_vendor.ref(false); + const id = common_vendor.ref(""); + const parent_id = common_vendor.ref(null); + const root_id = common_vendor.ref(null); + const is_author = common_vendor.ref(false); + const reply_name = common_vendor.ref(""); + const level = common_vendor.ref(1); + const placeholder = common_vendor.ref("请输入评论内容"); + const mainCommentObj = common_vendor.reactive({}); + const childList = common_vendor.ref([]); + const clickIndex = common_vendor.ref(0); + const is_top = common_vendor.ref(false); + const option_id = common_vendor.ref(""); + const point = common_vendor.ref(0); + const comment_userId = common_vendor.ref(""); + const commentTextarea = common_vendor.ref(null); + const confirmGive = () => { + showGive.value = false; + givePoint(); + }; + const openGivePop = () => { + showGive.value = true; + getUserPoint(); + }; + const formatDay = (date) => { + return common_vendor.dayjs(date).format("YYYY-MM-DD"); + }; + const formatDate = (date) => { + return common_vendor.dayjs(date).format("YYYY-MM-DD HH:mm"); + }; + const inputPoint = () => { + if (givePointValue.value < 5) { + givePointValue.value = 5; + common_vendor.index.showToast({ + icon: "none", + title: "每次打赏范围5~100积分" + }); + } + if (givePointValue.value > 100) { + givePointValue.value = 100; + common_vendor.index.showToast({ + icon: "none", + title: "每次打赏范围5~100积分" + }); + } + }; + const changePoint = (type2) => { + if (type2 == "minus") { + if (givePointValue.value > 5) { + givePointValue.value = givePointValue.value - 5; + } else { + common_vendor.index.showToast({ + icon: "none", + title: "每次打赏范围5~100积分" + }); + } + } else { + if (givePointValue.value <= 95) { + givePointValue.value = givePointValue.value + 5; + } else { + common_vendor.index.showToast({ + icon: "none", + title: "每次打赏范围5~100积分" + }); + } + } + }; + const openMorePop = (obj, list2, index) => { + showMore.value = true; + childList.value = list2; + Object.assign(mainCommentObj, obj); + clickIndex.value = index; + }; + const getArticleDetail = (id2) => { + api_api.api.getArticleDetail(id2).then((res) => { + let result = res.data.data; + Object.assign(info, result); + }); + }; + const getVideoDetail = (id2) => { + api_api.api.getVideoDetail(id2).then((res) => { + let result = res.data.data; + Object.assign(info, result); + }); + }; + const getExchangeDetail = (id2) => { + api_api.api.getExchangeDetail(id2).then((res) => { + let result = res.data.data; + Object.assign(info, result); + }); + }; + const getUserPoint = () => { + api_api.api.getUserPoint().then((res) => { + common_vendor.index.__f__("log", "at pages/detail/detail.vue:737", res.data.data); + point.value = res.data.data; + }); + }; + const givePoint = () => { + if (point.value < givePointValue.value) { + common_vendor.index.showToast({ + icon: "none", + title: "积分不足!" + }); + return false; + } + let giveType = 1; + if (type.value == "article") { + giveType = 1; + } else if (type.value == "video") { + giveType = 2; + } else { + giveType = 3; + } + api_api.api.givePoint({ + id: id.value, + type: giveType, + point: givePointValue.value + }).then((res) => { + common_vendor.index.showToast({ + icon: "none", + title: "打赏成功!" + }); + showGive.value = false; + }); + }; + common_vendor.onLoad((options) => { + id.value = options.id; + type.value = options.type; + readRecord(); + let userInfo = common_vendor.index.getStorageSync("userInfo"); + if (userInfo.user_id) { + user_id.value = userInfo.user_id; + } + }); + const clearComment = () => { + parent_id.value = null; + imgList.value = []; + content.value = ""; + root_id.value = null; + reply_name.value = ""; + level.value = 1; + }; + const closeDealPop = () => { + showDeal.value = false; + clearComment(); + }; + const showReplyPop = () => { + parent_id.value = mainCommentObj.comment_id; + root_id.value = mainCommentObj.comment_id; + is_author.value = mainCommentObj.is_author == 1 ? true : false; + reply_name.value = mainCommentObj.user_name; + level.value = 2; + if (level.value == 2 || level.value == 3) { + placeholder.value = "回复" + reply_name.value + ":"; + } + showCommentDialog.value = true; + }; + const alertDeal = (parentId, rootId, name, top, commentLevel, userId) => { + parent_id.value = parentId; + comment_userId.value = userId; + root_id.value = rootId; + reply_name.value = name; + level.value = commentLevel; + is_top.value = top == 1 ? true : false; + if (level.value == 2 || level.value == 3) { + placeholder.value = "回复" + name + ":"; + } + showDeal.value = true; + }; + const openCommentDialog = () => { + showCommentDialog.value = true; + showDeal.value = false; + }; + const queryList = (pageNo, pageSize) => { + const params = { + page: pageNo, + page_size: pageSize + }; + if (type.value == "article") { + getArticleComment(params); + } else if (type.value == "video") { + getVideoComment(params); + } else { + getExchangeComment(params); + } + }; + const getArticleComment = (params) => { + const form = { + article_id: id.value, + is_have_sub_comment: 1 + }; + api_api.api.getArticleComment({ + ...form, + ...params + }).then((res) => { + paging.value.complete(res.data.data.data); + total.value = res.data.data.total; + is_author.value = res.data.data.is_author == 1 ? true : false; + setTimeout(() => { + if (showMore.value) { + openMorePop( + mainCommentObj, + dataList.value[clickIndex.value].sub_comment, + clickIndex.value + ); + } + }, 1500); + }).catch((res) => { + paging.value.complete(false); + }); + }; + const getVideoComment = (params) => { + const form = { + video_id: id.value, + is_have_sub_comment: 1 + }; + api_api.api.getVideoComment({ + ...form, + ...params + }).then((res) => { + paging.value.complete(res.data.data.data); + total.value = res.data.data.total; + is_author.value = res.data.data.is_author == 1 ? true : false; + setTimeout(() => { + if (showMore.value) { + openMorePop( + mainCommentObj, + dataList.value[clickIndex.value].sub_comment, + clickIndex.value + ); + } + }, 1500); + }).catch((res) => { + paging.value.complete(false); + }); + }; + const getExchangeComment = (params) => { + const form = { + exchange_id: id.value, + is_have_sub_comment: 1 + }; + api_api.api.getExchangeComment({ + ...form, + ...params + }).then((res) => { + paging.value.complete(res.data.data.data); + total.value = res.data.data.total; + is_author.value = res.data.data.is_author == 1 ? true : false; + setTimeout(() => { + if (showMore.value) { + openMorePop( + mainCommentObj, + dataList.value[clickIndex.value].sub_comment, + clickIndex.value + ); + } + }, 1500); + }).catch((res) => { + paging.value.complete(false); + }); + }; + const open = () => { + showCommentDialog.value = true; + }; + const close = () => { + showCommentDialog.value = false; + common_vendor.index.__f__("log", "at pages/detail/detail.vue:930", "close"); + }; + const openDeal = () => { + showDeal.value = true; + common_vendor.index.__f__("log", "at pages/detail/detail.vue:935", "open"); + }; + const closeDeal = () => { + showDeal.value = false; + }; + const openMore = () => { + showMore.value = true; + common_vendor.index.__f__("log", "at pages/detail/detail.vue:943", "open"); + }; + const closeMore = () => { + showMore.value = false; + }; + const previewImg = (url) => { + common_vendor.index.previewImage({ + current: url, + urls: [url] + }); + }; + const handleUpload = (file) => { + let File2 = file.file; + api_api.api.getOss({ + scene: 1 + }).then((rep) => { + let result = rep.data; + if (result.code == 200) { + let { access_id, dir, policy, signature, host } = result.data; + let time = common_vendor.dayjs().format("YYYYMMDDHHmmss"); + let random = generateRandomNumber(); + let filename = time + random; + let imgType = "." + getImageFormat(File2[0].url); + return new Promise((resolve, reject) => { + common_vendor.index.uploadFile({ + url: host, + // 仅为示例,非真实的接口地址 + filePath: File2[0].url, + name: "file", + formData: { + OSSAccessKeyId: access_id, + policy, + key: dir + time + random + imgType, + signature + }, + success(res) { + if (res.statusCode === 204) { + let url = host + "/" + dir + filename + imgType; + common_vendor.index.__f__("log", "at pages/detail/detail.vue:1294", url); + imgList.value = [url]; + } + }, + fail: (err) => { + common_vendor.index.__f__("log", "at pages/detail/detail.vue:1299", err); + } + }); + }); + } + }); + }; + const generateRandomNumber = () => { + let randomNumber = Math.floor(1e3 + Math.random() * 9e3); + return randomNumber; + }; + const getImageFormat = (imageUrl) => { + const lastDotIndex = imageUrl.lastIndexOf("."); + if (lastDotIndex !== -1) { + return imageUrl.substring(lastDotIndex + 1); + } + return "unknown"; + }; + const afterRead = (file, lists, name) => { + common_vendor.index.__f__("log", "at pages/detail/detail.vue:1318", lists); + common_vendor.index.__f__("log", "at pages/detail/detail.vue:1319", name); + handleUpload(file); + }; + const delImg = (index) => { + imgList.value = []; + }; + const collectArticle = (id2) => { + api_api.api.collectArticle(id2).then((res) => { + common_vendor.index.showToast({ + icon: "none", + title: "收藏成功" + }); + getArticleDetail(id2); + }); + }; + const collectVideo = (id2) => { + api_api.api.collectVideo(id2).then((res) => { + common_vendor.index.showToast({ + icon: "none", + title: "收藏成功" + }); + getVideoDetail(id2); + }); + }; + const collectExchange = (id2) => { + api_api.api.exchangeCollect(id2).then((res) => { + common_vendor.index.showToast({ + icon: "none", + title: "收藏成功" + }); + getExchangeDetail(id2); + }); + }; + const cancelCollectArticle = (id2) => { + api_api.api.cancelCollectArticle(id2).then((res) => { + common_vendor.index.showToast({ + icon: "none", + title: "已取消收藏" + }); + getArticleDetail(id2); + }); + }; + const cancelCollectVideo = (id2) => { + api_api.api.cancelCollectVideo(id2).then((res) => { + common_vendor.index.showToast({ + icon: "none", + title: "已取消收藏" + }); + getVideoDetail(id2); + }); + }; + const cancelCollectExchange = (id2) => { + api_api.api.cancelCollectExchange(id2).then((res) => { + common_vendor.index.showToast({ + icon: "none", + title: "已取消收藏" + }); + getExchangeDetail(id2); + }); + }; + const toggleCollect = () => { + if (type.value == "video") { + info.is_collect ? cancelCollectVideo(id.value) : collectVideo(id.value); + } else if (type.value == "article") { + info.is_collect ? cancelCollectArticle(id.value) : collectArticle(id.value); + } else { + info.is_collect ? cancelCollectExchange(id.value) : collectExchange(id.value); + } + }; + const addArticleComment = (id2, data) => { + api_api.api.addArticleComment(id2, data).then((res) => { + common_vendor.index.showToast({ + icon: "none", + title: "评论成功" + }); + clearComment(); + showCommentDialog.value = false; + paging.value.refresh(); + }); + }; + const addVideoComment = (id2, data) => { + api_api.api.addVideoComment(id2, data).then((res) => { + common_vendor.index.showToast({ + icon: "none", + title: "评论成功" + }); + clearComment(); + showCommentDialog.value = false; + paging.value.refresh(); + }); + }; + const addExchangeComment = (id2, data) => { + api_api.api.addExchangeComment(id2, data).then((res) => { + common_vendor.index.showToast({ + icon: "none", + title: "评论成功" + }); + clearComment(); + showCommentDialog.value = false; + paging.value.refresh(); + }); + }; + const delArticleComment = (id2) => { + api_api.api.delArticleComment(id2).then((res) => { + common_vendor.index.showToast({ + icon: "none", + title: "删除成功" + }); + paging.value.refresh(); + }); + }; + const delVideoComment = (id2) => { + api_api.api.delVideoComment(id2).then((res) => { + common_vendor.index.showToast({ + icon: "none", + title: "删除成功" + }); + paging.value.refresh(); + }); + }; + const fromatImg = (val) => { + if (val) { + return val.replace(/\ { + api_api.api.delExchangeComment(id2).then((res) => { + common_vendor.index.showToast({ + icon: "none", + title: "删除成功" + }); + paging.value.refresh(); + }); + }; + const topArticleComment = (id2) => { + api_api.api.topArticleComment(id2).then((res) => { + common_vendor.index.showToast({ + icon: "none", + title: "置顶成功" + }); + showDeal.value = false; + paging.value.refresh(); + }); + }; + const topVideoComment = (id2) => { + api_api.api.topVideoComment(id2).then((res) => { + common_vendor.index.showToast({ + icon: "none", + title: "置顶成功" + }); + showDeal.value = false; + paging.value.refresh(); + }); + }; + const topExchangeComment = (id2) => { + api_api.api.topExchangeComment(id2).then((res) => { + common_vendor.index.showToast({ + icon: "none", + title: "置顶成功" + }); + showDeal.value = false; + paging.value.refresh(); + }); + }; + const cancelTopArticleComment = (id2) => { + api_api.api.cancelTopArticleComment(id2).then((res) => { + common_vendor.index.showToast({ + icon: "none", + title: "取消置顶成功" + }); + showDeal.value = false; + paging.value.refresh(); + }); + }; + const cancelTopVideoComment = (id2) => { + api_api.api.cancelTopArticleComment(id2).then((res) => { + common_vendor.index.showToast({ + icon: "none", + title: "取消置顶成功" + }); + showDeal.value = false; + paging.value.refresh(); + }); + }; + const cancelTopExchangeComment = (id2) => { + api_api.api.cancelTopExchangeComment(id2).then((res) => { + common_vendor.index.showToast({ + icon: "none", + title: "取消置顶成功" + }); + showDeal.value = false; + paging.value.refresh(); + }); + }; + const delComment = () => { + showModal.value = true; + showDeal.value = false; + }; + const confirmDel = () => { + if (type.value == "article") { + delArticleComment(parent_id.value); + } else if (type.value == "video") { + delVideoComment(parent_id.value); + } else { + delExchangeComment(parent_id.value); + } + showModal.value = false; + }; + const toggleTop = () => { + if (type.value == "article") { + is_top.value ? cancelTopArticleComment(parent_id.value) : topArticleComment(parent_id.value); + } else if (type.value == "video") { + is_top.value ? cancelTopVideoComment(parent_id.value) : topVideoComment(parent_id.value); + } else { + is_top.value ? cancelTopExchangeComment(parent_id.value) : topExchangeComment(parent_id.value); + } + }; + const sendComment = () => { + if (!content.value) { + common_vendor.index.showToast({ + icon: "none", + title: "请输入评论内容" + }); + return false; + } + const postData = { + content: level.value == 3 ? "回复" + reply_name.value + ":" + content.value : content.value + }; + if (imgList.value.length > 0) { + postData.comment_image = imgList.value[0]; + } + if (parent_id.value !== null) { + postData.parent_id = parent_id.value; + } + if (root_id.value !== null) { + postData.root_id = root_id.value; + } + if (type.value == "article") { + addArticleComment(id.value, postData); + } else if (type.value == "video") { + addVideoComment(id.value, postData); + } else { + addExchangeComment(id.value, postData); + } + }; + const formatHtml = (val) => { + if (/^回复.+:/.test(val)) { + return val.replace( + /[^回复]([^:]+)/, + `$&` + ); + } + return val; + }; + const addVote = () => { + if (!option_id.value) { + common_vendor.index.showToast({ + icon: "none", + title: "请选择投票选项!" + }); + return false; + } + api_api.api.addVote(id.value, { + option_id: option_id.value + }).then((res) => { + common_vendor.index.showToast({ + icon: "none", + title: "投票成功!" + }); + getExchangeDetail(id.value); + }); + }; + const readRecord = async () => { + let flag = 1; + if (type.value == "article") { + flag = 1; + } else if (type.value == "video") { + flag = 2; + } else { + flag = 3; + } + const res = api_api.api.readRecord({ + type: flag, + id: id.value + }); + if (res) { + if (type.value == "article") { + getArticleDetail(id.value); + } else if (type.value == "video") { + getVideoDetail(id.value); + } else { + getExchangeDetail(id.value); + } + } + }; + return (_ctx, _cache) => { + return common_vendor.e({ + a: common_vendor.p({ + navName: type.value == "exchange" ? "肝胆相照病例交流园地" : "肝胆相照临床病例库" + }), + b: common_vendor.p({ + src: common_vendor.unref(common_assets.chatImg), + width: "46rpx", + height: "46rpx", + radius: "50%" + }), + c: common_vendor.o(open), + d: common_vendor.p({ + disabled: true, + focus: false, + type: "text", + placeholderClass: "placeholderClass", + placeholder: "对病例发表您的看法" + }), + e: common_vendor.o(open), + f: common_vendor.o(open), + g: common_vendor.o(toggleCollect), + h: common_vendor.p({ + src: info.is_collect ? common_vendor.unref(common_assets.collectonImg) : common_vendor.unref(common_assets.collectImg), + width: "70rpx", + height: "70rpx" + }), + i: common_vendor.p({ + src: common_vendor.unref(common_assets.shangImg), + mode: "widthFix", + width: "169rpx", + height: "77rpx" + }), + j: common_vendor.o(openGivePop), + k: type.value == "video" + }, type.value == "video" ? { + l: common_vendor.t(info.video_title) + } : type.value == "article" ? { + n: common_vendor.t(info.article_title) + } : { + o: common_vendor.t(info.exchange_title) + }, { + m: type.value == "article", + p: type.value == "video" || type.value == "article" + }, type.value == "video" || type.value == "article" ? { + q: common_vendor.f(info.author, (item, k0, i0) => { + return { + a: "eca06f3c-6-" + i0 + ",eca06f3c-0", + b: common_vendor.t(item.doctor_name), + c: common_vendor.t(item.hospital_name) + }; + }), + r: common_vendor.p({ + src: common_vendor.unref(common_assets.headImg), + mode: "widthFix", + width: "46rpx", + height: "46rpx", + radius: "50%" + }) + } : { + s: common_vendor.p({ + src: common_vendor.unref(common_assets.headImg), + mode: "widthFix", + width: "46rpx", + height: "46rpx", + radius: "50%" + }), + t: common_vendor.t(info.user_name), + v: common_vendor.t(info.hospital_name) + }, { + w: common_vendor.p({ + name: "eye", + color: "#6B7280", + size: "28rpx" + }), + x: common_vendor.t(info.read_num), + y: common_vendor.p({ + name: info.is_collect ? "heart-fill" : "heart", + color: info.is_collect ? "red" : "#6B7280", + size: "28rpx" + }), + z: common_vendor.t(info.collect_num), + A: common_vendor.p({ + name: "clock", + color: "#6B7280", + size: "28rpx" + }), + B: common_vendor.t(formatDay(info.push_date)), + C: showCanvas.value + }, showCanvas.value ? {} : {}, { + D: type.value == "video" && !isH5.value + }, type.value == "video" && !isH5.value ? { + E: "playerContext" + info.video_no, + F: "playerId" + info.video_no, + G: info.video_no + } : {}, { + H: type.value == "video" && isH5.value + }, type.value == "video" && isH5.value ? {} : type.value == "article" ? { + J: common_vendor.p({ + content: fromatImg(info.article_content) + }) + } : common_vendor.e({ + K: info.exchange_content + }, info.exchange_content ? { + L: common_vendor.p({ + content: fromatImg(info.exchange_content) + }) + } : {}, { + M: info.exchange_summary + }, info.exchange_summary ? { + N: common_vendor.p({ + content: fromatImg(info.exchange_summary) + }) + } : {}, { + O: info.case_exchange_vote && info.case_exchange_vote.vote_title + }, info.case_exchange_vote && info.case_exchange_vote.vote_title ? common_vendor.e({ + P: info.case_exchange_vote.is_have_voted != 1 + }, info.case_exchange_vote.is_have_voted != 1 ? { + Q: common_vendor.t(info.case_exchange_vote.vote_title), + R: common_vendor.f(info.case_exchange_vote.case_exchange_vote_option, (item, k0, i0) => { + return { + a: "eca06f3c-16-" + i0 + ",eca06f3c-15", + b: common_vendor.p({ + activeColor: "#3CC7C0", + label: item.option_value, + name: item.option_id + }), + c: item.option_id + }; + }), + S: common_vendor.o(($event) => option_id.value = $event), + T: common_vendor.p({ + placement: "column", + modelValue: option_id.value + }), + U: common_vendor.o(addVote) + } : { + V: common_vendor.t(info.case_exchange_vote.vote_title), + W: common_vendor.f(info.case_exchange_vote.case_exchange_vote_option, (item, k0, i0) => { + return { + a: common_vendor.t(item.option_value), + b: common_vendor.t(item.proportion), + c: item.option_id + }; + }), + X: _ctx.proportion / 100 + }) : {}), { + I: type.value == "article", + Y: common_vendor.p({ + src: common_vendor.unref(common_assets.commentImg), + mode: "widthFix", + width: "50rpx", + height: "50rpx" + }), + Z: common_vendor.t(total.value), + aa: common_vendor.f(dataList.value, (item, index, i0) => { + return common_vendor.e({ + a: "eca06f3c-18-" + i0 + ",eca06f3c-0", + b: common_vendor.t(item.user_name), + c: user_id.value == item.user_id + }, user_id.value == item.user_id ? { + d: "eca06f3c-19-" + i0 + ",eca06f3c-0", + e: common_vendor.p({ + src: common_vendor.unref(common_assets.selfImg), + width: "69rpx", + height: "31rpx" + }) + } : {}, { + f: common_vendor.o(($event) => alertDeal(item.comment_id, item.comment_id, item.user_name, item.is_top, 2, item.user_id), item.comment_id), + g: common_vendor.t(item.content), + h: item.comment_image + }, item.comment_image ? { + i: common_vendor.o(($event) => previewImg(item.comment_image), item.comment_id), + j: "eca06f3c-20-" + i0 + ",eca06f3c-0", + k: common_vendor.p({ + src: item.comment_image, + radius: "16rpx", + width: "150rpx", + height: "150rpx" + }) + } : {}, { + l: common_vendor.t(formatDate(item.created_at)), + m: item.sub_comment && item.sub_comment.length > 0 + }, item.sub_comment && item.sub_comment.length > 0 ? { + n: common_vendor.f(item.sub_comment.slice(0, 3), (cell, index2, i1) => { + return common_vendor.e({ + a: "eca06f3c-21-" + i0 + "-" + i1 + ",eca06f3c-0", + b: common_vendor.t(cell.user_name), + c: user_id.value == cell.user_id + }, user_id.value == cell.user_id ? { + d: "eca06f3c-22-" + i0 + "-" + i1 + ",eca06f3c-0", + e: common_vendor.p({ + src: common_vendor.unref(common_assets.selfImg), + width: "69rpx", + height: "31rpx" + }) + } : {}, { + f: common_vendor.o(($event) => alertDeal(cell.comment_id, cell.root_id, cell.user_name, cell.is_top, 3, cell.user_id), cell.comment_id), + g: formatHtml(cell.content), + h: cell.comment_image + }, cell.comment_image ? { + i: common_vendor.o(($event) => previewImg(cell.comment_image), cell.comment_id), + j: "eca06f3c-23-" + i0 + "-" + i1 + ",eca06f3c-0", + k: common_vendor.p({ + src: cell.comment_image, + radius: "16rpx", + width: "150rpx", + height: "150rpx" + }) + } : {}, { + l: common_vendor.t(formatDate(cell.created_at)), + m: cell.comment_id + }); + }), + o: common_vendor.p({ + src: common_vendor.unref(common_assets.headImg), + width: "86rpx", + height: "86rpx", + radius: "50%" + }) + } : {}, { + p: item.sub_comment.length > 3 + }, item.sub_comment.length > 3 ? { + q: common_vendor.o(($event) => openMorePop(item, item.sub_comment, index), item.comment_id) + } : {}, { + r: item.comment_id + }); + }), + ab: common_vendor.p({ + src: common_vendor.unref(common_assets.headImg), + width: "86rpx", + height: "86rpx", + radius: "50%" + }), + ac: common_vendor.sr(paging, "eca06f3c-0", { + "k": "paging" + }), + ad: common_vendor.o(queryList), + ae: common_vendor.o(($event) => dataList.value = $event), + af: common_vendor.p({ + ["inside-more"]: true, + ["loading-more-no-more-text"]: "咱也是有底线的!", + ["auto-show-back-to-top"]: false, + ["empty-view-super-style"]: { + "paddingBottom": "140rpx" + }, + ["refresher-title-style"]: { + "paddingBottom": "60rpx", + "paddingTop": "10rpx" + }, + ["refresher-img-style"]: { + "paddingBottom": "60rpx", + "paddingTop": "10rpx" + }, + modelValue: dataList.value + }), + ag: common_vendor.sr(commentTextarea, "eca06f3c-25,eca06f3c-24", { + "k": "commentTextarea" + }), + ah: common_vendor.o(($event) => content.value = $event), + ai: common_vendor.p({ + focus: false, + height: "200", + cursorSpacing: "240", + adjustPosition: true, + ["adjust-keyboard-to"]: "bottom", + placeholder: placeholder.value, + modelValue: content.value + }), + aj: imgList.value.length > 0 + }, imgList.value.length > 0 ? { + ak: common_vendor.o(($event) => previewImg(imgList.value[0])), + al: common_vendor.p({ + src: imgList.value[0], + radius: "6", + width: "150rpx", + height: "150rpx" + }), + am: common_vendor.p({ + name: "close-circle", + color: "#666", + size: "16" + }), + an: common_vendor.o(delImg) + } : {}, { + ao: common_vendor.p({ + src: common_vendor.unref(common_assets.uploadImg), + mode: "widthFix", + width: "40rpx", + height: "77rpx" + }), + ap: common_vendor.o(afterRead), + aq: common_vendor.p({ + disabled: imgList.value.length >= 1, + ["show-upload-list"]: false, + name: "imgupload", + multiple: true, + maxCount: 1, + width: "40rpx", + height: "77rpx" + }), + ar: imgList.value.length >= 1 ? 1 : "", + as: common_vendor.o(sendComment), + at: common_vendor.o(close), + av: common_vendor.o(open), + aw: common_vendor.p({ + zIndex: 99, + overlayStyle: { + zIndex: 98 + }, + closeOnClickOverlay: false, + show: showCommentDialog.value, + round: 10, + closeable: true, + mode: "bottom" + }), + ax: level.value == 2 && is_author.value + }, level.value == 2 && is_author.value ? { + ay: common_vendor.t(is_top.value ? "取消置顶" : "置顶"), + az: common_vendor.o(toggleTop) + } : {}, { + aA: common_vendor.o(openCommentDialog), + aB: is_author.value || user_id.value == comment_userId.value + }, is_author.value || user_id.value == comment_userId.value ? { + aC: common_vendor.o(delComment) + } : {}, { + aD: common_vendor.o(closeDealPop), + aE: common_vendor.o(closeDeal), + aF: common_vendor.o(openDeal), + aG: common_vendor.p({ + zIndex: 60, + overlayStyle: { + zIndex: 59 + }, + closeOnClickOverlay: false, + show: showDeal.value, + round: 10, + mode: "bottom" + }), + aH: common_vendor.p({ + name: "close", + color: "#666", + size: "20" + }), + aI: common_vendor.o(closeMore), + aJ: common_vendor.p({ + src: common_vendor.unref(common_assets.headImg), + width: "86rpx", + height: "86rpx", + radius: "50%" + }), + aK: common_vendor.t(mainCommentObj.user_name), + aL: user_id.value == mainCommentObj.user_id + }, user_id.value == mainCommentObj.user_id ? { + aM: common_vendor.p({ + src: common_vendor.unref(common_assets.selfImg), + width: "69rpx", + height: "31rpx" + }) + } : {}, { + aN: common_vendor.o(($event) => alertDeal(mainCommentObj.comment_id, mainCommentObj.comment_id, mainCommentObj.user_name, mainCommentObj.is_top, 2, mainCommentObj.user_id)), + aO: common_vendor.t(mainCommentObj.content), + aP: mainCommentObj.comment_image + }, mainCommentObj.comment_image ? { + aQ: common_vendor.o(($event) => previewImg(mainCommentObj.comment_image)), + aR: common_vendor.p({ + src: mainCommentObj.comment_image, + radius: "16rpx", + width: "150rpx", + height: "150rpx" + }) + } : {}, { + aS: common_vendor.t(formatDate(mainCommentObj.created_at)), + aT: common_vendor.f(childList.value, (cell, index, i0) => { + return common_vendor.e({ + a: "eca06f3c-36-" + i0 + ",eca06f3c-31", + b: common_vendor.t(cell.user_name), + c: user_id.value == cell.user_id + }, user_id.value == cell.user_id ? { + d: "eca06f3c-37-" + i0 + ",eca06f3c-31", + e: common_vendor.p({ + src: common_vendor.unref(common_assets.selfImg), + width: "69rpx", + height: "31rpx" + }) + } : {}, { + f: common_vendor.o(($event) => alertDeal(cell.comment_id, cell.root_id, cell.user_name, cell.is_top, 3, cell.user_id), cell.comment_id), + g: formatHtml(cell.content), + h: cell.comment_image + }, cell.comment_image ? { + i: common_vendor.o(($event) => previewImg(cell.comment_image), cell.comment_id), + j: "eca06f3c-38-" + i0 + ",eca06f3c-31", + k: common_vendor.p({ + src: cell.comment_image, + radius: "16rpx", + width: "150rpx", + height: "150rpx" + }) + } : {}, { + l: common_vendor.t(formatDate(cell.created_at)), + m: cell.comment_id + }); + }), + aU: common_vendor.p({ + src: common_vendor.unref(common_assets.headImg), + width: "86rpx", + height: "86rpx", + radius: "50%" + }), + aV: common_vendor.o(($event) => _ctx.value = $event), + aW: common_vendor.p({ + readonly: true, + placeholder: "@" + mainCommentObj.user_name + ":", + border: "surround", + modelValue: _ctx.value + }), + aX: common_vendor.o(showReplyPop), + aY: common_vendor.o(closeMore), + aZ: common_vendor.o(openMore), + ba: common_vendor.p({ + zIndex: 10, + overlayStyle: { + zIndex: 9 + }, + closeOnClickOverlay: false, + show: showMore.value, + round: 10, + mode: "bottom" + }), + bb: common_vendor.t(point.value), + bc: common_vendor.o(($event) => changePoint("minus")), + bd: common_vendor.o(inputPoint), + be: common_vendor.o(($event) => givePointValue.value = $event), + bf: common_vendor.p({ + placeholder: "请输入打赏积分", + type: "number", + border: "surround", + modelValue: givePointValue.value + }), + bg: common_vendor.o(($event) => changePoint("add")), + bh: common_vendor.o(($event) => showGive.value = false), + bi: common_vendor.o(confirmGive), + bj: common_vendor.p({ + show: showGive.value, + ["mask-click-able"]: true + }), + bk: common_vendor.o(($event) => showModal.value = false), + bl: common_vendor.o(confirmDel), + bm: common_vendor.p({ + show: showModal.value, + ["mask-click-able"]: true + }) + }); + }; + } +}; +const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-eca06f3c"]]); +wx.createPage(MiniProgramPage); +//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/detail/detail.js.map diff --git a/unpackage/dist/dev/mp-weixin/pages/detail/detail.json b/unpackage/dist/dev/mp-weixin/pages/detail/detail.json new file mode 100644 index 0000000..35329f6 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/detail/detail.json @@ -0,0 +1,20 @@ +{ + "navigationBarTitleText": "肝胆相照临床病例库", + "navigationStyle": "custom", + "usingComponents": { + "polyv-player": "plugin://polyv-player/player", + "up--image": "../../node-modules/uview-plus/components/u--image/u--image", + "up-input": "../../node-modules/uview-plus/components/u-input/u-input", + "up-icon": "../../node-modules/uview-plus/components/u-icon/u-icon", + "up-parse": "../../node-modules/uview-plus/components/u-parse/u-parse", + "up-radio": "../../node-modules/uview-plus/components/u-radio/u-radio", + "up-radio-group": "../../node-modules/uview-plus/components/u-radio-group/u-radio-group", + "up-image": "../../node-modules/uview-plus/components/u-image/u-image", + "z-paging": "../../uni_modules/z-paging/components/z-paging/z-paging", + "up--textarea": "../../node-modules/uview-plus/components/u--textarea/u--textarea", + "up-upload": "../../node-modules/uview-plus/components/u-upload/u-upload", + "up-popup": "../../node-modules/uview-plus/components/u-popup/u-popup", + "up-overlay": "../../node-modules/uview-plus/components/u-overlay/u-overlay", + "back-detail-nav": "../../components/backDetailNav/backDetailNav" + } +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/detail/detail.wxml b/unpackage/dist/dev/mp-weixin/pages/detail/detail.wxml new file mode 100644 index 0000000..4421720 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/detail/detail.wxml @@ -0,0 +1 @@ +{{l}}{{n}}{{o}}{{item.b}} · {{item.c}}{{t}} · {{v}}{{x}}{{z}}{{B}}病例信息结果与讨论在线投票{{Q}}投票在线投票{{V}}{{item.a}}{{item.b}}%全部评论({{Z}}){{item.b}}...{{item.g}}{{item.l}}{{cell.b}}...{{cell.l}}——展开更多回复发送{{ay}}回复删除取消 回复 {{aK}}...{{aO}}{{aS}}{{cell.b}}...{{cell.l}}打赏 积分余额: {{bb}}积分 -+取消确定提示 是否删除该评论? 取消确定 \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/detail/detail.wxss b/unpackage/dist/dev/mp-weixin/pages/detail/detail.wxss new file mode 100644 index 0000000..c8fe429 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/detail/detail.wxss @@ -0,0 +1,526 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ +.videobox.data-v-eca06f3c { + padding: 20rpx 30rpx; +} +.videobox .cloumn.data-v-eca06f3c { + padding-bottom: 30rpx; +} +.videobox.data-v-eca06f3c .video { + display: flex; + justify-content: center; +} +.videobox .con.data-v-eca06f3c .img { + width: 100%; +} +.zanboxpop.data-v-eca06f3c { + display: flex; + align-items: center; + justify-content: center; + height: 100%; +} +.zanboxpop .zanwraper.data-v-eca06f3c { + width: 630rpx; + margin: 0 auto; + padding-bottom: 50rpx; + background: #f5f6f9; + border-radius: 16rpx; +} +.zanboxpop .zanwraper .title.data-v-eca06f3c { + margin-top: 48rpx; + text-align: center; + font-weight: 500; + font-size: 36rpx; + color: rgba(0, 0, 0, 0.85); +} +.zanboxpop .zanwraper .content.data-v-eca06f3c { + padding: 30rpx 0; + background: #f5f6f9; + text-align: center; +} +.zanboxpop .zanwraper .content.data-v-eca06f3c .imgstyle { + max-width: 100% !important; +} +.zanboxpop .zanwraper .content.data-v-eca06f3c ._block { + text-align: left !important; +} +.zanboxpop .zanwraper .count.data-v-eca06f3c { + margin-top: 24rpx; + display: flex; + align-items: center; + text-align: center; + justify-content: center; + font-weight: 400; + font-size: 28rpx; + color: rgba(0, 0, 0, 0.65); +} +.zanboxpop .zanwraper .count .num.data-v-eca06f3c { + color: #ff0000; + font-size: 32rpx; +} +.zanboxpop .zanwraper .count .earn.data-v-eca06f3c { + font-size: 32rpx; + color: #3cc7c0; +} +.zanboxpop .zanwraper .countbox.data-v-eca06f3c { + display: flex; + width: 100%; + margin: 30rpx 0px 40rpx; + padding: 0 40rpx; + justify-content: center; + box-sizing: border-box; +} +.zanboxpop .zanwraper .countbox .minus.data-v-eca06f3c { + flex-shrink: 0; + margin-left: 10rp; + width: 90rpx; + height: 90rpx; + font-size: 60rpx; + color: #333; + display: flex; + justify-content: center; + align-items: center; + background: #ffffff; + border-radius: 12rpx; + border: 2rpx solid #e9e9e9; +} +.zanboxpop .zanwraper .countbox .add.data-v-eca06f3c { + flex-shrink: 0; + width: 90rpx; + margin-left: 10rpx; + height: 90rpx; + font-size: 60rpx; + color: #333; + display: flex; + justify-content: center; + align-items: center; + color: #fff; + background: #3cc7c0; + border-radius: 12rpx; + border: 2rpx solid #3cc7c0; +} +.zanboxpop .zanwraper .countbox.data-v-eca06f3c .u-input__content__field-wrapper__field { + height: 60rpx; + font-size: 34rpx !important; + text-align: center !important; +} +.zanboxpop .zanwraper .countbox.data-v-eca06f3c .u-input { + background: #f2f2f2; + width: 200rpx !important; + flex: none; +} +.zanboxpop .zanwraper .countbox.data-v-eca06f3c .u-input--radius { + border-radius: 24rrpx; +} +.zanboxpop .zanwraper .btnbox.data-v-eca06f3c { + margin: 0px 40rpx 0px; + display: flex; + justify-content: space-between; +} +.zanboxpop .zanwraper .btnbox .cancle.data-v-eca06f3c { + color: rgba(0, 0, 0, 0.3); + width: 256rpx; + height: 88rpx; + background: #f5f6f9; + border-radius: 25px; + border: 2rpx solid rgba(0, 0, 0, 0.15); + font-weight: 500; + font-size: 32rpx; + color: rgba(0, 0, 0, 0.85); + display: flex; + justify-content: center; + align-items: center; +} +.zanboxpop .zanwraper .btnbox .ok.data-v-eca06f3c { + color: #fff; + width: 256rpx; + height: 88rpx; + background: #3cc7c0; + border-radius: 25px; + border: 2rpx solid #3cc7c0; + font-weight: 500; + font-size: 32rpx; + display: flex; + justify-content: center; + align-items: center; +} +.commentPop.data-v-eca06f3c { + height: calc(100vh - 400rpx); + display: flex; + flex-direction: column; +} +.commentPop .commentScroll.data-v-eca06f3c { + flex: 1; + overflow-y: scroll; + margin-bottom: 96rpx; +} +.commentPop .bottom.data-v-eca06f3c { + border-top: 2rpx solid #efefef; + height: 96rpx; + display: flex; + align-items: center; + justify-content: center; + background: #fff; +} +.commentPop .bottom.data-v-eca06f3c .u-input__content__field-wrapper__field { + height: 50rpx; +} +.commentPop .bottom.data-v-eca06f3c .u-input { + background: #f2f2f2; +} +.commentPop .bottom.data-v-eca06f3c .u-input--radius { + border-radius: 40rpx; +} +.commentPop .title.data-v-eca06f3c { + height: 100rpx; + line-height: 100rpx; + text-align: center; + position: relative; + border-bottom: 2rpx solid #e7e7e7; +} +.commentPop .title .close.data-v-eca06f3c { + position: absolute; + right: 20rpx; + top: 30rpx; +} +.commentPop .unit .item.data-v-eca06f3c { + margin-top: 12rpx; + border-bottom: 2rpx solid #e7e7e7; +} +.dealbox .dealcell.data-v-eca06f3c { + display: flex; + align-items: center; + justify-content: center; + height: 112rpx; + font-size: 32rpx; + color: rgba(0, 0, 0, 0.9); + border-bottom: 2rpx solid #efefef; +} +.expand.data-v-eca06f3c { + display: flex; + font-size: 32rpx; + padding: 12rpx 0; + color: #3cc7c0; +} +.commentcon .item.data-v-eca06f3c { + display: flex; + padding: 30rpx 35rpx 16rpx; +} +.commentcon .item .info.data-v-eca06f3c { + margin-left: 24rpx; + flex: 1; +} +.commentcon .item .info .user.data-v-eca06f3c { + display: flex; + align-items: center; + justify-content: space-between; +} +.commentcon .item .info .user .namebox.data-v-eca06f3c { + display: flex; + align-items: center; +} +.commentcon .item .info .user .namebox.data-v-eca06f3c .u-image { + background: none !important; + padding-bottom: 16rpx; +} +.commentcon .item .info .user .namebox .selfImg.data-v-eca06f3c { + padding-bottom: 6rpx; +} +.commentcon .item .info .user .namebox .name.data-v-eca06f3c { + margin-right: 6rpx; + font-size: 34rpx; +} +.commentcon .item .info .user .dot.data-v-eca06f3c { + font-size: 32rpx; +} +.commentcon .item .info .question.data-v-eca06f3c { + margin-top: 15rpx; + font-size: 30rpx; + margin-bottom: 0px; + line-height: 54rpx; + color: #333; + white-space: pre-wrap; + word-wrap: break-word; + word-break: break-all; +} +.commentcon .item .info .commentImg.data-v-eca06f3c { + margin-top: 16rpx; +} +.commentcon .item .info .date.data-v-eca06f3c { + font-size: 30rpx; + color: #666666; + line-height: 34px; +} +.comnum.data-v-eca06f3c { + padding: 0 30rpx; + background: #fff; + display: flex; + height: 100rpx; + align-items: center; + border-bottom: 1px solid #e7e7e7; +} +.comnum .imgcon.data-v-eca06f3c { + margin-top: 10rpx; +} +.comnum.data-v-eca06f3c .u-image { + background: none !important; +} +.comnum .num.data-v-eca06f3c { + margin-left: 10rpx; + font-size: 32rpx; +} +.content.data-v-eca06f3c { + background-color: #fff; +} +.votebox.data-v-eca06f3c { + padding: 30rpx; + background: #fff; +} +.votebox.data-v-eca06f3c .u-radio__label-wrap { + flex: 1; +} +.votebox.data-v-eca06f3c .u-radio { + padding: 16rpx; +} +.votebox .group.data-v-eca06f3c { + margin-top: 20rpx; +} +.votebox .group .row.data-v-eca06f3c { + border-radius: 20rpx; + border: 2rpx solid #B8B8B8; + background: #fff; + margin-bottom: 24rpx; +} +.votebox .btn.data-v-eca06f3c { + margin: 50rpx 40rpx 0; + height: 92rpx; + background: #3cc7c0; + border-radius: 46rpx; + display: flex; + align-items: center; + justify-content: center; + font-size: 32rpx; + color: #ffffff; +} +.votebox .name.data-v-eca06f3c { + font-size: 36rpx; + color: #000000; + line-height: 46rpx; +} +.votebox .title.data-v-eca06f3c { + margin-top: 24rpx; + font-size: 30rpx; + color: #333333; + line-height: 46rpx; +} +.votebox .option.data-v-eca06f3c { + margin-top: 26rpx; +} +.votebox .option .row.data-v-eca06f3c { + font-size: 27rpx; + color: #4b5563; + display: flex; + align-items: center; + margin-bottom: 10rpx; + justify-content: space-between; +} +.votebox .option .line.data-v-eca06f3c { + width: 100%; + height: 15rpx; + background: #f3f4f6; + border-radius: 19rpx; + overflow: hidden; +} +.votebox .option .line .inner.data-v-eca06f3c { + height: 15rpx; + background: #3cc7c0; + border-radius: 19rpx; +} +.imgboxshang.data-v-eca06f3c { + display: flex; + margin-left: 8rpx; + align-items: center; +} +.imgbox.data-v-eca06f3c { + margin: 0 30rpx 30rpx; +} +.imgbox .imgunit.data-v-eca06f3c { + width: 150rpx; + height: 150rpx; + position: relative; +} +.imgbox .imgunit .close.data-v-eca06f3c { + position: absolute; + top: 0rpx; + right: 0; +} +.poptitle.data-v-eca06f3c { + height: 88rpx; + border-bottom: 1rpx solid #e7e7e7; +} +.sendbox.data-v-eca06f3c { + display: flex; + justify-content: space-between; + margin: 0 30rpx 30rpx; +} +.sendbox .left.disabled.data-v-eca06f3c .u-image__image { + opacity: 0.5; +} +.sendbox .btn.data-v-eca06f3c { + width: 120rpx; + height: 58rpx; + display: flex; + align-items: center; + justify-content: center; + background: #3cc7c0; + font-weight: 400; + font-size: 30rpx; + color: #fff; + border-radius: 12rpx; +} +.wraper.data-v-eca06f3c { + margin: 0rpx 12rpx; +} +.desc.data-v-eca06f3c { + width: 100%; + overflow-x: hidden; + padding-bottom: 80rpx; +} +.desc.data-v-eca06f3c .imgstyle { + max-width: 100%; + position: relative; + left: 50%; + transform: translateX(-50%); +} +.desc.data-v-eca06f3c ._block { + text-align: left !important; + text-indent: 0px !important; +} +.bottom.data-v-eca06f3c { + position: fixed; + display: flex; + width: 100%; + box-sizing: border-box; + padding: 40rpx 30rpx; + align-items: center; + border-top: 2rpx solid #f9fafb; + background: #fff; + bottom: 0; +} +.bottom.data-v-eca06f3c .u-image { + background: none !important; +} +.bottom.data-v-eca06f3c .placeholderClass { + font-size: 30rpx; + color: #4b5563; +} +.bottom .right.data-v-eca06f3c { + margin-left: 20rpx; + display: flex; + align-items: center; + background: #fff; +} +.bottom .right .imgbox.data-v-eca06f3c { + margin-left: 20rpx; +} +.bottom .iptbox.data-v-eca06f3c { + flex: 1; + padding-left: 30rpx; + background: #f3f4f6; + border-radius: 38px; + height: 77rpx; + display: flex; + overflow: hidden; + align-items: center; +} +.bottom .iptbox .ipt.data-v-eca06f3c { + margin-left: 15rpx; +} +.bar.data-v-eca06f3c { + width: 100%; + background: #f9fafb; + height: 20rpx; +} +.box.data-v-eca06f3c { + background: #fff; + /* height: calc(100vh - 220rpx); + overflow-y: scroll; + -webkit-overflow-scrolling: touch; */ +} +.box .title.data-v-eca06f3c { + position: relative; + z-index: 1; + padding: 35rpx 30rpx 0; + background: #fff; + margin-top: -40rpx; + font-weight: 400; + font-size: 38rpx; + color: #111827; + line-height: 54rpx; + margin-bottom: 20rpx; +} +.box .info.data-v-eca06f3c { + display: flex; + align-items: center; + padding: 0 30rpx; + font-size: 28rpx; + color: #4b5563; + line-height: 28rpx; +} +.box .info.data-v-eca06f3c .u-image { + margin-top: 8rpx; +} +.box .info .name.data-v-eca06f3c { + margin-left: 15rpx; +} +.deal.data-v-eca06f3c { + margin-top: 12rpx; + padding: 0 30rpx 20rpx; + display: flex; + color: #6b7280; + font-size: 24rpx; + justify-content: space-between; +} +.deal .left.data-v-eca06f3c { + display: flex; + align-items: center; +} +.deal .collect.data-v-eca06f3c { + display: flex; + align-items: center; +} +.deal .eyebox.data-v-eca06f3c { + width: 160rpx; + display: flex; + align-items: center; +} +.deal .time.data-v-eca06f3c { + display: flex; + align-items: center; +} +.deal .num.data-v-eca06f3c { + margin-left: 8rpx; +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/index/index.js b/unpackage/dist/dev/mp-weixin/pages/index/index.js new file mode 100644 index 0000000..a8345a0 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/index/index.js @@ -0,0 +1,205 @@ +"use strict"; +const common_vendor = require("../../common/vendor.js"); +const utils_navTo = require("../../utils/navTo.js"); +const api_api = require("../../api/api.js"); +const common_assets = require("../../common/assets.js"); +if (!Array) { + const _easycom_up__image2 = common_vendor.resolveComponent("up--image"); + const _easycom_u_icon2 = common_vendor.resolveComponent("u-icon"); + (_easycom_up__image2 + _easycom_u_icon2)(); +} +const _easycom_up__image = () => "../../node-modules/uview-plus/components/u--image/u--image.js"; +const _easycom_u_icon = () => "../../node-modules/uview-plus/components/u-icon/u-icon.js"; +if (!Math) { + (navBar + _easycom_up__image + _easycom_u_icon + tabBar)(); +} +const tabBar = () => "../../components/tabBar/tabBar.js"; +const navBar = () => "../../components/navBar/navBar.js"; +const _sfc_main = { + __name: "index", + setup(__props) { + common_vendor.ref(null); + common_vendor.ref([]); + const most_read_articles = common_vendor.ref([]); + const new_articles = common_vendor.ref([]); + const recommend_doctor = common_vendor.ref([]); + const recommend_hospital = common_vendor.ref([]); + const numInfo = common_vendor.reactive({}); + const goDetail = (id, isLink, src) => { + if (isLink == 1) { + api_api.api.readRecord({ + type: 1, + id + }).then((res) => { + }); + utils_navTo.navTo({ + url: `/pages/web/web?src=${src}` + }); + } else { + utils_navTo.navTo({ + url: `/pages/detail/detail?id=${id}&type=article` + }); + } + }; + const goListBy = (id, name, type) => { + let url = ""; + if (type == "doctor") { + url = `/pages/search/search?doctor_id=${id}&doctor_name=${name}`; + } else { + url = `/pages/search/search?hospital_id=${id}&hospital_name=${name}`; + } + utils_navTo.navTo({ + url + }); + }; + const getData = async () => { + const { data } = await api_api.api.getHomeData(); + if (data.code == 200) { + most_read_articles.value = data.data.most_read_articles; + new_articles.value = data.data.new_articles; + recommend_doctor.value = data.data.recommend_doctor; + recommend_hospital.value = data.data.recommend_hospital; + } + }; + const getStatic = () => { + api_api.api.getHomeStatics().then((res) => { + let result = res.data.data; + Object.assign(numInfo, result); + }); + }; + const goList = (type) => { + utils_navTo.navTo({ + url: "/pages/search/search?order=" + type + }); + }; + const goVideo = () => { + utils_navTo.navTo({ + url: "/pages/videoList/videoList" + }); + }; + const goSick = () => { + utils_navTo.navTo({ + url: "/pages/sickList/sickList" + }); + }; + const searchDoctor = () => { + utils_navTo.navTo({ + url: "/pages/searchList/searchList?type=doctor&name=医生&id=" + }); + }; + const goHospital = () => { + utils_navTo.navTo({ + url: "/pages/searchList/searchList?type=hospital&name=医院&id=" + }); + }; + common_vendor.onShow(() => { + getStatic(); + getData(); + }); + return (_ctx, _cache) => { + return { + a: common_vendor.p({ + type: "home" + }), + b: common_vendor.t(numInfo.article_num), + c: common_vendor.t(numInfo.video_num), + d: common_vendor.t(numInfo.video_read_num && numInfo.article_read_num ? numInfo.video_read_num + numInfo.article_read_num : 0), + e: common_vendor.o(goVideo), + f: common_vendor.p({ + src: common_vendor.unref(common_assets.videoImg), + radius: "20rpx", + width: "330rpx", + height: "176rpx" + }), + g: common_vendor.o(goSick), + h: common_vendor.p({ + src: common_vendor.unref(common_assets.sickImg), + width: "330rpx", + radius: "20rpx", + height: "176rpx" + }), + i: common_vendor.o(goHospital), + j: common_vendor.p({ + src: common_vendor.unref(common_assets.hospitalImg), + radius: "20rpx", + width: "330rpx", + height: "176rpx" + }), + k: common_vendor.o(searchDoctor), + l: common_vendor.p({ + src: common_vendor.unref(common_assets.doctorImg), + width: "330rpx", + radius: "20rpx", + height: "176rpx" + }), + m: common_vendor.p({ + name: "arrow-right", + size: "16", + color: "#3CC7C0" + }), + n: common_vendor.o(($event) => goList("new")), + o: common_vendor.f(new_articles.value, (item, k0, i0) => { + return { + a: common_vendor.t(item.article_title), + b: common_vendor.f(item.author, (tag, k1, i1) => { + return { + a: common_vendor.t(tag.doctor_name), + b: tag.author_id + }; + }), + c: item.article_id, + d: common_vendor.o(($event) => goDetail(item.article_id, item.is_link, item.is_link_url), item.article_id) + }; + }), + p: common_vendor.p({ + name: "arrow-right", + size: "16", + color: "#3CC7C0" + }), + q: common_vendor.o(($event) => goList("read")), + r: common_vendor.f(most_read_articles.value, (item, k0, i0) => { + return { + a: common_vendor.t(item.article_title), + b: common_vendor.f(item.author, (tag, k1, i1) => { + return { + a: common_vendor.t(tag.doctor_name), + b: tag.author_id + }; + }), + c: item.article_id, + d: common_vendor.o(($event) => goDetail(item.article_id, item.is_link, item.is_link_url), item.article_id) + }; + }), + s: common_vendor.p({ + name: "arrow-right", + size: "16", + color: "#3CC7C0" + }), + t: common_vendor.o(goHospital), + v: common_vendor.f(recommend_hospital.value, (item, k0, i0) => { + return { + a: common_vendor.t(item.hospital_name), + b: item.hospital_id, + c: common_vendor.o(($event) => goListBy(item.hospital_id, item.hospital_name, "hospital"), item.hospital_id) + }; + }), + w: common_vendor.p({ + name: "arrow-right", + size: "16", + color: "#3CC7C0" + }), + x: common_vendor.o(searchDoctor), + y: common_vendor.f(recommend_doctor.value, (item, k0, i0) => { + return { + a: common_vendor.t(item.doctor_name), + b: item.doctor_id, + c: common_vendor.o(($event) => goListBy(item.doctor_id, item.doctor_name, "doctor"), item.doctor_id) + }; + }) + }; + }; + } +}; +const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-1cf27b2a"]]); +wx.createPage(MiniProgramPage); +//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/index/index.js.map diff --git a/unpackage/dist/dev/mp-weixin/pages/index/index.json b/unpackage/dist/dev/mp-weixin/pages/index/index.json new file mode 100644 index 0000000..0a88ee6 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/index/index.json @@ -0,0 +1,10 @@ +{ + "navigationBarTitleText": "肝胆相照临床病例库", + "navigationStyle": "custom", + "usingComponents": { + "up--image": "../../node-modules/uview-plus/components/u--image/u--image", + "u-icon": "../../node-modules/uview-plus/components/u-icon/u-icon", + "tab-bar": "../../components/tabBar/tabBar", + "nav-bar": "../../components/navBar/navBar" + } +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/index/index.wxml b/unpackage/dist/dev/mp-weixin/pages/index/index.wxml new file mode 100644 index 0000000..807595b --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/index/index.wxml @@ -0,0 +1 @@ +{{b}}文章{{c}}视频{{d}}阅读量最新上线查看更多{{item.a}}{{tag.a}}最多阅读查看更多{{item.a}}{{tag.a}}医院病例库推荐查看更多{{item.a}}医生病例库推荐查看更多{{item.a}} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/index/index.wxss b/unpackage/dist/dev/mp-weixin/pages/index/index.wxss new file mode 100644 index 0000000..03df31f --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/index/index.wxss @@ -0,0 +1,152 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ +.tagsbox.data-v-1cf27b2a { + margin-top: 20rpx; + display: flex; + flex-wrap: wrap; +} +.tagsbox .tag.data-v-1cf27b2a { + padding: 0 10rpx; + margin-right: 16rpx; + height: 46rpx; + line-height: 46rpx; + text-align: center; + background: rgba(60, 199, 192, 0.1); + border-radius: 8rpx; + font-weight: 400; + font-size: 24rpx; + color: #3cc7c0; +} +.newsbox.data-v-1cf27b2a { + margin-bottom: 16rpx; +} +.recbox.data-v-1cf27b2a { + padding-bottom: 23rpx; + margin-bottom: 16rpx; + padding-top: 36rpx; + background: #fff; +} +.recbox .cell.data-v-1cf27b2a { + margin: 23rpx 30rpx 0; + padding: 34rpx; + background: #f3f4f6; + font-size: 30rpx; + color: #4b5563; + line-height: 43rpx; + border-radius: 15rpx; +} +.listbox .cell.data-v-1cf27b2a { + margin: 0 30rpx; + display: flex; + align-items: flex-start; + border-bottom: 1rpx solid #f3f4f6; + padding: 34rpx 0; +} +.listbox .cell .circle.data-v-1cf27b2a { + margin-right: 30rpx; + margin-top: 18rpx; + width: 16rpx; + height: 16rpx; + flex-shrink: 0; + background: #3cc7c0; + border-radius: 50%; +} +.listbox .cell .name.data-v-1cf27b2a { + font-size: 32rpx; + color: #000000; + line-height: 46rpx; +} +.listbox .cell .author.data-v-1cf27b2a { + font-size: 28rpx; + color: #4b5563; + line-height: 38rpx; +} +.titlebox.data-v-1cf27b2a { + margin: 0 30rpx; + display: flex; + justify-content: space-between; +} +.titlebox .more.data-v-1cf27b2a { + display: flex; + align-items: center; +} +.titlebox .more .morename.data-v-1cf27b2a { + margin-right: 10rpx; + font-size: 28rpx; + color: #3cc7c0; +} +.newsbox.data-v-1cf27b2a { + padding-top: 36rpx; + background: #fff; +} +.page.data-v-1cf27b2a { + background: #f9fafb; + height: calc(100vh - 425rpx); + overflow-y: scroll; +} +.kubox.data-v-1cf27b2a { + padding: 30rpx 0; + width: 100%; + background: rgba(0, 0, 0, 0); +} +.kubox .row.data-v-1cf27b2a { + padding: 0 30rpx; + display: flex; + justify-content: space-between; +} +.kubox .row .item.data-v-1cf27b2a { + margin-left: 30rpx; + padding: 32rpx; + flex: 1; + background: #e9fafb; + border-radius: 15rpx; +} +.kubox .row .item .name.data-v-1cf27b2a { + font-size: 32rpx; + color: #00919e; + line-height: 46rpx; +} +.databox.data-v-1cf27b2a { + height: 162rpx; + background: #ffffff; + display: flex; + padding: 0 30rpx; + justify-content: space-between; +} +.databox .cell.data-v-1cf27b2a { + flex: 1; + padding: 35rpx 0; + text-align: center; +} +.databox .cell .num.data-v-1cf27b2a { + font-size: 38rpx; + color: #3cc7c0; +} +.databox .cell .name.data-v-1cf27b2a { + margin-top: 18rpx; + font-size: 28rpx; + color: #4b5563; +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/login/login.js b/unpackage/dist/dev/mp-weixin/pages/login/login.js new file mode 100644 index 0000000..29b0616 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/login/login.js @@ -0,0 +1,304 @@ +"use strict"; +const common_vendor = require("../../common/vendor.js"); +const api_api = require("../../api/api.js"); +const utils_auth = require("../../utils/auth.js"); +if (!Array) { + const _easycom_up_input2 = common_vendor.resolveComponent("up-input"); + const _easycom_up_form_item2 = common_vendor.resolveComponent("up-form-item"); + const _easycom_up_toast2 = common_vendor.resolveComponent("up-toast"); + const _easycom_up_code2 = common_vendor.resolveComponent("up-code"); + const _easycom_up_button2 = common_vendor.resolveComponent("up-button"); + const _easycom_up_form2 = common_vendor.resolveComponent("up-form"); + (_easycom_up_input2 + _easycom_up_form_item2 + _easycom_up_toast2 + _easycom_up_code2 + _easycom_up_button2 + _easycom_up_form2)(); +} +const _easycom_up_input = () => "../../node-modules/uview-plus/components/u-input/u-input.js"; +const _easycom_up_form_item = () => "../../node-modules/uview-plus/components/u-form-item/u-form-item.js"; +const _easycom_up_toast = () => "../../node-modules/uview-plus/components/u-toast/u-toast.js"; +const _easycom_up_code = () => "../../node-modules/uview-plus/components/u-code/u-code.js"; +const _easycom_up_button = () => "../../node-modules/uview-plus/components/u-button/u-button.js"; +const _easycom_up_form = () => "../../node-modules/uview-plus/components/u-form/u-form.js"; +if (!Math) { + (_easycom_up_input + _easycom_up_form_item + _easycom_up_toast + _easycom_up_code + _easycom_up_button + _easycom_up_form)(); +} +const _sfc_main = { + __name: "login", + setup(__props) { + const code = common_vendor.ref(""); + const phone = common_vendor.ref(null); + common_vendor.ref(false); + const isPhoneLogin = common_vendor.ref(true); + const customStyle = common_vendor.reactive({ + height: "90rpx", + fontSize: "36rpx" + }); + const customCode = common_vendor.reactive({ + color: "#3ec7c0", + height: "64rpx", + fontSize: "28rpx", + borderColor: "#e2e2e2", + opcity: "1" + }); + const tips = common_vendor.ref(""); + const seconds = common_vendor.ref(10); + const uCodeRef = common_vendor.ref(null); + const checked = common_vendor.ref(false); + const hasRedirectUrl = common_vendor.ref(false); + const radioChange = (e) => { + checked.value = !checked.value; + }; + const alertAgree = () => { + common_vendor.index.showToast({ + title: "请先同意用户协议", + icon: "none" + }); + }; + common_vendor.onLoad((options) => { + if (options.redirectUrl) { + hasRedirectUrl.value = true; + } + }); + const goPage = () => { + if (hasRedirectUrl.value) { + common_vendor.index.__f__("log", "at pages/login/login.vue:201", "true"); + let url = ""; + let redirectUrl = common_vendor.index.getStorageSync("redirectUrl"); + if (redirectUrl && redirectUrl.indexOf("/login/login") == -1) { + url = redirectUrl; + } else { + url = "pages/index/index"; + } + common_vendor.index.__f__("log", "at pages/login/login.vue:210", "url:" + url); + common_vendor.index.redirectTo({ + url: "/" + url, + success() { + common_vendor.index.setStorageSync("redirectUrl", ""); + } + }); + } else { + common_vendor.index.__f__("log", "at pages/login/login.vue:219", "false"); + common_vendor.index.redirectTo({ + url: "/pages/index/index" + }); + } + }; + const getPhoneNumber = (e) => { + if (e.detail.errMsg === "getPhoneNumber:ok") { + common_vendor.index.__f__("log", "at pages/login/login.vue:228", e.target.code); + utils_auth.auth().then((res) => { + common_vendor.index.__f__("log", "at pages/login/login.vue:230", res); + api_api.api.wxLogin({ + phone_code: e.target.code, + wx_code: res, + source: 1 + }).then((data) => { + let result = data.data.data; + { + const { envVersion } = common_vendor.index.getAccountInfoSync().miniProgram; + if (envVersion == "release") { + common_vendor.index.setStorageSync("AUTH_TOKEN_CASEDATA", result.token); + } else { + common_vendor.index.setStorageSync("DEV_AUTH_TOKEN_CASEDATA", result.token); + } + } + common_vendor.index.setStorageSync("userInfo", { + avatar: result.avatar, + user_id: result.user_id, + status: result.status, + user_name: result.user_name, + doctor_id: result.doctor_id + }); + goPage(); + }).catch((err) => { + common_vendor.index.showToast({ + title: err, + icon: "none" + }); + }); + }); + } + }; + const phoneLogin = () => { + if (!isPhoneNum(phone.value)) + return; + if (!code.value) { + common_vendor.index.showToast({ + title: "请输入验证码", + icon: "none" + }); + return false; + } + if (!checked.value) { + common_vendor.index.showToast({ + title: "请先同意用户协议", + icon: "none" + }); + return false; + } + utils_auth.auth().then((res) => { + api_api.api.mobileLogin({ + code: code.value, + phone: phone.value, + wx_code: res + }).then((data) => { + let result = data.data.data; + const { envVersion } = common_vendor.index.getAccountInfoSync().miniProgram; + if (envVersion == "release") { + common_vendor.index.setStorageSync("AUTH_TOKEN_CASEDATA", result.token); + } else { + common_vendor.index.setStorageSync("DEV_AUTH_TOKEN_CASEDATA", result.token); + } + common_vendor.index.setStorageSync("userInfo", { + avatar: result.avatar, + user_id: result.user_id, + status: result.status, + user_name: result.user_name, + doctor_id: result.doctor_id + }); + goPage(); + }); + }); + }; + const isPhoneNum = (phonenum) => { + let reg = /^1[3456789]\d{9}$/; + if (!reg.test(phonenum)) { + common_vendor.index.showToast({ + title: "请输入有效的手机号码!", + icon: "none" + }); + return false; + } else { + return true; + } + }; + const codeChange = (text) => { + tips.value = text; + }; + const switchType = () => { + isPhoneLogin.value = !isPhoneLogin.value; + }; + const goRegister = () => { + common_vendor.index.navigateTo({ + url: "/pages/register/register" + }); + }; + const getCode = () => { + if (!isPhoneNum(phone.value)) + return; + if (uCodeRef.value.canGetCode) { + common_vendor.index.showLoading({ + title: "正在获取验证码" + }); + getSms(); + } else { + common_vendor.index.$u.toast("倒计时结束后再发送"); + } + }; + const getSms = () => { + api_api.api.getCode({ + phone: phone.value, + scene: 1 + }).then((res) => { + common_vendor.index.hideLoading(); + common_vendor.index.$u.toast("验证码已发送"); + uCodeRef.value.start(); + }); + }; + const end = () => { + customCode.opacity = 1; + }; + const start = () => { + customCode.opacity = 0.5; + }; + return (_ctx, _cache) => { + return common_vendor.e({ + a: !isPhoneLogin.value + }, !isPhoneLogin.value ? { + b: common_vendor.o(($event) => phone.value = $event), + c: common_vendor.p({ + placeholder: "请输入肝胆相照专家版手机号", + modelValue: phone.value + }), + d: common_vendor.p({ + label: "手机号", + prop: "userInfo.name", + borderBottom: true + }) + } : {}, { + e: !isPhoneLogin.value + }, !isPhoneLogin.value ? { + f: common_vendor.o(($event) => code.value = $event), + g: common_vendor.p({ + placeholder: "请输入验证码", + modelValue: code.value + }), + h: common_vendor.sr("uToastRef", "e4e4508d-5,e4e4508d-3"), + i: common_vendor.sr(uCodeRef, "e4e4508d-6,e4e4508d-3", { + "k": "uCodeRef" + }), + j: common_vendor.o(end), + k: common_vendor.o(start), + l: common_vendor.o(codeChange), + m: common_vendor.p({ + seconds: seconds.value + }), + n: common_vendor.t(tips.value), + o: common_vendor.o(getCode), + p: common_vendor.p({ + customStyle: customCode, + color: "#e2e2e2" + }), + q: common_vendor.p({ + label: "验证码", + prop: "userInfo.name", + borderBottom: true + }) + } : {}, { + r: common_vendor.sr("form", "e4e4508d-0"), + s: common_vendor.p({ + labelPosition: "left", + labelWidth: "115rpx" + }), + t: !isPhoneLogin.value + }, !isPhoneLogin.value ? { + v: common_vendor.o(phoneLogin), + w: common_vendor.p({ + customStyle, + type: "success", + text: "登录", + color: "#3cc7c0", + size: "large" + }) + } : common_vendor.e({ + x: checked.value + }, checked.value ? { + y: common_vendor.o(getPhoneNumber), + z: common_vendor.p({ + customStyle, + type: "success", + ["open-type"]: "getPhoneNumber", + text: "手机号快捷登录", + color: "#3cc7c0", + size: "large" + }) + } : { + A: common_vendor.o(alertAgree), + B: common_vendor.p({ + customStyle, + type: "success", + text: "手机号快捷登录", + color: "#3cc7c0", + size: "large" + }) + }), { + C: common_vendor.t(isPhoneLogin.value ? "用短信验证码登录" : "快捷登录"), + D: common_vendor.o(switchType), + E: common_vendor.o(goRegister), + F: checked.value, + G: common_vendor.o(radioChange) + }); + }; + } +}; +const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-e4e4508d"]]); +wx.createPage(MiniProgramPage); +//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/login/login.js.map diff --git a/unpackage/dist/dev/mp-weixin/pages/login/login.json b/unpackage/dist/dev/mp-weixin/pages/login/login.json new file mode 100644 index 0000000..f91fcb6 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/login/login.json @@ -0,0 +1,11 @@ +{ + "navigationBarTitleText": "登录", + "usingComponents": { + "up-input": "../../node-modules/uview-plus/components/u-input/u-input", + "up-form-item": "../../node-modules/uview-plus/components/u-form-item/u-form-item", + "up-toast": "../../node-modules/uview-plus/components/u-toast/u-toast", + "up-code": "../../node-modules/uview-plus/components/u-code/u-code", + "up-button": "../../node-modules/uview-plus/components/u-button/u-button", + "up-form": "../../node-modules/uview-plus/components/u-form/u-form" + } +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/login/login.wxml b/unpackage/dist/dev/mp-weixin/pages/login/login.wxml new file mode 100644 index 0000000..ac77ae7 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/login/login.wxml @@ -0,0 +1 @@ +登录观看{{n}}{{C}} 注册 操作说明1、 肝胆相照注册账号与微信绑定,肝胆相照相关直播、视频无忧随心看 2、 仅需操作一次,后续通过微信观看直播、视频无需额外操作,立即进入 3、 若您还未注册肝胆相照专家版App, 请直接点击“注册”进行注册操作 若您有任何疑问或需要我们协助,请与您的小助手联系或直接微信联系igandan1000 \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/login/login.wxss b/unpackage/dist/dev/mp-weixin/pages/login/login.wxss new file mode 100644 index 0000000..a59675e --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/login/login.wxss @@ -0,0 +1,108 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ +.radio.data-v-e4e4508d { + display: inline-flex; + font-size: 28rpx; +} +.radio radio.data-v-e4e4508d { + transform: scale(0.8) translateY(-2px); +} +.radio .agree.data-v-e4e4508d { + background: none; + color: #3cc7c0; +} +.logincontent.data-v-e4e4508d { + width: 100%; + height: 100vh; + background: #fff; +} +.logincontent .pwdbox.data-v-e4e4508d .u-form-item:nth-child(2) .u-form-item__body__left { + width: 180rpx !important; +} +.logincontent .smsbox.data-v-e4e4508d .u-form-item:first-child .u-form-item__body__left { + width: 180rpx !important; +} +.logincontent.data-v-e4e4508d .u-form-item__body__left__content__label { + font-size: 34rpx; + color: #000; +} +.logincontent .title.data-v-e4e4508d { + padding: 124rpx 0 64rpx 30rpx; + font-size: 46rpx; + font-stretch: normal; + letter-spacing: 2rpx; + color: #000000; +} +.logincontent.data-v-e4e4508d .u-form { + padding: 0 30rpx; +} +.logincontent .row.data-v-e4e4508d { + margin-top: 30rpx; + display: flex; + justify-content: space-between; + padding: 0 30rpx; +} +.logincontent .row .left.data-v-e4e4508d { + flex: 1; + color: #3cc7c0; + text-align: left; +} +.logincontent .row .right.data-v-e4e4508d { + flex: 1; + color: #666; + text-align: right; +} +.logincontent .row.data-v-e4e4508d .u-button--large .u-button__text { + font-size: 36rpx !important; +} +.logincontent .row .tip.data-v-e4e4508d { + color: #333333; + font-size: 26rpx; +} +.logincontent.data-v-e4e4508d .wrap { + border-radius: 16rpx; + overflow: hidden; + border: none; +} +.logincontent .line.data-v-e4e4508d { + padding: 0 30rpx; + margin-top: 10rpx; + color: #999999; + line-height: 44rpx; + font-size: 26rpx; + display: flex; + letter-spacing: 1px; +} +.logincontent .desc.data-v-e4e4508d { + padding: 0 30rpx; + color: #999999; + line-height: 44rpx; + font-size: 26rpx; + letter-spacing: 2rpx; +} +.logincontent .desc .red.data-v-e4e4508d { + color: red; +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/my/my.js b/unpackage/dist/dev/mp-weixin/pages/my/my.js new file mode 100644 index 0000000..d2f8058 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/my/my.js @@ -0,0 +1,193 @@ +"use strict"; +const common_vendor = require("../../common/vendor.js"); +const common_assets = require("../../common/assets.js"); +const utils_navTo = require("../../utils/navTo.js"); +const api_api = require("../../api/api.js"); +if (!Array) { + const _easycom_up__image2 = common_vendor.resolveComponent("up--image"); + const _easycom_u_icon2 = common_vendor.resolveComponent("u-icon"); + const _easycom_up_icon2 = common_vendor.resolveComponent("up-icon"); + (_easycom_up__image2 + _easycom_u_icon2 + _easycom_up_icon2)(); +} +const _easycom_up__image = () => "../../node-modules/uview-plus/components/u--image/u--image.js"; +const _easycom_u_icon = () => "../../node-modules/uview-plus/components/u-icon/u-icon.js"; +const _easycom_up_icon = () => "../../node-modules/uview-plus/components/u-icon/u-icon.js"; +if (!Math) { + (dNav + _easycom_up__image + _easycom_u_icon + _easycom_up_icon)(); +} +const dNav = () => "../../components/backNav/backNav.js"; +const _sfc_main = { + __name: "my", + setup(__props) { + const userInfo = common_vendor.reactive({}); + const numInfo = common_vendor.reactive({}); + const hospitalInfo = common_vendor.reactive({}); + const getInfo = () => { + api_api.api.getUserInfo().then((res) => { + const result = res.data.data; + Object.assign(userInfo, result); + common_vendor.index.__f__("log", "at pages/my/my.vue:139", result); + if (userInfo.doctor_id) { + getNum(userInfo.doctor_id); + } + if (userInfo.hospital_id) { + getHospitalNum(userInfo.hospital_id); + } + }); + }; + const getNum = (id) => { + api_api.api.getStaticDoctor(id).then((res) => { + const result = res.data.data; + Object.assign(numInfo, result); + }); + }; + const getHospitalNum = (id) => { + api_api.api.getStaticHospital(id).then((res) => { + const result = res.data.data; + Object.assign(hospitalInfo, result); + }); + }; + common_vendor.onLoad(() => { + getInfo(); + }); + const goCert = () => { + utils_navTo.navTo({ + url: "/pages/certList/certList?doctor_id=" + userInfo.doctor_id + }); + }; + const goDoctor = (id, name) => { + utils_navTo.navTo({ + url: "/pages/search/search?doctor_id=" + id + "&doctor_name=" + name + "&from=myCase" + }); + }; + const goHospital = (id, name) => { + utils_navTo.navTo({ + url: "/pages/search/search?hospital_id=" + id + "&hospital_name=" + name + }); + }; + const mySpecial = () => { + utils_navTo.navTo({ + url: "/pages/specialList/specialList?userId=" + userInfo.user_id + "&type=mine" + }); + }; + const goJoin = () => { + utils_navTo.navTo({ + url: "/pages/myJoin/myJoin" + }); + }; + const goCollect = () => { + utils_navTo.navTo({ + url: "/pages/myCollect/myCollect" + }); + }; + const goPublish = () => { + utils_navTo.navTo({ + url: "/pages/publish/publish" + }); + }; + return (_ctx, _cache) => { + return common_vendor.e({ + a: common_vendor.p({ + src: userInfo.avatar ? userInfo.avatar : common_vendor.unref(common_assets.headImg), + width: "154rpx", + height: "154rpx", + radius: "50%" + }), + b: common_vendor.t(userInfo.user_name), + c: common_vendor.t(userInfo.title), + d: common_vendor.t(userInfo.hospital_name), + e: numInfo.article_num + numInfo.video_num >= 2 + }, numInfo.article_num + numInfo.video_num >= 2 ? { + f: common_vendor.t(numInfo.article_num), + g: common_vendor.t(numInfo.video_num), + h: common_vendor.t(numInfo.video_read_num + numInfo.article_read_num) + } : {}, { + i: numInfo.article_num + numInfo.video_num >= 2 + }, numInfo.article_num + numInfo.video_num >= 2 ? { + j: common_vendor.p({ + src: common_vendor.unref(common_assets.myFile), + width: "34rpx", + height: "34rpx" + }), + k: common_vendor.p({ + name: "arrow-right", + color: "#9CA3AF", + size: "18" + }), + l: common_vendor.o(($event) => goDoctor(userInfo.doctor_id, userInfo.user_name)) + } : {}, { + m: numInfo.article_num + numInfo.video_num >= 2 + }, numInfo.article_num + numInfo.video_num >= 2 ? { + n: common_vendor.p({ + src: common_vendor.unref(common_assets.myDownload), + width: "42rpx", + height: "42rpx" + }), + o: common_vendor.p({ + name: "arrow-right", + color: "#9CA3AF", + size: "18" + }), + p: common_vendor.o(goCert) + } : {}, { + q: hospitalInfo.video_num + hospitalInfo.article_num >= 2 + }, hospitalInfo.video_num + hospitalInfo.article_num >= 2 ? { + r: common_vendor.p({ + src: common_vendor.unref(common_assets.myHospital), + width: "39rpx", + height: "39rpx" + }), + s: common_vendor.t(userInfo.hospital_name), + t: common_vendor.p({ + name: "arrow-right", + color: "#9CA3AF", + size: "18" + }), + v: common_vendor.o(($event) => goHospital(userInfo.hospital_id, userInfo.hospital_name)) + } : {}, { + w: common_vendor.p({ + src: common_vendor.unref(common_assets.myTalk), + width: "39rpx", + height: "39rpx" + }), + x: common_vendor.p({ + name: "arrow-right", + color: "#9CA3AF", + size: "18" + }), + y: common_vendor.o(mySpecial), + z: common_vendor.p({ + src: common_vendor.unref(common_assets.myJoin), + width: "39rpx", + height: "39rpx" + }), + A: common_vendor.p({ + name: "arrow-right", + color: "#9CA3AF", + size: "18" + }), + B: common_vendor.o(goJoin), + C: common_vendor.p({ + src: common_vendor.unref(common_assets.myCollect), + width: "39rpx", + height: "39rpx" + }), + D: common_vendor.p({ + name: "arrow-right", + color: "#9CA3AF", + size: "18" + }), + E: common_vendor.o(goCollect), + F: common_vendor.p({ + name: "plus", + color: "#fff", + size: "18" + }), + G: common_vendor.o(goPublish) + }); + }; + } +}; +const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-2f1ef635"]]); +wx.createPage(MiniProgramPage); +//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/my/my.js.map diff --git a/unpackage/dist/dev/mp-weixin/pages/my/my.json b/unpackage/dist/dev/mp-weixin/pages/my/my.json new file mode 100644 index 0000000..1b4ecbe --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/my/my.json @@ -0,0 +1,10 @@ +{ + "navigationBarTitleText": "肝胆相照临床病例库", + "navigationStyle": "custom", + "usingComponents": { + "up--image": "../../node-modules/uview-plus/components/u--image/u--image", + "u-icon": "../../node-modules/uview-plus/components/u-icon/u-icon", + "up-icon": "../../node-modules/uview-plus/components/u-icon/u-icon", + "d-nav": "../../components/backNav/backNav" + } +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/my/my.wxml b/unpackage/dist/dev/mp-weixin/pages/my/my.wxml new file mode 100644 index 0000000..3f4ad32 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/my/my.wxml @@ -0,0 +1 @@ +{{b}}({{c}}) {{d}}{{f}}文章{{g}}视频{{h}}阅读量我的病例库临床病例库收录证书下载{{s}}临床病例库我的病例交流我的参与互动浏览与收藏 \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/my/my.wxss b/unpackage/dist/dev/mp-weixin/pages/my/my.wxss new file mode 100644 index 0000000..17cab14 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/my/my.wxss @@ -0,0 +1,115 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ +.upage.data-v-2f1ef635 { + height: 100vh; + display: flex; + flex-direction: column; +} +.con.data-v-2f1ef635 { + height: calc(100vh - 100rpx); + overflow-y: scroll; +} +.publish.data-v-2f1ef635 { + width: 92rpx; + height: 92rpx; + background: #3CC7C0; + border-radius: 50%; + position: fixed; + right: 30rpx; + bottom: 100rpx; + display: flex; + justify-content: center; + align-items: center; +} +.listbox.data-v-2f1ef635 { + margin: 34rpx 30rpx 0; +} +.listbox .titlename.data-v-2f1ef635 { + margin-bottom: 30rpx; +} +.listbox .cell.data-v-2f1ef635 { + height: 108rpx; + padding: 0 30rpx; + margin-bottom: 30rpx; + background: #F9FAFB; + border-radius: 15rpx; + display: flex; + justify-content: space-between; + align-items: center; +} +.listbox .cell.data-v-2f1ef635 .u-image { + margin-top: 9rpx; + background: none !important; +} +.listbox .cell .left.data-v-2f1ef635 { + display: flex; + justify-content: space-between; + font-size: 32rpx; + color: #000000; +} +.listbox .cell .left .title.data-v-2f1ef635 { + margin-top: 4rpx; + margin-left: 8rpx; +} +.databox.data-v-2f1ef635 { + height: 162rpx; + background: #ffffff; + display: flex; + padding: 10rpx 0rpx; + justify-content: space-between; + border-bottom: 2rpx solid rgba(0, 0, 0, 0.1); +} +.databox .cell.data-v-2f1ef635 { + flex: 1; + padding: 35rpx 0; + text-align: center; +} +.databox .cell .num.data-v-2f1ef635 { + font-size: 38rpx; + color: #000000; +} +.databox .cell .name.data-v-2f1ef635 { + margin-top: 18rpx; + font-size: 28rpx; + color: #4B5563; +} +.infobox.data-v-2f1ef635 { + margin: 0 30rpx; + display: flex; +} +.infobox .info.data-v-2f1ef635 { + margin-left: 20rpx; +} +.infobox .info .name.data-v-2f1ef635 { + font-size: 32rpx; + color: #000000; + line-height: 46rpx; +} +.infobox .info .hospital.data-v-2f1ef635 { + font-size: 28rpx; + color: #4B5563; + line-height: 38rpx; +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/myCollect/myCollect.js b/unpackage/dist/dev/mp-weixin/pages/myCollect/myCollect.js new file mode 100644 index 0000000..8b24fec --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/myCollect/myCollect.js @@ -0,0 +1,223 @@ +"use strict"; +const common_vendor = require("../../common/vendor.js"); +const api_api = require("../../api/api.js"); +const utils_navTo = require("../../utils/navTo.js"); +if (!Array) { + const _easycom_up_dropdown_item2 = common_vendor.resolveComponent("up-dropdown-item"); + const _easycom_up_dropdown2 = common_vendor.resolveComponent("up-dropdown"); + const _easycom_up_icon2 = common_vendor.resolveComponent("up-icon"); + const _easycom_z_paging2 = common_vendor.resolveComponent("z-paging"); + (_easycom_up_dropdown_item2 + _easycom_up_dropdown2 + _easycom_up_icon2 + _easycom_z_paging2)(); +} +const _easycom_up_dropdown_item = () => "../../node-modules/uview-plus/components/u-dropdown-item/u-dropdown-item.js"; +const _easycom_up_dropdown = () => "../../node-modules/uview-plus/components/u-dropdown/u-dropdown.js"; +const _easycom_up_icon = () => "../../node-modules/uview-plus/components/u-icon/u-icon.js"; +const _easycom_z_paging = () => "../../uni_modules/z-paging/components/z-paging/z-paging.js"; +if (!Math) { + (navBarSearch + _easycom_up_dropdown_item + _easycom_up_dropdown + _easycom_up_icon + _easycom_z_paging)(); +} +const navBarSearch = () => "../../components/navBarSearch/navBarSearch.js"; +const _sfc_main = { + __name: "myCollect", + setup(__props) { + const paging = common_vendor.ref(null); + const uDropdownRef = common_vendor.ref(null); + const dataList = common_vendor.ref([]); + const total = common_vendor.ref(0); + common_vendor.ref(""); + const keyWord = common_vendor.ref(""); + common_vendor.ref(true); + const isSearch = common_vendor.ref(false); + const navName = common_vendor.ref("肝胆相照临床病例库"); + const type1 = common_vendor.ref(0); + const type2 = common_vendor.ref(1); + const title2 = common_vendor.ref("文章病例库"); + const options = common_vendor.ref([ + { + label: "收藏", + value: 0 + }, + { + label: "浏览", + value: 1 + } + ]); + const options1 = common_vendor.ref([ + { + label: "文章病例库", + value: 1 + }, + { + label: "视频病例库", + value: 2 + }, + { + label: "病例交流", + value: 3 + } + ]); + common_vendor.reactive({ + read_num: "", + push_date: "" + }); + common_vendor.onLoad((options2) => { + if (options2.keyWord) { + keyWord.value = options2.keyWord; + } + }); + common_vendor.onShow(() => { + var _a; + (_a = paging.value) == null ? void 0 : _a.refresh(); + }); + const changetype1 = (e) => { + type1.value = e; + paging.value.reload(); + }; + const changetype2 = (e) => { + type2.value = e; + title2.value = options1.value[e - 1].label; + paging.value.reload(); + }; + const formatdate = (date) => { + return common_vendor.dayjs(date).format("YYYY-MM-DD"); + }; + const goDetail = (id) => { + common_vendor.index.__f__("log", "at pages/myCollect/myCollect.vue:135", type1.value); + common_vendor.index.__f__("log", "at pages/myCollect/myCollect.vue:136", id); + let type = "article"; + if (type2.value == 1) { + type = "article"; + } else if (type2.value == 2) { + type = "video"; + } else if (type2.value == 3) { + type = "exchange"; + } + utils_navTo.navTo({ + url: `/pages/detail/detail?id=${id}&type=${type}` + }); + }; + const changeWord = (val) => { + isSearch.value = true; + keyWord.value = val; + paging.value.reload(); + }; + const searchCollect = (params) => { + let searchForm = { + keyword: keyWord.value, + type: type2.value + }; + api_api.api.getMyCollect({ + ...searchForm, + ...params + }).then((res) => { + paging.value.complete(res.data.data.data); + total.value = res.data.data.total; + }).catch((err) => { + paging.value.complete(false); + }); + }; + const searchRead = async (params) => { + let searchForm = { + keyword: keyWord.value, + type: type2.value + }; + api_api.api.getMyRead({ + ...searchForm, + ...params + }).then((res) => { + paging.value.complete(res.data.data.data); + total.value = res.data.data.total; + }).catch((err) => { + paging.value.complete(false); + }); + }; + const queryList = (pageNo, pageSize) => { + const params = { + page: pageNo, + page_size: pageSize + }; + type1.value == 1 ? searchRead(params) : searchCollect(params); + }; + return (_ctx, _cache) => { + return common_vendor.e({ + a: common_vendor.o(changeWord), + b: common_vendor.p({ + searchWord: keyWord.value, + navName: navName.value + }), + c: isSearch.value + }, isSearch.value ? common_vendor.e({ + d: common_vendor.t(total.value), + e: keyWord.value + }, keyWord.value ? { + f: common_vendor.t(keyWord.value) + } : {}) : {}, { + g: common_vendor.o(changetype1), + h: common_vendor.o(($event) => type1.value = $event), + i: common_vendor.p({ + title: type1.value == 0 ? "收藏" : "浏览", + options: options.value, + modelValue: type1.value + }), + j: common_vendor.o(changetype2), + k: common_vendor.o(($event) => type2.value = $event), + l: common_vendor.p({ + title: title2.value, + options: options1.value, + modelValue: type2.value + }), + m: common_vendor.sr(uDropdownRef, "1cf734f5-2,1cf734f5-0", { + "k": "uDropdownRef" + }), + n: common_vendor.f(dataList.value, (item, index, i0) => { + return { + a: common_vendor.t(item.data.title), + b: common_vendor.f(item.data.author, (tag, k1, i1) => { + return { + a: common_vendor.t(tag.doctor_name), + b: tag.author_id + }; + }), + c: "1cf734f5-5-" + i0 + ",1cf734f5-0", + d: common_vendor.t(item.data.read_num), + e: "1cf734f5-6-" + i0 + ",1cf734f5-0", + f: common_vendor.t(item.data.collect_num), + g: "1cf734f5-7-" + i0 + ",1cf734f5-0", + h: common_vendor.t(formatdate(item.data.push_date)), + i: common_vendor.o(($event) => goDetail(item.data.id), item.collect_id), + j: item.collect_id + }; + }), + o: common_vendor.p({ + name: "eye", + color: "#6B7280", + size: "28rpx" + }), + p: common_vendor.p({ + name: "heart", + color: "#6B7280", + size: "28rpx" + }), + q: common_vendor.p({ + name: "clock", + color: "#6B7280", + size: "28rpx" + }), + r: common_vendor.sr(paging, "1cf734f5-0", { + "k": "paging" + }), + s: common_vendor.o(queryList), + t: common_vendor.o(($event) => dataList.value = $event), + v: common_vendor.p({ + ["inside-more"]: true, + ["loading-more-no-more-text"]: "咱也是有底线的!", + ["auto-show-back-to-top"]: true, + modelValue: dataList.value + }) + }); + }; + } +}; +const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-1cf734f5"]]); +wx.createPage(MiniProgramPage); +//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/myCollect/myCollect.js.map diff --git a/unpackage/dist/dev/mp-weixin/pages/myCollect/myCollect.json b/unpackage/dist/dev/mp-weixin/pages/myCollect/myCollect.json new file mode 100644 index 0000000..599fcf5 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/myCollect/myCollect.json @@ -0,0 +1,11 @@ +{ + "navigationBarTitleText": "肝胆相照临床病例库", + "navigationStyle": "custom", + "usingComponents": { + "up-dropdown-item": "../../node-modules/uview-plus/components/u-dropdown-item/u-dropdown-item", + "up-dropdown": "../../node-modules/uview-plus/components/u-dropdown/u-dropdown", + "up-icon": "../../node-modules/uview-plus/components/u-icon/u-icon", + "z-paging": "../../uni_modules/z-paging/components/z-paging/z-paging", + "nav-bar-search": "../../components/navBarSearch/navBarSearch" + } +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/myCollect/myCollect.wxml b/unpackage/dist/dev/mp-weixin/pages/myCollect/myCollect.wxml new file mode 100644 index 0000000..b665bf4 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/myCollect/myCollect.wxml @@ -0,0 +1 @@ +检索到:{{d}}篇检索词:{{f}}{{item.a}}{{tag.a}}{{item.d}}{{item.f}}{{item.h}} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/myCollect/myCollect.wxss b/unpackage/dist/dev/mp-weixin/pages/myCollect/myCollect.wxss new file mode 100644 index 0000000..d6b9522 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/myCollect/myCollect.wxss @@ -0,0 +1,152 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ +.databox.data-v-1cf734f5 { + height: 162rpx; + background: #ffffff; + display: flex; + margin-bottom: 20rpx; + justify-content: space-between; +} +.databox .cell.data-v-1cf734f5 { + flex: 1; + padding: 35rpx 0; + text-align: center; +} +.databox .cell .num.data-v-1cf734f5 { + font-size: 38rpx; + color: #3cc7c0; +} +.databox .cell .name.data-v-1cf734f5 { + margin-top: 18rpx; + font-size: 28rpx; + color: #4b5563; +} +.filterbox.data-v-1cf734f5 { + display: flex; + height: 128rpx; + align-items: center; + position: relative; +} +.filterbox .type.data-v-1cf734f5 { + position: absolute; + left: 30rpx; + top: 24rpx; + display: flex; + justify-content: center; + align-items: center; + background: #F3F4F6; + border-radius: 15rpx; + height: 74rpx; + padding: 0 25rpx; + z-index: 2; +} +.u-page.data-v-1cf734f5 .u-flex { + display: flex; + flex-direction: row; + overflow: hidden; +} +.u-page.data-v-1cf734f5 .u-dropdown__menu { + background: #fff; + z-index: 1; + margin-left: 0rpx; +} +.u-page.data-v-1cf734f5 .u-dropdown__menu__item { + height: 74rpx; + padding: 0 20rpx; + background: #F3F4F6; + border-radius: 15rpx; + flex: none; + margin-left: 30rpx; +} +.u-page.data-v-1cf734f5 .u-dropdown__menu__item__text { + font-size: 14px !important; + color: #3CC7C0 !important; +} +.u-page .deal.data-v-1cf734f5 { + margin-top: 20rpx; + display: flex; + color: #6b7280; + font-size: 24rpx; + justify-content: space-between; +} +.u-page .deal .left.data-v-1cf734f5 { + display: flex; + align-items: center; +} +.u-page .deal .collect.data-v-1cf734f5 { + display: flex; + align-items: center; +} +.u-page .deal .eyebox.data-v-1cf734f5 { + width: 160rpx; + display: flex; + align-items: center; +} +.u-page .deal .time.data-v-1cf734f5 { + display: flex; + align-items: center; +} +.u-page .deal .num.data-v-1cf734f5 { + margin-left: 8rpx; +} +.u-page .item.data-v-1cf734f5 { + border-bottom: 1rpx solid #f3f4f6; + padding: 30rpx; +} +.u-page .item .title.data-v-1cf734f5 { + font-size: 30rpx; + color: #111827; + line-height: 46rpx; +} +.u-page .tagsbox.data-v-1cf734f5 { + margin-top: 20rpx; + display: flex; + flex-wrap: wrap; +} +.u-page .tagsbox .tag.data-v-1cf734f5 { + padding: 0 10rpx; + margin-right: 16rpx; + height: 46rpx; + line-height: 46rpx; + text-align: center; + background: rgba(60, 199, 192, 0.1); + border-radius: 8rpx; + font-weight: 400; + font-size: 24rpx; + color: #3cc7c0; +} +.detail.data-v-1cf734f5 { + background: #f9f9f9; + padding: 12rpx 30rpx; +} +.detail .desc.data-v-1cf734f5 { + font-size: 26rpx; + color: #4b5563; + line-height: 40rpx; +} +.detail .red.data-v-1cf734f5 { + color: #FF0000; +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/myJoin/myJoin.js b/unpackage/dist/dev/mp-weixin/pages/myJoin/myJoin.js new file mode 100644 index 0000000..0641477 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/myJoin/myJoin.js @@ -0,0 +1,247 @@ +"use strict"; +const common_vendor = require("../../common/vendor.js"); +const api_api = require("../../api/api.js"); +if (!Array) { + const _easycom_up_tabs2 = common_vendor.resolveComponent("up-tabs"); + const _easycom_up_icon2 = common_vendor.resolveComponent("up-icon"); + const _easycom_z_paging2 = common_vendor.resolveComponent("z-paging"); + const _easycom_up_popup2 = common_vendor.resolveComponent("up-popup"); + const _easycom_up_overlay2 = common_vendor.resolveComponent("up-overlay"); + (_easycom_up_tabs2 + _easycom_up_icon2 + _easycom_z_paging2 + _easycom_up_popup2 + _easycom_up_overlay2)(); +} +const _easycom_up_tabs = () => "../../node-modules/uview-plus/components/u-tabs/u-tabs.js"; +const _easycom_up_icon = () => "../../node-modules/uview-plus/components/u-icon/u-icon.js"; +const _easycom_z_paging = () => "../../uni_modules/z-paging/components/z-paging/z-paging.js"; +const _easycom_up_popup = () => "../../node-modules/uview-plus/components/u-popup/u-popup.js"; +const _easycom_up_overlay = () => "../../node-modules/uview-plus/components/u-overlay/u-overlay.js"; +if (!Math) { + (backLogoNav + _easycom_up_tabs + _easycom_up_icon + _easycom_z_paging + _easycom_up_popup + _easycom_up_overlay)(); +} +const backLogoNav = () => "../../components/backLogoNav/backLogoNav.js"; +const _sfc_main = { + __name: "myJoin", + setup(__props) { + const paging = common_vendor.ref(null); + common_vendor.ref(null); + const dataList = common_vendor.ref([]); + const total = common_vendor.ref(0); + const delId = common_vendor.ref(""); + const keyWord = common_vendor.ref(""); + common_vendor.ref(true); + const navName = common_vendor.ref("肝胆相照临床病例库"); + const showDeal = common_vendor.ref(false); + const showModal = common_vendor.ref(false); + const tab = common_vendor.ref(0); + const closeDeal = () => { + showDeal.value = false; + }; + const alertPop = () => { + showModal.value = true; + showDeal.value = false; + }; + const confirmDel = () => { + if (tab.value == 0) { + delExchangeComment(delId.value); + } else if (tab.value == 1) { + delArticleComment(delId.value); + } else if (tab.value == 2) { + delVideoComment(delId.value); + } + showModal.value = false; + }; + const openDeal = () => { + showDeal.value = true; + }; + const isDel = (id) => { + delId.value = id; + showDeal.value = true; + }; + common_vendor.ref([ + { + label: "正序", + value: "asc" + }, + { + label: "倒序", + value: "desc" + } + ]); + const tabList = common_vendor.ref([ + { + name: "病例交流" + }, + { + name: "文章病例库" + }, + { + name: "视频病例库" + } + ]); + const delArticleComment = (id) => { + api_api.api.delArticleComment(id).then((res) => { + common_vendor.index.showToast({ + icon: "none", + title: "删除成功" + }); + paging.value.refresh(); + }); + }; + const delVideoComment = (id) => { + api_api.api.delVideoComment(id).then((res) => { + common_vendor.index.showToast({ + icon: "none", + title: "删除成功" + }); + paging.value.refresh(); + }); + }; + const delExchangeComment = (id) => { + api_api.api.delExchangeComment(id).then((res) => { + common_vendor.index.showToast({ + icon: "none", + title: "删除成功" + }); + paging.value.refresh(); + }); + }; + const switchTab = (item) => { + tab.value = item.index; + paging.value.reload(); + }; + common_vendor.onLoad((options) => { + }); + common_vendor.onShow(() => { + var _a; + (_a = paging.value) == null ? void 0 : _a.refresh(); + }); + const formatdate = (date) => { + return common_vendor.dayjs(date).format("YYYY-MM-DD"); + }; + const getExchangeCommentUser = async (params) => { + api_api.api.getExchangeCommentUser({ + ...params + }).then((res) => { + paging.value.complete(res.data.data.data); + total.value = res.data.data.total; + }).catch((err) => { + paging.value.complete(false); + }); + }; + const getArticleCommentUser = async (params) => { + api_api.api.getArticleCommentUser({ + ...params + }).then((res) => { + paging.value.complete(res.data.data.data); + total.value = res.data.data.total; + }).catch((err) => { + paging.value.complete(false); + }); + }; + const getVideoCommentUser = async (params) => { + api_api.api.getVideoCommentUser({ + ...params + }).then((res) => { + paging.value.complete(res.data.data.data); + total.value = res.data.data.total; + }).catch((err) => { + paging.value.complete(false); + }); + }; + const queryList = (pageNo, pageSize) => { + const params = { + page: pageNo, + page_size: pageSize + }; + if (tab.value == 0) { + getExchangeCommentUser(params); + } else if (tab.value == 1) { + getArticleCommentUser(params); + } else { + getVideoCommentUser(params); + } + }; + return (_ctx, _cache) => { + return { + a: common_vendor.p({ + searchWord: keyWord.value, + navName: navName.value + }), + b: common_vendor.o(switchTab), + c: common_vendor.p({ + activeStyle: { + color: "#3CC7C0" + }, + inactiveStyle: { + color: "#4B5563" + }, + lineColor: "#3CC7C0", + lineWidth: "155rpx", + lineHeight: "2", + list: tabList.value + }), + d: common_vendor.f(dataList.value, (item, index, i0) => { + return common_vendor.e({ + a: common_vendor.t(item.content), + b: "235c92a6-3-" + i0 + ",235c92a6-0", + c: common_vendor.t(formatdate(item.created_at)), + d: common_vendor.o(($event) => isDel(item.comment_id), index) + }, tab.value == 0 ? { + e: common_vendor.t(item.author_name), + f: common_vendor.t(item.author_hospital_name) + } : {}, tab.value == 0 ? { + g: common_vendor.t(item.exchange_title) + } : tab.value == 1 ? { + h: common_vendor.t(item.article_title) + } : tab.value == 2 ? { + i: common_vendor.t(item.video_title) + } : {}, { + j: index + }); + }), + e: common_vendor.p({ + name: "clock", + color: "#6B7280", + size: "28rpx" + }), + f: tab.value == 0, + g: tab.value == 0, + h: tab.value == 1, + i: tab.value == 2, + j: common_vendor.sr(paging, "235c92a6-0", { + "k": "paging" + }), + k: common_vendor.o(queryList), + l: common_vendor.o(($event) => dataList.value = $event), + m: common_vendor.p({ + ["inside-more"]: true, + ["loading-more-no-more-text"]: "咱也是有底线的!", + ["auto-show-back-to-top"]: true, + modelValue: dataList.value + }), + n: common_vendor.o(alertPop), + o: common_vendor.o(closeDeal), + p: common_vendor.o(closeDeal), + q: common_vendor.o(openDeal), + r: common_vendor.p({ + zIndex: 10, + overlayStyle: { + zIndex: 9 + }, + closeOnClickOverlay: false, + show: showDeal.value, + round: 10, + mode: "bottom" + }), + s: common_vendor.o(($event) => showModal.value = false), + t: common_vendor.o(confirmDel), + v: common_vendor.p({ + show: showModal.value, + ["mask-click-able"]: true + }) + }; + }; + } +}; +const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-235c92a6"]]); +wx.createPage(MiniProgramPage); +//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/myJoin/myJoin.js.map diff --git a/unpackage/dist/dev/mp-weixin/pages/myJoin/myJoin.json b/unpackage/dist/dev/mp-weixin/pages/myJoin/myJoin.json new file mode 100644 index 0000000..9d87c46 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/myJoin/myJoin.json @@ -0,0 +1,12 @@ +{ + "navigationBarTitleText": "肝胆相照临床病例库", + "navigationStyle": "custom", + "usingComponents": { + "up-tabs": "../../node-modules/uview-plus/components/u-tabs/u-tabs", + "up-icon": "../../node-modules/uview-plus/components/u-icon/u-icon", + "z-paging": "../../uni_modules/z-paging/components/z-paging/z-paging", + "up-popup": "../../node-modules/uview-plus/components/u-popup/u-popup", + "up-overlay": "../../node-modules/uview-plus/components/u-overlay/u-overlay", + "back-logo-nav": "../../components/backLogoNav/backLogoNav" + } +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/myJoin/myJoin.wxml b/unpackage/dist/dev/mp-weixin/pages/myJoin/myJoin.wxml new file mode 100644 index 0000000..957d9f2 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/myJoin/myJoin.wxml @@ -0,0 +1 @@ +{{item.a}}{{item.c}}...{{item.e}}({{item.f}}){{item.g}}{{item.h}}{{item.i}}删除取消提示 是否删除该评论? 取消确定 \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/myJoin/myJoin.wxss b/unpackage/dist/dev/mp-weixin/pages/myJoin/myJoin.wxss new file mode 100644 index 0000000..294966a --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/myJoin/myJoin.wxss @@ -0,0 +1,315 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ +.zanboxpop.data-v-235c92a6 { + display: flex; + align-items: center; + justify-content: center; + height: 100%; +} +.zanboxpop .zanwraper.data-v-235c92a6 { + width: 630rpx; + margin: 0 auto; + padding-bottom: 50rpx; + background: #f5f6f9; + border-radius: 16rpx; +} +.zanboxpop .zanwraper .title.data-v-235c92a6 { + margin-top: 48rpx; + text-align: center; + font-weight: 500; + font-size: 36rpx; + color: rgba(0, 0, 0, 0.85); +} +.zanboxpop .zanwraper .content.data-v-235c92a6 { + padding: 30rpx 0; + background: #f5f6f9; + text-align: center; +} +.zanboxpop .zanwraper .count.data-v-235c92a6 { + margin-top: 24rpx; + display: flex; + align-items: center; + text-align: center; + justify-content: center; + font-weight: 400; + font-size: 28rpx; + color: rgba(0, 0, 0, 0.65); +} +.zanboxpop .zanwraper .count .num.data-v-235c92a6 { + color: #ff0000; + font-size: 32rpx; +} +.zanboxpop .zanwraper .count .earn.data-v-235c92a6 { + font-size: 32rpx; + color: #3cc7c0; +} +.zanboxpop .zanwraper .countbox.data-v-235c92a6 { + display: flex; + width: 100%; + margin: 30rpx 0px 40rpx; + padding: 0 40rpx; + justify-content: center; + box-sizing: border-box; +} +.zanboxpop .zanwraper .countbox .minus.data-v-235c92a6 { + flex-shrink: 0; + margin-left: 10rp; + width: 90rpx; + height: 90rpx; + font-size: 60rpx; + color: #333; + display: flex; + justify-content: center; + align-items: center; + background: #ffffff; + border-radius: 12rpx; + border: 2rpx solid #e9e9e9; +} +.zanboxpop .zanwraper .countbox .add.data-v-235c92a6 { + flex-shrink: 0; + width: 90rpx; + margin-left: 10rpx; + height: 90rpx; + font-size: 60rpx; + color: #333; + display: flex; + justify-content: center; + align-items: center; + color: #fff; + background: #3cc7c0; + border-radius: 12rpx; + border: 2rpx solid #3cc7c0; +} +.zanboxpop .zanwraper .countbox.data-v-235c92a6 .u-input__content__field-wrapper__field { + height: 60rpx; + font-size: 34rpx !important; + text-align: center !important; +} +.zanboxpop .zanwraper .countbox.data-v-235c92a6 .u-input { + background: #f2f2f2; + width: 200rpx !important; + flex: none; +} +.zanboxpop .zanwraper .countbox.data-v-235c92a6 .u-input--radius { + border-radius: 24rrpx; +} +.zanboxpop .zanwraper .btnbox.data-v-235c92a6 { + margin: 0px 40rpx 0px; + display: flex; + justify-content: space-between; +} +.zanboxpop .zanwraper .btnbox .cancle.data-v-235c92a6 { + color: rgba(0, 0, 0, 0.3); + width: 256rpx; + height: 88rpx; + background: #f5f6f9; + border-radius: 25px; + border: 2rpx solid rgba(0, 0, 0, 0.15); + font-weight: 500; + font-size: 32rpx; + color: rgba(0, 0, 0, 0.85); + display: flex; + justify-content: center; + align-items: center; +} +.zanboxpop .zanwraper .btnbox .ok.data-v-235c92a6 { + color: #fff; + width: 256rpx; + height: 88rpx; + background: #3cc7c0; + border-radius: 25px; + border: 2rpx solid #3cc7c0; + font-weight: 500; + font-size: 32rpx; + display: flex; + justify-content: center; + align-items: center; +} +.bar.data-v-235c92a6 { + width: 100%; + background: #f9fafb; + height: 20rpx; +} +.dealbox .dealcell.data-v-235c92a6 { + display: flex; + align-items: center; + justify-content: center; + height: 112rpx; + font-size: 32rpx; + color: rgba(0, 0, 0, 0.9); + border-bottom: 2rpx solid #efefef; +} +.tabcon.data-v-235c92a6 { + margin: -20rpx 20rpx 0; +} +.databox.data-v-235c92a6 { + height: 162rpx; + background: #ffffff; + display: flex; + margin-bottom: 20rpx; + justify-content: space-between; +} +.databox .cell.data-v-235c92a6 { + flex: 1; + padding: 35rpx 0; + text-align: center; +} +.databox .cell .num.data-v-235c92a6 { + font-size: 38rpx; + color: #3cc7c0; +} +.databox .cell .name.data-v-235c92a6 { + margin-top: 18rpx; + font-size: 28rpx; + color: #4b5563; +} +.filterbox.data-v-235c92a6 { + display: flex; + height: 128rpx; + align-items: center; + position: relative; +} +.filterbox .type.data-v-235c92a6 { + position: absolute; + left: 30rpx; + top: 24rpx; + display: flex; + justify-content: center; + align-items: center; + background: #f3f4f6; + border-radius: 15rpx; + height: 74rpx; + padding: 0 25rpx; + z-index: 2; +} +.u-page.data-v-235c92a6 .u-flex { + display: flex; + flex-direction: row; + overflow: hidden; +} +.u-page.data-v-235c92a6 .u-dropdown__menu { + background: #fff; + z-index: 1; + margin-left: 180rpx; +} +.u-page.data-v-235c92a6 .u-dropdown__menu__item { + height: 74rpx; + padding: 0 20rpx; + background: #f3f4f6; + border-radius: 15rpx; + flex: none; + margin-left: 60rpx; +} +.u-page .casecontent.data-v-235c92a6 { + margin-top: 16rpx; + padding: 24rpx 30rpx; + border-radius: 16rpx; + border: 2rpx solid #E5E7EB; +} +.u-page .casecontent .author.data-v-235c92a6 { + font-size: 26rpx; + color: #666666; +} +.u-page .casecontent .content.data-v-235c92a6 { + margin-top: 10rpx; + font-size: 30rpx; + color: #333333; + line-height: 46rpx; +} +.u-page .deal.data-v-235c92a6 { + margin-top: 20rpx; + display: flex; + color: #6b7280; + font-size: 24rpx; + justify-content: space-between; +} +.u-page .deal .left.data-v-235c92a6 { + display: flex; + align-items: center; +} +.u-page .deal .recored.data-v-235c92a6 { + display: flex; + align-items: center; + font-size: 31rpx; + color: #3cc7c0; +} +.u-page .deal .collect.data-v-235c92a6 { + display: flex; + align-items: center; +} +.u-page .deal .eyebox.data-v-235c92a6 { + width: 160rpx; + display: flex; + align-items: center; +} +.u-page .deal .dot.data-v-235c92a6 { + font-size: 34rpx; +} +.u-page .deal .time.data-v-235c92a6 { + display: flex; + align-items: center; +} +.u-page .deal .num.data-v-235c92a6 { + margin-left: 8rpx; +} +.u-page .item.data-v-235c92a6 { + border-bottom: 1rpx solid #f3f4f6; + padding: 30rpx; +} +.u-page .item .title.data-v-235c92a6 { + font-size: 30rpx; + color: #111827; + line-height: 46rpx; +} +.u-page .tagsbox.data-v-235c92a6 { + margin-top: 20rpx; + display: flex; + flex-wrap: wrap; +} +.u-page .tagsbox .tag.data-v-235c92a6 { + padding: 0 10rpx; + margin-right: 16rpx; + height: 46rpx; + line-height: 46rpx; + text-align: center; + background: rgba(60, 199, 192, 0.1); + border-radius: 8rpx; + font-weight: 400; + font-size: 24rpx; + color: #3cc7c0; +} +.detail.data-v-235c92a6 { + background: #f9f9f9; + padding: 12rpx 30rpx; +} +.detail .desc.data-v-235c92a6 { + font-size: 26rpx; + color: #4b5563; + line-height: 40rpx; +} +.detail .red.data-v-235c92a6 { + color: #ff0000; +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/register/register.js b/unpackage/dist/dev/mp-weixin/pages/register/register.js new file mode 100644 index 0000000..de0a3b2 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/register/register.js @@ -0,0 +1,44 @@ +"use strict"; +const common_vendor = require("../../common/vendor.js"); +const _sfc_main = { + __name: "register", + setup(__props) { + const src = common_vendor.ref("https://wx.igandan.com/hcp/toRegister?fromType=wx"); + common_vendor.reactive({ + name: "" + }); + common_vendor.ref(false); + common_vendor.ref(true); + common_vendor.reactive({ + height: "90rpx", + fontSize: "36rpx" + }); + common_vendor.reactive({ + color: "#3ec7c0", + height: "64rpx", + fontSize: "28rpx", + borderColor: "#e2e2e2", + opcity: "1" + }); + common_vendor.ref(""); + common_vendor.ref(10); + common_vendor.ref(null); + common_vendor.onLoad(() => { + const { envVersion } = common_vendor.index.getAccountInfoSync().miniProgram; + common_vendor.index.__f__("log", "at pages/register/register.vue:142", envVersion); + if (envVersion == "release") { + src.value = "https://wx.igandan.com/hcp/toRegister"; + } else { + src.value = "https://dev-wx.igandan.com/hcp/toRegister?fromType=weChat"; + } + }); + return (_ctx, _cache) => { + return { + a: src.value + }; + }; + } +}; +const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-bac4a35d"]]); +wx.createPage(MiniProgramPage); +//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/register/register.js.map diff --git a/unpackage/dist/dev/mp-weixin/pages/register/register.json b/unpackage/dist/dev/mp-weixin/pages/register/register.json new file mode 100644 index 0000000..b0bfb9d --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/register/register.json @@ -0,0 +1,4 @@ +{ + "navigationBarTitleText": "注册", + "usingComponents": {} +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/register/register.wxml b/unpackage/dist/dev/mp-weixin/pages/register/register.wxml new file mode 100644 index 0000000..8be9237 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/register/register.wxml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/register/register.wxss b/unpackage/dist/dev/mp-weixin/pages/register/register.wxss new file mode 100644 index 0000000..823ebfc --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/register/register.wxss @@ -0,0 +1,97 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ +.logincontent.data-v-bac4a35d { + width: 100%; + height: 100vh; + background: #fff; +} +.logincontent .pwdbox.data-v-bac4a35d .u-form-item:nth-child(2) .u-form-item__body__left { + width: 180rpx !important; +} +.logincontent .smsbox.data-v-bac4a35d .u-form-item:first-child .u-form-item__body__left { + width: 180rpx !important; +} +.logincontent.data-v-bac4a35d .u-form-item__body__left__content__label { + font-size: 34rpx; + color: #000; +} +.logincontent .title.data-v-bac4a35d { + padding: 124rpx 0 64rpx 30rpx; + font-size: 46rpx; + font-stretch: normal; + letter-spacing: 2rpx; + color: #000000; +} +.logincontent.data-v-bac4a35d .u-form { + padding: 0 30rpx; +} +.logincontent .row.data-v-bac4a35d { + margin-top: 60rpx; + display: flex; + justify-content: space-between; + padding: 0 30rpx; +} +.logincontent .row .left.data-v-bac4a35d { + flex: 1; + color: #3cc7c0; + text-align: left; +} +.logincontent .row .right.data-v-bac4a35d { + flex: 1; + color: #666; + text-align: right; +} +.logincontent .row.data-v-bac4a35d .u-button--large .u-button__text { + font-size: 36rpx !important; +} +.logincontent .row .tip.data-v-bac4a35d { + color: #333333; + font-size: 26rpx; +} +.logincontent.data-v-bac4a35d .wrap { + border-radius: 16rpx; + overflow: hidden; + border: none; +} +.logincontent .line.data-v-bac4a35d { + padding: 0 30rpx; + margin-top: 10rpx; + color: #999999; + line-height: 44rpx; + font-size: 26rpx; + display: flex; + letter-spacing: 1px; +} +.logincontent .desc.data-v-bac4a35d { + padding: 0 30rpx; + color: #999999; + line-height: 44rpx; + font-size: 26rpx; + letter-spacing: 2rpx; +} +.logincontent .desc .red.data-v-bac4a35d { + color: red; +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/search/search.js b/unpackage/dist/dev/mp-weixin/pages/search/search.js new file mode 100644 index 0000000..a1ee195 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/search/search.js @@ -0,0 +1,628 @@ +"use strict"; +const common_vendor = require("../../common/vendor.js"); +const api_api = require("../../api/api.js"); +const common_assets = require("../../common/assets.js"); +const utils_navTo = require("../../utils/navTo.js"); +if (!Array) { + const _easycom_up__image2 = common_vendor.resolveComponent("up--image"); + const _easycom_up_radio2 = common_vendor.resolveComponent("up-radio"); + const _easycom_up_radio_group2 = common_vendor.resolveComponent("up-radio-group"); + const _easycom_up_dropdown_item2 = common_vendor.resolveComponent("up-dropdown-item"); + const _easycom_up_dropdown2 = common_vendor.resolveComponent("up-dropdown"); + const _easycom_up_icon2 = common_vendor.resolveComponent("up-icon"); + const _easycom_z_paging2 = common_vendor.resolveComponent("z-paging"); + const _easycom_u_icon2 = common_vendor.resolveComponent("u-icon"); + const _easycom_up_steps_item2 = common_vendor.resolveComponent("up-steps-item"); + const _easycom_up_steps2 = common_vendor.resolveComponent("up-steps"); + const _easycom_up_popup2 = common_vendor.resolveComponent("up-popup"); + (_easycom_up__image2 + _easycom_up_radio2 + _easycom_up_radio_group2 + _easycom_up_dropdown_item2 + _easycom_up_dropdown2 + _easycom_up_icon2 + _easycom_z_paging2 + _easycom_u_icon2 + _easycom_up_steps_item2 + _easycom_up_steps2 + _easycom_up_popup2)(); +} +const _easycom_up__image = () => "../../node-modules/uview-plus/components/u--image/u--image.js"; +const _easycom_up_radio = () => "../../node-modules/uview-plus/components/u-radio/u-radio.js"; +const _easycom_up_radio_group = () => "../../node-modules/uview-plus/components/u-radio-group/u-radio-group.js"; +const _easycom_up_dropdown_item = () => "../../node-modules/uview-plus/components/u-dropdown-item/u-dropdown-item.js"; +const _easycom_up_dropdown = () => "../../node-modules/uview-plus/components/u-dropdown/u-dropdown.js"; +const _easycom_up_icon = () => "../../node-modules/uview-plus/components/u-icon/u-icon.js"; +const _easycom_z_paging = () => "../../uni_modules/z-paging/components/z-paging/z-paging.js"; +const _easycom_u_icon = () => "../../node-modules/uview-plus/components/u-icon/u-icon.js"; +const _easycom_up_steps_item = () => "../../node-modules/uview-plus/components/u-steps-item/u-steps-item.js"; +const _easycom_up_steps = () => "../../node-modules/uview-plus/components/u-steps/u-steps.js"; +const _easycom_up_popup = () => "../../node-modules/uview-plus/components/u-popup/u-popup.js"; +if (!Math) { + (navBarSearch + _easycom_up__image + _easycom_up_radio + _easycom_up_radio_group + _easycom_up_dropdown_item + _easycom_up_dropdown + _easycom_up_icon + _easycom_z_paging + _easycom_u_icon + _easycom_up_steps_item + _easycom_up_steps + _easycom_up_popup)(); +} +const navBarSearch = () => "../../components/navBarSearch/navBarSearch.js"; +const _sfc_main = { + __name: "search", + setup(__props) { + const dataList = common_vendor.ref([]); + const total = common_vendor.ref(0); + const keyWord = common_vendor.ref(""); + const label_iden = common_vendor.ref(""); + const isArticle = common_vendor.ref(true); + const hospital_id = common_vendor.ref(""); + const hospital_name = common_vendor.ref(""); + const doctor_id = common_vendor.ref(""); + const doctor_name = common_vendor.ref(""); + const numInfo = common_vendor.reactive({}); + const searchInfo = common_vendor.reactive({}); + const freshKey = common_vendor.ref(0); + const navType = common_vendor.ref(""); + const navName = common_vendor.ref("肝胆相照临床病例库"); + const paging = common_vendor.ref(null); + const hideType = common_vendor.ref(false); + const dropTitle = common_vendor.ref("发布时间"); + const orderFilter = common_vendor.ref("1"); + const uDropdownRef = common_vendor.ref(null); + const isCase = common_vendor.ref(false); + const options = common_vendor.ref([ + { + label: "发布时间", + value: "1" + }, + { + label: "阅读次数", + value: "2" + } + ]); + const isSearch = common_vendor.ref(false); + const order = common_vendor.reactive({ + read_num: "", + push_date: "desc" + }); + const showCase = common_vendor.ref(false); + const canOpenCase = common_vendor.ref(false); + const caseValue1 = common_vendor.reactive({ + value: "", + name: "" + }); + const caseValue2 = common_vendor.reactive({ + value: "", + name: "" + }); + const caseValue3 = common_vendor.reactive({ + value: "", + name: "" + }); + const level = common_vendor.ref(1); + const labelObj = common_vendor.reactive({ + list1: [], + list2: [], + list3: [] + }); + const openCaseLevel = (lev) => { + freshKey.value++; + level.value = lev; + if (lev == 1) { + caseValue2.name = ""; + caseValue2.value = ""; + labelObj.list2 = []; + } else if (lev == 2) { + labelObj.list3 = []; + caseValue3.name = ""; + caseValue3.value = ""; + } + }; + const groupChange1 = (e) => { + caseValue1.value = e; + for (var i = 0; i < labelObj.list1.length; i++) { + if (labelObj.list1[i].app_iden == caseValue1.value) { + caseValue1.name = labelObj.list1[i].label_name; + break; + } + } + getCaseLabel(2, e); + }; + const groupChange2 = (e) => { + caseValue2.value = e; + for (var i = 0; i < labelObj.list2.length; i++) { + if (labelObj.list2[i].app_iden == caseValue2.value) { + caseValue2.name = labelObj.list2[i].label_name; + break; + } + } + getCaseLabel(3, e); + }; + const groupChange3 = (e) => { + caseValue3.value = e; + level.value = 3; + for (var i = 0; i < labelObj.list3.length; i++) { + if (labelObj.list3[i].app_iden == caseValue3.value) { + caseValue3.name = labelObj.list3[i].label_name; + break; + } + } + }; + const getCaseLabel = (lev, pid = 0) => { + api_api.api.getCaseLabel({ + pId: pid + }).then((res) => { + level.value = lev; + if (lev == 1) { + labelObj.list1 = res.data.data; + } else if (lev == 2) { + labelObj.list2 = res.data.data; + if (res.data.data.length == 0) { + level.value = 1; + } + } else if (lev == 3) { + labelObj.list3 = res.data.data; + if (res.data.data.length == 0) { + level.value = 2; + } + } + }); + }; + const openCase = () => { + showCase.value = true; + }; + const confirmCase = () => { + if (level.value == 1 && caseValue1.value == "") { + common_vendor.index.showToast({ title: "请选择疾病选项", icon: "none" }); + return false; + } + if (level.value == 1) { + label_iden.value = caseValue1.value; + } + if (level.value == 2) { + if (!caseValue2.value) { + label_iden.value = caseValue1.value; + } else { + label_iden.value = caseValue2.value; + } + } + if (level.value == 3) { + if (!caseValue3.value) { + label_iden.value = caseValue2.value; + } else { + label_iden.value = caseValue3.value; + } + } + paging.value.reload(); + showCase.value = false; + }; + const closeCase = () => { + showCase.value = false; + }; + const changeWord = (value) => { + keyWord.value = value; + isSearch.value = true; + paging.value.reload(); + }; + common_vendor.onLoad((options2) => { + if (options2.from == "home") { + isSearch.value = true; + } else if (options2.from == "myCase") { + navType.value = "myCase"; + } + if (options2.keyWord) { + keyWord.value = options2.keyWord; + } + if (options2.order == "new") { + order.push_date = "desc"; + hideType.value = true; + navName.value = "文章临床病例库"; + } + if (options2.order == "read") { + order.push_date = "desc"; + hideType.value = true; + navName.value = "文章临床病例库"; + } + if (options2.order == "video") { + isArticle.value = false; + } + if (options2.doctor_id) { + doctor_id.value = options2.doctor_id; + doctor_name.value = options2.doctor_name; + navName.value = doctor_name.value + "临床病例库"; + getStaticDoctor(doctor_id.value); + } + if (options2.hospital_id) { + hospital_id.value = options2.hospital_id; + hospital_name.value = options2.hospital_name; + navName.value = hospital_name.value + "临床病例库"; + getStaticHospital(hospital_id.value); + } + if (options2.case_id) { + label_iden.value = options2.case_id; + navName.value = options2.case_name + "临床病例库"; + getStaticSick(label_iden.value); + } else { + canOpenCase.value = true; + } + getCaseLabel(1, 0); + }); + common_vendor.onShow(() => { + var _a; + (_a = paging.value) == null ? void 0 : _a.refresh(); + }); + const changeDate = (e) => { + if (e == 1) { + order.push_date = "desc"; + order.read_num = ""; + dropTitle.value = "发布时间"; + } else { + order.push_date = ""; + order.read_num = "desc"; + dropTitle.value = "阅读次数"; + } + orderFilter.value = e; + uDropdownRef.value.close(); + paging.value.reload(); + }; + const formatdate = (date) => { + return common_vendor.dayjs(date).format("YYYY-MM-DD"); + }; + const goDetail = (id, isLink, src) => { + common_vendor.index.__f__("log", "at pages/search/search.vue:475", isLink); + if (isLink == 1) { + api_api.api.readRecord({ + type: isArticle.value ? 1 : 2, + id + }).then((res) => { + }); + utils_navTo.navTo({ + url: `/pages/web/web?src=${src}` + }); + } else { + let type = isArticle.value ? "article" : "video"; + utils_navTo.navTo({ + url: `/pages/detail/detail?id=${id}&type=${type}` + }); + } + }; + const swicthType = () => { + isArticle.value = !isArticle.value; + dataList.value = []; + paging.value.reload(); + }; + const searchArticle = (params) => { + let searchForm = { + keyword: keyWord.value, + hospital_id: hospital_id.value, + doctor_id: doctor_id.value, + label_iden: label_iden.value + }; + if (label_iden.value === "") { + delete searchForm.label_iden; + } + if (isSearch.value) { + searchForm.is_need_num = 1; + } + if (!order.read_num) { + delete order.read_num; + } + if (!order.push_date) { + delete order.push_date; + } + if (order.read_num || order.push_date) { + searchForm.order = order; + } + api_api.api.searchArticle({ + ...searchForm, + ...params + }).then((res) => { + paging.value.complete(res.data.data.data); + total.value = res.data.data.total; + searchInfo.search_video_num = res.data.data.search_video_num; + searchInfo.search_article_num = res.data.data.search_article_num; + }).catch((err) => { + paging.value.complete(false); + }); + }; + const searchVideo = async (params) => { + let searchForm = { + keyword: keyWord.value, + hospital_id: hospital_id.value, + doctor_id: doctor_id.value, + label_iden: label_iden.value + }; + if (label_iden.value === "") { + delete searchForm.label_iden; + } + if (isSearch.value) { + searchForm.is_need_num = 1; + } + if (!order.read_num) { + delete order.read_num; + } + if (!order.push_date) { + delete order.push_date; + } + if (order.read_num || order.push_date) { + searchForm.order = order; + } + api_api.api.searchVideo({ + ...searchForm, + ...params + }).then((res) => { + paging.value.complete(res.data.data.data); + total.value = res.data.data.total; + searchInfo.search_video_num = res.data.data.search_video_num; + searchInfo.search_article_num = res.data.data.search_article_num; + }).catch((err) => { + paging.value.complete(false); + }); + }; + const getStaticDoctor = (id) => { + api_api.api.getStaticDoctor(id).then((res) => { + let result = res.data.data; + if (result) { + Object.assign(numInfo, result); + } else { + Object.assign(numInfo, { + article_num: 0, + article_read_num: 0, + video_collect_num: 0, + video_num: 0, + video_read_num: 0 + }); + } + }); + }; + const getStaticSick = (id) => { + api_api.api.getStaticSick({ + label_iden: id + }).then((res) => { + let result = res.data.data; + if (result) { + Object.assign(numInfo, result); + } else { + Object.assign(numInfo, { + article_num: 0, + article_read_num: 0, + video_collect_num: 0, + video_num: 0, + video_read_num: 0 + }); + } + }); + }; + const getStaticHospital = (id) => { + api_api.api.getStaticHospital(id).then((res) => { + let result = res.data.data; + if (result) { + Object.assign(numInfo, result); + } else { + Object.assign(numInfo, { + article_num: 0, + article_read_num: 0, + video_collect_num: 0, + video_num: 0, + video_read_num: 0 + }); + } + }); + }; + const queryList = (pageNo, pageSize) => { + common_vendor.index.__f__("log", "at pages/search/search.vue:629", 666666); + const params = { + page: pageNo, + page_size: pageSize + }; + isArticle.value ? searchArticle(params) : searchVideo(params); + }; + return (_ctx, _cache) => { + return common_vendor.e({ + a: common_vendor.o(changeWord), + b: common_vendor.p({ + searchWord: keyWord.value, + navName: navName.value, + type: navType.value + }), + c: hospital_id.value || doctor_id.value || label_iden.value && !canOpenCase.value + }, hospital_id.value || doctor_id.value || label_iden.value && !canOpenCase.value ? { + d: common_vendor.t(numInfo.article_num), + e: common_vendor.t(numInfo.video_num), + f: common_vendor.t(numInfo.video_read_num + numInfo.article_read_num) + } : {}, { + g: isSearch.value + }, isSearch.value ? common_vendor.e({ + h: common_vendor.t(searchInfo.search_article_num), + i: !hideType.value + }, !hideType.value ? { + j: common_vendor.t(searchInfo.search_video_num) + } : {}, { + k: keyWord.value + }, keyWord.value ? { + l: common_vendor.t(keyWord.value) + } : {}) : {}, { + m: !hideType.value && !isCase.value + }, !hideType.value && !isCase.value ? { + n: common_vendor.t(!isArticle.value ? "视频" : "文章"), + o: common_vendor.p({ + src: common_vendor.unref(common_assets.switchImg), + width: "31rpx", + height: "31rpx" + }), + p: common_vendor.o(swicthType) + } : {}, { + q: canOpenCase.value + }, canOpenCase.value ? { + r: common_vendor.p({ + src: common_vendor.unref(common_assets.caseImg), + width: "31rpx", + height: "31rpx" + }), + s: label_iden.value ? 1 : "", + t: common_vendor.o(openCase) + } : {}, { + v: common_vendor.f(options.value, (item, k0, i0) => { + return { + a: "c10c040c-7-" + i0 + ",c10c040c-6", + b: common_vendor.p({ + activeColor: "#3CC7C0", + label: item.label, + name: item.value + }), + c: item.value, + d: common_vendor.n(orderFilter.value == item.value ? "active" : "") + }; + }), + w: common_vendor.o(changeDate), + x: common_vendor.o(($event) => orderFilter.value = $event), + y: common_vendor.p({ + iconPlacement: "right", + placement: "column", + modelValue: orderFilter.value + }), + z: common_vendor.p({ + title: dropTitle.value + }), + A: common_vendor.sr(uDropdownRef, "c10c040c-4,c10c040c-0", { + "k": "uDropdownRef" + }), + B: canOpenCase.value ? 1 : "", + C: hideType.value ? 1 : "", + D: isCase.value ? 1 : "", + E: common_vendor.f(dataList.value, (item, index, i0) => { + return common_vendor.e({ + a: common_vendor.t(isArticle.value ? item.article_title : item.video_title), + b: common_vendor.f(item.author, (tag, k1, i1) => { + return { + a: common_vendor.t(tag.doctor_name), + b: tag.author_id + }; + }), + c: "c10c040c-8-" + i0 + ",c10c040c-0", + d: common_vendor.t(item.read_num), + e: item.collect_num > 0 + }, item.collect_num > 0 ? { + f: "c10c040c-9-" + i0 + ",c10c040c-0", + g: common_vendor.p({ + name: "heart", + color: "#6B7280", + size: "28rpx" + }), + h: common_vendor.t(item.collect_num) + } : {}, { + i: "c10c040c-10-" + i0 + ",c10c040c-0", + j: common_vendor.t(formatdate(item.push_date)), + k: index, + l: common_vendor.o(($event) => isArticle.value ? goDetail(item.article_id, item.is_link, item.is_link_url) : goDetail(item.video_id, item.is_link, item.is_link_url), index) + }); + }), + F: common_vendor.p({ + name: "eye", + color: "#6B7280", + size: "28rpx" + }), + G: common_vendor.p({ + name: "clock", + color: "#6B7280", + size: "28rpx" + }), + H: common_vendor.sr(paging, "c10c040c-0", { + "k": "paging" + }), + I: common_vendor.o(queryList), + J: common_vendor.o(($event) => dataList.value = $event), + K: common_vendor.p({ + ["inside-more"]: true, + ["loading-more-no-more-text"]: "咱也是有底线的!", + ["auto-show-back-to-top"]: true, + modelValue: dataList.value + }), + L: common_vendor.o(closeCase), + M: common_vendor.o(confirmCase), + N: common_vendor.t(!caseValue1.name ? "请选择选项" : caseValue1.name), + O: common_vendor.p({ + name: "arrow-right" + }), + P: common_vendor.o(($event) => openCaseLevel("1")), + Q: caseValue1.name && labelObj.list2.length > 0 + }, caseValue1.name && labelObj.list2.length > 0 ? { + R: common_vendor.t(!caseValue2.name ? "请选择选项" : caseValue2.name), + S: common_vendor.p({ + name: "arrow-right" + }), + T: common_vendor.o(($event) => openCaseLevel("2")) + } : {}, { + U: caseValue2.name && labelObj.list3.length > 0 + }, caseValue2.name && labelObj.list3.length > 0 ? { + V: common_vendor.t(!caseValue3.name ? "请选择选项" : caseValue3.name), + W: common_vendor.p({ + name: "arrow-right" + }), + X: common_vendor.o(($event) => openCaseLevel("3")) + } : {}, { + Y: freshKey.value, + Z: common_vendor.p({ + current: level.value - 1, + direction: "column" + }), + aa: common_vendor.f(labelObj.list1, (item, k0, i0) => { + return { + a: "c10c040c-20-" + i0 + ",c10c040c-19", + b: common_vendor.p({ + activeColor: "#3CC7C0 ", + label: item.label_name, + name: item.app_iden + }), + c: item.app_iden + }; + }), + ab: common_vendor.o(groupChange1), + ac: common_vendor.o(($event) => caseValue1.value = $event), + ad: common_vendor.p({ + name: "group1", + iconPlacement: "right", + placement: "column", + modelValue: caseValue1.value + }), + ae: level.value == 1, + af: common_vendor.f(labelObj.list2, (item, k0, i0) => { + return { + a: "c10c040c-22-" + i0 + ",c10c040c-21", + b: common_vendor.p({ + activeColor: "#3CC7C0 ", + label: item.label_name, + name: item.app_iden + }), + c: item.app_iden + }; + }), + ag: common_vendor.o(groupChange2), + ah: common_vendor.o(($event) => caseValue2.value = $event), + ai: common_vendor.p({ + name: "group2", + iconPlacement: "right", + placement: "column", + modelValue: caseValue2.value + }), + aj: level.value == 2, + ak: common_vendor.f(labelObj.list3, (item, k0, i0) => { + return { + a: "c10c040c-24-" + i0 + ",c10c040c-23", + b: common_vendor.p({ + activeColor: "#3CC7C0 ", + label: item.label_name, + name: item.app_iden + }), + c: item.app_iden + }; + }), + al: common_vendor.o(groupChange3), + am: common_vendor.o(($event) => caseValue3.value = $event), + an: common_vendor.p({ + name: "group3", + iconPlacement: "right", + placement: "column", + modelValue: caseValue3.value + }), + ao: level.value == 3, + ap: common_vendor.o(closeCase), + aq: common_vendor.p({ + round: 10, + zIndex: "9", + closeOnClickOverlay: false, + show: showCase.value, + mode: "bottom" + }) + }); + }; + } +}; +const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-c10c040c"]]); +wx.createPage(MiniProgramPage); +//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/search/search.js.map diff --git a/unpackage/dist/dev/mp-weixin/pages/search/search.json b/unpackage/dist/dev/mp-weixin/pages/search/search.json new file mode 100644 index 0000000..a8a4ba8 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/search/search.json @@ -0,0 +1,18 @@ +{ + "navigationBarTitleText": "肝胆相照临床病例库", + "navigationStyle": "custom", + "usingComponents": { + "up--image": "../../node-modules/uview-plus/components/u--image/u--image", + "up-radio": "../../node-modules/uview-plus/components/u-radio/u-radio", + "up-radio-group": "../../node-modules/uview-plus/components/u-radio-group/u-radio-group", + "up-dropdown-item": "../../node-modules/uview-plus/components/u-dropdown-item/u-dropdown-item", + "up-dropdown": "../../node-modules/uview-plus/components/u-dropdown/u-dropdown", + "up-icon": "../../node-modules/uview-plus/components/u-icon/u-icon", + "z-paging": "../../uni_modules/z-paging/components/z-paging/z-paging", + "u-icon": "../../node-modules/uview-plus/components/u-icon/u-icon", + "up-steps-item": "../../node-modules/uview-plus/components/u-steps-item/u-steps-item", + "up-steps": "../../node-modules/uview-plus/components/u-steps/u-steps", + "up-popup": "../../node-modules/uview-plus/components/u-popup/u-popup", + "nav-bar-search": "../../components/navBarSearch/navBarSearch" + } +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/search/search.wxml b/unpackage/dist/dev/mp-weixin/pages/search/search.wxml new file mode 100644 index 0000000..b8a64b4 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/search/search.wxml @@ -0,0 +1 @@ +{{d}}文章{{e}}视频{{f}}阅读量检索到:{{h}}篇文章检索到:{{j}}个视频检索词:{{l}}{{n}}筛选{{item.a}}{{tag.a}}{{item.d}}{{item.h}}{{item.j}}取消确定{{N}}{{R}}{{V}} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/search/search.wxss b/unpackage/dist/dev/mp-weixin/pages/search/search.wxss new file mode 100644 index 0000000..159798f --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/search/search.wxss @@ -0,0 +1,384 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ +.dropcontent.data-v-c10c040c { + padding-top: 40rpx; + padding-bottom: 20rpx; + background-color: #fff; +} +.dropcontent.data-v-c10c040c .u-radio { + margin-bottom: 6px !important; + margin-top: 16px !important; +} +.dropcontent .column.data-v-c10c040c { + padding: 0 30rpx; + border-top: 2rpx solid #e5e7eb; +} +.dropcontent .column.data-v-c10c040c .u-radio__text { + color: #333 !important; +} +.dropcontent .column.active.data-v-c10c040c .u-radio__text { + color: #3CC7C0 !important; +} +.stepbox.data-v-c10c040c { + padding: 15rpx 30rpx; + border-bottom: 2rpx dotted #f3f4f6; +} +.stepbox.data-v-c10c040c .u-steps-item__content { + margin-top: -5rpx !important; +} +.stepbox .slot-content.data-v-c10c040c { + width: 100%; + margin-bottom: 25rpx; + justify-content: space-between; + align-items: center; + display: flex; +} +.bar.data-v-c10c040c { + width: 100%; + background: #f9fafb; + height: 20rpx; +} +.votepop .confirm.data-v-c10c040c { + margin: 39rpx 30rpx 0; + height: 92rpx; + background: #3cc7c0; + border-radius: 15rpx; + display: flex; + align-items: center; + font-size: 31rpx; + color: #ffffff; + justify-content: center; +} +.votepop .del.data-v-c10c040c { + margin: 30rpx 30rpx 30rpx; + height: 92rpx; + background: #fff; + border-radius: 15rpx; + font-size: 31rpx; + color: #666666; + display: flex; + align-items: center; + justify-content: center; +} +.votepop .tips.data-v-c10c040c { + margin-top: 30rpx; + font-size: 27rpx; + color: #9ca3af; + line-height: 38rpx; + padding: 0 30rpx; +} +.votepop .add.data-v-c10c040c { + margin: 0 30rpx; + display: flex; + align-items: center; + height: 92rpx; + justify-content: center; + background: #f5f5f5; + border-radius: 15rpx; + font-size: 31rpx; + color: #4b5563; +} +.votepop .add .desc.data-v-c10c040c { + margin-left: 10rpx; +} +.votepop .titlebox.data-v-c10c040c { + padding: 0 30rpx; + height: 86rpx; + display: flex; + align-items: center; + justify-content: space-between; + border-bottom: 2rpx solid #f3f4f6; +} +.votepop .titlebox .left.data-v-c10c040c { + font-size: 31rpx; + color: #4b5563; +} +.votepop .titlebox .right.data-v-c10c040c { + font-size: 31rpx; + color: #3cc7c0; +} +.votepop .votecon.data-v-c10c040c { + max-height: calc(100vh - 530rpx); + overflow-y: scroll; +} +.votepop .votecon .row.data-v-c10c040c { + display: flex; + align-items: center; +} +.votepop .votecon .row .iconbox.data-v-c10c040c { + margin-left: 15rpx; + align-items: center; +} +.votepop .votecon .titlebox.data-v-c10c040c { + border: none; + margin: 30rpx 0 20rpx; +} +.votepop .votecon .titlebox .title.data-v-c10c040c { + font-size: 31rpx; + color: #111827; +} +.votepop .votecon .titlebox .desc.data-v-c10c040c { + font-size: 27rpx; + color: #9ca3af; +} +.casepop.data-v-c10c040c { + display: flex; + flex-direction: column; + max-height: calc(100vh - 400rpx); +} +.casepop .continue.data-v-c10c040c { + color: #2878ff !important; +} +.casecon.data-v-c10c040c { + flex: 1; + max-height: calc(100vh - 800rpx); + overflow-y: scroll; + padding-top: 22rpx; + padding-bottom: 20rpx; + min-height: 350rpx; +} +.casecon.data-v-c10c040c .u-radio { + margin-bottom: 10px !important; + margin-top: 0px !important; +} +.casecon .column.data-v-c10c040c { + padding: 0 30rpx; + border-bottom: 2rpx solid #e5e7eb; +} +.databox.data-v-c10c040c { + height: 162rpx; + background: #ffffff; + display: flex; + margin-bottom: 20rpx; + justify-content: space-between; +} +.databox .cell.data-v-c10c040c { + flex: 1; + padding: 35rpx 0; + text-align: center; +} +.databox .cell .num.data-v-c10c040c { + font-size: 38rpx; + color: #3cc7c0; +} +.databox .cell .name.data-v-c10c040c { + margin-top: 18rpx; + font-size: 28rpx; + color: #4b5563; +} +.filterbox.data-v-c10c040c { + display: flex; + height: 128rpx; + align-items: center; + position: relative; +} +.filterbox.data-v-c10c040c .u-flex { + display: flex; + flex-direction: row; + overflow: hidden; +} +.filterbox.data-v-c10c040c .u-dropdown__menu { + background: #fff; + z-index: 1; + margin-left: 150rpx; +} +.filterbox.data-v-c10c040c .u-dropdown__menu__item__text { + font-size: 14px !important; + color: #3CC7C0 !important; +} +.filterbox.data-v-c10c040c .u-dropdown__menu__item { + height: 74rpx; + padding: 0 20rpx; + background: #F3F4F6; + border-radius: 15rpx; + flex: none; + margin-left: 60rpx; +} +.filterbox .type.data-v-c10c040c { + position: absolute; + left: 30rpx; + top: 24rpx; + color: #606266; + font-size: 14px; + display: flex; + justify-content: center; + align-items: center; + background: #F3F4F6; + border-radius: 15rpx; + height: 74rpx; + padding: 0 25rpx; + z-index: 2; +} +.filterbox .casesdown.data-v-c10c040c { + font-size: 14px; + color: #606266; + position: absolute; + left: 190rpx; + top: 24rpx; + display: flex; + justify-content: center; + align-items: center; + background: #F3F4F6; + border-radius: 15rpx; + height: 74rpx; + padding: 0 25rpx; + z-index: 2; +} +.filterbox.active.data-v-c10c040c { + display: flex; + height: 128rpx; + align-items: center; + position: relative; +} +.filterbox.active.data-v-c10c040c .u-flex { + display: flex; + flex-direction: row; + overflow: hidden; +} +.filterbox.active.data-v-c10c040c .u-dropdown__menu { + background: #fff; + z-index: 1; + margin-left: 330rpx; +} +.filterbox.active.data-v-c10c040c .u-dropdown__menu__item__text { + font-size: 14px !important; +} +.filterbox.active.data-v-c10c040c .u-dropdown__menu__item { + height: 74rpx; + padding: 0 20rpx; + background: #F3F4F6; + border-radius: 15rpx; + flex: none; + margin-left: 20rpx; +} +.filterbox.active .type.data-v-c10c040c { + position: absolute; + left: 30rpx; + top: 24rpx; + color: #606266; + font-size: 14px; + display: flex; + justify-content: center; + align-items: center; + background: #F3F4F6; + border-radius: 15rpx; + height: 74rpx; + padding: 0 25rpx; + z-index: 2; +} +.filterbox.active .casesdown.data-v-c10c040c { + font-size: 14px; + color: #606266; + position: absolute; + left: 190rpx; + top: 24rpx; + display: flex; + justify-content: center; + align-items: center; + background: #F3F4F6; + border-radius: 15rpx; + height: 74rpx; + padding: 0 25rpx; + z-index: 2; +} +.filterbox.on .casesdown.data-v-c10c040c { + left: 30rpx; +} +.filterbox.on.data-v-c10c040c .u-dropdown__menu { + background: #fff; + z-index: 1; + margin-left: 170rpx; +} +.filterbox.isCase.data-v-c10c040c .u-dropdown__menu { + background: #fff; + z-index: 1; + margin-left: -30rpx; +} +.u-page .deal.data-v-c10c040c { + margin-top: 20rpx; + display: flex; + color: #6b7280; + font-size: 24rpx; + justify-content: space-between; +} +.u-page .deal .left.data-v-c10c040c { + display: flex; + align-items: center; +} +.u-page .deal .collect.data-v-c10c040c { + display: flex; + align-items: center; +} +.u-page .deal .eyebox.data-v-c10c040c { + width: 160rpx; + display: flex; + align-items: center; +} +.u-page .deal .time.data-v-c10c040c { + display: flex; + align-items: center; +} +.u-page .deal .num.data-v-c10c040c { + margin-left: 8rpx; +} +.u-page .item.data-v-c10c040c { + border-bottom: 1rpx solid #f3f4f6; + padding: 30rpx; +} +.u-page .item .title.data-v-c10c040c { + font-size: 30rpx; + color: #111827; + line-height: 46rpx; +} +.u-page .tagsbox.data-v-c10c040c { + margin-top: 20rpx; + display: flex; + flex-wrap: wrap; +} +.u-page .tagsbox .tag.data-v-c10c040c { + padding: 0 10rpx; + margin-right: 16rpx; + height: 46rpx; + line-height: 46rpx; + text-align: center; + background: rgba(60, 199, 192, 0.1); + border-radius: 8rpx; + font-weight: 400; + font-size: 24rpx; + color: #3cc7c0; +} +.detail.data-v-c10c040c { + background: #f9f9f9; + padding: 12rpx 30rpx; +} +.detail .desc.data-v-c10c040c { + font-size: 26rpx; + color: #4b5563; + line-height: 40rpx; +} +.detail .red.data-v-c10c040c { + color: #FF0000; +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/searchList/searchList.js b/unpackage/dist/dev/mp-weixin/pages/searchList/searchList.js new file mode 100644 index 0000000..d04cf1d --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/searchList/searchList.js @@ -0,0 +1,280 @@ +"use strict"; +const common_vendor = require("../../common/vendor.js"); +const api_api = require("../../api/api.js"); +const utils_navTo = require("../../utils/navTo.js"); +const common_assets = require("../../common/assets.js"); +if (!Array) { + const _easycom_up_radio2 = common_vendor.resolveComponent("up-radio"); + const _easycom_up_radio_group2 = common_vendor.resolveComponent("up-radio-group"); + const _easycom_up_dropdown_item2 = common_vendor.resolveComponent("up-dropdown-item"); + const _easycom_up_dropdown2 = common_vendor.resolveComponent("up-dropdown"); + const _easycom_up__image2 = common_vendor.resolveComponent("up--image"); + const _easycom_z_paging2 = common_vendor.resolveComponent("z-paging"); + (_easycom_up_radio2 + _easycom_up_radio_group2 + _easycom_up_dropdown_item2 + _easycom_up_dropdown2 + _easycom_up__image2 + _easycom_z_paging2)(); +} +const _easycom_up_radio = () => "../../node-modules/uview-plus/components/u-radio/u-radio.js"; +const _easycom_up_radio_group = () => "../../node-modules/uview-plus/components/u-radio-group/u-radio-group.js"; +const _easycom_up_dropdown_item = () => "../../node-modules/uview-plus/components/u-dropdown-item/u-dropdown-item.js"; +const _easycom_up_dropdown = () => "../../node-modules/uview-plus/components/u-dropdown/u-dropdown.js"; +const _easycom_up__image = () => "../../node-modules/uview-plus/components/u--image/u--image.js"; +const _easycom_z_paging = () => "../../uni_modules/z-paging/components/z-paging/z-paging.js"; +if (!Math) { + (navBarSearch + _easycom_up_radio + _easycom_up_radio_group + _easycom_up_dropdown_item + _easycom_up_dropdown + _easycom_up__image + _easycom_z_paging)(); +} +const navBarSearch = () => "../../components/navBarSearch/navBarSearch.js"; +const _sfc_main = { + __name: "searchList", + setup(__props) { + const paging = common_vendor.ref(null); + const uDropdownRef = common_vendor.ref(null); + const dataList = common_vendor.ref([]); + const total = common_vendor.ref(0); + common_vendor.ref(""); + const keyWord = common_vendor.ref(""); + common_vendor.ref(true); + const type = common_vendor.ref("doctor"); + const navName = common_vendor.ref("医生临床病例库"); + const orderFilter = common_vendor.ref("1"); + const dropTitle = common_vendor.ref("更新时间"); + const option = common_vendor.ref([ + { + label: "更新时间", + value: "1" + }, + { + label: "医生名称", + value: "2" + }, + { + label: "病例数", + value: "3" + } + ]); + const order = common_vendor.reactive({ + push_date: "desc" + }); + common_vendor.onLoad((options) => { + if (options.type == "hospital") { + type.value = "hospital"; + option.value[1].label = "医院名称"; + } + common_vendor.index.__f__("log", "at pages/searchList/searchList.vue:142", type.value); + keyWord.value = options.name; + if (options.name) { + navName.value = options.name + "临床病例库"; + } + if ((options.name = "医生") && !options.id) { + keyWord.value = ""; + } + if (options.order == "new") { + order.push_date = "asc"; + } + if (options.order == "read") { + order.read_num = "desc"; + } + }); + common_vendor.onShow(() => { + var _a; + (_a = paging.value) == null ? void 0 : _a.refresh(); + }); + const change = (e) => { + if (e == 1) { + order.push_date = "desc"; + if (type.value == "hospital") { + order.hospital_name = ""; + } else { + order.doctor_name = ""; + } + order.article_num = ""; + dropTitle.value = "更新时间"; + } else if (e == 2) { + order.push_date = ""; + order.article_num = ""; + if (type.value == "hospital") { + order.hospital_name = "asc"; + dropTitle.value = "医院名称"; + } else { + order.doctor_name = "asc"; + dropTitle.value = "医生名称"; + } + } else if (e == 3) { + order.push_date = ""; + if (type.value == "hospital") { + order.hospital_name = ""; + } else { + order.doctor_name = ""; + } + order.article_num = "desc"; + dropTitle.value = "病例数"; + } + orderFilter.value = e; + uDropdownRef.value.close(); + paging.value.reload(); + }; + const formatdate = (date) => { + if (!date) + return common_vendor.dayjs().format("YYYY-MM-DD"); + return common_vendor.dayjs(date).format("YYYY-MM-DD"); + }; + const searchHospital = async (params) => { + let searchForm = { + hospital_name: keyWord.value + }; + if (!order.push_date) { + delete order.push_date; + } + if (!order.article_num) { + delete order.article_num; + } + if (!order.hospital_name) { + delete order.hospital_name; + } + if (order.push_date || order.article_num || order.hospital_name) { + searchForm.order = order; + } + api_api.api.searchHospital({ + ...searchForm, + ...params + }).then((res) => { + paging.value.complete(res.data.data.data); + total.value = res.data.data.total; + }).catch((err) => { + paging.value.complete(false); + }); + }; + const searchDoctor = async (params) => { + let searchForm = { + doctor_name: keyWord.value + }; + if (!order.push_date) { + delete order.push_date; + } + if (!order.article_num) { + delete order.article_num; + } + if (!order.doctor_name) { + delete order.doctor_name; + } + if (order.push_date || order.article_num || order.doctor_name) { + searchForm.order = order; + } + api_api.api.searchDoctor({ + ...searchForm, + ...params + }).then((res) => { + paging.value.complete(res.data.data.data); + total.value = res.data.data.total; + }).catch((err) => { + paging.value.complete(false); + }); + }; + const queryList = (pageNo, pageSize) => { + const params = { + page: pageNo, + page_size: pageSize + }; + type.value == "hospital" ? searchHospital(params) : searchDoctor(params); + }; + const goDetail = (id, name) => { + let url = ""; + if (type.value == "doctor") { + url = `/pages/search/search?doctor_id=${id}&doctor_name=${name}`; + } else { + url = `/pages/search/search?hospital_id=${id}&hospital_name=${name}`; + } + utils_navTo.navTo({ + url + }); + }; + const changeWord = (value) => { + common_vendor.index.__f__("log", "at pages/searchList/searchList.vue:331", value); + if (type.value == "hospital") { + navName.value = "医院临床病例库"; + order.hospital_name = ""; + } else { + navName.value = "医生临床病例库"; + order.doctor_name = ""; + } + keyWord.value = value; + dataList.value = []; + order.push_date = "desc"; + order.article_num = ""; + paging.value.reload(); + }; + return (_ctx, _cache) => { + return { + a: common_vendor.o(changeWord), + b: common_vendor.p({ + searchWord: keyWord.value, + navName: navName.value, + type: type.value + }), + c: common_vendor.f(option.value, (item, k0, i0) => { + return { + a: "5d2f7987-5-" + i0 + ",5d2f7987-4", + b: common_vendor.p({ + activeColor: "#3CC7C0", + label: item.label, + name: item.value + }), + c: item.value, + d: common_vendor.n(orderFilter.value == item.value ? "active" : "") + }; + }), + d: common_vendor.o(change), + e: common_vendor.o(($event) => orderFilter.value = $event), + f: common_vendor.p({ + iconPlacement: "right", + placement: "column", + modelValue: orderFilter.value + }), + g: common_vendor.p({ + title: dropTitle.value + }), + h: common_vendor.sr(uDropdownRef, "5d2f7987-2,5d2f7987-0", { + "k": "uDropdownRef" + }), + i: common_vendor.f(dataList.value, (item, index, i0) => { + return common_vendor.e(type.value == "hospital" ? { + a: common_vendor.t(item.basic_hospital.hospital_name) + } : { + b: common_vendor.t(item.case_clinical_doctor.doctor_name), + c: common_vendor.t(item.case_clinical_doctor.hospital_name) + }, { + d: common_vendor.f(item.author, (tag, k1, i1) => { + return { + a: common_vendor.t(tag.doctor_name), + b: tag.author_id + }; + }), + e: common_vendor.t(item.video_num + item.article_num), + f: "5d2f7987-6-" + i0 + ",5d2f7987-0", + g: common_vendor.t(formatdate(item.last_push_date)), + h: index, + i: common_vendor.o(($event) => type.value == "hospital" ? goDetail(item.basic_hospital.hospital_id, item.basic_hospital.hospital_name) : goDetail(item.case_clinical_doctor.doctor_id, item.case_clinical_doctor.doctor_name), index) + }); + }), + j: type.value == "hospital", + k: common_vendor.p({ + src: common_vendor.unref(common_assets.arrowrightImg), + width: "32rpx", + height: "32rpx" + }), + l: common_vendor.sr(paging, "5d2f7987-0", { + "k": "paging" + }), + m: common_vendor.o(queryList), + n: common_vendor.o(($event) => dataList.value = $event), + o: common_vendor.p({ + ["inside-more"]: true, + ["loading-more-no-more-text"]: "咱也是有底线的!", + ["auto-show-back-to-top"]: true, + modelValue: dataList.value + }) + }; + }; + } +}; +const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-5d2f7987"]]); +wx.createPage(MiniProgramPage); +//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/searchList/searchList.js.map diff --git a/unpackage/dist/dev/mp-weixin/pages/searchList/searchList.json b/unpackage/dist/dev/mp-weixin/pages/searchList/searchList.json new file mode 100644 index 0000000..e526357 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/searchList/searchList.json @@ -0,0 +1,13 @@ +{ + "navigationBarTitleText": "肝胆相照临床病例库", + "navigationStyle": "custom", + "usingComponents": { + "up-radio": "../../node-modules/uview-plus/components/u-radio/u-radio", + "up-radio-group": "../../node-modules/uview-plus/components/u-radio-group/u-radio-group", + "up-dropdown-item": "../../node-modules/uview-plus/components/u-dropdown-item/u-dropdown-item", + "up-dropdown": "../../node-modules/uview-plus/components/u-dropdown/u-dropdown", + "up--image": "../../node-modules/uview-plus/components/u--image/u--image", + "z-paging": "../../uni_modules/z-paging/components/z-paging/z-paging", + "nav-bar-search": "../../components/navBarSearch/navBarSearch" + } +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/searchList/searchList.wxml b/unpackage/dist/dev/mp-weixin/pages/searchList/searchList.wxml new file mode 100644 index 0000000..b660cdd --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/searchList/searchList.wxml @@ -0,0 +1 @@ +{{item.a}}{{item.b}}({{item.c}}){{tag.a}} 病例数:{{item.e}}更新时间:{{item.g}} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/searchList/searchList.wxss b/unpackage/dist/dev/mp-weixin/pages/searchList/searchList.wxss new file mode 100644 index 0000000..096ae58 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/searchList/searchList.wxss @@ -0,0 +1,192 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ +.dropcontent.data-v-5d2f7987 { + padding-top: 40rpx; + padding-bottom: 20rpx; + background-color: #fff; +} +.dropcontent.data-v-5d2f7987 .u-radio { + margin-bottom: 6px !important; + margin-top: 16px !important; +} +.dropcontent .column.data-v-5d2f7987 { + padding: 0 30rpx; + border-top: 2rpx solid #e5e7eb; +} +.dropcontent .column.data-v-5d2f7987 .u-radio__text { + color: #333 !important; +} +.dropcontent .column.active.data-v-5d2f7987 .u-radio__text { + color: #3CC7C0 !important; +} +.databox.data-v-5d2f7987 { + height: 162rpx; + background: #ffffff; + display: flex; + margin-bottom: 20rpx; + justify-content: space-between; +} +.databox .cell.data-v-5d2f7987 { + flex: 1; + padding: 35rpx 0; + text-align: center; +} +.databox .cell .num.data-v-5d2f7987 { + font-size: 38rpx; + color: #3cc7c0; +} +.databox .cell .name.data-v-5d2f7987 { + margin-top: 18rpx; + font-size: 28rpx; + color: #4b5563; +} +.listbox.data-v-5d2f7987 { + background: #F8F9FA; + overflow: hidden; +} +.filterbox.data-v-5d2f7987 { + display: flex; + height: 128rpx; + background: #fff; + border-bottom: 2rpx solid rgba(0, 0, 0, 0.08); + align-items: center; + position: relative; +} +.filterbox.data-v-5d2f7987 .u-dropdown__menu__item__text { + font-size: 14px !important; + color: #3CC7C0 !important; +} +.filterbox .type.data-v-5d2f7987 { + position: absolute; + left: 30rpx; + top: 24rpx; + display: flex; + justify-content: center; + align-items: center; + background: #F3F4F6; + border-radius: 15rpx; + height: 74rpx; + padding: 0 25rpx; + z-index: 2; +} +.u-page.data-v-5d2f7987 .z-paging-content-fixed { + background: #F8F9FA !important; +} +.u-page.data-v-5d2f7987 .u-flex { + display: flex; + flex-direction: row; + overflow: hidden; +} +.u-page.data-v-5d2f7987 .u-image { + background: none !important; +} +.u-page.data-v-5d2f7987 .u-dropdown__menu { + background: #fff; + z-index: 1; + margin-left: -30rpx; +} +.u-page.data-v-5d2f7987 .u-dropdown__menu__item { + height: 74rpx; + padding: 0 20rpx; + background: #F3F4F6; + border-radius: 15rpx; + flex: none; + margin-left: 60rpx; +} +.u-page .deal.data-v-5d2f7987 { + margin-top: 20rpx; + display: flex; + color: #6b7280; + background: #fff; + font-size: 24rpx; + justify-content: space-between; +} +.u-page .deal .left.data-v-5d2f7987 { + display: flex; + align-items: center; + font-size: 27rpx; +} +.u-page .deal .left .count.data-v-5d2f7987 { + display: flex; + align-items: center; +} +.u-page .deal .collect.data-v-5d2f7987 { + display: flex; + align-items: center; +} +.u-page .deal .eyebox.data-v-5d2f7987 { + width: 160rpx; + display: flex; + align-items: center; +} +.u-page .deal .time.data-v-5d2f7987 { + display: flex; + align-items: center; +} +.u-page .deal .num.data-v-5d2f7987 { + margin-left: 8rpx; +} +.u-page .item.data-v-5d2f7987 { + margin: 30rpx; + background: #fff; + padding: 30rpx; + box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.08); + border-radius: 23rpx; +} +.u-page .item .title.data-v-5d2f7987 { + font-size: 30rpx; + color: #111827; + line-height: 46rpx; +} +.u-page .tagsbox.data-v-5d2f7987 { + margin-top: 20rpx; + display: flex; + flex-wrap: wrap; +} +.u-page .tagsbox .tag.data-v-5d2f7987 { + padding: 0 10rpx; + margin-right: 16rpx; + height: 46rpx; + line-height: 46rpx; + text-align: center; + background: rgba(60, 199, 192, 0.1); + border-radius: 8rpx; + font-weight: 400; + font-size: 24rpx; + color: #3cc7c0; +} +.detail.data-v-5d2f7987 { + background: #f9f9f9; + padding: 12rpx 30rpx; +} +.detail .desc.data-v-5d2f7987 { + font-size: 26rpx; + color: #4b5563; + line-height: 40rpx; +} +.detail .red.data-v-5d2f7987 { + color: #FF0000; +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/sickList/sickList.js b/unpackage/dist/dev/mp-weixin/pages/sickList/sickList.js new file mode 100644 index 0000000..e4a0ecd --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/sickList/sickList.js @@ -0,0 +1,215 @@ +"use strict"; +const common_vendor = require("../../common/vendor.js"); +const api_api = require("../../api/api.js"); +const utils_navTo = require("../../utils/navTo.js"); +const common_assets = require("../../common/assets.js"); +if (!Array) { + const _easycom_up_radio2 = common_vendor.resolveComponent("up-radio"); + const _easycom_up_radio_group2 = common_vendor.resolveComponent("up-radio-group"); + const _easycom_up_dropdown_item2 = common_vendor.resolveComponent("up-dropdown-item"); + const _easycom_up_dropdown2 = common_vendor.resolveComponent("up-dropdown"); + const _easycom_up__image2 = common_vendor.resolveComponent("up--image"); + const _easycom_z_paging2 = common_vendor.resolveComponent("z-paging"); + (_easycom_up_radio2 + _easycom_up_radio_group2 + _easycom_up_dropdown_item2 + _easycom_up_dropdown2 + _easycom_up__image2 + _easycom_z_paging2)(); +} +const _easycom_up_radio = () => "../../node-modules/uview-plus/components/u-radio/u-radio.js"; +const _easycom_up_radio_group = () => "../../node-modules/uview-plus/components/u-radio-group/u-radio-group.js"; +const _easycom_up_dropdown_item = () => "../../node-modules/uview-plus/components/u-dropdown-item/u-dropdown-item.js"; +const _easycom_up_dropdown = () => "../../node-modules/uview-plus/components/u-dropdown/u-dropdown.js"; +const _easycom_up__image = () => "../../node-modules/uview-plus/components/u--image/u--image.js"; +const _easycom_z_paging = () => "../../uni_modules/z-paging/components/z-paging/z-paging.js"; +if (!Math) { + (navBarSearch + _easycom_up_radio + _easycom_up_radio_group + _easycom_up_dropdown_item + _easycom_up_dropdown + _easycom_up__image + _easycom_z_paging)(); +} +const navBarSearch = () => "../../components/navBarSearch/navBarSearch.js"; +const _sfc_main = { + __name: "sickList", + setup(__props) { + const paging = common_vendor.ref(null); + const uDropdownRef = common_vendor.ref(null); + const dataList = common_vendor.ref([]); + const total = common_vendor.ref(0); + common_vendor.ref(""); + const keyWord = common_vendor.ref(""); + common_vendor.ref(true); + const type = common_vendor.ref("doctor"); + const dropTitle = common_vendor.ref("更新时间"); + const navName = common_vendor.ref("疾病临床病例库"); + const orderFilter = common_vendor.ref("1"); + const options = common_vendor.ref([ + { + label: "更新时间", + value: "1" + }, + { + label: "疾病名称", + value: "2" + }, + { + label: "病例数", + value: "3" + } + ]); + const order = common_vendor.reactive({ + updated_at: "desc" + }); + common_vendor.onLoad((options2) => { + if (options2.type == "hospital") { + type.value = "hospital"; + } + keyWord.value = options2.name; + if (options2.name) { + navName.value = options2.name + "临床病例库"; + } + if ((options2.name = "医生") && !options2.id) { + keyWord.value = ""; + } + if (options2.order == "new") { + order.push_date = "asc"; + } + if (options2.order == "read") { + order.article_num = "desc"; + } + }); + common_vendor.onShow(() => { + var _a; + (_a = paging.value) == null ? void 0 : _a.refresh(); + }); + const changeDate = (e) => { + if (e == 1) { + order.updated_at = "desc"; + order.label_name = ""; + order.article_num = ""; + dropTitle.value = "更新时间"; + } else if (e == 2) { + order.updated_at = ""; + order.label_name = "asc"; + order.article_num = ""; + dropTitle.value = "疾病名称"; + } else if (e == 3) { + order.updated_at = ""; + order.label_name = ""; + order.article_num = "desc"; + dropTitle.value = "病例数"; + } + orderFilter.value = e; + uDropdownRef.value.close(); + paging.value.reload(); + }; + const formatdate = (date) => { + return common_vendor.dayjs(date).format("YYYY-MM-DD"); + }; + const searchList = async (params) => { + let searchForm = { + label_name: keyWord.value + }; + if (!order.article_num) { + delete order.article_num; + } + if (!order.updated_at) { + delete order.updated_at; + } + if (!order.label_name) { + delete order.label_name; + } + if (order.article_num || order.updated_at || order.label_name) { + searchForm.order = order; + } + api_api.api.getSearchLabel({ + ...searchForm, + ...params + }).then((res) => { + paging.value.complete(res.data.data.data); + total.value = res.data.data.total; + }).catch((err) => { + paging.value.complete(false); + }); + }; + const queryList = (pageNo, pageSize) => { + const params = { + page: pageNo, + page_size: pageSize + }; + searchList(params); + }; + const goDetail = (id, name) => { + let url = `/pages/search/search?case_id=${id}&case_name=${name}`; + utils_navTo.navTo({ + url + }); + }; + const changeWord = (value) => { + navName.value = "疾病临床病例库"; + keyWord.value = value; + dataList.value = []; + order.updated_at = "desc"; + order.article_num = ""; + order.label_name = ""; + paging.value.reload(); + }; + return (_ctx, _cache) => { + return { + a: common_vendor.o(changeWord), + b: common_vendor.p({ + searchWord: keyWord.value, + navName: navName.value, + type: "case" + }), + c: common_vendor.f(options.value, (item, k0, i0) => { + return { + a: "55f9e2cf-5-" + i0 + ",55f9e2cf-4", + b: common_vendor.p({ + activeColor: "#3CC7C0", + label: item.label, + name: item.value + }), + c: item.value, + d: common_vendor.n(orderFilter.value == item.value ? "active" : "") + }; + }), + d: common_vendor.o(changeDate), + e: common_vendor.o(($event) => orderFilter.value = $event), + f: common_vendor.p({ + iconPlacement: "right", + placement: "column", + modelValue: orderFilter.value + }), + g: common_vendor.p({ + title: dropTitle.value + }), + h: common_vendor.sr(uDropdownRef, "55f9e2cf-2,55f9e2cf-0", { + "k": "uDropdownRef" + }), + i: common_vendor.f(dataList.value, (item, index, i0) => { + return { + a: common_vendor.t(item.label_name), + b: common_vendor.t(item.video_num + item.article_num), + c: "55f9e2cf-6-" + i0 + ",55f9e2cf-0", + d: common_vendor.t(formatdate(item.last_push_date)), + e: index, + f: common_vendor.o(($event) => goDetail(item.label_iden, item.label_name), index) + }; + }), + j: common_vendor.p({ + src: common_vendor.unref(common_assets.arrowrightImg), + width: "32rpx", + height: "32rpx" + }), + k: common_vendor.sr(paging, "55f9e2cf-0", { + "k": "paging" + }), + l: common_vendor.o(queryList), + m: common_vendor.o(($event) => dataList.value = $event), + n: common_vendor.p({ + ["inside-more"]: true, + ["loading-more-no-more-text"]: "咱也是有底线的!", + ["auto-show-back-to-top"]: true, + modelValue: dataList.value + }) + }; + }; + } +}; +const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-55f9e2cf"]]); +wx.createPage(MiniProgramPage); +//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/sickList/sickList.js.map diff --git a/unpackage/dist/dev/mp-weixin/pages/sickList/sickList.json b/unpackage/dist/dev/mp-weixin/pages/sickList/sickList.json new file mode 100644 index 0000000..e526357 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/sickList/sickList.json @@ -0,0 +1,13 @@ +{ + "navigationBarTitleText": "肝胆相照临床病例库", + "navigationStyle": "custom", + "usingComponents": { + "up-radio": "../../node-modules/uview-plus/components/u-radio/u-radio", + "up-radio-group": "../../node-modules/uview-plus/components/u-radio-group/u-radio-group", + "up-dropdown-item": "../../node-modules/uview-plus/components/u-dropdown-item/u-dropdown-item", + "up-dropdown": "../../node-modules/uview-plus/components/u-dropdown/u-dropdown", + "up--image": "../../node-modules/uview-plus/components/u--image/u--image", + "z-paging": "../../uni_modules/z-paging/components/z-paging/z-paging", + "nav-bar-search": "../../components/navBarSearch/navBarSearch" + } +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/sickList/sickList.wxml b/unpackage/dist/dev/mp-weixin/pages/sickList/sickList.wxml new file mode 100644 index 0000000..557c21f --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/sickList/sickList.wxml @@ -0,0 +1 @@ +{{item.a}} 病例数:{{item.b}}更新时间:{{item.d}} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/sickList/sickList.wxss b/unpackage/dist/dev/mp-weixin/pages/sickList/sickList.wxss new file mode 100644 index 0000000..3ce707d --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/sickList/sickList.wxss @@ -0,0 +1,293 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ +.dropcontent.data-v-55f9e2cf { + padding-top: 40rpx; + padding-bottom: 20rpx; + background-color: #fff; +} +.dropcontent.data-v-55f9e2cf .u-radio { + margin-bottom: 6px !important; + margin-top: 16px !important; +} +.dropcontent .column.data-v-55f9e2cf { + padding: 0 30rpx; + border-top: 2rpx solid #e5e7eb; +} +.dropcontent .column.data-v-55f9e2cf .u-radio__text { + color: #333 !important; +} +.dropcontent .column.active.data-v-55f9e2cf .u-radio__text { + color: #3CC7C0 !important; +} +.votepop .confirm.data-v-55f9e2cf { + margin: 39rpx 30rpx 0; + height: 92rpx; + background: #3cc7c0; + border-radius: 15rpx; + display: flex; + align-items: center; + font-size: 31rpx; + color: #ffffff; + justify-content: center; +} +.votepop .del.data-v-55f9e2cf { + margin: 30rpx 30rpx 30rpx; + height: 92rpx; + background: #fff; + border-radius: 15rpx; + font-size: 31rpx; + color: #666666; + display: flex; + align-items: center; + justify-content: center; +} +.votepop .tips.data-v-55f9e2cf { + margin-top: 30rpx; + font-size: 27rpx; + color: #9ca3af; + line-height: 38rpx; + padding: 0 30rpx; +} +.votepop .add.data-v-55f9e2cf { + margin: 0 30rpx; + display: flex; + align-items: center; + height: 92rpx; + justify-content: center; + background: #f5f5f5; + border-radius: 15rpx; + font-size: 31rpx; + color: #4b5563; +} +.votepop .add .desc.data-v-55f9e2cf { + margin-left: 10rpx; +} +.votepop .titlebox.data-v-55f9e2cf { + padding: 0 30rpx; + height: 86rpx; + display: flex; + align-items: center; + justify-content: space-between; + border-bottom: 2rpx solid #f3f4f6; +} +.votepop .titlebox .left.data-v-55f9e2cf { + font-size: 31rpx; + color: #4b5563; +} +.votepop .titlebox .right.data-v-55f9e2cf { + font-size: 31rpx; + color: #3cc7c0; +} +.votepop .votecon.data-v-55f9e2cf { + max-height: calc(100vh - 530rpx); + overflow-y: scroll; +} +.votepop .votecon .row.data-v-55f9e2cf { + display: flex; + align-items: center; +} +.votepop .votecon .row .iconbox.data-v-55f9e2cf { + margin-left: 15rpx; + align-items: center; +} +.votepop .votecon .titlebox.data-v-55f9e2cf { + border: none; + margin: 30rpx 0 20rpx; +} +.votepop .votecon .titlebox .title.data-v-55f9e2cf { + font-size: 31rpx; + color: #111827; +} +.votepop .votecon .titlebox .desc.data-v-55f9e2cf { + font-size: 27rpx; + color: #9ca3af; +} +.casepop.data-v-55f9e2cf { + display: flex; + flex-direction: column; + max-height: calc(100vh - 400rpx); +} +.casepop .continue.data-v-55f9e2cf { + color: #2878ff !important; +} +.casecon.data-v-55f9e2cf { + flex: 1; + overflow-y: scroll; + padding-top: 10rpx; + min-height: 350rpx; +} +.casecon .column.data-v-55f9e2cf { + padding: 0 30rpx; + border-bottom: 2rpx solid #e5e7eb; +} +.databox.data-v-55f9e2cf { + height: 162rpx; + background: #ffffff; + display: flex; + margin-bottom: 20rpx; + justify-content: space-between; +} +.databox .cell.data-v-55f9e2cf { + flex: 1; + padding: 35rpx 0; + text-align: center; +} +.databox .cell .num.data-v-55f9e2cf { + font-size: 38rpx; + color: #3cc7c0; +} +.databox .cell .name.data-v-55f9e2cf { + margin-top: 18rpx; + font-size: 28rpx; + color: #4b5563; +} +.listbox.data-v-55f9e2cf { + background: #F8F9FA; + overflow: hidden; +} +.filterbox.data-v-55f9e2cf { + display: flex; + height: 128rpx; + background: #fff; + border-bottom: 2rpx solid rgba(0, 0, 0, 0.08); + align-items: center; + position: relative; +} +.filterbox .type.data-v-55f9e2cf { + position: absolute; + left: 30rpx; + top: 24rpx; + display: flex; + justify-content: center; + align-items: center; + background: #F3F4F6; + border-radius: 15rpx; + height: 74rpx; + padding: 0 25rpx; + z-index: 2; +} +.u-page.data-v-55f9e2cf .z-paging-content-fixed { + background: #F8F9FA !important; +} +.u-page.data-v-55f9e2cf .u-flex { + display: flex; + flex-direction: row; + overflow: hidden; +} +.u-page.data-v-55f9e2cf .u-image { + background: none !important; +} +.u-page.data-v-55f9e2cf .u-dropdown__menu { + background: #fff; + z-index: 1; + margin-left: 0rpx; +} +.u-page.data-v-55f9e2cf .u-dropdown__menu__item__text { + font-size: 14px !important; + color: #3CC7C0 !important; +} +.u-page.data-v-55f9e2cf .u-dropdown__menu__item { + height: 74rpx; + padding: 0 20rpx; + background: #F3F4F6; + border-radius: 15rpx; + flex: none; + margin-left: 30rpx; +} +.u-page .deal.data-v-55f9e2cf { + margin-top: 20rpx; + display: flex; + color: #6b7280; + background: #fff; + font-size: 24rpx; + justify-content: space-between; +} +.u-page .deal .left.data-v-55f9e2cf { + display: flex; + align-items: center; + font-size: 27rpx; +} +.u-page .deal .left .count.data-v-55f9e2cf { + display: flex; + align-items: center; +} +.u-page .deal .collect.data-v-55f9e2cf { + display: flex; + align-items: center; +} +.u-page .deal .eyebox.data-v-55f9e2cf { + width: 160rpx; + display: flex; + align-items: center; +} +.u-page .deal .time.data-v-55f9e2cf { + display: flex; + align-items: center; +} +.u-page .deal .num.data-v-55f9e2cf { + margin-left: 8rpx; +} +.u-page .item.data-v-55f9e2cf { + margin: 30rpx; + background: #fff; + padding: 30rpx; + box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.08); + border-radius: 23rpx; +} +.u-page .item .title.data-v-55f9e2cf { + font-size: 30rpx; + color: #111827; + line-height: 46rpx; +} +.u-page .tagsbox.data-v-55f9e2cf { + margin-top: 20rpx; + display: flex; + flex-wrap: wrap; +} +.u-page .tagsbox .tag.data-v-55f9e2cf { + padding: 0 10rpx; + margin-right: 16rpx; + height: 46rpx; + line-height: 46rpx; + text-align: center; + background: rgba(60, 199, 192, 0.1); + border-radius: 8rpx; + font-weight: 400; + font-size: 24rpx; + color: #3cc7c0; +} +.detail.data-v-55f9e2cf { + background: #f9f9f9; + padding: 12rpx 30rpx; +} +.detail .desc.data-v-55f9e2cf { + font-size: 26rpx; + color: #4b5563; + line-height: 40rpx; +} +.detail .red.data-v-55f9e2cf { + color: #FF0000; +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/specialList/specialList.js b/unpackage/dist/dev/mp-weixin/pages/specialList/specialList.js new file mode 100644 index 0000000..9633785 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/specialList/specialList.js @@ -0,0 +1,613 @@ +"use strict"; +const common_vendor = require("../../common/vendor.js"); +const common_assets = require("../../common/assets.js"); +const api_api = require("../../api/api.js"); +const utils_navTo = require("../../utils/navTo.js"); +if (!Array) { + const _easycom_navBarSearch2 = common_vendor.resolveComponent("navBarSearch"); + const _easycom_up__image2 = common_vendor.resolveComponent("up--image"); + const _easycom_up_radio2 = common_vendor.resolveComponent("up-radio"); + const _easycom_up_radio_group2 = common_vendor.resolveComponent("up-radio-group"); + const _easycom_up_dropdown_item2 = common_vendor.resolveComponent("up-dropdown-item"); + const _easycom_up_dropdown2 = common_vendor.resolveComponent("up-dropdown"); + const _easycom_up_icon2 = common_vendor.resolveComponent("up-icon"); + const _easycom_z_paging2 = common_vendor.resolveComponent("z-paging"); + const _easycom_u_icon2 = common_vendor.resolveComponent("u-icon"); + const _easycom_up_steps_item2 = common_vendor.resolveComponent("up-steps-item"); + const _easycom_up_steps2 = common_vendor.resolveComponent("up-steps"); + const _easycom_up_popup2 = common_vendor.resolveComponent("up-popup"); + const _easycom_up_overlay2 = common_vendor.resolveComponent("up-overlay"); + (_easycom_navBarSearch2 + _easycom_up__image2 + _easycom_up_radio2 + _easycom_up_radio_group2 + _easycom_up_dropdown_item2 + _easycom_up_dropdown2 + _easycom_up_icon2 + _easycom_z_paging2 + _easycom_u_icon2 + _easycom_up_steps_item2 + _easycom_up_steps2 + _easycom_up_popup2 + _easycom_up_overlay2)(); +} +const _easycom_navBarSearch = () => "../../components/navBarSearch/navBarSearch.js"; +const _easycom_up__image = () => "../../node-modules/uview-plus/components/u--image/u--image.js"; +const _easycom_up_radio = () => "../../node-modules/uview-plus/components/u-radio/u-radio.js"; +const _easycom_up_radio_group = () => "../../node-modules/uview-plus/components/u-radio-group/u-radio-group.js"; +const _easycom_up_dropdown_item = () => "../../node-modules/uview-plus/components/u-dropdown-item/u-dropdown-item.js"; +const _easycom_up_dropdown = () => "../../node-modules/uview-plus/components/u-dropdown/u-dropdown.js"; +const _easycom_up_icon = () => "../../node-modules/uview-plus/components/u-icon/u-icon.js"; +const _easycom_z_paging = () => "../../uni_modules/z-paging/components/z-paging/z-paging.js"; +const _easycom_u_icon = () => "../../node-modules/uview-plus/components/u-icon/u-icon.js"; +const _easycom_up_steps_item = () => "../../node-modules/uview-plus/components/u-steps-item/u-steps-item.js"; +const _easycom_up_steps = () => "../../node-modules/uview-plus/components/u-steps/u-steps.js"; +const _easycom_up_popup = () => "../../node-modules/uview-plus/components/u-popup/u-popup.js"; +const _easycom_up_overlay = () => "../../node-modules/uview-plus/components/u-overlay/u-overlay.js"; +if (!Math) { + (_easycom_navBarSearch + _easycom_up__image + _easycom_up_radio + _easycom_up_radio_group + _easycom_up_dropdown_item + _easycom_up_dropdown + _easycom_up_icon + _easycom_z_paging + _easycom_u_icon + _easycom_up_steps_item + _easycom_up_steps + _easycom_up_popup + _easycom_up_overlay)(); +} +const _sfc_main = { + __name: "specialList", + setup(__props) { + const user_id = common_vendor.ref(""); + const showModal = common_vendor.ref(false); + const showDeal = common_vendor.ref(false); + const is_selected = common_vendor.ref(0); + const isMine = common_vendor.ref(false); + const paging = common_vendor.ref(null); + const dataList = common_vendor.ref([]); + const total = common_vendor.ref(0); + const keyWord = common_vendor.ref(""); + const vote = common_vendor.ref(null); + const showNum = common_vendor.ref(false); + const label_iden = common_vendor.ref(""); + const dropTitle = common_vendor.ref("发布时间"); + const orderFilter = common_vendor.ref("1"); + const uDropdownRef = common_vendor.ref(null); + const dealId = common_vendor.ref(""); + const options = common_vendor.ref([ + { + label: "发布时间", + value: "1" + }, + { + label: "互动更新时间", + value: "2" + }, + { + label: "互动数", + value: "3" + } + ]); + common_vendor.ref(true); + const order = common_vendor.reactive({ + read_num: "", + push_date: "desc" + }); + const showCase = common_vendor.ref(false); + common_vendor.ref(false); + const freshKey = common_vendor.ref(0); + const caseValue1 = common_vendor.reactive({ + value: "", + name: "" + }); + const caseValue2 = common_vendor.reactive({ + value: "", + name: "" + }); + const caseValue3 = common_vendor.reactive({ + value: "", + name: "" + }); + const level = common_vendor.ref(1); + const labelObj = common_vendor.reactive({ + list1: [], + list2: [], + list3: [] + }); + const openCaseLevel = (lev) => { + freshKey.value++; + level.value = lev; + if (lev == 1) { + caseValue2.name = ""; + caseValue2.value = ""; + labelObj.list2 = []; + } else if (lev == 2) { + labelObj.list3 = []; + caseValue3.name = ""; + caseValue3.value = ""; + } + }; + const groupChange1 = (e) => { + caseValue1.value = e; + for (var i = 0; i < labelObj.list1.length; i++) { + if (labelObj.list1[i].app_iden == caseValue1.value) { + caseValue1.name = labelObj.list1[i].label_name; + break; + } + } + getCaseLabel(2, e); + }; + const groupChange2 = (e) => { + caseValue2.value = e; + for (var i = 0; i < labelObj.list2.length; i++) { + if (labelObj.list2[i].app_iden == caseValue2.value) { + caseValue2.name = labelObj.list2[i].label_name; + break; + } + } + getCaseLabel(3, e); + }; + const groupChange3 = (e) => { + caseValue3.value = e; + level.value = 3; + for (var i = 0; i < labelObj.list3.length; i++) { + if (labelObj.list3[i].app_iden == caseValue3.value) { + caseValue3.name = labelObj.list3[i].label_name; + break; + } + } + }; + const getCaseLabel = (lev, pid = 0) => { + api_api.api.getCaseLabel({ + pId: pid + }).then((res) => { + level.value = lev; + if (lev == 1) { + labelObj.list1 = res.data.data; + } else if (lev == 2) { + labelObj.list2 = res.data.data; + if (res.data.data.length == 0) { + level.value = 1; + } + } else if (lev == 3) { + labelObj.list3 = res.data.data; + if (res.data.data.length == 0) { + level.value = 2; + } + } + }); + }; + const openCase = () => { + showCase.value = true; + }; + const confirmCase = () => { + if (level.value == 1 && caseValue1.value == "") { + common_vendor.index.showToast({ title: "请选择疾病选项", icon: "none" }); + return false; + } + if (level.value == 1) { + label_iden.value = caseValue1.value; + } + if (level.value == 2) { + if (!caseValue2.value) { + label_iden.value = caseValue1.value; + } else { + label_iden.value = caseValue2.value; + } + } + if (level.value == 3) { + if (!caseValue3.value) { + label_iden.value = caseValue2.value; + } else { + label_iden.value = caseValue3.value; + } + } + paging.value.reload(); + showCase.value = false; + }; + const closeCase = () => { + showCase.value = false; + }; + const openDeal = (id, voteObj) => { + showDeal.value = true; + dealId.value = id; + vote.value = voteObj; + common_vendor.index.__f__("log", "at pages/specialList/specialList.vue:504", id); + }; + const alertDel = () => { + showDeal.value = false; + showModal.value = true; + }; + const goEdit = () => { + showDeal.value = false; + if (vote.value && vote.value.is_have_voted != 1) { + common_vendor.index.showToast({ + icon: "none", + title: "不可编辑" + }); + return false; + } + utils_navTo.navTo({ + url: "/pages/publish/publish?exchange_id=" + dealId.value + }); + }; + const htmlToText = (html) => { + return html.replace(/<[^>]*>/g, "").replace(/ /gi, " ").replace(//gi, "\n").replace(/]*>/gi, "").replace(/]*>[\s\S]*?/gi, ""); + }; + const confirmDel = () => { + api_api.api.delExchange(dealId.value).then((res) => { + common_vendor.index.showToast({ + title: "删除成功", + icon: "none", + duration: 2e3 + }); + }); + let index = dataList.value.findIndex((item) => item.exchange_id === dealId.value); + dataList.value.splice(index, 1); + showModal.value = false; + }; + const closeDealPop = () => { + showDeal.value = false; + }; + const formatdate = (date) => { + return common_vendor.dayjs(date).format("YYYY-MM-DD"); + }; + common_vendor.onLoad((options2) => { + if (options2.keyWord) { + keyWord.value = options2.keyWord; + } + if (options2.userId) { + user_id.value = options2.userId; + } + if (options2.is_selected) { + is_selected.value = options2.is_selected; + } + if (options2.type == "mine") { + isMine.value = true; + } + if (options2.from == "talkHome") { + showNum.value = true; + } + getCaseLabel(1, 0); + }); + common_vendor.onShow(() => { + var _a; + (_a = paging.value) == null ? void 0 : _a.refresh(); + }); + const changeDate = (e) => { + if (e == 1) { + order.push_date = "desc"; + order.comment_num = ""; + order.last_comment_time = ""; + dropTitle.value = "发布时间"; + } else if (e == 2) { + order.push_date = ""; + order.comment_num = ""; + order.last_comment_time = "desc"; + dropTitle.value = "互动更新时间"; + } else { + order.push_date = ""; + order.last_comment_time = ""; + order.comment_num = "desc"; + dropTitle.value = "互动数"; + } + orderFilter.value = e; + uDropdownRef.value.close(); + paging.value.reload(); + }; + const videoErrorCallback = (e) => { + common_vendor.index.showModal({ + content: e.target.errMsg, + showCancel: false + }); + }; + const changeWord = (val) => { + if (!val) + return false; + showNum.value = true; + keyWord.value = val; + paging.value.reload(); + }; + const goDetail = (id) => { + utils_navTo.navTo({ + url: `/pages/detail/detail?id=${id}&type=exchange` + }); + }; + const queryList = (pageNo, pageSize) => { + common_vendor.index.__f__("log", "at pages/specialList/specialList.vue:615", 666666); + const params = { + page: pageNo, + page_size: pageSize + }; + searchList(params); + }; + const searchList = async (params) => { + let searchForm = { + keyword: keyWord.value, + user_id: user_id.value, + label_iden: label_iden.value + }; + if (!label_iden.value) { + delete searchForm.label_iden; + } + if (Number(is_selected.value)) { + searchForm.is_selected = Number(is_selected.value); + } + if (!order.comment_num) { + delete order.comment_num; + } + if (!order.last_comment_time) { + delete order.last_comment_time; + } + if (!label_iden.value) { + delete searchForm.label_iden; + } + if (!order.push_date) { + delete order.push_date; + } + if (order.comment_num || order.push_date || order.last_comment_time) { + searchForm.order = order; + } + api_api.api.searchExchage({ + ...searchForm, + ...params + }).then((res) => { + paging.value.complete(res.data.data.data); + total.value = res.data.data.total; + }).catch((err) => { + paging.value.complete(false); + }); + }; + return (_ctx, _cache) => { + return common_vendor.e({ + a: common_vendor.o(changeWord), + b: common_vendor.p({ + searchWord: keyWord.value, + navName: "肝胆相照病例交流园地" + }), + c: showNum.value + }, showNum.value ? common_vendor.e({ + d: common_vendor.t(total.value), + e: keyWord.value + }, keyWord.value ? { + f: common_vendor.t(keyWord.value) + } : {}) : {}, { + g: common_vendor.p({ + src: common_vendor.unref(common_assets.caseImg), + width: "31rpx", + height: "31rpx" + }), + h: label_iden.value ? 1 : "", + i: common_vendor.o(openCase), + j: common_vendor.f(options.value, (item, k0, i0) => { + return { + a: "b2cb78f4-6-" + i0 + ",b2cb78f4-5", + b: common_vendor.p({ + activeColor: "#3CC7C0", + label: item.label, + name: item.value + }), + c: item.value, + d: common_vendor.n(orderFilter.value == item.value ? "active" : "") + }; + }), + k: common_vendor.o(changeDate), + l: common_vendor.o(($event) => orderFilter.value = $event), + m: common_vendor.p({ + iconPlacement: "right", + placement: "column", + modelValue: orderFilter.value + }), + n: common_vendor.p({ + title: dropTitle.value + }), + o: common_vendor.sr(uDropdownRef, "b2cb78f4-3,b2cb78f4-0", { + "k": "uDropdownRef" + }), + p: common_vendor.f(dataList.value, (item, k0, i0) => { + return common_vendor.e({ + a: common_vendor.t(item.exchange_title), + b: common_vendor.o(($event) => goDetail(item.exchange_id), item.exchange_id) + }, isMine.value ? { + c: common_vendor.o(($event) => openDeal(item.exchange_id, item.case_exchange_vote), item.exchange_id) + } : {}, { + d: "b2cb78f4-7-" + i0 + ",b2cb78f4-0", + e: common_vendor.p({ + src: item.avatar ? item.avatar : common_vendor.unref(common_assets.headImg), + width: "46rpx", + height: "46rpx", + radius: "50%" + }), + f: common_vendor.t(item.user_name), + g: common_vendor.t(item.hospital_name), + h: common_vendor.o(($event) => goDetail(item.exchange_id), item.exchange_id), + i: common_vendor.t(htmlToText(item.exchange_content)), + j: common_vendor.o(($event) => goDetail(item.exchange_id), item.exchange_id), + k: item.exchange_content_image && item.exchange_content_image.length > 0 + }, item.exchange_content_image && item.exchange_content_image.length > 0 ? { + l: common_vendor.f(item.exchange_content_image, (unit, k1, i1) => { + return { + a: "b2cb78f4-8-" + i0 + "-" + i1 + ",b2cb78f4-0", + b: common_vendor.p({ + src: unit, + radius: "10", + width: "220rpx", + height: "220rpx" + }) + }; + }), + m: common_vendor.o(($event) => goDetail(item.exchange_id), item.exchange_id) + } : {}, { + n: item.exchange_content_video && item.exchange_content_video.length > 0 + }, item.exchange_content_video && item.exchange_content_video.length > 0 ? { + o: common_vendor.f(item.exchange_content_video, (videoCell, index, i1) => { + return { + a: index, + b: videoCell, + c: common_vendor.o(videoErrorCallback, index) + }; + }), + p: common_vendor.o(($event) => goDetail(item.exchange_id), item.exchange_id) + } : {}, { + q: common_vendor.o(($event) => goDetail(item.exchange_id), item.exchange_id), + r: item.label && item.label.length > 0 + }, item.label && item.label.length > 0 ? { + s: common_vendor.f(item.label, (cell, k1, i1) => { + return { + a: common_vendor.t(cell.label_name), + b: cell.exchange_label_id + }; + }), + t: common_vendor.o(($event) => goDetail(item.exchange_id), item.exchange_id) + } : {}, { + v: "b2cb78f4-9-" + i0 + ",b2cb78f4-0", + w: common_vendor.t(item.read_num), + x: item.collect_num > 0 + }, item.collect_num > 0 ? { + y: "b2cb78f4-10-" + i0 + ",b2cb78f4-0", + z: common_vendor.p({ + name: "heart", + color: "#4B5563", + size: "28rpx" + }), + A: common_vendor.t(item.collect_num) + } : {}, { + B: item.comment_num > 0 + }, item.comment_num > 0 ? { + C: "b2cb78f4-11-" + i0 + ",b2cb78f4-0", + D: common_vendor.p({ + name: "chat", + color: "#4B5563", + size: "28rpx" + }), + E: common_vendor.t(item.comment_num) + } : {}, { + F: "b2cb78f4-12-" + i0 + ",b2cb78f4-0", + G: common_vendor.t(formatdate(item.push_date)), + H: common_vendor.o(($event) => goDetail(item.exchange_id), item.exchange_id), + I: item.exchange_id + }); + }), + q: isMine.value, + r: common_vendor.p({ + name: "eye", + color: "#4B5563", + size: "28rpx" + }), + s: common_vendor.p({ + name: "clock", + color: "#4B5563", + size: "28rpx" + }), + t: common_vendor.sr(paging, "b2cb78f4-0", { + "k": "paging" + }), + v: common_vendor.o(queryList), + w: common_vendor.o(($event) => dataList.value = $event), + x: common_vendor.p({ + ["inside-more"]: true, + ["loading-more-no-more-text"]: "咱也是有底线的!", + ["auto-show-back-to-top"]: true, + modelValue: dataList.value + }), + y: common_vendor.o(closeCase), + z: common_vendor.o(confirmCase), + A: common_vendor.t(!caseValue1.name ? "请选择选项" : caseValue1.name), + B: common_vendor.p({ + name: "arrow-right" + }), + C: common_vendor.o(($event) => openCaseLevel("1")), + D: caseValue1.name && labelObj.list2.length > 0 + }, caseValue1.name && labelObj.list2.length > 0 ? { + E: common_vendor.t(!caseValue2.name ? "请选择选项" : caseValue2.name), + F: common_vendor.p({ + name: "arrow-right" + }), + G: common_vendor.o(($event) => openCaseLevel("2")) + } : {}, { + H: caseValue2.name && labelObj.list3.length > 0 + }, caseValue2.name && labelObj.list3.length > 0 ? { + I: common_vendor.t(!caseValue3.name ? "请选择选项" : caseValue3.name), + J: common_vendor.p({ + name: "arrow-right" + }), + K: common_vendor.o(($event) => openCaseLevel("3")) + } : {}, { + L: freshKey.value, + M: common_vendor.p({ + current: level.value - 1, + direction: "column" + }), + N: common_vendor.f(labelObj.list1, (item, k0, i0) => { + return { + a: "b2cb78f4-22-" + i0 + ",b2cb78f4-21", + b: common_vendor.p({ + activeColor: "#3CC7C0 ", + label: item.label_name, + name: item.app_iden + }), + c: item.app_iden + }; + }), + O: common_vendor.o(groupChange1), + P: common_vendor.o(($event) => caseValue1.value = $event), + Q: common_vendor.p({ + name: "group1", + iconPlacement: "right", + placement: "column", + modelValue: caseValue1.value + }), + R: level.value == 1, + S: common_vendor.f(labelObj.list2, (item, k0, i0) => { + return { + a: "b2cb78f4-24-" + i0 + ",b2cb78f4-23", + b: common_vendor.p({ + activeColor: "#3CC7C0 ", + label: item.label_name, + name: item.app_iden + }), + c: item.app_iden + }; + }), + T: common_vendor.o(groupChange2), + U: common_vendor.o(($event) => caseValue2.value = $event), + V: common_vendor.p({ + name: "group2", + iconPlacement: "right", + placement: "column", + modelValue: caseValue2.value + }), + W: level.value == 2, + X: common_vendor.f(labelObj.list3, (item, k0, i0) => { + return { + a: "b2cb78f4-26-" + i0 + ",b2cb78f4-25", + b: common_vendor.p({ + activeColor: "#3CC7C0 ", + label: item.label_name, + name: item.app_iden + }), + c: item.app_iden + }; + }), + Y: common_vendor.o(groupChange3), + Z: common_vendor.o(($event) => caseValue3.value = $event), + aa: common_vendor.p({ + name: "group3", + iconPlacement: "right", + placement: "column", + modelValue: caseValue3.value + }), + ab: level.value == 3, + ac: common_vendor.o(closeCase), + ad: common_vendor.p({ + round: 10, + zIndex: "9", + closeOnClickOverlay: false, + show: showCase.value, + mode: "bottom" + }), + ae: common_vendor.o(goEdit), + af: common_vendor.o(alertDel), + ag: common_vendor.o(closeDealPop), + ah: common_vendor.p({ + zIndex: 60, + overlayStyle: { + zIndex: 59 + }, + show: showDeal.value, + round: 10, + mode: "bottom" + }), + ai: common_vendor.o(($event) => showModal.value = false), + aj: common_vendor.o(confirmDel), + ak: common_vendor.p({ + show: showModal.value, + ["mask-click-able"]: true + }) + }); + }; + } +}; +const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-b2cb78f4"]]); +wx.createPage(MiniProgramPage); +//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/specialList/specialList.js.map diff --git a/unpackage/dist/dev/mp-weixin/pages/specialList/specialList.json b/unpackage/dist/dev/mp-weixin/pages/specialList/specialList.json new file mode 100644 index 0000000..dedc48f --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/specialList/specialList.json @@ -0,0 +1,19 @@ +{ + "navigationBarTitleText": "肝胆相照临床病例库", + "navigationStyle": "custom", + "usingComponents": { + "nav-bar-search": "../../components/navBarSearch/navBarSearch", + "up--image": "../../node-modules/uview-plus/components/u--image/u--image", + "up-radio": "../../node-modules/uview-plus/components/u-radio/u-radio", + "up-radio-group": "../../node-modules/uview-plus/components/u-radio-group/u-radio-group", + "up-dropdown-item": "../../node-modules/uview-plus/components/u-dropdown-item/u-dropdown-item", + "up-dropdown": "../../node-modules/uview-plus/components/u-dropdown/u-dropdown", + "up-icon": "../../node-modules/uview-plus/components/u-icon/u-icon", + "z-paging": "../../uni_modules/z-paging/components/z-paging/z-paging", + "u-icon": "../../node-modules/uview-plus/components/u-icon/u-icon", + "up-steps-item": "../../node-modules/uview-plus/components/u-steps-item/u-steps-item", + "up-steps": "../../node-modules/uview-plus/components/u-steps/u-steps", + "up-popup": "../../node-modules/uview-plus/components/u-popup/u-popup", + "up-overlay": "../../node-modules/uview-plus/components/u-overlay/u-overlay" + } +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/specialList/specialList.wxml b/unpackage/dist/dev/mp-weixin/pages/specialList/specialList.wxml new file mode 100644 index 0000000..984b9f8 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/specialList/specialList.wxml @@ -0,0 +1 @@ +检索到:{{d}}个病例检索词:{{f}}筛选{{item.a}}...{{item.f}}({{item.g}}){{item.i}}加载失败{{cell.a}}{{item.w}}{{item.A}}{{item.E}}{{item.G}}取消确定{{A}}{{E}}{{I}}编辑删除取消提示 是否删除该交流病例? 取消确定 \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/specialList/specialList.wxss b/unpackage/dist/dev/mp-weixin/pages/specialList/specialList.wxss new file mode 100644 index 0000000..57ab904 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/specialList/specialList.wxss @@ -0,0 +1,547 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ +.dropcontent.data-v-b2cb78f4 { + padding-top: 40rpx; + padding-bottom: 20rpx; + background-color: #fff; +} +.dropcontent.data-v-b2cb78f4 .u-radio { + margin-bottom: 6px !important; + margin-top: 16px !important; +} +.dropcontent .column.data-v-b2cb78f4 { + padding: 0 30rpx; + border-top: 2rpx solid #e5e7eb; +} +.dropcontent .column.data-v-b2cb78f4 .u-radio__text { + color: #333 !important; +} +.dropcontent .column.active.data-v-b2cb78f4 .u-radio__text { + color: #3CC7C0 !important; +} +.stepbox.data-v-b2cb78f4 { + padding: 15rpx 30rpx; + border-bottom: 2rpx dotted #f3f4f6; +} +.stepbox.data-v-b2cb78f4 .u-steps-item__content { + margin-top: -5rpx !important; +} +.stepbox .slot-content.data-v-b2cb78f4 { + width: 100%; + margin-bottom: 25rpx; + justify-content: space-between; + align-items: center; + display: flex; +} +.dealbox .dealcell.data-v-b2cb78f4 { + display: flex; + align-items: center; + justify-content: center; + height: 112rpx; + font-size: 32rpx; + color: rgba(0, 0, 0, 0.9); + border-bottom: 2rpx solid #efefef; +} +.filterbox.data-v-b2cb78f4 { + display: flex; + height: 128rpx; + align-items: center; + position: relative; + border-bottom: 2rpx solid #f3f4f6; +} +.filterbox.data-v-b2cb78f4 .u-dropdown__menu__item__text { + font-size: 14px !important; + color: #3CC7C0 !important; +} +.filterbox .type.data-v-b2cb78f4 { + color: #606266; + font-size: 14px; + position: absolute; + left: 30rpx; + top: 24rpx; + display: flex; + justify-content: center; + align-items: center; + background: #F3F4F6; + border-radius: 15rpx; + height: 74rpx; + padding: 0 25rpx; + z-index: 2; +} +.detail.data-v-b2cb78f4 { + background: #f9f9f9; + padding: 12rpx 30rpx; +} +.detail .desc.data-v-b2cb78f4 { + font-size: 26rpx; + color: #4b5563; + line-height: 40rpx; +} +.detail .red.data-v-b2cb78f4 { + color: #ff0000; +} +.upage.data-v-b2cb78f4 { + display: flex; + flex-direction: column; + height: calc(100vh - 100rpx); +} +.upage.data-v-b2cb78f4 .u-flex { + display: flex; + flex-direction: row; + overflow: hidden; +} +.upage.data-v-b2cb78f4 .u-dropdown__menu { + background: #fff; + z-index: 1; + margin-left: 160rpx; +} +.upage.data-v-b2cb78f4 .u-dropdown__menu__item { + height: 74rpx; + padding: 0 20rpx; + background: #F3F4F6; + border-radius: 15rpx; + flex: none; + margin-left: 30rpx; +} +.box.data-v-b2cb78f4 { + flex: 1; + padding-bottom: 30rpx; + overflow-y: scroll; +} +.myVideo.data-v-b2cb78f4 { + width: 100%; + border-radius: 15rpx; +} +.deal.data-v-b2cb78f4 { + padding-top: 20rpx; + display: flex; + color: #4b5563; + font-size: 24rpx; + justify-content: space-between; +} +.deal .left.data-v-b2cb78f4 { + display: flex; + align-items: center; +} +.deal .left .item.data-v-b2cb78f4 { + width: 100rpx; +} +.deal .collect.data-v-b2cb78f4 { + display: flex; + align-items: center; +} +.deal .eyebox.data-v-b2cb78f4, +.deal .chat.data-v-b2cb78f4 { + display: flex; + align-items: center; +} +.deal .time.data-v-b2cb78f4 { + display: flex; + align-items: center; +} +.deal .num.data-v-b2cb78f4 { + margin-left: 8rpx; +} +.tagbox.data-v-b2cb78f4 { + margin-top: 24rpx; + display: flex; +} +.tagbox .tag.data-v-b2cb78f4 { + height: 54rpx; + padding: 0 28rpx; + background: #ecfaf9; + border-radius: 30rpx; + font-size: 27rpx; + color: #3cc7c0; + margin-right: 12rpx; + display: flex; + align-items: center; + justify-content: center; +} +.doctor.data-v-b2cb78f4 { + display: flex; + align-items: center; +} +.record.data-v-b2cb78f4 { + padding-top: 0rpx; +} +.record .list.data-v-b2cb78f4 { + margin: 30rpx 30rpx; +} +.record .list .name.data-v-b2cb78f4 { + padding: 20rpx 0 20rpx 15rpx; + font-size: 27rpx; + color: #333333; +} +.record .list .content.data-v-b2cb78f4 { + font-size: 27rpx; + color: #666666; + line-height: 38rpx; +} +.record .list .imgbox.data-v-b2cb78f4 { + display: flex; + margin-top: 24rpx; +} +.record .list .imgbox .imgcell.data-v-b2cb78f4 { + width: 220rpx; + height: 220rpx; + margin-right: 20rpx; +} +.record .list .imgbox .imgcell.data-v-b2cb78f4:last-child { + margin-right: 0; +} +.record.data-v-b2cb78f4 { + padding-top: 0rpx; +} +.record .list.data-v-b2cb78f4 { + margin: 8rpx 0rpx 0; +} +.record .list .cell.data-v-b2cb78f4 { + padding: 22rpx 30rpx; + border-bottom: 2rpx solid #f3f4f6; +} +.record .list .cell .circle.data-v-b2cb78f4 { + margin-top: 15rpx; + width: 15rpx; + height: 15rpx; + background: #3cc7c0; + border-radius: 50%; +} +.record .list .cell .title.data-v-b2cb78f4 { + margin-left: 10rpx; + font-size: 32rpx; + color: #000000; + line-height: 46rpx; + display: flex; + justify-content: space-between; + align-items: center; +} +.record .list .cell .title .dot.data-v-b2cb78f4 { + height: 40rpx; + display: flex; + align-items: center; + line-height: 40rpx; +} +.record .list .cell .title .titlecon.data-v-b2cb78f4 { + flex: 1; + margin-right: 20rpx; +} +.record .list .cell.data-v-b2cb78f4:last-child { + border-bottom: none; +} +.titlebox.data-v-b2cb78f4 { + margin: 0 30rpx; + display: flex; + justify-content: space-between; +} +.titlebox .more.data-v-b2cb78f4 { + display: flex; + align-items: center; +} +.titlebox .more .morename.data-v-b2cb78f4 { + margin-right: 10rpx; + font-size: 28rpx; + color: #3cc7c0; +} +.bar.data-v-b2cb78f4 { + height: 16rpx; + background: #f3f4f6; +} +.databox.data-v-b2cb78f4 { + height: 162rpx; + background: #ffffff; + display: flex; + padding: 0 30rpx; + justify-content: space-between; +} +.databox .cell.data-v-b2cb78f4 { + flex: 1; + padding: 35rpx 0; + text-align: center; +} +.databox .cell .num.data-v-b2cb78f4 { + font-size: 38rpx; + color: #3cc7c0; +} +.databox .cell .name.data-v-b2cb78f4 { + margin-top: 18rpx; + font-size: 28rpx; + color: #4b5563; +} +.casesdown.data-v-b2cb78f4 { + font-size: 14px; + color: #606266; + position: absolute; + left: 30rpx; + top: 24rpx; + display: flex; + justify-content: center; + align-items: center; + background: #F3F4F6; + border-radius: 15rpx; + height: 74rpx; + padding: 0 25rpx; + z-index: 2; +} +.votepop .confirm.data-v-b2cb78f4 { + margin: 39rpx 30rpx 0; + height: 92rpx; + background: #3cc7c0; + border-radius: 15rpx; + display: flex; + align-items: center; + font-size: 31rpx; + color: #ffffff; + justify-content: center; +} +.votepop .del.data-v-b2cb78f4 { + margin: 30rpx 30rpx 30rpx; + height: 92rpx; + background: #fff; + border-radius: 15rpx; + font-size: 31rpx; + color: #666666; + display: flex; + align-items: center; + justify-content: center; +} +.votepop .tips.data-v-b2cb78f4 { + margin-top: 30rpx; + font-size: 27rpx; + color: #9ca3af; + line-height: 38rpx; + padding: 0 30rpx; +} +.votepop .add.data-v-b2cb78f4 { + margin: 0 30rpx; + display: flex; + align-items: center; + height: 92rpx; + justify-content: center; + background: #f5f5f5; + border-radius: 15rpx; + font-size: 31rpx; + color: #4b5563; +} +.votepop .add .desc.data-v-b2cb78f4 { + margin-left: 10rpx; +} +.votepop .titlebox.data-v-b2cb78f4 { + padding: 0 30rpx; + margin: 0 !important; + height: 86rpx; + display: flex; + align-items: center; + justify-content: space-between; + border-bottom: 2rpx solid #f3f4f6; +} +.votepop .titlebox .left.data-v-b2cb78f4 { + font-size: 31rpx; + color: #4b5563; +} +.votepop .titlebox .right.data-v-b2cb78f4 { + font-size: 31rpx; + color: #3cc7c0; +} +.votepop .votecon.data-v-b2cb78f4 { + max-height: calc(100vh - 530rpx); + overflow-y: scroll; +} +.votepop .votecon .row.data-v-b2cb78f4 { + display: flex; + align-items: center; +} +.votepop .votecon .row .iconbox.data-v-b2cb78f4 { + margin-left: 15rpx; + align-items: center; +} +.votepop .votecon .titlebox.data-v-b2cb78f4 { + border: none; + margin: 30rpx 0 20rpx !important; +} +.votepop .votecon .titlebox .title.data-v-b2cb78f4 { + font-size: 31rpx; + color: #111827; +} +.votepop .votecon .titlebox .desc.data-v-b2cb78f4 { + font-size: 27rpx; + color: #9ca3af; +} +.casepop.data-v-b2cb78f4 { + display: flex; + flex-direction: column; + max-height: calc(100vh - 400rpx); +} +.casepop .continue.data-v-b2cb78f4 { + color: #2878ff !important; +} +.casecon.data-v-b2cb78f4 { + flex: 1; + max-height: calc(100vh - 800rpx); + overflow-y: scroll; + padding-top: 22rpx; + padding-bottom: 20rpx; + min-height: 350rpx; +} +.casecon.data-v-b2cb78f4 .u-radio { + margin-bottom: 10px !important; + margin-top: 0px !important; +} +.casecon .column.data-v-b2cb78f4 { + padding: 0 30rpx; + border-bottom: 2rpx solid #e5e7eb; +} +.zanboxpop.data-v-b2cb78f4 { + display: flex; + align-items: center; + justify-content: center; + height: 100%; +} +.zanboxpop .zanwraper.data-v-b2cb78f4 { + width: 630rpx; + margin: 0 auto; + padding-bottom: 50rpx; + background: #f5f6f9; + border-radius: 16rpx; +} +.zanboxpop .zanwraper .title.data-v-b2cb78f4 { + margin-top: 48rpx; + text-align: center; + font-weight: 500; + font-size: 36rpx; + color: rgba(0, 0, 0, 0.85); +} +.zanboxpop .zanwraper .content.data-v-b2cb78f4 { + padding: 30rpx 0; + background: #f5f6f9; + text-align: center; +} +.zanboxpop .zanwraper .content.data-v-b2cb78f4 .imgstyle { + max-width: 100% !important; +} +.zanboxpop .zanwraper .content.data-v-b2cb78f4 ._block { + text-align: left !important; +} +.zanboxpop .zanwraper .count.data-v-b2cb78f4 { + margin-top: 24rpx; + display: flex; + align-items: center; + text-align: center; + justify-content: center; + font-weight: 400; + font-size: 28rpx; + color: rgba(0, 0, 0, 0.65); +} +.zanboxpop .zanwraper .count .num.data-v-b2cb78f4 { + color: #ff0000; + font-size: 32rpx; +} +.zanboxpop .zanwraper .count .earn.data-v-b2cb78f4 { + font-size: 32rpx; + color: #3cc7c0; +} +.zanboxpop .zanwraper .countbox.data-v-b2cb78f4 { + display: flex; + width: 100%; + margin: 30rpx 0px 40rpx; + padding: 0 40rpx; + justify-content: center; + box-sizing: border-box; +} +.zanboxpop .zanwraper .countbox .minus.data-v-b2cb78f4 { + flex-shrink: 0; + margin-left: 10rp; + width: 90rpx; + height: 90rpx; + font-size: 60rpx; + color: #333; + display: flex; + justify-content: center; + align-items: center; + background: #ffffff; + border-radius: 12rpx; + border: 2rpx solid #e9e9e9; +} +.zanboxpop .zanwraper .countbox .add.data-v-b2cb78f4 { + flex-shrink: 0; + width: 90rpx; + margin-left: 10rpx; + height: 90rpx; + font-size: 60rpx; + color: #333; + display: flex; + justify-content: center; + align-items: center; + color: #fff; + background: #3cc7c0; + border-radius: 12rpx; + border: 2rpx solid #3cc7c0; +} +.zanboxpop .zanwraper .countbox.data-v-b2cb78f4 .u-input__content__field-wrapper__field { + height: 60rpx; + font-size: 34rpx !important; + text-align: center !important; +} +.zanboxpop .zanwraper .countbox.data-v-b2cb78f4 .u-input { + background: #f2f2f2; + width: 200rpx !important; + flex: none; +} +.zanboxpop .zanwraper .countbox.data-v-b2cb78f4 .u-input--radius { + border-radius: 24rrpx; +} +.zanboxpop .zanwraper .btnbox.data-v-b2cb78f4 { + margin: 0px 40rpx 0px; + display: flex; + justify-content: space-between; +} +.zanboxpop .zanwraper .btnbox .cancle.data-v-b2cb78f4 { + color: rgba(0, 0, 0, 0.3); + width: 256rpx; + height: 88rpx; + background: #f5f6f9; + border-radius: 25px; + border: 2rpx solid rgba(0, 0, 0, 0.15); + font-weight: 500; + font-size: 32rpx; + color: rgba(0, 0, 0, 0.85); + display: flex; + justify-content: center; + align-items: center; +} +.zanboxpop .zanwraper .btnbox .ok.data-v-b2cb78f4 { + color: #fff; + width: 256rpx; + height: 88rpx; + background: #3cc7c0; + border-radius: 25px; + border: 2rpx solid #3cc7c0; + font-weight: 500; + font-size: 32rpx; + display: flex; + justify-content: center; + align-items: center; +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/videoList/videoList.js b/unpackage/dist/dev/mp-weixin/pages/videoList/videoList.js new file mode 100644 index 0000000..79149a1 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/videoList/videoList.js @@ -0,0 +1,537 @@ +"use strict"; +const common_vendor = require("../../common/vendor.js"); +const api_api = require("../../api/api.js"); +const utils_navTo = require("../../utils/navTo.js"); +const common_assets = require("../../common/assets.js"); +if (!Array) { + const _easycom_up__image2 = common_vendor.resolveComponent("up--image"); + const _easycom_up_radio2 = common_vendor.resolveComponent("up-radio"); + const _easycom_up_radio_group2 = common_vendor.resolveComponent("up-radio-group"); + const _easycom_up_dropdown_item2 = common_vendor.resolveComponent("up-dropdown-item"); + const _easycom_up_dropdown2 = common_vendor.resolveComponent("up-dropdown"); + const _easycom_up_icon2 = common_vendor.resolveComponent("up-icon"); + const _easycom_z_paging2 = common_vendor.resolveComponent("z-paging"); + const _easycom_u_icon2 = common_vendor.resolveComponent("u-icon"); + const _easycom_up_steps_item2 = common_vendor.resolveComponent("up-steps-item"); + const _easycom_up_steps2 = common_vendor.resolveComponent("up-steps"); + const _easycom_up_popup2 = common_vendor.resolveComponent("up-popup"); + (_easycom_up__image2 + _easycom_up_radio2 + _easycom_up_radio_group2 + _easycom_up_dropdown_item2 + _easycom_up_dropdown2 + _easycom_up_icon2 + _easycom_z_paging2 + _easycom_u_icon2 + _easycom_up_steps_item2 + _easycom_up_steps2 + _easycom_up_popup2)(); +} +const _easycom_up__image = () => "../../node-modules/uview-plus/components/u--image/u--image.js"; +const _easycom_up_radio = () => "../../node-modules/uview-plus/components/u-radio/u-radio.js"; +const _easycom_up_radio_group = () => "../../node-modules/uview-plus/components/u-radio-group/u-radio-group.js"; +const _easycom_up_dropdown_item = () => "../../node-modules/uview-plus/components/u-dropdown-item/u-dropdown-item.js"; +const _easycom_up_dropdown = () => "../../node-modules/uview-plus/components/u-dropdown/u-dropdown.js"; +const _easycom_up_icon = () => "../../node-modules/uview-plus/components/u-icon/u-icon.js"; +const _easycom_z_paging = () => "../../uni_modules/z-paging/components/z-paging/z-paging.js"; +const _easycom_u_icon = () => "../../node-modules/uview-plus/components/u-icon/u-icon.js"; +const _easycom_up_steps_item = () => "../../node-modules/uview-plus/components/u-steps-item/u-steps-item.js"; +const _easycom_up_steps = () => "../../node-modules/uview-plus/components/u-steps/u-steps.js"; +const _easycom_up_popup = () => "../../node-modules/uview-plus/components/u-popup/u-popup.js"; +if (!Math) { + (navBarSearch + _easycom_up__image + _easycom_up_radio + _easycom_up_radio_group + _easycom_up_dropdown_item + _easycom_up_dropdown + _easycom_up_icon + _easycom_z_paging + _easycom_u_icon + _easycom_up_steps_item + _easycom_up_steps + _easycom_up_popup)(); +} +const navBarSearch = () => "../../components/navBarSearch/navBarSearch.js"; +const _sfc_main = { + __name: "videoList", + setup(__props) { + const paging = common_vendor.ref(null); + const dataList = common_vendor.ref([]); + const total = common_vendor.ref(0); + const keyWord = common_vendor.ref(""); + const isArticle = common_vendor.ref(false); + const hospital_id = common_vendor.ref(""); + const hospital_name = common_vendor.ref(""); + const doctor_id = common_vendor.ref(""); + const doctor_name = common_vendor.ref(""); + const numInfo = common_vendor.reactive({}); + const searchInfo = common_vendor.reactive({}); + const navName = common_vendor.ref("视频临床病例库"); + const dropTitle = common_vendor.ref("发布时间"); + const orderFilter = common_vendor.ref("1"); + const uDropdownRef = common_vendor.ref(null); + const label_iden = common_vendor.ref(null); + const options = common_vendor.ref([ + { + label: "发布时间", + value: "1" + }, + { + label: "阅读次数", + value: "2" + } + ]); + const isSearch = common_vendor.ref(false); + const order = common_vendor.reactive({ + read_num: "", + push_date: "desc" + }); + const showCase = common_vendor.ref(false); + common_vendor.ref(false); + const freshKey = common_vendor.ref(0); + const caseValue1 = common_vendor.reactive({ + value: "", + name: "" + }); + const caseValue2 = common_vendor.reactive({ + value: "", + name: "" + }); + const caseValue3 = common_vendor.reactive({ + value: "", + name: "" + }); + const level = common_vendor.ref(1); + const labelObj = common_vendor.reactive({ + list1: [], + list2: [], + list3: [] + }); + const openCaseLevel = (lev) => { + freshKey.value++; + level.value = lev; + if (lev == 1) { + caseValue2.name = ""; + caseValue2.value = ""; + labelObj.list2 = []; + } else if (lev == 2) { + labelObj.list3 = []; + caseValue3.name = ""; + caseValue3.value = ""; + } + }; + const groupChange1 = (e) => { + caseValue1.value = e; + for (var i = 0; i < labelObj.list1.length; i++) { + if (labelObj.list1[i].app_iden == caseValue1.value) { + caseValue1.name = labelObj.list1[i].label_name; + break; + } + } + getCaseLabel(2, e); + }; + const groupChange2 = (e) => { + caseValue2.value = e; + for (var i = 0; i < labelObj.list2.length; i++) { + if (labelObj.list2[i].app_iden == caseValue2.value) { + caseValue2.name = labelObj.list2[i].label_name; + break; + } + } + getCaseLabel(3, e); + }; + const groupChange3 = (e) => { + caseValue3.value = e; + level.value = 3; + for (var i = 0; i < labelObj.list3.length; i++) { + if (labelObj.list3[i].app_iden == caseValue3.value) { + caseValue3.name = labelObj.list3[i].label_name; + break; + } + } + }; + const getCaseLabel = (lev, pid = 0) => { + api_api.api.getCaseLabel({ + pId: pid + }).then((res) => { + level.value = lev; + if (lev == 1) { + labelObj.list1 = res.data.data; + } else if (lev == 2) { + labelObj.list2 = res.data.data; + if (res.data.data.length == 0) { + level.value = 1; + } + } else if (lev == 3) { + labelObj.list3 = res.data.data; + if (res.data.data.length == 0) { + level.value = 2; + } + } + }); + }; + const openCase = () => { + showCase.value = true; + }; + const confirmCase = () => { + if (level.value == 1 && caseValue1.value == "") { + common_vendor.index.showToast({ title: "请选择疾病选项", icon: "none" }); + return false; + } + if (level.value == 1) { + label_iden.value = caseValue1.value; + } + if (level.value == 2) { + if (!caseValue2.value) { + label_iden.value = caseValue1.value; + } else { + label_iden.value = caseValue2.value; + } + } + if (level.value == 3) { + if (!caseValue3.value) { + label_iden.value = caseValue2.value; + } else { + label_iden.value = caseValue3.value; + } + } + paging.value.reload(); + showCase.value = false; + }; + const closeCase = () => { + showCase.value = false; + }; + const changeWord = (value) => { + keyWord.value = value; + isSearch.value = true; + paging.value.reload(); + }; + common_vendor.onLoad((options2) => { + if (options2.keyWord) { + keyWord.value = options2.keyWord; + } + if (options2.order == "new") { + order.push_date = "asc"; + } + if (options2.order == "read") { + order.read_num = "desc"; + } + if (options2.order == "video") { + isArticle.value = false; + } + getStatic(); + if (options2.doctor_id) { + doctor_id.value = options2.doctor_id; + doctor_name.value = options2.doctor_name; + navName.value = doctor_name.value + "临床病例库"; + getStaticDoctor(doctor_id.value); + } + if (options2.hospital_id) { + hospital_id.value = options2.hospital_id; + hospital_name.value = options2.hospital_name; + navName.value = hospital_name.value + "临床病例库"; + getStaticDoctor(hospital_id.value); + } + getCaseLabel(1, 0); + }); + common_vendor.onShow(() => { + var _a; + (_a = paging.value) == null ? void 0 : _a.refresh(); + }); + const changeDate = (e) => { + if (e == 1) { + order.push_date = "desc"; + order.read_num = ""; + dropTitle.value = "发布时间"; + } else { + order.push_date = ""; + order.read_num = "desc"; + dropTitle.value = "阅读次数"; + } + orderFilter.value = e; + uDropdownRef.value.close(); + paging.value.reload(); + }; + const formatdate = (date) => { + return common_vendor.dayjs(date).format("YYYY-MM-DD"); + }; + const goDetail = (id) => { + common_vendor.index.__f__("log", "at pages/videoList/videoList.vue:453", 11111); + common_vendor.index.__f__("log", "at pages/videoList/videoList.vue:454", id); + let type = isArticle.value ? "article" : "video"; + utils_navTo.navTo({ + url: `/pages/detail/detail?id=${id}&type=${type}` + }); + }; + const getStatic = () => { + api_api.api.getHomeStatics().then((res) => { + let result = res.data.data; + Object.assign(numInfo, result); + }); + }; + const searchArticle = (params) => { + let searchForm = { + keyword: keyWord.value, + hospital_id: hospital_id.value, + doctor_id: doctor_id.value, + label_iden: label_iden.value + }; + if (label_iden.value === "") { + delete searchForm.label_iden; + } + if (isSearch.value) { + searchForm.is_need_num = 1; + } + if (!order.read_num) { + delete order.read_num; + } + if (!order.push_date) { + delete order.push_date; + } + if (order.read_num || order.push_date) { + searchForm.order = order; + } + api_api.api.searchArticle({ + ...searchForm, + ...params + }).then((res) => { + paging.value.complete(res.data.data.data); + total.value = res.data.data.total; + searchInfo.search_video_num = res.data.data.search_video_num; + searchInfo.search_article_num = res.data.data.search_article_num; + }).catch((err) => { + paging.value.complete(false); + }); + }; + const searchVideo = async (params) => { + let searchForm = { + keyword: keyWord.value, + hospital_id: hospital_id.value, + doctor_id: doctor_id.value, + label_iden: label_iden.value + }; + if (label_iden.value === "") { + delete searchForm.label_iden; + } + if (isSearch.value) { + searchForm.is_need_num = 1; + } + if (!order.read_num) { + delete order.read_num; + } + if (!order.push_date) { + delete order.push_date; + } + if (order.read_num || order.push_date) { + searchForm.order = order; + } + api_api.api.searchVideo({ + ...searchForm, + ...params + }).then((res) => { + paging.value.complete(res.data.data.data); + total.value = res.data.data.total; + searchInfo.search_video_num = res.data.data.search_video_num; + searchInfo.search_article_num = res.data.data.search_article_num; + }).catch((err) => { + paging.value.complete(false); + }); + }; + const queryList = (pageNo, pageSize) => { + common_vendor.index.__f__("log", "at pages/videoList/videoList.vue:537", 666666); + const params = { + page: pageNo, + page_size: pageSize + }; + isArticle.value ? searchArticle(params) : searchVideo(params); + }; + return (_ctx, _cache) => { + return common_vendor.e({ + a: common_vendor.o(changeWord), + b: common_vendor.p({ + searchWord: keyWord.value, + navName: navName.value, + type: "video" + }), + c: isArticle.value + }, isArticle.value ? { + d: common_vendor.t(numInfo.article_collect_num) + } : { + e: common_vendor.t(numInfo.video_num) + }, { + f: isArticle.value + }, isArticle.value ? { + g: common_vendor.t(numInfo.article_read_num) + } : { + h: common_vendor.t(numInfo.video_read_num) + }, { + i: isSearch.value + }, isSearch.value ? common_vendor.e({ + j: common_vendor.t(searchInfo.search_video_num), + k: keyWord.value + }, keyWord.value ? { + l: common_vendor.t(keyWord.value) + } : {}) : {}, { + m: common_vendor.p({ + src: common_vendor.unref(common_assets.caseImg), + width: "31rpx", + height: "31rpx" + }), + n: label_iden.value ? 1 : "", + o: common_vendor.o(openCase), + p: common_vendor.f(options.value, (item, k0, i0) => { + return { + a: "acc011bc-6-" + i0 + ",acc011bc-5", + b: common_vendor.p({ + activeColor: "#3CC7C0", + label: item.label, + name: item.value + }), + c: item.value, + d: common_vendor.n(orderFilter.value == item.value ? "active" : "") + }; + }), + q: common_vendor.o(changeDate), + r: common_vendor.o(($event) => orderFilter.value = $event), + s: common_vendor.p({ + iconPlacement: "right", + placement: "column", + modelValue: orderFilter.value + }), + t: common_vendor.p({ + title: dropTitle.value + }), + v: common_vendor.sr(uDropdownRef, "acc011bc-3,acc011bc-0", { + "k": "uDropdownRef" + }), + w: common_vendor.f(dataList.value, (item, index, i0) => { + return common_vendor.e({ + a: common_vendor.t(isArticle.value ? item.article_title : item.video_title), + b: common_vendor.f(item.author, (tag, k1, i1) => { + return { + a: common_vendor.t(tag.doctor_name), + b: tag.author_id + }; + }), + c: "acc011bc-7-" + i0 + ",acc011bc-0", + d: common_vendor.t(item.read_num), + e: item.collect_num > 0 + }, item.collect_num > 0 ? { + f: "acc011bc-8-" + i0 + ",acc011bc-0", + g: common_vendor.p({ + name: "heart", + color: "#6B7280", + size: "28rpx" + }), + h: common_vendor.t(item.collect_num) + } : {}, { + i: "acc011bc-9-" + i0 + ",acc011bc-0", + j: common_vendor.t(formatdate(item.push_date)), + k: index, + l: common_vendor.o(($event) => isArticle.value ? goDetail(item.article_id) : goDetail(item.video_id), index) + }); + }), + x: common_vendor.p({ + name: "eye", + color: "#6B7280", + size: "28rpx" + }), + y: common_vendor.p({ + name: "clock", + color: "#6B7280", + size: "28rpx" + }), + z: common_vendor.sr(paging, "acc011bc-0", { + "k": "paging" + }), + A: common_vendor.o(queryList), + B: common_vendor.o(($event) => dataList.value = $event), + C: common_vendor.p({ + ["inside-more"]: true, + ["loading-more-no-more-text"]: "咱也是有底线的!", + ["auto-show-back-to-top"]: true, + modelValue: dataList.value + }), + D: common_vendor.o(closeCase), + E: common_vendor.o(confirmCase), + F: common_vendor.t(!caseValue1.name ? "请选择选项" : caseValue1.name), + G: common_vendor.p({ + name: "arrow-right" + }), + H: common_vendor.o(($event) => openCaseLevel("1")), + I: caseValue1.name && labelObj.list2.length > 0 + }, caseValue1.name && labelObj.list2.length > 0 ? { + J: common_vendor.t(!caseValue2.name ? "请选择选项" : caseValue2.name), + K: common_vendor.p({ + name: "arrow-right" + }), + L: common_vendor.o(($event) => openCaseLevel("2")) + } : {}, { + M: caseValue2.name && labelObj.list3.length > 0 + }, caseValue2.name && labelObj.list3.length > 0 ? { + N: common_vendor.t(!caseValue3.name ? "请选择选项" : caseValue3.name), + O: common_vendor.p({ + name: "arrow-right" + }), + P: common_vendor.o(($event) => openCaseLevel("3")) + } : {}, { + Q: freshKey.value, + R: common_vendor.p({ + current: level.value - 1, + direction: "column" + }), + S: common_vendor.f(labelObj.list1, (item, k0, i0) => { + return { + a: "acc011bc-19-" + i0 + ",acc011bc-18", + b: common_vendor.p({ + activeColor: "#3CC7C0 ", + label: item.label_name, + name: item.app_iden + }), + c: item.app_iden + }; + }), + T: common_vendor.o(groupChange1), + U: common_vendor.o(($event) => caseValue1.value = $event), + V: common_vendor.p({ + name: "group1", + iconPlacement: "right", + placement: "column", + modelValue: caseValue1.value + }), + W: level.value == 1, + X: common_vendor.f(labelObj.list2, (item, k0, i0) => { + return { + a: "acc011bc-21-" + i0 + ",acc011bc-20", + b: common_vendor.p({ + activeColor: "#3CC7C0 ", + label: item.label_name, + name: item.app_iden + }), + c: item.app_iden + }; + }), + Y: common_vendor.o(groupChange2), + Z: common_vendor.o(($event) => caseValue2.value = $event), + aa: common_vendor.p({ + name: "group2", + iconPlacement: "right", + placement: "column", + modelValue: caseValue2.value + }), + ab: level.value == 2, + ac: common_vendor.f(labelObj.list3, (item, k0, i0) => { + return { + a: "acc011bc-23-" + i0 + ",acc011bc-22", + b: common_vendor.p({ + activeColor: "#3CC7C0 ", + label: item.label_name, + name: item.app_iden + }), + c: item.app_iden + }; + }), + ad: common_vendor.o(groupChange3), + ae: common_vendor.o(($event) => caseValue3.value = $event), + af: common_vendor.p({ + name: "group3", + iconPlacement: "right", + placement: "column", + modelValue: caseValue3.value + }), + ag: level.value == 3, + ah: common_vendor.o(closeCase), + ai: common_vendor.p({ + round: 10, + zIndex: "9", + closeOnClickOverlay: false, + show: showCase.value, + mode: "bottom" + }) + }); + }; + } +}; +const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-acc011bc"]]); +wx.createPage(MiniProgramPage); +//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/videoList/videoList.js.map diff --git a/unpackage/dist/dev/mp-weixin/pages/videoList/videoList.json b/unpackage/dist/dev/mp-weixin/pages/videoList/videoList.json new file mode 100644 index 0000000..a8a4ba8 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/videoList/videoList.json @@ -0,0 +1,18 @@ +{ + "navigationBarTitleText": "肝胆相照临床病例库", + "navigationStyle": "custom", + "usingComponents": { + "up--image": "../../node-modules/uview-plus/components/u--image/u--image", + "up-radio": "../../node-modules/uview-plus/components/u-radio/u-radio", + "up-radio-group": "../../node-modules/uview-plus/components/u-radio-group/u-radio-group", + "up-dropdown-item": "../../node-modules/uview-plus/components/u-dropdown-item/u-dropdown-item", + "up-dropdown": "../../node-modules/uview-plus/components/u-dropdown/u-dropdown", + "up-icon": "../../node-modules/uview-plus/components/u-icon/u-icon", + "z-paging": "../../uni_modules/z-paging/components/z-paging/z-paging", + "u-icon": "../../node-modules/uview-plus/components/u-icon/u-icon", + "up-steps-item": "../../node-modules/uview-plus/components/u-steps-item/u-steps-item", + "up-steps": "../../node-modules/uview-plus/components/u-steps/u-steps", + "up-popup": "../../node-modules/uview-plus/components/u-popup/u-popup", + "nav-bar-search": "../../components/navBarSearch/navBarSearch" + } +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/videoList/videoList.wxml b/unpackage/dist/dev/mp-weixin/pages/videoList/videoList.wxml new file mode 100644 index 0000000..7c71f42 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/videoList/videoList.wxml @@ -0,0 +1 @@ +{{d}}文章{{e}}视频{{g}}阅读量{{h}}阅读量检索到:{{j}}个视频检索词:{{l}}筛选{{item.a}}{{tag.a}}{{item.d}}{{item.h}}{{item.j}}取消确定{{F}}{{J}}{{N}} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/videoList/videoList.wxss b/unpackage/dist/dev/mp-weixin/pages/videoList/videoList.wxss new file mode 100644 index 0000000..c517c93 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/videoList/videoList.wxss @@ -0,0 +1,315 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ +.dropcontent.data-v-acc011bc { + padding-top: 40rpx; + padding-bottom: 20rpx; + background-color: #fff; +} +.dropcontent.data-v-acc011bc .u-radio { + margin-bottom: 6px !important; + margin-top: 16px !important; +} +.dropcontent .column.data-v-acc011bc { + padding: 0 30rpx; + border-top: 2rpx solid #e5e7eb; +} +.dropcontent .column.data-v-acc011bc .u-radio__text { + color: #333 !important; +} +.dropcontent .column.active.data-v-acc011bc .u-radio__text { + color: #3CC7C0 !important; +} +.stepbox.data-v-acc011bc { + padding: 15rpx 30rpx; + border-bottom: 2rpx dotted #f3f4f6; +} +.stepbox.data-v-acc011bc .u-steps-item__content { + margin-top: -5rpx !important; +} +.stepbox .slot-content.data-v-acc011bc { + width: 100%; + margin-bottom: 25rpx; + justify-content: space-between; + align-items: center; + display: flex; +} +.bar.data-v-acc011bc { + width: 100%; + background: #f9fafb; + height: 20rpx; +} +.databox.data-v-acc011bc { + height: 162rpx; + background: #ffffff; + display: flex; + margin-bottom: 20rpx; + justify-content: space-between; +} +.databox .cell.data-v-acc011bc { + flex: 1; + padding: 35rpx 0; + text-align: center; +} +.databox .cell .num.data-v-acc011bc { + font-size: 38rpx; + color: #3cc7c0; +} +.databox .cell .name.data-v-acc011bc { + margin-top: 18rpx; + font-size: 28rpx; + color: #4b5563; +} +.filterbox.data-v-acc011bc { + display: flex; + height: 128rpx; + align-items: center; + position: relative; + border-bottom: 2rpx solid #f3f4f6; +} +.filterbox.data-v-acc011bc .u-dropdown__menu__item__text { + font-size: 14px !important; + color: #3CC7C0 !important; +} +.filterbox .casesdown.data-v-acc011bc { + font-size: 14px; + color: #606266; + position: absolute; + left: 30rpx; + top: 24rpx; + display: flex; + justify-content: center; + align-items: center; + background: #F3F4F6; + border-radius: 15rpx; + height: 74rpx; + padding: 0 25rpx; + z-index: 2; +} +.filterbox .type.data-v-acc011bc { + color: #606266; + font-size: 14px; + position: absolute; + left: 30rpx; + top: 24rpx; + display: flex; + justify-content: center; + align-items: center; + background: #F3F4F6; + border-radius: 15rpx; + height: 74rpx; + padding: 0 25rpx; + z-index: 2; +} +.u-page.data-v-acc011bc .u-flex { + display: flex; + flex-direction: row; + overflow: hidden; +} +.u-page.data-v-acc011bc .u-dropdown__menu { + background: #fff; + z-index: 1; + margin-left: 165rpx; +} +.u-page.data-v-acc011bc .u-dropdown__menu__item { + height: 74rpx; + padding: 0 20rpx; + background: #F3F4F6; + border-radius: 15rpx; + flex: none; + margin-left: 30rpx; +} +.u-page .deal.data-v-acc011bc { + margin-top: 20rpx; + display: flex; + color: #6b7280; + font-size: 24rpx; + justify-content: space-between; +} +.u-page .deal .left.data-v-acc011bc { + display: flex; + align-items: center; +} +.u-page .deal .collect.data-v-acc011bc { + display: flex; + align-items: center; +} +.u-page .deal .eyebox.data-v-acc011bc { + width: 160rpx; + display: flex; + align-items: center; +} +.u-page .deal .time.data-v-acc011bc { + display: flex; + align-items: center; +} +.u-page .deal .num.data-v-acc011bc { + margin-left: 8rpx; +} +.u-page .item.data-v-acc011bc { + border-bottom: 1rpx solid #f3f4f6; + padding: 30rpx; +} +.u-page .item .title.data-v-acc011bc { + font-size: 30rpx; + color: #111827; + line-height: 46rpx; +} +.u-page .tagsbox.data-v-acc011bc { + margin-top: 20rpx; + display: flex; + flex-wrap: wrap; +} +.u-page .tagsbox .tag.data-v-acc011bc { + padding: 0 10rpx; + margin-right: 16rpx; + height: 46rpx; + line-height: 46rpx; + text-align: center; + background: rgba(60, 199, 192, 0.1); + border-radius: 8rpx; + font-weight: 400; + font-size: 24rpx; + color: #3cc7c0; +} +.detail.data-v-acc011bc { + background: #f9f9f9; + padding: 12rpx 30rpx; +} +.detail .desc.data-v-acc011bc { + font-size: 26rpx; + color: #4b5563; + line-height: 40rpx; +} +.detail .red.data-v-acc011bc { + color: #FF0000; +} +.votepop .confirm.data-v-acc011bc { + margin: 39rpx 30rpx 0; + height: 92rpx; + background: #3cc7c0; + border-radius: 15rpx; + display: flex; + align-items: center; + font-size: 31rpx; + color: #ffffff; + justify-content: center; +} +.votepop .del.data-v-acc011bc { + margin: 30rpx 30rpx 30rpx; + height: 92rpx; + background: #fff; + border-radius: 15rpx; + font-size: 31rpx; + color: #666666; + display: flex; + align-items: center; + justify-content: center; +} +.votepop .tips.data-v-acc011bc { + margin-top: 30rpx; + font-size: 27rpx; + color: #9ca3af; + line-height: 38rpx; + padding: 0 30rpx; +} +.votepop .add.data-v-acc011bc { + margin: 0 30rpx; + display: flex; + align-items: center; + height: 92rpx; + justify-content: center; + background: #f5f5f5; + border-radius: 15rpx; + font-size: 31rpx; + color: #4b5563; +} +.votepop .add .desc.data-v-acc011bc { + margin-left: 10rpx; +} +.votepop .titlebox.data-v-acc011bc { + padding: 0 30rpx; + height: 86rpx; + display: flex; + align-items: center; + justify-content: space-between; + border-bottom: 2rpx solid #f3f4f6; +} +.votepop .titlebox .left.data-v-acc011bc { + font-size: 31rpx; + color: #4b5563; +} +.votepop .titlebox .right.data-v-acc011bc { + font-size: 31rpx; + color: #3cc7c0; +} +.votepop .votecon.data-v-acc011bc { + max-height: calc(100vh - 530rpx); + overflow-y: scroll; +} +.votepop .votecon .row.data-v-acc011bc { + display: flex; + align-items: center; +} +.votepop .votecon .row .iconbox.data-v-acc011bc { + margin-left: 15rpx; + align-items: center; +} +.votepop .votecon .titlebox.data-v-acc011bc { + border: none; + margin: 30rpx 0 20rpx; +} +.votepop .votecon .titlebox .title.data-v-acc011bc { + font-size: 31rpx; + color: #111827; +} +.votepop .votecon .titlebox .desc.data-v-acc011bc { + font-size: 27rpx; + color: #9ca3af; +} +.casepop.data-v-acc011bc { + display: flex; + flex-direction: column; + max-height: calc(100vh - 400rpx); +} +.casepop .continue.data-v-acc011bc { + color: #2878ff !important; +} +.casecon.data-v-acc011bc { + flex: 1; + max-height: calc(100vh - 800rpx); + overflow-y: scroll; + padding-top: 22rpx; + padding-bottom: 20rpx; + min-height: 350rpx; +} +.casecon.data-v-acc011bc .u-radio { + margin-bottom: 10px !important; + margin-top: 0px !important; +} +.casecon .column.data-v-acc011bc { + padding: 0 30rpx; + border-bottom: 2rpx solid #e5e7eb; +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/web/web.js b/unpackage/dist/dev/mp-weixin/pages/web/web.js new file mode 100644 index 0000000..086e600 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/web/web.js @@ -0,0 +1,18 @@ +"use strict"; +const common_vendor = require("../../common/vendor.js"); +const _sfc_main = { + __name: "web", + setup(__props) { + const src = common_vendor.ref(""); + common_vendor.onLoad((option) => { + src.value = option.src; + }); + return (_ctx, _cache) => { + return { + a: src.value + }; + }; + } +}; +wx.createPage(_sfc_main); +//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/web/web.js.map diff --git a/unpackage/dist/dev/mp-weixin/pages/web/web.json b/unpackage/dist/dev/mp-weixin/pages/web/web.json new file mode 100644 index 0000000..e701325 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/web/web.json @@ -0,0 +1,5 @@ +{ + "navigationBarTitleText": "肝胆相照临床病例库", + "navigationStyle": "custom", + "usingComponents": {} +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/web/web.wxml b/unpackage/dist/dev/mp-weixin/pages/web/web.wxml new file mode 100644 index 0000000..8efdc9c --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages/web/web.wxml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/web/web.wxss b/unpackage/dist/dev/mp-weixin/pages/web/web.wxss new file mode 100644 index 0000000..e69de29 diff --git a/unpackage/dist/dev/mp-weixin/pages_case/index/index.js b/unpackage/dist/dev/mp-weixin/pages_case/index/index.js new file mode 100644 index 0000000..42a75c6 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages_case/index/index.js @@ -0,0 +1,71 @@ +"use strict"; +const common_vendor = require("../../common/vendor.js"); +if (!Array) { + const _easycom_up_avatar2 = common_vendor.resolveComponent("up-avatar"); + const _easycom_up_cell2 = common_vendor.resolveComponent("up-cell"); + const _easycom_up_list_item2 = common_vendor.resolveComponent("up-list-item"); + const _easycom_up_list2 = common_vendor.resolveComponent("up-list"); + (_easycom_up_avatar2 + _easycom_up_cell2 + _easycom_up_list_item2 + _easycom_up_list2)(); +} +const _easycom_up_avatar = () => "../../node-modules/uview-plus/components/u-avatar/u-avatar.js"; +const _easycom_up_cell = () => "../../node-modules/uview-plus/components/u-cell/u-cell.js"; +const _easycom_up_list_item = () => "../../node-modules/uview-plus/components/u-list-item/u-list-item.js"; +const _easycom_up_list = () => "../../node-modules/uview-plus/components/u-list/u-list.js"; +if (!Math) { + (_easycom_up_avatar + _easycom_up_cell + _easycom_up_list_item + _easycom_up_list)(); +} +const _sfc_main = { + __name: "index", + setup(__props) { + const indexList = common_vendor.ref([]); + const urls = [ + "https://uview-plus.jiangruyi.com/album/1.jpg", + "https://uview-plus.jiangruyi.com/album/2.jpg", + "https://uview-plus.jiangruyi.com/album/3.jpg", + "https://uview-plus.jiangruyi.com/album/4.jpg", + "https://uview-plus.jiangruyi.com/album/5.jpg", + "https://uview-plus.jiangruyi.com/album/6.jpg", + "https://uview-plus.jiangruyi.com/album/7.jpg", + "https://uview-plus.jiangruyi.com/album/8.jpg", + "https://uview-plus.jiangruyi.com/album/9.jpg", + "https://uview-plus.jiangruyi.com/album/10.jpg" + ]; + common_vendor.onLoad(() => { + loadmore(); + }); + const scrolltolower = () => { + loadmore(); + }; + const loadmore = () => { + for (let i = 0; i < 30; i++) { + indexList.value.push({ + url: urls[common_vendor.index.$u.random(0, urls.length - 1)] + }); + } + }; + return (_ctx, _cache) => { + return { + a: common_vendor.f(indexList.value, (item, index, i0) => { + return { + a: "1bde9236-3-" + i0 + "," + ("1bde9236-2-" + i0), + b: common_vendor.p({ + shape: "square", + size: "35", + src: item.url, + customStyle: "margin: -3px 5px -3px 0" + }), + c: "1bde9236-2-" + i0 + "," + ("1bde9236-1-" + i0), + d: common_vendor.p({ + title: `列表长度-${index + 1}` + }), + e: index, + f: "1bde9236-1-" + i0 + ",1bde9236-0" + }; + }), + b: common_vendor.o(scrolltolower) + }; + }; + } +}; +wx.createPage(_sfc_main); +//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages_case/index/index.js.map diff --git a/unpackage/dist/dev/mp-weixin/pages_case/index/index.json b/unpackage/dist/dev/mp-weixin/pages_case/index/index.json new file mode 100644 index 0000000..2d409fb --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages_case/index/index.json @@ -0,0 +1,9 @@ +{ + "navigationBarTitleText": "uni-app分页", + "usingComponents": { + "up-avatar": "../../node-modules/uview-plus/components/u-avatar/u-avatar", + "up-cell": "../../node-modules/uview-plus/components/u-cell/u-cell", + "up-list-item": "../../node-modules/uview-plus/components/u-list-item/u-list-item", + "up-list": "../../node-modules/uview-plus/components/u-list/u-list" + } +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages_case/index/index.wxml b/unpackage/dist/dev/mp-weixin/pages_case/index/index.wxml new file mode 100644 index 0000000..5abfc1a --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/pages_case/index/index.wxml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages_case/index/index.wxss b/unpackage/dist/dev/mp-weixin/pages_case/index/index.wxss new file mode 100644 index 0000000..e69de29 diff --git a/unpackage/dist/dev/mp-weixin/static/add.png b/unpackage/dist/dev/mp-weixin/static/add.png new file mode 100644 index 0000000..32082c3 Binary files /dev/null and b/unpackage/dist/dev/mp-weixin/static/add.png differ diff --git a/unpackage/dist/dev/mp-weixin/static/arrowright.png b/unpackage/dist/dev/mp-weixin/static/arrowright.png new file mode 100644 index 0000000..71fcbc8 Binary files /dev/null and b/unpackage/dist/dev/mp-weixin/static/arrowright.png differ diff --git a/unpackage/dist/dev/mp-weixin/static/benren.png b/unpackage/dist/dev/mp-weixin/static/benren.png new file mode 100644 index 0000000..9909c5a Binary files /dev/null and b/unpackage/dist/dev/mp-weixin/static/benren.png differ diff --git a/unpackage/dist/dev/mp-weixin/static/caseIcon.png b/unpackage/dist/dev/mp-weixin/static/caseIcon.png new file mode 100644 index 0000000..e60a619 Binary files /dev/null and b/unpackage/dist/dev/mp-weixin/static/caseIcon.png differ diff --git a/unpackage/dist/dev/mp-weixin/static/cert.png b/unpackage/dist/dev/mp-weixin/static/cert.png new file mode 100644 index 0000000..d30597c Binary files /dev/null and b/unpackage/dist/dev/mp-weixin/static/cert.png differ diff --git a/unpackage/dist/dev/mp-weixin/static/chat.png b/unpackage/dist/dev/mp-weixin/static/chat.png new file mode 100644 index 0000000..ea3a2bf Binary files /dev/null and b/unpackage/dist/dev/mp-weixin/static/chat.png differ diff --git a/unpackage/dist/dev/mp-weixin/static/collect.png b/unpackage/dist/dev/mp-weixin/static/collect.png new file mode 100644 index 0000000..2815fe4 Binary files /dev/null and b/unpackage/dist/dev/mp-weixin/static/collect.png differ diff --git a/unpackage/dist/dev/mp-weixin/static/collectOn.png b/unpackage/dist/dev/mp-weixin/static/collectOn.png new file mode 100644 index 0000000..80b6cb0 Binary files /dev/null and b/unpackage/dist/dev/mp-weixin/static/collectOn.png differ diff --git a/unpackage/dist/dev/mp-weixin/static/comment_icon.png b/unpackage/dist/dev/mp-weixin/static/comment_icon.png new file mode 100644 index 0000000..67b73c5 Binary files /dev/null and b/unpackage/dist/dev/mp-weixin/static/comment_icon.png differ diff --git a/unpackage/dist/dev/mp-weixin/static/default.png b/unpackage/dist/dev/mp-weixin/static/default.png new file mode 100644 index 0000000..613fbd6 Binary files /dev/null and b/unpackage/dist/dev/mp-weixin/static/default.png differ diff --git a/unpackage/dist/dev/mp-weixin/static/doctor.png b/unpackage/dist/dev/mp-weixin/static/doctor.png new file mode 100644 index 0000000..ad6ef70 Binary files /dev/null and b/unpackage/dist/dev/mp-weixin/static/doctor.png differ diff --git a/unpackage/dist/dev/mp-weixin/static/draft.png b/unpackage/dist/dev/mp-weixin/static/draft.png new file mode 100644 index 0000000..a15d94b Binary files /dev/null and b/unpackage/dist/dev/mp-weixin/static/draft.png differ diff --git a/unpackage/dist/dev/mp-weixin/static/group.png b/unpackage/dist/dev/mp-weixin/static/group.png new file mode 100644 index 0000000..d9cf610 Binary files /dev/null and b/unpackage/dist/dev/mp-weixin/static/group.png differ diff --git a/unpackage/dist/dev/mp-weixin/static/group_on.png b/unpackage/dist/dev/mp-weixin/static/group_on.png new file mode 100644 index 0000000..98a757c Binary files /dev/null and b/unpackage/dist/dev/mp-weixin/static/group_on.png differ diff --git a/unpackage/dist/dev/mp-weixin/static/headImg.png b/unpackage/dist/dev/mp-weixin/static/headImg.png new file mode 100644 index 0000000..34528c5 Binary files /dev/null and b/unpackage/dist/dev/mp-weixin/static/headImg.png differ diff --git a/unpackage/dist/dev/mp-weixin/static/hospital.png b/unpackage/dist/dev/mp-weixin/static/hospital.png new file mode 100644 index 0000000..fd400ac Binary files /dev/null and b/unpackage/dist/dev/mp-weixin/static/hospital.png differ diff --git a/unpackage/dist/dev/mp-weixin/static/ku.png b/unpackage/dist/dev/mp-weixin/static/ku.png new file mode 100644 index 0000000..7d7ba82 Binary files /dev/null and b/unpackage/dist/dev/mp-weixin/static/ku.png differ diff --git a/unpackage/dist/dev/mp-weixin/static/ku_on.png b/unpackage/dist/dev/mp-weixin/static/ku_on.png new file mode 100644 index 0000000..f73f9fe Binary files /dev/null and b/unpackage/dist/dev/mp-weixin/static/ku_on.png differ diff --git a/unpackage/dist/dev/mp-weixin/static/logo.png b/unpackage/dist/dev/mp-weixin/static/logo.png new file mode 100644 index 0000000..ab5685c Binary files /dev/null and b/unpackage/dist/dev/mp-weixin/static/logo.png differ diff --git a/unpackage/dist/dev/mp-weixin/static/myCollect.png b/unpackage/dist/dev/mp-weixin/static/myCollect.png new file mode 100644 index 0000000..a4f840d Binary files /dev/null and b/unpackage/dist/dev/mp-weixin/static/myCollect.png differ diff --git a/unpackage/dist/dev/mp-weixin/static/myDownload.png b/unpackage/dist/dev/mp-weixin/static/myDownload.png new file mode 100644 index 0000000..294cb23 Binary files /dev/null and b/unpackage/dist/dev/mp-weixin/static/myDownload.png differ diff --git a/unpackage/dist/dev/mp-weixin/static/myFile.png b/unpackage/dist/dev/mp-weixin/static/myFile.png new file mode 100644 index 0000000..b6132a4 Binary files /dev/null and b/unpackage/dist/dev/mp-weixin/static/myFile.png differ diff --git a/unpackage/dist/dev/mp-weixin/static/myHospital.png b/unpackage/dist/dev/mp-weixin/static/myHospital.png new file mode 100644 index 0000000..9845a22 Binary files /dev/null and b/unpackage/dist/dev/mp-weixin/static/myHospital.png differ diff --git a/unpackage/dist/dev/mp-weixin/static/myJoin.png b/unpackage/dist/dev/mp-weixin/static/myJoin.png new file mode 100644 index 0000000..2a57327 Binary files /dev/null and b/unpackage/dist/dev/mp-weixin/static/myJoin.png differ diff --git a/unpackage/dist/dev/mp-weixin/static/myTalk.png b/unpackage/dist/dev/mp-weixin/static/myTalk.png new file mode 100644 index 0000000..4816665 Binary files /dev/null and b/unpackage/dist/dev/mp-weixin/static/myTalk.png differ diff --git a/unpackage/dist/dev/mp-weixin/static/navbg.png b/unpackage/dist/dev/mp-weixin/static/navbg.png new file mode 100644 index 0000000..67ec0a9 Binary files /dev/null and b/unpackage/dist/dev/mp-weixin/static/navbg.png differ diff --git a/unpackage/dist/dev/mp-weixin/static/photo.png b/unpackage/dist/dev/mp-weixin/static/photo.png new file mode 100644 index 0000000..6e2fcb0 Binary files /dev/null and b/unpackage/dist/dev/mp-weixin/static/photo.png differ diff --git a/unpackage/dist/dev/mp-weixin/static/shang.png b/unpackage/dist/dev/mp-weixin/static/shang.png new file mode 100644 index 0000000..0930d2a Binary files /dev/null and b/unpackage/dist/dev/mp-weixin/static/shang.png differ diff --git a/unpackage/dist/dev/mp-weixin/static/sick.png b/unpackage/dist/dev/mp-weixin/static/sick.png new file mode 100644 index 0000000..59619e2 Binary files /dev/null and b/unpackage/dist/dev/mp-weixin/static/sick.png differ diff --git a/unpackage/dist/dev/mp-weixin/static/ss.png b/unpackage/dist/dev/mp-weixin/static/ss.png new file mode 100644 index 0000000..5b6b05d Binary files /dev/null and b/unpackage/dist/dev/mp-weixin/static/ss.png differ diff --git a/unpackage/dist/dev/mp-weixin/static/switch.png b/unpackage/dist/dev/mp-weixin/static/switch.png new file mode 100644 index 0000000..19a78a9 Binary files /dev/null and b/unpackage/dist/dev/mp-weixin/static/switch.png differ diff --git a/unpackage/dist/dev/mp-weixin/static/talk.png b/unpackage/dist/dev/mp-weixin/static/talk.png new file mode 100644 index 0000000..151bd87 Binary files /dev/null and b/unpackage/dist/dev/mp-weixin/static/talk.png differ diff --git a/unpackage/dist/dev/mp-weixin/static/talk_on.png b/unpackage/dist/dev/mp-weixin/static/talk_on.png new file mode 100644 index 0000000..0a431e1 Binary files /dev/null and b/unpackage/dist/dev/mp-weixin/static/talk_on.png differ diff --git a/unpackage/dist/dev/mp-weixin/static/uploadImg.png b/unpackage/dist/dev/mp-weixin/static/uploadImg.png new file mode 100644 index 0000000..2a3441f Binary files /dev/null and b/unpackage/dist/dev/mp-weixin/static/uploadImg.png differ diff --git a/unpackage/dist/dev/mp-weixin/static/video.png b/unpackage/dist/dev/mp-weixin/static/video.png new file mode 100644 index 0000000..6363d4c Binary files /dev/null and b/unpackage/dist/dev/mp-weixin/static/video.png differ diff --git a/unpackage/dist/dev/mp-weixin/static/videoicon.png b/unpackage/dist/dev/mp-weixin/static/videoicon.png new file mode 100644 index 0000000..4849f12 Binary files /dev/null and b/unpackage/dist/dev/mp-weixin/static/videoicon.png differ diff --git a/unpackage/dist/dev/mp-weixin/static/vote.png b/unpackage/dist/dev/mp-weixin/static/vote.png new file mode 100644 index 0000000..7f7f085 Binary files /dev/null and b/unpackage/dist/dev/mp-weixin/static/vote.png differ diff --git a/unpackage/dist/dev/mp-weixin/uni_modules/qf-image-cropper/components/qf-image-cropper/qf-image-cropper.js b/unpackage/dist/dev/mp-weixin/uni_modules/qf-image-cropper/components/qf-image-cropper/qf-image-cropper.js new file mode 100644 index 0000000..c2a4697 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/uni_modules/qf-image-cropper/components/qf-image-cropper/qf-image-cropper.js @@ -0,0 +1,586 @@ +"use strict"; +const common_vendor = require("../../../../common/vendor.js"); +const block0 = (Component2) => { + if (!Component2.wxsCallMethods) { + Component2.wxsCallMethods = []; + } + Component2.wxsCallMethods.push("dataChange"); +}; +const AREA_SIZE = 75; +const IMG_SIZE = 300; +const _sfc_main = { + name: "qf-image-cropper", + options: { + // 表示启用样式隔离,在自定义组件内外,使用 class 指定的样式将不会相互影响 + styleIsolation: "isolated" + }, + props: { + /** 图片资源地址 */ + src: { + type: String, + default: "" + }, + /** 裁剪宽度,有些平台或设备对于canvas的尺寸有限制,过大可能会导致无法正常绘制 */ + width: { + type: Number, + default: IMG_SIZE + }, + /** 裁剪高度,有些平台或设备对于canvas的尺寸有限制,过大可能会导致无法正常绘制 */ + height: { + type: Number, + default: IMG_SIZE + }, + /** 是否绘制裁剪区域边框 */ + showBorder: { + type: Boolean, + default: true + }, + /** 是否绘制裁剪区域网格参考线 */ + showGrid: { + type: Boolean, + default: true + }, + /** 是否展示四个支持伸缩的角 */ + showAngle: { + type: Boolean, + default: true + }, + /** 裁剪区域最小缩放倍数 */ + areaScale: { + type: Number, + default: 0.3 + }, + /** 图片最小缩放倍数 */ + minScale: { + type: Number, + default: 1 + }, + /** 图片最大缩放倍数 */ + maxScale: { + type: Number, + default: 5 + }, + /** 检查图片位置是否超出裁剪边界,如果超出则会矫正位置 */ + checkRange: { + type: Boolean, + default: true + }, + /** 生成图片背景色:如果裁剪区域没有完全包含在图片中时,不设置该属性生成图片存在一定的透明块 */ + backgroundColor: { + type: String + }, + /** 是否有回弹效果:当 checkRange 为 true 时有效,拖动时可以拖出边界,释放时会弹回边界 */ + bounce: { + type: Boolean, + default: true + }, + /** 是否支持翻转 */ + rotatable: { + type: Boolean, + default: true + }, + /** 是否支持逆向翻转 */ + reverseRotatable: { + type: Boolean, + default: false + }, + /** 是否支持从本地选择素材 */ + choosable: { + type: Boolean, + default: true + }, + /** 是否开启硬件加速,图片缩放过程中如果出现元素的“留影”或“重影”效果,可通过该方式解决或减轻这一问题 */ + gpu: { + type: Boolean, + default: false + }, + /** 四个角尺寸,单位px */ + angleSize: { + type: Number, + default: 20 + }, + /** 四个角边框宽度,单位px */ + angleBorderWidth: { + type: Number, + default: 2 + }, + zIndex: { + type: [Number, String] + }, + /** 裁剪图片圆角半径,单位px */ + radius: { + type: Number, + default: 0 + }, + /** 生成文件的类型,只支持 'jpg' 或 'png'。默认为 'png' */ + fileType: { + type: String, + default: "png" + }, + /** + * 图片从绘制到生成所需时间,单位ms + * 微信小程序平台使用 `Canvas 2D` 绘制时有效 + * 如绘制大图或出现裁剪图片空白等情况应适当调大该值,因 `Canvas 2d` 采用同步绘制,需自己把控绘制完成时间 + */ + delay: { + type: Number, + default: 1e3 + } + }, + emits: ["crop"], + data() { + return { + // 用不同 id 使 v-for key 不重复 + maskList: [ + { id: "crop-mask-block-1" }, + { id: "crop-mask-block-2" }, + { id: "crop-mask-block-3" }, + { id: "crop-mask-block-4" } + ], + gridList: [ + { id: "crop-grid-1" }, + { id: "crop-grid-2" }, + { id: "crop-grid-3" }, + { id: "crop-grid-4" } + ], + angleList: [ + { id: "crop-angle-1" }, + { id: "crop-angle-2" }, + { id: "crop-angle-3" }, + { id: "crop-angle-4" } + ], + /** 本地缓存的图片路径 */ + imgSrc: "", + /** 图片的裁剪宽度 */ + imgWidth: IMG_SIZE, + /** 图片的裁剪高度 */ + imgHeight: IMG_SIZE, + /** 裁剪区域最大宽度所占屏幕宽度百分比 */ + widthPercent: AREA_SIZE, + /** 裁剪区域最大高度所占屏幕宽度百分比 */ + heightPercent: AREA_SIZE, + /** 裁剪区域布局信息 */ + area: {}, + /** 未被缩放过的图片宽 */ + oldWidth: 0, + /** 未被缩放过的图片高 */ + oldHeight: 0, + /** 系统信息 */ + sys: common_vendor.index.getSystemInfoSync(), + scaleWidth: 0, + scaleHeight: 0, + rotate: 0, + offsetX: 0, + offsetY: 0, + use2d: false, + canvansWidth: 0, + canvansHeight: 0 + // imageStyles: {}, + // maskStylesList: [{}, {}, {}, {}], + // borderStyles: {}, + // gridStylesList: [{}, {}, {}, {}], + // angleStylesList: [{}, {}, {}, {}], + // circleBoxStyles: {}, + // circleStyles: {}, + }; + }, + computed: { + initData() { + return { + timestamp: (/* @__PURE__ */ new Date()).getTime(), + area: { + ...this.area, + bounce: this.bounce, + showBorder: this.showBorder, + showGrid: this.showGrid, + showAngle: this.showAngle, + angleSize: this.angleSize, + angleBorderWidth: this.angleBorderWidth, + minScale: this.areaScale, + widthPercent: this.widthPercent, + heightPercent: this.heightPercent, + radius: this.radius, + checkRange: this.checkRange, + zIndex: +this.zIndex || 0 + }, + sys: this.sys, + img: { + minScale: this.minScale, + maxScale: this.maxScale, + src: this.imgSrc, + width: this.oldWidth, + height: this.oldHeight, + oldWidth: this.oldWidth, + oldHeight: this.oldHeight, + gpu: this.gpu + } + }; + }, + imgProps() { + return { + width: this.width, + height: this.height, + src: this.src + }; + } + }, + watch: { + imgProps: { + handler(val, oldVal) { + this.imgWidth = Number(val.width) || IMG_SIZE; + this.imgHeight = Number(val.height) || IMG_SIZE; + let use2d = true; + let canvansWidth = this.imgWidth; + let canvansHeight = this.imgHeight; + let size = Math.max(canvansWidth, canvansHeight); + let scalc = 1; + if (size > 1365) { + scalc = 1365 / size; + } + this.canvansWidth = canvansWidth * scalc; + this.canvansHeight = canvansHeight * scalc; + this.use2d = use2d; + this.initArea(); + const src = val.src || this.imgSrc; + src && this.initImage(src, oldVal === void 0); + }, + immediate: true + } + }, + methods: { + /** 提供给wxs调用,用来接收图片变更数据 */ + dataChange(e) { + this.scaleWidth = e.width; + this.scaleHeight = e.height; + this.rotate = e.rotate; + this.offsetX = e.x; + this.offsetY = e.y; + }, + /** 初始化裁剪区域布局信息 */ + initArea() { + this.sys.offsetBottom = common_vendor.index.upx2px(100) + this.sys.safeAreaInsets.bottom; + this.sys.windowTop = 0; + this.sys.navigation = true; + let wp = this.widthPercent; + let hp = this.heightPercent; + if (this.imgWidth > this.imgHeight) { + hp = hp * this.imgHeight / this.imgWidth; + } else if (this.imgWidth < this.imgHeight) { + wp = wp * this.imgWidth / this.imgHeight; + } + const size = this.sys.windowWidth > this.sys.windowHeight ? this.sys.windowHeight : this.sys.windowWidth; + const width = size * wp / 100; + const height = size * hp / 100; + const left = (this.sys.windowWidth - width) / 2; + const right = left + width; + const top = (this.sys.windowHeight + this.sys.windowTop - this.sys.offsetBottom - height) / 2; + const bottom = this.sys.windowHeight + this.sys.windowTop - this.sys.offsetBottom - top; + this.area = { width, height, left, right, top, bottom }; + this.scaleWidth = width; + this.scaleHeight = height; + }, + /** 从本地选取图片 */ + chooseImage(options) { + if (common_vendor.index.chooseMedia) { + common_vendor.index.chooseMedia({ + ...options, + count: 1, + mediaType: ["image"], + success: (res) => { + this.resetData(); + this.initImage(res.tempFiles[0].tempFilePath); + } + }); + return; + } + common_vendor.index.chooseImage({ + ...options, + count: 1, + success: (res) => { + this.resetData(); + this.initImage(res.tempFiles[0].path); + } + }); + }, + /** 重置数据 */ + resetData() { + this.imgSrc = ""; + this.rotate = 0; + this.offsetX = 0; + this.offsetY = 0; + this.initArea(); + }, + /** + * 初始化图片信息 + * @param {String} url 图片链接 + */ + initImage(url, isFirst) { + common_vendor.index.getImageInfo({ + src: url, + success: async (res) => { + if (isFirst && this.src === url) + await new Promise((resolve) => setTimeout(resolve, 50)); + this.imgSrc = res.path; + let scale = res.width / res.height; + let areaScale = this.area.width / this.area.height; + if (scale > 1) { + if (scale >= areaScale) { + this.scaleWidth = this.scaleHeight / res.height * this.scaleWidth * (res.width / this.scaleWidth); + } else { + this.scaleHeight = res.height * this.scaleWidth / res.width; + } + } else { + if (scale <= areaScale) { + this.scaleHeight = this.scaleWidth / res.width * this.scaleHeight / (this.scaleHeight / res.height); + } else { + this.scaleWidth = res.width * this.scaleHeight / res.height; + } + } + this.oldWidth = +this.scaleWidth.toFixed(2); + this.oldHeight = +this.scaleHeight.toFixed(2); + }, + fail: (err) => { + common_vendor.index.__f__("error", "at uni_modules/qf-image-cropper/components/qf-image-cropper/qf-image-cropper.vue:438", err); + } + }); + }, + /** + * 剪切图片圆角 + * @param {Object} ctx canvas 的绘图上下文对象 + * @param {Number} radius 圆角半径 + * @param {Number} scale 生成图片的实际尺寸与截取区域比 + * @param {Function} drawImage 执行剪切时所调用的绘图方法,入参为是否执行了剪切 + */ + drawClipImage(ctx, radius, scale, drawImage) { + if (radius > 0) { + ctx.save(); + ctx.beginPath(); + const w = this.canvansWidth; + const h = this.canvansHeight; + if (w === h && radius >= w / 2) { + ctx.arc(w / 2, h / 2, w / 2, 0, 2 * Math.PI); + } else { + if (w !== h) { + radius = Math.min(w / 2, h / 2, radius); + } + ctx.moveTo(radius, 0); + ctx.arcTo(w, 0, w, h, radius); + ctx.arcTo(w, h, 0, h, radius); + ctx.arcTo(0, h, 0, 0, radius); + ctx.arcTo(0, 0, w, 0, radius); + ctx.closePath(); + } + ctx.clip(); + drawImage && drawImage(true); + ctx.restore(); + } else { + drawImage && drawImage(false); + } + }, + /** + * 旋转图片 + * @param {Object} ctx canvas 的绘图上下文对象 + * @param {Number} rotate 旋转角度 + * @param {Number} scale 生成图片的实际尺寸与截取区域比 + */ + drawRotateImage(ctx, rotate, scale) { + if (rotate !== 0) { + const x = this.scaleWidth * scale / 2; + const y = this.scaleHeight * scale / 2; + ctx.translate(x, y); + ctx.rotate(rotate * Math.PI / 180); + ctx.translate(-x, -y); + } + }, + drawImage(ctx, image, callback) { + const scale = this.canvansWidth / this.area.width; + if (this.backgroundColor) { + if (ctx.setFillStyle) + ctx.setFillStyle(this.backgroundColor); + else + ctx.fillStyle = this.backgroundColor; + ctx.fillRect(0, 0, this.canvansWidth, this.canvansHeight); + } + this.drawClipImage(ctx, this.radius, scale, () => { + this.drawRotateImage(ctx, this.rotate, scale); + const r = this.rotate / 90; + ctx.drawImage( + image, + [ + this.offsetX - this.area.left, + this.offsetY - this.area.top, + -(this.offsetX - this.area.left), + -(this.offsetY - this.area.top) + ][r] * scale, + [ + this.offsetY - this.area.top, + -(this.offsetX - this.area.left), + -(this.offsetY - this.area.top), + this.offsetX - this.area.left + ][r] * scale, + this.scaleWidth * scale, + this.scaleHeight * scale + ); + }); + }, + /** + * 绘图 + * @param {Object} canvas + * @param {Object} ctx canvas 的绘图上下文对象 + * @param {String} src 图片路径 + * @param {Function} callback 开始绘制时回调 + */ + draw2DImage(canvas, ctx, src, callback) { + if (canvas) { + const image = canvas.createImage(); + image.onload = () => { + this.drawImage(ctx, image); + callback && setTimeout(callback, this.delay); + }; + image.onerror = (err) => { + common_vendor.index.__f__("error", "at uni_modules/qf-image-cropper/components/qf-image-cropper/qf-image-cropper.vue:541", err); + common_vendor.index.hideLoading(); + }; + image.src = src; + } else { + this.drawImage(ctx, src); + setTimeout(() => { + ctx.draw(false, callback); + }, 200); + } + }, + /** + * 画布转图片到本地缓存 + * @param {Object} canvas + * @param {String} canvasId + */ + canvasToTempFilePath(canvas, canvasId) { + common_vendor.index.canvasToTempFilePath({ + canvas, + canvasId, + x: 0, + y: 0, + width: this.canvansWidth, + height: this.canvansHeight, + destWidth: this.imgWidth, + // 必要,保证生成图片宽度不受设备分辨率影响 + destHeight: this.imgHeight, + // 必要,保证生成图片高度不受设备分辨率影响 + fileType: this.fileType, + // 目标文件的类型,默认png + success: (res) => { + this.handleImage(res.tempFilePath); + }, + fail: (err) => { + common_vendor.index.hideLoading(); + common_vendor.index.showToast({ title: "裁剪失败,生成图片异常!", icon: "none" }); + } + }, this); + }, + cropCancel() { + this.$emit("cancel"); + }, + /** 确认裁剪 */ + cropClick() { + common_vendor.index.showLoading({ title: "裁剪中...", mask: true }); + if (!this.use2d) { + const ctx = common_vendor.index.createCanvasContext("imgCanvas", this); + ctx.clearRect(0, 0, this.canvansWidth, this.canvansHeight); + this.draw2DImage(null, ctx, this.imgSrc, () => { + this.canvasToTempFilePath(null, "imgCanvas"); + }); + return; + } + const query = common_vendor.index.createSelectorQuery().in(this); + query.select("#imgCanvas").fields({ node: true, size: true }).exec((res) => { + const canvas = res[0].node; + const dpr = common_vendor.index.getSystemInfoSync().pixelRatio; + canvas.width = res[0].width * dpr; + canvas.height = res[0].height * dpr; + const ctx = canvas.getContext("2d"); + ctx.scale(dpr, dpr); + ctx.clearRect(0, 0, this.canvansWidth, this.canvansHeight); + this.draw2DImage(canvas, ctx, this.imgSrc, () => { + this.canvasToTempFilePath(canvas); + }); + }); + }, + handleImage(tempFilePath) { + common_vendor.index.hideLoading(); + this.$emit("crop", { tempFilePath }); + } + } +}; +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + return common_vendor.e({ + a: $data.use2d + }, $data.use2d ? { + b: `${$data.canvansWidth}px`, + c: `${$data.canvansHeight}px` + } : { + d: `${$data.canvansWidth}px`, + e: `${$data.canvansHeight}px` + }, { + f: $data.imgSrc + }, $data.imgSrc ? { + g: $data.imgSrc + } : {}, { + h: common_vendor.f($data.maskList, (item, index, i0) => { + return { + a: item.id, + b: item.id + }; + }), + i: $props.showBorder + }, $props.showBorder ? {} : {}, { + j: $props.radius > 0 + }, $props.radius > 0 ? {} : {}, { + k: $props.showGrid + }, $props.showGrid ? { + l: common_vendor.f($data.gridList, (item, index, i0) => { + return { + a: item.id, + b: item.id + }; + }) + } : {}, { + m: $props.showAngle + }, $props.showAngle ? { + n: common_vendor.f($data.angleList, (item, index, i0) => { + return { + a: item.id, + b: item.id + }; + }), + o: common_vendor.s({ + width: `${$props.angleSize}px`, + height: `${$props.angleSize}px` + }) + } : {}, { + p: $options.initData, + q: ($props.rotatable || $props.reverseRotatable) && !!$data.imgSrc + }, ($props.rotatable || $props.reverseRotatable) && !!$data.imgSrc ? common_vendor.e({ + r: $props.reverseRotatable + }, $props.reverseRotatable ? {} : {}, { + s: $props.rotatable + }, $props.rotatable ? {} : {}) : {}, { + t: !$props.choosable + }, !$props.choosable ? { + v: common_vendor.o((...args) => $options.cropClick && $options.cropClick(...args)) + } : !!$data.imgSrc ? { + x: common_vendor.o((...args) => $options.chooseImage && $options.chooseImage(...args)), + y: common_vendor.o((...args) => $options.cropCancel && $options.cropCancel(...args)), + z: common_vendor.o((...args) => $options.cropClick && $options.cropClick(...args)) + } : { + A: common_vendor.o((...args) => $options.chooseImage && $options.chooseImage(...args)) + }, { + w: !!$data.imgSrc, + B: $options.initData.area.zIndex + 99, + C: $props.zIndex + }); +} +if (typeof block0 === "function") + block0(_sfc_main); +const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-7129956f"]]); +wx.createComponent(Component); +//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/qf-image-cropper/components/qf-image-cropper/qf-image-cropper.js.map diff --git a/unpackage/dist/dev/mp-weixin/uni_modules/qf-image-cropper/components/qf-image-cropper/qf-image-cropper.json b/unpackage/dist/dev/mp-weixin/uni_modules/qf-image-cropper/components/qf-image-cropper/qf-image-cropper.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/uni_modules/qf-image-cropper/components/qf-image-cropper/qf-image-cropper.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/uni_modules/qf-image-cropper/components/qf-image-cropper/qf-image-cropper.wxml b/unpackage/dist/dev/mp-weixin/uni_modules/qf-image-cropper/components/qf-image-cropper/qf-image-cropper.wxml new file mode 100644 index 0000000..0a5d42c --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/uni_modules/qf-image-cropper/components/qf-image-cropper/qf-image-cropper.wxml @@ -0,0 +1,730 @@ + +/** + * 图片编辑器-手势监听 + * 1. wxs 暂不支持 es6 语法 + * 2. 支持编译到微信小程序、QQ小程序、app-vue、H5上(uni-app 2.2.5及以上版本) + */ +/** 图片偏移量 */ +var offset = { x: 0, y: 0 }; +/** 图片缩放比例 */ +var scale = 1; +/** 图片最小缩放比例 */ +var minScale = 1; +/** 图片旋转角度 */ +var rotate = 0; +/** 触摸点 */ +var touches = []; +/** 图片布局信息 */ +var img = {}; +/** 系统信息 */ +var sys = {}; +/** 裁剪区域布局信息 */ +var area = {}; +/** 触摸行为类型 */ +var touchType = ''; +/** 操作角的位置 */ +var activeAngle = 0; +/** 裁剪区域布局信息偏移量 */ +var areaOffset = { left: 0, right: 0, top: 0, bottom: 0 }; +/** 容错值 */ +var fault = 0.000001; +/** + * 获取a、b两数中的最小正数 + * @param a + * @param b + */ +function minimum(a, b) { + if (a > 0 && b < 0) return a; + if (a < 0 && b > 0) return b; + if (a > 0 && b > 0) return Math.min(a, b); + return 0; +} +/** + * 在容错访问内获取n近似值 + * @param n + */ +function num(n) { + var m = parseFloat((n).toFixed(6)); + return m === fault || m === -fault ? 0 : m; +} +/** + * 比较a值在容错值范围内是否等于b值 + * @param a + * @param b + */ +function equalsByFault(a, b) { + return Math.abs(a - b) <= fault; +} +/** + * 比较a值在容错值范围内是否小于b值 + * @param a + * @param b + */ +function lessThanByFault(a, b) { + var c = a - b; + return c < 0 ? c < -fault : c < fault; +} +/** + * 验证并获取有效最大值 + * @param v + * @param max + * @param isInclude + * @param x + * @param y + * @param rate + * @returns + */ +function validMax(v, max, isInclude, x, y, rate) { + if(typeof max === 'number') { + if(isInclude && equalsByFault(max, y)) { // 宽高不等时,x轴用y轴值要做等比例转换 + var n = num(max * rate); + if (n <= x) return n; // 转化后值在x轴最大值范围内 + return x; // 转化后值超出x轴最大值范围则用最大值 + } + return max; + } + return v; +} +/** + * 计算两点间距 + * @param {Object} touches 触摸点信息 + */ +function getDistanceByTouches(touches) { + // 根据勾股定理求两点间距离 + var a = touches[1].pageX - touches[0].pageX; + var b = touches[1].pageY - touches[0].pageY; + var c = Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2)); + // 求两点间的中点坐标 + // 1. a、b可能为负值 + // 2. 在求a、b时,如用touches[1]减touches[0],则求中点坐标也得用touches[1]减a/2、b/2 + // 3. 同理,在求a、b时,也可用touches[0]减touches[1],则求中点坐标也得用touches[0]减a/2、b/2 + var x = touches[1].pageX - a / 2; + var y = touches[1].pageY - b / 2; + return { c, x, y }; +}; +/** + * 修正取值 + * @param {Object} a + * @param {Object} b + * @param {Object} c + * @param {Object} reverse 是否反向 + */ +function correctValue(a, b, c, reverse) { + return num(reverse ? Math.max(Math.min(a, b), c) : Math.min(Math.max(a, b), c)); +} + +/** + * 旋转90°或270°时检查边界:限制 x、y 拖动范围,禁止滑出边界 + * @param {Object} e 点坐标 + * @param {Object} xReverse x是否反向 + * @param {Object} yReverse y是否反向 + */ +function checkRotateRange(e, xReverse, yReverse) { + var o = num((img.height - img.width) / 2); // 宽高差值一半 + return { + x: correctValue(e.x, -img.height + o + area.width + area.left, area.left + o, xReverse), + y: correctValue(e.y, -img.width - o + area.height + area.top, area.top - o, yReverse) + }; +} + +/** + * 检查边界:限制 x、y 拖动范围,禁止滑出边界 + * @param {Object} e 点坐标 + */ +function checkRange(e) { + var r = rotate / 90 % 2; + if(r === 1) { // 因图片宽高可能不等,翻转 90° 或 270° 后图片宽高需反着计算,且左右和上下边界要根据差值做偏移 + if (area.width === area.height) { + return checkRotateRange(e, img.height < area.height, img.width < area.width); + } + var isInclude = img.height < area.width && img.width < area.height; // 图片是否包含在裁剪区域内 + if (img.width < area.height || img.height < area.width) { + if (area.width < area.height && img.width < img.height) { + return isInclude + ? checkRotateRange(e, area.width < area.height, area.width < area.height) + : checkRotateRange(e, false, true); + } + if (area.height < area.width && img.height < img.width) { + return isInclude + ? checkRotateRange(e, area.height < area.width, area.height < area.width) + : checkRotateRange(e, true, false); + } + } + if (img.height >= area.width && img.width >= area.height) { + return checkRotateRange(e, false, false); + } + if (isInclude) { + return area.height < area.width + ? checkRotateRange(e, true, true) + : checkRotateRange(e, area.width < area.height, area.width < area.height); + } + if (img.height < area.width && !img.width < area.height) { + return checkRotateRange(e, true, false); + } + if (!img.height < area.width && img.width < area.height) { + return checkRotateRange(e, false, true); + } + return checkRotateRange(e, img.height < area.height, img.width < area.width); + } + return { + x: correctValue(e.x, -img.width + area.width + area.left, area.left, img.width < area.width), + y: correctValue(e.y, -img.height + area.height + area.top, area.top, img.height < area.height) + }; +}; +/** + * 变更图片布局信息 + * @param {Object} e 布局信息 + */ +function changeImageRect(e) { + offset.x += e.x || 0; + offset.y += e.y || 0; + var image = e.instance.selectComponent('.crop-image'); + if(e.check && area.checkRange) { // 检查边界 + var point = checkRange(offset); + if(offset.x !== point.x || offset.y !== point.y) { + offset = point; + } + } + // image.setStyle({ + // width: img.width + 'px', + // height: img.height + 'px', + // transform: 'translate(' + offset.x + 'px, ' + offset.y + 'px) rotate(' + rotate +'deg)' + // }); + var ox = (img.width - img.oldWidth) / 2; + var oy = (img.height - img.oldHeight) / 2; + image.setStyle({ + width: img.oldWidth + 'px', + height: img.oldHeight + 'px', + transform: (img.gpu ? 'translateZ(0) ' : '') + 'translate(' + (offset.x + ox) + 'px, ' + (offset.y + oy) + 'px) rotate(' + rotate +'deg) scale(' + scale + ')' + }); + + e.instance.callMethod('dataChange', { + width: img.width, + height: img.height, + x: offset.x, + y: offset.y, + rotate: rotate + }); +}; +/** + * 变更裁剪区域布局信息 + * @param {Object} e 布局信息 + */ +function changeAreaRect(e) { + // 变更蒙版样式 + var masks = e.instance.selectAllComponents('.crop-mask-block'); + var maskStyles = [ + { + left: 0, + width: (area.left + areaOffset.left) + 'px', + top: 0, + bottom: 0, + 'z-index': area.zIndex + 2 + }, + { + left: (area.right + areaOffset.right) + 'px', + right: 0, + top: 0, + bottom: 0, + 'z-index': area.zIndex + 2 + }, + { + left: (area.left + areaOffset.left) + 'px', + width: (area.width + areaOffset.right - areaOffset.left) + 'px', + top: 0, + height: (area.top + areaOffset.top) + 'px', + 'z-index': area.zIndex + 2 + }, + { + left: (area.left + areaOffset.left) + 'px', + width: (area.width + areaOffset.right - areaOffset.left) + 'px', + top: (area.bottom + areaOffset.bottom) + 'px', + // height: (area.top - areaOffset.bottom + sys.offsetBottom) + 'px', + bottom: 0, + 'z-index': area.zIndex + 2 + } + ]; + var len = masks.length; + for (var i = 0; i < len; i++) { + masks[i].setStyle(maskStyles[i]); + } + + // 变更边框样式 + if(area.showBorder) { + var border = e.instance.selectComponent('.crop-border'); + border.setStyle({ + left: (area.left + areaOffset.left) + 'px', + top: (area.top + areaOffset.top) + 'px', + width: (area.width + areaOffset.right - areaOffset.left) + 'px', + height: (area.height + areaOffset.bottom - areaOffset.top) + 'px', + 'z-index': area.zIndex + 3 + }); + } + + // 变更参考线样式 + if(area.showGrid) { + var grids = e.instance.selectAllComponents('.crop-grid'); + var gridStyles = [ + { + 'border-width': '1px 0 0 0', + left: (area.left + areaOffset.left) + 'px', + right: (area.right + areaOffset.right) + 'px', + top: (area.top + areaOffset.top + (area.height + areaOffset.bottom - areaOffset.top) / 3 - 0.5) + 'px', + width: (area.width + areaOffset.right - areaOffset.left) + 'px', + 'z-index': area.zIndex + 3 + }, + { + 'border-width': '1px 0 0 0', + left: (area.left + areaOffset.left) + 'px', + right: (area.right + areaOffset.right) + 'px', + top: (area.top + areaOffset.top + (area.height + areaOffset.bottom - areaOffset.top) * 2 / 3 - 0.5) + 'px', + width: (area.width + areaOffset.right - areaOffset.left) + 'px', + 'z-index': area.zIndex + 3 + }, + { + 'border-width': '0 1px 0 0', + top: (area.top + areaOffset.top) + 'px', + bottom: (area.bottom + areaOffset.bottom) + 'px', + left: (area.left + areaOffset.left + (area.width + areaOffset.right - areaOffset.left) / 3 - 0.5) + 'px', + height: (area.height + areaOffset.bottom - areaOffset.top) + 'px', + 'z-index': area.zIndex + 3 + }, + { + 'border-width': '0 1px 0 0', + top: (area.top + areaOffset.top) + 'px', + bottom: (area.bottom + areaOffset.bottom) + 'px', + left: (area.left + areaOffset.left + (area.width + areaOffset.right - areaOffset.left) * 2 / 3 - 0.5) + 'px', + height: (area.height + areaOffset.bottom - areaOffset.top) + 'px', + 'z-index': area.zIndex + 3 + } + ]; + var len = grids.length; + for (var i = 0; i < len; i++) { + grids[i].setStyle(gridStyles[i]); + } + } + + // 变更四个伸缩角样式 + if(area.showAngle) { + var angles = e.instance.selectAllComponents('.crop-angle'); + var angleStyles = [ + { + 'border-width': area.angleBorderWidth + 'px 0 0 ' + area.angleBorderWidth + 'px', + left: (area.left + areaOffset.left - area.angleBorderWidth) + 'px', + top: (area.top + areaOffset.top - area.angleBorderWidth) + 'px', + 'z-index': area.zIndex + 3 + }, + { + 'border-width': area.angleBorderWidth + 'px ' + area.angleBorderWidth + 'px 0 0', + left: (area.right + areaOffset.right - area.angleSize) + 'px', + top: (area.top + areaOffset.top - area.angleBorderWidth) + 'px', + 'z-index': area.zIndex + 3 + }, + { + 'border-width': '0 0 ' + area.angleBorderWidth + 'px ' + area.angleBorderWidth + 'px', + left: (area.left + areaOffset.left - area.angleBorderWidth) + 'px', + top: (area.bottom + areaOffset.bottom - area.angleSize) + 'px', + 'z-index': area.zIndex + 3 + }, + { + 'border-width': '0 ' + area.angleBorderWidth + 'px ' + area.angleBorderWidth + 'px 0', + left: (area.right + areaOffset.right - area.angleSize) + 'px', + top: (area.bottom + areaOffset.bottom - area.angleSize) + 'px', + 'z-index': area.zIndex + 3 + } + ]; + var len = angles.length; + for (var i = 0; i < len; i++) { + angles[i].setStyle(angleStyles[i]); + } + } + + // 变更圆角样式 + if(area.radius > 0) { + var circleBox = e.instance.selectComponent('.crop-circle-box'); + var circle = e.instance.selectComponent('.crop-circle'); + var radius = area.radius; + if(area.width === area.height && area.radius >= area.width / 2) { // 圆形 + radius = (area.width / 2); + } else { // 圆角矩形 + if(area.width !== area.height) { // 限制圆角半径不能超过短边的一半 + radius = Math.min(area.width / 2, area.height / 2, radius); + } + } + circleBox.setStyle({ + left: (area.left + areaOffset.left) + 'px', + top: (area.top + areaOffset.top) + 'px', + width: (area.width + areaOffset.right - areaOffset.left) + 'px', + height: (area.height + areaOffset.bottom - areaOffset.top) + 'px', + 'z-index': area.zIndex + 2 + }); + circle.setStyle({ + 'box-shadow': '0 0 0 ' + Math.max(area.width, area.height) + 'px rgba(51, 51, 51, 0.8)', + 'border-radius': radius + 'px' + }); + } +}; +/** + * 缩放图片 + * @param {Object} e 布局信息 + */ +function scaleImage(e) { + var last = scale; + scale = Math.min(Math.max(e.scale + scale, minScale), img.maxScale); + if(last !== scale) { + img.width = num(img.oldWidth * scale); + img.height = num(img.oldHeight * scale); + // 参考问题:有一个长4000px、宽4000px的四方形ABCD,A点的坐标固定在(-2000,-2000), + // 该四边形上有一个点E,坐标为(-100,-300),将该四方形复制一份并缩小到90%后, + // 新四边形的A点坐标为多少时可使新四边形的E点与原四边形的E点重合? + // 预期效果:从图中选取某点(参照物)为中心点进行缩放,缩放时无论图像怎么变化,该点位置始终固定不变 + // 计算方法:以相同起点先计算缩放前后两点间的距离,再加上原图像偏移量即可 + e.x = num((e.x - offset.x) * (1 - scale / last)); + e.y = num((e.y - offset.y) * (1 - scale / last)); + changeImageRect(e); + return true; + } + return false; +}; +/** + * 获取触摸点在哪个角 + * @param {number} x 触摸点x轴坐标 + * @param {number} y 触摸点y轴坐标 + * @return {number} 角的位置:0=无;1=左上;2=右上;3=左下;4=右下; + */ +function getToucheAngle(x, y) { + // console.log('getToucheAngle', x, y, JSON.stringify(area)) + var o = area.angleBorderWidth; // 需扩大触发范围则把 o 值加大即可 + if(y >= area.top - o && y <= area.top + area.angleSize + o) { + if(x >= area.left - o && x <= area.left + area.angleSize + o) { + return 1; // 左上角 + } else if(x >= area.right - area.angleSize - o && x <= area.right + o) { + return 2; // 右上角 + } + } else if(y >= area.bottom - area.angleSize - o && y <= area.bottom + o) { + if(x >= area.left - o && x <= area.left + area.angleSize + o) { + return 3; // 左下角 + } else if(x >= area.right - area.angleSize - o && x <= area.right + o) { + return 4; // 右下角 + } + } + return 0; // 无触摸到角 +}; +/** + * 重置数据 + */ +function resetData() { + offset = { x: 0, y: 0 }; + scale = 1; + minScale = img.minScale; + rotate = 0; +}; +/** +* 顺时针翻转图片90° +* @param {Object} e 事件对象 +* @param {Object} o 组件实例对象 +*/ +function rotateImage(e, o, r) { + rotate = (rotate + r) % 360; + if(img.minScale >= 1 && area.checkRange) { + // 因图片宽高可能不等,翻转后图片宽高需足够填满裁剪区域 + minScale = 1; + if(img.width < area.height) { + minScale = area.height / img.oldWidth; + } else if(img.height < area.width) { + minScale = area.width / img.oldHeight; + } + if(minScale !== 1) { + scaleImage({ + instance: o, + scale: minScale - scale, + x: sys.windowWidth / 2, + y: (sys.windowHeight - sys.offsetBottom) / 2 + }); + } + } + + // 由于拖动画布后会导致图片位置偏移,翻转时的旋转中心点需是图片区域+偏移区域的中心点 + // 翻转x轴中心点 = (超出裁剪区域右侧的图片宽度 - 超出裁剪区域左侧的图片宽度) / 2 + // 翻转y轴中心点 = (超出裁剪区域下方的图片宽度 - 超出裁剪区域上方的图片宽度) / 2 + var ox = ((offset.x + img.width - area.right) - (area.left - offset.x)) / 2; + var oy = ((offset.y + img.height - area.bottom) - (area.top - offset.y)) / 2; + changeImageRect({ + instance: o, + check: true, + x: -ox - oy, + y: -oy + ox + }); +}; +module.exports = { + /** + * 初始化:观察数据变更 + * @param {Object} newVal 新数据 + * @param {Object} oldVal 旧数据 + * @param {Object} o 组件实例对象 + */ + initObserver: function(newVal, oldVal, o, i) { + if(newVal) { + img = newVal.img; + sys = newVal.sys; + area = newVal.area; + minScale = img.minScale; + resetData(); + img.src && changeImageRect({ + instance: o, + x: (sys.windowWidth - img.width) / 2, + y: (sys.windowHeight - sys.offsetBottom - img.height) / 2 + }); + changeAreaRect({ + instance: o + }); + // console.log('initRect', JSON.stringify(newVal)) + } + }, + /** + * 鼠标滚轮滚动 + * @param {Object} e 事件对象 + * @param {Object} o 组件实例对象 + */ + mousewheel: function(e, o) { + if(!img.src) return; + scaleImage({ + instance: o, + check: true, + // 鼠标向上滚动时,deltaY 固定 -100,鼠标向下滚动时,deltaY 固定 100 + scale: e.detail.deltaY > 0 ? -0.05 : 0.05, + x: e.touches[0].pageX, + y: e.touches[0].pageY + }); + }, + /** + * 触摸开始 + * @param {Object} e 事件对象 + * @param {Object} o 组件实例对象 + */ + touchstart: function(e, o) { + if(!img.src) return; + touches = e.touches; + activeAngle = area.showAngle ? getToucheAngle(touches[0].pageX, touches[0].pageY) : 0; + if(touches.length === 1 && activeAngle !== 0) { + touchType = 'stretch'; // 伸缩裁剪区域 + } else { + touchType = ''; + } + // console.log('touchstart', JSON.stringify(e), activeAngle) + }, + /** + * 触摸移动 + * @param {Object} e 事件对象 + * @param {Object} o 组件实例对象 + */ + touchmove: function(e, o) { + if(!img.src) return; + // console.log('touchmove', JSON.stringify(e), JSON.stringify(o)) + if(touchType === 'stretch') { // 触摸四个角进行拉伸 + var point = e.touches[0]; + var start = touches[0]; + var x = point.pageX - start.pageX; + var y = point.pageY - start.pageY; + if(x !== 0 || y !== 0) { + var maxX = num(area.width * (1 - area.minScale)); + var maxY = num(area.height * (1 - area.minScale)); + // console.log(x, y, maxX, maxY, offset, area) + touches[0] = point; + var r = rotate / 90 % 2; + var m = r === 1 ? num((img.height - img.width) / 2) : 0; // 宽高差值一半 + var xCompare = r === 1 ? lessThanByFault(img.height, area.width) : lessThanByFault(img.width, area.width); + var yCompare = r === 1 ? lessThanByFault(img.width, area.height) : lessThanByFault(img.height, area.height) + var isInclude = xCompare && yCompare; + var isIntersect = area.checkRange && (xCompare || yCompare); // 图片是否包含在裁剪区域内 + var isReverse = !isInclude || num((offset.x - area.left) / area.width) <= num((offset.y - area.top) / area.height) || (area.width > area.height && img.width < img.height && r === 1); + switch(activeAngle) { + case 1: // 左上角 + x = num(x + areaOffset.left); + y = num(y + areaOffset.top); + if(x >= 0 && y >= 0) { // 有效滑动 + var t = num(offset.y + m - area.top); + var l = num(offset.x - m - area.left); + // && (offset.x + img.width < area.right || offset.y + img.height < area.bottom) + var max = isIntersect && ((l >= 0) || (t >= 0)) + ? minimum(t, l) + : false; + if(x > y && isReverse) { // 以x轴滑动距离为缩放基准 + maxX = validMax(maxX, max, isInclude, l, t, area.width / area.height); + if(x > maxX) x = maxX; + y = num(x * area.height / area.width); + } else { // 以y轴滑动距离为缩放基准 + maxY = validMax(maxY, max, isInclude, t, l, area.height / area.width); + if(y > maxY) y = maxY; + x = num(y * area.width / area.height); + } + areaOffset.left = x; + areaOffset.top = y; + } + break; + case 2: // 右上角 + x = num(x + areaOffset.right); + y = num(y + areaOffset.top); + if(x <= 0 && y >= 0) { // 有效滑动 + var w = (r === 1 ? img.height : img.width); + var t = num(offset.y + m - area.top); + var l = num(area.right + m - offset.x - w); + var max = isIntersect && ((t >= 0) || (l >= 0)) + ? minimum(t, l) + : false; + // var max = isInclude && ((offset.x > 0 && offset.x + img.width <= area.right) || (offset.y > 0 && offset.y >= area.top)) + // ? minimum(offset.y - area.top, area.right - offset.x - img.width) + // : false; + // console.log(offset.x, offset.y, img.width, img.height, area.top, area.right, m, max) + // console.log(offset.y + m - area.top, area.right + m - offset.x - w) + if(-x > y && isReverse) { // 以x轴滑动距离为缩放基准 + maxX = validMax(maxX, max, isInclude, l, t, area.width / area.height); + if(-x > maxX) x = -maxX; + y = num(-x * area.height / area.width); + } else { // 以y轴滑动距离为缩放基准 + maxY = validMax(maxY, max, isInclude, t, l, area.height / area.width); + if(y > maxY) y = maxY; + x = num(-y * area.width / area.height); + } + areaOffset.right = x; + areaOffset.top = y; + } + break; + case 3: // 左下角 + x += num(x + areaOffset.left); + y += num(y + areaOffset.bottom); + if(x >= 0 && y <= 0) { // 有效滑动 + var w = (r === 1 ? img.width : img.height); + var t = num(area.bottom - m - offset.y - w); + var l = num(offset.x - m - area.left); + var max = isIntersect && ((l >= 0) || (t >= 0)) + ? minimum(t, l) + : false; + if(x > -y && isReverse) { // 以x轴滑动距离为缩放基准 + maxX = validMax(maxX, max, isInclude, l, t, area.width / area.height); + if(x > maxX) x = maxX; + y = num(-x * area.height / area.width); + } else { // 以y轴滑动距离为缩放基准 + maxY = validMax(maxY, max, isInclude, t, l, area.height / area.width); + if(-y > maxY) y = -maxY; + x = num(-y * area.width / area.height); + } + areaOffset.left = x; + areaOffset.bottom = y; + } + break; + case 4: // 右下角 + x = num(x + areaOffset.right); + y = num(y + areaOffset.bottom); + if(x <= 0 && y <= 0) { // 有效滑动 + var w = (r === 1 ? img.height : img.width); + var h = (r === 1 ? img.width : img.height); + var t = num(area.bottom - offset.y - h - m); + var l = num(area.right + m - offset.x - w); + var max = isIntersect && ((l >= 0) || (t >= 0)) + ? minimum(t, l) + : false; + if(-x > -y && isReverse) { // 以x轴滑动距离为缩放基准 + maxX = validMax(maxX, max, isInclude, l, t, area.width / area.height); + if(-x > maxX) x = -maxX; + y = num(x * area.height / area.width); + } else { // 以y轴滑动距离为缩放基准 + maxY = validMax(maxY, max, isInclude, t, l, area.height / area.width); + if(-y > maxY) y = -maxY; + x = num(y * area.width / area.height); + } + areaOffset.right = x; + areaOffset.bottom = y; + } + break; + } + // console.log(x, y, JSON.stringify(areaOffset)) + changeAreaRect({ + instance: o, + }); + // this.draw(); + } + } else if (e.touches.length == 2) { // 双点触摸缩放 + var start = getDistanceByTouches(touches); + var end = getDistanceByTouches(e.touches); + scaleImage({ + instance: o, + check: !area.bounce, + scale: (end.c - start.c) / 100, + x: end.x, + y: end.y + }); + touchType = 'scale'; + } else if(touchType === 'scale') {// 从双点触摸变成单点触摸 / 从缩放变成拖动 + touchType = 'move'; + } else { + changeImageRect({ + instance: o, + check: !area.bounce, + x: e.touches[0].pageX - touches[0].pageX, + y: e.touches[0].pageY - touches[0].pageY + }); + touchType = 'move'; + } + touches = e.touches; + }, + /** + * 触摸结束 + * @param {Object} e 事件对象 + * @param {Object} o 组件实例对象 + */ + touchend: function(e, o) { + if(!img.src) return; + if(touchType === 'stretch') { // 拉伸裁剪区域的四个角缩放 + // 裁剪区域宽度被缩放到多少 + var left = areaOffset.left; + var right = areaOffset.right; + var top = areaOffset.top; + var bottom = areaOffset.bottom; + var w = area.width + right - left; + var h = area.height + bottom - top; + // 图像放大倍数 + var p = scale * (area.width / w) - scale; + // 复原裁剪区域 + areaOffset = { left: 0, right: 0, top: 0, bottom: 0 }; + changeAreaRect({ + instance: o, + }); + scaleImage({ + instance: o, + scale: p, + x: area.left + left + (1 === activeAngle || 3 === activeAngle ? w : 0), + y: area.top + top + (1 === activeAngle || 2 === activeAngle ? h : 0) + }); + } else if (area.bounce) { // 检查边界并矫正,实现拖动到边界时有回弹效果 + changeImageRect({ + instance: o, + check: true + }); + } + }, + /** + * 顺时针翻转图片90° + * @param {Object} e 事件对象 + * @param {Object} o 组件实例对象 + */ + rotateImage: function(e, o) { + rotateImage(e, o, 90); + }, + rotateImage90: function(e, o) { + rotateImage(e, o, 90) + }, + rotateImage270: function(e, o) { + rotateImage(e, o, 270) + }, + // 此处只用于对齐其他平台端的样式参数,防止异常,无作用 + imageStyles: '', + maskStylesList: ['', '', '', ''], + borderStyles: '', + gridStylesList: ['', '', '', ''], + angleStylesList: ['', '', '', ''], + circleBoxStyles: '', + circleStyles: '', +} + +确定重选选择图片 \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/uni_modules/qf-image-cropper/components/qf-image-cropper/qf-image-cropper.wxss b/unpackage/dist/dev/mp-weixin/uni_modules/qf-image-cropper/components/qf-image-cropper/qf-image-cropper.wxss new file mode 100644 index 0000000..732d436 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/uni_modules/qf-image-cropper/components/qf-image-cropper/qf-image-cropper.wxss @@ -0,0 +1,146 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ +.image-cropper.data-v-7129956f { + position: fixed; + left: 0; + right: 0; + top: 0; + bottom: 0; + overflow: hidden; + display: flex; + flex-direction: column; + background-color: #000; +} +.image-cropper .img-canvas.data-v-7129956f { + position: absolute !important; + transform: translateX(-100%); +} +.image-cropper .pic-preview.data-v-7129956f { + width: 100%; + flex: 1; + position: relative; +} +.image-cropper .pic-preview .crop-mask-block.data-v-7129956f { + background-color: rgba(51, 51, 51, 0.8); + z-index: 2; + position: fixed; + box-sizing: border-box; + pointer-events: none; +} +.image-cropper .pic-preview .crop-circle-box.data-v-7129956f { + position: fixed; + box-sizing: border-box; + z-index: 2; + pointer-events: none; + overflow: hidden; +} +.image-cropper .pic-preview .crop-circle-box .crop-circle.data-v-7129956f { + width: 100%; + height: 100%; +} +.image-cropper .pic-preview .crop-image.data-v-7129956f { + padding: 0 !important; + margin: 0 !important; + border-radius: 0 !important; + display: block !important; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; +} +.image-cropper .pic-preview .crop-border.data-v-7129956f { + position: fixed; + border: 1px solid #fff; + box-sizing: border-box; + z-index: 3; + pointer-events: none; +} +.image-cropper .pic-preview .crop-grid.data-v-7129956f { + position: fixed; + z-index: 3; + border-style: dashed; + border-color: #fff; + pointer-events: none; + opacity: 0.5; +} +.image-cropper .pic-preview .crop-angle.data-v-7129956f { + position: fixed; + z-index: 3; + border-style: solid; + border-color: #fff; + pointer-events: none; +} +.image-cropper .fixed-bottom.data-v-7129956f { + position: fixed; + left: 0; + right: 0; + bottom: 0; + z-index: 99; + display: flex; + flex-direction: row; + background-color: #f8f8f8; +} +.image-cropper .fixed-bottom .action-bar.data-v-7129956f { + position: absolute; + top: -90rpx; + left: 10rpx; + display: flex; +} +.image-cropper .fixed-bottom .action-bar .rotate-icon.data-v-7129956f { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAABCFJREFUaEPtml3IpVMUx3//ko/ChTIyiGFSMyhllI8bc4F85yuNC2FCqLmQC1+FZORiEkUMNW7UjKjJULgxV+NzSkxDhEkZgwsyigv119J63p7zvOc8z37OmXdOb51dz82711r7/99r7bXXXucVi3xokeNnRqCvB20fDmwAlgK/5bcD+FTSr33tHXQP2H4MeHQE0A+B5yRtLiUyDQJrgVc6AAaBpyV93kXkoBMIQLbfBS5NcK8BRwDXNcD+AdwnaVMbiWkRCPBBohpxHuK7M7865sclRdgNHVMhkF6IMIpwirFEUhzo8M7lwIvASTXEqyVtH8ZgagQSbOzsDknv18HZXpHn5IL8+94IOUm7miSmSqAttjPdbgGuTrnNktYsGgLpoYuAD2qg1zRTbG8P2D4SOC6/Q7vSHPALsE/S7wWy80RsPw/ckxMfSTq/LtRJwPbxwF3ASiCUTxwHCPAnEBfVF8AWSTtL7Ng+LfWOTfmlkn6udFsJ5K15R6a4kvX6yGyUFBvTOWzHXXFzCt4g6c1OArYj9iIGh43YgR+BvztXh1PSa4cMkd0jaVmXDduPAE+k3HpJD7cSGFKvfAc8FQUX8IOk/V2L1udtB/hTgdOBW4Aba/M7Ja1qs2f7euCNlHlZUlx4/495IWQ7Jl+qGbxX0gt9AHfJ2o6zFBVoNVrDKe+F3Sm8VdK1bQQ+A85JgXckXdkFaJx527cC9TpnVdvBtl3h2iapuhsGPdBw1b9xnUvaNw7AEh3bnwDnpuwGSfeP0rN9NvAMELXRXFkxEEK2nwQeSiOtRVQJwC4Z29cAW1Nuu6TVXTrN+SaBt4ErUug2Sa/2NdhH3vZy4NvU2S/p6D768w5xI3WOrAD7LtISFpGdIhVXKfaYvjd20wP13L9M0p4DBbaFRKToSLExVkr6qs+aIwlI6iwz+izUQqC+ab29PiMwqRcmPXczD8w8MFj1zg7xXEqbpdHCw7FgWSjafZL+KcQxtpjteCeflwYulFR/J3TabSslVkj6utPChAK2f6q9uZdLitKieLQRuExSvX9ZbLRUMFs09efpUZL+KtUfVo1GW/umNHC3pOhRLtiwfSbwZS6wV9IJfRdreuBBYH0a2STp9r4G+8jbXgc8mzoDT8VSO00ClwDv1ZR7XyylC4ec7ejaLUmdsV6Aw7oSbwFXpdFdks7qA6pU1na0aR6owgeIR/1cx63UzjAC0YXYVjMQHlkn6ZtSo21ytuPZGKFagQ/xsXZ/3iGuFrYdjafXG0DiQMeBi47c9/GV3BO247UV38n5o0UAP6xmu7jFOGxjRr66On5NPBDOCBsDTapxjHY1dyOcolNXnYlx1himE53p2PmNkxosevfavhg4Izt2k7TXPwZ2S6p6QZPin/2rwcQ7OKmBohCadJGF1P8PG6aaQBKVX/8AAAAASUVORK5CYII="); + background-size: 60% 60%; + background-repeat: no-repeat; + background-position: center; + width: 80rpx; + height: 80rpx; +} +.image-cropper .fixed-bottom .action-bar .rotate-icon.is-reverse.data-v-7129956f { + transform: rotateY(180deg); +} +.image-cropper .fixed-bottom .rechoose.data-v-7129956f { + color: #007aff; + padding: 0 15px; + line-height: 100rpx; +} +.image-cropper .fixed-bottom .choose-btn.data-v-7129956f { + color: #007aff; + text-align: center; + line-height: 100rpx; + flex: 1; +} +.image-cropper .fixed-bottom .button.data-v-7129956f { + margin: auto 15px auto auto; + background-color: #4cd964; + color: #fff; +} +.image-cropper .fixed-bottom .warn.data-v-7129956f { + margin: auto 15px auto auto; + background-color: #dd524d; + color: #fff; +} +.image-cropper .safe-area-inset-bottom.data-v-7129956f { + padding-bottom: 0; + padding-bottom: constant(safe-area-inset-bottom); + padding-bottom: env(safe-area-inset-bottom); +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/uni_modules/sv-editor/components/common/parse.js b/unpackage/dist/dev/mp-weixin/uni_modules/sv-editor/components/common/parse.js new file mode 100644 index 0000000..3c9c4b8 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/uni_modules/sv-editor/components/common/parse.js @@ -0,0 +1,51 @@ +"use strict"; +const uni_modules_svEditor_components_common_config = require("./config.js"); +function parseHtmlWithVideo(richText) { + const imgRegex = /]+)>/gi; + const customUrlRegex = /\bdata-custom="[^"]*url=([^&"]+)/i; + return richText.replace(imgRegex, (match, attrs) => { + const urlMatch = attrs.match(customUrlRegex); + if (urlMatch) { + const videoUrl = urlMatch[1]; + const attrArray = attrs.split(/\s+/).filter((attr) => attr.trim() !== ""); + const newAttrs = attrArray.filter((attr) => !attr.startsWith("src=") && !attr.startsWith("data-custom=")).join(" "); + return ``; + } + return match; + }); +} +async function replaceVideoWithImageRender(richText, customCallback) { + const videoRegex = /]+)>(.*?)<\/video>/gi; + const matches = []; + let match; + while ((match = videoRegex.exec(richText)) !== null) { + matches.push(match); + } + const replacements = await Promise.all( + matches.map(async (match2) => { + const [fullMatch, attributes, content] = match2; + const sourceRegex = /]*src="([^">]+)"/i; + const matchSource = content.match(sourceRegex); + let videoUrl = ""; + if (matchSource && matchSource.length > 1) { + videoUrl = matchSource[1]; + } + let thumbnailRes; + if (customCallback) + thumbnailRes = await customCallback(videoUrl); + if (!thumbnailRes) + thumbnailRes = uni_modules_svEditor_components_common_config.config.video_thumbnail; + const filteredAttributes = attributes.split(/\s+/).filter((attr) => !attr.startsWith("controls")).join(" "); + const imgTag = ``; + return { fullMatch, imgTag }; + }) + ); + let result = richText; + for (const { fullMatch, imgTag } of replacements) { + result = result.replace(fullMatch, imgTag); + } + return result; +} +exports.parseHtmlWithVideo = parseHtmlWithVideo; +exports.replaceVideoWithImageRender = replaceVideoWithImageRender; +//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/sv-editor/components/common/parse.js.map diff --git a/unpackage/dist/dev/mp-weixin/uni_modules/sv-editor/components/common/store.js b/unpackage/dist/dev/mp-weixin/uni_modules/sv-editor/components/common/store.js new file mode 100644 index 0000000..41a825f --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/uni_modules/sv-editor/components/common/store.js @@ -0,0 +1,58 @@ +"use strict"; +const common_vendor = require("../../../../common/vendor.js"); +let state = null; +state = common_vendor.reactive({ + curEID: "", + formats: {}, + isReadOnly: false, + firstInstanceFlag: "" + // 首次实例化标志,禁止手动更改 +}); +function getEditor(eid) { + return state[`${eid}-ctx`]; +} +function setEditor(eid, ctx) { + state[`${eid}-ctx`] = ctx; + state[`${eid}-ctx`].id = eid; +} +function getEID() { + return state.curEID; +} +function setEID(eid) { + state.curEID = eid; +} +function getFormats() { + return state.formats; +} +function setFormats(formats) { + state.formats = formats; +} +function getReadOnly() { + return state.isReadOnly; +} +function setReadOnly(readOnly) { + state.isReadOnly = readOnly; +} +function destroy() { + state = {}; + state.curEID = ""; + state.formats = {}; + state.isReadOnly = false; + state.firstInstanceFlag = ""; +} +const options = { + state, + actions: { + getEditor, + setEditor, + getEID, + setEID, + getFormats, + setFormats, + getReadOnly, + setReadOnly, + destroy + } +}; +exports.options = options; +//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/sv-editor/components/common/store.js.map diff --git a/unpackage/dist/dev/mp-weixin/uni_modules/sv-editor/components/common/utils.js b/unpackage/dist/dev/mp-weixin/uni_modules/sv-editor/components/common/utils.js new file mode 100644 index 0000000..51b7949 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/uni_modules/sv-editor/components/common/utils.js @@ -0,0 +1,203 @@ +"use strict"; +const common_vendor = require("../../../../common/vendor.js"); +const uni_modules_svEditor_components_common_store = require("./store.js"); +const id = "sv-editor"; +const displayName = "基于官方 uni-editor 的富文本编辑器"; +const version = "1.1.2"; +const description = "可插入图片、视频、链接、@提及、#话题、Emoji表情包,且优化了聚焦键盘闪烁等问题"; +const keywords = [ + "富文本", + "编辑器", + "editor", + "html" +]; +const repository = "https://gitee.com/Sonve/sv-editor"; +const engines = { + HBuilderX: "^3.1.0" +}; +const dcloudext = { + type: "component-vue", + sale: { + regular: { + price: "0.00" + }, + sourcecode: { + price: "0.00" + } + }, + contact: { + qq: "" + }, + declaration: { + ads: "无", + data: "插件不采集任何数据", + permissions: "无" + }, + npmurl: "" +}; +const uni_modules = { + dependencies: [], + encrypt: [], + platforms: { + cloud: { + tcb: "y", + aliyun: "y", + alipay: "y" + }, + client: { + Vue: { + vue2: "y", + vue3: "y" + }, + App: { + "app-vue": "y", + "app-nvue": "u", + "app-uvue": "u", + "app-harmony": "u" + }, + "H5-mobile": { + Safari: "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + Chrome: "y", + IE: "y", + Edge: "y", + Firefox: "y", + Safari: "y" + }, + "小程序": { + "微信": "y", + "阿里": "u", + "百度": "u", + "字节跳动": "u", + QQ: "u", + "钉钉": "u", + "快手": "u", + "飞书": "u", + "京东": "u" + }, + "快应用": { + "华为": "u", + "联盟": "u" + } + } + } +}; +const packageConfig = { + id, + displayName, + version, + description, + keywords, + repository, + engines, + dcloudext, + uni_modules +}; +function addText(word) { + const eid = uni_modules_svEditor_components_common_store.options.actions.getEID(); + const editorCtx = uni_modules_svEditor_components_common_store.options.actions.getEditor(eid); + noKeyboardEffect(() => { + editorCtx.insertText({ text: "\n" }); + editorCtx.insertText({ text: "【" + word + "】:" }); + editorCtx.insertText({ text: "\n" }); + }); +} +function addImage(imgs, options = {}) { + const eid = uni_modules_svEditor_components_common_store.options.actions.getEID(); + const editorCtx = uni_modules_svEditor_components_common_store.options.actions.getEditor(eid); + const upRes = imgs; + common_vendor.index.__f__("log", "at uni_modules/sv-editor/components/common/utils.js:41", "upRes"); + common_vendor.index.__f__("log", "at uni_modules/sv-editor/components/common/utils.js:42", upRes); + common_vendor.index.__f__("log", "at uni_modules/sv-editor/components/common/utils.js:43", upRes instanceof Array); + common_vendor.index.__f__("log", "at uni_modules/sv-editor/components/common/utils.js:44", upRes.length); + if (!upRes || upRes.length == 0) + return; + noKeyboardEffect(() => { + upRes == null ? void 0 : upRes.forEach((item) => { + common_vendor.index.__f__("log", "at uni_modules/sv-editor/components/common/utils.js:51", "item"); + common_vendor.index.__f__("log", "at uni_modules/sv-editor/components/common/utils.js:52", item); + editorCtx.insertImage({ + ...options, + src: options.srcFiled ? item[options.srcFiled] : item + }); + }); + }); + return upRes; +} +async function addVideo(uploadFunc, options = {}) { + const eid = uni_modules_svEditor_components_common_store.options.actions.getEID(); + const editorCtx = uni_modules_svEditor_components_common_store.options.actions.getEditor(eid); + if (!uploadFunc) + return; + const upRes = await uploadFunc(editorCtx); + common_vendor.index.__f__("log", "at uni_modules/sv-editor/components/common/utils.js:86", upRes); + if (!upRes || !(upRes == null ? void 0 : upRes.length)) + return; + noKeyboardEffect(() => { + upRes == null ? void 0 : upRes.forEach((item) => { + editorCtx.insertImage({ + ...options, + src: item.videoImg, + //item[options.imageFiled || 'imagePath'], + data: { url: item.videoUrl } + }); + }); + }); + return upRes; +} +const linkFlag = "🔗添加链接中, 请稍后...🔗"; +function noKeyboardEffect(callback, options) { + let defaultOpt = { delay: 50 }; + defaultOpt.mode = "loseFocus"; + const opt = Object.assign(defaultOpt, options); + const eid = uni_modules_svEditor_components_common_store.options.actions.getEID(); + const editorCtx = uni_modules_svEditor_components_common_store.options.actions.getEditor(eid); + if (opt.mode == "hideKeyboard") { + callback(); + setTimeout(() => { + common_vendor.index.hideKeyboard(); + }, opt.delay); + } + if (opt.mode == "loseFocus") { + callback(); + editorCtx.blur(); + } + if (opt.mode == "setReadOnly") { + uni_modules_svEditor_components_common_store.options.actions.setReadOnly(true); + callback(); + setTimeout(() => { + uni_modules_svEditor_components_common_store.options.actions.setReadOnly(false); + }, opt.delay); + } + if (opt.mode == "setInputMode") + ; +} +function copyrightPrint() { + const styleTitle1 = `font-size:16px;font-weight:700;color:#ff4500;`; + const styleTitle2 = `font-style:oblique;font-size:14px;color:#fb7299;`; + const styleContent = `color:#66ccff;`; + const title1 = ` 📝 sv-editor v${packageConfig.version} `; + const title2 = "by Sonve"; + const content = ` + 版权声明: + 1. 本插件免费开源,还望保留此版权声明在控制台输出 + 2. 如需借鉴源码,还望注明出处 + 3. 未经授权您不得以任何形式转载、售卖本插件,或以其他形式侵犯版权及附属权利 + 4. 作者将保留对此插件版权信息的最终解释权 + 🏠 地址: https://ext.dcloud.net.cn/plugin?id=21184 + 😸 Gitee: https://gitee.com/Sonve/sv-editor + 💬 微信: s1051399604 + 🐧 QQ群: ① 852637893 ② 816646292 + `; + common_vendor.index.__f__("log", "at uni_modules/sv-editor/components/common/utils.js:413", `%c${title1}%c${title2}%c${content}`, styleTitle1, styleTitle2, styleContent); +} +exports.addImage = addImage; +exports.addText = addText; +exports.addVideo = addVideo; +exports.copyrightPrint = copyrightPrint; +exports.linkFlag = linkFlag; +//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/sv-editor/components/common/utils.js.map diff --git a/unpackage/dist/dev/mp-weixin/uni_modules/sv-editor/components/plugins/sv-editor-plugin.js b/unpackage/dist/dev/mp-weixin/uni_modules/sv-editor/components/plugins/sv-editor-plugin.js new file mode 100644 index 0000000..0545da5 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/uni_modules/sv-editor/components/plugins/sv-editor-plugin.js @@ -0,0 +1,69 @@ +"use strict"; +const common_vendor = require("../../../../common/vendor.js"); +const block0 = {}; +const _sfc_main = { + props: { + sid: { + type: String, + default: "" + }, + eid: { + type: String, + default: "" + } + }, + data() { + return { + videoUrl: "", + // 视频地址 + coverUrl: "", + // 封面地址 + coverUrlIOS: "", + // ios端封面地址 + pastemode: "text" + // 粘贴模式 text | origin + }; + }, + mounted() { + }, + methods: { + changePasteMode(e) { + this.pastemode = e; + }, + editorPaste(e) { + this.$emit("epaste", e); + }, + createVideoThumbnail(url) { + this.videoUrl = url; + }, + getVideoThumbnail(e) { + common_vendor.index.$emit(`E_EDITOR_GET_VIDEO_THUMBNAIL_${e.video}`, e); + }, + createCoverThumbnail(url) { + }, + getCoverThumbnail(e) { + common_vendor.index.$emit(`E_EDITOR_GET_COVER_THUMBNAIL_${e.image}`, e); + } + } +}; +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + return { + a: $props.eid, + b: _ctx.quillEditor.watchEID, + c: $props.sid, + d: _ctx.quillEditor.watchStartID, + e: $data.videoUrl, + f: _ctx.quillEditor.watchPasteMode, + g: $data.pastemode, + h: _ctx.quillEditor.watchVideoUrl, + i: $data.coverUrl, + j: _ctx.quillEditor.watchCoverUrl, + k: $data.coverUrlIOS, + l: _ctx.quillEditor.watchCoverUrlIOS + }; +} +if (typeof block0 === "function") + block0(_sfc_main); +const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]); +wx.createComponent(Component); +//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/sv-editor/components/plugins/sv-editor-plugin.js.map diff --git a/unpackage/dist/dev/mp-weixin/uni_modules/sv-editor/components/plugins/sv-editor-plugin.json b/unpackage/dist/dev/mp-weixin/uni_modules/sv-editor/components/plugins/sv-editor-plugin.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/uni_modules/sv-editor/components/plugins/sv-editor-plugin.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/uni_modules/sv-editor/components/plugins/sv-editor-plugin.wxml b/unpackage/dist/dev/mp-weixin/uni_modules/sv-editor/components/plugins/sv-editor-plugin.wxml new file mode 100644 index 0000000..3ce8a2c --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/uni_modules/sv-editor/components/plugins/sv-editor-plugin.wxml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/uni_modules/sv-editor/components/plugins/sv-editor-plugin.wxss b/unpackage/dist/dev/mp-weixin/uni_modules/sv-editor/components/plugins/sv-editor-plugin.wxss new file mode 100644 index 0000000..e69de29 diff --git a/unpackage/dist/dev/mp-weixin/uni_modules/sv-editor/components/plugins/sv-editor-wxplugin.js b/unpackage/dist/dev/mp-weixin/uni_modules/sv-editor/components/plugins/sv-editor-wxplugin.js new file mode 100644 index 0000000..f01cae8 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/uni_modules/sv-editor/components/plugins/sv-editor-wxplugin.js @@ -0,0 +1,125 @@ +"use strict"; +const common_vendor = require("../../../../common/vendor.js"); +const uni_modules_svEditor_components_common_config = require("../common/config.js"); +function wxCreateCoverThumbnail(coverImageUrl) { + const loadImage = () => { + return new Promise((resolve, reject) => { + common_vendor.index.getImageInfo({ + src: coverImageUrl, + success: (info) => { + resolve(info); + }, + fail: (err) => { + reject(err); + } + }); + }); + }; + return new Promise(async (resolve, reject) => { + try { + const imageInfo = await loadImage(); + const canvas = common_vendor.index.createOffscreenCanvas({ + type: "2d", + width: imageInfo.width, + height: imageInfo.height + }); + const ctx = canvas.getContext("2d"); + const coverImg = canvas.createImage(); + await new Promise((resolve2) => { + coverImg.onload = resolve2; + coverImg.src = coverImageUrl; + }); + ctx.drawImage(coverImg, 0, 0, canvas.width, canvas.height); + const playIcon = canvas.createImage(); + await new Promise((resolve2) => { + playIcon.onload = resolve2; + playIcon.src = uni_modules_svEditor_components_common_config.config.video_playicon; + }); + const playButtonSize = canvas.width * 0.15; + const playButtonX = (canvas.width - playButtonSize) / 2; + const playButtonY = (canvas.height - playButtonSize) / 2; + const iconAspectRatio = playIcon.width / playIcon.height; + const iconWidth = playButtonSize; + const iconHeight = iconWidth / iconAspectRatio; + ctx.drawImage(playIcon, playButtonX, playButtonY, iconWidth, iconHeight); + common_vendor.index.canvasToTempFilePath({ + canvas, + destWidth: canvas.width, + destHeight: canvas.height, + fileType: "png", + success: (res) => { + resolve(res.tempFilePath); + }, + fail: (err) => { + reject(new Error("Failed to convert canvas to image.")); + } + }); + } catch (error) { + reject(error); + } + }); +} +function wxCreateVideoThumbnail(coverImageUrl) { + const loadVideo = () => { + return new Promise((resolve, reject) => { + common_vendor.index.getVideoInfo({ + src: coverImageUrl, + success: (info) => { + resolve(info); + }, + fail: (err) => { + reject(err); + } + }); + }); + }; + return new Promise(async (resolve, reject) => { + try { + const imageInfo = await loadVideo(); + const canvas = common_vendor.index.createOffscreenCanvas({ + type: "2d", + width: imageInfo.width, + height: imageInfo.height + }); + const ctx = canvas.getContext("2d"); + const coverImg = canvas.createImage(); + await new Promise((resolve2) => { + coverImg.onload = resolve2; + coverImg.src = coverImageUrl; + }); + ctx.drawImage(coverImg, 0, 0, canvas.width, canvas.height); + const playIcon = canvas.createImage(); + await new Promise((resolve2) => { + playIcon.onload = resolve2; + playIcon.src = uni_modules_svEditor_components_common_config.config.video_playicon; + }); + const playButtonSize = canvas.width * 0.15; + const playButtonX = (canvas.width - playButtonSize) / 2; + const playButtonY = (canvas.height - playButtonSize) / 2; + const iconAspectRatio = playIcon.width / playIcon.height; + const iconWidth = playButtonSize; + const iconHeight = iconWidth / iconAspectRatio; + ctx.drawImage(playIcon, playButtonX, playButtonY, iconWidth, iconHeight); + common_vendor.index.canvasToTempFilePath({ + canvas, + destWidth: canvas.width, + destHeight: canvas.height, + fileType: "png", + success: (res) => { + resolve(res.tempFilePath); + }, + fail: (err) => { + reject(new Error("Failed to convert canvas to image.")); + } + }); + } catch (error) { + reject(error); + } + }); +} +const wxplugin = { + wxCreateCoverThumbnail, + wxCreateVideoThumbnail +}; +exports.wxplugin = wxplugin; +//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/sv-editor/components/plugins/sv-editor-wxplugin.js.map diff --git a/unpackage/dist/dev/mp-weixin/uni_modules/sv-editor/components/sv-editor/sv-editor-render.js b/unpackage/dist/dev/mp-weixin/uni_modules/sv-editor/components/sv-editor/sv-editor-render.js new file mode 100644 index 0000000..956bc64 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/uni_modules/sv-editor/components/sv-editor/sv-editor-render.js @@ -0,0 +1,49 @@ +"use strict"; +const common_vendor = require("../../../../common/vendor.js"); +const block0 = {}; +const _sfc_main = { + props: { + eid: { + type: String, + default: "" + } + }, + data() { + return { + inputmode: "", + // none | remove + focusFlag: 0, + // 主动聚焦标志 + backspaceFlag: 0 + // 主动删除标志 + }; + }, + methods: { + changeInputMode(mode) { + this.inputmode = mode; + }, + focus() { + this.focusFlag++; + }, + backspace() { + this.backspaceFlag++; + } + } +}; +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + return { + a: $props.eid, + b: _ctx.quillEditor.watchEID, + c: $data.inputmode, + d: _ctx.quillEditor.watchInputMode, + e: $data.focusFlag, + f: _ctx.quillEditor.watchFocus, + g: $data.backspaceFlag, + h: _ctx.quillEditor.watchBackSpace + }; +} +if (typeof block0 === "function") + block0(_sfc_main); +const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]); +wx.createComponent(Component); +//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/sv-editor/components/sv-editor/sv-editor-render.js.map diff --git a/unpackage/dist/dev/mp-weixin/uni_modules/sv-editor/components/sv-editor/sv-editor-render.json b/unpackage/dist/dev/mp-weixin/uni_modules/sv-editor/components/sv-editor/sv-editor-render.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/uni_modules/sv-editor/components/sv-editor/sv-editor-render.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/uni_modules/sv-editor/components/sv-editor/sv-editor-render.wxml b/unpackage/dist/dev/mp-weixin/uni_modules/sv-editor/components/sv-editor/sv-editor-render.wxml new file mode 100644 index 0000000..dde66b2 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/uni_modules/sv-editor/components/sv-editor/sv-editor-render.wxml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/uni_modules/sv-editor/components/sv-editor/sv-editor-render.wxss b/unpackage/dist/dev/mp-weixin/uni_modules/sv-editor/components/sv-editor/sv-editor-render.wxss new file mode 100644 index 0000000..e69de29 diff --git a/unpackage/dist/dev/mp-weixin/uni_modules/sv-editor/components/sv-editor/sv-editor.js b/unpackage/dist/dev/mp-weixin/uni_modules/sv-editor/components/sv-editor/sv-editor.js new file mode 100644 index 0000000..b3d2202 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/uni_modules/sv-editor/components/sv-editor/sv-editor.js @@ -0,0 +1,228 @@ +"use strict"; +const common_vendor = require("../../../../common/vendor.js"); +const uni_modules_svEditor_components_common_store = require("../common/store.js"); +const uni_modules_svEditor_components_common_utils = require("../common/utils.js"); +const uni_modules_svEditor_components_common_parse = require("../common/parse.js"); +const uni_modules_svEditor_components_plugins_svEditorWxplugin = require("../plugins/sv-editor-wxplugin.js"); +const SvEditorRender = () => "./sv-editor-render.js"; +const SvEditorPlugin = () => "../plugins/sv-editor-plugin.js"; +const _sfc_main = { + // 微信小程序特殊配置 + options: { + addGlobalClass: true, + virtualHost: true, + styleIsolation: "shared" + }, + components: { + SvEditorRender, + SvEditorPlugin + }, + props: { + // 编辑器id可传入,以便循环组件使用,防止id重复 + eid: { + type: String, + default: "sv-editor" + // 唯一,禁止重复 + }, + placeholder: { + type: String, + default: "写点什么吧 ~" + }, + // 是否只读 + readOnly: { + type: Boolean, + default: false + }, + // 最大字数限制,<=0时表示不限 + maxlength: { + type: Number, + default: -1 + }, + // 是否关闭最大字数显示 + hideMax: { + type: Boolean, + default: false + }, + // 粘贴模式,可选 text 纯文本(默认) | origin 尽可能保持原格式 + pasteMode: { + type: String, + default: "text" + } + }, + emits: ["ready", "input", "statuschange", "focus", "blur", "overmax", "epaste"], + data() { + return { + textlength: 0, + // 当前字数统计 + startID: "" + }; + }, + computed: { + editorEID: { + set(newVal) { + uni_modules_svEditor_components_common_store.options.actions.setEID(newVal); + }, + get() { + return uni_modules_svEditor_components_common_store.options.actions.getEID(); + } + }, + editorCtx: { + set(newVal) { + uni_modules_svEditor_components_common_store.options.actions.setEditor(newVal.eid, newVal.ctx); + }, + get() { + let instance = uni_modules_svEditor_components_common_store.options.actions.getEditor(this.eid); + return instance; + } + }, + isReadOnly: { + set(newVal) { + uni_modules_svEditor_components_common_store.options.actions.setReadOnly(newVal); + }, + get() { + return uni_modules_svEditor_components_common_store.options.actions.getReadOnly(); + } + } + }, + watch: { + readOnly(newVal) { + this.isReadOnly = newVal; + } + }, + mounted() { + if (!uni_modules_svEditor_components_common_store.options.state.firstInstanceFlag) { + this.editorEID = this.eid; + uni_modules_svEditor_components_common_store.options.state.firstInstanceFlag = this.eid; + uni_modules_svEditor_components_common_utils.copyrightPrint(); + } + }, + destroyed() { + uni_modules_svEditor_components_common_store.options.actions.destroy(); + }, + unmounted() { + uni_modules_svEditor_components_common_store.options.actions.destroy(); + }, + methods: { + onEditorReady() { + this.$nextTick(() => { + common_vendor.index.createSelectorQuery().in(this).select("#" + this.eid).context((res) => { + this.editorCtx = { eid: this.eid, ctx: res.context }; + this.bindMethods(); + this.$emit("ready", this.editorCtx); + }).exec(); + }); + }, + /** + * 挂载实例api + */ + bindMethods() { + var _a; + this.editorCtx.createCoverThumbnail = (_a = uni_modules_svEditor_components_plugins_svEditorWxplugin.wxplugin) == null ? void 0 : _a.wxCreateCoverThumbnail; + this.editorCtx.changeInput = () => { + this.editorCtx.getContents({ + success: (res) => { + this.$emit("input", { ctx: this.editorCtx, html: res.html, text: res.text }); + } + }); + }; + this.editorCtx.scrollView = () => { + this.editorCtx.scrollIntoView(); + }; + this.editorCtx.getLastContent = async () => { + return new Promise((resolve) => { + this.editorCtx.getContents({ + success: (res) => { + resolve(res); + } + }); + }); + }; + this.editorCtx.initHtml = async (html, customCallback) => { + let transHtml = await uni_modules_svEditor_components_common_parse.replaceVideoWithImageRender(html, customCallback); + setTimeout(() => { + this.editorCtx.setContents({ + html: transHtml, + success: () => { + this.editorCtx.changeInput(); + this.editorCtx.blur(); + } + }); + }); + }; + this.editorCtx.exportHtml = (html) => { + return uni_modules_svEditor_components_common_parse.parseHtmlWithVideo(html); + }; + }, + onEditorInput(e) { + if (Object.keys(e.detail).length <= 0) + return; + const { html, text } = e.detail; + if (text.indexOf(uni_modules_svEditor_components_common_utils.linkFlag) !== -1) + return; + const maxlength = parseInt(this.maxlength); + const textStr = text.replace(/[ \t\r\n]/g, ""); + this.textlength = textStr.length; + if (this.textlength >= maxlength && maxlength > 0) { + this.textlength = maxlength; + if (!this.lockHtmlFlag) { + this.lockHtml = html; + this.lockHtmlFlag = true; + this.$emit("input", { ctx: this.editorCtx, html, text }); + } else { + this.$emit("overmax", { ctx: this.editorCtx }); + } + this.editorCtx.setContents({ html: this.lockHtml }); + } else { + this.$emit("input", { ctx: this.editorCtx, html, text }); + this.lockHtmlFlag = false; + } + }, + /** + * 样式格式改变时触发 + * 注意:微信小程序端在多编辑器实例下切换编辑器后可能不会及时触发onStatusChange + */ + onStatusChange(e) { + uni_modules_svEditor_components_common_store.options.actions.setFormats(e.detail); + this.$emit("statuschange", { ...e, ctx: this.editorCtx }); + common_vendor.index.$emit("E_EDITOR_STATUSCHANGE", { ...e, ctx: this.editorCtx }); + }, + onEditorFocus(e) { + this.editorEID = this.eid; + this.$emit("focus", { ...e, ctx: this.editorCtx }); + }, + onEditorBlur(e) { + this.$emit("blur", { ...e, ctx: this.editorCtx }); + }, + ePaste(e) { + this.$emit("epaste", { ...e, ctx: this.editorCtx }); + common_vendor.index.$emit("E_EDITOR_PASTE", { ...e, ctx: this.editorCtx }); + }, + /** + * 微信小程序官方editor的长按事件有bug,需要重写覆盖,不需做任何逻辑,可见下面小程序社区问题链接 + * @tutorial https://developers.weixin.qq.com/community/develop/doc/000c04b3e1c1006f660065e4f61000 + */ + eLongpress() { + } + } +}; +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + return common_vendor.e({ + a: $props.eid, + b: $props.placeholder, + c: $options.isReadOnly, + d: common_vendor.o((...args) => $options.onStatusChange && $options.onStatusChange(...args)), + e: common_vendor.o((...args) => $options.onEditorReady && $options.onEditorReady(...args)), + f: common_vendor.o((...args) => $options.onEditorInput && $options.onEditorInput(...args)), + g: common_vendor.o((...args) => $options.onEditorFocus && $options.onEditorFocus(...args)), + h: common_vendor.o((...args) => $options.onEditorBlur && $options.onEditorBlur(...args)), + i: $props.maxlength > 0 && !$props.hideMax + }, $props.maxlength > 0 && !$props.hideMax ? { + j: common_vendor.t($data.textlength), + k: common_vendor.t($props.maxlength) + } : {}, { + l: common_vendor.o((...args) => $options.eLongpress && $options.eLongpress(...args)) + }); +} +const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]); +wx.createComponent(Component); +//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/sv-editor/components/sv-editor/sv-editor.js.map diff --git a/unpackage/dist/dev/mp-weixin/uni_modules/sv-editor/components/sv-editor/sv-editor.json b/unpackage/dist/dev/mp-weixin/uni_modules/sv-editor/components/sv-editor/sv-editor.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/uni_modules/sv-editor/components/sv-editor/sv-editor.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/uni_modules/sv-editor/components/sv-editor/sv-editor.wxml b/unpackage/dist/dev/mp-weixin/uni_modules/sv-editor/components/sv-editor/sv-editor.wxml new file mode 100644 index 0000000..aaf9cbc --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/uni_modules/sv-editor/components/sv-editor/sv-editor.wxml @@ -0,0 +1 @@ +{{j}}/{{k}} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/uni_modules/sv-editor/components/sv-editor/sv-editor.wxss b/unpackage/dist/dev/mp-weixin/uni_modules/sv-editor/components/sv-editor/sv-editor.wxss new file mode 100644 index 0000000..db574be --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/uni_modules/sv-editor/components/sv-editor/sv-editor.wxss @@ -0,0 +1,65 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +/* 颜色变量 */ +/* 行为相关颜色 */ +/* 文字基本颜色 */ +/* 背景颜色 */ +/* 边框颜色 */ +/* 尺寸变量 */ +/* 文字尺寸 */ +/* 图片尺寸 */ +/* Border Radius */ +/* 水平间距 */ +/* 垂直间距 */ +/* 透明度 */ +/* 文章场景相关 */ +.sv-editor-wrapper { + --maxlength-text-color: #666666; + position: relative; + width: 100%; + height: 100%; + display: flex; + flex-direction: column; +} +.sv-editor-wrapper .sv-editor-container { + flex: 1; +} +.sv-editor-wrapper .maxlength-tip { + position: absolute; + bottom: 0; + right: 0; + font-size: 24rpx; + color: var(--maxlength-text-color); + opacity: 0.6; +} +.sv-editor-container .ql-blank::before { + font-style: normal; + color: #cccccc; +} + .ql-container { + min-height: unset; +} + .ql-container .ql-image-overlay { + pointer-events: none; +} + .ql-container .ql-image-overlay .ql-image-size { + right: 28px !important; +} + .ql-container .ql-image-overlay .ql-image-toolbar { + pointer-events: auto; +} + .ql-container .ql-image-overlay .ql-image-handle { + width: 30px; + height: 30px; + pointer-events: auto; +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging-empty-view/z-paging-empty-view.js b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging-empty-view/z-paging-empty-view.js new file mode 100644 index 0000000..a75584b --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging-empty-view/z-paging-empty-view.js @@ -0,0 +1,132 @@ +"use strict"; +const uni_modules_zPaging_components_zPaging_js_zPagingStatic = require("../z-paging/js/z-paging-static.js"); +const common_vendor = require("../../../../common/vendor.js"); +const _sfc_main = { + name: "z-paging-empty-view", + data() { + return {}; + }, + props: { + // 空数据描述文字 + emptyViewText: { + type: String, + default: "没有数据哦~" + }, + // 空数据图片 + emptyViewImg: { + type: String, + default: "" + }, + // 是否显示空数据图重新加载按钮 + showEmptyViewReload: { + type: Boolean, + default: false + }, + // 空数据点击重新加载文字 + emptyViewReloadText: { + type: String, + default: "重新加载" + }, + // 是否是加载失败 + isLoadFailed: { + type: Boolean, + default: false + }, + // 空数据图样式 + emptyViewStyle: { + type: Object, + default: function() { + return {}; + } + }, + // 空数据图img样式 + emptyViewImgStyle: { + type: Object, + default: function() { + return {}; + } + }, + // 空数据图描述文字样式 + emptyViewTitleStyle: { + type: Object, + default: function() { + return {}; + } + }, + // 空数据图重新加载按钮样式 + emptyViewReloadStyle: { + type: Object, + default: function() { + return {}; + } + }, + // 空数据图z-index + emptyViewZIndex: { + type: Number, + default: 9 + }, + // 空数据图片是否使用fixed布局并铺满z-paging + emptyViewFixed: { + type: Boolean, + default: true + }, + // 空数据图中布局的单位,默认为rpx + unit: { + type: String, + default: "rpx" + } + }, + computed: { + emptyImg() { + return this.isLoadFailed ? uni_modules_zPaging_components_zPaging_js_zPagingStatic.zStatic.base64Error : uni_modules_zPaging_components_zPaging_js_zPagingStatic.zStatic.base64Empty; + }, + finalEmptyViewStyle() { + this.emptyViewStyle["z-index"] = this.emptyViewZIndex; + return this.emptyViewStyle; + } + }, + methods: { + // 点击了reload按钮 + reloadClick() { + this.$emit("reload"); + }, + // 点击了空数据view + emptyViewClick() { + this.$emit("viewClick"); + } + } +}; +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + return common_vendor.e({ + a: !$props.emptyViewImg.length + }, !$props.emptyViewImg.length ? { + b: $props.unit === "rpx" ? 1 : "", + c: $props.unit === "px" ? 1 : "", + d: common_vendor.s($props.emptyViewImgStyle), + e: $options.emptyImg + } : { + f: $props.unit === "rpx" ? 1 : "", + g: $props.unit === "px" ? 1 : "", + h: common_vendor.s($props.emptyViewImgStyle), + i: $props.emptyViewImg + }, { + j: common_vendor.t($props.emptyViewText), + k: $props.unit === "rpx" ? 1 : "", + l: $props.unit === "px" ? 1 : "", + m: common_vendor.s($props.emptyViewTitleStyle), + n: $props.showEmptyViewReload + }, $props.showEmptyViewReload ? { + o: common_vendor.t($props.emptyViewReloadText), + p: $props.unit === "rpx" ? 1 : "", + q: $props.unit === "px" ? 1 : "", + r: common_vendor.s($props.emptyViewReloadStyle), + s: common_vendor.o((...args) => $options.reloadClick && $options.reloadClick(...args)) + } : {}, { + t: $props.emptyViewFixed ? 1 : "", + v: common_vendor.s($options.finalEmptyViewStyle), + w: common_vendor.o((...args) => $options.emptyViewClick && $options.emptyViewClick(...args)) + }); +} +const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-b7999e14"]]); +wx.createComponent(Component); +//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/z-paging/components/z-paging-empty-view/z-paging-empty-view.js.map diff --git a/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging-empty-view/z-paging-empty-view.json b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging-empty-view/z-paging-empty-view.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging-empty-view/z-paging-empty-view.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging-empty-view/z-paging-empty-view.wxml b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging-empty-view/z-paging-empty-view.wxml new file mode 100644 index 0000000..58d1605 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging-empty-view/z-paging-empty-view.wxml @@ -0,0 +1 @@ +{{j}}{{o}} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging-empty-view/z-paging-empty-view.wxss b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging-empty-view/z-paging-empty-view.wxss new file mode 100644 index 0000000..37eeab0 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging-empty-view/z-paging-empty-view.wxss @@ -0,0 +1,62 @@ + +.zp-container.data-v-b7999e14{ + + display: flex; + + align-items: center; + justify-content: center; +} +.zp-container-fixed.data-v-b7999e14 { + + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; +} +.zp-main.data-v-b7999e14{ + + display: flex; + + flex-direction: column; + align-items: center; + padding: 50rpx 0rpx; +} +.zp-main-image-rpx.data-v-b7999e14 { + width: 240rpx; + height: 240rpx; +} +.zp-main-image-px.data-v-b7999e14 { + width: 120px; + height: 120px; +} +.zp-main-title.data-v-b7999e14 { + color: #aaaaaa; + text-align: center; +} +.zp-main-title-rpx.data-v-b7999e14 { + font-size: 28rpx; + margin-top: 10rpx; + padding: 0rpx 20rpx; +} +.zp-main-title-px.data-v-b7999e14 { + font-size: 14px; + margin-top: 5px; + padding: 0px 10px; +} +.zp-main-error-btn.data-v-b7999e14 { + border: solid 1px #dddddd; + color: #aaaaaa; +} +.zp-main-error-btn-rpx.data-v-b7999e14 { + font-size: 28rpx; + padding: 8rpx 24rpx; + border-radius: 6rpx; + margin-top: 50rpx; +} +.zp-main-error-btn-px.data-v-b7999e14 { + font-size: 14px; + padding: 4px 12px; + border-radius: 3px; + margin-top: 25px; +} diff --git a/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/components/z-paging-load-more.js b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/components/z-paging-load-more.js new file mode 100644 index 0000000..c9c1eb7 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/components/z-paging-load-more.js @@ -0,0 +1,121 @@ +"use strict"; +const uni_modules_zPaging_components_zPaging_js_zPagingStatic = require("../js/z-paging-static.js"); +const uni_modules_zPaging_components_zPaging_js_zPagingEnum = require("../js/z-paging-enum.js"); +const common_vendor = require("../../../../../common/vendor.js"); +const _sfc_main = { + name: "z-paging-load-more", + data() { + return { + M: uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.More, + zTheme: { + title: { white: "#efefef", black: "#a4a4a4" }, + line: { white: "#efefef", black: "#eeeeee" }, + circleBorder: { white: "#aaaaaa", black: "#c8c8c8" }, + circleBorderTop: { white: "#ffffff", black: "#444444" }, + flower: { white: uni_modules_zPaging_components_zPaging_js_zPagingStatic.zStatic.base64FlowerWhite, black: uni_modules_zPaging_components_zPaging_js_zPagingStatic.zStatic.base64Flower }, + indicator: { white: "#eeeeee", black: "#777777" } + } + }; + }, + props: ["zConfig"], + computed: { + ts() { + return this.c.defaultThemeStyle; + }, + // 底部加载更多配置 + c() { + return this.zConfig || {}; + }, + // 底部加载更多文字 + ownLoadingMoreText() { + return { + [this.M.Default]: this.c.defaultText, + [this.M.Loading]: this.c.loadingText, + [this.M.NoMore]: this.c.noMoreText, + [this.M.Fail]: this.c.failText + }[this.finalStatus]; + }, + // 底部加载更多状态 + finalStatus() { + if (this.c.defaultAsLoading && this.c.status === this.M.Default) + return this.M.Loading; + return this.c.status; + }, + // 加载更多icon类型 + finalLoadingIconType() { + return this.c.loadingIconType; + } + }, + methods: { + // 点击了加载更多 + doClick() { + this.$emit("doClick"); + } + } +}; +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + return common_vendor.e({ + a: !$options.c.hideContent + }, !$options.c.hideContent ? common_vendor.e({ + b: $options.c.showNoMoreLine && $options.finalStatus === $data.M.NoMore + }, $options.c.showNoMoreLine && $options.finalStatus === $data.M.NoMore ? { + c: $options.c.unit === "rpx" ? 1 : "", + d: $options.c.unit === "px" ? 1 : "", + e: common_vendor.s({ + backgroundColor: $data.zTheme.line[$options.ts] + }), + f: common_vendor.s($options.c.noMoreLineCustomStyle) + } : {}, { + g: $options.finalStatus === $data.M.Loading && !!$options.c.loadingIconCustomImage + }, $options.finalStatus === $data.M.Loading && !!$options.c.loadingIconCustomImage ? { + h: $options.c.loadingIconCustomImage, + i: common_vendor.s($options.c.iconCustomStyle), + j: $options.c.loadingAnimated ? 1 : "", + k: $options.c.unit === "rpx" ? 1 : "", + l: $options.c.unit === "px" ? 1 : "" + } : {}, { + m: $options.finalStatus === $data.M.Loading && $options.finalLoadingIconType === "flower" && !$options.c.loadingIconCustomImage.length + }, $options.finalStatus === $data.M.Loading && $options.finalLoadingIconType === "flower" && !$options.c.loadingIconCustomImage.length ? { + n: $options.c.unit === "rpx" ? 1 : "", + o: $options.c.unit === "px" ? 1 : "", + p: common_vendor.s($options.c.iconCustomStyle), + q: $data.zTheme.flower[$options.ts] + } : {}, { + r: $options.finalStatus === $data.M.Loading && $options.finalLoadingIconType === "circle" && !$options.c.loadingIconCustomImage.length + }, $options.finalStatus === $data.M.Loading && $options.finalLoadingIconType === "circle" && !$options.c.loadingIconCustomImage.length ? { + s: $options.c.unit === "rpx" ? 1 : "", + t: $options.c.unit === "px" ? 1 : "", + v: common_vendor.s({ + borderColor: $data.zTheme.circleBorder[$options.ts], + borderTopColor: $data.zTheme.circleBorderTop[$options.ts] + }), + w: common_vendor.s($options.c.iconCustomStyle) + } : {}, { + x: !$options.c.isChat || !$options.c.chatDefaultAsLoading && $options.finalStatus === $data.M.Default || $options.finalStatus === $data.M.Fail + }, !$options.c.isChat || !$options.c.chatDefaultAsLoading && $options.finalStatus === $data.M.Default || $options.finalStatus === $data.M.Fail ? { + y: common_vendor.t($options.ownLoadingMoreText), + z: $options.c.unit === "rpx" ? 1 : "", + A: $options.c.unit === "px" ? 1 : "", + B: common_vendor.s({ + color: $data.zTheme.title[$options.ts] + }), + C: common_vendor.s($options.c.titleCustomStyle) + } : {}, { + D: $options.c.showNoMoreLine && $options.finalStatus === $data.M.NoMore + }, $options.c.showNoMoreLine && $options.finalStatus === $data.M.NoMore ? { + E: $options.c.unit === "rpx" ? 1 : "", + F: $options.c.unit === "px" ? 1 : "", + G: common_vendor.s({ + backgroundColor: $data.zTheme.line[$options.ts] + }), + H: common_vendor.s($options.c.noMoreLineCustomStyle) + } : {}) : {}, { + I: $options.c.unit === "rpx" ? 1 : "", + J: $options.c.unit === "px" ? 1 : "", + K: common_vendor.s($options.c.customStyle), + L: common_vendor.o((...args) => $options.doClick && $options.doClick(...args)) + }); +} +const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-8cc5c400"]]); +wx.createComponent(Component); +//# sourceMappingURL=../../../../../../.sourcemap/mp-weixin/uni_modules/z-paging/components/z-paging/components/z-paging-load-more.js.map diff --git a/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/components/z-paging-load-more.json b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/components/z-paging-load-more.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/components/z-paging-load-more.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/components/z-paging-load-more.wxml b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/components/z-paging-load-more.wxml new file mode 100644 index 0000000..b721b0c --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/components/z-paging-load-more.wxml @@ -0,0 +1 @@ +{{y}} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/components/z-paging-load-more.wxss b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/components/z-paging-load-more.wxss new file mode 100644 index 0000000..48e3016 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/components/z-paging-load-more.wxss @@ -0,0 +1,118 @@ +/* [z-paging]公用的静态css资源 */ +.zp-line-loading-image.data-v-8cc5c400 { + + animation: loading-flower-8cc5c400 1s steps(12) infinite; + + color: #666666; +} +.zp-line-loading-image-rpx.data-v-8cc5c400 { + margin-right: 8rpx; + width: 34rpx; + height: 34rpx; +} +.zp-line-loading-image-px.data-v-8cc5c400 { + margin-right: 4px; + width: 17px; + height: 17px; +} +.zp-loading-image-ios-rpx.data-v-8cc5c400 { + width: 40rpx; + height: 40rpx; +} +.zp-loading-image-ios-px.data-v-8cc5c400 { + width: 20px; + height: 20px; +} +.zp-loading-image-android-rpx.data-v-8cc5c400 { + width: 34rpx; + height: 34rpx; +} +.zp-loading-image-android-px.data-v-8cc5c400 { + width: 17px; + height: 17px; +} +@keyframes loading-flower-8cc5c400 { +0% { + transform: rotate(0deg); +} +to { + transform: rotate(1turn); +} +} +.zp-l-container.data-v-8cc5c400 { + + clear: both; + display: flex; + + flex-direction: row; + align-items: center; + justify-content: center; +} +.zp-l-container-rpx.data-v-8cc5c400 { + height: 80rpx; + font-size: 27rpx; +} +.zp-l-container-px.data-v-8cc5c400 { + height: 40px; + font-size: 14px; +} +.zp-l-line-loading-custom-image.data-v-8cc5c400 { + color: #a4a4a4; +} +.zp-l-line-loading-custom-image-rpx.data-v-8cc5c400 { + margin-right: 8rpx; + width: 28rpx; + height: 28rpx; +} +.zp-l-line-loading-custom-image-px.data-v-8cc5c400 { + margin-right: 4px; + width: 14px; + height: 14px; +} +.zp-l-line-loading-custom-image-animated.data-v-8cc5c400{ + + animation: loading-circle-8cc5c400 1s linear infinite; +} +.zp-l-circle-loading-view.data-v-8cc5c400 { + border: 3rpx solid #dddddd; + border-radius: 50%; + + animation: loading-circle-8cc5c400 1s linear infinite; +} +.zp-l-circle-loading-view-rpx.data-v-8cc5c400 { + margin-right: 8rpx; + width: 23rpx; + height: 23rpx; +} +.zp-l-circle-loading-view-px.data-v-8cc5c400 { + margin-right: 4px; + width: 12px; + height: 12px; +} +.zp-l-text-rpx.data-v-8cc5c400 { + font-size: 30rpx; + margin: 0rpx 6rpx; +} +.zp-l-text-px.data-v-8cc5c400 { + font-size: 15px; + margin: 0px 3px; +} +.zp-l-line-rpx.data-v-8cc5c400 { + height: 1px; + width: 100rpx; + margin: 0rpx 10rpx; +} +.zp-l-line-px.data-v-8cc5c400 { + height: 1px; + width: 50px; + margin: 0rpx 5px; +} +@keyframes loading-circle-8cc5c400 { +0% { + transform: rotate(0deg); +} +100% { + transform: rotate(360deg); +} +} + diff --git a/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/components/z-paging-refresh.js b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/components/z-paging-refresh.js new file mode 100644 index 0000000..4894453 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/components/z-paging-refresh.js @@ -0,0 +1,158 @@ +"use strict"; +const uni_modules_zPaging_components_zPaging_js_zPagingStatic = require("../js/z-paging-static.js"); +const uni_modules_zPaging_components_zPaging_js_zPagingUtils = require("../js/z-paging-utils.js"); +const uni_modules_zPaging_components_zPaging_js_zPagingEnum = require("../js/z-paging-enum.js"); +const common_vendor = require("../../../../../common/vendor.js"); +const _sfc_main = { + name: "z-paging-refresh", + data() { + return { + R: uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.Refresher, + refresherTimeText: "", + zTheme: { + title: { white: "#efefef", black: "#555555" }, + arrow: { white: uni_modules_zPaging_components_zPaging_js_zPagingStatic.zStatic.base64ArrowWhite, black: uni_modules_zPaging_components_zPaging_js_zPagingStatic.zStatic.base64Arrow }, + flower: { white: uni_modules_zPaging_components_zPaging_js_zPagingStatic.zStatic.base64FlowerWhite, black: uni_modules_zPaging_components_zPaging_js_zPagingStatic.zStatic.base64Flower }, + success: { white: uni_modules_zPaging_components_zPaging_js_zPagingStatic.zStatic.base64SuccessWhite, black: uni_modules_zPaging_components_zPaging_js_zPagingStatic.zStatic.base64Success }, + indicator: { white: "#eeeeee", black: "#777777" } + } + }; + }, + props: [ + "status", + "defaultThemeStyle", + "defaultText", + "pullingText", + "refreshingText", + "completeText", + "goF2Text", + "defaultImg", + "pullingImg", + "refreshingImg", + "completeImg", + "refreshingAnimated", + "showUpdateTime", + "updateTimeKey", + "imgStyle", + "titleStyle", + "updateTimeStyle", + "updateTimeTextMap", + "unit", + "isIos" + ], + computed: { + ts() { + return this.defaultThemeStyle; + }, + // 当前状态Map + statusTextMap() { + this.updateTime(); + const { R, defaultText, pullingText, refreshingText, completeText, goF2Text } = this; + return { + [R.Default]: defaultText, + [R.ReleaseToRefresh]: pullingText, + [R.Loading]: refreshingText, + [R.Complete]: completeText, + [R.GoF2]: goF2Text + }; + }, + // 当前状态文字 + currentTitle() { + return this.statusTextMap[this.status] || this.defaultText; + }, + // 左侧图片class + leftImageClass() { + const preSizeClass = `zp-r-left-image-pre-size-${this.unit}`; + if (this.status === this.R.Complete) + return preSizeClass; + return `zp-r-left-image ${preSizeClass} ${this.status === this.R.Default ? "zp-r-arrow-down" : "zp-r-arrow-top"}`; + }, + // 左侧图片style + leftImageStyle() { + const showUpdateTime = this.showUpdateTime; + const size = showUpdateTime ? uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.addUnit(36, this.unit) : uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.addUnit(34, this.unit); + return { width: size, height: size, "margin-right": showUpdateTime ? uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.addUnit(20, this.unit) : uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.addUnit(9, this.unit) }; + }, + // 左侧图片src + leftImageSrc() { + const R = this.R; + const status = this.status; + if (status === R.Default) { + if (!!this.defaultImg) + return this.defaultImg; + return this.zTheme.arrow[this.ts]; + } else if (status === R.ReleaseToRefresh) { + if (!!this.pullingImg) + return this.pullingImg; + if (!!this.defaultImg) + return this.defaultImg; + return this.zTheme.arrow[this.ts]; + } else if (status === R.Loading) { + if (!!this.refreshingImg) + return this.refreshingImg; + return this.zTheme.flower[this.ts]; + } else if (status === R.Complete) { + if (!!this.completeImg) + return this.completeImg; + return this.zTheme.success[this.ts]; + } else if (status === R.GoF2) { + return this.zTheme.arrow[this.ts]; + } + return ""; + }, + // 右侧文字style + rightTextStyle() { + let stl = {}; + stl["color"] = this.zTheme.title[this.ts]; + stl["font-size"] = uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.addUnit(30, this.unit); + return stl; + } + }, + methods: { + // 添加单位 + addUnit(value, unit) { + return uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.addUnit(value, unit); + }, + // 更新下拉刷新时间 + updateTime() { + if (this.showUpdateTime) { + this.refresherTimeText = uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.getRefesrherFormatTimeByKey(this.updateTimeKey, this.updateTimeTextMap); + } + } + } +}; +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + return common_vendor.e({ + a: $props.status !== $data.R.Loading + }, $props.status !== $data.R.Loading ? { + b: common_vendor.n($options.leftImageClass), + c: common_vendor.s($options.leftImageStyle), + d: common_vendor.s($props.imgStyle), + e: $options.leftImageSrc + } : { + f: $props.refreshingAnimated ? 1 : "", + g: $props.unit === "rpx" ? 1 : "", + h: $props.unit === "px" ? 1 : "", + i: common_vendor.s($options.leftImageStyle), + j: common_vendor.s($props.imgStyle), + k: $options.leftImageSrc + }, { + l: common_vendor.t($options.currentTitle), + m: common_vendor.s($options.rightTextStyle), + n: common_vendor.s($props.titleStyle), + o: $props.showUpdateTime && $data.refresherTimeText.length + }, $props.showUpdateTime && $data.refresherTimeText.length ? { + p: common_vendor.t($data.refresherTimeText), + q: $props.unit === "rpx" ? 1 : "", + r: $props.unit === "px" ? 1 : "", + s: common_vendor.s({ + color: $data.zTheme.title[$options.ts] + }), + t: common_vendor.s($props.updateTimeStyle) + } : {}, { + v: common_vendor.n($props.showUpdateTime ? "zp-r-container zp-r-container-padding" : "zp-r-container") + }); +} +const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-00a16504"]]); +wx.createComponent(Component); +//# sourceMappingURL=../../../../../../.sourcemap/mp-weixin/uni_modules/z-paging/components/z-paging/components/z-paging-refresh.js.map diff --git a/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/components/z-paging-refresh.json b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/components/z-paging-refresh.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/components/z-paging-refresh.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/components/z-paging-refresh.wxml b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/components/z-paging-refresh.wxml new file mode 100644 index 0000000..8bf94cc --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/components/z-paging-refresh.wxml @@ -0,0 +1 @@ +{{l}}{{p}} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/components/z-paging-refresh.wxss b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/components/z-paging-refresh.wxss new file mode 100644 index 0000000..303edc9 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/components/z-paging-refresh.wxss @@ -0,0 +1,99 @@ +/* [z-paging]公用的静态css资源 */ +.zp-line-loading-image.data-v-00a16504 { + + animation: loading-flower-00a16504 1s steps(12) infinite; + + color: #666666; +} +.zp-line-loading-image-rpx.data-v-00a16504 { + margin-right: 8rpx; + width: 34rpx; + height: 34rpx; +} +.zp-line-loading-image-px.data-v-00a16504 { + margin-right: 4px; + width: 17px; + height: 17px; +} +.zp-loading-image-ios-rpx.data-v-00a16504 { + width: 40rpx; + height: 40rpx; +} +.zp-loading-image-ios-px.data-v-00a16504 { + width: 20px; + height: 20px; +} +.zp-loading-image-android-rpx.data-v-00a16504 { + width: 34rpx; + height: 34rpx; +} +.zp-loading-image-android-px.data-v-00a16504 { + width: 17px; + height: 17px; +} +@keyframes loading-flower-00a16504 { +0% { + transform: rotate(0deg); +} +to { + transform: rotate(1turn); +} +} +.zp-r-container.data-v-00a16504 { + + display: flex; + height: 100%; + + flex-direction: row; + justify-content: center; + align-items: center; +} +.zp-r-container-padding.data-v-00a16504 { +} +.zp-r-left.data-v-00a16504 { + + display: flex; + + flex-direction: row; + align-items: center; + overflow: hidden; +} +.zp-r-left-image.data-v-00a16504 { + transition-duration: .2s; + transition-property: transform; + color: #666666; +} +.zp-r-left-image-pre-size-rpx.data-v-00a16504 { + + width: 34rpx; + height: 34rpx; + overflow: hidden; +} +.zp-r-left-image-pre-size-px.data-v-00a16504 { + + width: 17px; + height: 17px; + overflow: hidden; +} +.zp-r-arrow-top.data-v-00a16504 { + transform: rotate(0deg); +} +.zp-r-arrow-down.data-v-00a16504 { + transform: rotate(180deg); +} +.zp-r-right.data-v-00a16504 { + + display: flex; + + flex-direction: column; + align-items: center; + justify-content: center; +} +.zp-r-right-time-text-rpx.data-v-00a16504 { + margin-top: 10rpx; + font-size: 26rpx; +} +.zp-r-right-time-text-px.data-v-00a16504 { + margin-top: 5px; + font-size: 13px; +} diff --git a/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/config/index.js b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/config/index.js new file mode 100644 index 0000000..cce7f49 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/config/index.js @@ -0,0 +1,4 @@ +"use strict"; +const zLocalConfig = {}; +exports.zLocalConfig = zLocalConfig; +//# sourceMappingURL=../../../../../../.sourcemap/mp-weixin/uni_modules/z-paging/components/z-paging/config/index.js.map diff --git a/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/i18n/index.js b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/i18n/index.js new file mode 100644 index 0000000..8206f7e --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/i18n/index.js @@ -0,0 +1,65 @@ +"use strict"; +const en = { + "zp.refresher.default": "Pull down to refresh", + "zp.refresher.pulling": "Release to refresh", + "zp.refresher.refreshing": "Refreshing...", + "zp.refresher.complete": "Refresh succeeded", + "zp.refresher.f2": "Refresh to enter 2f", + "zp.loadingMore.default": "Click to load more", + "zp.loadingMore.loading": "Loading...", + "zp.loadingMore.noMore": "No more data", + "zp.loadingMore.fail": "Load failed,click to reload", + "zp.emptyView.title": "No data", + "zp.emptyView.reload": "Reload", + "zp.emptyView.error": "Sorry,load failed", + "zp.refresherUpdateTime.title": "Last update: ", + "zp.refresherUpdateTime.none": "None", + "zp.refresherUpdateTime.today": "Today", + "zp.refresherUpdateTime.yesterday": "Yesterday", + "zp.systemLoading.title": "Loading..." +}; +const zhHans = { + "zp.refresher.default": "继续下拉刷新", + "zp.refresher.pulling": "松开立即刷新", + "zp.refresher.refreshing": "正在刷新...", + "zp.refresher.complete": "刷新成功", + "zp.refresher.f2": "松手进入二楼", + "zp.loadingMore.default": "点击加载更多", + "zp.loadingMore.loading": "正在加载...", + "zp.loadingMore.noMore": "没有更多了", + "zp.loadingMore.fail": "加载失败,点击重新加载", + "zp.emptyView.title": "没有数据哦~", + "zp.emptyView.reload": "重新加载", + "zp.emptyView.error": "很抱歉,加载失败", + "zp.refresherUpdateTime.title": "最后更新:", + "zp.refresherUpdateTime.none": "无", + "zp.refresherUpdateTime.today": "今天", + "zp.refresherUpdateTime.yesterday": "昨天", + "zp.systemLoading.title": "加载中..." +}; +const zhHant = { + "zp.refresher.default": "繼續下拉重繪", + "zp.refresher.pulling": "鬆開立即重繪", + "zp.refresher.refreshing": "正在重繪...", + "zp.refresher.complete": "重繪成功", + "zp.refresher.f2": "鬆手進入二樓", + "zp.loadingMore.default": "點擊加載更多", + "zp.loadingMore.loading": "正在加載...", + "zp.loadingMore.noMore": "沒有更多了", + "zp.loadingMore.fail": "加載失敗,點擊重新加載", + "zp.emptyView.title": "沒有數據哦~", + "zp.emptyView.reload": "重新加載", + "zp.emptyView.error": "很抱歉,加載失敗", + "zp.refresherUpdateTime.title": "最後更新:", + "zp.refresherUpdateTime.none": "無", + "zp.refresherUpdateTime.today": "今天", + "zp.refresherUpdateTime.yesterday": "昨天", + "zp.systemLoading.title": "加載中..." +}; +const messages = { + en, + "zh-Hans": zhHans, + "zh-Hant": zhHant +}; +exports.messages = messages; +//# sourceMappingURL=../../../../../../.sourcemap/mp-weixin/uni_modules/z-paging/components/z-paging/i18n/index.js.map diff --git a/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/js/modules/back-to-top.js b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/js/modules/back-to-top.js new file mode 100644 index 0000000..54133c2 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/js/modules/back-to-top.js @@ -0,0 +1,121 @@ +"use strict"; +const uni_modules_zPaging_components_zPaging_js_zPagingUtils = require("../z-paging-utils.js"); +const backToTopModule = { + props: { + // 自动显示点击返回顶部按钮,默认为否 + autoShowBackToTop: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("autoShowBackToTop", false) + }, + // 点击返回顶部按钮显示/隐藏的阈值(滚动距离),单位为px,默认为400rpx + backToTopThreshold: { + type: [Number, String], + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("backToTopThreshold", "400rpx") + }, + // 点击返回顶部按钮的自定义图片地址,默认使用z-paging内置的图片 + backToTopImg: { + type: String, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("backToTopImg", "") + }, + // 点击返回顶部按钮返回到顶部时是否展示过渡动画,默认为是 + backToTopWithAnimate: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("backToTopWithAnimate", true) + }, + // 点击返回顶部按钮与底部的距离,注意添加单位px或rpx,默认为160rpx + backToTopBottom: { + type: [Number, String], + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("backToTopBottom", "160rpx") + }, + // 点击返回顶部按钮的自定义样式 + backToTopStyle: { + type: Object, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("backToTopStyle", {}) + }, + // iOS点击顶部状态栏、安卓双击标题栏时,滚动条返回顶部,只支持竖向,默认为是 + enableBackToTop: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("enableBackToTop", true) + } + }, + data() { + return { + // 点击返回顶部的class + backToTopClass: "zp-back-to-top zp-back-to-top-hide", + // 上次点击返回顶部的时间 + lastBackToTopShowTime: 0, + // 点击返回顶部显示的class是否在展示中,使得按钮展示/隐藏过度效果更自然 + showBackToTopClass: false + }; + }, + computed: { + backToTopThresholdUnitConverted() { + return uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.addUnit(this.backToTopThreshold, this.unit); + }, + backToTopBottomUnitConverted() { + return uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.addUnit(this.backToTopBottom, this.unit); + }, + finalEnableBackToTop() { + return this.usePageScroll ? false : this.enableBackToTop; + }, + finalBackToTopThreshold() { + return uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.convertToPx(this.backToTopThresholdUnitConverted); + }, + finalBackToTopStyle() { + const backToTopStyle = this.backToTopStyle; + if (!backToTopStyle.bottom) { + backToTopStyle.bottom = this.windowBottom + uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.convertToPx(this.backToTopBottomUnitConverted) + "px"; + } + if (!backToTopStyle.position) { + backToTopStyle.position = this.usePageScroll ? "fixed" : "absolute"; + } + return backToTopStyle; + }, + finalBackToTopClass() { + return `${this.backToTopClass} zp-back-to-top-${this.unit}`; + } + }, + methods: { + // 点击了返回顶部 + _backToTopClick() { + let callbacked = false; + this.$emit("backToTopClick", (toTop) => { + (toTop === void 0 || toTop === true) && this._handleToTop(); + callbacked = true; + }); + this.$nextTick(() => { + !callbacked && this._handleToTop(); + }); + }, + // 处理滚动到顶部(聊天记录模式中为滚动到底部) + _handleToTop() { + !this.backToTopWithAnimate && this._checkShouldShowBackToTop(0); + !this.useChatRecordMode ? this.scrollToTop(this.backToTopWithAnimate) : this.scrollToBottom(this.backToTopWithAnimate); + }, + // 判断是否要显示返回顶部按钮 + _checkShouldShowBackToTop(scrollTop) { + if (!this.autoShowBackToTop) { + this.showBackToTopClass = false; + return; + } + if (scrollTop > this.finalBackToTopThreshold) { + if (!this.showBackToTopClass) { + this.showBackToTopClass = true; + this.lastBackToTopShowTime = (/* @__PURE__ */ new Date()).getTime(); + uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.delay(() => { + this.backToTopClass = "zp-back-to-top zp-back-to-top-show"; + }, 300); + } + } else { + if (this.showBackToTopClass) { + this.backToTopClass = "zp-back-to-top zp-back-to-top-hide"; + uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.delay(() => { + this.showBackToTopClass = false; + }, (/* @__PURE__ */ new Date()).getTime() - this.lastBackToTopShowTime < 500 ? 0 : 300); + } + } + } + } +}; +exports.backToTopModule = backToTopModule; +//# sourceMappingURL=../../../../../../../.sourcemap/mp-weixin/uni_modules/z-paging/components/z-paging/js/modules/back-to-top.js.map diff --git a/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/js/modules/chat-record-mode.js b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/js/modules/chat-record-mode.js new file mode 100644 index 0000000..300db28 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/js/modules/chat-record-mode.js @@ -0,0 +1,136 @@ +"use strict"; +const common_vendor = require("../../../../../../common/vendor.js"); +const uni_modules_zPaging_components_zPaging_js_zPagingUtils = require("../z-paging-utils.js"); +const chatRecordModerModule = { + props: { + // 使用聊天记录模式,默认为否 + useChatRecordMode: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("useChatRecordMode", false) + }, + // 使用聊天记录模式时滚动到顶部后,列表垂直移动偏移距离。默认0rpx。单位px(暂时无效) + chatRecordMoreOffset: { + type: [Number, String], + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("chatRecordMoreOffset", "0rpx") + }, + // 使用聊天记录模式时是否自动隐藏键盘:在用户触摸列表时候自动隐藏键盘,默认为是 + autoHideKeyboardWhenChat: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("autoHideKeyboardWhenChat", true) + }, + // 使用聊天记录模式中键盘弹出时是否自动调整slot="bottom"高度,默认为是 + autoAdjustPositionWhenChat: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("autoAdjustPositionWhenChat", true) + }, + // 使用聊天记录模式中键盘弹出时占位高度偏移距离。默认0rpx。单位px + chatAdjustPositionOffset: { + type: [Number, String], + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("chatAdjustPositionOffset", "0rpx") + }, + // 使用聊天记录模式中键盘弹出时是否自动滚动到底部,默认为否 + autoToBottomWhenChat: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("autoToBottomWhenChat", false) + }, + // 使用聊天记录模式中reload时是否显示chatLoading,默认为否 + showChatLoadingWhenReload: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("showChatLoadingWhenReload", false) + }, + // 在聊天记录模式中滑动到顶部状态为默认状态时,以加载中的状态展示,默认为是。若设置为否,则默认会显示【点击加载更多】,然后才会显示loading + chatLoadingMoreDefaultAsLoading: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("chatLoadingMoreDefaultAsLoading", true) + } + }, + data() { + return { + // 键盘高度 + keyboardHeight: 0, + // 键盘高度是否未改变,此时占位高度变化不需要动画效果 + isKeyboardHeightChanged: false + }; + }, + computed: { + finalChatRecordMoreOffset() { + return uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.convertToPx(this.chatRecordMoreOffset); + }, + finalChatAdjustPositionOffset() { + return uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.convertToPx(this.chatAdjustPositionOffset); + }, + // 聊天记录模式旋转180度style + chatRecordRotateStyle() { + let cellStyle; + cellStyle = this.useChatRecordMode ? { transform: "scaleY(-1)" } : {}; + this.$emit("update:cellStyle", cellStyle); + this.$emit("cellStyleChange", cellStyle); + this.$nextTick(() => { + if (this.isFirstPage && this.isChatRecordModeAndNotInversion) { + this.$nextTick(() => { + this._scrollToBottom(false); + uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.delay(() => { + this._scrollToBottom(false); + uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.delay(() => { + this._scrollToBottom(false); + }, 50); + }, 50); + }); + } + }); + return cellStyle; + }, + // 是否是聊天记录列表并且有配置transform + isChatRecordModeHasTransform() { + return this.useChatRecordMode && this.chatRecordRotateStyle && this.chatRecordRotateStyle.transform; + }, + // 是否是聊天记录列表并且列表未倒置 + isChatRecordModeAndNotInversion() { + return this.isChatRecordModeHasTransform && this.chatRecordRotateStyle.transform === "scaleY(1)"; + }, + // 是否是聊天记录列表并且列表倒置 + isChatRecordModeAndInversion() { + return this.isChatRecordModeHasTransform && this.chatRecordRotateStyle.transform === "scaleY(-1)"; + }, + // 最终的聊天记录模式中底部安全区域的高度,如果开启了底部安全区域并且键盘未弹出,则添加底部区域高度 + chatRecordModeSafeAreaBottom() { + return this.safeAreaInsetBottom && !this.keyboardHeight ? this.safeAreaBottom : 0; + } + }, + mounted() { + if (this.useChatRecordMode) { + common_vendor.index.onKeyboardHeightChange(this._handleKeyboardHeightChange); + } + }, + methods: { + // 添加聊天记录 + addChatRecordData(data, toBottom = true, toBottomWithAnimate = true) { + if (!this.useChatRecordMode) + return; + this.isTotalChangeFromAddData = true; + this.addDataFromTop(data, toBottom, toBottomWithAnimate); + }, + // 手动触发滚动到顶部加载更多,聊天记录模式时有效 + doChatRecordLoadMore() { + this.useChatRecordMode && this._onLoadingMore("click"); + }, + // 处理键盘高度变化 + _handleKeyboardHeightChange(res) { + this.$emit("keyboardHeightChange", res); + if (this.autoAdjustPositionWhenChat) { + this.isKeyboardHeightChanged = true; + this.keyboardHeight = res.height > 0 ? res.height + this.finalChatAdjustPositionOffset : res.height; + } + if (this.autoToBottomWhenChat && this.keyboardHeight > 0) { + uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.delay(() => { + this.scrollToBottom(false); + uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.delay(() => { + this.scrollToBottom(false); + }); + }); + } + } + } +}; +exports.chatRecordModerModule = chatRecordModerModule; +//# sourceMappingURL=../../../../../../../.sourcemap/mp-weixin/uni_modules/z-paging/components/z-paging/js/modules/chat-record-mode.js.map diff --git a/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/js/modules/common-layout.js b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/js/modules/common-layout.js new file mode 100644 index 0000000..f82f3d7 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/js/modules/common-layout.js @@ -0,0 +1,99 @@ +"use strict"; +const common_vendor = require("../../../../../../common/vendor.js"); +const uni_modules_zPaging_components_zPaging_js_zPagingUtils = require("../z-paging-utils.js"); +const commonLayoutModule = { + data() { + return { + systemInfo: null, + cssSafeAreaInsetBottom: -1, + isReadyDestroy: false + }; + }, + computed: { + // 顶部可用距离 + windowTop() { + if (!this.systemInfo) + return 0; + return this.systemInfo.windowTop || 0; + }, + // 底部安全区域高度 + safeAreaBottom() { + if (!this.systemInfo) + return 0; + let safeAreaBottom = 0; + safeAreaBottom = Math.max(this.cssSafeAreaInsetBottom, 0); + return safeAreaBottom; + }, + // 是否是比较老的webview,在一些老的webview中,需要进行一些特殊处理 + isOldWebView() { + try { + const systemInfos = uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.getSystemInfoSync(true).system.split(" "); + const deviceType = systemInfos[0]; + const version = parseInt(systemInfos[1]); + if (deviceType === "iOS" && version <= 10 || deviceType === "Android" && version <= 6) { + return true; + } + } catch (e) { + return false; + } + return false; + }, + // 当前组件的$slots,兼容不同平台 + zSlots() { + return this.$slots; + } + }, + beforeDestroy() { + this.isReadyDestroy = true; + }, + unmounted() { + this.isReadyDestroy = true; + }, + methods: { + // 更新fixed模式下z-paging的布局 + updateFixedLayout() { + this.fixed && this.$nextTick(() => { + this.systemInfo = uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.getSystemInfoSync(); + }); + }, + // 获取节点尺寸 + _getNodeClientRect(select, inDom = true, scrollOffset = false) { + if (this.isReadyDestroy) { + return Promise.resolve(false); + } + let res = !!inDom ? common_vendor.index.createSelectorQuery().in(inDom === true ? this : inDom) : common_vendor.index.createSelectorQuery(); + scrollOffset ? res.select(select).scrollOffset() : res.select(select).boundingClientRect(); + return new Promise((resolve, reject) => { + res.exec((data) => { + resolve(data && data != "" && data != void 0 && data.length ? data : false); + }); + }); + }, + // 获取slot="left"和slot="right"宽度并且更新布局 + _updateLeftAndRightWidth(targetStyle, parentNodePrefix) { + this.$nextTick(() => { + let delayTime = 0; + setTimeout(() => { + ["left", "right"].map((position) => { + this._getNodeClientRect(`.${parentNodePrefix}-${position}`).then((res) => { + this.$set(targetStyle, position, res ? res[0].width + "px" : "0px"); + }); + }); + }, delayTime); + }); + }, + // 通过获取css设置的底部安全区域占位view高度设置bottom距离(直接通过systemInfo在部分平台上无法获取到底部安全区域) + _getCssSafeAreaInsetBottom(success) { + this._getNodeClientRect(".zp-safe-area-inset-bottom").then((res) => { + this.cssSafeAreaInsetBottom = res ? res[0].height : -1; + res && success && success(); + }); + }, + // 同步获取系统信息,兼容不同平台(供z-paging-swiper使用) + _getSystemInfoSync(useCache = false) { + return uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.getSystemInfoSync(useCache); + } + } +}; +exports.commonLayoutModule = commonLayoutModule; +//# sourceMappingURL=../../../../../../../.sourcemap/mp-weixin/uni_modules/z-paging/components/z-paging/js/modules/common-layout.js.map diff --git a/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/js/modules/data-handle.js b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/js/modules/data-handle.js new file mode 100644 index 0000000..871cd93 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/js/modules/data-handle.js @@ -0,0 +1,654 @@ +"use strict"; +const common_vendor = require("../../../../../../common/vendor.js"); +const uni_modules_zPaging_components_zPaging_js_zPagingUtils = require("../z-paging-utils.js"); +const uni_modules_zPaging_components_zPaging_js_zPagingConstant = require("../z-paging-constant.js"); +const uni_modules_zPaging_components_zPaging_js_zPagingEnum = require("../z-paging-enum.js"); +const uni_modules_zPaging_components_zPaging_js_zPagingInterceptor = require("../z-paging-interceptor.js"); +const dataHandleModule = { + props: { + // 自定义初始的pageNo,默认为1 + defaultPageNo: { + type: Number, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("defaultPageNo", 1), + observer: function(newVal) { + this.pageNo = newVal; + } + }, + // 自定义pageSize,默认为10 + defaultPageSize: { + type: Number, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("defaultPageSize", 10), + validator: (value) => { + if (value <= 0) + uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.consoleErr("default-page-size必须大于0!"); + return value > 0; + } + }, + // 为保证数据一致,设置当前tab切换时的标识key,并在complete中传递相同key,若二者不一致,则complete将不会生效 + dataKey: { + type: [Number, String, Object], + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("dataKey", null) + }, + // 使用缓存,若开启将自动缓存第一页的数据,默认为否。请注意,因考虑到切换tab时不同tab数据不同的情况,默认仅会缓存组件首次加载时第一次请求到的数据,后续的下拉刷新操作不会更新缓存。 + useCache: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("useCache", false) + }, + // 使用缓存时缓存的key,用于区分不同列表的缓存数据,useCache为true时必须设置,否则缓存无效 + cacheKey: { + type: String, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("cacheKey", null) + }, + // 缓存模式,默认仅会缓存组件首次加载时第一次请求到的数据,可设置为always,即代表总是缓存,每次列表刷新(下拉刷新、调用reload等)都会更新缓存 + cacheMode: { + type: String, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("cacheMode", uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.CacheMode.Default) + }, + // 自动注入的list名,可自动修改父view(包含ref="paging")中对应name的list值 + autowireListName: { + type: String, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("autowireListName", "") + }, + // 自动注入的query名,可自动调用父view(包含ref="paging")中的query方法 + autowireQueryName: { + type: String, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("autowireQueryName", "") + }, + // 获取分页数据Function,功能与@query类似。若设置了fetch则@query将不再触发 + fetch: { + type: Function, + default: null + }, + // fetch的附加参数,fetch配置后有效 + fetchParams: { + type: Object, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("fetchParams", null) + }, + // z-paging mounted后自动调用reload方法(mounted后自动调用接口),默认为是 + auto: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("auto", true) + }, + // 用户下拉刷新时是否触发reload方法,默认为是 + reloadWhenRefresh: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("reloadWhenRefresh", true) + }, + // reload时自动滚动到顶部,默认为是 + autoScrollToTopWhenReload: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("autoScrollToTopWhenReload", true) + }, + // reload时立即自动清空原list,默认为是,若立即自动清空,则在reload之后、请求回调之前页面是空白的 + autoCleanListWhenReload: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("autoCleanListWhenReload", true) + }, + // 列表刷新时自动显示下拉刷新view,默认为否 + showRefresherWhenReload: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("showRefresherWhenReload", false) + }, + // 列表刷新时自动显示加载更多view,且为加载中状态,默认为否 + showLoadingMoreWhenReload: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("showLoadingMoreWhenReload", false) + }, + // 组件created时立即触发reload(可解决一些情况下先看到页面再看到loading的问题),auto为true时有效。为否时将在mounted+nextTick后触发reload,默认为否 + createdReload: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("createdReload", false) + }, + // 本地分页时上拉加载更多延迟时间,单位为毫秒,默认200毫秒 + localPagingLoadingTime: { + type: [Number, String], + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("localPagingLoadingTime", 200) + }, + // 自动拼接complete中传过来的数组(使用聊天记录模式时无效) + concat: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("concat", true) + }, + // 请求失败是否触发reject,默认为是 + callNetworkReject: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("callNetworkReject", true) + }, + // 父组件v-model所绑定的list的值 + value: { + type: Array, + default: function() { + return []; + } + }, + modelValue: { + type: Array, + default: function() { + return []; + } + } + }, + data() { + return { + currentData: [], + totalData: [], + realTotalData: [], + totalLocalPagingList: [], + dataPromiseResultMap: { + reload: null, + complete: null, + localPaging: null + }, + isSettingCacheList: false, + pageNo: 1, + currentRefreshPageSize: 0, + isLocalPaging: false, + isAddedData: false, + isTotalChangeFromAddData: false, + privateConcat: true, + myParentQuery: -1, + firstPageLoaded: false, + pagingLoaded: false, + loaded: false, + isUserReload: true, + fromEmptyViewReload: false, + queryFrom: "", + listRendering: false, + isHandlingRefreshToPage: false, + isFirstPageAndNoMore: false, + totalDataChangeThrow: true + }; + }, + computed: { + pageSize() { + return this.defaultPageSize; + }, + finalConcat() { + return this.concat && this.privateConcat; + }, + finalUseCache() { + if (this.useCache && !this.cacheKey) { + uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.consoleErr("use-cache为true时,必须设置cache-key,否则缓存无效!"); + } + return this.useCache && !!this.cacheKey; + }, + finalCacheKey() { + return this.cacheKey ? `${uni_modules_zPaging_components_zPaging_js_zPagingConstant.c.cachePrefixKey}-${this.cacheKey}` : null; + }, + isFirstPage() { + return this.pageNo === this.defaultPageNo; + } + }, + watch: { + totalData(newVal, oldVal) { + this._totalDataChange(newVal, oldVal, this.totalDataChangeThrow); + this.totalDataChangeThrow = true; + }, + currentData(newVal, oldVal) { + this._currentDataChange(newVal, oldVal); + }, + useChatRecordMode(newVal, oldVal) { + if (newVal) { + this.nLoadingMoreFixedHeight = false; + } + }, + value: { + handler(newVal) { + if (newVal !== this.totalData) { + this.totalDataChangeThrow = false; + this.totalData = newVal; + } + }, + immediate: true + }, + modelValue: { + handler(newVal) { + if (newVal !== this.totalData) { + this.totalDataChangeThrow = false; + this.totalData = newVal; + } + }, + immediate: true + } + }, + methods: { + // 请求结束(成功或者失败)调用此方法,将请求的结果传递给z-paging处理,第一个参数为请求结果数组,第二个参数为是否成功(默认为是) + complete(data, success = true) { + this.customNoMore = -1; + return this.addData(data, success); + }, + //【保证数据一致】请求结束(成功或者失败)调用此方法,将请求的结果传递给z-paging处理,第一个参数为请求结果数组,第二个参数为dataKey,需与:data-key绑定的一致,第三个参数为是否成功(默认为是) + completeByKey(data, dataKey = null, success = true) { + if (dataKey !== null && this.dataKey !== null && dataKey !== this.dataKey) { + this.isFirstPage && this.endRefresh(); + return new Promise((resolve) => resolve()); + } + this.customNoMore = -1; + return this.addData(data, success); + }, + //【通过total判断是否有更多数据】请求结束(成功或者失败)调用此方法,将请求的结果传递给z-paging处理,第一个参数为请求结果数组,第二个参数为total(列表总数),第三个参数为是否成功(默认为是) + completeByTotal(data, total, success = true) { + if (total == "undefined") { + this.customNoMore = -1; + } else { + const dataTypeRes = this._checkDataType(data, success, false); + data = dataTypeRes.data; + success = dataTypeRes.success; + if (total >= 0 && success) { + return new Promise((resolve, reject) => { + this.$nextTick(() => { + let nomore = false; + const realTotalDataCount = this.pageNo == this.defaultPageNo ? 0 : this.realTotalData.length; + const dataLength = this.privateConcat ? data.length : 0; + let exceedCount = realTotalDataCount + dataLength - total; + if (exceedCount >= 0) { + nomore = true; + exceedCount = this.defaultPageSize - exceedCount; + if (this.privateConcat && exceedCount > 0 && exceedCount < data.length) { + data = data.splice(0, exceedCount); + } + } + this.completeByNoMore(data, nomore, success).then((res) => resolve(res)).catch(() => reject()); + }); + }); + } + } + return this.addData(data, success); + }, + //【自行判断是否有更多数据】请求结束(成功或者失败)调用此方法,将请求的结果传递给z-paging处理,第一个参数为请求结果数组,第二个参数为是否没有更多数据,第三个参数为是否成功(默认是是) + completeByNoMore(data, nomore, success = true) { + if (nomore != "undefined") { + this.customNoMore = nomore == true ? 1 : 0; + } + return this.addData(data, success); + }, + // 请求结束且请求失败时调用,支持传入请求失败原因 + completeByError(errorMsg) { + this.customerEmptyViewErrorText = errorMsg; + return this.complete(false); + }, + // 与上方complete方法功能一致,新版本中设置服务端回调数组请使用complete方法 + addData(data, success = true) { + if (!this.fromCompleteEmit) { + this.disabledCompleteEmit = true; + this.fromCompleteEmit = false; + } + const currentTimeStamp = uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.getTime(); + const disTime = currentTimeStamp - this.requestTimeStamp; + let minDelay = this.minDelay; + if (this.isFirstPage && this.finalShowRefresherWhenReload) { + minDelay = Math.max(400, minDelay); + } + const addDataDalay = this.requestTimeStamp > 0 && disTime < minDelay ? minDelay - disTime : 0; + this.$nextTick(() => { + uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.delay(() => { + this._addData(data, success, false); + }, this.delay > 0 ? this.delay : addDataDalay); + }); + return new Promise((resolve, reject) => { + this.dataPromiseResultMap.complete = { resolve, reject }; + }); + }, + // 从顶部添加数据,不会影响分页的pageNo和pageSize + addDataFromTop(data, toTop = true, toTopWithAnimate = true) { + let addFromTop = !this.isChatRecordModeAndNotInversion; + data = Object.prototype.toString.call(data) !== "[object Array]" ? [data] : addFromTop ? data.reverse() : data; + this.finalUseVirtualList && this._setCellIndex(data, "top"); + this.totalData = addFromTop ? [...data, ...this.totalData] : [...this.totalData, ...data]; + if (toTop) { + uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.delay(() => this.useChatRecordMode ? this.scrollToBottom(toTopWithAnimate) : this.scrollToTop(toTopWithAnimate)); + } + }, + // 重新设置列表数据,调用此方法不会影响pageNo和pageSize,也不会触发请求。适用场景:当需要删除列表中某一项时,将删除对应项后的数组通过此方法传递给z-paging。(当出现类似的需要修改列表数组的场景时,请使用此方法,请勿直接修改page中:list.sync绑定的数组) + resetTotalData(data) { + this.isTotalChangeFromAddData = true; + data = Object.prototype.toString.call(data) !== "[object Array]" ? [data] : data; + this.totalData = data; + }, + // 设置本地分页数据,请求结束(成功或者失败)调用此方法,将请求的结果传递给z-paging作分页处理(若调用了此方法,则上拉加载更多时内部会自动分页,不会触发@query所绑定的事件) + setLocalPaging(data, success = true) { + this.isLocalPaging = true; + this.$nextTick(() => { + this._addData(data, success, true); + }); + return new Promise((resolve, reject) => { + this.dataPromiseResultMap.localPaging = { resolve, reject }; + }); + }, + // 重新加载分页数据,pageNo会恢复为默认值,相当于下拉刷新的效果(animate为true时会展示下拉刷新动画,默认为false) + reload(animate = this.showRefresherWhenReload) { + if (animate) { + this.privateShowRefresherWhenReload = animate; + this.isUserPullDown = true; + } + if (!this.showLoadingMoreWhenReload) { + this.listRendering = true; + } + this.$nextTick(() => { + this._preReload(animate, false); + }); + return new Promise((resolve, reject) => { + this.dataPromiseResultMap.reload = { resolve, reject }; + }); + }, + // 刷新列表数据,pageNo和pageSize不会重置,列表数据会重新从服务端获取。必须保证@query绑定的方法中的pageNo和pageSize和传给服务端的一致 + refresh() { + return this._handleRefreshWithDisPageNo(this.pageNo - this.defaultPageNo + 1); + }, + // 刷新列表数据至指定页,例如pageNo=5时则代表刷新列表至第5页,此时pageNo会变为5,列表会展示前5页的数据。必须保证@query绑定的方法中的pageNo和pageSize和传给服务端的一致 + refreshToPage(pageNo) { + this.isHandlingRefreshToPage = true; + return this._handleRefreshWithDisPageNo(pageNo + this.defaultPageNo - 1); + }, + // 手动更新列表缓存数据,将自动截取v-model绑定的list中的前pageSize条覆盖缓存,请确保在list数据更新到预期结果后再调用此方法 + updateCache() { + if (this.finalUseCache && this.totalData.length) { + this._saveLocalCache(this.totalData.slice(0, Math.min(this.totalData.length, this.pageSize))); + } + }, + // 清空分页数据 + clean() { + this._reload(true); + this._addData([], true, false); + }, + // 清空分页数据 + clear() { + this.clean(); + }, + // reload之前的一些处理 + _preReload(animate = this.showRefresherWhenReload, isFromMounted = true, retryCount = 0) { + const showRefresher = this.finalRefresherEnabled && this.useCustomRefresher; + if (this.customRefresherHeight === -1 && showRefresher) { + uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.delay(() => { + retryCount++; + if (retryCount % 10 === 0) { + this._updateCustomRefresherHeight(); + } + this._preReload(animate, isFromMounted, retryCount); + }, uni_modules_zPaging_components_zPaging_js_zPagingConstant.c.delayTime / 2); + return; + } + this.isUserReload = true; + this.loadingType = uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.LoadingType.Refresher; + if (animate) { + this.privateShowRefresherWhenReload = animate; + if (this.useCustomRefresher) { + this._doRefresherRefreshAnimate(); + } else { + this.refresherTriggered = true; + } + } else { + this._refresherEnd(false, false, false, false); + } + this._reload(false, isFromMounted); + }, + // 重新加载分页数据 + _reload(isClean = false, isFromMounted = false, isUserPullDown = false) { + this.isAddedData = false; + this.insideOfPaging = -1; + this.cacheScrollNodeHeight = -1; + this.pageNo = this.defaultPageNo; + this._cleanRefresherEndTimeout(); + !this.privateShowRefresherWhenReload && !isClean && this._startLoading(true); + this.firstPageLoaded = true; + this.isTotalChangeFromAddData = false; + if (!this.isSettingCacheList) { + this.totalData = []; + } + if (!isClean) { + this._emitQuery(this.pageNo, this.defaultPageSize, isUserPullDown ? uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.QueryFrom.UserPullDown : uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.QueryFrom.Reload); + let delay = 0; + uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.delay(this._callMyParentQuery, delay); + if (!isFromMounted && this.autoScrollToTopWhenReload) { + this._scrollToTop(false); + } + } + }, + // 处理服务端返回的数组 + _addData(data, success, isLocal) { + this.isAddedData = true; + this.fromEmptyViewReload = false; + this.isTotalChangeFromAddData = true; + this.refresherTriggered = false; + this._endSystemLoadingAndRefresh(); + const tempIsUserPullDown = this.isUserPullDown; + if (this.showRefresherUpdateTime && this.isFirstPage) { + uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.setRefesrherTime(uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.getTime(), this.refresherUpdateTimeKey); + this.$refs.refresh && this.$refs.refresh.updateTime(); + } + if (!isLocal && tempIsUserPullDown && this.isFirstPage) { + this.isUserPullDown = false; + } + this.listRendering = true; + this.$nextTick(() => { + uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.delay(() => this.listRendering = false); + }); + let dataTypeRes = this._checkDataType(data, success, isLocal); + data = dataTypeRes.data; + success = dataTypeRes.success; + let delayTime = uni_modules_zPaging_components_zPaging_js_zPagingConstant.c.delayTime; + if (this.useChatRecordMode) + delayTime = 0; + this.loadingForNow = false; + uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.delay(() => { + this.pagingLoaded = true; + this.$nextTick(() => { + !isLocal && this._refresherEnd(delayTime > 0, true, tempIsUserPullDown); + }); + }); + if (this.isFirstPage) { + this.isLoadFailed = !success; + this.$emit("isLoadFailedChange", this.isLoadFailed); + if (this.finalUseCache && success && (this.cacheMode === uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.CacheMode.Always ? true : this.isSettingCacheList)) { + this._saveLocalCache(data); + } + } + this.isSettingCacheList = false; + if (success) { + if (!(this.privateConcat === false && !this.isHandlingRefreshToPage && this.loadingStatus === uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.More.NoMore)) { + this.loadingStatus = uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.More.Default; + } + if (isLocal) { + this.totalLocalPagingList = data; + const localPageNo = this.defaultPageNo; + const localPageSize = this.queryFrom !== uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.QueryFrom.Refresh ? this.defaultPageSize : this.currentRefreshPageSize; + this._localPagingQueryList(localPageNo, localPageSize, 0, (res) => { + uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.delay(() => { + this.completeByTotal(res, this.totalLocalPagingList.length); + }, 0); + }); + } else { + let dataChangeDelayTime = 0; + uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.delay(() => { + this._currentDataChange(data, this.currentData); + this._callDataPromise(true, this.totalData); + }, dataChangeDelayTime); + } + if (this.isHandlingRefreshToPage) { + this.isHandlingRefreshToPage = false; + this.pageNo = this.defaultPageNo + Math.ceil(data.length / this.pageSize) - 1; + if (data.length % this.pageSize !== 0) { + this.customNoMore = 1; + } + } + } else { + this._currentDataChange(data, this.currentData); + this._callDataPromise(false); + this.loadingStatus = uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.More.Fail; + this.isHandlingRefreshToPage = false; + if (this.loadingType === uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.LoadingType.LoadMore) { + this.pageNo--; + } + } + }, + // 所有数据改变时调用 + _totalDataChange(newVal, oldVal, eventThrow = true) { + if ((!this.isUserReload || !this.autoCleanListWhenReload) && this.firstPageLoaded && !newVal.length && oldVal.length) { + return; + } + this._doCheckScrollViewShouldFullHeight(newVal); + if (!this.realTotalData.length && !newVal.length) { + eventThrow = false; + } + this.realTotalData = newVal; + if (eventThrow) { + this.$emit("input", newVal); + this.$emit("update:modelValue", newVal); + this.$emit("update:list", newVal); + this.$emit("listChange", newVal); + this._callMyParentList(newVal); + } + this.firstPageLoaded = false; + this.isTotalChangeFromAddData = false; + this.$nextTick(() => { + uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.delay(() => { + this._getNodeClientRect(".zp-paging-container-content").then((res) => { + res && this.$emit("contentHeightChanged", res[0].height); + }); + }, uni_modules_zPaging_components_zPaging_js_zPagingConstant.c.delayTime * (this.isIos ? 1 : 3)); + }); + }, + // 当前数据改变时调用 + _currentDataChange(newVal, oldVal) { + newVal = [...newVal]; + this.finalUseVirtualList && this._setCellIndex(newVal, "bottom"); + if (this.isFirstPage && this.finalConcat) { + this.totalData = []; + } + if (this.customNoMore !== -1) { + if (this.customNoMore === 1 || this.customNoMore !== 0 && !newVal.length) { + this.loadingStatus = uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.More.NoMore; + } + } else { + if (!newVal.length || newVal.length && newVal.length < this.defaultPageSize) { + this.loadingStatus = uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.More.NoMore; + } + } + if (!this.totalData.length) { + this.totalData = newVal; + } else { + if (this.finalConcat) { + const currentScrollTop = this.oldScrollTop; + this.totalData = [...this.totalData, ...newVal]; + if (!this.isIos && !this.refresherOnly && !this.usePageScroll && newVal.length) { + this.loadingMoreTimeStamp = uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.getTime(); + this.$nextTick(() => { + this.scrollToY(currentScrollTop); + }); + } + } else { + this.totalData = newVal; + } + } + this.privateConcat = true; + }, + // 根据pageNo处理refresh操作 + _handleRefreshWithDisPageNo(pageNo) { + if (!this.isHandlingRefreshToPage && !this.realTotalData.length) + return this.reload(); + if (pageNo >= 1) { + this.loading = true; + this.privateConcat = false; + const totalPageSize = pageNo * this.pageSize; + this.currentRefreshPageSize = totalPageSize; + if (this.isLocalPaging && this.isHandlingRefreshToPage) { + this._localPagingQueryList(this.defaultPageNo, totalPageSize, 0, (res) => { + this.complete(res); + }); + } else { + this._emitQuery(this.defaultPageNo, totalPageSize, uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.QueryFrom.Refresh); + this._callMyParentQuery(this.defaultPageNo, totalPageSize); + } + } + return new Promise((resolve, reject) => { + this.dataPromiseResultMap.reload = { resolve, reject }; + }); + }, + // 本地分页请求 + _localPagingQueryList(pageNo, pageSize, localPagingLoadingTime, callback) { + pageNo = Math.max(1, pageNo); + pageSize = Math.max(1, pageSize); + const totalPagingList = [...this.totalLocalPagingList]; + const pageNoIndex = (pageNo - 1) * pageSize; + const finalPageNoIndex = Math.min(totalPagingList.length, pageNoIndex + pageSize); + const resultPagingList = totalPagingList.splice(pageNoIndex, finalPageNoIndex - pageNoIndex); + uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.delay(() => callback(resultPagingList), localPagingLoadingTime); + }, + // 存储列表缓存数据 + _saveLocalCache(data) { + common_vendor.index.setStorageSync(this.finalCacheKey, data); + }, + // 通过缓存数据填充列表数据 + _setListByLocalCache() { + this.totalData = common_vendor.index.getStorageSync(this.finalCacheKey) || []; + this.isSettingCacheList = true; + }, + // 修改父view的list + _callMyParentList(newVal) { + if (this.autowireListName.length) { + const myParent = uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.getParent(this.$parent); + if (myParent && myParent[this.autowireListName]) { + myParent[this.autowireListName] = newVal; + } + } + }, + // 调用父view的query + _callMyParentQuery(customPageNo = 0, customPageSize = 0) { + if (this.autowireQueryName) { + if (this.myParentQuery === -1) { + const myParent = uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.getParent(this.$parent); + if (myParent && myParent[this.autowireQueryName]) { + this.myParentQuery = myParent[this.autowireQueryName]; + } + } + if (this.myParentQuery !== -1) { + customPageSize > 0 ? this.myParentQuery(customPageNo, customPageSize) : this.myParentQuery(this.pageNo, this.defaultPageSize); + } + } + }, + // emit query事件 + _emitQuery(pageNo, pageSize, from) { + this.queryFrom = from; + this.requestTimeStamp = uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.getTime(); + const [lastItem] = this.realTotalData.slice(-1); + if (this.fetch) { + const fetchParams = uni_modules_zPaging_components_zPaging_js_zPagingInterceptor.interceptor._handleFetchParams({ pageNo, pageSize, from, lastItem: lastItem || null }, this.fetchParams); + const fetchResult = this.fetch(fetchParams); + if (!uni_modules_zPaging_components_zPaging_js_zPagingInterceptor.interceptor._handleFetchResult(fetchResult, this, fetchParams)) { + uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.isPromise(fetchResult) ? fetchResult.then((res) => { + this.complete(res); + }).catch((err) => { + this.complete(false); + }) : this.complete(fetchResult); + } + } else { + this.$emit("query", ...uni_modules_zPaging_components_zPaging_js_zPagingInterceptor.interceptor._handleQuery(pageNo, pageSize, from, lastItem || null)); + } + }, + // 触发数据改变promise + _callDataPromise(success, totalList) { + for (const key in this.dataPromiseResultMap) { + const obj = this.dataPromiseResultMap[key]; + if (!obj) + continue; + success ? obj.resolve({ totalList, noMore: this.loadingStatus === uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.More.NoMore }) : this.callNetworkReject && obj.reject(`z-paging-${key}-error`); + } + }, + // 检查complete data的类型 + _checkDataType(data, success, isLocal) { + const dataType = Object.prototype.toString.call(data); + if (dataType === "[object Boolean]") { + success = data; + data = []; + } else if (dataType !== "[object Array]") { + data = []; + if (dataType !== "[object Undefined]" && dataType !== "[object Null]") { + uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.consoleErr(`${isLocal ? "setLocalPaging" : "complete"}参数类型不正确,第一个参数类型必须为Array!`); + } + } + return { data, success }; + } + } +}; +exports.dataHandleModule = dataHandleModule; +//# sourceMappingURL=../../../../../../../.sourcemap/mp-weixin/uni_modules/z-paging/components/z-paging/js/modules/data-handle.js.map diff --git a/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/js/modules/empty.js b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/js/modules/empty.js new file mode 100644 index 0000000..d8caf6c --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/js/modules/empty.js @@ -0,0 +1,148 @@ +"use strict"; +const uni_modules_zPaging_components_zPaging_js_zPagingUtils = require("../z-paging-utils.js"); +const emptyModule = { + props: { + // 是否强制隐藏空数据图,默认为否 + hideEmptyView: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("hideEmptyView", false) + }, + // 空数据图描述文字,默认为“没有数据哦~” + emptyViewText: { + type: [String, Object], + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("emptyViewText", null) + }, + // 是否显示空数据图重新加载按钮(无数据时),默认为否 + showEmptyViewReload: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("showEmptyViewReload", false) + }, + // 加载失败时是否显示空数据图重新加载按钮,默认为是 + showEmptyViewReloadWhenError: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("showEmptyViewReloadWhenError", true) + }, + // 空数据图点击重新加载文字,默认为“重新加载” + emptyViewReloadText: { + type: [String, Object], + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("emptyViewReloadText", null) + }, + // 空数据图图片,默认使用z-paging内置的图片 + emptyViewImg: { + type: String, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("emptyViewImg", "") + }, + // 空数据图“加载失败”描述文字,默认为“很抱歉,加载失败” + emptyViewErrorText: { + type: [String, Object], + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("emptyViewErrorText", null) + }, + // 空数据图“加载失败”图片,默认使用z-paging内置的图片 + emptyViewErrorImg: { + type: String, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("emptyViewErrorImg", "") + }, + // 空数据图样式 + emptyViewStyle: { + type: Object, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("emptyViewStyle", {}) + }, + // 空数据图容器样式 + emptyViewSuperStyle: { + type: Object, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("emptyViewSuperStyle", {}) + }, + // 空数据图img样式 + emptyViewImgStyle: { + type: Object, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("emptyViewImgStyle", {}) + }, + // 空数据图描述文字样式 + emptyViewTitleStyle: { + type: Object, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("emptyViewTitleStyle", {}) + }, + // 空数据图重新加载按钮样式 + emptyViewReloadStyle: { + type: Object, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("emptyViewReloadStyle", {}) + }, + // 空数据图片是否铺满z-paging,默认为否,即填充满z-paging内列表(滚动区域)部分。若设置为否,则为填铺满整个z-paging + emptyViewFixed: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("emptyViewFixed", false) + }, + // 空数据图片是否垂直居中,默认为是,若设置为否即为从空数据容器顶部开始显示。emptyViewFixed为false时有效 + emptyViewCenter: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("emptyViewCenter", true) + }, + // 加载中时是否自动隐藏空数据图,默认为是 + autoHideEmptyViewWhenLoading: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("autoHideEmptyViewWhenLoading", true) + }, + // 用户下拉列表触发下拉刷新加载中时是否自动隐藏空数据图,默认为是 + autoHideEmptyViewWhenPull: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("autoHideEmptyViewWhenPull", true) + }, + // 空数据view的z-index,默认为9 + emptyViewZIndex: { + type: Number, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("emptyViewZIndex", 9) + } + }, + data() { + return { + customerEmptyViewErrorText: "" + }; + }, + computed: { + finalEmptyViewImg() { + return this.isLoadFailed ? this.emptyViewErrorImg : this.emptyViewImg; + }, + finalShowEmptyViewReload() { + return this.isLoadFailed ? this.showEmptyViewReloadWhenError : this.showEmptyViewReload; + }, + // 是否展示空数据图 + showEmpty() { + if (this.refresherOnly || this.hideEmptyView || this.realTotalData.length) + return false; + if (this.autoHideEmptyViewWhenLoading) { + if (this.isAddedData && !this.firstPageLoaded && !this.loading) + return true; + } else { + return true; + } + return !this.autoHideEmptyViewWhenPull && !this.isUserReload; + } + }, + methods: { + // 点击了空数据view重新加载按钮 + _emptyViewReload() { + let callbacked = false; + this.$emit("emptyViewReload", (reload) => { + if (reload === void 0 || reload === true) { + this.fromEmptyViewReload = true; + this.reload().catch(() => { + }); + } + callbacked = true; + }); + this.$nextTick(() => { + if (!callbacked) { + this.fromEmptyViewReload = true; + this.reload().catch(() => { + }); + } + }); + }, + // 点击了空数据view + _emptyViewClick() { + this.$emit("emptyViewClick"); + } + } +}; +exports.emptyModule = emptyModule; +//# sourceMappingURL=../../../../../../../.sourcemap/mp-weixin/uni_modules/z-paging/components/z-paging/js/modules/empty.js.map diff --git a/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/js/modules/i18n.js b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/js/modules/i18n.js new file mode 100644 index 0000000..584c9ab --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/js/modules/i18n.js @@ -0,0 +1,112 @@ +"use strict"; +const common_vendor = require("../../../../../../common/vendor.js"); +const uni_modules_zPaging_components_zPaging_i18n_index = require("../../i18n/index.js"); +const uni_modules_zPaging_components_zPaging_js_zPagingInterceptor = require("../z-paging-interceptor.js"); +const { t } = common_vendor.initVueI18n(uni_modules_zPaging_components_zPaging_i18n_index.messages); +const i18nModule = { + computed: { + finalLanguage() { + try { + const local = common_vendor.index.getLocale(); + const language = this.systemInfo.appLanguage; + return local === "auto" ? uni_modules_zPaging_components_zPaging_js_zPagingInterceptor.interceptor._handleLanguage2Local(language, this._language2Local(language)) : local; + } catch (e) { + return "zh-Hans"; + } + }, + // 最终的下拉刷新默认状态的文字 + finalRefresherDefaultText() { + return this._getI18nText("zp.refresher.default", this.refresherDefaultText); + }, + // 最终的下拉刷新下拉中的文字 + finalRefresherPullingText() { + return this._getI18nText("zp.refresher.pulling", this.refresherPullingText); + }, + // 最终的下拉刷新中文字 + finalRefresherRefreshingText() { + return this._getI18nText("zp.refresher.refreshing", this.refresherRefreshingText); + }, + // 最终的下拉刷新完成文字 + finalRefresherCompleteText() { + return this._getI18nText("zp.refresher.complete", this.refresherCompleteText); + }, + // 最终的下拉刷新上次更新时间文字 + finalRefresherUpdateTimeTextMap() { + return { + title: t("zp.refresherUpdateTime.title"), + none: t("zp.refresherUpdateTime.none"), + today: t("zp.refresherUpdateTime.today"), + yesterday: t("zp.refresherUpdateTime.yesterday") + }; + }, + // 最终的继续下拉进入二楼文字 + finalRefresherGoF2Text() { + return this._getI18nText("zp.refresher.f2", this.refresherGoF2Text); + }, + // 最终的底部加载更多默认状态文字 + finalLoadingMoreDefaultText() { + return this._getI18nText("zp.loadingMore.default", this.loadingMoreDefaultText); + }, + // 最终的底部加载更多加载中文字 + finalLoadingMoreLoadingText() { + return this._getI18nText("zp.loadingMore.loading", this.loadingMoreLoadingText); + }, + // 最终的底部加载更多没有更多数据文字 + finalLoadingMoreNoMoreText() { + return this._getI18nText("zp.loadingMore.noMore", this.loadingMoreNoMoreText); + }, + // 最终的底部加载更多加载失败文字 + finalLoadingMoreFailText() { + return this._getI18nText("zp.loadingMore.fail", this.loadingMoreFailText); + }, + // 最终的空数据图title + finalEmptyViewText() { + return this.isLoadFailed ? this.finalEmptyViewErrorText : this._getI18nText("zp.emptyView.title", this.emptyViewText); + }, + // 最终的空数据图reload title + finalEmptyViewReloadText() { + return this._getI18nText("zp.emptyView.reload", this.emptyViewReloadText); + }, + // 最终的空数据图加载失败文字 + finalEmptyViewErrorText() { + return this.customerEmptyViewErrorText || this._getI18nText("zp.emptyView.error", this.emptyViewErrorText); + }, + // 最终的系统loading title + finalSystemLoadingText() { + return this._getI18nText("zp.systemLoading.title", this.systemLoadingText); + } + }, + methods: { + // 获取当前z-paging的语言 + getLanguage() { + return this.finalLanguage; + }, + // 获取国际化转换后的文本 + _getI18nText(key, value) { + const dataType = Object.prototype.toString.call(value); + if (dataType === "[object Object]") { + const nextValue = value[this.finalLanguage]; + if (nextValue) + return nextValue; + } else if (dataType === "[object String]") { + return value; + } + return t(key); + }, + // 系统language转i18n local + _language2Local(language) { + const formatedLanguage = language.toLowerCase().replace(new RegExp("_", ""), "-"); + if (formatedLanguage.indexOf("zh") !== -1) { + if (formatedLanguage === "zh" || formatedLanguage === "zh-cn" || formatedLanguage.indexOf("zh-hans") !== -1) { + return "zh-Hans"; + } + return "zh-Hant"; + } + if (formatedLanguage.indexOf("en") !== -1) + return "en"; + return language; + } + } +}; +exports.i18nModule = i18nModule; +//# sourceMappingURL=../../../../../../../.sourcemap/mp-weixin/uni_modules/z-paging/components/z-paging/js/modules/i18n.js.map diff --git a/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/js/modules/load-more.js b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/js/modules/load-more.js new file mode 100644 index 0000000..5c3d68a --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/js/modules/load-more.js @@ -0,0 +1,338 @@ +"use strict"; +const uni_modules_zPaging_components_zPaging_js_zPagingUtils = require("../z-paging-utils.js"); +const uni_modules_zPaging_components_zPaging_js_zPagingEnum = require("../z-paging-enum.js"); +const loadMoreModule = { + props: { + // 自定义底部加载更多样式 + loadingMoreCustomStyle: { + type: Object, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("loadingMoreCustomStyle", {}) + }, + // 自定义底部加载更多文字样式 + loadingMoreTitleCustomStyle: { + type: Object, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("loadingMoreTitleCustomStyle", {}) + }, + // 自定义底部加载更多加载中动画样式 + loadingMoreLoadingIconCustomStyle: { + type: Object, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("loadingMoreLoadingIconCustomStyle", {}) + }, + // 自定义底部加载更多加载中动画图标类型,可选flower或circle,默认为flower + loadingMoreLoadingIconType: { + type: String, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("loadingMoreLoadingIconType", "flower") + }, + // 自定义底部加载更多加载中动画图标图片 + loadingMoreLoadingIconCustomImage: { + type: String, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("loadingMoreLoadingIconCustomImage", "") + }, + // 底部加载更多加载中view是否展示旋转动画,默认为是 + loadingMoreLoadingAnimated: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("loadingMoreLoadingAnimated", true) + }, + // 是否启用加载更多数据(含滑动到底部加载更多数据和点击加载更多数据),默认为是 + loadingMoreEnabled: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("loadingMoreEnabled", true) + }, + // 是否启用滑动到底部加载更多数据,默认为是 + toBottomLoadingMoreEnabled: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("toBottomLoadingMoreEnabled", true) + }, + // 滑动到底部状态为默认状态时,以加载中的状态展示,默认为否。若设置为是,可避免滚动到底部看到默认状态然后立刻变为加载中状态的问题,但分页数量未超过一屏时,不会显示【点击加载更多】 + loadingMoreDefaultAsLoading: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("loadingMoreDefaultAsLoading", false) + }, + // 滑动到底部"默认"文字,默认为【点击加载更多】 + loadingMoreDefaultText: { + type: [String, Object], + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("loadingMoreDefaultText", null) + }, + // 滑动到底部"加载中"文字,默认为【正在加载...】 + loadingMoreLoadingText: { + type: [String, Object], + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("loadingMoreLoadingText", null) + }, + // 滑动到底部"没有更多"文字,默认为【没有更多了】 + loadingMoreNoMoreText: { + type: [String, Object], + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("loadingMoreNoMoreText", null) + }, + // 滑动到底部"加载失败"文字,默认为【加载失败,点击重新加载】 + loadingMoreFailText: { + type: [String, Object], + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("loadingMoreFailText", null) + }, + // 当没有更多数据且分页内容未超出z-paging时是否隐藏没有更多数据的view,默认为否 + hideNoMoreInside: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("hideNoMoreInside", false) + }, + // 当没有更多数据且分页数组长度少于这个值时,隐藏没有更多数据的view,默认为0,代表不限制。 + hideNoMoreByLimit: { + type: Number, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("hideNoMoreByLimit", 0) + }, + // 是否显示默认的加载更多text,默认为是 + showDefaultLoadingMoreText: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("showDefaultLoadingMoreText", true) + }, + // 是否显示没有更多数据的view + showLoadingMoreNoMoreView: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("showLoadingMoreNoMoreView", true) + }, + // 是否显示没有更多数据的分割线,默认为是 + showLoadingMoreNoMoreLine: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("showLoadingMoreNoMoreLine", true) + }, + // 自定义底部没有更多数据的分割线样式 + loadingMoreNoMoreLineCustomStyle: { + type: Object, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("loadingMoreNoMoreLineCustomStyle", {}) + }, + // 当分页未满一屏时,是否自动加载更多,默认为否(nvue无效) + insideMore: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("insideMore", false) + }, + // 距底部/右边多远时(单位px),触发 scrolltolower 事件,默认为100rpx + lowerThreshold: { + type: [Number, String], + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("lowerThreshold", "100rpx") + } + }, + data() { + return { + M: uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.More, + // 底部加载更多状态 + loadingStatus: uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.More.Default, + // 在渲染之后的底部加载更多状态 + loadingStatusAfterRender: uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.More.Default, + // 底部加载更多时间戳 + loadingMoreTimeStamp: 0, + // 底部加载更多slot + loadingMoreDefaultSlot: null, + // 是否展示底部加载更多 + showLoadingMore: false, + // 是否是开发者自定义的加载更多,-1代表交由z-paging自行判断;1代表没有更多了;0代表还有更多数据 + customNoMore: -1 + }; + }, + computed: { + // 底部加载更多配置 + zLoadMoreConfig() { + return { + status: this.loadingStatusAfterRender, + defaultAsLoading: this.loadingMoreDefaultAsLoading || this.useChatRecordMode && this.chatLoadingMoreDefaultAsLoading, + defaultThemeStyle: this.finalLoadingMoreThemeStyle, + customStyle: this.loadingMoreCustomStyle, + titleCustomStyle: this.loadingMoreTitleCustomStyle, + iconCustomStyle: this.loadingMoreLoadingIconCustomStyle, + loadingIconType: this.loadingMoreLoadingIconType, + loadingIconCustomImage: this.loadingMoreLoadingIconCustomImage, + loadingAnimated: this.loadingMoreLoadingAnimated, + showNoMoreLine: this.showLoadingMoreNoMoreLine, + noMoreLineCustomStyle: this.loadingMoreNoMoreLineCustomStyle, + defaultText: this.finalLoadingMoreDefaultText, + loadingText: this.finalLoadingMoreLoadingText, + noMoreText: this.finalLoadingMoreNoMoreText, + failText: this.finalLoadingMoreFailText, + hideContent: !this.loadingMoreDefaultAsLoading && this.listRendering, + unit: this.unit, + isChat: this.useChatRecordMode, + chatDefaultAsLoading: this.chatLoadingMoreDefaultAsLoading + }; + }, + // 最终的底部加载更多主题 + finalLoadingMoreThemeStyle() { + return this.loadingMoreThemeStyle.length ? this.loadingMoreThemeStyle : this.defaultThemeStyle; + }, + // 最终的底部加载更多触发阈值 + finalLowerThreshold() { + return uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.convertToPx(this.lowerThreshold); + }, + // 是否显示默认状态下的底部加载更多 + showLoadingMoreDefault() { + return this._showLoadingMore("Default"); + }, + // 是否显示加载中状态下的底部加载更多 + showLoadingMoreLoading() { + return this._showLoadingMore("Loading"); + }, + // 是否显示没有更多了状态下的底部加载更多 + showLoadingMoreNoMore() { + return this._showLoadingMore("NoMore"); + }, + // 是否显示加载失败状态下的底部加载更多 + showLoadingMoreFail() { + return this._showLoadingMore("Fail"); + }, + // 是否显示自定义状态下的底部加载更多 + showLoadingMoreCustom() { + return this._showLoadingMore("Custom"); + }, + // 底部加载更多固定高度 + loadingMoreFixedHeight() { + return uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.addUnit("80rpx", this.unit); + } + }, + methods: { + // 页面滚动到底部时通知z-paging进行进一步处理 + pageReachBottom() { + !this.useChatRecordMode && this.toBottomLoadingMoreEnabled && this._onLoadingMore("toBottom"); + }, + // 手动触发上拉加载更多(非必须,可依据具体需求使用) + doLoadMore(type) { + this._onLoadingMore(type); + }, + // 通过@scroll事件检测是否滚动到了底部(顺带检测下是否滚动到了顶部) + _checkScrolledToBottom(scrollDiff, checked = false) { + if (this.cacheScrollNodeHeight === -1) { + this._getNodeClientRect(".zp-scroll-view").then((res) => { + if (res) { + const scrollNodeHeight = res[0].height; + this.cacheScrollNodeHeight = scrollNodeHeight; + if (scrollDiff - scrollNodeHeight <= this.finalLowerThreshold) { + this._onLoadingMore("toBottom"); + } + } + }); + } else { + if (scrollDiff - this.cacheScrollNodeHeight <= this.finalLowerThreshold) { + this._onLoadingMore("toBottom"); + } else if (scrollDiff - this.cacheScrollNodeHeight <= 500 && !checked) { + uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.delay(() => { + this._getNodeClientRect(".zp-scroll-view", true, true).then((res) => { + if (res) { + this.oldScrollTop = res[0].scrollTop; + const newScrollDiff = res[0].scrollHeight - this.oldScrollTop; + this._checkScrolledToBottom(newScrollDiff, true); + } + }); + }, 150, "checkScrolledToBottomDelay"); + } + if (this.oldScrollTop <= 150 && this.oldScrollTop !== 0) { + uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.delay(() => { + if (this.oldScrollTop !== 0) { + this._getNodeClientRect(".zp-scroll-view", true, true).then((res) => { + if (res && res[0].scrollTop === 0 && this.oldScrollTop !== 0) { + this._onScrollToUpper(); + } + }); + } + }, 150, "checkScrolledToTopDelay"); + } + } + }, + // 触发加载更多时调用,from:toBottom-滑动到底部触发;click-点击加载更多触发 + _onLoadingMore(from = "click") { + if (this.isIos && from === "toBottom" && !this.scrollToBottomBounceEnabled && this.scrollEnable) { + this.scrollEnable = false; + this.$nextTick(() => { + this.scrollEnable = true; + }); + } + this._emitScrollEvent("scrolltolower"); + if (this.refresherOnly || !this.loadingMoreEnabled || !(this.loadingStatus === uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.More.Default || this.loadingStatus === uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.More.Fail) || this.loading || this.showEmpty) + return; + if (!this.isIos && !this.refresherOnly && !this.usePageScroll) { + const currentTimestamp = uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.getTime(); + if (this.loadingMoreTimeStamp > 0 && currentTimestamp - this.loadingMoreTimeStamp < 100) { + this.loadingMoreTimeStamp = 0; + return; + } + } + this._doLoadingMore(); + }, + // 处理开始加载更多 + _doLoadingMore() { + if (this.pageNo >= this.defaultPageNo && this.loadingStatus !== uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.More.NoMore) { + this.pageNo++; + this._startLoading(false); + if (this.isLocalPaging) { + this._localPagingQueryList(this.pageNo, this.defaultPageSize, this.localPagingLoadingTime, (res) => { + this.completeByTotal(res, this.totalLocalPagingList.length); + this.queryFrom = uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.QueryFrom.LoadMore; + }); + } else { + this._emitQuery(this.pageNo, this.defaultPageSize, uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.QueryFrom.LoadMore); + this._callMyParentQuery(); + } + this.loadingType = uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.LoadingType.LoadMore; + } + }, + // (预处理)判断当没有更多数据且分页内容未超出z-paging时是否显示没有更多数据的view + _preCheckShowNoMoreInside(newVal, scrollViewNode, pagingContainerNode) { + if (this.loadingStatus === uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.More.NoMore && this.hideNoMoreByLimit > 0 && newVal.length) { + this.showLoadingMore = newVal.length > this.hideNoMoreByLimit; + } else if (this.loadingStatus === uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.More.NoMore && this.hideNoMoreInside && newVal.length || this.insideMore && this.insideOfPaging !== false && newVal.length) { + this.$nextTick(() => { + this._checkShowNoMoreInside(newVal, scrollViewNode, pagingContainerNode); + }); + if (this.insideMore && this.insideOfPaging !== false && newVal.length) { + this.showLoadingMore = newVal.length; + } + } else { + this.showLoadingMore = newVal.length; + } + }, + // 判断当没有更多数据且分页内容未超出z-paging时是否显示没有更多数据的view + async _checkShowNoMoreInside(totalData, oldScrollViewNode, oldPagingContainerNode) { + try { + const scrollViewNode = oldScrollViewNode || await this._getNodeClientRect(".zp-scroll-view"); + if (this.usePageScroll) { + if (scrollViewNode) { + const scrollViewTotalH = scrollViewNode[0].top + scrollViewNode[0].height; + this.insideOfPaging = scrollViewTotalH < this.windowHeight; + if (this.hideNoMoreInside) { + this.showLoadingMore = !this.insideOfPaging; + } + this._updateInsideOfPaging(); + } + } else { + const pagingContainerNode = oldPagingContainerNode || await this._getNodeClientRect(".zp-paging-container-content"); + const pagingContainerH = pagingContainerNode ? pagingContainerNode[0].height : 0; + const scrollViewH = scrollViewNode ? scrollViewNode[0].height : 0; + this.insideOfPaging = pagingContainerH < scrollViewH; + if (this.hideNoMoreInside) { + this.showLoadingMore = !this.insideOfPaging; + } + this._updateInsideOfPaging(); + } + } catch (e) { + this.insideOfPaging = !totalData.length; + if (this.hideNoMoreInside) { + this.showLoadingMore = !this.insideOfPaging; + } + this._updateInsideOfPaging(); + } + }, + // 是否要展示上拉加载更多view + _showLoadingMore(type) { + if (!this.showLoadingMoreWhenReload && (!(this.loadingStatus === uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.More.Default ? this.nShowBottom : true) || !this.realTotalData.length)) + return false; + if ((!this.showLoadingMoreWhenReload || this.isUserPullDown || this.loadingStatus !== uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.More.Loading) && !this.showLoadingMore || !this.loadingMoreEnabled && (!this.showLoadingMoreWhenReload || this.isUserPullDown || this.loadingStatus !== uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.More.Loading) || this.refresherOnly) { + return false; + } + if (this.useChatRecordMode && type !== "Loading") + return false; + if (!this.zSlots) + return false; + if (type === "Custom") { + return this.showDefaultLoadingMoreText && !(this.loadingStatus === uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.More.NoMore && !this.showLoadingMoreNoMoreView); + } + const res = this.loadingStatus === uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.More[type] && this.zSlots[`loadingMore${type}`] && (type === "NoMore" ? this.showLoadingMoreNoMoreView : true); + return res; + } + } +}; +exports.loadMoreModule = loadMoreModule; +//# sourceMappingURL=../../../../../../../.sourcemap/mp-weixin/uni_modules/z-paging/components/z-paging/js/modules/load-more.js.map diff --git a/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/js/modules/loading.js b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/js/modules/loading.js new file mode 100644 index 0000000..0781b9d --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/js/modules/loading.js @@ -0,0 +1,94 @@ +"use strict"; +const common_vendor = require("../../../../../../common/vendor.js"); +const uni_modules_zPaging_components_zPaging_js_zPagingUtils = require("../z-paging-utils.js"); +const uni_modules_zPaging_components_zPaging_js_zPagingEnum = require("../z-paging-enum.js"); +const loadingModule = { + props: { + // 第一次加载后自动隐藏loading slot,默认为是 + autoHideLoadingAfterFirstLoaded: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("autoHideLoadingAfterFirstLoaded", true) + }, + // loading slot是否铺满屏幕并固定,默认为否 + loadingFullFixed: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("loadingFullFixed", false) + }, + // 是否自动显示系统Loading:即uni.showLoading,若开启则将在刷新列表时(调用reload、refresh时)显示,下拉刷新和滚动到底部加载更多不会显示,默认为false。 + autoShowSystemLoading: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("autoShowSystemLoading", false) + }, + // 显示系统Loading时是否显示透明蒙层,防止触摸穿透,默认为是(H5、App、微信小程序、百度小程序有效) + systemLoadingMask: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("systemLoadingMask", true) + }, + // 显示系统Loading时显示的文字,默认为"加载中" + systemLoadingText: { + type: [String, Object], + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("systemLoadingText", null) + } + }, + data() { + return { + loading: false, + loadingForNow: false + }; + }, + watch: { + // loading状态 + loadingStatus(newVal) { + this.$emit("loadingStatusChange", newVal); + this.$nextTick(() => { + this.loadingStatusAfterRender = newVal; + }); + if (this.useChatRecordMode) { + if (this.isFirstPage && (newVal === uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.More.NoMore || newVal === uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.More.Fail)) { + this.isFirstPageAndNoMore = true; + return; + } + } + this.isFirstPageAndNoMore = false; + }, + loading(newVal) { + if (newVal) { + this.loadingForNow = newVal; + } + } + }, + computed: { + // 是否显示loading + showLoading() { + if (this.firstPageLoaded || !this.loading || !this.loadingForNow) + return false; + if (this.finalShowSystemLoading) { + common_vendor.index.showLoading({ + title: this.finalSystemLoadingText, + mask: this.systemLoadingMask + }); + } + return this.autoHideLoadingAfterFirstLoaded ? this.fromEmptyViewReload ? true : !this.pagingLoaded : this.loadingType === uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.LoadingType.Refresher; + }, + // 最终的是否显示系统loading + finalShowSystemLoading() { + return this.autoShowSystemLoading && this.loadingType === uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.LoadingType.Refresher; + } + }, + methods: { + // 处理开始加载更多状态 + _startLoading(isReload = false) { + if (this.showLoadingMoreWhenReload && !this.isUserPullDown || !isReload) { + this.loadingStatus = uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.More.Loading; + } + this.loading = true; + }, + // 停止系统loading和refresh + _endSystemLoadingAndRefresh() { + this.finalShowSystemLoading && common_vendor.index.hideLoading(); + !this.useCustomRefresher && common_vendor.index.stopPullDownRefresh(); + } + } +}; +exports.loadingModule = loadingModule; +//# sourceMappingURL=../../../../../../../.sourcemap/mp-weixin/uni_modules/z-paging/components/z-paging/js/modules/loading.js.map diff --git a/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/js/modules/nvue.js b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/js/modules/nvue.js new file mode 100644 index 0000000..ddee29a --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/js/modules/nvue.js @@ -0,0 +1,25 @@ +"use strict"; +const uni_modules_zPaging_components_zPaging_js_zPagingUtils = require("../z-paging-utils.js"); +const nvueModule = { + props: {}, + data() { + return { + nRefresherLoading: false, + nListIsDragging: false, + nShowBottom: true, + nFixFreezing: false, + nShowRefresherReveal: false, + nLoadingMoreFixedHeight: false, + nShowRefresherRevealHeight: 0, + nOldShowRefresherRevealHeight: -1, + nRefresherWidth: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.rpx2px(750), + nF2Opacity: 0 + }; + }, + computed: {}, + mounted() { + }, + methods: {} +}; +exports.nvueModule = nvueModule; +//# sourceMappingURL=../../../../../../../.sourcemap/mp-weixin/uni_modules/z-paging/components/z-paging/js/modules/nvue.js.map diff --git a/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/js/modules/refresher.js b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/js/modules/refresher.js new file mode 100644 index 0000000..8afd4e6 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/js/modules/refresher.js @@ -0,0 +1,624 @@ +"use strict"; +const common_vendor = require("../../../../../../common/vendor.js"); +const uni_modules_zPaging_components_zPaging_js_zPagingUtils = require("../z-paging-utils.js"); +const uni_modules_zPaging_components_zPaging_js_zPagingEnum = require("../z-paging-enum.js"); +const refresherModule = { + props: { + // 下拉刷新的主题样式,支持black,white,默认black + refresherThemeStyle: { + type: String, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("refresherThemeStyle", "") + }, + // 自定义下拉刷新中左侧图标的样式 + refresherImgStyle: { + type: Object, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("refresherImgStyle", {}) + }, + // 自定义下拉刷新中右侧状态描述文字的样式 + refresherTitleStyle: { + type: Object, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("refresherTitleStyle", {}) + }, + // 自定义下拉刷新中右侧最后更新时间文字的样式(show-refresher-update-time为true时有效) + refresherUpdateTimeStyle: { + type: Object, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("refresherUpdateTimeStyle", {}) + }, + // 在微信小程序和QQ小程序中,是否实时监听下拉刷新中进度,默认为否 + watchRefresherTouchmove: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("watchRefresherTouchmove", false) + }, + // 底部加载更多的主题样式,支持black,white,默认black + loadingMoreThemeStyle: { + type: String, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("loadingMoreThemeStyle", "") + }, + // 是否只使用下拉刷新,设置为true后将关闭mounted自动请求数据、关闭滚动到底部加载更多,强制隐藏空数据图。默认为否 + refresherOnly: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("refresherOnly", false) + }, + // 自定义下拉刷新默认状态下回弹动画时间,单位为毫秒,默认为100毫秒,nvue无效 + refresherDefaultDuration: { + type: [Number, String], + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("refresherDefaultDuration", 100) + }, + // 自定义下拉刷新结束以后延迟回弹的时间,单位为毫秒,默认为0 + refresherCompleteDelay: { + type: [Number, String], + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("refresherCompleteDelay", 0) + }, + // 自定义下拉刷新结束回弹动画时间,单位为毫秒,默认为300毫秒(refresherEndBounceEnabled为false时,refresherCompleteDuration为设定值的1/3),nvue无效 + refresherCompleteDuration: { + type: [Number, String], + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("refresherCompleteDuration", 300) + }, + // 自定义下拉刷新中是否允许列表滚动,默认为是 + refresherRefreshingScrollable: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("refresherRefreshingScrollable", true) + }, + // 自定义下拉刷新结束状态下是否允许列表滚动,默认为否 + refresherCompleteScrollable: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("refresherCompleteScrollable", false) + }, + // 是否使用自定义的下拉刷新,默认为是,即使用z-paging的下拉刷新。设置为false即代表使用uni scroll-view自带的下拉刷新,h5、App、微信小程序以外的平台不支持uni scroll-view自带的下拉刷新 + useCustomRefresher: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("useCustomRefresher", true) + }, + // 自定义下拉刷新下拉帧率,默认为40,过高可能会出现抖动问题 + refresherFps: { + type: [Number, String], + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("refresherFps", 40) + }, + // 自定义下拉刷新允许触发的最大下拉角度,默认为40度,当下拉角度小于设定值时,自定义下拉刷新动画不会被触发 + refresherMaxAngle: { + type: [Number, String], + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("refresherMaxAngle", 40) + }, + // 自定义下拉刷新的角度由未达到最大角度变到达到最大角度时,是否继续下拉刷新手势,默认为否 + refresherAngleEnableChangeContinued: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("refresherAngleEnableChangeContinued", false) + }, + // 自定义下拉刷新默认状态下的文字 + refresherDefaultText: { + type: [String, Object], + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("refresherDefaultText", null) + }, + // 自定义下拉刷新松手立即刷新状态下的文字 + refresherPullingText: { + type: [String, Object], + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("refresherPullingText", null) + }, + // 自定义下拉刷新刷新中状态下的文字 + refresherRefreshingText: { + type: [String, Object], + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("refresherRefreshingText", null) + }, + // 自定义下拉刷新刷新结束状态下的文字 + refresherCompleteText: { + type: [String, Object], + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("refresherCompleteText", null) + }, + // 自定义继续下拉进入二楼文字 + refresherGoF2Text: { + type: [String, Object], + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("refresherGoF2Text", null) + }, + // 自定义下拉刷新默认状态下的图片 + refresherDefaultImg: { + type: String, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("refresherDefaultImg", null) + }, + // 自定义下拉刷新松手立即刷新状态下的图片,默认与refresherDefaultImg一致 + refresherPullingImg: { + type: String, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("refresherPullingImg", null) + }, + // 自定义下拉刷新刷新中状态下的图片 + refresherRefreshingImg: { + type: String, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("refresherRefreshingImg", null) + }, + // 自定义下拉刷新刷新结束状态下的图片 + refresherCompleteImg: { + type: String, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("refresherCompleteImg", null) + }, + // 自定义下拉刷新刷新中状态下是否展示旋转动画 + refresherRefreshingAnimated: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("refresherRefreshingAnimated", true) + }, + // 是否开启自定义下拉刷新刷新结束回弹效果,默认为是 + refresherEndBounceEnabled: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("refresherEndBounceEnabled", true) + }, + // 是否开启自定义下拉刷新,默认为是 + refresherEnabled: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("refresherEnabled", true) + }, + // 设置自定义下拉刷新阈值,默认为80rpx + refresherThreshold: { + type: [Number, String], + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("refresherThreshold", "80rpx") + }, + // 设置系统下拉刷新默认样式,支持设置 black,white,none,none 表示不使用默认样式,默认为black + refresherDefaultStyle: { + type: String, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("refresherDefaultStyle", "black") + }, + // 设置自定义下拉刷新区域背景 + refresherBackground: { + type: String, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("refresherBackground", "transparent") + }, + // 设置固定的自定义下拉刷新区域背景 + refresherFixedBackground: { + type: String, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("refresherFixedBackground", "transparent") + }, + // 设置固定的自定义下拉刷新区域高度,默认为0 + refresherFixedBacHeight: { + type: [Number, String], + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("refresherFixedBacHeight", 0) + }, + // 设置自定义下拉刷新下拉超出阈值后继续下拉位移衰减的比例,范围0-1,值越大代表衰减越多。默认为0.65(nvue无效) + refresherOutRate: { + type: Number, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("refresherOutRate", 0.65) + }, + // 是否开启下拉进入二楼功能,默认为否 + refresherF2Enabled: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("refresherF2Enabled", false) + }, + // 下拉进入二楼阈值,默认为200rpx + refresherF2Threshold: { + type: [Number, String], + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("refresherF2Threshold", "200rpx") + }, + // 下拉进入二楼动画时间,单位为毫秒,默认为200毫秒 + refresherF2Duration: { + type: [Number, String], + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("refresherF2Duration", 200) + }, + // 下拉进入二楼状态松手后是否弹出二楼,默认为是 + showRefresherF2: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("showRefresherF2", true) + }, + // 设置自定义下拉刷新下拉时实际下拉位移与用户下拉距离的比值,默认为0.75,即代表若用户下拉10px,则实际位移为7.5px(nvue无效) + refresherPullRate: { + type: Number, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("refresherPullRate", 0.75) + }, + // 是否显示最后更新时间,默认为否 + showRefresherUpdateTime: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("showRefresherUpdateTime", false) + }, + // 如果需要区别不同页面的最后更新时间,请为不同页面的z-paging的`refresher-update-time-key`设置不同的字符串 + refresherUpdateTimeKey: { + type: String, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("refresherUpdateTimeKey", "default") + }, + // 下拉刷新时下拉到“松手立即刷新”或“松手进入二楼”状态时是否使手机短振动,默认为否(h5无效) + refresherVibrate: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("refresherVibrate", false) + }, + // 下拉刷新时是否禁止下拉刷新view跟随用户触摸竖直移动,默认为否。注意此属性只是禁止下拉刷新view移动,其他下拉刷新逻辑依然会正常触发 + refresherNoTransform: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("refresherNoTransform", false) + }, + // 是否开启下拉刷新状态栏占位,适用于隐藏导航栏时,下拉刷新需要避开状态栏高度的情况,默认为否 + useRefresherStatusBarPlaceholder: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("useRefresherStatusBarPlaceholder", false) + } + }, + data() { + return { + R: uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.Refresher, + //下拉刷新状态 + refresherStatus: uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.Refresher.Default, + refresherTouchstartY: 0, + lastRefresherTouchmove: null, + refresherReachMaxAngle: true, + refresherTransform: "translateY(0px)", + refresherTransition: "", + finalRefresherDefaultStyle: "black", + refresherRevealStackCount: 0, + refresherCompleteTimeout: null, + refresherCompleteSubTimeout: null, + refresherEndTimeout: null, + isTouchmovingTimeout: null, + refresherTriggered: false, + isTouchmoving: false, + isTouchEnded: false, + isUserPullDown: false, + privateRefresherEnabled: -1, + privateShowRefresherWhenReload: false, + customRefresherHeight: -1, + showCustomRefresher: false, + doRefreshAnimateAfter: false, + isRefresherInComplete: false, + showF2: false, + f2Transform: "", + pullDownTimeStamp: 0, + moveDis: 0, + oldMoveDis: 0, + currentDis: 0, + oldCurrentMoveDis: 0, + oldRefresherTouchmoveY: 0, + oldTouchDirection: "", + oldEmitedTouchDirection: "", + oldPullingDistance: -1, + refresherThresholdUpdateTag: 0 + }; + }, + watch: { + refresherDefaultStyle: { + handler(newVal) { + if (newVal.length) { + this.finalRefresherDefaultStyle = newVal; + } + }, + immediate: true + }, + refresherStatus(newVal) { + newVal === uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.Refresher.Loading && this._cleanRefresherEndTimeout(); + this.refresherVibrate && (newVal === uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.Refresher.ReleaseToRefresh || newVal === uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.Refresher.GoF2) && this._doVibrateShort(); + this.$emit("refresherStatusChange", newVal); + this.$emit("update:refresherStatus", newVal); + }, + // 监听当前下拉刷新启用/禁用状态 + refresherEnabled(newVal) { + !newVal && this.endRefresh(); + } + }, + computed: { + pullDownDisTimeStamp() { + return 1e3 / this.refresherFps; + }, + refresherThresholdUnitConverted() { + return uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.addUnit(this.refresherThreshold, this.unit); + }, + finalRefresherEnabled() { + if (this.useChatRecordMode) + return false; + if (this.privateRefresherEnabled === -1) + return this.refresherEnabled; + return this.privateRefresherEnabled === 1; + }, + finalRefresherThreshold() { + let refresherThreshold = this.refresherThresholdUnitConverted; + let idDefault = false; + if (refresherThreshold === uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.addUnit(80, this.unit)) { + idDefault = true; + if (this.showRefresherUpdateTime) { + refresherThreshold = uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.addUnit(120, this.unit); + } + } + if (idDefault && this.customRefresherHeight > 0) + return this.customRefresherHeight + this.finalRefresherThresholdPlaceholder; + return uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.convertToPx(refresherThreshold) + this.finalRefresherThresholdPlaceholder; + }, + finalRefresherF2Threshold() { + return uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.convertToPx(uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.addUnit(this.refresherF2Threshold, this.unit)); + }, + finalRefresherThresholdPlaceholder() { + return this.useRefresherStatusBarPlaceholder ? this.statusBarHeight : 0; + }, + finalRefresherFixedBacHeight() { + return uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.convertToPx(this.refresherFixedBacHeight); + }, + finalRefresherThemeStyle() { + return this.refresherThemeStyle.length ? this.refresherThemeStyle : this.defaultThemeStyle; + }, + finalRefresherOutRate() { + let rate = this.refresherOutRate; + rate = Math.max(0, rate); + rate = Math.min(1, rate); + return rate; + }, + finalRefresherPullRate() { + let rate = this.refresherPullRate; + rate = Math.max(0, rate); + return rate; + }, + finalRefresherTransform() { + if (this.refresherNoTransform || this.refresherTransform === "translateY(0px)") + return "none"; + return this.refresherTransform; + }, + finalShowRefresherWhenReload() { + return this.showRefresherWhenReload || this.privateShowRefresherWhenReload; + }, + finalRefresherTriggered() { + if (!(this.finalRefresherEnabled && !this.useCustomRefresher)) + return false; + return this.refresherTriggered; + }, + showRefresher() { + const showRefresher = this.finalRefresherEnabled || this.useCustomRefresher && !this.useChatRecordMode; + this.active && this.customRefresherHeight === -1 && showRefresher && this.updateCustomRefresherHeight(); + return showRefresher; + }, + hasTouchmove() { + return this.watchRefresherTouchmove; + } + }, + methods: { + // 终止下拉刷新状态 + endRefresh() { + this.totalData = this.realTotalData; + this._refresherEnd(); + this._endSystemLoadingAndRefresh(); + this._handleScrollViewBounce({ bounce: true }); + this.$nextTick(() => { + this.refresherTriggered = false; + }); + }, + // 手动更新自定义下拉刷新view高度 + updateCustomRefresherHeight() { + uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.delay(() => this.$nextTick(this._updateCustomRefresherHeight)); + }, + // 关闭二楼 + closeF2() { + this._handleCloseF2(); + }, + // 自定义下拉刷新被触发 + _onRefresh(fromScrollView = false, isUserPullDown = true) { + if (fromScrollView && !(this.finalRefresherEnabled && !this.useCustomRefresher)) + return; + this.$emit("onRefresh"); + this.$emit("Refresh"); + if (this.loading || this.isRefresherInComplete) + return; + this.loadingType = uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.LoadingType.Refresher; + if (this.nShowRefresherReveal) + return; + this.isUserPullDown = isUserPullDown; + this.isUserReload = !isUserPullDown; + this._startLoading(true); + this.refresherTriggered = true; + if (this.reloadWhenRefresh && isUserPullDown) { + this.useChatRecordMode ? this._onLoadingMore("click") : this._reload(false, false, isUserPullDown); + } + }, + // 自定义下拉刷新被复位 + _onRestore() { + this.refresherTriggered = "restore"; + this.$emit("onRestore"); + this.$emit("Restore"); + }, + // 进一步处理touch开始结果 + _handleRefresherTouchstart(touch) { + if (!this.loading && this.isTouchEnded) { + this.isTouchmoving = false; + } + this.loadingType = uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.LoadingType.Refresher; + this.isTouchmovingTimeout && clearTimeout(this.isTouchmovingTimeout); + this.isTouchEnded = false; + this.refresherTransition = ""; + this.refresherTouchstartY = touch.touchY; + this.$emit("refresherTouchstart", this.refresherTouchstartY); + this.lastRefresherTouchmove = touch; + this._cleanRefresherCompleteTimeout(); + this._cleanRefresherEndTimeout(); + }, + // 非app-vue或微信小程序或QQ小程序或h5平台,使用js控制下拉刷新 + // 进一步处理touch中结果 + _handleRefresherTouchmove(moveDis, touch) { + this.refresherReachMaxAngle = true; + this.isTouchmovingTimeout && clearTimeout(this.isTouchmovingTimeout); + this.isTouchmoving = true; + this.isTouchEnded = false; + if (moveDis >= this.finalRefresherThreshold) { + this.refresherStatus = this.refresherF2Enabled && moveDis >= this.finalRefresherF2Threshold ? uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.Refresher.GoF2 : uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.Refresher.ReleaseToRefresh; + } else { + this.refresherStatus = uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.Refresher.Default; + } + this.moveDis = moveDis; + }, + // 进一步处理touch结束结果 + _handleRefresherTouchend(moveDis) { + this.isTouchmovingTimeout && clearTimeout(this.isTouchmovingTimeout); + this.refresherReachMaxAngle = true; + this.isTouchEnded = true; + const refresherThreshold = this.finalRefresherThreshold; + if (moveDis >= refresherThreshold && (this.refresherStatus === uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.Refresher.ReleaseToRefresh || this.refresherStatus === uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.Refresher.GoF2)) { + if (this.refresherStatus === uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.Refresher.GoF2) { + this._handleGoF2(); + this._refresherEnd(); + } else { + uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.delay(() => { + this._emitTouchmove({ pullingDistance: refresherThreshold, dy: this.moveDis - refresherThreshold }); + }, 0.1); + this.moveDis = refresherThreshold; + this.refresherStatus = uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.Refresher.Loading; + this._doRefresherLoad(); + } + } else { + this._refresherEnd(); + this.isTouchmovingTimeout = uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.delay(() => { + this.isTouchmoving = false; + }, this.refresherDefaultDuration); + } + this.scrollEnable = true; + this.$emit("refresherTouchend", moveDis); + }, + // 处理列表触摸开始事件 + _handleListTouchstart() { + if (this.useChatRecordMode && this.autoHideKeyboardWhenChat) { + common_vendor.index.hideKeyboard(); + this.$emit("hidedKeyboard"); + } + }, + // 处理scroll-view bounce是否生效 + _handleScrollViewBounce({ bounce }) { + if (!this.usePageScroll && !this.scrollToTopBounceEnabled) { + if (this.wxsScrollTop <= 5) { + this.refresherTransition = ""; + this.scrollEnable = bounce; + } else if (bounce) { + this.scrollEnable = bounce; + } + } + }, + // wxs正在下拉状态改变处理 + _handleWxsPullingDownStatusChange(onPullingDown) { + this.wxsOnPullingDown = onPullingDown; + if (onPullingDown && !this.useChatRecordMode) { + this.renderPropScrollTop = 0; + } + }, + // wxs正在下拉处理 + _handleWxsPullingDown({ moveDis, diffDis }) { + this._emitTouchmove({ pullingDistance: moveDis, dy: diffDis }); + }, + // wxs触摸方向改变 + _handleTouchDirectionChange({ direction }) { + this.$emit("touchDirectionChange", direction); + }, + // wxs通知更新其props + _handlePropUpdate() { + this.wxsPropType = uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.getTime().toString(); + }, + // 下拉刷新结束 + _refresherEnd(shouldEndLoadingDelay = true, fromAddData = false, isUserPullDown = false, setLoading = true) { + if (this.loadingType === uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.LoadingType.Refresher) { + const refresherCompleteDelay = fromAddData && (isUserPullDown || this.showRefresherWhenReload) ? this.refresherCompleteDelay : 0; + const refresherStatus = refresherCompleteDelay > 0 ? uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.Refresher.Complete : uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.Refresher.Default; + if (this.finalShowRefresherWhenReload) { + const stackCount = this.refresherRevealStackCount; + this.refresherRevealStackCount--; + if (stackCount > 1) + return; + } + this._cleanRefresherEndTimeout(); + this.refresherEndTimeout = uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.delay(() => { + this.refresherStatus = refresherStatus; + if (refresherStatus !== uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.Refresher.Complete) { + this.isRefresherInComplete = false; + } + }, this.refresherStatus !== uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.Refresher.Default && refresherStatus === uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.Refresher.Default ? this.refresherCompleteDuration : 0); + if (refresherCompleteDelay > 0) { + this.isRefresherInComplete = true; + } + this._cleanRefresherCompleteTimeout(); + this.refresherCompleteTimeout = uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.delay(() => { + let animateDuration = 1; + const animateType = this.refresherEndBounceEnabled && fromAddData ? "cubic-bezier(0.19,1.64,0.42,0.72)" : "linear"; + if (fromAddData) { + animateDuration = this.refresherEndBounceEnabled ? this.refresherCompleteDuration / 1e3 : this.refresherCompleteDuration / 3e3; + } + this.refresherTransition = `transform ${fromAddData ? animateDuration : this.refresherDefaultDuration / 1e3}s ${animateType}`; + this.wxsPropType = this.refresherTransition + "end" + uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.getTime(); + this.moveDis = 0; + if (refresherStatus === uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.Refresher.Complete) { + if (this.refresherCompleteSubTimeout) { + clearTimeout(this.refresherCompleteSubTimeout); + this.refresherCompleteSubTimeout = null; + } + this.refresherCompleteSubTimeout = uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.delay(() => { + this.$nextTick(() => { + this.refresherStatus = uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.Refresher.Default; + this.isRefresherInComplete = false; + }); + }, animateDuration * 800); + } + this._emitTouchmove({ pullingDistance: 0, dy: this.moveDis }); + }, refresherCompleteDelay); + } + if (setLoading) { + uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.delay(() => this.loading = false, shouldEndLoadingDelay ? 10 : 0); + isUserPullDown && this._onRestore(); + } + }, + // 处理进入二楼 + _handleGoF2() { + if (this.showF2 || !this.refresherF2Enabled) + return; + this.$emit("refresherF2Change", "go"); + if (!this.showRefresherF2) + return; + this.f2Transform = `translateY(${-this.superContentHeight}px)`; + this.showF2 = true; + uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.delay(() => { + this.f2Transform = "translateY(0px)"; + }, 100, "f2ShowDelay"); + }, + // 处理退出二楼 + _handleCloseF2() { + if (!this.showF2 || !this.refresherF2Enabled) + return; + this.$emit("refresherF2Change", "close"); + if (!this.showRefresherF2) + return; + this.f2Transform = `translateY(${-this.superContentHeight}px)`; + uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.delay(() => { + this.showF2 = false; + this.nF2Opacity = 0; + }, this.refresherF2Duration, "f2CloseDelay"); + }, + // 模拟用户手动触发下拉刷新 + _doRefresherRefreshAnimate() { + this._cleanRefresherCompleteTimeout(); + const doRefreshAnimateAfter = !this.doRefreshAnimateAfter && this.finalShowRefresherWhenReload && this.customRefresherHeight === -1 && this.refresherThreshold === uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.addUnit(80, this.unit); + if (doRefreshAnimateAfter) { + this.doRefreshAnimateAfter = true; + return; + } + this.refresherRevealStackCount++; + this.wxsPropType = "begin" + uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.getTime(); + this.moveDis = this.finalRefresherThreshold; + this.refresherStatus = uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.Refresher.Loading; + this.isTouchmoving = true; + this.isTouchmovingTimeout && clearTimeout(this.isTouchmovingTimeout); + this._doRefresherLoad(false); + }, + // 触发下拉刷新 + _doRefresherLoad(isUserPullDown = true) { + this._onRefresh(false, isUserPullDown); + this.loading = true; + }, + // 更新自定义下拉刷新view高度 + _updateCustomRefresherHeight() { + this._getNodeClientRect(".zp-custom-refresher-slot-view").then((res) => { + this.customRefresherHeight = res ? res[0].height : 0; + this.showCustomRefresher = this.customRefresherHeight > 0; + if (this.doRefreshAnimateAfter) { + this.doRefreshAnimateAfter = false; + this._doRefresherRefreshAnimate(); + } + }); + }, + // emit pullingDown事件 + _emitTouchmove(e) { + e.viewHeight = this.finalRefresherThreshold; + e.rate = e.viewHeight > 0 ? e.pullingDistance / e.viewHeight : 0; + this.hasTouchmove && this.oldPullingDistance !== e.pullingDistance && this.$emit("refresherTouchmove", e); + this.oldPullingDistance = e.pullingDistance; + }, + // 清除refresherCompleteTimeout + _cleanRefresherCompleteTimeout() { + this.refresherCompleteTimeout = this._cleanTimeout(this.refresherCompleteTimeout); + }, + // 清除refresherEndTimeout + _cleanRefresherEndTimeout() { + this.refresherEndTimeout = this._cleanTimeout(this.refresherEndTimeout); + } + } +}; +exports.refresherModule = refresherModule; +//# sourceMappingURL=../../../../../../../.sourcemap/mp-weixin/uni_modules/z-paging/components/z-paging/js/modules/refresher.js.map diff --git a/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/js/modules/scroller.js b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/js/modules/scroller.js new file mode 100644 index 0000000..7ad953a --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/js/modules/scroller.js @@ -0,0 +1,428 @@ +"use strict"; +const common_vendor = require("../../../../../../common/vendor.js"); +const uni_modules_zPaging_components_zPaging_js_zPagingUtils = require("../z-paging-utils.js"); +const uni_modules_zPaging_components_zPaging_js_zPagingEnum = require("../z-paging-enum.js"); +const scrollerModule = { + props: { + // 使用页面滚动,默认为否,当设置为是时则使用页面的滚动而非此组件内部的scroll-view的滚动,使用页面滚动时z-paging无需设置确定的高度且对于长列表展示性能更高,但配置会略微繁琐 + usePageScroll: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("usePageScroll", false) + }, + // 是否可以滚动,使用内置scroll-view和nvue时有效,默认为是 + scrollable: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("scrollable", true) + }, + // 控制是否出现滚动条,默认为是 + showScrollbar: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("showScrollbar", true) + }, + // 是否允许横向滚动,默认为否 + scrollX: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("scrollX", false) + }, + // iOS设备上滚动到顶部时是否允许回弹效果,默认为否。关闭回弹效果后可使滚动到顶部与下拉刷新更连贯,但是有吸顶view时滚动到顶部时可能出现抖动。 + scrollToTopBounceEnabled: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("scrollToTopBounceEnabled", false) + }, + // iOS设备上滚动到底部时是否允许回弹效果,默认为是。 + scrollToBottomBounceEnabled: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("scrollToBottomBounceEnabled", true) + }, + // 在设置滚动条位置时使用动画过渡,默认为否 + scrollWithAnimation: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("scrollWithAnimation", false) + }, + // 值应为某子元素id(id不能以数字开头)。设置哪个方向可滚动,则在哪个方向滚动到该元素 + scrollIntoView: { + type: String, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("scrollIntoView", "") + } + }, + data() { + return { + scrollTop: 0, + oldScrollTop: 0, + scrollLeft: 0, + oldScrollLeft: 0, + scrollViewStyle: {}, + scrollViewContainerStyle: {}, + scrollViewInStyle: {}, + pageScrollTop: -1, + scrollEnable: true, + privateScrollWithAnimation: -1, + cacheScrollNodeHeight: -1, + superContentHeight: 0 + }; + }, + watch: { + oldScrollTop(newVal) { + !this.usePageScroll && this._scrollTopChange(newVal, false); + }, + pageScrollTop(newVal) { + this.usePageScroll && this._scrollTopChange(newVal, true); + }, + usePageScroll: { + handler(newVal) { + this.loaded && this.autoHeight && this._setAutoHeight(!newVal); + }, + immediate: true + }, + finalScrollTop(newVal) { + this.renderPropScrollTop = newVal < 6 ? 0 : 10; + } + }, + computed: { + finalScrollWithAnimation() { + if (this.privateScrollWithAnimation !== -1) { + return this.privateScrollWithAnimation === 1; + } + return this.scrollWithAnimation; + }, + finalScrollViewStyle() { + if (this.superContentZIndex != 1) { + this.scrollViewStyle["z-index"] = this.superContentZIndex; + this.scrollViewStyle["position"] = "relative"; + } + return this.scrollViewStyle; + }, + finalScrollTop() { + return this.usePageScroll ? this.pageScrollTop : this.oldScrollTop; + }, + // 当前是否是旧版webview + finalIsOldWebView() { + return this.isOldWebView && !this.usePageScroll; + }, + // 当前scroll-view/list-view是否允许滚动 + finalScrollable() { + return this.scrollable && !this.usePageScroll && this.scrollEnable && (this.refresherCompleteScrollable ? true : this.refresherStatus !== uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.Refresher.Complete) && (this.refresherRefreshingScrollable ? true : this.refresherStatus !== uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.Refresher.Loading); + } + }, + methods: { + // 滚动到顶部,animate为是否展示滚动动画,默认为是 + scrollToTop(animate, checkReverse = true) { + if (this.useChatRecordMode && checkReverse && !this.isChatRecordModeAndNotInversion) { + this.scrollToBottom(animate, false); + return; + } + this.$nextTick(() => { + this._scrollToTop(animate, false); + }); + }, + // 滚动到底部,animate为是否展示滚动动画,默认为是 + scrollToBottom(animate, checkReverse = true) { + if (this.useChatRecordMode && checkReverse && !this.isChatRecordModeAndNotInversion) { + this.scrollToTop(animate, false); + return; + } + this.$nextTick(() => { + this._scrollToBottom(animate); + }); + }, + // 滚动到指定view(vue中有效)。sel为需要滚动的view的id值,不包含"#";offset为偏移量,单位为px;animate为是否展示滚动动画,默认为否 + scrollIntoViewById(sel, offset, animate) { + this._scrollIntoView(sel, offset, animate); + }, + // 滚动到指定view(vue中有效)。nodeTop为需要滚动的view的top值(通过uni.createSelectorQuery()获取);offset为偏移量,单位为px;animate为是否展示滚动动画,默认为否 + scrollIntoViewByNodeTop(nodeTop, offset, animate) { + this.scrollTop = this.oldScrollTop; + this.$nextTick(() => { + this._scrollIntoViewByNodeTop(nodeTop, offset, animate); + }); + }, + // y轴滚动到指定位置(vue中有效)。y为与顶部的距离,单位为px;offset为偏移量,单位为px;animate为是否展示滚动动画,默认为否 + scrollToY(y, offset, animate) { + this.scrollTop = this.oldScrollTop; + this.$nextTick(() => { + this._scrollToY(y, offset, animate); + }); + }, + // x轴滚动到指定位置(非页面滚动且在vue中有效)。x为与左侧的距离,单位为px;offset为偏移量,单位为px;animate为是否展示滚动动画,默认为否 + scrollToX(x, offset, animate) { + this.scrollLeft = this.oldScrollLeft; + this.$nextTick(() => { + this._scrollToX(x, offset, animate); + }); + }, + // 滚动到指定view(nvue中和虚拟列表中有效)。index为需要滚动的view的index(第几个,从0开始);offset为偏移量,单位为px;animate为是否展示滚动动画,默认为否 + scrollIntoViewByIndex(index, offset, animate) { + if (index >= this.realTotalData.length) { + uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.consoleErr("当前滚动的index超出已渲染列表长度,请先通过refreshToPage加载到对应index页并等待渲染成功后再调用此方法!"); + return; + } + this.$nextTick(() => { + if (this.finalUseVirtualList) { + const isCellFixed = this.cellHeightMode === uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.CellHeightMode.Fixed; + uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.delay(() => { + if (this.finalUseVirtualList) { + const scrollTop = isCellFixed ? this.virtualCellHeight * index : this.virtualHeightCacheList[index].lastTotalHeight; + this.scrollToY(scrollTop, offset, animate); + } + }, isCellFixed ? 0 : 100); + } + }); + }, + // 滚动到指定view(nvue中有效)。view为需要滚动的view(通过`this.$refs.xxx`获取),不包含"#";offset为偏移量,单位为px;animate为是否展示滚动动画,默认为否 + scrollIntoViewByView(view, offset, animate) { + this._scrollIntoView(view, offset, animate); + }, + // 当使用页面滚动并且自定义下拉刷新时,请在页面的onPageScroll中调用此方法,告知z-paging当前的pageScrollTop,否则会导致在任意位置都可以下拉刷新 + updatePageScrollTop(value) { + this.pageScrollTop = value; + }, + // 当使用页面滚动并且设置了slot="top"时,默认初次加载会自动获取其高度,并使内部容器下移,当slot="top"的view高度动态改变时,在其高度需要更新时调用此方法 + updatePageScrollTopHeight() { + this._updatePageScrollTopOrBottomHeight("top"); + }, + // 当使用页面滚动并且设置了slot="bottom"时,默认初次加载会自动获取其高度,并使内部容器下移,当slot="bottom"的view高度动态改变时,在其高度需要更新时调用此方法 + updatePageScrollBottomHeight() { + this._updatePageScrollTopOrBottomHeight("bottom"); + }, + // 更新slot="left"和slot="right"宽度,当slot="left"或slot="right"宽度动态改变时调用 + updateLeftAndRightWidth() { + if (!this.finalIsOldWebView) + return; + this.$nextTick(() => this._updateLeftAndRightWidth(this.scrollViewContainerStyle, "zp-page")); + }, + // 更新z-paging内置scroll-view的scrollTop + updateScrollViewScrollTop(scrollTop, animate = true) { + this._updatePrivateScrollWithAnimation(animate); + this.scrollTop = this.oldScrollTop; + this.$nextTick(() => { + this.scrollTop = scrollTop; + this.oldScrollTop = this.scrollTop; + }); + }, + // 当滚动到顶部时 + _onScrollToUpper() { + this._emitScrollEvent("scrolltoupper"); + this.$emit("scrollTopChange", 0); + this.$nextTick(() => { + this.oldScrollTop = 0; + }); + }, + // 当滚动到底部时 + _onScrollToLower(e) { + (!e.detail || !e.detail.direction || e.detail.direction === "bottom") && this.toBottomLoadingMoreEnabled && this._onLoadingMore(this.useChatRecordMode ? "click" : "toBottom"); + }, + // 滚动到顶部 + _scrollToTop(animate = true, isPrivate = true) { + if (this.usePageScroll) { + this.$nextTick(() => { + common_vendor.index.pageScrollTo({ + scrollTop: 0, + duration: animate ? 100 : 0 + }); + }); + return; + } + this._updatePrivateScrollWithAnimation(animate); + this.scrollTop = this.oldScrollTop; + this.$nextTick(() => { + this.scrollTop = 0; + this.oldScrollTop = this.scrollTop; + }); + }, + // 滚动到底部 + async _scrollToBottom(animate = true) { + if (this.usePageScroll) { + this.$nextTick(() => { + common_vendor.index.pageScrollTo({ + scrollTop: Number.MAX_VALUE, + duration: animate ? 100 : 0 + }); + }); + return; + } + try { + this._updatePrivateScrollWithAnimation(animate); + const pagingContainerNode = await this._getNodeClientRect(".zp-paging-container"); + const scrollViewNode = await this._getNodeClientRect(".zp-scroll-view"); + const pagingContainerH = pagingContainerNode ? pagingContainerNode[0].height : 0; + const scrollViewH = scrollViewNode ? scrollViewNode[0].height : 0; + if (pagingContainerH > scrollViewH) { + this.scrollTop = this.oldScrollTop; + this.$nextTick(() => { + this.scrollTop = pagingContainerH - scrollViewH + this.virtualPlaceholderTopHeight; + this.oldScrollTop = this.scrollTop; + }); + } + } catch (e) { + } + }, + // 滚动到指定view + _scrollIntoView(sel, offset = 0, animate = false, finishCallback) { + try { + this.scrollTop = this.oldScrollTop; + this.$nextTick(() => { + this._getNodeClientRect("#" + sel.replace("#", ""), this.$parent).then((node) => { + if (node) { + let nodeTop = node[0].top; + this._scrollIntoViewByNodeTop(nodeTop, offset, animate); + finishCallback && finishCallback(); + } + }); + }); + } catch (e) { + } + }, + // 通过nodeTop滚动到指定view + _scrollIntoViewByNodeTop(nodeTop, offset = 0, animate = false) { + if (this.isChatRecordModeAndInversion) { + this._getNodeClientRect(".zp-scroll-view").then((sNode) => { + if (sNode) { + this._scrollToY(sNode[0].height - nodeTop, offset, animate, true); + } + }); + } else { + this._scrollToY(nodeTop, offset, animate, true); + } + }, + // y轴滚动到指定位置 + _scrollToY(y, offset = 0, animate = false, addScrollTop = false) { + this._updatePrivateScrollWithAnimation(animate); + uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.delay(() => { + if (this.usePageScroll) { + if (addScrollTop && this.pageScrollTop !== -1) { + y += this.pageScrollTop; + } + const scrollTop = y - offset; + common_vendor.index.pageScrollTo({ + scrollTop, + duration: animate ? 100 : 0 + }); + } else { + if (addScrollTop) { + y += this.oldScrollTop; + } + this.scrollTop = y - offset; + } + }, 10); + }, + // x轴滚动到指定位置 + _scrollToX(x, offset = 0, animate = false) { + this._updatePrivateScrollWithAnimation(animate); + uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.delay(() => { + if (!this.usePageScroll) { + this.scrollLeft = x - offset; + } else { + uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.consoleErr("使用页面滚动时不支持scrollToX"); + } + }, 10); + }, + // scroll-view滚动中 + _scroll(e) { + this.$emit("scroll", e); + const { scrollTop, scrollLeft } = e.detail; + this.finalUseVirtualList && this._updateVirtualScroll(scrollTop, this.oldScrollTop - scrollTop); + this.oldScrollTop = scrollTop; + this.oldScrollLeft = scrollLeft; + const scrollDiff = e.detail.scrollHeight - this.oldScrollTop; + !this.isIos && this._checkScrolledToBottom(scrollDiff); + }, + // emit scrolltolower/scrolltoupper事件 + _emitScrollEvent(type) { + const reversedType = type === "scrolltolower" ? "scrolltoupper" : "scrolltolower"; + const eventType = this.useChatRecordMode && !this.isChatRecordModeAndNotInversion ? reversedType : type; + this.$emit(eventType); + }, + // 更新内置的scroll-view是否启用滚动动画 + _updatePrivateScrollWithAnimation(animate) { + this.privateScrollWithAnimation = animate ? 1 : 0; + uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.delay(() => this.$nextTick(() => { + this.privateScrollWithAnimation = -1; + }), 100, "updateScrollWithAnimationDelay"); + }, + // 检测scrollView是否要铺满屏幕 + _doCheckScrollViewShouldFullHeight(totalData) { + if (this.autoFullHeight && this.usePageScroll && this.isTotalChangeFromAddData) { + this.$nextTick(() => { + this._checkScrollViewShouldFullHeight((scrollViewNode, pagingContainerNode) => { + this._preCheckShowNoMoreInside(totalData, scrollViewNode, pagingContainerNode); + }); + }); + } else { + this._preCheckShowNoMoreInside(totalData); + } + }, + // 检测z-paging是否要全屏覆盖(当使用页面滚动并且不满全屏时,默认z-paging需要铺满全屏,避免数据过少时内部的empty-view无法正确展示) + async _checkScrollViewShouldFullHeight(callback) { + try { + const scrollViewNode = await this._getNodeClientRect(".zp-scroll-view"); + const pagingContainerNode = await this._getNodeClientRect(".zp-paging-container-content"); + if (!scrollViewNode || !pagingContainerNode) + return; + const scrollViewHeight = pagingContainerNode[0].height; + const scrollViewTop = scrollViewNode[0].top; + if (this.isAddedData && scrollViewHeight + scrollViewTop <= this.windowHeight) { + this._setAutoHeight(true, scrollViewNode); + callback(scrollViewNode, pagingContainerNode); + } else { + this._setAutoHeight(false); + callback(null, null); + } + } catch (e) { + callback(null, null); + } + }, + // 更新缓存中z-paging整个内容容器高度 + async _updateCachedSuperContentHeight() { + const superContentNode = await this._getNodeClientRect(".z-paging-content"); + if (superContentNode) { + this.superContentHeight = superContentNode[0].height; + } + }, + // scrollTop改变时触发 + _scrollTopChange(newVal, isPageScrollTop) { + this.$emit("scrollTopChange", newVal); + this.$emit("update:scrollTop", newVal); + this._checkShouldShowBackToTop(newVal); + const scrollTop = newVal > 5 ? 6 : 0; + if (isPageScrollTop && this.wxsPageScrollTop !== scrollTop) { + this.wxsPageScrollTop = scrollTop; + } else if (!isPageScrollTop && this.wxsScrollTop !== scrollTop) { + this.wxsScrollTop = scrollTop; + if (scrollTop > 6) { + this.scrollEnable = true; + } + } + }, + // 更新使用页面滚动时slot="top"或"bottom"插入view的高度 + _updatePageScrollTopOrBottomHeight(type) { + if (!this.usePageScroll) + return; + this._doCheckScrollViewShouldFullHeight(this.realTotalData); + const node = `.zp-page-${type}`; + const marginText = `margin${type.slice(0, 1).toUpperCase() + type.slice(1)}`; + let safeAreaInsetBottomAdd = this.safeAreaInsetBottom; + this.$nextTick(() => { + let delayTime = 0; + uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.delay(() => { + this._getNodeClientRect(node).then((res) => { + if (res) { + let pageScrollNodeHeight = res[0].height; + if (type === "bottom") { + if (safeAreaInsetBottomAdd) { + pageScrollNodeHeight += this.safeAreaBottom; + } + } else { + this.cacheTopHeight = pageScrollNodeHeight; + } + this.$set(this.scrollViewStyle, marginText, `${pageScrollNodeHeight}px`); + } else if (safeAreaInsetBottomAdd) { + this.$set(this.scrollViewStyle, marginText, `${this.safeAreaBottom}px`); + } + }); + }, delayTime); + }); + } + } +}; +exports.scrollerModule = scrollerModule; +//# sourceMappingURL=../../../../../../../.sourcemap/mp-weixin/uni_modules/z-paging/components/z-paging/js/modules/scroller.js.map diff --git a/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/js/modules/virtual-list.js b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/js/modules/virtual-list.js new file mode 100644 index 0000000..bbcc557 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/js/modules/virtual-list.js @@ -0,0 +1,499 @@ +"use strict"; +const uni_modules_zPaging_components_zPaging_js_zPagingUtils = require("../z-paging-utils.js"); +const uni_modules_zPaging_components_zPaging_js_zPagingConstant = require("../z-paging-constant.js"); +const uni_modules_zPaging_components_zPaging_js_zPagingEnum = require("../z-paging-enum.js"); +const virtualListModule = { + props: { + // 是否使用虚拟列表,默认为否 + useVirtualList: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("useVirtualList", false) + }, + // 在使用虚拟列表时,是否使用兼容模式,默认为否 + useCompatibilityMode: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("useCompatibilityMode", false) + }, + // 使用兼容模式时传递的附加数据 + extraData: { + type: Object, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("extraData", {}) + }, + // 是否在z-paging内部循环渲染列表(内置列表),默认为否。若use-virtual-list为true,则此项恒为true + useInnerList: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("useInnerList", false) + }, + // 强制关闭inner-list,默认为false,如果为true将强制关闭innerList,适用于开启了虚拟列表后需要强制关闭inner-list的情况 + forceCloseInnerList: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("forceCloseInnerList", false) + }, + // 内置列表cell的key名称,仅nvue有效,在nvue中开启use-inner-list时必须填此项 + cellKeyName: { + type: String, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("cellKeyName", "") + }, + // innerList样式 + innerListStyle: { + type: Object, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("innerListStyle", {}) + }, + // innerCell样式 + innerCellStyle: { + type: Object, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("innerCellStyle", {}) + }, + // 预加载的列表可视范围(列表高度)页数,默认为12,即预加载当前页及上下各12页的cell。此数值越大,则虚拟列表中加载的dom越多,内存消耗越大(会维持在一个稳定值),但增加预加载页面数量可缓解快速滚动短暂白屏问题 + preloadPage: { + type: [Number, String], + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("preloadPage", 12), + validator: (value) => { + if (value <= 0) + uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.consoleErr("preload-page必须大于0!"); + return value > 0; + } + }, + // 虚拟列表cell高度模式,默认为fixed,也就是每个cell高度完全相同,将以第一个cell高度为准进行计算。可选值【dynamic】,即代表高度是动态非固定的,【dynamic】性能低于【fixed】。 + cellHeightMode: { + type: String, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("cellHeightMode", uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.CellHeightMode.Fixed) + }, + // 固定的cell高度,cellHeightMode=fixed才有效,若设置了值,则不计算第一个cell高度而使用设置的cell高度 + fixedCellHeight: { + type: [Number, String], + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("fixedCellHeight", 0) + }, + // 虚拟列表列数,默认为1。常用于每行有多列的情况,例如每行有2列数据,需要将此值设置为2 + virtualListCol: { + type: [Number, String], + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("virtualListCol", 1) + }, + // 虚拟列表scroll取样帧率,默认为80,过低容易出现白屏问题,过高容易出现卡顿问题 + virtualScrollFps: { + type: [Number, String], + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("virtualScrollFps", 80) + }, + // 虚拟列表cell id的前缀,适用于一个页面有多个虚拟列表的情况,用以区分不同虚拟列表cell的id,注意:请勿传数字或以数字开头的字符串。如设置为list1,则cell的id应为:list1-zp-id-${item.zp_index} + virtualCellIdPrefix: { + type: String, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("virtualCellIdPrefix", "") + }, + // 虚拟列表是否使用swiper-item包裹,默认为否,此属性为了解决vue3+(微信小程序或QQ小程序)中,使用非内置列表写法时,若z-paging在swiper-item内存在无法获取slot插入的cell高度进而导致虚拟列表失败的问题 + // 仅vue3+(微信小程序或QQ小程序)+非内置列表写法虚拟列表有效,其他情况此属性设置任何值都无效,所以如果您在swiper-item内使用z-paging的非内置虚拟列表写法,将此属性设置为true即可 + virtualInSwiperSlot: { + type: Boolean, + default: false + } + }, + data() { + return { + virtualListKey: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.getInstanceId(), + virtualPageHeight: 0, + virtualCellHeight: 0, + virtualScrollTimeStamp: 0, + virtualList: [], + virtualPlaceholderTopHeight: 0, + virtualPlaceholderBottomHeight: 0, + virtualTopRangeIndex: 0, + virtualBottomRangeIndex: 0, + lastVirtualTopRangeIndex: 0, + lastVirtualBottomRangeIndex: 0, + virtualItemInsertedCount: 0, + virtualHeightCacheList: [], + getCellHeightRetryCount: { + fixed: 0, + dynamic: 0 + }, + pagingOrgTop: -1, + updateVirtualListFromDataChange: false + }; + }, + watch: { + // 监听总数据的改变,刷新虚拟列表布局 + realTotalData() { + this.updateVirtualListRender(); + }, + // 监听虚拟列表渲染数组的改变并emit + virtualList(newVal) { + this.$emit("update:virtualList", newVal); + this.$emit("virtualListChange", newVal); + }, + // 监听虚拟列表顶部占位高度改变并emit + virtualPlaceholderTopHeight(newVal) { + this.$emit("virtualTopHeightChange", newVal); + } + }, + computed: { + virtualCellIndexKey() { + return uni_modules_zPaging_components_zPaging_js_zPagingConstant.c.listCellIndexKey; + }, + finalUseVirtualList() { + if (this.useVirtualList && this.usePageScroll) { + uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.consoleErr("使用页面滚动时,开启虚拟列表无效!"); + } + return this.useVirtualList && !this.usePageScroll; + }, + finalUseInnerList() { + return this.useInnerList || this.finalUseVirtualList && !this.forceCloseInnerList; + }, + finalCellKeyName() { + return this.cellKeyName; + }, + finalVirtualPageHeight() { + return this.virtualPageHeight > 0 ? this.virtualPageHeight : this.windowHeight; + }, + finalFixedCellHeight() { + return uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.convertToPx(this.fixedCellHeight); + }, + fianlVirtualCellIdPrefix() { + const prefix = this.virtualCellIdPrefix ? this.virtualCellIdPrefix + "-" : ""; + return prefix + "zp-id"; + }, + finalPlaceholderTopHeightStyle() { + return {}; + }, + virtualRangePageHeight() { + return this.finalVirtualPageHeight * this.preloadPage; + }, + virtualScrollDisTimeStamp() { + return 1e3 / this.virtualScrollFps; + } + }, + methods: { + // 在使用动态高度虚拟列表时,若在列表数组中需要插入某个item,需要调用此方法;item:需要插入的item,index:插入的cell位置,若index为2,则插入的item在原list的index=1之后,index从0开始 + doInsertVirtualListItem(item, index) { + if (this.cellHeightMode !== uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.CellHeightMode.Dynamic) + return; + this.realTotalData.splice(index, 0, item); + this.realTotalData = [...this.realTotalData]; + this.virtualItemInsertedCount++; + if (!item || Object.prototype.toString.call(item) !== "[object Object]") { + item = { item }; + } + const cellIndexKey = this.virtualCellIndexKey; + item[cellIndexKey] = `custom-${this.virtualItemInsertedCount}`; + item[uni_modules_zPaging_components_zPaging_js_zPagingConstant.c.listCellIndexUniqueKey] = `${this.virtualListKey}-${item[cellIndexKey]}`; + this.$nextTick(async () => { + let retryCount = 0; + while (retryCount <= 10) { + await uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.wait(uni_modules_zPaging_components_zPaging_js_zPagingConstant.c.delayTime); + const cellNode = await this._getVirtualCellNodeByIndex(item[cellIndexKey]); + if (!cellNode) { + retryCount++; + continue; + } + const currentHeight = cellNode ? cellNode[0].height : 0; + const lastHeightCache = this.virtualHeightCacheList[index - 1]; + const lastTotalHeight = lastHeightCache ? lastHeightCache.totalHeight : 0; + this.virtualHeightCacheList.splice(index, 0, { + height: currentHeight, + lastTotalHeight, + totalHeight: lastTotalHeight + currentHeight + }); + for (let i = index + 1; i < this.virtualHeightCacheList.length; i++) { + const thisNode = this.virtualHeightCacheList[i]; + thisNode.lastTotalHeight += currentHeight; + thisNode.totalHeight += currentHeight; + } + this._updateVirtualScroll(this.oldScrollTop); + break; + } + }); + }, + // 在使用动态高度虚拟列表时,手动更新指定cell的缓存高度(当cell高度在初始化之后再次改变后调用);index:需要更新的cell在列表中的位置,从0开始 + didUpdateVirtualListCell(index) { + if (this.cellHeightMode !== uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.CellHeightMode.Dynamic) + return; + const currentNode = this.virtualHeightCacheList[index]; + this.$nextTick(() => { + this._getVirtualCellNodeByIndex(index).then((cellNode) => { + const cellNodeHeight = cellNode ? cellNode[0].height : 0; + const heightDis = cellNodeHeight - currentNode.height; + currentNode.height = cellNodeHeight; + currentNode.totalHeight = currentNode.lastTotalHeight + cellNodeHeight; + for (let i = index + 1; i < this.virtualHeightCacheList.length; i++) { + const thisNode = this.virtualHeightCacheList[i]; + thisNode.totalHeight += heightDis; + thisNode.lastTotalHeight += heightDis; + } + }); + }); + }, + // 在使用动态高度虚拟列表时,若删除了列表数组中的某个item,需要调用此方法以更新高度缓存数组;index:删除的cell在列表中的位置,从0开始 + didDeleteVirtualListCell(index) { + if (this.cellHeightMode !== uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.CellHeightMode.Dynamic) + return; + const currentNode = this.virtualHeightCacheList[index]; + for (let i = index + 1; i < this.virtualHeightCacheList.length; i++) { + const thisNode = this.virtualHeightCacheList[i]; + thisNode.totalHeight -= currentNode.height; + thisNode.lastTotalHeight -= currentNode.height; + } + this.virtualHeightCacheList.splice(index, 1); + }, + // 手动触发虚拟列表渲染更新,可用于解决例如修改了虚拟列表数组中元素,但展示未更新的情况 + updateVirtualListRender() { + if (this.finalUseVirtualList) { + this.updateVirtualListFromDataChange = true; + this.$nextTick(() => { + this.getCellHeightRetryCount.fixed = 0; + if (this.realTotalData.length) { + this.cellHeightMode === uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.CellHeightMode.Fixed && this.isFirstPage && this._updateFixedCellHeight(); + } else { + this._resetDynamicListState(!this.isUserPullDown); + } + this._updateVirtualScroll(this.oldScrollTop); + }); + } + }, + // 初始化虚拟列表 + _virtualListInit() { + this.$nextTick(() => { + uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.delay(() => { + this._getNodeClientRect(".zp-scroll-view").then((node) => { + if (node) { + this.pagingOrgTop = node[0].top; + this.virtualPageHeight = node[0].height; + } + }); + }); + }); + }, + // cellHeightMode为fixed时获取第一个cell高度 + _updateFixedCellHeight() { + if (!this.finalFixedCellHeight) { + this.$nextTick(() => { + uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.delay(() => { + this._getVirtualCellNodeByIndex(0).then((cellNode) => { + if (!cellNode) { + if (this.getCellHeightRetryCount.fixed > 10) + return; + this.getCellHeightRetryCount.fixed++; + this._updateFixedCellHeight(); + } else { + this.virtualCellHeight = cellNode[0].height; + this._updateVirtualScroll(this.oldScrollTop); + } + }); + }, uni_modules_zPaging_components_zPaging_js_zPagingConstant.c.delayTime, "updateFixedCellHeightDelay"); + }); + } else { + this.virtualCellHeight = this.finalFixedCellHeight; + } + }, + // cellHeightMode为dynamic时获取每个cell高度 + _updateDynamicCellHeight(list, dataFrom = "bottom") { + const dataFromTop = dataFrom === "top"; + const heightCacheList = this.virtualHeightCacheList; + const currentCacheList = dataFromTop ? [] : heightCacheList; + let listTotalHeight = 0; + this.$nextTick(() => { + uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.delay(async () => { + for (let i = 0; i < list.length; i++) { + const cellNode = await this._getVirtualCellNodeByIndex(list[i][this.virtualCellIndexKey]); + const currentHeight = cellNode ? cellNode[0].height : 0; + if (!cellNode) { + if (this.getCellHeightRetryCount.dynamic <= 10) { + heightCacheList.splice(heightCacheList.length - i, i); + this.getCellHeightRetryCount.dynamic++; + this._updateDynamicCellHeight(list, dataFrom); + } + return; + } + const lastHeightCache = currentCacheList.length ? currentCacheList.slice(-1)[0] : null; + const lastTotalHeight = lastHeightCache ? lastHeightCache.totalHeight : 0; + currentCacheList.push({ + height: currentHeight, + lastTotalHeight, + totalHeight: lastTotalHeight + currentHeight + }); + if (dataFromTop) { + listTotalHeight += currentHeight; + } + } + if (dataFromTop && list.length) { + for (let i = 0; i < heightCacheList.length; i++) { + const heightCacheItem = heightCacheList[i]; + heightCacheItem.lastTotalHeight += listTotalHeight; + heightCacheItem.totalHeight += listTotalHeight; + } + this.virtualHeightCacheList = currentCacheList.concat(heightCacheList); + } + this._updateVirtualScroll(this.oldScrollTop); + }, uni_modules_zPaging_components_zPaging_js_zPagingConstant.c.delayTime, "updateDynamicCellHeightDelay"); + }); + }, + // 设置cellItem的index + _setCellIndex(list, dataFrom = "bottom") { + let currentItemIndex = 0; + const cellIndexKey = this.virtualCellIndexKey; + dataFrom === "bottom" && [uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.QueryFrom.Refresh, uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.QueryFrom.Reload].indexOf(this.queryFrom) >= 0 && this._resetDynamicListState(); + if (this.totalData.length && this.queryFrom !== uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.QueryFrom.Refresh) { + if (dataFrom === "bottom") { + currentItemIndex = this.realTotalData.length; + const lastItem = this.realTotalData.length ? this.realTotalData.slice(-1)[0] : null; + if (lastItem && lastItem[cellIndexKey] !== void 0) { + currentItemIndex = lastItem[cellIndexKey] + 1; + } + } else if (dataFrom === "top") { + const firstItem = this.realTotalData.length ? this.realTotalData[0] : null; + if (firstItem && firstItem[cellIndexKey] !== void 0) { + currentItemIndex = firstItem[cellIndexKey] - list.length; + } + } + } else { + this._resetDynamicListState(); + } + for (let i = 0; i < list.length; i++) { + let item = list[i]; + if (!item || Object.prototype.toString.call(item) !== "[object Object]") { + item = { item }; + } + if (item[uni_modules_zPaging_components_zPaging_js_zPagingConstant.c.listCellIndexUniqueKey]) { + item = uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.deepCopy(item); + } + item[cellIndexKey] = currentItemIndex + i; + item[uni_modules_zPaging_components_zPaging_js_zPagingConstant.c.listCellIndexUniqueKey] = `${this.virtualListKey}-${item[cellIndexKey]}`; + list[i] = item; + } + this.getCellHeightRetryCount.dynamic = 0; + this.cellHeightMode === uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.CellHeightMode.Dynamic && this._updateDynamicCellHeight(list, dataFrom); + }, + // 更新scroll滚动(虚拟列表滚动时触发) + _updateVirtualScroll(scrollTop, scrollDiff = 0) { + const currentTimeStamp = uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.getTime(); + scrollTop === 0 && this._resetTopRange(); + if (scrollTop !== 0 && this.virtualScrollTimeStamp && currentTimeStamp - this.virtualScrollTimeStamp <= this.virtualScrollDisTimeStamp) { + return; + } + this.virtualScrollTimeStamp = currentTimeStamp; + let scrollIndex = 0; + const cellHeightMode = this.cellHeightMode; + if (cellHeightMode === uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.CellHeightMode.Fixed) { + scrollIndex = parseInt(scrollTop / this.virtualCellHeight) || 0; + this._updateFixedTopRangeIndex(scrollIndex); + this._updateFixedBottomRangeIndex(scrollIndex); + } else if (cellHeightMode === uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.CellHeightMode.Dynamic) { + const scrollDirection = scrollDiff > 0 ? "top" : "bottom"; + const rangePageHeight = this.virtualRangePageHeight; + const topRangePageOffset = scrollTop - rangePageHeight; + const bottomRangePageOffset = scrollTop + this.finalVirtualPageHeight + rangePageHeight; + let virtualBottomRangeIndex = 0; + let virtualPlaceholderBottomHeight = 0; + let reachedLimitBottom = false; + const heightCacheList = this.virtualHeightCacheList; + const lastHeightCache = !!heightCacheList ? heightCacheList.slice(-1)[0] : null; + let startTopRangeIndex = this.virtualTopRangeIndex; + if (scrollDirection === "bottom") { + for (let i = startTopRangeIndex; i < heightCacheList.length; i++) { + const heightCacheItem = heightCacheList[i]; + if (heightCacheItem && heightCacheItem.totalHeight > topRangePageOffset) { + this.virtualTopRangeIndex = i; + this.virtualPlaceholderTopHeight = heightCacheItem.lastTotalHeight; + break; + } + } + } else { + let topRangeMatched = false; + for (let i = startTopRangeIndex; i >= 0; i--) { + const heightCacheItem = heightCacheList[i]; + if (heightCacheItem && heightCacheItem.totalHeight < topRangePageOffset) { + this.virtualTopRangeIndex = i; + this.virtualPlaceholderTopHeight = heightCacheItem.lastTotalHeight; + topRangeMatched = true; + break; + } + } + !topRangeMatched && this._resetTopRange(); + } + for (let i = this.virtualTopRangeIndex; i < heightCacheList.length; i++) { + const heightCacheItem = heightCacheList[i]; + if (heightCacheItem && heightCacheItem.totalHeight > bottomRangePageOffset) { + virtualBottomRangeIndex = i; + virtualPlaceholderBottomHeight = lastHeightCache.totalHeight - heightCacheItem.totalHeight; + reachedLimitBottom = true; + break; + } + } + if (!reachedLimitBottom || this.virtualBottomRangeIndex === 0) { + this.virtualBottomRangeIndex = this.realTotalData.length ? this.realTotalData.length - 1 : this.pageSize; + this.virtualPlaceholderBottomHeight = 0; + } else { + this.virtualBottomRangeIndex = virtualBottomRangeIndex; + this.virtualPlaceholderBottomHeight = virtualPlaceholderBottomHeight; + } + this._updateVirtualList(); + } + }, + // 更新fixedCell模式下topRangeIndex&placeholderTopHeight + _updateFixedTopRangeIndex(scrollIndex) { + let virtualTopRangeIndex = this.virtualCellHeight === 0 ? 0 : scrollIndex - (parseInt(this.finalVirtualPageHeight / this.virtualCellHeight) || 1) * this.preloadPage; + virtualTopRangeIndex *= this.virtualListCol; + virtualTopRangeIndex = Math.max(0, virtualTopRangeIndex); + this.virtualTopRangeIndex = virtualTopRangeIndex; + this.virtualPlaceholderTopHeight = virtualTopRangeIndex / this.virtualListCol * this.virtualCellHeight; + }, + // 更新fixedCell模式下bottomRangeIndex&placeholderBottomHeight + _updateFixedBottomRangeIndex(scrollIndex) { + let virtualBottomRangeIndex = this.virtualCellHeight === 0 ? this.pageSize : scrollIndex + (parseInt(this.finalVirtualPageHeight / this.virtualCellHeight) || 1) * (this.preloadPage + 1); + virtualBottomRangeIndex *= this.virtualListCol; + virtualBottomRangeIndex = Math.min(this.realTotalData.length, virtualBottomRangeIndex); + this.virtualBottomRangeIndex = virtualBottomRangeIndex; + this.virtualPlaceholderBottomHeight = (this.realTotalData.length - virtualBottomRangeIndex) * this.virtualCellHeight / this.virtualListCol; + this._updateVirtualList(); + }, + // 更新virtualList + _updateVirtualList() { + const shouldUpdateList = this.updateVirtualListFromDataChange || (this.lastVirtualTopRangeIndex !== this.virtualTopRangeIndex || this.lastVirtualBottomRangeIndex !== this.virtualBottomRangeIndex); + if (shouldUpdateList) { + this.updateVirtualListFromDataChange = false; + this.lastVirtualTopRangeIndex = this.virtualTopRangeIndex; + this.lastVirtualBottomRangeIndex = this.virtualBottomRangeIndex; + this.virtualList = this.realTotalData.slice(this.virtualTopRangeIndex, this.virtualBottomRangeIndex + 1); + } + }, + // 重置动态cell模式下的高度缓存数据、虚拟列表和滚动状态 + _resetDynamicListState(resetVirtualList = false) { + this.virtualHeightCacheList = []; + if (resetVirtualList) { + this.virtualList = []; + } + this.virtualTopRangeIndex = 0; + this.virtualPlaceholderTopHeight = 0; + }, + // 重置topRangeIndex和placeholderTopHeight + _resetTopRange() { + this.virtualTopRangeIndex = 0; + this.virtualPlaceholderTopHeight = 0; + this._updateVirtualList(); + }, + // 检测虚拟列表当前滚动位置,如发现滚动位置不正确则重新计算虚拟列表相关参数(为解决在App中可能出现的长时间进入后台后打开App白屏的问题) + _checkVirtualListScroll() { + if (this.finalUseVirtualList) { + this.$nextTick(() => { + this._getNodeClientRect(".zp-paging-touch-view").then((node) => { + const currentTop = node ? node[0].top : 0; + if (!node || currentTop === this.pagingOrgTop && this.virtualPlaceholderTopHeight !== 0) { + this._updateVirtualScroll(0); + } + }); + }); + } + }, + // 获取对应index的虚拟列表cell节点信息 + _getVirtualCellNodeByIndex(index) { + let inDom = this.finalUseInnerList; + if (this.forceCloseInnerList && this.virtualInSwiperSlot) { + inDom = this.$parent; + } + return this._getNodeClientRect(`#${this.fianlVirtualCellIdPrefix}-${index}`, inDom); + }, + // 处理使用内置列表时点击了cell事件 + _innerCellClick(item, index) { + this.$emit("innerCellClick", item, index); + } + } +}; +exports.virtualListModule = virtualListModule; +//# sourceMappingURL=../../../../../../../.sourcemap/mp-weixin/uni_modules/z-paging/components/z-paging/js/modules/virtual-list.js.map diff --git a/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/js/z-paging-constant.js b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/js/z-paging-constant.js new file mode 100644 index 0000000..925408e --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/js/z-paging-constant.js @@ -0,0 +1,19 @@ +"use strict"; +const c = { + // 当前版本号 + version: "2.8.6", + // 延迟操作的通用时间 + delayTime: 100, + // 请求失败时候全局emit使用的key + errorUpdateKey: "z-paging-error-emit", + // 全局emit complete的key + completeUpdateKey: "z-paging-complete-emit", + // z-paging缓存的前缀key + cachePrefixKey: "z-paging-cache", + // 虚拟列表中列表index的key + listCellIndexKey: "zp_index", + // 虚拟列表中列表的唯一key + listCellIndexUniqueKey: "zp_unique_index" +}; +exports.c = c; +//# sourceMappingURL=../../../../../../.sourcemap/mp-weixin/uni_modules/z-paging/components/z-paging/js/z-paging-constant.js.map diff --git a/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/js/z-paging-enum.js b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/js/z-paging-enum.js new file mode 100644 index 0000000..44acb6f --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/js/z-paging-enum.js @@ -0,0 +1,46 @@ +"use strict"; +const Enum = { + // 当前加载类型 refresher:下拉刷新 load-more:上拉加载更多 + LoadingType: { + Refresher: "refresher", + LoadMore: "load-more" + }, + // 下拉刷新状态 default:默认状态 release-to-refresh:松手立即刷新 loading:刷新中 complete:刷新结束 go-f2:松手进入二楼 + Refresher: { + Default: "default", + ReleaseToRefresh: "release-to-refresh", + Loading: "loading", + Complete: "complete", + GoF2: "go-f2" + }, + // 底部加载更多状态 default:默认状态 loading:加载中 no-more:没有更多数据 fail:加载失败 + More: { + Default: "default", + Loading: "loading", + NoMore: "no-more", + Fail: "fail" + }, + // @query触发来源 user-pull-down:用户主动下拉刷新 reload:通过reload触发 refresh:通过refresh触发 load-more:通过滚动到底部加载更多或点击底部加载更多触发 + QueryFrom: { + UserPullDown: "user-pull-down", + Reload: "reload", + Refresh: "refresh", + LoadMore: "load-more" + }, + // 虚拟列表cell高度模式 + CellHeightMode: { + // 固定高度 + Fixed: "fixed", + // 动态高度 + Dynamic: "dynamic" + }, + // 列表缓存模式 + CacheMode: { + // 默认模式,只会缓存一次 + Default: "default", + // 总是缓存,每次列表刷新(下拉刷新、调用reload等)都会更新缓存 + Always: "always" + } +}; +exports.Enum = Enum; +//# sourceMappingURL=../../../../../../.sourcemap/mp-weixin/uni_modules/z-paging/components/z-paging/js/z-paging-enum.js.map diff --git a/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/js/z-paging-interceptor.js b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/js/z-paging-interceptor.js new file mode 100644 index 0000000..e775597 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/js/z-paging-interceptor.js @@ -0,0 +1,69 @@ +"use strict"; +const queryKey = "Query"; +const fetchParamsKey = "FetchParams"; +const fetchResultKey = "FetchResult"; +const language2LocalKey = "Language2Local"; +function handleQuery(callback) { + _addHandleByKey(queryKey, callback); + return this; +} +function _handleQuery(pageNo, pageSize, from, lastItem) { + const callback = _getHandleByKey(queryKey); + return callback ? callback(pageNo, pageSize, from, lastItem) : [pageNo, pageSize, from]; +} +function handleFetchParams(callback) { + _addHandleByKey(fetchParamsKey, callback); + return this; +} +function _handleFetchParams(parmas, extraParams) { + const callback = _getHandleByKey(fetchParamsKey); + return callback ? callback(parmas, extraParams || {}) : { pageNo: parmas.pageNo, pageSize: parmas.pageSize, ...extraParams || {} }; +} +function handleFetchResult(callback) { + _addHandleByKey(fetchResultKey, callback); + return this; +} +function _handleFetchResult(result, paging, params) { + const callback = _getHandleByKey(fetchResultKey); + callback && callback(result, paging, params); + return callback ? true : false; +} +function handleLanguage2Local(callback) { + _addHandleByKey(language2LocalKey, callback); + return this; +} +function _handleLanguage2Local(language, local) { + const callback = _getHandleByKey(language2LocalKey); + return callback ? callback(language, local) : local; +} +function _getApp() { + return getApp(); +} +function _hasGlobalData() { + return _getApp() && _getApp().globalData; +} +function _addHandleByKey(key, callback) { + try { + setTimeout(function() { + if (_hasGlobalData()) { + _getApp().globalData[`zp_handle${key}Callback`] = callback; + } + }, 1); + } catch (_) { + } +} +function _getHandleByKey(key) { + return _hasGlobalData() ? _getApp().globalData[`zp_handle${key}Callback`] : null; +} +const interceptor = { + handleQuery, + _handleQuery, + handleFetchParams, + _handleFetchParams, + handleFetchResult, + _handleFetchResult, + handleLanguage2Local, + _handleLanguage2Local +}; +exports.interceptor = interceptor; +//# sourceMappingURL=../../../../../../.sourcemap/mp-weixin/uni_modules/z-paging/components/z-paging/js/z-paging-interceptor.js.map diff --git a/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/js/z-paging-main.js b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/js/z-paging-main.js new file mode 100644 index 0000000..f57f33c --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/js/z-paging-main.js @@ -0,0 +1,423 @@ +"use strict"; +const common_vendor = require("../../../../../common/vendor.js"); +const uni_modules_zPaging_components_zPaging_js_zPagingStatic = require("./z-paging-static.js"); +const uni_modules_zPaging_components_zPaging_js_zPagingConstant = require("./z-paging-constant.js"); +const uni_modules_zPaging_components_zPaging_js_zPagingUtils = require("./z-paging-utils.js"); +const uni_modules_zPaging_components_zPaging_js_modules_commonLayout = require("./modules/common-layout.js"); +const uni_modules_zPaging_components_zPaging_js_modules_dataHandle = require("./modules/data-handle.js"); +const uni_modules_zPaging_components_zPaging_js_modules_i18n = require("./modules/i18n.js"); +const uni_modules_zPaging_components_zPaging_js_modules_nvue = require("./modules/nvue.js"); +const uni_modules_zPaging_components_zPaging_js_modules_empty = require("./modules/empty.js"); +const uni_modules_zPaging_components_zPaging_js_modules_refresher = require("./modules/refresher.js"); +const uni_modules_zPaging_components_zPaging_js_modules_loadMore = require("./modules/load-more.js"); +const uni_modules_zPaging_components_zPaging_js_modules_loading = require("./modules/loading.js"); +const uni_modules_zPaging_components_zPaging_js_modules_chatRecordMode = require("./modules/chat-record-mode.js"); +const uni_modules_zPaging_components_zPaging_js_modules_scroller = require("./modules/scroller.js"); +const uni_modules_zPaging_components_zPaging_js_modules_backToTop = require("./modules/back-to-top.js"); +const uni_modules_zPaging_components_zPaging_js_modules_virtualList = require("./modules/virtual-list.js"); +const uni_modules_zPaging_components_zPaging_js_zPagingEnum = require("./z-paging-enum.js"); +const zPagingRefresh = () => "../components/z-paging-refresh.js"; +const zPagingLoadMore = () => "../components/z-paging-load-more.js"; +const zPagingEmptyView = () => "../../z-paging-empty-view/z-paging-empty-view.js"; +const systemInfo = uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.getSystemInfoSync(); +const _sfc_main = { + name: "z-paging", + components: { + zPagingRefresh, + zPagingLoadMore, + zPagingEmptyView + }, + mixins: [ + uni_modules_zPaging_components_zPaging_js_modules_commonLayout.commonLayoutModule, + uni_modules_zPaging_components_zPaging_js_modules_dataHandle.dataHandleModule, + uni_modules_zPaging_components_zPaging_js_modules_i18n.i18nModule, + uni_modules_zPaging_components_zPaging_js_modules_nvue.nvueModule, + uni_modules_zPaging_components_zPaging_js_modules_empty.emptyModule, + uni_modules_zPaging_components_zPaging_js_modules_refresher.refresherModule, + uni_modules_zPaging_components_zPaging_js_modules_loadMore.loadMoreModule, + uni_modules_zPaging_components_zPaging_js_modules_loading.loadingModule, + uni_modules_zPaging_components_zPaging_js_modules_chatRecordMode.chatRecordModerModule, + uni_modules_zPaging_components_zPaging_js_modules_scroller.scrollerModule, + uni_modules_zPaging_components_zPaging_js_modules_backToTop.backToTopModule, + uni_modules_zPaging_components_zPaging_js_modules_virtualList.virtualListModule + ], + data() { + return { + // --------------静态资源--------------- + base64BackToTop: uni_modules_zPaging_components_zPaging_js_zPagingStatic.zStatic.base64BackToTop, + // -------------全局数据相关-------------- + // 当前加载类型 + loadingType: uni_modules_zPaging_components_zPaging_js_zPagingEnum.Enum.LoadingType.Refresher, + requestTimeStamp: 0, + wxsPropType: "", + renderPropScrollTop: -1, + checkScrolledToBottomTimeOut: null, + cacheTopHeight: -1, + statusBarHeight: systemInfo.statusBarHeight, + // --------------状态&判断--------------- + insideOfPaging: -1, + isLoadFailed: false, + isIos: systemInfo.platform === "ios", + disabledBounce: false, + fromCompleteEmit: false, + disabledCompleteEmit: false, + pageLaunched: false, + active: false, + // ---------------wxs相关--------------- + wxsIsScrollTopInTopRange: true, + wxsScrollTop: 0, + wxsPageScrollTop: 0, + wxsOnPullingDown: false + }; + }, + props: { + // 调用complete后延迟处理的时间,单位为毫秒,默认0毫秒,优先级高于minDelay + delay: { + type: [Number, String], + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("delay", 0) + }, + // 触发@query后最小延迟处理的时间,单位为毫秒,默认0毫秒,优先级低于delay(假设设置为300毫秒,若分页请求时间小于300毫秒,则在调用complete后延迟[300毫秒-请求时长];若请求时长大于300毫秒,则不延迟),当show-refresher-when-reload为true或reload(true)时,其最小值为400 + minDelay: { + type: [Number, String], + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("minDelay", 0) + }, + // 设置z-paging的style,部分平台(如微信小程序)无法直接修改组件的style,可使用此属性代替 + pagingStyle: { + type: Object, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("pagingStyle", {}) + }, + // z-paging的高度,优先级低于pagingStyle中设置的height;传字符串,如100px、100rpx、100% + height: { + type: String, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("height", "") + }, + // z-paging的宽度,优先级低于pagingStyle中设置的width;传字符串,如100px、100rpx、100% + width: { + type: String, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("width", "") + }, + // z-paging的最大宽度,优先级低于pagingStyle中设置的max-width;传字符串,如100px、100rpx、100%。默认为空,也就是铺满窗口宽度,若设置了特定值则会自动添加margin: 0 auto + maxWidth: { + type: String, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("maxWidth", "") + }, + // z-paging的背景色,优先级低于pagingStyle中设置的background。传字符串,如"#ffffff" + bgColor: { + type: String, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("bgColor", "") + }, + // 设置z-paging的容器(插槽的父view)的style + pagingContentStyle: { + type: Object, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("pagingContentStyle", {}) + }, + // z-paging是否自动高度,若自动高度则会自动铺满屏幕 + autoHeight: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("autoHeight", false) + }, + // z-paging是否自动高度时,附加的高度,注意添加单位px或rpx,若需要减少高度,则传负数 + autoHeightAddition: { + type: [Number, String], + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("autoHeightAddition", "0px") + }, + // loading(下拉刷新、上拉加载更多)的主题样式,支持black,white,默认black + defaultThemeStyle: { + type: String, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("defaultThemeStyle", "black") + }, + // z-paging是否使用fixed布局,若使用fixed布局,则z-paging的父view无需固定高度,z-paging高度默认为100%,默认为是(当使用内置scroll-view滚动时有效) + fixed: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("fixed", true) + }, + // 是否开启底部安全区域适配 + safeAreaInsetBottom: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("safeAreaInsetBottom", false) + }, + // 开启底部安全区域适配后,是否使用placeholder形式实现,默认为否。为否时滚动区域会自动避开底部安全区域,也就是所有滚动内容都不会挡住底部安全区域,若设置为是,则滚动时滚动内容会挡住底部安全区域,但是当滚动到底部时才会避开底部安全区域 + useSafeAreaPlaceholder: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("useSafeAreaPlaceholder", false) + }, + // z-paging bottom的背景色,默认透明,传字符串,如"#ffffff" + bottomBgColor: { + type: String, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("bottomBgColor", "") + }, + // slot="top"的view的z-index,默认为99,仅使用页面滚动时有效 + topZIndex: { + type: Number, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("topZIndex", 99) + }, + // z-paging内容容器父view的z-index,默认为1 + superContentZIndex: { + type: Number, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("superContentZIndex", 1) + }, + // z-paging内容容器部分的z-index,默认为1 + contentZIndex: { + type: Number, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("contentZIndex", 1) + }, + // z-paging二楼的z-index,默认为100 + f2ZIndex: { + type: Number, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("f2ZIndex", 100) + }, + // 使用页面滚动时,是否在不满屏时自动填充满屏幕,默认为是 + autoFullHeight: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("autoFullHeight", true) + }, + // 是否监听列表触摸方向改变,默认为否 + watchTouchDirectionChange: { + type: Boolean, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("watchTouchDirectionChange", false) + }, + // z-paging中布局的单位,默认为rpx + unit: { + type: String, + default: uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.gc("unit", "rpx") + } + }, + created() { + if (this.createdReload && !this.refresherOnly && this.auto) { + this._startLoading(); + this.$nextTick(this._preReload); + } + }, + mounted() { + this.active = true; + this.wxsPropType = uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.getTime().toString(); + this.renderJsIgnore; + if (!this.createdReload && !this.refresherOnly && this.auto) { + uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.delay(() => this.$nextTick(this._preReload), 0); + } + this.finalUseCache && this._setListByLocalCache(); + let delay = 0; + delay = uni_modules_zPaging_components_zPaging_js_zPagingConstant.c.delayTime; + this.$nextTick(() => { + this.systemInfo = uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.getSystemInfoSync(); + !this.usePageScroll && this.autoHeight && this._setAutoHeight(); + this.loaded = true; + uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.delay(() => { + this.updateFixedLayout(); + this._updateCachedSuperContentHeight(); + }); + }); + this.updatePageScrollTopHeight(); + this.updatePageScrollBottomHeight(); + this.updateLeftAndRightWidth(); + if (this.finalRefresherEnabled && this.useCustomRefresher) { + this.$nextTick(() => { + this.isTouchmoving = true; + }); + } + this._onEmit(); + this.finalUseVirtualList && this._virtualListInit(); + this.$nextTick(() => { + setTimeout(() => { + this._getCssSafeAreaInsetBottom(() => this.safeAreaInsetBottom && this.updatePageScrollBottomHeight()); + }, delay); + }); + }, + destroyed() { + this._handleUnmounted(); + }, + unmounted() { + this._handleUnmounted(); + }, + watch: { + defaultThemeStyle: { + handler(newVal) { + if (newVal.length) { + this.finalRefresherDefaultStyle = newVal; + } + }, + immediate: true + }, + autoHeight(newVal) { + this.loaded && !this.usePageScroll && this._setAutoHeight(newVal); + }, + autoHeightAddition(newVal) { + this.loaded && !this.usePageScroll && this.autoHeight && this._setAutoHeight(newVal); + } + }, + computed: { + // 当前z-paging的内置样式 + finalPagingStyle() { + const pagingStyle = { ...this.pagingStyle }; + if (!this.systemInfo) + return pagingStyle; + const { windowTop, windowBottom } = this; + if (!this.usePageScroll && this.fixed) { + if (windowTop && !pagingStyle.top) { + pagingStyle.top = windowTop + "px"; + } + if (windowBottom && !pagingStyle.bottom) { + pagingStyle.bottom = windowBottom + "px"; + } + } + if (this.bgColor.length && !pagingStyle["background"]) { + pagingStyle["background"] = this.bgColor; + } + if (this.height.length && !pagingStyle["height"]) { + pagingStyle["height"] = this.height; + } + if (this.width.length && !pagingStyle["width"]) { + pagingStyle["width"] = this.width; + } + if (this.maxWidth.length && !pagingStyle["max-width"]) { + pagingStyle["max-width"] = this.maxWidth; + pagingStyle["margin"] = "0 auto"; + } + return pagingStyle; + }, + // 当前z-paging内容的样式 + finalPagingContentStyle() { + if (this.contentZIndex != 1) { + this.pagingContentStyle["z-index"] = this.contentZIndex; + this.pagingContentStyle["position"] = "relative"; + } + return this.pagingContentStyle; + }, + renderJsIgnore() { + if (this.usePageScroll && this.useChatRecordMode || !this.refresherEnabled && this.scrollable || !this.useCustomRefresher) { + this.$nextTick(() => { + this.renderPropScrollTop = 10; + }); + } + return 0; + }, + windowHeight() { + if (!this.systemInfo) + return 0; + return this.systemInfo.windowHeight || 0; + }, + windowBottom() { + if (!this.systemInfo) + return 0; + let windowBottom = this.systemInfo.windowBottom || 0; + if (this.safeAreaInsetBottom && !this.useSafeAreaPlaceholder && !this.useChatRecordMode) { + windowBottom += this.safeAreaBottom; + } + return windowBottom; + }, + isIosAndH5() { + return false; + } + }, + methods: { + // 当前版本号 + getVersion() { + return `z-paging v${uni_modules_zPaging_components_zPaging_js_zPagingConstant.c.version}`; + }, + // 设置nvue List的specialEffects + setSpecialEffects(args) { + this.setListSpecialEffects(args); + }, + // 与setSpecialEffects等效,兼容旧版本 + setListSpecialEffects(args) { + this.nFixFreezing = args && Object.keys(args).length; + if (this.isIos) { + this.privateRefresherEnabled = 0; + } + !this.usePageScroll && this.$refs["zp-n-list"].setSpecialEffects(args); + }, + // 使手机发生较短时间的振动(15ms) + _doVibrateShort() { + common_vendor.index.vibrateShort(); + }, + // 设置z-paging高度 + async _setAutoHeight(shouldFullHeight = true, scrollViewNode = null) { + const heightKey = "min-height"; + try { + if (shouldFullHeight) { + let finalScrollViewNode = scrollViewNode || await this._getNodeClientRect(".zp-scroll-view"); + let finalScrollBottomNode = await this._getNodeClientRect(".zp-page-bottom"); + if (finalScrollViewNode) { + const scrollViewTop = finalScrollViewNode[0].top; + let scrollViewHeight = this.windowHeight - scrollViewTop; + scrollViewHeight -= finalScrollBottomNode ? finalScrollBottomNode[0].height : 0; + const additionHeight = uni_modules_zPaging_components_zPaging_js_zPagingUtils.u.convertToPx(this.autoHeightAddition); + let importantSuffix = " !important"; + const finalHeight = scrollViewHeight + additionHeight - (this.insideMore ? 1 : 0) + "px" + importantSuffix; + this.$set(this.scrollViewStyle, heightKey, finalHeight); + this.$set(this.scrollViewInStyle, heightKey, finalHeight); + } + } else { + this.$delete(this.scrollViewStyle, heightKey); + this.$delete(this.scrollViewInStyle, heightKey); + } + } catch (e) { + } + }, + // 组件销毁后续处理 + _handleUnmounted() { + this.active = false; + this._offEmit(); + this.useChatRecordMode && common_vendor.index.offKeyboardHeightChange(this._handleKeyboardHeightChange); + }, + // 触发更新是否超出页面状态 + _updateInsideOfPaging() { + this.insideMore && this.insideOfPaging === true && setTimeout(this.doLoadMore, 200); + }, + // 清除timeout + _cleanTimeout(timeout) { + if (timeout) { + clearTimeout(timeout); + timeout = null; + } + return timeout; + }, + // 添加全局emit监听 + _onEmit() { + common_vendor.index.$on(uni_modules_zPaging_components_zPaging_js_zPagingConstant.c.errorUpdateKey, (errorMsg) => { + if (this.loading) { + if (!!errorMsg) { + this.customerEmptyViewErrorText = errorMsg; + } + this.complete(false).catch(() => { + }); + } + }); + common_vendor.index.$on(uni_modules_zPaging_components_zPaging_js_zPagingConstant.c.completeUpdateKey, (data) => { + setTimeout(() => { + if (this.loading) { + if (!this.disabledCompleteEmit) { + const type = data.type || "normal"; + const list = data.list || data; + const rule = data.rule; + this.fromCompleteEmit = true; + switch (type) { + case "normal": + this.complete(list); + break; + case "total": + this.completeByTotal(list, rule); + break; + case "nomore": + this.completeByNoMore(list, rule); + break; + case "key": + this.completeByKey(list, rule); + break; + } + } else { + this.disabledCompleteEmit = false; + } + } + }, 1); + }); + }, + // 销毁全局emit和listener监听 + _offEmit() { + common_vendor.index.$off(uni_modules_zPaging_components_zPaging_js_zPagingConstant.c.errorUpdateKey); + common_vendor.index.$off(uni_modules_zPaging_components_zPaging_js_zPagingConstant.c.completeUpdateKey); + } + } +}; +exports._sfc_main = _sfc_main; +//# sourceMappingURL=../../../../../../.sourcemap/mp-weixin/uni_modules/z-paging/components/z-paging/js/z-paging-main.js.map diff --git a/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/js/z-paging-static.js b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/js/z-paging-static.js new file mode 100644 index 0000000..d1c0902 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/js/z-paging-static.js @@ -0,0 +1,14 @@ +"use strict"; +const zStatic = { + base64Arrow: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkBAMAAACCzIhnAAAAD1BMVEVHcExRUVFMTExRUVFRUVE9CdWsAAAABHRSTlMAjjrY9ZnUjwAAAQFJREFUWMPt2MsNgzAMgGEEE1B1gKJmAIRYoCH7z9RCXrabh33iYktcIv35EEg5ZBh07pvxJU6MFSPOSRnjnBUjUsaciRUjMsb4xIoRCWNiYsUInzE5sWKEyxiYWDbyefqHx1zIeiYTk7mQYziTYecxHvEJjwmIT3hMQELCYSISEg4TkZj0mYTEpM8kJCU9JiMp6TEZyUmbAUhO2gxAQNJiIAKSFgMRmNQZhMCkziAEJTUGIyipMRjBSZkhCE7KDEFIUmTeGCHJxWz0zXaE0GTCG8ZFtEaS347r/1fe11YyHYVfubxayfjoHmc0YYwmmmiiiSaaaKLJ7ckyz5ve+dw3Xw2emdwm9xSbAAAAAElFTkSuQmCC", + base64ArrowWhite: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkBAMAAACCzIhnAAAAElBMVEVHcEz///////////////////+IGTx/AAAABnRSTlMA/dAkXZOhASU/AAABYElEQVRYw+2YwXLCIBCGsdAHWGbyAKZ4zxi9O017rxLf/1UaWFAgA1m8dcpedNSPf/l/Vh0Ya/Wn6hN0JcGvoCqRM4C8VBFiDwBqqNuJKV0rAnCgy3AUqZE57x0iqTL8Br4U3WBf/YWaIlTKfAcELU/h9w72CSVPa3C3OCDvhpHbRp/s2vq4fHhCeiCl2A3m4Qd71DQR257mFBlMcTlbFnFWzNtHxewYEfSiaLS4el8d8nyhmKJd1CF4eOS0keLMAuSxubLBIeIGQW8YHCFFo7EH9+YDcQt9FMZEswTheaNxTHwHT8SZorJjMrEVwo4Zo0U8HSEyZvJMOg4RjnmmRr8nDYeIz3OMkbfE/QhBo+U9RnZJxjGCRh/WKmHEMWLNkfPKsGh/CWJk1JjG0kcuJggTt34VDP8aWAFhp4nybVb5+9qQhjSkIQ1pSEMa8k+Q5U9rV3dF8MpFBK+/7miVq1/HZ2qmo9D+pAAAAABJRU5ErkJggg==", + base64Flower: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkBAMAAACCzIhnAAAAKlBMVEVHcEzDw8Ovr6+pqamUlJTCwsKenp61tbWxsbGysrLNzc2bm5u5ubmjo6MpovhuAAAACnRSTlMA/P79/sHDhiZS0DxZowAABBBJREFUWMPtl89rE0EUx7ctTXatB3MI1SWnDbUKPUgXqh4ED8Uf7KUVSm3ooVSpSii0Fn/gD4j4o+APiEoVmos9FO2celiqZVgwgaKHPQiCCkv+F99kM7Ozm5kxq1dfD91k9pPve9/3ZjbRNHHok/mKli4eIPNgSuRObuN9SqSEzM20iGnm0yIbqCuV7NSSSIV7uyPM6JMBYdeTOanh/QihJYZsUCSby+VkMj2AvOt0rAeQAwqE3lfKMZVlQCZk1QOCKkkVPadITCfIRNKxfoJI5+0OIFtJx14CMSg1mRSDko7VAfksRQzEbGYqxOJcVTWMCH2I1/IACNW0PWU2M8cmAVHtnH5mM1VRWtwKZjOd5JbF6s1IbaYqaotjNlPHgDAnlAizubTR6ovMYn052g/U5qcmOpi0WL8xTS/3IfSet5m8MEr5ajjF5le6dq/OJpobrdY0t3i9QgefWrxW9/1BLhk0E9m8FeUMhhXal499iD0eQRfDF+ts/tttORRerfp+oV7f4xJj82iUYm1Yzod+ZQEAlS/8mMBwKebVmCVp1f0JLS6zKd17+iwRKTARVg2SHtz3iEbBH+Q+U28zW2Jiza8Tjb1YFoYZMsJyjDqp3M9XBQdSdPLFdxEpvOB37JrHcmR/y9+LgoTlCFGZEa2sc6d4PGlweEa2JSVPoVm+IfGG3ZL037iV9oH+P+Jxc4HGVflNq1M0pivao/EopO4b/ojVCP9GjmiXOeS0DOn1o/iiccT4ORnyvBGF3yUywkQajW4Ti0SGuiy/wVSg/L8w+X/8Q+hvUx8Xd90z4oV5a1i88MbFWHz0WZZ1UrTwBGPX3Rat9AFiXRMRjoMdIdJLEOt2h7jrYOzgOamKZSWSNspOS0X8SAqRYmxRL7sg4eLzYmNehcxh3uoyud/BH2Udux4ywxFTc1xC7Mgf4vMhc5S+kSH3Y7yj+qpwIWSoPTVCOOPVthGx9FbGqrwFw6wSFxJr+17zeKcztt3u+2roAEVgUjDd+AHGuxHy2rZHaa8JMkTHEeyi85ANPO9j9BVuBRD2FY5LDMo/Sz/2hReqGIs/KiFin+CsPsYO/yvM3jL2vE8EbX7/Bf8ejtr2GLN65bioAdgLd8Bis/mD5GmP2qeqyo2ZwQEOtAjRIDH7mBKpUcMoApbZJ5UIxkEwxyMZyMxW/uKFvHCFR3SSmerHyDNQ2dF4JG6zIMpBgLfjSF9x1D6smFcYnGApjmSLICO3ecCDWrQ48geba9DI3STy2i7ax6WIB62fSyIZIiO3GFQqSURp8wCo7GhJBGwuSovJBNjb7kT6FPVnIa9qJ2Ko+l9mefGIdinaMp0yC1URYiwsdfNE45EuA5Cx9EhalfvN5s+UyItm81vaB3p4joniN+SCP7Qc1hblAAAAAElFTkSuQmCC", + base64FlowerWhite: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkBAMAAACCzIhnAAAAElBMVEX///9HcEz///////////////84chYNAAAABnRSTlP/AGzCOYZj5g1nAAACfklEQVRYw+2YTVPDIBCGtza9Jw25a0bvcax30o73OOr//yvma2F3YWlpPTijXNpAHrK8LLALVPFium2vNIFSbwGKTGQA2GUiHcD29yDNy3sMIdUBQl7r2H8mOEVqAHgPkYZUS6Qc2zYhQqtjyDZEximCZwWZLIBeIgYShs2NzxKpSUehYpMJhURGb+O+w5BpMCAREKPnCDHbIY20SzhM5yxziAXpOiBXydrekT9i5XDEq4NIIHHgyU5mRGqviII4mREJJA4QJzMiILwlRJzpKxJKvCBm8OsBBbLux0tsPl4RKYm5aPu6jw1U4mGxEUR9g8M1PcqBEp/WJliNgYOXueBzS4jZSIcgY5lCtevgDSgyzE+rAfuOTQMq0yzvoGH18qju27Mayzs4fPyMziCx81NJa5RNfW7vPYK9KOfDiVkBxFHG8hAj9txuoBuSWORsFfkpBf7xKFLSeaOefEojh5jz22DJEqMP8fUyaKdQx+RnG+yXMpe8Aars8ueR1pVH/bW3FyyvPRw90upLDHwpgBDtg4aUBNkxRLXMAi03IhcZtr1m+FeI/O/JNyDmmL1djLOauSlNflBpW18RQ2bPqXI22MXXEk75KRHTnkPkYbESbdKP2ZFk0r5sIwffAjy1lx+vx7NLjB6/E7Jfv5ERKhzpN0w8IDE8IGFDv5dhz10s7GFiXRZcUeLCEG5P5nDq9k4PFDcoMpE3GY4OuxuCXhmuyNB6k0RsLIAvqp9NE5r8ZCSS8gxnUp7ODdYhZTqxuiJ9uyJJtPmpqJ7wVj+XVieS903iViHziqAhchLEJAyb7jWU647EpUofQ0ziUuXXXhDddtlllSwjgSQu7r4BRWhQqfDPMVwAAAAASUVORK5CYII=", + base64Success: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkBAMAAACCzIhnAAAAElBMVEVRUVFHcExTU1NRUVFRUVFRUVFOSlSUAAAABnRSTlP/AI6+VySB3ZENAAACcElEQVRYw+2YyYKCMAyGI8hdpdxdZu7gcpdZ7jL6/s8yYheSNi0aPdqbwOffpGmaFOYPD3gj4bisN7vddv17N/JVgxn5x12IWgIaWTuO/IE3PseQbwjGPo2cgRmHFLJwdm/X643zwiqOKPPJ1nj3sjEP2iiifZWj5bhopSyGaEO2HX5fbQJzwJ+W7x/jw5ZFjsEU0PMph9xE8i5EqprKALW95eJQURkgzw98uJ/JvwGecR7bIjWWsUgVrrIfFZ2HlLy3sKETD1mmRLRMRhGVssRa0xJkdn3SpJBymBkM8+pSSDXMDNyDaToVHd2fgpNt0sjwiUZO19+jGQ+gQEg9Oq+bufmAVGihomNmjQG7UG3020vrlm7lkFnKFGU3kZ0KGAdmKe821pipQ+qEKcrZeTL2g5FsUks4cStjEZWwXg0b0n4GxmEpkWwIs5VBynjgK7xZaz1/0D7OxkVuLpsY5BQNFyLS84VBjjbg0iL2r2EQHBOxBhikuUOkdxODVF1cxHoWtPPsiyXO455Iv34hssCO8EV4ZIYTjS8SR4qYSHRiTiYQ4ZFbHi0iIhhBTi6dTCgSWRcnw4h4yGTuyTAiOGBIWGoZTgSHJQl+LcOJ4OCnW6yX2bMnJ9pidCOXtkTkTrIGpYuOynAiOF14SamMiOCk5Ke+mq8BcOrrvym8d0zKIQnWT+M1WwOQNO4fFiWb18hhERxJPx2fblbPHHyC41VyiAtKBUFBIih7JMWVoIQTFIr3lKPN80WvoLSWFPC653ioTZA0I0FrQ7qU6asaK0H7JmkSJa2ooOGVtNUsc3j9FYHkIkJy3SG6VHnfXKXGP9t4N9Q4Ye98AAAAAElFTkSuQmCC", + base64SuccessWhite: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkBAMAAACCzIhnAAAAGFBMVEVHcEz///////////////////////////8dS1W+AAAAB3RSTlMAiVYk6KvDHLfaegAAAo1JREFUWMPtWEtzmzAQNhCTq910ytXpiyvxTNOr60zrayepx9d02gnX4sTm7xcEiJX2gdnkGJ1A4tOnfWqXyeR1vMRYzrcPD9v5h5MBl3/Ldvx4cxIg/FWC8X0xjLjalM54uhhCfCrRuJURX0pi3EmIqZV7O59vrRZmguStHL9b7S7ftfLwOtiZDw7AHMtmquAQ12b5Wwbnordm8g9zLLO49qc/m2n6aKnhwPOGZ08hAiNHhheiHae1lOUPGZpQkPKa3q0mOUjaRzSRaGUjpy/mmWSwySSpllcEteBKAT52KEnSbblA51pJEPxBQoiH1FP4E3s5+FJv07h6/ylD6ui7B+9fq/ehrFB98ghec9EoVtyjK8pqCHLmCBOwMWSCeWFNN4MbPAk55NhsvoFHSSVR0k5TCTTEzlUGcqV/nVp7n9oIVkmtaqbAEqEgfdgHJPwsEAyZ9r4VAZXFjpEwyaw3+H2v42KYxKhs1XvY/gSSGv+IHyUSuHXCeZhLAgVI3EjgSGo1Fb3xO0tGGU9S2/KAIbtjxpJASG73qox6w5LUq0cEOa+iIONIWIilQSQ0pPa2jgaRQAgQP7c0mITRWGxpMAmEQFN2NAQJNCV0mI6GIIEO47hlQ0ORQLd0nL+hoUjg1m6I1TRr8uYEAriBHLcVFQ5UEMiBe3XkTBEG04WXlGKGxPnMS305XQPA1Ocn2JiuAZwE66fxnKwBnDTuXxZTMq85lwW6kt5ndLqZPefiU1yvmktcUSooChJF2aMprhQlnKJQ5FxRKkcVRa+itNYU8Io2oVkY14w0NMWYlqft91Bj9VHq+ca3b43BxjWJmla0sfKohlfTVpPN+93L/yLQ/IjQ/O5Q/VR5HdL4D7mlxmjwVdELAAAAAElFTkSuQmCC", + base64Empty: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAMAAAAL34HQAAALeGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNi4wLWMwMDIgNzkuMTY0NDg4LCAyMDIwLzA3LzEwLTIyOjA2OjUzICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0RXZ0PSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VFdmVudCMiIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczpwaG90b3Nob3A9Imh0dHA6Ly9ucy5hZG9iZS5jb20vcGhvdG9zaG9wLzEuMC8iIHhtbG5zOnRpZmY9Imh0dHA6Ly9ucy5hZG9iZS5jb20vdGlmZi8xLjAvIiB4bWxuczpleGlmPSJodHRwOi8vbnMuYWRvYmUuY29tL2V4aWYvMS4wLyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOSAoV2luZG93cykiIHhtcDpDcmVhdGVEYXRlPSIyMDIyLTAyLTIyVDIxOjIxOjQ1KzA4OjAwIiB4bXA6TWV0YWRhdGFEYXRlPSIyMDI0LTAxLTEzVDE5OjA5OjQwKzA4OjAwIiB4bXA6TW9kaWZ5RGF0ZT0iMjAyNC0wMS0xM1QxOTowOTo0MCswODowMCIgZGM6Zm9ybWF0PSJpbWFnZS9wbmciIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6ZWQwMWYzNWQtOWRjOC00MDBiLWEyMmQtNjM5OGZiNzVhNGRiIiB4bXBNTTpEb2N1bWVudElEPSJhZG9iZTpkb2NpZDpwaG90b3Nob3A6ZDhlMzQ3ZmEtMDY2My1jYTRiLTgzNTctNTk4YjBkNGIzOTU2IiB4bXBNTTpPcmlnaW5hbERvY3VtZW50SUQ9InhtcC5kaWQ6ZDA4MDI4MDItMzUyYS04NTRhLTkxYjctNmRlNmQ1MmViM2QwIiBwaG90b3Nob3A6Q29sb3JNb2RlPSIzIiBwaG90b3Nob3A6SUNDUHJvZmlsZT0ic1JHQiBJRUM2MTk2Ni0yLjEiIHRpZmY6T3JpZW50YXRpb249IjEiIHRpZmY6WFJlc29sdXRpb249IjMwMDAwMDAvMTAwMDAiIHRpZmY6WVJlc29sdXRpb249IjMwMDAwMDAvMTAwMDAiIHRpZmY6UmVzb2x1dGlvblVuaXQ9IjIiIGV4aWY6Q29sb3JTcGFjZT0iMSIgZXhpZjpQaXhlbFhEaW1lbnNpb249IjMwMCIgZXhpZjpQaXhlbFlEaW1lbnNpb249IjMwMCI+IDx4bXBNTTpIaXN0b3J5PiA8cmRmOlNlcT4gPHJkZjpsaSBzdEV2dDphY3Rpb249ImNyZWF0ZWQiIHN0RXZ0Omluc3RhbmNlSUQ9InhtcC5paWQ6ZDA4MDI4MDItMzUyYS04NTRhLTkxYjctNmRlNmQ1MmViM2QwIiBzdEV2dDp3aGVuPSIyMDIyLTAyLTIyVDIxOjIxOjQ1KzA4OjAwIiBzdEV2dDpzb2Z0d2FyZUFnZW50PSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOSAoV2luZG93cykiLz4gPHJkZjpsaSBzdEV2dDphY3Rpb249InNhdmVkIiBzdEV2dDppbnN0YW5jZUlEPSJ4bXAuaWlkOjQwNjg2NzJkLWY5NDMtOTU0Mi1iMDBiLTVlMDExNmE1NmIzZSIgc3RFdnQ6d2hlbj0iMjAyNC0wMS0xM1QxMDoyNjoxNiswODowMCIgc3RFdnQ6c29mdHdhcmVBZ2VudD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTkgKFdpbmRvd3MpIiBzdEV2dDpjaGFuZ2VkPSIvIi8+IDxyZGY6bGkgc3RFdnQ6YWN0aW9uPSJzYXZlZCIgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDphYmJkZmUyZC0xY2Q2LTJiNDgtYjUyNS05YzlhZjdlNjA4NDMiIHN0RXZ0OndoZW49IjIwMjQtMDEtMTNUMTE6MjM6NDArMDg6MDAiIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkFkb2JlIFBob3Rvc2hvcCBDQyAyMDE5IChXaW5kb3dzKSIgc3RFdnQ6Y2hhbmdlZD0iLyIvPiA8cmRmOmxpIHN0RXZ0OmFjdGlvbj0iY29udmVydGVkIiBzdEV2dDpwYXJhbWV0ZXJzPSJmcm9tIGFwcGxpY2F0aW9uL3ZuZC5hZG9iZS5waG90b3Nob3AgdG8gaW1hZ2UvcG5nIi8+IDxyZGY6bGkgc3RFdnQ6YWN0aW9uPSJkZXJpdmVkIiBzdEV2dDpwYXJhbWV0ZXJzPSJjb252ZXJ0ZWQgZnJvbSBhcHBsaWNhdGlvbi92bmQuYWRvYmUucGhvdG9zaG9wIHRvIGltYWdlL3BuZyIvPiA8cmRmOmxpIHN0RXZ0OmFjdGlvbj0ic2F2ZWQiIHN0RXZ0Omluc3RhbmNlSUQ9InhtcC5paWQ6YTQ5MjM5MDAtNDhiZC03YTQ1LWI4NGItYmVlZTVjOWUxYTM1IiBzdEV2dDp3aGVuPSIyMDI0LTAxLTEzVDExOjIzOjQwKzA4OjAwIiBzdEV2dDpzb2Z0d2FyZUFnZW50PSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOSAoV2luZG93cykiIHN0RXZ0OmNoYW5nZWQ9Ii8iLz4gPHJkZjpsaSBzdEV2dDphY3Rpb249InNhdmVkIiBzdEV2dDppbnN0YW5jZUlEPSJ4bXAuaWlkOmVkMDFmMzVkLTlkYzgtNDAwYi1hMjJkLTYzOThmYjc1YTRkYiIgc3RFdnQ6d2hlbj0iMjAyNC0wMS0xM1QxOTowOTo0MCswODowMCIgc3RFdnQ6c29mdHdhcmVBZ2VudD0iQWRvYmUgUGhvdG9zaG9wIDIyLjAgKE1hY2ludG9zaCkiIHN0RXZ0OmNoYW5nZWQ9Ii8iLz4gPC9yZGY6U2VxPiA8L3htcE1NOkhpc3Rvcnk+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOmFiYmRmZTJkLTFjZDYtMmI0OC1iNTI1LTljOWFmN2U2MDg0MyIgc3RSZWY6ZG9jdW1lbnRJRD0iYWRvYmU6ZG9jaWQ6cGhvdG9zaG9wOjM2ZGQ4NTQxLWQ0MWEtYmY0Yy1iZjA3LWNmNjZhNjZhMDg2MSIgc3RSZWY6b3JpZ2luYWxEb2N1bWVudElEPSJ4bXAuZGlkOmQwODAyODAyLTM1MmEtODU0YS05MWI3LTZkZTZkNTJlYjNkMCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pm30U/gAAAAJcEhZcwAALiMAAC4jAXilP3YAAAA/UExURUdwTODg4O3t7e7u7unp6d7e3uTk5M/Pz8nJyePj4+jo6Pj4+MrKyszMzO7u7unp6fb29vLy8vr6+v7+/sHBweag3xAAAAAOdFJOUwAxia5pF0n+/vzX3KbULQ2DYQAACG1JREFUeNrtm4l2o7gShi20IWFrAd7/WUc7EosDWKZ976Hc7WTmdMKXv0qlqpLyeNx222233Xbbbbfddtv/mOHn8xexSNsiRH5PrbFtW4p+DetpsF4v8Gs+HA3WEwOAfwzriYxaLTVsP8X1QK0z+vqQCzewYogi60aL9SEX5oyxphYVCFTGjfSJCTmN1jBruN5KTGCUS8bhySQGHRaohmW4glwtldbOeYJYKlgvbyUuA8aFFEKc++aIM4hrRnyiMnIZKq1PrihcM3GNKboMF1Naa9X9+8T1KrxIlVbGjv3cAEHOYYMqqgUsVuJqqehV3+sjDwB+DTJp0lYtMCyZpxqjF4e+74+sRcQSFZO8UonUSEFzuUY+DKo59A2kZDatGCjzCauy/2AmhSyCq0WHEj0KTNJDmVeNhErMt1Q8W4xti4/FwMJ4jaxl05TKFiNtD3kBGrHnhiph9V0eXQc6DkyE2xX830AlKshFTErXeuCZXK/9m41wFsGSfZ4lcGeyZ98PrylJ7MWCojQZ3qSukL2QslgdngqJnTEPdTJhXvbNBoR/+7wabIxWduN/Ja5dWEivm4XSZ2uQckNzmRlHrn2lc6eiafvS4V2Hd12tesau8toZW0CtWoZYb9t+OqxdCYKYjVPF16pVbILIy/gR7MVaWMHYPCoa2VkzkX4Iry2rirXbumGyAjGC1h62YLw6ApsNKZph3fpIWHt08JovRWD62sejpXhTrhWrPpl6zZ6PW2oTG5ltlvgtF6weNYCWKeJJSfg4W6PNJlj3sVZgOXV4lc8n4RlkMTLEBDVoYc3nI09kpyzzfgWsjyzBZSNDKF2/wjh+sxYvn8Y1scxlfLF9T1RBO3wVHsnq8Fk4oGkEh/0KJPSa8T2CeWE5X9BPmgLsaRIGeNL2kshCsWoLBmdPJW5Wbz1ndAKUXjPwxXYAUpSV3fy5BJg1aa1tyVXHHMgVH31ewDVrleHr9XqC684SUF4mecR3+wW5SC2QNvxUizRv98mLDhPgYiMDb+v8g0OADxqxcnf9w01mZYJF0fUVP5LcdswbsMmy1DVs5PlE5NpNiTR8M8qAWZkOy6aN13VcoOF2/s3xn3Mes8Xza05tgR/BuNz69nlNzMR0fH45p+G4R9oxh2mKt9MF4J7K/lvWUojwF5nCgCpuRUptnZMQ3au0nSo2UsHgV3xpmeLYzGml3ZFBBzYGPCpOQRwXs1/GG1J74dlZc6JKUOtjBAz9XjVxucGWHbZVJDPJQGYDRl1Qmf1ovk2Sbghb6MQlnF7mBzM1bgOqJAPpoOQaVe+4Skcit3uqHMyG/Sh1rHNN0gAfM0nnPrmulfLVBSm20TSZSdWa0LJl2ukVyE4vTYCgP3uQkwv1TKtQWgxDzBSg80OQjCs4klKvuUzHLCfIbDKIE/S5VIGqD1iD2819pkAqTWdmeina+oZABi7X5B1MGoTJqJSchuk6JNHcgUPAcsVFk0+N0oDN68Vo7FQSmCXjx46OEtUk1lpY2ZFQGr/AcpqVato4wPUD+RhfAeyQI5sJ6l2sDwnKqNFSJvpiyJbFl3kTOjZ2ievwCR7hkUoWeV2vOLAXvB39AJoyqYa81A5cvaAidXYTFTycKDBcalVK5f3XS89kzLVl9txfL+K+p6NUnitz5KkKm7D3DrRPNq4bk7l20aFRppNilmuQI+uzTtj9wPBkTsVwM7HbJ5pwGgujyRyZDzQLNoiRFluRtQ+GzEguqRxUL+ZMFqulMzIfaP3ARj2k/txB8c+2HyjmDizCaVWtNoE5MvMlKs/4VQ7HUJZCrU6qCKcNJ2aSWUZhJZu4VI0LB4CHFdj77DRuGi28WKAxoRyZyzGVrmc0jmk1nP5QaxZo1puqq1YIAqgZb8e/rABZJWNCNxV7DSTpOO7Aail9J9nYHtua/4ouE/aS0X1qtXQzwGx+rnbi2vhF/TfZG52oc6DPo1WCi3RTDnRk7TEntoEp38gg+DjYs2opkR3JW5EpL9rU0XSK5/6LOTAVS+72x7pm60zSf5HMdldjhzJqw1FRcxXdS3ZNZp0s92FiyluUvBPoD9ynZNkBiu2NF11ofnlnQbZgKqvusj9R/f6DOzgVsahbNlXxlsxU8y7qrbTupitRyxFBKG6H3aEPUqj7YrzAymq41FXlZLlO4WLbvG2Kg4vYB+wPfWS2B5Rq8TW9ROpAZbiF6MmCTsx1NLLsx7NOoOiZup2CNbZ36xc96ErcxzuILGrmmFhimjtwKo/yTm7feTVwB61IzbnW4967Kt3cDDotGt8JKrTiUyO3Uy2PZZt9tapXEfXhWmTgcoB+JchFWsiCKvYnhmn/tKuJDbgly897FnFfkE1rQLKy810OU7xW3bEJHCD5gERtuTGuxoJqA6qI9TNMa6MbvZomsiubbPYx78YXDaaRqqsyqfSaLZdjYGHLu65rDgydXCWm1P5EvcQ828f9pcBapTILSMv1nZCAc0WzFIFsGfUi/kmAxc6cFqDSYuPSMIbs1OVrwITTQM9HVRFJ5JL56qcoFzzT1uVcd2v9jFw8BHlcWtmEI86hp5Dy/zOlK8cUp/rVseRUBqawz6kmAcPLM9l5m8h4V53Iz/2mFJaTCvF8JbsMvPjU/7crbUXart0v4WyE0LnDPcAX95Knj4VUE8HCdNdUP8BDcOXKdPl4uSWbh4LfOV0HDdfipOmu+eIRrDsNPkIT7np/8ZAzVdOd1u8wHIqeXt8VqtgiO50ePeNaGG+uO9rHiKdL71pnIun8jxEKXv2r2HYBzO/mz96vFKoMM5WLk7tQXS9U5kwCu5lk7n6++kdCFWRaTUzm0/5fClWGWTrM/AGhCrJO/ZBQhTPFLwmV7ebgcdttt91222233Xbbbf+H9h+2WEtdHVinLAAAAABJRU5ErkJggg==", + base64Error: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAMAAAAL34HQAAALeGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNi4wLWMwMDIgNzkuMTY0NDg4LCAyMDIwLzA3LzEwLTIyOjA2OjUzICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0RXZ0PSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VFdmVudCMiIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczpwaG90b3Nob3A9Imh0dHA6Ly9ucy5hZG9iZS5jb20vcGhvdG9zaG9wLzEuMC8iIHhtbG5zOnRpZmY9Imh0dHA6Ly9ucy5hZG9iZS5jb20vdGlmZi8xLjAvIiB4bWxuczpleGlmPSJodHRwOi8vbnMuYWRvYmUuY29tL2V4aWYvMS4wLyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOSAoV2luZG93cykiIHhtcDpDcmVhdGVEYXRlPSIyMDIyLTAyLTIyVDIxOjIxOjQ1KzA4OjAwIiB4bXA6TWV0YWRhdGFEYXRlPSIyMDI0LTAxLTEzVDE5OjEwOjEwKzA4OjAwIiB4bXA6TW9kaWZ5RGF0ZT0iMjAyNC0wMS0xM1QxOToxMDoxMCswODowMCIgZGM6Zm9ybWF0PSJpbWFnZS9wbmciIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MTQ3NTExNjAtZDY5MC00ZTkzLWFhNGUtNGMwYTViNGU1ZGFjIiB4bXBNTTpEb2N1bWVudElEPSJhZG9iZTpkb2NpZDpwaG90b3Nob3A6YzRiNzlkYWMtZTJmYS1iNzQ0LWIxM2ItOWU1N2VjMDhhM2YwIiB4bXBNTTpPcmlnaW5hbERvY3VtZW50SUQ9InhtcC5kaWQ6ZDA4MDI4MDItMzUyYS04NTRhLTkxYjctNmRlNmQ1MmViM2QwIiBwaG90b3Nob3A6Q29sb3JNb2RlPSIzIiBwaG90b3Nob3A6SUNDUHJvZmlsZT0ic1JHQiBJRUM2MTk2Ni0yLjEiIHRpZmY6T3JpZW50YXRpb249IjEiIHRpZmY6WFJlc29sdXRpb249IjMwMDAwMDAvMTAwMDAiIHRpZmY6WVJlc29sdXRpb249IjMwMDAwMDAvMTAwMDAiIHRpZmY6UmVzb2x1dGlvblVuaXQ9IjIiIGV4aWY6Q29sb3JTcGFjZT0iMSIgZXhpZjpQaXhlbFhEaW1lbnNpb249IjMwMCIgZXhpZjpQaXhlbFlEaW1lbnNpb249IjMwMCI+IDx4bXBNTTpIaXN0b3J5PiA8cmRmOlNlcT4gPHJkZjpsaSBzdEV2dDphY3Rpb249ImNyZWF0ZWQiIHN0RXZ0Omluc3RhbmNlSUQ9InhtcC5paWQ6ZDA4MDI4MDItMzUyYS04NTRhLTkxYjctNmRlNmQ1MmViM2QwIiBzdEV2dDp3aGVuPSIyMDIyLTAyLTIyVDIxOjIxOjQ1KzA4OjAwIiBzdEV2dDpzb2Z0d2FyZUFnZW50PSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOSAoV2luZG93cykiLz4gPHJkZjpsaSBzdEV2dDphY3Rpb249InNhdmVkIiBzdEV2dDppbnN0YW5jZUlEPSJ4bXAuaWlkOjQwNjg2NzJkLWY5NDMtOTU0Mi1iMDBiLTVlMDExNmE1NmIzZSIgc3RFdnQ6d2hlbj0iMjAyNC0wMS0xM1QxMDoyNjoxNiswODowMCIgc3RFdnQ6c29mdHdhcmVBZ2VudD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTkgKFdpbmRvd3MpIiBzdEV2dDpjaGFuZ2VkPSIvIi8+IDxyZGY6bGkgc3RFdnQ6YWN0aW9uPSJzYXZlZCIgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDpjZjk1NTE1OC04MjFiLTA4NDUtYWJmNS05YTE1NGM1ZTY4NjEiIHN0RXZ0OndoZW49IjIwMjQtMDEtMTNUMTE6MDQ6MDQrMDg6MDAiIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkFkb2JlIFBob3Rvc2hvcCBDQyAyMDE5IChXaW5kb3dzKSIgc3RFdnQ6Y2hhbmdlZD0iLyIvPiA8cmRmOmxpIHN0RXZ0OmFjdGlvbj0iY29udmVydGVkIiBzdEV2dDpwYXJhbWV0ZXJzPSJmcm9tIGFwcGxpY2F0aW9uL3ZuZC5hZG9iZS5waG90b3Nob3AgdG8gaW1hZ2UvcG5nIi8+IDxyZGY6bGkgc3RFdnQ6YWN0aW9uPSJkZXJpdmVkIiBzdEV2dDpwYXJhbWV0ZXJzPSJjb252ZXJ0ZWQgZnJvbSBhcHBsaWNhdGlvbi92bmQuYWRvYmUucGhvdG9zaG9wIHRvIGltYWdlL3BuZyIvPiA8cmRmOmxpIHN0RXZ0OmFjdGlvbj0ic2F2ZWQiIHN0RXZ0Omluc3RhbmNlSUQ9InhtcC5paWQ6ZGM1Y2IyNWItZDZlNC0yZjQ2LTgyODQtZmUwOTNlY2M2ZTkxIiBzdEV2dDp3aGVuPSIyMDI0LTAxLTEzVDExOjA0OjA0KzA4OjAwIiBzdEV2dDpzb2Z0d2FyZUFnZW50PSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOSAoV2luZG93cykiIHN0RXZ0OmNoYW5nZWQ9Ii8iLz4gPHJkZjpsaSBzdEV2dDphY3Rpb249InNhdmVkIiBzdEV2dDppbnN0YW5jZUlEPSJ4bXAuaWlkOjE0NzUxMTYwLWQ2OTAtNGU5My1hYTRlLTRjMGE1YjRlNWRhYyIgc3RFdnQ6d2hlbj0iMjAyNC0wMS0xM1QxOToxMDoxMCswODowMCIgc3RFdnQ6c29mdHdhcmVBZ2VudD0iQWRvYmUgUGhvdG9zaG9wIDIyLjAgKE1hY2ludG9zaCkiIHN0RXZ0OmNoYW5nZWQ9Ii8iLz4gPC9yZGY6U2VxPiA8L3htcE1NOkhpc3Rvcnk+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOmNmOTU1MTU4LTgyMWItMDg0NS1hYmY1LTlhMTU0YzVlNjg2MSIgc3RSZWY6ZG9jdW1lbnRJRD0iYWRvYmU6ZG9jaWQ6cGhvdG9zaG9wOjM2ZGQ4NTQxLWQ0MWEtYmY0Yy1iZjA3LWNmNjZhNjZhMDg2MSIgc3RSZWY6b3JpZ2luYWxEb2N1bWVudElEPSJ4bXAuZGlkOmQwODAyODAyLTM1MmEtODU0YS05MWI3LTZkZTZkNTJlYjNkMCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Ph2LDQsAAAAJcEhZcwAACxMAAAsTAQCanBgAAAA5UExURUdwTNra2s7Ozq2tre3t7dPT087OzuPj4+3t7dbW1u/v79bW1vz8/MrKytDQ0Nzc3MPDw/X19bi4uMZQDnEAAAAKdFJOUwBqEPywotz+wzqApqiTAAAHW0lEQVR42u1b25akIAwcbx2UFoj//7HLTQVBRcSZfTDnbM/uTl/KSlEkwf75eeONN95444033njjjTduR9/0/yOsbqoevObL7101tYX1HFs9QFtfZalRP+rpQVgdAFx990ZnT8L6eZItUl99jeGpf1DxdV/VP9fV1f/PFlF1bYHoVFSRC60IyVjrFRnuB8IoxpExSrstsErKHpJw1eqybNLbAQvAYkKjUrjoBgKRqAaeIjG5+qaps6hKcMWmcdSwqAJWBbAgCZZaIYbsqggqqlHNbFFa5yVR4jKvrKEErOEjNCqNSwHrfE8lpLsod/u+cOPPMPBJ+Gz5dM0cXNgclre+pSxhYI1WW5Tf9ENSMIdLCiWs6q9hwQprBVYKFqyPlx4WtoSvrT9lC/wkGt8qlkQooC3hi6sgW3Bb8gtdpSV/za/mn49pC0oYhONbfyd5hzDLFivKFpTS1gKM0we0tQCEncfgQn7Rt+DC/299i1MSRJcBC0r7VviG5KZvwV5WIUobxHyrJKy8VRjXVgFYsPu5kOtbxdhycCDuihziXVLoW7xwEiUmDgd544B46luWLW+nugMLB2BimmC3cxTNxCDg8xFtuUSNqoFsDKzY8psa+XtBNWXr74N6qxwsS5T6VL5robKl10+ZRu5S9qBvUYuJwVHzjwjrE3G33qKh+WXBgmkmCvHYquTvZ8oo7rLFA4PJgYW0MdePIRQIGUPNbSMw5lubJMKtJI6+Wk6cVFMmACO+VVryeL7ZgI8MhwS2fnNPPK0geHBRd11eJSiyL4KjrL2umm1XIpRii1MKB/mU/iCZwF+pt5z3UJ7UiF3nQqadAXC3T3xEW2IyuDBe3yDTe0+A64it2WTyYSGVHymUI/EduvSWKJ80Dtv2NbYSoQxbMkVC7yzNGIWFvDF7gRD79RYrWW/BDGti4wwLtgvO7gWKUZ8Mt94qX8vLJE70+xVNwzDm9ghNM+FX7p/jlZUId2HJD+Tf79hMe3WNrAK/30E+C8/6xOCqbqxE5JNMYrNbnaLUvJAewfCg8zF0Ba/tbviWLvPYfsGFA1PVD8ZdnjlVc/DS/o7LK4NHjOjKKbfCTSCo5XmwKbaZM4jlc9NGEYd9Ijd0QS5ZGaOR2O+DPlGyRb2nXZzgnI1GdFWF+0gh3ifyTRqvzpXI2eElk58FeHziCF5hY+hSMV9Ge/mohUTGuQ4vzHYe8bW5sNdFQ58St22Vcf5zzJbtcGT4iYQ7iz8dFuxoWRYMjAM7KCnypHOTLSqdUwYIFpndOD/6B2FBzNQxYmW/zxYE4j8yLHga1s2Rbm/O5PXtGcuNDIW1dTj5hpjGsO+7z2Kk9NP1JWDlnWKAM4H6zCUNM05KyVPHBclYzUbgjE3N3tP2JWHBmbqD4GLeCs2jhMT13lMVljwcEbetwZgtHUxVQ21ho3fE7inf2s8vzMWq0EWpfOBg5hcDSGwaF2+LaysRIzNFqRgBv2sMhi/Ix0WiW8rBKNBv4ExBI7eorx9ANazsPCb5FkSNH+Reacos+AYxaFzX76KMH65c8ytzZ40YvpFAqtgC/otn1eCmMI5K8yVRQVVwq3aVtU+jJktwjyP7x+BKv8vtoH098vXYSJcrWGJcAW11r8WVRxe5vgcuFbXqwnaEZejS6mrLwYKUg1ch2RJswTFYgMOwoau+AQsSp/FuDhVZi7J402ifgGla/GJIzGLYG5H4rnKMCUydL9wcsmZSuPikR2QmjQbWqaV2ob2RdMvaLEvFlRiXpYeTwqVOtMZF+qi0dS4uEjJKMvWuYK3S0jHZwaq7BylYp/O2uu3q04lNqudLWEJQd/3paTBz12IaLIPtzE5P1AUuW9TB8NVzaG9/TIfV+eXsWeezz6HWlptEbo4SIAeWur/Y/RZC/gmZTiLzUY2j5ct6fjKsFvxqgyQxE9sbmfYtnJMIciEKo6+FL0wziJmtkzspIcUl0PgWrL7VCKP7hl61U4WLeN+7Ieli2vZhmq0VgjDOgIyhJ62sSpDkWNZa1wiB8WoLlxzy29XpGVPgn1ut5VYcGyRLK7OCiJaDYMrAneJUkZWdw0yDgNm5nDowqLc0Kp581FO7QS4pC9S/YRW9xkVdNOj0ZHCp9anEZw3VEK/fopiDrkMObkcdJtT1g6+uzQ60bIdUPztdWZWy53m+v/zFYPOGHO4AZsalmtJNkyHrCAx1RXX7mt5g1L1pDezpkXv8wJwpVRSSaf2c26Y0rrXXxyWBptu/ovdak+VhkqjGBZUdvKygqANKA/MqZ/36kcGwFn90RnWp66ksKuHgitLFY8BU+F2ZvqpxpMY9qR3YwOUJ12fc0KUHVKdswcKXuwetErCnwvMKuXxfc/3RVJ2yFc+iosQd3X+WGSVz1UiuN2J156FyVyHbsOUp3krezaPUT/VxXqdfwvknb/Zgp+idTxTbrkLqYuKreRnhy65Gf4W0NsDoYiqf6uZsvr8V9eo6XWc5+3TVf/3N1TfeeOONN95444033njjjTfeSI1/IeOYOeO4fGAAAAAASUVORK5CYII=", + base64BackToTop: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADIBAMAAABfdrOtAAAAElBMVEVRUVH+/v5HcEyZmZlRUVFRUVGm1ByOAAAABnRSTlPMzADMTZAJBBGsAAAEnElEQVR42t2cS27jMAyGf7/2U+QCQeDsbeQCgZDujaC5/1UmkzaJn+JDFGcw3LdfflKibJkkDnxrL7dbg7sNt6+L4O8OYBM+B0ys+QrGkHZG+OEEQ8g6go8Bx1GIGMdpNOQyIG6XdMgnSPtKhLQDGEZFBgYMkhKFtGBb0EIEjDgFRowoBVaMGAWpMedEfxMiZtwpUsgZCqtlkCNUdpVAWigtCCCDFtLwIWeoreZCWiRYYEKGFEjDg+yRZCUH0iLRAgNyToXUNCRZyMqWhGnUN2IPm3wSlwJ7IUspyCBkIQUZhCykIIeQuRTkEDKXAuM9srrtYbrZN7Y98giZSoFd+t1OxmMITG0dcrSFXFchZ1tIvQZpYWxhBbK3hpQrkMEa0iwh5t4a+QvZvDXyF7J5a+Qv5PPW21/I5623v5DPW29/IaO3Xv5Clrw1y1/Ikrdm+Qs5svw83yNnSJ5BQb4F/F7EIEJSnThGBAXxkFQfLOviQUE8JAUPsosHBfGQfDAtHhREQ1JxIV00KIgmrnRI84S0yAd5BAXxxJUck0f6Qnwr9qmr6xF5xLMjcwn/iudIEAdWnyjkEXlQKZiRVzoqRyLbgeUKKR8Q4alY7cSnoxzSf2ggsqehKr6YVpcXpOd7H93f60cKhOd7Re2LteUF4eLqiVS1mr0ge4io6C2+soaFkJ7MuuuQs1yITEp9hwwKISIpzR2iESKSIoT0rLNwuVHQqoSIpAQJpGce60vIUSdEIuUqgPTsJ5QFZK8UIpBS8iG94GFrDjlrhfCl8CG96Llxmle4kEr6vKWBPIVo9kqDQSRk9/3cWoikcCFPAd33v4dIChPyEvLzBA6RlEYWke4JEUnhKXkLeUEKxRHJFfKCQHGucIW8IdZSRkLeEGMpYyEjiK2UsZARxFTKRMgYYillImQMMZQyFTKB2EmZCplAuFLIHT8TMoWwpQwiIVMIUwqpZP5bp5CCvCTiQKr5f5lCQN+tPCBn2ZvVDFJwIDUP0m1BYAfZYRNSsCB7BqTbhoARePIxtZ9tgwWkoJcwCalmv3MBAemtO4R6dah2HaKQqj8Zvp9sQDjvJ21+SPCBHPJDDk6QITekEV7gqCC19CpKAym9IMfckKv4olMBCeIrWwVEfvkshzQekO9r9P1/ALk+IG1eSPCDiCJfyG+FyU+A6ZCa/piZDinpz7LpkCv5gdkAEshP5emQhv7onw6pGeULyZCSUYiRDAmMkpJkCKs4JhFSq8p8hJBSVbAkhARV6ZUQoisik0FqXTmcDHLVFfbJIEFXoiiCNMpiSxGkVJaNiiBBWQArgTTaUl4JpNQWJUsgQVteXQg+AKkLxQWFGKW+5J2+eVp4S168X3CF1CltCKdTJ8lb84YK2bUBO+wZW0Pqv9nk4tKu49N45NJC5dMM5tLW5tOg59Jq6NM06dL+abFXwr/RkuvTXJwae1abtE/Dt0/ruksTvs84AZ/BCC4jHnyGVfiM3VBQFANEXEah+Ax18RlP4zNox2dkkM/wI58xTn8yDCXGYCDV3W5RGSajtXyGhG1jbpbjzpwGt/0MJft8jqC7iUbQ/QZaxdnKqcIftwAAAABJRU5ErkJggg==" +}; +exports.zStatic = zStatic; +//# sourceMappingURL=../../../../../../.sourcemap/mp-weixin/uni_modules/z-paging/components/z-paging/js/z-paging-static.js.map diff --git a/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/js/z-paging-utils.js b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/js/z-paging-utils.js new file mode 100644 index 0000000..28ceae7 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/js/z-paging-utils.js @@ -0,0 +1,238 @@ +"use strict"; +const common_vendor = require("../../../../../common/vendor.js"); +const uni_modules_zPaging_components_zPaging_config_index = require("../config/index.js"); +const uni_modules_zPaging_components_zPaging_js_zPagingConstant = require("./z-paging-constant.js"); +const storageKey = "Z-PAGING-REFRESHER-TIME-STORAGE-KEY"; +let config = null; +let configLoaded = false; +let cachedSystemInfo = null; +const timeoutMap = {}; +function gc(key, defaultValue) { + return () => { + _handleDefaultConfig(); + if (!config) + return defaultValue; + const value = config[key]; + return value === void 0 ? defaultValue : value; + }; +} +function getTouch(e) { + let touch = null; + if (e.touches && e.touches.length) { + touch = e.touches[0]; + } else if (e.changedTouches && e.changedTouches.length) { + touch = e.changedTouches[0]; + } else if (e.datail && e.datail != {}) { + touch = e.datail; + } else { + return { touchX: 0, touchY: 0 }; + } + return { + touchX: touch.clientX, + touchY: touch.clientY + }; +} +function getTouchFromZPaging(target) { + if (target && target.tagName && target.tagName !== "BODY" && target.tagName !== "UNI-PAGE-BODY") { + const classList = target.classList; + if (classList && classList.contains("z-paging-content")) { + return { + isFromZp: true, + isPageScroll: classList.contains("z-paging-content-page"), + isReachedTop: classList.contains("z-paging-reached-top"), + isUseChatRecordMode: classList.contains("z-paging-use-chat-record-mode") + }; + } else { + return getTouchFromZPaging(target.parentNode); + } + } else { + return { isFromZp: false }; + } +} +function getParent(parent) { + if (!parent) + return null; + if (parent.$refs.paging) + return parent; + return getParent(parent.$parent); +} +function consoleErr(err) { + common_vendor.index.__f__("error", "at uni_modules/z-paging/components/z-paging/js/z-paging-utils.js:73", `[z-paging]${err}`); +} +function delay(callback, ms = uni_modules_zPaging_components_zPaging_js_zPagingConstant.c.delayTime, key) { + const timeout = setTimeout(callback, ms); + if (!!key) { + timeoutMap[key] && clearTimeout(timeoutMap[key]); + timeoutMap[key] = timeout; + } + return timeout; +} +function setRefesrherTime(time, key) { + const datas = getRefesrherTime() || {}; + datas[key] = time; + common_vendor.index.setStorageSync(storageKey, datas); +} +function getRefesrherTime() { + return common_vendor.index.getStorageSync(storageKey); +} +function getRefesrherTimeByKey(key) { + const datas = getRefesrherTime(); + return datas && datas[key] ? datas[key] : null; +} +function getRefesrherFormatTimeByKey(key, textMap) { + const time = getRefesrherTimeByKey(key); + const timeText = time ? _timeFormat(time, textMap) : textMap.none; + return `${textMap.title}${timeText}`; +} +function convertToPx(text) { + const dataType = Object.prototype.toString.call(text); + if (dataType === "[object Number]") + return text; + let isRpx = false; + if (text.indexOf("rpx") !== -1 || text.indexOf("upx") !== -1) { + text = text.replace("rpx", "").replace("upx", ""); + isRpx = true; + } else if (text.indexOf("px") !== -1) { + text = text.replace("px", ""); + } + if (!isNaN(text)) { + if (isRpx) + return Number(rpx2px(text)); + return Number(text); + } + return 0; +} +function rpx2px(rpx) { + return common_vendor.index.upx2px(rpx); +} +function getSystemInfoSync(useCache = false) { + if (useCache && cachedSystemInfo) { + return cachedSystemInfo; + } + const infoTypes = ["DeviceInfo", "AppBaseInfo", "WindowInfo"]; + const { deviceInfo, appBaseInfo, windowInfo } = infoTypes.reduce((acc, key) => { + const method = `get${key}`; + if (common_vendor.index[method] && common_vendor.index.canIUse(method)) { + acc[key.charAt(0).toLowerCase() + key.slice(1)] = common_vendor.index[method](); + } + return acc; + }, {}); + if (deviceInfo && appBaseInfo && windowInfo) { + cachedSystemInfo = { ...deviceInfo, ...appBaseInfo, ...windowInfo }; + } else { + cachedSystemInfo = common_vendor.index.getSystemInfoSync(); + } + return cachedSystemInfo; +} +function getTime() { + return (/* @__PURE__ */ new Date()).getTime(); +} +function getInstanceId() { + const s = []; + const hexDigits = "0123456789abcdef"; + for (let i = 0; i < 10; i++) { + s[i] = hexDigits.substr(Math.floor(Math.random() * 16), 1); + } + return s.join("") + getTime(); +} +function wait(ms) { + return new Promise((resolve) => { + setTimeout(resolve, ms); + }); +} +function isPromise(func) { + return Object.prototype.toString.call(func) === "[object Promise]"; +} +function addUnit(value, unit) { + if (Object.prototype.toString.call(value) === "[object String]") { + let tempValue = value; + tempValue = tempValue.replace("rpx", "").replace("upx", "").replace("px", ""); + if (value.indexOf("rpx") === -1 && value.indexOf("upx") === -1 && value.indexOf("px") !== -1) { + tempValue = parseFloat(tempValue) * 2; + } + value = tempValue; + } + return unit === "rpx" ? value + "rpx" : value / 2 + "px"; +} +function deepCopy(obj) { + if (typeof obj !== "object" || obj === null) + return obj; + let newObj = Array.isArray(obj) ? [] : {}; + for (let key in obj) { + if (obj.hasOwnProperty(key)) { + newObj[key] = deepCopy(obj[key]); + } + } + return newObj; +} +function _handleDefaultConfig() { + if (configLoaded) + return; + if (uni_modules_zPaging_components_zPaging_config_index.zLocalConfig && Object.keys(uni_modules_zPaging_components_zPaging_config_index.zLocalConfig).length) { + config = uni_modules_zPaging_components_zPaging_config_index.zLocalConfig; + } + if (!config && common_vendor.index.$zp) { + config = common_vendor.index.$zp.config; + } + config = config ? Object.keys(config).reduce((result, key) => { + result[_toCamelCase(key)] = config[key]; + return result; + }, {}) : null; + configLoaded = true; +} +function _timeFormat(time, textMap) { + const date = new Date(time); + const currentDate = /* @__PURE__ */ new Date(); + const dateDay = new Date(time).setHours(0, 0, 0, 0); + const currentDateDay = (/* @__PURE__ */ new Date()).setHours(0, 0, 0, 0); + const disTime = dateDay - currentDateDay; + let dayStr = ""; + const timeStr = _dateTimeFormat(date); + if (disTime === 0) { + dayStr = textMap.today; + } else if (disTime === -864e5) { + dayStr = textMap.yesterday; + } else { + dayStr = _dateDayFormat(date, date.getFullYear() !== currentDate.getFullYear()); + } + return `${dayStr} ${timeStr}`; +} +function _dateDayFormat(date, showYear = true) { + const year = date.getFullYear(); + const month = date.getMonth() + 1; + const day = date.getDate(); + return showYear ? `${year}-${_fullZeroToTwo(month)}-${_fullZeroToTwo(day)}` : `${_fullZeroToTwo(month)}-${_fullZeroToTwo(day)}`; +} +function _dateTimeFormat(date) { + const hour = date.getHours(); + const minute = date.getMinutes(); + return `${_fullZeroToTwo(hour)}:${_fullZeroToTwo(minute)}`; +} +function _fullZeroToTwo(str) { + str = str.toString(); + return str.length === 1 ? "0" + str : str; +} +function _toCamelCase(value) { + return value.replace(/-([a-z])/g, (_, group1) => group1.toUpperCase()); +} +const u = { + gc, + setRefesrherTime, + getRefesrherFormatTimeByKey, + getTouch, + getTouchFromZPaging, + getParent, + convertToPx, + getTime, + getInstanceId, + consoleErr, + delay, + wait, + isPromise, + addUnit, + deepCopy, + rpx2px, + getSystemInfoSync +}; +exports.u = u; +//# sourceMappingURL=../../../../../../.sourcemap/mp-weixin/uni_modules/z-paging/components/z-paging/js/z-paging-utils.js.map diff --git a/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/wxs/z-paging-wxs.wxs b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/wxs/z-paging-wxs.wxs new file mode 100644 index 0000000..ed21959 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/wxs/z-paging-wxs.wxs @@ -0,0 +1,382 @@ +// [z-paging]微信小程序、QQ小程序、app-vue、h5上使用wxs实现自定义下拉刷新,降低逻辑层与视图层的通信折损,提升性能 + +var currentDis = 0; +var isPCFlag = -1; +var startY = -1; + +// 监听js层传过来的数据 +function propObserver(newVal, oldVal, ownerIns, ins) { + var state = ownerIns.getState() || {}; + state.currentIns = ins; + var dataset = ins.getDataset(); + var loading = dataset.loading == true; + // 如果是下拉刷新结束,更新transform + if (newVal && newVal.indexOf('end') != -1) { + var transition = newVal.split('end')[0]; + _setTransform('translateY(0px)', ins, false, transition); + state.moveDis = 0; + state.oldMoveDis = 0; + currentDis = 0; + } else if (newVal && newVal.indexOf('begin') != -1) { + // 如果是下拉刷新开始,更新transform + var refresherThreshold = ins.getDataset().refresherthreshold; + _setTransformValue(refresherThreshold, ins, state, false); + } +} + +// touch开始 +function touchstart(e, ownerIns) { + var ins = _getIns(ownerIns); + var state = {}; + var dataset = {}; + ownerIns.callMethod('_handleListTouchstart'); + if (ins) { + state = ins.getState(); + dataset = ins.getDataset(); + if (_touchDisabled(e, ins, 0)) return; + } + var isTouchEnded = state.isTouchEnded; + state.oldMoveDis = 0; + var touch = _getTouch(e); + var loading = _isTrue(dataset.loading); + state.startY = touch.touchY; + startY = state.startY; + state.lastTouch = touch; + if (!loading && isTouchEnded) { + state.isTouchmoving = false; + } + state.isTouchEnded = false; + // 通知js层touch开始 + ownerIns.callMethod('_handleRefresherTouchstart', touch); +} + +// touch中 +function touchmove(e, ownerIns) { + var touch = _getTouch(e); + var ins = _getIns(ownerIns); + var dataset = ins.getDataset(); + var refresherThreshold = dataset.refresherthreshold; + var refresherF2Threshold = dataset.refresherf2threshold; + var refresherF2Enabled = _isTrue(dataset.refresherf2enabled); + var isIos = _isTrue(dataset.isios); + var state = ins.getState(); + var watchTouchDirectionChange = _isTrue(dataset.watchtouchdirectionchange); + var moveDisObj = {}; + var moveDis = 0; + var prevent = false; + // 如果需要监听touch方向的改变 + if (watchTouchDirectionChange) { + moveDisObj = _getMoveDis(e, ins); + moveDis = moveDisObj.currentDis; + prevent = moveDisObj.isDown; + var direction = prevent ? 'top' : 'bottom'; + // 确保只在touch方向改变时通知一次js层,而不是touchmove中持续通知 + if (prevent == state.oldTouchDirection && prevent != state.oldEmitedTouchDirection) { + ownerIns.callMethod('_handleTouchDirectionChange', { direction: direction }); + state.oldEmitedTouchDirection = prevent; + } + state.oldTouchDirection = prevent; + } + // 判断是否允许下拉刷新 + if (_touchDisabled(e, ins, 1)) { + _handlePullingDown(state, ownerIns, false); + return true; + } + // 判断下拉刷新的角度是否在要求范围内 + if (!_getAngleIsInRange(e, touch, state, dataset)) { + _handlePullingDown(state, ownerIns, false); + return true; + } + moveDisObj = _getMoveDis(e, ins); + moveDis = moveDisObj.currentDis; + prevent = moveDisObj.isDown; + if (moveDis < 0) { + // moveDis小于0,将transform重置为0 + _setTransformValue(0, ins, state, false); + _handlePullingDown(state, ownerIns, false); + return true; + } + if (prevent && !state.disabledBounce) { + // 如果是用户下拉并且需要触发下拉刷新,需要通知js层将列表禁止滚动,防止在下拉刷新过程中列表也可以滚动导致的下拉刷新偏移过大的问题(在下拉刷新过程中仅通知一次) + ownerIns.callMethod('_handleScrollViewBounce', { bounce: false }); + state.disabledBounce = true; + _handlePullingDown(state, ownerIns, prevent); + return !prevent; + } + // 更新transform + _setTransformValue(moveDis, ins, state, false); + var oldRefresherStatus = state.refresherStatus; + var oldIsTouchmoving = _isTrue(dataset.oldistouchmoving); + var hasTouchmove = _isTrue(dataset.hastouchmove); + var isTouchmoving = state.isTouchmoving; + state.refresherStatus = moveDis >= refresherThreshold ? (refresherF2Enabled && moveDis > refresherF2Threshold ? 'goF2' : 'releaseToRefresh') : 'default'; + if (!isTouchmoving) { + state.isTouchmoving = true; + isTouchmoving = true; + } + if (state.isTouchEnded) { + state.isTouchEnded = false; + } + // 如果需要实时监听下拉位置偏移,则需要实时通知js层,此操作会使wxs层与js层频繁通信从而导致在一些性能较差设备中下拉刷新卡顿 + if (hasTouchmove) { + ownerIns.callMethod('_handleWxsPullingDown', { moveDis: moveDis, diffDis: moveDisObj.diffDis }); + } + // 在下拉刷新状态改变时通知js层 + if (oldRefresherStatus == undefined || oldRefresherStatus != state.refresherStatus || oldIsTouchmoving != isTouchmoving) { + ownerIns.callMethod('_handleRefresherTouchmove', moveDis, touch); + } + _handlePullingDown(state, ownerIns, prevent); + return !prevent; +} + +// touch结束 +function touchend(e, ownerIns) { + var touch = _getTouch(e); + var ins = _getIns(ownerIns); + var dataset = ins.getDataset(); + var state = ins.getState(); + if (state.disabledBounce) { + // 通知js允许列表滚动 + ownerIns.callMethod('_handleScrollViewBounce', { bounce: true }); + state.disabledBounce = false; + } + if (_touchDisabled(e, ins, 2)) return; + state.reachMaxAngle = true; + state.hitReachMaxAngleCount = 0; + state.fixedIsTopHitCount = 0; + if (!state.isTouchmoving) return; + var oldRefresherStatus = state.refresherStatus; + var oldMoveDis = state.moveDis; + var refresherThreshold = ins.getDataset().refresherthreshold; + var moveDis = _getMoveDis(e, ins).currentDis; + if (!(moveDis >= refresherThreshold && oldRefresherStatus === 'releaseToRefresh')) { + state.isTouchmoving = false; + } + // 通知js层touch结束 + ownerIns.callMethod('_handleRefresherTouchend', moveDis); + state.isTouchEnded = true; + if (oldMoveDis < refresherThreshold) return; + var animate = false; + if (moveDis >= refresherThreshold) { + moveDis = refresherThreshold; + animate = true; + } + _setTransformValue(moveDis, ins, state, animate); +} + +// #ifdef H5 +// 判断是否是pc平台 +function isPC() { + if (!navigator) return false; + if (isPCFlag != -1) return isPCFlag; + var agents = ["Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod"]; + isPCFlag = agents.every(function(item) { return navigator.userAgent.indexOf(item) < 0 }); + return isPCFlag; +} + +var movable = false; + +// 在pc平台监听mousedown、mousemove、mouseup等相关事件并转为对应touch事件处理,使得在pc平台也支持通过鼠标进行下拉刷新 + +function mousedown(e, ins) { + if (!isPC()) return; + touchstart(e, ins); + movable = true; +} + +function mousemove(e, ins) { + if (!isPC() || !movable) return; + touchmove(e, ins); +} + +function mouseup(e, ins) { + if (!isPC()) return; + touchend(e, ins); + movable = false; +} + +function mouseleave(e, ins) { + if (!isPC()) return; + movable = false; +} +// #endif + + +// 修改视图层transform +function _setTransformValue(value, ins, state, animate) { + value = value || 0; + if (state.moveDis == value) return; + state.moveDis = value; + _setTransform('translateY(' + value + 'px)', ins, animate, ''); +} + +// 设置视图层transform,直接在视图层操作下拉刷新,使得js层不需要频繁和视图层通信,从而大大提升下拉刷新性能 +function _setTransform(transform, ins, animate, transition) { + var dataset = ins.getDataset(); + if (_isTrue(dataset.refreshernotransform)) return; + transform = transform == 'translateY(0px)' ? 'none' : transform; + ins.requestAnimationFrame(function() { + var stl = { 'transform': transform }; + if (animate) { + stl['transition'] = 'transform .1s linear'; + } + if (transition.length) { + stl['transition'] = transition; + } + ins.setStyle(stl); + }) +} + +// 进一步处理下拉刷新的偏移数据 +function _getMoveDis(e, ins) { + var state = ins.getState(); + var refresherThreshold = parseFloat(ins.getDataset().refresherthreshold); + var refresherOutRate = parseFloat(ins.getDataset().refresheroutrate); + var refresherPullRate = parseFloat(ins.getDataset().refresherpullrate); + var touch = _getTouch(e); + var currentStartY = !state.startY || state.startY == 'NaN' ? startY : state.startY; + var moveDis = touch.touchY - currentStartY; + var oldMoveDis = state.oldMoveDis || 0; + state.oldMoveDis = moveDis; + // 获取当前下拉刷新位置与上次的偏移量 + var diffDis = moveDis - oldMoveDis; + if (diffDis > 0) { + // 对偏移量进行进一步处理,通过refresherPullRate等配置进行约束 + diffDis = diffDis * refresherPullRate; + if (currentDis > refresherThreshold) { + diffDis = diffDis * (1 - refresherOutRate); + } + } + // 控制diffDis过大的情况,比如进入页面突然猛然下拉,此时diffDis不应进行太大的偏移 + diffDis = diffDis > 100 ? diffDis / 100 : (diffDis > 20 ? diffDis / 2.2 : diffDis); + currentDis += diffDis; + currentDis = Math.max(0, currentDis); + return { + currentDis: currentDis, + diffDis: diffDis, + isDown: diffDis > 0 + }; +} + +// 获取经过统一格式包装的当前touch对象 +function _getTouch(e) { + var touch = e; + if (e.touches && e.touches.length) { + touch = e.touches[0]; + } else if (e.changedTouches && e.changedTouches.length) { + touch = e.changedTouches[0]; + } else if (e.datail && e.datail != {}) { + touch = e.datail; + } + return { + touchX: touch.clientX, + touchY: touch.clientY + }; +} + +// 获取当前currentIns +function _getIns(ownerIns) { + var ins = ownerIns.getState().currentIns; + if (!ins) { + ownerIns.callMethod('_handlePropUpdate'); + } + return ins; +} + +// 判断当前状态是否允许下拉刷新 +function _touchDisabled(e, ins, processTag) { + var dataset = ins.getDataset(); + var state = ins.getState(); + var loading = _isTrue(dataset.loading); + var useChatRecordMode = _isTrue(dataset.usechatrecordmode); + var refresherEnabled = _isTrue(dataset.refresherenabled); + var useCustomRefresher = _isTrue(dataset.usecustomrefresher); + var usePageScroll = _isTrue(dataset.usepagescroll); + var pageScrollTop = parseFloat(dataset.pagescrolltop); + var scrollTop = parseFloat(dataset.scrolltop); + var finalScrollTop = usePageScroll ? pageScrollTop : scrollTop; + var fixedIsTop = false; + // 是否要处理滚动到顶部scrollTop不为0时候的容错,为解决在安卓中scroll-view有概率滚动到顶部时scrollTop不为0导致下拉刷新判断异常,但此方案会导致某些情况(例如滚动到距离顶部10px处)下拉抖动,因此改为通过获取zp-scroll-view的节点信息中的scrollTop进行验证的方案 + var handleFaultTolerantMove = false; + if (handleFaultTolerantMove && finalScrollTop == (state.startScrollTop || 0) && finalScrollTop <= 105) { + fixedIsTop = true; + } + var fixedIsTopHitCount = state.fixedIsTopHitCount || 0; + if (fixedIsTop) { + fixedIsTopHitCount ++; + if (fixedIsTopHitCount <= 2) { + fixedIsTop = false; + } + state.fixedIsTopHitCount = fixedIsTopHitCount; + } else { + state.fixedIsTopHitCount = 0; + } + if (handleFaultTolerantMove && processTag === 0) { + state.startScrollTop = finalScrollTop || 0; + } + if (handleFaultTolerantMove && processTag === 2) { + fixedIsTop = true; + } + return loading || useChatRecordMode || !refresherEnabled || !useCustomRefresher || + ((usePageScroll && useCustomRefresher && pageScrollTop > 5) && !fixedIsTop) || + ((!usePageScroll && useCustomRefresher && scrollTop > 5) && !fixedIsTop); +} + +// 判断下拉刷新的角度是否在要求范围内 +function _getAngleIsInRange(e, touch, state, dataset) { + var maxAngle = dataset.refreshermaxangle; + var refresherAecc = _isTrue(dataset.refresheraecc); + var lastTouch = state.lastTouch; + var reachMaxAngle = state.reachMaxAngle; + var moveDis = state.oldMoveDis; + if (!lastTouch) return true; + if (maxAngle >= 0 && maxAngle <= 90 && lastTouch) { + // 考虑下拉刷新手势由水平移动转为垂直方向移动的情况,此时不应当只判断垂直方向角度是否符合要求,应当直接禁止以避免在swiper中使用下拉刷新时,横向切换swiper途中手未离开屏幕还可以下拉刷新的问题 + if ((!moveDis || moveDis < 1) && !refresherAecc && reachMaxAngle != null && !reachMaxAngle) return false; + var x = Math.abs(touch.touchX - lastTouch.touchX); + var y = Math.abs(touch.touchY - lastTouch.touchY); + var z = Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2)); + if ((x || y) && x > 1) { + // 获取下拉刷新前后两次位移的角度 + var angle = Math.asin(y / z) / Math.PI * 180; + if (angle < maxAngle) { + // 如果角度小于配置要求,则return,同时通过hitReachMaxAngleCount控制角度判断的灵敏程度以最大程度兼容各种使用场景 + var hitReachMaxAngleCount = state.hitReachMaxAngleCount || 0; + state.hitReachMaxAngleCount = ++hitReachMaxAngleCount; + if (state.hitReachMaxAngleCount > 2) { + state.lastTouch = touch; + state.reachMaxAngle = false; + } + return false; + } + } + } + state.lastTouch = touch; + return true; +} + +// 进一步处理是否在下拉刷新并通知js层 +function _handlePullingDown(state, ins, onPullingDown) { + var oldOnPullingDown = state.onPullingDown || false; + if (oldOnPullingDown != onPullingDown) { + ins.callMethod('_handleWxsPullingDownStatusChange', onPullingDown); + } + state.onPullingDown = onPullingDown; +} + +// 判断js层传过来的值是否为true +function _isTrue(value) { + value = (typeof(value) === 'string' ? JSON.parse(value) : value) || false; + return value == true || value == 'true'; +} + +module.exports = { + touchstart: touchstart, + touchmove: touchmove, + touchend: touchend, + mousedown: mousedown, + mousemove: mousemove, + mouseup: mouseup, + mouseleave: mouseleave, + propObserver: propObserver +} diff --git a/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/z-paging.js b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/z-paging.js new file mode 100644 index 0000000..097b553 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/z-paging.js @@ -0,0 +1,329 @@ +"use strict"; +const uni_modules_zPaging_components_zPaging_js_zPagingMain = require("./js/z-paging-main.js"); +const common_vendor = require("../../../../common/vendor.js"); +const block0 = {}; +const block1 = (Component2) => { + if (!Component2.wxsCallMethods) { + Component2.wxsCallMethods = []; + } + Component2.wxsCallMethods.push("_handleListTouchstart", "_handleRefresherTouchstart", "_handleTouchDirectionChange", "_handleScrollViewBounce", "_handleWxsPullingDown", "_handleRefresherTouchmove", "_handleRefresherTouchend", "_handlePropUpdate", "_handleWxsPullingDownStatusChange"); +}; +if (!Array) { + const _component_z_paging_refresh = common_vendor.resolveComponent("z-paging-refresh"); + const _component_z_paging_load_more = common_vendor.resolveComponent("z-paging-load-more"); + const _easycom_z_paging_empty_view2 = common_vendor.resolveComponent("z-paging-empty-view"); + (_component_z_paging_refresh + _component_z_paging_load_more + _easycom_z_paging_empty_view2)(); +} +const _easycom_z_paging_empty_view = () => "../z-paging-empty-view/z-paging-empty-view.js"; +if (!Math) { + _easycom_z_paging_empty_view(); +} +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + return common_vendor.e({ + a: _ctx.cssSafeAreaInsetBottom === -1 + }, _ctx.cssSafeAreaInsetBottom === -1 ? {} : {}, { + b: _ctx.showF2 && _ctx.showRefresherF2 + }, _ctx.showF2 && _ctx.showRefresherF2 ? { + c: common_vendor.o(() => { + }), + d: common_vendor.s({ + "transform": _ctx.f2Transform, + "transition": `transform .2s linear`, + "height": _ctx.superContentHeight + "px", + "z-index": _ctx.f2ZIndex + }) + } : {}, { + e: !_ctx.usePageScroll && _ctx.zSlots.top + }, !_ctx.usePageScroll && _ctx.zSlots.top ? {} : _ctx.usePageScroll && _ctx.zSlots.top ? { + g: common_vendor.o(() => { + }), + h: common_vendor.s({ + "top": `${_ctx.windowTop}px`, + "z-index": _ctx.topZIndex + }) + } : {}, { + f: _ctx.usePageScroll && _ctx.zSlots.top, + i: _ctx.zSlots.left + }, _ctx.zSlots.left ? { + j: _ctx.finalIsOldWebView ? 1 : "" + } : {}, { + k: _ctx.finalRefresherFixedBacHeight > 0 + }, _ctx.finalRefresherFixedBacHeight > 0 ? { + l: common_vendor.s({ + "background": _ctx.refresherFixedBackground, + "height": `${_ctx.finalRefresherFixedBacHeight}px` + }) + } : {}, { + m: _ctx.showRefresher + }, _ctx.showRefresher ? common_vendor.e({ + n: _ctx.useRefresherStatusBarPlaceholder + }, _ctx.useRefresherStatusBarPlaceholder ? { + o: common_vendor.s({ + "height": `${_ctx.statusBarHeight}px` + }) + } : {}, { + p: !(_ctx.zSlots.refresherComplete && _ctx.refresherStatus === _ctx.R.Complete) && !(_ctx.zSlots.refresherF2 && _ctx.refresherStatus === _ctx.R.GoF2) + }, !(_ctx.zSlots.refresherComplete && _ctx.refresherStatus === _ctx.R.Complete) && !(_ctx.zSlots.refresherF2 && _ctx.refresherStatus === _ctx.R.GoF2) ? { + q: common_vendor.r("refresher", { + refresherStatus: _ctx.refresherStatus + }) + } : {}, { + r: _ctx.zSlots.refresherComplete && _ctx.refresherStatus === _ctx.R.Complete + }, _ctx.zSlots.refresherComplete && _ctx.refresherStatus === _ctx.R.Complete ? {} : _ctx.zSlots.refresherF2 && _ctx.refresherStatus === _ctx.R.GoF2 ? {} : !_ctx.showCustomRefresher ? { + v: common_vendor.sr("refresh", "1aa372d7-0"), + w: common_vendor.s({ + "height": `${_ctx.finalRefresherThreshold - _ctx.finalRefresherThresholdPlaceholder}px` + }), + x: common_vendor.p({ + status: _ctx.refresherStatus, + defaultThemeStyle: _ctx.finalRefresherThemeStyle, + defaultText: _ctx.finalRefresherDefaultText, + isIos: _ctx.isIos, + pullingText: _ctx.finalRefresherPullingText, + refreshingText: _ctx.finalRefresherRefreshingText, + completeText: _ctx.finalRefresherCompleteText, + goF2Text: _ctx.finalRefresherGoF2Text, + defaultImg: _ctx.refresherDefaultImg, + pullingImg: _ctx.refresherPullingImg, + refreshingImg: _ctx.refresherRefreshingImg, + completeImg: _ctx.refresherCompleteImg, + refreshingAnimated: _ctx.refresherRefreshingAnimated, + showUpdateTime: _ctx.showRefresherUpdateTime, + updateTimeKey: _ctx.refresherUpdateTimeKey, + updateTimeTextMap: _ctx.finalRefresherUpdateTimeTextMap, + imgStyle: _ctx.refresherImgStyle, + titleStyle: _ctx.refresherTitleStyle, + updateTimeStyle: _ctx.refresherUpdateTimeStyle, + unit: _ctx.unit + }) + } : {}, { + s: _ctx.zSlots.refresherF2 && _ctx.refresherStatus === _ctx.R.GoF2, + t: !_ctx.showCustomRefresher, + y: common_vendor.s({ + "height": `${_ctx.finalRefresherThreshold}px`, + "background": _ctx.refresherBackground + }), + z: common_vendor.s({ + "margin-top": `-${_ctx.finalRefresherThreshold + _ctx.refresherThresholdUpdateTag}px`, + "background": _ctx.refresherBackground, + "opacity": _ctx.isTouchmoving ? 1 : 0 + }) + }) : {}, { + A: _ctx.showLoading && _ctx.zSlots.loading && !_ctx.loadingFullFixed + }, _ctx.showLoading && _ctx.zSlots.loading && !_ctx.loadingFullFixed ? {} : {}, { + B: _ctx.useVirtualList + }, _ctx.useVirtualList ? { + C: common_vendor.s({ + height: _ctx.virtualPlaceholderTopHeight + "px" + }) + } : {}, { + D: _ctx.finalUseInnerList + }, _ctx.finalUseInnerList ? common_vendor.e({ + E: _ctx.finalUseVirtualList + }, _ctx.finalUseVirtualList ? { + F: common_vendor.f(_ctx.virtualList, (item, index, i0) => { + return common_vendor.e(_ctx.useCompatibilityMode ? {} : { + a: "cell-" + i0, + b: common_vendor.r("cell", { + item, + index: _ctx.virtualTopRangeIndex + index + }, i0) + }, { + c: `${_ctx.fianlVirtualCellIdPrefix}-${item[_ctx.virtualCellIndexKey]}`, + d: item["zp_unique_index"], + e: common_vendor.o(($event) => _ctx._innerCellClick(item, _ctx.virtualTopRangeIndex + index), item["zp_unique_index"]) + }); + }), + G: _ctx.useCompatibilityMode, + H: common_vendor.s(_ctx.innerCellStyle) + } : { + I: common_vendor.f(_ctx.realTotalData, (item, index, i0) => { + return { + a: "cell-" + i0, + b: common_vendor.r("cell", { + item, + index + }, i0), + c: index, + d: common_vendor.o(($event) => _ctx._innerCellClick(item, index), index) + }; + }) + }, { + J: common_vendor.s(_ctx.innerListStyle) + }) : {}, { + K: _ctx.useChatRecordMode && _ctx.realTotalData.length >= _ctx.defaultPageSize && (_ctx.loadingStatus !== _ctx.M.NoMore || _ctx.zSlots.chatNoMore) && (_ctx.realTotalData.length || _ctx.showChatLoadingWhenReload && _ctx.showLoading) && !_ctx.isFirstPageAndNoMore + }, _ctx.useChatRecordMode && _ctx.realTotalData.length >= _ctx.defaultPageSize && (_ctx.loadingStatus !== _ctx.M.NoMore || _ctx.zSlots.chatNoMore) && (_ctx.realTotalData.length || _ctx.showChatLoadingWhenReload && _ctx.showLoading) && !_ctx.isFirstPageAndNoMore ? common_vendor.e({ + L: _ctx.loadingStatus === _ctx.M.NoMore && _ctx.zSlots.chatNoMore + }, _ctx.loadingStatus === _ctx.M.NoMore && _ctx.zSlots.chatNoMore ? {} : common_vendor.e({ + M: _ctx.zSlots.chatLoading + }, _ctx.zSlots.chatLoading ? { + N: common_vendor.r("chatLoading", { + loadingMoreStatus: _ctx.loadingStatus + }) + } : { + O: common_vendor.o(($event) => _ctx._onLoadingMore("click")), + P: common_vendor.p({ + zConfig: _ctx.zLoadMoreConfig + }) + }), { + Q: common_vendor.s(_ctx.chatRecordRotateStyle) + }) : {}, { + R: _ctx.useVirtualList + }, _ctx.useVirtualList ? { + S: common_vendor.s({ + height: _ctx.virtualPlaceholderBottomHeight + "px" + }) + } : {}, { + T: _ctx.showLoadingMoreDefault + }, _ctx.showLoadingMoreDefault ? {} : _ctx.showLoadingMoreLoading ? {} : _ctx.showLoadingMoreNoMore ? {} : _ctx.showLoadingMoreFail ? {} : _ctx.showLoadingMoreCustom ? { + Y: common_vendor.o(($event) => _ctx._onLoadingMore("click")), + Z: common_vendor.p({ + zConfig: _ctx.zLoadMoreConfig + }) + } : {}, { + U: _ctx.showLoadingMoreLoading, + V: _ctx.showLoadingMoreNoMore, + W: _ctx.showLoadingMoreFail, + X: _ctx.showLoadingMoreCustom, + aa: _ctx.safeAreaInsetBottom && _ctx.useSafeAreaPlaceholder && !_ctx.useChatRecordMode + }, _ctx.safeAreaInsetBottom && _ctx.useSafeAreaPlaceholder && !_ctx.useChatRecordMode ? { + ab: common_vendor.s({ + height: _ctx.safeAreaBottom + "px" + }) + } : {}, { + ac: common_vendor.s(_ctx.finalPlaceholderTopHeightStyle), + ad: common_vendor.s(_ctx.finalPagingContentStyle), + ae: _ctx.showEmpty + }, _ctx.showEmpty ? common_vendor.e({ + af: _ctx.zSlots.empty + }, _ctx.zSlots.empty ? { + ag: common_vendor.r("empty", { + isLoadFailed: _ctx.isLoadFailed + }) + } : { + ah: common_vendor.o(_ctx._emptyViewReload), + ai: common_vendor.o(_ctx._emptyViewClick), + aj: common_vendor.p({ + emptyViewImg: _ctx.finalEmptyViewImg, + emptyViewText: _ctx.finalEmptyViewText, + showEmptyViewReload: _ctx.finalShowEmptyViewReload, + emptyViewReloadText: _ctx.finalEmptyViewReloadText, + isLoadFailed: _ctx.isLoadFailed, + emptyViewStyle: _ctx.emptyViewStyle, + emptyViewTitleStyle: _ctx.emptyViewTitleStyle, + emptyViewImgStyle: _ctx.emptyViewImgStyle, + emptyViewReloadStyle: _ctx.emptyViewReloadStyle, + emptyViewZIndex: _ctx.emptyViewZIndex, + emptyViewFixed: _ctx.emptyViewFixed, + unit: _ctx.unit + }) + }, { + ak: _ctx.emptyViewCenter ? 1 : "", + al: common_vendor.s(_ctx.emptyViewSuperStyle), + am: common_vendor.s(_ctx.chatRecordRotateStyle) + }) : {}, { + an: common_vendor.s({ + justifyContent: _ctx.useChatRecordMode ? "flex-end" : "flex-start" + }), + ao: common_vendor.s(_ctx.scrollViewInStyle), + ap: common_vendor.s({ + "transform": _ctx.finalRefresherTransform, + "transition": _ctx.refresherTransition + }), + aq: _ctx.wxsPropType, + ar: _ctx.finalRefresherThreshold, + as: _ctx.refresherF2Enabled, + at: _ctx.finalRefresherF2Threshold, + av: _ctx.isIos, + aw: _ctx.loading || _ctx.isRefresherInComplete, + ax: _ctx.useChatRecordMode, + ay: _ctx.refresherEnabled, + az: _ctx.useCustomRefresher, + aA: _ctx.wxsPageScrollTop, + aB: _ctx.wxsScrollTop, + aC: _ctx.refresherMaxAngle, + aD: _ctx.refresherNoTransform, + aE: _ctx.refresherAngleEnableChangeContinued, + aF: _ctx.usePageScroll, + aG: _ctx.watchTouchDirectionChange, + aH: _ctx.isTouchmoving, + aI: _ctx.finalRefresherOutRate, + aJ: _ctx.finalRefresherPullRate, + aK: _ctx.hasTouchmove, + aL: !_ctx.usePageScroll ? 1 : "", + aM: !_ctx.showScrollbar ? 1 : "", + aN: common_vendor.s(_ctx.chatRecordRotateStyle), + aO: _ctx.scrollTop, + aP: _ctx.scrollLeft, + aQ: _ctx.scrollX, + aR: _ctx.finalScrollable, + aS: _ctx.finalEnableBackToTop, + aT: _ctx.showScrollbar, + aU: _ctx.finalScrollWithAnimation, + aV: _ctx.scrollIntoView, + aW: _ctx.finalLowerThreshold, + aX: _ctx.finalRefresherEnabled && !_ctx.useCustomRefresher, + aY: _ctx.finalRefresherThreshold, + aZ: _ctx.finalRefresherDefaultStyle, + ba: _ctx.refresherBackground, + bb: _ctx.finalRefresherTriggered, + bc: common_vendor.o((...args) => _ctx._scroll && _ctx._scroll(...args)), + bd: common_vendor.o((...args) => _ctx._onScrollToLower && _ctx._onScrollToLower(...args)), + be: common_vendor.o((...args) => _ctx._onScrollToUpper && _ctx._onScrollToUpper(...args)), + bf: common_vendor.o((...args) => _ctx._onRestore && _ctx._onRestore(...args)), + bg: common_vendor.o(($event) => _ctx._onRefresh(true)), + bh: _ctx.finalIsOldWebView ? 1 : "", + bi: common_vendor.s(_ctx.scrollViewContainerStyle), + bj: _ctx.zSlots.right + }, _ctx.zSlots.right ? { + bk: _ctx.finalIsOldWebView ? 1 : "" + } : {}, { + bl: !_ctx.usePageScroll ? 1 : "", + bm: common_vendor.s(_ctx.finalScrollViewStyle), + bn: !_ctx.usePageScroll && _ctx.zSlots.bottom + }, !_ctx.usePageScroll && _ctx.zSlots.bottom ? {} : _ctx.usePageScroll && _ctx.zSlots.bottom ? { + bp: common_vendor.o(() => { + }), + bq: common_vendor.s({ + "bottom": `${_ctx.windowBottom}px` + }) + } : {}, { + bo: _ctx.usePageScroll && _ctx.zSlots.bottom, + br: _ctx.useChatRecordMode && _ctx.autoAdjustPositionWhenChat + }, _ctx.useChatRecordMode && _ctx.autoAdjustPositionWhenChat ? { + bs: common_vendor.s({ + height: _ctx.chatRecordModeSafeAreaBottom + "px" + }), + bt: common_vendor.s({ + height: _ctx.keyboardHeight + "px" + }) + } : {}, { + bv: _ctx.bottomBgColor, + bw: _ctx.showBackToTopClass + }, _ctx.showBackToTopClass ? common_vendor.e({ + bx: _ctx.zSlots.backToTop + }, _ctx.zSlots.backToTop ? {} : { + by: _ctx.useChatRecordMode && !_ctx.backToTopImg.length ? 1 : "", + bz: _ctx.backToTopImg.length ? _ctx.backToTopImg : _ctx.base64BackToTop + }, { + bA: common_vendor.n(_ctx.finalBackToTopClass), + bB: common_vendor.s(_ctx.finalBackToTopStyle), + bC: common_vendor.o((...args) => _ctx._backToTopClick && _ctx._backToTopClick(...args)) + }) : {}, { + bD: _ctx.showLoading && _ctx.zSlots.loading && _ctx.loadingFullFixed + }, _ctx.showLoading && _ctx.zSlots.loading && _ctx.loadingFullFixed ? {} : {}, { + bE: !_ctx.usePageScroll ? 1 : "", + bF: !_ctx.usePageScroll && _ctx.fixed ? 1 : "", + bG: _ctx.usePageScroll ? 1 : "", + bH: _ctx.renderPropScrollTop < 1 ? 1 : "", + bI: _ctx.useChatRecordMode ? 1 : "", + bJ: common_vendor.s(_ctx.finalPagingStyle) + }); +} +if (typeof block0 === "function") + block0(uni_modules_zPaging_components_zPaging_js_zPagingMain._sfc_main); +if (typeof block1 === "function") + block1(uni_modules_zPaging_components_zPaging_js_zPagingMain._sfc_main); +const Component = /* @__PURE__ */ common_vendor._export_sfc(uni_modules_zPaging_components_zPaging_js_zPagingMain._sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-1aa372d7"]]); +wx.createComponent(Component); +//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/z-paging/components/z-paging/z-paging.js.map diff --git a/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/z-paging.json b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/z-paging.json new file mode 100644 index 0000000..999b58f --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/z-paging.json @@ -0,0 +1,8 @@ +{ + "component": true, + "usingComponents": { + "z-paging-empty-view": "../z-paging-empty-view/z-paging-empty-view", + "z-paging-refresh": "./components/z-paging-refresh", + "z-paging-load-more": "./components/z-paging-load-more" + } +} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/z-paging.wxml b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/z-paging.wxml new file mode 100644 index 0000000..a4be456 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/z-paging.wxml @@ -0,0 +1,2 @@ + +使用兼容模式请在组件源码z-paging.vue第103行中注释这一行,并打开下面一行注释 \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/z-paging.wxss b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/z-paging.wxss new file mode 100644 index 0000000..8352798 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/uni_modules/z-paging/components/z-paging/z-paging.wxss @@ -0,0 +1,243 @@ +/* [z-paging]公共css*/ +.z-paging-content.data-v-1aa372d7 { + position: relative; + flex-direction: column; + + overflow: hidden; +} +.z-paging-content-full.data-v-1aa372d7 { + + display: flex; + width: 100%; + height: 100%; +} +.z-paging-content-fixed.data-v-1aa372d7, .zp-loading-fixed.data-v-1aa372d7 { + position: fixed; + + height: auto; + width: auto; + + top: 0; + left: 0; + bottom: 0; + right: 0; +} +.zp-f2-content.data-v-1aa372d7 { + width: 100%; + position: fixed; + top: 0; + left: 0; + background-color: white; +} +.zp-page-top.data-v-1aa372d7, .zp-page-bottom.data-v-1aa372d7 { + + width: auto; + + position: fixed; + left: 0; + right: 0; + z-index: 999; +} +.zp-page-left.data-v-1aa372d7, .zp-page-right.data-v-1aa372d7 { + + height: 100%; +} +.zp-scroll-view-super.data-v-1aa372d7 { + flex: 1; + overflow: hidden; + position: relative; +} +.zp-view-super.data-v-1aa372d7 { + + display: flex; + + flex-direction: row; +} +.zp-scroll-view-container.data-v-1aa372d7, .zp-scroll-view.data-v-1aa372d7 { + position: relative; + + height: 100%; + width: 100%; +} +.zp-absoulte.data-v-1aa372d7 { + + position: absolute; + top: 0; + width: auto; +} +.zp-scroll-view-absolute.data-v-1aa372d7 { + position: absolute; + top: 0; + left: 0; +} +.zp-scroll-view-hide-scrollbar.data-v-1aa372d7 ::-webkit-scrollbar { + display: none; + -webkit-appearance: none; + width: 0 !important; + height: 0 !important; + background: transparent; +} +.zp-paging-touch-view.data-v-1aa372d7 { + width: 100%; + height: 100%; + position: relative; +} +.zp-fixed-bac-view.data-v-1aa372d7 { + position: absolute; + width: 100%; + top: 0; + left: 0; + height: 200px; +} +.zp-paging-main.data-v-1aa372d7 { + height: 100%; + + display: flex; + + flex-direction: column; +} +.zp-paging-container.data-v-1aa372d7 { + flex: 1; + position: relative; + + display: flex; + + flex-direction: column; +} +.zp-chat-record-loading-custom-image.data-v-1aa372d7 { + width: 35rpx; + height: 35rpx; + + animation: loading-flower-1aa372d7 1s linear infinite; +} +.zp-page-bottom-keyboard-placeholder-animate.data-v-1aa372d7 { + transition-property: height; + transition-duration: 0.15s; + + will-change: height; +} +.zp-custom-refresher-container.data-v-1aa372d7 { + overflow: hidden; +} +.zp-custom-refresher-refresh.data-v-1aa372d7 { + + display: block; +} +.zp-back-to-top.data-v-1aa372d7 { + z-index: 999; + position: absolute; + bottom: 0rpx; + transition-duration: .3s; + transition-property: opacity; +} +.zp-back-to-top-rpx.data-v-1aa372d7 { + width: 76rpx; + height: 76rpx; + bottom: 0rpx; + right: 25rpx; +} +.zp-back-to-top-px.data-v-1aa372d7 { + width: 38px; + height: 38px; + bottom: 0px; + right: 13px; +} +.zp-back-to-top-show.data-v-1aa372d7 { + opacity: 1; +} +.zp-back-to-top-hide.data-v-1aa372d7 { + opacity: 0; +} +.zp-back-to-top-img.data-v-1aa372d7 { + + width: 100%; + height: 100%; + + + + + z-index: 999; +} +.zp-back-to-top-img-inversion.data-v-1aa372d7 { + transform: rotate(180deg); +} +.zp-empty-view.data-v-1aa372d7 { + + + + flex: 1; +} +.zp-empty-view-center.data-v-1aa372d7 { + + display: flex; + + flex-direction: column; + align-items: center; + justify-content: center; +} +.zp-loading-fixed.data-v-1aa372d7 { + z-index: 9999; +} +.zp-safe-area-inset-bottom.data-v-1aa372d7 { + position: absolute; + + height: env(safe-area-inset-bottom); +} +.zp-n-refresh-container.data-v-1aa372d7 { + + display: flex; + + justify-content: center; + width: 750rpx; +} +.zp-n-list-container.data-v-1aa372d7{ + + display: flex; + + flex-direction: row; + flex: 1; +} + +/* [z-paging]公用的静态css资源 */ +.zp-line-loading-image.data-v-1aa372d7 { + + animation: loading-flower-1aa372d7 1s steps(12) infinite; + + color: #666666; +} +.zp-line-loading-image-rpx.data-v-1aa372d7 { + margin-right: 8rpx; + width: 34rpx; + height: 34rpx; +} +.zp-line-loading-image-px.data-v-1aa372d7 { + margin-right: 4px; + width: 17px; + height: 17px; +} +.zp-loading-image-ios-rpx.data-v-1aa372d7 { + width: 40rpx; + height: 40rpx; +} +.zp-loading-image-ios-px.data-v-1aa372d7 { + width: 20px; + height: 20px; +} +.zp-loading-image-android-rpx.data-v-1aa372d7 { + width: 34rpx; + height: 34rpx; +} +.zp-loading-image-android-px.data-v-1aa372d7 { + width: 17px; + height: 17px; +} +@keyframes loading-flower-1aa372d7 { +0% { + transform: rotate(0deg); +} +to { + transform: rotate(1turn); +} +} + + diff --git a/unpackage/dist/dev/mp-weixin/utils/auth.js b/unpackage/dist/dev/mp-weixin/utils/auth.js new file mode 100644 index 0000000..c9ace97 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/utils/auth.js @@ -0,0 +1,27 @@ +"use strict"; +const common_vendor = require("../common/vendor.js"); +function auth() { + return new Promise((resolve, reject) => { + common_vendor.index.login({ + provider: "weixin", + //使用微信登录 + onlyAuthorize: true, + //不弹出授权页面,直接进入微信登录流程 + success(res) { + if (res.errMsg == "login:ok") { + resolve(res.code); + } else { + common_vendor.index.showToast({ + title: res.errMsg, + icon: "error" + }); + } + }, + fail(err) { + reject(err); + } + }); + }); +} +exports.auth = auth; +//# sourceMappingURL=../../.sourcemap/mp-weixin/utils/auth.js.map diff --git a/unpackage/dist/dev/mp-weixin/utils/config.js b/unpackage/dist/dev/mp-weixin/utils/config.js new file mode 100644 index 0000000..efd785c --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/utils/config.js @@ -0,0 +1,14 @@ +"use strict"; +const common_vendor = require("../common/vendor.js"); +let BASE_URL = ""; +{ + const { envVersion } = common_vendor.index.getAccountInfoSync().miniProgram; + if (envVersion == "release") { + BASE_URL = "https://prod-casedata.igandan.com/api"; + } else { + BASE_URL = "https://dev-casedata.igandan.com/api"; + } +} +const BASE_URL$1 = BASE_URL; +exports.BASE_URL = BASE_URL$1; +//# sourceMappingURL=../../.sourcemap/mp-weixin/utils/config.js.map diff --git a/unpackage/dist/dev/mp-weixin/utils/navTo.js b/unpackage/dist/dev/mp-weixin/utils/navTo.js new file mode 100644 index 0000000..e7c4d55 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/utils/navTo.js @@ -0,0 +1,34 @@ +"use strict"; +const common_vendor = require("../common/vendor.js"); +const utils_pageUrl = require("./pageUrl.js"); +function navTo(obj) { + let token = ""; + { + const { envVersion } = common_vendor.index.getAccountInfoSync().miniProgram; + if (envVersion == "release") { + token = common_vendor.index.getStorageSync("AUTH_TOKEN_CASEDATA"); + } else { + token = common_vendor.index.getStorageSync("DEV_AUTH_TOKEN_CASEDATA"); + } + } + if (!token) { + let page_url = utils_pageUrl.pageUrl(); + common_vendor.index.setStorageSync("redirectUrl", page_url); + common_vendor.index.navigateTo({ + url: "/pages/login/login?redirectUrl=has" + }); + } else { + { + const pages = getCurrentPages(); + let len = pages.length; + common_vendor.index.__f__("log", "at utils/navTo.js:31", len); + if (len >= 10) { + common_vendor.index.redirectTo(obj); + } else { + common_vendor.index.navigateTo(obj); + } + } + } +} +exports.navTo = navTo; +//# sourceMappingURL=../../.sourcemap/mp-weixin/utils/navTo.js.map diff --git a/unpackage/dist/dev/mp-weixin/utils/pageUrl.js b/unpackage/dist/dev/mp-weixin/utils/pageUrl.js new file mode 100644 index 0000000..e0f45ba --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/utils/pageUrl.js @@ -0,0 +1,15 @@ +"use strict"; +function pageUrl() { + const pages = getCurrentPages(); + const currentPage = pages[pages.length - 1]; + const url = currentPage.route; + const options = currentPage.options; + let fullUrl = url + "?"; + for (let key in options) { + fullUrl += `${key}=${options[key]}&`; + } + fullUrl = fullUrl.substring(0, fullUrl.length - 1); + return fullUrl; +} +exports.pageUrl = pageUrl; +//# sourceMappingURL=../../.sourcemap/mp-weixin/utils/pageUrl.js.map diff --git a/unpackage/dist/dev/mp-weixin/utils/request.js b/unpackage/dist/dev/mp-weixin/utils/request.js new file mode 100644 index 0000000..ed79b30 --- /dev/null +++ b/unpackage/dist/dev/mp-weixin/utils/request.js @@ -0,0 +1,91 @@ +"use strict"; +const common_vendor = require("../common/vendor.js"); +const utils_config = require("./config.js"); +const utils_pageUrl = require("./pageUrl.js"); +const request = (url, data = {}, method = "post", loading = false, contentType = "application/x-www-form-urlencoded") => { + if (loading) { + common_vendor.index.showLoading({ + title: "加载中", + mask: true + }); + } + let token = ""; + { + const { envVersion } = common_vendor.index.getAccountInfoSync().miniProgram; + if (envVersion == "release") { + token = common_vendor.index.getStorageSync("AUTH_TOKEN_CASEDATA"); + } else { + token = common_vendor.index.getStorageSync("DEV_AUTH_TOKEN_CASEDATA"); + } + } + let header = { + "content-type": contentType, + "Authorization": "Bearer " + token + }; + return new Promise(function(e, n) { + let timestamp = Date.now(); + common_vendor.index.request({ + data, + url: url.indexOf("http") != -1 ? url : encodeURI(utils_config.BASE_URL + url + "?timestamp=" + timestamp), + method, + sslVerify: false, + header: url.indexOf("/manager/getSignature4bing") == -1 ? header : {}, + timeout: 1e4, + success: async (res) => { + var Authorization_token = res.header.Authorization; + if (Authorization_token) { + { + common_vendor.index.setStorageSync("DEV_AUTH_TOKEN_CASEDATA", Authorization_token); + } + } + if (loading) { + common_vendor.index.hideLoading(); + } + if (res.data.code == 200) { + e(res); + } else if (res.data.code == 201) { + common_vendor.index.showModal({ + title: "提示", + content: "该作品已被删除", + showCancel: false, + success: function(res2) { + if (res2.confirm) { + common_vendor.index.navigateBack(); + } + } + }); + n(res); + } else if (res.data.code == 401 || res.data.code == 403 || res.data.code == 405 || res.data.code == 406) { + { + let freeList = ["/login/wechat/mobile", "/code/phone", "/login/mobile_login", "/index", "/user/check"]; + if (freeList.indexOf(url) == -1) { + let page_url = utils_pageUrl.pageUrl(); + common_vendor.index.setStorageSync("redirectUrl", page_url); + common_vendor.index.navigateTo({ + url: "/pages/login/login?redirectUrl=has" + }); + return false; + } + } + } else if (res.data.code == 500) { + common_vendor.index.showToast({ + title: res.data.message, + icon: "none" + }); + n(res); + } else { + common_vendor.index.showToast({ + title: res.data.message, + icon: "none" + }); + n(res); + } + }, + fail: function(err) { + "request:fail " === err.errMsg && msg("请求数据失败!"), n(err.data); + } + }); + }); +}; +exports.request = request; +//# sourceMappingURL=../../.sourcemap/mp-weixin/utils/request.js.map