Commit 279a8bd67e49eb302998f71a6fb66a698d190287

Authored by vking
1 parent 5690a52a

商家红包活动

... ... @@ -53,7 +53,8 @@
"pages/kefu",
"pages/qiye",
"pages/rule",
"pages/yuding"
"pages/yuding",
"pack/pack"
]
},
{
... ...
// pack-activity/pages/money.js
import util from '../../utils/util';
import App from '../../utils/api';
Page({
/**
* 页面的初始数据
*/
data: {
list:[],
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.GetUserCard()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
GetUserCard(){
App.Customer.GetUserCard().then(res=> {
this.setData({
list: res.data
})
})
},
})
\ No newline at end of file
... ...
{
"backgroundTextStyle":"light",
"navigationBarBackgroundColor": "#fff",
"navigationBarTextStyle":"black",
"usingComponents": {
"nav":"/components/nav/nav"
}
}
\ No newline at end of file
... ...
<!--pack-activity/pages/money.wxml-->
<wxs src="../../utils/util.wxs" module="util" />
<nav hasHome>我的余额</nav>
<view class="pages">
<view class="pages-view">
<view class="money-block">
<view class="money-views-top">
<view class="txt">我的余额</view>
</view>
<view class="money-views flex-bc">
<view class="money-number">{{user.price}}</view>
<view class="money-dw">元</view>
</view>
<navigator url="/pages/reserve/index" open-type="switchTab" hover-class="other-navigator-hover">
<view class="yuding flex-cc">
<view class="icon"></view>
去订包间
</view>
</navigator>
</view>
</view>
<view class="list-view" wx:if="{{list.length>0}}">
<view class="item" wx:for="{{list}}" wx:key="list">
<view class="flex-lr name">
<view>{{item.remark}}</view>
<view>{{item.type==1?'+':'-'}}{{item.consumeprice}}</view>
</view>
<view class="flex-lr date">
<view>{{util.unixtoTime(item.createtime,"MM-DD HH:II")}}</view>
<view>余额 {{item.currprice}}</view>
</view>
</view>
</view>
</view>
... ...
/* pack-activity/pages/money.wxss */
page{
background-color: #F5F5F5;
}
.pages{
/*background-image: url("http://nosqn.colorcun.com/activity/images/money-header.png");*/
background-image: url("http://nosqn.colorcun.com/activity/images/bg-black.png");
background-size: 100% auto;
background-repeat: no-repeat;
min-height: 500rpx;
padding-top: 80rpx;
}
.pages-view{
width: calc(100% - 40rpx);
margin-left: 20rpx;
height:340rpx;
background:#ffffff;
border-radius:20rpx;
box-sizing: border-box;
padding: 20rpx;
}
.money-block{
height:300rpx;
background:rgba(255,255,255,1);
border-radius:20rpx;
padding-top: 40rpx;
box-sizing: border-box;
}
.money-views-top{
width: 258rpx;
height: 40rpx;
font-size:28rpx;
margin-left: calc(50% - 126rpx);
text-align: center;
font-weight:500;
color:rgba(153,153,153,1);
line-height:40rpx;
position: relative;
}
.money-views-top:before{
position: absolute;
display: block;
content: "";
width: 100%;
height: 2rpx;
left:0;
top:19rpx;
background-color: #E0E0E0;
}
.money-views-top .txt{
width: 138rpx;
background-color: #ffffff;
left:60rpx;
position: absolute;
}
.money-views{
height:100rpx;
font-size:72rpx;
font-weight:600;
color:#353535;
line-height:100rpx;
margin-top: 10rpx;
}
.money-dw{
width:32rpx;
height:44rpx;
font-size:32rpx;
font-weight:600;
color:#353535;
line-height:44rpx;
margin-left: 20rpx;
}
.list-view{
width: calc(100% - 40rpx);
margin-left: 20rpx;
background:rgba(255,255,255,1);
border-radius:20rpx;
box-sizing: border-box;
padding: 2rpx 40rpx 0;
margin-top: 20rpx;
}
.item{
height: 166rpx;
box-sizing: border-box;
border-bottom: 2rpx solid #F5F5F5;
line-height: 166rpx;
padding-top: 40rpx;
}
.item:last-child{
border-bottom-width: 0;
}
.item .name{
height:44rpx;
font-size:32rpx;
font-weight:500;
color:rgba(53,53,53,1);
line-height:44rpx;
box-sizing: border-box;
}
.item .date{
height:34rpx;
font-size:24rpx;
font-weight:500;
color:rgba(153,153,153,1);
line-height:34rpx;
margin-top: 10rpx;
}
.yuding{
width:320rpx;
height:70rpx;
background:linear-gradient(360deg,rgba(192,163,105,1) 0%,rgba(252,210,167,1) 100%);
border-radius:35rpx;
font-size:32rpx;
font-family:PingFangSC-Semibold,PingFang SC;
font-weight:600;
color:rgba(123,81,42,1);
line-height:70rpx;
margin-left: calc(50% - 160rpx);
margin-top: 40rpx;
}
.yuding .icon{
background-size: 100% 100%;
width: 30rpx;
height: 30rpx;
background-image: url("http://nosqn.colorcun.com/activity/images/addr.png");
margin-right: 20rpx;
}
\ No newline at end of file
... ...
... ... @@ -11,17 +11,17 @@
</view>
</view>
<view class="pages">
<view class="block-rev money">
<navigator url="/pack-activity/pages/money">
<view class="flex-lr title">
<view class="flex-ll">
<view class="money-icon"></view>
<view class="money-title">我的余额</view>
</view>
<view class="flex-rr money-more">
<view>点击查看</view>
<view class="more"></view>
</view>
<view class="block-rev money flex-lr">
<navigator url="/pack-activity/pages/money" class="money-item">
<view class="flex-vc">
<view class="money-value">¥20</view>
<view class="money-title">余额</view>
</view>
</navigator>
<navigator url="/pack-activity/pack/pack" class="money-item">
<view class="flex-vc">
<view class="money-value">20</view>
<view class="money-title">红包</view>
</view>
</navigator>
</view>
... ...
... ... @@ -45,10 +45,7 @@ image{
border-radius:10rpx;
margin-bottom: 20rpx;
}
.block-rev.money{
height: 100rpx;
}
.block-rev .title{
box-sizing: border-box;
height: 100rpx;
... ... @@ -157,29 +154,32 @@ image{
background-image: url("http://nosqn.colorcun.com/custom/me/image/l2.png");
margin-right: 20rpx;
}
.money-icon{
background-size: 100% 100%;
width:120rpx;
height: 48rpx;
background-color: rgba(252,210,167,1);
margin-right: 20rpx;
border-radius:10rpx;
background-image: url("http://nosqn.colorcun.com/activity/images/Balance.png");
.block-rev.money{
height: 160rpx;
}
.money-title{
height:42rpx;
font-size:30rpx;
height:40rpx;
font-size:28rpx;
font-family:PingFangSC-Medium,PingFang SC;
font-weight:500;
color:rgba(53,53,53,1);
line-height:42rpx;
color:rgba(136,136,136,1);
line-height:40rpx;
}
.money-more{
height: 34rpx;
font-size:24rpx;
.money-value{
height:48rpx;
font-size:34rpx;
font-family:PingFangSC-Medium,PingFang SC;
font-weight:500;
color:rgba(53,53,53,1);
line-height:34rpx;
color:rgba(0,0,0,1);
line-height:48rpx;
}
.money-more .more{
margin-left: 20rpx;
.money-item{
width: 50%;
box-sizing: border-box;
height: 88rpx;
border-right: 2rpx solid #F5F5F5;
}
.money-item:last-child{
border-right-width: 0;
}
\ No newline at end of file
... ...
... ... @@ -479,4 +479,8 @@ export default {
'App.Customer.SetCardRel':{
openid:'openid',
},
//根据不同状态获取用户对应的卡券列表
'App.Customer.GetUserCard':{
openid:'openid',
},
}
\ No newline at end of file
... ...