Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
self-support
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李俊赕
self-support
Commits
75e65913
Commit
75e65913
authored
Jun 01, 2021
by
高铭波
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改登录审核问题
parent
e58074ab
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
4 deletions
+15
-4
pages.json
src/pages.json
+2
-2
util.js
src/utils/util.js
+13
-2
No files found.
src/pages.json
View file @
75e65913
...
@@ -42,8 +42,8 @@
...
@@ -42,8 +42,8 @@
{
{
"path"
:
"pages/login/index"
,
"path"
:
"pages/login/index"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"授权登录"
,
//
"navigationBarTitleText"
:
"授权登录"
,
"navigation
Style"
:
"custom"
,
"navigation
BarBackgroundColor"
:
"#FFFFFF"
,
"disableScroll"
:
true
"disableScroll"
:
true
}
}
}
}
...
...
src/utils/util.js
View file @
75e65913
...
@@ -35,6 +35,17 @@ const setOpenid = function (openid) {
...
@@ -35,6 +35,17 @@ const setOpenid = function (openid) {
}
}
}
}
async
function
validImages
(
imgurl
)
{
let
exists
=
false
await
uni
.
getImageInfo
({
src
:
imgurl
,
success
(
res
)
{
exists
=
true
}
})
return
exists
}
/**
/**
* ====图片本地缓存====
* ====图片本地缓存====
* @param {Object} vm 当前vue实例
* @param {Object} vm 当前vue实例
...
@@ -46,8 +57,8 @@ const imageCache = function (vm, src, host) {
...
@@ -46,8 +57,8 @@ const imageCache = function (vm, src, host) {
let
image_url
=
host
+
src
let
image_url
=
host
+
src
let
image_name
=
md5Libs
.
md5
(
image_url
)
let
image_name
=
md5Libs
.
md5
(
image_url
)
var
arr
=
Object
.
keys
(
vm
.
vuex_cache
);
var
arr
=
Object
.
keys
(
vm
.
vuex_cache
);
if
(
vm
.
vuex_cache
&&
arr
.
length
&&
arr
.
includes
(
image_name
)
)
{
if
(
vm
.
vuex_cache
&&
arr
.
length
&&
arr
.
includes
(
image_name
)
&&
// call_back(vm.vuex_cache[image_name])
validImages
(
vm
.
vuex_cache
[
image_name
]))
{
return
vm
.
vuex_cache
[
image_name
]
return
vm
.
vuex_cache
[
image_name
]
}
else
{
}
else
{
// 本地没有缓存 需要下载
// 本地没有缓存 需要下载
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment