作者 wumengyu

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

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

55.6 KB | 宽: | 高:

47.2 KB | 宽: | 高:

  • 两方对比
  • 交换覆盖
  • 透明覆盖
... ... @@ -28,12 +28,11 @@ Page({
},
//完成按钮
goBack() {
wx.redirectTo({url:'/pages/spell-list/spell-list?current=' + 1})
// wx.redirectTo({url:'/pages/spell-list/spell-list?current=' + 1})
},
disableScroll() {
},
handleBackground() {
console.log('dianji');
this.setData({is_showRelease_modal:false,})
},
//输入标题
... ... @@ -336,13 +335,6 @@ Page({
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
... ... @@ -359,7 +351,54 @@ Page({
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
onShareAppMessage: function (res) {
let self = this;
if(res.from === 'button') {
return {
title: self.data.title, // 默认是小程序的名称(可以写slogan等)
path: '/pages/activity/detail/detail?id=' + self.data.id, // 默认是当前页面,必须是以‘/’开头的完整路径
imageUrl: self.data.images[0], //自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
success: function (res) {
if (res.errMsg == 'shareAppMessage:ok') {
console.log('转发成功之后');
wx.redirectTo({url:'/pages/activity/detail/detail?id=' + self.data.id})
}
},
fail: function () {
// 转发失败之后的回调
if (res.errMsg == 'shareAppMessage:fail cancel') {
// 用户取消转发
} else if (res.errMsg == 'shareAppMessage:fail') {
// 转发失败,其中 detail message 为详细失败信息
}
},
complete: function () {
// 转发结束之后的回调(转发成不成功都会执行)
console.log('转发结束之后');
wx.redirectTo({url:'/pages/activity/detail/detail?id=' + self.data.id})
}
}
}
// 设置菜单中的转发按钮触发转发事件时的转发内容
// var shareObj = {
// title: '火柴西路', // 默认是小程序的名称(可以写slogan等)
// path: '/pages/activity/detail/detail?id=' + this.data.id, // 默认是当前页面,必须是以‘/’开头的完整路径
// imageUrl: '', //自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
// success: function (res) {
// if (res.errMsg == 'shareAppMessage:ok') {
// }
// },
// fail: function () {
// // 转发失败之后的回调
// if (res.errMsg == 'shareAppMessage:fail cancel') {
// // 用户取消转发
// } else if (res.errMsg == 'shareAppMessage:fail') {
// // 转发失败,其中 detail message 为详细失败信息
// }
// },
// complete: function () {
// // 转发结束之后的回调(转发成不成功都会执行)
// }
// }
},
})
\ No newline at end of file
... ...
... ... @@ -106,7 +106,7 @@
<image class="sorry-img" src="../../images/success@2x.png"></image>
<view class="title">恭喜您发布成功</view>
<view class="view-btn" catchtap="goMyRelease">查看我的发布</view>
<view class="complete-btn" catchtap="goBack">完成</view>
<button class="complete-btn" catchtap="goBack" open-type="share">分享</button>
</view>
<view class="modal_box" wx:if="{{is_showRelease_modal}}" bindtap="handleBackground"
catchtouchmove="disableScroll"></view>
... ...
... ... @@ -45,7 +45,8 @@ Page({
},
//查看我的订单
goMyOrder() {
wx.redirectTo({url:'/pages/order/order-detail/order-detail?id=' + this.data.order_id})
this.setData({is_showRelease_modal:false,});
wx.navigateTo({url:'/pages/order/order-detail/order-detail?id=' + this.data.order_id})
},
//完成按钮
goBack() {
... ... @@ -54,7 +55,6 @@ Page({
disableScroll() {
},
handleBackground() {
console.log('dianji');
this.setData({is_showRelease_modal:false,})
},
// 问一问
... ... @@ -517,34 +517,34 @@ Page({
// ctx.clip();
//填充背景色
ctx.fillStyle = '#fff';
ctx.fillRect(0, 0, 300, 400);
ctx.fillRect(0, 0, 280, 400);
console.log(self.data.local_img);
console.log(self.data.qr_code);
//将图片转化为画布
ctx.drawImage(self.data.local_img, 0, 0, 300, 170);//详情图
ctx.drawImage(self.data.local_img, 0, 0, 280, 280);//详情图
console.log(111);
// ctx.drawImage(self.data.local_qr_code, 220, 209, 60, 60);//二维码
ctx.drawImage('../../../images/qr_code.jpg', 220, 209, 60, 60);//二维
ctx.drawImage('../../../images/qr_code.jpg', 180, 320, 60, 60);//小程序
//标题
ctx.setFontSize(16);
ctx.setFontSize(12);
ctx.setFillStyle('#000');
ctx.textAlign = "left";
console.log(111);
ctx.fillText(self.data.detail.title, 26, 196.5);
ctx.fillText(self.data.detail.title, 25.5, 197);
ctx.fillText(self.data.detail.title, 16, 306.5);
ctx.fillText(self.data.detail.title, 15.5, 307);
ctx.restore();
//地点
ctx.setFontSize(13);
ctx.setFontSize(9);
ctx.setFillStyle('#000000');
ctx.fillText('地点:', 25, 229);
const text = self.data.detail.address;
ctx.fillText('地点:', 16, 325);
const text = self.data.detail.name;
var chr = text.split("");//这个方法是将一个字符串分割成字符串数组
var temp = "";
var row = [];
ctx.setFontSize(13);
ctx.setFontSize(9);
ctx.setFillStyle('#000000');
for (var a = 0; a < chr.length; a++) {
if (ctx.measureText(temp).width < 170) {
if (ctx.measureText(temp).width < 100) {
temp += chr[a];
}
else {
... ... @@ -562,7 +562,7 @@ Page({
var test = "";
var empty = [];
for (var a = 0; a < rowPart.length; a++) {
if (ctx.measureText(test).width < 170) {
if (ctx.measureText(test).width < 100) {
test += rowPart[a];
}
else {
... ... @@ -575,14 +575,14 @@ Page({
row = rowCut;
}
for (var b = 0; b < row.length; b++) {
ctx.fillText(row[b], 63, 229 + b * 16, 150);
ctx.fillText(row[b], 40, 325 + b * 16, 150);
}
ctx.restore();
//时间
ctx.setFontSize(13);
ctx.setFontSize(9);
ctx.setFillStyle('#333333');
ctx.fillText('时间:', 25, 249);
ctx.fillText(self.data.end_time, 63, 249);
ctx.fillText('时间:', 16, 340);
ctx.fillText(self.data.end_time, 40, 340);
ctx.restore();
// ctx.drawImage("../../../../images/home-banner.png", 0, 0, 250, 150)
//成功执行,draw方法中进行回调
... ... @@ -662,10 +662,10 @@ Page({
wx.canvasToTempFilePath({
x: 0,
y: 0,
width: 300,
height: 300,
destWidth: 300,
destHeight: 300,
width: 280,
height: 400,
destWidth: 560,
destHeight: 800,
canvasId: 'canvas',
fileType: 'jpg',
quality:1,
... ...
... ... @@ -109,7 +109,7 @@
</view>
<view class="people-num">
<view class="name">{{item.name}}</view>
<view class="num">({{item.number}})</view>
<view class="num">{{item.number}}人</view>
</view>
</view>
</view>
... ... @@ -197,14 +197,16 @@
</view>
<form bindsubmit="confirmJoin" bindreset="formReset" report-submit="true">
<!-- // (0全部,2待拼成,3人数不足未拼成,4已拼成,5已取消,6已完成,7已评价,8已拼成(活动未结束),9删除-->
<button class="confirm-join-btn {{is_send === 1 && detail.status !== 8?'gray':''}}" form-type="submit">
<button class="confirm-join-btn {{is_send === 1?'gray':''}}" form-type="submit">
<text wx:if="{{is_send === 1 && detail.status === 2}}">待拼成</text>
<text wx:if="{{is_send === 2 &&detail.status === 2}}">确认拼活动</text>
<text wx:if="{{is_send === 1 && detail.status === 8}}">待完成</text>
<text wx:if="{{is_send === 2 && detail.status === 8 }}">确认拼活动</text>
<text wx:if="{{is_send === 2 && detail.status === 2 }}">确认拼活动</text>
<text wx:if="{{detail.status === 3}}">未拼成</text>
<text wx:if="{{detail.status === 4}}">已拼成</text>
<text wx:if="{{detail.status === 5}}">已取消</text>
<text wx:if="{{detail.status === 6 || detail.status === 7}}">已完成</text>
<text wx:if="{{detail.status === 8}}">已拼成</text>
<!--<text wx:if="{{detail.status === 8}}">已拼成</text>-->
<text wx:if="{{detail.status === 9}}">已删除</text>
</button>
</form>
... ...
... ... @@ -245,7 +245,8 @@ swiper {
align-items: center;
}
.people-num .name {
width:100rpx;
/* width:100rpx; */
margin-right:10rpx;
text-align: center;
/* margin-right: 10rpx; */
color: #333333;
... ... @@ -605,8 +606,8 @@ swiper {
}
.canvas-poster {
/* position: fixed; */
/* width: 600rpx; */
height: 678rpx;
width: 260px;
height: 400px;
/* top: 100%; */
/* left: 100%; */
/* overflow: hidden; */
... ... @@ -616,12 +617,12 @@ swiper {
display: flex;
align-items: center;
justify-content: space-between;
height: 56rpx;
height: 76rpx;
/* border-top: 1rpx solid #E8E8E8; */
}
.save-to-phone, .share-btn{
width: 50%;
line-height: 56rpx;
line-height: 76rpx;
color:#fff;
font-size: 24rpx;
text-align: center;
... ...
... ... @@ -256,11 +256,12 @@ swiper {
.tandian-box .left image {
width: 50rpx;
height: 32rpx;
margin-right: 6rpx;
margin-right: 16rpx;
}
.tandian-box .left text {
color:#191919;
font-size: 30rpx;
font-weight: bold;
}
.tandian-box .right image{
width: 14rpx;
... ... @@ -440,13 +441,14 @@ swiper {
box-sizing: border-box;
}
.record-box image {
margin-right: 6rpx;
margin-right: 16rpx;
width: 34rpx;
height: 46rpx;
}
.record-box text {
color: #191919;
font-size: 30rpx;
font-weight: bold;
}
/*.imgs-box {*/
/*width: 100%;*/
... ... @@ -640,7 +642,7 @@ swiper {
.score-box {
height:696rpx;
/* top:68%; */
background-image: url('http://pk86rwhci.bkt.clouddn.com/dsdfhgfhfdh@2x.png');
background-image: url('http://qiniuyun.wmatchrd.com/dsdfhgfhfdh@2x.png');
background-repeat: no-repeat;
-webkit-background-size: 100%;
background-size: 100%;
... ... @@ -690,7 +692,8 @@ swiper {
}
.normal-box {
height: 540rpx;
background-image: url('http://pk86rwhci.bkt.clouddn.com/safsfdsghk@2x.png');
/*background-image: url('http://pk86rwhci.bkt.clouddn.com/safsfdsghk@2x.png');*/
background-image: url('http://qiniuyun.wmatchrd.com/safsfdsghk@2x.png');
}
.normal-box .close-btn {
margin-top: 52rpx;
... ...
... ... @@ -45,12 +45,18 @@ Page({
},
//查看我的订单
goMyRelease() {
wx.redirectTo({url:'/pages/order/order-detail/order-detail?id=' + this.data.order_id})
this.setData({is_showRelease_modal:false,});
wx.navigateTo({url:'/pages/order/order-detail/order-detail?id=' + this.data.order_id})
},
//完成按钮
goBack() {
wx.redirectTo({url:'/pages/spell-list/spell-list?current=' + 0})
},
disableScroll() {
},
handleBackground() {
this.setData({is_showRelease_modal:false,})
},
// 问一问
ask(e) {
console.log('前问一问-display', this.data.display);
... ... @@ -520,34 +526,34 @@ Page({
// ctx.clip();
//填充背景色
ctx.fillStyle = '#fff';
ctx.fillRect(0, 0, 300, 400);
ctx.fillRect(0, 0, 280, 400);
console.log(self.data.local_img);
console.log(self.data.qr_code);
//将图片转化为画布
ctx.drawImage(self.data.local_img, 0, 0, 300, 170);//详情图
ctx.drawImage(self.data.local_img, 0, 0, 280, 280);//详情图
console.log(111);
// ctx.drawImage(self.data.local_qr_code, 220, 209, 60, 60);//二维码
ctx.drawImage('../../../images/qr_code.jpg', 220, 209, 60, 60);//二维
ctx.drawImage('../../../images/qr_code.jpg', 180, 320, 60, 60);//小程序
//标题
ctx.setFontSize(16);
ctx.setFontSize(12);
ctx.setFillStyle('#000');
ctx.textAlign = "left";
console.log(111);
ctx.fillText(self.data.detail.title, 26, 196.5);
ctx.fillText(self.data.detail.title, 25.5, 197);
ctx.fillText(self.data.detail.title, 16, 306.5);
ctx.fillText(self.data.detail.title, 15.5, 307);
ctx.restore();
//地点
ctx.setFontSize(13);
ctx.setFontSize(9);
ctx.setFillStyle('#000000');
ctx.fillText('地点:', 25, 229);
const text = self.data.detail.address;
ctx.fillText('地点:', 16, 325);
const text = self.data.detail.name;
var chr = text.split("");//这个方法是将一个字符串分割成字符串数组
var temp = "";
var row = [];
ctx.setFontSize(13);
ctx.setFontSize(9);
ctx.setFillStyle('#000000');
for (var a = 0; a < chr.length; a++) {
if (ctx.measureText(temp).width < 170) {
if (ctx.measureText(temp).width < 100) {
temp += chr[a];
}
else {
... ... @@ -565,7 +571,7 @@ Page({
var test = "";
var empty = [];
for (var a = 0; a < rowPart.length; a++) {
if (ctx.measureText(test).width < 170) {
if (ctx.measureText(test).width < 100) {
test += rowPart[a];
}
else {
... ... @@ -578,19 +584,19 @@ Page({
row = rowCut;
}
for (var b = 0; b < row.length; b++) {
ctx.fillText(row[b], 63, 229 + b * 16, 150);
ctx.fillText(row[b], 40, 325 + b * 16, 150);
}
ctx.restore();
//时间
ctx.setFontSize(13);
ctx.setFontSize(9);
ctx.setFillStyle('#333333');
ctx.fillText('时间:', 25, 249);
ctx.fillText(self.data.end_time, 63, 249);
ctx.fillText('时间:', 16, 340);
ctx.fillText(self.data.end_time, 40, 340);
ctx.restore();
// ctx.drawImage("../../../../images/home-banner.png", 0, 0, 250, 150)
//成功执行,draw方法中进行回调
ctx.draw(true, function () {
// wx.hideLoading();
// wx.hideLoading();
console.log("draw callback success");
self.setData({can_save: true,show_canvas: true});
console.log(self.data.can_save);
... ... @@ -665,10 +671,10 @@ Page({
wx.canvasToTempFilePath({
x: 0,
y: 0,
width: 300,
height: 300,
destWidth: 300,
destHeight: 300,
width: 280,
height: 400,
destWidth: 560,
destHeight: 800,
canvasId: 'canvas',
fileType: 'jpg',
quality:1,
... ...
... ... @@ -109,7 +109,7 @@
</view>
<view class="people-num">
<view class="name">{{item.name}}</view>
<view class="num">({{item.number}})</view>
<view class="num">{{item.number}}人</view>
</view>
</view>
</view>
... ... @@ -201,12 +201,14 @@
<!--(0全部,2待拼成,3人数不足未拼成,4已拼成,5已取消,6已完成,7已评价,8已拼成(活动未结束),9删除-->
<button class="confirm-join-btn {{is_send === 1 && detail.status !== 8?'gray':''}}" form-type="submit">
<text wx:if="{{is_send === 1 && detail.status === 2}}">待拼成</text>
<text wx:if="{{is_send === 2 && detail.status === 2}}">确认拼餐</text>
<text wx:if="{{is_send === 1 && detail.status === 8}}">待完成</text>
<text wx:if="{{is_send === 2 && detail.status === 8 }}">确认拼活动</text>
<text wx:if="{{is_send === 2 && detail.status === 2 }}">确认拼活动</text>
<text wx:if="{{detail.status === 3}}">未拼成</text>
<text wx:if="{{detail.status === 4}}">已拼成</text>
<text wx:if="{{detail.status === 5}}">已取消</text>
<text wx:if="{{detail.status === 6 || detail.status === 7}}">已完成</text>
<text wx:if="{{detail.status === 8}}">已拼成</text>
<!--<text wx:if="{{detail.status === 8}}">已拼成</text>-->
<text wx:if="{{detail.status === 9}}">已删除</text>
</button>
</form>
... ...
... ... @@ -245,7 +245,8 @@ swiper {
align-items: center;
}
.people-num .name {
width:100rpx;
/* width:100rpx; */
margin-right:10rpx;
text-align: center;
/* margin-right: 10rpx; */
color: #333333;
... ... @@ -610,7 +611,8 @@ swiper {
.canvas-poster {
/* position: fixed; */
/* width: 600rpx; */
height: 678rpx;
width: 260px;
height: 400px;
/* top: 100%; */
/* left: 100%; */
/* overflow: hidden; */
... ... @@ -620,12 +622,12 @@ swiper {
display: flex;
align-items: center;
justify-content: space-between;
height: 56rpx;
height: 76rpx;
/*border-top: 1rpx solid #E8E8E8;*/
}
.save-to-phone, .share-btn{
width: 50%;
line-height: 56rpx;
line-height: 76rpx;
color:#fff;
font-size: 24rpx;
text-align: center;
... ...
... ... @@ -29,7 +29,7 @@ Page({
},
//完成按钮
goBack() {
wx.redirectTo({url:'/pages/spell-list/spell-list?current=' + 0})
// wx.redirectTo({url:'/pages/spell-list/spell-list?current=' + 0})
},
//输入标题
inputTitle(e) {
... ... @@ -351,7 +351,29 @@ Page({
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
onShareAppMessage: function (res) {
let self = this;
if(res.from === 'button') {
return {
title: self.data.title, // 默认是小程序的名称(可以写slogan等)
path: '/pages/meal/detail/detail?id=' + self.data.id, // 默认是当前页面,必须是以‘/’开头的完整路径
imageUrl: self.data.images[0], //自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
success: function (res) {
if (res.errMsg == 'shareAppMessage:ok') {
}
},
fail: function () {
// 转发失败之后的回调
if (res.errMsg == 'shareAppMessage:fail cancel') {
// 用户取消转发
} else if (res.errMsg == 'shareAppMessage:fail') {
// 转发失败,其中 detail message 为详细失败信息
}
},
complete: function () {
// 转发结束之后的回调(转发成不成功都会执行)
}
}
}
},
})
\ No newline at end of file
... ...
... ... @@ -115,7 +115,7 @@
<image class="sorry-img" src="../../images/success@2x.png"></image>
<view class="title">恭喜您发布成功</view>
<view class="view-btn" catchtap="goMyRelease">查看我的发布</view>
<view class="complete-btn" catchtap="goBack">完成</view>
<button class="complete-btn" catchtap="goBack" open-type="share">分享</button>
</view>
<view class="modal_box" wx:if="{{is_showRelease_modal}}" bindtap="handleBackground"
catchtouchmove="disableScroll"></view>
... ...
... ... @@ -77,12 +77,14 @@ Page({
inputCountry(e) {
this.setData({
country: e.detail.value,
is_choose_country:true
})
},
//输入城市
inputCity(e) {
this.setData({
city: e.detail.value,
is_choose_city:true
})
},
//简介
... ... @@ -101,6 +103,7 @@ Page({
this.setData({
currentnum: len,
introduce: textcontent,
is_choose_introduce:true
});
console.log('textcontent', textcontent);
if(this.data.current_sex !== undefined &&
... ... @@ -118,27 +121,27 @@ Page({
//保存
submit() {
console.log('this.data.phone_number.length', this.data.phone_number.length);
if(this.data.current_sex === undefined) {
if(this.data.current_sex === undefined && this.data.user.sex === null) {
wx.showToast({title:'请选择性别',icon:'none'})
}else if(this.data.country === '') {
}else if(this.data.country === '' && this.data.user.country === null) {
wx.showToast({title:'请填写国家',icon:'none'})
}else if(this.data.city === '') {
}else if(this.data.city === '' && this.data.user.city === null) {
wx.showToast({title:'请填写城市',icon:'none'})
}else if (this.data.phone_number === '') {
}else if (this.data.phone_number === '' && this.data.user.tel === null) {
wx.showToast({title:'请填写手机号',icon:'none'})
}else if(this.data.is_wrong_phone){
wx.showToast({title:'手机号格式错误',icon:'none'})
}else if(this.data.introduce === '') {
}else if(this.data.introduce === '' && this.data.user.introduce === null) {
wx.showToast({title:'请填写简介',icon:'none'})
}else {
let url = '/portal/Member/detail';
let params = {
token: wx.getStorageSync('token'),
sex: this.data.sexList[this.data.current_sex] === '男'?1:2,
country:this.data.country,
city:this.data.city,
tel:this.data.phone_number,
introduce:this.data.introduce
sex: this.data.user.sex === 1?'男':this.data.user.sex === 2?'女':'',
country:this.data.is_choose_country?this.data.country:this.data.user.country,
city:this.data.is_choose_city?this.data.city:this.data.user.city,
tel:this.data.phone_number !== ''?this.data.phone_number:this.data.user.tel,
introduce:this.data.is_choose_introduce?this.data.introduce:this.data.user.introduce
};
app.post(url, params, {}).then((res) => {
console.log('保存', res);
... ... @@ -154,10 +157,34 @@ Page({
});
}
},
getDetail() {
let url = '/portal/Member/detail';
let params = {
token: wx.getStorageSync('token'),
};
app.post(url, params, {}).then((res) => {
console.log('获取个人信息', res);
if (+res.code === 1) {
this.setData({user:res.data});
if(this.data.user.country === null ||
this.data.user.city === null ||
this.data.user.tel === null ||
this.data.user.introduce === null
) {
this.setData({is_change:false});//完成按钮不能点
}else {
this.setData({is_change:true});
}
}
});
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({userInfo:app.globalData.userInfo});
// console.log('userInfo', this.data.userInfo);
this.getDetail();
},
... ...
... ... @@ -2,39 +2,40 @@
<view class="content">
<view class="flex-box flex-picker">
<view class="title">性别:</view>
<view class="text">
<picker bindchange="sexPickerChange" value="{{current_sex}}" range="{{sexList}}" class="picker">
<view class="sex-picker">
<text class="variety-text">{{sexList[current_sex]}}</text>
<!--<text class="variety-text" wx:else>{{pet_info.sex===2?'MM':'GG'}}</text>-->
<view class="iconfont icon-arrow-down"></view>
</view>
</picker>
<view class="variety-text">
{{userInfo.gender === 1?'男':userInfo.gender === 2?'女':'未知'}}
<!--<picker bindchange="sexPickerChange" value="{{current_sex}}" range="{{sexList}}" class="picker">-->
<!--<view class="sex-picker">-->
<!--<text class="variety-text">{{sexList[current_sex] || user.sex === 1?'男':user.sex === 2?'女':''}}</text>-->
<!--&lt;!&ndash;<text class="variety-text" wx:else>{{pet_info.sex===2?'MM':'GG'}}</text>&ndash;&gt;-->
<!--<view class="iconfont icon-arrow-down"></view>-->
<!--</view>-->
<!--</picker>-->
</view>
</view>
<view class="flex-box">
<view class="title">国家:</view>
<view class="text">
<input type="text" bindinput="inputCountry"/>
<input type="text" bindinput="inputCountry" value="{{country || user.country}}"/>
</view>
</view>
<view class="flex-box">
<view class="title">城市:</view>
<view class="text">
<input type="text" bindinput="inputCity"/>
<input type="text" bindinput="inputCity" value="{{city || user.city}}"/>
</view>
</view>
<view class="flex-box">
<view class="title">手机号:</view>
<view class="phone-box">
<input type="number" bindinput="inputPhone" bindblur="blur" value="{{phone_number}}"/>
<input type="number" bindinput="inputPhone" bindblur="blur" value="{{phone_number || user.tel}}"/>
<button open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber" class="phone-btn">自动填写</button>
</view>
</view>
<view class="content-box">
<view class="title">个人简介:</view>
<view class="text">
<textarea type="text" bindinput="inputContent" maxlength="50"></textarea>
<textarea type="text" bindinput="inputContent" maxlength="50" value="{{introduce || user.introduce}}"></textarea>
<view class='word_num'>{{currentnum}}/{{maxlength}}</view>
</view>
</view>
... ...
... ... @@ -3,9 +3,10 @@
<view class="bg">
<!-- // (0全部,2待拼成,3人数不足未拼成,4已拼成,5已取消,6已完成,7已评价,8已拼成(活动未结束),9删除-->
<view class="no-data" wx:if="{{list.length===0}}">钱包是空的~</view>
<view class="list-item {{item.type === 1?'change-bg':''}} {{item.status === 6?'change-bg-end':''}}"
<view class="list-item {{item.type === 1?'change-bg':''}} {{item.status === 6?'change-bg-end':''}} {{item.status === 10?'change-bg-cancel':''}}"
wx:for="{{list}}" wx:key="index" data-id="{{item.id}}" bindtap="goDetail">
<image src="../../../images/end-flag@2x.png" wx:if="{{item.status === 6}}" class="flag-img"></image>
<image src="../../../images/end-flag@2x.png" wx:if="{{item.status === 10}}" class="flag-img"></image>
<view class="detail {{item.status === 6?'change-color':''}}">
<view class="area">
<text class="addr">{{item.addr}}</text>
... ...
... ... @@ -43,6 +43,10 @@
.change-bg-end {
background-image: url('http://qiniuyun.wmatchrd.com/yiwancheng@2x.png');
}
/*灰色*/
.change-bg-cancel {
background-image: url('http://qiniuyun.wmatchrd.com/yiwancheng@2x.png');
}
.detail {
width:390rpx;
display: flex;
... ...
... ... @@ -210,8 +210,9 @@ Page({
},
//编辑个人信息
EditUserInfo() {
const user = JSON.stringify(this.data.user);
wx.navigateTo({
url: '/pages/my/edit-info/edit-info',
url: '/pages/my/edit-info/edit-info?user=' + user,
})
},
//我的收藏
... ...
... ... @@ -15,10 +15,10 @@
<view class="class-box">
<image src="../../images/jin@2x.png" wx:if="{{user.level === 1}}"></image>
<image src="../../images/yin@2x.png" wx:if="{{user.level === 2}}"></image>
<image src="../../images/tong@2x.png" wx:if="{{user.level === 3}}"></image>
<image src="../../images/mu@2x.png" wx:if="{{user.level === 3}}"></image>
<text wx:if="{{user.level === 1}}">金火柴</text>
<text wx:if="{{user.level === 2}}">银火柴</text>
<text wx:if="{{user.level === 3}}">铜火柴</text>
<text wx:if="{{user.level === 2}}" class="{{user.level === 2?'change-yin':''}}">银火柴</text>
<text wx:if="{{user.level === 3}}" class="{{user.level === 3?'change-mu':''}}">木火柴</text>
</view>
</view>
<view class="right">
... ...
... ... @@ -118,6 +118,12 @@
font-size: 10rpx;
border-radius: 4rpx;
}
.head-box .left .class-box .change-yin {
background-color: #CCCCCC;
}
.head-box .left .class-box .change-mu {
background-color: #896A4F;
}
.user-img {
position: absolute;
top:40rpx;
... ... @@ -284,7 +290,7 @@
.score-box {
height:696rpx;
/* top:68%; */
background-image: url('http://pk86rwhci.bkt.clouddn.com/dsdfhgfhfdh@2x.png');
background-image: url('http://qiniuyun.wmatchrd.com/dsdfhgfhfdh@2x.png');
background-repeat: no-repeat;
-webkit-background-size: 100%;
background-size: 100%;
... ...
... ... @@ -11,14 +11,14 @@
<view class="state2">
<!--{{detail.status === 4 ||detail.status === 5 || detail.status === 6||detail.status === 8?'change':''}}-->
<view class="circle change"></view>
<text wx:if="{{order_detail.status === 5}}">已取消</text>
<text wx:if="{{order_detail.status === 5 || order_detail.status === 10}}">已取消</text>
<text wx:if="{{order_detail.status === 4|| order_detail.status === 6 || order_detail.status === 7 || order_detail.status === 8}}">已拼成</text>
<text wx:if="{{order_detail.status === 2 || order_detail.status === 3}}" class="{{order_detail.status === 2?'change-text':''}}">待拼成</text>
</view>
<view class="state3">
<view class="circle {{order_detail.status === 6?'change':''}}"></view>
<text wx:if="{{order_detail.status === 6}}">已完成</text>
<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>
<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>
</view>
</view>
... ... @@ -33,7 +33,7 @@
</view>
<text class="text">订单编号:{{order_detail.order_sn}}</text>
<text class="text">交易时间:{{order_detail.create_time}}</text>
<text class="text">联系方式:{{order_detail.userTel || '暂无手机号'}}</text>
<!--<text class="text">联系方式:{{order_detail.userTel || '暂无手机号'}}</text>-->
<textarea maxlength="-1" placeholder="请填写您要投诉的内容" placeholder-class="placeholder"
bindinput="inputContent"
... ...
... ... @@ -53,7 +53,7 @@ Page({
const self = this;
wx.showModal({
title: '提示',
content: '确定删除吗?',
content: '确定取消吗?',
success(res) {
if (res.confirm) {
console.log('用户点击确定');
... ...
... ... @@ -11,28 +11,33 @@
<view class="state2">
<!--{{detail.status === 4 ||detail.status === 5 || detail.status === 6||detail.status === 8?'change':''}}-->
<view class="circle change"></view>
<text wx:if="{{detail.status === 5}}">已取消</text>
<text wx:if="{{detail.status === 5 || detail.status === 10}}">已取消</text>
<text wx:if="{{detail.status === 4 || detail.status === 6 || detail.status === 7 || detail.status === 8}}">已拼成</text>
<text wx:if="{{detail.status === 2 || detail.status === 3}}" class="{{detail.status === 2?'change-text':''}}">待拼成</text>
<text wx:if="{{detail.status === 2}}" class="{{detail.status === 2?'change-text':''}}">待拼成</text>
<text wx:if="{{detail.status === 3}}" class="{{detail.status === 3?'change-text':''}}">未拼成</text>
</view>
<view class="state3">
<view class="circle {{detail.status === 6?'change':''}}"></view>
<text wx:if="{{detail.status === 6}}">已完成</text>
<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>
<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>
</view>
</view>
<view class="order-info" bindtap="goDetail">
<view class="top">
<!--<image src="../../../images/avatar@2x.png"></image>-->
<image src="{{detail.userPic}}"></image>
<image src="{{detail.userSex === 1?'../../../images/man.png':'../../../images/women.png'}}" class="sex-icon"></image>
<text class="name">{{detail.userName}}</text>
<view class="box" bindtap="goDetail">
<image src="{{detail.pic}}" class="banner"></image>
<view class="order-info">
<view class="top">
<!--<image src="../../../images/avatar@2x.png"></image>-->
<image src="{{detail.userPic}}" class="user-avatar"></image>
<image src="{{detail.userSex === 1?'../../../images/man.png':'../../../images/women.png'}}" class="sex-icon"></image>
<text class="name">{{detail.userName}}</text>
</view>
<text class="address">{{detail.title}}</text>
<text class="time">{{detail.time}}</text>
</view>
<text class="address">{{detail.title}}</text>
<text class="time">{{detail.time}}</text>
</view>
<view class="complain" catchtap="goComplain"><text>去投诉</text></view>
<view class="order-detail">
... ... @@ -42,9 +47,19 @@
<view class="bottom">
<!-- // (0全部,2待拼成,3人数不足未拼成,4已拼成,5已取消,6已完成,7已评价,8已拼成(活动未结束),9删除-->
<text class="cancel-btn" wx:if="{{detail.status === 4 || detail.status === 2|| detail.status === 8}}" bindtap="cancel">取消订单</text>
<text class="cancel-btn" wx:if="{{detail.status === 2}}" bindtap="cancel">取消订单</text>
<text class="cancel-btn gray" wx:if="{{detail.status === 2}}">待拼成</text>
<text class="cancel-btn gray" wx:if="{{detail.status === 8}}">已拼成</text>
<!--<text class="cancel-btn gray" wx:if="{{detail.status === 8}}">已拼成</text>-->
<text class="confirm-btn" wx:if="{{detail.status === 4}}" bindtap="confirm">完成</text>
<text class="confirm-btn gray" wx:if="{{detail.status === 4}}">待完成</text>
<!--1发布人,2拼餐/拼活动人-->
<block wx:if="{{detail.sonType === 1}}">
<text class="confirm-btn" wx:if="{{detail.status === 8}}" bindtap="cancel">取消订单</text>
<text class="cancel-btn gray" wx:if="{{detail.status === 8}}">待完成</text>
</block>
<block wx:if="{{detail.sonType === 2}}">
<text class="cancel-btn gray border" wx:if="{{detail.status === 8}}">取消订单</text>
<text class="cancel-btn gray" wx:if="{{detail.status === 8}}">待完成</text>
</block>
</view>
</view>
... ...
... ... @@ -47,6 +47,20 @@
left:50%;
transform: translate(-50%,-50%);
}
.box {
display: flex;
align-items: center;
padding: 20rpx;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
border-bottom: 1rpx solid #f2f2f2;
}
.box image {
width: 153rpx;
height: 153rpx;
margin-right: 20rpx;
}
.order-info {
display: flex;
flex-direction: column;
... ... @@ -85,7 +99,6 @@
padding: 28rpx 0 32rpx 0;
}
.time {
border-bottom: 1rpx solid #f2f2f2;
padding-bottom: 40rpx;
}
.order-detail {
... ... @@ -132,6 +145,9 @@
color: #E1C8AF;
border:0;
}
.bottom .border {
border-right: 1rpx solid #fff;
}
.complain {
z-index:10;
padding: 0 20rpx;
... ...
... ... @@ -23,7 +23,7 @@
<text wx:if="{{item.status === 2}}" class="state">待拼成</text>
<text wx:if="{{item.status === 3}}" class="state">未拼成</text>
<text wx:if="{{item.status === 4 || item.status === 8}}" class="state">已拼成</text>
<text wx:if="{{item.status === 5}}" class="state">已取消</text>
<text wx:if="{{item.status === 5 || item.status === 10}}" class="state">已取消</text>
<text wx:if="{{item.status === 6}}" class="state">已完成</text>
<text wx:if="{{item.status === 7}}" class="state">已评价</text>
</view>
... ... @@ -33,7 +33,7 @@
<!--<image src="../../images/avatar@2x.png" class="avatar"></image>-->
<image src="{{item.userPic}}" class="avatar"></image>
<image src="{{item.userSex === 1?'../../images/man.png':'../../images/women.png'}}" class="sex-icon"></image>
<text>{{item.userName}} 在{{item.address}}</text>
<text>{{item.userName}}</text>
</view>
<view class="btn">
<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 @@
.score-box {
height:696rpx;
/* top:68%; */
background-image: url('http://pk86rwhci.bkt.clouddn.com/dsdfhgfhfdh@2x.png');
background-image: url('http://qiniuyun.wmatchrd.com/dsdfhgfhfdh@2x.png');
background-repeat: no-repeat;
-webkit-background-size: 100%;
background-size: 100%;
... ...
... ... @@ -337,7 +337,7 @@
.score-box {
height:696rpx;
/* top:68%; */
background-image: url('http://pk86rwhci.bkt.clouddn.com/dsdfhgfhfdh@2x.png');
background-image: url('http://qiniuyun.wmatchrd.com/dsdfhgfhfdh@2x.png');
background-repeat: no-repeat;
-webkit-background-size: 100%;
background-size: 100%;
... ...