AI销管
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

personal.vue 5.7 KiB

2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253
  1. <template>
  2. <view class="main">
  3. <!-- 头部开始 -->
  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. }
  163. .header {
  164. width: 670rpx;
  165. height: 248rpx;
  166. display: flex;
  167. align-items: center;
  168. background: url('https://static.quhouse.com/10fa8f6fe7fa4104a5c4149be4735311.png') no-repeat;
  169. background-size: 670rpx 248rpx;
  170. margin: 0 40rpx 60rpx;
  171. .header-zuo {
  172. width: 128rpx;
  173. height: 128rpx;
  174. margin-left: 40rpx;
  175. }
  176. .header-you {
  177. margin-left: 30rpx;
  178. .userName {
  179. margin-bottom: 20rpx;
  180. font-size: 36rpx;
  181. font-weight: 500;
  182. color: #fff;
  183. font-family: PingFangSC-Medium, PingFang SC;
  184. }
  185. .mobile {
  186. font-size: 30rpx;
  187. color: #fff;
  188. }
  189. }
  190. }
  191. .settingGroup {
  192. position: relative;
  193. margin-top: 30rpx;
  194. flex-grow: 1;
  195. display: flex;
  196. flex-direction: column;
  197. color: #333333;
  198. font-size: 30rpx;
  199. border-radius: 12rpx;
  200. background-color: #fff;
  201. .line {
  202. height: 44rpx;
  203. margin: 0 50rpx 60rpx;
  204. display: flex;
  205. align-items: center;
  206. justify-content: space-between;
  207. .title {
  208. display: flex;
  209. align-items: center;
  210. width: 300rpx;
  211. height:44rpx;
  212. line-height: 44rpx;
  213. font-size: 32rpx;
  214. font-family: PingFangSC-Regular, PingFang SC;
  215. font-weight: 400;
  216. color: #333333;
  217. image{
  218. width: 36rpx;
  219. height: 36rpx;
  220. margin-right: 20rpx;
  221. }
  222. }
  223. .right{
  224. image{
  225. width: 12rpx;
  226. height: 28rpx;
  227. }
  228. }
  229. }
  230. .loginout {
  231. position: absolute;
  232. left: 40rpx;
  233. right: 40rpx;
  234. bottom: 50rpx;
  235. width: 670rpx;
  236. height: 92rpx;
  237. background: #F8F8F8;
  238. border-radius: 8rpx;
  239. display: flex;
  240. align-items: center;
  241. justify-content: center;
  242. }
  243. }
  244. </style>