Bladeren bron

style:我的页面调整

zhanghui 2 jaren geleden
bovenliggende
commit
3125279ca3

+ 26 - 0
common/js/service.js

@@ -3,6 +3,24 @@ import request from '../js/request.js';
 
 export default {
 
+    getMyMemberList(data) {
+        return request({
+            url: '/member/wechat/getMyMemberList',
+            method: 'GET',
+            data:data
+
+        })
+    },
+
+    getMyExpandUserList(data) {
+        return request({
+            url: '/member/wechat/getMyExpandUserList',
+            method: 'GET',
+            data:data
+
+        })
+    },
+
     //查询奖励记录
     getRecord(data) {
         return request({
@@ -72,5 +90,13 @@ export default {
         })
     },
 
+    getImage(id) {
+        return request({
+            url: '/resource/oss/listByIds/' + id,
+            method: 'GET'
+        })
+
+    },
+
 
 }

+ 178 - 0
components/next-swipe-action/next-swipe-action.vue

@@ -0,0 +1,178 @@
+<template>
+	<view class="next-slide" :class="{'next-slide-disabled': disabled}">
+		<view class="next-slide-left" :style="'position: relative;left:'+left+'rpx'" @touchstart="ontouchstart"
+			  @touchmove="ontouchmove" @touchend="ontouchend">
+			<slot></slot>
+		</view>
+		<view class="next-slide-right">
+			<view
+					class="next-btn-item"
+					v-for="(item,index) in btnGroup"
+					:key="index"
+					:style="getStyle(item)"
+					@click.stop="btnClick(item)">
+				{{item.name}}
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	const defBtnStyle = {
+		width: '100rpx',
+		bgColor: '#f9ae3d',
+		color: '#FFFFFF',
+		fontSize: '28rpx',
+		fontWeight: 300
+	};
+
+	export default {
+		name: 'NextSwipeAction',
+		props: {
+			btnGroup: {
+				type: Array,
+				default: () => {
+					return [
+					// 		{
+					// 	name: '修改',
+					// 	style: {
+					// 		bgColor: '#f9ae3d'
+					// 	}
+					// },
+						{
+						name: '删除',
+						style: {
+							bgColor: '#ff4d4f'
+						}
+					}]
+				}
+			},
+			//当前列索引
+			index: {
+				type: Number,
+				require: true,
+				default: 0
+			},
+			//是否禁用
+			disabled: {
+				type: Boolean,
+				default: false
+			},
+			// 是否按钮点击后自定重置
+			btnClickAutoReset: {
+				type: Boolean,
+				default: true
+			}
+		},
+		data() {
+			return {
+				x: 0,
+				left: 0,
+				operation: 0,
+				height: 0,
+				screenWidth: 0
+			};
+		},
+		mounted() {
+			this.$nextTick(res => {
+				const systemInfo = uni.getSystemInfoSync()
+				this.screenWidth = systemInfo.screenWidth
+				this.getBtnWidth()
+				this.getListHeight()
+			})
+		},
+		methods: {
+			getStyle(item) {
+				const style = item.style || {};
+				const styleStr = 'width:'+ (style.width || defBtnStyle.width) +
+						';height:' + this.height +
+						'rpx;background-color:' + (style.bgColor || defBtnStyle.bgColor) +
+						';color:' + (style.color || defBtnStyle.color) +
+						';font-size:' + (style.fontSize || defBtnStyle.fontSize) +
+						'font-weight:' + (style.fontWeight || defBtnStyle.fontWeight);
+				return styleStr
+			},
+			btnClick(item) {
+				const it = Object.assign({}, item);
+				delete it.style;
+				this.$emit('btnClick', {
+					index: this.index,
+					item: it
+				})
+				if(this.btnClickAutoReset) {
+					this.reset()
+				}
+			},
+			//重置方法
+			reset() {
+				this.left = 0
+			},
+			getBtnWidth() {
+				const element = uni.createSelectorQuery().in(this).select(".next-slide-right");
+				element.boundingClientRect(rect => {
+					this.operation = this.px2rpx(rect.width, this.screenWidth)
+				}).exec()
+			},
+			getListHeight() {
+				const element = uni.createSelectorQuery().in(this).select(".next-slide-left");
+				element.boundingClientRect(rect => {
+					this.height = this.px2rpx(rect.height, this.screenWidth)
+				}).exec()
+			},
+			px2rpx(px, screenWidth) {
+				return px / (screenWidth / 750)
+			},
+			ontouchstart(e) {
+				if(this.disabled) return
+				this.x = this.px2rpx(e.touches[0].clientX, this.screenWidth)
+			},
+			ontouchmove(e) {
+				if(this.disabled) return
+				let clientX = this.x - this.px2rpx(e.touches[0].clientX, this.screenWidth)
+				if (clientX <= 0) this.left = 0
+				else if (this.operation <= clientX) this.left = this.operation * -1
+				else this.left = clientX * -1
+			},
+			ontouchend(e) {
+				if(this.disabled) return
+				let clientX = this.x - this.px2rpx(e.changedTouches[0].clientX, this.screenWidth)
+				this.left = clientX > this.operation / 2 ? this.operation * -1 : 0
+			},
+		}
+	}
+</script>
+
+<style scoped>
+	.next-slide {
+		width: 100%;
+		position: relative;
+		overflow: hidden;
+	}
+	.next-slide-disabled {
+		background-color: #333333;
+		opacity: 0.6;
+	}
+	.next-slide-left {
+		width: 100%;
+		overflow: hidden;
+		background-color: #FFFFFF;
+		transition: left 0.2s ease-in-out;
+		z-index: 999;
+	}
+
+	.next-slide-right {
+		position: absolute;
+		top: 0rpx;
+		right: 0;
+		z-index: 99;
+		display: flex;
+		align-items: center;
+		justify-content: flex-end;
+	}
+
+	.next-btn-item {
+		display: flex;
+		align-items: center;
+		justify-content: center;
+	}
+</style>

+ 4 - 91
pages/directPromotionList/directPromotionList.vue

@@ -1,63 +1,23 @@
 <template>
 	<view class="page">
 		<uni-nav-bar  :fixed="true" background-color="#FFE05C" :border="false" :statusBar="true"  left-icon="left" title="我的直推" @clickLeft="back" />
-
-
 		<view :style="{height:height}" class="list">
-			<mescroll-uni ref="mescrollRef" @init="mescrollInit" :height="height" :down="downOption" @down="downCallback"
-						  :up="upOption" @up="upCallback" @emptyclick="emptyClick">
-				<view  class="flex-row justify-between item" v-for="(item,index) in 10">
-					<view class="flex-row avatar">
-						<image :src="'/static/ud4.png'"></image>
-					</view>
-					<view class="flex-row justify-between userMsg">
-						<view class="flex-col justify-around">
-							<text class="name">张辉</text>
-						</view>
-						<view class="flex-col justify-around">
-							<text class="time">2024-01-29 12:00:00</text>
-						</view>
-					</view>
-
-				</view>
-			</mescroll-uni>
+			<mescroll-item ref="MescrollItem" :i="0"  :index="0"  :height="height">
+			</mescroll-item>
 		</view>
-
-
 	</view>
 </template>
 
 <script>
-	import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
-	import MescrollMoreItemMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mixins/mescroll-more-item.js"
+	import MescrollItem from "./module/mescrollUni-item.vue";
 	export default {
-		mixins: [MescrollMixin, MescrollMoreItemMixin], // 注意此处还需使用MescrollMoreItemMixin (必须写在MescrollMixin后面)
-		components: {},
+		components: {MescrollItem},
 		data() {
 			return {
 				height:'',
-				downOption: {
-					auto: false // 不自动加载 (mixin已处理第一个tab触发downCallback)
-				},
-				upOption: {
-					auto: false, // 不自动加载
-					// page: {
-					// 	num: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
-					// 	size: 10 // 每页数据的数量
-					// },
-					noMoreSize: 4, //如果列表已无数据,可设置列表的总数量要大于半页才显示无更多数据;避免列表数据过少(比如只有一条数据),显示无更多数据会不好看; 默认5
-					empty: {
-						icon: '',
-						tip: '暂无内容', // 提示
-						// btnText: '去看看'
-					},
-					textNoMore: '没有更多了'
-				},
-				list: [],
 			}
 		},
 		onLoad(e) {
-
 			let sysInfo = uni.getSystemInfoSync()
 			this.height = sysInfo.windowHeight  - 70 + 'px' //除标题栏栏外的屏幕可用高度
 		},
@@ -68,53 +28,6 @@
 				})
 			},
 
-
-			/*下拉刷新的回调 */
-			downCallback() {
-				// 这里加载你想下拉刷新的数据, 比如刷新轮播数据
-				// loadSwiper();
-				// 下拉刷新的回调,默认重置上拉加载列表为第一页 (自动执行 page.num=1, 再触发upCallback方法 )
-				this.mescroll.resetUpScroll()
-			},
-			/*上拉加载的回调: 其中page.num:当前页 从1开始, page.size:每页数据条数,默认10 */
-			upCallback(page) {
-
-				let status = this.index
-				if (this.index === 3){
-					status = 4
-				}
-
-				//联网加载数据
-				this.mescroll.endSuccess(10, false);
-				// this.$api.service.performanceList({
-				// 	pageNum: page.num,
-				// 	pageSize: 10,
-				// 	type:this.index
-				// }).then((res) => {
-				// 	//联网成功的回调,隐藏下拉刷新和上拉加载的状态;
-				// 	this.mescroll.endSuccess(res.data.data.records.length, res.data.data.records.length === 10);
-				// 	//设置列表数据
-				// 	if (page.num === 1) this.list = []; //如果是第一页需手动制空列表
-				// 	res.data.data.records.forEach(i=>{
-				// 		if (i.avatar){
-				// 			i.avatar = i.avatar.replace(/^http:/, "https:")
-				// 		}
-				// 	})
-				// 	this.list = this.list.concat(res.data.data.records); //追加新数据
-				// 	console.log(this.list)
-				// }).catch((err) => {
-				// 	//联网失败, 结束加载
-				// 	this.mescroll.endErr();
-				// })
-			},
-			//点击空布局按钮的回调
-			emptyClick() {
-				uni.showToast({
-					title: '点击了按钮,具体逻辑自行实现'
-				})
-			},
-
-
 		}
 	}
 </script>

+ 0 - 34
pages/directPromotionList/index.rpx.css

@@ -3,37 +3,3 @@
 	padding: 0 32rpx;
 	background: #f7f7f7;
 }
-.item{
-	padding: 20rpx 32rpx;
-	background: #FFFFFF;
-	margin-top: 24rpx;
-	border-radius: 15rpx;
-}
-.avatar{
-	width: 100rpx;
-	height: 100rpx;
-	border-radius: 50rpx;
-	overflow: hidden;
-}
-.avatar image{
-	width: 100rpx;
-	height: 100rpx;
-}
-.userMsg{
-	background: white;
-	width: 500rpx;
-}
-
-.name{
-	font-size: 30rpx;
-	font-weight: bold;
-}
-.time{
-	font-size: 30rpx;
-	color: #999999;
-}
-.number{
-	font-size: 30rpx;
-	font-weight: bold;
-	color: #4cd964;
-}

+ 34 - 0
pages/directPromotionList/module/index.rpx.css

@@ -0,0 +1,34 @@
+.item{
+    padding: 20rpx 32rpx;
+    background: #FFFFFF;
+    margin-top: 24rpx;
+    border-radius: 15rpx;
+}
+.avatar{
+    width: 100rpx;
+    height: 100rpx;
+    border-radius: 50rpx;
+    overflow: hidden;
+}
+.avatar image{
+    width: 100rpx;
+    height: 100rpx;
+}
+.userMsg{
+    background: white;
+    width: 500rpx;
+}
+
+.name{
+    font-size: 30rpx;
+    font-weight: bold;
+}
+.time{
+    font-size: 30rpx;
+    color: #999999;
+}
+.number{
+    font-size: 30rpx;
+    font-weight: bold;
+    color: #4cd964;
+}

+ 140 - 0
pages/directPromotionList/module/mescrollUni-item.vue

@@ -0,0 +1,140 @@
+<template>
+	<!--
+    swiper中的transfrom会使fixed失效,此时用height固定高度;
+    swiper中无法触发mescroll-mixins.js的onPageScroll和onReachBottom方法,只能用mescroll-uni,不能用mescroll-body
+    -->
+	<!-- ref动态生成: 字节跳动小程序编辑器不支持一个页面存在相同的ref (如不考虑字节跳动小程序可固定值为 ref="mescrollRef") -->
+	<!-- top的高度等于悬浮菜单tabs的高度 -->
+	<mescroll-uni :ref="'mescrollRef' + i" @init="mescrollInit" :height="height" :down="downOption" @down="downCallback"
+		:up="upOption" @up="upCallback" @emptyclick="emptyClick">
+		<view  class="flex-row justify-between item" v-for="(item,index) in list">
+			<view class="flex-row avatar">
+				<image :src="'/static/ud4.png'"></image>
+			</view>
+			<view class="flex-row justify-between userMsg">
+				<view class="flex-col justify-around">
+					<text class="name">{{item.ncikName}}</text>
+				</view>
+				<view class="flex-col justify-around">
+					<text class="time">{{item.createTime}}</text>
+				</view>
+			</view>
+		</view>
+	</mescroll-uni>
+</template>
+
+<script>
+	import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
+	import MescrollMoreItemMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mixins/mescroll-more-item.js"
+	export default {
+		mixins: [MescrollMixin, MescrollMoreItemMixin], // 注意此处还需使用MescrollMoreItemMixin (必须写在MescrollMixin后面)
+		components: {
+		},
+
+		data() {
+			return {
+				downOption: {
+					auto: false // 不自动加载 (mixin已处理第一个tab触发downCallback)
+				},
+				upOption: {
+					auto: false, // 不自动加载
+					// page: {
+					// 	num: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
+					// 	size: 10 // 每页数据的数量
+					// },
+					noMoreSize: 4, //如果列表已无数据,可设置列表的总数量要大于半页才显示无更多数据;避免列表数据过少(比如只有一条数据),显示无更多数据会不好看; 默认5
+					empty: {
+						icon: '/static/dataNull.png',
+						tip: '暂无内容', // 提示
+						// btnText: '去看看'
+					},
+					textNoMore: '没有更多了'
+				},
+				list:[],
+			}
+		},
+		props: {
+			i: Number, // 每个tab页的专属下标 (除了支付宝小程序必须在这里定义, 其他平台都可不用写, 因为已在MescrollMoreItemMixin定义)
+			index: { // 当前tab的下标 (除了支付宝小程序必须在这里定义, 其他平台都可不用写, 因为已在MescrollMoreItemMixin定义)
+				type: Number,
+				default () {
+					return 0
+				}
+			},
+
+			height: [Number, String], // mescroll的高度
+
+		},
+		watch:{
+
+		},
+
+		created(){
+
+
+		},
+
+		methods: {
+			/*下拉刷新的回调 */
+			downCallback() {
+				// 这里加载你想下拉刷新的数据, 比如刷新轮播数据
+				// loadSwiper();
+				// 下拉刷新的回调,默认重置上拉加载列表为第一页 (自动执行 page.num=1, 再触发upCallback方法 )
+				this.mescroll.resetUpScroll()
+			},
+			/*上拉加载的回调: 其中page.num:当前页 从1开始, page.size:每页数据条数,默认10 */
+			upCallback(page) {
+
+				//联网加载数据
+				let httpData = {
+					pageNum:page.num,
+					pageSize:10
+				}
+
+				this.$api.service.getMyMemberList(httpData).then((res) => {
+					//联网成功的回调,隐藏下拉刷新和上拉加载的状态;
+					this.mescroll.endSuccess(res.data.data.length,res.data.data.length === 10);
+					//设置列表数据
+					if (page.num === 1) this.list = []; //如果是第一页需手动制空列表
+					this.list = this.list.concat(res.data.data); //追加新数据
+					this.getImgUrlByOssId(this.list)
+					console.log(this.list)
+				}).catch((err) => {
+					//联网失败, 结束加载
+					this.mescroll.endErr();
+				})
+
+
+			},
+
+			//点击空布局按钮的回调
+			emptyClick() {
+				uni.showToast({
+					title: '点击了按钮,具体逻辑自行实现'
+				})
+			},
+			// 搜索
+			doSearch() {
+				this.list = []; // 先清空列表,显示加载进度
+				this.mescroll.resetUpScroll();
+			},
+
+			getImgUrlByOssId(list) {
+				if (list) {
+					list.forEach(item=>{
+						if (item.selfPhoto && !item.selfPhotoUrl){
+							this.$api.service.getImage(item.selfPhoto).then(res => {
+								item.selfPhotoUrl = res.data.data[0].url.replace(/^http:/, "https:")
+							});
+						}
+					})
+				}
+			},
+		}
+	}
+</script>
+<style>
+	@import '/common/css/common.css';
+	@import './index.rpx.css';
+
+</style>

+ 1 - 1
pages/earningsList/module/mescrollUni-item.vue

@@ -53,7 +53,7 @@
 					// },
 					noMoreSize: 4, //如果列表已无数据,可设置列表的总数量要大于半页才显示无更多数据;避免列表数据过少(比如只有一条数据),显示无更多数据会不好看; 默认5
 					empty: {
-						icon: '/static/imageIcon/empty.png',
+						icon: '/static/dataNull.png',
 						tip: '暂无内容', // 提示
 						// btnText: '去看看'
 					},

+ 54 - 21
pages/my/index.rpx.css

@@ -1,38 +1,55 @@
 .page {
-	background: #f7f7f7;
-	padding: 0rpx 32rpx;
-	height: 100vh;
+	/*background-image: url('https://jje.xinyuekj.com.cn/prod-api/tech/static/my/bg1.png');*/
+	background-image: url('/static/my/bg1.png');
+	background-repeat: no-repeat;
+	background-size: 100% 30%;
+	background-color: #F9F9F9;
+	padding: 0 32rpx;
+
 }
 .use{
-	padding-top: 30rpx;
+	padding-top: 50rpx;
 }
 .avatar{
-	width: 100rpx;
-	height: 100rpx;
-	padding: 4rpx;
-	border-radius: 8rpx;
-	background: #FFE50C;
+	width: 152rpx;
+	height: 152rpx;
+	box-shadow: 0rpx 4rpx 8rpx 0rpx rgba(0,0,0,0.1);
+	border: 2rpx solid #FFFFFF;
+	border-radius: 50%;
 }
 .avatar image{
-	width: 100rpx;
-	height: 100rpx;
+	width: 152rpx;
+	height: 152rpx;
 }
 .useMsg{
 	margin-left: 24rpx;
 }
 .name{
-	font-size: 28rpx;
-	font-weight: bold;
+	width: 96rpx;
+	height: 48rpx;
+	font-size: 32rpx;
+	font-weight: 700;
+	color: #333333;
+	line-height: 48rpx;
 }
 .tag{
+	background: #FFF6CE;
+	border-radius: 8rpx;
+	border: 2rpx solid #FFE05C;
 	font-size: 20rpx;
-	background: #FFE50C;
-	margin-left: 24rpx;
-	padding: 2rpx 10rpx;
-	border-radius: 10rpx;
+	font-weight: 400;
+	color: #333333;
+	line-height: 48rpx;
+	padding: 0rpx 15rpx;
+	margin-left: 10rpx;
 }
 .phone{
+	width: 226rpx;
+	height: 40rpx;
 	font-size: 24rpx;
+	font-weight: 400;
+	color: #333333;
+	line-height: 40rpx;
 }
 
 .statistics {
@@ -41,6 +58,8 @@
 	border-radius: 24rpx;
 	margin-top: 40rpx;
 	overflow: hidden;
+	padding: 40rpx 0;
+
 }
 
 .statisticsTitle {
@@ -50,26 +69,35 @@
 	margin-left: 32rpx;
 	margin-top: 20rpx;
 }
+.out{
+	width: 50%;
+}
+.leftBorder{
+	border-left: 2rpx solid #EEEEEE;
+}
 .statisticsItem {
-	/*width: 33%;*/
-	/*height: 160rpx;*/
-	/*margin-top: 40rpx;*/
+	text-align: center;
 }
 
 .statisticsItemBorder {
 	border-left: 4rpx solid #EEEEEE;
 }
+.statisticsImg{
+	width: 56rpx;
+	height: 56rpx;
+}
 .statisticsKey {
 	font-size: 24rpx;
 	font-weight: 400;
 	color: #999999;
-	line-height: 60rpx;
+	line-height: 40rpx;
 }
 
 .statisticsValue {
 	font-size: 36rpx;
 	font-weight: bold;
 	color: #333333;
+	line-height: 52rpx;
 }
 .tuoke {
 	background: #FFFFFF;
@@ -80,3 +108,8 @@
 	padding: 1rpx 0;
 	overflow: hidden;
 }
+.list{
+	margin-top: 20rpx;
+	border-radius: 15rpx;
+	overflow: hidden;
+}

+ 80 - 32
pages/my/my.vue

@@ -1,12 +1,11 @@
 <template>
-	<view class="page">
-		<uni-nav-bar  :fixed="true" background-color="#F7F7F7" :border="false" :statusBar="true"   title="个人中心"  />
-
+	<view class="page" :style="{height:height}">
+<!--		<uni-nav-bar  :fixed="true" background-color="#F7F7F7" :border="false" :statusBar="true"   title="个人中心"  />-->
 		<view class="flex-row use">
 			<view class="avatar" @click="goUserInfo">
-				<image :src="userInfo.img || '/static/ud4.png'"></image>
+				<image :src="userInfo.selfPhotoUrl || '/static/ud4.png'"></image>
 			</view>
-			<view class="flex-col justify-around useMsg">
+			<view class="flex-col justify-evenly useMsg">
 				<view class="flex-row">
 					<text class="name">{{userInfo.name}}</text>
 					<view class="tag">{{userInfo.isManager === 1? '拓客经理':'拓客专员'}}</view>
@@ -18,38 +17,65 @@
 		</view>
 
 		<view class="statistics flex-col">
-			<view class="statisticsTitle">
-				<text >拓客统计</text>
-			</view>
-			<view class="flex-col justify-start">
-				<uni-list :border="false">
-					<uni-list-item v-if="userInfo.isManager === 1"  :clickable="true" title="我的专员(人)" to="/pages/specialistsList/specialistsList"
-								   showArrow thumb="/static/my/fuwuNmber.png" thumb-size="sm" rightText="80.80" />
-					<uni-list-item v-if="userInfo.isManager !== 1" :clickable="true" title="推广收益(元)"  to="/pages/earningsList/earningsList"
-								   showArrow thumb="/static/my/benyuerenwu.png" thumb-size="sm" rightText="800.99" />
-					<uni-list-item v-if="userInfo.isManager !== 1" :clickable="true" title="我的直推(人)" to="/pages/directPromotionList/directPromotionList"
-								   showArrow thumb="/static/my/fuwuTimeLong.png" thumb-size="sm" rightText="800" />
-					<uni-list-item v-if="userInfo.isManager !== 1" :clickable="true" title="我的间推(人)" to="/pages/indirectPromotionList/indirectPromotionList"
-								   showArrow thumb="/static/my/fuwuNmber.png" thumb-size="sm" rightText="800" />
-				</uni-list>
-			</view>
-		</view>
 
-		<view class="tuoke " v-if="userInfo.isManager !== 1">
-			<view class="statisticsTitle ">
-				<text >今日统计</text>
+			<view class="flex-row justify-around" v-if="userInfo.isManager == '1'">
+				<view class="flex-row justify-center out ">
+					<view class="flex-col  statisticsItem " @click="navigateTo('/pages/specialistsList/specialistsList')">
+						<view>
+							<image src="/static/my/fuwuNmber.png" class="statisticsImg"></image>
+						</view>
+						<text class="statisticsKey">我的专员(人)</text>
+						<text class="statisticsValue">300</text>
+					</view>
+				</view>
+				<view class="flex-row justify-center out leftBorder">
+					<view class="flex-col statisticsItem " >
+						<view>
+							<image src="/static/my/hezuohuoban.png" class="statisticsImg"></image>
+						</view>
+						<text class="statisticsKey">合作伙伴(人)</text>
+						<text class="statisticsValue">300</text>
+					</view>
+				</view>
 			</view>
-			<view class="flex-col justify-center ">
-				<uni-list :border="false">
 
-					<uni-list-item  :clickable="true" title="今日推广" to="/pages/todayPromotionList/todayPromotionList"
-								   showArrow thumb="/static/my/jinrirenwu.png" thumb-size="sm" rightText="800" />
-					<uni-list-item  :clickable="true" title="今日收益" to="/pages/todayEarningsList/todayEarningsList"
-								   showArrow thumb="/static/my/jinriyeji.png" thumb-size="sm" rightText="800" />
-				</uni-list>
+			<view class="flex-row justify-around " v-else>
+				<view class="flex-row justify-center out ">
+					<view class="flex-col  statisticsItem " @click="navigateTo('/pages/directPromotionList/directPromotionList')">
+						<view>
+							<image src="/static/my/fuwuTimeLong.png" class="statisticsImg"></image>
+						</view>
+						<text class="statisticsKey">我的直推(人)</text>
+						<text class="statisticsValue">300</text>
+					</view>
+				</view>
+				<view class="flex-row justify-center out leftBorder">
+					<view class="flex-col statisticsItem " @click="navigateTo('/pages/earningsList/earningsList')">
+						<view>
+							<image src="/static/my/benyuerenwu.png" class="statisticsImg"></image>
+						</view>
+						<text class="statisticsKey">推广收益(人)</text>
+						<text class="statisticsValue">300</text>
+					</view>
+				</view>
 			</view>
 		</view>
 
+		<view class="flex-col justify-start list">
+			<uni-list :border="false">
+				<uni-list-item v-if="userInfo.isManager == 1"  :clickable="true" title="我的分组" to="/pages/specialistsList/specialistsList"
+							   showArrow thumb="/static/my/fenzu.png" thumb-size="sm" rightText=""   />
+<!--				<uni-list-item v-if="userInfo.isManager == 1" :clickable="true" title="推广收益(元)"  to="/pages/earningsList/earningsList"-->
+<!--							   showArrow thumb="/static/my/benyuerenwu.png" thumb-size="sm" rightText="" />-->
+<!--				<uni-list-item v-if="userInfo.isManager == 1" :clickable="true" title="我的直推(人)" to="/pages/directPromotionList/directPromotionList"-->
+<!--							   showArrow thumb="/static/my/fuwuTimeLong.png" thumb-size="sm" rightText="" />-->
+				<!--					<uni-list-item v-if="userInfo.isManager !== 1" :clickable="true" title="我的间推(人)" to="/pages/indirectPromotionList/indirectPromotionList"-->
+				<!--								   showArrow thumb="/static/my/fuwuNmber.png" thumb-size="sm" rightText="800" />-->
+			</uni-list>
+		</view>
+
+
+
 	</view>
 </template>
 
@@ -58,15 +84,37 @@
 		data() {
 			return {
 				staticsData:{},
-				userInfo:{}
+				userInfo:{},
+				height:''
 			}
 		},
+		onLoad() {
+			let sysInfo = uni.getSystemInfoSync()
+			this.height = sysInfo.windowHeight + 'px'
+		},
 
 		onShow(){
 			this.userInfo = uni.getStorageSync('spreadUserInfo')
+			this.getImgUrlByOssId(this.userInfo.img)
 		},
 
 		methods: {
+
+			navigateTo(url){
+				uni.navigateTo({
+					url:url
+				})
+			},
+
+			getImgUrlByOssId(Id) {
+				if (Id) {
+					this.$api.service.getImage(Id).then(res => {
+						this.userInfo.selfPhotoUrl = res.data.data[0].url.replace(/^http:/, "https:")
+						this.$set(this.userInfo)
+					});
+				}
+			},
+
 			navigateTo(url){
 				uni.navigateTo({
 					url: url

+ 1 - 1
pages/register/register.vue

@@ -185,7 +185,7 @@
 							filePath:tempUrl,
 							name: 'file',
 							header: {
-								"Content-Type": "multipart/form-data",
+								// "Content-Type": "multipart/form-data",
 								// 'X-Access-Token': uni.getStorageSync('token'),
 								'Authorization': 'Bearer ' + uni.getStorageSync('accessToken'),
 							},

+ 34 - 0
pages/specialistsList/module/index.rpx.css

@@ -0,0 +1,34 @@
+.item{
+    padding: 20rpx 32rpx;
+    background: #FFFFFF;
+    margin-top: 24rpx;
+    border-radius: 15rpx;
+}
+.avatar{
+    width: 100rpx;
+    height: 100rpx;
+    border-radius: 50rpx;
+    overflow: hidden;
+}
+.avatar image{
+    width: 100rpx;
+    height: 100rpx;
+}
+.userMsg{
+    background: white;
+    width: 500rpx;
+}
+
+.name{
+    font-size: 30rpx;
+    font-weight: bold;
+}
+.time{
+    font-size: 30rpx;
+    color: #999999;
+}
+.number{
+    font-size: 30rpx;
+    font-weight: bold;
+    color: #4cd964;
+}

+ 153 - 0
pages/specialistsList/module/mescrollUni-item.vue

@@ -0,0 +1,153 @@
+<template>
+	<!--
+    swiper中的transfrom会使fixed失效,此时用height固定高度;
+    swiper中无法触发mescroll-mixins.js的onPageScroll和onReachBottom方法,只能用mescroll-uni,不能用mescroll-body
+    -->
+	<!-- ref动态生成: 字节跳动小程序编辑器不支持一个页面存在相同的ref (如不考虑字节跳动小程序可固定值为 ref="mescrollRef") -->
+	<!-- top的高度等于悬浮菜单tabs的高度 -->
+	<mescroll-uni :ref="'mescrollRef' + i" @init="mescrollInit" :height="height" :down="downOption" @down="downCallback"
+		:up="upOption" @up="upCallback" @emptyclick="emptyClick">
+
+			<view  class="flex-row justify-between item" v-for="(item,index) in list">
+				<view class="flex-row avatar">
+					<image :src="item.selfPhotoUrl || '/static/ud4.png'"></image>
+				</view>
+				<view class="flex-col justify-between userMsg">
+					<view class="flex-row justify-between">
+						<text class="name">{{item.name}}</text>
+						<text class="time">{{item.createTime}}</text>
+
+					</view>
+					<view class="flex-row justify-between">
+						<text class="direct ">
+							直推:<text class="number">{{item.num }}</text>
+						</text>
+						<!--					<text class="indirect">-->
+						<!--						间推:<text class="number">20</text>-->
+						<!--					</text>-->
+					</view>
+				</view>
+			</view>
+
+	</mescroll-uni>
+</template>
+
+<script>
+	import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
+	import MescrollMoreItemMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mixins/mescroll-more-item.js"
+	import NextSwipeAction from "../../../components/next-swipe-action/next-swipe-action";
+	export default {
+		mixins: [MescrollMixin, MescrollMoreItemMixin], // 注意此处还需使用MescrollMoreItemMixin (必须写在MescrollMixin后面)
+		components: {
+			NextSwipeAction
+		},
+
+		data() {
+			return {
+				downOption: {
+					auto: false // 不自动加载 (mixin已处理第一个tab触发downCallback)
+				},
+				upOption: {
+					auto: false, // 不自动加载
+					// page: {
+					// 	num: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
+					// 	size: 10 // 每页数据的数量
+					// },
+					noMoreSize: 4, //如果列表已无数据,可设置列表的总数量要大于半页才显示无更多数据;避免列表数据过少(比如只有一条数据),显示无更多数据会不好看; 默认5
+					empty: {
+						icon: '/static/dataNull.png',
+						tip: '暂无内容', // 提示
+						// btnText: '去看看'
+					},
+					textNoMore: '没有更多了'
+				},
+				list:[],
+			}
+		},
+		props: {
+			i: Number, // 每个tab页的专属下标 (除了支付宝小程序必须在这里定义, 其他平台都可不用写, 因为已在MescrollMoreItemMixin定义)
+			index: { // 当前tab的下标 (除了支付宝小程序必须在这里定义, 其他平台都可不用写, 因为已在MescrollMoreItemMixin定义)
+				type: Number,
+				default () {
+					return 0
+				}
+			},
+
+			height: [Number, String], // mescroll的高度
+
+		},
+		watch:{
+
+		},
+
+		created(){
+
+
+		},
+
+		methods: {
+			/*下拉刷新的回调 */
+			downCallback() {
+				// 这里加载你想下拉刷新的数据, 比如刷新轮播数据
+				// loadSwiper();
+				// 下拉刷新的回调,默认重置上拉加载列表为第一页 (自动执行 page.num=1, 再触发upCallback方法 )
+				this.mescroll.resetUpScroll()
+			},
+			/*上拉加载的回调: 其中page.num:当前页 从1开始, page.size:每页数据条数,默认10 */
+			upCallback(page) {
+
+				//联网加载数据
+				let httpData = {
+					pageNum:page.num,
+					pageSize:10
+				}
+
+				this.$api.service.getMyExpandUserList(httpData).then((res) => {
+					//联网成功的回调,隐藏下拉刷新和上拉加载的状态;
+					this.mescroll.endSuccess(res.data.data.length,res.data.data.length === 10);
+					//设置列表数据
+					if (page.num === 1) this.list = []; //如果是第一页需手动制空列表
+					this.list = this.list.concat(res.data.data); //追加新数据
+					this.getImgUrlByOssId(this.list)
+					console.log(this.list)
+				}).catch((err) => {
+					//联网失败, 结束加载
+					this.mescroll.endErr();
+				})
+
+
+			},
+
+			//点击空布局按钮的回调
+			emptyClick() {
+				uni.showToast({
+					title: '点击了按钮,具体逻辑自行实现'
+				})
+			},
+			// 搜索
+			doSearch() {
+				this.list = []; // 先清空列表,显示加载进度
+				this.mescroll.resetUpScroll();
+			},
+
+			getImgUrlByOssId(list) {
+				if (list) {
+					list.forEach((item,index)=>{
+						if (item.img && !item.selfPhotoUrl){
+							this.$api.service.getImage(item.img).then(res => {
+								item.selfPhotoUrl = res.data.data[0].url.replace(/^http:/, "https:")
+								this.$set(this.list,index,item)
+								console.log('+++++++++++++++++',item)
+							});
+						}
+					})
+				}
+			},
+		}
+	}
+</script>
+<style>
+	@import '/common/css/common.css';
+	@import './index.rpx.css';
+
+</style>

+ 7 - 97
pages/specialistsList/specialistsList.vue

@@ -1,65 +1,23 @@
 <template>
 	<view class="page">
 		<uni-nav-bar  :fixed="true" background-color="#FFE05C" :border="false" :statusBar="true"  left-icon="left" title="我的专员" @clickLeft="back" />
-
-
 		<view :style="{height:height}" class="list">
-			<mescroll-uni ref="mescrollRef" @init="mescrollInit" :height="height" :down="downOption" @down="downCallback"
-						  :up="upOption" @up="upCallback" @emptyclick="emptyClick">
-				<view  class="flex-row justify-between item" v-for="(item,index) in 10">
-					<view class="flex-row avatar">
-						<image :src="'/static/ud4.png'"></image>
-					</view>
-					<view class="flex-row justify-between userMsg">
-						<view class="flex-col justify-around">
-							<text class="name">张辉</text>
-							<text class="direct ">
-								直推:<text class="number">20</text>
-							</text>
-						</view>
-						<view class="flex-col justify-around">
-							<text class="time">2024-01-29 12:00:00</text>
-							<text class="indirect">
-								间推:<text class="number">20</text>
-							</text>
-						</view>
-					</view>
-
-				</view>
-			</mescroll-uni>
+			<mescroll-item ref="MescrollItem" :i="0"  :index="0"  :height="height">
+			</mescroll-item>
 		</view>
-
-
 	</view>
 </template>
 
 <script>
-	import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
-	import MescrollMoreItemMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mixins/mescroll-more-item.js"
+	import MescrollItem from "./module/mescrollUni-item.vue";
 	export default {
-		mixins: [MescrollMixin, MescrollMoreItemMixin], // 注意此处还需使用MescrollMoreItemMixin (必须写在MescrollMixin后面)
-		components: {},
+		components: {
+			MescrollItem
+		},
 		data() {
 			return {
 				height:'',
-				downOption: {
-					auto: false // 不自动加载 (mixin已处理第一个tab触发downCallback)
-				},
-				upOption: {
-					auto: false, // 不自动加载
-					// page: {
-					// 	num: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
-					// 	size: 10 // 每页数据的数量
-					// },
-					noMoreSize: 4, //如果列表已无数据,可设置列表的总数量要大于半页才显示无更多数据;避免列表数据过少(比如只有一条数据),显示无更多数据会不好看; 默认5
-					empty: {
-						icon: '',
-						tip: '暂无内容', // 提示
-						// btnText: '去看看'
-					},
-					textNoMore: '没有更多了'
-				},
-				list: [],
+
 			}
 		},
 		onLoad(e) {
@@ -73,54 +31,6 @@
 					delta: 1
 				})
 			},
-
-
-			/*下拉刷新的回调 */
-			downCallback() {
-				// 这里加载你想下拉刷新的数据, 比如刷新轮播数据
-				// loadSwiper();
-				// 下拉刷新的回调,默认重置上拉加载列表为第一页 (自动执行 page.num=1, 再触发upCallback方法 )
-				this.mescroll.resetUpScroll()
-			},
-			/*上拉加载的回调: 其中page.num:当前页 从1开始, page.size:每页数据条数,默认10 */
-			upCallback(page) {
-
-				let status = this.index
-				if (this.index === 3){
-					status = 4
-				}
-
-				//联网加载数据
-				this.mescroll.endSuccess(10, false);
-				// this.$api.service.performanceList({
-				// 	pageNum: page.num,
-				// 	pageSize: 10,
-				// 	type:this.index
-				// }).then((res) => {
-				// 	//联网成功的回调,隐藏下拉刷新和上拉加载的状态;
-				// 	this.mescroll.endSuccess(res.data.data.records.length, res.data.data.records.length === 10);
-				// 	//设置列表数据
-				// 	if (page.num === 1) this.list = []; //如果是第一页需手动制空列表
-				// 	res.data.data.records.forEach(i=>{
-				// 		if (i.avatar){
-				// 			i.avatar = i.avatar.replace(/^http:/, "https:")
-				// 		}
-				// 	})
-				// 	this.list = this.list.concat(res.data.data.records); //追加新数据
-				// 	console.log(this.list)
-				// }).catch((err) => {
-				// 	//联网失败, 结束加载
-				// 	this.mescroll.endErr();
-				// })
-			},
-			//点击空布局按钮的回调
-			emptyClick() {
-				uni.showToast({
-					title: '点击了按钮,具体逻辑自行实现'
-				})
-			},
-
-
 		}
 	}
 </script>

BIN
static/my/fenzu.png


BIN
static/my/hezuohuoban.png