【招生小程序】 修复# 首页: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)
toast('转化完成')
uni.$emit('completeClue')
uni.navigateBack()
uni.$emit('refreshPage')
} catch (error) {}
}
})

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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