Commit c1c67ae6 authored by jianghaiming's avatar jianghaiming

update:set

parent d56bb8f2
......@@ -28,8 +28,8 @@ class MarketinggoodsController extends Base
$userId = !empty($params['user_id']) ? $params['user_id'] : '';
$marketingId = !empty($params['marketing_id']) ? $params['marketing_id'] : '';
$goodsSkuId = !empty($params['goods_sku_id']) ? $params['goods_sku_id'] : '';
$appid = !empty($params['appid']) ? $params['appid'] : 'merchant-b';
$content = $userId .'_' .$marketingId . '_' .$goodsSkuId;
if (empty($userId)) {
throw new DistributorException(['cus'=>14]);
......@@ -61,15 +61,22 @@ class MarketinggoodsController extends Base
if (!empty($goodsSkuInfo["desc_pic_url"])) {
$image = explode(",", $goodsSkuInfo["desc_pic_url"]);
$ksyun = Ksyun::getDownUrl($image, 'merchant-b', 'bp-yidian', 60);
$descPicUrlList = array_values($ksyun);
$url = explode(",", $goodsSkuInfo["desc_pic_url"]);
//$ksyun = Ksyun::getDownUrl($image, 'merchant-b', 'bp-yidian', 60);
$goodsImg = Ksyun::getPicUrl($appid,"goods_temp",$url[0],200,200,'jpeg');
//$descPicUrlList = array_values($ksyun);
}
$goodsImg = !empty($descPicUrlList[0]) ? $descPicUrlList[0] : '';//商品图片url地址
//$goodsImg = !empty($descPicUrlList[0]) ? $descPicUrlList[0] : '';//商品图片url地址
//$qr_string = "";//二维码扫描后的内容
$data['goods_share_id'] = $goodsShareId;
$data['share_img_url'] = '';
$url = config('interface','goods.marketing.generate_share_goods');
if(empty($url)){
throw new InterfaceException(['cus'=>0]);
}
$goods_share_url = 'ticket/detail.html?view=1P&fromType=1&goods_sku_id=awPZqLl5KtXQZh6k&goodsShareId='. $goodsShareId;
$data['goods_share_id'] = $goods_share_url;
$data['share_img_url'] = $goodsImg;
$data['share_data'] = [
'goods_img' => $goodsImg,
'price' => $price,
......
......@@ -14,6 +14,7 @@ use Api\PhpUtils\Common\TimeOut;
use App\Exception\custom\CodeSpecialException;
use Api\PhpServices\ShopImage\GetImage;
use Api\PhpServices\ShopImage\QR;
use App\Exception\custom\InterfaceException;
class DistributorService
{
......@@ -342,34 +343,13 @@ class DistributorService
$where['user_id'] = $params['user_id'];
$data = [];
$info = Distributor::getRecord($where);
//$distributorCodeUrl = (new GetImage())->getLeaderShare($info['distributor_code']);
// $qr = new QR("http://www.baidu.com");
// $qr->setWriteFile(1);
// $aa = $qr->get();
// print_r($aa);
//echo $info['distributor_code'] = "http://www.baidu.com";
$distributorCodeUrl = (new GetImage())->getLeaderShare("123456");
//$distributorCodeUrl = (new GetImage())->getCoupon("店铺测试", "商品苹果", "99.23", "北京", "哼哼");
//$distributorCodeUrl = (new GetImage())->getCoupon("店铺测试", "商品苹果", "99.23", "北京", "哼哼");
//$distributorCodeUrl = (new GetImage())->getGoods('', '', "以后", "商品苹果", "111", "12", $old_price = 0, $buy_count=0);
//$qr = new QR("http://www.baidu.com");
//$qr->setWriteFile(1);
// $pngData = $qr->get();
//return $distributorCodeUrl ;
$url = config('interface','goods.wx.appgc');
if(empty($url)){
throw new InterfaceException(['cus'=>0]);
}
$codeUrl = $url.'/#/ticket/commander/'.$params['user_id'].'/-';
$distributorCodeUrl = (new GetImage())->getLeaderShare($codeUrl);
}
......
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