|
@@ -138,32 +138,42 @@ const getClubEacthsData = function (type,dateType) {
|
|
|
defaultParams.type = type;
|
|
|
defaultParams.dateType = dateType;
|
|
|
console.log('数据接口请求参数',defaultParams)
|
|
|
- let url = $('#eachtsAjaxUrl').val();
|
|
|
$.ajax({
|
|
|
- url: url,
|
|
|
+ url: $('#eachtsAjaxUrl').val(),
|
|
|
type: "GET",
|
|
|
data: defaultParams,
|
|
|
contentType : 'application/json;charset=UTF-8', //contentType很重要
|
|
|
success: function (res) {
|
|
|
- if (res.success) {
|
|
|
+ console.log('res',res)
|
|
|
+ if (res.code === 0) {
|
|
|
if(type === 0){
|
|
|
- const data = [
|
|
|
- {value: 50, name: '普通订单【25%】【1个】'},
|
|
|
- {value: 20, name: '二手订单【25%】【1个】'},
|
|
|
- {value: 30, name: '返佣订单【25%】【1个】'},
|
|
|
- {value: 60, name: '部分退款订单【25%】【1个】'},
|
|
|
- {value: 50, name: '全部退款订单【25%】【1个】'},
|
|
|
- {value: 20, name: '已关闭订单【25%】【1个】'},
|
|
|
- ]
|
|
|
- getOrderEacths(data)
|
|
|
+ if(res.portrait.orderPortrait){
|
|
|
+ let data = res.portrait.orderPortrait;
|
|
|
+ getOrderEacths(data)
|
|
|
+ }else{
|
|
|
+ $('#orderEacthsNone').show();
|
|
|
+ $('#orderEacths').hide();
|
|
|
+ }
|
|
|
}else{
|
|
|
+ if(!res.portrait.behaviorType){
|
|
|
+ $('#keyWordsEacthsNone').show();
|
|
|
+ $('#keyWordsEacths').hide();
|
|
|
+ }
|
|
|
+ if(!res.portrait.behaviorType){
|
|
|
+ $('#serviceEacthsNone').show();
|
|
|
+ $('#serviceEacths').hide();
|
|
|
+ }
|
|
|
+ if(!res.portrait.behaviorType){
|
|
|
+ $('#visitEacthsNone').show();
|
|
|
+ $('#visitEacths').hide();
|
|
|
+ }
|
|
|
const dataMap = {
|
|
|
1:{
|
|
|
id:'keyWordsEacths',
|
|
|
color:'#e15616',
|
|
|
series:{
|
|
|
- yAxisData:['M22', '玻尿酸', '超声刀', '面膜', '耗材', '润月雅', 'Ross', '超声跑', '拗口似','是脚手'],
|
|
|
- seriesData:[1000, 2000, 3000, 4000, 5000, 6000,7000,8000,9000,10000]
|
|
|
+ yAxisData:res.portrait.behaviorType ? res.portrait.behaviorType : [],
|
|
|
+ seriesData:res.portrait.behaviorValue ? res.portrait.behaviorValue : []
|
|
|
},
|
|
|
},
|
|
|
2:{
|