|
@@ -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"
|
|
|
},
|
|
@@ -120,7 +120,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: {
|
|
@@ -138,7 +138,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}?`;
|
|
|
|
|
|
let queryStr = ``
|
|
|
Object.keys(this.queryParams).forEach(key => {
|
|
@@ -174,7 +174,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"]);
|
|
@@ -234,7 +234,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:1337/parse/users/me`, {
|
|
|
// headers: {
|
|
|
// "x-parse-application-id": "dev",
|
|
|
// "x-parse-session-token": this.sessionToken // 使用sessionToken进行身份验证
|
|
@@ -252,7 +252,7 @@ export class CloudUser extends CloudObject {
|
|
|
|
|
|
/** 获取特定用户信息 */
|
|
|
async getUserByUsername(objectId: string) {
|
|
|
- const url = `http://dev.fmode.cn:1337/parse/classes/_User?where=${JSON.stringify({ objectId })}`;
|
|
|
+ const url = `https://dev.fmode.cn/parse/classes/_User?where=${JSON.stringify({ objectId })}`;
|
|
|
|
|
|
const response = await fetch(url, {
|
|
|
headers: {
|
|
@@ -288,7 +288,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"
|
|
@@ -320,7 +320,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
|
|
@@ -350,7 +350,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"
|
|
@@ -377,7 +377,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) {
|