From aa2980c5e3f9c3732d64d07aca3d57f9bd319cd8 Mon Sep 17 00:00:00 2001 From: xiayt Date: Sat, 10 Sep 2022 15:01:25 +0800 Subject: [PATCH] feat:创建应用 --- .gitignore | 4 ++++ README.md | 7 +++++++ api/request.js | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ app.js | 126 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ app.json | 40 ++++++++++++++++++++++++++++++++++++++++ app.wxss | 28 ++++++++++++++++++++++++++++ config.js | 12 ++++++++++++ img/_check_in1.png | Bin 0 -> 39698 bytes img/_check_in2.png | Bin 0 -> 40998 bytes img/_check_in3.png | Bin 0 -> 180810 bytes img/_check_in4.jpg | Bin 0 -> 108351 bytes img/_index1.png | Bin 0 -> 67290 bytes img/_index2.jpg | Bin 0 -> 132396 bytes img/_index3.png | Bin 0 -> 40296 bytes img/_mine.png | Bin 0 -> 75593 bytes img/_my_punch1.png | Bin 0 -> 39497 bytes img/_my_punch2.png | Bin 0 -> 39983 bytes img/_new_punch.png | Bin 0 -> 67793 bytes img/_rank.png | Bin 0 -> 117247 bytes img/tab_home_normat.png | Bin 0 -> 451 bytes img/tab_home_selected.png | Bin 0 -> 454 bytes img/tab_mine_normat.png | Bin 0 -> 450 bytes img/tab_mine_selected.png | Bin 0 -> 445 bytes package-lock.json | 28 ++++++++++++++++++++++++++++ package.json | 18 ++++++++++++++++++ pages/index/index.js | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ pages/index/index.json | 7 +++++++ pages/index/index.wxml | 14 ++++++++++++++ pages/index/index.wxss | 0 pages/index/newPunch/newPunch.js | 33 +++++++++++++++++++++++++++++++++ pages/index/newPunch/newPunch.json | 6 ++++++ pages/index/newPunch/newPunch.wxml | 11 +++++++++++ pages/index/newPunch/newPunch.wxss | 1 + pages/index/punchDetail/punchDetail.js | 47 +++++++++++++++++++++++++++++++++++++++++++++++ pages/index/punchDetail/punchDetail.json | 7 +++++++ pages/index/punchDetail/punchDetail.wxml | 16 ++++++++++++++++ pages/index/punchDetail/punchDetail.wxss | 1 + pages/index/rank/rank.js | 26 ++++++++++++++++++++++++++ pages/index/rank/rank.json | 6 ++++++ pages/index/rank/rank.wxml | 9 +++++++++ pages/index/rank/rank.wxss | 1 + pages/login/codeLogin/codeLogin.js | 406 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ pages/login/codeLogin/codeLogin.json | 6 ++++++ pages/login/codeLogin/codeLogin.wxml | 38 ++++++++++++++++++++++++++++++++++++++ pages/login/codeLogin/codeLogin.wxss | 129 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ pages/login/policy/policy.js | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ pages/login/policy/policy.json | 3 +++ pages/login/policy/policy.wxml | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ pages/login/policy/policy.wxss | 17 +++++++++++++++++ pages/login/protocol/protocol.js | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ pages/login/protocol/protocol.json | 3 +++ pages/login/protocol/protocol.wxml | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ pages/login/protocol/protocol.wxss | 10 ++++++++++ pages/mine/index.js | 23 +++++++++++++++++++++++ pages/mine/index.json | 8 ++++++++ pages/mine/index.wxml | 6 ++++++ pages/mine/index.wxss | 0 pages/mine/record/record.js | 37 +++++++++++++++++++++++++++++++++++++ pages/mine/record/record.json | 6 ++++++ pages/mine/record/record.wxml | 14 ++++++++++++++ pages/mine/record/record.wxss | 1 + pages/webview/webview.js | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ pages/webview/webview.json | 3 +++ pages/webview/webview.wxml | 2 ++ pages/webview/webview.wxss | 1 + project.config.json | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ project.private.config.json | 7 +++++++ sitemap.json | 7 +++++++ utils/md5.js | 514 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 升学汇打卡小程序-计划管家 | 0 70 files changed, 2230 insertions(+), 0 deletions(-) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 api/request.js create mode 100644 app.js create mode 100644 app.json create mode 100644 app.wxss create mode 100644 config.js create mode 100644 img/_check_in1.png create mode 100644 img/_check_in2.png create mode 100644 img/_check_in3.png create mode 100644 img/_check_in4.jpg create mode 100644 img/_index1.png create mode 100644 img/_index2.jpg create mode 100644 img/_index3.png create mode 100644 img/_mine.png create mode 100644 img/_my_punch1.png create mode 100644 img/_my_punch2.png create mode 100644 img/_new_punch.png create mode 100644 img/_rank.png create mode 100644 img/tab_home_normat.png create mode 100644 img/tab_home_selected.png create mode 100644 img/tab_mine_normat.png create mode 100644 img/tab_mine_selected.png create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 pages/index/index.js create mode 100644 pages/index/index.json create mode 100644 pages/index/index.wxml create mode 100644 pages/index/index.wxss create mode 100644 pages/index/newPunch/newPunch.js create mode 100644 pages/index/newPunch/newPunch.json create mode 100644 pages/index/newPunch/newPunch.wxml create mode 100644 pages/index/newPunch/newPunch.wxss create mode 100644 pages/index/punchDetail/punchDetail.js create mode 100644 pages/index/punchDetail/punchDetail.json create mode 100644 pages/index/punchDetail/punchDetail.wxml create mode 100644 pages/index/punchDetail/punchDetail.wxss create mode 100644 pages/index/rank/rank.js create mode 100644 pages/index/rank/rank.json create mode 100644 pages/index/rank/rank.wxml create mode 100644 pages/index/rank/rank.wxss create mode 100644 pages/login/codeLogin/codeLogin.js create mode 100644 pages/login/codeLogin/codeLogin.json create mode 100644 pages/login/codeLogin/codeLogin.wxml create mode 100644 pages/login/codeLogin/codeLogin.wxss create mode 100644 pages/login/policy/policy.js create mode 100644 pages/login/policy/policy.json create mode 100644 pages/login/policy/policy.wxml create mode 100644 pages/login/policy/policy.wxss create mode 100644 pages/login/protocol/protocol.js create mode 100644 pages/login/protocol/protocol.json create mode 100644 pages/login/protocol/protocol.wxml create mode 100644 pages/login/protocol/protocol.wxss create mode 100644 pages/mine/index.js create mode 100644 pages/mine/index.json create mode 100644 pages/mine/index.wxml create mode 100644 pages/mine/index.wxss create mode 100644 pages/mine/record/record.js create mode 100644 pages/mine/record/record.json create mode 100644 pages/mine/record/record.wxml create mode 100644 pages/mine/record/record.wxss create mode 100644 pages/webview/webview.js create mode 100644 pages/webview/webview.json create mode 100644 pages/webview/webview.wxml create mode 100644 pages/webview/webview.wxss create mode 100644 project.config.json create mode 100644 project.private.config.json create mode 100644 sitemap.json create mode 100644 utils/md5.js create mode 100644 升学汇打卡小程序-计划管家 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c693c8e --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ + +# Node.js +node_modules/ +miniprogram_npm/ \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..a7e8542 --- /dev/null +++ b/README.md @@ -0,0 +1,7 @@ +# 计划管家sxhClockIn +已引入vant weapp https://vant-contrib.gitee.io/vant-weapp/#/home 完成开发步骤后可直接使用 +## 开发步骤 +- 克隆 +- 打开微信开发者工具 +- npm i +- 点击 工具 -> 构建 npm,并勾选 使用 npm 模块 选项 \ No newline at end of file diff --git a/api/request.js b/api/request.js new file mode 100644 index 0000000..3a6728d --- /dev/null +++ b/api/request.js @@ -0,0 +1,48 @@ +import { + host +} from '../config.js' +const request = options => { + return new Promise((resolve, reject) => { + const { + data, + method, + url, + header + } = options + if (data && method !== 'get'&&!header) { + options.data = JSON.stringify(data) + } + options.url = `${host}` + url + wx.request({ + header: header?header:{ + 'Content-Type': 'application/json' + }, + ...options, + success: function (res) { + // console.log(res); + // wx.request成功发出了请求,无论返回什么http状态码,都会走success + if (res.statusCode === 200) { + resolve(res.data) + } else { + // reject(res.data) + wx.showToast({ + title: res.data.error, + icon: 'none', + duration: 2000 + }) + } + }, + fail: function (res) { + // 遇到断网,域名解析有问题,或者尤其是我们去调用restful api时,可能会在url格式,参数类型上出些问题,这些情况下才会调用到fail + reject(res.data) + wx.hideLoading() + wx.showToast({ + title: '接口调用失败', + icon: 'none', + duration: 2000 + }) + } + }) + }) +} +export default request \ No newline at end of file diff --git a/app.js b/app.js new file mode 100644 index 0000000..c567dc6 --- /dev/null +++ b/app.js @@ -0,0 +1,126 @@ +App({ + onLaunch: function () { + let that = this; + wx.getSystemInfo({ + success: res => { + let modelmes = res.model; + if (modelmes.search('iPhone X') != -1 || modelmes.search('iPhone 11') != -1 || modelmes.search('iPhone 12') != -1 || modelmes.search('iPhone 13') != -1 || modelmes.search('iPhone 14') != -1) { + that.globalData.isIphoneX = true + } + } + }) + this.overShare() + const { + model, + system, + statusBarHeight + } = wx.getSystemInfoSync() + let headHeight + if (/iphone\s{0,}x/i.test(model)) { + headHeight = 88 + } else if (system.indexOf('Android') !== -1) { + headHeight = 68 + } else { + headHeight = 64 + } + this.globalData.headerHeight = headHeight + this.globalData.statusBarHeight = statusBarHeight + this.autoUpdate() + }, + //重写分享方法 + overShare: function (options) { + //监听路由切换 + wx.onAppRoute(function (res) { + let userInfo = wx.getStorageSync('userInfo') + let name = "您的好友" + if (userInfo) { + name = userInfo.userName; + } + //获取加载的页面 + let pages = getCurrentPages(), + //获取当前页面的对象 + view = pages[pages.length - 1] + if (view) { + view.onShareAppMessage = function () { + //你的分享配置 + return { + title: name + '推荐大家都在用的升学大数据宝典', + path: '/pages/index/index', + imageUrl: 'https://proxy.shunzhi.net:51315/mp_share2.jpg', + }; + } + } + }) + }, + autoUpdate: function () { + var self = this + // 获取小程序更新机制兼容 + if (wx.canIUse('getUpdateManager')) { + const updateManager = wx.getUpdateManager() + //1. 检查小程序是否有新版本发布 + updateManager.onCheckForUpdate(function (res) { + // 请求完新版本信息的回调 + if (res.hasUpdate) { + //检测到新版本,需要更新,给出提示 + wx.showModal({ + title: '更新提示', + content: '检测到新版本,是否下载新版本并重启小程序?', + success: function (res) { + if (res.confirm) { + //2. 用户确定下载更新小程序,小程序下载及更新静默进行 + self.downLoadAndUpdate(updateManager) + } else if (res.cancel) { + //用户点击取消按钮的处理,如果需要强制更新,则给出二次弹窗,如果不需要,则这里的代码都可以删掉了 + wx.showModal({ + title: '温馨提示~', + content: '本次版本更新涉及到新的功能添加,旧版本无法正常访问的哦~', + showCancel: false, //隐藏取消按钮 + confirmText: "确定更新", //只保留确定更新按钮 + success: function (res) { + if (res.confirm) { + //下载新版本,并重新应用 + self.downLoadAndUpdate(updateManager) + } + } + }) + } + } + }) + } + }) + } else { + // 如果希望用户在最新版本的客户端上体验您的小程序,可以这样子提示 + wx.showModal({ + title: '提示', + content: '当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。' + }) + } + }, + /** + * 下载小程序新版本并重启应用 + */ + downLoadAndUpdate: function (updateManager) { + var self = this + wx.showLoading(); + //静默下载更新小程序新版本 + updateManager.onUpdateReady(function () { + wx.hideLoading() + //新的版本已经下载好,调用 applyUpdate 应用新版本并重启 + updateManager.applyUpdate() + }) + updateManager.onUpdateFailed(function () { + // 新的版本下载失败 + wx.showModal({ + title: '已经有新版本了哟~', + content: '新版本已经上线啦~,请您删除当前小程序,重新搜索打开哟~', + }) + }) + }, + + + globalData: { + isIphoneX: false, + headerHeight: 0, + statusBarHeight: 0, + } +}) \ No newline at end of file diff --git a/app.json b/app.json new file mode 100644 index 0000000..4a1021b --- /dev/null +++ b/app.json @@ -0,0 +1,40 @@ +{ + "pages": [ + "pages/index/index", + "pages/index/rank/rank", + "pages/index/punchDetail/punchDetail", + "pages/index/newPunch/newPunch", + "pages/login/codeLogin/codeLogin", + "pages/login/protocol/protocol", + "pages/login/policy/policy", + "pages/mine/index", + "pages/mine/record/record", + "pages/webview/webview" + ], + "window": { + "backgroundTextStyle": "dark", + "navigationBarBackgroundColor": "#fff", + "navigationBarTitleText": "计划管家", + "navigationBarTextStyle": "black" + }, + "tabBar": { + "color": "#909090", + "selectedColor": "#5B97F2", + "borderStyle": "white", + "list": [ + { + "pagePath": "pages/index/index", + "text": "首页", + "iconPath": "./img/tab_home_normat.png", + "selectedIconPath": "./img/tab_home_selected.png" + }, + { + "pagePath": "pages/mine/index", + "text": "我的", + "iconPath": "./img/tab_mine_normat.png", + "selectedIconPath": "./img/tab_mine_selected.png" + } + ] + }, + "sitemapLocation": "sitemap.json" +} \ No newline at end of file diff --git a/app.wxss b/app.wxss new file mode 100644 index 0000000..0fdfe64 --- /dev/null +++ b/app.wxss @@ -0,0 +1,28 @@ +/* @import "/miniprogram_npm/@vant/weapp/common/index.wxss"; */ +page{ + background: #fff; +} +/* 二级页面顶部统一返回按钮,位置可能需要根据机型调整 */ +.navigation_back{ + width: 80rpx; + height: 80rpx; + border: 1px solid rgb(255, 207, 105); + position: absolute; + top: 80rpx; + left: 0; + z-index: 99; + display: flex; + align-items: center; + justify-content: center; +} +/* 临时文件,设计稿图 */ +.temporary{ + width: 100%; + position: absolute; + top: 0; + left: 0; +} +.temporary_box{ + border: 1px solid rgb(255, 207, 105); + z-index: 98; +} \ No newline at end of file diff --git a/config.js b/config.js new file mode 100644 index 0000000..a6b116b --- /dev/null +++ b/config.js @@ -0,0 +1,12 @@ +//域名要在小程序的管理平台配置好,如果出现调用时报错,无效的域名,可在微信开发工具左边点项目-》配置信息-》看一下配置的域名【request合法域名】有没有刷新下来,没有的话就点下面的刷新 + +let host = 'https://proxy.shunzhi.net/'; //正式 + +let file = 'https://wxsxh.myjxt.com:51314/file-center/'; //图片上传 + +let config = { + host, + file, +}; +//对外把对象config返回 +module.exports = config \ No newline at end of file diff --git a/img/_check_in1.png b/img/_check_in1.png new file mode 100644 index 0000000..0508006 Binary files /dev/null and b/img/_check_in1.png differ diff --git a/img/_check_in2.png b/img/_check_in2.png new file mode 100644 index 0000000..52bbfd7 Binary files /dev/null and b/img/_check_in2.png differ diff --git a/img/_check_in3.png b/img/_check_in3.png new file mode 100644 index 0000000..e6d098d Binary files /dev/null and b/img/_check_in3.png differ diff --git a/img/_check_in4.jpg b/img/_check_in4.jpg new file mode 100644 index 0000000..7363f9a Binary files /dev/null and b/img/_check_in4.jpg differ diff --git a/img/_index1.png b/img/_index1.png new file mode 100644 index 0000000..b9ad49f Binary files /dev/null and b/img/_index1.png differ diff --git a/img/_index2.jpg b/img/_index2.jpg new file mode 100644 index 0000000..5438015 Binary files /dev/null and b/img/_index2.jpg differ diff --git a/img/_index3.png b/img/_index3.png new file mode 100644 index 0000000..de9df5b Binary files /dev/null and b/img/_index3.png differ diff --git a/img/_mine.png b/img/_mine.png new file mode 100644 index 0000000..a5b1895 Binary files /dev/null and b/img/_mine.png differ diff --git a/img/_my_punch1.png b/img/_my_punch1.png new file mode 100644 index 0000000..47d3e3b Binary files /dev/null and b/img/_my_punch1.png differ diff --git a/img/_my_punch2.png b/img/_my_punch2.png new file mode 100644 index 0000000..a387f73 Binary files /dev/null and b/img/_my_punch2.png differ diff --git a/img/_new_punch.png b/img/_new_punch.png new file mode 100644 index 0000000..c8ba18b Binary files /dev/null and b/img/_new_punch.png differ diff --git a/img/_rank.png b/img/_rank.png new file mode 100644 index 0000000..f380bf9 Binary files /dev/null and b/img/_rank.png differ diff --git a/img/tab_home_normat.png b/img/tab_home_normat.png new file mode 100644 index 0000000..a93322d Binary files /dev/null and b/img/tab_home_normat.png differ diff --git a/img/tab_home_selected.png b/img/tab_home_selected.png new file mode 100644 index 0000000..13f89e3 Binary files /dev/null and b/img/tab_home_selected.png differ diff --git a/img/tab_mine_normat.png b/img/tab_mine_normat.png new file mode 100644 index 0000000..a1b79af Binary files /dev/null and b/img/tab_mine_normat.png differ diff --git a/img/tab_mine_selected.png b/img/tab_mine_selected.png new file mode 100644 index 0000000..136fc9e Binary files /dev/null and b/img/tab_mine_selected.png differ diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..3ef21d8 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,28 @@ +{ + "name": "sxhClockIn", + "version": "2.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "sxhClockIn", + "version": "2.0.0", + "license": "ISC", + "dependencies": { + "@vant/weapp": "^1.10.5" + } + }, + "node_modules/@vant/weapp": { + "version": "1.10.5", + "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.5.tgz", + "integrity": "sha512-bAHp9r0ZiRsOqPOLzQHI/ZvkAlXzol1/TFhM70MyghuxkzJTjcDUd8RIfLkCN3c1MCK/PfBGw2an8/afygftCg==" + } + }, + "dependencies": { + "@vant/weapp": { + "version": "1.10.5", + "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.5.tgz", + "integrity": "sha512-bAHp9r0ZiRsOqPOLzQHI/ZvkAlXzol1/TFhM70MyghuxkzJTjcDUd8RIfLkCN3c1MCK/PfBGw2an8/afygftCg==" + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..1979798 --- /dev/null +++ b/package.json @@ -0,0 +1,18 @@ +{ + "name": "sxh_clock_in", + "version": "1.0.0", + "description": "计划管家", + "main": "app.js", + "dependencies": { + "@vant/weapp": "^1.10.5" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "http://git.shunzhi.net/sxhgroup/sxhClockIn.git" + }, + "author": "ShunZhi Inc.", + "license": "ISC" +} diff --git a/pages/index/index.js b/pages/index/index.js new file mode 100644 index 0000000..eee402d --- /dev/null +++ b/pages/index/index.js @@ -0,0 +1,68 @@ +//获取应用实例 +var app = getApp(); +import request from '../../api/request.js' + +Page({ + data: { + showAdd: false, //新建打卡 + // bannerList: [], // 轮播图 + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + // this.getBannerList() //获取banner + }, + // 排行榜 + handleRank(){ + wx.navigateTo({ + url: '/pages/index/rank/rank', + }) + }, + handleAdd() { + this.setData({ + showAdd: true + }) + }, + closeAdd() { + this.setData({ + showAdd: false + }) + }, + // 去打卡 + handleDetail(){ + wx.navigateTo({ + url: '/pages/index/punchDetail/punchDetail', + }) + }, + // 自定义模板 + handleNewPunch(){ + wx.navigateTo({ + url: '/pages/index/newPunch/newPunch', + }) + }, + // 获取banner图 + // getBannerList() { + // request({ + // url: `admin/Voluntary/GetBannerList`, + // method: 'post', + // data: { + // bannerType: 1, + // page: 1, + // pageSize: 10 + // }, + // }).then(res => { + // if (res.success) { + // this.setData({ + // bannerList: res.data.list, + // }) + // } + // }) + // }, + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + }, +}) \ No newline at end of file diff --git a/pages/index/index.json b/pages/index/index.json new file mode 100644 index 0000000..1e25e3c --- /dev/null +++ b/pages/index/index.json @@ -0,0 +1,7 @@ +{ + "usingComponents": { + "van-popup": "@vant/weapp/popup/index" + }, + "navigationBarTextStyle": "black", + "navigationStyle": "custom" +} \ No newline at end of file diff --git a/pages/index/index.wxml b/pages/index/index.wxml new file mode 100644 index 0000000..b84c8c0 --- /dev/null +++ b/pages/index/index.wxml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pages/index/index.wxss b/pages/index/index.wxss new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/pages/index/index.wxss diff --git a/pages/index/newPunch/newPunch.js b/pages/index/newPunch/newPunch.js new file mode 100644 index 0000000..f06fce9 --- /dev/null +++ b/pages/index/newPunch/newPunch.js @@ -0,0 +1,33 @@ +// pages/index/rank/rank.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + // 创建完成 + handleCreate(){ + // console.log(111) + wx.switchTab({ + url: '/pages/index/index', + }) + }, + // 统一返回 + handleBack() { + wx.navigateBack() + }, + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/pages/index/newPunch/newPunch.json b/pages/index/newPunch/newPunch.json new file mode 100644 index 0000000..e15d6dd --- /dev/null +++ b/pages/index/newPunch/newPunch.json @@ -0,0 +1,6 @@ +{ + "usingComponents": { + "van-icon": "@vant/weapp/icon/index" + }, + "navigationStyle": "custom" +} \ No newline at end of file diff --git a/pages/index/newPunch/newPunch.wxml b/pages/index/newPunch/newPunch.wxml new file mode 100644 index 0000000..1680602 --- /dev/null +++ b/pages/index/newPunch/newPunch.wxml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/pages/index/newPunch/newPunch.wxss b/pages/index/newPunch/newPunch.wxss new file mode 100644 index 0000000..3eaf729 --- /dev/null +++ b/pages/index/newPunch/newPunch.wxss @@ -0,0 +1 @@ +/* pages/index/newPunch/newPunch.wxss */ diff --git a/pages/index/punchDetail/punchDetail.js b/pages/index/punchDetail/punchDetail.js new file mode 100644 index 0000000..d732f6d --- /dev/null +++ b/pages/index/punchDetail/punchDetail.js @@ -0,0 +1,47 @@ +// pages/index/punchDetail/punchDetail.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + showEdit: false, //确认打卡 + Clocked: false, //已打卡状态,只是为了演示用 + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + // 打开打卡信息填写 + handleEdit() { + console.log(111) + this.setData({ + showEdit: true + }) + }, + // 关闭打卡信息填写 + closeEdit() { + this.setData({ + showEdit: false + }) + }, + // 提交打卡信息,跳转打卡成功页面 + handleSubmit() { + this.setData({ + Clocked: true, + showEdit: false, + }) + }, + handleBack() { + wx.navigateBack() + }, + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/pages/index/punchDetail/punchDetail.json b/pages/index/punchDetail/punchDetail.json new file mode 100644 index 0000000..1dd70fc --- /dev/null +++ b/pages/index/punchDetail/punchDetail.json @@ -0,0 +1,7 @@ +{ + "usingComponents": { + "van-icon": "@vant/weapp/icon/index", + "van-popup": "@vant/weapp/popup/index" + }, + "navigationStyle": "custom" +} \ No newline at end of file diff --git a/pages/index/punchDetail/punchDetail.wxml b/pages/index/punchDetail/punchDetail.wxml new file mode 100644 index 0000000..6ca15a3 --- /dev/null +++ b/pages/index/punchDetail/punchDetail.wxml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pages/index/punchDetail/punchDetail.wxss b/pages/index/punchDetail/punchDetail.wxss new file mode 100644 index 0000000..cd8da49 --- /dev/null +++ b/pages/index/punchDetail/punchDetail.wxss @@ -0,0 +1 @@ +/* pages/index/punchDetail/punchDetail.wxss */ diff --git a/pages/index/rank/rank.js b/pages/index/rank/rank.js new file mode 100644 index 0000000..f161f14 --- /dev/null +++ b/pages/index/rank/rank.js @@ -0,0 +1,26 @@ +// pages/index/rank/rank.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + // 统一返回 + handleBack() { + wx.navigateBack() + }, + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/pages/index/rank/rank.json b/pages/index/rank/rank.json new file mode 100644 index 0000000..e15d6dd --- /dev/null +++ b/pages/index/rank/rank.json @@ -0,0 +1,6 @@ +{ + "usingComponents": { + "van-icon": "@vant/weapp/icon/index" + }, + "navigationStyle": "custom" +} \ No newline at end of file diff --git a/pages/index/rank/rank.wxml b/pages/index/rank/rank.wxml new file mode 100644 index 0000000..7b5daac --- /dev/null +++ b/pages/index/rank/rank.wxml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/pages/index/rank/rank.wxss b/pages/index/rank/rank.wxss new file mode 100644 index 0000000..964d586 --- /dev/null +++ b/pages/index/rank/rank.wxss @@ -0,0 +1 @@ +/* pages/index/rank/rank.wxss */ diff --git a/pages/login/codeLogin/codeLogin.js b/pages/login/codeLogin/codeLogin.js new file mode 100644 index 0000000..1b8d42f --- /dev/null +++ b/pages/login/codeLogin/codeLogin.js @@ -0,0 +1,406 @@ +// pages/login/codeLogin/codeLogin.js +var app = getApp(); +var util = require('../../../utils/md5.js') +import request from '../../../api/request.js' +Page({ + + /** + * 页面的初始数据 + */ + data: { + pageShow: false, //是否显示登录页面内容 + codeCont: '获取验证码', + code: '', + loginCode: '', //wx.login获取到的code + userName: '', + session_key: '', + encryptedData: '', + iv: '', + canClick: true, // 节流 + clockTimer: null, // 定时器 + path: '', //登录后跳转页面 + modelShow: false, //完善信息 + phone: '', //getUserInfo获取到的手机号 + }, + onLoad: function (options) { + console.log('登录页options:', options) + if (options.path) { + this.setData({ + path: options.path + }) + } + let userInfo = wx.getStorageSync('userInfo') + if (userInfo) { //如果有路径,并且缓存有数据,直接跳转 + if (userInfo.userName && userInfo.graduateSchool) { + this.loginSuccess() + // console.log('已完善信息,允许登录'); + return; + } + if (userInfo.phone) { + this.setData({ + phone: userInfo.phone + }, () => { + this.getUserInfo() + }) + } + } + this.setData({ + pageShow: true + }) + wx.login({ + success: (res) => { + if (res.code) { + this.setData({ + loginCode: res.code + }) + this.getOpenId() + } else { + console.log('登录失败!' + res.errMsg) + } + } + }) + }, + login() { + if (!this.data.encryptedData || !this.data.session_key || !this.data.iv) { + wx.showToast({ + title: '一键登陆失败,请重试', + icon: 'none', + duration: 2000 + }) + } + request({ + url: `h5/user/Oneclicklogin`, + method: 'get', + data: { + "encryptedData": this.data.encryptedData, + "session_key": this.data.session_key, + "iv": this.data.iv, + }, + }).then(res => { + if (res.success) { + if (res.data) { + this.setData({ + phone: res.data.phone + }, () => { + this.getUserInfo() + }) + } else { + wx.showToast({ + title: '一键登陆失败,请重试', + icon: 'none', + duration: 2000 + }) + } + } + }) + }, + loginSuccess() { + if (this.data.path) { + // 获取三位一体的数据 + if (this.data.path == 'trinity') { + let userInfo = wx.getStorageSync('userInfo'); + wx.showLoading({ + title: '加载中...', + mask: true + }) + wx.request({ + url: api + 'h5/MyVoluntary/GetTrinity', + data: { + userId: userInfo.id + }, + method: "GET", + header: { + 'content-type': 'application/json' + }, + success: function (res) { + wx.hideLoading() + if (res.data.success) { + if (res.data.data) { + wx.setStorageSync('trinity_id', res.data.data.id) + wx.redirectTo({ + url: '/pages/trinity/recommend/recommend?id=' + res.data.data.id + }) + } else { + wx.setStorageSync('trinity_id', null) + wx.redirectTo({ + url: '/pages/trinity/trinity' + }) + } + } + } + }) + + } else if (this.data.path == 'riskSetting') { + wx.redirectTo({ + url: '/pages/OrdinaryVolunteer/riskSetting/riskSetting' + }) + + } else { + wx.redirectTo({ + url: this.data.path, + }) + } + + } else { + wx.switchTab({ + url: '/pages/index/index' + }) + } + }, + getUserInfo() { + let that = this + request({ + url: `h5/user/getuserInfoNew`, + method: 'get', + data: { + // PhoneName: '13355752969' + PhoneName: this.data.phone + }, + }).then((res) => { + if (res.success) { + if (res.data) { + if (res.data.userName && res.data.graduateSchool) { + wx.setStorageSync('userInfo', res.data) + wx.setStorageSync('showModal', '') + app.globalData.userInfo = res.data; + } else { + wx.setStorageSync('userInfo', res.data) + that.setData({ + modelShow: true + }) + } + } + } + }) + }, + getOpenId() { + return request({ + url: `h5/MyVoluntary/GetOpenId`, + method: 'get', + data: { + code: this.data.loginCode + }, + }).then(res2 => { + // console.log(res2.data); + this.setData({ + session_key: JSON.parse(res2.data).session_key + }) + }) + }, + bindUserName: function (e) { + this.setData({ + userName: e.detail.value + }) + }, + bindCode: function (e) { + this.setData({ + code: e.detail.value + }) + }, + // 点击下一步 + next() { + var username = this.data.userName; + var code = this.data.code; + if (!username) { + wx.showToast({ + title: '请填写手机号', + icon: 'none', + duration: 1500 + }) + return false; + } + if (!code) { + wx.showToast({ + title: '请填写验证码', + icon: 'none', + duration: 1500 + }) + return false; + } + // 然后判断手机号码是否正确 + if (this.checkPhone(this.data.userName)) { + wx.showToast({ + title: '请输入正确的手机号', + icon: 'none', + duration: 2000 + }) + return + } + wx.showLoading({ + title: '请求中', + }) + wx.request({ + url: api + 'h5/MyVoluntary/CheckCodeIsRight', + data: { + captcha: code, + mobile: username + }, + method: 'get', + success: (res) => { + wx.hideLoading(); + if (res.data.success) { + if (res.data.data) { + this.setData({ + phone: res.data.data.phone + }, () => { + this.getUserInfo() + }) + } else { + wx.setStorage({ + key: "phone", + data: username, + success: function () { + wx.navigateTo({ + url: '/pages/login/loginInfo/loginInfo?phone=' + username, + }) + } + }) + + } + } else { + wx.showToast({ + title: res.data.message, + icon: 'none', + duration: 1000 + }) + } + }, + fail: function () { + wx.hideLoading(); + wx.showToast({ + title: '请求失败', + icon: 'none', + duration: 1000 + }) + } + }) + }, + checkPhone(phone) { + if (!(/^1[3456789]\d{9}$/.test(phone))) { + return true + } else { + return false + } + }, + getCode() { + if (!this.data.canClick) return // 节流 防止频繁访问接口 + this.setData({ + canClick: false + }) + var codeCont = this.data.codeCont; + // 获取验证码的时候 先判断是否输入的手机号 + if (!this.data.userName) { + wx.showToast({ + title: '请输入手机号', + icon: 'none', + duration: 2000 + }) + return + } + // 然后判断手机号码是否正确 + if (this.checkPhone(this.data.userName)) { + wx.showToast({ + title: '请输入正确的手机号', + icon: 'none', + duration: 2000 + }) + return + } + if (codeCont == '获取验证码') { + wx.showLoading({ + title: '请求中', + }) + wx.request({ + url: api + 'h5/MyVoluntary/AddVerificationCode', + // util.hex_md5 + header: { + sign: util.hex_md5("1" + this.data.userName + "206") + }, + data: { + code: 206, + mobile: this.data.userName, + type: 1, //写死 + }, + method: 'get', + success: (res) => { + wx.hideLoading(); + if (res.data.success) { + var num = 60; + this.data.clockTimer = setInterval(() => { + num--; + if (num < 0) { + clearInterval(this.data.clockTimer); + this.setData({ + canClick: true, + codeCont: '获取验证码' + }) + } else { + this.setData({ + codeCont: num + }) + } + }, 1000) + } + }, + fail: function () { + wx.hideLoading(); + wx.showToast({ + title: '请求失败', + icon: 'none', + duration: 1000 + }) + } + }) + } + }, + getPhoneNumber(e) { + // console.log(e.detail) + if (e.detail.errMsg == 'getPhoneNumber:ok') { + this.setData({ + encryptedData: e.detail.encryptedData, + iv: e.detail.iv, + }, () => { + this.login() + }) + } + + }, + //去查看协议 + toProtocol() { + wx.navigateTo({ + url: '../protocol/protocol', + }) + }, + //去查看政策 + toPolicy() { + wx.navigateTo({ + url: '../policy/policy', + }) + }, + goIndex() { + wx.switchTab({ + url: '/pages/index/index', + }) + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + clearInterval(this.data.clockTimer); + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + clearInterval(this.data.clockTimer); + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/login/codeLogin/codeLogin.json b/pages/login/codeLogin/codeLogin.json new file mode 100644 index 0000000..a0eb3cb --- /dev/null +++ b/pages/login/codeLogin/codeLogin.json @@ -0,0 +1,6 @@ +{ + "usingComponents": { + }, + "navigationBarTextStyle": "white", + "navigationStyle": "custom" +} \ No newline at end of file diff --git a/pages/login/codeLogin/codeLogin.wxml b/pages/login/codeLogin/codeLogin.wxml new file mode 100644 index 0000000..fcd252e --- /dev/null +++ b/pages/login/codeLogin/codeLogin.wxml @@ -0,0 +1,38 @@ + + + + + + 欢迎登录 + + + 请输入登录资料 + + + + + + + + {{codeCont}} + + + 登  录 + + + + + 不登录,先看看 + + + + + + 点击登录即表示已阅读并同意 + 《升学汇用户协议》 + 《升学汇隐私政策》 + + + + \ No newline at end of file diff --git a/pages/login/codeLogin/codeLogin.wxss b/pages/login/codeLogin/codeLogin.wxss new file mode 100644 index 0000000..81aae19 --- /dev/null +++ b/pages/login/codeLogin/codeLogin.wxss @@ -0,0 +1,129 @@ +.bg { + width: 100%; + position: absolute; + left: 0; + right: 0; + top: 0; + bottom: 0; + z-index: -100; +} + +.title_box { + padding: 192rpx 54rpx 0; +} + +.tips_box { + padding: 37rpx 54rpx 45rpx; +} + +.title_box>.title { + font-size: 36rpx; + font-family: PingFang SC; + font-weight: bold; + color: rgba(255, 255, 255, 1); +} + +.tips_box>.tips { + font-size: 30rpx; + font-family: PingFang SC; + font-weight: 500; + color: rgba(255, 255, 255, 1); +} + +.cont-box { + width: 642rpx; + margin: 0 auto; + background-color: white; + border-radius: 10rpx; +} + +.cont-box input { + padding: 35rpx 0 35rpx 10rpx; + margin-left: 25rpx; + display: inline-block; + border-bottom: 1px solid #EEEEEE; + width: 90%; + color: #909090; + font-size: 30rpx; + line-height: 28rpx; +} + +/* 验证码的box */ +.codeBox { + position: relative; +} + +/* 获取验证码 */ +.cont-box .getCode { + position: absolute; + top: 0; + right: 0; + font-size: 30rpx; + font-family: PingFang SC; + font-weight: 500; + color: rgba(91, 151, 242, 1); + z-index: 100; + padding: 35rpx; +} + +.button { + display: block; + width: 575rpx; + height: 88rpx; + text-align: center; + line-height: 80rpx; + font-size: 36rpx; + border-radius: 44rpx; + color: white; + margin: 35rpx; +} + +.next { + background-color: #649DFB +} + +.noLoginBox { + text-align: center; +} + +.noLoginBox .noLogin { + font-size: 28rpx; + font-family: PingFang SC; + font-weight: 500; + color: rgba(91, 151, 242, 1); +} + +.one_click_btn { + display: block; + width: 575rpx; + height: 88rpx; + text-align: center; + line-height: 80rpx; + font-size: 36rpx; + border-radius: 44rpx; + color: white; + margin: 35rpx; + background-color: #07C060 +} + +.footer { + position: fixed; + bottom: 75rpx; + left: 60rpx; + display: flex; +} + +.footer .footer_tips { + font-size: 20rpx; + font-family: PingFang SC; + font-weight: 500; + color: rgba(58, 58, 58, 1); +} + +.blue { + color: rgba(91, 151, 242, 1); +} + +.footer_tips navigator { + display: inline-flex; +} \ No newline at end of file diff --git a/pages/login/policy/policy.js b/pages/login/policy/policy.js new file mode 100644 index 0000000..49ac8a0 --- /dev/null +++ b/pages/login/policy/policy.js @@ -0,0 +1,66 @@ +// pages/login/policy/policy.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/login/policy/policy.json b/pages/login/policy/policy.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/login/policy/policy.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/login/policy/policy.wxml b/pages/login/policy/policy.wxml new file mode 100644 index 0000000..547e526 --- /dev/null +++ b/pages/login/policy/policy.wxml @@ -0,0 +1,79 @@ + + +隐私政策 + 引言 + 杭州顺治科技股份有限公司重视用户的隐私,隐私权是您重要的权利。您在使用我们的服务时,可能会收集和使用您的相关信息。我们希望通过本《隐私政策》向您说明,在使用我们的服务时,我们如何收集、使用、储存和分享这些信息,以及我们为您提供的访问、更新、控制和保护这些信息的方式。本《隐私政策》与您所使用的其明服务息息相关,希望您仔细阅读,在需要时,按照本《隐私政策》的指引,作出您认为适当的选择。本《隐私政策》中涉及的相关技术词汇,我们尽量以简明扼要的表述以便您的理解。 + 您使用或继续使用相关服务,即意味着同意杭州顺治科技股份有限公司按照本《隐私政策》收集、使用、储存和分享您的相关信息。 + 如对本《隐私政策》或相关事宜有任何问题,请通过客服热线400-826-2468与我们联系。 + + 我们可能收集的信息 + 我们提供服务时,可能会收集、储存和使用下列与您有关的信息。如果您不提供相关信息,可能无法注册成为我们的用户或无法享受我们提供的某些服务,或者无法达到相关服务拟达到的效果。 + 您提供的信息 + 您在注册账户或使用我们的服务时,向我们提供的相关个人信息,例如姓名、电话号码、电子邮件或银行卡号等; + 您通过我们的服务向其他方提供的共享信息,以及您使用我们的服务时所储存的信息。 + 其他方分享的您的信息 + 其他方使用我们的服务时所提供有关您的共享信息。 + 我们获取的您的信息 + 您使用服务时我们可能收集如下信息: + 日志信息,指您使用我们的服务时,系统可能通过cookies、web beacon或其他方式自动采集的技术信息,包括:设备或软件信息,例如您的移动设备、网页浏览器或用于接入我们服务的其他程序所提供的配置信息、您的IP地址和移动设备所用的版本和设备识别码; + 在使用我们服务时浏览的信息,例如您使用的搜索词语、访问的社交媒体页url地址,以及您在使用我们服务时浏览或要求提供的其他信息和内容详情;有关您曾使用的移动应用(APP)和其他软件的信息,以及您曾经使用该等移动应用和软件的信息; + 您通过我们的服务进行通讯的信息,例如本产品的账号,以及通讯时间、数据; + 位置信息,指您开启设备定位功能并使用我们基于位置提供的相关服务时,收集的有关您位置的信息,包括: +  您通过具有定位功能的移动设备使用我们的服务时,通过GPS或WiFi等方式收集的您的地理位置信息; +  您或其他用户提供的包含您所处地理位置的实时信息,例如您提供的账户信息中包含的您所在地区信息,您或其他人上传的显示您当前或曾经所处地理位置的共享信息,您或其他人共享的照片包含的地理标记信息; + 您可以通过关闭定位功能,停止对您的地理位置信息的收集。 + 我们可能如何使用信息 + 我们可能将在向您提供服务的过程之中所收集的信息用作下列用途: +  向您提供服务; +  在我们提供服务时,用于身份验证、客户服务、安全防范、诈骗监测、存档和备份用途,确保我们向您提供的产品和服务的安全性; +  帮助我们设计新服务,改善我们现有服务;使我们更加了解您如何接入和使用我们的服务,从而针对性地回应您的个性化需求,例如语言设定、 位置设定、个性化的帮助服务和指示,或对您和其他用户作出其他方面的回应; + 为了让您有更好的体验、改善我们的服务或您同意的其他用途,在符合相关法律法规的前提下,我们可能将通过某一项服务所收集的信息,以汇集信息或者个性化的方式,用于我们的其他服务。例如,在您使用我们的一项服务时所收集的信息,可能在另一服务中用于向您提供特定内容,或向您展示与您相关的、非普遍推送的信息。如果我们在相关服务中提供了相应选项,您也可以授权我们将该服务所提供和储存的信息用于我们的其他服务。 + 您如何访问和控制自己的个人信息 + 我们将尽一切可能采取适当的技术手段,保证您可以访问、更新和更正自己的注册信息或使用我们的服务时提供的其他个人信息。在访问、更新、更正和删除前述信息时,我们可能会要求您进行身份验证,以保障账户安全。 + 我们可能分享的信息 + 除以下情形外,未经您同意,我们以及我们的关联公司不会与任何第三方分享您的个人信息。 + 我们以及我们的关联公司,可能将您的个人信息与我们的关联公司、合作伙伴及第三方服务供应商、承包商及代理(例如代表我们发出电子邮件或推送通知的通讯服务提供商、为我们提供位置数据的地图服务供应商)分享(他们可能并非位于您所在的法域),用作下列用途: +  向您提供我们的服务; +  实现“我们可能如何使用信息”部分所述目的; +  履行我们在本《隐私政策》中的义务和行使我们的权利; +  理解、维护和改善我们的服务。 + 如我们或我们的关联公司与任何上述第三方分享您的个人信息,我们将努力确保该等第三方在使用您的个人信息时遵守本《隐私政策》及我们要求其遵守的其他适当的保密和安全措施。 + 随着我们业务的持续发展,我们以及我们的关联公司有可能进行合并、收购、资产转让或类似的交易,您的个人信息有可能作为此类交易的一部分而被转移。我们将在转移前通知您。 + 我们或我们的关联公司还可能为以下需要而保留、保存或披露您的个人信息: +  遵守适用的法律法规; +  遵守法院命令或其他法律程序的规定; +  遵守相关政府机关的要求。 + 为遵守适用的法律法规、维护社会公共利益,或保护我们的客户、我们或我们的集团公司、其他用户或雇员的人身和财产安全或合法权益所合理必需的用途。 + 信息安全 + 我们仅在本《隐私政策》所述目的所必需的期间和法律法规要求的时限内保留您的个人信息。 + 我们使用各种安全技术和程序,以防信息的丢失、不当使用、未经授权阅览或披露。例如,在某些服务中,我们将利用加密技术(例如SSL)来保护您提供的个人信息。但请您理解,由于技术的限制以及可能存在的各种恶意手段,在互联网行业,即便竭尽所能加强安全措施,也不可能始终保证信息百分之百的安全。您需要了解,您接入我们的服务所用的系统和通讯网络,有可能因我们可控范围外的因素而出现问题。 + 您分享的信息 + 我们的多项服务,可让您不仅与自己的社交网络,也与使用该服务的所有用户公开分享您的相关信息,例如,您在我们的服务中所上传或发布的信息(包括您公开的个人信息、您建立的名单)、您对其他人上传或发布的信息作出的回应,以及包括与这些信息有关的位置数据和日志信息。使用我们服务的其他用户也有可能分享与您有关的信息(包括位置数据和日志信息)。 + 因此,请您谨慎考虑通过我们的服务上传、发布和交流的信息内容。在一些情况下,您可通过我们某些服务的隐私设定来控制有权浏览您共享信息的用户范围。如要求从我们的服务中删除您的相关信息,请通过该等特别服务条款提供的方式操作。 + 您分享的敏感个人信息 + 某些个人信息因其特殊性可能被认为是敏感个人信息,例如您的种族、宗教、个人健康和医疗信息等。相比其他个人信息,敏感个人信息受到更加严格的保护。 + 请注意,您在使用我们的服务时所提供、上传或发布的内容和信息(例如有关您社交活动的照片等信息),可能会泄露您的敏感个人信息。您需要谨慎地考虑,是否在使用我们的服务时披露相关敏感个人信息。 + 您同意按本《隐私政策》所述的目的和方式来处理您的敏感个人信息。 + 我们可能如何收集信息 + 我们或我们的第三方合作伙伴,可能通过cookies和web beacon收集和使用您的信息,并将该等信息储存为日志信息。 + 我们使用自己的cookies和web beacon,目的是为您提供更个性化的用户体验和服务,并用于以下用途: +  记住您的身份。例如:cookies和web beacon有助于我们辨认您作为我们的注册用户的身份,或保存您向我们提供的相关信息。 +  分析您使用我们服务的情况。例如,我们可利用cookies和web beacon来了解您使用我们的服务进行什么活动,或哪些界面或服务最受您的欢迎; + 我们的产品和服务上可能会有其他合作方放置的cookies和web beacon。这些cookies和web beacon可能会收集与您相关的非个人身份信息,以用于分析用户如何使用该等服务或用于评估相关产品的效果。这些第三方cookies和web beacon收集和使用该等信息,不受本《隐私政策》约束,而是受相关使用者的隐私政策约束,我们不对第三方的cookies或web beacon承担责任。 + 您可以通过浏览器设置拒绝或管理cookies或web beacon。但请注意,如果停用cookies或web beacon,您有可能无法享受最佳的服务体验,某些服务也可能无法正常使用。 + + 我们可能向您发送的信息 + 信息推送 + 您在使用我们的服务时,我们可能使用您的信息向您的设备发送推送通知。如您不希望收到这些信息,可以按照我们的相关提示,在设备上选择取消订阅。 + + 与服务有关的公告 + 我们可能在必要时(例如因系统维护而暂停某一项服务时)向您发出与服务有关的公告。您可能无法取消这些与服务有关、性质不属于推广的公告。 + + 隐私政策的适用范围 + 请您注意,本《隐私政策》不适用于以下情况: +  通过我们的服务而接入的第三方服务(包括任何第三方网站)收集的信息; +  通过在我们服务中进行广告服务的其他公司或机构所收集的信息。 + 变更 + 我们可能适时修订本《隐私政策》的条款,该等修订构成本《隐私政策》的一部分。如该等修订造成您在本《隐私政策》下权利的实质减少,我们将在修订生效前通过在主页上显著位置提示或向您发送推送消息或以其他方式通知您。在该种情况下,若您继续使用我们的服务,即表示同意受经修订的本《隐私政策》的约束。 + + \ No newline at end of file diff --git a/pages/login/policy/policy.wxss b/pages/login/policy/policy.wxss new file mode 100644 index 0000000..ac4f932 --- /dev/null +++ b/pages/login/policy/policy.wxss @@ -0,0 +1,17 @@ +.main { + padding: 32rpx; +} + +.content { + font-size: 28rpx; + font-family: PingFang SC; + font-weight: 500; + color: rgba(58, 58, 58, 1); +} + +.title { + font-size: 36rpx; + font-family: PingFang SC; + font-weight: 500; + color: rgba(58, 58, 58, 1); +} \ No newline at end of file diff --git a/pages/login/protocol/protocol.js b/pages/login/protocol/protocol.js new file mode 100644 index 0000000..d146d05 --- /dev/null +++ b/pages/login/protocol/protocol.js @@ -0,0 +1,66 @@ +// pages/login/protocol/protocol.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/login/protocol/protocol.json b/pages/login/protocol/protocol.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/login/protocol/protocol.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/login/protocol/protocol.wxml b/pages/login/protocol/protocol.wxml new file mode 100644 index 0000000..f54013a --- /dev/null +++ b/pages/login/protocol/protocol.wxml @@ -0,0 +1,81 @@ + + +1. 特别提示 +1.1 +杭州顺治科技股份有限公司(以下简称“顺治”)同意按照本协议的规定及其不时发布的操作规则向用户提供相关服务。为获得服务,产品服务使用人(以下称"用户")需在认真阅读及独立思考的基础上认可、同意本协议的全部条款,并按照页面上的提示完成全部的注册程序。用户在进行注册过程中点击"同意" 按钮即表示用户完全接受本服务协议。如用户对本服务协议或协议的任何部分存有任何异议,应终止相关顺治产品程序(或停止使用相关产品服务)。 +1.2 +用户注册成功后,顺治将为用户基于使用产品服务的客观需要而在申请、注册产品服务时,按照注册要求提供的账号开通相关产品服务,用户有权在顺治为其开通并同意向其提供服务的基础上使用产品服务。同时,用户同意: +1.2.1 用户应妥善保管相关产品账号及密码。 +1.2.2 未经顺治同意,用户不得擅自买卖、转让、出租任何账号。 +1.2.3 用户使用顺治产品服务过程中,须对自身使用产品的行为,对任何由用户通过顺治产品发布、公开的信息,及对由此产生的任何后果承担全部责任。 +1.3 +用户使用顺治产品服务过程中,对自身使用顺治产品的行为以及通过顺治产品发布、公开的任何信息享有合法权利,承担相应法律责任。 +1.4 +在法律法规允许的范围内,用户同意并授权顺治就侵犯用户合法权益的行为(包括但不限于私自复制、使用、编辑、抄袭等行为)采取任何形式的法律行动,包括但不限于投诉、诉讼等必要的维权措施。 +1.5 +顺治有权直接将本服务或本协议项下权利义务委托给其关联公司或其他第三方公司进行运营、管理及履行,顺治无需就此向用户另行获取授权。顺治将竭尽避免前述委托或变更给用户使用产品服务造成的不便,顺治届时将尽量及时通过网站、平台、私信、邮件等方式进行通知。本协议中,关联公司是指控制某一方的、或被某一方所控制的、或与某一方共同受控制于同一实体的任何企业。控制是指直接或间接拥有该企业百分之五十(50%)以上的股权、投票权或管理权。 +1.6 +为提高用户的产品服务使用感受和满意度,用户同意顺治可以对用户数据进行调查研究和分析,从而进一步优化产品服务。 +2. 服务内容 +2.1 +顺治产品的具体内容由顺治根据实际情况提供。 +2.2 +顺治产品提供的部分服务为收费网络服务,用户使用收费网络服务需要向顺治支付一定的费用。对于收费的网络服务,顺治会在用户使用之前给予用户明确的提示,只有用户根据提示确认其愿意支付相关费用,用户才能使用该等收费网络服务。如用户拒绝支付相关费用,则顺治有权不向用户提供该等收费网络服务。 +2.3 +用户理解,顺治仅提供与产品相关的技术服务,除此之外与相关网络服务有关的设备(如个人电脑、手机、及其他与接入互联网或移动网有关的装置)及所需的费用(如为接入互联网而支付的电话费及上网费、为使用移动网络而支付的手机费)均由用户自行负担。 +3. 服务变更、中断或终止 +3.1 +鉴于网络服务的特殊性(包括但不限于服务器的稳定性问题、恶意的网络攻击等行为的存在及其他顺治无法控制的情形),用户同意顺治有权随时中断或终止部分或全部的产品服务(包括收费网络服务),若发生该等情形,顺治将尽可能及时通过网页公告、系统通知、私信、短信提醒或其他合理方式通知受到影响的用户并在合理时间内恢复相关产品服务。 +3.2 +用户理解,顺治需要定期或不定期地对提供产品服务的平台(如互联网网站、应用程序等)或相关的设备进行检修或者维护,如因此类情况而造成服务在合理时间内的中断,顺治无需为此承担任何责任,但顺治应尽可能事先进行通告。 +3.3 +如发生下列任何一种情形,顺治有权随时中断或终止向用户提供本协议项下的产品服务(包括收费服务和免费服务)而无需对用户或任何第三方承担任何责任,由此造成的损失由用户自行独立承担: +3.3.1 用户提供的个人资料不真实; +3.3.2 用户违反法律法规国家政策或本协议中规定的使用规则; +3.3.3 用户在使用收费服务时未按规定为其所使用的收费服务支付相关服务费用; +3.3.4 用户侵犯个人、企业事业单位或社会团体的合法权益,包括但不限于专利权、著作权、商标权,或姓名权、名称权、名誉权、荣誉权、肖像权、隐私权等; +3.3.5 用户损害监管部门、国家机关及政府形象; +3.3.6 用户以任何方式损害顺治及其关联公司的商誉或信誉等合法权益; +3.3.7 顺治有其他合理理由认为需要中断或终止向用户提供产品服务的。 +4. 隐私保护 +4.1 +保护用户隐私和其他个人信息是顺治的一项基本政策,具体内容详见顺治个人信息相关保护政策。 +5. 免责声明 +5.1 +用户在使用顺治产品服务的过程中应遵守国家法律法规及政策规定,因其使用产品服务而产生的行为后果由用户自行承担。 +5.2 +顺治产品服务发布的任何信息及产品服务传递的任何观点仅作为参考,不对学生高考志愿填报及学校录取等结果负责。用户对于可能会在产品上接触到的所有信息应自行做出判断并对相关行为产生的结果负责。 +5.3 +鉴于外部链接指向的网页内容非顺治实际控制,因此顺治无法保证为向用户提供便利而设置的外部链接的准确性和完整性。 +5.4 +对于因不可抗力或顺治不能控制的原因造成的产品服务中断或其它缺陷,顺治不承担任何责任,但将尽力减少因此而给用户造成的损失和影响。 +5.5 +顺治对其向用户所提供的产品及服务依法承担相关责任,但法律另有规定或另有约定的除外。 +5.6 +用户知悉并同意,顺治可能会与第三方合作向用户提供产品(包括但不限于游戏、第三方应用等)并由第三方向用户提供该产品的升级、维护、客服等后续工作,由该等第三方对该产品的质量问题或其本身的原因导致的一切纠纷或用户损失承担责任,用户在此同意将向该第三方主张与此有关的一切权利和损失。 +5.7 +除另有约定外,顺治提供的产品或服务(包括但不限于虚拟物品及道具),如未标明使用期限、或者其标明的使用期限为“永久”、“无限期”或“无限制”的,则其使用期限为自用户开始使用该产品或服务至该产品或服务在顺治相关产品下线之日为止。 +6. 违约责任 +6.1 +如因顺治违反有关法律、法规或本协议项下的任何条款而给用户造成损失的,因此给用户造成的损害赔偿责任由顺治承担。 +6.2 +用户同意保障和维护顺治及其关联公司及其他用户的合法权益,如因用户违反有关法律、法规或本协议项下的任何条款而给顺治及其关联公司或任何其他任何第三方造成损失,用户同意承担由此造成的损害赔偿责任。 + +7. 协议修改 +7.1 +顺治有权随时修改本协议的任何条款,一旦本协议的内容发生变动,顺治将会在全部产品平台上公布修改之后的协议内容,顺治也可选择通过其他适当方式(比如系统通知)向用户通知修改内容。 +7.2 +如果不同意顺治对本协议相关条款所做的修改,用户有权停止使用相关产品服务。如果用户继续使用相关产品服务,则视为用户接受顺治对本协议相关条款所做的修改。 +8. 法律适用 +8.1 +本协议的订立、执行和解释及争议的解决均应适用中华人民共和国大陆地区法律。 +8.2 +如双方就本协议内容或其执行发生任何争议,双方应尽量友好协商解决;协商不成时,任何一方均可向杭州市上城区人民法院提起诉讼。 +9. 其他规定 +9.1 +如本协议中的任何条款无论因何种原因完全或部分无效或不具有执行力,本协议的其余条款仍应有效并且有约束力。 +9.2 +本协议中的标题仅为方便而设,在解释本协议时应被忽略,不能作为本协议条款解释的依据。 + + + \ No newline at end of file diff --git a/pages/login/protocol/protocol.wxss b/pages/login/protocol/protocol.wxss new file mode 100644 index 0000000..b3b8fa3 --- /dev/null +++ b/pages/login/protocol/protocol.wxss @@ -0,0 +1,10 @@ +.main { + padding: 32rpx; +} + +.content { + font-size: 28rpx; + font-family: PingFang SC; + font-weight: 500; + color: rgba(58, 58, 58, 1); +} \ No newline at end of file diff --git a/pages/mine/index.js b/pages/mine/index.js new file mode 100644 index 0000000..838fde0 --- /dev/null +++ b/pages/mine/index.js @@ -0,0 +1,23 @@ +var app = getApp(); +var util = require('../../utils/md5.js') +import request from '../../api/request.js' +Page({ + /** + * 页面的初始数据 + */ + data: { + + }, +// 打卡记录 + handleRecord(){ + wx.navigateTo({ + url: '/pages/mine/record/record', + }) + }, + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + }, +}) \ No newline at end of file diff --git a/pages/mine/index.json b/pages/mine/index.json new file mode 100644 index 0000000..b288fbb --- /dev/null +++ b/pages/mine/index.json @@ -0,0 +1,8 @@ +{ + "usingComponents": { + + }, + "navigationStyle": "custom", + "navigationBarTitleText":"我的", + "navigationBarTextStyle": "black" +} \ No newline at end of file diff --git a/pages/mine/index.wxml b/pages/mine/index.wxml new file mode 100644 index 0000000..34b0d25 --- /dev/null +++ b/pages/mine/index.wxml @@ -0,0 +1,6 @@ + + + + + + diff --git a/pages/mine/index.wxss b/pages/mine/index.wxss new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/pages/mine/index.wxss diff --git a/pages/mine/record/record.js b/pages/mine/record/record.js new file mode 100644 index 0000000..fe96eb1 --- /dev/null +++ b/pages/mine/record/record.js @@ -0,0 +1,37 @@ +// pages/index/record/record.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + tabindex: 1 + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + handleTab1() { + this.setData({ + tabindex: 1 + }) + }, + handleTab2() { + this.setData({ + tabindex: 2 + }) + }, + // 统一返回 + handleBack() { + wx.navigateBack() + }, + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/pages/mine/record/record.json b/pages/mine/record/record.json new file mode 100644 index 0000000..e15d6dd --- /dev/null +++ b/pages/mine/record/record.json @@ -0,0 +1,6 @@ +{ + "usingComponents": { + "van-icon": "@vant/weapp/icon/index" + }, + "navigationStyle": "custom" +} \ No newline at end of file diff --git a/pages/mine/record/record.wxml b/pages/mine/record/record.wxml new file mode 100644 index 0000000..fcb9424 --- /dev/null +++ b/pages/mine/record/record.wxml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pages/mine/record/record.wxss b/pages/mine/record/record.wxss new file mode 100644 index 0000000..00acfe8 --- /dev/null +++ b/pages/mine/record/record.wxss @@ -0,0 +1 @@ +/* pages/index/record/record.wxss */ diff --git a/pages/webview/webview.js b/pages/webview/webview.js new file mode 100644 index 0000000..01141d0 --- /dev/null +++ b/pages/webview/webview.js @@ -0,0 +1,71 @@ +// pages/webview/webview.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + link:'' + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + console.log(options) + if(options.link){ + this.setData({ + link:decodeURIComponent(options.link) + }) + } + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/webview/webview.json b/pages/webview/webview.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/webview/webview.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/webview/webview.wxml b/pages/webview/webview.wxml new file mode 100644 index 0000000..8f7daad --- /dev/null +++ b/pages/webview/webview.wxml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/pages/webview/webview.wxss b/pages/webview/webview.wxss new file mode 100644 index 0000000..229fba5 --- /dev/null +++ b/pages/webview/webview.wxss @@ -0,0 +1 @@ +/* pages/webview/webview.wxss */ \ No newline at end of file diff --git a/project.config.json b/project.config.json new file mode 100644 index 0000000..ce18141 --- /dev/null +++ b/project.config.json @@ -0,0 +1,62 @@ +{ + "description": "项目配置文件,详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", + "packOptions": { + "ignore": [], + "include": [] + }, + "setting": { + "urlCheck": true, + "es6": false, + "enhance": true, + "postcss": true, + "preloadBackgroundData": false, + "minified": true, + "newFeature": false, + "coverView": true, + "nodeModules": false, + "autoAudits": false, + "showShadowRootInWxmlPanel": true, + "scopeDataCheck": false, + "uglifyFileName": false, + "checkInvalidKey": true, + "checkSiteMap": true, + "uploadWithSourceMap": true, + "compileHotReLoad": false, + "lazyloadPlaceholderEnable": false, + "useMultiFrameRuntime": true, + "useApiHook": true, + "useApiHostProcess": true, + "babelSetting": { + "ignore": [], + "disablePlugins": [], + "outputPath": "" + }, + "enableEngineNative": false, + "useIsolateContext": true, + "userConfirmedBundleSwitch": false, + "packNpmManually": false, + "packNpmRelationList": [ + { + "packageJsonPath": "./package.json", + "miniprogramNpmDistDir": "./" + } + ], + "minifyWXSS": true, + "disableUseStrict": false, + "minifyWXML": true, + "showES6CompileOption": false, + "useCompilerPlugins": false, + "useStaticServer": true + }, + "compileType": "miniprogram", + "libVersion": "2.23.2", + "appid": "wxd055a716238e1bd7", + "projectname": "%E5%8D%87%E5%AD%A6%E6%B1%87", + "simulatorType": "wechat", + "simulatorPluginLibVersion": {}, + "condition": {}, + "editorSetting": { + "tabIndent": "insertSpaces", + "tabSize": 4 + } +} \ No newline at end of file diff --git a/project.private.config.json b/project.private.config.json new file mode 100644 index 0000000..49ab1fc --- /dev/null +++ b/project.private.config.json @@ -0,0 +1,7 @@ +{ + "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", + "projectname": "%E5%8D%87%E5%AD%A6%E6%B1%87", + "setting": { + "compileHotReLoad": true + } +} \ No newline at end of file diff --git a/sitemap.json b/sitemap.json new file mode 100644 index 0000000..ca02add --- /dev/null +++ b/sitemap.json @@ -0,0 +1,7 @@ +{ + "desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html", + "rules": [{ + "action": "allow", + "page": "*" + }] +} \ No newline at end of file diff --git a/utils/md5.js b/utils/md5.js new file mode 100644 index 0000000..00693a0 --- /dev/null +++ b/utils/md5.js @@ -0,0 +1,514 @@ +/* + +* A JavaScript implementation of the RSA Data Security, Inc. MD5 Message + +* Digest Algorithm, as defined in RFC 1321. + +* Version 2.1 Copyright (C) Paul Johnston 1999 - 2002. + +* Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet + +* Distributed under the BSD License + +* See http://pajhome.org.uk/crypt/md5 for more info. + +*/ + + + +/* + +* Configurable variables. You may need to tweak these to be compatible with + +* the server-side, but the defaults work in most cases. + +*/ + +var hexcase = 0; /* hex output format. 0 - lowercase; 1 - uppercase */ + +var b64pad = ""; /* base-64 pad character. "=" for strict RFC compliance */ + +var chrsz = 8; /* bits per input character. 8 - ASCII; 16 - Unicode */ + + + +/* + +* These are the functions you'll usually want to call + +* They take string arguments and return either hex or base-64 encoded strings + +*/ + +function hex_md5(s) { + return binl2hex(core_md5(str2binl(s), s.length * chrsz)); +} + +function b64_md5(s) { + return binl2b64(core_md5(str2binl(s), s.length * chrsz)); +} + +function str_md5(s) { + return binl2str(core_md5(str2binl(s), s.length * chrsz)); +} + +function hex_hmac_md5(key, data) { + return binl2hex(core_hmac_md5(key, data)); +} + +function b64_hmac_md5(key, data) { + return binl2b64(core_hmac_md5(key, data)); +} + +function str_hmac_md5(key, data) { + return binl2str(core_hmac_md5(key, data)); +} + + + +/* + +* Perform a simple self-test to see if the VM is working + +*/ + +function md5_vm_test() + +{ + return hex_md5("abc") == "900150983cd24fb0d6963f7d28e17f72"; + +} + + + +/* + +* Calculate the MD5 of an array of little-endian words, and a bit length + +*/ + +function core_md5(x, len) + +{ + /* append padding */ + + x[len >> 5] |= 0x80 << ((len) % 32); + + x[(((len + 64) >>> 9) << 4) + 14] = len; + + + + var a = 1732584193; + + var b = -271733879; + + var c = -1732584194; + + var d = 271733878; + + + + for (var i = 0; i < x.length; i += 16) + + { + var olda = a; + + var oldb = b; + + var oldc = c; + + var oldd = d; + + + + a = md5_ff(a, b, c, d, x[i + 0], 7, -680876936); + + d = md5_ff(d, a, b, c, x[i + 1], 12, -389564586); + + c = md5_ff(c, d, a, b, x[i + 2], 17, 606105819); + + b = md5_ff(b, c, d, a, x[i + 3], 22, -1044525330); + + a = md5_ff(a, b, c, d, x[i + 4], 7, -176418897); + + d = md5_ff(d, a, b, c, x[i + 5], 12, 1200080426); + + c = md5_ff(c, d, a, b, x[i + 6], 17, -1473231341); + + b = md5_ff(b, c, d, a, x[i + 7], 22, -45705983); + + a = md5_ff(a, b, c, d, x[i + 8], 7, 1770035416); + + d = md5_ff(d, a, b, c, x[i + 9], 12, -1958414417); + + c = md5_ff(c, d, a, b, x[i + 10], 17, -42063); + + b = md5_ff(b, c, d, a, x[i + 11], 22, -1990404162); + + a = md5_ff(a, b, c, d, x[i + 12], 7, 1804603682); + + d = md5_ff(d, a, b, c, x[i + 13], 12, -40341101); + + c = md5_ff(c, d, a, b, x[i + 14], 17, -1502002290); + + b = md5_ff(b, c, d, a, x[i + 15], 22, 1236535329); + + + + a = md5_gg(a, b, c, d, x[i + 1], 5, -165796510); + + d = md5_gg(d, a, b, c, x[i + 6], 9, -1069501632); + + c = md5_gg(c, d, a, b, x[i + 11], 14, 643717713); + + b = md5_gg(b, c, d, a, x[i + 0], 20, -373897302); + + a = md5_gg(a, b, c, d, x[i + 5], 5, -701558691); + + d = md5_gg(d, a, b, c, x[i + 10], 9, 38016083); + + c = md5_gg(c, d, a, b, x[i + 15], 14, -660478335); + + b = md5_gg(b, c, d, a, x[i + 4], 20, -405537848); + + a = md5_gg(a, b, c, d, x[i + 9], 5, 568446438); + + d = md5_gg(d, a, b, c, x[i + 14], 9, -1019803690); + + c = md5_gg(c, d, a, b, x[i + 3], 14, -187363961); + + b = md5_gg(b, c, d, a, x[i + 8], 20, 1163531501); + + a = md5_gg(a, b, c, d, x[i + 13], 5, -1444681467); + + d = md5_gg(d, a, b, c, x[i + 2], 9, -51403784); + + c = md5_gg(c, d, a, b, x[i + 7], 14, 1735328473); + + b = md5_gg(b, c, d, a, x[i + 12], 20, -1926607734); + + + + a = md5_hh(a, b, c, d, x[i + 5], 4, -378558); + + d = md5_hh(d, a, b, c, x[i + 8], 11, -2022574463); + + c = md5_hh(c, d, a, b, x[i + 11], 16, 1839030562); + + b = md5_hh(b, c, d, a, x[i + 14], 23, -35309556); + + a = md5_hh(a, b, c, d, x[i + 1], 4, -1530992060); + + d = md5_hh(d, a, b, c, x[i + 4], 11, 1272893353); + + c = md5_hh(c, d, a, b, x[i + 7], 16, -155497632); + + b = md5_hh(b, c, d, a, x[i + 10], 23, -1094730640); + + a = md5_hh(a, b, c, d, x[i + 13], 4, 681279174); + + d = md5_hh(d, a, b, c, x[i + 0], 11, -358537222); + + c = md5_hh(c, d, a, b, x[i + 3], 16, -722521979); + + b = md5_hh(b, c, d, a, x[i + 6], 23, 76029189); + + a = md5_hh(a, b, c, d, x[i + 9], 4, -640364487); + + d = md5_hh(d, a, b, c, x[i + 12], 11, -421815835); + + c = md5_hh(c, d, a, b, x[i + 15], 16, 530742520); + + b = md5_hh(b, c, d, a, x[i + 2], 23, -995338651); + + + + a = md5_ii(a, b, c, d, x[i + 0], 6, -198630844); + + d = md5_ii(d, a, b, c, x[i + 7], 10, 1126891415); + + c = md5_ii(c, d, a, b, x[i + 14], 15, -1416354905); + + b = md5_ii(b, c, d, a, x[i + 5], 21, -57434055); + + a = md5_ii(a, b, c, d, x[i + 12], 6, 1700485571); + + d = md5_ii(d, a, b, c, x[i + 3], 10, -1894986606); + + c = md5_ii(c, d, a, b, x[i + 10], 15, -1051523); + + b = md5_ii(b, c, d, a, x[i + 1], 21, -2054922799); + + a = md5_ii(a, b, c, d, x[i + 8], 6, 1873313359); + + d = md5_ii(d, a, b, c, x[i + 15], 10, -30611744); + + c = md5_ii(c, d, a, b, x[i + 6], 15, -1560198380); + + b = md5_ii(b, c, d, a, x[i + 13], 21, 1309151649); + + a = md5_ii(a, b, c, d, x[i + 4], 6, -145523070); + + d = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379); + + c = md5_ii(c, d, a, b, x[i + 2], 15, 718787259); + + b = md5_ii(b, c, d, a, x[i + 9], 21, -343485551); + + + + a = safe_add(a, olda); + + b = safe_add(b, oldb); + + c = safe_add(c, oldc); + + d = safe_add(d, oldd); + + } + + return Array(a, b, c, d); + + + +} + + + +/* + +* These functions implement the four basic operations the algorithm uses. + +*/ + +function md5_cmn(q, a, b, x, s, t) + +{ + return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s), b); + +} + +function md5_ff(a, b, c, d, x, s, t) + +{ + return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t); + +} + +function md5_gg(a, b, c, d, x, s, t) + +{ + return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t); + +} + +function md5_hh(a, b, c, d, x, s, t) + +{ + return md5_cmn(b ^ c ^ d, a, b, x, s, t); + +} + +function md5_ii(a, b, c, d, x, s, t) + +{ + return md5_cmn(c ^ (b | (~d)), a, b, x, s, t); + +} + + + +/* + +* Calculate the HMAC-MD5, of a key and some data + +*/ + +function core_hmac_md5(key, data) + +{ + var bkey = str2binl(key); + + if (bkey.length > 16) bkey = core_md5(bkey, key.length * chrsz); + + + + var ipad = Array(16), + opad = Array(16); + + for (var i = 0; i < 16; i++) + + { + ipad[i] = bkey[i] ^ 0x36363636; + + opad[i] = bkey[i] ^ 0x5C5C5C5C; + + } + + + + var hash = core_md5(ipad.concat(str2binl(data)), 512 + data.length * chrsz); + + return core_md5(opad.concat(hash), 512 + 128); + +} + + + +/* + +* Add integers, wrapping at 2^32. This uses 16-bit operations internally + +* to work around bugs in some JS interpreters. + +*/ + +function safe_add(x, y) + +{ + var lsw = (x & 0xFFFF) + (y & 0xFFFF); + + var msw = (x >> 16) + (y >> 16) + (lsw >> 16); + + return (msw << 16) | (lsw & 0xFFFF); + +} + + + +/* + +* Bitwise rotate a 32-bit number to the left. + +*/ + +function bit_rol(num, cnt) + +{ + return (num << cnt) | (num >>> (32 - cnt)); + +} + + + +/* + +* Convert a string to an array of little-endian words + +* If chrsz is ASCII, characters >255 have their hi-byte silently ignored. + +*/ + +function str2binl(str) + +{ + var bin = Array(); + + var mask = (1 << chrsz) - 1; + + for (var i = 0; i < str.length * chrsz; i += chrsz) + + bin[i >> 5] |= (str.charCodeAt(i / chrsz) & mask) << (i % 32); + + return bin; + +} + + + +/* + +* Convert an array of little-endian words to a string + +*/ + +function binl2str(bin) + +{ + var str = ""; + + var mask = (1 << chrsz) - 1; + + for (var i = 0; i < bin.length * 32; i += chrsz) + + str += String.fromCharCode((bin[i >> 5] >>> (i % 32)) & mask); + + return str; + +} + + + +/* + +* Convert an array of little-endian words to a hex string. + +*/ + +function binl2hex(binarray) + +{ + var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef"; + + var str = ""; + + for (var i = 0; i < binarray.length * 4; i++) + + { + str += hex_tab.charAt((binarray[i >> 2] >> ((i % 4) * 8 + 4)) & 0xF) + + + hex_tab.charAt((binarray[i >> 2] >> ((i % 4) * 8)) & 0xF); + + } + + return str; + +} + + + +/* + +* Convert an array of little-endian words to a base-64 string + +*/ + +function binl2b64(binarray) + +{ + var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + + var str = ""; + + for (var i = 0; i < binarray.length * 4; i += 3) + + { + var triplet = (((binarray[i >> 2] >> 8 * (i % 4)) & 0xFF) << 16) + + | + (((binarray[i + 1 >> 2] >> 8 * ((i + 1) % 4)) & 0xFF) << 8) + + | + ((binarray[i + 2 >> 2] >> 8 * ((i + 2) % 4)) & 0xFF); + + for (var j = 0; j < 4; j++) + + { + if (i * 8 + j * 6 > binarray.length * 32) str += b64pad; + + else str += tab.charAt((triplet >> 6 * (3 - j)) & 0x3F); + + } + + } + + return str; + +} + + + + +module.exports = { + hex_md5: hex_md5, +} \ No newline at end of file diff --git a/升学汇打卡小程序-计划管家 b/升学汇打卡小程序-计划管家 new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/升学汇打卡小程序-计划管家 -- libgit2 0.21.0