@@ -52,7 +52,8 @@ | |||
"pages/paySuccess/paySuccess", | |||
"pages/ConsumeDetail/ConsumeDetail", | |||
"pages/externallinks/index", | |||
"pages/czdetail/czdetail" | |||
"pages/czdetail/czdetail", | |||
"pages/spellGroup/paySpellGroup/index" | |||
], | |||
"navigateToMiniProgramAppIdList": [ | |||
"wx192b7d2e8dcbefd0", | |||
@@ -387,7 +387,7 @@ Page({ | |||
let orderId = "" + res.data.id; | |||
that.setData({ | |||
orderId: orderId, | |||
canSpell: true, | |||
canSpell: false, | |||
canBuyIf: true | |||
}); | |||
// 支付金额不为0 | |||
@@ -413,6 +413,9 @@ Page({ | |||
wx.showLoading({ | |||
title: '订单正在处理中...', | |||
}) | |||
that.setData({ | |||
canSpell: false | |||
}) | |||
setTimeout(function () { | |||
wx.hideLoading() | |||
}, 5000) | |||
@@ -335,15 +335,11 @@ Page({ | |||
setTimeout(function () { | |||
wx.hideLoading(); | |||
}, 1600); | |||
if (_this.data.order.type==9){ | |||
_this.goToOrderGroup(orderId, 0, _this) | |||
}else{ | |||
setTimeout(() => { | |||
wx.redirectTo({ | |||
url: `/pages/order/detail/index?orderId=${orderId}` | |||
}); | |||
}, 1600); | |||
} | |||
setTimeout(() => { | |||
wx.redirectTo({ | |||
url: `/pages/order/detail/index?orderId=${orderId}` | |||
}); | |||
}, 1600); | |||
} | |||
}); | |||
} else if (type == 'free'){ | |||
@@ -72,8 +72,7 @@ | |||
</view> | |||
<!-- 待付款 显示立即购买的按钮 --> | |||
<view wx:if="{{order.orderStatus==0&&order.salePrice!=0||order.orderStatus==7&&order.salePrice!=0}}" class="buy-view app-border-top"> | |||
<button bindtap='orderFunc' hover-class='active' wx:if="{{order.type != 9}}" data-couponChannelId="{{order.id}}" disabled='{{showButton}}' class='buy'>立即支付</button> | |||
<button bindtap='orderFunc' hover-class='active' wx:if="{{order.type == 9}}" data-couponChannelId="{{order.id}}" disabled='{{showButton}}' class='buy'>支付拼团订单</button> | |||
<button bindtap='orderFunc' hover-class='active' data-couponChannelId="{{order.id}}" disabled='{{showButton}}' class='buy'>立即支付</button> | |||
</view> | |||
<view class='game' bindtap="gotogame" wx-if="{{showIf&&order.orderStatus!=0}}"> | |||
<view class='game-entry'> | |||
@@ -50,6 +50,13 @@ Page({ | |||
url: `/pages/order/detail/index?orderId=${e.currentTarget.dataset.id}&flag='pay'` | |||
}) | |||
}, | |||
// gotoSpellPay(e) { | |||
// console.log(e, 333) | |||
// let data = e.currentTarget.dataset.data | |||
// wx.navigateTo({ | |||
// url: `/pages/spellGroup/paySpellGroup/index?orderId=${data.orderId}&couponId=${data.couponId}&orderGroupId=${data.orderGroupId}&couponChannelId=${data.couponChannelId}`, | |||
// }) | |||
// }, | |||
getList(key, pageNum) { | |||
let that = this; | |||
/** | |||
@@ -58,6 +58,9 @@ | |||
<view wx:if="{{item.orderStatus==0 || item.orderStatus==7}}" class="btn" data-id="{{item.id}}" bindtap="gotopay"> | |||
<text>去支付</text> | |||
</view> | |||
<!-- <view wx:if="{{item.orderStatus==15&&item.type==9}}" data-data="{{item}}" class="btn" data-id="{{item.id}}" bindtap="gotoSpellPay"> | |||
<text>去支付</text> | |||
</view> --> | |||
<view wx:if="{{item.orderStatus==5}}" style="background:#999;opacity: .6;" class="btn"> | |||
<text>退款失败</text> | |||
</view> | |||
@@ -378,7 +378,7 @@ Page({ | |||
let orderId = "" + res.data.id; | |||
that.setData({ | |||
orderId: orderId, | |||
canSpell: true, | |||
canSpell: false, | |||
canBuyIf: true | |||
}); | |||
// 支付金额不为0 | |||
@@ -401,6 +401,9 @@ Page({ | |||
signType: (res.data.signType) ? res.data.signType : "MD5", | |||
paySign: res.data.paySign, | |||
success: res => { | |||
that.setData({ | |||
canSpell: false | |||
}) | |||
wx.showLoading({ | |||
title: '订单正在处理中...', | |||
}) | |||
@@ -0,0 +1,286 @@ | |||
// pages/spellDetail/index.js | |||
var config = require("../../../config/config.js"); | |||
const Http = require("../../../utils/HttpBasics"); | |||
const imgurl = require("../../../utils/imgurl"); | |||
const { spellStatus } = require("../../../utils/spell"); | |||
Page({ | |||
/** | |||
* 页面的初始数据 | |||
*/ | |||
data: { | |||
tuanzhang: imgurl.tuanzhang.url, | |||
spellBg: imgurl.spellBg.url, | |||
position: imgurl.position.url, | |||
close03: imgurl.close03.url, | |||
home: imgurl.home.url, | |||
paramData: null, | |||
data: null, | |||
clock: "00", | |||
day: "0", | |||
hour: "00", | |||
min: "00", | |||
sec: "00", | |||
spellStatusList: spellStatus, | |||
isMyself: false, | |||
showAlert: false | |||
}, | |||
gotoAgain() { | |||
let data = this.data.data; | |||
wx.navigateTo({ | |||
url: `/pages/spellGroup/mySpellGroup/index?couponId=${data.couponId}&couponChannelId=${data.couponChannelId}`, | |||
}) | |||
}, | |||
getUserInfo: function () { | |||
let that = this; | |||
// 获取用户信息 | |||
Http.get({ | |||
url: config.api.getScore, | |||
data: {} | |||
}) | |||
.then(res => { | |||
console.log(res) | |||
that.setData({ | |||
nickName: res.data.nickName, | |||
avatarUrl: res.data.avatarUrl | |||
}) | |||
}) | |||
}, | |||
gotoIndex(){ | |||
wx.reLaunch({ | |||
url: '/pages/index/index', | |||
}) | |||
}, | |||
gotoSearch() { | |||
wx.navigateTo({ | |||
url: `/pages/spellGroup/spellGroup`, | |||
}) | |||
}, | |||
/** | |||
* 生命周期函数--监听页面加载 | |||
*/ | |||
onLoad: function (options) { | |||
console.log(this.data.spellStatusList, options, 7777777) | |||
this.setData({ | |||
paramData: options | |||
}) | |||
this.getUserInfo(); | |||
if (options.orderGroupId){ | |||
if (options.orderId && options.couponId){ | |||
this.getDetail(options); | |||
} | |||
} | |||
// 关闭来自于左上角的分享 | |||
wx.hideShareMenu() | |||
}, | |||
/** | |||
* 去拼团 | |||
*/ | |||
goToOrderGroup(orderId, orderGroupId, _this){ | |||
console.log(22222222) | |||
let that = this; | |||
// 支付成功 | |||
Http.post({ | |||
url: config.api.toOrderGroup, | |||
data: { | |||
id: orderGroupId, | |||
orderId, | |||
couponId: _this.data.data.couponId | |||
} | |||
}) | |||
.then(res => { | |||
wx.redirectTo({ | |||
url: `/pages/spellDetail/index?orderId=${orderId}&couponId=${_this.data.paramData.couponId}&orderGroupId=${res.data.orderGroupId}&couponChannelId=${_this.data.paramData.couponChannelId}` | |||
}); | |||
}) | |||
.catch(err => { | |||
console.log(err); | |||
}) | |||
// return; | |||
}, | |||
/** | |||
* 支付订单更新 | |||
*/ | |||
payOrderUpdate: (orderId, payOrderId, status, reason, _this, orderGroupId) => { | |||
console.log(orderGroupId,7777) | |||
let that = this; | |||
// 支付成功 | |||
Http.post({ | |||
url: config.api.payOrderUpdate, | |||
data: { | |||
payOrderId: payOrderId, | |||
orderId: orderId, | |||
status: status, | |||
reason: reason | |||
} | |||
}) | |||
.then(res => { | |||
wx.hideLoading() | |||
if (orderGroupId==undefined){ | |||
wx.navigateTo({ | |||
url: '/pages/order/detail/index?orderId='+res.data.id, | |||
}) | |||
}else{ | |||
_this.goToOrderGroup(orderId, res.data.orderGroupId, _this) | |||
} | |||
}) | |||
.catch(err => { | |||
console.log(err); | |||
if (err.code!=12002){ | |||
setTimeout(function () { | |||
_this.payOrderUpdate(orderId, payOrderId, status, reason, _this, orderGroupId); | |||
}, 2000) | |||
} | |||
}) | |||
}, | |||
gotoPay(){ | |||
let that=this; | |||
wx.showLoading({ | |||
title: '支付创建中...', | |||
}) | |||
Http.post({ | |||
url: config.api.payOrderCreate, | |||
data: { | |||
orderId: that.data.paramData.orderId | |||
} | |||
}) | |||
.then(res => { | |||
var payOrderId = "" + res.data.payOrderId; | |||
wx.hideLoading(); | |||
wx.requestPayment({ | |||
timeStamp: res.data.timeStamp, | |||
nonceStr: res.data.nonceStr, | |||
package: res.data.package, | |||
signType: (res.data.signType) ? res.data.signType : "MD5", | |||
paySign: res.data.paySign, | |||
success: res => { | |||
wx.showLoading({ | |||
title: '订单正在处理中...', | |||
}) | |||
setTimeout(function () { | |||
wx.hideLoading() | |||
}, 5000) | |||
that.payOrderUpdate(that.data.paramData.orderId, payOrderId, 1, '', that, 0); | |||
if (res.errMsg == "requestPayment:ok") { | |||
setTimeout(function () { | |||
wx.hideLoading(); | |||
}, 2000); | |||
} | |||
}, | |||
fail: res => { | |||
/** | |||
* 支付失败,需要更新订单的状态 | |||
*/ | |||
that.payOrderUpdate(that.data.orderId, payOrderId, 2, '', that, 0); | |||
that.setData({ | |||
showbutton: false, | |||
canSpell: true, | |||
canBuyIf: true | |||
}) | |||
return; | |||
}, | |||
complete: res => { } | |||
}); | |||
/// End payment -------- | |||
}) | |||
.catch(err => { | |||
that.setData({ | |||
canSpell: true, | |||
canBuyIf: true | |||
}) | |||
wx.showToast({ | |||
title: err.message, | |||
icon: 'none', | |||
duration: 2000, | |||
mask: false | |||
}); | |||
}) | |||
}, | |||
/** | |||
* 去使用 | |||
*/ | |||
gotoUse() { | |||
wx.navigateTo({ | |||
url: `/pages/couponorder/index/index` | |||
}); | |||
}, | |||
/** | |||
* 拼团状态字段转换 | |||
*/ | |||
changeSatus(status) { | |||
console.log(spellStatus, 8888888) | |||
return spellStatus.filter(item => item.value == status)[0].name; | |||
}, | |||
//跳转拼团列表 | |||
gotoSpellList() { | |||
wx.navigateTo({ | |||
url: '/pages/spellGroup/spellGroup', | |||
}) | |||
}, | |||
/** | |||
* 获取券详情信息 | |||
*/ | |||
getDetail(){ | |||
let that = this; | |||
Http.get({ | |||
url: config.api.couponDetail, | |||
data: { | |||
couponChannelId: this.data.paramData.couponChannelId | |||
} | |||
}).then(res => { | |||
wx.stopPullDownRefresh(); | |||
let data = res.data; | |||
that.setData({ | |||
data | |||
}); | |||
}); | |||
}, | |||
/** | |||
* 生命周期函数--监听页面初次渲染完成 | |||
*/ | |||
onReady: function () { | |||
}, | |||
/** | |||
* 生命周期函数--监听页面显示 | |||
*/ | |||
onShow: function () { | |||
this.setData({ | |||
showTime: true | |||
}) | |||
}, | |||
/** | |||
* 生命周期函数--监听页面隐藏 | |||
*/ | |||
onHide: function () { | |||
this.setData({ | |||
showTime: false | |||
}) | |||
}, | |||
/** | |||
* 生命周期函数--监听页面卸载 | |||
*/ | |||
onUnload: function () { | |||
this.setData({ | |||
showTime: false | |||
}) | |||
}, | |||
/** | |||
* 页面相关事件处理函数--监听用户下拉动作 | |||
*/ | |||
onPullDownRefresh: function () { | |||
this.getDetail(this.data.paramData); | |||
}, | |||
/** | |||
* 页面上拉触底事件的处理函数 | |||
*/ | |||
onReachBottom: function () { | |||
} | |||
}) |
@@ -0,0 +1,6 @@ | |||
{ | |||
"navigationBarTitleText": "拼团详情", | |||
"usingComponents": {}, | |||
"navigationBarBackgroundColor": "#F13C42", | |||
"enablePullDownRefresh": true | |||
} |
@@ -0,0 +1,33 @@ | |||
<!--pages/spellDetail/index.wxml--> | |||
<view class='container'> | |||
<!-- 拼团产品详情 --> | |||
<view class='detail'> | |||
<view class='return-index' bindtap='gotoIndex'> | |||
<image src='{{home}}'></image> | |||
</view> | |||
<view class='detail-top'> | |||
<view class='detail-top01'> | |||
<image src='{{data.coverImg}}' mode="aspectFill"></image> | |||
</view> | |||
<view class='detail-top02'> | |||
<view class='title'>{{data.title}}</view> | |||
<view class='des'>{{data.subTitle}}</view> | |||
</view> | |||
<view class='detail-top03'> | |||
<view class='detail-p-price'>{{data.salePrice/100}}元</view> | |||
<view class='detail-p-name'>拼团价</view> | |||
</view> | |||
</view> | |||
</view> | |||
<!-- 拼团订单信息 --> | |||
<view class='order'> | |||
<view class='order-list'> | |||
<view class='order-title'>订单编号:</view> | |||
<view class='order-text'>{{paramData.orderId}}</view> | |||
</view> | |||
</view> | |||
<view class='edit'> | |||
<button class='user-motto' bindtap='gotoPay'>去支付</button> | |||
</view> | |||
</view> |
@@ -0,0 +1,377 @@ | |||
/* pages/spellDetail/index.wxss */ | |||
page { | |||
height: auto; | |||
overflow: auto; | |||
background: #f89132; | |||
background-image: url('https://s3.cn-northwest-1.amazonaws.com.cn/iformall-net/cimg/spelldetail-bg.png'); | |||
background-size: cover; | |||
background-repeat: no-repeat; | |||
} | |||
.container{ | |||
margin-bottom:40rpx; | |||
} | |||
.status{ | |||
width: 690rpx; | |||
padding:0 28rpx; | |||
margin: 0 auto; | |||
box-sizing: border-box; | |||
background:rgba(255,255,255,1); | |||
border-radius:15rpx; | |||
} | |||
.edit{ | |||
position: fixed; | |||
width: 750rpx; | |||
height: 185rpx; | |||
bottom: 60rpx; | |||
left: 0; | |||
} | |||
.status-top{ | |||
width: 100%; | |||
height: 75rpx; | |||
box-sizing: border-box; | |||
border-bottom: 1rpx solid #F9F9F9; | |||
/* overflow: hidden; */ | |||
} | |||
.p-status{ | |||
float: left; | |||
width: 260rpx; | |||
font-size:32rpx; | |||
font-family:PingFang-SC-Bold; | |||
font-weight:bold; | |||
color:rgba(243,69,58,1); | |||
line-height: 75rpx; | |||
} | |||
.p-time{ | |||
float: right; | |||
font-size:26rpx; | |||
font-family:PingFang-SC-Medium; | |||
font-weight:500; | |||
color:rgba(243,69,58,1); | |||
width: 38rpx; | |||
height: 30rpx; | |||
margin-top: 22rpx; | |||
background:rgba(252,220,221,1); | |||
border-radius:10rpx; | |||
line-height: 30rpx; | |||
text-align: center; | |||
margin: 22rpx 6rpx; | |||
} | |||
.p-mao{ | |||
float: right; | |||
font-size:26rpx; | |||
font-family:PingFang-SC-Medium; | |||
font-weight:500; | |||
color:rgba(243,69,58,1); | |||
line-height: 75rpx; | |||
} | |||
.p-text{ | |||
float: right; | |||
font-size:26rpx; | |||
font-family:PingFang-SC-Regular; | |||
font-weight:400; | |||
color:rgba(51,51,51,1); | |||
line-height:75rpx; | |||
} | |||
.status-center{ | |||
width: 100%; | |||
overflow: hidden; | |||
padding: 20rpx 0; | |||
text-align: center; | |||
border-bottom: 1rpx solid #F9F9F9; | |||
} | |||
.tuanzhang{ | |||
float: left; | |||
width: 120rpx; | |||
height: 120rpx; | |||
position: relative; | |||
box-sizing:border-box; | |||
} | |||
.touxiangitems{ | |||
padding: 20rpx; | |||
margin: 0; | |||
overflow: hidden; | |||
} | |||
.touxiang{ | |||
width: 80rpx; | |||
height: 80rpx; | |||
border-radius: 40rpx; | |||
overflow: hidden; | |||
} | |||
.no-touxiang{ | |||
width: 80rpx; | |||
height: 80rpx; | |||
overflow: hidden; | |||
background:rgba(252,220,221,1); | |||
border:1rpx solid rgba(243,69,58,1); | |||
border-radius:50%; | |||
box-sizing: border-box; | |||
line-height: 78rpx; | |||
text-align: center; | |||
font-size:32rpx; | |||
font-family:PingFang-SC-Regular; | |||
font-weight:400; | |||
color:rgba(243,69,58,1); | |||
margin: 0; | |||
padding: 0; | |||
} | |||
.touxiang image{ | |||
width: 80rpx; | |||
height: 80rpx; | |||
} | |||
.tuan-icon{ | |||
position: absolute; | |||
bottom:20rpx; | |||
left:28rpx; | |||
width: 64rpx; | |||
height: 27rpx; | |||
} | |||
.tuan-icon image{ | |||
display: block; | |||
width: 64rpx; | |||
height: 27rpx; | |||
} | |||
.status-bottom{ | |||
width: 100%; | |||
height: auto; | |||
overflow: hidden; | |||
} | |||
.position-icon{ | |||
width: 38rpx; | |||
float: left; | |||
} | |||
.position-icon image{ | |||
width: 27rpx; | |||
height: 37rpx; | |||
margin-top: 17rpx; | |||
} | |||
.position{ | |||
font-size:28rpx; | |||
font-family:PingFang-SC-Medium; | |||
font-weight:500; | |||
color:rgba(51,51,51,1); | |||
line-height: 72rpx; | |||
} | |||
.detail{ | |||
position: relative; | |||
width: 690rpx; | |||
padding:0 28rpx; | |||
margin: 30rpx auto 0; | |||
box-sizing: border-box; | |||
background:rgba(255,255,255,1); | |||
border-radius:15rpx; | |||
} | |||
.return-index{ | |||
position: absolute; | |||
right: 30rpx; | |||
top: 30rpx; | |||
width: 50rpx; | |||
height: 50rpx; | |||
} | |||
.return-index image{ | |||
display: block; | |||
width: 50rpx; | |||
height: 50rpx; | |||
} | |||
.detail-top{ | |||
width: 100%; | |||
height: auto; | |||
overflow: hidden; | |||
padding-bottom: 12rpx; | |||
} | |||
.detail-top01{ | |||
float: left; | |||
width: 180rpx; | |||
} | |||
.detail-top01 image{ | |||
width: 180rpx; | |||
height: 180rpx; | |||
margin-top: 33rpx; | |||
} | |||
.detail-top02{ | |||
width: 208rpx; | |||
float: left; | |||
margin-left: 16rpx; | |||
} | |||
.title{ | |||
font-size:30rpx; | |||
font-family:PingFang-SC-Bold; | |||
font-weight:bold; | |||
color:rgba(51,51,51,1); | |||
line-height:44rpx; | |||
margin-top: 30rpx; | |||
overflow:hidden; | |||
text-overflow:ellipsis; | |||
white-space:nowrap; | |||
} | |||
.des{ | |||
font-size:26rpx; | |||
font-family:PingFang-SC-Medium; | |||
font-weight:500; | |||
color:rgba(134,134,134,1); | |||
line-height:40rpx; | |||
overflow:hidden; | |||
text-overflow:ellipsis; | |||
white-space:nowrap; | |||
} | |||
.detail-top03{ | |||
float: left; | |||
padding-top: 180rpx; | |||
width: 230rpx; | |||
} | |||
.detail-p-name{ | |||
float: right; | |||
font-size:26rpx; | |||
font-family:PingFang-SC-Medium; | |||
font-weight:500; | |||
color:rgba(134,134,134,1); | |||
line-height:44rpx; | |||
} | |||
.detail-p-price{ | |||
float: right; | |||
font-size:26rpx; | |||
font-family:PingFang-SC-Medium; | |||
font-weight:500; | |||
color:rgba(51,51,51,1); | |||
} | |||
.detail-bottom{ | |||
border-top: 1rpx solid #F9F9F9; | |||
width: 100%; | |||
overflow: hidden; | |||
height: 86rpx; | |||
} | |||
.b-unit{ | |||
float: right; | |||
font-size:24rpx; | |||
font-family:PingFang-SC-Medium; | |||
font-weight:500; | |||
color:rgba(237,63,46,1); | |||
margin-top: 36rpx; | |||
} | |||
.b-price{ | |||
float: right; | |||
font-size:40rpx; | |||
font-family:PingFang-SC-Medium; | |||
font-weight:500; | |||
color:rgba(237,63,46,1); | |||
margin-top: 18rpx; | |||
} | |||
.b-name{ | |||
float: right; | |||
font-size:26rpx; | |||
font-family:PingFang-SC-Medium; | |||
font-weight:500; | |||
color:rgba(51,51,51,1); | |||
margin-right: 6rpx; | |||
margin-top: 34rpx; | |||
} | |||
.order{ | |||
width: 690rpx; | |||
padding:10rpx 28rpx; | |||
margin: 30rpx auto 0; | |||
box-sizing: border-box; | |||
background:rgba(255,255,255,1); | |||
border-radius:15rpx; | |||
} | |||
.order-list{ | |||
height: 55rpx; | |||
} | |||
.order-title{ | |||
line-height: 55rpx; | |||
float: left; | |||
font-size:26rpx; | |||
font-family:PingFang-SC-Medium; | |||
font-weight:500; | |||
color:rgba(51,51,51,1); | |||
} | |||
.order-text{ | |||
float: right; | |||
text-align: right; | |||
line-height: 55rpx; | |||
font-size:26rpx; | |||
font-family:PingFang-SC-Medium; | |||
font-weight:500; | |||
color:rgba(134,134,134,1); | |||
} | |||
.user-motto { | |||
border: 0; | |||
width:650rpx; | |||
height:85rpx; | |||
background:linear-gradient(90deg,rgba(248,85,45,1) 0%,rgba(241,60,66,1) 0%,rgba(248,86,46,1) 100%); | |||
box-shadow:0px 8rpx 8rpx 1rpx rgba(242,61,65,0.32); | |||
border-radius:43rpx; | |||
font-size:36rpx; | |||
font-family:PingFang-SC-Medium; | |||
font-weight:500; | |||
color:rgba(254,254,254,1); | |||
line-height: 85rpx; | |||
margin-top: 100rpx; | |||
} | |||
.user-motto::after { | |||
border: none; | |||
} | |||
.button button:nth-of-type(1){ | |||
width:520rpx; | |||
height:95rpx; | |||
margin: 30rpx auto 38rpx; | |||
background:linear-gradient(90deg,rgba(248,85,45,1) 0%,rgba(241,60,66,1) 0%,rgba(248,86,46,1) 100%); | |||
border-radius:47rpx; | |||
color: #fff; | |||
} | |||
.button button:nth-of-type(2){ | |||
width:520rpx; | |||
height:95rpx; | |||
background:rgba(255,255,255,1); | |||
border:1rpx solid rgba(190,190,190,1); | |||
border-radius:47rpx; | |||
color:#333333; | |||
margin-bottom: 50rpx; | |||
} | |||
.alert-bg{ | |||
width: 100%; | |||
height: 100vh; | |||
position: fixed; | |||
opacity: 0.7; | |||
background: #000; | |||
top: 0; | |||
left: 0; | |||
z-index: 200; | |||
} | |||
.alert-box{ | |||
width: 600rpx; | |||
height: 332rpx; | |||
position: fixed; | |||
z-index: 300; | |||
background: #fff; | |||
top: 50vh; | |||
margin-top: -162rpx; | |||
left: 85rpx; | |||
border-radius:15rpx; | |||
} | |||
.alert-close{ | |||
position: absolute; | |||
width: 47rpx; | |||
height: 98rpx; | |||
top: -98rpx; | |||
right: 0; | |||
} | |||
.alert-close image{ | |||
width: 47rpx; | |||
height: 98rpx; | |||
} | |||
.alert-title{ | |||
text-align: center; | |||
font-size:30rpx; | |||
line-height: 30rpx; | |||
margin-top: 79rpx; | |||
font-family:PingFang-SC-Medium; | |||
font-weight:500; | |||
color:rgba(51,51,51,1); | |||
} | |||
.alert-button .share{ | |||
width:500rpx; | |||
height:95rpx; | |||
background:linear-gradient(90deg,rgba(248,85,45,1) 0%,rgba(241,60,66,1) 0%,rgba(248,86,46,1) 100%); | |||
border-radius:47rpx; | |||
margin-top: 79rpx; | |||
} |
@@ -46,6 +46,16 @@ Page({ | |||
} | |||
that.getUserInfo(); | |||
}, | |||
onShow(){ | |||
let that=this; | |||
that.getList(1, "spellList"); | |||
that.setData({ | |||
flag: "spellList", | |||
spellList: true, | |||
myspellList: false, | |||
lists: null | |||
}) | |||
}, | |||
//切换拼团列表 | |||
getSpellList(){ | |||
this.setData({ | |||
@@ -117,6 +127,13 @@ Page({ | |||
console.log(status) | |||
return spellStatus.filter(item => status == item.value)[0].name | |||
}, | |||
gotoPay(e){ | |||
console.log(e,333) | |||
let data = e.currentTarget.dataset.data | |||
wx.navigateTo({ | |||
url: `/pages/spellGroup/paySpellGroup/index?orderId=${data.orderId}&couponId=${data.couponId}&orderGroupId=${data.orderGroupId}&couponChannelId=${data.couponChannelId}`, | |||
}) | |||
}, | |||
gotoEdit(e){ | |||
console.log(e.currentTarget.dataset.status) | |||
let status = e.currentTarget.dataset.status | |||
@@ -238,8 +255,8 @@ Page({ | |||
console.log(res.data.list) | |||
var tmpArr = that.data.lists; | |||
res.data.list.map((item,index)=>{ | |||
item.statusText = that.changeStatus(item.status); | |||
item.statusText02 = that.changeStatus02(item.status) | |||
item.statusText = that.changeStatus(item.orderStatus); | |||
item.statusText02 = that.changeStatus02(item.orderStatus) | |||
}) | |||
tmpArr.push.apply(tmpArr, res.data.list); | |||
console.log(tmpArr) | |||
@@ -36,18 +36,21 @@ | |||
</view> | |||
<view class='sepll-list' wx:if='{{flag=="myspellList"}}' wx:for="{{lists}}" wx:key="{{index}}" style='position:relative;height:auto;'> | |||
<view class='spell-top'> | |||
<view class='spell-top-left'> | |||
<view class='spell-top-left' wx:if='{{item.orderStatus!=15}}'> | |||
<view class='top-title' wx:if='{{item.remainPeople!=0}}'>距离成团还差</view> | |||
<view class='top-num' wx:if='{{item.remainPeople!=0}}'>{{item.remainPeople+'人'}}</view> | |||
<view class='top-title' style='color:#8C8C8C;' wx:if='{{item.remainPeople==0}}'>{{item.pressLimitNum+'人成团'}}</view> | |||
</view> | |||
<view class='spell-top-left' wx:if='{{item.orderStatus==15}}'> | |||
<view class='top-title' wx:if='{{item.remainPeople!=0}}'>拼团未开始</view> | |||
</view> | |||
<view class='spell-top-right' style='{{"color:"+(item.status==10?"#FF3232":item.status==11?"#57B257":"#8C8C8C")}}'>{{item.statusText02}}</view> | |||
</view> | |||
<view class='spell-bottom'> | |||
<view class='spell-left' data-id='{{item.id}}' data-data='{{item}}' bindtap='gotoStatusDetail'> | |||
<view class='spell-left' data-id='{{item.id}}' data-data='{{item}}' bindtap='{{item.orderStatus!=15?"gotoStatusDetail":"gotoPay"}}'> | |||
<image src='{{item.coverImg}}' mode="aspectFill"></image> | |||
</view> | |||
<view class='spell-center' data-id='{{item.id}}' data-data='{{item}}' bindtap='gotoStatusDetail'> | |||
<view class='spell-center' data-id='{{item.id}}' data-data='{{item}}' bindtap='{{item.orderStatus!=15?"gotoStatusDetail":"gotoPay"}}'> | |||
<view class='tilte'>{{item.title}}</view> | |||
<view class='remark'>{{item.subTitle}}</view> | |||
<view class='price' style='margin-top:50rpx;'> | |||
@@ -60,13 +63,15 @@ | |||
</view> | |||
<view class='spell-right' style='position:absolute;width:auto;bottom:30rpx;right:20rpx;'> | |||
<!-- 继续邀请好友 --> | |||
<button class='share user-motto right-button' open-type="share" id="shareBtn" wx:if='{{item.status==10}}' data-status='{{item.status}}' data-data='{{item}}' hover-class="other-button-hover" style="width:auto;display:inline-block;padding:0 8rpx;">{{item.statusText}}</button> | |||
<button class='share user-motto right-button' open-type="share" id="shareBtn" wx:if='{{item.orderStatus==10}}' data-status='{{item.status}}' data-data='{{item}}' hover-class="other-button-hover" style="width:auto;display:inline-block;padding:0 8rpx;">{{item.statusText}}</button> | |||
<!-- 去使用 --> | |||
<view class='right-button' data-data='{{item}}' wx:if='{{item.status==11}}' data-status='{{item.status}}' bindtap='gotoUse' style="width:auto;display:inline-block;padding:0 8rpx;">{{item.statusText}}</view> | |||
<view class='right-button' data-data='{{item}}' wx:if='{{item.orderStatus==11}}' data-status='{{item.status}}' bindtap='gotoUse' style="width:auto;display:inline-block;padding:0 8rpx;">{{item.statusText}}</view> | |||
<!-- 重新拼团 --> | |||
<view class='right-button' data-data='{{item}}' wx:if='{{item.status==13}}' data-status='{{item.status}}' bindtap='gotoAgain' style="width:auto;display:inline-block;padding:0 8rpx;">{{item.statusText}}</view> | |||
<view class='right-button' data-data='{{item}}' wx:if='{{item.orderStatus==13}}' data-status='{{item.status}}' bindtap='gotoAgain' style="width:auto;display:inline-block;padding:0 8rpx;">{{item.statusText}}</view> | |||
<!-- 拼团失败 --> | |||
<view class='right-button' wx:if='{{item.status==12}}' data-status='{{item.status}}' bindtap='gotoEdit' style="width:auto;display:inline-block;background:#B5B5B5;padding:0 8rpx;">{{item.statusText}}</view> | |||
<view class='right-button' wx:if='{{item.orderStatus==12}}' data-status='{{item.status}}' bindtap='gotoEdit' style="width:auto;display:inline-block;background:#B5B5B5;padding:0 8rpx;">{{item.statusText}}</view> | |||
<!-- 拼团未支付 --> | |||
<view class='right-button' wx:if='{{item.orderStatus==15}}' data-status='{{item.status}}' bindtap='gotoEdit' style="width:auto;display:inline-block;background:#B5B5B5;padding:0 8rpx;">{{item.statusText}}</view> | |||
</view> | |||
</view> | |||
</view> | |||
@@ -14,6 +14,10 @@ const spellStatus=[ | |||
{ | |||
name: '拼团失败', | |||
value: 13 | |||
}, | |||
{ | |||
name: '拼团待支付', | |||
value: 15 | |||
} | |||
] | |||
const spellStatus02 = [ | |||
@@ -32,6 +36,10 @@ const spellStatus02 = [ | |||
{ | |||
name: '重新拼团', | |||
value: 13 | |||
}, | |||
{ | |||
name: '去支付', | |||
value: 15 | |||
} | |||
] | |||
module.exports={ | |||