Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
I
inspection-pad-web
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
专网
inspection-pad-web
Commits
023ee1b6
提交
023ee1b6
authored
4月 09, 2025
作者:
JaxBBLL
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: init 2
上级
7409b5f4
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
223 行增加
和
214 行删除
+223
-214
App.vue
App.vue
+2
-2
home.vue
pages/home/home.vue
+0
-14
login.vue
pages/login/login.vue
+221
-198
没有找到文件。
App.vue
浏览文件 @
023ee1b6
...
@@ -21,7 +21,7 @@ export default {
...
@@ -21,7 +21,7 @@ export default {
plus
.
screen
.
lockOrientation
(
"landscape-primary"
);
//锁定横屏
plus
.
screen
.
lockOrientation
(
"landscape-primary"
);
//锁定横屏
// #endif
// #endif
//
this.init();
this
.
init
();
// #ifdef APP-PLUS
// #ifdef APP-PLUS
plus
.
android
.
requestPermissions
(
plus
.
android
.
requestPermissions
(
...
@@ -61,7 +61,7 @@ export default {
...
@@ -61,7 +61,7 @@ export default {
if
(
now_user
.
user
)
{
if
(
now_user
.
user
)
{
this
.
$store
.
commit
(
"SET_USER"
,
now_user
);
this
.
$store
.
commit
(
"SET_USER"
,
now_user
);
}
}
this
.
init
();
//
this.init();
},
},
onLoad
:
function
(
query
)
{
onLoad
:
function
(
query
)
{
console
.
log
(
"即将开始初始化app"
);
console
.
log
(
"即将开始初始化app"
);
...
...
pages/home/home.vue
浏览文件 @
023ee1b6
<
template
>
<
template
>
<!-- 首页 -->
<!-- 首页 -->
<view
class=
"container"
>
<view
class=
"container"
>
<view
class=
"flex"
>
<navigator
url=
"/pages/inspectionContent/inspectionContentList?uid=23"
hover-class=
"navigator-hover"
>
<button
type=
"default"
class=
"uni-btn"
>
23
</button>
</navigator>
<navigator
url=
"/pages/inspectionContent/inspectionContentList?uid=16"
hover-class=
"navigator-hover"
>
<button
type=
"default"
class=
"uni-btn"
>
16
</button>
</navigator>
</view>
<!-- 第一个模块 -->
<!-- 第一个模块 -->
<view
class=
"header"
>
<view
class=
"header"
>
<view
class=
"title"
>
杭州内网监管在线-运维在线
</view>
<view
class=
"title"
>
杭州内网监管在线-运维在线
</view>
...
...
pages/login/login.vue
浏览文件 @
023ee1b6
<
template
>
<
template
>
<!-- 登录页 -->
<!-- 登录页 -->
<view
class=
"content"
>
<view
class=
"content"
>
<view
class=
"login_wrap"
>
<view
class=
"login_wrap"
>
<view
class=
"top-module"
>
<view
class=
"top-module"
>
<image
src=
"@/static/logo.png"
mode=
"aspectFit"
alt=
""
/>
<image
src=
"@/static/logo.png"
mode=
"aspectFit"
alt=
""
/>
<view
class=
"title"
>
杭州内网监管在线-运维在线
</view>
<view
class=
"title"
>
杭州内网监管在线-运维在线
</view>
</view>
</view>
<view
class=
"form_wrap"
>
<view
class=
"form_wrap"
>
<view
class=
"input_wrap"
>
<view
class=
"input_wrap"
>
<uni-easyinput
class=
"log-input"
clearSize=
"0"
v-model=
"person.account"
prefixIcon=
"person"
<uni-easyinput
placeholder=
"用户名"
></uni-easyinput>
class=
"log-input"
<uni-easyinput
v-if=
"passwordVisible"
class=
"log-input"
prefixIcon=
"locked"
clearSize=
"0"
clearSize=
"0"
v-model=
"person.pwd"
@
iconClick=
"togglePasswordVisible"
:placeholder=
"passwordPlaceholder"
v-model=
"person.account"
:passwordIcon=
"false"
:type=
"passwordVisible ? 'text' : 'password'"
></uni-easyinput>
prefixIcon=
"person"
<uni-easyinput
v-else
class=
"log-input"
prefixIcon=
"locked-filled"
clearSize=
"0"
v-model=
"person.pd"
placeholder=
"用户名"
@
iconClick=
"togglePasswordVisible"
:placeholder=
"passwordPlaceholder"
:passwordIcon=
"false"
></uni-easyinput>
:type=
"passwordVisible ? 'text' : 'password'"
></uni-easyinput>
<uni-easyinput
</view>
v-if=
"passwordVisible"
<view
class=
"login_btn"
@
click=
"login"
>
class=
"log-input"
<view
class=
"login_btn_text"
>
登录
</view>
prefixIcon=
"locked"
</view>
clearSize=
"0"
</view>
v-model=
"person.pwd"
</view>
@
iconClick=
"togglePasswordVisible"
</view>
:placeholder=
"passwordPlaceholder"
:passwordIcon=
"false"
:type=
"passwordVisible ? 'text' : 'password'"
></uni-easyinput>
<uni-easyinput
v-else
class=
"log-input"
prefixIcon=
"locked-filled"
clearSize=
"0"
v-model=
"person.pd"
@
iconClick=
"togglePasswordVisible"
:placeholder=
"passwordPlaceholder"
:passwordIcon=
"false"
:type=
"passwordVisible ? 'text' : 'password'"
></uni-easyinput>
</view>
<view
class=
"login_btn"
@
click=
"login"
>
<view
class=
"login_btn_text"
>
登录
</view>
</view>
</view>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
import
userApi
from
"@/api/user.js"
import
userApi
from
"@/api/user.js"
;
import
SqlliteDbUtil
from
'@/utils/sqllitedb'
import
SqlliteDbUtil
from
"@/utils/sqllitedb"
;
import
table
from
'@/api/sqllite/table.js'
import
table
from
"@/api/sqllite/table.js"
;
import
{
import
{
getUserList
}
from
"@/utils/systemCofig"
;
getUserList
,
import
{
}
from
"@/utils/systemCofig"
;
LOG_TYPE_ENUM
,
import
{
getLogContent
,
LOG_TYPE_ENUM
,
addLog
,
getLogContent
,
readLogData
,
addLog
,
}
from
"@/utils/IoReadingAndWriting.js"
;
readLogData
,
export
default
{
}
from
"@/utils/IoReadingAndWriting.js"
;
components
:
{},
export
default
{
data
()
{
components
:
{},
return
{
data
()
{
person
:
{
return
{
account
:
"姜安平"
,
// 超管账号
person
:
{
pwd
:
"Jap@123"
,
account
:
"姜安平"
,
// 超管账号
},
pwd
:
"Jap@123"
,
backButtonPress
:
0
,
},
personList
:
[],
backButtonPress
:
0
,
passwordVisible
:
false
,
// 是否显示密码
personList
:
[],
db
:
null
,
passwordVisible
:
false
,
// 是否显示密码
};
db
:
null
,
},
};
computed
:
{
},
// 动态密码输入框 placeholder
computed
:
{
passwordPlaceholder
()
{
// 动态密码输入框 placeholder
return
this
.
passwordVisible
?
"密码"
:
"********"
;
passwordPlaceholder
()
{
},
return
this
.
passwordVisible
?
"密码"
:
"********"
;
},
},
},
created
()
{},
onShow
()
{},
created
()
{},
async
mounted
()
{},
onShow
()
{},
// 定义返回退出
async
mounted
()
{
onBackPress
(
options
)
{
this
.
backButtonPress
++
;
},
if
(
this
.
backButtonPress
>
1
)
{
// 定义返回退出
uni
.
setStorageSync
(
"oper_record"
,
this
.
$store
.
state
.
oper_record
);
onBackPress
(
options
)
{
uni
.
setStorageSync
(
"all_data"
,
this
.
$store
.
state
.
all_data
);
this
.
backButtonPress
++
;
uni
.
setStorageSync
(
"now_user"
,
this
.
$store
.
state
.
now_user
);
if
(
this
.
backButtonPress
>
1
)
{
uni
.
setStorageSync
(
uni
.
setStorageSync
(
"oper_record"
,
this
.
$store
.
state
.
oper_record
);
"last_time"
,
uni
.
setStorageSync
(
"all_data"
,
this
.
$store
.
state
.
all_data
);
this
.
$store
.
state
.
now_user
.
LastSynchronizationTime
uni
.
setStorageSync
(
"now_user"
,
this
.
$store
.
state
.
now_user
);
);
uni
.
setStorageSync
(
plus
.
runtime
.
quit
();
"last_time"
,
}
else
{
this
.
$store
.
state
.
now_user
.
LastSynchronizationTime
plus
.
nativeUI
.
toast
(
"再划一次退出应用"
);
);
}
plus
.
runtime
.
quit
();
setTimeout
(
function
()
{
}
else
{
this
.
backButtonPress
=
0
;
plus
.
nativeUI
.
toast
(
"再划一次退出应用"
);
},
1000
);
}
return
true
;
setTimeout
(
function
()
{
},
this
.
backButtonPress
=
0
;
methods
:
{
},
1000
);
// 切换密码显示/隐藏
return
true
;
togglePasswordVisible
()
{
},
this
.
passwordVisible
=
!
this
.
passwordVisible
;
methods
:
{
},
// 切换密码显示/隐藏
// 点击登录
togglePasswordVisible
()
{
async
login
()
{
this
.
passwordVisible
=
!
this
.
passwordVisible
;
userApi
.
login
(
this
.
person
).
then
((
res
)
=>
{
},
if
(
res
.
data
)
{
// 点击登录
this
.
personList
=
res
.
data
;
async
login
()
{
this
.
$store
.
commit
(
"SET_USER"
,
this
.
personList
);
userApi
.
login
(
this
.
person
).
then
((
res
)
=>
{
uni
.
setStorageSync
(
"now_user"
,
this
.
personList
);
if
(
res
.
data
)
{
uni
.
setStorageSync
(
this
.
personList
=
res
.
data
;
"last_time"
,
this
.
$store
.
commit
(
"SET_USER"
,
this
.
personList
);
this
.
personList
.
LastSynchronizationTime
||
""
uni
.
navigateTo
({
);
url
:
"/pages/home/home"
,
});
uni
.
navigateTo
({
}
else
{
url
:
"/pages/home/home"
,
uni
.
showToast
({
});
title
:
'账号密码错误,请重新输入'
,
}
else
{
icon
:
"none"
,
uni
.
showToast
({
duration
:
2000
,
title
:
"账号密码错误,请重新输入"
,
});
icon
:
"none"
,
}
duration
:
2000
,
});
});
},
}
},
});
};
},
},
};
</
script
>
</
script
>
<
style
scoped
lang=
"less"
>
<
style
scoped
lang=
"less"
>
.content {
.content {
width: 100vw;
width: 100vw;
height: 100vh;
height: 100vh;
// background-color: red;
// background-color: red;
background-image: url("../../static/img/logbg.png");
background-image: url("../../static/img/logbg.png");
background-size: 100% 100%;
background-size: 100% 100%;
background-repeat: no-repeat;
background-repeat: no-repeat;
display: flex;
display: flex;
justify-content: center;
justify-content: center;
align-items: center;
align-items: center;
.top-module {
.top-module {
width: 350px;
width: 350px;
margin-bottom: 48px;
margin-bottom: 48px;
text-align: center;
text-align: center;
image {
image {
width: 88px;
width: 88px;
height: 88px;
height: 88px;
}
}
.title {
.title {
font-size: 26px;
font-size: 26px;
color: #000000;
color: #000000;
line-height: 34px;
line-height: 34px;
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.16);
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.16);
}
}
}
}
.login_wrap {}
.login_wrap {
}
.log-input {
width: 350px;
.log-input {
margin-bottom: 24px;
width: 350px;
background: #fff;
margin-bottom: 24px;
color: #4a4a4a;
background: #fff;
}
color: #4a4a4a;
}
/deep/.is-input-border {
border-radius: 2px !important;
/deep/.is-input-border {
height: 40px !important;
border-radius: 2px !important;
}
height: 40px !important;
}
/deep/.uni-easyinput__content {
background-color: rgba(0, 0, 0, 0) !important;
/deep/.uni-easyinput__content {
}
background-color: rgba(0, 0, 0, 0) !important;
}
/deep/.uni-easyinput__placeholder-class {
color: #4a4a4a;
/deep/.uni-easyinput__placeholder-class {
}
color: #4a4a4a;
}
/deep/.is-focused {
border: 1px solid #4a4a4a !important;
/deep/.is-focused {
border: 1px solid #4a4a4a !important;
.uniui-eye-filled {
color: #4a4a4a !important;
.uniui-eye-filled {
}
color: #4a4a4a !important;
}
.uniui-eye-slash-filled {
color: #4a4a4a !important;
.uniui-eye-slash-filled {
}
color: #4a4a4a !important;
}
}
}
/deep/.uni-input-input {
color: #4a4a4a !important;
/deep/.uni-input-input {
}
color: #4a4a4a !important;
}
/deep/.uniui-clear {
color: #4a4a4a !important;
/deep/.uniui-clear {
}
color: #4a4a4a !important;
}
.login_btn {
background: #3774f6;
.login_btn {
box-shadow: 0px 2px 14px 0px rgba(51, 104, 246, 0.24);
background: #3774f6;
border-radius: 3px;
box-shadow: 0px 2px 14px 0px rgba(51, 104, 246, 0.24);
border-radius: 3px;
.login_btn_text {
width: 350px;
.login_btn_text {
height: 40px;
width: 350px;
background-color: #3774f6;
height: 40px;
box-shadow: 0px 1px 4px 0px rgba(84, 116, 232, 0.16);
background-color: #3774f6;
border-radius: 2px;
box-shadow: 0px 1px 4px 0px rgba(84, 116, 232, 0.16);
display: flex;
border-radius: 2px;
align-items: center;
display: flex;
justify-content: center;
align-items: center;
color: #fff;
justify-content: center;
}
color: #fff;
}
}
}
}
</
style
>
}
\ No newline at end of file
</
style
>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论