AI销管
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.
 
 
 
 

324 righe
7.3 KiB

  1. <template>
  2. <view class="main">
  3. <u-navbar title="我的" size="16" :is-back="false" :background="{background: 'none'}" :border-bottom="false"
  4. title-color="#333"> </u-navbar>
  5. <view class="header">
  6. <view class="header-zuo">
  7. <u-avatar :src="photo?photo:'/static/images/avatar.png'" size="128"></u-avatar>
  8. </view>
  9. <view class="header-you">
  10. <view class="userName u-line-2">
  11. {{name}}
  12. </view>
  13. <view class="mobile">{{mobile}}</view>
  14. </view>
  15. </view>
  16. <view class="settingGroup">
  17. <navigator class="line" url="/pages/mine/messageList">
  18. <view class="title">
  19. <image src="/static/images/studyhots.png" mode=""></image>
  20. 消息通知
  21. <template v-if="count > 0">
  22. <view class="count">
  23. {{ count }}
  24. </view>
  25. </template>
  26. </view>
  27. <view class="right">
  28. <image src="/static/images/right-arrow.png" mode=""></image>
  29. </view>
  30. </navigator>
  31. <navigator class="line" url="/pages/mine/Myprofile">
  32. <view class="title">
  33. <image src="/static/images/setting.png" mode=""></image>
  34. 个人资料
  35. </view>
  36. <view class="right">
  37. <image src="/static/images/right-arrow.png" mode=""></image>
  38. </view>
  39. </navigator>
  40. <view class="line" @click="Changehepassword">
  41. <view class="title">
  42. <image src="/static/images/password.png" mode=""></image>
  43. 修改密码
  44. </view>
  45. <view class="right">
  46. <image src="/static/images/right-arrow.png" mode=""></image>
  47. </view>
  48. </view>
  49. <view class="line" @click="phone">
  50. <view class="title">
  51. <image src="/static/images/concat.png" mode=""></image>
  52. 联系客服
  53. </view>
  54. <view class="right">
  55. <image src="/static/images/right-arrow.png" mode=""></image>
  56. </view>
  57. </view>
  58. <!-- <view class="line" @click="help">
  59. <view class="title">
  60. <image src="/static/images/help-icon.png" mode=""></image>
  61. 帮助中心
  62. </view>
  63. <view class="right">
  64. <image src="/static/images/right-arrow.png" mode=""></image>
  65. </view>
  66. </view> -->
  67. <!-- <view class="line" @click="scan">
  68. <view class="title">
  69. <image src="/static/images/visitCode.png" mode=""></image>
  70. 访客登记码
  71. </view>
  72. <view class="right">
  73. <image src="/static/images/right-arrow.png" mode=""></image>
  74. </view>
  75. </view> -->
  76. <view class="loginout" @click="logout" style="border: none;">
  77. <view class="title">
  78. 退出登录
  79. </view>
  80. </view>
  81. </view>
  82. <!-- 底部导航栏 -->
  83. <!-- <u-tabbar :isBtnTop="false" :mid-button="true" activeColor="#1296db" inactiveColor="#999999" v-model="current" :list="tabbarList"></u-tabbar> -->
  84. </view>
  85. </template>
  86. <script>
  87. var app = getApp();
  88. var util = require("../../utils/util.js");
  89. var config = require("../../config");
  90. import tabbarList from '@/utils/tabbar.js'
  91. export default {
  92. data() {
  93. return {
  94. // tabbar配置项
  95. current: 0,
  96. tabbarList: tabbarList,
  97. //--- end --- tabbar配置项
  98. name: "",
  99. photo: "",
  100. mobile: "",
  101. count: 0, //
  102. };
  103. },
  104. onShow() {
  105. this.getTabBarBadge()
  106. var userInfos = uni.getStorageSync('weapp_session_userInfo_data');
  107. this.name = userInfos.name,
  108. this.photo = userInfos.avatar,
  109. this.mobile = userInfos.username
  110. this.updateInit()
  111. },
  112. methods: {
  113. updateInit() {
  114. this.$u.get(config.service.notReadNum, {
  115. id: uni.getStorageSync('weapp_session_userInfo_data').accountId,
  116. projectId: uni.getStorageSync('buildingID').id
  117. }).then(res => {
  118. this.count = res
  119. console.log(res)
  120. if (res > 0) {
  121. uni.setTabBarBadge({ //显示数字
  122. index: 4, //tabbar下标
  123. text: `${res}` //数字
  124. })
  125. } else {
  126. uni.removeTabBarBadge({
  127. index: 4
  128. })
  129. }
  130. }).catch(e => {
  131. uni.removeTabBarBadge({
  132. index: 4
  133. })
  134. })
  135. },
  136. //拨打电话
  137. phone() {
  138. wx.makePhoneCall({
  139. phoneNumber: '4008191707,8888' //仅为示例,并非真实的电话号码
  140. })
  141. },
  142. scan() {
  143. uni.navigateTo({
  144. url: "../mine/registerCode"
  145. })
  146. },
  147. help() {
  148. uni.navigateTo({
  149. url: "../mine/help/index"
  150. })
  151. },
  152. //修改密码
  153. Changehepassword() {
  154. uni.navigateTo({
  155. url: '/pages/mine/Changehepassword'
  156. });
  157. },
  158. //退出
  159. logout() {
  160. uni.showModal({
  161. title: '提示',
  162. content: '确定要退出?',
  163. cancelColor: "#999999",
  164. showCancel: true,
  165. success(res) {
  166. if (res.confirm) {
  167. uni.request({
  168. url: config.service.logout,
  169. header: {
  170. 'Authorization': 'Basic dGVzdDp0ZXN0',
  171. 'content-type': 'application/x-www-form-urlencoded'
  172. },
  173. method: "DELETE",
  174. success: function(result) {
  175. var data = result.data; //console.log("登录信息", data);
  176. if (data.data == true) {
  177. // app.Closewebsocke()
  178. uni.clearStorageSync(); //清除缓存
  179. uni.showToast({
  180. icon: "none",
  181. title: "退出成功"
  182. })
  183. uni.reLaunch({
  184. url: '/pages/login/index'
  185. });
  186. }
  187. },
  188. // 响应错误
  189. fail: function(loginResponseError) {
  190. util.showNone("网络异常,请重试");
  191. return false;
  192. }
  193. });
  194. }
  195. }
  196. });
  197. }
  198. }
  199. };
  200. </script>
  201. <style lang="scss" scoped>
  202. .main {
  203. width: 750rpx;
  204. height: 100vh;
  205. display: flex;
  206. flex-direction: column;
  207. background: url('https://static.quhouse.com/efadbd8a89f94e98b37eb59dc8074f83.png') no-repeat;
  208. background-size: 750rpx 600rpx;
  209. }
  210. .header {
  211. width: 670rpx;
  212. height: 248rpx;
  213. display: flex;
  214. align-items: center;
  215. background: url('https://static.quhouse.com/10fa8f6fe7fa4104a5c4149be4735311.png') no-repeat;
  216. background-size: 670rpx 248rpx;
  217. margin: 0 40rpx 60rpx;
  218. border-radius: 18rpx;
  219. box-shadow: 0 3rpx 10rpx #999;
  220. .header-zuo {
  221. width: 128rpx;
  222. height: 128rpx;
  223. margin-left: 40rpx;
  224. }
  225. .header-you {
  226. margin-left: 30rpx;
  227. .userName {
  228. margin-bottom: 20rpx;
  229. font-size: 36rpx;
  230. font-weight: 500;
  231. color: #fff;
  232. font-family: PingFangSC-Medium, PingFang SC;
  233. }
  234. .mobile {
  235. font-size: 30rpx;
  236. color: #fff;
  237. }
  238. }
  239. }
  240. .settingGroup {
  241. position: relative;
  242. margin-top: 30rpx;
  243. flex-grow: 1;
  244. display: flex;
  245. flex-direction: column;
  246. color: #333333;
  247. font-size: 30rpx;
  248. border-radius: 12rpx;
  249. .line {
  250. position: relative;
  251. height: 44rpx;
  252. margin: 0 50rpx 60rpx;
  253. display: flex;
  254. align-items: center;
  255. justify-content: space-between;
  256. .title {
  257. display: flex;
  258. align-items: center;
  259. width: 300rpx;
  260. height: 44rpx;
  261. line-height: 44rpx;
  262. font-size: 32rpx;
  263. font-family: PingFangSC-Regular, PingFang SC;
  264. font-weight: 400;
  265. color: #333333;
  266. image {
  267. width: 36rpx;
  268. height: 36rpx;
  269. margin-right: 20rpx;
  270. }
  271. .count {
  272. position: absolute;
  273. right: 34rpx;
  274. width: 44rpx;
  275. height: 44rpx;
  276. border-radius: 50%;
  277. background: red;
  278. display: flex;
  279. justify-content: center;
  280. align-items: center;
  281. color: #fff;
  282. font-size: 26rpx;
  283. }
  284. }
  285. .right {
  286. image {
  287. width: 12rpx;
  288. height: 28rpx;
  289. }
  290. }
  291. }
  292. .loginout {
  293. position: absolute;
  294. left: 40rpx;
  295. right: 40rpx;
  296. bottom: 50rpx;
  297. width: 670rpx;
  298. height: 92rpx;
  299. background: #F8F8F8;
  300. border-radius: 8rpx;
  301. display: flex;
  302. align-items: center;
  303. justify-content: center;
  304. }
  305. }
  306. </style>