新增隐么协议
parent
445875d454
commit
90b95caf38
File diff suppressed because one or more lines are too long
@ -0,0 +1,41 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>Title</title>
|
||||||
|
|
||||||
|
<script type="text/javascript" src="file:///android_asset/js/jquery-1.8.3.min.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
$(function(){
|
||||||
|
var data = myObj.getData();
|
||||||
|
var time = myObj.getTime();
|
||||||
|
dataHighchartXdDt(data,time);
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
function test(){
|
||||||
|
var data = myObj.getData();
|
||||||
|
var time = myObj.getTime();
|
||||||
|
$('#container').html(time);
|
||||||
|
}
|
||||||
|
//心电
|
||||||
|
function dataHighchartXdDt(data,time){
|
||||||
|
//以下是绘制心电的逻辑
|
||||||
|
//省略
|
||||||
|
$('#container').html(time);
|
||||||
|
}
|
||||||
|
function setDeviceData(data){
|
||||||
|
$('#container').html(data);
|
||||||
|
}
|
||||||
|
function receiveNfcData(nfc){
|
||||||
|
$('#container').html(nfc);
|
||||||
|
alert(nfc);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<button onclick="test()">点我吧</button>
|
||||||
|
<div id="container"></div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@ -0,0 +1,36 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>Title</title>
|
||||||
|
|
||||||
|
<script type="text/javascript" src="file:///android_asset/js/jquery-1.8.3.min.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
//H5调用安卓获取数据
|
||||||
|
function getDataFromAndroid(){
|
||||||
|
var data = androidObj.getData();
|
||||||
|
var time = androidObj.getTime();
|
||||||
|
$('#container').html(time);
|
||||||
|
}
|
||||||
|
//下发指令
|
||||||
|
function commandOperation(command){
|
||||||
|
var data = androidObj.commandOperation(command);
|
||||||
|
$('#container').html(time);
|
||||||
|
}
|
||||||
|
//读取NFC接收到的数据
|
||||||
|
function receiveNfcData(nfc){
|
||||||
|
$('#container').html(nfc);
|
||||||
|
alert(nfc);
|
||||||
|
//处理逻辑
|
||||||
|
|
||||||
|
//下发指令 '开锁'
|
||||||
|
commandOperation('开锁');
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<button onclick="getDataFromAndroid()">点我吧,H5调用安卓获取数据</button>
|
||||||
|
<div id="container"></div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@ -0,0 +1,41 @@
|
|||||||
|
package com.rehome.zhdcoa.ui.activity
|
||||||
|
|
||||||
|
import android.content.Intent
|
||||||
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
|
import android.os.Bundle
|
||||||
|
import com.rehome.zhdcoa.R
|
||||||
|
import com.rehome.zhdcoa.base.BaseActivityOaToolbarViewBinding
|
||||||
|
import com.rehome.zhdcoa.databinding.ActivityAboutMeBinding
|
||||||
|
import com.rehome.zhdcoa.databinding.ActivityApplyAboutMeBinding
|
||||||
|
import com.rehome.zhdcoa.weiget.OAToolbar
|
||||||
|
|
||||||
|
class AboutMeActivity : BaseActivityOaToolbarViewBinding<ActivityAboutMeBinding>() {
|
||||||
|
|
||||||
|
override fun getViewBinding() = ActivityAboutMeBinding.inflate(layoutInflater)
|
||||||
|
|
||||||
|
override fun getToolbar() = binding.toolbarView.toolbar
|
||||||
|
override fun initView() {
|
||||||
|
initToolbar("关于我们")
|
||||||
|
setLeftOnClickListener { finish() }
|
||||||
|
|
||||||
|
binding.tvServiceAgreement.setOnClickListener {
|
||||||
|
val intent = Intent(this, ServiceAgreementActivity::class.java)
|
||||||
|
startActivity(intent)
|
||||||
|
}
|
||||||
|
|
||||||
|
binding.tvPrivacy.setOnClickListener {
|
||||||
|
val intent = Intent(this, PrivacyAgreementActivity::class.java)
|
||||||
|
startActivity(intent)
|
||||||
|
}
|
||||||
|
|
||||||
|
binding.tvPrivateInfo.setOnClickListener {
|
||||||
|
val intent = Intent(this, CollectPrivateInfoActivity::class.java)
|
||||||
|
startActivity(intent)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun initData() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
package com.rehome.zhdcoa.ui.activity
|
||||||
|
|
||||||
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
|
import android.os.Bundle
|
||||||
|
import com.rehome.zhdcoa.R
|
||||||
|
import com.rehome.zhdcoa.base.BaseActivityOaToolbarViewBinding
|
||||||
|
import com.rehome.zhdcoa.databinding.ActivityAboutMeBinding
|
||||||
|
import com.rehome.zhdcoa.databinding.ActivityCollectPrivateInfoBinding
|
||||||
|
import com.rehome.zhdcoa.databinding.ActivityServiceAgreementBinding
|
||||||
|
import com.rehome.zhdcoa.weiget.OAToolbar
|
||||||
|
|
||||||
|
class CollectPrivateInfoActivity : BaseActivityOaToolbarViewBinding<ActivityCollectPrivateInfoBinding>() {
|
||||||
|
override fun getViewBinding() = ActivityCollectPrivateInfoBinding.inflate(layoutInflater)
|
||||||
|
|
||||||
|
override fun getToolbar() = binding.toolbarView.toolbar
|
||||||
|
|
||||||
|
override fun initView() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun initData() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,71 @@
|
|||||||
|
package com.rehome.zhdcoa.ui.activity
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint
|
||||||
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.view.View
|
||||||
|
import android.webkit.WebChromeClient
|
||||||
|
import android.webkit.WebSettings
|
||||||
|
import android.webkit.WebView
|
||||||
|
import android.webkit.WebViewClient
|
||||||
|
import com.rehome.zhdcoa.R
|
||||||
|
import com.rehome.zhdcoa.base.BaseActivityOaToolbarViewBinding
|
||||||
|
import com.rehome.zhdcoa.databinding.ActivityAboutMeBinding
|
||||||
|
import com.rehome.zhdcoa.databinding.ActivityPrivacyAgreementBinding
|
||||||
|
import com.rehome.zhdcoa.databinding.ActivityServiceAgreementBinding
|
||||||
|
import com.rehome.zhdcoa.weiget.OAToolbar
|
||||||
|
|
||||||
|
class PrivacyAgreementActivity : BaseActivityOaToolbarViewBinding<ActivityPrivacyAgreementBinding>() {
|
||||||
|
private var url = "file:///android_asset/privacy_agreement.html"
|
||||||
|
override fun getViewBinding() = ActivityPrivacyAgreementBinding.inflate(layoutInflater)
|
||||||
|
|
||||||
|
override fun getToolbar() = binding.toolbarView.toolbar
|
||||||
|
override fun initView() {
|
||||||
|
initToolbar("隐私保护")
|
||||||
|
setLeftOnClickListener { finish() }
|
||||||
|
|
||||||
|
val settings: WebSettings = binding.webView.settings
|
||||||
|
settings.javaScriptEnabled = true
|
||||||
|
settings.javaScriptCanOpenWindowsAutomatically = true
|
||||||
|
settings.setSupportMultipleWindows(true)
|
||||||
|
|
||||||
|
binding.webView.webViewClient = WebViewClient()
|
||||||
|
binding.webView.webChromeClient = object : WebChromeClient() {
|
||||||
|
override fun onProgressChanged(view: WebView, newProgress: Int) {
|
||||||
|
super.onProgressChanged(view, newProgress)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
binding.webView.loadUrl(url)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun initData() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressLint("SetJavaScriptEnabled")
|
||||||
|
override fun onResume() {
|
||||||
|
super.onResume()
|
||||||
|
binding.webView.settings.javaScriptEnabled = true
|
||||||
|
binding.webView.onResume()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onPause() {
|
||||||
|
super.onPause()
|
||||||
|
binding.webView.onPause()
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onStop() {
|
||||||
|
super.onStop()
|
||||||
|
//挂在后台 资源释放
|
||||||
|
binding.webView.settings.javaScriptEnabled = false
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onDestroy() {
|
||||||
|
binding.webView.visibility = View.GONE
|
||||||
|
binding.webView.destroy()
|
||||||
|
super.onDestroy()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,71 @@
|
|||||||
|
package com.rehome.zhdcoa.ui.activity
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint
|
||||||
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.view.View
|
||||||
|
import android.webkit.WebChromeClient
|
||||||
|
import android.webkit.WebSettings
|
||||||
|
import android.webkit.WebView
|
||||||
|
import android.webkit.WebViewClient
|
||||||
|
import com.rehome.zhdcoa.R
|
||||||
|
import com.rehome.zhdcoa.base.BaseActivityOaToolbarViewBinding
|
||||||
|
import com.rehome.zhdcoa.databinding.ActivityAboutMeBinding
|
||||||
|
import com.rehome.zhdcoa.databinding.ActivityServiceAgreementBinding
|
||||||
|
import com.rehome.zhdcoa.weiget.OAToolbar
|
||||||
|
|
||||||
|
class ServiceAgreementActivity : BaseActivityOaToolbarViewBinding<ActivityServiceAgreementBinding>() {
|
||||||
|
private var url = "file:///android_asset/service_agreement.html"
|
||||||
|
override fun getViewBinding() = ActivityServiceAgreementBinding.inflate(layoutInflater)
|
||||||
|
|
||||||
|
override fun getToolbar() = binding.toolbarView.toolbar
|
||||||
|
|
||||||
|
override fun initView() {
|
||||||
|
initToolbar("服务协议")
|
||||||
|
setLeftOnClickListener { finish() }
|
||||||
|
|
||||||
|
val settings: WebSettings = binding.webView.settings
|
||||||
|
settings.javaScriptEnabled = true
|
||||||
|
settings.javaScriptCanOpenWindowsAutomatically = true
|
||||||
|
settings.setSupportMultipleWindows(true)
|
||||||
|
|
||||||
|
binding.webView.webViewClient = WebViewClient()
|
||||||
|
binding.webView.webChromeClient = object : WebChromeClient() {
|
||||||
|
override fun onProgressChanged(view: WebView, newProgress: Int) {
|
||||||
|
super.onProgressChanged(view, newProgress)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
binding.webView.loadUrl(url)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun initData() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressLint("SetJavaScriptEnabled")
|
||||||
|
override fun onResume() {
|
||||||
|
super.onResume()
|
||||||
|
binding.webView.settings.javaScriptEnabled = true
|
||||||
|
binding.webView.onResume()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onPause() {
|
||||||
|
super.onPause()
|
||||||
|
binding.webView.onPause()
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onStop() {
|
||||||
|
super.onStop()
|
||||||
|
//挂在后台 资源释放
|
||||||
|
binding.webView.settings.javaScriptEnabled = false
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onDestroy() {
|
||||||
|
binding.webView.visibility = View.GONE
|
||||||
|
binding.webView.destroy()
|
||||||
|
super.onDestroy()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,69 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical"
|
||||||
|
tools:context=".ui.activity.AboutMeActivity">
|
||||||
|
|
||||||
|
<include
|
||||||
|
android:id="@+id/toolbarView"
|
||||||
|
layout="@layout/layout_base" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="25px" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_serviceAgreement"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="100px"
|
||||||
|
android:background="@drawable/selector_list_item"
|
||||||
|
android:drawableRight="@drawable/packup"
|
||||||
|
android:drawablePadding="40px"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:padding="20px"
|
||||||
|
android:text="服务协议"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="30px" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="25px" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_privacy"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="100px"
|
||||||
|
android:background="@drawable/selector_list_item"
|
||||||
|
android:drawableRight="@drawable/packup"
|
||||||
|
android:drawablePadding="40px"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:padding="20px"
|
||||||
|
android:text="隐私协议"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="30px" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="25px" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_private_info"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="100px"
|
||||||
|
android:background="@drawable/selector_list_item"
|
||||||
|
android:drawableRight="@drawable/packup"
|
||||||
|
android:drawablePadding="40px"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:padding="20px"
|
||||||
|
android:text="收集个人信息明示清单"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="30px" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
@ -0,0 +1,69 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical"
|
||||||
|
tools:context=".ui.activity.CollectPrivateInfoActivity">
|
||||||
|
|
||||||
|
<include
|
||||||
|
android:id="@+id/toolbarView"
|
||||||
|
layout="@layout/layout_base" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="25px" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_serviceAgreement"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="100px"
|
||||||
|
android:background="@drawable/selector_list_item"
|
||||||
|
android:drawableRight="@drawable/packup"
|
||||||
|
android:drawablePadding="40px"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:padding="20px"
|
||||||
|
android:text="服务协议"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="30px" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="25px" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_privacy"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="100px"
|
||||||
|
android:background="@drawable/selector_list_item"
|
||||||
|
android:drawableRight="@drawable/packup"
|
||||||
|
android:drawablePadding="40px"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:padding="20px"
|
||||||
|
android:text="隐私协议"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="30px" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="25px" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_private_info"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="100px"
|
||||||
|
android:background="@drawable/selector_list_item"
|
||||||
|
android:drawableRight="@drawable/packup"
|
||||||
|
android:drawablePadding="40px"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:padding="20px"
|
||||||
|
android:text="收集个人信息明示清单"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="30px" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
@ -0,0 +1,24 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical"
|
||||||
|
tools:context=".ui.activity.PrivacyAgreementActivity">
|
||||||
|
|
||||||
|
<include
|
||||||
|
android:id="@+id/toolbarView"
|
||||||
|
layout="@layout/layout_base" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<WebView
|
||||||
|
android:id="@+id/webView"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
@ -0,0 +1,24 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical"
|
||||||
|
tools:context=".ui.activity.ServiceAgreementActivity">
|
||||||
|
|
||||||
|
<include
|
||||||
|
android:id="@+id/toolbarView"
|
||||||
|
layout="@layout/layout_base" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<WebView
|
||||||
|
android:id="@+id/webView"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
Loading…
Reference in New Issue