wx.switchTap跳转后,小程序突然就自己关闭了,怎么回事
发布于 6 年前 作者 msun 1604 次浏览 来自 问答

只要在那个流程里面,用了switchTap。小程序就会崩溃,我再其他页面用就不会

2 回复
  api.addStationToProcess({
      method: 'post',
      data: {
          startIndex: parseFloat(startIndex),
          endIndex: parseFloat(endIndex),
          startTime: list[startIndex].leaveTime,
          endTime: list[endIndex].arriveTime,
          coseTime: coseTime,
          stationCount: stationCount,
          processId: processId,
          startStation: list[startIndex].stationName,
          endStation: list[endIndex].stationName,
      },
      success: (res) => {
          console.log(res);
          wx.showToast({
              title: '添加成功'
          })
          if(res.data.status == 0) {
              if(travelType == '1') {
                  // wx.navigateTo({
                  //  url: '/pages/index/travelAdd/travelAdd'
                  // })
wx.switchTab({
  url: '/pages/index/index/index'
})

开局一句话,后面全靠猜,没有截图,没有代码,怎么帮你

回到顶部