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
12ba2c1a
Commit
12ba2c1a
authored
Aug 06, 2021
by
your yuchenglong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update:解决回显问题
parent
20a30e0e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
33 deletions
+38
-33
infoEditing.vue
src/pages/Activity/releaseProduc/components/infoEditing.vue
+20
-14
index.vue
src/pages/Activity/releaseProduc/index.vue
+18
-19
No files found.
src/pages/Activity/releaseProduc/components/infoEditing.vue
View file @
12ba2c1a
...
...
@@ -62,6 +62,8 @@ export default {
picUrlList
:
[],
// 图片回显列表
},
propData
:
{},
isShowPopver
:
false
,
// 是否展示图片框
uploadUrl
:
`
${
GOODS_URI
}
/ksy/ks3apiunencrypt/ks3api_upload`
,
// 金山云上传地址
};
...
...
@@ -87,28 +89,32 @@ export default {
}
},
// 获取本地存储数据
// getStorData() {
// let arrStor = JSON.parse(localStorage.getItem("infoEditArrStor"));
// if (arrStor) {
// this.infoEditForm = arrStor;
// }
// },
// 获取营销活动详情
marketingInfoMet
()
{
console
.
log
();
this
.
propData
=
JSON
.
parse
(
localStorage
.
getItem
(
'propData'
));
this
.
infoEditForm
.
title
=
this
.
propData
.
marketing_name
;
this
.
infoEditForm
.
desc
=
this
.
propData
.
pindan_desc
;
for
(
var
i
in
this
.
propData
.
pindan_pic_url
)
{
this
.
infoEditForm
.
picUrlList
.
push
({
url
:
this
.
propData
.
pindan_pic_url
[
i
],
});
}
},
},
watch
:
{
editInfo
:
function
(
newVal
)
{
this
.
infoEditForm
.
title
=
newVal
.
marketing_name
;
this
.
infoEditForm
.
desc
=
newVal
.
pindan_desc
;
for
(
var
i
in
newVal
.
pindan_pic_url
)
{
this
.
infoEditForm
.
picUrlList
.
push
({
url
:
newVal
.
pindan_pic_url
[
i
],
});
let
marketingId
=
this
.
$route
.
query
.
marketing_id
;
if
(
marketingId
==
undefined
)
{
return
;
}
localStorage
.
setItem
(
'propData'
,
JSON
.
stringify
(
newVal
));
},
},
created
()
{
// this.getStorData
();
this
.
marketingInfoMet
();
},
};
</
script
>
...
...
src/pages/Activity/releaseProduc/index.vue
View file @
12ba2c1a
...
...
@@ -13,14 +13,22 @@
<el-step
title=
"拼单设置"
></el-step>
</el-steps>
<div
class=
"content"
>
<infoEditing
ref=
"infoEdit"
v-if=
"active === 1"
:editInfo=
"infoEditArr"
/>
<infoEditing
ref=
"infoEdit"
v-show=
"active === 1"
:editInfo=
"infoEditArr"
/>
<addProduc
ref=
"addProduc"
v-
else-if
=
"active === 2"
v-
show
=
"active === 2"
:editInfo=
"infoEditArr"
:addProduc=
"addProducArr"
/>
<spellOrderSet
:spellOrderSet=
"spellOrderSetArr"
v-else
/>
<spellOrderSet
ref=
"spellOrderSet"
v-show=
"active === 3"
:spellOrderSet=
"spellOrderSetArr"
/>
</div>
<div
class=
"stepsBtn"
>
<el-button
@
click=
"prev"
v-show=
"active >= 2"
style=
"margin-right: 20px"
...
...
@@ -74,40 +82,29 @@ export default {
// 下一步
next
()
{
// localStorage.clear();
if
(
this
.
active
===
1
)
{
if
(
this
.
$refs
.
infoEdit
.
infoEditForm
.
title
==
""
)
{
ElMessage
.
error
(
"请填写商品标题"
);
return
;
}
this
.
active
=
2
;
this
.
infoEditArr
=
{
title
:
this
.
$refs
.
infoEdit
.
infoEditForm
.
title
,
desc
:
this
.
$refs
.
infoEdit
.
infoEditForm
.
desc
,
picUploadList
:
this
.
$refs
.
infoEdit
.
infoEditForm
.
picUploadList
.
join
(
","
),
};
// localStorage.setItem(
// "infoEditArrStor",
// JSON.stringify(this.infoEditArr)
// );
this
.
active
=
2
;
}
else
if
(
this
.
active
===
2
)
{
if
(
this
.
$refs
.
addProduc
.
comTableData
.
length
==
0
)
{
ElMessage
.
error
(
"请至少选择一个商品"
);
return
;
}
this
.
addProducArr
=
this
.
$refs
.
addProduc
.
comTableData
;
this
.
active
=
3
;
this
.
addProducArr
=
this
.
$refs
.
addProduc
;
// localStorage.setItem(
// "addProducArrStor",
// JSON.stringify(this.addProducArr)
// );
}
else
{
this
.
startDate
=
this
.
$refs
.
spellOrderSet
.
startDate
;
this
.
endDate
=
this
.
$refs
.
spellOrderSet
.
endDate
;
console
.
log
();
}
// this.active++;
console
.
log
(
this
.
active
);
},
// 获取营销活动详情
...
...
@@ -132,9 +129,11 @@ export default {
},
// 确认发布
async
confirmRelease
()
{
for
(
var
i
in
this
.
addProducArr
.
comTableData
)
{
this
.
goodsSkuIDArr
.
push
(
this
.
addProducArr
.
comTableData
[
i
].
goods_sku_id
);
for
(
var
i
in
this
.
addProducArr
)
{
this
.
goodsSkuIDArr
.
push
(
this
.
addProducArr
[
i
].
goods_sku_id
);
}
this
.
startDate
=
this
.
$refs
.
spellOrderSet
.
startDate
;
this
.
endDate
=
this
.
$refs
.
spellOrderSet
.
endDate
;
let
params
=
{
marketing_id
:
this
.
$route
.
query
.
marketing_id
==
undefined
...
...
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