App.vue 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <script>
  2. export default {
  3. onLaunch: function() {
  4. console.log('App Launch')
  5. },
  6. onShow: function() {
  7. const updateManager = uni.getUpdateManager();
  8. updateManager.onCheckForUpdate(function(res) {
  9. if (!res.hasUpdate) {
  10. console.log("暂无可用更新");
  11. }
  12. });
  13. updateManager.onUpdateReady(function(res) {
  14. uni.showModal({
  15. title: '更新提示',
  16. content: '新版本已经准备好,是否重启应用?',
  17. success(res) {
  18. if (res.confirm) {
  19. // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
  20. updateManager.applyUpdate();
  21. }
  22. }
  23. });
  24. });
  25. updateManager.onUpdateFailed(function(res) {});
  26. },
  27. onHide: function() {
  28. console.log('App Hide')
  29. }
  30. }
  31. </script>
  32. <style lang="scss">
  33. page {
  34. // -webkit-filter: grayscale(100%);
  35. background-color: #f3f4f6;
  36. font-size: 28rpx;
  37. color: #606266;
  38. }
  39. img {
  40. width: 100%;
  41. height: 100%;
  42. }
  43. /* #ifdef MP-WEIXIN */
  44. wx-swiper .wx-swiper-dot {
  45. width: 6rpx;
  46. height: 6rpx;
  47. border-radius: 50rpx;
  48. }
  49. wx-swiper .wx-swiper-dot-active {
  50. background-color: #000;
  51. // width: 22rpx;
  52. width: 8rpx;
  53. height: 8rpx;
  54. // border-radius: 5rpx;
  55. }
  56. .goodslist {
  57. swiper-item{
  58. height: 90% !important;
  59. }
  60. }
  61. /* #endif */
  62. @import "@/uview-ui/index.scss";
  63. </style>