Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
party-build-cloud
Project
Project
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
wangqinghua
party-build-cloud
Commits
35dfe8ba
Commit
35dfe8ba
authored
Sep 23, 2019
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
防止订单多次提交
parent
c336b4a8
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
9 deletions
+21
-9
activityApply.html
src/pages/home/activity/activityApply/activityApply.html
+1
-1
activityApply.ts
src/pages/home/activity/activityApply/activityApply.ts
+20
-8
No files found.
src/pages/home/activity/activityApply/activityApply.html
View file @
35dfe8ba
...
@@ -29,5 +29,5 @@
...
@@ -29,5 +29,5 @@
<ion-textarea
[(
ngModel
)]="
order
.
Orderbz
"
></ion-textarea>
<ion-textarea
[(
ngModel
)]="
order
.
Orderbz
"
></ion-textarea>
</ion-item>
</ion-item>
<button
class=
"submit-btn submit"
(
click
)="
condirmAlert
()"
>
提交订单
</button>
<button
[
disabled
]="
submitLoading
"
class=
"submit-btn submit"
(
click
)="
condirmAlert
()"
>
提交订单
</button>
</ion-content>
</ion-content>
src/pages/home/activity/activityApply/activityApply.ts
View file @
35dfe8ba
import
{
Component
}
from
'@angular/core'
;
import
{
Component
}
from
'@angular/core'
;
import
{
IonicPage
,
NavController
,
NavParams
,
AlertController
,
ToastController
,
Events
}
from
'ionic-angular'
;
import
{
IonicPage
,
NavController
,
NavParams
,
AlertController
,
ToastController
,
Events
,
LoadingController
}
from
'ionic-angular'
;
import
{
MyActivityListPage
}
from
"../../../mine/myActivityList/myActivityList"
;
import
{
MyActivityListPage
}
from
"../../../mine/myActivityList/myActivityList"
;
import
{
Http
,
Response
}
from
'@angular/http'
;
import
{
Http
,
Response
}
from
'@angular/http'
;
...
@@ -8,6 +16,7 @@ import {AppService,AppGlobal} from "../../../../service/http.service";
...
@@ -8,6 +16,7 @@ import {AppService,AppGlobal} from "../../../../service/http.service";
import
{
ActivityConfirmPage
}
from
"../activityConfirm/activityConfirm"
;
import
{
ActivityConfirmPage
}
from
"../activityConfirm/activityConfirm"
;
import
{
MinePage
}
from
"../../../tabs/mine/mine"
;
import
{
MinePage
}
from
"../../../tabs/mine/mine"
;
import
{
ActivityDetailPage
}
from
"../activityDetail/activityDetail"
;
import
{
ActivityDetailPage
}
from
"../activityDetail/activityDetail"
;
import
{
CommonService
}
from
"../../../../provide/common.service"
;
@
IonicPage
()
@
IonicPage
()
@
Component
({
@
Component
({
...
@@ -58,18 +67,15 @@ export class ActivityApplyPage {
...
@@ -58,18 +67,15 @@ export class ActivityApplyPage {
//报名成功
//报名成功
isSuccess
:
boolean
=
false
;
isSuccess
:
boolean
=
false
;
//报名失败
//报名失败
isError
:
boolean
=
false
;
submitLoading
=
false
;
activityType
:
Array
<
String
>
=
[
'未知'
,
'体检'
,
'疗休养'
,
'培训'
,
'工会活动'
];
//活动须知
noticeArry
:
object
[];
pageflag
:
boolean
=
false
;
constructor
(
public
navCtrl
:
NavController
,
constructor
(
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
,
public
storage
:
Storage
,
public
navParams
:
NavParams
,
public
storage
:
Storage
,
public
alertCtrl
:
AlertController
,
public
alertCtrl
:
AlertController
,
public
http
:
Http
,
public
http
:
Http
,
private
commonSer
:
CommonService
,
private
loadCtrl
:
LoadingController
,
public
appService
:
AppService
,
public
appService
:
AppService
,
public
toast
:
ToastController
,
public
toast
:
ToastController
,
// public keyboard: Keyboard,
// public keyboard: Keyboard,
...
@@ -127,6 +133,7 @@ export class ActivityApplyPage {
...
@@ -127,6 +133,7 @@ export class ActivityApplyPage {
//报名
//报名
confirmOrder
()
{
confirmOrder
()
{
this
.
submitLoading
=
true
;
//验证信息:
//验证信息:
/**0.对于暂未有批次的。
/**0.对于暂未有批次的。
1.判断携带人数是否超过限额人数。
1.判断携带人数是否超过限额人数。
...
@@ -158,7 +165,6 @@ export class ActivityApplyPage {
...
@@ -158,7 +165,6 @@ export class ActivityApplyPage {
//报名操作
//报名操作
commitSignUpOrder
()
{
commitSignUpOrder
()
{
this
.
appService
.
ObserverHttpPost
(
"/wisdomgroup/modules/order/create"
,
this
.
order
)
this
.
appService
.
ObserverHttpPost
(
"/wisdomgroup/modules/order/create"
,
this
.
order
)
.
subscribe
((
res
:
Response
)
=>
{
.
subscribe
((
res
:
Response
)
=>
{
if
(
true
)
{
if
(
true
)
{
...
@@ -177,6 +183,10 @@ export class ActivityApplyPage {
...
@@ -177,6 +183,10 @@ export class ActivityApplyPage {
submitOrder
()
{
submitOrder
()
{
const
loading
=
this
.
loadCtrl
.
create
({
content
:
'报名中...'
});
loading
.
present
();
this
.
order
.
Batchid
=
this
.
item
.
id
;
this
.
order
.
Batchid
=
this
.
item
.
id
;
this
.
order
.
Activityid
=
this
.
item
.
activityId
;
this
.
order
.
Activityid
=
this
.
item
.
activityId
;
this
.
order
.
batchlist
=
this
.
item
.
id
+
','
;
this
.
order
.
batchlist
=
this
.
item
.
id
+
','
;
...
@@ -184,11 +194,13 @@ export class ActivityApplyPage {
...
@@ -184,11 +194,13 @@ export class ActivityApplyPage {
.
subscribe
((
res
:
Response
)
=>
{
.
subscribe
((
res
:
Response
)
=>
{
if
(
true
)
{
if
(
true
)
{
this
.
isSuccess
=
true
;
this
.
isSuccess
=
true
;
this
.
commonSer
.
toast
(
'报名成功'
);
//清空 插入
//清空 插入
this
.
navCtrl
.
push
(
"ActivityDetailPage"
,
{
id
:
this
.
item
.
activityId
});
this
.
navCtrl
.
push
(
"ActivityDetailPage"
,
{
id
:
this
.
item
.
activityId
});
}
else
{
}
else
{
}
}
loading
.
dismiss
();
},
error
=>
{
},
error
=>
{
}
}
);
);
...
...
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