Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 

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