Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
op-web-service
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
op-web-service
Commits
23edc78a
Commit
23edc78a
authored
Jul 16, 2021
by
pengyunqian
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
https://git.yidian-inc.com:8021/bp/op-web-service
into pyq_goods
parents
8aac9a9f
ddeb5c76
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
11 deletions
+20
-11
index.vue
src/pages/Goods/Detail/index.vue
+20
-11
No files found.
src/pages/Goods/Detail/index.vue
View file @
23edc78a
...
@@ -144,7 +144,7 @@
...
@@ -144,7 +144,7 @@
<section
class=
"width50p"
>
<section
class=
"width50p"
>
<h4
style=
"margin-bottom:20px"
>
商品介绍图
</h4>
<h4
style=
"margin-bottom:20px"
>
商品介绍图
</h4>
<el-upload
<el-upload
:data=
"{ type:1 }"
:data=
"{ type:
1 }"
:disabled=
"$route.params.operation !== 'EDIT'"
:disabled=
"$route.params.operation !== 'EDIT'"
:action=
"uploadUrl"
:action=
"uploadUrl"
auto-upload
auto-upload
...
@@ -627,7 +627,7 @@ import {
...
@@ -627,7 +627,7 @@ import {
checkGoodsName
,
checkGoodsName
,
getShopsList
,
getShopsList
,
postAddShop
,
postAddShop
,
editGoods
//
editGoods
}
from
"@/service/Goods/goods"
;
}
from
"@/service/Goods/goods"
;
import
{
GOODS_URI
}
from
"../../../../server/config.js"
;
import
{
GOODS_URI
}
from
"../../../../server/config.js"
;
...
@@ -827,8 +827,8 @@ export default {
...
@@ -827,8 +827,8 @@ export default {
goods_info
.
introduce_pic_url_list
,
goods_info
.
introduce_pic_url_list
,
this
.
introducePicUrlList
this
.
introducePicUrlList
);
);
this
.
detailUploadList
=
goods_info
.
desc_pic_url
.
split
(
","
);
this
.
detailUploadList
=
this
.
formatUploadPictureList
(
goods_info
.
desc_pic_url
);
this
.
introduceUploadList
=
goods_info
.
introduce_pic_url
.
split
(
","
);
this
.
introduceUploadList
=
this
.
formatUploadPictureList
(
goods_info
.
introduce_pic_url
);
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
error
(
error
);
console
.
error
(
error
);
}
}
...
@@ -843,6 +843,15 @@ export default {
...
@@ -843,6 +843,15 @@ export default {
});
});
},
},
// 初始化上传照片列表
formatUploadPictureList
(
fileStr
)
{
if
(
!
fileStr
)
{
return
[];
}
else
{
return
fileStr
.
split
(
","
);
}
},
// 上传图片的公共方法
// 上传图片的公共方法
uploadPicture
(
response
,
storageList
)
{
uploadPicture
(
response
,
storageList
)
{
const
responseURL
=
response
.
result
.
image_id
;
const
responseURL
=
response
.
result
.
image_id
;
...
@@ -1122,7 +1131,7 @@ export default {
...
@@ -1122,7 +1131,7 @@ export default {
// 禁用时间
// 禁用时间
disableExpirDate
(
time
)
{
disableExpirDate
(
time
)
{
const
timeMs
=
time
.
getTime
();
const
timeMs
=
time
.
getTime
();
if
(
timeMs
>
(
Date
.
now
()
-
86400000
)
)
{
if
(
timeMs
>
Date
.
now
()
-
86400000
)
{
return
false
;
return
false
;
}
else
{
}
else
{
return
true
;
return
true
;
...
@@ -1267,12 +1276,12 @@ export default {
...
@@ -1267,12 +1276,12 @@ export default {
console
.
log
(
query
);
console
.
log
(
query
);
const
res
=
await
editGoods
(
query
);
//
const res = await editGoods(query);
if
(
res
.
code
!==
0
)
{
//
if (res.code !== 0) {
return
this
.
$message
.
error
(
res
.
reason
);
//
return this.$message.error(res.reason);
}
//
}
this
.
$message
.
success
(
"商品编辑成功!"
);
//
this.$message.success("商品编辑成功!");
this
.
$router
.
replace
({
name
:
"GoodsList"
});
//
this.$router.replace({ name: "GoodsList" });
}
}
}
}
};
};
...
...
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