Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
gl_tape
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
3
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit affe98d9
authored
Aug 21, 2024
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
检查更新
1 parent
f767293e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
43 deletions
App.vue
components/HomeFrame/components/SettingBox.vue
App.vue
View file @
affe98d
...
@@ -7,55 +7,53 @@
...
@@ -7,55 +7,53 @@
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
-->
<
script
>
<
script
>
var
wv
;
var
wv
import
checkUpdate
from
"@/uni_modules/uni-upgrade-center-app/utils/check-update-nvue.js"
;
import
{
mapState
}
from
"vuex"
;
import
{
mapState
}
from
'vuex'
export
default
{
export
default
{
computed
:
{
computed
:
{
...
mapState
(
"audio"
,
[
"isEnd"
,
"isStart"
]),
...
mapState
(
'audio'
,
[
'isEnd'
,
'isStart'
])
},
onLoad
()
{
},
},
onLoad
()
{},
onLaunch
:
async
function
()
{
onLaunch
:
async
function
()
{
this
.
setAPPVersion
()
this
.
setAPPVersion
()
setTimeout
(()
=>
{
setTimeout
(()
=>
{
plus
.
screen
.
unlockOrientation
()
;
//解除锁定屏幕方向
plus
.
screen
.
unlockOrientation
()
//解除锁定屏幕方向
plus
.
screen
.
lockOrientation
(
"landscape-primary"
);
plus
.
screen
.
lockOrientation
(
'landscape-primary'
)
},
300
)
;
},
300
)
uni
.
setKeepScreenOn
({
uni
.
setKeepScreenOn
({
keepScreenOn
:
true
,
keepScreenOn
:
true
})
;
})
},
},
methods
:
{
methods
:
{
setAPPVersion
()
{
setAPPVersion
()
{
let
version
=
plus
.
runtime
.
version
;
let
version
=
plus
.
runtime
.
version
let
storageVersion
=
uni
.
$storage
.
get
(
"storageVersion"
)
let
storageVersion
=
uni
.
$storage
.
get
(
'storageVersion'
)
console
.
log
(
storageVersion
,
version
)
console
.
log
(
storageVersion
,
version
)
if
(
storageVersion
!=
version
)
{
if
(
storageVersion
!=
version
)
{
uni
.
$storage
.
rm
(
'userInfo'
)
;
uni
.
$storage
.
rm
(
'userInfo'
)
uni
.
$storage
.
rm
(
'noSignInUuid'
)
;
uni
.
$storage
.
rm
(
'noSignInUuid'
)
}
}
uni
.
$storage
.
set
(
"storageVersion"
,
version
)
uni
.
$storage
.
set
(
'storageVersion'
,
version
)
},
}
},
},
onShow
:
async
function
()
{
onShow
:
async
function
()
{
const
systemInfo
=
await
uni
.
$api
.
systemApi
.
getMockData
();
//
const systemInfo = await uni.$api.systemApi.getMockData();
if
(
systemInfo
.
isCheckedUpdate
)
{
//
if (systemInfo.isCheckedUpdate) {
checkUpdate
();
//
checkUpdate();
}
//
}
let
version
=
plus
.
runtime
.
version
;
//
let version = plus.runtime.version;
uni
.
$api
.
commonApi
.
getAPPVersion
().
then
((
res
)
=>
{
//
uni.$api.commonApi.getAPPVersion().then((res) => {
if
(
res
!=
version
&&
!
systemInfo
.
isCheckedUpdate
)
//
if (res != version && !systemInfo.isCheckedUpdate)
this
.
$store
.
dispatch
(
"openUpdateModal"
);
//
this.$store.dispatch("openUpdateModal");
});
//
});
},
},
onHide
:
function
()
{},
onHide
:
function
()
{},
onError
:
function
(
e
)
{
onError
:
function
(
e
)
{
this
.
$sendSentry
(
e
)
;
this
.
$sendSentry
(
e
)
}
,
}
}
;
}
</
script
>
</
script
>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
...
...
components/HomeFrame/components/SettingBox.vue
View file @
affe98d
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
<view
class=
"sprite-icon icon-logo"
></view>
<view
class=
"sprite-icon icon-logo"
></view>
展业助手
展业助手
<view
class=
"version"
>
版本号:V
{{
version
}}
</view>
<view
class=
"version"
>
版本号:V
{{
version
}}
</view>
<view
class=
"check-box"
>
检查更新
</view>
<view
class=
"check-box"
@
click=
"handleCheck"
>
检查更新
</view>
</view>
</view>
<view
class=
"btn-box"
>
<view
class=
"btn-box"
>
<view
class=
"btn flex"
@
click=
"changeAccount"
>
切换账号
</view>
<view
class=
"btn flex"
@
click=
"changeAccount"
>
切换账号
</view>
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
</
template
>
</
template
>
<
script
type=
"text/ecmascript-6"
>
<
script
type=
"text/ecmascript-6"
>
import
checkUpdate
from
"@/uni_modules/uni-upgrade-center-app/utils/check-update-nvue.js"
;
export
default
{
export
default
{
name
:
'SettingBox'
,
name
:
'SettingBox'
,
data
()
{
data
()
{
...
@@ -43,16 +44,19 @@ export default {
...
@@ -43,16 +44,19 @@ export default {
},
},
methods
:
{
methods
:
{
copyText
()
{
copyText
()
{
uni
.
setClipboardData
({
uni
.
setClipboardData
({
data
:
this
.
deviceId
,
data
:
this
.
deviceId
,
success
:
function
()
{
success
:
function
()
{
uni
.
showToast
({
uni
.
showToast
({
title
:
'复制成功'
,
title
:
'复制成功'
,
icon
:
'success'
icon
:
'success'
});
});
}
}
});
});
},
},
handleCheck
()
{
checkUpdate
()
},
open
()
{
open
()
{
this
.
$refs
.
popup
.
open
(
"center"
);
this
.
$refs
.
popup
.
open
(
"center"
);
},
},
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment