上传头像等

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

@ -159,9 +159,20 @@
},
//
onChooseAvatar(e) {
this.avatar = e.detail.avatarUrl
updateAvatars(e.detail.avatarUrl).then(res => {}).catch(e => {})
uni.uploadFile({
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()
}).catch(e => {})
}
})
},
//
toSet() {

Loading…
Cancel
Save