@@ -1,6 +1,7 @@ | |||||
{ | { | ||||
"pages": [ | "pages": [ | ||||
"pages/index/index", | "pages/index/index", | ||||
"pages/spellGroup/mySpellGroup/index", | |||||
"pages/spellGroup/spellGroup", | "pages/spellGroup/spellGroup", | ||||
"pages/complete/index", | "pages/complete/index", | ||||
"pages/main/index", | "pages/main/index", | ||||
@@ -231,7 +231,11 @@ var config = { | |||||
/** | /** | ||||
* 获取我的拼团列表 | * 获取我的拼团列表 | ||||
*/ | */ | ||||
getMySepllList:'/orderGroup/queryOrderGroup' | |||||
getMySepllList:'/orderGroup/queryOrderGroup', | |||||
/** | |||||
*查询差1个的团购信息 | |||||
*/ | |||||
queryRemainOne:'/orderGroup/queryRemainOne' | |||||
}, | }, | ||||
weapp: { | weapp: { | ||||
AppId: weappId | AppId: weappId | ||||
@@ -0,0 +1,113 @@ | |||||
// pages/spellGroup/mySpellGroup/index.js | |||||
var config = require("../../../config/config.js"); | |||||
const Http = require("../../../utils/HttpBasics"); | |||||
const imgurl = require("../../../utils/imgurl"); | |||||
Page({ | |||||
/** | |||||
* 页面的初始数据 | |||||
*/ | |||||
data: { | |||||
couponChannelId:'', | |||||
couponId:'', | |||||
detailData:[], | |||||
spellData:null | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面加载 | |||||
*/ | |||||
onLoad: function (options) { | |||||
this.setData({ | |||||
couponChannelId: options.couponChannelId, | |||||
couponId: options.couponId | |||||
}) | |||||
this.getDetail(options.couponChannelId); | |||||
this.getOneSpell(options.couponId) | |||||
}, | |||||
/** | |||||
* 获取一个拼团信息 | |||||
*/ | |||||
getOneSpell(couponId){ | |||||
let that = this; | |||||
Http.get({ | |||||
url: config.api.queryRemainOne, | |||||
data: { | |||||
couponId: couponId | |||||
} | |||||
}).then(res => { | |||||
if(res.data){ | |||||
that.setData({ | |||||
spellData: res.data | |||||
}); | |||||
} | |||||
}); | |||||
}, | |||||
/** | |||||
* 获取券详情信息 | |||||
*/ | |||||
getDetail(couponChannelId){ | |||||
let that = this; | |||||
Http.get({ | |||||
url: config.api.couponDetail, | |||||
data: { | |||||
couponChannelId: couponChannelId | |||||
} | |||||
}).then(res => { | |||||
let data = res.data; | |||||
data.price = (data.price / 100).toFixed(2) | |||||
data.salePrice = (data.salePrice / 100).toFixed(2) | |||||
that.setData({ | |||||
detailData: data | |||||
}); | |||||
}); | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面初次渲染完成 | |||||
*/ | |||||
onReady: function () { | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面显示 | |||||
*/ | |||||
onShow: function () { | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面隐藏 | |||||
*/ | |||||
onHide: function () { | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面卸载 | |||||
*/ | |||||
onUnload: function () { | |||||
}, | |||||
/** | |||||
* 页面相关事件处理函数--监听用户下拉动作 | |||||
*/ | |||||
onPullDownRefresh: function () { | |||||
}, | |||||
/** | |||||
* 页面上拉触底事件的处理函数 | |||||
*/ | |||||
onReachBottom: function () { | |||||
}, | |||||
/** | |||||
* 用户点击右上角分享 | |||||
*/ | |||||
onShareAppMessage: function () { | |||||
} | |||||
}) |
@@ -0,0 +1,5 @@ | |||||
{ | |||||
"navigationBarTitleText": "拼团券详情", | |||||
"enablePullDownRefresh": true, | |||||
"usingComponents": {} | |||||
} |
@@ -0,0 +1,49 @@ | |||||
<view class="content-box"> | |||||
<view class='content'> | |||||
<view class='top-img'> | |||||
<image src='{{detailData.coverImg}}'></image> | |||||
</view> | |||||
<view class='title'>{{detailData.title}}</view> | |||||
<view class='text'> | |||||
<view class='remark'>{{detailData.subTitle}}</view> | |||||
<view class='des'> | |||||
<view class='des-peoplenum'>【拼团购】{{detailData.pressLimitNum}}人拼团成功,单价仅需</view> | |||||
<view class='des-saleprice'>{{detailData.salePriceStr}}元</view> | |||||
</view> | |||||
<view class='status'> | |||||
<view class='status01 st'> | |||||
<image src='https://s3.cn-northwest-1.amazonaws.com.cn/iformall-net/cimg/spell-bg.png'></image> | |||||
</view> | |||||
<view class='status02 st'>金城武的团还差<view class='r-p-num'>4人</view></view> | |||||
<view class='status03 st'> | |||||
<view class='hh'>13</view>: | |||||
<view class='mm'>24</view>: | |||||
<view class='ss'>59</view> | |||||
</view> | |||||
<view class='status04 st'> | |||||
<view class='s-button'>去拼团</view> | |||||
</view> | |||||
</view> | |||||
<view class='p-des'> | |||||
<view class='p-title'>商品详情:</view> | |||||
<view class='p-list'>{{detailData.remark}}</view> | |||||
</view> | |||||
<view class='edit'> | |||||
<view class='edit-left'> | |||||
<view class='edit-left-top'> | |||||
<view class='price'>{{detailData.price}}</view> | |||||
<view class='price-unit'>元</view> | |||||
</view> | |||||
<view class='edit-left-bottom'>立即购买</view> | |||||
</view> | |||||
<view class='edit-right'> | |||||
<view class='edit-right-top'> | |||||
<view class='real-price'>{{detailData.salePrice}}</view> | |||||
<view class='real-price-unit'>元</view> | |||||
</view> | |||||
<view class='edit-right-bottom'>发起拼团</view> | |||||
</view> | |||||
</view> | |||||
</view> | |||||
</view> | |||||
</view> |
@@ -0,0 +1,238 @@ | |||||
/* pages/spellGroup/mySpellGroup/index.wxss */ | |||||
.top-img{ | |||||
width: 100%; | |||||
height: 533rpx; | |||||
z-index: 1; | |||||
} | |||||
.top-img image{ | |||||
width: 100%; | |||||
height: 533rpx; | |||||
} | |||||
.content-box{ | |||||
box-sizing: content-box; | |||||
height: auto; | |||||
overflow: hidden; | |||||
} | |||||
.content{ | |||||
position: relative; | |||||
width: 100%; | |||||
height: auto; | |||||
background: #fff; | |||||
overflow: hidden; | |||||
padding-bottom: 130rpx; | |||||
} | |||||
.text{ | |||||
padding: 0 30rpx; | |||||
} | |||||
.title{ | |||||
position: absolute; | |||||
top: 503rpx; | |||||
background-color: #fff; | |||||
z-index: 100; | |||||
width: 750rpx; | |||||
padding-top: 30rpx; | |||||
padding-left: 30rpx; | |||||
line-height: 50rpx; | |||||
border-radius:20rpx 20rpx 0px 0px; | |||||
opacity: 1; | |||||
font-size:32rpx; | |||||
font-family:PingFang-SC-Bold; | |||||
font-weight:bold; | |||||
color:rgba(51,51,51,1); | |||||
box-sizing: border-box; | |||||
} | |||||
.remark{ | |||||
margin-top: 48rpx; | |||||
font-size:24rpx; | |||||
font-family:PingFang-SC-Medium; | |||||
font-weight:500; | |||||
color:rgba(134,134,134,1); | |||||
margin-bottom: 12rpx; | |||||
} | |||||
.des{ | |||||
width: 100%; | |||||
height: auto; | |||||
padding-top: 6rpx; | |||||
border-top: 2rpx solid rgb(240, 238, 238); | |||||
} | |||||
.des-peoplenum{ | |||||
display: inline; | |||||
font-size:24rpx; | |||||
font-family:PingFang-SC-Medium; | |||||
font-weight:500; | |||||
color:rgba(0,0,0,1); | |||||
line-height:44rpx; | |||||
margin-right: 30rpx; | |||||
} | |||||
.des-saleprice{ | |||||
display: inline; | |||||
font-size:40rpx; | |||||
font-family:PingFang-SC-Medium; | |||||
font-weight:500; | |||||
color:rgba(255,53,53,1); | |||||
} | |||||
.status{ | |||||
width: 100%; | |||||
border-radius: 15rpx; | |||||
background:rgba(255,235,229,1); | |||||
margin: 30rpx 0; | |||||
overflow: hidden; | |||||
} | |||||
.status01{ | |||||
float: left; | |||||
width: 130rpx; | |||||
height: 130rpx; | |||||
} | |||||
.status01 image{ | |||||
width: 90rpx; | |||||
height: 90rpx; | |||||
border-radius: 45rpx; | |||||
margin: 20rpx 0 0 20rpx; | |||||
} | |||||
.status02{ | |||||
margin-top: 20rpx; | |||||
float: left; | |||||
width: 140rpx; | |||||
font-size:28rpx; | |||||
font-family:PingFang-SC-Medium; | |||||
font-weight:500; | |||||
color:rgba(51,51,51,1); | |||||
} | |||||
.r-p-num{ | |||||
display: inline; | |||||
color: #FF3535; | |||||
} | |||||
.status03{ | |||||
/* width: 160rpx; */ | |||||
float: left; | |||||
padding-left: 80rpx; | |||||
color: #F74812; | |||||
} | |||||
.hh,.mm,.ss{ | |||||
display: inline-block; | |||||
font-size:26rpx; | |||||
font-family:PingFang-SC-Medium; | |||||
font-weight:500; | |||||
color:rgba(255,255,255,1); | |||||
height: 38rpx; | |||||
width: 38rpx; | |||||
background: #F74812; | |||||
border-radius:10rpx; | |||||
margin: 46rpx 8rpx 0 0; | |||||
text-align: center; | |||||
line-height: 38rpx; | |||||
} | |||||
.status04{ | |||||
float: left; | |||||
width: 163rpx; | |||||
} | |||||
.s-button{ | |||||
background:#ED3D2E; | |||||
width: 120rpx; | |||||
height: 48rpx; | |||||
font-size:28rpx; | |||||
font-family:PingFang-SC-Medium; | |||||
font-weight:500; | |||||
color:rgba(255,255,255,1); | |||||
text-align: center; | |||||
line-height: 48rpx; | |||||
border-radius: 24rpx; | |||||
margin: 40rpx auto 0; | |||||
} | |||||
.p-title{ | |||||
font-size:32rpx; | |||||
font-family:PingFang-SC-Bold; | |||||
font-weight:bold; | |||||
color:rgba(51,51,51,1); | |||||
margin: 10rpx 0 20rpx 0; | |||||
} | |||||
.p-list{ | |||||
font-size:24rpx; | |||||
font-family:PingFang-SC-Medium; | |||||
font-weight:500; | |||||
color:rgba(51,51,51,1); | |||||
line-height:50rpx; | |||||
} | |||||
.edit{ | |||||
position: fixed; | |||||
width: 690rpx; | |||||
bottom: 20rpx; | |||||
left: 30rpx; | |||||
} | |||||
.edit-left{ | |||||
float: left; | |||||
width: 330rpx; | |||||
height: 95rpx; | |||||
background:rgba(255,169,2,1); | |||||
box-shadow:0px 8rpx 8rpx 1rpx rgba(255,169,2,0.32); | |||||
border-radius:48rpx; | |||||
} | |||||
.edit-right{ | |||||
float: right; | |||||
width: 330rpx; | |||||
height: 95rpx; | |||||
background:linear-gradient(90deg,rgba(236,59,45,1) 0%,rgba(248,98,52,1) 100%); | |||||
box-shadow:0px 8rpx 8rpx 1rpx rgba(246,93,51,0.32); | |||||
border-radius:48rpx; | |||||
} | |||||
.edit-left-top{ | |||||
height: 46rpx; | |||||
text-align: center; | |||||
} | |||||
.price{ | |||||
display: inline; | |||||
font-size:32rpx; | |||||
line-height: 32rpx; | |||||
font-family:PingFang-SC-Medium; | |||||
font-weight:500; | |||||
color:rgba(254,254,254,1); | |||||
margin-top: 6rpx; | |||||
} | |||||
.price-unit{ | |||||
display: inline; | |||||
font-size:27rpx; | |||||
line-height: 27rpx; | |||||
margin-top: 11rpx; | |||||
font-family:PingFang-SC-Medium; | |||||
font-weight:500; | |||||
color:rgba(254,254,254,1); | |||||
} | |||||
.edit-left-bottom{ | |||||
text-align: center; | |||||
font-size:30rpx; | |||||
line-height: 40rpx; | |||||
font-family:PingFang-SC-Medium; | |||||
font-weight:500; | |||||
color:rgba(254,254,254,1); | |||||
} | |||||
.edit-right-top{ | |||||
height: 46rpx; | |||||
text-align: center; | |||||
} | |||||
.real-price{ | |||||
display: inline; | |||||
font-size:32rpx; | |||||
line-height: 32rpx; | |||||
font-family:PingFang-SC-Medium; | |||||
font-weight:500; | |||||
color:rgba(254,254,254,1); | |||||
margin-top: 6rpx; | |||||
} | |||||
.real-price-unit{ | |||||
display: inline; | |||||
font-size:27rpx; | |||||
line-height: 27rpx; | |||||
margin-top: 11rpx; | |||||
font-family:PingFang-SC-Medium; | |||||
font-weight:500; | |||||
color:rgba(254,254,254,1); | |||||
} | |||||
.edit-right-bottom{ | |||||
text-align: center; | |||||
font-size:30rpx; | |||||
line-height: 40rpx; | |||||
font-family:PingFang-SC-Medium; | |||||
font-weight:500; | |||||
color:rgba(254,254,254,1); | |||||
} |
@@ -260,7 +260,7 @@ Page({ | |||||
let couponId = e.currentTarget.dataset.couponid; | let couponId = e.currentTarget.dataset.couponid; | ||||
if (couponChannelId && couponId) { | if (couponChannelId && couponId) { | ||||
wx.navigateTo({ | wx.navigateTo({ | ||||
url: `/pages/coupon/detail/index?couponChannelId=${couponChannelId}&couponId=${couponId}` | |||||
url: `/pages/spellGroup/mySpellGroup/index?couponChannelId=${couponChannelId}&couponId=${couponId}` | |||||
}) | }) | ||||
} | } | ||||
}, | }, | ||||
@@ -5,7 +5,7 @@ | |||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class='content'> | <view class='content'> | ||||
<view class='sepll-list' wx:for="{{lists}}" wx:key="{{index}}"> | |||||
<view class='sepll-list' wx:for="{{lists}}" wx:key="{{index}}" data-couponId='{{item.couponId}}' data-id='{{item.id}}' bindtap='invite'> | |||||
<view class='spell-left'> | <view class='spell-left'> | ||||
<image src='{{item.coverImg}}'></image> | <image src='{{item.coverImg}}'></image> | ||||
</view> | </view> | ||||