|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305 |
- <template>
- <view class="main">
- <view class="backTop"></view>
- <!-- 头部开始 -->
- <view class="header box">
- <view class="header-zuo">
- <u-avatar
- :src="photo?photo:'https://qufang.oss-cn-beijing.aliyuncs.com/upload/icon/xcx/zkgj/headPicture.png'"
- size="148"></u-avatar>
- </view>
- <view class="header-you">
- <view class="userName">{{name}}</view>
- <view class="mobile">{{mobile}}</view>
- </view>
- </view>
- <view class="settingGroup box">
- <navigator class="line" url="/pages/mine/messageList">
- <view class="title" style="width: 21%;">
- <image src="/static/images/studyhot.png" style="width: 36rpx;height: 36rpx;" mode=""></image>
- 消息
- </view>
- <view class="right" style="display: flex;align-items: center;">
- <view class="count" v-if="count!=0">{{count}}</view>
- <image src="/static/images/arrow.png" style="width: 18rpx;height: 32rpx;" mode=""></image>
- </view>
- </navigator>
- <navigator class="line" url="/pages/mine/subscribe">
- <view class="title">
- <image src="/static/images/studyhot.png" style="width: 36rpx;height: 36rpx;" mode=""></image>
- 订阅消息
- </view>
- <view class="right">
- <image src="/static/images/arrow.png" style="width: 18rpx;height: 32rpx;" mode=""></image>
- </view>
- </navigator>
- <navigator class="line" url="/pages/mine/Myprofile">
- <view class="title">
- <image src="/static/images/setting.png" style="width: 36rpx;height: 36rpx;" mode=""></image>
- 编辑资料
- </view>
- <view class="right">
- <image src="/static/images/arrow.png" style="width: 18rpx;height: 32rpx;" mode=""></image>
- </view>
- </navigator>
- <view class="line" @click="phone">
- <view class="title">
- <image src="/static/images/Customer.png" style="width: 36rpx;height: 36rpx;" mode=""></image>
- 客服电话
- </view>
- <view class="right">
- <image src="/static/images/arrow.png" style="width: 18rpx;height: 32rpx;" mode=""></image>
- </view>
- </view>
- <view class="line" @click="scan">
- <view class="title" style="width: 220rpx;">
- <image src="/static/images/reg.png" style="width: 36rpx;height: 36rpx;" mode=""></image>
- 访客登记码
- </view>
- <view class="right">
- <image src="/static/images/arrow.png" style="width: 18rpx;height: 32rpx;" mode=""></image>
- </view>
- </view>
- <view class="line" @click="Changehepassword">
- <view class="title">
- <image src="/static/images/password.png" style="width: 36rpx;height: 36rpx;" mode=""></image>
- 修改密码
- </view>
- <view class="right">
- <image src="/static/images/arrow.png" style="width: 18rpx;height: 32rpx;" mode=""></image>
- </view>
- </view>
- <view class="line" @click="logout" style="border: none;">
- <view class="title">
- <image src="/static/images/exit.png" style="width: 36rpx;height: 36rpx;" mode=""></image>
- 退出登录
- </view>
- <view class="right">
- <image src="/static/images/arrow.png" style="width: 18rpx;height: 32rpx;" mode=""></image>
- </view>
- </view>
-
- </view>
- <u-tabbar activeColor="#1296db" inactiveColor="#999999" v-model="current" :list="tabbarList"></u-tabbar>
- </view>
- </template>
-
- <script>
- var app = getApp();
- var util = require("../../utils/util.js");
- var config = require("../../config");
- import tabbarList from '@/utils/tabbar.js'
-
- export default {
- data() {
- return {
- tabbarList:tabbarList,
- current: 0,
- tabList: [
- {
- name: '系统消息'
- },
- {
- name: '升级公告'
- },
- ],
- name: "",
- photo: "",
- mobile: "",
- count:0,
- };
- },
- onShow: function() {
- var userInfos = uni.getStorageSync('weapp_session_userInfo_data');
- this.name = userInfos.name,
- this.photo = userInfos.picUrl,
- this.mobile = userInfos.loginName
- this.updateInit()
- },
- methods: {
- updateInit() {
- uni.request({
- url: config.service.notReadNum,
- method: "GET",
- data: {
- id: uni.getStorageSync('weapp_session_userInfo_data').accountId,
- projectId: uni.getStorageSync('buildingID').id,
- },
- header: {
- 'content-type': 'application/json',
- 'Access-Token': uni.getStorageSync('weapp_session_login_data').token
- },
- success: (res) => {
- this.count = res.data.data
- this.tabbarList[3].count = res.data.data || 0
- }
- })
- },
-
- scan(){
- uni.navigateTo({
- url:"../mine/registerCode"
- })
- },
- //拨打电话
- phone() {
- wx.makePhoneCall({
- phoneNumber: '4008191707,8888' //仅为示例,并非真实的电话号码
- })
- },
- //修改密码
- Changehepassword() {
- uni.navigateTo({
- url: '/pages/mine/Changehepassword'
- });
- },
- //退出
- logout() {
- uni.showModal({
- title: '提示',
- content: '确定要退出?',
- cancelColor: "#999999",
- showCancel: true,
- success(res) {
- if (res.confirm) {
- app.Closewebsocke()
- uni.clearStorageSync(); //清除缓存
- uni.showToast({
- icon: "none",
- title: "退出成功"
- })
- uni.reLaunch({
- url: '/pages/login/index'
- });
- }
- }
- });
- },
- // tosubscr(){
- // let that=this;
- // wx.login({
- // success (res) {
- // if (res.code) {
- // let appid ='wxd9748307889cbe0d';
- // let secret = 'cfc40d2b86b650e216e900a2c430cd2b'
- // let url = 'https://api.weixin.qq.com/sns/jscode2session?appid=' + appid + '&secret=' + secret + '&js_code=' +res.code + '&grant_type=authorization_code';
- // uni.request({
- // url: url, // 请求路径
- // success: result => {
- // that.$u.get("/user/bindMessage",{
- // openId:result.data.openid,
- // loginName:that.mobile
- // }).then(data => {
- // console.log(data)
- // })
- // }
- // })
-
- // } else {
- // console.log('登录失败!' + res.errMsg)
- // }
- // }
- // })
- // // /pages/mine/subscribe
-
-
-
- // },
-
- }
- };
- </script>
- <style lang="scss" scoped>
- .count{
- background: red;
- width: 50rpx;
- height: 50rpx;
- border-radius: 40rpx;
- color: #FFFFFF;
- display: flex;
- justify-content: center;
- align-items: center;
- font-size: 24rpx;
- margin-right: 20rpx;
- }
- .main {
- padding: 0 30rpx;
- background: #F8F8F8;
- display: flex;
- flex-direction: column;
- min-height: 100vh;
- padding-bottom: 40rpx;
-
- .backTop {
- background: #2671E2;
- position: absolute;
- left: 0;
- top: 0;
- width: 750rpx;
- height: 171rpx;
- }
-
- .box {
- background: #ffffff;
- }
- }
-
- .header {
- z-index: 2;
- width: 100%;
- height: 212rpx;
- border-radius: 12rpx;
- margin-top: 42rpx;
- display: flex;
-
- .header-zuo {
- width: 148rpx;
- height: 148rpx;
- margin-top: 32rpx;
- margin-left: 30rpx;
- }
-
- .header-you {
- margin-left: 20rpx;
-
- .userName {
- font-size: 36rpx;
- font-weight: 500;
- color: #303030;
- margin-top: 56rpx;
- }
-
- .mobile {
- font-size: 30rpx;
- color: #BDBDBD;
- margin-top: 20rpx;
- }
- }
- }
-
- .settingGroup {
- box-shadow: 0px 0px 12px 0px rgba(224, 224, 224, 0.3);
- border-radius: 12rpx;
- margin-top: 30rpx;
- color: #333333;
- font-size: 30rpx;
- display: flex;
- flex-direction: column;
-
- .line {
- height: 118rpx;
- border-bottom: 1rpx solid #EEEEEE;
- margin: 0 38rpx 0 30rpx;
- display: flex;
- align-items: center;
- justify-content: space-between;
-
- .title {
- display: flex;
- align-items: center;
- width: 190rpx;
- justify-content: space-between;
- }
- }
- }
- </style>
|