From e0646253b0421f06d6ec752d300535420831da59 Mon Sep 17 00:00:00 2001
From: huliyong <2783385703@qq.com>
Date: Mon, 20 Jan 2025 01:30:59 +0800
Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
api/api.js | 2 +-
config.js | 3 +
mixins/list.js | 70 +++++
pages_mine/mine/incomeRecord.vue | 178 ++++++------
pages_mine/mine/purse.vue | 529 ++++++++++++++++++-----------------
pages_mine/mine/withdraw.vue | 327 +++++++++++-----------
pages_mine/mine/withdrawalRecord.vue | 267 +++++++++---------
7 files changed, 727 insertions(+), 649 deletions(-)
create mode 100644 mixins/list.js
diff --git a/api/api.js b/api/api.js
index 41e627a..abb059f 100644
--- a/api/api.js
+++ b/api/api.js
@@ -208,7 +208,7 @@ const config = {
// 用户提现
infoWithdraw: {
url: '/api/info/withdraw',
- method: 'POST',
+ method: 'GET',
auth: true,
showLoading : true,
},
diff --git a/config.js b/config.js
index c4cc535..38f727c 100644
--- a/config.js
+++ b/config.js
@@ -14,6 +14,9 @@ const config = {
// baseUrl : 'http://8.138.162.67:8000/a-notice-api',
baseUrl : 'http://h5.xzaiyp.top/a-notice-api',
},
+ test2 : {
+ baseUrl : 'http://test-lzx.natapp1.cc/a-notice-api',
+ },
test : {
baseUrl : 'https://admin.anqi.shop/a-notice-api',
},
diff --git a/mixins/list.js b/mixins/list.js
new file mode 100644
index 0000000..4f072f9
--- /dev/null
+++ b/mixins/list.js
@@ -0,0 +1,70 @@
+
+
+
+function query(self, queryParams){
+ // return (self.beforeGetData && self.beforeGetData()) ||
+ // queryParams || self.queryParams
+
+ // 深度合并对象
+ return self.$utils.deepMergeObject(
+
+ self.$utils.deepMergeObject(self.queryParams,
+
+ (self.beforeGetData && self.beforeGetData()) || {}),
+
+ queryParams)
+}
+
+
+
+export default {
+ data() {
+ return {
+ queryParams: {
+ pageNo: 1,
+ pageSize: 10,
+ },
+ total : 0,
+ list : [],
+ }
+ },
+ onPullDownRefresh() {
+ this.getData()
+ },
+ onReachBottom() {
+ this.loadMoreData()
+ },
+ onShow() {
+ this.getData()
+ },
+ methods: {
+ getData(queryParams){
+ return new Promise((success, error) => {
+ if(!this.mixinsListApi){
+ return console.error('mixinsListApi 缺失');
+ }
+ this.$api(this.mixinsListApi,
+ query(this, queryParams), res => {
+ uni.stopPullDownRefresh()
+ if(res.code == 200){
+
+ this.getDataThen && this.getDataThen(res.result.records, res.result.total, res.result)
+
+ success(res.result)
+
+ this[this.mixinsListKey || 'list'] = res.result.records
+
+ this.total = res.result.total
+ }
+ })
+ })
+ },
+ loadMoreData(){
+ console.log('loadMoreData----', this.queryParams.pageSize < this.total);
+ if(this.queryParams.pageSize < this.total){
+ this.queryParams.pageSize += 10
+ this.getData()
+ }
+ },
+ }
+}
\ No newline at end of file
diff --git a/pages_mine/mine/incomeRecord.vue b/pages_mine/mine/incomeRecord.vue
index c655c65..20c8dc3 100644
--- a/pages_mine/mine/incomeRecord.vue
+++ b/pages_mine/mine/incomeRecord.vue
@@ -1,103 +1,89 @@
-
-
-
-
-
-
-
- 收益记录
-
-
-
-
-
-
-
- {{ item.userId }}
- {{ item.createTime }}
-
-
- 收益金额
- ¥{{item.price}}
-
-
-
-
-
-
+
+
+
+
+
+
+
+ 收益记录
+
+
+
+
+
+
+
+ {{ item.userId }}
+ {{ item.createTime }}
+
+
+ 收益金额
+ ¥{{item.price}}
+
+
+
+
+
+
+ .incomeRecord {
+ .content {
+ padding: 0 40rpx;
+
+ .title {
+ font-weight: bold;
+ margin-top: 5%;
+ }
+
+ .list {
+ padding-top: 50rpx;
+
+ .item {
+ display: flex;
+ gap: 20rpx;
+ //height: 80rpx;
+ margin-bottom: 40rpx;
+
+
+ .left {
+ display: flex;
+ justify-content: center;
+ align-items: flex-start;
+ width: 15%;
+
+ }
+
+ .center {
+ width: 60%;
+ }
+
+ .right {
+ width: 30%;
+ text-align: center;
+ }
+ }
+ }
+ }
+ }
+
\ No newline at end of file
diff --git a/pages_mine/mine/purse.vue b/pages_mine/mine/purse.vue
index 842e2a4..f8b83cb 100644
--- a/pages_mine/mine/purse.vue
+++ b/pages_mine/mine/purse.vue
@@ -1,268 +1,277 @@
-
-
-
-
-
-
-
-
-
-
-
- ¥{{ money.money }}
- 可提现金额
-
-
-
- 今日收益
- ¥{{ money.todayMoney }}
-
-
- 累计收益
- ¥{{ money.userSumMoney }}
-
-
- 已提现
- ¥{{ money.userMoney }}
-
-
-
-
-
-
- 银行卡
-
-
-
-
-
-
-
-
-
- {{ item.bankId }}
-
-
- {{ item.bankAddress }}
-
-
-
-
-
-
-
-
-
-
-
-
-
- 收益记录
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+ ¥{{ money.money }}
+ 可提现金额
+
+
+
+ 今日收益
+ ¥{{ money.todayMoney }}
+
+
+ 累计收益
+ ¥{{ money.userSumMoney }}
+
+
+ 已提现
+ ¥{{ money.userMoney }}
+
+
+
+
+
+
+ 银行卡
+
+
+
+
+
+
+
+
+
+ {{ item.bankId }}
+
+
+ {{ item.bankAddress }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提现记录
+
+
+ 收益记录
+
+
+
+
+
+ .purse {
+ .content {
+ .content-top {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ padding-top: 60rpx;
+ padding-bottom: 40rpx;
+ background-color: #f8faff;
+
+ height: 18vh;
+
+ .aaa {
+ color: #000000;
+
+ .top {
+ font-size: 50rpx;
+ }
+
+ .bottom {
+ font-size: 28rpx;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ }
+ }
+
+ .b {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ gap: 100rpx;
+ width: 100%;
+ margin: 30rpx 40rpx 0 40rpx;
+ color: #4b4b4d;
+
+ .bb {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ gap: 10px;
+
+ }
+ }
+ }
+
+ .content-bottom {
+ border-radius: 50rpx 50rpx 0 0;
+ box-shadow: 0 -10rpx 10rpx rgba(0, 0, 0, 0.2);
+ /* 仅上边的阴影效果 */
+ background-color: #fff;
+ overflow: auto;
+ height: calc(82vh - 240rpx);
+ width: 100vw;
+
+ .card-record {
+ font-size: 34rpx;
+ padding: 40rpx 0 0 40rpx;
+ }
+
+ .cards {
+ display: flex;
+ flex-direction: column;
+ gap: 20rpx;
+ //width: 100vw;
+ padding: 40rpx;
+
+ .cardItem {
+ display: flex;
+ gap: 20rpx;
+ height: 100rpx;
+ //border: 1px solid red;
+ //width: 100vw;
+
+ .cardImage {
+ width: 30%;
+ //height: 100%;
+ }
+
+ .cardInfo {
+ display: flex;
+ flex-direction: column;
+ justify-content: space-evenly;
+ gap: 6rpx;
+ width: 60%;
+
+
+ .cardName {
+ font-size: 28rpx;
+ color: #8f92a1;
+ }
+
+ .cardNum {
+ font-size: 24rpx;
+ color: #000000;
+ }
+
+ }
+
+ .cardIcon {
+ width: 10%;
+
+ }
+ }
+ }
+ }
+ }
+
+ .withdraw-button {
+ position: fixed;
+ bottom: 80rpx;
+ left: 16px; // 与页面左边保持一定距离
+ right: 16px; // 与页面右边保持一定距离
+ background: $uni-linear-gradient-btn-color; // 按钮背景渐变
+ color: white; // 按钮文字颜色
+ text-align: center; // 文字居中
+ padding: 10px 0; // 内边距,增加按钮的高度
+ font-size: 18px; // 按钮文字大小
+ z-index: 1000; // 确保按钮位于其他内容的上方
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ width: 50%;
+ height: 80rpx;
+ border-radius: 10rpx;
+ }
+
+ .income-record {
+ position: fixed;
+ bottom: 160rpx;
+ right: 40%;
+ margin-bottom: 40rpx;
+ background: $uni-linear-gradient-color;
+ -webkit-background-clip: text;
+ /*将设置的背景颜色限制在文字中*/
+ -webkit-text-fill-color: transparent;
+ /*给文字设置成透明*/
+ }
+ }
+
\ No newline at end of file
diff --git a/pages_mine/mine/withdraw.vue b/pages_mine/mine/withdraw.vue
index 465dda1..c03c128 100644
--- a/pages_mine/mine/withdraw.vue
+++ b/pages_mine/mine/withdraw.vue
@@ -1,172 +1,169 @@
-
-
-
-
-
-
-
-
-
-
- ¥{{money.money}}
- 可提现金额
-
-
-
-
-
-
-
- 填写提现金额
-
-
-
-
- 全部提现
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ ¥{{money.money}}
+ 可提现金额
+
+
+
+
+
+
+
+ 填写提现金额
+
+
+
+
+ 全部提现
+
+
+
+
+
+
+
+
+
+ .withdraw {
+ .content {
+ .content-top {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ padding-top: 60rpx;
+ background-color: #f8faff;
+
+ height: 10vh;
+
+ .aaa {
+ color: #000000;
+
+ .top {
+ font-size: 50rpx;
+ }
+
+ .bottom {
+ font-size: 14px;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ }
+ }
+
+
+ }
+
+ .content-bottom {
+ border-radius: 50rpx 50rpx 0 0;
+ box-shadow: 0 -10rpx 10rpx rgba(0, 0, 0, 0.2);
+ /* 仅上边的阴影效果 */
+ background-color: #fff;
+ height: calc(90vh - 240rpx);
+ //width: 100vw;
+ padding: 40rpx;
+
+ .inputComponent {
+ display: flex;
+
+ //gap: 20rpx;
+ //border: 1px solid red;
+
+ .left {
+ display: flex;
+ justify-content: flex-start;
+ align-items: center;
+
+ font-size: 30rpx;
+
+ width: 50%;
+ margin-right: 20rpx;
+ }
+
+ .centerAndRight {
+ display: flex;
+ width: 60%;
+
+ .center {
+ width: 60%;
+ }
+
+ .right {
+ display: flex;
+ justify-content: flex-end;
+ align-items: center;
+ font-size: 32rpx;
+ margin-left: 20rpx;
+
+ width: 40%;
+
+
+ background: $uni-linear-gradient-color;
+ -webkit-background-clip: text;
+ /*将设置的背景颜色限制在文字中*/
+ -webkit-text-fill-color: transparent;
+ /*给文字设置成透明*/
+ }
+ }
+
+
+ }
+ }
+ }
+
+ }
+
\ No newline at end of file
diff --git a/pages_mine/mine/withdrawalRecord.vue b/pages_mine/mine/withdrawalRecord.vue
index 375b7e3..4a765de 100644
--- a/pages_mine/mine/withdrawalRecord.vue
+++ b/pages_mine/mine/withdrawalRecord.vue
@@ -1,135 +1,148 @@
-
-
-
-
-
-
-
-
-
-
- 提现金额
-
- ¥{{ item.price }}
- {{ item.type==1 ? '已到账' : '审核中' }}
-
-
-
-
- 申请时间
- {{ item.createTime }}
-
-
-
- 到账时间
- {{ item.successTime }}
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ 提现金额
+
+ ¥{{ item.price }}
+
+ {{ state[item.state] }}
+
+
+
+
+
+ 申请时间
+
+
+ {{ item.createTime }}
+
+
+ 领取
+
+
+
+
+
+ 到账时间
+ {{ item.successTime }}
+
+
+
+
+
+
\ No newline at end of file