diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c287c9f7..a7c254ca 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -60,13 +60,19 @@ variables: .setup_fastlane_android: extends: .build_rule before_script: + - export PUB_HOSTED_URL=https://pub.flutter-io.cn + - export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn - ls -li - export NEXT_VERSION="$(cat app_new.version)" -# - flutter pub get + # - flutter pub get - export PATH="/opt/homebrew/bin:$PATH" - eval "$(rbenv init -)" - - bundle config mirror.https://rubygems.org https://gems.ruby-china.com - - bundle install --gemfile android/Gemfile --quiet + - rbenv global 2.6.10 # 你实际用的 Ruby 版本 + - ruby -v + - which ruby + - gem env + - bundle config mirror.https://rubygems.org https://mirrors.aliyun.com/rubygems/ + - bundle install --gemfile android/Gemfile --path vendor/bundle_android --quiet cache: paths: - app_new.version @@ -74,13 +80,19 @@ variables: .setup_fastlane_ios: extends: .build_rule before_script: + - export PUB_HOSTED_URL=https://pub.flutter-io.cn + - export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn - ls -li - export NEXT_VERSION="$(cat app_new.version)" -# - flutter pub get + - flutter pub get - export PATH="/opt/homebrew/bin:$PATH" - eval "$(rbenv init -)" - - bundle config mirror.https://rubygems.org https://gems.ruby-china.com - - bundle install --gemfile ios/Gemfile --quiet + - rbenv global 2.6.10 # 你实际用的 Ruby 版本 + - ruby -v + - which ruby + - gem env + - bundle config mirror.https://rubygems.org https://mirrors.aliyun.com/rubygems/ + - bundle install --gemfile ios/Gemfile --path vendor/bundle_ios --quiet cache: paths: - app_new.version diff --git a/lib/main/lockDetail/lockSet/basicInformation/basicInformation/basicInformation_page.dart b/lib/main/lockDetail/lockSet/basicInformation/basicInformation/basicInformation_page.dart index 58c5a9bb..69beabba 100755 --- a/lib/main/lockDetail/lockSet/basicInformation/basicInformation/basicInformation_page.dart +++ b/lib/main/lockDetail/lockSet/basicInformation/basicInformation/basicInformation_page.dart @@ -133,20 +133,20 @@ class _BasicInformationPageState extends State { } }); })), - Obx(() => Visibility( - visible: state.lockBasicInfo.value.isLockOwner == 1, - child: CommonItem( - leftTitel: '管理员开锁密码'.tr, - rightTitle: state.lockBasicInfo.value.adminPwd, - isHaveLine: true, - isHaveDirection: true, - action: () { - Get.toNamed(Routers.adminOpenLockPasswordPage, - arguments: { - 'lockSetInfoData': state.lockSetInfoData.value - }); - }), - )), + // Obx(() => Visibility( + // visible: state.lockBasicInfo.value.isLockOwner == 1, + // child: CommonItem( + // leftTitel: '管理员开锁密码'.tr, + // rightTitle: state.lockBasicInfo.value.adminPwd, + // isHaveLine: true, + // isHaveDirection: true, + // action: () { + // Get.toNamed(Routers.adminOpenLockPasswordPage, + // arguments: { + // 'lockSetInfoData': state.lockSetInfoData.value + // }); + // }), + // )), Obx(() => Visibility( visible: (state.lockBasicInfo.value.lockName ?? '') .contains('T9A'), diff --git a/lib/main/lockDetail/lockSet/lockSet/lockSet_page.dart b/lib/main/lockDetail/lockSet/lockSet/lockSet_page.dart index f11e9624..78f5a18a 100755 --- a/lib/main/lockDetail/lockSet/lockSet/lockSet_page.dart +++ b/lib/main/lockDetail/lockSet/lockSet/lockSet_page.dart @@ -99,7 +99,7 @@ class _LockSetPageState extends State CommonItem( leftTitel: '基本信息'.tr, rightTitle: '', - isHaveLine: false, + isHaveLine: state.lockBasicInfo.value.isLockOwner == 1, isHaveDirection: true, action: () { if (!state.lockSetInfoData.value.isValid()) { @@ -111,6 +111,25 @@ class _LockSetPageState extends State 'lockSetInfoData': state.lockSetInfoData.value }); }), + //管理员密码 需求变更:由基本信息子页面移至此处 + Obx(() => Visibility( + visible: state.lockBasicInfo.value.isLockOwner == 1, + child: CommonItem( + leftTitel: '管理员开锁密码'.tr, + rightTitle: state.lockBasicInfo.value.adminPwd, + isHaveLine: false, + isHaveDirection: true, + action: () { + if (!state.lockSetInfoData.value.isValid()) { + EasyLoading.showToast('网络访问失败,请检查网络是否正常'.tr); + return; + } + Get.toNamed(Routers.adminOpenLockPasswordPage, + arguments: { + 'lockSetInfoData': state.lockSetInfoData.value + }); + }), + )), SizedBox(height: 10.h), // 自动闭锁 Obx(() => Visibility( @@ -201,7 +220,7 @@ class _LockSetPageState extends State CommonItem( leftTitel: '基本信息'.tr, rightTitle: '', - isHaveLine: false, + isHaveLine: state.lockBasicInfo.value.isLockOwner == 1, isHaveDirection: true, action: () { Get.toNamed(Routers.basicInformationPage, @@ -209,6 +228,25 @@ class _LockSetPageState extends State 'lockSetInfoData': state.lockSetInfoData.value }); }), + //管理员密码 需求变更:由基本信息子页面移至此处 + Obx(() => Visibility( + visible: state.lockBasicInfo.value.isLockOwner == 1, + child: CommonItem( + leftTitel: '管理员开锁密码'.tr, + rightTitle: state.lockBasicInfo.value.adminPwd, + isHaveLine: true, + isHaveDirection: true, + action: () { + if (!state.lockSetInfoData.value.isValid()) { + EasyLoading.showToast('网络访问失败,请检查网络是否正常'.tr); + return; + } + Get.toNamed(Routers.adminOpenLockPasswordPage, + arguments: { + 'lockSetInfoData': state.lockSetInfoData.value + }); + }), + )), SizedBox(height: 10.h), //by DaisyWu 田总:移至锁详情配件区 // 门磁 diff --git a/tag_generator.sh b/tag_generator.sh index 27e39182..f148c1e1 100755 --- a/tag_generator.sh +++ b/tag_generator.sh @@ -10,17 +10,21 @@ echo "PRIVATE-TOKEN: $TOKEN $URL/projects/$PROJECT_ID/repository/tags" tags_json=$(curl -H "Content-Type: application/json" -H "PRIVATE-TOKEN: $TOKEN" "$URL/projects/$PROJECT_ID/repository/tags") #echo "tags_json:$tags_json\n" tags=$(echo "$tags_json" | jq -r '.[].name') + +# 只保留不带 _sky 后缀的 tag 作为最新 tag +plain_tags=$(echo "$tags" | grep -v '_sky$') +latest_tag=$(echo "$plain_tags" | head -n 1) + tags_length=$(echo "$tags_json" | jq -r 'length') if [ "$tags_length" -lt 1 ]; then next_tag="v1.0.0" else - newest_tag=$(echo "$tags" | head -n 1) - IFS='.' read -r major minor patch <<< "$newest_tag" + IFS='.' read -r major minor patch <<< "$latest_tag" major="${major#v}" compare_json="" if [[ "$1" == "generate_tag" ]];then - echo "generate_tag:$newest_tag-to-master\n" - compare_json=$(curl -s --header "PRIVATE-TOKEN: $TOKEN" "$URL/projects/$PROJECT_ID/repository/compare?from=$newest_tag&to=master") + echo "generate_tag:$latest_tag-to-master\n" + compare_json=$(curl -s --header "PRIVATE-TOKEN: $TOKEN" "$URL/projects/$PROJECT_ID/repository/compare?from=$latest_tag&to=master") elif [[ "$1" == "generate_version" ]]; then echo "generate_version:master-to-$CI_COMMIT_BRANCH\n" compare_json=$(curl -s --header "PRIVATE-TOKEN: $TOKEN" "$URL/projects/$PROJECT_ID/repository/compare?from=master&to=$CI_COMMIT_BRANCH") @@ -45,9 +49,9 @@ else done < <(echo "$compare_json" | jq -c '.commits[] | {id: .id, message: .message}') next_tag="v$major.$new_minor.$new_patch" fi -echo "New Tag:$newest_tag;New version: $next_tag;command: $1" +echo "New Tag:$latest_tag;New version: $next_tag;command: $1" if [[ "$1" == "generate_tag" ]];then - if [ "$next_tag" == "$newest_tag" ]; then + if [ "$next_tag" == "$latest_tag" ]; then echo "no change from master,skip to generate tag" exit 0 fi