提交 8c09d1ab 作者: 方治民

feat: 更新 app icon 并测试版本更新功能

上级 6b70ff77
...@@ -33,3 +33,5 @@ pnpm-debug.log* ...@@ -33,3 +33,5 @@ pnpm-debug.log*
.mocks/ .mocks/
.pnpm-debug.log .pnpm-debug.log
unpackage/release
logo.png

44.5 KB

...@@ -9,8 +9,9 @@ ...@@ -9,8 +9,9 @@
:style="{color:item.color || '#465CFF',fontSize:(item.size || 28)+'rpx',borderColor:borderColor,lineHeight:(item.size || 28)+'rpx'}">{{item.text}}</text> :style="{color:item.color || '#465CFF',fontSize:(item.size || 28)+'rpx',borderColor:borderColor,lineHeight:(item.size || 28)+'rpx'}">{{item.text}}</text>
</navigator> </navigator>
</view> </view>
<view class="fui-footer__text" :class="{'fui-as__safe-weex':iphoneX && safeArea}"> <view class="fui-footer__text" :class="{'fui-as__safe-weex':iphoneX && safeArea}" :style="{color:color,fontSize:size+'rpx'}">
<text :style="{color:color,fontSize:size+'rpx'}">{{text}}</text> <slot name="text"></slot>
<text v-if="!$slots.text">{{text}}</text>
</view> </view>
</view> </view>
</template> </template>
...@@ -212,4 +213,4 @@ ...@@ -212,4 +213,4 @@
} }
/* #endif */ /* #endif */
</style> </style>
\ No newline at end of file
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
"name" : "Beta App", "name" : "Beta App",
"appid" : "__UNI__2E9441A", "appid" : "__UNI__2E9441A",
"description" : "APP 基础工程", "description" : "APP 基础工程",
"versionName" : "1.0.0", "versionName" : "3.0.1.5",
"versionCode" : "100", "versionCode" : 105,
"transformPx" : false, "transformPx" : false,
"locale" : "zh-Hans", "locale" : "zh-Hans",
/* 5+App特有相关 */// 配置文件详细说明 /* 5+App特有相关 */// 配置文件详细说明
...@@ -60,6 +60,38 @@ ...@@ -60,6 +60,38 @@
"offline" : false "offline" : false
} }
} }
},
"icons" : {
"android" : {
"hdpi" : "unpackage/res/icons/72x72.png",
"xhdpi" : "unpackage/res/icons/96x96.png",
"xxhdpi" : "unpackage/res/icons/144x144.png",
"xxxhdpi" : "unpackage/res/icons/192x192.png"
},
"ios" : {
"appstore" : "unpackage/res/icons/1024x1024.png",
"ipad" : {
"app" : "unpackage/res/icons/76x76.png",
"app@2x" : "unpackage/res/icons/152x152.png",
"notification" : "unpackage/res/icons/20x20.png",
"notification@2x" : "unpackage/res/icons/40x40.png",
"proapp@2x" : "unpackage/res/icons/167x167.png",
"settings" : "unpackage/res/icons/29x29.png",
"settings@2x" : "unpackage/res/icons/58x58.png",
"spotlight" : "unpackage/res/icons/40x40.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png"
},
"iphone" : {
"app@2x" : "unpackage/res/icons/120x120.png",
"app@3x" : "unpackage/res/icons/180x180.png",
"notification@2x" : "unpackage/res/icons/40x40.png",
"notification@3x" : "unpackage/res/icons/60x60.png",
"settings@2x" : "unpackage/res/icons/58x58.png",
"settings@3x" : "unpackage/res/icons/87x87.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png",
"spotlight@3x" : "unpackage/res/icons/120x120.png"
}
}
} }
} }
}, },
...@@ -83,7 +115,7 @@ ...@@ -83,7 +115,7 @@
"usingComponents" : true "usingComponents" : true
}, },
"uniStatistics" : { "uniStatistics" : {
"enable" : false, "enable" : true,
"version" : "2" "version" : "2"
}, },
"vueVersion" : "3" "vueVersion" : "3"
......
<script setup lang="ts"> <script setup lang="ts">
import dayjs from 'dayjs' import dayjs from 'dayjs'
import { checkUpgrade } from '@/utils/upgrade'
const year = ref(dayjs().year()) const year = ref(dayjs().year())
const title = ref('Hello World') const title = ref('Hello World')
const version = ref()
// #ifdef APP-PLUS
plus.runtime.getProperty(plus.runtime.appid, (info) => {
version.value = info.version
})
// #endif
onMounted(() => { onMounted(() => {
// test API // test API
...@@ -33,13 +41,19 @@ ...@@ -33,13 +41,19 @@
<template> <template>
<view class="content"> <view class="content">
<fui-avatar src="/static/logo.png" radius="14" @click="surprise" /> <fui-avatar src="/static/logo.png" radius="14" background="transparent" @click="surprise" />
<view class="info"> <view class="info">
<text class="title">{{ title }}</text> <text class="title">{{ title }}</text>
<text class="title">{{ $t('app.hello') }}</text> <text class="title">{{ $t('app.hello') }}</text>
<uni-icons type="hand-up" size="30" /> <uni-icons type="hand-up" size="30" />
</view> </view>
<fui-footer isFixed :text="`Copyright © ${year} YiRing.com`" /> <fui-footer isFixed>
<template #text>
<view v-if="version" @click="checkUpgrade(true)">V{{ version }}</view>
<view class="mt-14">壹润科技 版权所有</view>
<view class="mt-14">Copyright © 2021-{{ year }} Yiring. All Ringhts Reserved</view>
</template>
</fui-footer>
</view> </view>
</template> </template>
...@@ -65,4 +79,8 @@ ...@@ -65,4 +79,8 @@
font-size: 36rpx; font-size: 36rpx;
color: #8f8f94; color: #8f8f94;
} }
.mt-14 {
margin-top: 8rpx;
}
</style> </style>
src/static/logo.png

6.9 KB | W: | H:

src/static/logo.png

48.6 KB | W: | H:

src/static/logo.png
src/static/logo.png
src/static/logo.png
src/static/logo.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -436,7 +436,7 @@ ...@@ -436,7 +436,7 @@
background-color: #fff; background-color: #fff;
box-sizing: border-box; box-sizing: border-box;
padding: 0 50rpx; padding: 0 50rpx;
font-family: Source Han Sans CN; font-family: -apple-system-font, 'Helvetica Neue', Helvetica, sans-serif;
} }
.text { .text {
......
...@@ -64,7 +64,7 @@ export default function() { ...@@ -64,7 +64,7 @@ export default function() {
uni.removeStorageSync(PACKAGE_INFO_KEY) uni.removeStorageSync(PACKAGE_INFO_KEY)
} }
}) })
return return
} else if (code < 0) { } else if (code < 0) {
// TODO 云函数报错处理 // TODO 云函数报错处理
......
...@@ -2,9 +2,13 @@ ...@@ -2,9 +2,13 @@
import checkVersion from '@/uni_modules/uni-upgrade-center-app/utils/check-update' import checkVersion from '@/uni_modules/uni-upgrade-center-app/utils/check-update'
// #endif // #endif
export function checkUpgrade() { export function checkUpgrade(toast = false) {
// #ifdef APP-PLUS // #ifdef APP-PLUS
// 版本更新检查 // 版本更新检查
checkVersion() checkVersion().then((res) => {
if (toast && res?.result?.code === 0) {
Message.toast('已是最新版本 ✨')
}
})
// #endif // #endif
} }
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论