完成调试

This commit is contained in:
BianLzhaoMin 2025-08-01 17:02:21 +08:00
parent 585322097d
commit 5d62557752
67 changed files with 13518 additions and 13259 deletions

25626
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,82 +1,82 @@
{
"name": "uni-preset-vue",
"version": "0.0.0",
"scripts": {
"dev:custom": "uni -p",
"dev:h5": "uni",
"dev:h5:ssr": "uni --ssr",
"dev:mp-alipay": "uni -p mp-alipay",
"dev:mp-baidu": "uni -p mp-baidu",
"dev:mp-jd": "uni -p mp-jd",
"dev:mp-kuaishou": "uni -p mp-kuaishou",
"dev:mp-lark": "uni -p mp-lark",
"dev:mp-qq": "uni -p mp-qq",
"dev:mp-toutiao": "uni -p mp-toutiao",
"dev:mp-weixin": "uni -p mp-weixin",
"dev:mp-xhs": "uni -p mp-xhs",
"dev:quickapp-webview": "uni -p quickapp-webview",
"dev:quickapp-webview-huawei": "uni -p quickapp-webview-huawei",
"dev:quickapp-webview-union": "uni -p quickapp-webview-union",
"build:custom": "uni build -p",
"build:h5": "uni build",
"build:h5:ssr": "uni build --ssr",
"build:mp-alipay": "uni build -p mp-alipay",
"build:mp-baidu": "uni build -p mp-baidu",
"build:mp-jd": "uni build -p mp-jd",
"build:mp-kuaishou": "uni build -p mp-kuaishou",
"build:mp-lark": "uni build -p mp-lark",
"build:mp-qq": "uni build -p mp-qq",
"build:mp-toutiao": "uni build -p mp-toutiao",
"build:mp-weixin": "uni build -p mp-weixin",
"build:mp-xhs": "uni build -p mp-xhs",
"build:quickapp-webview": "uni build -p quickapp-webview",
"build:quickapp-webview-huawei": "uni build -p quickapp-webview-huawei",
"build:quickapp-webview-union": "uni build -p quickapp-webview-union"
},
"dependencies": {
"@dcloudio/uni-app": "3.0.0-4050720250324001",
"@dcloudio/uni-app-harmony": "3.0.0-4050720250324001",
"@dcloudio/uni-app-plus": "3.0.0-4050720250324001",
"@dcloudio/uni-components": "3.0.0-4050720250324001",
"@dcloudio/uni-h5": "3.0.0-4050720250324001",
"@dcloudio/uni-mp-alipay": "3.0.0-4050720250324001",
"@dcloudio/uni-mp-baidu": "3.0.0-4050720250324001",
"@dcloudio/uni-mp-jd": "3.0.0-4050720250324001",
"@dcloudio/uni-mp-kuaishou": "3.0.0-4050720250324001",
"@dcloudio/uni-mp-lark": "3.0.0-4050720250324001",
"@dcloudio/uni-mp-qq": "3.0.0-4050720250324001",
"@dcloudio/uni-mp-toutiao": "3.0.0-4050720250324001",
"@dcloudio/uni-mp-weixin": "3.0.0-4050720250324001",
"@dcloudio/uni-mp-xhs": "3.0.0-4050720250324001",
"@dcloudio/uni-quickapp-webview": "3.0.0-4050720250324001",
"clipboard": "^2.0.11",
"crypto-js": "^4.2.0",
"dayjs": "^1.11.13",
"lodash-es": "^4.17.21",
"pinia": "^2.3.0",
"pinia-plugin-persistedstate": "^4.2.0",
"uview-plus": "^3.4.30",
"vue": "3.5.13",
"vue-i18n": "9.14.3"
},
"devDependencies": {
"@dcloudio/types": "3.4.14",
"@dcloudio/uni-automator": "3.0.0-4050720250324001",
"@dcloudio/uni-cli-shared": "3.0.0-4050720250324001",
"@dcloudio/uni-stacktracey": "3.0.0-4050720250324001",
"@dcloudio/vite-plugin-uni": "3.0.0-4050720250324001",
"@eslint/js": "^9.17.0",
"@vue/runtime-core": "3.5.13",
"eslint": "^9.17.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-vue": "^9.32.0",
"globals": "^15.14.0",
"prettier": "^3.4.2",
"sass": "^1.63.2",
"sass-loader": "^10.4.1",
"vite": "5.2.8",
"vite-plugin-eslint": "^1.8.1",
"vite-plugin-remove-console": "^2.2.0"
}
"name": "uni-preset-vue",
"version": "0.0.0",
"scripts": {
"dev:custom": "uni -p",
"dev:h5": "uni",
"dev:h5:ssr": "uni --ssr",
"dev:mp-alipay": "uni -p mp-alipay",
"dev:mp-baidu": "uni -p mp-baidu",
"dev:mp-jd": "uni -p mp-jd",
"dev:mp-kuaishou": "uni -p mp-kuaishou",
"dev:mp-lark": "uni -p mp-lark",
"dev:mp-qq": "uni -p mp-qq",
"dev:mp-toutiao": "uni -p mp-toutiao",
"dev:mp-weixin": "uni -p mp-weixin",
"dev:mp-xhs": "uni -p mp-xhs",
"dev:quickapp-webview": "uni -p quickapp-webview",
"dev:quickapp-webview-huawei": "uni -p quickapp-webview-huawei",
"dev:quickapp-webview-union": "uni -p quickapp-webview-union",
"build:custom": "uni build -p",
"build:h5": "uni build",
"build:h5:ssr": "uni build --ssr",
"build:mp-alipay": "uni build -p mp-alipay",
"build:mp-baidu": "uni build -p mp-baidu",
"build:mp-jd": "uni build -p mp-jd",
"build:mp-kuaishou": "uni build -p mp-kuaishou",
"build:mp-lark": "uni build -p mp-lark",
"build:mp-qq": "uni build -p mp-qq",
"build:mp-toutiao": "uni build -p mp-toutiao",
"build:mp-weixin": "uni build -p mp-weixin",
"build:mp-xhs": "uni build -p mp-xhs",
"build:quickapp-webview": "uni build -p quickapp-webview",
"build:quickapp-webview-huawei": "uni build -p quickapp-webview-huawei",
"build:quickapp-webview-union": "uni build -p quickapp-webview-union"
},
"dependencies": {
"@dcloudio/uni-app": "3.0.0-4050720250324001",
"@dcloudio/uni-app-harmony": "3.0.0-4050720250324001",
"@dcloudio/uni-app-plus": "3.0.0-4050720250324001",
"@dcloudio/uni-components": "3.0.0-4050720250324001",
"@dcloudio/uni-h5": "3.0.0-4050720250324001",
"@dcloudio/uni-mp-alipay": "3.0.0-4050720250324001",
"@dcloudio/uni-mp-baidu": "3.0.0-4050720250324001",
"@dcloudio/uni-mp-jd": "3.0.0-4050720250324001",
"@dcloudio/uni-mp-kuaishou": "3.0.0-4050720250324001",
"@dcloudio/uni-mp-lark": "3.0.0-4050720250324001",
"@dcloudio/uni-mp-qq": "3.0.0-4050720250324001",
"@dcloudio/uni-mp-toutiao": "3.0.0-4050720250324001",
"@dcloudio/uni-mp-weixin": "3.0.0-4050720250324001",
"@dcloudio/uni-mp-xhs": "3.0.0-4050720250324001",
"@dcloudio/uni-quickapp-webview": "3.0.0-4050720250324001",
"clipboard": "^2.0.11",
"crypto-js": "^4.2.0",
"dayjs": "^1.11.13",
"lodash-es": "^4.17.21",
"pinia": "^2.3.0",
"pinia-plugin-persistedstate": "^4.2.0",
"uview-plus": "^3.4.65",
"vue": "3.5.13",
"vue-i18n": "9.14.3"
},
"devDependencies": {
"@dcloudio/types": "3.4.14",
"@dcloudio/uni-automator": "3.0.0-4050720250324001",
"@dcloudio/uni-cli-shared": "3.0.0-4050720250324001",
"@dcloudio/uni-stacktracey": "3.0.0-4050720250324001",
"@dcloudio/vite-plugin-uni": "3.0.0-4050720250324001",
"@eslint/js": "^9.17.0",
"@vue/runtime-core": "3.5.13",
"eslint": "^9.17.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-vue": "^9.32.0",
"globals": "^15.14.0",
"prettier": "^3.4.2",
"sass": "^1.63.2",
"sass-loader": "^10.4.1",
"vite": "5.2.8",
"vite-plugin-eslint": "^1.8.1",
"vite-plugin-remove-console": "^2.2.0"
}
}

View File

@ -9,6 +9,7 @@ export default {
onHide: function () {
console.log('App Hide')
},
}
</script>

View File

@ -1,35 +1,34 @@
{
"name": "AR水运",
"appid": "__UNI__F75AFA9",
"description": "AR水运",
"versionName": "1.0.3",
"versionCode": 103,
"transformPx": false,
"name" : "AR水运",
"appid" : "__UNI__0A021AF",
"description" : "AR水运",
"versionName" : "1.0.0",
"versionCode" : 100,
"transformPx" : false,
/* 5+App */
"app-plus": {
"usingComponents": true,
"nvueStyleCompiler": "uni-app",
"compilerVersion": 3,
"compatible": {
"ignoreVersion": true //trueHBuilderX1.9.0
"app-plus" : {
"usingComponents" : true,
"nvueStyleCompiler" : "uni-app",
"compilerVersion" : 3,
"compatible" : {
"ignoreVersion" : true //trueHBuilderX1.9.0
},
"splashscreen": {
"alwaysShowBeforeRender": true,
"waiting": true,
"autoclose": true,
"delay": 0
"splashscreen" : {
"alwaysShowBeforeRender" : true,
"waiting" : true,
"autoclose" : true,
"delay" : 0
},
/* */
"modules": {
"Barcode": {},
"Camera": {}
"modules" : {
"Barcode" : {},
"Camera" : {}
},
/* */
"distribute": {
"distribute" : {
/* android */
"android": {
"permissions": [
"android" : {
"permissions" : [
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
@ -47,107 +46,108 @@
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.READ_EXTERNAL_STORAGE\"/>",
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
"<uses-permission android:name=\"android.permission.INTERNET\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>"
]
"<uses-permission android:name=\"android.permission.INTERNET\"/>"
],
"minSdkVersion" : 24,
"abiFilters" : [ "armeabi-v7a" ]
},
"webview": {
"allowFileAccess": true,
"allowUniversalAccessFromFileURLs": true
"webview" : {
"allowFileAccess" : true,
"allowUniversalAccessFromFileURLs" : true
},
/* ios */
"ios": {
"permissions": {
"WRITE_EXTERNAL_STORAGE": {
"description": "允许应用保存文件到外部存储",
"permission": "YES"
"ios" : {
"permissions" : {
"WRITE_EXTERNAL_STORAGE" : {
"description" : "允许应用保存文件到外部存储",
"permission" : "YES"
},
"READ_EXTERNAL_STORAGE": {
"description": "允许应用从外部存储读取文件",
"permission": "YES"
"READ_EXTERNAL_STORAGE" : {
"description" : "允许应用从外部存储读取文件",
"permission" : "YES"
}
},
"urlschemewhitelist": ["baidumap", "iosamap"],
"dSYMs": false,
"privacyDescription": {
"NSAppleMusicUsageDescription": "该应用需要访问您的媒体资料,以便为您编辑个人信息",
"NSPhotoLibraryUsageDescription": "该应用需要读取您的相册,以便为您编辑个人信息,更新头像设置",
"NSPhotoLibraryAddUsageDescription": "该应用需要读取您的相册,以便为您编辑个人信息,更新头像设置",
"NSCameraUsageDescription": "该应用需要您的相机,以便您拍摄上传个人信息,更新头像设置,验证是否为本人",
"NSMicrophoneUsageDescription": "",
"NSLocationWhenInUseUsageDescription": "该应用需要您的位置信息,以便为您编辑个人信息",
"NSLocationAlwaysUsageDescription": "该应用需要您的位置信息,以便为您编辑个人信息",
"NSLocationAlwaysAndWhenInUseUsageDescription": "该应用需要您的位置信息,以便为您编辑个人信息",
"NSCalendarsUsageDescription": "该应用需要您的日历,以便为您编辑个人信息",
"NSContactsUsageDescription": "",
"NSLocalNetworkUsageDescription": "该应用需要您的网络,以便为您编辑个人信息"
"urlschemewhitelist" : [ "baidumap", "iosamap" ],
"dSYMs" : false,
"privacyDescription" : {
"NSAppleMusicUsageDescription" : "该应用需要访问您的媒体资料,以便为您编辑个人信息",
"NSPhotoLibraryUsageDescription" : "该应用需要读取您的相册,以便为您编辑个人信息,更新头像设置",
"NSPhotoLibraryAddUsageDescription" : "该应用需要读取您的相册,以便为您编辑个人信息,更新头像设置",
"NSCameraUsageDescription" : "该应用需要您的相机,以便您拍摄上传个人信息,更新头像设置,验证是否为本人",
"NSMicrophoneUsageDescription" : "",
"NSLocationWhenInUseUsageDescription" : "该应用需要您的位置信息,以便为您编辑个人信息",
"NSLocationAlwaysUsageDescription" : "该应用需要您的位置信息,以便为您编辑个人信息",
"NSLocationAlwaysAndWhenInUseUsageDescription" : "该应用需要您的位置信息,以便为您编辑个人信息",
"NSCalendarsUsageDescription" : "该应用需要您的日历,以便为您编辑个人信息",
"NSContactsUsageDescription" : "",
"NSLocalNetworkUsageDescription" : "该应用需要您的网络,以便为您编辑个人信息"
},
"idfa": false
"idfa" : false
},
/* SDK */
"sdkConfigs": {
"maps": {}
"sdkConfigs" : {
"maps" : {}
},
"icons": {
"android": {
"hdpi": "unpackage/res/icons/72x72.png",
"xhdpi": "unpackage/res/icons/96x96.png",
"xxhdpi": "unpackage/res/icons/144x144.png",
"xxxhdpi": "unpackage/res/icons/192x192.png"
"icons" : {
"android" : {
"hdpi" : "unpackage/res/icons/72x72.png",
"xhdpi" : "unpackage/res/icons/96x96.png",
"xxhdpi" : "unpackage/res/icons/144x144.png",
"xxxhdpi" : "unpackage/res/icons/192x192.png"
},
"ios": {
"appstore": "unpackage/res/icons/1024x1024.png",
"ipad": {
"app": "unpackage/res/icons/76x76.png",
"app@2x": "unpackage/res/icons/152x152.png",
"notification": "unpackage/res/icons/20x20.png",
"notification@2x": "unpackage/res/icons/40x40.png",
"proapp@2x": "unpackage/res/icons/167x167.png",
"settings": "unpackage/res/icons/29x29.png",
"settings@2x": "unpackage/res/icons/58x58.png",
"spotlight": "unpackage/res/icons/40x40.png",
"spotlight@2x": "unpackage/res/icons/80x80.png"
"ios" : {
"appstore" : "unpackage/res/icons/1024x1024.png",
"ipad" : {
"app" : "unpackage/res/icons/76x76.png",
"app@2x" : "unpackage/res/icons/152x152.png",
"notification" : "unpackage/res/icons/20x20.png",
"notification@2x" : "unpackage/res/icons/40x40.png",
"proapp@2x" : "unpackage/res/icons/167x167.png",
"settings" : "unpackage/res/icons/29x29.png",
"settings@2x" : "unpackage/res/icons/58x58.png",
"spotlight" : "unpackage/res/icons/40x40.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png"
},
"iphone": {
"app@2x": "unpackage/res/icons/120x120.png",
"app@3x": "unpackage/res/icons/180x180.png",
"notification@2x": "unpackage/res/icons/40x40.png",
"notification@3x": "unpackage/res/icons/60x60.png",
"settings@2x": "unpackage/res/icons/58x58.png",
"settings@3x": "unpackage/res/icons/87x87.png",
"spotlight@2x": "unpackage/res/icons/80x80.png",
"spotlight@3x": "unpackage/res/icons/120x120.png"
"iphone" : {
"app@2x" : "unpackage/res/icons/120x120.png",
"app@3x" : "unpackage/res/icons/180x180.png",
"notification@2x" : "unpackage/res/icons/40x40.png",
"notification@3x" : "unpackage/res/icons/60x60.png",
"settings@2x" : "unpackage/res/icons/58x58.png",
"settings@3x" : "unpackage/res/icons/87x87.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png",
"spotlight@3x" : "unpackage/res/icons/120x120.png"
}
}
}
}
},
/* */
"quickapp": {},
"quickapp" : {},
/* */
"mp-weixin": {
"appid": "",
"setting": {
"urlCheck": false
"mp-weixin" : {
"appid" : "",
"setting" : {
"urlCheck" : false
},
"usingComponents": true,
"mergeVirtualHostAttributes": true
"usingComponents" : true,
"mergeVirtualHostAttributes" : true
},
"mp-alipay": {
"usingComponents": true
"mp-alipay" : {
"usingComponents" : true
},
"mp-baidu": {
"usingComponents": true
"mp-baidu" : {
"usingComponents" : true
},
"mp-toutiao": {
"usingComponents": true,
"mergeVirtualHostAttributes": true
"mp-toutiao" : {
"usingComponents" : true,
"mergeVirtualHostAttributes" : true
},
"uniStatistics": {
"enable": false
"uniStatistics" : {
"enable" : false
},
"vueVersion": "3",
"h5": {
"title": ""
"vueVersion" : "3",
"h5" : {
"title" : ""
}
}

View File

@ -2,7 +2,7 @@
<!-- AR检查 -->
<view class="ar-check-container">
<!-- 底部操作栏 -->
<view class="handel-bar">
<!-- <view class="handel-bar">
<view>
<up-image
:src="cameraIcon"
@ -24,45 +24,59 @@
</view>
</view>
<view class="debug-btn" @click="debug">调试</view>
<view class="debug-btn" @click="debug">调试模型</view> -->
</view>
</template>
<script setup>
import { ref, onMounted } from 'vue'
import { onLoad } from '@dcloudio/uni-app'
import { onLoad, onUnload } from '@dcloudio/uni-app'
import { getModelDetailApi } from '@/services/model'
import videoIcon from '@/static/image/video.png' //
import cameraIcon from '@/static/image/camera.png' //
const debug = () => {
console.log('调试')
onLoad(async (options) => {
const modelId = options?.modelId
const res = await getModelDetailApi({ id: modelId })
const ctx = uni.requireNativePlugin('bonus-textodule"')
ctx.openNativePage(
{
a: 2,
b: 2,
},
(e) => {
uni.showToast({
title: JSON.stringify(e),
icon: 'none',
duration: 6000,
if (res.code === 200) {
ctx.openNativePage(
{
modelInfoList: res.data,
},
(result) => {
//
uni.showToast({
title: JSON.stringify(result),
icon: 'none',
duration: 10000,
})
setTimeout(() => {
uni.navigateTo({
url: '/pages/siteSurvey/addOrEditForm',
})
}, 500)
},
)
} else {
uni.$u.toast('模型数据获取失败!')
setTimeout(() => {
uni.navigateBack({
delta: 1,
})
},
)
}
onMounted(() => {})
}, 500)
}
})
</script>
<style lang="scss" scoped>
.ar-check-container {
width: 100%;
height: 100%;
background: url('@/static/image/login_bg_new.png') no-repeat center center;
background-size: cover;
position: relative;
// background: url('@/static/image/login_bg_new.png') no-repeat center center;
// background-size: cover;
// position: relative;
.stacking-modal {
position: absolute;

View File

@ -48,7 +48,7 @@
</up-row>
<up-row>
<up-col span="8">
<up-col span="9">
<up-form-item prop="code">
<up-input
class="code-input-ref"
@ -59,7 +59,7 @@
/>
</up-form-item>
</up-col>
<up-col span="4">
<up-col span="3">
<!-- <up-form-item prop="username">
</up-form-item> -->
@ -71,7 +71,7 @@
:width="imgWidth + 'px'"
:height="imgHeight + 'px'"
@click="onHandleCodeImg"
mode="aspectFit"
mode="aspectFill"
/>
</view>
</up-col>
@ -165,7 +165,6 @@ const loginModelRef = ref(null)
const onHandleCodeImg = async () => {
const res = await getCodeImgApi()
console.log(res, '图片信息')
captchaEnabled.value = res.captchaEnabled ? true : res.captchaEnabled
codeUrl.value = 'data:image/gif;base64,' + res.img
opinionModel.value.uuid = res.uuid
@ -176,75 +175,68 @@ const onHandleCodeImg = async () => {
//
const onSubmitLogin = debounce(() => {
//
// sendLoading.value = true
// loginModelRef.value
// .validate()
// .then(async (valid) => {
// if (valid) {
// try {
// console.log(
// '%c🔍 %c',
// 'background: linear-gradient(90deg, #FF6B6B, #4ECDC4); color: white; padding: 5px 10px; border-radius: 5px; font-weight: bold;',
// '',
// opinionModel.value,
// )
// const res = await loginApi(opinionModel.value)
// console.log(
// '%c🔍 %c',
// 'background: linear-gradient(90deg, #FF6B6B, #4ECDC4); color: white; padding: 5px 10px; border-radius: 5px; font-weight: bold;',
// '',
// res,
// )
// sendLoading.value = false
// if (res.code === 200) {
// memberStore.setToken(res.token)
// console.log(opinionModel.value.remember, 'opinionModel.value.remember')
// if (opinionModel.value.remember) {
// const encryptedPwd = btoa(opinionModel.value.password)
// uni.setStorageSync('userInfo', {
// username: opinionModel.value.username,
// password: encryptedPwd,
// })
// } else {
// const userInfo = uni.getStorageSync('userInfo')
// if (userInfo) {
// uni.removeStorage('userInfo')
// uni.removeStorageSync('userInfo')
// }
// }
// // getUserInfo()
// uni.$u.toast('')
// setTimeout(() => {
// // uni.switchTab({ url: '/pages/workbenches/index' })
// uni.navigateTo({ url: '/pages/projectSelect/index' })
// }, 500)
// } else {
// sendLoading.value = false
// uni.$u.toast('' + res.message)
// }
// } catch (error) {
// sendLoading.value = false
// }
// }
// })
// .catch(() => {
// //
// sendLoading.value = false
// })
uni.$u.toast('登录成功')
setTimeout(() => {
uni.navigateTo({ url: '/pages/projectSelect/index' })
}, 500)
sendLoading.value = true
loginModelRef.value
.validate()
.then(async (valid) => {
if (valid) {
try {
console.log(
'%c🔍 登录请求入参 %c',
'background: linear-gradient(90deg, #FF6B6B, #4ECDC4); color: white; padding: 5px 10px; border-radius: 5px; font-weight: bold;',
'',
opinionModel.value,
)
const res = await loginApi(opinionModel.value)
console.log(
'%c🔍 登录请求出参 %c',
'background: linear-gradient(90deg, #FF6B6B, #4ECDC4); color: white; padding: 5px 10px; border-radius: 5px; font-weight: bold;',
'',
res,
)
sendLoading.value = false
if (res.code === 200) {
memberStore.setToken(res.token)
console.log(opinionModel.value.remember, 'opinionModel.value.remember')
if (opinionModel.value.remember) {
const encryptedPwd = btoa(opinionModel.value.password)
uni.setStorageSync('userInfo', {
username: opinionModel.value.username,
password: encryptedPwd,
})
} else {
const userInfo = uni.getStorageSync('userInfo')
if (userInfo) {
uni.removeStorage('userInfo')
uni.removeStorageSync('userInfo')
}
}
// getUserInfo()
uni.$u.toast('登录成功')
setTimeout(() => {
// uni.switchTab({ url: '/pages/workbenches/index' })
uni.navigateTo({ url: '/pages/projectSelect/index' })
}, 500)
} else {
sendLoading.value = false
uni.$u.toast('登录失败' + res.message)
onHandleCodeImg()
}
} catch (error) {
sendLoading.value = false
}
}
})
.catch(() => {
//
sendLoading.value = false
})
// uni.$u.toast('')
// setTimeout(() => {
// uni.navigateTo({ url: '/pages/projectSelect/index' })
// }, 500)
}, 500)
const checkboxChange = (value) => {
console.log(value, 'checkboxChange')
}
//
const getUserInfo = () => {
getUserInfoApi().then((res) => {

View File

@ -1,60 +1,20 @@
<!-- 在你的 Vue 组件中 -->
<template>
<view class="container">
<!-- 添加 ref 属性用于操作 WebView -->
<!-- <web-view
ref="baiduMap"
:src="mapUrl"
@message="handleMessage"
@load="onMapLoaded"
></web-view> -->
<web-view ref="mapView" src="/static/map.html" @message="handleMessage"></web-view>
<web-view ref="baiduMap" :src="webViewUrl"></web-view>
</view>
</template>
<script setup>
import { ref, onMounted } from 'vue'
import { onLoad } from '@dcloudio/uni-app'
const baiduMap = ref(null)
const mapUrl = ref('')
const webViewUrl = ref('')
onMounted(() => {
// URL
mapUrl.value = '/static/map.html'
// WebView
setTimeout(() => {
sendMessageToMap({ type: 'init', data: {} })
}, 1000)
onLoad((options) => {
console.log(options)
const projectInfo = JSON.parse(options?.projectInfo)
webViewUrl.value = `/static/map.html?lat=${projectInfo.latitude}&lng=${projectInfo.longitude}&proName=${projectInfo.proName}&chargePerson=${projectInfo.chargePerson}&location=${projectInfo.location}`
})
// WebView
const handleMessage = (event) => {
const { data } = event.detail
console.log('收到来自地图的消息:', data)
if (data.type === 'projectSelected') {
//
onHandleSelectProject(data.project)
}
}
// WebView
const sendMessageToMap = (message) => {
if (baiduMap.value) {
baiduMap.value.postMessage(message)
}
}
//
const onMapLoaded = () => {
console.log('百度地图加载完成')
}
//
const onHandleSelectProject = (project) => {
console.log('选中项目:', project)
//
}
</script>

View File

@ -81,17 +81,18 @@
<script setup>
import { ref, onMounted, reactive } from 'vue'
import { getProjectListApi } from '@/services/projectSelect'
import js from '@eslint/js'
const { safeAreaInsets } = uni.getSystemInfoSync()
const projectList = ref([
{ proId: 1, proName: '项目1', level: '一级', manager: '张三', location: '北京' },
{ proId: 2, proName: '项目2', level: '二级', manager: '李四', location: '上海' },
{ proId: 3, proName: '项目3', level: '三级', manager: '王五', location: '广州' },
{ proId: 4, proName: '项目4', level: '四级', manager: '赵六', location: '深圳' },
{ proId: 5, proName: '项目5', level: '五级', manager: '孙七', location: '成都' },
{ proId: 6, proName: '项目6', level: '六级', manager: '周八', location: '重庆' },
{ proId: 7, proName: '项目7', level: '七级', manager: '吴九', location: '西安' },
// { proId: 1, proName: '1', level: '', manager: '', location: '' },
// { proId: 2, proName: '2', level: '', manager: '', location: '' },
// { proId: 3, proName: '3', level: '', manager: '', location: '广' },
// { proId: 4, proName: '4', level: '', manager: '', location: '' },
// { proId: 5, proName: '5', level: '', manager: '', location: '' },
// { proId: 6, proName: '6', level: '', manager: '', location: '' },
// { proId: 7, proName: '7', level: '', manager: '', location: '西' },
])
const total = ref(100)
@ -132,7 +133,7 @@ const onHandleReset = () => {
const onHandleCurrentChange = (page) => {
// console.log(page,'')
queryParams.value.pageNum = page
// getProjectList()
getProjectList()
}
//
@ -142,13 +143,15 @@ const onHandleSelectProject = (item) => {
// uni.navigateTo({
// url: `/pages/projectSelect/projectSelectDetail?id=${id}&projectName=${projectName}`,
// })
const projectInfo = JSON.stringify(item)
uni.navigateTo({
url: `/pages/workHome/index?proId=${item.proId}&projectName=${item.proName}`,
url: `/pages/workHome/index?proId=${item.proId}&projectName=${item.proName}&projectInfo=${projectInfo}`,
})
}
onMounted(() => {
// getProjectList()
getProjectList()
})
</script>

View File

@ -59,7 +59,6 @@
suffixIcon: 'calendar',
}"
v-model="addOrEditFormModel.date"
@confirm="onHandleConfirm"
>
</up-datetime-picker>
</up-form-item>
@ -78,11 +77,31 @@
<up-row justify="space-between" gutter="10">
<up-col span="5.5">
<up-form-item prop="modelId" label="模型">
<up-input
<!-- <up-input
clearable
placeholder="填输入勘察项目名称"
v-model="addOrEditFormModel.modelId"
/>
/> -->
<up-picker
:hasInput="true"
title="请选择模型"
:show="showPickerSelectModel"
:columns="modelColumns"
@confirm="onConfirmSelectModel"
@cancel="showPickerSelectModel = false"
keyName="nodeName"
valueName="id"
:inputProps="{
shape: 'square',
inputAlign: 'center',
suffixIcon: 'arrow-down',
value: addOrEditFormModel.modelName,
placeholder: '请选择模型',
}"
v-model="addOrEditFormModel.modelId"
style="width: 100%"
></up-picker>
</up-form-item>
</up-col>
</up-row>
@ -159,10 +178,13 @@
import { ref, onMounted } from 'vue'
import { onLoad } from '@dcloudio/uni-app'
import { addSurveyDataApi, getSurveyDataDetailApi, editSurveyDataApi } from '@/services/survey.js'
import { getModelListApi } from '@/services/model.js'
import dayjs from 'dayjs'
const { safeAreaInsets } = uni.getSystemInfoSync()
const projectName = ref('')
const addOrEditFormModelRef = ref(null)
const showPickerSelectModel = ref(false)
const modelColumns = ref([])
const addOrEditFormModel = ref({
projectName: '', //
proId: '', // ID
@ -170,9 +192,10 @@ const addOrEditFormModel = ref({
date: Date.now(), //
surveyTime: '', //
surveyContent: '', //
modelId: '3', // id
modelId: [], // id
surveyResult: '', //
surveyAttach: '', //
modelName: '', //
fileList: [],
})
const addOrEditFormRules = ref({
@ -197,14 +220,9 @@ const onHandleLeftClick = () => {
})
}
//
const onHandleConfirm = (e) => {
console.log(e)
// xxxx-xx-xx
}
//
const onHandleUpload = () => {
// #ifdef H5
uni.chooseFile({
count: 6, //
// type: 'all', // 'all''image''video''file'H5
@ -233,6 +251,52 @@ const onHandleUpload = () => {
console.error('选择文件失败', err)
},
})
// #endif
// #ifdef APP-PLUS
plus.io.chooseFile(
{
title: '选择附件',
// 使MIME
mime: [
'image/*',
'video/*',
'application/msword', // doc
'application/vnd.openxmlformats-officedocument.wordprocessingml.document', // docx
'application/pdf', // pdf
'application/vnd.ms-excel', // xls
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', // xlsx
],
maximum: 6, // 6
multiple: false, //
},
(res) => {
const tempFilePaths = res.files[0] //
uni.uploadFile({
url: '/common/uploadFile',
filePath: tempFilePaths,
name: 'file',
formData: {
file: 'file',
},
success: (res) => {
const result = JSON.parse(res.data)
if (result.code === 200) {
addOrEditFormModel.value.fileList.push(result.data)
}
},
fail: (err) => {
console.error('上传失败', err)
},
})
},
(err) => {
console.error('选择文件失败:', err)
plus.nativeUI.alert('选择文件失败: ' + err.message)
},
)
// #endif
}
//
@ -255,6 +319,7 @@ const onHandleSubmit = () => {
surveyUser, //
surveyContent, //
modelId, // id
modelName,
surveyResult, //
date,
fileList,
@ -267,6 +332,7 @@ const onHandleSubmit = () => {
surveyTime: dayjs(date).format('YYYY-MM-DD'), //
surveyContent, //
modelId, // id
modelName,
surveyResult, //
surveyAttach: fileList.map((item) => item.url).join(','), //
}
@ -275,6 +341,8 @@ const onHandleSubmit = () => {
if (addOrEditFormModel.value.id) {
params.id = addOrEditFormModel.value.id
}
console.log('params新增时入参', params)
const res = await API(params)
if (res.code === 200) {
uni.$u.toast(addOrEditFormModel.value.id ? '修改成功' : '新增成功')
@ -297,17 +365,46 @@ const onHandleSubmit = () => {
const getSurveyDataDetail = async () => {
const res = await getSurveyDataDetailApi(addOrEditFormModel.value.id)
console.log(res, 'res详情')
const { surveyUser, surveyTime, surveyContent, modelId, surveyResult, surveyAttach } = res.data
const {
surveyUser,
surveyTime,
surveyContent,
modelId,
surveyResult,
surveyAttach,
modelName,
} = res.data
addOrEditFormModel.value.surveyUser = surveyUser
addOrEditFormModel.value.date = dayjs(surveyTime).valueOf() //
addOrEditFormModel.value.surveyContent = surveyContent
addOrEditFormModel.value.modelId = modelId
addOrEditFormModel.value.modelId = [modelId]
addOrEditFormModel.value.modelName = modelName
addOrEditFormModel.value.surveyResult = surveyResult
addOrEditFormModel.value.fileList = surveyAttach?.split(',')
}
//
const getModelList = async () => {
const { rows: res } = await getModelListApi({
page: 1,
pageSize: 999,
projectId: addOrEditFormModel.value.proId,
})
const modelList = res.filter((item) => item.nodelevel == item.nodeCount)
modelColumns.value.push(modelList)
}
const onConfirmSelectModel = (e) => {
const currentIndex = e.indexs
const selectModel = modelColumns.value[0][currentIndex]
addOrEditFormModel.value.modelName = selectModel.nodeName
addOrEditFormModel.value.modelId = selectModel.id
showPickerSelectModel.value = false
}
onLoad((options) => {
getModelList()
//
if (options?.isType === 'add') {
addOrEditFormModel.value.id = null

View File

@ -22,7 +22,6 @@
suffixIcon: 'calendar',
}"
v-model="queryDate"
@confirm="onHandleConfirm"
>
</up-datetime-picker>
</up-col>
@ -46,12 +45,12 @@
<!-- 表头 -->
<up-row class="table-th">
<up-col class="table-td" span="0.5"> 序号 </up-col>
<up-col class="table-td" span="1.5"> 项目名称 </up-col>
<up-col class="table-td" span="2.5"> 项目名称 </up-col>
<up-col class="table-td" span="1"> 勘察人 </up-col>
<up-col class="table-td" span="1.5"> 勘察日期 </up-col>
<up-col class="table-td" span="1"> 勘察内容 </up-col>
<up-col class="table-td" span="1"> 勘察模型 </up-col>
<up-col class="table-td" span="1"> 模型设计人员 </up-col>
<!-- <up-col class="table-td" span="1"> 模型设计人员 </up-col> -->
<up-col class="table-td" span="1"> 勘察附件 </up-col>
<up-col class="table-td" span="2"> 勘察结果 </up-col>
<up-col class="table-td" span="1.5"> 操作 </up-col>
@ -69,12 +68,12 @@
}"
>
<up-col class="table-td" span="0.5"> {{ index + 1 }} </up-col>
<up-col class="table-td" span="1.5"> {{ item.proName }} </up-col>
<up-col class="table-td" span="2.5"> {{ item.proName }} </up-col>
<up-col class="table-td" span="1"> {{ item.surveyUser }} </up-col>
<up-col class="table-td" span="1.5"> {{ item.surveyTime }} </up-col>
<up-col class="table-td" span="1"> {{ item.surveyContent }} </up-col>
<up-col class="table-td" span="1"> {{ item.modelId }} </up-col>
<up-col class="table-td" span="1"> {{ item.projectName }} </up-col>
<up-col class="table-td" span="1"> {{ item.modelName }} </up-col>
<!-- <up-col class="table-td" span="1"> {{ item.projectName }} </up-col> -->
<up-col class="table-td" span="1" style="color: #007aff">
{{ item.surveyAttach?.split(',').length || 0 }}
</up-col>

View File

@ -17,7 +17,7 @@
</view>
<!-- 打开弹框选择模型 -->
<up-popup :show="projectPopupShow" mode="center">
<!-- <up-popup :show="projectPopupShow" mode="center">
<view class="project-popup-content">
<view class="project-popup-content-title">选择模型</view>
<up-select
@ -38,12 +38,23 @@
</up-button>
</view>
</view>
</up-popup>
</up-popup> -->
<up-picker
title="请选择模型"
:show="showPickerSelectModel"
:columns="modelColumns"
@confirm="onConfirmSelectModel"
@cancel="showPickerSelectModel = false"
keyName="nodeName"
valueName="id"
></up-picker>
</template>
<script setup>
import { ref, onMounted } from 'vue'
import { onLoad } from '@dcloudio/uni-app'
import { getModelListApi } from '@/services/model.js'
import workHomeImg_1 from '@/static/image/work_home_1.png'
import workHomeImg_2 from '@/static/image/work_home_2.png'
import workHomeImg_3 from '@/static/image/work_home_3.png'
@ -54,6 +65,9 @@ const projectPopupShow = ref(false)
const projectId = ref('')
const proId = ref('')
const selectProjectLabel = ref('请选择模型')
const projectInfo = ref({})
const showPickerSelectModel = ref(false)
const modelColumns = ref([])
const imgNavList = ref([
{
img: workHomeImg_1,
@ -72,21 +86,6 @@ const imgNavList = ref([
},
])
const projectList = ref([
{
id: '1',
name: '有一个测试工程AAAAAAAA',
},
{
id: '2',
name: '有一个测试工程BBBBBBBB',
},
{
id: '3',
name: '有一个测试工程CCCCCCCC',
},
])
//
const onHandleJump = (item) => {
// uni.navigateTo({
@ -94,7 +93,11 @@ const onHandleJump = (item) => {
// })
if (item.title === 'AR检查') {
projectPopupShow.value = true
showPickerSelectModel.value = true
} else if (item.title === '地图导航') {
uni.navigateTo({
url: item.jumpUrl + `?projectInfo=${JSON.stringify(projectInfo.value)}`,
})
} else {
uni.navigateTo({
url: item.jumpUrl + `?projectName=${projectName.value}&proId=${proId.value}`,
@ -124,6 +127,32 @@ const onCloseProjectPopup = (type) => {
projectPopupShow.value = false
}
//
const getModelList = async () => {
const { rows: res } = await getModelListApi({
page: 1,
pageSize: 999,
projectId: proId.value,
})
const modelList = res.filter((item) => item.nodelevel == item.nodeCount)
modelColumns.value.push(modelList)
}
//
const onConfirmSelectModel = (e) => {
// console.log(e, 'e')
const currentIndex = e.indexs
const selectModel = modelColumns.value[0][currentIndex]
uni.navigateTo({
url: '/pages/arCheck/index?modelId=' + selectModel.id,
})
showPickerSelectModel.value = false
}
//
const onHandleLeftClick = () => {
uni.navigateBack({
@ -133,7 +162,11 @@ const onHandleLeftClick = () => {
onLoad((options) => {
projectName.value = options?.projectName
const proInfo = JSON.parse(options?.projectInfo)
projectInfo.value = proInfo
proId.value = options?.proId
getModelList()
})
onMounted(() => {
@ -141,7 +174,6 @@ onMounted(() => {
.select('.work-home-content-item') // 使
.boundingClientRect((rect) => {
if (rect) {
console.log('高度:', rect.width)
imgWidth.value = rect.width
}
})

18
src/services/model.js Normal file
View File

@ -0,0 +1,18 @@
import { http } from '@/utils/http'
// 获取模型列表
export const getModelListApi = (data) => {
return http({
method: 'GET',
url: '/model/list',
data,
})
}
// 获取模型详情
export const getModelDetailApi = (data) => {
return http({
method: 'POST',
url: '/model/openView',
data,
})
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

View File

@ -29,14 +29,99 @@
</body>
<script type="text/javascript">
document.addEventListener('UniAppJSBridgeReady', function () {
const map = new BMapGL.Map('map-container') // 创建地图实例
let point = new BMapGL.Point(117.13805, 31.8734) // 创建点坐标
map.centerAndZoom(point, 12) // 初始化地图,设置中心点坐标和地图级别
map.enableScrollWheelZoom(true) // 启用滚轮放大缩小
// // 1. 初始化地图
// const map = new BMapGL.Map('map-container') // 创建地图实例
// let point = new BMapGL.Point(117.13805, 31.8734) // 创建点坐标
// map.centerAndZoom(point, 12) // 初始化地图,设置中心点坐标和地图级别
// map.enableScrollWheelZoom(true) // 启用滚轮放大缩小
function getUrlParams() {
const params = new URLSearchParams(window.location.search);
return {
lat: parseFloat(params.get('lat')) || 31.8734, // 默认值
lng: parseFloat(params.get('lng')) || 117.13805, // 默认值
proName: decodeURIComponent(params.get('proName')) || '-', // 默认值
chargePerson: decodeURIComponent(params.get('chargePerson')) || '-', // 默认值
location: decodeURIComponent(params.get('location')) || '-' // 默认值
};
}
const { lat, lng, proName, chargePerson, location } = getUrlParams()
const proInfo = {
lat,
lng,
proName,
chargePerson,
location
}
initMap(proInfo)
function initMap(proInfo) {
const map = new BMapGL.Map('map-container') // 创建地图实例
let point = new BMapGL.Point(proInfo.lng, proInfo.lat) // 创建点坐标
map.centerAndZoom(point, 12) // 初始化地图,设置中心点坐标和地图级别
map.enableScrollWheelZoom(true) // 启用滚轮放大缩小
handleProjectInfoOnMap(map, proInfo)
}
function handleProjectInfoOnMap(map, projectInfo) {
// 示例1: 如果项目信息包含经纬度,移动地图到该位置
if (projectInfo.lng && projectInfo.lat) {
const projectPoint = new BMapGL.Point(projectInfo.lng, projectInfo.lat);
map.centerAndZoom(projectPoint, 15); // 移动并放大到项目位置
const icon = new BMapGL.Icon('./image/location.png', new BMapGL.Size(36, 36), {
anchor: new BMapGL.Size(12, 24), // 图标锚点,使图标底部中心点与坐标点重合
})
// 创建marker并应用自定义图标
const marker = new BMapGL.Marker(projectPoint, {
icon: icon,
})
map.addOverlay(marker)
const infoWindow = new BMapGL.InfoWindow(`
<h3 style="color: #002db6; margin: 0 0 10px 0; font-size: 18px;">${projectInfo.proName}</h3>
<p>负责人: ${projectInfo.chargePerson}</p>
<p>所在地: ${projectInfo.location}</p>
`);
const label = new BMapGL.Label(projectInfo.proName, {
position: projectPoint,
offset: new BMapGL.Size(0, 0), // 调整偏移量使文字在marker正下方
})
// 设置label样式
label.setStyle({
color: '#002db6',
backgroundColor: 'transparent',
border: 'none',
textAlign: 'center',
padding: '5px',
whiteSpace: 'nowrap',
fontSize: '18px',
fontWeight: 'bold',
transform: 'translateX(-45%)' // 关键让Label向左移动自身宽度的一半
});
map.addOverlay(label)
marker.addEventListener('click', function () {
map.openInfoWindow(infoWindow, projectPoint);
});
}
}
})
</script>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 268 KiB

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 818 B

After

Width:  |  Height:  |  Size: 418 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 607 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 833 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.2 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.2 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__F75AFA9","name":"AR水运","version":{"name":"1.0.3","code":103},"description":"AR水运","developer":{"name":"","email":"","url":""},"permissions":{"Barcode":{},"Camera":{},"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"target":"id:1","autoclose":true,"waiting":true,"delay":0},"popGesture":"close","launchwebview":{"render":"always","id":"1","kernel":"WKWebview"},"usingComponents":true,"nvueStyleCompiler":"uni-app","compilerVersion":3,"compatible":{"ignoreVersion":true},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#F5F4F5"},"uniStatistics":{"enable":false},"allowsInlineMediaPlayback":true,"uni-app":{"control":"uni-v3","vueVersion":"3","compilerVersion":"4.57","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal","webView":{"minUserAgentVersion":"49.0"}}},"app-harmony":{"useragent":{"value":"uni-app","concatenate":true},"uniStatistics":{"enable":false}},"launch_path":"__uniappview.html"}
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__0A021AF","name":"AR水运","version":{"name":"1.0.0","code":100},"description":"AR水运","developer":{"name":"","email":"","url":""},"permissions":{"Barcode":{},"Camera":{},"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"target":"id:1","autoclose":true,"waiting":true,"delay":0},"popGesture":"close","launchwebview":{"render":"always","id":"1","kernel":"WKWebview"},"usingComponents":true,"nvueStyleCompiler":"uni-app","compilerVersion":3,"compatible":{"ignoreVersion":true},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#F5F4F5"},"uniStatistics":{"enable":false},"allowsInlineMediaPlayback":true,"uni-app":{"control":"uni-v3","vueVersion":"3","compilerVersion":"4.57","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal","webView":{"minUserAgentVersion":"49.0"}}},"app-harmony":{"useragent":{"value":"uni-app","concatenate":true},"uniStatistics":{"enable":false}},"launch_path":"__uniappview.html"}

File diff suppressed because one or more lines are too long

View File

Before

Width:  |  Height:  |  Size: 676 B

After

Width:  |  Height:  |  Size: 676 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

View File

Before

Width:  |  Height:  |  Size: 2.8 MiB

After

Width:  |  Height:  |  Size: 2.8 MiB

View File

Before

Width:  |  Height:  |  Size: 465 B

After

Width:  |  Height:  |  Size: 465 B

View File

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 41 KiB

View File

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 62 KiB

View File

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 54 KiB

View File

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

@ -0,0 +1,98 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script type="text/javascript" src="https://js.cdn.aliyun.dcloud.net.cn/dev/uni-app/uni.webview.1.5.2.js"></script>
<script type="text/javascript"
src="https://api.map.baidu.com/api?v=3.0&&type=webgl&ak=cClgLBaLgGUdQDilX9dGvieL"></script>
<title>百度地图</title>
<style>
#map-container {
width: 100vw;
height: 100vh;
}
/** 去除百度地图的水印和logo */
.BMap_cpyCtrl,
.anchorBL {
display: none;
}
</style>
</head>
<body>
<div id="map-container"></div>
</body>
<script type="text/javascript">
// document.addEventListener('UniAppJSBridgeReady', function () {
// const map = new BMapGL.Map('map-container') // 创建地图实例
// let point = new BMapGL.Point(117.13805, 31.8734) // 创建点坐标
// map.centerAndZoom(point, 12) // 初始化地图,设置中心点坐标和地图级别
// map.enableScrollWheelZoom(true) // 启用滚轮放大缩小
// })
// 存储从UniApp接收的数据
let receivedProjectInfo = null;
document.addEventListener('UniAppJSBridgeReady', function () {
// 1. 初始化地图
const map = new BMapGL.Map('map-container') // 创建地图实例
let point = new BMapGL.Point(117.13805, 31.8734) // 创建点坐标
map.centerAndZoom(point, 12) // 初始化地图,设置中心点坐标和地图级别
map.enableScrollWheelZoom(true) // 启用滚轮放大缩小
// 2. 监听UniApp发送的消息
uni.onMessage(function (message) {
// 3. 处理接收到的projectInfo数据
if (message.type === 'projectInfo' && message.data) {
receivedProjectInfo = message.data;
// 4. 根据接收的数据进行地图操作(示例)
handleProjectInfoOnMap(map, receivedProjectInfo);
}
});
})
// 根据项目信息操作地图的方法
function handleProjectInfoOnMap(map, projectInfo) {
// 示例1: 如果项目信息包含经纬度,移动地图到该位置
if (projectInfo.longitude && projectInfo.latitude) {
const projectPoint = new BMapGL.Point(projectInfo.longitude, projectInfo.latitude);
map.centerAndZoom(projectPoint, 15); // 移动并放大到项目位置
// 示例2: 在项目位置添加标记
// const marker = new BMapGL.Marker(projectPoint);
// map.addOverlay(marker);
const icon = new BMapGL.Icon(require('@/static/image/location.png'), new BMapGL.Size(36, 36), {
anchor: new BMapGL.Size(12, 24), // 图标锚点,使图标底部中心点与坐标点重合
})
// 创建marker并应用自定义图标
const marker = new BMapGL.Marker(projectPoint, {
icon: icon,
})
map.addOverlay(marker)
// 示例3: 显示项目信息弹窗
const infoWindow = new BMapGL.InfoWindow(`
<h3 style="color: #002db6; margin: 0 0 10px 0; font-size: 18px;">${projectInfo.proName}</h3>
<p>负责人: ${projectInfo.chargePerson}</p>
<p>所在地: ${projectInfo.location}</p>
`);
marker.addEventListener('click', function () {
map.openInfoWindow(infoWindow, projectPoint);
});
}
}
</script>
</html>

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
.ar-check-container[data-v-9de9b339]{width:100%;height:100%;background:url(../../static/image/login_bg_new.png) no-repeat center center;background-size:cover;position:relative}.ar-check-container .stacking-modal[data-v-9de9b339]{position:absolute;top:.625rem;right:.625rem;width:3.125rem;height:3.125rem;background:rgba(255,255,255,.9);border-radius:.3125rem}.ar-check-container .handel-bar[data-v-9de9b339]{position:absolute;bottom:.625rem;left:0;width:100%;display:flex;justify-content:center}.ar-check-container .handel-bar uni-view[data-v-9de9b339]{width:68px;height:68px;border-radius:50%;background-color:#165dff;display:flex;align-items:center;justify-content:center}.ar-check-container .handel-bar uni-view[data-v-9de9b339]:nth-child(2){margin:0 .375rem;font-size:12px;color:#fff}.ar-check-container .debug-btn[data-v-9de9b339]{position:absolute;top:.625rem;right:50%;width:3.125rem;height:3.125rem;background:rgba(255,255,255,.9);border-radius:.3125rem;text-align:center;line-height:3.125rem}

View File

@ -1,42 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script type="text/javascript" src="https://js.cdn.aliyun.dcloud.net.cn/dev/uni-app/uni.webview.1.5.2.js"></script>
<script type="text/javascript"
src="https://api.map.baidu.com/api?v=3.0&&type=webgl&ak=cClgLBaLgGUdQDilX9dGvieL"></script>
<title>百度地图</title>
<style>
#map-container {
width: 100vw;
height: 100vh;
}
/** 去除百度地图的水印和logo */
.BMap_cpyCtrl,
.anchorBL {
display: none;
}
</style>
</head>
<body>
<div id="map-container"></div>
</body>
<script type="text/javascript">
document.addEventListener('UniAppJSBridgeReady', function () {
const map = new BMapGL.Map('map-container') // 创建地图实例
let point = new BMapGL.Point(117.13805, 31.8734) // 创建点坐标
map.centerAndZoom(point, 12) // 初始化地图,设置中心点坐标和地图级别
map.enableScrollWheelZoom(true) // 启用滚轮放大缩小
})
</script>
</html>