changbin1997 / MWordStar

响应式双栏 Typecho 博客主题
https://www.misterma.com
MIT License
201 stars 30 forks source link

post.php&components/post-list.php中编辑功能对应的链接地址错误 #25

Open qazz-shyper opened 1 year ago

qazz-shyper commented 1 year ago

@changbin1997 RT, post.php的第77行: <a href="<?php echo $this->options->siteUrl . 'admin/write-post.php?cid=' . $this->cid; ?>" >编辑</a> 以及components/post-list.php的第57行: <a href="<?php echo $this->options->siteUrl . 'admin/write-post.php?cid=' . $this->cid; ?>" class="float-right mr-3 d-sm-none d-none d-md-inline d-lg-inline d-xl-inline">编辑</a>

对应的链接地址是不是应该是'/admin/write-post.php?cid='?我发现每次点击这里都会出现跳转问题,还以为是我修改了代码。后来看了下源代码,应该是这里有问题。admin前添加"/"后就没有问题了,其他页面我还没仔细检查过

changbin1997 commented 1 year ago

我测试了一下,文章列表的编辑链接是可以正常跳转到文章编辑页的:

测试链接跳转

我使用 Typecho 的网站地址 API $this->options->siteUrl 输出的地址结尾就包含 /admin 前面可以不需要加 / ,如果加了 / 域名后面就会包含两个 /