Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
I
inspection-pad-web
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
专网
inspection-pad-web
Commits
66c704c2
提交
66c704c2
authored
4月 07, 2025
作者:
JaxBBLL
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix
上级
1b17254f
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
66 行增加
和
80 行删除
+66
-80
App.vue
App.vue
+66
-71
pages.json
pages.json
+0
-9
没有找到文件。
App.vue
浏览文件 @
66c704c2
<
script
>
import
{
import
{
BASE_PATH
,
SYNCHRONIZE_DATA_PATH
,
SYNCHRONIZE_DATA_PAD
,
...
...
@@ -9,20 +9,14 @@
readFileContent
,
USER_LiST
,
USER_FILE_NAME
,
}
from
"./utils/systemCofig"
;
import
{
Base64
}
from
"js-base64"
;
import
{
differenceBy
}
from
"lodash"
;
import
{
readDirectoryData
}
from
"@/utils/IoReadingAndWriting.js"
;
import
initService
from
'@/api/sqllite/init.js'
export
default
{
onLaunch
:
function
()
{
}
from
"./utils/systemCofig"
;
import
{
Base64
}
from
"js-base64"
;
import
{
differenceBy
}
from
"lodash"
;
import
{
readDirectoryData
}
from
"@/utils/IoReadingAndWriting.js"
;
import
initService
from
"@/api/sqllite/init.js"
;
export
default
{
onLaunch
:
function
()
{
// #ifdef APP-PLUS
plus
.
screen
.
lockOrientation
(
"landscape-primary"
);
//锁定横屏
// #endif
...
...
@@ -32,15 +26,17 @@
// #ifdef APP-PLUS
plus
.
android
.
requestPermissions
(
[
"android.permission.WRITE_EXTERNAL_STORAGE"
],
function
(
e
)
{
function
(
e
)
{
if
(
e
.
deniedAlways
.
length
>
0
)
{
//权限被永久拒绝
// 弹出提示框解释为何需要读写手机储存权限,引导用户打开设置页面开启
uni
.
showModal
({
title
:
"存储权限"
,
content
:
"您拒绝了存储权限,请去设置-应用开启存储权限。"
,
success
:
function
(
res
)
{
if
(
res
.
confirm
)
{}
else
if
(
res
.
cancel
)
{}
success
:
function
(
res
)
{
if
(
res
.
confirm
)
{
}
else
if
(
res
.
cancel
)
{
}
},
});
}
...
...
@@ -56,24 +52,27 @@
init
();
}
},
function
(
e
)
{}
function
(
e
)
{}
);
// #endif
},
onShow
:
function
()
{
onShow
:
function
()
{
const
now_user
=
uni
.
getStorageSync
(
"now_user"
)
||
{};
if
(
now_user
.
user
)
{
this
.
$store
.
commit
(
"SET_USER"
,
now_user
);
}
this
.
init
();
},
onLoad
:
function
(
query
)
{
console
.
log
(
'即将开始初始化app'
)
onLoad
:
function
(
query
)
{
console
.
log
(
"即将开始初始化app"
);
},
onHide
:
function
()
{
onHide
:
function
()
{
// app关闭时将数据存储到本地缓存
uni
.
setStorageSync
(
"now_user"
,
this
.
$store
.
state
.
now_user
);
uni
.
setStorageSync
(
"last_time"
,
this
.
$store
.
state
.
now_user
.
LastSynchronizationTime
);
uni
.
setStorageSync
(
"last_time"
,
this
.
$store
.
state
.
now_user
.
LastSynchronizationTime
);
// 清除store 数据
this
.
$store
.
commit
(
"SET_DARF_DATA"
,
{});
...
...
@@ -88,8 +87,8 @@
* 第三步:存储读取到的数据
*/
async
init
()
{
initService
.
init
()
return
initService
.
init
();
return
;
checkAndCreateDirectory
(
SYNCHRONIZE_DATA_PAD
)
.
then
(()
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
...
...
@@ -124,15 +123,14 @@
});
})
.
then
(
async
(
res
)
=>
{
// 获取文件数据
let
userData
=
Base64
.
decode
(
res
);
const
diffUserList
=
await
this
.
diffUserList
(
userData
)
const
diffUserList
=
await
this
.
diffUserList
(
userData
);
if
(
diffUserList
.
length
)
{
this
.
updateIpadUsetList
([...
USER_LiST
,
...
diffUserList
])
this
.
updateIpadUsetList
([...
USER_LiST
,
...
diffUserList
]);
userData
=
JSON
.
stringify
([...
USER_LiST
,
...
diffUserList
])
userData
=
JSON
.
stringify
([...
USER_LiST
,
...
diffUserList
]);
}
uni
.
setStorage
({
...
...
@@ -154,77 +152,74 @@
// 比较代码中的用户列表 和 ipad中存储用户的 差异
async
diffUserList
(
ipadUserList
=
[])
{
const
temp
=
eval
(
ipadUserList
)
const
diffResult
=
differenceBy
(
USER_LiST
,
temp
,
"userId"
)
const
temp
=
eval
(
ipadUserList
);
const
diffResult
=
differenceBy
(
USER_LiST
,
temp
,
"userId"
);
return
diffResult
return
diffResult
;
},
// 更新 ipad 用户信息
updateIpadUsetList
(
tempPersonList
)
{
const
temp
=
JSON
.
stringify
(
tempPersonList
);
const
fileContent
=
JSON
.
stringify
(
Base64
.
encode
(
temp
));
createFileWithPlusIO
(
SYNCHRONIZE_DATA_PAD
,
USER_FILE_NAME
,
fileContent
)
}
createFileWithPlusIO
(
SYNCHRONIZE_DATA_PAD
,
USER_FILE_NAME
,
fileContent
);
},
},
};
};
</
script
>
<
style
lang=
"less"
>
@import "./common/global.css";
@import "~@/static/iconFont/iconfont.css";
@import "./common/atom.less";
@import "./common/base.less";
@import "./common/global.css";
@import "~@/static/iconFont/iconfont.css";
@font-face {
@font-face {
font-family: AlibabaPuHuiTi-Medium;
src: url("~@/static/font/Alibaba-PuHuiTi-Medium.ttf");
}
}
@font-face {
@font-face {
font-family: "iconfont";
/* Project id 4374193 */
src: url("~@/static/iconFont/iconfont.woff2?t=1725876968366") format("woff2"),
url("~@/static/iconFont/iconfont.woff?t=1725876968366") format("woff"),
url("~@/static/iconFont/iconfont.ttf?t=1725876968366") format("truetype");
}
// @font-face {
// font-family: "iconfont"; /* Project id 4374193 */
// src: url('iconfont.woff2?t=1725876968365') format('woff2'),
// url('iconfont.woff?t=1725876968365') format('woff'),
// url('iconfont.ttf?t=1725876968365') format('truetype');
// }
@font-face {
}
// @font-face {
// font-family: "iconfont"; /* Project id 4374193 */
// src: url('iconfont.woff2?t=1725876968365') format('woff2'),
// url('iconfont.woff?t=1725876968365') format('woff'),
// url('iconfont.ttf?t=1725876968365') format('truetype');
// }
@font-face {
font-family: AlibabaPuHuiTi;
src: url("~@/static/font/Alibaba-PuHuiTi-Regular.ttf");
}
}
@font-face {
@font-face {
font-family: YouSheBiaoTiHei;
src: url("~@/static/font/YouSheBiaoTiHei.ttf");
}
}
body {
body {
width: 100vw;
// height: calc(100vh - 44px);
height: 100vh;
background-color: #f3f6fa;
/* background-color: red; */
}
}
* {
* {
box-sizing: border-box;
font-family: AlibabaPuHuiTi;
/* font-size: 9.41rpx; */
}
}
image {
image {
will-change: transform;
/* 解决加载时瞬间拉伸问题 */
width: auto;
...
...
@@ -236,21 +231,21 @@
image-rendering: -webkit-optimize-contrast;
image-rendering: crisp-edges;
-ms-interpolation-mode: nearest-neighbor;
}
}
.uni-nav-bar-text {
.uni-nav-bar-text {
/* 导航栏文字大小 */
font-size: 24px !important;
letter-spacing: 1px;
}
}
.uni-navbar--shadow {
.uni-navbar--shadow {
box-shadow: none !important;
}
}
.uni-data-checklist .checklist-group {
.uni-data-checklist .checklist-group {
flex-wrap: nowrap !important;
}
}
/*每个页面公共css */
/*每个页面公共css */
</
style
>
pages.json
浏览文件 @
66c704c2
...
...
@@ -87,21 +87,12 @@
"style"
:
{
"navigationBarTitleText"
:
""
}
<<<<<<<
HEAD
=======
},
{
"path"
:
"api/api"
,
"style"
:
{
"navigationBarTitleText"
:
""
}
},
{
"path"
:
"pages/test/index"
,
"style"
:
{
"navigationBarTitleText"
:
""
}
>>>>>>>
master
}
//
{
//
"path"
:
"api/api"
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论