AI销管
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.
 
 
 
 

255 lines
5.9 KiB

  1. <template>
  2. <view class="main">
  3. <u-navbar title="我的" :autoback="false" :titleStyle="{color: black}"> </u-navbar>
  4. <view class="header">
  5. <view class="header-zuo">
  6. <u-avatar
  7. :src="photo?photo:'/static/images/avatar.png'"
  8. size="128"></u-avatar>
  9. </view>
  10. <view class="header-you">
  11. <view class="userName u-line-2">
  12. {{name}}
  13. </view>
  14. <view class="mobile">{{mobile}}</view>
  15. </view>
  16. </view>
  17. <view class="settingGroup">
  18. <!-- <navigator class="line" url="/pages/mine/messageList">
  19. <view class="title" style="width: 19%;">
  20. <image src="/static/images/studyhot.png" mode=""></image>
  21. 消息
  22. </view>
  23. <view class="right">
  24. <image src="/static/images/right-arrow.png" mode=""></image>
  25. </view>
  26. </navigator> -->
  27. <navigator class="line" url="/pages/mine/Myprofile">
  28. <view class="title">
  29. <image src="/static/images/setting.png" mode=""></image>
  30. 个人资料
  31. </view>
  32. <view class="right">
  33. <image src="/static/images/right-arrow.png" mode=""></image>
  34. </view>
  35. </navigator>
  36. <view class="line" @click="Changehepassword">
  37. <view class="title">
  38. <image src="/static/images/password.png" mode=""></image>
  39. 修改密码
  40. </view>
  41. <view class="right">
  42. <image src="/static/images/right-arrow.png" mode=""></image>
  43. </view>
  44. </view>
  45. <view class="line" @click="phone">
  46. <view class="title">
  47. <image src="/static/images/concat.png" mode=""></image>
  48. 联系客服
  49. </view>
  50. <view class="right">
  51. <image src="/static/images/right-arrow.png" mode=""></image>
  52. </view>
  53. </view>
  54. <view class="line" @click="scan">
  55. <view class="title">
  56. <image src="/static/images/visitCode.png" mode=""></image>
  57. 访客登记码
  58. </view>
  59. <view class="right">
  60. <image src="/static/images/right-arrow.png" mode=""></image>
  61. </view>
  62. </view>
  63. <view class="loginout" @click="logout" style="border: none;">
  64. <view class="title">
  65. 退出登录
  66. </view>
  67. </view>
  68. </view>
  69. <!-- 底部导航栏 -->
  70. <!-- <u-tabbar :isBtnTop="false" :mid-button="true" activeColor="#1296db" inactiveColor="#999999" v-model="current" :list="tabbarList"></u-tabbar> -->
  71. </view>
  72. </template>
  73. <script>
  74. var app = getApp();
  75. var util = require("../../utils/util.js");
  76. var config = require("../../config");
  77. import tabbarList from '@/utils/tabbar.js'
  78. export default {
  79. data() {
  80. return {
  81. // tabbar配置项
  82. current: 0,
  83. tabbarList: tabbarList,
  84. //--- end --- tabbar配置项
  85. name: "",
  86. photo: "",
  87. mobile: "",
  88. };
  89. },
  90. onShow: function() {
  91. var userInfos = uni.getStorageSync('weapp_session_userInfo_data');
  92. this.name = userInfos.name,
  93. this.photo = userInfos.avatar,
  94. this.mobile = userInfos.username
  95. },
  96. methods: {
  97. //拨打电话
  98. phone() {
  99. wx.makePhoneCall({
  100. phoneNumber: '4008191707,8888' //仅为示例,并非真实的电话号码
  101. })
  102. },
  103. scan(){
  104. uni.navigateTo({
  105. url:"../mine/registerCode"
  106. })
  107. },
  108. //修改密码
  109. Changehepassword() {
  110. uni.navigateTo({
  111. url: '/pages/mine/Changehepassword'
  112. });
  113. },
  114. //退出
  115. logout() {
  116. uni.showModal({
  117. title: '提示',
  118. content: '确定要退出?',
  119. cancelColor: "#999999",
  120. showCancel: true,
  121. success(res) {
  122. if (res.confirm) {
  123. uni.request({
  124. url: config.service.logout,
  125. header: {
  126. 'Authorization': 'Basic dGVzdDp0ZXN0',
  127. 'content-type': 'application/x-www-form-urlencoded'
  128. },
  129. method: "DELETE",
  130. success: function(result) {
  131. var data = result.data; //console.log("登录信息", data);
  132. if (data.data == true) {
  133. // app.Closewebsocke()
  134. uni.clearStorageSync(); //清除缓存
  135. uni.showToast({
  136. icon: "none",
  137. title: "退出成功"
  138. })
  139. uni.reLaunch({
  140. url: '/pages/login/index'
  141. });
  142. }
  143. },
  144. // 响应错误
  145. fail: function(loginResponseError) {
  146. util.showNone("网络异常,请重试");
  147. return false;
  148. }
  149. });
  150. }
  151. }
  152. });
  153. }
  154. }
  155. };
  156. </script>
  157. <style lang="scss" scoped>
  158. .main {
  159. min-height: calc(100vh - var(--window-top));
  160. display: flex;
  161. flex-direction: column;
  162. // background: url(https://static.quhouse.com/007d3ea7c9b74ffd9e00ae0918ae1631.png) no-repeat top center;
  163. }
  164. .header {
  165. width: 670rpx;
  166. height: 248rpx;
  167. display: flex;
  168. align-items: center;
  169. background: url('https://static.quhouse.com/10fa8f6fe7fa4104a5c4149be4735311.png') no-repeat;
  170. background-size: 670rpx 248rpx;
  171. margin: 0 40rpx 60rpx;
  172. .header-zuo {
  173. width: 128rpx;
  174. height: 128rpx;
  175. margin-left: 40rpx;
  176. }
  177. .header-you {
  178. margin-left: 30rpx;
  179. .userName {
  180. margin-bottom: 20rpx;
  181. font-size: 36rpx;
  182. font-weight: 500;
  183. color: #fff;
  184. font-family: PingFangSC-Medium, PingFang SC;
  185. }
  186. .mobile {
  187. font-size: 30rpx;
  188. color: #fff;
  189. }
  190. }
  191. }
  192. .settingGroup {
  193. position: relative;
  194. margin-top: 30rpx;
  195. flex-grow: 1;
  196. display: flex;
  197. flex-direction: column;
  198. color: #333333;
  199. font-size: 30rpx;
  200. border-radius: 12rpx;
  201. background-color: #fff;
  202. .line {
  203. height: 44rpx;
  204. margin: 0 50rpx 60rpx;
  205. display: flex;
  206. align-items: center;
  207. justify-content: space-between;
  208. .title {
  209. display: flex;
  210. align-items: center;
  211. width: 300rpx;
  212. height:44rpx;
  213. line-height: 44rpx;
  214. font-size: 32rpx;
  215. font-family: PingFangSC-Regular, PingFang SC;
  216. font-weight: 400;
  217. color: #333333;
  218. image{
  219. width: 36rpx;
  220. height: 36rpx;
  221. margin-right: 20rpx;
  222. }
  223. }
  224. .right{
  225. image{
  226. width: 12rpx;
  227. height: 28rpx;
  228. }
  229. }
  230. }
  231. .loginout {
  232. position: absolute;
  233. left: 40rpx;
  234. right: 40rpx;
  235. bottom: 50rpx;
  236. width: 670rpx;
  237. height: 92rpx;
  238. background: #F8F8F8;
  239. border-radius: 8rpx;
  240. display: flex;
  241. align-items: center;
  242. justify-content: center;
  243. }
  244. }
  245. </style>