Showing
1 changed file
with
5 additions
and
5 deletions
@@ -96,7 +96,7 @@ const pageData = (req, res, next) => { | @@ -96,7 +96,7 @@ const pageData = (req, res, next) => { | ||
96 | isTab = req.query.isTab || false, | 96 | isTab = req.query.isTab || false, |
97 | showAuthor = false; | 97 | showAuthor = false; |
98 | 98 | ||
99 | - let uid = req.user.uid, | 99 | + let uid = req.user.uid || req.query.uid, |
100 | udid = req.sessionID; | 100 | udid = req.sessionID; |
101 | 101 | ||
102 | if (!stringProcess.isNumeric(sortId)) { | 102 | if (!stringProcess.isNumeric(sortId)) { |
@@ -154,7 +154,7 @@ const index = (req, res, next) => { | @@ -154,7 +154,7 @@ const index = (req, res, next) => { | ||
154 | }; | 154 | }; |
155 | 155 | ||
156 | let param = { | 156 | let param = { |
157 | - uid: req.user.uid, | 157 | + uid: req.user.uid || req.query.uid, |
158 | 158 | ||
159 | udid: req.user.udid, | 159 | udid: req.user.udid, |
160 | 160 | ||
@@ -192,7 +192,7 @@ const tag = (req, res, next) => { | @@ -192,7 +192,7 @@ const tag = (req, res, next) => { | ||
192 | tag: req.query.query, | 192 | tag: req.query.query, |
193 | isApp: req.query.app_version || req.query.appVersion || false, | 193 | isApp: req.query.app_version || req.query.appVersion || false, |
194 | gender: req.query.gender || '1,3', | 194 | gender: req.query.gender || '1,3', |
195 | - uid: req.user.uid || 0, | 195 | + uid: req.user.uid || req.query.uid || 0, |
196 | udid: req.sessionID, | 196 | udid: req.sessionID, |
197 | type: req.query.type || 0 | 197 | type: req.query.type || 0 |
198 | 198 | ||
@@ -223,7 +223,7 @@ const listDynamicData = (req, res) => { | @@ -223,7 +223,7 @@ const listDynamicData = (req, res) => { | ||
223 | type = req.query.type; | 223 | type = req.query.type; |
224 | 224 | ||
225 | if (req.user.uid) { | 225 | if (req.user.uid) { |
226 | - other.uid = req.user.uid; | 226 | + other.uid = req.user.uid || req.query.uid; |
227 | } | 227 | } |
228 | 228 | ||
229 | if (query) { | 229 | if (query) { |
@@ -247,7 +247,7 @@ const listDynamicData = (req, res) => { | @@ -247,7 +247,7 @@ const listDynamicData = (req, res) => { | ||
247 | const detailDynamicData = (req, res) => { | 247 | const detailDynamicData = (req, res) => { |
248 | 248 | ||
249 | let id = req.query.id, | 249 | let id = req.query.id, |
250 | - uid = req.user.uid, | 250 | + uid = req.user.uid || req.query.uid, |
251 | udid = req.sessionID; | 251 | udid = req.sessionID; |
252 | 252 | ||
253 | indexModel.getDynamicDataById(id, uid, udid).then((ret) => { | 253 | indexModel.getDynamicDataById(id, uid, udid).then((ret) => { |
-
Please register or login to post a comment