25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

306 lines
7.4 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. projectId: uni.getStorageSync('buildingID').id,
  124. },
  125. header: {
  126. 'content-type': 'application/json',
  127. 'Access-Token': uni.getStorageSync('weapp_session_login_data').token
  128. },
  129. success: (res) => {
  130. this.count = res.data.data
  131. this.tabbarList[3].count = res.data.data || 0
  132. }
  133. })
  134. },
  135. scan(){
  136. uni.navigateTo({
  137. url:"../mine/registerCode"
  138. })
  139. },
  140. //拨打电话
  141. phone() {
  142. wx.makePhoneCall({
  143. phoneNumber: '4008191707,8888' //仅为示例,并非真实的电话号码
  144. })
  145. },
  146. //修改密码
  147. Changehepassword() {
  148. uni.navigateTo({
  149. url: '/pages/mine/Changehepassword'
  150. });
  151. },
  152. //退出
  153. logout() {
  154. uni.showModal({
  155. title: '提示',
  156. content: '确定要退出?',
  157. cancelColor: "#999999",
  158. showCancel: true,
  159. success(res) {
  160. if (res.confirm) {
  161. app.Closewebsocke()
  162. uni.clearStorageSync(); //清除缓存
  163. uni.showToast({
  164. icon: "none",
  165. title: "退出成功"
  166. })
  167. uni.reLaunch({
  168. url: '/pages/login/index'
  169. });
  170. }
  171. }
  172. });
  173. },
  174. // tosubscr(){
  175. // let that=this;
  176. // wx.login({
  177. // success (res) {
  178. // if (res.code) {
  179. // let appid ='wxd9748307889cbe0d';
  180. // let secret = 'cfc40d2b86b650e216e900a2c430cd2b'
  181. // let url = 'https://api.weixin.qq.com/sns/jscode2session?appid=' + appid + '&secret=' + secret + '&js_code=' +res.code + '&grant_type=authorization_code';
  182. // uni.request({
  183. // url: url, // 请求路径
  184. // success: result => {
  185. // that.$u.get("/user/bindMessage",{
  186. // openId:result.data.openid,
  187. // loginName:that.mobile
  188. // }).then(data => {
  189. // console.log(data)
  190. // })
  191. // }
  192. // })
  193. // } else {
  194. // console.log('登录失败!' + res.errMsg)
  195. // }
  196. // }
  197. // })
  198. // // /pages/mine/subscribe
  199. // },
  200. }
  201. };
  202. </script>
  203. <style lang="scss" scoped>
  204. .count{
  205. background: red;
  206. width: 50rpx;
  207. height: 50rpx;
  208. border-radius: 40rpx;
  209. color: #FFFFFF;
  210. display: flex;
  211. justify-content: center;
  212. align-items: center;
  213. font-size: 24rpx;
  214. margin-right: 20rpx;
  215. }
  216. .main {
  217. padding: 0 30rpx;
  218. background: #F8F8F8;
  219. display: flex;
  220. flex-direction: column;
  221. min-height: 100vh;
  222. padding-bottom: 40rpx;
  223. .backTop {
  224. background: #2671E2;
  225. position: absolute;
  226. left: 0;
  227. top: 0;
  228. width: 750rpx;
  229. height: 171rpx;
  230. }
  231. .box {
  232. background: #ffffff;
  233. }
  234. }
  235. .header {
  236. z-index: 2;
  237. width: 100%;
  238. height: 212rpx;
  239. border-radius: 12rpx;
  240. margin-top: 42rpx;
  241. display: flex;
  242. .header-zuo {
  243. width: 148rpx;
  244. height: 148rpx;
  245. margin-top: 32rpx;
  246. margin-left: 30rpx;
  247. }
  248. .header-you {
  249. margin-left: 20rpx;
  250. .userName {
  251. font-size: 36rpx;
  252. font-weight: 500;
  253. color: #303030;
  254. margin-top: 56rpx;
  255. }
  256. .mobile {
  257. font-size: 30rpx;
  258. color: #BDBDBD;
  259. margin-top: 20rpx;
  260. }
  261. }
  262. }
  263. .settingGroup {
  264. box-shadow: 0px 0px 12px 0px rgba(224, 224, 224, 0.3);
  265. border-radius: 12rpx;
  266. margin-top: 30rpx;
  267. color: #333333;
  268. font-size: 30rpx;
  269. display: flex;
  270. flex-direction: column;
  271. .line {
  272. height: 118rpx;
  273. border-bottom: 1rpx solid #EEEEEE;
  274. margin: 0 38rpx 0 30rpx;
  275. display: flex;
  276. align-items: center;
  277. justify-content: space-between;
  278. .title {
  279. display: flex;
  280. align-items: center;
  281. width: 190rpx;
  282. justify-content: space-between;
  283. }
  284. }
  285. }
  286. </style>