Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 

254 righe
5.9 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/messageList">
  18. <view class="title">
  19. <image src="/static/images/studyhot.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. <navigator class="line" url="/pages/mine/subscribe">
  27. <view class="title">
  28. <image src="/static/images/studyhot.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. </navigator>
  35. <navigator class="line" url="/pages/mine/Myprofile">
  36. <view class="title">
  37. <image src="/static/images/setting.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. </navigator>
  44. <view class="line" @click="phone">
  45. <view class="title">
  46. <image src="/static/images/Customer.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 class="line" @click="Changehepassword">
  54. <view class="title">
  55. <image src="/static/images/password.png" style="width: 36rpx;height: 36rpx;" mode=""></image>
  56. 修改密码
  57. </view>
  58. <view class="right">
  59. <image src="/static/images/arrow.png" style="width: 18rpx;height: 32rpx;" mode=""></image>
  60. </view>
  61. </view>
  62. <view class="line" @click="logout" style="border: none;">
  63. <view class="title">
  64. <image src="/static/images/exit.png" style="width: 36rpx;height: 36rpx;" mode=""></image>
  65. 退出登录
  66. </view>
  67. <view class="right">
  68. <image src="/static/images/arrow.png" style="width: 18rpx;height: 32rpx;" mode=""></image>
  69. </view>
  70. </view>
  71. </view>
  72. </view>
  73. </template>
  74. <script>
  75. var app = getApp();
  76. var util = require("../../utils/util.js");
  77. var config = require("../../config");
  78. export default {
  79. data() {
  80. return {
  81. tabList: [
  82. {
  83. name: '系统消息'
  84. },
  85. {
  86. name: '升级公告'
  87. },
  88. ],
  89. name: "",
  90. photo: "",
  91. mobile: "",
  92. };
  93. },
  94. onShow: function() {
  95. var userInfos = uni.getStorageSync('weapp_session_userInfo_data');
  96. this.name = userInfos.name,
  97. this.photo = userInfos.picUrl,
  98. this.mobile = userInfos.loginName
  99. },
  100. methods: {
  101. //拨打电话
  102. phone() {
  103. wx.makePhoneCall({
  104. phoneNumber: '4008191707,8888' //仅为示例,并非真实的电话号码
  105. })
  106. },
  107. //修改密码
  108. Changehepassword() {
  109. uni.navigateTo({
  110. url: '/pages/mine/Changehepassword'
  111. });
  112. },
  113. //退出
  114. logout() {
  115. uni.showModal({
  116. title: '提示',
  117. content: '确定要退出?',
  118. cancelColor: "#999999",
  119. showCancel: true,
  120. success(res) {
  121. if (res.confirm) {
  122. app.Closewebsocke()
  123. uni.clearStorageSync(); //清除缓存
  124. uni.showToast({
  125. icon: "none",
  126. title: "退出成功"
  127. })
  128. uni.reLaunch({
  129. url: '/pages/login/index'
  130. });
  131. }
  132. }
  133. });
  134. },
  135. // tosubscr(){
  136. // let that=this;
  137. // wx.login({
  138. // success (res) {
  139. // if (res.code) {
  140. // let appid ='wxd9748307889cbe0d';
  141. // let secret = 'cfc40d2b86b650e216e900a2c430cd2b'
  142. // let url = 'https://api.weixin.qq.com/sns/jscode2session?appid=' + appid + '&secret=' + secret + '&js_code=' +res.code + '&grant_type=authorization_code';
  143. // uni.request({
  144. // url: url, // 请求路径
  145. // success: result => {
  146. // that.$u.get("/user/bindMessage",{
  147. // openId:result.data.openid,
  148. // loginName:that.mobile
  149. // }).then(data => {
  150. // console.log(data)
  151. // })
  152. // }
  153. // })
  154. // } else {
  155. // console.log('登录失败!' + res.errMsg)
  156. // }
  157. // }
  158. // })
  159. // // /pages/mine/subscribe
  160. // },
  161. }
  162. };
  163. </script>
  164. <style lang="scss" scoped>
  165. .main {
  166. padding: 0 30rpx;
  167. background: #F8F8F8;
  168. display: flex;
  169. flex-direction: column;
  170. min-height: 100vh;
  171. padding-bottom: 40rpx;
  172. .backTop {
  173. background: #2671E2;
  174. position: absolute;
  175. left: 0;
  176. top: 0;
  177. width: 750rpx;
  178. height: 171rpx;
  179. }
  180. .box {
  181. background: #ffffff;
  182. }
  183. }
  184. .header {
  185. z-index: 2;
  186. width: 100%;
  187. height: 212rpx;
  188. border-radius: 12rpx;
  189. margin-top: 42rpx;
  190. display: flex;
  191. .header-zuo {
  192. width: 148rpx;
  193. height: 148rpx;
  194. margin-top: 32rpx;
  195. margin-left: 30rpx;
  196. }
  197. .header-you {
  198. margin-left: 20rpx;
  199. .userName {
  200. font-size: 36rpx;
  201. font-weight: 500;
  202. color: #303030;
  203. margin-top: 56rpx;
  204. }
  205. .mobile {
  206. font-size: 30rpx;
  207. color: #BDBDBD;
  208. margin-top: 20rpx;
  209. }
  210. }
  211. }
  212. .settingGroup {
  213. box-shadow: 0px 0px 12px 0px rgba(224, 224, 224, 0.3);
  214. border-radius: 12rpx;
  215. margin-top: 30rpx;
  216. color: #333333;
  217. font-size: 30rpx;
  218. display: flex;
  219. flex-direction: column;
  220. .line {
  221. height: 118rpx;
  222. border-bottom: 1rpx solid #EEEEEE;
  223. margin: 0 38rpx 0 30rpx;
  224. display: flex;
  225. align-items: center;
  226. justify-content: space-between;
  227. .title {
  228. display: flex;
  229. align-items: center;
  230. width: 190rpx;
  231. justify-content: space-between;
  232. }
  233. }
  234. }
  235. </style>