import datetime
#//获取当前时间以后的多少分钟的时间
m = 4
date = ((datetime.datetime.now()+datetime.timedelta(minutes=m)).strftime("%Y-%m-%d %H:%M:%S"))
# print date
minue = date
print(minue)
payload={"name":"拍卖",
"logo":"",
"activeStart":"开始时间",
"activeEnd":"",
"countDownTime":60,
"failCountDownTime":60,
"marketId":70,
"type":"NORMAL",
"vehicleState":"USED",
"active":"true",
"customBid":"false"}
payload={"name":f'{minue},
"logo":"",
"activeStart":f'{minue},
"activeEnd":"",
"countDownTime":60,
"failCountDownTime":60,
"marketId":70,
"type":"NORMAL",
"vehicleState":"USED",
"active":"true",
"customBid":"false"}
用f-string传入字符串变量
payload['activeStart'] = minue
不知道为什么总有个报错在这里,我还一直以为不行