This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 190-210元 发票计算 | |
((count)=>{ | |
let arr = []; | |
for(let i=0;i<count;i++){ | |
arr.push( | |
Number((Math.random()*20).toFixed(0))+190, | |
); | |
} | |
console.log(arr); | |
let sum = arr.reduce((acc,curr)=>{return acc+curr},0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
// 需要在App.vue上面绑定一个点击事件用来刷新时间 | |
import { logout } from "@/api/index"; | |
export default { | |
data() { | |
return { | |
nowtime: null, | |
timeend: null, | |
interval: null | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const findFile = url => { | |
return axiosBase.get(`path/toUrl?url=${url}`, { | |
responseType: "blob" | |
}); | |
}; | |
findFile(url, name) { | |
findFile(url).then(res => { | |
const resUrl = window.URL.createObjectURL(new Blob([res.data])); | |
const link = document.createElement("a"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const roll = () => { | |
return (Math.random()*10).toFixed(0) % 2 === 0?"go":"stop"; | |
} | |
console.log(roll()); |