<--url为需要访问的接口地址-->
<span style="display: inline-block;width: 130px;height: 53px;border: 1px solid #D7D7D7;" @click="changeImgCode"><img :src="imgCode" style="width: 100%;height: 100%;cursor: pointer;"/></span>
<script>export default {data() {return {imgCode: 'url'}},methods: {// 点击图片修改图片src changeImgCode() {var num=Math.ceil(Math.random()*10);//生成一个随机数(防止缓存)this.imgCode = "url?" + num;},}}</script>