Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
basic-uniapp-v3
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
1
合并请求
1
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Basic
basic-uniapp-v3
Commits
1f882180
提交
1f882180
authored
6月 01, 2026
作者:
方治民
浏览文件
操作
浏览文件
下载
差异文件
Merge branches 'dev' and 'dev' of
https://gitlab.yiring.com/digital-agri/agri-app
into dev
上级
bbcb5489
a62386c0
全部展开
显示空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
195 行增加
和
36 行删除
+195
-36
mapbox.module.js
src/components/Map/Mapbox/mapbox.module.js
+3
-3
types.ts
src/components/Map/types.ts
+4
-0
add.vue
src/pages/jidiguanli/add.vue
+172
-14
create-nongchang-form.vue
src/pages/nongchang/create-nongchang-form.vue
+0
-0
index.vue
src/pages/nongchang/detail/index.vue
+0
-0
nongchang.vue
src/pages/nongchang/nongchang.vue
+7
-7
shouye.vue
src/pages/shouye/shouye.vue
+9
-12
没有找到文件。
src/components/Map/Mapbox/mapbox.module.js
浏览文件 @
1f882180
...
...
@@ -112,15 +112,15 @@ export default {
if (this.map && this.map.remove) {
this.map.remove()
}
let style = merge(defaultStyle, options?.style);
let style = merge(
{},
defaultStyle, options?.style);
//是否卫星图显示
if (options?.style.isImg) {
style.layers
.push(
{
style.layers
= [...style.layers,
{
id: 'wms-img_w-layer',
type: 'raster',
source: 'wms-img_w-source',
layout: { visibility: 'visible' },
}
)
}
]
}
// [107.570282, 19.474339],
// [115.629717, 34.466859],
...
...
src/components/Map/types.ts
浏览文件 @
1f882180
...
...
@@ -10,6 +10,10 @@ export interface BasicMapPage {
*/
init
:
boolean
/**
* 地图渲染是否完成初始化(用于区分页面数据初始化和地图 geojson 渲染初始化)
*/
mapInit
?:
boolean
/**
* 页面正在请求的数据源数量,由于 setGeoJSONSourceForRequest 的异步特性,需要记录当前正在请求的数据源数量,当所有数据源请求完成时,隐藏 Loading
*/
requests
?:
number
...
...
src/pages/jidiguanli/add.vue
浏览文件 @
1f882180
...
...
@@ -113,10 +113,11 @@
function
submit
()
{
formRef
.
value
.
validator
(
pageData
.
form
,
pageData
.
rules
,
true
).
then
((
res
)
=>
{
if
(
res
.
isPassed
)
{
pageData
.
loading
=
true
NongchangAPI
.
saveFarmbase
(
pageData
.
form
).
then
(()
=>
{
toastRef
.
value
.
show
({
type
:
'success'
,
text
:
'保存成功'
})
setTimeout
(()
=>
uni
.
navigateBack
(),
1500
)
})
})
.
finally
(()
=>
pageData
.
loading
=
false
)
}
})
}
...
...
@@ -124,20 +125,48 @@
<
template
>
<view
class=
"page"
>
<view
class=
"container"
>
<view
class=
"form-banner"
>
<text
class=
"title"
>
{{
isSave
?
'新增基地'
:
'基地详情'
}}
</text>
<text
class=
"subtitle"
>
{{
isSave
?
'录入生产基地信息,完善经营档案'
:
'查看基地详细信息'
}}
</text>
</view>
<view
class=
"form-content"
>
<fui-form
ref=
"formRef"
>
<view
class=
"section-card"
>
<fui-input
label=
"基地名称"
placeholder=
"请输入"
v-model=
"form.baseName"
required
/>
<fui-input
disabled
required
label=
"所在地区"
v-model=
"form.address"
@
click=
"show.address = true"
/>
<fui-input
label=
"详细地址"
placeholder=
"请输入"
v-model=
"form.addressDetail"
required
/>
<view
class=
"card-header"
>
<view
class=
"line"
></view>
<text>
基地基础信息
</text>
</view>
<fui-input
label=
"基地名称"
placeholder=
"请输入基地名称"
v-model=
"form.baseName"
required
label-size=
"28"
/>
<fui-form-item
required
asterisk
label=
"所在地区"
labelSize=
"28"
:labelWeight=
"400"
labelWidth=
"auto"
>
<view
class=
"picker-input"
@
click=
"show.address = true"
>
<text
class=
"select-text"
:class=
"
{ placeholder: !form.address }">
{{
form
.
address
||
'请选择所在地区'
}}
</text>
<fui-icon
name=
"arrowright"
:size=
"32"
color=
"#ccc"
></fui-icon>
</view>
</fui-form-item>
<fui-input
label=
"详细地址"
placeholder=
"请输入详细地址"
v-model=
"form.addressDetail"
required
label-size=
"28"
/>
</view>
<view
class=
"section-card"
>
<fui-input
type=
"number"
label=
"基地规模"
v-model=
"form.scale"
required
>
<view
class=
"card-header"
>
<view
class=
"line"
></view>
<text>
经营规模信息
</text>
</view>
<fui-input
type=
"number"
label=
"基地规模"
v-model=
"form.scale"
required
label-size=
"28"
>
<template
#
suffix
><text
class=
"unit"
>
亩
</text></
template
>
</fui-input>
<fui-input
disabled
required
label=
"种植作物"
v-model=
"form.growCropsText"
@
click=
"show.growCrops = true"
/>
<fui-form-item
required
asterisk
label=
"种植作物"
labelSize=
"28"
:labelWeight=
"400"
labelWidth=
"auto"
>
<view
class=
"picker-input"
@
click=
"show.growCrops = true"
>
<text
class=
"select-text"
:class=
"{ placeholder: !form.growCropsText }"
>
{{ form.growCropsText || '请选择种植作物' }}
</text>
<fui-icon
name=
"arrowright"
:size=
"32"
color=
"#ccc"
></fui-icon>
</view>
</fui-form-item>
</view>
<!-- 更多字段... -->
<view
class=
"submit-area"
v-if=
"isSave"
>
<fui-button
text=
"确认保存"
radius=
"100rpx"
@
click=
"submit"
/>
</view>
...
...
@@ -147,14 +176,142 @@
<AreaPicker
v-model:show=
"show.address"
:layer=
"3"
title=
"选择所属地区"
@
confirm=
"handleAreaConfirm"
/>
<fui-picker
:show=
"show.growCrops"
:options=
"options.growCrops"
@
change=
"handleGrowCropsChange"
@
cancel=
"show.growCrops = false"
/>
<fui-toast
ref=
"toastRef"
/>
<fui-loading
isFixed
v-if=
"pageData.loading"
backgroundColor=
"rgba(0, 0, 0, 0.4)"
/>
</view>
</template>
<
style
lang=
"scss"
scoped
>
.page
{
background-color
:
#f7f8fa
;
min-height
:
100vh
;
font-family
:
'DingTalk Sans'
,
sans-serif
;
}
.container
{
padding
:
24
rpx
;
}
.section-card
{
background
:
#fff
;
border-radius
:
24
rpx
;
padding
:
10
rpx
24
rpx
;
margin-bottom
:
24
rpx
;
}
.submit-area
{
padding
:
40
rpx
20
rpx
;
}
.unit
{
font-size
:
26
rpx
;
color
:
#999
;
margin-left
:
12
rpx
;
}
:deep
(
.fui-input__label
)
{
font-family
:
'DingTalk Sans'
!important
;
}
.page
{
min-height
:
100vh
;
background-color
:
#f4f7f5
;
font-family
:
'DingTalk Sans'
,
sans-serif
;
}
.form-banner
{
background-color
:
#5db66f
;
padding
:
60
rpx
40
rpx
100
rpx
;
color
:
#fff
;
.title
{
font-size
:
48
rpx
;
font-weight
:
bold
;
display
:
block
;
letter-spacing
:
2
rpx
;
}
.subtitle
{
font-size
:
26
rpx
;
opacity
:
0.9
;
margin-top
:
12
rpx
;
display
:
block
;
}
}
.form-content
{
padding
:
24
rpx
;
margin-top
:
-80
rpx
;
position
:
relative
;
z-index
:
10
;
}
.section-card
{
background-color
:
#fff
;
border-radius
:
28
rpx
;
padding
:
32
rpx
;
margin-bottom
:
28
rpx
;
box-shadow
:
0
8
rpx
20
rpx
rgba
(
0
,
0
,
0
,
0.03
);
.card-header
{
margin-bottom
:
32
rpx
;
display
:
flex
;
align-items
:
center
;
.line
{
width
:
8
rpx
;
height
:
32
rpx
;
background-color
:
#5db66f
;
border-radius
:
4
rpx
;
margin-right
:
16
rpx
;
}
text
{
font-size
:
32
rpx
;
font-weight
:
bold
;
color
:
#1a1a1a
;
}
}
}
.picker-input
{
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
padding
:
0
20
rpx
;
width
:
100%
;
}
.select-text
{
font-size
:
28
rpx
;
color
:
#333333
;
flex
:
1
;
&.placeholder
{
color
:
#999999
;
}
}
.unit
{
font-size
:
26
rpx
;
color
:
#999
;
margin-left
:
12
rpx
;
}
.submit-area
{
padding
:
60
rpx
20
rpx
100
rpx
;
:deep(.fui-button)
{
background
:
#5db66f
!important
;
border-color
:
#5db66f
!important
;
box-shadow
:
0
8
rpx
24
rpx
rgba
(
93
,
182
,
111
,
0.3
);
}
}
:deep
(
.fui-form
)
{
background
:
transparent
;
}
:deep
(
.fui-form__item
)
{
background
:
transparent
;
border
:
none
;
margin-bottom
:
0
;
padding
:
0
;
}
:deep
(
.fui-input__wrap
)
{
padding
:
28
rpx
0
;
}
:deep
(
.fui-input__label
)
{
font-size
:
28
rpx
;
color
:
#333333
;
font-weight
:
400
;
font-family
:
'DingTalk Sans'
,
system-ui
!important
;
}
:deep
(
.fui-input__self
)
{
font-size
:
28
rpx
;
color
:
#333333
;
font-family
:
'DingTalk Sans'
,
system-ui
!important
;
}
:deep
(
.fui-input__placeholder
)
{
color
:
#d0d0d0
;
font-size
:
28
rpx
;
font-family
:
'DingTalk Sans'
!important
;
}
::v-deep
.uni-input-placeholder
{
font-size
:
28
rpx
!important
;
color
:
#999999
!important
;
font-family
:
'DingTalk Sans'
!important
;
}
:deep
(
.fui-button
)
{
font-family
:
'DingTalk Sans'
!important
;
font-weight
:
bold
!important
;
}
</
style
>
\ No newline at end of file
src/pages/nongchang/create-nongchang-form.vue
浏览文件 @
1f882180
差异被折叠。
点击展开。
src/pages/nongchang/detail/index.vue
浏览文件 @
1f882180
差异被折叠。
点击展开。
src/pages/nongchang/nongchang.vue
浏览文件 @
1f882180
<
script
setup
lang=
"ts"
>
import
{
reactive
}
from
'vue'
import
{
reactive
,
getCurrentInstance
}
from
'vue'
import
{
onShow
}
from
'@dcloudio/uni-app'
const
instance
=
getCurrentInstance
()
// import WeatherForecast from './components/WeatherForecast.vue'
import
dayjs
from
'dayjs'
import
Navigate
from
'@/utils/page/navigate'
...
...
@@ -454,7 +456,7 @@
pageData
.
agricultureClass
.
videoList
.
forEach
((
_
,
index
)
=>
{
if
(
index
!==
currentIndex
)
{
try
{
const
videoContext
=
uni
.
createVideoContext
(
`video
${
index
}
`
)
const
videoContext
=
uni
.
createVideoContext
(
`video
${
index
}
`
,
instance
.
proxy
)
videoContext
.
pause
()
}
catch
(
error
)
{
console
.
log
(
'停止视频失败:'
,
error
)
...
...
@@ -469,7 +471,7 @@
}
function
playVideo
(
index
)
{
const
videoContext
=
uni
.
createVideoContext
(
`video
${
index
}
`
)
const
videoContext
=
uni
.
createVideoContext
(
`video
${
index
}
`
,
instance
.
proxy
)
videoContext
.
requestFullScreen
({
direction
:
0
})
videoContext
.
play
()
}
...
...
@@ -477,7 +479,7 @@
function
handleFullscreenChange
(
e
:
any
,
index
)
{
console
.
log
(
`视频
${
index
}
全屏状态改变`
)
if
(
!
e
.
detail
.
fullScreen
)
{
const
videoContext
=
uni
.
createVideoContext
(
`video
${
index
}
`
)
const
videoContext
=
uni
.
createVideoContext
(
`video
${
index
}
`
,
instance
.
proxy
)
videoContext
.
pause
()
}
}
...
...
@@ -494,12 +496,10 @@
}
onHide
(()
=>
{
// 停止所有其他视频的播放(只暂停,不重置位置)
pageData
.
agricultureClass
.
videoList
.
forEach
((
_
,
index
)
=>
{
try
{
const
videoContext
=
uni
.
createVideoContext
(
`video
${
index
}
`
)
const
videoContext
=
uni
.
createVideoContext
(
`video
${
index
}
`
,
instance
.
proxy
)
videoContext
.
pause
()
// 不重置到开头,保留播放位置
}
catch
(
error
)
{
console
.
log
(
'停止视频失败:'
,
error
)
}
...
...
src/pages/shouye/shouye.vue
浏览文件 @
1f882180
...
...
@@ -15,6 +15,7 @@ import { useUserStore } from '@/store/modules/user'
const
userStore
=
useUserStore
()
const
dictStore
=
useDictStore
()
const
instance
=
getCurrentInstance
()
const
model
=
reactive
({
// 湖南省人民政府
location
:
'112.982931,28.116698'
,
...
...
@@ -452,7 +453,7 @@ function handleVideoPause(currentIndex) {
function handleFullscreenChange(e: any, index) {
console.log(`
视频
$
{
index
}
全屏状态改变
`)
if (!e.detail.fullScreen) {
const videoContext = uni.createVideoContext(`
video$
{
index
}
`)
const videoContext = uni.createVideoContext(`
video$
{
index
}
`
, instance.proxy
)
videoContext.pause()
}
}
...
...
@@ -473,14 +474,14 @@ function handleMetadataLoaded(e: any,video:any) {
function handleVideoPlay(currentIndex) {
pageData.agricultureClass.videoList.forEach((_, index) => {
if (index !== currentIndex) {
const videoContext = uni.createVideoContext(`
video$
{
index
}
`)
const videoContext = uni.createVideoContext(`
video$
{
index
}
`
, instance.proxy
)
videoContext.pause()
}
})
}
function playVideo(index) {
const videoContext = uni.createVideoContext(`
video$
{
index
}
`)
const videoContext = uni.createVideoContext(`
video$
{
index
}
`
, instance.proxy
)
videoContext.requestFullScreen({ direction: 0 })
videoContext.play()
}
...
...
@@ -508,21 +509,16 @@ function toNewsDetail(item) {
}
onHide(() => {
// 停止所有其他视频的播放(只暂停,不重置位置)
pageData.agricultureClass.videoList.forEach((_, index) => {
try {
const videoContext = uni.createVideoContext(`
video$
{
index
}
`)
const videoContext = uni.createVideoContext(`
video$
{
index
}
`
, instance.proxy
)
videoContext.pause()
// 不重置到开头,保留播放位置
} catch (error) {
console.log('停止视频失败:', error)
}
})
})
// 引入实例
const instance = getCurrentInstance();
const getDomDataSetFunc = (domName='',datasetName='index') =>{
return new Promise((resolve,reject)=>{
const queryDataget = uni.createSelectorQuery().in(instance.proxy);
...
...
@@ -717,9 +713,9 @@ export default {
</view>
<view
class=
"codefun-flex-row section_5"
>
<view
v-show=
"item.status"
v-for=
"item in pageData.serviceItems"
:key=
"item.id"
class=
"codefun-flex-col codefun-items-center group_10
mt-5
"
@
click=
"onMenuItemClick(item)"
>
class=
"codefun-flex-col codefun-items-center group_10"
@
click=
"onMenuItemClick(item)"
>
<image
class=
"image_11"
:src=
"item.icon_url"
/>
<text
class=
"font_2 mt-
11
"
>
{{
item
.
name
}}
</text>
<text
class=
"font_2 mt-
3
"
>
{{
item
.
name
}}
</text>
</view>
</view>
<swiper
:autoplay=
"true"
:interval=
"5000"
:duration=
"500"
:circular=
"true"
:vertical=
"true"
...
...
@@ -1164,7 +1160,8 @@ export default {
}
.group_10
{
margin-bottom
:
15
rpx
;
margin-top
:
5
rpx
;
margin-bottom
:
18
rpx
;
flex
:
1
1
173.5
rpx
;
.text_50
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论