合同小程序前端代码仓库
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.

92 lines
1.8 KiB

1 week ago
6 days ago
3 days ago
6 days ago
3 days ago
6 days ago
3 days ago
1 week ago
1 week ago
1 week ago
6 days ago
1 week ago
  1. <script lang="uts">
  2. let firstBackTime = 0
  3. export default {
  4. usrInfo:{},
  5. allMsg:[],
  6. infoList:[],
  7. productName:"",
  8. productUrl:'',
  9. storeName:'',
  10. dealerAddress:'',
  11. onLaunch: function () {
  12. console.log('App Launch')
  13. },
  14. onShow: function () {
  15. console.log('App Show')
  16. },
  17. onHide: function () {
  18. console.log('App Hide')
  19. },
  20. // #ifdef APP-ANDROID
  21. onLastPageBackPress: function () {
  22. console.log('App LastPageBackPress')
  23. if (firstBackTime == 0) {
  24. uni.showToast({
  25. title: '再按一次退出应用',
  26. position: 'bottom',
  27. })
  28. firstBackTime = Date.now()
  29. setTimeout(() => {
  30. firstBackTime = 0
  31. }, 2000)
  32. } else if (Date.now() - firstBackTime < 2000) {
  33. firstBackTime = Date.now()
  34. uni.exit()
  35. }
  36. },
  37. // #endif
  38. onExit: function () {
  39. console.log('App Exit')
  40. },
  41. }
  42. </script>
  43. <style>
  44. @import "@/static/iconfont.css";
  45. @import "css/header.css";
  46. /*每个页面公共css */
  47. body{
  48. background-color: #ffffff;
  49. }
  50. body {
  51. font-family: Arial, sans-serif;
  52. margin: 0;
  53. padding: 0;
  54. }
  55. body::-webkit-scrollbar {
  56. display: none;
  57. }
  58. @media only screen and (-webkit-min-device-pixel-ratio:2),(min-device-pixel-ratio:2){
  59. .uni-hairline{
  60. border-width: 0.5px !important;
  61. }
  62. .uni-nbfc {
  63. background-color: transparent !important;
  64. }
  65. }
  66. @media screen and (min-width: 320px) {
  67. html {font-size: 14px;}
  68. }
  69. @media screen and (min-width: 360px) {
  70. html {font-size: 16px;}
  71. }
  72. @media screen and (min-width: 400px) {
  73. html {font-size: 18px;}
  74. }
  75. @media screen and (min-width: 440px) {
  76. html {font-size: 20px;}
  77. }
  78. @media screen and (min-width: 480px) {
  79. html {font-size: 22px;}
  80. }
  81. @media screen and (min-width: 640px) {
  82. html {font-size: 28px;}
  83. }
  84. </style>