Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
goods
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bp
goods
Commits
c1c67ae6
Commit
c1c67ae6
authored
Jul 06, 2021
by
jianghaiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update:set
parent
d56bb8f2
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
34 deletions
+21
-34
Marketinggoods.php
application/modules/Marketing/controllers/Marketinggoods.php
+14
-7
DistributorService.php
application/services/marketing/DistributorService.php
+7
-27
No files found.
application/modules/Marketing/controllers/Marketinggoods.php
View file @
c1c67ae6
...
...
@@ -28,9 +28,9 @@ 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
,
...
...
application/services/marketing/DistributorService.php
View file @
c1c67ae6
...
...
@@ -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
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment