|
@@ -1015,17 +1015,17 @@ export default {
|
|
|
console.log(arr, arr[i].jian_ce_xiang_mu_id)
|
|
console.log(arr, arr[i].jian_ce_xiang_mu_id)
|
|
|
const sql = `select bao_gao_zhou_qi_g from t_mjjcnlfw where FIND_IN_SET(id_,'${arr[i].jian_ce_xiang_mu_id}')`
|
|
const sql = `select bao_gao_zhou_qi_g from t_mjjcnlfw where FIND_IN_SET(id_,'${arr[i].jian_ce_xiang_mu_id}')`
|
|
|
var maxAge
|
|
var maxAge
|
|
|
- await repostCurd('sql', sql).then((res) => {
|
|
|
|
|
|
|
+ await repostCurd('sql', sql).then(async (res) => {
|
|
|
const { data = [] } = res.variables || {}
|
|
const { data = [] } = res.variables || {}
|
|
|
- maxAge = data.reduce((max, person) => {
|
|
|
|
|
|
|
+ maxAge = await data.reduce(async (max, person) => {
|
|
|
// 将age从字符串转换为数字
|
|
// 将age从字符串转换为数字
|
|
|
- maxAge = parseInt(person.bao_gao_zhou_qi_g)
|
|
|
|
|
|
|
+ var maxNum = await parseInt(person.bao_gao_zhou_qi_g)
|
|
|
// 使用三元表达式比较并更新最大值
|
|
// 使用三元表达式比较并更新最大值
|
|
|
- return maxAge > max ? maxAge : max
|
|
|
|
|
|
|
+ return maxNum > max ? maxNum : max
|
|
|
}, 0)
|
|
}, 0)
|
|
|
const currentDate = new Date()
|
|
const currentDate = new Date()
|
|
|
|
|
|
|
|
- // 创建一个新的日期对象,表示当前日期加上3天
|
|
|
|
|
|
|
+ // 创建一个新的日期对象,表示当前日期加上3天
|
|
|
const futureDate = new Date(currentDate)
|
|
const futureDate = new Date(currentDate)
|
|
|
|
|
|
|
|
futureDate.setDate(currentDate.getDate() + Number(maxAge))
|
|
futureDate.setDate(currentDate.getDate() + Number(maxAge))
|