租房小程序前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

208 lines
6.4 KiB

6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
  1. <template>
  2. <view class="u-page">
  3. <view class="se-pt-30 se-pb-60 se-px-40 se-bgc-green se-c-white se-pos">
  4. <view class="se-flex">
  5. <image @click="onHead" :src="user.headImage" class="se-br-p-50 se-bgc-f9 se-w-120 se-h-120" mode=""></image>
  6. <view class="se-ml-20 se-flex se-flex-v-sa se-flex-ai-fs">
  7. <view class="se-flex">
  8. <text class="se-fw-6 se-fs-30">{{user.nickName?user.nickName:'暂无昵称'}}</text>
  9. <!-- <view class="se-flex se-flex-ai-c se-ml-20">
  10. <image class="se-a-25 se-mr-10" src="@/static/image/pencil.png" mode=""></image>
  11. <text class="se-fs-22">修改资料</text>
  12. </view> -->
  13. </view>
  14. <view class="se-fs-24 se-display-ib" v-if="user.phone">
  15. <text>手机号:</text>
  16. <text class="se-ml-20">{{user.phone}}</text>
  17. </view>
  18. </view>
  19. </view>
  20. <!-- <view class="se-pos-cb se-flex se-flex-h-sb se-w-vw-82 se-br-10 se-bgc-white se-py-30 se-px-20"
  21. style="bottom: -90rpx;">
  22. <view class="se-flex se-flex-v-c se-flex-1">
  23. <image src="@/static/image/46892@2x.png" class="se-a-80" mode=""></image>
  24. <view @click="onNavigateTo()" class=" se-ta-c se-fw-6 se-br-30 se-mt-10 se-py-5 se-px-22 se-c-black se-fs-22 ">
  25. 我的钱包
  26. </view>
  27. </view>
  28. <view class="se-flex se-flex-v-c se-flex-1 ">
  29. <image src="@/static/image/47077@2x.png" class="se-a-80" mode=""></image>
  30. <view @click="onNavigateTo()" class=" se-ta-c se-fw-6 se-br-30 se-mt-10 se-py-5 se-px-22 se-c-black se-fs-22 ">
  31. 我的预约
  32. </view>
  33. </view>
  34. <view class="se-flex se-flex-v-c se-flex-1 ">
  35. <image src="@/static/image/47065@2x.png" class="se-a-80" mode=""></image>
  36. <view @click="onNavigateTo()" class=" se-ta-c se-fw-6 se-br-30 se-mt-10 se-py-5 se-px-22 se-c-black se-fs-22 ">
  37. 我的收藏
  38. </view>
  39. </view>
  40. <view class="se-flex se-flex-v-c se-flex-1 ">
  41. <image src="@/static/image/46896@2x.png" class="se-a-80" mode=""></image>
  42. <view @click="onNavigateTo()" class=" se-ta-c se-fw-6 se-br-30 se-mt-10 se-py-5 se-px-22 se-c-black se-fs-22 ">
  43. 需求发布
  44. </view>
  45. </view>
  46. </view> -->
  47. </view>
  48. <view class="se-m-30 se-mt-30 se-pl-30 se-pr-20 se-br-20 se-bgc-white">
  49. <view class="se-py-30 se-px-20 se-flex se-flex-h-sb se-b-b" @click="onBrokerAccount">
  50. <view class="se-flex se-flex-ai-c">
  51. <image class="se-a-30" src="@/static/image/home4734.png" mode=""></image>
  52. <text class="se-ml-20 se-fs-24 se-fw-5">经纪人账号</text>
  53. </view>
  54. <view class="se-flex se-flex-ai-c">
  55. <uv-icon name="arrow-right"></uv-icon>
  56. </view>
  57. </view>
  58. <view class="se-py-30 se-px-20 se-flex se-flex-h-sb se-b-b" @click="onLandlord">
  59. <view class="se-flex se-flex-ai-c">
  60. <image class="se-a-30" src="@/static/image/home4734.png" mode=""></image>
  61. <text class="se-ml-20 se-fs-24 se-fw-5">房东中心</text>
  62. </view>
  63. <view class="se-flex se-flex-ai-c">
  64. <uv-icon name="arrow-right"></uv-icon>
  65. </view>
  66. </view>
  67. <view class="se-py-30 se-px-20 se-flex se-flex-h-sb se-b-b" @click="onBrokerCenter">
  68. <view class="se-flex se-flex-ai-c">
  69. <image class="se-a-30" src="@/static/image/47100.png" mode=""></image>
  70. <text class="se-ml-20 se-fs-24 se-fw-5">经纪人中心</text>
  71. </view>
  72. <view class="se-flex se-flex-ai-c">
  73. <uv-icon name="arrow-right"></uv-icon>
  74. </view>
  75. </view>
  76. <view class="se-py-30 se-px-20 se-flex se-flex-h-sb se-b-b" @click="onCustomerService">
  77. <view class="se-flex se-flex-ai-c">
  78. <image class="se-a-30" src="@/static/image/user49384.png" mode=""></image>
  79. <text class="se-ml-20 se-fs-24 se-fw-5">在线客服</text>
  80. </view>
  81. <view class="se-flex se-flex-ai-c">
  82. <uv-icon name="arrow-right"></uv-icon>
  83. </view>
  84. </view>
  85. <view class="se-py-30 se-px-20 se-flex se-flex-h-sb" @click="onVersion">
  86. <view class="se-flex se-flex-ai-c">
  87. <image class="se-a-30" src="@/static/image/47186.png" mode=""></image>
  88. <text class="se-ml-20 se-fs-24 se-fw-5">关于我们</text>
  89. </view>
  90. <view class="se-flex se-flex-ai-c">
  91. <uv-icon name="arrow-right"></uv-icon>
  92. </view>
  93. </view>
  94. <view class="se-py-30 se-px-20 se-flex se-flex-h-sb se-b-t" @click="onLogOut">
  95. <view class="se-flex se-flex-ai-c">
  96. <text class="se-fs-24 se-fw-5">退出登录</text>
  97. </view>
  98. <view class="se-flex se-flex-ai-c">
  99. <uv-icon name="arrow-right"></uv-icon>
  100. </view>
  101. </view>
  102. </view>
  103. </view>
  104. </template>
  105. <script>
  106. import { getInfo } from "@/common/api.js"
  107. export default {
  108. data() {
  109. return {
  110. user:{}
  111. }
  112. },
  113. onLoad() {
  114. },
  115. onShow() {
  116. this.onInfo()
  117. },
  118. methods: {
  119. onHead(){
  120. uni.navigateTo({
  121. url:"/pages/login/index?back="+1
  122. })
  123. },
  124. onInfo(){
  125. let that = this
  126. that.user = uni.getStorageSync('userInfo')
  127. getInfo({}).then(response=>{
  128. that.user = response.result
  129. console.info('response',response)
  130. }).catch(error=>{
  131. })
  132. },
  133. onLandlord(){
  134. uni.navigateTo({
  135. url:"/pages_subpack/landlord-center/index"
  136. })
  137. },
  138. onBrokerCenter(){
  139. uni.navigateTo({
  140. url:"/pages_subpack/broker-center/index"
  141. })
  142. },
  143. onVersion(){
  144. uni.navigateTo({
  145. url:"/pages_subpack/version/index"
  146. })
  147. },
  148. onBrokerAccount(){
  149. uni.navigateTo({
  150. url:"/pages_subpack/broker-account/index"
  151. })
  152. },
  153. onLogOut(){
  154. uni.showModal({
  155. title:"温馨提示",
  156. content:"确定退出当前登录",
  157. cancelText:"取消",
  158. confirmText:"确定",
  159. success:(res)=> {
  160. console.info(res)
  161. if(res.confirm==true){
  162. uni.removeStorageSync("userInfo")
  163. uni.removeStorageSync("token")
  164. uni.removeStorageSync("sessionKey")
  165. uni.navigateTo({
  166. url:"/pages/auth/index"
  167. })
  168. }
  169. }
  170. })
  171. },
  172. onCustomerService(){
  173. let that = this
  174. let obj = that.$utils.getkeyContent('phone')
  175. if (uni.canIUse('makePhoneCall')) {
  176. uni.makePhoneCall({
  177. phoneNumber: obj.keyContent, // 电话号码
  178. success: function () {
  179. console.log('拨打电话成功');
  180. },
  181. fail: function () {
  182. console.log('拨打电话失败');
  183. }
  184. });
  185. } else {
  186. console.log('你的设备不支持拨打电话功能');
  187. }
  188. }
  189. }
  190. }
  191. </script>
  192. <style>
  193. page {
  194. background-color: #f5f5f5 !important;
  195. }
  196. .se-grid {
  197. display: grid;
  198. grid-template-columns: 1fr 1fr 1fr 1fr;
  199. gap: 10rpx;
  200. padding-bottom: 4rpx;
  201. }
  202. </style>