本文是一个以字符串长度3的倍数进行符号插入,产生间隔
let getnum = "";
let sumnum = res.data.sum;
getnum = sumnum + "";
let arrays = getnum.split("").reverse();
for (let i = arrays.length - 1; i >= 0; i--) {
if ((i + 1) % 3 == 0 && i != arrays.length - 1) {
s += "." + "<span>" + arrays[i] + "</span>";
} else {
s += "<span>" + arrays[i] + "</span>";
}
}
this.appdiv = s + "次";