My "new" mini-program":"ChatMOJI
Comment | 0ViewI had a little depression last week and want to write some code to distract my attention but have no idea at all. While I was looking my Weibo I noticed someone post some SPECIAL character.
I know that stuff, it’s unicode. My first mini-programe uses unicode’s tab to generate a pure-text vertical layout. However I didn’t know it well, so I decided to look into it and see what I can achieve.
I was collecting these characters that the poster posted and I discoverd there is more than I think. I have collected 19 sets of English alphabet and 11 sets of digital alphabet! That’s 30 sets in total! During collecting I also found same beautiful characters unbelong to any alphabet, so I have to ignore them. PITY.
Now I have the resources, time to coding. The logic is simple:
- Acquiring users’ input and sperate the input and then compare to current sets char by char;
- Replacing if the char is matched, of keep it that way;
- Put the result char together and display;
I’m using a BAAS as my backend. The reason why I decide to implement backend is because I don’t want my code reviewing by wechat each time I update. So the table I designed has these fields:
- Label for display;
- Name of the set
- Type of the set
- Content of the set
That’s the basic fields. For further purpose I added preview_long & preview_short for display.
Because it’s a unicode program, so I decide to integrate with my first mini-program “ZhanXin” which makes the horizontal text vertical, and make Zhan a sub feature as well as the new Char-Digit feature and I called this new updated mini program ChatMOJI! Hope it will bring moji more fun while you’re chating.
#EOF
- Blog Link: https://blog.decay.fun/en/2019/10/17/new-minapp-chatmoji/
- Copyright Declaration: The author owns the copyright. Please indicate the source reproduced!
Share用中文浏览本文