CRMEB/crmeb/public/static/js/pages-activity-poster-poster-index.de53bc17.js
2022-03-23 19:55:36 +08:00

1 line
9.5 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-activity-poster-poster-index"],{"0e8f":function(t,e,n){"use strict";var i=n("4ea4");n("99af"),Object.defineProperty(e,"__esModule",{value:!0}),e.getCombinationList=r,e.getCombinationDetail=o,e.getCombinationPink=u,e.postCombinationRemove=s,e.getBargainList=c,e.getCombinationBannerList=l,e.getPink=d,e.getBargainUserList=f,e.getBargainDetail=g,e.postBargainStartUser=p,e.postBargainStart=h,e.postBargainHelp=v,e.postBargainHelpPrice=m,e.postBargainHelpList=b,e.postBargainHelpCount=w,e.postBargainShare=k,e.getSeckillIndexTime=x,e.getSeckillList=C,e.getSeckillDetail=y,e.getBargainPoster=B,e.getCombinationPoster=P,e.getBargainUserCancel=_,e.seckillCode=S,e.scombinationCode=I,e.getCombinationPosterData=T,e.getBargainPosterData=D,e.integralOrderConfirm=z,e.integralOrderCreate=L,e.integralOrderDetails=$,e.getIntegralProductDetail=O,e.getStoreIntegralList=R,e.getIntegralOrderList=M,e.getLogisticsDetails=A,e.orderTake=U,e.orderDel=F,e.getPresellList=j;var a=i(n("f75a"));function r(t){return a.default.get("combination/list",t,{noAuth:!0})}function o(t){return a.default.get("combination/detail/"+t)}function u(t){return a.default.get("combination/pink/"+t)}function s(t){return a.default.post("combination/remove",t)}function c(t){return a.default.get("bargain/list",t,{noAuth:!0})}function l(t){return a.default.get("combination/banner_list",t,{noAuth:!0})}function d(t){return a.default.get("pink",t,{noAuth:!0})}function f(t){return a.default.get("bargain/user/list",t)}function g(t,e){return a.default.get("bargain/detail/".concat(t,"?bargainUid=").concat(e))}function p(t){return a.default.post("bargain/start/user",t)}function h(t){return a.default.post("bargain/start",{bargainId:t})}function v(t){return a.default.post("bargain/help",t)}function m(t){return a.default.post("bargain/help/price",t)}function b(t){return a.default.post("bargain/help/list",t)}function w(t){return a.default.post("bargain/help/count",t)}function k(t){return a.default.post("bargain/share",{bargainId:t})}function x(){return a.default.get("seckill/index",{},{noAuth:!0})}function C(t,e){return a.default.get("seckill/list/"+t,e,{noAuth:!0})}function y(t,e){return a.default.get("seckill/detail/"+t,e)}function B(t){return a.default.post("bargain/poster",t)}function P(t){return a.default.post("combination/poster",t)}function _(t){return a.default.post("bargain/user/cancel",t)}function S(t,e){return a.default.get("seckill/code/"+t,e)}function I(t){return a.default.get("combination/code/"+t)}function T(t){return a.default.get("combination/poster_info/"+t)}function D(t){return a.default.get("bargain/poster_info/"+t)}function z(t){return a.default.post("store_integral/order/confirm",t)}function L(t){return a.default.post("store_integral/order/create",t)}function $(t){return a.default.get("store_integral/order/detail/".concat(t))}function O(t){return a.default.get("store_integral/detail/"+t,{},{noAuth:!0})}function R(t){return a.default.get("store_integral/list",t)}function M(t){return a.default.get("store_integral/order/list",t)}function A(t){return a.default.get("store_integral/order/express/".concat(t))}function U(t){return a.default.post("store_integral/order/take",t)}function F(t){return a.default.post("store_integral/order/del",t)}function j(t){return a.default.get("advance/list",t)}},"30f7":function(t,e,n){"use strict";var i=n("4434"),a=n.n(i);a.a},4434:function(t,e,n){var i=n("db14");"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var a=n("4f06").default;a("6779bcf0",i,!0,{sourceMap:!1,shadowMode:!1})},"7d90":function(t,e,n){"use strict";n.r(e);var i=n("9e0c"),a=n.n(i);for(var r in i)"default"!==r&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e["default"]=a.a},"9e0c":function(t,e,n){"use strict";var i=n("4ea4");n("c975"),n("d3b7"),n("ac1f"),n("25f0"),n("5319"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n("96cf");var a=i(n("1da1")),r=i(n("eacb")),o=n("0e8f"),u=n("b79f"),s=i(n("5411")),c={components:{zbCode:r.default},mixins:[s.default],data:function(){return{canvasStatus:!0,posterImage:"",parameter:{navbar:"1",return:"1",title:"拼团海报",color:!0,class:"0"},type:0,id:0,bargain:0,image:"",from:"",uid:"",codeShow:!1,cid:"1",ifShow:!0,val:"",size:200,unit:"upx",background:"#FFF",foreground:"#000",pdground:"#000",icon:"",iconsize:40,lv:3,onval:!0,loadMake:!0,src:"",codeSrc:"",wd:0,hg:0,posterBag:"../static/posterBag.png",mpUrl:""}},onLoad:function(t){this.from="wechat";if(!t.hasOwnProperty("type")||!t.hasOwnProperty("id"))return app.Tips({title:"参数错误",icon:"none"},{tab:3,url:1});this.type=t.type,this.id=t.id,1==t.type?(this.bargain=t.bargain,uni.setNavigationBarTitle({title:"砍价海报"})):uni.setNavigationBarTitle({title:"拼团海报"})},onReady:function(){var t=this;1==this.type?this.val=window.location.origin+"/pages/activity/goods_bargain_details/index?id="+this.id+"&bargain="+this.$store.state.app.uid+"&spread="+this.$store.state.app.uid:2==this.type&&(this.val=window.location.origin+"/pages/activity/goods_combination_status/index?id="+this.id+"&spread="+this.$store.state.app.uid),setTimeout((function(e){t.getPosterInfo()}),200),this.$nextTick((function(){var t=this,e=uni.createSelectorQuery().select(".pictrue");e.fields({size:!0},(function(e){t.wd=e.width,t.hg=e.height})).exec()})),this.routineCode()},methods:{getPosterInfo:function(){var t=this;return(0,a.default)(regeneratorRuntime.mark((function e(){var n,i,a,r,s,c;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=t,"",{id:n.id,from:n.from},e.next=4,(0,u.getUserInfo)();case 4:if(i=e.sent,t.uid=i.data.uid,uni.showLoading({title:"海报生成中",mask:!0}),1!=n.type){e.next=12;break}return e.next=10,(0,o.getBargainPosterData)(n.id).then((function(t){s=t.data})).catch((function(t){n.$util.Tips({title:"海报图片获取失败"})}));case 10:e.next=14;break;case 12:return e.next=14,(0,o.getCombinationPosterData)(n.id).then((function(t){s=t.data})).catch((function(t){n.$util.Tips({title:"海报图片获取失败"})}));case 14:return e.next=16,t.imgToBase(s.image);case 16:return a=e.sent,e.next=19,t.imgToBase(s.url);case 19:r=e.sent,c=[t.posterBag,a,r||t.codeSrc],t.$nextTick((function(e){n.$util.bargainPosterCanvas(c,s.title,s.label,s.msg,s.price,t.wd,t.hg,(function(e){t.posterImage=e}))}));case 22:case"end":return e.stop()}}),e)})))()},routineCode:function(){var t=this;return(0,a.default)(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,(0,u.routineCode)();case 2:n=e.sent,t.mpUrl=n.data.url;case 4:case"end":return e.stop()}}),e)})))()},downloadFilestoreImage:function(t){var e=this;return t=this.setDomain(t),new Promise((function(n,i){var a=e;uni.downloadFile({url:t,success:function(t){n(t.tempFilePath)},fail:function(){return a.$util.Tips({title:""})}})}))},setDomain:function(t){return t=t?t.toString():"",t.indexOf("https://")>-1?t:t.replace("http://","https://")},imgToBase:function(t){return(0,a.default)(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,(0,u.imgToBase)({image:t});case 2:return n=e.sent,e.abrupt("return",n.data.image);case 4:case"end":return e.stop()}}),e)})))()},downloadImg:function(){},savePosterPathMp:function(t){var e=document.createElement("a");e.download="海报",e.href=t,document.body.appendChild(e),e.click()},qrR:function(t){this.codeSrc=t}}};e.default=c},db14:function(t,e,n){var i=n("24fb");e=i(!1),e.push([t.i,".posterCon[data-v-0f54c858]{position:fixed;top:0;width:100%;left:0;height:100%;background-color:var(--view-theme);bottom:0;overflow-y:auto}.poster-poster .tip[data-v-0f54c858]{height:%?80?%;font-size:%?26?%;color:#e8c787;text-align:center;line-height:%?80?%;-webkit-user-select:none;user-select:none}.poster-poster .tip .iconfont[data-v-0f54c858]{font-size:%?36?%;vertical-align:%?-4?%;margin-right:%?18?%}.canvas[data-v-0f54c858]{width:100%;height:%?1100?%}.poster-poster .pictrue[data-v-0f54c858]{width:%?700?%;\n\t/* height: 100%; */margin:0 auto %?50?% auto;display:flex;justify-content:center}.poster-poster .pictrue uni-image[data-v-0f54c858]{width:100%\n\t/* height: 100%; */}",""]),t.exports=e},f0288:function(t,e,n){"use strict";n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return r})),n.d(e,"a",(function(){return i}));var i={zbCode:n("eacb").default},a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",{staticClass:"posterCon",style:t.colorStyle},[n("v-uni-view",{staticClass:"poster-poster"},[n("v-uni-view",{staticClass:"tip"},[n("v-uni-text",{staticClass:"iconfont icon-shuoming"}),t._v("提示:点击图片即可保存至手机相册")],1),n("v-uni-view",{staticClass:"pictrue"},[t.posterImage?n("v-uni-image",{staticClass:"canvas",attrs:{src:t.posterImage},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.savePosterPathMp(t.posterImage)}}}):n("v-uni-canvas",{staticClass:"canvas",attrs:{"canvas-id":"myCanvas"}})],1)],1),n("zb-code",{ref:"qrcode",attrs:{show:t.codeShow,cid:t.cid,val:t.val,size:t.size,unit:t.unit,background:t.background,foreground:t.foreground,pdground:t.pdground,icon:t.icon,iconSize:t.iconsize,onval:t.onval,loadMake:t.loadMake},on:{result:function(e){arguments[0]=e=t.$handleEvent(e),t.qrR.apply(void 0,arguments)}}})],1)},r=[]},f35e:function(t,e,n){"use strict";n.r(e);var i=n("f0288"),a=n("7d90");for(var r in a)"default"!==r&&function(t){n.d(e,t,(function(){return a[t]}))}(r);n("30f7");var o,u=n("f0c5"),s=Object(u["a"])(a["default"],i["b"],i["c"],!1,null,"0f54c858",null,!1,i["a"],o);e["default"]=s.exports}}]);