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.
 
 
 

305 lines
7.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" style="width: 21%;">
  19. <image src="/static/images/studyhot.png" style="width: 36rpx;height: 36rpx;" mode=""></image>
  20. 消息
  21. </view>
  22. <view class="right" style="display: flex;align-items: center;">
  23. <view class="count" v-if="count!=0">{{count}}</view>
  24. <image src="/static/images/arrow.png" style="width: 18rpx;height: 32rpx;" mode=""></image>
  25. </view>
  26. </navigator>
  27. <navigator class="line" url="/pages/mine/subscribe">
  28. <view class="title">
  29. <image src="/static/images/studyhot.png" style="width: 36rpx;height: 36rpx;" mode=""></image>
  30. 订阅消息
  31. </view>
  32. <view class="right">
  33. <image src="/static/images/arrow.png" style="width: 18rpx;height: 32rpx;" mode=""></image>
  34. </view>
  35. </navigator>
  36. <navigator class="line" url="/pages/mine/Myprofile">
  37. <view class="title">
  38. <image src="/static/images/setting.png" style="width: 36rpx;height: 36rpx;" mode=""></image>
  39. 编辑资料
  40. </view>
  41. <view class="right">
  42. <image src="/static/images/arrow.png" style="width: 18rpx;height: 32rpx;" mode=""></image>
  43. </view>
  44. </navigator>
  45. <view class="line" @click="phone">
  46. <view class="title">
  47. <image src="/static/images/Customer.png" style="width: 36rpx;height: 36rpx;" mode=""></image>
  48. 客服电话
  49. </view>
  50. <view class="right">
  51. <image src="/static/images/arrow.png" style="width: 18rpx;height: 32rpx;" mode=""></image>
  52. </view>
  53. </view>
  54. <view class="line" @click="scan">
  55. <view class="title" style="width: 220rpx;">
  56. <image src="/static/images/reg.png" style="width: 36rpx;height: 36rpx;" mode=""></image>
  57. 访客登记码
  58. </view>
  59. <view class="right">
  60. <image src="/static/images/arrow.png" style="width: 18rpx;height: 32rpx;" mode=""></image>
  61. </view>
  62. </view>
  63. <view class="line" @click="Changehepassword">
  64. <view class="title">
  65. <image src="/static/images/password.png" style="width: 36rpx;height: 36rpx;" mode=""></image>
  66. 修改密码
  67. </view>
  68. <view class="right">
  69. <image src="/static/images/arrow.png" style="width: 18rpx;height: 32rpx;" mode=""></image>
  70. </view>
  71. </view>
  72. <view class="line" @click="logout" style="border: none;">
  73. <view class="title">
  74. <image src="/static/images/exit.png" style="width: 36rpx;height: 36rpx;" mode=""></image>
  75. 退出登录
  76. </view>
  77. <view class="right">
  78. <image src="/static/images/arrow.png" style="width: 18rpx;height: 32rpx;" mode=""></image>
  79. </view>
  80. </view>
  81. </view>
  82. <u-tabbar activeColor="#1296db" inactiveColor="#999999" v-model="current" :list="tabbarList"></u-tabbar>
  83. </view>
  84. </template>
  85. <script>
  86. var app = getApp();
  87. var util = require("../../utils/util.js");
  88. var config = require("../../config");
  89. import tabbarList from '@/utils/tabbar.js'
  90. export default {
  91. data() {
  92. return {
  93. tabbarList:tabbarList,
  94. current: 0,
  95. tabList: [
  96. {
  97. name: '系统消息'
  98. },
  99. {
  100. name: '升级公告'
  101. },
  102. ],
  103. name: "",
  104. photo: "",
  105. mobile: "",
  106. count:0,
  107. };
  108. },
  109. onShow: function() {
  110. var userInfos = uni.getStorageSync('weapp_session_userInfo_data');
  111. this.name = userInfos.name,
  112. this.photo = userInfos.picUrl,
  113. this.mobile = userInfos.loginName
  114. this.updateInit()
  115. },
  116. methods: {
  117. updateInit() {
  118. uni.request({
  119. url: config.service.notReadNum,
  120. method: "GET",
  121. data: {
  122. id: uni.getStorageSync('weapp_session_userInfo_data').accountId
  123. },
  124. header: {
  125. 'content-type': 'application/json',
  126. 'Access-Token': uni.getStorageSync('weapp_session_login_data').token
  127. },
  128. success: (res) => {
  129. this.count = res.data.data
  130. this.tabbarList[3].count = res.data.data
  131. }
  132. })
  133. },
  134. scan(){
  135. uni.navigateTo({
  136. url:"../mine/registerCode"
  137. })
  138. },
  139. //拨打电话
  140. phone() {
  141. wx.makePhoneCall({
  142. phoneNumber: '4008191707,8888' //仅为示例,并非真实的电话号码
  143. })
  144. },
  145. //修改密码
  146. Changehepassword() {
  147. uni.navigateTo({
  148. url: '/pages/mine/Changehepassword'
  149. });
  150. },
  151. //退出
  152. logout() {
  153. uni.showModal({
  154. title: '提示',
  155. content: '确定要退出?',
  156. cancelColor: "#999999",
  157. showCancel: true,
  158. success(res) {
  159. if (res.confirm) {
  160. app.Closewebsocke()
  161. uni.clearStorageSync(); //清除缓存
  162. uni.showToast({
  163. icon: "none",
  164. title: "退出成功"
  165. })
  166. uni.reLaunch({
  167. url: '/pages/login/index'
  168. });
  169. }
  170. }
  171. });
  172. },
  173. // tosubscr(){
  174. // let that=this;
  175. // wx.login({
  176. // success (res) {
  177. // if (res.code) {
  178. // let appid ='wxd9748307889cbe0d';
  179. // let secret = 'cfc40d2b86b650e216e900a2c430cd2b'
  180. // let url = 'https://api.weixin.qq.com/sns/jscode2session?appid=' + appid + '&secret=' + secret + '&js_code=' +res.code + '&grant_type=authorization_code';
  181. // uni.request({
  182. // url: url, // 请求路径
  183. // success: result => {
  184. // that.$u.get("/user/bindMessage",{
  185. // openId:result.data.openid,
  186. // loginName:that.mobile
  187. // }).then(data => {
  188. // console.log(data)
  189. // })
  190. // }
  191. // })
  192. // } else {
  193. // console.log('登录失败!' + res.errMsg)
  194. // }
  195. // }
  196. // })
  197. // // /pages/mine/subscribe
  198. // },
  199. }
  200. };
  201. </script>
  202. <style lang="scss" scoped>
  203. .count{
  204. background: red;
  205. width: 50rpx;
  206. height: 50rpx;
  207. border-radius: 40rpx;
  208. color: #FFFFFF;
  209. display: flex;
  210. justify-content: center;
  211. align-items: center;
  212. font-size: 24rpx;
  213. margin-right: 20rpx;
  214. }
  215. .main {
  216. padding: 0 30rpx;
  217. background: #F8F8F8;
  218. display: flex;
  219. flex-direction: column;
  220. min-height: 100vh;
  221. padding-bottom: 40rpx;
  222. .backTop {
  223. background: #2671E2;
  224. position: absolute;
  225. left: 0;
  226. top: 0;
  227. width: 750rpx;
  228. height: 171rpx;
  229. }
  230. .box {
  231. background: #ffffff;
  232. }
  233. }
  234. .header {
  235. z-index: 2;
  236. width: 100%;
  237. height: 212rpx;
  238. border-radius: 12rpx;
  239. margin-top: 42rpx;
  240. display: flex;
  241. .header-zuo {
  242. width: 148rpx;
  243. height: 148rpx;
  244. margin-top: 32rpx;
  245. margin-left: 30rpx;
  246. }
  247. .header-you {
  248. margin-left: 20rpx;
  249. .userName {
  250. font-size: 36rpx;
  251. font-weight: 500;
  252. color: #303030;
  253. margin-top: 56rpx;
  254. }
  255. .mobile {
  256. font-size: 30rpx;
  257. color: #BDBDBD;
  258. margin-top: 20rpx;
  259. }
  260. }
  261. }
  262. .settingGroup {
  263. box-shadow: 0px 0px 12px 0px rgba(224, 224, 224, 0.3);
  264. border-radius: 12rpx;
  265. margin-top: 30rpx;
  266. color: #333333;
  267. font-size: 30rpx;
  268. display: flex;
  269. flex-direction: column;
  270. .line {
  271. height: 118rpx;
  272. border-bottom: 1rpx solid #EEEEEE;
  273. margin: 0 38rpx 0 30rpx;
  274. display: flex;
  275. align-items: center;
  276. justify-content: space-between;
  277. .title {
  278. display: flex;
  279. align-items: center;
  280. width: 190rpx;
  281. justify-content: space-between;
  282. }
  283. }
  284. }
  285. </style>