xuqiang 4 年 前
コミット
ac538ee020

+ 1 - 1
src/App.vue

@@ -4,7 +4,7 @@ export default {
         wx.login({
             success: res => {
                 this.$http.setToken(
-                    'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ4cTEyMzQiLCJleHAiOjE2MzkwMzE3OTksImlhdCI6MTYzOTAyODE5OX0.gDoUBmQWg4FsBDnUkf-msC9s0BoCUCiGCBPa5P-Ej3Vyhau0gU912nQiu6Z0tslrM09D9frChoazrMg6-NhhZg'
+                    'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ4cTEyMzQiLCJleHAiOjE2MzkwMzU0ODQsImlhdCI6MTYzOTAzMTg4NH0.TM7TK6XsY-wUJnvfqLJtaSKYN5cOm9oWFyojrky6kr32jDdJIjXKGkoNXJb2jHjcMSATN3RCUOKeFP_Ah4nSHg'
                 );
                 this.$store.dispatch('updateUserInfo');
                 // this.$http

+ 0 - 72
src/components/BillInfo.vue

@@ -1,72 +0,0 @@
-<template>
-    <van-cell
-        @click="details"
-        :class="{ pay: billType === 'pay' }"
-        :title="Info.title"
-        :label="Info.settleTime"
-        :value="Info.amount"
-    >
-        <img
-            slot="icon"
-            class="cell-icon"
-            :src="`/native/${billType === 'pay' ? 'icon_inter_huangse@3x.png' : 'icon_inter_huangse@3x.png'}`"
-            alt=""
-        />
-    </van-cell>
-</template>
-
-<script>
-export default {
-    name: 'Bill',
-    props: {
-        Info: {
-            type: Object,
-            default: () => {
-                return {};
-            }
-        },
-        billType: {
-            type: String,
-            default: ''
-        }
-    },
-    methods: {
-        details() {
-            this.$emit('detail');
-        }
-    }
-};
-</script>
-<style lang="less" scoped>
-/deep/ .van-cell {
-    align-items: center;
-    .cell-icon {
-        width: 36px;
-        height: 36px;
-        margin-right: 10px;
-    }
-    --cell-label-color: #969799;
-    --cell-value-color: #f42202;
-    --cell-label-margin-top: 5px;
-    --cell-vertical-padding: 14px;
-    --cell-horizontal-padding: 20px;
-    .van-cell__value {
-        font-weight: bold;
-        &::before {
-            content: '+';
-        }
-    }
-}
-
-/deep/ .pay {
-    .van-cell {
-        --cell-value-color: #000000;
-
-        .van-cell__value {
-            &::before {
-                content: '-';
-            }
-        }
-    }
-}
-</style>

BIN
src/native/icon-shuifei@3x (2).png


+ 11 - 1
src/pages/home.vue

@@ -58,7 +58,7 @@
             <div class="box" v-if="list.checkInType !== 'INDIVIDUAL'">
                 <img class="con-img" src="../static/imgs/fangjian-icon-tuandui@3x.png" alt="" />
                 <div class="name1">团队名称</div>
-                <div class="name">{{ list.teamName }}</div>
+                <div class="name">{{ teamName }}</div>
             </div>
         </div>
         <div class="content1" v-if="list">
@@ -117,6 +117,16 @@ export default {
                 return this.list.monthRate || this.list.dayRate;
             }
             return '-';
+        },
+        teamName() {
+            if (this.roomInfo && this.roomInfo.coFullName) {
+                let teamName = this.roomInfo.coSimpleName || this.roomInfo.coFullName;
+                if (teamName.length > 8) {
+                    teamName = teamName.subStr(0, 4) + '…' + teamName.subStr(teamName.length - 4);
+                }
+                return teamName;
+            }
+            return '';
         }
     },
     mounted() {

+ 62 - 19
src/pages/wallet.vue

@@ -12,31 +12,39 @@
 </config>
 <template>
     <div class="list">
-        <van-empty
-            v-if="empty"
-            image="https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/wechat/kong_png_wodeguanzhu.png"
-            description="暂无收益记录哦"
-        >
-        </van-empty>
-        <van-sticky :offset-top="0">
+        <!-- <van-sticky :offset-top="0">
             <div class="time-box">
                 <van-dropdown-menu>
                     <van-dropdown-item @change="record" :value="time" :options="option1" />
                 </van-dropdown-menu>
             </div>
-        </van-sticky>
+        </van-sticky> -->
         <template>
-            <div v-for="(item, index) in recordList" :key="index">
-                <bill-info :Info="item" v-if="item.type == 'SOLD'"></bill-info>
+            <div class="content" v-if="ammeterInfo">
+                <div class="con1">
+                    <img class="con-img" src="../native/icon-shuifei@3x (2).png" alt="" />
+                    <div>
+                        <div class="text1">电费</div>
+                        <div class="text2" v-if="roomInfo.ammeterType && roomInfo.ammeterId">
+                            剩余电量{{ ammeterInfo.rest }}度
+                        </div>
+                    </div>
+                </div>
+                <div class="money">{{ ammeterInfo.amount > 0 ? '+' : '' }}{{ ammeterInfo.amount }}</div>
             </div>
+            <van-empty
+                v-else
+                image="https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/wechat/kong_png_wodeguanzhu.png"
+                description="暂无记录哦"
+            >
+            </van-empty>
         </template>
     </div>
 </template>
 
 <script>
-import BillInfo from '../components/BillInfo.vue';
+import { mapState } from 'vuex';
 export default {
-    components: { BillInfo },
     name: 'Wallet',
     data() {
         return {
@@ -57,18 +65,18 @@ export default {
                 { text: '2021-11', value: 6 },
                 { text: '2021-12', value: 7 }
             ],
-            empty: false,
-            recordList: {},
-            count: 0,
-            TXCount: 0
+            empty: false
         };
     },
     computed: {
         canSubmit() {
             return this.flag;
-        }
+        },
+        ...mapState(['roomInfo', 'ammeterInfo'])
+    },
+    created() {
+        console.log(this.roomInfo, this.ammeterInfo);
     },
-    created() {},
     methods: {}
 };
 </script>
@@ -100,7 +108,42 @@ export default {
         align-self: flex-end;
     }
 }
-
+.content {
+    width: 100%;
+    .flex();
+    justify-content: space-between;
+    padding: 16px 20px;
+    border-bottom: 1px solid #f5f7fa;
+    .con1 {
+        .flex();
+        .con-img {
+            width: 36px;
+            height: 36px;
+            margin-right: 10px;
+        }
+        .text1 {
+            font-size: 14px;
+            font-family: PingFangSC-Regular, PingFang SC;
+            font-weight: normal;
+            color: #000000;
+            line-height: 20px;
+        }
+        .text2 {
+            font-size: 13px;
+            font-family: PingFangSC-Regular, PingFang SC;
+            font-weight: normal;
+            color: #aaacad;
+            line-height: 18px;
+        }
+    }
+    .money {
+        font-size: 16px;
+        font-family: PingFangSC-Semibold, PingFang SC;
+        font-weight: bold;
+        color: #000000;
+        line-height: 24px;
+    }
+}
 .time-box {
     .flex();
     background-color: @bg;

+ 12 - 14
src/pages/withdrawalDetails.vue

@@ -26,23 +26,21 @@
                 <div class="money1">共充值11111</div>
             </div>
         </van-sticky>
-        <div class="item" v-for="(item, index) in list" :key="index">
-            <!-- <img src="../assets/icon_money_negative.png" class="icon" v-if="item.amount < 0" />
-            <img src="../assets/icon_money_positive.png" class="icon" v-else /> -->
-            <template>
-                <div class="content" v-for="(item, index) in list" :key="index">
-                    <div class="con1">
-                        <img class="con-img" src="../native/icon_photo.png" alt="" />
-                        <div>
-                            <div class="text1">{{ item.name }}</div>
-                            <div class="text2">{{ item.payTime }}</div>
-                        </div>
+        <!-- <div class="item" v-for="(item, index) in list" :key="index"> -->
+        <template>
+            <div class="content" v-for="(item, index) in list" :key="index">
+                <div class="con1">
+                    <img class="con-img" src="../native/icon_photo.png" alt="" />
+                    <div>
+                        <div class="text1">{{ item.name }}</div>
+                        <div class="text2">{{ item.payTime }}</div>
                     </div>
-                    <div class="money">{{ item.amount > 0 ? '+' : '' }}{{ item.amount }}</div>
                 </div>
-            </template>
-        </div>
+                <div class="money">{{ item.amount > 0 ? '+' : '' }}{{ item.amount }}</div>
+            </div>
+        </template>
     </div>
+    <!-- </div> -->
 </template>
 <script>
 import { mapState } from 'vuex';