zhanghui пре 2 година
родитељ
комит
39c9f8c847

+ 8 - 0
pages.json

@@ -57,6 +57,14 @@
 				"navigationStyle": "custom",
 				"navigationStyle": "custom",
 				"enablePullDownRefresh" : false
 				"enablePullDownRefresh" : false
 			}
 			}
+		},
+		{
+			"path" : "pages/specialistsList/specialistsList",
+			"style" :
+			{
+				"navigationStyle": "custom",
+				"enablePullDownRefresh" : false
+			}
 		}
 		}
 	],
 	],
 	"tabBar": {
 	"tabBar": {

+ 0 - 2
pages/login/login.vue

@@ -122,8 +122,6 @@
 
 
 					this.$api.login.expandLogin(this.form).then(res => {
 					this.$api.login.expandLogin(this.form).then(res => {
 						uni.setStorageSync('accessToken', res.data.data.access_token)
 						uni.setStorageSync('accessToken', res.data.data.access_token)
-						uni.removeStorageSync('storeId');
-						uni.removeStorageSync('storeName');
 						uni.switchTab({
 						uni.switchTab({
 							url: "/pages/index/index"
 							url: "/pages/index/index"
 						})
 						})

+ 6 - 1
pages/my/my.vue

@@ -22,7 +22,7 @@
 				<text >拓客统计</text>
 				<text >拓客统计</text>
 			</view>
 			</view>
 			<view class="flex-row justify-center ">
 			<view class="flex-row justify-center ">
-				<view class="statisticsItem flex-col ">
+				<view class="statisticsItem flex-col " @click="goSpecialists">
 					<view class="flex-row justify-center">
 					<view class="flex-row justify-center">
 						<u-icon name="/static/my/fuwuNmber.png" size="28"></u-icon>
 						<u-icon name="/static/my/fuwuNmber.png" size="28"></u-icon>
 					</view>
 					</view>
@@ -101,6 +101,11 @@
 			}
 			}
 		},
 		},
 		methods: {
 		methods: {
+			goSpecialists(){
+				uni.navigateTo({
+					url: '/pages/specialistsList/specialistsList'
+				})
+			},
 			goUserInfo(){
 			goUserInfo(){
 				uni.navigateTo({
 				uni.navigateTo({
 					url: '/pages/userInfo/userInfo'
 					url: '/pages/userInfo/userInfo'

+ 39 - 0
pages/specialistsList/index.rpx.css

@@ -0,0 +1,39 @@
+.page {
+	height: 100vh;
+	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;
+}

+ 130 - 0
pages/specialistsList/specialistsList.vue

@@ -0,0 +1,130 @@
+<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>
+		</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"
+	export default {
+		mixins: [MescrollMixin, MescrollMoreItemMixin], // 注意此处还需使用MescrollMoreItemMixin (必须写在MescrollMixin后面)
+		components: {},
+		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' //除标题栏栏外的屏幕可用高度
+		},
+		methods: {
+			back() {
+				uni.navigateBack({
+					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>
+
+<style lang="scss" scoped>
+	@import './index.rpx.css';
+</style>

+ 1 - 1
pages/userInfo/userInfo.vue

@@ -120,6 +120,6 @@
 	};
 	};
 </script>
 </script>
 
 
-<style lang="scss">
+<style lang="scss" scoped>
 	@import './index.rpx.css';
 	@import './index.rpx.css';
 </style>
 </style>