问题反馈修改
This commit is contained in:
@@ -19,7 +19,8 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
engineeringList: []
|
||||
engineeringList: [],
|
||||
options: {}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -42,7 +43,8 @@ export default {
|
||||
return result
|
||||
},
|
||||
},
|
||||
onLoad() {
|
||||
onLoad(options) {
|
||||
this.options = options
|
||||
this.engineeringList = uni.getStorageSync('engineeringList')
|
||||
},
|
||||
onShow() {
|
||||
@@ -51,7 +53,7 @@ export default {
|
||||
})
|
||||
},
|
||||
onNavigationBarButtonTap(e) {
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pages/engineering/new',
|
||||
})
|
||||
},
|
||||
@@ -59,7 +61,12 @@ export default {
|
||||
confirm(e) {
|
||||
console.log(e)
|
||||
let engineering = this.engineeringList.find((item) => item.name === e.item.name)
|
||||
uni.setStorageSync('engineering', engineering)
|
||||
if (this.options.from === 'projectNew') {
|
||||
// 创建项目的时候选择工程 用完即删
|
||||
uni.setStorageSync('projectSelectEngineering', engineering)
|
||||
} else {
|
||||
uni.setStorageSync('engineering', engineering)
|
||||
}
|
||||
uni.navigateBack()
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user