删除控制

This commit is contained in:
yanran200730
2022-06-02 15:47:15 +08:00
parent 75832e6b0a
commit 4895449771
2 changed files with 10 additions and 4 deletions

View File

@@ -14,7 +14,7 @@
<image src="./images/fanhui-black.png" /> <image src="./images/fanhui-black.png" />
<span>返回</span> <span>返回</span>
</div> </div>
<div class="btn-item" hover-class="bg-hover" @click="remove"> <div class="btn-item" hover-class="bg-hover" v-if="createUserId === user.wxUserId || user.adminAuthType === '1'" @click="remove">
<image src="./images/remove-black.png" /> <image src="./images/remove-black.png" />
<span>删除</span> <span>删除</span>
</div> </div>
@@ -24,7 +24,7 @@
</template> </template>
<script> <script>
import {mapActions} from 'vuex' import { mapActions, mapState } from 'vuex'
export default { export default {
name: 'Photo', name: 'Photo',
@@ -35,16 +35,22 @@
img: '', img: '',
id: '', id: '',
isShow: false, isShow: false,
pageShow: false pageShow: false,
createUserId: ''
} }
}, },
computed: {
...mapState(['user'])
},
onLoad (query) { onLoad (query) {
this.id = query.id this.id = query.id
this.$loading() this.$loading()
this.$http.post(`/api/appalbumphoto/queryDetailById?id=${query.id}`).then(res => { this.$http.post(`/api/appalbumphoto/queryDetailById?id=${query.id}`).then(res => {
if (res.code == 0) { if (res.code == 0) {
this.img = res.data.photoUrl this.img = res.data.photoUrl
this.createUserId = res.data.createUserId
} }
this.$nextTick(() => { this.$nextTick(() => {

View File

@@ -102,6 +102,7 @@
msgInfo: {} msgInfo: {}
} }
}, },
computed: { computed: {
...mapState(['user']), ...mapState(['user']),
@@ -186,7 +187,6 @@
} }
} }
this.msgInfo.msg = msg this.msgInfo.msg = msg
console.log(msg)
} }
} }
}) })