|
@@ -90,7 +90,13 @@ export const apiCountAudioClick = params=>{
|
|
"source_agent": 1, 1:小程序,2:小程序 pc 3:弘则研究公众号,4:web pc
|
|
"source_agent": 1, 1:小程序,2:小程序 pc 3:弘则研究公众号,4:web pc
|
|
*/
|
|
*/
|
|
export const apiSetLike = params => {
|
|
export const apiSetLike = params => {
|
|
- return post('/community/set_like_or_tease',{ source_agent:1,...params })
|
|
|
|
|
|
+ let source_agent=2
|
|
|
|
+ if(window.__wxjs_environment === 'miniprogram'){
|
|
|
|
+ source_agent=2
|
|
|
|
+ }else{
|
|
|
|
+ source_agent=4
|
|
|
|
+ }
|
|
|
|
+ return post('/community/set_like_or_tease',{ source_agent,...params })
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -102,7 +108,13 @@ export const apiSetLike = params => {
|
|
"source_agent": 1,
|
|
"source_agent": 1,
|
|
*/
|
|
*/
|
|
export const apiPublishComment = params => {
|
|
export const apiPublishComment = params => {
|
|
-return post('/community/comment',{ source_agent:1,...params })
|
|
|
|
|
|
+ let source_agent=2
|
|
|
|
+ if(window.__wxjs_environment === 'miniprogram'){
|
|
|
|
+ source_agent=2
|
|
|
|
+ }else{
|
|
|
|
+ source_agent=4
|
|
|
|
+ }
|
|
|
|
+ return post('/community/comment',{ source_agent,...params })
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -118,7 +130,7 @@ return get('/community/need_anonymous_user_tips')
|
|
* @param {*} params
|
|
* @param {*} params
|
|
*/
|
|
*/
|
|
export const apiCanelNickTip = params => {
|
|
export const apiCanelNickTip = params => {
|
|
-return post('/community/set_anonymous_user_tips')
|
|
|
|
|
|
+ return post('/community/set_anonymous_user_tips')
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -126,7 +138,7 @@ return post('/community/set_anonymous_user_tips')
|
|
* @param {community_question_comment_id} params
|
|
* @param {community_question_comment_id} params
|
|
*/
|
|
*/
|
|
export const apiDelComment = params => {
|
|
export const apiDelComment = params => {
|
|
-return post('/community/comment/delete',params)
|
|
|
|
|
|
+ return post('/community/comment/delete',params)
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -137,7 +149,7 @@ return post('/community/comment/delete',params)
|
|
* page_size
|
|
* page_size
|
|
*/
|
|
*/
|
|
export const apiHotComment = params => {
|
|
export const apiHotComment = params => {
|
|
-return get('/community/comment/hot',params)
|
|
|
|
|
|
+ return get('/community/comment/hot',params)
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -148,5 +160,5 @@ return get('/community/comment/hot',params)
|
|
* page_size
|
|
* page_size
|
|
*/
|
|
*/
|
|
export const apiMyComment = params => {
|
|
export const apiMyComment = params => {
|
|
-return get('/community/comment/my',params)
|
|
|
|
|
|
+ return get('/community/comment/my',params)
|
|
}
|
|
}
|