Merge branch 'main' of https://github.com/675061370/xinyue-search
This commit is contained in:
@@ -29,9 +29,9 @@
|
||||
|
||||
## 演示
|
||||
|
||||
[前端体验](https://pan.xinyuedh.com)
|
||||
[前端体验](https://www.xinyueso.com)
|
||||
|
||||
<https://pan.xinyuedh.com>
|
||||
<https://www.xinyueso.com>
|
||||
|
||||
|
||||
## 后台安装教程
|
||||
@@ -73,11 +73,11 @@ location / {
|
||||
|
||||
## 前台截图
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||
## 后台管理截图
|
||||
|
||||
@@ -87,18 +87,18 @@ location / {
|
||||
|
||||
3、每日自动更新:自动转存每天的资源并入库
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
## 如何获取夸克网盘Cookie
|
||||
|
||||
登录夸克网盘后,按下F12,刷新页面
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
# 免费交流社群
|
||||
@@ -107,7 +107,7 @@ location / {
|
||||
请加微信l1417716300
|
||||
|
||||
|
||||
| <img src="https://pan.xinyuedh.com/github/qr1.jpg" width="180px"> | <img src="https://pan.xinyuedh.com/github/qr9.jpg" width="180px"> |
|
||||
| <img src="https://www.xinyueso.com/github/qr1.jpg" width="180px"> | <img src="https://www.xinyueso.com/github/qr9.jpg" width="180px"> |
|
||||
| --- | --- |
|
||||
|
||||
程序使用不收费,但不负责搭建,搭建过程遇到问题,可以私聊或群里咨询
|
||||
|
||||
@@ -159,6 +159,16 @@ class Tool extends QfShop
|
||||
$title = input('title');
|
||||
$list = [];
|
||||
|
||||
|
||||
$userAgent = Request::header('user-agent');
|
||||
// 定义常见爬虫的 User-Agent 关键字
|
||||
$bots = ['Googlebot', 'Bingbot', 'Baiduspider'];
|
||||
foreach ($bots as $bot) {
|
||||
if (strpos($userAgent, $bot) !== false) {
|
||||
return jerr('该接口禁止爬虫访问');
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($title)) {
|
||||
return jok('临时资源获取成功', $list);
|
||||
}
|
||||
|
||||
@@ -92,6 +92,8 @@ class Index extends QfShop
|
||||
$data['page_size'] = 10;
|
||||
$data['title'] = $name;
|
||||
$data['category_id'] = $cate;
|
||||
$data['search_type'] = 1;
|
||||
$data['is_time'] = 1;
|
||||
$list = $this->SourceModel->getList($data);
|
||||
|
||||
|
||||
|
||||
@@ -134,7 +134,8 @@ class Source extends QfShop
|
||||
|
||||
// 如果存在 title,则进行分词
|
||||
if (!empty($data['title'])) {
|
||||
$search_type = config('qfshop.search_type')??1;
|
||||
$search_type = isset($data['search_type']) ? (config('qfshop.search_type') ?? 1) : 1; //默认除网页端其它均为模糊搜索,想开启机器人分词搜索注释该行,取消注释下一行
|
||||
// $search_type = config('qfshop.search_type') ?? 1;
|
||||
|
||||
if($search_type == 0){
|
||||
$map[] = ['title|description', 'like', '%' . trim($data['title']) . '%'];
|
||||
@@ -143,9 +144,13 @@ class Source extends QfShop
|
||||
$fc = new VicWord();
|
||||
$keywords = $fc->getAutoWord($data['title']);
|
||||
$keywords = filterAndExtractWords($keywords);
|
||||
$keywords = array_filter($keywords, function($keyword) {
|
||||
return mb_strlen($keyword, 'UTF-8') > 1;
|
||||
});
|
||||
$keywords = array_values($keywords);
|
||||
|
||||
// 如果分词后有关键词
|
||||
if (count($keywords) > 1) {
|
||||
if (count($keywords) >= 1) {
|
||||
if($search_type == 1){
|
||||
//分词同时满足才搜索的到!
|
||||
foreach ($keywords as $keyword) {
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
<p>全部转存:<font color=orangered>一键转存心悦搜索所有资源到自己的网盘及系统中</font></p>
|
||||
<font color=orangered>全部转存速度比较慢,提交后请耐心等待;名称重复的资源会跳过转存;</font>
|
||||
<p>全部转存需要按类别转存:见下方列表一键转存按钮</p>
|
||||
<p>Tips:心悦搜索:https://pan.xinyuedh.com;</p>
|
||||
<p>Tips:心悦搜索:https://www.xinyueso.com;</p>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
+3
-3
@@ -152,7 +152,7 @@ class ChatChannel(Channel):
|
||||
reply_text_final += "\n⚠️宁少写,不多写、错写~"
|
||||
reply_text_final += "\n--------------------"
|
||||
reply_text_final += "\n可访问以下链接提交资源需求"
|
||||
reply_text_final += "\nhttps://pan.xinyuedh.com"
|
||||
reply_text_final += "\nhttps://www.xinyueso.com"
|
||||
# reply_text_final += "\n--------------------"
|
||||
# reply_text_final += "\nGPT小助手分享"
|
||||
# reply_text_final += "\n--------------------"
|
||||
@@ -517,7 +517,7 @@ def process_string2(s):
|
||||
|
||||
|
||||
def search_question(question):
|
||||
url = 'https://pan.xinyuedh.com/api/search'
|
||||
url = 'https://www.xinyueso.com/api/search'
|
||||
params = {
|
||||
'is_time': '1',
|
||||
'page_no': '1',
|
||||
@@ -534,7 +534,7 @@ def search_question(question):
|
||||
return []
|
||||
|
||||
def search_alone(question):
|
||||
url = 'https://pan.xinyuedh.com/api/other/all_search'
|
||||
url = 'https://www.xinyueso.com/api/other/all_search'
|
||||
payload = {
|
||||
'title': question
|
||||
}
|
||||
|
||||
@@ -151,7 +151,7 @@ class ChatChannel(Channel):
|
||||
reply_text_final += "\n⚠️宁少写,不多写、错写~"
|
||||
# reply_text_final += "\n--------------------"
|
||||
# reply_text_final += "\n可访问以下链接提交资源需求"
|
||||
# reply_text_final += "\nhttps://pan.xinyuedh.com"
|
||||
# reply_text_final += "\nhttps://www.xinyueso.com"
|
||||
# reply_text_final += "\n--------------------"
|
||||
# reply_text_final += "\nGPT小助手分享"
|
||||
# reply_text_final += "\n--------------------"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"debug": true,
|
||||
"duanju_url": "https://pan.xinyuedh.com",
|
||||
"duanju_url": "https://www.xinyueso.com",
|
||||
"channel_type": "wx",
|
||||
"model": "gpt-4",
|
||||
"open_ai_api_key": "",
|
||||
|
||||
@@ -17,7 +17,7 @@ class QuarkPlugin
|
||||
public function __construct()
|
||||
{
|
||||
//第三方转存接口地址
|
||||
$this->url = "https://pan.xinyuedh.com";
|
||||
$this->url = "https://www.xinyueso.com";
|
||||
$this->model = new SourceModel();
|
||||
$this->SourceLogModel = new SourceLogModel();
|
||||
$this->source_category_id = 0;
|
||||
|
||||
@@ -1 +1 @@
|
||||
import{n as e,r as a,a as t,b as s,c as l,w as o,i as c,o as i,d as n,e as d,t as r,f as u,g,h as f,j as h,k as m,l as p,F as _,m as y,p as k,I as w}from"./index-CICgbd-2.js";import{_ as C,H as b,F as x,r as B,a as v}from"./footer.GjOAft6T.js";const H=C({components:{Header:b,Footer:x},data:()=>({keyword:"",tab:0,loading:!1,hot:[],loading2:!1,newList:[],category_id:"",category:[{value:"",text:"全部"}]}),onLoad(){this.getClass(),this.getHot(),this.getNew()},computed:{config(){return this.$store.state.config}},methods:{searchBtn(){e({url:"/pages/index/list?category_id="+this.category_id+"&keyword="+encodeURIComponent(this.keyword)}),this.keyword=""},goSearch(a){e({url:"/pages/index/list?keyword="+encodeURIComponent(a)})},getHot(){this.loading=!0,a({url:"https://pan.xinyuedh.com/api/search/getHot",success:e=>{let a=[],t=[];try{t=e.data.data}catch(s){}for(let l of t)a.push({title:l.title,hot:l.hots,ranking:l.ranking});this.hot=a},complete:()=>{this.loading=!1}})},getNew(){this.loading2=!0,a({url:baseURL+"api/search/getNew",success:e=>{let a=[],t=[];try{t=e.data.data.items}catch(s){}for(let l of t)a.push({title:l.title,num:l.times});this.newList=a},complete:()=>{this.loading2=!1}})},getClass(){let e=[{value:"",text:"全部"}];a({url:baseURL+"api/search/getCategory",success:a=>{let t=a.data.data||[];for(let s of t)e.push({value:s.source_category_id,text:s.name});this.category=e}})}}},[["render",function(e,a,C,b,x,H){const L=t("Header"),U=y,V=k,F=c,I=B(s("uni-data-select"),v),R=w,S=t("Footer");return i(),l(F,{class:"view"},{default:o((()=>[n(L),n(F,{class:"homeBox"},{default:o((()=>[n(F,{class:"logoBox"},{default:o((()=>[n(U,{class:"logo",src:H.config?H.config.logo:""},null,8,["src"]),n(V,{class:"title"},{default:o((()=>[d(r(H.config?H.config.app_name:""),1)])),_:1})])),_:1}),n(F,{class:"subTitle"},{default:o((()=>[d(r(H.config?H.config.app_description:""),1)])),_:1}),n(F,{class:u(["search",x.category.length>2?"":"noSelect"])},{default:o((()=>[n(I,{class:"selectBox",modelValue:x.category_id,"onUpdate:modelValue":a[0]||(a[0]=e=>x.category_id=e),localdata:x.category,clear:!1},null,8,["modelValue","localdata"]),g("i",{class:"iconfont icon-sousuo",onClick:a[1]||(a[1]=(...e)=>H.searchBtn&&H.searchBtn(...e))}),n(R,{type:"text",modelValue:x.keyword,"onUpdate:modelValue":a[2]||(a[2]=e=>x.keyword=e),placeholder:"输入关键字进行搜索",onKeyup:f(H.searchBtn,["enter"]),"confirm-type":"search",onConfirm:H.searchBtn},null,8,["modelValue","onKeyup","onConfirm"])])),_:1},8,["class"]),n(F,{class:"content"},{default:o((()=>[n(F,{class:"tabs"},{default:o((()=>[n(F,{class:u(["item",0===x.tab?"active":""]),onClick:a[3]||(a[3]=e=>x.tab=0)},{default:o((()=>[d("热门资源")])),_:1},8,["class"]),n(F,{class:u(["item",1===x.tab?"active":""]),onClick:a[4]||(a[4]=e=>x.tab=1)},{default:o((()=>[d("最新资源")])),_:1},8,["class"])])),_:1}),0===x.tab?(i(),l(F,{key:0,class:"list"},{default:o((()=>[x.loading?(i(),l(F,{key:0,class:"loading"},{default:o((()=>[d("正在努力加载中...")])),_:1})):h("",!0),(i(!0),m(_,null,p(x.hot,((e,a)=>(i(),l(F,{class:"item",key:a,onClick:a=>H.goSearch(e.title)},{default:o((()=>[n(F,{class:"name"},{default:o((()=>[d(r(e.ranking)+"、"+r(e.title),1)])),_:2},1024),n(F,{class:"num"},{default:o((()=>[d(r(e.hot),1)])),_:2},1024)])),_:2},1032,["onClick"])))),128))])),_:1})):h("",!0),1===x.tab?(i(),l(F,{key:1,class:"list"},{default:o((()=>[x.loading2?(i(),l(F,{key:0,class:"loading"},{default:o((()=>[d("正在努力加载中...")])),_:1})):h("",!0),(i(!0),m(_,null,p(x.newList,((e,a)=>(i(),l(F,{class:"item",key:a,onClick:a=>H.goSearch(e.title)},{default:o((()=>[n(F,{class:"name"},{default:o((()=>[d(r(a+1)+"、"+r(e.title),1)])),_:2},1024),n(F,{class:"num"},{default:o((()=>[d(r(e.num),1)])),_:2},1024)])),_:2},1032,["onClick"])))),128))])),_:1})):h("",!0)])),_:1})])),_:1}),n(S)])),_:1})}],["__scopeId","data-v-df5dc4b2"]]);export{H as default};
|
||||
import{n as e,r as a,a as t,b as s,c as l,w as o,i as c,o as i,d as n,e as d,t as r,f as u,g,h as f,j as h,k as m,l as p,F as _,m as y,p as k,I as w}from"./index-CICgbd-2.js";import{_ as C,H as b,F as x,r as B,a as v}from"./footer.GjOAft6T.js";const H=C({components:{Header:b,Footer:x},data:()=>({keyword:"",tab:0,loading:!1,hot:[],loading2:!1,newList:[],category_id:"",category:[{value:"",text:"全部"}]}),onLoad(){this.getClass(),this.getHot(),this.getNew()},computed:{config(){return this.$store.state.config}},methods:{searchBtn(){e({url:"/pages/index/list?category_id="+this.category_id+"&keyword="+encodeURIComponent(this.keyword)}),this.keyword=""},goSearch(a){e({url:"/pages/index/list?keyword="+encodeURIComponent(a)})},getHot(){this.loading=!0,a({url:"https://www.xinyueso.com/api/search/getHot",success:e=>{let a=[],t=[];try{t=e.data.data}catch(s){}for(let l of t)a.push({title:l.title,hot:l.hots,ranking:l.ranking});this.hot=a},complete:()=>{this.loading=!1}})},getNew(){this.loading2=!0,a({url:baseURL+"api/search/getNew",success:e=>{let a=[],t=[];try{t=e.data.data.items}catch(s){}for(let l of t)a.push({title:l.title,num:l.times});this.newList=a},complete:()=>{this.loading2=!1}})},getClass(){let e=[{value:"",text:"全部"}];a({url:baseURL+"api/search/getCategory",success:a=>{let t=a.data.data||[];for(let s of t)e.push({value:s.source_category_id,text:s.name});this.category=e}})}}},[["render",function(e,a,C,b,x,H){const L=t("Header"),U=y,V=k,F=c,I=B(s("uni-data-select"),v),R=w,S=t("Footer");return i(),l(F,{class:"view"},{default:o((()=>[n(L),n(F,{class:"homeBox"},{default:o((()=>[n(F,{class:"logoBox"},{default:o((()=>[n(U,{class:"logo",src:H.config?H.config.logo:""},null,8,["src"]),n(V,{class:"title"},{default:o((()=>[d(r(H.config?H.config.app_name:""),1)])),_:1})])),_:1}),n(F,{class:"subTitle"},{default:o((()=>[d(r(H.config?H.config.app_description:""),1)])),_:1}),n(F,{class:u(["search",x.category.length>2?"":"noSelect"])},{default:o((()=>[n(I,{class:"selectBox",modelValue:x.category_id,"onUpdate:modelValue":a[0]||(a[0]=e=>x.category_id=e),localdata:x.category,clear:!1},null,8,["modelValue","localdata"]),g("i",{class:"iconfont icon-sousuo",onClick:a[1]||(a[1]=(...e)=>H.searchBtn&&H.searchBtn(...e))}),n(R,{type:"text",modelValue:x.keyword,"onUpdate:modelValue":a[2]||(a[2]=e=>x.keyword=e),placeholder:"输入关键字进行搜索",onKeyup:f(H.searchBtn,["enter"]),"confirm-type":"search",onConfirm:H.searchBtn},null,8,["modelValue","onKeyup","onConfirm"])])),_:1},8,["class"]),n(F,{class:"content"},{default:o((()=>[n(F,{class:"tabs"},{default:o((()=>[n(F,{class:u(["item",0===x.tab?"active":""]),onClick:a[3]||(a[3]=e=>x.tab=0)},{default:o((()=>[d("热门资源")])),_:1},8,["class"]),n(F,{class:u(["item",1===x.tab?"active":""]),onClick:a[4]||(a[4]=e=>x.tab=1)},{default:o((()=>[d("最新资源")])),_:1},8,["class"])])),_:1}),0===x.tab?(i(),l(F,{key:0,class:"list"},{default:o((()=>[x.loading?(i(),l(F,{key:0,class:"loading"},{default:o((()=>[d("正在努力加载中...")])),_:1})):h("",!0),(i(!0),m(_,null,p(x.hot,((e,a)=>(i(),l(F,{class:"item",key:a,onClick:a=>H.goSearch(e.title)},{default:o((()=>[n(F,{class:"name"},{default:o((()=>[d(r(e.ranking)+"、"+r(e.title),1)])),_:2},1024),n(F,{class:"num"},{default:o((()=>[d(r(e.hot),1)])),_:2},1024)])),_:2},1032,["onClick"])))),128))])),_:1})):h("",!0),1===x.tab?(i(),l(F,{key:1,class:"list"},{default:o((()=>[x.loading2?(i(),l(F,{key:0,class:"loading"},{default:o((()=>[d("正在努力加载中...")])),_:1})):h("",!0),(i(!0),m(_,null,p(x.newList,((e,a)=>(i(),l(F,{class:"item",key:a,onClick:a=>H.goSearch(e.title)},{default:o((()=>[n(F,{class:"name"},{default:o((()=>[d(r(a+1)+"、"+r(e.title),1)])),_:2},1024),n(F,{class:"num"},{default:o((()=>[d(r(e.num),1)])),_:2},1024)])),_:2},1032,["onClick"])))),128))])),_:1})):h("",!0)])),_:1})])),_:1}),n(S)])),_:1})}],["__scopeId","data-v-df5dc4b2"]]);export{H as default};
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
User-agent: *
|
||||
Disallow:
|
||||
Sitemap: https://pan.xinyuedh.com/sitemap.xml
|
||||
Sitemap: https://www.xinyueso.com/sitemap.xml
|
||||
Reference in New Issue
Block a user