在线报修修改选择项目返回问题
This commit is contained in:
@@ -91,16 +91,24 @@ const currentProjectList = computed(() => {
|
||||
const selectCategory = (item) => {
|
||||
activeCategory.value = item.id
|
||||
}
|
||||
|
||||
// 选择项目并跳转到维修项目填写页
|
||||
// 选择项目并返回到维修项目填写页
|
||||
const selectProject = (item) => {
|
||||
// 获取分类名称
|
||||
const categoryName = categoryList.value.find(c => c.id === item.categoryId)?.projectName
|
||||
// 跳转并传参
|
||||
uni.navigateTo({
|
||||
url: `/pageSubPack/online-repair/publicRepair?category=${categoryName}&project=${item.projectName}&projectId=${item.id}`
|
||||
const categoryName = categoryList.value.find(c => c.id === item.categoryId)?.projectName || '';
|
||||
|
||||
// 用全局事件发送参数
|
||||
uni.$emit('selectRepairProject', {
|
||||
category: categoryName, // 分类名
|
||||
project: item.projectName, // 项目名
|
||||
projectId: item.id // 项目ID
|
||||
})
|
||||
|
||||
// 返回上一页
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
Reference in New Issue
Block a user