Commit 6d296437 by 王君

update files

parent 19712671
......@@ -206,7 +206,7 @@
this.isMoreCache = true;
}
}*/
if(this.isMoreCache){
if(app.isMoreCache){
//moreList = this.setModelLocalIcon(moreList);
$api.setStorage('morelists',moreList);
}
......@@ -276,11 +276,12 @@
this.$nextTick(function () {
/* 设置顶部安全区域,解决状态栏沉浸式 和 刘海屏问题 */
});
this.init();
this.setTopModels();
this.setHomeModels();
}
});
app.init();
app.setTopModels();
app.setHomeModels();
}
</script>
</body>
......
......@@ -117,7 +117,6 @@
},
toDirect: function(param,l){
console.log(param);
console.log(l);
openmodulelink(param,l);
},
});
......
......@@ -415,9 +415,9 @@
up_loading(ret.path)
})
}
if(index == 3) {
/*if(index == 3) {
post_video()
}
}*/
});
}
//准备上传图片
......
......@@ -11,6 +11,10 @@
body{
padding: 0px;
margin: 0px;
background-color: #fff;
}
[v-cloak]{
display: none;
}
#privacy_policy{
/*padding: 1em;*/
......@@ -20,6 +24,10 @@
overflow-y: auto;
padding-left: 1em;
padding-right: 1em;
background: #fff;
}
.content_text{
padding-bottom: 6em;
}
#header{
background-color: #3D60F6;
......@@ -27,7 +35,11 @@
}
.buttons{
padding: 1em;
padding-bottom: 2em;
padding-bottom: 1em;
position: fixed;
bottom: 0;
width: 100%;
background: #fff;
}
.btnitem{
text-align: center;
......@@ -39,7 +51,7 @@
.btnitem .btn1{
color: #fff;
background-image: linear-gradient(to right,#4AA6FF ,#3764FF);
padding: 0.2em 2.3em;
padding: 0.2em 10%;
border-radius: 100px;
font-size: 14px;
}
......@@ -53,28 +65,49 @@
.loading{
margin-top: 50%;
}
.header_img{
width: 100%;
height: 4em;
}
.title{
text-align: center;
color: #262626;
background: #fff;
font-size: 16px;
padding-top: 1em;
padding-bottom: 1em;
}
#header_div{
display: flex;
top:0;
}
</style>
</head>
<body>
<div id="privacy_policy">
<van-loading v-if="isLoading" size="24px" vertical class="loading">加载中...</van-loading>
<div v-if="!isLoading">
<van-sticky :offset-top="0">
<header id="header"></header>
<van-nav-bar :title="title"/>
</van-sticky>
<van-row>
<van-col span="24" v-html="content" class="content">
<div id="privacy_policy" v-cloak>
<van-sticky offset-top="0" id="header_div">
<header id="header"></header>
<van-row class="header_img">
<van-col span="24">
<van-image fit="contain" src="../image/privacy_policy_header_img.png" loading-icon="../image/default.png"/>
</van-col>
</van-row>
<div id="buttons" class="buttons">
<div class="btnitem btnitem1">
<a href="javascript:goto();" class="btn btn1" @click="agree">同意并继续</a>
</div>
<div class="btnitem">
<a href="javascript:goto();" class="btn btn2" @click="disagree">退出应用</a>
</div>
</van-sticky>
<van-loading v-if="isLoading" size="24px" vertical class="loading">加载中...</van-loading>
<van-sticky :offset-top="0">
<div class="title" id="title">隐私协议</div>
</van-sticky>
<div class="content" id="content">
<div v-if="!isLoading">
<div v-html="content" class="content_text"></div>
</div>
</div>
<div id="buttons" class="buttons">
<div class="btnitem btnitem1">
<a href="javascript:;" class="btn btn1" @click="agree">同意并继续</a>
</div>
<div class="btnitem">
<a href="javascript:;" class="btn btn2" @click="disagree">退出应用</a>
</div>
</div>
</div>
......@@ -98,33 +131,61 @@
isLoading:true,
headerHeight:0
},
watch:{
isLoading:function (newQuestion, oldQuestion) {
if(!newQuestion){
var body_h=api.frameHeight;
var header_h=$('#header_div').height();
var buttons_h=$('#buttons').height();
var title_h=$('#title').height();
var contentHeight=body_h-header_h-buttons_h-title_h-api.safeArea.bottom;
console.log(body_h,header_h,buttons_h,title_h,api.safeArea.bottom,contentHeight);
$('#content').height(contentHeight);
}
}
},
methods:{
init(){
//var header = document.querySelector('#header');
//$api.fixStatusBar(header);
//var headerPos = $api.offset(header);
//Vue.set(app,'headerHeight',headerPos.h);
/*var body_h = $api.offset($api.dom('body')).h;
var header = $api.byId('header_div');
var headerPos = $api.offset(header);
console.log(JSON.stringify(headerPos));
var buttons = $api.byId('buttons');
var buttonsPos = $api.offset(buttons);
console.log(JSON.stringify(buttonsPos));
var contentHeight =body_h-headerPos.h-buttonsPos.h;
var content = $api.byId('content');
$api.css(content,'height:'+contentHeight+'px');*/
},
back(){
window.history.back();
},
setContent(){
var url = window.config.dev_path+"/api/page/detail?id=16";
$.post(url,{},function(ret){
var url = window.config.dev_path+"api/page/detail?id=16";
$api.post(url,{},function(ret){
if(1==ret.status){
Vue.set(app,'content',ret.data.content);
Vue.set(app,'title',ret.data.title);
Vue.set(app,'isLoading',false);
}
},'json');
/*$.post(url,{},function(ret){
alert(JSON.stringify(ret));
if(1==ret.status){
Vue.set(app,'content',ret.data.content);
Vue.set(app,'title',ret.data.title);
Vue.set(app,'isLoading',false);
}
},'json');*/
},
agree(){
//open_home();
$api.setStorage('first_run',500);
api.openFrame({
name: 'index',
url: './index.html',
});
agree(){
if(!this.isLoading){
$api.setStorage('first_run',500);
api.openFrame({
name: 'index',
url: './index.html',
});
}
},
disagree(){
api.closeWidget();
......
......@@ -55,26 +55,36 @@
<script type="text/javascript" src="./script/api.js"></script>
<script type="text/javascript">
apiready = function(){
console.log('as');
api.setStatusBarStyle({
style: 'light',
});
api.setPrefs({
key: 'userAgent',
value: 'wenhuasuixing'
});
api.openFrame({
name: 'launchImageAd',
url: './html/launchImageAd.html',
bounces: false,
rect: {
x:0,
y:0,
w:'auto',
h:'auto'
}
});
console.log('dd');
$api.setStorage('first_run',1);
var first_run=$api.getStorage('first_run');
if(first_run!=500){
api.openFrame({
name: 'privacy_policy',
url: './html/privacy_policy.html',
bounces: false,
reload: true,
vScrollBarEnabled: false,
});
}else{
api.setStatusBarStyle({
style: 'light',
});
api.setPrefs({
key: 'userAgent',
value: 'wenhuasuixing'
});
api.openFrame({
name: 'launchImageAd',
url: './html/launchImageAd.html',
bounces: false,
rect: {
x:0,
y:0,
w:'auto',
h:'auto'
}
});
}
};
</script>
</html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment