|
@@ -2,19 +2,14 @@
|
|
|
|
|
|
<view>
|
|
<view>
|
|
<view class="rnwdList">
|
|
<view class="rnwdList">
|
|
-
|
|
|
|
-
|
|
|
|
<ul >
|
|
<ul >
|
|
<li >
|
|
<li >
|
|
-
|
|
|
|
<h3>{{matterlist.title }}</h3>
|
|
<h3>{{matterlist.title }}</h3>
|
|
<p>{{ matterlist.content }}</p>
|
|
<p>{{ matterlist.content }}</p>
|
|
<image class="uni-header-image" :src="'http://127.0.0.1:8080'+matterlist.picture"></image>
|
|
<image class="uni-header-image" :src="'http://127.0.0.1:8080'+matterlist.picture"></image>
|
|
<button @click="toggleFavorite">{{ isFavorite ? '❤️' : '🤍' }}</button>
|
|
<button @click="toggleFavorite">{{ isFavorite ? '❤️' : '🤍' }}</button>
|
|
</li>
|
|
</li>
|
|
</ul>
|
|
</ul>
|
|
-
|
|
|
|
-
|
|
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
@@ -42,6 +37,7 @@
|
|
getList(){
|
|
getList(){
|
|
const _that = this;
|
|
const _that = this;
|
|
const id = uni.getStorageSync('id');
|
|
const id = uni.getStorageSync('id');
|
|
|
|
+
|
|
getDept(id).then(res =>{
|
|
getDept(id).then(res =>{
|
|
_that.matterlist = res.data
|
|
_that.matterlist = res.data
|
|
this.checkFavorite();
|
|
this.checkFavorite();
|
|
@@ -62,13 +58,13 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
|
|
- checkFavorite() {
|
|
|
|
- const userId = getApp().globalData.userId
|
|
|
|
- getsc(userId).then(res => {
|
|
|
|
- this.isFavorite = res.data;
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
|
|
+ checkFavorite() {
|
|
|
|
+ const userId = getApp().globalData.userId
|
|
|
|
+ const matterId = this.matterlist.id
|
|
|
|
+ getsc({ matterId , userId }).then(res => {
|
|
|
|
+ this.isFavorite = res.data;
|
|
|
|
+ });
|
|
|
|
+ },
|
|
},
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|