mirror of
https://github.com/Jonnyan404/memos-bber.git
synced 2026-04-25 03:58:37 +09:00
memos
This commit is contained in:
+2
-2
@@ -180,7 +180,7 @@ $('#tags').click(function () {
|
||||
if (info.status) {
|
||||
var tagUrl = info.apiUrl.replace(/api\/memo/,'api/tag')
|
||||
var tagDom = ""
|
||||
$.get(tagUrl,function(data,status){
|
||||
$.get(tagUrl,function(data){
|
||||
var arrData = data.data
|
||||
$.each(arrData, function(i,obj){
|
||||
tagDom += '<span class="item-container">#'+obj+'</span>'
|
||||
@@ -213,7 +213,7 @@ $('#random').click(function () {
|
||||
$("#randomlist").html('').hide()
|
||||
var nowTag = $("textarea[name=text]").val().replace(/#([^\s#]+)/,'$1') ;
|
||||
if( $("#taglist").is(':visible') && nowTag){
|
||||
var tagUrl = info.apiUrl.replace(/api\/memo.*/,'api/memo/all?tag='+nowTag)
|
||||
var tagUrl = info.apiUrl+'&rowStatus=NORMAL&tag='+nowTag
|
||||
$.get(tagUrl,function(data){
|
||||
let randomNum = Math.floor(Math.random() * (data.data.length));
|
||||
var randomData = data.data[randomNum]
|
||||
|
||||
Reference in New Issue
Block a user