Files
dvcp_v2_wxcp_app/src/project/pidu/AppPointsChange/AppPointsChange.vue

318 lines
7.2 KiB
Vue
Raw Normal View History

2022-11-23 10:54:33 +08:00
<template>
<div class="AppPointsChange">
<AiTopFixed>
<div class="header">
<div class="header-left">
<span></span>
积分余额428
</div>
<div class="header-right">
2022-11-23 13:58:29 +08:00
<div @click="toMyOrder">我的订单</div>
2022-11-23 10:54:33 +08:00
</div>
</div>
</AiTopFixed>
<div class="list-content">
<div class="select">
<div class="active">最新上架</div>
<div class="price active">价格<span class="top active"></span><span class="bottom"></span></div>
<div class="sure active">可兑换的
<img src="./components/imgs/check-icon.png" alt="">
</div>
</div>
<div class="type">
<div class="type-item" :class="index == typeIndex ? 'active' : ''" v-for="(item, index) in typeList" :key="index" @click="typeClick(index)">{{item}}</div>
</div>
2022-11-23 14:30:39 +08:00
<div class="item" @click="toDetail()">
2022-11-23 10:54:33 +08:00
<div class="left">
<img src="./components/imgs/check-icon.png" alt="">
</div>
<div class="right">
<p>天薇抽纸天然无香纸巾天薇抽纸天然无香纸巾天薇抽纸天然无香纸巾可湿水天薇抽纸天然无香纸巾可湿水</p>
<h3>10<span>积分</span></h3>
</div>
</div>
<div class="item lack-item">
<div class="left">
<img src="./components/imgs/check-icon.png" alt="">
</div>
<div class="right">
<p>天薇抽纸天然无香纸巾天薇抽纸天然无香纸巾天薇抽纸天然无香纸巾可湿水天薇抽纸天然无香纸巾可湿水</p>
<h3>10<span>积分</span></h3>
</div>
<img src="./components/imgs/lack-icon.png" alt="" class="status" />
</div>
</div>
<!-- <AiEmpty v-else></AiEmpty> -->
</div>
</template>
<script>
import {mapState} from "vuex";
export default {
name: 'AppPointsChange',
appName: '积分兑换',
data() {
return {
current: 1,
list: [],
typeList: ['全部', '100分以下', '500分以下', '1000分以下', '5000分以下', '10000分以下'],
typeIndex: 0
}
},
computed: {
...mapState(['user']),
},
onLoad() {
// this.getList()
// uni.$on('reload', () => {
// this.getListInit()
// })
},
onShow() {
document.title = '积分兑换'
},
methods: {
getList() {
this.$http.post('/app/apppartyintegralinfo/list', null, {
params: {
size: 20,
current: this.current,
partyName: this.partyName
},
})
.then((res) => {
if (res.code == 0) {
this.list = this.current > 1 ? [...this.list, ...res.data.records] : res.data.records
}
})
},
getListInit() {
this.current = 1
this.datas = []
this.getList()
},
typeClick(index) {
this.typeIndex = index
2022-11-23 14:30:39 +08:00
},
toDetail() {
uni.navigateTo({url:'./detail'})
2022-11-23 14:31:36 +08:00
},
2022-11-23 13:58:29 +08:00
toMyOrder() {
uni.navigateTo({url:`./myOrder`})
2022-11-23 10:54:33 +08:00
}
},
onReachBottom() {
this.current = this.current + 1
this.getList()
},
}
</script>
<style lang="scss" scoped>
.AppPointsChange {
min-height: 100%;
::v-deep .AiTopFixed .content {
background: #F2F2F2 !important;
padding: 24px 16px;
}
.header {
padding: 28px 24px;
width: 100%;
box-sizing: border-box;
background: #FFF;
box-shadow: 0 8px 16px 0 rgba(0,0,0,0.02);
border-radius: 16px;
display: flex;
justify-content: space-between;
font-family: PingFangSC-Regular;
font-size: 28px;
color: #CA906A;
.header-left {
2022-11-23 14:30:39 +08:00
line-height: 56px;
2022-11-23 10:54:33 +08:00
span {
display: inline-block;
width: 40px;
height: 40px;
line-height: 36px;
text-align: center;
background: #CA906A;
border-radius: 50%;
color: #fff;
font-size: 30px;
margin-right: 8px;
2022-11-23 14:30:39 +08:00
vertical-align: middle;
2022-11-23 10:54:33 +08:00
}
}
.header-right {
div {
width: 176px;
height: 56px;
text-align: center;
line-height: 56px;
background: #FFFFFF;
border: 1px solid #CA906A;
border-radius: 28px;
}
}
}
.list-content{
padding: 4px 32px 16px;
background-color: #fff;
2022-11-23 11:47:24 +08:00
border-top-left-radius: 16px;
border-top-right-radius: 16px;
2022-11-23 10:54:33 +08:00
.select {
display: flex;
div {
flex: 1;
text-align: center;
height: 88px;
line-height: 88px;
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 28px;
color: #666;
}
.active {
color: #CA906A;
}
.price {
position: relative;
span {
position: absolute;
left: 140px;
width: 6px;
height: 6px;
color: #999;
}
.top {
top: -10px;
}
.bottom {
top: 6px;
}
.active {
color: #CA906A;
}
}
.sure {
img {
width: 32px;
height: 32px;
margin-left: 8px;
vertical-align: middle;
}
}
}
.type {
width: 100%;
padding: 16px 0;
box-sizing: border-box;
overflow-x: scroll;
display: flex;
word-break: keep-all;
.type-item{
height: 48px;
line-height: 48px;
background: #F2F2F2;
border-radius: 24px;
padding: 0 16px;
margin-right: 16px;
font-size: 26px;
color: #333;
border: 1px solid #F2F2F2;
box-sizing: border-box;
}
.active {
color: #CA906A;
background-color: #fff;
border: 1px solid #CA906A;
}
}
.item{
width: 100%;
padding: 32px 0 40px 0;
display: flex;
position: relative;
.left {
img {
width: 168px;
height: 176px;
}
}
.right {
width: calc(100% - 168px);
padding-left: 24px;
box-sizing: border-box;
p {
width: 100%;
height: 80px;
line-height: 40px;
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 28px;
color: #333;
word-break: break-all;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
margin-bottom: 32px;
}
h3 {
line-height: 60px;
font-family: PingFangSC-SNaNpxibold;
font-weight: 600;
font-size: 44px;
color: #FF6900;
span {
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 24px;
}
}
}
.status {
position: absolute;
bottom: 0;
right: 0;
width: 160px;
height: 160px;
}
}
.lack-item {
opacity: 0.5;
}
}
.height-144{
height: 144px;
}
.footer {
width: 100%;
position: fixed;
bottom: 0;
left: 0;
}
.btn {
width: 100%;
height: 112px;
line-height: 112px;
text-align: center;
background: #3975C6;
font-size: 32px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #fff;
}
}
</style>