Comments (8)
@FidStyle 修了,更新到 @waline/[email protected]
吧
@FidStyle fixed it and updated it to @waline/[email protected]
from waline.
- pageview 接口之前是有一个返回数据问题,是当请求一条的时候返回的是
1
,而多条的时候返回的是[1,1]
数组格式。这块在新的版本中已经都统一成了{errmsg: '', errno: '', data: [1]}
结构体了。前提是需要使用<serverURL>/api
新的接口来请求。 - 我看了下你的 MR BeiyanYunyi/sodesu@8208fae 没有看太明白,我们应该是不会返回
{time: 1}
这种结构的。这块建议你直接发下请求地址我一块看看。
- The pageview interface had a problem with returning data before. When one request was made, it returned
1
, and when multiple requests were made, it returned the[1,1]
array format. This has been unified into the{errmsg: '', errno: '', data: [1]}
structure in the new version. The premise is that you need to use the<serverURL>/api
new interface to request. - I took a look at your MR BeiyanYunyi/sodesu@8208fae. I didn’t understand it very well. We should not return a structure like
{time: 1}
. It is recommended that you directly send the request address and I will take a look.
from waline.
对于“其他页面 pageview”的情况:
GET https://walinejs.comment.lithub.cc/api/article?path=/guide/features/pageview.html,/guide/features/i18n.html&type=time&lang=zh-CN
返回值:
{"errno":0,"errmsg":"","data":[{"time":5995},{"time":4844}]}
对于“本页面 pageview”的情况:
POST https://walinejs.comment.lithub.cc/api/article?lang=zh-CN
返回值:
{"errno":0,"errmsg":"","data":[125849]}
两个返回值的 data 格式很显然是不同的。
For the case of "other page pageview":
GET https://walinejs.comment.lithub.cc/api/article?path=/guide/features/pageview.html,/guide/features/i18n.html&type=time&lang=zh-CN
return value:
{"errno":0,"errmsg":"","data":[{"time":5995},{"time":4844}]}
For the case of "this page pageview":
POST https://walinejs.comment.lithub.cc/api/article?lang=zh-CN
return value:
{"errno":0,"errmsg":"","data":[125849]}
The data format of the two return values is obviously different.
from waline.
Any update with this @lizheming, dpes client side code need any changes?
from waline.
@lizheming 我这两天又羊了,正难受,你看一下这个问题是 @waline/api 写的有问题还是的确需要 refine 一下服务端的 api 吧。
@lizheming I've been having trouble these past two days and I'm feeling uncomfortable. Please check if this question is written by @waline/api, or if the server-side API really needs to be refined.
from waline.
@Mister-Hope 是服务端 API 改造的问题,这个我正在纠结预期的返回格式是什么样子的,确认完之后再统一修改一下。
@Mister-Hope It’s a question of server-side API transformation. I’m struggling with what the expected return format should be. I’ll make unified changes after confirmation.
from waline.
为了统一 pageview 和 reaction 的返回格式,思考了下,最终统一按照如下结构体进行统一返回。@waline/client@v3
也需要进行下适配,这块我来同步修改一下。
type ResponseData = Counter[];
interface Counter {
time?: number;
reaction0: number;
reaction1: number;
}
In order to unify the return format of pageview and reaction, I thought about it and finally unified the return according to the following structure. @waline/client@v3
also needs to be adapted. I will modify this synchronously.
type ResponseData = Counter[];
interface Counter {
time?: number;
reaction0: number;
reaction1: number;
}
from waline.
按照文档配置发生error,仍然无法显示
服务端客户端均为latest
@lizheming
from waline.
Related Issues (20)
- [Bug]: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client HOT 2
- [Bug]: ArticleReaction.vue:99 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'reaction0') HOT 3
- [Bug]: Error when accessing UI management,TypeError: ww is not a function (admin:9118:162) HOT 2
- [Bug]: Got SyntaxError & ReferenceError when Importing waline.js v3 by CDN | 通过CDN导入waline.js v3时得到语法错误与引用错误 HOT 7
- [Feature]: GRAVATAR_STR SHA256 支持 || [Feature]: GRAVATAR_STR SHA256 support HOT 1
- [Bug]: Fail to deploy on Vercel - dist folder missing? HOT 6
- [Bug]: QQ邮件登陆后后台出现乱码,且发件退件 || [Bug]: After logging in to QQ mail, garbled characters appear in the background and the mail is returned. HOT 3
- [Bug] [独立部署 直接运行] [SQLite数据库] : 未配置LeanCloud相关的环境变量时, 程序运行报错 || [Bug] [Independent deployment, direct operation] [SQLite database]: When the environment variables related to LeanCloud are not configured, the program will report an error when running. HOT 4
- [Bug]: 评论未填邮件地址时,会报错 || [Bug]: When commenting without filling in the email address, an error will be reported HOT 1
- [Bug]: 发件人和收件人同一个邮箱? || [Bug]: The sender and recipient have the same email address? HOT 3
- [Feature]: 能支持从环境变量指定端口吗 || [Feature]: Can the port be specified from the environment variable? HOT 5
- [Bug]: WALINE将URL 中不带反斜杠/ 结尾和带反斜杠/ 结尾的地址会认为是两个页面 || [Bug]: WALINE will consider the URL without backslash/ at the end and the address with backslash/ at the end as two pages. HOT 2
- [Bug]: Cannot read properties of undefined (reading 'nick') HOT 9
- [Bug]: Prior submitted comment isn't clearing from comment form HOT 4
- [Feature]: RSS feeds for comments HOT 1
- [Bug]: 使用 zeabur 部署后评论/登录后台会提示:Not initialized HOT 7
- [Bug]: 最新版本评论数获取失败 || [Bug]: Failed to obtain the number of comments for the latest version HOT 17
- [Bug]: api return unexpected result to client HOT 2
- [Feature]: 建议加一个通知中心 || [Feature]: It is recommended to add a notification center
- [Feature]: 1. 建议把邮件提示这个功能做成可以在后台修改的样式 2. 优化一下图片上传 || [Feature]: 1. It is recommended that the email reminder function be made into a style that can be modified in the background 2. Optimize image uploading HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from waline.