frontend_h5/static/js/pages-scap-index.4c7713dd.js

1 line
15 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-scap-index"],{"011d":function(t,i,e){"use strict";e("7a82");var a=e("4ea4").default;Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0,e("a9e3"),e("14d9");var s=a(e("8947")),n={data:function(){return{zjlist:[],animate:!1,showNum:3,ismask:!1,ismask2:!1,jiang:"",istrue:!1,prizeList:[],acid:"",noq:!1,isscap:!1,imgUrl:""}},components:{scrap:s.default},onLoad:function(t){this.acid=t.id,this.imgUrl=this.api.imgUrl,this.getData()},created:function(){setInterval(this.showMarquee,2e3)},mounted:function(){this.$refs.marquee_box.style.height=30*this.showNum+"px"},methods:{getData:function(t){var i=this;uni.showLoading({title:"加载中..."}),this.api.getdatas({id:this.acid}).then((function(t){console.log(t),200==t.data.code?(i.zjlist=t.data.data.win_list,i.prizeList=t.data.data.prizes,i.istrue=!0,i.getover()):(uni.hideLoading(),i.istrue=!0,uni.showToast({title:t.data.message,icon:"none"}))}))},getover:function(){var t=this,i=this;i.api.getover({id:i.acid}).then((function(e){if(console.log(e),200==e.data.code){if(0==e.data.data.length)uni.setStorageSync("good","很遗憾,未中奖"),uni.setStorageSync("good2","很遗憾,未中奖"),t.jiang="很遗憾,未中奖";else for(var a=0;a<i.prizeList.length;a++)i.prizeList[a].prize_id==e.data.data.prize_id&&(t.jiang=e.data.data.name,uni.setStorageSync("good",Number(a+1)+"等奖"),setTimeout((function(){uni.hideLoading(),i.istrue=!0}),1800));t.isscap=!0}else i.istrue=!0,t.noq=!0,uni.showToast({title:e.data.message,icon:"none"})}))},showMarquee:function(){var t=this;this.animate=!0,this.zjlist.push(this.zjlist[0]),setTimeout((function(){t.zjlist.shift(),t.animate=!1}),1e3)},closemsk:function(){this.ismask=!1,this.ismask2=!1},openmask:function(){this.ismask=!0},gomyp:function(){uni.navigateTo({url:"/pages/my/prizes?acid="+this.acid})},zhong:function(t){console.log(t),this.ismask2=!0}}};i.default=n},"34cb":function(t,i,e){var a=e("faa9");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var s=e("4f06").default;s("52f36bf6",a,!0,{sourceMap:!1,shadowMode:!1})},"3bc5":function(t,i,e){var a=e("cf31");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var s=e("4f06").default;s("393a2058",a,!0,{sourceMap:!1,shadowMode:!1})},"3ca8":function(t,i,e){"use strict";var a=e("3bc5"),s=e.n(a);s.a},4534:function(t,i,e){"use strict";e.r(i);var a=e("011d"),s=e.n(a);for(var n in a)["default"].indexOf(n)<0&&function(t){e.d(i,t,(function(){return a[t]}))}(n);i["default"]=s.a},"54cb":function(t,i,e){"use strict";e("7a82"),Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0,e("14d9");var a={data:function(){return{ctx:null,width:556,height:292,disabled:!1,readyState:!1,endState:!1,watermark:"刮一刮",watermarkColor:"#c5c5c5",watermarkSize:14,title:"快来刮我",titleColor:"#888",titleSize:24,startX:0,startY:0,touchSize:20,percentage:20,prizeList:[],istrue:!0,good:uni.getStorageSync("good"),good2:uni.getStorageSync("good2"),pid:uni.getStorageSync("pid"),noq:!1}},mounted:function(){var t=this;this.$nextTick((function(){uni.createSelectorQuery().select(".content");t.ctx=uni.createCanvasContext("myCanvas",t),setTimeout((function(i){t.init()}),20)}))},methods:{init:function(){this.endState=!1,this.readyState=!1,this.ctx.clearRect(0,0,this.width,this.height),this.ctx.setFillStyle("#ddd"),this.ctx.fillRect(0,0,this.width,this.height);var t=this.watermark.length*this.watermarkSize;this.ctx.save(),this.ctx.rotate(-10*Math.PI/180);var i=0,e=0,a=0;while((i<=5*this.width||e<=5*this.height)&&a<300)this.ctx.setFillStyle(this.watermarkColor),this.ctx.setFontSize(this.watermarkSize),this.ctx.fillText(this.watermark,i,e),i+=t+1.6*t,i>this.width&&e<=this.height&&(i=100*-Math.random(),e+=3*this.watermarkSize),a++;this.ctx.restore(),this.ctx.setTextAlign("center"),this.ctx.setTextBaseline("middle"),this.ctx.setFillStyle(this.titleColor),this.ctx.setFontSize(this.titleSize),this.ctx.fillText(this.title,this.width/4,this.height/4),this.ctx.draw(),this.readyState=!0},touchstart:function(t){this.disabled||this.endState||(this.startX=t.touches[0].x,this.startY=t.touches[0].y)},touchmove:function(t){this.disabled||this.endState||(this.ctx.clearRect(this.startX,this.startY,this.touchSize,this.touchSize),this.ctx.draw(!0),this.startX=t.touches[0].x,this.startY=t.touches[0].y)},touchend:function(t){var i=this;this.disabled||this.endState||uni.canvasGetImageData({canvasId:"myCanvas",x:0,y:0,width:this.width,height:this.height,success:function(t){console.log(t);for(var e=t.data,a=[],s=0;s<e.length;s+=4)e[s+3]<128&&a.push(e[s+3]);var n=(a.length/(e.length/4)*100).toFixed(2);n>=i.percentage&&i.success()},fail:function(t){console.log(t)}},this)},success:function(t){this.endState||(this.endState=!0,this.ctx.moveTo(0,0),this.ctx.clearRect(0,0,this.width,this.height),this.ctx.stroke(),this.ctx.draw(!0),this.$emit("zhong",this.good2))},reset:function(){this.init()}}};i.default=a},"566f":function(t,i,e){"use strict";e.r(i);var a=e("69d4"),s=e("4534");for(var n in s)["default"].indexOf(n)<0&&function(t){e.d(i,t,(function(){return s[t]}))}(n);e("3ca8");var o=e("f0c5"),c=Object(o["a"])(s["default"],a["b"],a["c"],!1,null,"7516c80b",null,!1,a["a"],void 0);i["default"]=c.exports},6650:function(t,i,e){"use strict";e.r(i);var a=e("54cb"),s=e.n(a);for(var n in a)["default"].indexOf(n)<0&&function(t){e.d(i,t,(function(){return a[t]}))}(n);i["default"]=s.a},"69d4":function(t,i,e){"use strict";e.d(i,"b",(function(){return a})),e.d(i,"c",(function(){return s})),e.d(i,"a",(function(){}));var a=function(){var t=this,i=t.$createElement,e=t._self._c||i;return t.istrue?e("v-uni-view",{staticClass:"content"},[t.noq?e("v-uni-view",{staticClass:"noq"}):t._e(),t.ismask?e("v-uni-view",{staticClass:"mask flex_items flex_center",on:{click:function(i){arguments[0]=i=t.$handleEvent(i),t.closemsk.apply(void 0,arguments)}}},[e("v-uni-view",{staticClass:"mk plr50 pos flex_column flex_items"},[e("v-uni-view",{staticClass:"f40 abs bold",staticStyle:{color:"#CA7340",top:"24rpx"}},[t._v("活动规则")]),e("v-uni-view",{staticClass:"plr50 flex_column f24",staticStyle:{color:"#2B6DA8"}},[e("v-uni-view",{staticStyle:{"margin-top":"130rpx"}},[t._v("1.【活动时间】2023年11月1日至2023年12月31日。")]),e("v-uni-view",{staticClass:"mt20"},[t._v("2.【活动内容】此为文字内容此为文字内容此为文字内容此为文字内容此为文字内容此为文字内容此为文字内容此为文字内容此为文字内容此为文字内容此为文字内容此为文字内容此为文字内容。")]),e("v-uni-view",{staticClass:"mt20"},[t._v("3.【活动细则】此为文字内容此为文字内容此为文字内容此为文字内容此为文字内容此为文字内容此为文字内容此为文字内容此为文字内容此为文字内容此为文字内容此为文字内容此为文字内容。")]),e("v-uni-view",{staticClass:"mt20"},[t._v("4【活动细则】此为文字内容此为文字内容此为文字内容此为文字内容此为文字内容此为文字内容此为。")])],1),e("v-uni-image",{staticClass:"abs",staticStyle:{width:"52rpx",height:"52rpx",bottom:"-100rpx"},attrs:{src:t.imgUrl+"cha.png",mode:""},on:{click:function(i){arguments[0]=i=t.$handleEvent(i),t.closemsk.apply(void 0,arguments)}}})],1)],1):t._e(),t.ismask2?e("v-uni-view",{staticClass:"mask flex_items flex_center"},[e("v-uni-view",{staticClass:"mk2 plr50 flex_column flex_items pos"},["很遗憾,未中奖"==t.jiang?e("v-uni-view",{staticClass:"f36 bold",staticStyle:{color:"#003A6E","margin-top":"150rpx",opacity:"0"}},[t._v("未中奖")]):e("v-uni-view",{staticClass:"f36 bold",staticStyle:{color:"#003A6E","margin-top":"150rpx"}},[t._v("恭喜您获得")]),e("v-uni-view",{staticClass:"mt40 f40",staticStyle:{color:"#003A6E"}},[t._v(t._s(t.jiang))]),e("v-uni-view",{staticClass:"mt30 f24",staticStyle:{color:"#003A6E"}},[t._v("请到【我的奖品】中查看")]),e("v-uni-view",{staticClass:"flex_items flex_center btnl mt40",on:{click:function(i){arguments[0]=i=t.$handleEvent(i),t.gomyp.apply(void 0,arguments)}}},[e("v-uni-text",{staticClass:"f32",staticStyle:{color:"#fff"}},[t._v("确认")])],1),e("v-uni-image",{staticClass:"abs",staticStyle:{width:"52rpx",height:"52rpx",bottom:"-100rpx"},attrs:{src:t.imgUrl+"cha.png",mode:""},on:{click:function(i){arguments[0]=i=t.$handleEvent(i),t.closemsk.apply(void 0,arguments)}}})],1)],1):t._e(),e("v-uni-view",{staticClass:"flex_column flex_items t1"},[e("v-uni-view",{staticStyle:{"margin-top":"540rpx"}},[e("v-uni-image",{staticStyle:{width:"600rpx",height:"126rpx"},attrs:{src:t.imgUrl+"xy.png"}})],1),e("v-uni-image",{staticStyle:{width:"300rpx",height:"60rpx"},attrs:{src:t.imgUrl+"chu.png",mode:""}}),e("v-uni-view",{staticClass:"flex_items flex_center mt60 pos",staticStyle:{width:"100%"}},[e("v-uni-view",{staticClass:"pos flex_column flex_items",staticStyle:{width:"100%"}},[e("v-uni-image",{staticStyle:{width:"430rpx",height:"330rpx","z-index":"1"},attrs:{src:t.imgUrl+"lw.png",mode:""}}),e("v-uni-image",{staticClass:"abs",staticStyle:{width:"750rpx",height:"362rpx",left:"50%",transform:"translate(-50%)",top:"180rpx","z-index":"0"},attrs:{src:t.imgUrl+"dp.png",mode:""}}),e("v-uni-image",{staticClass:"abs",staticStyle:{width:"100%",height:"183rpx","z-index":"2",left:"0",top:"320rpx"},attrs:{src:t.imgUrl+"hua.png",mode:""}})],1),e("v-uni-view",{staticClass:"flex_column flex_items mt30 abs",staticStyle:{right:"0",top:"0rpx"}},[e("v-uni-view",{staticClass:"tagr flex_items flex_center",staticStyle:{color:"#fff","z-index":"8"},on:{click:function(i){arguments[0]=i=t.$handleEvent(i),t.openmask.apply(void 0,arguments)}}},[e("v-uni-text",{staticClass:"f24"},[t._v("活动规则")]),e("v-uni-image",{staticClass:"ml10",staticStyle:{width:"22rpx",height:"20rpx"},attrs:{src:t.imgUrl+"rightg.png",mode:""}})],1),e("v-uni-view",{staticClass:"tagr flex_items flex_center mt20",staticStyle:{color:"#fff","z-index":"8"},on:{click:function(i){arguments[0]=i=t.$handleEvent(i),t.gomyp.apply(void 0,arguments)}}},[e("v-uni-text",{staticClass:"f24"},[t._v("我的奖品")]),e("v-uni-image",{staticClass:"ml10",staticStyle:{width:"22rpx",height:"20rpx"},attrs:{src:t.imgUrl+"rightg.png",mode:""}})],1)],1)],1),e("v-uni-view",{staticClass:"gw pos",staticStyle:{"margin-top":"100rpx",background:"#FCC988","z-index":"8"}},[e("v-uni-image",{staticStyle:{width:"600rpx",height:"361rpx"},attrs:{src:t.imgUrl+"gw.png",mode:""}}),t.isscap?e("scrap",{staticClass:"abs",staticStyle:{left:"-94rpx",top:"116rpx"},on:{zhong:function(i){arguments[0]=i=t.$handleEvent(i),t.zhong.apply(void 0,arguments)}}}):t._e()],1),e("v-uni-view",{staticClass:"mt50 flex_column flex_items",staticStyle:{width:"100%"}},[e("v-uni-text",{staticClass:"bolder f40",staticStyle:{color:"#E57524"}},[t._v("中奖名单")]),e("v-uni-view",{staticClass:"mt30 ptb30",staticStyle:{width:"calc(100% - 120rpx)",background:"#FFE9B8","border-radius":"20rpx",border:"4rpx solid #fff"}},[e("div",{staticClass:"marquee"},[e("div",{ref:"marquee_box",staticClass:"marquee_box"},[e("div",{staticClass:"marquee_list",class:{marquee_top:t.animate}},[e("div",{},t._l(t.zjlist,(function(i,a){return e("div",{key:a,staticClass:"mt30 flex_start flex_items pb30",staticStyle:{width:"100%",color:"#E57524"}},[e("v-uni-text",{staticClass:"f24 ml10"},[t._v("恭喜:"+t._s(i.user_name)+"的用户获得")]),e("v-uni-text",{staticClass:"f24"},[t._v(t._s(i.price)+"积分")])],1)})),0)])])])]),e("v-uni-view",{staticStyle:{width:"100%",height:"260rpx","margin-top":"12rpx"}},[e("v-uni-image",{staticStyle:{width:"100%",height:"260rpx"},attrs:{src:t.imgUrl+"yun.png",mode:""}})],1)],1)],1),e("Ywatermark",{attrs:{info:"蓝色兄弟"}})],1):t._e()},s=[]},"6afb":function(t,i,e){"use strict";var a=e("34cb"),s=e.n(a);s.a},8947:function(t,i,e){"use strict";e.r(i);var a=e("db10"),s=e("6650");for(var n in s)["default"].indexOf(n)<0&&function(t){e.d(i,t,(function(){return s[t]}))}(n);e("6afb");var o=e("f0c5"),c=Object(o["a"])(s["default"],a["b"],a["c"],!1,null,"b21baeb8",null,!1,a["a"],void 0);i["default"]=c.exports},cf31:function(t,i,e){var a=e("24fb");i=a(!1),i.push([t.i,"uni-page-body[data-v-7516c80b]{background:#f9af64!important}body.?%PAGE?%[data-v-7516c80b]{background:#f9af64!important}.content[data-v-7516c80b]{width:100%;background-image:url(http://jifenshop1.test.86698.cn/api/static/images/bg.png);background-size:100% 100%;height:%?1500?%}.t1[data-v-7516c80b]{overflow-x:hidden}.marquee[data-v-7516c80b]{width:100%;align-items:center;color:#3a3a3a;\n\t/* // background-color: white; */display:flex;box-sizing:border-box;overflow:hidden}.marquee_title[data-v-7516c80b]{padding:0 20px;height:21px;font-size:14px;border-right:1px solid #d8d8d8;align-items:center}.marquee_box[data-v-7516c80b]{display:block;position:relative;width:100%;overflow:hidden;margin:0 auto;height:%?490?%}.marquee_list[data-v-7516c80b]{display:block;position:absolute;top:0;left:50%;-webkit-transform:translate(-50%);transform:translate(-50%);width:calc(100% - %?150?%)}.marquee_top[data-v-7516c80b]{transition:all 1s;margin-top:-30px}.tagr[data-v-7516c80b]{width:%?159?%;height:%?44?%;background:linear-gradient(180deg,#fff2ba,#f14a1a);border-radius:%?22?% %?0?% %?0?% %?22?%}.mask[data-v-7516c80b]{background:rgba(0,0,0,.6);width:100%;height:100vh;position:fixed;left:0;top:0;z-index:10}.mk2[data-v-7516c80b]{background-image:url(http://jifenshop1.test.86698.cn/api/static/images/zj.png);background-size:100% 100%;width:%?494?%;height:%?684?%}.btnl[data-v-7516c80b]{background-image:url(http://jifenshop1.test.86698.cn/api/static/images/btn.png);background-size:100% 100%;width:%?218?%;height:%?76?%}.mk[data-v-7516c80b]{background-image:url(http://jifenshop1.test.86698.cn/api/static/images/js.png);background-size:100% 100%;width:%?580?%;height:%?716?%}.noq[data-v-7516c80b]{width:100%;height:100vh;z-index:555;position:fixed;left:0;top:0;background:none}",""]),t.exports=i},db10:function(t,i,e){"use strict";e.d(i,"b",(function(){return a})),e.d(i,"c",(function(){return s})),e.d(i,"a",(function(){}));var a=function(){var t=this,i=t.$createElement,e=t._self._c||i;return t.istrue?e("v-uni-view",{},[e("v-uni-view",{staticClass:"content"},[e("v-uni-view",{directives:[{name:"show",rawName:"v-show",value:t.readyState,expression:"readyState"}],staticClass:"value"},[t._v(t._s(t.good))]),e("v-uni-canvas",{style:{width:t.width+"rpx",height:t.height+"rpx"},attrs:{"canvas-id":"myCanvas",id:"myCanvas"},on:{touchstart:function(i){arguments[0]=i=t.$handleEvent(i),t.touchstart.apply(void 0,arguments)},touchend:function(i){arguments[0]=i=t.$handleEvent(i),t.touchend.apply(void 0,arguments)},touchmove:function(i){arguments[0]=i=t.$handleEvent(i),t.touchmove.apply(void 0,arguments)}}})],1),e("Ywatermark",{attrs:{info:"蓝色兄弟"}})],1):t._e()},s=[]},faa9:function(t,i,e){var a=e("24fb");i=a(!1),i.push([t.i,".content[data-v-b21baeb8]{width:%?790?%;height:%?120?%;margin:auto;position:relative;display:flex;align-items:center;justify-content:center}.value[data-v-b21baeb8]{color:#fa562b;font-size:%?45?%;font-weight:700;position:absolute;left:0;top:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center}",""]),t.exports=i}}]);