删除控制

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" />
<span>返回</span>
</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" />
<span>删除</span>
</div>
@@ -24,7 +24,7 @@
</template>
<script>
import {mapActions} from 'vuex'
import { mapActions, mapState } from 'vuex'
export default {
name: 'Photo',
@@ -35,16 +35,22 @@
img: '',
id: '',
isShow: false,
pageShow: false
pageShow: false,
createUserId: ''
}
},
computed: {
...mapState(['user'])
},
onLoad (query) {
this.id = query.id
this.$loading()
this.$http.post(`/api/appalbumphoto/queryDetailById?id=${query.id}`).then(res => {
if (res.code == 0) {
this.img = res.data.photoUrl
this.createUserId = res.data.createUserId
}
this.$nextTick(() => {

View File

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