简易的git命令行入门教程:

Git 全局设置:

git config --global user.name "your name"
git config --global user.email "your email"

创建 git 仓库:

  mkdir xxxx_front
  cd xxxx_front
  git init 
  touch README.md
  git add README.md
  git commit -m "first commit"
  git remote add origin https://gitee.com/****/****.git
  git push -u origin "master"

已有仓库?

cd xxxx_front
git remote add origin https://gitee.com/****/****.git
git push -u origin "master"

1、pom.xml修改如下:

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <configuration>
                <mainClass>com.App</mainClass>
                <layout>ZIP</layout>
                <includes>
                    <include>
                        <groupId>nothing</groupId>
                        <artifactId>nothing</artifactId>
                    </include>
                </includes>
            </configuration>
            <executions>
                <execution>
                    <goals>
                        <goal>repackage</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    <plugins>
<build>

2、然后使用cmd命令获得分离出来的lib

mvn dependency:copy-dependencies -DoutputDirectory=F:\lib  -DincludeScope=runtime

3、运行java

java -Dloader.path=/path/to/lib -jar /path/to/springboot-0.0.1-SNAPSHOT.jar

1、请求

axios.post('/controller/login.php', {
        username: this.form.username,
        password: this.form.password
     })
     .then(function (response) {
        console.log(response);
     })
     .catch(function (error) {

     });

2、使用下边的方式接收参数,不生效,接收到的为空

<?php 
public function process(): void
{
   $username = $_POST['username']; // does not work
}

3、解决方法,使用php://input

public function process(): void
{
    $request_body = file_get_contents('php://input');
    $data = json_decode($request_body, true);

    $username = $data['username']; // Works!
}
参考手册:https://zerowp.com/sending-axios-parameters-with-a-post-request-in-php/

或者采用URLSearchParams,如下:

const params = new URLSearchParams();
params.append('title', this.queryForm.title);
params.append('solution', this.queryForm.solution);
params.append('content', this.queryForm.content);
params.append('eventNo', this.queryForm.eventNo);
params.append('pageNo', pageNo);

params.append('selectProductIds', selectProductIds);
this.loadingList = true;
axios({
    url: '/queryPage',
    method: 'POST',
    headers: {'Content-type': 'application/x-www-form-urlencoded'},
    data: params
})
    .then(function (response) {
        if (response.data.code === 0) {
            that.tableData = response.data.data.records;
            that.total = response.data.data.total;

        } else {
            that.$message({type: 'error', message: response.data.msg});
            that.tableData = [];
        }
        that.loadingList = false;
    })
    .catch(function (error) {
        that.loadingList = false;
        that.$message("获取数据失败" + error);
    });

1、a.js文件

const hello = {
    name:"zhangsan",
    sex:"男",
    eat(){
        console.log("是个吃货");
    }
}
export default hello;
export let a = "Hello JS";

2、b.js

import {a} from './a.js'
import b from './a.js'

console.log(a);
b.eat();

3、运行

node b.js

4、Promise

new Promise((resolve, reject) => {
    setTimeout(() => {
        console.log('山东省')
        resolve('山东省')
    }, 2000)

}).then(res => {
    console.log('这是第二个异步任务')
    return new Promise((resolve, reject) => {
        setTimeout(() => {
            console.log(res + '日照市')
            resolve(res + '日照市')
        }, 2000)
    })
}).catch(err => {
    console.log(err)
})