极光推送权限修改

This commit is contained in:
@fawn-nine
2023-04-23 15:11:26 +08:00
parent ee74da48cc
commit db2beb84e5
2 changed files with 101 additions and 54 deletions

View File

@@ -692,7 +692,7 @@ import { nextTick } from "vue";
'lineHeight':'',
'oldReadPage':0
},
setShow: true, // 设置显示?
setShow: false, // 设置显示?
clientlast: null, //开始位置
touchNum: 0, //点击次数
touchTime: null, //定时器清除
@@ -3178,13 +3178,22 @@ import { nextTick } from "vue";
musicPlaying:false,
fontSize:'',
lineHeight:'',
containerStyle: ''
containerStyle: '',
devName:false,
letterSpacing:1,
}
},
},
mounted() {
this.onTurn();
this.onTurn();
this.isAndroid()
console.log(this.devName,'devName')
},
methods: {
isAndroid() { //判断是否为安卓手机
var u = navigator.userAgent;
var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1;
this.devName = isAndroid
},
updateReaderSet(newVal, oldVal){
// 阅读器设置更新
$("#flipbook .paragraph").css({fontSize:newVal.fontSize+"px", lineHeight:newVal.lineHeight*newVal.fontSize+"px"})
@@ -3233,7 +3242,7 @@ import { nextTick } from "vue";
},
updateSimulationText(newVal, oldVal) {
$("#flipbook").turn('pages',1) // 内容变化时保留1页
$("#flipbook").turn('pages',1) // 内容变化时保留1页1
$("#flipbook").turn('pages',newVal.SimulationText.length)
// this.onTurn();
// this.SimulationText = newVal
@@ -3242,22 +3251,24 @@ import { nextTick } from "vue";
this.lineHeight = newVal.lineHeight
newVal.background == 1 ? this.containerStyle = "#f7faf9" : this.containerStyle = "#000"
//$(".myPage p").css({backgroundColor:this.containerStyle})
this.devName ? this.letterSpacing = 2 : this.letterSpacing = 1
console.log(this.letterSpacing,'-----------------------------')
for (var i=0; i<newVal.SimulationText.length;i++) {
var tagHtml = "";
var conntentHtml = "";
for (var j=0; j<newVal.SimulationText[i].length; j++) {
var classname = ''
var styleconteent = ''
newVal.SimulationText[i][j].class == 'jushou' ? classname = 'shouhang' : ''
newVal.SimulationText[i][j].class == 'jushou' ? styleconteent = "';text-indent:2em ;font-size:"+newVal.fontSize+"px; color: #5d5d5d; line-height:"+newVal.lineHeight*newVal.fontSize+"px;'": styleconteent = "'font-size:"+newVal.fontSize+"px ; line-height:"+newVal.lineHeight*newVal.fontSize+"px; color: #5d5d5d; text-align:justify'"
newVal.SimulationText[i][j].class == 'jushou' ? classname = 'shouhang' : 'notshouhang'
newVal.SimulationText[i][j].class == 'jushou' ? styleconteent = "'text-indent:2em ;font-size:"+newVal.fontSize+"px; color: #5d5d5d; line-height:"+newVal.lineHeight*newVal.fontSize+"px;'": styleconteent = "'font-size:"+newVal.fontSize+"px ; line-height:"+newVal.lineHeight*newVal.fontSize+"px; color: #5d5d5d;'"
conntentHtml += "<p class='paragraph " + classname + " paragraph" + newVal.SimulationText[i][j].paragraph +"' style="+styleconteent+">" + newVal.SimulationText[i][j].list + "</p>"
}
var page1 = i+1
var btnStyle = "display: block; padding: 20rpx; border: 1px solid #333; text-align: center;"
var tagHtml = "<div style='padding:0 18px; position:relative; background-color:"+this.containerStyle+"; height:inherit'>"+ conntentHtml +"<div style='text-align:center; color:#777 ; position: absolute;bottom: 5px; left: 0;text-align: center; width: 100%;' >"+page1+"/"+ newVal.SimulationText.length +"</div></div>";
var tagHtml = "<div style='padding:0 10px;letter-spacing:"+ this.letterSpacing +"px; position:relative; background-color:"+this.containerStyle+"; height:inherit'>"+ conntentHtml +"<div style='text-align:center; color:#777 ; position: absolute;bottom: 5px; left: 0;text-align: center; width: 100%;' >"+page1+"/"+ newVal.SimulationText.length +"</div></div>";
// $("#flipbook").append(tagHtml);
if (!$("#flipbook").turn('hasPage', i+2)) {
// Create an element for this page
// Create an element for this page.
var element = $('<div />').html('');
// Add the page
$("#flipbook").turn('addPage', element, i+2);
@@ -3266,6 +3277,7 @@ import { nextTick } from "vue";
}
// 如果有阅读缓存
if(newVal.oldReadPage>0){
// alert('读取历史阅读进度')
$("#flipbook").turn('page', newVal.oldReadPage+1)
}else{
$("#flipbook").turn('page', 2)
@@ -3326,7 +3338,7 @@ import { nextTick } from "vue";
} else {
clearTimeout(this.touchTime)
this.touchTime = setTimeout(() => {
//双击或多次点击事件
//双击或多次点击事件
this.touchNum = 0
}, 250)
//console.log('单击')
@@ -3361,6 +3373,11 @@ import { nextTick } from "vue";
</script>
<style>
/* .container1{background-color: #000;} */
.notshouhang:after {
display: inline-block;
width: 100%;
content: '';
}
.buts{width: 100%; display:flex; }
.buts span{display: block; padding: 20rpx; border: 1px solid #333; text-align: center;}
</style>