Commit f17ef9f0 authored by christ's avatar christ

isjson

parent 59669158
...@@ -368,7 +368,7 @@ class ApiConst ...@@ -368,7 +368,7 @@ class ApiConst
//等于0表示没有选中地址时是选中当前传入经纬度,等于1表示没有命中地址是选中地址列表中按照is_default desc,address_id desc倒序的第一条地址 //等于0表示没有选中地址时是选中当前传入经纬度,等于1表示没有命中地址是选中地址列表中按照is_default desc,address_id desc倒序的第一条地址
const defaultAddressRoute = 0; const defaultAddressRoute = 0;
const shareLimitProgrameError=40001;
const addGoodsToCart = 1; //将商品加入购物车 const addGoodsToCart = 1; //将商品加入购物车
const addBundingToCart = 2; //将组合销售商品加入购物车 const addBundingToCart = 2; //将组合销售商品加入购物车
const positionPickupCodeBegin=12; const positionPickupCodeBegin=12;
......
This diff is collapsed.
...@@ -127,9 +127,14 @@ class ShareServiceModel extends \Business\AbstractModel ...@@ -127,9 +127,14 @@ class ShareServiceModel extends \Business\AbstractModel
$scene= \Our\Common::format(\Our\PathConst::wxStoreParams,$data['id']); $scene= \Our\Common::format(\Our\PathConst::wxStoreParams,$data['id']);
$page=\Our\PathConst::wxStorePath; $page=\Our\PathConst::wxStorePath;
$res=$this->getQrcode($page,$scene); $res=$this->getQrcode($page,$scene);
// var_dump($res);exit; if(Common::isJson($res)){
// header('Content-type: image/jpg'); $res=json_decode($res,true);
// echo $res;exit; if($res['errcode']==ApiConst::shareLimitProgrameError){
$memberRedis = \Redis\Db0\MemberRedisModel::getInstance();
$memberRedis->tableDel('wechatAccessToken');
$res=$this->getQrcode($page,$scene);
}
}
$fileName=md5($res); $fileName=md5($res);
//$fileName=$fileName.NameConst::jpgSuffix; //$fileName=$fileName.NameConst::jpgSuffix;
// $base64image=$this->dataUri($res,ImageConst::imagePgn); // $base64image=$this->dataUri($res,ImageConst::imagePgn);
...@@ -153,6 +158,14 @@ class ShareServiceModel extends \Business\AbstractModel ...@@ -153,6 +158,14 @@ class ShareServiceModel extends \Business\AbstractModel
$scene= \Our\Common::format(\Our\PathConst::wxGoodsParams,$data['id']); $scene= \Our\Common::format(\Our\PathConst::wxGoodsParams,$data['id']);
$page=\Our\PathConst::wxStorePath; $page=\Our\PathConst::wxStorePath;
$res=$this->getQrcode($page,$scene); $res=$this->getQrcode($page,$scene);
if(Common::isJson($res)){
$res=json_decode($res,true);
if($res['errcode']==ApiConst::shareLimitProgrameError){
$memberRedis = \Redis\Db0\MemberRedisModel::getInstance();
$memberRedis->tableDel('wechatAccessToken');
$res=$this->getQrcode($page,$scene);
}
}
// var_dump($res);exit; // var_dump($res);exit;
// header('Content-type: image/jpg'); // header('Content-type: image/jpg');
// echo $res;exit; // echo $res;exit;
......
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