| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- <script>
- import Vue from 'vue'
- export default {
- onLaunch: function() {
- uni.getSystemInfo({
- success: function(e) {
- // #ifndef MP
- Vue.prototype.StatusBar = e.statusBarHeight;
- if (e.platform == 'android') {
- Vue.prototype.CustomBar = e.statusBarHeight + 50;
- } else {
- Vue.prototype.CustomBar = e.statusBarHeight + 45;
- };
- // #endif
- // #ifdef MP-WEIXIN || MP-QQ
- Vue.prototype.StatusBar = e.statusBarHeight;
- let capsule = wx.getMenuButtonBoundingClientRect();
- if (capsule) {
- Vue.prototype.Custom = capsule;
- // Vue.prototype.capsuleSafe = uni.upx2px(750) - capsule.left + uni.upx2px(750) - capsule.right;
- Vue.prototype.CustomBar = capsule.bottom + capsule.top - e.statusBarHeight;
- } else {
- Vue.prototype.CustomBar = e.statusBarHeight + 50;
- }
- // #endif
- // #ifdef MP-ALIPAY
- Vue.prototype.StatusBar = e.statusBarHeight;
- Vue.prototype.CustomBar = e.statusBarHeight + e.titleBarHeight;
- // #endif
- }
- })
- },
- onShow: function() {
- console.log('App Show')
- },
- onHide: function() {
- console.log('App Hide')
- },
- methods: {
- getPhoneNumber: function({ params, success, fail }) {
- const { iv, encryptedData } = params;
- tt.login({
- force:true,
- success(lres){
- tt.request({
- url:"https://tran.jsshuita.cn/v2/home/mobile",
- data:{iv:iv,encryptedData:encryptedData,code:lres.code},
- method:"POST",
- success(res){
- var resp = res.data;
- if (resp.code == 0) return ;
- success({ phoneNumber: resp.data.mobile })
- },
- fail(res){
- }
- })
- },
- fail(res){
- }
- })
- },
- }
- }
- </script>
- <style>
- @import "utils/css/main.css";
- @import "utils/css/icon.css";
- .skeleton-line{
- background: linear-gradient(90deg, #f1f2f4 25%, #e6e6e6 37%, #f1f2f4 50%);
- background-size: 400% 100%;
- border-radius: 3px;
- min-height: 30upx;
- height: 100%;
- width: 100%;
- }
- .mt15{margin-top: 15rpx;}
- .skeleton-line.short{
- width: 60%;
- }
- .skeleton-line.max{
- height: 80upx;
- }
- .animate {
- animation: skeleton 1.8s ease infinite
- }
- @keyframes skeleton {
- 0% {
- background-position: 100% 50%
- }
- 100% {
- background-position: 0 50%
- }
- }
- </style>
|