Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
welfare
Overview
Overview
Details
Activity
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
达摩4.0重构
welfare
Commits
5ea8bbde
Commit
5ea8bbde
authored
Jun 25, 2021
by
caoyanzhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复虚拟礼品第一次保存失败第二次无法保存bug
parent
22c96393
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
35 deletions
+29
-35
form.vue
src/views/card/card-package/form.vue
+4
-2
card-form.js
src/views/card/gic-card/card-form.js
+2
-0
real-gift-detail.vue
src/views/gift-manage/real-gift-detail.vue
+4
-6
virtual-gift-detail.vue
src/views/gift-manage/virtual-gift-detail.vue
+19
-27
No files found.
src/views/card/card-package/form.vue
View file @
5ea8bbde
...
...
@@ -266,9 +266,9 @@ export default {
this
.
refreshCouponList
();
let
callbackId
=
this
.
$route
.
query
.
callbackId
;
if
(
callbackId
)
{
// 有callbackId参数时,认为入口是福利选择器组件
// 操作完成后需要修改localStorage中的welfareCreateCallback,以触发福利选择器内部数据更新
let
obj
=
JSON
.
parse
(
localStorage
.
getItem
(
'welfareCreateCallback'
)
||
'{}'
);
obj
[
callbackId
]
=
false
;
localStorage
.
setItem
(
'welfareCreateCallback'
,
JSON
.
stringify
(
obj
));
obj
[
callbackId
]
=
true
;
localStorage
.
setItem
(
'welfareCreateCallback'
,
JSON
.
stringify
(
obj
));
}
...
...
@@ -339,6 +339,8 @@ export default {
this
.
$store
.
commit
(
'updateShowCornerCanUseApp'
,
true
);
let
callbackId
=
this
.
$route
.
query
.
callbackId
;
if
(
callbackId
)
{
// 有callbackId参数时,认为入口是福利选择器组件
// 操作完成后需要修改localStorage中的welfareCreateCallback,以触发福利选择器内部数据更新
let
obj
=
JSON
.
parse
(
localStorage
.
getItem
(
'welfareCreateCallback'
)
||
'{}'
);
obj
[
callbackId
]
=
true
;
localStorage
.
setItem
(
'welfareCreateCallback'
,
JSON
.
stringify
(
obj
));
...
...
src/views/card/gic-card/card-form.js
View file @
5ea8bbde
...
...
@@ -862,6 +862,8 @@ export default {
this
.
$store
.
commit
(
'updateShowCornerCanUseApp'
,
true
);
let
callbackId
=
this
.
$route
.
query
.
callbackId
;
if
(
callbackId
)
{
// 有callbackId参数时,认为入口是福利选择器组件
// 操作完成后需要修改localStorage中的welfareCreateCallback,以触发福利选择器内部数据更新
let
obj
=
JSON
.
parse
(
localStorage
.
getItem
(
'welfareCreateCallback'
)
||
'{}'
);
obj
[
callbackId
]
=
true
;
localStorage
.
setItem
(
'welfareCreateCallback'
,
JSON
.
stringify
(
obj
));
...
...
src/views/gift-manage/real-gift-detail.vue
View file @
5ea8bbde
...
...
@@ -1402,18 +1402,16 @@ export default {
}).
finally
(()
=>
this
.
$emit
(
'updateLoading'
,
false
));
}
else
{
giftSave
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
'0000'
)
{
this
.
$store
.
commit
(
'updateShowCornerCanUseApp'
,
true
);
this
.
$router
.
push
({
path
:
'/gift-manage/real-gift'
});
}
else
{
this
.
$message
.
error
(
res
.
message
);
}
let
callbackId
=
this
.
$route
.
query
.
callbackId
;
if
(
callbackId
)
{
// 有callbackId参数时,认为入口是福利选择器组件
// 操作完成后需要修改localStorage中的welfareCreateCallback,以触发福利选择器内部数据更新
let
obj
=
JSON
.
parse
(
localStorage
.
getItem
(
'welfareCreateCallback'
)
||
'{}'
);
obj
[
callbackId
]
=
true
;
localStorage
.
setItem
(
'welfareCreateCallback'
,
JSON
.
stringify
(
obj
));
}
this
.
$store
.
commit
(
'updateShowCornerCanUseApp'
,
true
);
this
.
$router
.
push
({
path
:
'/gift-manage/real-gift'
});
}).
finally
(()
=>
this
.
$emit
(
'updateLoading'
,
false
));
}
}).
catch
(
err
=>
{
...
...
src/views/gift-manage/virtual-gift-detail.vue
View file @
5ea8bbde
...
...
@@ -556,7 +556,6 @@ export default {
},
// 保存
submitForm
(
goodsForm
)
{
console
.
log
(
goodsForm
);
if
(
this
.
btnLoading
)
return
;
if
(
this
.
image
.
length
===
0
)
{
this
.
$message
.
error
(
'请上传主图'
);
...
...
@@ -572,7 +571,6 @@ export default {
PublicMethods
.
jumpToFormError
();
// eslint-disable-line
return
;
}
else
{
// this.btnLoading = true;
this
.
$emit
(
'updateLoading'
);
let
params
=
{
giftId
:
this
.
giftId
,
...
...
@@ -601,37 +599,31 @@ export default {
template
:
this
.
goodsForm
.
template
,
// template: this.template,
};
this
.
btnLoading
=
true
;
this
.
$refs
.
accg
.
save
().
then
(
res
=>
{
this
.
btnLoading
=
true
;
if
(
this
.
isEdit
)
{
// params.giftId = this.giftId;
giftUpdate
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
'0000'
)
{
this
.
$router
.
push
({
path
:
'/gift-manage/virtual-gift'
});
this
.
btnLoading
=
false
;
}
else
{
this
.
btnLoading
=
false
;
this
.
$message
.
error
(
res
.
message
);
}
}).
finally
(()
=>
this
.
$emit
(
'updateLoading'
));
this
.
$router
.
push
({
path
:
'/gift-manage/virtual-gift'
});
}).
finally
(()
=>
{
this
.
btnLoading
=
false
;
this
.
$emit
(
'updateLoading'
);
});
}
else
{
// params.giftId = '';
giftSave
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
'0000'
)
{
this
.
$store
.
commit
(
'updateShowCornerCanUseApp'
,
true
);
this
.
$router
.
push
({
path
:
'/gift-manage/virtual-gift'
});
this
.
btnLoading
=
false
;
}
else
{
this
.
btnLoading
=
false
;
this
.
$message
.
error
(
res
.
message
);
let
callbackId
=
this
.
$route
.
query
.
callbackId
;
if
(
callbackId
)
{
let
obj
=
JSON
.
parse
(
localStorage
.
getItem
(
'welfareCreateCallback'
)
||
'{}'
);
obj
[
callbackId
]
=
true
;
localStorage
.
setItem
(
'welfareCreateCallback'
,
JSON
.
stringify
(
obj
));
}
let
callbackId
=
this
.
$route
.
query
.
callbackId
;
if
(
callbackId
)
{
// 有callbackId参数时,认为入口是福利选择器组件
// 操作完成后需要修改localStorage中的welfareCreateCallback,以触发福利选择器内部数据更新
let
obj
=
JSON
.
parse
(
localStorage
.
getItem
(
'welfareCreateCallback'
)
||
'{}'
);
obj
[
callbackId
]
=
true
;
localStorage
.
setItem
(
'welfareCreateCallback'
,
JSON
.
stringify
(
obj
));
}
}).
finally
(()
=>
this
.
$emit
(
'updateLoading'
));
this
.
$store
.
commit
(
'updateShowCornerCanUseApp'
,
true
);
this
.
$router
.
push
({
path
:
'/gift-manage/virtual-gift'
});
}).
finally
(()
=>
{
this
.
$emit
(
'updateLoading'
);
this
.
btnLoading
=
false
;
});
}
}).
catch
(
err
=>
{
this
.
$message
.
error
(
err
.
message
);
...
...
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