Commit 75e65913 authored by 高铭波's avatar 高铭波

修改登录审核问题

parent e58074ab
......@@ -42,8 +42,8 @@
{
"path": "pages/login/index",
"style": {
"navigationBarTitleText": "授权登录",
"navigationStyle": "custom" ,
// "navigationBarTitleText": "授权登录",
"navigationBarBackgroundColor":"#FFFFFF",
"disableScroll": true
}
}
......
......@@ -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实例
......@@ -46,8 +57,8 @@ const imageCache = function (vm, src, host) {
let image_url = host + src
let image_name = md5Libs.md5(image_url)
var arr = Object.keys(vm.vuex_cache);
if (vm.vuex_cache && arr.length && arr.includes(image_name)) {
// call_back(vm.vuex_cache[image_name])
if (vm.vuex_cache && arr.length && arr.includes(image_name) &&
validImages(vm.vuex_cache[image_name])) {
return vm.vuex_cache[image_name]
} else {
// 本地没有缓存 需要下载
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment