浏览代码

fix:订单评论后跳转待评论页面不刷新问题

sunshine1130 4 年之前
父节点
当前提交
49937528b4
共有 2 个文件被更改,包括 8 次插入5 次删除
  1. 1 1
      pages/commentinfo/commentinfo.js
  2. 7 4
      pages/personorder/personorder.js

+ 1 - 1
pages/commentinfo/commentinfo.js

@@ -130,7 +130,7 @@ Page({
         confirmText: "确定",
         success(res) {
           wx.switchTab({
-            url: '../personorder/personorder',
+            url: '../personorder/personorder?activeTab=2',
           })
         }
       })

+ 7 - 4
pages/personorder/personorder.js

@@ -32,7 +32,7 @@ Page({
   /**
    * 生命周期函数--监听页面加载
    */
-  onLoad: async function () {
+  onLoad: async function (options) {
     console.log(this)
     const isAuth = await app.isAuth()
     if (!isAuth) {
@@ -40,6 +40,8 @@ Page({
         url: '/pages/prompt/prompt?page=' + this.route,
       })
     }
+    
+   
   },
 
   // 获取全部列表
@@ -200,9 +202,6 @@ Page({
   showOrderInfo: async function (e) {
 
     var orderId = e.currentTarget.dataset.orderid;
-    console.log(orderId)
-    var status = e.currentTarget.dataset.status;
-    var writeStatus = e.currentTarget.dataset.writestatus;
     wx.navigateTo({
       url: '../order/order?id=' + orderId,
     })
@@ -220,6 +219,10 @@ Page({
    */
   onShow: async function () {
     await this.getAllOrderList()
+    let activeTab = this.data.activeTab;
+    if(activeTab==2){
+      await this.getcommentOffOrderList()
+    }
   },
 
   /**