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

personal.vue 6.3 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年前
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270
  1. <template>
  2. <view class="main">
  3. <u-navbar title="我的" size="16" :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/help-icon.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: 750rpx;
  174. height: 100vh;
  175. display: flex;
  176. flex-direction: column;
  177. background: url('https://static.quhouse.com/efadbd8a89f94e98b37eb59dc8074f83.png') no-repeat;
  178. background-size: 750rpx 600rpx;
  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. border-radius: 18rpx;
  189. box-shadow: 0 3rpx 10rpx #999;
  190. .header-zuo {
  191. width: 128rpx;
  192. height: 128rpx;
  193. margin-left: 40rpx;
  194. }
  195. .header-you {
  196. margin-left: 30rpx;
  197. .userName {
  198. margin-bottom: 20rpx;
  199. font-size: 36rpx;
  200. font-weight: 500;
  201. color: #fff;
  202. font-family: PingFangSC-Medium, PingFang SC;
  203. }
  204. .mobile {
  205. font-size: 30rpx;
  206. color: #fff;
  207. }
  208. }
  209. }
  210. .settingGroup {
  211. position: relative;
  212. margin-top: 30rpx;
  213. flex-grow: 1;
  214. display: flex;
  215. flex-direction: column;
  216. color: #333333;
  217. font-size: 30rpx;
  218. border-radius: 12rpx;
  219. .line {
  220. height: 44rpx;
  221. margin: 0 50rpx 60rpx;
  222. display: flex;
  223. align-items: center;
  224. justify-content: space-between;
  225. .title {
  226. display: flex;
  227. align-items: center;
  228. width: 300rpx;
  229. height:44rpx;
  230. line-height: 44rpx;
  231. font-size: 32rpx;
  232. font-family: PingFangSC-Regular, PingFang SC;
  233. font-weight: 400;
  234. color: #333333;
  235. image{
  236. width: 36rpx;
  237. height: 36rpx;
  238. margin-right: 20rpx;
  239. }
  240. }
  241. .right{
  242. image{
  243. width: 12rpx;
  244. height: 28rpx;
  245. }
  246. }
  247. }
  248. .loginout {
  249. position: absolute;
  250. left: 40rpx;
  251. right: 40rpx;
  252. bottom: 50rpx;
  253. width: 670rpx;
  254. height: 92rpx;
  255. background: #F8F8F8;
  256. border-radius: 8rpx;
  257. display: flex;
  258. align-items: center;
  259. justify-content: center;
  260. }
  261. }
  262. </style>