作者 chencheng

kaquan-7

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