GetOwnerHouse.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <template>
  2. <div>
  3. <van-nav-bar
  4. @click-left="onClickLeft"
  5. @click-right="onClickRight"
  6. style="background-color: #1989fa"
  7. >
  8. <template #title>
  9. <van-col style="color: #ffffff">房产信息</van-col>
  10. </template>
  11. <template #left>
  12. <i
  13. class="fa fa-arrow-circle-left"
  14. aria-hidden="true"
  15. style="color: #ffffff; font-size: 18px"
  16. ></i>
  17. </template>
  18. <template #right>
  19. <van-icon name="replay" size="18" color="#ffffff" />
  20. </template>
  21. </van-nav-bar>
  22. <van-row class="borderTop" v-for="item in info" :key="item.hcode">
  23. <van-col span="24">
  24. <van-row>
  25. <van-col span="19" class="paddingLeft15"><van-icon name="friends" color="#ff6600" />{{ item.bname }}</van-col>
  26. </van-row>
  27. <van-row>
  28. <van-col span="19" class="paddingLeft15"><van-icon name="location" color="#ff6600"/>{{ item.hname }}</van-col>
  29. </van-row>
  30. </van-col>
  31. </van-row>
  32. </div>
  33. </template>
  34. <script>
  35. import { GetOwnerHouse } from "@/common/api/loginApi.js";
  36. export default {
  37. name: "login",
  38. data() {
  39. return {
  40. info: [], //房产信息
  41. };
  42. },
  43. created: function () {
  44. console.info("created");
  45. //console.info(this.$util);
  46. this.$util.persistLogin(this);
  47. this.GetOwnerHouse();
  48. },
  49. methods: {
  50. GetOwnerHouse: function () { //获取房产信息
  51. var that = this;
  52. let phone=that.$store.state.data.tel;
  53. if(that.$util.isEmpty(phone))
  54. {
  55. that.$router.push('/');
  56. return;
  57. }
  58. GetOwnerHouse(phone).then((res) => {
  59. console.info("GetOwnerHouse", res);
  60. if (!res.isSuccess) {
  61. that.$toast(res.errMsg);
  62. return;
  63. }
  64. res.data.forEach(function(item,index,arr) {
  65. that.$set(that.info,index,item);
  66. });
  67. //that.loading = false;
  68. //that.finished = true;
  69. });
  70. },
  71. onClickLeft() {
  72. // this.$toast('返回')
  73. console.info("left");
  74. this.$router.go(-1);
  75. },
  76. onClickRight() {
  77. this.$router.go(0);
  78. },
  79. },
  80. };
  81. </script>
  82. <!-- Add "scoped" attribute to limit CSS to this component only -->
  83. <style scoped>
  84. .title1 {
  85. color: #999;
  86. }
  87. .value1 {
  88. color: #999;
  89. font-size: 15px;
  90. }
  91. .borderTop{
  92. margin-top:50px;
  93. }
  94. .paddingLeft15{
  95. padding-left: 15px;
  96. text-align: left;
  97. height: 50px;
  98. line-height: 50px;
  99. font-size: 28px;
  100. }
  101. </style>