统一身份认证
This commit is contained in:
69
App.vue
Normal file
69
App.vue
Normal file
@@ -0,0 +1,69 @@
|
||||
<script>
|
||||
export default {
|
||||
onLaunch: function() {
|
||||
console.log('App Launch')
|
||||
window.addEventListener('beforeunload', ()=>{
|
||||
uni.clearStorageSync();
|
||||
});
|
||||
},
|
||||
onShow: function() {
|
||||
console.log('App Show')
|
||||
},
|
||||
onHide: function() {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
/*每个页面公共css */
|
||||
view {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
|
||||
/* 默认字体大小 */
|
||||
@media screen and (max-width: 1024px) {
|
||||
html {
|
||||
font-size: 0.6px !important;
|
||||
}
|
||||
}
|
||||
@media screen and (min-width: 1024px) {
|
||||
html {
|
||||
font-size: 0.8px !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 1280px) {
|
||||
html {
|
||||
font-size: 1px !important;
|
||||
}
|
||||
}
|
||||
@media screen and (min-width: 1536px) {
|
||||
html {
|
||||
font-size: 1.2px !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width:1980px) {
|
||||
html {
|
||||
font-size: 1.5px !important;
|
||||
}
|
||||
}
|
||||
@media screen and (min-width:2304px) {
|
||||
html {
|
||||
font-size: 1.8px !important;
|
||||
}
|
||||
}
|
||||
@media screen and (min-width:2560) {
|
||||
html {
|
||||
font-size: 2px !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
20
index.html
Normal file
20
index.html
Normal file
@@ -0,0 +1,20 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<script>
|
||||
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
|
||||
CSS.supports('top: constant(a)'))
|
||||
document.write(
|
||||
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
|
||||
(coverSupport ? ', viewport-fit=cover' : '') + '" />')
|
||||
</script>
|
||||
<title></title>
|
||||
<!--preload-links-->
|
||||
<!--app-context-->
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"><!--app-html--></div>
|
||||
<script type="module" src="/main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
22
main.js
Normal file
22
main.js
Normal file
@@ -0,0 +1,22 @@
|
||||
import App from './App'
|
||||
|
||||
// #ifndef VUE3
|
||||
import Vue from 'vue'
|
||||
import './uni.promisify.adaptor'
|
||||
Vue.config.productionTip = false
|
||||
App.mpType = 'app'
|
||||
const app = new Vue({
|
||||
...App
|
||||
})
|
||||
app.$mount()
|
||||
// #endif
|
||||
|
||||
// #ifdef VUE3
|
||||
import { createSSRApp } from 'vue'
|
||||
export function createApp() {
|
||||
const app = createSSRApp(App)
|
||||
return {
|
||||
app
|
||||
}
|
||||
}
|
||||
// #endif
|
||||
72
manifest.json
Normal file
72
manifest.json
Normal file
@@ -0,0 +1,72 @@
|
||||
{
|
||||
"name" : "AuthenticationPlatform",
|
||||
"appid" : "__UNI__E3C8F8C",
|
||||
"description" : "",
|
||||
"versionName" : "1.0.0",
|
||||
"versionCode" : "100",
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus" : {
|
||||
"usingComponents" : true,
|
||||
"nvueStyleCompiler" : "uni-app",
|
||||
"compilerVersion" : 3,
|
||||
"splashscreen" : {
|
||||
"alwaysShowBeforeRender" : true,
|
||||
"waiting" : true,
|
||||
"autoclose" : true,
|
||||
"delay" : 0
|
||||
},
|
||||
/* 模块配置 */
|
||||
"modules" : {},
|
||||
/* 应用发布信息 */
|
||||
"distribute" : {
|
||||
/* android打包配置 */
|
||||
"android" : {
|
||||
"permissions" : [
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
||||
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
||||
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
||||
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
||||
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
||||
]
|
||||
},
|
||||
/* ios打包配置 */
|
||||
"ios" : {},
|
||||
/* SDK配置 */
|
||||
"sdkConfigs" : {}
|
||||
}
|
||||
},
|
||||
/* 快应用特有相关 */
|
||||
"quickapp" : {},
|
||||
/* 小程序特有相关 */
|
||||
"mp-weixin" : {
|
||||
"appid" : "",
|
||||
"setting" : {
|
||||
"urlCheck" : false
|
||||
},
|
||||
"usingComponents" : true
|
||||
},
|
||||
"mp-alipay" : {
|
||||
"usingComponents" : true
|
||||
},
|
||||
"mp-baidu" : {
|
||||
"usingComponents" : true
|
||||
},
|
||||
"mp-toutiao" : {
|
||||
"usingComponents" : true
|
||||
},
|
||||
"uniStatistics" : {
|
||||
"enable" : false
|
||||
},
|
||||
"vueVersion" : "3"
|
||||
}
|
||||
12
node_modules/.package-lock.json
generated
vendored
Normal file
12
node_modules/.package-lock.json
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"name": "AuthenticationPlatform",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"node_modules/amfe-flexible": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/amfe-flexible/-/amfe-flexible-2.2.1.tgz",
|
||||
"integrity": "sha512-L2VfvDzoETBjhRptg5u/IUuzHSuxm22JpSRb404p/TBGeRfwWmmNEbB+TFPIP/sS/+pbM18bCFH9QnMojLuPNw=="
|
||||
}
|
||||
}
|
||||
}
|
||||
23
node_modules/amfe-flexible/.editorconfig
generated
vendored
Normal file
23
node_modules/amfe-flexible/.editorconfig
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
# editorconfig.org
|
||||
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
max_line_length = off
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[{package.json,.travis.yml,.eslintrc*}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[*.md]
|
||||
max_line_length = off
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
[COMMIT_EDITMSG]
|
||||
max_line_length = off
|
||||
25
node_modules/amfe-flexible/.npmignore
generated
vendored
Normal file
25
node_modules/amfe-flexible/.npmignore
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
# OS
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
Desktop.ini
|
||||
|
||||
# IDE
|
||||
.idea/
|
||||
.vscode/
|
||||
.project
|
||||
*.swp
|
||||
*.swo
|
||||
|
||||
# Dependency, Cache, Temporary
|
||||
node_modules/
|
||||
bower_components/
|
||||
.svn/
|
||||
.sass-cache/
|
||||
.nodejs-cache/
|
||||
npm-debug.log
|
||||
|
||||
# Distribution
|
||||
coverage/
|
||||
dist/
|
||||
docs/
|
||||
*.iml
|
||||
34
node_modules/amfe-flexible/README.md
generated
vendored
Normal file
34
node_modules/amfe-flexible/README.md
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
# amfe-flexible
|
||||
|
||||
[Classic edition (0.3.2)](https://github.com/amfe/lib-flexible/tree/master)
|
||||
|
||||
## Usage
|
||||
|
||||
#### Install
|
||||
|
||||
`npm i -S amfe-flexible`
|
||||
|
||||
#### Import
|
||||
|
||||
```html
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
|
||||
<script src="./node_modules/amfe-flexible/index.js"></script>
|
||||
```
|
||||
|
||||
You can inline this file with [inline-source](https://npmjs.org/package/inline-source).
|
||||
|
||||
#### Develop
|
||||
|
||||
Use [postcss-adaptive](https://www.npmjs.com/package/postcss-adaptive).
|
||||
|
||||
## License
|
||||
|
||||
(The MIT License)
|
||||
|
||||
Copyright (c) 2016 Alibaba MFE
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
44
node_modules/amfe-flexible/index.js
generated
vendored
Normal file
44
node_modules/amfe-flexible/index.js
generated
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
(function flexible (window, document) {
|
||||
var docEl = document.documentElement
|
||||
var dpr = window.devicePixelRatio || 1
|
||||
|
||||
// adjust body font size
|
||||
function setBodyFontSize () {
|
||||
if (document.body) {
|
||||
document.body.style.fontSize = (12 * dpr) + 'px'
|
||||
}
|
||||
else {
|
||||
document.addEventListener('DOMContentLoaded', setBodyFontSize)
|
||||
}
|
||||
}
|
||||
setBodyFontSize();
|
||||
|
||||
// set 1rem = viewWidth / 10
|
||||
function setRemUnit () {
|
||||
var rem = docEl.clientWidth / 10
|
||||
docEl.style.fontSize = rem + 'px'
|
||||
}
|
||||
|
||||
setRemUnit()
|
||||
|
||||
// reset rem unit on page resize
|
||||
window.addEventListener('resize', setRemUnit)
|
||||
window.addEventListener('pageshow', function (e) {
|
||||
if (e.persisted) {
|
||||
setRemUnit()
|
||||
}
|
||||
})
|
||||
|
||||
// detect 0.5px supports
|
||||
if (dpr >= 2) {
|
||||
var fakeBody = document.createElement('body')
|
||||
var testElement = document.createElement('div')
|
||||
testElement.style.border = '.5px solid transparent'
|
||||
fakeBody.appendChild(testElement)
|
||||
docEl.appendChild(fakeBody)
|
||||
if (testElement.offsetHeight === 1) {
|
||||
docEl.classList.add('hairlines')
|
||||
}
|
||||
docEl.removeChild(fakeBody)
|
||||
}
|
||||
}(window, document))
|
||||
1
node_modules/amfe-flexible/index.min.js
generated
vendored
Normal file
1
node_modules/amfe-flexible/index.min.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
!function(e,t){function n(){t.body?t.body.style.fontSize=12*o+"px":t.addEventListener("DOMContentLoaded",n)}function d(){var e=i.clientWidth/10;i.style.fontSize=e+"px"}var i=t.documentElement,o=e.devicePixelRatio||1;if(n(),d(),e.addEventListener("resize",d),e.addEventListener("pageshow",function(e){e.persisted&&d()}),o>=2){var a=t.createElement("body"),s=t.createElement("div");s.style.border=".5px solid transparent",a.appendChild(s),i.appendChild(a),1===s.offsetHeight&&i.classList.add("hairlines"),i.removeChild(a)}}(window,document);
|
||||
33
node_modules/amfe-flexible/package.json
generated
vendored
Normal file
33
node_modules/amfe-flexible/package.json
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"name": "amfe-flexible",
|
||||
"version": "2.2.1",
|
||||
"description": "Build flexible page on mobile platform",
|
||||
"keywords": [
|
||||
"lib",
|
||||
"amfe",
|
||||
"flexible",
|
||||
"mobile",
|
||||
"css",
|
||||
"rem",
|
||||
"vw"
|
||||
],
|
||||
"homepage": "https://github.com/amfe/lib-flexible",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git@github.com:amfe/lib-flexible.git"
|
||||
},
|
||||
"author": [
|
||||
{
|
||||
"name": "mingelz",
|
||||
"email": "mingelz@gmail.com"
|
||||
}
|
||||
],
|
||||
"scripts": {
|
||||
"compress": "uglifyjs index.js -o index.min.js -c -m"
|
||||
},
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"uglify-js": "^3.0.27"
|
||||
},
|
||||
"license": "MIT"
|
||||
}
|
||||
17
package-lock.json
generated
Normal file
17
package-lock.json
generated
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"name": "AuthenticationPlatform",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"dependencies": {
|
||||
"amfe-flexible": "^2.2.1"
|
||||
}
|
||||
},
|
||||
"node_modules/amfe-flexible": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/amfe-flexible/-/amfe-flexible-2.2.1.tgz",
|
||||
"integrity": "sha512-L2VfvDzoETBjhRptg5u/IUuzHSuxm22JpSRb404p/TBGeRfwWmmNEbB+TFPIP/sS/+pbM18bCFH9QnMojLuPNw=="
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user