first commit
This commit is contained in:
1
h5_webview/app/.gitignore
vendored
Executable file
1
h5_webview/app/.gitignore
vendored
Executable file
@@ -0,0 +1 @@
|
||||
/build
|
||||
1
h5_webview/app/.pydio
Normal file
1
h5_webview/app/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
1b84c923-d924-4791-9efd-36303ec4265d
|
||||
37
h5_webview/app/build.gradle
Executable file
37
h5_webview/app/build.gradle
Executable file
@@ -0,0 +1,37 @@
|
||||
apply plugin: 'com.android.application'
|
||||
|
||||
android {
|
||||
compileSdkVersion 26
|
||||
useLibrary 'org.apache.http.legacy'
|
||||
defaultConfig {
|
||||
applicationId "com.cp.bmy.cp"
|
||||
minSdkVersion 15
|
||||
targetSdkVersion 26
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
vectorDrawables.useSupportLibrary = true
|
||||
ndk{
|
||||
abiFilters "armeabi","armeabi-v7a","x86","mips"
|
||||
}
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||
implementation 'com.android.support:appcompat-v7:26.1.0'
|
||||
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
|
||||
testImplementation 'junit:junit:4.12'
|
||||
androidTestImplementation 'com.android.support.test:runner:1.0.2'
|
||||
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
|
||||
}
|
||||
1
h5_webview/app/libs/.pydio
Normal file
1
h5_webview/app/libs/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
f9b28e75-49c6-4e9e-804d-23b97793766f
|
||||
Binary file not shown.
21
h5_webview/app/proguard-rules.pro
vendored
Executable file
21
h5_webview/app/proguard-rules.pro
vendored
Executable file
@@ -0,0 +1,21 @@
|
||||
# Add project specific ProGuard rules here.
|
||||
# You can control the set of applied configuration files using the
|
||||
# proguardFiles setting in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
|
||||
# Uncomment this to preserve the line number information for
|
||||
# debugging stack traces.
|
||||
#-keepattributes SourceFile,LineNumberTable
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
1
h5_webview/app/release/.pydio
Normal file
1
h5_webview/app/release/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
c3fec5dc-e118-456c-aadd-3321812af2c1
|
||||
1
h5_webview/app/release/output.json
Executable file
1
h5_webview/app/release/output.json
Executable file
@@ -0,0 +1 @@
|
||||
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":1,"versionName":"1.0","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
|
||||
1
h5_webview/app/src/.pydio
Normal file
1
h5_webview/app/src/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
9b8cce0e-0d10-452b-8052-1a19fee88ebf
|
||||
1
h5_webview/app/src/main/.pydio
Normal file
1
h5_webview/app/src/main/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
92fb5dcd-4dc0-41b2-82ab-163ba8e2c7e0
|
||||
52
h5_webview/app/src/main/AndroidManifest.xml
Executable file
52
h5_webview/app/src/main/AndroidManifest.xml
Executable file
@@ -0,0 +1,52 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="com.caipu.bmy.cp">
|
||||
|
||||
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" tools:ignore="ProtectedPermissions" />
|
||||
|
||||
<!-- 硬件加速对X5视频播放非常重要,建议开启 -->
|
||||
<uses-permission android:name="android.permission.GET_TASKS" />
|
||||
|
||||
|
||||
|
||||
<application
|
||||
android:name="com.caipu.bmy.cp.AppAplication"
|
||||
android:allowBackup="true"
|
||||
android:icon="@drawable/ic_launcherapp"
|
||||
android:label="@string/app_name"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:hardwareAccelerated="true"
|
||||
android:theme="@style/AppTheme">
|
||||
<activity
|
||||
android:name="com.caipu.bmy.cp.MainActivity"
|
||||
android:configChanges="orientation|screenSize|keyboardHidden"
|
||||
android:windowSoftInputMode="stateHidden|adjustResize">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
</intent-filter>
|
||||
|
||||
<!--通过浏览器Url启动app-->
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
<data
|
||||
android:host="openfile"
|
||||
android:scheme="mitao" />
|
||||
</intent-filter>
|
||||
|
||||
</activity>
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
1
h5_webview/app/src/main/assets/.pydio
Normal file
1
h5_webview/app/src/main/assets/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
55605050-f2a5-4364-8c97-486bfaec7307
|
||||
1
h5_webview/app/src/main/assets/css/.pydio
Normal file
1
h5_webview/app/src/main/assets/css/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
245a036a-4f4f-4796-a915-69ec716b66dd
|
||||
24
h5_webview/app/src/main/assets/css/about_us.css
Normal file
24
h5_webview/app/src/main/assets/css/about_us.css
Normal file
@@ -0,0 +1,24 @@
|
||||
.about_center {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
margin: 30% 0;
|
||||
padding: 0 0.3rem;
|
||||
text-align: center;
|
||||
}
|
||||
.about_center img{
|
||||
width: 1.4rem;
|
||||
height: 1.4rem;
|
||||
margin-bottom: 0.4rem;
|
||||
}
|
||||
.about_center p{
|
||||
font-size: 0.34rem;
|
||||
margin-bottom: 0.18rem;
|
||||
font-weight: 400;
|
||||
}
|
||||
.about_center span {
|
||||
font-size: 0.3rem;
|
||||
color: #666;
|
||||
line-height: 0.42rem;
|
||||
}
|
||||
14
h5_webview/app/src/main/assets/css/agreement.css
Normal file
14
h5_webview/app/src/main/assets/css/agreement.css
Normal file
@@ -0,0 +1,14 @@
|
||||
.agreement {
|
||||
font-size: 0;
|
||||
}
|
||||
.agreement span{
|
||||
font-size: 0.32rem;
|
||||
font-weight: bold;
|
||||
margin-bottom: 0.3rem;
|
||||
display: inline-block;
|
||||
}
|
||||
.agreement p{
|
||||
font-size: 0.28rem;
|
||||
margin-bottom: 0.36rem;
|
||||
color: #333;
|
||||
}
|
||||
37
h5_webview/app/src/main/assets/css/clear.css
Normal file
37
h5_webview/app/src/main/assets/css/clear.css
Normal file
@@ -0,0 +1,37 @@
|
||||
body,ul,li,h1,h2,h3,h4,h5,h6,p{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
a {
|
||||
text-decoration: none;
|
||||
color: #000;
|
||||
-webkit-tap-highlight-color: rgba(255, 255, 255, 0);
|
||||
-webkit-user-select: none;
|
||||
-moz-user-focus: none;
|
||||
-moz-user-select: none;
|
||||
}
|
||||
body,html,.content,.s-container,.s-wrapper {
|
||||
height: 100%;
|
||||
}
|
||||
.swiper-dot {
|
||||
background: #787777 !important;
|
||||
}
|
||||
.swiper-active {
|
||||
background: #fb7299 !important;
|
||||
}
|
||||
|
||||
.s-container {
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
.s-wrapper {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
.s-slide {
|
||||
float: left;
|
||||
height: calc(100% - 1.6rem - 1rem);
|
||||
overflow-y: scroll;
|
||||
margin-top: 1.6rem;
|
||||
}
|
||||
132
h5_webview/app/src/main/assets/css/home.css
Normal file
132
h5_webview/app/src/main/assets/css/home.css
Normal file
@@ -0,0 +1,132 @@
|
||||
.header {
|
||||
height: 1.6rem;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
left: 0;
|
||||
z-index: 9;
|
||||
}
|
||||
.header_search {
|
||||
height: 0.88rem;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 0 0.3rem;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.search {
|
||||
width: 82%;
|
||||
background: #fff;
|
||||
height: 0.6rem;
|
||||
border-radius: 0.6rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
padding-left: 0.3rem;
|
||||
}
|
||||
.search i {
|
||||
color: #999;
|
||||
font-size: 0.26rem;
|
||||
margin-right: 0.1rem;
|
||||
padding-top: 0.02rem;
|
||||
}
|
||||
.search span {
|
||||
font-size: 0.24em;
|
||||
color: #999;
|
||||
}
|
||||
.header_search a {
|
||||
font-size: 0;
|
||||
}
|
||||
.icon-wo {
|
||||
font-size: 0.4rem;
|
||||
}
|
||||
.icon-taozi1{
|
||||
font-size: 0.45rem;
|
||||
}
|
||||
.header_menu{
|
||||
position: relative;
|
||||
height: 0.72rem;
|
||||
display: flex;
|
||||
background: #fe7fa2;
|
||||
}
|
||||
.header_menu .menu_list{
|
||||
display: flex;
|
||||
width: calc(100% - 0.8rem);
|
||||
overflow-x: scroll;
|
||||
align-items: center;
|
||||
padding-left: 0.3rem;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.menu_list li {
|
||||
font-size: 0.26rem;
|
||||
flex-shrink: 0;
|
||||
margin-right: 0.26rem;
|
||||
color: #d3d2d2;
|
||||
}
|
||||
.header_menu i{
|
||||
width: 0.8rem;
|
||||
height: 0.72rem;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
font-size: 0.3rem;
|
||||
background: #fe7fa2;
|
||||
color: #e3e3e3;
|
||||
line-height: 0.72rem;
|
||||
text-align: center;
|
||||
}
|
||||
.swiper-slide {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
margin-top: 0.28rem;
|
||||
}
|
||||
|
||||
.item_content {
|
||||
margin-top: 0.2rem;
|
||||
}
|
||||
.item_content .title{
|
||||
font-size: 0.32rem;
|
||||
color: #333;
|
||||
margin-bottom: 0.2rem;
|
||||
}
|
||||
.item_content ul{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.item_content li{
|
||||
width: 48%;
|
||||
margin-bottom: 0.3rem;
|
||||
}
|
||||
.item_content .item_top {
|
||||
position: relative;
|
||||
}
|
||||
.item_content .item_top img{
|
||||
width: 100%;
|
||||
}
|
||||
.item_content .item_top span {
|
||||
position: absolute;
|
||||
right: 0.2rem;
|
||||
bottom: 0.52rem;
|
||||
padding: 0.02rem 0.1rem;
|
||||
background: #000;
|
||||
color: #fff;
|
||||
border-radius: 0.6rem;
|
||||
font-size: 0.24rem;
|
||||
}
|
||||
.item_bottom .item_title{
|
||||
font-size: 0.32rem;
|
||||
margin-bottom: 0.1rem;
|
||||
overflow:hidden;
|
||||
text-overflow:ellipsis;
|
||||
white-space:nowrap;
|
||||
color: #333;
|
||||
}
|
||||
.source {
|
||||
font-size: 0.26rem;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.menu_active {
|
||||
color: #ffffff !important;
|
||||
}
|
||||
45
h5_webview/app/src/main/assets/css/info.css
Normal file
45
h5_webview/app/src/main/assets/css/info.css
Normal file
@@ -0,0 +1,45 @@
|
||||
.info {
|
||||
width: 100%;
|
||||
}
|
||||
.ddd {
|
||||
font-size: 0;
|
||||
}
|
||||
.info img {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.info figure {
|
||||
display: block;
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
font-size: 0;
|
||||
}
|
||||
|
||||
.info figcaption {
|
||||
display: none;
|
||||
}
|
||||
.info .info_item{
|
||||
margin-bottom: 0.3rem;
|
||||
}
|
||||
.info_item p{
|
||||
font-size: 0.24rem;
|
||||
color: #8e8e8e;
|
||||
text-align: center;
|
||||
margin-bottom: 0.1rem;
|
||||
}
|
||||
.info_item img{
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.icon-xin {
|
||||
|
||||
}
|
||||
.next_page {
|
||||
display: inline-block;
|
||||
font-size: 0.4rem;
|
||||
margin-top: 0.2rem;
|
||||
color: #fb7299;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
18
h5_webview/app/src/main/assets/css/like.css
Normal file
18
h5_webview/app/src/main/assets/css/like.css
Normal file
@@ -0,0 +1,18 @@
|
||||
.newest_img {
|
||||
height: 5.3078rem;
|
||||
}
|
||||
.newest_img img {
|
||||
height: 4.9678rem;
|
||||
}
|
||||
.nodata {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
margin-top: 0.6rem;
|
||||
}
|
||||
.nodata i{
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
.nodata p{
|
||||
font-size: 0.24rem;
|
||||
color: #666;
|
||||
}
|
||||
208
h5_webview/app/src/main/assets/css/loading.css
Normal file
208
h5_webview/app/src/main/assets/css/loading.css
Normal file
@@ -0,0 +1,208 @@
|
||||
.loading {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 999;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.back {
|
||||
padding: 0.4rem 0.4rem;
|
||||
background: #fb7299;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 0.16rem;
|
||||
max-width: 4rem;
|
||||
}
|
||||
.back span {
|
||||
font-size: 0.3rem;
|
||||
letter-spacing: 0.02rem;
|
||||
color: #fff;
|
||||
}
|
||||
.load8 {
|
||||
width: 0.8rem;
|
||||
height: 0.8rem;
|
||||
position: relative;
|
||||
}
|
||||
.dialog_f {
|
||||
width: 86%;
|
||||
background: #fff;
|
||||
border-radius: 0.32rem;
|
||||
font-size: 0.32rem;
|
||||
}
|
||||
.dialog_header {
|
||||
padding-top: 0.52rem;
|
||||
font-weight: 500;
|
||||
line-height: 0.48rem;
|
||||
text-align: center;
|
||||
}
|
||||
.dialog_message {
|
||||
max-height: 60vh;
|
||||
padding: 0.16rem 0.48rem 0.52rem 0.48rem;
|
||||
overflow-y: auto;
|
||||
font-size: 0.28rem;
|
||||
line-height: 0.4rem;
|
||||
text-align: center;
|
||||
}
|
||||
.dialog_footer {
|
||||
display: flex;
|
||||
height: 0.96rem;
|
||||
border-top: 0.02rem solid #ebedf0;
|
||||
}
|
||||
.dialog_cancel,
|
||||
.dialog_confirm {
|
||||
width: 50%;
|
||||
text-align: center;
|
||||
line-height: 0.96rem;
|
||||
}
|
||||
.dialog_cancel:active {
|
||||
background: #e6e6e6;
|
||||
border-bottom-left-radius: 0.32rem;
|
||||
}
|
||||
.dialog_confirm:active {
|
||||
background: #e6e6e6;
|
||||
border-bottom-right-radius: 0.32rem;
|
||||
}
|
||||
.dialog_cancel {
|
||||
color: #323233;
|
||||
border-right: 0.02rem solid #ebedf0;
|
||||
}
|
||||
.dialog_confirm {
|
||||
color: #fb7299;
|
||||
}
|
||||
.container1>div,
|
||||
.container2>div,
|
||||
.container3>div {
|
||||
width: 0.2rem;
|
||||
height: 0.2rem;
|
||||
background-color: #fff;
|
||||
border-radius: 100%;
|
||||
position: absolute;
|
||||
-webkit-animation: bouncedelay 1.2s infinite ease-in-out;
|
||||
animation: bouncedelay 1.2s infinite ease-in-out;
|
||||
-webkit-animation-fill-mode: both;
|
||||
animation-fill-mode: both;
|
||||
}
|
||||
|
||||
.load8 .load8-container {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.container2 {
|
||||
-webkit-transform: rotateZ(45deg);
|
||||
transform: rotateZ(45deg);
|
||||
}
|
||||
|
||||
.container3 {
|
||||
-webkit-transform: rotateZ(90deg);
|
||||
transform: rotateZ(90deg);
|
||||
}
|
||||
|
||||
.circle1 {
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.circle2 {
|
||||
top: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.circle3 {
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.circle4 {
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.container2 .circle1 {
|
||||
-webkit-animation-delay: -1.1s;
|
||||
animation-delay: -1.1s;
|
||||
}
|
||||
|
||||
.container3 .circle1 {
|
||||
-webkit-animation-delay: -1.0s;
|
||||
animation-delay: -1.0s;
|
||||
}
|
||||
|
||||
.container1 .circle2 {
|
||||
-webkit-animation-delay: -0.9s;
|
||||
animation-delay: -0.9s;
|
||||
}
|
||||
|
||||
.container2 .circle2 {
|
||||
-webkit-animation-delay: -0.8s;
|
||||
animation-delay: -0.8s;
|
||||
}
|
||||
|
||||
.container3 .circle2 {
|
||||
-webkit-animation-delay: -0.7s;
|
||||
animation-delay: -0.7s;
|
||||
}
|
||||
|
||||
.container1 .circle3 {
|
||||
-webkit-animation-delay: -0.6s;
|
||||
animation-delay: -0.6s;
|
||||
}
|
||||
|
||||
.container2 .circle3 {
|
||||
-webkit-animation-delay: -0.5s;
|
||||
animation-delay: -0.5s;
|
||||
}
|
||||
|
||||
.container3 .circle3 {
|
||||
-webkit-animation-delay: -0.4s;
|
||||
animation-delay: -0.4s;
|
||||
}
|
||||
|
||||
.container1 .circle4 {
|
||||
-webkit-animation-delay: -0.3s;
|
||||
animation-delay: -0.3s;
|
||||
}
|
||||
|
||||
.container2 .circle4 {
|
||||
-webkit-animation-delay: -0.2s;
|
||||
animation-delay: -0.2s;
|
||||
}
|
||||
|
||||
.container3 .circle4 {
|
||||
-webkit-animation-delay: -0.1s;
|
||||
animation-delay: -0.1s;
|
||||
}
|
||||
|
||||
@-webkit-keyframes bouncedelay {
|
||||
|
||||
0%,
|
||||
80%,
|
||||
100% {
|
||||
-webkit-transform: scale(0.0)
|
||||
}
|
||||
|
||||
40% {
|
||||
-webkit-transform: scale(1.0)
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes bouncedelay {
|
||||
|
||||
0%,
|
||||
80%,
|
||||
100% {
|
||||
transform: scale(0.0);
|
||||
-webkit-transform: scale(0.0);
|
||||
}
|
||||
|
||||
40% {
|
||||
transform: scale(1.0);
|
||||
-webkit-transform: scale(1.0);
|
||||
}
|
||||
}
|
||||
23
h5_webview/app/src/main/assets/css/mechanism.css
Normal file
23
h5_webview/app/src/main/assets/css/mechanism.css
Normal file
@@ -0,0 +1,23 @@
|
||||
.mechanism_list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 0.3rem;
|
||||
padding: 0 0.3rem;
|
||||
}
|
||||
.mechanism_list li {
|
||||
width: 25%;
|
||||
text-align: center;
|
||||
font-size: 0;
|
||||
margin-bottom: 0.7rem;
|
||||
}
|
||||
.mechanism_list p {
|
||||
font-size: 0.32rem;
|
||||
margin-bottom: 0.06rem;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.mechanism_list span {
|
||||
font-size: 0.24rem;
|
||||
color: #fb7299;
|
||||
}
|
||||
1
h5_webview/app/src/main/assets/css/model.css
Normal file
1
h5_webview/app/src/main/assets/css/model.css
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
24
h5_webview/app/src/main/assets/css/model_info.css
Normal file
24
h5_webview/app/src/main/assets/css/model_info.css
Normal file
@@ -0,0 +1,24 @@
|
||||
.model_info_header {
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
font-size: 0;
|
||||
}
|
||||
.model_info_header img{
|
||||
width: 1.4rem;
|
||||
height: 1.4rem;
|
||||
margin-right: 0.2rem;
|
||||
border-radius: 100%;
|
||||
}
|
||||
.right_text {
|
||||
flex: 1;
|
||||
}
|
||||
.right_text p{
|
||||
font-weight: 500;
|
||||
font-size: 0.32rem;
|
||||
margin-bottom: 0.12rem;
|
||||
}
|
||||
.right_text span{
|
||||
font-size: 0.24rem;
|
||||
color: #909090;
|
||||
}
|
||||
44
h5_webview/app/src/main/assets/css/my.css
Normal file
44
h5_webview/app/src/main/assets/css/my.css
Normal file
@@ -0,0 +1,44 @@
|
||||
.header_my {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 4rem;
|
||||
flex-direction: column;
|
||||
}
|
||||
.header_my i{
|
||||
font-size: 1.2rem;
|
||||
margin-bottom: 0.2rem;
|
||||
color: #fff;
|
||||
}
|
||||
.header_my p{
|
||||
font-size: 0.32rem;
|
||||
color: #fff;
|
||||
}
|
||||
.setting_list {
|
||||
margin-top: 0.2rem;
|
||||
}
|
||||
.list_item:active {
|
||||
background: #e6e6e6;;
|
||||
}
|
||||
.list_item a{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 0 0.3rem;
|
||||
height: 0.96rem;
|
||||
}
|
||||
.item_left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.item_left .iconfont{
|
||||
font-size: 0.4rem;
|
||||
margin-right: 0.2rem;
|
||||
}
|
||||
.item_left span{
|
||||
font-size: 0.3rem;
|
||||
}
|
||||
.icon-qianjin-tongyong {
|
||||
font-size: 0.28rem;
|
||||
color: #c3c0c0;
|
||||
}
|
||||
221
h5_webview/app/src/main/assets/css/public.css
Normal file
221
h5_webview/app/src/main/assets/css/public.css
Normal file
@@ -0,0 +1,221 @@
|
||||
.theme_color {
|
||||
background: #fb7299;
|
||||
}
|
||||
.color_theme {
|
||||
color: #fb7299;
|
||||
}
|
||||
.color_white {
|
||||
color: white;
|
||||
}
|
||||
.padding_30 {
|
||||
padding: 0.3rem 0.3rem 0 0.3rem;
|
||||
}
|
||||
.active {
|
||||
color:#fb7299 !important;
|
||||
}
|
||||
|
||||
/* 底部样式 */
|
||||
.footer {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
background: #fff;
|
||||
height: 1rem;
|
||||
bottom: 0;
|
||||
}
|
||||
.footer ul{
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
border-top: 0.02rem solid #e8ebec;
|
||||
box-sizing: border-box;
|
||||
padding-top: 0.1rem;
|
||||
}
|
||||
.footer ul li a{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
text-align: center;
|
||||
}
|
||||
.footer ul li i{
|
||||
font-size: 0.3rem;
|
||||
margin-bottom: 0.08rem;
|
||||
}
|
||||
.footer ul li span{
|
||||
font-size: 0.24rem;
|
||||
}
|
||||
.footer_active i {
|
||||
color: #fb7299;
|
||||
}
|
||||
.footer_active span {
|
||||
color: #fb7299;
|
||||
}
|
||||
|
||||
|
||||
.header_theme1 {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
height: 0.9rem;
|
||||
left: 0;
|
||||
top: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 0.3rem;
|
||||
box-sizing: border-box;
|
||||
z-index: 999;
|
||||
justify-content: space-between;
|
||||
font-size: 0;
|
||||
}
|
||||
.header_theme1 i {
|
||||
color: #fff;
|
||||
margin-right: 0.2rem;
|
||||
}
|
||||
.header_theme1 span {
|
||||
color: #fff;
|
||||
font-size: 0.32rem;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
|
||||
/* 模特的css */
|
||||
.item {
|
||||
position: relative;
|
||||
text-align: center;
|
||||
width: 22%;
|
||||
}
|
||||
.top {
|
||||
position: relative;
|
||||
}
|
||||
.item span {
|
||||
font-size: 0.22rem;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
bottom: 0.06rem;
|
||||
padding: 0.02rem 0.1rem;
|
||||
background: rgb(0 0 0 / 58%);
|
||||
color: #fff;
|
||||
border-radius: 0.2rem;
|
||||
}
|
||||
.item img {
|
||||
width: 1.2rem;
|
||||
height: 1.2rem;
|
||||
border-radius: 100%;
|
||||
}
|
||||
.item p {
|
||||
font-size: 0.24rem;
|
||||
color: #7e7979;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* 公共的列表样式 */
|
||||
.item_list .title {
|
||||
font-size: 0.34rem;
|
||||
color: #333;
|
||||
margin-bottom: 0.26rem;
|
||||
margin-top: 0.3rem;
|
||||
}
|
||||
.item_list ul {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.item_list ul li{
|
||||
width: 48%;
|
||||
margin-bottom: 0.3rem;
|
||||
}
|
||||
.item_list ul .newest_img{
|
||||
position: relative;
|
||||
}
|
||||
.item_list ul .newest_text{}
|
||||
.item_list .newest_img img{
|
||||
width: 100%;
|
||||
border-radius: 0.1rem;
|
||||
}
|
||||
.item_list .newest_img span{
|
||||
position: absolute;
|
||||
padding: 0.08rem 0.14rem;
|
||||
background: rgb(251 114 153 / 73%);
|
||||
color: rgb(255 255 255 / 73%);
|
||||
font-size: 0.24rem;
|
||||
right: 0.2rem;
|
||||
bottom: 0.42rem;
|
||||
border-radius: 0.28rem;
|
||||
}
|
||||
.item_list .newest_text .t{
|
||||
color: #333;
|
||||
font-size: 0.3rem;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
margin-bottom: 0.08rem;
|
||||
}
|
||||
.newest_text .source {
|
||||
color: #666;
|
||||
font-size: 0.26rem;
|
||||
margin-bottom: 0.02rem;
|
||||
}
|
||||
.newest_text .tags {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 0.08rem;
|
||||
}
|
||||
.newest_text .tags_item {
|
||||
padding: 0.04rem 0.1rem;
|
||||
font-size: 0.24rem;
|
||||
background: #fb7299;
|
||||
margin-right: 0.06rem;
|
||||
color: #fff;
|
||||
border-radius: 0.18rem;
|
||||
margin-bottom: 0.06rem;
|
||||
}
|
||||
.tags_item a {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.content_info {
|
||||
padding-top: 0.9rem;
|
||||
}
|
||||
.content_my {
|
||||
padding-bottom: 1rem;
|
||||
}
|
||||
.content_theme1 {
|
||||
padding-top: 0.9rem;
|
||||
padding-bottom: 1rem;
|
||||
}
|
||||
|
||||
.model_list {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
margin-top: 0.24rem;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.model_list .item {
|
||||
margin-bottom: 0.6rem;
|
||||
}
|
||||
|
||||
.openApp {
|
||||
position: fixed;
|
||||
right: 0.3rem;
|
||||
bottom: 1.8rem;
|
||||
width: 1rem;
|
||||
height: 1rem;
|
||||
z-index: 9;
|
||||
font-size: 0;
|
||||
}
|
||||
.openApp img{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin-bottom: 0.1rem;
|
||||
}
|
||||
.openApp p {
|
||||
font-size: 0.24rem;
|
||||
background: #fb7299;
|
||||
color: #fff;
|
||||
padding: 0.04rem 0.02rem;
|
||||
text-align: center;
|
||||
border-radius: 0.1rem;
|
||||
}
|
||||
36
h5_webview/app/src/main/assets/css/search.css
Normal file
36
h5_webview/app/src/main/assets/css/search.css
Normal file
@@ -0,0 +1,36 @@
|
||||
.search_input {
|
||||
font-size: 0;
|
||||
display: flex;
|
||||
height: 0.88rem;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
justify-content: space-between;
|
||||
padding: 0 0.3rem;
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 999;
|
||||
}
|
||||
.search_input input{
|
||||
width: 80%;
|
||||
border: none;
|
||||
outline: none;
|
||||
height: 0.6rem;
|
||||
padding-left: 0.3rem;
|
||||
border-radius: 0.6rem;
|
||||
box-sizing: border-box;
|
||||
font-size: 0.26rem;
|
||||
}
|
||||
.search_input i {
|
||||
color: #fff;
|
||||
font-size: 0.32rem;
|
||||
font-weight: bolder;
|
||||
}
|
||||
.search_list ul .nodata{
|
||||
font-size: 0.26rem;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
color: #666;
|
||||
margin-top: 0.4rem;
|
||||
}
|
||||
42
h5_webview/app/src/main/assets/css/swiper.css
Normal file
42
h5_webview/app/src/main/assets/css/swiper.css
Normal file
@@ -0,0 +1,42 @@
|
||||
.swiper-wrapper .swiper-slide {
|
||||
float: left;
|
||||
}
|
||||
.swiper-container {
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
.swiper-pagination {
|
||||
position: absolute;
|
||||
bottom: 10px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
.swiper-dot {
|
||||
width: 7px;
|
||||
height: 7px;
|
||||
background: #fff;
|
||||
border-radius: 100%;
|
||||
margin-right: 5px;
|
||||
float: left;
|
||||
}
|
||||
.swiper-button-prev,
|
||||
.swiper-button-next {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
color: #fff;
|
||||
font-size: 30px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.swiper-button-prev {
|
||||
left: 10px;
|
||||
}
|
||||
.swiper-button-next {
|
||||
right: 10px;
|
||||
}
|
||||
.swiper-wrapper {
|
||||
position: relative;
|
||||
}
|
||||
.swiper-active {
|
||||
background: red !important;
|
||||
}
|
||||
25
h5_webview/app/src/main/assets/css/type_edit.css
Normal file
25
h5_webview/app/src/main/assets/css/type_edit.css
Normal file
@@ -0,0 +1,25 @@
|
||||
.chioose {
|
||||
margin-top: 0.3rem;
|
||||
}
|
||||
.chioose p {
|
||||
font-size: 0.24rem;
|
||||
margin-bottom: 0.14rem;
|
||||
color: #666;
|
||||
}
|
||||
.chiooseWrap {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.chiooseWrap li{
|
||||
width: 23.8%;
|
||||
text-align: center;
|
||||
font-size: 0.28rem;
|
||||
border: 1px solid #ccc;
|
||||
margin-bottom: 0.1rem;
|
||||
padding: 0.1rem 0;
|
||||
box-sizing: border-box;
|
||||
margin-right: 0.1rem;
|
||||
}
|
||||
.chiooseWrap li:nth-child(4n) {
|
||||
margin-right: 0 !important;
|
||||
}
|
||||
1
h5_webview/app/src/main/assets/img/.pydio
Normal file
1
h5_webview/app/src/main/assets/img/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
32a3c82c-0d5e-4a39-9be7-a191801382af
|
||||
BIN
h5_webview/app/src/main/assets/img/logo.png
Normal file
BIN
h5_webview/app/src/main/assets/img/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
8
h5_webview/app/src/main/assets/index.js
Normal file
8
h5_webview/app/src/main/assets/index.js
Normal file
@@ -0,0 +1,8 @@
|
||||
const express = require('express');
|
||||
const path = require('path');
|
||||
const app = express();
|
||||
app.use(express.static(path.join(__dirname, './')));
|
||||
|
||||
app.listen(80, () => {
|
||||
console.log(`App listening at port 8080`)
|
||||
});
|
||||
1
h5_webview/app/src/main/assets/js/.pydio
Normal file
1
h5_webview/app/src/main/assets/js/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
f4d1c05a-a5c1-48b8-9ec8-fca6e74a3bf3
|
||||
1
h5_webview/app/src/main/assets/js/config/.pydio
Normal file
1
h5_webview/app/src/main/assets/js/config/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
ec5fe0df-562d-41a9-935e-144535ff65b5
|
||||
18
h5_webview/app/src/main/assets/js/config/index.js
Normal file
18
h5_webview/app/src/main/assets/js/config/index.js
Normal file
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* 项目的配置文件
|
||||
*/
|
||||
var Config = {
|
||||
// BaseUrl: 'http://127.0.0.1:3000/api/json', // 测试环境基地址
|
||||
BaseUrl: 'http://103.91.219.114:3000/api/json', // 正式环境地址
|
||||
ApiList: {
|
||||
index: '/index', // 获取首页
|
||||
info: '/info', // 进入详情
|
||||
mechanism: '/mechanism', // 获取机构
|
||||
mechanismList: '/mechanismList', // 获取机构下面的列表
|
||||
type: '/class', // 获取首页顶部的分类
|
||||
classList: '/classList', // 获取分类列表
|
||||
allModel: '/allModel', // 所有模特
|
||||
modelList: '/modelList', // 进入模特的个人主页
|
||||
search: '/search', // 搜索接口
|
||||
}
|
||||
}
|
||||
1
h5_webview/app/src/main/assets/js/http/.pydio
Normal file
1
h5_webview/app/src/main/assets/js/http/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
da1df28d-a11b-4a20-a8b6-5bba4b386cd1
|
||||
61
h5_webview/app/src/main/assets/js/http/index.js
Normal file
61
h5_webview/app/src/main/assets/js/http/index.js
Normal file
@@ -0,0 +1,61 @@
|
||||
/**
|
||||
* ajax代码的封装
|
||||
* @param {*} params
|
||||
*/
|
||||
function ajax(params) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
// 显示加载进度条
|
||||
Tips.loading()
|
||||
// 拿出电话(创建一个新的ajax对象)
|
||||
var ajax = new XMLHttpRequest();
|
||||
ajax.timeout = 10000
|
||||
// 如果是GET请求特殊处理一下参数
|
||||
if (params.methods == "GET") {
|
||||
var par = ""
|
||||
params.data.isAndroid = true;
|
||||
for (const key in params.data) {
|
||||
par += `&${key}=${params.data[key]}`
|
||||
}
|
||||
params.url = params.url + "?" + par.substr(1)
|
||||
}
|
||||
|
||||
// 设置电话号码
|
||||
// 是否异步
|
||||
ajax.open(params.methods, Config.BaseUrl + params.url, true)
|
||||
|
||||
// 如果是post请求,那么设置一下post请求的参数用何种数据格式给后端
|
||||
// json格式
|
||||
if (params.methods == "POST") {
|
||||
ajax.setRequestHeader('Content-Type', 'application/json;charset=utf-8')
|
||||
}
|
||||
|
||||
// 拨号
|
||||
if (params.methods == "POST") {
|
||||
ajax.send(JSON.stringify(params.data));
|
||||
} else {
|
||||
ajax.send()
|
||||
}
|
||||
|
||||
// 监听网络状态,只有网络请求成功的时候才渲染页面,否则显示错误信息
|
||||
ajax.onreadystatechange = function () {
|
||||
if (ajax.readyState == 4) {
|
||||
if (ajax.status == 200) {
|
||||
var data = JSON.parse(ajax.responseText);
|
||||
if (data.status == 200) {
|
||||
// 关闭进度条
|
||||
Tips.close()
|
||||
resolve(data.data)
|
||||
|
||||
} else {
|
||||
Tips.toast(data.msg)
|
||||
reject(data.msg)
|
||||
}
|
||||
} else {
|
||||
Tips.toast("网络故障,稍后再试..")
|
||||
// reject("数据请求失败,稍后再试")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
1
h5_webview/app/src/main/assets/js/page/.pydio
Normal file
1
h5_webview/app/src/main/assets/js/page/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
9d75d518-638d-43d3-af0a-d56b23284abf
|
||||
321
h5_webview/app/src/main/assets/js/page/home.js
Normal file
321
h5_webview/app/src/main/assets/js/page/home.js
Normal file
@@ -0,0 +1,321 @@
|
||||
class Home {
|
||||
|
||||
constructor() {
|
||||
this.TabsDatas = [];
|
||||
this.list = [];
|
||||
this.PageSwiper = null;
|
||||
this.CurrentPage = 0;
|
||||
// 点击搜索进入搜索页面
|
||||
document.querySelector(".search").onclick = () => {
|
||||
location.href = "./search.html"
|
||||
}
|
||||
|
||||
// 通过在本地保存一个变量 homeIndex,记录用户在首页当前浏览到哪个分类,
|
||||
// 然后从其他页面回首页,那么根据本地变量 homeIndex 的数值,再回到上次浏览的分类
|
||||
if (localStorage.getItem("homeIndex") != null) {
|
||||
this.CurrentPage = localStorage.getItem("homeIndex")
|
||||
}
|
||||
|
||||
this.GetTypeData().then(() => this.GetIndexData())
|
||||
}
|
||||
|
||||
// 获取分类的数据,并渲染页面
|
||||
async GetTypeData() {
|
||||
if (localStorage.getItem("typeList") == null) {
|
||||
// 获取分类数据
|
||||
this.list = await homeService.type({});
|
||||
localStorage.setItem("typeList", JSON.stringify(this.list))
|
||||
} else {
|
||||
this.list = JSON.parse(localStorage.getItem("typeList"))
|
||||
}
|
||||
|
||||
// 根据分类的数组长度遍历生成与分类对应的内容
|
||||
this.list.forEach((v, i) => {
|
||||
this.TabsDatas.push({
|
||||
id: v.id,
|
||||
title: v.title,
|
||||
page: 0,
|
||||
TotalPage: 0,
|
||||
content: []
|
||||
})
|
||||
document.querySelector(".s-wrapper").innerHTML +=
|
||||
`
|
||||
<div class="s-slide">
|
||||
<div class="list_content item_list padding_30">
|
||||
<ul>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
`
|
||||
});
|
||||
|
||||
// 为每一个内容绑定滚动事件
|
||||
var slide = document.querySelectorAll(".s-wrapper .s-slide");
|
||||
var self = this;
|
||||
slide.forEach((v, i) => {
|
||||
if (i > 0) {
|
||||
v.addEventListener('scroll', function () {
|
||||
if (Math.ceil(this.scrollHeight - this.scrollTop) == this.clientHeight) {
|
||||
self.TabsDatas[i - 1].page += 1;
|
||||
if (self.TabsDatas[i - 1].page <= self.TabsDatas[i - 1].TotalPage) {
|
||||
self.GetTypeInfoData(i)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
// 向数据中追加首页
|
||||
this.list.unshift({ id: -1, title: '首页' });
|
||||
// 根据数据生成横向菜单
|
||||
var MenuList = document.querySelector(".menu_list");
|
||||
this.list.forEach((v, i) => {
|
||||
MenuList.innerHTML += `
|
||||
<li class="${i == this.CurrentPage ? 'menu_active' : ''}">${v.title}</li>
|
||||
`
|
||||
});
|
||||
|
||||
|
||||
// 如果本地有 homeIndex,那么从其他页面返回的时候将顶部菜单滚动到对应位置
|
||||
if (localStorage.getItem("homeIndex") != null) {
|
||||
var offsetLeft = document.querySelectorAll(".menu_list li")[this.CurrentPage].offsetLeft - 14;
|
||||
document.querySelector(".menu_list").scrollLeft = offsetLeft
|
||||
}
|
||||
|
||||
// 横向菜单被点击的时候
|
||||
var mLi = document.querySelectorAll(".menu_list li")
|
||||
mLi.forEach((v, i) => {
|
||||
v.onclick = (e) => {
|
||||
this.SetUrl(i)
|
||||
|
||||
// 使横向菜单滑动
|
||||
document.querySelector(".menu_list").scrollLeft = e.target.offsetLeft - 14
|
||||
|
||||
// 清除激活样式
|
||||
mLi.forEach(d => d.className = "")
|
||||
// 添加激活样式
|
||||
v.className = "menu_active"
|
||||
this.PageSwiper.slideTo(i)
|
||||
// 请求用户点击的分类的列表数据
|
||||
if (this.list[i].id != -1 && this.TabsDatas[i - 1].content.length == 0) {
|
||||
this.GetTypeInfoData(i)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
this.initPageSwiper();
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化页面切换的轮播
|
||||
*/
|
||||
initPageSwiper() {
|
||||
this.PageSwiper = new swiper('.s-container', {
|
||||
time: 3,
|
||||
wrapper: '.s-wrapper',
|
||||
slide: '.s-slide',
|
||||
auto: false,
|
||||
speed: 300,
|
||||
on: {
|
||||
slideChangeTransitionStart: (index) => {
|
||||
this.SetUrl(index)
|
||||
// 获取所有菜单的li标签
|
||||
var MenuLi = document.querySelectorAll(".menu_list li");
|
||||
// 清除激活样式
|
||||
MenuLi.forEach(v => v.className = "")
|
||||
// 添加激活样式
|
||||
MenuLi[index].className = "menu_active"
|
||||
// 页面滚动的时候顶部菜单也移动位置
|
||||
document.querySelector(".menu_list").scrollLeft = MenuLi[index].offsetLeft - 14;
|
||||
// 请求用户点击的分类的列表数据
|
||||
if (this.list[index].id != -1 && this.TabsDatas[index - 1].content.length == 0) {
|
||||
this.GetTypeInfoData(index)
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
// 必须在轮播图初始化后才去请求跳转到对应的页面和请求页面数据
|
||||
if (this.CurrentPage != 0) {
|
||||
this.GetTypeInfoData(this.CurrentPage)
|
||||
this.PageSwiper.slideTo(this.CurrentPage)
|
||||
}
|
||||
}
|
||||
|
||||
// 修改地址栏id参数为下标,然后重新进入首页的时候,直接继续进入上次访问分类
|
||||
SetUrl(index) {
|
||||
// 本地保存下标
|
||||
localStorage.setItem("homeIndex", index)
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取分类下的列表数据
|
||||
*/
|
||||
async GetTypeInfoData(index) {
|
||||
|
||||
var res = await homeService.classList({
|
||||
page: this.TabsDatas[index - 1].page,
|
||||
id: this.TabsDatas[index - 1].id
|
||||
});
|
||||
this.TabsDatas[index - 1].page = res.current_page;
|
||||
this.TabsDatas[index - 1].TotalPage = res.total_page;
|
||||
this.TabsDatas[index - 1].content = [
|
||||
...this.TabsDatas[index - 1].content,
|
||||
...res.list
|
||||
];
|
||||
|
||||
var sWrapper = document.querySelectorAll(".s-wrapper .s-slide .list_content ul")
|
||||
res.list.forEach((v) => {
|
||||
sWrapper[index - 1].innerHTML += `
|
||||
<li>
|
||||
<div class="newest_img">
|
||||
<a href="./info.html?id=${v.id}">
|
||||
<img src="${v.preview}" alt="${v.title}">
|
||||
</a>
|
||||
<span>${v.total}P</span>
|
||||
</div>
|
||||
<div class="newest_text">
|
||||
<a href="./info.html?id=${v.id}">
|
||||
<p class="t">${v.title}</p>
|
||||
<p class="source">${v.user}</p>
|
||||
<p class="source">${v.source}</p>
|
||||
</a>
|
||||
<div class="tags">
|
||||
${(v.tags.map((t) => {
|
||||
return `<div class="tags_item">
|
||||
<a href="./mechanism_info.html?id=${t.id}&type=tags&t=${t.title}">${t.title}</a>
|
||||
</div>`
|
||||
})).toString().replace(/,/ig, " ")
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
`
|
||||
});
|
||||
}
|
||||
|
||||
// 获取首页的数据,并渲染各个布局
|
||||
async GetIndexData() {
|
||||
// 获取首页的数据
|
||||
var list = await homeService.GetHomeData({});
|
||||
// 轮播图模特的数据
|
||||
var ModelList = list.model.list;
|
||||
// 最新收录
|
||||
var newestList = list.newest.list;
|
||||
// 今日推荐
|
||||
var recommendedList = list.recommended.list;
|
||||
|
||||
var swiperWrapper = document.querySelector(".swiper-wrapper");
|
||||
// 根据数据遍历生成banner 的 swiper-slide
|
||||
var slideElement = [];
|
||||
[1, 2].forEach(() => {
|
||||
var o = document.createElement("div");
|
||||
o.className = "swiper-slide";
|
||||
slideElement.push(o)
|
||||
})
|
||||
ModelList.forEach((v, i) => {
|
||||
if (i <= 3) {
|
||||
slideElement[0].innerHTML +=
|
||||
`<div class="item">
|
||||
<a href="./model_info.html?id=${v.id}&t=${v.title}">
|
||||
<div class="top">
|
||||
<img src="${v.preview}" alt="">
|
||||
<span>${v.total}</span>
|
||||
</div>
|
||||
<p>${v.title}</p>
|
||||
</a>
|
||||
</div>`
|
||||
} else {
|
||||
slideElement[1].innerHTML +=
|
||||
`<div class="item">
|
||||
<a href="./model_info.html?id=${v.id}&t=${v.title}">
|
||||
<div class="top">
|
||||
<img src="${v.preview}" alt="">
|
||||
<span>${v.total}</span>
|
||||
</div>
|
||||
<p>${v.title}</p>
|
||||
</a>
|
||||
</div>`
|
||||
}
|
||||
})
|
||||
// 将 swiper-slide 填入页面中
|
||||
slideElement.forEach(v => swiperWrapper.appendChild(v))
|
||||
|
||||
new swiper('.swiper-container', {
|
||||
time: 3,
|
||||
auto: false,
|
||||
speed: 800
|
||||
});
|
||||
|
||||
|
||||
// 遍历 最新收录
|
||||
document.querySelector(".newest .title").innerHTML = `
|
||||
<i class="iconfont icon-huo color_theme"></i>
|
||||
最新收录
|
||||
`;
|
||||
newestList.forEach(v => {
|
||||
document.querySelector(".newest ul").innerHTML +=
|
||||
`
|
||||
<li>
|
||||
<div class="newest_img">
|
||||
<a href="./info.html?id=${v.id}">
|
||||
<img src="${v.preview}" alt="${v.title}">
|
||||
</a>
|
||||
<span>${v.total_page}套</span>
|
||||
</div>
|
||||
<div class="newest_text">
|
||||
<a href="./info.html?id=${v.id}">
|
||||
<p class="t">${v.title}</p>
|
||||
<p class="source">${v.user}</p>
|
||||
<p class="source">${v.source}</p>
|
||||
</a>
|
||||
<div class="tags">
|
||||
${(v.tags.map((t) => {
|
||||
return `<div class="tags_item">
|
||||
<a href="./mechanism_info.html?id=${t.id}&type=tags&t=${t.title}">${t.title}</a>
|
||||
</div>`
|
||||
})).toString().replace(/,/ig, " ")
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
`
|
||||
})
|
||||
|
||||
// 今日推荐
|
||||
document.querySelector(".recommended .title").innerHTML = `
|
||||
<i class="iconfont icon-tuijian color_theme"></i>
|
||||
今日推荐
|
||||
`;
|
||||
recommendedList.forEach(v => {
|
||||
document.querySelector(".recommended ul").innerHTML +=
|
||||
`
|
||||
<li>
|
||||
<div class="newest_img">
|
||||
<a href="./info.html?id=${v.id}">
|
||||
<img src="${v.preview}" alt="${v.title}">
|
||||
</a>
|
||||
<span>${v.total_page}套</span>
|
||||
</div>
|
||||
<div class="newest_text">
|
||||
<a href="./info.html?id=${v.id}">
|
||||
<p class="t">${v.title}</p>
|
||||
<p class="source">${v.user}</p>
|
||||
<p class="source">${v.source}</p>
|
||||
</a>
|
||||
<div class="tags">
|
||||
${(v.tags.map((t) => {
|
||||
return `<div class="tags_item"><a href="./mechanism_info.html?id=${t.id}&type=tags&t=${t.title}">${t.title}</a></div>`
|
||||
})).toString().replace(/,/ig, " ")
|
||||
}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
`
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
var home = new Home();
|
||||
173
h5_webview/app/src/main/assets/js/page/info.js
Normal file
173
h5_webview/app/src/main/assets/js/page/info.js
Normal file
@@ -0,0 +1,173 @@
|
||||
class Info {
|
||||
|
||||
constructor() {
|
||||
this.page = 1;
|
||||
this.TotalPage = 0;
|
||||
this.preview = "";
|
||||
this.InfoList = [];
|
||||
this.GetInfoData()
|
||||
}
|
||||
|
||||
async GetInfoData(action = "first") {
|
||||
this.InfoList = await homeService.info({
|
||||
id: utils.GetQueryString("id"),
|
||||
page: this.page
|
||||
});
|
||||
|
||||
this.TotalPage = this.InfoList.total_page
|
||||
// 设置网页标题
|
||||
document.title = this.InfoList.title
|
||||
|
||||
this.InfoList.list.forEach((v) => {
|
||||
var image = new Image();
|
||||
image.src = v.src;
|
||||
image.onload = () => {
|
||||
if (image.width < image.height) {
|
||||
this.preview = v.src;
|
||||
}
|
||||
this.LikePhotot()
|
||||
document.querySelector(".info").innerHTML += `
|
||||
<figure>
|
||||
<a href="${v.src}" data-size="${image.width}x${image.height}">
|
||||
<img src="${v.src}" alt="${v.title}" />
|
||||
</a>
|
||||
<figcaption itemprop="caption description">${v.title}</figcaption>
|
||||
</figure>
|
||||
`
|
||||
}
|
||||
});
|
||||
|
||||
this.BindNextPage();
|
||||
initPhotoSwipeFromDOM('.info');
|
||||
|
||||
if (action == "first") {
|
||||
|
||||
document.querySelector(".recommend .title").innerText = "推荐写真"
|
||||
this.InfoList.recommend.forEach(v => {
|
||||
document.querySelector(".recommend ul").innerHTML +=
|
||||
`
|
||||
<li>
|
||||
<div class="newest_img">
|
||||
<a href="./info.html?id=${v.id}">
|
||||
<img src="${v.preview}" alt="${v.title}">
|
||||
</a>
|
||||
<span>${v.total}P</span>
|
||||
</div>
|
||||
<div class="newest_text">
|
||||
<a href="./info.html?id=${v.id}">
|
||||
<p class="t">${v.title}</p>
|
||||
<p class="source">${v.user}</p>
|
||||
<p class="source">${v.source}</p>
|
||||
</a>
|
||||
<div class="tags">
|
||||
${(v.tags.map((t) => {
|
||||
return `<div class="tags_item"><a href="./mechanism_info.html?id=${t.id}&type=tags&t=${t.title}">${t.title}</a></div>`
|
||||
})).toString().replace(/,/ig, " ")
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
`
|
||||
})
|
||||
|
||||
document.querySelector(".relevant .title").innerText = "相关写真"
|
||||
this.InfoList.relevant.forEach(v => {
|
||||
document.querySelector(".relevant ul").innerHTML +=
|
||||
`
|
||||
<li>
|
||||
<div class="newest_img">
|
||||
<a href="./info.html?id=${v.id}">
|
||||
<img src="${v.preview}" alt="${v.title}">
|
||||
</a>
|
||||
<span>${v.total}P</span>
|
||||
</div>
|
||||
<div class="newest_text">
|
||||
<a href="./info.html?id=${v.id}">
|
||||
<p class="t">${v.title}</p>
|
||||
<p class="source">${v.user}</p>
|
||||
<p class="source">${v.source}</p>
|
||||
</a>
|
||||
<div class="tags">
|
||||
${(v.tags.map((t) => {
|
||||
return `<div class="tags_item"><a href="./mechanism_info.html?id=${t.id}&type=tags&t=${t.title}">${t.title}</a></div>`
|
||||
})).toString().replace(/,/ig, " ")
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
`
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
BindNextPage() {
|
||||
document.querySelector(".next_page").style.display = "block"
|
||||
document.querySelector(".next_page").onclick = () => {
|
||||
this.page += 1;
|
||||
if (this.page > this.TotalPage) {
|
||||
document.querySelector(".next_page").style.display = "none"
|
||||
} else {
|
||||
if (this.page == this.TotalPage) {
|
||||
document.querySelector(".next_page").style.display = "none"
|
||||
this.GetInfoData("loadMore")
|
||||
} else {
|
||||
this.GetInfoData("loadMore")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
LikePhotot() {
|
||||
// true 收藏, false 取消收藏
|
||||
var status = null;
|
||||
var LikeList = JSON.parse(localStorage.getItem("likeList")) == null
|
||||
? [] : JSON.parse(localStorage.getItem("likeList"))
|
||||
|
||||
var isHave = LikeList.filter((v) => {
|
||||
if (v.id == utils.GetQueryString("id")) {
|
||||
return v
|
||||
}
|
||||
})
|
||||
|
||||
// 该写真你未收藏,true 点击进行收藏
|
||||
if (isHave.length == 0) {
|
||||
status = true
|
||||
// 改写真你已收藏,点击取消收藏
|
||||
} else {
|
||||
status = false
|
||||
document.querySelector(".like").className = "like iconfont icon-aixin"
|
||||
}
|
||||
|
||||
document.querySelector(".like").onclick = () => {
|
||||
console.log(this.preview);
|
||||
if (status == true) {
|
||||
LikeList.push({
|
||||
id: utils.GetQueryString("id"),
|
||||
title: this.InfoList.title,
|
||||
user: this.InfoList.info,
|
||||
source: this.InfoList.source,
|
||||
total: this.InfoList.total,
|
||||
preview: this.preview
|
||||
})
|
||||
localStorage.setItem("likeList", JSON.stringify(LikeList))
|
||||
status = false
|
||||
document.querySelector(".like").className = "like iconfont icon-aixin"
|
||||
|
||||
} else {
|
||||
LikeList = LikeList.filter((v) => {
|
||||
if (v.id != utils.GetQueryString("id")) {
|
||||
return v
|
||||
}
|
||||
});
|
||||
status = true
|
||||
document.querySelector(".like").className = "like iconfont icon-xin"
|
||||
|
||||
localStorage.setItem("likeList", JSON.stringify(LikeList))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
new Info()
|
||||
74
h5_webview/app/src/main/assets/js/page/like.js
Normal file
74
h5_webview/app/src/main/assets/js/page/like.js
Normal file
@@ -0,0 +1,74 @@
|
||||
class Like {
|
||||
constructor() {
|
||||
this.like = JSON.parse(localStorage.getItem("likeList")) == null
|
||||
? []
|
||||
: JSON.parse(localStorage.getItem("likeList"));
|
||||
|
||||
this.GetLikeList()
|
||||
}
|
||||
|
||||
GetLikeList() {
|
||||
if (this.like == null || this.like.length == 0) {
|
||||
document.querySelector(".jglist ul").innerHTML = "";
|
||||
document.querySelector(".jglist ul").innerHTML =
|
||||
`
|
||||
<div class="nodata">
|
||||
<i class="iconfont icon-wushuju"></i>
|
||||
<p>暂无收藏</p>
|
||||
</div>
|
||||
`
|
||||
} else {
|
||||
document.querySelector(".jglist ul").innerHTML = "";
|
||||
this.like.forEach(v => {
|
||||
document.querySelector(".jglist ul").innerHTML +=
|
||||
`
|
||||
<li>
|
||||
<div class="newest_img">
|
||||
<a href="./info.html?id=${v.id}">
|
||||
<img src="${v.preview}" alt="${v.title}">
|
||||
</a>
|
||||
<span>${v.total}</span>
|
||||
</div>
|
||||
<div class="newest_text">
|
||||
<a href="./info.html?id=${v.id}">
|
||||
<p class="t">${v.title}</p>
|
||||
<p class="source">${v.user}</p>
|
||||
${v.hasOwnProperty("source")
|
||||
? `<p class="source">${v.source}</p>`
|
||||
: ''
|
||||
}
|
||||
</a>
|
||||
</div>
|
||||
</li>
|
||||
`
|
||||
});
|
||||
|
||||
this.BindLongPress()
|
||||
}
|
||||
}
|
||||
|
||||
BindLongPress() {
|
||||
var Li = document.querySelectorAll(".jglist ul li");
|
||||
Li.forEach((v, i) => {
|
||||
utils.longPress(v, () => {
|
||||
Tips.dialog({
|
||||
title: '删除收藏',
|
||||
message: '确认删除您选中的写真集吗?',
|
||||
cancelText: '取消',
|
||||
confirmText: '确定',
|
||||
cancel: () => { },
|
||||
confirm: () => {
|
||||
this.like = this.like.filter((r)=>{
|
||||
return r.id != this.like[i].id
|
||||
})
|
||||
|
||||
localStorage.setItem("likeList", JSON.stringify(this.like))
|
||||
this.GetLikeList()
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
new Like()
|
||||
23
h5_webview/app/src/main/assets/js/page/mechanism.js
Normal file
23
h5_webview/app/src/main/assets/js/page/mechanism.js
Normal file
@@ -0,0 +1,23 @@
|
||||
class Mechanism {
|
||||
constructor () {
|
||||
this.GetMechanismList()
|
||||
}
|
||||
|
||||
async GetMechanismList() {
|
||||
var res = await homeService.mechanism({});
|
||||
console.log(res);
|
||||
var Li = document.querySelector(".mechanism_list");
|
||||
res.forEach(v => {
|
||||
Li.innerHTML+=`
|
||||
<li>
|
||||
<a href="./mechanism_info.html?id=${v.id}&t=${v.title}&type=mechanism">
|
||||
<p>${v.title}</p>
|
||||
<span>${v.quantity}</span>
|
||||
</a>
|
||||
</li>
|
||||
`
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
var mechanism = new Mechanism();
|
||||
60
h5_webview/app/src/main/assets/js/page/mechanism_info.js
Normal file
60
h5_webview/app/src/main/assets/js/page/mechanism_info.js
Normal file
@@ -0,0 +1,60 @@
|
||||
class MechanismInfo {
|
||||
|
||||
constructor () {
|
||||
// 设置标题栏文字
|
||||
utils.SetHeaderTitle(utils.GetQueryString("t"))
|
||||
this.GetMechanismInfo()
|
||||
}
|
||||
|
||||
async GetMechanismInfo() {
|
||||
var res = []
|
||||
if (utils.GetQueryString("type") == "tags") {
|
||||
res = await homeService.classList({
|
||||
page: 0,
|
||||
id: utils.GetQueryString("id")
|
||||
})
|
||||
} else {
|
||||
res = await homeService.mechanismList({
|
||||
page: 0,
|
||||
id: utils.GetQueryString("id")
|
||||
})
|
||||
}
|
||||
|
||||
console.log(res);
|
||||
|
||||
res.list.forEach(v => {
|
||||
document.querySelector(".jglist ul").innerHTML+=
|
||||
`
|
||||
<li>
|
||||
<div class="newest_img">
|
||||
<a href="./info.html?id=${v.id}">
|
||||
<img src="${v.preview}" alt="${v.title}">
|
||||
</a>
|
||||
<span>${v.total}P</span>
|
||||
</div>
|
||||
<div class="newest_text">
|
||||
<a href="./info.html?id=${v.id}">
|
||||
<p class="t">${v.title}</p>
|
||||
<p class="source">${v.user}</p>
|
||||
${
|
||||
v.hasOwnProperty("source")
|
||||
? `<p class="source">${v.source}</p>`
|
||||
: ''
|
||||
}
|
||||
</a>
|
||||
<div class="tags">
|
||||
${
|
||||
(v.tags.map((t) => {
|
||||
return `<div class="tags_item"><a href="./mechanism_info.html?id=${t.id}&type=tags&t=${t.title}">${t.title}</a></div>`
|
||||
})).toString().replace(/,/ig, " ")
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
`
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
new MechanismInfo()
|
||||
56
h5_webview/app/src/main/assets/js/page/model.js
Normal file
56
h5_webview/app/src/main/assets/js/page/model.js
Normal file
@@ -0,0 +1,56 @@
|
||||
class Model {
|
||||
constructor () {
|
||||
this.GetModelList()
|
||||
this.newModelList = []
|
||||
}
|
||||
|
||||
async GetModelList() {
|
||||
var res = await homeService.allModel({});
|
||||
console.log(res);
|
||||
var hot_models = res.hot_models;
|
||||
var newest = res.newest;
|
||||
|
||||
this.newModelList = [...hot_models, ...newest]
|
||||
this.RenderModelItem(hot_models, '.hot_models')
|
||||
this.RenderModelItem(newest, '.newest')
|
||||
|
||||
}
|
||||
|
||||
|
||||
RenderModelItem(data, className) {
|
||||
if (className == ".hot_models") {
|
||||
document.querySelector(`${className} .title`).innerText='热门模特'
|
||||
} else {
|
||||
document.querySelector(`${className} .title`).innerText='最新模特'
|
||||
}
|
||||
data.forEach(v => {
|
||||
document.querySelector(`${className} .model_list`).innerHTML+=
|
||||
`
|
||||
<div class="item">
|
||||
<div class="top">
|
||||
<img src="${v.preview}" alt="${v.title}">
|
||||
${
|
||||
v.total.length == 0
|
||||
? ''
|
||||
: `<span>${v.total}</span>`
|
||||
}
|
||||
</div>
|
||||
<p>${v.title}</p>
|
||||
</div>
|
||||
`
|
||||
});
|
||||
|
||||
this.BindItemClick()
|
||||
}
|
||||
|
||||
BindItemClick() {
|
||||
var Item = document.querySelectorAll(".item");
|
||||
Item.forEach((v,i)=>{
|
||||
v.onclick = () => {
|
||||
location.href = `model_info.html?id=${this.newModelList[i].id}&t=${this.newModelList[i].title}`
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
var model = new Model();
|
||||
75
h5_webview/app/src/main/assets/js/page/model_info.js
Normal file
75
h5_webview/app/src/main/assets/js/page/model_info.js
Normal file
@@ -0,0 +1,75 @@
|
||||
class ModelInfo {
|
||||
|
||||
constructor () {
|
||||
utils.SetHeaderTitle(utils.GetQueryString("t"))
|
||||
this.GetModelInfoData()
|
||||
}
|
||||
|
||||
async GetModelInfoData() {
|
||||
var res = await homeService.modelList({
|
||||
page: 0,
|
||||
id: utils.GetQueryString("id")
|
||||
})
|
||||
|
||||
// 设置模特的头像,名字,介绍
|
||||
document.querySelector(".model_info_header").innerHTML = `
|
||||
<img src="${res.model_info.portrait}" alt="${res.model_info.name}">
|
||||
<div class="right_text">
|
||||
<p>${res.model_info.name}</p>
|
||||
<span>${res.model_info.explain}</span>
|
||||
</div>
|
||||
`
|
||||
|
||||
// 遍历模特的作品
|
||||
document.querySelector(".tazuop .title").innerText = "她的作品"
|
||||
res.list.forEach(v => {
|
||||
document.querySelector(".tazuop ul").innerHTML+=
|
||||
`
|
||||
<li>
|
||||
<div class="newest_img">
|
||||
<a href="./info.html?id=${v.id}">
|
||||
<img src="${v.preview}" alt="${v.title}">
|
||||
</a>
|
||||
<span>${v.total}P</span>
|
||||
</div>
|
||||
<div class="newest_text">
|
||||
<a href="./info.html?id=${v.id}">
|
||||
<p class="t">${v.title}</p>
|
||||
<p class="source">${v.source}</p>
|
||||
</a>
|
||||
<div class="tags">
|
||||
${
|
||||
(v.tags.map((t) => {
|
||||
return `<div class="tags_item"><a href="./mechanism_info.html?id=${t.id}&type=tags&t=${t.title}">${t.title}</a></div>`
|
||||
})).toString().replace(/,/ig, " ")
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
`
|
||||
});
|
||||
|
||||
// 遍历类似模特
|
||||
document.querySelector(".similar .title").innerText = "类似模特"
|
||||
res.similar.forEach((v)=>{
|
||||
document.querySelector(".similar .model_list").innerHTML+= `
|
||||
<div class="item">
|
||||
<div class="top">
|
||||
<img src="${v.preview}" alt="${v.title}">
|
||||
<span>${v.total}</span>
|
||||
</div>
|
||||
<p>${v.title}</p>
|
||||
</div>
|
||||
`
|
||||
})
|
||||
|
||||
var items = document.querySelectorAll(".similar .model_list .item")
|
||||
items.forEach((v,i)=>{
|
||||
v.onclick = function () {
|
||||
location.href = `model_info.html?id=${res.similar[i].id}&t=${res.similar[i].title}`
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
new ModelInfo()
|
||||
30
h5_webview/app/src/main/assets/js/page/my.js
Normal file
30
h5_webview/app/src/main/assets/js/page/my.js
Normal file
@@ -0,0 +1,30 @@
|
||||
class My {
|
||||
constructor() {
|
||||
this.bindClick()
|
||||
}
|
||||
|
||||
bindClick() {
|
||||
document.querySelector(".updateApp").onclick = function () {
|
||||
Tips.loading()
|
||||
setTimeout(()=>{
|
||||
Tips.close();
|
||||
Tips.toast("当前已是最新版本",2000)
|
||||
},2000)
|
||||
}
|
||||
document.querySelector(".clearData").onclick = function () {
|
||||
Tips.dialog({
|
||||
title: '清除缓存',
|
||||
message: '是否清除App所有的缓存,将会删除收藏的数据,首页的自定义分类等,慎重选择!!',
|
||||
cancelText: '取消',
|
||||
confirmText: '确定',
|
||||
confirm: ()=> {
|
||||
localStorage.clear()
|
||||
setTimeout(()=>{
|
||||
Tips.toast("缓存清除成功")
|
||||
},1000)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
new My()
|
||||
48
h5_webview/app/src/main/assets/js/page/search.js
Normal file
48
h5_webview/app/src/main/assets/js/page/search.js
Normal file
@@ -0,0 +1,48 @@
|
||||
class Search {
|
||||
constructor() {
|
||||
this.GetSearchList()
|
||||
}
|
||||
|
||||
async GetSearchList() {
|
||||
var SearchInput = document.querySelector(".search_input input"),
|
||||
SearchSubmit = document.querySelector(".search_input .icon-search");
|
||||
|
||||
SearchSubmit.onclick = async () => {
|
||||
console.log("111");
|
||||
if (SearchInput.value.length == 0) {
|
||||
Tips.toast("输入不能为空")
|
||||
} else {
|
||||
var res = await homeService.search({
|
||||
keyword: SearchInput.value
|
||||
});
|
||||
if (res.length == 0) {
|
||||
document.querySelector(".search_list ul").innerHTML = ""
|
||||
document.querySelector(".search_list ul").innerHTML = `
|
||||
<span class="nodata">没有搜索结果</span>
|
||||
`
|
||||
} else {
|
||||
document.querySelector(".search_list ul").innerHTML = ""
|
||||
res.forEach(v => {
|
||||
document.querySelector(".search_list ul").innerHTML+= `
|
||||
<li>
|
||||
<div class="newest_img">
|
||||
<a href="./info.html?id=${v.id}">
|
||||
<img src="${v.preview}" alt="${v.title}">
|
||||
</a>
|
||||
<span>49P</span>
|
||||
</div>
|
||||
<div class="newest_text">
|
||||
<a href="./info.html?id=${v.id}">
|
||||
<p class="t">${v.title}</p>
|
||||
</a>
|
||||
</div>
|
||||
</li>
|
||||
`
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
new Search()
|
||||
84
h5_webview/app/src/main/assets/js/page/type_edit.js
Normal file
84
h5_webview/app/src/main/assets/js/page/type_edit.js
Normal file
@@ -0,0 +1,84 @@
|
||||
class TypeEdit {
|
||||
constructor() {
|
||||
this.YouChioose = []
|
||||
this.NoChiooseList = []
|
||||
this.RenderYouChioose()
|
||||
}
|
||||
|
||||
RenderYouChioose() {
|
||||
this.YouChioose = JSON.parse(localStorage.getItem("typeList"));
|
||||
console.log(this.YouChioose);
|
||||
|
||||
// 渲染 点击删除以下分类
|
||||
document.querySelector(".you_chioose .chiooseWrap").innerHTML = ""
|
||||
this.YouChioose.forEach(v => {
|
||||
document.querySelector(".you_chioose .chiooseWrap").innerHTML += `
|
||||
<li>${v.title}</li>
|
||||
`
|
||||
});
|
||||
this.BindTopClick()
|
||||
|
||||
// 渲染 点击添加以下分类
|
||||
if (localStorage.getItem("nochioose") == null) {
|
||||
localStorage.setItem("nochioose", JSON.stringify([]))
|
||||
} else {
|
||||
this.NoChiooseList = JSON.parse(localStorage.getItem("nochioose"))
|
||||
document.querySelector(".chioose_list .chiooseWrap").innerHTML = ""
|
||||
this.NoChiooseList.forEach(v => {
|
||||
document.querySelector(".chioose_list .chiooseWrap").innerHTML += `
|
||||
<li>${v.title}</li>
|
||||
`
|
||||
});
|
||||
|
||||
this.BindBottomClick()
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
BindTopClick() {
|
||||
// 绑定事件
|
||||
var YouChiooseLi = document.querySelectorAll(".you_chioose .chiooseWrap li");
|
||||
YouChiooseLi.forEach((v, i) => {
|
||||
v.onclick = () => {
|
||||
|
||||
var noCh = JSON.parse(localStorage.getItem("nochioose"))
|
||||
noCh.push(this.YouChioose[i]);
|
||||
localStorage.setItem("nochioose", JSON.stringify(noCh));
|
||||
|
||||
this.YouChioose = this.YouChioose.filter(res => {
|
||||
if (res.id != this.YouChioose[i].id) {
|
||||
return res
|
||||
}
|
||||
})
|
||||
|
||||
localStorage.setItem("typeList", JSON.stringify(this.YouChioose))
|
||||
this.RenderYouChioose()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
BindBottomClick() {
|
||||
var Li = document.querySelectorAll(".chioose_list .chiooseWrap li");
|
||||
Li.forEach((v,i)=>{
|
||||
v.onclick = () => {
|
||||
|
||||
var typeList = JSON.parse(localStorage.getItem("typeList"))
|
||||
typeList.push(this.NoChiooseList[i]);
|
||||
localStorage.setItem("typeList", JSON.stringify(typeList));
|
||||
|
||||
this.NoChiooseList = this.NoChiooseList.filter(res => {
|
||||
if (res.id != this.NoChiooseList[i].id) {
|
||||
return res
|
||||
}
|
||||
});
|
||||
|
||||
localStorage.setItem("nochioose", JSON.stringify(this.NoChiooseList))
|
||||
this.RenderYouChioose()
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
new TypeEdit()
|
||||
1
h5_webview/app/src/main/assets/js/service/.pydio
Normal file
1
h5_webview/app/src/main/assets/js/service/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
8a4aa590-790c-48e9-9fd5-3207697bf8db
|
||||
82
h5_webview/app/src/main/assets/js/service/HomeService.js
Normal file
82
h5_webview/app/src/main/assets/js/service/HomeService.js
Normal file
@@ -0,0 +1,82 @@
|
||||
/**
|
||||
* 请求的中间层
|
||||
* 被页面调用,然后它去调用ajax
|
||||
*/
|
||||
class HomeService {
|
||||
|
||||
|
||||
GetHomeData(data) {
|
||||
return ajax({
|
||||
url: Config.ApiList.index,
|
||||
data: data,
|
||||
methods: 'GET'
|
||||
});
|
||||
}
|
||||
|
||||
info(data) {
|
||||
return ajax({
|
||||
url: Config.ApiList.info,
|
||||
data: data,
|
||||
methods: 'GET'
|
||||
});
|
||||
}
|
||||
|
||||
mechanism(data) {
|
||||
return ajax({
|
||||
url: Config.ApiList.mechanism,
|
||||
data: data,
|
||||
methods: 'GET'
|
||||
});
|
||||
}
|
||||
|
||||
type(data) {
|
||||
return ajax({
|
||||
url: Config.ApiList.type,
|
||||
data: data,
|
||||
methods: 'GET'
|
||||
});
|
||||
}
|
||||
|
||||
classList(data) {
|
||||
return ajax({
|
||||
url: Config.ApiList.classList,
|
||||
data: data,
|
||||
methods: 'GET'
|
||||
});
|
||||
}
|
||||
|
||||
allModel(data) {
|
||||
return ajax({
|
||||
url: Config.ApiList.allModel,
|
||||
data: data,
|
||||
methods: 'GET'
|
||||
});
|
||||
}
|
||||
|
||||
modelList(data) {
|
||||
return ajax({
|
||||
url: Config.ApiList.modelList,
|
||||
data: data,
|
||||
methods: 'GET'
|
||||
});
|
||||
}
|
||||
|
||||
mechanismList(data) {
|
||||
return ajax({
|
||||
url: Config.ApiList.mechanismList,
|
||||
data: data,
|
||||
methods: 'GET'
|
||||
});
|
||||
}
|
||||
|
||||
search(data) {
|
||||
return ajax({
|
||||
url: Config.ApiList.search,
|
||||
data: data,
|
||||
methods: 'GET'
|
||||
});
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
var homeService = new HomeService()
|
||||
1
h5_webview/app/src/main/assets/js/utils/.pydio
Normal file
1
h5_webview/app/src/main/assets/js/utils/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
aaafa91c-6f8f-4cd8-9d87-bc5c2afaac14
|
||||
1
h5_webview/app/src/main/assets/js/utils/dist/.pydio
vendored
Normal file
1
h5_webview/app/src/main/assets/js/utils/dist/.pydio
vendored
Normal file
@@ -0,0 +1 @@
|
||||
f296bafb-0a71-4d49-90ec-a2522dfac7a5
|
||||
1
h5_webview/app/src/main/assets/js/utils/dist/default-skin/.pydio
vendored
Normal file
1
h5_webview/app/src/main/assets/js/utils/dist/default-skin/.pydio
vendored
Normal file
@@ -0,0 +1 @@
|
||||
f667823c-e721-4a66-8020-3d19645ff572
|
||||
482
h5_webview/app/src/main/assets/js/utils/dist/default-skin/default-skin.css
vendored
Normal file
482
h5_webview/app/src/main/assets/js/utils/dist/default-skin/default-skin.css
vendored
Normal file
@@ -0,0 +1,482 @@
|
||||
/*! PhotoSwipe Default UI CSS by Dmitry Semenov | photoswipe.com | MIT license */
|
||||
/*
|
||||
|
||||
Contents:
|
||||
|
||||
1. Buttons
|
||||
2. Share modal and links
|
||||
3. Index indicator ("1 of X" counter)
|
||||
4. Caption
|
||||
5. Loading indicator
|
||||
6. Additional styles (root element, top bar, idle state, hidden state, etc.)
|
||||
|
||||
*/
|
||||
/*
|
||||
|
||||
1. Buttons
|
||||
|
||||
*/
|
||||
/* <button> css reset */
|
||||
.pswp__button {
|
||||
width: 0.88rem;
|
||||
height: 0.88rem;
|
||||
position: relative;
|
||||
background: none;
|
||||
cursor: pointer;
|
||||
overflow: visible;
|
||||
-webkit-appearance: none;
|
||||
display: block;
|
||||
border: 0;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
float: right;
|
||||
opacity: 0.75;
|
||||
-webkit-transition: opacity 0.2s;
|
||||
transition: opacity 0.2s;
|
||||
-webkit-box-shadow: none;
|
||||
box-shadow: none; }
|
||||
.pswp__button:focus, .pswp__button:hover {
|
||||
opacity: 1; }
|
||||
.pswp__button:active {
|
||||
outline: none;
|
||||
opacity: 0.9; }
|
||||
.pswp__button::-moz-focus-inner {
|
||||
padding: 0;
|
||||
border: 0; }
|
||||
|
||||
/* pswp__ui--over-close class it added when mouse is over element that should close gallery */
|
||||
.pswp__ui--over-close .pswp__button--close {
|
||||
opacity: 1; }
|
||||
|
||||
.pswp__button,
|
||||
.pswp__button--arrow--left:before,
|
||||
.pswp__button--arrow--right:before {
|
||||
background: url(default-skin.png) 0 0 no-repeat;
|
||||
background-size: 5.28rem 1.76rem;
|
||||
width: 0.88rem;
|
||||
height: 0.88rem; }
|
||||
|
||||
@media (-webkit-min-device-pixel-ratio: 1.1), (-webkit-min-device-pixel-ratio: 1.09375), (min-resolution: 105dpi), (min-resolution: 1.1dppx) {
|
||||
/* Serve SVG sprite if browser supports SVG and resolution is more than 105dpi */
|
||||
.pswp--svg .pswp__button,
|
||||
.pswp--svg .pswp__button--arrow--left:before,
|
||||
.pswp--svg .pswp__button--arrow--right:before {
|
||||
background-image: url(default-skin.svg); }
|
||||
.pswp--svg .pswp__button--arrow--left,
|
||||
.pswp--svg .pswp__button--arrow--right {
|
||||
background: none; } }
|
||||
|
||||
.pswp__button--close {
|
||||
background-position: 0 -0.88rem; }
|
||||
|
||||
.pswp__button--share {
|
||||
background-position: -0.88rem -0.88rem; }
|
||||
|
||||
.pswp__button--fs {
|
||||
display: none; }
|
||||
|
||||
.pswp--supports-fs .pswp__button--fs {
|
||||
display: block; }
|
||||
|
||||
.pswp--fs .pswp__button--fs {
|
||||
background-position: -0.88rem 0; }
|
||||
|
||||
.pswp__button--zoom {
|
||||
display: none;
|
||||
background-position: -1.76rem 0; }
|
||||
|
||||
.pswp--zoom-allowed .pswp__button--zoom {
|
||||
display: block; }
|
||||
|
||||
.pswp--zoomed-in .pswp__button--zoom {
|
||||
background-position: -2.64rem 0; }
|
||||
|
||||
/* no arrows on touch screens */
|
||||
.pswp--touch .pswp__button--arrow--left,
|
||||
.pswp--touch .pswp__button--arrow--right {
|
||||
visibility: hidden; }
|
||||
|
||||
/*
|
||||
Arrow buttons hit area
|
||||
(icon is added to :before pseudo-element)
|
||||
*/
|
||||
.pswp__button--arrow--left,
|
||||
.pswp__button--arrow--right {
|
||||
background: none;
|
||||
top: 50%;
|
||||
margin-top: -1rem;
|
||||
width: 1.4rem;
|
||||
height: 2rem;
|
||||
position: absolute; }
|
||||
|
||||
.pswp__button--arrow--left {
|
||||
left: 0; }
|
||||
|
||||
.pswp__button--arrow--right {
|
||||
right: 0; }
|
||||
|
||||
.pswp__button--arrow--left:before,
|
||||
.pswp__button--arrow--right:before {
|
||||
content: '';
|
||||
top: 0.7rem;
|
||||
background-color: rgba(0, 0, 0, 0.3);
|
||||
height: 0.6rem;
|
||||
width: 0.64rem;
|
||||
position: absolute; }
|
||||
|
||||
.pswp__button--arrow--left:before {
|
||||
left: 0.12rem;
|
||||
background-position: -2.76rem -0.88rem; }
|
||||
|
||||
.pswp__button--arrow--right:before {
|
||||
right: 0.12rem;
|
||||
background-position: -1.88rem -0.88rem; }
|
||||
|
||||
/*
|
||||
|
||||
2. Share modal/popup and links
|
||||
|
||||
*/
|
||||
.pswp__counter,
|
||||
.pswp__share-modal {
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none; }
|
||||
|
||||
.pswp__share-modal {
|
||||
display: block;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
padding: 0.2rem;
|
||||
position: absolute;
|
||||
z-index: 1600;
|
||||
opacity: 0;
|
||||
-webkit-transition: opacity 0.25s ease-out;
|
||||
transition: opacity 0.25s ease-out;
|
||||
-webkit-backface-visibility: hidden;
|
||||
will-change: opacity; }
|
||||
|
||||
.pswp__share-modal--hidden {
|
||||
display: none; }
|
||||
|
||||
.pswp__share-tooltip {
|
||||
z-index: 1620;
|
||||
position: absolute;
|
||||
background: #FFF;
|
||||
top: 1.12rem;
|
||||
border-radius: 0.04rem;
|
||||
display: block;
|
||||
width: auto;
|
||||
right: 0.88rem;
|
||||
-webkit-box-shadow: 0 0.04rem 0.1rem rgba(0, 0, 0, 0.25);
|
||||
box-shadow: 0 0.04rem 0.1rem rgba(0, 0, 0, 0.25);
|
||||
-webkit-transform: translateY(0.12rem);
|
||||
-ms-transform: translateY(0.12rem);
|
||||
transform: translateY(0.12rem);
|
||||
-webkit-transition: -webkit-transform 0.25s;
|
||||
transition: transform 0.25s;
|
||||
-webkit-backface-visibility: hidden;
|
||||
will-change: transform; }
|
||||
.pswp__share-tooltip a {
|
||||
display: block;
|
||||
padding: 0.16rem 0.24rem;
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
font-size: 0.28rem;
|
||||
line-height: 0.36rem; }
|
||||
.pswp__share-tooltip a:hover {
|
||||
text-decoration: none;
|
||||
color: #000; }
|
||||
.pswp__share-tooltip a:first-child {
|
||||
/* round corners on the first/last list item */
|
||||
border-radius: 0.04rem 0.04rem 0 0; }
|
||||
.pswp__share-tooltip a:last-child {
|
||||
border-radius: 0 0 0.04rem 0.04rem; }
|
||||
|
||||
.pswp__share-modal--fade-in {
|
||||
opacity: 1; }
|
||||
.pswp__share-modal--fade-in .pswp__share-tooltip {
|
||||
-webkit-transform: translateY(0);
|
||||
-ms-transform: translateY(0);
|
||||
transform: translateY(0); }
|
||||
|
||||
/* increase size of share links on touch devices */
|
||||
.pswp--touch .pswp__share-tooltip a {
|
||||
padding: 0.32rem 0.24rem; }
|
||||
|
||||
a.pswp__share--facebook:before {
|
||||
content: '';
|
||||
display: block;
|
||||
width: 0;
|
||||
height: 0;
|
||||
position: absolute;
|
||||
top: -0.24rem;
|
||||
right: 0.3rem;
|
||||
border: 0.12rem solid transparent;
|
||||
border-bottom-color: #FFF;
|
||||
-webkit-pointer-events: none;
|
||||
-moz-pointer-events: none;
|
||||
pointer-events: none; }
|
||||
|
||||
a.pswp__share--facebook:hover {
|
||||
background: #3E5C9A;
|
||||
color: #FFF; }
|
||||
a.pswp__share--facebook:hover:before {
|
||||
border-bottom-color: #3E5C9A; }
|
||||
|
||||
a.pswp__share--twitter:hover {
|
||||
background: #55ACEE;
|
||||
color: #FFF; }
|
||||
|
||||
a.pswp__share--pinterest:hover {
|
||||
background: #CCC;
|
||||
color: #CE272D; }
|
||||
|
||||
a.pswp__share--download:hover {
|
||||
background: #DDD; }
|
||||
|
||||
/*
|
||||
|
||||
3. Index indicator ("1 of X" counter)
|
||||
|
||||
*/
|
||||
.pswp__counter {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
height: 0.88rem;
|
||||
font-size: 0.26rem;
|
||||
line-height: 0.88rem;
|
||||
color: #FFF;
|
||||
opacity: 0.75;
|
||||
padding: 0 0.2rem; }
|
||||
|
||||
/*
|
||||
|
||||
4. Caption
|
||||
|
||||
*/
|
||||
.pswp__caption {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
min-height: 0.88rem; }
|
||||
.pswp__caption small {
|
||||
font-size: 0.22rem;
|
||||
color: #BBB; }
|
||||
|
||||
.pswp__caption__center {
|
||||
text-align: left;
|
||||
max-width: 8.4rem;
|
||||
margin: 0 auto;
|
||||
font-size: 0.26rem;
|
||||
padding: 0.2rem;
|
||||
line-height: 0.4rem;
|
||||
color: #CCC; }
|
||||
|
||||
.pswp__caption--empty {
|
||||
display: none; }
|
||||
|
||||
/* Fake caption element, used to calculate height of next/prev image */
|
||||
.pswp__caption--fake {
|
||||
visibility: hidden; }
|
||||
|
||||
/*
|
||||
|
||||
5. Loading indicator (preloader)
|
||||
|
||||
You can play with it here - http://codepen.io/dimsemenov/pen/yyBWoR
|
||||
|
||||
*/
|
||||
.pswp__preloader {
|
||||
width: 0.88rem;
|
||||
height: 0.88rem;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 50%;
|
||||
margin-left: -0.44rem;
|
||||
opacity: 0;
|
||||
-webkit-transition: opacity 0.25s ease-out;
|
||||
transition: opacity 0.25s ease-out;
|
||||
will-change: opacity;
|
||||
direction: ltr; }
|
||||
|
||||
.pswp__preloader__icn {
|
||||
width: 0.4rem;
|
||||
height: 0.4rem;
|
||||
margin: 0.24rem; }
|
||||
|
||||
.pswp__preloader--active {
|
||||
opacity: 1; }
|
||||
.pswp__preloader--active .pswp__preloader__icn {
|
||||
/* We use .gif in browsers that don't support CSS animation */
|
||||
background: url(preloader.gif) 0 0 no-repeat; }
|
||||
|
||||
.pswp--css_animation .pswp__preloader--active {
|
||||
opacity: 1; }
|
||||
.pswp--css_animation .pswp__preloader--active .pswp__preloader__icn {
|
||||
-webkit-animation: clockwise 500ms linear infinite;
|
||||
animation: clockwise 500ms linear infinite; }
|
||||
.pswp--css_animation .pswp__preloader--active .pswp__preloader__donut {
|
||||
-webkit-animation: donut-rotate 1000ms cubic-bezier(0.4, 0, 0.22, 1) infinite;
|
||||
animation: donut-rotate 1000ms cubic-bezier(0.4, 0, 0.22, 1) infinite; }
|
||||
|
||||
.pswp--css_animation .pswp__preloader__icn {
|
||||
background: none;
|
||||
opacity: 0.75;
|
||||
width: 0.28rem;
|
||||
height: 0.28rem;
|
||||
position: absolute;
|
||||
left: 0.3rem;
|
||||
top: 0.3rem;
|
||||
margin: 0; }
|
||||
|
||||
.pswp--css_animation .pswp__preloader__cut {
|
||||
/*
|
||||
The idea of animating inner circle is based on Polymer ("material") loading indicator
|
||||
by Keanu Lee https://blog.keanulee.com/2014/10/20/the-tale-of-three-spinners.html
|
||||
*/
|
||||
position: relative;
|
||||
width: 0.14rem;
|
||||
height: 0.28rem;
|
||||
overflow: hidden; }
|
||||
|
||||
.pswp--css_animation .pswp__preloader__donut {
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
width: 0.28rem;
|
||||
height: 0.28rem;
|
||||
border: 0.04rem solid #FFF;
|
||||
border-radius: 50%;
|
||||
border-left-color: transparent;
|
||||
border-bottom-color: transparent;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background: none;
|
||||
margin: 0; }
|
||||
|
||||
@media screen and (max-width: 1024px) {
|
||||
.pswp__preloader {
|
||||
position: relative;
|
||||
left: auto;
|
||||
top: auto;
|
||||
margin: 0;
|
||||
float: right; } }
|
||||
|
||||
@-webkit-keyframes clockwise {
|
||||
0% {
|
||||
-webkit-transform: rotate(0deg);
|
||||
transform: rotate(0deg); }
|
||||
100% {
|
||||
-webkit-transform: rotate(360deg);
|
||||
transform: rotate(360deg); } }
|
||||
|
||||
@keyframes clockwise {
|
||||
0% {
|
||||
-webkit-transform: rotate(0deg);
|
||||
transform: rotate(0deg); }
|
||||
100% {
|
||||
-webkit-transform: rotate(360deg);
|
||||
transform: rotate(360deg); } }
|
||||
|
||||
@-webkit-keyframes donut-rotate {
|
||||
0% {
|
||||
-webkit-transform: rotate(0);
|
||||
transform: rotate(0); }
|
||||
50% {
|
||||
-webkit-transform: rotate(-140deg);
|
||||
transform: rotate(-140deg); }
|
||||
100% {
|
||||
-webkit-transform: rotate(0);
|
||||
transform: rotate(0); } }
|
||||
|
||||
@keyframes donut-rotate {
|
||||
0% {
|
||||
-webkit-transform: rotate(0);
|
||||
transform: rotate(0); }
|
||||
50% {
|
||||
-webkit-transform: rotate(-140deg);
|
||||
transform: rotate(-140deg); }
|
||||
100% {
|
||||
-webkit-transform: rotate(0);
|
||||
transform: rotate(0); } }
|
||||
|
||||
/*
|
||||
|
||||
6. Additional styles
|
||||
|
||||
*/
|
||||
/* root element of UI */
|
||||
.pswp__ui {
|
||||
-webkit-font-smoothing: auto;
|
||||
visibility: visible;
|
||||
opacity: 1;
|
||||
z-index: 1550; }
|
||||
|
||||
/* top black bar with buttons and "1 of X" indicator */
|
||||
.pswp__top-bar {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
height: 0.88rem;
|
||||
width: 100%; }
|
||||
|
||||
.pswp__caption,
|
||||
.pswp__top-bar,
|
||||
.pswp--has_mouse .pswp__button--arrow--left,
|
||||
.pswp--has_mouse .pswp__button--arrow--right {
|
||||
-webkit-backface-visibility: hidden;
|
||||
will-change: opacity;
|
||||
-webkit-transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1);
|
||||
transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1); }
|
||||
|
||||
/* pswp--has_mouse class is added only when two subsequent mousemove events occur */
|
||||
.pswp--has_mouse .pswp__button--arrow--left,
|
||||
.pswp--has_mouse .pswp__button--arrow--right {
|
||||
visibility: visible; }
|
||||
|
||||
.pswp__top-bar,
|
||||
.pswp__caption {
|
||||
background-color: rgba(0, 0, 0, 0.5); }
|
||||
|
||||
/* pswp__ui--fit class is added when main image "fits" between top bar and bottom bar (caption) */
|
||||
.pswp__ui--fit .pswp__top-bar,
|
||||
.pswp__ui--fit .pswp__caption {
|
||||
background-color: rgba(0, 0, 0, 0.3); }
|
||||
|
||||
/* pswp__ui--idle class is added when mouse isn't moving for several seconds (JS option timeToIdle) */
|
||||
.pswp__ui--idle .pswp__top-bar {
|
||||
opacity: 0; }
|
||||
|
||||
.pswp__ui--idle .pswp__button--arrow--left,
|
||||
.pswp__ui--idle .pswp__button--arrow--right {
|
||||
opacity: 0; }
|
||||
|
||||
/*
|
||||
pswp__ui--hidden class is added when controls are hidden
|
||||
e.g. when user taps to toggle visibility of controls
|
||||
*/
|
||||
.pswp__ui--hidden .pswp__top-bar,
|
||||
.pswp__ui--hidden .pswp__caption,
|
||||
.pswp__ui--hidden .pswp__button--arrow--left,
|
||||
.pswp__ui--hidden .pswp__button--arrow--right {
|
||||
/* Force paint & create composition layer for controls. */
|
||||
opacity: 0.001; }
|
||||
|
||||
/* pswp__ui--one-slide class is added when there is just one item in gallery */
|
||||
.pswp__ui--one-slide .pswp__button--arrow--left,
|
||||
.pswp__ui--one-slide .pswp__button--arrow--right,
|
||||
.pswp__ui--one-slide .pswp__counter {
|
||||
display: none; }
|
||||
|
||||
.pswp__element--disabled {
|
||||
display: none !important; }
|
||||
|
||||
.pswp--minimal--dark .pswp__top-bar {
|
||||
background: none; }
|
||||
BIN
h5_webview/app/src/main/assets/js/utils/dist/default-skin/default-skin.png
vendored
Normal file
BIN
h5_webview/app/src/main/assets/js/utils/dist/default-skin/default-skin.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 547 B |
1
h5_webview/app/src/main/assets/js/utils/dist/default-skin/default-skin.svg
vendored
Normal file
1
h5_webview/app/src/main/assets/js/utils/dist/default-skin/default-skin.svg
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<svg width="264" height="88" viewBox="0 0 264 88" xmlns="http://www.w3.org/2000/svg"><title>default-skin 2</title><g fill="none" fill-rule="evenodd"><g><path d="M67.002 59.5v3.768c-6.307.84-9.184 5.75-10.002 9.732 2.22-2.83 5.564-5.098 10.002-5.098V71.5L73 65.585 67.002 59.5z" id="Shape" fill="#fff"/><g fill="#fff"><path d="M13 29v-5h2v3h3v2h-5zM13 15h5v2h-3v3h-2v-5zM31 15v5h-2v-3h-3v-2h5zM31 29h-5v-2h3v-3h2v5z" id="Shape"/></g><g fill="#fff"><path d="M62 24v5h-2v-3h-3v-2h5zM62 20h-5v-2h3v-3h2v5zM70 20v-5h2v3h3v2h-5zM70 24h5v2h-3v3h-2v-5z"/></g><path d="M20.586 66l-5.656-5.656 1.414-1.414L22 64.586l5.656-5.656 1.414 1.414L23.414 66l5.656 5.656-1.414 1.414L22 67.414l-5.656 5.656-1.414-1.414L20.586 66z" fill="#fff"/><path d="M111.785 65.03L110 63.5l3-3.5h-10v-2h10l-3-3.5 1.785-1.468L117 59l-5.215 6.03z" fill="#fff"/><path d="M152.215 65.03L154 63.5l-3-3.5h10v-2h-10l3-3.5-1.785-1.468L147 59l5.215 6.03z" fill="#fff"/><g><path id="Rectangle-11" fill="#fff" d="M160.957 28.543l-3.25-3.25-1.413 1.414 3.25 3.25z"/><path d="M152.5 27c3.038 0 5.5-2.462 5.5-5.5s-2.462-5.5-5.5-5.5-5.5 2.462-5.5 5.5 2.462 5.5 5.5 5.5z" id="Oval-1" stroke="#fff" stroke-width="1.5"/><path fill="#fff" d="M150 21h5v1h-5z"/></g><g><path d="M116.957 28.543l-1.414 1.414-3.25-3.25 1.414-1.414 3.25 3.25z" fill="#fff"/><path d="M108.5 27c3.038 0 5.5-2.462 5.5-5.5s-2.462-5.5-5.5-5.5-5.5 2.462-5.5 5.5 2.462 5.5 5.5 5.5z" stroke="#fff" stroke-width="1.5"/><path fill="#fff" d="M106 21h5v1h-5z"/><path fill="#fff" d="M109.043 19.008l-.085 5-1-.017.085-5z"/></g></g></g></svg>
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
BIN
h5_webview/app/src/main/assets/js/utils/dist/default-skin/preloader.gif
vendored
Normal file
BIN
h5_webview/app/src/main/assets/js/utils/dist/default-skin/preloader.gif
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 866 B |
201
h5_webview/app/src/main/assets/js/utils/dist/initPhotoSwipe.js
vendored
Normal file
201
h5_webview/app/src/main/assets/js/utils/dist/initPhotoSwipe.js
vendored
Normal file
@@ -0,0 +1,201 @@
|
||||
var initPhotoSwipeFromDOM = function(gallerySelector) {
|
||||
|
||||
// parse slide data (url, title, size ...) from DOM elements
|
||||
// (children of gallerySelector)
|
||||
var parseThumbnailElements = function(el) {
|
||||
var thumbElements = el.childNodes,
|
||||
numNodes = thumbElements.length,
|
||||
items = [],
|
||||
figureEl,
|
||||
linkEl,
|
||||
size,
|
||||
item;
|
||||
|
||||
for(var i = 0; i < numNodes; i++) {
|
||||
|
||||
figureEl = thumbElements[i]; // <figure> element
|
||||
|
||||
// include only element nodes
|
||||
if(figureEl.nodeType !== 1) {
|
||||
continue;
|
||||
}
|
||||
|
||||
linkEl = figureEl.children[0]; // <a> element
|
||||
|
||||
size = linkEl.getAttribute('data-size').split('x');
|
||||
|
||||
// create slide object
|
||||
item = {
|
||||
src: linkEl.getAttribute('href'),
|
||||
w: parseInt(size[0], 10),
|
||||
h: parseInt(size[1], 10)
|
||||
};
|
||||
|
||||
|
||||
|
||||
if(figureEl.children.length > 1) {
|
||||
// <figcaption> content
|
||||
item.title = figureEl.children[1].innerHTML;
|
||||
}
|
||||
|
||||
if(linkEl.children.length > 0) {
|
||||
// <img> thumbnail element, retrieving thumbnail url
|
||||
item.msrc = linkEl.children[0].getAttribute('src');
|
||||
}
|
||||
|
||||
item.el = figureEl; // save link to element for getThumbBoundsFn
|
||||
items.push(item);
|
||||
}
|
||||
|
||||
return items;
|
||||
};
|
||||
|
||||
// find nearest parent element
|
||||
var closest = function closest(el, fn) {
|
||||
return el && ( fn(el) ? el : closest(el.parentNode, fn) );
|
||||
};
|
||||
|
||||
// triggers when user clicks on thumbnail
|
||||
var onThumbnailsClick = function(e) {
|
||||
e = e || window.event;
|
||||
e.preventDefault ? e.preventDefault() : e.returnValue = false;
|
||||
|
||||
var eTarget = e.target || e.srcElement;
|
||||
|
||||
// find root element of slide
|
||||
var clickedListItem = closest(eTarget, function(el) {
|
||||
return (el.tagName && el.tagName.toUpperCase() === 'FIGURE');
|
||||
});
|
||||
|
||||
if(!clickedListItem) {
|
||||
return;
|
||||
}
|
||||
|
||||
// find index of clicked item by looping through all child nodes
|
||||
// alternatively, you may define index via data- attribute
|
||||
var clickedGallery = clickedListItem.parentNode,
|
||||
childNodes = clickedListItem.parentNode.childNodes,
|
||||
numChildNodes = childNodes.length,
|
||||
nodeIndex = 0,
|
||||
index;
|
||||
|
||||
for (var i = 0; i < numChildNodes; i++) {
|
||||
if(childNodes[i].nodeType !== 1) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if(childNodes[i] === clickedListItem) {
|
||||
index = nodeIndex;
|
||||
break;
|
||||
}
|
||||
nodeIndex++;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(index >= 0) {
|
||||
// open PhotoSwipe if valid index found
|
||||
openPhotoSwipe( index, clickedGallery );
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
// parse picture index and gallery index from URL (#&pid=1&gid=2)
|
||||
var photoswipeParseHash = function() {
|
||||
var hash = window.location.hash.substring(1),
|
||||
params = {};
|
||||
|
||||
if(hash.length < 5) {
|
||||
return params;
|
||||
}
|
||||
|
||||
var vars = hash.split('&');
|
||||
for (var i = 0; i < vars.length; i++) {
|
||||
if(!vars[i]) {
|
||||
continue;
|
||||
}
|
||||
var pair = vars[i].split('=');
|
||||
if(pair.length < 2) {
|
||||
continue;
|
||||
}
|
||||
params[pair[0]] = pair[1];
|
||||
}
|
||||
|
||||
if(params.gid) {
|
||||
params.gid = parseInt(params.gid, 10);
|
||||
}
|
||||
|
||||
return params;
|
||||
};
|
||||
|
||||
var openPhotoSwipe = function(index, galleryElement, disableAnimation, fromURL) {
|
||||
var pswpElement = document.querySelectorAll('.pswp')[0],
|
||||
gallery,
|
||||
options,
|
||||
items;
|
||||
|
||||
items = parseThumbnailElements(galleryElement);
|
||||
// define options (if needed)
|
||||
options = {
|
||||
|
||||
// define gallery index (for URL)
|
||||
galleryUID: galleryElement.getAttribute('data-pswp-uid'),
|
||||
|
||||
getThumbBoundsFn: function(index) {
|
||||
// See Options -> getThumbBoundsFn section of documentation for more info
|
||||
var thumbnail = items[index].el.getElementsByTagName('img')[0], // find thumbnail
|
||||
pageYScroll = window.pageYOffset || document.documentElement.scrollTop,
|
||||
rect = thumbnail.getBoundingClientRect();
|
||||
|
||||
return {x:rect.left, y:rect.top + pageYScroll, w:rect.width};
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// PhotoSwipe opened from URL
|
||||
if(fromURL) {
|
||||
if(options.galleryPIDs) {
|
||||
// parse real index when custom PIDs are used
|
||||
// http://photoswipe.com/documentation/faq.html#custom-pid-in-url
|
||||
for(var j = 0; j < items.length; j++) {
|
||||
if(items[j].pid == index) {
|
||||
options.index = j;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// in URL indexes start from 1
|
||||
options.index = parseInt(index, 10) - 1;
|
||||
}
|
||||
} else {
|
||||
options.index = parseInt(index, 10);
|
||||
}
|
||||
|
||||
// exit if index not found
|
||||
if( isNaN(options.index) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if(disableAnimation) {
|
||||
options.showAnimationDuration = 0;
|
||||
}
|
||||
|
||||
// Pass data to PhotoSwipe and initialize it
|
||||
gallery = new PhotoSwipe( pswpElement, PhotoSwipeUI_Default, items, options);
|
||||
gallery.init();
|
||||
};
|
||||
|
||||
// loop through all gallery elements and bind events
|
||||
var galleryElements = document.querySelectorAll( gallerySelector );
|
||||
|
||||
for(var i = 0, l = galleryElements.length; i < l; i++) {
|
||||
galleryElements[i].setAttribute('data-pswp-uid', i+1);
|
||||
galleryElements[i].onclick = onThumbnailsClick;
|
||||
}
|
||||
|
||||
// Parse URL and open gallery if it contains #&pid=3&gid=1
|
||||
var hashData = photoswipeParseHash();
|
||||
if(hashData.pid && hashData.gid) {
|
||||
openPhotoSwipe( hashData.pid , galleryElements[ hashData.gid - 1 ], true, true );
|
||||
}
|
||||
};
|
||||
861
h5_webview/app/src/main/assets/js/utils/dist/photoswipe-ui-default.js
vendored
Normal file
861
h5_webview/app/src/main/assets/js/utils/dist/photoswipe-ui-default.js
vendored
Normal file
@@ -0,0 +1,861 @@
|
||||
/*! PhotoSwipe Default UI - 4.1.3 - 2019-01-08
|
||||
* http://photoswipe.com
|
||||
* Copyright (c) 2019 Dmitry Semenov; */
|
||||
/**
|
||||
*
|
||||
* UI on top of main sliding area (caption, arrows, close button, etc.).
|
||||
* Built just using public methods/properties of PhotoSwipe.
|
||||
*
|
||||
*/
|
||||
(function (root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define(factory);
|
||||
} else if (typeof exports === 'object') {
|
||||
module.exports = factory();
|
||||
} else {
|
||||
root.PhotoSwipeUI_Default = factory();
|
||||
}
|
||||
})(this, function () {
|
||||
|
||||
'use strict';
|
||||
|
||||
|
||||
|
||||
var PhotoSwipeUI_Default =
|
||||
function(pswp, framework) {
|
||||
|
||||
var ui = this;
|
||||
var _overlayUIUpdated = false,
|
||||
_controlsVisible = true,
|
||||
_fullscrenAPI,
|
||||
_controls,
|
||||
_captionContainer,
|
||||
_fakeCaptionContainer,
|
||||
_indexIndicator,
|
||||
_shareButton,
|
||||
_shareModal,
|
||||
_shareModalHidden = true,
|
||||
_initalCloseOnScrollValue,
|
||||
_isIdle,
|
||||
_listen,
|
||||
|
||||
_loadingIndicator,
|
||||
_loadingIndicatorHidden,
|
||||
_loadingIndicatorTimeout,
|
||||
|
||||
_galleryHasOneSlide,
|
||||
|
||||
_options,
|
||||
_defaultUIOptions = {
|
||||
barsSize: {top:44, bottom:'auto'},
|
||||
closeElClasses: ['item', 'caption', 'zoom-wrap', 'ui', 'top-bar'],
|
||||
timeToIdle: 4000,
|
||||
timeToIdleOutside: 1000,
|
||||
loadingIndicatorDelay: 1000, // 2s
|
||||
|
||||
addCaptionHTMLFn: function(item, captionEl /*, isFake */) {
|
||||
if(!item.title) {
|
||||
captionEl.children[0].innerHTML = '';
|
||||
return false;
|
||||
}
|
||||
captionEl.children[0].innerHTML = item.title;
|
||||
return true;
|
||||
},
|
||||
|
||||
closeEl:true,
|
||||
captionEl: true,
|
||||
fullscreenEl: true,
|
||||
zoomEl: true,
|
||||
shareEl: true,
|
||||
counterEl: true,
|
||||
arrowEl: true,
|
||||
preloaderEl: true,
|
||||
|
||||
tapToClose: false,
|
||||
tapToToggleControls: true,
|
||||
|
||||
clickToCloseNonZoomable: true,
|
||||
|
||||
shareButtons: [
|
||||
{id:'facebook', label:'Share on Facebook', url:'https://www.facebook.com/sharer/sharer.php?u={{url}}'},
|
||||
{id:'twitter', label:'Tweet', url:'https://twitter.com/intent/tweet?text={{text}}&url={{url}}'},
|
||||
{id:'pinterest', label:'Pin it', url:'http://www.pinterest.com/pin/create/button/'+
|
||||
'?url={{url}}&media={{image_url}}&description={{text}}'},
|
||||
{id:'download', label:'Download image', url:'{{raw_image_url}}', download:true}
|
||||
],
|
||||
getImageURLForShare: function( /* shareButtonData */ ) {
|
||||
return pswp.currItem.src || '';
|
||||
},
|
||||
getPageURLForShare: function( /* shareButtonData */ ) {
|
||||
return window.location.href;
|
||||
},
|
||||
getTextForShare: function( /* shareButtonData */ ) {
|
||||
return pswp.currItem.title || '';
|
||||
},
|
||||
|
||||
indexIndicatorSep: ' / ',
|
||||
fitControlsWidth: 1200
|
||||
|
||||
},
|
||||
_blockControlsTap,
|
||||
_blockControlsTapTimeout;
|
||||
|
||||
|
||||
|
||||
var _onControlsTap = function(e) {
|
||||
if(_blockControlsTap) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
e = e || window.event;
|
||||
|
||||
if(_options.timeToIdle && _options.mouseUsed && !_isIdle) {
|
||||
// reset idle timer
|
||||
_onIdleMouseMove();
|
||||
}
|
||||
|
||||
|
||||
var target = e.target || e.srcElement,
|
||||
uiElement,
|
||||
clickedClass = target.getAttribute('class') || '',
|
||||
found;
|
||||
|
||||
for(var i = 0; i < _uiElements.length; i++) {
|
||||
uiElement = _uiElements[i];
|
||||
if(uiElement.onTap && clickedClass.indexOf('pswp__' + uiElement.name ) > -1 ) {
|
||||
uiElement.onTap();
|
||||
found = true;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if(found) {
|
||||
if(e.stopPropagation) {
|
||||
e.stopPropagation();
|
||||
}
|
||||
_blockControlsTap = true;
|
||||
|
||||
// Some versions of Android don't prevent ghost click event
|
||||
// when preventDefault() was called on touchstart and/or touchend.
|
||||
//
|
||||
// This happens on v4.3, 4.2, 4.1,
|
||||
// older versions strangely work correctly,
|
||||
// but just in case we add delay on all of them)
|
||||
var tapDelay = framework.features.isOldAndroid ? 600 : 30;
|
||||
_blockControlsTapTimeout = setTimeout(function() {
|
||||
_blockControlsTap = false;
|
||||
}, tapDelay);
|
||||
}
|
||||
|
||||
},
|
||||
_fitControlsInViewport = function() {
|
||||
return !pswp.likelyTouchDevice || _options.mouseUsed || screen.width > _options.fitControlsWidth;
|
||||
},
|
||||
_togglePswpClass = function(el, cName, add) {
|
||||
framework[ (add ? 'add' : 'remove') + 'Class' ](el, 'pswp__' + cName);
|
||||
},
|
||||
|
||||
// add class when there is just one item in the gallery
|
||||
// (by default it hides left/right arrows and 1ofX counter)
|
||||
_countNumItems = function() {
|
||||
var hasOneSlide = (_options.getNumItemsFn() === 1);
|
||||
|
||||
if(hasOneSlide !== _galleryHasOneSlide) {
|
||||
_togglePswpClass(_controls, 'ui--one-slide', hasOneSlide);
|
||||
_galleryHasOneSlide = hasOneSlide;
|
||||
}
|
||||
},
|
||||
_toggleShareModalClass = function() {
|
||||
_togglePswpClass(_shareModal, 'share-modal--hidden', _shareModalHidden);
|
||||
},
|
||||
_toggleShareModal = function() {
|
||||
|
||||
_shareModalHidden = !_shareModalHidden;
|
||||
|
||||
|
||||
if(!_shareModalHidden) {
|
||||
_toggleShareModalClass();
|
||||
setTimeout(function() {
|
||||
if(!_shareModalHidden) {
|
||||
framework.addClass(_shareModal, 'pswp__share-modal--fade-in');
|
||||
}
|
||||
}, 30);
|
||||
} else {
|
||||
framework.removeClass(_shareModal, 'pswp__share-modal--fade-in');
|
||||
setTimeout(function() {
|
||||
if(_shareModalHidden) {
|
||||
_toggleShareModalClass();
|
||||
}
|
||||
}, 300);
|
||||
}
|
||||
|
||||
if(!_shareModalHidden) {
|
||||
_updateShareURLs();
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
||||
_openWindowPopup = function(e) {
|
||||
e = e || window.event;
|
||||
var target = e.target || e.srcElement;
|
||||
|
||||
pswp.shout('shareLinkClick', e, target);
|
||||
|
||||
if(!target.href) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if( target.hasAttribute('download') ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
window.open(target.href, 'pswp_share', 'scrollbars=yes,resizable=yes,toolbar=no,'+
|
||||
'location=yes,width=550,height=420,top=100,left=' +
|
||||
(window.screen ? Math.round(screen.width / 2 - 275) : 100) );
|
||||
|
||||
if(!_shareModalHidden) {
|
||||
_toggleShareModal();
|
||||
}
|
||||
|
||||
return false;
|
||||
},
|
||||
_updateShareURLs = function() {
|
||||
var shareButtonOut = '',
|
||||
shareButtonData,
|
||||
shareURL,
|
||||
image_url,
|
||||
page_url,
|
||||
share_text;
|
||||
|
||||
for(var i = 0; i < _options.shareButtons.length; i++) {
|
||||
shareButtonData = _options.shareButtons[i];
|
||||
|
||||
image_url = _options.getImageURLForShare(shareButtonData);
|
||||
page_url = _options.getPageURLForShare(shareButtonData);
|
||||
share_text = _options.getTextForShare(shareButtonData);
|
||||
|
||||
shareURL = shareButtonData.url.replace('{{url}}', encodeURIComponent(page_url) )
|
||||
.replace('{{image_url}}', encodeURIComponent(image_url) )
|
||||
.replace('{{raw_image_url}}', image_url )
|
||||
.replace('{{text}}', encodeURIComponent(share_text) );
|
||||
|
||||
shareButtonOut += '<a href="' + shareURL + '" target="_blank" '+
|
||||
'class="pswp__share--' + shareButtonData.id + '"' +
|
||||
(shareButtonData.download ? 'download' : '') + '>' +
|
||||
shareButtonData.label + '</a>';
|
||||
|
||||
if(_options.parseShareButtonOut) {
|
||||
shareButtonOut = _options.parseShareButtonOut(shareButtonData, shareButtonOut);
|
||||
}
|
||||
}
|
||||
_shareModal.children[0].innerHTML = shareButtonOut;
|
||||
_shareModal.children[0].onclick = _openWindowPopup;
|
||||
|
||||
},
|
||||
_hasCloseClass = function(target) {
|
||||
for(var i = 0; i < _options.closeElClasses.length; i++) {
|
||||
if( framework.hasClass(target, 'pswp__' + _options.closeElClasses[i]) ) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
},
|
||||
_idleInterval,
|
||||
_idleTimer,
|
||||
_idleIncrement = 0,
|
||||
_onIdleMouseMove = function() {
|
||||
clearTimeout(_idleTimer);
|
||||
_idleIncrement = 0;
|
||||
if(_isIdle) {
|
||||
ui.setIdle(false);
|
||||
}
|
||||
},
|
||||
_onMouseLeaveWindow = function(e) {
|
||||
e = e ? e : window.event;
|
||||
var from = e.relatedTarget || e.toElement;
|
||||
if (!from || from.nodeName === 'HTML') {
|
||||
clearTimeout(_idleTimer);
|
||||
_idleTimer = setTimeout(function() {
|
||||
ui.setIdle(true);
|
||||
}, _options.timeToIdleOutside);
|
||||
}
|
||||
},
|
||||
_setupFullscreenAPI = function() {
|
||||
if(_options.fullscreenEl && !framework.features.isOldAndroid) {
|
||||
if(!_fullscrenAPI) {
|
||||
_fullscrenAPI = ui.getFullscreenAPI();
|
||||
}
|
||||
if(_fullscrenAPI) {
|
||||
framework.bind(document, _fullscrenAPI.eventK, ui.updateFullscreen);
|
||||
ui.updateFullscreen();
|
||||
framework.addClass(pswp.template, 'pswp--supports-fs');
|
||||
} else {
|
||||
framework.removeClass(pswp.template, 'pswp--supports-fs');
|
||||
}
|
||||
}
|
||||
},
|
||||
_setupLoadingIndicator = function() {
|
||||
// Setup loading indicator
|
||||
if(_options.preloaderEl) {
|
||||
|
||||
_toggleLoadingIndicator(true);
|
||||
|
||||
_listen('beforeChange', function() {
|
||||
|
||||
clearTimeout(_loadingIndicatorTimeout);
|
||||
|
||||
// display loading indicator with delay
|
||||
_loadingIndicatorTimeout = setTimeout(function() {
|
||||
|
||||
if(pswp.currItem && pswp.currItem.loading) {
|
||||
|
||||
if( !pswp.allowProgressiveImg() || (pswp.currItem.img && !pswp.currItem.img.naturalWidth) ) {
|
||||
// show preloader if progressive loading is not enabled,
|
||||
// or image width is not defined yet (because of slow connection)
|
||||
_toggleLoadingIndicator(false);
|
||||
// items-controller.js function allowProgressiveImg
|
||||
}
|
||||
|
||||
} else {
|
||||
_toggleLoadingIndicator(true); // hide preloader
|
||||
}
|
||||
|
||||
}, _options.loadingIndicatorDelay);
|
||||
|
||||
});
|
||||
_listen('imageLoadComplete', function(index, item) {
|
||||
if(pswp.currItem === item) {
|
||||
_toggleLoadingIndicator(true);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
},
|
||||
_toggleLoadingIndicator = function(hide) {
|
||||
if( _loadingIndicatorHidden !== hide ) {
|
||||
_togglePswpClass(_loadingIndicator, 'preloader--active', !hide);
|
||||
_loadingIndicatorHidden = hide;
|
||||
}
|
||||
},
|
||||
_applyNavBarGaps = function(item) {
|
||||
var gap = item.vGap;
|
||||
|
||||
if( _fitControlsInViewport() ) {
|
||||
|
||||
var bars = _options.barsSize;
|
||||
if(_options.captionEl && bars.bottom === 'auto') {
|
||||
if(!_fakeCaptionContainer) {
|
||||
_fakeCaptionContainer = framework.createEl('pswp__caption pswp__caption--fake');
|
||||
_fakeCaptionContainer.appendChild( framework.createEl('pswp__caption__center') );
|
||||
_controls.insertBefore(_fakeCaptionContainer, _captionContainer);
|
||||
framework.addClass(_controls, 'pswp__ui--fit');
|
||||
}
|
||||
if( _options.addCaptionHTMLFn(item, _fakeCaptionContainer, true) ) {
|
||||
|
||||
var captionSize = _fakeCaptionContainer.clientHeight;
|
||||
gap.bottom = parseInt(captionSize,10) || 44;
|
||||
} else {
|
||||
gap.bottom = bars.top; // if no caption, set size of bottom gap to size of top
|
||||
}
|
||||
} else {
|
||||
gap.bottom = bars.bottom === 'auto' ? 0 : bars.bottom;
|
||||
}
|
||||
|
||||
// height of top bar is static, no need to calculate it
|
||||
gap.top = bars.top;
|
||||
} else {
|
||||
gap.top = gap.bottom = 0;
|
||||
}
|
||||
},
|
||||
_setupIdle = function() {
|
||||
// Hide controls when mouse is used
|
||||
if(_options.timeToIdle) {
|
||||
_listen('mouseUsed', function() {
|
||||
|
||||
framework.bind(document, 'mousemove', _onIdleMouseMove);
|
||||
framework.bind(document, 'mouseout', _onMouseLeaveWindow);
|
||||
|
||||
_idleInterval = setInterval(function() {
|
||||
_idleIncrement++;
|
||||
if(_idleIncrement === 2) {
|
||||
ui.setIdle(true);
|
||||
}
|
||||
}, _options.timeToIdle / 2);
|
||||
});
|
||||
}
|
||||
},
|
||||
_setupHidingControlsDuringGestures = function() {
|
||||
|
||||
// Hide controls on vertical drag
|
||||
_listen('onVerticalDrag', function(now) {
|
||||
if(_controlsVisible && now < 0.95) {
|
||||
ui.hideControls();
|
||||
} else if(!_controlsVisible && now >= 0.95) {
|
||||
ui.showControls();
|
||||
}
|
||||
});
|
||||
|
||||
// Hide controls when pinching to close
|
||||
var pinchControlsHidden;
|
||||
_listen('onPinchClose' , function(now) {
|
||||
if(_controlsVisible && now < 0.9) {
|
||||
ui.hideControls();
|
||||
pinchControlsHidden = true;
|
||||
} else if(pinchControlsHidden && !_controlsVisible && now > 0.9) {
|
||||
ui.showControls();
|
||||
}
|
||||
});
|
||||
|
||||
_listen('zoomGestureEnded', function() {
|
||||
pinchControlsHidden = false;
|
||||
if(pinchControlsHidden && !_controlsVisible) {
|
||||
ui.showControls();
|
||||
}
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
var _uiElements = [
|
||||
{
|
||||
name: 'caption',
|
||||
option: 'captionEl',
|
||||
onInit: function(el) {
|
||||
_captionContainer = el;
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'share-modal',
|
||||
option: 'shareEl',
|
||||
onInit: function(el) {
|
||||
_shareModal = el;
|
||||
},
|
||||
onTap: function() {
|
||||
_toggleShareModal();
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'button--share',
|
||||
option: 'shareEl',
|
||||
onInit: function(el) {
|
||||
_shareButton = el;
|
||||
},
|
||||
onTap: function() {
|
||||
_toggleShareModal();
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'button--zoom',
|
||||
option: 'zoomEl',
|
||||
onTap: pswp.toggleDesktopZoom
|
||||
},
|
||||
{
|
||||
name: 'counter',
|
||||
option: 'counterEl',
|
||||
onInit: function(el) {
|
||||
_indexIndicator = el;
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'button--close',
|
||||
option: 'closeEl',
|
||||
onTap: pswp.close
|
||||
},
|
||||
{
|
||||
name: 'button--arrow--left',
|
||||
option: 'arrowEl',
|
||||
onTap: pswp.prev
|
||||
},
|
||||
{
|
||||
name: 'button--arrow--right',
|
||||
option: 'arrowEl',
|
||||
onTap: pswp.next
|
||||
},
|
||||
{
|
||||
name: 'button--fs',
|
||||
option: 'fullscreenEl',
|
||||
onTap: function() {
|
||||
if(_fullscrenAPI.isFullscreen()) {
|
||||
_fullscrenAPI.exit();
|
||||
} else {
|
||||
_fullscrenAPI.enter();
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'preloader',
|
||||
option: 'preloaderEl',
|
||||
onInit: function(el) {
|
||||
_loadingIndicator = el;
|
||||
}
|
||||
}
|
||||
|
||||
];
|
||||
|
||||
var _setupUIElements = function() {
|
||||
var item,
|
||||
classAttr,
|
||||
uiElement;
|
||||
|
||||
var loopThroughChildElements = function(sChildren) {
|
||||
if(!sChildren) {
|
||||
return;
|
||||
}
|
||||
|
||||
var l = sChildren.length;
|
||||
for(var i = 0; i < l; i++) {
|
||||
item = sChildren[i];
|
||||
classAttr = item.className;
|
||||
|
||||
for(var a = 0; a < _uiElements.length; a++) {
|
||||
uiElement = _uiElements[a];
|
||||
|
||||
if(classAttr.indexOf('pswp__' + uiElement.name) > -1 ) {
|
||||
|
||||
if( _options[uiElement.option] ) { // if element is not disabled from options
|
||||
|
||||
framework.removeClass(item, 'pswp__element--disabled');
|
||||
if(uiElement.onInit) {
|
||||
uiElement.onInit(item);
|
||||
}
|
||||
|
||||
//item.style.display = 'block';
|
||||
} else {
|
||||
framework.addClass(item, 'pswp__element--disabled');
|
||||
//item.style.display = 'none';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
loopThroughChildElements(_controls.children);
|
||||
|
||||
var topBar = framework.getChildByClass(_controls, 'pswp__top-bar');
|
||||
if(topBar) {
|
||||
loopThroughChildElements( topBar.children );
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
ui.init = function() {
|
||||
|
||||
// extend options
|
||||
framework.extend(pswp.options, _defaultUIOptions, true);
|
||||
|
||||
// create local link for fast access
|
||||
_options = pswp.options;
|
||||
|
||||
// find pswp__ui element
|
||||
_controls = framework.getChildByClass(pswp.scrollWrap, 'pswp__ui');
|
||||
|
||||
// create local link
|
||||
_listen = pswp.listen;
|
||||
|
||||
|
||||
_setupHidingControlsDuringGestures();
|
||||
|
||||
// update controls when slides change
|
||||
_listen('beforeChange', ui.update);
|
||||
|
||||
// toggle zoom on double-tap
|
||||
_listen('doubleTap', function(point) {
|
||||
var initialZoomLevel = pswp.currItem.initialZoomLevel;
|
||||
if(pswp.getZoomLevel() !== initialZoomLevel) {
|
||||
pswp.zoomTo(initialZoomLevel, point, 333);
|
||||
} else {
|
||||
pswp.zoomTo(_options.getDoubleTapZoom(false, pswp.currItem), point, 333);
|
||||
}
|
||||
});
|
||||
|
||||
// Allow text selection in caption
|
||||
_listen('preventDragEvent', function(e, isDown, preventObj) {
|
||||
var t = e.target || e.srcElement;
|
||||
if(
|
||||
t &&
|
||||
t.getAttribute('class') && e.type.indexOf('mouse') > -1 &&
|
||||
( t.getAttribute('class').indexOf('__caption') > 0 || (/(SMALL|STRONG|EM)/i).test(t.tagName) )
|
||||
) {
|
||||
preventObj.prevent = false;
|
||||
}
|
||||
});
|
||||
|
||||
// bind events for UI
|
||||
_listen('bindEvents', function() {
|
||||
framework.bind(_controls, 'pswpTap click', _onControlsTap);
|
||||
framework.bind(pswp.scrollWrap, 'pswpTap', ui.onGlobalTap);
|
||||
|
||||
if(!pswp.likelyTouchDevice) {
|
||||
framework.bind(pswp.scrollWrap, 'mouseover', ui.onMouseOver);
|
||||
}
|
||||
});
|
||||
|
||||
// unbind events for UI
|
||||
_listen('unbindEvents', function() {
|
||||
if(!_shareModalHidden) {
|
||||
_toggleShareModal();
|
||||
}
|
||||
|
||||
if(_idleInterval) {
|
||||
clearInterval(_idleInterval);
|
||||
}
|
||||
framework.unbind(document, 'mouseout', _onMouseLeaveWindow);
|
||||
framework.unbind(document, 'mousemove', _onIdleMouseMove);
|
||||
framework.unbind(_controls, 'pswpTap click', _onControlsTap);
|
||||
framework.unbind(pswp.scrollWrap, 'pswpTap', ui.onGlobalTap);
|
||||
framework.unbind(pswp.scrollWrap, 'mouseover', ui.onMouseOver);
|
||||
|
||||
if(_fullscrenAPI) {
|
||||
framework.unbind(document, _fullscrenAPI.eventK, ui.updateFullscreen);
|
||||
if(_fullscrenAPI.isFullscreen()) {
|
||||
_options.hideAnimationDuration = 0;
|
||||
_fullscrenAPI.exit();
|
||||
}
|
||||
_fullscrenAPI = null;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// clean up things when gallery is destroyed
|
||||
_listen('destroy', function() {
|
||||
if(_options.captionEl) {
|
||||
if(_fakeCaptionContainer) {
|
||||
_controls.removeChild(_fakeCaptionContainer);
|
||||
}
|
||||
framework.removeClass(_captionContainer, 'pswp__caption--empty');
|
||||
}
|
||||
|
||||
if(_shareModal) {
|
||||
_shareModal.children[0].onclick = null;
|
||||
}
|
||||
framework.removeClass(_controls, 'pswp__ui--over-close');
|
||||
framework.addClass( _controls, 'pswp__ui--hidden');
|
||||
ui.setIdle(false);
|
||||
});
|
||||
|
||||
|
||||
if(!_options.showAnimationDuration) {
|
||||
framework.removeClass( _controls, 'pswp__ui--hidden');
|
||||
}
|
||||
_listen('initialZoomIn', function() {
|
||||
if(_options.showAnimationDuration) {
|
||||
framework.removeClass( _controls, 'pswp__ui--hidden');
|
||||
}
|
||||
});
|
||||
_listen('initialZoomOut', function() {
|
||||
framework.addClass( _controls, 'pswp__ui--hidden');
|
||||
});
|
||||
|
||||
_listen('parseVerticalMargin', _applyNavBarGaps);
|
||||
|
||||
_setupUIElements();
|
||||
|
||||
if(_options.shareEl && _shareButton && _shareModal) {
|
||||
_shareModalHidden = true;
|
||||
}
|
||||
|
||||
_countNumItems();
|
||||
|
||||
_setupIdle();
|
||||
|
||||
_setupFullscreenAPI();
|
||||
|
||||
_setupLoadingIndicator();
|
||||
};
|
||||
|
||||
ui.setIdle = function(isIdle) {
|
||||
_isIdle = isIdle;
|
||||
_togglePswpClass(_controls, 'ui--idle', isIdle);
|
||||
};
|
||||
|
||||
ui.update = function() {
|
||||
// Don't update UI if it's hidden
|
||||
if(_controlsVisible && pswp.currItem) {
|
||||
|
||||
ui.updateIndexIndicator();
|
||||
|
||||
if(_options.captionEl) {
|
||||
_options.addCaptionHTMLFn(pswp.currItem, _captionContainer);
|
||||
|
||||
_togglePswpClass(_captionContainer, 'caption--empty', !pswp.currItem.title);
|
||||
}
|
||||
|
||||
_overlayUIUpdated = true;
|
||||
|
||||
} else {
|
||||
_overlayUIUpdated = false;
|
||||
}
|
||||
|
||||
if(!_shareModalHidden) {
|
||||
_toggleShareModal();
|
||||
}
|
||||
|
||||
_countNumItems();
|
||||
};
|
||||
|
||||
ui.updateFullscreen = function(e) {
|
||||
|
||||
if(e) {
|
||||
// some browsers change window scroll position during the fullscreen
|
||||
// so PhotoSwipe updates it just in case
|
||||
setTimeout(function() {
|
||||
pswp.setScrollOffset( 0, framework.getScrollY() );
|
||||
}, 50);
|
||||
}
|
||||
|
||||
// toogle pswp--fs class on root element
|
||||
framework[ (_fullscrenAPI.isFullscreen() ? 'add' : 'remove') + 'Class' ](pswp.template, 'pswp--fs');
|
||||
};
|
||||
|
||||
ui.updateIndexIndicator = function() {
|
||||
if(_options.counterEl) {
|
||||
_indexIndicator.innerHTML = (pswp.getCurrentIndex()+1) +
|
||||
_options.indexIndicatorSep +
|
||||
_options.getNumItemsFn();
|
||||
}
|
||||
};
|
||||
|
||||
ui.onGlobalTap = function(e) {
|
||||
e = e || window.event;
|
||||
var target = e.target || e.srcElement;
|
||||
|
||||
if(_blockControlsTap) {
|
||||
return;
|
||||
}
|
||||
|
||||
if(e.detail && e.detail.pointerType === 'mouse') {
|
||||
|
||||
// close gallery if clicked outside of the image
|
||||
if(_hasCloseClass(target)) {
|
||||
pswp.close();
|
||||
return;
|
||||
}
|
||||
|
||||
if(framework.hasClass(target, 'pswp__img')) {
|
||||
if(pswp.getZoomLevel() === 1 && pswp.getZoomLevel() <= pswp.currItem.fitRatio) {
|
||||
if(_options.clickToCloseNonZoomable) {
|
||||
pswp.close();
|
||||
}
|
||||
} else {
|
||||
pswp.toggleDesktopZoom(e.detail.releasePoint);
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
// tap anywhere (except buttons) to toggle visibility of controls
|
||||
if(_options.tapToToggleControls) {
|
||||
if(_controlsVisible) {
|
||||
ui.hideControls();
|
||||
} else {
|
||||
ui.showControls();
|
||||
}
|
||||
}
|
||||
|
||||
// tap to close gallery
|
||||
if(_options.tapToClose && (framework.hasClass(target, 'pswp__img') || _hasCloseClass(target)) ) {
|
||||
pswp.close();
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
ui.onMouseOver = function(e) {
|
||||
e = e || window.event;
|
||||
var target = e.target || e.srcElement;
|
||||
|
||||
// add class when mouse is over an element that should close the gallery
|
||||
_togglePswpClass(_controls, 'ui--over-close', _hasCloseClass(target));
|
||||
};
|
||||
|
||||
ui.hideControls = function() {
|
||||
framework.addClass(_controls,'pswp__ui--hidden');
|
||||
_controlsVisible = false;
|
||||
};
|
||||
|
||||
ui.showControls = function() {
|
||||
_controlsVisible = true;
|
||||
if(!_overlayUIUpdated) {
|
||||
ui.update();
|
||||
}
|
||||
framework.removeClass(_controls,'pswp__ui--hidden');
|
||||
};
|
||||
|
||||
ui.supportsFullscreen = function() {
|
||||
var d = document;
|
||||
return !!(d.exitFullscreen || d.mozCancelFullScreen || d.webkitExitFullscreen || d.msExitFullscreen);
|
||||
};
|
||||
|
||||
ui.getFullscreenAPI = function() {
|
||||
var dE = document.documentElement,
|
||||
api,
|
||||
tF = 'fullscreenchange';
|
||||
|
||||
if (dE.requestFullscreen) {
|
||||
api = {
|
||||
enterK: 'requestFullscreen',
|
||||
exitK: 'exitFullscreen',
|
||||
elementK: 'fullscreenElement',
|
||||
eventK: tF
|
||||
};
|
||||
|
||||
} else if(dE.mozRequestFullScreen ) {
|
||||
api = {
|
||||
enterK: 'mozRequestFullScreen',
|
||||
exitK: 'mozCancelFullScreen',
|
||||
elementK: 'mozFullScreenElement',
|
||||
eventK: 'moz' + tF
|
||||
};
|
||||
|
||||
|
||||
|
||||
} else if(dE.webkitRequestFullscreen) {
|
||||
api = {
|
||||
enterK: 'webkitRequestFullscreen',
|
||||
exitK: 'webkitExitFullscreen',
|
||||
elementK: 'webkitFullscreenElement',
|
||||
eventK: 'webkit' + tF
|
||||
};
|
||||
|
||||
} else if(dE.msRequestFullscreen) {
|
||||
api = {
|
||||
enterK: 'msRequestFullscreen',
|
||||
exitK: 'msExitFullscreen',
|
||||
elementK: 'msFullscreenElement',
|
||||
eventK: 'MSFullscreenChange'
|
||||
};
|
||||
}
|
||||
|
||||
if(api) {
|
||||
api.enter = function() {
|
||||
// disable close-on-scroll in fullscreen
|
||||
_initalCloseOnScrollValue = _options.closeOnScroll;
|
||||
_options.closeOnScroll = false;
|
||||
|
||||
if(this.enterK === 'webkitRequestFullscreen') {
|
||||
pswp.template[this.enterK]( Element.ALLOW_KEYBOARD_INPUT );
|
||||
} else {
|
||||
return pswp.template[this.enterK]();
|
||||
}
|
||||
};
|
||||
api.exit = function() {
|
||||
_options.closeOnScroll = _initalCloseOnScrollValue;
|
||||
|
||||
return document[this.exitK]();
|
||||
|
||||
};
|
||||
api.isFullscreen = function() { return document[this.elementK]; };
|
||||
}
|
||||
|
||||
return api;
|
||||
};
|
||||
|
||||
|
||||
|
||||
};
|
||||
return PhotoSwipeUI_Default;
|
||||
|
||||
|
||||
});
|
||||
4
h5_webview/app/src/main/assets/js/utils/dist/photoswipe-ui-default.min.js
vendored
Normal file
4
h5_webview/app/src/main/assets/js/utils/dist/photoswipe-ui-default.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
179
h5_webview/app/src/main/assets/js/utils/dist/photoswipe.css
vendored
Normal file
179
h5_webview/app/src/main/assets/js/utils/dist/photoswipe.css
vendored
Normal file
@@ -0,0 +1,179 @@
|
||||
/*! PhotoSwipe main CSS by Dmitry Semenov | photoswipe.com | MIT license */
|
||||
/*
|
||||
Styles for basic PhotoSwipe functionality (sliding area, open/close transitions)
|
||||
*/
|
||||
/* pswp = photoswipe */
|
||||
.pswp {
|
||||
display: none;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
overflow: hidden;
|
||||
-ms-touch-action: none;
|
||||
touch-action: none;
|
||||
z-index: 1500;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
/* create separate layer, to avoid paint on window.onscroll in webkit/blink */
|
||||
-webkit-backface-visibility: hidden;
|
||||
outline: none; }
|
||||
.pswp * {
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box; }
|
||||
.pswp img {
|
||||
max-width: none; }
|
||||
|
||||
/* style is added when JS option showHideOpacity is set to true */
|
||||
.pswp--animate_opacity {
|
||||
/* 0.001, because opacity:0 doesn't trigger Paint action, which causes lag at start of transition */
|
||||
opacity: 0.001;
|
||||
will-change: opacity;
|
||||
/* for open/close transition */
|
||||
-webkit-transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1);
|
||||
transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1); }
|
||||
|
||||
.pswp--open {
|
||||
display: block; }
|
||||
|
||||
.pswp--zoom-allowed .pswp__img {
|
||||
/* autoprefixer: off */
|
||||
cursor: -webkit-zoom-in;
|
||||
cursor: -moz-zoom-in;
|
||||
cursor: zoom-in; }
|
||||
|
||||
.pswp--zoomed-in .pswp__img {
|
||||
/* autoprefixer: off */
|
||||
cursor: -webkit-grab;
|
||||
cursor: -moz-grab;
|
||||
cursor: grab; }
|
||||
|
||||
.pswp--dragging .pswp__img {
|
||||
/* autoprefixer: off */
|
||||
cursor: -webkit-grabbing;
|
||||
cursor: -moz-grabbing;
|
||||
cursor: grabbing; }
|
||||
|
||||
/*
|
||||
Background is added as a separate element.
|
||||
As animating opacity is much faster than animating rgba() background-color.
|
||||
*/
|
||||
.pswp__bg {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #000;
|
||||
opacity: 0;
|
||||
-webkit-transform: translateZ(0);
|
||||
transform: translateZ(0);
|
||||
-webkit-backface-visibility: hidden;
|
||||
will-change: opacity; }
|
||||
|
||||
.pswp__scroll-wrap {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden; }
|
||||
|
||||
.pswp__container,
|
||||
.pswp__zoom-wrap {
|
||||
-ms-touch-action: none;
|
||||
touch-action: none;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0; }
|
||||
|
||||
/* Prevent selection and tap highlights */
|
||||
.pswp__container,
|
||||
.pswp__img {
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
-webkit-touch-callout: none; }
|
||||
|
||||
.pswp__zoom-wrap {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
-webkit-transform-origin: left top;
|
||||
-ms-transform-origin: left top;
|
||||
transform-origin: left top;
|
||||
/* for open/close transition */
|
||||
-webkit-transition: -webkit-transform 333ms cubic-bezier(0.4, 0, 0.22, 1);
|
||||
transition: transform 333ms cubic-bezier(0.4, 0, 0.22, 1); }
|
||||
|
||||
.pswp__bg {
|
||||
will-change: opacity;
|
||||
/* for open/close transition */
|
||||
-webkit-transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1);
|
||||
transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1); }
|
||||
|
||||
.pswp--animated-in .pswp__bg,
|
||||
.pswp--animated-in .pswp__zoom-wrap {
|
||||
-webkit-transition: none;
|
||||
transition: none; }
|
||||
|
||||
.pswp__container,
|
||||
.pswp__zoom-wrap {
|
||||
-webkit-backface-visibility: hidden; }
|
||||
|
||||
.pswp__item {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
overflow: hidden; }
|
||||
|
||||
.pswp__img {
|
||||
position: absolute;
|
||||
width: auto;
|
||||
height: auto;
|
||||
top: 0;
|
||||
left: 0; }
|
||||
|
||||
/*
|
||||
stretched thumbnail or div placeholder element (see below)
|
||||
style is added to avoid flickering in webkit/blink when layers overlap
|
||||
*/
|
||||
.pswp__img--placeholder {
|
||||
-webkit-backface-visibility: hidden; }
|
||||
|
||||
/*
|
||||
div element that matches size of large image
|
||||
large image loads on top of it
|
||||
*/
|
||||
.pswp__img--placeholder--blank {
|
||||
background: #222; }
|
||||
|
||||
.pswp--ie .pswp__img {
|
||||
width: 100% !important;
|
||||
height: auto !important;
|
||||
left: 0;
|
||||
top: 0; }
|
||||
|
||||
/*
|
||||
Error message appears when image is not loaded
|
||||
(JS option errorMsg controls markup)
|
||||
*/
|
||||
.pswp__error-msg {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 50%;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-size: 0.28rem;
|
||||
line-height: 0.32rem;
|
||||
margin-top: -0.16rem;
|
||||
color: #CCC; }
|
||||
|
||||
.pswp__error-msg a {
|
||||
color: #CCC;
|
||||
text-decoration: underline; }
|
||||
3734
h5_webview/app/src/main/assets/js/utils/dist/photoswipe.js
vendored
Normal file
3734
h5_webview/app/src/main/assets/js/utils/dist/photoswipe.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
4
h5_webview/app/src/main/assets/js/utils/dist/photoswipe.min.js
vendored
Normal file
4
h5_webview/app/src/main/assets/js/utils/dist/photoswipe.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
45
h5_webview/app/src/main/assets/js/utils/index.js
Normal file
45
h5_webview/app/src/main/assets/js/utils/index.js
Normal file
@@ -0,0 +1,45 @@
|
||||
/**
|
||||
* 工具函数
|
||||
*/
|
||||
class Utils {
|
||||
|
||||
constructor () {
|
||||
setTimeout(()=> this.AppBack(),100)
|
||||
}
|
||||
|
||||
AppBack() {
|
||||
document.querySelector(".icon-back1") && document.querySelector(".icon-back1").addEventListener('click',function () {
|
||||
history.back()
|
||||
})
|
||||
}
|
||||
|
||||
GetQueryString(name) {
|
||||
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
|
||||
var r = window.location.search.substr(1).match(reg);
|
||||
if (r != null) return decodeURIComponent(r[2]); return null;
|
||||
}
|
||||
|
||||
SetHeaderTitle(title) {
|
||||
document.querySelector(".header_theme1 span").innerText = title
|
||||
}
|
||||
|
||||
longPress(Dom, func, timeout = 500) {
|
||||
var timeOutEvent;
|
||||
Dom.addEventListener('touchstart', function (e) {
|
||||
clearTimeout(timeOutEvent);
|
||||
timeOutEvent = setTimeout(function () {
|
||||
func();
|
||||
}, timeout);
|
||||
});
|
||||
|
||||
Dom.addEventListener('touchmove', function (e) {
|
||||
clearTimeout(timeOutEvent);
|
||||
});
|
||||
|
||||
Dom.addEventListener('touchend', function (e) {
|
||||
clearTimeout(timeOutEvent);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
var utils = new Utils();
|
||||
150
h5_webview/app/src/main/assets/js/utils/loading.js
Normal file
150
h5_webview/app/src/main/assets/js/utils/loading.js
Normal file
@@ -0,0 +1,150 @@
|
||||
/**
|
||||
* 封装加载提示
|
||||
*/
|
||||
class Loading {
|
||||
/**
|
||||
* 加载进度
|
||||
*/
|
||||
loading() {
|
||||
this.SetLoading()
|
||||
// 塞入loading的html
|
||||
this.$(".isShow .loading").innerHTML =
|
||||
`
|
||||
<div class="back">
|
||||
<div class="load8">
|
||||
<div class="load8-container container1">
|
||||
<div class="circle1"></div>
|
||||
<div class="circle2"></div>
|
||||
<div class="circle3"></div>
|
||||
<div class="circle4"></div>
|
||||
</div>
|
||||
<div class="load8-container container2">
|
||||
<div class="circle1"></div>
|
||||
<div class="circle2"></div>
|
||||
<div class="circle3"></div>
|
||||
<div class="circle4"></div>
|
||||
</div>
|
||||
<div class="load8-container container3">
|
||||
<div class="circle1"></div>
|
||||
<div class="circle2"></div>
|
||||
<div class="circle3"></div>
|
||||
<div class="circle4"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
this.$(".isShow .back").style = `padding: 0.4rem;`
|
||||
this.show()
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示toast提示
|
||||
* @param {*} text 文字
|
||||
* @param {*} time 自动关闭提示的时间 默认3秒
|
||||
*/
|
||||
toast(text, time = 3000) {
|
||||
this.SetLoading()
|
||||
this.$(".isShow .loading").innerHTML = `<div class="back"></div>`
|
||||
// 设置边距
|
||||
this.$(".isShow .back").style = `padding: 0.14rem 0.4rem;`
|
||||
|
||||
// 设置内容
|
||||
this.$(".isShow .back").innerHTML = `<span>${text}</span>`;
|
||||
this.show()
|
||||
setTimeout(()=> this.close(),time)
|
||||
}
|
||||
|
||||
/**
|
||||
* 弹出框 dialog
|
||||
* @param {*} params
|
||||
*/
|
||||
dialog(params) {
|
||||
params == undefined ? params = {} : null;
|
||||
let defaultParams = { title: '标题', message: '内容',
|
||||
cancelText: '取消', confirmText: '确定',
|
||||
cancelColor: '#323233', confirmColor: '#fb7299'
|
||||
};
|
||||
|
||||
defaultParams.title = params.title || defaultParams.title;
|
||||
defaultParams.message = params.message || defaultParams.message;
|
||||
defaultParams.cancelText = params.cancelText || defaultParams.cancelText;
|
||||
defaultParams.confirmText = params.confirmText || defaultParams.confirmText;
|
||||
defaultParams.cancelColor = params.cancelColor || defaultParams.cancelColor;
|
||||
defaultParams.confirmColor = params.confirmColor || defaultParams.confirmColor;
|
||||
|
||||
this.SetLoading()
|
||||
this.$(".isShow .loading").innerHTML = `
|
||||
<div class="dialog_f">
|
||||
<div class="dialog_header">${defaultParams.title}</div>
|
||||
<div class="dialog_content">
|
||||
<div class="dialog_message">${defaultParams.message}</div>
|
||||
</div>
|
||||
<div class="dialog_footer">
|
||||
<div class="dialog_cancel" style="color:${defaultParams.cancelColor}">
|
||||
${defaultParams.cancelText}
|
||||
</div>
|
||||
<div class="dialog_confirm" style="color:${defaultParams.confirmColor}">
|
||||
${defaultParams.confirmText}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
// 取消按钮被点击的时候
|
||||
this.$(".isShow .dialog_cancel").onclick = () => {
|
||||
params.cancel && params.cancel()
|
||||
this.close()
|
||||
}
|
||||
// 确定按钮被点击的时候
|
||||
this.$(".isShow .dialog_confirm").onclick = () => {
|
||||
params.confirm && params.confirm()
|
||||
this.close()
|
||||
}
|
||||
this.$(".isShow .loading").style = 'background: rgba(0, 0, 0, 0.7)'
|
||||
this.show()
|
||||
}
|
||||
|
||||
/**
|
||||
* 填充loading的html结构
|
||||
*/
|
||||
SetLoading () {
|
||||
if (this.$(".isShow") == null) {
|
||||
var isShow = document.createElement("div")
|
||||
isShow.className = "isShow"
|
||||
isShow.style = "display: none;"
|
||||
|
||||
var loading = document.createElement("div")
|
||||
loading.className = "loading";
|
||||
isShow.appendChild(loading)
|
||||
this.$("body").appendChild(isShow)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除内容,隐藏弹窗
|
||||
*/
|
||||
close() {
|
||||
this.clearContent()
|
||||
this.$(".isShow").style.display = "none"
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示弹窗
|
||||
*/
|
||||
show() {
|
||||
this.$(".isShow").style.display = "block"
|
||||
}
|
||||
|
||||
/**
|
||||
* 清空弹窗内部的内容
|
||||
*/
|
||||
clearContent() {
|
||||
this.$(".isShow .loading").style = "";
|
||||
this.$(".isShow .loading").innerHTML = "";
|
||||
}
|
||||
|
||||
$(className) {
|
||||
return document.querySelector(className);
|
||||
}
|
||||
}
|
||||
|
||||
var Tips = new Loading()
|
||||
20
h5_webview/app/src/main/assets/js/utils/rem.js
Normal file
20
h5_webview/app/src/main/assets/js/utils/rem.js
Normal file
@@ -0,0 +1,20 @@
|
||||
!(function(win, doc) {
|
||||
function setFontSize() {
|
||||
var winWidth = window.innerWidth;
|
||||
doc.documentElement.style.fontSize = (winWidth / 750) * 100 + 'px';
|
||||
}
|
||||
var evt = 'onorientationchange' in win ? 'orientationchange' : 'resize';
|
||||
var timer = null;
|
||||
win.addEventListener(evt, function() {
|
||||
clearTimeout(timer);
|
||||
timer = setTimeout(setFontSize, 300);
|
||||
}, false);
|
||||
win.addEventListener("pageshow", function(e) {
|
||||
if (e.persisted) {
|
||||
clearTimeout(timer);
|
||||
timer = setTimeout(setFontSize, 300);
|
||||
}
|
||||
}, false);
|
||||
//初始化
|
||||
setFontSize();
|
||||
}(window, document));
|
||||
331
h5_webview/app/src/main/assets/js/utils/swiper.js
Normal file
331
h5_webview/app/src/main/assets/js/utils/swiper.js
Normal file
@@ -0,0 +1,331 @@
|
||||
(function () {
|
||||
/**
|
||||
* 构造函数
|
||||
* @param {*} ParentElement 父节点的选择器名称
|
||||
* @param {*} Configuration 插件的自定义设置项
|
||||
*/
|
||||
function Swiper(ParentElement, Configuration) {
|
||||
// 默认参数
|
||||
// slideChangeTransitionStart【完成】
|
||||
// slideTo【完成】
|
||||
this.defaultConf = {
|
||||
reverse: false,
|
||||
timer: '', // 保存自动播放的定时器
|
||||
ParentElement: '.swiper-container',
|
||||
wrapper: '.swiper-wrapper',
|
||||
slide: '.swiper-slide',
|
||||
config: {
|
||||
loop: false, // 是否开启循环播放【完成】
|
||||
time: 1, // 自动播放的间隔事件【完成】
|
||||
speed: 300, // 切换轮播图时候用的时间【完成】
|
||||
grabCursor: false, // 鼠标放到轮播图上是否显示为 小手【完成】
|
||||
initialSlide: 0, // 默认显示第一个【完成】
|
||||
auto: false, // 是否开启自动播放【完成】
|
||||
},
|
||||
// 小圆点的父标签选择器名称
|
||||
pagination: {
|
||||
el: '.swiper-pagination',
|
||||
},
|
||||
navigation: {
|
||||
nextEl: '.swiper-button-next', // 下一页
|
||||
prevEl: '.swiper-button-prev', // 上一页
|
||||
},
|
||||
}
|
||||
|
||||
this.defaultConf.ParentElement = ParentElement || this.defaultConf.ParentElement;
|
||||
this.defaultConf.config.loop = Configuration.loop || this.defaultConf.config.loop;
|
||||
this.defaultConf.config.time = Configuration.time || this.defaultConf.config.time;
|
||||
this.defaultConf.config.speed = Configuration.speed || this.defaultConf.config.speed;
|
||||
this.defaultConf.config.grabCursor = Configuration.grabCursor || this.defaultConf.config.grabCursor;
|
||||
this.defaultConf.config.initialSlide = Configuration.initialSlide || this.defaultConf.config.initialSlide;
|
||||
this.defaultConf.config.auto = Configuration.auto || this.defaultConf.config.auto;
|
||||
this.defaultConf.wrapper = Configuration.wrapper || this.defaultConf.wrapper;
|
||||
this.defaultConf.slide = Configuration.slide || this.defaultConf.slide;
|
||||
|
||||
this.slideArr = this._(`${this.defaultConf.wrapper} ${this.defaultConf.slide}`);
|
||||
|
||||
// 最外层 swiper-container 宽度
|
||||
this.f = this.$(this.defaultConf.ParentElement).offsetWidth;
|
||||
|
||||
// 判断小圆点
|
||||
if (Configuration.hasOwnProperty("pagination")) {
|
||||
this.defaultConf.pagination.el = Configuration.pagination.el;
|
||||
this.RenderDot()
|
||||
}
|
||||
|
||||
// 判断使用自定义前进后退按钮
|
||||
if (Configuration.hasOwnProperty("navigation")) {
|
||||
this.RenderNavigation()
|
||||
//判断下一页按钮的名称是否自定义
|
||||
if (Configuration.navigation.hasOwnProperty("nextEl")) {
|
||||
this.defaultConf.navigation.nextEl = Configuration.navigation.nextEl;
|
||||
}
|
||||
//判断上一页按钮的名称是否自定义
|
||||
if (Configuration.navigation.hasOwnProperty("prevEl")) {
|
||||
this.defaultConf.navigation.prevEl = Configuration.navigation.prevEl;
|
||||
}
|
||||
}
|
||||
|
||||
this.UserConfig = Configuration
|
||||
this.init()
|
||||
}
|
||||
|
||||
|
||||
// 类的方法
|
||||
Swiper.prototype = {
|
||||
init: function () {
|
||||
this.SetWrapperWidth();
|
||||
this.defaultConf.config.auto ? this.AutoPlay() : '';
|
||||
this.initSwiperSlide()
|
||||
},
|
||||
// 设置swiper-slide父类的宽度
|
||||
SetWrapperWidth: function () {
|
||||
|
||||
// 计算swiper-slide的宽度
|
||||
this.slideArr.forEach(v => v.style.width = `${this.f}px`)
|
||||
this.$(this.defaultConf.wrapper).style = `
|
||||
width: ${this.f * this.slideArr.length}px;
|
||||
left: -${this.f * this.defaultConf.config.initialSlide}px;
|
||||
transition: all ease ${this.defaultConf.config.speed / 1000}s;
|
||||
cursor: ${this.defaultConf.config.grabCursor ? 'pointer' : ''} ;
|
||||
`
|
||||
},
|
||||
|
||||
/**
|
||||
* 注册移动端滑动
|
||||
*/
|
||||
initSwiperSlide: function () {
|
||||
var fa = this.$(this.defaultConf.ParentElement),
|
||||
startX = 0,
|
||||
startY = 0;
|
||||
|
||||
fa.addEventListener('touchstart', function (e) {
|
||||
e.stopPropagation()
|
||||
startX = e.targetTouches[0].pageX
|
||||
startY = e.targetTouches[0].pageY
|
||||
})
|
||||
|
||||
var getDirection = function (startx, starty, endx, endy) {
|
||||
// 获得角度
|
||||
var getAngle = function(angx, angy) {
|
||||
return Math.atan2(angy, angx) * 180 / Math.PI;
|
||||
};
|
||||
|
||||
var angx = endx - startx;
|
||||
var angy = endy - starty;
|
||||
var result = 0;
|
||||
|
||||
// 如果滑动距离太短
|
||||
if (Math.abs(angx) < 2 && Math.abs(angy) < 2) {
|
||||
return result;
|
||||
}
|
||||
|
||||
var angle = getAngle(angx, angy);
|
||||
if (angle >= -135 && angle <= -45) {
|
||||
result = 1;
|
||||
} else if (angle > 45 && angle < 135) {
|
||||
result = 2;
|
||||
} else if ((angle >= 135 && angle <= 180) || (angle >= -180 && angle < -135)) {
|
||||
result = 3;
|
||||
} else if (angle >= -45 && angle <= 45) {
|
||||
result = 4;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
fa.addEventListener('touchmove', (e) => {
|
||||
e.stopPropagation()
|
||||
var endX = e.changedTouches[0].pageX;
|
||||
var endY = e.changedTouches[0].pageY;
|
||||
|
||||
var direction = getDirection(startX, startY, endX, endY);
|
||||
if (direction == 3 || direction == 4) {
|
||||
var x = parseInt(endX - startX) - 40
|
||||
this.$(this.defaultConf.wrapper).style.webkitTransform = `translate3d(${x}px,0px,0px)`;
|
||||
}
|
||||
});
|
||||
|
||||
fa.addEventListener('touchend', (e) => {
|
||||
e.stopPropagation()
|
||||
var endX = e.changedTouches[0].pageX;
|
||||
var endY = e.changedTouches[0].pageY;
|
||||
|
||||
var direction = getDirection(startX, startY, endX, endY);
|
||||
|
||||
switch (direction) {
|
||||
case 0:
|
||||
console.log("未滑动!");
|
||||
break;
|
||||
case 1:
|
||||
console.log("向上!")
|
||||
break;
|
||||
case 2:
|
||||
console.log("向下!")
|
||||
break;
|
||||
case 3:
|
||||
this.$(this.defaultConf.wrapper).style.webkitTransform = `translate3d(0px,0px,0px)`;
|
||||
this.animation(-this.f)
|
||||
this.CallMethods()
|
||||
this.UserConfig.pagination && this.ChangeDotActive()
|
||||
console.log("向左!")
|
||||
break;
|
||||
case 4:
|
||||
this.$(this.defaultConf.wrapper).style.webkitTransform = `translate3d(0px,0px,0px)`;
|
||||
this.animation(this.f)
|
||||
this.CallMethods()
|
||||
this.UserConfig.pagination && this.ChangeDotActive()
|
||||
console.log("向右滑动");
|
||||
break;
|
||||
default:
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
CallMethods() {
|
||||
if (this.UserConfig.hasOwnProperty("on")) {
|
||||
var TotalLeft = Math.abs(parseInt(this.$(this.defaultConf.wrapper).style.left));
|
||||
index = TotalLeft / this.f;
|
||||
// 实现调用用户传入的方法,返回下标给用户
|
||||
this.UserConfig.on && this.UserConfig.on.slideChangeTransitionStart(index)
|
||||
}
|
||||
},
|
||||
|
||||
// 生成小圆点
|
||||
RenderDot: function () {
|
||||
this.slideArr.forEach((v, i) => {
|
||||
this.$(this.defaultConf.pagination.el).innerHTML +=
|
||||
`
|
||||
<div class="swiper-dot ${i == 0 ? 'swiper-active' : ''}"></div>
|
||||
`
|
||||
});
|
||||
|
||||
var Dot = this._(`${this.defaultConf.pagination.el} .swiper-dot`);
|
||||
Dot.forEach((v, i) => {
|
||||
v.onclick = () => {
|
||||
this.UserConfig.pagination && this.ChangeDotActive(i)
|
||||
this.$(this.defaultConf.wrapper).style.left = `-${i * this.f}px`;
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 渲染左右前进后退按钮
|
||||
RenderNavigation: function () {
|
||||
var prev = this.$(this.defaultConf.navigation.prevEl);
|
||||
var next = this.$(this.defaultConf.navigation.nextEl);
|
||||
prev.innerText = "<";
|
||||
next.innerText = ">";
|
||||
this.BindNavigationClick(prev, next)
|
||||
},
|
||||
|
||||
// 为上一页下一页按钮绑定切换事件
|
||||
BindNavigationClick() {
|
||||
// var a = this
|
||||
// 下一页
|
||||
this.$(this.defaultConf.navigation.nextEl).onclick = () => {
|
||||
this.animation(-this.f)
|
||||
this.UserConfig.pagination && this.ChangeDotActive()
|
||||
}
|
||||
// 上一页
|
||||
this.$(this.defaultConf.navigation.prevEl).onclick = () => {
|
||||
this.animation(this.f)
|
||||
this.UserConfig.pagination && this.ChangeDotActive()
|
||||
}
|
||||
},
|
||||
|
||||
// 切换动画
|
||||
animation(offset) {
|
||||
var swiperWrapper = this.$(this.defaultConf.wrapper);
|
||||
var y = parseInt(swiperWrapper.style.left) + offset,
|
||||
max = -(this.f * (this.slideArr.length - 1));
|
||||
|
||||
// 如果时最后一张图
|
||||
if (y < max) {
|
||||
if (this.defaultConf.config.loop) {
|
||||
swiperWrapper.style.left = "0px";
|
||||
} else if (this.defaultConf.config.auto) {
|
||||
this.defaultConf.reverse = true
|
||||
this.animation(this.f)
|
||||
}
|
||||
return;
|
||||
|
||||
// 判断是不是第一张图
|
||||
} else if (y > 0) {
|
||||
if (this.defaultConf.config.loop == false && this.defaultConf.config.auto) {
|
||||
this.defaultConf.reverse = false
|
||||
swiperWrapper.style.left = `${y - this.f * 2}px`
|
||||
}
|
||||
if (this.defaultConf.config.loop) {
|
||||
swiperWrapper.style.left = `${max}px`
|
||||
}
|
||||
return
|
||||
} else {
|
||||
if (this.defaultConf.config.loop == false
|
||||
&& this.defaultConf.config.auto
|
||||
&& this.defaultConf.reverse) {
|
||||
swiperWrapper.style.left = `${y}px`
|
||||
} else {
|
||||
swiperWrapper.style.left = `${y}px`
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
ChangeDotActive(type = null) {
|
||||
var Dot = this._(`${this.defaultConf.pagination.el} .swiper-dot`);
|
||||
var index = "";
|
||||
if (type == null) {
|
||||
var TotalLeft = Math.abs(parseInt(this.$(this.defaultConf.wrapper).style.left));
|
||||
index = TotalLeft / this.f;
|
||||
} else {
|
||||
index = type;
|
||||
}
|
||||
|
||||
// 实现调用用户传入的方法,返回下标给用户
|
||||
this.CallMethods()
|
||||
|
||||
// 清除所有的激活样式
|
||||
Dot.forEach(val => val.className = "swiper-dot");
|
||||
// 为你点击的li加激活样式
|
||||
Dot[index].className = "swiper-dot swiper-active";
|
||||
},
|
||||
|
||||
AutoPlay() {
|
||||
this.defaultConf.timer = setInterval(() => {
|
||||
if (this.defaultConf.config.loop == false
|
||||
&& this.defaultConf.config.auto
|
||||
&& this.defaultConf.reverse) {
|
||||
this.animation(this.f)
|
||||
} else {
|
||||
this.animation(-this.f)
|
||||
}
|
||||
this.UserConfig.pagination && this.ChangeDotActive()
|
||||
}, this.defaultConf.config.time * 1000)
|
||||
|
||||
this.$(this.defaultConf.ParentElement).onmouseover = function () {
|
||||
clearInterval(this.defaultConf.timer)
|
||||
}
|
||||
|
||||
this.$(this.defaultConf.ParentElement).onmouseout = () => {
|
||||
this.AutoPlay()
|
||||
}
|
||||
},
|
||||
|
||||
// 通过js调用此方法,实现轮播图的切换
|
||||
slideTo(index) {
|
||||
this.$(this.defaultConf.wrapper).style.left = `-${index * this.f}px`;
|
||||
this.UserConfig.pagination && this.ChangeDotActive()
|
||||
},
|
||||
$: function (className) {
|
||||
return document.querySelector(className)
|
||||
},
|
||||
_: function (className) {
|
||||
return document.querySelectorAll(className)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
window.swiper = Swiper
|
||||
|
||||
|
||||
})()
|
||||
15
h5_webview/app/src/main/assets/package.json
Normal file
15
h5_webview/app/src/main/assets/package.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"name": "smt",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"dev": "pm2 start index.js --name smt"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"express": "^4.17.1"
|
||||
}
|
||||
}
|
||||
1
h5_webview/app/src/main/assets/page/.pydio
Normal file
1
h5_webview/app/src/main/assets/page/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
2c34c2cd-4ca0-46d0-b4b5-ca385e1b259f
|
||||
35
h5_webview/app/src/main/assets/page/about_us.html
Normal file
35
h5_webview/app/src/main/assets/page/about_us.html
Normal file
@@ -0,0 +1,35 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="referrer" content="no-referrer" />
|
||||
<title>枸杞社</title>
|
||||
<script src="../js/utils/rem.js"></script>
|
||||
<link rel="stylesheet" href="http://at.alicdn.com/t/font_2124975_xz9sxo44gx.css">
|
||||
<link rel="stylesheet" href="../css/loading.css">
|
||||
<link rel="stylesheet" href="../css/swiper.css">
|
||||
<link rel="stylesheet" href="../css/clear.css">
|
||||
<link rel="stylesheet" href="../css/public.css">
|
||||
<link rel="stylesheet" href="../css/about_us.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="header_theme1 theme_color">
|
||||
<div class="action">
|
||||
<i class="iconfont icon-back1"></i>
|
||||
<span>关于我们</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="content_theme1">
|
||||
<div class="about_center">
|
||||
<img src="../img/logo.png" alt="logo">
|
||||
<p>水蜜桃</p>
|
||||
<span>专业的写真App,为您提供国内外总计约198万张的写真图,满足您的各种喜好是我们最初衷的动力!</span>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script src="../js/utils/index.js"></script>
|
||||
|
||||
</html>
|
||||
44
h5_webview/app/src/main/assets/page/agreement.html
Normal file
44
h5_webview/app/src/main/assets/page/agreement.html
Normal file
@@ -0,0 +1,44 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="referrer" content="no-referrer" />
|
||||
<title>枸杞社</title>
|
||||
<script src="../js/utils/rem.js"></script>
|
||||
<link rel="stylesheet" href="http://at.alicdn.com/t/font_2124975_xz9sxo44gx.css">
|
||||
<link rel="stylesheet" href="../css/loading.css">
|
||||
<link rel="stylesheet" href="../css/swiper.css">
|
||||
<link rel="stylesheet" href="../css/clear.css">
|
||||
<link rel="stylesheet" href="../css/public.css">
|
||||
<link rel="stylesheet" href="../css/agreement.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="header_theme1 theme_color">
|
||||
<div class="action">
|
||||
<i class="iconfont icon-back1"></i>
|
||||
<span>用户协议</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="content_theme1">
|
||||
<div class="agreement padding_30">
|
||||
<span>用户须知</span>
|
||||
<p>1:图片都来源于互联网,如果存在版权问题和纠纷,请通过电话或者邮箱联系我们,我们也会停止相应资源的展示下载等一切行为!</p>
|
||||
<p>2:本App所有资源提供一切免费的下载,不存在任何的收费或者需要VIP的行为</p>
|
||||
<p>3:使用过程中请勿随意传播资源,有任何问题可以及时给予我们反馈</p>
|
||||
<p>4:本App内所有内容都符合法律法规,不存在少儿不宜的内容和信息等资源,如果有请及时反馈,我们会第一时间中止违规内容的展示</p>
|
||||
<span>产品特点</span>
|
||||
<p>1:海量的超高清图集,图片画质超清晰、全部超大尺寸或原尺寸的图片。目前已经收录35804套图集,共计:197.4394万张高清图片,每周新增约100套+图集!</p>
|
||||
<p>2:在线浏览超高品质的图集,超一流的用户体验!一个帐号,电脑、手机、平板任性浏览!还可以收藏自己喜欢的图集,方便下次仔细欣赏。当然您也可以一键下载图集!</p>
|
||||
<p>3:全网最专业的图集收集整理网站!中国的、日韩的、欧美的、泰国的,应有尽有。全部都是我们精心整理的,按人物、机构、标签的精准确分类!</p>
|
||||
<p>4:特意开发的巧遇功能,随机从我们精心筛选的数千套图集里推送给你直接浏览体验。最贴心、好用、好看的功能,所有付费用户均可使用!</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script src="../js/utils/index.js"></script>
|
||||
|
||||
</html>
|
||||
119
h5_webview/app/src/main/assets/page/home.html
Normal file
119
h5_webview/app/src/main/assets/page/home.html
Normal file
@@ -0,0 +1,119 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="referrer" content="no-referrer" />
|
||||
<title>枸杞社</title>
|
||||
<script src="../js/utils/rem.js"></script>
|
||||
<link rel="stylesheet" href="http://at.alicdn.com/t/font_2124975_jvymm06or6a.css">
|
||||
<link rel="stylesheet" href="../css/loading.css">
|
||||
<link rel="stylesheet" href="../css/swiper.css">
|
||||
<link rel="stylesheet" href="../css/clear.css">
|
||||
<link rel="stylesheet" href="../css/public.css">
|
||||
<link rel="stylesheet" href="../css/home.css">
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="header">
|
||||
<div class="header_search theme_color">
|
||||
<i class="iconfont icon-taozi1 color_white"></i>
|
||||
<div class="search">
|
||||
<i class="iconfont icon-search"></i>
|
||||
<span>198万张图,有你想要的...</span>
|
||||
</div>
|
||||
<a href="./my.html">
|
||||
<i class="iconfont icon-wo color_white"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="header_menu">
|
||||
<ul class="menu_list"></ul>
|
||||
<a href="./type_edit.html">
|
||||
<i class="iconfont icon-edit"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="s-container">
|
||||
<div class="s-wrapper">
|
||||
<div class="s-slide">
|
||||
<div class="home_content">
|
||||
|
||||
<!-- 模特的轮播 -->
|
||||
<div class="banner">
|
||||
<div class="swiper-container">
|
||||
<div class="swiper-wrapper">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 最新收录 -->
|
||||
<div class="newest item_list padding_30">
|
||||
<div class="title"></div>
|
||||
<ul></ul>
|
||||
</div>
|
||||
|
||||
<!-- 今日推荐 -->
|
||||
<div class="recommended item_list padding_30">
|
||||
<div class="title"></div>
|
||||
<ul></ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
<ul>
|
||||
<li class="footer_active">
|
||||
<a href="./home.html">
|
||||
<i class="iconfont icon-home"></i>
|
||||
<span>首页</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="./mechanism.html">
|
||||
<i class="iconfont icon-jigou"></i>
|
||||
<span>机构</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="./model.html">
|
||||
<i class="iconfont icon-me"></i>
|
||||
<span>模特</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="./my.html">
|
||||
<i class="iconfont icon-wo"></i>
|
||||
<span>我的</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="openApp">
|
||||
<a href="mitao://openfile">
|
||||
<img src="../img/logo.png" alt="">
|
||||
<p>打开App</p>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
<script src="../js/utils/swiper.js"></script>
|
||||
<script src="../js/utils/loading.js"></script>
|
||||
<script src="../js/utils/index.js"></script>
|
||||
<script src="../js/config/index.js"></script>
|
||||
<script src="../js/http/index.js"></script>
|
||||
<script src="../js/service/HomeService.js"></script>
|
||||
<script src="../js/page/home.js"></script>
|
||||
|
||||
</html>
|
||||
111
h5_webview/app/src/main/assets/page/info.html
Normal file
111
h5_webview/app/src/main/assets/page/info.html
Normal file
@@ -0,0 +1,111 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="referrer" content="no-referrer" />
|
||||
<title>枸杞社</title>
|
||||
<script src="../js/utils/rem.js"></script>
|
||||
<link rel="stylesheet" href="http://at.alicdn.com/t/font_2124975_9zhdcjwpc1o.css">
|
||||
<link rel="stylesheet" href="../css/loading.css">
|
||||
<link rel="stylesheet" href="../css/swiper.css">
|
||||
<link rel="stylesheet" href="../css/clear.css">
|
||||
<link rel="stylesheet" href="../css/public.css">
|
||||
<link rel="stylesheet" href="../css/info.css">
|
||||
|
||||
<link rel="stylesheet" href="../js/utils/dist/photoswipe.css">
|
||||
<link rel="stylesheet" href="../js/utils/dist/default-skin/default-skin.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
|
||||
<div class="header_theme1 theme_color">
|
||||
<div class="action">
|
||||
<i class="iconfont icon-back1"></i>
|
||||
<span>写真集详情</span>
|
||||
</div>
|
||||
<div class="right">
|
||||
<i class="like iconfont icon-xin"></i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="content_info ddd">
|
||||
<div class="info">
|
||||
</div>
|
||||
|
||||
<i class="iconfont icon-xiangxia next_page" style="display: none"></i>
|
||||
|
||||
<div class="recommend item_list padding_30">
|
||||
<div class="title"></div>
|
||||
<ul></ul>
|
||||
</div>
|
||||
|
||||
<div class="relevant item_list padding_30">
|
||||
<div class="title"></div>
|
||||
<ul></ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
|
||||
<div class="pswp__bg"></div>
|
||||
|
||||
<div class="pswp__scroll-wrap">
|
||||
|
||||
<div class="pswp__container">
|
||||
<div class="pswp__item"></div>
|
||||
<div class="pswp__item"></div>
|
||||
<div class="pswp__item"></div>
|
||||
</div>
|
||||
|
||||
<div class="pswp__ui pswp__ui--hidden">
|
||||
<div class="pswp__top-bar">
|
||||
<div class="pswp__counter"></div>
|
||||
<button class="pswp__button pswp__button--close" title="Close (Esc)"></button>
|
||||
<button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button>
|
||||
<div class="pswp__preloader">
|
||||
<div class="pswp__preloader__icn">
|
||||
<div class="pswp__preloader__cut">
|
||||
<div class="pswp__preloader__donut"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">
|
||||
<div class="pswp__share-tooltip"></div>
|
||||
</div>
|
||||
|
||||
<button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)">
|
||||
</button>
|
||||
|
||||
<button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)">
|
||||
</button>
|
||||
|
||||
<div class="pswp__caption">
|
||||
<div class="pswp__caption__center"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</body>
|
||||
<script src="../js/config/index.js"></script>
|
||||
<script src="../js/utils/loading.js"></script>
|
||||
<script src="../js/utils/index.js"></script>
|
||||
<script src="../js/http/index.js"></script>
|
||||
<script src="../js/service/HomeService.js"></script>
|
||||
|
||||
<script src="../js/utils/dist/photoswipe.min.js"></script>
|
||||
<script src="../js/utils/dist/photoswipe-ui-default.min.js"></script>
|
||||
<script src="../js/utils/dist/initPhotoSwipe.js"></script>
|
||||
|
||||
<script src="../js/page/info.js"></script>
|
||||
|
||||
</html>
|
||||
37
h5_webview/app/src/main/assets/page/like.html
Normal file
37
h5_webview/app/src/main/assets/page/like.html
Normal file
@@ -0,0 +1,37 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="referrer" content="no-referrer" />
|
||||
<title>枸杞社</title>
|
||||
<script src="../js/utils/rem.js"></script>
|
||||
<link rel="stylesheet" href="http://at.alicdn.com/t/font_2124975_zhz20ubhaik.css">
|
||||
<link rel="stylesheet" href="../css/loading.css">
|
||||
<link rel="stylesheet" href="../css/clear.css">
|
||||
<link rel="stylesheet" href="../css/public.css">
|
||||
<link rel="stylesheet" href="../css/like.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="header_theme1 theme_color">
|
||||
<div class="action">
|
||||
<i class="iconfont icon-back1"></i>
|
||||
<span>我的收藏</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="content_info">
|
||||
<div class="jglist item_list padding_30">
|
||||
<ul></ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</body>
|
||||
<script src="../js/utils/index.js"></script>
|
||||
<script src="../js/utils/loading.js"></script>
|
||||
<script src="../js/page/like.js"></script>
|
||||
</html>
|
||||
68
h5_webview/app/src/main/assets/page/mechanism.html
Normal file
68
h5_webview/app/src/main/assets/page/mechanism.html
Normal file
@@ -0,0 +1,68 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="referrer" content="no-referrer" />
|
||||
<title>枸杞社</title>
|
||||
<script src="../js/utils/rem.js"></script>
|
||||
<link rel="stylesheet" href="http://at.alicdn.com/t/font_2124975_xz9sxo44gx.css">
|
||||
<link rel="stylesheet" href="../css/loading.css">
|
||||
<link rel="stylesheet" href="../css/swiper.css">
|
||||
<link rel="stylesheet" href="../css/clear.css">
|
||||
<link rel="stylesheet" href="../css/public.css">
|
||||
<link rel="stylesheet" href="../css/mechanism.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<div class="header_theme1 theme_color">
|
||||
<div class="action">
|
||||
<i class="iconfont icon-back1"></i>
|
||||
<span>机构</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="content_theme1">
|
||||
<ul class="mechanism_list">
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
<ul>
|
||||
<li>
|
||||
<a href="./home.html">
|
||||
<i class="iconfont icon-home"></i>
|
||||
<span>首页</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="footer_active">
|
||||
<a href="./mechanism.html">
|
||||
<i class="iconfont icon-jigou"></i>
|
||||
<span>机构</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="./model.html">
|
||||
<i class="iconfont icon-me"></i>
|
||||
<span>模特</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="./my.html">
|
||||
<i class="iconfont icon-wo"></i>
|
||||
<span>我的</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
<script src="../js/utils/swiper.js"></script>
|
||||
<script src="../js/utils/index.js"></script>
|
||||
<script src="../js/config/index.js"></script>
|
||||
<script src="../js/utils/loading.js"></script>
|
||||
<script src="../js/http/index.js"></script>
|
||||
<script src="../js/service/HomeService.js"></script>
|
||||
<script src="../js/page/mechanism.js"></script>
|
||||
</html>
|
||||
42
h5_webview/app/src/main/assets/page/mechanism_info.html
Normal file
42
h5_webview/app/src/main/assets/page/mechanism_info.html
Normal file
@@ -0,0 +1,42 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="referrer" content="no-referrer" />
|
||||
<title>枸杞社</title>
|
||||
<script src="../js/utils/rem.js"></script>
|
||||
<link rel="stylesheet" href="http://at.alicdn.com/t/font_2124975_xz9sxo44gx.css">
|
||||
<link rel="stylesheet" href="../css/loading.css">
|
||||
<link rel="stylesheet" href="../css/swiper.css">
|
||||
<link rel="stylesheet" href="../css/clear.css">
|
||||
<link rel="stylesheet" href="../css/public.css">
|
||||
<link rel="stylesheet" href="../css/mechanism.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="header_theme1 theme_color">
|
||||
<div class="action">
|
||||
<i class="iconfont icon-back1"></i>
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="content_info">
|
||||
<div class="jglist item_list padding_30">
|
||||
<ul></ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</body>
|
||||
<script src="../js/utils/swiper.js"></script>
|
||||
<script src="../js/utils/index.js"></script>
|
||||
<script src="../js/config/index.js"></script>
|
||||
<script src="../js/utils/loading.js"></script>
|
||||
<script src="../js/http/index.js"></script>
|
||||
<script src="../js/service/HomeService.js"></script>
|
||||
<script src="../js/page/mechanism_info.js"></script>
|
||||
</html>
|
||||
75
h5_webview/app/src/main/assets/page/model.html
Normal file
75
h5_webview/app/src/main/assets/page/model.html
Normal file
@@ -0,0 +1,75 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="referrer" content="no-referrer" />
|
||||
<title>枸杞社</title>
|
||||
<script src="../js/utils/rem.js"></script>
|
||||
<link rel="stylesheet" href="http://at.alicdn.com/t/font_2124975_xz9sxo44gx.css">
|
||||
<link rel="stylesheet" href="../css/loading.css">
|
||||
<link rel="stylesheet" href="../css/swiper.css">
|
||||
<link rel="stylesheet" href="../css/clear.css">
|
||||
<link rel="stylesheet" href="../css/public.css">
|
||||
<link rel="stylesheet" href="../css/model.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<div class="header_theme1 theme_color">
|
||||
<div class="action">
|
||||
<i class="iconfont icon-back1"></i>
|
||||
<span>模特</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="content_theme1">
|
||||
<div class="hot_models item_list padding_30">
|
||||
<div class="title"></div>
|
||||
<div class="model_list"></div>
|
||||
</div>
|
||||
|
||||
<div class="newest item_list padding_30">
|
||||
<div class="title"></div>
|
||||
<div class="model_list"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
<ul>
|
||||
<li>
|
||||
<a href="./home.html">
|
||||
<i class="iconfont icon-home"></i>
|
||||
<span>首页</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="./mechanism.html">
|
||||
<i class="iconfont icon-jigou"></i>
|
||||
<span>机构</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="footer_active">
|
||||
<a href="./model.html">
|
||||
<i class="iconfont icon-me"></i>
|
||||
<span>模特</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="./my.html">
|
||||
<i class="iconfont icon-wo"></i>
|
||||
<span>我的</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
<script src="../js/utils/swiper.js"></script>
|
||||
<script src="../js/config/index.js"></script>
|
||||
<script src="../js/utils/loading.js"></script>
|
||||
<script src="../js/utils/index.js"></script>
|
||||
<script src="../js/http/index.js"></script>
|
||||
<script src="../js/service/HomeService.js"></script>
|
||||
<script src="../js/page/model.js"></script>
|
||||
</html>
|
||||
52
h5_webview/app/src/main/assets/page/model_info.html
Normal file
52
h5_webview/app/src/main/assets/page/model_info.html
Normal file
@@ -0,0 +1,52 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="referrer" content="no-referrer" />
|
||||
<title>枸杞社</title>
|
||||
<script src="../js/utils/rem.js"></script>
|
||||
<link rel="stylesheet" href="http://at.alicdn.com/t/font_2124975_xz9sxo44gx.css">
|
||||
<link rel="stylesheet" href="../css/loading.css">
|
||||
<link rel="stylesheet" href="../css/swiper.css">
|
||||
<link rel="stylesheet" href="../css/clear.css">
|
||||
<link rel="stylesheet" href="../css/public.css">
|
||||
<link rel="stylesheet" href="../css/model_info.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
|
||||
<div class="header_theme1 theme_color">
|
||||
<div class="action">
|
||||
<i class="iconfont icon-back1"></i>
|
||||
<span>模特详情</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="content_info">
|
||||
<div class="model_info_header padding_30"></div>
|
||||
|
||||
<div class="tazuop item_list padding_30">
|
||||
<div class="title"></div>
|
||||
<ul></ul>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="similar item_list padding_30">
|
||||
<div class="title"></div>
|
||||
<div class="model_list"> </div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</body>
|
||||
<script src="../js/utils/swiper.js"></script>
|
||||
<script src="../js/utils/index.js"></script>
|
||||
<script src="../js/config/index.js"></script>
|
||||
<script src="../js/utils/loading.js"></script>
|
||||
<script src="../js/http/index.js"></script>
|
||||
<script src="../js/service/HomeService.js"></script>
|
||||
<script src="../js/page/model_info.js"></script>
|
||||
</html>
|
||||
108
h5_webview/app/src/main/assets/page/my.html
Normal file
108
h5_webview/app/src/main/assets/page/my.html
Normal file
@@ -0,0 +1,108 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="referrer" content="no-referrer" />
|
||||
<title>枸杞社</title>
|
||||
<script src="../js/utils/rem.js"></script>
|
||||
<link rel="stylesheet" href="http://at.alicdn.com/t/font_2124975_xz9sxo44gx.css">
|
||||
<link rel="stylesheet" href="../css/loading.css">
|
||||
<link rel="stylesheet" href="../css/swiper.css">
|
||||
<link rel="stylesheet" href="../css/clear.css">
|
||||
<link rel="stylesheet" href="../css/public.css">
|
||||
<link rel="stylesheet" href="../css/my.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
|
||||
<div class="header_my theme_color">
|
||||
<i class="iconfont icon-wo"></i>
|
||||
<p>我的</p>
|
||||
</div>
|
||||
|
||||
<div class="content_my">
|
||||
<div class="setting_list">
|
||||
<div class="list_item">
|
||||
<a href="./like.html">
|
||||
<div class="item_left">
|
||||
<i class="iconfont icon-zuji"></i>
|
||||
<span>我的收藏</span>
|
||||
</div>
|
||||
<i class="iconfont icon-qianjin-tongyong"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="list_item">
|
||||
<a href="./about_us.html">
|
||||
<div class="item_left">
|
||||
<i class="iconfont icon-guanyu"></i>
|
||||
<span>关于我们</span>
|
||||
</div>
|
||||
<i class="iconfont icon-qianjin-tongyong"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="list_item">
|
||||
<a href="./agreement.html">
|
||||
<div class="item_left">
|
||||
<i class="iconfont icon-xieyiguanli"></i>
|
||||
<span>用户协议</span>
|
||||
</div>
|
||||
<i class="iconfont icon-qianjin-tongyong"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="list_item updateApp">
|
||||
<a>
|
||||
<div class="item_left">
|
||||
<i class="iconfont icon-shengji"></i>
|
||||
<span>检测升级</span>
|
||||
</div>
|
||||
<i class="iconfont icon-qianjin-tongyong"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="list_item clearData">
|
||||
<a>
|
||||
<div class="item_left">
|
||||
<i class="iconfont icon-clean"></i>
|
||||
<span>清除缓存</span>
|
||||
</div>
|
||||
<i class="iconfont icon-qianjin-tongyong"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
<ul>
|
||||
<li>
|
||||
<a href="./home.html">
|
||||
<i class="iconfont icon-home"></i>
|
||||
<span>首页</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="./mechanism.html">
|
||||
<i class="iconfont icon-jigou"></i>
|
||||
<span>机构</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="./model.html">
|
||||
<i class="iconfont icon-me"></i>
|
||||
<span>模特</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="footer_active">
|
||||
<a href="./my.html">
|
||||
<i class="iconfont icon-wo"></i>
|
||||
<span>我的</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
<script src="../js/utils/loading.js"></script>
|
||||
<script src="../js/page/my.js"></script>
|
||||
</html>
|
||||
42
h5_webview/app/src/main/assets/page/search.html
Normal file
42
h5_webview/app/src/main/assets/page/search.html
Normal file
@@ -0,0 +1,42 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="referrer" content="no-referrer" />
|
||||
<title>枸杞社</title>
|
||||
<script src="../js/utils/rem.js"></script>
|
||||
<link rel="stylesheet" href="http://at.alicdn.com/t/font_2124975_zhz20ubhaik.css">
|
||||
<link rel="stylesheet" href="../css/loading.css">
|
||||
<link rel="stylesheet" href="../css/swiper.css">
|
||||
<link rel="stylesheet" href="../css/clear.css">
|
||||
<link rel="stylesheet" href="../css/public.css">
|
||||
<link rel="stylesheet" href="../css/search.css">
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<header class="search_input theme_color">
|
||||
<i class="iconfont icon-back1"></i>
|
||||
<input type="text" placeholder="请输入搜索关键字">
|
||||
<i class="iconfont icon-search"></i>
|
||||
</header>
|
||||
|
||||
<div class="content_theme1">
|
||||
<div class="search_list item_list padding_30">
|
||||
<ul>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
<script src="../js/config/index.js"></script>
|
||||
<script src="../js/utils/loading.js"></script>
|
||||
<script src="../js/utils/index.js"></script>
|
||||
<script src="../js/http/index.js"></script>
|
||||
<script src="../js/service/HomeService.js"></script>
|
||||
<script src="../js/page/search.js"></script>
|
||||
</html>
|
||||
39
h5_webview/app/src/main/assets/page/type_edit.html
Normal file
39
h5_webview/app/src/main/assets/page/type_edit.html
Normal file
@@ -0,0 +1,39 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="referrer" content="no-referrer" />
|
||||
<title>枸杞社</title>
|
||||
<script src="../js/utils/rem.js"></script>
|
||||
<link rel="stylesheet" href="http://at.alicdn.com/t/font_2124975_xz9sxo44gx.css">
|
||||
<link rel="stylesheet" href="../css/loading.css">
|
||||
<link rel="stylesheet" href="../css/swiper.css">
|
||||
<link rel="stylesheet" href="../css/clear.css">
|
||||
<link rel="stylesheet" href="../css/public.css">
|
||||
<link rel="stylesheet" href="../css/type_edit.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="header_theme1 theme_color">
|
||||
<div class="action">
|
||||
<i class="iconfont icon-back1"></i>
|
||||
<span>分类管理</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="content_theme1 padding_30">
|
||||
<div class="you_chioose chioose">
|
||||
<p>点击删除以下分类</p>
|
||||
<ul class="chiooseWrap"></ul>
|
||||
</div>
|
||||
<div class="chioose_list chioose">
|
||||
<p>点击添加以下分类</p>
|
||||
<ul class="chiooseWrap"></ul>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script src="../js/utils/index.js"></script>
|
||||
<script src="../js/page/type_edit.js"></script>
|
||||
|
||||
</html>
|
||||
68
h5_webview/app/src/main/assets/笔记.txt
Normal file
68
h5_webview/app/src/main/assets/笔记.txt
Normal file
@@ -0,0 +1,68 @@
|
||||
如何拿到异步ajax的返回数据?
|
||||
1:使用回调 x
|
||||
2:Promise
|
||||
|
||||
将异步操作转换为同步操作,
|
||||
优势:避免回调地狱,提高代码的可读性和精简性
|
||||
有三种状态:
|
||||
pending(进行中),
|
||||
resolved(完成),
|
||||
rejected(失败)
|
||||
|
||||
Promise使用过程中有两种获取数据的写法:
|
||||
|
||||
|
||||
1
|
||||
|
||||
xxxxx({ id:1, page:2 }).then((res)=>{
|
||||
console.log(res);
|
||||
}).catch(err=>{
|
||||
|
||||
})
|
||||
|
||||
then 拿正确的数据
|
||||
catch 拿错误的数据
|
||||
|
||||
2:
|
||||
|
||||
组合 async await
|
||||
|
||||
async function GetHomeList() {
|
||||
let a = await homeService.mechanism({})
|
||||
console.log(a);
|
||||
}
|
||||
|
||||
未完成
|
||||
|
||||
【完成】1:首页分类可以编辑 [带你们写]
|
||||
【完成】4:tabs 被点击进入列表页面 [带你们写,用mechanism_info列表,传入type做判断]
|
||||
【完成】5:收藏(功能实现,页面未写)
|
||||
【完成】6:关于我们 页面 [自己写]
|
||||
【完成】7:用户协议 [自己写]
|
||||
【完成】8:检测升级 [自己写]
|
||||
【完成】 9:清除缓存 [自己写,弹窗我来改造]
|
||||
【完成】10:详情页点击图片可以弹窗显示预览
|
||||
|
||||
我的任务
|
||||
1:机构页面的滚动加载更多
|
||||
|
||||
任务:
|
||||
1:模特详情 点击箭头加载更多数据
|
||||
【完成】2:首页搜索功能 /search
|
||||
【完成】3:收藏页面和列表渲染,点击a标签进入详情,长按删除收藏的写真,获取本地likeList,如果有数据显示列表如果没有数据,显示:暂无收藏
|
||||
|
||||
问题记录:
|
||||
解决从首页进入详情再返回首页,但是顶部横向菜单滚动位置不对
|
||||
|
||||
Tips.dialog({
|
||||
title: '测试标题',
|
||||
message: '代码写出来是给人看的东西',
|
||||
cancelText: '后悔了',
|
||||
confirmText: '很Ok啊',
|
||||
cancel: ()=> {
|
||||
console.log("你点击了取消按钮");
|
||||
},
|
||||
confirm: ()=> {
|
||||
console.log("你点击了确定按钮");
|
||||
}
|
||||
})
|
||||
69
h5_webview/app/src/main/assets/缩放.html
Normal file
69
h5_webview/app/src/main/assets/缩放.html
Normal file
@@ -0,0 +1,69 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<title>缩放</title>
|
||||
<style>
|
||||
#box {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background: red;
|
||||
margin-top: 100px;
|
||||
margin-left: 100px;
|
||||
transform-origin: center center;
|
||||
}
|
||||
|
||||
html,
|
||||
body {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
var c = 1;//先定义一个初始值
|
||||
var oBox = document.getElementById('box');
|
||||
document.addEventListener('touchstart', function (ev) {//手指点下
|
||||
var oldC = c;//把初始值放到oldC里面
|
||||
function getC(ev) {
|
||||
var x1 = ev.targetTouches[0].pageX;
|
||||
var y1 = ev.targetTouches[0].pageY;//两根手指缩放肯定需要两根手指,【0】第一根手指的Xy的坐标
|
||||
|
||||
var x2 = ev.targetTouches[1].pageX;//第二根手指的坐标
|
||||
var y2 = ev.targetTouches[1].pageY;
|
||||
|
||||
var a = x1 - x2;//第一根手指的pageX-第二根手指的pageX,这样正好是一个之间三角形 得到两个直角边;
|
||||
var b = y1 - y2;//同上
|
||||
return Math.sqrt(a * a + b * b)//已知两个直角边开平方得出 斜角边
|
||||
}
|
||||
if (ev.targetTouches.length == 2) {//判断是否是两根手指 是的话 把两根手指点上去的时候的 斜脚边的初始值 放到 downC里面
|
||||
var downC = getC(ev);
|
||||
}
|
||||
document.addEventListener('touchmove', function (ev) { //手指移动的时候
|
||||
if (ev.targetTouches.length == 2) {//判断移动的时候是否是两根手指
|
||||
c = getC(ev) / downC + oldC;//这个时候的getC(ev)是move时候的,用移动后的斜脚边的值除没移动的值加上他的初始值,
|
||||
oBox.style.webkitTransform = 'scale(' + c + ')';//通过scale----2D缩放转换
|
||||
}
|
||||
|
||||
}, false)
|
||||
|
||||
|
||||
|
||||
}, false)
|
||||
}, false)
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="box"></div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
33
h5_webview/app/src/main/assets/阻止事件冒泡.html
Normal file
33
h5_webview/app/src/main/assets/阻止事件冒泡.html
Normal file
@@ -0,0 +1,33 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Document</title>
|
||||
<style>
|
||||
.main {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
background: red;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<div class="main">
|
||||
<button>点我</button>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
<script>
|
||||
document.querySelector(".main").onclick = function () {
|
||||
alert("进入详情")
|
||||
}
|
||||
|
||||
document.querySelector("button").onclick = function (e) {
|
||||
console.log(e.stopPropagation());
|
||||
alert("点我")
|
||||
}
|
||||
</script>
|
||||
</html>
|
||||
1
h5_webview/app/src/main/java/.pydio
Normal file
1
h5_webview/app/src/main/java/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
c55b9f2b-999b-414b-a737-567c84eafcaf
|
||||
1
h5_webview/app/src/main/java/com/.pydio
Normal file
1
h5_webview/app/src/main/java/com/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
26ea301c-b4d7-47df-ac5d-c1346006c166
|
||||
1
h5_webview/app/src/main/java/com/caipu/.pydio
Normal file
1
h5_webview/app/src/main/java/com/caipu/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
a6b8cc5d-c486-4ed1-b6e6-5fafbe0a1569
|
||||
1
h5_webview/app/src/main/java/com/caipu/bmy/.pydio
Normal file
1
h5_webview/app/src/main/java/com/caipu/bmy/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
c759a447-3c57-4a41-a779-fbad9b085756
|
||||
1
h5_webview/app/src/main/java/com/caipu/bmy/cp/.pydio
Normal file
1
h5_webview/app/src/main/java/com/caipu/bmy/cp/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
60a28452-24f2-41ea-888a-0dbc0c72beea
|
||||
31
h5_webview/app/src/main/java/com/caipu/bmy/cp/AppAplication.java
Executable file
31
h5_webview/app/src/main/java/com/caipu/bmy/cp/AppAplication.java
Executable file
@@ -0,0 +1,31 @@
|
||||
package com.caipu.bmy.cp;
|
||||
|
||||
import android.app.Application;
|
||||
import android.util.Log;
|
||||
import com.tencent.smtt.sdk.QbSdk;
|
||||
|
||||
public class AppAplication extends Application {
|
||||
@Override
|
||||
public void onCreate() {
|
||||
// TODO Auto-generated method stub
|
||||
super.onCreate();
|
||||
//搜集本地tbs内核信息并上报服务器,服务器返回结果决定使用哪个内核。
|
||||
|
||||
QbSdk.PreInitCallback cb = new QbSdk.PreInitCallback() {
|
||||
|
||||
@Override
|
||||
public void onViewInitFinished(boolean arg0) {
|
||||
// TODO Auto-generated method stub
|
||||
//x5內核初始化完成的回调,为true表示x5内核加载成功,否则表示x5内核加载失败,会自动切换到系统内核。
|
||||
Log.d("app", " onViewInitFinished is " + arg0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCoreInitFinished() {
|
||||
// TODO Auto-generated method stub
|
||||
}
|
||||
};
|
||||
//x5内核初始化接口
|
||||
QbSdk.initX5Environment(getApplicationContext(), cb);
|
||||
}
|
||||
}
|
||||
354
h5_webview/app/src/main/java/com/caipu/bmy/cp/MainActivity.java
Executable file
354
h5_webview/app/src/main/java/com/caipu/bmy/cp/MainActivity.java
Executable file
@@ -0,0 +1,354 @@
|
||||
package com.caipu.bmy.cp;
|
||||
|
||||
import android.Manifest;
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.PendingIntent;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.database.Observable;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Environment;
|
||||
import android.provider.MediaStore;
|
||||
import android.support.v4.app.ActivityCompat;
|
||||
import android.support.v4.content.FileProvider;
|
||||
import android.util.Base64;
|
||||
import android.util.Log;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.View;
|
||||
|
||||
import com.tencent.smtt.export.external.interfaces.ClientCertRequest;
|
||||
import com.tencent.smtt.export.external.interfaces.SslError;
|
||||
import com.tencent.smtt.export.external.interfaces.SslErrorHandler;
|
||||
import com.tencent.smtt.export.external.interfaces.WebResourceRequest;
|
||||
import com.tencent.smtt.export.external.interfaces.WebResourceResponse;
|
||||
import com.tencent.smtt.sdk.WebChromeClient;
|
||||
import com.tencent.smtt.sdk.WebSettings;
|
||||
import android.widget.Toast;
|
||||
import com.caipu.bmy.cp.utils.X5WebView;
|
||||
import com.tencent.smtt.sdk.WebView;
|
||||
import com.tencent.smtt.sdk.WebViewClient;
|
||||
|
||||
import org.apache.http.Header;
|
||||
import org.apache.http.HttpResponse;
|
||||
import org.apache.http.client.ClientProtocolException;
|
||||
import org.apache.http.client.methods.HttpGet;
|
||||
import org.apache.http.impl.client.DefaultHttpClient;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
import java.net.URLConnection;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
|
||||
public class MainActivity extends Activity {
|
||||
|
||||
|
||||
private X5WebView webView;
|
||||
private long exitTime;
|
||||
private String picUrl;
|
||||
private String ImageFileName;
|
||||
private String WebViewTitle;
|
||||
private static final int REQUEST_EXTERNAL_STORAGE = 1;
|
||||
Bitmap bitmap;
|
||||
private static String[] PERMISSIONS_STORAGE = {
|
||||
Manifest.permission.READ_EXTERNAL_STORAGE,
|
||||
Manifest.permission.WRITE_EXTERNAL_STORAGE };
|
||||
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_main);
|
||||
webView = (X5WebView) findViewById(R.id.web_filechooser);
|
||||
webView.loadUrl("file:///android_asset/page/home.html");
|
||||
// 动态申请文件存储和SD卡的权限
|
||||
verifyStoragePermissions(MainActivity.this);
|
||||
|
||||
// 长按事件监听
|
||||
webView.setOnLongClickListener(new View.OnLongClickListener() {
|
||||
@Override
|
||||
public boolean onLongClick(View view) {
|
||||
final WebView.HitTestResult hitTestResult = webView.getHitTestResult();
|
||||
String url = webView.getUrl();
|
||||
String[] all= url.split("/page/");
|
||||
Log.d("url", all[1]);
|
||||
|
||||
// 如果是图片类型或者是带有图片链接的类型,并且不是like页面的话,那么弹窗
|
||||
if ((hitTestResult.getType() == WebView.HitTestResult.IMAGE_TYPE ||
|
||||
hitTestResult.getType() == WebView.HitTestResult.SRC_IMAGE_ANCHOR_TYPE)
|
||||
&& !all[1].equals("like.html")) {
|
||||
// 操作对话框
|
||||
AlertDialog.Builder b = new AlertDialog.Builder(MainActivity.this);
|
||||
b.setTitle("请选择你的操作:");
|
||||
// "3:分享链接给好友"
|
||||
b.setItems(new String[]{"1:保存图片到相册", "2:分享图片给好友", "3:分享链接给好友"}, (dialog, which) -> {
|
||||
picUrl = hitTestResult.getExtra();//获取图片
|
||||
switch (which) {
|
||||
case 0:
|
||||
//保存图片到相册
|
||||
new Thread(() -> url2bitmap(picUrl)).start();
|
||||
break;
|
||||
case 1:
|
||||
// 分享图片
|
||||
new Thread(() -> GetImageInputStream(picUrl)).start();
|
||||
break;
|
||||
case 2:
|
||||
// 分享链接
|
||||
new Thread(() -> {
|
||||
String ShareText = "1:你有一条新消息:你的好友从《水蜜桃》App给您分享了一张精美写真图片!\n\n2:写真集名称:"+WebViewTitle+"\n\n3:写真地址:http://103.91.219.114:3000/api/json/url?url="+picUrl+"\n\n4:H5访问写真集:http://103.91.219.114/page/"+all[1];
|
||||
//+"\n\n5:198万高清写真《水蜜桃》App等你下载,下载地址:http://www.baidu.com"
|
||||
ShareText(ShareText);
|
||||
}).start();
|
||||
break;
|
||||
}
|
||||
})
|
||||
.show();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
webView.setWebChromeClient(new WebChromeClient(){
|
||||
@Override
|
||||
public void onReceivedTitle(WebView view, String title) {
|
||||
super.onReceivedTitle(view, title);
|
||||
WebViewTitle = title;
|
||||
}
|
||||
});
|
||||
|
||||
webView.setWebViewClient(new WebViewClient(){
|
||||
@Override
|
||||
public WebResourceResponse shouldInterceptRequest(WebView view, String url) {
|
||||
Log.d("url", url);
|
||||
// 拦截网页中所有的请求,如果是图片的话
|
||||
if (url.indexOf("jpg") != -1 || url.indexOf("png") != -1 || url.indexOf("jpeg") != -1) {
|
||||
try {
|
||||
DefaultHttpClient client = new DefaultHttpClient();
|
||||
HttpGet httpGet = new HttpGet(url);
|
||||
// 手动增加请求头 Referer 字段,绕过目标网站Nginx的图片防盗链
|
||||
httpGet.setHeader("Referer", "https://www.tujigu.com/");
|
||||
HttpResponse httpReponse = client.execute(httpGet);
|
||||
Header contentType = httpReponse.getEntity().getContentType();
|
||||
Header encoding = httpReponse.getEntity().getContentEncoding();
|
||||
InputStream responseInputStream = httpReponse.getEntity().getContent();
|
||||
String contentTypeValue = null;
|
||||
String encodingValue = null;
|
||||
if (contentType != null) {
|
||||
contentTypeValue = contentType.getValue();
|
||||
}
|
||||
if (encoding != null) {
|
||||
encodingValue = encoding.getValue();
|
||||
}
|
||||
return new WebResourceResponse(contentTypeValue, encodingValue, responseInputStream);
|
||||
} catch (ClientProtocolException e) {
|
||||
//return null to tell WebView we failed to fetch it WebView should try again.
|
||||
return null;
|
||||
} catch (IOException e) {
|
||||
//return null to tell WebView we failed to fetch it WebView should try again.
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageFinished(WebView view, String url) {
|
||||
super.onPageFinished(view, url);
|
||||
webView.getSettings().setBlockNetworkImage(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
||||
if (url.startsWith("weixin://wap/pay?")) {
|
||||
Intent intent = new Intent();
|
||||
intent.setAction(Intent.ACTION_VIEW);
|
||||
intent.setData(Uri.parse(url));
|
||||
startActivity(intent);
|
||||
return true;
|
||||
}
|
||||
return super.shouldOverrideUrlLoading(view, url);
|
||||
}
|
||||
|
||||
//加载https时候,接受所有证书
|
||||
@Override
|
||||
public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
|
||||
handler.proceed();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 分享图片
|
||||
* @param imageurl
|
||||
*/
|
||||
public void GetImageInputStream(String imageurl) {
|
||||
URL url;
|
||||
HttpURLConnection connection = null;
|
||||
Bitmap bitmap = null;
|
||||
try {
|
||||
url = new URL(imageurl);
|
||||
connection = (HttpURLConnection) url.openConnection();
|
||||
connection.setRequestProperty("Referer", "https://www.tujigu.com/");
|
||||
connection.setConnectTimeout(6000); //超时设置
|
||||
connection.setDoInput(true);
|
||||
connection.setUseCaches(false); //设置不使用缓存
|
||||
InputStream inputStream = connection.getInputStream();
|
||||
bitmap = BitmapFactory.decodeStream(inputStream);
|
||||
inputStream.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
shareSingleImage(bitmap);
|
||||
}
|
||||
|
||||
//分享文字
|
||||
public void ShareText(String Text) {
|
||||
Intent shareIntent = new Intent();
|
||||
shareIntent.setAction(Intent.ACTION_SEND);
|
||||
shareIntent.putExtra(Intent.EXTRA_TEXT, Text);
|
||||
shareIntent.setType("text/plain");
|
||||
|
||||
//设置分享列表的标题,并且每次都显示分享列表
|
||||
startActivity(Intent.createChooser(shareIntent, "分享到"));
|
||||
}
|
||||
|
||||
public void shareSingleImage(Bitmap bitmap) {
|
||||
//由文件得到uri
|
||||
Uri imageUri = Uri.parse(MediaStore.Images.Media.insertImage(this.getContentResolver(), bitmap, null, null));
|
||||
Intent shareIntent = new Intent();
|
||||
shareIntent.setAction(Intent.ACTION_SEND);
|
||||
shareIntent.putExtra(Intent.EXTRA_STREAM, imageUri);
|
||||
shareIntent.setType("image/*");
|
||||
startActivity(Intent.createChooser(shareIntent, "分享到"));
|
||||
}
|
||||
|
||||
public void url2bitmap(String url) {
|
||||
Bitmap bm = null;
|
||||
try {
|
||||
URL iconUrl = new URL(url);
|
||||
URLConnection conn = iconUrl.openConnection();
|
||||
// 下载图片的时候设置请求头绕过防盗链限制
|
||||
conn.setRequestProperty("Referer", "https://www.tujigu.com/");
|
||||
HttpURLConnection http = (HttpURLConnection) conn;
|
||||
int length = http.getContentLength();
|
||||
conn.connect();
|
||||
// 获得图像的字符流
|
||||
InputStream is = conn.getInputStream();
|
||||
BufferedInputStream bis = new BufferedInputStream(is, length);
|
||||
bm = BitmapFactory.decodeStream(bis);
|
||||
bis.close();
|
||||
is.close();
|
||||
if (bm != null) {
|
||||
save2Album(bm);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(MainActivity.this, "获取图片文件流失败", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public static void verifyStoragePermissions(Activity activity) {
|
||||
// Check if we have write permission
|
||||
int permission = ActivityCompat.checkSelfPermission(activity,
|
||||
Manifest.permission.WRITE_EXTERNAL_STORAGE);
|
||||
if (permission != PackageManager.PERMISSION_GRANTED) {
|
||||
// We don't have permission so prompt the user
|
||||
ActivityCompat.requestPermissions(activity, PERMISSIONS_STORAGE,
|
||||
REQUEST_EXTERNAL_STORAGE);
|
||||
}
|
||||
}
|
||||
|
||||
private void save2Album(Bitmap bitmap) {
|
||||
File appDir = new File(Environment.getExternalStorageDirectory(), Environment.DIRECTORY_DCIM);
|
||||
if (!appDir.exists()) appDir.mkdir();
|
||||
String[] str = picUrl.split("/");
|
||||
ImageFileName = "水蜜桃_"+System.currentTimeMillis()+"_"+str[str.length - 1];
|
||||
File file = new File(appDir, ImageFileName);
|
||||
try {
|
||||
FileOutputStream fos = new FileOutputStream(file);
|
||||
bitmap.compress(Bitmap.CompressFormat.JPEG, 100, fos);
|
||||
fos.flush();
|
||||
fos.close();
|
||||
onSaveSuccess(file);
|
||||
} catch (IOException e) {
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(MainActivity.this, "保存图片失败", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
private void onSaveSuccess(final File file) {
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, Uri.fromFile(file)));
|
||||
Toast.makeText(MainActivity.this, "图片:"+ImageFileName+" 成功保存到相册!", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean onKeyDown(int keyCode, KeyEvent event) {
|
||||
if ((keyCode == KeyEvent.KEYCODE_BACK)) {
|
||||
if (webView.canGoBack()) {
|
||||
webView.goBack();//返回上一页面
|
||||
return false;
|
||||
} else {
|
||||
|
||||
if (System.currentTimeMillis() - exitTime > 2000) {
|
||||
Toast.makeText(getApplicationContext(), "再按一次退出程序", Toast.LENGTH_SHORT).show();
|
||||
exitTime = System.currentTimeMillis();
|
||||
} else {
|
||||
finish();
|
||||
System.exit(0);
|
||||
android.os.Process.killProcess(android.os.Process.myPid());
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}else {
|
||||
return super.onKeyDown(keyCode, event);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 确保注销配置能够被释放
|
||||
*/
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
// TODO Auto-generated method stub
|
||||
if (this.webView != null) {
|
||||
webView.destroy();
|
||||
}
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
b8b34a05-c366-4059-8378-949370f8b470
|
||||
60
h5_webview/app/src/main/java/com/caipu/bmy/cp/utils/X5WebView.java
Executable file
60
h5_webview/app/src/main/java/com/caipu/bmy/cp/utils/X5WebView.java
Executable file
@@ -0,0 +1,60 @@
|
||||
package com.caipu.bmy.cp.utils;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.widget.TextView;
|
||||
import com.tencent.smtt.sdk.WebSettings;
|
||||
import com.tencent.smtt.sdk.WebSettings.LayoutAlgorithm;
|
||||
import com.tencent.smtt.sdk.WebView;
|
||||
import com.tencent.smtt.sdk.WebViewClient;
|
||||
|
||||
public class X5WebView extends WebView {
|
||||
TextView title;
|
||||
private WebViewClient client = new WebViewClient() {
|
||||
/**
|
||||
* 防止加载网页时调起系统浏览器
|
||||
*/
|
||||
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
||||
view.loadUrl(url);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
@SuppressLint("SetJavaScriptEnabled")
|
||||
public X5WebView(Context arg0, AttributeSet arg1) {
|
||||
super(arg0, arg1);
|
||||
this.setWebViewClient(client);
|
||||
// this.setWebChromeClient(chromeClient);
|
||||
// WebStorage webStorage = WebStorage.getInstance();
|
||||
initWebViewSettings();
|
||||
this.getView().setClickable(true);
|
||||
}
|
||||
|
||||
private void initWebViewSettings() {
|
||||
WebSettings webSetting = this.getSettings();
|
||||
webSetting.setJavaScriptEnabled(true);
|
||||
webSetting.setJavaScriptCanOpenWindowsAutomatically(true);
|
||||
webSetting.setAllowFileAccess(true);
|
||||
webSetting.setLayoutAlgorithm(LayoutAlgorithm.NARROW_COLUMNS);
|
||||
webSetting.setSupportZoom(false);
|
||||
webSetting.setBuiltInZoomControls(false);
|
||||
webSetting.setUseWideViewPort(true);
|
||||
webSetting.setSupportMultipleWindows(true);
|
||||
webSetting.setLoadWithOverviewMode(true);
|
||||
webSetting.setAppCacheEnabled(true);
|
||||
webSetting.setDomStorageEnabled(true);
|
||||
webSetting.setGeolocationEnabled(true);
|
||||
webSetting.setAppCacheMaxSize(Long.MAX_VALUE);
|
||||
webSetting.setPluginState(WebSettings.PluginState.ON_DEMAND);
|
||||
webSetting.setRenderPriority(WebSettings.RenderPriority.HIGH);
|
||||
webSetting.setCacheMode(WebSettings.LOAD_DEFAULT);
|
||||
webSetting.setBlockNetworkImage(true);
|
||||
}
|
||||
|
||||
public X5WebView(Context arg0) {
|
||||
super(arg0);
|
||||
setBackgroundColor(85621);
|
||||
}
|
||||
|
||||
}
|
||||
1
h5_webview/app/src/main/jniLibs/.pydio
Normal file
1
h5_webview/app/src/main/jniLibs/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
8575fb85-a028-4134-a10f-b89132573160
|
||||
1
h5_webview/app/src/main/jniLibs/armeabi/.pydio
Normal file
1
h5_webview/app/src/main/jniLibs/armeabi/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
63ff954b-0202-4d2d-8a58-9480e142bb02
|
||||
BIN
h5_webview/app/src/main/jniLibs/armeabi/liblbs.so
Executable file
BIN
h5_webview/app/src/main/jniLibs/armeabi/liblbs.so
Executable file
Binary file not shown.
1
h5_webview/app/src/main/res/.pydio
Normal file
1
h5_webview/app/src/main/res/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
d5e0a3fb-69b9-44f9-b05e-c3bee6b097ab
|
||||
1
h5_webview/app/src/main/res/drawable-v24/.pydio
Normal file
1
h5_webview/app/src/main/res/drawable-v24/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
90a2f162-dfda-4170-9dcc-76e4dfd6623b
|
||||
34
h5_webview/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
Executable file
34
h5_webview/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
Executable file
@@ -0,0 +1,34 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:aapt="http://schemas.android.com/aapt"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportHeight="108"
|
||||
android:viewportWidth="108">
|
||||
<path
|
||||
android:fillType="evenOdd"
|
||||
android:pathData="M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z"
|
||||
android:strokeColor="#00000000"
|
||||
android:strokeWidth="1">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:endX="78.5885"
|
||||
android:endY="90.9159"
|
||||
android:startX="48.7653"
|
||||
android:startY="61.0927"
|
||||
android:type="linear">
|
||||
<item
|
||||
android:color="#44000000"
|
||||
android:offset="0.0"/>
|
||||
<item
|
||||
android:color="#00000000"
|
||||
android:offset="1.0"/>
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:fillType="nonZero"
|
||||
android:pathData="M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z"
|
||||
android:strokeColor="#00000000"
|
||||
android:strokeWidth="1"/>
|
||||
</vector>
|
||||
1
h5_webview/app/src/main/res/drawable/.pydio
Normal file
1
h5_webview/app/src/main/res/drawable/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
7813e170-1425-4c71-8dd4-59a160703d5b
|
||||
@@ -0,0 +1,11 @@
|
||||
<vector android:height="48dp" android:viewportHeight="1024"
|
||||
android:viewportWidth="1024" android:width="48dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#F59CBA" android:pathData="M607.03,27.34c40.14,12.03 78.39,35.28 89.65,70.5 8.96,28.01 83.81,67.23 104.19,93.34 29.18,37.43 67.74,81.92 87.65,125.24 39.12,84.68 37.58,190.16 18.79,281.6 -34.66,168.96 -181.25,204.8 -341.4,173.36 -262.91,51.51 -412.11,4.1 -453.99,-210.94 -41.47,-212.99 50.18,-463.16 428.08,-542.92a225.28,225.28 0,0 1,67.02 9.83zM621.16,16.03"/>
|
||||
<path android:fillColor="#FF000000" android:pathData="M632.93,808.6a680.6,680.6 0,0 1,-124.88 -12.65c-138.8,26.01 -246.37,11.78 -319.9,-42.29 -62,-45.67 -99.12,-119.19 -110.39,-218.62 -13.57,-119.71 15.36,-232.45 84.28,-326.09 70.91,-96.67 179.2,-165.27 313.4,-198.4l1.69,-0.31 22.32,-2.87a494.23,494.23 0,0 1,60.98 0.87C645.12,19.56 695.19,47 716.8,94.41c161.38,98.82 242.07,259.12 221.59,440.32 -11.26,99.43 -48.44,173 -110.44,218.68 -49.72,36.81 -115,55.19 -195.02,55.19zM508.06,764.67l2.87,0.56c131.43,25.09 231.94,12.85 298.75,-36.3 54.84,-40.4 87.86,-106.8 98.15,-197.38 19.25,-170.55 -57.7,-321.23 -211.1,-413.34l-4.4,-2.66 -1.95,-4.76c-15.77,-39.12 -58.37,-62.05 -133.99,-72.14a485.68,485.68 0,0 0,-55.09 -0.61l-19.3,2.56c-126.62,31.44 -228.71,95.9 -295.17,186.47C122.88,314.37 95.64,419.84 108.29,531.56c10.24,90.57 43.26,156.98 98.1,197.38 66.82,49.2 167.37,61.44 298.75,36.35z"/>
|
||||
<path android:fillColor="#8FC96D" android:pathData="M505.19,781.52c-0.72,39.73 -12.19,90.32 -45.26,129.74 -59.8,71.27 -162.15,83.81 -184.78,64.87s-28.01,-121.91 32.05,-193.13l1.48,-1.74q81.31,19.46 196.71,0.31zM505.19,781.52"/>
|
||||
<path android:fillColor="#205328" android:pathData="M500.02,766.87a11.37,11.37 0,0 1,7.42 19.92l-149.35,129.23a11.37,11.37 0,0 1,-14.85 -17.15l149.35,-129.18a11.32,11.32 0,0 1,7.42 -2.76zM500.02,766.87"/>
|
||||
<path android:fillColor="#8FC96D" android:pathData="M543.23,798.72q70.14,12.13 119.5,0l0.92,1.13c36.35,45.11 33.08,110.28 19.3,122.32s-75.93,4.04 -112.23,-40.96c-20.07,-25.04 -27.03,-57.04 -27.49,-82.18zM543.23,798.72"/>
|
||||
<path android:fillColor="#205328" android:pathData="M551.32,786.43a11.32,11.32 0,0 1,7.53 2.87l81.92,72.6a11.37,11.37 0,0 1,-15.05 17l-81.92,-72.6a11.37,11.37 0,0 1,7.53 -19.81zM551.32,786.43"/>
|
||||
<path android:fillColor="#FF000000" android:pathData="M657.31,454.6c9.32,69.43 16.03,147.05 -17.87,211.2 -25.24,47.77 -75.26,103.07 -135.07,86.73 -19.1,-5.12 -27.24,24.42 -8.19,29.64 67.12,18.33 125.39,-30.05 159.59,-83.46 46.64,-72.76 43.26,-161.64 32.2,-244.07 -2.56,-19.3 -33.33,-19.56 -30.72,0z"/>
|
||||
<path android:fillColor="#FF000000" android:pathData="M299.42,1003.88c-19.4,0 -35.02,-3.89 -43.67,-11.16 -14.95,-12.49 -19.35,-39.22 -20.48,-54.07a228.04,228.04 0,0 1,50.64 -160.77l7.68,-9.01 9.16,2.2c52.02,12.44 116.22,12.44 190.92,0l18.23,-3.02 -0.31,18.43c-0.92,52.68 -18.79,103.48 -48.95,139.37 -46.13,54.73 -115.92,78.03 -163.23,78.03zM304.84,803.07a200.19,200.19 0,0 0,-39.17 133.12c1.95,22.12 7.68,31.44 9.78,33.18 13.57,11.32 106.8,4.4 163.43,-62.98 28.57,-34 37.73,-75.16 40.55,-101.79 -66.46,9.16 -125.08,8.76 -174.59,-1.54zM662.84,942.08c-2.97,0 -5.84,0 -8.55,-0.41a143.36,143.36 0,0 1,-95.54 -51.2,152.63 152.63,0 0,1 -30.72,-91.55l-0.67,-18.64 18.28,3.17c44.39,7.68 82.48,7.68 113.15,0l9.42,-2.36 7.07,8.6c40.09,49.77 39.27,124.67 17.56,143.62 -7.68,6.96 -19.46,8.76 -30,8.76zM560.44,816.59a114.94,114.94 0,0 0,22.53 54.48c30.72,38.3 80.64,43.47 90.11,39.01 5.84,-8.55 10.24,-56.32 -16.38,-94.62a303.1,303.1 0,0 1,-96.51 1.23z"/>
|
||||
</vector>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user