|
- onSubmit() {
- let data = {
- id: this.uuid(),
- person: this.param.person,
- buyDate: this.param.buyDate,
- thing: this.param.thing,
- isOk: false,
- price: this.param.price
- }
- console.log(JSON
- .stringify(data))
- api.ajax({
- url: `https://${api.appId}-dev.apicloud**.**/api/bills`,
- method: 'POST',
- data: data
- }, (ret, err) => {
- if (ret) {
- api.alert("插入成功");
- } else {
- api.alert({ msg: JSON.stringify(err) });
- }
- })
- }
复制代码
|
-
在程序和postman中执行失败
|