Commit 8aa94e87 by Tianqing Liu

feat: 优化打包配置

1 parent 47a24b2a
...@@ -14,8 +14,9 @@ const routes = [ ...@@ -14,8 +14,9 @@ const routes = [
}, },
]; ];
const isDev = process.env.NODE_ENV === 'development';
const router = createRouter({ const router = createRouter({
history: createWebHistory(), history: createWebHistory(isDev ? '/' : '/apph5'),
routes, routes,
}); });
......
...@@ -180,12 +180,13 @@ ...@@ -180,12 +180,13 @@
<span class="text-ellipsis">{{ gateEditName }}</span> <span class="text-ellipsis">{{ gateEditName }}</span>
<van-icon class="icon" name="play" /> <van-icon class="icon" name="play" />
</span> </span>
<img <!--修改监控点名称-->
<!--<img
src="../src/assets/edit.png" src="../src/assets/edit.png"
alt="" alt=""
class="gate-name-edit-img" class="gate-name-edit-img"
@click="gateEdit" @click="gateEdit"
/> />-->
</div> </div>
<div class="box box1"> <div class="box box1">
<span v-if="bookmark" @click="delCollectGate"> <span v-if="bookmark" @click="delCollectGate">
...@@ -922,33 +923,20 @@ const screenshotEnd = (imgData) => { ...@@ -922,33 +923,20 @@ const screenshotEnd = (imgData) => {
}); });
}; };
const pictureProcess = (imgUrl) => { const pictureProcess = (imgUrl) => {
picUrl.value = imgUrl; // picUrl.value = imgUrl;
Toast.clear(); Toast.clear();
if (paramObj.type != "titem") {
// picUrl.value = 'https://store.keliuyun.com/images/patrol/capture/20230825/ecd2a635-84af-4968-bc30-1af130460d12.jpg'
vionPlayer.value.stopPlay();
let image = new Image();
image.src = "https://store.keliuyun.com/images/" + picUrl.value;
image.style.width = window.innerWidth + "px";
let heightC = window.innerWidth / 1.78;
image.style.height = heightC + "px";
image.crossOrigin = "Anonymous";
image.onload = () => {
captureCanvas.value.width = window.innerWidth;
captureCanvas.value.height = heightC;
let ctx = captureCanvas.value.getContext("2d");
ctx.drawImage(image, 0, 0, window.innerWidth, heightC);
capture();
};
} else {
/***********APP截图****************/ /***********APP截图****************/
uni.postMessage({ console.log('params', imgUrl, paramObj);
const params = {
type: "inspection-screenshot", type: "inspection-screenshot",
data: { data: {
imgUrl, imgUrl,
id: paramObj.id, id: paramObj.id,
} }
}); }
window.postMessage(params, '*');
uni.postMessage(params, '*');
/* if (paramObj.newLevel) { /* 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}`,
...@@ -958,7 +946,6 @@ const pictureProcess = (imgUrl) => { ...@@ -958,7 +946,6 @@ const pictureProcess = (imgUrl) => {
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(() => {
reqPatrolGateList(); reqPatrolGateList();
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!