Files
amb_wechatapp/application/admin/controller/Share.php
T

39 lines
689 B
PHP

<?php
namespace app\admin\controller;
use app\common\controller\Backend;
use think\Db;
/**
* 分享
*/
class Share extends Backend
{
protected $noNeedRight = ['*'];
public function _initialize()
{
parent::_initialize();
}
/**
* 获取小程序码
* @return void
*/
public function getMpCode(){
$val = $this->request->post('val');
$type = $this->request->post('type');
$qrCode = \app\common\library\share\Qrsharecode::getMpCode($type,$val);
if(!$qrCode){
$this->error(__('获取失败'));
}
return $this->success("获取成功","data:image/png;base64,".$qrCode);
}
}