99 lines
1.8 KiB
Vue
99 lines
1.8 KiB
Vue
<script>
|
|
import {
|
|
getCurrentWebviewUrl,
|
|
refreshCurrentWebviewToken,
|
|
} from "./utils/webview-token";
|
|
|
|
export default {
|
|
onLaunch: function () {
|
|
console.log("App Launch");
|
|
this.logCurrentWebviewToken("launch");
|
|
},
|
|
onShow: function () {
|
|
console.log("App Show");
|
|
this.logCurrentWebviewToken("show");
|
|
},
|
|
onHide: function () {
|
|
console.log("App Hide");
|
|
},
|
|
methods: {
|
|
logCurrentWebviewToken(scene) {
|
|
const currentUrl = getCurrentWebviewUrl();
|
|
const token = refreshCurrentWebviewToken(currentUrl);
|
|
|
|
if (token) {
|
|
console.log("[webview-token][" + scene + "]", token);
|
|
return;
|
|
}
|
|
|
|
console.log("[webview-token][" + scene + "] token not found", currentUrl);
|
|
},
|
|
},
|
|
};
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
@import "./styles/tokens.scss";
|
|
|
|
@font-face {
|
|
font-family: "DIN-Bold";
|
|
src:
|
|
url("/static/fonts/din-bold-2.ttf") format("truetype"),
|
|
url("https://imgs.agrimedia.cn/din-bold-2.ttf") format("truetype");
|
|
font-style: normal;
|
|
font-weight: 800;
|
|
font-display: swap;
|
|
}
|
|
|
|
.asset-number-font {
|
|
font-family:
|
|
"DIN-Bold",
|
|
"PingFang SC",
|
|
"Helvetica Neue",
|
|
Arial,
|
|
sans-serif !important;
|
|
font-variant-numeric: tabular-nums;
|
|
}
|
|
|
|
html,
|
|
body,
|
|
#app {
|
|
min-height: 100%;
|
|
margin: 0;
|
|
background: #191e32;
|
|
}
|
|
|
|
uni-page,
|
|
uni-page-wrapper,
|
|
uni-page-body {
|
|
min-height: 100%;
|
|
background: #191e32;
|
|
}
|
|
|
|
page {
|
|
min-height: 100%;
|
|
background: #191e32;
|
|
color: $asset-text-main;
|
|
font-family: "PingFang SC", "Helvetica Neue", Arial, sans-serif;
|
|
}
|
|
|
|
view,
|
|
text,
|
|
button,
|
|
input,
|
|
textarea,
|
|
scroll-view {
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.asset-theme {
|
|
--asset-accent: #4cc9ff;
|
|
--asset-accent-strong: #5a71ff;
|
|
--asset-success: #5ad7a1;
|
|
--asset-danger: #ff7285;
|
|
--asset-text-main: #ffffff;
|
|
--asset-text-muted: rgba(255, 255, 255, 0.78);
|
|
--asset-text-dark: #112446;
|
|
}
|
|
</style>
|