Commit c433a2f7 by 夏新然

交接

1 parent a68e0eb1
...@@ -60,7 +60,21 @@ ...@@ -60,7 +60,21 @@
backgroundColor: '#fff', backgroundColor: '#fff',
color: ["#0069FF", "#3BB8FF", "#6784e3", "#ff9631", "#ffc62e","#7460ee","#eb6100"], color: ["#0069FF", "#3BB8FF", "#6784e3", "#ff9631", "#ffc62e","#7460ee","#eb6100"],
tooltip:{ tooltip:{
renderMode:'richText' padding:[5,15],
position: function(pos, params, dom, rect, size){
var obj={};
if(pos[0]+size.contentSize[0]>size.viewSize[0]){
obj['right']=size.viewSize[0]-pos[0]
}else{
obj['left']=pos[0]
}
if(pos[1]+size.contentSize[1]>size.viewSize[1]){
obj['bottom']=size.viewSize[1]-pos[1]
}else{
obj['top']=pos[1]
}
return obj;
},
}, },
grid: { grid: {
left:uni.upx2px(76.08), left:uni.upx2px(76.08),
......
...@@ -59,7 +59,21 @@ ...@@ -59,7 +59,21 @@
}, },
color: ['#3BB8FF', '#87D14B', '#6784E3'], color: ['#3BB8FF', '#87D14B', '#6784E3'],
tooltip:{ tooltip:{
renderMode:'richText' padding:[5,15],
position: function(pos, params, dom, rect, size){
var obj={};
if(pos[0]+size.contentSize[0]>size.viewSize[0]){
obj['right']=size.viewSize[0]-pos[0]
}else{
obj['left']=pos[0]
}
if(pos[1]+size.contentSize[1]>size.viewSize[1]){
obj['bottom']=size.viewSize[1]-pos[1]
}else{
obj['top']=pos[1]
}
return obj;
},
}, },
grid: { grid: {
left:uni.upx2px(76.08), left:uni.upx2px(76.08),
......
...@@ -60,7 +60,21 @@ ...@@ -60,7 +60,21 @@
backgroundColor: '#fff', backgroundColor: '#fff',
color: ["#0069FF", "#3BB8FF", "#6784e3", "#ff9631", "#ffc62e","#7460ee","#eb6100"], color: ["#0069FF", "#3BB8FF", "#6784e3", "#ff9631", "#ffc62e","#7460ee","#eb6100"],
tooltip:{ tooltip:{
renderMode:'richText' padding:[5,15],
position: function(pos, params, dom, rect, size){
var obj={};
if(pos[0]+size.contentSize[0]>size.viewSize[0]){
obj['right']=size.viewSize[0]-pos[0]
}else{
obj['left']=pos[0]
}
if(pos[1]+size.contentSize[1]>size.viewSize[1]){
obj['bottom']=size.viewSize[1]-pos[1]
}else{
obj['top']=pos[1]
}
return obj;
},
}, },
grid: { grid: {
left:uni.upx2px(76.08), left:uni.upx2px(76.08),
...@@ -173,7 +187,7 @@ ...@@ -173,7 +187,7 @@
legendObj.icon="emptyCircle" legendObj.icon="emptyCircle"
option.legend.data.push(legendObj); option.legend.data.push(legendObj);
item.symbol="emptyCircle"; item.symbol="emptyCircle";
item.symbolSize=uni.upx2px(12.7) item.symbolSize=uni.upx2px(18.7)
}) })
} }
option.xAxis.data =JSON.parse(JSON.stringify(this.chartData.xaxis.data)); option.xAxis.data =JSON.parse(JSON.stringify(this.chartData.xaxis.data));
......
...@@ -61,7 +61,21 @@ ...@@ -61,7 +61,21 @@
backgroundColor: '#fff', backgroundColor: '#fff',
color: ["#0069FF", "#3BB8FF", "#6784e3", "#ff9631", "#ffc62e","#7460ee","#eb6100"], color: ["#0069FF", "#3BB8FF", "#6784e3", "#ff9631", "#ffc62e","#7460ee","#eb6100"],
tooltip:{ tooltip:{
renderMode:'richText' padding:[5,15],
position: function(pos, params, dom, rect, size){
var obj={};
if(pos[0]+size.contentSize[0]>size.viewSize[0]){
obj['right']=size.viewSize[0]-pos[0]
}else{
obj['left']=pos[0]
}
if(pos[1]+size.contentSize[1]>size.viewSize[1]){
obj['bottom']=size.viewSize[1]-pos[1]
}else{
obj['top']=pos[1]
}
return obj;
},
}, },
grid: { grid: {
left:uni.upx2px(76.08), left:uni.upx2px(76.08),
...@@ -136,7 +150,6 @@ ...@@ -136,7 +150,6 @@
}, },
series:this.chartData.series series:this.chartData.series
} }
if(this.chartData.series.length>1){
this.chartData.series.forEach((item,index)=>{ this.chartData.series.forEach((item,index)=>{
var legendObj = {}; var legendObj = {};
if(index<2){ if(index<2){
...@@ -147,19 +160,20 @@ ...@@ -147,19 +160,20 @@
legendObj.name = item.name; legendObj.name = item.name;
legendObj.icon="emptyCircle" legendObj.icon="emptyCircle"
option.legend.data.push(legendObj); option.legend.data.push(legendObj);
item.areaStyle={ if(this.chartData.series.length>1){
color: new this.echarts.graphic.LinearGradient(0, 0, 0, 1, [{ item.areaStyle={
offset: 0, color: new this.echarts.graphic.LinearGradient(0, 0, 0, 1, [{
color: option.color[index] offset: 0,
}, { color: option.color[index]
offset: 1, }, {
color: '#fff' offset: 1,
}]) color: '#fff'
}])
}
} }
item.symbol="emptyCircle"; item.symbol="emptyCircle";
item.symbolSize=uni.upx2px(12.7) item.symbolSize=uni.upx2px(18.7)
}) })
}
if(this.chartData.xaxis.data){ if(this.chartData.xaxis.data){
option.xAxis.data = this.chartData.xaxis.data; option.xAxis.data = this.chartData.xaxis.data;
}else{ }else{
......
...@@ -94,7 +94,21 @@ ...@@ -94,7 +94,21 @@
backgroundColor: '#fff', backgroundColor: '#fff',
color: ["#0069FF", "#3BB8FF", "#6784e3", "#ff9631", "#ffc62e","#7460ee","#eb6100"], color: ["#0069FF", "#3BB8FF", "#6784e3", "#ff9631", "#ffc62e","#7460ee","#eb6100"],
tooltip:{ tooltip:{
renderMode:'richText' padding:[5,15],
position: function(pos, params, dom, rect, size){
var obj={};
if(pos[0]+size.contentSize[0]>size.viewSize[0]){
obj['right']=size.viewSize[0]-pos[0]
}else{
obj['left']=pos[0]
}
if(pos[1]+size.contentSize[1]>size.viewSize[1]){
obj['bottom']=size.viewSize[1]-pos[1]
}else{
obj['top']=pos[1]
}
return obj;
},
}, },
grid: { grid: {
left:uni.upx2px(76.08), left:uni.upx2px(76.08),
...@@ -168,7 +182,6 @@ ...@@ -168,7 +182,6 @@
}, },
series:this.chartData.series series:this.chartData.series
} }
if(this.chartData.series.length>1){
this.chartData.series.forEach((item,index)=>{ this.chartData.series.forEach((item,index)=>{
var legendObj = {}; var legendObj = {};
if(index<2){ if(index<2){
...@@ -179,19 +192,21 @@ ...@@ -179,19 +192,21 @@
legendObj.name = item.name; legendObj.name = item.name;
legendObj.icon="emptyCircle" legendObj.icon="emptyCircle"
option.legend.data.push(legendObj); option.legend.data.push(legendObj);
item.areaStyle={ if(this.chartData.series.length>1){
color: new this.echarts.graphic.LinearGradient(0, 0, 0, 1, [{ item.areaStyle={
offset: 0, color: new this.echarts.graphic.LinearGradient(0, 0, 0, 1, [{
color: option.color[index] offset: 0,
}, { color: option.color[index]
offset: 1, }, {
color: '#fff' offset: 1,
}]) color: '#fff'
}])
}
} }
item.symbol="emptyCircle"; item.symbol="emptyCircle";
item.symbolSize=uni.upx2px(12.7) item.symbolSize=uni.upx2px(18.7)
}) })
} console.log(option)
option.xAxis.data = this.chartData.xaxis.data; option.xAxis.data = this.chartData.xaxis.data;
// myChart.clear(); // myChart.clear();
setTimeout(() => { setTimeout(() => {
......
...@@ -58,7 +58,21 @@ ...@@ -58,7 +58,21 @@
} }
}, },
tooltip:{ tooltip:{
renderMode:'richText' padding:[5,15],
position: function(pos, params, dom, rect, size){
var obj={};
if(pos[0]+size.contentSize[0]>size.viewSize[0]){
obj['right']=size.viewSize[0]-pos[0]
}else{
obj['left']=pos[0]
}
if(pos[1]+size.contentSize[1]>size.viewSize[1]){
obj['bottom']=size.viewSize[1]-pos[1]
}else{
obj['top']=pos[1]
}
return obj;
},
}, },
color: ["#3BB8FF", "#FFC62E", "#87D14B", "#FFC62E", "#FF9631"], color: ["#3BB8FF", "#FFC62E", "#87D14B", "#FFC62E", "#FF9631"],
grid: { grid: {
......
...@@ -59,7 +59,21 @@ ...@@ -59,7 +59,21 @@
} }
}, },
tooltip:{ tooltip:{
renderMode:'richText' padding:[5,15],
position: function(pos, params, dom, rect, size){
var obj={};
if(pos[0]+size.contentSize[0]>size.viewSize[0]){
obj['right']=size.viewSize[0]-pos[0]
}else{
obj['left']=pos[0]
}
if(pos[1]+size.contentSize[1]>size.viewSize[1]){
obj['bottom']=size.viewSize[1]-pos[1]
}else{
obj['top']=pos[1]
}
return obj;
},
}, },
grid: { grid: {
left:uni.upx2px(76.08), left:uni.upx2px(76.08),
......
...@@ -116,7 +116,7 @@ ...@@ -116,7 +116,7 @@
a1=currentYear[0]; a1=currentYear[0];
} }
var from='',to=''; var from='',to='';
var year =1999+a1; var year =new Date().getFullYear()-15+a1;
from=year+'-01-01'; from=year+'-01-01';
to=year+'-12-31'; to=year+'-12-31';
this.date=from+','+to; this.date=from+','+to;
......
...@@ -941,7 +941,7 @@ ...@@ -941,7 +941,7 @@
this.handleWeek2Confirm(item) this.handleWeek2Confirm(item)
}, },
handleDayConfirm(item){ handleDayConfirm(item){
var year =1999+item[0].index; var year =new Date().getFullYear()-15+item[0].index;
var month=item[1].index+1; var month=item[1].index+1;
var day =item[2].index+1; var day =item[2].index+1;
month=month>9?month:'0'+month; month=month>9?month:'0'+month;
...@@ -952,14 +952,17 @@ ...@@ -952,14 +952,17 @@
key:'selectDate', key:'selectDate',
data:this.date data:this.date
}) })
var arr=[];
item.forEach(res=>{
arr.push(res.index)
})
uni.setStorage({ uni.setStorage({
key:'currentDay', key:'currentDay',
data:JSON.stringify(item) data:JSON.stringify(arr)
}) })
console.log(item)
}, },
handleWeekConfirm(item){ handleWeekConfirm(item){
var year =1999+item[0].index; var year =new Date().getFullYear()-15+item[0].index;
var month=item[1].index+1; var month=item[1].index+1;
month=month>9?month:'0'+month; month=month>9?month:'0'+month;
var d = new Date(); var d = new Date();
...@@ -1012,7 +1015,7 @@ ...@@ -1012,7 +1015,7 @@
}) })
}, },
handleWeek2Confirm(item){ handleWeek2Confirm(item){
var year =1999+item[0].index; var year =new Date().getFullYear()-15+item[0].index;
var month=item[1].index+1; var month=item[1].index+1;
month=month>9?month:'0'+month; month=month>9?month:'0'+month;
var d = new Date(); var d = new Date();
...@@ -1065,7 +1068,7 @@ ...@@ -1065,7 +1068,7 @@
}) })
}, },
handleMonthConfirm(item){ handleMonthConfirm(item){
var year =1999+item[0].index; var year =new Date().getFullYear()-15+item[0].index;
var month=item[1].index+1; var month=item[1].index+1;
var currentYear=new Date().getFullYear(); var currentYear=new Date().getFullYear();
var currentMonth=new Date().getMonth()+1; var currentMonth=new Date().getMonth()+1;
...@@ -1097,7 +1100,7 @@ ...@@ -1097,7 +1100,7 @@
}, },
handleYearConfirm(item){ handleYearConfirm(item){
var from='',to=''; var from='',to='';
var year =1999+item[0].index; var year =new Date().getFullYear()-15+item[0].index;
from=year+'-01-01'; from=year+'-01-01';
to=year+'-12-31'; to=year+'-12-31';
this.date=from+','+to; this.date=from+','+to;
......
...@@ -129,7 +129,7 @@ ...@@ -129,7 +129,7 @@
a1=currentYear[0]; a1=currentYear[0];
} }
var from='',to=''; var from='',to='';
var year =1999+a1; var year =new Date().getFullYear()-15+a1;
from=year+'-01-01'; from=year+'-01-01';
to=year+'-12-31'; to=year+'-12-31';
this.date=from+','+to; this.date=from+','+to;
......
...@@ -116,7 +116,7 @@ ...@@ -116,7 +116,7 @@
a2=currentWeek[1]; a2=currentWeek[1];
a3=currentWeek[2]; a3=currentWeek[2];
} }
var year =1999+a1; var year =new Date().getFullYear()-15+a1;
var month=a2+1; var month=a2+1;
month=month>9?month:'0'+month; month=month>9?month:'0'+month;
var d = new Date(); var d = new Date();
......
...@@ -115,7 +115,7 @@ ...@@ -115,7 +115,7 @@
a2=currentWeek[1]; a2=currentWeek[1];
a3=currentWeek[2]; a3=currentWeek[2];
} }
var year =1999+a1; var year =new Date().getFullYear()-15+a1;
var month=a2+1; var month=a2+1;
month=month>9?month:'0'+month; month=month>9?month:'0'+month;
var d = new Date(); var d = new Date();
......
...@@ -294,7 +294,7 @@ ...@@ -294,7 +294,7 @@
} }
}) })
uni.getStorage({ uni.getStorage({
key:'orgIds', key:'accountId',
success:(res)=>{ success:(res)=>{
this.orgIds=res.data; this.orgIds=res.data;
} }
...@@ -340,7 +340,7 @@ ...@@ -340,7 +340,7 @@
} }
}, },
handleDayConfirm(item){ handleDayConfirm(item){
var year =1999+item[0].index; var year =new Date().getFullYear()-15+item[0].index;
var month=item[1].index+1; var month=item[1].index+1;
var day =item[2].index+1; var day =item[2].index+1;
month=month>9?month:'0'+month; month=month>9?month:'0'+month;
...@@ -351,7 +351,7 @@ ...@@ -351,7 +351,7 @@
this.getReportKey(); this.getReportKey();
}, },
handleWeekConfirm(item){ handleWeekConfirm(item){
var year =1999+item[0].index; var year =new Date().getFullYear()-15+item[0].index;
var month=item[1].index+1; var month=item[1].index+1;
month=month>9?month:'0'+month; month=month>9?month:'0'+month;
var d = new Date(); var d = new Date();
...@@ -399,7 +399,7 @@ ...@@ -399,7 +399,7 @@
this.getReportKey(); this.getReportKey();
}, },
handleMonthConfirm(item){ handleMonthConfirm(item){
var year =1999+item[0].index; var year =new Date().getFullYear()-15+item[0].index;
var month=item[1].index+1; var month=item[1].index+1;
var currentYear=new Date().getFullYear(); var currentYear=new Date().getFullYear();
var currentMonth=new Date().getMonth()+1; var currentMonth=new Date().getMonth()+1;
...@@ -426,7 +426,7 @@ ...@@ -426,7 +426,7 @@
}, },
handleYearConfirm(item){ handleYearConfirm(item){
var from='',to=''; var from='',to='';
var year =1999+item[0].index; var year =new Date().getFullYear()-15+item[0].index;
from=year+'-01-01'; from=year+'-01-01';
to=year+'-12-31'; to=year+'-12-31';
this.reportType='month'; this.reportType='month';
......
...@@ -345,7 +345,7 @@ ...@@ -345,7 +345,7 @@
}, },
methods: { methods: {
handleDayConfirm(item){ handleDayConfirm(item){
var year =1999+item[0].index; var year =new Date().getFullYear()-15+item[0].index;
var month=item[1].index+1; var month=item[1].index+1;
var day =item[2].index+1; var day =item[2].index+1;
month=month>9?month:'0'+month; month=month>9?month:'0'+month;
...@@ -356,7 +356,7 @@ ...@@ -356,7 +356,7 @@
this.getReportKey(); this.getReportKey();
}, },
handleWeekConfirm(item){ handleWeekConfirm(item){
var year =1999+item[0].index; var year =new Date().getFullYear()-15+item[0].index;
var month=item[1].index+1; var month=item[1].index+1;
month=month>9?month:'0'+month; month=month>9?month:'0'+month;
var d = new Date(); var d = new Date();
...@@ -404,7 +404,7 @@ ...@@ -404,7 +404,7 @@
this.getReportKey(); this.getReportKey();
}, },
handleMonthConfirm(item){ handleMonthConfirm(item){
var year =1999+item[0].index; var year =new Date().getFullYear()-15+item[0].index;
var month=item[1].index+1; var month=item[1].index+1;
var currentYear=new Date().getFullYear(); var currentYear=new Date().getFullYear();
var currentMonth=new Date().getMonth()+1; var currentMonth=new Date().getMonth()+1;
...@@ -431,7 +431,7 @@ ...@@ -431,7 +431,7 @@
}, },
handleYearConfirm(item){ handleYearConfirm(item){
var from='',to=''; var from='',to='';
var year =1999+item[0].index; var year =new Date().getFullYear()-15+item[0].index;
from=year+'-01-01'; from=year+'-01-01';
to=year+'-12-31'; to=year+'-12-31';
this.reportType='month'; this.reportType='month';
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<accountindex v-if="type=='account'"></accountindex> <accountindex v-if="type=='account'"></accountindex>
<mallindex v-else-if="type=='mall'"></mallindex> <mallindex v-else-if="type=='mall'"></mallindex>
<floorindex v-else-if="type=='floor'"></floorindex> <floorindex v-else-if="type=='floor'"></floorindex>
<zoneindex v-else-if="type=='zone'"></zoneindex> <zoneindex v-else-if="type=='shop'"></zoneindex>
</view> </view>
</template> </template>
......
...@@ -300,12 +300,6 @@ ...@@ -300,12 +300,6 @@
} }
}) })
uni.getStorage({ uni.getStorage({
key:'orgIds',
success:(res)=>{
this.orgIds=res.data;
}
})
uni.getStorage({
key:'orgName', key:'orgName',
success:(res)=>{ success:(res)=>{
this.title=res.data; this.title=res.data;
...@@ -332,12 +326,50 @@ ...@@ -332,12 +326,50 @@
}) })
}, },
mounted(){ mounted(){
this.getReportKey(); uni.getStorage({
this.initFresh(); key:'orgIds',
success:(res)=>{
this.orgIds=res.data;
this.getReportKey();
this.initFresh();
},
complete:(res)=>{
if(!res.data){
uni.getStorage({
key:'accountId',
success:(res)=>{
uni.request({
url: window.url + '/malls',
data:{
accountId:res.data,
status:1,
_t:Date.parse(new Date())/1000
},
header: {
'Authorization': this.atoken //自定义请求头信息
},
method:'GET',
success:(res) =>{
if(res.data.data[0]){
this.orgIds=res.data.data[0].id;
uni.setStorage({
key:'orgIds',
data:this.orgIds
})
this.getReportKey();
this.initFresh();
}
}
})
}
})
}
}
})
}, },
methods: { methods: {
handleDayConfirm(item){ handleDayConfirm(item){
var year =1999+item[0].index; var year =new Date().getFullYear()-15+item[0].index;
var month=item[1].index+1; var month=item[1].index+1;
var day =item[2].index+1; var day =item[2].index+1;
month=month>9?month:'0'+month; month=month>9?month:'0'+month;
...@@ -348,7 +380,7 @@ ...@@ -348,7 +380,7 @@
this.getReportKey(); this.getReportKey();
}, },
handleWeekConfirm(item){ handleWeekConfirm(item){
var year =1999+item[0].index; var year =new Date().getFullYear()-15+item[0].index;
var month=item[1].index+1; var month=item[1].index+1;
month=month>9?month:'0'+month; month=month>9?month:'0'+month;
var d = new Date(); var d = new Date();
...@@ -396,7 +428,7 @@ ...@@ -396,7 +428,7 @@
this.getReportKey(); this.getReportKey();
}, },
handleMonthConfirm(item){ handleMonthConfirm(item){
var year =1999+item[0].index; var year =new Date().getFullYear()-15+item[0].index;
var month=item[1].index+1; var month=item[1].index+1;
var currentYear=new Date().getFullYear(); var currentYear=new Date().getFullYear();
var currentMonth=new Date().getMonth()+1; var currentMonth=new Date().getMonth()+1;
...@@ -423,7 +455,7 @@ ...@@ -423,7 +455,7 @@
}, },
handleYearConfirm(item){ handleYearConfirm(item){
var from='',to=''; var from='',to='';
var year =1999+item[0].index; var year =new Date().getFullYear()-15+item[0].index;
from=year+'-01-01'; from=year+'-01-01';
to=year+'-12-31'; to=year+'-12-31';
this.reportType='month'; this.reportType='month';
......
...@@ -72,14 +72,20 @@ ...@@ -72,14 +72,20 @@
data:id data:id
}) })
if(id==this.id){ if(id==this.id){
uni.setStorage({ uni.getStorage({
key:'type', key:'homes',
data:'account' success:(res)=>{
}) uni.setStorage({
uni.setStorage({ key:'type',
key:'orgName', data:res.data
data:this.accountName })
uni.setStorage({
key:'orgName',
data:this.accountName
})
}
}) })
}else{ }else{
uni.setStorage({ uni.setStorage({
key:'type', key:'type',
......
...@@ -340,7 +340,7 @@ ...@@ -340,7 +340,7 @@
}, },
methods: { methods: {
handleDayConfirm(item){ handleDayConfirm(item){
var year =1999+item[0].index; var year =new Date().getFullYear()-15+item[0].index;
var month=item[1].index+1; var month=item[1].index+1;
var day =item[2].index+1; var day =item[2].index+1;
month=month>9?month:'0'+month; month=month>9?month:'0'+month;
...@@ -351,7 +351,7 @@ ...@@ -351,7 +351,7 @@
this.getReportKey(); this.getReportKey();
}, },
handleWeekConfirm(item){ handleWeekConfirm(item){
var year =1999+item[0].index; var year =new Date().getFullYear()-15+item[0].index;
var month=item[1].index+1; var month=item[1].index+1;
month=month>9?month:'0'+month; month=month>9?month:'0'+month;
var d = new Date(); var d = new Date();
...@@ -399,7 +399,7 @@ ...@@ -399,7 +399,7 @@
this.getReportKey(); this.getReportKey();
}, },
handleMonthConfirm(item){ handleMonthConfirm(item){
var year =1999+item[0].index; var year =new Date().getFullYear()-15+item[0].index;
var month=item[1].index+1; var month=item[1].index+1;
var currentYear=new Date().getFullYear(); var currentYear=new Date().getFullYear();
var currentMonth=new Date().getMonth()+1; var currentMonth=new Date().getMonth()+1;
...@@ -426,7 +426,7 @@ ...@@ -426,7 +426,7 @@
}, },
handleYearConfirm(item){ handleYearConfirm(item){
var from='',to=''; var from='',to='';
var year =1999+item[0].index; var year =new Date().getFullYear()-15+item[0].index;
from=year+'-01-01'; from=year+'-01-01';
to=year+'-12-31'; to=year+'-12-31';
this.reportType='month'; this.reportType='month';
......
...@@ -67,18 +67,25 @@ ...@@ -67,18 +67,25 @@
console.log(e); console.log(e);
}, },
selectStore(id,name){ selectStore(id,name){
uni.setStorage({
key:'orgIds',
data:id
})
if(id==this.id&&name=='all'){ if(id==this.id&&name=='all'){
uni.setStorage({ uni.getStorage({
key:'type', key:'homes',
data:'account' success:(res)=>{
}) if(res.data=='account'){
uni.setStorage({ uni.setStorage({
key:'orgName', key:'orgIds',
data:this.accountName data:id
})
}
uni.setStorage({
key:'type',
data:res.data
})
uni.setStorage({
key:'orgName',
data:this.accountName
})
}
}) })
}else{ }else{
uni.setStorage({ uni.setStorage({
...@@ -89,6 +96,10 @@ ...@@ -89,6 +96,10 @@
key:'orgName', key:'orgName',
data:name data:name
}) })
uni.setStorage({
key:'orgIds',
data:id
})
} }
uni.reLaunch({ uni.reLaunch({
url:this.url, url:this.url,
......
...@@ -71,7 +71,9 @@ ...@@ -71,7 +71,9 @@
getDate(){ getDate(){
var dayData=[]; var dayData=[];
var obj={}; var obj={};
for(var i=1999;i<2020;i++){ var lastyears=new Date().getFullYear()+4;
var firtyears=new Date().getFullYear()-15;
for(var i=firtyears;i<lastyears;i++){
obj={ obj={
'value':i+'年', 'value':i+'年',
'children':[] 'children':[]
...@@ -112,7 +114,9 @@ ...@@ -112,7 +114,9 @@
var weekData=[]; var weekData=[];
var currentWeek=[]; var currentWeek=[];
var currentDay=[]; var currentDay=[];
for(var i=1999;i<2020;i++){ var lastyears=new Date().getFullYear()+4;
var firtyears=new Date().getFullYear()-15;
for(var i=firtyears;i<lastyears;i++){
yearArr.push(i+'年') yearArr.push(i+'年')
} }
yearData.push(yearArr) yearData.push(yearArr)
...@@ -133,7 +137,7 @@ ...@@ -133,7 +137,7 @@
const date = new Date(); const date = new Date();
var year = date.getFullYear(); var year = date.getFullYear();
var yearIndex=year-1999 var yearIndex=year-firtyears;
currentYear.push(yearIndex); currentYear.push(yearIndex);
var monthIndex = date.getMonth(); var monthIndex = date.getMonth();
...@@ -189,6 +193,18 @@ ...@@ -189,6 +193,18 @@
if(item.children){ if(item.children){
this.constructorData(item.children) this.constructorData(item.children)
} }
if(item.name=='home'){
if(item.children[0]){
uni.setStorage({
key:'homes',
data:item.children[0].name
})
uni.setStorage({
key:'type',
data:item.children[0].name
})
}
}
this.list.push({name:item.name}) this.list.push({name:item.name})
}) })
}, },
...@@ -309,7 +325,7 @@ ...@@ -309,7 +325,7 @@
method:'GET', method:'GET',
success:(res) =>{ success:(res) =>{
this.constructorData(res.data.menu_tree) this.constructorData(res.data.menu_tree)
localStorage.setItem('menus',JSON.stringify(this.list)) localStorage.setItem('menus',JSON.stringify(this.list));
uni.request({ uni.request({
url: window.url + "/accounts", url: window.url + "/accounts",
data:{ data:{
...@@ -369,14 +385,6 @@ ...@@ -369,14 +385,6 @@
key:'accountId', key:'accountId',
data:data.data.user.accountId data:data.data.user.accountId
}) })
uni.setStorage({
key:'orgIds',
data:data.data.user.accountId
})
uni.setStorage({
key:'type',
data:'account'
})
}else{ }else{
uni.showToast({ uni.showToast({
icon:'none', icon:'none',
...@@ -441,12 +449,14 @@ ...@@ -441,12 +449,14 @@
top: 16.3upx; top: 16.3upx;
} }
.userInput{ .userInput{
position: relative;
display: inline-block; display: inline-block;
font-size: 30.79upx; font-size: 30.79upx;
top: 9.05upx; top: 9.05upx;
left:54.34upx; left:54.34upx;
} }
.pwdInput{ .pwdInput{
position: relative;
display: inline-block; display: inline-block;
font-size: 30.79upx; font-size: 30.79upx;
top: 9.05upx; top: 9.05upx;
......
...@@ -70,7 +70,8 @@ ...@@ -70,7 +70,8 @@
//window.parent.childToParent(); //window.parent.childToParent();
var chanid = localStorage.getItem('channelId'); var chanid = localStorage.getItem('channelId');
//var chanid='FL00179K07:1'; //var chanid='FL00179K07:1';
var serveip = "store.keliuyun.com"; // var serveip = "47.94.37.10:39401";
var serveip = "video.keliuyun.com"
var account = "storeVideo"; var account = "storeVideo";
var pwd = "Vion2019"; var pwd = "Vion2019";
var tk = ""; // 用来保存登录时获取的token,并作为申请预览时的url附带参数 var tk = ""; // 用来保存登录时获取的token,并作为申请预览时的url附带参数
...@@ -162,7 +163,7 @@ ...@@ -162,7 +163,7 @@
}; };
// ajax post方式发送请求 // ajax post方式发送请求
ajaxPost(localStorage.getItem('url')+"../../../../webapi/login",param,function(res){ ajaxPost("https://"+ serveip +":18443/webapi/login",param,function(res){
if (res.ret == 0) { if (res.ret == 0) {
tk = res.tk tk = res.tk
} else{ } else{
...@@ -176,23 +177,17 @@ ...@@ -176,23 +177,17 @@
"chan_serial": chanid // 获取预览的url接口,只需要通道id一个参数 "chan_serial": chanid // 获取预览的url接口,只需要通道id一个参数
}; };
// ajax post方式发送请求 // ajax post方式发送请求
ajaxPost(localStorage.getItem('url')+"../../../../webapi/v4/preview/view?tk="+tk,param,function(res){ ajaxPost("https://"+ serveip +":18443/webapi/v4/preview/view?tk="+tk,param,function(res){
console.log(JSON.stringify(res)); console.log(JSON.stringify(res));
if (res.ret == 0) { if (res.ret == 0) {
// if(location.protocol=='https:'){ liveUrl = res.view_context.replace("ws://","wss://").replace(":39401",":18443")
liveUrl = res.view_context.replace("ws://","wss://").replace('47.94.37.10:39401/live/ws','store.keliuyun.com/wss') liveUrl = liveUrl.replace("127.0.0.1", "video.keliuyun.com")
// }else {
// liveUrl = res.view_context.replace("ws://","wss://").replace('47.94.37.10:39401/live/ws','store.keliuyun.com/wss')
// }
player.start(liveUrl) player.start(liveUrl)
} else{ } else{
console.log(res.msg) console.log(res.msg)
} }
}); });
} }
} }
</script> </script>
</html> </html>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!