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.
 
 
 

224 lines
5.1 KiB

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