Commit 4a2f0c65 authored by zhengke's avatar zhengke

修改

parent 99b959eb
......@@ -123,6 +123,9 @@
},
{
"path": "buyVip/index"
},
{
"path": "buyRecord/index"
}
]
......
<template>
<view class="recordlistStyle" :style="{ height: contentHeight }">
<u-empty v-if="g.length == 0" text="暂无相关购买记录" mode="list"></u-empty>
<view
v-if="g.length > 0"
style="
height: calc(100vh );
width: calc(100vw);
overflow: hidden;
"
>
<scroll-view :scroll-y="true" :enable-back-to-top="true" :enable-flex="true" @scrolltolower="lower" :style="{ height: '100%' }">
<view class="recordList">
<view class="r_list_item" v-for="(x, i) in g" :key="i">
<view class="list_top">
<text>会员名称:{{x.UserName}}</text>
<text>支付金额:{{x.Money}}</text>
</view>
<view class="list_top">
<text>过期时间:{{x.ExpiryDateStr}}</text>
<text>等级名称:{{x.GradeName}}</text>
</view>
<view class="list_top">
<text>
支付状态:<text v-if="x.PayState==1">已支付</text><text v-if="x.PayState==0">未支付</text>
</text>
<text>支付时间:{{x.PayTimeStr}}</text>
</view>
</view>
</view>
<u-loadmore :status="status" :load-text="loadText" :font-size="24" :margin-top="20" :margin-bottom="20" bg-color="#f3f4f6" />
</scroll-view>
</view>
<view class="loading" v-if="loading">
<u-loading mode="flower" size="48">></u-loading>
<Text style="color: #fff; margin-top: 10rpx;">加载中...</Text>
</view>
</view>
</template>
<script>
export default {
data() {
return {
pageTitle: '购买记录',
mainColor: '',
contentHeight: 0,
g: [],
loading: false,
msg: {
pageIndex: 1,
pageSize: 10
},
page_count: 1,
status: 'loadmore',
loadText: {
loadmore: '轻轻上拉,加载更多',
loading: '努力加载中',
nomore: '没有更多了'
}
};
},
created() {
this.contentHeight = this.$utils.calcContentHeight(-40) + 'px';
this.mainColor = this.$uiConfig.mainColor;
},
mounted() {
let currentPages = getCurrentPages();
let u = '/' + currentPages[currentPages.length - 1].route;
let pages = wx.getStorageSync('basedata') ? wx.getStorageSync('basedata').bar_title : [];
pages.forEach(x => {
if (x.value == u) {
this.pageTitle = x.new_name ? x.new_name : x.name;
}
});
uni.setNavigationBarTitle({
title: this.pageTitle
});
},
onLoad: function(option) {
//option为object类型,会序列化上个页面传递的参数
this.loading = true;
this.init();
},
methods: {
init() {
this.request2(
{
url: '/api/AppletUser/GetVipBuyPageList',
data: this.msg
},
res => {
if (res.resultCode == 1) {
this.loading = false;
this.g = this.g.concat(res.data.pageData);
this.page_count = res.data.pageCount;
if (this.page_count == 1) {
this.status = 'nomore';
}
}
}
);
},
lower(e) {
if (this.msg.pageIndex < this.page_count) {
this.msg.pageIndex++;
this.status = 'loading';
this.init();
} else {
this.status = 'nomore';
}
}
}
};
</script>
<style>
.recordlistStyle {
width: 100%;
height: 100%;
background: #f3f4f6;
}
.recordlistStyle .recordList{
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
margin-top:10px;
}
.recordlistStyle .r_list_item{
width: 94%;
height: 130px;
border-radius: 6px;
background-image: url(../../../static/images/shareTop.png);
background-repeat: no-repeat;
background-size: 100% 100%;
display: flex;
margin-bottom:15px;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-webkit-flex-direction: column;
flex-direction: column;
padding: 10px;
color: #FFFFFF;
}
.recordlistStyle .loading {
width: 180rpx;
height: 180rpx;
background: #000000;
opacity: 0.7;
border-radius: 10rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
position: fixed;
left: 50%;
top: 30%;
margin-left: -100rpx;
z-index: 999;
}
.recordlistStyle .list_top{
width: 100%;
height: 45px;
display: flex;
-webkit-box-orient: horizontal;
-webkit-box-direction: normal;
-webkit-flex-direction: row;
flex-direction: row;
-webkit-box-align: center;
-webkit-align-items: center;
align-items: center;
-webkit-box-pack: justify;
-webkit-justify-content: space-between;
justify-content: space-between;
}
</style>
......@@ -13,6 +13,9 @@
</view>
</view>
<input type="button" class="my_VipBtn" @click="openImediate" value="立即开通" />
<view class="my_buyRecord">
<text @click="goUrl('/pages/share/buyRecord/index')">购买记录</text>
</view>
</view>
<view class="vip_activeRule" @click="showDialog = true">活动规则>></view>
</view>
......@@ -118,6 +121,13 @@ export default {
}
}
);
},
//跳转
goUrl(url){
console.log(url)
uni.navigateTo({
url: url
});
}
}
};
......@@ -134,9 +144,9 @@ export default {
}
.vipInner {
width: 90%;
height: 140px;
height: 170px;
position: absolute;
bottom: 80px;
bottom: 70px;
left: 50%;
margin-left: -45%;
border-radius: 4px;
......@@ -185,7 +195,7 @@ export default {
.vip_activeRule {
width: 100%;
position: absolute;
bottom: 30px;
bottom: 25px;
text-align: center;
color: #dd6ada;
}
......@@ -225,4 +235,11 @@ export default {
top:0;
font-size:25px;
}
.vipMain .my_buyRecord{
width:100%;
text-align: right;
padding-right:30px;
margin-top:15px;
color:#fff100;
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment