vue获取后台计算的倒计时时间并展示

n("div", {staticClass: "topRight"}, [n("div", {staticClass: "toptatus"}, [n("div"), n("div", {staticClass: "statusText"}, [3 == t.typeStatus ? n("span", [t._v("待提货")]) : n("div", [2 == e.status ? n("span", [t._v("待付款")]) : t._e(), 3 == e.status ? n("span", [t._v("待确认")]) : t._e(), 4 == e.status ? n("span", [t._v("待转拍")]) : t._e(), 5 == e.status ? n("span", [t._v("卖家申请帮助中")]) : t._e(), 7 == e.status ? n("span", [t._v("待发货")]) : t._e(), 8 == e.status ? n("span", [t._v("已发货")]) : t._e(), 9 == e.status ? n("span", [t._v("已完成")]) : t._e()])])]), n("div", {staticClass: "orderName textEllipsis"}, [t._v(t._s(e.goods_name))]), n("div", {staticClass: "orderPrice"}, [t._v("¥" + t._s(e.price))]), n("div", {staticClass: "timeWrap"}, [n("div", [t._v("付款倒计时: ")]), n("van-count-down", {
                    attrs: {
                        time: (t._s(e.count_down_time)),
                        format: "HH:mm:ss",
                        if: "count_down_time>0"
                    }
                })])])

获取到后台传来的count_down_time    如何写到attrs 里面?

一、count_down_time如果是时间戳,就写个定时器,每秒count_down_time减1000后生成xx:xx:xx的字符串形式

二、count_down_time如果后台返回的是xx:xx:xx字符串,那就两个方案

a.先转换成时间戳,在进行上面一的操作

b.每秒调一次接口,每次获取到了之后替换上一秒数据(这么写千万别被部门老大发现,被发现了就准备辞职报告吧)

直接定时器倒计时不行吗