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
eea09d1b
Commit
eea09d1b
authored
Jul 29, 2021
by
luhongguang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'test' of
https://git.yidian-inc.com:8021/bp/goods
into test
parents
6a87e32e
91cd178e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
8 deletions
+17
-8
MarketingGoodsService.php
application/services/marketing/MarketingGoodsService.php
+5
-1
GetImage.php
vendor/api/php_services/src/ShopImage/GetImage.php
+12
-7
No files found.
application/services/marketing/MarketingGoodsService.php
View file @
eea09d1b
...
@@ -101,7 +101,11 @@ class MarketingGoodsService
...
@@ -101,7 +101,11 @@ class MarketingGoodsService
foreach
(
$data
as
$key
=>
$value
)
{
foreach
(
$data
as
$key
=>
$value
)
{
$inventoryRest
=
!
empty
(
$goodsSkuList
[
$value
[
'goods_sku_id'
]][
'inventory_rest'
])
?
$goodsSkuList
[
$value
[
'goods_sku_id'
]][
'inventory_rest'
]
:
''
;
$inventoryRest
=
!
empty
(
$goodsSkuList
[
$value
[
'goods_sku_id'
]][
'inventory_rest'
])
?
$goodsSkuList
[
$value
[
'goods_sku_id'
]][
'inventory_rest'
]
:
''
;
if
(
!
empty
(
$inventoryRest
))
{
$expirationTime
=
!
empty
(
$goodsSkuList
[
$value
[
'goods_sku_id'
]][
'expiration_time'
])
?
$goodsSkuList
[
$value
[
'goods_sku_id'
]][
'expiration_time'
]
:
''
;
$onlineStatus
=
!
empty
(
$goodsSkuList
[
$value
[
'goods_sku_id'
]][
'online_status'
])
?
$goodsSkuList
[
$value
[
'goods_sku_id'
]][
'online_status'
]
:
''
;
if
(
!
empty
(
$inventoryRest
)
&&
$expirationTime
>
date
(
"Y-m-d H:i:s"
)
&&
$onlineStatus
==
1
)
{
$list
[
$i
][
'inventory_rest'
]
=
!
empty
(
$goodsSkuList
[
$value
[
'goods_sku_id'
]][
'inventory_rest'
])
?
$goodsSkuList
[
$value
[
'goods_sku_id'
]][
'inventory_rest'
]
:
''
;
$list
[
$i
][
'inventory_rest'
]
=
!
empty
(
$goodsSkuList
[
$value
[
'goods_sku_id'
]][
'inventory_rest'
])
?
$goodsSkuList
[
$value
[
'goods_sku_id'
]][
'inventory_rest'
]
:
''
;
$list
[
$i
]
=
$value
;
$list
[
$i
]
=
$value
;
$list
[
$i
][
'life_account_id'
]
=
!
empty
(
$goodsSkuList
[
$value
[
'goods_sku_id'
]][
'life_account_id'
])
?
$goodsSkuList
[
$value
[
'goods_sku_id'
]][
'life_account_id'
]
:
''
;
$list
[
$i
][
'life_account_id'
]
=
!
empty
(
$goodsSkuList
[
$value
[
'goods_sku_id'
]][
'life_account_id'
])
?
$goodsSkuList
[
$value
[
'goods_sku_id'
]][
'life_account_id'
]
:
''
;
...
...
vendor/api/php_services/src/ShopImage/GetImage.php
View file @
eea09d1b
...
@@ -172,18 +172,23 @@ class GetImage
...
@@ -172,18 +172,23 @@ class GetImage
imagecopyresized
(
$im
,
$goods_im
,
47
,
173
,
0
,
0
,
$goods_size
,
$goods_size
,
$goods_size
,
$goods_size
);
imagecopyresized
(
$im
,
$goods_im
,
47
,
173
,
0
,
0
,
$goods_size
,
$goods_size
,
$goods_size
,
$goods_size
);
// 底部二维码
// 底部二维码
$qr
=
new
QR
(
$qr_string
);
//$qr = new QR($qr_string);
$qr_size
=
100
;
$qr_size
=
170
;
// $qr->setSize($qr_size);
// $qr->setRoundBlockSize(QrCode::ROUND_BLOCK_SIZE_MODE_MARGIN);
// $qr_string = $qr->get();
$qr
=
new
QrCode
(
$qr_string
);
$qr
->
setSize
(
$qr_size
);
$qr
->
setSize
(
$qr_size
);
$qr
->
setRoundBlockSize
(
QrCode
::
ROUND_BLOCK_SIZE_MODE_MARGIN
);
$qr
_string
=
$qr
->
writeString
(
);
$qr_string
=
$qr
->
get
();
//
$qr_string = $qr->get();
$qr_img
=
imagecreatefromstring
(
$qr_string
);
$qr_img
=
imagecreatefromstring
(
$qr_string
);
list
(
$qr_w
,
$qr_h
)
=
getimagesizefromstring
(
$qr_string
);
list
(
$qr_w
,
$qr_h
)
=
getimagesizefromstring
(
$qr_string
);
imagecopyresized
(
$im
,
$qr_img
,
49
,
1102
,
0
,
0
,
$qr_size
,
$qr_size
,
$qr_size
,
$qr_size
);
imagecopyresized
(
$im
,
$qr_img
,
0
,
1065
,
0
,
0
,
$qr_size
,
$qr_size
,
190
,
190
);
// 底部文字
// 底部文字
imagettftext
(
$im
,
21
,
0
,
1
95
,
1160
,
333333
,
$this
->
font_m
,
"长按扫码快速抢券"
);
imagettftext
(
$im
,
21
,
0
,
2
95
,
1160
,
333333
,
$this
->
font_m
,
"长按扫码快速抢券"
);
imagettftext
(
$im
,
16
,
0
,
1
95
,
1200
,
666666
,
$this
->
font_r
,
"分享自 生活圈APP"
);
imagettftext
(
$im
,
16
,
0
,
2
95
,
1200
,
666666
,
$this
->
font_r
,
"分享自 生活圈APP"
);
// 底部logo
// 底部logo
$logo_path
=
__DIR__
.
'/images/3_logo.png'
;
$logo_path
=
__DIR__
.
'/images/3_logo.png'
;
...
...
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