deming/pageE/setting/updateVersion.vue

80 lines
2.0 KiB
Vue
Raw Normal View History

2020-08-18 09:42:26 +00:00
<template>
2020-08-25 02:13:49 +00:00
<u-modal v-model="show" :show-cancel-button="is_focus_upgrade" confirm-text="升级" title="发现新版本" @cancel="cancel" @confirm="confirm">
2020-08-18 09:42:26 +00:00
<view class="u-update-content">
2020-08-25 03:52:46 +00:00
<!-- <rich-text :nodes="content"></rich-text> -->
2020-08-18 09:42:26 +00:00
</view>
</u-modal>
</template>
<script>
export default {
data() {
return {
2020-08-25 02:13:49 +00:00
is_focus_upgrade: Boolean, // 是否强制更新
2020-08-18 09:42:26 +00:00
show: true,
// 传递给uni-app"rich-text"组件的内容,可以使用"<br>"进行换行
content: `
1. 新增几个bug<br>
2. 新增Modal模态框组件<br>
3. 新增压窗屏组件可以在APP上以弹窗的形式遮盖导航栏和底部tabbar<br>
`,
2020-08-25 04:06:37 +00:00
isAutoUpdate: false,
2020-08-18 09:42:26 +00:00
}
},
2020-08-25 02:13:49 +00:00
onLoad(option) {
this.is_focus_upgrade = option.status == 1 ? false : true;
},
2020-08-18 09:42:26 +00:00
onReady() {
this.show = true;
},
methods: {
cancel() {
this.closeModal();
},
confirm() {
2020-08-25 03:50:45 +00:00
// #ifdef APP-PLUS
2020-08-25 02:40:47 +00:00
if (plus.os.name == "Android") {
2020-08-25 03:51:16 +00:00
const appurl = "market://details?id=com.tencent.mobileqq"; //这个是通用应用市场如果想指定某个应用商店需要单独查这个应用商店的包名或scheme及参数
2020-08-25 02:40:47 +00:00
plus.runtime.openURL(appurl);
} else if(plus.os.name == "ios") {
const appurl = "itms-apps://itunes.apple.com/cn/app/id1144816653?mt=8";
plus.runtime.openURL(appurl);
}
// endif
2020-08-25 03:51:16 +00:00
// ifdef H5
2020-08-18 09:42:26 +00:00
this.closeModal();
2020-08-25 03:50:45 +00:00
// #endif
2020-08-18 09:42:26 +00:00
},
closeModal() {
2020-08-25 04:21:26 +00:00
const pages = getCurrentPages();
// console.log(pages);
if(pages.length == 2) {
2020-08-25 06:21:15 +00:00
this.$u.route('/pageA/welcome/welcome');
2020-08-25 04:06:37 +00:00
} else {
uni.navigateBack();
}
2020-08-18 09:42:26 +00:00
}
}
}
</script>
2020-08-25 03:51:16 +00:00
<style lang="scss">
2020-08-18 10:05:15 +00:00
page {
background-color: rgba(0, 0, 0, 0);
2020-08-18 09:42:26 +00:00
}
2020-08-25 03:51:16 +00:00
.u-mode-center-box {
2020-08-18 10:05:15 +00:00
background-color: transparent;
2020-08-18 09:42:26 +00:00
}
2020-08-18 10:05:15 +00:00
// .u-full-content {
// background-color: #00C777;
// }
2020-08-18 09:42:26 +00:00
.u-update-content {
font-size: 26rpx;
color: $u-content-color;
line-height: 1.7;
padding: 30rpx;
}
2020-08-18 13:11:28 +00:00
::v-deep.u-mode-center-box {
background-color: transparent;
}
2020-08-18 09:42:26 +00:00
</style>