Commit 54c7adfd authored by christ's avatar christ

share

parent 1c9093fe
......@@ -22,33 +22,49 @@ class IndexController extends \Our\Controller_Abstract {
return false;
}
public function getHtmlAction(){
$this->req=$this->getRequest()->getQuery();
$postData=$this->req;
$postData=base64_decode($postData[\Our\NameConst::sessionKey]);
$params=explode(\Our\PathConst::cutVertical,$postData);
$this->key=$params[0];
session_id($this->key);
$this->sess=\Yaf\Session::getInstance();
$this->sess->start();
if($this->sess['key']!=$this->key){
echo 'error auth!';
exit;
// ErrorModel::throwException(CodeConfigModel::authExpire);
}
$this->memberDb0Redis=\Redis\Db0\MemberRedisModel::getInstance();
$paramsStr= $this->memberDb0Redis->tablelpop($this->key);
$paramsStr=json_decode($paramsStr,true);
$this->_view->assign("params", $paramsStr);
if($paramsStr['type']==\Our\ApiConst::sharePlat){
$this->_view->display('index/plat.phtml');
}
if($paramsStr['type']==\Our\ApiConst::shareStore){
$this->_view->display('index/store.phtml');
}
if($paramsStr['type']==\Our\ApiConst::shareGoods){
$this->_view->display('index/goods.phtml');
}
if($paramsStr['type']==\Our\ApiConst::shareSaler){
// $this->req=$this->getRequest()->getQuery();
// $postData=$this->req;
// $postData=base64_decode($postData[\Our\NameConst::sessionKey]);
// $params=explode(\Our\PathConst::cutVertical,$postData);
// $this->key=$params[0];
// session_id($this->key);
// $this->sess=\Yaf\Session::getInstance();
// $this->sess->start();
// if($this->sess['key']!=$this->key){
// echo 'error auth!';
// exit;
// // ErrorModel::throwException(CodeConfigModel::authExpire);
// }
// $this->memberDb0Redis=\Redis\Db0\MemberRedisModel::getInstance();
// $paramsStr= $this->memberDb0Redis->tablelpop($this->key);
// $paramsStr=json_decode($paramsStr,true);
// $this->_view->assign("params", $paramsStr);
// if($paramsStr['type']==\Our\ApiConst::sharePlat){
// $this->_view->display('index/plat.phtml');
// }
// if($paramsStr['type']==\Our\ApiConst::shareStore){
// $this->_view->display('index/store.phtml');
// }
// if($paramsStr['type']==\Our\ApiConst::shareGoods){
// $this->_view->display('index/goods.phtml');
// }
$paramsStr=array();
if(true){
$paramsStr=json_decode('{
"deviceWidth": "828",
"id": "1050001",
"key": "023ea558dedda70eb275e43d745244d0",
"qrCode": "https://img.shenbd.com/mall/salesman_qr/168.png",
"shareType": "2",
"timestamp": "1543036500",
"type": "4",
"driverType": 2,
"address": "展进巷60号福远文创园",
"imgUrl": "https://img.shenbd.com/mall/store/05961129412631243.jpg?x-oss-process=image/resize,m_fill,h_186,w_186",
"storeName": "鲜花专卖店",
"desc": "新店开业专卖鲜花的店铺,为您提供最新鲜漂亮的鲜花"
}',true);
$this->_view->assign("params", $paramsStr);
$this->_view->display('index/saleShare.phtml');
}
exit;
......
......@@ -139,7 +139,6 @@ class ShareServiceModel extends \Business\AbstractModel
$saveImageName=ImageUtil::getFileName().\Our\NameConst::jpgSuffix;
$saveFile=$savePath.$saveImageName;
$shell = \Our\Common::format("{0} --crop-w 750 --width 750 {1} {2}",$command,$convertUrl,$saveFile);
echo $shell;exit;
system($shell, $status);
if( $status ){
\Error\ErrorModel::throwException(\Error\CodeConfigModel::shareGrowImageError);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment