Let’s cut to the chase and get straight to the point

  • Record some information (such as company information and invoicing, etc.) on wechat for easy checking
  • You can share it at any time, you can generate pictures and posters
  • Make some tools (open later)

Finally, the summary is to get it, with the micro memory is to think of their own, the page is their own layout, the configuration of the poster may also have their own preferences

Currently V1.0.0, there will be no code in this article

Cognition (need improvement) :

  • There are no apps to use
  • Not as good as a phone with a memo

Wechat applets

technology

  • Wechat applet native API
  • Taro
  • ColorUi component library

Feature list

  • With micro note home page
  • Wechat applet authorization (save authorized user information to cloud development database and synchronize it to personal service database)
  • User notebook Add
  • User notebook list (currently: maximum of 6 notebooks per user, maximum of 100 notes per notebook)
  • Notebook delete (completely delete)
  • Notebook Details
  • Add text notes (can be copied)
  • Add Graphic Notes
  • Editor’s note
  • Delete the notes
  • Upload pictures to Ali OSS storage
  • Text notes sharing posters
  • Share poster with text and notes
  • Notes sharing poster (QR code generated in real time)
  • Clean up the pictures after deleting the notebook
  • Add picture notes
  • Sharing notes
  • Tools (not open yet)
  • PC preview

There are still unfinished features to be updated later

Interface is introduced

Have a problem

  • Originally intended to use small program rich texteditorDo graphic content, but the picture must be uploaded to the server, the real machine can only support the display, and there are some compatibility problems, may be changed to editor later
  • Upload files encounter restrictions, general mobile phone photography is now very large, if the continuous upload too much will have restrictions (may be weak, has not found a solution), so modified for Ali Oss signature direct transmission

Development of cloud

The main storage of cloud development data is the user’s list as well as the user’s notebook and notes

I originally wanted to save pictures, but I met the problem of picture size limitation in the first version, so I changed the version to upload to Ali Oss recently

Node + KOa + mysql services

  • Koa-swagger-decorator automatically generates API documents
  • Text notes poster configuration
  • Graphic notes poster configuration
  • Sharing Poster Configuration
  • Synchronizing User Data
  • Record template usage
  • Sharing Log Records
  • HTTPS Domain Name Deployment
  • Pm2 process monitoring is deployed for the Node project
  • Image deletion task updated
  • Background Session Login
  • Use mysql
  • There are so many unfinished functions in the background that I won’t list them here
"dependencies": {
    "@babel/polyfill": "^ 7.4.4." "."axios": "^ 0.19.0"."debug": "^ 4.4.1"."koa": "^ 2.7.0"."koa-bodyparser": "^ 2"."koa-convert": "^ 1.2.0"."koa-generic-session": "^ 2.0.1." "."koa-json": "^ 2.0.2"."koa-logger": "^ 3.2.0"."koa-onerror": "^ 4.1.0." "."koa-redis": "^ 4.0.0"."koa-router": "^ 7.4.0"."koa-static": "^ 5.0.0"."koa-swagger-decorator": "^ 1.5.16"."koa-views": "^ 6.2.0"."moment": "^ 2.24.0"."mysql": "^ 2.17.1"."pug": "^ 2.0.3"
  },
  "devDependencies": {
    "@babel/cli": "^ 7.5.5." "."@babel/core": "^ 7.5.5." "."@babel/parser": "^ 7.5.5." "."@babel/plugin-proposal-class-properties": "^ 7.5.5." "."@babel/plugin-proposal-decorators": "^ 7.4.4." "."@babel/plugin-proposal-optional-chaining": "^ 7.2.0"."@babel/plugin-transform-object-assign": "^ 7.2.0"."@babel/plugin-transform-runtime": "^ 7.5.5." "."@babel/preset-env": "^ 7.5.5." "."@babel/register": "^ 7.5.5." "."cross-env": "^ 5.2.0." "."install": "^ 0.13.0"."nodemon": "^ 1.19.1"."npm": "^ 6.10.2"
  }
Copy the code
  • The routing configuration
const tag = tags(['WeChat']);
@prefix('/api/user')
export default class WechatRouter {
	@request('post'.'/authorize')
  @summary('wechat Authorized Login')
  @description('Return sesscion and OpenID after login')
  @tag
	@body({
		code: { type: 'string', required: true, default: ' ', description: 'Applet code' },
	})
	static async authorize(ctx) {
		let { code } = ctx.request.body;
    letstr = ctx.request.body? .code; // console.log('Start access request parameter 2', APPID, APPSECRET, str)
    letres = await getOpenId(code); ctx.body = new SuccessModal(res); }}Copy the code

Links to resources

  • koa-generator
  • koa
  • koa-swagger-decorator

The follow-up development

Follow-up development around wechat and memo a series of tools or functions, welcome to point out the deficiencies and functional improvements, or the functions you want

Small program TWO-DIMENSIONAL code

The last sentence: if you want to make something, do it. Don't worry about whether it works well. Find out what you lack and where you are immature, so that you can learn more about the technology and productCopy the code