Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
basic-uniapp-v3
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
1
合并请求
1
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Basic
basic-uniapp-v3
Commits
430c2d14
提交
430c2d14
authored
12月 24, 2025
作者:
王定
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 在manifest.json配置文件中加上privacy弹框确认框用于用户确认或拒绝服务协议和隐私政策
上级
fc48313c
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
64 行增加
和
16 行删除
+64
-16
manifest.json
src/manifest.json
+9
-0
detail.vue
src/pages/kexinnongzi/detail.vue
+51
-12
shenqingruzhu.vue
src/pages/kexinnongzi/shenqingruzhu.vue
+4
-4
没有找到文件。
src/manifest.json
浏览文件 @
430c2d14
...
...
@@ -131,6 +131,15 @@
"uniStatistics"
:
{
"enable"
:
true
},
"privacy"
:
{
"prompt"
:
"template"
,
"template"
:
{
"title"
:
"服务协议和隐私政策"
,
"message"
:
" 尊敬的用户,欢迎您注册成为本应用用户,在注册前请您仔细阅读<a href=
\"
https://app.yiring.com/agri/services.html
\"
>《服务协议》</a>及<a href=
\"
https://app.yiring.com/agri/privacy.html
\"
>《隐私政策》</a>,了解我们对您使用我们APP制定的规则,您个人信息的处理以及申请权限的目的和使用范围。<br/> 经您确认后,本用户协议和隐私权政策即在您和本应用之间产生法律效力。请您务必在注册之前认真阅读全部服务协议内容,如有任何疑问,可向本应用客服咨询。"
,
"buttonAccept"
:
"同意"
,
"buttonRefuse"
:
"拒绝并退出"
}
},
"nativePlugins"
:
{
"lemonjk-FileSelect"
:
{
"appid_android"
:
"com.yiring.app.agri"
,
...
...
src/pages/kexinnongzi/detail.vue
浏览文件 @
430c2d14
...
...
@@ -31,16 +31,51 @@
unitText
:
""
,
productImageArr
:[],
rules
:
[
{
name
:
'name'
,
rule
:
[
'required'
],
msg
:
[
'请输入商品名称'
],
},{
name
:
"contactMobile"
,
rule
:
[
"required"
,
"isMobile"
],
msg
:
[
"请输入联系电话"
,
"请输入正确的联系电话"
]
},{
name
:
'category'
,
rule
:
[
'required'
],
msg
:
[
'请选择商品分类'
],
},{
name
:
'minSellPrice'
,
rule
:
[
'required'
],
msg
:
[
'请输入最小销售价'
],
},{
name
:
'maxSellPrice'
,
rule
:
[
'required'
],
msg
:
[
'请输入最大销售价'
],
},
{
name
:
'unit'
,
rule
:
[
'required'
],
msg
:
[
'请选择单位'
],
},
{
name
:
'image'
,
rule
:
[
'required'
],
msg
:
[
'请选择商品图片'
],
},
]
})
let
productInfo
=
reactive
({
id
:
""
,
name
:
""
,
// 商品名称
contactMobile
:
""
,
// 联系方式
category
:
""
,
// 分类
minSellPrice
:
""
,
// 最小销售价
maxSellPrice
:
""
,
// 最大销售价
unit
:
""
,
// 单位
unitCode
:
""
,
// 单位编码
enterpriseId
:
""
,
// 企业ID
image
:
""
})
// 文件上传
function
handleUpload
(
file
)
{
...
...
@@ -120,14 +155,21 @@
})
}
// 发布
const
formRef
=
ref
()
function
addData
(){
NongzhiAPI
.
postGoodsAdd
(
productInfo
).
then
((
res
)
=>
{
// productInfo.img = pageData.productImageArr[0];
formRef
.
value
.
validator
(
productInfo
,
pageData
.
rules
,
true
).
then
((
res
)
=>
{
if
(
res
.
isPassed
)
{
console
.
log
(
"验证通过了"
);
}
})
/* NongzhiAPI.postGoodsAdd(productInfo).then((res) => {
console.log("发布成功了");
console.log(res);
/* pageData.enterpriseCers = res.enterpriseCers.split(",");
pageData.data = res; */
})
}) */
}
function
getDetailData
(
id
){
NongzhiAPI
.
getEnterpriseDetail
({
id
}).
then
((
res
)
=>
{
...
...
@@ -192,13 +234,10 @@
<view
class=
"del_person_btn"
></view>
</view>
<view
class=
"popup_content"
>
<fui-form
error-position=
"1"
ref=
"form"
top=
"0"
:show=
"false"
>
<fui-form-item
asterisk
label=
"商品名称"
labelSize=
"28"
label-width=
"180"
size=
"28"
>
<fui-input
:borderBottom=
"false"
v-model=
"productInfo.name"
:padding=
"[0]"
placeholder=
"请输入商品名称"
></fui-input>
</fui-form-item>
<fui-form-item
asterisk
label=
"联系方式"
labelSize=
"28"
label-width=
"180"
size=
"28"
>
<fui-input
:borderBottom=
"false"
:padding=
"[0]"
placeholder=
"请输入联系方式"
></fui-input>
</fui-form-item>
<fui-form
label-weight=
"auto"
ref=
"formRef"
top=
"0"
>
<fui-input
required
label=
"商品名称"
borderTop
placeholder=
"请输入商品名称"
v-model=
"productInfo.name"
></fui-input>
<fui-input
required
label=
"联系电话"
placeholder=
"请输入联系方式"
v-model=
"productInfo.contactMobile"
></fui-input>
<fui-form-item
asterisk
label=
"价格(元)"
labelSize=
"28"
label-width=
"180"
size=
"28"
>
<fui-input
v-model=
"productInfo.minSellPrice"
style=
"width: 120rpx !important"
:borderBottom=
"false"
:padding=
"[0]"
placeholder=
"最低价"
></fui-input>
<template
v-slot:right
>
...
...
@@ -209,7 +248,7 @@
</
template
>
</fui-form-item>
<fui-form-item
asterisk
label=
"
产
品图片"
:bottomBorder=
"false"
prop=
"descr"
error-align=
"left"
>
<fui-form-item
asterisk
label=
"
商
品图片"
:bottomBorder=
"false"
prop=
"descr"
error-align=
"left"
>
<
template
v-slot:vertical
>
<uni-file-picker
:value=
"pageData.productImageArr"
ref=
"uploadRef"
limit=
"1"
:auto-upload=
"false"
@
select=
"handleUpload"
@
delete=
"handleDelete"
/>
</
template
>
...
...
src/pages/kexinnongzi/shenqingruzhu.vue
浏览文件 @
430c2d14
...
...
@@ -67,8 +67,8 @@
addr
:
""
,
// 详细地址
lon
:
"
110
"
,
// 经度
lat
:
'
29
'
,
// 纬度
lon
:
""
,
// 经度
lat
:
''
,
// 纬度
bizCategory
:
2
,
// 业务分类【1:代理记账、2:农资、3:农机、4:金融】
enterpriseLogoUrl
:
null
,
// 企业logo url
enterpriseCers
:
null
,
// 企业资质url
...
...
@@ -241,7 +241,7 @@
function
submit
()
{
pageData
.
form
.
enterpriseLogoUrl
=
pageData
.
enterpriseLogoArr
.
join
(
''
);
pageData
.
form
.
enterpriseCers
=
pageData
.
cersImageArr
.
join
(
','
);
/*
if (pageData.position.length == 0) {
if
(
pageData
.
position
.
length
==
0
)
{
toastRef
.
value
.
show
({
type
:
'error'
,
text
:
'无法获取位置'
,
...
...
@@ -249,7 +249,7 @@
return
}
pageData
.
form
.
lon
=
pageData
.
position
[
0
]
pageData.form.lat = pageData.position[1]
*/
pageData
.
form
.
lat
=
pageData
.
position
[
1
]
formRef
.
value
.
validator
(
pageData
.
form
,
pageData
.
rules
,
true
).
then
((
res
)
=>
{
if
(
res
.
isPassed
)
{
NongzhiAPI
.
postEnterpriseAdd
(
pageData
.
form
).
then
((
res
)
=>
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论