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
606ec7fc
Commit
606ec7fc
authored
Jul 13, 2021
by
jianghaiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update:set
parent
54b16b0c
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
4 deletions
+36
-4
Marketinggoods.php
application/modules/Marketing/controllers/Marketinggoods.php
+8
-3
CommonService.php
application/services/common/CommonService.php
+26
-0
DistributorService.php
application/services/marketing/DistributorService.php
+1
-0
MarketingGoodsService.php
application/services/marketing/MarketingGoodsService.php
+1
-1
No files found.
application/modules/Marketing/controllers/Marketinggoods.php
View file @
606ec7fc
...
@@ -8,6 +8,8 @@ use Helpers\Aes;
...
@@ -8,6 +8,8 @@ use Helpers\Aes;
use
Api\PhpServices\JwUser\JwUser
;
use
Api\PhpServices\JwUser\JwUser
;
use
Api\PhpServices\Ksy\Ksyun
;
use
Api\PhpServices\Ksy\Ksyun
;
use
Api\PhpServices\ShopImage\GetImage
;
use
Api\PhpServices\ShopImage\GetImage
;
use
App\Services\goods\GoodsService
;
class
MarketinggoodsController
extends
Base
class
MarketinggoodsController
extends
Base
{
{
const
KS3_BASE_URL
=
'ks3-cn-beijing.ksyun.com'
;
const
KS3_BASE_URL
=
'ks3-cn-beijing.ksyun.com'
;
...
@@ -60,14 +62,17 @@ class MarketinggoodsController extends Base
...
@@ -60,14 +62,17 @@ class MarketinggoodsController extends Base
$oldPrice
=
!
empty
(
$goodsSkuInfo
[
'original_price'
])
?
$goodsSkuInfo
[
'original_price'
]
:
''
;
$oldPrice
=
!
empty
(
$goodsSkuInfo
[
'original_price'
])
?
$goodsSkuInfo
[
'original_price'
]
:
''
;
$price
=
!
empty
(
$goodsSkuInfo
[
'price'
])
?
$goodsSkuInfo
[
'price'
]
:
''
;
$price
=
!
empty
(
$goodsSkuInfo
[
'price'
])
?
$goodsSkuInfo
[
'price'
]
:
''
;
if
(
!
empty
(
$goodsSkuInfo
[
"desc_pic_url"
]))
{
if
(
!
empty
(
$goodsSkuInfo
[
"desc_pic_url"
]))
{
$url
=
explode
(
","
,
$goodsSkuInfo
[
"desc_pic_url"
]);
//
$url = explode(",", $goodsSkuInfo["desc_pic_url"]);
//$ksyun = Ksyun::getDownUrl($image, 'merchant-b', 'bp-yidian', 60);
//$ksyun = Ksyun::getDownUrl($image, 'merchant-b', 'bp-yidian', 60);
$goodsImg
=
Ksyun
::
getPicUrl
(
$appid
,
"goods_temp"
,
$url
[
0
],
200
,
200
,
'jpeg'
);
//
$goodsImg = Ksyun::getPicUrl($appid,"goods_temp",$url[0],200,200,'jpeg');
//$descPicUrlList = array_values($ksyun);
//$descPicUrlList = array_values($ksyun);
$goodsImg
=
GoodsService
::
getUrlList
(
$goodsSkuInfo
[
"desc_pic_url"
]);
$goodsImg
=
!
empty
(
$goodsImg
[
0
])
?
$goodsImg
[
0
]
:
''
;
}
}
$url
=
config
(
'interface'
,
'goods.wx.appgc'
);
$url
=
config
(
'interface'
,
'goods.wx.appgc'
);
if
(
empty
(
$url
)){
if
(
empty
(
$url
)){
throw
new
InterfaceException
([
'cus'
=>
0
]);
throw
new
InterfaceException
([
'cus'
=>
0
]);
...
...
application/services/common/CommonService.php
View file @
606ec7fc
...
@@ -15,6 +15,7 @@ use Api\PhpServices\Sensitive\Sensitive;
...
@@ -15,6 +15,7 @@ use Api\PhpServices\Sensitive\Sensitive;
use
App\Exception\custom\InterfaceException
;
use
App\Exception\custom\InterfaceException
;
use
Api\PhpUtils\Http\Request
;
use
Api\PhpUtils\Http\Request
;
use
Helpers\Aes
;
use
Helpers\Aes
;
use
Api\PhpServices\Ksy\Ksyun
;
class
CommonService
class
CommonService
{
{
...
@@ -57,4 +58,29 @@ class CommonService
...
@@ -57,4 +58,29 @@ class CommonService
return
$goodsShareId
;
return
$goodsShareId
;
}
}
public
static
function
getUrlList
(
$picUrlStr
)
{
$data
=
$ksyunParams
=
[];
$strList
=
explode
(
","
,
$picUrlStr
);
foreach
(
$strList
as
$key
=>
$str
)
{
$arr
=
explode
(
"/"
,
$str
);
if
(
count
(
$arr
)
!=
2
)
{
if
(
preg_match
(
"/^http[s]
{
0,1
}
:\/\/([\w.]+\/?)\S*/"
,
$str
))
{
$data
[]
=
$str
;
}
else
{
continue
;
}
}
else
{
$bucket
=
$arr
[
0
];
$objectId
=
$arr
[
1
];
$url
=
Ksyun
::
getPicUrl
(
"merchant-b"
,
'goods_temp'
,
$bucket
.
'/'
.
$objectId
,
200
,
200
,
'jpeg'
);
$data
[]
=
$url
;
}
}
return
$data
;
}
}
}
\ No newline at end of file
application/services/marketing/DistributorService.php
View file @
606ec7fc
...
@@ -16,6 +16,7 @@ use App\Exception\custom\CodeSpecialException;
...
@@ -16,6 +16,7 @@ use App\Exception\custom\CodeSpecialException;
use
Api\PhpServices\ShopImage\GetImage
;
use
Api\PhpServices\ShopImage\GetImage
;
use
Api\PhpServices\ShopImage\QR
;
use
Api\PhpServices\ShopImage\QR
;
use
App\Exception\custom\InterfaceException
;
use
App\Exception\custom\InterfaceException
;
use
App\Services\goods\GoodsService
;
class
DistributorService
class
DistributorService
{
{
...
...
application/services/marketing/MarketingGoodsService.php
View file @
606ec7fc
...
@@ -121,7 +121,7 @@ class MarketingGoodsService
...
@@ -121,7 +121,7 @@ class MarketingGoodsService
$list
[
$i
][
'original_price'
]
=
!
empty
(
$goodsSkuList
[
$value
[
'goods_sku_id'
]][
'original_price'
])
?
$goodsSkuList
[
$value
[
'goods_sku_id'
]][
'original_price'
]
:
''
;
$list
[
$i
][
'original_price'
]
=
!
empty
(
$goodsSkuList
[
$value
[
'goods_sku_id'
]][
'original_price'
])
?
$goodsSkuList
[
$value
[
'goods_sku_id'
]][
'original_price'
]
:
''
;
$list
[
$i
][
'price'
]
=
!
empty
(
$goodsSkuList
[
$value
[
'goods_sku_id'
]][
'price'
])
?
$goodsSkuList
[
$value
[
'goods_sku_id'
]][
'price'
]
:
''
;
$list
[
$i
][
'price'
]
=
!
empty
(
$goodsSkuList
[
$value
[
'goods_sku_id'
]][
'price'
])
?
$goodsSkuList
[
$value
[
'goods_sku_id'
]][
'price'
]
:
''
;
$list
[
$i
][
'total_amount_order'
]
=
!
empty
(
$goodsSkuList
[
$value
[
'goods_sku_id'
]][
'total_amount_order'
])
?
$goodsSkuList
[
$value
[
'goods_sku_id'
]][
'total_amount_order'
]
:
''
;
$list
[
$i
][
'total_amount_order'
]
=
!
empty
(
$goodsSkuList
[
$value
[
'goods_sku_id'
]][
'total_amount_order'
])
?
$goodsSkuList
[
$value
[
'goods_sku_id'
]][
'total_amount_order'
]
:
''
;
$list
[
$i
][
'desc_pic_url'
]
=
!
empty
(
$goodsSkuList
[
$value
[
'goods_sku_id'
]][
'desc_pic_url'
])
?
self
::
getUrlList
(
$goodsSkuList
[
$value
[
'goods_sku_id'
]][
'desc_pic_url'
])
:
''
;
$list
[
$i
][
'desc_pic_url'
]
=
!
empty
(
$goodsSkuList
[
$value
[
'goods_sku_id'
]][
'desc_pic_url'
])
?
GoodsService
::
getUrlList
(
$goodsSkuList
[
$value
[
'goods_sku_id'
]][
'desc_pic_url'
])
:
''
;
$shopId
=
!
empty
(
$list
[
$i
][
'shop_id'
])
?
$list
[
$i
][
'shop_id'
]
:
''
;
$shopId
=
!
empty
(
$list
[
$i
][
'shop_id'
])
?
$list
[
$i
][
'shop_id'
]
:
''
;
$list
[
$i
][
'shop_name'
]
=
!
empty
(
$subShopList
[
$shopId
][
'shop_name'
])
?
$subShopList
[
$shopId
][
'shop_name'
]
:
''
;
$list
[
$i
][
'shop_name'
]
=
!
empty
(
$subShopList
[
$shopId
][
'shop_name'
])
?
$subShopList
[
$shopId
][
'shop_name'
]
:
''
;
...
...
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