12 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-53e61f92"],{"09fe":function(t,e,i){},"188e":function(t,e,i){"use strict";var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"button_container"},[t.can_add?i("img",{staticClass:"add_button s",attrs:{src:"http://pjczv6ygf.bkt.clouddn.com/add-present-button/add_button_active.png"},on:{click:t.toAddPresent}}):t._e(),t.can_add?t._e():i("img",{staticClass:"add_button",attrs:{src:"http://pjczv6ygf.bkt.clouddn.com/add-present-button/add_button_inactive.png"}})])},s=[],a=(i("e7e5"),i("d399")),o={name:"add-present-button",props:{can_add:{type:Boolean,default:!0},disabled:{type:Boolean,default:!0}},methods:{toAddPresent:function(){a["a"].loading({mask:!0,message:"加载中...",duration:500}),this.disabled&&this.$router.push("verify")}}},c=o,r=(i("cf59"),i("2877")),u=Object(r["a"])(c,n,s,!1,null,"3b2d8fb3",null);u.options.__file="addPresentButton.vue";e["a"]=u.exports},"1e4b":function(t,e,i){"use strict";i.r(e);var n,s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[!1===t.hasPresent?i("guide",{staticStyle:{"z-index":"99"}}):t._e(),i("van-swipe",{staticStyle:{margin:"10px 10px"},attrs:{autoplay:3e3,"initial-swipe":1}},t._l(t.images,function(t,e){return i("van-swipe-item",{key:e},[i("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t,expression:"image"}],staticStyle:{width:"100%"}})])})),i("van-notice-bar",{attrs:{text:"上传礼物已经截止了哦,请点击礼物查看配对结果","left-icon":"//img.yzcdn.cn/vant/volume.png"}}),i("van-row",{staticStyle:{margin:"0 10px 0 15px"},attrs:{type:"flex",justify:"space-between",align:"center"}},[i("van-col",[i("p",[i("strong",[t._v("我的礼物")])])]),i("van-col",[i("van-button",{attrs:{round:"",type:"primary",size:"small"},on:{click:t.toDraw}},[t._v("参加抽奖")])],1)],1),i("ul",{staticStyle:{"background-color":"#fff6e3"}},t._l(t.presents,function(e,n){return i("index-present",{key:e.id,tag:"li",attrs:{"present-img":e.imgUrl,"present-name":e.name,"present-desc":e.desc,"publish-time":e.time,status:e.status},on:{"to-detail":function(e){t.toDetail(n)}}})})),i("div",{staticStyle:{margin:"20px 10px 0"}},[t._m(0),t._l(t.dec_icons,function(e,n){return i("div",{key:n,staticClass:"dec",on:{click:function(e){t.Desc(n)}}},[i("img",{attrs:{src:e}}),i("p",[t._v(t._s(t.dec_words[n]))])])})],2),t._m(1),i("add-present-button",{attrs:{can_add:!1}})],1)},a=[function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("p",{staticStyle:{"text-align":"left","margin-left":"5px"}},[i("strong",[t._v("简单四步,轻松互赠圣诞礼物")])])},function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticStyle:{margin:"20px 10px 80px","font-size":"15px"}},[i("p",{staticStyle:{"margin-bottom":"0"}},[t._v("Tips:")]),i("p",{staticStyle:{"margin-top":"5px"}},[t._v("我们十分重视您的礼物"),i("br"),t._v(" 如果使用中遇到疑惑 "),i("br"),t._v(" 欢迎您随时微信联系 177-8875-2557 ")])])}],o=(i("55dd"),i("ac6a"),i("e17f"),i("2241")),c=(i("e7e5"),i("d399")),r=i("ade3"),u=(i("68ef"),i("9ee3"),i("fe7e")),l=Object(u["a"])({render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{directives:[{name:"show",rawName:"v-show",value:t.showNoticeBar,expression:"showNoticeBar"}],class:t.b({withicon:t.mode}),style:t.barStyle,on:{click:function(e){t.$emit("click")}}},[t.leftIcon?i("div",{class:t.b("left-icon")},[i("img",{attrs:{src:t.leftIcon}})]):t._e(),i("div",{ref:"wrap",class:t.b("wrap")},[i("div",{ref:"content",class:[t.b("content"),t.animationClass,{"van-ellipsis":!t.scrollable}],style:t.contentStyle,on:{animationend:t.onAnimationEnd,webkitAnimationEnd:t.onAnimationEnd}},[t._t("default",[t._v(t._s(t.text))])],2)]),t.iconName?i("icon",{class:t.b("right-icon"),attrs:{name:t.iconName},on:{click:t.onClickIcon}}):t._e()],1)},name:"notice-bar",props:{text:String,mode:String,color:String,leftIcon:String,background:String,delay:{type:[String,Number],default:1},scrollable:{type:Boolean,default:!0},speed:{type:Number,default:50}},data:function(){return{wrapWidth:0,firstRound:!0,duration:0,offsetWidth:0,showNoticeBar:!0,animationClass:""}},computed:{iconName:function(){return"closeable"===this.mode?"close":"link"===this.mode?"arrow":""},barStyle:function(){return{color:this.color,background:this.background}},contentStyle:function(){return{paddingLeft:this.firstRound?0:this.wrapWidth+"px",animationDelay:(this.firstRound?this.delay:0)+"s",animationDuration:this.duration+"s"}}},watch:{text:{handler:function(){var t=this;this.$nextTick(function(){var e=t.$refs,i=e.wrap,n=e.content;if(i&&n){var s=i.getBoundingClientRect().width,a=n.getBoundingClientRect().width;t.scrollable&&a>s&&(t.wrapWidth=s,t.offsetWidth=a,t.duration=a/t.speed,t.animationClass=t.b("play"))}})},immediate:!0}},methods:{onClickIcon:function(){this.showNoticeBar="closeable"!==this.mode},onAnimationEnd:function(){var t=this;this.firstRound=!1,this.$nextTick(function(){t.duration=(t.offsetWidth+t.wrapWidth)/t.speed,t.animationClass=t.b("play--infinite")})}}}),d=(i("786d"),Object(u["a"])({render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{class:t.b(),style:t.style},[t._t("default")],2)},name:"swipe-item",data:function(){return{offset:0}},computed:{style:function(){var t=this.$parent,e=t.vertical,i=t.computedWidth,n=t.computedHeight;return{width:i+"px",height:e?n+"px":"100%",transform:"translate"+(e?"Y":"X")+"("+this.offset+"px)"}}},beforeCreate:function(){this.$parent.swipes.push(this)},destroyed:function(){this.$parent.swipes.splice(this.$parent.swipes.indexOf(this),1)}})),h=(i("8270"),i("3875")),f=i("db78"),p=Object(u["a"])({render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{class:t.b()},[i("div",{class:t.b("track"),style:t.trackStyle,on:{touchstart:t.onTouchStart,touchmove:t.onTouchMove,touchend:t.onTouchEnd,touchcancel:t.onTouchEnd,transitionend:function(e){t.$emit("change",t.activeIndicator)}}},[t._t("default")],2),t._t("indicator",[t.showIndicators&&t.count>1?i("div",{class:t.b("indicators",{vertical:t.vertical})},t._l(t.count,function(e){return i("i",{class:t.b("indicator",{active:e-1===t.activeIndicator}),style:t.indicatorStyle})})):t._e()])],2)},name:"swipe",mixins:[h["a"]],props:{width:Number,height:Number,autoplay:Number,vertical:Boolean,initialSwipe:Number,indicatorColor:String,loop:{type:Boolean,default:!0},touchable:{type:Boolean,default:!0},showIndicators:{type:Boolean,default:!0},duration:{type:Number,default:500}},data:function(){return{computedWidth:0,computedHeight:0,offset:0,active:0,deltaX:0,deltaY:0,swipes:[],swiping:!1}},mounted:function(){this.initialize(),this.$isServer||Object(f["b"])(window,"resize",this.onResize,!0)},destroyed:function(){this.clear(),this.$isServer||Object(f["a"])(window,"resize",this.onResize,!0)},watch:{swipes:function(){this.initialize()},initialSwipe:function(){this.initialize()},autoplay:function(t){t?this.autoPlay():this.clear()}},computed:{count:function(){return this.swipes.length},delta:function(){return this.vertical?this.deltaY:this.deltaX},size:function(){return this[this.vertical?"computedHeight":"computedWidth"]},trackSize:function(){return this.count*this.size},activeIndicator:function(){return(this.active+this.count)%this.count},isCorrectDirection:function(){var t=this.vertical?"vertical":"horizontal";return this.direction===t},trackStyle:function(){var t,e=this.vertical?"height":"width",i=this.vertical?"width":"height";return t={},t[e]=this.trackSize+"px",t[i]=this[i]?this[i]+"px":"",t.transitionDuration=(this.swiping?0:this.duration)+"ms",t.transform="translate"+(this.vertical?"Y":"X")+"("+this.offset+"px)",t},indicatorStyle:function(){return{backgroundColor:this.indicatorColor}}},methods:{initialize:function(t){if(void 0===t&&(t=this.initialSwipe),clearTimeout(this.timer),this.$el){var e=this.$el.getBoundingClientRect();this.computedWidth=this.width||e.width,this.computedHeight=this.height||e.height}this.swiping=!0,this.active=t,this.offset=this.count>1?-this.size*this.active:0,this.swipes.forEach(function(t){t.offset=0}),this.autoPlay()},onResize:function(){this.initialize(this.activeIndicator)},onTouchStart:function(t){this.touchable&&(this.clear(),this.swiping=!0,this.touchStart(t),this.correctPosition())},onTouchMove:function(t){this.touchable&&this.swiping&&(this.touchMove(t),this.isCorrectDirection&&(t.preventDefault(),t.stopPropagation(),this.move(0,Math.min(Math.max(this.delta,-this.size),this.size))))},onTouchEnd:function(){if(this.touchable&&this.swiping){if(this.delta&&this.isCorrectDirection){var t=this.vertical?this.offsetY:this.offsetX;this.move(t>0?this.delta>0?-1:1:0)}this.swiping=!1,this.autoPlay()}},move:function(t,e){void 0===t&&(t=0),void 0===e&&(e=0);var i=this.delta,n=this.active,s=this.count,a=this.swipes,o=this.trackSize,c=0===n,r=n===s-1,u=!this.loop&&(c&&(e>0||t<0)||r&&(e<0||t>0));u||s<=1||(a[0].offset=r&&(i<0||t>0)?o:0,a[s-1].offset=c&&(i>0||t<0)?-o:0,t&&n+t>=-1&&n+t<=s&&(this.active+=t),this.offset=e-this.active*this.size)},swipeTo:function(t){var e=this;this.swiping=!0,this.correctPosition(),setTimeout(function(){e.swiping=!1,e.move(t%e.count-e.active)},30)},correctPosition:function(){this.active<=-1&&this.move(this.count),this.active>=this.count&&this.move(-this.count)},clear:function(){clearTimeout(this.timer)},autoPlay:function(){var t=this,e=this.autoplay;e&&this.count>1&&(this.clear(),this.timer=setTimeout(function(){t.swiping=!0,t.resetTouchStatus(),t.correctPosition(),setTimeout(function(){t.swiping=!1,t.move(1),t.autoPlay()},30)},e))}}}),m=(i("81e6"),i("9ffb")),v=(i("4d48"),i("d1e1")),g=(i("7f7f"),i("66b9"),i("b650")),b=(i("cadf"),i("551c"),i("097d"),function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{on:{click:t.toDetail}},[i("van-card",{attrs:{thumb:t.presentImg}},[i("div",{staticStyle:{position:"absolute","text-align":"left",top:"0"},attrs:{slot:"title"},slot:"title"},[i("p",{staticStyle:{margin:"10px 0 0"}},[i("strong",[t._v(t._s(t.presentName))])]),i("p",{staticStyle:{"margin-top":"5px"}},[t._v(t._s(t.presentDesc))])]),i("div",{staticStyle:{position:"absolute",bottom:"0","text-align":"left"},attrs:{slot:"tags"},slot:"tags"},[i("p",[t._v(t._s(t.publishTime))])]),i("div",{staticStyle:{width:"100%"},attrs:{slot:"footer"},slot:"footer"},[i("van-tag",{staticClass:"present_tag",attrs:{color:t.statusColor[t.status]}},[t._v(t._s(t.statusString[t.status]))])],1)])],1)}),_=[],y=(i("c5f6"),i("9b7e"),i("a3e2")),w=(i("9cb7"),i("66fd")),S={name:"IndexPresent",components:(n={},Object(r["a"])(n,w["a"].name,w["a"]),Object(r["a"])(n,y["a"].name,y["a"]),n),data:function(){return{statusString:["审核中","匹配中","匹配成功","交换成功","审核失败"],statusColor:["#fd6740","#00ff00","#00bfff","#00fa9a","#ff0000"]}},props:{presentImg:{type:String,default:"http://pjczv6ygf.bkt.clouddn.com/image_load_fail.jpg"},presentName:{type:String,default:"礼物名称"},presentDesc:{type:String,default:"礼物描述"},publishTime:{type:String,default:"1970-01-01"},status:{type:Number,default:0}},methods:{toDetail:function(){this.$emit("to-detail")}}},k=S,x=(i("b56e"),i("2877")),z=Object(x["a"])(k,b,_,!1,null,"eac93592",null);z.options.__file="IndexPresent.vue";var j=z.exports,$=i("188e"),C=i("6ef9"),I=function(){var t=this,e=t.$createElement,i=t._self._c||e;return t.seen?i("div",{staticClass:"guide_background",on:{click:function(e){t.seen=!1}}},[t._m(0),i("add-present-button",{attrs:{can_add:!0,disabled:!1}})],1):t._e()},T=[function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"tips"},[i("p",[t._v("点击这里"),i("br"),t._v("发布礼物")]),i("img",{attrs:{src:"http://pjczv6ygf.bkt.clouddn.com/arrow.png"}})])}],P={name:"guide",components:{AddPresentButton:$["a"]},data:function(){return{seen:!0}}},B=P,D=(i("40a6"),Object(x["a"])(B,I,T,!1,null,"7af3f817",null));D.options.__file="guide.vue";var E,N=D.exports,O={name:"index",components:(E={Guide:N,AddPresentButton:$["a"],IndexPresent:j},Object(r["a"])(E,g["a"].name,g["a"]),Object(r["a"])(E,v["a"].name,v["a"]),Object(r["a"])(E,m["a"].name,m["a"]),Object(r["a"])(E,p.name,p),Object(r["a"])(E,d.name,d),Object(r["a"])(E,l.name,l),E),data:function(){return{images:["http://pjczv6ygf.bkt.clouddn.com/banner/banner1.jpg","http://pjczv6ygf.bkt.clouddn.com/banner/banner2.jpg","http://pjczv6ygf.bkt.clouddn.com/banner/banner3.jpg"],active:0,button_active:!1,presents:{},hasPresent:!0,dec_icons:["http://pjczv6ygf.bkt.clouddn.com/dec-icon/1.png","http://pjczv6ygf.bkt.clouddn.com/dec-icon/2.png","http://pjczv6ygf.bkt.clouddn.com/dec-icon/3.png","http://pjczv6ygf.bkt.clouddn.com/dec-icon/4.png"],dec_words:["填写资料","上传礼物","获得匹配","线下交换"],userStatus:100}},methods:{toDraw:function(){c["a"].loading({mask:!0,message:"加载中...",duration:1e3}),this.$router.push("draw")},toDetail:function(t){var e=this;if(500===this.userStatus)o["a"].confirm({message:"您的校卡审核未通过!请前往【我的】页面重新上传校卡,否则将不会为您审核礼物哦",confirmButtonText:"查看校卡信息",cancelButtonText:"查看礼物"}).then(function(){c["a"].loading({mask:!0,message:"加载中...",duration:500}),e.$router.push("me")}).catch(function(){c["a"].loading({mask:!0,message:"加载中...",duration:1e3});var i=e.presents[t];e.$router.push({path:"giftDetail",query:{presentId:i.id}})});else{c["a"].loading({mask:!0,message:"加载中...",duration:1e3});var i=this.presents[t];this.$router.push({path:"giftDetail",query:{presentId:i.id}})}},Desc:function(t){switch(t){case 0:c["a"].loading({mask:!0,message:"加载中...",duration:500}),this.$router.push("me");break;case 1:c["a"].loading({mask:!0,message:"加载中...",duration:500}),this.button_active?this.$router.push("verify"):o["a"].alert({message:"只能上传一个礼物哦"}).then(function(){});break;case 2:o["a"].alert({title:"获得匹配",message:"获得匹配后,请返回此页面,点击礼物查看匹配"}).then(function(){});break;case 3:o["a"].alert({title:"线下交换",message:"请联系匹配到的同学进行线下交换,我们将提供该同学的微信号"}).then(function(){})}}},created:function(){if(null!==localStorage.getItem("frontend-userid")){var t=localStorage.getItem("frontend-userid"),e=[],i=!0,n=!1,s=this;C["a"].get_data("smartIdentity/list?userId="+t,function(a){try{if("10000"===a.ret&&void 0!=a.model&&void 0!=a.model.list&&a.model.list.length>0){var o=a.model.list[0];s.userStatus=o.userReviewStatus,C["a"].get_data("smartGoods/list?isDel=0&ownerId="+t,function(t){if("10000"===t.ret){var a=t.model.list;0!==a.length&&(n=!0),s.hasPresent=n,a.forEach(function(t){var n={};n.id=t.goodid,n.imgUrl="http://gift.fogice.com"+t.img,n.name=t.name,t.description.length>45?(n.desc=t.description.substring(0,30),n.desc+="..."):n.desc=t.description,n.desc_long=t.description,n.time=t.createTime.substring(0,9),n.status=t.sort,4!==t.sort&&(i=!1),n.gender=t.goodFirstKind,n.tags=t.goodSecondKind,e.push(n)}),s.button_active=i}else c["a"].fail("获取礼物列表失败")},{})}else c["a"].fail("获取信息失败"),localStorage.removeItem("frontend-userid")}catch(r){console.warn(r),localStorage.removeItem("frontend-userid"),c["a"].fail("无法获取用户信息,请退出重试"+r)}},{}),this.presents=e}else this.$router.push("login")},mounted:function(){document.getElementsByName("index_icon")[0].click()}},R=O,W=(i("4236"),Object(x["a"])(R,s,a,!1,null,"4ceff251",null));W.options.__file="index.vue";e["default"]=W.exports},"384e":function(t,e,i){},"40a6":function(t,e,i){"use strict";var n=i("db86"),s=i.n(n);s.a},4236:function(t,e,i){"use strict";var n=i("09fe"),s=i.n(n);s.a},"786d":function(t,e,i){},8270:function(t,e,i){},"9ee3":function(t,e,i){},b56e:function(t,e,i){"use strict";var n=i("c668"),s=i.n(n);s.a},c668:function(t,e,i){},cf59:function(t,e,i){"use strict";var n=i("384e"),s=i.n(n);s.a},db86:function(t,e,i){}}]);
- //# sourceMappingURL=chunk-53e61f92.d3b7dd4a.js.map
|