├── JinRiXiaoYuan ├── static │ ├── uni.ttf │ └── img │ │ ├── dun.png │ │ ├── close.png │ │ ├── done.png │ │ ├── exit.png │ │ ├── right.png │ │ ├── true.png │ │ ├── wenhao.png │ │ ├── other_tips.png │ │ └── dt_store_back.png ├── unpackage │ └── res │ │ └── icons │ │ ├── 20x20.png │ │ ├── 29x29.png │ │ ├── 40x40.png │ │ ├── 58x58.png │ │ ├── 60x60.png │ │ ├── 72x72.png │ │ ├── 76x76.png │ │ ├── 80x80.png │ │ ├── 87x87.png │ │ ├── 96x96.png │ │ ├── 1024x1024.png │ │ ├── 120x120.png │ │ ├── 144x144.png │ │ ├── 152x152.png │ │ ├── 167x167.png │ │ ├── 180x180.png │ │ └── 192x192.png ├── main.js ├── components │ ├── uni-popup │ │ ├── popup.js │ │ ├── message.js │ │ ├── uni-popup-message.vue │ │ ├── uni-popup-share.vue │ │ ├── uni-popup-dialog.vue │ │ └── uni-popup.vue │ ├── uni-status-bar │ │ └── uni-status-bar.vue │ ├── uni-swipe-action │ │ └── uni-swipe-action.vue │ ├── uni-list │ │ ├── uni-refresh.vue │ │ ├── uni-list.vue │ │ └── uni-refresh.wxs │ ├── uni-collapse │ │ └── uni-collapse.vue │ ├── uni-link │ │ └── uni-link.vue │ ├── uni-icons │ │ └── icons.js │ ├── uni-swipe-action-item │ │ ├── mpwxs.js │ │ ├── mpalipay.js │ │ ├── mpother.js │ │ ├── index.wxs │ │ └── bindingx.js │ ├── uni-section │ │ └── uni-section.vue │ ├── uni-grid-item │ │ ├── uni-grid-item.vue │ │ └── uni-grid-item copy.vue │ ├── uni-grid │ │ └── uni-grid.vue │ ├── uni-badge │ │ └── uni-badge.vue │ ├── uni-fav │ │ └── uni-fav.vue │ ├── uni-indexed-list │ │ └── uni-indexed-list-item.vue │ ├── uni-title │ │ └── uni-title.vue │ ├── uni-segmented-control │ │ └── uni-segmented-control.vue │ ├── uni-rate │ │ └── uni-rate.vue │ ├── uni-drawer │ │ └── uni-drawer.vue │ ├── uni-calendar │ │ └── uni-calendar-item.vue │ ├── uni-number-box │ │ └── uni-number-box.vue │ ├── uni-combox │ │ └── uni-combox.vue │ ├── uni-pagination │ │ └── uni-pagination.vue │ ├── uni-tag │ │ └── uni-tag.vue │ ├── uni-search-bar │ │ └── uni-search-bar.vue │ ├── uni-countdown │ │ └── uni-countdown.vue │ ├── uni-goods-nav │ │ └── uni-goods-nav.vue │ ├── uni-collapse-item │ │ └── uni-collapse-item.vue │ ├── uni-nav-bar │ │ └── uni-nav-bar.vue │ ├── uni-swiper-dot │ │ └── uni-swiper-dot.vue │ ├── uni-transition │ │ └── uni-transition.vue │ ├── uni-steps │ │ └── uni-steps.vue │ └── uni-list-item │ │ └── uni-list-item.vue ├── App.vue ├── 今日校园.md ├── pages.json ├── uni.scss ├── pages │ ├── addStudentInfo │ │ └── addStudentInfo.vue │ ├── index │ │ └── index.vue │ └── checkSuccess │ │ └── checkSuccess.vue └── manifest.json └── README.md /JinRiXiaoYuan/static/uni.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Agoney133/jinrixiaoyuan/HEAD/JinRiXiaoYuan/static/uni.ttf -------------------------------------------------------------------------------- /JinRiXiaoYuan/static/img/dun.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Agoney133/jinrixiaoyuan/HEAD/JinRiXiaoYuan/static/img/dun.png -------------------------------------------------------------------------------- /JinRiXiaoYuan/static/img/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Agoney133/jinrixiaoyuan/HEAD/JinRiXiaoYuan/static/img/close.png -------------------------------------------------------------------------------- /JinRiXiaoYuan/static/img/done.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Agoney133/jinrixiaoyuan/HEAD/JinRiXiaoYuan/static/img/done.png -------------------------------------------------------------------------------- /JinRiXiaoYuan/static/img/exit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Agoney133/jinrixiaoyuan/HEAD/JinRiXiaoYuan/static/img/exit.png -------------------------------------------------------------------------------- /JinRiXiaoYuan/static/img/right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Agoney133/jinrixiaoyuan/HEAD/JinRiXiaoYuan/static/img/right.png -------------------------------------------------------------------------------- /JinRiXiaoYuan/static/img/true.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Agoney133/jinrixiaoyuan/HEAD/JinRiXiaoYuan/static/img/true.png -------------------------------------------------------------------------------- /JinRiXiaoYuan/static/img/wenhao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Agoney133/jinrixiaoyuan/HEAD/JinRiXiaoYuan/static/img/wenhao.png -------------------------------------------------------------------------------- /JinRiXiaoYuan/static/img/other_tips.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Agoney133/jinrixiaoyuan/HEAD/JinRiXiaoYuan/static/img/other_tips.png -------------------------------------------------------------------------------- /JinRiXiaoYuan/static/img/dt_store_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Agoney133/jinrixiaoyuan/HEAD/JinRiXiaoYuan/static/img/dt_store_back.png -------------------------------------------------------------------------------- /JinRiXiaoYuan/unpackage/res/icons/20x20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Agoney133/jinrixiaoyuan/HEAD/JinRiXiaoYuan/unpackage/res/icons/20x20.png -------------------------------------------------------------------------------- /JinRiXiaoYuan/unpackage/res/icons/29x29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Agoney133/jinrixiaoyuan/HEAD/JinRiXiaoYuan/unpackage/res/icons/29x29.png -------------------------------------------------------------------------------- /JinRiXiaoYuan/unpackage/res/icons/40x40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Agoney133/jinrixiaoyuan/HEAD/JinRiXiaoYuan/unpackage/res/icons/40x40.png -------------------------------------------------------------------------------- /JinRiXiaoYuan/unpackage/res/icons/58x58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Agoney133/jinrixiaoyuan/HEAD/JinRiXiaoYuan/unpackage/res/icons/58x58.png -------------------------------------------------------------------------------- /JinRiXiaoYuan/unpackage/res/icons/60x60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Agoney133/jinrixiaoyuan/HEAD/JinRiXiaoYuan/unpackage/res/icons/60x60.png -------------------------------------------------------------------------------- /JinRiXiaoYuan/unpackage/res/icons/72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Agoney133/jinrixiaoyuan/HEAD/JinRiXiaoYuan/unpackage/res/icons/72x72.png -------------------------------------------------------------------------------- /JinRiXiaoYuan/unpackage/res/icons/76x76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Agoney133/jinrixiaoyuan/HEAD/JinRiXiaoYuan/unpackage/res/icons/76x76.png -------------------------------------------------------------------------------- /JinRiXiaoYuan/unpackage/res/icons/80x80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Agoney133/jinrixiaoyuan/HEAD/JinRiXiaoYuan/unpackage/res/icons/80x80.png -------------------------------------------------------------------------------- /JinRiXiaoYuan/unpackage/res/icons/87x87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Agoney133/jinrixiaoyuan/HEAD/JinRiXiaoYuan/unpackage/res/icons/87x87.png -------------------------------------------------------------------------------- /JinRiXiaoYuan/unpackage/res/icons/96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Agoney133/jinrixiaoyuan/HEAD/JinRiXiaoYuan/unpackage/res/icons/96x96.png -------------------------------------------------------------------------------- /JinRiXiaoYuan/unpackage/res/icons/1024x1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Agoney133/jinrixiaoyuan/HEAD/JinRiXiaoYuan/unpackage/res/icons/1024x1024.png -------------------------------------------------------------------------------- /JinRiXiaoYuan/unpackage/res/icons/120x120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Agoney133/jinrixiaoyuan/HEAD/JinRiXiaoYuan/unpackage/res/icons/120x120.png -------------------------------------------------------------------------------- /JinRiXiaoYuan/unpackage/res/icons/144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Agoney133/jinrixiaoyuan/HEAD/JinRiXiaoYuan/unpackage/res/icons/144x144.png -------------------------------------------------------------------------------- /JinRiXiaoYuan/unpackage/res/icons/152x152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Agoney133/jinrixiaoyuan/HEAD/JinRiXiaoYuan/unpackage/res/icons/152x152.png -------------------------------------------------------------------------------- /JinRiXiaoYuan/unpackage/res/icons/167x167.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Agoney133/jinrixiaoyuan/HEAD/JinRiXiaoYuan/unpackage/res/icons/167x167.png -------------------------------------------------------------------------------- /JinRiXiaoYuan/unpackage/res/icons/180x180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Agoney133/jinrixiaoyuan/HEAD/JinRiXiaoYuan/unpackage/res/icons/180x180.png -------------------------------------------------------------------------------- /JinRiXiaoYuan/unpackage/res/icons/192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Agoney133/jinrixiaoyuan/HEAD/JinRiXiaoYuan/unpackage/res/icons/192x192.png -------------------------------------------------------------------------------- /JinRiXiaoYuan/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './App' 3 | 4 | Vue.config.productionTip = false 5 | 6 | App.mpType = 'app' 7 | 8 | const app = new Vue({ 9 | ...App 10 | }) 11 | app.$mount() 12 | -------------------------------------------------------------------------------- /JinRiXiaoYuan/components/uni-popup/popup.js: -------------------------------------------------------------------------------- 1 | import message from './message.js'; 2 | // 定义 type 类型:弹出类型:top/bottom/center 3 | const config = { 4 | // 顶部弹出 5 | top:'top', 6 | // 底部弹出 7 | bottom:'bottom', 8 | // 居中弹出 9 | center:'center', 10 | // 消息提示 11 | message:'top', 12 | // 对话框 13 | dialog:'center', 14 | // 分享 15 | share:'bottom', 16 | } 17 | 18 | export default { 19 | data(){ 20 | return { 21 | config:config 22 | } 23 | }, 24 | mixins: [message], 25 | } 26 | -------------------------------------------------------------------------------- /JinRiXiaoYuan/App.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 25 | -------------------------------------------------------------------------------- /JinRiXiaoYuan/components/uni-status-bar/uni-status-bar.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 18 | 19 | 26 | -------------------------------------------------------------------------------- /JinRiXiaoYuan/components/uni-popup/message.js: -------------------------------------------------------------------------------- 1 | export default { 2 | created() { 3 | if (this.type === 'message') { 4 | // 获取自组件对象 5 | this.maskShow = false 6 | this.children = null 7 | } 8 | }, 9 | created() { 10 | if (this.type === 'message') { 11 | // 不显示遮罩 12 | this.maskShow = false 13 | // 获取子组件对象 14 | this.childrenMsg = null 15 | } 16 | }, 17 | methods: { 18 | customOpen() { 19 | if (this.childrenMsg) { 20 | this.childrenMsg.open() 21 | } 22 | }, 23 | customClose() { 24 | if (this.childrenMsg) { 25 | this.childrenMsg.close() 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /JinRiXiaoYuan/今日校园.md: -------------------------------------------------------------------------------- 1 | # 使用须知 2 | 3 | 本软件使用[Uni-App](https://uniapp.dcloud.io/)编写,需要使用到DCloud公司的[HBuilderX](https://www.dcloud.io/hbuilderx.html)进行开发,软件源代码可以在Github上免费下载并自行设计更改使用。 4 | **软件仅供学习研究使用,请勿用于任何商业非法用途,否则造成任何后果作者概不负责** 5 | **软件仅供学习研究使用,请勿用于任何商业非法用途,否则造成任何后果作者概不负责** 6 | **软件仅供学习研究使用,请勿用于任何商业非法用途,否则造成任何后果作者概不负责** 7 | 8 | 9 | 10 | # 各平台使用 11 | 12 | 由于Uni-App的特性,[一套代码可以编译到10个平台](https://uniapp.dcloud.io/README?id=%e5%bf%ab%e9%80%9f%e4%bd%93%e9%aa%8c),支持安卓/IOS。 13 | 14 | 15 | 16 | # 后续更新 17 | 18 | 目前最新版今日校园已经需要保安扫码验证你的请假真伪,当前源码并未更新核验码,现在国家疫情反弹,请大家严格遵守**学校和国家的相关规定**,软件仅供学习研究使用,请勿用于商业及非法用途。作者已经停止更新。 19 | 20 | 21 | 22 | # 开发过程 23 | 24 | 本人前端技术有限,对部分专业知识的理解仍有不足,部分功能的实现可能并不专业且代码冗余,还望大家理解。 25 | 26 | 27 | 28 | # 软件部分界面截图 29 | 30 | 软件主页 31 | 32 | 添加请假页面 33 | 34 | 签到信息设置 -------------------------------------------------------------------------------- /JinRiXiaoYuan/pages.json: -------------------------------------------------------------------------------- 1 | { 2 | "pages": [{ 3 | "path": "pages/index/index", 4 | "style": { 5 | "app-plus": { 6 | //去掉原生导航栏 7 | "titleNView": false 8 | }, 9 | "navigationBarTextStyle": "black" 10 | } 11 | }, { 12 | "path": "pages/addLeave/addLeave", 13 | "style": { 14 | "navigationBarTitleText": "添加请假", 15 | "navigationBarBackgroundColor":"#38b48b" 16 | } 17 | }, { 18 | "path": "pages/viewLeaves/viewLeaves", 19 | "style": { 20 | "app-plus": { 21 | //去掉原生导航栏 22 | "titleNView": false 23 | }, 24 | "navigationBarTextStyle": "black" 25 | } 26 | 27 | }, { 28 | "path": "pages/addStudentInfo/addStudentInfo", 29 | "style": { 30 | "navigationBarTitleText": "设置个人信息", 31 | "navigationBarBackgroundColor":"#38b48b" 32 | } 33 | 34 | }, { 35 | "path": "pages/checkSuccess/checkSuccess", 36 | "style": { 37 | "app-plus": { 38 | //去掉原生导航栏 39 | "titleNView": false 40 | }, 41 | "navigationBarTextStyle": "black" 42 | } 43 | 44 | }], 45 | "globalStyle": { 46 | "navigationBarTextStyle": "white", 47 | "navigationBarTitleText": "uni-app", 48 | "navigationBarBackgroundColor": "#007AFF", 49 | "backgroundColor": "#FFFFFF" 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /JinRiXiaoYuan/components/uni-swipe-action/uni-swipe-action.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 55 | 56 | -------------------------------------------------------------------------------- /JinRiXiaoYuan/components/uni-list/uni-refresh.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 59 | 60 | -------------------------------------------------------------------------------- /JinRiXiaoYuan/components/uni-collapse/uni-collapse.vue: -------------------------------------------------------------------------------- 1 | 6 | 47 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 使用须知 2 | 3 | 本软件使用Uni-App编写,需要使用到DCloud公司的HBuilderX进行开发,软件源代码可以在Github上免费下载并自行设计更改使用。 4 |

**软件仅供学习研究使用,请勿用于任何商业非法用途,否则造成任何后果作者概不负责** 5 |

**软件仅供学习研究使用,请勿用于任何商业非法用途,否则造成任何后果作者概不负责** 6 |

**软件仅供学习研究使用,请勿用于任何商业非法用途,否则造成任何后果作者概不负责** 7 |

**软件禁止重新打包售卖,否则造成任何法律后果均由二次打包售卖者承担,下载源码既代表你认可本条款!** 8 | 9 | 10 | # 各平台使用 11 | 12 | 由于Uni-App的特性,一套代码可以编译到10个平台,支持安卓/IOS。 13 | 14 | 15 | 16 | # 后续更新 17 | 18 | 目前最新版今日校园已经需要保安扫码验证你的请假真伪,当前源码并未更新核验码,现在国家疫情反弹,请大家严格遵守**学校和国家的相关规定**,软件仅供学习研究使用,请勿用于商业及非法用途。作者已经停止更新。 19 | 20 | 21 | 22 | # 开发过程 23 | 24 | 本人前端技术有限,对部分专业知识的理解仍有不足,部分功能的实现可能并不专业且代码冗余,还望大家理解。觉得不错的请点个star哈,谢谢啦。^_^ 25 | 26 | 27 | 28 | # 软件部分界面截图 29 | 30 | 软件主页 31 | 32 | 添加请假页面 33 | 34 | 签到信息设置 35 | 36 | 正在休假中 37 | 38 | 已完成 39 | -------------------------------------------------------------------------------- /JinRiXiaoYuan/components/uni-list/uni-list.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 52 | -------------------------------------------------------------------------------- /JinRiXiaoYuan/components/uni-link/uni-link.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 67 | 68 | -------------------------------------------------------------------------------- /JinRiXiaoYuan/uni.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * 这里是uni-app内置的常用样式变量 3 | * 4 | * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 5 | * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App 6 | * 7 | */ 8 | 9 | /** 10 | * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 11 | * 12 | * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 13 | */ 14 | 15 | /* 颜色变量 */ 16 | 17 | /* 行为相关颜色 */ 18 | $uni-color-primary: #007aff; 19 | $uni-color-success: #4cd964; 20 | $uni-color-warning: #f0ad4e; 21 | $uni-color-error: #dd524d; 22 | 23 | /* 文字基本颜色 */ 24 | $uni-text-color:#333;//基本色 25 | $uni-text-color-inverse:#fff;//反色 26 | $uni-text-color-grey:#999;//辅助灰色,如加载更多的提示信息 27 | $uni-text-color-placeholder: #808080; 28 | $uni-text-color-disable:#c0c0c0; 29 | 30 | /* 背景颜色 */ 31 | $uni-bg-color:#ffffff; 32 | $uni-bg-color-grey:#f8f8f8; 33 | $uni-bg-color-hover:#f1f1f1;//点击状态颜色 34 | $uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色 35 | 36 | /* 边框颜色 */ 37 | $uni-border-color:#e5e5e5; 38 | 39 | /* 尺寸变量 */ 40 | 41 | /* 文字尺寸 */ 42 | $uni-font-size-sm:24rpx; 43 | $uni-font-size-base:28rpx; 44 | $uni-font-size-lg:32rpx; 45 | 46 | /* 图片尺寸 */ 47 | $uni-img-size-sm:40rpx; 48 | $uni-img-size-base:52rpx; 49 | $uni-img-size-lg:80rpx; 50 | 51 | /* Border Radius */ 52 | $uni-border-radius-sm: 4rpx; 53 | $uni-border-radius-base: 6rpx; 54 | $uni-border-radius-lg: 12rpx; 55 | $uni-border-radius-circle: 50%; 56 | 57 | /* 水平间距 */ 58 | $uni-spacing-row-sm: 10px; 59 | $uni-spacing-row-base: 20rpx; 60 | $uni-spacing-row-lg: 30rpx; 61 | 62 | /* 垂直间距 */ 63 | $uni-spacing-col-sm: 8rpx; 64 | $uni-spacing-col-base: 16rpx; 65 | $uni-spacing-col-lg: 24rpx; 66 | 67 | /* 透明度 */ 68 | $uni-opacity-disabled: 0.3; // 组件禁用态的透明度 69 | 70 | /* 文章场景相关 */ 71 | $uni-color-title: #2C405A; // 文章标题颜色 72 | $uni-font-size-title:40rpx; 73 | $uni-color-subtitle: #555555; // 二级标题颜色 74 | $uni-font-size-subtitle:36rpx; 75 | $uni-color-paragraph: #3F536E; // 文章段落颜色 76 | $uni-font-size-paragraph:30rpx; -------------------------------------------------------------------------------- /JinRiXiaoYuan/components/uni-list/uni-refresh.wxs: -------------------------------------------------------------------------------- 1 | var pullDown = { 2 | threshold: 95, 3 | maxHeight: 200, 4 | callRefresh: 'onrefresh', 5 | callPullingDown: 'onpullingdown', 6 | refreshSelector: '.uni-refresh' 7 | }; 8 | 9 | function ready(newValue, oldValue, ownerInstance, instance) { 10 | var state = instance.getState() 11 | state.canPullDown = newValue; 12 | // console.log(newValue); 13 | } 14 | 15 | function touchStart(e, instance) { 16 | var state = instance.getState(); 17 | state.refreshInstance = instance.selectComponent(pullDown.refreshSelector); 18 | state.canPullDown = (state.refreshInstance != null && state.refreshInstance != undefined); 19 | if (!state.canPullDown) { 20 | return 21 | } 22 | 23 | // console.log("touchStart"); 24 | 25 | state.height = 0; 26 | state.touchStartY = e.touches[0].pageY || e.changedTouches[0].pageY; 27 | state.refreshInstance.setStyle({ 28 | 'height': 0 29 | }); 30 | state.refreshInstance.callMethod("onchange", true); 31 | } 32 | 33 | function touchMove(e, ownerInstance) { 34 | var instance = e.instance; 35 | var state = instance.getState(); 36 | if (!state.canPullDown) { 37 | return 38 | } 39 | 40 | var oldHeight = state.height; 41 | var endY = e.touches[0].pageY || e.changedTouches[0].pageY; 42 | var height = endY - state.touchStartY; 43 | if (height > pullDown.maxHeight) { 44 | return; 45 | } 46 | 47 | var refreshInstance = state.refreshInstance; 48 | refreshInstance.setStyle({ 49 | 'height': height + 'px' 50 | }); 51 | 52 | height = height < pullDown.maxHeight ? height : pullDown.maxHeight; 53 | state.height = height; 54 | refreshInstance.callMethod(pullDown.callPullingDown, { 55 | height: height 56 | }); 57 | } 58 | 59 | function touchEnd(e, ownerInstance) { 60 | var state = e.instance.getState(); 61 | if (!state.canPullDown) { 62 | return 63 | } 64 | 65 | state.refreshInstance.callMethod("onchange", false); 66 | 67 | var refreshInstance = state.refreshInstance; 68 | if (state.height > pullDown.threshold) { 69 | refreshInstance.callMethod(pullDown.callRefresh); 70 | return; 71 | } 72 | 73 | refreshInstance.setStyle({ 74 | 'height': 0 75 | }); 76 | } 77 | 78 | function propObserver(newValue, oldValue, instance) { 79 | pullDown = newValue; 80 | } 81 | 82 | module.exports = { 83 | touchmove: touchMove, 84 | touchstart: touchStart, 85 | touchend: touchEnd, 86 | propObserver: propObserver 87 | } 88 | -------------------------------------------------------------------------------- /JinRiXiaoYuan/components/uni-icons/icons.js: -------------------------------------------------------------------------------- 1 | export default { 2 | 'contact': '\ue100', 3 | 'person': '\ue101', 4 | 'personadd': '\ue102', 5 | 'contact-filled': '\ue130', 6 | 'person-filled': '\ue131', 7 | 'personadd-filled': '\ue132', 8 | 'phone': '\ue200', 9 | 'email': '\ue201', 10 | 'chatbubble': '\ue202', 11 | 'chatboxes': '\ue203', 12 | 'phone-filled': '\ue230', 13 | 'email-filled': '\ue231', 14 | 'chatbubble-filled': '\ue232', 15 | 'chatboxes-filled': '\ue233', 16 | 'weibo': '\ue260', 17 | 'weixin': '\ue261', 18 | 'pengyouquan': '\ue262', 19 | 'chat': '\ue263', 20 | 'qq': '\ue264', 21 | 'videocam': '\ue300', 22 | 'camera': '\ue301', 23 | 'mic': '\ue302', 24 | 'location': '\ue303', 25 | 'mic-filled': '\ue332', 26 | 'speech': '\ue332', 27 | 'location-filled': '\ue333', 28 | 'micoff': '\ue360', 29 | 'image': '\ue363', 30 | 'map': '\ue364', 31 | 'compose': '\ue400', 32 | 'trash': '\ue401', 33 | 'upload': '\ue402', 34 | 'download': '\ue403', 35 | 'close': '\ue404', 36 | 'redo': '\ue405', 37 | 'undo': '\ue406', 38 | 'refresh': '\ue407', 39 | 'star': '\ue408', 40 | 'plus': '\ue409', 41 | 'minus': '\ue410', 42 | 'circle': '\ue411', 43 | 'checkbox': '\ue411', 44 | 'close-filled': '\ue434', 45 | 'clear': '\ue434', 46 | 'refresh-filled': '\ue437', 47 | 'star-filled': '\ue438', 48 | 'plus-filled': '\ue439', 49 | 'minus-filled': '\ue440', 50 | 'circle-filled': '\ue441', 51 | 'checkbox-filled': '\ue442', 52 | 'closeempty': '\ue460', 53 | 'refreshempty': '\ue461', 54 | 'reload': '\ue462', 55 | 'starhalf': '\ue463', 56 | 'spinner': '\ue464', 57 | 'spinner-cycle': '\ue465', 58 | 'search': '\ue466', 59 | 'plusempty': '\ue468', 60 | 'forward': '\ue470', 61 | 'back': '\ue471', 62 | 'left-nav': '\ue471', 63 | 'checkmarkempty': '\ue472', 64 | 'home': '\ue500', 65 | 'navigate': '\ue501', 66 | 'gear': '\ue502', 67 | 'paperplane': '\ue503', 68 | 'info': '\ue504', 69 | 'help': '\ue505', 70 | 'locked': '\ue506', 71 | 'more': '\ue507', 72 | 'flag': '\ue508', 73 | 'home-filled': '\ue530', 74 | 'gear-filled': '\ue532', 75 | 'info-filled': '\ue534', 76 | 'help-filled': '\ue535', 77 | 'more-filled': '\ue537', 78 | 'settings': '\ue560', 79 | 'list': '\ue562', 80 | 'bars': '\ue563', 81 | 'loop': '\ue565', 82 | 'paperclip': '\ue567', 83 | 'eye': '\ue568', 84 | 'arrowup': '\ue580', 85 | 'arrowdown': '\ue581', 86 | 'arrowleft': '\ue582', 87 | 'arrowright': '\ue583', 88 | 'arrowthinup': '\ue584', 89 | 'arrowthindown': '\ue585', 90 | 'arrowthinleft': '\ue586', 91 | 'arrowthinright': '\ue587', 92 | 'pulldown': '\ue588', 93 | 'closefill': '\ue589', 94 | 'sound': '\ue590', 95 | 'scan': '\ue612' 96 | } 97 | -------------------------------------------------------------------------------- /JinRiXiaoYuan/components/uni-popup/uni-popup-message.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 67 | -------------------------------------------------------------------------------- /JinRiXiaoYuan/components/uni-swipe-action-item/mpwxs.js: -------------------------------------------------------------------------------- 1 | export default { 2 | data() { 3 | return { 4 | position: [], 5 | button: [] 6 | } 7 | }, 8 | computed: { 9 | pos() { 10 | return JSON.stringify(this.position) 11 | }, 12 | btn() { 13 | return JSON.stringify(this.button) 14 | } 15 | }, 16 | watch: { 17 | show(newVal) { 18 | if (this.autoClose) return 19 | let valueObj = this.position[0] 20 | if (!valueObj) { 21 | this.init() 22 | return 23 | } 24 | valueObj.show = newVal 25 | this.$set(this.position, 0, valueObj) 26 | } 27 | }, 28 | created() { 29 | if (this.swipeaction.children !== undefined) { 30 | this.swipeaction.children.push(this) 31 | } 32 | }, 33 | mounted() { 34 | this.init() 35 | 36 | }, 37 | beforeDestroy() { 38 | this.swipeaction.children.forEach((item, index) => { 39 | if (item === this) { 40 | this.swipeaction.children.splice(index, 1) 41 | } 42 | }) 43 | }, 44 | methods: { 45 | init() { 46 | 47 | setTimeout(() => { 48 | this.getSize() 49 | this.getButtonSize() 50 | }, 50) 51 | }, 52 | closeSwipe(e) { 53 | if (!this.autoClose) return 54 | this.swipeaction.closeOther(this) 55 | }, 56 | 57 | change(e) { 58 | this.$emit('change', e.open) 59 | let valueObj = this.position[0] 60 | if (valueObj.show !== e.open) { 61 | valueObj.show = e.open 62 | this.$set(this.position, 0, valueObj) 63 | } 64 | }, 65 | onClick(index, item) { 66 | this.$emit('click', { 67 | content: item, 68 | index 69 | }) 70 | }, 71 | appTouchStart(e) { 72 | const { 73 | clientX 74 | } = e.changedTouches[0] 75 | this.clientX = clientX 76 | this.timestamp = new Date().getTime() 77 | }, 78 | appTouchEnd(e, index, item) { 79 | const { 80 | clientX 81 | } = e.changedTouches[0] 82 | // fixed by xxxx 模拟点击事件,解决 ios 13 点击区域错位的问题 83 | let diff = Math.abs(this.clientX - clientX) 84 | let time = (new Date().getTime()) - this.timestamp 85 | console.log(diff); 86 | if (diff < 40 && time < 300) { 87 | // console.log('点击'); 88 | this.$emit('click', { 89 | content: item, 90 | index 91 | }) 92 | } 93 | }, 94 | getSize() { 95 | const views = uni.createSelectorQuery().in(this) 96 | views 97 | .selectAll('.selector-query-hock') 98 | .boundingClientRect(data => { 99 | if (this.autoClose) { 100 | data[0].show = false 101 | } else { 102 | data[0].show = this.show 103 | } 104 | this.position = data 105 | }) 106 | .exec() 107 | }, 108 | getButtonSize() { 109 | const views = uni.createSelectorQuery().in(this) 110 | views 111 | .selectAll('.button-hock') 112 | .boundingClientRect(data => { 113 | this.button = data 114 | }) 115 | .exec() 116 | } 117 | } 118 | } 119 | -------------------------------------------------------------------------------- /JinRiXiaoYuan/components/uni-section/uni-section.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 58 | -------------------------------------------------------------------------------- /JinRiXiaoYuan/components/uni-grid-item/uni-grid-item.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 68 | 69 | -------------------------------------------------------------------------------- /JinRiXiaoYuan/components/uni-grid/uni-grid.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 107 | 108 | -------------------------------------------------------------------------------- /JinRiXiaoYuan/components/uni-swipe-action-item/mpalipay.js: -------------------------------------------------------------------------------- 1 | export default { 2 | data() { 3 | return { 4 | isshow: false, 5 | viewWidth: 0, 6 | buttonWidth: 0, 7 | disabledView: false, 8 | x: 0, 9 | transition: false 10 | } 11 | }, 12 | watch: { 13 | show(newVal) { 14 | if (this.autoClose) return 15 | if (newVal) { 16 | this.open() 17 | } else { 18 | this.close() 19 | } 20 | }, 21 | }, 22 | created() { 23 | if (this.swipeaction.children !== undefined) { 24 | this.swipeaction.children.push(this) 25 | } 26 | }, 27 | beforeDestroy() { 28 | this.swipeaction.children.forEach((item, index) => { 29 | if (item === this) { 30 | this.swipeaction.children.splice(index, 1) 31 | } 32 | }) 33 | }, 34 | mounted() { 35 | this.isopen = false 36 | this.transition = true 37 | setTimeout(() => { 38 | this.getQuerySelect() 39 | }, 50) 40 | 41 | }, 42 | methods: { 43 | onClick(index, item) { 44 | this.$emit('click', { 45 | content: item, 46 | index 47 | }) 48 | }, 49 | touchstart(e) { 50 | let { 51 | pageX, 52 | pageY 53 | } = e.changedTouches[0] 54 | this.transition = false 55 | this.startX = pageX 56 | if (this.autoClose) { 57 | this.swipeaction.closeOther(this) 58 | } 59 | }, 60 | touchmove(e) { 61 | let { 62 | pageX, 63 | } = e.changedTouches[0] 64 | this.slide = this.getSlide(pageX) 65 | if (this.slide === 0) { 66 | this.disabledView = false 67 | } 68 | 69 | }, 70 | touchend(e) { 71 | this.stop = false 72 | this.transition = true 73 | if (this.isopen) { 74 | if (this.moveX === -this.buttonWidth) { 75 | this.close() 76 | return 77 | } 78 | this.move() 79 | } else { 80 | if (this.moveX === 0) { 81 | this.close() 82 | return 83 | } 84 | this.move() 85 | } 86 | }, 87 | open() { 88 | this.x = this.moveX 89 | this.$nextTick(() => { 90 | this.x = -this.buttonWidth 91 | this.moveX = this.x 92 | 93 | if(!this.isopen){ 94 | this.isopen = true 95 | this.$emit('change', true) 96 | } 97 | }) 98 | }, 99 | close() { 100 | this.x = this.moveX 101 | this.$nextTick(() => { 102 | this.x = 0 103 | this.moveX = this.x 104 | if(this.isopen){ 105 | this.isopen = false 106 | this.$emit('change', false) 107 | } 108 | }) 109 | }, 110 | move() { 111 | if (this.slide === 0) { 112 | this.open() 113 | } else { 114 | this.close() 115 | } 116 | }, 117 | onChange(e) { 118 | let x = e.detail.x 119 | this.moveX = x 120 | if (x >= this.buttonWidth) { 121 | this.disabledView = true 122 | this.$nextTick(() => { 123 | this.x = this.buttonWidth 124 | }) 125 | } 126 | }, 127 | getSlide(x) { 128 | if (x >= this.startX) { 129 | this.startX = x 130 | return 1 131 | } else { 132 | this.startX = x 133 | return 0 134 | } 135 | 136 | }, 137 | getQuerySelect() { 138 | const query = uni.createSelectorQuery().in(this); 139 | query.selectAll('.viewWidth-hook').boundingClientRect(data => { 140 | 141 | this.viewWidth = data[0].width 142 | this.buttonWidth = data[1].width 143 | this.transition = false 144 | this.$nextTick(() => { 145 | this.transition = true 146 | }) 147 | 148 | if (!this.buttonWidth) { 149 | this.disabledView = true 150 | } 151 | 152 | if (this.autoClose) return 153 | if (this.show) { 154 | this.open() 155 | } 156 | }).exec(); 157 | 158 | } 159 | } 160 | } 161 | -------------------------------------------------------------------------------- /JinRiXiaoYuan/components/uni-badge/uni-badge.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 67 | 68 | -------------------------------------------------------------------------------- /JinRiXiaoYuan/components/uni-fav/uni-fav.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 95 | 96 | -------------------------------------------------------------------------------- /JinRiXiaoYuan/components/uni-indexed-list/uni-indexed-list-item.vue: -------------------------------------------------------------------------------- 1 | 20 | 21 | 58 | 59 | -------------------------------------------------------------------------------- /JinRiXiaoYuan/components/uni-title/uni-title.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 116 | 117 | -------------------------------------------------------------------------------- /JinRiXiaoYuan/pages/addStudentInfo/addStudentInfo.vue: -------------------------------------------------------------------------------- 1 | 24 | 25 | 92 | 93 | 131 | -------------------------------------------------------------------------------- /JinRiXiaoYuan/components/uni-popup/uni-popup-share.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 86 | -------------------------------------------------------------------------------- /JinRiXiaoYuan/components/uni-segmented-control/uni-segmented-control.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | 81 | 82 | -------------------------------------------------------------------------------- /JinRiXiaoYuan/components/uni-swipe-action-item/mpother.js: -------------------------------------------------------------------------------- 1 | // #ifdef APP-NVUE 2 | const dom = weex.requireModule('dom'); 3 | // #endif 4 | export default { 5 | data() { 6 | return { 7 | uniShow: false, 8 | left: 0 9 | } 10 | }, 11 | computed: { 12 | moveLeft() { 13 | return `translateX(${this.left}px)` 14 | } 15 | }, 16 | watch: { 17 | show(newVal) { 18 | if (!this.position || JSON.stringify(this.position) === '{}') return; 19 | if (this.autoClose) return 20 | if (newVal) { 21 | this.$emit('change', true) 22 | this.open() 23 | } else { 24 | this.$emit('change', false) 25 | this.close() 26 | } 27 | } 28 | }, 29 | mounted() { 30 | this.position = {} 31 | if (this.swipeaction.children !== undefined) { 32 | this.swipeaction.children.push(this) 33 | } 34 | setTimeout(() => { 35 | this.getSelectorQuery() 36 | }, 100) 37 | }, 38 | beforeDestoy() { 39 | this.swipeaction.children.forEach((item, index) => { 40 | if (item === this) { 41 | this.swipeaction.children.splice(index, 1) 42 | } 43 | }) 44 | }, 45 | methods: { 46 | onClick(index, item) { 47 | this.$emit('click', { 48 | content: item, 49 | index 50 | }) 51 | this.close() 52 | }, 53 | touchstart(e) { 54 | const { 55 | pageX 56 | } = e.touches[0] 57 | if (this.disabled) return 58 | const left = this.position.content.left 59 | if (this.autoClose) { 60 | this.swipeaction.closeOther(this) 61 | } 62 | this.width = pageX - left 63 | if (this.isopen) return 64 | if (this.uniShow) { 65 | this.uniShow = false 66 | this.isopen = true 67 | this.openleft = this.left + this.position.button.width 68 | } 69 | }, 70 | touchmove(e, index) { 71 | if (this.disabled) return 72 | const { 73 | pageX 74 | } = e.touches[0] 75 | this.setPosition(pageX) 76 | }, 77 | touchend() { 78 | if (this.disabled) return 79 | if (this.isopen) { 80 | this.move(this.openleft, 0) 81 | return 82 | } 83 | this.move(this.left, -40) 84 | }, 85 | setPosition(x, y) { 86 | if (!this.position.button.width) { 87 | return 88 | } 89 | // this.left = x - this.width 90 | this.setValue(x - this.width) 91 | }, 92 | setValue(value) { 93 | // 设置最大最小值 94 | this.left = Math.max(-this.position.button.width, Math.min(parseInt(value), 0)) 95 | this.position.content.left = this.left 96 | if (this.isopen) { 97 | this.openleft = this.left + this.position.button.width 98 | } 99 | }, 100 | move(left, value) { 101 | if (left >= value) { 102 | this.$emit('change', false) 103 | this.close() 104 | } else { 105 | this.$emit('change', true) 106 | this.open() 107 | } 108 | }, 109 | open() { 110 | this.uniShow = true 111 | this.left = -this.position.button.width 112 | this.setValue(-this.position.button.width) 113 | }, 114 | close() { 115 | this.uniShow = true 116 | this.setValue(0) 117 | setTimeout(() => { 118 | this.uniShow = false 119 | this.isopen = false 120 | }, 300) 121 | }, 122 | getSelectorQuery() { 123 | // #ifndef APP-NVUE 124 | const views = uni.createSelectorQuery().in(this); 125 | views 126 | .selectAll('.selector-query-hock') 127 | .boundingClientRect(data => { 128 | console.log(data) 129 | this.position.content = data[1] 130 | this.position.button = data[0] 131 | if (this.autoClose) return 132 | if (this.show) { 133 | this.open() 134 | } else { 135 | this.close() 136 | } 137 | }) 138 | .exec() 139 | // #endif 140 | // #ifdef APP-NVUE 141 | dom.getComponentRect(this.$refs['selector-content-hock'], (data) => { 142 | if (this.position.content) return 143 | this.position.content = data.size 144 | }) 145 | dom.getComponentRect(this.$refs['selector-button-hock'], (data) => { 146 | if (this.position.button) return 147 | this.position.button = data.size 148 | if (this.autoClose) return 149 | if (this.show) { 150 | this.open() 151 | } else { 152 | this.close() 153 | } 154 | }) 155 | // #endif 156 | } 157 | } 158 | } 159 | -------------------------------------------------------------------------------- /JinRiXiaoYuan/components/uni-rate/uni-rate.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 132 | 133 | -------------------------------------------------------------------------------- /JinRiXiaoYuan/components/uni-drawer/uni-drawer.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 95 | 96 | -------------------------------------------------------------------------------- /JinRiXiaoYuan/components/uni-grid-item/uni-grid-item copy.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 68 | 69 | -------------------------------------------------------------------------------- /JinRiXiaoYuan/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "今日校园", 3 | "appid" : "__UNI__F8B770E", 4 | "description" : "今日校园", 5 | "versionName" : "10", 6 | "versionCode" : "100", 7 | "transformPx" : false, 8 | "app-plus" : { 9 | "confusion" : { 10 | "description" : "原生混淆", 11 | "resources" : { 12 | "main.js" : {} 13 | } 14 | }, 15 | "nvueCompiler" : "uni-app", 16 | "compilerVersion" : 3, 17 | "modules" : {}, 18 | "distribute" : { 19 | "android" : { 20 | "permissions" : [ 21 | "", 22 | "", 23 | "", 24 | "", 25 | "", 26 | "", 27 | "", 28 | "", 29 | "", 30 | "", 31 | "", 32 | "", 33 | "", 34 | "", 35 | "", 36 | "", 37 | "", 38 | "", 39 | "", 40 | "", 41 | "", 42 | "" 43 | ] 44 | }, 45 | "ios" : {}, 46 | "sdkConfigs" : { 47 | "ad" : {} 48 | }, 49 | "icons" : { 50 | "android" : { 51 | "hdpi" : "unpackage/res/icons/72x72.png", 52 | "xhdpi" : "unpackage/res/icons/96x96.png", 53 | "xxhdpi" : "unpackage/res/icons/144x144.png", 54 | "xxxhdpi" : "unpackage/res/icons/192x192.png" 55 | }, 56 | "ios" : { 57 | "appstore" : "unpackage/res/icons/1024x1024.png", 58 | "ipad" : { 59 | "app" : "unpackage/res/icons/76x76.png", 60 | "app@2x" : "unpackage/res/icons/152x152.png", 61 | "notification" : "unpackage/res/icons/20x20.png", 62 | "notification@2x" : "unpackage/res/icons/40x40.png", 63 | "proapp@2x" : "unpackage/res/icons/167x167.png", 64 | "settings" : "unpackage/res/icons/29x29.png", 65 | "settings@2x" : "unpackage/res/icons/58x58.png", 66 | "spotlight" : "unpackage/res/icons/40x40.png", 67 | "spotlight@2x" : "unpackage/res/icons/80x80.png" 68 | }, 69 | "iphone" : { 70 | "app@2x" : "unpackage/res/icons/120x120.png", 71 | "app@3x" : "unpackage/res/icons/180x180.png", 72 | "notification@2x" : "unpackage/res/icons/40x40.png", 73 | "notification@3x" : "unpackage/res/icons/60x60.png", 74 | "settings@2x" : "unpackage/res/icons/58x58.png", 75 | "settings@3x" : "unpackage/res/icons/87x87.png", 76 | "spotlight@2x" : "unpackage/res/icons/80x80.png", 77 | "spotlight@3x" : "unpackage/res/icons/120x120.png" 78 | } 79 | } 80 | } 81 | } 82 | }, 83 | "quickapp" : {}, 84 | "mp-weixin" : { 85 | "appid" : "", 86 | "setting" : { 87 | "urlCheck" : true 88 | } 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /JinRiXiaoYuan/components/uni-calendar/uni-calendar-item.vue: -------------------------------------------------------------------------------- 1 | 41 | 42 | 75 | 76 | -------------------------------------------------------------------------------- /JinRiXiaoYuan/components/uni-number-box/uni-number-box.vue: -------------------------------------------------------------------------------- 1 | 12 | 120 | -------------------------------------------------------------------------------- /JinRiXiaoYuan/components/uni-combox/uni-combox.vue: -------------------------------------------------------------------------------- 1 | 22 | 23 | 126 | 127 | -------------------------------------------------------------------------------- /JinRiXiaoYuan/components/uni-pagination/uni-pagination.vue: -------------------------------------------------------------------------------- 1 | 22 | 23 | 118 | 119 | -------------------------------------------------------------------------------- /JinRiXiaoYuan/components/uni-tag/uni-tag.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 85 | 86 | -------------------------------------------------------------------------------- /JinRiXiaoYuan/components/uni-search-bar/uni-search-bar.vue: -------------------------------------------------------------------------------- 1 | 21 | 22 | 138 | 139 | -------------------------------------------------------------------------------- /JinRiXiaoYuan/components/uni-popup/uni-popup-dialog.vue: -------------------------------------------------------------------------------- 1 | 21 | 22 | 149 | 150 | -------------------------------------------------------------------------------- /JinRiXiaoYuan/components/uni-countdown/uni-countdown.vue: -------------------------------------------------------------------------------- 1 | 13 | 167 | -------------------------------------------------------------------------------- /JinRiXiaoYuan/components/uni-goods-nav/uni-goods-nav.vue: -------------------------------------------------------------------------------- 1 | 26 | 27 | 99 | 100 | -------------------------------------------------------------------------------- /JinRiXiaoYuan/components/uni-collapse-item/uni-collapse-item.vue: -------------------------------------------------------------------------------- 1 | 22 | 23 | 114 | 115 | -------------------------------------------------------------------------------- /JinRiXiaoYuan/components/uni-swipe-action-item/index.wxs: -------------------------------------------------------------------------------- 1 | /** 2 | * 监听页面内值的变化,主要用于动态开关swipe-action 3 | * @param {Object} newValue 4 | * @param {Object} oldValue 5 | * @param {Object} ownerInstance 6 | * @param {Object} instance 7 | */ 8 | function sizeReady(newValue, oldValue, ownerInstance, instance) { 9 | var state = instance.getState() 10 | state.position = JSON.parse(newValue) 11 | if (!state.position || state.position.length === 0) return 12 | var show = state.position[0].show 13 | state.left = state.left || state.position[0].left; 14 | // 通过用户变量,开启或关闭 15 | if (show) { 16 | openState(true, instance, ownerInstance) 17 | } else { 18 | openState(false, instance, ownerInstance) 19 | } 20 | } 21 | 22 | /** 23 | * 开始触摸操作 24 | * @param {Object} e 25 | * @param {Object} ins 26 | */ 27 | function touchstart(e, ins) { 28 | var instance = e.instance; 29 | var state = instance.getState(); 30 | var pageX = e.touches[0].pageX; 31 | // 开始触摸时移除动画类 32 | instance.removeClass('ani'); 33 | var owner = ins.selectAllComponents('.button-hock') 34 | for (var i = 0; i < owner.length; i++) { 35 | owner[i].removeClass('ani'); 36 | } 37 | // state.position = JSON.parse(instance.getDataset().position); 38 | state.left = state.left || state.position[0].left; 39 | // 获取最终按钮组的宽度 40 | state.width = pageX - state.left; 41 | ins.callMethod('closeSwipe') 42 | } 43 | 44 | /** 45 | * 开始滑动操作 46 | * @param {Object} e 47 | * @param {Object} ownerInstance 48 | */ 49 | function touchmove(e, ownerInstance) { 50 | var instance = e.instance; 51 | var disabled = instance.getDataset().disabled 52 | var state = instance.getState() 53 | // fix by mehaotian, TODO 兼容 app-vue 获取dataset为字符串 , h5 获取 为 undefined 的问题,待框架修复 54 | disabled = (typeof(disabled) === 'string' ? JSON.parse(disabled) : disabled) || false; 55 | 56 | if (disabled) return 57 | var pageX = e.touches[0].pageX; 58 | move(pageX - state.width, instance, ownerInstance) 59 | } 60 | 61 | /** 62 | * 结束触摸操作 63 | * @param {Object} e 64 | * @param {Object} ownerInstance 65 | */ 66 | function touchend(e, ownerInstance) { 67 | var instance = e.instance; 68 | var disabled = instance.getDataset().disabled 69 | var state = instance.getState() 70 | 71 | // fix by mehaotian, TODO 兼容 app-vue 获取dataset为字符串 , h5 获取 为 undefined 的问题,待框架修复 72 | disabled = (typeof(disabled) === 'string' ? JSON.parse(disabled) : disabled) || false; 73 | 74 | if (disabled) return 75 | // 滑动过程中触摸结束,通过阙值判断是开启还是关闭 76 | // fixed by mehaotian 定时器解决点击按钮,touchend 触发比 click 事件时机早的问题 ,主要是 ios13 77 | moveDirection(state.left, -40, instance, ownerInstance) 78 | } 79 | 80 | /** 81 | * 设置移动距离 82 | * @param {Object} value 83 | * @param {Object} instance 84 | * @param {Object} ownerInstance 85 | */ 86 | function move(value, instance, ownerInstance) { 87 | var state = instance.getState() 88 | // 获取可滑动范围 89 | var x = Math.max(-state.position[1].width, Math.min((value), 0)); 90 | state.left = x; 91 | instance.setStyle({ 92 | transform: 'translateX(' + x + 'px)', 93 | '-webkit-transform': 'translateX(' + x + 'px)' 94 | }) 95 | // 折叠按钮动画 96 | buttonFold(x, instance, ownerInstance) 97 | } 98 | 99 | /** 100 | * 移动方向判断 101 | * @param {Object} left 102 | * @param {Object} value 103 | * @param {Object} ownerInstance 104 | * @param {Object} ins 105 | */ 106 | function moveDirection(left, value, ins, ownerInstance) { 107 | var state = ins.getState() 108 | var position = state.position 109 | var isopen = state.isopen 110 | if (!position[1].width) { 111 | openState(false, ins, ownerInstance) 112 | return 113 | } 114 | // 如果已经是打开状态,进行判断是否关闭,还是保留打开状态 115 | if (isopen) { 116 | if (-left <= position[1].width) { 117 | openState(false, ins, ownerInstance) 118 | } else { 119 | openState(true, ins, ownerInstance) 120 | } 121 | return 122 | } 123 | // 如果是关闭状态,进行判断是否打开,还是保留关闭状态 124 | if (left <= value) { 125 | openState(true, ins, ownerInstance) 126 | } else { 127 | openState(false, ins, ownerInstance) 128 | } 129 | } 130 | 131 | /** 132 | * 设置按钮移动距离 133 | * @param {Object} value 134 | * @param {Object} instance 135 | * @param {Object} ownerInstance 136 | */ 137 | function buttonFold(value, instance, ownerInstance) { 138 | var ins = ownerInstance.selectAllComponents('.button-hock'); 139 | var state = instance.getState(); 140 | var position = state.position; 141 | var arr = []; 142 | var w = 0; 143 | for (var i = 0; i < ins.length; i++) { 144 | if (!ins[i].getDataset().button) return 145 | var btnData = JSON.parse(ins[i].getDataset().button) 146 | 147 | // fix by mehaotian TODO 在 app-vue 中,字符串转对象,需要转两次,这里先这么兼容 148 | if (typeof(btnData) === 'string') { 149 | btnData = JSON.parse(btnData) 150 | } 151 | 152 | var button = btnData[i] && btnData[i].width || 0 153 | w += button 154 | arr.push(-w) 155 | // 动态计算按钮组每个按钮的折叠动画移动距离 156 | var distance = arr[i - 1] + value * (arr[i - 1] / position[1].width) 157 | if (i != 0) { 158 | ins[i].setStyle({ 159 | transform: 'translateX(' + distance + 'px)', 160 | }) 161 | } 162 | } 163 | } 164 | 165 | /** 166 | * 开启状态 167 | * @param {Boolean} type 168 | * @param {Object} ins 169 | * @param {Object} ownerInstance 170 | */ 171 | function openState(type, ins, ownerInstance) { 172 | var state = ins.getState() 173 | var position = state.position 174 | if (state.isopen === undefined) { 175 | state.isopen = false 176 | } 177 | // 只有状态有改变才会通知页面改变状态 178 | if (state.isopen !== type) { 179 | // 通知页面,已经打开 180 | ownerInstance.callMethod('change', { 181 | open: type 182 | }) 183 | } 184 | // 设置打开和移动状态 185 | state.isopen = type 186 | 187 | 188 | // 添加动画类 189 | ins.addClass('ani'); 190 | var owner = ownerInstance.selectAllComponents('.button-hock') 191 | for (var i = 0; i < owner.length; i++) { 192 | owner[i].addClass('ani'); 193 | } 194 | // 设置最终移动位置 195 | move(type ? -position[1].width : 0, ins, ownerInstance) 196 | 197 | } 198 | 199 | module.exports = { 200 | sizeReady: sizeReady, 201 | touchstart: touchstart, 202 | touchmove: touchmove, 203 | touchend: touchend 204 | } 205 | -------------------------------------------------------------------------------- /JinRiXiaoYuan/components/uni-nav-bar/uni-nav-bar.vue: -------------------------------------------------------------------------------- 1 | 42 | 43 | 114 | 115 | 225 | -------------------------------------------------------------------------------- /JinRiXiaoYuan/components/uni-swiper-dot/uni-swiper-dot.vue: -------------------------------------------------------------------------------- 1 | 25 | 26 | 111 | 112 | -------------------------------------------------------------------------------- /JinRiXiaoYuan/components/uni-swipe-action-item/bindingx.js: -------------------------------------------------------------------------------- 1 | const BindingX = uni.requireNativePlugin('bindingx'); 2 | const dom = uni.requireNativePlugin('dom'); 3 | const animation = uni.requireNativePlugin('animation'); 4 | 5 | export default { 6 | data() { 7 | return { 8 | right: 0, 9 | button: [], 10 | preventGesture: false 11 | } 12 | }, 13 | 14 | watch: { 15 | show(newVal) { 16 | if (!this.position || JSON.stringify(this.position) === '{}') return; 17 | if (this.autoClose) return 18 | if (this.isInAnimation) return 19 | if (newVal) { 20 | this.open() 21 | } else { 22 | this.close() 23 | } 24 | }, 25 | }, 26 | created() { 27 | if (this.swipeaction.children !== undefined) { 28 | this.swipeaction.children.push(this) 29 | } 30 | }, 31 | mounted() { 32 | this.boxSelector = this.getEl(this.$refs['selector-box-hock']); 33 | this.selector = this.getEl(this.$refs['selector-content-hock']); 34 | this.buttonSelector = this.getEl(this.$refs['selector-button-hock']); 35 | this.position = {} 36 | this.x = 0 37 | setTimeout(() => { 38 | this.getSelectorQuery() 39 | }, 200) 40 | }, 41 | beforeDestroy() { 42 | if (this.timing) { 43 | BindingX.unbind({ 44 | token: this.timing.token, 45 | eventType: 'timing' 46 | }) 47 | } 48 | if (this.eventpan) { 49 | BindingX.unbind({ 50 | token: this.eventpan.token, 51 | eventType: 'pan' 52 | }) 53 | } 54 | this.swipeaction.children.forEach((item, index) => { 55 | if (item === this) { 56 | this.swipeaction.children.splice(index, 1) 57 | } 58 | }) 59 | }, 60 | methods: { 61 | onClick(index, item) { 62 | this.$emit('click', { 63 | content: item, 64 | index 65 | }) 66 | }, 67 | touchstart(e) { 68 | if (this.isInAnimation) return 69 | if (this.stop) return 70 | this.stop = true 71 | if (this.autoClose) { 72 | this.swipeaction.closeOther(this) 73 | } 74 | let endWidth = this.right 75 | let boxStep = `(x+${this.x})` 76 | let pageX = `${boxStep}> ${-endWidth} && ${boxStep} < 0?${boxStep}:(x+${this.x} < 0? ${-endWidth}:0)` 77 | 78 | let props = [{ 79 | element: this.selector, 80 | property: 'transform.translateX', 81 | expression: pageX 82 | }] 83 | 84 | let left = 0 85 | for (let i = 0; i < this.options.length; i++) { 86 | let buttonSelectors = this.getEl(this.$refs['button-hock'][i]); 87 | if (this.button.length === 0 || !this.button[i] || !this.button[i].width) return 88 | let moveMix = endWidth - left 89 | left += this.button[i].width 90 | let step = `(${this.x}+x)/${endWidth}` 91 | let moveX = `(${step}) * ${moveMix}` 92 | let pageButtonX = `${moveX}&& (x+${this.x} > ${-endWidth})?${moveX}:${-moveMix}` 93 | props.push({ 94 | element: buttonSelectors, 95 | property: 'transform.translateX', 96 | expression: pageButtonX 97 | }) 98 | } 99 | 100 | this.eventpan = this._bind(this.boxSelector, props, 'pan', (e) => { 101 | if (e.state === 'end') { 102 | this.x = e.deltaX + this.x; 103 | if (this.x < -endWidth) { 104 | this.x = -endWidth 105 | } 106 | if (this.x > 0) { 107 | this.x = 0 108 | } 109 | this.stop = false 110 | this.bindTiming(); 111 | } 112 | }) 113 | }, 114 | touchend(e) { 115 | this.$nextTick(() => { 116 | if (this.isopen && !this.isDrag && !this.isInAnimation) { 117 | this.close() 118 | } 119 | }) 120 | }, 121 | bindTiming() { 122 | if (this.isopen) { 123 | this.move(this.x, -this.right) 124 | } else { 125 | this.move(this.x, -40) 126 | } 127 | }, 128 | move(left, value) { 129 | if (left >= value) { 130 | this.close() 131 | } else { 132 | this.open() 133 | } 134 | }, 135 | /** 136 | * 开启swipe 137 | */ 138 | open() { 139 | this.animation(true) 140 | }, 141 | /** 142 | * 关闭swipe 143 | */ 144 | close() { 145 | this.animation(false) 146 | }, 147 | /** 148 | * 开启关闭动画 149 | * @param {Object} type 150 | */ 151 | animation(type) { 152 | this.isDrag = true 153 | let endWidth = this.right 154 | let time = 200 155 | this.isInAnimation = true; 156 | 157 | let exit = `t>${time}`; 158 | let translate_x_expression = `easeOutExpo(t,${this.x},${type?(-endWidth-this.x):(-this.x)},${time})` 159 | let props = [{ 160 | element: this.selector, 161 | property: 'transform.translateX', 162 | expression: translate_x_expression 163 | }] 164 | 165 | let left = 0 166 | for (let i = 0; i < this.options.length; i++) { 167 | let buttonSelectors = this.getEl(this.$refs['button-hock'][i]); 168 | if (this.button.length === 0 || !this.button[i] || !this.button[i].width) return 169 | let moveMix = endWidth - left 170 | left += this.button[i].width 171 | let step = `${this.x}/${endWidth}` 172 | let moveX = `(${step}) * ${moveMix}` 173 | let pageButtonX = `easeOutExpo(t,${moveX},${type ? -moveMix + '-' + moveX: 0 + '-' + moveX},${time})` 174 | props.push({ 175 | element: buttonSelectors, 176 | property: 'transform.translateX', 177 | expression: pageButtonX 178 | }) 179 | } 180 | 181 | this.timing = BindingX.bind({ 182 | eventType: 'timing', 183 | exitExpression: exit, 184 | props: props 185 | }, (e) => { 186 | if (e.state === 'end' || e.state === 'exit') { 187 | this.x = type ? -endWidth : 0 188 | this.isInAnimation = false; 189 | 190 | this.isopen = this.isopen || false 191 | if (this.isopen !== type) { 192 | this.$emit('change', type) 193 | } 194 | this.isopen = type 195 | this.isDrag = false 196 | } 197 | }); 198 | }, 199 | /** 200 | * 绑定 BindingX 201 | * @param {Object} anchor 202 | * @param {Object} props 203 | * @param {Object} fn 204 | */ 205 | _bind(anchor, props, eventType, fn) { 206 | return BindingX.bind({ 207 | anchor, 208 | eventType, 209 | props 210 | }, (e) => { 211 | typeof(fn) === 'function' && fn(e) 212 | }); 213 | }, 214 | /** 215 | * 获取ref 216 | * @param {Object} el 217 | */ 218 | getEl(el) { 219 | return el.ref 220 | }, 221 | /** 222 | * 获取节点信息 223 | */ 224 | getSelectorQuery() { 225 | dom.getComponentRect(this.$refs['selector-content-hock'], (data) => { 226 | if (this.position.content) return 227 | this.position.content = data.size 228 | }) 229 | for (let i = 0; i < this.options.length; i++) { 230 | dom.getComponentRect(this.$refs['button-hock'][i], (data) => { 231 | if (!this.button) { 232 | this.button = [] 233 | } 234 | if (this.options.length === this.button.length) return 235 | this.button.push(data.size) 236 | this.right += data.size.width 237 | if (this.autoClose) return 238 | if (this.show) { 239 | this.open() 240 | } 241 | }) 242 | } 243 | } 244 | } 245 | } 246 | -------------------------------------------------------------------------------- /JinRiXiaoYuan/components/uni-popup/uni-popup.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 206 | -------------------------------------------------------------------------------- /JinRiXiaoYuan/components/uni-transition/uni-transition.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 217 | 218 | -------------------------------------------------------------------------------- /JinRiXiaoYuan/components/uni-steps/uni-steps.vue: -------------------------------------------------------------------------------- 1 | 23 | 24 | 77 | 78 | -------------------------------------------------------------------------------- /JinRiXiaoYuan/components/uni-list-item/uni-list-item.vue: -------------------------------------------------------------------------------- 1 | 31 | 32 | 155 | 156 | -------------------------------------------------------------------------------- /JinRiXiaoYuan/pages/index/index.vue: -------------------------------------------------------------------------------- 1 | 36 | 37 | 143 | 144 | 298 | -------------------------------------------------------------------------------- /JinRiXiaoYuan/pages/checkSuccess/checkSuccess.vue: -------------------------------------------------------------------------------- 1 | 60 | 61 | 105 | 106 | 283 | --------------------------------------------------------------------------------