InquiryController.php
1.0 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php
/**
* Created by PhpStorm.
* auther: sgj
* Date: 2018/11/28
* Time: 17:20
*/
namespace app\portal\controller;
use cmf\controller\WeChatBaseController;
use EasyWeChat\Foundation\Application;
class InquiryController extends WeChatBaseController
{
public function index(){
/*获取疾病分类*/
$config=config('wechat_config');
$Wechat=new Application($config);
$js = $Wechat->js;
$api[]='startRecord';
$api[]='stopRecord';
$api[]='onVoiceRecordEnd';
$api[]='playVoice';
$api[]='pauseVoice';
$api[]='stopVoice';
$api[]='onVoicePlayEnd';
$api[]='uploadVoice';
$api[]='downloadVoice';
$api[]='chooseImage';
$api[]='previewImage';
$api[]='uploadImage';
$api[]='downloadImage';
$api[]='translateVoice';
$sdk=$js->config($api, false);
$this->assign(
array(
'sdk'=>$sdk,
)
);
/*引入微信sdk*/
return $this->fetch();
}
}