empty.vue 1.6 KB

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