csdn1233 3 месяцев назад
Родитель
Сommit
1e04103d8e

+ 4 - 4
AIart-app/angular.json

@@ -42,13 +42,13 @@
               "budgets": [
                 {
                   "type": "initial",
-                  "maximumWarning": "2mb",
-                  "maximumError": "5mb"
+                  "maximumWarning": "20mb",
+                  "maximumError": "20mb"
                 },
                 {
                   "type": "anyComponentStyle",
-                  "maximumWarning": "2kb",
-                  "maximumError": "4kb"
+                  "maximumWarning": "20mb",
+                  "maximumError": "20mb"
                 }
               ],
               "fileReplacements": [

+ 18 - 0
AIart-app/deploy.ps1

@@ -0,0 +1,18 @@
+# 打包项目,携带应用前缀(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/202226701049/"
+
+# 清空旧文件目录
+obsutil rm obs://nova-cloud/dev/jxnu/202226701049 -r -f -i=XSUWJSVMZNHLWFAINRZ1 -k=P4TyfwfDovVNqz08tI1IXoLWXyEOSTKJRVlsGcV6 -e="obs.cn-south-1.myhuaweicloud.com"
+
+# 同步文件目录
+obsutil sync ./www obs://nova-cloud/dev/jxnu/202226701049  -i=XSUWJSVMZNHLWFAINRZ1 -k=P4TyfwfDovVNqz08tI1IXoLWXyEOSTKJRVlsGcV6 -e="obs.cn-south-1.myhuaweicloud.com" -acl=public-read
+
+
+# 授权公开可读
+obsutil chattri obs://nova-cloud/dev/jxnu/202226701049 -r -f -i=XSUWJSVMZNHLWFAINRZ1 -k=P4TyfwfDovVNqz08tI1IXoLWXyEOSTKJRVlsGcV6 -e="obs.cn-south-1.myhuaweicloud.com" -acl=public-read
+
+# 列举对象
+obsutil ls obs://nova-cloud/dev/jxnu/202226701049  -i=XSUWJSVMZNHLWFAINRZ1 -k=P4TyfwfDovVNqz08tI1IXoLWXyEOSTKJRVlsGcV6 -e="obs.cn-south-1.myhuaweicloud.com"

+ 4 - 4
AIart-app/src/app/tab1/tab1.page.html

@@ -130,19 +130,19 @@
 
     <div class="learning-cards">
       <div class="learning-card">
-        <img src="../../assets/img/book1.png" alt="城南旧事">
+        <img src="assets/img/book1.png" alt="城南旧事">
         <h3>城南旧事</h3>
       </div>
       <div class="learning-card">
-        <img src="../../assets/img/book2.png" alt="朝花夕拾">
+        <img src="assets/img/book2.png" alt="朝花夕拾">
         <h3>朝花夕拾</h3>
       </div>
       <div class="learning-card">
-        <img src="../../assets/img/book3.png" alt="狂人日记">
+        <img src="assets/img/book3.png" alt="狂人日记">
         <h3>狂人日记</h3>
       </div>
       <div class="learning-card">
-        <img src="../../assets/img/book4.png" alt="彷徨">
+        <img src="assets/img/book4.png" alt="彷徨">
         <h3>彷徨</h3>
       </div>
     </div>

+ 8 - 8
AIart-app/src/app/tab3/tab3.page.ts

@@ -17,10 +17,10 @@ export class Tab3Page {
   artworks = [
     {
       id: '1',
-      image: '../../assets/img/xingkong.png',
+      image: 'assets/img/xingkong.png',
       title: '梵高-星空高清画作',
       description: '致敬梵高 #艺术品 #星空',
-      avatarUrl: '../../assets/img/book1.png',
+      avatarUrl: 'assets/img/book1.png',
       userName: '星空艺术家',
       date: '12-01',
       likes: 1687,
@@ -28,10 +28,10 @@ export class Tab3Page {
     },
     {
       id: '2',
-      image: '../../assets/img/xiangrikui.png',
+      image: 'assets/img/xiangrikui.png',
       title: '梵高《向日葵》',
       description: '经典中的经典,笔触很牛!#花',
-      avatarUrl: '../../assets/img/book2.png',
+      avatarUrl: 'assets/img/book2.png',
       userName: '艺术鉴赏家',
       date: '11-30',
       likes: 2341,
@@ -39,10 +39,10 @@ export class Tab3Page {
     },
     {
       id: '3',
-      image: '../../assets/img/fangao.png',
+      image: 'assets/img/fangao.png',
       title: '梵高自画像',
       description: '梵高生平自画像之其中🔟副👩‍🎨 #艺术欣赏 #美',
-      avatarUrl: '../../assets/img/book3.png',
+      avatarUrl: 'assets/img/book3.png',
       userName: '艺术探索者',
       date: '11-29',
       likes: 1892,
@@ -50,10 +50,10 @@ export class Tab3Page {
     },
     {
       id: '4',
-      image: '../../assets/img/cunzhuang.png',
+      image: 'assets/img/cunzhuang.png',
       title: '阿尔小镇',
       description: '走吧,梵高,去你最爱的阿尔看看,阿尔小镇',
-      avatarUrl: '../../assets/img/book4.png',
+      avatarUrl: 'assets/img/book4.png',
       userName: '风景画师',
       date: '11-28',
       likes: 2156,

+ 1 - 1
AIart-app/src/app/tab5/tab5.page.html

@@ -23,7 +23,7 @@
     <div class="profile-header">
       <div class="profile-info">
         <div class="avatar-container">
-          <img src="../../assets/img/logo.png" alt="头像" class="avatar">
+          <img src="assets/img/logo.png" alt="头像" class="avatar">
         </div>
         <div class="user-info">
           <h2>游客用户</h2>

+ 2 - 1
AIart-app/src/app/tabs/tabs.page.ts

@@ -30,6 +30,7 @@ import {
   medal,
   saveOutline,
   sendOutline,
+  playCircleOutline,
 } from 'ionicons/icons';
 
 
@@ -59,7 +60,7 @@ export class TabsPage {
       pricetagOutline, closeCircle, brushOutline, musicalNotesOutline, bodyOutline,
       cameraOutline, codeOutline, restaurantOutline, fitnessOutline, languageOutline,
       helpCircleOutline, leafOutline, flame, checkmarkCircle, handRight, medal, saveOutline,
-      sendOutline,
+      sendOutline, playCircleOutline,
 
     });
   }

+ 58 - 0
angular.json

@@ -0,0 +1,58 @@
+{
+    "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
+    "version": 1,
+    "newProjectRoot": "projects",
+    "projects": {
+        "AIart-app": {
+            "projectType": "application",
+            "schematics": {
+                "@schematics/angular:component": {
+                    "style": "scss"
+                }
+            },
+            "root": "",
+            "sourceRoot": "src",
+            "prefix": "app",
+            "architect": {
+                "build": {
+                    "builder": "@angular-devkit/build-angular:browser",
+                    "options": {
+                        "outputPath": "www",
+                        "index": "src/index.html",
+                        "main": "src/main.ts",
+                        "polyfills": [
+                            "zone.js"
+                        ],
+                        "tsConfig": "tsconfig.app.json",
+                        "inlineStyleLanguage": "scss",
+                        "assets": [
+                            "src/favicon.ico",
+                            "src/assets",
+                            {
+                                "glob": "**/*.svg",
+                                "input": "node_modules/ionicons/dist/ionicons/svg",
+                                "output": "./svg"
+                            }
+                        ],
+                        "styles": [
+                            "src/styles.scss"
+                        ],
+                        "scripts": [],
+                        "budgets": [
+                            {
+                                "type": "initial",
+                                "maximumWarning": "20mb",
+                                "maximumError": "20mb"
+                            },
+                            {
+                                "type": "anyComponentStyle",
+                                "maximumWarning": "20mb",
+                                "maximumError": "20mb"
+                            }
+                        ]
+                    }
+                }
+            }
+        }
+    }
+}