html如下:
<div class="home">
<tbody>
<tr v-for="(item, index) in bargainGoods" :key="index">
<td v-text="item.down + Djs_timeList(item.countDown)"></td>
</tr>
</tbody>
</div>
js如下:
export default {
data() {
return {
bargainGoods: [],
total: 0,
page: 1,
serverTime: 0,
timer: ""
// hostUrl: this.$hostUrl
};
},
//用于数据初始化
created: function() {
// 获取数据
this.goods();
// 获取服务器时间
this.findServiceTime();
},
methods: {
goods: function() {
var _this = this;
_this.$axios({
url: "goods/pageGoods",
data: {
current: -1,
activityStatus: "",
limit: -1,
status: "SALE"
},
success: response => {
_this.b