You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

156 lines
3.8 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<script>
// 引入检查更新
//import checkupdate from "@/uni_modules/uni-upgrade-center-app/utils/check-update.js"
//引进检查版本
// import callCheckVersion from '@/uni_modules/uni-upgrade-center-app/utils/call-check-version';
//#ifdef APP-PLUS
const jpushModule = uni.requireNativePlugin('JG-JPush');
//#endif
export default {
onLaunch() {
// 判断版本更新 需要真机进行测试
//checkupdate();
//#ifdef APP-PLUS
// 消息推送
// jpushModule.setLoggerEnable(true);
// jpushModule.initJPushService()
// jpushModule.addConnectEventListener(result=>{
// let connectEnable = result.connectEnable
// console.log("jpush连接", connectEnable)
// });
// 设置别名 (再登录时候设置)
// var user= JSON.parse(uni.getStorageSync("user"));
// if(user&&user.yhdm){
// jpushModule.setAlias({
// 'alias': user.yhdm,
// 'sequence': 1
// })
// }
//
// jpushModule.addTagAliasListener(result => {
// let code = result.code
// let sequence = result.sequence
// let tags = result.tags
// let tag = result.tag
// let tagEnable = result.tagEnable
// let alias = result.alias
// console.log(alias, '别名')
// });
// // 通知事件回调
// jpushModule.addNotificationListener(result => {
// let notificationEventType = result.notificationEventType
// let messageID = result.messageID
// let title = result.title
// let content = result.content
// let extras = result.extras
// console.log("通知", result)
// // 点击事件
// if (notificationEventType == 'notificationOpened') {
// uni.reLaunch({
// url: `/pages/message/newMsg`
// });
// }
// })
// jpushModule.getRegistrationID(result => {
// console.log("注册ID", result.registerID)
// if (result.registerID) {
// uni.setStorageSync("register_id", result.registerID)
// }
// })
// jpushModule.addCustomMessageListener(result => {
// let messageID = result.messageID
// let content = result.content
// let extras = result.extras
// console.log("自定义消息", result)
// })
//#endif
},
}
</script>
<style lang="scss">
/*每个页面公共css */
@import "uview-ui/index.scss";
@import "common/demo.scss";
@import 'colorui/main.css';
@import 'colorui/icon.css';
body{
font-family: 'FZLTZHUNHJW--GB1-0';
}
.rightc {
height: 100%;
padding-right: 10rpx !important;
text-align: right !important;
display: flex;
flex: 1;
align-items: flex-end;
justify-content: flex-end;
}
.wrapnob{
margin: 0;
padding: 0;
width: 100%;
position: relative;
height: calc(100vh);
/* #ifdef H5 */
height: calc(100vh - var(--window-top));
/* #endif */
}
.wrap{
margin: 0;
padding: 0;
width: 100%;
position: relative;
height: calc(100vh);
/* #ifdef H5 */
height: calc(100vh - var(--window-top) - var(--window-bottom));
/* #endif */
overflow-y: auto;
}
/* 基本布局 */
.page {
width: 100%;
}
/* 当屏幕宽度小于600px时调整布局 */
@media (max-width: 600px) {
.page {
padding: 5px;
}
}
.page {
position: relative;
width: 100%;
padding: 0;
margin-top: 0;
overflow: hidden;
.back{
width: 100%;
height: calc(100vh - var(--window-top)) !important;
position: absolute;
top:0;
left:0;
background: url('@/static/image/bg.jpg') no-repeat top center;
background-size: 100% 100%;
}
}
.page-box{
padding-bottom:20rpx;
}
.u-drawer{
top:calc(var(--window-top) + 100rpx) !important;
height: calc(100vh - var(--window-top) - 100rpx) !important;
z-index: 92 !important;
}
.imgload{
background-image: url('/static/image/nopic.png');
background-size: 66% auto;
background-position: center center;
background-repeat: no-repeat;
}
</style>