@@ -1,17 +1,17 @@ | |||
{ | |||
"pages": [ | |||
"pages/index/index", | |||
"pages/login/index", | |||
"pages/market/index", | |||
"pages/user/index", | |||
"pages/coupons/index/index", | |||
"pages/coupons/details/index", | |||
"pages/order/index/index", | |||
"pages/order/details/index", | |||
"pages/rushToBuy/index", | |||
"pages/shop/index/index", | |||
"pages/shop/details/index", | |||
"pages/success/index" | |||
"pages/shop/index/index", | |||
"pages/market/index", | |||
"pages/coupons/index/index", | |||
"pages/order/details/index", | |||
"pages/coupons/details/index", | |||
"pages/order/index/index", | |||
"pages/user/index", | |||
"pages/success/index", | |||
"pages/login/index", | |||
"pages/index/index" | |||
], | |||
"tabBar": { | |||
"color":"#9F9F9F", | |||
@@ -88,3 +88,8 @@ | |||
view{ | |||
font-family: PingFangSC-Semibold; | |||
} | |||
page{ | |||
width: 100%; | |||
height: 100%; | |||
} | |||
@@ -1,183 +1,184 @@ | |||
const Promise = require('../utils/es6-promise.min').Promise | |||
let config = require("../config/config.js"); | |||
var app = getApp(); | |||
const func = { | |||
wxLogin: function (scene) { | |||
return new Promise((resolve, reject) => { | |||
wx.login({ | |||
success: function (res) { | |||
resolve(res) | |||
}, | |||
fail: function (err) { | |||
reject(err) | |||
}, | |||
complete: function (res) { | |||
//console.log("wxLogin complete:" + res) | |||
} | |||
}) | |||
}) | |||
}, | |||
userLogin: function (code, source) { | |||
return new Promise((resolve, reject) => { | |||
wx.request({ | |||
url: config.api.login, | |||
data: { | |||
appId: app.globalData.appId, | |||
code: code, | |||
scene: scene, | |||
sceneAddress: sceneAddress | |||
}, | |||
method: "POST", | |||
success: function (res) { | |||
resolve(res) | |||
}, | |||
fail: function (err) { | |||
reject(err) | |||
}, | |||
complete: function (res) { | |||
//console.log("userLogin complete:" + res) | |||
} | |||
}) | |||
}) | |||
}, | |||
/** | |||
* 授权后获取用户的昵称,unionId等信息 | |||
*/ | |||
getUserInfo: function (encryptedData, iv) { | |||
console.log(app.globalData.openId) | |||
return new Promise((resolve, reject) => { | |||
wx.request({ | |||
url: config.api.getUserInfo, | |||
header: { | |||
"content-type": "application/json;charset=UTF-8", | |||
"token": app.globalData.token | |||
}, | |||
data: { | |||
encryptedData: encryptedData, | |||
iv: iv, | |||
}, | |||
method: "POST", | |||
success: function (res) { | |||
resolve(res) | |||
}, | |||
fail: function (err) { | |||
reject(err) | |||
}, | |||
complete: function (res) { | |||
//console.log("getUserInfo complete:" + res) | |||
} | |||
}) | |||
}) | |||
}, | |||
/** | |||
* 授权后获取用户的手机号 | |||
*/ | |||
getUserPhone: function (encryptedData, iv) { | |||
return new Promise((resolve, reject) => { | |||
wx.request({ | |||
url: config.api.getUserPhone + "?token=" + app.globalData.token, | |||
data: { | |||
encryptedData: encryptedData, | |||
iv: iv, | |||
}, | |||
header: { | |||
"content-type": "application/json;charset=UTF-8", | |||
"token": app.globalData.token | |||
}, | |||
method: "POST", | |||
success: function (res) { | |||
resolve(res) | |||
}, | |||
fail: function (err) { | |||
reject(err) | |||
}, | |||
complete: function (res) { | |||
//console.log("getUserInfo complete:" + res) | |||
} | |||
}) | |||
}) | |||
}, | |||
/** | |||
* 优惠券查询 | |||
*/ | |||
getCouponList: function (pageNum, pageSize) { | |||
return new Promise((resolve, reject) => { | |||
wx.request({ | |||
url: config.api.couponList, | |||
header: { | |||
"content-type": "application/json;charset=UTF-8", | |||
"token": app.globalData.token | |||
}, | |||
method: "Get", | |||
data: { | |||
pageNum: pageNum, | |||
pageSize: pageSize | |||
}, | |||
success: function (res) { | |||
resolve(res) | |||
}, | |||
fail: function (err) { | |||
reject(err) | |||
}, | |||
complete: function (res) { | |||
console.log(res) | |||
} | |||
}) | |||
}) | |||
}, | |||
/** | |||
* 优惠券详情 | |||
*/ | |||
getCouponDetail: function (couponId) { | |||
return new Promise((resolve, reject) => { | |||
wx.request({ | |||
url: config.api.couponDetail, | |||
header: { | |||
"content-type": "application/json;charset=UTF-8", | |||
"token": app.globalData.token | |||
}, | |||
method: "Get", | |||
data: { | |||
id: couponId | |||
}, | |||
success: function (res) { | |||
resolve(res) | |||
}, | |||
fail: function (err) { | |||
reject(err) | |||
}, | |||
complete: function (res) { | |||
console.log(res) | |||
} | |||
}) | |||
}) | |||
}, | |||
/** | |||
* 订单下单 | |||
*/ | |||
orderSave: function (couponId) { | |||
return new Promise((resolve, reject) => { | |||
wx.request({ | |||
url: config.api.orderSave, | |||
header: { | |||
"token": app.globalData.token | |||
}, | |||
method: "Post", | |||
data: { | |||
couponId: couponId, | |||
token: app.globalData.token | |||
}, | |||
success: function (res) { | |||
resolve(res) | |||
}, | |||
fail: function (err) { | |||
reject(err) | |||
}, | |||
complete: function (res) { | |||
console.log(res) | |||
} | |||
}) | |||
}) | |||
}, | |||
} | |||
const Promise = require('../utils/es6-promise.min').Promise | |||
let config = require("../config/config.js"); | |||
var app = getApp(); | |||
const func = { | |||
wxLogin: function (scene) { | |||
return new Promise((resolve, reject) => { | |||
wx.login({ | |||
success: function (res) { | |||
resolve(res) | |||
}, | |||
fail: function (err) { | |||
reject(err) | |||
}, | |||
complete: function (res) { | |||
//console.log("wxLogin complete:" + res) | |||
} | |||
}) | |||
}) | |||
}, | |||
/** | |||
* 授权后获取用户的昵称,unionId等信息 | |||
*/ | |||
getUserInfo: function (encryptedData, iv) { | |||
console.log(app.globalData.openId) | |||
return new Promise((resolve, reject) => { | |||
wx.request({ | |||
url: config.api.getUserInfo, | |||
header: { | |||
"content-type": "application/json;charset=UTF-8", | |||
"token": app.globalData.token | |||
}, | |||
data: { | |||
encryptedData: encryptedData, | |||
iv: iv, | |||
}, | |||
method: "POST", | |||
success: function (res) { | |||
resolve(res) | |||
}, | |||
fail: function (err) { | |||
reject(err) | |||
}, | |||
complete: function (res) { | |||
//console.log("getUserInfo complete:" + res) | |||
} | |||
}) | |||
}) | |||
}, | |||
/** | |||
* 授权后获取用户的手机号 | |||
*/ | |||
getUserPhone: function (encryptedData, iv) { | |||
return new Promise((resolve, reject) => { | |||
wx.request({ | |||
url: config.api.getUserPhone, | |||
data: { | |||
encryptedData: encryptedData, | |||
iv: iv, | |||
}, | |||
header: { | |||
"content-type": "application/json;charset=UTF-8", | |||
"token": app.globalData.token | |||
}, | |||
method: "POST", | |||
success: function (res) { | |||
resolve(res) | |||
}, | |||
fail: function (err) { | |||
reject(err) | |||
}, | |||
complete: function (res) { | |||
//console.log("getUserInfo complete:" + res) | |||
} | |||
}) | |||
}) | |||
}, | |||
/** | |||
* 优惠券查询 | |||
*/ | |||
getCouponList: function (pageNum, pageSize) { | |||
return new Promise((resolve, reject) => { | |||
wx.request({ | |||
url: config.api.couponList, | |||
header: { | |||
"content-type": "application/json;charset=UTF-8", | |||
"token": app.globalData.token | |||
}, | |||
method: "Get", | |||
data: { | |||
pageNum: pageNum, | |||
pageSize: pageSize | |||
}, | |||
success: function (res) { | |||
resolve(res) | |||
}, | |||
fail: function (err) { | |||
reject(err) | |||
}, | |||
complete: function (res) { | |||
console.log(res) | |||
} | |||
}) | |||
}) | |||
}, | |||
/** | |||
* 优惠券详情 | |||
*/ | |||
getCouponDetail: function (couponId) { | |||
return new Promise((resolve, reject) => { | |||
wx.request({ | |||
url: config.api.couponDetail, | |||
header: { | |||
"content-type": "application/json;charset=UTF-8", | |||
"token": app.globalData.token | |||
}, | |||
method: "Get", | |||
data: { | |||
id: couponId | |||
}, | |||
success: function (res) { | |||
resolve(res) | |||
}, | |||
fail: function (err) { | |||
reject(err) | |||
}, | |||
complete: function (res) { | |||
console.log(res) | |||
} | |||
}) | |||
}) | |||
}, | |||
/** | |||
* 订单下单 | |||
*/ | |||
orderSave: function (couponId) { | |||
return new Promise((resolve, reject) => { | |||
wx.request({ | |||
url: config.api.orderSave, | |||
header: { | |||
"token": app.globalData.token | |||
}, | |||
method: "Post", | |||
data: { | |||
couponId: couponId, | |||
token: app.globalData.token | |||
}, | |||
success: function (res) { | |||
resolve(res) | |||
}, | |||
fail: function (err) { | |||
reject(err) | |||
}, | |||
complete: function (res) { | |||
console.log(res) | |||
} | |||
}) | |||
}) | |||
}, | |||
payOrderCreate: function (orderId) { | |||
return new Promise((resolve, reject) => { | |||
wx.request({ | |||
url: config.api.payOrderCreate, | |||
header: { | |||
"token": app.globalData.token | |||
}, | |||
method: "Post", | |||
data: { | |||
orderId: orderId, | |||
token: app.globalData.token | |||
}, | |||
success: function (res) { | |||
resolve(res) | |||
}, | |||
fail: function (err) { | |||
reject(err) | |||
}, | |||
complete: function (res) { | |||
console.log(res) | |||
} | |||
}) | |||
}) | |||
}, | |||
} | |||
module.exports = func; |
@@ -1,42 +1,50 @@ | |||
var url = 'https://ciformall.youlane.cn' | |||
//var url = 'http://localhost:8001' | |||
var apiPrefix = url + '/C/'; | |||
var config = { | |||
name: "富茂", | |||
api: { | |||
/** | |||
* 接口用途:login | |||
*/ | |||
login: '/api/user/login', | |||
/** | |||
* 授权后获取用户的昵称,unionId等信息 | |||
*/ | |||
getUserInfo: '/api/user/getUserInfo', | |||
/** | |||
* 接口用途:授权后获取用户的手机号 | |||
*/ | |||
getUserPhone: '/api/user/getUserPhone', | |||
/** | |||
* 优惠券查询 | |||
*/ | |||
couponList: '/wxCoupon/list', | |||
/** | |||
* 优惠券详情 | |||
*/ | |||
couponDetail: '/wxCoupon/findById', | |||
/** | |||
* 下单 | |||
*/ | |||
orderSave: '/wxOrder/save', | |||
}, | |||
weapp: { | |||
AppId: 'wx649b3be73c1afe47', | |||
} | |||
}; | |||
for (var key in config.api) { | |||
config.api[key] = apiPrefix + config.api[key]; | |||
} | |||
var url = 'https://ciformall.youlane.cn' | |||
//var url = 'http://localhost:8001' | |||
var apiPrefix = url + '/C/api'; | |||
var config = { | |||
name: "富茂", | |||
api: { | |||
/** | |||
* 接口用途:login | |||
*/ | |||
login: '/user/login', | |||
/** | |||
* 授权后获取用户的昵称,unionId等信息 | |||
*/ | |||
getUserInfo: '/user/getUserInfo', | |||
/** | |||
* 接口用途:授权后获取用户的手机号 | |||
*/ | |||
getUserPhone: '/user/getUserPhone', | |||
/** | |||
* 优惠券查询 | |||
*/ | |||
couponList: '/coupon/list', | |||
/** | |||
* 优惠券详情 | |||
*/ | |||
couponDetail: '/coupon/findById', | |||
/** | |||
* 下订单 | |||
*/ | |||
orderSave: '/order/save', | |||
/** | |||
* 支付订单 | |||
*/ | |||
payOrderCreate: '/pay/create', | |||
/** | |||
* 订单列表 | |||
*/ | |||
orderSave: '/order/list', | |||
}, | |||
weapp: { | |||
AppId: 'wx649b3be73c1afe47', | |||
} | |||
}; | |||
for (var key in config.api) { | |||
config.api[key] = apiPrefix + config.api[key]; | |||
} | |||
module.exports = config; |
@@ -1,41 +1,87 @@ | |||
let Common = require('../../../common/common.js') | |||
var app = getApp() | |||
Page({ | |||
data: { | |||
list:{}, | |||
couponId:null | |||
}, | |||
onLoad(e) { | |||
console.log(e.id) | |||
Common.getCouponDetail(e.id) | |||
.then(res =>{ | |||
console.log(res) | |||
this.setData({ | |||
list: res.data.data, | |||
couponId: e.id | |||
}) | |||
}) | |||
}, | |||
aaa(){ | |||
wx.showLoading({ | |||
title: '加载中...', | |||
}) | |||
console.log(this.data.couponId) | |||
Common.orderSave(''+this.data.couponId) | |||
.then(res => { | |||
wx.hideLoading(); | |||
console.log(res) | |||
if (res.data.code == 200) { | |||
wx.showToast({ | |||
title: '购买成功', | |||
}) | |||
wx.navigateBack({ | |||
delta: 2 | |||
}) | |||
setTimeout(() => { | |||
wx.hideToast(); | |||
}, 2000) | |||
} | |||
}) | |||
} | |||
let Common = require('../../../common/common.js') | |||
var app = getApp() | |||
Page({ | |||
data: { | |||
list:{}, | |||
couponId:null | |||
}, | |||
onLoad(e) { | |||
console.log(e.id) | |||
Common.getCouponDetail(e.id) | |||
.then(res =>{ | |||
console.log(res) | |||
this.setData({ | |||
list: res.data.data, | |||
couponId: e.id | |||
}) | |||
}) | |||
}, | |||
orderfunc(){ | |||
wx.showLoading({ | |||
title: '加载中...', | |||
}) | |||
console.log(this.data.couponId) | |||
Common.orderSave(''+this.data.couponId) | |||
.then(res => { | |||
wx.hideLoading(); | |||
console.log(res) | |||
if (res.data.code == 200) { | |||
Common.payOrderCreate(res.data.data.id) | |||
.then(res =>{ | |||
wx.requestPayment({ | |||
timeStamp: res.data.data.timeStamp, | |||
nonceStr: res.data.data.nonceStr, | |||
package: res.data.data.package, | |||
signType: 'MD5', | |||
paySign: res.data.data.paySign, | |||
'success': function (res) { | |||
console.log('支付成功'); | |||
wx.showToast({ | |||
title: '购买成功', | |||
duration: 2500 | |||
}) | |||
wx.navigateBack({ | |||
delta: 2 | |||
}) | |||
}, | |||
'fail': function (res) { | |||
console.log('支付失败'); | |||
console.log(res) | |||
return; | |||
}, | |||
'complete': function (res) { | |||
console.log('支付完成'); | |||
var url = that.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) | |||
} | |||
} | |||
return; | |||
} | |||
}) | |||
}) | |||
} else { | |||
wx.showToast({ | |||
title: res.data.message, | |||
duration: 3000 | |||
}) | |||
} | |||
}) | |||
} | |||
}) |
@@ -1,6 +1,46 @@ | |||
<view class='coupons'> | |||
<image src='{{list.coverImg}}'></image> | |||
<text>{{list.subTitle}}</text> | |||
<text>{{list.title}}</text> | |||
<button bindtap='aaa'>下单</button> | |||
</view> | |||
<view class='coupons'> | |||
<view class='banner'> | |||
<image src='http://img02.tooopen.com/images/20150928/tooopen_sy_143912755726.jpg'></image> | |||
</view> | |||
<view class='coupons_info'> | |||
<view> | |||
<text>黑椒牛排<text>限购一件</text></text> | |||
<text>剩余时间:<text>2天12小时25分钟</text></text> | |||
<text>剩余件数:<text>19件</text></text> | |||
</view> | |||
<view> | |||
<text>¥1.00</text> | |||
<text>¥59.00</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> | |||
<button bindtap='orderfunc' class='buy'>立即购买</button> | |||
</view> |
@@ -0,0 +1,190 @@ | |||
@import '../../../app.wxss'; | |||
.coupons { | |||
width: 100%; | |||
height: 100%; | |||
position: absolute; | |||
background: #f6f6f6; | |||
} | |||
.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 { | |||
width: 100%; | |||
height: 88rpx; | |||
background: #00C0FF; | |||
color: #fff; | |||
font-size: 36rpx; | |||
line-height: 88rpx; | |||
} |
@@ -1,65 +1,56 @@ | |||
Page({ | |||
/** | |||
* 页面的初始数据 | |||
*/ | |||
data: { | |||
tabs: [{ | |||
key: 1, | |||
name: "未使用" | |||
}, | |||
{ | |||
key: 2, | |||
name: "已使用" | |||
}, | |||
{ | |||
key: 3, | |||
name: "已过期" | |||
}, | |||
{ | |||
key: 4, | |||
name: "已退款" | |||
} | |||
], | |||
list: [{ | |||
key: '1', | |||
data: [{ | |||
name: '111' | |||
}] | |||
}, | |||
{ | |||
key: '2', | |||
data: [{ | |||
name: '222' | |||
}] | |||
}, | |||
{ | |||
key: '3', | |||
data: [{ | |||
name: '333' | |||
}] | |||
} | |||
], | |||
current: '', | |||
current_scroll: '1' | |||
}, | |||
handleChange({ | |||
detail | |||
}) { | |||
this.setData({ | |||
current: detail.key | |||
}); | |||
}, | |||
handleChangeScroll({ | |||
detail | |||
}) { | |||
this.setData({ | |||
current_scroll: detail.key | |||
}); | |||
}, | |||
/** | |||
* 生命周期函数--监听页面加载 | |||
*/ | |||
onLoad: function (options) { | |||
}, | |||
/** | |||
* 生命周期函数--监听页面初次渲染完成 | |||
*/ | |||
onReady: function () { | |||
}, | |||
/** | |||
* 生命周期函数--监听页面显示 | |||
*/ | |||
onShow: function () { | |||
}, | |||
/** | |||
* 生命周期函数--监听页面隐藏 | |||
*/ | |||
onHide: function () { | |||
}, | |||
/** | |||
* 生命周期函数--监听页面卸载 | |||
*/ | |||
onUnload: function () { | |||
}, | |||
/** | |||
* 页面相关事件处理函数--监听用户下拉动作 | |||
*/ | |||
onPullDownRefresh: function () { | |||
}, | |||
/** | |||
* 页面上拉触底事件的处理函数 | |||
*/ | |||
onReachBottom: function () { | |||
}, | |||
/** | |||
* 用户点击右上角分享 | |||
*/ | |||
onShareAppMessage: function () { | |||
} | |||
}) |
@@ -1,6 +1,8 @@ | |||
{ | |||
"usingComponents": { | |||
}, | |||
"navigationBarTitleText": "我的优惠劵" | |||
} | |||
"usingComponents": { | |||
"i-tab": "../../../dist/tab/index", | |||
"i-tabs": "../../../dist/tabs/index", | |||
"c-coupons": "../../../components/coupons/index" | |||
}, | |||
"navigationBarTitleText": "我的优惠劵" | |||
} |
@@ -1 +1,41 @@ | |||
<text>pages/t/index.wxml</text> | |||
<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.key}}" title="{{item.name}}"></i-tab> | |||
</i-tabs> | |||
<view class='section'> | |||
<view class='detail_msg'> | |||
<view class='logo'> | |||
<image src='http://img02.tooopen.com/images/20150928/tooopen_sy_143912755726.jpg'></image> | |||
</view> | |||
<view class='info'> | |||
<view> | |||
<text>黑椒牛排</text> | |||
</view> | |||
<view> | |||
<text>有效期至:</text>2018-07-10 11:30</view> | |||
<view> | |||
<text></text> | |||
<text>立即使用</text> | |||
</view> | |||
</view> | |||
</view> | |||
</view> | |||
<view class='section'> | |||
<view class='detail_msg'> | |||
<view class='logo'> | |||
<image src='http://img02.tooopen.com/images/20150928/tooopen_sy_143912755726.jpg'></image> | |||
</view> | |||
<view class='info'> | |||
<view> | |||
<text>黑椒牛排</text> | |||
</view> | |||
<view> | |||
<text>有效期至:</text>2018-07-10 11:30</view> | |||
<view> | |||
<text></text> | |||
<text>立即使用</text> | |||
</view> | |||
</view> | |||
</view> | |||
</view> | |||
</view> |
@@ -0,0 +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; | |||
} |
@@ -4,30 +4,54 @@ | |||
</i-tabs> | |||
<view class='section'> | |||
<view class='detail_msg'> | |||
<view> | |||
<view class='logo'> | |||
<image src='http://img02.tooopen.com/images/20150928/tooopen_sy_143912755726.jpg'></image> | |||
</view> | |||
<view class='info'> | |||
<view> | |||
<image src='http://img02.tooopen.com/images/20150928/tooopen_sy_143912755726.jpg'></image> | |||
<text>黑椒牛排</text> | |||
<text>等待付款</text> | |||
</view> | |||
<view> | |||
<view> | |||
<text>黑椒牛排</text> | |||
<text>等待付款</text> | |||
</view> | |||
<view> | |||
<text>购买数量:<text>1件</text></text> | |||
</view> | |||
<view> | |||
<text>下单时间:<text>2018-07-10 11:30</text></text> | |||
</view> | |||
<text>购买数量:</text>1件</view> | |||
<view> | |||
<text>下单时间:</text>2018-07-10 11:30</view> | |||
</view> | |||
</view> | |||
<view class='payment'> | |||
<view> | |||
<text>¥1.00</text> | |||
<text>¥59.00</text> | |||
</view> | |||
<view> | |||
<text>支付</text> | |||
</view> | |||
</view> | |||
</view> | |||
<view class='section'> | |||
<view class='detail_msg'> | |||
<view class='logo'> | |||
<image src='http://img02.tooopen.com/images/20150928/tooopen_sy_143912755726.jpg'></image> | |||
</view> | |||
<view class='info'> | |||
<view> | |||
<text>黑椒牛排</text> | |||
<text>等待付款</text> | |||
</view> | |||
<view> | |||
<text>购买数量:</text>1件</view> | |||
<view> | |||
<text>下单时间:</text>2018-07-10 11:30</view> | |||
</view> | |||
</view> | |||
<view class='payment'> | |||
<view> | |||
<text>¥1.00</text> | |||
<text>¥59.00</text> | |||
</view> | |||
<view> | |||
<text>¥1.00 <text>¥59.90</text></text> | |||
<text>支付</text> | |||
</view> | |||
</view> | |||
<!-- <view wx:for='{{list}}' wx:key='{{index}}' wx:if='{{current_scroll==item.key}}'> | |||
<text wx:for='{{item.data}}' wx:key='{{index}}'>{{item.name}}</text> | |||
</view> --> | |||
</view> | |||
</view> |
@@ -1,33 +1,114 @@ | |||
.market{ | |||
.market { | |||
width: 100%; | |||
height: 100%; | |||
} | |||
.tabs{ | |||
width: 100%!important; | |||
.tabs { | |||
width: 100% !important; | |||
height: 88rpx; | |||
text-align: center; | |||
} | |||
.i-tab{ | |||
width: 30%!important; | |||
.i-tab { | |||
width: 30% !important; | |||
display: inline-block; | |||
} | |||
.detail_msg{ | |||
width: 100%; | |||
height: 416rpx!important; | |||
background: #fff; | |||
.section { | |||
margin-top: 2%; | |||
} | |||
.detail_msg { | |||
width: 92%; | |||
height: 220rpx !important; | |||
background: #fff; | |||
display: flex; | |||
flex-direction: column; | |||
margin: 0 4%; | |||
margin-top: 2%; | |||
border-bottom: 1px solid #ededed; | |||
} | |||
.detail_msg>view:nth-child(1) { | |||
width: 100%; | |||
height: 244rpx; | |||
} | |||
.detail_msg>view:nth-child(1) view:nth-child(1) { | |||
.logo { | |||
width: 248rpx; | |||
height: 184rpx; | |||
border-radius: 30rpx; | |||
} | |||
.detail_msg>view:nth-child(1)>view:nth-child(1) image{ | |||
.logo image { | |||
width: 100%; | |||
height: 100%; | |||
margin: 13.2% 0 0 13%; | |||
} | |||
} | |||
.info view:nth-child(1) { | |||
display: flex; | |||
justify-content: space-between; | |||
padding: 0 4%; | |||
} | |||
.info { | |||
width: 100%; | |||
} | |||
.info view:nth-child(1) { | |||
margin-bottom: 72rpx; | |||
} | |||
.info view:nth-child(1) text { | |||
font-size: 30rpx; | |||
} | |||
.info view:nth-child(1) text:nth-child(2) { | |||
color: #ffae00; | |||
font-size: 24rpx; | |||
} | |||
.info view:nth-child(2), .info view:nth-child(3) { | |||
color: #ff3434; | |||
font-size: 24rpx; | |||
padding-left: 4%; | |||
} | |||
.info view:nth-child(2) text, .info view:nth-child(3) text { | |||
font-size: 22rpx; | |||
color: #b8b8b8; | |||
} | |||
.info view:nth-child(3) { | |||
margin-top: 5rpx; | |||
} | |||
.payment { | |||
width: 92%; | |||
height: 120rpx; | |||
line-height: 120rpx; | |||
padding: 0 4%; | |||
display: flex; | |||
justify-content: space-between; | |||
border-bottom: 20rpx solid #EDEDED; | |||
} | |||
.payment view:nth-child(1) text:nth-child(1) { | |||
font-size: 36rpx; | |||
color: #ff3434; | |||
font-weight: bold; | |||
} | |||
.payment view:nth-child(1) text:nth-child(2) { | |||
font-size: 24rpx; | |||
color: #b4b4b4; | |||
padding-left: 18rpx; | |||
text-decoration: line-through; | |||
} | |||
.payment view:nth-child(2) { | |||
width: 114rpx; | |||
height: 50rpx; | |||
background: #00c0ff; | |||
border-radius: 10px; | |||
line-height: 38rpx; | |||
text-align: center; | |||
margin-top: 40rpx; | |||
} | |||
.payment view:nth-child(2) text { | |||
font-size: 28rpx; | |||
color: #fff; | |||
} |
@@ -1 +1,61 @@ | |||
<text>pages/t/index.wxml</text> | |||
<view class='order'> | |||
<view class='tips'> | |||
<text class='iconfont icon-choose'></text> | |||
<text>付款成功,请尽快到门店使用</text> | |||
</view> | |||
<view class='section'> | |||
<view class='detail_msg'> | |||
<view class='logo'> | |||
<image src='http://img02.tooopen.com/images/20150928/tooopen_sy_143912755726.jpg'></image> | |||
</view> | |||
<view class='info'> | |||
<view> | |||
<text>黑椒牛排</text> | |||
</view> | |||
<view> | |||
<text>购买数量:</text>1件</view> | |||
<view> | |||
<text>下单时间:</text>2018-07-10 11:30</view> | |||
</view> | |||
</view> | |||
<view class='payment'> | |||
<view></view> | |||
<view> | |||
<text>¥1.00</text> | |||
<text>¥59.00</text> | |||
</view> | |||
</view> | |||
</view> | |||
<view class='classif'> | |||
<view> | |||
<text>有效期:</text> | |||
<text>2018-07-10 至 2018-07-10</text> | |||
</view> | |||
<view> | |||
<text>适用门店</text> | |||
<text class='iconfont icon-right'></text> | |||
</view> | |||
<view> | |||
<view> | |||
<text>兑换码:</text> | |||
<text>1234567890</text> | |||
</view> | |||
<view> | |||
<icon class='iconfont icon-dingweib'></icon> | |||
<icon class='iconfont icon-right'></icon> | |||
</view> | |||
</view> | |||
<view> | |||
<text>下单时间</text> | |||
<text>2018-07-10 11:30</text> | |||
</view> | |||
<view> | |||
<text>订单编号</text> | |||
<text>1234567890</text> | |||
</view> | |||
<view> | |||
<text>订单金额</text> | |||
<text>¥1.00</text> | |||
</view> | |||
</view> | |||
</view> |
@@ -0,0 +1,145 @@ | |||
@import '../../../app.wxss'; | |||
.order { | |||
width: 100%; | |||
} | |||
.tips { | |||
width: 92%; | |||
height: 88rpx; | |||
background: #00C0FF; | |||
color: #fff; | |||
padding: 0 4%; | |||
line-height: 88rpx; | |||
} | |||
.tips text:nth-child(2) { | |||
font-size: 24rpx; | |||
padding-left: 16rpx; | |||
} | |||
.tips text:nth-child(1) { | |||
width: 32rpx; | |||
height: 32rpx; | |||
background: #fff; | |||
border-radius: 50%; | |||
color: #00C0FF; | |||
line-height: 32rpx; | |||
text-align: center; | |||
display: inline-block; | |||
font-size: 28rpx; | |||
} | |||
.section { | |||
margin-top: 2%; | |||
} | |||
.detail_msg { | |||
width: 92%; | |||
height: 220rpx !important; | |||
background: #fff; | |||
display: flex; | |||
margin: 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) { | |||
margin-bottom: 72rpx; | |||
} | |||
.info view:nth-child(1) text { | |||
font-size: 30rpx; | |||
} | |||
.info view:nth-child(1) text:nth-child(2) { | |||
color: #ffae00; | |||
font-size: 24rpx; | |||
} | |||
.info view:nth-child(2), .info view:nth-child(3) { | |||
color: #ff3434; | |||
font-size: 24rpx; | |||
padding-left: 4%; | |||
} | |||
.info view:nth-child(2) text, .info view:nth-child(3) text { | |||
font-size: 22rpx; | |||
color: #b8b8b8; | |||
} | |||
.info view:nth-child(3) { | |||
margin-top: 5rpx; | |||
} | |||
.payment { | |||
width: 92%; | |||
height: 120rpx; | |||
line-height: 120rpx; | |||
padding: 0 4%; | |||
display: flex; | |||
justify-content: space-between; | |||
border-bottom: 20rpx solid #EDEDED; | |||
} | |||
.payment view:nth-child(2) text:nth-child(1) { | |||
font-size: 36rpx; | |||
color: #ff3434; | |||
font-weight: bold; | |||
} | |||
.payment view:nth-child(2) text:nth-child(2) { | |||
font-size: 24rpx; | |||
color: #b4b4b4; | |||
padding-left: 18rpx; | |||
text-decoration: line-through; | |||
} | |||
.classif { | |||
width: 100%; | |||
} | |||
.classif>view{ | |||
height: 88rpx; | |||
line-height: 88rpx; | |||
display: flex; | |||
justify-content: space-between; | |||
padding-left: 4%; | |||
padding-right: 4%; | |||
} | |||
.classif>view text{ | |||
font-size: 30rpx; | |||
} | |||
.classif>view text:nth-child(2){ | |||
color: #B8B8B8; | |||
font-size: 30rpx; | |||
} | |||
.classif>view:nth-child(1) { | |||
display: block; | |||
} | |||
.classif>view:nth-child(1) text:nth-child(2) { | |||
padding-left: 15rpx; | |||
} | |||
.classif>view:nth-child(3),.classif>view:nth-child(4) { | |||
border-top: 20rpx solid #EDEDED; | |||
} | |||
.classif>view:nth-child(3) view text:nth-child(2) { | |||
padding-left: 15rpx; | |||
} | |||
.classif>view:nth-child(6) text:nth-child(2){ | |||
color: #FF3434; | |||
font-weight: bold; | |||
} |
@@ -3,4 +3,5 @@ | |||
}, | |||
"navigationBarTitleText": "限时抢购" | |||
} |
@@ -1 +1,85 @@ | |||
<text>pages/t/index.wxml</text> | |||
<!-- 限时抢购 --> | |||
<view class='flashSale'> | |||
<view class='flashSaleItemWrap'> | |||
<view class='flashSaleItem'> | |||
<view class='flashSaleItemTop'> | |||
<view class='flashSaleItemTopL'> | |||
<image src='/assets/img/food.png' class='food'></image> | |||
</view> | |||
<view class='flashSaleItemTopR'> | |||
<view class='flashSaleItemTopRTop'> | |||
<text class='foodname'>黑椒牛排</text> | |||
<text class='small'>小程序专享</text> | |||
</view> | |||
<view class='flashSaleItemTopRBottom'> | |||
<text class='presentPrice'>¥1.00</text> | |||
<text class='originalPrice'>¥59.00</text> | |||
</view> | |||
</view> | |||
</view> | |||
<view class='flashSaleItemBottom'> | |||
<view class='flashSaleItemBottomTop'><text class='remainingTime'>剩余时间:</text><text class='realRemainingTime'>2天 12小时25分钟</text></view> | |||
<view class='flashSaleItemBottomBottm'> | |||
<view><text class="remainingNumber">剩余件数:</text><text class='realnumber'>19件</text></view> | |||
<view class='buy'>购买</view> | |||
</view> | |||
</view> | |||
</view> | |||
</view> | |||
<view class='flashSaleItemWrap'> | |||
<view class='flashSaleItem'> | |||
<view class='flashSaleItemTop'> | |||
<view class='flashSaleItemTopL'> | |||
<image src='/assets/img/food.png' class='food'></image> | |||
</view> | |||
<view class='flashSaleItemTopR'> | |||
<view class='flashSaleItemTopRTop'> | |||
<text class='foodname'>黑椒牛排</text> | |||
<text class='small'>小程序专享</text> | |||
</view> | |||
<view class='flashSaleItemTopRBottom'> | |||
<text class='presentPrice'>¥1.00</text> | |||
<text class='originalPrice'>¥59.00</text> | |||
</view> | |||
</view> | |||
</view> | |||
<view class='flashSaleItemBottom'> | |||
<view class='flashSaleItemBottomTop'><text class='remainingTime'>剩余时间:</text><text class='realRemainingTime'>2天 12小时25分钟</text></view> | |||
<view class='flashSaleItemBottomBottm'> | |||
<view><text class="remainingNumber">剩余件数:</text><text class='realnumber'>19件</text></view> | |||
<view class='buy'>购买</view> | |||
</view> | |||
</view> | |||
</view> | |||
</view> | |||
<view class='flashSaleItemWrap'> | |||
<view class='flashSaleItem'> | |||
<view class='flashSaleItemTop'> | |||
<view class='flashSaleItemTopL'> | |||
<image src='/assets/img/food.png' class='food'></image> | |||
</view> | |||
<view class='flashSaleItemTopR'> | |||
<view class='flashSaleItemTopRTop'> | |||
<text class='foodname'>黑椒牛排</text> | |||
<text class='small'>小程序专享</text> | |||
</view> | |||
<view class='flashSaleItemTopRBottom'> | |||
<text class='presentPrice'>¥1.00</text> | |||
<text class='originalPrice'>¥59.00</text> | |||
</view> | |||
</view> | |||
</view> | |||
<view class='flashSaleItemBottom'> | |||
<view class='flashSaleItemBottomTop'><text class='remainingTime'>剩余时间:</text><text class='realRemainingTime'>2天12小时25分钟</text></view> | |||
<view class='flashSaleItemBottomBottm'> | |||
<view><text class="remainingNumber">剩余件数:</text><text class='realnumber'>19件</text></view> | |||
<view class='buy'>购买</view> | |||
</view> | |||
</view> | |||
</view> | |||
</view> | |||
</view> |
@@ -0,0 +1,104 @@ | |||
.flashSale{ | |||
width: 100%; | |||
height: 100%; | |||
background: #fff; | |||
} | |||
.flashSaleItemWrap{ | |||
width: 100%; | |||
height: 410rpx; | |||
border-top: 1rpx solid #ededed; | |||
border-bottom: 1rpx solid #ededed; | |||
} | |||
.flashSaleItem{ | |||
width: 90%; | |||
height: 410rpx; | |||
display: flex; | |||
flex-direction: column; | |||
background: #fff; | |||
margin: 0 auto; | |||
} | |||
.flashSaleItemTop{ | |||
display: flex; | |||
padding-top: 28rpx; | |||
flex-direction:row; | |||
padding-bottom: 25rpx; | |||
border-bottom: 1rpx solid #ededed; | |||
} | |||
.flashSaleItemTopL{ | |||
flex: 1; | |||
} | |||
.food{ | |||
width: 248rpx; | |||
height: 184rpx; | |||
} | |||
.flashSaleItemTopR{ | |||
flex: 2; | |||
flex-direction: column; | |||
margin-left: 20rpx; | |||
} | |||
.flashSaleItemTopRTop{ | |||
display: flex; | |||
flex-direction: column; | |||
} | |||
.foodname{ | |||
font-size: 34rpx; | |||
color: #000; | |||
} | |||
.small{ | |||
font-size: 24rpx; | |||
color: #00C0FF; | |||
margin-top: 15rpx; | |||
} | |||
.flashSaleItemTopRBottom{ | |||
margin-top: 50rpx; | |||
} | |||
.presentPrice{ | |||
font-size: 36rpx; | |||
color: #FF3434; | |||
} | |||
.originalPrice{ | |||
margin-left: 20rpx; | |||
color:#B4B4B4; | |||
text-decoration: line-through; | |||
font-size: 24rpx; | |||
} | |||
.flashSaleItemBottom{ | |||
margin-top: 20rpx; | |||
} | |||
.remainingTime{ | |||
font-size: 28rpx; | |||
color: #B4B4B4; | |||
} | |||
.realRemainingTime{ | |||
margin-left: 10rpx; | |||
color:#FF3434; | |||
font-size: 28rpx; | |||
} | |||
.flashSaleItemBottomBottm{ | |||
display: flex; | |||
flex-direction: row; | |||
} | |||
.remainingNumber{ | |||
font-size: 28rpx; | |||
color: #B4B4B4; | |||
} | |||
.realnumber{ | |||
margin-left: 10rpx; | |||
color: #FF3434; | |||
font-size: 28rpx; | |||
} | |||
.buy{ | |||
width:114rpx; | |||
height: 50rpx; | |||
line-height: 50rpx; | |||
text-align: center; | |||
background: #00C0FF; | |||
color: #fff; | |||
border-radius: 10rpx; | |||
margin-left: 350rpx; | |||
font-size: 28rpx; | |||
} |
@@ -1 +1,93 @@ | |||
<text>pages/t/index.wxml</text> | |||
<!-- 店铺详情页 --> | |||
<view class="spdetailContainer"> | |||
<!-- 头部 --> | |||
<view class='spheader'> | |||
<view class='spheaderL'><image src='/assets/img/splogo.png' class='splogo'></image></view> | |||
<view class='spheaderM'> | |||
<text class='shopname'>IFROMALL (西单大悦城店)</text> | |||
<text class='shopaddress'>北京市西城区西单北大街131号</text> | |||
</view> | |||
<view class='spheaderR'> | |||
<image src='/assets/img/spcode.png' class='spcode'></image> | |||
</view> | |||
</view> | |||
<!-- 到这里去 --> | |||
<view class='spheaderNext'> | |||
<view class='NextTop'><text>北京市西城区西单北大街131号</text></view> | |||
<view class='NextBottom'> | |||
<view class='NextBottomL'><image src='/assets/img/addresslogo.png' class='addresslogo'></image>12.5km</view> | |||
<view class='NextBottomM'><text>到这里去</text></view> | |||
<view class='NextBottomR'><image src='/assets/img/spphone.png' class='spphone'></image></view> | |||
</view> | |||
</view> | |||
<!-- 门店优惠 --> | |||
<view class='storeDiscount'> | |||
<view class='storeDiscountTitle'><text>门店优惠</text></view> | |||
<view class='storeDiscountCon'> | |||
<view class='storeDiscountConItem'> | |||
<view class='ConItemL'><image src='/assets/img/food.png' class='foodpng'></image></view> | |||
<view class='ConItemR'> | |||
<view class='ConItemRT'> | |||
<text>黑椒牛排</text> | |||
</view> | |||
<view class='ConItemRM'> | |||
<text class='presentPrice'>¥1.00</text> | |||
<text class='originalPrice'>59.00</text> | |||
</view> | |||
<view class='ConItemRB'> | |||
<text class='soldnum'>已售16张</text> | |||
<text class='buy'>购买</text> | |||
</view> | |||
</view> | |||
</view> | |||
<view class='storeDiscountConItem'> | |||
<view class='ConItemL'><image src='/assets/img/food.png' class='foodpng'></image></view> | |||
<view class='ConItemR'> | |||
<view class='ConItemRT'> | |||
<text>黑椒牛排</text> | |||
</view> | |||
<view class='ConItemRM'> | |||
<text class='presentPrice'>¥1.00</text> | |||
<text class='originalPrice'>59.00</text> | |||
</view> | |||
<view class='ConItemRB'> | |||
<text class='soldnum'>已售16张</text> | |||
<text class='buy'>购买</text> | |||
</view> | |||
</view> | |||
</view> | |||
<view class='storeDiscountConItem'> | |||
<view class='ConItemL'><image src='/assets/img/food.png' class='foodpng'></image></view> | |||
<view class='ConItemR'> | |||
<view class='ConItemRT'> | |||
<text>黑椒牛排</text> | |||
</view> | |||
<view class='ConItemRM'> | |||
<text class='presentPrice'>¥1.00</text> | |||
<text class='originalPrice'>59.00</text> | |||
</view> | |||
<view class='ConItemRB'> | |||
<text class='soldnum'>已售16张</text> | |||
<text class='buy'>购买</text> | |||
</view> | |||
</view> | |||
</view> | |||
<view class='storeDiscountConItem'> | |||
<view class='ConItemL'><image src='/assets/img/food.png' class='foodpng'></image></view> | |||
<view class='ConItemR'> | |||
<view class='ConItemRT'> | |||
<text>黑椒牛排</text> | |||
</view> | |||
<view class='ConItemRM'> | |||
<text class='presentPrice'>¥1.00</text> | |||
<text class='originalPrice'>59.00</text> | |||
</view> | |||
<view class='ConItemRB'> | |||
<text class='soldnum'>已售16张</text> | |||
<text class='buy'>购买</text> | |||
</view> | |||
</view> | |||
</view> | |||
</view> | |||
</view> | |||
</view> |
@@ -0,0 +1,174 @@ | |||
.spdetailContainer{ | |||
width: 100%; | |||
height: 100%; | |||
background: #eee; | |||
} | |||
.spheader{ | |||
width: 100%; | |||
height: 186rpx; | |||
background: #fff; | |||
display: flex; | |||
flex-direction: row; | |||
} | |||
.spheaderL{ | |||
flex: 1; | |||
display: flex; | |||
justify-content: center; | |||
align-items: center; | |||
} | |||
.spheaderM{ | |||
flex: 2; | |||
display: flex; | |||
flex-direction: column; | |||
justify-content: left; | |||
align-self: center; | |||
} | |||
.shopname{ | |||
font-size: 31rpx; | |||
color: #000; | |||
} | |||
.shopaddress{ | |||
font-size: 22rpx; | |||
color: #B8B8B8; | |||
margin-top: 20rpx; | |||
} | |||
.spheaderR{ | |||
flex: 1; | |||
display: flex; | |||
justify-content: center; | |||
align-items: center; | |||
} | |||
.splogo{ | |||
width: 150rpx; | |||
height: 150rpx; | |||
} | |||
.spcode{ | |||
width: 100rpx; | |||
height: 100rpx; | |||
} | |||
.spheaderNext{ | |||
width: 100%; | |||
height: 150rpx; | |||
background: #fff; | |||
display: flex; | |||
flex-direction: column; | |||
padding-top: 10rpx; | |||
} | |||
.NextTop{ | |||
margin-left: 30rpx; | |||
font-size: 30rpx; | |||
color: #000; | |||
} | |||
.NextBottom{ | |||
margin-top: 23rpx; | |||
display: flex; | |||
flex-direction: row; | |||
margin-left: 30rpx; | |||
} | |||
.addresslogo{ | |||
width: 20rpx; | |||
height: 20rpx; | |||
} | |||
.spphone{ | |||
width: 44rpx; | |||
height: 44rpx; | |||
} | |||
.NextBottomL{ | |||
flex: 1; | |||
color: #c0c0c0; | |||
font-size: 22rpx; | |||
align-self: center; | |||
} | |||
.NextBottomM{ | |||
flex: 3.5; | |||
justify-content: left; | |||
font-size:22rpx; | |||
color: #00C0FF; | |||
align-self: center; | |||
border-top-width: 2rpx; | |||
border-color: #00C0FF; | |||
} | |||
.NextBottomR{ | |||
flex: .5 | |||
} | |||
.storeDiscount{ | |||
width: 100%; | |||
height: auto; | |||
background: #fff; | |||
margin-top: 30rpx | |||
} | |||
.storeDiscountTitle{ | |||
width: 100%; | |||
height: 87rpx; | |||
line-height: 87rpx; | |||
} | |||
.storeDiscountTitle text{ | |||
margin-left: 30rpx; | |||
font-size:28rpx; | |||
color: #000; | |||
border-bottom: 1px solid #fff; | |||
} | |||
.storeDiscountCon{ | |||
width: 100%; | |||
height: auto; | |||
background: #fff; | |||
flex-direction: column; | |||
} | |||
.storeDiscountConItem{ | |||
width: 100%; | |||
height: 244rpx; | |||
display: flex; | |||
flex-direction: row; | |||
} | |||
.ConItemL{ | |||
flex: 1; | |||
align-self: center; | |||
} | |||
.foodpng{ | |||
width: 248rpx; | |||
height: 184rpx; | |||
margin-left: 30rpx; | |||
} | |||
.ConItemR{ | |||
margin-top: 22rpx; | |||
flex: 4; | |||
padding-left: 20rpx; | |||
} | |||
.ConItemRT{ | |||
color: #000; | |||
font-size: 30rpx; | |||
} | |||
.ConItemRM{ | |||
margin-top: 10rpx; | |||
} | |||
.presentPrice{ | |||
font-size: 36rpx; | |||
color: #FF3434; | |||
margin-right: 20rpx; | |||
} | |||
.originalPrice{ | |||
font-size: 24rpx; | |||
color: #B4B4B4; | |||
text-decoration: line-through; | |||
} | |||
.ConItemRB{ | |||
margin-top: 35rpx; | |||
} | |||
.soldnum{ | |||
color: #585858; | |||
font-size: 22rpx; | |||
} | |||
.buy{ | |||
margin-left: 215rpx; | |||
background: #00C0FF; | |||
color: #fff; | |||
font-size: 28rpx; | |||
width: 114rpx; | |||
height: 50rpx; | |||
line-height: 50rpx; | |||
text-align: center; | |||
border-radius: 10rpx; | |||
display: inline-block; | |||
} | |||
@@ -1,65 +1,55 @@ | |||
Page({ | |||
/** | |||
* 页面的初始数据 | |||
*/ | |||
data: { | |||
tabs: [{ | |||
key: 1, | |||
name: "全部" | |||
}, | |||
{ | |||
key: 2, | |||
name: "待付款" | |||
}, | |||
{ | |||
key: 3, | |||
name: "已完成" | |||
} | |||
], | |||
list: [ | |||
{ | |||
key: '1', | |||
data: [ | |||
{ | |||
name: '111' | |||
} | |||
] | |||
}, | |||
{ | |||
key: '2', | |||
data: [ | |||
{ | |||
name: '222' | |||
} | |||
] | |||
}, | |||
{ | |||
key: '3', | |||
data: [ | |||
{ | |||
name: '333' | |||
} | |||
] | |||
} | |||
], | |||
current: '', | |||
current_scroll: '1' | |||
}, | |||
handleChange({ detail }) { | |||
this.setData({ | |||
current: detail.key | |||
}); | |||
}, | |||
handleChangeScroll({ detail }) { | |||
this.setData({ | |||
current_scroll: detail.key | |||
}); | |||
}, | |||
/** | |||
* 生命周期函数--监听页面加载 | |||
*/ | |||
onLoad: function (options) { | |||
}, | |||
/** | |||
* 生命周期函数--监听页面初次渲染完成 | |||
*/ | |||
onReady: function () { | |||
}, | |||
/** | |||
* 生命周期函数--监听页面显示 | |||
*/ | |||
onShow: function () { | |||
}, | |||
/** | |||
* 生命周期函数--监听页面隐藏 | |||
*/ | |||
onHide: function () { | |||
}, | |||
/** | |||
* 生命周期函数--监听页面卸载 | |||
*/ | |||
onUnload: function () { | |||
}, | |||
/** | |||
* 页面相关事件处理函数--监听用户下拉动作 | |||
*/ | |||
onPullDownRefresh: function () { | |||
}, | |||
/** | |||
* 页面上拉触底事件的处理函数 | |||
*/ | |||
onReachBottom: function () { | |||
}, | |||
/** | |||
* 用户点击右上角分享 | |||
*/ | |||
onShareAppMessage: function () { | |||
} | |||
}) |
@@ -1,6 +1,8 @@ | |||
{ | |||
"usingComponents": { | |||
}, | |||
"navigationBarTitleText": "我的优惠劵" | |||
} | |||
"usingComponents": { | |||
"i-tab": "../../../dist/tab/index", | |||
"i-tabs": "../../../dist/tabs/index", | |||
"c-coupons": "../../../components/coupons/index" | |||
}, | |||
"navigationBarTitleText": "我的订单" | |||
} |
@@ -1 +1,5 @@ | |||
<text>pages/t/index.wxml</text> | |||
<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.key}}" title="{{item.name}}"></i-tab> | |||
</i-tabs> | |||
</view> |
@@ -0,0 +1,15 @@ | |||
.market { | |||
width: 100%; | |||
height: 100%; | |||
} | |||
.tabs { | |||
width: 100% !important; | |||
height: 88rpx; | |||
text-align: center; | |||
} | |||
.i-tab { | |||
width: 30% !important; | |||
display: inline-block; | |||
} |
@@ -1 +1,9 @@ | |||
<text>pages/t/index.wxml</text> | |||
<view class='success'> | |||
<view class='success_logo'> | |||
<icon class='iconfont icon-choose'></icon> | |||
<text>购买成功</text> | |||
</view> | |||
<button class='check'>查看订单</button> | |||
<button>继续逛逛</button> | |||
<button>去使用</button> | |||
</view> |
@@ -0,0 +1,47 @@ | |||
.success { | |||
width: 100%; | |||
height: 100%; | |||
background: #f6f6f6; | |||
position: absolute; | |||
} | |||
.success_logo { | |||
width: 201rpx; | |||
height: 281rpx; | |||
margin: 10% auto; | |||
display: flex; | |||
flex-direction: column; | |||
margin-bottom: 20%; | |||
} | |||
.success_logo icon { | |||
width: 201rpx; | |||
height: 201rpx; | |||
background: #00c0ff; | |||
border-radius: 50%; | |||
color: #fff; | |||
font-size: 40px; | |||
text-align: center; | |||
line-height: 201rpx; | |||
} | |||
.success_logo text { | |||
font-size: 36rpx; | |||
text-align: center; | |||
padding-top: 3%; | |||
} | |||
.success button { | |||
width: 504rpx; | |||
height: 88rpx; | |||
background: #00c0ff; | |||
color: #fff; | |||
margin: 3% auto; | |||
font-size: 36rpx; | |||
} | |||
.check { | |||
background: #fff!important; | |||
color: #00c0ff!important; | |||
border:1px solid #00c0ff; | |||
} |
@@ -32,7 +32,7 @@ | |||
</view> | |||
<view class="margin"></view> | |||
<view class="user-btns"> | |||
<navigator url="/pages/market/index"> | |||
<navigator url="/pages/coupons/index/index"> | |||
<view class="user-btn app-border-bottom"> | |||
<view>卷包</view> | |||
<view> | |||
@@ -12,8 +12,8 @@ | |||
}, | |||
"compileType": "miniprogram", | |||
"libVersion": "2.2.2", | |||
"appid": "wx649b3be73c1afe47", | |||
"projectname": "C", | |||
"appid": "wxeaaa53abd537546b", | |||
"projectname": "2222", | |||
"isGameTourist": false, | |||
"condition": { | |||
"search": { | |||