Commit a461b406 by zhangzhen

功能优化

parent 8c8e281e
...@@ -34,3 +34,7 @@ export const balanceLog=(data)=>{ ...@@ -34,3 +34,7 @@ export const balanceLog=(data)=>{
return http.get(url,data) return http.get(url,data)
} }
export const equityFundLog=(data)=>{
let url=`/equityFundLog/listUid`
return http.get(url,data)
}
...@@ -227,13 +227,6 @@ ...@@ -227,13 +227,6 @@
} }
}, },
{ {
"path" : "equityDetail/index",
"style": {
"navigationBarTitleText": "权益详情",
"enablePullDownRefresh" : false
}
},
{
"path" : "levelDetail/index", "path" : "levelDetail/index",
"style": { "style": {
"navigationBarTitleText": "会员等级详情", "navigationBarTitleText": "会员等级详情",
...@@ -247,6 +240,22 @@ ...@@ -247,6 +240,22 @@
"navigationStyle": "custom", "navigationStyle": "custom",
"enablePullDownRefresh" : false "enablePullDownRefresh" : false
} }
},
{
"path" : "equityDetail/equityDetail",
"style" :
{
"navigationBarTitleText" : "权益详情",
"navigationStyle": "custom",
"enablePullDownRefresh": false
}
},
{
"path": "equityFundLog/index",
"style": {
"navigationBarTitleText": "收益明细",
"enablePullDownRefresh" : false
}
} }
] ]
} }
......
...@@ -235,6 +235,16 @@ ...@@ -235,6 +235,16 @@
<text class="text-gray">购买记录</text> <text class="text-gray">购买记录</text>
</view> </view>
</view> </view>
<view v-if="userInfo.consumerMember && userInfo.consumerMember.isRights" class="item-box" @tap="onNavByPath('equityFundLog')">
<view class="icon-img">
<image :src="assetsPath+'/user/tool_4.png'" mode="scaleToFill"></image>
</view>
<view class="text-box">
<text class="text-gray">收益明细</text>
</view>
</view>
<view class="item-box" @tap="onNavByPath('payRecord')"> <view class="item-box" @tap="onNavByPath('payRecord')">
<view class="icon-img"> <view class="icon-img">
<image :src="assetsPath+'/user/tool_5.png'" mode="scaleToFill"></image> <image :src="assetsPath+'/user/tool_5.png'" mode="scaleToFill"></image>
...@@ -527,6 +537,7 @@ ...@@ -527,6 +537,7 @@
} }
], ],
routePathEnum:{ routePathEnum:{
equityFundLog:"/setting/equityFundLog/index",
payRecord:"/setting/payRecord/index", payRecord:"/setting/payRecord/index",
recharge:"/setting/recharge/index", recharge:"/setting/recharge/index",
equity: "/setting/equityRecord/index", equity: "/setting/equityRecord/index",
......
...@@ -633,7 +633,7 @@ ...@@ -633,7 +633,7 @@
}, },
onNavToRule3() { onNavToRule3() {
uni.navigateTo({ uni.navigateTo({
url: "/setting/rule/rule?keyData=user_equity_details" url: "/setting/equityDetail/equityDetail"
}) })
}, },
......
<template>
</template>
<script>
</script>
<style>
page {
background-color: #f1f1f1;
}
</style>
<style lang="scss" scoped>
</style>
\ No newline at end of file
<template>
<view class="order-record">
<view class="content-box">
<view class="list-content">
<view v-for="(item,index) in list" :key="index" class="list-item" @tap="onNavToOrderInfo(item)">
<view class="flex-between">
<text class="">支付金额</text>
<text class="text-bold text-pink text-lg">{{item.payPrice}}</text>
</view>
<view class="flex-between">
<text class="">购买期限</text>
<text class="text-black text-bold text-lg">一年</text>
</view>
<view class="flex-between">
<text class="">支付方式</text>
<text>{{payTypeEnum[item.payType]}}</text>
</view>
<view class="flex-between">
<text class="">订单编号</text>
<text class="text-black">{{item.equityOrderNo}}</text>
</view>
<view class="flex-between">
<text class="">操作日期</text>
<text>{{item.payTime}}</text>
</view>
</view>
</view>
</view>
<view v-if="loginStatus && list.length == 0" class="empty-box">
<u-empty text="暂无数据" textColor='#C1C1C1' width="120" :icon="listBlankImage">
</u-empty>
</view>
<view v-if="loginStatus && list.length" style="padding: 12px 6% 0;">
<u-loadmore :status="status" :icon="true" :line='true' :loading-text="loadingText"
:loadmore-text="loadmoreText" :nomore-text="nomoreText" />
</view>
</view>
</template>
<script>
import config from "@/config/index.config"
import {
equityFundLog
} from "@/api/recharge.js"
import NoLogin from "@/components/noLogin/noLogin"
import {
getDictItem
} from "@/utils/tools.js"
export default {
components: {
NoLogin
},
data() {
return {
status: 'nomore ',
loadingText: '努力加载中',
loadmoreText: '上划加载',
nomoreText: '到底啦',
statusIndex: 0,
list: [],
statusList: [{
label: "全部",
value: "",
},
{
label: "已预约",
value: "0",
},
{
label: "使用中",
value: "1",
},
{
label: "已完成",
value: "2",
},
{
label: "退单",
value: "3",
}
],
queryParams: {
pageNum: 1,
pageSize: 100,
uid: uni.getStorageSync("userInfo").id
},
orderStatusEnum: {},
payTypeEnum: {
1: "微信支付",
2: "支付宝支付",
3: "余额支付"
},
payStatus: {
expenditure: '-',
income: '+'
},
listBlankImage: config.assetsPath + '/no_data_icon.png',
};
},
onLoad() {
},
onReachBottom() {
if (this.status == 'loadmore') {
this.queryParams.pageNum += 1;
this.onLoading();
}
},
onShow() {
this.onGetDicts()
},
methods: {
onGetDicts() {
let dicts = []
if (uni.getStorageSync('dicts')) {
dicts = JSON.parse(uni.getStorageSync('dicts'))
this.orderStatusEnum = getDictItem(dicts, "store_order_status");
this.onLoading()
} else {
dictList().then(res => {
dicts = res.data.data;
uni.setStorageSync('dicts', JSON.stringify(res.data.data))
this.orderStatusEnum = getDictItem(dicts, "store_order_status");
this.onLoading()
})
}
},
onLoading() {
uni.showLoading({
title: '加载中'
})
this.status = 'loading'
// this.queryParams.status = this.statusList[this.statusIndex].value;
equityFundLog(this.queryParams).then(res => {
console.log(res)
uni.hideLoading()
this.status = "nomore"
if (res.data.code == 200) {
this.list = res.data.data.map(item => {
return {
...item
}
})
} else if (res.data.code == 401) {
this.loginStatus = false
}
})
},
tabSelect(i) {
console.log(i, 99999)
this.statusIndex = i;
this.queryParams.pageNum = 1;
this.list = []
this.onLoading()
},
onNavToOrderInfo(val) {
// uni.navigateTo({
// url:"/pages/orderResult/orderResult?orderNo="+val.orderNo
// })
}
}
}
</script>
<style>
page {
background-color: #f1f1f1;
}
</style>
<style lang="scss" scoped>
.order-record {
display: flex;
flex-direction: column;
.content-box {
display: flex;
flex-direction: column;
.list-content {
display: flex;
flex-direction: column;
align-items: center;
.list-item {
display: flex;
flex-direction: column;
width: 94%;
padding: 20upx 20upx;
border-radius: 20upx;
background-color: #ffffff;
margin-top: 30upx;
.part-1 {
display: flex;
.flex-row {
display: flex;
flex-direction: row;
}
}
}
}
}
}
</style>
\ No newline at end of file
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