pages-client-member-qrshare.4a8a62b0.js 13 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-client-member-qrshare"],{1851:function(t,e,n){"use strict";var a=n("8bdb"),i=n("84d6"),s=n("1cb5");a({target:"Array",proto:!0},{fill:i}),s("fill")},"1b76":function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return s})),n.d(e,"a",(function(){return a}));var a={uniPopup:n("3f14").default,shareBtn:n("ee9a").default},i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",[n("v-uni-view",{staticClass:"canvas"},[n("v-uni-canvas",{staticClass:"canvasa",style:{width:t.cansWidth+"px",height:t.cansHeight+"px"},attrs:{"canvas-id":"firstCanvas"},on:{longpress:function(e){arguments[0]=e=t.$handleEvent(e),t.saveCans(1)}}})],1),n("v-uni-view",{staticClass:"imglist"},[n("v-uni-view",{style:[{width:t.widths+"upx"}]},[t._l(t.swiperList,(function(e,a){return[n("v-uni-image",{key:a+"_0",staticStyle:{padding:"4upx"},attrs:{src:e.posterImg,mode:"aspectFill"},on:{click:function(n){arguments[0]=n=t.$handleEvent(n),t.selseimg(e.posterImg)}}})]}))],2)],1),n("v-uni-view",{staticClass:"bottom"},[n("v-uni-view",{staticClass:"bottom3",staticStyle:{width:"80%","text-align":"center"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.saveCans(2)}}},[t._v("一键分享")])],1),n("uni-popup",{ref:"sharepopup",attrs:{type:"bottom"}},[n("share-btn",{attrs:{sharedataTemp:t.sharedata}})],1),n("avatar",{ref:"avatar",attrs:{quality:"1"},on:{upload:function(e){arguments[0]=e=t.$handleEvent(e),t.doUpload.apply(void 0,arguments)},avtinit:function(e){arguments[0]=e=t.$handleEvent(e),t.doBefore.apply(void 0,arguments)}}})],1)},s=[]},"1d9b":function(t,e,n){"use strict";var a=n("7280"),i=n.n(a);i.a},3203:function(t,e,n){"use strict";n.r(e);var a=n("5611"),i=n.n(a);for(var s in a)["default"].indexOf(s)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(s);e["default"]=i.a},3893:function(t,e,n){var a=n("c86c");e=a(!1),e.push([t.i,"uni-page-body[data-v-17147900]{background-color:#f1f1f1}body.?%PAGE?%[data-v-17147900]{background-color:#f1f1f1}.pageHeader[data-v-17147900]{height:0;background-color:#fff}.box-header[data-v-17147900]{position:fixed;top:%?0?%;width:100%;z-index:100}.top-box[data-v-17147900]{height:%?100?%;width:100%}.canvas[data-v-17147900]{display:flex;justify-content:center;margin-top:%?20?%;border-radius:%?16?%}.bottom[data-v-17147900]{padding:%?20?% 0;width:100%;display:flex;justify-content:space-around;position:fixed;bottom:0;background-color:#fff}.bottom1[data-v-17147900]{padding:%?20?% %?40?%;background:#ff8a00;border-radius:%?44?%;font-size:%?30?%;color:#fff}.bottom2[data-v-17147900]{padding:%?20?% %?40?%;background:#ff5256;border-radius:%?44?%;font-size:%?30?%;color:#fff}.bottom3[data-v-17147900]{padding:%?20?% %?40?%;background:#5e40ff;border-radius:%?44?%;font-size:%?30?%;color:#fff}.imglist[data-v-17147900]{width:100%;padding:%?20?% 0;overflow:auto\n\t/* background-color: #ffffff; */}.imglist uni-view[data-v-17147900]{display:flex;justify-content:space-around}.imglist uni-image[data-v-17147900]{width:%?200?%;height:%?200?%}.tishi-box[data-v-17147900]{display:flex;align-items:center;justify-content:space-around;background-color:#fff;position:fixed;bottom:0;width:100%;height:%?260?%;background:#fff;border-radius:%?20?% %?20?% %?0?% %?0?%;text-align:center}.tishi-box uni-view[data-v-17147900]{font-size:%?28?%;font-family:PingFang SC;font-weight:500;color:#333;line-height:%?50?%}.tishi-box uni-image[data-v-17147900]{width:%?100?%;height:%?100?%;border-radius:50%}.canvasa[data-v-17147900]{border-radius:%?10?%}",""]),t.exports=e},"4dee":function(t,e,n){var a=n("3893");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var i=n("967d").default;i("60916740",a,!0,{sourceMap:!1,shadowMode:!1})},5071:function(t,e,n){"use strict";n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){}));var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",{staticClass:"sharebtn"},[n("v-uni-view",{staticClass:"uni-share"},[n("v-uni-view",{staticClass:"uni-share-content"},t._l(t.bottomData,(function(e,a){return n("v-uni-view",{key:a,staticClass:"uni-share-content-box",staticStyle:{position:"relative"}},[n("v-uni-view",{staticClass:"uni-share-content-image"},[n("v-uni-image",{staticClass:"content-image",attrs:{src:e.icon}})],1),n("v-uni-text",{staticClass:"uni-share-content-text"},[t._v(t._s(e.text))]),n("v-uni-button",{staticStyle:{position:"absolute",background:"none",width:"100%",height:"100%"},attrs:{"open-type":"share"},on:{click:function(n){arguments[0]=n=t.$handleEvent(n),t.btnShare(e.text)}}})],1)})),1)],1)],1)},i=[]},"51e7":function(t,e,n){"use strict";n.r(e);var a=n("7f54"),i=n.n(a);for(var s in a)["default"].indexOf(s)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(s);e["default"]=i.a},5611:function(t,e,n){"use strict";n("6a54"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n("d4b5");var a={data:function(){return{bottomData:[{text:"复制",icon:"/static/index/copy.png",name:"copy"}]}},props:["sharedataTemp"],methods:{btnShare:function(t){console.log(t);var e="",n="",a="";switch(t){case"复制":uni.setClipboardData({data:this.sharedataTemp.strShareUrl,complete:function(){uni.showToast({title:"已复制到剪贴板"})}});break;case"微信":e="weixin",n="WXSceneSession",a=0;break;case"朋友圈":e="weixin",n="WXSenceTimeline",a=0;break}""!=e&&uni.share({provider:e,scene:n,type:a,href:this.sharedataTemp.strShareUrl,title:this.sharedataTemp.strShareTitle,summary:this.sharedataTemp.strShareSummary,imageUrl:this.sharedataTemp.strShareImageUrl,success:function(t){console.log("success:"+JSON.stringify(t))},fail:function(t){console.log("fail:"+JSON.stringify(t))}})}}};e.default=a},"706e":function(t,e,n){var a=n("c86c");e=a(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */\n/* 页面左右间距 */\n/* 文字尺寸 */\n/*文字颜色*/\n/* 边框颜色 */\n/* 图片加载中颜色 */\n/* 行为相关颜色 */\n/* 底部分享 */.sharebtn .uni-share[data-v-69b8d37e]{width:%?690?%;margin:%?30?%;border-radius:%?30?%;display:flex;flex-direction:column;background-color:#fff}.sharebtn .uni-share .uni-share-content[data-v-69b8d37e]{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:center;overflow-x:scroll;padding:15px %?50?%}.sharebtn .uni-share .uni-share-content .uni-share-content-box[data-v-69b8d37e]{display:flex;flex-direction:column;align-items:center;margin-right:%?60?%}.sharebtn .uni-share .uni-share-content .uni-share-content-box[data-v-69b8d37e]:nth-last-child(1){margin-right:0}.sharebtn .uni-share .uni-share-content .uni-share-content-box .uni-share-content-image[data-v-69b8d37e]{display:flex;flex-direction:row;justify-content:center;align-items:center;width:%?90?%;height:%?90?%;overflow:hidden;border-radius:%?10?%}.sharebtn .uni-share .uni-share-content .uni-share-content-box .uni-share-content-image .content-image[data-v-69b8d37e]{width:%?90?%;height:%?90?%}.sharebtn .uni-share .uni-share-content .uni-share-content-box:nth-last-child(1) .uni-share-content-image .content-image[data-v-69b8d37e]{width:%?50?%!important;height:%?50?%!important}.sharebtn .uni-share .uni-share-content .uni-share-content-box .uni-share-content-text[data-v-69b8d37e]{font-size:%?26?%;color:#333;padding-top:5px;padding-bottom:10px}',""]),t.exports=e},7280:function(t,e,n){var a=n("706e");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var i=n("967d").default;i("532409ba",a,!0,{sourceMap:!1,shadowMode:!1})},7428:function(t,e,n){"use strict";n.r(e);var a=n("1b76"),i=n("51e7");for(var s in i)["default"].indexOf(s)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(s);n("e9fd");var o=n("828b"),r=Object(o["a"])(i["default"],a["b"],a["c"],!1,null,"17147900",null,!1,a["a"],void 0);e["default"]=r.exports},"7f54":function(t,e,n){"use strict";n("6a54");var a=n("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n("bf0f"),n("2797"),n("5ef2"),n("aa9c"),n("f7a5"),n("1851");var i,s=a(n("a1a0")),o=a(n("4f5c")),r=a(n("3f14")),u=a(n("ee9a")),c=(n("8f59"),{components:{avatar:s.default,uniPopup:r.default,shareBtn:u.default},data:function(){return{sharedata:{type:2,strShareUrl:"",strShareTitle:"分享标题",strShareSummary:"分享总结",strShareImageUrl:""},uid:"",avatar:"",qrcodeImg:"",userinfo:[],cansWidth:280,cansHeight:500,widths:"",imgsrc:"",userdata:{},swiperList:[]}},onLoad:function(){this.show=!0,this.userinfo=uni.getStorageSync("userinfo"),this.avatar=uni.getStorageSync("avatar");var t=this.configs.webUrl+"/h5/#/pages/login/reg?uid="+this.userinfo.id,e=o.default.createQrCodeImg(t,{size:300});this.qrcodeImg=e,this.sharedata.strShareUrl=t,console.log(this.qrcodeImg),i=this,i.huizhihaibao()},methods:{upbj:function(){console.log(111);this.$refs.avatar.fChooseImg(0,{selWidth:"500upx",selHeight:"893upx",expWidth:"800upx",expHeight:"1429upx",inner:"false",canRotate:!1,quality:1})},doUpload:function(t){this.selseimg(t.path)},doBefore:function(){console.log("doBefore")},huizhihaibao:function(){var t=this;if(uni.showLoading({title:"加载中"}),t.userdata={img:"",text:"测试"},this.userinfo.config.fxhb){var e=this.userinfo.config.fxhb,n=[];e.forEach((function(e){e=-1!=e.indexOf("http")?e:t.configs.webUrl+e,n.push({posterImg:e})})),t.swiperList=n}else t.swiperList=[];uni.hideLoading(),t.selseimg(t.swiperList[0].posterImg)},selseimg:function(t){i.userinfo.nickname>6&&(i.userinfo.nickname=i.userinfo.nickname.slice(0,6)+"..."),uni.showLoading({title:"生成海报中"}),t.indexOf("http"),i.selseimging(t)},selseimging:function(t){var e=uni.createCanvasContext("firstCanvas");e.drawImage(t,0,0,280,500);setTimeout((function(){e.shadowColor="#999999",e.shadowOffsetX=0,e.shadowOffsetY=0,e.shadowBlur=5,e.drawImage(i.$config.staticUrl+"zw.png",10,370,260,110),e.fill(),e.save(),e.drawImage(i.qrcodeImg,182,394,75,75),e.setFillStyle("#333333"),e.setFontSize(14),e.fillText("我的邀请码:"+i.userinfo.id,20,393),e.fill(),e.setFillStyle("#333333"),e.setFontSize(12),e.fillText("扫一扫二维码",183,388),e.fill(),e.setFillStyle("#333333"),e.setFontSize(14),e.fillText(i.userinfo.nickname,80,425),e.fill(),e.setFillStyle("#666666"),e.setFontSize(10),e.fillText("邀请你加入"+i.userinfo.config.name,80,445),e.fillText("手机就能赚钱!",80,465),e.fill(),e.save(),e.beginPath(),e.arc(44,440,25,0,2*Math.PI),e.clip(),e.drawImage(i.avatar,17,412,55,55),e.restore(),e.draw(),uni.hideLoading()}),1e3)},saveCans:function(t){if(console.log(222),2==t)i.$refs.sharepopup.open();else{uni.showLoading({title:"保存海报中"}),console.log("保存");1,uni.canvasToTempFilePath({x:0,y:0,width:1*i.cansWidth*4,height:1*i.cansHeight*4,destWidth:1*i.cansWidth*4,destHeight:1*i.cansHeight*4,canvasId:"firstCanvas",success:function(t){uni.hideLoading(),uni.saveImageToPhotosAlbum({filePath:t.tempFilePath,success:function(e){uni.showToast({title:"保存相册成功"}),i.imgsrc=t.tempFilePath,i.sharedata.strShareImageUrl=t.tempFilePath},fail:function(t){"saveImageToPhotosAlbum:fail auth deny"==t.errMsg&&uni.showModal({title:"您需要授权相册权限",success:function(t){t.confirm&&uni.openSetting({success:function(t){},fail:function(t){console.log(t)}})}})}})},fail:function(t){uni.hideLoading()}},this)}}}});e.default=c},e9fd:function(t,e,n){"use strict";var a=n("4dee"),i=n.n(a);i.a},ee9a:function(t,e,n){"use strict";n.r(e);var a=n("5071"),i=n("3203");for(var s in i)["default"].indexOf(s)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(s);n("1d9b");var o=n("828b"),r=Object(o["a"])(i["default"],a["b"],a["c"],!1,null,"69b8d37e",null,!1,a["a"],void 0);e["default"]=r.exports}}]);