暂存账号管理
This commit is contained in:
		@@ -16,12 +16,28 @@ Component({
 | 
			
		||||
    park: String,
 | 
			
		||||
    tenement: String,
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  observers: {
 | 
			
		||||
    "name": function(newValue) {
 | 
			
		||||
      const newData = this.data;
 | 
			
		||||
      newData.name = newValue
 | 
			
		||||
      this.setData({ data: newData })
 | 
			
		||||
    },
 | 
			
		||||
    "id": function(newValue) {
 | 
			
		||||
      const newData = this.data;
 | 
			
		||||
      newData.id = newValue
 | 
			
		||||
      this.setData({ data: newData })
 | 
			
		||||
    },
 | 
			
		||||
    "phone": function(newValue) {
 | 
			
		||||
      const newData = this.data;
 | 
			
		||||
      newData.phone = newValue
 | 
			
		||||
      this.setData({ data: newData })
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  /**
 | 
			
		||||
   * 组件的初始数据
 | 
			
		||||
   */
 | 
			
		||||
  data: {
 | 
			
		||||
    data: { name: "", phone: "" }
 | 
			
		||||
    data: { name: "", phone: "", id: "" }
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
@@ -42,6 +58,7 @@ Component({
 | 
			
		||||
      const { code, message } = await createTenementWxUser({ ...data, tenement, park })
 | 
			
		||||
      if (code !== OK) {
 | 
			
		||||
        alertInfo(message)
 | 
			
		||||
        this.triggerEvent("cancel")
 | 
			
		||||
        return;
 | 
			
		||||
      }
 | 
			
		||||
      alertSuccess("操作成功")
 | 
			
		||||
@@ -55,6 +72,9 @@ Component({
 | 
			
		||||
      this.setData({
 | 
			
		||||
        data: newData,
 | 
			
		||||
      })
 | 
			
		||||
    },
 | 
			
		||||
    onCancel() {
 | 
			
		||||
      this.triggerEvent("cancel")
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
})
 | 
			
		||||
@@ -5,6 +5,7 @@
 | 
			
		||||
  show="{{ visible }}"
 | 
			
		||||
  show-cancel-button
 | 
			
		||||
  bind:confirm="onSubmit"
 | 
			
		||||
  bind:cancel="onCancel"
 | 
			
		||||
>
 | 
			
		||||
  <view class="modalContentWrapper">
 | 
			
		||||
    <van-field
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user