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
46613ff7
Commit
46613ff7
authored
Aug 18, 2019
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
抢购
parent
3b95fc1c
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
46 additions
and
28 deletions
+46
-28
fileHashes.bin
platforms/android/.gradle/4.1/fileHashes/fileHashes.bin
+0
-0
fileHashes.lock
platforms/android/.gradle/4.1/fileHashes/fileHashes.lock
+0
-0
fileSnapshots.bin
platforms/android/.gradle/4.1/taskHistory/fileSnapshots.bin
+0
-0
taskHistory.bin
platforms/android/.gradle/4.1/taskHistory/taskHistory.bin
+0
-0
taskHistory.lock
platforms/android/.gradle/4.1/taskHistory/taskHistory.lock
+0
-0
dex-renamer-state.txt
...ates/incremental/packageDebug/debug/dex-renamer-state.txt
+1
-1
food.html
src/pages/serve-pages/food/food.html
+1
-1
food.ts
src/pages/serve-pages/food/food.ts
+16
-19
rush-buy.html
src/pages/serve-pages/food/rush-buy/rush-buy.html
+1
-1
rush-buy.scss
src/pages/serve-pages/food/rush-buy/rush-buy.scss
+11
-2
rush-buy.ts
src/pages/serve-pages/food/rush-buy/rush-buy.ts
+16
-4
No files found.
platforms/android/.gradle/4.1/fileHashes/fileHashes.bin
View file @
46613ff7
No preview for this file type
platforms/android/.gradle/4.1/fileHashes/fileHashes.lock
View file @
46613ff7
No preview for this file type
platforms/android/.gradle/4.1/taskHistory/fileSnapshots.bin
View file @
46613ff7
No preview for this file type
platforms/android/.gradle/4.1/taskHistory/taskHistory.bin
View file @
46613ff7
No preview for this file type
platforms/android/.gradle/4.1/taskHistory/taskHistory.lock
View file @
46613ff7
No preview for this file type
platforms/android/app/build/intermediates/incremental/packageDebug/debug/dex-renamer-state.txt
View file @
46613ff7
#Sun Aug 18 1
5:09:5
3 CST 2019
#Sun Aug 18 1
7:34:0
3 CST 2019
base.0=/Users/ben/gitLab-project/party-build-cloud/platforms/android/app/build/intermediates/transforms/dexMerger/debug/0
base.0=/Users/ben/gitLab-project/party-build-cloud/platforms/android/app/build/intermediates/transforms/dexMerger/debug/0
renamed.0=classes.dex
renamed.0=classes.dex
file.0=/Users/ben/gitLab-project/party-build-cloud/platforms/android/app/build/intermediates/transforms/dexMerger/debug/0/classes.dex
file.0=/Users/ben/gitLab-project/party-build-cloud/platforms/android/app/build/intermediates/transforms/dexMerger/debug/0/classes.dex
src/pages/serve-pages/food/food.html
View file @
46613ff7
...
@@ -144,7 +144,7 @@
...
@@ -144,7 +144,7 @@
loadingSpinner=
"bubbles"
loadingSpinner=
"bubbles"
loadingText=
"加载中"
></ion-infinite-scroll-content>
loadingText=
"加载中"
></ion-infinite-scroll-content>
</ion-infinite-scroll>
</ion-infinite-scroll>
<ion-fab
*
ngIf=
"canShop"
right
bottom
>
<ion-fab
right
bottom
>
<button
ion-fab
color=
"light"
(
click
)="
buy
()"
>
<button
ion-fab
color=
"light"
(
click
)="
buy
()"
>
<div
class=
"loader"
>
<div
class=
"loader"
>
<div
class=
"rotation"
>
<div
class=
"rotation"
>
...
...
src/pages/serve-pages/food/food.ts
View file @
46613ff7
...
@@ -44,12 +44,10 @@ export class FoodPage {
...
@@ -44,12 +44,10 @@ export class FoodPage {
isLoad
:
true
isLoad
:
true
};
};
canShop
=
false
;
constructor
(
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
,
constructor
(
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
,
private
serveSer
:
ServeService
,
public
datePipe
:
DatePipe
,
private
serveSer
:
ServeService
,
public
datePipe
:
DatePipe
,
private
commonSer
:
CommonService
,
private
appMainSer
:
AppMainService
)
{
private
commonSer
:
CommonService
,
private
appMainSer
:
AppMainService
)
{
this
.
getGoodsInfo
();
}
}
ionViewDidEnter
()
{
ionViewDidEnter
()
{
...
@@ -121,18 +119,6 @@ export class FoodPage {
...
@@ -121,18 +119,6 @@ export class FoodPage {
)
)
}
}
//isPurchasing 0不再时间段 1可以抢购 2已抢完
getGoodsInfo
()
{
this
.
serveSer
.
getGoodsInfo
().
subscribe
(
(
res
)
=>
{
if
(
res
.
data
.
length
>
0
)
{
const
arr
=
res
.
data
.
filter
(
e
=>
e
.
isPurchasing
=
1
);
if
(
arr
.
length
>
0
)
this
.
canShop
=
true
;
}
}
)
}
getDate
(
e
)
{
getDate
(
e
)
{
this
.
date
=
e
;
this
.
date
=
e
;
this
.
getApply
();
this
.
getApply
();
...
@@ -195,13 +181,24 @@ export class FoodPage {
...
@@ -195,13 +181,24 @@ export class FoodPage {
//抢购 每天的14:00-17:00
//抢购 每天的14:00-17:00
buy
()
{
buy
()
{
const
nowDate
=
new
Date
().
getTime
();
this
.
serveSer
.
getGoodsInfo
().
subscribe
(
const
startTime
=
new
Date
(
this
.
datePipe
.
transform
(
new
Date
(),
'yyyy-MM-dd'
)
+
' 14:00:00'
).
getTime
();
(
res
)
=>
{
const
endTime
=
new
Date
(
this
.
datePipe
.
transform
(
new
Date
(),
'yyyy-MM-dd'
)
+
' 17:00:00'
).
getTime
();
if
(
res
.
data
&&
res
.
data
.
length
>
0
)
{
if
(
startTime
<
nowDate
&&
nowDate
<
endTime
)
{
const
arr
=
res
.
data
.
filter
(
e
=>
e
.
isPurchasing
==
0
);
if
(
arr
.
length
>
0
)
{
this
.
navCtrl
.
push
(
RushBuyPage
);
this
.
navCtrl
.
push
(
RushBuyPage
);
}
else
{
this
.
commonSer
.
toast
(
'未到抢购时间'
)
}
}
else
{
}
else
{
this
.
commonSer
.
toast
(
"抢购时间为每天的14:00~17:00"
);
this
.
commonSer
.
toast
(
'未到抢购时间'
)
}
}
)
}
}
//isPurchasing 0不再时间段 1可以抢购 2已抢完
getGoodsInfo
()
{
}
}
}
}
src/pages/serve-pages/food/rush-buy/rush-buy.html
View file @
46613ff7
<ion-header>
<ion-header>
<ion-navbar>
<ion-navbar>
...
@@ -25,5 +24,6 @@
...
@@ -25,5 +24,6 @@
<span
class=
"add"
(
click
)="
add
()"
>
+
</span>
<span
class=
"add"
(
click
)="
add
()"
>
+
</span>
</div>
</div>
</div>
</div>
<p
class=
"buy-remark"
>
{{obj.remark}}
</p>
<button
class=
"submit-btn submit"
(
click
)="
save
()"
>
提交
</button>
<button
class=
"submit-btn submit"
(
click
)="
save
()"
>
提交
</button>
</ion-content>
</ion-content>
src/pages/serve-pages/food/rush-buy/rush-buy.scss
View file @
46613ff7
page-rush-buy
{
page-rush-buy
{
.num
{
.num
{
text-align
:
right
;
text-align
:
right
;
input
{
input
{
width
:
40px
;
width
:
40px
;
height
:
24px
;
height
:
24px
;
...
@@ -11,7 +12,8 @@ page-rush-buy {
...
@@ -11,7 +12,8 @@ page-rush-buy {
border
:
1px
solid
#f2f2f2
;
border
:
1px
solid
#f2f2f2
;
margin
:
0
8px
;
margin
:
0
8px
;
}
}
span
{
span
{
font-size
:
2
.5rem
;
font-size
:
2
.5rem
;
font-weight
:
bold
;
font-weight
:
bold
;
vertical-align
:
initial
;
vertical-align
:
initial
;
...
@@ -40,7 +42,8 @@ page-rush-buy {
...
@@ -40,7 +42,8 @@ page-rush-buy {
text-align
:
right
;
text-align
:
right
;
font-size
:
1
.4rem
;
font-size
:
1
.4rem
;
}
}
ion-datetime
{
ion-datetime
{
padding-right
:
18px
!
important
;
padding-right
:
18px
!
important
;
}
}
...
@@ -130,4 +133,10 @@ page-rush-buy {
...
@@ -130,4 +133,10 @@ page-rush-buy {
}
}
}
}
.buy-remark
{
padding
:
20px
;
color
:
#666
;
letter-spacing
:
1px
;
}
}
}
src/pages/serve-pages/food/rush-buy/rush-buy.ts
View file @
46613ff7
import
{
Component
}
from
'@angular/core'
;
import
{
Component
}
from
'@angular/core'
;
import
{
ActionSheetController
,
IonicPage
,
NavController
,
NavParams
}
from
'ionic-angular'
;
import
{
ActionSheetController
,
IonicPage
,
LoadingController
,
NavController
,
NavParams
}
from
'ionic-angular'
;
import
{
ServeService
}
from
"../../serve.service"
;
import
{
ServeService
}
from
"../../serve.service"
;
import
{
CommonService
}
from
"../../../../provide/common.service"
;
import
{
CommonService
}
from
"../../../../provide/common.service"
;
...
@@ -15,12 +15,14 @@ export class RushBuyPage {
...
@@ -15,12 +15,14 @@ export class RushBuyPage {
foodText
:
'请选择'
,
foodText
:
'请选择'
,
type
:
null
,
type
:
null
,
unitPrice
:
null
,
unitPrice
:
null
,
version
:
null
version
:
null
,
remark
:
null
};
};
foodList
;
foodList
;
constructor
(
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
,
private
commonSer
:
CommonService
,
constructor
(
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
,
private
commonSer
:
CommonService
,
private
actionSheetCtrl
:
ActionSheetController
,
private
serveSer
:
ServeService
)
{
private
actionSheetCtrl
:
ActionSheetController
,
private
serveSer
:
ServeService
,
private
loadCtrl
:
LoadingController
)
{
}
}
ionViewDidLoad
()
{
ionViewDidLoad
()
{
...
@@ -32,6 +34,11 @@ export class RushBuyPage {
...
@@ -32,6 +34,11 @@ export class RushBuyPage {
this
.
serveSer
.
getGoodsInfo
().
subscribe
(
this
.
serveSer
.
getGoodsInfo
().
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
this
.
foodList
=
res
.
data
;
this
.
foodList
=
res
.
data
;
this
.
obj
.
foodText
=
this
.
foodList
[
0
].
goodsName
;
this
.
obj
.
version
=
this
.
foodList
[
0
].
version
;
this
.
obj
.
unitPrice
=
this
.
foodList
[
0
].
unitPrice
;
this
.
obj
.
type
=
this
.
foodList
[
0
].
id
this
.
obj
.
remark
=
this
.
foodList
[
0
].
remark
}
}
)
)
}
}
...
@@ -79,15 +86,20 @@ export class RushBuyPage {
...
@@ -79,15 +86,20 @@ export class RushBuyPage {
this
.
commonSer
.
toast
(
'请选择物品'
);
this
.
commonSer
.
toast
(
'请选择物品'
);
return
false
;
return
false
;
}
}
const
loading
=
this
.
loadCtrl
.
create
({
content
:
'抢购中...'
,
});
loading
.
present
();
const
data
=
{
const
data
=
{
diffFlag
:
'2'
,
diffFlag
:
'2'
,
type
:
this
.
obj
.
type
,
type
:
this
.
obj
.
type
,
peopleCount
:
this
.
obj
.
peopleCount
,
peopleCount
:
this
.
obj
.
peopleCount
,
unitPrice
:
this
.
obj
.
unitPrice
,
unitPrice
:
this
.
obj
.
unitPrice
,
version
:
this
.
obj
.
version
version
:
this
.
obj
.
version
}
}
;
this
.
serveSer
.
saveMeals
(
data
).
subscribe
(
this
.
serveSer
.
saveMeals
(
data
).
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
loading
.
dismiss
();
if
(
res
.
errcode
==
"1000"
)
{
if
(
res
.
errcode
==
"1000"
)
{
this
.
commonSer
.
toast
(
'抢购成功'
);
this
.
commonSer
.
toast
(
'抢购成功'
);
this
.
navCtrl
.
pop
();
this
.
navCtrl
.
pop
();
...
...
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