Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
apaas-ui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gzga-jzapi
apaas-ui
Commits
8f1d8994
Commit
8f1d8994
authored
May 10, 2022
by
张俊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
立即申请跳转登录
parent
bb096006
Pipeline
#75985
passed with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
35 deletions
+43
-35
src/components/service-info/service-info.vue
src/components/service-info/service-info.vue
+43
-35
No files found.
src/components/service-info/service-info.vue
View file @
8f1d8994
...
@@ -254,47 +254,55 @@ export default {
...
@@ -254,47 +254,55 @@ export default {
},
},
addToCart
()
{
addToCart
()
{
// console.log("addToCart");
// console.log("addToCart");
this
.
$http
if
(
this
.
$store
.
state
.
userInfo
){
.
post
(
"
/apaas/serviceapp/v3/shopcart/add
"
,
{
this
.
$http
service_id
:
parseFloat
(
this
.
data
.
service_id
),
.
post
(
"
/apaas/serviceapp/v3/shopcart/add
"
,
{
app_id
:
0
,
// 0表示不是应用
service_id
:
parseFloat
(
this
.
data
.
service_id
),
spec_id
:
this
.
specification
.
id
,
// 规格id
app_id
:
0
,
// 0表示不是应用
duration
:
this
.
duration
,
// 申请时长
spec_id
:
this
.
specification
.
id
,
// 规格id
duration_method
:
this
.
type
,
// 计时方式 按年 按月
duration
:
this
.
duration
,
// 申请时长
is_subscribe
:
0
,
// 是否订阅
duration_method
:
this
.
type
,
// 计时方式 按年 按月
})
is_subscribe
:
0
,
// 是否订阅
.
then
(({
data
})
=>
{
})
if
(
data
.
success
==
1
)
{
.
then
(({
data
})
=>
{
if
(
data
.
success
==
1
)
{
this
.
$message
({
message
:
data
.
errMsg
,
type
:
"
success
"
,
});
this
.
$store
.
commit
(
"
setMenuCartState
"
);
}
else
{
this
.
$message
({
message
:
data
.
errMsg
,
type
:
"
warning
"
,
});
}
})
.
catch
((
error
)
=>
{
this
.
$message
({
this
.
$message
({
message
:
data
.
errMsg
,
message
:
`添加申请单失败`
,
type
:
"
success
"
,
});
this
.
$store
.
commit
(
"
setMenuCartState
"
);
}
else
{
this
.
$message
({
message
:
data
.
errMsg
,
type
:
"
warning
"
,
type
:
"
warning
"
,
});
});
}
})
.
catch
((
error
)
=>
{
this
.
$message
({
message
:
`添加申请单失败`
,
type
:
"
warning
"
,
});
});
});
}
else
{
window
.
location
.
href
=
"
/iam/login/#/login?ReturnUrl=
"
+
encodeURIComponent
(
window
.
location
.
href
);
}
},
},
applyImmediately
()
{
applyImmediately
()
{
this
.
$router
.
push
({
if
(
this
.
$store
.
state
.
userInfo
){
path
:
"
/shop/shop_car_apply
"
,
this
.
$router
.
push
({
query
:
{
path
:
"
/shop/shop_car_apply
"
,
service_id
:
parseFloat
(
this
.
data
.
service_id
),
query
:
{
spec_id
:
this
.
specification
.
id
,
service_id
:
parseFloat
(
this
.
data
.
service_id
),
spcs_type
:
this
.
specification
.
spcs_type
,
spec_id
:
this
.
specification
.
id
,
duration
:
this
.
duration
,
spcs_type
:
this
.
specification
.
spcs_type
,
duration_unit
:
this
.
type
,
duration
:
this
.
duration
,
},
duration_unit
:
this
.
type
,
});
},
});
}
else
{
window
.
location
.
href
=
"
/iam/login/#/login?ReturnUrl=
"
+
encodeURIComponent
(
window
.
location
.
href
);
}
},
},
},
},
created
()
{
created
()
{
...
...
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