diff --git a/src/wechat_app/app.js b/src/wechat_app/app.js new file mode 100644 index 0000000..1a40fb2 --- /dev/null +++ b/src/wechat_app/app.js @@ -0,0 +1,38 @@ +//app.js +App({ + + globalData:{ + phone:null, + no:'', + globalsno:'' + + }, + + /** + * 当小程序初始化完成时,会触发 onLaunch(全局只触发一次) + */ + onLaunch: function () { + + }, + + /** + * 当小程序启动,或从后台进入前台显示,会触发 onShow + */ + onShow: function (options) { + + }, + + /** + * 当小程序从前台进入后台,会触发 onHide + */ + onHide: function () { + + }, + + /** + * 当小程序发生脚本错误,或者 api 调用失败时,会触发 onError 并带上错误信息 + */ + onError: function (msg) { + + } +}) diff --git a/src/wechat_app/app.json b/src/wechat_app/app.json new file mode 100644 index 0000000..432e6f6 --- /dev/null +++ b/src/wechat_app/app.json @@ -0,0 +1,44 @@ +{ + "pages": [ + "pages/home/home", + "pages/administrator_log/administrator_log", + "pages/user_log/user_log", + "pages/set/set", + "pages/user/user", + "pages/v6_administrator/v6_administrator", + "pages/v7_out_school/v7_out_school", + "pages/v8_in_school/v8_in_school", + "pages/v9_manual/v9_manual", + "pages/v10_auto/v10_auto", + "pages/v11_success/v11_success", + "pages/v12_submit_info/v12_submit_info", + "pages/v13_look_info/v13_look_info", + "pages/v15_scan_the_code/v15_scan_the_code", + "pages/info/info", + "pages/v19_test/v19_test", + "pages/v16_user_state/v16_user_state" + ], + "window": { + "navigationBarBackgroundColor": "#00F5FF", + "navigationBarTextStyle": "white", + "navigationBarTitleText": "学生出入校管理", + "backgroundColor": "#000000", + "backgroundTextStyle": "dark" + }, + "tabBar": { + "list": [ + { + "pagePath": "pages/home/home", + "text": "首页", + "iconPath": "/static/image/home.png", + "selectedIconPath": "static/image/home-o.png" + }, + { + "pagePath": "pages/set/set", + "text": "简介", + "iconPath": "/static/image/my.png", + "selectedIconPath": "static/image/my-o.png" + } + ] + } +} \ No newline at end of file diff --git a/src/wechat_app/pages/administrator_log/administrator_log.js b/src/wechat_app/pages/administrator_log/administrator_log.js new file mode 100644 index 0000000..3225cda --- /dev/null +++ b/src/wechat_app/pages/administrator_log/administrator_log.js @@ -0,0 +1,152 @@ +//index.js +//获取应用实例 +// const app = getApp() +var i = 0; +Page({ + // 在js文件中设置相关的数据,data + data: { + username: '', + password: '', + snows: [], + animation: [], + dateTime: "", + }, + + + onUnload: function () { + clearTimeout(this.data.dateTime) + this.setData({ + snows: [], + animation: [] + }) + }, + onShow: function () { + this.initSnow(); + this.data.snows = []; + this.data.animation = []; + let j = 50 + while (j--) + this.data.snows.push(Math.floor(Math.random() * 700)) + this.setData({ + snows: this.data.snows + }) + }, + onHide: function () { + clearTimeout(this.data.dateTime) + this.setData({ + snows: [], + animation: [] + }) + }, + + initSnow: function () { + setTimeout(function () { + let animation = wx.createAnimation({}) + animation.translateY(804).opacity(1).step({ + duration: 4000 + }) + animation.translateY(0).opacity(1).step({ + duration: 0 + }) + this.setData({ + ['snows[' + i + ']']: Math.floor(Math.random() * 700), + ['animation[' + i + ']']: animation.export() + }) + i++; + if (i == 50) + i = 0 + }.bind(this), 500) + var dateTime = setTimeout(function () { + this.initSnow() + }.bind(this), 100) + this.setData({ + dateTime, + }) + }, + + + + // 1、将获取的账号存到数据username里面 + usernameInput: function (e) { + this.setData({ + username: e.detail.value + }) + }, + + // 2、将获取的密码存到password里面 + passwordInput: function (e) { + this.setData({ + password: e.detail.value + }) + }, + //3、、点击登录进行页面跳转 + bindViewTap: function() { + wx.request({ + url: 'http://127.0.0.1:2020/admin', + data: {username:this.data.username,password:this.data.password}, + dataType: JSON, + enableCache: true, + enableHttp2: true, + enableQuic: true, + method: 'POST', + timeout: 0, + success: (result) => { + // console.log(result) + console.log(result.data) +// JSON.parse将JSON字符串转换成一个JS对象,然后利用python的调用语法对相关内容进行操作 +var p=JSON.parse(result.data) + console.log(p.test1) + if(p.text=='2'){ + console.log("登录成功") + wx.navigateTo({ + url: '/pages/v6_administrator/v6_administrator' + }) + } + if(p.text=='1'){ + wx.showModal({ + cancelColor: 'cancelColor', + title: '用户名不存在', + success: function (res) { + if (res.confirm) { + console.log('用户点击确定') + } else { + console.log('用户点击取消') + } + } + }) + } + if(p.text=='3'){ + wx.showModal({ + cancelColor: 'cancelColor', + title: '密码错误', + success: function (res) { + if (res.confirm) { + console.log('用户点击确定') + } else { + console.log('用户点击取消') + } + } + }) + } + }, + fail:(res)=>{ + console.log("发生错误") + } + + })}, +// 管理员登录 +to1:function(){ + wx.navigateTo({ + url: "/pages/v16_registered/v16_registered", + }) +}, +to2:function(){ + wx.navigateTo({ + url: '/pages/v17_forget_mima/v17_forget_mima', + }) +} +}) + + + + \ No newline at end of file diff --git a/src/wechat_app/pages/administrator_log/administrator_log.json b/src/wechat_app/pages/administrator_log/administrator_log.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/src/wechat_app/pages/administrator_log/administrator_log.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/src/wechat_app/pages/administrator_log/administrator_log.wxml b/src/wechat_app/pages/administrator_log/administrator_log.wxml new file mode 100644 index 0000000..dd7681c --- /dev/null +++ b/src/wechat_app/pages/administrator_log/administrator_log.wxml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + diff --git a/src/wechat_app/pages/administrator_log/administrator_log.wxss b/src/wechat_app/pages/administrator_log/administrator_log.wxss new file mode 100644 index 0000000..35635f5 --- /dev/null +++ b/src/wechat_app/pages/administrator_log/administrator_log.wxss @@ -0,0 +1,138 @@ +page{ + height: 100%; + } + + /* 1、表格的整体样式 */ + .container { + height: 100%; + display: flex; + flex-direction: column; + padding: 0; + box-sizing: border-box; + /* background-color: rgb(156, 23, 78) */ + } + + /*2、登录的图片样式*/ + .login-icon{ + display: flex; + justify-content: center; + align-items: center; + } + +/* 3、用来设置登录图片的宽度 */ + .login-img{ + + width: 500rpx; + height: 500rpx; + } + + /*4、表单内容*/ + .login-from { + /* 设置表格上方的高度 */ + margin-top: 20px; + flex: auto; + height:100%; + } + /* 5、设置输入的框 */ + .inputView { + /* background-color: #fff; */ + line-height: 50px; + border-radius:40px; + border:1px solid #161515; + } + + /*6、设置输入框旁边的图片*/ + .nameImage, .keyImage { + margin-left: 22px; + width: 18px; + height: 16px + } + /* 7、设置账号、密码字体的颜色 */ + .loginLab { + margin: 15px 15px 15px 10px; + color:blue; + font-size: 14px + } + /* 8、进行提示输入的框是灰色的 */ + .inputText { + flex: block; + float: right; + text-align: right; + margin-right: 22px; + margin-top: 11px; + color: gray; + font-size: 14px + } + + /* 9、 内部框图进行相应的分割*/ + .line { + margin-top: 10px; + } + + /* .line { + width: 100%; + height: 1px; + background-color: #cccccc; + margin-top: 1px; + } */ + + /*10、设置按钮*/ + .loginBtnView { + width: 100%; + height: auto; + /* background-color:#DCDCDC; */ + margin-top: 0px; + margin-bottom: 0px; + padding-bottom: 0px; + } + + .loginBtn { + width: 90%; + margin-top: 40px; + border-radius:10px; + } + + /* 设置字体颜色 */ + .bxj{ + color: red; + } +/* 用来设置注册和忘记密码 */ + .saveBtn { + width: 50% !important; + float:left; + font-weight: 100; + font-size: 10px; + } + .submitBtn { + width: 50% !important; + float:right; + font-size: 10px + + } +.s_view{ + position: fixed; + width: 100%; +} + +/* 雪花效果特效 */ +page { + background: linear-gradient(180deg, #6699CC 0%, #B8DBF0 100%); + background-attachment: fixed; + background-size: cover; + background-position: center top; + height: 100%; +} + +.snow { + width: fit-content; + position: absolute; + top: -100rpx; + width: 30rpx; + height: 27rpx; + z-index: 11; +} + +.snow:nth-child(2n+2) { + width: 35rpx; + height: 33rpx; +} diff --git a/src/wechat_app/pages/home/home.js b/src/wechat_app/pages/home/home.js new file mode 100644 index 0000000..06d950f --- /dev/null +++ b/src/wechat_app/pages/home/home.js @@ -0,0 +1,113 @@ +// pages/index/index.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + message:"你好nihao", + datalist:['黑夜','白天','中午'], + userinfo:{ + name:"白雪健", + age:20 + }, + Image1:["/static/image/apic2098.jpg","/static/image/apic2098.jpg"] + }, + + uploadimage:function(){ + var that = this; + wx.chooseMedia({ + mediaType: ['image','video'], + sourceType: ['album', 'camera'], + maxDuration: 30, + camera: 'back', + success(res) { + + console.log(res), + console.log(res.tempFiles[0].tempFilePath), + that.setData({ + Image1:that.data.Image1.concat(res.tempFiles[0].tempFilePath) + }) + } + }) + + }, + + // clearimage:function(){ + // this.setData({ + // Image1:'' + // }) + // }, + + // 输入用户名所采取的行动 + + fakeCallback:function(e){ + console.log(1) + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + }, + clickme:function(){ + wx.navigateTo({ + url: '/pages/administrator_log/administrator_log', + }) + }, + clickme1:function(){ + wx.navigateTo({ + url: '/pages/user_log/user_log', + }) + } +}) \ No newline at end of file diff --git a/src/wechat_app/pages/home/home.json b/src/wechat_app/pages/home/home.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/src/wechat_app/pages/home/home.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/src/wechat_app/pages/home/home.wxml b/src/wechat_app/pages/home/home.wxml new file mode 100644 index 0000000..1bbb58e --- /dev/null +++ b/src/wechat_app/pages/home/home.wxml @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + 用户 + + + + 管理员 + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/wechat_app/pages/home/home.wxss b/src/wechat_app/pages/home/home.wxss new file mode 100644 index 0000000..6217fa2 --- /dev/null +++ b/src/wechat_app/pages/home/home.wxss @@ -0,0 +1,64 @@ +/* pages/index/index.wxss */ +.c1{ + color: red; +} +.image1{ + width: 200rpx; + height: 200rpx; + /* 如果要设置圆角的话 */ + border-radius: 100rpx; +} +.menu{ + display: flex; + /* 规定主轴的方向 */ + flex-direction: row; + /* 元素在主轴方向的排列方式 我用的是平均排列*/ + justify-content: space-around; + /* 元素在负轴方向如何展示 */ + /* align-items: center; */ + +} +/* 缺个空格差点g。 */ +.menu .item{ + display: flex; + flex-direction: column; + /* 元素在负轴方向如何展示 */ + align-items: center; +} + +/* 设置背景图片 */ + +.banner{ + + width: 100%; + height: 550rpx; +} +.banner swiper{ + + height: 100%; + width: 100%; +} +.banner image{ + + width: 100%; + height: 550rpx; +} + +.header { + position: relative; + height:300rpx; + background: linear-gradient(to bottom, #56ccf2, #2f80ed); +} + +.bg_ware { + position: absolute; + left: 0; + bottom: -2rpx; + width: 100%; + mix-blend-mode: screen; + height: 120rpx; +} + + + + diff --git a/src/wechat_app/pages/info/info.js b/src/wechat_app/pages/info/info.js new file mode 100644 index 0000000..7463268 --- /dev/null +++ b/src/wechat_app/pages/info/info.js @@ -0,0 +1,139 @@ +// pages/info/info.js +var app = getApp(); +Page({ + + /** + * 页面的初始数据 + */ + data: { + list:[], + image:[] + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + // 返回通过的信息 + backR:function(){ + // console.log(abc) + // console.log(abc.currentTarget.dataset.abc) + wx.request({ + url: 'http://127.0.0.1:2020/access', + data: { + data:this.data.list[2], + condition:'通过' + }, + dataType: JSON, + enableCache: true, + enableHttp2: true, + enableQuic: true, + method: 'POST', + timeout: 0, + success: (result) => { + console.log(this.data.list[2]) + wx.redirectTo({ + url: '/pages/v9_manual/v9_manual', + }) + // console.log(result.data) + }, + }) + }, +//返回不通过的信息 + backE:function(){ + // console.log(abc) + wx.request({ + url: 'http://127.0.0.1:2020/access', + dataType: JSON, + enableCache: true, + enableHttp2: true, + enableQuic: true, + method: 'POST', + timeout: 0, + + data:{ + data:this.data.list[2], + condition:'不通过' + }, + success: (result) => { + wx.redirectTo({ + url: '/pages/v9_manual/v9_manual', + }) + // console.log(2) + }, + }) + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + console.log(app.globalData.no) + var that = this; + wx.request({ + url: 'http://127.0.0.1:2020/info', + dataType: JSON, + method: 'GET', + timeout: 0, + success: (res) => { + // console.log(res.data) + var p = JSON.parse(res.data) + // console.log(app.globalData.no) + // console.log(p.test1[app.globalData.no]) + // console.log(p.image) + // console.log(p) + // console.log(p.test1[app.globalData.no]) + that.setData({ + list:p.test1[app.globalData.no], + image:p.image[app.globalData.no] + }) + // console.log(this.data.list[2]) + // console.log(that.data.image) + }, + }) + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/src/wechat_app/pages/info/info.json b/src/wechat_app/pages/info/info.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/src/wechat_app/pages/info/info.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/src/wechat_app/pages/info/info.wxml b/src/wechat_app/pages/info/info.wxml new file mode 100644 index 0000000..5fce100 --- /dev/null +++ b/src/wechat_app/pages/info/info.wxml @@ -0,0 +1,32 @@ + + + +{{item}} + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/wechat_app/pages/info/info.wxss b/src/wechat_app/pages/info/info.wxss new file mode 100644 index 0000000..3c0d9f4 --- /dev/null +++ b/src/wechat_app/pages/info/info.wxss @@ -0,0 +1,14 @@ +/* pages/info/info.wxss */ +.schoollist{ + margin-top: 20rpx; +} +.school-list-info{ + float: left; + margin-left: 20rpx; + margin-top: 20rpx; + position: relative; +} +.school-list-photo{ + width: 350rpx; + height: 700rpx; +} \ No newline at end of file diff --git a/src/wechat_app/pages/user_log/user_log.js b/src/wechat_app/pages/user_log/user_log.js new file mode 100644 index 0000000..4ccced7 --- /dev/null +++ b/src/wechat_app/pages/user_log/user_log.js @@ -0,0 +1,150 @@ +//index.js +//获取应用实例 +// const app = getApp() +var app = getApp(); +var i = 0; +Page({ + // 在js文件中设置相关的数据,data + data: { + username: '', + password: '', + snows: [], + animation: [], + dateTime: "", + }, + onUnload: function () { + clearTimeout(this.data.dateTime) + this.setData({ + snows: [], + animation: [] + }) + }, + + onShow: function () { + this.initSnow(); + this.data.snows = []; + this.data.animation = []; + let j = 50 + while (j--) + this.data.snows.push(Math.floor(Math.random() * 700)) + this.setData({ + snows: this.data.snows + }) + }, + onHide: function () { + clearTimeout(this.data.dateTime) + this.setData({ + snows: [], + animation: [] + }) + }, + initSnow: function () { + setTimeout(function () { + let animation = wx.createAnimation({}) + animation.translateY(804).opacity(1).step({ + duration: 4000 + }) + animation.translateY(0).opacity(1).step({ + duration: 0 + }) + this.setData({ + ['snows[' + i + ']']: Math.floor(Math.random() * 700), + ['animation[' + i + ']']: animation.export() + }) + i++; + if (i == 50) + i = 0 + }.bind(this), 500) + var dateTime = setTimeout(function () { + this.initSnow() + }.bind(this), 100) + this.setData({ + dateTime, + }) + }, + + + // 1、将获取的账号存到数据username里面 + usernameInput: function (e) { + this.setData({ + + username: e.detail.value + }) + }, + + // 2、将获取的密码存到password里面 + passwordInput: function (e) { + this.setData({ + password: e.detail.value + }) + }, + //3、、点击登录进行页面跳转 + bindViewTap: function() { + var that = this + wx.request({ + url: 'http://127.0.0.1:2020/uesr', + data: {username:this.data.username,password:this.data.password}, + dataType: JSON, + enableCache: true, + enableHttp2: true, + enableQuic: true, + method: 'POST', + timeout: 0, + success: (result) => { + // console.log(result) + console.log(result.data) +// JSON.parse将JSON字符串转换成一个JS对象,然后利用python的调用语法对相关内容进行操作 + var p=JSON.parse(result.data) + console.log(p.test1) + if(p.text=='2'){ + console.log("登录成功") + app.globalData.globalsno = that.data.username + console.log(app.globalData.globalsno) + wx.navigateTo({ + url: '/pages/user/user' + }) + } + if(p.text=='1'){ + wx.showModal({ + cancelColor: 'cancelColor', + title: '用户名不存在', + success: function (res) { + if (res.confirm) { + console.log('用户点击确定') + } else { + console.log('用户点击取消') + } + } + }) + } + if(p.text=='3'){ + wx.showModal({ + cancelColor: 'cancelColor', + title: '密码错误', + success: function (res) { + if (res.confirm) { + console.log('用户点击确定') + } else { + console.log('用户点击取消') + } + } + }) + } + }, + fail:(res)=>{ + console.log("发生错误") + } + + })}, +to1:function(){ + wx.navigateTo({ + url: "/pages/v16_registered/v16_registered", + }) + }, + to2:function(){ + wx.navigateTo({ + url: '/pages/v17_forget_mima/v17_forget_mima', + }) + } +}) + \ No newline at end of file diff --git a/src/wechat_app/pages/user_log/user_log.json b/src/wechat_app/pages/user_log/user_log.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/src/wechat_app/pages/user_log/user_log.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/src/wechat_app/pages/user_log/user_log.wxml b/src/wechat_app/pages/user_log/user_log.wxml new file mode 100644 index 0000000..8a80e37 --- /dev/null +++ b/src/wechat_app/pages/user_log/user_log.wxml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + diff --git a/src/wechat_app/pages/user_log/user_log.wxss b/src/wechat_app/pages/user_log/user_log.wxss new file mode 100644 index 0000000..35635f5 --- /dev/null +++ b/src/wechat_app/pages/user_log/user_log.wxss @@ -0,0 +1,138 @@ +page{ + height: 100%; + } + + /* 1、表格的整体样式 */ + .container { + height: 100%; + display: flex; + flex-direction: column; + padding: 0; + box-sizing: border-box; + /* background-color: rgb(156, 23, 78) */ + } + + /*2、登录的图片样式*/ + .login-icon{ + display: flex; + justify-content: center; + align-items: center; + } + +/* 3、用来设置登录图片的宽度 */ + .login-img{ + + width: 500rpx; + height: 500rpx; + } + + /*4、表单内容*/ + .login-from { + /* 设置表格上方的高度 */ + margin-top: 20px; + flex: auto; + height:100%; + } + /* 5、设置输入的框 */ + .inputView { + /* background-color: #fff; */ + line-height: 50px; + border-radius:40px; + border:1px solid #161515; + } + + /*6、设置输入框旁边的图片*/ + .nameImage, .keyImage { + margin-left: 22px; + width: 18px; + height: 16px + } + /* 7、设置账号、密码字体的颜色 */ + .loginLab { + margin: 15px 15px 15px 10px; + color:blue; + font-size: 14px + } + /* 8、进行提示输入的框是灰色的 */ + .inputText { + flex: block; + float: right; + text-align: right; + margin-right: 22px; + margin-top: 11px; + color: gray; + font-size: 14px + } + + /* 9、 内部框图进行相应的分割*/ + .line { + margin-top: 10px; + } + + /* .line { + width: 100%; + height: 1px; + background-color: #cccccc; + margin-top: 1px; + } */ + + /*10、设置按钮*/ + .loginBtnView { + width: 100%; + height: auto; + /* background-color:#DCDCDC; */ + margin-top: 0px; + margin-bottom: 0px; + padding-bottom: 0px; + } + + .loginBtn { + width: 90%; + margin-top: 40px; + border-radius:10px; + } + + /* 设置字体颜色 */ + .bxj{ + color: red; + } +/* 用来设置注册和忘记密码 */ + .saveBtn { + width: 50% !important; + float:left; + font-weight: 100; + font-size: 10px; + } + .submitBtn { + width: 50% !important; + float:right; + font-size: 10px + + } +.s_view{ + position: fixed; + width: 100%; +} + +/* 雪花效果特效 */ +page { + background: linear-gradient(180deg, #6699CC 0%, #B8DBF0 100%); + background-attachment: fixed; + background-size: cover; + background-position: center top; + height: 100%; +} + +.snow { + width: fit-content; + position: absolute; + top: -100rpx; + width: 30rpx; + height: 27rpx; + z-index: 11; +} + +.snow:nth-child(2n+2) { + width: 35rpx; + height: 33rpx; +} diff --git a/src/wechat_app/pages/v6_administrator/v6_administrator.js b/src/wechat_app/pages/v6_administrator/v6_administrator.js new file mode 100644 index 0000000..427732e --- /dev/null +++ b/src/wechat_app/pages/v6_administrator/v6_administrator.js @@ -0,0 +1,156 @@ +// pages/v6_administrator/v6_administrator.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + swiperList: [ + { + type: 'video', + url: 'https://static.51dh.com.cn/dbp/12/98/4494bd8a6e0fcd4a992f25a42bea28f8d1fb.mp4' + }, { + type: 'image', + url: 'https://i.postimg.cc/mgsKJGLw/susu1.jpg' + }, { + + type: 'image', + url: 'https://i.postimg.cc/qRRLS16Q/susu0.jpg', + }, { + + type: 'image', + url: 'https://i.postimg.cc/pXDp6RXq/susu3.jpg' + }, { + + type: 'image', + url: 'https://i.postimg.cc/XJmpTvCD/susu2.jpg' + }, { + + type: 'image', + url: 'https://i.postimg.cc/76br1jzJ/susu1.jpg' + }, { + + type: 'image', + url: 'https://i.postimg.cc/pXDp6RXq/susu3.jpg' + }, + { + + type: 'image', + url: 'https://i.postimg.cc/XJmpTvCD/susu2.jpg' + }, + ], + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + this.tauchSwiper('swiperList'); + }, + + // 初始化tauchSwiper + tauchSwiper(name) { + let list = this.data[name]; + for (let i = 0; i < list.length; i++) { + // Math.abs(x) 函数返回指定数字 “x“ 的绝对值 + list[i].zIndex = parseInt(list.length / 2) + 1 - Math.abs(i - parseInt(list.length / 2)) + list[i].mLeft = i - parseInt(list.length / 2) + } + this.setData({ + swiperList: list + }) + }, + // tauchSwiper触摸开始 + tauchStart(e) { + this.setData({ + tauchStart: e.touches[0].pageX + }) + }, + // tauchSwiper计算方向 + tauchMove(e) { + this.setData({ + direction: e.touches[0].pageX - this.data.tauchStart > 0 ? 'right' : 'left' + }) + }, + // tauchSwiper计算滚动 + tauchEnd(e) { + let direction = this.data.direction; + let list = this.data.swiperList; + if (direction == 'right') { + let mLeft = list[0].mLeft; + let zIndex = list[0].zIndex; + for (let i = 1; i < list.length; i++) { + list[i - 1].mLeft = list[i].mLeft + list[i - 1].zIndex = list[i].zIndex + } + list[list.length - 1].mLeft = mLeft; + list[list.length - 1].zIndex = zIndex; + this.setData({ + swiperList: list + }) + } else { + let mLeft = list[list.length - 1].mLeft; + let zIndex = list[list.length - 1].zIndex; + for (let i = list.length - 1; i > 0; i--) { + list[i].mLeft = list[i - 1].mLeft + list[i].zIndex = list[i - 1].zIndex + } + list[0].mLeft = mLeft; + list[0].zIndex = zIndex; + this.setData({ + swiperList: list + }) + } + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/src/wechat_app/pages/v6_administrator/v6_administrator.json b/src/wechat_app/pages/v6_administrator/v6_administrator.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/src/wechat_app/pages/v6_administrator/v6_administrator.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/src/wechat_app/pages/v6_administrator/v6_administrator.wxml b/src/wechat_app/pages/v6_administrator/v6_administrator.wxml new file mode 100644 index 0000000..e08c71a --- /dev/null +++ b/src/wechat_app/pages/v6_administrator/v6_administrator.wxml @@ -0,0 +1,32 @@ + + + + + + + + + + 查看疫情信息 + + + + + 审批 + + + + + + + + + + + + + + + + + diff --git a/src/wechat_app/pages/v6_administrator/v6_administrator.wxss b/src/wechat_app/pages/v6_administrator/v6_administrator.wxss new file mode 100644 index 0000000..1b3083c --- /dev/null +++ b/src/wechat_app/pages/v6_administrator/v6_administrator.wxss @@ -0,0 +1,104 @@ +/* pages/index/index.wxss */ +.c1{ + color: red; +} +.image1{ + width: 200rpx; + height: 200rpx; + /* 如果要设置圆角的话 */ + border-radius: 100rpx; +} + .menu{ + display: flex; + /* 规定主轴的方向 */ + flex-direction: row; + /* 元素在主轴方向的排列方式 我用的是平均排列*/ + justify-content: space-around; + /* 元素在负轴方向如何展示 */ + /* align-items: center; */ + +} +/* 缺个空格差点g。 */ + .menu .item{ + display: flex; + flex-direction: column; + /* 元素在负轴方向如何展示 */ + align-items: center; +} + +/* 波浪的渲染 */ +.header { + position: relative; + height:450rpx; + background: linear-gradient(to bottom, #56ccf2, #2f80ed); +} + +.bg_ware { + position: absolute; + left: 0; + bottom: -2rpx; + width: 100%; + mix-blend-mode: screen; + height: 120rpx; +} + +/* 轮播图 */ +.swiper-item image, +.swiper-item video { + width: 100%; + display: block; + height: 100%; + margin: 0; + pointer-events: none; +} + +image { + max-width: 100%; + display: inline-block; + position: relative; + z-index: 0; +} + +.swiper-box { + height: 420rpx; + position: relative; + max-width: 750rpx; + overflow: hidden; + box-sizing: border-box; + margin-top: 90rpx; +} + +.swiper-box .item-box { + position: absolute; + width: 300rpx; + height: 380rpx; + top: 0; + bottom: 0; + left: 50%; + margin: auto; + transition: all 0.2s ease-in 0s; + opacity: 1; + box-shadow: 0px 13rpx 12rpx rgba(0, 0, 0, .5); + border-radius: 15rpx; + overflow: hidden; +} + +.swiper-box .item-box.none { + opacity: 0; +} + +.swiper-box .item-box .swiper-item { + width: 100%; + height: 100%; + border-radius: 6rpx; + overflow: hidden; +} + + +.swiper-box .item-box { + transform: scale(calc(0.5 + var(--index) / 10)); + margin-left: calc(var(--left) * 100rpx - 150rpx); + z-index: var(--index); +} + + diff --git a/src/wechat_app/project.config.json b/src/wechat_app/project.config.json new file mode 100644 index 0000000..841ae49 --- /dev/null +++ b/src/wechat_app/project.config.json @@ -0,0 +1,29 @@ +{ + "appid": "wx1be3d41368551c6d", + "projectname": "%E8%BD%AF%E4%BB%B6%E5%B7%A5%E7%A8%8B%E5%BC%80%E5%8F%91%E9%A1%B9%E7%9B%AE", + "compileType": "miniprogram", + "libVersion": "2.19.4", + "packOptions": { + "ignore": [], + "include": [] + }, + "setting": { + "coverView": true, + "es6": true, + "postcss": true, + "minified": true, + "enhance": true, + "showShadowRootInWxmlPanel": true, + "packNpmRelationList": [], + "compileHotReLoad": true, + "babelSetting": { + "ignore": [], + "disablePlugins": [], + "outputPath": "" + } + }, + "editorSetting": { + "tabIndent": "insertSpaces", + "tabSize": 2 + } +} \ No newline at end of file diff --git a/src/wechat_app/project.private.config.json b/src/wechat_app/project.private.config.json new file mode 100644 index 0000000..ab949bd --- /dev/null +++ b/src/wechat_app/project.private.config.json @@ -0,0 +1,89 @@ +{ + "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", + "condition": { + "miniprogram": { + "list": [ + { + "name": "", + "pathName": "pages/v8_in_school/v8_in_school", + "query": "", + "launchMode": "default", + "scene": null + }, + { + "name": "", + "pathName": "pages/v11_success/v11_success", + "query": "", + "launchMode": "default", + "scene": null + }, + { + "name": "", + "pathName": "pages/v9_manual/v9_manual", + "query": "", + "launchMode": "default", + "scene": null + }, + { + "name": "", + "pathName": "pages/info/info", + "query": "", + "launchMode": "default", + "scene": null + }, + { + "name": "", + "pathName": "pages/v19_test/v19_test", + "query": "", + "launchMode": "default", + "scene": null + }, + { + "name": "", + "pathName": "pages/v13_look_info/v13_look_info", + "query": "", + "launchMode": "default", + "scene": null + }, + { + "name": "", + "pathName": "pages/v15_scan_the_code/v15_scan_the_code", + "query": "", + "launchMode": "default", + "scene": null + }, + { + "name": "", + "pathName": "pages/v16_user_state/v16_user_state", + "query": "", + "launchMode": "default", + "scene": null + }, + { + "name": "", + "pathName": "pages/user/user", + "query": "", + "launchMode": "default", + "scene": null + }, + { + "name": "", + "pathName": "pages/v6_administrator/v6_administrator", + "query": "", + "launchMode": "default", + "scene": null + }, + { + "name": "", + "pathName": "pages/v7_out_school/v7_out_school", + "query": "", + "launchMode": "default", + "scene": null + } + ] + } + }, + "setting": { + "urlCheck": false + } +} \ No newline at end of file diff --git a/src/wechat_app/static/image/1.jpg b/src/wechat_app/static/image/1.jpg new file mode 100644 index 0000000..87b2b00 Binary files /dev/null and b/src/wechat_app/static/image/1.jpg differ diff --git a/src/wechat_app/static/image/2.jpg b/src/wechat_app/static/image/2.jpg new file mode 100644 index 0000000..0c3c542 Binary files /dev/null and b/src/wechat_app/static/image/2.jpg differ diff --git a/src/wechat_app/static/image/3.jpg b/src/wechat_app/static/image/3.jpg new file mode 100644 index 0000000..89095fa Binary files /dev/null and b/src/wechat_app/static/image/3.jpg differ diff --git a/src/wechat_app/static/image/CAUC.png b/src/wechat_app/static/image/CAUC.png new file mode 100644 index 0000000..7dd03bc Binary files /dev/null and b/src/wechat_app/static/image/CAUC.png differ diff --git a/src/wechat_app/static/image/apic2098.jpg b/src/wechat_app/static/image/apic2098.jpg new file mode 100644 index 0000000..a644e32 Binary files /dev/null and b/src/wechat_app/static/image/apic2098.jpg differ diff --git a/src/wechat_app/static/image/apic27858.jpg b/src/wechat_app/static/image/apic27858.jpg new file mode 100644 index 0000000..fb39876 Binary files /dev/null and b/src/wechat_app/static/image/apic27858.jpg differ diff --git a/src/wechat_app/static/image/background.jpg b/src/wechat_app/static/image/background.jpg new file mode 100644 index 0000000..2784dea Binary files /dev/null and b/src/wechat_app/static/image/background.jpg differ diff --git a/src/wechat_app/static/image/home-o.png b/src/wechat_app/static/image/home-o.png new file mode 100644 index 0000000..3324e9f Binary files /dev/null and b/src/wechat_app/static/image/home-o.png differ diff --git a/src/wechat_app/static/image/home.png b/src/wechat_app/static/image/home.png new file mode 100644 index 0000000..1e5c055 Binary files /dev/null and b/src/wechat_app/static/image/home.png differ diff --git a/src/wechat_app/static/image/my-o.png b/src/wechat_app/static/image/my-o.png new file mode 100644 index 0000000..f76ba80 Binary files /dev/null and b/src/wechat_app/static/image/my-o.png differ diff --git a/src/wechat_app/static/image/my.png b/src/wechat_app/static/image/my.png new file mode 100644 index 0000000..5ebb3df Binary files /dev/null and b/src/wechat_app/static/image/my.png differ