From 78c6170ef08f9d1bc49188bd285669780f5739c4 Mon Sep 17 00:00:00 2001 From: sjeam <359824901@qq.com> Date: Mon, 1 Sep 2025 17:43:08 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- env/.env | 16 +- manifest.config.ts | 42 +- src/manifest.json | 14 +- src/pages.json | 11 + src/pages/my/index.vue | 18 +- src/pages/my/setting.vue | 310 +++++++++ src/pages/service/find.vue | 102 +++ src/pages/service/index.vue | 47 +- src/utils/map-service.ts | 97 +++ src/utils/qqmap-wx-jssdk.js | 1122 +++++++++++++++++++++++++++++++ src/utils/qqmap-wx-jssdk.min.js | 1 + tsconfig.json | 2 + 12 files changed, 1734 insertions(+), 48 deletions(-) create mode 100644 src/pages/my/setting.vue create mode 100644 src/pages/service/find.vue create mode 100644 src/utils/map-service.ts create mode 100644 src/utils/qqmap-wx-jssdk.js create mode 100644 src/utils/qqmap-wx-jssdk.min.js diff --git a/env/.env b/env/.env index ff4ad1b..15a8e43 100644 --- a/env/.env +++ b/env/.env @@ -11,8 +11,8 @@ VITE_APP_PUBLIC_BASE=/ VITE_LOGIN_URL = '/pages/login/index' # 数字乡村 -VITE_SERVER_BASEURL = 'http://127.0.0.1:8787' -VITE_UPLOAD_BASEURL = 'http://127.0.0.1:8787/upload' +VITE_SERVER_BASEURL = 'http://test.data-middle.lihaink.cn' +VITE_UPLOAD_BASEURL = 'http://test.data-middle.lihaink.cn/upload' # 村集体 @@ -23,13 +23,13 @@ VITE_CRMEB_SERVER_BASEURL_LOGIN = 'https://test.shop.lihaink.cn/pages/user/login # 有些同学可能需要在微信小程序里面根据 develop、trial、release 分别设置上传地址,参考代码如下。 # 下面的变量如果没有设置,会默认使用 VITE_SERVER_BASEURL or VITE_UPLOAD_BASEURL -VITE_SERVER_BASEURL__WEIXIN_DEVELOP = 'http://127.0.0.1:8787' -VITE_SERVER_BASEURL__WEIXIN_TRIAL = 'http://127.0.0.1:8787' -VITE_SERVER_BASEURL__WEIXIN_RELEASE = 'http://127.0.0.1:8787' +VITE_SERVER_BASEURL__WEIXIN_DEVELOP = 'http://test.data-middle.lihaink.cn' +VITE_SERVER_BASEURL__WEIXIN_TRIAL = 'http://test.data-middle.lihaink.cn' +VITE_SERVER_BASEURL__WEIXIN_RELEASE = 'http://test.data-middle.lihaink.cn' -VITE_UPLOAD_BASEURL__WEIXIN_DEVELOP = 'http://127.0.0.1:8787/upload' -VITE_UPLOAD_BASEURL__WEIXIN_TRIAL = 'http://127.0.0.1:8787/upload' -VITE_UPLOAD_BASEURL__WEIXIN_RELEASE = 'http://127.0.0.1:8787/upload' +VITE_UPLOAD_BASEURL__WEIXIN_DEVELOP = 'http://test.data-middle.lihaink.cn/upload' +VITE_UPLOAD_BASEURL__WEIXIN_TRIAL = 'http://test.data-middle.lihaink.cn/upload' +VITE_UPLOAD_BASEURL__WEIXIN_RELEASE = 'http://test.data-middle.lihaink.cn/upload' # h5是否需要配置代理 VITE_APP_PROXY=true diff --git a/manifest.config.ts b/manifest.config.ts index b498ca4..c228c3e 100644 --- a/manifest.config.ts +++ b/manifest.config.ts @@ -15,17 +15,24 @@ const { } = env export default defineManifestConfig({ - 'name': VITE_APP_TITLE, - 'appid': VITE_UNI_APPID, - 'description': '', - 'versionName': '1.0.0', - 'versionCode': '100', - 'transformPx': false, - 'locale': VITE_FALLBACK_LOCALE, // 'zh-Hans' - 'h5': { + name: VITE_APP_TITLE, + appid: VITE_UNI_APPID, + description: '', + versionName: '1.0.0', + versionCode: '100', + transformPx: false, + locale: VITE_FALLBACK_LOCALE, // 'zh-Hans' + h5: { router: { base: VITE_APP_PUBLIC_BASE, }, + sdkConfigs: { + maps: { + tencent: { + key: 'IOUBZ-HCDW3-KP53C-RFNVK-QAZ7O-EQFKM', + }, + }, + }, }, /* 5+App特有相关 */ 'app-plus': { @@ -83,14 +90,14 @@ export default defineManifestConfig({ ios: { appstore: 'static/app/icons/1024x1024.png', ipad: { - 'app': 'static/app/icons/76x76.png', + app: 'static/app/icons/76x76.png', 'app@2x': 'static/app/icons/152x152.png', - 'notification': 'static/app/icons/20x20.png', + notification: 'static/app/icons/20x20.png', 'notification@2x': 'static/app/icons/40x40.png', 'proapp@2x': 'static/app/icons/167x167.png', - 'settings': 'static/app/icons/29x29.png', + settings: 'static/app/icons/29x29.png', 'settings@2x': 'static/app/icons/58x58.png', - 'spotlight': 'static/app/icons/40x40.png', + spotlight: 'static/app/icons/40x40.png', 'spotlight@2x': 'static/app/icons/80x80.png', }, iphone: { @@ -108,7 +115,7 @@ export default defineManifestConfig({ }, }, /* 快应用特有相关 */ - 'quickapp': {}, + quickapp: {}, /* 小程序特有相关 */ 'mp-weixin': { appid: VITE_WX_APPID, @@ -119,6 +126,11 @@ export default defineManifestConfig({ minified: true, }, usingComponents: true, + permission: { + 'scope.userLocation': { + desc: '需要获取位置以展示医院信息', + }, + }, // __usePrivacyCheck__: true, }, 'mp-alipay': { @@ -131,8 +143,8 @@ export default defineManifestConfig({ 'mp-toutiao': { usingComponents: true, }, - 'uniStatistics': { + uniStatistics: { enable: false, }, - 'vueVersion': '3', + vueVersion: '3', }) diff --git a/src/manifest.json b/src/manifest.json index 80c0869..faeed88 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -89,7 +89,12 @@ "es6": true, "minified": true }, - "usingComponents": true + "usingComponents": true, + "permission": { + "scope.userLocation": { + "desc": "需要获取位置以展示医院信息" + } + } }, "mp-alipay": { "usingComponents": true, @@ -108,6 +113,13 @@ "h5": { "router": { "base": "/" + }, + "sdkConfigs": { + "maps": { + "tencent": { + "key": "IOUBZ-HCDW3-KP53C-RFNVK-QAZ7O-EQFKM" + } + } } } } \ No newline at end of file diff --git a/src/pages.json b/src/pages.json index b15570e..0b7ee4a 100644 --- a/src/pages.json +++ b/src/pages.json @@ -102,6 +102,17 @@ "navigationBarTitleText": "我的" } }, + { + "path": "pages/my/setting", + "type": "page", + "style": { + "navigationBarTitleText": "设置" + } + }, + { + "path": "pages/service/find", + "type": "page" + }, { "path": "pages/service/index", "type": "page", diff --git a/src/pages/my/index.vue b/src/pages/my/index.vue index 83a8a12..55784db 100644 --- a/src/pages/my/index.vue +++ b/src/pages/my/index.vue @@ -13,7 +13,7 @@ 退出登录 + @@ -61,6 +60,19 @@ const logout = () => { }, }) } +function more(item) { + if (item.name == '设置') { + setting() + return + } +} + +function setting() { + uni.navigateTo({ + url: '/pages/my/setting', + }) +} + // userStore.wxLogin() // // 用户登录,获取openId // uni.login({ diff --git a/src/pages/my/setting.vue b/src/pages/my/setting.vue new file mode 100644 index 0000000..e90347d --- /dev/null +++ b/src/pages/my/setting.vue @@ -0,0 +1,310 @@ + +{ + style: { navigationBarTitleText: '设置' }, +} + + + + diff --git a/src/pages/service/find.vue b/src/pages/service/find.vue new file mode 100644 index 0000000..b227fff --- /dev/null +++ b/src/pages/service/find.vue @@ -0,0 +1,102 @@ + + + + + diff --git a/src/pages/service/index.vue b/src/pages/service/index.vue index 72041a7..5f9ea57 100644 --- a/src/pages/service/index.vue +++ b/src/pages/service/index.vue @@ -8,26 +8,6 @@ } - -