jiangping
2025-04-28 8470e06b5ce5189162f9f6cd3f2cea7d14ad80af
h5/App.vue
@@ -1,272 +1,299 @@
<script>
import { wxAuthorize, refreshToken, app_url } from '@/api'
export default {
  onLaunch: function () {
    window.addEventListener("popstate", (event) => {
         const path = this.$route.fullPath
         // console.log('path', path);
       if(path == '/pages/login/login' || path == '/'){
            window.location.href = app_url
         }
         if(path == '/pages/wdata/home'){
            window.location.href = 'https://atwl.ahzyssl.com/zhyq_h5/#/pages/wdata/home'
         }
         if(path == '/pages/waybill/home'){
            window.location.href = 'https://atwl.ahzyssl.com/zhyq_h5/#/pages/waybill/home'
         }
    })
      uni.setStorageSync('transportList', [])
      console.log('onLaunch')
  },
  onShow: function () {
    console.log('App Show')
  },
  onHide: function () {
    console.log('App Hide')
  }
}
   import {
      wxAuthorize,
      refreshToken,
      app_url
   } from '@/api'
   export default {
      onLaunch: function() {
         window.addEventListener("popstate", (event) => {
            const path = this.$route.fullPath
            // console.log('path', path);
            if (path == '/pages/login/login' || path == '/') {
               window.location.href = app_url
            }
            if (path == '/pages/wdata/home') {
               window.location.href = 'https://atwl.ahzyssl.com/zhyq_h5/#/pages/wdata/home'
            }
            if (path == '/pages/waybill/home') {
               window.location.href = 'https://atwl.ahzyssl.com/zhyq_h5/#/pages/waybill/home'
            }
         })
         uni.setStorageSync('transportList', [])
         console.log('onLaunch')
      },
      onShow: function() {
         console.log('App Show')
      },
      onHide: function() {
         console.log('App Hide')
      }
   }
</script>
<style lang="scss">
/*每个页面公共css */
@import "uview-ui/index.scss";
html, body {
    height: auto;
    min-height: 100%;
    overflow: visible;
}
.flex-cb {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
   /*每个页面公共css */
   @import "uview-ui/index.scss";
.container {
  height: 100%;
  width: 100%;
  max-width: 800rpx;
  overflow-y: auto;
}
.empty_wrap{
   display: flex;
   flex-direction: column;
   justify-content: center;
   align-items: center;
   color: #666666;
   min-height: 600rpx;
   image{
      width: 300rpx;
      height: 300rpx;
   html,
   body {
      height: auto;
      min-height: 100%;
      overflow: visible;
   }
}
.doumee-container .ivu-tabs-nav {
  width: 100%;
}
.doumee-container .ivu-tabs-nav .ivu-tabs-tab {
  width: calc(100% / 3);
}
   .flex-cb {
      display: flex;
      justify-content: space-between;
      align-items: center;
   }
.doumee-container .ivu-tabs-nav .ivu-tabs-tab {
  margin-right: 0;
  text-align: center;
}
   .container {
      height: 100%;
      width: 100%;
      max-width: 800rpx;
      overflow-y: auto;
   }
.cell {
  background-color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 100rpx;
  padding: 24rpx 30rpx;
  box-sizing: border-box;
  border-bottom: 1rpx solid #eee;
  font-size: 15rpx;
  position: relative;
}
   .empty_wrap {
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      color: #666666;
      min-height: 600rpx;
.cell .title {
  flex-shrink: 0;
  color: #222;
  line-height: 20rpx;
  height: 20rpx;
  width: 28%;
  margin-right: 5%;
}
      image {
         width: 300rpx;
         height: 300rpx;
      }
   }
.cell .content {
  flex: 1;
  font-size: 28rpx;
  font-weight: 400;
  color: #999999;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
   .doumee-container .ivu-tabs-nav {
      width: 100%;
   }
.cell .content .input {
  width: 100%;
  height: 100%;
  font-size: 28rpx;
  font-weight: 400;
  color: #333333;
  text-align: right;
}
   .doumee-container .ivu-tabs-nav .ivu-tabs-tab {
      width: calc(100% / 3);
   }
.cell.is-link::after {
  content: "";
  display: block;
  width: 8rpx;
  height: 8rpx;
  transform: rotate(-45deg);
  border-right: 1rpx solid #999999;
  border-bottom: 1rpx solid #999999;
  margin-left: 5rpx;
}
   .doumee-container .ivu-tabs-nav .ivu-tabs-tab {
      margin-right: 0;
      text-align: center;
   }
.card {
  background-color: #fff;
  padding: 16rpx;
  position: relative;
}
   .cell {
      background-color: #fff;
      display: flex;
      justify-content: space-between;
      align-items: center;
      min-height: 100rpx;
      padding: 24rpx 30rpx;
      box-sizing: border-box;
      border-bottom: 1rpx solid #eee;
      font-size: 15rpx;
      position: relative;
   }
.card::after {
  content: "";
  display: block;
  position: absolute;
  width: calc(100% - 32rpx);
  height: 0;
  bottom: 0;
  left: 16rpx;
  border-bottom: 1rpx solid #f7f7f7;
}
   .cell .title {
      flex-shrink: 0;
      color: #222;
      line-height: 20rpx;
      height: 20rpx;
      width: 28%;
      margin-right: 5%;
   }
.card .title {
  color: #777777;
  margin-bottom: 12rpx;
}
   .cell .content {
      flex: 1;
      font-size: 28rpx;
      font-weight: 400;
      color: #999999;
      display: flex;
      align-items: center;
      justify-content: flex-end;
   }
.card .content {
  color: #222;
}
   .cell .content .input {
      width: 100%;
      height: 100%;
      font-size: 28rpx;
      font-weight: 400;
      color: #333333;
      text-align: right;
   }
.placeholder9 {
  color: #999999 !important;
  font-size: 28rpx;
}
.placeholder3{
   color: #333333 !important;
}
.red{
   color: red !important;
}
   .cell.is-link::after {
      content: "";
      display: block;
      width: 8rpx;
      height: 8rpx;
      transform: rotate(-45deg);
      border-right: 1rpx solid #999999;
      border-bottom: 1rpx solid #999999;
      margin-left: 5rpx;
   }
//设置圆角
checkbox .uni-checkbox-input {
  border-radius: 50%;
}
   .card {
      background-color: #fff;
      padding: 16rpx;
      position: relative;
   }
checkbox .uni-checkbox-input.uni-checkbox-input-checked {
  color: #fff !important;
  border: 1px solid #4d99a8 !important;
  background-color: #4d99a8 !important;
}
   .card::after {
      content: "";
      display: block;
      position: absolute;
      width: calc(100% - 32rpx);
      height: 0;
      bottom: 0;
      left: 16rpx;
      border-bottom: 1rpx solid #f7f7f7;
   }
checkbox .uni-checkbox-input.uni-checkbox-input-checked:before {
  /* color: #4d99a8 !important;  */
  /* border: 1px solid #4d99a8 !important; */
  /* font-size: 58rpx; */
  /* border-radius: 50%; */
}
   .card .title {
      color: #777777;
      margin-bottom: 12rpx;
   }
//
   .card .content {
      color: #222;
   }
view {
  box-sizing: border-box;
}
   .placeholder9 {
      color: #999999 !important;
      font-size: 28rpx;
   }
image {
  box-sizing: border-box;
  margin: 0;
  display: flex;
}
input {
  font-size: 30rpx;
}
textarea {
  box-sizing: border-box;
  // background-color: #f7f7f7;
  font-size: 30rpx !important;
  padding: 0;
  border-radius: 8rpx;
  color: #333333 !important;
}
.u-textarea {
  padding: 0 !important;
  color: #333333 !important;
}
   .placeholder3 {
      color: #333333 !important;
   }
.df_ac {
  display: flex;
  align-items: center;
}
   .red {
      color: red !important;
   }
.main_app {
  padding: 10rpx 30rpx 0rpx;
  font-size: 28rpx;
  color: #333333;
}
.popupShow {
  overflow: hidden;
  position: fixed;
  width: 100%;
}
.placeholder6 {
  color: #666666;
  font-size: 28rpx;
}
.primaryColor {
  color: $uni-color-primary;
}
.avatar {
  width: 64rpx;
  height: 64rpx;
  border-radius: 50%;
  margin-right: 20rpx;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: $uni-color-primary;
  color: #fff;
  font-size: 30rpx;
}
.placeholder9 {
  color: #999999;
  font-size: 28rpx;
}
.fs24 {
  font-size: 24rpx;
}
.mr24 {
  margin-right: 24rpx;
}
.mt24 {
  margin-top: 24rpx;
}
   //设置圆角
   checkbox .uni-checkbox-input {
      border-radius: 50%;
   }
.mr12 {
  margin-right: 12rpx;
}
.ml12 {
  margin-left: 12rpx;
}
.ml6 {
  margin-left: 6rpx;
}
.mt6 {
  margin-top: 6rpx;
}
.mr6 {
  margin-right: 6rpx;
}
</style>
   checkbox .uni-checkbox-input.uni-checkbox-input-checked {
      color: #fff !important;
      border: 1px solid #4d99a8 !important;
      background-color: #4d99a8 !important;
   }
   checkbox .uni-checkbox-input.uni-checkbox-input-checked:before {
      /* color: #4d99a8 !important;  */
      /* border: 1px solid #4d99a8 !important; */
      /* font-size: 58rpx; */
      /* border-radius: 50%; */
   }
   //
   view {
      box-sizing: border-box;
   }
   image {
      box-sizing: border-box;
      margin: 0;
      display: flex;
   }
   input {
      font-size: 30rpx;
   }
   textarea {
      box-sizing: border-box;
      // background-color: #f7f7f7;
      font-size: 30rpx !important;
      padding: 0;
      border-radius: 8rpx;
      color: #333333 !important;
   }
   .u-textarea {
      padding: 0 !important;
      color: #333333 !important;
   }
   .df_ac {
      display: flex;
      align-items: center;
   }
   .main_app {
      padding: 10rpx 30rpx 0rpx;
      font-size: 28rpx;
      color: #333333;
   }
   .popupShow {
      overflow: hidden;
      position: fixed;
      width: 100%;
   }
   .placeholder6 {
      color: #666666;
      font-size: 28rpx;
   }
   .primaryColor {
      color: $uni-color-primary;
   }
   .avatar {
      width: 64rpx;
      height: 64rpx;
      border-radius: 50%;
      margin-right: 20rpx;
      display: flex;
      justify-content: center;
      align-items: center;
      background-color: $uni-color-primary;
      color: #fff;
      font-size: 30rpx;
   }
   .placeholder9 {
      color: #999999;
      font-size: 28rpx;
   }
   .fs24 {
      font-size: 24rpx;
   }
   .mr24 {
      margin-right: 24rpx;
   }
   .mt24 {
      margin-top: 24rpx;
   }
   .mr12 {
      margin-right: 12rpx;
   }
   .ml12 {
      margin-left: 12rpx;
   }
   .ml6 {
      margin-left: 6rpx;
   }
   .mt6 {
      margin-top: 6rpx;
   }
   .mr6 {
      margin-right: 6rpx;
   }
</style>