This commit is contained in:
liuye
2022-01-22 10:47:14 +08:00
parent b9728e577f
commit 9142bc1c6a
2 changed files with 32 additions and 2 deletions

View File

@@ -102,8 +102,32 @@ export default {
if(!this.form.girdName){
return this.$u.toast('请输入网格名称')
}
var girdMemberManageList = []
if(this.form.girdMemberManageList && this.form.girdMemberManageList.length) {
girdMemberManageList = this.form.girdMemberManageList.map((item) => {
return {
wxUserId: item.id,
phone: item.mobile,
photo: item.avatar,
name: item.name
}
})
}
var girdMemberList = []
if(this.form.girdMemberList && this.form.girdMemberList.length) {
girdMemberList = this.form.girdMemberList.map((item) => {
return {
wxUserId: item.id,
phone: item.mobile,
photo: item.avatar,
name: item.name
}
})
}
this.$http.post(`/app/appgirdinfo/addOrUpdateByEw`, this.form).then((res) => {
this.$http.post(`/app/appgirdinfo/addOrUpdateByEw`, {...this.form, girdMemberManageList, girdMemberList}).then((res) => {
if (res.code == 0) {
this.$u.toast('提交成功')
uni.$emit('update')

View File

@@ -46,15 +46,21 @@ export default {
},
onLoad() {
this.selectUserList = uni.getStorageSync('selectUserList')
this.selectUserList.map((item) => {
item.id =item.wxUserId
item.mobile = item.phone
item.avatar = item.photo
})
this.getList()
},
methods: {
getListInit() {
this.userList = []
this.current = 1
this.getList()
},
getList() {
this.$http.post(`/app/appgirdmemberinfo/list?name=${this.name}&current=${this.current}&size=20`).then((res) => {
this.$http.post(`/app/wxcp/wxuser/list?name=${this.name}&current=${this.current}&size=20`).then((res) => {
if (res?.data) {
res.data.records.map((item) => {
item.isChecked = false