GithubHelp home page GithubHelp logo

Comments (9)

likeyun avatar likeyun commented on June 11, 2024

API不提供后台管理,我认为有能力调用API的,一般是有能力实现API生成的短链接的管理。

from likeyun_ylb.

chboy666 avatar chboy666 commented on June 11, 2024

API不提供后台管理,我认为有能力调用API的,一般是有能力实现API生成的短链接的管理。

感谢您的答复!

from likeyun_ylb.

chboy666 avatar chboy666 commented on June 11, 2024

您好,您有没有什么办法让API中的数据可以显示到主页面的方法呢?主要可以查看短地址的访问次数等信息。
目前我的办法只有通过POST登录页面获取PHPSESSID,然后GET “/console/dwz/getDwzList.php”的文件。感觉有点繁琐(其实其他方法我不太会)
想请教您有没有更加简便的方法。

from likeyun_ylb.

likeyun avatar likeyun commented on June 11, 2024

from likeyun_ylb.

chboy666 avatar chboy666 commented on June 11, 2024

API的短网址创建者改成后台登陆账号一致的用户就可以了。

--------------原始邮件--------------
发件人:"chboy666 @.>;
发送时间:2023年11月28日(星期二) 凌晨0:16
收件人:"likeyun/liKeYun_Ylb" @.
>;
抄送:"TANKING @.>;"Comment @.>;
主题:Re: [likeyun/liKeYun_Ylb] 短地址使用API接口进行添加数据后无法在后台页面内显示 (Issue #24)

您好,您有没有什么办法让API中的数据可以显示到主页面的方法呢?主要可以查看短地址的访问次数等信息。
目前我的办法只有通过POST登录页面获取PHPSESSID,然后GET “/console/dwz/getDwzList.php”的文件。感觉有点繁琐(其实其他方法我不太会)
想请教您有没有更加简便的方法。


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: @.***>

这个问题我已经复现过,api创建者名称和管理员账号名称是同一名称。但是仍然不显示。

from likeyun_ylb.

likeyun avatar likeyun commented on June 11, 2024

from likeyun_ylb.

chboy666 avatar chboy666 commented on June 11, 2024

感觉 getDwzList.php 没有问题,因为JSON也是正常输出的,但是页面上不显示。
JSON中返回的 dwz_creat_user 也是和管理页账户名称一样的。
image

from likeyun_ylb.

chboy666 avatar chboy666 commented on June 11, 2024

感觉 getDwzList.php 没有问题,因为JSON也是正常输出的,但是页面上不显示。
JSON中返回的 dwz_creat_user 也是和管理页账户名称一样的。
image

@likeyun

from likeyun_ylb.

chboy666 avatar chboy666 commented on June 11, 2024

已解决问题,问题在 dwz.js文件上的 196-198代码上,主要原因为196-198行代码试图将 res.dwzList[i].dwz_today_pv 的值转换为 JSON 对象,然后获取该对象的 pv 属性。然而,错误表明 res.dwzList[i].dwz_today_pv 的值为 null。
为了防止这个错误,你可以在执行 toString 和 JSON.parse 之前添加一些检查,确保 res.dwzList[i].dwz_today_pv 不是 null。
把这几行代码删除,新增一下判断就好了:
if(res.dwzList[i].dwz_today_pv !== null) { var dwz_today_pv = JSON.parse(res.dwzList[i].dwz_today_pv.toString()).pv; var dwz_today_date = JSON.parse(res.dwzList[i].dwz_today_pv.toString()).date; } else { var dwz_today_pv = 0; var dwz_today_date = 0; }
原因可能是API创建的时候没有对JSON的解析弄好?没去研究,不过经过改正之后,面板能正常显示API创建的数据。

from likeyun_ylb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.