From 8d3186f80e7e1dcb489dab9c5d6b0b81e219aeb6 Mon Sep 17 00:00:00 2001
From: 罗广辉 <guanghui.luo@foxmail.com>
Date: Tue, 14 Oct 2025 14:46:58 +0800
Subject: [PATCH] feat: 已执行
---
/dev/null | 27 -------------
src/pages.json | 4 +-
package.json | 8 ---
src/pages/inspectionTask/TaskDetails/TaskDetails.vue | 33 ++++------------
src/pages/inspectionTask/index.vue | 2
5 files changed, 12 insertions(+), 62 deletions(-)
diff --git a/package.json b/package.json
index 6879d02..064f526 100644
--- a/package.json
+++ b/package.json
@@ -54,7 +54,6 @@
"stylelint": "stylelint \"src/**/*.{vue,scss,css,sass,less}\"",
"stylelint:fix": "stylelint \"src/**/*.{vue,scss,css,sass,less}\" --fix",
"cz": "git add . && npx czg",
- "postinstall": "simple-git-hooks",
"clean": "npx rimraf node_modules",
"clean:cache": "npx rimraf node_modules/.cache"
},
@@ -110,7 +109,6 @@
"rollup-plugin-visualizer": "^6.0.3",
"sass": "1.79.6",
"sass-loader": "^16.0.4",
- "simple-git-hooks": "^2.13.1",
"stylelint": "^16.23.0",
"stylelint-config-recess-order": "^6.1.0",
"stylelint-config-standard": "^39.0.0",
@@ -130,10 +128,6 @@
"vue": "3.4.21"
}
},
- "simple-git-hooks": {
- "pre-commit": "npx lint-staged",
- "commit-msg": "node ./scripts/verify-commit.js"
- },
"lint-staged": {
"src/**/*.{js,jsx}": "eslint --fix",
"*.{scss,css,style,html}": "stylelint --fix",
@@ -142,4 +136,4 @@
"stylelint --fix"
]
}
-}
\ No newline at end of file
+}
diff --git a/scripts/verify-commit.js b/scripts/verify-commit.js
deleted file mode 100644
index 29a52eb..0000000
--- a/scripts/verify-commit.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 提交信息校验
- * @link https://github.com/toplenboren/simple-git-hooks
- * @see 参考:https://github.com/vuejs/vue-next/blob/master/.github/commit-convention.md
- */
-import { readFileSync } from 'node:fs'
-import path from 'node:path'
-import process from 'node:process'
-import pico from 'picocolors'
-
-const msgPath = path.resolve('.git/COMMIT_EDITMSG')
-const msg = readFileSync(msgPath, 'utf-8').trim()
-
-const commitRE
- = /^(?:revert: )?(?:feat|fix|docs|dx|style|refactor|perf|test|workflow|build|ci|chore|types|wip|mod|release|strengthen)(?:\(.+\))?: .{1,50}/
-
-if (!commitRE.test(msg)) {
- console.log(pico.yellow(`\n提交的信息: ${msg}\n`))
- console.error(
- ` ${pico.white(pico.bgRed(' 格式错误 '))} ${pico.red(
- '无效的提交信息格式.',
- )}\n\n${pico.red(' 正确的提交消息格式. 例如:\n\n')
- } ${pico.green('feat: add a new feature')}\n`
- + ` ${pico.green('fix: fixed an bug')}`,
- )
- process.exit(1)
-}
diff --git a/src/pages.json b/src/pages.json
index bd3e562..7f23559 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -31,9 +31,9 @@
}
},
{
- "path": "pages/droneConsole/index",
+ "path": "pages/inspectionTask/TaskDetails/TaskDetails",
"style": {
- "navigationBarTitleText": "控制台",
+ "navigationBarTitleText": "已执行",
"navigationStyle": "custom"
}
},
diff --git a/src/pages/inspectionTask/TaskDetails/TaskDetails.vue b/src/pages/inspectionTask/TaskDetails/TaskDetails.vue
index ac3df84..2250eec 100644
--- a/src/pages/inspectionTask/TaskDetails/TaskDetails.vue
+++ b/src/pages/inspectionTask/TaskDetails/TaskDetails.vue
@@ -1,38 +1,21 @@
<template>
- <view class="page-wrap">
- <web-view
- ref="sWebViewRef"
- :src='`${viewUrl}?token=${token}&wayLineJodInfoId=${active.id}`'
- @message="onPostMessage"
- @onPostMessage="onPostMessage"
- />
- </view>
+ <WebViewPlus :src="`${viewUrl}`" @webMessage="onPostMessage"/>
</template>
<script setup>
-import {onLoad} from "@dcloudio/uni-app";
import {useUserStore} from "@/store/index.js";
+import WebViewPlus from "@/components/WebViewPlus.vue";
-const active = defineModel('active')
-const sWebViewRef = ref(null)
-const viewUrl = 'http://192.168.1.15:5173/drone-app-web-view/#/appTaskDetails'
const userStore = useUserStore()
-const token = computed(() => userStore?.userInfo?.access_token)
+const viewUrl = `http://192.168.1.15:5174/drone-app-web-view/#/appTaskDetails?params=${JSON.stringify(userStore?.userInfo)}`;
-function onPostMessage(event) {
- if (event.detail.data[0].type === 'back') {
- active.value = null
+
+
+function onPostMessage(data) {
+ if (data.type === 'back'){
+ uni.navigateBack()
}
}
-
-onLoad(() => {
- window.addEventListener('message', function (e) {
- if (e.data.data.type === 'back') {
- active.value = null
- }
- });
-})
-
</script>
<style scoped lang="scss">
diff --git a/src/pages/inspectionTask/index.vue b/src/pages/inspectionTask/index.vue
index 2500651..50efff3 100644
--- a/src/pages/inspectionTask/index.vue
+++ b/src/pages/inspectionTask/index.vue
@@ -8,7 +8,7 @@
const sWebViewRef = ref(null);
const userStore = useUserStore();
-const viewUrl = `http://192.168.1.178:5173/drone-app-web-view/#/webViewWrapper/inspectionTask?params=${JSON.stringify(userStore?.userInfo)}`;
+const viewUrl = `http://192.168.1.15:5174/drone-app-web-view/#/webViewWrapper/inspectionTask?params=${JSON.stringify(userStore?.userInfo)}`;
</script>
<style scoped lang="scss">
--
Gitblit v1.9.3