Browse Source

no message

devlop
xpz2018 3 years ago
parent
commit
a78fb7d31b
4 changed files with 29 additions and 14 deletions
  1. 4
      manifest.json
  2. 21
      pages/camera-list/index.vue
  3. 18
      pages/digital-workshops/index.vue
  4. BIN
      static/imgs/digital-workshops/icon-play.png

4
manifest.json

@ -2,8 +2,8 @@
"name" : "印包管家",
"appid" : "__UNI__EBBA73E",
"description" : "",
"versionName" : "1.0.4",
"versionCode" : 100,
"versionName" : "1.0.5",
"versionCode" : 101,
"transformPx" : false,
"networkTimeout" : {
"request" : 6000

21
pages/camera-list/index.vue

@ -2,15 +2,16 @@
<view class="content">
<uni-nav-bar left-icon="back" @clickLeft="back" statusBar fixed title="全部摄像头"></uni-nav-bar>
<view class="flex-col section_8" v-for="(camera, index) in cameraList" :key="index">
<view class="flex-col items-center group_12">
<video :src="camera.hlsUrl" autoplay class="image_2"></video>
<!-- <image src="/static/imgs/digital-workshops/camera-tip-bg.png" class="image_2" @click="go2('video-play', { url: camera.videoUrl })" /> -->
<text class="text_18" style="margin-top: 8rpx;">{{ camera.name }}</text>
<view class="flex-col items-center group_12" @click="go2('video-play', { url: encodeURIComponent(camera.hlsUrl) })">
<image :src="getImageurl(camera)" class="image_2" />
<image src="/static/imgs/digital-workshops/icon-play.png" class="image_3" v-if="camera.defaultImg"/>
<text class="text_18" style="color: black">{{ camera.name }}</text>
</view>
</view>
</view>
</template>
<script>
import { go2, back } from '@/utils/hook.js'
import { getCameraListApi } from '@/apis/factoryApi'
@ -37,7 +38,13 @@ export default {
this.cameraList = res
}
})
}
},
getImageurl(camera){
if(!camera.defaultImg){
return '/static/imgs/digital-workshops/camera-tip-bg.png'
}
return camera.defaultImg
}
}
}
</script>
@ -68,12 +75,12 @@ export default {
}
}
.group_12 {
// color: rgb(255, 255, 255);
color: rgb(255, 255, 255);
font-size: 30rpx;
font-weight: 500;
line-height: 40rpx;
white-space: nowrap;
// position: relative;
position: relative;
.image_2 {
width: 91.5vw;
height: 51.5vw;

18
pages/digital-workshops/index.vue

@ -58,8 +58,9 @@
<image src="/static/imgs/digital-workshops/right-arrow-icon.png" class="image_1" />
</view>
<view class="flex-col items-center group_12">
<image src="/static/imgs/digital-workshops/camera-tip-bg.png" class="image_2" @click="go2('video-play', { url: encodeURIComponent(cameraList[0].hlsUrl) })" />
<text class="text_18">{{ cameraList[0].address }}</text>
<image :src="cameraList[0].defaultImg" class="image_2" @click="go2('video-play', { url: encodeURIComponent(cameraList[0].hlsUrl) })" />
<text class="text_18">{{ cameraList[0].name }}</text>
<image src="/static/imgs/digital-workshops/icon-play.png" class="image_3" />
<!-- <video :src="cameraList[0].hlsUrl" autoplay class="image_2"></video> -->
</view>
</view>
@ -183,7 +184,7 @@ export default {
factoryId(val, oldVal) {
this.getCameraList()
this.getList()
this.upCallback()
this.downCallback()
this.isExample = this.factoryList.find((factory) => factory.value == val).isExample
},
refresh(val) {
@ -260,8 +261,7 @@ export default {
// }
data['所有设备'].type[list[i].typeName][0]++
}
data['所有设备'].list.push(list[i])
// data[''].list.push(list[i])
}
this.listObj = data
}).catch(err => {
@ -566,6 +566,14 @@ export default {
width: 91.5vw;
height: 51.5vw;
}
.image_3 {
width: 87rpx;
height: 87rpx;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}
.text_18 {
position: absolute;
left: 24rpx;

BIN
static/imgs/digital-workshops/icon-play.png

Before After
Width: 64  |  Height: 64  |  Size: 1.5 KiB
Loading…
Cancel
Save