Merge branch 'master' into ma

master
mabo 2021-06-03 09:16:29 +08:00
commit 65cb7787a6
10 changed files with 122 additions and 34 deletions

View File

@ -98,11 +98,16 @@ export const getMemberStatistics = params => {
};
// 获取会员注册统计列表
export const getStatisticsList = params => {
return getRequest("/statistics/view/list", params);
};
// 获取会员历史流量
export const historyMemberChartList = () => {
return getRequest("/statistics/view/online/history");
}
//查询会员数量
export const getMemberNum = params => {
return getRequest("/member/num", params);
@ -121,15 +126,15 @@ export const removeMemberAddress = (id) => {
}
//添加会员收货地址
export const addMemberAddress = (params) => {
return postRequest(`/member/address`,params)
return postRequest(`/member/address`, params)
}
//修改会员收货地址
export const editMemberAddress = (params) => {
return putRequest(`/member/address`,params)
return putRequest(`/member/address`, params)
}
//查询会员预存款
export const getMemberWallet = (params) => {
return getRequest(`/members/wallet`,params)
return getRequest(`/members/wallet`, params)
}

View File

@ -172,14 +172,22 @@
</div>
</div>
</div>
<!-- chart -->
<div class="card transform">
<div>
<h4>最近48小时在线人数整点为准</h4>
<div id="historyMemberChart"></div>
</div>
</div>
<!-- chart -->
<div class="charts flex">
<div class="chart-item">
<h4>流量统计</h4>
<h4>流量走势</h4>
<div id="pvChart"></div>
</div>
<div class="chart-item">
<h4>交易统计</h4>
<h4>交易趋势</h4>
<div id="orderChart"></div>
</div>
</div>
@ -279,6 +287,7 @@ export default {
homeData: "", //
pvChart: "", //
orderChart: "", //
historyMemberChart: "", //
params: { //
searchType: "LAST_SEVEN",
},
@ -308,13 +317,13 @@ export default {
},
// top10
async toHotGoods() {
let res = await hotGoods();
let res = await hotGoods(this.params);
res.success ? (this.topHotGoodsData = res.result) : "";
},
// top10
async topHotShops() {
let res = await hotShops();
let res = await hotShops(this.params);
res.success ? (this.topHotShopsData = res.result) : "";
},
//
@ -323,6 +332,7 @@ export default {
res.success ? (this.awaitTodoData = res.result) : "";
},
//
async getHomeData() {
let res = await homeStatistics();
if (res.success) {
@ -358,6 +368,7 @@ export default {
}
},
initOrderChart() {
// legend-filter
let data = this.chartList;
@ -393,6 +404,9 @@ export default {
this.orderChart.render();
},
//
initPvChart() {
let uv = [];
@ -465,8 +479,54 @@ export default {
this.initPvChart();
}
});
},
}, //
async initHistoryMemberChartList() {
const res = await API_Member.historyMemberChartList();
if (res.success) {
this.chartList = res.result;
if (!this.historyMemberChart) {
this.historyMemberChart = new Chart({
container: "historyMemberChart",
autoFit: true,
height: 500,
padding: [70, 35, 70, 35],
});
}
this.initHistoryMemberChart();
}
},
initHistoryMemberChart(){
// legend-filter
let data = this.chartList;
data.forEach((item) => {
item.title = "历史在线人数";
});
this.historyMemberChart.data(data);
console.error(data)
this.historyMemberChart.tooltip({
showCrosshairs: true,
shared: true,
});
this.historyMemberChart
.line()
.position("date*num")
.color("title",['#ffaa71'])
.shape("smooth")
;
this.historyMemberChart
.point()
.position("date*num")
.color("title",['#ffaa71'])
.shape("circle")
;
this.historyMemberChart.render();
},
//
init() {
this.toHotGoods();
@ -475,6 +535,7 @@ export default {
this.getHomeData();
this.getPvChart();
this.initOrderChartList();
this.initHistoryMemberChartList();
},
},
mounted() {

View File

@ -492,7 +492,20 @@
{
title: "来源",
key: "clientType",
width: 80,
width: 80,render: (h, params) => {
if (params.row.clientType == "H5") {
return h("div",{},"移动端");
}else if(params.row.clientType == "PC") {
return h("div",{},"PC端");
}else if(params.row.clientType == "WECHAT_MP") {
return h("div",{},"小程序端");
}else if(params.row.clientType == "APP") {
return h("div",{},"移动应用端");
}
else{
return h("div",{},params.row.clientType);
}
},
},
{
title: "订单状态",

View File

@ -267,7 +267,7 @@
import {
getMessageData,
editSmsMessageTemplate,
editNoticeMessageTemplate,
editNoticeMessage,
wechatMessageSync,
getWechatMessagePage,
editWechatMessageTemplate,
@ -592,7 +592,7 @@
noticeFormDataEdit(){
this.$refs['noticeFormData'].validate((valid) => {
if (valid) {
editNoticeMessageTemplate(this.messageTemplateId,this.noticeFormData).then(res => {
editNoticeMessage(this.messageTemplateId,this.noticeFormData).then(res => {
if(res.message === 'success') {
this.$Message.success('站内信修改成功');
this.noticeModal = false;

View File

@ -281,25 +281,6 @@
this.total = this.data.length;
this.loading = false;
},
//
invoicing(params){
this.$Modal.confirm({
title: "确认开票",
content: "您确认已经开具发票 ?",
loading: true,
onOk: () => {
API_Order.invoicing(params.id).then((res) => {
if (res.success) {
this.$Message.success("开票成功");
}
this.$Modal.remove();
this.getData();
});
}
});
},
},
mounted() {
this.init();

View File

@ -591,6 +591,20 @@
title: "来源",
key: "clientType",
width: 80,
render: (h, params) => {
if (params.row.clientType == "H5") {
return h("div",{},"移动端");
}else if(params.row.clientType == "PC") {
return h("div",{},"PC端");
}else if(params.row.clientType == "WECHAT_MP") {
return h("div",{},"小程序端");
}else if(params.row.clientType == "APP") {
return h("div",{},"移动应用端");
}
else{
return h("div",{},params.row.clientType);
}
},
},
{
title: "订单状态",

View File

@ -52,7 +52,7 @@
</div>
<div class="card-item">
<div class="card-item-label">付款笔数</div>
<div class="card-item-value">{{overViewList.paymentsNum || 0}}</div>
<div class="card-item-value">{{overViewList.paymentOrderNum || 0}}</div>
</div>
<div class="card-item">
<div class="card-item-label">付款金额</div>

View File

@ -120,6 +120,20 @@
title: "订单来源",
key: "clientType",
width: 120,
render: (h, params) => {
if (params.row.clientType == "H5") {
return h("div",{},"移动端");
}else if(params.row.clientType == "PC") {
return h("div",{},"PC端");
}else if(params.row.clientType == "WECHAT_MP") {
return h("div",{},"小程序端");
}else if(params.row.clientType == "APP") {
return h("div",{},"移动应用端");
}
else{
return h("div",{},params.row.clientType);
}
},
},
{
title: "订单类型",

View File

@ -225,7 +225,7 @@
},
getDataList() {
this.loading = true;
this.searchForm.billStatus = "OUT"
this.searchForm.billStatus = "CHECK"
API_Shop.getBillPage(this.searchForm).then((res) => {
this.loading = false;
if (res.success) {

View File

@ -52,7 +52,7 @@
</div>
<div class="card-item">
<div class="card-item-label">付款笔数</div>
<div class="card-item-value">{{overViewList.paymentsNum || 0}}</div>
<div class="card-item-value">{{overViewList.paymentOrderNum || 0}}</div>
</div>
<div class="card-item">
<div class="card-item-label">付款金额</div>