diff --git a/packageA/images/1.jpg b/packageA/images/1.jpg deleted file mode 100644 index 11bbed6..0000000 --- a/packageA/images/1.jpg +++ /dev/null diff --git a/packageA/images/cloud.jpg b/packageA/images/cloud.jpg deleted file mode 100644 index 00742e0..0000000 --- a/packageA/images/cloud.jpg +++ /dev/null diff --git a/packageA/pages/parseHtml/parseHtml.js b/packageA/pages/parseHtml/parseHtml.js index 27f5791..325373f 100644 --- a/packageA/pages/parseHtml/parseHtml.js +++ b/packageA/pages/parseHtml/parseHtml.js @@ -1,6 +1,6 @@ var WxParse = require('../../../utils/wxParse/wxParse.js'); -const app = getApp(); +const app = getApp(); let self = null; let content_privacy = `

隐私政策

@@ -235,117 +235,126 @@ let content_use = `
Page({ - /** - * 页面的初始数据 - */ - data: { - list: null, - isLoading: false, // 检测是否已经发送请求,防止重复发送请求 - noMore: false, // 检测是否有更多数据,true为没有更多数据,false为还有数据 - pageNum: 1, // 当前页数 - }, + /** + * 页面的初始数据 + */ + data: { + list: null, + isLoading: false, // 检测是否已经发送请求,防止重复发送请求 + noMore: false, // 检测是否有更多数据,true为没有更多数据,false为还有数据 + pageNum: 1, // 当前页数 + }, - /** - * 生命周期函数--监听页面加载 - */ - onLoad: function (options) { - self = this; - let title = ''; - let content = ''; - if(options.t == 0) { - title = '用户使用协议'; - content = content_use; - } else if(options.t == 1) { - title = '隐私政策'; - content = content_privacy; - }; - wx.setNavigationBarTitle({ - title: title, - }); + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + self = this; + //-- 获取一下基础参数 -- + getApp().getConfig2(function (res) { + if(res.reg_rule){ content_use=res.reg_rule; } + if(res.reg_privacy){ content_privacy=res.reg_privacy; } - WxParse.wxParse('content', 'html', content, self); - - }, + let title = ''; + let content = ''; + if (options.t == 0) { + title = '用户使用协议'; + content = content_use; + } else if (options.t == 1) { + title = '隐私政策'; + content = content_privacy; + } + ; + wx.setNavigationBarTitle({ + title: title, + }); - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady: function () { + WxParse.wxParse('content', 'html', content, self); - }, + }, 1) - /** - * 生命周期函数--监听页面显示 - */ - onShow: function () { + }, - }, + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { - /** - * 生命周期函数--监听页面隐藏 - */ - onHide: function () { + }, - }, + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { - /** - * 生命周期函数--监听页面卸载 - */ - onUnload: function () { + }, - }, + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh: function () { + }, - }, + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom: function () { + }, - }, + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { - /** - * 用户点击右上角分享 - */ - onShareAppMessage: function () { + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + }, + + /** + * get请求数据 + */ + get(url, data) { + app.request.get(url + '/' + data.store_id, { + success: function (res) { + if (res.data.code == 0) { + console.log('success~~~~~~~~~~~', res); + self.setData({ + content: res.data.data.distriRule, + }); + /** + * WxParse.wxParse(bindName , type, data, target,imagePadding) + * 1.bindName绑定的数据名(必填) + * 2.type可以为html或者md(必填) + * 3.data为传入的具体数据(必填) + * 4.target为Page对象,一般为this(必填) + * 5.imagePadding为当图片自适应是左右的单一padding(默认为0,可选) + */ + WxParse.wxParse('content', 'html', self.data.content, self); + } else { + wx.showToast({ + title: "网络繁忙,请重试", + icon: 'none', + duration: 2000 + }) + } + }, + fail: function () { + }, + }); + }, - }, - - /** - * get请求数据 - */ - get(url, data) { - app.request.get(url + '/' + data.store_id, { - success: function(res) { - if(res.data.code == 0){ - console.log('success~~~~~~~~~~~',res); - self.setData({ - content: res.data.data.distriRule, - }); - /** - * WxParse.wxParse(bindName , type, data, target,imagePadding) - * 1.bindName绑定的数据名(必填) - * 2.type可以为html或者md(必填) - * 3.data为传入的具体数据(必填) - * 4.target为Page对象,一般为this(必填) - * 5.imagePadding为当图片自适应是左右的单一padding(默认为0,可选) - */ - WxParse.wxParse('content', 'html', self.data.content, self); - }else{ - wx.showToast({ - title: "网络繁忙,请重试", - icon: 'none', - duration: 2000 - }) - } - }, - fail: function() {}, - }); - }, - }) \ No newline at end of file diff --git a/packageA/pages/profile/profile.wxss b/packageA/pages/profile/profile.wxss index 99963b1..00dfc79 100644 --- a/packageA/pages/profile/profile.wxss +++ b/packageA/pages/profile/profile.wxss @@ -411,7 +411,6 @@ input { background: white; width: 100%; border-radius: 20rpx 20rpx 0 0; - height: 72%; } .popup-top { @@ -452,7 +451,8 @@ input { .store-list { width: 95%; - height: 72%; + min-height: 300rpx; + max-height: 610rpx; overflow-y: scroll; margin: auto; } @@ -506,7 +506,7 @@ input { .store-bottom { width: 85%; margin: auto; - height: 70rpx; + height: 90rpx; } .determine { diff --git a/pages/user/Change_phone/Change_phone.js b/packageB/pages/user/Change_phone/Change_phone.js index 9f3d054..303f7d0 100644 --- a/pages/user/Change_phone/Change_phone.js +++ b/packageB/pages/user/Change_phone/Change_phone.js @@ -2,8 +2,8 @@ var a = getApp(), o = a.globalData, r = a.globalData.setting, t = a.request, - s = require("../../../utils/common.js"), - util = require("../../../utils/util.js"); + s = require("../../../../utils/common.js"), + util = require("../../../../utils/util.js"); Page({ /** diff --git a/pages/user/Change_phone/Change_phone.json b/packageB/pages/user/Change_phone/Change_phone.json index 8003812..8003812 100644 --- a/pages/user/Change_phone/Change_phone.json +++ b/packageB/pages/user/Change_phone/Change_phone.json diff --git a/pages/user/Change_phone/Change_phone.wxml b/packageB/pages/user/Change_phone/Change_phone.wxml index 465e2e6..465e2e6 100644 --- a/pages/user/Change_phone/Change_phone.wxml +++ b/packageB/pages/user/Change_phone/Change_phone.wxml diff --git a/pages/user/Change_phone/Change_phone.wxss b/packageB/pages/user/Change_phone/Change_phone.wxss index 1f435ff..1f435ff 100644 --- a/pages/user/Change_phone/Change_phone.wxss +++ b/packageB/pages/user/Change_phone/Change_phone.wxss diff --git a/pages/goods/goodsInfo/goodsInfo.js b/pages/goods/goodsInfo/goodsInfo.js index 1fb3313..9015a9f 100644 --- a/pages/goods/goodsInfo/goodsInfo.js +++ b/pages/goods/goodsInfo/goodsInfo.js @@ -2025,10 +2025,11 @@ Page({ } var title= th.data.data.goods_name; var img=th.data.data.original_img; - if(th.data.prom_type==6 || th.data.prom_type==1){ - + if(th.data.prom_type==6 || th.data.prom_type==1 || th.data.prom_type==4){ title=th.data.prom_act.share_title; if(!title) title=th.data.prom_act.title; + if(th.data.prom_type==4) title=th.data.prom_act.name; + if(th.data.prom_act.share_imgurl) img=th.data.iurl+th.data.prom_act.share_imgurl; } @@ -4070,9 +4071,10 @@ Page({ } var share_title=th.data.data.goods_name; - if(th.data.prom_type==1 || th.data.prom_type==6){ + if(th.data.prom_type==1 || th.data.prom_type==6 || th.data.prom_type==4){ share_title=th.data.prom_act.share_title; if(!share_title) share_title=th.data.prom_act.title; + if(th.data.prom_type==4) share_title=th.data.prom_act.name; } //---产品名称--- @@ -4082,30 +4084,38 @@ Page({ context.setFontSize(21.3 * unit) th.draw_Text(context, share_title, 38 * unit, 180 * unit, 200 * unit, 279 * unit, unit); + //------产品的价格------- context.setFontSize(23 * unit) context.setFillStyle("red") - context.fillText("¥", 416 * unit, 185 * unit); - context.setFontSize(31 * unit) + + var pri0 = th.data.data.shop_price; if (th.data.prom_act) pri0 = th.data.prom_act.price; pri0 = parseFloat(pri0).toFixed(2); - context.fillText(pri0, 438 * unit, 185 * unit); + var wd1=th.data.screenWidth-ut.measureText(pri0, 31 * unit)-25; + context.fillText("¥", wd1-15, 185 * unit); + context.setFontSize(31 * unit) + context.fillText(pri0, wd1, 185 * unit); + //---市场价划掉--- context.setFillStyle("gray") context.setFontSize(22 * unit) - context.fillText("¥" + th.data.data.market_price.toFixed(2), 426 * unit, 213 * unit); + pri0="¥" + th.data.data.market_price.toFixed(2); + var wd2=th.data.screenWidth-ut.measureText(pri0, 22 * unit)-25; + context.fillText(pri0, wd2, 213 * unit); + context.setStrokeStyle('gray'); context.setLineWidth(1 * unit); - context.moveTo(426 * unit, 206 * unit); - context.lineTo(510 * unit, 206 * unit); + context.moveTo(wd2-5, 206 * unit); + context.lineTo(wd2+ut.measureText(pri0, 22 * unit)+5, 206 * unit); context.stroke(); }else{ context.setFillStyle("black"); context.setFontSize(21.3 * unit) - th.draw_Text(context, th.data.data.goods_name, + th.draw_Text(context, share_title, 38 * unit, 170 * unit, 20 * unit, 300*unit, unit); //------ 产品的价格 ----- var pri0 = th.data.prom_act.addmoney; @@ -4396,28 +4406,31 @@ Page({ destWidth: 1.2 * 750 * 750 / that.data.screenWidth, destHeight: 1.2 * 1217 * 750 / that.data.screenWidth, canvasId: 'share', - success: function(res) { - that.setData({ - shareImgPath: res.tempFilePath, - canvasHidden: true - }) - if (!res.tempFilePath) { - wx.showModal({ - title: '提示', - content: '图片绘制中,请稍后重试', - showCancel: false - }) - return false; + success: function (res) { + + that.setData({ + shareImgPath: res.tempFilePath, + canvasHidden: true + }) + + if (!res.tempFilePath) { + wx.showModal({ + title: '提示', + content: '图片绘制中,请稍后重试', + showCancel: false + }) + return false; + } + + // wx.previewImage({ + // //将图片预览出来 + // urls: [that.data.shareImgPath] + // }); + that.setData({ + showPoster: true, + }); + wx.hideLoading(); } - // wx.previewImage({ - // //将图片预览出来 - // urls: [that.data.shareImgPath] - // }); - that.setData({ - showPoster: true, - }); - wx.hideLoading(); - } }) }, 500) @@ -4544,7 +4557,7 @@ Page({ var img_url=ee.data.data.original_img; if((this.data.prom_type==1 || this.data.prom_type==6) && this.data.prom_act.share_imgurl){ - img_url=this.data.iurl+this.data.prom_act.share_imgurl; + img_url=this.data.iurl+this.data.prom_act.share_imgurl; } //获取商品是分享图信息 diff --git a/pages/team/team_success/team_success.js b/pages/team/team_success/team_success.js index 6ebbb0b..d7654e5 100644 --- a/pages/team/team_success/team_success.js +++ b/pages/team/team_success/team_success.js @@ -394,6 +394,12 @@ Page({ canvasHidden: true, }) + if(this.data.share_hidden) { + this.setData({ + share_hidden: false, + }); + }; + var app = getApp(); var unit = that.data.screenWidth / 750 * 1.35; var scene=th.data.teamgroup.id; @@ -415,16 +421,17 @@ Page({ var vpath = res.path; var context = wx.createCanvasContext('share'); - console.log("saveImageToPhotosAlbum"); - console.log(vpath); //先画背景 var pg_path = "../../../images/share/share_bg.png"; //-- 如果有自定义海报的时候,判断背景的图片 -- if(th.data.share_b_img){ pg_path=th.data.share_b_img; - } - + } + + var share_title=th.data.teamlist.share_title; + if(!share_title) + share_title=th.data.teamlist.title; context.drawImage(pg_path, 0, 0, 554 * unit, 899 * unit); //-- 是自定义海报的情况下 -- @@ -468,27 +475,35 @@ Page({ //---产品名称--- context.setFontSize(21.3 * unit); context.setFillStyle("black"); - th.draw_Text(context, th.data.goods.goods_name, + + + + + th.draw_Text(context,share_title, 38 * unit, 180 * unit, 200 * unit, 279 * unit, unit); //------产品的价格------- context.setFontSize(24 * unit) context.setFillStyle("red") - context.fillText("¥", 428 * unit, 180 * unit); - context.setFontSize(31 * unit) - + var pri0 = th.data.teamlist.price; pri0=parseFloat(pri0).toFixed(2); - context.fillText(pri0, 456 * unit, 180 * unit); + var wd1=th.data.screenWidth-ut.measureText(pri0, 31 * unit)-25; + context.fillText("¥", wd1-15, 180 * unit); + context.setFontSize(31 * unit) + context.fillText(pri0, wd1, 180 * unit); + //---市场价划掉--- context.setFillStyle("gray") context.setFontSize(22 * unit) - context.fillText("¥" + th.data.goods.market_price, 438 * unit, 210 * unit); + pri0= "¥" + parseFloat(th.data.goods.market_price).toFixed(2); + var wd2=th.data.screenWidth-ut.measureText(pri0, 22 * unit)-25; + context.fillText(pri0, wd2, 210 * unit); + context.setStrokeStyle('gray') context.setLineWidth(1 * unit) - context.moveTo(438 * unit, 204 * unit) - context.lineTo(510 * unit, 204 * unit) + context.moveTo(wd2-5, 204 * unit) + context.lineTo(wd2+ut.measureText(pri0, 22 * unit)+5, 204 * unit) context.stroke(); - console.log(th.data.share_img_localpath); @@ -501,9 +516,9 @@ Page({ else{ g_ct= th.data.max_num -th.data.ordertx.length; if(g_ct>0){ - wz="还差"+g_ct+"人享受最低价,"; + wz="还差"+g_ct+"人享最低优惠,"; }else{ - wz="已享受最低价,"; + wz="已享受最优惠,"; } } @@ -649,6 +664,7 @@ Page({ destHeight: 1217 * 750 / that.data.screenWidth, canvasId: 'share', success: function (res) { + that.setData({ shareImgPath: res.tempFilePath, canvasHidden: false, }) @@ -660,10 +676,16 @@ Page({ }) return false; } - wx.previewImage({ - //将图片预览出来 - urls: [that.data.shareImgPath] + + // wx.previewImage({ + // //将图片预览出来 + // urls: [that.data.shareImgPath] + // }); + + that.setData({ + showPoster: true, }); + wx.hideLoading(); } }) @@ -807,9 +829,14 @@ Page({ } // console.log('url+++++>>>>>', url, th.data.teamlist.title); + var share_title=th.data.teamlist.title; + if(th.data.teamlist.share_title){ + share_title=th.data.teamlist.share_title; + } + return { path:url, - title: th.data.teamlist.title, + title: share_title, imageUrl: img, } }, @@ -832,6 +859,13 @@ Page({ }); }, + + closePoster() { + this.setData({ + showPoster: false, + }); + }, + }) diff --git a/pages/team/team_success/team_success.wxml b/pages/team/team_success/team_success.wxml index 452f408..2bef8aa 100644 --- a/pages/team/team_success/team_success.wxml +++ b/pages/team/team_success/team_success.wxml @@ -322,3 +322,24 @@ + + + + + + + + + + + + + + + + + + diff --git a/pages/team/team_success/team_success.wxss b/pages/team/team_success/team_success.wxss index 4bf2d73..6fd7af1 100644 --- a/pages/team/team_success/team_success.wxss +++ b/pages/team/team_success/team_success.wxss @@ -892,5 +892,74 @@ height:40rpx; } .xc-shuoming{ padding-left:10rpx; +} + + +.poster-container { + box-sizing: border-box; + position: fixed; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + width: calc(100% - 120rpx); + z-index: 1000; +} +.mask { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 999; + background-color: rgba(0,0,0,.4); +} +.poster-wrapper { + width: 100%; +} + +.poster { + box-sizing: border-box; + width: 100%; + height: 1055rpx; + border-radius: 20rpx; + /* box-shadow: 0 8px 12px #666; */ + position: relative; + z-index: 999; + overflow: hidden; +} +.poster-img { + display: block; + width: 100%; + height: 100%; +} +.btn-container { + display: flex; + justify-content: space-around; +} +.btn-share { + display: block; + background-color: #FE6867; + color: white; + border-radius: 8rpx; + line-height: 80rpx; + margin-top: 28rpx; + padding: 0 60rpx; +} + + +.btn-close { + /* background-color: rgba(0,0,0,.5); */ + color: #ccc; + width: 50rpx; + height: 50rpx; + line-height: 50rpx; + text-align: center; + border-radius: 50%; + position: absolute; + right: 20rpx; + top: 20rpx; +} +.icon-close { + font-size: 48rpx; } \ No newline at end of file diff --git a/pages/user/userinfo/userinfo.wxml b/pages/user/userinfo/userinfo.wxml index 9b2188d..6e0aabd 100644 --- a/pages/user/userinfo/userinfo.wxml +++ b/pages/user/userinfo/userinfo.wxml @@ -166,7 +166,7 @@ --> - + 更换手机 {{phone}} diff --git a/pages/user/userinfo/userinfo.wxss b/pages/user/userinfo/userinfo.wxss index 6b11ea0..7441863 100644 --- a/pages/user/userinfo/userinfo.wxss +++ b/pages/user/userinfo/userinfo.wxss @@ -408,7 +408,6 @@ input { background: white; width: 100%; border-radius: 20rpx 20rpx 0 0; - height: 72%; } .popup-top { @@ -449,7 +448,8 @@ input { .store-list { width: 95%; - height: 72%; + min-height: 300rpx; + max-height: 610rpx; overflow-y: scroll; margin: auto; } @@ -503,7 +503,7 @@ input { .store-bottom { width: 85%; margin: auto; - height: 70rpx; + height: 90rpx; } .determine {