Selaa lähdekoodia

Merge remote-tracking branch 'origin/master'

puyao 1 kuukausi sitten
vanhempi
commit
01bd09e47b

+ 21 - 11
components/courseItem.vue

@@ -1,5 +1,5 @@
 <template>
-	<view class="courselist-item">
+	<view class="courselist-item" >
 		<view class="courselist-con x-start" @click="toCourseDetail(info)">
 			<view class="courselist-img">
 				<!-- <view class="status">进行中</view> -->
@@ -22,8 +22,14 @@
 			</view>
 		</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>
+			<!--#endif-->
+			<!--#ifdef H5-->
 			<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
@@ -38,7 +44,6 @@
 						style="width: 80rpx; height: 80rpx;margin-top: 20rpx;"></image>
 					<view style="font-weight: bold;margin-bottom: 4px;">生成卡片</view>
 					<view style="font-size: 12px;color: #888;">指导分享轻松转发</view>
-					<button open-type="share" class="share" @click="handleClick()">分享课程</button>
 				</view>
 				<!--#endif-->
 				<!--#ifdef H5-->
@@ -156,11 +161,11 @@
 		},
 		methods: {
 			handleClick(){
-				console.log(123)
 				this.parentMethod();
 				 this.$emit('trigger-share', {
 					 title: this.info.courseName+this.info.title,
 					 path: "/pages_course/viedo",
+					 onshow:true,
 					 params: { companyId: this.user.companyId, companyUserId: this.user.userId,
 					 courseId:this.info.courseId,videoId:this.info.courseId },
 					 img:this.info.thumbnail||this.imgs
@@ -320,9 +325,9 @@
 
 			},
 			handleShare() {
-				this.showShare = true
 				// #ifdef H5
 				this.getjssdklist()
+				this.showShare = true
 				// #endif
 				// this.getlink('preload'); // 提前加载链接
 			},
@@ -351,9 +356,9 @@
 				sharecourselink(params).then(res => {
 					if (res.code == 200) {
 						this.copylink = res.url
-						if (this.copylink.startsWith('http://')) {
-							this.copylink = this.copylink.replace('http://', 'https://');
-						  }
+						// if (this.copylink.startsWith('http://')) {
+						// 	this.copylink = this.copylink.replace('http://', 'https://');
+						//   }
 						// console.log(this.copylink)
 						setTimeout(() => {
 							uni.setClipboardData({
@@ -487,18 +492,23 @@
 
 	.sharePop {
 		background-color: #fff;
-		padding: 20px 0;
-		padding-bottom: 60px;
+		padding: 30rpx 0;
 		border-radius: 20px 20px 0 0;
-
+		/* #ifdef MP-WEIXIN */
+		 /* #endif */
+		 
+		/* #ifdef H5 */
+		padding-bottom: 60px;
+		 /* #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;

+ 0 - 1
components/liveCourse.vue

@@ -157,7 +157,6 @@
 			handleShare(config) {
 			      // 保存分享配置到父页面数据
 			      this.shareConfig = config;
-			      console.log(config)
 				  this.$emit('child-data-update', this.shareConfig);
 			      // 调起分享面板(微信小程序需主动调用)
 			      // #ifdef MP-WEIXIN

+ 2 - 2
components/qiweiUrgeCourse.vue

@@ -9,7 +9,7 @@
 						@refresherrefresh="pullDownRefreshC" @refresherrestore="triggeredC = false"
 						:upper-threshold="100" :lower-threshold="100" @refresherabort="triggeredC = false"
 						@scrolltolower="reachBottomC">
-						<view v-for="(item,index) in qiweilist" :key="item.index" class="m10 p10 center"
+						<view v-for="(item,index) in qiweilist" :key="item.dictValue" class="m10 p10 center"
 							:class="qiweiuser.dictLabel==item.dictLabel?'select':''"
 							style="border-bottom: 2rpx solid #eee;" @click="getCourseOne(item)">
 							{{item.dictLabel}}
@@ -110,8 +110,8 @@
 		},
 		methods: {
 			getCourseOne(e) {
-				this.qiweiuser = e
 				console.log(e)
+				this.qiweiuser = e
 			},
 			reachBottomC() {
 				// status这个是加载状态

+ 21 - 9
pages/auth/wxlogin.vue

@@ -20,7 +20,6 @@
 				open-type="getPhoneNumber"
 				@getphonenumber="phoneLogin"  >一键授权手机号登录</button>
 			<button class="author-btn" v-if="isAgreement==false" @click="handleAgree()">一键授权手机号登录</button>
-			
 		</view>
 		<!-- <button
 			class="author-btn"
@@ -50,12 +49,13 @@ export default {
 		return {
 			code:null,
 			isAgreement:false,
+			companyId:null
 		}
 	},
 	computed: {
 	},
-	onLoad(option) 
-	{
+	onLoad(option) {
+		this.companyId=option.companyId
 		// #ifdef MP-WEIXIN
 		uni.$on('refreshLogin', () => {
 			uni.navigateBack({
@@ -194,8 +194,11 @@ export default {
 								uni.hideLoading()
 								//that.getUserInfo()
 								uni.$emit('refreshLogin');
-								uni.navigateBack({
-									delta:1
+								// uni.navigateBack({
+								// 	delta:1
+								// })
+								uni.navigateTo({
+									url:'/pages/enterprise/enterprise'
 								})
 							}
 							else{
@@ -269,16 +272,25 @@ export default {
 										title: "登录成功",
 									});
 									uni.setStorageSync('UserToken',res.token);
-									uni.setStorageSync('userInfo',JSON.stringify(res.companyUser));
+									uni.setStorageSync('nickName',res.nickName);
+									uni.setStorageSync('phoneNumber',res.phoneNumber);
 									uni.hideLoading()
 									//that.getUserInfo()
 									uni.$emit('refreshLogin');
+									// if(this.companyId==null){
+									// 	uni.navigateTo({
+									// 		url:'/pages/enterprise/enterprise'
+									// 	})
+									// }else{
+										
+									// }
+									uni.navigateTo({
+											url:'/pages/enterprise/enterprise'
+										})
 									// uni.navigateBack({
 									// 	delta:1
 									// })
-									uni.navigateTo({
-										url:'/pages/enterprise/enterprise'
-									})
+									
 								}
 								else{
 									uni.hideLoading();

+ 99 - 59
pages/course/course.vue

@@ -6,6 +6,19 @@
 		</view>
 		<living v-if="current==0" style="margin-top: -240rpx;"></living> -->
 		<liveCourse @child-data-update="onChildDataUpdate" :parent-method="handleParentMethod"></liveCourse>
+		<u-popup :show="showShare" :closeOnClickOverlay="true" :round='20' @close="closeShare">
+			<view class="sharePop x-ac">
+				<!--#ifdef MP-WEIXIN-->
+				<view class="sharePop-item y-f card-share">
+					<image src="https://fbylive.obs.cn-southwest-2.myhuaweicloud.com:443/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>
+					<view style="font-size: 12px;color: #888;">指导分享轻松转发</view>
+					<button open-type="share" class="share">分享课程</button>
+				</view>
+				<!--#endif-->
+			</view>
+		</u-popup>
 	</view>
 </template>
 
@@ -24,79 +37,106 @@
 				}, {
 					name: '训练营'
 				}],
-				current:0,
-				childdata:[]
+				current: 0,
+				childdata: [],
+				showShare: false
 			}
 		},
 		onLoad() {
 			wx.showShareMenu({
-			      withShareTicket: true, // 支持群聊分享带shareTicket
-			      menus: ['shareAppMessage'] // 同时启用两种分享
-			    })
+				withShareTicket: true, // 支持群聊分享带shareTicket
+				menus: ['shareAppMessage'] // 同时启用两种分享
+			})
 		},
-		mounted() {
+		mounted() {},
+		onShareAppMessage() {
+			return {
+				title: this.childdata.title, // 分享卡片标题
+				path: this.childdata.path + "?course=" + this.childdata.params, // 目标页面路径
+				// 携带参数:将当前页面的数据拼接到路径中
+				imageUrl: this.childdata.img, // 分享卡片封面图(可选)
+				success: (res) => {
+					console.log("分享成功", res);
+				},
+				fail: (err) => {
+					console.log("分享失败", err);
+				},
+			}
 		},
 		methods: {
-			handleParentMethod() {
-			      uni.showToast({ title: '父组件方法被调用' });
-				  if (!this.childdata || Object.keys(this.childdata).length === 0) {
-				          uni.showToast({ title: '数据未准备好,无法分享', icon: 'none' });
-				          return;
-				      }
-					  this.$nextTick(()=>{
-						  setTimeout(()=>{
-								  uni.share({
-										  provider: 'weixin',
-										  scene: 'WXSceneSession', // 分享到会话
-										  type: 0,
-										  title: this.childdata.title,
-										  path: this.childdata.path+"?course="+this.childdata.params,
-										  imageUrl: this.childdata.img,
-										  success: (res) => {
-											console.log('分享成功', res);
-											uni.showToast({
-											  title: '分享成功',
-											  icon: 'none'
-											});
-										  },
-										  fail: (err) => {
-											console.log('分享失败', err);
-											uni.showToast({
-											  title: '分享失败,请稍后再试',
-											  icon: 'none'
-											});
-										  }
-										});
-						  },200)
-					  })
-				  
-				 
-			    },
-			onChildDataUpdate(data){
-				this.childdata=data
-				console.log('父组件',data)
+			closeShare() {
+				this.showShare = false
+				// console.log('open');
 			},
-			onShareAppMessage() {
-			    return {
-			      title:this.childdata.title ,  // 分享卡片标题
-			      path:this.childdata.path+"?course="+this.childdata.params, // 目标页面路径
-			      // 携带参数:将当前页面的数据拼接到路径中
-			      imageUrl: this.childdata.img, // 分享卡片封面图(可选)
-			      success: (res) => {
-			        console.log("分享成功", res);
-			      },
-			      fail: (err) => {
-			        console.log("分享失败", err);
-			      },
+			handleParentMethod() {
+				// uni.showToast({ title: '父组件方法被调用' });
+				/* if (!this.childdata || Object.keys(this.childdata).length === 0) {
+					uni.showToast({
+						title: '数据未准备好,无法分享',
+						icon: 'none'
+					});
+					return;
 				}
+				this.$nextTick(() => {
+					setTimeout(() => {
+						this.showShare = this.childdata.onshow
+					}, 200)
+				}) */
+
+
+			},
+			onChildDataUpdate(data) {
+				this.childdata = data
+				this.showShare = this.childdata.onshow
+				console.log(this.childdata);
+				console.log('父组件', this.childdata.path + "?course=" +JSON.stringify(this.childdata.params) )
 			},
-			sectionChange(index){
-				this.current=index
+
+			sectionChange(index) {
+				this.current = index
 			}
 		}
 	}
 </script>
 
 <style lang="scss">
-	
+	.card-share{
+		position: relative;
+	}
+	.share{
+			display: inline-block;
+			position: absolute;
+			top: 0;
+			left: 0;
+			width: 100%;
+			height: 100%;
+			opacity: 0;
+		}
+	.sharePop {
+		background-color: #fff;
+		padding: 30rpx 0;
+		border-radius: 20px 20px 0 0;
+		/* #ifdef MP-WEIXIN */
+		/* #endif */
+
+		/* #ifdef H5 */
+		padding-bottom: 60px;
+
+		/* #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;
+				margin-bottom: 10px;
+			}
+		}
+	}
 </style>

+ 1 - 1
pages/courseManage/course/becomeSale.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="centerV hb base-bg-f">
-		<image src="/static/logo.png" class="w110 h110"></image>
+		<image src="/static/logo.png" mode="aspectFit" class="w400"></image>
 		<view class="fs48 bold mt30">注册账户</view>
 		<view class="login">
 			 <view class="login-item">

+ 86 - 83
pages/customer/index.vue

@@ -20,9 +20,10 @@
 					<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="https://fbylive.obs.cn-southwest-2.myhuaweicloud.com:443/app/images/order_icon2.png" mode="aspectFill"
-							v-if="searchTypeIndex == 0 || searchTypeIndex == 2"></image>
-						<image src="https://fbylive.obs.cn-southwest-2.myhuaweicloud.com:443/app/images/order_icon.png" mode="aspectFill" v-else></image>
+						<image src="https://fbylive.obs.cn-southwest-2.myhuaweicloud.com:443/app/images/order_icon2.png"
+							mode="aspectFill" v-if="searchTypeIndex == 0 || searchTypeIndex == 2"></image>
+						<image src="https://fbylive.obs.cn-southwest-2.myhuaweicloud.com:443/app/images/order_icon.png"
+							mode="aspectFill" v-else></image>
 						<picker @change="bindPickerChange" :value="searchTypeIndex" :range="typeArray">
 							{{typeoption[searchTypeIndex]}}
 						</picker>
@@ -156,7 +157,7 @@
 					@getuserIds='singleDelete' @pullDownRefresh="getfsuserListdata('refresh')"
 					@changelistname="getfsuserListdata('more')" @reachBottom="getfsuserListdata('more')"
 					@changePageOptions="e=>pageOptions=e" :pageOptions="pageOptions" :status="status"
-					@changeStatus="e=>status=e" class="pb2" />
+					@changeStatus="e=>status=e" class="pb2 hb" />
 				<view class="justify-between base-bg-f foot-select" v-if="isShowSelectAll">
 					<view class="align-center justify-between" v-if="isShowSelectAll">
 						<u-checkbox-group @change="selectAll">
@@ -215,9 +216,10 @@
 			</view>
 		</u-popup>
 		<view class="invite-member" :style="{right:vipInviteshow?'-72rpx':'20rpx'}">
-			<image src="https://fbylive.obs.cn-southwest-2.myhuaweicloud.com:443/app/images/invite-member-icon.png" mode="aspectFill" @click="vipInvite"
-				style="position: relative;" class="intimg"> </image>
-			<image src='https://fbylive.obs.cn-southwest-2.myhuaweicloud.com:443/app/image/tc_close_icon.png' class="falseimg" @click="showinimg"></image>
+			<image src="https://fbylive.obs.cn-southwest-2.myhuaweicloud.com:443/app/images/invite-member-icon.png"
+				mode="aspectFill" @click="vipInvite" style="position: relative;" class="intimg"> </image>
+			<image src='https://fbylive.obs.cn-southwest-2.myhuaweicloud.com:443/app/image/tc_close_icon.png'
+				class="falseimg" @click="showinimg"></image>
 		</view>
 		<!-- 邀请弹窗 -->
 		<u-popup :show="invitePop" :round="12" @close="invitePop = false" :zIndex="10074" style="flex: 0;">
@@ -242,40 +244,47 @@
 					</view> -->
 					<!--#ifdef MP-WEIXIN-->
 					<view class="justify-center" style="margin-top: 10px;">
-					<!--#endif-->
-					<!--#ifdef H5-->
-					<view class="justify-center" style="margin-top: 10px;">
-					<!--#endif-->
-					<!-- <view class="x-bc " style="margin-top: 30px;"> -->
-						<!--#ifdef MP-WEIXIN-->
-						<view class="sharePop-item y-f " style="text-align: center;">
 						<!--#endif-->
 						<!--#ifdef H5-->
-						<view class="sharePop-item y-f card-share" @click="shareimg" style="text-align: center;">
-						<!--#endif-->
-							<image src="https://fbylive.obs.cn-southwest-2.myhuaweicloud.com:443/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>
-							<view style="font-size: 12px;color: #888;">指导分享轻松转发</view>
-							<!-- #ifdef MP-WEIXIN -->
-							<button open-type="share" class="share" @click="sharecard()">分享卡片</button>
-							<!-- #endif -->
-						</view>
-						<!--#ifdef H5-->
-						<view class="sharePop-item y-f " @click="buildimg" style="text-align: center;">
-							<image src="https://fbylive.obs.cn-southwest-2.myhuaweicloud.com:443/app/images/poster_icon.png" mode="aspectFill"></image>
-							<view style="font-weight: bold;margin-bottom: 4px;">生成海报</view>
-							<view style="font-size: 12px;color: #888;">保存海报美观宣传</view>
-						</view>
-						<view class="sharePop-item y-f " @click="copyLink" style="text-align: center;">
-							<image src="https://fbylive.obs.cn-southwest-2.myhuaweicloud.com:443/app/images/link_icon.png" mode="aspectFill"></image>
-							<view style="font-weight: bold;margin-bottom: 4px;">复制链接</view>
-							<view style="font-size: 12px;color: #888; ">生成链接一键复制</view>
+						<view class="justify-center" style="margin-top: 10px;">
+							<!--#endif-->
+							<!-- <view class="x-bc " style="margin-top: 30px;"> -->
+							<!--#ifdef MP-WEIXIN-->
+							<view class="sharePop-item y-f " style="text-align: center;">
+								<!--#endif-->
+								<!--#ifdef H5-->
+								<view class="sharePop-item y-f card-share" @click="shareimg"
+									style="text-align: center;">
+									<!--#endif-->
+									<image
+										src="https://fbylive.obs.cn-southwest-2.myhuaweicloud.com:443/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>
+									<view style="font-size: 12px;color: #888;">指导分享轻松转发</view>
+									<!-- #ifdef MP-WEIXIN -->
+									<button open-type="share" class="share">分享卡片</button>
+									<!-- #endif -->
+								</view>
+								<!--#ifdef H5-->
+								<view class="sharePop-item y-f " @click="buildimg" style="text-align: center;">
+									<image
+										src="https://fbylive.obs.cn-southwest-2.myhuaweicloud.com:443/app/images/poster_icon.png"
+										mode="aspectFill"></image>
+									<view style="font-weight: bold;margin-bottom: 4px;">生成海报</view>
+									<view style="font-size: 12px;color: #888;">保存海报美观宣传</view>
+								</view>
+								<view class="sharePop-item y-f " @click="copyLink" style="text-align: center;">
+									<image
+										src="https://fbylive.obs.cn-southwest-2.myhuaweicloud.com:443/app/images/link_icon.png"
+										mode="aspectFill"></image>
+									<view style="font-weight: bold;margin-bottom: 4px;">复制链接</view>
+									<view style="font-size: 12px;color: #888; ">生成链接一键复制</view>
+								</view>
+								<!--#endif-->
+							</view>
 						</view>
-						<!--#endif-->
 					</view>
-				</view>
-			</view>
 		</u-popup>
 		<!-- 设置链接有效时长弹窗 -->
 		<u-modal :show="setTimeShow" content='content' class="model" @confirm="confirmTime">
@@ -294,7 +303,8 @@
 			</view>
 			<view class="justify-around mb40">
 				<view class="column justify-center align-center" @click="downimg">
-					<image src='https://fbylive.obs.cn-southwest-2.myhuaweicloud.com:443/app/image/downicon.png' class="w80 h80"></image>
+					<image src='https://fbylive.obs.cn-southwest-2.myhuaweicloud.com:443/app/image/downicon.png'
+						class="w80 h80"></image>
 					<view class="mt10">长按图片保存</view>
 				</view>
 			</view>
@@ -303,12 +313,14 @@
 		<u-overlay :show="showzhidao" @click="showzhidao = false" style="z-index: 9999;">
 			<view class="point-box">
 				<view class="imgshe">
-					<image src='https://fbylive.obs.cn-southwest-2.myhuaweicloud.com:443/app/image/point.png' class="w300 h300"></image>
+					<image src='https://fbylive.obs.cn-southwest-2.myhuaweicloud.com:443/app/image/point.png'
+						class="w300 h300"></image>
 				</view>
 				<view class="column colorf fs32 xu-box fs40
 				align-center justify-center">
 					<view class="justify-center">点击右上角
-						<image src="https://fbylive.obs.cn-southwest-2.myhuaweicloud.com:443/app/image/wxmore.png" class="w50 h50 mlr10"></image>
+						<image src="https://fbylive.obs.cn-southwest-2.myhuaweicloud.com:443/app/image/wxmore.png"
+							class="w50 h50 mlr10"></image>
 					</view>
 					<view class="mt20">选择 “转发给朋友”</view>
 					<view style="color: #cbcbcb;" class="fs28 mt40">点击任意位置关闭弹窗</view>
@@ -539,12 +551,12 @@
 			}
 		},
 		onLoad() {
-		  // #ifdef MP-WEIXIN
-		  uni.showShareMenu({
-		    withShareTicket: true,
-		    menus: ['shareAppMessage']
-		  });
-		  // #endif
+			// #ifdef MP-WEIXIN
+			uni.showShareMenu({
+				withShareTicket: true,
+				menus: ['shareAppMessage']
+			});
+			// #endif
 		},
 		onShow() {
 			// #ifdef H5
@@ -554,8 +566,21 @@
 			this.getcompanyTag()
 			this.getvipListnum()
 			this.getsalelist()
-			this.userList=[]
+			this.userList = []
 			this.getfsuserListdata()
+		},
+		// 这个是分享聊天
+		onShareAppMessage() {
+			return {
+				title: this.user.userName + '邀请您成为会员!',
+				path: '/pages/user/users/becomeVIP?companyId=' +
+					this.user.companyId + '&companyUserId=' + this.user.userId + '&tagids=' + this.sharetaglist,
+				imageUrl: this.imgs,
+			}
+		},
+		// 这是朋友圈
+		onShareTimeline() {
+
 		},
 		mounted() {
 
@@ -566,32 +591,6 @@
 			},
 		},
 		methods: {
-			sharecard(){
-				console.log(123)
-				uni.share({
-						  provider: 'weixin',
-						  scene: 'WXSceneSession', // 分享到会话
-						  type: 0,
-						  title: this.user.userId+'邀请您成为会员!',
-						  path: '/pages/user/users/becomeVIP?companyId='+
-						this.user.companyId + '&companyUserId=' + this.user.userId + '&tagids=' + this.sharetaglist,
-						  imageUrl: this.imgs,
-						  success: (res) => {
-							console.log('分享成功', res);
-							uni.showToast({
-							  title: '分享成功',
-							  icon: 'none'
-							});
-						  },
-						  fail: (err) => {
-							console.log('分享失败', err);
-							uni.showToast({
-							  title: '分享失败,请稍后再试',
-							  icon: 'none'
-							});
-						  }
-						});
-			},
 			changetagall() {
 				this.showTagSelect = !this.showTagSelect
 				this.tagchangekeywords = ''
@@ -1252,6 +1251,8 @@
 			clickTypeTab(e) {
 				this.currentType = e.index
 				this.userList = []
+				// 在这里更新
+				this.pageOptions.pageNum = 1
 				this.getfsuserListdata()
 			},
 			bindPickerChange(e) {
@@ -1440,18 +1441,20 @@
 </script>
 
 <style lang="scss" scoped>
-	.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;
+		bottom: 0;
+		left: 0;
+		width: 100%;
+		height: 50%;
+		opacity: 0;
+	}
+
 	.imgshe {
 		display: flex;
 		flex-direction: row-reverse

+ 25 - 1
pages/user/index.vue

@@ -81,6 +81,7 @@
 						style="width: 80rpx; height: 80rpx;margin-top: 20rpx;"></image>
 					<view style="font-weight: bold;margin-bottom: 4px;">生成卡片</view>
 					<view style="font-size: 12px;color: #888;">指导分享轻松转发</view>
+					<button open-type="share" class="share">分享课程</button>
 				</view>
 				<!--#endif-->
 				<!-- <view class="sharePop-item y-f" @click="buildimg">
@@ -163,12 +164,26 @@
 				setImg:false,
 				codeLink:'',
 				showzhidao:false,
-				imgs:'https://h5.wxcourse.cdwjyyh.com/icon/20250214100002.png',
+				imgs:'https://fbylive.obs.cn-southwest-2.myhuaweicloud.com/fs/20250416/1744811256845.png'
 			}
 		},
 		onShow() {
 			this.getCompanyUsers()
 		},
+		onShareAppMessage() {
+			return {
+				title: this.user.nickName+'邀请您成为销售', // 分享卡片标题
+				path: '/pages/courseManage/course/becomeSale?id='+this.user.companyId, // 目标页面路径
+				// 携带参数:将当前页面的数据拼接到路径中
+				imageUrl: this.user.avatar || this.imgs, // 分享卡片封面图(可选)
+				success: (res) => {
+					console.log("分享成功", res);
+				},
+				fail: (err) => {
+					console.log("分享失败", err);
+				},
+			}
+		},
 		mounted() {
 		},
 		methods: {
@@ -391,6 +406,15 @@
 	}
 </style>
 <style scoped lang="scss">
+	.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;

+ 112 - 5
pages/user/users/becomeVIP.vue

@@ -2,12 +2,23 @@
 	<view class="content hb column justify-center align-center bgf">
 		<image src="https://fbylive.obs.cn-southwest-2.myhuaweicloud.com:443/app/image/becomevip.png" mode="widthFix"></image>
 		<view class="bold">成为会员,享受更多权益</view>
+		<!--#ifdef H5-->
 		<view class="sure" @click="registerCourse">{{isVip==1?'您已成为会员':'申请成为会员'}}</view>
+		<!--#endif-->
+		<!--#ifdef MP-WEIXIN-->
+		<view class="btns">
+			<button
+				class="author-btn"
+				open-type="getPhoneNumber"
+				@getphonenumber="phoneLogin"  >{{isVip==1?'您已成为会员':'申请成为会员'}}</button>
+			<button class="author-btn" v-if="isVip==1" @click="handleAgree()">{{isVip==1?'您已成为会员':'申请成为会员'}}</button>
+		</view>
+		<!--#endif-->
 	</view>
 </template>
 
 <script>
-	import { loginByMp,registerCourses } from '@/api/user'
+	import { loginByMp,registerCourses,loginByMiniApp} from '@/api/user'
 	export default {
 		data() {
 			return {
@@ -43,9 +54,11 @@
 			}
 			this.isWechat = String(navigator.userAgent.toLowerCase().match(/MicroMessenger/i)) === "micromessenger"
 			this.code = option.code
-			if(this.code&&!this.isLogin) {
-				this.loginByMp()
-			}
+				// #ifdef H5
+				if(this.code&&!this.isLogin) {
+					this.loginByMp()
+				}
+				// #endif
 		},
 		onShow() {
 			if(uni.getStorageSync('userInfo')&&JSON.stringify(uni.getStorageSync('userInfo'))!='{}') {
@@ -61,6 +74,80 @@
 			
 		},
 		methods: {
+			handleAgree(){
+				uni.showToast({
+					title: '您已成为会员!',
+					icon: 'none',
+					duration: 2000,
+				})
+			},
+			// 微信用户手机号登录
+			phoneLogin(e) {
+				var that=this;
+				uni.showLoading({
+					title:"处理中..."
+				})
+					if (e.mp.detail.errMsg == 'getPhoneNumber:ok') {
+						this.utils.getProvider()
+						.then(provider => {
+							if (!provider) {
+							  reject()
+							}
+							// uni登录
+							uni.login({
+								provider: provider,
+								success: async loginRes => {
+									console.log(loginRes)
+									let code = loginRes.code // 获取开发code
+									loginByMiniApp({
+									   encryptedData: e.mp.detail.encryptedData,
+									   iv: e.mp.detail.iv,
+									   code: code,
+									})
+									.then( res => {
+										if(res.code==200){
+											console.log(res)
+											uni.hideLoading();
+											uni.showToast({
+												icon:'none',
+												title: "登录成功",
+											});
+											uni.setStorageSync('AppToken', res.token);
+											uni.setStorageSync('userInfo', JSON.stringify(res.user));
+											this.userInfo=res.user;
+											uni.hideLoading()
+											this.isLogin = true
+											setTimeout(()=>{
+												this.registerCourse()
+											},200)
+										}
+										else{
+											uni.hideLoading();
+											uni.showToast({
+												icon:'none',
+												title: "授权登录失败,请重新登录",
+											});
+										}
+									   
+									 })
+								}
+							})
+						})
+						.catch(err => {
+							uni.showToast({
+								icon:'none',
+								title: err,
+							});
+						})
+						 
+					} else {
+						uni.showToast({
+							title: '已拒绝授权',
+							icon: 'none',
+							duration: 2000,
+						})
+					}
+			},
 			getWechatCode() {
 				if (this.isWechat) {
 					let appid = "wx961fadab9bcb792b"; //微信APPid
@@ -155,7 +242,7 @@
 						if(res.code == 200) {
 							this.isVip = 1
 							uni.showToast({
-								title: '恭喜你!成为会员',
+								title: '恭喜你!成为会员,请联系管理员!',
 								icon:'none'
 							})
 						} else {
@@ -166,7 +253,10 @@
 						}
 					})
 				} else {
+					// #ifdef H5
 					this.getWechatCode()
+					// #endif
+					
 				}
 			}
 		}
@@ -198,4 +288,21 @@
 		border-radius: 8rpx;
 		color: #fff;
 	}
+	.btns{
+		position: relative;
+		width: 630rpx;
+		height: 80rpx;
+		.author-btn{				
+			z-index:100;
+			position: absolute;
+			width: 630rpx;
+			height: 80rpx;
+			background: #1777ff;
+			border-radius: 40rpx;
+			font-size: 30rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: rgba(255, 255, 255, 1);
+		}
+	}
 </style>

+ 15 - 14
pages/user/wxuser.vue

@@ -10,14 +10,14 @@
 				<view class="left">
 					<u-avatar :src="user.avatar" size="50"></u-avatar>
 					<view class="user" >
-						<view class="username">{{user.nickName}}</view>
-						<view class="account">{{user.email}}</view>
+						<view class="username">{{user}}</view>
+						<!-- <view class="account">{{user.email}}</view> -->
 					</view>
 				</view>
 			</view>
 			<view class="company" v-if="user!=null">
 				<image src="https://fbylive.obs.cn-southwest-2.myhuaweicloud.com:443/app/images/icon_comp.png"></image>
-				<view class="name">{{user.createBy||'暂无数据'}}</view>
+				<view class="name">{{'暂无数据'}}</view>
 			</view>
 		</view>
 		<view class="p20">
@@ -63,7 +63,8 @@
 			}
 		},
 		onShow() {
-			this.getCompanyUsers()
+			this.user=uni.getStorageSync('phoneNumber')
+			// this.getCompanyUsers()
 		},
 		methods: {
 			showLogout(){
@@ -85,17 +86,17 @@
 				}
 				
 			},
-			getCompanyUsers(){
-				var data = {
-				};
-				getwxuser(data).then(res => {
-					if(res.code==200){
-						this.user=res.user;
-					}else{
+			// getCompanyUsers(){
+			// 	var data = {
+			// 	};
+			// 	getwxuser(data).then(res => {
+			// 		if(res.code==200){
+			// 			this.user=res.user;
+			// 		}else{
 						
-					}
-				});
-			},
+			// 		}
+			// 	});
+			// },
 		}
 	}
 </script>

+ 1 - 1
pages_course/video.vue

@@ -307,7 +307,7 @@
 				answerPopup: false,
 				sortLink:"",
 				// 课程是否过期
-				isExpire: true,
+				isExpire: false,
 				menuButtonLeft: 281,
 				menuButtonH: 45,
 				timer: null,