Commit d68beddc11f4ae3dacb91acf4e85afa85c2ca4da

Authored by yvan.ni
2 parents 6cc46161 3459ab84

Merge branch 'dev' of http://git.vipzhuang.cn/wxd/MShopWeApp into dev

pages/goods/goodsInfo/goodsInfo.js
@@ -4191,6 +4191,92 @@ Page({ @@ -4191,6 +4191,92 @@ Page({
4191 } 4191 }
4192 }) 4192 })
4193 }, 4193 },
  4194 +
  4195 +
  4196 + drawPoster(context, unit, img, vpath) {
  4197 + // 1.灰色背景
  4198 + context.setFillStyle('#f2f1f6');
  4199 + context.rect(0,0,554*unit,899*unit);
  4200 + context.fill();
  4201 + // 2.商城名称
  4202 + let shopName = this.data.sto_sele_name_1;
  4203 + // let shopNameLen = context.measureText(shopName);
  4204 + // let x_shopNameLen = (554 - shopNameLen.width)/2*unit;
  4205 + // console.log('11111111111111',shopNameLen,x_shopNameLen);
  4206 + context.setTextAlign('center');
  4207 + context.setFontSize(26*unit);
  4208 + context.setFillStyle('black');
  4209 + context.fillText(shopName, 277*unit, 60*unit);
  4210 + // // 3.推荐来源
  4211 + let fromText = `来自${getApp().globalData.userInfo.nickname}的推荐`;
  4212 + // let fromTextLen = context.measureText(fromText);
  4213 + // let x_fromText = (375 - fromTextLen.width)/2;
  4214 + // console.log('222222',fromTextLen,x_fromText);
  4215 + context.setTextAlign('center');
  4216 + context.setFontSize(22*unit);
  4217 + context.setFillStyle('#96959a');
  4218 + context.fillText(fromText, 277*unit, 105*unit);
  4219 + // 4.海报背景
  4220 + // context.beginPath();
  4221 + // context.setStrokeStyle('#f2f1f6');
  4222 + context.setFillStyle('white');
  4223 + context.fillRect(37*unit, 157*unit, 480*unit, 673*unit);
  4224 + // context.stroke();
  4225 + // context.fill();
  4226 + // 5.商品图片
  4227 + // 图片的x坐标
  4228 + let bg_x = 37*unit
  4229 + // 图片的y坐标
  4230 + let bg_y = 157*unit
  4231 + // 图片宽度
  4232 + let bg_w = 480*unit
  4233 + // 图片高度
  4234 + let bg_h = 474*unit
  4235 + // 图片圆角
  4236 + let bg_r = 4
  4237 + // 绘制海报背景图片圆角
  4238 + context.save()
  4239 + context.beginPath()
  4240 + context.arc(bg_x + bg_r, bg_y + bg_r, bg_r, Math.PI, Math.PI*1.5)
  4241 + context.arc(bg_x + bg_w - bg_r, bg_y + bg_r, bg_r, Math.PI * 1.5, Math.PI * 2)
  4242 + context.arc(bg_x + bg_w, bg_y + bg_h, bg_r, 0, Math.PI * 0.5)
  4243 + context.arc(bg_x, bg_y + bg_h, 0, Math.PI * 0.5, Math.PI)
  4244 + context.clip()
  4245 + context.drawImage(img, bg_x, bg_y, bg_w, bg_h);
  4246 + context.restore()
  4247 + // 6.强烈推荐
  4248 + // context.beginPath();
  4249 + let tj_path = "../../../images/share/q_tj.png";
  4250 + context.beginPath()
  4251 + context.drawImage(tj_path, 54*unit, 648*unit, 85*unit, 30*unit);
  4252 + context.setFontSize(16*unit)
  4253 + context.setLineJoin('round'); //交点设置成圆角
  4254 + context.setFillStyle("white")
  4255 + context.setTextAlign('left');
  4256 + context.fillText('强烈推荐', 64*unit, 672*unit);
  4257 + // 7.商品价格
  4258 + context.setFontSize(32*unit);
  4259 + context.setFillStyle('#DE1117');
  4260 + context.fillText('¥59.00', 54*unit, 730*unit);
  4261 + // 8.商品标题
  4262 + context.setFontSize(20*unit);
  4263 + context.setFillStyle('#898989');
  4264 + this.draw_Text(context, this.data.data.goods_name,
  4265 + 54*unit, 770*unit, 240*unit, 240*unit, unit);
  4266 + // 9.小程序码
  4267 + context.drawImage(vpath, 375*unit, 660*unit, 120*unit, 120*unit);
  4268 + context.setFontSize(16*unit);
  4269 + context.setFillStyle('#777');
  4270 + context.fillText('长按识别二维码', 378*unit, 810*unit);
  4271 + // 10.竖线
  4272 + context.beginPath();
  4273 + context.setFillStyle('#eee');
  4274 + context.rect(354*unit, 670*unit, 1*unit, 130*unit);
  4275 + context.fill();
  4276 +
  4277 + },
  4278 +
  4279 +
4194 4280
4195 //--定义的保存图片方法,分享团--- 4281 //--定义的保存图片方法,分享团---
4196 saveImageToPhotosAlbum: function () { 4282 saveImageToPhotosAlbum: function () {
@@ -4241,67 +4327,90 @@ Page({ @@ -4241,67 +4327,90 @@ Page({
4241 os.stoid + "?sceneValue=" + scene + "&pageValue=pages/goods/goodsInfo/goodsInfo"; 4327 os.stoid + "?sceneValue=" + scene + "&pageValue=pages/goods/goodsInfo/goodsInfo";
4242 4328
4243 console.log(path3); 4329 console.log(path3);
  4330 +
4244 4331
4245 - //读取文件成功则OK-- 4332 + // 读取文件成功则OK--
4246 wx.getImageInfo({ 4333 wx.getImageInfo({
4247 src: path3, 4334 src: path3,
4248 success: function (res) { 4335 success: function (res) {
4249 - //回调写法 4336 + // 回调写法
4250 th.get_head_temp(th.get_goods_temp, function () { 4337 th.get_head_temp(th.get_goods_temp, function () {
4251 var vpath = res.path; 4338 var vpath = res.path;
4252 var context = wx.createCanvasContext('share'); 4339 var context = wx.createCanvasContext('share');
4253 - //先画背景 4340 + // 先画背景
4254 var pg_path = "../../../images/share/share_bg.png"; 4341 var pg_path = "../../../images/share/share_bg.png";
4255 4342
4256 // context.fillStyle="#FFFFFF"; 4343 // context.fillStyle="#FFFFFF";
4257 // context.fillRect(0,0,554 * unit, 899 * unit); 4344 // context.fillRect(0,0,554 * unit, 899 * unit);
  4345 +
  4346 + // if(type == 0) {
  4347 + // this.drawPoster(context);
  4348 + // return false;
  4349 + // };
  4350 +
4258 4351
4259 //-- 如果有自定义海报的时候,判断背景的图片 -- 4352 //-- 如果有自定义海报的时候,判断背景的图片 --
4260 if (th.data.share_b_img) { 4353 if (th.data.share_b_img) {
4261 pg_path = th.data.share_b_img; 4354 pg_path = th.data.share_b_img;
4262 } 4355 }
4263 - context.drawImage(pg_path, 0, 0, 554 * unit, 899 * unit); 4356 + // context.drawImage(pg_path, 0, 0, 554 * unit, 899 * unit);
  4357 +
  4358 +
  4359 + if(type == 0) { // 如果是普通商品,绘制新海报
  4360 + th.drawPoster(context, unit, th.data.share_goods_img, vpath);
  4361 + } else {
  4362 + context.drawImage(pg_path, 0, 0, 554 * unit, 899 * unit);
  4363 + };
  4364 +
  4365 + // th.drawPoster(context, unit, th.data.share_goods_img, vpath);
  4366 +
4264 4367
4265 //-- 是自定义海报的情况下 -- 4368 //-- 是自定义海报的情况下 --
4266 - if (th.data.poster && parseInt(th.data.poster.style) == 2) {  
4267 - //在线上分享人的情况下  
4268 - if (parseInt(th.data.poster.show_headpic)) {  
4269 - //获取坐标  
4270 - var x = parseFloat(th.data.poster.head_x) * 2;  
4271 - var y = parseFloat(th.data.poster.head_y) * 2;  
4272 - var x1 = (x + 90) * unit;  
4273 - var y1 = (y + 50) * unit;  
4274 - //--昵称---  
4275 - context.setFontSize(24 * unit)  
4276 - context.setFillStyle("black")  
4277 - context.fillText(app.globalData.userInfo.nickname, x1, y1);  
4278 - var width = 24 * app.globalData.userInfo.nickname.length * unit + 4 * unit;  
4279 - //强烈推荐 改许程  
4280 - var tj_path = "../../../images/share/q_tj.png";  
4281 - context.drawImage(tj_path, x1 + width, y1 - 22 * unit, 85 * unit, 30 * unit);  
4282 - context.setFontSize(16 * unit)  
4283 - context.setLineJoin('round'); //交点设置成圆角  
4284 - context.setFillStyle("white")  
4285 - context.fillText('强烈推荐', x1 + width + 8 * unit, y1 - 1 * unit);  
4286 -  
4287 - //context.setFillStyle("black")  
4288 - //context.setFontSize(24 * unit)  
4289 - //context.fillText(getApp().globalData.config.store_name, 40 * unit, 130 * unit);  
4290 - }  
4291 - } else {  
4292 - //--昵称---  
4293 - context.setFontSize(24 * unit)  
4294 - context.setFillStyle("black")  
4295 - context.fillText(app.globalData.userInfo.nickname, 152 * unit, 76 * unit);  
4296 - var width = 24 * app.globalData.userInfo.nickname.length * unit + 2 * unit;  
4297 - //强烈推荐 改许程  
4298 - var tj_path = "../../../images/share/q_tj.png";  
4299 - context.drawImage(tj_path, 152 * unit + width, 54 * unit, 85 * unit, 30 * unit);  
4300 - context.setFontSize(16 * unit);  
4301 - context.setLineJoin('round'); //交点设置成圆角  
4302 - context.setFillStyle("white");  
4303 - context.fillText('强烈推荐', 149 * unit + width + 15 * unit, 75 * unit);  
4304 - } 4369 + if(type != 0) {
  4370 +
  4371 + if (th.data.poster && parseInt(th.data.poster.style) == 2) {
  4372 + //在线上分享人的情况下
  4373 + if (parseInt(th.data.poster.show_headpic)) {
  4374 + //获取坐标
  4375 + var x = parseFloat(th.data.poster.head_x) * 2;
  4376 + var y = parseFloat(th.data.poster.head_y) * 2;
  4377 + var x1 = (x + 90) * unit;
  4378 + var y1 = (y + 50) * unit;
  4379 + //--昵称---
  4380 + context.setFontSize(24 * unit)
  4381 + context.setFillStyle("black")
  4382 + context.fillText(app.globalData.userInfo.nickname, x1, y1);
  4383 + var width = 24 * app.globalData.userInfo.nickname.length * unit + 4 * unit;
  4384 + //强烈推荐 改许程
  4385 + var tj_path = "../../../images/share/q_tj.png";
  4386 + context.drawImage(tj_path, x1 + width, y1 - 22 * unit, 85 * unit, 30 * unit);
  4387 + context.setFontSize(16 * unit);
  4388 + context.setLineJoin('round'); //交点设置成圆角
  4389 + context.setFillStyle("white");
  4390 + context.fillText('强烈推荐', x1 + width + 8 * unit, y1 - 1 * unit);
  4391 +
  4392 + //context.setFillStyle("black")
  4393 + //context.setFontSize(24 * unit)
  4394 + //context.fillText(getApp().globalData.config.store_name, 40 * unit, 130 * unit);
  4395 + }
  4396 + } else {
  4397 + //--昵称---
  4398 + context.setFontSize(24 * unit);
  4399 + context.setFillStyle("black");
  4400 + context.fillText(app.globalData.userInfo.nickname, 152 * unit, 76 * unit);
  4401 + var width = 24 * app.globalData.userInfo.nickname.length * unit + 2 * unit;
  4402 + //强烈推荐 改许程
  4403 + var tj_path = "../../../images/share/q_tj.png";
  4404 + context.drawImage(tj_path, 152 * unit + width, 54 * unit, 85 * unit, 30 * unit);
  4405 + context.setFontSize(16 * unit);
  4406 + context.setLineJoin('round'); //交点设置成圆角
  4407 + context.setFillStyle("white");
  4408 + context.fillText('强烈推荐', 149 * unit + width + 15 * unit, 75 * unit);
  4409 + }
  4410 +
  4411 + };
  4412 +
  4413 +
4305 4414
4306 var share_title = th.data.data.goods_name; 4415 var share_title = th.data.data.goods_name;
4307 if (th.data.prom_type == 1 || th.data.prom_type == 6 || th.data.prom_type == 4) { 4416 if (th.data.prom_type == 1 || th.data.prom_type == 6 || th.data.prom_type == 4) {
@@ -4312,7 +4421,7 @@ Page({ @@ -4312,7 +4421,7 @@ Page({
4312 4421
4313 //---产品名称--- 4422 //---产品名称---
4314 //文本换行 参数:1、canvas对象,2、文本 3、距离左侧的距离 4、距离顶部的距离 5、6、文本的宽度 4423 //文本换行 参数:1、canvas对象,2、文本 3、距离左侧的距离 4、距离顶部的距离 5、6、文本的宽度
4315 - if (type != 4) { 4424 + if (type != 4 && type != 0) {
4316 context.setFillStyle("black"); 4425 context.setFillStyle("black");
4317 context.setFontSize(21.3 * unit) 4426 context.setFontSize(21.3 * unit)
4318 th.draw_Text(context, share_title, 4427 th.draw_Text(context, share_title,
@@ -4345,7 +4454,7 @@ Page({ @@ -4345,7 +4454,7 @@ Page({
4345 context.lineTo(wd2 + ut.measureText(pri0, 22 * unit) + 5, 206 * unit); 4454 context.lineTo(wd2 + ut.measureText(pri0, 22 * unit) + 5, 206 * unit);
4346 context.stroke(); 4455 context.stroke();
4347 4456
4348 - } else { 4457 + } else if(type == 4 && type != 0) {
4349 context.setFillStyle("black"); 4458 context.setFillStyle("black");
4350 context.setFontSize(21.3 * unit) 4459 context.setFontSize(21.3 * unit)
4351 th.draw_Text(context, share_title, 4460 th.draw_Text(context, share_title,
@@ -4365,10 +4474,15 @@ Page({ @@ -4365,10 +4474,15 @@ Page({
4365 } 4474 }
4366 4475
4367 //---中间大图--- 4476 //---中间大图---
4368 - context.drawImage(th.data.share_goods_img, 70 * unit, 250 * unit, 408 * unit, 408 * unit); 4477 + if(type != 0) {
  4478 + context.drawImage(th.data.share_goods_img, 70 * unit, 250 * unit, 408 * unit, 408 * unit);
  4479 + };
  4480 +
  4481 +
  4482 +
4369 //-------大图后面就不一样了----------- 4483 //-------大图后面就不一样了-----------
4370 switch (type) { 4484 switch (type) {
4371 - case 0: //普通商品的展示 4485 + case 0: break;//普通商品的展示
4372 case 4: 4486 case 4:
4373 //中间的几个字 4487 //中间的几个字
4374 if (th.data.poster && parseInt(th.data.poster.style) == 2) { 4488 if (th.data.poster && parseInt(th.data.poster.style) == 2) {
@@ -4435,7 +4549,6 @@ Page({ @@ -4435,7 +4549,6 @@ Page({
4435 context.fillText("长按识别二维码", 40 * unit, 806 * unit); 4549 context.fillText("长按识别二维码", 40 * unit, 806 * unit);
4436 context.fillText("立即开始兑换", 40 * unit, 846 * unit); 4550 context.fillText("立即开始兑换", 40 * unit, 846 * unit);
4437 4551
4438 -  
4439 } 4552 }
4440 4553
4441 //---二维吗图--- 4554 //---二维吗图---
@@ -4447,7 +4560,7 @@ Page({ @@ -4447,7 +4560,7 @@ Page({
4447 } else { 4560 } else {
4448 //---二维吗图--- 4561 //---二维吗图---
4449 context.drawImage(vpath, 390 * unit, 726 * unit, 136 * unit, 136 * unit); 4562 context.drawImage(vpath, 390 * unit, 726 * unit, 136 * unit, 136 * unit);
4450 - } 4563 + };
4451 4564
4452 break; 4565 break;
4453 case 1: //秒杀商品的展示 4566 case 1: //秒杀商品的展示
@@ -4490,7 +4603,6 @@ Page({ @@ -4490,7 +4603,6 @@ Page({
4490 context.lineTo(520 * unit, 670 * unit) 4603 context.lineTo(520 * unit, 670 * unit)
4491 context.stroke(); 4604 context.stroke();
4492 //---文字--- 4605 //---文字---
4493 -  
4494 context.setFillStyle("black") 4606 context.setFillStyle("black")
4495 context.setFontSize(24 * unit) 4607 context.setFontSize(24 * unit)
4496 context.fillText(th.data.sto_sele_name_1, 40 * unit, 720 * unit); 4608 context.fillText(th.data.sto_sele_name_1, 40 * unit, 720 * unit);
@@ -4536,7 +4648,6 @@ Page({ @@ -4536,7 +4648,6 @@ Page({
4536 context.lineTo(520 * unit, 670 * unit) 4648 context.lineTo(520 * unit, 670 * unit)
4537 context.stroke(); 4649 context.stroke();
4538 //---文字--- 4650 //---文字---
4539 -  
4540 context.setFillStyle("black") 4651 context.setFillStyle("black")
4541 context.setFontSize(24 * unit) 4652 context.setFontSize(24 * unit)
4542 context.fillText(th.data.sto_sele_name_1, 40 * unit, 720 * unit); 4653 context.fillText(th.data.sto_sele_name_1, 40 * unit, 720 * unit);
@@ -4587,45 +4698,50 @@ Page({ @@ -4587,45 +4698,50 @@ Page({
4587 4698
4588 4699
4589 //--- 如果是自定义海报的时候 --- 4700 //--- 如果是自定义海报的时候 ---
4590 - if (th.data.poster && parseInt(th.data.poster.style) == 2) {  
4591 -  
4592 - //如果显示会员信息的话  
4593 - if (parseInt(th.data.poster.show_headpic)) {  
4594 - //获取坐标  
4595 - var x = parseFloat(th.data.poster.head_x) * 2;  
4596 - var y = parseFloat(th.data.poster.head_y) * 2;  
4597 - //---绘制圆形要放在最后----  
4598 - context.save();  
4599 - context.beginPath();  
4600 - var h_x = x * unit;  
4601 - var h_y = y * unit;  
4602 - var h_r = 40 * unit;  
4603 - var cx = h_x + h_r;  
4604 - var cy = h_y + h_r;  
4605 - context.arc(cx, cy, h_r, 0, Math.PI * 2, false);  
4606 - context.closePath();  
4607 - context.fill();  
4608 - context.clip();  
4609 - context.drawImage(th.data.share_head, h_x, h_y, h_r * 2, h_r * 2);  
4610 - context.restore();  
4611 - }  
4612 -  
4613 - } else {  
4614 - //---绘制圆形要放在最后----  
4615 - context.save();  
4616 - context.beginPath();  
4617 - var h_x = 60 * unit;  
4618 - var h_y = 24 * unit;  
4619 - var h_r = 40 * unit;  
4620 - var cx = h_x + h_r;  
4621 - var cy = h_y + h_r;  
4622 - context.arc(cx, cy, h_r, 0, Math.PI * 2, false);  
4623 - context.closePath();  
4624 - context.fill();  
4625 - context.clip();  
4626 - context.drawImage(th.data.share_head, h_x, h_y, h_r * 2, h_r * 2);  
4627 - context.restore();  
4628 - } 4701 + if(type != 0) {
  4702 +
  4703 + if (th.data.poster && parseInt(th.data.poster.style) == 2) {
  4704 +
  4705 + //如果显示会员信息的话
  4706 + if (parseInt(th.data.poster.show_headpic)) {
  4707 + //获取坐标
  4708 + var x = parseFloat(th.data.poster.head_x) * 2;
  4709 + var y = parseFloat(th.data.poster.head_y) * 2;
  4710 + //---绘制圆形要放在最后----
  4711 + context.save();
  4712 + context.beginPath();
  4713 + var h_x = x * unit;
  4714 + var h_y = y * unit;
  4715 + var h_r = 40 * unit;
  4716 + var cx = h_x + h_r;
  4717 + var cy = h_y + h_r;
  4718 + context.arc(cx, cy, h_r, 0, Math.PI * 2, false);
  4719 + context.closePath();
  4720 + context.fill();
  4721 + context.clip();
  4722 + context.drawImage(th.data.share_head, h_x, h_y, h_r * 2, h_r * 2);
  4723 + context.restore();
  4724 + }
  4725 +
  4726 + } else {
  4727 + //---绘制圆形要放在最后----
  4728 + context.save();
  4729 + context.beginPath();
  4730 + var h_x = 60 * unit;
  4731 + var h_y = 24 * unit;
  4732 + var h_r = 40 * unit;
  4733 + var cx = h_x + h_r;
  4734 + var cy = h_y + h_r;
  4735 + context.arc(cx, cy, h_r, 0, Math.PI * 2, false);
  4736 + context.closePath();
  4737 + context.fill();
  4738 + context.clip();
  4739 + context.drawImage(th.data.share_head, h_x, h_y, h_r * 2, h_r * 2);
  4740 + context.restore();
  4741 + }
  4742 +
  4743 + };
  4744 +
4629 4745
4630 4746
4631 //把画板内容绘制成图片,并回调 画板图片路径 4747 //把画板内容绘制成图片,并回调 画板图片路径
pages/goods/goodsInfo/goodsInfo.wxml
@@ -289,8 +289,7 @@ @@ -289,8 +289,7 @@
289 </view> 289 </view>
290 </view> 290 </view>
291 <view class="fs32 xc-black3 ai_and carde_frame"> 291 <view class="fs32 xc-black3 ai_and carde_frame">
292 - <text class="fs26">¥</text>  
293 - {{g_filters.get_card_price(data,card_list,0)}} 292 + <text class="fs26">¥</text>{{g_filters.get_card_price(data,card_list,0)}}
294 </view> 293 </view>
295 </view> 294 </view>
296 <!-- 等级卡的显示,购买, 等级卡近30天要显示续费 --> 295 <!-- 等级卡的显示,购买, 等级卡近30天要显示续费 -->
@@ -308,10 +307,7 @@ @@ -308,10 +307,7 @@
308 <view class="card-effect"> 307 <view class="card-effect">
309 <view class="fs24 xc-black3"> 308 <view class="fs24 xc-black3">
310 成为{{g_filters.get_card_price(data,card_list,1)}}立 309 成为{{g_filters.get_card_price(data,card_list,1)}}立
311 - <text class="co-red">  
312 - 省{{filters.toFix(data.shop_price-g_filters.get_card_price(data,card_list,0),2)}}  
313 - </text>  
314 - 元 310 + <text class="co-red">省{{filters.toFix(data.shop_price-g_filters.get_card_price(data,card_list,0),2)}}</text>元
315 </view> 311 </view>
316 <view class="fs22 xc-ash">开通会员 尽享更多优惠</view> 312 <view class="fs22 xc-ash">开通会员 尽享更多优惠</view>
317 </view> 313 </view>
@@ -355,8 +351,8 @@ @@ -355,8 +351,8 @@
355 </view> 351 </view>
356 </view> 352 </view>
357 <view class="goods-num" wx:if="{{prom_type!=1}}"> 353 <view class="goods-num" wx:if="{{prom_type!=1}}">
358 - <view class="sales">销量:{{sele_g.sales_sum}}件</view>  
359 - <view class="stock">折扣:{{sele_g.disc}}折</view> 354 + <view class="sales">销量:{{data.sales_sum}}件</view>
  355 + <view class="stock">折扣:{{data.disc}}折</view>
360 <view class="stock">{{categories3[0].num}}人评价</view> 356 <view class="stock">{{categories3[0].num}}人评价</view>
361 </view> 357 </view>
362 <view wx:if="{{prom_type==1}}"> 358 <view wx:if="{{prom_type==1}}">
@@ -420,10 +416,7 @@ @@ -420,10 +416,7 @@
420 <image class="stores-img" src="{{iurl}}/miniapp/images/stores.png"></image> 416 <image class="stores-img" src="{{iurl}}/miniapp/images/stores.png"></image>
421 <view class="fs30" style="color:black;">选择门店</view> 417 <view class="fs30" style="color:black;">选择门店</view>
422 </view> 418 </view>
423 - <view class="red_bb fs26">  
424 - 更多门店  
425 - <text class="bg_jj"></text>  
426 - </view> 419 + <view class="red_bb fs26">更多门店<text class="bg_jj"></text></view>
427 </view> 420 </view>
428 <view wx:if="{{def_pick_store && def_pick_store.pickup_name}}"> 421 <view wx:if="{{def_pick_store && def_pick_store.pickup_name}}">
429 <view class="flex-space-between address ai_end pdv10"> 422 <view class="flex-space-between address ai_end pdv10">
@@ -1113,10 +1106,7 @@ @@ -1113,10 +1106,7 @@
1113 <image class="stores-img" src="{{iurl}}/miniapp/images/stores.png"></image> 1106 <image class="stores-img" src="{{iurl}}/miniapp/images/stores.png"></image>
1114 <view class="fs30" style="color:black;">选择门店</view> 1107 <view class="fs30" style="color:black;">选择门店</view>
1115 </view> 1108 </view>
1116 - <view class="red-co fs28" bindtap="choice_store">  
1117 - 更多门店  
1118 - <text class="right-arrow"></text>  
1119 - </view> 1109 + <view class="red-co fs28" bindtap="choice_store">更多门店<text class="right-arrow"></text></view>
1120 </view> 1110 </view>
1121 <view wx:if="{{only_pk && !only_pk.length}}">(库存不足)</view> 1111 <view wx:if="{{only_pk && !only_pk.length}}">(库存不足)</view>
1122 <block wx:else> 1112 <block wx:else>
@@ -1384,10 +1374,7 @@ @@ -1384,10 +1374,7 @@
1384 <icon bindtap="close_popup" class="modal-closes" color="black" size="22" type="cancel"></icon> 1374 <icon bindtap="close_popup" class="modal-closes" color="black" size="22" type="cancel"></icon>
1385 </view> 1375 </view>
1386 <view class="felx choose_more" bindtap="more_store"> 1376 <view class="felx choose_more" bindtap="more_store">
1387 - <text class="fs26 red-co" wx:if="{{is_show_sto_cat}}">  
1388 - {{choice_sort_store==0?'更多门店':'返回'}}  
1389 - </text>  
1390 - <view class="bg_rights" wx:if="{{is_show_sto_cat}}"></view> 1377 + <text class="fs26 red-co" wx:if="{{is_show_sto_cat}}">{{choice_sort_store==0?'更多门店':'返回'}}</text> <view class="bg_rights" wx:if="{{is_show_sto_cat}}"></view>
1391 </view> 1378 </view>
1392 </view> 1379 </view>
1393 </view> 1380 </view>
pages/goods/goodsInfo/goodsInfo.wxss
@@ -2690,7 +2690,7 @@ border-radius: 55rpx; @@ -2690,7 +2690,7 @@ border-radius: 55rpx;
2690 } 2690 }
2691 .carde_frame{ 2691 .carde_frame{
2692 height: 50rpx; 2692 height: 50rpx;
2693 - line-height: 18rpx 2693 + /* line-height: 18rpx */
2694 } 2694 }
2695 2695
2696 button.custom-service { line-height: normal; border: 0;} 2696 button.custom-service { line-height: normal; border: 0;}
pages/togoin/togoin.js
@@ -64,6 +64,14 @@ Page({ @@ -64,6 +64,14 @@ Page({
64 64
65 //-- 会员授权 -- 65 //-- 会员授权 --
66 bindGetUserInfo: function(ee) { 66 bindGetUserInfo: function(ee) {
  67 +
  68 + if(!this.data.isAgree) {
  69 + wx.showToast({
  70 + title: '请您先阅读和勾选指定的内容',
  71 + icon: 'none',
  72 + });
  73 + return false;
  74 + }
67 var that = this; 75 var that = this;
68 //-- 点击授权 -- 76 //-- 点击授权 --
69 that.getUserProfile(function(res){ 77 that.getUserProfile(function(res){
@@ -286,7 +294,30 @@ Page({ @@ -286,7 +294,30 @@ Page({
286 close_pop_back:function(){ 294 close_pop_back:function(){
287 this.close_pop(); 295 this.close_pop();
288 wx.navigateBack({ delta: 1}) 296 wx.navigateBack({ delta: 1})
289 - } 297 + },
  298 +
  299 +
  300 + // 是否同意协议
  301 + isAgree(e) {
  302 + let isAgree = null;
  303 + if(e.detail.value[0]) {
  304 + isAgree = true;
  305 + } else {
  306 + isAgree = false;
  307 + };
  308 + // this.data.isAgree = isAgree;
  309 + this.setData({
  310 + isAgree,
  311 + });
  312 + },
  313 +
  314 +
  315 + //通过路径跳转到其他页面
  316 + goto: function(e) {
  317 + console.log('xxxx', e);
  318 + var url = e.currentTarget.dataset.url;
  319 + getApp().goto(url);
  320 + },
290 321
291 322
292 323
pages/togoin/togoin.wxml
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 2
3 <!-- 登录图 --> 3 <!-- 登录图 -->
4 <view > 4 <view >
5 - <view class="logins flex-center2 ali-c flex" style="position: relative;top: 120rpx;"> 5 + <view class="logins flex-center2 ali-c flex" style="padding-top: 120rpx;">
6 <image mode="widthFix" bindtap="go_index" class="login_img_back" src="{{imghots}}/miniapp/images/loginbg.jpg"></image> 6 <image mode="widthFix" bindtap="go_index" class="login_img_back" src="{{imghots}}/miniapp/images/loginbg.jpg"></image>
7 <view class="middle_view"> 7 <view class="middle_view">
8 <image bindtap="go_index" class="login_img" src="{{store_logo}}" binderror="bind_bnerr" lazy-load="true" data-errorimg="store_logo"></image> 8 <image bindtap="go_index" class="login_img" src="{{store_logo}}" binderror="bind_bnerr" lazy-load="true" data-errorimg="store_logo"></image>
@@ -14,6 +14,13 @@ @@ -14,6 +14,13 @@
14 <!-- 登录按钮 --> 14 <!-- 登录按钮 -->
15 <view> 15 <view>
16 <view class="phones"> 16 <view class="phones">
  17 +
  18 + <view bindtap="" class="user-name flex-vertical fs24 jc-center">
  19 + <checkbox-group bindchange="isAgree">
  20 + <checkbox value="true"/>
  21 + </checkbox-group>
  22 + <view class="user-name-txt">我已阅读同意 <text class="gray" bindtap="goto" data-url="/packageA/pages/parseHtml/parseHtml?t=0">《用户使用协议》</text>与<text class="gray" bindtap="goto" data-url="/packageA/pages/parseHtml/parseHtml?t=1">《隐私政策》</text></view>
  23 + </view>
17 24
18 <!-- 授权获取基础信息 --> 25 <!-- 授权获取基础信息 -->
19 <block wx:if="{{canIUseGetUserProfile}}"> 26 <block wx:if="{{canIUseGetUserProfile}}">
pages/togoin/togoin.wxss
@@ -4,7 +4,7 @@ page{ @@ -4,7 +4,7 @@ page{
4 } 4 }
5 .logins { 5 .logins {
6 width: 100%; 6 width: 100%;
7 - padding-bottom: 130rpx; 7 + /* padding-bottom: 130rpx; */
8 background-position: center; 8 background-position: center;
9 background-repeat: no-repeat; 9 background-repeat: no-repeat;
10 background-size: cover 10 background-size: cover
@@ -26,7 +26,7 @@ page{ @@ -26,7 +26,7 @@ page{
26 border-radius: 48rpx; 26 border-radius: 48rpx;
27 color: rgb(255,255,255); 27 color: rgb(255,255,255);
28 font-size: 32rpx; 28 font-size: 32rpx;
29 - margin-top:150rpx; 29 + margin-top: 40rpx;
30 } 30 }
31 .we_chat{ 31 .we_chat{
32 width: 55rpx; 32 width: 55rpx;
@@ -65,3 +65,13 @@ button{ @@ -65,3 +65,13 @@ button{
65 .middle_view{ 65 .middle_view{
66 position: absolute; left: 0; width: 100%; text-align: center; 66 position: absolute; left: 0; width: 100%; text-align: center;
67 } 67 }
  68 +
  69 +/*checkbox 选项框大小 */
  70 +checkbox .wx-checkbox-input {
  71 + width: 30rpx;
  72 + height: 30rpx;
  73 +}
  74 +
  75 +.gray {
  76 + color: #767f8e;
  77 +}