Przeglądaj źródła

优化了图片路径

何何何 1 rok temu
rodzic
commit
3a8a020c30

+ 19 - 0
paint-app/deploy.ps1

@@ -0,0 +1,19 @@
+# 打包项目,携带应用前缀(index.html中相对路径将自动修复为/dev/jxnu/<学号>前缀)
+# /dev/ 项目测试版上传路径
+# /dev/jxnu/<学号> nova-crm项目预留路径
+set NODE_OPTIONS=–max_old_space_size=16000
+
+node ./node_modules/@angular/cli/bin/ng build --base-href="/dev/jxnu/202226701034/"
+
+# 清空旧文件目录
+obsutil rm obs://nova-cloud/dev/jxnu/202226701034 -r -f -i=XSUWJSVMZNHLWFAINRZ1 -k=P4TyfwfDovVNqz08tI1IXoLWXyEOSTKJRVlsGcV6 -e="obs.cn-south-1.myhuaweicloud.com"
+
+# 同步文件目录
+obsutil sync ./www obs://nova-cloud/dev/jxnu/202226701034  -i=XSUWJSVMZNHLWFAINRZ1 -k=P4TyfwfDovVNqz08tI1IXoLWXyEOSTKJRVlsGcV6 -e="obs.cn-south-1.myhuaweicloud.com" -acl=public-read
+
+
+# 授权公开可读
+obsutil chattri obs://nova-cloud/dev/jxnu/202226701034 -r -f -i=XSUWJSVMZNHLWFAINRZ1 -k=P4TyfwfDovVNqz08tI1IXoLWXyEOSTKJRVlsGcV6 -e="obs.cn-south-1.myhuaweicloud.com" -acl=public-read
+
+# 列举对象
+obsutil ls obs://nova-cloud/dev/jxnu/agent  -i=XSUWJSVMZNHLWFAINRZ1 -k=P4TyfwfDovVNqz08tI1IXoLWXyEOSTKJRVlsGcV6 -e="obs.cn-south-1.myhuaweicloud.com"

+ 1 - 1
paint-app/src/app/tab1/tab1.page.html

@@ -7,7 +7,7 @@
 </ion-header>
 
 <ion-content [fullscreen]="true" class="bg-color">
-  <img src="../../assets/icon/tou2.png" alt="Image Description" class="image-style"/>
+  <img src="https://s2.loli.net/2024/12/23/7HNb2O5GXsEghqt.png" alt="Image Description" class="image-style"/>
   <!-- <ion-header>
     <ion-toolbar>
       <ion-button (click)="goTestPage()">测试</ion-button>

+ 1 - 1
paint-app/src/app/tab3/tab3.page.html

@@ -74,7 +74,7 @@
             <div class="upper">
               @if(!currentUser?.id){
               <div class="img-box">
-                <img src="../../assets/icon/head1.png" alt="User Image" />
+                <img src="https://s2.loli.net/2024/12/23/FbVMwDPieBp7tAs.png" alt="User Image" />
               </div>
               <div class="info">
                 <div class="name">未登录</div>

+ 9 - 9
paint-app/src/lib/ncloud.ts

@@ -30,7 +30,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) {
@@ -62,7 +62,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"
             },
@@ -130,7 +130,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: {
@@ -149,7 +149,7 @@ export class CloudQuery {
 
     async find() {
         // 构建请求的基础 URL,包含类名
-        let url = `http://dev.fmode.cn:1337/parse/classes/${this.className}?`;
+        let url = `https://dev.fmode.cn/parse/classes/${this.className}?`;
     
         // 检查是否有查询条件,如果有,则将其序列化为 JSON 字符串
         if (Object.keys(this.whereOptions).length) {
@@ -182,7 +182,7 @@ export class CloudQuery {
         return objList || [];
     }
     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);
@@ -242,7 +242,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进行身份验证
@@ -260,7 +260,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"
@@ -292,7 +292,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
@@ -322,7 +322,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"

+ 4 - 4
paint-server/lib/ncloud.js

@@ -21,7 +21,7 @@ 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){
             url = "/"+this.id
@@ -44,7 +44,7 @@ class CloudObject{
     }
     async destory(){
         if(!this.id) return
-        let response = await fetch("http://dev.fmode.cn:1337/parse/classes/Doctor/"+this.id, {
+        let response = await fetch("https://dev.fmode.cn/parse/classes/Doctor/"+this.id, {
             "headers": {
               "x-parse-application-id": "dev"
             },
@@ -89,7 +89,7 @@ class CloudQuery{
     }
 
     async get(id){
-        let url = "http://dev.fmode.cn:1337/parse/classes/"+this.className+"/"+id+"?"
+        let url = "https://dev.fmode.cn/parse/classes/"+this.className+"/"+id+"?"
 
         let response = await fetch(url, {
             "headers": {
@@ -105,7 +105,7 @@ class CloudQuery{
         return json || {}
     }
     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){
             let whereStr = JSON.stringify(this.whereOptions)

+ 4 - 4
paint-server/migration/import-data.js

@@ -19,7 +19,7 @@ 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){
             url = "/"+this.id
@@ -42,7 +42,7 @@ class CloudObject{
     }
     async destory(){
         if(!this.id) return
-        let response = await fetch("http://dev.fmode.cn:1337/parse/classes/Doctor/"+this.id, {
+        let response = await fetch("https://dev.fmode.cn/parse/classes/Doctor/"+this.id, {
             "headers": {
               "x-parse-application-id": "dev"
             },
@@ -87,7 +87,7 @@ class CloudQuery{
     }
 
     async get(id){
-        let url = "http://dev.fmode.cn:1337/parse/classes/"+this.className+"/"+id+"?"
+        let url = "https://dev.fmode.cn/parse/classes/"+this.className+"/"+id+"?"
 
         let response = await fetch(url, {
             "headers": {
@@ -103,7 +103,7 @@ class CloudQuery{
         return json || {}
     }
     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){
             let whereStr = JSON.stringify(this.whereOptions)