upgrade version 8.18

This commit is contained in:
2020-08-18 17:42:26 +08:00
parent 2a382aa0b4
commit cb0a6fafa3
9 changed files with 240 additions and 116 deletions

View File

@@ -64,7 +64,8 @@
},
{
title: '关于我们',
link: '../mine/ArticleDetails?type=2'
// link: '../mine/ArticleDetails?type=2'
link: '/pageE/setting/version'
},
{
title: '帮助与反馈',

View File

@@ -0,0 +1,53 @@
<template>
<u-modal v-model="show" :show-cancel-button="true" confirm-text="升级" title="发现新版本" @cancel="cancel" @confirm="confirm">
<view class="u-update-content">
<rich-text :nodes="content"></rich-text>
</view>
</u-modal>
</template>
<script>
export default {
data() {
return {
show: true,
// 传递给uni-app"rich-text"组件的内容,可以使用"<br>"进行换行
content: `
1. 新增几个bug<br>
2. 新增Modal模态框组件<br>
3. 新增压窗屏组件可以在APP上以弹窗的形式遮盖导航栏和底部tabbar<br>
`,
}
},
onReady() {
this.show = true;
},
methods: {
cancel() {
this.closeModal();
},
confirm() {
this.closeModal();
},
closeModal() {
uni.navigateBack();
}
}
}
</script>
<style scoped lang="scss">
page{
background-color: rgba(0,0,0,0);
}
.u-full-content {
background-color: #00C777;
}
.u-update-content {
font-size: 26rpx;
color: $u-content-color;
line-height: 1.7;
padding: 30rpx;
}
</style>

108
pageE/setting/version.vue Normal file
View File

@@ -0,0 +1,108 @@
<template>
<view class="version">
<view class="header">
<image src="../../pageD/images/file.png" class="tit-img" mode=""></image>
<view class="title">德铭阳光</view>
<view class="tit-info">版本:{{ version }} for {{ phone_type }}</view>
</view>
<view class="main">
<view @click="viewAboutUs">
<text class="title">产品介绍</text>
<u-icon name="arrow-right" color="#999"></u-icon>
</view>
<view class="version-view">
<text class="title">版本更新</text>
<text class="tips" v-if="0">已是最新版本</text>
<text class="tips" v-else @click="updateVersion">1.1.10</text>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
version: "",
phone_type: "",
}
},
onLoad() {
this.getVersion();
this.phone_type = this.$u.os();
},
methods: {
// 检查版本号
getVersion() {
this.$u.post("Specialci/checkVersion",{ app_version: 1 }).then(res => {
// console.log(res);
this.version = res.data.app_version;
})
},
viewAboutUs() {
this.$u.route('/pageE/mine/ArticleDetails', {
type: 2
});
},
updateVersion() {
this.$u.route('/pageE/setting/updateVersion');
}
}
};
</script>
<style lang="scss" scoped>
.header {
width: 500rpx;
margin: 0 auto;
padding: 30rpx;
text-align: center;
.tit-img {
width: 200rpx;
height: 200rpx;
}
.title {
margin: 18rpx 0;
font-weight: bold;
font-size: 26rpx;
letter-spacing: 2rpx;
}
.tit-info {
font-size: 22rpx;
color: #666;
}
}
.main {
margin: 20rpx 0;
& > view {
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
height: 100rpx;
padding: 0 20rpx;
line-height: 100rpx;
color: #333;
font-size: 30rpx;
background-color: #fff;
border-bottom: 1px solid #f2f2f2;
.title {
width: 200rpx;
}
}
.tips {
color: #999;
font-size: 22rpx;
}
.version-view {
.tips {
flex: 1;
text-align: right;
}
}
}
.u-content {
padding: 20rpx;
font-size: 30rpx;
text-indent: 1rem;
line-height: 1.2;
}
</style>