//config.js中的内容如下
export const host = 'http://daxue.xxx.com'
export const apiUrl = host + '/api/v1/'
export const version = new Array(
{hbuild:'2.8.11.20200907', name:'1.2.0', code:20091706}
);
module.exports = {
host,
apiUrl,
version
}
vue页面代码:
import lineNav from '@/components/lineNav/lineNav.vue'
import storage from '../../common/storage.js'
import config from '../../common/config.js'
export default {
components:{ lineNav },
data() {
return {
version:{
name: '0.0.0',
code:'000000'
}
};
},
onLoad() {
let versions = config.version;
console.log(versions);
this.version = versions[versions.length-1];
}
}