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
ecfce872
提交
ecfce872
authored
1月 10, 2023
作者:
wk
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
微信手机号获取登录 阻止切换
父级
7f64283f
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
36 行增加
和
27 行删除
+36
-27
pages/gallery/app/checkObjList/checkObjList.vue
+1
-1
pages/gallery/app/originalIndex/originalIndex.vue
+30
-21
pages/index/index.vue
+2
-0
pages/login/login/login.vue
+0
-4
pages/login/wxLogin/wxLogin.vue
+0
-1
pages/mine/changeOrg/changeOrg.vue
+3
-0
没有找到文件。
pages/gallery/app/checkObjList/checkObjList.vue
View file @
ecfce872
...
...
@@ -50,7 +50,7 @@
})
this
.
check_tpl_id
=
option
.
check_tpl_id
this
.
checkItemId
=
option
.
check_item_id
this
.
projectId
=
uni
.
getStorageSync
(
"project_id"
)
this
.
projectId
=
option
.
project_id
},
onPullDownRefresh
()
{
...
...
pages/gallery/app/originalIndex/originalIndex.vue
View file @
ecfce872
<
template
>
<view
class=
"index-content"
>
<!--
<navbar
:showBack=
"false"
:title=
"title"
></navbar>
-->
<picker
@
change=
"itemSelect"
:range=
"project
Names
"
>
<picker
@
change=
"itemSelect"
:range=
"project
List"
range-key=
"project_name
"
>
<label>
<view
class=
"index-uni-project"
>
<text>
{{
projectSelect
}}
</text>
<text>
{{
projectSelect
.
project_name
||
projectName
}}
</text>
<image
src=
"../../../../static/icon_down_select.png"
></image>
</view>
</label>
...
...
@@ -33,12 +33,10 @@
title
:
''
,
column
:
3
,
projectList
:
[],
projectNames
:
[],
banners
:
[],
tplConfig
:
[],
list
:
[],
projectSelect
:
"示例项目"
,
projectId
:
""
,
projectSelect
:
{},
pattern
:
{
color
:
'#7A7E83'
,
backgroundColor
:
'#fff'
,
...
...
@@ -46,7 +44,8 @@
buttonColor
:
'#007AFF'
},
menu
:
[],
appId
:
""
appId
:
""
,
projectName
:
""
}
},
onLoad
(
option
)
{
...
...
@@ -69,20 +68,32 @@
console
.
log
(
"项目列表:"
,
result
);
if
(
result
.
code
===
0
)
{
this
.
projectList
=
result
.
data
.
list
for
(
var
i
=
0
;
i
<
this
.
projectList
.
length
;
i
++
)
{
this
.
projectNames
[
i
]
=
this
.
projectList
[
i
].
project_name
}
if
(
this
.
projectList
.
length
>
0
)
{
console
.
log
(
"项目ID:"
,
);
let
curId
=
uni
.
getStorageSync
(
"project_id"
)
if
(
curId
.
length
==
0
)
{
this
.
projectSelect
=
this
.
projectList
[
0
].
project_name
uni
.
setStorageSync
(
"project_id"
,
this
.
projectList
[
0
].
project_id
)
uni
.
setStorageSync
(
"project_name"
,
this
.
projectList
[
0
].
project_name
)
if
(
curId
)
{
this
.
projectName
=
uni
.
getStorageSync
(
"org_name"
)
}
else
{
this
.
projectSelect
=
uni
.
getStorageSync
(
"project_name"
)
}
this
.
projectSelect
=
this
.
projectList
[
0
]
}
// for (var i = 0; i
<
this
.
projectList
.
length
;
i
++
)
{
// this.projectNames[i] = this.projectList[i].project_name
// }
// if (this.projectList.length > 0) {
// console.log("项目ID:", );
// let curId = uni.getStorageSync("project_id")
// if (curId.length == 0) {
// this.projectSelect = this.projectList[0].project_name
// uni.setStorageSync("project_id", this.projectList[0].project_id)
// uni.setStorageSync("project_name", this.projectList[0].project_name)
// } else {
// let project = this.projectList.find(item => item.project_id == curId)
// if (project) {
// this.projectSelect = uni.getStorageSync("project_name")
// } else {
// this.projectSelect = this.projectList[0].project_name
// }
// }
// }
}
else
{
if
(
result
.
code
===
-
1
)
{
uni
.
showToast
({
...
...
@@ -140,15 +151,13 @@
}
=
e
.
detail
let
item
=
this
.
list
[
index
]
uni
.
navigateTo
({
url
:
`/pages/gallery/app/checkObjList/checkObjList?check_item_name=
${
item
.
check_item_name
}
&check_item_id=
${
item
.
check_item_id
}
&check_tpl_id=
${
this
.
appId
}
`
,
url
:
`/pages/gallery/app/checkObjList/checkObjList?check_item_name=
${
item
.
check_item_name
}
&check_item_id=
${
item
.
check_item_id
}
&check_tpl_id=
${
this
.
appId
}
&project_id=
${
this
.
projectSelect
.
project_id
}
`
,
})
},
itemSelect
(
e
)
{
console
.
log
(
e
);
let
index
=
parseInt
(
e
.
detail
.
value
)
this
.
projectSelect
=
this
.
projectList
[
index
].
project_name
uni
.
setStorageSync
(
"project_id"
,
this
.
projectList
[
index
].
project_id
)
uni
.
setStorageSync
(
"project_name"
,
this
.
projectList
[
index
].
project_name
)
this
.
projectSelect
=
this
.
projectList
[
index
]
},
}
}
...
...
pages/index/index.vue
View file @
ecfce872
...
...
@@ -420,7 +420,9 @@
this
.
userInfo
=
result
.
data
// this.title = "欢迎" + this.userInfo.user.user_name + "访问一点通"
this
.
role
=
this
.
userInfo
.
identity
.
code
if
(
!
uni
.
getStorageSync
(
"org_no"
))
{
this
.
loadProject
()
}
}
else
{
this
.
$toast
.
showToast
(
result
.
msg
)
}
...
...
pages/login/login/login.vue
View file @
ecfce872
...
...
@@ -283,7 +283,6 @@
uni
.
setStorageSync
(
"short_token"
,
result
.
data
.
short_token
)
uni
.
setStorageSync
(
"token"
,
result
.
data
.
access_token
)
uni
.
setStorageSync
(
"user_info"
,
result
.
data
)
uni
.
setStorageSync
(
"org_no"
,
result
.
data
.
org_no
)
uni
.
setStorageSync
(
"company_id"
,
result
.
data
.
comp_id
)
uni
.
showToast
({
title
:
"授权登录成功"
,
...
...
@@ -312,7 +311,6 @@
uni
.
setStorageSync
(
"token"
,
result
.
data
.
access_token
)
uni
.
setStorageSync
(
"user_info"
,
result
.
data
)
uni
.
setStorageSync
(
"company_id"
,
result
.
data
.
comp_id
)
uni
.
setStorageSync
(
"org_no"
,
result
.
data
.
org_no
)
uni
.
showToast
({
title
:
"授权登录成功"
,
icon
:
'none'
...
...
@@ -349,7 +347,6 @@
uni
.
setStorageSync
(
"short_token"
,
result
.
data
.
short_token
)
uni
.
setStorageSync
(
"user_info"
,
result
.
data
)
uni
.
setStorageSync
(
"company_id"
,
result
.
data
.
comp_id
)
uni
.
setStorageSync
(
"org_no"
,
result
.
data
.
org_no
)
uni
.
setStorageSync
(
"refresh_token"
,
result
.
data
.
refresh_token
)
uni
.
showToast
({
title
:
"登录成功"
,
...
...
@@ -385,7 +382,6 @@
uni
.
setStorageSync
(
"short_token"
,
result
.
data
.
short_token
)
uni
.
setStorageSync
(
"user_info"
,
result
.
data
)
uni
.
setStorageSync
(
"company_id"
,
result
.
data
.
comp_id
)
uni
.
setStorageSync
(
"org_no"
,
result
.
data
.
org_no
)
uni
.
setStorageSync
(
"refresh_token"
,
result
.
data
.
refresh_token
)
uni
.
showToast
({
title
:
"登录成功"
,
...
...
pages/login/wxLogin/wxLogin.vue
View file @
ecfce872
...
...
@@ -57,7 +57,6 @@
uni
.
setStorageSync
(
"short_token"
,
result
.
data
.
short_token
)
uni
.
setStorageSync
(
"user_info"
,
result
.
data
)
uni
.
setStorageSync
(
"company_id"
,
result
.
data
.
comp_id
)
uni
.
setStorageSync
(
"org_no"
,
result
.
data
.
org_no
)
uni
.
setStorageSync
(
"refresh_token"
,
result
.
data
.
refresh_token
)
uni
.
showToast
({
title
:
"登录成功"
,
...
...
pages/mine/changeOrg/changeOrg.vue
View file @
ecfce872
...
...
@@ -117,11 +117,14 @@
})
},
switchOrg
:
function
(
item
)
{
console
.
log
(
"切换组织"
,
item
);
uni
.
setStorageSync
(
"org_no"
,
item
.
org_no
)
uni
.
setStorageSync
(
"org_name"
,
item
.
name
)
uni
.
setStorageSync
(
"org_id"
,
item
.
id
)
if
(
item
.
project_id
)
{
uni
.
setStorageSync
(
"project_id"
,
item
.
project_id
)
}
else
{
uni
.
setStorageSync
(
"project_id"
,
""
)
}
uni
.
$emit
(
"refreshOrg"
)
uni
.
navigateBack
({
...
...
Write
Preview
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
Please
register
or
sign in
to comment