本文以丁香医生为例,介绍如何增加与一个标准订阅源的规则
页面分析
本文以丁香医生科普文章列表为例,首先前往页面
点击右键,点击【查看网页源代码】,勾选【自动换行】
我们可以看到,在html中,就已经把我们需要的返回了
基础规则
首先,输入基本信息
列表基础
之后跳转到列表规则中
在首页是,我们发现有多个选项可选择,而点击不同选项,只有url中的最后的数字变了,所以,我们在列表中新增几个标签页
标签页名称就是选项名称,值就是变化的数字。
下一步,我们输入url【https://dxy.com/articles/{{tab}}】
这个url表示,当切换标签页时,标签页值会替换url中的{{tab}}。
列表规则
我们在返回科普文章页面,按F12打开控制台
可以看到,一个文章就是一个class为article-card的div元素,所以列表规则为【class.article-card】
之后,我们在点开div标签
所以:
图片规则:.article-card-cover@img@src
标题列表:class.article-card-body@class.body-title@text
描述规则:class.article-card-body@class.body-content@text
链接规则:class.article-card-body@a@href
上面的规则中,以class.article-card-body@class.body-title@text为例
class.article-card-body是表示查找class为article-card-body的元素
@是分隔符,比如标题规则中class.article-card-body@class.body-title表示先查找class为article-card-body的元素,再在这些元素中class为body-title的元素
最后的的text表示在找到的class为body-title的元素的内容文本
内容规则
照着上面的编写,就会得到这样的一个列表,但是此时点开后,会打开一个浏览器,那我们是否可以在插件内显示呢?当然可以。
我们点开一个文章,打开控制台,发现文章内容都在一个class为article-detail-content的元素里
那我们修改规则,在内容规则中选择自定义内容渲染,渲染方式为模板内容为<div>{{ root.parseToString('.article-detail-content@html') }}</div>
我们再点击保存,重新打开列表,先机内容,我们就发现可以在插件内直接预览了
最后
最后,在附上规则
{"id":1730105641090,"name":"丁香医生","icon":"","group":"自定义","enableSearch":false,"type":1,"list":{"url":"https://dxy.com/articles/{{tab}}","list":".article-card","title":"class.article-card-body@class.body-title@text","description":"class.article-card-body@class.body-content@text","tags":[],"author":"","image":".article-card-cover@img@src","link":"class.article-card-body@a@href","custom":false,"jsCode":"/**\n * 此处为自定义规则函数\n * 此函数为异步函数,所以支持await关键字\n * 具体用法请参考文档:https://blog.esion.xyz/2021/08/23/subscribe-list-rule/\n */\nconst {keyword, page} = data;\nreturn {\n // 实际请求地址,主要用于url解析\n requestUrl: url,\n // 是否允许分页,默认false,允许分页的话,会在列表滚动到底部时自动请求下一页\n allowPage: false,\n // 当前页码,从1开始,用于下次分页时的基础页面\n page,\n // 搜索关键字,列表规则返回空字符串即可\n keyword,\n // 结果项,具体格式请参考文档\n items: []\n}","rule":"/**\n * 此处为自定义规则函数\n * 此函数为异步函数,所以支持await关键字\n * 具体用法请参考文档:https://blog.esion.xyz/2021/08/23/subscribe-list-rule/\n */\nsetResult([]);\n","layout":1,"http":{"method":"GET","headers":"","cookie":"","timeout":15000,"charset":"","webview":false,"wait":""},"actions":[{"id":1730105659335,"label":"膳食指南","value":"24834","children":[]},{"id":1730105857618,"label":"运动与减肥","value":"24836","children":[]}]},"content":{"rule":"<style>\r\n .bread-crumb-nav {\r\n width: 1180px;\r\n margin: 0 auto 28px;\r\n display: flex;\r\n flex-direction: row\r\n}\r\n\r\n.bread-crumb-nav-item {\r\n position: relative;\r\n display: flex;\r\n align-items: center;\r\n font-size: 1.2rem;\r\n line-height: 16px\r\n}\r\n\r\n.bread-crumb-nav-item a {\r\n color: #00c792\r\n}\r\n\r\n.bread-crumb-nav-item h1 {\r\n font-weight: 400;\r\n font-size: 1.2rem;\r\n line-height: 16px;\r\n color: #444c57\r\n}\r\n\r\n.inner-navbar-list {\r\n width: 100%;\r\n padding: 8px 0 16px;\r\n display: flex;\r\n background-color: #fff;\r\n justify-content: center;\r\n margin-bottom: 28px\r\n}\r\n\r\n.inner-navbar-list .inner-navbar-items {\r\n width: 100%;\r\n max-width: 1180px\r\n}\r\n\r\n.inner-navbar-list .inner-navbar-items>ul {\r\n display: flex;\r\n flex-flow: row nowrap\r\n}\r\n\r\n.inner-navbar-list .inner-navbar-items .inner-navbar-item>a {\r\n font-size: 16px;\r\n line-height: 20px;\r\n color: #444c57;\r\n margin-right: 40px\r\n}\r\n\r\n.inner-navbar-list .inner-navbar-items .inner-navbar-item-active>a,.inner-navbar-list .inner-navbar-items .inner-navbar-item>a:hover {\r\n color: #00c792\r\n}\r\n\r\n.search-header-container {\r\n width: 100%;\r\n display: flex;\r\n justify-content: center;\r\n padding: 30px 0;\r\n position: -webkit-sticky;\r\n position: sticky;\r\n top: 0;\r\n background: #fff;\r\n z-index: 8\r\n}\r\n\r\n.search-header-container .search-logo-input {\r\n display: flex;\r\n width: 100%;\r\n max-width: 1180px;\r\n background: #fff;\r\n align-items: center\r\n}\r\n\r\n.search-header-container .search-logo-input .logo {\r\n height: 35px;\r\n width: 130px;\r\n margin-right: 20px;\r\n display: block\r\n}\r\n\r\n.search-header-container .search-logo-input .logo .logo-icon {\r\n height: 35px;\r\n width: 130px;\r\n display: block;\r\n background: url(https://img1.dxycdn.com/2021/0712/429/2257906367067791943-22.png) no-repeat 50%;\r\n background-size: cover\r\n}\r\n\r\n.search-input-container {\r\n box-shadow: 0 2px 1px 0 hsla(215,9%,63%,.05);\r\n display: flex;\r\n align-items: center;\r\n position: relative;\r\n width: 680px;\r\n height: 46px;\r\n background-color: #fff\r\n}\r\n\r\n.search-input-container .search-icon {\r\n top: 50%;\r\n transform: translateY(-50%)\r\n}\r\n\r\n.search-input-container .search-input {\r\n display: inline-block;\r\n flex: 1 1;\r\n text-indent: 42px;\r\n border: 1px solid #e8e9eb;\r\n font-size: 1.4rem;\r\n height: 44px;\r\n line-height: 44px;\r\n color: #444c57\r\n}\r\n\r\n.search-input-container .search-input-button {\r\n width: 128px;\r\n height: 46px;\r\n font-size: 1.4rem;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n background-color: #00c792;\r\n font-weight: 500;\r\n line-height: 16px;\r\n color: #fff\r\n}\r\n\r\n.search-input-container .search-input-button:hover {\r\n cursor: pointer;\r\n background-color: #00ad7f\r\n}\r\n\r\n.common-avatar {\r\n width: 50px;\r\n height: 50px;\r\n border-radius: 50%;\r\n box-sizing: border-box;\r\n overflow: hidden\r\n}\r\n\r\n.common-avatar-img {\r\n display: block;\r\n height: 100%;\r\n width: 100%;\r\n -o-object-fit: cover;\r\n object-fit: cover\r\n}\r\n\r\n.common-avatar-rectangle {\r\n border-radius: 0\r\n}\r\n\r\n.common-avatar-border {\r\n border: 1px solid rgba(0,0,0,.05)\r\n}\r\n\r\n.login-continer {\r\n width: 100%;\r\n background-color: #fff;\r\n border-bottom: 1px solid #e8e9eb\r\n}\r\n\r\n.login-continer .login-header {\r\n display: flex;\r\n align-items: center;\r\n justify-content: flex-end;\r\n width: 100%;\r\n height: 60px;\r\n max-width: 1180px;\r\n margin: 0 auto;\r\n box-sizing: border-box\r\n}\r\n\r\n.login-continer .login-header .follow-box {\r\n position: relative\r\n}\r\n\r\n.login-continer .login-header .follow-box .header-qr-code {\r\n position: absolute;\r\n top: 30px;\r\n z-index: 10\r\n}\r\n\r\n.login-continer .login-header .download,.login-continer .login-header .follow {\r\n font-size: 13px;\r\n line-height: 16px;\r\n color: #252a33\r\n}\r\n\r\n.login-continer .login-header .follow {\r\n margin-right: 30px;\r\n display: flex;\r\n align-items: center\r\n}\r\n\r\n.login-continer .login-header .identify {\r\n font-size: 13px;\r\n line-height: 16px;\r\n color: #00c792;\r\n margin-right: 30px;\r\n margin-left: 20px;\r\n align-items: center;\r\n font-weight: 700\r\n}\r\n\r\n.login-continer .login-header .before-login {\r\n display: flex;\r\n align-items: center;\r\n font-size: 13px;\r\n font-weight: 400;\r\n line-height: 16px;\r\n color: #252a33\r\n}\r\n\r\n.login-continer .login-header .before-login>* {\r\n margin-right: 8px\r\n}\r\n\r\n.login-continer .login-header .before-login>:last-child {\r\n margin-right: 0\r\n}\r\n\r\n.login-continer .login-header .before-login-login {\r\n display: flex;\r\n margin-right: 20px;\r\n align-items: center\r\n}\r\n\r\n.login-continer .login-header .before-login-register:hover {\r\n color: #00c792;\r\n cursor: pointer\r\n}\r\n\r\n.login-continer .login-header .after-login {\r\n display: flex;\r\n align-items: center\r\n}\r\n\r\n.login-continer .login-header .after-login :first-child {\r\n margin-right: 8px\r\n}\r\n\r\n.login-continer .login-header .after-login .user-info,.login-continer .login-header .after-login .user-name {\r\n font-size: 13px;\r\n line-height: 16px;\r\n color: #252a33;\r\n margin-right: 20px\r\n}\r\n\r\n.login-continer .login-header .after-login .user-info:last-child,.login-continer .login-header .after-login .user-name:last-child {\r\n margin-right: 0\r\n}\r\n\r\n.login-continer .login-header .after-login .user-info:last-child:after,.login-continer .login-header .after-login .user-name:last-child:after {\r\n display: none\r\n}\r\n\r\n.login-continer .login-header .after-login .user-info:hover {\r\n color: #00c792;\r\n cursor: pointer\r\n}\r\n\r\n.login-continer .login-header .download-icon,.login-continer .login-header .follow-icon,.login-continer .login-header .user-icon {\r\n height: 16px;\r\n width: 16px;\r\n margin-right: 8px;\r\n color: #4b5566\r\n}\r\n\r\n.login-continer .login-header .dot {\r\n position: relative\r\n}\r\n\r\n.login-continer .login-header .dot:after {\r\n top: 6px;\r\n right: -12px;\r\n position: absolute;\r\n content: \"\";\r\n width: 4px;\r\n height: 4px;\r\n background-color: #828993;\r\n border-radius: 50%\r\n}\r\n\r\n.login-continer .login-header .highlight {\r\n color: #00c792;\r\n cursor: pointer\r\n}\r\n\r\n.container {\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center\r\n}\r\n\r\n.content {\r\n display: flex;\r\n flex-flow: column nowrap;\r\n max-width: 1180px;\r\n width: 100%;\r\n border-radius: 4px;\r\n background-color: #fff;\r\n box-sizing: border-box;\r\n margin: 0 auto 20px;\r\n padding: 28px 30px\r\n}\r\n\r\n.content-title {\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n margin-bottom: 28px\r\n}\r\n\r\n.content-title-text {\r\n font-size: 2rem;\r\n color: #252a33;\r\n font-weight: 500;\r\n line-height: 24px\r\n}\r\n\r\n.content-title-more {\r\n font-size: 1.6rem;\r\n color: #00c792\r\n}\r\n\r\n.layout-content {\r\n width: 1180px;\r\n display: flex\r\n}\r\n\r\n.right-content {\r\n width: 230px;\r\n margin-left: 20px;\r\n box-sizing: border-box\r\n}\r\n\r\n.left-content {\r\n width: 930px;\r\n box-sizing: border-box\r\n}\r\n\r\n.base-content {\r\n border-radius: 4px;\r\n background-color: #fff;\r\n box-sizing: border-box;\r\n padding: 0 30px\r\n}\r\n\r\n.footer {\r\n margin-top: 60px\r\n}\r\n\r\niframe {\r\n display: block;\r\n height: 100%;\r\n width: 100%;\r\n max-width: 960px;\r\n margin: 0 auto;\r\n border: none\r\n}\r\n\r\n.content-html {\r\n overflow: auto;\r\n color: #444c57;\r\n font-size: 16px;\r\n line-height: 1.5;\r\n word-break: break-word\r\n}\r\n\r\n.content-html h2 {\r\n margin-top: 28px;\r\n color: #252a33;\r\n font-size: 20px;\r\n font-weight: 500;\r\n border-top: 1px solid #e8e9eb;\r\n padding-top: 28px\r\n}\r\n\r\n.content-html div,.content-html p {\r\n margin-top: 24px\r\n}\r\n\r\n.content-html p br {\r\n display: none\r\n}\r\n\r\n.content-html em {\r\n display: inline\r\n}\r\n\r\n.content-html blockquote {\r\n margin-top: 24px;\r\n padding: 24px 20px;\r\n color: #444c57;\r\n font-size: 14px;\r\n font-weight: 400;\r\n line-height: 1.5;\r\n background-color: #f5f5f5;\r\n border-radius: 4px\r\n}\r\n\r\n.content-html blockquote p {\r\n margin: 0\r\n}\r\n\r\n.content-html b,.content-html strong {\r\n font-weight: 700\r\n}\r\n\r\n.content-html img {\r\n display: block;\r\n width: 100%!important;\r\n margin-top: 24px;\r\n border-radius: 4px\r\n}\r\n\r\n.content-html a {\r\n overflow: auto;\r\n color: #00c792;\r\n font-weight: 500;\r\n font-size: 18px;\r\n line-height: 32px;\r\n word-break: break-all\r\n}\r\n\r\n.content-html li {\r\n margin-right: 0;\r\n background: none\r\n}\r\n\r\n.content-html ul>li {\r\n list-style: inside disc\r\n}\r\n\r\n.content-html ol>li {\r\n list-style: inside decimal\r\n}\r\n\r\n.content-html li p {\r\n display: inline-block\r\n}\r\n\r\n.content-html i {\r\n font-style: italic\r\n}\r\n\r\n.content-html del,.content-html s,.content-html strike {\r\n text-decoration: line-through\r\n}\r\n\r\n.content-html del {\r\n display: inline\r\n}\r\n\r\n.content-html figure {\r\n overflow: hidden\r\n}\r\n\r\n.content-html u {\r\n text-decoration: underline\r\n}\r\n\r\n.content-html .WxEmojiView {\r\n align-items: center\r\n}\r\n\r\n.content-html .wxEmoji {\r\n width: 16px;\r\n height: 16px\r\n}\r\n\r\n.content-html video {\r\n width: 100%;\r\n height: 600px;\r\n margin: 10px 0;\r\n text-align: center\r\n}\r\n\r\n.content-html .video-video {\r\n width: 100%;\r\n height: 100%\r\n}\r\n\r\n.content-html tr {\r\n display: flex\r\n}\r\n\r\n.content-html td,.content-html th {\r\n flex: 1 1;\r\n padding: 5px;\r\n font-size: 14px;\r\n word-break: break-all\r\n}\r\n\r\n.content-html td img,.content-html th img {\r\n margin: 0\r\n}\r\n\r\n.content-html th {\r\n background: #f0f0f0\r\n}\r\n\r\n.content-html small,.content-html sub,.content-html sup {\r\n font-size: .83em\r\n}\r\n\r\n.content-html sub {\r\n vertical-align: sub\r\n}\r\n\r\n.content-html sup {\r\n vertical-align: super\r\n}\r\n\r\n.tag-html {\r\n overflow: auto;\r\n color: #252a33;\r\n font-weight: 300;\r\n font-size: 16px;\r\n line-height: 24px;\r\n word-break: break-word\r\n}\r\n\r\n.tag-html h2 {\r\n font-size: 20px;\r\n font-weight: 500;\r\n line-height: 30px;\r\n color: #252a33;\r\n margin-top: 20px\r\n}\r\n\r\n.tag-html div,.tag-html ol,.tag-html p,.tag-html ul {\r\n margin-top: 16px\r\n}\r\n\r\n.tag-html ol,.tag-html p,.tag-html ul {\r\n font-size: 16px;\r\n line-height: 24px;\r\n color: #444c57;\r\n font-weight: 400\r\n}\r\n\r\n.tag-html ol br,.tag-html p br,.tag-html ul br {\r\n display: none\r\n}\r\n\r\n.tag-html em {\r\n display: inline\r\n}\r\n\r\n.tag-html blockquote {\r\n margin: 20px 0;\r\n padding: 14px 10px;\r\n color: #252a33;\r\n font-weight: 400;\r\n font-size: 15px;\r\n line-height: 1.5;\r\n background-color: #fafafa;\r\n border-radius: 4px\r\n}\r\n\r\n.tag-html blockquote p:last-child {\r\n margin-bottom: 0\r\n}\r\n\r\n.tag-html b,.tag-html strong {\r\n font-weight: 700\r\n}\r\n\r\n.tag-html img {\r\n display: block;\r\n width: 100%!important;\r\n margin: 20px 0;\r\n border-radius: 4px\r\n}\r\n\r\n.tag-html a {\r\n overflow: auto;\r\n color: #00c792;\r\n font-weight: 500;\r\n font-size: 18px;\r\n line-height: 32px;\r\n word-break: break-all\r\n}\r\n\r\n.tag-html li {\r\n margin-right: 0;\r\n background: none\r\n}\r\n\r\n.tag-html ul li-circle:before,.tag-html ul li-ring:before,.tag-html ul li-square:before {\r\n content: \"\\B7\"\r\n}\r\n\r\n.tag-html ol {\r\n counter-reset: dxd-decimal\r\n}\r\n\r\n.tag-html ol li-circle,.tag-html ol li-ring,.tag-html ol li-square {\r\n counter-increment: dxd-decimal\r\n}\r\n\r\n.tag-html ol li-circle:before,.tag-html ol li-ring:before,.tag-html ol li-square:before {\r\n content: counter(dxd-decimal) \".\"\r\n}\r\n\r\n.tag-html i {\r\n font-style: italic\r\n}\r\n\r\n.tag-html del,.tag-html s,.tag-html strike {\r\n text-decoration: line-through\r\n}\r\n\r\n.tag-html del {\r\n display: inline\r\n}\r\n\r\n.tag-html figure {\r\n overflow: hidden\r\n}\r\n\r\n.tag-html u {\r\n text-decoration: underline\r\n}\r\n\r\n.tag-html .WxEmojiView {\r\n align-items: center\r\n}\r\n\r\n.tag-html .wxEmoji {\r\n width: 16px;\r\n height: 16px\r\n}\r\n\r\n.tag-html video {\r\n width: 100%;\r\n height: 190px;\r\n margin: 10px 0;\r\n text-align: center\r\n}\r\n\r\n.tag-html .video-video {\r\n width: 100%;\r\n height: 100%\r\n}\r\n\r\n.tag-html tr {\r\n display: flex\r\n}\r\n\r\n.tag-html td,.tag-html th {\r\n flex: 1 1;\r\n padding: 5px;\r\n font-size: 14px;\r\n word-break: break-all\r\n}\r\n\r\n.tag-html td img,.tag-html th img {\r\n margin: 0\r\n}\r\n\r\n.tag-html th {\r\n background: #f0f0f0\r\n}\r\n\r\n.tag-html small,.tag-html sub,.tag-html sup {\r\n font-size: .83em\r\n}\r\n\r\n.tag-html sub {\r\n vertical-align: sub\r\n}\r\n\r\n.tag-html sup {\r\n vertical-align: super\r\n}\r\n\r\n.continuous-img-no-margin p img {\r\n margin: 0;\r\n border-radius: 0\r\n}\r\n\r\n.continuous-img-no-margin p img:first-of-type {\r\n margin-top: 20px;\r\n border-top-left-radius: 4px;\r\n border-top-right-radius: 4px\r\n}\r\n\r\n.continuous-img-no-margin p img:last-of-type {\r\n margin-bottom: 20px;\r\n border-bottom-left-radius: 4px;\r\n border-bottom-right-radius: 4px\r\n}\r\n\r\n.audio {\r\n margin-bottom: 20px\r\n}\r\n\r\n.audio-title {\r\n margin-top: 20px;\r\n color: #00c792;\r\n font-weight: 600;\r\n font-size: 16px;\r\n line-height: 24px\r\n}\r\n\r\n.audio-block {\r\n height: 74px;\r\n border-radius: 4px;\r\n background-color: #00c792;\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n padding: 0 28px;\r\n margin-top: 16px\r\n}\r\n\r\n.audio-block.white {\r\n background-color: #fafafa\r\n}\r\n\r\n.audio-block.white .slider {\r\n background-color: #ebebeb\r\n}\r\n\r\n.audio-block.white .slider .played-line,.audio-block.white .slider .point {\r\n background-color: #00c792\r\n}\r\n\r\n.audio-block.white .duration {\r\n color: #666\r\n}\r\n\r\n.audio-block .controller {\r\n width: 26px;\r\n height: 26px\r\n}\r\n\r\n.audio-block .slider {\r\n height: 4px;\r\n flex: 1 1;\r\n background-color: hsla(0,0%,100%,.2);\r\n margin: 0 28px;\r\n position: relative\r\n}\r\n\r\n.audio-block .slider .played-line {\r\n margin: 0;\r\n height: 4px;\r\n background-color: hsla(0,0%,100%,.6)\r\n}\r\n\r\n.audio-block .slider .point {\r\n position: absolute;\r\n width: 12px;\r\n height: 12px;\r\n border-radius: 50%;\r\n background-color: #fff;\r\n top: -4px;\r\n margin: 0\r\n}\r\n\r\n.audio-block .duration {\r\n font-size: 16px;\r\n line-height: 18px;\r\n color: #fff;\r\n min-width: 32px;\r\n margin: 0;\r\n font-weight: 600\r\n}\r\n\r\n.audio-mini {\r\n margin: 0\r\n}\r\n\r\n.audio-mini .audio-title {\r\n margin-top: 0\r\n}\r\n\r\n.audio-mini .audio-block {\r\n margin-top: 0;\r\n height: 44px;\r\n padding: 0 18px\r\n}\r\n\r\n.audio-mini .audio-block .controller {\r\n width: 16px;\r\n height: 16px\r\n}\r\n\r\n.audio-mini .audio-block .slider {\r\n height: 2px;\r\n margin: 0 18px\r\n}\r\n\r\n.audio-mini .audio-block .slider .played-line {\r\n height: 2px\r\n}\r\n\r\n.audio-mini .audio-block .slider .point {\r\n height: 6px;\r\n width: 6px;\r\n top: -2px\r\n}\r\n\r\n.audio-mini .audio-block .duration {\r\n font-size: 12px;\r\n line-height: 16px\r\n}\r\n\r\n.common-share {\r\n background-color: #fff;\r\n position: fixed;\r\n left: 50%;\r\n width: 80px;\r\n box-sizing: border-box;\r\n border-radius: 4px;\r\n margin-left: -590px\r\n}\r\n\r\n.common-share-inner {\r\n text-align: center;\r\n padding: 28px 24px;\r\n color: #252a33\r\n}\r\n\r\n.common-share-title {\r\n font-size: 12px;\r\n line-height: 1.33\r\n}\r\n\r\n.common-share-icon {\r\n margin-top: 12px;\r\n width: 20px;\r\n height: 20px;\r\n background-color: #f2f3f5;\r\n padding: 6px;\r\n position: relative;\r\n cursor: pointer\r\n}\r\n\r\n.common-share-wechat-box {\r\n position: absolute;\r\n top: 40px;\r\n left: -52px;\r\n width: 128px;\r\n background-color: #fff;\r\n padding: 4px 4px 16px;\r\n box-shadow: 0 6px 12px 0 hsla(215,9%,63%,.2);\r\n box-sizing: border-box\r\n}\r\n\r\n.common-share-wechat-img {\r\n width: 120px;\r\n height: 120px\r\n}\r\n\r\n.common-share-wechat-txt {\r\n font-size: 12px;\r\n line-height: 1.5;\r\n color: #444c57;\r\n padding: 0 4px;\r\n text-align: left;\r\n margin-top: 8px\r\n}\r\n\r\n.trust-module {\r\n font-size: 14px;\r\n line-height: 18px;\r\n color: #b38c3e;\r\n display: flex;\r\n flex-flow: row nowrap;\r\n background: #fff;\r\n align-items: center\r\n}\r\n\r\n.trust-module-img {\r\n width: 30px;\r\n height: 30px;\r\n display: block;\r\n margin-right: 4px\r\n}\r\n\r\n.article-card {\r\n display: flex\r\n}\r\n\r\n.article-card .article-card-cover {\r\n width: 100px;\r\n height: 100px;\r\n min-width: 100px;\r\n border-radius: 4px;\r\n border: 1px solid rgba(0,0,0,.05);\r\n overflow: hidden;\r\n box-sizing: border-box\r\n}\r\n\r\n.article-card .article-card-cover-img {\r\n height: 100%;\r\n width: 100%;\r\n -o-object-fit: cover;\r\n object-fit: cover;\r\n display: block\r\n}\r\n\r\n.article-card .article-card-body {\r\n margin-left: 12px\r\n}\r\n\r\n.article-card .article-card-body .article-title {\r\n display: block\r\n}\r\n\r\n.article-card .article-card-body .body-title {\r\n font-size: 16px;\r\n font-weight: 500;\r\n line-height: 20px;\r\n color: #252a33;\r\n margin-bottom: 16px;\r\n display: -webkit-box;\r\n word-break: break-all;\r\n overflow: hidden;\r\n -webkit-line-clamp: 1;\r\n text-overflow: ellipsis;\r\n -webkit-box-orient: vertical;\r\n white-space: normal!important\r\n}\r\n\r\n.article-card .article-card-body .body-title:hover {\r\n text-decoration: underline;\r\n color: #00c792\r\n}\r\n\r\n.article-card .article-card-body .body-content {\r\n font-size: 14px;\r\n line-height: 20px;\r\n color: #828993;\r\n display: -webkit-box;\r\n word-break: break-all;\r\n overflow: hidden;\r\n -webkit-line-clamp: 3;\r\n text-overflow: ellipsis;\r\n -webkit-box-orient: vertical;\r\n white-space: normal!important\r\n}\r\n\r\n.article-card .default-cover {\r\n background: #f2f3f5;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center\r\n}\r\n\r\n.article-card .default-cover .article-card-cover-img {\r\n height: 39px;\r\n width: 32px\r\n}\r\n\r\n.high-light {\r\n font-size: 16px;\r\n color: #444c57\r\n}\r\n\r\n.high-light em {\r\n color: #00c792;\r\n font-style: normal\r\n}\r\n\r\n* {\r\n margin: 0;\r\n padding: 0\r\n}\r\n\r\nbody,html {\r\n width: 100%;\r\n height: 100%\r\n}\r\n\r\nhtml {\r\n font-size: 62.5%\r\n}\r\n\r\nbody {\r\n font-family: PingFang SC,Helvetica Neue,Helvetica,Hiragino Sans GB,Microsoft YaHei,\\\\5FAE\\8F6F\\96C5\\9ED1,Arial,sans-serif;\r\n font-size: 1.4rem;\r\n line-height: 1.5;\r\n margin: 0;\r\n background-color: #f2f3f5;\r\n padding: constant(safe-area-inset-top) constant(safe-area-inset-right) constant(safe-area-inset-bottom) constant(safe-area-inset-left)\r\n}\r\n\r\na,a:hover,a:visited {\r\n text-decoration: none\r\n}\r\n\r\na,div,i,label,li {\r\n -webkit-tap-highlight-color: transparent\r\n}\r\n\r\npre {\r\n font-family: PingFang SC,Helvetica Neue,Helvetica,Hiragino Sans GB,Microsoft YaHei,\\\\5FAE\\8F6F\\96C5\\9ED1,Arial,sans-serif\r\n}\r\n\r\nbutton,input,textarea {\r\n border: none;\r\n outline: none\r\n}\r\n\r\na:focus,li:focus {\r\n outline: none\r\n}\r\n\r\n::-webkit-input-placeholder {\r\n font-weight: 400;\r\n color: #99a0aa\r\n}\r\n\r\n::-moz-placeholder {\r\n font-weight: 400;\r\n color: #99a0aa\r\n}\r\n\r\n:-ms-input-placeholder {\r\n font-weight: 400;\r\n color: #99a0aa\r\n}\r\n\r\nli,ol,ul {\r\n margin: 0;\r\n padding: 0;\r\n list-style: none\r\n}\r\n\r\n::-webkit-search-cancel-button {\r\n display: none\r\n}\r\n\r\nimg {\r\n max-width: 100%\r\n}\r\n\r\n.icon {\r\n width: 1em;\r\n height: 1em;\r\n vertical-align: -.15em;\r\n fill: currentColor;\r\n overflow: hidden\r\n}\r\n\r\n.icon-ic_search {\r\n position: absolute;\r\n width: 18px;\r\n height: 18px;\r\n color: #c5c8d1;\r\n margin-left: 16px\r\n}\r\n\r\n.icon-ic_arrow {\r\n width: 18px;\r\n height: 10px;\r\n color: #c5c8d1;\r\n margin-left: 5px;\r\n position: relative\r\n}\r\n\r\n.icon-ic_arrow_up {\r\n color: #fff;\r\n font-size: 1.8rem\r\n}\r\n\r\n.icon-ic_asking {\r\n color: #28b7a3;\r\n font-size: 2rem\r\n}\r\n\r\n.icon-ic_grade {\r\n width: 8px;\r\n height: 8px;\r\n color: #fff;\r\n padding: 4px\r\n}\r\n\r\n.icon-ic_phone,.icon-locationfill {\r\n margin-right: 6px\r\n}\r\n\r\n.icon-ic_address,.icon-ic_phone,.icon-locationfill {\r\n width: 12px;\r\n height: 12px;\r\n color: #c5c8d1\r\n}\r\n\r\n.icon-ic_rating {\r\n width: 14px;\r\n height: 13px;\r\n color: #ffb54c\r\n}\r\n\r\n.icon-ic_douban,.icon-ic_qzone,.icon-ic_sina_weibo,.icon-ic_wechat {\r\n width: 20px;\r\n height: 20px;\r\n color: #99a0aa\r\n}\r\n\r\n.icon-ic_close1 {\r\n width: 16px;\r\n height: 16px;\r\n color: #99a0aa\r\n}\r\n\r\n.icon-ic_dsussfule,.icon-ic_hide1 {\r\n width: 16px;\r\n height: 16px;\r\n color: #d0d3d9\r\n}\r\n\r\n.lr-container {\r\n display: flex;\r\n max-width: 1180px\r\n}\r\n\r\n.lr-container-left {\r\n width: 930px\r\n}\r\n\r\n.lr-container-left .content {\r\n width: 100%\r\n}\r\n\r\n.lr-container-right {\r\n width: 230px;\r\n margin-left: 20px\r\n}\r\n\r\n.lr-container-right .content {\r\n width: 100%;\r\n padding-bottom: 28px\r\n}\r\n\r\n.btn {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n color: #fff;\r\n background-color: #00c792\r\n}\r\n\r\n.btn:hover {\r\n cursor: pointer\r\n}\r\n\r\n.course-card {\r\n display: flex;\r\n flex: 1 1;\r\n margin-right: 30px\r\n}\r\n\r\n.course-card-left {\r\n width: 112px;\r\n height: 112px;\r\n margin-right: 12px\r\n}\r\n\r\n.course-card-left img {\r\n width: 112px;\r\n height: 112px;\r\n border-radius: 4px\r\n}\r\n\r\n.course-card-name {\r\n color: #444c57;\r\n font-size: 1.4rem;\r\n margin-top: 10px;\r\n height: 42px;\r\n width: 130px;\r\n display: -webkit-box;\r\n word-break: break-all;\r\n overflow: hidden;\r\n -webkit-line-clamp: 2;\r\n text-overflow: ellipsis;\r\n -webkit-box-orient: vertical;\r\n white-space: normal!important\r\n}\r\n\r\n.course-card-buy-count,.course-card-doctor-name {\r\n color: #828993;\r\n font-size: 1.2rem\r\n}\r\n\r\n.course-card-doctor-name {\r\n margin-top: 9px;\r\n width: 130px;\r\n display: -webkit-box;\r\n word-break: break-all;\r\n overflow: hidden;\r\n -webkit-line-clamp: 1;\r\n text-overflow: ellipsis;\r\n -webkit-box-orient: vertical;\r\n white-space: normal!important\r\n}\r\n\r\n.course-card-buy-count {\r\n margin-top: 13px\r\n}\r\n\r\n.back-top {\r\n display: inline-block;\r\n position: fixed;\r\n right: 5%;\r\n bottom: 3%;\r\n box-sizing: border-box;\r\n width: 54px;\r\n height: 54px;\r\n background-color: #00c792;\r\n text-align: center;\r\n padding-top: 18px\r\n}\r\n\r\n.back-top:hover {\r\n cursor: pointer;\r\n background-color: #00ad7f\r\n}\r\n\r\n.list-contain-title {\r\n font-size: 1.4rem;\r\n color: #828993;\r\n line-height: 18px;\r\n margin-bottom: 16px\r\n}\r\n\r\n.list-contain-title a {\r\n color: #828993\r\n}\r\n\r\n.list-contain-title a:hover {\r\n color: #28b7a3;\r\n cursor: pointer;\r\n text-decoration: underline;\r\n -webkit-text-decoration-color: #28b7a3;\r\n text-decoration-color: #28b7a3\r\n}\r\n\r\n.list-contain-ul {\r\n font-size: 0\r\n}\r\n\r\n.list-contain-li,.list-contain-no-icon {\r\n display: inline-block;\r\n margin: 0 0 16px;\r\n overflow: hidden;\r\n white-space: nowrap;\r\n text-overflow: ellipsis;\r\n word-break: break-all;\r\n font-size: 1.2rem;\r\n line-height: 16px;\r\n max-height: 16px\r\n}\r\n\r\n.list-contain-li:before {\r\n content: \"\\2022\";\r\n color: #d0d3d9;\r\n padding-right: 4px\r\n}\r\n\r\n.list-contain-link {\r\n color: #252a33\r\n}\r\n\r\n.list-contain-link:hover {\r\n color: #28b7a3;\r\n cursor: pointer;\r\n text-decoration: underline;\r\n -webkit-text-decoration-color: #28b7a3;\r\n text-decoration-color: #28b7a3\r\n}\r\n\r\n.list-contain .more-arrow {\r\n font-size: 10px;\r\n display: inline;\r\n margin-left: 6px\r\n}\r\n\r\n.list-contain .more-arrow:after {\r\n position: relative;\r\n top: -1px;\r\n margin-left: 6rpx;\r\n content: \" \";\r\n height: 6px;\r\n width: 6px;\r\n border-color: #28b7a3;\r\n border-style: solid;\r\n border-width: 2px 2px 0 0;\r\n transform: matrix(.71,.71,-.71,.71,0,0);\r\n display: inline-block\r\n}\r\n\r\n.section-navbar-title {\r\n color: #5b626b;\r\n font-size: 1.6rem;\r\n margin-bottom: 16px\r\n}\r\n\r\n.section-navbar-items {\r\n display: flex\r\n}\r\n\r\n.section-navbar-items ul {\r\n display: flex;\r\n flex-wrap: wrap\r\n}\r\n\r\n.section-navbar-item {\r\n display: inline-flex;\r\n height: 26px;\r\n margin: 0 12px 12px 0;\r\n background-color: #f2f3f5;\r\n border-radius: 4px\r\n}\r\n\r\n.section-navbar-item a {\r\n font-size: 1.3rem;\r\n margin: 4px 20px;\r\n color: #5b626b\r\n}\r\n\r\n.section-navbar-item.active,.section-navbar-item:hover {\r\n background-color: #28b7a3;\r\n cursor: pointer\r\n}\r\n\r\n.section-navbar-item.active a,.section-navbar-item:hover a {\r\n color: #fff\r\n}\r\n\r\n.common-card-link:hover {\r\n cursor: pointer;\r\n box-shadow: 0 6px 12px 0 hsla(215,9%,63%,.2)\r\n}\r\n\r\n.common-text-link:hover {\r\n cursor: pointer;\r\n color: #00c792;\r\n text-decoration: underline!important\r\n}\r\n\r\n.common-button-link {\r\n position: relative\r\n}\r\n\r\n.common-button-link:hover:after {\r\n position: absolute;\r\n height: 100%;\r\n width: 100%;\r\n content: \"\";\r\n left: 0;\r\n top: 0;\r\n right: 0;\r\n bottom: 0;\r\n background-color: rgba(26,26,26,.2);\r\n border-radius: 4px\r\n}\r\n\r\n.article-detail {\r\n width: 1080px;\r\n padding-bottom: 60px;\r\n margin-left: 100px\r\n}\r\n\r\n.article-detail-content {\r\n border-radius: 4px;\r\n padding: 28px 30px;\r\n background-color: #fff\r\n}\r\n\r\n.article-detail h1 {\r\n margin-top: 28px;\r\n color: #252a33;\r\n font-size: 28px;\r\n font-weight: 600;\r\n line-height: 1.5\r\n}\r\n\r\n.article-detail-author {\r\n font-size: 16px;\r\n line-height: 1.5;\r\n color: #444c57;\r\n padding: 16px 0 24px\r\n}\r\n\r\n.article-detail-publish {\r\n margin-right: 20px\r\n}\r\n\r\n.article-recommend {\r\n padding: 28px 30px;\r\n background-color: #fff;\r\n border-radius: 4px;\r\n margin-top: 20px\r\n}\r\n\r\n.article-recommend h3 {\r\n font-size: 20px;\r\n font-weight: 500;\r\n line-height: 1.2;\r\n color: #252a33\r\n}\r\n\r\n.article-recommend-content {\r\n display: flex;\r\n flex-wrap: wrap;\r\n justify-content: space-between\r\n}\r\n\r\n.article-recommend-content .article-card {\r\n min-width: 421px;\r\n width: 49%;\r\n margin-top: 28px\r\n}\r\n\r\n</style>\r\n\r\n<div>{{ root.parseToString('.article-detail-content@html') }}</div>","custom":true,"render":"template","http":{"method":"GET","headers":"","cookie":"","timeout":15000,"charset":"","webview":false,"wait":""},"httpCustom":false},"search":{"url":"","list":"","title":"","description":"","tags":[],"author":"","image":"","link":"","custom":false,"jsCode":"/**\n * 此处为自定义规则函数\n * 此函数为异步函数,所以支持await关键字\n * 具体用法请参考文档:https://blog.esion.xyz/2021/08/23/subscribe-list-rule/\n */\nconst {keyword, page} = data;\nreturn {\n // 实际请求地址,主要用于url解析\n requestUrl: url,\n // 是否允许分页,默认false,允许分页的话,会在列表滚动到底部时自动请求下一页\n allowPage: false,\n // 当前页码,从1开始,用于下次分页时的基础页面\n page,\n // 搜索关键字,列表规则返回空字符串即可\n keyword,\n // 结果项,具体格式请参考文档\n items: []\n}","rule":"/**\n * 此处为自定义规则函数\n * 此函数为异步函数,所以支持await关键字\n * 具体用法请参考文档:https://blog.esion.xyz/2021/08/23/subscribe-list-rule/\n */\nsetResult([]);\n","layout":1,"http":{"method":"GET","headers":"","cookie":"","timeout":15000,"charset":"","webview":false,"wait":""}},"pages":[],"setting":{"renderImage":true,"referer":""}}
可以在新建规则时点击粘贴
再点击确定即可使用
评论区