Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
liexin_supplier
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
18e1195c
authored
Jul 24, 2025
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
temp
parent
8d46228e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
8 deletions
app/Http/Services/SkuService.php
config/website.php
resources/views/script/SkuListScript.blade.php
app/Http/Services/SkuService.php
View file @
18e1195c
...
...
@@ -44,9 +44,16 @@ class SkuService extends BaseService
$data
=
json_decode
(
$return
,
true
);
$list
=
[];
if
(
isset
(
$data
[
'error_code'
])
&&
$data
[
'error_code'
]
==
0
)
{
$url
=
config
(
'website.GoodsServerUrl'
)
.
'/synchronization?goods_id='
.
implode
(
','
,
$data
[
'data'
][
'goods_id'
]);
$return
=
curl
(
$url
,
$map
,
1
);
$goodsData
=
json_decode
(
$return
,
true
);
if
(
isset
(
$goodsData
[
'error_code'
])
&&
$goodsData
[
'error_code'
]
==
0
)
{
$goodsData
=
collect
(
$goodsData
[
'data'
])
->
keyBy
(
'goods_id'
)
->
toArray
();
}
$redis
=
new
RedisModel
;
//处理供应商
$spuRedis
=
Redis
::
connection
(
'spu'
);
//商品服务获取数据
foreach
(
$data
[
'data'
][
'goods_id'
]
as
$k
=>
$goodsId
)
{
$uploadItemService
=
new
SkuUploadItemService
();
$auditData
=
$uploadItemService
->
getSkuAuditData
(
$data
[
'data'
][
'goods_id'
]);
...
...
@@ -97,7 +104,11 @@ class SkuService extends BaseService
$standardBrand
=
json_decode
(
$standardBrand
,
true
);
$sku
[
'standard_brand_name'
]
=
$standardBrand
[
'brand_name'
];
}
$skuData
=
array_get
(
$goodsData
,
$sku
[
'goods_id'
],
[]);
$sku
[
'goods_tag_names'
]
=
''
;
if
(
!
empty
(
$skuData
[
'goods_tag'
][
'goods_tag_names'
]))
{
$sku
[
'goods_tag_names'
]
=
implode
(
','
,
$skuData
[
'goods_tag'
][
'goods_tag_names'
]);
}
//获取价格
$moqPrice
=
[];
if
(
!
empty
(
$sku
[
'ladder_price'
]))
{
...
...
config/website.php
View file @
18e1195c
...
...
@@ -45,5 +45,6 @@ return [
'CrmUrl'
=>
env
(
'CRM_URL'
),
'SkipSendEmail'
=>
env
(
'skip_send_email'
),
'CubeUrl'
=>
env
(
'CUBE_URL'
),
'FootstoneCurlUrl'
=>
'http://footstone.liexindev.net/open/curl?url='
'FootstoneCurlUrl'
=>
'http://footstone.liexindev.net/open/curl?url='
,
'GoodsServerUrl'
=>
'http://192.168.1.237:60014'
];
resources/views/script/SkuListScript.blade.php
View file @
18e1195c
...
...
@@ -156,12 +156,8 @@
}
},
{
field
:
'sku_tags'
,
title
:
'标签'
,
align
:
'center'
,
width
:
150
,
templet
:
function
(
data
)
{
if
(
data
.
invalid_sku_tags
)
{
return
`<span>
${
data
.
valid_sku_tags
}
</span>`
+
` <span style="color: #D7D7D7">
${
data
.
invalid_sku_tags
}
</span>`
;
}
else
{
return
`<span>
${
data
.
valid_sku_tags
}
</span>`
}
field
:
'goods_tag_names'
,
title
:
'标签'
,
align
:
'center'
,
width
:
150
,
templet
:
function
(
data
)
{
return
data
.
goods_tag_names
;
}
},
{
field
:
'ability_level_name'
,
title
:
'履约程度'
,
align
:
'center'
,
width
:
80
,
templet
:
function
(
data
)
{
...
...
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