diff --git a/README.md b/README.md index 9050c89..a65a2d0 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,16 @@ # Postwall-MiniApp -A QQ MiniApp for Postwall posting +## 概述 + +一个用于贴贴墙发单的小程序 + + + +## 后续功能前瞻 + ++ 单发 + + 配合 Mirai 机器人来审核是否单发 + + 单独做一个可折叠按钮 ++ 视频 + + 想办法可以做到可发视频 ++ 集合一个寻物启事的功能 + + 有人发了寻物启事,可以选择是否贴到寻物墙上 diff --git a/pages/index/index.js b/pages/index/index.js index e995133..3e75345 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -76,6 +76,7 @@ Page({ success(res) { console.log(res); imageList = imageList.concat(res.tempFilePaths); + console.log(res.tempFilePaths); that.setData({ imageList: imageList }) diff --git a/pages/index/index.qml b/pages/index/index.qml index e50a3a2..3af2a39 100644 --- a/pages/index/index.qml +++ b/pages/index/index.qml @@ -38,7 +38,7 @@ - + diff --git a/pages/test/index.js b/pages/test/index.js index 3f6d27f..fd7a2c2 100644 --- a/pages/test/index.js +++ b/pages/test/index.js @@ -1,16 +1,46 @@ // index.js Page({ data: { - message : 'Hello MINA!', - array: [1,2,3,4,5], - view: "APP", - text: 'This is page data.' + tmp_path : "tmp" }, onLoad(options) { // Do some initialize when page load. }, onReady() { // Do something when page ready. + this.drawBall() + }, + drawBall() { + const context = qq.createCanvasContext('submit-canvas'); + const that = this; + + context.arc(100, 100, 30, 0, 2 * Math.PI); + context.clip(); + context.restore(); + //绘制文字 + context.setTextAlign('center') + context.setFillStyle('#fff') + context.fillText("测试看看", 100, 180)//用户昵称 + context.setFontSize(16) + context.stroke() + + context.draw() + qq.canvasToTempFilePath({ + x: 0, + y: 0, + width: 670, + height: 800, + canvasId: 'submit-canvas', + success : function (res) { + console.log(res.tempFilePath); + that.setData({ + tmp_path: res.tempFilePath + }) + } + }) + }, + test() { + console.log(this.data.tmp_path) }, onShow() { // Do something when page show. @@ -19,6 +49,7 @@ Page({ // Do something when page hide. }, onUnload() { + clearInterval(this.interval) // Do something when page close. }, onPullDownRefresh() { @@ -45,14 +76,4 @@ Page({ console.log(item.text) }, // Event handler. - viewTap() { - this.setData({ - text: 'Set some data for updating view.' - }, function () { - // this is setData callback - }) - }, - customData: { - hi: 'MINA' - } }) diff --git a/pages/test/index.qml b/pages/test/index.qml index 36caede..b51cfcc 100644 --- a/pages/test/index.qml +++ b/pages/test/index.qml @@ -1,19 +1,8 @@ -{{message}} -{{item}} - -1 -2 -3 - - - - - - \ No newline at end of file + 订单效果预览 + + 测试一下 + +测试 + \ No newline at end of file diff --git a/pages/test/index.qss b/pages/test/index.qss index 3d1fdf9..0d0414f 100644 --- a/pages/test/index.qss +++ b/pages/test/index.qss @@ -1,4 +1,22 @@ page { background-color: #F5F6FA !important; +} +.page-preview { + display: block; + width: 400rpx; + margin: 20rpx 140rpx 0 auto; + font-size: 50rpx; + color: #8A8A8A; +} + +.canvas { + width: 670rpx; + height: 800rpx; + margin: 50rpx auto 0 auto; + background-color: red; +} +.test-class { + width: 300rpx; + height: 300rpx; } \ No newline at end of file