Commit 4e25bb05 authored by wangqinghua's avatar wangqinghua

抢购

parent c4f491bf
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":40500},"path":"app-debug.apk","properties":{"packageId":"io.ionic.smart19.starter","split":"","minSdkVersion":"16"}}]
\ No newline at end of file
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":40500},"path":"app-debug.apk","properties":{"packageId":"io.ionic.smart19.starter.test","split":"","minSdkVersion":"16"}}]
\ No newline at end of file
......@@ -42,7 +42,7 @@ INJECTED from /Users/ben/gitLab-project/party-build-cloud/platforms/android/app/
INJECTED from /Users/ben/gitLab-project/party-build-cloud/platforms/android/app/src/main/AndroidManifest.xml:2:1-30:12
INJECTED from /Users/ben/gitLab-project/party-build-cloud/platforms/android/app/src/main/AndroidManifest.xml:2:1-30:12
package
ADDED from /Users/ben/gitLab-project/party-build-cloud/platforms/android/app/src/main/AndroidManifest.xml:2:102-136
ADDED from /Users/ben/gitLab-project/party-build-cloud/platforms/android/app/src/main/AndroidManifest.xml:2:102-141
INJECTED from /Users/ben/gitLab-project/party-build-cloud/platforms/android/app/src/main/AndroidManifest.xml
INJECTED from /Users/ben/gitLab-project/party-build-cloud/platforms/android/app/src/main/AndroidManifest.xml
android:versionName
......@@ -52,7 +52,7 @@ INJECTED from /Users/ben/gitLab-project/party-build-cloud/platforms/android/app/
android:hardwareAccelerated
ADDED from /Users/ben/gitLab-project/party-build-cloud/platforms/android/app/src/main/AndroidManifest.xml:2:11-45
xmlns:android
ADDED from /Users/ben/gitLab-project/party-build-cloud/platforms/android/app/src/main/AndroidManifest.xml:2:137-195
ADDED from /Users/ben/gitLab-project/party-build-cloud/platforms/android/app/src/main/AndroidManifest.xml:2:142-200
android:versionCode
ADDED from /Users/ben/gitLab-project/party-build-cloud/platforms/android/app/src/main/AndroidManifest.xml:2:46-73
INJECTED from /Users/ben/gitLab-project/party-build-cloud/platforms/android/app/src/main/AndroidManifest.xml
......@@ -81,7 +81,7 @@ ADDED from /Users/ben/gitLab-project/party-build-cloud/platforms/android/app/src
ADDED from /Users/ben/gitLab-project/party-build-cloud/platforms/android/app/src/main/AndroidManifest.xml:4:18-52
android:icon
ADDED from /Users/ben/gitLab-project/party-build-cloud/platforms/android/app/src/main/AndroidManifest.xml:4:53-80
activity#io.ionic.smart19.starter.MainActivity
activity#io.ionic.smart19.starter.test.MainActivity
ADDED from /Users/ben/gitLab-project/party-build-cloud/platforms/android/app/src/main/AndroidManifest.xml:5:9-10:20
android:label
ADDED from /Users/ben/gitLab-project/party-build-cloud/platforms/android/app/src/main/AndroidManifest.xml:5:97-134
......
......@@ -2,7 +2,7 @@
<ion-navbar>
<ion-title>订餐预定</ion-title>
<ion-buttons end>
<ion-buttons *ngIf="role.includes(1) || role.includes(11)" end>
<button ion-button (click)="goApply()">
<ion-icon style="font-size: 2rem" class="top-right-icon icon-fabu iconfont"></ion-icon>
</button>
......@@ -45,9 +45,11 @@
<div class="morning">
<div class="morning-room">
<ng-container *ngFor="let item1 of room?.checkedList">
<span *ngIf="role.includes(11) || (role.includes(1) && mineInfo.orgName == item1.orgName)" (click)="goApplyEdit(item1)" >
<span *ngIf="role.includes(11) || (role.includes(1) && mineInfo.orgName == item1.orgName)"
(click)="goApplyEdit(item1)">
<span *ngIf="item1?.type == 1">午餐</span>&nbsp;&nbsp;
<span *ngIf="item1?.type == 2">晚餐</span> {{item1.orgName}}等{{item1.peopleCount}}人,标准:{{item1.total}}元
<span *ngIf="item1?.type == 2">晚餐</span> {{item1.orgName}}等{{item1.peopleCount}}
人,标准:{{item1.total}}元
</span>
</ng-container>
</div>
......@@ -58,9 +60,11 @@
<div class="morning">
<div class="morning-room">
<ng-container *ngFor="let item3 of room?.uncheckList">
<span (click)="goApplyEdit(item3)" *ngIf=" role.includes(11) || (role.includes(1) && mineInfo.orgName == item3.orgName)" >
<span (click)="goApplyEdit(item3)"
*ngIf=" role.includes(11) || (role.includes(1) && mineInfo.orgName == item3.orgName)">
<span *ngIf="item3?.type == 1">午餐</span>&nbsp;&nbsp;
<span *ngIf="item3?.type == 2">晚餐</span> {{item3.orgName}}等{{item3.peopleCount}}人,标准:{{item3.total}}元
<span *ngIf="item3?.type == 2">晚餐</span> {{item3.orgName}}等{{item3.peopleCount}}
人,标准:{{item3.total}}元
</span>
</ng-container>
</div>
......@@ -140,9 +144,19 @@
loadingSpinner="bubbles"
loadingText="加载中"></ion-infinite-scroll-content>
</ion-infinite-scroll>
<ion-fab right bottom>
<ion-fab *ngIf="canShop" right bottom>
<button ion-fab color="light" (click)="buy()">
<span class="issue">抢购</span>
<div class="loader">
<div class="rotation">
<span class="text">抢购</span>
<svg width="60" height="60">
<line class="top" x1="-60" y1="0" x2="120" y2="0"/>
<line class="left" x1="0" y1="0" x2="0" y2="-120"/>
<line class="bottom" x1="-60" y1="60" x2="0" y2="60"/>
<line class="right" x1="60" y1="60" x2="60" y2="120"/>
</svg>
</div>
</div>
</button>
</ion-fab>
</ion-content>
......
......@@ -223,4 +223,169 @@ page-food {
font-size: 1rem;
border-radius: 4px;
}
.fab-ios-light{
background-color: #e42417;
color: #ffffff;
}
.loader {
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
-moz-transform: translate(-50%, -50%);
-mos-transform: translate(-50%, -50%);
-o-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
text-align: center;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
cursor: default
}
.loader .text {
position: absolute;
transform: rotate(-45deg);
top: .1em;
left: 1em;
z-index: 5;
font-size: 1em;
font-weight: 900;
text-transform: uppercase;
white-space: nowrap;
color: #333333;
}
.rotation {
width:60px;
height: 60px;
position: relative;
overflow: hidden;
background: #b9cbda;
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
-mos-transform: rotate(45deg);
-o-transform: rotate(45deg);
transform: rotate(45deg)
}
svg {
position: absolute;
top: 0;
left: 0
}
svg line {
stroke-width: 10px;
fill: none;
stroke-dasharray: 200px
}
.rotation svg line.top {
stroke: #db2f00;
-webkit-animation: topline cubic-bezier(.75, 0, .5, 1) 1.5s infinite;
-moz-animation: topline cubic-bezier(.75, 0, .5, 1) 1.5s infinite;
-moz-animation: topline cubic-bezier(.75, 0, .5, 1) 1.5s infinite;
-ms-animation: topline cubic-bezier(.75, 0, .5, 1) 1.5s infinite;
-o-animation: topline cubic-bezier(.75, 0, .5, 1) 1.5s infinite;
animation: topline cubic-bezier(.75, 0, .5, 1) 1.5s infinite
}
.rotation svg line.bottom {
stroke: #db2f00;
-webkit-animation: bottomline cubic-bezier(.75, 0, .5, 1) 1.5s infinite;
-moz-animation: bottomline cubic-bezier(.75, 0, .5, 1) 1.5s infinite;
-moz-animation: bottomline cubic-bezier(.75, 0, .5, 1) 1.5s infinite;
-ms-animation: bottomline cubic-bezier(.75, 0, .5, 1) 1.5s infinite;
-o-animation: bottomline cubic-bezier(.75, 0, .5, 1) 1.5s infinite;
animation: bottomline cubic-bezier(.75, 0, .5, 1) 1.5s infinite
}
.rotation svg line.left {
stroke: #13a3a5;
-webkit-animation: leftline cubic-bezier(.75, 0, .5, 1) 1.5s infinite;
-moz-animation: leftline cubic-bezier(.75, 0, .5, 1) 1.5s infinite;
-moz-animation: leftline cubic-bezier(.75, 0, .5, 1) 1.5s infinite;
-ms-animation: leftline cubic-bezier(.75, 0, .5, 1) 1.5s infinite;
-o-animation: leftline cubic-bezier(.75, 0, .5, 1) 1.5s infinite;
animation: leftline cubic-bezier(.75, 0, .5, 1) 1.5s infinite
}
.rotation svg line.right {
stroke: #13a3a5;
-webkit-animation: rightline cubic-bezier(.75, 0, .5, 1) 1.5s infinite;
-moz-animation: rightline cubic-bezier(.75, 0, .5, 1) 1.5s infinite;
-moz-animation: rightline cubic-bezier(.75, 0, .5, 1) 1.5s infinite;
-ms-animation: rightline cubic-bezier(.75, 0, .5, 1) 1.5s infinite;
-o-animation: rightline cubic-bezier(.75, 0, .5, 1) 1.5s infinite;
animation: rightline cubic-bezier(.75, 0, .5, 1) 1.5s infinite
}
@keyframes topline {
0% {
transform: translateX(0px)
}
50% {
transform: translateX(-200px)
}
100% {
transform: translateX(-400px)
}
}
@keyframes bottomline {
0% {
transform: translateX(0px)
}
50% {
transform: translateX(200px)
}
100% {
transform: translateX(400px)
}
}
@keyframes leftline {
0% {
transform: translateY(0px)
}
50% {
transform: translateY(200px)
}
100% {
transform: translateY(400px)
}
}
@keyframes rightline {
0% {
transform: translateY(0px)
}
50% {
transform: translateY(-200px)
}
100% {
transform: translateY(-400px)
}
}
@keyframes text {
0% {
transform: scale(1, 1)
}
40% {
transform: scale(1.4, 1.4)
}
70%, 100% {
transform: scale(1, 1)
}
}
}
......@@ -44,16 +44,17 @@ export class FoodPage {
isLoad: true
};
canShop = false;
constructor(public navCtrl: NavController, public navParams: NavParams,
private serveSer: ServeService, public datePipe: DatePipe,
private commonSer: CommonService, private appMainSer: AppMainService) {
console.log(this.calendar);
this.getGoodsInfo();
}
ionViewDidEnter() {
this.myApply();
this.getApply();
this.getGoodsInfo();
}
ionViewDidLoad() {
......@@ -120,10 +121,12 @@ export class FoodPage {
)
}
getGoodsInfo(){
getGoodsInfo() {
this.serveSer.getGoodsInfo().subscribe(
(res)=>{
(res) => {
if (res.data.length > 0) {
this.canShop = true;
}
}
)
}
......@@ -191,12 +194,11 @@ export class FoodPage {
//抢购 每天的14:00-17:00
buy() {
const nowDate = new Date().getTime();
const startTime = new Date(this.datePipe.transform(new Date(), 'yyyy-MM-dd') + ' 10:00:00').getTime();
const startTime = new Date(this.datePipe.transform(new Date(), 'yyyy-MM-dd') + ' 14:00:00').getTime();
const endTime = new Date(this.datePipe.transform(new Date(), 'yyyy-MM-dd') + ' 17:00:00').getTime();
if(startTime < nowDate && nowDate < endTime){
this.commonSer.toast('开始抢购');
if (startTime < nowDate && nowDate < endTime) {
this.navCtrl.push(RushBuyPage);
}else{
} else {
this.commonSer.toast("抢购时间为每天的14:00~17:00");
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment