From 53e67c16282e8b99199cd8f4e79438ae66b14c1c Mon Sep 17 00:00:00 2001
From: zs <2459958352@qq.com>
Date: Fri, 20 Aug 2021 22:25:14 +0800
Subject: [PATCH] =?UTF-8?q?WIP:=20=E6=9B=B4=E6=96=B0=E4=BA=86=20README?=
=?UTF-8?q?=EF=BC=8C=E5=8A=A0=E4=BA=86=E4=B8=80=E4=BA=9B=E5=90=8E=E6=9D=A5?=
=?UTF-8?q?=E7=9A=84=E6=83=B3=E6=B3=95=EF=BC=8C=E5=81=9A=E4=BA=86=E4=B8=80?=
=?UTF-8?q?=E4=BA=9B=20canvas=20=E7=9A=84=E5=B0=9D=E8=AF=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 16 +++++++++++++-
pages/index/index.js | 1 +
pages/index/index.qml | 2 +-
pages/test/index.js | 49 ++++++++++++++++++++++++++++++-------------
pages/test/index.qml | 23 ++++++--------------
pages/test/index.qss | 18 ++++++++++++++++
6 files changed, 76 insertions(+), 33 deletions(-)
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
-
-
-
- FirstName: {{firstName}},
- LastName: {{lastName}}
-
-
-
-
-
-
\ 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