提交 6f288ec6 编写于 作者: DCloud_JSON's avatar DCloud_JSON

up about

上级 78b3b094
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
"urlCheck" : false "urlCheck" : false
}, },
"usingComponents" : true, "usingComponents" : true,
"betterScopedSlots":true "betterScopedSlots" : true
}, },
"mp-alipay" : { "mp-alipay" : {
"usingComponents" : true "usingComponents" : true
...@@ -100,5 +100,8 @@ ...@@ -100,5 +100,8 @@
}, },
"uniStatistics" : { "uniStatistics" : {
"enable" : false "enable" : false
},
"h5" : {
"template" : "template.h5.html"
} }
} }
...@@ -80,10 +80,7 @@ ...@@ -80,10 +80,7 @@
// #ifdef APP-PLUS // #ifdef APP-PLUS
,"app-plus": { ,"app-plus": {
"titleNView": { "titleNView": {
"buttons": [{ "buttons": [{"type": "share"}]
"type": "share"
}],
"type": "transparent"
} }
} }
// #endif // #endif
......
...@@ -3,9 +3,10 @@ ...@@ -3,9 +3,10 @@
<view class="box"> <view class="box">
<image class="logoImg" :src="about.logo"></image> <image class="logoImg" :src="about.logo"></image>
<text class="tip appName">{{about.appName}}</text> <text class="tip appName">{{about.appName}}</text>
<text class="tip" style="font-size:24upx;">Version {{version}}</text> <text class="tip">Version {{version}}</text>
<!--Sansnn-uQRCode组件来源,插件市场:https://ext.dcloud.net.cn/plugin?id=1287 微调后--> <!--Sansnn-uQRCode组件来源,插件市场:https://ext.dcloud.net.cn/plugin?id=1287 微调后-->
<Sansnn-uQRCode :text="about.download" :makeOnLoad="true" class="qrcode"></Sansnn-uQRCode> <Sansnn-uQRCode :text="about.download" :makeOnLoad="true" class="qrcode"></Sansnn-uQRCode>
<text class="tip">扫描二维码,您的朋友也可以下载{{about.appName}}客户端</text>
</view> </view>
<view class="copyright"> <view class="copyright">
<template v-for="(agreement,index) in about.agreements"> <template v-for="(agreement,index) in about.agreements">
...@@ -35,6 +36,9 @@ import uniShare from 'uni_modules/uni-share/js_sdk/uni-share.js'; ...@@ -35,6 +36,9 @@ import uniShare from 'uni_modules/uni-share/js_sdk/uni-share.js';
}, },
created() { created() {
this.about = baseappConfig.about this.about = baseappConfig.about
uni.setNavigationBarTitle({
title:'关于'+this.about.appName
})
this.year = (new Date).getFullYear() this.year = (new Date).getFullYear()
}, },
onNavigationBarButtonTap() { onNavigationBarButtonTap() {
...@@ -122,9 +126,12 @@ import uniShare from 'uni_modules/uni-share/js_sdk/uni-share.js'; ...@@ -122,9 +126,12 @@ import uniShare from 'uni_modules/uni-share/js_sdk/uni-share.js';
height:160upx; height:160upx;
border-radius: 15px; border-radius: 15px;
} }
.tip{
font-size:24rpx;
margin-top: 10px;
}
.appName{ .appName{
margin-top: 20px; margin-top: 20px;
margin-bottom:5px;
font-size:42rpx; font-size:42rpx;
font-weight: 500; font-weight: 500;
} }
......
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<title>
<%= htmlWebpackPlugin.options.title %>
</title>
<!-- 正式发布的时候使用,开发期间不启用。↓ -->
<!-- <script src="/h5/touch-emulator.js"></script>
<script>
TouchEmulator();
if (document.documentElement.clientWidth > 1024) {
window.location.href = '/h5/pcguide.html#'+location.pathname+location.search;
}
</script>
<style>
::-webkit-scrollbar{
display: none;
}
</style>
<script>
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?";// 百度统计key
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script> -->
<!-- 正式发布的时候使用,开发期间不启用。↑ -->
<script>
// document.addEventListener('DOMContentLoaded', function() {
// document.documentElement.style.fontSize = document.documentElement.clientWidth / 20 + 'px'
// })
setTimeout(()=>{
document.querySelector('#gg').addEventListener('click',e=>{
console.log(e);
alert(12)
})
},1000)
</script>
<link rel="stylesheet" href="<%= BASE_URL %>static/index.<%= VUE_APP_INDEX_CSS_HASH %>.css" />
</head>
<body>
<!-- 该文件为 H5 平台的模板 HTML,并非应用入口。 -->
<!-- 请勿在此文件编写页面代码或直接运行此文件。 -->
<!-- 详见文档:https://uniapp.dcloud.io/collocation/manifest?id=h5-template -->
<noscript>
<strong>Please enable JavaScript to continue.</strong>
</noscript>
<div id="gg" style="width: 99px;height: 99px;background-color: #007AFF;"
>465</div>
<div style="margin-top: 100px;" id="app"></div>
<!-- built files will be auto injected -->
<script>
/*BAIDU_STAT*/
</script>
</body>
</html>
...@@ -115,12 +115,12 @@ ...@@ -115,12 +115,12 @@
console.log(arguments); console.log(arguments);
console.log('services',services); console.log('services',services);
let oauthService = this.oauthServices.find((service) => service.id == type) let oauthService = this.oauthServices.find((service) => service.id == type)
// #ifdef APP-PLUS
//uni.showLoading({mask: true});
console.log(type); console.log(type);
// #ifdef APP-PLUS
//请勿直接使用前端获取的unionid或openid直接用于登陆,前端的数据都是不可靠的 //请勿直接使用前端获取的unionid或openid直接用于登陆,前端的数据都是不可靠的
if(type=='weixin'){ if(type=='weixin'){
oauthService.authorize(({code})=>{ return oauthService.authorize(({code})=>{
console.log(code); console.log(code);
this.quickLogin({code},type) this.quickLogin({code},type)
}, },
...@@ -129,6 +129,7 @@ ...@@ -129,6 +129,7 @@
console.log(err); console.log(err);
}) })
} }
// #endif
uni.login({ uni.login({
"provider": type, "provider": type,
...@@ -174,7 +175,6 @@ ...@@ -174,7 +175,6 @@
} }
} }
}) })
// #endif
}, },
quickLogin(params,type){//联网验证登陆 quickLogin(params,type){//联网验证登陆
console.log(params,type); console.log(params,type);
...@@ -198,14 +198,11 @@ ...@@ -198,14 +198,11 @@
var delta = 0 var delta = 0
//判断需要返回几层 //判断需要返回几层
let pages = getCurrentPages(); let pages = getCurrentPages();
console.log(pages);
pages.forEach((page,index)=>{ pages.forEach((page,index)=>{
console.log(pages[pages.length-index-1].route.split('/'));
if(pages[pages.length-index-1].route.split('/')[1] == 'uni-login-page'){ if(pages[pages.length-index-1].route.split('/')[1] == 'uni-login-page'){
delta ++ delta ++
} }
}) })
console.log('delta:'+delta);
uni.navigateBack({delta}) uni.navigateBack({delta})
} }
},{showLoading:true}) },{showLoading:true})
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册