Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
basic-uniapp-v3
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Basic
basic-uniapp-v3
Commits
84005304
提交
84005304
authored
8月 26, 2023
作者:
陈师旦
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
upd: 地图请求 ;逻辑层同时发起请求
上级
db7ad0bf
全部展开
显示空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
91 行增加
和
4 行删除
+91
-4
.env.development
.env.development
+1
-1
.env.production
.env.production
+1
-1
App.vue
src/App.vue
+3
-0
monitor.ts
src/api/model/monitor.ts
+17
-0
config.ts
src/pages/business/monitor/wind/config.ts
+61
-0
index.vue
src/pages/business/monitor/wind/index.vue
+0
-0
Navigation.ts
src/utils/const/Navigation.ts
+2
-2
index.ts
src/utils/http/axios/index.ts
+6
-0
没有找到文件。
.env.development
浏览文件 @
84005304
# API 接口地址
# API 接口地址
VITE_GLOB_API_URL=http://qks.straw.yiring.com:40051/tbm
/api
VITE_GLOB_API_URL=http://qks.straw.yiring.com:40051/tbm
# API 接口地址前缀
# API 接口地址前缀
VITE_GLOB_API_URL_PREFIX=/api
VITE_GLOB_API_URL_PREFIX=/api
...
...
.env.production
浏览文件 @
84005304
# API 接口地址
# API 接口地址
VITE_GLOB_API_URL=http://qks.straw.yiring.com:40051/tbm
/api
VITE_GLOB_API_URL=http://qks.straw.yiring.com:40051/tbm
# API 接口地址前缀
# API 接口地址前缀
VITE_GLOB_API_URL_PREFIX=/api
VITE_GLOB_API_URL_PREFIX=/api
...
...
src/App.vue
浏览文件 @
84005304
...
@@ -14,6 +14,9 @@
...
@@ -14,6 +14,9 @@
// 监听在线消息
// 监听在线消息
// Push.listen()
// Push.listen()
// 模拟登录token
// const token = `68b919d2-2ea0-4ad3-9521-9e624e1563ac`
uni
.
setStorageSync
(
'token'
,
'8b218589-12cf-4de2-9f62-b00a5dfcab82'
)
})
})
onShow
(()
=>
{
onShow
(()
=>
{
...
...
src/api/model/monitor.ts
0 → 100644
浏览文件 @
84005304
import
{
otherHttp
}
from
'/@/utils/http/axios'
// import { ContentTypeEnum } from '/@/enums/httpEnum'
enum
monitorApi
{
getWindList
=
'/live/wind/getWindList'
,
// 查询大风数据
}
/**
* @description: 查询大风数据
*/
export
function
getWindList
(
params
)
{
return
otherHttp
.
get
({
url
:
monitorApi
.
getWindList
,
params
,
})
}
src/pages/business/monitor/wind/config.ts
浏览文件 @
84005304
/**
/**
* TODO: 色块图例配置,实际上应该和后端的色斑图,进行动态匹配,可以考虑由后端接口返回
* TODO: 色块图例配置,实际上应该和后端的色斑图,进行动态匹配,可以考虑由后端接口返回
*/
*/
import
{
cloneDeep
}
from
'lodash-es'
/**
/**
* 小时气温图例配置
* 小时气温图例配置
...
@@ -152,3 +153,63 @@ export const windtableData = [
...
@@ -152,3 +153,63 @@ export const windtableData = [
'15~17级'
:
'0站'
,
'15~17级'
:
'0站'
,
},
},
]
]
export
function
buildQueryParams
(
unBuildParams
,
config
?)
{
// const params = unBuildParams
// for (const key in params) {
// if (isRef(params[key])) {
// params[key] = unref(params[key])
// }
// if (isReactive(params[key])) {
// params[key] = toRaw(params[key])
// }
// }
const
queryParams
=
cloneDeep
(
toRaw
(
unBuildParams
))
if
(
config
?.
isSpot
)
{
delete
queryParams
.
numericalBegin
delete
queryParams
.
numericalEnd
delete
queryParams
.
symbolBegin
delete
queryParams
.
symbolEnd
}
if
(
config
?.
isFirstQuery
)
{
delete
queryParams
.
startTime
delete
queryParams
.
endTime
}
queryParams
.
Authorization
=
uni
.
getStorageSync
(
'token'
)
return
queryParams
}
export
function
createSplotLayer
(
type
:
String
)
{
return
{
id
:
`
${
type
}
-splot`
,
type
:
'fill'
,
source
:
`
${
type
}
-splot`
,
paint
:
{
'fill-color'
:
{
type
:
'identity'
,
property
:
'color'
,
},
'fill-opacity'
:
1
,
},
}
}
export
function
createTextLayer
(
type
:
String
)
{
return
{
id
:
`
${
type
}
-text`
,
type
:
'symbol'
,
source
:
`
${
type
}
-text`
,
layout
:
{
'text-field'
:
'{value}'
,
'text-size'
:
14
,
'text-offset'
:
[
0
,
1.2
],
'icon-image'
:
'point.normal'
,
'icon-anchor'
:
'top'
,
'icon-size'
:
0.4
,
},
paint
:
{
'text-color'
:
'#3766fd'
,
'text-halo-color'
:
'#fff'
,
'text-halo-width'
:
1
,
},
}
}
src/pages/business/monitor/wind/index.vue
浏览文件 @
84005304
差异被折叠。
点击展开。
src/utils/const/Navigation.ts
浏览文件 @
84005304
...
@@ -83,8 +83,8 @@ export const liveModules: NavItemType[] = [
...
@@ -83,8 +83,8 @@ export const liveModules: NavItemType[] = [
* token: V4 版本后端生成的一个长期有效 Token,固定值,必传
* token: V4 版本后端生成的一个长期有效 Token,固定值,必传
* open: true 代表可以从嵌入的页面打开新页面,默认为 false,非必传(注意:打开的子页面也进行了重写适配,一般来说不用担心出现意外情况,但注意进行简单测试)
* open: true 代表可以从嵌入的页面打开新页面,默认为 false,非必传(注意:打开的子页面也进行了重写适配,一般来说不用担心出现意外情况,但注意进行简单测试)
*/
*/
// url: `https://hntq.zhijietianqi.com/h5/web/monitoringOfLive/new-severe-weather
.v3.html?app=5&token=${AppV4Token}`,
url
:
`https://hntq.zhijietianqi.com/h5/web/monitoringOfLive/waterRegimenMap
.v3.html?app=5&token=
${
AppV4Token
}
`
,
url
:
`http://127.0.0.1:8080/web/monitoringOfLive/waterRegimenMap.v3.html?app=5&open=true&token=
${
AppV4Token
}
`
,
//
url: `http://127.0.0.1:8080/web/monitoringOfLive/waterRegimenMap.v3.html?app=5&open=true&token=${AppV4Token}`,
},
},
},
},
{
{
...
...
src/utils/http/axios/index.ts
浏览文件 @
84005304
...
@@ -266,6 +266,12 @@ export const defHttp = createAxios({
...
@@ -266,6 +266,12 @@ export const defHttp = createAxios({
})
})
// other api url
// other api url
export
const
otherHttp
=
createAxios
({
requestOptions
:
{
apiUrl
:
API_URL
,
urlPrefix
:
API_URL_PREFIX
,
},
})
// export const otherHttp = createAxios({
// export const otherHttp = createAxios({
// transform: {
// transform: {
// inject: (config: AxiosRequestConfig<any>, options: http.RequestOptions) => {
// inject: (config: AxiosRequestConfig<any>, options: http.RequestOptions) => {
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论