修改个人主页的url规则

This commit is contained in:
daihh
2022-10-14 18:29:06 +08:00
parent 56584d7823
commit 164225f67e
13 changed files with 57 additions and 40 deletions

View File

@@ -1,7 +0,0 @@
/**页面设置的一些常量*/
const constants={
fileBaseUrl:'http://192.168.0.10/pc/cdn/upload',
newLoginKey:'boe_new_login'
}
export default constants

20
src/utils/xpage.js Normal file
View File

@@ -0,0 +1,20 @@
/**页面设置的一些常量,方便,用于一个处理只写一处,不要多处写*/
const constants={
fileBaseUrl:'http://192.168.0.10/pc/cdn/upload',
newLoginKey:'boe_new_login'
}
/**返回个人主页的id参数*/
const getHomeId=function(r){
return r.params.id;
}
const getHomePath=function(id){
return '/home/'+id;
}
export default {
getHomeId,
getHomePath,
constants
}