Bläddra i källkod

Merge branch 'clientDemo' of http://gogs.chelvc.com/Tim_Walker/chelvc-custom into clientDemo

yizhiyang 10 månader sedan
förälder
incheckning
d2df7bb3b6

+ 4 - 4
src/pageMerchant/components/orderList.vue

@@ -120,8 +120,8 @@
 						return 'red';
 					case 3:
 						return 'orange';
-					case 4:
-						return 'green';
+					// case 4:
+					// 	return 'green';
 					default:
 						return 'black';
 				}
@@ -134,8 +134,8 @@
 						return '已核销';
 					case 3:
 						return '已退款';
-					case 4:
-						return '已过期';
+					// case 4:
+					// 	return '已过期';
 					default:
 						return '';
 				}

+ 72 - 0
src/pageMerchant/mineModule/myPurse/detail.vue

@@ -0,0 +1,72 @@
+<template>
+	<view>
+		<view class="content">
+			<ren-calendar ref='ren' :markDays='markDays' :headerBar='true' :open="false"
+				@onDayClick='onDayClick'></ren-calendar>
+		</view>
+		
+		<u-list @scrolltolower="scrolltolower">
+			<u-list-item v-for="(item, index) in 4" :key="index">
+				<view class="item">
+					<view>
+						<view>用户推广奖励</view>
+						<view>2024-6-7 02:00</view>
+					</view>
+					<view>
+						<view>+5.00</view>
+						<view></view>
+					</view>
+				</view>
+			</u-list-item>
+		</u-list>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				indexList: [],
+				markDays: [],
+				curDate:""
+			}
+		},
+		onLoad() {
+			this.loadmore()
+		},
+		methods: {
+			onDayClick(data) {
+				console.log(data.date)
+				this.curDate = data.date;
+				// this.getMerchantList()
+			},
+			scrolltolower() {
+				this.loadmore()
+			},
+			loadmore() {
+				for (let i = 0; i < 30; i++) {
+					this.indexList.push({
+						url: this.urls[uni.$u.random(0, this.urls.length - 1)]
+					})
+				}
+			}
+		}
+	}
+</script>
+
+<style  lang="scss" scoped>
+	.content{
+		margin-bottom: 20rpx;
+	}
+	.item{
+		margin-top: 20rpx;
+		background-color: #fff;
+		border-radius: 10rpx;
+		padding: 20rpx;
+		box-shadow: 0 8rpx 15rpx 0 rgba(0, 0, 0, 0.08);
+		display: flex;
+		justify-content: space-between;
+		// align-items: center;
+	}
+
+</style>

+ 294 - 22
src/pageMerchant/mineModule/myPurse/purse.vue

@@ -1,22 +1,294 @@
-<template>
-	<view>
-		
-	</view>
-</template>
-
-<script>
-	export default {
-		data() {
-			return {
-				
-			}
-		},
-		methods: {
-			
-		}
-	}
-</script>
-
-<style>
-
-</style>
+<template>
+	<view class="purse">
+		<view class="wallet-page">
+			<view class="wallet-header">
+				<view class="left">
+					<text class="username">{{ userName }}的钱包</text>
+					<text>
+						<text>我的资产(</text>
+						<text v-if="isAssetVisible" class="asset">{{ asset }}</text>
+						<text v-else class="asset">**</text>
+						<text>元)</text>
+						<text @click="toggleAssetVisibility" class="eye-icon">👁️</text>
+					</text>
+				</view>
+				<view class="right">
+					<image src="@/static/QR57a.jpg" class="security-icon"></image>
+					<text>安全保障中</text>
+				</view>
+			</view>
+			<view class="wallet-summary">
+				<view class="summary-item">
+					<view>总收益</view>
+					<view>{{ totalIncome }}</view>
+				</view>
+				<view class="summary-item">
+					<view>今日收益</view>
+					<view>{{ todayIncome }}</view>
+				</view>
+				<view class="summary-item">
+					<view>昨日收益</view>
+					<view>{{ yesterdayIncome }}</view>
+				</view>
+				<view class="summary-item">
+					<view>可提现</view>
+					<view>{{ withdrawable }}</view>
+				</view>
+			</view>
+			<view class="withdraw-button">
+				<u-button type="primary" text="立即提现"></u-button>
+			</view>
+		</view>
+		<!-- 账单 -->
+		<view class="bill" @click="toDetail">
+			<view>
+				<text class="bill-t">账单</text>
+				<text class="bill-center">到账10000000元</text>
+			</view>
+			<u-icon name="arrow-right" color="#2979ff" size="28"></u-icon>
+		</view>
+		<!-- 订单管理 -->
+		<view class="container">
+			<view class="title">
+				<view class="title-line"></view>
+				<text class="title-text">订单管理</text>
+			</view>
+			<view class="content">
+				<view class="column">
+					<view class="row">
+						<view class="label">已确认订单数(笔)</view>
+						<view class="value">100</view>
+					</view>
+					<view class="row">
+						<view class="label">待确认订单数(笔)</view>
+						<view class="value">80</view>
+					</view>
+				</view>
+				<view class="separator"></view>
+				<view class="column">
+					<view class="row">
+						<view class="label">已确认收益(元)</view>
+						<view class="value">20</view>
+					</view>
+					<view class="row">
+						<view class="label">待确认收益(元)</view>
+						<view class="value">5</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		
+		<!-- 我的团队 -->
+		<view class="container">
+			<view class="title">
+				<view class="title-line"></view>
+				<text class="title-text">我的团队</text>
+			</view>
+			<view class="content">
+				<view class="column">
+					<view class="row">
+						<view class="label">已推广订单数(笔)</view>
+						<view class="value">100</view>
+					</view>
+					<view class="row">
+						<view class="label">待确认订单数(笔)</view>
+						<view class="value">80</view>
+					</view>
+				</view>
+				<view class="separator"></view>
+				<view class="column">
+					<view class="row">
+						<view class="label">已确认收益(元)</view>
+						<view class="value">20</view>
+					</view>
+					<view class="row">
+						<view class="label">待确认收益(元)</view>
+						<view class="value">5</view>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				userName: 'User123',
+				isAssetVisible: true,
+				asset: '1000',
+				totalIncome: '5000',
+				todayIncome: '100',
+				yesterdayIncome: '200',
+				withdrawable: '3000'
+			};
+		},
+		methods: {
+			toggleAssetVisibility() {
+				this.isAssetVisible = !this.isAssetVisible;
+			},
+			toDetail(){
+				uni.navigateTo({
+					url:'/pageMerchant/mineModule/myPurse/detail'
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.purse {
+		margin-top: 10px;
+		padding: 10rpx 20rpx 20rpx;
+		box-sizing: border-box;
+	}
+
+	.wallet-page {
+		font-size: 34rpx;
+		margin-bottom: 20rpx;
+		background-color: #fff;
+		border-radius: 20rpx;
+		padding: 20rpx;
+		box-shadow: 0 8rpx 15rpx 0 rgba(0, 0, 0, 0.08);
+
+		.wallet-header {
+			display: flex;
+			justify-content: space-between;
+
+			.left {
+				display: flex;
+				flex-direction: column;
+				align-items: flex-start;
+
+
+				.username {
+					margin-bottom: 5px;
+				}
+
+				.asset {
+					margin-top: 5px;
+				}
+
+				.eye-icon {
+					margin-left: 10px;
+				}
+			}
+
+			.right {
+				display: flex;
+
+				.security-icon {
+					width: 20px;
+					height: 20px;
+					margin-right: 5px;
+				}
+			}
+		}
+
+		.wallet-summary {
+			background-color: #f0f0f0;
+			margin-top: 20px;
+			padding: 20px;
+			display: flex;
+			justify-content: space-between;
+
+			.summary-item {
+				flex: 1;
+				text-align: center;
+
+				&:not(:last-child) {
+					border-right: 1px solid #ccc;
+				}
+			}
+		}
+
+		.withdraw-button {
+			text-align: center;
+			margin-top: 20px;
+
+			text {
+				background-color: #007aff;
+				color: #fff;
+				padding: 10px 20px;
+				border-radius: 20px;
+			}
+		}
+	}
+
+	.bill {
+		font-size: 40rpx;
+		margin-bottom: 20rpx;
+		background-color: #fff;
+		border-radius: 10rpx;
+		padding: 20rpx;
+		box-shadow: 0 8rpx 15rpx 0 rgba(0, 0, 0, 0.08);
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+
+		.bill-t {
+			margin-right: 10rpx;
+		}
+
+		.bill-center {
+			color: #A9A9A9;
+		}
+	}
+
+
+
+	.container {
+		margin-bottom: 20rpx;
+		background-color: #fff;
+		border-radius: 10rpx;
+		padding: 20rpx;
+		box-shadow: 0 8rpx 15rpx 0 rgba(0, 0, 0, 0.08);
+
+		.title {
+			display: flex;
+			align-items: center;
+			margin-bottom: 20rpx;
+
+			.title-line {
+				width: 5px;
+				height: 20px;
+				background-color: blue;
+				margin-right: 10px;
+			}
+
+			.title-text {
+				margin: 0;
+				font-size: 40rpx;
+			}
+		}
+
+		.content {
+			display: flex;
+
+			.column {
+				flex: 1;
+				text-align: center;
+
+				&:not(:last-child) {
+					border-right: 1px solid #ccc;
+				}
+
+				.row {
+					.label {
+						margin-bottom: 20rpx;
+						font-size: 30rpx;
+						color: #A9A9A9;
+					}
+
+					.value {
+						margin-bottom: 20rpx;
+						font-size: 34rpx;
+					}
+				}
+
+			}
+		}
+	}
+</style>

+ 1 - 1
src/pageMerchant/storeModule/appointList.vue

@@ -54,7 +54,7 @@
 
 					<u-line margin="20rpx 0"></u-line>
 
-					<view class="item-center" :key="idx" v-for="(itm, idx) of item.goodsInfo">
+					<view class="item-center" :key="idx" v-for="(itm, idx) of item.goodItem">
 						<view class="center-left">
 							<image :src="itm.goodsPic" class="img"></image>
 						</view>

+ 1 - 1
src/pageMerchant/storeModule/components/queryWriteOff.vue

@@ -46,7 +46,7 @@
 				let res = await getOrderListApi({
 					...result
 				});
-				if (res.code === 'OK' && res.data.records) {
+				if (res.code === 'OK' && res.data.records.lentgh > 0) {
 					uni.navigateTo({
 						url: `/pageMerchant/components/toBeVerified?list=${JSON.stringify(res.data.records)}`
 					})

+ 7 - 0
src/pages.json

@@ -435,6 +435,13 @@
           "style": {
             "navigationBarTitleText": "我的钱包"
           }
+        },
+        {
+        	"path" : "mineModule/myPurse/detail",
+        	"style" : 
+        	{
+        		"navigationBarTitleText" : "余额明细"
+        	}
         }
       ]
     }

+ 2 - 2
src/utils/request.js

@@ -11,10 +11,10 @@ import {
 
 // 每次请求都创建一个新的实例
 const instance = axios.create({
-  baseURL: 'https://test.api.chelvc.com',
+  // baseURL: 'https://test.api.chelvc.com',
   // baseURL: "http://192.168.68.77:11000",
   // baseURL: "https://358175z5l5.yicp.fun",
-  // baseURL: "http://localhost:11000",
+  baseURL: "http://localhost:11000",
   timeout: 10000,
   adapter: UniAdapter,
 });