Commit 6377c87c by 张立顺

Merge branch 'SAAS+V5.8.5' of http://192.168.3.233:8090/saas_plus/regional-assis…

…tant into SAAS+V5.8.5
2 parents 17eae35d e7bb4954
...@@ -73,7 +73,7 @@ Page({ ...@@ -73,7 +73,7 @@ Page({
this.setData({ loading: true }); this.setData({ loading: true });
wx.showLoading({ title: "加载中", mask: true }); wx.showLoading({ title: "加载中", mask: true });
try { try {
const res = await api.getTaskCenterDetail({ id: this.taskId }); const res = await api.getTaskCenterDetail({ taskId: this.taskId });
if (res?.code !== "0" && res?.code !== 0) { if (res?.code !== "0" && res?.code !== 0) {
wx.showToast({ wx.showToast({
title: res?.message || "加载失败", title: res?.message || "加载失败",
...@@ -223,7 +223,11 @@ Page({ ...@@ -223,7 +223,11 @@ Page({
}, },
onBack() { onBack() {
if (getCurrentPages()?.length > 1) {
wx.navigateBack(); wx.navigateBack();
} else {
wx.switchTab({url: '/pages/tab/matters/matters'})
}
}, },
onReplyInput(e) { onReplyInput(e) {
...@@ -721,7 +725,11 @@ Page({ ...@@ -721,7 +725,11 @@ Page({
this.notifyRefresh(); this.notifyRefresh();
setTimeout(() => { setTimeout(() => {
if (getCurrentPages()?.length > 1) {
wx.navigateBack(); wx.navigateBack();
} else {
wx.switchTab({url: '/pages/tab/matters/matters'})
}
}, 1000); }, 1000);
}, },
......
...@@ -93,7 +93,7 @@ Page({ ...@@ -93,7 +93,7 @@ Page({
onLoad(options) { onLoad(options) {
if (options?.id) { if (options?.id) {
this.getDetail(options.id) this.getDetail(options.id, options.matterId)
} }
this.getDictList('teaching_method_1') this.getDictList('teaching_method_1')
this.getDictList('teaching_method_2') this.getDictList('teaching_method_2')
...@@ -104,7 +104,11 @@ Page({ ...@@ -104,7 +104,11 @@ Page({
}, },
back() { back() {
wx.navigateBack() if (getCurrentPages()?.length > 1) {
wx.navigateBack();
} else {
wx.switchTab({url: '/pages/tab/matters/matters'})
}
}, },
getDictList(typeCode) { getDictList(typeCode) {
mentoringApi.getMentorDictList({typeCode, businessCode: 'supervisor'}).then(res => { mentoringApi.getMentorDictList({typeCode, businessCode: 'supervisor'}).then(res => {
...@@ -170,9 +174,9 @@ Page({ ...@@ -170,9 +174,9 @@ Page({
}) })
}, },
getDetail(id) { getDetail(id, matterId) {
let { formItems} = this.data let { formItems} = this.data
mentoringApi.getTaskCenterDetail({id}).then(res => { mentoringApi.getTaskCenterDetail({taskId: id}).then(res => {
let { code, data, message } = res let { code, data, message } = res
if (code == 0) { if (code == 0) {
data = { data = {
...@@ -193,7 +197,7 @@ Page({ ...@@ -193,7 +197,7 @@ Page({
} }
this.setData({ this.setData({
assigneeDetailLength, assigneeDetailLength,
id, id: matterId,
isCompleted: data?.status == 1, isCompleted: data?.status == 1,
lockedFields, lockedFields,
}, () => { }, () => {
......
...@@ -355,7 +355,7 @@ Page({ ...@@ -355,7 +355,7 @@ Page({
if (!item?.id) return; if (!item?.id) return;
this._openingDetail = true; this._openingDetail = true;
wx.navigateTo({ wx.navigateTo({
url: item.taskType == "spec-coach" ? `/pages/specialMentoring/specialMentoring?id=${item.id}` : `/pages/mattersHandle/mattersHandle?id=${item.id}`, url: item.taskType == "spec-coach" ? `/pages/specialMentoring/specialMentoring?id=${item.taskCenterId}&matterId=${item.id}` : `/pages/mattersHandle/mattersHandle?id=${item.taskCenterId}&matterId=${item.id}`,
events: { events: {
refreshList: () => { refreshList: () => {
this._pendingRefresh = true; this._pendingRefresh = true;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!