作者 chencheng

kaquan-7

... ... @@ -23,6 +23,16 @@ class Wechat extends Api
parent::_initialize();
}
/**
* 根据门店获取 appid等信息
*/
public function get_wx_config(){
if(empty(request()->param('store_id'))){return $this->error('门店信息错误');}
WehcatModule::getInstance(request()->param('store_id'));
$data['appid'] = WehcatModule::$appid;
$data['appsecret'] = WehcatModule::$appsecret;
return $this->success('ok',$data);
}
/*
1.前端获取jsjdk的配置
... ...
... ... @@ -12,8 +12,8 @@ use think\Db;
*/
class Wechat {
static public $app = null;
static private $appid= '';
static private $appsecret= '';
static public $appid= '';
static public $appsecret= '';
static private $inc = null;
... ... @@ -31,6 +31,7 @@ class Wechat {
}
return self::$inc;
}
//初始化 easywechat app
static public function initWechat(){
... ...