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.
 
 
 
 

271 line
6.3 KiB

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