canyin-project/ybcy/controllers/mini/CommonController.php
2024-11-01 16:07:54 +08:00

47 lines
1.8 KiB
PHP
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
/**
* 云贝餐饮连锁V2版权说明
******************************************************************
《云贝餐饮连锁V2》是武汉云贝网络科技有限公司历经2余年时间独立创作开发而成且在不断的进行升级开发中《云贝餐饮连锁V2 》的源代码、布局、界面设计、电子文档等均已提交国家版权局登记备案,并已获得著作权审批 和销售许可 (软著登字第 6839058号 登记号 2021SR0114741
官方网址为www.b-ke.cn
官方联系方式153-0719-3890王经理
******************************************************************
注意:本软件非开源系统,版权归武汉云贝网络科技有限公司依法所有,并受到法律的严格保护;未经过我司授权,不得擅自二开、破解、倒卖等任何的侵权、盗版行为均将追究其法律责任。
*/
namespace app\controllers\mini;
use EasyWeChat\Factory;
use Yii;
use yii\web\Controller;
use yii\web\Session;
use yii\web\Cookie;
class CommonController extends Controller{
public $enableCsrfValidation = false;
public $wecaht = null;
public function result($code=1,$msg='成功',$data=[],$count=null){
return json_encode([
'code'=>$code,
'msg'=>$msg,
'data'=>$data,
'count'=>(int)$count
]);
}
public function init()
{
parent::init(); // TODO: Change the autogenerated stub
$config = [
'app_id' => 'wxfcd89f6645566653',
'secret' => 'aa901ca16dffd5661f8f27ce2d9ee5c4',
'token' => 'P44m4L5554oAllAOGtT765562Q776g55',
'aes_key' => 'eC5p1GygrrRrIHG9www11wb1rhRnwWbR8awRrz11e1H'
];
$this->wecaht = $openPlatform = Factory::openPlatform($config);
}
}