diff --git a/app.js b/app.js index b545190..404d452 100644 --- a/app.js +++ b/app.js @@ -1,39 +1,39 @@ -//app.js -App({ - onLaunch: function () { - // 展示本地存储能力 - var logs = wx.getStorageSync('logs') || [] - logs.unshift(Date.now()) - wx.setStorageSync('logs', logs) - - // 登录 - wx.login({ - success: res => { - // 发送 res.code 到后台换取 openId, sessionKey, unionId - } - }) - // 获取用户信息 - wx.getSetting({ - success: res => { - if (res.authSetting['scope.userInfo']) { - // 已经授权,可以直接调用 getUserInfo 获取头像昵称,不会弹框 - wx.getUserInfo({ - success: res => { - // 可以将 res 发送给后台解码出 unionId - this.globalData.userInfo = res.userInfo - - // 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回 - // 所以此处加入 callback 以防止这种情况 - if (this.userInfoReadyCallback) { - this.userInfoReadyCallback(res) - } - } - }) - } - } - }) - }, - globalData: { - userInfo: null - } +//app.js +App({ + onLaunch: function () { + // 展示本地存储能力 + var logs = wx.getStorageSync('logs') || [] + logs.unshift(Date.now()) + wx.setStorageSync('logs', logs) + + // 登录 + wx.login({ + success: res => { + // 发送 res.code 到后台换取 openId, sessionKey, unionId + } + }) + // 获取用户信息 + wx.getSetting({ + success: res => { + if (res.authSetting['scope.userInfo']) { + // 已经授权,可以直接调用 getUserInfo 获取头像昵称,不会弹框 + wx.getUserInfo({ + success: res => { + // 可以将 res 发送给后台解码出 unionId + this.globalData.userInfo = res.userInfo + + // 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回 + // 所以此处加入 callback 以防止这种情况 + if (this.userInfoReadyCallback) { + this.userInfoReadyCallback(res) + } + } + }) + } + } + }) + }, + globalData: { + userInfo: null + } }) \ No newline at end of file diff --git a/app.json b/app.json index 6ec6b81..834a5a9 100644 --- a/app.json +++ b/app.json @@ -1,53 +1,53 @@ -{ - "pages": [ - "shouye/shouye", - "chazhao/chazhao", - "jieyue/jieyue", - "wode/wode" - ], - "window": { - "backgroundTextStyle": "light", - "navigationBarBackgroundColor": "#fff", - "navigationBarTitleText": "WeChat", - "navigationBarTextStyle": "black" - }, - "tabBar": { - "color": "#000000", - "selectedColor": "#fd9941", - "borderStyle": "white", - "backgroundColor": "#ffffff", - "list": [ - { - "pagePath": "shouye/shouye", - "text": "首页", - "iconPath": "image/shouye.png", - "selectedIconPath": "image/shouye-hl.png" - }, - { - "pagePath": "chazhao/chazhao", - "text": "查找", - "iconPath": "image/chazhao.png", - "selectedIconPath": "image/chazhao-hl.png" - }, - { - "pagePath": "jieyue/jieyue", - "text": "借阅", - "iconPath":"image/jieyue.png", - "selectedIconPath":"image/jieyue-hl.png" - }, - { - "pagePath": "wode/wode", - "text": "我的", - "iconPath": "image/wode.png", - "selectedIconPath": "image/wode-hl.png" - } - - - ] - } - - - - - +{ + "pages": [ + "shouye/shouye", + "chazhao/chazhao", + "jieyue/jieyue", + "wode/wode" + ], + "window": { + "backgroundTextStyle": "light", + "navigationBarBackgroundColor": "#fff", + "navigationBarTitleText": "WeChat", + "navigationBarTextStyle": "black" + }, + "tabBar": { + "color": "#000000", + "selectedColor": "#fd9941", + "borderStyle": "white", + "backgroundColor": "#ffffff", + "list": [ + { + "pagePath": "shouye/shouye", + "text": "首页", + "iconPath": "image/shouye.png", + "selectedIconPath": "image/shouye-hl.png" + }, + { + "pagePath": "chazhao/chazhao", + "text": "查找", + "iconPath": "image/chazhao.png", + "selectedIconPath": "image/chazhao-hl.png" + }, + { + "pagePath": "jieyue/jieyue", + "text": "借阅", + "iconPath":"image/jieyue.png", + "selectedIconPath":"image/jieyue-hl.png" + }, + { + "pagePath": "wode/wode", + "text": "我的", + "iconPath": "image/wode.png", + "selectedIconPath": "image/wode-hl.png" + } + + + ] + } + + + + + } \ No newline at end of file diff --git a/app.wxss b/app.wxss index 2fb1eca..4e9d3a7 100644 --- a/app.wxss +++ b/app.wxss @@ -1,10 +1,10 @@ -/**app.wxss**/ -.container { - height: 100%; - display: flex; - flex-direction: column; - align-items: center; - justify-content: space-between; - padding: 100rpx 0; - box-sizing: border-box; -} +/**app.wxss**/ +.container { + height: 100%; + display: flex; + flex-direction: column; + align-items: center; + justify-content: space-between; + padding: 100rpx 0; + box-sizing: border-box; +} diff --git a/chazhao/chazhao.js b/chazhao/chazhao.js index 19f9d68..2ca559c 100644 --- a/chazhao/chazhao.js +++ b/chazhao/chazhao.js @@ -1,23 +1,23 @@ -// chazhao/chazhao.js -Component({ - /** - * 组件的属性列表 - */ - properties: { - - }, - - /** - * 组件的初始数据 - */ - data: { - - }, - - /** - * 组件的方法列表 - */ - methods: { - - } -}) +// chazhao/chazhao.js +Component({ + /** + * 组件的属性列表 + */ + properties: { + + }, + + /** + * 组件的初始数据 + */ + data: { + + }, + + /** + * 组件的方法列表 + */ + methods: { + + } +}) diff --git a/chazhao/chazhao.json b/chazhao/chazhao.json index e8cfaaf..011372e 100644 --- a/chazhao/chazhao.json +++ b/chazhao/chazhao.json @@ -1,4 +1,4 @@ -{ - "component": true, - "usingComponents": {} +{ + "component": true, + "usingComponents": {} } \ No newline at end of file diff --git a/chazhao/chazhao.wxml b/chazhao/chazhao.wxml index e2530d3..06234c4 100644 --- a/chazhao/chazhao.wxml +++ b/chazhao/chazhao.wxml @@ -1,2 +1,2 @@ - -chazhao/chazhao.wxml + +chazhao/chazhao.wxml diff --git a/jieyue/jieyue.js b/jieyue/jieyue.js index d8d5f23..79873a2 100644 --- a/jieyue/jieyue.js +++ b/jieyue/jieyue.js @@ -1,23 +1,23 @@ -// jieyue/jieyue.js -Component({ - /** - * 组件的属性列表 - */ - properties: { - - }, - - /** - * 组件的初始数据 - */ - data: { - - }, - - /** - * 组件的方法列表 - */ - methods: { - - } -}) +// jieyue/jieyue.js +Component({ + /** + * 组件的属性列表 + */ + properties: { + + }, + + /** + * 组件的初始数据 + */ + data: { + + }, + + /** + * 组件的方法列表 + */ + methods: { + + } +}) diff --git a/jieyue/jieyue.json b/jieyue/jieyue.json index e8cfaaf..011372e 100644 --- a/jieyue/jieyue.json +++ b/jieyue/jieyue.json @@ -1,4 +1,4 @@ -{ - "component": true, - "usingComponents": {} +{ + "component": true, + "usingComponents": {} } \ No newline at end of file diff --git a/jieyue/jieyue.wxml b/jieyue/jieyue.wxml index a753bce..4e8d2b6 100644 --- a/jieyue/jieyue.wxml +++ b/jieyue/jieyue.wxml @@ -1,2 +1,8 @@ - -jieyue/jieyue.wxml + +jieyue/jieyue.wxml + + + \ No newline at end of file diff --git a/jieyue/jieyue.wxss b/jieyue/jieyue.wxss index f569691..128b4c2 100644 --- a/jieyue/jieyue.wxss +++ b/jieyue/jieyue.wxss @@ -1 +1,78 @@ -/* jieyue/jieyue.wxss */ \ No newline at end of file +/* jieyue/jieyue.wxss */ +page { + background-image: url("http://qty83k.creatby.com/materials/143414/origin/e7ca84df3ecfa54f87273d3bb346aaad_origin.jpg"); background-size: contain; background-repeat: no-repeat; +} + +view,scroll-view,swiper,swiper-item,icon,text,progress,button,checkbox-group,checkbox,form,input,label,picker,radio-group,radio,slider,switch,action-sheet,action-sheet-item,action-sheet-cancel,modal,toast,loading,navigator,audio,image,video,map,canvas { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +page { + height: 100%; + font-family: -apple-system-font,Helvetica Neue,Helvetica,sans-serif; +} + + + + +checkbox-group, +radio-group{ + display:block; +} + + + + +:before, +:after , +::before, +::after{ + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +.c-minheight { + min-height: 80px; +} +.c-full { + width: 100%; + height: 100%; +} +.c-block { + display: block; +} +.c-autosize { + width: auto; + height: auto; +} +.c-fullwidth { + width: 100%; +} +.c-fullheight { + height: 100%; +} +.c-initHide{ + opacity:0 !important; +} +.c-ellipse{ + text-overflow: ellipsis; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; + overflow:hidden; +} +/* 自定义样式 */ + + + + +.body_PPYMWQ{background-image: url("http://qty83k.creatby.com/materials/143414/origin/e7ca84df3ecfa54f87273d3bb346aaad_origin.jpg"); background-size: contain; background-repeat: no-repeat; } +.wx-button_FNtt93{border-style: none; border-color: transparent; margin: 230px 25px 10px; border-radius: 20px; transition: all; font-family: andale mono; background-attachment: fixed; transform: rotate(0deg) scale(1) translate(0%, -43%); background-color: rgba(253,153, 65, 0.67); } +.wx-button_MrC8rl{border-radius: 20px; margin-right: 25px; margin-left: 25px; border-bottom-right-radius: 20px; border-bottom-left-radius: 20px; border-top-right-radius: 20px; border-top-left-radius: 20px; } +.wx-button_XgkbLE{border-radius: 20px; transition: all; margin-top: 210px; margin-right: 100px; margin-left: 100px; opacity: 0.73; background-color: rgba(253,153, 65, 0.67);} +.wx-view_g5MjCx{border-radius: 200px; transition: all; transform: rotate(0deg) scale(1) translate(0%, -434%);} + + + + diff --git a/project.config.json b/project.config.json index 3f59ab1..55fdb50 100644 --- a/project.config.json +++ b/project.config.json @@ -13,7 +13,7 @@ "compileType": "miniprogram", "libVersion": "2.4.0", "appid": "wxb280d1925541c356", - "projectname": "%E7%9C%9F%E9%A6%99%E5%9B%BE%E4%B9%A6%E7%AE%A1%E7%90%86%E7%B3%BB%E7%BB%9F", + "projectname": "%E7%9C%9F%E9%A6%99", "debugOptions": { "hidedInDevtools": [] }, diff --git a/shouye/shouye.js b/shouye/shouye.js index f7c37d6..44045ef 100644 --- a/shouye/shouye.js +++ b/shouye/shouye.js @@ -1,23 +1,23 @@ -// shouye/shouye.js -Component({ - /** - * 组件的属性列表 - */ - properties: { - - }, - - /** - * 组件的初始数据 - */ - data: { - - }, - - /** - * 组件的方法列表 - */ - methods: { - - } -}) +// shouye/shouye.js +Component({ + /** + * 组件的属性列表 + */ + properties: { + + }, + + /** + * 组件的初始数据 + */ + data: { + + }, + + /** + * 组件的方法列表 + */ + methods: { + + } +}) diff --git a/shouye/shouye.json b/shouye/shouye.json index e8cfaaf..011372e 100644 --- a/shouye/shouye.json +++ b/shouye/shouye.json @@ -1,4 +1,4 @@ -{ - "component": true, - "usingComponents": {} +{ + "component": true, + "usingComponents": {} } \ No newline at end of file diff --git a/shouye/shouye.wxml b/shouye/shouye.wxml index 28fcebe..785fc7e 100644 --- a/shouye/shouye.wxml +++ b/shouye/shouye.wxml @@ -1,2 +1,2 @@ - -shouye/shouye.wxml + +shouye/shouye.wxml diff --git a/utils/util.js b/utils/util.js index dbadbb8..0cbb61a 100644 --- a/utils/util.js +++ b/utils/util.js @@ -1,19 +1,19 @@ -const formatTime = date => { - const year = date.getFullYear() - const month = date.getMonth() + 1 - const day = date.getDate() - const hour = date.getHours() - const minute = date.getMinutes() - const second = date.getSeconds() - - return [year, month, day].map(formatNumber).join('/') + ' ' + [hour, minute, second].map(formatNumber).join(':') -} - -const formatNumber = n => { - n = n.toString() - return n[1] ? n : '0' + n -} - -module.exports = { - formatTime: formatTime -} +const formatTime = date => { + const year = date.getFullYear() + const month = date.getMonth() + 1 + const day = date.getDate() + const hour = date.getHours() + const minute = date.getMinutes() + const second = date.getSeconds() + + return [year, month, day].map(formatNumber).join('/') + ' ' + [hour, minute, second].map(formatNumber).join(':') +} + +const formatNumber = n => { + n = n.toString() + return n[1] ? n : '0' + n +} + +module.exports = { + formatTime: formatTime +} diff --git a/wode/wode.js b/wode/wode.js index 6d0082f..9753074 100644 --- a/wode/wode.js +++ b/wode/wode.js @@ -1,53 +1,53 @@ -// 首页/shouye.js -const app = getApp() - -Page({ - data: { - motto: 'Hello', - userInfo: {}, - hasUserInfo: false, - canIUse: wx.canIUse('button.open-type.getUserInfo') - }, - //事件处理函数 - bindViewTap: function() { - wx.navigateTo({ - url: '../logs/logs' - }) - }, - onLoad: function () { - if (app.globalData.userInfo) { - this.setData({ - userInfo: app.globalData.userInfo, - hasUserInfo: true - }) - } else if (this.data.canIUse){ - // 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回 - // 所以此处加入 callback 以防止这种情况 - app.userInfoReadyCallback = res => { - this.setData({ - userInfo: res.userInfo, - hasUserInfo: true - }) - } - } else { - // 在没有 open-type=getUserInfo 版本的兼容处理 - wx.getUserInfo({ - success: res => { - app.globalData.userInfo = res.userInfo - this.setData({ - userInfo: res.userInfo, - hasUserInfo: true - }) - } - }) - } - }, - getUserInfo: function(e) { - console.log(e) - app.globalData.userInfo = e.detail.userInfo - this.setData({ - userInfo: e.detail.userInfo, - hasUserInfo: true - }) - } -}) +// 首页/shouye.js +const app = getApp() + +Page({ + data: { + motto: 'Hello', + userInfo: {}, + hasUserInfo: false, + canIUse: wx.canIUse('button.open-type.getUserInfo') + }, + //事件处理函数 + bindViewTap: function() { + wx.navigateTo({ + url: '../logs/logs' + }) + }, + onLoad: function () { + if (app.globalData.userInfo) { + this.setData({ + userInfo: app.globalData.userInfo, + hasUserInfo: true + }) + } else if (this.data.canIUse){ + // 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回 + // 所以此处加入 callback 以防止这种情况 + app.userInfoReadyCallback = res => { + this.setData({ + userInfo: res.userInfo, + hasUserInfo: true + }) + } + } else { + // 在没有 open-type=getUserInfo 版本的兼容处理 + wx.getUserInfo({ + success: res => { + app.globalData.userInfo = res.userInfo + this.setData({ + userInfo: res.userInfo, + hasUserInfo: true + }) + } + }) + } + }, + getUserInfo: function(e) { + console.log(e) + app.globalData.userInfo = e.detail.userInfo + this.setData({ + userInfo: e.detail.userInfo, + hasUserInfo: true + }) + } +}) diff --git a/wode/wode.json b/wode/wode.json index f2eb7b1..b3dd12a 100644 --- a/wode/wode.json +++ b/wode/wode.json @@ -1,4 +1,4 @@ -{ - "usingComponents": {} - +{ + "usingComponents": {} + } \ No newline at end of file diff --git a/wode/wode.wxml b/wode/wode.wxml index 71eada0..cde5ea1 100644 --- a/wode/wode.wxml +++ b/wode/wode.wxml @@ -1,19 +1,19 @@ - - - - - - - - 欢迎,{{userInfo.nickName}} - - - - - - - - - - - + + + + + + + + 欢迎,{{userInfo.nickName}} + + + + + + + + + + + diff --git a/~$汇报PPT.pptx b/~$汇报PPT.pptx new file mode 100644 index 0000000..4ac28a6 Binary files /dev/null and b/~$汇报PPT.pptx differ