From e36cc142cf6624f43093ad6b5774184427f87f8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=99=96?= Date: Wed, 6 Mar 2019 14:53:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=8B=BC=E5=9B=A2=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.json | 4 +- pages/spellDetail/index.js | 7 +- pages/spellDetail/index.json | 3 +- pages/spellDetail/index.wxml | 61 ++++++++- pages/spellDetail/index.wxss | 183 ++++++++++++++++++++++++- pages/spellGroup/mySpellGroup/index.js | 15 +- utils/imgurl.js | 12 ++ 7 files changed, 272 insertions(+), 13 deletions(-) diff --git a/app.json b/app.json index dbe3321..4c71304 100644 --- a/app.json +++ b/app.json @@ -1,5 +1,6 @@ { "pages": [ + "pages/spellDetail/index", "pages/index/index", "pages/spellGroup/mySpellGroup/index", "pages/spellGroup/spellGroup", @@ -49,8 +50,7 @@ "pages/paySuccess/paySuccess", "pages/ConsumeDetail/ConsumeDetail", "pages/externallinks/index", - "pages/czdetail/czdetail", - "pages/spellDetail/index" + "pages/czdetail/czdetail" ], "navigateToMiniProgramAppIdList": [ "wx192b7d2e8dcbefd0", diff --git a/pages/spellDetail/index.js b/pages/spellDetail/index.js index 6bdd84b..7d9a25d 100644 --- a/pages/spellDetail/index.js +++ b/pages/spellDetail/index.js @@ -1,11 +1,16 @@ // pages/spellDetail/index.js +var config = require("../../config/config.js"); +const Http = require("../../utils/HttpBasics"); +const imgurl = require("../../utils/imgurl"); Page({ /** * 页面的初始数据 */ data: { - + tuanzhang: imgurl.tuanzhang.url, + spellBg: imgurl.spellBg.url, + position: imgurl.position.url, }, /** diff --git a/pages/spellDetail/index.json b/pages/spellDetail/index.json index 4c7c9fc..3aa8b3c 100644 --- a/pages/spellDetail/index.json +++ b/pages/spellDetail/index.json @@ -1,4 +1,5 @@ { "navigationBarTitleText": "拼团详情", - "usingComponents": {} + "usingComponents": {}, + "navigationBarBackgroundColor": "#F13C42" } \ No newline at end of file diff --git a/pages/spellDetail/index.wxml b/pages/spellDetail/index.wxml index 49546b3..1e151d0 100644 --- a/pages/spellDetail/index.wxml +++ b/pages/spellDetail/index.wxml @@ -1,2 +1,61 @@ -pages/spellDetail/index.wxml + + + + 拼团中 + 结束 + 09 + : + 59 + : + 23 + 剩余 + + + + + + + + + + + + + + + + + + + ? + + + + + + + + + 广场地址:北京市朝阳区东三环中路123号 + + + + + + + + + 100元拼团券 + 是打发士大夫撒旦 + + + 拼团价 + 19.00元 + + + + + + + diff --git a/pages/spellDetail/index.wxss b/pages/spellDetail/index.wxss index 062be82..a83fc9f 100644 --- a/pages/spellDetail/index.wxss +++ b/pages/spellDetail/index.wxss @@ -1 +1,182 @@ -/* pages/spellDetail/index.wxss */ \ No newline at end of file +/* 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; +} +.status{ + width: 690rpx; + padding:0 28rpx; + margin: 0 auto; + box-sizing: border-box; + background:rgba(255,255,255,1); + border-radius:15rpx; +} +.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{ + display: inline-block; + width: 80rpx; + height: 80rpx; + position: relative; +} +.touxiangitems{ + margin: 20rpx; +} +.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); +} +.touxiang image{ + width: 80rpx; + height: 80rpx; +} +.tuan-icon{ + position: absolute; + bottom: 20rpx; + left: 8rpx; + width: 64rpx; + height: 27rpx; +} +.tuan-icon image{ + width: 64rpx; + height: 27rpx; +} +.status-bottom{ + width: 100%; + height: 72rpx; + 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{ + width: 690rpx; + padding:0 28rpx; + margin: 30rpx auto 0; + box-sizing: border-box; + background:rgba(255,255,255,1); + border-radius:15rpx; +} +.detail-top{ + width: 100%; + height: auto; + overflow: hidden; +} +.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; +} +.des{ + font-size:26rpx; + font-family:PingFang-SC-Medium; + font-weight:500; + color:rgba(134,134,134,1); + line-height:40rpx; +} +.detail-top03{ + float: left; +} \ No newline at end of file diff --git a/pages/spellGroup/mySpellGroup/index.js b/pages/spellGroup/mySpellGroup/index.js index 763a944..8a395ed 100644 --- a/pages/spellGroup/mySpellGroup/index.js +++ b/pages/spellGroup/mySpellGroup/index.js @@ -139,15 +139,14 @@ Page({ } }) .then(res => { - + wx.navigateTo({ + url: `/pages/spellDetail/index?orderId=${orderId}&couponId=${_this.data.data.couponId}` + }); }) .catch(err => { console.log(err); }) // return; - // wx.navigateTo({ - // url: `/pages/spellDetail/index?orderId=${orderId}&couponId=${_this.data.data.couponId}` - // }); }, /** * 支付订单更新 @@ -170,9 +169,11 @@ Page({ }) .catch(err => { console.log(err); - setTimeout(function () { - _this.payOrderUpdate(orderId, payOrderId, status, reason, _this, orderGroupId); - }, 2000) + if (err.code!=12002){ + setTimeout(function () { + _this.payOrderUpdate(orderId, payOrderId, status, reason, _this, orderGroupId); + }, 2000) + } }) }, /** diff --git a/utils/imgurl.js b/utils/imgurl.js index 6b9e45d..46eda9a 100644 --- a/utils/imgurl.js +++ b/utils/imgurl.js @@ -364,4 +364,16 @@ module.exports = { 'url': baseUrl + 'spell-bg.png', 'name': '拼团背景图片' }, + 'spellDetailBg': { + 'url': baseUrl + 'spelldetail-bg.png', + 'name': '拼团背景图片' + }, + 'tuanzhang': { + 'url': baseUrl + 'tuanzhang.png', + 'name': '团长' + }, + 'position': { + 'url': baseUrl + 'position.png', + 'name': '地理位置图标' + }, } \ No newline at end of file