|
@@ -11,8 +11,8 @@ Page({
|
|
|
frameStyle: { useTop: true, name: '维护公告信息', leftArrow: true, useBar: false },
|
|
|
// 主体高度
|
|
|
infoHeight: '',
|
|
|
- form: { file: [], type: '0' },
|
|
|
- // 头像
|
|
|
+ form: {},
|
|
|
+ // 文件
|
|
|
file: [],
|
|
|
typeList: notice_type,
|
|
|
//用户列表
|
|
@@ -45,6 +45,12 @@ Page({
|
|
|
let arr = list.filter((i, index) => index != e.detail.index)
|
|
|
that.setData({ file: arr })
|
|
|
},
|
|
|
+ // 选择发送时间
|
|
|
+ dateChange: function (e) {
|
|
|
+ const that = this;
|
|
|
+ const { value } = e.detail;
|
|
|
+ that.setData({ 'form.send_time': value })
|
|
|
+ },
|
|
|
// 选择用户类别
|
|
|
typeChange: function (e) {
|
|
|
const that = this;
|
|
@@ -52,12 +58,6 @@ Page({
|
|
|
let data = that.data.typeList[index];
|
|
|
if (data) that.setData({ 'form.type': data.label });
|
|
|
},
|
|
|
- // 选择发送时间
|
|
|
- dateChange: function (e) {
|
|
|
- const that = this;
|
|
|
- const { value } = e.detail;
|
|
|
- that.setData({ 'form.send_time': value })
|
|
|
- },
|
|
|
// 选择接收人
|
|
|
userAdd() {
|
|
|
const that = this;
|
|
@@ -75,11 +75,6 @@ Page({
|
|
|
}
|
|
|
that.setData({ receive_user: receive_user })
|
|
|
},
|
|
|
- // 提交保存
|
|
|
- userSubmit: function () {
|
|
|
- const that = this;
|
|
|
- that.toClose()
|
|
|
- },
|
|
|
// 关闭弹框
|
|
|
toClose() {
|
|
|
const that = this;
|
|
@@ -120,13 +115,12 @@ Page({
|
|
|
wx.getStorage({
|
|
|
key: 'token',
|
|
|
success: async res => {
|
|
|
- let data = res.data;
|
|
|
- if (data) {
|
|
|
- that.setData({ 'form.send_id': data._id });
|
|
|
- that.setData({ 'form.send_name': data.nickname });
|
|
|
+ that.setData({ 'form': { send_id: res.data.id, send_name: res.data.nickname, file: [] } });
|
|
|
+ const arr = await app.$get(`/courtAdmin/api/user`, { status: '1' });
|
|
|
+ if (arr.errcode == '0') {
|
|
|
+ let p1 = arr.data.filter((i) => i.type != '0')
|
|
|
+ that.setData({ userList: p1 })
|
|
|
}
|
|
|
- const arr = await app.$get(`/courtAdmin/api/user`, { status: '1', type: '2' });
|
|
|
- if (arr.errcode == '0') that.setData({ userList: arr.data })
|
|
|
},
|
|
|
fail: res => {
|
|
|
wx.redirectTo({ url: '/pages/index/index', })
|