Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
黄成意
/
go_sku_server
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
c397c589
authored
Sep 03, 2024
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
商品标签
parent
15a654a5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
pkg/vars/sku.go
service/service_tags.go
pkg/vars/sku.go
View file @
c397c589
...
@@ -6,6 +6,8 @@ var GoodsLabel = map[int]string{
...
@@ -6,6 +6,8 @@ var GoodsLabel = map[int]string{
2
:
"国际现货"
,
2
:
"国际现货"
,
3
:
"猎芯期货"
,
3
:
"猎芯期货"
,
4
:
"询价现货"
,
4
:
"询价现货"
,
5
:
"原厂直售"
,
6
:
"猎芯精选"
,
}
}
// 商品标签对应的展示
// 商品标签对应的展示
...
...
service/service_tags.go
View file @
c397c589
...
@@ -34,13 +34,13 @@ func (ts *TagsService) GetTags(skuId string, self_supplier_type int64) (goodsTag
...
@@ -34,13 +34,13 @@ func (ts *TagsService) GetTags(skuId string, self_supplier_type int64) (goodsTag
goodsTags
.
GoodsLabelName
=
goodsLabel
goodsTags
.
GoodsLabelName
=
goodsLabel
goodsTags
.
GoodsLabel
=
goodsLabelType
goodsTags
.
GoodsLabel
=
goodsLabelType
for
_
,
tagResult
:=
range
gjson
.
Get
(
goodsTagsStr
,
"tags"
)
.
Array
()
{
//
for _, tagResult := range gjson.Get(goodsTagsStr, "tags").Array() {
tagName
:=
vars
.
GoodsTags
[
int
(
tagResult
.
Int
())]
//
tagName := vars.GoodsTags[int(tagResult.Int())]
tagNames
=
append
(
tagNames
,
tagName
)
//
tagNames = append(tagNames, tagName)
tags
=
append
(
tags
,
int
(
tagResult
.
Int
()))
//
tags = append(tags, int(tagResult.Int()))
}
//
}
//
todo hcy 2023.1.10 增加额外商品
标签
//
自定义
标签
customerTag
:=
gjson
.
Get
(
goodsTagsStr
,
"customer_tag"
)
.
String
()
customerTag
:=
gjson
.
Get
(
goodsTagsStr
,
"customer_tag"
)
.
String
()
if
customerTag
!=
""
{
if
customerTag
!=
""
{
customerTagArr
:=
php2go
.
Explode
(
" "
,
php2go
.
Trim
(
customerTag
))
customerTagArr
:=
php2go
.
Explode
(
" "
,
php2go
.
Trim
(
customerTag
))
...
...
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