最近业务调整
This commit is contained in:
2
App.vue
2
App.vue
@@ -62,6 +62,6 @@ img {
|
||||
--font-button-size:24rpx;
|
||||
--font-button-size-p:28rpx;
|
||||
/* tab图标 */
|
||||
--tab-url:url('https://test.vespa.qxyushen.top/h5/image/tabline.png');
|
||||
--tab-url:url('https://yushengapi.qxyushen.top/h5/image/tabline.png');
|
||||
}
|
||||
</style>
|
||||
@@ -2,6 +2,7 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/3.11.174/pdf.min.js"></script> -->
|
||||
<script>
|
||||
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
|
||||
CSS.supports('top: constant(a)'))
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
"name" : "Vespa",
|
||||
"appid" : "__UNI__A4B5AED",
|
||||
"description" : "",
|
||||
"external" : true,
|
||||
"versionName" : "1.0.0",
|
||||
"versionCode" : "100",
|
||||
"transformPx" : false,
|
||||
@@ -39,6 +40,10 @@
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
||||
"<uses-permission android:name=\"android.permissiOn.INTERNET\" />",
|
||||
"<uses-permission android:name=\"android.permissiOn.ACCESS NETWORK STATE\" />",
|
||||
"<uses-permission android:name=\"android.permiSSiOn.WRITE EXTERNAL STORAGE\" />",
|
||||
"<uses-permission android:name=\"android.permissiOn.READ EXTERNAL STORAGE\" />",
|
||||
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
||||
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
"dependencies": {
|
||||
"axios": "^1.9.0",
|
||||
"office-viewer": "^0.3.14",
|
||||
"simple-pdf-viewer": "^2.0.3",
|
||||
"video-animation-player": "^1.0.5",
|
||||
"vue-i18n": "^11.1.5"
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="view-page" :style="{backgroundImage : `url('${ThemeData?.app_bg || $config.PRIMARY_BGURL}')`}">
|
||||
<view class="view-page" :style="{backgroundImage: `url('${ThemeData ? ThemeData.app_bg : baseBgUrl }')`}">
|
||||
<navBar :style="{marginTop: `${statusBarHeight}${uni.getSystemInfoSync().platform === 'ios' ? 'px': 'dp'}`}" :navTitle="'在线客服'" :emitBack="false">
|
||||
</navBar>
|
||||
<view class="">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="view-page" :style="{backgroundImage : `url('${ThemeData?.app_bg || baseBgUrl}')`}">
|
||||
<view class="view-page" :style="{backgroundImage: `url('${ThemeData ? ThemeData.app_bg : baseBgUrl }')`}">
|
||||
<!-- <headerHeight /> -->
|
||||
<navBar :style="{marginTop: `${statusBarHeight}${uni.getSystemInfoSync().platform === 'ios' ? 'px': 'dp'}`}" :navTitle="'帮助与反馈'" :emitBack="true" @backEvent="back">
|
||||
</navBar>
|
||||
@@ -20,7 +20,7 @@
|
||||
<view class="problem-view">
|
||||
<view class="problem-box" v-for="(item,index) in problemList" :key="index">
|
||||
<view class="box-title color-0 font-w500 font-32">
|
||||
{{!item.id ? item.title : `${typeData?.type_name}相关问题`}}
|
||||
{{!item.id ? item.title : `${typeData? typeData.type_name : ''}相关问题`}}
|
||||
</view>
|
||||
<view class="box-content" v-if="item.list && item.list.length !== 0">
|
||||
<template v-if="item.id">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="view-page" :style="{backgroundImage : `url('${ThemeData?.app_bg || $config.PRIMARY_BGURL}')`}">
|
||||
<view class="view-page" :style="{backgroundImage: `url('${ThemeData ? ThemeData.app_bg : baseBgUrl }')`}">
|
||||
<navBar :style="{marginTop: `${statusBarHeight}${uni.getSystemInfoSync().platform === 'ios' ? 'px': 'dp'}`}" :navTitle="'青少年模式'" :emitBack="true" @backEvent="back">
|
||||
</navBar>
|
||||
<view class="content-view">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="view-page" :style="{backgroundImage : `url('${ThemeData?.app_bg || $config.PRIMARY_BGURL}')`}">
|
||||
<view class="view-page" :style="{backgroundImage: `url('${ThemeData ? ThemeData.app_bg : baseBgUrl }')`}">
|
||||
<headerHeight />
|
||||
<navBar :navTitle="'内容详情'">
|
||||
</navBar>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="view-page" :style="{backgroundImage : `url('${ThemeData?.app_bg || $config.PRIMARY_BGURL}')`}">
|
||||
<view class="view-page" :style="{backgroundImage: `url('${ThemeData ? ThemeData.app_bg : baseBgUrl }')`}">
|
||||
<!-- <headerHeight /> -->
|
||||
<navBar :style="{marginTop: `${statusBarHeight}${uni.getSystemInfoSync().platform === 'ios' ? 'px': 'dp'}`}" :navTitle="`关于我们`" :emitBack="true" @backEvent="back">
|
||||
</navBar>
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
// 财富等级
|
||||
this.getWealthLevel()
|
||||
} else if(this.currentIndex === 2) {
|
||||
console.log('歌手等级')
|
||||
// console.log('歌手等级')
|
||||
this.getSingerLevel()
|
||||
}
|
||||
},
|
||||
@@ -171,7 +171,7 @@
|
||||
data,
|
||||
code
|
||||
} = response
|
||||
this.userSinger = data.status ? true : false
|
||||
this.userSinger = true
|
||||
this.userSingerLevel = Number(data.level)
|
||||
}).catch(error => {
|
||||
this.userSinger = false
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="view-page" :style="{backgroundImage : `url('${ThemeData?.app_bg || $config.PRIMARY_BGURL}')`}">
|
||||
<view class="view-page" :style="{backgroundImage: `url('${ThemeData ? ThemeData.app_bg : baseBgUrl }')`}">
|
||||
<navBar :navTitle="`规则说明`" :style="{'margin-top' : `${statusBarHeight || 0}px`}">
|
||||
</navBar>
|
||||
<view class="dec-view" v-if="flagIndex !== null">
|
||||
|
||||
@@ -202,6 +202,8 @@
|
||||
if (is_show) {
|
||||
const flag = Number(is_show)
|
||||
this.isShow = flag === 1 ? true : false
|
||||
} else {
|
||||
this.isShow = true
|
||||
}
|
||||
if (uni.getStorageSync('token')) this.gettabs()
|
||||
},
|
||||
@@ -362,15 +364,12 @@
|
||||
// 点击去充值
|
||||
RechargeCoin() {
|
||||
const platform = uni.getSystemInfoSync().platform;
|
||||
// console.log(platform, '打印设备参数')
|
||||
if (platform === 'ios') {
|
||||
console.log('调用iOS原生方法')
|
||||
// 通过 messageHandlers 调用 iOS 原生方法
|
||||
window.webkit.messageHandlers.nativeHandler.postMessage({
|
||||
'action': 'Recharge'
|
||||
});
|
||||
} else if (platform === 'android') {
|
||||
console.log('调用Android原生方法')
|
||||
// 调用 Android 原生方法
|
||||
window.Android.Recharge();
|
||||
|
||||
|
||||
@@ -1,21 +1,24 @@
|
||||
<template>
|
||||
<view class="view-page" :style="{backgroundImage: `url('${ThemeData?.app_bg || baseBgUrl}')`}">
|
||||
<view class="view-page" :style="{backgroundImage: `url('${ThemeData ? ThemeData.app_bg : baseBgUrl }')`}">
|
||||
<navBar :style="{marginTop: `${statusBarHeight}${uni.getSystemInfoSync().platform === 'ios' ? 'px': 'dp'}`}"
|
||||
:navTitle="'公会协议'">
|
||||
</navBar>
|
||||
<view class="dec-view" v-if="detailData">
|
||||
<web-view :src="detailData.agreement"></web-view>
|
||||
<view class="" v-for="(item,index) in agreemenrList" :key="index">
|
||||
<img :src="item" alt="" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import PdfCanvasViewer from '@/component/pdf-canvas-viewer.vue';
|
||||
import http from '@/until/http.js';
|
||||
import navBar from '@/component/nav.vue';
|
||||
import config from '@/until/config.js';
|
||||
export default {
|
||||
components: {
|
||||
navBar
|
||||
// PdfCanvasViewer
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -23,7 +26,9 @@
|
||||
unionBgUrl: config.unicon_url || '',
|
||||
statusBarHeight: 0,
|
||||
ThemeData: null,
|
||||
detailData:null
|
||||
detailData: null,
|
||||
isAndroid: false,
|
||||
agreemenrList: []
|
||||
|
||||
}
|
||||
},
|
||||
@@ -34,18 +39,20 @@
|
||||
this.statusBarHeight = h
|
||||
uni.setStorageSync('BarHeight', h)
|
||||
if (uni.getStorageSync('token')) this.getInfo()
|
||||
|
||||
},
|
||||
methods: {
|
||||
async getInfo() {
|
||||
http.get('/api/Guild/my_guild', {
|
||||
token: uni.getStorageSync('token') || ''
|
||||
}).then(response => {
|
||||
|
||||
const {
|
||||
data,
|
||||
code
|
||||
} = response
|
||||
// console.log(data)
|
||||
this.detailData = code ? data : false
|
||||
this.agreemenrList = this.detailData.agreement.split(',')
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="view-page" :style="{backgroundImage: `url('${ThemeData?.app_bg || baseBgUrl}')`}">
|
||||
<view class="view-page" :style="{backgroundImage: `url('${ThemeData ? ThemeData.app_bg : baseBgUrl }')`}">
|
||||
<headerHeight />
|
||||
<navBar :navTitle="`退出审核`">
|
||||
</navBar>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="view-page" :style="{backgroundImage: `url('${ThemeData?.app_bg || baseBgUrl}')`}">
|
||||
<view class="view-page" :style="{backgroundImage: `url('${ThemeData ? ThemeData.app_bg : baseBgUrl }')`}">
|
||||
<headerHeight />
|
||||
<navBar :navTitle="`历史记录`">
|
||||
</navBar>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="view-page" :style="{backgroundImage: `url('${ThemeData?.app_bg || baseBgUrl}')`}">
|
||||
<view class="view-page" :style="{backgroundImage: `url('${ThemeData ? ThemeData.app_bg : baseBgUrl }')`}">
|
||||
<navBar :style="{marginTop: `${statusBarHeight}${uni.getSystemInfoSync().platform === 'ios' ? 'px': 'dp'}`}"
|
||||
:navTitle="'我的公会'" :emitBack="true" @backEvent="back">
|
||||
<template #rightView>
|
||||
@@ -118,6 +118,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import { previewPdf } from '@/uni_modules/simple-pdf-viewer/esm2015/simple-pdf-viewer.js';
|
||||
import navBar from '@/component/nav.vue';
|
||||
import http from '@/until/http.js';
|
||||
import logo from '@/static/image/logo.png';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="view-page" :style="{backgroundImage: `url('${ThemeData?.app_bg || baseBgUrl}')`}">
|
||||
<view class="view-page" :style="{backgroundImage: `url('${ThemeData ? ThemeData.app_bg : baseBgUrl }')`}">
|
||||
<navBar :style="{marginTop: `${statusBarHeight}${uni.getSystemInfoSync().platform === 'ios' ? 'px': 'dp'}`}"
|
||||
:navTitle="'公会中心'">
|
||||
<template #rightView>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="view-page" :style="{backgroundImage : `url('${ThemeData?.app_bg || $config.PRIMARY_BGURL}')`}">
|
||||
<view class="view-page" :style="{backgroundImage: `url('${ThemeData ? ThemeData.app_bg : baseBgUrl }')`}">
|
||||
<!-- <headerHeight /> -->
|
||||
<navBar :navTitle="'查看成员'" :style="{marginTop: `${statusBarHeight}${uni.getSystemInfoSync().platform === 'ios' ? 'px': 'dp'}`}">
|
||||
</navBar>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<view class="view-page" :style="{backgroundImage : `url('${ThemeData?.app_bg || $config.PRIMARY_BGURL}')`}">
|
||||
<!-- <headerHeight /> -->
|
||||
<view class="view-page" :style="{backgroundImage: `url('${ThemeData ? ThemeData.app_bg : baseBgUrl }')`}">
|
||||
<navBar :style="{marginTop: `${statusBarHeight}${uni.getSystemInfoSync().platform === 'ios' ? 'px': 'dp'}`}"
|
||||
:navTitle="'群聊设置'" :emitBack="true" @backEvent="back">
|
||||
</navBar>
|
||||
@@ -105,7 +104,6 @@
|
||||
} = options
|
||||
uni.setStorageSync('token', id)
|
||||
this.guildId = guildId || ''
|
||||
this.formType = type
|
||||
if (uni.getStorageSync('token')) {
|
||||
this.getInfo()
|
||||
}
|
||||
|
||||
2829
pnpm-lock.yaml
generated
2829
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
21
uni_modules/simple-pdf-viewer/LICENSE
Normal file
21
uni_modules/simple-pdf-viewer/LICENSE
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2018 Viktor Hajer
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
54
uni_modules/simple-pdf-viewer/README.md
Normal file
54
uni_modules/simple-pdf-viewer/README.md
Normal file
@@ -0,0 +1,54 @@
|
||||
<h1 align="center">Simple PDF Viewer</h1>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://www.npmjs.com/package/simple-pdf-viewer">
|
||||
<img src="https://img.shields.io/npm/dm/simple-pdf-viewer.svg?style=flat" alt="downloads">
|
||||
</a>
|
||||
<a href="https://badge.fury.io/js/simple-pdf-viewer">
|
||||
<img src="https://badge.fury.io/js/simple-pdf-viewer.svg" alt="npm version">
|
||||
</a>
|
||||
<a href="https://david-dm.org/viktorhajer/simple-pdf-viewer" title="dependencies status">
|
||||
<img src="https://david-dm.org/viktorhajer/simple-pdf-viewer/status.svg"/>
|
||||
</a>
|
||||
<a href="https://travis-ci.org/viktorhajer/simple-pdf-viewer" title="test">
|
||||
<img src="https://travis-ci.org/viktorhajer/simple-pdf-viewer.svg?branch=master"/>
|
||||
</a>
|
||||
<a href="https://www.paypal.me/viktorhajer" title="Donate to this project using Paypal">
|
||||
<img src="https://img.shields.io/badge/paypal-donate-green.svg" alt="PayPal donate button" />
|
||||
</a>
|
||||
</p>
|
||||
|
||||
This is a simple but smart PDF Viewer component for angular/ionic websites.
|
||||
|
||||
### Demo page
|
||||
[https://viktorhajer.github.io/simple-pdf-viewer/](https://viktorhajer.github.io/simple-pdf-viewer/)
|
||||
|
||||
### Features
|
||||
|
||||
* Open: the src can be one of the following: file URL, Uint8Array or PDFSource
|
||||
* Separated methods to open javascript File object or http URL
|
||||
* Display: PDF conatiner is displayed
|
||||
* Information: number of pages, viewport information (zoom, rotation...), meta information (author, subject, creator...)
|
||||
* Navigation: navigate to the first page, the last page, next page, previous page and any of the pages
|
||||
* Zooming: zoon in, zoom out, full page, page width, page height, set any zoom as double or percent
|
||||
* Rotation: turn the document left or right (+/- 90 degree)
|
||||
* Outline / Table of Content: provides the outline if exists and possiblity to navigate to the outline item
|
||||
* Searching: case sensitive/insensitve text search (```phraseSearch``` and ```highlightAll``` can be turn on/off), go to next/prev match, number of matches
|
||||
* Bookmarks: create bookmark based on the actual viewport and that can be used for navigation
|
||||
* Snapshot: create snapshot about the actual page, scale can be specified (1.0 by default)
|
||||
|
||||
### Installation Instructions and Usage
|
||||
[https://github.com/viktorhajer/simple-pdf-viewer/wiki/How-to-use](https://github.com/viktorhajer/simple-pdf-viewer/wiki/How-to-use)
|
||||
|
||||
### Type Documentation
|
||||
[https://github.com/viktorhajer/simple-pdf-viewer/wiki/API-Documentation](https://github.com/viktorhajer/simple-pdf-viewer/wiki/API-Documentation)
|
||||
|
||||
### Screenshot
|
||||
|
||||
<img src="/src/assets/screen_1.png" alt="Screenshot" style="width: 450px;"/>
|
||||
|
||||
### Contribute
|
||||
[See CONTRIBUTING.md](CONTRIBUTING.md)
|
||||
|
||||
### License
|
||||
[MIT](https://tldrlegal.com/license/mit-license) © [Viktor Hajer](https://github.com/viktorhajer)
|
||||
995
uni_modules/simple-pdf-viewer/bundles/simple-pdf-viewer.umd.js
Normal file
995
uni_modules/simple-pdf-viewer/bundles/simple-pdf-viewer.umd.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
uni_modules/simple-pdf-viewer/bundles/simple-pdf-viewer.umd.min.js
vendored
Normal file
2
uni_modules/simple-pdf-viewer/bundles/simple-pdf-viewer.umd.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1178
uni_modules/simple-pdf-viewer/esm2015/simple-pdf-viewer.js
Normal file
1178
uni_modules/simple-pdf-viewer/esm2015/simple-pdf-viewer.js
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
990
uni_modules/simple-pdf-viewer/esm5/simple-pdf-viewer.js
Normal file
990
uni_modules/simple-pdf-viewer/esm5/simple-pdf-viewer.js
Normal file
File diff suppressed because one or more lines are too long
16
uni_modules/simple-pdf-viewer/esm5/simple-pdf-viewer.js.map
Normal file
16
uni_modules/simple-pdf-viewer/esm5/simple-pdf-viewer.js.map
Normal file
File diff suppressed because one or more lines are too long
243
uni_modules/simple-pdf-viewer/libs/simple-pdf-viewer/src/simplePdfViewer.component.d.ts
vendored
Normal file
243
uni_modules/simple-pdf-viewer/libs/simple-pdf-viewer/src/simplePdfViewer.component.d.ts
vendored
Normal file
@@ -0,0 +1,243 @@
|
||||
/// <reference types="pdfjs-dist" />
|
||||
/**
|
||||
* Created by Viktor Hajer on 02/08/2018.
|
||||
*/
|
||||
import { ElementRef, EventEmitter, OnInit, OnDestroy } from '@angular/core';
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { SimpleSearchState, SimpleDocumentInfo, SimpleOutlineNode, SimpleProgressData, SimpleSearchOptions, SimplePDFBookmark } from './simplePdfViewer.models';
|
||||
/**
|
||||
* Simple PDF Viewer component
|
||||
*/
|
||||
export declare class SimplePdfViewerComponent implements OnInit, OnDestroy {
|
||||
private element;
|
||||
private http;
|
||||
private static readonly CSS_UNITS;
|
||||
private static readonly PAGE_RESIZE_BORDER_HEIGHT;
|
||||
private static readonly PAGE_RESIZE_BORDER_WIDTH;
|
||||
private static readonly ZOOM_UNIT;
|
||||
private static readonly MAX_ZOOM;
|
||||
private static readonly MIN_ZOOM;
|
||||
private static readonly PDF_FINDER_FIND_COMMAND;
|
||||
private static readonly PDF_FINDER_AGAIN_COMMAND;
|
||||
private static readonly PDF_VIEWER_DEFAULT_SCALE;
|
||||
private static readonly SNAPSHOT_TPYE;
|
||||
/**
|
||||
* Source of the PDF document (Required)
|
||||
*/
|
||||
src: string | Uint8Array | PDF.PDFSource;
|
||||
/**
|
||||
* Page border is displayed or not (Optional)
|
||||
*/
|
||||
removePageBorders: boolean;
|
||||
/**
|
||||
* Text layer is displayed or not (Optional)
|
||||
*/
|
||||
disableTextLayer: boolean;
|
||||
onLoadComplete: EventEmitter<void>;
|
||||
onError: EventEmitter<any>;
|
||||
onProgress: EventEmitter<SimpleProgressData>;
|
||||
onSearchStateChange: EventEmitter<SimpleSearchState>;
|
||||
private startAt;
|
||||
private loaded;
|
||||
private currentPage;
|
||||
private numberOfPages;
|
||||
private outline;
|
||||
private information;
|
||||
private zoom;
|
||||
private rotation;
|
||||
private pdf;
|
||||
private pdfLinkService;
|
||||
private pdfViewer;
|
||||
private pdfFindController;
|
||||
private searching;
|
||||
private lastSearchText;
|
||||
private searchPrevious;
|
||||
private searchOptions;
|
||||
constructor(element: ElementRef, http: HttpClient);
|
||||
ngOnInit(): void;
|
||||
ngOnDestroy(): void;
|
||||
/**
|
||||
* Open a PDF document at the specified page (at the first page by default)
|
||||
* @param src Source of the PDF document
|
||||
* @param startAt The bookmark where should start, default: at the first page
|
||||
*/
|
||||
openDocument(src: string | Uint8Array | PDF.PDFSource, startAt?: SimplePDFBookmark): void;
|
||||
/**
|
||||
* Open a PDF document at the specified page (at the first page by default)
|
||||
* @param file The File source of the PDF document
|
||||
* @param startAt The bookmark where should start, default: at the first page
|
||||
*/
|
||||
openFile(file: File, startAt?: SimplePDFBookmark): void;
|
||||
/**
|
||||
* Open a PDF document at the specified page (at the first page by default)
|
||||
* @param url The url of the PDF document
|
||||
* @param startAt The bookmark where should start, default: at the first page
|
||||
*/
|
||||
openUrl(url: string, startAt?: SimplePDFBookmark): void;
|
||||
/**
|
||||
* Returns whether the PDF document is loaded properly
|
||||
*/
|
||||
isDocumentLoaded(): boolean;
|
||||
private initPDFJS();
|
||||
private pagesinitEventListener();
|
||||
private pagechangeEventListener();
|
||||
private updateviewareaEventListener();
|
||||
private setAndParseSrc(src);
|
||||
private loadFile();
|
||||
private resetParameters();
|
||||
private mapOutline(nodes);
|
||||
private getContainer();
|
||||
/**
|
||||
* Returns the basic information about the PDF document
|
||||
*/
|
||||
getDocumentInformation(): SimpleDocumentInfo[];
|
||||
/**
|
||||
* Returns the value of the viewport scale
|
||||
*/
|
||||
getZoom(): number;
|
||||
/**
|
||||
* Returns the value of the viewport scale in %
|
||||
*/
|
||||
getZoomPercent(): number;
|
||||
/**
|
||||
* Increases the scale of the PDF viewport
|
||||
*/
|
||||
zoomIn(): void;
|
||||
/**
|
||||
* Decreases the scale of the PDF viewport
|
||||
*/
|
||||
zoomOut(): void;
|
||||
/**
|
||||
* Sets the original viewport scale back to 1.0
|
||||
*/
|
||||
zoomReset(): void;
|
||||
/**
|
||||
* Sets the scale of the PDF viewport to fit in the actual screen
|
||||
*/
|
||||
zoomFullPage(): void;
|
||||
/**
|
||||
* Sets the scale of the PDF viewport to fit in the actual screen (width priority)
|
||||
*/
|
||||
zoomPageWidth(): void;
|
||||
/**
|
||||
* Sets the scale of the PDF viewport to fit in the actual screen (height priority)
|
||||
*/
|
||||
zoomPageHeight(): void;
|
||||
private getScale(page, priority?);
|
||||
/**
|
||||
* Set the zoom of the document in double
|
||||
* @param scale The zoom value in double
|
||||
*/
|
||||
setZoom(scale: number): void;
|
||||
/**
|
||||
* Set the zoom of the document in percent
|
||||
* @param zoom The scale value in percent
|
||||
*/
|
||||
setZoomInPercent(zoom: number): void;
|
||||
private normalizeScale(scale);
|
||||
/**
|
||||
* Starts case sensitive/insensitive text search and navigate to the first match (from the actual page)
|
||||
* @param text searched text
|
||||
* @param searchOptions set true to use case sensitive searching (false by default)
|
||||
*/
|
||||
search(text: string, searchOptions?: SimpleSearchOptions): void;
|
||||
/**
|
||||
* Navigates to the next search match if there were multiple hits
|
||||
*/
|
||||
nextMatch(): void;
|
||||
/**
|
||||
* Navigates to the previous search match if there were multiple hits
|
||||
*/
|
||||
previousMatch(): void;
|
||||
private stepMatch(findPrevious);
|
||||
private searchAgain();
|
||||
/**
|
||||
* Returns the number of the search hits
|
||||
*/
|
||||
getNumberOfMatches(): number;
|
||||
/**
|
||||
* Returns whether there is a matched item
|
||||
*/
|
||||
hasMatches(): boolean;
|
||||
/**
|
||||
* Returns whether the search is in-progress
|
||||
*/
|
||||
isSearching(): boolean;
|
||||
private onUpdateResultsCount();
|
||||
private onUpdateState(state);
|
||||
/**
|
||||
* Returns the number of the actual page
|
||||
*/
|
||||
getCurrentPage(): number;
|
||||
/**
|
||||
* Returns the number of the pages
|
||||
*/
|
||||
getNumberOfPages(): number;
|
||||
/**
|
||||
* Returns outline / table of content in tree structure
|
||||
*/
|
||||
getOutline(): SimpleOutlineNode[];
|
||||
/**
|
||||
* Returns whether the outline is available
|
||||
*/
|
||||
hasOutline(): boolean;
|
||||
/**
|
||||
* Navigates to the specified (outline) destination/chapter
|
||||
* @param destination the destination object of the outline item
|
||||
*/
|
||||
navigateToChapter(destination: any): void;
|
||||
/**
|
||||
* Navigates to the first page
|
||||
*/
|
||||
firstPage(): void;
|
||||
/**
|
||||
* Navigates to the last page
|
||||
*/
|
||||
lastPage(): void;
|
||||
/**
|
||||
* Navigates to the next page
|
||||
*/
|
||||
nextPage(): void;
|
||||
/**
|
||||
* Navigates to the previous page
|
||||
*/
|
||||
prevPage(): void;
|
||||
/**
|
||||
* Navigates to the specified page
|
||||
* @param page the number of the page
|
||||
* @param pageDefault
|
||||
*/
|
||||
navigateToPage(page: number, pageDefault?: number): void;
|
||||
/**
|
||||
* Sets the rotation to the default 0 degree
|
||||
*/
|
||||
resetRotation(): void;
|
||||
/**
|
||||
* Turns left the document with 90 degree (counterclockwise)
|
||||
*/
|
||||
turnLeft(): void;
|
||||
/**
|
||||
* Turns right the document with 90 degree (clockwise)
|
||||
*/
|
||||
turnRight(): void;
|
||||
/**
|
||||
* Returns the actual rotation value in degree
|
||||
*/
|
||||
getRotation(): number;
|
||||
private rotate(angle?);
|
||||
/**
|
||||
* Creates bookmark object based on the current viewport and page number.
|
||||
* The object can be passed to the #navigateToBookmark method.
|
||||
*/
|
||||
createBookmark(): Promise<SimplePDFBookmark>;
|
||||
/**
|
||||
* Navigates to the specified bookmark
|
||||
*/
|
||||
navigateToBookmark(bookmark: SimplePDFBookmark): void;
|
||||
/**
|
||||
* Create a snapshot image (PNG) based about the current page
|
||||
* @param scale the value of the viewport scale, it is 1 by default
|
||||
*/
|
||||
getPageSnapshot(scale?: number): Promise<File>;
|
||||
private dataURItoFile(dataURI);
|
||||
}
|
||||
74
uni_modules/simple-pdf-viewer/libs/simple-pdf-viewer/src/simplePdfViewer.models.d.ts
vendored
Normal file
74
uni_modules/simple-pdf-viewer/libs/simple-pdf-viewer/src/simplePdfViewer.models.d.ts
vendored
Normal file
@@ -0,0 +1,74 @@
|
||||
/**
|
||||
* Enum for searching state
|
||||
*/
|
||||
export declare enum SimpleSearchState {
|
||||
FOUND = 0,
|
||||
NOT_FOUND = 1,
|
||||
WRAPPED = 2,
|
||||
PENDING = 3,
|
||||
}
|
||||
/**
|
||||
* PDF Document basic information representation
|
||||
*/
|
||||
export declare class SimpleDocumentInfo {
|
||||
key: string;
|
||||
value: string;
|
||||
constructor(key: string, value: string);
|
||||
}
|
||||
/**
|
||||
* Representation of the Outline nodes
|
||||
*/
|
||||
export declare class SimpleOutlineNode {
|
||||
title: string;
|
||||
dest: any;
|
||||
items: SimpleOutlineNode[];
|
||||
constructor(title: string, dest: any, items: SimpleOutlineNode[]);
|
||||
}
|
||||
/**
|
||||
* Representation of the loading progress
|
||||
*/
|
||||
export declare class SimpleProgressData {
|
||||
loaded: number;
|
||||
total: number;
|
||||
constructor(loaded: number, total: number);
|
||||
}
|
||||
/**
|
||||
* Representation of the settings of the search
|
||||
*/
|
||||
export declare class SimpleSearchOptions {
|
||||
caseSensitive: boolean;
|
||||
highlightAll: boolean;
|
||||
phraseSearch: boolean;
|
||||
static readonly DEFAULT_OPTIONS: SimpleSearchOptions;
|
||||
constructor(caseSensitive?: boolean, highlightAll?: boolean, phraseSearch?: boolean);
|
||||
}
|
||||
/**
|
||||
* Representation of the PDF bookmark
|
||||
*/
|
||||
export declare class SimplePDFBookmark {
|
||||
page: number;
|
||||
zoom: number;
|
||||
rotation: number;
|
||||
x: number;
|
||||
y: number;
|
||||
static readonly EMPTY_BOOKMARK: SimplePDFBookmark;
|
||||
static readonly PARAMETER_SEPARATOR: string;
|
||||
private static readonly PARAMETER_PAGE;
|
||||
private static readonly PARAMETER_ZOOM;
|
||||
private static readonly PARAMETER_ROTATION;
|
||||
private static readonly PARAMETER_X;
|
||||
private static readonly PARAMETER_Y;
|
||||
constructor(page?: number, zoom?: number, rotation?: number, x?: number, y?: number);
|
||||
/**
|
||||
* Build destination object to navigation
|
||||
*/
|
||||
toDestination(): object;
|
||||
/**
|
||||
* Build query string to URL
|
||||
*/
|
||||
toQueryString(): string;
|
||||
/**
|
||||
* Build bookmark obeject from src url
|
||||
*/
|
||||
static buildSimplePDFBookmark(src: string): SimplePDFBookmark;
|
||||
}
|
||||
8
uni_modules/simple-pdf-viewer/libs/simple-pdf-viewer/src/simplePdfViewer.module.d.ts
vendored
Normal file
8
uni_modules/simple-pdf-viewer/libs/simple-pdf-viewer/src/simplePdfViewer.module.d.ts
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
/// <reference types="pdfjs-dist" />
|
||||
import { PDFJSStatic } from 'pdfjs-dist';
|
||||
declare global {
|
||||
const PDFJS: PDFJSStatic;
|
||||
}
|
||||
export { PDFJSStatic, PDFDocumentProxy, PDFViewerParams, PDFPageProxy, PDFSource, PDFProgressData, PDFPromise, PDFTreeNode, PDFInfo } from 'pdfjs-dist';
|
||||
export declare class SimplePdfViewerModule {
|
||||
}
|
||||
80
uni_modules/simple-pdf-viewer/package.json
Normal file
80
uni_modules/simple-pdf-viewer/package.json
Normal file
@@ -0,0 +1,80 @@
|
||||
{
|
||||
"name": "simple-pdf-viewer",
|
||||
"version": "2.0.3",
|
||||
"license": "MIT",
|
||||
"author": {
|
||||
"name": "Viktor Hajer",
|
||||
"email": "viktor.hajer@gmail.com"
|
||||
},
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve",
|
||||
"build": "ng build --prod",
|
||||
"docs": "typedoc public_api.ts",
|
||||
"deploy": "ng build --prod --output-path docs --base-href \"https://viktorhajer.github.io/simple-pdf-viewer/\"",
|
||||
"postdeploy": "npm run docs",
|
||||
"package": "ng-packagr -p ng-package.json",
|
||||
"tag_release": "git push --follow-tags",
|
||||
"release": "npm publish dist"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/viktorhajer/simple-pdf-viewer/issues"
|
||||
},
|
||||
"private": false,
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/viktorhajer/simple-pdf-viewer.git"
|
||||
},
|
||||
"keywords": [
|
||||
"angular",
|
||||
"angular4",
|
||||
"angular5",
|
||||
"pdf",
|
||||
"angular-pdf",
|
||||
"simple-pdf",
|
||||
"pdf-viewer",
|
||||
"document-viewer",
|
||||
"ionic3"
|
||||
],
|
||||
"homepage": "https://github.com/viktorhajer/simple-pdf-viewer#readme",
|
||||
"peerDependencies": {
|
||||
"@angular/core": ">=4.0.0",
|
||||
"pdfjs-dist": "1.10.88",
|
||||
"@types/pdfjs-dist": "^0.1.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/pdfjs-dist": "0.1.1",
|
||||
"pdfjs-dist": "1.10.88",
|
||||
"tslib": "^1.7.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular/animations": "^5.2.0",
|
||||
"@angular/cli": "1.6.8",
|
||||
"@angular/common": "^5.2.0",
|
||||
"@angular/compiler": "^5.2.0",
|
||||
"@angular/compiler-cli": "^5.2.0",
|
||||
"@angular/core": "^5.2.0",
|
||||
"@angular/forms": "^5.2.0",
|
||||
"@angular/http": "^5.2.0",
|
||||
"@angular/language-service": "^5.2.0",
|
||||
"@angular/platform-browser": "^5.2.0",
|
||||
"@angular/platform-browser-dynamic": "^5.2.0",
|
||||
"@angular/router": "^5.2.0",
|
||||
"@types/node": "6.0.98",
|
||||
"codelyzer": "^4.0.1",
|
||||
"core-js": "^2.4.1",
|
||||
"ng-packagr": "^2.0.0",
|
||||
"np": "^2.20.0",
|
||||
"rxjs": "^5.5.6",
|
||||
"ts-node": "~4.1.0",
|
||||
"tslint": "~5.9.1",
|
||||
"typedoc": "^0.10.0",
|
||||
"typescript": "2.6.1",
|
||||
"zone.js": "^0.8.19"
|
||||
},
|
||||
"main": "bundles/simple-pdf-viewer.umd.js",
|
||||
"module": "esm5/simple-pdf-viewer.js",
|
||||
"es2015": "esm2015/simple-pdf-viewer.js",
|
||||
"typings": "simple-pdf-viewer.d.ts",
|
||||
"metadata": "simple-pdf-viewer.metadata.json"
|
||||
}
|
||||
3
uni_modules/simple-pdf-viewer/public_api.d.ts
vendored
Normal file
3
uni_modules/simple-pdf-viewer/public_api.d.ts
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export { SimplePdfViewerModule } from './libs/simple-pdf-viewer/src/simplePdfViewer.module';
|
||||
export { SimplePdfViewerComponent } from './libs/simple-pdf-viewer/src/simplePdfViewer.component';
|
||||
export { SimpleSearchState, SimpleDocumentInfo, SimpleOutlineNode, SimpleProgressData, SimpleSearchOptions, SimplePDFBookmark } from './libs/simple-pdf-viewer/src/simplePdfViewer.models';
|
||||
4
uni_modules/simple-pdf-viewer/simple-pdf-viewer.d.ts
vendored
Normal file
4
uni_modules/simple-pdf-viewer/simple-pdf-viewer.d.ts
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
/**
|
||||
* Generated bundle index. Do not edit.
|
||||
*/
|
||||
export * from './public_api';
|
||||
File diff suppressed because one or more lines are too long
5
uni_modules/simple-pdf-viewer/src/typings.d.ts
vendored
Normal file
5
uni_modules/simple-pdf-viewer/src/typings.d.ts
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
/* SystemJS module definition */
|
||||
declare var module: NodeModule;
|
||||
interface NodeModule {
|
||||
id: string;
|
||||
}
|
||||
@@ -5,8 +5,9 @@
|
||||
// https://test.vespa.qxyushen.top 测试api
|
||||
// 新 https://yushengapi.qxyushen.top
|
||||
const BASE_NAME = '羽声语音'
|
||||
const BASE_URL = "https://test.vespa.qxyushen.top";
|
||||
const BASE_IMAGE_URL = "https://test.vespa.qxyushen.top/h5/image/"
|
||||
const BASE_URL = "https://yushengapi.qxyushen.top";
|
||||
// const BASE_URL = "https://test.vespa.qxyushen.top";
|
||||
const BASE_IMAGE_URL = "https://yushengapi.qxyushen.top/h5/image/"
|
||||
// 前端访问域名
|
||||
// tmdh.xscmmidi.site 测试
|
||||
// mdh.xscmmidi.site 正式
|
||||
|
||||
@@ -6,7 +6,8 @@ module.exports = {
|
||||
devServer: {
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'https://test.vespa.qxyushen.top',
|
||||
target: 'https://yushengapi.qxyushen.top',
|
||||
// target: 'https://test.vespa.qxyushen.top',
|
||||
changeOrigin: true,
|
||||
pathRewrite: { '^/api': '' }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user