Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
Sign in / Register
Toggle navigation
S
site-uniapp
概览
Overview
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
Members
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
王柯
site-uniapp
Commits
11a58797
提交
11a58797
authored
2月 22, 2023
作者:
wk
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
新闻和操作权限接口调试
父级
e3d01697
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
91 行增加
和
24 行删除
+91
-24
api/env.js
+2
-2
pages/gallery/app/modeFormList/modeFormList.vue
+6
-6
pages/gallery/gallery.vue
+4
-1
pages/index/index.vue
+32
-9
pages/index/newDetail/newDetail.vue
+14
-4
pages/index/siteNewList/siteNewList.vue
+33
-2
没有找到文件。
api/env.js
View file @
11a58797
...
@@ -12,7 +12,7 @@ if (ENV == "dev") {
...
@@ -12,7 +12,7 @@ if (ENV == "dev") {
labourAppNo
:
"appletlabourboard"
,
labourAppNo
:
"appletlabourboard"
,
jzgrAppNo
:
""
,
//建筑工人沟通日
jzgrAppNo
:
""
,
//建筑工人沟通日
jyxyAppNo
:
""
,
//教育学院
jyxyAppNo
:
""
,
//教育学院
jfscAppNo
:
""
jfscAppNo
:
"
63f05e5dc9d53f743030fa92
"
}
}
}
else
{
}
else
{
if
(
ENV
==
'test'
)
{
if
(
ENV
==
'test'
)
{
...
@@ -41,7 +41,7 @@ if (ENV == "dev") {
...
@@ -41,7 +41,7 @@ if (ENV == "dev") {
labourAppNo
:
"20230207002"
,
//劳务看板
labourAppNo
:
"20230207002"
,
//劳务看板
jzgrAppNo
:
"63e1e639e7025e13c471a9d2"
,
//建筑工人沟通日
jzgrAppNo
:
"63e1e639e7025e13c471a9d2"
,
//建筑工人沟通日
jyxyAppNo
:
"63e1f98420836820ca5e3c02"
,
//教育学院
jyxyAppNo
:
"63e1f98420836820ca5e3c02"
,
//教育学院
jfscAppNo
:
"
63f05e5dc9d53f743030fa92
"
//积分商城
jfscAppNo
:
""
//积分商城
}
}
}
}
}
}
...
...
pages/gallery/app/modeFormList/modeFormList.vue
View file @
11a58797
...
@@ -440,7 +440,7 @@
...
@@ -440,7 +440,7 @@
if
(
!
isAuth
)
{
if
(
!
isAuth
)
{
uni
.
showModal
({
uni
.
showModal
({
title
:
'提示'
,
title
:
'提示'
,
content
:
'您没有删除权限,如需要请联系管理
人
员'
,
content
:
'您没有删除权限,如需要请联系管理员'
,
showCancel
:
false
,
showCancel
:
false
,
confirmText
:
"知道了"
,
confirmText
:
"知道了"
,
confirmColor
:
'#3B73FE'
,
confirmColor
:
'#3B73FE'
,
...
@@ -546,7 +546,7 @@
...
@@ -546,7 +546,7 @@
if
(
!
isAuth
)
{
if
(
!
isAuth
)
{
uni
.
showModal
({
uni
.
showModal
({
title
:
'提示'
,
title
:
'提示'
,
content
:
'您没有新增权限,如需要请联系管理
人
员'
,
content
:
'您没有新增权限,如需要请联系管理员'
,
showCancel
:
false
,
showCancel
:
false
,
confirmText
:
"知道了"
,
confirmText
:
"知道了"
,
confirmColor
:
'#3B73FE'
,
confirmColor
:
'#3B73FE'
,
...
@@ -591,7 +591,7 @@
...
@@ -591,7 +591,7 @@
if
(
!
isAuth
)
{
if
(
!
isAuth
)
{
uni
.
showModal
({
uni
.
showModal
({
title
:
'提示'
,
title
:
'提示'
,
content
:
'您没有编辑权限,如需要请联系管理
人
员'
,
content
:
'您没有编辑权限,如需要请联系管理员'
,
showCancel
:
false
,
showCancel
:
false
,
confirmText
:
"知道了"
,
confirmText
:
"知道了"
,
confirmColor
:
'#3B73FE'
,
confirmColor
:
'#3B73FE'
,
...
@@ -624,7 +624,7 @@
...
@@ -624,7 +624,7 @@
if
(
!
isAuth
)
{
if
(
!
isAuth
)
{
uni
.
showModal
({
uni
.
showModal
({
title
:
'提示'
,
title
:
'提示'
,
content
:
'您没有
编辑权限,如需要请联系管理人
员'
,
content
:
'您没有
查看权限,如需要请联系管理
员'
,
showCancel
:
false
,
showCancel
:
false
,
confirmText
:
"知道了"
,
confirmText
:
"知道了"
,
confirmColor
:
'#3B73FE'
,
confirmColor
:
'#3B73FE'
,
...
@@ -651,7 +651,7 @@
...
@@ -651,7 +651,7 @@
if
(
!
isAuth
)
{
if
(
!
isAuth
)
{
uni
.
showModal
({
uni
.
showModal
({
title
:
'提示'
,
title
:
'提示'
,
content
:
'您没有删除权限,如需要请联系管理
人
员'
,
content
:
'您没有删除权限,如需要请联系管理员'
,
showCancel
:
false
,
showCancel
:
false
,
confirmText
:
"知道了"
,
confirmText
:
"知道了"
,
confirmColor
:
'#3B73FE'
,
confirmColor
:
'#3B73FE'
,
...
@@ -704,7 +704,7 @@
...
@@ -704,7 +704,7 @@
if
(
!
isAuth
)
{
if
(
!
isAuth
)
{
uni
.
showModal
({
uni
.
showModal
({
title
:
'提示'
,
title
:
'提示'
,
content
:
'您没有查看权限,如需要请联系管理
人
员'
,
content
:
'您没有查看权限,如需要请联系管理员'
,
showCancel
:
false
,
showCancel
:
false
,
confirmText
:
"知道了"
,
confirmText
:
"知道了"
,
confirmColor
:
'#3B73FE'
,
confirmColor
:
'#3B73FE'
,
...
...
pages/gallery/gallery.vue
View file @
11a58797
...
@@ -111,7 +111,7 @@
...
@@ -111,7 +111,7 @@
this
.
getMessages
()
this
.
getMessages
()
this
.
getNeedDo
()
this
.
getNeedDo
()
this
.
getAppGroup
()
this
.
getAppGroup
()
uni
.
$on
ce
(
"refreshOrg"
,
res
=>
{
uni
.
$on
(
"refreshOrg"
,
res
=>
{
this
.
orgName
=
uni
.
getStorageSync
(
"org_name"
)
this
.
orgName
=
uni
.
getStorageSync
(
"org_name"
)
})
})
if
(
!
uni
.
getStorageSync
(
"org_name"
))
{
if
(
!
uni
.
getStorageSync
(
"org_name"
))
{
...
@@ -122,6 +122,9 @@
...
@@ -122,6 +122,9 @@
}
}
this
.
getMostUsed
()
this
.
getMostUsed
()
},
},
onUnload
()
{
uni
.
$off
(
"refreshOrg"
)
},
onPageScroll
(
e
)
{
onPageScroll
(
e
)
{
//#ifdef H5
//#ifdef H5
this
.
isFix
=
true
this
.
isFix
=
true
...
...
pages/index/index.vue
View file @
11a58797
...
@@ -163,7 +163,6 @@
...
@@ -163,7 +163,6 @@
onLoad
()
{
onLoad
()
{
getApp
().
globalData
.
isInit
=
true
getApp
().
globalData
.
isInit
=
true
const
info
=
uni
.
getSystemInfoSync
()
const
info
=
uni
.
getSystemInfoSync
()
console
.
log
(
"系统"
,
info
);
if
(
info
.
platform
==
'windows'
)
{
if
(
info
.
platform
==
'windows'
)
{
this
.
statusBarHeight
=
info
.
safeArea
.
top
this
.
statusBarHeight
=
info
.
safeArea
.
top
}
else
{
}
else
{
...
@@ -183,6 +182,19 @@
...
@@ -183,6 +182,19 @@
this
.
getRecentlyApp
()
this
.
getRecentlyApp
()
}
}
})
})
uni
.
$on
(
"refreshOrg"
,
res
=>
{
//组织切换了
this
.
project_id
=
uni
.
getStorageSync
(
"project_id"
)
if
(
!
this
.
project_id
)
{
this
.
getCompanyBanners
()
this
.
getCompanyNews
()
}
else
{
this
.
getNews
()
this
.
getBanners
()
}
})
},
onUnload
()
{
uni
.
$off
(
"refreshOrg"
)
},
},
methods
:
{
methods
:
{
toJoinOrg
()
{
toJoinOrg
()
{
...
@@ -242,7 +254,6 @@
...
@@ -242,7 +254,6 @@
}
}
}).
then
(
res
=>
{
}).
then
(
res
=>
{
let
result
=
res
.
data
let
result
=
res
.
data
console
.
log
(
"项目列表:"
,
result
);
if
(
result
.
code
===
0
)
{
if
(
result
.
code
===
0
)
{
if
(
result
.
data
.
list
.
length
>
0
)
{
if
(
result
.
data
.
list
.
length
>
0
)
{
this
.
project
=
result
.
data
.
list
[
0
]
this
.
project
=
result
.
data
.
list
[
0
]
...
@@ -328,8 +339,14 @@
...
@@ -328,8 +339,14 @@
if
(
this
.
role
==
'VISITOR'
||
this
.
banners
.
length
==
0
)
{
if
(
this
.
role
==
'VISITOR'
||
this
.
banners
.
length
==
0
)
{
return
return
}
}
this
.
project_id
=
uni
.
getStorageSync
(
"project_id"
)
var
isComp
=
0
if
(
!
this
.
project_id
)
{
//企业级
isComp
=
1
}
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
`/pages/index/siteNewList/siteNewList?clientId=1&projectId=`
+
this
.
project_id
url
:
`/pages/index/siteNewList/siteNewList?clientId=1&projectId=`
+
this
.
project_id
+
"&isComp="
+
isComp
})
})
},
},
toLinkOther
()
{
toLinkOther
()
{
...
@@ -446,7 +463,7 @@
...
@@ -446,7 +463,7 @@
})
})
},
},
getCompanyNews
()
{
getCompanyNews
()
{
Api
.
getNews
({
Api
.
get
Company
News
({
data
:
{
data
:
{
pageNum
:
1
,
pageNum
:
1
,
pageSize
:
10
,
pageSize
:
10
,
...
@@ -464,7 +481,7 @@
...
@@ -464,7 +481,7 @@
})
})
},
},
getCompanyBanners
()
{
getCompanyBanners
()
{
Api
.
getNews
({
Api
.
get
Company
News
({
data
:
{
data
:
{
pageNum
:
1
,
pageNum
:
1
,
pageSize
:
5
,
pageSize
:
5
,
...
@@ -531,8 +548,15 @@
...
@@ -531,8 +548,15 @@
})
})
},
},
toLinkNew
()
{
toLinkNew
()
{
this
.
project_id
=
uni
.
getStorageSync
(
"project_id"
)
var
isComp
=
0
console
.
log
(
"项目Id"
,
this
.
project_id
);
if
(
!
this
.
project_id
)
{
//企业级
isComp
=
1
}
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
`/pages/index/siteNewList/siteNewList?clientId=2&projectId=`
+
this
.
project_id
url
:
`/pages/index/siteNewList/siteNewList?clientId=2&projectId=`
+
this
.
project_id
+
"&isComp="
+
isComp
})
})
},
},
getMyScore
()
{
getMyScore
()
{
...
@@ -624,13 +648,10 @@
...
@@ -624,13 +648,10 @@
var
app
=
this
.
menus
.
find
(
item
=>
item
.
object_no
==
'gdydt'
)
var
app
=
this
.
menus
.
find
(
item
=>
item
.
object_no
==
'gdydt'
)
if
(
app
)
{
if
(
app
)
{
var
mainAuthMenus
=
app
.
children_list
var
mainAuthMenus
=
app
.
children_list
// console.log("mainAuthMenus", mainAuthMenus);
if
(
mainAuthMenus
&&
mainAuthMenus
.
length
>
0
)
{
if
(
mainAuthMenus
&&
mainAuthMenus
.
length
>
0
)
{
var
mineMenus
=
mainAuthMenus
.
find
(
item
=>
item
.
object_no
==
'ydtsy'
)
var
mineMenus
=
mainAuthMenus
.
find
(
item
=>
item
.
object_no
==
'ydtsy'
)
// console.log("mineMenus", mineMenus);
if
(
mineMenus
)
{
if
(
mineMenus
)
{
var
childMenus
=
mineMenus
.
children_list
var
childMenus
=
mineMenus
.
children_list
console
.
log
(
"childMenus"
,
childMenus
);
if
(
childMenus
&&
childMenus
.
length
>
0
)
{
if
(
childMenus
&&
childMenus
.
length
>
0
)
{
var
child
=
childMenus
.
find
(
item
=>
item
.
object_no
==
obj
)
var
child
=
childMenus
.
find
(
item
=>
item
.
object_no
==
obj
)
if
(
child
)
{
if
(
child
)
{
...
@@ -664,12 +685,14 @@
...
@@ -664,12 +685,14 @@
this
.
getDeptProject
()
this
.
getDeptProject
()
}
else
{
}
else
{
uni
.
setStorageSync
(
"org_name"
,
currentJob
.
org_name
)
uni
.
setStorageSync
(
"org_name"
,
currentJob
.
org_name
)
uni
.
setStorageSync
(
"project_id"
,
""
)
this
.
initData
()
this
.
initData
()
}
}
}
else
{
}
else
{
uni
.
setStorageSync
(
"org_no"
,
""
)
uni
.
setStorageSync
(
"org_no"
,
""
)
uni
.
setStorageSync
(
"org_id"
,
""
)
uni
.
setStorageSync
(
"org_id"
,
""
)
uni
.
setStorageSync
(
"org_name"
,
""
)
uni
.
setStorageSync
(
"org_name"
,
""
)
uni
.
setStorageSync
(
"project_id"
,
""
)
this
.
initData
()
this
.
initData
()
}
}
getApp
().
globalData
.
isInit
=
false
getApp
().
globalData
.
isInit
=
false
...
...
pages/index/newDetail/newDetail.vue
View file @
11a58797
...
@@ -44,12 +44,14 @@
...
@@ -44,12 +44,14 @@
},
},
id
:
""
,
id
:
""
,
text
:
""
,
text
:
""
,
clientId
:
""
clientId
:
""
,
isComp
:
0
}
}
},
},
onLoad
(
options
)
{
onLoad
(
options
)
{
this
.
id
=
options
.
id
this
.
id
=
options
.
id
this
.
clientId
=
options
.
clientId
this
.
clientId
=
options
.
clientId
this
.
isComp
=
options
.
isComp
this
.
getNewDetail
()
this
.
getNewDetail
()
},
},
methods
:
{
methods
:
{
...
@@ -64,7 +66,7 @@
...
@@ -64,7 +66,7 @@
toLinkDetail
(
item
)
{
toLinkDetail
(
item
)
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
"/pages/index/newDetail/newDetail?id="
+
item
.
articleLibraryId
+
"&clientId="
+
this
url
:
"/pages/index/newDetail/newDetail?id="
+
item
.
articleLibraryId
+
"&clientId="
+
this
.
clientId
.
clientId
+
"&isComp="
+
this
.
isComp
})
})
},
},
onEditorReady
(
content
)
{
onEditorReady
(
content
)
{
...
@@ -95,12 +97,20 @@
...
@@ -95,12 +97,20 @@
return
text
return
text
},
},
getNewDetail
()
{
getNewDetail
()
{
Api
.
getNewDetail
({
var
data
=
{
data
:
{
articleLibraryId
:
this
.
id
,
articleLibraryId
:
this
.
id
,
projectId
:
uni
.
getStorageSync
(
"project_id"
)
||
""
,
projectId
:
uni
.
getStorageSync
(
"project_id"
)
||
""
,
clientId
:
this
.
clientId
clientId
:
this
.
clientId
}
}
if
(
this
.
isComp
==
1
)
{
data
=
{
articleLibraryId
:
this
.
id
,
orgId
:
uni
.
getStorageSync
(
"org_id"
)
||
""
,
clientId
:
this
.
clientId
}
}
Api
.
getNewDetail
({
data
:
data
}).
then
((
result
)
=>
{
}).
then
((
result
)
=>
{
if
(
result
.
code
==
0
)
{
if
(
result
.
code
==
0
)
{
this
.
list
=
[]
this
.
list
=
[]
...
...
pages/index/siteNewList/siteNewList.vue
View file @
11a58797
...
@@ -33,12 +33,15 @@
...
@@ -33,12 +33,15 @@
clientId
:
2
,
clientId
:
2
,
key
:
""
,
key
:
""
,
projectId
:
""
,
projectId
:
""
,
title
:
"工地头条"
title
:
"工地头条"
,
isComp
:
0
}
}
},
},
onLoad
(
option
)
{
onLoad
(
option
)
{
this
.
clientId
=
option
.
clientId
this
.
clientId
=
option
.
clientId
this
.
projectId
=
option
.
projectId
this
.
projectId
=
option
.
projectId
this
.
isComp
=
option
.
isComp
console
.
log
(
"是否企业级"
,
this
.
isComp
);
this
.
getNews
()
this
.
getNews
()
if
(
this
.
clientId
==
1
)
{
if
(
this
.
clientId
==
1
)
{
this
.
title
=
"新闻公告"
this
.
title
=
"新闻公告"
...
@@ -84,7 +87,7 @@
...
@@ -84,7 +87,7 @@
toLinkDetail
(
item
)
{
toLinkDetail
(
item
)
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
"/pages/index/newDetail/newDetail?id="
+
item
.
articleLibraryId
+
"&clientId="
+
this
url
:
"/pages/index/newDetail/newDetail?id="
+
item
.
articleLibraryId
+
"&clientId="
+
this
.
clientId
.
clientId
+
"&isComp="
+
this
.
isComp
})
})
},
},
search
(
e
)
{
search
(
e
)
{
...
@@ -93,6 +96,33 @@
...
@@ -93,6 +96,33 @@
this
.
getNews
()
this
.
getNews
()
},
},
getNews
()
{
getNews
()
{
if
(
this
.
isComp
==
1
)
{
Api
.
getCompanyNews
({
data
:
{
pageNum
:
this
.
page
,
pageSize
:
this
.
pageSize
,
clientId
:
this
.
clientId
,
title
:
this
.
key
,
orgId
:
uni
.
getStorageSync
(
"org_id"
)
}
}).
then
((
result
)
=>
{
uni
.
stopPullDownRefresh
()
if
(
result
.
code
==
0
)
{
let
list
=
result
.
data
.
list
if
(
list
.
length
==
this
.
pageSize
)
{
this
.
isHasMore
=
true
}
else
{
this
.
isHasMore
=
false
}
if
(
this
.
page
==
1
)
{
this
.
list
=
[]
}
this
.
list
=
this
.
list
.
concat
(
list
)
}
else
{
this
.
$toast
.
showToast
(
result
.
msg
)
}
})
}
else
{
Api
.
getNews
({
Api
.
getNews
({
data
:
{
data
:
{
pageNum
:
this
.
page
,
pageNum
:
this
.
page
,
...
@@ -121,6 +151,7 @@
...
@@ -121,6 +151,7 @@
}
}
}
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
...
...
Write
Preview
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
Please
register
or
sign in
to comment