Commit 55532aac by zhangxw

修改

1 parent 4a964b25
...@@ -59,13 +59,13 @@ Page({ ...@@ -59,13 +59,13 @@ Page({
}, },
onLoad(options) { onLoad(options) {
const taskId = options?.taskId; const id = options?.idd;
if (!taskId) { if (!id) {
wx.showToast({ title: "缺少任务信息", icon: "none" }); wx.showToast({ title: "缺少任务信息", icon: "none" });
setTimeout(() => wx.navigateBack(), 1500); setTimeout(() => wx.navigateBack(), 1500);
return; return;
} }
this.taskId = taskId; this.taskId = id;
this.loadDetail(); this.loadDetail();
}, },
...@@ -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({ taskId: this.taskId }); const res = await api.getTaskCenterDetail({ taskId: this.id });
if (res?.code !== "0" && res?.code !== 0) { if (res?.code !== "0" && res?.code !== 0) {
wx.showToast({ wx.showToast({
title: res?.message || "加载失败", title: res?.message || "加载失败",
......
...@@ -92,8 +92,8 @@ Page({ ...@@ -92,8 +92,8 @@ Page({
}, },
onLoad(options) { onLoad(options) {
if (options?.taskId && options?.id) { if (options?.matterId && options?.id) {
this.getDetail(options.taskId, 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')
...@@ -170,9 +170,9 @@ Page({ ...@@ -170,9 +170,9 @@ Page({
}) })
}, },
getDetail(taskId, id) { getDetail(id, matterId) {
let { formItems} = this.data let { formItems} = this.data
mentoringApi.getTaskCenterDetail({taskId: taskId}).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 +193,7 @@ Page({ ...@@ -193,7 +193,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?taskId=${item.taskCenterId}&id=${item.id}` : `/pages/mattersHandle/mattersHandle?taskId=${item.taskCenterId}&id=${item.id}`, url: item.taskType == "spec-coach" ? `/pages/specialMentoring/specialMentoring?id=${item.taskCenterId}&matterId=${item.id}` : `/pages/mattersHandle/mattersHandle?idd=${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!