1 line
15 KiB
JavaScript
1 line
15 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-scap-scratch"],{"0c90":function(t,n,i){var a=i("24fb");n=a(!1),n.push([t.i,"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/* pages/scratch/scratch.wxss */.box[data-v-51293d75]{width:%?552?%;height:%?300?%;position:relative}.box uni-image[data-v-51293d75],\n.box uni-canvas[data-v-51293d75],\n.gj_btn[data-v-51293d75]{width:100%;height:100%;position:absolute;left:0;top:0}.gj_btn[data-v-51293d75]{display:flex;justify-content:center;align-items:center;background:#ddd}.gj_btn uni-button[data-v-51293d75]{box-sizing:border-box;background:none;border:transparent solid 1px}\n/* 222222222222222222222 */uni-page-body[data-v-51293d75]{background:#f9af64!important}body.?%PAGE?%[data-v-51293d75]{background:#f9af64!important}.content[data-v-51293d75]{width:100%;background-image:url(http://jifenshop1.test.86698.cn/api/static/images/bgg.png);background-size:100% 100%;height:%?1500?%}.t1[data-v-51293d75]{overflow-x:hidden}.marquee[data-v-51293d75]{width:100%;align-items:center;color:#3a3a3a;display:flex;box-sizing:border-box;overflow:hidden}.marquee_title[data-v-51293d75]{padding:0 20px;height:21px;font-size:14px;border-right:1px solid #d8d8d8;align-items:center}.marquee_box[data-v-51293d75]{display:block;position:relative;width:100%;overflow:hidden;margin:0 auto;height:%?490?%}.marquee_list[data-v-51293d75]{display:block;position:absolute;top:0;left:50%;-webkit-transform:translate(-50%);transform:translate(-50%);width:calc(100% - %?150?%)}.marquee_top[data-v-51293d75]{transition:all 1s;margin-top:-30px}.tagr[data-v-51293d75]{width:%?159?%;height:%?44?%;background:linear-gradient(180deg,#fff2ba,#f14a1a);border-radius:%?22?% %?0?% %?0?% %?22?%}.mask[data-v-51293d75]{background:rgba(0,0,0,.6);width:100%;height:100vh;position:fixed;left:0;top:0;z-index:10}.mk2[data-v-51293d75]{background-image:url(http://jifenshop1.test.86698.cn/api/static/images/zj.png);background-size:100% 100%;width:%?494?%;height:%?684?%}.btnl[data-v-51293d75]{background-image:url(http://jifenshop1.test.86698.cn/api/static/images/btn.png);background-size:100% 100%;width:%?218?%;height:%?76?%}.mk[data-v-51293d75]{background-image:url(http://jifenshop1.test.86698.cn/api/static/images/js.png);background-size:100% 100%;width:%?580?%;height:%?716?%}.noq[data-v-51293d75]{width:100%;height:100vh;z-index:555;position:fixed;left:0;top:0;background:none}.neitu[data-v-51293d75]{background-image:url(http://jifenshop1.test.86698.cn/api/static/images/gw.png);background-size:100% 100%}",""]),t.exports=n},"3bd3":function(t,n,i){"use strict";var a=i("a96a"),e=i.n(a);e.a},5e3:function(t,n,i){"use strict";i.d(n,"b",(function(){return a})),i.d(n,"c",(function(){return e})),i.d(n,"a",(function(){}));var a=function(){var t=this,n=t.$createElement,i=t._self._c||n;return i("v-uni-view",[i("v-uni-view",{staticClass:"content"},[t.noq?i("v-uni-view",{staticClass:"noq"}):t._e(),t.ismask?i("v-uni-view",{staticClass:"mask flex_items flex_center",on:{click:function(n){arguments[0]=n=t.$handleEvent(n),t.closemsk.apply(void 0,arguments)}}},[i("v-uni-view",{staticClass:"mk plr50 pos flex_column flex_items"},[i("v-uni-view",{staticClass:"f40 abs bold",staticStyle:{color:"#CA7340",top:"24rpx"}},[t._v("活动规则")]),i("v-uni-view",{staticClass:"plr50 flex_column f24",staticStyle:{color:"#2B6DA8"}},[i("v-uni-view",{staticStyle:{"margin-top":"130rpx"}},[t._v("1.【活动时间】2023年11月1日至2023年12月31日。")]),i("v-uni-view",{staticClass:"mt20"},[t._v("2.【活动内容】此为文字内容此为文字内容此为文字内容此为文字内容此为文字内容此为文字内容此为文字内容此为文字内容此为文字内容此为文字内容此为文字内容此为文字内容此为文字内容。")]),i("v-uni-view",{staticClass:"mt20"},[t._v("3.【活动细则】此为文字内容此为文字内容此为文字内容此为文字内容此为文字内容此为文字内容此为文字内容此为文字内容此为文字内容此为文字内容此为文字内容此为文字内容此为文字内容。")]),i("v-uni-view",{staticClass:"mt20"},[t._v("4【活动细则】此为文字内容此为文字内容此为文字内容此为文字内容此为文字内容此为文字内容此为。")])],1),i("v-uni-image",{staticClass:"abs",staticStyle:{width:"52rpx",height:"52rpx",bottom:"-100rpx"},attrs:{src:t.imgUrl+"cha.png",mode:""},on:{click:function(n){arguments[0]=n=t.$handleEvent(n),t.closemsk.apply(void 0,arguments)}}})],1)],1):t._e(),t.ismask2?i("v-uni-view",{staticClass:"mask flex_items flex_center"},[i("v-uni-view",{staticClass:"mk2 plr50 flex_column flex_items pos"},["很遗憾,没有中奖"==t.jiang?i("v-uni-view",{staticClass:"f36 bold",staticStyle:{color:"#003A6E","margin-top":"150rpx",opacity:"0"}},[t._v("未中奖")]):i("v-uni-view",{staticClass:"f36 bold",staticStyle:{color:"#003A6E","margin-top":"150rpx"}},[t._v("恭喜您获得")]),i("v-uni-view",{staticClass:"mt40 f40",staticStyle:{color:"#003A6E"}},[t._v(t._s(t.jiang))]),i("v-uni-view",{staticClass:"mt30 f24",staticStyle:{color:"#003A6E"}},[t._v("请到【我的奖品】中查看")]),i("v-uni-view",{staticClass:"flex_items flex_center btnl mt40",on:{click:function(n){arguments[0]=n=t.$handleEvent(n),t.gomyp.apply(void 0,arguments)}}},[i("v-uni-text",{staticClass:"f32",staticStyle:{color:"#fff"}},[t._v("确认")])],1),i("v-uni-image",{staticClass:"abs",staticStyle:{width:"52rpx",height:"52rpx",bottom:"-100rpx"},attrs:{src:t.imgUrl+"cha.png",mode:""},on:{click:function(n){arguments[0]=n=t.$handleEvent(n),t.closemsk.apply(void 0,arguments)}}})],1)],1):t._e(),i("v-uni-view",{staticClass:"flex_column flex_items t1"},[i("v-uni-view",{staticStyle:{"margin-top":"540rpx"}},[i("v-uni-image",{staticStyle:{width:"600rpx",height:"126rpx"},attrs:{src:t.imgUrl+"xy.png"}})],1),i("v-uni-image",{staticStyle:{width:"300rpx",height:"60rpx"},attrs:{src:t.imgUrl+"chu.png",mode:""}}),i("v-uni-view",{staticClass:"flex_items flex_center mt60 pos",staticStyle:{width:"100%"}},[i("v-uni-view",{staticClass:"pos flex_column flex_items",staticStyle:{width:"100%"}},[i("v-uni-image",{staticStyle:{width:"430rpx",height:"330rpx","z-index":"1"},attrs:{src:t.imgUrl+"lw.png",mode:""}}),i("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:""}}),i("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),i("v-uni-view",{staticClass:"flex_column flex_items mt30 abs",staticStyle:{right:"0",top:"0rpx"}},[i("v-uni-view",{staticClass:"tagr flex_items flex_center",staticStyle:{color:"#fff","z-index":"8"},on:{click:function(n){arguments[0]=n=t.$handleEvent(n),t.openmask.apply(void 0,arguments)}}},[i("v-uni-text",{staticClass:"f24"},[t._v("活动规则")]),i("v-uni-image",{staticClass:"ml10",staticStyle:{width:"22rpx",height:"20rpx"},attrs:{src:t.imgUrl+"rightg.png",mode:""}})],1),i("v-uni-view",{staticClass:"tagr flex_items flex_center mt20",staticStyle:{color:"#fff","z-index":"8"},on:{click:function(n){arguments[0]=n=t.$handleEvent(n),t.gomyp.apply(void 0,arguments)}}},[i("v-uni-text",{staticClass:"f24"},[t._v("我的奖品")]),i("v-uni-image",{staticClass:"ml10",staticStyle:{width:"22rpx",height:"20rpx"},attrs:{src:t.imgUrl+"rightg.png",mode:""}})],1)],1)],1),i("v-uni-view",{staticClass:"gw pos",staticStyle:{"margin-top":"100rpx",background:"#FCC988","z-index":"8"}},[i("v-uni-view",{staticClass:"flex_items flex_center neitu",staticStyle:{width:"600rpx",height:"360rpx"}},[i("v-uni-view",{staticClass:"box flex_items flex_center"},[i("v-uni-view",{staticClass:"flex_items flex_center"},[i("v-uni-text",{staticClass:"bold f44",staticStyle:{color:"#FE5F38"}},[t._v(t._s(t.jiang))])],1),i("v-uni-canvas",{attrs:{"disable-scroll":"false","canvas-id":"ddmmo",id:"ddmmo"},on:{touchstart:function(n){arguments[0]=n=t.$handleEvent(n),t.touchStart.apply(void 0,arguments)},touchmove:function(n){arguments[0]=n=t.$handleEvent(n),t.touchMove.apply(void 0,arguments)},touchend:function(n){arguments[0]=n=t.$handleEvent(n),t.touchEnd.apply(void 0,arguments)}}})],1)],1),t.showGjBth?i("v-uni-cover-view",{staticClass:"gj_btn",staticStyle:{"z-index":"5",width:"100%",height:"360rpx",background:"transparent"},on:{click:function(n){arguments[0]=n=t.$handleEvent(n),t.gj.apply(void 0,arguments)}}},[i("v-uni-cover-view",{staticClass:"bold f50",staticStyle:{color:"#B79A94"}},[t._v("点击开始刮奖")])],1):t._e()],1),i("v-uni-view",{staticClass:"mt50 flex_column flex_items",staticStyle:{width:"100%"}},[i("v-uni-text",{staticClass:"bolder f40",staticStyle:{color:"#E57524"}},[t._v("中奖名单")]),i("v-uni-view",{staticClass:"mt30 ptb30",staticStyle:{width:"calc(100% - 120rpx)",background:"#FFE9B8","border-radius":"20rpx",border:"4rpx solid #fff"}},[i("div",{staticClass:"marquee"},[i("div",{ref:"marquee_box",staticClass:"marquee_box"},[i("div",{staticClass:"marquee_list",class:{marquee_top:t.animate}},[i("div",{},t._l(t.zjlist,(function(n,a){return i("div",{key:a,staticClass:"mt30 flex_start flex_items pb30",staticStyle:{width:"100%",color:"#E57524"}},[i("v-uni-text",{staticClass:"f24 ml10"},[t._v("恭喜:"+t._s(n.user_name)+"的用户获得")]),i("v-uni-text",{staticClass:"f24"},[t._v(t._s(n.prize))])],1)})),0)])])])]),i("v-uni-view",{staticStyle:{width:"100%",height:"260rpx","margin-top":"12rpx"}},[i("v-uni-image",{staticStyle:{width:"100%",height:"260rpx"},attrs:{src:t.imgUrl+"yun.png",mode:""}})],1)],1)],1)],1),i("Ywatermark",{attrs:{info:"蓝色兄弟"}})],1)},e=[]},"76fd":function(t,n,i){"use strict";i.r(n);var a=i("5000"),e=i("88f0");for(var s in e)["default"].indexOf(s)<0&&function(t){i.d(n,t,(function(){return e[t]}))}(s);i("3bd3");var r=i("f0c5"),o=Object(r["a"])(e["default"],a["b"],a["c"],!1,null,"51293d75",null,!1,a["a"],void 0);n["default"]=o.exports},"88f0":function(t,n,i){"use strict";i.r(n);var a=i("a642"),e=i.n(a);for(var s in a)["default"].indexOf(s)<0&&function(t){i.d(n,t,(function(){return a[t]}))}(s);n["default"]=e.a},a642:function(t,n,i){"use strict";i("7a82");var a=i("4ea4").default;Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0,i("14d9"),i("acd8");var e=a(i("b85c")),s=a(i("c7eb")),r=a(i("1da1")),o=(i("e932"),{data:function(){return{showGjBth:!0,again:!1,imgUrl:"",freeNum:0,prizeList:[],zjlist:[],animate:!1,showNum:3,ismask:!1,ismask2:!1,jiang:"",ctx:{},show:!1,width:300,height:300,maskColor:"#ddd",size:15,r:15,area:"",scale:.5,totalArea:0,clearPoints:[]}},onLoad:function(t){this.acid=t.id,this.imgUrl=this.api.imgUrl,this.getPrizeList()},created:function(){setInterval(this.showMarquee,2e3)},mounted:function(){this.ctx=uni.createCanvasContext("ddmmo",this),this.totalArea=this.width*this.height,this.area=this.r*this.r,this.ctx.setFillStyle(this.maskColor),this.ctx.fillRect(0,0,this.width,this.height),this.ctx.draw(),this.show=!1,this.$refs.marquee_box.style.height=30*this.showNum+"px"},methods:{getPrizeList:function(){var t=this;return(0,r.default)((0,s.default)().mark((function n(){return(0,s.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:uni.showLoading({title:"加载中..."}),t.api.getdatas({id:t.acid}).then((function(n){console.log(n),200==n.data.code?(t.zjlist=n.data.data.win_list,t.prizeList=n.data.data.prizes,t.getover()):uni.showToast({title:n.data.message,icon:"none"})}));case 2:case"end":return n.stop()}}),n)})))()},getover:function(){var t=this;t.api.getover({id:t.acid}).then((function(n){console.log(n),200==n.data.code?(uni.hideLoading(),0==n.data.data.length?t.jiang="很遗憾,没有中奖":t.jiang="恭喜,获得"+n.data.data.name):uni.showToast({title:n.data.message,icon:"none"})}))},gj:function(){this.showGjBth=!1,this.again=!1},clearCanvas:function(){this.again||console.log("刮卡已刮干净啦!"),this.ismask2=!0,this.again=!0},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})},drawMask:function(){this.ctx.setFillStyle(this.maskColor),this.ctx.fillRect(0,0,this.width,this.height),this.ctx.draw()},touchStart:function(t){this.eraser(t,!0)},touchMove:function(t){this.eraser(t,!1)},touchEnd:function(t){this.show&&(this.clearCanvas(),this.ctx.clearRect(0,0,this.width,this.height),this.ctx.draw())},eraser:function(t,n){var i=this.clearPoints.length,a=0,s=t.touches[0].x,r=t.touches[0].y,o=s-this.size,c=r-this.size;n&&this.clearPoints.push({x1:o,y1:c,x2:o+this.r,y2:c+this.r});var l,d=(0,e.default)(this.clearPoints);try{for(d.s();!(l=d.n()).done;){var h=l.value;if(!(h.x1>s||h.y1>r||h.x2<s||h.y2<r))break;a++}}catch(v){d.e(v)}finally{d.f()}i===a&&this.clearPoints.push({x1:o,y1:c,x2:o+this.r,y2:c+this.r});var u;u=parseFloat(this.r*this.r*i)/parseFloat(this.scale*this.totalArea),this.show||(this.clearNum=parseFloat(this.r*this.r*i)/parseFloat(this.scale*this.totalArea)),u>.2&&(this.show=!0),this.clearArcFun(s,r,this.r,this.ctx),this.ctx.draw(!0)},clearArcFun:function(t,n,i,a){var e=1;(function t(n,i,s){var r=s-e,o=Math.sqrt(s*s-r*r),c=n-r,l=i-o,d=2*r,h=2*o;e<=s&&(a.clearRect(c,l,d,h),e+=1,t(n,i,s))})(t,n,i)}}});n.default=o},a96a:function(t,n,i){var a=i("0c90");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var e=i("4f06").default;e("da109f00",a,!0,{sourceMap:!1,shadowMode:!1})},b85c:function(t,n,i){"use strict";i("7a82"),Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(t,n){var i="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=(0,a.default)(t))||n&&t&&"number"===typeof t.length){i&&(t=i);var e=0,s=function(){};return{s:s,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,c=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return o=t.done,t},e:function(t){c=!0,r=t},f:function(){try{o||null==i["return"]||i["return"]()}finally{if(c)throw r}}}},i("a4d3"),i("e01a"),i("d3b7"),i("d28b"),i("3ca3"),i("ddb0"),i("d9e2"),i("d401");var a=function(t){return t&&t.__esModule?t:{default:t}}(i("06c5"))}}]); |