|
@@ -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"
|
|
|
},
|
|
@@ -113,7 +113,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: {
|
|
@@ -131,7 +131,7 @@ export class CloudQuery {
|
|
|
}
|
|
|
|
|
|
async find() {
|
|
|
- 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.whereOptions).length) {
|
|
|
const whereStr = JSON.stringify(this.whereOptions);
|
|
@@ -156,7 +156,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.whereOptions).length) {
|
|
|
const whereStr = JSON.stringify(this.whereOptions);
|
|
@@ -215,7 +215,7 @@ export class CloudUser extends CloudObject {
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
- 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进行身份验证
|
|
@@ -233,7 +233,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"
|
|
@@ -265,7 +265,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
|
|
@@ -295,7 +295,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"
|