前言

前面我们获取了歌曲的排行榜的数据,我们现在需要实现歌曲播放

前面我们写了一段函数来得到了回调的数据,现在我们需要使用这一段数据,来实现播放歌曲

完整代码

<!DOCTYPE html>
<html lang="zh-cn" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>QQ音乐API</title>
<link rel="icon" href="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1554453627219&di=fd6b1db82c1878273c5e889c5300c390&imgtype=0&src=http%3A%2F%2Fpic.90sjimg.com%2Fdesign%2F01%2F23%2F72%2F30%2F58fdf1c8cf2d3.png">
<link href="~/Content/Css/style.css" rel="stylesheet" /> </head>
<body> <div id="bg2"></div>
<div id="bg"></div> <div style="position: fixed; top: 0%; left: 50%; transform: translate(-50%); width: 100%;">
<h1>当前播放-</h1>
<div id="info"></div>
<div class="Centent_D">
<input id="SongText" type="text" placeholder="搜索歌曲" />
<input type="button" value="搜索并播放" onclick="SerchSongOrPlay()" />
<div style="max-height: 500px; overflow-y: auto">
<table cellspacing="0" id="table">
<thead>
<tr>
<td>歌名</td>
<td>歌手</td>
<td hidden>索引</td>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
<canvas id='canvas' width="600" height="350"></canvas>
<audio src="" crossOrigin="anonymous" id="audio" loop controls></audio>
</div>
</div> <div id="audio_control">
<p id="SongTime"><span class="SongTime"></span><span class="PlaySongTime"></span></p>
<input type="button" value="BackSong" onclick="BackSong()" />
<input type="button" value="NextSong" onclick="NextSong()" />
<input type="button" value="切换播放模式" onclick="PlayMode(3)" />
<input id="SongSpeed" type="range" min="1" max="4" value="1" />
<p>遇到播放不了?可能你用的是谷歌浏览器,解决方法:地址栏输入:chrome://flags/#autoplay-policy回车,在Autoplay policy高亮这一行右边的按钮选择No user gesture is required,重启浏览器即可</p>
<div id="SongLyric">
<div id="qrc_ctn" class="qrc_ctn"> </div>
</div>
<p id="SongProgress"></p>
</div>
<script src="~/Content/Javascript/jquery.min.js"></script>
<script src="~/Content/Javascript/main.js"></script>
<script src="~/Content/Javascript/Vibrant.min.js"></script>
<script src="~/Content/Javascript/TimeToPack.js"></script>
<script> function SetTimeRutrunMS(AudioTime) {
var M, S, MS;
M = parseInt(AudioTime / 60);
S = (AudioTime % 60).toFixed(2);
M += '';
S += '';
M = (M.length == 1) ? '0' + M : M;
S = (S.length == 4) ? '0' + S : S;
return [M, S];
} function SetMSRutrunms(MS) {
if (MS != undefined) {
if (MS.search(/\d\d\D\d\d\D\d\d/) === 0) {
var AF = MS.match(/(.*)\:/);
var AM = MS.match(/\:(.*)\./);
var AHM = MS.match(/\.(.*)/);
var HBJS = AF[1] + "." + AM[1] + AHM[1]; return HBJS; } else {
return "格式不对";
}
} else {
return false;
}
} function SetMHMRutrunms(MH) {
if (MH != undefined || MH != 0 || MH != null) { var AA;
var CC = MH % 60 /100;
if (MH / 60 <= 1) {
AA = MH / 100;
} else {
AA = parseInt(MH / 60) + CC;
}
return AA;
} else {
return false;
}
} function VerifySongTime(num) {
if (num != undefined || num != "" || num != null) {
if (num.search(/\d\d\D\d\d\D\d\d/) == 0) {
return true;
} else {
return false;
}
} else {
return false;
}
} function AJBXC(ValueA,ValueB,Max) {
var XJJG = ValueA - ValueB;
if (XJJG < 0) {
XJJG -= XJJG * 2
}
if (XJJG <= Max){
return true;
}
return false;
}
</script>
<script>
var audio = $("#audio");
var songAttr = [];
var SonglrcAttr = [];
var songindex = 0;
var lycinner = 0;
var ToleranceInt = 1;
var time1, time2, time3;
var BackWeek = _.GetDayToWeek(_.GetOneYearToDay()); function MusicJsonCallbacktoplist(data) {
var TemporarySingerApp = "";
if (window.navigator.onLine) {
songAttr = data;
if (songAttr.songlist.length != 0) {
$("table tbody").empty();
$.each(songAttr.songlist,
function (e) {
TemporarySingerApp += "<tr><td>" + this.data.songname + "</td><td>";
$.each(songAttr.songlist[e].data.singer,
function (i) {
TemporarySingerApp += " " + songAttr.songlist[e].data.singer[i].name + " ";
if (i == (songAttr.songlist[e].data.singer.length - 1)) {
TemporarySingerApp += "</td><td hidden>" + e + "</td></tr>";
$("table tbody").append(TemporarySingerApp);
TemporarySingerApp = "";
} });
});
$("table tbody tr").on("dblclick",
function () {
if (!$(this).attr("disabled")) {
songindex = parseInt($(this).find("td").last()[0].innerHTML);
RecommendSongIPVkey(parseInt($(this).find("td").last()[0].innerHTML), 1);
RemoveLyricinfo();
}
});
RecommendSongIPVkey(0, 1);
} else {
console.log("找不到音乐");
}
} else {
console.log("你没有网络,请求了数据无法返回");
}
} function RecommendSongIPVkey(i, z) {
$("table tbody tr").css("background", "");
$("table tbody tr:nth-of-type(" + (i + 1) + ")").css("background", "rgba(204, 204, 204,0.3)");
if (songAttr.songlist[i].songid != 0) {
$.ajax({
type: "GET",
dataType: "jsonp",
url:
'https://u.y.qq.com/cgi-bin/musicu.fcg?data={"req":{"module":"CDN.SrfCdnDispatchServer","method":"GetCdnDispatch","param":{"guid":"000000000","calltype":0,"userip":""}},"req_0":{"module":"vkey.GetVkeyServer","method":"CgiGetVkey","param":{"guid":"000000000","songmid":["' +
songAttr.songlist[i].data.songmid +
'"],"songtype":[0],"uin":"0","loginflag":1,"platform":"20"}}}',
success: function (Vkeydata) {
if (window.navigator.onLine) {
songindex = i;
if (Vkeydata.req_0.data.midurlinfo[0].vkey != "") {
GetSong(Vkeydata); $.ajax({
type: "GET",
dataType: "json",
url: "/Index/GetMuiscLyric",
data: {
Url:"https://c.y.qq.com/lyric/fcgi-bin/fcg_query_lyric_new.fcg?-=MusicJsonCallback_lrc&pcachetime=" +Math.round(new Date()) +"&songmid=" +songAttr.songlist[i].data.songmid +"&g_tk=5381&loginUin=0&hostUin=0&format=json&inCharset=utf8&outCharset=utf-8&notice=0&platform=yqq.json&needNewCode=0",
Filename: songAttr.songlist[i].data.albummid + ".json"
},
success: function (data) {
var SongData = JSON.parse(data);
var SongLyric = decodeURIComponent(escape(window.atob(SongData.lyric)));
var SongLyricDOM = $("#SongLyric > div");
SongLyricDOM.children("p").remove();
SongLyric.trim().split('\n').forEach(function (v, i) { var LryTime = v.match(/\[(.*)\]/)[1];
var Lry = v.match(/\](.*)/)[1];
if (VerifySongTime(LryTime)) {
SonglrcAttr.push([SetMSRutrunms(LryTime), Lry]); SongLyricDOM.append("<p data-id=" + i + ">" + Lry + "</p>");
} else {
SonglrcAttr.push([Lry, LryTime]);
SongLyricDOM.append("<p data-id=" + i + ">" + LryTime + "</p>");
} });
}
}); if (songAttr.songlist[i].data.albummid != "") { $("#bg").css("background-image",
"url('https://y.gtimg.cn/music/photo_new/T002R300x300M000" +
songAttr.songlist[i].data.albummid +
".jpg?max_age=2592000')");
$.ajax({
type: "GET",
dataType: "json",
url: "/Index/GetMusicPic",
data: {
Url: "https://y.gtimg.cn/music/photo_new/T002R300x300M000" +
songAttr.songlist[i].data.albummid +
".jpg?max_age=2592000",
Filename: songAttr.songlist[i].data.albummid + ".jpg"
},
success: function (filename) {
if (filename != null) {
var img = document.createElement('img');
img.setAttribute('src', '../Content/MusicPic/' + filename); img.addEventListener('load',
function () {
var vibrant = new Vibrant(img);
var swatches = vibrant.swatches();
if (swatches.Vibrant != undefined) {
$("body").css("background-color",
"rgba(" +
swatches.Vibrant.rgb[0] +
"," +
swatches.Vibrant.rgb[1] +
"," +
swatches.Vibrant.rgb[2] +
",1)");
}
});
}
}
});
} else {
$("#bg").css("background-image", "url('../Content/MusicPic/NoMusicPic.jpg");
} $("h1").html("当前播放 - " + songAttr.songlist[i].data.songname);
} else {
NoCopyright(i, z);
}
} else {
console.log("你没有网络,接收不到返回的数据");
}
},
error: function (e) {
if (e.state == "404") {
RecommendSongIPVkey(i, z);
}
}
});
} else {
NoCopyright(i, z);
}
}
$.ajax({
type: "GET",
dataType: "jsonp",
url: 'https://c.y.qq.com/v8/fcg-bin/fcg_v8_toplist_cp.fcg?topid=26&platform=yqq.json&jsonpCallback=MusicJsonCallbacktoplist'
}); function callback(data) {
if (window.navigator.onLine) {
songAttr = data;
if (songAttr.data.song.list.length != 0) {
$("table tbody").empty();
$.each(songAttr.data.song.list,
function (e) {
$("table tbody").append("<tr><td>" +
this.songname +
"</td><td>" +
this.singer[0].name +
"</td><td hidden>" +
e +
"</td></tr>");
});
$("table tbody tr").on("dblclick",
function () {
if (!$(this).attr("disabled")) {
songindex = parseInt($(this).find("td").last()[0].innerHTML);
SongIPVkey(parseInt($(this).find("td").last()[0].innerHTML), 1);
RemoveLyricinfo();
}
});
SongIPVkey(0, 1);
} else {
console.log("找不到音乐");
}
} else {
console.log("你没有网络,请求了数据无法返回");
}
} function SongIPVkey(i, z) {
$("table tbody tr").css("background", "");
$("table tbody tr:nth-of-type(" + (i + 1) + ")").css("background", "rgba(204, 204, 204,0.3)");
if (songAttr.data.song.list[i].songid != 0) {
$.ajax({
type: "GET",
dataType: "jsonp",
url:
'https://u.y.qq.com/cgi-bin/musicu.fcg?data={"req":{"module":"CDN.SrfCdnDispatchServer","method":"GetCdnDispatch","param":{"guid":"000000000","calltype":0,"userip":""}},"req_0":{"module":"vkey.GetVkeyServer","method":"CgiGetVkey","param":{"guid":"000000000","songmid":["' +
songAttr.data.song.list[i].songmid +
'"],"songtype":[0],"uin":"0","loginflag":1,"platform":"20"}}}',
success: function (Vkeydata) {
if (window.navigator.onLine) {
songindex = i;
if (Vkeydata.req_0.data.midurlinfo[0].vkey != "") {
GetSong(Vkeydata);
GetSongLyric(i);
GetSongImg(i);
$("h1").html("当前播放 - " + songAttr.data.song.list[i].songname);
} else {
NoCopyright(i, z);
}
} else {
console.log("你没有网络,接收不到返回的数据");
}
},
error: function (e) {
if (e.state == "404") {
SongIPVkey(i, z);
}
}
});
} else {
NoCopyright(i, z);
}
} function GetSong(Songdata) {
audio[0].src = Songdata.req.data.freeflowsip[0] + Songdata.req_0.data.midurlinfo[0].purl;
audio.html("<source src=" + Songdata.req.data.freeflowsip[0] + Songdata.req_0.data.midurlinfo[0].purl + " />");
console.log(audio[0].networkState);
if (audio[0].networkState === 3) {
audio[0].muted = false;
audio[0].play();
PlayMode(3); }
} function GetSongLyric(i) {
$.ajax({
type: "GET",
dataType: "json",
url: "/Index/GetMuiscLyric",
data: {
Url: "https://c.y.qq.com/lyric/fcgi-bin/fcg_query_lyric_new.fcg?-=MusicJsonCallback_lrc&pcachetime=" +
Math.round(new Date()) +
"&songmid=" +
songAttr.data.song.list[i].songmid +
"&g_tk=5381&loginUin=0&hostUin=0&format=json&inCharset=utf8&outCharset=utf-8&notice=0&platform=yqq.json&needNewCode=0",
Filename: songAttr.data.song.list[i].albummid + ".json"
},
success: function (data) { var SongData = JSON.parse(data);
var SongLyric = decodeURIComponent(escape(window.atob(SongData.lyric)));
var SongLyricDOM = $("#SongLyric > div");
SongLyricDOM.children("p").remove();
SongLyric.trim().split('\n').forEach(function (v, i) { var LryTime = v.match(/\[(.*)\]/)[1];
var Lry = v.match(/\](.*)/)[1];
if (VerifySongTime(LryTime)) {
SonglrcAttr.push([SetMSRutrunms(LryTime), Lry]); SongLyricDOM.append("<p data-id=" + i + ">" + Lry + "</p>");
} else {
SonglrcAttr.push([Lry, LryTime]);
SongLyricDOM.append("<p data-id=" + i + ">" + LryTime + "</p>");
} }); }
});
} function GetSongImg(i) { if (i != null) {
if (songAttr.data.song.list[i].albummid !== "") { $("#bg").css("background-image",
"url('https://y.gtimg.cn/music/photo_new/T002R300x300M000" +
songAttr.data.song.list[i].albummid +
".jpg?max_age=2592000')");
$.ajax({
type: "GET",
dataType: "json",
url: "/Index/GetMusicPic",
data: {
Url: "https://y.gtimg.cn/music/photo_new/T002R300x300M000" +
songAttr.data.song.list[i].albummid +
".jpg?max_age=2592000",
Filename: songAttr.data.song.list[i].albummid + ".jpg"
},
success: function (filename) {
if (filename != null) {
var img = document.createElement('img');
img.setAttribute('src', '../Content/MusicPic/' + filename); img.addEventListener('load',
function () {
var vibrant = new Vibrant(img);
var swatches = vibrant.swatches();
if (swatches.Vibrant !== undefined) {
$("body").css("background-color",
"rgba(" +
swatches.Vibrant.rgb[0] +
"," +
swatches.Vibrant.rgb[1] +
"," +
swatches.Vibrant.rgb[2] +
",1)");
}
});
}
}
});
} else {
$("#bg").css("background-image", "url('../Content/MusicPic/NoMusicPic.jpg");
}
}
} function SerchSongOrPlay() {
var SongText = $("#SongText");
if (window.navigator.onLine) {
if (SongText.val().trim() !== "") {
$.ajax({
type: "GET",
dataType: 'jsonp',
url: "https://c.y.qq.com/soso/fcgi-bin/client_search_cp?aggr=1&cr=1&flag_qc=0&p=1&n=10&w=" +
SongText.val().trim() +
""
});
SongText.val("");
} else {
alert("请输入要搜索的歌曲");
return;
}
} else {
alert("你没有网络,数据没发送出去");
} } function NoCopyright(i, z) {
if (z === 1) {
$("h1").html("你搜索的歌没有播放版权!已帮你自动切换下一首");
$("table tbody tr:nth-of-type(" + (i + 1) + ")").css("color", "#aaa");
$("table tbody tr:nth-of-type(" + (i + 1) + ")").attr("disabled", true);
NextSong();
} else {
$("h1").html("你搜索的歌没有播放版权!已帮你自动切换上一首");
$("table tbody tr:nth-of-type(" + (i + 1) + ")").css("color", "#aaa");
$("table tbody tr:nth-of-type(" + (i + 1) + ")").attr("disabled", true);
BackSong();
} } function BackSong() {
RemoveLyricinfo();
if (songAttr.data != undefined) {
if (songindex > 0) {
songindex -= 1;
SongIPVkey(songindex, 0);
} else {
songindex = songAttr.data.song.list.length;
SongIPVkey((songindex - 1), 0);
}
} else {
if (songindex > 0) {
songindex -= 1;
RecommendSongIPVkey(songindex, 0);
} else {
songindex = songAttr.songlist.length;
RecommendSongIPVkey((songindex - 1), 0);
}
}
} function NextSong() {
RemoveLyricinfo(); if (songAttr.data != undefined) {
if ((songindex + 1) < songAttr.data.song.list.length) {
songindex += 1;
SongIPVkey(songindex, 1);
} else {
songindex = 0;
SongIPVkey(songindex, 1);
}
} else {
if ((songindex + 1) < songAttr.songlist.length) {
songindex += 1;
RecommendSongIPVkey(songindex, 1);
} else {
songindex = 0;
RecommendSongIPVkey(songindex, 1);
}
} } function RemoveLyricinfo() {
$("#SongLyric div p").remove();
SonglrcAttr = [];
lycinner = 0;
$("#SongLyric div").css("transform", "translateY(" + lycinner + "px)");
} function PlayMode(i) {
//1:单曲循环 2:列表播放 3:列表循环 4:随机播放
clearInterval(time1);
clearInterval(time2);
clearInterval(time3);
audio[0].loop = false;
if (i === 1) {
audio[0].loop = true;
console.log("当前模式-单曲循环");
} else if (i === 2) {
audio[0].loop = false;
time1 = setInterval(LBPlayItime1, 500);
console.log("当前模式-列表播放");
} else if (i === 3) {
time2 = setInterval(LBPlayItime2, 500);
console.log("当前模式-列表循环");
} else if (i === 4) {
time3 = setInterval(LBPlayItime3, 500);
console.log("当前模式-随机播放");
}
} function LBPlayItime1() {
if (songAttr.data != undefined) {
if (audio[0].ended) {
if ((songindex + 1) < songAttr.data.song.list.length) {
NextSong();
} else {
audio[0].pause();
}
}
} else {
if (audio[0].ended) {
if ((songindex + 1) < songAttr.songlist.length) {
NextSong();
} else {
audio[0].pause();
}
}
} } function LBPlayItime2() {
if (songAttr.data != undefined) {
if (audio[0].ended) {
if ((songindex + 1) < songAttr.data.song.list.length) {
NextSong();
} else {
songindex = 0;
SongIPVkey(songindex, 1);
}
}
} else {
if (audio[0].ended) {
if ((songindex + 1) < songAttr.songlist.length) {
NextSong();
} else {
songindex = 0;
RecommendSongIPVkey(songindex, 1);
}
}
} } function LBPlayItime3() {
if (songAttr.data != undefined) {
if (audio[0].ended) {
songindex = parseInt(Math.random(0, songAttr.data.song.list.length) *
(songAttr.data.song.list.length - 0));
SongIPVkey(songindex, 1);
}
} else {
if (audio[0].ended) {
songindex = parseInt(Math.random(0, songAttr.songlist.length) * (songAttr.songlist.length - 0));
RecommendSongIPVkey(songindex, 1);
}
}
} setInterval(function () {
if (audio[0].readyState === 4) {
$("#SongTime > .SongTime").html("SongTime:" +
SetTimeRutrunMS(audio[0].duration)[0] +
":" +
SetTimeRutrunMS(audio[0].duration)[1]);
$("#SongTime > .PlaySongTime").html("PlaySongTime:" +
SetTimeRutrunMS(audio[0].currentTime)[0] +
":" +
SetTimeRutrunMS(audio[0].currentTime)[1]);
$("#SongProgress").css("width", (audio[0].currentTime / (audio[0].duration / 100)) + "%"); }
},
30); setInterval(function () { var SongLyricp = $('#SongLyric > div > p');
if (!audio[0].paused) {
if (lycinner < SonglrcAttr.length - 1) {
} else {
lycinner += 1;
$("#SongLyric div").css("transform", "translateY(" + (-SongLyricp.height() * lycinner) + "px)");
}
} $("#SongSpeed").change(function () {
audio[0].playbackRate = $(this).val();
});
},
500);
</script>
</body>
</html>

后言

最后就能实现播放了

如果觉得本技术文章对你有帮助请给我点个赞,如果有什么不足的地方,给我提意见,让我加以改进

使用浏览器抓取QQ音乐接口(歌曲篇)的更多相关文章

  1. 使用浏览器抓取QQ音乐接口(排行榜篇)

    前言 最近手头比较空闲,再加上看到其他人的博客都差不多有个类似的播放控件,手就会闲不下来,说干就干,所以我们开始吧! 来到QQ音乐的官网,我们就直奔着目标去,寻找排行榜 我们主要用的是最近比较热的歌, ...

  2. 手把手教你使用Python抓取QQ音乐数据(第二弹)

    [一.项目目标] 通过Python爬取QQ音乐数据(一)我们实现了获取 QQ 音乐指定歌手单曲排行指定页数的歌曲的歌名.专辑名.播放链接. 此次我们在之前的基础上获取QQ音乐指定歌曲的歌词及前15个精 ...

  3. 抓取百度音乐频道歌曲url

    参考了 http://blog.csdn.net/banguijun/article/details/11815263 后写了一个抓取fm音乐url的模块,得到所有频道歌曲的url.缺点是百度会变更u ...

  4. 手把手教你使用Python抓取QQ音乐数据(第一弹)

    [一.项目目标] 获取 QQ 音乐指定歌手单曲排行指定页数的歌曲的歌名.专辑名.播放链接. 由浅入深,层层递进,非常适合刚入门的同学练手. [二.需要的库] 主要涉及的库有:requests.json ...

  5. Python爬虫实战一之爬取QQ音乐

    一.前言   前段时间尝试爬取了网易云音乐的歌曲,这次打算爬取QQ音乐的歌曲信息.网易云音乐歌曲列表是通过iframe展示的,可以借助Selenium获取到iframe的页面元素, 而QQ音乐采用的是 ...

  6. 抓取QQ音乐歌单

    抓取QQ音乐歌单1.通过分析歌曲下载路径来分析所需参数: 通过比较, 得出其中歌曲下载url与参数vkey是可变的,歌曲下载url中可变得值是请求歌单返回的歌曲数据的strMediaMid参数, 而v ...

  7. python3 爬取qq音乐作者所有单曲 并且下载歌曲

    1 import requests import re import json import os # 便于存放作者的姓名 zuozhe = [] headers = {'User-Agent': ' ...

  8. 通过Scrapy抓取QQ空间

    毕业设计题目就是用Scrapy抓取QQ空间的数据,最近毕业设计弄完了,来总结以下: 首先是模拟登录的问题: 由于Tencent对模拟登录比较讨厌,各个防备,而本人能力有限,所以做的最简单的,手动登录后 ...

  9. Python开发爬虫之动态网页抓取篇:爬取博客评论数据——通过Selenium模拟浏览器抓取

    区别于上篇动态网页抓取,这里介绍另一种方法,即使用浏览器渲染引擎.直接用浏览器在显示网页时解析 HTML.应用 CSS 样式并执行 JavaScript 的语句. 这个方法在爬虫过程中会打开一个浏览器 ...

随机推荐

  1. [记录点滴]授人以渔,从Tensorflow找不到dll扩展到如何排查问题

    [记录点滴]授人以渔,从Tensorflow找不到dll扩展到如何排查问题 目录 [记录点滴]授人以渔,从Tensorflow找不到dll扩展到如何排查问题 0x00 摘要 0x01 引言 0x02 ...

  2. Redis基础认识及常用命令使用

    Redis简介 redis是一个key-value存储系统.和Memcached类似,它支持存储的value类型相对更多,包括string(字符串).list(链表).set(集合)和zset(有序集 ...

  3. vue-ajax/axios请求函数封装: axios+promise

    项目文件目录/src/api ajax.js /** * ajax 请求函数模块 * 返回值为promise对象 */ import axios from 'axios' export default ...

  4. 2.BlockingQueue-阻塞式队列

  5. RabbitMQ安装、集群搭建、概念解析

    RabbitMQ安装.集群搭建.概念解析 基本概念 为什么会产生MQ 1.解耦:采用异步方式实现业务需求达到解耦的目的. 2.缓冲流量,削峰填谷: 问:为什么会有流量冲击? 答:采用"直接调 ...

  6. JVM学习目录

    JVM学习目录 JVM的整体结构 1.类加载子系统 类加载子系统 2.运行时数据区 运行时数据区总览 堆.栈.方法区的详细图解 2.1.程序计数器 程序计数器 2.2.本地方法栈 本地方法栈 2.3. ...

  7. JavaScript创建对象的方式汇总

    1.Object构造函数创建 // 1.Object构造函数创建 var Obj = new Object(); Obj.name='saoge'; Obj.say=function(){ conso ...

  8. 微服务实战系列(七)-网关springcloud gateway

    1. 场景描述 springcloud刚推出的时候用的是netflix全家桶,路由用的zuul,但是据说zull1.0在大数据量访问的时候存在较大性能问题,2.0就没集成到springcloud中了, ...

  9. 报表和仪表板在线设计器Stimulsoft Designer 最新版发布

    Stimulsoft Designer是统一的Stimulsoft框架的一部分,该框架包括用于生成报表和分析数据的引擎.报表设计器和查看器. 您可以在计算机上创建报表,继续使用在线设计器在云中对其进行 ...

  10. [vscode直接运行js文件报错]: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.

    报错示例: 报错原因: 在vscode里面编写了一段js代码,使用了import来引入一个函数并调用 代码复现 // inherit() returns a newly created object ...