From 6bd51f690579a1f3e40bdf5c0a905bb5c8e99014 Mon Sep 17 00:00:00 2001 From: chenjingyu Date: Wed, 7 Oct 2020 17:28:07 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=8A=BD=E7=AD=BE]=E5=A2=9E=E5=8A=A0=E8=B7=AF?= =?UTF-8?q?=E7=94=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/ui/reset/reset.component.html | 55 +++++++++++++++ src/app/ui/reset/reset.component.scss | 88 ++++++++++++++++++++++++ src/app/ui/reset/reset.component.spec.ts | 25 +++++++ src/app/ui/reset/reset.component.ts | 46 +++++++++++++ src/app/ui/ui-routing.module.ts | 7 +- src/app/ui/ui.module.ts | 3 +- src/assets/js/zhuanpan.js | 4 +- 7 files changed, 223 insertions(+), 5 deletions(-) create mode 100644 src/app/ui/reset/reset.component.html create mode 100644 src/app/ui/reset/reset.component.scss create mode 100644 src/app/ui/reset/reset.component.spec.ts create mode 100644 src/app/ui/reset/reset.component.ts diff --git a/src/app/ui/reset/reset.component.html b/src/app/ui/reset/reset.component.html new file mode 100644 index 0000000..1a35cf4 --- /dev/null +++ b/src/app/ui/reset/reset.component.html @@ -0,0 +1,55 @@ + + + + +
+
+
+
+ 请选择支队 + {{item.name}}done +
+
+
+
+
+
+ 抽签结果: + +
+
+
+ +
+ +
+
+ + + + +
+ + + + + + + + + + diff --git a/src/app/ui/reset/reset.component.scss b/src/app/ui/reset/reset.component.scss new file mode 100644 index 0000000..e680017 --- /dev/null +++ b/src/app/ui/reset/reset.component.scss @@ -0,0 +1,88 @@ + + html, body { + height: 100%; + } + + .mainbox { + width: 95%; + height: 95%; + padding: 0.125rem 0.125rem 0; + display: flex; + + } + + .centerLeft{ + float: left; + height: 100%; + width: 100%; + position: relative; + flex-direction: column; + flex: 2%; + display: flex; + align-items:center; + box-sizing: border-box; + margin: 0 0; +.tanCenterbtn{ + width: 100%; + height: 100%; +border: 1px solid #30bbec; +display: flex; +flex-direction: column; +user-select: none; +background-size:100% 100%; +span{ + z-index:99; + width: 350px; + height: 50px; + cursor:pointer; + border-bottom:1px solid #30bbec; + padding: 8px ; + text-align: center; + font-size: 24px; +} +} +} +.colum{ + height: 85%; + //width: 100%; + display:table-cell; + vertical-align:middle; + text-align: center; + span{ + font-size: 24px; + + //padding-top: 50%; + } +} +.stop{ + pointer-events: none; +} + + +//选择后加背景色 +.beijicolor{ + background-color: #F7BA2A ; +} + body,ul,ol,li,p,h1,h2,h3,h4,h5,h6,form,fieldset,table,td,img,div{margin:0;padding:0;border:0;} + body{color:#333; font-size:12px;font-family:"Microsoft YaHei"} + ul,ol{list-style-type:none;} + select,input,img,select{vertical-align:middle;} + input{ font-size:12px;} + a{ text-decoration:none; color:#000;} + a:hover{color:#c00; text-decoration:none;} + .clear{clear:both;} + + /* 大转盘样式 */ + .banner{max-height: 650px; + display: block; + width: 95%; + max-width: 650px; + margin-left: auto; + margin-right: auto; + margin-bottom: 20px; + } + .banner .turnplate{display:block;width:100%;position:relative;} + .banner .turnplate canvas.item{width:100%;} + .banner .turnplate img.pointer{position:absolute;width:31.5%;height:42.5%;left:34.6%;top:23%;} + + \ No newline at end of file diff --git a/src/app/ui/reset/reset.component.spec.ts b/src/app/ui/reset/reset.component.spec.ts new file mode 100644 index 0000000..15ce951 --- /dev/null +++ b/src/app/ui/reset/reset.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ResetComponent } from './reset.component'; + +describe('ResetComponent', () => { + let component: ResetComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ ResetComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ResetComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/ui/reset/reset.component.ts b/src/app/ui/reset/reset.component.ts new file mode 100644 index 0000000..b6013fb --- /dev/null +++ b/src/app/ui/reset/reset.component.ts @@ -0,0 +1,46 @@ +/* + * @Descripttion: + * @version: + * @Author: sueRimn + * @Date: 2020-10-07 15:38:37 + * @LastEditors: sueRimn + * @LastEditTime: 2020-10-07 15:39:34 + */ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-reset', + templateUrl: './reset.component.html', + styleUrls: ['./reset.component.scss'] +}) +export class ResetComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + + //支队数据和是否抽奖 + choujiang=[ + {name:"钦州支队",idnum:1}, + {name:"南宁支队",idnum:2}, + {name:"柳州支队",idnum:3}, + {name:"河池支队",idnum:4}, + {name:"来宾支队",idnum:5}, + {name:"贺州支队",idnum:6}, + {name:"防城港支队",idnum:7}, + {name:"崇左支队",idnum:8}, + {name:"贵港支队",idnum:9}, + {name:"梧州支队",idnum:10}, + {name:"百色支队",idnum:11}, + {name:"玉林支队",idnum:12}, + {name:"北海支队",idnum:13}, + {name:"桂林支队",idnum:14} + ] + //选中支队 + chooseid=-1 + chosseZhidui(key){ + this.chooseid=key + } + +} diff --git a/src/app/ui/ui-routing.module.ts b/src/app/ui/ui-routing.module.ts index ed44e1a..f4faa21 100644 --- a/src/app/ui/ui-routing.module.ts +++ b/src/app/ui/ui-routing.module.ts @@ -4,17 +4,18 @@ * @Author: sueRimn * @Date: 2020-09-25 08:48:50 * @LastEditors: sueRimn - * @LastEditTime: 2020-10-06 10:13:25 + * @LastEditTime: 2020-10-07 15:41:56 */ import { Routes, RouterModule } from '@angular/router'; import { NgModule } from '@angular/core'; - +import { ResetComponent} from '../../app/ui/reset/reset.component' + import { from } from 'rxjs'; const routes: Routes = [ - + { path: 'Reset', component:ResetComponent} ] @NgModule({ diff --git a/src/app/ui/ui.module.ts b/src/app/ui/ui.module.ts index a7d9e61..dbacc25 100644 --- a/src/app/ui/ui.module.ts +++ b/src/app/ui/ui.module.ts @@ -60,9 +60,10 @@ import { DisposalNodeComponent } from './disposal-node/disposal-node.component'; import { CountdownModule } from 'ngx-countdown'; import { LuckDrawComponent } from './luck-draw/luck-draw.component'; +import { ResetComponent } from './reset/reset.component'; @NgModule({ - declarations: [SafeHtmlPipe,UiComponent,PersonaldataComponent, ChangepasswordComponent,IsnoPipe,ConfirmpswDirective,TimePipe,WorkingAreaComponent, DisposalNodeComponent, LuckDrawComponent], + declarations: [SafeHtmlPipe,UiComponent,PersonaldataComponent, ChangepasswordComponent,IsnoPipe,ConfirmpswDirective,TimePipe,WorkingAreaComponent, DisposalNodeComponent, LuckDrawComponent, ResetComponent], imports: [ CommonModule, diff --git a/src/assets/js/zhuanpan.js b/src/assets/js/zhuanpan.js index ae0073e..e312475 100644 --- a/src/assets/js/zhuanpan.js +++ b/src/assets/js/zhuanpan.js @@ -14,7 +14,7 @@ var turnplate={ num=-1 $(document).ready(function(){ - //var chooseid = $( "span[name='zhidui']").attr('id'); + for(var i=0;i<14;i++){ if(window.localStorage[i]!=undefined){ $("#endjieguo span").eq(i+1).html(window.localStorage[i]) @@ -26,6 +26,7 @@ $(document).ready(function(){ //console.log($(this).html().substring(0,3)) if($(this).html().substring(0,4)=="钦州支队"){ console.log(turnplate.startAngle) + console.log(window.location.href) turnplate.restaraunts = ["帝王财富中心(模板)", "龙城地下商业街(模板)","广西东油沥青有限公司", "钦州吾悦广场"]; turnplate.colors = ["#FFF4D6", "#FFFFFF", "#FFF4D6", "#FFFFFF"]; num=0 @@ -536,6 +537,7 @@ var rotateFn = function (item, txt){ $("#chooseZhi mat-icon").eq(0).show() $('.pointer').addClass("stop") }else if(num==1){ + console.log(turnplate.startAngle) window.localStorage.setItem( 1, "九洲国际"); $("#endjieguo span").eq(2).html(window.localStorage["1"]) $("#chooseZhi mat-icon").eq(1).show()