App.vue 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <script>
  2. import { getStatusBar } from '@/utils/index';
  3. export default {
  4. onLaunch: function() {
  5. console.log('App Launch')
  6. getStatusBar();
  7. },
  8. onShow: function() {
  9. console.log('App Show')
  10. },
  11. onHide: function() {
  12. console.log('App Hide')
  13. },
  14. methods: {
  15. getPhoneNumber: function({ params, success, fail }) {
  16. const { iv, encryptedData } = params;
  17. tt.login({
  18. force:true,
  19. success(lres){
  20. tt.request({
  21. url:"https://tran.jsshuita.cn/dy/home/mobile",
  22. data:{iv:iv,encryptedData:encryptedData,code:lres.code},
  23. method:"POST",
  24. success(res){
  25. var resp = res.data;
  26. if (resp.code == 0) return ;
  27. success({ phoneNumber: resp.data.mobile })
  28. },
  29. fail(res){
  30. }
  31. })
  32. },
  33. fail(res){
  34. }
  35. })
  36. },
  37. }
  38. }
  39. </script>
  40. <style>
  41. .skeleton-line{
  42. background: linear-gradient(90deg, #f1f2f4 25%, #e6e6e6 37%, #f1f2f4 50%);
  43. background-size: 400% 100%;
  44. border-radius: 3px;
  45. height: 30upx;
  46. width: 100%;
  47. margin-top: 20upx;
  48. }
  49. .skeleton-line.short{
  50. width: 60%;
  51. }
  52. .skeleton-line.max{
  53. height: 80upx;
  54. }
  55. .animate {
  56. animation: skeleton 1.8s ease infinite
  57. }
  58. @keyframes skeleton {
  59. 0% {
  60. background-position: 100% 50%
  61. }
  62. 100% {
  63. background-position: 0 50%
  64. }
  65. }
  66. </style>