From 997c152b4f5c2841b799ae80df618d517e53d546 Mon Sep 17 00:00:00 2001 From: = <=> Date: Mon, 11 Jan 2021 20:02:24 +0800 Subject: [PATCH] add phonenum --- APP/static/js/wsy.js | 5 +++++ APP/templates/square.html | 25 +++++++++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/APP/static/js/wsy.js b/APP/static/js/wsy.js index 86d9935..e1a8d2b 100644 --- a/APP/static/js/wsy.js +++ b/APP/static/js/wsy.js @@ -144,6 +144,7 @@ async function checkLike(list) { var dt = new FormData(); var obj = list.textList[i]; dt.append('collection_id', obj['id']); + dt.append('phonenum', phonenum); sendRequest('collection/isLike', dt, function (data) { obj['isLike'] = data.isLike; Vue.set(list.textList, obj['order'], obj); @@ -261,6 +262,7 @@ var page = new Vue({ Vue.set(this.textList, order, obj); var data = new FormData(); data.append('collection_id', obj['id']); + data.append('phonenum', phonenum); sendRequest('collection/like', data, function () { ; }); }, unlike: function (order) { @@ -270,6 +272,7 @@ var page = new Vue({ Vue.set(this.textList, order, obj); var data = new FormData(); data.append('collection_id', obj['id']); + data.append('phonenum', phonenum); sendRequest('collection/unlike', data, function () { ; }); } } @@ -311,6 +314,7 @@ var recommend = new Vue({ Vue.set(this.textList, order, obj); var data = new FormData(); data.append('collection_id', obj['id']); + data.append('phonenum', phonenum); sendRequest('collection/like', data, function () { ; }); }, unlike: function (order) { @@ -320,6 +324,7 @@ var recommend = new Vue({ Vue.set(this.textList, order, obj); var data = new FormData(); data.append('collection_id', obj['id']); + data.append('phonenum', phonenum); sendRequest('collection/unlike', data, function () { ; }); } } diff --git a/APP/templates/square.html b/APP/templates/square.html index b1c563e..b50d686 100644 --- a/APP/templates/square.html +++ b/APP/templates/square.html @@ -17,6 +17,31 @@