|
@@ -41,24 +41,36 @@
|
|
|
|
|
|
|
|
|
</view>
|
|
|
- <view class="tag"
|
|
|
- v-if="!item.activityId"
|
|
|
- :class="item.activityId" >
|
|
|
- <text class="status" style="color: red;" v-if="item.status!=1">[{{item.status==0?'审核中':''}}{{item.status==2?'审核不通过':''}}]</text>
|
|
|
-
|
|
|
- </view>
|
|
|
- <view class="tag" v-else
|
|
|
- :class="item.activityId" @click="issueMethod(item.activityId)" >
|
|
|
- <text class="status" style="color: red;" v-if="item.status!=1">[{{item.status==0?'审核中':''}}{{item.status==2?'审核不通过':''}}]</text>
|
|
|
- <template>
|
|
|
+ <view class="tagMain">
|
|
|
+ <view class="tag"
|
|
|
+ v-if="!item.activityId"
|
|
|
+ :class="item.activityId" >
|
|
|
+ <text class="status" style="color: red;" v-if="item.status!=1">[{{item.status==0?'审核中':''}}{{item.status==2?'审核不通过':''}}]</text>
|
|
|
|
|
|
- <text class="symbol">#</text>
|
|
|
- <text class="text">{{item.activityName}}</text>
|
|
|
- <text class="icon" >
|
|
|
- <u-icon size="28" color="#cccccc" name="arrow-right"></u-icon>
|
|
|
- </text>
|
|
|
- </template>
|
|
|
+ </view>
|
|
|
+ <view class="tag" v-else
|
|
|
+ :class="item.activityId" @click="issueMethod(item.activityId)" >
|
|
|
+ <text class="status" style="color: red;" v-if="item.status!=1">[{{item.status==0?'审核中':''}}{{item.status==2?'审核不通过':''}}]</text>
|
|
|
+ <template>
|
|
|
+
|
|
|
+ <text class="symbol">#</text>
|
|
|
+ <text class="text">{{item.activityName}}</text>
|
|
|
+ <text class="icon" >
|
|
|
+ <u-icon size="28" color="#cccccc" name="arrow-right"></u-icon>
|
|
|
+ </text>
|
|
|
+ </template>
|
|
|
+ </view>
|
|
|
+ <view class="like" @click="changeLikes(item)" :class="{
|
|
|
+ red:item.isLike
|
|
|
+ }"
|
|
|
+
|
|
|
+ ><view class="icon">
|
|
|
+ <u-icon name="thumb-up" size="38"></u-icon>
|
|
|
+ </view><view class="number">
|
|
|
+ {{item.likesNum}}</view></view>
|
|
|
</view>
|
|
|
+
|
|
|
+
|
|
|
</view>
|
|
|
|
|
|
|
|
@@ -108,6 +120,41 @@
|
|
|
|
|
|
},
|
|
|
methods: {
|
|
|
+ changeLikes(info){
|
|
|
+ var userInfo=this.carhelp.getPersonInfo()
|
|
|
+ if(!userInfo){
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ if(!info.isLike){
|
|
|
+ uni.showLoading({
|
|
|
+ title: "加载中",
|
|
|
+ mask: true,
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
+ API.changeLikes({
|
|
|
+ shareId:info.id
|
|
|
+ }).then((res) => {
|
|
|
+ info.isLike=true;
|
|
|
+ info.likesNum++;
|
|
|
+ uni.hideLoading();
|
|
|
+ //this.getInfo(true)
|
|
|
+ }).catch(error => {
|
|
|
+ uni.showToast({
|
|
|
+ title: error,
|
|
|
+ icon: "none"
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ uni.showToast({
|
|
|
+ title: "您已经点过赞了",
|
|
|
+ icon: "none"
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
issueMethod(id){
|
|
|
|
|
|
var userInfo=this.carhelp.getPersonInfo()
|
|
@@ -140,12 +187,15 @@
|
|
|
previewImage(img,i) {
|
|
|
let imgs = [];
|
|
|
img.forEach(it=>{
|
|
|
- imgs.push(it.url)
|
|
|
+ if(it.isPic){
|
|
|
+ imgs.push(it.url)
|
|
|
+ }
|
|
|
})
|
|
|
|
|
|
|
|
|
uni.previewImage({
|
|
|
- indicator:"default",
|
|
|
+ //indicator:"default",
|
|
|
+ indicator:"number",
|
|
|
loop:true,
|
|
|
urls: imgs,
|
|
|
current: i
|
|
@@ -180,13 +230,15 @@
|
|
|
API.pageList(this.listForm).then((res) => {
|
|
|
this.carhelp.set("addShare",0);
|
|
|
uni.hideLoading();
|
|
|
- //this.list=response.data.data
|
|
|
+ var list=res.data.data;
|
|
|
+
|
|
|
+
|
|
|
if(this.listForm.pageIndex==1){
|
|
|
- this.list = res.data.data;
|
|
|
+ this.list = list;
|
|
|
}else{
|
|
|
this.list = [
|
|
|
...this.list,
|
|
|
- ...res.data.data
|
|
|
+ ...list
|
|
|
];
|
|
|
}
|
|
|
this.recordsTotal = res.data.recordsTotal;
|
|
@@ -214,6 +266,17 @@
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
+ .red{
|
|
|
+ color: red !important;
|
|
|
+ }
|
|
|
+ .like{
|
|
|
+ margin-top: 16rpx;
|
|
|
+ line-height: 24px;
|
|
|
+ display: flex;
|
|
|
+ .number{
|
|
|
+ margin-left: 16rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
page {
|
|
|
background-color: #fff;
|
|
|
padding-bottom: 100px;
|
|
@@ -308,21 +371,25 @@ font-family: 'Regular';
|
|
|
border-radius: 8px;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- .tag {
|
|
|
- margin-top: 16rpx;
|
|
|
- line-height: 24px;
|
|
|
-
|
|
|
- .symbol {
|
|
|
- color: rgba(31, 74, 153, 100);
|
|
|
- font-size: 16px
|
|
|
- }
|
|
|
-
|
|
|
- .text {
|
|
|
- color: rgba(31, 74, 153, 1);
|
|
|
- margin-left: 14rpx;
|
|
|
+ .tagMain{
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ .tag {
|
|
|
+ margin-top: 16rpx;
|
|
|
+ line-height: 24px;
|
|
|
+
|
|
|
+ .symbol {
|
|
|
+ color: rgba(31, 74, 153, 100);
|
|
|
+ font-size: 16px
|
|
|
+ }
|
|
|
+
|
|
|
+ .text {
|
|
|
+ color: rgba(31, 74, 153, 1);
|
|
|
+ margin-left: 14rpx;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
|
|
|
}
|