askbot-dragon 1.4.98 → 1.4.99-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -3,39 +3,45 @@
|
|
|
3
3
|
<div class="ticketMessage">
|
|
4
4
|
<ticket-swiper ref="swiper" :content="content" :type="type" @touchEnd="touchEnd">
|
|
5
5
|
<template>
|
|
6
|
-
<ticket-swiper-item
|
|
7
|
-
v-for="(item,_index) in content.cards"
|
|
8
|
-
:key="_index"
|
|
9
|
-
:content="content"
|
|
10
|
-
>
|
|
6
|
+
<ticket-swiper-item v-for="(item, _index) in content.cards" :key="_index" :content="content">
|
|
11
7
|
<template>
|
|
12
8
|
<div class="ticketMessageContain">
|
|
13
|
-
<div :class="{isPhoneClass:isPhone===true,isCompayClass:isCompany===true}">
|
|
14
|
-
<div :class="{isIosClass:isIos===true,isAndroidClass:isAndroid===true}">
|
|
9
|
+
<div :class="{ isPhoneClass: isPhone === true, isCompayClass: isCompany === true }">
|
|
10
|
+
<div :class="{ isIosClass: isIos === true, isAndroidClass: isAndroid === true }">
|
|
15
11
|
<div class="htmlClass">
|
|
16
|
-
<div v-for="(items,ind) in item.content.htmlList"
|
|
17
|
-
|
|
18
|
-
class="html-item"
|
|
19
|
-
>
|
|
20
|
-
<div class="img" v-if="items.type==='IMAGE'">
|
|
12
|
+
<div v-for="(items, ind) in item.content.htmlList" :key="ind" class="html-item">
|
|
13
|
+
<div class="img" v-if="items.type === 'IMAGE'">
|
|
21
14
|
<img :src="items.src">
|
|
22
15
|
</div>
|
|
23
|
-
<div class="singleClass" v-else-if="items.type==='SINGLE'">
|
|
24
|
-
<div v-html="itemss" class="singleItem"
|
|
16
|
+
<div class="singleClass" v-else-if="items.type === 'SINGLE'">
|
|
17
|
+
<div v-html="itemss" class="singleItem" v-for="(itemss, inde) in items.list" :key="inde"></div>
|
|
25
18
|
</div>
|
|
26
|
-
<div class="
|
|
27
|
-
<div
|
|
19
|
+
<div class="doubleClas" v-else-if="items.type === 'DOUBLE' && content.version != 1">
|
|
20
|
+
<div class="doubleItem" v-for="(itemss, index) in items.list" :key="'__' + index" v-html="itemss">
|
|
28
21
|
</div>
|
|
29
22
|
</div>
|
|
30
|
-
<div class="
|
|
31
|
-
<div
|
|
23
|
+
<div class="updateDoubleClass" v-else-if="items.type === 'DOUBLE' && content.version == 1">
|
|
24
|
+
<div class="doubleItem" :style="{ 'width': itemss.style.col / itemss.style.colums * 100 + '%' }"
|
|
25
|
+
v-for="(itemss, index) in items.tampList" :key="'__' + index" v-html="itemss.html">
|
|
26
|
+
</div>
|
|
27
|
+
<!-- <div class="doubleItem" v-for="(itemss,index) in items.tampList" :key="'__'+index">
|
|
28
|
+
{{itemss.style.col/itemss.style.colums*100}}{{itemss.html}}
|
|
29
|
+
</div> -->
|
|
30
|
+
</div>
|
|
31
|
+
<div class="tripleClass" v-else-if="items.type === 'TRIPLE'">
|
|
32
|
+
<div v-html="itemss" class="tripleItem" v-for="(itemss, index) in items.list" :key="'___' + index">
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
<div class="quadrupleClass" v-else-if="items.type === 'QUADRUPLE'">
|
|
36
|
+
<div v-html="itemss" class="quadrupleItem" v-for="(itemss, index) in items.list"
|
|
37
|
+
:key="'___' + index"></div>
|
|
32
38
|
</div>
|
|
33
39
|
</div>
|
|
34
40
|
</div>
|
|
35
41
|
<div class="button-list">
|
|
36
|
-
<div v-for="(items,index) in item.content.buttonList" :key="'____'+index" class="button-item">
|
|
42
|
+
<div v-for="(items, index) in item.content.buttonList" :key="'____' + index" class="button-item">
|
|
37
43
|
<div @click="btnClick(items)" class="buttonClassItem">
|
|
38
|
-
<span class="btn-name">{{items.name}}</span>
|
|
44
|
+
<span class="btn-name">{{ items.name }}</span>
|
|
39
45
|
</div>
|
|
40
46
|
</div>
|
|
41
47
|
</div>
|
|
@@ -50,129 +56,149 @@
|
|
|
50
56
|
</div>
|
|
51
57
|
</template>
|
|
52
58
|
<script>
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
59
|
+
import ticketSwiper from "./swiper/ticketSwiper";
|
|
60
|
+
import ticketSwiperItem from "./swiper/ticketSwiperItem";
|
|
61
|
+
export default {
|
|
62
|
+
name: "TicketMessage",
|
|
63
|
+
props: {
|
|
64
|
+
content: {
|
|
65
|
+
type: Object,
|
|
66
|
+
default() {
|
|
67
|
+
return {}
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
type: {
|
|
71
|
+
type: String,
|
|
72
|
+
default: ''
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
components: {
|
|
76
|
+
ticketSwiperItem,
|
|
77
|
+
ticketSwiper
|
|
78
|
+
},
|
|
79
|
+
data() {
|
|
80
|
+
return {
|
|
81
|
+
contents: {
|
|
82
|
+
multiple: true,
|
|
83
|
+
cards: [
|
|
84
|
+
{
|
|
58
85
|
content: {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
86
|
+
htmlList: [{ type: 'IMAGE', src: 'https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-office-website/images/09-4.png' }, { type: 'SINGLE', list: ['<p>aaaaaaaaaa</p>'] }, { type: 'DOUBLE', list: ['<p>北京首都国际机场</p>', '<div>bbbbb</div>'] }, { type: 'TRIPLE', list: ['<p>北京首都国际机场啦啦啦啦</p>', '<div>CA5689</div>', '<p>上海虹桥国际机场</p>'] }, { type: 'TRIPLE', list: ['<p>7:00</p>', '<div>SSS</div>', '<p>12:00</p>'] }],
|
|
87
|
+
buttonList: [{ name: '我是标签1', scope: '', test: '' }, { name: '我是标签2' }]
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
content: {
|
|
92
|
+
htmlList: [{ type: 'SINGLE', list: ['<p>aaaaa</p>', '<a>我是链接</a>'] }, { type: 'DOUBLE', list: ['<p>aaaaa</p>', '<div>bbbbb</div>'] }, { type: 'TRIPLE', list: ['<p>7:00</p>', '<div></div>', '<p>ccccc</p>'] }, { type: 'TRIPLE', list: ['<p>7:00</p>', '<div>bbbbb</div>', '<p>12:00</p>'] }],
|
|
93
|
+
buttonList: [{ name: '我是标签1', scope: '', test: '' }]
|
|
67
94
|
}
|
|
68
|
-
},
|
|
69
|
-
components:{
|
|
70
|
-
ticketSwiperItem,
|
|
71
|
-
ticketSwiper
|
|
72
|
-
},
|
|
73
|
-
data(){
|
|
74
|
-
return{
|
|
75
|
-
contents:{
|
|
76
|
-
multiple:true,
|
|
77
|
-
cards:[
|
|
78
|
-
{content:{
|
|
79
|
-
htmlList:[{type:'IMAGE',src:'https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-office-website/images/09-4.png'},{type:'SINGLE',list:['<p>aaaaaaaaaa</p>']},{type:'DOUBLE',list:['<p>北京首都国际机场</p>','<div>bbbbb</div>']},{type:'TRIPLE',list:['<p>北京首都国际机场啦啦啦啦</p>','<div>CA5689</div>','<p>上海虹桥国际机场</p>']},{type:'TRIPLE',list:['<p>7:00</p>','<div>SSS</div>','<p>12:00</p>']}],
|
|
80
|
-
buttonList:[{name:'我是标签1',scope:'',test:''},{name:'我是标签2'}]
|
|
81
|
-
}},
|
|
82
|
-
{content:{
|
|
83
|
-
htmlList:[{type:'SINGLE',list:['<p>aaaaa</p>','<a>我是链接</a>']},{type:'DOUBLE',list:['<p>aaaaa</p>','<div>bbbbb</div>']},{type:'TRIPLE',list:['<p>7:00</p>','<div></div>','<p>ccccc</p>']},{type:'TRIPLE',list:['<p>7:00</p>','<div>bbbbb</div>','<p>12:00</p>']}],
|
|
84
|
-
buttonList:[{name:'我是标签1',scope:'',test:''}]
|
|
85
|
-
}},
|
|
86
|
-
{content:{
|
|
87
|
-
htmlList:[{type:'SINGLE',list:['<p>邓伦李沁的背景图片</p>']},{type:'SINGLE',list:['<p>男生藏快递向求婚被他人错拆</p>']},{type:'SINGLE',list:['<p>aaaaa</p>']},{type:'SINGLE',list:['<p>aaaaa</p>']}],
|
|
88
|
-
buttonList:[{name:'我是标签1'}]
|
|
89
|
-
}}
|
|
90
|
-
|
|
91
|
-
]
|
|
92
|
-
},
|
|
93
|
-
device:'PC',
|
|
94
|
-
slideWidth:'',
|
|
95
|
-
swiperStyle: {},
|
|
96
|
-
currIndex: 1,
|
|
97
|
-
distance:0,
|
|
98
|
-
isAndroid:false,
|
|
99
|
-
isIos:false,
|
|
100
|
-
isPhone:false,
|
|
101
|
-
isCompany:false,
|
|
102
|
-
swiper:false,
|
|
103
|
-
text:[],
|
|
104
|
-
textarea:[],
|
|
105
|
-
onoff:true
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
|
-
created() {
|
|
109
|
-
this.isIosOrIsAndroid()
|
|
110
|
-
this.isMobile()
|
|
111
|
-
},
|
|
112
|
-
mounted() {
|
|
113
|
-
|
|
114
|
-
},
|
|
115
|
-
methods:{
|
|
116
|
-
SwiperImgLoad() {
|
|
117
|
-
if (!this.loadCheck) {
|
|
118
|
-
this.$emit("SwiperImgLoadEvent");
|
|
119
|
-
this.loadCheck = true;
|
|
120
|
-
}
|
|
121
|
-
},
|
|
122
|
-
slideLoadOn() {
|
|
123
|
-
this.$refs.swiper.slideOn();
|
|
124
|
-
},
|
|
125
|
-
btnClick(items){
|
|
126
|
-
items.apiKey=this.content.apiKey
|
|
127
|
-
let that = this;
|
|
128
|
-
if (that.onoff) {
|
|
129
|
-
that.onoff = false;
|
|
130
|
-
console.debug('card_template',items)
|
|
131
|
-
this.$emit('btnClick',items,this.content.apiKey)
|
|
132
|
-
setTimeout(function () {
|
|
133
|
-
that.onoff = true;
|
|
134
|
-
}, 600)
|
|
135
|
-
} else {
|
|
136
|
-
//如果一直走else分支可能是你没有在页面的data下面挂载onoff:true,不然一直都会走else
|
|
137
|
-
console.debug("请稍后点击")
|
|
138
|
-
}
|
|
139
|
-
},
|
|
140
|
-
|
|
141
|
-
isIosOrIsAndroid(){
|
|
142
|
-
var u = navigator.userAgent;
|
|
143
|
-
var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端
|
|
144
|
-
var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
|
|
145
|
-
if(isAndroid){
|
|
146
|
-
this.isAndroid=true
|
|
147
|
-
}
|
|
148
|
-
if(isiOS){
|
|
149
|
-
this.isIos=true
|
|
150
|
-
}
|
|
151
|
-
},
|
|
152
|
-
isMobile() {
|
|
153
|
-
let flag = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);
|
|
154
|
-
if (flag) {
|
|
155
|
-
this.isPhone=true
|
|
156
|
-
}
|
|
157
|
-
else
|
|
158
|
-
{
|
|
159
|
-
this.isCompany=true
|
|
160
|
-
}
|
|
161
|
-
},
|
|
162
|
-
touchMove(){
|
|
163
|
-
|
|
164
95
|
},
|
|
165
|
-
|
|
166
|
-
|
|
96
|
+
{
|
|
97
|
+
content: {
|
|
98
|
+
htmlList: [{ type: 'SINGLE', list: ['<p>邓伦李沁的背景图片</p>'] }, { type: 'SINGLE', list: ['<p>男生藏快递向求婚被他人错拆</p>'] }, { type: 'SINGLE', list: ['<p>aaaaa</p>'] }, { type: 'SINGLE', list: ['<p>aaaaa</p>'] }],
|
|
99
|
+
buttonList: [{ name: '我是标签1' }]
|
|
100
|
+
}
|
|
167
101
|
}
|
|
168
102
|
|
|
169
|
-
|
|
103
|
+
]
|
|
104
|
+
},
|
|
105
|
+
device: 'PC',
|
|
106
|
+
slideWidth: '',
|
|
107
|
+
swiperStyle: {},
|
|
108
|
+
currIndex: 1,
|
|
109
|
+
distance: 0,
|
|
110
|
+
isAndroid: false,
|
|
111
|
+
isIos: false,
|
|
112
|
+
isPhone: false,
|
|
113
|
+
isCompany: false,
|
|
114
|
+
swiper: false,
|
|
115
|
+
text: [],
|
|
116
|
+
textarea: [],
|
|
117
|
+
onoff: true
|
|
170
118
|
}
|
|
119
|
+
},
|
|
120
|
+
created() {
|
|
121
|
+
this.isIosOrIsAndroid()
|
|
122
|
+
this.isMobile()
|
|
123
|
+
},
|
|
124
|
+
mounted() {
|
|
125
|
+
if (this.content.version == 1) {
|
|
126
|
+
this.content.cards.forEach(element => {
|
|
127
|
+
element.content.htmlList.forEach((item) => {
|
|
128
|
+
item.tampList = [];
|
|
129
|
+
item.list.forEach((cell, cellIndex) => {
|
|
130
|
+
let tampCell = {
|
|
131
|
+
html: cell,
|
|
132
|
+
style: item.style[cellIndex]
|
|
133
|
+
}
|
|
134
|
+
item.tampList.push(tampCell);
|
|
135
|
+
})
|
|
136
|
+
})
|
|
137
|
+
});
|
|
138
|
+
this.content.cards = [...this.content.cards];
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
methods: {
|
|
142
|
+
SwiperImgLoad() {
|
|
143
|
+
if (!this.loadCheck) {
|
|
144
|
+
this.$emit("SwiperImgLoadEvent");
|
|
145
|
+
this.loadCheck = true;
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
slideLoadOn() {
|
|
149
|
+
this.$refs.swiper.slideOn();
|
|
150
|
+
},
|
|
151
|
+
btnClick(items) {
|
|
152
|
+
items.apiKey = this.content.apiKey
|
|
153
|
+
let that = this;
|
|
154
|
+
if (that.onoff) {
|
|
155
|
+
that.onoff = false;
|
|
156
|
+
console.debug('card_template', items)
|
|
157
|
+
this.$emit('btnClick', items, this.content.apiKey)
|
|
158
|
+
setTimeout(function () {
|
|
159
|
+
that.onoff = true;
|
|
160
|
+
}, 600)
|
|
161
|
+
} else {
|
|
162
|
+
//如果一直走else分支可能是你没有在页面的data下面挂载onoff:true,不然一直都会走else
|
|
163
|
+
console.debug("请稍后点击")
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
|
|
167
|
+
isIosOrIsAndroid() {
|
|
168
|
+
var u = navigator.userAgent;
|
|
169
|
+
var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端
|
|
170
|
+
var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
|
|
171
|
+
if (isAndroid) {
|
|
172
|
+
this.isAndroid = true
|
|
173
|
+
}
|
|
174
|
+
if (isiOS) {
|
|
175
|
+
this.isIos = true
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
isMobile() {
|
|
179
|
+
let flag = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);
|
|
180
|
+
if (flag) {
|
|
181
|
+
this.isPhone = true
|
|
182
|
+
}
|
|
183
|
+
else {
|
|
184
|
+
this.isCompany = true
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
touchMove() {
|
|
188
|
+
|
|
189
|
+
},
|
|
190
|
+
touchEnd(index) {
|
|
191
|
+
this.$emit('touchEnd', index)
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
},
|
|
195
|
+
}
|
|
171
196
|
</script>
|
|
172
197
|
|
|
173
198
|
<style lang="less">
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
199
|
+
@import "../../assets/less/ticketMessage";
|
|
200
|
+
|
|
201
|
+
a {
|
|
202
|
+
text-decoration: none;
|
|
177
203
|
}
|
|
178
204
|
</style>
|
|
@@ -304,6 +304,7 @@ export default {
|
|
|
304
304
|
if (findPage) {
|
|
305
305
|
let AllLines = findPage.allLines
|
|
306
306
|
// setTimeout(() => {
|
|
307
|
+
console.log(findPage,'findPage');
|
|
307
308
|
if (AllLines.length > 0) {
|
|
308
309
|
for (let j = 0; j < AllLines.length; j++) {
|
|
309
310
|
let lines = AllLines[j].lines
|
|
@@ -327,7 +328,7 @@ export default {
|
|
|
327
328
|
div.classList.add('lineHeight')
|
|
328
329
|
rectdom.appendChild(div)
|
|
329
330
|
if(index == 0 && j == 0) {
|
|
330
|
-
rectdomTop = postionArr[1]
|
|
331
|
+
rectdomTop = (postionArr[1] + postionArr[3] / 9) * this.scale
|
|
331
332
|
if(this.isPC) {
|
|
332
333
|
rectdomTop = rectdomTop - 50 < 0 ? 0 : rectdomTop - 50
|
|
333
334
|
}
|
|
@@ -384,6 +385,7 @@ export default {
|
|
|
384
385
|
}
|
|
385
386
|
|
|
386
387
|
if (this.$refs.pdfView.scrollTop == Math.floor((pageNo - 1) * pageoffsetHeight)) {
|
|
388
|
+
this.$refs.pdfView.scrollTop = rectdomTop * this.transformSalce
|
|
387
389
|
this.fisrtLoad = false
|
|
388
390
|
} else {
|
|
389
391
|
this.$refs.pdfView.scrollTop = `${((pageNo - 1) * pageoffsetHeight) + rectdomTop - this.PAGE_INTVERVAL}`
|
|
@@ -566,6 +568,7 @@ export default {
|
|
|
566
568
|
if(this.preViewType !== 'pdf') {
|
|
567
569
|
return
|
|
568
570
|
}
|
|
571
|
+
|
|
569
572
|
let pdfResloute = this.cachePdf[currentPage]
|
|
570
573
|
this.identifyTextPostion.extractInfo = pdfResloute.extractInfo
|
|
571
574
|
this.identifyTextPostion.left = pdfResloute.extractInfo.location[0]
|