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.
 
 
 

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