|
@@ -29,7 +29,7 @@ export class CloudObject {
|
|
|
|
|
|
async save() {
|
|
|
let method = "POST";
|
|
|
- let url = `http://dev.fmode.cn:1337/parse/classes/${this.className}`;
|
|
|
+ let url = `https://dev.fmode.cn/parse/classes/${this.className}`;
|
|
|
|
|
|
// 更新
|
|
|
if (this.id) {
|
|
@@ -61,7 +61,7 @@ export class CloudObject {
|
|
|
|
|
|
async destroy() {
|
|
|
if (!this.id) return;
|
|
|
- const response = await fetch(`http://dev.fmode.cn:1337/parse/classes/${this.className}/${this.id}`, {
|
|
|
+ const response = await fetch(`https://dev.fmode.cn/parse/classes/${this.className}/${this.id}`, {
|
|
|
headers: {
|
|
|
"x-parse-application-id": "dev"
|
|
|
},
|
|
@@ -117,7 +117,7 @@ export class CloudQuery {
|
|
|
}
|
|
|
|
|
|
async get(id: string) {
|
|
|
- const url = `http://dev.fmode.cn:1337/parse/classes/${this.className}/${id}?`;
|
|
|
+ const url = `https://dev.fmode.cn/parse/classes/${this.className}/${id}?`;
|
|
|
|
|
|
const response = await fetch(url, {
|
|
|
headers: {
|
|
@@ -135,7 +135,7 @@ export class CloudQuery {
|
|
|
}
|
|
|
|
|
|
async find():Promise<Array<CloudObject>> {
|
|
|
- let url = `http://dev.fmode.cn:1337/parse/classes/${this.className}?`;
|
|
|
+ let url = `https://dev.fmode.cn/parse/classes/${this.className}?`;
|
|
|
|
|
|
let queryStr = ``
|
|
|
Object.keys(this.queryParams).forEach(key=>{
|
|
@@ -172,7 +172,7 @@ export class CloudQuery {
|
|
|
|
|
|
|
|
|
async first() {
|
|
|
- let url = `http://dev.fmode.cn:1337/parse/classes/${this.className}?`;
|
|
|
+ let url = `https://dev.fmode.cn/parse/classes/${this.className}?`;
|
|
|
|
|
|
if (Object.keys(this.queryParams["where"]).length) {
|
|
|
const whereStr = JSON.stringify(this.queryParams["where"]);
|
|
@@ -232,7 +232,7 @@ export class CloudUser extends CloudObject {
|
|
|
return null;
|
|
|
}
|
|
|
return this;
|
|
|
- // const response = await fetch(`http://dev.fmode.cn:1337/parse/users/me`, {
|
|
|
+ // const response = await fetch(`https://dev.fmode.cn/parse/users/me`, {
|
|
|
// headers: {
|
|
|
// "x-parse-application-id": "dev",
|
|
|
// "x-parse-session-token": this.sessionToken // 使用sessionToken进行身份验证
|
|
@@ -250,7 +250,7 @@ export class CloudUser extends CloudObject {
|
|
|
|
|
|
/** 登录 */
|
|
|
async login(username: string, password: string):Promise<CloudUser|null> {
|
|
|
- const response = await fetch(`http://dev.fmode.cn:1337/parse/login`, {
|
|
|
+ const response = await fetch(`https://dev.fmode.cn/parse/login`, {
|
|
|
headers: {
|
|
|
"x-parse-application-id": "dev",
|
|
|
"Content-Type": "application/json"
|
|
@@ -282,7 +282,7 @@ export class CloudUser extends CloudObject {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- const response = await fetch(`http://dev.fmode.cn:1337/parse/logout`, {
|
|
|
+ const response = await fetch(`https://dev.fmode.cn/parse/logout`, {
|
|
|
headers: {
|
|
|
"x-parse-application-id": "dev",
|
|
|
"x-parse-session-token": this.sessionToken
|
|
@@ -312,7 +312,7 @@ export class CloudUser extends CloudObject {
|
|
|
...additionalData // 合并额外的用户数据
|
|
|
};
|
|
|
|
|
|
- const response = await fetch(`http://dev.fmode.cn:1337/parse/users`, {
|
|
|
+ const response = await fetch(`https://dev.fmode.cn/parse/users`, {
|
|
|
headers: {
|
|
|
"x-parse-application-id": "dev",
|
|
|
"Content-Type": "application/json"
|
|
@@ -339,7 +339,7 @@ export class CloudUser extends CloudObject {
|
|
|
|
|
|
override async save() {
|
|
|
let method = "POST";
|
|
|
- let url = `http://dev.fmode.cn:1337/parse/users`;
|
|
|
+ let url = `https://dev.fmode.cn/parse/users`;
|
|
|
|
|
|
// 更新用户信息
|
|
|
if (this.id) {
|
|
@@ -397,7 +397,7 @@ export class CloudApi{
|
|
|
reqOpts.body = JSON.stringify(body || options?.body);
|
|
|
reqOpts.json = true;
|
|
|
}
|
|
|
- let host = `http://dev.fmode.cn:1337`
|
|
|
+ let host = `https://dev.fmode.cn`
|
|
|
// host = `http://127.0.0.1:1337`
|
|
|
let url = `${host}/api/`+path
|
|
|
console.log(url,reqOpts)
|