# fastchar-appjs
### 快速搭建VUE项目工具类的基本库，主要用于每个功能页面独立生成html，不使用vue单页面功能。

## Install
```
npm i fastchar-appjs
```

## Package.json配置

```
"dependencies": {
    "fastchar-appjs": "^1.2.42", //具体版本以npm库更新为准
}
```


### 引用库之后，在项目中导入即可，例如：
```
import {FastServer} from "fastchar-appjs";

FastServer.Croshe.get("接口地址", {
  orderId: 1
}).then(result => {
  if (result.isSuccess()) {
    console.error(result.getData());
  } else {
    console.error(result.getMessage());
  }
});
```


### 项目npm地址
[https://www.npmjs.com/package/fastchar-appjs](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: "项目名称",
    projectPagesDir: ["src/user_pages"],
    projectOutDir: "dist",
    autoCreateProjectIndexPage: false,
    autoCreatePageConfigFile: 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;
```
