GBlog-wx: WeChat Mini Program Blog
We are just a porter that combines the color-ui style with the halo interface.
halo serves as the backend, and the mini program style uses color-ui components.
This project uses halo as the backend and calls the halo interface. The applet style uses the color-ui component component.
Built using halo, please view the halo documentation for details: https://halo.run
Pull code
Method 1 (stable version)
Click to select the latest version to download.
Method 2 (development version)
git clone [email protected]:fuzui/GBlog-wx.git
Import tool
Register a mini program account through the WeChat public platform, and after logging in, check the AppID in开发——开发设置
;
Download the WeChat Developer Tools, select小程序——导入项目
, select the folder you just cloned and fill in your own AppID.
Pull topic
Method 1 (stable version)
- Click to select the latest version to download.
- Go to the backend->Appearance->Theme.
- Click the button on the lower right to choose to install the theme, and then choose to
本地上传
.- Just select the downloaded theme package (zip).
Method 2 (development version)
- Copy
https://github.com/fuzui/halo-theme-gblogwx-config
.- Go to the backend->Appearance->Theme.
- Click the button on the lower right to choose to install the theme, and then select
远程拉取
.- Paste the copied link to the remote address and click Download.
Be careful not to enable it after pulling the theme, it is only used for configuration.
Configuration
Copy and rename the api-tmp.js
file in miniprogram/config
to api.js
Modify api.js
configuration as follows:
const ApiBaseUrl = ''
const Config = {
AccessKey : '' , // 接口key,必填
cloudEnv : '' , // 云环境ID
themeSettingsCache : true
}
ApiBaseUrl
is the halo backend address. It must be a domain name when going online. In the developer tools, you can click右上角详情——本地设置
and check Do not verify legal domain names.
AccessKey
is the AccessKey of halo api. Enter the halo backend management system, and in系统——博客设置——高级选项——API设置
, enable the API service and set the Access key. Fill in this Access key into the corresponding location in the above js file.
cloudEnv
is the cloud environment ID, which needs to be filled in when enabling poster sharing, comment filtering, and password-free login functions.
themeSettingsCache
is the theme configuration whether to enable caching. It is enabled by default. It can be changed to false
at the beginning to facilitate theme debugging.
Configure legal domain name
In the WeChat public platform, add request, uploadFile, and downloadFile legal domain names in开发——开发设置——服务器域名
. Add the above ApiBaseUrl
domain name to the request legal domain name, such as www.geekera.com
.
Set minimum basic library version requirements for mini programs
In the WeChat public platform,设置- 基本设置- 基础库最低版本设置
to configure and save it as version 2.10.4.
Reason: "Instructions for Mini Program Login and User Information Related Interface Adjustments"
Poster sharing
Enable article sharing poster function
Sensitive word filtering
Filtering of sensitive words in comments and messages
Password-free login
Backend password-free login
For more features, please refer to theme settings.
GBLOG-WX
├── cloudfunctions // 云服务
│ └── check_message // 云函数 敏感词汇过滤
│ └── get_qrcode // 云函数 小程序码生成
├── miniprogram
│ └── components // 自定义组件
│ └── admin-login // 后台登陆页
│ └── article-list // 文章列表
│ └── authorize // 微信登录
│ └── comment // 评论列表
│ └── image-loader // 图片处理组件
│ └── painter // painter小程序生成图片组件
│ └── mp-weixin // mp-html小程序富文本组件
│ └── config // 配置文件
│ └── custom-tab-bar // 自定义tabbar
│ └── images // 图片
│ └── pages // 页面代码
│ └── services // 封装方法
│ └── api // 接口实现
│ └── const-data // 常量
│ └── posters // 海报样式
│ └── styles // 样式
│ └── colorui // color-ui组件库
│ └── utils // 公用js
Browse page functions:
Management page functions:
development plan
Change log
If you find any bugs or have any interface suggestions or comments,
Issues are welcome. Of course, you can also directly click "Contact Me" or "Feedback" or "Leave a Message" in the About column of the mini program, or