pagesA-my-fx-poster.9f06340f.js 28 KB

12
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pagesA-my-fx-poster"],{"0499":function(t,e,r){"use strict";r.d(e,"b",(function(){return n})),r.d(e,"c",(function(){return a})),r.d(e,"a",(function(){}));var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("v-uni-button",{staticClass:"tui-btn",class:[t.plain?"tui-"+t.type+"-outline":"tui-btn-"+(t.type||"primary"),t.getDisabledClass(t.disabled,t.type,t.plain),t.getShapeClass(t.shape,t.plain),t.getShadowClass(t.type,t.shadow,t.plain),t.bold?"tui-text-bold":"",t.link?"tui-btn__link":""],style:{width:t.width,height:t.height,lineHeight:t.height,fontSize:t.size+"rpx",margin:t.margin},attrs:{"hover-class":t.getHoverClass(t.disabled,t.type,t.plain),loading:t.loading,"form-type":t.formType,"open-type":t.openType,disabled:t.disabled},on:{getuserinfo:function(e){arguments[0]=e=t.$handleEvent(e),t.bindgetuserinfo.apply(void 0,arguments)},getphonenumber:function(e){arguments[0]=e=t.$handleEvent(e),t.bindgetphonenumber.apply(void 0,arguments)},contact:function(e){arguments[0]=e=t.$handleEvent(e),t.bindcontact.apply(void 0,arguments)},error:function(e){arguments[0]=e=t.$handleEvent(e),t.binderror.apply(void 0,arguments)},click:function(e){arguments[0]=e=t.$handleEvent(e),t.handleClick.apply(void 0,arguments)}}},[t._t("default")],2)},a=[]},"0615":function(t,e,r){"use strict";r.r(e);var n=r("0cb8"),a=r.n(n);for(var i in n)["default"].indexOf(i)<0&&function(t){r.d(e,t,(function(){return n[t]}))}(i);e["default"]=a.a},"0cb8":function(t,e,r){"use strict";r("7a82");var n=r("4ea4").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=n(r("c7eb")),i=n(r("1da1")),o=r("89c5"),u={components:{},data:function(){return{loadding:!0,buttonshow:!1,posterImg:"",winWidth:uni.upx2px(1380),winHeight:uni.upx2px(2126)}},onLoad:function(){},onShow:function(){var t=this;uni.getStorage({key:"userinfo",success:function(e){t.userinfo=e.data}}),t.createPoster()},methods:{createPoster:function(){var t=this;return(0,i.default)((0,a.default)().mark((function e(){var r,n,i,u,d,c,l;return(0,a.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(r=t,!t.posterImg){e.next=4;break}return t.modalShow=!0,e.abrupt("return");case 4:return uni.showLoading({mask:!0,title:"图片生成中..."}),e.next=7,r.$request.get("agent.poster",{samkey:(new Date).valueOf()});case 7:return n=e.sent,e.next=10,o.getImage(n.data.poster);case 10:return i=e.sent,e.next=13,o.getImage(n.data.qrcode);case 13:u=e.sent,i&&u?(d={mainPic:i,qrcode:u},c=n.data.nickName,l=n.data.sitename,o.drawPoster("posterId",t.winWidth,t.winHeight,d,c,l,(function(e){uni.hideLoading(),t.loadding=!1,t.buttonshow=!0,e?(t.posterImg=e,setTimeout((function(){t.modalShow=!0}),60)):t.tui.toast("生成海报失败,请稍后再试")}))):(uni.hideLoading(),t.tui.toast("生成海报图片下载失败,请稍后再试"));case 15:case"end":return e.stop()}}),e)})))()},savePic:function(){this.posterImg&&uni.previewImage({urls:[this.posterImg]})}},onPullDownRefresh:function(){setTimeout((function(){uni.stopPullDownRefresh()}),200)}};e.default=u},"150e":function(t,e,r){"use strict";r.d(e,"b",(function(){return a})),r.d(e,"c",(function(){return i})),r.d(e,"a",(function(){return n}));var n={tuiLoading:r("c82d").default,tuiButton:r("a057").default},a=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("v-uni-view",[r("v-uni-view"),t.loadding?r("tui-loading",{attrs:{text:"海报生成中"}}):t._e(),r("v-uni-canvas",{staticClass:"tui-poster__canvas",style:{width:t.winWidth+"px",height:t.winHeight+"px"},attrs:{"canvas-id":"posterId",id:"posterId"}}),r("v-uni-view",{staticClass:"tui-poster__box"},[t.posterImg?r("v-uni-image",{staticClass:"tui-poster__img",attrs:{src:t.posterImg}}):t._e(),t.buttonshow?r("tui-button",{staticClass:"tui-poster__button",attrs:{type:"danger",width:"460rpx",height:"80rpx",shape:"circle"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.savePic.apply(void 0,arguments)}}},[t._v("保存图片")]):t._e()],1)],1)},i=[]},"1f3b":function(t,e,r){"use strict";r.d(e,"b",(function(){return n})),r.d(e,"c",(function(){return a})),r.d(e,"a",(function(){}));var n=function(){var t=this.$createElement,e=this._self._c||t;return e("v-uni-view",{staticClass:"tui-loading-init"},[e("v-uni-view",{staticClass:"tui-loading-center"}),e("v-uni-view",{staticClass:"tui-loadmore-tips"},[this._v(this._s(this.text))])],1)},a=[]},"384a":function(t,e,r){"use strict";var n=r("c2b6"),a=r.n(n);a.a},"4e15":function(t,e,r){"use strict";r("7a82"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={name:"tuiLoading",props:{text:{type:String,default:"正在加载..."}}};e.default=n},5237:function(t,e,r){var n=r("24fb");e=n(!1),e.push([t.i,'.tui-btn-primary[data-v-0eb7194e]{background:#5677fc!important;color:#fff}.tui-shadow-primary[data-v-0eb7194e]{box-shadow:0 %?10?% %?14?% 0 rgba(86,119,252,.2)}.tui-btn-danger[data-v-0eb7194e]{background:#eb0909!important;color:#fff}.tui-shadow-danger[data-v-0eb7194e]{box-shadow:0 %?10?% %?14?% 0 rgba(235,9,9,.2)}.tui-btn-warning[data-v-0eb7194e]{background:#fc872d!important;color:#fff}.tui-shadow-warning[data-v-0eb7194e]{box-shadow:0 %?10?% %?14?% 0 rgba(252,135,45,.2)}.tui-btn-green[data-v-0eb7194e]{background:#07c160!important;color:#fff}.tui-shadow-green[data-v-0eb7194e]{box-shadow:0 %?10?% %?14?% 0 rgba(7,193,96,.2)}.tui-btn-blue[data-v-0eb7194e]{background:#007aff!important;color:#fff}.tui-shadow-blue[data-v-0eb7194e]{box-shadow:0 %?10?% %?14?% 0 rgba(0,122,255,.2)}.tui-btn-white[data-v-0eb7194e]{background:#fff!important;color:#333!important}.tui-btn-gray[data-v-0eb7194e]{background:#bfbfbf!important;color:#fff!important}.tui-btn-black[data-v-0eb7194e]{background:#333!important;color:#fff!important}.tui-btn-brown[data-v-0eb7194e]{background:#ac9157!important;color:#fff!important}.tui-btn-gray-black[data-v-0eb7194e]{background:#f2f2f2!important;color:#333}.tui-btn-gray-primary[data-v-0eb7194e]{background:#f2f2f2!important;color:#5677fc!important}.tui-gray-primary-hover[data-v-0eb7194e]{background:#d9d9d9!important}.tui-btn-gray-green[data-v-0eb7194e]{background:#f2f2f2!important;color:#07c160!important}.tui-gray-green-hover[data-v-0eb7194e]{background:#d9d9d9!important}.tui-btn-gray-danger[data-v-0eb7194e]{background:#f2f2f2!important;color:#eb0909!important}.tui-gray-danger-hover[data-v-0eb7194e]{background:#d9d9d9!important}.tui-btn-gray-warning[data-v-0eb7194e]{background:#f2f2f2!important;color:#fc872d!important}.tui-gray-warning-hover[data-v-0eb7194e]{background:#d9d9d9!important}.tui-shadow-gray[data-v-0eb7194e]{box-shadow:0 %?10?% %?14?% 0 hsla(0,0%,74.9%,.2)}.tui-hover-gray[data-v-0eb7194e]{background:#f7f7f9!important}.tui-black-hover[data-v-0eb7194e]{background:#555!important;color:#e5e5e5!important}.tui-brown-hover[data-v-0eb7194e]{background:#a37f49!important;color:#e5e5e5!important}\r\n\r\n/* button start*/.tui-btn[data-v-0eb7194e]{width:100%;position:relative;border:0!important;border-radius:%?6?%;padding-left:0;padding-right:0;overflow:visible}.tui-btn[data-v-0eb7194e]::after{content:"";position:absolute;width:200%;height:200%;-webkit-transform-origin:0 0;transform-origin:0 0;-webkit-transform:scale(.5) translateZ(0);transform:scale(.5) translateZ(0);box-sizing:border-box;left:0;top:0;border-radius:%?12?%;border:0}.tui-text-bold[data-v-0eb7194e]{font-weight:700}.tui-btn-white[data-v-0eb7194e]::after{border:1px solid #bfbfbf}.tui-white-hover[data-v-0eb7194e]{background:#e5e5e5!important;color:#2e2e2e!important}.tui-dark-disabled[data-v-0eb7194e]{opacity:.6!important;color:#fafbfc!important}.tui-dark-disabled-outline[data-v-0eb7194e]{opacity:.5!important}.tui-gray-disabled[data-v-0eb7194e]{background:#f3f3f3!important;color:#919191!important;box-shadow:none}.tui-outline-hover[data-v-0eb7194e]{opacity:.5}.tui-primary-hover[data-v-0eb7194e]{background:#4a67d6!important;color:#e5e5e5!important}.tui-primary-outline[data-v-0eb7194e]::after{border:1px solid #5677fc!important}.tui-primary-outline[data-v-0eb7194e]{color:#5677fc!important;background:transparent}.tui-danger-hover[data-v-0eb7194e]{background:#c80808!important;color:#e5e5e5!important}.tui-danger-outline[data-v-0eb7194e]{color:#eb0909!important;background:transparent}.tui-danger-outline[data-v-0eb7194e]::after{border:1px solid #eb0909!important}.tui-warning-hover[data-v-0eb7194e]{background:#d67326!important;color:#e5e5e5!important}.tui-warning-outline[data-v-0eb7194e]{color:#fc872d!important;background:transparent}.tui-warning-outline[data-v-0eb7194e]::after{border:1px solid #fc872d!important}.tui-green-hover[data-v-0eb7194e]{background:#06ad56!important;color:#e5e5e5!important}.tui-green-outline[data-v-0eb7194e]{color:#07c160!important;background:transparent}.tui-green-outline[data-v-0eb7194e]::after{border:1px solid #07c160!important}.tui-blue-hover[data-v-0eb7194e]{background:#0062cc!important;color:#e5e5e5!important}.tui-blue-outline[data-v-0eb7194e]{color:#007aff!important;background:transparent}.tui-blue-outline[data-v-0eb7194e]::after{border:1px solid #007aff!important}\n.tui-btn-gradual[data-v-0eb7194e]{background:linear-gradient(90deg,#ff5926,#f00e2c)!important;color:#fff!important}.tui-shadow-gradual[data-v-0eb7194e]{box-shadow:0 %?10?% %?14?% 0 rgba(235,9,9,.15)}\n.tui-gray-hover[data-v-0eb7194e]{background:#a3a3a3!important;color:#898989}\n.tui-gradual-hover[data-v-0eb7194e]{background:linear-gradient(90deg,#d74620,#cd1225)!important;color:#fff!important}\n.tui-gray-outline[data-v-0eb7194e]{color:#999!important;background:transparent!important}.tui-white-outline[data-v-0eb7194e]{color:#fff!important;background:transparent!important}.tui-black-outline[data-v-0eb7194e]{background:transparent!important;color:#333!important}.tui-gray-outline[data-v-0eb7194e]::after{border:1px solid #ccc!important}.tui-white-outline[data-v-0eb7194e]::after{border:1px solid #fff!important}.tui-black-outline[data-v-0eb7194e]::after{border:1px solid #333!important}.tui-brown-outline[data-v-0eb7194e]{color:#ac9157!important;background:transparent}.tui-brown-outline[data-v-0eb7194e]::after{border:1px solid #ac9157!important}\r\n\r\n/*圆角 */.tui-fillet[data-v-0eb7194e]{border-radius:%?50?%}.tui-btn-white.tui-fillet[data-v-0eb7194e]::after{border-radius:%?98?%}.tui-outline-fillet[data-v-0eb7194e]::after{border-radius:%?98?%}\r\n\r\n/*平角*/.tui-rightAngle[data-v-0eb7194e]{border-radius:0}.tui-btn-white.tui-rightAngle[data-v-0eb7194e]::after{border-radius:0}.tui-outline-rightAngle[data-v-0eb7194e]::after{border-radius:0}.tui-btn__link[data-v-0eb7194e]::after{border:0!important}',""]),t.exports=e},"5fcd":function(t,e,r){var n=r("24fb");e=n(!1),e.push([t.i,"uni-image[data-v-0b63e35b]{width:100%;min-height:%?1163?%;display:block;margin:0 auto}.tui-poster__canvas[data-v-0b63e35b]{background-color:#fff;position:absolute;top:-9999px}.tui-poster__box[data-v-0b63e35b]{width:100%;position:relative;display:flex;justify-content:center;align-items:center;flex-direction:column}.tui-poster__img[data-v-0b63e35b]{width:99%}.tui-poster__button[data-v-0b63e35b]{margin-top:%?40?%}",""]),t.exports=e},"7ec2":function(t,e,r){r("7a82"),r("a4d3"),r("e01a"),r("d3b7"),r("d28b"),r("3ca3"),r("ddb0"),r("b636"),r("944a"),r("0c47"),r("23dc"),r("3410"),r("d9e2"),r("d401"),r("14d9"),r("159b"),r("131a"),r("26e9"),r("fb6a");var n=r("7037")["default"];function a(){"use strict";
  2. /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */t.exports=a=function(){return e},t.exports.__esModule=!0,t.exports["default"]=t.exports;var e={},r=Object.prototype,i=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},u="function"==typeof Symbol?Symbol:{},d=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",l=u.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(C){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),u=new L(n||[]);return o(i,"_invoke",{value:S(t,r,u)}),i}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(C){return{type:"throw",arg:C}}}e.wrap=f;var b={};function v(){}function h(){}function g(){}var m={};s(m,d,(function(){return this}));var x=Object.getPrototypeOf,y=x&&x(x(E([])));y&&y!==r&&i.call(y,d)&&(m=y);var w=g.prototype=v.prototype=Object.create(m);function k(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){var r;o(this,"_invoke",{value:function(a,o){function u(){return new e((function(r,u){(function r(a,o,u,d){var c=p(t[a],t,o);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==n(s)&&i.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,u,d)}),(function(t){r("throw",t,u,d)})):e.resolve(s).then((function(t){l.value=t,u(l)}),(function(t){return r("throw",t,u,d)}))}d(c.arg)})(a,o,r,u)}))}return r=r?r.then(u,u):u()}})}function S(t,e,r){var n="suspendedStart";return function(a,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw i;return I()}for(r.method=a,r.arg=i;;){var o=r.delegate;if(o){var u=F(o,r);if(u){if(u===b)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var d=p(t,e,r);if("normal"===d.type){if(n=r.done?"completed":"suspendedYield",d.arg===b)continue;return{value:d.arg,done:r.done}}"throw"===d.type&&(n="completed",r.method="throw",r.arg=d.arg)}}}function F(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator["return"]&&(e.method="return",e.arg=void 0,F(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),b;var a=p(n,t.iterator,e.arg);if("throw"===a.type)return e.method="throw",e.arg=a.arg,e.delegate=null,b;var i=a.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,b):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,b)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function E(t){if(t){var e=t[d];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,n=function e(){for(;++r<t.length;)if(i.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return n.next=n}}return{next:I}}function I(){return{value:void 0,done:!0}}return h.prototype=g,o(w,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:h,configurable:!0}),h.displayName=s(g,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,s(t,l,"GeneratorFunction")),t.prototype=Object.create(w),t},e.awrap=function(t){return{__await:t}},k(_.prototype),s(_.prototype,c,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,a,i){void 0===i&&(i=Promise);var o=new _(f(t,r,n,a),i);return e.isGeneratorFunction(r)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},k(w),s(w,l,"Generator"),s(w,d,(function(){return this})),s(w,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=E,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return o.type="throw",o.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n],o=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var u=i.call(a,"catchLoc"),d=i.call(a,"finallyLoc");if(u&&d){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!d)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=t,o.arg=e,a?(this.method="next",this.next=a.finallyLoc,b):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),b},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),b}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var a=n.arg;P(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:E(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),b}},e}t.exports=a,t.exports.__esModule=!0,t.exports["default"]=t.exports},"85bd":function(t,e,r){var n=r("24fb");e=n(!1),e.push([t.i,".tui-loading-init[data-v-7eb98dfb]{min-width:%?200?%;min-height:%?200?%;max-width:%?500?%;display:flex;align-items:center;justify-content:center;flex-direction:column;position:fixed;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);z-index:9999;font-size:%?26?%;color:#fff;background-color:rgba(0,0,0,.7);border-radius:%?10?%}.tui-loading-center[data-v-7eb98dfb]{width:%?50?%;height:%?50?%;border:3px solid #fff;border-radius:50%;margin:0 6px;display:inline-block;vertical-align:middle;-webkit-clip-path:polygon(0 0,100% 0,100% 40%,0 40%);clip-path:polygon(0 0,100% 0,100% 40%,0 40%);-webkit-animation:rotate-data-v-7eb98dfb 1s linear infinite;animation:rotate-data-v-7eb98dfb 1s linear infinite;margin-bottom:%?36?%}.tui-loadmore-tips[data-v-7eb98dfb]{text-align:center;padding:0 %?20?%;box-sizing:border-box}@-webkit-keyframes rotate-data-v-7eb98dfb{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes rotate-data-v-7eb98dfb{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}",""]),t.exports=e},"89c5":function(t,e,r){var n=r("7ec2").default,a=r("c973").default;r("d401"),r("d3b7"),r("25f0"),r("a9e3"),r("14d9"),r("fb6a"),r("a434"),r("159b"),r("ac1f"),r("5319");var i={drawPoster:function(t,e,r,n,a,o,u){var d=uni.createCanvasContext(t),c=d.createLinearGradient(0,e,r,0);c.addColorStop(0,"#FFF"),c.addColorStop(1,"#FFF"),d.setFillStyle(c),d.fillRect(0,0,e,r);var l=e,s=r-300;d.drawImage(n.mainPic,0,0,l,s);var f=uni.upx2px(40);d.setFontSize(uni.upx2px(50)),d.setFillStyle("#000");for(var p=i.getTextWidth(a,d)||2*uni.upx2px(550),b=e/15,v=i.wrapText(a,Math.floor(p),d),h=0;h<v.length;h++)d.fillText(v[h],e/4+80,r-uni.upx2px(360)+f*h);d.setFontSize(uni.upx2px(36));i.getTextWidth(o,d);d.drawImage(n.qrcode,b,r-uni.upx2px(500),e/4,e/4),d.setFillStyle("#152338"),d.fillText("邀请您加入"+o,e/4+80,r-uni.upx2px(300)),d.setFillStyle("#333"),d.setFontSize(uni.upx2px(24)),d.fillText("长按识别·立即体验",e/4+80,r-uni.upx2px(250)),d.draw(!1,(function(){i.createPoster(t,e,r,(function(t){u&&u(t)}))}))},drawGoodsPoster:function(t,e,r,n,a,o,u,d,c){var l=uni.createCanvasContext(t),s=l.createLinearGradient(0,e,r,0);s.addColorStop(0,"#FFFFFF"),s.addColorStop(1,"#FFFFFF"),l.setFillStyle(s),l.fillRect(0,0,e,r);var f=uni.upx2px(1e3),p=uni.upx2px(1e3);l.drawImage(n.mainPic,(e-f)/2,uni.upx2px(60),f,p);var b=uni.upx2px(80);l.setFontSize(uni.upx2px(60)),l.setFillStyle("#343434");for(var v=uni.upx2px(936),h=i.wrapText(a,Math.floor(v),l,2),g=0;g<h.length;g++)l.fillText(h[g],uni.upx2px(60),uni.upx2px(1160)+b*g);l.setFillStyle("#EB0909"),l.setFontSize(uni.upx2px(52)),l.fillText("¥",uni.upx2px(60),uni.upx2px(1360)),l.setFontSize(uni.upx2px(72));var m=Number(o).toFixed(2).toString().split(".");l.fillText(m[0],uni.upx2px(112),uni.upx2px(1360));var x=i.getTextWidth(m[0],l)||35;if(l.setFontSize(uni.upx2px(52)),l.setFillStyle("#EB0909"),l.fillText(".".concat(m[1]),uni.upx2px(120)+x,uni.upx2px(1360)),l.setFillStyle("#999999"),l.setFontSize(uni.upx2px(48)),u>0){var y=uni.upx2px(152)+x+(i.getTextWidth(".".concat(m[1]),l)||32);l.fillText("¥".concat(u),y,uni.upx2px(1360)),l.moveTo(y,uni.upx2px(1344)),l.lineTo(y+100,uni.upx2px(1344)),l.setStrokeStyle("#999999"),l.stroke()}var w=e-2*uni.upx2px(176);l.drawImage(n.qrcode,w,uni.upx2px(1470),uni.upx2px(260),uni.upx2px(260)),l.setFillStyle("#333"),l.setFontSize(uni.upx2px(64)),l.fillText(d,uni.upx2px(80),uni.upx2px(1560)),l.setFontSize(uni.upx2px(48)),l.fillText("长按识别·立即体验",uni.upx2px(80),uni.upx2px(1670)),l.draw(!1,(function(){i.createPoster(t,e,r,(function(t){c&&c(t)}))}))},createPoster:function(t,e,r,n){uni.canvasToTempFilePath({x:0,y:0,canvasId:t,fileType:"png",quality:1,success:function(t){n&&n(t.tempFilePath)},fail:function(){n&&n(!1)}})},saveImage:function(t){uni.saveImageToPhotosAlbum({filePath:t,success:function(t){uni.showToast({title:"图片保存成功"})}})},getTextWidth:function(t,e){var r=e.measureText(t);return r.width||0},getImage:function(t){return a(n().mark((function e(){return n().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,new Promise((function(e,r){uni.downloadFile({url:t,success:function(t){e(t.tempFilePath)},fail:function(t){r(!1)}})}));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))()},wrapText:function(t,e,r){for(var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2,a=t.split(""),i="",o=[],u=0,d=a.length;u<d;u++)r.measureText(i).width<e?i+=a[u]:(u--,o.push(i),i="");if(o.push(i),o.length>n){for(var c=o.slice(0,n),l=c[n-1],s="",f=[],p=0,b=l.length;p<b;p++){if(!(r.measureText(s).width<e-20))break;s+=l[p]}f.push(s);var v=f[0]+"...";c.splice(n-1,1,v),o=c}return o},removeSavedFile:function(){return a(n().mark((function t(){var e;return n().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e=0,t.next=3,new Promise((function(t,r){uni.getSavedFileList({success:function(r){if(console.log(r),e=r.fileList.length,e>0){var n=0,a=r.fileList||[];a.forEach((function(r){console.log("执行删除文件。。。"),uni.removeSavedFile({filePath:r.filePath,complete:function(r){n++,n===e&&t(!0)}})}))}else t(!0)},fail:function(){r(!1),console.log("执行删除文件失败")}})}));case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t)})))()},getImagebyBase64:function(t){return a(n().mark((function t(){return n().wrap((function(t){while(1)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)})))()},getuuid:function(){var t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){return("x"===t?16*Math.random()|0:8).toString(16)}));return t}};t.exports={drawPoster:i.drawPoster,drawGoodsPoster:i.drawGoodsPoster,getImage:i.getImage,removeSavedFile:i.removeSavedFile,getImagebyBase64:i.getImagebyBase64,saveImage:i.saveImage}},"97b8":function(t,e,r){"use strict";var n=r("e724"),a=r.n(n);a.a},a057:function(t,e,r){"use strict";r.r(e);var n=r("0499"),a=r("f47f");for(var i in a)["default"].indexOf(i)<0&&function(t){r.d(e,t,(function(){return a[t]}))}(i);r("97b8");var o=r("f0c5"),u=Object(o["a"])(a["default"],n["b"],n["c"],!1,null,"0eb7194e",null,!1,n["a"],void 0);e["default"]=u.exports},a4f0:function(t,e,r){var n=r("5fcd");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var a=r("4f06").default;a("ede0f592",n,!0,{sourceMap:!1,shadowMode:!1})},bab1:function(t,e,r){"use strict";r("7a82"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,r("a9e3"),r("c975");var n={name:"tuiButton",behaviors:["wx://form-field-button"],props:{type:{type:String,default:"primary"},shadow:{type:Boolean,default:!1},width:{type:String,default:"100%"},height:{type:String,default:"96rpx"},size:{type:Number,default:32},bold:{type:Boolean,default:!1},margin:{type:String,default:"0"},shape:{type:String,default:"square"},plain:{type:Boolean,default:!1},link:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},disabledGray:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},formType:{type:String,default:""},openType:{type:String,default:""},index:{type:[Number,String],default:0},preventClick:{type:Boolean,default:!1}},data:function(){return{time:0}},methods:{handleClick:function(){var t=this;if(!this.disabled){if(this.preventClick){if((new Date).getTime()-this.time<=200)return;this.time=(new Date).getTime(),setTimeout((function(){t.time=0}),200)}this.$emit("click",{index:Number(this.index)})}},bindgetuserinfo:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.detail,r=void 0===e?{}:e;this.$emit("getuserinfo",r)},bindcontact:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.detail,r=void 0===e?{}:e;this.$emit("contact",r)},bindgetphonenumber:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.detail,r=void 0===e?{}:e;this.$emit("getphonenumber",r)},binderror:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.detail,r=void 0===e?{}:e;this.$emit("error",r)},getShadowClass:function(t,e,r){var n="";return e&&"white"!=t&&!r&&(n="tui-shadow-"+t),n},getDisabledClass:function(t,e,r){var n="";if(t&&"white"!=e&&-1==e.indexOf("-")){var a=this.disabledGray?"tui-gray-disabled":"tui-dark-disabled";n=r?"tui-dark-disabled-outline":a}return n},getShapeClass:function(t,e){var r="";return"circle"==t?r=e?"tui-outline-fillet":"tui-fillet":"rightAngle"==t&&(r=e?"tui-outline-rightAngle":"tui-rightAngle"),r},getHoverClass:function(t,e,r){var n="";return t||(n=r?"tui-outline-hover":"tui-"+(e||"primary")+"-hover"),n}}};e.default=n},c2b6:function(t,e,r){var n=r("85bd");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var a=r("4f06").default;a("2fe7de5e",n,!0,{sourceMap:!1,shadowMode:!1})},c439:function(t,e,r){"use strict";var n=r("a4f0"),a=r.n(n);a.a},c82d:function(t,e,r){"use strict";r.r(e);var n=r("1f3b"),a=r("eb07");for(var i in a)["default"].indexOf(i)<0&&function(t){r.d(e,t,(function(){return a[t]}))}(i);r("384a");var o=r("f0c5"),u=Object(o["a"])(a["default"],n["b"],n["c"],!1,null,"7eb98dfb",null,!1,n["a"],void 0);e["default"]=u.exports},c973:function(t,e,r){function n(t,e,r,n,a,i,o){try{var u=t[i](o),d=u.value}catch(c){return void r(c)}u.done?e(d):Promise.resolve(d).then(n,a)}r("d3b7"),t.exports=function(t){return function(){var e=this,r=arguments;return new Promise((function(a,i){var o=t.apply(e,r);function u(t){n(o,a,i,u,d,"next",t)}function d(t){n(o,a,i,u,d,"throw",t)}u(void 0)}))}},t.exports.__esModule=!0,t.exports["default"]=t.exports},e724:function(t,e,r){var n=r("5237");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var a=r("4f06").default;a("3d123f11",n,!0,{sourceMap:!1,shadowMode:!1})},eb07:function(t,e,r){"use strict";r.r(e);var n=r("4e15"),a=r.n(n);for(var i in n)["default"].indexOf(i)<0&&function(t){r.d(e,t,(function(){return n[t]}))}(i);e["default"]=a.a},ec21:function(t,e,r){"use strict";r.r(e);var n=r("150e"),a=r("0615");for(var i in a)["default"].indexOf(i)<0&&function(t){r.d(e,t,(function(){return a[t]}))}(i);r("c439");var o=r("f0c5"),u=Object(o["a"])(a["default"],n["b"],n["c"],!1,null,"0b63e35b",null,!1,n["a"],void 0);e["default"]=u.exports},f47f:function(t,e,r){"use strict";r.r(e);var n=r("bab1"),a=r.n(n);for(var i in n)["default"].indexOf(i)<0&&function(t){r.d(e,t,(function(){return n[t]}))}(i);e["default"]=a.a}}]);