Browse Source

fit-修改问题

hejie 3 years ago
parent
commit
b60ccfc31d

+ 130 - 123
src/pages/accountDetails/running.vue

@@ -1,26 +1,33 @@
 <template>
-    <view class="container">
-        <!-- 顶部导航 -->
-        <view class="Tab_con flex_r flex_ac flex_jb">
-            <view class="tab_list flex_r flex_ac" :class="current == index ? 'active' : ''" v-for="(item,index) in TabList" :key="index" @tap="SetStatus(index)">{{item.title}}</view>
+  <view class="container">
+    <!-- 顶部导航 -->
+    <view class="Tab_con flex_r flex_ac flex_jb">
+      <view
+        class="tab_list flex_r flex_ac"
+        :class="current == index ? 'active' : ''"
+        v-for="(item, index) in TabList"
+        :key="index"
+        @tap="SetStatus(index)"
+        >{{ item.title }}</view
+      >
+    </view>
+    <!-- 顶部导航-end -->
+    <!-- 资金列表 -->
+    <view class="con">
+      <view class="list" v-for="(item, index) in list" :key="index">
+        <view class="list_head flex_r flex_ac flex_jb">
+          <view class="head_name">{{ item.type_id == 1 ? '收益' : '支出'}}</view>
+          <view class="head_price g_color">{{ item.act }}{{item.num }}</view>
         </view>
-        <!-- 顶部导航-end -->
-        <!-- 资金列表 -->
-        <view class="con">
-            <view class="list" v-for="(item,index) in list" :key="index">
-                <view class="list_head flex_r flex_ac flex_jb">
-                    <view class="head_name">{{item.accoutTypeDesc}}</view>
-                    <view class="head_price g_color">{{item.accoutMoney}}</view>
-                </view>
-                <view class="list_con flex_r flex_ac flex_jb">
-                    <view class="list_time">{{item.source_details}}</view>
-                    <view class="list_balance">{{item.createTime}}</view>
-                </view>
-            </view>
-            <not-goods v-if="haveGoods" textStr="暂无流水资金信息"></not-goods>
+        <view class="list_con flex_r flex_ac flex_jb">
+          <view class="list_time">{{ item.remark }}</view>
+          <view class="list_balance">{{ item.create_time }}</view>
         </view>
-        <!-- 资金列表 -->
+      </view>
+      <not-goods v-if="haveGoods" textStr="暂无流水资金信息"></not-goods>
     </view>
+    <!-- 资金列表 -->
+  </view>
 </template>
 <script>
 let page = 1;
@@ -29,83 +36,83 @@ var appEv = app.$vm.$options;
 // let reqApi = new ReqApi();
 // import { ReqApi } from "@/utils/reqTools.js";
 import { get, post, u_post } from "@/request/api.js";
-import notGoods from '@/components/not-goods/index.vue'
+import notGoods from "@/components/not-goods/index.vue";
 export default {
-    components: {
-        notGoods
-    },
-    data() {
-        return {
-            haveGoods: false, // 是否有商品
-            current: 0,
-            TabList: [
-                { title: '全部', sauts: '' },
-                { title: '收益', sauts: 1 },
-                { title: '支出', sauts: 2 }
-            ],
-            list: []
-        };
-    },
-    onShow: function() {
-        page = 1
-        this.list = []
-        this.loadData()
-    },
-    methods: {
-        loadData: function() {
-            let that = this;
-            let data = {
-                page: page,
-                type: this.current == 0 ? '' : this.current
+  components: {
+    notGoods,
+  },
+  data() {
+    return {
+      haveGoods: false, // 是否有商品
+      current: 0,
+      TabList: [
+        { title: "全部", sauts: "" },
+        { title: "收益", sauts: 1 },
+        { title: "支出", sauts: 2 },
+      ],
+      list: [],
+      page:1
+    };
+  },
+  onShow: function () {
+    this.page = 1;
+    this.list = [];
+    this.loadData();
+  },
+  methods: {
+    loadData: function () {
+      let data = {
+        page: page,
+        rows:20,
+        type: this.current,
+      };
+      uni.showLoading({ mask: true });
+      post("my/moneylog", data).then((res) => {
+        uni.hideLoading();
+        uni.hideLoading();
+        if (res.code === 0) {
+          if (res.data.data.data.length > 0) {
+            this.list = this.list.concat(res.data.data.data);
+          } else {
+            if (this.page == 1) {
+              this.haveGoods = true;
+              this.page = -1;
+            } else {
+              this.page = -1;
+              appEv.errTips("暂无更多");
             }
-            uni.showLoading({ mask: true })
-            u_post("ShuZiTeaYW/my/myAccoutDetail", data).then(res => {
-                uni.hideLoading()
-                if (res.status == 200) {
-                    let obj = res.data
-                    if (obj.length > 0) {
-                        that.list = [...that.list, ...obj]
-                    } else {
-                        if (page == 1) {
-                            that.haveGoods = true
-                            page = -1
-                        } else {
-                            page = -1
-                            appEv.errTips('暂无更多')
-                        }
-                    }
-                } else {
-                    if (page == 1) {
-                        that.haveGoods = true
-                        page = -1
-                    } else {
-                        page = -1
-                        appEv.errTips('暂无更多')
-                    }
-                }
-            })
-        },
-        SetStatus: function(i) {
-            this.current = i;
-            page = 1;
-            this.list = []
-            this.haveGoods = false;
-            this.loadData()
+          }
+        } else {
+          if (page == 1) {
+            this.haveGoods = true;
+            this.page = -1;
+          } else {
+            this.page = -1;
+            appEv.errTips("暂无更多");
+          }
         }
+      });
     },
-    /**
-     * 页面上拉触底事件的处理函数
-     */
-    onReachBottom: function() {
-        if (page != -1) {
-            var that = this;
-            setTimeout(function() {
-                ++page;
-                that.loadData();
-            }, 800);
-        }
+    SetStatus: function (i) {
+      this.current = i;
+      this.page = 1;
+      this.list = [];
+      this.haveGoods = false;
+      this.loadData();
+    },
+  },
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+    if (this.page != -1) {
+      setTimeout(function () {
+        ++this.page;
+        this.loadData();
+      }, 800);
     }
-}
+  },
+};
 </script>
 <style lang="scss">
 // 页面配置
@@ -113,80 +120,80 @@ export default {
 
 // 顶部列表
 .tab_list {
-    height: 100%;
-    box-sizing: border-box;
-    font-size: 30rpx;
-    color: #808080;
+  height: 100%;
+  box-sizing: border-box;
+  font-size: 30rpx;
+  color: #808080;
 }
 
 .Tab_con {
-    width: 100%;
-    height: 92rpx;
-    background: #fff;
-    padding: 0 30rpx;
-    box-sizing: border-box;
+  width: 100%;
+  height: 92rpx;
+  background: #fff;
+  padding: 0 30rpx;
+  box-sizing: border-box;
 }
 
 .active {
-    color: #1BBD89;
-    border-bottom: 6rpx solid #1BBD89;
+  color: #1bbd89;
+  border-bottom: 6rpx solid #1bbd89;
 }
 
 // 顶部列表-end
 
 // 资金列表
 .con {
-    border-top: 16rpx solid #f4f4f4;
+  border-top: 16rpx solid #f4f4f4;
 }
 
 .list_con {
-    width: 100%;
-    overflow: hidden;
+  width: 100%;
+  overflow: hidden;
 }
 
 .list_head {
-    width: 100%;
-    overflow: hidden;
+  width: 100%;
+  overflow: hidden;
 }
 
 .list_time {
-    font-size: 24rpx;
-    color: #A1A1A1;
+  font-size: 24rpx;
+  color: #a1a1a1;
 }
 
 .list_balance {
-    font-size: 24rpx;
-    color: #A1A1A1;
+  font-size: 24rpx;
+  color: #a1a1a1;
 }
 
 .head_price {
-    font-size: 32rpx;
-    font-family: "SourceHanSansCN-Medium";
+  font-size: 32rpx;
+  font-family: "SourceHanSansCN-Medium";
 }
 
 .head_name {
-    font-size: 30rpx;
-    color: #212121;
-    font-family: "SourceHanSansCN-Medium";
+  font-size: 30rpx;
+  color: #212121;
+  font-family: "SourceHanSansCN-Medium";
 }
 
 .list {
-    width: 100%;
-    overflow: hidden;
-    padding: 30rpx;
-    box-sizing: border-box;
-    border-bottom: 3rpx solid #f4f4f4;
+  width: 100%;
+  overflow: hidden;
+  padding: 30rpx;
+  box-sizing: border-box;
+  border-bottom: 3rpx solid #f4f4f4;
 }
 
 // 资金列表-end
 
 // 状态颜色
 .g_color {
-    color: #1BBD89;
+  color: #1bbd89;
 }
 
 .y_color {
-    color: #F15B21;
+  color: #f15b21;
 }
 
 // 状态颜色-end

+ 92 - 92
src/pages/accountDetails/topup.vue

@@ -1,20 +1,20 @@
 <template>
-    <view class="container">
-        <!-- 明细列表 -->
-        <view class="list" v-for="(item,index) in list" :key="index">
-            <view class="list_head flex_r flex_ac flex_jb">
-                <view class="head_name">{{item.tips}}</view>
-                <view class="head_price">{{item.money}}</view>
-                <!-- <view class="head_price">{{item.balance}}</view> -->
-            </view>
-            <view class="list_con flex_r flex_ac flex_jb">
-                <view class="list_time">{{item.create_time}}</view>
-                <view class="list_balance">{{item.balance}}</view>
-            </view>
-        </view>
-        <!-- 明细列表-end -->
-        <not-goods v-if="haveGoods" textStr="暂无充值信息"></not-goods>
+  <view class="container">
+    <!-- 明细列表 -->
+    <view class="list" v-for="(item, index) in list" :key="index">
+      <view class="list_head flex_r flex_ac flex_jb">
+        <view class="head_name">充值</view>
+        <view class="head_price">{{ item.amount }}</view>
+        <!-- <view class="head_price">{{item.balance}}</view> -->
+      </view>
+      <view class="list_con flex_r flex_ac flex_jb">
+        <view class="list_time">{{ item.create_time }}</view>
+        <view class="list_balance">{{ item.remark }}</view>
+      </view>
     </view>
+    <!-- 明细列表-end -->
+    <not-goods v-if="haveGoods" textStr="暂无充值信息"></not-goods>
+  </view>
 </template>
 <script>
 let page = 1;
@@ -23,116 +23,116 @@ var appEv = app.$vm.$options;
 // let reqApi = new ReqApi();
 // import { ReqApi } from "@/utils/reqTools.js";
 import { get, post, u_post } from "@/request/api.js";
-import notGoods from '@/components/not-goods/index.vue'
+import notGoods from "@/components/not-goods/index.vue";
 export default {
-    components: {
-        notGoods
-    },
-    data() {
-        return {
-            haveGoods: false, // 是否有商品
-            list: [] // 明细列表
-        };
-    },
-    onShow: function() {
-        page = 1
-        this.loadData()
-    },
-    methods: {
-        loadData: function() {
-            let that = this;
-            let data = {
-                page: page
+  components: {
+    notGoods,
+  },
+  data() {
+    return {
+      haveGoods: false, // 是否有商品
+      list: [], // 明细列表
+      page: 1,
+    };
+  },
+  onShow: function () {
+    this.page = 1;
+    this.loadData();
+  },
+  methods: {
+    loadData: function () {
+      let that = this;
+      let data = {
+        page: page,
+        rows:20
+      };
+      uni.showLoading({ mask: true });
+      post("/my/recharge", data).then((res) => {
+        uni.hideLoading();
+        if (res.code === 0) {
+          if (res.data.data.data.length > 0) {
+            this.list = this.list.concat(res.data.data.data);
+          } else {
+            if (this.page == 1) {
+              this.haveGoods = true;
+              this.page = -1;
+            } else {
+              this.page = -1;
+              appEv.errTips("暂无更多");
             }
-            uni.showLoading({ mask: true })
-            u_post("ShuZiTeaYW/my/incomeAndExpenditure", data).then(res => {
-                uni.hideLoading()
-                if (res.status == 200) {
-                    let obj = res.accounts
-                    if (obj.length > 0) {
-                        that.list = [...that.list, ...obj]
-                    } else {
-                        if (page == 1) {
-                            that.haveGoods = true
-                            page = -1
-                        } else {
-                            page = -1
-                            appEv.errTips('暂无更多')
-                        }
-                    }
-                } else {
-                    if (page == 1) {
-                        that.haveGoods = true
-                        page = -1
-                    } else {
-                        page = -1
-                        appEv.errTips('暂无更多')
-                    }
-                }
-            })
+          }
+        } else {
+          if (page == 1) {
+            this.haveGoods = true;
+            this.page = -1;
+          } else {
+            this.page = -1;
+            appEv.errTips("暂无更多");
+          }
         }
+      });
     },
-    /**
-     * 页面上拉触底事件的处理函数
-     */
-    onReachBottom: function() {
-        if (page != -1) {
-            var that = this;
-            setTimeout(function() {
-                ++page;
-                that.loadData();
-            }, 800);
-        }
+  },
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+    if (this.page != -1) {
+      setTimeout(function () {
+        ++this.page;
+        this.loadData();
+      }, 800);
     }
-}
+  },
+};
 </script>
 <style lang="scss">
 // 页面配置
 .container {
-    border-top: 16rpx solid #f4f4f4;
+  border-top: 16rpx solid #f4f4f4;
 }
 
 // 页面配置-end
 
 // 明细列表
 .list_con {
-    width: 100%;
-    overflow: hidden;
+  width: 100%;
+  overflow: hidden;
 }
 
 .list_head {
-    width: 100%;
-    overflow: hidden;
+  width: 100%;
+  overflow: hidden;
 }
 
 .list_time {
-    font-size: 24rpx;
-    color: #A1A1A1;
+  font-size: 24rpx;
+  color: #a1a1a1;
 }
 
 .list_balance {
-    font-size: 24rpx;
-    color: #A1A1A1;
+  font-size: 24rpx;
+  color: #a1a1a1;
 }
 
 .head_name {
-    font-size: 30rpx;
-    color: #212121;
-    font-family: "SourceHanSansCN-Medium";
+  font-size: 30rpx;
+  color: #212121;
+  font-family: "SourceHanSansCN-Medium";
 }
 
 .head_price {
-    font-size: 32rpx;
-    color: #18BB87;
-    font-family: "SourceHanSansCN-Medium";
+  font-size: 32rpx;
+  color: #18bb87;
+  font-family: "SourceHanSansCN-Medium";
 }
 
 .list {
-    width: 100%;
-    overflow: hidden;
-    padding: 30rpx;
-    box-sizing: border-box;
-    border-bottom: 3rpx solid #f4f4f4;
+  width: 100%;
+  overflow: hidden;
+  padding: 30rpx;
+  box-sizing: border-box;
+  border-bottom: 3rpx solid #f4f4f4;
 }
 
 // 明细列表-end

+ 3 - 5
src/pages/accountDetails/withdraw.vue

@@ -83,7 +83,6 @@ export default {
       };
       uni.showLoading({ mask: true });
       post("/my/withdraw", data).then((res) => {
-        console.log(res.data.data.data, "aaaaa");
         uni.hideLoading();
         if (res.code === 0) {
           if (res.data.data.data.length > 0) {
@@ -91,9 +90,9 @@ export default {
           } else {
             if (this.page == 1) {
               this.haveGoods = true;
-              page = -1;
+              this.page = -1;
             } else {
-              page = -1;
+              this.page = -1;
               appEv.errTips("暂无更多");
             }
           }
@@ -112,9 +111,8 @@ export default {
   /**
    * 页面上拉触底事件的处理函数
    */
-  onReachBottom: function () {
+  onReachBottom() {
     if (this.page != -1) {
-      var that = this;
       setTimeout(function () {
         ++this.page;
         this.loadData();

+ 2 - 2
src/pages/my/index.vue

@@ -382,7 +382,7 @@
       @authGetTelSuccess="onauthGetTelSuccess"
     ></authorize-module>
     <!-- 授权-end -->
-    <newauthorize ref="newauthorize" />
+    <!-- <newauthorize ref="newauthorize" /> -->
   </view>
 </template>
 
@@ -432,7 +432,7 @@ export default {
   onShow: function () {
     this.userinfo = uni.getStorageSync("userinfo");
     this.isShiMing = this.userinfo.is_authentication == 0 ? true : false;
-    // this.getuserInfo();
+    this.getuserInfo();
     let token = uni.getStorageSync("token");
     if (!token) {
       this.login();