Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
basic-uniapp-v3
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
1
合并请求
1
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Basic
basic-uniapp-v3
Commits
c8db9821
提交
c8db9821
authored
12月 24, 2025
作者:
王定
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 完成可信农资
上级
f50ab356
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
41 行增加
和
15 行删除
+41
-15
nongzhi.ts
src/api/model/nongzhi.ts
+1
-1
detail.vue
src/pages/kexinnongzi/detail.vue
+40
-13
components.d.ts
types/components.d.ts
+0
-1
没有找到文件。
src/api/model/nongzhi.ts
浏览文件 @
c8db9821
...
@@ -6,7 +6,7 @@ enum Api {
...
@@ -6,7 +6,7 @@ enum Api {
postEnterpriseAdd
=
'/server/enterprise/add'
,
// 入驻申请
postEnterpriseAdd
=
'/server/enterprise/add'
,
// 入驻申请
getEnterpriseDetail
=
'/server/enterprise/detail'
,
// 企业详情
getEnterpriseDetail
=
'/server/enterprise/detail'
,
// 企业详情
postGoodsAdd
=
'/trade/goods/add'
,
// 农资商品管理-添加
postGoodsAdd
=
'/trade/goods/add'
,
// 农资商品管理-添加
getGoodsQueryById
=
'/trade/goods/
queryBy
Id'
,
// 农资商品管理-通过id查询
getGoodsQueryById
=
'/trade/goods/
listByEnterprise
Id'
,
// 农资商品管理-通过id查询
}
}
/**
/**
* @param params 请求参数
* @param params 请求参数
...
...
src/pages/kexinnongzi/detail.vue
浏览文件 @
c8db9821
...
@@ -8,15 +8,17 @@
...
@@ -8,15 +8,17 @@
import
*
as
LinghuoyonggongAPI
from
'@/api/model/linghuoyonggong'
import
*
as
LinghuoyonggongAPI
from
'@/api/model/linghuoyonggong'
const
userStore
=
useUserStore
()
const
userStore
=
useUserStore
()
const
globSetting
=
useGlobSetting
()
const
globSetting
=
useGlobSetting
()
let
enterpriseId
=
null
;
onLoad
((
options
)
=>
{
onLoad
((
options
)
=>
{
let
param
=
JSON
.
parse
(
decodeURIComponent
(
options
.
param
));
let
param
=
JSON
.
parse
(
decodeURIComponent
(
options
.
param
));
uni
.
setNavigationBarTitle
({
uni
.
setNavigationBarTitle
({
title
:
param
.
name
title
:
param
.
name
});
});
getDetailData
(
param
.
id
);
enterpriseId
=
param
.
id
;
getDetailData
(
enterpriseId
);
queryByCategoryAndCode
(
0
,
null
);
queryByCategoryAndCode
(
0
,
null
);
queryByCategory
();
queryByCategory
();
getGoodsQueryById
(
param
.
id
);
getGoodsQueryById
();
})
})
const
toastRef
=
ref
()
const
toastRef
=
ref
()
const
unitPopupRef
=
ref
(
null
);
const
unitPopupRef
=
ref
(
null
);
...
@@ -38,6 +40,8 @@
...
@@ -38,6 +40,8 @@
categoryText
:[],
categoryText
:[],
categoryVal
:[],
categoryVal
:[],
enterpriseProduct
:[],
rules
:
[
rules
:
[
{
{
name
:
'name'
,
name
:
'name'
,
...
@@ -84,10 +88,9 @@
...
@@ -84,10 +88,9 @@
enterpriseId
:
""
,
// 企业ID
enterpriseId
:
""
,
// 企业ID
image
:
""
image
:
""
})
})
function
getGoodsQueryById
(
id
){
function
getGoodsQueryById
(){
NongzhiAPI
.
getEnterpriseList
({
id
:
id
}).
then
((
res
)
=>
{
NongzhiAPI
.
getGoodsQueryById
({
enterpriseId
:
enterpriseId
}).
then
((
res
)
=>
{
console
.
log
(
"查询到的产品"
);
pageData
.
enterpriseProduct
=
res
;
console
.
log
(
res
);
})
})
}
}
// 文件上传
// 文件上传
...
@@ -155,8 +158,6 @@
...
@@ -155,8 +158,6 @@
// 查询商品分类
// 查询商品分类
function
queryByCategory
(){
function
queryByCategory
(){
LinghuoyonggongAPI
.
gitListByCodeDict
({
code
:
'category'
}).
then
(
res
=>
{
LinghuoyonggongAPI
.
gitListByCodeDict
({
code
:
'category'
}).
then
(
res
=>
{
console
.
log
(
"查询到的商品分类"
);
console
.
log
(
res
);
pageData
.
categoryOptions
=
res
;
pageData
.
categoryOptions
=
res
;
let
textArr
=
[];
let
textArr
=
[];
for
(
let
i
=
0
;
i
<
res
.
length
;
i
++
){
for
(
let
i
=
0
;
i
<
res
.
length
;
i
++
){
...
@@ -200,7 +201,7 @@
...
@@ -200,7 +201,7 @@
})
})
pageData
.
isPopupShow
=
false
;
pageData
.
isPopupShow
=
false
;
setTimeout
(()
=>
{
setTimeout
(()
=>
{
getGoodsQueryById
(
productInfo
.
id
);
getGoodsQueryById
();
},
500
)
},
500
)
})
})
}
}
...
@@ -223,8 +224,21 @@
...
@@ -223,8 +224,21 @@
}
}
}
}
function
handlePublish
()
{
function
handlePublish
()
{
productInfo
.
id
=
""
;
productInfo
.
name
=
""
;
productInfo
.
mobile
=
""
;
productInfo
.
category
=
""
;
productInfo
.
minSellPrice
=
""
;
productInfo
.
maxSellPrice
=
""
;
productInfo
.
unit
=
""
;
productInfo
.
image
=
""
;
pageData
.
isPopupShow
=
true
;
pageData
.
isPopupShow
=
true
;
}
}
function
makePhoneCall
(){
uni
.
makePhoneCall
({
phoneNumber
:
pageData
.
data
.
createBy
});
}
</
script
>
</
script
>
<
template
>
<
template
>
<view
class=
"w-full h-95vh bg-#E6F5E8 detail_page"
>
<view
class=
"w-full h-95vh bg-#E6F5E8 detail_page"
>
...
@@ -247,13 +261,18 @@
...
@@ -247,13 +261,18 @@
<view
class=
"module_title"
>
主营产品
</view>
<view
class=
"module_title"
>
主营产品
</view>
<view
class=
"module_separate"
></view>
<view
class=
"module_separate"
></view>
<view
class=
"module_business"
>
<view
class=
"module_business"
>
<view
class=
"business_item"
v-for=
"
(item,index) in 5"
:key=
"index
"
>
<view
class=
"business_item"
v-for=
"
item in pageData.enterpriseProduct"
:key=
"item.id
"
>
<image
class=
"business_img"
mode=
"heightFix"
src=
"/static/images/test/product.png
"
/>
<image
class=
"business_img"
mode=
"heightFix"
:src=
"item.image
"
/>
<view
class=
"qualification_name ellipsis"
>
有机砂糖橘
</view>
<view
class=
"qualification_name ellipsis"
>
{{
item
.
name
}}
</view>
<view
class=
"qualification_price ellipsis"
>
¥
3.2
<text
class=
"qualification_text"
>
/斤
</text></view>
<view
class=
"qualification_price ellipsis"
>
¥
{{
item
.
minSellPrice
}}
<text>
~
</text>
{{
item
.
maxSellPrice
}}
<text
class=
"qualification_text"
>
/
{{
item
.
unit
}}
</text></view>
</view>
</view>
</view>
</view>
</view>
</view>
<view
class=
"make-phone-view"
>
<fui-button
text=
"我要购买"
bold
radius=
"96rpx"
@
click=
"makePhoneCall()"
height=
"80rpx"
/>
</view>
</view>
</view>
<fui-fab
position=
"right"
distance=
"10"
bottom=
"240"
width=
"120"
@
click=
"handlePublish"
>
<fui-fab
position=
"right"
distance=
"10"
bottom=
"240"
width=
"120"
@
click=
"handlePublish"
>
<view
class=
"text-white text-center"
>
<view
class=
"text-white text-center"
>
...
@@ -491,4 +510,12 @@
...
@@ -491,4 +510,12 @@
top
:
24
rpx
;
top
:
24
rpx
;
right
:
24
rpx
;
right
:
24
rpx
;
}
}
.make-phone-view
{
width
:
690
rpx
;
height
:
80
rpx
;
position
:
fixed
;
left
:
30
rpx
;
bottom
:
450
rpx
;
}
</
style
>
</
style
>
types/components.d.ts
浏览文件 @
c8db9821
...
@@ -7,7 +7,6 @@ export {}
...
@@ -7,7 +7,6 @@ export {}
/* prettier-ignore */
/* prettier-ignore */
declare
module
'vue'
{
declare
module
'vue'
{
export
interface
GlobalComponents
{
export
interface
GlobalComponents
{
'副本'
:
typeof
import
(
'./../src/components/ConfirmDialog/index - 副本.vue'
)[
'default'
]
AffixFilter
:
typeof
import
(
'./../src/components/Map/Widgets/AffixFilter/src/AffixFilter.vue'
)[
'default'
]
AffixFilter
:
typeof
import
(
'./../src/components/Map/Widgets/AffixFilter/src/AffixFilter.vue'
)[
'default'
]
BottomBar
:
typeof
import
(
'./../src/components/Map/Widgets/BottomBar/src/BottomBar.vue'
)[
'default'
]
BottomBar
:
typeof
import
(
'./../src/components/Map/Widgets/BottomBar/src/BottomBar.vue'
)[
'default'
]
CacheImage
:
typeof
import
(
'./../src/components/CacheImage/index.vue'
)[
'default'
]
CacheImage
:
typeof
import
(
'./../src/components/CacheImage/index.vue'
)[
'default'
]
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论