|
|
@@ -1704,6 +1704,7 @@ Page({
|
|
|
sleep_durationCountA: 0,//睡眠时间
|
|
|
sns: [],
|
|
|
tvEntityIds: [],
|
|
|
+ ifOneMoreTV: false,//数据推送是否有多于一台电视
|
|
|
selectedValue: '', // 用于存储选中的值
|
|
|
tvEntityIdsValue: '', // 用于存储选中的值
|
|
|
selectedIndex: 0, // 默认选中第一个选项
|
|
|
@@ -1867,6 +1868,9 @@ Page({
|
|
|
});
|
|
|
this.telScreeProjection(selectedOption.entity_id);
|
|
|
},
|
|
|
+ tvEntityIdChange: function(e) {
|
|
|
+ this.telScreeProjection();
|
|
|
+ },
|
|
|
onPickerChange: function(e) {
|
|
|
var that = this;
|
|
|
var selectedOption = this.data.sns[e.detail.value];
|
|
|
@@ -3229,10 +3233,11 @@ initChart00(canvas, width, height,reportId){
|
|
|
},
|
|
|
success(ress) {
|
|
|
console.log('wx.getStorageSync(tvEntityId)='+wx.getStorageSync('tvEntityId'));
|
|
|
- console.log('tvEntityId='+tvEntityId);
|
|
|
- if(ress && ress.data && wx.getStorageSync('tvEntityId')){
|
|
|
+ console.log('tvEntityId='+JSON.stringify(tvEntityId));
|
|
|
+ let tvEntityIdss = tvEntityId?tvEntityId:wx.getStorageSync('tvEntityId')
|
|
|
+ if(ress && ress.data && tvEntityIdss){
|
|
|
console.log("ress.data=="+JSON.stringify(ress.data.url));
|
|
|
- console.log("wx.getStorageSync(tvEntityId)=="+wx.getStorageSync('tvEntityId'));
|
|
|
+ console.log("tvEntityIdss=="+tvEntityIdss);
|
|
|
wx.request({
|
|
|
// url: `${homeApi_http}`+':'+`${homeApi_http_port}`+'/api/services/media_player/play_media', //http
|
|
|
// url: `${homeApi_https}`+'/api/services/media_player/play_media', //https
|
|
|
@@ -3243,7 +3248,7 @@ initChart00(canvas, width, height,reportId){
|
|
|
'Authorization': 'Bearer ' + token // 在头部设置认证信息,例如使用Bearer Token
|
|
|
},
|
|
|
data:{
|
|
|
- "entity_id": wx.getStorageSync('tvEntityId'),
|
|
|
+ "entity_id": tvEntityIdss,
|
|
|
// "media_content_id": ress.data.url,
|
|
|
// "media_content_id": 'https://alifei01.cfp.cn/creative/vcg/800/new/VCG41175510742.jpg',
|
|
|
// "media_content_id": 'https://alifei01.cfp.cn/creative/vcg/veer/1600water/veer-368621010.jpg',
|
|
|
@@ -3288,7 +3293,7 @@ initChart00(canvas, width, height,reportId){
|
|
|
isLoading: false,
|
|
|
});
|
|
|
wx.showToast({
|
|
|
- title: '电视找不到,推送失败',
|
|
|
+ title: '找不到电视,推送失败',
|
|
|
icon: 'none'
|
|
|
});
|
|
|
}
|
|
|
@@ -3524,6 +3529,7 @@ initChart00(canvas, width, height,reportId){
|
|
|
sleep_durationCountA:that.convertTimeToHoursAndMinutes(sleep_durationCount?sleep_durationCount.toString():'0'),
|
|
|
sns:res.data,
|
|
|
tvEntityIds:wx.getStorageSync('tvEntityIds'),
|
|
|
+ ifOneMoreTV:(wx.getStorageSync('tvEntityIds') && wx.getStorageSync('tvEntityIds').length>1),
|
|
|
hotelname:res.data[0].hn,
|
|
|
rdeep_duration_efficiency:rdeep_duration_efficiency_temp,
|
|
|
rlight_duration_efficiency:rlight_duration_efficiency_temp,
|