优惠券列表样式

This commit is contained in:
高健 2021-08-05 14:34:05 +08:00
parent 91149f4224
commit 740b45d2a3
3 changed files with 65 additions and 47 deletions

View File

@ -83,11 +83,9 @@ Page({
},
doSaveUserInfo() {
try {
console.log('保存')
var names = wx.getStorageSync('name')
var icon = wx.getStorageSync('userIcon')
var _self = this
console.log(names)
if (names) {
app.http.put(app.urls.doSaveUserInfo, {
header: {
@ -99,7 +97,6 @@ Page({
}
})
.then(res => {
console.log(res)
})
.catch(err => {
console.log(err)
@ -111,7 +108,6 @@ Page({
},
//获取首页展示的栏目
getMainColumn(id) {
console.log(id)
var _self = this
_self.setData({
dataList: []
@ -359,7 +355,6 @@ Page({
const ix = e.currentTarget.dataset.i
const a = e.currentTarget.dataset.a
var audio = e.currentTarget.dataset.item
console.log(_self.data.isPlayAudio)
if (_self.data.isPlayAudio) {
//有播放的
//先需要停止其他录音文件的播放
@ -418,7 +413,6 @@ Page({
innerAudioContext.onCanplay((res) => {})
innerAudioContext.onStop((res) => {
console.log('onStop===')
_self.data.dataList[index].list[idx].list[ix].valueList[a].isPlay = false
_self.data.dataList[index].list[idx].list[ix].valueList[a].curDuration = 0
_self.data.dataList[index].list[idx].list[ix].valueList[a].curDurationStr = '00:00'
@ -428,8 +422,6 @@ Page({
})
})
innerAudioContext.onEnded((res) => {
console.log(res)
console.log('播放完毕')
_self.data.dataList[index].list[idx].list[ix].valueList[a].isPlay = false
_self.data.dataList[index].list[idx].list[ix].valueList[a].curDuration = 0
_self.data.dataList[index].list[idx].list[ix].valueList[a].curDurationStr = '00:00'
@ -439,8 +431,6 @@ Page({
})
})
innerAudioContext.onError((res) => {
console.log('播放错误')
console.log(res)
_self.data.dataList[index].list[idx].list[ix].valueList[a].isPlay = false
_self.data.dataList[index].list[idx].list[ix].valueList[a].curDuration = 0
_self.data.dataList[index].list[idx].list[ix].valueList[a].curDurationStr = '00:00'
@ -457,8 +447,11 @@ Page({
// 跳转模板列表
goList: function () {
wx.navigateTo({
url: '/packagecard/cardList/cardList',
url: '/pages/mine/shop/mineshop',
})
// wx.navigateTo({
// url: '/packagecard/cardList/cardList',
// })
},
// 获取个人简介
getPersonIntro: function () {
@ -595,7 +588,6 @@ Page({
cardTemplateUseTop: ""
}
}).then(res => {
console.log(res.data)
wx.showToast({
title: '加入卡包成功!',
})
@ -802,7 +794,6 @@ Page({
wx.showShareMenu({
withShareTicket: true,
success: function (res) {
console.log(res)
}
})
@ -931,7 +922,6 @@ Page({
cardTemplateDispatchId: self.data.cardTemplateDispatchId
}
}).then(res => {
console.log(res)
}).catch(res => {
console.log(res)
})

View File

@ -5,28 +5,29 @@
refresher-background="#fff" bindrefresherrefresh="dorefresh" refresher-triggered="{{isRefreshing}}">
<view class="cu-list" wx:if="{{couponList.length>0}}">
<view class="cu-item" wx:for="{{couponList}}" wx:key="index">
<view style="display: flex;margin: 10rpx;">
<view style="display: flex;margin: 5rpx 20rpx;">
<view class="left-box">
<view>
{{item.couponName}}
</view>
<view wx:if="{{item.expiringDate=='0'}}">
<!-- 开始时间结束时间 -->
</view>
<view wx:elif="{{item.expiringDate=='1'}}">
领取当日{{item.expiringDays}}天内有效
</view>
<view wx:else>
领取次日{{item.expiringDays}}天内有效
</view>
<view style="display: flex;align-items: center;">
<!-- 可用商品 -->
<view wx:if="{{item.useCommodity=='0'}}">
<view wx:if="{{item.useCommodity=='0'}}" class="coupon-type-yellow">
<!-- 无限制 -->
全部商品
</view>
<view wx:else>
<view wx:else class="coupon-type-blue">
限品类
</view>
<text class="coupon-name"> {{item.couponName}}</text>
</view>
<view wx:if="{{item.expiringDate=='0'}}" class="coupon-desc">
<!-- 开始时间结束时间 -->
{{item.startDate+'-'+item.endDate}}
</view>
<view wx:elif="{{item.expiringDate=='1'}}" class="coupon-desc">
领取当日{{item.expiringDays}}天内有效
</view>
<view wx:else class="coupon-desc">
领取次日{{item.expiringDays}}天内有效
</view>
</view>
<view class="right-box bg-yellow-yellow">
<view>
@ -46,7 +47,7 @@
<view class="btn-box">
<view class="btn bg-red radius" bindtap="doDelOne" data-item="{{item}}">删除</view>
<view class="btn bg-yellow-light-1 radius margin-left-sm" bindtap="doRecoverOne" data-item="{{item}}">恢复
<view class="btn bg-yellow-light-1 radius margin-left-sm" bindtap="doRecoverOne" data-item="{{item}}">编辑
</view>
</view>
</view>

View File

@ -6,28 +6,14 @@ page {
.right-box {
width: 100%;
position: relative;
min-height: 200rpx;
min-height: 140rpx;
flex: 3;
display: flex;
align-items: center;
justify-content: center;
border-radius: 15rpx 10rpx 10rpx 15rpx;
flex-direction: column;
}
.price {
color: #ffffff;
font-size: 54rpx;
}
.price-icon {
color: #ffffff;
font-size: 28rpx;
}
.price-term {
font-size: 20rpx;
color: #ffffff;
padding: 10rpx;
}
.left-box {
@ -36,21 +22,62 @@ page {
background: #ffffff;
position: relative;
border-radius: 10rpx 15rpx 15rpx 10rpx;
min-height: 200rpx;
min-height: 140rpx;
display: flex;
align-items: flex-start;
flex-direction: column;
justify-content: center;
padding: 5rpx 15rpx;
}
.price {
color: #ffffff;
font-size: 48rpx;
}
.price-icon {
color: #ffffff;
font-size: 28rpx;
}
.price-term {
font-size: 24rpx;
color: #ffffff;
}
.btn-box {
width: 100%;
display: flex;
flex-direction: row;
justify-content: flex-end;
padding: 10rpx;
padding: 10rpx 20rpx;
}
.btn {
padding: 10rpx 40rpx;
}
.coupon-name{
font-size: 32rpx;
font-weight: bold;
color: black;
}
.coupon-desc{
font-size: 24rpx;
color: #797979;
}
.coupon-type-yellow{
font-size: 24rpx;
color: #ffffff;
background: #ff9800;
padding: 0rpx 10rpx;
border-radius: 5rpx;
}
.coupon-type-blue{
font-size: 24rpx;
color: #ffffff;
background: #0471ff;
padding: 0rpx 10rpx;
border-radius: 5rpx;
}