租房小程序前端代码
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.

227 lines
6.8 KiB

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