上传头像等

master
yujialong 2 years ago
parent 9bcc0a80ef
commit 085c8683f9
  1. 14
      order/ordered/ordered.vue
  2. 15
      pages/person/person.vue

@ -100,6 +100,10 @@
{ {
name: '数据产品', name: '数据产品',
id: 3 id: 3
},
{
name: '职站增值模块',
id: 4
} }
], ],
searchTimer: null, searchTimer: null,
@ -143,6 +147,7 @@
const { tabs } = this const { tabs } = this
data.map(e => { data.map(e => {
const list = e.startAndEndTimeList const list = e.startAndEndTimeList
if (list && list.length) {
let connect = true // let connect = true //
list.map((n, i) => { list.map((n, i) => {
// //
@ -150,7 +155,7 @@
if (new Date(n.startTime).getTime() - 86400000 !== new Date(list[i - 1].endTime).getTime()) connect = false if (new Date(n.startTime).getTime() - 86400000 !== new Date(list[i - 1].endTime).getTime()) connect = false
} }
}) })
// // //
const now = Date.now() const now = Date.now()
if (now < list[0].startTime) { if (now < list[0].startTime) {
e.startTime = list[0].startTime e.startTime = list[0].startTime
@ -175,13 +180,15 @@
e.status = '生效中' e.status = '生效中'
e.orderEnable = n.isEnable e.orderEnable = n.isEnable
break break
} else if (i && now > new Date(list[i - 1].endTime).getTime() && now < new Date(n.startTime).getTime()) { } else if (i && list[i - 1] && now > new Date(list[i - 1].endTime).getTime() && now < new Date(n.startTime).getTime()) {
// //
e.startTime = n.startTime e.startTime = n.startTime
e.endTime = n.endTime e.endTime = n.endTime
e.status = '未生效' e.status = '未生效'
e.orderEnable = n.isEnable e.orderEnable = n.isEnable
break break
} else {
e.status = '已过期'
} }
} }
} }
@ -190,9 +197,10 @@
date.setHours(0) date.setHours(0)
date.setMinutes(0) date.setMinutes(0)
date.setSeconds(0) date.setSeconds(0)
e.startAndEndTime = e.startTime + ' ~ ' + e.endTime if (e.startTime) e.startAndEndTime = e.startTime + ' ~ ' + e.endTime
// 1 0 // 1 0
e.isEnable = (e.status === '已过期' || !e.orderEnable) ? '禁用' : '启用' e.isEnable = (e.status === '已过期' || !e.orderEnable) ? '禁用' : '启用'
}
}) })
this.list = data this.list = data
this.listAll = data this.listAll = data

@ -159,9 +159,20 @@
}, },
// //
onChooseAvatar(e) { onChooseAvatar(e) {
this.avatar = e.detail.avatarUrl uni.uploadFile({
updateAvatars(e.detail.avatarUrl).then(res => {}).catch(e => {}) url: 'https://huorantech.cn/nakadai/nakadai/oss/fileUpload',
filePath: e.detail.avatarUrl,
name: 'file',
header: {
token: uni.getStorageSync('token'),
},
formData: {},
success: ({ data }) => {
updateAvatars(JSON.parse(data).filesResult.fileUrl).then(res => {
this.getInfo() this.getInfo()
}).catch(e => {})
}
})
}, },
// //
toSet() { toSet() {

Loading…
Cancel
Save