Yii2 wechat ionic1 -under development
Installation
The preferred way to install this extension is through composer., (*1)
Either run, (*2)
php composer.phar require --prefer-dist clh021/yii2-wechat_ionic1 "*"
or add, (*3)
"clh021/yii2-wechat_ionic1": "*"
to the require section of your composer.json file., (*4)
Usage
Once the extension is installed, simply use it in your code by  :, (*5)
Migration
Migration run, (*6)
php yii migrate --migrationPath=@clh021/wechat_ionic1/migrations
Config url rewrite in /common/config/main.php
    'timeZone' => 'Asia/Shanghai', //time zone affect the formatter datetime format
    'components' => [
        'urlManager' => [
            'enablePrettyUrl' => true,
            'showScriptName' => false,
            'rules' => [
                '<controller:\w+>/<id:\d+>' => '<controller>/view',
                '<controller:\w+>/<action:\w+>/<id:\d+>' => '<controller>/<action>',
                '<controller:\w+>/<action:\w+>' => '<controller>/<action>',
            ],
        ],
        'formatter' => [ //for the showing of date datetime
            'dateFormat' => 'yyyy-MM-dd',
            'datetimeFormat' => 'yyyy-MM-dd HH:mm:ss',
            'decimalSeparator' => ',',
            'thousandSeparator' => ' ',
            'currencyCode' => 'CNY',
        ],
    ],
Config backend modules in backend/config/main.php
    'modules' => [
        'cms' => [
            'class' => 'clh021\wechat_ionic1\Module',
            'controllerNamespace' => 'clh021\wechat_ionic1\controllers\backend'
        ],
    ],
Config frontend modules in frontend/config/main.php
    'defaultRoute' => 'wechat', //set wechat as default route
    'modules' => [
        'wechat' => [
            'class' => 'clh021\wechat_ionic1\Module',
            'controllerNamespace' => 'clh021\wechat_ionic1\controllers\frontend'
        ],
    ],
Add yii2-cms params in /frontend/config/params.php.
return [
    'cmsTitle' => 'HikeCms',
    'cmsTitleSeo' => 'Simple Cms based on Yii2',
    'cmsFooter' => 'Copyright © ' . date('Y') . ' by clh021 chen on Yii2. All Rights Reserved.',
    'cmsPostPageCount' => '2',
    'cmsLinks' => [
        'Google' => 'http://www.google.com',
        '' => 'http://github.com/clh021/yii2-wechat_ionic1',
    ],
];
Access Url
- backend : http://you-domain/backend/web/wechat
- Catalog : http://you-domain/backend/web/wechat/wechat-catalog
 
- Show : http://you-domain/backend/web/wechat/wechat-show
 
 
- frontend : http://you-domain/fontend/web/wechat