Commit e032f165 by Tianqing Liu

feat: 增加底部按钮区,截图功能

1 parent 3c7d3bd0
...@@ -9,11 +9,14 @@ ...@@ -9,11 +9,14 @@
</template> </template>
<script setup> <script setup>
const emit = defineEmits(['screenshot'])
function onClickIcon() { function onClickIcon() {
console.log('onClickIcon') console.log('onClickIcon')
} }
function onClickButton() { function onClickButton() {
console.log('onClickButton') console.log('onClickButton')
emit('screenshot')
} }
</script> </script>
......
...@@ -286,11 +286,11 @@ ...@@ -286,11 +286,11 @@
</div> </div>
<!--底部按钮区--> <!--底部按钮区-->
<VideoController /> <VideoController @screenshot="handleScreenshot"/>
</div> </div>
</template> </template>
<script setup> <script setup>
import { reactive, ref, onMounted, getCurrentInstance } from "vue"; import { ref, onMounted, getCurrentInstance } from "vue";
import { Toast } from "vant"; import { Toast } from "vant";
import livePlayer from "@/components/extension/index.vue"; import livePlayer from "@/components/extension/index.vue";
import VideoController from './controller.vue' import VideoController from './controller.vue'
...@@ -303,6 +303,10 @@ if (process.env.NODE_ENV !== "production") { ...@@ -303,6 +303,10 @@ if (process.env.NODE_ENV !== "production") {
import parse from "url-param-parser"; import parse from "url-param-parser";
// let url = 'https://store.keliuyun.com/video/?userId=8840&atoken=8eaf1373-654b-4cf2-a3c7-f90d42cba574&type=undefined&id=632&name=会议室门口&mallId=9217&mallName=河南分公司&bookmark=false&channelNo=4&deviceSerial=F16423875&gateUnid=cf21f4a8-65c6-11ee-837e-00163e143ecd&ptzEnable=0&aiChannelId=&mallOrgName=办公室&accountId=337&terminalType=devtools&newLevel=' // 萤石 // let url = 'https://store.keliuyun.com/video/?userId=8840&atoken=8eaf1373-654b-4cf2-a3c7-f90d42cba574&type=undefined&id=632&name=会议室门口&mallId=9217&mallName=河南分公司&bookmark=false&channelNo=4&deviceSerial=F16423875&gateUnid=cf21f4a8-65c6-11ee-837e-00163e143ecd&ptzEnable=0&aiChannelId=&mallOrgName=办公室&accountId=337&terminalType=devtools&newLevel=' // 萤石
function handleScreenshot() {
console.log('handleScreenshot')
goCaptureImg()
}
// const paramObj = parse(url).search || {} // const paramObj = parse(url).search || {}
const paramObj = parse(window.location.href).search || {}; const paramObj = parse(window.location.href).search || {};
/********************************/ /********************************/
...@@ -937,8 +941,15 @@ const pictureProcess = (imgUrl) => { ...@@ -937,8 +941,15 @@ const pictureProcess = (imgUrl) => {
capture(); capture();
}; };
} else { } else {
/***********巡店详情截图****************/ /***********APP截图****************/
if (paramObj.newLevel) { uni.postMessage({
type: "inspection-screenshot",
data: {
imgUrl,
id: paramObj.id,
}
});
/* if (paramObj.newLevel) {
wx.miniProgram.redirectTo({ wx.miniProgram.redirectTo({
url: `/pages/tour/inspectionDetail/index?action=capture&picUrl=${imgUrl}&id=${paramObj.tid}`, url: `/pages/tour/inspectionDetail/index?action=capture&picUrl=${imgUrl}&id=${paramObj.tid}`,
}); });
...@@ -946,7 +957,7 @@ const pictureProcess = (imgUrl) => { ...@@ -946,7 +957,7 @@ const pictureProcess = (imgUrl) => {
wx.miniProgram.redirectTo({ wx.miniProgram.redirectTo({
url: `/pages/tour/titemDetail/index?action=capture&picUrl=${picUrl}&id=${paramObj.tid}`, url: `/pages/tour/titemDetail/index?action=capture&picUrl=${picUrl}&id=${paramObj.tid}`,
}); });
} } */
} }
}; };
onMounted(() => { onMounted(() => {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!