|
@@ -54,15 +54,10 @@ Page({
|
|
|
that.setData({ memberList })
|
|
|
}
|
|
|
},
|
|
|
- //日期选择器
|
|
|
+ //成立日期选择器
|
|
|
bindDateChange: function (e) {
|
|
|
const that = this;
|
|
|
- that.setData({ "form.date": e.detail.value })
|
|
|
- },
|
|
|
- //时间选择器
|
|
|
- bindTimeChange: function (e) {
|
|
|
- const that = this;
|
|
|
- that.setData({ "form.time": e.detail.value })
|
|
|
+ that.setData({ "form.create_time": e.detail.value })
|
|
|
},
|
|
|
// 提交保存
|
|
|
async toSave(e) {
|
|
@@ -79,9 +74,6 @@ Page({
|
|
|
parmas.member = that.data.memberList
|
|
|
parmas.number = that.data.memberList.length.toString()
|
|
|
parmas.logo = that.data.imgList
|
|
|
- parmas.create_time = parmas.date + ' ' + parmas.time
|
|
|
- delete parmas.date
|
|
|
- delete parmas.time
|
|
|
if (form._id) res = await app.$api(`team/${form._id}`, 'POST', parmas);
|
|
|
else res = await app.$api('team', 'POST', parmas);
|
|
|
if (res.errcode == '0') {
|
|
@@ -122,7 +114,10 @@ Page({
|
|
|
if (res.errcode == '0') that.setData({ typeList: res.data })
|
|
|
// 成员
|
|
|
res = await app.$api('user', 'GET', { status: '1', type: '0' })
|
|
|
- if (res.errcode == '0') that.setData({ userList: res.data })
|
|
|
+ if (res.errcode == '0') {
|
|
|
+ for (const val of res.data) if (!val.name) val.name = '暂无';
|
|
|
+ that.setData({ userList: res.data })
|
|
|
+ }
|
|
|
},
|
|
|
search() {
|
|
|
const that = this;
|