Install
fastchar-appjs
安徽创息软件公司对接Android和IOS原生APP、对接后台接口、快速搭建VUE项目工具类的基本库!
Install
npm i fastchar-appjs
Package.json配置
"dependencies": {
"fastchar-appjs": "^1.2.42", //具体版本以npm库更新为准
}
引用库之后,在项目中导入即可,例如:
import {FastNative} from "fastchar-appjs";
FastNative.CrosheApp.selectMap((success, message, data) => {
if (success) {
this.mapLocation = data;
}
});
项目npm地址
https://www.npmjs.com/package/fastchar-appjs
引用项目后,新建 vue.config.js 文件,然后快速配置安徽创息VUE项目代码,复制如下代码:
const FastVue = require("fastchar-appjs/src/cjs/FastVue");
const result = FastVue.System.getDefaultVueConfig(__dirname, {
projectTitle: "项目名称",
createIndexPage: true,
createConfigFile: true,
finalParams: {
mobile: false,
client: "vue",
userId: FastVue.System.isVueCliServerBuild() ? undefined : 3
},
globalConfig: {
mainUrl: "http://192.168.0.105:8888/test/"
},
injectJsFiles: ["src/js/fast-security.js", "src/js/iconfont.js"],
clientStrict: true
});
module.exports = result;