徐勤民 5 hónapja
szülő
commit
16fb994da7
3 módosított fájl, 50 hozzáadás és 0 törlés
  1. 35 0
      README.md
  2. 12 0
      ResourcesCopy.sh
  3. 3 0
      oh-package.json5

+ 35 - 0
README.md

@@ -0,0 +1,35 @@
+### clone仓库
+```shell
+git clone --recurse-submodules https://xuqinmin.com/xuqinmin12/HMosDemo.git
+```
+
+### 蓝湖下载Android图片资源后,自动转存
+```shell
+ohpm run resourcesCopy
+```
+
+### 指定新地址
+```shell
+git remote set-url origin "新的仓库地址" 
+```
+
+### 强制推送
+```shell
+git push -f origin master
+```
+
+> [git子模块相关操作](https://git-scm.com/book/zh/v2/Git-%E5%B7%A5%E5%85%B7-%E5%AD%90%E6%A8%A1%E5%9D%97)
+
+# 问题记录
+
+> Q: 新代码clone下来,无法运行
+>
+> A: 使用下面这个命令重新拉取项目
+> ```shell
+> git clone --recurse-submodules https://gitea.51trust.net/mobile/YiwangxinApp-HarmonyOS.git
+> ```
+
+
+> Q: 预览失败,无报错信息,或者报错信息指定的位置,没有问题
+>
+> A: 预览页面所在model下,查找 `.preview`文件夹,删除

+ 12 - 0
ResourcesCopy.sh

@@ -0,0 +1,12 @@
+#!/bin/bash
+
+echo 请输入Android资源路径
+read -r -p ":" dirs
+
+cp "${dirs}/mipmap-xxxhdpi"/* "./app/src/main/resources/xxxldpi/media"/
+cp "${dirs}/mipmap-xxhdpi"/* "./app/src/main/resources/xxldpi/media"/
+cp "${dirs}/mipmap-xhdpi"/* "./app/src/main/resources/xldpi/media"/
+cp "${dirs}/mipmap-hdpi"/* "./app/src/main/resources/ldpi/media"/
+cp "${dirs}/mipmap-mdpi"/* "./app/src/main/resources/mdpi/media"/
+
+read -n 1

+ 3 - 0
oh-package.json5

@@ -1,6 +1,9 @@
 {
   "modelVersion": "5.0.0",
   "description": "Please describe the basic information.",
+  "scripts": {
+    "resourcesCopy": "ResourcesCopy.sh"
+  },
   "dependencies": {
   },
   "devDependencies": {