Commit 9c82c1fc by zhangzhen

功能优化

parent 9ece05eb
......@@ -38,3 +38,9 @@ export const equityFundLog=(data)=>{
let url=`/equityFundLog/list`
return http.get(url,data)
}
export const equityBindUser=(data)=>{
let url=`/activities/list`
return http.get(url,data)
}
\ No newline at end of file
......@@ -253,7 +253,15 @@
{
"path": "equityFundLog/index",
"style": {
"navigationBarTitleText": "收益明细",
"navigationBarTitleText": "权益金详情",
"navigationStyle": "custom",
"enablePullDownRefresh" : false
}
},
{
"path": "equityFundLog/list",
"style": {
"navigationBarTitleText": "绑定用户",
"enablePullDownRefresh" : false
}
}
......
......@@ -185,6 +185,18 @@
<text class="text-black text-lg text-bold">{{userInfo.number|| 0}}</text>
</view>
</view>
<view class="item-box" @tap="onNavByPath('equityFundLog')">
<view class="icon-img">
<image :class="userInfo.consumerMember && userInfo.consumerMember.isRights?'':'filter-box'" :src="assetsPath+'/user/wallet_icon_1.png'" mode="scaleToFill"></image>
</view>
<view class="text-box">
<text class="text-gray">权益金</text>
</view>
<view class="value-box">
<text class="text-black text-lg text-bold">{{userInfo.consumerWallet.equityFund || 0}}</text>
</view>
</view>
</view>
</view>
......@@ -754,6 +766,7 @@
})
},
onNavByPath(pathName){
if(pathName === 'equityFundLog' && !(this.userInfo.consumerMember && this.userInfo.consumerMember.isRights)) return;
if(["levelDetail"].includes(pathName) && !this.loginStatus){
console.log(pathName,999999)
this.$refs.loginPop.open();
......@@ -1709,4 +1722,7 @@
}
}
}
.filter-box{
filter: grayscale(100%);
}
</style>
\ No newline at end of file
<template>
<view class="order-record">
<view class="content-box">
<view class="content-list">
<view class="list-content">
<view v-for="(item,index) in list" :key="index" class="list-item">
<view class="avatar-box">
<view class="avatar">
<image :src="item.newAvatar || assetsPath+'/logo_icon.png' " mode="scaleToFill"></image>
</view>
<view class="">
<text class="text-title text-black text-lg">{{item.newNickName||'凑角用户'}}_{{item.userName}} </text>
</view>
</view>
<text class="margin-left">{{item.createTime || item.updateTime}}</text>
</view>
</view>
<view v-if="list.length == 0" class="empty-box">
<u-empty text="暂无数据" textColor='#C1C1C1' width="120" :icon="listBlankImage">
</u-empty>
</view>
<view v-if="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>
</view>
</view>
</template>
<script>
import config from "@/config/index.config"
import {
equityBindUser
} from "@/api/recharge.js"
import {
getDictItem
} from "@/utils/tools.js"
export default {
data() {
return {
statusBarHeight: this.statusBarHeight,
status: 'nomore ',
loadingText: '努力加载中',
loadmoreText: '上划加载',
nomoreText: '到底啦',
statusIndex: 0,
list: [],
assetsPath: config.assetsPath,
scrollTop: 0,
queryParams: {
pageNum: 1,
pageSize: 10
},
equityFundTypeEnum: {
0: "金额充值",
1: "权益购买"
},
orderStatusEnum: {},
payTypeEnum: {
1: "微信支付",
2: "支付宝支付",
3: "余额支付"
},
payStatus: {
expenditure: '-',
income: '+'
},
listBlankImage: config.assetsPath + '/no_data_icon.png',
};
},
onLoad() {
this.onGetDicts()
},
onReachBottom() {
if (this.status == 'loadmore') {
this.queryParams.pageNum += 1;
this.onLoading();
}
},
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'
equityBindUser(this.queryParams).then(res => {
console.log(res)
uni.hideLoading()
if (res.data.code == 200) {
let list = res.data.rows.map(item => {
return {
...item,
userName:item.newPhone ? item.newPhone.slice(-4):'0000'
}
})
if (this.queryParams.pageNum === 1) {
this.list = list
} else {
this.list.push(...list);
}
if (this.list.length < res.data.total) {
this.status = "loadmore"
} else {
this.status = "nomore"
}
} else if (res.data.code == 401) {
this.loginStatus = false
}
})
}
}
}
</script>
<style>
page {
background-color: #f1f1f1;
height: 100vh;
width: 100vw;
}
</style>
<style lang="scss" scoped>
.order-record {
display: flex;
flex-direction: column;
width: 100%;
height: 100%;
.content-list {
display: flex;
flex: 1;
width: 100%;
flex-direction: column;
margin: 20upx 0 0 0;
.list-content {
display: flex;
flex-direction: column;
align-items: center;
.list-item {
display: flex;
justify-content: space-between;
align-items: center;
width: 96%;
padding: 20upx 20upx;
border-radius: 20upx;
background-color: #ffffff;
margin-top: 30upx;
>.flex-between {
padding: 6upx 0;
}
.part-1 {
display: flex;
.flex-row {
display: flex;
flex-direction: row;
}
}
}
.list-item:first-child {
margin-top: 0;
}
}
}
}
.count-part {
background-color: #ffffff;
.flex-1 {
padding: 20upx 0;
.margin-top-sm {
margin-top: 10upx;
}
}
.flex-row-center {
justify-content: center;
}
}
.avatar-box{
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
.avatar{
border: 2px solid rgba(255, 255, 255, 0.8);
width: 42px;
height: 42px;
border-radius: 50%;
overflow: hidden;
box-shadow: 0 0 6upx #ff007f;
margin-right: 8upx;
image{
display: block;
width: 100%;
height: 100%;
}
}
.amount{
margin-top: 16upx;
text{
font-size: 60upx;
}
}
}
</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