Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
basic-uniapp-v3
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
1
合并请求
1
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Basic
basic-uniapp-v3
Commits
14acfbfc
提交
14acfbfc
authored
12月 22, 2025
作者:
王定
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 更换.env.development文件的接口地址为线上地址
上级
95308e65
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
164 行增加
和
57 行删除
+164
-57
.env.development
.env.development
+4
-4
detail.vue
src/pages/kexinnongzi/detail.vue
+129
-12
kexinnongzi.vue
src/pages/kexinnongzi/kexinnongzi.vue
+31
-41
test_business.png
src/static/images/test/test_business.png
+0
-0
test_logo.png
src/static/images/test/test_logo.png
+0
-0
没有找到文件。
.env.development
浏览文件 @
14acfbfc
# API 接口地址
#
VITE_GLOB_API_URL=http://111.22.182.169:49600
VITE_GLOB_API_URL=http://36.133.16.81:42111
VITE_GLOB_API_URL=http://111.22.182.169:49600
#
VITE_GLOB_API_URL=http://36.133.16.81:42111
# API 接口地址前缀
#
VITE_GLOB_API_URL_PREFIX=/jeecgboot
VITE_GLOB_API_URL_PREFIX=/jeecg-boot
VITE_GLOB_API_URL_PREFIX=/jeecgboot
#
VITE_GLOB_API_URL_PREFIX=/jeecg-boot
src/pages/kexinnongzi/detail.vue
浏览文件 @
14acfbfc
<
script
setup
lang=
"ts"
>
import
{
onLoad
}
from
'@dcloudio/uni-app'
import
Navigate
from
'@/utils/page/navigate'
import
{
reactive
,
ref
}
from
'vue'
import
*
as
NongzhiAPI
from
'@/api/model/nongzhi'
const
bgColorData
=
[
"#EEFAEB"
,
"#EFF1FF"
,
"#FFF3F1"
,
"#E8F7F7"
,
"#FFF3E7"
,
"#FAF8EA"
];
let
testDataList
=
[
'营业执照'
,
'食品经营许可证类选择器允许你根据元素在'
,
'有机产品认证书'
,
'无公害农产品证书'
,
'有机产品认证书'
,
'营业执照'
]
const
pageData
=
reactive
({
})
</
script
>
<
template
>
<view>
详情页的内容
<view
class=
"w-full h-95vh bg-#E6F5E8 detail_page"
>
<view
class=
"module_width top_content"
>
<view
class=
"enterprise_logo_view"
><image
class=
"enterprise_logo"
mode=
"heightFix"
src=
"/static/images/test/test_logo.png"
/></view>
<view
class=
"enterprise_business"
>
主营:粮、油、糖、棉、肉、乳等品类的全球一体化运营
</view>
<view
class=
"enterprise_description"
>
中粮集团下设中粮粮油、中国粮油、中国食品、地产酒店、中国土畜、中粮屯河、中粮包装、中粮发展、金融等9大业务板块,拥有中国食品、中粮控股两家香港上市公司,中粮屯河、中粮地产和丰原生化3家内地上市公司。福临门食用油、长城葡萄酒、金帝巧克力、屯河番茄制品、家佳康肉制品以及大悦城Shopping Mall、亚龙湾度假区、凯莱酒店、雪莲羊绒、中茶茶叶、中英人寿保险农村金融服务等等。
</view>
</view>
<view
class=
"module_width middle_content"
>
<view
class=
"module_title"
>
资质证书
</view>
<view
class=
"module_separate"
></view>
<view
class=
"module_qualification"
>
<view
class=
"qualification_item qualification_bg"
v-for=
"(item,index) in testDataList"
:key=
"index"
>
<image
class=
"enterprise_logo"
mode=
"heightFix"
src=
"/static/images/test/test_business.png"
/>
<view
class=
"qualification_name ellipsis"
>
{{
item
}}
</view>
</view>
</view>
</view>
<view
class=
"module_width footer_content"
>
主营产品
</view>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
<
style
lang=
"less"
scoped
>
.detail_page
{
display
:
flex
;
flex-wrap
:
wrap
;
justify-content
:
center
;
align-items
:
flex-start
;
align-content
:
flex-start
;
.module_width{
width
:
690
rpx
;
margin-top
:
24
rpx
;
background
:
#FFFFFF
;
border-radius
:
20
rpx
;
padding
:
28
rpx
;
box-sizing
:
border-box
;
}
},
methods
:
{
.ellipsis
{
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
}
.top_content
{
.enterprise_logo_view{
width
:
630
rpx
;
display
:
flex
;
align-items
:
flex-start
;
.enterprise_logo{
height
:
80
rpx
;
}
</
script
>
}
.enterprise_business
{
width
:
636
rpx
;
padding
:
8
rpx
20
rpx
;
border-radius
:
8
rpx
;
background
:
linear-gradient
(
233.81deg
,
rgba
(
92
,
181
,
110
,
1
)
0%
,
rgba
(
100
,
214
,
62
,
1
)
100%
);
font-size
:
24
rpx
;
font-weight
:
500
;
line-height
:
40
rpx
;
color
:
#FFFFFF
;
margin-top
:
32
rpx
;
}
.enterprise_description
{
margin-top
:
20
rpx
;
font-size
:
24
rpx
;
font-weight
:
400
;
letter-spacing
:
0px
;
line-height
:
40
rpx
;
color
:
#333333
;
text-align
:
justify
;
vertical-align
:
middle
;
text-indent
:
2em
;
}
}
.middle_content
{
<
style
>
}
.module_title
{
font-size
:
32
rpx
;
font-weight
:
500
;
line-height
:
40
rpx
;
color
:
#333333
;
text-align
:
justify
;
vertical-align
:
middle
;
}
.module_separate
{
margin-top
:
20
rpx
;
width
:
128
rpx
;
height
:
6
rpx
;
opacity
:
1
;
background
:
linear-gradient
(
233.81deg
,
#5CB56E
0%
,
#64D63E
100%
);
}
.module_qualification
{
margin-top
:
32
rpx
;
display
:
flex
;
flex-wrap
:
wrap
;
align-items
:
flex-start
;
align-content
:
flex-start
;
.qualification_item{
width
:
198
rpx
;
height
:
166
rpx
;
margin-left
:
20
rpx
;
margin-top
:
26
rpx
;
border-radius
:
8
rpx
;
background
:
#EEFAEB
;
padding-top
:
8
rpx
;
box-sizing
:
border-box
;
display
:
flex
;
flex-wrap
:
wrap
;
justify-content
:
center
;
.enterprise_logo{
height
:
114
rpx
;
max-width
:
160
rpx
;
}
.qualification_name
{
height
:
40
rpx
;
line-height
:
40
rpx
;
font-size
:
20
rpx
;
color
:
#333333
;
max-width
:
160
rpx
;
}
}
.qualification_item
:nth-child
(
3n
+
1
)
{
margin-left
:
0
rpx
;
}
}
}
</
style
>
src/pages/kexinnongzi/kexinnongzi.vue
浏览文件 @
14acfbfc
<
script
setup
lang=
"ts"
>
import
{
onLoad
,
onPullDownRefresh
,
onShow
}
from
'@dcloudio/uni-app'
import
Navigate
from
'@/utils/page/navigate'
import
{
reactive
,
ref
}
from
'vue'
import
*
as
NongzhiAPI
from
'@/api/model/nongzhi'
const
model
=
reactive
({
const
pageData
=
reactive
({
params
:
{
pageNo
:
1
,
pageSize
:
10
,
...
...
@@ -18,47 +19,46 @@
})
async
function
getList
(
params
)
{
if
(
model
.
loading
)
return
model
.
loading
=
true
if
(
pageData
.
loading
)
return
pageData
.
loading
=
true
NongzhiAPI
.
getEnterpriseList
(
params
).
then
((
res
)
=>
{
if
(
res
.
records
.
length
>
0
)
{
const
{
records
}
=
res
if
(
model
.
params
.
pageNo
===
1
)
{
model
.
dataList
=
records
if
(
pageData
.
params
.
pageNo
===
1
)
{
pageData
.
dataList
=
records
}
else
{
model
.
dataList
=
[...
model
.
dataList
,
...
records
]
pageData
.
dataList
=
[...
pageData
.
dataList
,
...
records
]
}
model
.
hasMore
=
records
.
length
===
model
.
params
.
pageSize
model
.
params
.
pageNo
++
pageData
.
hasMore
=
records
.
length
===
pageData
.
params
.
pageSize
pageData
.
params
.
pageNo
++
}
else
{
model
.
hasMore
=
false
pageData
.
hasMore
=
false
}
})
model
.
loading
=
false
pageData
.
loading
=
false
}
function
toDetail
(
item
)
{
uni
.
navigateTo
({
url
:
`/pages/kexinnongzi/detail?id=
${
item
.
id
}
`
,
})
let
param
=
encodeURIComponent
(
JSON
.
stringify
({
id
:
1
,
name
:
"中粮集团"
}));
Navigate
.
to
(
`/pages/kexinnongzi/detail?param=
${
param
}
`
)
}
function
resetData
()
{
model
.
params
.
pageNo
=
1
model
.
hasMore
=
true
model
.
loading
=
false
pageData
.
params
.
pageNo
=
1
pageData
.
hasMore
=
true
pageData
.
loading
=
false
}
onPullDownRefresh
(()
=>
{
resetData
()
getList
(
model
.
params
)
getList
(
pageData
.
params
)
})
onShow
(()
=>
{
resetData
()
getList
(
model
.
params
)
getList
(
pageData
.
params
)
})
</
script
>
...
...
@@ -69,7 +69,7 @@
class=
"w-full h-full"
style=
"font-family: '思源黑体'; font-weight: 400"
scroll-y
@
scrolltolower=
"getList(
model
.params)"
@
scrolltolower=
"getList(
pageData
.params)"
:show-scrollbar=
"false"
>
<view
class=
"top_img"
>
...
...
@@ -77,7 +77,7 @@
</view>
<view
class=
"page_content"
>
<view
class=
"item_list"
v-for=
"item in
model
.dataList"
:key=
"item.id"
@
click=
"toDetail(item)"
>
<view
class=
"item_list"
v-for=
"item in
pageData
.dataList"
:key=
"item.id"
@
click=
"toDetail(item)"
>
<view
class=
"item_left"
>
<image
class=
"enterprise_logo"
mode=
"aspectFit"
:src=
"item.businessLicenseUrl"
/>
</view>
...
...
@@ -90,34 +90,24 @@
</view>
</view>
<view
class=
"item_list"
@
click=
"toDetail(
{name:'中粮集团',id:8})">
<view
class=
"item_left"
>
<image
class=
"enterprise_logo"
mode=
"aspectFit"
src=
""
/>
</view>
<!--
<view
v-for=
"news in newsList"
:key=
"news.id"
class=
"w-full h-auto flex flex-row justify-around p-2 bg-#fff border-rd-lg mb-2"
style=
"min-height: 120rpx"
@
click=
"toNewsDetail(news)"
>
<view
class=
"flex flex-col justify-between"
:style=
"news.posterUrl ? 'width: 68%' : 'width: 100%'"
>
<view
class=
"ellipsis-multiline fontsize_28 color-#333333"
>
{{
news
.
title
}}
</view>
<view
class=
"flex flex-row justify-between text-25 color-#686868"
>
<text>
{{
dayjs
(
news
.
publishDate
).
format
(
'YYYY年MM月DD日'
)
}}
</text>
<view
class=
"mr-1 flex-center"
>
<image
class=
"mt-0.5 mr-1 w-30 h-26"
src=
"/static/images/news/views.png"
/>
<view
class=
"flex-center text-24 lh-24rpx"
>
{{
news
.
viewCount
}}
</view>
<view
class=
"item_right"
>
<view
class=
"item_name ellipsis"
>
中粮集团
</view>
<view
class=
"item_description ellipsis"
>
产品描述
</view>
<view
class=
"item_details"
>
<view
class=
"detail_btn"
>
查看详情
</view>
</view>
<view
v-show=
"!news.posterUrl"
class=
"w-4%"
></view>
</view>
</view>
<view
v-show=
"news.posterUrl"
class=
"w-30% h-130"
>
<image
class=
"w-full h-full border-rd"
:src=
"news.posterUrl"
/>
</view>
</view>
-->
<!-- 加载状态 -->
<view
class=
"loading-status"
>
<text
v-if=
"
model
.loading"
>
加载中...
</text>
<text
v-else-if=
"!
model
.hasMore"
>
没有更多数据了
</text>
<text
v-if=
"
pageData
.loading"
>
加载中...
</text>
<text
v-else-if=
"!
pageData
.hasMore"
>
没有更多数据了
</text>
<text
v-else
>
上拉加载更多
</text>
</view>
</scroll-view>
...
...
src/static/images/test/test_business.png
0 → 100644
浏览文件 @
14acfbfc
27.5 KB
src/static/images/test/test_logo.png
0 → 100644
浏览文件 @
14acfbfc
17.8 KB
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论