Browse Source

feat 我的习惯

anxiaoxia 1 year ago
parent
commit
a5c51bb44a

+ 7 - 6
src/app.wpy

@@ -10,11 +10,11 @@
 </style>
 
 <script>
-import wepy from '@wepy/core';
-import eventHub from './common/eventHub';
-import vuex from '@wepy/x';
+import wepy from '@wepy/core'
+import eventHub from './common/eventHub'
+import vuex from '@wepy/x'
 
-wepy.use(vuex);
+wepy.use(vuex)
 
 wepy.app({
   hooks: {
@@ -22,7 +22,7 @@ wepy.app({
     // 同时存在 Page hook 和 App hook 时,优先执行 Page hook,返回值再交由 App hook 处
     'before-setData': function(dirty) {
       //   console.log('setData dirty: ', dirty);
-      return dirty;
+      return dirty
     }
   },
   globalData: {
@@ -38,7 +38,7 @@ wepy.app({
   },
 
   methods: {}
-});
+})
 </script>
 <config>
 {
@@ -64,6 +64,7 @@ wepy.app({
           'pages/portrait/pointRanking',
           'pages/portrait/ajustRecord',
           'pages/portrait/carbonEnterprise',
+          'pages/personalCenter/index'
         ]
       },
     ],

+ 16 - 8
src/packagesEnv/pages/home/index.wpy

@@ -19,15 +19,18 @@
 <div @click="goPortrait">
 节能评分
 </div>
+<div @click="goPersonCenter">
+个人中心
+</div>
 </div>
 </template>
 
 <script>
-import wepy from '@wepy/core';
-import eventHub from '@/common/eventHub';
-import { mapState } from '@wepy/x';
-import store from '@/store';
-import testMixin from '@/mixins/test';
+import wepy from '@wepy/core'
+import eventHub from '@/common/eventHub'
+import { mapState } from '@wepy/x'
+import store from '@/store'
+import testMixin from '@/mixins/test'
 
 wepy.page({
   store,
@@ -40,16 +43,21 @@ wepy.page({
     goEnv() {
       wx.navigateTo({
         url: '/packagesEnv/pages/officehome/index?spaceId=Sp1101080259b3510e26e7dd4dd9bf9784f06f3feb68'
-      });
+      })
     },
     goPortrait() {
       wx.navigateTo({
         url: '/packagesEnv/pages/portrait/home'
-      });
+      })
+    },
+    goPersonCenter() {
+      wx.navigateTo({
+        url: '/packagesEnv/pages/personalCenter/index'
+      })
     }
   },
   created() {}
-});
+})
 </script>
 <config>
 {

+ 36 - 0
src/packagesEnv/pages/personalCenter/index.wpy

@@ -0,0 +1,36 @@
+<!-- 个人中心 -->
+<template>
+<div class=''>
+    个人中心
+</div>
+</template>
+
+<script>
+import wepy from '@wepy/core'
+import store from '@/store'
+import config from '@/config'
+wepy.page({
+// import引入的组件需要注入到对象中才能使用
+  components: {},
+  props: {},
+  data: {
+
+  },
+  computed: {},
+  methods: {
+
+  },
+// 生命周期 - 创建完成(可以访问当前this实例)
+  created() {
+
+  },
+// 生命周期 - 挂载完成(可以访问DOM元素)
+  mounted() {
+
+  }
+})
+</script>
+<style lang='less' scoped>
+//@import url(); 引入公共css类
+
+</style>

File diff suppressed because it is too large
+ 283 - 285
src/packagesEnv/pages/portrait/energy.wpy


+ 39 - 38
src/packagesEnv/pages/portrait/energyPoint.wpy

@@ -14,6 +14,7 @@ page {
         padding: 34rpx 44rpx 32rpx;
         display: flex;
         justify-content: space-between;
+        background: #ebf5fa;
         .totalEnergy {
             display: flex;
             flex-direction: column;
@@ -223,12 +224,12 @@ page {
 </template>
 
 <script>
-import wepy from '@wepy/core';
-import store from '@/store';
-import config from '@/config';
-import { mapState } from '@wepy/x';
-import moment from 'moment';
-import { queryTotalIntegral, queryAllIntegral } from '@/packagesEnv/api/portrait';
+import wepy from '@wepy/core'
+import store from '@/store'
+import config from '@/config'
+import { mapState } from '@wepy/x'
+import moment from 'moment'
+import { queryTotalIntegral, queryAllIntegral } from '@/packagesEnv/api/portrait'
 import { carbonCredit } from '../common.js'
 wepy.page({
   store,
@@ -252,32 +253,32 @@ wepy.page({
   onLoad() {
     this.carbonCreditText = carbonCredit(this.projectId)
         // this.queryUserIntegral();
-    this.queryIntergralList();
+    this.queryIntergralList()
   },
   onReady() { },
   onReachBottom() {
-    if (this.page == this.totalPage) return;
-    this.page++;
+    if (this.page == this.totalPage) return
+    this.page++
     wx.showLoading({
       title: '加载中'
     })
-    this.queryIntergralList();
+    this.queryIntergralList()
   },
   methods: {
     queryUserIntegral() {
-      var _this = this;
-      var today = moment().format('YYYYMMDD');
-      var lastMonth = moment().subtract(1, 'month').format('YYYYMM');
+      var _this = this
+      var today = moment().format('YYYYMMDD')
+      var lastMonth = moment().subtract(1, 'month').format('YYYYMM')
       queryTotalIntegral({
         date: today,
         month: lastMonth
       }).then(function (res) {
-        console.log('queryUserIntegral', res);
+        console.log('queryUserIntegral', res)
         _this.totalPoints = (res || {}).totalPoints
       })
     },
     queryIntergralList() { // 按照分页  获取所有的积分记录
-      var _this = this;
+      var _this = this
       var param = {
         criteria: {
           'type': 2
@@ -290,51 +291,51 @@ wepy.page({
         ],
         'page': _this.page,
         'size': _this.pageCount
-      };
-      console.log('queryAllIntegral1');
+      }
+      console.log('queryAllIntegral1')
       queryAllIntegral(param).then(function (res) {
-        console.log('queryAllIntegral2', res);
-        var allRes = res.content || [];
-        _this.totalPage = Math.ceil((res.count || 0) / _this.pageCount);
-        _this.totalGet = _this.totalPage == _this.page;
+        console.log('queryAllIntegral2', res)
+        var allRes = res.content || []
+        _this.totalPage = Math.ceil((res.count || 0) / _this.pageCount)
+        _this.totalGet = _this.totalPage == _this.page
                 // var intergralList=this.intergralList;
         allRes.forEach(function (item) {
-          item.showDate = moment(item.updateTime).format('MM月DD日');
-          item.showTime = moment(item.updateTime).format('HH:mm');
-          var datestr = moment(item.date).format('YYYY年MM月');
+          item.showDate = moment(item.updateTime).format('MM月DD日')
+          item.showTime = moment(item.updateTime).format('HH:mm')
+          var datestr = moment(item.date).format('YYYY年MM月')
 
-          var lastMonthObj = _this.intergralList[_this.intergralList.length - 1] || {};
+          var lastMonthObj = _this.intergralList[_this.intergralList.length - 1] || {}
           if (lastMonthObj.date == datestr) {
-            lastMonthObj.dataArr.push(item);
+            lastMonthObj.dataArr.push(item)
           } else {
             var newMonthObj = {
               date: datestr,
               dataArr: []
-            };
-            newMonthObj.dataArr.push(item);
-            _this.intergralList.push(newMonthObj);
+            }
+            newMonthObj.dataArr.push(item)
+            _this.intergralList.push(newMonthObj)
           }
-        });
-        _this.listNoData = _this.intergralList.length == 0;
-        wx.hideLoading();
+        })
+        _this.listNoData = _this.intergralList.length == 0
+        wx.hideLoading()
       })
     },
     showPointExplain() {
-      console.log('fsd');
-      wx.uma.trackEvent('portrait_pointrecord_explainclick', { key: '使用统计-节能分记录-积分说明问号' });
+      console.log('fsd')
+      wx.uma.trackEvent('portrait_pointrecord_explainclick', { key: '使用统计-节能分记录-积分说明问号' })
       wx.navigateTo({
         url: './pointExplain'
-      });
+      })
     }
   }
-});
+})
 </script>
 
 <config>
 {
-    'navigationBarBackgroundColor': '#f3f3f3',
+    'navigationBarBackgroundColor': '#ebf5fa',
     'navigationBarTextStyle':'black',
-    'backgroundColor': '#f3f3f3',
+    'backgroundColor': '#ebf5fa',
     'navigationBarTitleText': '',
         usingComponents: {
          "van-icon": "module:@vant/weapp/dist/icon",

+ 37 - 40
src/packagesEnv/pages/portrait/home.wpy

@@ -1,7 +1,7 @@
 <style lang="less">
 page {
     height: 100%;
-    background-color: #eceff4;
+    background-color: #EBF5FA;
 }
 .page-container {
     width: 100%;
@@ -12,7 +12,7 @@ page {
     .bg {
         width: 100%;
         height: 726rpx;
-        background-color: #ffe823;
+        background-color:#EBF5FA;
         position: absolute;
         top: 0;
         left: 0;
@@ -26,38 +26,51 @@ page {
     .countHead {
         position: relative;
         padding: 44rpx;
+        padding-top: 222rpx;
         display: flex;
         justify-content: space-between;
+        align-items: center;
         z-index: 1;
         .leftCont {
-            font-size: 40rpx;
+            font-family: PingFang SC;
+            font-size: 48rpx;
+            font-weight: 600;
+            line-height: 68rpx;
+            color: #1B2129;
         }
         .rightCont {
             display: flex;
             flex-direction: column;
             text-align: right;
             .name {
+                font-family: PingFang SC;
                 font-size: 28rpx;
+                font-weight: 400;
+                line-height: 44rpx;
+                color: #626C78;
             }
             .value {
-                font-size: 60rpx;
-                font-family: Montserrat;
+                font-family: Persagy2.0;
+                font-size: 56rpx;
+                font-weight: 600;
+                line-height: 72rpx;
+                color: #1B2129;
             }
         }
     }
 
     .allCard {
         position: relative;
-        padding: 0 44rpx;
+        padding: 0 40rpx;
         overflow: hidden;
         .eachCard {
             position: relative;
-            width: 49%;
-            height: 260rpx;
-            margin-right: 2%;
+            width: 322rpx;
+            height: 280rpx;
+            margin-right: 24rpx;
             margin-bottom: 18rpx;
             box-sizing: border-box;
-            padding: 38rpx 0 0 38rpx;
+            padding: 40rpx 0 0 36rpx;
             float: left;
             border-radius: 40rpx;
             background: #ffffff;
@@ -71,15 +84,21 @@ page {
                 }
             }
             .name {
-                font-size: 28rpx;
+                font-family: PingFang SC;
+                font-size: 30rpx;
+                font-weight: 400;
+                line-height: 42rpx;
+                color: #626C78;
             }
             .each_value {
                 display: flex;
                 padding-top: 8rpx;
             }
             .value {
-                font-size: 60rpx;
-                font-family: Montserrat;
+                font-family: Persagy2.0;
+                font-size: 56rpx;
+                font-weight: 400;
+                line-height: 68rpx;
             }
             .unit {
                 font-size: 24rpx;
@@ -105,8 +124,6 @@ page {
 
 <template>
     <div class="page-container">
-        <!-- <image class="bg" src="{{h5StaticPath}}/bg_person_portrait.png" mode="widthFix" alt /> -->
-        <!-- <div class="bg"> -->
         <page-top-bar
             icon="{{h5StaticPath+'/topBar/return-icon.svg'}}"
         ></page-top-bar>
@@ -116,7 +133,6 @@ page {
             mode="widthFix"
             alt
         />
-        <!-- </div> -->
         <div class="countHead">
             <div class="leftCont">使用统计</div>
             <navigator url="/packagesEnv/pages/portrait/energy">
@@ -175,7 +191,7 @@ import store from '@/store'
 import config from '@/config'
 import moment from 'moment'
 import { mapState } from '@wepy/x'
-import { queryTotalIntegral, portraitMeetingHttp, queryPortraitTempUserTotal, queryTotalPortraitLight, queryInvitationStatisticsHttp, queryPortraitModule } from '@/packagesEnv/api/portrait'
+import { queryTotalIntegral, queryPortraitTempUserTotal, queryTotalPortraitLight, queryPortraitModule } from '@/packagesEnv/api/portrait'
 import { getCompmayUsers } from '@/api/user'
 
 // import { saveCompanyConfig } from '@/service/companyConfig'
@@ -192,9 +208,7 @@ wepy.page({
 
     arr: [
             { id: 'airConditioner', code: 'air', name: '空调调节', num: '--', unit: '', class: '', imgWidth: 170, imgHeight: 202, url: '/packagesEnv/pages/portrait/energy?sel=temp', img: 'portrait_air.svg', isshow: false },
-            { id: 'light', code: 'lamp', name: '开关照明', num: '--', unit: '', class: 'imgLamp', imgWidth: 146, imgHeight: 194, url: '/packagesEnv/pages/portrait/energy?sel=light', img: 'portrait_lamp.svg', isshow: false },
-            { id: 'meeting', code: 'meeting', name: '会议室', num: '--', unit: '', class: '', imgWidth: 180, imgHeight: 182, url: '/packagesEnv/pages/portrait/meeting', img: 'portrait_meeting.svg', isshow: false },
-            { id: 'visitor', code: 'visitor', name: '访客', num: '--', unit: '', class: '', imgWidth: 200, imgHeight: 200, url: '/packagesEnv/pages/portrait/visitor', img: 'portrait_visitor.svg', isshow: false }
+            { id: 'light', code: 'lamp', name: '开关照明', num: '--', unit: '', class: 'imgLamp', imgWidth: 146, imgHeight: 194, url: '/packagesEnv/pages/portrait/energy?sel=light', img: 'portrait_lamp.svg', isshow: false }
     ]
   },
   computed: {
@@ -219,11 +233,9 @@ wepy.page({
   onReady() { },
   methods: {
     getData() {
-      this.getMeeting()
       this.queryUserIntegral()
       this.getAir()
       this.getLamp()
-      this.getVisitor()
       this.queryPortraitModule()
             //   this.getUsersFace()
     },
@@ -240,11 +252,7 @@ wepy.page({
             //     });
             //   }
     },
-    getVisitor() { // 访客统计
-      queryInvitationStatisticsHttp().then(res => {
-        this.arr[3].num = JSON.stringify(res.data) != '{}' ? this.dealNumToPoint(res.data.visitorTotal, 3) : '--'
-      })
-    },
+
     getAir() { // 空调统计
       queryPortraitTempUserTotal().then(res => {
         this.arr[0].num = JSON.stringify(res.data) != '{}' ? this.dealNumToPoint(res.data.adjustDownNum + res.data.adjustUpNum, 0) : '--'
@@ -255,15 +263,7 @@ wepy.page({
         this.arr[1].num = res.data.totalNum ? this.dealNumToPoint(res.data.totalNum, 1) : '--'
       })
     },
-    getMeeting() { // 会议室统计
-      let paramsObj = {
-        date: '1970',
-        meetingId: 'all'
-      }
-      portraitMeetingHttp(paramsObj).then(res => {
-        this.arr[2].num = res.count ? this.dealNumToPoint(res.content[0].bookNum + res.content[0].joinNum, 2) : '--'
-      })
-    },
+
     dealNumToPoint(num, arrIndex) {
       if (num >= 10000) {
         num = Math.floor(num / 10000 * 10) / 10
@@ -320,12 +320,9 @@ wepy.page({
 
 <config>
 {
-    'navigationBarTextStyle':'black',
     'navigationBarTitleText': '',
-    backgroundColor: '#eceff4',
-    backgroundColorTop:'#FFE823',
-    backgroundColorBottom:"#eceff4",	
     navigationStyle:"custom",
+    backgroundColor: '#EBF5FA',
     usingComponents: {
         'page-top-bar': '~@/components/common/page-top-bar',      
     },

+ 34 - 34
src/packagesEnv/pages/portrait/pointExplain.wpy

@@ -1,32 +1,37 @@
 <style lang="less">
 page {
     height: 100%;
-    background-color: #f3f3f3;
 }
 .page-container {
     width: 100%;
     box-sizing: border-box;
     position: relative;
     font-family: PingFang SC;
+    padding-top: 208rpx;
+    background: #EBF5FA;
     .energyHead {
         height: 160rpx;
         display: flex;
         align-items: center;
-        color: #000;
-        font-size: 44rpx;
-        padding-left: 44rpx;
-        background-color: #f3f3f3;
+        padding-left: 48rpx;
+        font-family: PingFang SC;
+        font-size: 48rpx;
+        font-weight: 600;
+        line-height: 68rpx;
+        color: #1B2129;
+
     }
     .pointExplain {
         background: #fff;
         padding: 56rpx 48rpx 56rpx 56rpx;
-        color: #4d5262;
-        font-size: 28rpx;
-        // line-height: 56rpx;
         .item {
             display: flex;
             align-items: baseline;
-
+            font-family: PingFang SC;
+            font-size: 30rpx;
+            font-weight: 400;
+            line-height: 60rpx;
+            color: #424C59;
             .order {
                 width: 40rpx;
             }
@@ -47,13 +52,7 @@ page {
         color: #C4C4C4;
 
     }
-    .logo-text {
-        display: flex;
-        justify-content: center;
-        width: 100%;
-        height: 24rpx;
-        padding: 98rpx 0 80rpx;
-    }
+
     .btPostion{
         position: absolute;
         bottom: -600rpx;
@@ -63,6 +62,9 @@ page {
 
 <template>
     <div>
+        <page-top-bar
+            icon="{{h5StaticPath+'/topBar/return-icon.svg'}}"
+        ></page-top-bar>
         <div class="page-container">
             <div class="energyHead">
                 {{ carbonCreditText }}积分说明
@@ -107,21 +109,17 @@ page {
                     <div class="cont">供暖季,调节至室内温度小于等于20℃,积分1</div>
                 </div>
             </div>
-            <image
-                class="logo-text"
-                :class="{'logo-text':true,'btPostion':projectId!='Pj1101020007'}"
-                src="{{h5StaticPath}}/page-home/tenatslink.svg"
-            ></image>
+
         </div>
     </div>
 
 </template>
 
 <script>
-import wepy from '@wepy/core';
-import store from '@/store';
-import config from '@/config';
-import { mapState } from '@wepy/x';
+import wepy from '@wepy/core'
+import store from '@/store'
+import config from '@/config'
+import { mapState } from '@wepy/x'
 import { carbonCreditExplain, carbonCredit } from '../common.js'
 
 wepy.page({
@@ -139,30 +137,32 @@ wepy.page({
     })
   },
   onLoad() {
-    this.textExplain = carbonCreditExplain();
-    this.carbonCreditText = carbonCredit(this.projectId);
+    this.textExplain = carbonCreditExplain()
+    this.carbonCreditText = carbonCredit(this.projectId)
   },
   onReady() { },
   methods: {
 
     showPointExplain() {
-      console.log('fsd');
+      console.log('fsd')
       wx.navigateTo({
         url: './pointExplain'
-      });
+      })
     }
   }
-});
+})
 </script>
 
 <config>
 {
-    'navigationBarBackgroundColor': '#f3f3f3',
+    'navigationBarBackgroundColor': '#EBF5FA',
     'navigationBarTextStyle':'black',
-    'backgroundColor': '#f3f3f3',
+    'backgroundColor': '#EBF5FA',
     'navigationBarTitleText': '',
-        usingComponents: {
-    }
+    navigationStyle:"custom",
+    usingComponents: {
+        'page-top-bar': '~@/components/common/page-top-bar',      
+    },
 
 }
 </config>

+ 281 - 260
src/packagesEnv/pages/portrait/pointRanking.wpy

@@ -1,211 +1,226 @@
 //积分排行版
 <style lang="less">
 page {
-  height: 100%;
-  background-color: #f3f3f3;
+    height: 100%;
+    background-color: #ebf5fa;
 }
 .page-container {
-  width: 100%;
-  height: 100%;
-  box-sizing: border-box;
-  position: relative;
-  font-family: PingFang SC;
-  .rankHeadTitle {
-    position: absolute;
-    top: -72px;
-    left: 0;
     width: 100%;
-    font-size: 40rpx;
-    color: #000;
-    height: 72px;
-    text-align: center;
-    line-height: 72px;
-  }
-  .energyHead {
-    padding: 34rpx 44rpx 32rpx;
-    display: flex;
-    justify-content: space-between;
-    .totalEnergy {
-      display: flex;
-      flex-direction: column;
-      // align-items: flex-end;
-      //justify-content: flex-end;
-      height: 80px;
-      line-height: 1;
-      .name {
-        color: #4d5262;
-        font-size: 25rpx;
-      }
-      .value {
-        padding-top: 12px;
-        color: #000;
-        font-size: 87rpx;
-        font-family: Montserrat;
-      }
-    }
-    .rightCont {
-      display: flex;
-      flex-direction: column;
-      // align-items: flex-end;
-      .rankTitle {
+    height: 100%;
+    box-sizing: border-box;
+    position: relative;
+    font-family: PingFang SC;
+    .rankHeadTitle {
+        position: absolute;
+        top: -72px;
+        left: 0;
+        width: 100%;
         font-size: 40rpx;
         color: #000;
-      }
-      .pointExplain {
-        color: #4d5262;
-        display: flex;
-        align-items: center;
-        justify-content:flex-end;
-        padding-top: 20rpx;
-        .text {
-          font-size: 24rpx;
-          margin-right: 8rpx;
-        }
-        .icon {
-          font-size: 30rpx;
-        }
-      }
-      .timeButton {
+        height: 72px;
+        text-align: center;
+        line-height: 72px;
+    }
+    .energyHead {
+        padding: 34rpx 44rpx 32rpx;
         display: flex;
-        padding-top: 30rpx;
-        font-family: Montserrat;
-        font-size: 13px;
-        font-weight: 400;
-        line-height: 18px;
-        color: #4d5262;
-        .timeStr {
-          margin-right: 6rpx;
+        justify-content: space-between;
+        .totalEnergy {
+            display: flex;
+            flex-direction: column;
+            // align-items: flex-end;
+            //justify-content: flex-end;
+            height: 80px;
+            line-height: 1;
+            .name {
+                font-family: PingFang SC;
+                font-size: 28rpx;
+                font-weight: 400;
+                line-height: 44rpx;
+                color: #626c78;
+            }
+            .value {
+                font-family: Persagy2.0;
+                font-size: 64rpx;
+                font-weight: 600;
+                line-height: 80rpx;
+                color: #1b2129;
+            }
         }
-      }
-      .timeButton2 {
-        display: flex;
-        align-items: center;
-        background: rgba(196, 196, 196, 0.2);
-        border-radius: 34rpx;
-        color: #9fb7cd;
-        font-size: 25rpx;
-        margin-top: 30rpx;
-        font-family: Montserrat;
-        font-weight: 400;
-        .timeItem {
-          width: 140rpx;
-          height: 72rpx;
-          line-height: 72rpx;
-          text-align: center;
-          color: #576b95;
+        .rightCont {
+            display: flex;
+            flex-direction: column;
+            // align-items: flex-end;
+            .rankTitle {
+                font-size: 40rpx;
+                color: #000;
+            }
+            .pointExplain {
+                display: flex;
+                align-items: center;
+                justify-content: flex-end;
+                padding-top: 20rpx;
+                .text {
+                    font-family: PingFang SC;
+                    font-size: 28rpx;
+                    font-weight: 400;
+                    line-height: 44rpx;
+                    color: #626C78;
+                    margin-right: 8rpx;
+                }
+                .icon {
+                    font-size: 30rpx;
+                }
+            }
+            .timeButton {
+                display: flex;
+                padding-top: 30rpx;
+                font-family: Montserrat;
+                font-size: 26rpx;
+                font-weight: 400;
+                line-height: 36rpx;
+                color: #4d5262;
+                .timeStr {
+                    margin-right: 6rpx;
+                }
+            }
+            .timeButton2 {
+                display: flex;
+                align-items: center;
+                height: 72rpx;
+                background: rgba(196, 196, 196, 0.2);
+                border-radius: 34rpx;
+                color: #9fb7cd;
+                font-size: 25rpx;
+                margin-top: 30rpx;
+                font-family: Montserrat;
+                font-weight: 400;
+                .timeItem {
+                    width: 140rpx;
+                    height: 72rpx;
+                    font-family: PingFang SC;
+                    font-size: 28rpx;
+                    font-weight: 400;
+                    line-height: 72rpx;
+                    color: #626c78;
+                    text-align: center;
+                }
+                .weekItem {
+                    width: 160rpx;
+                }
+                .sel {
+                    background: #fff;
+                    border-radius: 34rpx;
+                    color: #000000;
+                }
+            }
         }
-        .weekItem {
-          width: 160rpx;
+    }
+    .rankList {
+        background: #fff;
+        padding-left: 44rpx;
+        position: relative;
+        .controlDiv {
+            width: 230rpx;
+            height: 70rpx;
+            background: #fff;
+            right: 2rpx;
+            top: -70rpx;
+            position: absolute;
+            border-radius: 10rpx;
+            border: 1px solid #c3c3c3;
+            box-sizing: border-box;
         }
-        .sel {
-          background: #fff;
-          border-radius: 34rpx;
-          color: #000000;
+        .eachItem {
+            display: flex;
+            // justify-content: flex-start;
+            align-items: center;
+            height: 130rpx;
+            box-sizing: border-box;
+            .leftCont {
+                color: #140050;
+                font-size: 32rpx;
+                width: 64rpx;
+            }
+            .centerCont {
+                height: 100%;
+                flex: 1;
+                display: flex;
+                justify-content: space-between;
+                align-items: center;
+                border-bottom: 1px solid #e6e6e6;
+                padding-right: 44rpx;
+                box-sizing: border-box;
+                overflow: hidden;
+                .leftHead {
+                    display: flex;
+                    align-items: center;
+                    .headImg {
+                        width: 80rpx;
+                        height: 80rpx;
+                        border-radius: 80rpx;
+                        margin-right: 40rpx;
+                    }
+                    .name {
+                        overflow: hidden;
+                        white-space: nowrap;
+                        text-overflow: ellipsis;
+                        color: #000000;
+                        font-family: PingFang SC;
+                        font-size: 32rpx;
+                        font-weight: 400;
+                        line-height: 48rpx;
+                    }
+                }
+                .point {
+                    text-align: right;
+                    width: 80rpx;
+                    font-family: Persagy2.0;
+                    font-size: 34rpx;
+                    font-weight: 400;
+                    line-height: 42rpx;
+                    color: #626C78;
+                }
+            }
         }
-      }
     }
-  }
-  .rankList {
-    background: #fff;
-    padding-left: 44rpx;
-    position: relative;
-    .controlDiv {
-      width: 230rpx;
-      height: 70rpx;
-      background: #fff;
-      right: 2rpx;
-      top: -70rpx;
-      position: absolute;
-      border-radius: 10rpx;
-      border: 1px solid #c3c3c3;
-      box-sizing: border-box;
+    .bottomCont {
+        height: 80rpx;
     }
-    .eachItem {
-      display: flex;
-      // justify-content: flex-start;
-      align-items: center;
-      height: 130rpx;
-      box-sizing: border-box;
-      .leftCont {
-        color: #140050;
-        font-size: 32rpx;
-        width: 64rpx;
-      }
-      .centerCont {
-        height: 100%;
-        flex: 1;
+    .logo-text {
         display: flex;
-        justify-content: space-between;
-        align-items: center;
-        border-bottom: 1px solid #e6e6e6;
-        padding-right: 44rpx;
-        box-sizing: border-box;
-        overflow: hidden;
-        .leftHead {
-          display: flex;
-          align-items: center;
-          .headImg {
-            width: 80rpx;
-            height: 80rpx;
-            border-radius: 80rpx;
-            margin-right: 40rpx;
-            // background: red;
-          }
-          .name {
-            color: #000000;
-            font-size: 30rpx;
-            overflow: hidden;
-            white-space: nowrap;
-            text-overflow: ellipsis;
-          }
+        justify-content: center;
+        width: 100%;
+        height: 24rpx;
+        padding: 98rpx 0 80rpx;
+        margin-top: 80rpx;
+    }
+    .nodata {
+        text-align: center;
+        color: #c4c4c4;
+        position: absolute;
+        top: 50%;
+        left: 0;
+        width: 100%;
+        transform: translate(0px, -100px);
+        .nodataImg {
+            width: 100%;
+            image {
+                width: 96px;
+                height: 96px;
+            }
         }
-        .point {
-          // flex-shrink: 0;
-          text-align: right;
-          width: 80rpx;
-          color: #4d5262;
-          font-size: 32rpx;
+        .firstTitle {
+            font-size: 34rpx;
+        }
+        .secondTitle {
+            margin-top: 6px;
+            font-size: 26rpx;
+            .showExplain {
+                text-decoration: underline;
+            }
         }
-      }
-    }
-  }
-  .bottomCont {
-    height: 80rpx;
-  }
-  .logo-text {
-    display: flex;
-    justify-content: center;
-    width: 100%;
-    height: 24rpx;
-    padding: 98rpx 0 80rpx;
-    margin-top: 80rpx;
-  }
-  .nodata {
-    text-align: center;
-    color: #c4c4c4;
-    position: absolute;
-    top: 50%;
-    left: 0;
-    width: 100%;
-    transform: translate(0px, -100px);
-    .nodataImg {
-      width: 100%;
-      image {
-        width: 96px;
-        height: 96px;
-      }
-    }
-    .firstTitle {
-      font-size: 34rpx;
-    }
-    .secondTitle {
-      margin-top: 6px;
-      font-size: 26rpx;
-      .showExplain {
-        text-decoration: underline;
-      }
     }
-  }
 }
 </style>
 
@@ -224,24 +239,24 @@ page {
                     @tap="showPointExplain"
                 >
                     <span class="text">积分说明</span>
-                    <van-icon
-                        class="icon"
-                        name="question-o"
+                    <image
+                         style="width:24rpx;height:24rpx"
+                        src="{{h5StaticPath}}/page-portrait/icon-triangle-right.svg"
                     />
                 </div>
-                <div
-                    class="timeButton2"
-                >
-                <!-- <span class="timeStr">{{nowDateStr}}</span>
+                <div class="timeButton2">
+                    <!-- <span class="timeStr">{{nowDateStr}}</span>
                     <van-icon name="arrow-down" /> -->
-                        <div
-                        class="timeItem"  @tap="showTimePopup('month')"
-                            :class="{'sel':timeType == 'month'}"
-                        >{{nowDateStr}}</div>
-                        <div
-                        class="timeItem weekItem"  @tap="showTimePopup('week')"
-                            :class="{'sel':timeType == 'week'}"
-                        >{{nowWeekStr}}</div>
+                    <div
+                        class="timeItem"
+                        @tap="showTimePopup('month')"
+                        :class="{'sel':timeType == 'month'}"
+                    >{{nowDateStr}}</div>
+                    <div
+                        class="timeItem weekItem"
+                        @tap="showTimePopup('week')"
+                        :class="{'sel':timeType == 'week'}"
+                    >{{nowWeekStr}}</div>
                 </div>
             </div>
         </div>
@@ -258,7 +273,7 @@ page {
                     <div class="leftHead">
                         <image
                             class="headImg"
-                            :src="item.headImgUrl"
+                            :src="item.headImgUrl || defaultHead"
                             mode="widthFix"
                         />
                         <div class="name">{{item.userName}}</div>
@@ -269,12 +284,12 @@ page {
                 </div>
             </div>
         </div>
-        <div v-show="totalGet">
+        <!-- <div v-show="totalGet">
             <image
                 class="logo-text"
                 src="{{h5StaticPath}}/page-home/tenatslink.svg"
             ></image>
-        </div>
+        </div> -->
         <div
             class="nodata"
             v-if="noDataShow"
@@ -299,13 +314,19 @@ page {
             @close="visible = false"
             :show="visible"
         >
-            <div v-if="timeType=='week'" style="height: 320px;">
+            <div
+                v-if="timeType=='week'"
+                style="height: 320px;"
+            >
                 <weekcom
                     @checkTime="checkWeekTime"
                     :yearWeekText="nowWeekStr"
                 ></weekcom>
             </div>
-            <div v-if="timeType=='month'" style="height: 320px;">
+            <div
+                v-if="timeType=='month'"
+                style="height: 320px;"
+            >
                 <monthcom
                     @checkTime="checkMonthTime"
                     :yearMonthText="nowDateStr"
@@ -321,8 +342,8 @@ import store from '@/store'
 import config from '@/config'
 import { mapState } from '@wepy/x'
 import {
-  queryIntegralRank,
-  queryAllIntegral
+    queryIntegralRank,
+    queryAllIntegral
 } from '@/packagesEnv/api/portrait'
 import { getCompmayUsers } from '@/api/user'
 import moment from 'moment'
@@ -342,6 +363,7 @@ wepy.page({
     nowDateStr: '',
     visible: false,
     h5StaticPath: config.h5StaticPath,
+    defaultHead: `${config.h5StaticPath}/page-portrait/Avatar.svg`,
     allUser: [],
     noDataShow: false,
     timeType: 'month',
@@ -360,7 +382,7 @@ wepy.page({
         for (let key in udata) {
           arr.push(...udata[key])
         }
-        // console.log("val33",arr);
+                // console.log("val33",arr);
         return arr
       }
     })
@@ -370,31 +392,31 @@ wepy.page({
     this.carbonCreditText = carbonCredit(this.projectId)
 
     this.nowDate = moment()
-      .subtract(1, 'month')
-      .format('YYYYMM')
+            .subtract(1, 'month')
+            .format('YYYYMM')
     this.nowDateStr = moment()
-      .subtract(1, 'month')
-      .format('YYYY.MM')
+            .subtract(1, 'month')
+            .format('YYYY.MM')
     this.nowWeekStr = moment()
-      .weekday(-6)
-      .format('YYYY.MM.DD')
-    // this.queryCompmayUsers().then((res) => {
-    //     debugger;
-    //     var allUser = res;
-    //     this.rankList.forEach((ele, index) => {
-    //         var filterUser = allUser.filter(function (item) {
-    //             return item.id == ele.userId;
-    //         })
-    //         ele.headImgUrl = (filterUser[0] || {}).headImgUrl;
-    //     });
+            .weekday(-6)
+            .format('YYYY.MM.DD')
+        // this.queryCompmayUsers().then((res) => {
+        //     debugger;
+        //     var allUser = res;
+        //     this.rankList.forEach((ele, index) => {
+        //         var filterUser = allUser.filter(function (item) {
+        //             return item.id == ele.userId;
+        //         })
+        //         ele.headImgUrl = (filterUser[0] || {}).headImgUrl;
+        //     });
 
-    // });
+        // });
 
     this.queryAllIntegral()
     this.queryRankingList()
     let menuButtonBoundingClientRect = wx.getMenuButtonBoundingClientRect()
   },
-  onReady() {},
+  onReady() { },
   onReachBottom() {
     if (this.page == this.totalPage) return
     this.page++
@@ -404,18 +426,18 @@ wepy.page({
     this.queryRankingList()
   },
   methods: {
-    // combineUser() {
-    //     //var allUser = val || [];
-    //     this.rankList.forEach((ele, index) => {
-    //         var filterUser = this.allUser2.filter(function (item) {
-    //             return item.id == ele.userId;
-    //         })
-    //         ele.headImgUrl = (filterUser[0] || {}).headImgUrl;
-    //     });
-    // },
+        // combineUser() {
+        //     //var allUser = val || [];
+        //     this.rankList.forEach((ele, index) => {
+        //         var filterUser = this.allUser2.filter(function (item) {
+        //             return item.id == ele.userId;
+        //         })
+        //         ele.headImgUrl = (filterUser[0] || {}).headImgUrl;
+        //     });
+        // },
     queryCompmayUsers() {
       return getCompmayUsers().then((res) => {
-        // console.log('getCompmayUsers', res);
+                // console.log('getCompmayUsers', res);
         var resdata = res.data || {}
         var allUser = []
         for (var i in resdata) {
@@ -426,11 +448,11 @@ wepy.page({
       })
     },
     showTimePopup(type) {
-      // if (this.timeType == 'week') {
-      //   this.timeType = 'month';
-      // } else {
-      //   this.timeType = 'week';
-      // }
+            // if (this.timeType == 'week') {
+            //   this.timeType = 'month';
+            // } else {
+            //   this.timeType = 'week';
+            // }
       this.timeType = type
       console.log('type', type)
       this.visible = true
@@ -461,12 +483,12 @@ wepy.page({
       this.queryRankingList()
     },
     queryAllIntegral() {
-      // 获取上月的总积分
+            // 获取上月的总积分
       var _this = this
-      // var lastMonth = moment().subtract(1, 'month').format("YYYYMM");
+            // var lastMonth = moment().subtract(1, 'month').format("YYYYMM");
       var param = {
         criteria: {
-          // date:lastMonth,
+                    // date:lastMonth,
           date: _this.nowDate,
           type: _this.timeType == 'week' ? 3 : 1
         }
@@ -478,7 +500,7 @@ wepy.page({
       })
     },
     queryRankingList() {
-      // 获取所有用户的排名
+            // 获取所有用户的排名
       var _this = this
       var param = {
         criteria: {
@@ -503,26 +525,26 @@ wepy.page({
         var allRes = res.content || []
         _this.totalPage = Math.ceil((res.count || 0) / _this.pageCount)
         _this.totalGet = _this.totalPage == _this.page
-        // var intergralList=this.intergralList;
+                // var intergralList=this.intergralList;
         var orderNum =
-          (_this.rankList[_this.rankList.length - 1] || {}).orderNum || 0
-        // debugger;
+                    (_this.rankList[_this.rankList.length - 1] || {}).orderNum || 0
+                // debugger;
         allRes.forEach((ele, index) => {
           ele.orderNum = orderNum + index + 1
-          // ele.userId='0fdfbe828aa94c659b33e9c605b5c9ea';
-          var filterUser = (this.allUser2 || []).filter(function(item) {
+                    // ele.userId='0fdfbe828aa94c659b33e9c605b5c9ea';
+          var filterUser = (this.allUser2 || []).filter(function (item) {
             return item.id == ele.userId
           })
           ele.headImgUrl = (filterUser[0] || {}).headImgUrl
 
-          if (ele.userId == this.userInfo.userId) {
-            ele.headImgUrl =
-              this.userInfo.avatarUrl || this.userInfo.headImgUrl
-          }
+        //   if (ele.userId == this.userInfo.userId) {
+        //     ele.headImgUrl =
+        //                     this.userInfo.avatarUrl || this.userInfo.headImgUrl
+        //   }
           _this.rankList.push(ele)
         })
         _this.noDataShow = !(_this.rankList.length > 0)
-        // console.log('_this.rankList', _this.rankList);
+                // console.log('_this.rankList', _this.rankList);
         wx.hideLoading()
       })
     },
@@ -541,14 +563,13 @@ wepy.page({
 
 <config>
 {
-    'navigationBarBackgroundColor': '#f3f3f3',
+    'navigationBarBackgroundColor': '#ebf5fa',
     'navigationBarTextStyle':'black',
     'backgroundColor': '#f3f3f3',
     'navigationBarTitleText': '排行榜',
         usingComponents: {
          "monthcom":"./components/monthcom",
          "weekcom":"./components/weekcom",
-         "van-icon": "module:@vant/weapp/dist/icon",
          "van-popup": "module:@vant/weapp/dist/popup",
     }
 

+ 30 - 30
src/packagesEnv/pages/portrait/todayPoint.wpy

@@ -2,7 +2,7 @@
 <style lang="less">
 page {
     height: 100%;
-    background-color: #f3f3f3;
+    background-color: #EBF5FA;
     position: relative;
 }
 .page-container {
@@ -239,11 +239,11 @@ page {
 </template>
 
 <script>
-import wepy from '@wepy/core';
-import store from '@/store';
-import config from '@/config';
-import { mapState } from '@wepy/x';
-import { queryAllIntegral } from '@/packagesEnv/api/portrait';
+import wepy from '@wepy/core'
+import store from '@/store'
+import config from '@/config'
+import { mapState } from '@wepy/x'
+import { queryAllIntegral } from '@/packagesEnv/api/portrait'
 import moment from 'moment'
 import { carbonCredit } from '../common.js'
 
@@ -265,16 +265,16 @@ wepy.page({
     })
   },
   onLoad() {
-    var _this = this;
-    _this.queryAllIntegral();
-    this.nowDate = moment().format('YYYY年MM月DD日');
-    this.carbonCreditText = carbonCredit(this.projectId);
+    var _this = this
+    _this.queryAllIntegral()
+    this.nowDate = moment().format('YYYY年MM月DD日')
+    this.carbonCreditText = carbonCredit(this.projectId)
   },
   onReady() { },
   methods: {
     queryAllIntegral() { // 获取今天所有积分记录
-      var today = moment().format('YYYYMMDD');
-      var _this = this;
+      var today = moment().format('YYYYMMDD')
+      var _this = this
       var param = {
         criteria: {
           date: today,
@@ -289,44 +289,44 @@ wepy.page({
             'asc': false
           }
         ]
-      };
-      console.log('this.userInfo', this.userInfo);
+      }
+      console.log('this.userInfo', this.userInfo)
       queryAllIntegral(param).then(function (res) {
-        _this.todayData = res.content || [];
-        var total = 0;
+        _this.todayData = res.content || []
+        var total = 0
         _this.todayData.forEach(function (item) {
-          item.showDate = moment(item.updateTime).format('MM月DD日');
-          item.showTime = moment(item.updateTime).format('HH:mm');
-          total = total + item.integral;
-        });
-        let str = total.toString();
-        const idx = str.indexOf('.');
+          item.showDate = moment(item.updateTime).format('MM月DD日')
+          item.showTime = moment(item.updateTime).format('HH:mm')
+          total = total + item.integral
+        })
+        let str = total.toString()
+        const idx = str.indexOf('.')
         if (idx > 0) {
           str = str.slice(0, idx + 2)
         }
-        _this.todayIntegral = str;
-        _this.listNoData = _this.todayData.length == 0;
+        _this.todayIntegral = str
+        _this.listNoData = _this.todayData.length == 0
       })
     },
     showAll() {
-      wx.uma.trackEvent('portrait_todaypoint_showall', { key: '使用统计-今日新增记录-查看全部按钮' });
+      wx.uma.trackEvent('portrait_todaypoint_showall', { key: '使用统计-今日新增记录-查看全部按钮' })
       wx.navigateTo({
         url: './energyPoint'
-      });
+      })
     },
     showPointExplain() {
-      wx.uma.trackEvent('portrait_todaypoint_explainclick', { key: '使用统计-今日新增记录-积分说明' });
+      wx.uma.trackEvent('portrait_todaypoint_explainclick', { key: '使用统计-今日新增记录-积分说明' })
       wx.navigateTo({
         url: './pointExplain'
-      });
+      })
     }
   }
-});
+})
 </script>
 
 <config>
 {
-    'navigationBarBackgroundColor': '#f3f3f3',
+    'navigationBarBackgroundColor': '#EBF5FA',
     'navigationBarTextStyle':'black',
     'backgroundColor': '#f3f3f3',
     'navigationBarTitleText': '',

File diff suppressed because it is too large
+ 4 - 0
static/page-portrait/Avatar.svg


+ 3 - 0
static/page-portrait/icon-arrow-right.svg

@@ -0,0 +1,3 @@
+<svg width="16" height="17" viewBox="0 0 16 17" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M5.64645 4.81344C5.45118 5.0087 5.45118 5.32528 5.64645 5.52055L8.62623 8.50033L5.64645 11.4801C5.45118 11.6754 5.45118 11.992 5.64645 12.1872C5.84171 12.3825 6.15829 12.3825 6.35355 12.1872L9.68689 8.85388C9.88215 8.65862 9.88215 8.34203 9.68689 8.14677L6.35355 4.81344C6.15829 4.61818 5.84171 4.61818 5.64645 4.81344Z" fill="#626C78"/>
+</svg>

+ 3 - 0
static/page-portrait/icon-triangle-right.svg

@@ -0,0 +1,3 @@
+<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M9.01946 5.6855C9.22343 5.84565 9.22344 6.15457 9.01947 6.31472L5.22629 9.29311C4.96382 9.4992 4.57926 9.31222 4.57926 8.97851L4.57926 3.02185C4.57926 2.68814 4.96381 2.50115 5.22628 2.70724L9.01946 5.6855Z" fill="#8B949E"/>
+</svg>