1、index.html中引入百度地图
<script type="text/javascript" src="http://pv.sohu.com/cityjson?ie=utf-8"></script>
2、在webpack.base.conf.js里面 配置
module.exports = { context: path.resolve(__dirname, ‘../‘), entry: { app: ‘./src/main.js‘ }, externals: { "returnCitySN": "returnCitySN" }, }
3、引入使用
import returnCitySN from ‘returnCitySN‘ // 新浪 获取设备IP let equipmentIp = returnCitySN.cip
原文地址:https://www.cnblogs.com/jackjo/p/9706985.html
时间: 2024-10-31 01:36:06