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

@@ -103,7 +103,31 @@ export default {
return this.$u.toast('请输入网格名称') return this.$u.toast('请输入网格名称')
} }
this.$http.post(`/app/appgirdinfo/addOrUpdateByEw`, this.form).then((res) => { 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, girdMemberManageList, girdMemberList}).then((res) => {
if (res.code == 0) { if (res.code == 0) {
this.$u.toast('提交成功') this.$u.toast('提交成功')
uni.$emit('update') uni.$emit('update')

View File

@@ -46,15 +46,21 @@ export default {
}, },
onLoad() { onLoad() {
this.selectUserList = uni.getStorageSync('selectUserList') this.selectUserList = uni.getStorageSync('selectUserList')
this.selectUserList.map((item) => {
item.id =item.wxUserId
item.mobile = item.phone
item.avatar = item.photo
})
this.getList() this.getList()
}, },
methods: { methods: {
getListInit() { getListInit() {
this.userList = [] this.userList = []
this.current = 1 this.current = 1
this.getList()
}, },
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) { if (res?.data) {
res.data.records.map((item) => { res.data.records.map((item) => {
item.isChecked = false item.isChecked = false