返回调整
This commit is contained in:
@@ -20,12 +20,13 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapMutations(['initWaterMarker', 'logout', 'getConfig']),
|
...mapMutations(['initWaterMarker', 'logout', 'getConfig']),
|
||||||
goto(params) {
|
goto(params, cb) {
|
||||||
let {path: url, query: {app}} = this.$route
|
let {path: url, query: {app}} = this.$route
|
||||||
params.query = {app, ...(params.query || {})}
|
params.query = {app, ...(params.query || {})}
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url, success: () => {
|
url, success: () => {
|
||||||
this.$router.push({...params})
|
this.$router.push({...params})
|
||||||
|
cb && cb()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<ai-fixed-btn>
|
<ai-fixed-btn>
|
||||||
<div class="addBtn iconfont iconfont-iconfangda" @tap="gotoAdd()"/>
|
<div class="addBtn iconfont iconfont-iconfangda" @tap="gotoAdd()"/>
|
||||||
|
<ai-back btn/>
|
||||||
</ai-fixed-btn>
|
</ai-fixed-btn>
|
||||||
</template>
|
</template>
|
||||||
<interview-detail v-else/>
|
<interview-detail v-else/>
|
||||||
@@ -46,6 +47,7 @@ import AiImage from "../../components/AiImage";
|
|||||||
import AiDate from "../../components/AiDate";
|
import AiDate from "../../components/AiDate";
|
||||||
import AiFixedBtn from "../../components/AiFixedBtn";
|
import AiFixedBtn from "../../components/AiFixedBtn";
|
||||||
import InterviewDetail from "./interviewDetail";
|
import InterviewDetail from "./interviewDetail";
|
||||||
|
import AiBack from "../../components/AiBack";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "AppInterview",
|
name: "AppInterview",
|
||||||
@@ -53,7 +55,7 @@ export default {
|
|||||||
inject: {
|
inject: {
|
||||||
root: {}
|
root: {}
|
||||||
},
|
},
|
||||||
components: {InterviewDetail, AiFixedBtn, AiDate, AiImage, AiCard, AiTopFixed, AiSelect},
|
components: {AiBack, InterviewDetail, AiFixedBtn, AiDate, AiImage, AiCard, AiTopFixed, AiSelect},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
search: {title: ""},
|
search: {title: ""},
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ import AiBack from "../../components/AiBack";
|
|||||||
export default {
|
export default {
|
||||||
name: 'interviewDetail',
|
name: 'interviewDetail',
|
||||||
components: {AiBack, AiTextarea, AiImage, AiUploader},
|
components: {AiBack, AiTextarea, AiImage, AiUploader},
|
||||||
|
inject: {root: {}},
|
||||||
computed: {
|
computed: {
|
||||||
isEdit() {
|
isEdit() {
|
||||||
let flag = this.$route.query?.detail != 1
|
let flag = this.$route.query?.detail != 1
|
||||||
@@ -73,7 +74,7 @@ export default {
|
|||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res?.code == 0) {
|
if (res?.code == 0) {
|
||||||
this.$u.toast("提交成功!")
|
this.$u.toast("提交成功!")
|
||||||
uni.navigateBack()
|
this.root.goto({query: {}})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<ai-fixed-btn v-if="!isTopPage||custom">
|
<div v-if="btn" class="AiBack" @click.stop="back">
|
||||||
|
<img :src="$cdn + 'home/back.png'" alt="">
|
||||||
|
<text>返回</text>
|
||||||
|
</div>
|
||||||
|
<ai-fixed-btn v-else-if="!isTopPage||custom">
|
||||||
<div class="AiBack" @click.stop="back">
|
<div class="AiBack" @click.stop="back">
|
||||||
<img :src="$cdn + 'home/back.png'" alt="">
|
<img :src="$cdn + 'home/back.png'" alt="">
|
||||||
<text>返回</text>
|
<text>返回</text>
|
||||||
@@ -12,6 +16,7 @@ import AiFixedBtn from "./AiFixedBtn";
|
|||||||
export default {
|
export default {
|
||||||
name: "AiBack",
|
name: "AiBack",
|
||||||
components: {AiFixedBtn},
|
components: {AiFixedBtn},
|
||||||
|
inject: {root: {}},
|
||||||
props: {
|
props: {
|
||||||
delta: {
|
delta: {
|
||||||
type: Number,
|
type: Number,
|
||||||
@@ -28,6 +33,7 @@ export default {
|
|||||||
},
|
},
|
||||||
custom: Boolean,
|
custom: Boolean,
|
||||||
visible: Boolean,
|
visible: Boolean,
|
||||||
|
btn: Boolean
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -36,21 +42,15 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
back() {
|
back() {
|
||||||
if (this.visible)
|
if (this.visible) {
|
||||||
return this.$parent.$emit(this.eventName, this.data)
|
return this.$parent.$emit(this.eventName, this.data)
|
||||||
|
} else if (this.custom) {
|
||||||
if (this.custom) {
|
|
||||||
this.$emit("back")
|
this.$emit("back")
|
||||||
} else uni.navigateBack({
|
} else if (this.custom) {
|
||||||
delta: this.delta,
|
} else this.root.goto({}, () => {
|
||||||
success: () => {
|
|
||||||
if (this.eventName != '') {
|
if (this.eventName != '') {
|
||||||
uni.$emit(this.eventName, this.data)
|
uni.$emit(this.eventName, this.data)
|
||||||
}
|
}
|
||||||
},
|
|
||||||
fail: (err) => {
|
|
||||||
console.error(err)
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
onShow() {
|
||||||
this.getApps()
|
this.getApps()
|
||||||
this.result = {
|
this.result = {
|
||||||
tips: "欢迎进入开发应用",
|
tips: "欢迎进入开发应用",
|
||||||
|
|||||||
Reference in New Issue
Block a user