login.vue 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <template>
  2. <view class="">
  3. <u-modal v-model="loginshow" width="566" :show-cancel-button="true"
  4. :title-style="{color: 'black',fontWeight:800,fontSize:'32rpx'}">
  5. <view class="slot-content">
  6. <view class="content">
  7. <view class="userinfo-avatar">
  8. <open-data type="userAvatarUrl"></open-data>
  9. </view>
  10. <open-data type="userNickName"></open-data>
  11. <text class="subtitle">申请获取您的公开信息(昵称,头像)</text>
  12. </view>
  13. </view>
  14. <button @click="getUserInfo" slot="confirm-button" class="cu-btn u-reset-button"
  15. style="width: 100%;height: 100%;border-radius: 0;background-color: #FFFFFF;">确认</button>
  16. </u-modal>
  17. </view>
  18. </template>
  19. <script>
  20. export default {
  21. name: '',
  22. data() {
  23. return {
  24. loginshow: false
  25. };
  26. },
  27. methods: {
  28. getUserInfo() {
  29. this.$u.vuex('vuex_isAuth', true)
  30. this.$emit('signIn')
  31. },
  32. show(){
  33. this.loginshow=true
  34. },
  35. hide(){
  36. this.loginshow=false
  37. }
  38. }
  39. };
  40. </script>
  41. <style lang="scss" scoped>
  42. .slot-content {
  43. padding: 30rpx 0rpx;
  44. }
  45. .content {
  46. display: flex;
  47. justify-content: center;
  48. align-items: center;
  49. flex-direction: column;
  50. padding-top: 30rpx;
  51. padding-bottom: 100rpx;
  52. .userinfo-avatar {
  53. overflow: hidden;
  54. display: block;
  55. width: 140rpx;
  56. height: 140rpx;
  57. margin: 20rpx 0rpx 40rpx;
  58. border-radius: 50%;
  59. border: 2px solid #fff;
  60. }
  61. .subtitle {
  62. color: #7e7e7e;
  63. font-size: 26upx;
  64. margin-top: 30rpx;
  65. }
  66. }
  67. </style>