【招生小程序】 修复# 首页:1、招生老师添加进展以及转化完成后页面跳转后不刷新的问题;2、线索详情是否转化成功字段值无效

master
kaeery 2025-03-11 12:55:32 +08:00
parent b3100f0425
commit 9bf6f3a837
7 changed files with 43 additions and 22 deletions

View File

@ -141,8 +141,8 @@ const handleSubmit = () => {
} }
await apiCompleteCluse(data) await apiCompleteCluse(data)
toast('转化完成') toast('转化完成')
uni.$emit('completeClue')
uni.navigateBack() uni.navigateBack()
uni.$emit('refreshPage')
} catch (error) {} } catch (error) {}
} }
}) })

View File

@ -115,8 +115,10 @@ const handleSubmit = () => {
} }
await apiAddCluseProgress(data) await apiAddCluseProgress(data)
toast('添加进展成功') toast('添加进展成功')
uni.$emit('refreshPage') setTimeout(() => {
uni.navigateBack() uni.navigateBack()
}, 300)
uni.$emit('addProgress')
} catch (error) {} } catch (error) {}
} }
}) })

View File

@ -64,6 +64,12 @@ const labelStyle = computed(() => {
const handleSwitchChange = (value: number) => { const handleSwitchChange = (value: number) => {
emit('update:modelValue', value) emit('update:modelValue', value)
} }
watch(
() => props.modelValue,
val => {
innerValue.value = val
}
)
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -92,20 +92,20 @@ const activeRoleId = computed(() => {
const newGroupList = ref(props.groupList) const newGroupList = ref(props.groupList)
const originGroupList = [ const originGroupList = [
{ title: '联系客服', value: 'customer', isLink: false }, // { title: '', value: 'customer', isLink: false },
{ // {
title: '隐私协议', // title: '',
value: '', // value: '',
isLink: true, // isLink: true,
url: `/bundle/pages/agreement/index?type=${AgreementEnum.PRIVACY}` // url: `/bundle/pages/agreement/index?type=${AgreementEnum.PRIVACY}`
}, // },
{ // {
title: '用户注册协议', // title: '',
value: '', // value: '',
isLink: true, // isLink: true,
border: false, // border: false,
url: `/bundle/pages/agreement/index?type=${AgreementEnum.SERVICE}` // url: `/bundle/pages/agreement/index?type=${AgreementEnum.SERVICE}`
} // }
] ]
const parseGroupList = computed(() => [...newGroupList.value, ...originGroupList]) const parseGroupList = computed(() => [...newGroupList.value, ...originGroupList])

View File

@ -23,6 +23,7 @@
v-model="item.value" v-model="item.value"
class="c-textarea" class="c-textarea"
placeholder="请输入" placeholder="请输入"
maxlength="-1"
></u-textarea> ></u-textarea>
</view> </view>
</view> </view>

View File

@ -88,6 +88,7 @@ const handleConfirm = async () => {
} }
// //
const fetchSummaryTemplate = async () => { const fetchSummaryTemplate = async () => {
templateInfo.value.templateFormList = []
loading.value = true loading.value = true
try { try {
const { id: postId } = curRole.value const { id: postId } = curRole.value
@ -99,6 +100,7 @@ const fetchSummaryTemplate = async () => {
loading.value = false loading.value = false
} }
const fetchSummaryDetail = async () => { const fetchSummaryDetail = async () => {
templateInfo.value.templateFormList = []
try { try {
const { id: postId } = curRole.value const { id: postId } = curRole.value
const params = { const params = {

View File

@ -43,12 +43,13 @@
<script setup lang="ts"> <script setup lang="ts">
import { useZPaging } from '@/hooks/useZPaging' import { useZPaging } from '@/hooks/useZPaging'
import { ref, onMounted, shallowRef, computed } from 'vue' import { ref, onMounted, shallowRef, computed, onUnmounted } from 'vue'
import { debounce } from 'lodash-es' import { debounce } from 'lodash-es'
import clueCard from '@/components/widgets/recruitsale/clue-card.vue' import clueCard from '@/components/widgets/recruitsale/clue-card.vue'
import { apiCluseList, apiEditRemark } from '@/api/clue' import { apiCluseList, apiEditRemark } from '@/api/clue'
import { converStatusEnum } from '@/enums' import { converStatusEnum } from '@/enums'
import { toast } from '@/utils/util' import { toast } from '@/utils/util'
import { onLoad, onUnload } from '@dcloudio/uni-app'
const tabs = shallowRef([ const tabs = shallowRef([
{ name: '待领取', value: converStatusEnum.UN_RECEIVED }, { name: '待领取', value: converStatusEnum.UN_RECEIVED },
@ -94,10 +95,19 @@ const handleConfirm = async () => {
refresh(queryParams.value) refresh(queryParams.value)
} catch (error) {} } catch (error) {}
} }
onMounted(() => { function addProgress() {
uni.$on('refreshPage', () => { refresh(queryParams.value)
refresh(queryParams.value) }
}) function completeClue() {
refresh(queryParams.value)
}
onLoad(() => {
uni.$on('addProgress', addProgress)
uni.$on('completeClue', completeClue)
})
onUnload(() => {
uni.$off('addProgress', addProgress)
uni.$off('completeClue', completeClue)
}) })
const searchChange = debounce(() => { const searchChange = debounce(() => {
refresh(queryParams.value) refresh(queryParams.value)