|
@@ -1,67 +1,68 @@
|
|
|
<script>
|
|
|
- export default {
|
|
|
- globalData: {
|
|
|
- //全局配置参数
|
|
|
- barHeight: 0,
|
|
|
- screenWidth: 0,
|
|
|
- screenHeight: 0,
|
|
|
- viewHeight: 0,
|
|
|
- },
|
|
|
- onLaunch: function(options) {
|
|
|
- console.log("APP----onLaunch", options);
|
|
|
- if (options.query.code) {
|
|
|
- uni.setStorageSync('code', options.query.code)
|
|
|
- }
|
|
|
+ export default {
|
|
|
+ globalData: {
|
|
|
+ //全局配置参数
|
|
|
+ barHeight: 0,
|
|
|
+ screenWidth: 0,
|
|
|
+ screenHeight: 0,
|
|
|
+ viewHeight: 0,
|
|
|
+ },
|
|
|
+ onLaunch: function(options) {
|
|
|
+ console.log("APP----onLaunch", options);
|
|
|
+ if (options.query.code) {
|
|
|
+ uni.setStorageSync('code', options.query.code)
|
|
|
+ }
|
|
|
|
|
|
- // #ifdef APP-PLUS
|
|
|
- // App平台检测升级,服务端代码是通过uniCloud的云函数实现的,详情可参考:https://ext.dcloud.net.cn/plugin?id=2226
|
|
|
- // #endif
|
|
|
- //获取设备顶部窗口的高度(不同设备窗口高度不一样,根据这个来设置自定义导航栏的高度)
|
|
|
- uni.getSystemInfo({
|
|
|
- success: (res) => {
|
|
|
- console.log(res)
|
|
|
- this.globalData.barHeight = res.statusBarHeight;
|
|
|
- this.globalData.screenWidth = res.screenWidth;
|
|
|
- this.globalData.screenHeight = res.screenHeight;
|
|
|
- this.globalData.viewHeight = res.windowHeight
|
|
|
- }
|
|
|
- });
|
|
|
- /**
|
|
|
- * 校验session_key是否失效
|
|
|
- * 如果失效,则清空登录态,当需要登录的时候,从login.wxml重新登录
|
|
|
- */
|
|
|
- uni.checkSession({
|
|
|
- success() {
|
|
|
- // sessionKey有效没有过期
|
|
|
- console.log("checkSession success");
|
|
|
- },
|
|
|
- fail() {
|
|
|
- // sessionKey已经失效,过期
|
|
|
- console.log("checkSession fail");
|
|
|
- // 清空登录所有相关信息
|
|
|
- // clearLoginStatus();
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
- onShow: function() {
|
|
|
- console.log('App Show')
|
|
|
- },
|
|
|
- onHide: function() {
|
|
|
- console.log('App Hide')
|
|
|
- },
|
|
|
- globalData: {
|
|
|
- test: ''
|
|
|
- }
|
|
|
- }
|
|
|
+ // #ifdef APP-PLUS
|
|
|
+ // App平台检测升级,服务端代码是通过uniCloud的云函数实现的,详情可参考:https://ext.dcloud.net.cn/plugin?id=2226
|
|
|
+ // #endif
|
|
|
+ //获取设备顶部窗口的高度(不同设备窗口高度不一样,根据这个来设置自定义导航栏的高度)
|
|
|
+ uni.getSystemInfo({
|
|
|
+ success: (res) => {
|
|
|
+ this.globalData.barHeight = res.statusBarHeight;
|
|
|
+ this.globalData.screenWidth = res.screenWidth;
|
|
|
+ this.globalData.screenHeight = res.screenHeight;
|
|
|
+ this.globalData.viewHeight = res.windowHeight
|
|
|
+ }
|
|
|
+ });
|
|
|
+ /**
|
|
|
+ * 校验session_key是否失效
|
|
|
+ * 如果失效,则清空登录态,当需要登录的时候,从login.wxml重新登录
|
|
|
+ */
|
|
|
+ uni.checkSession({
|
|
|
+ success() {
|
|
|
+ // sessionKey有效没有过期
|
|
|
+ console.log("checkSession success");
|
|
|
+ },
|
|
|
+ fail() {
|
|
|
+ // sessionKey已经失效,过期
|
|
|
+ console.log("checkSession fail");
|
|
|
+ // 清空登录所有相关信息
|
|
|
+ // clearLoginStatus();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ onShow: function() {
|
|
|
+ console.log('App Show')
|
|
|
+ },
|
|
|
+ onHide: function() {
|
|
|
+ console.log('App Hide')
|
|
|
+ },
|
|
|
+ globalData: {
|
|
|
+ test: ''
|
|
|
+ }
|
|
|
+ }
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss">
|
|
|
- /* #ifndef APP-PLUS-NVUE */
|
|
|
- /* uni.css - 通用组件、模板样式库,可以当作一套ui库应用 */
|
|
|
- @import './common/style/uni.css';
|
|
|
- /* #endif*/
|
|
|
+ @import "uview-ui/index.scss";
|
|
|
+ /* #ifndef APP-PLUS-NVUE */
|
|
|
+ /* uni.css - 通用组件、模板样式库,可以当作一套ui库应用 */
|
|
|
+ @import './common/style/uni.css';
|
|
|
+ /* #endif*/
|
|
|
+ /*每个页面公共css */
|
|
|
|
|
|
- uni-radio .uni-radio-input .uni-radio-input-checked {
|
|
|
- background: #FF0000 !important;
|
|
|
- }
|
|
|
+ uni-radio .uni-radio-input .uni-radio-input-checked {
|
|
|
+ background: #FF0000 !important;
|
|
|
+ }
|
|
|
</style>
|