Features
November 5, 2016 ยท View on GitHub
- wechat omniauth only login
- requires phone and email to login the system
- phone confirmation service
- I18n internationalization (default locale is zh-CN)
- rpsec test and simplecov test coverage (97.2% LOC covered)
- config the required configuration
- run
rspec - open
index.htmlinside thecoveragefolder
Resources
- wechat starter
- yunpian sms sending services
- devise authentication system
Pictures
(Required) Configuration
-
config/application.ymlRequired fields:
- wechat_app_id
- wechat_secret
- wechat_token
- yunpian_apikey ( ignore this field if you don't want use yunpian sms service )
Option fields:
Ignore the following two fileds if your are testing the service on wechat test account, only set it when you are in production.
- wechat_encrypt_mode
- wechat_encoding_aes_key
-
config/menu_{environemnt}.yamlRequired fields:
main->url( set the url to your hosting server url )signin->url( set the url to your hosting server url )
(Option) Configuration
-
I18n
The default locale for this project is
zh-CN, if you want to change the default locale you can go theconfig/application.rband change the line
config.i18n.default_locale = 'zh-CN'to other locale. In addition, you need to add the corresponding locale file inside theconfig/localesfolder. -
Database name
Change the database name inside the
config/database.ymlfile -
Wechat public account menu
Change the
config/menu_{environemnt}.yamlfile to customize the wechat public account menu. Runrake wechat:menu_createto push the menu to wechat public accout.