(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-views-goods-goodsDetails"],{"02a5":function(t,e,i){"use strict";var a=i("c6bb"),o=i.n(a);o.a},"071e":function(t,e,i){"use strict";var a=i("e632"),o=i.n(a);o.a},1269:function(t,e,i){"use strict";var a=i("4ea4");i("cb29"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=a(i("8e5a")),n=getApp(),s={data:function(){return{windowWidth:"",windowHeight:"",colors:"",ctx:"",imgUrl:"",userInfo:{name:"反转",logo:"/static/images/face.jpg",goodsImg:"/static/images/goods/one.jpg",price:"3599.00",goodsName:"魅族17 8GB+128GB 十七度灰 骁龙865 旗舰5G手机 30W快充 6400W后置主摄 90Hz屏幕 支持NFC 智能拍照游戏手机"}}},components:{loading:o.default},props:{posterData:{type:Object}},created:function(){this.getSystem(),this.setData({colors:n.globalData.newColor}),this.setPoster()},onReachBottom:function(){},onShareAppMessage:function(){},methods:{getSystem:function(){var t=this;uni.getSystemInfo({success:function(e){console.log(e),t.setData({windowHeight:e.windowHeight,windowWidth:e.windowWidth})}})},setPoster:function(){uni.showLoading({title:"海报生成中..."});var t=uni.createCanvasContext("mycanvas",this);t.fillStyle="#FFFFFF",t.fillRect(0,0,this.windowWidth-60,520);var e=function(t,e,i,a,o,n,s){t.setFillStyle(i),t.setTextAlign("left"),t.font=s?"normal bold 20px Arial,sans-serif":"normal 20px Arial,sans-serif",t.setFontSize(e),t.fillText(n,a,o),t.restore()};e(t,14,"#333",85,35,this.userInfo.name,"bold"),e(t,12,"#999",85,58,"为您挑选了一个好礼物"),t.save(),t.beginPath();var i=60,a=60,o=15,n=15,s=8;this.setRadius(t,i,a,o,n,s),this.setGoodsImg(t);var l=" "+this.posterData.money;this.setGoodsPrice(t,20,this.colors,15,410,l),this.setGoodsName(t)},setEwm:function(t){var e=this;console.log("生成二维码");var i=100,a=100,o=this.windowWidth-170;t.drawImage("/static/images/ewm.png",o,410,i,a),setTimeout((function(){t.save(),t.draw(!1,(function(){setTimeout((function(){uni.canvasToTempFilePath({canvasId:"mycanvas",success:function(t){console.log(t),e.imgUrl=t.tempFilePath}},e)}),200)})),uni.hideLoading()}),1e3)},setRadius:function(t,e,i,a,o,n){t.arc(a+n,o+n,n,Math.PI,3*Math.PI/2),t.lineTo(e-n+a,o),t.arc(e-n+a,n+o,n,3*Math.PI/2,2*Math.PI),t.lineTo(e+a,i+o-n),t.arc(e-n+a,i-n+o,n,0,1*Math.PI/2),t.lineTo(n+a,i+o),t.arc(n+a,i-n+o,n,1*Math.PI/2,Math.PI),t.strokeStyle="#fff",t.fill(),t.clip(),t.drawImage(this.userInfo.logo,a,o,e,i),t.closePath(),t.restore()},setCircular:function(t,e,i,a,o){t.arc(e/2+a,i/2+o,e/2,0,2*Math.PI,!1),t.strokeStyle="#fff",t.fill(),t.clip(),t.drawImage(this.userInfo.logo,a,o,e,i),t.closePath(),t.restore()},setGoodsImg:function(t){var e=this.windowWidth-90;t.drawImage(this.posterData.img,15,95,e,e),t.save()},setGoodsPrice:function(t,e,i,a,o,n,s){t.setFillStyle(i),t.setTextAlign("left"),t.font=s?"normal bold 20px Arial,sans-serif":"normal 20px Arial,sans-serif",t.setFontSize(e),t.fillText(n,a,o),t.restore()},setGoodsName:function(t){for(var e={x:20,y:440,width:210,height:20,line:2,color:"#202020",size:14,align:"left",baseline:"top",text:this.posterData.title,bold:!0},i=Math.ceil(e.width/e.size),a=Math.ceil(e.text.length/i),o=0;o
',goodsEva:[{headimg:"/static/images/face.jpg",nickname:"反转",create_time:"2020-09-10 15:36",goods_name:"测试规格1",score:5,comment:"产品很不错,赞",images:["/static/images/goods/two.jpg","/static/images/goods/one.jpg"],reply:"感谢您的支持",tags:["价格合理","味道好","价格优惠","态度好"]},{headimg:"/static/images/face.jpg",nickname:"清风",create_time:"2020-09-10 13:36",goods_name:"测试规格2",score:4,comment:"味道还不错~",images:[],reply:"",tags:[]}],scrollShow:!1}},components:{navBar:n.default,sku:s.default,coupon:l.default,loading:r.default,poster:d.default,uniPopup:o.default,swipers:c.default},props:{},onLoad:function(t){var e=this;if(this.setData({colors:u.globalData.newColor}),this.getLocation(),this.setFrom(this.descriptionStr),setTimeout((function(){e.setData({isShow:!1})}),600),this.newVideo=uni.createVideoContext("newVideo"),this.good=(0,f.getGoodsDetails)(),this.goodsData.title=this.good.skuTitle.text,this.goodsData.skuSubTitle=this.good.skuSubTitle.text,this.good.dashPrice&&(this.goodsData.hmoney=this.good.dashPrice.text),this.goodsData.money=parseFloat(this.good.sellPrice.text.substr(1)),this.goodsData.img=this.good.picUrl,this.goodsData.imgList.push(this.good.picUrl),this.goodsData.imgList.push(this.good.detailPagePic),this.goodsData.xiaoliang=this.good.skuId,this.goodsData.goods_id=this.good.skuId,this.goodsData.skuArr){var i=this.goodsData.skuArr;console.log(this.goodsData.skuArr);for(var a=0;a=400?this.scrollShow=!0:this.scrollShow=!1},onPullDownRefresh:function(){},onReachBottom:function(){},onShareAppMessage:function(){return{title:this.goodsData.title,path:"/pages/views/goods/goodsDetails",imageUrl:this.goodsData.img}},onShareTimeline:function(){return{title:this.goodsData.title,path:"/pages/views/goods/goodsDetails",imageUrl:this.goodsData.img}},methods:{getLocation:function(){var t=this;uni.getLocation({type:"wgs84",geocode:!0,success:function(e){console.log("获取经纬度成功",e),t.setData({latitude:e.latitude,longitude:e.longitude})},fail:function(){console.log("获取经纬度失败"),t.setData({latitude:"",longitude:""})},complete:function(){}})},setFrom:function(t){var e=t.replace(/\