123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- <script>
- export default {
- globalData: {
- // baseUrl: 'http://192.168.2.113:9110/saas/clz/', // 本地
- baseUrl: 'https://md.test.zyucgj.com/saas/clz/', // 预发布
- // baseUrl: 'https://car.zyucgj.com/saas/clz/' // 生产
- },
- onLaunch: function() {
- console.log('App Launch');
- },
- onShow: function() {
- console.log('App Show');
- const updateManager = uni.getUpdateManager();
- updateManager.onCheckForUpdate(function (res) {
- // 请求完新版本信息的回调
- console.log(res.hasUpdate,'updateManager');
- });
- updateManager.onUpdateReady(function (res) {
- uni.showModal({
- title: '更新提示',
- content: '新版本已经准备好,是否重启应用?',
- success(res) {
- if (res.confirm) {
- // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
- updateManager.applyUpdate();
- }
- }
- });
- });
- updateManager.onUpdateFailed(function (res) {
- // 新的版本下载失败
- console.log(res);
- });
- },
- onHide: function() {
- console.log('App Hide');
- }
- }
- </script>
- <style lang="scss">
- @import "uview-ui/index.scss";
- @import "/static/iconfont/iconfont.css";
- @import 'flex.css';
- /*每个页面公共css */
- page {
- width: 100%;
- min-height: 100%;
- display: flex;
- background: #f8f8f8;
- > view{
- width: 100%;
- }
- }
- /* #ifdef MP-BAIDU */
- page {
- width: 100%;
- height: 100%;
- display: block;
- }
- swan-template {
- width: 100%;
- min-height: 100%;
- display: flex;
- }
- /* 原生组件模式下需要注意组件外部样式 */
- custom-component {
- width: 100%;
- min-height: 100%;
- display: flex;
- }
- /* #endif */
- /* #ifdef MP-ALIPAY */
- page {
- min-height: 100vh;
- }
- /* #endif */
- /* 原生组件模式下需要注意组件外部样式 */
- m-input {
- width: 100%;
- min-height: 100%;
- display: flex;
- }
- .content {
- display: flex;
- flex: 1;
- flex-direction: column;
- background-color: #fff;
- padding: 20upx;
- }
- // 带圆角的区域块
- .cont-item{
- background: #ffffff;
- margin: 20upx 32upx;
- padding: 0 32rpx;
- border-radius: 24upx;
- box-shadow: 1px 1px 3px #EEEEEE;
- font-size: 28upx;
- }
- </style>
|