Commit 080e5406 by zhangzhen

功能优化

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