Commit 426e029f0e03babdb5de5b07c4416450d4cd5d54

Authored by vking
1 parent 279a8bd6

商家红包活动

... ... @@ -54,7 +54,8 @@
"pages/qiye",
"pages/rule",
"pages/yuding",
"pack/pack"
"pack/pack",
"pack/list"
]
},
{
... ...
... ... @@ -5,6 +5,7 @@ Component({
*/
properties: {
quan:Object,
cla:String,
},
/**
... ...
<!--components/reserve/seller/quan.wxml-->
<wxs src="../../../utils/util.wxs" module="util" />
<view class="quan flex-lr">
<view class="quan flex-lr {{cla}}">
<view class="money flex-ll" style="align-items: flex-end">
<view class="dot">¥</view>
<view class="number">{{util.toFixed(quan.price,0)}}</view>
... ...
... ... @@ -6,6 +6,7 @@
background:rgba(255,239,223,1);
box-sizing: border-box;
padding: 36rpx;
padding-right: 22rpx;
border-radius:10rpx 10rpx 0rpx 0rpx;
border-right: 14rpx solid #fefefe;
position: relative;
... ... @@ -20,6 +21,7 @@
height: 170rpx;
content: "";
}
.dot{
width:22rpx;
height:50rpx;
... ... @@ -63,3 +65,23 @@
line-height:32rpx;
margin-top: 10rpx;
}
.quan-pt{
background:rgba(255,227,227,1);
}
.quan-pt:after{
background-image: url("http://nosqn.colorcun.com/sellerbaobao/rs2.png");
}
.quan-pt .dot,.quan-pt .number{
color:rgba(204,17,17,1);
}
.quan-pt .line{
border-right-color:#BB5032;
}
.quan-pt .card_title,.quan-pt .card-date{
color:rgba(187,80,50,1);
}
.quan.bg-f5f5f5{
border-right: 14rpx solid #f5f5f5;
}
\ No newline at end of file
... ...
// 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({
status:0,
}).then(res=> {
this.setData({
list: res.data
})
})
},
useCard(e){
let sid=util.attr(e,'sid')
if(sid>0) {
wx.navigateTo({
url: '/pages/reserve/detail?id=' + sid + '&activeTab=reserve'
})
}else{
//lat=39.62420161&lng=118.1174469&multiIndex=0&centre_pos=39.62420161,118.1174469&hasSuggestion=
wx.navigateTo({
url: util.http_build_query({
lat:34.216529,
lng:108.894677,
centre_pos:'34.216529,108.894677',
keyword:' ',
isopen_md:1,
multiIndex:0,
},'/pages/reserve/indexList'),
})
}
},
})
\ No newline at end of file
... ...
{
"backgroundTextStyle":"light",
"navigationBarBackgroundColor": "#fff",
"navigationBarTextStyle":"black",
"usingComponents": {
"nav":"/components/nav/nav",
"quan":"/components/reserve/seller/quan"
}
}
\ No newline at end of file
... ...
<!--pack-activity/pages/money.wxml-->
<wxs src="../../utils/util.wxs" module="util" />
<nav hasHome>我的红包</nav>
<view class="tabs flex-lr">
<view class="tabs-item flex-vc active">
<view class="tabs-txt">已使用</view>
</view>
<view class="tabs-item flex-vc">
<view class="tabs-txt">已失效</view>
</view>
</view>
<view class="pages" wx:if="{{list.length>0}}">
<view class="list-view list-view-{{item.sid}}" wx:for="{{list}}" wx:key="list">
<view class="quan" wx:for="{{item.card_list}}" wx:key="card_list" wx:for-item="quan">
<quan quan="{{quan}}" cla="{{item.sid==0?'quan-pt bg-f5f5f5':''}}">
<view class="button-use" bindtap="useCard" data-sid="{{item.sid}}">立即使用</view>
</quan>
<view class="quan-tips pingtai" wx:if="{{item.sid==0}}">适用于平台所有商家,预订包间、在线买单时使用</view>
<view class="quan-tips" wx:else="">仅可在“{{seller.sellername}}”预订包间、在线买单时使用</view>
</view>
</view>
</view>
<view class="flex-vc" wx:else="">
<view class="empty-img"></view>
<view class="empty-txt">哎呀一个红包都没有呢</view>
</view>
... ...
/* pack-activity/pages/money.wxss */
.list-view{
width: calc(100% - 40rpx);
margin-left: 20rpx;
background:rgba(255,255,255,1);
border-radius:20rpx;
box-sizing: border-box;
padding: 20rpx 20rpx 40rpx;
margin-bottom: 20rpx;
}
.list-view-0{
background: none;
margin-top: 0rpx;
padding-bottom: 20rpx;
}
.sellername{
height:40rpx;
font-size:28rpx;
font-family:PingFangSC-Regular,PingFang SC;
font-weight:400;
color:rgba(53,53,53,1);
line-height:40rpx;
}
.more{
margin-left: 10rpx;
}
.quan{
margin-top: 20rpx;
}
.quan-tips{
height:50rpx;
background:rgba(245,245,245,1);
border-radius:0rpx 0rpx 10rpx 10rpx;
font-size:22rpx;
font-family:PingFangSC-Regular,PingFang SC;
font-weight:400;
color:rgba(136,136,136,1);
line-height:50rpx;
padding-left: 36rpx;
width: 100%;
box-sizing: border-box;
}
.pingtai{
background:rgba(255,255,255,1);
color:rgba(136,136,136,1);
}
.button-use{
width:120rpx;
height:44rpx;
background:linear-gradient(180deg,rgba(231,66,88,1) 0%,rgba(243,53,78,1) 100%);
border-radius:6rpx;
font-size:24rpx;
font-family:PingFangSC-Medium,PingFang SC;
font-weight:500;
color:rgba(255,227,192,1);
line-height:44rpx;
text-align: center;
}
.empty-img{
background-image: url("http://nosqn.colorcun.com/sellerbaobao/empty.png");
background-size: 100% 100%;
width:302rpx;
height:408rpx;
margin-top: 300rpx;
}
.empty-txt{
height:44rpx;
font-size:32rpx;
font-family:PingFangSC-Regular,PingFang SC;
font-weight:400;
color:rgba(53,53,53,1);
line-height:44rpx;
margin-top: 40rpx;
}
.tabs{
height: 80rpx;
line-height: 80rpx;
border-bottom: 2rpx solid #F5F5F5;
box-sizing: border-box;
width: 100%;
}
.tabs-item{
width: 50%;
height: 80rpx;
}
.tabs-txt{
height: 80rpx;
width: 120rpx;
box-sizing: border-box;
text-align: center;
}
.active .tabs-txt{
border-bottom: 4rpx solid #C0A369;
}
\ No newline at end of file
... ...
... ... @@ -59,10 +59,32 @@ Page({
},
GetUserCard(){
App.Customer.GetUserCard().then(res=> {
App.Customer.GetUserCard({
status:0,
}).then(res=> {
this.setData({
list: res.data
})
})
},
useCard(e){
let sid=util.attr(e,'sid')
if(sid>0) {
wx.navigateTo({
url: '/pages/reserve/detail?id=' + sid + '&activeTab=reserve'
})
}else{
//lat=39.62420161&lng=118.1174469&multiIndex=0&centre_pos=39.62420161,118.1174469&hasSuggestion=
wx.navigateTo({
url: util.http_build_query({
lat:34.216529,
lng:108.894677,
centre_pos:'34.216529,108.894677',
keyword:' ',
isopen_md:1,
multiIndex:0,
},'/pages/reserve/indexList'),
})
}
},
})
\ No newline at end of file
... ...
... ... @@ -3,6 +3,7 @@
"navigationBarBackgroundColor": "#fff",
"navigationBarTextStyle":"black",
"usingComponents": {
"nav":"/components/nav/nav"
"nav":"/components/nav/nav",
"quan":"/components/reserve/seller/quan"
}
}
\ 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>
去订包间
<nav hasHome>我的红包</nav>
<view class="pages" wx:if="{{list.length>0}}">
<view class="list-view list-view-{{item.sid}}" wx:for="{{list}}" wx:key="list">
<navigator url="/pages/reserve/detail?id={{item.sid}}" hover-class="navigator-hover" wx:if="{{item.sid>0}}">
<view class="sellername flex-lr">
<view>{{item.sellername}}</view>
<view class="flex-rr">
点击进店
<view class="more"></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>
</navigator>
<view class="quan" wx:for="{{item.card_list}}" wx:key="card_list" wx:for-item="quan">
<quan quan="{{quan}}" cla="{{item.sid==0?'quan-pt bg-f5f5f5':''}}">
<view class="button-use" bindtap="useCard" data-sid="{{item.sid}}">立即使用</view>
</quan>
<view class="quan-tips pingtai" wx:if="{{item.sid==0}}">适用于平台所有商家,预订包间、在线买单时使用</view>
<view class="quan-tips" wx:else="">仅可在“{{seller.sellername}}”预订包间、在线买单时使用</view>
</view>
</view>
</view>
<view class="flex-vc" wx:else="">
<view class="empty-img"></view>
<view class="empty-txt">哎呀一个红包都没有呢</view>
</view>
<navigator url="./list" hover-class="navigator-hover">
<view class="more-link flex-cc">
<view>查看红包历史记录</view>
<view class="more"></view>
</view>
</navigator>
... ...
... ... @@ -3,127 +3,97 @@ 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;
padding-bottom: 150rpx;
}
.pages-view{
.list-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;
padding: 20rpx 20rpx 40rpx;
margin-bottom: 20rpx;
}
.list-view-0{
background: none;
margin-top: 0rpx;
padding-bottom: 20rpx;
}
.money-views-top{
width: 258rpx;
height: 40rpx;
.sellername{
height:40rpx;
font-size:28rpx;
margin-left: calc(50% - 126rpx);
text-align: center;
font-weight:500;
color:rgba(153,153,153,1);
font-family:PingFangSC-Regular,PingFang SC;
font-weight:400;
color:rgba(53,53,53,1);
line-height:40rpx;
position: relative;
}
.money-views-top:before{
position: absolute;
display: block;
content: "";
.more{
margin-left: 10rpx;
}
.quan{
margin-top: 20rpx;
}
.quan-tips{
height:50rpx;
background:rgba(245,245,245,1);
border-radius:0rpx 0rpx 10rpx 10rpx;
font-size:22rpx;
font-family:PingFangSC-Regular,PingFang SC;
font-weight:400;
color:rgba(136,136,136,1);
line-height:50rpx;
padding-left: 36rpx;
width: 100%;
height: 2rpx;
left:0;
top:19rpx;
background-color: #E0E0E0;
box-sizing: border-box;
}
.money-views-top .txt{
width: 138rpx;
background-color: #ffffff;
left:60rpx;
position: absolute;
.pingtai{
background:rgba(255,255,255,1);
color:rgba(136,136,136,1);
}
.money-views{
height:100rpx;
font-size:72rpx;
font-weight:600;
color:#353535;
line-height:100rpx;
margin-top: 10rpx;
}
.money-dw{
width:32rpx;
.button-use{
width:120rpx;
height:44rpx;
font-size:32rpx;
font-weight:600;
color:#353535;
background:linear-gradient(180deg,rgba(231,66,88,1) 0%,rgba(243,53,78,1) 100%);
border-radius:6rpx;
font-size:24rpx;
font-family:PingFangSC-Medium,PingFang SC;
font-weight:500;
color:rgba(255,227,192,1);
line-height:44rpx;
margin-left: 20rpx;
text-align: center;
}
.list-view{
width: calc(100% - 40rpx);
margin-left: 20rpx;
.more-link{
height:120rpx;
background:rgba(255,255,255,1);
border-radius:20rpx;
box-sizing: border-box;
padding: 2rpx 40rpx 0;
margin-top: 20rpx;
box-shadow:0rpx -4rpx 10rpx 0rpx rgba(219,219,219,1);
position: fixed;
bottom:0;
left:0;
width: 100%;
line-height: 120rpx;
font-size:30rpx;
font-family:PingFangSC-Regular,PingFang SC;
font-weight:400;
color:rgba(153,153,153,1);
}
.item{
height: 166rpx;
box-sizing: border-box;
border-bottom: 2rpx solid #F5F5F5;
line-height: 166rpx;
padding-top: 40rpx;
.more-link .more{
margin-left: 20rpx;
}
.item:last-child{
border-bottom-width: 0;
.empty-img{
background-image: url("http://nosqn.colorcun.com/sellerbaobao/empty.png");
background-size: 100% 100%;
width:302rpx;
height:408rpx;
margin-top: 300rpx;
}
.item .name{
.empty-txt{
height:44rpx;
font-size:32rpx;
font-weight:500;
font-family:PingFangSC-Regular,PingFang SC;
font-weight:400;
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
... ...
... ... @@ -128,6 +128,12 @@ Page({
if(mapParam.lat){
this.param.centre_pos=`${mapParam.lat},${mapParam.lng}`
}
if(this.param.keyword=" "){
delete this.param.keyword
}
if(mapParam.isopen_md){
this.param.isopen_md=1
}
}else{
//计算视窗中心
let map=JSON.parse(mapParam.map);
... ...
... ... @@ -660,6 +660,19 @@
"pathName": "pack-book/pages/checkout/invoice",
"query": "rid=62346",
"scene": null
},
{
"id": -1,
"name": "pack-activity/pack/pack",
"pathName": "pack-activity/pack/pack",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pack-activity/pack/list",
"pathName": "pack-activity/pack/list",
"scene": null
}
]
}
... ...