作者 wumengyu

添加发布完成分享逻辑,修改canvas,添加个人资料接口,优化详情状态与订单状态,修改铜火柴,增加订单状态,

@@ -39,7 +39,7 @@ App({ @@ -39,7 +39,7 @@ App({
39 return new Promise(function (resolve, reject) { 39 return new Promise(function (resolve, reject) {
40 wx.getUserInfo({ 40 wx.getUserInfo({
41 success: function (user) { 41 success: function (user) {
42 - // console.log(user); 42 + console.log('获取用户信息',user);// gender:性别 0:未知、1:男、2:女
43 // 登录 43 // 登录
44 let url = '/portal/Login/getToken'; 44 let url = '/portal/Login/getToken';
45 wx.login({ 45 wx.login({

55.6 KB | 宽: | 高:

47.2 KB | 宽: | 高:

  • 两方对比
  • 交换覆盖
  • 透明覆盖
@@ -28,12 +28,11 @@ Page({ @@ -28,12 +28,11 @@ Page({
28 }, 28 },
29 //完成按钮 29 //完成按钮
30 goBack() { 30 goBack() {
31 - wx.redirectTo({url:'/pages/spell-list/spell-list?current=' + 1}) 31 + // wx.redirectTo({url:'/pages/spell-list/spell-list?current=' + 1})
32 }, 32 },
33 disableScroll() { 33 disableScroll() {
34 }, 34 },
35 handleBackground() { 35 handleBackground() {
36 - console.log('dianji');  
37 this.setData({is_showRelease_modal:false,}) 36 this.setData({is_showRelease_modal:false,})
38 }, 37 },
39 //输入标题 38 //输入标题
@@ -336,13 +335,6 @@ Page({ @@ -336,13 +335,6 @@ Page({
336 }, 335 },
337 336
338 /** 337 /**
339 - * 生命周期函数--监听页面卸载  
340 - */  
341 - onUnload: function () {  
342 -  
343 - },  
344 -  
345 - /**  
346 * 页面相关事件处理函数--监听用户下拉动作 338 * 页面相关事件处理函数--监听用户下拉动作
347 */ 339 */
348 onPullDownRefresh: function () { 340 onPullDownRefresh: function () {
@@ -359,7 +351,54 @@ Page({ @@ -359,7 +351,54 @@ Page({
359 /** 351 /**
360 * 用户点击右上角分享 352 * 用户点击右上角分享
361 */ 353 */
362 - onShareAppMessage: function () {  
363 -  
364 - } 354 + onShareAppMessage: function (res) {
  355 + let self = this;
  356 + if(res.from === 'button') {
  357 + return {
  358 + title: self.data.title, // 默认是小程序的名称(可以写slogan等)
  359 + path: '/pages/activity/detail/detail?id=' + self.data.id, // 默认是当前页面,必须是以‘/’开头的完整路径
  360 + imageUrl: self.data.images[0], //自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
  361 + success: function (res) {
  362 + if (res.errMsg == 'shareAppMessage:ok') {
  363 + console.log('转发成功之后');
  364 + wx.redirectTo({url:'/pages/activity/detail/detail?id=' + self.data.id})
  365 + }
  366 + },
  367 + fail: function () {
  368 + // 转发失败之后的回调
  369 + if (res.errMsg == 'shareAppMessage:fail cancel') {
  370 + // 用户取消转发
  371 + } else if (res.errMsg == 'shareAppMessage:fail') {
  372 + // 转发失败,其中 detail message 为详细失败信息
  373 + }
  374 + },
  375 + complete: function () {
  376 + // 转发结束之后的回调(转发成不成功都会执行)
  377 + console.log('转发结束之后');
  378 + wx.redirectTo({url:'/pages/activity/detail/detail?id=' + self.data.id})
  379 + }
  380 + }
  381 + }
  382 + // 设置菜单中的转发按钮触发转发事件时的转发内容
  383 + // var shareObj = {
  384 + // title: '火柴西路', // 默认是小程序的名称(可以写slogan等)
  385 + // path: '/pages/activity/detail/detail?id=' + this.data.id, // 默认是当前页面,必须是以‘/’开头的完整路径
  386 + // imageUrl: '', //自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
  387 + // success: function (res) {
  388 + // if (res.errMsg == 'shareAppMessage:ok') {
  389 + // }
  390 + // },
  391 + // fail: function () {
  392 + // // 转发失败之后的回调
  393 + // if (res.errMsg == 'shareAppMessage:fail cancel') {
  394 + // // 用户取消转发
  395 + // } else if (res.errMsg == 'shareAppMessage:fail') {
  396 + // // 转发失败,其中 detail message 为详细失败信息
  397 + // }
  398 + // },
  399 + // complete: function () {
  400 + // // 转发结束之后的回调(转发成不成功都会执行)
  401 + // }
  402 + // }
  403 + },
365 }) 404 })
@@ -106,7 +106,7 @@ @@ -106,7 +106,7 @@
106 <image class="sorry-img" src="../../images/success@2x.png"></image> 106 <image class="sorry-img" src="../../images/success@2x.png"></image>
107 <view class="title">恭喜您发布成功</view> 107 <view class="title">恭喜您发布成功</view>
108 <view class="view-btn" catchtap="goMyRelease">查看我的发布</view> 108 <view class="view-btn" catchtap="goMyRelease">查看我的发布</view>
109 - <view class="complete-btn" catchtap="goBack">完成</view> 109 + <button class="complete-btn" catchtap="goBack" open-type="share">分享</button>
110 </view> 110 </view>
111 <view class="modal_box" wx:if="{{is_showRelease_modal}}" bindtap="handleBackground" 111 <view class="modal_box" wx:if="{{is_showRelease_modal}}" bindtap="handleBackground"
112 catchtouchmove="disableScroll"></view> 112 catchtouchmove="disableScroll"></view>
@@ -45,7 +45,8 @@ Page({ @@ -45,7 +45,8 @@ Page({
45 }, 45 },
46 //查看我的订单 46 //查看我的订单
47 goMyOrder() { 47 goMyOrder() {
48 - wx.redirectTo({url:'/pages/order/order-detail/order-detail?id=' + this.data.order_id}) 48 + this.setData({is_showRelease_modal:false,});
  49 + wx.navigateTo({url:'/pages/order/order-detail/order-detail?id=' + this.data.order_id})
49 }, 50 },
50 //完成按钮 51 //完成按钮
51 goBack() { 52 goBack() {
@@ -54,7 +55,6 @@ Page({ @@ -54,7 +55,6 @@ Page({
54 disableScroll() { 55 disableScroll() {
55 }, 56 },
56 handleBackground() { 57 handleBackground() {
57 - console.log('dianji');  
58 this.setData({is_showRelease_modal:false,}) 58 this.setData({is_showRelease_modal:false,})
59 }, 59 },
60 // 问一问 60 // 问一问
@@ -517,34 +517,34 @@ Page({ @@ -517,34 +517,34 @@ Page({
517 // ctx.clip(); 517 // ctx.clip();
518 //填充背景色 518 //填充背景色
519 ctx.fillStyle = '#fff'; 519 ctx.fillStyle = '#fff';
520 - ctx.fillRect(0, 0, 300, 400); 520 + ctx.fillRect(0, 0, 280, 400);
521 console.log(self.data.local_img); 521 console.log(self.data.local_img);
522 console.log(self.data.qr_code); 522 console.log(self.data.qr_code);
523 //将图片转化为画布 523 //将图片转化为画布
524 - ctx.drawImage(self.data.local_img, 0, 0, 300, 170);//详情图 524 + ctx.drawImage(self.data.local_img, 0, 0, 280, 280);//详情图
525 console.log(111); 525 console.log(111);
526 // ctx.drawImage(self.data.local_qr_code, 220, 209, 60, 60);//二维码 526 // ctx.drawImage(self.data.local_qr_code, 220, 209, 60, 60);//二维码
527 - ctx.drawImage('../../../images/qr_code.jpg', 220, 209, 60, 60);//二维 527 + ctx.drawImage('../../../images/qr_code.jpg', 180, 320, 60, 60);//小程序
528 //标题 528 //标题
529 - ctx.setFontSize(16); 529 + ctx.setFontSize(12);
530 ctx.setFillStyle('#000'); 530 ctx.setFillStyle('#000');
531 ctx.textAlign = "left"; 531 ctx.textAlign = "left";
532 console.log(111); 532 console.log(111);
533 - ctx.fillText(self.data.detail.title, 26, 196.5);  
534 - ctx.fillText(self.data.detail.title, 25.5, 197); 533 + ctx.fillText(self.data.detail.title, 16, 306.5);
  534 + ctx.fillText(self.data.detail.title, 15.5, 307);
535 ctx.restore(); 535 ctx.restore();
536 //地点 536 //地点
537 - ctx.setFontSize(13); 537 + ctx.setFontSize(9);
538 ctx.setFillStyle('#000000'); 538 ctx.setFillStyle('#000000');
539 - ctx.fillText('地点:', 25, 229);  
540 - const text = self.data.detail.address; 539 + ctx.fillText('地点:', 16, 325);
  540 + const text = self.data.detail.name;
541 var chr = text.split("");//这个方法是将一个字符串分割成字符串数组 541 var chr = text.split("");//这个方法是将一个字符串分割成字符串数组
542 var temp = ""; 542 var temp = "";
543 var row = []; 543 var row = [];
544 - ctx.setFontSize(13); 544 + ctx.setFontSize(9);
545 ctx.setFillStyle('#000000'); 545 ctx.setFillStyle('#000000');
546 for (var a = 0; a < chr.length; a++) { 546 for (var a = 0; a < chr.length; a++) {
547 - if (ctx.measureText(temp).width < 170) { 547 + if (ctx.measureText(temp).width < 100) {
548 temp += chr[a]; 548 temp += chr[a];
549 } 549 }
550 else { 550 else {
@@ -562,7 +562,7 @@ Page({ @@ -562,7 +562,7 @@ Page({
562 var test = ""; 562 var test = "";
563 var empty = []; 563 var empty = [];
564 for (var a = 0; a < rowPart.length; a++) { 564 for (var a = 0; a < rowPart.length; a++) {
565 - if (ctx.measureText(test).width < 170) { 565 + if (ctx.measureText(test).width < 100) {
566 test += rowPart[a]; 566 test += rowPart[a];
567 } 567 }
568 else { 568 else {
@@ -575,14 +575,14 @@ Page({ @@ -575,14 +575,14 @@ Page({
575 row = rowCut; 575 row = rowCut;
576 } 576 }
577 for (var b = 0; b < row.length; b++) { 577 for (var b = 0; b < row.length; b++) {
578 - ctx.fillText(row[b], 63, 229 + b * 16, 150); 578 + ctx.fillText(row[b], 40, 325 + b * 16, 150);
579 } 579 }
580 ctx.restore(); 580 ctx.restore();
581 //时间 581 //时间
582 - ctx.setFontSize(13); 582 + ctx.setFontSize(9);
583 ctx.setFillStyle('#333333'); 583 ctx.setFillStyle('#333333');
584 - ctx.fillText('时间:', 25, 249);  
585 - ctx.fillText(self.data.end_time, 63, 249); 584 + ctx.fillText('时间:', 16, 340);
  585 + ctx.fillText(self.data.end_time, 40, 340);
586 ctx.restore(); 586 ctx.restore();
587 // ctx.drawImage("../../../../images/home-banner.png", 0, 0, 250, 150) 587 // ctx.drawImage("../../../../images/home-banner.png", 0, 0, 250, 150)
588 //成功执行,draw方法中进行回调 588 //成功执行,draw方法中进行回调
@@ -662,10 +662,10 @@ Page({ @@ -662,10 +662,10 @@ Page({
662 wx.canvasToTempFilePath({ 662 wx.canvasToTempFilePath({
663 x: 0, 663 x: 0,
664 y: 0, 664 y: 0,
665 - width: 300,  
666 - height: 300,  
667 - destWidth: 300,  
668 - destHeight: 300, 665 + width: 280,
  666 + height: 400,
  667 + destWidth: 560,
  668 + destHeight: 800,
669 canvasId: 'canvas', 669 canvasId: 'canvas',
670 fileType: 'jpg', 670 fileType: 'jpg',
671 quality:1, 671 quality:1,
@@ -109,7 +109,7 @@ @@ -109,7 +109,7 @@
109 </view> 109 </view>
110 <view class="people-num"> 110 <view class="people-num">
111 <view class="name">{{item.name}}</view> 111 <view class="name">{{item.name}}</view>
112 - <view class="num">({{item.number}})</view> 112 + <view class="num">{{item.number}}人</view>
113 </view> 113 </view>
114 </view> 114 </view>
115 </view> 115 </view>
@@ -197,14 +197,16 @@ @@ -197,14 +197,16 @@
197 </view> 197 </view>
198 <form bindsubmit="confirmJoin" bindreset="formReset" report-submit="true"> 198 <form bindsubmit="confirmJoin" bindreset="formReset" report-submit="true">
199 <!-- // (0全部,2待拼成,3人数不足未拼成,4已拼成,5已取消,6已完成,7已评价,8已拼成(活动未结束),9删除--> 199 <!-- // (0全部,2待拼成,3人数不足未拼成,4已拼成,5已取消,6已完成,7已评价,8已拼成(活动未结束),9删除-->
200 - <button class="confirm-join-btn {{is_send === 1 && detail.status !== 8?'gray':''}}" form-type="submit"> 200 + <button class="confirm-join-btn {{is_send === 1?'gray':''}}" form-type="submit">
201 <text wx:if="{{is_send === 1 && detail.status === 2}}">待拼成</text> 201 <text wx:if="{{is_send === 1 && detail.status === 2}}">待拼成</text>
202 - <text wx:if="{{is_send === 2 &&detail.status === 2}}">确认拼活动</text> 202 + <text wx:if="{{is_send === 1 && detail.status === 8}}">待完成</text>
  203 + <text wx:if="{{is_send === 2 && detail.status === 8 }}">确认拼活动</text>
  204 + <text wx:if="{{is_send === 2 && detail.status === 2 }}">确认拼活动</text>
203 <text wx:if="{{detail.status === 3}}">未拼成</text> 205 <text wx:if="{{detail.status === 3}}">未拼成</text>
204 <text wx:if="{{detail.status === 4}}">已拼成</text> 206 <text wx:if="{{detail.status === 4}}">已拼成</text>
205 <text wx:if="{{detail.status === 5}}">已取消</text> 207 <text wx:if="{{detail.status === 5}}">已取消</text>
206 <text wx:if="{{detail.status === 6 || detail.status === 7}}">已完成</text> 208 <text wx:if="{{detail.status === 6 || detail.status === 7}}">已完成</text>
207 - <text wx:if="{{detail.status === 8}}">已拼成</text> 209 + <!--<text wx:if="{{detail.status === 8}}">已拼成</text>-->
208 <text wx:if="{{detail.status === 9}}">已删除</text> 210 <text wx:if="{{detail.status === 9}}">已删除</text>
209 </button> 211 </button>
210 </form> 212 </form>
@@ -245,7 +245,8 @@ swiper { @@ -245,7 +245,8 @@ swiper {
245 align-items: center; 245 align-items: center;
246 } 246 }
247 .people-num .name { 247 .people-num .name {
248 - width:100rpx; 248 + /* width:100rpx; */
  249 + margin-right:10rpx;
249 text-align: center; 250 text-align: center;
250 /* margin-right: 10rpx; */ 251 /* margin-right: 10rpx; */
251 color: #333333; 252 color: #333333;
@@ -605,8 +606,8 @@ swiper { @@ -605,8 +606,8 @@ swiper {
605 } 606 }
606 .canvas-poster { 607 .canvas-poster {
607 /* position: fixed; */ 608 /* position: fixed; */
608 - /* width: 600rpx; */  
609 - height: 678rpx; 609 + width: 260px;
  610 + height: 400px;
610 /* top: 100%; */ 611 /* top: 100%; */
611 /* left: 100%; */ 612 /* left: 100%; */
612 /* overflow: hidden; */ 613 /* overflow: hidden; */
@@ -616,12 +617,12 @@ swiper { @@ -616,12 +617,12 @@ swiper {
616 display: flex; 617 display: flex;
617 align-items: center; 618 align-items: center;
618 justify-content: space-between; 619 justify-content: space-between;
619 - height: 56rpx; 620 + height: 76rpx;
620 /* border-top: 1rpx solid #E8E8E8; */ 621 /* border-top: 1rpx solid #E8E8E8; */
621 } 622 }
622 .save-to-phone, .share-btn{ 623 .save-to-phone, .share-btn{
623 width: 50%; 624 width: 50%;
624 - line-height: 56rpx; 625 + line-height: 76rpx;
625 color:#fff; 626 color:#fff;
626 font-size: 24rpx; 627 font-size: 24rpx;
627 text-align: center; 628 text-align: center;
@@ -256,11 +256,12 @@ swiper { @@ -256,11 +256,12 @@ swiper {
256 .tandian-box .left image { 256 .tandian-box .left image {
257 width: 50rpx; 257 width: 50rpx;
258 height: 32rpx; 258 height: 32rpx;
259 - margin-right: 6rpx; 259 + margin-right: 16rpx;
260 } 260 }
261 .tandian-box .left text { 261 .tandian-box .left text {
262 color:#191919; 262 color:#191919;
263 font-size: 30rpx; 263 font-size: 30rpx;
  264 + font-weight: bold;
264 } 265 }
265 .tandian-box .right image{ 266 .tandian-box .right image{
266 width: 14rpx; 267 width: 14rpx;
@@ -440,13 +441,14 @@ swiper { @@ -440,13 +441,14 @@ swiper {
440 box-sizing: border-box; 441 box-sizing: border-box;
441 } 442 }
442 .record-box image { 443 .record-box image {
443 - margin-right: 6rpx; 444 + margin-right: 16rpx;
444 width: 34rpx; 445 width: 34rpx;
445 height: 46rpx; 446 height: 46rpx;
446 } 447 }
447 .record-box text { 448 .record-box text {
448 color: #191919; 449 color: #191919;
449 font-size: 30rpx; 450 font-size: 30rpx;
  451 + font-weight: bold;
450 } 452 }
451 /*.imgs-box {*/ 453 /*.imgs-box {*/
452 /*width: 100%;*/ 454 /*width: 100%;*/
@@ -640,7 +642,7 @@ swiper { @@ -640,7 +642,7 @@ swiper {
640 .score-box { 642 .score-box {
641 height:696rpx; 643 height:696rpx;
642 /* top:68%; */ 644 /* top:68%; */
643 - background-image: url('http://pk86rwhci.bkt.clouddn.com/dsdfhgfhfdh@2x.png'); 645 + background-image: url('http://qiniuyun.wmatchrd.com/dsdfhgfhfdh@2x.png');
644 background-repeat: no-repeat; 646 background-repeat: no-repeat;
645 -webkit-background-size: 100%; 647 -webkit-background-size: 100%;
646 background-size: 100%; 648 background-size: 100%;
@@ -690,7 +692,8 @@ swiper { @@ -690,7 +692,8 @@ swiper {
690 } 692 }
691 .normal-box { 693 .normal-box {
692 height: 540rpx; 694 height: 540rpx;
693 - background-image: url('http://pk86rwhci.bkt.clouddn.com/safsfdsghk@2x.png'); 695 + /*background-image: url('http://pk86rwhci.bkt.clouddn.com/safsfdsghk@2x.png');*/
  696 + background-image: url('http://qiniuyun.wmatchrd.com/safsfdsghk@2x.png');
694 } 697 }
695 .normal-box .close-btn { 698 .normal-box .close-btn {
696 margin-top: 52rpx; 699 margin-top: 52rpx;
@@ -45,12 +45,18 @@ Page({ @@ -45,12 +45,18 @@ Page({
45 }, 45 },
46 //查看我的订单 46 //查看我的订单
47 goMyRelease() { 47 goMyRelease() {
48 - wx.redirectTo({url:'/pages/order/order-detail/order-detail?id=' + this.data.order_id}) 48 + this.setData({is_showRelease_modal:false,});
  49 + wx.navigateTo({url:'/pages/order/order-detail/order-detail?id=' + this.data.order_id})
49 }, 50 },
50 //完成按钮 51 //完成按钮
51 goBack() { 52 goBack() {
52 wx.redirectTo({url:'/pages/spell-list/spell-list?current=' + 0}) 53 wx.redirectTo({url:'/pages/spell-list/spell-list?current=' + 0})
53 }, 54 },
  55 + disableScroll() {
  56 + },
  57 + handleBackground() {
  58 + this.setData({is_showRelease_modal:false,})
  59 + },
54 // 问一问 60 // 问一问
55 ask(e) { 61 ask(e) {
56 console.log('前问一问-display', this.data.display); 62 console.log('前问一问-display', this.data.display);
@@ -520,34 +526,34 @@ Page({ @@ -520,34 +526,34 @@ Page({
520 // ctx.clip(); 526 // ctx.clip();
521 //填充背景色 527 //填充背景色
522 ctx.fillStyle = '#fff'; 528 ctx.fillStyle = '#fff';
523 - ctx.fillRect(0, 0, 300, 400); 529 + ctx.fillRect(0, 0, 280, 400);
524 console.log(self.data.local_img); 530 console.log(self.data.local_img);
525 console.log(self.data.qr_code); 531 console.log(self.data.qr_code);
526 //将图片转化为画布 532 //将图片转化为画布
527 - ctx.drawImage(self.data.local_img, 0, 0, 300, 170);//详情图 533 + ctx.drawImage(self.data.local_img, 0, 0, 280, 280);//详情图
528 console.log(111); 534 console.log(111);
529 // ctx.drawImage(self.data.local_qr_code, 220, 209, 60, 60);//二维码 535 // ctx.drawImage(self.data.local_qr_code, 220, 209, 60, 60);//二维码
530 - ctx.drawImage('../../../images/qr_code.jpg', 220, 209, 60, 60);//二维 536 + ctx.drawImage('../../../images/qr_code.jpg', 180, 320, 60, 60);//小程序
531 //标题 537 //标题
532 - ctx.setFontSize(16); 538 + ctx.setFontSize(12);
533 ctx.setFillStyle('#000'); 539 ctx.setFillStyle('#000');
534 ctx.textAlign = "left"; 540 ctx.textAlign = "left";
535 console.log(111); 541 console.log(111);
536 - ctx.fillText(self.data.detail.title, 26, 196.5);  
537 - ctx.fillText(self.data.detail.title, 25.5, 197); 542 + ctx.fillText(self.data.detail.title, 16, 306.5);
  543 + ctx.fillText(self.data.detail.title, 15.5, 307);
538 ctx.restore(); 544 ctx.restore();
539 //地点 545 //地点
540 - ctx.setFontSize(13); 546 + ctx.setFontSize(9);
541 ctx.setFillStyle('#000000'); 547 ctx.setFillStyle('#000000');
542 - ctx.fillText('地点:', 25, 229);  
543 - const text = self.data.detail.address; 548 + ctx.fillText('地点:', 16, 325);
  549 + const text = self.data.detail.name;
544 var chr = text.split("");//这个方法是将一个字符串分割成字符串数组 550 var chr = text.split("");//这个方法是将一个字符串分割成字符串数组
545 var temp = ""; 551 var temp = "";
546 var row = []; 552 var row = [];
547 - ctx.setFontSize(13); 553 + ctx.setFontSize(9);
548 ctx.setFillStyle('#000000'); 554 ctx.setFillStyle('#000000');
549 for (var a = 0; a < chr.length; a++) { 555 for (var a = 0; a < chr.length; a++) {
550 - if (ctx.measureText(temp).width < 170) { 556 + if (ctx.measureText(temp).width < 100) {
551 temp += chr[a]; 557 temp += chr[a];
552 } 558 }
553 else { 559 else {
@@ -565,7 +571,7 @@ Page({ @@ -565,7 +571,7 @@ Page({
565 var test = ""; 571 var test = "";
566 var empty = []; 572 var empty = [];
567 for (var a = 0; a < rowPart.length; a++) { 573 for (var a = 0; a < rowPart.length; a++) {
568 - if (ctx.measureText(test).width < 170) { 574 + if (ctx.measureText(test).width < 100) {
569 test += rowPart[a]; 575 test += rowPart[a];
570 } 576 }
571 else { 577 else {
@@ -578,19 +584,19 @@ Page({ @@ -578,19 +584,19 @@ Page({
578 row = rowCut; 584 row = rowCut;
579 } 585 }
580 for (var b = 0; b < row.length; b++) { 586 for (var b = 0; b < row.length; b++) {
581 - ctx.fillText(row[b], 63, 229 + b * 16, 150); 587 + ctx.fillText(row[b], 40, 325 + b * 16, 150);
582 } 588 }
583 ctx.restore(); 589 ctx.restore();
584 //时间 590 //时间
585 - ctx.setFontSize(13); 591 + ctx.setFontSize(9);
586 ctx.setFillStyle('#333333'); 592 ctx.setFillStyle('#333333');
587 - ctx.fillText('时间:', 25, 249);  
588 - ctx.fillText(self.data.end_time, 63, 249); 593 + ctx.fillText('时间:', 16, 340);
  594 + ctx.fillText(self.data.end_time, 40, 340);
589 ctx.restore(); 595 ctx.restore();
590 // ctx.drawImage("../../../../images/home-banner.png", 0, 0, 250, 150) 596 // ctx.drawImage("../../../../images/home-banner.png", 0, 0, 250, 150)
591 //成功执行,draw方法中进行回调 597 //成功执行,draw方法中进行回调
592 ctx.draw(true, function () { 598 ctx.draw(true, function () {
593 - // wx.hideLoading(); 599 + // wx.hideLoading();
594 console.log("draw callback success"); 600 console.log("draw callback success");
595 self.setData({can_save: true,show_canvas: true}); 601 self.setData({can_save: true,show_canvas: true});
596 console.log(self.data.can_save); 602 console.log(self.data.can_save);
@@ -665,10 +671,10 @@ Page({ @@ -665,10 +671,10 @@ Page({
665 wx.canvasToTempFilePath({ 671 wx.canvasToTempFilePath({
666 x: 0, 672 x: 0,
667 y: 0, 673 y: 0,
668 - width: 300,  
669 - height: 300,  
670 - destWidth: 300,  
671 - destHeight: 300, 674 + width: 280,
  675 + height: 400,
  676 + destWidth: 560,
  677 + destHeight: 800,
672 canvasId: 'canvas', 678 canvasId: 'canvas',
673 fileType: 'jpg', 679 fileType: 'jpg',
674 quality:1, 680 quality:1,
@@ -109,7 +109,7 @@ @@ -109,7 +109,7 @@
109 </view> 109 </view>
110 <view class="people-num"> 110 <view class="people-num">
111 <view class="name">{{item.name}}</view> 111 <view class="name">{{item.name}}</view>
112 - <view class="num">({{item.number}})</view> 112 + <view class="num">{{item.number}}人</view>
113 </view> 113 </view>
114 </view> 114 </view>
115 </view> 115 </view>
@@ -201,12 +201,14 @@ @@ -201,12 +201,14 @@
201 <!--(0全部,2待拼成,3人数不足未拼成,4已拼成,5已取消,6已完成,7已评价,8已拼成(活动未结束),9删除--> 201 <!--(0全部,2待拼成,3人数不足未拼成,4已拼成,5已取消,6已完成,7已评价,8已拼成(活动未结束),9删除-->
202 <button class="confirm-join-btn {{is_send === 1 && detail.status !== 8?'gray':''}}" form-type="submit"> 202 <button class="confirm-join-btn {{is_send === 1 && detail.status !== 8?'gray':''}}" form-type="submit">
203 <text wx:if="{{is_send === 1 && detail.status === 2}}">待拼成</text> 203 <text wx:if="{{is_send === 1 && detail.status === 2}}">待拼成</text>
204 - <text wx:if="{{is_send === 2 && detail.status === 2}}">确认拼餐</text> 204 + <text wx:if="{{is_send === 1 && detail.status === 8}}">待完成</text>
  205 + <text wx:if="{{is_send === 2 && detail.status === 8 }}">确认拼活动</text>
  206 + <text wx:if="{{is_send === 2 && detail.status === 2 }}">确认拼活动</text>
205 <text wx:if="{{detail.status === 3}}">未拼成</text> 207 <text wx:if="{{detail.status === 3}}">未拼成</text>
206 <text wx:if="{{detail.status === 4}}">已拼成</text> 208 <text wx:if="{{detail.status === 4}}">已拼成</text>
207 <text wx:if="{{detail.status === 5}}">已取消</text> 209 <text wx:if="{{detail.status === 5}}">已取消</text>
208 <text wx:if="{{detail.status === 6 || detail.status === 7}}">已完成</text> 210 <text wx:if="{{detail.status === 6 || detail.status === 7}}">已完成</text>
209 - <text wx:if="{{detail.status === 8}}">已拼成</text> 211 + <!--<text wx:if="{{detail.status === 8}}">已拼成</text>-->
210 <text wx:if="{{detail.status === 9}}">已删除</text> 212 <text wx:if="{{detail.status === 9}}">已删除</text>
211 </button> 213 </button>
212 </form> 214 </form>
@@ -245,7 +245,8 @@ swiper { @@ -245,7 +245,8 @@ swiper {
245 align-items: center; 245 align-items: center;
246 } 246 }
247 .people-num .name { 247 .people-num .name {
248 - width:100rpx; 248 + /* width:100rpx; */
  249 + margin-right:10rpx;
249 text-align: center; 250 text-align: center;
250 /* margin-right: 10rpx; */ 251 /* margin-right: 10rpx; */
251 color: #333333; 252 color: #333333;
@@ -610,7 +611,8 @@ swiper { @@ -610,7 +611,8 @@ swiper {
610 .canvas-poster { 611 .canvas-poster {
611 /* position: fixed; */ 612 /* position: fixed; */
612 /* width: 600rpx; */ 613 /* width: 600rpx; */
613 - height: 678rpx; 614 + width: 260px;
  615 + height: 400px;
614 /* top: 100%; */ 616 /* top: 100%; */
615 /* left: 100%; */ 617 /* left: 100%; */
616 /* overflow: hidden; */ 618 /* overflow: hidden; */
@@ -620,12 +622,12 @@ swiper { @@ -620,12 +622,12 @@ swiper {
620 display: flex; 622 display: flex;
621 align-items: center; 623 align-items: center;
622 justify-content: space-between; 624 justify-content: space-between;
623 - height: 56rpx; 625 + height: 76rpx;
624 /*border-top: 1rpx solid #E8E8E8;*/ 626 /*border-top: 1rpx solid #E8E8E8;*/
625 } 627 }
626 .save-to-phone, .share-btn{ 628 .save-to-phone, .share-btn{
627 width: 50%; 629 width: 50%;
628 - line-height: 56rpx; 630 + line-height: 76rpx;
629 color:#fff; 631 color:#fff;
630 font-size: 24rpx; 632 font-size: 24rpx;
631 text-align: center; 633 text-align: center;
@@ -29,7 +29,7 @@ Page({ @@ -29,7 +29,7 @@ Page({
29 }, 29 },
30 //完成按钮 30 //完成按钮
31 goBack() { 31 goBack() {
32 - wx.redirectTo({url:'/pages/spell-list/spell-list?current=' + 0}) 32 + // wx.redirectTo({url:'/pages/spell-list/spell-list?current=' + 0})
33 }, 33 },
34 //输入标题 34 //输入标题
35 inputTitle(e) { 35 inputTitle(e) {
@@ -351,7 +351,29 @@ Page({ @@ -351,7 +351,29 @@ Page({
351 /** 351 /**
352 * 用户点击右上角分享 352 * 用户点击右上角分享
353 */ 353 */
354 - onShareAppMessage: function () {  
355 -  
356 - } 354 + onShareAppMessage: function (res) {
  355 + let self = this;
  356 + if(res.from === 'button') {
  357 + return {
  358 + title: self.data.title, // 默认是小程序的名称(可以写slogan等)
  359 + path: '/pages/meal/detail/detail?id=' + self.data.id, // 默认是当前页面,必须是以‘/’开头的完整路径
  360 + imageUrl: self.data.images[0], //自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
  361 + success: function (res) {
  362 + if (res.errMsg == 'shareAppMessage:ok') {
  363 + }
  364 + },
  365 + fail: function () {
  366 + // 转发失败之后的回调
  367 + if (res.errMsg == 'shareAppMessage:fail cancel') {
  368 + // 用户取消转发
  369 + } else if (res.errMsg == 'shareAppMessage:fail') {
  370 + // 转发失败,其中 detail message 为详细失败信息
  371 + }
  372 + },
  373 + complete: function () {
  374 + // 转发结束之后的回调(转发成不成功都会执行)
  375 + }
  376 + }
  377 + }
  378 + },
357 }) 379 })
@@ -115,7 +115,7 @@ @@ -115,7 +115,7 @@
115 <image class="sorry-img" src="../../images/success@2x.png"></image> 115 <image class="sorry-img" src="../../images/success@2x.png"></image>
116 <view class="title">恭喜您发布成功</view> 116 <view class="title">恭喜您发布成功</view>
117 <view class="view-btn" catchtap="goMyRelease">查看我的发布</view> 117 <view class="view-btn" catchtap="goMyRelease">查看我的发布</view>
118 - <view class="complete-btn" catchtap="goBack">完成</view> 118 + <button class="complete-btn" catchtap="goBack" open-type="share">分享</button>
119 </view> 119 </view>
120 <view class="modal_box" wx:if="{{is_showRelease_modal}}" bindtap="handleBackground" 120 <view class="modal_box" wx:if="{{is_showRelease_modal}}" bindtap="handleBackground"
121 catchtouchmove="disableScroll"></view> 121 catchtouchmove="disableScroll"></view>
@@ -77,12 +77,14 @@ Page({ @@ -77,12 +77,14 @@ Page({
77 inputCountry(e) { 77 inputCountry(e) {
78 this.setData({ 78 this.setData({
79 country: e.detail.value, 79 country: e.detail.value,
  80 + is_choose_country:true
80 }) 81 })
81 }, 82 },
82 //输入城市 83 //输入城市
83 inputCity(e) { 84 inputCity(e) {
84 this.setData({ 85 this.setData({
85 city: e.detail.value, 86 city: e.detail.value,
  87 + is_choose_city:true
86 }) 88 })
87 }, 89 },
88 //简介 90 //简介
@@ -101,6 +103,7 @@ Page({ @@ -101,6 +103,7 @@ Page({
101 this.setData({ 103 this.setData({
102 currentnum: len, 104 currentnum: len,
103 introduce: textcontent, 105 introduce: textcontent,
  106 + is_choose_introduce:true
104 }); 107 });
105 console.log('textcontent', textcontent); 108 console.log('textcontent', textcontent);
106 if(this.data.current_sex !== undefined && 109 if(this.data.current_sex !== undefined &&
@@ -118,27 +121,27 @@ Page({ @@ -118,27 +121,27 @@ Page({
118 //保存 121 //保存
119 submit() { 122 submit() {
120 console.log('this.data.phone_number.length', this.data.phone_number.length); 123 console.log('this.data.phone_number.length', this.data.phone_number.length);
121 - if(this.data.current_sex === undefined) { 124 + if(this.data.current_sex === undefined && this.data.user.sex === null) {
122 wx.showToast({title:'请选择性别',icon:'none'}) 125 wx.showToast({title:'请选择性别',icon:'none'})
123 - }else if(this.data.country === '') { 126 + }else if(this.data.country === '' && this.data.user.country === null) {
124 wx.showToast({title:'请填写国家',icon:'none'}) 127 wx.showToast({title:'请填写国家',icon:'none'})
125 - }else if(this.data.city === '') { 128 + }else if(this.data.city === '' && this.data.user.city === null) {
126 wx.showToast({title:'请填写城市',icon:'none'}) 129 wx.showToast({title:'请填写城市',icon:'none'})
127 - }else if (this.data.phone_number === '') { 130 + }else if (this.data.phone_number === '' && this.data.user.tel === null) {
128 wx.showToast({title:'请填写手机号',icon:'none'}) 131 wx.showToast({title:'请填写手机号',icon:'none'})
129 }else if(this.data.is_wrong_phone){ 132 }else if(this.data.is_wrong_phone){
130 wx.showToast({title:'手机号格式错误',icon:'none'}) 133 wx.showToast({title:'手机号格式错误',icon:'none'})
131 - }else if(this.data.introduce === '') { 134 + }else if(this.data.introduce === '' && this.data.user.introduce === null) {
132 wx.showToast({title:'请填写简介',icon:'none'}) 135 wx.showToast({title:'请填写简介',icon:'none'})
133 }else { 136 }else {
134 let url = '/portal/Member/detail'; 137 let url = '/portal/Member/detail';
135 let params = { 138 let params = {
136 token: wx.getStorageSync('token'), 139 token: wx.getStorageSync('token'),
137 - sex: this.data.sexList[this.data.current_sex] === '男'?1:2,  
138 - country:this.data.country,  
139 - city:this.data.city,  
140 - tel:this.data.phone_number,  
141 - introduce:this.data.introduce 140 + sex: this.data.user.sex === 1?'男':this.data.user.sex === 2?'女':'',
  141 + country:this.data.is_choose_country?this.data.country:this.data.user.country,
  142 + city:this.data.is_choose_city?this.data.city:this.data.user.city,
  143 + tel:this.data.phone_number !== ''?this.data.phone_number:this.data.user.tel,
  144 + introduce:this.data.is_choose_introduce?this.data.introduce:this.data.user.introduce
142 }; 145 };
143 app.post(url, params, {}).then((res) => { 146 app.post(url, params, {}).then((res) => {
144 console.log('保存', res); 147 console.log('保存', res);
@@ -154,10 +157,34 @@ Page({ @@ -154,10 +157,34 @@ Page({
154 }); 157 });
155 } 158 }
156 }, 159 },
  160 + getDetail() {
  161 + let url = '/portal/Member/detail';
  162 + let params = {
  163 + token: wx.getStorageSync('token'),
  164 + };
  165 + app.post(url, params, {}).then((res) => {
  166 + console.log('获取个人信息', res);
  167 + if (+res.code === 1) {
  168 + this.setData({user:res.data});
  169 + if(this.data.user.country === null ||
  170 + this.data.user.city === null ||
  171 + this.data.user.tel === null ||
  172 + this.data.user.introduce === null
  173 + ) {
  174 + this.setData({is_change:false});//完成按钮不能点
  175 + }else {
  176 + this.setData({is_change:true});
  177 + }
  178 + }
  179 + });
  180 + },
157 /** 181 /**
158 * 生命周期函数--监听页面加载 182 * 生命周期函数--监听页面加载
159 */ 183 */
160 onLoad: function (options) { 184 onLoad: function (options) {
  185 + this.setData({userInfo:app.globalData.userInfo});
  186 + // console.log('userInfo', this.data.userInfo);
  187 + this.getDetail();
161 188
162 }, 189 },
163 190
@@ -2,39 +2,40 @@ @@ -2,39 +2,40 @@
2 <view class="content"> 2 <view class="content">
3 <view class="flex-box flex-picker"> 3 <view class="flex-box flex-picker">
4 <view class="title">性别:</view> 4 <view class="title">性别:</view>
5 - <view class="text">  
6 - <picker bindchange="sexPickerChange" value="{{current_sex}}" range="{{sexList}}" class="picker">  
7 - <view class="sex-picker">  
8 - <text class="variety-text">{{sexList[current_sex]}}</text>  
9 - <!--<text class="variety-text" wx:else>{{pet_info.sex===2?'MM':'GG'}}</text>-->  
10 - <view class="iconfont icon-arrow-down"></view>  
11 - </view>  
12 - </picker> 5 + <view class="variety-text">
  6 + {{userInfo.gender === 1?'男':userInfo.gender === 2?'女':'未知'}}
  7 + <!--<picker bindchange="sexPickerChange" value="{{current_sex}}" range="{{sexList}}" class="picker">-->
  8 + <!--<view class="sex-picker">-->
  9 + <!--<text class="variety-text">{{sexList[current_sex] || user.sex === 1?'男':user.sex === 2?'女':''}}</text>-->
  10 + <!--&lt;!&ndash;<text class="variety-text" wx:else>{{pet_info.sex===2?'MM':'GG'}}</text>&ndash;&gt;-->
  11 + <!--<view class="iconfont icon-arrow-down"></view>-->
  12 + <!--</view>-->
  13 + <!--</picker>-->
13 </view> 14 </view>
14 </view> 15 </view>
15 <view class="flex-box"> 16 <view class="flex-box">
16 <view class="title">国家:</view> 17 <view class="title">国家:</view>
17 <view class="text"> 18 <view class="text">
18 - <input type="text" bindinput="inputCountry"/> 19 + <input type="text" bindinput="inputCountry" value="{{country || user.country}}"/>
19 </view> 20 </view>
20 </view> 21 </view>
21 <view class="flex-box"> 22 <view class="flex-box">
22 <view class="title">城市:</view> 23 <view class="title">城市:</view>
23 <view class="text"> 24 <view class="text">
24 - <input type="text" bindinput="inputCity"/> 25 + <input type="text" bindinput="inputCity" value="{{city || user.city}}"/>
25 </view> 26 </view>
26 </view> 27 </view>
27 <view class="flex-box"> 28 <view class="flex-box">
28 <view class="title">手机号:</view> 29 <view class="title">手机号:</view>
29 <view class="phone-box"> 30 <view class="phone-box">
30 - <input type="number" bindinput="inputPhone" bindblur="blur" value="{{phone_number}}"/> 31 + <input type="number" bindinput="inputPhone" bindblur="blur" value="{{phone_number || user.tel}}"/>
31 <button open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber" class="phone-btn">自动填写</button> 32 <button open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber" class="phone-btn">自动填写</button>
32 </view> 33 </view>
33 </view> 34 </view>
34 <view class="content-box"> 35 <view class="content-box">
35 <view class="title">个人简介:</view> 36 <view class="title">个人简介:</view>
36 <view class="text"> 37 <view class="text">
37 - <textarea type="text" bindinput="inputContent" maxlength="50"></textarea> 38 + <textarea type="text" bindinput="inputContent" maxlength="50" value="{{introduce || user.introduce}}"></textarea>
38 <view class='word_num'>{{currentnum}}/{{maxlength}}</view> 39 <view class='word_num'>{{currentnum}}/{{maxlength}}</view>
39 </view> 40 </view>
40 </view> 41 </view>
@@ -3,9 +3,10 @@ @@ -3,9 +3,10 @@
3 <view class="bg"> 3 <view class="bg">
4 <!-- // (0全部,2待拼成,3人数不足未拼成,4已拼成,5已取消,6已完成,7已评价,8已拼成(活动未结束),9删除--> 4 <!-- // (0全部,2待拼成,3人数不足未拼成,4已拼成,5已取消,6已完成,7已评价,8已拼成(活动未结束),9删除-->
5 <view class="no-data" wx:if="{{list.length===0}}">钱包是空的~</view> 5 <view class="no-data" wx:if="{{list.length===0}}">钱包是空的~</view>
6 - <view class="list-item {{item.type === 1?'change-bg':''}} {{item.status === 6?'change-bg-end':''}}" 6 + <view class="list-item {{item.type === 1?'change-bg':''}} {{item.status === 6?'change-bg-end':''}} {{item.status === 10?'change-bg-cancel':''}}"
7 wx:for="{{list}}" wx:key="index" data-id="{{item.id}}" bindtap="goDetail"> 7 wx:for="{{list}}" wx:key="index" data-id="{{item.id}}" bindtap="goDetail">
8 <image src="../../../images/end-flag@2x.png" wx:if="{{item.status === 6}}" class="flag-img"></image> 8 <image src="../../../images/end-flag@2x.png" wx:if="{{item.status === 6}}" class="flag-img"></image>
  9 + <image src="../../../images/end-flag@2x.png" wx:if="{{item.status === 10}}" class="flag-img"></image>
9 <view class="detail {{item.status === 6?'change-color':''}}"> 10 <view class="detail {{item.status === 6?'change-color':''}}">
10 <view class="area"> 11 <view class="area">
11 <text class="addr">{{item.addr}}</text> 12 <text class="addr">{{item.addr}}</text>
@@ -43,6 +43,10 @@ @@ -43,6 +43,10 @@
43 .change-bg-end { 43 .change-bg-end {
44 background-image: url('http://qiniuyun.wmatchrd.com/yiwancheng@2x.png'); 44 background-image: url('http://qiniuyun.wmatchrd.com/yiwancheng@2x.png');
45 } 45 }
  46 +/*灰色*/
  47 +.change-bg-cancel {
  48 + background-image: url('http://qiniuyun.wmatchrd.com/yiwancheng@2x.png');
  49 +}
46 .detail { 50 .detail {
47 width:390rpx; 51 width:390rpx;
48 display: flex; 52 display: flex;
@@ -210,8 +210,9 @@ Page({ @@ -210,8 +210,9 @@ Page({
210 }, 210 },
211 //编辑个人信息 211 //编辑个人信息
212 EditUserInfo() { 212 EditUserInfo() {
  213 + const user = JSON.stringify(this.data.user);
213 wx.navigateTo({ 214 wx.navigateTo({
214 - url: '/pages/my/edit-info/edit-info', 215 + url: '/pages/my/edit-info/edit-info?user=' + user,
215 }) 216 })
216 }, 217 },
217 //我的收藏 218 //我的收藏
@@ -15,10 +15,10 @@ @@ -15,10 +15,10 @@
15 <view class="class-box"> 15 <view class="class-box">
16 <image src="../../images/jin@2x.png" wx:if="{{user.level === 1}}"></image> 16 <image src="../../images/jin@2x.png" wx:if="{{user.level === 1}}"></image>
17 <image src="../../images/yin@2x.png" wx:if="{{user.level === 2}}"></image> 17 <image src="../../images/yin@2x.png" wx:if="{{user.level === 2}}"></image>
18 - <image src="../../images/tong@2x.png" wx:if="{{user.level === 3}}"></image> 18 + <image src="../../images/mu@2x.png" wx:if="{{user.level === 3}}"></image>
19 <text wx:if="{{user.level === 1}}">金火柴</text> 19 <text wx:if="{{user.level === 1}}">金火柴</text>
20 - <text wx:if="{{user.level === 2}}">银火柴</text>  
21 - <text wx:if="{{user.level === 3}}">铜火柴</text> 20 + <text wx:if="{{user.level === 2}}" class="{{user.level === 2?'change-yin':''}}">银火柴</text>
  21 + <text wx:if="{{user.level === 3}}" class="{{user.level === 3?'change-mu':''}}">木火柴</text>
22 </view> 22 </view>
23 </view> 23 </view>
24 <view class="right"> 24 <view class="right">
@@ -118,6 +118,12 @@ @@ -118,6 +118,12 @@
118 font-size: 10rpx; 118 font-size: 10rpx;
119 border-radius: 4rpx; 119 border-radius: 4rpx;
120 } 120 }
  121 +.head-box .left .class-box .change-yin {
  122 + background-color: #CCCCCC;
  123 +}
  124 +.head-box .left .class-box .change-mu {
  125 + background-color: #896A4F;
  126 +}
121 .user-img { 127 .user-img {
122 position: absolute; 128 position: absolute;
123 top:40rpx; 129 top:40rpx;
@@ -284,7 +290,7 @@ @@ -284,7 +290,7 @@
284 .score-box { 290 .score-box {
285 height:696rpx; 291 height:696rpx;
286 /* top:68%; */ 292 /* top:68%; */
287 - background-image: url('http://pk86rwhci.bkt.clouddn.com/dsdfhgfhfdh@2x.png'); 293 + background-image: url('http://qiniuyun.wmatchrd.com/dsdfhgfhfdh@2x.png');
288 background-repeat: no-repeat; 294 background-repeat: no-repeat;
289 -webkit-background-size: 100%; 295 -webkit-background-size: 100%;
290 background-size: 100%; 296 background-size: 100%;
@@ -11,14 +11,14 @@ @@ -11,14 +11,14 @@
11 <view class="state2"> 11 <view class="state2">
12 <!--{{detail.status === 4 ||detail.status === 5 || detail.status === 6||detail.status === 8?'change':''}}--> 12 <!--{{detail.status === 4 ||detail.status === 5 || detail.status === 6||detail.status === 8?'change':''}}-->
13 <view class="circle change"></view> 13 <view class="circle change"></view>
14 - <text wx:if="{{order_detail.status === 5}}">已取消</text> 14 + <text wx:if="{{order_detail.status === 5 || order_detail.status === 10}}">已取消</text>
15 <text wx:if="{{order_detail.status === 4|| order_detail.status === 6 || order_detail.status === 7 || order_detail.status === 8}}">已拼成</text> 15 <text wx:if="{{order_detail.status === 4|| order_detail.status === 6 || order_detail.status === 7 || order_detail.status === 8}}">已拼成</text>
16 <text wx:if="{{order_detail.status === 2 || order_detail.status === 3}}" class="{{order_detail.status === 2?'change-text':''}}">待拼成</text> 16 <text wx:if="{{order_detail.status === 2 || order_detail.status === 3}}" class="{{order_detail.status === 2?'change-text':''}}">待拼成</text>
17 </view> 17 </view>
18 <view class="state3"> 18 <view class="state3">
19 <view class="circle {{order_detail.status === 6?'change':''}}"></view> 19 <view class="circle {{order_detail.status === 6?'change':''}}"></view>
20 <text wx:if="{{order_detail.status === 6}}">已完成</text> 20 <text wx:if="{{order_detail.status === 6}}">已完成</text>
21 - <text wx:if="{{order_detail.status === 4 || order_detail.status === 2 ||order_detail.status === 5|| order_detail.status === 3 ||order_detail.status === 8}}" class="{{order_detail.status === 4 || order_detail.status === 2 ||order_detail.status === 5?'change-text':''}}">待完成</text> 21 + <text wx:if="{{order_detail.status === 4 || order_detail.status === 2 ||order_detail.status === 5|| order_detail.status === 3 ||order_detail.status === 8 || order_detail.status === 10}}" class="{{order_detail.status === 4 || order_detail.status === 2 ||order_detail.status === 5?'change-text':''}}">待完成</text>
22 </view> 22 </view>
23 </view> 23 </view>
24 24
@@ -33,7 +33,7 @@ @@ -33,7 +33,7 @@
33 </view> 33 </view>
34 <text class="text">订单编号:{{order_detail.order_sn}}</text> 34 <text class="text">订单编号:{{order_detail.order_sn}}</text>
35 <text class="text">交易时间:{{order_detail.create_time}}</text> 35 <text class="text">交易时间:{{order_detail.create_time}}</text>
36 - <text class="text">联系方式:{{order_detail.userTel || '暂无手机号'}}</text> 36 + <!--<text class="text">联系方式:{{order_detail.userTel || '暂无手机号'}}</text>-->
37 37
38 <textarea maxlength="-1" placeholder="请填写您要投诉的内容" placeholder-class="placeholder" 38 <textarea maxlength="-1" placeholder="请填写您要投诉的内容" placeholder-class="placeholder"
39 bindinput="inputContent" 39 bindinput="inputContent"
@@ -53,7 +53,7 @@ Page({ @@ -53,7 +53,7 @@ Page({
53 const self = this; 53 const self = this;
54 wx.showModal({ 54 wx.showModal({
55 title: '提示', 55 title: '提示',
56 - content: '确定删除吗?', 56 + content: '确定取消吗?',
57 success(res) { 57 success(res) {
58 if (res.confirm) { 58 if (res.confirm) {
59 console.log('用户点击确定'); 59 console.log('用户点击确定');
@@ -11,28 +11,33 @@ @@ -11,28 +11,33 @@
11 <view class="state2"> 11 <view class="state2">
12 <!--{{detail.status === 4 ||detail.status === 5 || detail.status === 6||detail.status === 8?'change':''}}--> 12 <!--{{detail.status === 4 ||detail.status === 5 || detail.status === 6||detail.status === 8?'change':''}}-->
13 <view class="circle change"></view> 13 <view class="circle change"></view>
14 - <text wx:if="{{detail.status === 5}}">已取消</text> 14 + <text wx:if="{{detail.status === 5 || detail.status === 10}}">已取消</text>
15 <text wx:if="{{detail.status === 4 || detail.status === 6 || detail.status === 7 || detail.status === 8}}">已拼成</text> 15 <text wx:if="{{detail.status === 4 || detail.status === 6 || detail.status === 7 || detail.status === 8}}">已拼成</text>
16 - <text wx:if="{{detail.status === 2 || detail.status === 3}}" class="{{detail.status === 2?'change-text':''}}">待拼成</text> 16 + <text wx:if="{{detail.status === 2}}" class="{{detail.status === 2?'change-text':''}}">待拼成</text>
  17 + <text wx:if="{{detail.status === 3}}" class="{{detail.status === 3?'change-text':''}}">未拼成</text>
17 </view> 18 </view>
18 <view class="state3"> 19 <view class="state3">
19 <view class="circle {{detail.status === 6?'change':''}}"></view> 20 <view class="circle {{detail.status === 6?'change':''}}"></view>
20 <text wx:if="{{detail.status === 6}}">已完成</text> 21 <text wx:if="{{detail.status === 6}}">已完成</text>
21 - <text wx:if="{{detail.status === 4 || detail.status === 2 || detail.status === 3||detail.status === 5|| detail.status === 8}}" class="{{detail.status === 4 || detail.status === 2 ||detail.status === 5?'change-text':''}}">待完成</text> 22 + <text wx:if="{{detail.status === 4 || detail.status === 2 || detail.status === 3||detail.status === 5|| detail.status === 8 || detail.status === 10}}" class="{{detail.status === 4 || detail.status === 2 ||detail.status === 5?'change-text':''}}">待完成</text>
22 </view> 23 </view>
23 </view> 24 </view>
24 25
25 - <view class="order-info" bindtap="goDetail">  
26 - <view class="top">  
27 - <!--<image src="../../../images/avatar@2x.png"></image>-->  
28 - <image src="{{detail.userPic}}"></image>  
29 - <image src="{{detail.userSex === 1?'../../../images/man.png':'../../../images/women.png'}}" class="sex-icon"></image>  
30 - <text class="name">{{detail.userName}}</text> 26 + <view class="box" bindtap="goDetail">
  27 + <image src="{{detail.pic}}" class="banner"></image>
  28 + <view class="order-info">
  29 + <view class="top">
  30 + <!--<image src="../../../images/avatar@2x.png"></image>-->
  31 + <image src="{{detail.userPic}}" class="user-avatar"></image>
  32 + <image src="{{detail.userSex === 1?'../../../images/man.png':'../../../images/women.png'}}" class="sex-icon"></image>
  33 + <text class="name">{{detail.userName}}</text>
  34 + </view>
  35 + <text class="address">{{detail.title}}</text>
  36 + <text class="time">{{detail.time}}</text>
31 </view> 37 </view>
32 - <text class="address">{{detail.title}}</text>  
33 - <text class="time">{{detail.time}}</text>  
34 </view> 38 </view>
35 39
  40 +
36 <view class="complain" catchtap="goComplain"><text>去投诉</text></view> 41 <view class="complain" catchtap="goComplain"><text>去投诉</text></view>
37 42
38 <view class="order-detail"> 43 <view class="order-detail">
@@ -42,9 +47,19 @@ @@ -42,9 +47,19 @@
42 47
43 <view class="bottom"> 48 <view class="bottom">
44 <!-- // (0全部,2待拼成,3人数不足未拼成,4已拼成,5已取消,6已完成,7已评价,8已拼成(活动未结束),9删除--> 49 <!-- // (0全部,2待拼成,3人数不足未拼成,4已拼成,5已取消,6已完成,7已评价,8已拼成(活动未结束),9删除-->
45 - <text class="cancel-btn" wx:if="{{detail.status === 4 || detail.status === 2|| detail.status === 8}}" bindtap="cancel">取消订单</text> 50 + <text class="cancel-btn" wx:if="{{detail.status === 2}}" bindtap="cancel">取消订单</text>
46 <text class="cancel-btn gray" wx:if="{{detail.status === 2}}">待拼成</text> 51 <text class="cancel-btn gray" wx:if="{{detail.status === 2}}">待拼成</text>
47 - <text class="cancel-btn gray" wx:if="{{detail.status === 8}}">已拼成</text> 52 + <!--<text class="cancel-btn gray" wx:if="{{detail.status === 8}}">已拼成</text>-->
48 <text class="confirm-btn" wx:if="{{detail.status === 4}}" bindtap="confirm">完成</text> 53 <text class="confirm-btn" wx:if="{{detail.status === 4}}" bindtap="confirm">完成</text>
  54 + <text class="confirm-btn gray" wx:if="{{detail.status === 4}}">待完成</text>
  55 + <!--1发布人,2拼餐/拼活动人-->
  56 + <block wx:if="{{detail.sonType === 1}}">
  57 + <text class="confirm-btn" wx:if="{{detail.status === 8}}" bindtap="cancel">取消订单</text>
  58 + <text class="cancel-btn gray" wx:if="{{detail.status === 8}}">待完成</text>
  59 + </block>
  60 + <block wx:if="{{detail.sonType === 2}}">
  61 + <text class="cancel-btn gray border" wx:if="{{detail.status === 8}}">取消订单</text>
  62 + <text class="cancel-btn gray" wx:if="{{detail.status === 8}}">待完成</text>
  63 + </block>
49 </view> 64 </view>
50 </view> 65 </view>
@@ -47,6 +47,20 @@ @@ -47,6 +47,20 @@
47 left:50%; 47 left:50%;
48 transform: translate(-50%,-50%); 48 transform: translate(-50%,-50%);
49 } 49 }
  50 +.box {
  51 + display: flex;
  52 + align-items: center;
  53 + padding: 20rpx;
  54 + -webkit-box-sizing: border-box;
  55 + -moz-box-sizing: border-box;
  56 + box-sizing: border-box;
  57 + border-bottom: 1rpx solid #f2f2f2;
  58 +}
  59 +.box image {
  60 + width: 153rpx;
  61 + height: 153rpx;
  62 + margin-right: 20rpx;
  63 +}
50 .order-info { 64 .order-info {
51 display: flex; 65 display: flex;
52 flex-direction: column; 66 flex-direction: column;
@@ -85,7 +99,6 @@ @@ -85,7 +99,6 @@
85 padding: 28rpx 0 32rpx 0; 99 padding: 28rpx 0 32rpx 0;
86 } 100 }
87 .time { 101 .time {
88 - border-bottom: 1rpx solid #f2f2f2;  
89 padding-bottom: 40rpx; 102 padding-bottom: 40rpx;
90 } 103 }
91 .order-detail { 104 .order-detail {
@@ -132,6 +145,9 @@ @@ -132,6 +145,9 @@
132 color: #E1C8AF; 145 color: #E1C8AF;
133 border:0; 146 border:0;
134 } 147 }
  148 +.bottom .border {
  149 + border-right: 1rpx solid #fff;
  150 +}
135 .complain { 151 .complain {
136 z-index:10; 152 z-index:10;
137 padding: 0 20rpx; 153 padding: 0 20rpx;
@@ -23,7 +23,7 @@ @@ -23,7 +23,7 @@
23 <text wx:if="{{item.status === 2}}" class="state">待拼成</text> 23 <text wx:if="{{item.status === 2}}" class="state">待拼成</text>
24 <text wx:if="{{item.status === 3}}" class="state">未拼成</text> 24 <text wx:if="{{item.status === 3}}" class="state">未拼成</text>
25 <text wx:if="{{item.status === 4 || item.status === 8}}" class="state">已拼成</text> 25 <text wx:if="{{item.status === 4 || item.status === 8}}" class="state">已拼成</text>
26 - <text wx:if="{{item.status === 5}}" class="state">已取消</text> 26 + <text wx:if="{{item.status === 5 || item.status === 10}}" class="state">已取消</text>
27 <text wx:if="{{item.status === 6}}" class="state">已完成</text> 27 <text wx:if="{{item.status === 6}}" class="state">已完成</text>
28 <text wx:if="{{item.status === 7}}" class="state">已评价</text> 28 <text wx:if="{{item.status === 7}}" class="state">已评价</text>
29 </view> 29 </view>
@@ -33,7 +33,7 @@ @@ -33,7 +33,7 @@
33 <!--<image src="../../images/avatar@2x.png" class="avatar"></image>--> 33 <!--<image src="../../images/avatar@2x.png" class="avatar"></image>-->
34 <image src="{{item.userPic}}" class="avatar"></image> 34 <image src="{{item.userPic}}" class="avatar"></image>
35 <image src="{{item.userSex === 1?'../../images/man.png':'../../images/women.png'}}" class="sex-icon"></image> 35 <image src="{{item.userSex === 1?'../../images/man.png':'../../images/women.png'}}" class="sex-icon"></image>
36 - <text>{{item.userName}} 在{{item.address}}</text> 36 + <text>{{item.userName}}</text>
37 </view> 37 </view>
38 <view class="btn"> 38 <view class="btn">
39 <text wx:if="{{item.status === 5 || item.status === 6 || item.status === 3 || item.status === 7}}" catchtap="cancel" data-id="{{item.id}}">删除</text> 39 <text wx:if="{{item.status === 5 || item.status === 6 || item.status === 3 || item.status === 7}}" catchtap="cancel" data-id="{{item.id}}">删除</text>
@@ -209,7 +209,7 @@ @@ -209,7 +209,7 @@
209 .score-box { 209 .score-box {
210 height:696rpx; 210 height:696rpx;
211 /* top:68%; */ 211 /* top:68%; */
212 - background-image: url('http://pk86rwhci.bkt.clouddn.com/dsdfhgfhfdh@2x.png'); 212 + background-image: url('http://qiniuyun.wmatchrd.com/dsdfhgfhfdh@2x.png');
213 background-repeat: no-repeat; 213 background-repeat: no-repeat;
214 -webkit-background-size: 100%; 214 -webkit-background-size: 100%;
215 background-size: 100%; 215 background-size: 100%;
@@ -337,7 +337,7 @@ @@ -337,7 +337,7 @@
337 .score-box { 337 .score-box {
338 height:696rpx; 338 height:696rpx;
339 /* top:68%; */ 339 /* top:68%; */
340 - background-image: url('http://pk86rwhci.bkt.clouddn.com/dsdfhgfhfdh@2x.png'); 340 + background-image: url('http://qiniuyun.wmatchrd.com/dsdfhgfhfdh@2x.png');
341 background-repeat: no-repeat; 341 background-repeat: no-repeat;
342 -webkit-background-size: 100%; 342 -webkit-background-size: 100%;
343 background-size: 100%; 343 background-size: 100%;