empty.vue 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <template>
  2. <view style="background-color: #fff;min-height: 100vh;">
  3. <view class="default">
  4. <image src="/static/common/empty.png"></image>
  5. <view style="font-size: 26rpx;">
  6. <text style="color: #909090;">{{msg}}</text>
  7. </view>
  8. <navigator :url="url" class="cu-btn sm margin-top-50"
  9. style="padding: 35rpx 65rpx;margin-left: 8rpx;background-color: #FFFFFF;border: 1rpx solid #d0d0d0;color: #606266;font-size: 26rpx;">
  10. {{btnName}}
  11. </navigator>
  12. </view>
  13. </view>
  14. </template>
  15. <script>
  16. export default {
  17. data() {
  18. return {
  19. msg: "您还未完成注册认证",
  20. btnName: "去注册认证",
  21. url: "../register/register"
  22. };
  23. },
  24. onLoad(options) {
  25. if (options.type == 2) {
  26. this.getHouseUser()
  27. this.initData()
  28. }
  29. },
  30. methods: {
  31. initData() {
  32. //导航栏标题
  33. uni.setNavigationBarTitle({
  34. title: "房屋认证"
  35. })
  36. //去认证
  37. this.msg = "您还未完成房屋认证"
  38. this.btnName = "去认证"
  39. },
  40. async getHouseUser() {
  41. let member = getApp().globalData.member
  42. if (this.$isEmpty(member)) {
  43. this.url = "../auth/auth"
  44. return
  45. }
  46. let params = {
  47. name: member.name,
  48. phone: member.tel
  49. }
  50. let res = await this.$http.getHouseUserCondition(params)
  51. let list = res.data.data
  52. if (this.$isEmpty(list)) {
  53. this.url = "../auth/auth"
  54. return
  55. }
  56. uni.setStorageSync('houseList', list)
  57. this.url = "../bindRoom/bindRoom"
  58. }
  59. }
  60. };
  61. </script>
  62. <style lang="scss" scoped>
  63. .default {
  64. text-align: center;
  65. position: fixed;
  66. left: 50%;
  67. top: 40%;
  68. transform: translate(-50%, -70%);
  69. }
  70. .default text {
  71. color: #AAAAAA;
  72. }
  73. .default image {
  74. height: 180rpx;
  75. width: 180rpx;
  76. display: inline-block;
  77. }
  78. </style>