Commit 080e5406 by zhangzhen

功能优化

parent d13d9c13
......@@ -9,3 +9,8 @@ export const getDataStatistics=(data)=>{
let url=`/order/statistics`
return http.post(url,data)
}
export const getOrderStatistics=(data)=>{
let url=`/order/statistics/orderList`
return http.post(url,data)
}
......@@ -62,13 +62,12 @@
<!-- <text class="text-2">还差 {{userInfo.memberConfig.nextLimitRequirements - userInfo.consumerMember.remainingIntegral}} 积分可升级为{{userInfo.memberConfig.nextMembershipName}}</text> -->
<view class="flex-row">
<text class="text-3">当前积分</text>
<text class="text-4">{{userInfo.consumerMember? userInfo.consumerMember.membershipProgress:0}}</text>
<text class="text-4">{{userInfo.consumerMember? parseInt(userInfo.consumerMember.membershipProgress):0}}</text>
</view>
</view>
<view v-else-if="userInfo.memberConfig && userInfo.memberConfig.membershipLevel ===3" class="level level-3">
<text class="text-1">LV {{userInfo.memberConfig.levelName}}</text>
<text class="text-2">还差 {{userInfo.memberConfig.nextDifference ||0)}} 积分可升级为{{userInfo.memberConfig.nextMembershipName}}</text>
<text class="text-2">还差{{userInfo.memberConfig.nextDifference || 0}}积分可升级为{{userInfo.memberConfig.nextMembershipName}}</text>
<view class="flex-row">
<text class="text-3">当前积分</text>
<text class="text-4">{{userInfo.consumerMember.membershipProgress || 0}}</text>
......@@ -77,7 +76,7 @@
<view v-else-if="userInfo.memberConfig && userInfo.memberConfig.membershipLevel ===2" class="level level-2">
<text class="text-1">LV {{userInfo.memberConfig.levelName}}</text>
<text class="text-2">还差 {{userInfo.memberConfig.nextDifference ||0)}} 积分可升级为{{userInfo.memberConfig.nextMembershipName}}</text>
<text class="text-2">还差 {{userInfo.memberConfig.nextDifference || 0}} 积分可升级为{{userInfo.memberConfig.nextMembershipName}}</text>
<view class="flex-row">
<text class="text-3">当前积分</text>
<text class="text-4">{{userInfo.consumerMember.membershipProgress || 0}}</text>
......@@ -86,7 +85,7 @@
<view v-else-if="userInfo.memberConfig && userInfo.memberConfig.membershipLevel ===1" class="level level-1">
<text class="text-1">LV {{userInfo.memberConfig.levelName}}</text>
<text class="text-2">还差 {{userInfo.memberConfig.nextDifference || 0)}} 积分可升级为{{userInfo.memberConfig.nextMembershipName}}</text>
<text class="text-2">还差 {{userInfo.memberConfig.nextDifference || 0}} 积分可升级为{{userInfo.memberConfig.nextMembershipName}}</text>
<view class="flex-row">
<text class="text-3">当前积分</text>
<text class="text-4">{{userInfo.consumerMember.membershipProgress || 0}}</text>
......@@ -95,7 +94,7 @@
<view v-else-if="userInfo.memberConfig && userInfo.memberConfig.membershipLevel === 0" class="level level-0">
<text class="text-1">LV 0</text>
<!-- <text class="text-2">您还没有会员等级!</text> -->
<text class="text-2">还差 {{userInfo.memberConfig.nextDifference || 0)}} 积分可升级为{{userInfo.memberConfig.nextMembershipName}}</text>
<text class="text-2">还差 {{userInfo.memberConfig.nextDifference || 0}} 积分可升级为{{userInfo.memberConfig.nextMembershipName}}</text>
<view class="flex-row">
<text class="text-3">当前积分</text>
<text class="text-4">{{userInfo.consumerMember.membershipProgress || 0}}</text>
......@@ -545,6 +544,7 @@
if(this.userInfo && this.userInfo.phone){
this.userName = this.userInfo.phone.slice(-4);
}
console.log(this.userInfo,999999)
uni.setStorageSync('userInfo', this.userInfo)
this.onGetOrderInfo();
}
......
......@@ -130,8 +130,8 @@
</view>
</view>
</view>
<view v-if="statisticsData.orderVoList && statisticsData.orderVoList.length" class="record">
<view v-for="(item,k) in statisticsData.orderVoList" :key="k" class="record-item">
<view v-if="orderVoList.length" class="record">
<view v-for="(item,k) in orderVoList" :key="k" class="record-item">
<view class="flex-between part-top">
<view class="flex-row-center">
<view class="avatar-bg">
......@@ -157,6 +157,10 @@
</view>
</view>
</view>
<view v-if="orderVoList.length" style="padding: 12px 6%;" @tap="onGetOrderStatistics">
<u-loadmore :status="status" :icon="true" :line='true' :loading-text="loadingText"
:loadmore-text="loadmoreText" :nomore-text="nomoreText" />
</view>
</view>
</view>
</scroll-view>
......@@ -171,7 +175,7 @@
import moment from "@/common/moment.js"
import config from "@/config/index.config"
import fNavbar from '@/components/module/f-navbar/f-navbar';
import {getStoreManageList,getDataStatistics} from "@/api/dataStatistics.js"
import {getStoreManageList,getDataStatistics,getOrderStatistics} from "@/api/dataStatistics.js"
export default {
components: {
......@@ -179,6 +183,10 @@
},
data(){
return {
status: 'loadmore ',
loadingText: '努力加载中',
loadmoreText: '点击查看全部',
nomoreText: '到底啦',
show:false,
statisticsData:{},
list:[],
......@@ -209,7 +217,7 @@
},
{
label:"全部",
startTime: moment().subtract(6,'M').format("YYYY-MM-DD 00:00:00"),
startTime: moment().format("YYYY-MM-DD 00:00:00"),
endTime: moment().format("YYYY-MM-DD 23:59:59"),
},
],
......@@ -221,10 +229,11 @@
moment().format("YYYY-MM-DD")
],
faultDate:{
startTime:moment().subtract(6,'M').format("YYYY-MM-DD"),
startTime:moment().format("YYYY-MM-DD"),
endTime: moment().format("YYYY-MM-DD")
},
platformTypeEnum:{}
platformTypeEnum:{},
orderVoList:[]
}
},
onLoad() {
......@@ -276,8 +285,31 @@
endTime: this.dateList[this.dateIndex].endTime
}).then(res=>{
uni.hideLoading();
this.statisticsData = res.data.data
this.statisticsData = res.data.data;
this.orderVoList =this.statisticsData.orderVoList
this.status = "loadmore"
})
},
onGetOrderStatistics(){
if(this.status === "loadmore"){
this.status = "loading"
getOrderStatistics({
storeId: this.storeList[this.index].id,
startTime: this.dateList[this.dateIndex].startTime,
endTime: this.dateList[this.dateIndex].endTime
}).then(res => {
if(res.data.code ==200){
this.status = "nomore"
this.orderVoList = res.data.data;
this.$forceUpdate();
}else{
uni.showToast({
icon:"none",
title:res.data.msg||"查询失败,稍后再试"
})
}
})
}
},
onLoading(){
getStoreManageList().then(res => {
......@@ -411,9 +443,9 @@
align-items: center;
border: 1px solid #999999;
border-radius: 8upx;
font-size: 18upx;
font-size: 16upx;
width: 100%;
padding: 0 6upx;
padding: 0 4upx;
}
}
.part-1{
......
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