diff --git a/pages/goods/goodsInfo/goodsInfo.js b/pages/goods/goodsInfo/goodsInfo.js index 4b9a020..ca1d853 100644 --- a/pages/goods/goodsInfo/goodsInfo.js +++ b/pages/goods/goodsInfo/goodsInfo.js @@ -4644,7 +4644,7 @@ Page({ context.setLineJoin('round'); //交点设置成圆角 context.setFillStyle("white") context.setTextAlign('left'); - context.fillText('强烈推荐', 64 * unit, 672 * unit); + context.fillText('强烈推荐', 64 * unit, 668 * unit); // 7.商品价格 let price = '¥' + this.data.data.shop_price; @@ -6550,67 +6550,16 @@ Page({ }, + // 预览海报 + previewPoster() { + wx.previewImage({ + current: this.data.shareImgPath, // 当前显示图片的http链接 + urls: [this.data.shareImgPath] ,// 需要预览的图片http链接列表 + }); + }, - - // 获取指定元素实际宽度 - _getElementWidth(id) { - // return new Promise(resolve => { - // let _query = wx.createSelectorQuery(); - // _query.select(id).boundingClientRect(function(res) { - // console.log('实际宽度~~~~~', res); - // }).exec(); - - // const query = wx.createSelectorQuery().in(this) - // query.select('#toggle-content').boundingClientRect(function(res){ - // //res.top // 这个组件内 #the-id 节点的上边界坐标 - // // console.log('jfidsjfiojsdifjoisdjfiosdf', res); - // }).exec() - }, - - // 说明文字收起/隐藏事件 - toggleHandler() { - const {toggleFlag} = this.data.toggleParams; - - this.setData({ - toggleParams: { - toggleFlag: toggleFlag === 0 ? 1 : 0, - toggleShow: true - } - }) - }, - /* - * 检测说明文字是否须要隐藏/收起操做 - * 对比文字外层固定宽度容器元素宽度wrapperWidth与当前文字元素宽度contentWidth - * 若相差小于10则说明超出一行 - * */ - _checkRemarkToggle() { - var self = this; - // setTimeout(function() { - // self._getElementWidth('#toggle-content'); - // }, 1000); - - // Promise.all([ - // this._getElementWidth('#toggle-wrapper'), - // this._getElementWidth('#toggle-content')] - // ).then(res => { - // const wrapperWidth = res[0]; - // const contentWidth = res[1]; - - // // const {limitRemark, startDate, endDate, statusCode} = this.properties.couponData; - - // if (wrapperWidth - contentWidth < 10) { - // this.setData({ - // // toggleParams: { - // // toggleFlag: 1, - // // toggleShow: true - // // }, - // // timeArea: `${startDate}-${endDate}`, - // // unableImageSrc: UNABLE_IMAGE[statusCode] - // }) - // } - // }) - } + diff --git a/pages/goods/goodsInfo/goodsInfo.wxml b/pages/goods/goodsInfo/goodsInfo.wxml index e6ac7d3..779778c 100644 --- a/pages/goods/goodsInfo/goodsInfo.wxml +++ b/pages/goods/goodsInfo/goodsInfo.wxml @@ -183,8 +183,8 @@ {{data.goods_name}} - - + + 分享 @@ -265,9 +265,9 @@ - + - + 分享 @@ -289,7 +289,7 @@ - + @@ -316,9 +316,9 @@ - @@ -400,7 +400,7 @@ - + @@ -410,9 +410,9 @@ -