",components:{App:s.a}})},function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={props:{show:{type:Boolean,default:!1},text:{type:String,default:"数据加载中"}}}},function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=a(34),i=a.n(n),s=a(33),r=a.n(s),o=a(161),c=a.n(o),d=a(159),u=a.n(d),l=a(160),f=a.n(l),p=a(163),v=a.n(p),h=a(164),m=a.n(h),_=a(162),g=a.n(_),y=a(27),w=a.n(y),C=a(10),x=a(79),k={loading:0,index:1,info:2,score:3,upload:4,poster:5};e.default={data:function(){return{page:k.loading,pages:k,data:this.getInitData(),self:!0,list:[]}},components:{Loading:c.a,Index:u.a,Info:f.a,Score:v.a,Upload:m.a,Poster:g.a},methods:{pageTo:function(t){this.pages.hasOwnProperty(t)&&(this.page=this.pages[t])},setInItData:function(){},getInitData:function(){return{name:"",year:"",project:"",score:"",image:"",exists:!0,defeated:"0"}},loadComplete:function(){if(this.setInItData(),window.VConsole&&C.a.debug&&(this.vConsole=new window.VConsole),C.a.page&&this.pages[C.a.page])this.pageTo(C.a.page);else if(C.a.data){var t=JSON.parse(C.a.data);this.self=!1,this.data=t,this.pageTo("poster")}else this.pageTo("index")},inputInfo:function(t,e){this.data[t]=e},queryResult:function(){var t=this;return r()(i.a.mark(function e(){var a,n;return i.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t.$ui.loading.show("正在查询中"),e.next=3,w.a.get("http://case.html5case.cn/Shangma/submit",{params:{name:t.data.name,year:t.data.year}});case 3:a=e.sent,(n=a.data.data)&&n.list.length?(t.list=n.list,t.pageTo("score")):t.data.exists=!1,t.$ui.loading.hide();case 7:case"end":return e.stop()}},e,t)}))()},uploadImage:function(){var t=this;return r()(i.a.mark(function e(){var a,n;return i.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(a=C.b.indexOf(t.data.project),![3,4].includes(a)){e.next=3;break}return e.abrupt("return",t.pageTo("upload"));case 3:return e.next=5,w.a.get("http://case.html5case.cn/Shangma/submit",{params:{score:t.data.score.replace(/:/g,""),year:t.data.year,type:C.b.indexOf(t.data.project)}});case 5:1===(n=e.sent).data.code?(t.data.defeated=n.data.data.defeated,t.pageTo("upload")):alert("请填写正确成绩");case 7:case"end":return e.stop()}},e,t)}))()},makePoster:function(t){var e=this;return r()(i.a.mark(function n(){var s;return i.a.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return e.$ui.loading.show("正在上传中"),n.next=3,a.i(x.a)(t);case 3:s=n.sent,e.data.image=s,e.$ui.loading.hide(),e.pageTo("poster");case 7:case"end":return n.stop()}},n,e)}))()},remakePoster:function(){this.data=this.getInitData(),this.setInItData(),this.pageTo("info")},resetToIndex:function(){this.data=this.getInitData(),this.setInItData(),this.self=!0,this.pageTo("index")}}}},function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={methods:{logoAnimationEnd:function(){var t=this;setTimeout(function(){t.$emit("next")},1e3)}}}},function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=a(10);e.default={data:function(){return{empty:!1,yearOptions:n.c.map(function(t){return t.year}).concat([""]).reverse(),projectOptions:n.b}},props:{data:{type:Object}},computed:{exists:function(){return this.data.exists}},watch:{exists:function(t){this.empty=!t}},methods:{input:function(t){this.$emit("input",t.target.name,t.target.value)},query:function(){this.data.name?this.data.year?this.$emit("query"):alert("年份不能为空"):alert("姓名不能为空")},confirm:function(){this.data.year?this.data.project?this.data.score?/^([0-1]?[0-9]|2[0-3])(:|\uff1a)([0-5][0-9])(:|\uff1a)([0-5][0-9])$/.test(this.data.score)?this.$emit("confirm"):alert("成绩格式错误"):alert("成绩不能为空"):alert("项目不能为空"):alert("日期不能为空")}}}},function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=a(80);e.default={data:function(){return{value:0}},mounted:function(){var t=this;a.i(n.a)(window.resource.images,{directory:"img",progress:function(e){t.value=e},complete:function(){setTimeout(function(){t.$emit("complete")},1e3)}})},computed:{gridNumber:function(){return parseInt(this.value/2)}}}},function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=a(18),i=a.n(n),s=a(34),r=a.n(s),o=a(90),c=a.n(o),d=a(33),u=a.n(d),l=a(143),f=a.n(l),p=a(148),v=a.n(p),h=a(10);e.default={data:function(){var t=this;return{merged:"",qrcode:"",share:!1,info:h.c.find(function(e){return e.year===parseInt(t.data.year)})||{}}},mounted:function(){var t=this;return u()(r.a.mark(function e(){var a;return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t.self){e.next=2;break}return e.abrupt("return");case 2:return t.qrcode=t.createQrcode(window.H5_URL),t.animationEnd(),e.next=6,t.$nextTick();case 6:t.screenshot(),a=window.H5_URL+"?data="+encodeURIComponent(c()(t.data)),window.updateWechatShareData&&window.updateWechatShareData(t.shareTitle,a);case 9:case"end":return e.stop()}},e,t)}))()},props:{data:{type:Object},self:{type:Boolean}},filters:{format:function(t){return t<10?"0"+t:t}},computed:{shareTitle:function(){return this.data.exists?this.showDefeated?"我是"+this.data.name+",我以"+this.data.score+"完成第"+this.info.no+"届上海国际马拉松赛,打败了"+this.defeatedRate+"%人。":"我是"+this.data.name+",我以"+this.data.score+"完成第"+this.info.no+"届上海国际马拉松赛。":"我是"+this.data.name+", 我以"+this.data.score+"完成第"+this.info.no+"届上海国际马拉松赛"+this.data.project+"项目。"},defeatedRate:function(){return Math.ceil(100*this.data.defeated)/100},showDefeated:function(){return[1,2].includes(h.b.indexOf(this.data.project))}},methods:{animationEnd:function(){return new i.a(function(t){setTimeout(function(){t()},2e3)})},screenshot:function(){var t=this;return u()(r.a.mark(function e(){var a;return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,f()(t.$refs.main,{useCORS:!0});case 2:a=e.sent,t.merged=a.toDataURL();case 4:case"end":return e.stop()}},e,t)}))()},createQrcode:function(t){var e=v()(t).modules,a=document.createElement("canvas"),n=a.getContext("2d");a.width=88,a.height=88,n.fillStyle="#fff",n.fillRect(0,0,a.width,a.height);for(var i=(a.width-10)/e.length,s=(a.height-10)/e.length,r=0;r