mybroker.vue 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <template>
  2. <view>
  3. <view class="pageview">
  4. <view class="padding-xl"></view>
  5. <view class="cu-list menu sm-border card-menu">
  6. <view class="cu-item">
  7. <view class="content padding-tb">
  8. <text class="cuIcon-peoplefill text-grey"></text>
  9. <text class="text-grey">姓名</text>
  10. </view>
  11. <view class="action">
  12. <text class="text-grey text-lg">{{broker.title}}</text>
  13. </view>
  14. </view>
  15. <view class="cu-item">
  16. <view class="content padding-tb">
  17. <text class="cuIcon-mobilefill text-grey"></text>
  18. <text class="text-grey">手机号码</text>
  19. </view>
  20. <view class="action" @tap="makePhone()">
  21. <text class="text-grey text-lg">{{broker.mobile}}</text>
  22. </view>
  23. </view>
  24. <view class="cu-item">
  25. <view class="content padding-tb">
  26. <text class="cuIcon-weixin text-grey"></text>
  27. <text class="text-grey">微信号</text>
  28. </view>
  29. <view class="action">
  30. <text class="text-grey text-lg">{{broker.weixin}}</text>
  31. </view>
  32. </view>
  33. <view class="cu-item">
  34. <view class="content padding-tb">
  35. <text class="cuIcon-markfill text-grey"></text>
  36. <text class="text-grey">QQ号</text>
  37. </view>
  38. <view class="action">
  39. <text class="text-grey text-lg">{{broker.qq}}</text>
  40. </view>
  41. </view>
  42. </view>
  43. </view>
  44. </view>
  45. </template>
  46. <script>
  47. var _this;
  48. export default {
  49. data() {
  50. return {
  51. userinfo: false,
  52. agent: null,
  53. broker: null
  54. }
  55. },
  56. onLoad: function() {
  57. _this = this;
  58. _this.userinfo = _this.checkLogin("/pages/my/mybroker");
  59. if (_this.userinfo===false){
  60. return false;
  61. }
  62. _this.$req.ajax({
  63. path: "my/getmybroker",
  64. data: {
  65. userid: _this.userinfo.id
  66. }
  67. }).then((data) => {
  68. _this.agent = data.agent;
  69. _this.broker = data.broker;
  70. }).catch((err) => {
  71. uni.showModal({
  72. title: '信息提示',
  73. content: err,
  74. showCancel: false
  75. });
  76. });
  77. },
  78. methods: {
  79. makePhone: function() {
  80. uni.makePhoneCall({
  81. phoneNumber: _this.broker.mobile
  82. });
  83. }
  84. }
  85. }
  86. </script>
  87. <style>
  88. .pageview {
  89. min-height: calc(100vh);
  90. }
  91. </style>