pages-client-member-qrshare.8b19640b.js 13 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-client-member-qrshare"],{"195d":function(t,e,n){"use strict";n.r(e);var a=n("cd2b"),i=n("7066");for(var s in i)["default"].indexOf(s)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(s);n("df40");var r=n("f0c5"),o=Object(r["a"])(i["default"],a["b"],a["c"],!1,null,"17147900",null,!1,a["a"],void 0);e["default"]=o.exports},"391e":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=[]},"4ff0":function(t,e,n){var a=n("24fb");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},"5d03":function(t,e,n){"use strict";n("7a82"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n("e9c4");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},"5d0c":function(t,e,n){"use strict";n.r(e);var a=n("391e"),i=n("b38d");for(var s in i)["default"].indexOf(s)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(s);n("6b53");var r=n("f0c5"),o=Object(r["a"])(i["default"],a["b"],a["c"],!1,null,"69b8d37e",null,!1,a["a"],void 0);e["default"]=o.exports},"688d":function(t,e,n){var a=n("24fb");e=a(!1),e.push([t.i,'@charset "UTF-8";\r\n/**\r\n * 这里是uni-app内置的常用样式变量\r\n *\r\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\r\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\r\n *\r\n */\r\n/**\r\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\r\n *\r\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\r\n */\r\n/* 颜色变量 */\r\n/* 行为相关颜色 */\r\n/* 文字基本颜色 */\r\n/* 背景颜色 */\r\n/* 边框颜色 */\r\n/* 尺寸变量 */\r\n/* 文字尺寸 */\r\n/* 图片尺寸 */\r\n/* Border Radius */\r\n/* 水平间距 */\r\n/* 垂直间距 */\r\n/* 透明度 */\r\n/* 文章场景相关 */\r\n/* 文字基本颜色 */\r\n/* 背景颜色 */\r\n/* 边框颜色 */\r\n/* 尺寸变量 */\r\n/* 文字尺寸 */\r\n/* 图片尺寸 */\r\n/* Border Radius */\r\n/* 水平间距 */\r\n/* 垂直间距 */\r\n/* 透明度 */\r\n/* 文章场景相关 */\r\n/* 页面左右间距 */\r\n/* 文字尺寸 */\r\n/*文字颜色*/\r\n/* 边框颜色 */\r\n/* 图片加载中颜色 */\r\n/* 行为相关颜色 */\r\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},"6b53":function(t,e,n){"use strict";var a=n("afa0"),i=n.n(a);i.a},7066:function(t,e,n){"use strict";n.r(e);var a=n("d1b2"),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},afa0:function(t,e,n){var a=n("688d");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var i=n("4f06").default;i("5a3edd14",a,!0,{sourceMap:!1,shadowMode:!1})},b38d:function(t,e,n){"use strict";n.r(e);var a=n("5d03"),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},cb29:function(t,e,n){var a=n("23e7"),i=n("81d5"),s=n("44d2");a({target:"Array",proto:!0},{fill:i}),s("fill")},ccca:function(t,e,n){var a=n("4ff0");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var i=n("4f06").default;i("e2a7ae06",a,!0,{sourceMap:!1,shadowMode:!1})},cd2b: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("fbf7").default,shareBtn:n("5d0c").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=[]},d1b2:function(t,e,n){"use strict";n("7a82");var a=n("4ea4").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n("d3b7"),n("159b"),n("c975"),n("14d9"),n("fb6a"),n("cb29");var i,s=a(n("25ee")),r=a(n("b1c6")),o=a(n("fbf7")),c=a(n("5d0c")),d=(n("26cb"),{components:{avatar:s.default,uniPopup:o.default,shareBtn:c.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=r.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=d},df40:function(t,e,n){"use strict";var a=n("ccca"),i=n.n(a);i.a}}]);