Browse Source

feat:账户明细

DaMowang 3 years ago
parent
commit
974c68e9b1

+ 14 - 7
src/components/goodsList.vue

@@ -1,17 +1,18 @@
 <template>
     <view class="product-list">
-        <view class="product" v-for="(product, index) in productList" :key="index">
+        <view class="product" v-for="(i, s) in productList" :key="s" @click="NavToGoodsDetail(i.goodsId,i.type)">
             <view class="image-view">
-                <image class="product-image" :src="product.goodsThumbnailUrl"></image>
+                <image class="product-image" :src="i.goodsThumbnailUrl"></image>
             </view>
-            <view :class="['product-title', 'ellipsis' + long]">{{ product.goodsName }}</view>
+            <view :class="['product-title', 'ellipsis' + long]">{{ i.goodsName }}</view>
             <view class="product-price">
-                <text class="product-price-original"><text class="product-unit">¥</text>{{ product.price }}</text>
-                <!-- <text class="product-price-favour">¥{{product.originalPrice}}</text> -->
-                <!-- <text class="product-tip">{{product.tip}}</text> -->
+                <text class="product-price-original"><text class="product-unit">¥</text>{{ i.price }}</text>
+                <!-- <text class="product-price-favour">¥{{i.originalPrice}}</text> -->
+                <!-- <text class="product-tip">{{i.tip}}</text> -->
             </view>
-            <view class="product-txt">{{ product.fanIntegral }}</view>
+            <view class="product-txt">{{ i.fanIntegral }}</view>
         </view>
+        <view class='fz_w_text mar_t20 mar_b20'>茶,让生活更美好!</view>
     </view>
 </template>
 <script>
@@ -45,6 +46,12 @@ export default {
                 }
             });
         },
+        // 跳转到商品详情页
+        NavToGoodsDetail(id,type){
+            uni.navigateTo({
+                url:'/pages/product/p_details?id=' + id + '&type=' + type
+            })
+        },
     },
 };
 </script>

+ 24 - 0
src/pages.json

@@ -60,6 +60,30 @@
 				"navigationBarTitleText": "购买协议"
 			}
 		},
+		{
+			"path": "pages/accountDetails/running",
+			"style":{
+				"navigationBarTitleText": "流水明细"
+			}
+		},
+		{
+			"path": "pages/accountDetails/withdraw",
+			"style":{
+				"navigationBarTitleText": "提现明细"
+			}
+		},
+		{
+			"path": "pages/accountDetails/topup",
+			"style":{
+				"navigationBarTitleText": "充值明细"
+			}
+		},
+		{
+			"path": "pages/accountDetails/integral",
+			"style":{
+				"navigationBarTitleText": "积分明细"
+			}
+		},
 		{
             "path" : "pages/notice/index",
             "style":{

+ 194 - 0
src/pages/accountDetails/integral.vue

@@ -0,0 +1,194 @@
+<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>
+        <!-- 顶部导航-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.source}}</view>
+                    <view class="head_price g_color">{{item.integral}}</view>
+                </view>
+                <view class="list_con flex_r flex_ac flex_jb">
+                    <view class="list_time">{{item.integerType}}</view>
+                    <view class="list_balance">{{item.createTime}}</view>
+                </view>
+            </view>
+            <not-goods v-if="haveGoods" textStr="暂无积分信息"></not-goods>
+        </view>
+        <!-- 积分列表 -->
+    </view>
+</template>
+<script>
+let page = 1;
+let app = getApp();
+var appEv = app.$vm.$options;
+import { get, post, u_post } from "@/request/api.js";
+// let reqApi = new ReqApi();
+// import { ReqApi } from "@/utils/reqTools.js";
+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 = {
+                type: this.current == 0 ? '' : this.current,
+                page: page,
+                limit: 10
+            }
+            uni.showLoading({ mask: true })
+            u_post("ShuZiTeaIntegral/integral/integralList", data).then(res => {
+                uni.hideLoading()
+                if (res.status == 200) {
+                    let obj = res.dataList
+                    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()
+        }
+    },
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom: function() {
+        if (page != -1) {
+            var that = this;
+            setTimeout(function() {
+                ++page;
+                that.loadData();
+            }, 800);
+        }
+    }
+}
+</script>
+<style lang="scss">
+// 页面配置
+// 页面配置-end
+
+// 顶部列表
+.tab_list {
+    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;
+}
+
+.active {
+    color: #1BBD89;
+    border-bottom: 6rpx solid #1BBD89;
+}
+
+// 顶部列表-end
+
+// 资金列表
+.con {
+    border-top: 16rpx solid #f4f4f4;
+}
+
+.list_con {
+    width: 100%;
+    overflow: hidden;
+}
+
+.list_head {
+    width: 100%;
+    overflow: hidden;
+}
+
+.list_time {
+    font-size: 24rpx;
+    color: #A1A1A1;
+}
+
+.list_balance {
+    font-size: 24rpx;
+    color: #A1A1A1;
+}
+
+.head_price {
+    font-size: 32rpx;
+    font-family: "SourceHanSansCN-Medium";
+}
+
+.head_name {
+    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;
+}
+
+// 资金列表-end
+
+// 状态颜色
+.g_color {
+    color: #1BBD89;
+}
+
+.y_color {
+    color: #F15B21;
+}
+
+// 状态颜色-end
+</style>

+ 193 - 0
src/pages/accountDetails/running.vue

@@ -0,0 +1,193 @@
+<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>
+        <!-- 顶部导航-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>
+        <!-- 资金列表 -->
+    </view>
+</template>
+<script>
+let page = 1;
+let app = getApp();
+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'
+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
+            }
+            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()
+        }
+    },
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom: function() {
+        if (page != -1) {
+            var that = this;
+            setTimeout(function() {
+                ++page;
+                that.loadData();
+            }, 800);
+        }
+    }
+}
+</script>
+<style lang="scss">
+// 页面配置
+// 页面配置-end
+
+// 顶部列表
+.tab_list {
+    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;
+}
+
+.active {
+    color: #1BBD89;
+    border-bottom: 6rpx solid #1BBD89;
+}
+
+// 顶部列表-end
+
+// 资金列表
+.con {
+    border-top: 16rpx solid #f4f4f4;
+}
+
+.list_con {
+    width: 100%;
+    overflow: hidden;
+}
+
+.list_head {
+    width: 100%;
+    overflow: hidden;
+}
+
+.list_time {
+    font-size: 24rpx;
+    color: #A1A1A1;
+}
+
+.list_balance {
+    font-size: 24rpx;
+    color: #A1A1A1;
+}
+
+.head_price {
+    font-size: 32rpx;
+    font-family: "SourceHanSansCN-Medium";
+}
+
+.head_name {
+    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;
+}
+
+// 资金列表-end
+
+// 状态颜色
+.g_color {
+    color: #1BBD89;
+}
+
+.y_color {
+    color: #F15B21;
+}
+
+// 状态颜色-end
+</style>

+ 139 - 0
src/pages/accountDetails/topup.vue

@@ -0,0 +1,139 @@
+<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>
+</template>
+<script>
+let page = 1;
+let app = getApp();
+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'
+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
+            }
+            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('暂无更多')
+                    }
+                }
+            })
+        }
+    },
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom: function() {
+        if (page != -1) {
+            var that = this;
+            setTimeout(function() {
+                ++page;
+                that.loadData();
+            }, 800);
+        }
+    }
+}
+</script>
+<style lang="scss">
+// 页面配置
+.container {
+    border-top: 16rpx solid #f4f4f4;
+}
+
+// 页面配置-end
+
+// 明细列表
+.list_con {
+    width: 100%;
+    overflow: hidden;
+}
+
+.list_head {
+    width: 100%;
+    overflow: hidden;
+}
+
+.list_time {
+    font-size: 24rpx;
+    color: #A1A1A1;
+}
+
+.list_balance {
+    font-size: 24rpx;
+    color: #A1A1A1;
+}
+
+.head_name {
+    font-size: 30rpx;
+    color: #212121;
+    font-family: "SourceHanSansCN-Medium";
+}
+
+.head_price {
+    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;
+}
+
+// 明细列表-end
+</style>

+ 185 - 0
src/pages/accountDetails/withdraw.vue

@@ -0,0 +1,185 @@
+<template>
+    <view class="container">
+        <!-- 明细列表 -->
+        <view class="list" v-for="(item,index) in list" :key="index">
+            <view class="list_con flex_r flex_ac">
+                <view class="list_name flex_r flex_ac flex_jb"><text>提</text><text>现</text><text>订</text><text>单</text><text>号</text><text>:</text></view>
+                <view class="list_text">{{item.planNo}}</view>
+            </view>
+            <view class="list_con flex_r flex_ac">
+                <view class="list_name flex_r flex_ac flex_jb"><text>结</text><text>算</text><text>状</text><text>态</text><text>:</text></view>
+                <view class="list_text" :class="item.status == 3 ? 'r_color' : 'g_color'">{{item.status == 1 ? '审核中' : item.status == 2 ? '审核成功' : '审核失败'}}</view>
+            </view>
+            <view class="list_con flex_r flex_ac">
+                <view class="list_name flex_r flex_ac flex_jb"><text>申</text><text>请</text><text>人</text><text>:</text></view>
+                <view class="list_text">{{item.wxName}}</view>
+            </view>
+            <view class="list_con flex_r flex_ac">
+                <view class="list_name flex_r flex_ac flex_jb"><text>提</text><text>现</text><text>金</text><text>额</text>:</text></view>
+                <view class="list_text y_color">¥{{item.money}}</view>
+            </view>
+            <view class="list_con flex_r flex_ac">
+                <view class="list_name flex_r flex_ac flex_jb"><text>提</text><text>现</text><text>类</text><text>型</text>:</text></view>
+                <view class="list_text y_color">{{item.type == 1 ? '余额提现' : item.type == 2 ? '拼团金提现' : '拼豆提现'}}</view>
+            </view>
+            <view class="list_con flex_r flex_ac">
+                <view class="list_name flex_r flex_ac flex_jb"><text>申</text><text>请</text><text>时</text><text>间</text>:</text></view>
+                <view class="list_text">{{item.createTime}}</view>
+            </view>
+            <view class="list_con flex_r flex_ac">
+                <view class="list_name flex_r flex_ac flex_jb"><text>处</text><text>理</text><text>时</text><text>间</text>:</text></view>
+                <view class="list_text">{{item.updateTime}}</view>
+            </view>
+            <view class="list_hint flex_r flex_ac" v-if="item.status==3">
+                <image class="hint_img" src="/static/notice.png" mode=""></image>
+                <view class="hint_msg r_color">{{item.msg}}</view>
+            </view>
+        </view>
+        <!-- 明细列表-end -->
+        <not-goods v-if="haveGoods" textStr="暂无提现信息"></not-goods>
+    </view>
+</template>
+<script>
+let page = 1;
+let app = getApp();
+var appEv = app.$vm.$options;
+import { get, post, u_post } from "@/request/api.js";
+// let reqApi = new ReqApi();
+// import { ReqApi } from "@/utils/reqTools.js";
+import notGoods from '@/components/not-goods/index.vue'
+export default {
+    components: {
+        notGoods
+    },
+    data() {
+        return {
+            haveGoods: false,
+            status: 0,
+            list: []
+        };
+    },
+    onShow: function() {
+        page = 1
+        this.loadData()
+    },
+    methods: {
+        loadData: function() {
+            let that = this;
+            let data = {
+                page: page
+            }
+            uni.showLoading({ mask: true })
+            u_post("ShuZiTeaYW/cashWithd/applicationRecord", data).then(res => {
+                uni.hideLoading()
+                if (res.status == 200) {
+                    let obj = res.recordList
+                    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('暂无更多')
+                    }
+                }
+            })
+        }
+    },
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom: function() {
+        if (page != -1) {
+            var that = this;
+            setTimeout(function() {
+                ++page;
+                that.loadData();
+            }, 800);
+        }
+    }
+}
+</script>
+<style lang="scss">
+// 页面配置
+page {
+    background: #f4f4f4;
+}
+
+.container {
+    padding-top: 16rpx;
+}
+
+// 页面配置-end
+
+// 明细列表
+.hint_msg {
+    font-size: 22rpx;
+}
+
+.list_name {
+    width: 180rpx;
+    overflow: hidden;
+}
+
+.hint_img {
+    width: 24rpx;
+    height: 25rpx;
+    margin-right: 36rpx;
+}
+
+.list_hint {
+    width: 100%;
+    overflow: hidden;
+    margin-top: 12rpx;
+}
+
+.list_text {
+    color: #7C7C7C;
+    font-size: 26rpx;
+    font-family: "SourceHanSansCN-Medium";
+}
+
+.list_name text {
+    font-size: 30rpx;
+    color: #404142;
+    font-family: "SourceHanSansCN-Medium";
+}
+
+.list {
+    width: 100%;
+    overflow: hidden;
+    padding: 30rpx 60rpx;
+    box-sizing: border-box;
+    background: #fff;
+    margin-bottom: 20rpx;
+}
+
+// 明细列表-end
+
+
+// 状态颜色
+.g_color {
+    color: #1BBD89;
+}
+
+.y_color {
+    color: #FD9F33;
+}
+
+.r_color {
+    color: #EC421A;
+}
+
+// 状态颜色-end
+</style>

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

@@ -222,7 +222,7 @@
         <view class="fun_con mar_t50 flex_r flex_ac flex_jb">
           <navigator
             class="fun_list flex_c flex_ac"
-            url="/pages/fund-list/index"
+            url="/pages/accountDetails/running"
             hover-class="none"
           >
             <image class="fun_img" src="/static/my/fund.png" mode=""></image>
@@ -230,7 +230,7 @@
           </navigator>
           <navigator
             class="fun_list flex_c flex_ac"
-            url="/pages/withdraw-list/index"
+            url="/pages/accountDetails/withdraw"
             hover-class="none"
           >
             <image
@@ -242,7 +242,7 @@
           </navigator>
           <navigator
             class="fun_list flex_c flex_ac"
-            url="/pages/top-up-list/index"
+            url="/pages/accountDetails/topup"
             hover-class="none"
           >
             <image class="fun_img" src="/static/my/topup.png" mode=""></image>
@@ -250,7 +250,7 @@
           </navigator>
           <navigator
             class="fun_list flex_c flex_ac"
-            url="/pages/sign-list/index"
+            url="/pages/accountDetails/integral"
             hover-class="none"
           >
             <image