135 lines
2.7 KiB
Vue
135 lines
2.7 KiB
Vue
<template>
|
||
<view class="about-page">
|
||
<page-nav title="关于"></page-nav>
|
||
<view class="about-content">
|
||
<view class="about-logo">
|
||
<u-icon name="info-circle" size="80" color="#2979ff"></u-icon>
|
||
</view>
|
||
<text class="about-name">WMS PDA</text>
|
||
<text class="about-version">版本 {{ appVersion }}</text>
|
||
|
||
<view class="about-list">
|
||
<u-cell-group :border="false">
|
||
<u-cell title="项目名称" value="天豹云仓WMS_PDA"></u-cell>
|
||
<u-cell title="技术框架" value="uni-app + uView UI"></u-cell>
|
||
<u-cell title="运行平台" value="Android / iOS"></u-cell>
|
||
</u-cell-group>
|
||
</view>
|
||
|
||
<view class="about-actions">
|
||
<u-button type="primary" plain size="small" @click="handleCheckUpdate" :loading="updateChecking">
|
||
检查更新
|
||
</u-button>
|
||
</view>
|
||
|
||
<view class="about-footer">
|
||
<text class="about-copyright">© 2026 天豹云仓</text>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 版本更新弹窗(复用登录页更新流程) -->
|
||
<app-update-dialog ref="appUpdateDialog"></app-update-dialog>
|
||
</view>
|
||
</template>
|
||
|
||
<script>
|
||
import AppUpdateDialog from '@/components/AppUpdateDialog/AppUpdateDialog.vue'
|
||
|
||
export default {
|
||
components: {
|
||
AppUpdateDialog
|
||
},
|
||
data() {
|
||
return {
|
||
appVersion: '',
|
||
updateChecking: false
|
||
};
|
||
},
|
||
onLoad() {
|
||
this.getAppVersion();
|
||
},
|
||
methods: {
|
||
getAppVersion() {
|
||
// #ifdef APP-PLUS
|
||
try {
|
||
plus.runtime.getProperty(plus.runtime.appid, (info) => {
|
||
this.appVersion = info.version || '';
|
||
});
|
||
} catch (error) {
|
||
this.appVersion = '1.0.8';
|
||
}
|
||
// #endif
|
||
// #ifndef APP-PLUS
|
||
this.appVersion = '1.0.8';
|
||
// #endif
|
||
},
|
||
handleCheckUpdate() {
|
||
// #ifdef APP-PLUS
|
||
const dialog = this.$refs.appUpdateDialog;
|
||
if (!dialog) return;
|
||
this.updateChecking = true;
|
||
// force=true:每次点击都强制重新检查远端配置
|
||
dialog.checkForAppUpdate(true).finally(() => {
|
||
this.updateChecking = dialog.isCheckingUpdate;
|
||
});
|
||
// #endif
|
||
// #ifndef APP-PLUS
|
||
uni.showToast({ title: '当前环境不支持更新检查', icon: 'none' });
|
||
// #endif
|
||
}
|
||
}
|
||
};
|
||
</script>
|
||
|
||
<style lang="scss" scoped>
|
||
.about-page {
|
||
height: 100vh;
|
||
background: #f8f9fa;
|
||
}
|
||
|
||
.about-content {
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
padding: 40rpx 0;
|
||
}
|
||
|
||
.about-logo {
|
||
margin-bottom: 24rpx;
|
||
}
|
||
|
||
.about-name {
|
||
font-size: 38rpx;
|
||
font-weight: 600;
|
||
color: #303133;
|
||
margin-bottom: 8rpx;
|
||
}
|
||
|
||
.about-version {
|
||
font-size: 26rpx;
|
||
color: #909399;
|
||
margin-bottom: 32rpx;
|
||
}
|
||
|
||
.about-list {
|
||
width: 100%;
|
||
padding: 0 24rpx;
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
.about-actions {
|
||
padding: 48rpx 24rpx 0;
|
||
width: 100%;
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
.about-footer {
|
||
margin-top: 60rpx;
|
||
}
|
||
|
||
.about-copyright {
|
||
font-size: 24rpx;
|
||
color: #c0c4cc;
|
||
}
|
||
</style>
|