<template>
|
<!-- 版本升级弹窗开始 -->
|
<uni-popup ref="promotion" type="center">
|
<view class="promotion">
|
<view class="operates" v-if="showBtns==true">
|
<text @click="cancel">取消</text>
|
<text @click="sure">确认</text>
|
</view>
|
<view class="operates" v-else>
|
<cmd-progress :percent="percentage" stroke-color="linear-gradient(to right, #ef32d9, #89fffd)"></cmd-progress>
|
</view>
|
</view>
|
</uni-popup>
|
<!-- 版本升级弹窗结束 -->
|
</template>
|
|
// <script>
|
// import cmdProgress from "@/components/cmd-progress/cmd-progress.vue" //进度条
|
// export default {
|
// components: {
|
// cmdProgress
|
// },
|
// data() {
|
// return {
|
// downloadUrl: "", //安卓app下载链接
|
// percentage: 0, //下载进度
|
// showBtns: true,
|
// }
|
// },
|
// onShow() {
|
// this.query(); //版本升级
|
// },
|
// watch: {
|
// //监听进度条
|
// percentage(e) {
|
// if (e >= 100) {
|
// this.$refs.promotion.close()
|
// }
|
// }
|
// },
|
// methods: {
|
// //查询当前版本号
|
// query() {
|
// //#ifdef APP-PLUS
|
// plus.runtime.getProperty(plus.runtime.appid, (wgtinfo) => {
|
// var version = wgtinfo.version //客户端版本号
|
// this.check(version) //检测是否需要更新
|
// })
|
// //#endif
|
// },
|
// //检测是否需要更新
|
// async check(version) {
|
// let res = await edition.edition();
|
// let resp = res.data;
|
// if (resp) {
|
// const obj = resp.data.filter(item => {
|
// return item.groupName == 'version'
|
// })
|
// //获取当前版本号
|
// const versionNum = obj[0].title //服务端版本号
|
// this.downloadUrl = obj[0].content //app下载链接
|
// if (version != versionNum) {
|
// this.$refs.promotion.open();
|
// } else {
|
// console.log('当前已是最新版本')
|
// }
|
// }
|
// },
|
// //确认更新
|
// sure() {
|
// //关闭按钮
|
// this.showBtns = false;
|
// let sys = uni.getSystemInfoSync().platform //检查系统
|
// if (sys == 'ios') {
|
// // this.getIosInfo()
|
// } else if (sys == "android") {
|
// this.updateAPP() // 调用下载方法app内下载
|
// }
|
// },
|
// //取消更新
|
// cancel() {
|
// this.$refs.promotion.close();
|
// },
|
// // //链接苹果商店下载
|
// // getIosInfo() {
|
// // let appleId = “你的appid”
|
// // plus.runtime.launchApplication({
|
// // action: "itms-apps://itunes.apple.com/cn/app/id" + appleId + "?mt=8"
|
// // }, function(e) {
|
// // console.log('Open system default browser failed: ' + e.message);
|
// // });
|
// // },
|
// //安卓更新
|
// updateAPP() {
|
// let _this = this;
|
// let url = this.downloadUrl;
|
// // 官方API
|
// var dtask = plus.downloader.createDownload(url, {}, function(d, status) {
|
|
|
// //d为下载的文件对象
|
// if (status == 200) {
|
// //下载成功,d.filename是文件在保存在本地的相对路径,使用下面的API可转为平台绝对路径
|
// var fileSaveUrl = plus.io.convertLocalFileSystemURL(d.filename);
|
// plus.runtime.openFile(d.filename); //选择软件打开文件
|
// uni.showToast({
|
// icon: 'none',
|
// title: '更新成功'
|
// })
|
// } else {
|
// //下载失败
|
// plus.downloader.clear(); //清除下载任务
|
// uni.showToast({
|
// icon: 'none',
|
// title: '更新失败'
|
// })
|
// }
|
// })
|
// //开始下载
|
// dtask.start();
|
// //监听下载进度
|
// dtask.addEventListener('statechanged', function(task) {
|
// _this.percentage = parseInt(
|
// (parseFloat(task.downloadedSize) /
|
// parseFloat(task.totalSize)) *
|
// 100
|
// );
|
// if (_this.percentage == 100) {
|
// this.$refs.promotion.close();
|
// }
|
// // console.log('下载进度:' + _this.percentage)
|
// })
|
// },
|
// }
|
// </script>
|
|
.fn_yousanjiao{
|
position: relative;
|
}
|
.fn_yousanjiao::after{
|
position: absolute;
|
display: block;
|
content: '';
|
z-index: 1;
|
transform: rotate(-45deg);
|
left: -10px;
|
top: -10px;
|
border: 10px solid;
|
border-color: transparent transparent red;
|
}
|
.class_attr_title {
|
font-size: 34rpx;
|
padding-bottom: 22rpx;
|
position: relative;
|
}
|
.class_attr_title .title_line {
|
border-bottom: 2rpx solid #aaa;
|
position: relative;
|
bottom: -50rpx;
|
width: calc(100% - 150rpx);
|
margin-left: 100px;
|
}
|
.class_attr_title .title_icon {
|
border-radius: 50%;
|
width: 80rpx;
|
height: 80rpx;
|
display: inline-block;
|
vertical-align: middle;
|
padding-top: 20rpx;
|
text-align: center;
|
color: #fff;
|
}
|
.class_attr_title i {
|
color: #2c6aa0!important;
|
}
|
.class_attr_title .title_icon i {
|
font-size: 40rpx;
|
}
|
.class_attr_title .title {
|
padding: 0 22rpx;
|
display: inline-block;
|
background-color: #fff;
|
position: relative;
|
bottom: -4rpx;
|
}
|
.class_attr_title .arrow {
|
position: absolute;
|
top: 18rpx;
|
right: 2rpx;
|
font-size: 40rpx;
|
}
|
input::-webkit-input-placeholder {
|
font-size: 12rpx;
|
}
|
textarea{
|
width: 98%;
|
border: 1px solid #d5d5d5;
|
padding: 10rpx 8rpx 12rpx;
|
background: #FFF;
|
border-radius: 0 !important;
|
font-size: 28rpx;
|
font-family: inherit;
|
box-shadow: none !important;
|
transition-duration: 0.1s;
|
color: #858585;
|
}
|
input{
|
border: 1px solid #d5d5d5;
|
width: 98%;
|
height: 52rpx;
|
background: #FFF;
|
border-radius: 0 !important;
|
color: #858585;
|
padding: 10rpx 8rpx 12rpx;
|
font-size: 28rpx;
|
font-family: inherit;
|
box-shadow: none !important;
|
transition-duration: 0.1s;
|
}
|
.class_attr_body .form-group {
|
margin: 0px 30rpx;
|
/* margin-left: -12px;
|
margin-right: -12px; */
|
}
|
.form-group > label[class*="col-"] {
|
margin-bottom: 8rpx;
|
font-size: 32rpx;
|
}
|
.form-group label {
|
vertical-align: middle;
|
line-height: 60rpx;
|
}
|
.no-padding-right {
|
padding-right: 0 !important;
|
}
|
.col-xs-12 {
|
width: 100%;
|
}
|
.text-right{
|
margin-right: 12px;
|
}
|
.section__iput{
|
border: 1px solid #d5d5d5;
|
width: 98%;
|
height: 52rpx;
|
background: #FFF;
|
border-radius: 0 !important;
|
color: #858585;
|
padding: 10rpx 8rpx 12rpx;
|
font-size: 28rpx;
|
font-family: inherit;
|
box-shadow: none !important;
|
transition-duration: 0.1s;
|
}
|
|
</style>
|