smartswrtch-app/page_geren/buyCard.vue

359 lines
7.8 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<view class="page">
<u-navbar title="会员卡列表" :border-bottom="false" :background="bgc" title-color='#000' title-size='36'
height='45'></u-navbar>
<view class="cont">
<view class="card2" v-for="(item,index) in 3" :key="index">
<view class="card3" style="margin-top: 20rpx;" @click="btnxq">
<view class="" style="font-size: 34rpx;font-weight: 600;">
会员卡名称
</view>
<view class="top">
<view class="tit1">
20天30次
</view>
<view class="tit2">
30<span style="font-size: 28rpx;"></span>
</view>
</view>
<view class="middle">
<view class="tit3" >
8天最多用20次
</view>
<view class="tit4">
原价40
</view>
</view>
<view class="bot">
<view class="bot_left">
<view class="txt3">
每次享折扣7折
</view>
</view>
</view>
</view>
</view>
</view>
<view class="anniu" @click="btnadd">
新增会员卡
</view>
</view>
</template>
<script>
export default {
data() {
return {
bgc: {
backgroundColor: '#fff'
},
}
},
onShow() {
},
methods: {
// 点击新建会员卡
btnadd(){
uni.navigateTo({
url:'/page_geren/addhuiyuan'
})
},
// 点击修改
btnxq(){
uni.navigateTo({
url:'/page_geren/addhuiyuan?id=' + 1
})
}
}
}
</script>
<style lang="scss">
page {
background-color: #fff;
}
.anniu{
width: 680rpx;
height: 100rpx;
border-radius: 50rpx;
background-color: #8883F0;
font-size: 38rpx;
font-weight: 600;
text-align: center;
line-height: 100rpx;
position: fixed;
left: 50%;
transform: translateX(-50%);
bottom: 50rpx;
color: #fff;
}
.page {
width: 750rpx;
.buy_box {
padding: 0 46rpx;
position: fixed;
bottom: 0rpx;
left: 0rpx;
width: 750rpx;
height: 780rpx !important;
background: #FDFDFD;
border-radius: 0rpx 0rpx 0rpx 0rpx;
z-index: 101;
// position: relative;
.tit_txt {
padding-top: 114rpx; /* 使用 padding-top 或者增加 overflow: hidden 来防止 margin 合并 */
font-weight: 600;
font-size: 28rpx;
color: #3D3D3D;
overflow: hidden; /* 防止 margin 合并 */
span {
color: #64B6A7;
}
}
.text {
margin-top: 16rpx;
font-weight: 400;
font-size: 28rpx;
color: #3D3D3D;
}
.taocan {
padding: 46rpx 40rpx;
position: absolute;
top: -140rpx;
left: 36rpx;
width: 680rpx;
height: 204rpx;
background: #fff;
border-radius: 20rpx;
z-index: 102;
box-shadow: 0rpx 10rpx 64rpx 0rpx rgba(0, 0, 0, 0.08), 0rpx 10rpx 64rpx 0rpx rgba(0, 0, 0, 0.08);
.top {
display: flex;
align-items: center;
justify-content: space-between;
.tit1 {
font-weight: 500;
font-size: 32rpx;
color: #2F3240;
}
.tit2 {
font-weight: 500;
font-size: 40rpx;
color: #E46666;
}
}
.bot_left {
margin-top: 20rpx;
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
.txt3 {
padding: 4rpx 12rpx;
background: linear-gradient(90deg, rgba(228, 102, 102, 0.42) 0%, rgba(228, 102, 102, 0) 100%);
border-radius: 6rpx;
font-weight: 400;
font-size: 24rpx;
color: #E46666;
width: 100%;
}
.txt4 {
font-weight: 500;
font-size: 24rpx;
color: #808080;
}
}
}
.btns_box {
display: flex;
flex-wrap: nowrap;
padding-top: 30rpx;
// align-items: center;
justify-content: space-around;
position: absolute;
bottom: 0;
left: 0;
width: 750rpx;
height: 184rpx;
background: #FFFFFF;
box-shadow: 0rpx 10rpx 64rpx 0rpx rgba(0, 0, 0, 0.08), 0rpx 10rpx 64rpx 0rpx rgba(0, 0, 0, 0.08);
z-index: 200;
.btn1{
display: flex;
align-items: center;
justify-content: center;
width: 338rpx;
height: 90rpx;
border-radius: 45rpx 45rpx 45rpx 45rpx;
border: 2rpx solid #808080;
font-weight: 500;
font-size: 36rpx;
color: #808080;
}
.btn2{
display: flex;
align-items: center;
justify-content: center;
width: 338rpx;
height: 90rpx;
background: #64B6A7;
border-radius: 45rpx 45rpx 45rpx 45rpx;
font-weight: 500;
font-size: 36rpx;
color: #FFFFFF;
}
}
}
.cont {
flex-wrap: wrap;
height: 80vh;
width: 100%;
margin: auto;
overflow: scroll;
padding-bottom: 240rpx;
box-sizing: border-box;
.card1{
display: flex;
flex-wrap: nowrap;
justify-content: space-between;
align-items: center;
padding: 28rpx;
width: 680rpx;
margin: auto;
height: 106rpx;
background: rgba(100,182,167,0.25);
box-shadow: 0rpx 10rpx 64rpx 0rpx rgba(0,0,0,0.08);
border-radius: 20rpx 20rpx 20rpx 20rpx;
.txt1{
font-weight: 600;
font-size: 32rpx;
color: #3D3D3D;
span{
color: #E46666;
}
}
.txt2{
font-weight: 400;
font-size: 24rpx;
color: #2F3240;
image{
margin-left: 16rpx;
width: 8rpx;
height: 16rpx;
}
}
}
.card3{
margin-top: 16rpx;
padding: 20rpx 40rpx;
width: 680rpx;
margin: auto;
height: 240rpx;
background: #FFFFFF;
box-shadow: 0rpx 10rpx 64rpx 0rpx rgba(0,0,0,0.08);
border-radius: 20rpx 20rpx 20rpx 20rpx;
.top{
display: flex;
flex-wrap: nowrap;
align-items: center;
justify-content: space-between;
.tit1{
font-weight: 500;
font-size: 32rpx;
color: #2F3240;
}
.tit2{
font-weight: 500;
font-size: 40rpx;
color: #E46666;
}
}
.middle{
margin-top: 10rpx;
display: flex;
flex-wrap: nowrap;
align-items: center;
justify-content: space-between;
.tit3{
font-weight: 500;
font-size: 24rpx;
color: #808080;
}
.tit4{
font-weight: 400;
font-size: 24rpx;
color: #808080;
text-decoration: line-through;
}
}
.bot{
margin-top: 10rpx;
display: flex;
flex-wrap: nowrap;
align-items: center;
justify-content: space-between;
.bot_left{
display: flex;
flex-wrap: nowrap;
align-items: center;
width: 100%;
.txt3{
padding: 4rpx 12rpx;
background: linear-gradient( 90deg, rgba(228,102,102,0.42) 0%, rgba(228,102,102,0) 100%);
border-radius: 6rpx 6rpx 6rpx 6rpx;
font-weight: 400;
font-size: 24rpx;
color: #E46666;
width: 100%;
}
.txt4{
margin-left: 16rpx;
padding: 4rpx 8rpx;
border-radius: 6rpx 6rpx 6rpx 6rpx;
border: 1rpx solid #808080;
font-weight: 400;
font-size: 24rpx;
color: #808080;
}
}
.btn{
display: flex;
flex-wrap: nowrap;
align-items: center;
justify-content: center;
width: 144rpx;
height: 52rpx;
background: #E46666;
border-radius: 26rpx 26rpx 26rpx 26rpx;
font-weight: 500;
font-size: 28rpx;
color: #FFFFFF;
}
}
}
.card2{
margin-top: 16rpx;
width: 680rpx;
height: 250rpx;
margin: auto;
}
}
}
</style>