diff --git a/app.js b/app.js index dea4d17..8d1fc3c 100644 --- a/app.js +++ b/app.js @@ -1,11 +1,13 @@ //app.js -var urlPath = require('./config.js'); App({ - globalData: { - isLogin : false - }, onLaunch: function () { - var that = this; - wx.setStorageSync('urlPath', urlPath); - }, + // 微信小程序原生API性能优化 + // #ifdef MP-WEIXIN + let hInfo = wx.getAccountInfoSync(); + // console.log(hInfo.envVersion);//develop:开发版 trial:体验版 release:正式版 + if(hInfo.miniProgram.envVersion != "develop"){ + console.log = () =>{} + } + // #endif + } }) \ No newline at end of file diff --git a/app.json b/app.json index 3771919..5320c00 100644 --- a/app.json +++ b/app.json @@ -2,15 +2,32 @@ "pages": [ "pages/canvasposter/canvasposter", "pages/index/index", - "pages/again/again", - "pages/sign/sign", "pages/user/user", - "pages/rule/rule", - "pages/ranking/ranking", - "pages/picture/picture", - "pages/personal/personal", - "pages/auth/auth", - "pages/works/works" + "pages/ranking/ranking" + ], + "subpackages": [ + { + "root": "pagesA", + "name": "secends", + "pages": [ + "pages/works/works", + "pages/rule/rule", + "pages/picture/picture", + "pages/sign/sign", + "pages/personal/personal", + "pages/auth/auth" + ] + } + ], + "preloadRule": { + "pages/index/index": { + "network": "all", + "packages": ["secends"] + } + }, + "requiredBackgroundModes": [ + "audio", + "location" ], "tabBar": { "custom": true, diff --git a/app.wxss b/app.wxss index e432794..cc924d0 100644 --- a/app.wxss +++ b/app.wxss @@ -46,7 +46,6 @@ view{ font-size: 30rpx; } .countdown .names text{ - background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAfMAAAAJCAYAAAAmccWAAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyVpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6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oTSUd2Wh3Cjb9KKX6wNKA8DcKTGfCszylFtlojST7zVloDwpR1QEgLmDnxvXGu1owaZzZZax/qCcUhMA5g7YmdvV/2O9q1SpCQBzBxXlWTmmikL+EDt08fssAMhD/R9z542azAnYmRfXl7KhBgA5WlNBcXfmATWYFL2Xus9Yj/5d+klNAHJ0p/Qy1ufKGTXZ43E0zZ69IyJT5fKXS1bKSboz54gIAOZOufGY3bYrFx8JeVQ+lKWLj4x0HI/YATB3kPgWYABV0EFs4jF8rAAAAABJRU5ErkJggg==") no-repeat center; background-size:499rpx 10rpx; display: inline-block; width: 100%; diff --git a/img/background/3.png b/img/background/3.png index 6878d02..0fe3637 100644 Binary files a/img/background/3.png and b/img/background/3.png differ diff --git a/img/banner.png b/img/banner.png deleted file mode 100644 index ba53838..0000000 Binary files a/img/banner.png and /dev/null differ diff --git a/img/button/2.png b/img/button/2.png deleted file mode 100644 index bf4eded..0000000 Binary files a/img/button/2.png and /dev/null differ diff --git a/img/decorate/3.png b/img/decorate/3.png deleted file mode 100644 index 4ac0ef4..0000000 Binary files a/img/decorate/3.png and /dev/null differ diff --git a/img/download-icon.png b/img/download-icon.png deleted file mode 100644 index e2b1c70..0000000 Binary files a/img/download-icon.png and /dev/null differ diff --git a/img/face/4.png b/img/face/4.png deleted file mode 100644 index 3b58c21..0000000 Binary files a/img/face/4.png and /dev/null differ diff --git a/img/icon_01.png b/img/icon_01.png deleted file mode 100644 index fcbff29..0000000 Binary files a/img/icon_01.png and /dev/null differ diff --git a/img/icon_03.png b/img/icon_03.png deleted file mode 100644 index 72d6372..0000000 Binary files a/img/icon_03.png and /dev/null differ diff --git a/img/icon_04.png b/img/icon_04.png deleted file mode 100644 index e25b15e..0000000 Binary files a/img/icon_04.png and /dev/null differ diff --git a/img/icon_05.png b/img/icon_05.png deleted file mode 100644 index e7a5f8b..0000000 Binary files a/img/icon_05.png and /dev/null differ diff --git a/img/icon_06.png b/img/icon_06.png deleted file mode 100644 index 9b97232..0000000 Binary files a/img/icon_06.png and /dev/null differ diff --git a/img/img_01.png b/img/img_01.png deleted file mode 100644 index ee74138..0000000 Binary files a/img/img_01.png and /dev/null differ diff --git a/img/img_02.png b/img/img_02.png deleted file mode 100644 index bc8e77b..0000000 Binary files a/img/img_02.png and /dev/null differ diff --git a/img/img_03.png b/img/img_03.png deleted file mode 100644 index b096e3a..0000000 Binary files a/img/img_03.png and /dev/null differ diff --git a/img/opera/3.png b/img/opera/3.png deleted file mode 100644 index 23966f9..0000000 Binary files a/img/opera/3.png and /dev/null differ diff --git a/img/personage/1.png b/img/personage/1.png deleted file mode 100644 index 80a6483..0000000 Binary files a/img/personage/1.png and /dev/null differ diff --git a/img/personage/3.png b/img/personage/3.png deleted file mode 100644 index 2c6291c..0000000 Binary files a/img/personage/3.png and /dev/null differ diff --git a/img/share-icon.png b/img/share-icon.png deleted file mode 100644 index 303010d..0000000 Binary files a/img/share-icon.png and /dev/null differ diff --git a/img/word/2.png b/img/word/2.png deleted file mode 100644 index a90124c..0000000 Binary files a/img/word/2.png and /dev/null differ diff --git a/pages/again/again.js b/pages/again/again.js deleted file mode 100644 index 5f5c8bc..0000000 --- a/pages/again/again.js +++ /dev/null @@ -1,154 +0,0 @@ -// pages/sign/sign.js -Page({ - - /** - * 页面的初始数据 - */ - data: { - img_url:wx.getStorageSync('img_url'), - swiperCurrent:0, - autoplay: false, - interval: 3000, - duration: 800, - //倒计时数据 - endTime: '2020/11/22 10:40:30', - // - tab_number:31,//参与者 - tab_vote:2375,//投票数 - tab_visit:55,//访问次数 - //上传图 - source:'', - is_upload:'0', - }, - /** - * 上传图片 - */ -uploadimg:function(){ - var that = this; - wx.chooseImage({ //从本地相册选择图片或使用相机拍照 - count: 1, // 默认9 - sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有 - sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有 - success:function(res){ - //前台显示 - that.setData({ - source: res.tempFilePaths, - is_upload:'1' - }) - // 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片 - var tempFilePaths = res.tempFilePaths - wx.uploadFile({ - url: '#', - filePath: tempFilePaths[0], - name: 'file', - success:function(res){ - //打印 - } - }) - } - }) - //https://www.jb51.net/article/132557.htm 后端源码 -}, - //上传图片 - swiperChange: function (e) { - this.setData({ - swiperCurrent: e.detail.current - }) - }, - /** - * 生命周期函数--监听页面加载 - */ - onLoad: function (options) { - var that = this; - that.countDown() - }, -// 倒计时 - countDown:function(){ - var that=this; - var nowTime = new Date().getTime();//现在时间(时间戳) - var endTime = new Date(that.data.endTime).getTime();//结束时间(时间戳) - var time = (endTime-nowTime)/1000;//距离结束的毫秒数 - // 获取天、时、分、秒 - let day = parseInt(time / (60 * 60 * 24)); - let hou = parseInt(time % (60 * 60 * 24) / 3600); - let min = parseInt(time % (60 * 60 * 24) % 3600 / 60); - let sec = parseInt(time % (60 * 60 * 24) % 3600 % 60); - day = that.timeFormin(day), - hou = that.timeFormin(hou), - min = that.timeFormin(min), - sec = that.timeFormin(sec) - that.setData({ - day: that.timeFormat(day), - hou: that.timeFormat(hou), - min: that.timeFormat(min), - sec: that.timeFormat(sec) - }) - // 每1000ms刷新一次 - if (time>0){ - that.setData({ - countDown: true - }) - setTimeout(this.countDown, 1000); - }else{ - that.setData({ - countDown:false - }) - } - }, - //小于10的格式化函数(2变成02) - timeFormat(param) { - return param < 10 ? '0' + param : param; - }, - //小于0的格式化函数(不会出现负数) - timeFormin(param) { - return param < 0 ? 0: param; - }, - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady: function () { - - }, - - /** - * 生命周期函数--监听页面显示 - */ - onShow: function () { - - }, - - /** - * 生命周期函数--监听页面隐藏 - */ - onHide: function () { - - }, - - /** - * 生命周期函数--监听页面卸载 - */ - onUnload: function () { - - }, - - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh: function () { - - }, - - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom: function () { - - }, - - /** - * 用户点击右上角分享 - */ - onShareAppMessage: function () { - - } -}) \ No newline at end of file diff --git a/pages/again/again.json b/pages/again/again.json deleted file mode 100644 index 8835af0..0000000 --- a/pages/again/again.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "usingComponents": {} -} \ No newline at end of file diff --git a/pages/again/again.wxml b/pages/again/again.wxml deleted file mode 100644 index 92aa2f0..0000000 --- a/pages/again/again.wxml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - 距离投票结束还有 - - - {{day}}{{hou}}{{min}}{{sec}}秒 - - - - {{tab_number}} - 参与者 - - - {{tab_vote}} - 投票数 - - - {{tab_visit}} - 访问量 - - - - - -
- - 描述 -