diff --git a/app.json b/app.json index 61e3f63..73531c4 100644 --- a/app.json +++ b/app.json @@ -1,6 +1,7 @@ { "pages": [ "pages/index/index", + "pages/spellGroup/mySpellGroup/index", "pages/spellGroup/spellGroup", "pages/complete/index", "pages/main/index", diff --git a/config/config.js b/config/config.js index f7958f2..5216fd9 100755 --- a/config/config.js +++ b/config/config.js @@ -231,7 +231,11 @@ var config = { /** * 获取我的拼团列表 */ - getMySepllList:'/orderGroup/queryOrderGroup' + getMySepllList:'/orderGroup/queryOrderGroup', + /** + *查询差1个的团购信息 + */ + queryRemainOne:'/orderGroup/queryRemainOne' }, weapp: { AppId: weappId diff --git a/pages/spellGroup/mySpellGroup/index.js b/pages/spellGroup/mySpellGroup/index.js new file mode 100644 index 0000000..0d3a003 --- /dev/null +++ b/pages/spellGroup/mySpellGroup/index.js @@ -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 () { + + } +}) \ No newline at end of file diff --git a/pages/spellGroup/mySpellGroup/index.json b/pages/spellGroup/mySpellGroup/index.json new file mode 100644 index 0000000..ef25014 --- /dev/null +++ b/pages/spellGroup/mySpellGroup/index.json @@ -0,0 +1,5 @@ +{ + "navigationBarTitleText": "拼团券详情", + "enablePullDownRefresh": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/spellGroup/mySpellGroup/index.wxml b/pages/spellGroup/mySpellGroup/index.wxml new file mode 100644 index 0000000..5c6dbe9 --- /dev/null +++ b/pages/spellGroup/mySpellGroup/index.wxml @@ -0,0 +1,49 @@ + + + + + + {{detailData.title}} + + {{detailData.subTitle}} + + 【拼团购】{{detailData.pressLimitNum}}人拼团成功,单价仅需 + {{detailData.salePriceStr}}元 + + + + + + 金城武的团还差4人 + + 13: + 24: + 59 + + + 去拼团 + + + + 商品详情: + {{detailData.remark}} + + + + + {{detailData.price}} + + + 立即购买 + + + + {{detailData.salePrice}} + + + 发起拼团 + + + + + \ No newline at end of file diff --git a/pages/spellGroup/mySpellGroup/index.wxss b/pages/spellGroup/mySpellGroup/index.wxss new file mode 100644 index 0000000..f40f22c --- /dev/null +++ b/pages/spellGroup/mySpellGroup/index.wxss @@ -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); +} \ No newline at end of file diff --git a/pages/spellGroup/spellGroup.js b/pages/spellGroup/spellGroup.js index cbb3403..79be6de 100644 --- a/pages/spellGroup/spellGroup.js +++ b/pages/spellGroup/spellGroup.js @@ -260,7 +260,7 @@ Page({ let couponId = e.currentTarget.dataset.couponid; if (couponChannelId && couponId) { wx.navigateTo({ - url: `/pages/coupon/detail/index?couponChannelId=${couponChannelId}&couponId=${couponId}` + url: `/pages/spellGroup/mySpellGroup/index?couponChannelId=${couponChannelId}&couponId=${couponId}` }) } }, diff --git a/pages/spellGroup/spellGroup.wxml b/pages/spellGroup/spellGroup.wxml index 36af936..45fb23b 100644 --- a/pages/spellGroup/spellGroup.wxml +++ b/pages/spellGroup/spellGroup.wxml @@ -5,7 +5,7 @@ - +