tangning 3 éve
szülő
commit
ed43f489bb
1 módosított fájl, 5 hozzáadás és 7 törlés
  1. 5 7
      pages/room/add.js

+ 5 - 7
pages/room/add.js

@@ -99,7 +99,7 @@ Page({
   },
 
   async getAssistantsList() {
-    let {mobile} = wx.getStorageSync('userinfoDetail')
+    let {userId} = wx.getStorageSync('userinfoDetail')
     try {
       const res = await util.request(api.getAssistants, this.data.fetcherData, 'POST', 'application/json')
       if (res.code === 200) {
@@ -109,8 +109,8 @@ Page({
             assistant.name = assistant.nickname
             assistant.id = assistant.userId
           })
-          this.setData({
-            assistantList: res.data.filter(ele => ele.name !== mobile)
+        this.setData({
+            assistantList: res.data.filter(ele => ele.userId !== userId)
           })
 
         }
@@ -187,7 +187,7 @@ Page({
       const select = this.data.assistantList[index]
       console.log('picker值为', select)
       this.setData({
-        'detail.assistant': select.username,
+        'detail.assistant': select.nickname,
         "detail.assistantUserId": select.userId
       })
     }
@@ -305,9 +305,7 @@ Page({
       // wx.navigateBack({
       //   delta: 0,
       // })
-      wx.navigateTo({
-        url: '/pages/roomManger/roomManger',
-      })
+      wx.navigateBack()
     } else {
       wx.showToast({
         title: res.error || '创建失败!!',