InquiryController.php 1.0 KB
<?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();
    }


}