@@ -1,15 +1,16 @@ | |||
{ | |||
"pages":[ | |||
"pages/index/index", | |||
"pages/getuserinfo/index", | |||
"pages/getphoneInfo/index", | |||
"pages/index/index", // 首页 | |||
"pages/getuserinfo/index", // 用户授权 | |||
"pages/getphoneInfo/index", // 手机授权 | |||
"pages/market/index", | |||
"pages/user/index", | |||
"pages/coupons/details/index", | |||
"pages/coupon/detail/index", // 券详情 | |||
"pages/shop/details/index", | |||
"pages/rushToBuy/index", | |||
"pages/shop/index/index", | |||
"pages/coupons/index/index", | |||
"pages/couponorder/index/index", // 券包列表 | |||
"pages/couponorder/detail/index", // 券包详情 | |||
"pages/order/details/index", | |||
"pages/order/index/index", | |||
"pages/success/index", | |||
@@ -20,7 +20,7 @@ Component({ | |||
navigateTo(e){ | |||
let { id } = e.currentTarget.dataset.date; | |||
wx.navigateTo({ | |||
url: `../../pages/coupons/details/index?id=${id}`, | |||
url: `../../pages/coupon/detail/index?id=${id}`, | |||
}) | |||
} | |||
} | |||
@@ -1,4 +1,4 @@ | |||
<navigator url="/pages/coupons/details/index?id={{data.id}}"> | |||
<navigator url="/pages/coupon/detail/index?id={{data.id}}"> | |||
<view class="coupons"> | |||
<view class="coupons-img"> | |||
<image src="{{data.coverImg}}"></image> | |||
@@ -71,6 +71,10 @@ var config = { | |||
* 验证码确认 | |||
*/ | |||
validationCode: '/wxMsgValidationcode/hasvalidationcode', | |||
/** | |||
* 车场信息获取 | |||
*/ | |||
getParkInfo: '/wxPark/info', | |||
/** | |||
* 联合登录 | |||
*/ | |||
@@ -1,180 +1,180 @@ | |||
var config = require('../../../config/config.js'); | |||
var app = getApp() | |||
const Http = require("../../../utils/HttpBasics") | |||
Page({ | |||
data: { | |||
data: {}, | |||
couponId: null, | |||
orderId: '' | |||
}, | |||
onLoad(e) { | |||
console.log(e) | |||
wx.showLoading({ | |||
title: '加载中...', | |||
}) | |||
if (e.flag == 'pay') { | |||
this.orderFunc(); | |||
} else { | |||
Http.get({ | |||
url: config.api.couponDetail, | |||
data: { | |||
id: e.id | |||
} | |||
}).then(res => { | |||
wx.hideLoading(); | |||
this.setData({ | |||
data: res, | |||
couponId: e.id | |||
}) | |||
}) | |||
} | |||
}, | |||
/** | |||
* 支付订单更新 | |||
*/ | |||
payOrderUpdate: (orderId, payOrderId, status, reason) => { | |||
// 支付成功 | |||
Http.post({ | |||
url: config.api.payOrderUpdate, | |||
data: { | |||
payOrderId: payOrderId, | |||
orderId: orderId, | |||
status: status, | |||
reason: reason | |||
} | |||
}) | |||
.then(res => { | |||
console.log("payOrderUpdate then", res); | |||
wx.showToast({ | |||
title: '购买成功', | |||
duration: 2500 | |||
}) | |||
}).catch(err => { | |||
console.log("payOrderUpdate catch", err); | |||
}) | |||
}, | |||
payment: (res) => { | |||
var that = this; | |||
var payOrderId = '' + res.data.out_trade_no; | |||
wx.requestPayment({ | |||
timeStamp: res.timeStamp, | |||
nonceStr: res.nonceStr, | |||
package: res.package, | |||
signType: 'MD5', | |||
paySign: res.paySign, | |||
'success': (res) => { | |||
that.payOrderUpdate(that.data.orderId, payOrderId, 1) // 支付成功 | |||
console.log(res); | |||
console.log('支付成功'); | |||
wx.showToast({ | |||
title: '购买成功', | |||
duration: 2500 | |||
}) | |||
wx.navigateBack({ | |||
delta: 2 | |||
}) | |||
}, | |||
'fail': (res) => { | |||
that.payOrderUpdate(that.data.orderId, payOrderId, 2) // 支付失败 | |||
console.log(res) | |||
console.log('支付失败'); | |||
return; | |||
}, | |||
'complete': (res) => { | |||
console.log(res); | |||
console.log('支付完成'); | |||
var url = this.data.url; | |||
console.log('get url', url) | |||
if (res.errMsg == 'requestPayment:ok') { | |||
wx.showModal({ | |||
title: '提示', | |||
content: '支付成功' | |||
}); | |||
if (url) { | |||
setTimeout(function() { | |||
wx.redirectTo({ | |||
url: '/pages' + url | |||
}); | |||
}, 2000) | |||
} else { | |||
setTimeout(() => { | |||
wx.navigateBack() | |||
}, 2000) | |||
} | |||
} else { | |||
wx.showModal({ | |||
title: '错误提示', | |||
content: res.errMsg | |||
}); | |||
} | |||
return; | |||
} | |||
}) | |||
}, | |||
orderFunc() { | |||
var that = this; | |||
wx.showLoading({ | |||
title: '加载中...', | |||
}) | |||
Http.post({ | |||
url: config.api.checkPhoneStatus, | |||
data: {} | |||
}) | |||
.then(res => { | |||
return Http.post({ | |||
url: config.api.orderSave, | |||
data: { | |||
couponId: that.data.couponId | |||
} | |||
}) | |||
}).catch(err => { | |||
console.log(err) | |||
if (err.code == 11005) { | |||
// 用户手机未授权 | |||
wx.redirectTo({ | |||
url: '../../getphoneInfo/index?couponId=' + that.data.couponId, | |||
}) | |||
} | |||
if (err.code == 11006) { | |||
// 用户手机已加密 | |||
wx.redirectTo({ | |||
url: '../../phoneinput/phoneinput?couponId=' + that.data.couponId, | |||
}) | |||
} | |||
}) | |||
.then(res => { | |||
if (res != "undefined") { | |||
const orderId = '' + res.data.id; | |||
that.setData({ | |||
orderId: orderId | |||
}) | |||
if (res.data.payment > 0) { | |||
// 支付金额不为0 | |||
Http.post({ | |||
url: config.api.payOrderCreate, | |||
data: { | |||
orderId: orderId | |||
} | |||
}).then(res => { | |||
console.log(res) | |||
var payOrderId = '' + res.data.out_trade_no; | |||
wx.hideLoading(); | |||
//payment(res); | |||
that.payOrderUpdate(that.data.orderId, payOrderId, 1) // 支付成功 | |||
}) | |||
} else { | |||
// 免费券 | |||
that.payOrderUpdate(orderId, "0", 1) // 支付成功 | |||
.then(res => { | |||
wx.showToast({ | |||
title: "支付成功", | |||
duration: 3000 | |||
}) | |||
}) | |||
} | |||
} | |||
}).catch(err => { | |||
console.log(err) | |||
}) | |||
}, | |||
var config = require('../../../config/config.js'); | |||
var app = getApp() | |||
const Http = require("../../../utils/HttpBasics") | |||
Page({ | |||
data: { | |||
data: {}, | |||
couponId: null, | |||
orderId: '' | |||
}, | |||
onLoad(e) { | |||
console.log(e) | |||
wx.showLoading({ | |||
title: '加载中...', | |||
}) | |||
if (e.flag == 'pay') { | |||
this.orderFunc(); | |||
} else { | |||
Http.get({ | |||
url: config.api.couponDetail, | |||
data: { | |||
id: e.id | |||
} | |||
}).then(res => { | |||
wx.hideLoading(); | |||
this.setData({ | |||
data: res, | |||
couponId: e.id | |||
}) | |||
}) | |||
} | |||
}, | |||
/** | |||
* 支付订单更新 | |||
*/ | |||
payOrderUpdate: (orderId, payOrderId, status, reason) => { | |||
// 支付成功 | |||
Http.post({ | |||
url: config.api.payOrderUpdate, | |||
data: { | |||
payOrderId: payOrderId, | |||
orderId: orderId, | |||
status: status, | |||
reason: reason | |||
} | |||
}) | |||
.then(res => { | |||
console.log("payOrderUpdate then", res); | |||
wx.showToast({ | |||
title: '购买成功', | |||
duration: 2500 | |||
}) | |||
}).catch(err => { | |||
console.log("payOrderUpdate catch", err); | |||
}) | |||
}, | |||
payment: (res) => { | |||
var that = this; | |||
var payOrderId = '' + res.data.out_trade_no; | |||
wx.requestPayment({ | |||
timeStamp: res.timeStamp, | |||
nonceStr: res.nonceStr, | |||
package: res.package, | |||
signType: 'MD5', | |||
paySign: res.paySign, | |||
'success': (res) => { | |||
that.payOrderUpdate(that.data.orderId, payOrderId, 1) // 支付成功 | |||
console.log(res); | |||
console.log('支付成功'); | |||
wx.showToast({ | |||
title: '购买成功', | |||
duration: 2500 | |||
}) | |||
wx.navigateBack({ | |||
delta: 2 | |||
}) | |||
}, | |||
'fail': (res) => { | |||
that.payOrderUpdate(that.data.orderId, payOrderId, 2) // 支付失败 | |||
console.log(res) | |||
console.log('支付失败'); | |||
return; | |||
}, | |||
'complete': (res) => { | |||
console.log(res); | |||
console.log('支付完成'); | |||
var url = this.data.url; | |||
console.log('get url', url) | |||
if (res.errMsg == 'requestPayment:ok') { | |||
wx.showModal({ | |||
title: '提示', | |||
content: '支付成功' | |||
}); | |||
if (url) { | |||
setTimeout(function() { | |||
wx.redirectTo({ | |||
url: '/pages' + url | |||
}); | |||
}, 2000) | |||
} else { | |||
setTimeout(() => { | |||
wx.navigateBack() | |||
}, 2000) | |||
} | |||
} else { | |||
wx.showModal({ | |||
title: '错误提示', | |||
content: res.errMsg | |||
}); | |||
} | |||
return; | |||
} | |||
}) | |||
}, | |||
orderFunc() { | |||
var that = this; | |||
wx.showLoading({ | |||
title: '加载中...', | |||
}) | |||
Http.post({ | |||
url: config.api.checkPhoneStatus, | |||
data: {} | |||
}) | |||
.then(res => { | |||
return Http.post({ | |||
url: config.api.orderSave, | |||
data: { | |||
couponId: that.data.couponId | |||
} | |||
}) | |||
}).catch(err => { | |||
console.log(err) | |||
if (err.code == 11005) { | |||
// 用户手机未授权 | |||
wx.redirectTo({ | |||
url: '../../getphoneInfo/index?couponId=' + that.data.couponId, | |||
}) | |||
} | |||
if (err.code == 11006) { | |||
// 用户手机已加密 | |||
wx.redirectTo({ | |||
url: '../../phoneinput/phoneinput?couponId=' + that.data.couponId, | |||
}) | |||
} | |||
}) | |||
.then(res => { | |||
if (res != "undefined") { | |||
const orderId = '' + res.data.id; | |||
that.setData({ | |||
orderId: orderId | |||
}) | |||
if (res.data.payment > 0) { | |||
// 支付金额不为0 | |||
Http.post({ | |||
url: config.api.payOrderCreate, | |||
data: { | |||
orderId: orderId | |||
} | |||
}).then(res => { | |||
console.log(res) | |||
var payOrderId = '' + res.data.out_trade_no; | |||
wx.hideLoading(); | |||
//payment(res); | |||
that.payOrderUpdate(that.data.orderId, payOrderId, 1) // 支付成功 | |||
}) | |||
} else { | |||
// 免费券 | |||
that.payOrderUpdate(orderId, "0", 1) // 支付成功 | |||
.then(res => { | |||
wx.showToast({ | |||
title: "支付成功", | |||
duration: 3000 | |||
}) | |||
}) | |||
} | |||
} | |||
}).catch(err => { | |||
console.log(err) | |||
}) | |||
}, | |||
}) |
@@ -1,50 +1,50 @@ | |||
<view class='coupons'> | |||
<view class="coupons-body"> | |||
<view class='banner'> | |||
<image src='{{data.coverImg}}'></image> | |||
</view> | |||
<view class='coupons_info'> | |||
<view> | |||
<text>{{data.title}}<text>限购{{data.useLimitQuantity}}件</text></text> | |||
<text>剩余时间:<text>2天12小时25分钟</text></text> | |||
<text>剩余件数:<text>{{data.remainInventory}}件</text></text> | |||
</view> | |||
<view> | |||
<text>¥{{data.salePriceStr}}</text> | |||
<text>¥{{data.priceStr}}</text> | |||
</view> | |||
</view> | |||
<view class='posi'> | |||
<view class='posi_logo'> | |||
<view> | |||
<image src='http://img02.tooopen.com/images/20150928/tooopen_sy_143912755726.jpg'></image> | |||
</view> | |||
<view> | |||
<text>iFORMALL(西单大悦城店)</text> | |||
<text>北京市西城区西单北大街131号</text> | |||
</view> | |||
</view> | |||
<view> | |||
<text>更多适用门店</text> | |||
<text class='iconfont icon-right'></text> | |||
</view> | |||
</view> | |||
<view class='notes'> | |||
<view> | |||
<text>购买须知</text> | |||
</view> | |||
<view> | |||
<text><text class='spot'></text>有效期2018.01.16 至 2018.09.20</text> | |||
<text><text class='spot'></text>除特价酒水及特价菜外全场通用</text> | |||
<text><text class='spot'></text>无需预约,消费g高峰时可能需要等位</text> | |||
<text><text class='spot'></text>没人最多购买2张</text> | |||
<text><text class='spot'></text>不可使用包间</text> | |||
<text><text class='spot'></text>堂食外带均可,可免费打包</text> | |||
<text><text class='spot'></text>每桌限用2张</text> | |||
</view> | |||
</view> | |||
</view> | |||
<view class="buy-view app-border-top"> | |||
<button bindtap='orderFunc' class='buy'>立即购买</button> | |||
</view> | |||
<view class='coupons'> | |||
<view class="coupons-body"> | |||
<view class='banner'> | |||
<image src='{{data.coverImg}}'></image> | |||
</view> | |||
<view class='coupons_info'> | |||
<view> | |||
<text>{{data.title}}<text>限购{{data.useLimitQuantity}}件</text></text> | |||
<text>剩余时间:<text>2天12小时25分钟</text></text> | |||
<text>剩余件数:<text>{{data.remainInventory}}件</text></text> | |||
</view> | |||
<view> | |||
<text>¥{{data.salePriceStr}}</text> | |||
<text>¥{{data.priceStr}}</text> | |||
</view> | |||
</view> | |||
<view class='posi'> | |||
<view class='posi_logo'> | |||
<view> | |||
<image src='http://img02.tooopen.com/images/20150928/tooopen_sy_143912755726.jpg'></image> | |||
</view> | |||
<view> | |||
<text>iFORMALL(西单大悦城店)</text> | |||
<text>北京市西城区西单北大街131号</text> | |||
</view> | |||
</view> | |||
<view> | |||
<text>更多适用门店</text> | |||
<text class='iconfont icon-right'></text> | |||
</view> | |||
</view> | |||
<view class='notes'> | |||
<view> | |||
<text>购买须知</text> | |||
</view> | |||
<view> | |||
<text><text class='spot'></text>有效期2018.01.16 至 2018.09.20</text> | |||
<text><text class='spot'></text>除特价酒水及特价菜外全场通用</text> | |||
<text><text class='spot'></text>无需预约,消费g高峰时可能需要等位</text> | |||
<text><text class='spot'></text>没人最多购买2张</text> | |||
<text><text class='spot'></text>不可使用包间</text> | |||
<text><text class='spot'></text>堂食外带均可,可免费打包</text> | |||
<text><text class='spot'></text>每桌限用2张</text> | |||
</view> | |||
</view> | |||
</view> | |||
<view class="buy-view app-border-top"> | |||
<button bindtap='orderFunc' class='buy'>立即购买</button> | |||
</view> | |||
</view> |
@@ -1,210 +1,210 @@ | |||
@import '../../../app.wxss'; | |||
.coupons { | |||
width: 100%; | |||
height: 100vh; | |||
background: #f6f6f6; | |||
position: relative; | |||
display: flex; | |||
flex-direction: column; | |||
} | |||
.coupons-body{ | |||
flex: 1; | |||
overflow: auto; | |||
} | |||
.banner { | |||
width: 100%; | |||
height: 465rpx; | |||
} | |||
.banner image { | |||
width: 100%; | |||
height: 100%; | |||
} | |||
.coupons_info { | |||
width: 92%; | |||
height: 186rpx; | |||
display: flex; | |||
justify-content: space-between; | |||
padding: 0 4%; | |||
background: #fff; | |||
} | |||
.coupons_info view { | |||
display: flex; | |||
flex-direction: column; | |||
} | |||
.coupons_info view:nth-child(1) text { | |||
font-size: 30rpx; | |||
margin-top: 3%; | |||
} | |||
.coupons_info view:nth-child(1) text:nth-child(1) text { | |||
color: #ff3434; | |||
font-size: 24rpx; | |||
border: 1px solid #ff3434; | |||
border-radius: 6rpx; | |||
margin-left: 2%; | |||
padding: 0 5rpx; | |||
} | |||
.coupons_info view:nth-child(1) text:nth-child(2), | |||
.coupons_info view:nth-child(1) text:nth-child(3) { | |||
color: #b8b8b8; | |||
font-size: 24rpx; | |||
margin-top: 4%; | |||
} | |||
.coupons_info view:nth-child(1) text:nth-child(2) text, | |||
.coupons_info view:nth-child(1) text:nth-child(3) text { | |||
color: #ff3434; | |||
font-size: 24rpx; | |||
} | |||
.coupons_info view:nth-child(2) text:nth-child(1) { | |||
font-size: 36rpx; | |||
color: #ff3434; | |||
margin-top: 40rpx; | |||
font-weight: bold; | |||
} | |||
.coupons_info view:nth-child(2) text:nth-child(2) { | |||
font-size: 24rpx; | |||
color: #b4b4b4; | |||
text-decoration: line-through; | |||
padding-left: 10rpx; | |||
padding-top: 4rpx; | |||
} | |||
.posi { | |||
width: 92%; | |||
display: flex; | |||
flex-direction: column; | |||
padding: 0 4%; | |||
background: #fff; | |||
margin-top: 2%; | |||
} | |||
.posi>view:nth-child(2) { | |||
width: 100%; | |||
height: 87rpx; | |||
display: flex; | |||
justify-content: space-between; | |||
border-top: 1px solid #f6f6f6; | |||
line-height: 87rpx; | |||
} | |||
.posi>view:nth-child(2) text:nth-child(1) { | |||
font-size: 30rpx; | |||
color: #a9a9a9; | |||
} | |||
.posi>view:nth-child(2) text:nth-child(2) { | |||
font-size: 30rpx; | |||
color: #a9a9a9; | |||
} | |||
.posi_logo { | |||
width: 100%; | |||
height: 156rpx; | |||
display: flex; | |||
margin-top: 30rpx; | |||
} | |||
.posi_logo view:nth-child(1) { | |||
width: 126rpx; | |||
height: 126rpx; | |||
border-radius: 50%; | |||
overflow: hidden; | |||
flex: 2; | |||
} | |||
.posi_logo view:nth-child(1) image { | |||
width: 100%; | |||
height: 100%; | |||
} | |||
.posi_logo view:nth-child(2) { | |||
display: flex; | |||
flex-direction: column; | |||
flex: 8; | |||
padding-top: 20rpx; | |||
padding-left: 30rpx; | |||
} | |||
.posi_logo view:nth-child(2) text:nth-child(1) { | |||
font-size: 30rpx; | |||
} | |||
.posi_logo view:nth-child(2) text:nth-child(2) { | |||
font-size: 24rpx; | |||
color: #b8b8b8; | |||
padding-top: 10rpx; | |||
} | |||
.notes { | |||
margin-top: 2%; | |||
} | |||
.notes view:nth-child(1) { | |||
width: 92%; | |||
height: 87rpx; | |||
padding: 0 4%; | |||
line-height: 87rpx; | |||
background: #fff; | |||
border-bottom: 1rpx solid #f5f5f5; | |||
border-top: 1rpx solid #f5f5f5; | |||
} | |||
.notes view:nth-child(1) text { | |||
font-size: 30rpx; | |||
font-weight: bold; | |||
} | |||
.notes view:nth-child(2) { | |||
width: 92%; | |||
height: 400rpx; | |||
padding: 0 4%; | |||
background: #fff; | |||
border-bottom: 1rpx solid #f5f5f5; | |||
display: flex; | |||
flex-direction: column; | |||
padding-top: 2%; | |||
} | |||
.notes view:nth-child(2)>text { | |||
font-size: 28rpx; | |||
color: #A9A9A9; | |||
line-height: 56rpx; | |||
} | |||
.spot { | |||
width: 12rpx; | |||
height: 12rpx; | |||
display: inline-block; | |||
background: #A9A9A9; | |||
margin-right: 16rpx; | |||
position: relative; | |||
bottom: 4rpx; | |||
border-radius: 50%; | |||
} | |||
.buy-view { | |||
width: 100%; | |||
padding: 10rpx; | |||
/* position: fixed; */ | |||
/* bottom: 0; */ | |||
background: #fff; | |||
box-sizing: border-box; | |||
} | |||
.buy { | |||
/* width: 100%; */ | |||
height: 88rpx; | |||
background: #00C0FF; | |||
color: #fff; | |||
font-size: 36rpx; | |||
line-height: 88rpx; | |||
border-radius: 0; | |||
@import '../../../app.wxss'; | |||
.coupons { | |||
width: 100%; | |||
height: 100vh; | |||
background: #f6f6f6; | |||
position: relative; | |||
display: flex; | |||
flex-direction: column; | |||
} | |||
.coupons-body{ | |||
flex: 1; | |||
overflow: auto; | |||
} | |||
.banner { | |||
width: 100%; | |||
height: 465rpx; | |||
} | |||
.banner image { | |||
width: 100%; | |||
height: 100%; | |||
} | |||
.coupons_info { | |||
width: 92%; | |||
height: 186rpx; | |||
display: flex; | |||
justify-content: space-between; | |||
padding: 0 4%; | |||
background: #fff; | |||
} | |||
.coupons_info view { | |||
display: flex; | |||
flex-direction: column; | |||
} | |||
.coupons_info view:nth-child(1) text { | |||
font-size: 30rpx; | |||
margin-top: 3%; | |||
} | |||
.coupons_info view:nth-child(1) text:nth-child(1) text { | |||
color: #ff3434; | |||
font-size: 24rpx; | |||
border: 1px solid #ff3434; | |||
border-radius: 6rpx; | |||
margin-left: 2%; | |||
padding: 0 5rpx; | |||
} | |||
.coupons_info view:nth-child(1) text:nth-child(2), | |||
.coupons_info view:nth-child(1) text:nth-child(3) { | |||
color: #b8b8b8; | |||
font-size: 24rpx; | |||
margin-top: 4%; | |||
} | |||
.coupons_info view:nth-child(1) text:nth-child(2) text, | |||
.coupons_info view:nth-child(1) text:nth-child(3) text { | |||
color: #ff3434; | |||
font-size: 24rpx; | |||
} | |||
.coupons_info view:nth-child(2) text:nth-child(1) { | |||
font-size: 36rpx; | |||
color: #ff3434; | |||
margin-top: 40rpx; | |||
font-weight: bold; | |||
} | |||
.coupons_info view:nth-child(2) text:nth-child(2) { | |||
font-size: 24rpx; | |||
color: #b4b4b4; | |||
text-decoration: line-through; | |||
padding-left: 10rpx; | |||
padding-top: 4rpx; | |||
} | |||
.posi { | |||
width: 92%; | |||
display: flex; | |||
flex-direction: column; | |||
padding: 0 4%; | |||
background: #fff; | |||
margin-top: 2%; | |||
} | |||
.posi>view:nth-child(2) { | |||
width: 100%; | |||
height: 87rpx; | |||
display: flex; | |||
justify-content: space-between; | |||
border-top: 1px solid #f6f6f6; | |||
line-height: 87rpx; | |||
} | |||
.posi>view:nth-child(2) text:nth-child(1) { | |||
font-size: 30rpx; | |||
color: #a9a9a9; | |||
} | |||
.posi>view:nth-child(2) text:nth-child(2) { | |||
font-size: 30rpx; | |||
color: #a9a9a9; | |||
} | |||
.posi_logo { | |||
width: 100%; | |||
height: 156rpx; | |||
display: flex; | |||
margin-top: 30rpx; | |||
} | |||
.posi_logo view:nth-child(1) { | |||
width: 126rpx; | |||
height: 126rpx; | |||
border-radius: 50%; | |||
overflow: hidden; | |||
flex: 2; | |||
} | |||
.posi_logo view:nth-child(1) image { | |||
width: 100%; | |||
height: 100%; | |||
} | |||
.posi_logo view:nth-child(2) { | |||
display: flex; | |||
flex-direction: column; | |||
flex: 8; | |||
padding-top: 20rpx; | |||
padding-left: 30rpx; | |||
} | |||
.posi_logo view:nth-child(2) text:nth-child(1) { | |||
font-size: 30rpx; | |||
} | |||
.posi_logo view:nth-child(2) text:nth-child(2) { | |||
font-size: 24rpx; | |||
color: #b8b8b8; | |||
padding-top: 10rpx; | |||
} | |||
.notes { | |||
margin-top: 2%; | |||
} | |||
.notes view:nth-child(1) { | |||
width: 92%; | |||
height: 87rpx; | |||
padding: 0 4%; | |||
line-height: 87rpx; | |||
background: #fff; | |||
border-bottom: 1rpx solid #f5f5f5; | |||
border-top: 1rpx solid #f5f5f5; | |||
} | |||
.notes view:nth-child(1) text { | |||
font-size: 30rpx; | |||
font-weight: bold; | |||
} | |||
.notes view:nth-child(2) { | |||
width: 92%; | |||
height: 400rpx; | |||
padding: 0 4%; | |||
background: #fff; | |||
border-bottom: 1rpx solid #f5f5f5; | |||
display: flex; | |||
flex-direction: column; | |||
padding-top: 2%; | |||
} | |||
.notes view:nth-child(2)>text { | |||
font-size: 28rpx; | |||
color: #A9A9A9; | |||
line-height: 56rpx; | |||
} | |||
.spot { | |||
width: 12rpx; | |||
height: 12rpx; | |||
display: inline-block; | |||
background: #A9A9A9; | |||
margin-right: 16rpx; | |||
position: relative; | |||
bottom: 4rpx; | |||
border-radius: 50%; | |||
} | |||
.buy-view { | |||
width: 100%; | |||
padding: 10rpx; | |||
/* position: fixed; */ | |||
/* bottom: 0; */ | |||
background: #fff; | |||
box-sizing: border-box; | |||
} | |||
.buy { | |||
/* width: 100%; */ | |||
height: 88rpx; | |||
background: #00C0FF; | |||
color: #fff; | |||
font-size: 36rpx; | |||
line-height: 88rpx; | |||
border-radius: 0; | |||
} |
@@ -27,7 +27,6 @@ Page({ | |||
current_scroll: '1' | |||
}, | |||
onLoad() { | |||
this.getBusinessList(1) | |||
this.getList(0, 1) | |||
}, | |||
getList(key, pageNum) { | |||
@@ -50,23 +49,6 @@ Page({ | |||
}) | |||
}) | |||
}, | |||
getBusinessList(pageNum) { | |||
var that = this | |||
Http.get({ | |||
url: config.api.businessList, | |||
data: { | |||
pageNum: pageNum, | |||
pageSize: 10, | |||
type: 1 | |||
} | |||
}) | |||
.then(function(res) { | |||
console.log(res) | |||
that.setData({ | |||
list: res.data.list | |||
}) | |||
}, function(error) {}) | |||
}, | |||
handleChange({ | |||
detail | |||
}) { |
@@ -1,6 +1,6 @@ | |||
<view class="market"> | |||
<i-tabs class='tabs' current="{{ current_scroll }}" scroll bindchange="handleChangeScroll"> | |||
<i-tab class='i-tab' wx:for="{{tabs}}" wx:key="unique" key="{{item.id}}" title="{{item.title}}"></i-tab> | |||
<i-tab class='i-tab' wx:for="{{tabs}}" wx:key="unique" key="{{item.key}}" title="{{item.name}}"></i-tab> | |||
</i-tabs> | |||
<view class='section' wx:for='{{list}}' wx:key='{{index}}'> | |||
<view class='detail_msg'> |
@@ -1,83 +1,83 @@ | |||
.market { | |||
width: 100%; | |||
height: 100%; | |||
} | |||
.tabs { | |||
width: 100% !important; | |||
height: 88rpx; | |||
text-align: center; | |||
} | |||
.i-tab { | |||
width: 25% !important; | |||
display: inline-block; | |||
} | |||
.section { | |||
margin-top: 2%; | |||
} | |||
.detail_msg { | |||
width: 92%; | |||
height: 220rpx !important; | |||
background: #fff; | |||
display: flex; | |||
padding: 0 4%; | |||
margin-top: 2%; | |||
border-bottom: 1px solid #ededed; | |||
} | |||
.logo { | |||
width: 248rpx; | |||
height: 184rpx; | |||
border-radius: 30rpx; | |||
} | |||
.logo image { | |||
width: 100%; | |||
height: 100%; | |||
} | |||
.info view:nth-child(1) { | |||
display: flex; | |||
justify-content: space-between; | |||
padding: 0 4%; | |||
} | |||
.info { | |||
width: 100%; | |||
} | |||
.info view:nth-child(1) text { | |||
font-size: 30rpx; | |||
} | |||
.info view:nth-child(2) { | |||
color: #ff3434; | |||
font-size: 24rpx; | |||
padding-left: 4%; | |||
margin-top: 1%; | |||
} | |||
.info view:nth-child(2) text { | |||
font-size: 22rpx; | |||
color: #b8b8b8; | |||
} | |||
.info view:nth-child(3) { | |||
display: flex; | |||
justify-content: space-between; | |||
} | |||
.info view:nth-child(3) text:nth-child(2) { | |||
width: 170rpx; | |||
height: 50rpx; | |||
color: #fff; | |||
line-height: 50rpx; | |||
text-align: center; | |||
background: #00c0ff; | |||
border-radius: 10px; | |||
font-size: 28rpx; | |||
margin-top: 40rpx; | |||
} | |||
.market { | |||
width: 100%; | |||
height: 100%; | |||
} | |||
.tabs { | |||
width: 100% !important; | |||
height: 88rpx; | |||
text-align: center; | |||
} | |||
.i-tab { | |||
width: 25% !important; | |||
display: inline-block; | |||
} | |||
.section { | |||
margin-top: 2%; | |||
} | |||
.detail_msg { | |||
width: 92%; | |||
height: 220rpx !important; | |||
background: #fff; | |||
display: flex; | |||
padding: 0 4%; | |||
margin-top: 2%; | |||
border-bottom: 1px solid #ededed; | |||
} | |||
.logo { | |||
width: 248rpx; | |||
height: 184rpx; | |||
border-radius: 30rpx; | |||
} | |||
.logo image { | |||
width: 100%; | |||
height: 100%; | |||
} | |||
.info view:nth-child(1) { | |||
display: flex; | |||
justify-content: space-between; | |||
padding: 0 4%; | |||
} | |||
.info { | |||
width: 100%; | |||
} | |||
.info view:nth-child(1) text { | |||
font-size: 30rpx; | |||
} | |||
.info view:nth-child(2) { | |||
color: #ff3434; | |||
font-size: 24rpx; | |||
padding-left: 4%; | |||
margin-top: 1%; | |||
} | |||
.info view:nth-child(2) text { | |||
font-size: 22rpx; | |||
color: #b8b8b8; | |||
} | |||
.info view:nth-child(3) { | |||
display: flex; | |||
justify-content: space-between; | |||
} | |||
.info view:nth-child(3) text:nth-child(2) { | |||
width: 170rpx; | |||
height: 50rpx; | |||
color: #fff; | |||
line-height: 50rpx; | |||
text-align: center; | |||
background: #00c0ff; | |||
border-radius: 10px; | |||
font-size: 28rpx; | |||
margin-top: 40rpx; | |||
} |
@@ -2,7 +2,7 @@ | |||
<view class="index-rushToBuy-title">限时抢购</view> | |||
<scroll-view scroll-x class="index-scroll-view"> | |||
<view class="commodity" wx:for="{{list}}" wx:key="unique"> | |||
<navigator url="/pages/coupons/details/index"> | |||
<navigator url="/pages/coupon/detail/index"> | |||
<image class="commodity-img" src="{{item.img}}" /> | |||
<view class="commodity-info"> | |||
<view class="commodity-info-name">{{item.name}}</view> | |||
@@ -32,7 +32,7 @@ Page({ | |||
}) | |||
.then(res => { | |||
wx.redirectTo({ | |||
url: '../coupons/details/index?id=' + that.data.couponId + "&flag=pay", | |||
url: '../coupon/detail/index?id=' + that.data.couponId + "&flag=pay", | |||
}) | |||
}) | |||
.catch(error => { | |||
@@ -32,7 +32,7 @@ | |||
</view> | |||
<view class="margin"></view> | |||
<view class="user-btns"> | |||
<navigator url="/pages/coupons/index/index"> | |||
<navigator url="/pages/couponorder/index/index"> | |||
<view class="user-btn app-border-bottom"> | |||
<view>券包</view> | |||
<view> | |||