功能完善
This commit is contained in:
@@ -57,7 +57,7 @@
|
||||
</div>
|
||||
<AiEmpty v-if="!list.length"></AiEmpty>
|
||||
</div>
|
||||
<div class="add" hover-class="text-hover" @click="$linkTo('./Add')">
|
||||
<div class="add" hover-class="text-hover" @click="toAdd">
|
||||
<image src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-fatie.png" />
|
||||
</div>
|
||||
<AiLogin ref="login"/>
|
||||
@@ -89,19 +89,25 @@
|
||||
}
|
||||
},
|
||||
|
||||
onLoad() {
|
||||
onLoad () {
|
||||
this.getTopicList()
|
||||
|
||||
uni.$on('updateList', () => {
|
||||
this.changeTab(this.currIndex)
|
||||
})
|
||||
|
||||
if (this.token) {
|
||||
if (!this.token) {
|
||||
this.autoLogin().then(() => {
|
||||
this.getMyPublishCount()
|
||||
})
|
||||
} else {
|
||||
this.getMyPublishCount()
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
...mapActions(['autoLogin']),
|
||||
|
||||
getMyPublishCount () {
|
||||
this.$instance.post(`/app/appneighborhoodassistance/list`, null, {
|
||||
params: {
|
||||
@@ -117,6 +123,12 @@
|
||||
})
|
||||
},
|
||||
|
||||
toAdd () {
|
||||
if (!this.user.AreaId) {
|
||||
this.$linkTo('./Add')
|
||||
}
|
||||
},
|
||||
|
||||
getTopicList () {
|
||||
this.$instance.post(`/app/appneighborhoodassistancetheme/list`, null, {
|
||||
withoutToken: true,
|
||||
@@ -147,8 +159,8 @@
|
||||
|
||||
this.$loading()
|
||||
this.$instance.post(`/app/appneighborhoodassistance/list`, null, {
|
||||
withoutToken: this.token ? false : true,
|
||||
params: {
|
||||
withoutToken: this.token ? false : true,
|
||||
current: this.current,
|
||||
size: 10,
|
||||
visibleRange: this.currIndex === 0 ? 1 : 0
|
||||
@@ -283,20 +295,23 @@
|
||||
.item-imgs {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
|
||||
image {
|
||||
flex: 1;
|
||||
height: 202px;
|
||||
margin-right: 12px;
|
||||
height: 208px;
|
||||
width: 33.33%;
|
||||
padding-right: 12px;
|
||||
margin-bottom: 12px;
|
||||
box-sizing: border-box;
|
||||
|
||||
&:nth-of-type(3n) {
|
||||
margin-right: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
& > p {
|
||||
margin: 24px 0;
|
||||
margin: 12px 0;
|
||||
font-size: 28px;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user