xuminyi
Aiden 1 year ago
parent 9a840e4064
commit fcd18576c7

@ -1,17 +1,19 @@
<script> <script>
export default { export default {
onLaunch: function() { onLaunch: function() {
console.log('App Launch') console.log("App Launch");
}, },
onShow: function() { onShow: function() {
console.log('App Show') console.log("App Show");
}, },
onHide: function() { onHide: function() {
console.log('App Hide') console.log("App Hide");
}
} }
};
</script> </script>
<style> <style lang="scss">
/*每个页面公共css */ /* 引入的uview-ui的index.scss放第一行引入 */
@import "uview-ui/index.scss";
/*每个页面公共css */
</style> </style>

1538
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -0,0 +1,5 @@
{
"dependencies": {
"sass-loader": "^13.3.2"
}
}

@ -1,9 +1,46 @@
<template> <template>
<view>123</view> <view class="main">
<image src="@/static/image/logo.png" mode="scaleToFill" class="logo" />
<button
class="btn"
v-if="isShow"
open-type="getPhoneNumber"
@getphonenumber="getPhoneNumber"
>点击登录</button>
<button class="btn" v-if="isLogoutShow" @click="login"></button>
</view>
</template> </template>
<script> <script>
export default {}; export default {
data() {
return {
code: "",
openId: "",
isShow: false,
isLogoutShow: false
};
},
methods: {
async getPhoneNumber(e) {
if (e.detail.errMsg == "getPhoneNumber:ok") {
//
let res = await this.$api.user.loginToken({
wxPhoneCode: e.detail.code,
openid: this.openId
});
if (res.status == 0) {
uni.setStorageSync("token", res.data.token);
// uni.redirectTo({
// url: "../home/index"
// });
}
} else {
this.$common.msgToast("请不要拒绝哟~重新点击登录");
}
}
}
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@ -13,4 +50,35 @@ page {
background-attachment: fixed; background-attachment: fixed;
height: 100vh; height: 100vh;
} }
.main {
height: 100%;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
.logo {
width: 237rpx;
height: 390rpx;
}
.btn {
background: transparent;
width: 200rpx;
position: fixed;
bottom: 15%;
color: red;
left: 50%;
transform: translateX(-50%);
font-size: 30rpx;
transition: all 1s;
animation: jump 1s ease-in-out infinite alternate;
}
@keyframes jump {
from {
bottom: 16%;
}
to {
bottom: 15%;
}
}
}
</style> </style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Loading…
Cancel
Save