页面接口推介
This commit is contained in:
@@ -76,6 +76,8 @@
|
||||
</template>
|
||||
<script>
|
||||
import list from '../../common/js/list'
|
||||
import { deleteEngineering } from '../../common/api/engineering'
|
||||
|
||||
export default {
|
||||
mixins: [list],
|
||||
data() {
|
||||
@@ -95,6 +97,10 @@ export default {
|
||||
iconPath: '/static/share.png',
|
||||
text: '编辑',
|
||||
},
|
||||
{
|
||||
iconPath: '/static/delate.png',
|
||||
text: '删除',
|
||||
},
|
||||
],
|
||||
navHeight: 0,
|
||||
navMenuActive: 0,
|
||||
@@ -113,6 +119,21 @@ export default {
|
||||
uni.navigateTo({
|
||||
url: '/pages/engineering/new?engineering=' + encodeURIComponent(JSON.stringify(this.engineering)),
|
||||
})
|
||||
} else if (e.item.text == '删除') {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '删除工程后不可恢复,是否继续?',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
deleteEngineering(this.engineering.id).then((res) => {
|
||||
this.$util.toast('删除成功')
|
||||
this.$util.refreshPrePage()
|
||||
})
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消')
|
||||
}
|
||||
},
|
||||
})
|
||||
}
|
||||
},
|
||||
navMenuClick(index) {
|
||||
|
||||
Reference in New Issue
Block a user