Browse Source

"update:华为obs"

abstract001 1 year ago
parent
commit
e5fcb08106
29 changed files with 248 additions and 148 deletions
  1. 0 5
      app-angular/.idea/.gitignore
  2. 0 13
      app-angular/.idea/Eve-Project.iml
  3. 0 11
      app-angular/.idea/aws.xml
  4. 0 8
      app-angular/.idea/modules.xml
  5. 0 6
      app-angular/.idea/vcs.xml
  6. 0 4
      app-angular/.vscode/extensions.json
  7. 0 20
      app-angular/.vscode/launch.json
  8. 0 42
      app-angular/.vscode/tasks.json
  9. 47 1
      app-angular/package-lock.json
  10. 1 0
      app-angular/package.json
  11. 5 2
      app-angular/src/modules/home/allcompany/allcompany.component.ts
  12. 1 1
      app-angular/src/modules/home/companydetail/companydetail.component.ts
  13. 4 2
      app-angular/src/modules/home/home.module.ts
  14. 11 4
      app-angular/src/modules/home/nav-menu/nav-menu.component.html
  15. 18 4
      app-angular/src/modules/home/nav-menu/nav-menu.component.scss
  16. 65 1
      app-angular/src/modules/home/nav-menu/nav-menu.component.ts
  17. 1 0
      app-angular/src/modules/home/page-mine/page-mine.component.scss
  18. 3 1
      app-angular/src/modules/home/page-mine/page-mine.component.ts
  19. 2 1
      app-angular/src/modules/user/guard-auth/auth.guard.ts
  20. 2 2
      app-angular/src/modules/user/page-register/page-register.component.ts
  21. 37 9
      app-angular/src/modules/user/service-user/user.service.ts
  22. 1 1
      app-node/parse-api-catch/get.js
  23. 1 1
      app-node/parse-api-catch/login.js
  24. 1 1
      app-node/parse-api-catch/register.js
  25. 43 3
      app-node/parse-api-catch/test.js
  26. 1 1
      app-node/parse-js-sdk/postType.js
  27. 2 2
      app-node/parse-js-sdk/showcase.js
  28. 1 1
      node_modules/.package-lock.json
  29. 1 1
      package-lock.json

+ 0 - 5
app-angular/.idea/.gitignore

@@ -1,5 +0,0 @@
-# 默认忽略的文件
-/shelf/
-/workspace.xml
-# 基于编辑器的 HTTP 客户端请求
-/httpRequests/

+ 0 - 13
app-angular/.idea/Eve-Project.iml

@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module type="WEB_MODULE" version="4">
-  <component name="NewModuleRootManager">
-    <content url="file://$MODULE_DIR$">
-      <excludeFolder url="file://$MODULE_DIR$/temp" />
-      <excludeFolder url="file://$MODULE_DIR$/.tmp" />
-      <excludeFolder url="file://$MODULE_DIR$/tmp" />
-      <excludeFolder url="file://$MODULE_DIR$/dist" />
-    </content>
-    <orderEntry type="inheritedJdk" />
-    <orderEntry type="sourceFolder" forTests="false" />
-  </component>
-</module>

+ 0 - 11
app-angular/.idea/aws.xml

@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="accountSettings">
-    <option name="activeRegion" value="us-east-1" />
-    <option name="recentlyUsedRegions">
-      <list>
-        <option value="us-east-1" />
-      </list>
-    </option>
-  </component>
-</project>

+ 0 - 8
app-angular/.idea/modules.xml

@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="ProjectModuleManager">
-    <modules>
-      <module fileurl="file://$PROJECT_DIR$/.idea/Eve-Project.iml" filepath="$PROJECT_DIR$/.idea/Eve-Project.iml" />
-    </modules>
-  </component>
-</project>

+ 0 - 6
app-angular/.idea/vcs.xml

@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="VcsDirectoryMappings">
-    <mapping directory="$PROJECT_DIR$" vcs="Git" />
-  </component>
-</project>

+ 0 - 4
app-angular/.vscode/extensions.json

@@ -1,4 +0,0 @@
-{
-  // For more information, visit: http://go.microsoft.com/fwlink/?linkid=827846
-  "recommendations": ["angular.ng-template"]
-}

+ 0 - 20
app-angular/.vscode/launch.json

@@ -1,20 +0,0 @@
-{
-  // For more information, visit: http://go.microsoft.com/fwlink/?linkid=830387
-  "version": "0.2.0",
-  "configurations": [
-    {
-      "name": "ng serve",
-      "type": "chrome",
-      "request": "launch",
-      "preLaunchTask": "npm: start",
-      "url": "http://localhost:4200/"
-    },
-    {
-      "name": "ng test",
-      "type": "chrome",
-      "request": "launch",
-      "preLaunchTask": "npm: test",
-      "url": "http://localhost:9876/debug.html"
-    }
-  ]
-}

+ 0 - 42
app-angular/.vscode/tasks.json

@@ -1,42 +0,0 @@
-{
-  // For more information, visit: http://go.microsoft.com/fwlink/?LinkId=733558
-  "version": "2.0.0",
-  "tasks": [
-    {
-      "type": "npm",
-      "script": "start",
-      "isBackground": true,
-      "problemMatcher": {
-        "owner": "typescript",
-        "pattern": "$tsc",
-        "background": {
-          "activeOnStart": true,
-          "beginsPattern": {
-            "regexp": "(.*?)"
-          },
-          "endsPattern": {
-            "regexp": "bundle generation complete"
-          }
-        }
-      }
-    },
-    {
-      "type": "npm",
-      "script": "test",
-      "isBackground": true,
-      "problemMatcher": {
-        "owner": "typescript",
-        "pattern": "$tsc",
-        "background": {
-          "activeOnStart": true,
-          "beginsPattern": {
-            "regexp": "(.*?)"
-          },
-          "endsPattern": {
-            "regexp": "bundle generation complete"
-          }
-        }
-      }
-    }
-  ]
-}

+ 47 - 1
app-angular/package-lock.json

@@ -22,6 +22,7 @@
         "@types/parse": "^3.0.5",
         "bootstrap": "^5.2.3",
         "echarts": "^5.4.3",
+        "esdk-obs-browserjs": "^3.23.5",
         "https-browserify": "^1.0.0",
         "https-proxy-agent": "^7.0.2",
         "ng-zorro-antd": "^16.2.2",
@@ -4112,6 +4113,14 @@
         "postcss": "^8.1.0"
       }
     },
+    "node_modules/axios": {
+      "version": "0.26.1",
+      "resolved": "https://registry.npmmirror.com/axios/-/axios-0.26.1.tgz",
+      "integrity": "sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==",
+      "dependencies": {
+        "follow-redirects": "^1.14.8"
+      }
+    },
     "node_modules/babel-loader": {
       "version": "9.1.3",
       "resolved": "http://registry.npmmirror.com/babel-loader/-/babel-loader-9.1.3.tgz",
@@ -4249,6 +4258,11 @@
         "readable-stream": "^3.4.0"
       }
     },
+    "node_modules/blueimp-md5": {
+      "version": "2.19.0",
+      "resolved": "https://registry.npmmirror.com/blueimp-md5/-/blueimp-md5-2.19.0.tgz",
+      "integrity": "sha512-DRQrD6gJyy8FbiE4s+bDoXS9hiW3Vbx5uCdwvcCf3zLHL+Iv7LtGHLpr+GZV8rHG8tK766FGYBwRbu8pELTt+w=="
+    },
     "node_modules/body-parser": {
       "version": "1.20.2",
       "resolved": "http://registry.npmmirror.com/body-parser/-/body-parser-1.20.2.tgz",
@@ -5711,6 +5725,21 @@
         "node": ">=0.10.0"
       }
     },
+    "node_modules/esdk-obs-browserjs": {
+      "version": "3.23.5",
+      "resolved": "https://registry.npmmirror.com/esdk-obs-browserjs/-/esdk-obs-browserjs-3.23.5.tgz",
+      "integrity": "sha512-i4DTT2bbE3fjy0H84hg1qBHjr5a9dbO39TmVfEkzkjBSNceOU/UX2UXORtjTojju6rpM4TiQh8CthcXeJKqbMA==",
+      "dependencies": {
+        "axios": "^0.26.1",
+        "blueimp-md5": "^2.18.0",
+        "js-base64": "^3.7.1",
+        "jssha": "^3.2.0",
+        "urijs": "^1.19.7"
+      },
+      "engines": {
+        "node": ">=0.12.7"
+      }
+    },
     "node_modules/eslint-scope": {
       "version": "5.1.1",
       "resolved": "http://registry.npmmirror.com/eslint-scope/-/eslint-scope-5.1.1.tgz",
@@ -6144,7 +6173,6 @@
       "version": "1.15.3",
       "resolved": "http://registry.npmmirror.com/follow-redirects/-/follow-redirects-1.15.3.tgz",
       "integrity": "sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==",
-      "dev": true,
       "engines": {
         "node": ">=4.0"
       },
@@ -7375,6 +7403,11 @@
         "jiti": "bin/jiti.js"
       }
     },
+    "node_modules/js-base64": {
+      "version": "3.7.5",
+      "resolved": "https://registry.npmmirror.com/js-base64/-/js-base64-3.7.5.tgz",
+      "integrity": "sha512-3MEt5DTINKqfScXKfJFrRbxkrnk2AxPWGBL/ycjz4dK8iqiSJ06UxD8jh8xuh6p10TX4t2+7FsBYVxxQbMg+qA=="
+    },
     "node_modules/js-tokens": {
       "version": "4.0.0",
       "resolved": "http://registry.npmmirror.com/js-tokens/-/js-tokens-4.0.0.tgz",
@@ -7498,6 +7531,14 @@
         "node >= 0.2.0"
       ]
     },
+    "node_modules/jssha": {
+      "version": "3.3.1",
+      "resolved": "https://registry.npmmirror.com/jssha/-/jssha-3.3.1.tgz",
+      "integrity": "sha512-VCMZj12FCFMQYcFLPRm/0lOBbLi8uM2BhXPTqw3U4YAfs4AZfiApOoBLoN8cQE60Z50m1MYMTQVCfgF/KaCVhQ==",
+      "engines": {
+        "node": "*"
+      }
+    },
     "node_modules/karma": {
       "version": "6.4.2",
       "resolved": "http://registry.npmmirror.com/karma/-/karma-6.4.2.tgz",
@@ -11316,6 +11357,11 @@
         "punycode": "^2.1.0"
       }
     },
+    "node_modules/urijs": {
+      "version": "1.19.11",
+      "resolved": "https://registry.npmmirror.com/urijs/-/urijs-1.19.11.tgz",
+      "integrity": "sha512-HXgFDgDommxn5/bIv0cnQZsPhHDA90NPHD6+c/v21U5+Sx5hoP8+dP9IZXBU1gIfvdRfhG8cel9QNPeionfcCQ=="
+    },
     "node_modules/url": {
       "version": "0.11.3",
       "resolved": "https://registry.npmmirror.com/url/-/url-0.11.3.tgz",

+ 1 - 0
app-angular/package.json

@@ -24,6 +24,7 @@
     "@types/parse": "^3.0.5",
     "bootstrap": "^5.2.3",
     "echarts": "^5.4.3",
+    "esdk-obs-browserjs": "^3.23.5",
     "https-browserify": "^1.0.0",
     "https-proxy-agent": "^7.0.2",
     "ng-zorro-antd": "^16.2.2",

+ 5 - 2
app-angular/src/modules/home/allcompany/allcompany.component.ts

@@ -1,10 +1,12 @@
 import {Component, AfterViewInit, ElementRef, ViewChild, HostListener} from '@angular/core';
 import {Router} from "@angular/router";
+import * as Parse from "parse";
 
 
-import * as Parse from "parse"
+(Parse as any).serverURL = "https://web2023.fmode.cn/parse";
 
-(Parse as any).serverURL = "http://metapunk.cn:9999/parse"
+// (Parse as any).serverURL = "https://web2023.fmode.cn/parse";
+// https://web2023.fmode.cn/s0210490/api/user/login
 Parse.initialize("dev")
 
 
@@ -111,6 +113,7 @@ export class AllcompanyComponent implements AfterViewInit {
     }
     query.addAscending("comno")
     let list = await query.find();
+    console.log(list)
     return list
 
   }

+ 1 - 1
app-angular/src/modules/home/companydetail/companydetail.component.ts

@@ -3,7 +3,7 @@ import {ActivatedRoute} from "@angular/router";
 
 import * as Parse from "parse"
 
-(Parse as any).serverURL = "http://web2023.fmode.cn:23000/parse"
+(Parse as any).serverURL = "https://web2023.fmode.cn/parse"
 Parse.initialize("dev")
 
 @Component({

+ 4 - 2
app-angular/src/modules/home/home.module.ts

@@ -38,8 +38,10 @@ import {NzTypographyModule} from "ng-zorro-antd/typography";
 import {NzCommentModule} from "ng-zorro-antd/comment";
 import {TruncatePipeText} from "./truncate/truncate.pipe"
 import {NzToolTipModule} from "ng-zorro-antd/tooltip";
-import { ExperienceSquareUserComponent } from './experience-square-user/experience-square-user.component';
-import { ExperienceSquareInformationComponent } from './experience-square-information/experience-square-information.component';
+import {ExperienceSquareUserComponent} from './experience-square-user/experience-square-user.component';
+import {
+  ExperienceSquareInformationComponent
+} from './experience-square-information/experience-square-information.component';
 
 @NgModule({
   declarations: [

+ 11 - 4
app-angular/src/modules/home/nav-menu/nav-menu.component.html

@@ -5,11 +5,18 @@
             [(nzCollapsed)]="isCollapsed"
             [nzTrigger]="null">
     <div class="sidebar-logo">
-      <a href="http://ng.ant.design/" target="_blank">
-        <img src="http://ng.ant.design/assets/img/logo.svg" alt="logo">
-        <h1>Eve招聘</h1>
-      </a>
+      <nz-avatar
+        [nzSize]="ngSize ? ngSize : 'large'"
+        [nzSrc]="avatarSrc"
+        [title]="'更换头像'"
+        (mouseenter)="handleMouseEnter()"
+        (mouseleave)="handleMouseLeave()"
+        (click)="openFileSelector()">
+      </nz-avatar>
+      <input type="file" accept="image/*" style="display: none" (change)="onFileChange($event)" #fileInput>
     </div>
+
+
     <ul nz-menu nzTheme="dark" nzMode="inline" [nzInlineCollapsed]="isCollapsed">
       <li nz-submenu nzOpen nzTitle="招聘推荐" nzIcon="home">
         <ul>

+ 18 - 4
app-angular/src/modules/home/nav-menu/nav-menu.component.scss

@@ -37,8 +37,8 @@
   padding-left: 24px;
   overflow: hidden;
   line-height: 64px;
-  background: #001529;
   transition: all .3s;
+  background: whitesmoke;
 }
 
 .sidebar-logo img {
@@ -76,7 +76,21 @@ nz-content {
   margin: 24px;
 }
 
-//.inner-content {
-//  overflow: hidden scroll;
-//}
+//头像
+nz-avatar {
+  background: whitesmoke;
+  border: 1px solid black;
+  border-radius: 10px;
+}
+
+.avatar-large {
+  width: 100px;
+  height: 100px;
+}
+
+.avatar-small {
+  width: 64px;
+  height: 64px;
+}
+
 

+ 65 - 1
app-angular/src/modules/home/nav-menu/nav-menu.component.ts

@@ -1,4 +1,5 @@
-import { Component } from '@angular/core';
+import {Component, ViewChild, ElementRef} from '@angular/core';
+import {HwobsService} from "../hwobs/hwobs.service";
 
 @Component({
   selector: 'app-nav-menu',
@@ -6,6 +7,69 @@ import { Component } from '@angular/core';
   styleUrls: ['./nav-menu.component.scss']
 })
 export class NavMenuComponent {
+
+
+  @ViewChild('fileInput') fileInput: any;
   isCollapsed = false;
 
+
+//  头像上传
+  isMouseOver: boolean = false;
+  ngSize: number | null = null;
+
+  handleMouseEnter() {
+    this.isMouseOver = true;
+    this.ngSize = 64;
+  }
+
+  handleMouseLeave() {
+    this.isMouseOver = false;
+    this.ngSize = null;
+  }
+
+  avatarSrc: string | undefined = "assets/images/page-mine/myAvatar.png";
+
+  openFileSelector() {
+    this.fileInput.nativeElement.click();
+  }
+
+  file: File
+  fileData: any = ""
+  fileList: File[] = []
+
+  upload() {
+    let filename = this.file.name
+    let appId = "0210490" // 以自己学号作为应用目录
+    let dateStr = `${new Date().getFullYear()}${new Date().getMonth() + 1}${new Date().getDate()}`
+    let hourStr = `${new Date().getHours()}${new Date().getMinutes() + 1}${new Date().getSeconds()}`
+    let key = `storage/web-2023/${appId}/${dateStr}/${hourStr}-${filename}`
+    this.hwobs.uploadFile(this.file, key)
+
+  }
+
+  onFileChange(event: any) {
+    const file = event.target.files[0];
+    if (file && file.type.startsWith('image/')) {
+      const reader = new FileReader();
+      reader.onload = () => {
+        this.avatarSrc = reader.result as string;
+      };
+      reader.readAsDataURL(file);
+      this.fileList = event?.target?.files
+      this.file = event?.target?.files?.[0]
+      //文件上传
+      this.upload()
+
+
+    } else {
+      // Handle invalid file type here
+    }
+  }
+
+//  华为云obs配置
+  constructor(private hwobs: HwobsService
+  ) {
+  }
+
+
 }

+ 1 - 0
app-angular/src/modules/home/page-mine/page-mine.component.scss

@@ -204,3 +204,4 @@ button {
 }
 
 
+

+ 3 - 1
app-angular/src/modules/home/page-mine/page-mine.component.ts

@@ -15,7 +15,7 @@ import {AlertController} from "@ionic/angular";
 import {Router} from "@angular/router";
 import {Observable, Observer} from "rxjs";
 
-Parse.serverURL = "http://web2023.fmode.cn:23000/parse" // 配置服务器地址
+Parse.serverURL = "https://web2023.fmode.cn/parse" // 配置服务器地址
 Parse.initialize("dev") // 配置应用名称
 
 const userQuery = new Parse.Query("LjUser");
@@ -30,12 +30,14 @@ export class PageMineComponent {
   validateForm: FormGroup;
   account = this.userServ.currentUser.account;
   password = this.userServ.currentUser.password;
+
   isFirstRegister = this.userServ.currentUser.isFirstRegister;
   private readonly result: Promise<Parse.Object<Parse.Attributes>>;
   selectedTabIndex: number = 0; // 默认选中第一个标签页
 
 
   constructor(private fb: FormBuilder, private toastCtrl: ToastController, public userServ: UserService, private alertCtrl: AlertController, private router: Router, private refine: NonNullableFormBuilder) {
+    console.log(this.userServ.currentUser)
 
     this.myForm = new FormGroup({
       phone: new FormControl('', [Validators.required, Validators.pattern(/^\d{10}$/)]),

+ 2 - 1
app-angular/src/modules/user/guard-auth/auth.guard.ts

@@ -21,7 +21,8 @@ export class AuthGuard implements CanActivate {
     state: RouterStateSnapshot
   ): boolean | UrlTree | Observable<boolean | UrlTree> | Promise<boolean | UrlTree> {
     // 检查本地存储中是否有用户验证信息
-    let userAuth = localStorage.getItem("USER_AUTH");
+    let userAuth = localStorage.getItem("USER_AUTH")
+    console.log(userAuth)
     if (userAuth) {
       return true;
     } else {

+ 2 - 2
app-angular/src/modules/user/page-register/page-register.component.ts

@@ -11,7 +11,7 @@ import Parse from "parse";
 import {Router} from "@angular/router";
 import {HttpClient, HttpParams} from "@angular/common/http";
 
-Parse.serverURL = "https://web2023.fmode.cn:9999/parse" // 配置服务器地址
+Parse.serverURL = "https://web2023.fmode.cn/parse" // 配置服务器地址
 Parse.initialize("dev") // 配置应用名称
 
 const userQuery = new Parse.Query("LjUser");
@@ -97,7 +97,7 @@ export class PageRegisterComponent {
   // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
   accountValidator = (control: FormControl) =>
     new Observable((observer: Observer<ValidationErrors | null>) => {
-      const url = 'http://web2023.fmode.cn:23000/user/register';
+      const url = 'https://web2023.fmode.cn/user/register';
       const params = new HttpParams().set('account', control.value);
 
       this.http.get(url, {params}).subscribe(

+ 37 - 9
app-angular/src/modules/user/service-user/user.service.ts

@@ -4,7 +4,7 @@ import {Injectable} from '@angular/core';
 //得到用户列表
 import * as Parse from "parse"
 
-(Parse as any).serverURL = "http://metapunk:9999/parse";
+(Parse as any).serverURL = "https://web2023.fmode.cn/parse";
 // https://web2023.fmode.cn/s0210490/api/user/login
 Parse.initialize("dev")
 
@@ -15,7 +15,7 @@ export class UserService {
 
   get currentUser() {
     try {
-      let currentUser = JSON.parse(localStorage.getItem("USER_AUTH") || "error")
+      let currentUser = JSON.parse(localStorage.getItem("USER_AUTH") || "error");
       return currentUser
     } catch (err) {
 
@@ -79,7 +79,7 @@ export class UserService {
   //   console.log(user.password)
   //   return new Promise<boolean>(async (resolve, reject) => {
   //       //   try {
-  //       //     const url = 'http://web2023.fmode.cn:23000/s0210490/user/login/get'; // 替换为实际的接口 URL
+  //       //     const url = 'https://web2023.fmode.cn/s0210490/user/login/get'; // 替换为实际的接口 URL
   //       //     const response = await this.http.post(url, user).toPromise();
   //       //     return response as boolean;
   //       //   } catch (error) {
@@ -115,7 +115,7 @@ export class UserService {
 
   async checkUserByAccount(username: string, password: string) {
     //region
-    // const url = 'http://web2023.fmode.cn:23000/user/login';
+    // const url = 'https://web2023.fmode.cn/user/login';
     // const url = 'https://web2023.fmode.cn/s0210490/api/user/login';
     //
     // // const url = 'http://localhost:23000/user/login';
@@ -151,8 +151,7 @@ export class UserService {
     //   });
     // })
     //endregion
-    let isLogin = await this.login_user(username, password);
-    console.log(isLogin)
+    let isLogin: any = await this.login_user(username, password);
     if (isLogin) {
       return true;
     } else {
@@ -161,19 +160,48 @@ export class UserService {
 
   }
 
+
   async login_user(username: string, password: string) {
     // if (!username) {
     //   throw "账户不存在"
     // }
     try {
       console.log(username, password)
-      let user = await Parse.User.logIn(username, password);
-      console.log(user)
-      return true;
+      let user: any = await Parse.User.logIn(username, password);
+      const userQuery = new Parse.Query("LjUser");
+      userQuery.equalTo("account", username);
+      let list = await userQuery.first();
+      // console.log(list)
+      // console.log(JSON.stringify(list))
+      // console.log(JSON.parse(JSON.stringify(list)))
+      localStorage.setItem("USER_AUTH", JSON.stringify(list));
+      if (user?.id) {
+        return true;
+      }
+      //region
+      // localStorage.setItem("USER_AUTH", JSON.stringify(user_info.first()));
+
+      // localStorage.setItem("USER_AUTH", JSON.stringify(Parse.User.current()));
+      // user_info.first().then(function (result: Parse.Object<Parse.Attributes> | undefined) {
+      //   console.log(result)
+      //   localStorage.setItem("USER_AUTH", JSON.stringify(result));
+      // }).catch(function (error) {
+      //   console.log(error)
+      // });
+
+      // query.include("account");
+      // // query.include("password")
+      // query.include("isFirstRegister")
+      // query.include("availableBalance")
+      // query.include("gender")
+      // if (user?.id) {
+      // }
+      //endregion
     } catch (e) {
       console.error(e)
       throw e;
     }
+    return
   }
 
 

+ 1 - 1
app-node/parse-api-catch/get.js

@@ -1,5 +1,5 @@
 const Parse = require("parse/node")
-Parse.serverURL = "http://web2023.fmode.cn:9999/parse" // 配置服务器地址
+Parse.serverURL = "https://web2023.fmode.cn/parse" // 配置服务器地址
 Parse.initialize("dev") // 配置应用名称
 
 const user = await Parse.User.logIn("1", "12");

+ 1 - 1
app-node/parse-api-catch/login.js

@@ -1,6 +1,6 @@
 const Parse = require("parse/node");
 
-Parse.serverURL = "http://web2023.fmode.cn:9999/parse"; // 配置服务器地址
+Parse.serverURL = "https://web2023.fmode.cn/parse"; // 配置服务器地址
 Parse.initialize("dev"); // 配置应用名称
 
 

+ 1 - 1
app-node/parse-api-catch/register.js

@@ -1,6 +1,6 @@
 const Parse = require("parse/node");
 
-Parse.serverURL = "http://web2023.fmode.cn:9999/parse"; // 配置服务器地址
+Parse.serverURL = "https://web2023.fmode.cn/parse"; // 配置服务器地址
 Parse.initialize("dev"); // 配置应用名称
 
 async function registerUser(user) {

+ 43 - 3
app-node/parse-api-catch/test.js

@@ -1,10 +1,50 @@
 const Parse = require("parse/node")
-Parse.serverURL = "http://web2023.fmode.cn:9999/parse" // 配置服务器地址
+Parse.serverURL = "https://web2023.fmode.cn/parse" // 配置服务器地址
 Parse.initialize("dev") // 配置应用名称
 
 async function registerAll() {
-  user = await Parse.User.logIn("12", "12");
-  console.log(user)
+  // let query = Parse.Object.extend("LjUser");
+  // // query.equalTo()
+  // query.find().then((results) => {
+  //   console.log(results);
+  // }).catch((error) => {
+  //   console.log(error);
+  // });
+  // let user = Parse.User.current();
+  // // let User = Parse.Object.extend("LjUser");
+  // // const user1 = new User();
+  // // user1.set("account", "1");
+  // // await user1.save();
+  // const query = new Parse.Query("LjUser");
+  // query.equalTo("account", "1");
+  // console.log(query.first().then((result) => {
+  //   console.log(1)
+  //   console.log(result)
+  // }));
+//   const GameScore = Parse.Object.extend("LjUser");
+//   const query = new Parse.Query(GameScore);
+//   query.equalTo("account", "1");
+//   const results = await query.find();
+// // Do something with the returned Parse.Object values
+//   for (let i = 0; i < results.length; i++) {
+//     const object = results[i];
+//     console.log(object)
+//   }
+  let userList = []
+
+  let userQuery = new Parse.Query("LjUser");
+  userQuery.equalTo("account", '123');
+  let list = await userQuery.first();
+  console.log(list)
+  console.log(JSON.stringify(list))
+  console.log(JSON.parse(JSON.stringify(list)).stuno)
+  // query.get("VBy15Y4Fo2")
+  //    .then((gameScore) => {
+  //      console.log(gameScore.get("password"))
+  //    }, (error) => {
+  //      // The object was not retrieved successfully.
+  //      // error is a Parse.Error with an error code and message.
+  //    });
 }
 
 registerAll()

+ 1 - 1
app-node/parse-js-sdk/postType.js

@@ -1,5 +1,5 @@
 const Parse = require("parse/node")
-Parse.serverURL = "http://web2023.fmode.cn:23000/parse" // 配置服务器地址
+Parse.serverURL = "https://web2023.fmode.cn/parse" // 配置服务器地址
 Parse.initialize("dev") // 配置应用名称
 
 const LjPosts = Parse.Object.extend("LjPosts");

+ 2 - 2
app-node/parse-js-sdk/showcase.js

@@ -2,10 +2,10 @@
 /**
  * npm i -S parse
  */
-// parse-dashboard --appId dev --masterKey devmk --serverURL http://web2023.fmode.cn:23000/parse --appName Web3Dev
+// parse-dashboard --appId dev --masterKey devmk --serverURL https://web2023.fmode.cn/parse --appName Web3Dev
 
 const Parse = require("parse/node")
-Parse.serverURL = "http://web2023.fmode.cn:23000/parse" // 配置服务器地址
+Parse.serverURL = "https://web2023.fmode.cn/parse" // 配置服务器地址
 Parse.initialize("dev") // 配置应用名称
 
 

+ 1 - 1
node_modules/.package-lock.json

@@ -1,5 +1,5 @@
 {
-  "name": "Eve-Project",
+  "name": "Eve-Project-master",
   "lockfileVersion": 3,
   "requires": true,
   "packages": {

+ 1 - 1
package-lock.json

@@ -1,5 +1,5 @@
 {
-  "name": "Eve-Project",
+  "name": "Eve-Project-master",
   "lockfileVersion": 3,
   "requires": true,
   "packages": {