setNavigationBarTitle
This commit is contained in:
@@ -66,6 +66,7 @@ export default {
|
||||
},
|
||||
watch: {},
|
||||
onLoad() {
|
||||
uni.setNavigationBarTitle({ title: '居民列表' })
|
||||
this.areaId = this.user.areaId
|
||||
this.getList()
|
||||
},
|
||||
|
||||
@@ -65,6 +65,7 @@ export default {
|
||||
computed: {},
|
||||
watch: {},
|
||||
onLoad(o) {
|
||||
uni.setNavigationBarTitle({ title: '居民档案' })
|
||||
this.id = o.id
|
||||
this.$dict.load('householdRelation', 'fileStatus').then(() => {
|
||||
this.getDetail()
|
||||
|
||||
@@ -121,6 +121,7 @@ export default {
|
||||
computed: {},
|
||||
watch: {},
|
||||
onLoad(o) {
|
||||
uni.setNavigationBarTitle({ title: '家庭成员信息' })
|
||||
this.id = o.id
|
||||
this.$dict.load('householdRelation', 'nation', 'education', 'maritalStatus', 'politicsStatus', 'militaryStatus', 'faithType', 'job').then(() => {
|
||||
this.getDetail()
|
||||
|
||||
@@ -47,6 +47,7 @@ export default {
|
||||
},
|
||||
computed: { ...mapState(['user']) },
|
||||
onLoad(o) {
|
||||
uni.setNavigationBarTitle({ title: '新增小程序公告' })
|
||||
this.id = o.id
|
||||
this.getDetail()
|
||||
},
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<template>
|
||||
<div class="AppUniMsg">
|
||||
<u-tabs :list="tabList" :is-scroll="false" :current="currentTabs" height="96" bg-color="#3975C6"
|
||||
inactive-color="#fff" active-color="#fff" @change="change"></u-tabs>
|
||||
<u-tabs :list="tabList" :is-scroll="false" :current="currentTabs" height="96" bg-color="#3975C6" inactive-color="#fff" active-color="#fff" @change="change"></u-tabs>
|
||||
|
||||
<template v-if="datas.length > 0">
|
||||
<AiCard v-for="(item, i) in datas" :ref="item.id" :key="i" @click.native="toAdd(item, 1)">
|
||||
@@ -21,8 +20,7 @@
|
||||
</div>
|
||||
|
||||
<div class="imgs">
|
||||
<img :src="items.url" alt="" v-for="(items, i) in item.images" :key="i" v-if="i < 3"
|
||||
@click.stop="previewImage(item.images, items.url)"/>
|
||||
<img :src="items.url" alt="" v-for="(items, i) in item.images" :key="i" v-if="i < 3" @click.stop="previewImage(item.images, items.url)" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -32,22 +30,21 @@
|
||||
</template>
|
||||
</AiCard>
|
||||
|
||||
<u-loadmore :status="loadmore" color="#999" font-size="24" margin-top="32" margin-bottom="80"/>
|
||||
<u-loadmore :status="loadmore" color="#999" font-size="24" margin-top="32" margin-bottom="80" />
|
||||
</template>
|
||||
|
||||
<AiEmpty description="暂无数据" v-else></AiEmpty>
|
||||
|
||||
<AiFixedBtn>
|
||||
<div class="addBtn iconfont iconfont-iconfangda" @tap.stop="toAdd()"/>
|
||||
<div class="addBtn iconfont iconfont-iconfangda" @tap.stop="toAdd()" />
|
||||
</AiFixedBtn>
|
||||
|
||||
<u-modal v-model="deletShow" content="您确认要删除该条信息吗?" :show-cancel-button="true" :mask-close-able="true"
|
||||
:show-title="false" @confirm="delet"></u-modal>
|
||||
<u-modal v-model="deletShow" content="您确认要删除该条信息吗?" :show-cancel-button="true" :mask-close-able="true" :show-title="false" @confirm="delet"></u-modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapState} from 'vuex'
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'AppUniMsg',
|
||||
@@ -81,36 +78,35 @@ export default {
|
||||
},
|
||||
watch: {},
|
||||
onLoad() {
|
||||
uni.setNavigationBarTitle({ title: '小程序公告' })
|
||||
this.getList()
|
||||
},
|
||||
onShow() {
|
||||
document.title= "小程序公告"
|
||||
},
|
||||
onShow() {},
|
||||
methods: {
|
||||
getList() {
|
||||
this.$http
|
||||
.post('/app/appmininotice/list', null, {
|
||||
params: {
|
||||
size: this.size,
|
||||
current: this.current,
|
||||
createUserId: this.currentTabs == 1 ? this.user.id : '',
|
||||
},
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code == 0) {
|
||||
this.datas = this.current > 1 ? [...this.datas, ...res.data.records] : res.data.records
|
||||
if (this.datas) {
|
||||
this.datas.map((item) => {
|
||||
if (item.images) {
|
||||
item.images = JSON.parse(item.images || '[]')
|
||||
}
|
||||
return item
|
||||
})
|
||||
}
|
||||
.post('/app/appmininotice/list', null, {
|
||||
params: {
|
||||
size: this.size,
|
||||
current: this.current,
|
||||
createUserId: this.currentTabs == 1 ? this.user.id : '',
|
||||
},
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code == 0) {
|
||||
this.datas = this.current > 1 ? [...this.datas, ...res.data.records] : res.data.records
|
||||
if (this.datas) {
|
||||
this.datas.map((item) => {
|
||||
if (item.images) {
|
||||
item.images = JSON.parse(item.images || '[]')
|
||||
}
|
||||
return item
|
||||
})
|
||||
}
|
||||
|
||||
this.pages = res.data.pages
|
||||
}
|
||||
})
|
||||
this.pages = res.data.pages
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
toAdd(item, type) {
|
||||
@@ -118,13 +114,13 @@ export default {
|
||||
this.$refs?.[item.id]?.[0]?.handleClose()
|
||||
}
|
||||
if (type == '1') {
|
||||
uni.navigateTo({url: `./Detail?id=${item.id}`})
|
||||
uni.navigateTo({ url: `./Detail?id=${item.id}` })
|
||||
}
|
||||
if (type == '2') {
|
||||
uni.navigateTo({url: `./Add?id=${item.id}`})
|
||||
uni.navigateTo({ url: `./Add?id=${item.id}` })
|
||||
}
|
||||
if (type == null) {
|
||||
uni.navigateTo({url: `./Add`})
|
||||
uni.navigateTo({ url: `./Add` })
|
||||
}
|
||||
},
|
||||
|
||||
@@ -150,8 +146,8 @@ export default {
|
||||
|
||||
previewImage(images, img) {
|
||||
uni.previewImage({
|
||||
urls: images.map(v => v.url),
|
||||
current: img
|
||||
urls: images.map((v) => v.url),
|
||||
current: img,
|
||||
})
|
||||
},
|
||||
},
|
||||
|
||||
@@ -33,6 +33,7 @@ export default {
|
||||
computed: {},
|
||||
watch: {},
|
||||
onLoad(o) {
|
||||
uni.setNavigationBarTitle({ title: '公告详情' })
|
||||
this.id = o.id
|
||||
this.getDetail()
|
||||
},
|
||||
@@ -48,10 +49,10 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
previewImage (images, img) {
|
||||
previewImage(images, img) {
|
||||
uni.previewImage({
|
||||
urls: images.map(v => v.url),
|
||||
current: img
|
||||
urls: images.map((v) => v.url),
|
||||
current: img,
|
||||
})
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user