|
@@ -15,10 +15,10 @@
|
|
|
</view>
|
|
</view>
|
|
|
<view style="position: relative;top:15vh;width: 100%;text-align: center">
|
|
<view style="position: relative;top:15vh;width: 100%;text-align: center">
|
|
|
|
|
|
|
|
- <image :src="imgUrl+'/detail/product.png'" :style="productSize"/>
|
|
|
|
|
|
|
+ <image :src="productImage" :style="productSize"/>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="tabs">
|
|
<view class="tabs">
|
|
|
- <view class="child_tab" @click="changeTab(1)">
|
|
|
|
|
|
|
+ <view class="child_tab" :class="firstMachine?'':'disabled_tab'" @click="changeTab(1,firstMachine)">
|
|
|
<image :src="imgUrl+'/detail/tab.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
|
|
<image :src="imgUrl+'/detail/tab.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
|
|
|
<image class="child_img" v-if="tabActive[0]" :src="imgUrl+'/detail/jianyao_on.png'" />
|
|
<image class="child_img" v-if="tabActive[0]" :src="imgUrl+'/detail/jianyao_on.png'" />
|
|
|
<image class="child_img" v-if="!tabActive[0]" :src="imgUrl+'/detail/jianyao_off.png'" />
|
|
<image class="child_img" v-if="!tabActive[0]" :src="imgUrl+'/detail/jianyao_off.png'" />
|
|
@@ -28,7 +28,7 @@
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
|
|
|
|
|
- <view class="child_tab" :class="secondMachine?'':'disabled_tab'" @click="changeTab(2)">
|
|
|
|
|
|
|
+ <view class="child_tab" :class="secondMachine?'':'disabled_tab'" @click="changeTab(2,secondMachine)">
|
|
|
<image :src="imgUrl+'/detail/tab.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
|
|
<image :src="imgUrl+'/detail/tab.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
|
|
|
<image class="child_img" v-if="tabActive[1]" :src="imgUrl+'/detail/jianyao_on.png'" />
|
|
<image class="child_img" v-if="tabActive[1]" :src="imgUrl+'/detail/jianyao_on.png'" />
|
|
|
<image class="child_img" v-if="!tabActive[1]" :src="imgUrl+'/detail/jianyao_off.png'" />
|
|
<image class="child_img" v-if="!tabActive[1]" :src="imgUrl+'/detail/jianyao_off.png'" />
|
|
@@ -37,7 +37,7 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
- <view class="child_tab" :class="thirdMachine?'':'disabled_tab'" @click="changeTab(3)">
|
|
|
|
|
|
|
+ <view class="child_tab" :class="thirdMachine?'':'disabled_tab'" @click="changeTab(3,thirdMachine)">
|
|
|
<image :src="imgUrl+'/detail/tab.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
|
|
<image :src="imgUrl+'/detail/tab.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
|
|
|
<image class="child_img" v-if="tabActive[2]" :src="imgUrl+'/detail/jianyao_on.png'" />
|
|
<image class="child_img" v-if="tabActive[2]" :src="imgUrl+'/detail/jianyao_on.png'" />
|
|
|
<image class="child_img" v-if="!tabActive[2]" :src="imgUrl+'/detail/jianyao_off.png'" />
|
|
<image class="child_img" v-if="!tabActive[2]" :src="imgUrl+'/detail/jianyao_off.png'" />
|
|
@@ -47,7 +47,7 @@
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
|
|
|
|
|
- <view class="child_tab" @click="changeTab(4)">
|
|
|
|
|
|
|
+ <view class="child_tab" :class="forthMachine?'':'disabled_tab'" @click="changeTab(4,forthMachine)">
|
|
|
<image :src="imgUrl+'/detail/tab.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
|
|
<image :src="imgUrl+'/detail/tab.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
|
|
|
<image class="child_img" v-if="firstTab" :src="imgUrl+'/detail/baozhuang_off.png'" />
|
|
<image class="child_img" v-if="firstTab" :src="imgUrl+'/detail/baozhuang_off.png'" />
|
|
|
<image class="child_img" v-if="!firstTab" :src="imgUrl+'/detail/baozhuang_on.png'" />
|
|
<image class="child_img" v-if="!firstTab" :src="imgUrl+'/detail/baozhuang_on.png'" />
|
|
@@ -635,6 +635,7 @@ export default {
|
|
|
{id:3,text:"常温常压"},
|
|
{id:3,text:"常温常压"},
|
|
|
]],
|
|
]],
|
|
|
productSize:"",
|
|
productSize:"",
|
|
|
|
|
+ productImage:"",
|
|
|
showModelPicker:false,
|
|
showModelPicker:false,
|
|
|
unitFixedStyle:"",
|
|
unitFixedStyle:"",
|
|
|
unitFixedStyle1:"",
|
|
unitFixedStyle1:"",
|
|
@@ -727,8 +728,10 @@ export default {
|
|
|
jianyaoPopClose:true,
|
|
jianyaoPopClose:true,
|
|
|
tabIndex:1,
|
|
tabIndex:1,
|
|
|
appid:"wxfd7b1a0e03e9b7e9",
|
|
appid:"wxfd7b1a0e03e9b7e9",
|
|
|
|
|
+ firstMachine:true,
|
|
|
secondMachine:false,
|
|
secondMachine:false,
|
|
|
thirdMachine:false,
|
|
thirdMachine:false,
|
|
|
|
|
+ forthMachine:true,
|
|
|
deviceType:1,
|
|
deviceType:1,
|
|
|
tabActive:[true,false,false],
|
|
tabActive:[true,false,false],
|
|
|
resetDuration:4000,
|
|
resetDuration:4000,
|
|
@@ -749,6 +752,7 @@ export default {
|
|
|
this.getDetail();
|
|
this.getDetail();
|
|
|
this.imgUrl = config.imgUrl
|
|
this.imgUrl = config.imgUrl
|
|
|
this.fixStyle();
|
|
this.fixStyle();
|
|
|
|
|
+ // this.fixImage();
|
|
|
// console.log = function(){}
|
|
// console.log = function(){}
|
|
|
},
|
|
},
|
|
|
destroyed() {
|
|
destroyed() {
|
|
@@ -757,6 +761,32 @@ export default {
|
|
|
clearTimeout(this.checkTimer);
|
|
clearTimeout(this.checkTimer);
|
|
|
},
|
|
},
|
|
|
methods:{
|
|
methods:{
|
|
|
|
|
+ fixImage(heng){
|
|
|
|
|
+ let self = this;
|
|
|
|
|
+ wx.getSystemInfo({
|
|
|
|
|
+ success: res => {
|
|
|
|
|
+ const { windowWidth, windowHeight, statusBarHeight } = res;
|
|
|
|
|
+ if(heng){
|
|
|
|
|
+ let rate = 0.35;
|
|
|
|
|
+ if(windowHeight<800){
|
|
|
|
|
+ rate = 0.30;
|
|
|
|
|
+ }
|
|
|
|
|
+ let imgHeight = windowWidth*0.85;
|
|
|
|
|
+ let imageWidth = windowWidth * 1;
|
|
|
|
|
+ self.productSize = ";width:"+imageWidth+"px;height:"+imgHeight+"px;";
|
|
|
|
|
+ }else{
|
|
|
|
|
+ let rate = 0.35;
|
|
|
|
|
+ if(windowHeight<800){
|
|
|
|
|
+ rate = 0.30;
|
|
|
|
|
+ }
|
|
|
|
|
+ let imgHeight = windowHeight*rate;
|
|
|
|
|
+ let imageWidth = imgHeight * 0.6;
|
|
|
|
|
+ self.productSize = ";width:"+imageWidth+"px;height:"+imgHeight+"px;";
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
propChange(type){
|
|
propChange(type){
|
|
|
// if(type == 1){
|
|
// if(type == 1){
|
|
|
|
|
|
|
@@ -1022,13 +1052,6 @@ export default {
|
|
|
}
|
|
}
|
|
|
self.maxWidth = windowWidth;
|
|
self.maxWidth = windowWidth;
|
|
|
|
|
|
|
|
- let rate = 0.35;
|
|
|
|
|
- if(windowHeight<800){
|
|
|
|
|
- rate = 0.30;
|
|
|
|
|
- }
|
|
|
|
|
- let imgHeight = windowHeight*rate;
|
|
|
|
|
- let imageWidth = imgHeight * 0.6;
|
|
|
|
|
- self.productSize = ";width:"+imageWidth+"px;height:"+imgHeight+"px;";
|
|
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
@@ -1055,7 +1078,10 @@ export default {
|
|
|
this.fengkouDlgShow = false;
|
|
this.fengkouDlgShow = false;
|
|
|
this.wenhuoTimeDlgShow = false;
|
|
this.wenhuoTimeDlgShow = false;
|
|
|
},
|
|
},
|
|
|
- changeTab(index){
|
|
|
|
|
|
|
+ changeTab(index,tag){
|
|
|
|
|
+ if(!tag){
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
let type = this.deviceType;
|
|
let type = this.deviceType;
|
|
|
let self = this;
|
|
let self = this;
|
|
|
if(index == 2 || index == 3){
|
|
if(index == 2 || index == 3){
|
|
@@ -1893,13 +1919,21 @@ export default {
|
|
|
self.mqttSubscribe(res.data);
|
|
self.mqttSubscribe(res.data);
|
|
|
self.getDeviceStatus();
|
|
self.getDeviceStatus();
|
|
|
self.seeTime();
|
|
self.seeTime();
|
|
|
- self.$forceUpdate();
|
|
|
|
|
|
|
+
|
|
|
|
|
+ let heng = false;
|
|
|
|
|
+ self.productImage = self.imgUrl+'/detail/product.png'
|
|
|
if(self.deviceType == 4 ||self.deviceType == 5 ){
|
|
if(self.deviceType == 4 ||self.deviceType == 5 ){
|
|
|
self.secondMachine = true;
|
|
self.secondMachine = true;
|
|
|
}
|
|
}
|
|
|
if(self.deviceType == 5){
|
|
if(self.deviceType == 5){
|
|
|
self.thirdMachine = true;
|
|
self.thirdMachine = true;
|
|
|
}
|
|
}
|
|
|
|
|
+ if(self.deviceType == 1 || self.deviceType == 7){
|
|
|
|
|
+ self.forthMachine = false;
|
|
|
|
|
+ self.productImage = self.imgUrl+'/product/YJH20.png'
|
|
|
|
|
+ }
|
|
|
|
|
+ self.fixImage(heng);
|
|
|
|
|
+ self.$forceUpdate();
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
getDeviceStatus(func){
|
|
getDeviceStatus(func){
|