Pārlūkot izejas kodu

[卡包使用规则,卡包]

tags/广东版3.2.1
meo pirms 6 gadiem
vecāks
revīzija
047b3aad59
13 mainītis faili ar 254 papildinājumiem un 140 dzēšanām
  1. +1
    -1
      app.json
  2. +63
    -30
      pages/ConsumeDetail/ConsumeDetail.js
  3. +23
    -0
      pages/ConsumeDetail/ConsumeDetail.wxml
  4. +16
    -3
      pages/ConsumeDetail/ConsumeDetail.wxss
  5. +1
    -2
      pages/cardorder/index/index.js
  6. +12
    -15
      pages/cardorder/index/index.wxml
  7. +55
    -32
      pages/cardorder/index/index.wxss
  8. +8
    -8
      pages/cardorder/userule/userule.wxml
  9. +4
    -4
      pages/coupon/detail/index.wxml
  10. +61
    -43
      pages/coupon/detail/index.wxss
  11. +3
    -0
      pages/discountCardList/discountCardList.wxss
  12. +1
    -1
      pages/passCar/choicecoupon/choicecoupon.js
  13. +6
    -1
      pages/specialcourtesy/specialcourtesy.wxss

+ 1
- 1
app.json Parādīt failu

@@ -1,6 +1,7 @@
{
"pages": [
"pages/index/index",
"pages/cardorder/index/index",
"pages/scanPay/scanPay",
"pages/edit/edit",
"pages/cartest/cartest",
@@ -14,7 +15,6 @@
"pages/rushToBuy/index",
"pages/couponorder/index/index",
"pages/couponorder/detail/index",
"pages/cardorder/index/index",
"pages/cardorder/detail/index",
"pages/cardorder/userule/userule",
"pages/order/detail/index",


+ 63
- 30
pages/ConsumeDetail/ConsumeDetail.js Parādīt failu

@@ -13,7 +13,7 @@ Page({
headbgUrl: imgurl.headbg.url,
quesBgUrl: imgurl.ques_bg.url,
dingdanUrl: imgurl.dingdan.url,
cardDetail:null,
cardDetail: null,
data: {
title: null
},
@@ -48,21 +48,45 @@ Page({
queueData: null,
zIndex: 11,
display: "none",
showbutton: false
showbutton: false,
hidden: "hidden",
height: "auto",
more: "点击查看更多",
showMore: true
},
phone: function (e) {
phone: function(e) {
let that = this;
wx.makePhoneCall({
phoneNumber: e.target.dataset.merchantlinkphone
});
},
// 点击查看更多
more: function() {
let that = this;

if (that.data.height == 'auto') {
this.setData({
hidden: "hidden",
height: "auto",
more: "点击查看更多",
showMore: true
})
} else {
this.setData({
hidden: "",
height: that.data.cardDetail.merchantVoList.length * 140 + 'rpx',
more: "",
showMore: false
})
}
},
onLoad(options) {
let that = this;
console.log(options.cardId)
that.cardpayList(options.cardId);
that.cardDetail(options.cardId);
},
cardpayList: function (cardId) {
cardpayList: function(cardId) {
let that = this;
wx.showLoading({
title: "加载中..."
@@ -82,8 +106,7 @@ Page({
that.setData({
showPage: true
})
} else {
}
} else {}
wx.hideLoading();
res.data.list.map(file => {
file.updateDate = util.formatTime(file.updateDate, "yyyy-MM-dd hh:mm:ss")
@@ -100,31 +123,41 @@ Page({
});
})
},
cardDetail: function (couponOrderId) {
cardDetail: function(couponOrderId) {
let that = this;
Http.get({
url: config.api.cardDetail,
data: {
couponOrderId: couponOrderId
}
})
.then(res => {
console.log(res)
if (res.code == 200) {
res.data.expiredTime = util.formatTime(res.data.expiredTime, "yyyy-MM-dd hh:mm:ss")
that.setData({
showPage: true,
cardDetail:res.data
})
}
})
.catch(err => {
console.log(err)
})
url: config.api.cardDetail,
data: {
couponOrderId: couponOrderId
}
})
.then(res => {
console.log(res)
if (res.code == 200) {
res.data.expiredTime = util.formatTime(res.data.expiredTime, "yyyy-MM-dd hh:mm:ss")
that.setData({
showPage: true,
cardDetail: res.data
})
if (that.data.cardDetail.merchantVoList && that.data.cardDetail.merchantVoList.length<=4){
that.setData({
height: that.data.cardDetail.merchantVoList.length * 140 + 'rpx'
})
} else if (that.data.cardDetail.merchantVoList && that.data.cardDetail.merchantVoList.length >= 4){
that.setData({
height: 4 * 140 + 'rpx'
})
}
}
})
.catch(err => {
console.log(err)
})
},
onShow() {
this.setData({
showbutton: false
})
},
});
let that = this;
that.setData({
showbutton: false
})
},
});

+ 23
- 0
pages/ConsumeDetail/ConsumeDetail.wxml Parādīt failu

@@ -1,4 +1,27 @@
<view wx:if="{{showPage}}" class='notes'>
<view class='head'>
<view class='titles' style='font-weight:bold;'>{{cardDetail.title}}</view>
<view class='titles clearfix'>
<text class='fl'>有效期:{{cardDetail.expiredTime}}</text>
<view class='fr'>余额:
<text>{{cardDetail.remainingAmount/100}}</text>元</view>
</view>
</view>
<text class='title'>适用门店</text>
<view class='posi' style='overflow:{{hidden}};height:{{height}}'>
<view class='posi_logo' wx:for="{{cardDetail.merchantVoList}}" wx:key="index">
<view>
<image src='{{item.merchantImgUrl}}'></image>
</view>
<view>
<text>{{item.merchantName}}</text>
<text>{{item.addr}}{{item.buildingName}}{{item.floorName}}</text>
</view>
<image bindtap='phone' data-merchantLinkPhone='{{item.merchantLinkPhone}}' class="tel" src="{{teljpgUrl}}" mode="widthFix" />
</view>
</view>
<view class='bottom' bindtap='more' wx:if="{{showMore}}">{{more}}</view>
<text class='title'>交易记录</text>
<view wx:for="{{data}}" wx:key="{{index}}" class='list'>
<view class='record clearfix record1'>
<text class='fl'>{{item.merchantName}}</text>


+ 16
- 3
pages/ConsumeDetail/ConsumeDetail.wxss Parādīt failu

@@ -27,6 +27,7 @@
}
.title {
display: block;
padding: 0 32rpx;
font-weight: bold;
font-size: 32rpx;
color: rgba(51, 51, 51, 1);
@@ -43,7 +44,7 @@

.posi {
position: relative;
width: 100%;
padding: 0 32rpx;
margin: 0 auto;
}

@@ -52,7 +53,6 @@
height: 87rpx;
display: flex;
justify-content: space-between;
border-top: 1px solid #f6f6f6;
line-height: 87rpx;
}

@@ -72,7 +72,6 @@
padding: 20rpx 0;
background: #fff;
height: 100rpx;
margin-bottom: 20rpx;
}

.posi_logo view:nth-child(1) {
@@ -121,6 +120,9 @@
.titles .fr {
color: red;
}
.titles .fr text{
font-size: 42rpx;
}

.notess view:nth-child(1) {
width: 92%;
@@ -167,6 +169,7 @@
color: #333;
letter-spacing: 0;
text-align: center;
padding: 30rpx 0;
}

.dingdan text:nth-of-type(2) {
@@ -182,4 +185,14 @@
width: 300rpx;
height: 300rpx;
margin: 0 auto 16rpx;
}
.head{
padding:32rpx 32rpx 0;
}
.bottom{
text-align: center;
height: 70rpx;
line-height: 70rpx;
color: #999;
font-size: 32rpx;
}

+ 1
- 2
pages/cardorder/index/index.js Parādīt failu

@@ -72,7 +72,6 @@ Page({
},
// 跳转到详情
gotoConsumeDetail: function(e) {
console.log(e.currentTarget.dataset.id)
wx.navigateTo({
url: `/pages/ConsumeDetail/ConsumeDetail?cardId=${e.currentTarget.dataset.id}`,
})
@@ -128,7 +127,7 @@ Page({
})
}
res.data.list.map(file => {
file.expiredTime = util.fmtDate(file.expiredTime);
file.expiredTime = util.formatTime(file.expiredTime, "yyyy.MM.dd")
if (file.couponOrderStatus == 5 || file.couponOrderStatus == 6 || file.couponOrderStatus == 7) {
file.background = 'rgba(179,180,181,1)';
file.showImg = true;


+ 12
- 15
pages/cardorder/index/index.wxml Parādīt failu

@@ -17,23 +17,20 @@
<view class='mms' style='background:{{item.background}}'>
<view class='detail_msg'>
<view class='info'>
<view data-id='{{item.id}}' bindtap='gotoConsumeDetail' data-id='{{item.id}}'>
<view class='title'>
<text>{{item.title}}</text>
<image class='fr' src='./../../../assets/images/icon01.png' mode="widthFix"></image>
</view>
<view class='expiretime'>
<view class='clearfix' data-id='{{item.id}}' bindtap='gotoConsumeDetail' data-id='{{item.id}}'>
<view class='title fl'>
<text class='yue'><text class='yu'>余</text>{{item.remainingAmount/100}}<text class='yu'>元</text></text>
<text class="txt2">{{item.expiredTime}}到期</text>
<text class='txt2 fr'>余额<text class='money'>{{item.remainingAmount/100}}</text>元</text>
</view>
<view class='expiretime fr'>
<text>{{item.title}}</text>
</view>
</view>
<view hover-class='active' bindtap='gotoPay' data-remainingAmount="{{item.remainingAmount/100}}" data-cardId="{{item.id}}" data-couponorderstatus="{{item.couponOrderStatus}}" wx:if="{{item.couponOrderStatus==4}}" class="btns">扫一扫付款</view>
<view hover-class='active' wx:if="{{item.couponOrderStatus!=4}}" class="btns clearfix">
<text class='txtstatus fl' wx:if="{{item.couponOrderStatus == 5}}">已过期</text>
<text class='txtstatus fl' wx:if="{{item.couponOrderStatus == 6}}">余额已用完</text>
<text class='txtstatus fl' wx:if="{{item.couponOrderStatus == 7}}">已线下退款</text>
<button class='buyagain fr' bindtap='gotoBuy'>再次购买</button>
</view>
<view hover-class='active' bindtap='gotoPay' data-remainingAmount="{{item.remainingAmount/100}}" data-cardId="{{item.id}}" data-couponorderstatus="{{item.couponOrderStatus}}" wx:if="{{item.couponOrderStatus==4}}" class="btns" style='color:{{item.background}}!important'>扫一扫付款</view>
<view hover-class='active' bindtap='gotoBuy' wx:if="{{item.couponOrderStatus!=4}}" style='color:rgba(179,180,181,1);' class="btns clearfix">再次购买</view>
<text class='txtstatus' wx:if="{{item.couponOrderStatus == 5}}">已过期</text>
<text class='txtstatus' wx:if="{{item.couponOrderStatus == 6}}">余额已用完</text>
<text class='txtstatus' wx:if="{{item.couponOrderStatus == 7}}">已线下退款</text>
</view>
<view class='imgicon' wx:if="{{item.showImg}}">
<image src='./../../../assets/images/shixiao.png' mode='widthFix'></image>
@@ -41,7 +38,7 @@
</view>
</view>
</view>
<view class='userule' bindtap='userule'>适用规则</view>
<view class='userule' bindtap='userule' wx:if="{{list.length>0}}">使用规则</view>
<view class="loading" wx:if="{{loading}}">
<image src="{{loadingUrl}}" mode="widthFix"></image>{{content}}
</view>


+ 55
- 32
pages/cardorder/index/index.wxss Parādīt failu

@@ -28,26 +28,33 @@
position: relative;
width: 690rpx;
background: #fff;
padding: 36rpx 0 0;
height: 238rpx;
margin: 0 auto 40rpx;
border-radius: 16rpx;
box-shadow: 0 6px 20px 0 rgba(0, 0, 0, 0.10);
}

.yu {
display: inline-block !important;
font-size: 30rpx;
}

.expiretime {
display: block;
width: 100% !important;
text-align: left;
text-indent: 1em;
height: 40rpx;
line-height: 36rpx;
font-size: 22rpx;
color: #333;
letter-spacing: 0;
width: 250rpx;
}

.expiretime .fr {
margin-right: 20rpx;
.expiretime text {
display: block;
width: 262rpx;
font-size: 30rpx;
font-family: PingFang-SC-Medium;
font-weight: 500;
white-space: nowrap;
text-align: center;
text-overflow: ellipsis;
overflow: hidden;
margin-top: 35rpx;
color: rgba(255, 255, 255, 1);
}

.money {
@@ -76,20 +83,14 @@
border-radius: 50%;
}

.info >view view:nth-child(1) {
display: flex;
justify-content: space-between;
padding: 0 2%;
}

.info {
width: 100%;
}

.info >view view:nth-child(1) text {
font-size: 32rpx;
line-height: 32rpx;
height: 32rpx;
.info .title .yue {
font-size: 60rpx;
line-height: 60rpx;
font-weight: bold;
color: #fff;
letter-spacing: 0;
width: 400rpx;
@@ -98,6 +99,8 @@
text-overflow: ellipsis;
overflow: hidden;
margin-bottom: 10rpx;
margin-top: 38rpx;
text-align: left;
}

.info >view view:nth-child(2) {
@@ -109,17 +112,21 @@
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
width: 400rpx;
margin-right: 25rpx;
}

.btns {
height: 80rpx;
line-height: 80rpx;
position: absolute;
right: 30rpx;
bottom: 53rpx;
text-align: center;
color: #fff;
font-size: 28rpx;
margin-top: 46rpx;
border-top: 1px solid #e6e6e6;
width: 250rpx !important;
height: 61rpx;
line-height: 61rpx;
background: rgba(255, 255, 255, 1);
border-radius: 30rpx;
margin-top: 32rpx !important;
}

.active {
@@ -200,17 +207,26 @@
line-height: 32px;
}

.title .fr {
width: 30rpx;
margin-right: 10rpx;
.title {
width: 50%;
}

.title text {
display: block;
color: #fff;
font-size: 24rpx;
margin-left: 25rpx;
text-align: left;
}
.txt2{
opacity:0.5;
}
.imgicon {
position: absolute;
width: 140rpx;
height: 100rpx;
z-index: 100;
right: 191rpx;
right: 257rpx;
top: 0;
}

@@ -245,4 +261,11 @@
line-height: 44rpx;
margin-top: 30rpx;
padding-bottom: 30rpx;
background: #fff;
}
.yue text:nth-of-type(1){
margin-right: 6rpx;
}
.yue text:nth-of-type(2){
margin-left: 6rpx;
}

+ 8
- 8
pages/cardorder/userule/userule.wxml Parādīt failu

@@ -1,31 +1,31 @@
<view class="lists">
<view class="list">
<view class="title">
1、如何使用xx卡?
1、如何使用消费卡?
</view>
<view class="content">
在门店消费后结算时,打开xx小程序,选择“我的”-“卡包”,选择扣款的消费卡,点击卡面上的”付款“,扫描
在门店消费后结算时,打开小程序,选择“我的”-“卡包”,选择扣款的消费卡,点击卡面上的”付款“,扫描
</view>
</view>
<view class="list">
<view class="title">
2、xx卡内余额不够支付最后一次消费额时怎么办?
2、消费卡内余额不够支付最后一次消费额时怎么办?
</view>
<view class="content">
建议部分消费额用xx卡支付,部分消费额用微信、支付宝、刷卡或现金支付。
建议部分消费额用消费卡支付,部分消费额用微信、支付宝、刷卡或现金支付。
</view>
</view>
<view class="list">
<view class="title">
3、购买xx卡后,是否能退?
3、购买消费卡后,是否能退?
</view>
<view class="content">
xx卡一经出售,即完成开卡,不能退款。
消费卡一经出售,即完成开卡,不能退款。
</view>
</view>
<view class="list">
<view class="title">
4、xx卡会过期吗?
4、消费卡会过期吗?
</view>
<view class="content">
会过期。请在卡面有效期内将面额使用完毕。
@@ -36,7 +36,7 @@
5、注意事项
</view>
<view class="content">
在法律允许的范围内,XX商场保留对上述规则的解释权。 更多详情可至xx商场服务台咨询。
在法律允许的范围内,商场保留对上述规则的解释权。 更多详情可至商场服务台咨询。
</view>
</view>
</view>

+ 4
- 4
pages/coupon/detail/index.wxml Parādīt failu

@@ -42,24 +42,24 @@
</view>
<view class='rest' wx:if="{{data.validType==2}}">有效期:自领取之日起
<text class='time'>{{validDays}}</text>天内有效</view>
<view class='rest' wx:if="{{data.validType==1}}">有效期
<view class='rest' wx:if="{{data.validType==1}}">有效期:
<text class='time'>{{validStartDate}}至{{validEndDate}}</text>
</view>
<view class='rest' wx:if="{{data.type==5}}">
<text class='time'>当次有效</text>
</view>
<view class='rest' wx:if="{{data.type==1}}">
<text class='txt01'>使用条件</text>
<text class='txt01'>使用条件:</text>
<text class='time'>满{{data.usePriceStr}}元可用</text>
</view>
<view class='rest'>
<text class='txt01'>限购条件</text>
<text class='txt01'>限购条件:</text>
<text class='time'>每人{{data.useLimitQuantity}}张</text>
</view>
</view>
</view>
<view class='posi'>
<view class='applyshop'>适用门店</view>
<view class='applyshop'>适用门店</view>
<view class='posi_logo' wx:for="{{data.merchantVoList}}" wx:key="index">
<view>
<image src='{{item.merchantImgUrl}}'></image>


+ 61
- 43
pages/coupon/detail/index.wxss Parādīt failu

@@ -150,8 +150,6 @@ page {
margin-left: 10rpx;
}



.fl {
float: left;
}
@@ -165,6 +163,7 @@ page {
width: 92%;
margin: 0 auto;
}

.posi>view:nth-child(2) {
width: 100%;
height: 87rpx;
@@ -229,11 +228,15 @@ page {
}

.notes view:nth-child(1) {
width: 92%;
height: 87rpx;
padding: 0 4%;
line-height: 87rpx;
background: #fff;
border-top: 1px solid #f9f9f9;
}

.notes {
width: 92%;
margin: 0 auto;
}

.active {
@@ -241,14 +244,14 @@ page {
}

.notes view:nth-child(1) text {
font-size: 24rpx;
color: #333;
letter-spacing: 0;
font-size: 30rpx;
height: 70rpx;
line-height: 70rpx;
}

.notes view:nth-child(2) {
width: 92%;
padding: 0 4%;
background: #fff;
display: flex;
flex-direction: column;
@@ -295,24 +298,28 @@ page {
.txt {
margin-right: 30rpx;
}
.distance{

.distance {
border: none;
border-radius:16rpx;
border-radius: 16rpx;
width: 600rpx;
padding: 16rpx 6rpx 0 0;
padding: 16rpx 6rpx 0 0;
}
.distance .txt01{

.distance .txt01 {
display: block;
font-size: 26rpx;
color: #ff4949;
}
.clock{
width: 116rpx!important;

.clock {
width: 116rpx !important;
vertical-align: middle;
margin-right: 10rpx;
margin-top: -4rpx;
}
.qiang{

.qiang {
position: inline-block;
width: 60rpx;
height: 40rpx;
@@ -322,14 +329,16 @@ page {
font-size: 28rpx;
margin-right: 10rpx;
}
.times{

.times {
display: inline-block;
color: #ff4949;
font-weight:bold;
color: #ff4949;
font-weight: bold;
font-size: 26rpx;
text-align:center;
text-align: center;
}
.times text{

.times text {
display: inline-block;
margin: 6rpx;
width: 46rpx;
@@ -337,10 +346,10 @@ page {
text-align: center;
font-size: 28rpx;
line-height: 60rpx;
border-radius:12rpx;
border-radius: 12rpx;
color: #fff;
font-weight:bold;
background: #ff4949;
font-weight: bold;
background: #ff4949;
}

.b1 {
@@ -364,7 +373,7 @@ page {
width: 587rpx;
}

.con .image{
.con .image {
display: block;
width: 100%;
}
@@ -372,6 +381,7 @@ page {
.img {
margin-top: -50rpx;
}

.question {
display: block;
width: 587rpx;
@@ -398,55 +408,63 @@ page {
text-align: center;
height: 50rpx;
margin: 0 auto;
padding-top:10rpx;
padding-bottom:20rpx;
padding-top: 10rpx;
padding-bottom: 20rpx;
font-size: 32rpx;
font-weight: bold;
line-height: 41rpx;
border-bottom: 1rpx solid #eee;
}
.quessss >view:last-child{
border-bottom:0;

.quessss >view:last-child {
border-bottom: 0;
}
.close{

.close {
position: relative;
z-index: 10000;
display: block;
width: 70rpx;
}
.ques_gou{

.ques_gou {
position: absolute;
width: 20rpx;
top: 160rpx;
left: 23rpx;
}
.btns{

.btns {
color: #f8755b;
font-weight: bold;
font-size: 30rpx!important;
text-align: center!important;
font-weight: bold;
font-size: 30rpx !important;
text-align: center !important;
}
.radios{

.radios {
display: block;
font-size:28rpx;
font-size: 28rpx;
height: 95rpx;
line-height: 95rpx;
color: #333;
text-indent: .5em;
text-indent: 0.5em;
}
.elecard{

.elecard {
display: inline-block;
margin-left: 6rpx;
color: #00c0ff;
border: 1px solid #00c0ff;
border-radius:8rpx;
font-style: normal;
border-radius: 8rpx;
font-style: normal;
font-size: 30rpx;
line-height: 40rpx;
padding: 0 6rpx;
}
.applyshop{

.applyshop {
font-size: 30rpx;
height:70rpx;
line-height:70rpx;
}
height: 70rpx;
line-height: 70rpx;
color: #333;
}

+ 3
- 0
pages/discountCardList/discountCardList.wxss Parādīt failu

@@ -1,3 +1,6 @@
page{
height: auto!important;
}
.header image{
width: 100%;
}


+ 1
- 1
pages/passCar/choicecoupon/choicecoupon.js Parādīt failu

@@ -47,7 +47,7 @@ Page({
var that = this;
if (that.data.allow_load) {
Http.get({
url: config.api.couponOrderList + "?type=5",
url: config.api.couponOrderCarList,
data: {
pageNum: pageNum,
pageSize: 20,


+ 6
- 1
pages/specialcourtesy/specialcourtesy.wxss Parādīt failu

@@ -43,7 +43,12 @@ Page{
.tit{
font-size:36rpx;
color:rgba(51,51,51,1);
margin-top: -40rpx;
margin: -40rpx auto 0;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
width:280rpx;
text-align: center;
}
.cardtype{
position: absolute;


Notiek ielāde…
Atcelt
Saglabāt