Quellcode durchsuchen

账单明细 我的团队 活动详情优化

yangchaowen vor 2 Jahren
Ursprung
Commit
ae29c2071a
5 geänderte Dateien mit 370 neuen und 114 gelöschten Zeilen
  1. 1 1
      main.js
  2. 7 5
      pages/activity/locList.vue
  3. 22 7
      pages/index/index.vue
  4. 113 16
      pages/term/index.vue
  5. 227 85
      pages/wallet/paylist.vue

+ 1 - 1
main.js

@@ -4,7 +4,7 @@ import App from './App'
 
 // 后端api地址
 //Vue.prototype.$unishow = "https://81f.dev.ytxxjs.cn/addons/unishop";
-//Vue.prototype.$unishow = "https://81fdev.dev.ytxxjs.cn/addons/unishop";
+// Vue.prototype.$unishow = "https://81fdev.dev.ytxxjs.cn/addons/unishop";
 Vue.prototype.$unishow = "https://81f.ytxxjs.cn/addons/unishop";
 
 // 为了方便每次上传的时候忘记修改上面的参数

+ 7 - 5
pages/activity/locList.vue

@@ -1,6 +1,6 @@
 <template>
 	<block>
-		<view class="item" v-for="(item,index) in list" :key='index' @click="opMap(item.lat,item.lng)">
+		<view class="item" v-for="(item,index) in list" :key='index' @click="opMap(item.lat,item.lng,item.storename,item.storeaddress)">
 			<image class="sImg" :src="item.image"
 				mode=""></image>
 			<view class="info">
@@ -39,7 +39,7 @@
 
 			</view>
 		</view>
-    <view v-if="!list.length" style='color:#999;text-align:center;margin:150rpx 0;font-size:30rpx'>暂无数据</view>
+    <view v-if="!list.length&&loaded" style='color:#999;text-align:center;margin:150rpx 0;font-size:30rpx'>暂无数据</view>
 
 	</block>
 </template>
@@ -118,10 +118,12 @@
 		},
 		onShareAppMessage: function() {},
 		methods: {
-			opMap(lat,lng) {
+			opMap(lat,lng,name,address) {
 				uni.openLocation({
-					latitude: lat,
-					longitude: lng,
+					latitude: Number(lat),
+					longitude: Number(lng),
+					name,
+					address,
 					success(e) {
 
 					}

+ 22 - 7
pages/index/index.vue

@@ -12,7 +12,7 @@
 			<!-- 背景色区域 -->
 			<view class="titleNview-background" :style="{ backgroundColor: titleNViewBackground }"></view>
 			<swiper class="carousel" circular @change="swiperChange">
-				<swiper-item v-for="(item, index) in carouselList" :key="index" class="carousel-item" @click="navToDetailPage({ product_id: item.product_id })">
+				<swiper-item v-for="(item, index) in carouselList" :key="index" class="carousel-item" @click="navToPage(item.product_id,item.activity_id)">
 					<image mode="aspectFill" :src="item.image" />
 				</swiper-item>
 			</swiper>
@@ -24,7 +24,7 @@
 			</view>
 		</view>
 		<view class="nav_list">
-			<view class="mery" v-for="(item, index) in navList" :key="index" @click="navTo(item.url,item.name)">
+			<view class="mery" v-for="(item, index) in navList" :key="index" @click="navTo(item.url,item.name,item.activity_id)">
 				<image :src="item.fullimage" mode="widthFix"></image>
 				<text>{{item.name}}</text>
 			</view>
@@ -190,6 +190,22 @@ export default {
 				url: `/pages/product/product?id=${id}&flash=${flash_id}`
 			});
 		},
+		navToPage(product_id,activity_id){
+			
+			if(activity_id>0){
+				
+				uni.navigateTo({
+					url:'/pages/activity/detail?id='+activity_id
+				}) 
+			}else if(product_id){
+				uni.navigateTo({
+					url: `/pages/product/product?id=${product_id}`
+				});
+			}
+			
+			
+			
+		},
 		/**
 		 * 秒杀倒计时为0时再请求一次接口
 		 */
@@ -197,7 +213,7 @@ export default {
 			this.getFlash();
 		},
 		// 跳转页面
-		navTo(url,name){
+		navTo(url,name,activity_id){
 			
 			if(name == '积分商城'){
 				
@@ -221,13 +237,12 @@ export default {
 	
 				
 			}
-			else if(name == '招募合伙人'){
+			else if(name.includes('合伙人')){
 				
 				uni.navigateTo({
-					url:'/pages/activity/detail'
+					url:'/pages/activity/detail?id='+activity_id
 				}) 
-				
-				
+								
 			}
 			
 			

+ 113 - 16
pages/term/index.vue

@@ -1,13 +1,13 @@
 <template>
 	<block>
-<!-- 		<view class="select">
+<!-- 				<view class="select">
 			<view class="selectItem" @tap="changeStatus" data-status="id">
 				<view>入团时间排序</view>
 				<image :src="
                         order == 'id'
                             ? sort == 'asc'
-                                ? 'https://ymyun-oss.oss-cn-hangzhou.aliyuncs.com/yidu_tc/public/upload/12/8/a970f9087def9ba466276f8a9ee59b1b.png'
-                                : 'https://ymyun-oss.oss-cn-hangzhou.aliyuncs.com/yidu_tc/public/upload/12/8/5f1df0376dd2a026fdd14ca4d1d39974.png'
+                                ? 'https://ymyun-oss.oss-cn-hangzhou.aliyuncs.com/yidu_tc/public/upload/12/8/762843841e1964468d3b1f72117a7a6e.png'
+                                : 'https://ymyun-oss.oss-cn-hangzhou.aliyuncs.com/yidu_tc/public/upload/12/8/0c180f41253fc7bc5ac4fd2d69f5d480.png'
                             : 'https://ymyun-oss.oss-cn-hangzhou.aliyuncs.com/yidu_tc/public/upload/12/8/996fff6601b828ee6fcc46b1217b2d1a.png'
                     " mode="widthFix"></image>
 			</view>
@@ -17,14 +17,14 @@
 				<image :src="
                         order == 'order_num'
                             ? sort == 'asc'
-                                ? 'https://ymyun-oss.oss-cn-hangzhou.aliyuncs.com/yidu_tc/public/upload/12/8/a970f9087def9ba466276f8a9ee59b1b.png'
-                                : 'https://ymyun-oss.oss-cn-hangzhou.aliyuncs.com/yidu_tc/public/upload/12/8/5f1df0376dd2a026fdd14ca4d1d39974.png'
+                                ? 'https://ymyun-oss.oss-cn-hangzhou.aliyuncs.com/yidu_tc/public/upload/12/8/762843841e1964468d3b1f72117a7a6e.png'
+                                : 'https://ymyun-oss.oss-cn-hangzhou.aliyuncs.com/yidu_tc/public/upload/12/8/0c180f41253fc7bc5ac4fd2d69f5d480.png'
                             : 'https://ymyun-oss.oss-cn-hangzhou.aliyuncs.com/yidu_tc/public/upload/12/8/996fff6601b828ee6fcc46b1217b2d1a.png'
                     " mode="widthFix"></image>
 			</view>
 		</view> -->
 
-		<view class="mItem" v-for="(item, index) in list" :key="index">
+		<!-- 	<view class="mItem" v-for="(item, index) in list" :key="index">
 			<image
 				:src="item.avatar || 'https://ymyun-oss.oss-cn-hangzhou.aliyuncs.com/yidu_tc/public/upload/12/8/a035c7dae49cc9904c7b0977895ffb1e.png'">
 			</image>
@@ -42,8 +42,55 @@
 					<view>推广订单</view>
 				</view>
 			</view>
+		</view> -->
+
+
+		<view class="mItem" v-for="(item, index) in list" :key="index">
+			<view class="mtop">
+				<image class="avatar"
+					:src="item.avatar || 'https://ymyun-oss.oss-cn-hangzhou.aliyuncs.com/yidu_tc/public/upload/12/8/a035c7dae49cc9904c7b0977895ffb1e.png'">
+				</image>
+
+				<view class="mInfo">
+					<view class="info1">
+						<view>
+							{{ item.username }}
+						</view>
+						<view>入团:{{ parse.filterTime(item.createtime) }}</view>
+					</view>
+					<view class="info2">
+						<view>{{ item.mobile || '暂无手机号码'}}</view>
+						<view>自购(单): 
+						
+						<text class="fw700"> {{ item.orderNum }} </text> 
+						</view>
+					</view>
+				</view>
+
+			</view>
+			
+			<view class="mbot">
+				
+				<view class="mleve">
+					{{item.groupName}}
+				</view>
+			
+				<view class="mInfo2">
+					<view class="info3">
+						<view>
+							下级(人): <text class="fw700"> {{item.childCount}} </text> 
+						</view>
+						<view>下级推广(单):<text class="fw700">{{item.childOrderNum}}  </text> </view>
+					</view>
+				</view>
+			
+			</view>
+			
+			
 		</view>
 
+
+
 		<view v-if="!list.length" style="color: #999; text-align: center; margin: 100rpx 0">暂无数据</view>
 
 
@@ -82,7 +129,7 @@
 				sort: 'asc',
 
 				type: 0,
-				pageSize:10
+				pageSize: 10
 			};
 		},
 		onLoad: function(options) {
@@ -175,7 +222,7 @@
 				});
 				console.log(res)
 				if (res) {
-					
+
 					if (res.length > 0) {
 
 						this.list = this.list.concat(res);
@@ -227,11 +274,36 @@
 		margin: 25rpx 30rpx 0;
 		background: #fff;
 		padding: 28rpx 20rpx;
+
+	}
+
+	.mtop {
+		display: flex;
+		align-items: center;
+	}
+		
+	.mleve{
+		width: 130rpx;
+		height: 40rpx;
+		
+		border-radius: 40rpx;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		background: #FB4C6F;
+		color: #fff;
+		margin-left: -10rpx;
+		font-size: 24rpx;
+		margin-top: 12rpx;
+	}
+	
+	
+	.mbot {
 		display: flex;
 		align-items: center;
 	}
 
-	.mItem>image {
+	.avatar {
 		width: 110rpx;
 		height: 110rpx;
 		border-radius: 50%;
@@ -244,17 +316,26 @@
 		display: flex;
 		flex-direction: column;
 		justify-content: center;
+		border-bottom: 1px solid #F3F0F3;
+		padding-bottom: 14rpx;
+	}
+	.mInfo2 {
+		flex: 1;
+		display: flex;
+		flex-direction: column;
+		justify-content: center;
+		margin-top: 12rpx;
+		margin-left: 12rpx;
 	}
-
 	.info1 {
 		display: flex;
 		align-items: center;
 		justify-content: space-between;
-		padding-right: 36rpx;
 	}
 
 	.info1>view:nth-child(1) {
-		font-size: 34rpx;
+		font-size: 30rpx;
+		color: ;
 	}
 
 	.fz28 {
@@ -262,8 +343,8 @@
 	}
 
 	.info1>view:nth-child(2) {
-		color: #1479ff;
-		font-size: 34rpx;
+		color: #8E8E8E;
+		font-size: 24rpx;
 	}
 
 	.info2 {
@@ -274,11 +355,12 @@
 	}
 
 	.info2>view:nth-child(1) {
-		color: #9194a6;
+		color: #010101;
+		font-size: 24rpx;
 	}
 
 	.info2>view:nth-child(2) {
-		color: #7B9D3E;
+		color: #8E8E8E;
 	}
 
 	.fb {
@@ -291,7 +373,22 @@
 		justify-content: center;
 		align-items: center;
 	}
+	
+	.info3 {
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		font-size: 24rpx;
+		color: #8E8E8E;
+		
+	}
 
+	
+.fw700{
+	font-weight: 700;
+	color: #010101;
+	margin-left: 4rpx;
+}
 	.addAddress {
 		width: 670rpx;
 		height: 80rpx;

+ 227 - 85
pages/wallet/paylist.vue

@@ -1,36 +1,123 @@
 <template>
 	<view class="content">
 		<view class="box">
-			<view class="orderItem" v-for="(item, index) in list" :key="index">
-				<image class="goodImg"
-					:src="item.type==0?item.pimage:'https://ymyun-oss.oss-cn-hangzhou.aliyuncs.com/yidu_tc/public/upload/12/8/846cd1a69879ec4f551d44e87c7500bf.png'">
-				</image>
-				<view class="orderInfo">
+
+
+			<!-- 			<block  v-for="(item, index) in list" :key="index">
+				<view class="orderItem">
+					<image class="goodImg"
+						:src="item.type==0?item.pimage:'https://ymyun-oss.oss-cn-hangzhou.aliyuncs.com/yidu_tc/public/upload/12/8/846cd1a69879ec4f551d44e87c7500bf.png'">
+					</image>
+					<view class="orderInfo">
+						<view class="info1">
+							<view>{{ item.type==0?item.pname:'提现'}}</view>
+							<view :class="item.type==0?'color1':''">{{ item.type==0?'+'+item.money:'-'+item.money}}</view>
+						</view>
+						<view class="info3" v-if="item.type==0">
+							<view>实付:¥{{ item.order_price }}</view>
+							<view :class="true?'color1':''" v-if="item.score">+{{ item.score }}积分</view>
+						</view>
+						<view class="info2" v-if="item.type==0">
+							<view>二级分销</view>
+						</view>
+				
+						<view class="info2">
+							<view >
+							{{ parse.filterTime(item.createtime) }}
+							</view>
+						</view>
+					</view>
+				</view>
+				
+			</block> -->
+
+
+
+			<block v-for="(item, index) in list" :key="index">
+				<view class="orderItem" v-if="item.type==0">
 					<view class="info1">
-						<view>{{ item.type==0?item.pname:'提现'}}</view>
-						<view :class="item.type==0?'color1':''">{{ item.type==0?'+'+item.money:'-'+item.money}}</view>
+						<view>{{ parse.filterTime(item.createtime) }}</view>
+						<!-- <view>已发货</view> -->
 					</view>
-					<view class="info3" v-if="item.type==0">
-						<view>实付:¥{{ item.order_price }}</view>
-						<view :class="true?'color1':''" v-if="item.score">+{{ item.score }}积分</view>
+
+					<view class="orderinfo">
+						<image :src="item.pimage">
+						</image>
+						<view class="orderdesc">
+							<view class="desctop">
+								<view>{{item.pname}}</view>
+								<view v-if="item.slist[2]">+{{item.slist[2].type==0?item.slist[2].num:item.slist[2].num+'积分'}}</view>
+							</view>
+
+							<view class="descbot">
+								<view v-if="item.slist[2].nickname">购买人:{{item.slist[2].nickname||''}}</view>
+								<view>实付:¥{{item.order_price}}</view>
+							</view>
+
+
+						</view>
+
 					</view>
-					<view class="info2" v-if="item.type==0">
-						<view>二级分销</view>
+					
+
+					<block v-for="(item2,index2) in item.slist" :key="index2">
+
+						<view class="ordertip"  v-if="item2.lv !=-1">
+							<view>{{item2.lv}}级分销:{{item2.nickname}} </view>
+							<view>+{{item2.type==0?item2.num:item2.num+'积分'}}</view>
+						</view>
+
+					</block>
+
+
+
+				</view>
+
+
+
+
+
+
+
+				<view class="orderItem" v-if="item.type==1">
+					<view class="info1">
+						<view>{{ parse.filterTime(item.createtime) }}</view>
 					</view>
 
-					<view class="info2">
-						<!-- <view>{{ parse.filterTime(item.create) }}</view> -->
-						<view class="">
-						{{ parse.filterTime(item.createtime) }}
+					<view class="orderinfo1">
+						<image
+							src="https://ymyun-oss.oss-cn-hangzhou.aliyuncs.com/yidu_tc/public/upload/12/8/846cd1a69879ec4f551d44e87c7500bf.png">
+						</image>
+
+						<view class="cashtip">
+							<view>
+								提现
+							</view>
+
+							<view>
+								-{{item.money}}
+							</view>
 						</view>
+
+
+
+
+
 					</view>
+
+
 				</view>
-			</view>
-			
-			
-			    <view v-if="!list.length" style='color:#999;text-align:center;margin:150rpx 0;font-size:30rpx'>暂无数据</view>
 
-			
+
+			</block>
+
+
+
+
+
+			<view v-if="!list.length" style='color:#999;text-align:center;margin:150rpx 0;font-size:30rpx'>暂无数据</view>
+
+
 		</view>
 	</view>
 </template>
@@ -78,7 +165,7 @@
 		,
 		onLoad: function(options) {
 
-			// this.getlist();
+			this.getlist();
 		},
 		/**
 		 * 生命周期函数--监听页面初次渲染完成
@@ -115,28 +202,28 @@
 		 */
 		onShareAppMessage: function() {},
 		methods: {
-			
-        async getlist() {
-            var that = this;
-			         let res = await this.$api.request('/wallet/money_log', 'GET', {
-			         	page: this.page,
-			         	limit: this.pageSize
-			         });
-					 
-					 console.log(res)
-			         if (res) {
-			         	if (res.data.length > 0) {
-			         
-			         		this.list = this.list.concat(res.data);
-			         
-			         		this.page++;
-			         		
-			         	} else {
-			         		this.loaded = true
-			         		this.$api.msg('没有更多数据');
-			         	}
-			         }
-        },
+
+			async getlist() {
+				var that = this;
+				let res = await this.$api.request('/wallet/money_log', 'GET', {
+					page: this.page,
+					limit: this.pageSize
+				});
+
+				console.log(res)
+				if (res) {
+					if (res.data.length > 0) {
+
+						this.list = this.list.concat(res.data);
+
+						this.page++;
+
+					} else {
+						this.loaded = true
+						this.$api.msg('没有更多数据');
+					}
+				}
+			},
 
 			init() {
 				this.page = 1
@@ -153,98 +240,153 @@
 
 	.content {
 		margin: 26rpx;
-		background: #fff;
 		border-radius: 20rpx;
 	}
 
 	.orderItem {
-		display: flex;
-		align-items: center;
+
+		background: #fff;
 		padding: 30rpx 20rpx;
-		border-bottom: 1px solid #e4e5ee;
 		box-sizing: border-box;
+		border-radius: 12rpx;
+		margin-bottom: 24rpx;
+	}
+
+	.info1 {
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		margin-bottom: 12rpx;
 	}
 
+	.info1>view:nth-child(1) {
+		font-size: 24rpx;
+		color: #8E8E8E;
+	}
 
-	.orderItem>image {
-		width: 116rpx;
-		height: 116rpx;
-		border-radius: 12rpx;
+	.info1>view:nth-child(2) {
+		font-size: 24rpx;
+		color: #7B9D3E;
+	}
+
+	.orderinfo {
+		display: flex;
+		align-items: center;
+		padding-bottom: 36rpx;
+		border-bottom: 1px solid #F0EDF1;
 	}
 
-	.orderInfo {
+	.orderinfo1 {
 		display: flex;
-		flex-direction: column;
+		align-items: center;
+		margin-top: 20rpx;
+
+	}
+
+	.orderinfo1>image {
+		width: 100rpx;
+		height: 100rpx;
+	}
+
+
+	.orderinfo>image {
+		width: 100rpx;
+		height: 100rpx;
+	}
+
+	.orderdesc {
+		margin-left: 15rpx;
 		flex: 1;
-		justify-content: space-between;
-		margin-left: 18rpx;
+
 	}
 
-	.info1 {
+
+	.desctop {
 		display: flex;
 		align-items: center;
 		justify-content: space-between;
-		margin-bottom: 8rpx;
-
+		margin-bottom: 10rpx;
 	}
 
-	.info1>view:nth-child(1) {
+	.desctop>view:nth-child(1) {
+		color: #010101;
 		font-size: 28rpx;
-		width: 300rpx;
+		width: 280rpx;
 		overflow: hidden;
 		text-overflow: ellipsis;
 		white-space: nowrap;
-		color: #010101;
 	}
 
-	.info1>view:nth-child(2) {
-		font-size: 28rpx;
+	.desctop>view:nth-child(2) {
+		font-size: 26rpx;
+		font-weight: 700;
+		color: #FB4C6F;
 	}
 
-	.info2 {
+
+	.descbot {
 		display: flex;
 		align-items: center;
 		justify-content: space-between;
-
-		margin-top: 6rpx;
 	}
 
-	.info2>view:nth-child(1) {
-		color: #9194a6;
+	.descbot>view:nth-child(1) {
+		color: #8E8E8E;
+		font-size: 28rpx;
+		width: 302rpx;
+		overflow: hidden;
+		text-overflow: ellipsis;
+		white-space: nowrap;
 	}
 
+	.descbot>view:nth-child(2) {
+		color: #8E8E8E;
+		font-size: 24rpx;
+	}
 
-	.info3 {
+	.ordertip {
+		margin: 20rpx 0 0;
+		padding-left: 136rpx;
+		box-sizing: border-box;
 		display: flex;
 		align-items: center;
 		justify-content: space-between;
-
-
 	}
 
-	.info3>view:nth-child(1) {
+	.ordertip>view:nth-child(1) {
 		font-size: 24rpx;
-
-		color: #9194a6;
+		color: #8E8E8E;
+		width: 350rpx;
+		overflow: hidden;
+		text-overflow: ellipsis;
+		white-space: nowrap;
 	}
 
-	.info3>view:nth-child(2) {
-		font-size: 28rpx;
+	.ordertip>view:nth-child(2) {
+		font-size: 26rpx;
+		font-weight: 700;
+		color: #FB4C6F;
 	}
 
 
+	.cashtip {
 
-	.color1 {
-		color: #EC8E02 !important;
+		flex: 1;
+		margin-left: 14rpx;
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
 	}
 
-	view {
-		font-size: 24rpx;
+	.cashtip>view:nth-child(1) {
+		font-size: 28rpx;
+		color: #010101;
+		font-weight: 700;
 	}
 
-	.goodImg {
-		width: 100rpx;
-		height: 100rpx;
-		border-radius: 12rpx;
+	.cashtip>view:nth-child(2) {
+		font-size: 26rpx;
+		font-weight: 700;
+		color: #010101;
 	}
 </style>