liujiaxin hai 5 días
pai
achega
021e4501fb

+ 9 - 0
api/class.js

@@ -0,0 +1,9 @@
+import Request from '../common/request.js';
+let request = new Request().http
+ export function courseList() {
+ 	 return request('/app/course/getAppletCourse',null,'GET');
+ }
+ // 课程详情
+ export function courseDetails() {
+ 	 return request('/app/course/getH5CourseByVideoId',data,'GET');
+ }

+ 0 - 3
api/user.js

@@ -65,7 +65,4 @@ let request = new Request().http
  
  
  
- 
- 
- 
  

+ 2 - 1
common/request.js

@@ -5,7 +5,8 @@ export default class Request {
 		//let path = 'http://localhost:7014';
 		// let path = 'https://test.userapp.store.cdwjyyh.com';
 		// let path = 'https://user.test.ylrztop.com/api';
-		let path = 'https://userapp.zkhj6.com'//中康
+		// let path = 'https://userapp.zkhj6.com'//中康
+		let path = 'http://zd7f9ae7.natappfree.cc'//中康
 		uni.setStorageSync('requestPath',path)
 		// uni.showLoading({
 		// 	title: '加载中'

+ 61 - 30
pages/home/index.vue

@@ -89,15 +89,18 @@
 		<view class="open-class">
 			<view class="title-box">
 				<text class="title">健康生活方式大讲堂</text>
-				<view class="more">
+				<view class="more" @click="goClassList">
 					<text>查看全部</text>
 					<image src="/static/assets/toright.png"></image>
 				</view>
 			</view>
-			<u-scroll-list  :indicator="false" >
-				<view class="class-item"   @click="goClassroom" v-for="(item, index) in classList" :key="index">
-					<image :src="item.img" mode="widthFix"></image>
-					<view>{{item.txt}}</view>
+			<u-scroll-list :indicator="false">
+				<view class="class-item" @click="goClass(item.courseId)" v-for="(item, index) in classList"
+					:key="index">
+					<view class="img-box">
+						<image :src="item.imgUrl || '/static/assets/no-img.png'"  ></image>
+					</view>
+					<view>{{item.courseName}}</view>
 				</view>
 			</u-scroll-list>
 		</view>
@@ -265,6 +268,9 @@
 </template>
 
 <script>
+	import {
+		courseList
+	} from '@/api/class.js'
 	import zModal from '@/components/z-modal/z-modal.vue'
 	import {
 		getStoreActivity
@@ -312,16 +318,7 @@
 		},
 		data() {
 			return {
-				classList: [{
-					img: '/static/assets/class1.png',
-					txt: '夏季养心说'
-				}, {
-					img: '/static/assets/class2.png',
-					txt: '夏季养心说'
-				}, {
-					img: '/static/assets/class3.png',
-					txt: '夏季养心说'
-				}],
+				classList: [],
 				btnGroup: [{
 					text: '取消',
 					color: '#FFFFFF',
@@ -466,6 +463,7 @@
 			this.top = e.scrollTop;
 		},
 		mounted() {
+			this.getCourseList()
 			//this.getDepartmentList();
 		},
 		onShareAppMessage(res) {
@@ -518,7 +516,26 @@
 			this.getshowmanv()
 		},
 		methods: {
-			goClassroom() {
+			getCourseList() {
+				courseList().then(res => {
+					if (res.code == 200) {
+						this.classList = res.data.slice(0, 3)
+					} else {
+						uni.hideLoading();
+						uni.showToast({
+							title: res.msg,
+							icon: 'none'
+						});
+					}
+				})
+
+			},
+			goClass(id) {
+				uni.navigateTo({
+					url: `/pages_manage/learn?courseId=${id}`
+				})
+			},
+			goClassList() {
 				uni.navigateTo({
 					url: '/pages_manage/teacherClassroom'
 				})
@@ -1922,11 +1939,13 @@
 				display: flex;
 				align-items: center;
 				justify-content: center;
+
 				image {
 					width: 37upx;
 					height: 37upx;
 					margin: 0upx 20upx;
 				}
+
 				text {
 					font-size: 36upx;
 					line-height: 1;
@@ -1939,6 +1958,7 @@
 			.drug-list {
 				display: flex;
 				flex-wrap: wrap;
+
 				.item {
 					margin-right: 20rpx;
 					margin-bottom: 20rpx;
@@ -2036,8 +2056,8 @@
 					color: #999999;
 					display: flex;
 					align-items: center;
-					
-					image{
+
+					image {
 						width: 24rpx;
 						height: 24rpx;
 					}
@@ -2045,24 +2065,35 @@
 			}
 
 
-				.class-item {
-					font-size: 24rpx;
-					margin-top: 24rpx;
-					background-color: #fff;
+			.class-item {
+				font-size: 24rpx;
+				margin-top: 24rpx;
+				background-color: #fff;
+				border-radius: 16rpx;
+				padding: 8rpx 10rpx 16rpx;
+				margin-right: 14rpx;
+				width: 250rpx;
+				height: 300rpx;
+				font-size: 26rpx;
+				font-weight: 500;
+
+				.img-box {
+					height: 220rpx;
 					border-radius: 16rpx;
-					padding: 8rpx 8rpx 16rpx;
-					margin-right: 14rpx;
-					width: 250rpx;
+					overflow: hidden;
+					margin-bottom: 12rpx;
 					image {
 						width: 100%;
-						height:100%;
-						margin-bottom: 6rpx;
-					}
-					&:last-child {
-						margin-right: 0rpx;
+						height: 100%;
 					}
 				}
+
+
+				&:last-child {
+					margin-right: 0rpx;
+				}
 			}
+		}
 
 		.modules {
 			.module {

+ 21 - 3
pages_course/videovip.vue

@@ -4,7 +4,7 @@
 			<u-icon name="arrow-left" size="28" @click="tosales" v-if="appToken"></u-icon>
 			<view class="header-title" :style="{width:menuButtonLeft + 'px',height:menuButtonH+'px',lineHeight:menuButtonH+'px'}">{{courseInfo.title}}</view>
 		</view> -->
-		<view class="video-box">
+		<view class="video-box" v-if="!videoItem">
 			<image v-if="!isLogin || isAddKf!=1" class="video-poster" :src="courseInfo.imgUrl" mode="aspectFill">
 			</image>
 			<video 
@@ -30,6 +30,15 @@
 				<!-- <cover-image v-if="courseLogo" :class="isFull?'logo-full':'logo'" :src="courseLogo" mode="widthFix"></cover-image> -->
 			</video>
 		</view>
+		<view class="video-box" v-else>
+			<video
+			id="video-content-box"
+			style="width: 100%;height: 420rpx;"
+			:src="videoItem.videoUrl"
+			>
+			</video>
+		</view>
+		
 		<view class="justify-start align-center fs24 base-color-9" v-if="userInfo.userId">
 			<view>{{nameuser?nameuser:'暂未授权昵称'}}#</view>
 			<view>{{userInfo.userId}}</view>
@@ -294,6 +303,7 @@
 	export default {
 		data() {
 			return {
+				videoItem:{},
 				viewload:true,
 				loadingtext:"数据加载中...",
 				baseUrl:uni.getStorageSync('requestPath'),
@@ -478,6 +488,7 @@
 			
 		// },
 		onLoad(option) {
+			console.log("option",option)
 			this.videoContext = uni.createVideoContext('video-content-box', this)
 			this.code = option.code
 			if(uni.getStorageSync('userInfo')&&JSON.stringify(uni.getStorageSync('userInfo'))!='{}') {
@@ -487,10 +498,17 @@
 			}
 			this.appToken=uni.getStorageSync('companyUserInfo')
 			// decodeURIComponent()
-			if(!option.course){
+			
+			if(!option.course&&!option.videoitem){
 				const keys = decodeURIComponent(Object.keys(option)[0]);
 				this.urlOption=JSON.parse(keys.split('course=')[1])
-			}else{
+			}else if(option.videoitem){
+				this.videoItem=option.videoitem ? JSON.parse(option.videoitem) : {}
+				this.videoId=this.videoItem.videoId
+				console.log("optionqqq",this.videoItem)
+				console.log("option111",this.videoItem.videoId)
+				return
+			}else if(option.course){
 				this.urlOption = option.course ? JSON.parse(option.course) : {}
 			}
 			this.projectId=this.urlOption.projectId

+ 129 - 105
pages_manage/components/courseItem.vue

@@ -13,34 +13,43 @@
 					</view>
 				</view>
 				<view class="courselist-desc one-t" v-show="from != 'course'">{{info.courseName}}</view>
-				<view :class="from == 'course' ? 'courselist-con-timebox ':'courselist-con-timebox x-f'" @click.passive.stop>
-					<view class="x-f acea-row"><u-icon class="icon" name="hourglass" color="#999"
-							size="20"></u-icon>开始时间:{{info.startDateTime?info.startDateTime:''}}</view>
-					<view class="x-f acea-row"><u-icon class="icon" name="hourglass-half-fill" color="#999"
-							size="20"></u-icon>结束时间:{{info.endDateTime?info.endDateTime:''}}</view>
+				<view :class="from == 'course' ? 'courselist-con-timebox ':'courselist-con-timebox x-f'"
+					@click.passive.stop>
+					<view class="x-f acea-row">
+						<u-icon class="icon" name="hourglass" color="#999" size="20"></u-icon>
+						开始时间:{{info.startDateTime?info.startDateTime:''}}
+					</view>
+					<view class="x-f acea-row">
+						<u-icon class="icon" name="hourglass-half-fill" color="#999" size="20"></u-icon>
+						结束时间:{{info.endDateTime?info.endDateTime:''}}
+					</view>
 					<view class="justify-between align-center">
-						<view class="x-f acea-row"><u-icon class="icon" name="clock" color="#999"
-								size="16"></u-icon>{{$formatSeconds(info.duration,1)}}</view>
+						<view class="x-f acea-row">
+							<u-icon class="icon" name="clock" color="#999" size="16"></u-icon>
+							{{$formatSeconds(info.duration,1)}}
+						</view>
 						<view class="u-border radius50 ptb8 plr18 base-color-6" style="width: fit-content;"
-						@click="showtime=!showtime">调整看课时间</view>
+							@click="showtime=!showtime">调整看课时间</view>
 					</view>
-					<u-modal :show="showtime"  :title="titletime" @confirm="confirmtime" @close="showtime=!showtime" 
-					@cancel="showtime=!showtime" :closeOnClickOverlay="true" :showCancelButton="true">
+					<u-modal :show="showtime" :title="titletime" @confirm="confirmtime" @close="showtime=!showtime"
+						@cancel="showtime=!showtime" :closeOnClickOverlay="true" :showCancelButton="true">
 						<view class="slot-content">
 							<view class="justify-start align-center">
 								<view class="mr20">开始时间:</view>
-								<u-input v-model="startTimevalue"  placeholder="请选择开始时间" @focus="startTime=!startTime"></u-input>
+								<u-input v-model="startTimevalue" placeholder="请选择开始时间" @focus="startTime=!startTime">
+								</u-input>
 							</view>
 							<view class="justify-start align-center mt20">
 								<view class="mr20">结束时间:</view>
-								<u-input v-model="endTimevalue"  placeholder="请选择结束时间" @focus="endtime=!endtime"></u-input>
+								<u-input v-model="endTimevalue" placeholder="请选择结束时间" @focus="endtime=!endtime">
+								</u-input>
 							</view>
 						</view>
 					</u-modal>
 					<u-datetime-picker :show="startTime" v-model="value1" mode="time" @cancel="startTime=!startTime"
-					@confirm="confirmstart"></u-datetime-picker>
+						@confirm="confirmstart"></u-datetime-picker>
 					<u-datetime-picker :show="endtime" v-model="value2" mode="time" @cancel="endtime=!endtime"
-					@confirm="confirmend"></u-datetime-picker>
+						@confirm="confirmend"></u-datetime-picker>
 				</view>
 			</view>
 		</view>
@@ -50,23 +59,27 @@
 		</view>
 		<view class="courselist-footer x-f ">
 			<!--#ifdef MP-WEIXIN-->
-			<view class="courselist-footer-item x-c " @click="handleClick()"><u-icon
-					name="share-square" color="#1677ff" size="18"></u-icon>分享课程</view>
+			<view class="courselist-footer-item x-c " @click="handleClick()">
+				<u-icon name="share-square" color="#1677ff" size="18"></u-icon>分享课程
+			</view>
 			<!--#endif-->
 			<!--#ifdef H5-->
-			<view class="courselist-footer-item x-c "  @click="handleShare"><u-icon
-					name="share-square" color="#1677ff" size="18"></u-icon>分享课程</view>
+			<view class="courselist-footer-item x-c " @click="handleShare">
+				<u-icon name="share-square" color="#1677ff" size="18"></u-icon>分享课程
+			</view>
 			<!--#endif-->
-			<view class="courselist-footer-item x-c shishi" v-show="activeTab == 1" @click="handleStatistics"><u-icon
-					name="share-square" color="#1677ff" size="18"></u-icon>课程统计</view>
-			<view class="courselist-footer-item x-c shuju" v-show="activeTab == 2" @click="handleStatistics"><u-icon
-					name="share-square" color="#1677ff" size="18"></u-icon>数据统计</view>
+			<view class="courselist-footer-item x-c shishi" v-show="activeTab == 1" @click="handleStatistics">
+				<u-icon name="share-square" color="#1677ff" size="18"></u-icon>课程统计
+			</view>
+			<view class="courselist-footer-item x-c shuju" v-show="activeTab == 2" @click="handleStatistics">
+				<u-icon name="share-square" color="#1677ff" size="18"></u-icon>数据统计
+			</view>
 		</view>
 		<!-- 分享弹窗 -->
 		<u-popup :show="showShare" :closeOnClickOverlay="true" :round='20' @close="closeShare" @open="openShare">
 			<view class="sharePop x-ac">
 				<!--#ifdef MP-WEIXIN-->
-				<view class="sharePop-item y-f card-share" >
+				<view class="sharePop-item y-f card-share">
 					<image :src="imgPath+'/app/images/card_icon.png'" mode="aspectFill"
 						style="width: 80rpx; height: 80rpx;margin-top: 20rpx;"></image>
 					<view style="font-weight: bold;margin-bottom: 4px;">生成卡片</view>
@@ -94,7 +107,7 @@
 				<view class="timetip">不传默认以系统参数为准</view>
 				<view class="x-f">
 					<text style="margin-right: 20px;">链接有效时长(分钟)</text>
-					<u-input fontSize="14px" placeholder="链接有效时长" border="none" v-model="time" maxlength="5"></u-input>
+					<u-input fontSize="14px" placeholder="链接有效时长" border="none" v-model="time" maxlength="5" />
 				</view>
 			</view>
 		</u-modal>
@@ -102,7 +115,7 @@
 		<!-- 生成海报 -->
 		<u-popup :show="setImg" @close="closeimg" :round="12" style="z-index: 999;">
 			<view class="w100 h540 center">
-				<image :src="codeLink.url" mode="aspectFill" ></image>
+				<image :src="codeLink.url" mode="aspectFill"></image>
 			</view>
 			<view class="justify-around mb40">
 				<!-- <view class="column justify-center align-center" @click="shareimg">
@@ -120,10 +133,9 @@
 				<view class="imgshe">
 					<image :src="imgPath+'/app/image/point.png'" class="w300 h300"></image>
 				</view>
-				<view class="column colorf fs32 xu-box fs40
-				align-center justify-center">
+				<view class="column colorf fs32 xu-box fs40	align-center justify-center">
 					<view class="justify-center">点击右上角
-						<image :src=:src="imgPath+'/app/image/wxmore.png'" class="w50 h50 mlr10"></image>
+						<image :src="imgPath+'/app/image/wxmore.png'" class="w50 h50 mlr10"></image>
 					</view>
 					<view class="mt20">选择 “转发给朋友”</view>
 					<view style="color: #cbcbcb;" class="fs28 mt40">点击任意位置关闭弹窗</view>
@@ -157,7 +169,7 @@
 					return {}
 				}
 			},
-			parentMethod:{
+			parentMethod: {
 				type: Function
 			}
 		},
@@ -178,39 +190,39 @@
 				painterSrc: '',
 				showzhidao: false,
 				// imgPath:this.$store.state.imgpath,
-				imgs:this.$store.state.imgpath+'/app/image/logoshare.png',
-				showtime:false,
-				titletime:'调整看课时间',
-				endTimevalue:'',
-				startTimevalue:'',
-				startTime:false,
-				endtime:false,
-				value1:'00:00',
-				value2:"23:59"
+				imgs: this.$store.state.imgpath + '/app/image/logoshare.png',
+				showtime: false,
+				titletime: '调整看课时间',
+				endTimevalue: '',
+				startTimevalue: '',
+				startTime: false,
+				endtime: false,
+				value1: '00:00',
+				value2: "23:59"
 			}
 		},
 		computed: {
-		    imgPath() {
-		      return this.$store.state.imgpath
-		    }
-		  },
+			imgPath() {
+				return this.$store.state.imgpath
+			}
+		},
 		onLoad() {},
 		mounted() {
 			this.user = uni.getStorageSync("companyUserInfo") ? JSON.parse(uni.getStorageSync("companyUserInfo")) : {}
 		},
 		methods: {
-			confirmstart(e){
-				this.startTimevalue=e.value
-				this.startTime=!this.startTime
+			confirmstart(e) {
+				this.startTimevalue = e.value
+				this.startTime = !this.startTime
 				console.log(e)
 			},
-			confirmend(e){
-				this.endTimevalue=e.value
-				this.endtime=!this.endtime
+			confirmend(e) {
+				this.endTimevalue = e.value
+				this.endtime = !this.endtime
 				console.log(e)
 			},
-			confirmtime(){
-				if(this.startTimevalue==''){
+			confirmtime() {
+				if (this.startTimevalue == '') {
 					uni.showToast({
 						title: '请选择开始时间',
 						icon: 'none',
@@ -218,7 +230,7 @@
 					});
 					return
 				}
-				if(this.endTimevalue==''){
+				if (this.endTimevalue == '') {
 					uni.showToast({
 						title: '请选择结束时间',
 						icon: 'none',
@@ -226,23 +238,23 @@
 					});
 					return
 				}
-				this.showtime=!this.showtime
-				const data={
-					periodId:this.info.periodId,
-					courseId:this.info.courseId,
-					videoId:this.info.videoId,
-					startDateTime:this.info.startDateTime.substring(0, 10)+' '+this.startTimevalue+":00",
-					endDateTime:this.info.endDateTime.substring(0, 10)+' '+this.endTimevalue+":59"
+				this.showtime = !this.showtime
+				const data = {
+					periodId: this.info.periodId,
+					courseId: this.info.courseId,
+					videoId: this.info.videoId,
+					startDateTime: this.info.startDateTime.substring(0, 10) + ' ' + this.startTimevalue + ":00",
+					endDateTime: this.info.endDateTime.substring(0, 10) + ' ' + this.endTimevalue + ":59"
 				}
-				updataTime([data]).then(res=>{
-					if(res.code==200){
+				updataTime([data]).then(res => {
+					if (res.code == 200) {
 						uni.showToast({
 							title: '完成看课时间调整!',
 							icon: 'none',
 							duration: 1000
 						});
-						this.$emit('retime',1)
-					}else{
+						this.$emit('retime', 1)
+					} else {
 						uni.showToast({
 							title: res.msg,
 							icon: 'none',
@@ -251,16 +263,23 @@
 					}
 				})
 			},
-			handleClick(){
+			handleClick() {
 				this.parentMethod();
-				 this.$emit('trigger-share', {
-					 title: this.info.courseName+this.info.title,
-					 path: "pages_course/videovip",
-					 onshow:true,
-					 params: { companyId: this.user.companyId, companyUserId: this.user.userId,id:this.info.id,projectId:this.info.projectId,
-					 courseId:this.info.courseId,videoId:this.info.videoId,periodId:this.info.periodId},
-					 img:this.info.thumbnail||this.imgs
-				   });
+				this.$emit('trigger-share', {
+					title: this.info.courseName + this.info.title,
+					path: "pages_course/videovip",
+					onshow: true,
+					params: {
+						companyId: this.user.companyId,
+						companyUserId: this.user.userId,
+						id: this.info.id,
+						projectId: this.info.projectId,
+						courseId: this.info.courseId,
+						videoId: this.info.videoId,
+						periodId: this.info.periodId
+					},
+					img: this.info.thumbnail || this.imgs
+				});
 			},
 			// 获取jssdk
 			getjssdklist() {
@@ -274,7 +293,8 @@
 						timestamp: res.data.timestamp, // 必填,生成签名的时间戳
 						nonceStr: res.data.nonceStr, // 必填,生成签名的随机串
 						signature: res.data.signature, // 必填,签名
-						jsApiList: ["updateAppMessageShareData", "onMenuShareAppMessage", ] // 必填,需要使用的JS接口列表
+						jsApiList: ["updateAppMessageShareData",
+							"onMenuShareAppMessage", ] // 必填,需要使用的JS接口列表
 					});
 				})
 			},
@@ -290,7 +310,7 @@
 						// link: self.copylink,
 						link: self.copylink,
 						// 分享链接,该链接域名或路径必须与当前页面对应的公众 号JS安全域名一致
-						imgUrl: self.info.thumbnail||self.imgs, // 分享图标
+						imgUrl: self.info.thumbnail || self.imgs, // 分享图标
 						success: function(res) {
 							console.log(self.info, '456');
 							self.showzhidao = true
@@ -303,7 +323,7 @@
 								duration: 1000
 							});
 						},
-						
+
 					})
 
 					// 另外一个方法·
@@ -390,11 +410,11 @@
 					courseId: this.info.courseId,
 					effectiveDuration: this.time,
 					videoId: this.info.videoId,
-					imgUrl:this.info.thumbnail,
-					title:this.info.title,
-					duration:this.info.duration,
-					periodId:this.info.periodId,
-					id:this.info.id
+					imgUrl: this.info.thumbnail,
+					title: this.info.title,
+					duration: this.info.duration,
+					periodId: this.info.periodId,
+					id: this.info.id
 				}).then(res => {
 					if (res.code == 200) {
 						this.codeLink = res.posterImage
@@ -413,7 +433,8 @@
 				uni.navigateTo({
 					// url: '/pages/courseManage/course/learning?course='+JSON.stringify(info)
 					// url: `/pages/courseManage/course/learning?course=${JSON.stringify(info)}&isvip=1`
-					url:'/pages_managedata/coursedetail?videoId='+info.videoId+'&id='+info.id+'&periodId='+info.periodId
+					url: '/pages_managedata/coursedetail?videoId=' + info.videoId + '&id=' + info.id +
+						'&periodId=' + info.periodId
 				})
 
 			},
@@ -445,8 +466,8 @@
 					courseId: this.info.courseId,
 					effectiveDuration: this.time,
 					videoId: this.info.videoId,
-					periodId:this.info.periodId,
-					id:this.info.id
+					periodId: this.info.periodId,
+					id: this.info.id
 				}
 				sharecourselink(params).then(res => {
 					if (res.code == 200) {
@@ -489,8 +510,8 @@
 					companyUserId: this.user.userId,
 					courseId: this.info.courseId,
 					time: this.time,
-					periodId:this.info.periodId,
-					id:this.info.id,
+					periodId: this.info.periodId,
+					id: this.info.id,
 					// type: this.type,
 					videoId: this.info.videoId,
 				}
@@ -498,9 +519,9 @@
 					if (res.code == 200) {
 						this.copylink = res.url
 						// 强制使用 HTTPS
-						 //  if (this.copylink.startsWith('http://')) {
-							// this.copylink = this.copylink.replace('http://', 'https://');
-						 //  }
+						//  if (this.copylink.startsWith('http://')) {
+						// this.copylink = this.copylink.replace('http://', 'https://');
+						//  }
 					} else {
 						uni.showToast({
 							icon: 'none',
@@ -518,8 +539,8 @@
 					duration: this.info.duration,
 					fileId: this.info.fileId,
 					courseName: this.info.courseName,
-					videoId:this.info.videoId,
-					periodId:this.info.periodId
+					videoId: this.info.videoId,
+					periodId: this.info.periodId
 				}
 				console.log()
 				uni.navigateTo({
@@ -552,18 +573,20 @@
 </script>
 
 <style scoped lang="scss">
-	.card-share{
+	.card-share {
 		position: relative;
 	}
-	.share{
-			display: inline-block;
-			position: absolute;
-			top: 0;
-			left: 0;
-			width: 100%;
-			height: 100%;
-			opacity: 0;
-		}
+
+	.share {
+		display: inline-block;
+		position: absolute;
+		top: 0;
+		left: 0;
+		width: 100%;
+		height: 100%;
+		opacity: 0;
+	}
+
 	.imgshe {
 		display: flex;
 		flex-direction: row-reverse
@@ -594,20 +617,21 @@
 		padding: 30rpx 0;
 		border-radius: 20px 20px 0 0;
 		/* #ifdef MP-WEIXIN */
-		 /* #endif */
-		 
+		/* #endif */
+
 		/* #ifdef H5 */
 		padding-bottom: 100px;
-		 /* #endif */
+
+		/* #endif */
 		&-item {
 			padding: 0 10px;
 			box-sizing: border-box;
 			font-family: PingFang SC, PingFang SC;
 			font-weight: 400;
 			font-size: 14px;
-			
+
 			display: inline-flex !important;
-			
+
 			image {
 				height: 48px;
 				width: 48px;
@@ -746,4 +770,4 @@
 			}
 		}
 	}
-</style>
+</style>

+ 218 - 180
pages_manage/components/manageIndex.vue

@@ -7,12 +7,12 @@
 					<view class="left">
 						<u-avatar :src="user.avatar" size="50"></u-avatar>
 						<!-- <image class="img" :src="user.avatar" mode="aspectFill"></image> -->
-						<view class="user" >
+						<view class="user">
 							<view class="username">{{user.nickName}}</view>
 							<view class="account">{{user.email}}</view>
 						</view>
 					</view>
-					<view class="right" >
+					<view class="right">
 						<image :src="imgPath+'/app/images/right_arrow.png'"></image>
 					</view>
 				</view>
@@ -38,11 +38,11 @@
 					</view>
 				</view>
 			</view>
-			<view class="bgf radius15 p30 justify-between align-center mb40" v-if="balance" >
+			<view class="bgf radius15 p30 justify-between align-center mb40" v-if="balance">
 				<view class="fs24">红包剩余金额</view>
 				<view class="fs40 bold">{{balance.toFixed(2)}}</view>
 			</view>
-			<view class="menu-box" style="margin-top: -20rpx;" >
+			<view class="menu-box" style="margin-top: -20rpx;">
 				<view class="title-box">
 					<image class="icon" :src="imgPath+'/app/manergevip/chang.png'"></image>
 					<view class="title">常用功能</view>
@@ -58,14 +58,14 @@
 						<view class="m-name">审核销售</view>
 					</view>
 					<view class="menu-item" @click="handleShare" v-if="user.userType=='00'">
-						<image :src="imgPath+'/app/manergevip/share-manage.png'" ></image>
+						<image :src="imgPath+'/app/manergevip/share-manage.png'"></image>
 						<view class="m-name">邀请销售</view>
 					</view>
 					<view class="menu-item" @click="navTo('/pages_managedata/lableSetup')">
 						<image :src="imgPath+'/app/images/changeLable.png'"></image>
 						<view class="m-name">标签设置</view>
 					</view>
-			 	</view>
+				</view>
 			</view>
 			<view class="menu-box">
 				<view class="title-box">
@@ -82,14 +82,14 @@
 						<image :src="imgPath+'/app/manergevip/setup.png'"></image>
 						<view class="m-name">设置</view>
 					</view>
-				<!-- 	<view class="menu-item" @click="navTo('/pages_course/exportlist/exportlist')">
+					<!-- 	<view class="menu-item" @click="navTo('/pages_course/exportlist/exportlist')">
 						<u-icon name="attach" color="#2979ff" size="28"></u-icon>
 						<view class="m-name">导出列表</view>
 					</view> -->
 				</view>
-				
+
 			</view>
-			<view class="btn-box" >
+			<view class="btn-box">
 				<view class="sub-btn" @click="showLogout()">退出登录</view>
 			</view>
 		</view>
@@ -120,8 +120,8 @@
 			</view>
 		</u-popup>
 		<!-- 长按保存海报 -->
-		<u-popup :show="setImg"  @close="closeimg" :round="12">
-			<view  class="w100 h500">
+		<u-popup :show="setImg" @close="closeimg" :round="12">
+			<view class="w100 h500">
 				<image :src="codeLink.url" class="codeimg w660" mode="widthFix"></image>
 			</view>
 			<view class="justify-around mtb40">
@@ -144,29 +144,29 @@
 		<!-- 卡片分享引导 -->
 		<u-overlay :show="showzhidao" @click="showzhidao = false" style="z-index: 9999;">
 			<view class="point-box">
-				<view class="imgshe" >
+				<view class="imgshe">
 					<image :src="imgPath+'/app/image/point.png'" class="w300 h300"></image>
 				</view>
-				<view class="column colorf fs32 xu-box fs40
-				align-center justify-center">
+				<view class="column colorf fs32 xu-box fs40	align-center justify-center">
 					<view class="justify-center">点击右上角
-					<image :src="imgPath+'/app/image/wxmore.png'"
-					class="w50 h50 mlr10"></image>
+						<image :src="imgPath+'/app/image/wxmore.png'" class="w50 h50 mlr10"></image>
 					</view>
 					<view class="mt20">选择 “转发给朋友”</view>
 					<view style="color: #cbcbcb;" class="fs28 mt40">点击任意位置关闭弹窗</view>
 				</view>
 			</view>
 		</u-overlay>
-		<u-modal :show="show" title="提示" :showCancelButton="true"  @cancel="hideLogout()" @confirm="logout()" content='确认退出吗?'></u-modal>
+		<u-modal :show="show" title="提示" :showCancelButton="true" @cancel="hideLogout()" @confirm="logout()"
+			content='确认退出吗?'></u-modal>
 		<u-loading-page :loading="viewload" iconSize="32" loadingColor="#3c9cff" fontSize="20"
-		:loading-text="loadingtext" ></u-loading-page>
+			:loading-text="loadingtext"></u-loading-page>
 	</view>
 </template>
 
 <script>
-	
-	import { getCompanyUser } from '@/api/manageCompany.js'
+	import {
+		getCompanyUser
+	} from '@/api/manageCompany.js'
 	// import {
 	// 	sharecourselink,
 	// 	buildCode,
@@ -178,19 +178,19 @@
 	export default {
 		data() {
 			return {
-				viewload:true,
-				loadingtext:"数据加载中...",
-				show:false,
-				user:null,
-				showShare:false,
-				copyLinks:'',
-				setTimeShow:false,
-				time:'',
-				setImg:false,
-				codeLink:'',
-				showzhidao:false,
-				imgs:this.$store.state.imgpath+'/app/image/logo.png',
-				balance:0
+				viewload: true,
+				loadingtext: "数据加载中...",
+				show: false,
+				user: null,
+				showShare: false,
+				copyLinks: '',
+				setTimeShow: false,
+				time: '',
+				setImg: false,
+				codeLink: '',
+				showzhidao: false,
+				imgs: this.$store.state.imgpath + '/app/image/logo.png',
+				balance: 0
 			}
 		},
 		onShow() {
@@ -198,8 +198,8 @@
 		},
 		onShareAppMessage() {
 			return {
-				title: this.$store.state.logoname+'小程序的'+this.user.nickName+'邀请您成为销售', // 分享卡片标题
-				path: '/pages_course/course/becomeSale?id='+this.user.companyId, // 目标页面路径
+				title: this.$store.state.logoname + '小程序的' + this.user.nickName + '邀请您成为销售', // 分享卡片标题
+				path: '/pages_course/course/becomeSale?id=' + this.user.companyId, // 目标页面路径
 				// 携带参数:将当前页面的数据拼接到路径中
 				imageUrl: this.user.avatar || this.imgs, // 分享卡片封面图(可选)
 				success: (res) => {
@@ -211,20 +211,20 @@
 			}
 		},
 		computed: {
-		    imgPath() {
-		      return this.$store.state.imgpath
-		    }
+			imgPath() {
+				return this.$store.state.imgpath
+			}
 		},
 		mounted() {
 			this.getCompanyUsers()
 		},
 		methods: {
-			shareSale(){
-				 const fullUrl = location.href;
-				 const Path = fullUrl.split('/#')[0] || '';
+			shareSale() {
+				const fullUrl = location.href;
+				const Path = fullUrl.split('/#')[0] || '';
 				setTimeout(() => {
 					uni.setClipboardData({
-						data: Path+'/#/pages_course/course/becomeSale?id='+this.user.companyId,
+						data: Path + '/#/pages_course/course/becomeSale?id=' + this.user.companyId,
 						success: () => {
 							uni.showToast({
 								title: '邀请链接已复制',
@@ -256,30 +256,32 @@
 						timestamp: res.data.timestamp, // 必填,生成签名的时间戳
 						nonceStr: res.data.nonceStr, // 必填,生成签名的随机串
 						signature: res.data.signature, // 必填,签名
-						jsApiList: ["updateAppMessageShareData", "onMenuShareAppMessage", ] // 必填,需要使用的JS接口列表
+						jsApiList: ["updateAppMessageShareData",
+							"onMenuShareAppMessage",
+						] // 必填,需要使用的JS接口列表
 					});
 				})
 			},
-			shareimg(){
+			shareimg() {
 				//分享好友
 				let self = this
 				// 配置--配置全局 
 				wx.ready(function() { //需在用户可能点击分享按钮前就先调用
 					wx.updateAppMessageShareData({
-						title: self.user.userName+"邀请您成为销售", // 分享标题
+						title: self.user.userName + "邀请您成为销售", // 分享标题
 						desc: self.user.deptName, // 分享描述
-						link:self.copyLinks, 
-						imgUrl: self.codeLink.url ||self.imgs, // 分享图标
+						link: self.copyLinks,
+						imgUrl: self.codeLink.url || self.imgs, // 分享图标
 						success: function(res) {
-							self.showzhidao=true
-							self.setImg=false
-							self.showShare=false
+							self.showzhidao = true
+							self.setImg = false
+							self.showShare = false
 							// 设置成功
 							uni.showToast({
 								title: '卡片已生成',
 								icon: 'none',
 								duration: 1000
-							}); 
+							});
 						},
 						fail: function(err) {
 							// console.log(err);
@@ -294,8 +296,8 @@
 			},
 			handleShare() {
 				this.showShare = true
-				const pages='/pages_course/becomeSale?id='+this.user.companyId
-				this.$emit('childsales',pages);
+				const pages = '/pages_course/becomeSale?id=' + this.user.companyId
+				this.$emit('childsales', pages);
 				// this.getjssdklist()
 				// this.getlink('preload'); // 提前加载链接
 			},
@@ -306,31 +308,31 @@
 				this.getlink('preload')
 				this.copyLink()
 			},
-			closeimg(){
-				this.setImg=false
-				this.showShare=false
+			closeimg() {
+				this.setImg = false
+				this.showShare = false
 			},
 			buildimg() {
 				//生成海报
-				this.setImg=!this.setImg
+				this.setImg = !this.setImg
 				this.getshareimg()
 			},
-			getshareimg(){
+			getshareimg() {
 				//生成海报
 				uni.showLoading({
 					title: '正在生成中...'
 				})
-				const param={
-					code:'',
-					companyId:this.user.companyId,
-					companyUserId:this.user.userId
+				const param = {
+					code: '',
+					companyId: this.user.companyId,
+					companyUserId: this.user.userId
 				}
-				becomeVipuserImg(param).then(res=>{
-					if(res.code==200){
-						this.codeLink=res.data
+				becomeVipuserImg(param).then(res => {
+					if (res.code == 200) {
+						this.codeLink = res.data
 						this.getlink()
 						// console.log(res)
-					}else{
+					} else {
 						uni.showToast({
 							title: res.msg,
 							icon: 'none',
@@ -339,26 +341,25 @@
 					}
 				})
 			},
-			getlink(type){
+			getlink(type) {
 				//生成链接
-				const param={
-					companyId:this.user.companyId,
-					companyUserId:this.user.userId,
-					tagids:'',
-					limitTime:this.time
+				const param = {
+					companyId: this.user.companyId,
+					companyUserId: this.user.userId,
+					tagids: '',
+					limitTime: this.time
 				}
-				becomeVipuser(param).then(res=>{
-					if(res.code==200){
-						this.copyLinks=res.data
+				becomeVipuser(param).then(res => {
+					if (res.code == 200) {
+						this.copyLinks = res.data
 						if (this.copyLinks.startsWith('http://')) {
 							this.copyLinks = this.copyLinks.replace('http://', 'https://');
-						  }
+						}
 						// console.log(this.copyLinks,'分享链接')
-					}else{
-					}
+					} else {}
 				})
 			},
-			copyLink(){
+			copyLink() {
 				console.log(this.showShare)
 				setTimeout(() => {
 					uni.setClipboardData({
@@ -387,54 +388,53 @@
 			openShare() {
 				// this.showShare = false
 			},
-			showLogout(){
-				this.show=true;
+			showLogout() {
+				this.show = true;
 			},
-			hideLogout(){
-				this.show=false;	
+			hideLogout() {
+				this.show = false;
 			},
-			logout(){
+			logout() {
 				uni.removeStorageSync('ManageToken')
 				// 条件编译判断平台,设置不同登录页路径
-				 let loginPage = '';
-				 // #ifdef H5
-				 loginPage = '/pages/auth/login';
-				 // #endif
-				 // #ifdef MP-WEIXIN
-				 loginPage = '/pages_manage/login';
-				 // #endif
+				let loginPage = '';
+				// #ifdef H5
+				loginPage = '/pages/auth/login';
+				// #endif
+				// #ifdef MP-WEIXIN
+				loginPage = '/pages_manage/login';
+				// #endif
 				uni.navigateTo({
 					url: loginPage,
 				})
 			},
-			navTo(url){
+			navTo(url) {
 				uni.navigateTo({
 					url
 				})
 			},
-			getCompanyUsers(){
-				var data = {
-				};
+			getCompanyUsers() {
+				var data = {};
 				getCompanyUser(data).then(res => {
-					if(res.code==200){
-						this.viewload=false
+					if (res.code == 200) {
+						this.viewload = false
 						console.log(res)
-						this.user=res.user;
-						this.balance=res.balance
-						if(res.user.posts){
-							this.user.postname=res.user.posts.map(item=>item.postName).join(",")
+						this.user = res.user;
+						this.balance = res.balance
+						if (res.user.posts) {
+							this.user.postname = res.user.posts.map(item => item.postName).join(",")
 						}
-						if(res.user.roles){
-							this.user.rolesname=res.user.roles.map(item=>item.roleName).join(",")
+						if (res.user.roles) {
+							this.user.rolesname = res.user.roles.map(item => item.roleName).join(",")
 						}
-						if(this.user.avatar){
-							this.user.avatar=uni.getStorageSync('requestPath')+res.user.avatar
-						}else{
-							this.user.avatar=='';
+						if (this.user.avatar) {
+							this.user.avatar = uni.getStorageSync('requestPath') + res.user.avatar
+						} else {
+							this.user.avatar == '';
 						}
-						console.log('头像',this.user.avatar)
-					}else{
-						
+						console.log('头像', this.user.avatar)
+					} else {
+
 					}
 				});
 			},
@@ -442,22 +442,23 @@
 	}
 </script>
 
-<style lang="scss">
-	page{
+
+<style scoped lang="scss">
+	page {
 		height: 100%;
 		background: #f6f6f6;
 	}
-</style>
-<style scoped lang="scss">
-	.share{
-			display: inline-block;
-			position: absolute;
-			top: 0;
-			left: 0;
-			width: 100%;
-			height: 100%;
-			opacity: 0;
-		}
+
+	.share {
+		display: inline-block;
+		position: absolute;
+		top: 0;
+		left: 0;
+		width: 100%;
+		height: 100%;
+		opacity: 0;
+	}
+
 	.container {
 		font-family: PingFang SC, PingFang SC;
 		font-weight: 400;
@@ -466,18 +467,22 @@
 		height: 100%;
 		overflow: hidden;
 	}
-	.imgshe{
+
+	.imgshe {
 		display: flex;
 		flex-direction: row-reverse
 	}
-	.point-box{
+
+	.point-box {
 		height: 100%;
 		width: 100%;
-		.xu-box{
+
+		.xu-box {
 			border: #f5f5f5 4rpx dashed;
 			padding: 20rpx 20rpx;
 		}
 	}
+
 	.setTimebox {
 		font-family: PingFang SC, PingFang SC;
 		font-weight: 400;
@@ -485,12 +490,14 @@
 		width: fit-content;
 		height: fit-content;
 	}
+
 	.codeimg {
 		position: absolute;
 		z-index: 9999;
 		left: 40rpx;
 		top: 40rpx;
 	}
+
 	.timetip {
 		font-family: PingFang SC, PingFang SC;
 		font-weight: 400;
@@ -499,11 +506,13 @@
 		text-align: center;
 		margin-bottom: 5px;
 	}
-	.content{
+
+	.content {
 		position: relative;
 		height: 100%;
 		width: 100%;
-		.bg{
+
+		.bg {
 			width: 100%;
 			height: 550upx;
 			position: absolute;
@@ -514,44 +523,52 @@
 			// background: linear-gradient(to bottom, #8bbfff, #1773ff);
 			border-radius: 0rpx 0rpx 60rpx 60rpx;
 		}
-		.cont-box{
+
+		.cont-box {
 			position: relative;
 			z-index: 2;
 			padding: 30rpx 30rpx 200rpx;
-			.user-cont{
+
+			.user-cont {
 				// box-shadow: 0px 0px 5px 2px rgba(0,0,0,0.05);
 				padding: 30rpx;
 				// background-color: #fff;
 				border-radius: 15rpx;
-				.user-box{
+
+				.user-box {
 					width: 100%;
 					display: flex;
 					align-items: center;
 					justify-content: flex-start;
-					.left{
-						flex:1;
+
+					.left {
+						flex: 1;
 						display: flex;
 						align-items: center;
 						justify-content: flex-start;
-						image{
+
+						image {
 							border-radius: 50%;
-							width:120rpx;
-							height:120rpx;
+							width: 120rpx;
+							height: 120rpx;
 						}
-						.user{
+
+						.user {
 							margin-left: 20rpx;
 							width: calc(100% - 140rpx);
 							display: flex;
 							flex-direction: column;
 							align-items: flex-start;
 							justify-content: flex-start;
-							.username{
+
+							.username {
 								font-size: 38rpx;
 								font-family: PingFang SC;
 								color: #111;
 								font-weight: bold;
 							}
-							.account{
+
+							.account {
 								padding: 5rpx 0rpx;
 								border-radius: 30rpx;
 								margin-top: 20rpx;
@@ -561,129 +578,149 @@
 							}
 						}
 					}
-					.right{
-						image{
+
+					.right {
+						image {
 							width: 15rpx;
-							height:30rpx;
+							height: 30rpx;
 						}
-						
+
 					}
-					
+
 				}
-				.company{
+
+				.company {
 					margin-top: 20rpx;
 					display: flex;
 					align-items: center;
 					justify-content: flex-start;
-					image{
-						width:40rpx;
-						height:40rpx;
+
+					image {
+						width: 40rpx;
+						height: 40rpx;
 					}
-					.name{
+
+					.name {
 						margin-left: 15rpx;
 						font-size: 28rpx;
 						color: #111;
 					}
 				}
 			}
-			
-			.menu-box{
-				box-shadow: 0px 0px 5px 2px rgba(0,0,0,0.05);
+
+			.menu-box {
+				box-shadow: 0px 0px 5px 2px rgba(0, 0, 0, 0.05);
 				width: 100%;
 				margin-top: 30rpx;
 				padding: 30rpx;
 				background-color: #fff;
 				border-radius: 15rpx;
-				.title-box{
+
+				.title-box {
 					display: flex;
 					align-items: center;
 					justify-content: flex-start;
-					.icon{
+
+					.icon {
 						width: 40rpx;
-						height:40rpx;
+						height: 40rpx;
 					}
-					.title{
+
+					.title {
 						margin-left: 10rpx;
 						font-size: 28rpx;
 						font-family: PingFang SC;
 						color: #111;
 					}
 				}
-				.line{
+
+				.line {
 					margin-top: 15rpx;
 					height: 0.5rpx;
 					width: 100%;
 					background-color: #efefef;
 				}
-				.menus{
+
+				.menus {
 					margin-top: 30rpx;
 					display: flex;
 					align-items: center;
 					justify-content: flex-start;
 					flex-wrap: wrap;
 				}
-				.menu-item{
+
+				.menu-item {
 					display: flex;
 					flex-direction: column;
 					align-items: center;
 					justify-content: center;
 					width: 25%;
 					margin-bottom: 20rpx;
-					image{
-						width:60rpx;
-						height:60rpx;
+
+					image {
+						width: 60rpx;
+						height: 60rpx;
 					}
-					.m-name{
+
+					.m-name {
 						margin-top: 10rpx;
 						font-size: 24rpx;
 						font-family: PingFang SC;
 						color: #111;
 					}
 				}
-				
+
 			}
-			.menu-box1{
+
+			.menu-box1 {
 				width: 100%;
 				margin-top: 30rpx;
 				padding: 0rpx 30rpx;
 				background-color: #fff;
 				border-radius: 15rpx;
-				.menu-item{
+
+				.menu-item {
 					width: 100%;
 					display: flex;
 					align-items: center;
 					justify-content: flex-start;
 					line-height: 100rpx;
-					.left{
-						flex:1;
+
+					.left {
+						flex: 1;
 						display: flex;
 						align-items: center;
 						justify-content: flex-start;
-						image{
+
+						image {
 							width: 30rpx;
-							height:30rpx;
+							height: 30rpx;
 						}
-						.label{
+
+						.label {
 							margin-left: 10rpx;
 						}
 					}
-					.right{
-						image{
+
+					.right {
+						image {
 							width: 10rpx;
-							height:15rpx;
+							height: 15rpx;
 						}
-						
+
 					}
 				}
 			}
 		}
 	}
-	.btn-box{
+
+	.btn-box {
 		margin: 30rpx 0rpx 30rpx;
 		display: flex;
 		align-items: center;
 		justify-content: center;
-		.sub-btn{
+
+		.sub-btn {
 			// box-shadow: 0px 0px 5px 2px rgba(0,0,0,0.05);
 			border: 1rpx solid #f8f8f8;
 			background: #FFFFFF;
@@ -696,11 +733,12 @@
 			color: #2979ff;
 		}
 	}
+
 	.sharePop {
 		background-color: #fff;
 		padding: 20px 0;
 		border-radius: 20px 20px 0 0;
-	
+
 		&-item {
 			padding: 0 10px;
 			box-sizing: border-box;
@@ -708,7 +746,7 @@
 			font-weight: 400;
 			font-size: 14px;
 			display: inline-flex !important;
-	
+
 			image {
 				height: 48px;
 				width: 48px;
@@ -716,4 +754,4 @@
 			}
 		}
 	}
-</style>
+</style>

+ 29 - 64
pages_manage/components/memberIndex.vue

@@ -3,25 +3,20 @@
 		<view class="headbox">
 			<view style="padding: 10px 10px 0 10px;" class="mb20">
 				<view>
-					<u-subsection class="subsection" :list="list" :current="current" bgColor="#e7f1fe"
-						activeColor="#1677ff" :fontSize="15" :bold="false" @change="sectionChange"></u-subsection>
+					<u-subsection class="subsection" :list="list" :current="current" bgColor="#e7f1fe"	activeColor="#1677ff" :fontSize="15" :bold="false" @change="sectionChange"></u-subsection>
 				</view>
 				<!-- <view style="width: 70%;">
 						<u-subsection class="subsection" :list="list" :current="current" bgColor="#e7f1fe" activeColor="#1677ff"
 							:fontSize="15" :bold="false" @change="sectionChange" ></u-subsection>
 					</view> -->
 				<view style="margin-top: 10px;" class="justify-between align-center" v-if="!viewload">
-					<u-search placeholder="搜索微信名称、手机、标签" v-model="keyword" :showAction="false" height="30px"
-						@search='searchKeyword'></u-search>
-					<view v-if="current!==0" class="fs24 ml20" @click="blackSel()">{{!isShowSelectAll?'批量管理':'取消批量'}}
-					</view>
+					<u-search placeholder="搜索微信名称、手机、标签" v-model="keyword" :showAction="false" height="30px"	@search='searchKeyword'></u-search>
+					<view v-if="current!==0" class="fs24 ml20" @click="blackSel()">{{!isShowSelectAll?'批量管理':'取消批量'}}</view>
 				</view>
 				<view class="x-bc" v-if="current==0">
-					<u-tabs :list="list2" :current='currentType' :lineWidth="40" lineColor="#1677ff"
-						:activeStyle="activeStyle" :inactiveStyle="inactiveStyle" @click="clickTypeTab"></u-tabs>
+					<u-tabs :list="list2" :current='currentType' :lineWidth="40" lineColor="#1677ff" :activeStyle="activeStyle" :inactiveStyle="inactiveStyle" @click="clickTypeTab"></u-tabs>
 					<view class="participate-order x-f">
-						<image :src="imgPath+'/app/images/order_icon2.png'" mode="aspectFill"
-							v-if="searchTypeIndex == 0 || searchTypeIndex == 2"></image>
+						<image :src="imgPath+'/app/images/order_icon2.png'" mode="aspectFill"	v-if="searchTypeIndex == 0 || searchTypeIndex == 2"></image>
 						<image :src="imgPath+'/app/images/order_icon.png'" mode="aspectFill" v-else></image>
 						<picker @change="bindPickerChange" :value="searchTypeIndex" :range="typeArray">
 							{{typeoption[searchTypeIndex]}}
@@ -33,76 +28,57 @@
 						<!-- <view class="x-f" @click="openPop('search')">{{array[queryParam.typeIndex].name}}<u-icon name="arrow-down-fill" color="#2979ff" size="11" style="margin: 0 3px;"></u-icon></view> -->
 						<view v-if="showCompanytag.length<=0" style="color: #888;" class="ml30">请点击筛选,选择标签</view>
 						<view class="tagbox-list x-f">
-							<view class="tagbox-item x-f" v-for="(item,index) in showCompanytag" :key='item.tagId'
-								:class="item.checked?'checked-bg':''">
+							<view class="tagbox-item x-f" v-for="(item,index) in showCompanytag" :key='item.tagId'	:class="item.checked?'checked-bg':''">
 								{{item.tagName}}
 							</view>
 						</view>
 					</view>
-					<view class="tagbox-right x-f" @click="openPop('tag')">筛选<u-icon name="arrow-down" color="#1677ff"
-							size="12"></u-icon></view>
+					<view class="tagbox-right x-f" @click="openPop('tag')">筛选<u-icon name="arrow-down" color="#1677ff"	size="12"></u-icon></view>
 				</view>
 			</view>
 			<view v-if="current==0&&!viewload">
-				<dropdownPanel :filterData='filterData' @onClick="getactNav" :itemname='itemname' @onChange="onChange"
-					@confirm="confirm" @reset="reset" :ispopshow='ispopshow' :top="tops">
+				<dropdownPanel :filterData='filterData' @onClick="getactNav" :itemname='itemname' @onChange="onChange"	@confirm="confirm" @reset="reset" :ispopshow='ispopshow' :top="tops">
 					<view v-if="filterData[searchbarNav].type == 'userStatus'">
 						<view class="boxnav x-bc">
-							<view class="boxnav-item" v-for="(item,index) in filterData[searchbarNav].option"
-								:key="index">
+							<view class="boxnav-item" v-for="(item,index) in filterData[searchbarNav].option" :key="index">
 								<view class="boxnav-item-info one-t"
-									:class="userStatusIndex == index ? 'boxnav-active':''"
-									@click="handleParamItem('userStatus',index,item.id)">{{item.label}}</view>
+									:class="userStatusIndex == index ? 'boxnav-active':''"	@click="handleParamItem('userStatus',index,item.id)">{{item.label}}</view>
 							</view>
 						</view>
 					</view>
 					<view v-if="filterData[searchbarNav].type == 'registerTime'">
 						<view class="boxnav x-bc ">
-							<view class="boxnav-item" style="width: 25%;"
-								v-for="(item,index) in filterData[searchbarNav].option" :key="index">
-								<view class="boxnav-item-info one-t"
-									:class="registerTimeIndex == index ? 'boxnav-active':''"
-									@click="handleParamItem('registerTime',index)">{{item.label}}</view>
+							<view class="boxnav-item" style="width: 25%;" v-for="(item,index) in filterData[searchbarNav].option" :key="index">
+								<view class="boxnav-item-info one-t" :class="registerTimeIndex == index ? 'boxnav-active':''" @click="handleParamItem('registerTime',index)">{{item.label}}</view>
 							</view>
 							<view class="boxnav-item x-ac" style="width: 100%;" v-show="registerTimeIndex == 4">
 								<view class="calendar-day x-c" @click="$refs.calendar.open()">
-									<u-icon name="calendar" color="#999"
-										size="20"></u-icon>{{queryParam.startTime || '选择日期'}}
+									<u-icon name="calendar" color="#999" size="20"></u-icon>{{queryParam.startTime || '选择日期'}}
 								</view>
 								<view class="calendar-day x-c" @click="$refs.calendar.open()">
-									<u-icon name="calendar" color="#999"
-										size="20"></u-icon>{{queryParam.endTime || '选择日期'}}
+									<u-icon name="calendar" color="#999" size="20"></u-icon>{{queryParam.endTime || '选择日期'}}
 								</view>
 							</view>
 						</view>
 					</view>
 					<view v-if="filterData[searchbarNav].type == 'watchStatus'">
 						<view class="boxnav x-bc">
-							<view class="boxnav-item" v-for="(item,index) in filterData[searchbarNav].option"
-								:key="index">
-								<view class="boxnav-item-info one-t"
-									:class="watchStatusIndex == index ? 'boxnav-active':''"
-									@click="handleParamItem('watchStatus',index)">{{item.label}}</view>
+							<view class="boxnav-item" v-for="(item,index) in filterData[searchbarNav].option" :key="index">
+								<view class="boxnav-item-info one-t" :class="watchStatusIndex == index ? 'boxnav-active':''" @click="handleParamItem('watchStatus',index)">{{item.label}}</view>
 							</view>
 						</view>
 					</view>
 					<view v-if="filterData[searchbarNav].type == 'courseStatus'">
 						<view class="boxnav x-bc">
-							<view class="boxnav-item" v-for="(item,index) in filterData[searchbarNav].option"
-								:key="index">
-								<view class="boxnav-item-info one-t"
-									:class="courseStatusIndex == index ? 'boxnav-active':''"
-									@click="handleParamItem('courseStatus',index)">{{item.label}}</view>
+							<view class="boxnav-item" v-for="(item,index) in filterData[searchbarNav].option" :key="index">
+								<view class="boxnav-item-info one-t" :class="courseStatusIndex == index ? 'boxnav-active':''" @click="handleParamItem('courseStatus',index)">{{item.label}}</view>
 							</view>
 						</view>
 					</view>
 					<view v-if="filterData[searchbarNav].type == 'project'">
 						<view class="boxnav x-bc">
-							<view class="boxnav-item" v-for="(item,index) in filterData[searchbarNav].option"
-								:key="index">
-								<view class="boxnav-item-info one-t"
-									:class="projectStatusIndex == index ? 'boxnav-active':''"
-									@click="handleParamItem('project',index,item.id)">{{item.label}}</view>
+							<view class="boxnav-item" v-for="(item,index) in filterData[searchbarNav].option" :key="index">
+								<view class="boxnav-item-info one-t" :class="projectStatusIndex == index ? 'boxnav-active':''"	@click="handleParamItem('project',index,item.id)">{{item.label}}</view>
 							</view>
 						</view>
 					</view>
@@ -134,19 +110,15 @@
 						</view>
 						<!-- <input placeholder="请输入标签  多个标签用 , 隔开" /> -->
 						<view class="mb20" v-if="current==0">
-							<u-search placeholder="请输入标签  多个标签用 , 隔开" v-model="tagkeywords" :showAction="false"
-								height="30px" @search='getcompanyTag'></u-search>
+							<u-search placeholder="请输入标签  多个标签用 , 隔开" v-model="tagkeywords" :showAction="false" 	height="30px" @search='getcompanyTag'></u-search>
 						</view>
-						<scroll-view scroll-y="true" class="hb" :refresher-enabled="isEnableds"
-							:refresher-triggered="triggereds" refresher-background="rgba(0,0,0,0)"
-							@refresherrefresh="pullDownRefreshs" @refresherrestore="triggereds = false"
+						<scroll-view scroll-y="true" class="hb" :refresher-enabled="isEnableds"	:refresher-triggered="triggereds" refresher-background="rgba(0,0,0,0)"	@refresherrefresh="pullDownRefreshs" @refresherrestore="triggereds = false"
 							:upper-threshold="100" :lower-threshold="100" @refresherabort="triggereds = false"
 							@scrolltolower="reachBottoms">
 							<view class="tagbox-list x-f">
 								<view class="tagbox-item x-f tag-active" v-if="companytag.length<=0">暂无标签</view>
 								<view class="mlr10 mb10" v-for="(item,index) in companytag" :key='item.tagId'>
-									<u-tag :text="item.tagName" :plain="!item.checked" :name="index"
-										@click="chooseTag(index)"></u-tag>
+									<u-tag :text="item.tagName" :plain="!item.checked" :name="index" @click="chooseTag(index)"></u-tag>
 								</view>
 							</view>
 							<view class="center fs24 mt20">
@@ -167,27 +139,20 @@
 		<view class="userbox column hb hidden flex-1">
 			<!-- <mescroll-body  bottom="0" ref="mescrollRef" @init="mescrollInit" :down="downOption" :up="upOption" @down="downCallback" @up="upCallback"> -->
 			<view class="userlist column hb hidden flex-1">
-				<vipUserItem :viplist='userList' :isShowSelectAll="isShowSelectAll" @changeItem="changeItem"
-					@getuserId='singleChange' @getlableId='singleChangeLable' @change='changesinglevip'
-					@getuserIds='singleDelete' @pullDownRefresh="getfsuserListdata('refresh')"
-					@changelistname="getfsuserListdata('more')" @reachBottom="getfsuserListdata()"
-					@changePageOptions="e=>pageOptions=e" :pageOptions="pageOptions" :status="status"
+				<vipUserItem :viplist='userList' :isShowSelectAll="isShowSelectAll" @changeItem="changeItem" @getuserId='singleChange' @getlableId='singleChangeLable' @change='changesinglevip'	@getuserIds='singleDelete' @pullDownRefresh="getfsuserListdata('refresh')"
+					@changelistname="getfsuserListdata('more')" @reachBottom="getfsuserListdata()"	@changePageOptions="e=>pageOptions=e" :pageOptions="pageOptions" :status="status"
 					@changeStatus="e=>status=e" class="pb2 hb" />
 				<view class="justify-between base-bg-f foot-select pb40" v-if="isShowSelectAll">
 					<view class="align-center justify-between" v-if="isShowSelectAll">
 						<u-checkbox-group @change="selectAll">
-							<u-checkbox :checked="isSelectAll" shape="circle" activeColor="#FF6C47" :name="true"
-								label="全选" labelColor="#333" /><text class="fs24 base-color-9 ml12">已选 {{selectedCount}}
+							<u-checkbox :checked="isSelectAll" shape="circle" activeColor="#FF6C47" :name="true" label="全选" labelColor="#333" /><text class="fs24 base-color-9 ml12">已选 {{selectedCount}}
 								个</text>
 						</u-checkbox-group>
 					</view>
 					<view class="justify-center ">
-						<button class="base-bg-red radius100 colorf h62 fs28 lh62 mlr10" @click="changeProhibit"
-							v-if="current==0">禁用</button>
-						<button class="base-bg-red radius100 colorf h62 fs28 lh62 mlr10" @click="changeblack"
-							v-else>取消禁用</button>
-						<button class="base-bg-blue radius100 colorf h62 fs28 lh62" @click="changetagall"
-							v-if="current==0">改标签</button>
+						<button class="base-bg-red radius100 colorf h62 fs28 lh62 mlr10" @click="changeProhibit" v-if="current==0">禁用</button>
+						<button class="base-bg-red radius100 colorf h62 fs28 lh62 mlr10" @click="changeblack"	v-else>取消禁用</button>
+						<button class="base-bg-blue radius100 colorf h62 fs28 lh62" @click="changetagall" v-if="current==0">改标签</button>
 						<!-- <button class="base-bg-f radius100 base-color-red h62 ml10 fs28 lh60"
 							style="border: #ef4c50 solid 2rpx;" 
 							@click="changevipuser"  v-if="current==0">更换归属</button> -->

+ 85 - 26
pages_manage/learn.vue

@@ -11,7 +11,7 @@
 			</view>
 		</view>
 		<view class="container-body">
-			<view class="center-box">
+			<!-- <view class="center-box">
 				<u-tabs lineColor="#f56c6c" :scrollable="false"
 					:activeStyle="{color: '#fd694f',fontWeight: 'bold',fontSize:'34rpx'}"
 					:inactiveStyle="{color: '#787878',fontSize:'34rpx'}" :list="tabList" @click="ontabList">
@@ -26,7 +26,7 @@
 						:showText="false"></u-line-progress>
 					<text>0%</text>
 				</view>
-			</view>
+			</view> -->
 
 			<!-- <view class="list">
 				<view class="img-box">
@@ -48,17 +48,17 @@
 			<view class="list" v-for="(item,index) in learnList" :key="index">
 				<view class="img-box">
 					<view class="sub">第一课</view>
-					<image src="/static/assets/learn-img.png"></image>
+					<image :src="item.videoImgUrl || '/static/assets/no-img.png'"></image>
 				</view>
 				<view class="right">
 					<view class="title">{{item.title}}</view>
 					<view class="bottom">
 						<view class="tip">
-							<image :src="item.img" mode="widthFix"></image>
+							<image src="/static/assets/learn3.png" mode="widthFix"></image>
 							<text>答题送金币+200</text>
 						</view>
-						<view class="btn" v-if="item.stauts==0">已学习4%</view>
-						<view class="btn-red" v-else>去学习</view>
+						<view @click="goLive(item)" class="btn" v-if="item.stauts==0">已学习4%</view>
+						<view @click="goLive(item)" class="btn-red" v-else>去学习</view>
 					</view>
 				</view>
 			</view>
@@ -67,41 +67,83 @@
 </template>
 
 <script>
+	import { compile } from "vue";
+import {
+		courseList
+	} from '@/api/class.js'
+	
 	export default {
 		data() {
 			return {
+				courseId: null,
 				tabList: [{
 					name: '详情'
 				}, {
 					name: '课程目录'
 				}],
-				learnList: [{
-					img: '/static/assets/learn3.png',
-					title: '第一课 如何防控烦人的慢性病',
-					stauts: 0
-				},
-				{
-					img: '/static/assets/learn3.png',
-					title: '第一课 如何防控烦人的慢性病',
-					stauts: 1
-				}]
+				learnList: []
 			}
 		},
 		computed: {
 
 		},
-		onLoad(option) {
-
+		onLoad(options) {
+			// 接收传递的课程 ID
+			if (options.courseId) {
+				this.courseId = options.courseId;
+			}
+		},
+		mounted() {
+			this.getCourseList()
 		},
 		methods: {
-			ontabList() {
-				// this.stauts = 0
+			goLive(item) {
+				console.log("id",item)
+				const id=item.videoId
+				uni.navigateTo({
+					url: '/pages_course/videovip?videoitem='+JSON.stringify(item)
+				})
+			},
+			getCourseList() {
+				courseList().then(res => {
+					console.log("课程列表", res)
+					if (res.code == 200) {
+						// 1. 根据 courseId 找到对应的课程
+						const course = res.data.find(item => item.courseId == this.courseId);
+						if (course && course.fsUserCourseVideoList) {
+							// 2. 映射数据到 learnList 格式
+							this.learnList = course.fsUserCourseVideoList
+							console.log("learnList是多少》》", this.learnList)
+						} else {
+							console.warn("未找到课程或视频列表");
+							this.learnList = [];
+						}
+					} else {
+						uni.hideLoading();
+						uni.showToast({
+							title: res.msg,
+							icon: 'none'
+						});
+					}
+				})
 			}
-			// goLearn() {
-			// 	uni.navigateTo({
-			// 		url: '/pages_manage/learn'
+			// getCourseDetails() {
+			// 	var data={
+			// 		courseId:courseId
+			// 	}
+			// 	courseDetails(data).then(res => {
+			// 		console.log("课程详情", res)
+			// 		if (res.code == 200) {
+			// 		} else {
+			// 			uni.hideLoading();
+			// 			uni.showToast({
+			// 				title: res.msg,
+			// 				icon: 'none'
+			// 			});
+			// 		}
 			// 	})
-			// },
+
+			// }
 		}
 	}
 </script>
@@ -209,6 +251,7 @@
 					border-radius: 16rpx;
 					overflow: hidden;
 					position: relative;
+					flex-shrink: 0;
 
 					.sub {
 						background-color: rgba(0, 0, 0, 0.8);
@@ -234,10 +277,25 @@
 					display: flex;
 					flex-direction: column;
 					justify-content: space-between;
+					min-width: 0;
 
 					.title {
 						font-size: 30rpx;
 						font-weight: 500;
+						overflow: hidden;
+						text-overflow: ellipsis;
+						display: -webkit-box;
+						-webkit-line-clamp: 2;
+						/* 控制显示行数 */
+						-webkit-box-orient: vertical;
+						word-break: break-all;
+						/* 允许单词内换行 */
+						max-height: 80rpx;
+						/* 根据字体大小调整 */
+						line-height: 40rpx;
+						/* 行高与字体大小匹配 */
+						width: 100%;
+						/* 确保宽度占满容器 */
 					}
 
 					.bottom {
@@ -268,8 +326,9 @@
 							color: #f38600;
 							border-radius: 12rpx;
 						}
-						.btn-red{
-							background-color:#ff512f;
+
+						.btn-red {
+							background-color: #ff512f;
 							padding: 8rpx 18rpx;
 							color: #ffffff;
 							border-radius: 12rpx;

+ 42 - 31
pages_manage/teacherClassroom.vue

@@ -21,13 +21,16 @@
 					<image src="/static/assets/class.png"></image>
 				</view>
 			</view> -->
-			<view class="card-box" v-for="(item,index) in cardList" :key="index" @click="goLearn">
+			<view class="card-box" v-for="(item,index) in cardList" :key="index" @click="goLearn(item.courseId)">
 				<view class="bar">
 					<image src="/static/assets/bar.png" mode="widthFix"></image>
-					<view class="tit">{{item.title}}</view>
+					<view class="tit">{{item.courseName}}</view>
 				</view>
-				<view class="img">
-					<image :src="item.img" mode="widthFix"></image>
+				<view class="img-box">
+					<view class="img">
+						
+						<image :src="item.imgUrl || '/static/assets/no-img.png'" mode="widthFix"></image>
+					</view>
 				</view>
 			</view>
 		</view>
@@ -35,43 +38,43 @@
 </template>
 
 <script>
+	import {
+		courseList
+	} from '@/api/class.js'
 	export default {
 		data() {
 			return {
 
-				cardList: [{
-						title: '科学养生 | 名师首发',
-						img: '/static/assets/class.png'
-					}
-					// , {
-					// 	title: '科学养生 | 名师首发',
-					// 	img: '/static/assets/class.png'
-					// }, {
-					// 	title: '科学养生 | 名师首发',
-					// 	img: '/static/assets/class.png'
-					// }, {
-					// 	title: '科学养生 | 名师首发',
-					// 	img: '/static/assets/class.png'
-					// }
-					, {
-						title: '科学养生 | 名师首发',
-						img: '/static/assets/class.png'
-					}
-				]
+				cardList: []
 
 			}
 		},
 		computed: {
 
 		},
-		onLoad(option) {
-
+		mounted() {
+			this.getCourseList()
+			//this.getDepartmentList();
 		},
+
 		methods: {
+			getCourseList() {
+				courseList().then(res => {
+					if (res.code == 200) {
+						this.cardList = res.data
+					} else {
+						uni.hideLoading();
+						uni.showToast({
+							title: res.msg,
+							icon: 'none'
+						});
+					}
+				})
 
-			goLearn() {
+			},
+			goLearn(id) {
 				uni.navigateTo({
-					url: '/pages_manage/learn'
+					url: `/pages_manage/learn?courseId=${id}`
 				})
 			},
 		}
@@ -187,17 +190,25 @@
 					}
 				}
 
-				.img {
+				.img-box {
 					margin-top: -8rpx;
 					padding: 24rpx;
 					background-color: #fff;
 					border-radius: 0 0 20rpx 20rpx;
 
-					image {
-						width: 100%;
-						height: 100%;
+					.img {
+
+						max-height: 380rpx;
+						overflow: hidden;
+						border-radius: 20rpx;
+
+						image {
+							width: 100%;
+							height: 100%;
+						}
 					}
 				}
+
 			}
 		}
 

BIN=BIN
static/assets/no-img.jpeg