zs 2 years ago
parent
commit
d17822f40d
1 changed files with 5 additions and 1 deletions
  1. 5 1
      pages/address/add.js

+ 5 - 1
pages/address/add.js

@@ -75,7 +75,11 @@ Page({
                 else { wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 }) }
                 if (that.data.id) {
                     arr = await app.$get(`/newCourt/api/ground/${that.data.id}`);
-                    if (arr.errcode == '0') { that.setData({ form: arr.data }) }
+                    if (arr.errcode == '0') {
+                        let user = that.data.refereeList.find((i) => i.openid == arr.data.referee_id);
+                        if (user) arr.data.referee_name = user.name;
+                        that.setData({ form: arr.data });
+                    }
                 }
             },
             fail: async res => {