|
@@ -187,15 +187,16 @@ export default {
|
|
|
// 操作:收藏
|
|
|
clickCollection() {
|
|
|
let path = {
|
|
|
- userName: this.user.userName
|
|
|
+ userName: this.user.userInfo.userName
|
|
|
};
|
|
|
let params = {
|
|
|
id: this.materialId
|
|
|
};
|
|
|
this.$_http
|
|
|
- .get(this.$pathParams(this.$_API.JTXT_POST_FAVORITE_MATERIALID, path), {
|
|
|
+ .post(
|
|
|
+ this.$pathParams(this.$_API.JTXT_POST_FAVORITE_MATERIALID, path),
|
|
|
params
|
|
|
- })
|
|
|
+ )
|
|
|
.then(res => {
|
|
|
console.log("--收藏--", res.data);
|
|
|
this.isCollected = true;
|
|
@@ -207,9 +208,9 @@ export default {
|
|
|
// 操作:移除收藏
|
|
|
clickRemoveCollection() {
|
|
|
let path = {
|
|
|
- userName: this.user.userName
|
|
|
+ userName: this.user.userInfo.userName
|
|
|
};
|
|
|
- let params = {
|
|
|
+ let data = {
|
|
|
id: this.materialId
|
|
|
};
|
|
|
this.$_http
|
|
@@ -219,7 +220,7 @@ export default {
|
|
|
path
|
|
|
),
|
|
|
{
|
|
|
- params
|
|
|
+ data: data
|
|
|
}
|
|
|
)
|
|
|
.then(res => {
|