Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica.cloud.web-education-admin
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
提交
打开侧边栏
com.pica.cloud.education.frontend
pica.cloud.web-education-admin
提交
e339445d
提交
e339445d
编写于
1月 16, 2024
作者:
xinglee23
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: bugfix 工作站-商品详情页-商品头图反复点击进入会无规则排序;
上级
aa33851e
变更
1
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
24 行增加
和
29 行删除
+24
-29
create-good-new.vue
src/views/goods/create-good-new.vue
+24
-29
未找到文件。
src/views/goods/create-good-new.vue
浏览文件 @
e339445d
...
...
@@ -130,7 +130,7 @@
:on-exceed=
"imgExceed"
:limit=
"6"
>
<div
:key=
"i
ndex"
v-for=
"(item,
index) in fileGoodsList"
>
<div
:key=
"i
tem.id"
v-for=
"(item,
index) in fileGoodsList"
>
<div
class=
"img-box"
>
<div
class=
"file-pics"
v-if=
"fileGoodsList.length > 0"
>
<img
:src=
"item.url"
@
mouseover
.
stop=
"headIndex=index"
class=
"bg-img"
/>
...
...
@@ -1083,46 +1083,41 @@ import { originRules, originRules1, originRules3 } from './common/rules';
this
.
formData
.
optPrice
=
this
.
formData
.
costPrice
/
100
;
this
.
formData
.
realCostPrice
=
this
.
formData
.
realCostPrice
/
100
;
this
.
formData
.
scorePerformance
=
this
.
formData
.
scorePerformance
/
100
;
this
.
fileGoodsList
=
this
.
getImges
(
goodDet
.
goodsImgList
,
1
);
this
.
fileIntrList
=
this
.
getImges
(
goodDet
.
goodsDetailImageList
,
2
);
this
.
fileGoodsList
=
this
.
getIm
a
ges
(
goodDet
.
goodsImgList
,
1
);
this
.
fileIntrList
=
this
.
getIm
a
ges
(
goodDet
.
goodsDetailImageList
,
2
);
this
.
formData
.
stock
=
this
.
formData
.
goodsStock
;
this
.
formData
.
reimburseMax
=
this
.
formData
.
reimburseMax
/
100
;
if
(
goodDet
.
goodsVideoList
.
length
>
0
)
{
this
.
videoList
.
push
(
goodDet
.
goodsVideoList
[
0
]);
this
.
videoModel
.
videoFullPath
=
this
.
videoList
[
0
].
goodsImgUrl
;
}
let
newImgList
=
[];
this
.
fileGoodsList
.
map
((
item
,
index
)
=>
{
this
.
checkImgExists
(
item
.
imageUrl
).
then
(()
=>
{
newImgList
.
push
(
item
)
}).
catch
(()
=>
{
newImgList
=
this
.
fileGoodsList
.
splice
(
index
,
1
);
})
})
this
.
fileGoodsList
=
newImgList
;
//
let newImgList = [];
// this.fileGoodsList.map((item,
index) => {
//
this.checkImgExists(item.imageUrl).then(()=> {
//
newImgList.push(item)
//
}).catch(()=> {
//
newImgList = this.fileGoodsList.splice(index,1);
//
})
//
})
//
this.fileGoodsList = newImgList;
this
.
rules
=
{
...
this
.
rules
,
...
originRules
};
},
getImges
(
d
,
type
){
let
a
=
[];
if
(
d
.
length
>
0
){
for
(
let
i
=
0
;
i
<
d
.
length
;
i
++
){
a
.
push
({
url
:
type
==
1
?
d
[
i
].
goodsImgUrl
:
d
[
i
].
imageUrl
,
imageUrl
:
type
==
1
?
d
[
i
].
goodsImgUrl
:
d
[
i
].
imageUrl
,
goodsImgUrl
:
type
==
1
?
d
[
i
].
goodsImgUrl
:
d
[
i
].
imageUrl
,
id
:
d
[
i
].
id
,
imageSort
:
d
[
i
].
imageSort
,
imgSort
:
d
[
i
].
imgSort
,
imageType
:
type
==
1
?
d
[
i
].
imgType
:
d
[
i
].
imageType
,
miniProgramShow
:
d
[
i
].
miniProgramShow
===
0
?
0
:
1
,
})
}
}
return
a
;
getImages
(
d
,
type
)
{
return
d
.
map
(
v
=>
({
url
:
type
==
1
?
v
.
goodsImgUrl
:
v
.
imageUrl
,
imageUrl
:
type
==
1
?
v
.
goodsImgUrl
:
v
.
imageUrl
,
goodsImgUrl
:
type
==
1
?
v
.
goodsImgUrl
:
v
.
imageUrl
,
id
:
v
.
id
,
imageSort
:
v
.
imageSort
,
imgSort
:
v
.
imgSort
,
imageType
:
type
==
1
?
v
.
imgType
:
v
.
imageType
,
miniProgramShow
:
v
.
miniProgramShow
===
0
?
0
:
1
,
})
);
},
// 修改条形码
changeBarCode
(
val
)
{
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录