提交 fcab2d95 编写于 作者: DCloud_JSON's avatar DCloud_JSON

为了更直观理解路由拦截。移除路由拦截器中,默认过滤登陆相关页面拦截的逻辑。确保所有白名单页面均在配置文件router.visitor中体现

上级 d08149ec
## 1.1.5(2021-09-01)
为了更直观理解路由拦截。移除路由拦截器中,默认过滤登陆相关页面拦截的逻辑。确保所有白名单页面均在配置文件router.visitor中体现
## 1.1.4(2021-08-31)
修改错误的文章表`SChema`的读权限表达式
## 1.1.3(2021-08-31)
......
此差异已折叠。
{
"id": "uni-starter",
"displayName": "uni-starter",
"version": "1.1.4",
"version": "1.1.5",
"description": "云端一体应用快速开发基本项目模版",
"keywords": [
"login",
......
<template>
<view>
<web-view :src="url"></web-view>
<web-view v-if="url" :src="url"></web-view>
</view>
</template>
......@@ -8,7 +8,7 @@
export default {
onLoad({url,title}) {
if(url.substring(0, 4) != 'http'){
return uni.showModal({
uni.showModal({
title:"错误",
content: '不是一个有效的网站链接,'+'"'+url+'"',
showCancel: false,
......@@ -17,10 +17,11 @@
uni.navigateBack()
}
});
title = "页面路径错误"
}else{
console.log(url,title);
this.url = url;
}
console.log(url,title);
this.url = url;
if(title){
uni.setNavigationBarTitle({title});
}
......
......@@ -72,11 +72,12 @@
}
},
watch: {
keyword(keyword, oldValue) {
keyword(keyword, oldValue) {
let where = '"article_status" == 1 '
if (keyword) {
this.where = `/${keyword}/.test(title)`;
this.where = where + `/${keyword}/.test(title)`;
} else {
this.where = '';
this.where = where;
}
}
},
......
......@@ -36,9 +36,11 @@ export default {
"visitor" : [
"/",//注意入口页必须直接写 "/"
{"pattern":/^\/pages\/list.*/}, //支持正则表达式
{"pattern":/^\/pages\/ucenter\/login-page.*/},
"/pages/common/webview/webview",
"/pages/grid/grid",
"/pages/ucenter/ucenter",
"/pages/ucenter/about/about",
"/pages/ucenter/guestbook/guestbook",
"/pages/ucenter/guestbook/guestbook"
],
/*
......
{
"bsonType": "object",
"permission":{
"read":true,
"update":"doc._id == auth.uid"
},
"required": [],
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册