Преглед изворни кода

新增分销管理

Signed-off-by: 李妹妹 <1639016684@qq.com>
李妹妹 пре 3 недеља
родитељ
комит
988d111bd2
34 измењених фајлова са 13492 додато и 351 уклоњено
  1. 13 1
      api/companyOrder.js
  2. 101 1
      api/courseLook.js
  3. 1 2
      common/request.js
  4. 38 9
      pages.json
  5. 2 2
      pages/common/launch.vue
  6. 96 5
      pages/home/components/GoodsList.vue
  7. 1 2
      pages/home/components/GoodsNav.vue
  8. 24 7
      pages/home/index.vue
  9. 16 6
      pages/home/newindex.vue
  10. 12 2
      pages_company/index.vue
  11. 453 0
      pages_company/managerOrder/cart.vue
  12. 157 0
      pages_company/managerOrder/components/GoodsCard.vue
  13. 67 0
      pages_company/managerOrder/components/GoodsList.vue
  14. 121 0
      pages_company/managerOrder/components/SearchBar.vue
  15. 446 0
      pages_company/managerOrder/confirmCompanyOrder.vue
  16. 893 0
      pages_company/managerOrder/confirmOrder.vue
  17. 351 0
      pages_company/managerOrder/coupon.vue
  18. 1400 0
      pages_company/managerOrder/productDetails.vue
  19. 289 0
      pages_company/managerOrder/productList.vue
  20. 476 0
      pages_company/managerOrder/productShowDetails.vue
  21. 739 45
      pages_course/video - old.vue
  22. 1753 138
      pages_course/video.vue
  23. 4252 0
      pages_course/videovip-1.vue
  24. 1267 34
      pages_course/videovip.vue
  25. 160 19
      pages_index/course.vue
  26. 41 11
      pages_index/courseDetail.vue
  27. 77 18
      pages_index/courseSearch.vue
  28. 169 38
      pages_index/video.vue
  29. 45 7
      pages_user/user/addAddress.vue
  30. 32 4
      pages_user/user/address.vue
  31. BIN
      static/images/cart_sel.png
  32. BIN
      static/images/points_title2.png
  33. BIN
      static/tabbar/yxy.png
  34. BIN
      static/tabbar/yxy_sel.png

+ 13 - 1
api/companyOrder.js

@@ -24,6 +24,18 @@ let request = new Request().http
  	 return request('/app/companyOrder/editOrderMoney',data,'GET' );
  }
  
-  
+ //分销商品
+  export function getStoreProductList(data) {
+  	 return request('/publicApp/app/storeProduct/list',data,'GET' );
+
+ }
+ //分销商品详情
+  export function getStoreProductDetail(data) {
+	  var info={
+		  companyId:data.companyId,
+		  companyUserId:data.companyUserId
+	  }
+  	 return request('/publicApp/app/storeProduct/'+data.productId,info,'GET' );
  
+ }
  

+ 101 - 1
api/courseLook.js

@@ -78,4 +78,104 @@ export function getRealLink(data) {
  //获取弹窗时间
  export function getRemainTime(data) {
  	 return request('/course_uniapp/app/course/wx/h5/getRemainTime',data,'POST','application/json;charset=UTF-8');
- }
+ }
+ 
+ //查询评论
+ export function getCommentList(data) {
+ 	 return request('/course_uniapp/app/course/comment/myList',data,'GET','application/json;charset=UTF-8');
+ }
+/** 取首个文件路径(兼容误传数组) */
+function _firstPathArg(v) {
+	if (v == null) return ''
+	if (typeof v === 'string') return v.trim()
+	if (Array.isArray(v) && v.length) {
+		const x = v[0]
+		return x != null && typeof x === 'string' ? x.trim() : ''
+	}
+	return ''
+}
+
+/**
+ * 是否应使用 uni.uploadFile 上传的本地临时路径。
+ * 注意:微信/uni 下相册临时路径常为 http(s)://tmp/...,若以「是否 http」判断会误判为网络图,导致不走上传、图片未传参。
+ */
+function _isLocalMediaFilePath(p) {
+	if (p == null || p === '') return false
+	if (typeof p !== 'string') return false
+	const s = p.trim()
+	if (!s) return false
+	if (/^blob:/i.test(s)) return false
+	if (/^https?:\/\/tmp\//i.test(s)) return true
+	if (/^wxfile:\/\//i.test(s)) return true
+	if (/^file:\/\//i.test(s)) return true
+	if (/^https?:\/\//i.test(s)) return false
+	return true
+}
+
+function _addCommentWithMediaUploadBaseUrl() {
+	const base = uni.getStorageSync('requestPath') || 'https://userapp.klbycp.com'
+	return String(base).replace(/\/$/, '') + '/app/course/comment/addCommentWithMedia'
+}
+
+/** courseId、type、content、toUserId 拼到请求路径(query),值均 encodeURIComponent */
+function _buildAddCommentWithMediaQuery(d) {
+	const courseId = encodeURIComponent(d.courseId != null ? String(d.courseId) : '')
+	const videoId = encodeURIComponent(d.videoId != null ? String(d.videoId) : '')
+	const type = encodeURIComponent(d.type != null ? String(d.type) : '1')
+	const content = encodeURIComponent(d.content != null ? String(d.content) : '')
+	const toUserId = encodeURIComponent(d.toUserId != null ? String(d.toUserId) : '')
+	return `?courseId=${courseId}&videoId=${videoId}&type=${type}&content=${content}&toUserId=${toUserId}`
+}
+
+/**
+ * 发布评论:业务参数均在 URL query;带本地图/视频时仅 multipart body 传 imageFiles 或 videoFiles
+ */
+export function addCommentWithMedia(data) {
+	const d = data || {}
+	const imageArg = _firstPathArg(d.imageFiles)
+	const videoArg = _firstPathArg(d.videoFiles)
+	const imagePath = _isLocalMediaFilePath(imageArg) ? imageArg : ''
+	const videoPath = _isLocalMediaFilePath(videoArg) ? videoArg : ''
+	if (imagePath || videoPath) {
+		return new Promise((resolve, reject) => {
+			const token =
+				uni.getStorageSync('TOKEN_WEXIN') ||
+				uni.getStorageSync('AppTokenmini_AutoCourse') ||
+				''
+			// 与 common/request.js 中 uni.request 一致;multipart 的 boundary 由客户端自动带,勿手写 Content-Type
+			const header = {
+				AppToken: token
+			}
+			try {
+				if (typeof wx !== 'undefined' && wx.getAccountInfoSync) {
+					header['appid'] = wx.getAccountInfoSync().miniProgram.appId
+				}
+			} catch (e) {}
+			const filePath = imagePath || videoPath
+			// 与后端 multipart 字段名一致:imageFiles / videoFiles(Content-Disposition: form-data; name="imageFiles"; filename="...")
+			const name = imagePath ? 'imageFiles' : 'videoFiles'
+			const url = _addCommentWithMediaUploadBaseUrl() + _buildAddCommentWithMediaQuery(d)
+			uni.uploadFile({
+				url,
+				filePath,
+				name,
+				header,
+				success: (uploadFileRes) => {
+					try {
+						const raw = uploadFileRes.data
+						const body = typeof raw === 'string' ? JSON.parse(raw) : raw
+						resolve(body)
+					} catch (e) {
+						reject(e)
+					}
+				},
+				fail: (err) => {
+					reject(err || new Error('发布失败'))
+				}
+			})
+		})
+	}
+	const router =
+		'/course_uniapp/app/course/comment/addCommentWithMedia' + _buildAddCommentWithMediaQuery(d)
+	return request(router, {}, 'POST')
+}

+ 1 - 2
common/request.js

@@ -30,8 +30,7 @@ export default class Request {
 			path = 'https://im.fhhx.runtzh.com';
 		}
 
-		if (router.indexOf("/app/order/getMyMergedOrderList") != -1 || router.indexOf("/app/order/deleteOrder") != -
-			1) {
+		if (router.indexOf("/app/order/getMyMergedOrderList") != -1 || router.indexOf("/app/order/deleteOrder") != -1) {
 			path = path2
 		}
 

+ 38 - 9
pages.json

@@ -565,14 +565,18 @@
 					"style": {
 						"navigationBarTitleText": "新建收货地址",
 						"enablePullDownRefresh": false
-					}
+					},
+					"enableShareAppMessage": true,
+					  "enableShareTimeline": true
 
 				}, {
 					"path": "user/address",
 					"style": {
 						"navigationBarTitleText": "收货地址",
 						"enablePullDownRefresh": false
-					}
+					},
+					"enableShareAppMessage": true,
+					  "enableShareTimeline": true
 
 				}, {
 					"path": "user/integral",
@@ -890,6 +894,31 @@
 						}
 					}
 				},
+				{
+					"path": "managerOrder/productList",
+					"style": {
+						"navigationBarTitleText": "产品列表",
+						"app-plus": {
+							"titleNView": false
+						}
+					}
+				},
+				{
+					"path": "managerOrder/productDetails",
+					"style": {
+						"navigationBarTitleText": "产品详情",
+						"enablePullDownRefresh": false
+					}
+				},
+				{
+					"path": "managerOrder/confirmOrder",
+					"style": {
+						"navigationBarTitleText": "提交订单",
+						"app-plus": {
+							"titleNView": false
+						}
+					}
+				},
 				{
 					"path": "order/productDetails",
 					"style": {
@@ -1445,13 +1474,13 @@
              	"selectedIconPath": "/static/tabbar/mall_sel.png",
              	"text": "商城"
              },
-			// {
-			// 	"pagePath": "pages/healthy/index",
-			// 	//"pagePath": "pages/home/newindex",
-			// 	"iconPath": "/static/tabbar/mall.png",
-			// 	"selectedIconPath": "/static/tabbar/mall_sel.png",
-			// 	"text": "原乡行"
-			// },
+			{
+				"pagePath": "pages/healthy/index",
+				//"pagePath": "pages/home/newindex",
+				"iconPath": "/static/tabbar/yxy.png",
+				"selectedIconPath": "/static/tabbar/yxy_sel.png",
+				"text": "原乡行"
+			},
 			
 			// {
 			// 	//"pagePath": "pages/shopping/cart",

+ 2 - 2
pages/common/launch.vue

@@ -37,8 +37,8 @@
 			},
 			navigatHandler: function() {
 				uni.reLaunch({
-					//url: '/pages/home/newindex',
-					url:"/pages/home/index",
+					url: '/pages/home/newindex',
+					//url:"/pages/home/index",
 					animationType: 'pop-in',
 					animationDuration: 100
 				})

+ 96 - 5
pages/home/components/GoodsList.vue

@@ -1,14 +1,32 @@
 <template>
 	<view class="goods-list">
-		<view class="list-column" v-if="list && list.length > 0">
-			<view class="list-item" v-for="(item, index) in list" :key="item.productId">
-				<GoodsCard :item="item" :show-price="showPrice" @click="$emit('itemClick', item)" />
+		<!-- 首屏 / 无数据时:骨架屏 -->
+		<view class="skeleton-column" v-if="loading && (!list || list.length === 0)">
+			<view class="skeleton-item" v-for="i in 3" :key="'sk-' + i">
+				<view class="skeleton-img"></view>
+				<view class="skeleton-line skeleton-line-lg"></view>
+				<view class="skeleton-line skeleton-line-sm"></view>
 			</view>
 		</view>
+
+		<!-- 有数据:切换分类时保留旧列表 + 遮罩,避免闪空 -->
+		<view class="list-wrap" v-else-if="list && list.length > 0">
+			<view class="list-column" :class="{ 'list-dimmed': refreshing }">
+				<view class="list-item" v-for="(item, index) in list" :key="item.productId || index">
+					<GoodsCard :item="item" :show-price="showPrice" @click="$emit('itemClick', item)" />
+				</view>
+			</view>
+			<view class="refresh-mask" v-if="refreshing">
+				<view class="refresh-spinner"></view>
+				<text class="refresh-text">加载中</text>
+			</view>
+		</view>
+
 		<view class="empty" v-else-if="!loading">
 			<text class="empty-text">暂无商品</text>
 		</view>
-		<view class="loading" v-if="loading">
+
+		<view class="loading-more" v-if="loading && !refreshing && list.length > 0">
 			<text class="loading-text">加载中...</text>
 		</view>
 		<view class="load-more" v-if="hasMore && !loading && list.length > 0" @click="$emit('loadMore')">
@@ -25,6 +43,7 @@ export default {
 	props: {
 		list: { type: Array, default: () => [] },
 		loading: { type: Boolean, default: false },
+		refreshing: { type: Boolean, default: false },
 		hasMore: { type: Boolean, default: true },
 		showPrice: { type: Boolean, default: true }
 	}
@@ -38,16 +57,88 @@ export default {
 	min-height: 400rpx;
 	padding-bottom: 120rpx;
 }
+.list-wrap {
+	position: relative;
+}
 .list-column {
 	display: flex;
 	flex-direction: column;
 	gap: 24rpx;
+	transition: opacity 0.2s ease;
+}
+.list-column.list-dimmed {
+	opacity: 0.55;
 }
 .list-item {
 	width: 100%;
 }
+.refresh-mask {
+	position: absolute;
+	left: 0;
+	right: 0;
+	top: 0;
+	bottom: 0;
+	display: flex;
+	flex-direction: column;
+	align-items: center;
+	justify-content: center;
+	pointer-events: none;
+}
+.refresh-spinner {
+	width: 48rpx;
+	height: 48rpx;
+	border: 4rpx solid #e8e8e8;
+	border-top-color: #FF233C;
+	border-radius: 50%;
+	animation: spin 0.8s linear infinite;
+}
+.refresh-text {
+	margin-top: 16rpx;
+	font-size: 26rpx;
+	color: #999;
+}
+@keyframes spin {
+	to { transform: rotate(360deg); }
+}
+.skeleton-column {
+	display: flex;
+	flex-direction: column;
+	gap: 24rpx;
+}
+.skeleton-item {
+	background: #fff;
+	border-radius: 16rpx;
+	padding: 24rpx;
+	overflow: hidden;
+}
+.skeleton-img {
+	width: 100%;
+	height: 394rpx;
+	background: linear-gradient(90deg, #eee 25%, #f5f5f5 50%, #eee 75%);
+	background-size: 200% 100%;
+	animation: shimmer 1.2s ease-in-out infinite;
+	border-radius: 8rpx;
+}
+.skeleton-line {
+	height: 28rpx;
+	margin-top: 20rpx;
+	border-radius: 6rpx;
+	background: linear-gradient(90deg, #eee 25%, #f5f5f5 50%, #eee 75%);
+	background-size: 200% 100%;
+	animation: shimmer 1.2s ease-in-out infinite;
+}
+.skeleton-line-lg {
+	width: 85%;
+}
+.skeleton-line-sm {
+	width: 50%;
+}
+@keyframes shimmer {
+	0% { background-position: 100% 0; }
+	100% { background-position: -100% 0; }
+}
 .empty,
-.loading {
+.loading-more {
 	padding: 80rpx 0;
 	text-align: center;
 }

+ 1 - 2
pages/home/components/GoodsNav.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="goods-nav" v-if="navList && navList.length > 0">
 		<view class="nav-row">
-			<view class="nav-all" :class="{ active: activeId === 'all'}" @tap.stop="onSelectAll" @click.stop="onSelectAll">
+			<view class="nav-all" :class="{ active: activeId === 'all'}" @tap.stop="onSelectAll">
 				<text>全部</text>
 			</view>
 			<scroll-view scroll-x class="nav-scroll" :show-scrollbar="false">
@@ -11,7 +11,6 @@
 					:key="item.id"
 					:class="['nav-item', { active: item.id === activeId }]"
 					@tap.stop="onSelectByIndex(index)"
-					@click.stop="onSelectByIndex(index)"
 				>
 					<text>{{ item.categoryName}}</text>
 				</view>

+ 24 - 7
pages/home/index.vue

@@ -15,7 +15,7 @@
 
 		<!-- 应用标题与副标题 -->
 		<view class="brand">
-			<image src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/class/title.png" mode="widthFix"></image>
+			<image src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/class/title2.png" mode="widthFix"></image>
 			<!-- <text class="brand-title">品质韶华·乐享朝夕</text>
 			<text class="brand-subtitle">全国89%的中老年人都在用的兴趣内容社区</text> -->
 		</view>
@@ -32,7 +32,7 @@
 							<image :src="item.imageUrl" mode=""></image>
 						</swiper-item> -->
 						<swiper-item class="swiper-item">
-							<image src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/class/banner.png" mode=""></image>
+							<image src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/class/banner2.jpg" mode=""></image>
 						</swiper-item>
 					</swiper>
 				</view>
@@ -42,8 +42,8 @@
 			<view class="section video-section">
 				<view class="section-head">
 					<view class="section-title-wrap">
-						<image class="play-icon" src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/class/bofang.png" mode=""></image>
-						<image class="section-title" src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/class/yyx.png" ></image>
+						<image class="play-icon" src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/class/yxbofang.png" mode=""></image>
+						<image class="section-title" src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/class/yxy2.png" ></image>
 					</view>
 					<view class="section-more" @click="onMoreVideos">查看更多
 					 <image src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/class/back.png" ></image>
@@ -83,8 +83,8 @@
 			<view class="section course-section">
 				<view class="section-head">
 					<view class="section-title-wrap">
-						<image class="play-icon" src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/class/bofang.png" mode=""></image>
-						<image class="section-title" src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/class/jpk.png" ></image>
+						<image class="play-icon" src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/class/bofang2.png" mode=""></image>
+						<image class="section-title" src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/class/jpk2.png" ></image>
 					</view>
 					<view class="section-more" @click="onMoreCourses">更多课程
 					 <image src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/class/back.png" ></image>
@@ -120,7 +120,7 @@
 							<view class="x-end" style="justify-content: space-between;">
 								<view class="course-meta">
 									<image src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/class/renshu.png"></image>
-									<text class="meta-count">{{ course.views }}</text>
+									<text class="meta-count">{{ courseViewsDisplay(course.views) }}</text>
 								</view>
 								<view class="btn-watch2" @click.stop="onCourseClick(course)">立即观看</view>
 							</view>
@@ -161,10 +161,27 @@ export default {
 	},
 	onLoad() {
 		this.getMenuButtonInfo(); // 初始化获取胶囊信息
+		
+	},
+	onShow() {
 		this.initPublicVideoData();
 		this.initPublicCourseData();
 	},
 	methods: {
+		courseViewsDisplay(views) {
+			const raw = views;
+			const n = Number(raw);
+			if (!Number.isFinite(n) || n < 0) {
+				return "0";
+			}
+			if (n < 100000) {
+				return String(Math.floor(n));
+			}
+			if (n < 1000000) {
+				return (n / 10000).toFixed(1) + "w";
+			}
+			return "100w+";
+		},
 		onSelectByIndex(cateId) {
 			this.activeId = cateId;
 			this.getPublicCourseList(cateId, { reset: true });

+ 16 - 6
pages/home/newindex.vue

@@ -49,6 +49,7 @@
 		<GoodsList
 			:list="goodsList"
 			:loading="goodsLoading"
+			:refreshing="goodsRefreshing"
 			:has-more="goodsHasMore"
 			@itemClick="showProduct"
 			@loadMore="loadMoreGoods"
@@ -118,8 +119,10 @@ export default {
 			activeGoodsNavId: 'all',
 			goodsList: [],
 			goodsLoading: false,
+			goodsRefreshing: false,
 			goodsHasMore: true,
 			goodsPageNum: 1,
+			goodsRequestId: 0,
 			cartCount: 0,
 			advList: [],
 			top: 0,
@@ -233,14 +236,18 @@ export default {
 		fetchGoodsList(reset) {
 			if (reset) {
 				this.goodsPageNum = 1
-				this.goodsList = []
 				this.goodsHasMore = true
+				this.goodsRefreshing = true
+			} else if (this.goodsLoading || !this.goodsHasMore) {
+				return
 			}
-			if (this.goodsLoading || !this.goodsHasMore) return
+			const requestId = ++this.goodsRequestId
 			this.goodsLoading = true
 			const id = this.activeGoodsNavId === 'all' || this.activeGoodsNavId === '' ? 0 : this.activeGoodsNavId
-			getHomeGoods({ id, position:2,pageNum: this.goodsPageNum, pageSize: 10 }).then(res => {
+			getHomeGoods({ id, position: 2, pageNum: this.goodsPageNum, pageSize: 10 }).then(res => {
+				if (requestId !== this.goodsRequestId) return
 				this.goodsLoading = false
+				this.goodsRefreshing = false
 				if (res.code == 200 && res.data) {
 					const list = Array.isArray(res.data.list) ? res.data.list : []
 					const total = res.data.total != null ? Number(res.data.total) : 0
@@ -249,14 +256,17 @@ export default {
 					this.goodsHasMore = list.length >= 10 && (this.goodsList.length < total || total === 0)
 					this.goodsPageNum++
 				}
-			}).catch(() => { this.goodsLoading = false })
+			}).catch(() => {
+				if (requestId !== this.goodsRequestId) return
+				this.goodsLoading = false
+				this.goodsRefreshing = false
+			})
 		},
 		loadMoreGoods() {
 			this.fetchGoodsList(false)
 		},
 		onGoodsNavSelect(item) {
-      //console.log("2222")
-      //console.log(item.id)
+			if (!item || item.id === this.activeGoodsNavId) return
 			this.activeGoodsNavId = item.id
 			this.fetchGoodsList(true)
 		},

+ 12 - 2
pages_company/index.vue

@@ -45,11 +45,16 @@
 							mode=""></image>
 						<text class="text">商品套餐</text>
 					</view>
+					<view class="item" @click="toCreateOrder()">
+						<image src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/order.png"
+							mode=""></image>
+						<text class="text">分销管理</text>
+					</view>
 					<!-- <view class="item" @click="toCoupon()">
 						<image src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/icon_coupon.png"
 							mode=""></image>
 						<text class="text">套餐优惠券</text>
-					</view> -->
+					</view>
 					<!-- <view class="item" @click="toPaywechat()">
 						<image src="https://kuanyitang-1317640934.cos.ap-shanghai.myqcloud.com/app/image/wechat.png"
 							mode=""></image>
@@ -136,9 +141,14 @@
 			},
 			toCreateOrder() {
 				uni.navigateTo({
-					url: '/pages_company/order/productList?companyId=' + this.user.companyId + "&companyUserId=" + this.user.userId
+					url: '/pages_company/managerOrder/productList?companyId=' + this.user.companyId + "&companyUserId=" + this.user.userId
 				})
 			},
+			// toCreateOrder() {
+			// 	uni.navigateTo({
+			// 		url: '/pages_company/order/productList?companyId=' + this.user.companyId + "&companyUserId=" + this.user.userId
+			// 	})
+			// },
 			toPay() {
 				uni.navigateTo({
 					url: '/pages_user/user/pay?companyId=' + this.user.companyId + "&companyUserId=" + this.user

+ 453 - 0
pages_company/managerOrder/cart.vue

@@ -0,0 +1,453 @@
+<template>
+	<view class="content">
+		<!-- 商品列表 -->
+		<view class="goods-list">
+			<view class="item" v-for="(item,index) in carts" :key="index">
+				<label style="margin-right: 30upx;">
+					<checkbox :value="item.checked"  :checked="item.checked" @click="checkChange(item)" />
+				</label>
+				<image class="goods-img" :src="item.productAttrImage==null||item.productAttrImage==''?item.productImage:item.productAttrImage" mode="aspectFit"></image>
+				<view class="info-box">
+					<view>
+						<view class="title-box">
+							<!-- <view class="tag">{{utils.getDictLabelName("storeProductType",item.productType)}}</view> -->
+							<view class="title ellipsis">{{ item.productName }}</view>
+						</view>
+						<view class="intro ellipsis">{{item.productAttrName}}</view>
+					</view>
+					<view class="price-num">
+						<view class="price">
+							<text class="unit">¥</text>
+							<text class="text">{{item.price}}</text>
+						</view>
+						<view class="num-box">
+							<view class="img-box" @click="delNum(item)">
+								<image v-if="item.cartNum <= 1" src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/jian.png" mode=""></image>
+								<image v-else src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/jian2.png" mode=""></image>
+							</view>
+							<input type="text"  @change="changeNum($event,item)" :value="item.cartNum"   />
+							<view class="img-box" @click="addNum(item)">
+								<image src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/add.png" mode=""></image>
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<!-- 底部按钮 -->
+		<view class="btn-foot">
+			<view class="left">
+				<label>
+					<checkbox  :checked="checkAll" @click="handleCheckAll()" />
+				</label>
+				<text class="text">全选</text>
+				<text class="text" @click="delCart()">删除</text>
+			</view>
+			<view class="right">
+				<view class="total">
+					<text class="label">合计:</text>
+					<view class="price">
+						<text class="unit">¥</text>
+						<text class="num">{{totalMoney.toFixed(2)}}</text>
+					</view>
+				</view>
+				<view class="btn" @click="submit">制单</view>
+			</view>
+		</view>
+		
+	</view>
+</template>
+
+<script>
+	import {getCarts,cartNum,delCart} from '@/api/product'
+	import {createSalesOrder} from '@/api/companyOrder.js'
+	export default {
+		 
+		data() {
+			return {
+				totalMoney:0.00,
+				carts:[],
+				checkAll:false,
+			}	
+		},
+		onLoad() {
+			this.getCarts();
+ 
+		},
+		 
+		methods: {
+			changeNum(e,item) {
+				item.cartNum = e.detail.value.replace(/\D/g, '')
+				if (item.cartNum <= 1) {
+				  uni.showToast({
+				    title: "已经是底线啦!",
+				    icon: "none",
+				    duration: 2000
+				  });
+				  return;
+				}
+				if(item.cartNum < 1) {
+					item.cartNum = 1
+				}
+				if(item.cartNum>=item.stock){
+					item.cartNum=item.stock;
+				}
+				this.changeCartNum(item)
+			},
+			delCart(){
+				var selectCarts=this.carts.filter(ele => ele.checked==true).map(ele => {
+				  return ele.id
+				});
+				if(selectCarts.length==0){
+					uni.showToast({
+						icon:'none',
+						title: "请选择商品删除",
+					});
+					return;
+				}
+				let data = {ids:selectCarts};
+				delCart(data).then(
+					res => {
+						if(res.code==200){
+							uni.showToast({
+								icon:'success',
+								title: "操作成功",
+							});
+							this.getCarts()
+						}else{
+							
+							uni.showToast({
+								icon:'none',
+								title: res.msg,
+							});
+						}
+					},
+					rej => {}
+				);
+				console.log(selectCarts)
+			},
+			computedMoney(){
+				var money=0;
+				var that=this;
+				this.carts.forEach((item,index,arr)=>{
+					 if(item.checked){
+						 money+=item.price*item.cartNum;
+					 }
+				})
+				console.log(money);
+				this.totalMoney=money;
+			},
+			handleCheckAll(){
+				this.checkAll=!this.checkAll;
+				var that=this;
+				this.carts.forEach((item,index,arr)=>{
+				     item.checked=that.checkAll;
+				})
+				this.computedMoney();
+			},
+			checkChange(item){
+				item.checked=!item.checked;
+				this.computedMoney();
+			},
+			changeCartNum(item){
+				let data = {number:item.cartNum,id:item.id};
+				cartNum(data).then(
+					res => {
+						if(res.code==200){
+							uni.showToast({
+								icon:'none',
+								title: "操作成功",
+							});
+							this.computedMoney();
+							
+						}else{
+							
+							uni.showToast({
+								icon:'none',
+								title: res.msg,
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+			getCarts(){
+				getCarts().then(
+					res => {
+						if(res.code==200){
+							 this.carts=res.carts;
+							 this.carts.forEach((item,index,arr)=>{
+							      item.checked=false;
+							 })
+							 this.computedMoney();
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: "请求失败",
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+			// 购物车减法
+			delNum(item) {
+				if (item.cartNum <= 1) {
+				  uni.showToast({
+				    title: "已经是底线啦!",
+				    icon: "none",
+				    duration: 2000
+				  });
+				  return;
+				}
+				item.cartNum --
+				if(item.cartNum < 1) {
+					item.cartNum = 1
+				}
+				 
+				this.changeCartNum(item)
+			},
+			// 购物车加法
+			addNum(item) {
+				console.log(item)
+				item.cartNum++
+				if(item.cartNum>=item.stock){
+					item.cartNum=item.stock;
+				}
+				this.changeCartNum(item)
+			},
+			// 结算
+			submit() {
+				var selectCarts=this.carts.filter(ele => ele.checked==true).map(ele => {
+				  return ele.id
+				});
+				if(selectCarts.length==0){
+					uni.showToast({
+						icon:'none',
+						title: "请选择商品",
+					});
+					return;
+				}
+				var data={token:uni.getStorageSync('CompanyUserToken'),cateIds:selectCarts.toString()}
+				createSalesOrder(data).then(
+					res => {
+						if(res.code==200){
+							uni.navigateTo({
+								url: './confirmCompanyOrder?orderKey='+res.orderKey
+							})
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: "请求失败",
+							});
+						}
+					},
+					rej => {}
+				);
+			
+			},
+		}
+	}
+</script>
+
+<style lang="scss">
+	page {
+		height: 100%;
+	}
+	.content{
+		height: 100%;
+		padding: 20upx;
+		.goods-list{
+			padding-bottom: 120upx;
+			.item{
+				box-sizing: border-box;
+				height: 221upx;
+				background: #FFFFFF;
+				border-radius: 16upx;
+				margin-bottom: 20upx;
+				padding: 30upx;
+				display: flex;
+				align-items: center;
+				&:last-child{
+					margin-bottom: 0;
+				}
+				.goods-img{
+					width: 160upx;
+					height: 160upx;
+					background: #FFFFFF;
+					margin-right: 30upx;
+					flex-shrink: 0;
+				}
+				.info-box{
+					height: 160upx;
+					display: flex;
+					flex-direction: column;
+					justify-content: space-between;
+					width: calc(100% - 255upx);
+					.title-box{
+						width: 100%;
+						display: flex;
+						align-items: center;
+						.tag{
+							padding: 0 6upx;
+							height: 30upx;
+							line-height: 30upx;
+							font-size: 22upx;
+							font-family: PingFang SC;
+							font-weight: bold;
+							color: #FFFFFF;
+							background: linear-gradient(90deg, #66b2ef 0%, #FF233C 100%);
+							border-radius: 4upx;
+							margin-right: 10upx;
+							flex-shrink: 0;
+						}
+						.title{
+							flex: 1;
+							font-size: 28upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #111111;
+							line-height: 1;
+						}
+					}
+					.intro{
+						font-size: 24upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #999999;
+						margin-top: 22upx;
+						line-height: 1;
+					}
+					.price-num{
+						display: flex;
+						align-items: center;
+						justify-content: space-between;
+						.price{
+							display: flex;
+							align-items: flex-end;
+							.unit{
+								font-size: 24upx;
+								font-family: PingFang SC;
+								font-weight: 500;
+								color: #FF6633;
+								line-height: 1.2;
+								margin-right: 4upx;
+							}
+							.text{
+								font-size: 32upx;
+								font-family: PingFang SC;
+								font-weight: bold;
+								color: #FF6633;
+								line-height: 1;
+							}
+						}
+						.num-box{
+							display: flex;
+							align-items: center;
+							.img-box{
+								width: 60upx;
+								height: 60upx;
+								// border-radius: 4upx;
+								border: 1px solid #dddddd;
+								display: flex;
+								align-items: center;
+								justify-content: center;
+								image{
+									width: 25rpx;
+									height: 25rpx;
+								}
+							}
+							input{
+								width: 60upx;
+								height: 60upx;
+								line-height: 60upx;
+								font-size: 28upx;
+								font-family: PingFang SC;
+								font-weight: 500;
+								color: #111111;
+								// border-radius: 4upx;
+								border-top: 1px solid #dddddd;
+								border-bottom: 1px solid #dddddd;
+								text-align: center;
+								// margin: 0 16upx;
+							}
+						}
+					}
+				}
+			}
+		}
+		.btn-foot{
+			box-sizing: border-box;
+			width: 100%;
+			height: 121upx;
+			background: #FFFFFF;
+			padding: 16upx 30upx 16upx 60upx;
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			position: fixed;
+			left: 0;
+			bottom: 0;
+			z-index: 99;
+			.left{
+				display: flex;
+				align-items: center;
+				.text{
+					margin-left: 14upx;
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #666666;
+					line-height: 1;
+				}
+			}
+			.right{
+				display: flex;
+				align-items: center;
+				.total{
+					display: flex;
+					align-items: flex-end;
+					margin-right: 36upx;
+					.label{
+						font-size: 26upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #999999;
+						line-height: 1.5;
+					}
+					.price{
+						display: flex;
+						align-items: flex-end;
+						.unit{
+							font-size: 32upx;
+							font-family: PingFang SC;
+							font-weight: bold;
+							color: #FF6633;
+							line-height: 1.2;
+							margin-right: 10upx;
+						}
+						.num{
+							font-size: 30upx;
+							font-family: PingFang SC;
+							font-weight: bold;
+							color: #FF6633;
+							line-height: 1;
+						}
+					}
+				}
+				.btn{
+					width: 200upx;
+					height: 88upx;
+					line-height: 88upx;
+					text-align: center;
+					font-size: 30upx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #FFFFFF;
+					background: #FF233C;
+					border-radius: 44upx;
+				}
+			}
+		}
+	}
+</style>

+ 157 - 0
pages_company/managerOrder/components/GoodsCard.vue

@@ -0,0 +1,157 @@
+<template>
+	<view class="goods-card" @click="showProduct(item)">
+		<view class="img-wrap">
+			<image class="img" :src="item.image" mode="aspectFill"></image>
+			<view class="tag-row" v-if="tagList && tagList.length > 0">
+				<text class="tag-chip" v-for="(t, i) in tagList" :key="i">{{ t }}</text>
+			</view>
+		</view>
+		<view class="info">
+			<view class="title line2">{{ item.productName }}</view>
+			<view class="x-bc">
+				<view class="price-row">
+					<text class="unit"v-if="showPrice">¥</text>
+					<text class="price" v-if="showPrice">{{item.price != null ? item.price : item.payPrice || 0 }}</text>
+					<text class="ot-price" v-if="item.otPrice != null">原价¥{{item.otPrice }}</text>
+				</view>
+				<view class="meta-row" v-if="item.sales != null || item.positiveRating != null">
+					<text class="sales" v-if="item.sales != null">已售{{ item.sales }}</text>
+					<text v-if="item.positiveRating">I</text>
+					<text class="good-rate" v-if="item.positiveRating != null">好评{{ item.positiveRating }}%</text>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	name: 'GoodsCard',
+	props: {
+		item: { type: Object, required: true },
+		showPrice: { type: Boolean, default: true },
+		defaultImg: {
+			type: String,
+			default: 'https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/no-img.png'
+		}
+	},
+	computed: {
+		tagList() {
+			const item = this.item
+			if (!item) return []
+			if (Array.isArray(item.tagList)) return item.tagList
+			if (Array.isArray(item.tagNames)) return item.tagNames
+			if (Array.isArray(item.tags)) return item.tags.map(t => typeof t === 'string' ? t : (t.tagName || t.name))
+			if (item.tag) return [item.tag]
+			return []
+		}
+	},
+	methods:{
+		showProduct(item) {
+			this.$emit('goPage',item)
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.goods-card {
+	width: 100%;
+	background: #fff;
+	border-radius: 16rpx;
+	overflow: hidden;
+	box-sizing: border-box;
+	display: flex;
+	flex-direction:column;
+	align-items: stretch;
+}
+.img-wrap {
+	width: 100%;
+	height: 394rpx;
+	flex-shrink: 0;
+	background: #f5f5f5;
+	position: relative;
+}
+.img {
+	width: 100%;
+	height: 100%;
+}
+.info {
+	flex: 1;
+	padding: 20rpx;
+	display: flex;
+	flex-direction: column;
+	justify-content: space-between;
+	min-width: 0;
+}
+.tag-row {
+	position: absolute;
+	bottom:0;
+	display: flex;
+	flex-wrap: wrap;
+	gap: 12rpx;
+	padding: 0 12rpx;
+	margin-bottom: 12rpx;
+}
+.tag-chip {
+	font-family: PingFangSC, PingFang SC;
+	font-weight: 400;
+	font-size: 30rpx;
+	color: #AA4726;
+	line-height: 42rpx;
+	background: #FFF4F1;
+	padding: 4rpx 12rpx;
+	border-radius: 6rpx;
+}
+.title {
+	font-family: PingFangSC, PingFang SC;
+	font-weight: 500;
+	font-size: 36rpx;
+	color: rgba(0,0,0,0.85);
+	line-height: 50rpx;
+}
+.line2 {
+	display: -webkit-box;
+	-webkit-line-clamp: 1;
+	-webkit-box-orient: vertical;
+	overflow: hidden;
+}
+.price-row {
+	display: flex;
+	align-items: baseline;
+	gap: 12rpx;
+	margin-top: 8rpx;
+}
+.unit{
+	font-weight: 600;
+	font-size: 28rpx;
+	color: #FF233C;
+}
+.price {
+	font-size: 44rpx;
+	font-weight: 600;
+	color: #FF233C;
+}
+.ot-price {
+	font-size: 28rpx;
+	color: #999;
+	text-decoration: line-through;
+}
+.meta-row {
+	display: flex;
+	align-items: center;
+	gap: 8rpx;
+	margin-top: 8rpx;
+	font-size: 28rpx;
+	color: #999;
+}
+// .sales,
+// .good-rate {
+// 	font-size: 28rpx;
+// 	color: #999;
+// }
+.sales{
+	// border-right: 1rpx solid #e5e5e5; /* 右侧竖线 */
+	// padding-right: 14rpx; /* 竖线与文字的间距 */
+}
+</style>

+ 67 - 0
pages_company/managerOrder/components/GoodsList.vue

@@ -0,0 +1,67 @@
+<template>
+	<view class="goods-list">
+		<view class="list-column" v-if="list && list.length > 0">
+			<view class="list-item" v-for="(item, index) in list" :key="item.productId">
+				<GoodsCard :item="item" :show-price="showPrice" @click="$emit('itemClick', item)" />
+			</view>
+		</view>
+		<view class="empty" v-else-if="!loading">
+			<text class="empty-text">暂无商品</text>
+		</view>
+		<view class="loading" v-if="loading">
+			<text class="loading-text">加载中...</text>
+		</view>
+		<view class="load-more" v-if="hasMore && !loading && list.length > 0" @click="$emit('loadMore')">
+			<text>加载更多</text>
+		</view>
+	</view>
+</template>
+
+<script>
+import GoodsCard from './GoodsCard.vue';
+export default {
+	name: 'GoodsList',
+	components: { GoodsCard },
+	props: {
+		list: { type: Array, default: () => [] },
+		loading: { type: Boolean, default: false },
+		hasMore: { type: Boolean, default: true },
+		showPrice: { type: Boolean, default: true }
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.goods-list {
+	padding: 24rpx;
+	background: #f5f5f5;
+	min-height: 400rpx;
+	padding-bottom: 120rpx;
+}
+.list-column {
+	display: flex;
+	flex-direction: column;
+	gap: 24rpx;
+}
+.list-item {
+	width: 100%;
+}
+.empty,
+.loading {
+	padding: 80rpx 0;
+	text-align: center;
+}
+.empty-text,
+.loading-text {
+	font-size: 28rpx;
+	color: #999;
+}
+.load-more {
+	padding: 32rpx 0;
+	text-align: center;
+}
+.load-more text {
+	font-size: 28rpx;
+	color: #FF233C;
+}
+</style>

+ 121 - 0
pages_company/managerOrder/components/SearchBar.vue

@@ -0,0 +1,121 @@
+<template>
+	<view class="search-bar" :style="{ background:`url(${bgColor})` }">
+		<view class="status_bar" :style="{ height: statusBarHeight + 'px' }"></view>
+		<!-- <view class="top-title">
+			<view class="name">{{ title }}</view>
+		</view> -->
+		<view class="func-cont" :style="{marginTop: marginTop}">
+			<view class="search-cont" :style="{ width: searchWidth }" @click="$emit('searchClick')">
+				<image class="icon-search" :src="searchIcon" mode=""></image>
+				<input type="text" :value="keyword" :placeholder="placeholder" placeholder-class="placeholder"
+					disabled />
+			</view>
+			<!-- <uni-badge size="small" :text="cartCount" absolute="rightTop" type="error" v-show="cartCount > 0">
+				<view class="img-item" @click="$emit('cartClick')">
+					<image :src="cartIcon" mode=""></image>
+				</view>
+			</uni-badge>
+			<view class="img-item" v-show="cartCount <= 0" @click="$emit('cartClick')">
+				<image :src="cartIcon" mode=""></image>
+			</view>
+			<view class="img-item" style="position: relative;">
+				<image :src="serviceIcon" mode=""></image>
+				<button class="contact-btn" open-type="contact"></button>
+			</view> -->
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	name: 'SearchBar',
+	props: {
+		title: { type: String, default: '岚财良品' },
+		keyword: { type: String, default: '' },
+		placeholder: { type: String, default: '请输入产品名称' },
+		bgColor: { type: String, default: 'rgba(43,199,185, 0)' },
+		statusBarHeight: { type: Number, default: 20 },
+		cartCount: { type: Number, default: 0 },
+		searchWidth: { type: String, default: '' },
+		marginTop:{ type: String, default: '' },
+		searchIcon: {
+			type: String,
+			// default: 'https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/search.png',
+			default: '/static/images/search.png'
+		},
+		cartIcon: {
+			type: String,
+			default: 'https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/cart_wihte.png'
+		},
+		serviceIcon: {
+			type: String,
+			default: 'https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/customer.png'
+		}
+	}
+};
+</script>
+<style lang="stylus">
+	.placeholder{
+		color: rgba(0,0,0,0.25) !important;
+	}
+</style>
+<style lang="scss" scoped>
+.search-bar {
+	position: fixed;
+	top: 0;
+	left: 0;
+	right: 0;
+	z-index: 10000;
+}
+.top-title .name {
+	font-size: 36rpx;
+	font-weight: bold;
+	color: #fff;
+	padding: 20rpx 0;
+}
+.func-cont {
+	display: flex;
+	align-items: center;
+	padding: 0 24rpx 20rpx;
+}
+.search-cont {
+	display: flex;
+	align-items: center;
+	height: 64rpx;
+	background: rgba(255,255,255,0.5);
+	border-radius: 38rpx;
+	padding: 0 24rpx;
+	// flex: 1;
+	margin-right: 20rpx;
+}
+.icon-search {
+	width: 44rpx;
+	height: 44rpx;
+	margin-right: 16rpx;
+}
+.search-cont input {
+	flex: 1;
+	font-family: PingFangSC, PingFang SC;
+	font-weight: 400;
+	font-size: 32rpx;
+	color: rgba(0,0,0,0.25);
+	line-height: 44rpx;
+}
+.img-item {
+	width: 48rpx;
+	height: 48rpx;
+	margin-left: 24rpx;
+}
+.img-item image {
+	width: 100%;
+	height: 100%;
+}
+.contact-btn {
+	position: absolute;
+	top: 0;
+	left: 0;
+	width: 100%;
+	height: 100%;
+	opacity: 0;
+}
+</style>

+ 446 - 0
pages_company/managerOrder/confirmCompanyOrder.vue

@@ -0,0 +1,446 @@
+<template>
+	<view>
+		<view class="inner-box">
+			<!-- 产品列表 -->
+			<view class="goods-list">
+				<view v-for="(item,index) in carts" :key="index" class="item" @click="showDetail(item)">
+					<view class="img-box">
+						<image :src="item.productImage" mode="aspectFill"></image>
+					</view>
+					<view class="info-box">
+						<view>
+							<view class="name-box ellipsis2">
+								<!-- <view class="tag">{{utils.getDictLabelName("storeProductType",item.productType)}}</view> -->
+								{{item.productName}}
+							</view>
+							<view class="spec ellipsis2">{{item.productAttrName}}</view>
+						</view>
+						<view class="price-num">
+							<view class="price">
+								<text class="unit">¥</text>
+								<text class="num">{{item.price.toFixed(2)}}</text>
+							</view>
+							<view class="num">x{{item.cartNum}}</view>
+						</view>
+					</view>
+				</view>
+				<!-- 小计 -->
+				<view class="sub-total">
+					<text class="label">合计金额:</text>
+					<view class="price">
+						<text class="unit">¥</text>
+						<text class="num">{{price.payPrice.toFixed(2)}}</text>
+					</view>
+				</view>
+			</view>
+			 
+		</view>
+		<!-- 底部按钮 -->
+		<view class="btn-foot">
+			<view class="right">
+				<view class="total" >
+					<text class="label">总金额:</text>
+					<view class="price">
+						<text class="unit">¥</text>
+						<text class="num">{{price.totalPrice.toFixed(2)}}</text>
+					</view>
+				</view>
+				<view class="btn" @click="openUpdateMoney()" >
+					实收金额
+				</view>
+				<view class="btn"  >
+					分享
+					<button  class="share" data-name="shareBtn" open-type="share">分享</button>
+				</view>
+			</view>
+		</view>
+		<modal v-if="inputShow" title="实收金额" confirm-text="保存" cancel-text="取消" @cancel="cancelUpdateMoney" @confirm="confirmUpdateMoney">
+			<input type="text" v-model="inputTxt" placeholder="请输入实收金额" class="intxt" maxlength="8" />
+			<!-- <input type="text" v-model="payAmount" placeholder="请输入货到付款金额" class="intxt pay_type" maxlength="8" /> -->
+		</modal>
+	</view>
+</template>
+
+<script>
+	import {getSalesOrder,addUserCart,updateSalseOrderMoney} from '@/api/companyOrder.js'
+	export default {
+		data() {
+			return {
+				inputShow:false,
+				inputTxt:null,
+				orderKey:null,
+				price:{
+					payPrice:0.00,
+					totalPrice:0.00,
+				},
+				carts:[],
+				isAgreement:false,
+				payAmount:null
+			}
+		},
+		onLoad(option) {
+			this.orderKey=option.orderKey;
+			this.getSalesOrder();
+			 
+		},
+		//发送给朋友
+		onShareAppMessage(res) {
+			return {
+				title: "岚财良品-您的专属解决方案",
+				path: '/pages_company/order/confirmOrder?orderKey='+this.orderKey,
+				imageUrl: 'https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/app/vip/share.png' //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
+			}
+			
+		},
+		//分享到朋友圈
+		onShareTimeline(res) {
+			return {
+				title:"岚财良品-您的专属解决方案",
+				query:'orderKey='+this.orderKey,
+				imageUrl:  'https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/app/vip/share.png' //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
+			}
+		},
+		methods: {
+			handleAgreement(){
+				this.isAgreement=!this.isAgreement
+			},
+			openUpdateMoney(){
+				console.log(1)
+				this.inputShow = true
+			},
+			cancelUpdateMoney(){
+				this.inputShow = false
+			},
+			confirmUpdateMoney(){
+				console.log(parseFloat(this.inputTxt) )
+				console.log(parseFloat(this.payAmount) )
+				if(parseFloat(this.inputTxt)>0||parseFloat(this.payAmount)>0){
+					var that=this;
+					if(this.inputTxt==0){
+						this.inputTxt=this.price.totalPrice.toFixed(2)
+					}
+					// ,payAmount:this.payAmount
+					var data={createOrderKey:this.orderKey,token:uni.getStorageSync('CompanyUserToken'),money:this.inputTxt}
+					updateSalseOrderMoney(data).then(
+						res => {
+							if(res.code==200){
+								this.inputShow = false
+								this.getSalesOrder();
+							}else{
+								uni.showToast({
+									icon:'none',
+									title: res.msg,
+								});
+							}
+						},
+						rej => {}
+					);
+					
+				}
+				else{
+					uni.showToast({
+						icon:'none',
+						title: "必须其中一个金额大于0",
+					});
+				}
+			},
+			showDetail(item) {
+				uni.navigateTo({
+					url: 'productDetails?productId='+item.productId
+				})
+			},
+			getSalesOrder(){
+				
+				var that=this;
+				that.price.payPrice=0;
+				that.price.totalPrice=0;
+				var data={createOrderKey:this.orderKey}
+				getSalesOrder(data).then(
+					res => {
+						if(res.code==200){
+							this.carts=res.carts;
+							this.carts.forEach(function(element) {
+								that.price.payPrice+=element.price*element.cartNum;
+							});
+							that.price.totalPrice=res.totalMoney
+							 
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: res.msg,
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+			 
+		}
+	}
+</script>
+
+<style lang="scss">
+	.pay_type{
+		margin-top: 20rpx;
+	}
+	.inner-box{
+		padding: 20upx 20upx 140upx;
+		 
+		.goods-list{
+			margin-top: 20upx;
+			padding: 0 30upx;
+			background-color: #FFFFFF;
+			border-radius: 16upx;
+			.item{
+				padding: 30upx 0;
+				border-bottom: 1px solid #EDEEEF;
+				display: flex;
+				align-items: center;
+				.img-box{
+					width: 160upx;
+					height: 160upx;
+					margin-right: 30upx;
+					image{
+						width: 100%;
+						height: 100%;
+					}
+				}
+				.info-box{
+					width: calc(100% - 190upx);
+					height: 160upx;
+					display: flex;
+					flex-direction: column;
+					justify-content: space-between;
+					.name-box{
+						font-size: 28upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #111111;
+						line-height: 40upx;
+						.tag{
+							display: inline-block;
+							padding: 0 6upx;
+							height: 30upx;
+							background: linear-gradient(90deg, #66b2ef 0%, #FF233C 100%);
+							border-radius: 4upx;
+							margin-right: 10upx;
+							font-size: 22upx;
+							font-family: PingFang SC;
+							font-weight: bold;
+							color: #FFFFFF;
+							line-height: 30upx;
+							float: left;
+							margin-top: 7upx;
+						}
+					}
+					.spec{
+						margin-top: 10upx;
+						font-size: 24upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #999999;
+						line-height: 1;
+					}
+					.price-num{
+						display: flex;
+						align-items: center;
+						justify-content: space-between;
+						.price{
+							display: flex;
+							align-items: flex-end;
+							.unit{
+								font-size: 24upx;
+								font-family: PingFang SC;
+								font-weight: 500;
+								color: #111111;
+								line-height: 1.2;
+								margin-right: 4upx;
+							}
+							.num{
+								font-size: 32upx;
+								font-family: PingFang SC;
+								font-weight: 500;
+								color: #111111;
+								line-height: 1;
+							}
+						}
+						.num{
+							font-size: 24upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #999999;
+							line-height: 1;
+						}
+					}
+				}
+			}
+			.sub-total{
+				height: 88upx;
+				display: flex;
+				align-items: center;
+				justify-content: flex-end;
+				.label{
+					font-size: 24upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #999999;
+				}
+				.price{
+					display: flex;
+					align-items: flex-end;
+					.unit{
+						font-size: 24upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #FF6633;
+						line-height: 1.2;
+						margin-right: 4upx;
+					}
+					.num{
+						font-size: 32upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #FF6633;
+						line-height: 1;
+					}
+				}
+			}
+		}
+		.points{
+			height: 88upx;
+			padding: 0 30upx;
+			background: #FFFFFF;
+			border-radius: 16upx;
+			 
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			.left{
+				display: flex;
+				align-items: center;
+				image{
+					width: 28upx;
+					height: 28upx;
+					margin-right: 20upx;
+				}
+				.text{
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #666666;
+				}
+			}
+			.right{
+				display: flex;
+				align-items: center;
+				.text{
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #111111;
+					 
+				}
+				image{
+					margin-left: 15upx;
+					width: 14upx;
+					height: 24upx;
+				}
+			}
+		}
+		.remarks{
+			height: 88upx;
+			padding: 0 30upx;
+			background: #FFFFFF;
+			border-radius: 16upx;
+			margin-top: 20upx;
+			display: flex;
+			align-items: center;
+			input{
+				width: 100%;
+				font-size: 28upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #000000;
+			}
+			.input{
+				font-size: 28upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #999999;
+			}
+		}
+	}
+	.btn-foot{
+		box-sizing: border-box;
+		width: 100%;
+		height: 121upx;
+		background: #FFFFFF;
+		padding: 16upx 30upx;
+		display: flex;
+		align-items: center;
+		justify-content: flex-end;
+		position: fixed;
+		left: 0;
+		bottom: 0;
+		z-index: 99;
+		.right{
+			display: flex;
+			align-items: center;
+			.total{
+				display: flex;
+				align-items: flex-end;
+				margin-right: 15upx;
+				.label{
+					font-size: 26upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #999999;
+					line-height: 1.5;
+				}
+				.price{
+					display: flex;
+					align-items: flex-end;
+					.unit{
+						font-size: 28upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #FF6633;
+						line-height: 1.2;
+						margin-right: 10upx;
+					}
+					.num{
+						font-size: 32upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #FF6633;
+						line-height: 1;
+					}
+				}
+			}
+			.btn{
+				margin-left: 10rpx;
+				width: 180upx;
+				height: 88upx;
+				line-height: 88upx;
+				text-align: center;
+				font-size: 30upx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #FFFFFF;
+				background: #FF233C;
+				border-radius: 44upx;
+				position: relative;
+				.share{
+					display: inline-block;
+					position: absolute;
+					top: 0;
+					left: 0;
+					width: 100%;
+					height: 100%rpx;
+					opacity: 0;
+				}
+			}
+		}
+	}
+</style>
+ 

+ 893 - 0
pages_company/managerOrder/confirmOrder.vue

@@ -0,0 +1,893 @@
+<template>
+	<view>
+		<view class="inner-box">
+			<!-- 收货人 -->
+			<view class="address-box" v-if="address==null" @click="openAddress()">
+				<view class="left">
+					<view class="name-box">
+						<text class="text name">添加收货地址</text>
+					</view>
+					</vie>
+				</view>
+				<view class="arrow-box">
+					<image src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/arrow_gray.png"
+						mode=""></image>
+				</view>
+			</view>
+			<view class="address-box" v-if="address!=null" @click="openAddress()">
+				<view class="left">
+					<view class="name-box">
+						<text class="text name">{{address.realName}}</text>
+						<text class="text" v-if="address.phone!=null">{{utils.parsePhone(address.phone)}}</text>
+					</view>
+					<view class="address">
+						{{address.province}}{{address.city}}{{address.district}}{{address.detail}}
+					</view>
+				</view>
+				<view class="arrow-box">
+					<image src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/arrow_gray.png"
+						mode=""></image>
+				</view>
+			</view>
+			<!-- 产品列表 -->
+			<view class="goods-list">
+				<view v-for="(item,index) in carts" :key="index" class="item">
+					<view class="img-box">
+						<image :src="item.productAttrImage||item.productImage" mode="aspectFill"></image>
+					</view>
+					<view class="info-box">
+						<view>
+							<view class="name-box ellipsis2">
+								<!-- <view class="tag">{{utils.getDictLabelName("storeProductType",item.productType)}}</view> -->
+								{{item.productName}}
+							</view>
+							<view class="spec ellipsis2">{{item.productAttrName}}</view>
+						</view>
+						<view class="price-num">
+							<view class="price">
+								<text class="unit">¥</text>
+								<text class="num">{{item.price.toFixed(2)}}</text>
+							</view>
+							<view class="num">x{{item.cartNum}}</view>
+						</view>
+					</view>
+				</view>
+				<!-- 小计 -->
+				<view class="sub-total">
+					<text class="label">小计:</text>
+					<view class="price">
+						<text class="unit">¥</text>
+						<text class="num">{{price.totalPrice.toFixed(2)}}</text>
+					</view>
+				</view>
+			</view>
+			<!-- 积分 -->
+			<view class="points">
+				<view class="left">
+					<image src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/points.png" mode="">
+					</image>
+					<text class="text">可用积分</text>
+				</view>
+				<view class="right">
+					<text class="text">{{price.usedIntegral}}积分</text>
+					<evan-switch @change="integralChange" v-model="checked" activeColor="#FF233C"
+						inactiveColor="rgba(0, 0, 0, 0.1)"></evan-switch>
+				</view>
+			</view>
+			<view class="points" @click="openCoupon()">
+				<view class="left">
+					<text class="text">优惠券</text>
+				</view>
+				<view class="right">
+					<text class="text">{{couponText}}</text>
+					<image src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/arrow4.png" mode="">
+					</image>
+				</view>
+			</view>
+			<view class="points">
+				<view class="left">
+					<text class="text">运费</text>
+				</view>
+				<view class="right">
+					<text
+						class="text">{{price.payPostage==null||price.payPostage==0?'免运费':price.payPostage.toFixed(2)}}</text>
+				</view>
+			</view>
+			<!-- 备注 -->
+			<view class="remarks">
+				<input type="text" v-model="form.mark" placeholder="备注留言(选填)" placeholder-class="input" />
+			</view>
+		</view>
+		<!-- 底部按钮 -->
+		<view class="btn-foot">
+			<view class="right">
+				<view class="total">
+					<text class="label">合计:</text>
+					<view class="price">
+						<text class="unit">¥</text>
+						<text class="num">{{price.payPrice.toFixed(2)}}</text>
+					</view>
+				</view>
+				<view class="btn" @click="submitOrder">提交订单</view>
+			</view>
+		</view>
+		<popupBottom ref="popup" :visible.sync="couponVisible" title=" " bgColor="#f5f5f5" radius="30" maxHeight="60%">
+			<view class="coupon" style="height:650rpx;">
+				<div class="coupon-list" v-if="couponsList.length > 0">
+					<div class="item acea-row row-center-wrapper" v-for="(item, index) in couponsList" :key="index">
+						<div class="money">
+							<image v-if="item.status==0" class="img"
+								src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/coupon1.png"
+								mode="widthFix"></image>
+							<image v-if="item.status!=0" class="img"
+								src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/coupon2.png"
+								mode="widthFix"></image>
+							<div style="z-index: 999;">
+								¥<span class="num">{{ item.couponPrice }}</span>
+							</div>
+							<div class="pic-num">满{{ item.useMinPrice }}元可用</div>
+						</div>
+						<div class="text">
+							<div class="condition line1">
+								{{ item.couponTitle }}
+							</div>
+							<div class="data acea-row row-between-wrapper">
+								<div>{{ item.limitTime }}到期</div>
+								<div class="bnt bg-color-red" @click="couponSelect(item)">选择</div>
+							</div>
+						</div>
+					</div>
+				</div>
+				<view v-if="couponsList.length == 0" class="no-data-box">
+					<image src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/no_data.png"
+						mode="aspectFit"></image>
+					<view class="empty-title">暂无数据</view>
+				</view>
+			</view>
+
+		</popupBottom>
+	</view>
+</template>
+
+<script>
+	import {
+		getWeixinOrderTemps
+	} from '@/api/common'
+
+	import {
+		confirm,
+		computed,
+		create
+	} from '@/api/storeOrder'
+	import {
+		getMyEnableCouponList
+	} from '@/api/coupon'
+
+	import EvanSwitch from '@/components/evan-switch/evan-switch.vue'
+	import popupBottom from '@/components/px-popup-bottom/px-popup-bottom.vue'
+
+	export default {
+		components: {
+			EvanSwitch,
+			popupBottom
+		},
+		data() {
+			return {
+				temps: [],
+				couponUserId: null,
+				couponText: "请选择",
+				couponsList: [],
+				couponVisible: false,
+				price: {
+					payPrice: 0,
+					totalPostage: 0,
+					usedIntegral: 0,
+					totalPrice: 0.00,
+				},
+				address: null,
+				carts: [],
+				checked: false,
+				type: null,
+				cartIds: null,
+				storeId: null,
+				form: {
+					useIntegral: 0,
+					orderKey: null,
+					addressId: null,
+					mark: null,
+					companyId: null,
+					companyUserId: null
+				},
+				courseId:null
+
+			}
+		},
+		onLoad(option) {
+			console.log("确认订单option是", option)
+			this.form.companyId = option.companyId;
+			this.form.companyUserId = option.companyUserId;
+			this.cartIds = option.cartIds;
+			this.type = option.type;
+			this.storeId = option.storeId;
+			this.courseId = option.courseId
+			this.confirm();
+			uni.$on('updateAddress', (e) => {
+				this.address = e;
+				this.form.addressId = e.id;
+				this.computed();
+			})
+			this.getWeixinOrderTemps();
+		},
+		onUnload() {
+			uni.$off('updateAddress')
+		},
+		methods: {
+			getWeixinOrderTemps: function() {
+				getWeixinOrderTemps().then(
+					res => {
+						if (res.code == 200) {
+							this.temps = res.temp
+							console.log(this.temps)
+						} else {
+
+						}
+					},
+					rej => {}
+				);
+			},
+			couponSelect(item) {
+				this.couponText = "-¥" + item.couponPrice.toFixed(2);
+				this.couponUserId = item.id;
+				this.couponVisible = false;
+				this.computed();
+			},
+			openCoupon() {
+				let that = this;
+				var data = {
+					couponType: 0,
+					useMinPrice: this.price.payPrice
+				};
+				getMyEnableCouponList(data).then(res => {
+					this.couponVisible = true;
+					that.couponsList = res.data
+				})
+			},
+			integralChange(e) {
+				console.log(e)
+				this.form.useIntegral = e ? 1 : 0
+				this.computed()
+			},
+			confirm(item) {
+				let data = {
+					type: this.type,
+					cartIds: this.cartIds
+				};
+				confirm(data).then(
+					res => {
+						if (res.code == 200) {
+
+							this.carts = res.carts;
+							this.form.orderKey = res.orderKey;
+							if (res.address != null) {
+								this.form.addressId = res.address.id;
+								this.address = res.address;
+								console.log(this.form.addreddId)
+							}
+							this.computed()
+						} else {
+
+							uni.showToast({
+								icon: 'none',
+								title: res.msg,
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+			computed(item) {
+				let data = {
+					couponUserId: this.couponUserId,
+					orderKey: this.form.orderKey,
+					addressId: this.form.addressId,
+					useIntegral: this.form.useIntegral
+				};
+				computed(data).then(
+					res => {
+						if (res.code == 200) {
+							console.log(res)
+							this.price = res.data
+
+						} else {
+							if (res.code == 501) {
+								uni.showToast({
+									icon: 'none',
+									title: res.msg,
+								});
+								setTimeout(function() {
+									uni.navigateBack({
+										delta: 1
+									})
+								}, 500);
+								return;
+							} else {
+								uni.showToast({
+									icon: 'none',
+									title: res.msg,
+								});
+							}
+
+						}
+					},
+					rej => {}
+				);
+			},
+			// 提交订单
+			submitOrder() {
+				var that = this;
+				if (this.form.orderKey == null) {
+					uni.showToast({
+						icon: 'none',
+						title: '订单KEY不存在',
+					});
+					return;
+				}
+				if (this.form.addressId == null) {
+					uni.showToast({
+						icon: 'none',
+						title: '收货地址不能为空',
+					});
+					return;
+				}
+
+				uni.requestSubscribeMessage({
+					tmplIds: this.temps,
+					success(res) {
+						that.createOrder();
+					},
+					fail(res) {
+						that.createOrder();
+					}
+				})
+
+			},
+			createOrder() {
+				var that = this;
+				var data = null;
+				var tuiUserId = uni.getStorageSync('tuiUserId');
+				uni.showLoading({
+					title: '正在处理中...'
+				});
+				if (tuiUserId != null && tuiUserId != undefined && tuiUserId > 0) {
+					data = {
+						orderCreateType: 1,
+						tuiUserId: tuiUserId,
+						companyId: this.form.companyId,
+						companyUserId: this.form.companyUserId,
+						couponUserId: this.couponUserId,
+						mark: this.form.mark,
+						orderKey: this.form.orderKey,
+						addressId: this.form.addressId,
+						useIntegral: this.form.useIntegral,
+						payType: 1
+					};
+				} else {
+					data = {
+						orderCreateType: 1,
+						companyId: this.form.companyId,
+						companyUserId: this.form.companyUserId,
+						couponUserId: this.couponUserId,
+						mark: this.form.mark,
+						orderKey: this.form.orderKey,
+						addressId: this.form.addressId,
+						useIntegral: this.form.useIntegral,
+						payType: 1
+					};
+				}
+				if (this.storeId != null && this.storeId > 0) {
+					data.storeId = this.storeId;
+				}
+				var urlInfo = uni.getStorageSync('urlInfo')
+				console.log('this.isCourse',this.courseId)
+				if(this.courseId!=null && this.courseId > 0){
+					data.courseId=urlInfo.courseId
+					data.videoId=urlInfo.videoId
+					data.periodId = urlInfo.periodId
+					data.projectId = urlInfo.projectId
+					data.companyUserId=urlInfo.companyUserId
+					data.companyId=urlInfo.companyId
+					data.orderType=3
+				}
+				uni.hideLoading()
+				create(data).then(
+					res => {
+						uni.hideLoading()
+						if (res.code == 200) {
+							uni.hideLoading()
+							if (res.order.isPrescribe == 1) {
+								setTimeout(function() {
+									uni.redirectTo({
+										url: "prescribe?orderId=" + res.order.id
+									})
+								}, 200);
+							} else {
+								// try {
+								// 	const urlInfo = uni.getStorageSync('urlInfo') || {};
+								// 	if (urlInfo.videoId) {
+								// 		uni.setStorageSync('videovip_myPurchase_' + urlInfo.videoId, {
+								// 			ts: Date.now()
+								// 		});
+								// 	}
+								// } catch (e) {}
+								setTimeout(function() {
+									uni.redirectTo({
+										url: './paymentOrder?orderId=' + res.order.id
+									})
+								}, 200);
+							}
+							return;
+						} else {
+							if (res.code == 501) {
+								uni.showToast({
+									icon: 'none',
+									title: res.msg,
+								});
+								setTimeout(function() {
+									uni.navigateBack({
+										delta: 1
+									})
+								}, 200);
+								return;
+							} else {
+								uni.showToast({
+									icon: 'none',
+									title: res.msg,
+								});
+							}
+						}
+					},
+					rej => {}
+				);
+			},
+			openAddress() {
+				uni.navigateTo({
+					url: '/pages_user/user/address'
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.inner-box {
+		padding: 20upx 20upx 140upx;
+
+		.address-box {
+			box-sizing: border-box;
+			min-height: 171upx;
+			background: #FFFFFF;
+			border-radius: 16upx;
+			background-image: url("https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/address_bg.png");
+			background-repeat: no-repeat;
+			background-size: 100% 30upx;
+			background-position: left bottom;
+			padding: 38upx 30upx 36upx;
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+
+			.left {
+				width: 92%;
+
+				.name-box {
+					display: flex;
+					align-items: center;
+
+					.text {
+						font-size: 32upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #111111;
+						line-height: 1;
+
+						&.name {
+							margin-right: 30upx;
+						}
+					}
+				}
+
+				.address {
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #666666;
+					line-height: 42upx;
+					text-align: left;
+					margin-top: 23upx;
+				}
+			}
+
+			.arrow-box {
+				width: 12upx;
+				height: 23upx;
+				display: flex;
+				align-items: cenetr;
+				justify-content: cenetr;
+
+				image {
+					width: 100%;
+					height: 100%;
+				}
+			}
+		}
+
+		.goods-list {
+			margin-top: 20upx;
+			padding: 0 30upx;
+			background-color: #FFFFFF;
+			border-radius: 16upx;
+
+			.item {
+				padding: 30upx 0;
+				border-bottom: 1px solid #EDEEEF;
+				display: flex;
+				align-items: center;
+
+				.img-box {
+					width: 160upx;
+					height: 160upx;
+					margin-right: 30upx;
+
+					image {
+						width: 100%;
+						height: 100%;
+					}
+				}
+
+				.info-box {
+					width: calc(100% - 190upx);
+					height: 160upx;
+					display: flex;
+					flex-direction: column;
+					justify-content: space-between;
+
+					.name-box {
+						font-size: 28upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #111111;
+						line-height: 40upx;
+
+						.tag {
+							display: inline-block;
+							padding: 0 6upx;
+							height: 30upx;
+							background: linear-gradient(90deg, #66b2ef 0%, #FF233C 100%);
+							border-radius: 4upx;
+							margin-right: 10upx;
+							font-size: 22upx;
+							font-family: PingFang SC;
+							font-weight: bold;
+							color: #FFFFFF;
+							line-height: 30upx;
+							float: left;
+							margin-top: 7upx;
+						}
+					}
+
+					.spec {
+						margin-top: 10upx;
+						font-size: 24upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #999999;
+						line-height: 1;
+					}
+
+					.price-num {
+						display: flex;
+						align-items: center;
+						justify-content: space-between;
+
+						.price {
+							display: flex;
+							align-items: flex-end;
+
+							.unit {
+								font-size: 24upx;
+								font-family: PingFang SC;
+								font-weight: 500;
+								color: #111111;
+								line-height: 1.2;
+								margin-right: 4upx;
+							}
+
+							.num {
+								font-size: 32upx;
+								font-family: PingFang SC;
+								font-weight: 500;
+								color: #111111;
+								line-height: 1;
+							}
+						}
+
+						.num {
+							font-size: 24upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #999999;
+							line-height: 1;
+						}
+					}
+				}
+			}
+
+			.sub-total {
+				height: 88upx;
+				display: flex;
+				align-items: center;
+				justify-content: flex-end;
+
+				.label {
+					font-size: 24upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #999999;
+				}
+
+				.price {
+					display: flex;
+					align-items: flex-end;
+
+					.unit {
+						font-size: 24upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #FF6633;
+						line-height: 1.2;
+						margin-right: 4upx;
+					}
+
+					.num {
+						font-size: 32upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #FF6633;
+						line-height: 1;
+					}
+				}
+			}
+		}
+
+		.points {
+			height: 88upx;
+			padding: 0 30upx;
+			background: #FFFFFF;
+			border-radius: 16upx;
+
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+
+			.left {
+				display: flex;
+				align-items: center;
+
+				image {
+					width: 28upx;
+					height: 28upx;
+					margin-right: 20upx;
+				}
+
+				.text {
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #666666;
+				}
+			}
+
+			.right {
+				display: flex;
+				align-items: center;
+
+				.text {
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #111111;
+
+				}
+
+				image {
+					margin-left: 15upx;
+					width: 14upx;
+					height: 24upx;
+				}
+			}
+		}
+
+		.remarks {
+			height: 88upx;
+			padding: 0 30upx;
+			background: #FFFFFF;
+			border-radius: 16upx;
+			margin-top: 20upx;
+			display: flex;
+			align-items: center;
+
+			input {
+				width: 100%;
+				font-size: 28upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #000000;
+			}
+
+			.input {
+				font-size: 28upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #999999;
+			}
+		}
+	}
+
+
+	.btn-foot {
+		box-sizing: border-box;
+		width: 100%;
+		height: 121upx;
+		background: #FFFFFF;
+		padding: 16upx 30upx 16upx 60upx;
+		display: flex;
+		align-items: center;
+		justify-content: flex-end;
+		position: fixed;
+		left: 0;
+		bottom: 0;
+		z-index: 99;
+
+		.right {
+			display: flex;
+			align-items: center;
+
+			.total {
+				display: flex;
+				align-items: flex-end;
+				margin-right: 36upx;
+
+				.label {
+					font-size: 26upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #999999;
+					line-height: 1.5;
+				}
+
+				.price {
+					display: flex;
+					align-items: flex-end;
+
+					.unit {
+						font-size: 32upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #FF6633;
+						line-height: 1.2;
+						margin-right: 10upx;
+					}
+
+					.num {
+						font-size: 50upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #FF6633;
+						line-height: 1;
+					}
+				}
+			}
+
+			.btn {
+				width: 200upx;
+				height: 88upx;
+				line-height: 88upx;
+				text-align: center;
+				font-size: 30upx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #FFFFFF;
+				background: #FF233C;
+				border-radius: 44upx;
+			}
+		}
+	}
+</style>
+<style lang="less" scoped>
+	.coupon {
+		height: 100%;
+	}
+
+	/*优惠券列表公共*/
+	.coupon-list {}
+
+	.coupon-list .item {
+		display: flex;
+		flex-direction: column;
+		justify-content: center;
+		align-items: center;
+		width: 100%;
+		height: 1.7 * 100rpx;
+		margin-bottom: 0.16 * 100rpx;
+	}
+
+	.coupon-list .item .money {
+		background-size: 100% 100%;
+		width: 2.4 * 100rpx;
+		height: 100%;
+		color: #fff;
+		font-size: 0.36 * 100rpx;
+		font-weight: bold;
+		text-align: center;
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		justify-content: center;
+		position: relative;
+
+	}
+
+	.coupon-list .item .money .img {
+		position: absolute;
+		width: 2.4 * 100rpx;
+		height: 100%;
+		color: #fff;
+
+	}
+
+	.coupon-list .item .money .num {
+		font-size: 0.6 * 100rpx;
+	}
+
+	.coupon-list .item .money .pic-num {
+		font-size: 20rpx;
+		z-index: 99;
+	}
+
+
+	.coupon-list .item .text {
+		width: 4.5 * 100rpx;
+		padding: 0 0.17 * 100rpx 0 0.24 * 100rpx;
+		background-color: #fff;
+		box-sizing: border-box;
+	}
+
+	.coupon-list .item .text .condition {
+		font-size: 0.3 * 100rpx;
+		color: #282828;
+		height: 0.93 * 100rpx;
+		line-height: 0.93 * 100rpx;
+		border-bottom: 1px solid #f0f0f0;
+	}
+
+	.coupon-list .item .text .data {
+		font-size: 0.2 * 100rpx;
+		color: #999;
+		height: 0.76 * 100rpx;
+	}
+
+	.coupon-list .item .text .data .bnt {
+		width: 1.36 * 100rpx;
+		height: 0.44 * 100rpx;
+		border-radius: 0.22 * 100rpx;
+		font-size: 0.22 * 100rpx;
+		color: #fff;
+		text-align: center;
+		line-height: 0.44 * 100rpx;
+		background-color: red;
+	}
+
+	.coupon-list .item .text .data .bnt.gray {
+		background-color: #ccc;
+	}
+</style>

+ 351 - 0
pages_company/managerOrder/coupon.vue

@@ -0,0 +1,351 @@
+<template>
+  <view ref="container">
+    <view class="tui-coupon-list">
+      <view class="tui-coupon-item tui-top20" v-for="(item, index) in couponsList" :key="index">
+         <image src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/bg_coupon_3x.png" class="tui-coupon-bg" mode="widthFix"></image>
+		<view class="tui-coupon-item-left">
+          <view class="tui-coupon-price-box" :class="{ 'tui-color-grey': item.receiveCount>0 }">
+            <view class="tui-coupon-price-sign">¥</view>
+            <view class="tui-coupon-price" :class="{ 'tui-price-small': false }">{{ item.couponPrice }}</view>
+          </view>
+          <view class="tui-coupon-intro">满{{ item.useMinPrice }}元可用</view>
+        </view>
+        <view class="tui-coupon-item-right">
+          <view class="tui-coupon-content">
+            <view class="tui-coupon-title-box">
+              <view class="tui-coupon-title">{{ item.couponName }}</view>
+            </view>
+            <view class="tui-coupon-rule">
+              <view class="tui-rule-box tui-padding-btm">
+                <view class="tui-coupon-circle"></view>
+                <view class="tui-coupon-text">不可叠加使用</view>
+              </view>
+              <view class="tui-rule-box">
+                <view class="tui-coupon-circle"></view>
+                <view class="tui-coupon-text">{{ item.limitTime }} 到期</view>
+            
+              </view>
+            </view>
+          </view>
+        </view>
+        <view class="tui-btn-box">
+			<view class="btn receive"   @click="show(item)">查看</view>
+        </view>
+      </view>
+    </view>
+	<Loading :loaded="loadend" :loading="loading"></Loading>
+	<!--暂无优惠券-->
+	<view v-if="couponsList.length == 0 && page > 1" class="no-data-box" >
+		<image src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/no_data.png" mode="aspectFit"></image>
+		<view class="empty-title">暂无数据</view>
+	</view>
+  </view>
+</template>
+<script>
+import { getCompanyCouponIssueList, receive } from '@/api/coupon'
+import Loading from '@/components/Loading'
+export default {
+  name: 'getCoupon',
+  components: {
+    Loading,
+  },
+  props: {},
+  data: function() {
+    return {
+	limit: 10,
+		couponsList: [],
+		loading: false,
+		loadend: false,
+		page: 1,
+		limit: 10,
+    }
+  },
+  onLoad(options) {
+  },
+  mounted: function() {
+    
+  },
+  onShow() {
+  	this.getCompanyCouponIssueList()
+  },
+  onReachBottom() {
+    !this.loading && this.getCompanyCouponIssueList()
+  },
+  methods: {
+    show(item){
+		uni.navigateTo({
+			url: '../couponDetails?id=' +item.id
+		})
+	},
+    getCompanyCouponIssueList() {
+      if (this.loading) return //阻止下次请求(false可以进行请求);
+      if (this.loadend) return //阻止结束当前请求(false可以进行请求);
+      this.loading = true
+      let q = { page: this.page, pageSize: this.limit,couponType:2 }
+      getCompanyCouponIssueList(q).then(res => {
+        this.loading = false
+        this.couponsList.push.apply(this.couponsList, res.data.list)
+        this.loadend = res.data.list.length < this.limit //判断所有数据是否加载完成;
+        this.page = this.page + 1
+      })
+    },
+  },
+}
+</script>
+
+<style lang="less" scoped>
+page {
+  background-color: #f5f5f5;
+}
+
+.container {
+  padding-bottom: env(safe-area-inset-bottom);
+}
+.top-fixed{
+	width: 100%;
+	position: fixed;
+	top: 0;
+	left: 0;
+	z-index: 99999;
+	.cate-list{
+		box-sizing: border-box;
+		background: #fff;
+		padding: 10upx 27upx;
+		height: 100upx;
+		.inner{
+			display: flex;
+		}
+		.item{
+			flex-shrink: 0;
+			padding: 0 24upx;
+			height: 64upx;
+			line-height: 64upx;
+			font-size: 28upx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #FF233C;
+			background: #F5FFFE;
+			border: 1px solid #8AD5CE;
+			border-radius: 32upx;
+			margin: 0 20upx 20upx 0;
+			&.active{
+				color: #FFFFFF;
+				background: #FF233C;
+				border: 1px solid #FF233C;
+			}
+		}
+	}
+}
+.tui-coupon-list {
+	width: 100%;
+	padding: 0 25rpx;
+	box-sizing: border-box;
+}
+
+.tui-coupon-banner {
+  width: 100%;
+}
+
+.tui-coupon-item {
+  width: 100%;
+  height: 210rpx;
+  position: relative;
+  display: flex;
+  align-items: center;
+  padding-right: 30rpx;
+  box-sizing: border-box;
+  overflow: hidden;
+ 
+}
+
+.tui-coupon-bg {
+  width: 100%;
+  height: 210rpx;
+  position: absolute;
+  left: 0;
+  top: 0;
+  z-index: 1;
+}
+
+.tui-coupon-sign {
+  height: 110rpx;
+  width: 110rpx;
+  position: absolute;
+  z-index: 9;
+  top: -30rpx;
+  right: 40rpx;
+}
+
+.tui-coupon-item-left {
+  width: 218rpx;
+  height: 210rpx;
+  position: relative;
+  z-index: 2;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  flex-direction: column;
+  flex-shrink: 0;
+}
+
+.tui-coupon-price-box {
+  display: flex;
+  color: #e41f19;
+  align-items: flex-end;
+}
+
+.tui-coupon-price-sign {
+  font-size: 30rpx;
+}
+
+.tui-coupon-price {
+  font-size: 70rpx;
+  line-height: 68rpx;
+  font-weight: bold;
+}
+
+.tui-price-small {
+  font-size: 58rpx !important;
+  line-height: 56rpx !important;
+}
+
+.tui-coupon-intro {
+  background: #f7f7f7;
+  padding: 8rpx 10rpx;
+  font-size: 26rpx;
+  line-height: 26rpx;
+  font-weight: 400;
+  color: #666;
+  margin-top: 18rpx;
+}
+
+.tui-coupon-item-right {
+  flex: 1;
+  height: 210rpx;
+  position: relative;
+  z-index: 2;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  padding-left: 24rpx;
+  box-sizing: border-box;
+  overflow: hidden;
+}
+
+.tui-coupon-content {
+  width: 82%;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+}
+
+.tui-coupon-title-box {
+  display: flex;
+  align-items: center;
+}
+
+.tui-coupon-btn {
+  padding: 6rpx;
+  background: #ffebeb;
+  color: #e41f19;
+  font-size: 25rpx;
+  line-height: 25rpx;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  transform: scale(0.9);
+  transform-origin: 0 center;
+  border-radius: 4rpx;
+  flex-shrink: 0;
+}
+
+.tui-color-grey {
+  color: #888 !important;
+}
+
+.tui-bg-grey {
+  background: #f0f0f0 !important;
+  color: #888 !important;
+}
+
+.tui-coupon-title {
+  width: 100%;
+  font-size: 26rpx;
+  color: #333;
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+}
+
+.tui-coupon-rule {
+  padding-top: 52rpx;
+}
+
+.tui-rule-box {
+  display: flex;
+  align-items: center;
+  transform: scale(0.8);
+  transform-origin: 0 100%;
+}
+
+.tui-padding-btm {
+  padding-bottom: 6rpx;
+}
+
+.tui-coupon-circle {
+  width: 8rpx;
+  height: 8rpx;
+  background: rgb(160, 160, 160);
+  border-radius: 50%;
+}
+
+.tui-coupon-text {
+  font-size: 28rpx;
+  line-height: 28rpx;
+  font-weight: 400;
+  color: #666;
+  padding-left: 8rpx;
+  white-space: nowrap;
+}
+
+.tui-top20 {
+  margin-top: 20rpx;
+}
+
+.tui-coupon-title {
+  font-size: 28rpx;
+  line-height: 28rpx;
+}
+
+.tui-coupon-radio {
+  transform: scale(0.7);
+  transform-origin: 100% center;
+}
+
+.tui-btn-box {
+  position: absolute;
+  right: 20rpx;
+  bottom: 40rpx;
+  z-index: 10;
+  .btn{
+  	width: 155upx;
+  	height: 64upx;
+  	line-height: 64upx;
+  	font-size: 26upx;
+  	font-family: PingFang SC;
+  	font-weight: 500;
+  	text-align: center;
+  	border-radius: 32upx;
+  	margin-left: 15upx;
+
+  	&.cancel{
+  		border: 1px solid red;
+  		color: red;
+  	}
+  	&.receive{
+  		background: red;
+  		color: #FFFFFF;
+  	}
+  }
+}
+</style>

+ 1400 - 0
pages_company/managerOrder/productDetails.vue

@@ -0,0 +1,1400 @@
+<template>
+	<view class="content">
+		<!-- 商品轮播图片 -->
+		<view class="shop-banner" @click="showImg()">
+			<swiper class="swiper" :indicator-dots="false" :circular="true" :autoplay="true" :interval="3000"
+				:duration="1000" indicator-color="rgba(255, 255, 255, 0.6)" indicator-active-color="#ffffff"
+				@change="swiperChange">
+				<swiper-item class="swiper-item" v-for="(item,index) in  banner" :key="index">
+					<image :src="item" mode="aspectFill"></image>
+					<!-- <view class="cf-box" v-if="product.productType==2">
+						<view class="title">处方药</view>
+						<view class="subTitle">请在医师指导下使用</view>
+					</view> -->
+				</swiper-item>
+			</swiper>
+			<!-- 底部遮罩 -->
+			<view class="banner-mask"></view>
+			<!-- 数量 -->
+			<view class="num-box">{{ activeBanner }}/{{ banner.length }}</view>
+		</view>
+		<!-- 详细信息 -->
+		<view class="det-info">
+			<view class="price-box">
+				<view class="price">
+					<text class="label">会员价</text>
+					<text class="num">{{product.price}}</text>
+					<text class="label">零售价</text>
+					<text class="old">¥{{product.otPrice}}</text>
+				</view>
+				<view class="share-box" v-if="userinfo.isShow==1&&isuser==false">
+					<text class="text">分享</text>
+					<!-- <image src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/share1.png" mode="">
+					</image> -->
+					<button class="share" data-name="shareBtn" open-type="share">分享</button>
+				</view>
+			</view>
+			<view class="name-box">
+				<!-- <view class="tag">{{utils.getDictLabelName("storeProductType",product.productType)}}</view> -->
+				{{product.productName}}
+			</view>
+			<view class="intro" v-if="product.productInfo!=null" v-html="product.productInfo.replace(/\n/g,'<br>')">
+			</view>
+			<!-- <view class="safe-box">
+				<image src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/safe.png" mode=""></image>
+				<text class="text" v-if="userinfo.isShow==1&&isuser==false">免邮发货</text>
+				<view class="line" v-if="userinfo.isShow==1&&isuser==false"></view>
+				<view class="line"></view>
+				<text class="text">药师服务</text>
+				<view class="line"></view>
+				<text class="text">隐私保护</text>
+			</view> -->
+		</view>
+		<!-- 购买人数、库存 -->
+		<view class="inventor" v-if="userinfo.isShow==1&&isuser==false">
+			<view class="left">
+				<!-- <view class="head-box">
+					<view class="head" v-for="(item,j) in 5" :key="j">
+						<image src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/head.jpg" mode=""></image>
+					</view>
+				</view> -->
+				<view class="num-box">
+					已有 <text class="text">{{product.sales}}</text> 人购买
+					<view v-if=" purchaseLimit > 0" class="limit-text">
+						 限购{{purchaseLimit}}件<text v-if="remainingPurchaseLimit !== null && remainingPurchaseLimit >= 0">,已购{{purchaseLimit - remainingPurchaseLimit}}件</text>
+					</view> 
+				</view>
+			</view>
+			<!-- <view class="right">
+				库存 <text class="text">{{product.stock}}{{product.unitName}}</text>
+			</view> -->
+			<!-- <view class="right">
+				 <text class="text">库存{{product.stock>0?'充足':'售罄'}} </text>
+			</view> -->
+		</view>
+		<!-- 功效 -->
+		<!-- <view class="effect">
+			<view class="label">产品说明书</view>
+			<view class="label">查看</view>
+			
+		</view> -->
+		<!-- 图文详情 -->
+		<view class="det-box">
+			<view class="title">图文详情</view>
+			<view class="inner">
+				<view v-html="product.description" style="font-size:0"></view>
+			</view>
+		</view>
+		<!-- 底部按钮 -->
+		<!-- userinfo.isShow==1&& -->
+		<view class="btn-foot" >
+			<view class="menu-box" v-if="isuser==false">
+				<view class="item" @click="goHome">
+					<image src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/back_home.png"
+						mode=""></image>
+					<text class="label">首页</text>
+				</view>
+				<view class="item" style="position: relative;">
+					<image src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/consult_small.png"
+						mode=""></image>
+					<text class="label">咨询</text>
+					<button class="contact-btn" open-type="contact"></button>
+				</view>
+				<!-- <view class="item" @click="toCart('./cart')">
+					<uni-badge size="small" :text="cartCount" absolute="rightTop" type="error">
+						<image src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/cart36.png"
+							mode=""></image>
+					</uni-badge>
+					<text class="label">购物车</text>
+				</view> -->
+			</view>
+			<view></view>
+			<view class="btn-box">
+				<!-- <view class="btn cart" @click="addCart('cart')">加入购物车</view> -->
+				<view class="btn buy" @click="addCart('buy')">{{buyText}}</view>
+			</view>
+		</view>
+		<!-- 选择产品规格弹窗 -->
+		<popupBottom ref="popup" :visible.sync="specVisible" title=" " radius="32" maxHeight="1024">
+			<view class="product-spec">
+				<!-- 商品信息 -->
+				<view class="pro-info">
+					<view class="img-box" @click="showImg(productValueSelect.image)">
+						<image
+							:src="productValueSelect.image==null||productValueSelect.image==''?product.image:productValueSelect.image"
+							mode="aspectFill"></image>
+					</view>
+					<view class="info-text">
+						<view class="price">
+							<text class="unit">¥</text>
+							<text class="num">{{ productValueSelect.price.toFixed(2) }}</text>
+						</view>
+						<view class="desc-box">
+							<text class="text">已选:{{ productValueSelect.sku }}</text>
+							<text class="text">库存:{{ productValueSelect.stock }}</text>
+						</view>
+					</view>
+				</view>
+
+				<!-- 门店 -->
+				<!-- 		<view class="spec-box form-item" v-if="stores.length>0">
+					<text class="label">所属门店</text> 
+					<picker  class="birth-picker"  mode="selector" :value="storeIdx" :range="storeNames" @change="pickerChange"  @columnchange="pickerColumnchange">
+						<view class="right-box">
+							<view class="input-box">
+								<input type="text" v-model="storeName" placeholder="请选择门店" class="form-input" disabled="disabled" />
+							</view>
+							<image class="arrow" src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/arrow_gray.png" mode=""></image>
+						</view>
+					</picker>
+				</view> -->
+
+				<!-- 规格 -->
+				<view class="spec-box">
+					<view v-for="(item,index) in attrs" :key="index">
+						<view class="title">{{item.attrName}}</view>
+						<view class="spec-list">
+							<view v-for="(subItem,subindex) in item.values" :key="subindex"
+								:class="subindex==item.index?'item active':'item'" @click="choseSpec(index,subindex)">
+								{{ subItem }}
+							</view>
+						</view>
+					</view>
+				</view>
+				<!-- 数量 -->
+				<view class="price-num">
+					<view class="label">数量</view>
+					<view class="num-box">
+						<view class="img-box" @click="lessNum()">
+							<image v-if="specNum <= 1"
+								src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/jian.png"
+								mode=""></image>
+							<image v-else
+								src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/jian2.png"
+								mode=""></image>
+						</view>
+						<input type="number" @change="changeNum" v-model="specNum" />
+						<view class="img-box" :style="{backgroundColor:isSingle?'#ddd':'#fff'}" @click="addNum()">
+							<image src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/add.png"
+								mode=""></image>
+						</view>
+					</view>
+				</view>
+				<view class="sub-btn" @click="submit">确定</view>
+			</view>
+		</popupBottom>
+
+		<view class="loadding" v-if="loadding==true">
+			<image src="../..https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/app/vip/share.png"></image>
+			<text class="text">加载中...</text>
+		</view>
+    <CustomToast ref="customToast">
+    </CustomToast>
+		<!-- <u-modal :show="showModal" title="温馨提示" content="处方药须凭处方在药师指导下购买和使用" @confirm="hideModal()"></u-modal> -->
+	</view>
+</template>
+
+<script>
+import {CustomToast} from '@/components/custom-toast.vue';
+
+	import {
+		getDicts
+	} from '@/api/index'
+	import {
+		getUserInfo
+	} from '@/api/user'
+	import {
+		getStoreProductDetail
+	} from '@/api/companyOrder.js'
+	import {
+		getCartCount,
+		addCart
+	} from '@/api/product'
+	import popupBottom from '@/components/px-popup-bottom/px-popup-bottom.vue'
+	export default {
+		components: {
+			item: {},
+			popupBottom,
+      CustomToast
+		},
+		data() {
+			return {
+				loadding: true,
+				buyText: "立即购买",
+				// mTitle:"温馨提示",
+				// mContent:"处方药须凭处方在药师指导下购买和使用",
+				type: null,
+				productValueSelect: {
+					price: 0,
+					serviceFee: 0
+				},
+				banner: [],
+				productId: null,
+				attrs: [],
+				values: [],
+				stores: [],
+				storeId: null,
+				storeNames: [],
+				storeIdx: 0,
+				storeName: "",
+				product: {
+					price: 0,
+					otPrice: 0,
+				},
+				showModal: false,
+				// 当前轮播的图片
+				activeBanner: 1,
+				// 购物车数量
+				cartCount: 0,
+				// 规格弹窗
+				specVisible: false,
+				// 规格数量
+				specNum: 1,
+				config: null,
+				showServiceFee: false,
+				selectVal: "",
+				userinfo: [],
+				isuser: false,
+				remainingPurchaseLimit:null,
+				singlePurchaseLimit:null,//商品购买上限
+				isSingle:false,
+				purchaseLimit:0, // 总限购数量
+				courseId:null,
+				companyUserId:null,
+				companyId:null
+			};
+		},
+		onLoad(options) {
+			console.log("qxj options:",options);
+			uni.showShareMenu({
+				withShareTicket: true,
+				//小程序的原生菜单中显示分享按钮,才能够让发送给朋友与分享到朋友圈两个按钮可以点击
+				menus: ["shareAppMessage", "shareTimeline"] //不设置默认发送给朋友
+			})
+			this.getDicts();
+			this.productId = options.productId;
+			this.companyUserId= options.companyUserId
+			this.companyId = options.companyId
+		},
+		onShow() {
+			this.getProductDetails();
+			if (uni.getStorageSync('AppToken')) {
+				this.getuser()
+			} else {
+				this.isuser = true
+			}
+		},
+		//发送给朋友
+		onShareAppMessage(res) {
+			if (this.utils.isLogin()) {
+				var user = JSON.parse(uni.getStorageSync('userInfo'))
+				return {
+					title: this.product.productName,
+					path: '/pages_company/managerOrder/productDetails?productId=' + this.product.productId + "&userId=" + user.userId +"&companyId="+this.companyId+"&companyUserId="+this.companyUserId,
+					imageUrl: 'https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/app/vip/share.png' //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
+				}
+			}
+		},
+		//分享到朋友圈
+		onShareTimeline(res) {
+			if (this.utils.isLogin()) {
+				var user = JSON.parse(uni.getStorageSync('userInfo'))
+				return {
+					title: this.product.productName,
+					query: 'productId=' + this.product.productId + "&userId=" + user.userId+"&companyId="+this.companyId+"&companyUserId="+this.companyUserId, //页面参数
+					imageUrl: 'https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/app/vip/share.png' //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
+				}
+			}
+
+		},
+		methods: {
+			getuser() {
+				getUserInfo().then(
+					res => {
+						if (res.code == 200) {
+							if (res.user != null) {
+								this.userinfo = res.user;
+								console.log(this.userinfo)
+								uni.setStorageSync('userInfo', JSON.stringify(res.user));
+							}
+						} else {
+							uni.showToast({
+								icon: 'none',
+								title: "请求失败",
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+			getDicts: function() {
+				getDicts().then(
+					res => {
+						if (res.code == 200) {
+							uni.setStorageSync('dicts', JSON.stringify(res));
+						}
+					},
+					rej => {}
+				);
+			},
+			showImg(img) {
+				if (img != null) {
+					var imgs = [];
+					imgs.push(img)
+					//预览图片
+					uni.previewImage({
+						urls: imgs,
+						current: imgs[0]
+					});
+				} else {
+					//预览图片
+					uni.previewImage({
+						urls: this.banner,
+						current: this.banner[0]
+					});
+				}
+			},
+			doAddCart(type) {
+				// 检查限购数量
+				if (this.remainingPurchaseLimit !== null && typeof this.remainingPurchaseLimit === 'number') {
+					// 如果限购数量为0,提示库存不足
+					if (this.remainingPurchaseLimit === 0) {
+            this.$refs.customToast.show({
+              title: `该商品限购:${this.purchaseLimit}件\n已达购买上限`,
+              duration: 2000
+            });
+						// uni.showToast({
+						// 	icon: 'none',
+						// 	title: "该商品限购:" + this.purchaseLimit +",已达到购买上限",
+						// });
+						return;
+					}
+					// 如果购买数量超过限购数量,提示
+					if (this.specNum > this.remainingPurchaseLimit) {
+            this.$refs.customToast.show({
+              title: "购买数量不能超过限购数量:" + this.remainingPurchaseLimit,
+              duration: 2000
+            });
+						// uni.showToast({
+						// 	icon: 'none',
+						// 	title: "购买数量不能超过限购数量:" + this.remainingPurchaseLimit,
+						// });
+						return;
+					}
+				}
+				if (this.specNum == 0) {
+					uni.showToast({
+						icon: 'none',
+						title: "购买商品数量必须大于0",
+					});
+					return;
+				}
+				var isBuy = type == "buy" ? 1 : 0;
+				let data = {
+					isBuy: isBuy,
+					cartNum: this.specNum,
+					productId: this.productValueSelect.productId,
+					attrValueId: this.productValueSelect.id
+				};
+				addCart(data).then(
+					res => {
+						if (res.code == 200) {
+							if (type == "buy") {
+								uni.navigateTo({
+									url: '/pages/shopping/confirmOrder?type=' + this.type + "&cartIds=" + res
+										.id + "&orderType=" + this.orderType + "&storeId=" + this.storeId +"&companyId="+this.companyId+"&companyUserId="+this.companyUserId
+								})
+							} else {
+								//this.getCartCount()
+								uni.showToast({
+									icon: 'success',
+									title: "添加成功",
+								});
+							}
+						} else {
+							uni.showToast({
+								icon: 'none',
+								title: res.msg,
+							});
+							this.getProductDetails()
+						}
+					},
+					rej => {}
+				);
+			},
+			getProductDetails() {
+				let data = {
+					productId:this.productId,
+					companyId:this.companyId,
+					companyUserId:this.companyUserId
+				};
+				getStoreProductDetail(data).then(
+					res => {
+						this.loadding = false
+						if (res.code == 200) {
+							this.product = res.product;
+							this.remainingPurchaseLimit = res.remainingPurchaseLimit;
+							this.singlePurchaseLimit = res.product.singlePurchaseLimit!==0?res.product.singlePurchaseLimit:null
+							// 如果接口返回了总限购数量和已购买数量,也保存
+							if (res.product.purchaseLimit !== null) {
+								this.purchaseLimit = res.product.purchaseLimit;
+							}
+							if (this.product.productType == 1) {
+								this.buyText = "立即购买"
+							} else if (this.product.productType == 2) {
+								this.showModal = true;
+								this.buyText = "开方购买"
+							}
+							this.product.otPrice = this.product.otPrice.toFixed(2);
+							this.product.price = this.product.price.toFixed(2);
+							if (this.product.sliderImage != null) {
+								this.banner = this.product.sliderImage.split(',');
+							} else {
+								this.banner = []
+							}
+							this.attrs = res.productAttr;
+							this.attrs.forEach((item, index, arr) => {
+								item.values = item.attrValues.split(',');
+								item.index = 0
+							});
+							this.values = res.productValues;
+							this.choseSpec(0, 0)
+							// this.stores=res.stores;
+							// this.storeNames=this.stores.map(store => store.storeName);
+							// if(this.stores.length>0){
+							// 	this.storeName=this.storeNames[this.storeIdx];
+							// 	this.storeId=this.stores[this.storeIdx].storeId;
+							// }
+
+
+						} else {
+							uni.showToast({
+								icon: 'none',
+								title: res.msg,
+							});
+							// setTimeout(function() {
+							// 	uni.reLaunch({
+							// 		url: '/pages/home/index',
+							// 	})
+							// }, 2000)
+
+						}
+					},
+					rej => {}
+				);
+			},
+			getCartCount() {
+				let data = {
+					productId: this.productId
+				};
+				getCartCount(data).then(
+					cartRes => {
+						if (cartRes.code == 200) {
+							this.cartCount = cartRes.data;
+						}
+					},
+					rej => {}
+				);
+
+			},
+			// swiper变化事件
+			swiperChange(event) {
+				this.activeBanner = event.detail.current + 1
+			},
+			// 回到首页
+			goHome() {
+				uni.switchTab({
+					url: '/pages/home/newindex'
+				})
+			},
+			// 跳转页面
+			navgetTo(url) {
+				this.utils.isLogin().then(res => {
+					if (res) {
+						uni.navigateTo({
+							url: url
+						})
+					}
+				})
+			},
+			toCart(url) {
+				this.utils.isLogin().then(res => {
+					if (res) {
+						uni.switchTab({
+							url: url
+						})
+					}
+				})
+			},
+
+			// 加入购物车
+			addCart(type) {
+				if (type == 'buy') {
+					let userInfoStr = uni.getStorageSync('userInfo');
+					if(Object.prototype.toString.call(userInfoStr) == '[object String]'){
+						userInfoStr = userInfoStr!=''?JSON.parse(userInfoStr):''
+					}
+					//console.log('userInfoStr.phone',userInfoStr.phone)
+					if (!userInfoStr || !userInfoStr.maOpenId|| !userInfoStr.phone) {
+						uni.navigateTo({
+							url: '/pages/auth/login'
+						});
+						return;
+					}
+				}
+				this.utils.isLogin().then(res => {
+					if (res) {
+						this.type = type;
+						this.specVisible = true
+					}
+				})
+			},
+			// 规格选择
+			choseSpec(index, subIndex) {
+				this.attrs[index].index = subIndex;
+				this.$forceUpdate();
+				let productAttr = this.attrs;
+				let values = [];
+				for (let i = 0; i < productAttr.length; i++) {
+					for (let j = 0; j < productAttr[i].values.length; j++) {
+						if (productAttr[i].index === j) { //筛选出默认规格
+							values.push(productAttr[i].values[j]);
+						}
+					}
+				}
+				let selectVal = values.sort().join(","); //返回值:默认
+				this.selectVal = selectVal;
+				// var valueSelect=this.values.filter((item)=>{
+				//      return item.sku==selectVal;
+				// });
+				var valueSelect = this.getValueSelect();
+				console.log("qxj valueSelect:" + valueSelect);
+				if (valueSelect != null && valueSelect.length > 0) {
+					this.productValueSelect = valueSelect[0];
+				}
+				//console.log("qxj productValueSelect:" + JSON.stringify(this.productValueSelect));
+				this.updateSpecNum();
+
+			},
+			//更新数量
+			updateSpecNum() {
+				if (this.productValueSelect.stock == 0) {
+					this.specNum = 0;
+				} else {
+					this.specNum = 1;
+				}
+			},
+			changeNum(e) {
+				this.specNum = e.detail.value.replace(/\D/g, '')
+				this.isSingle=false
+				if (this.specNum < 1) {
+					this.specNum = 1
+				}
+				if (this.specNum >= this.productValueSelect.stock) {
+					this.specNum = this.productValueSelect.stock
+				}
+				// 检查限购数量
+				if (this.remainingPurchaseLimit !== null && typeof this.remainingPurchaseLimit === 'number' && this.specNum > this.remainingPurchaseLimit) {
+					this.specNum = this.remainingPurchaseLimit;
+          this.$refs.customToast.show({
+            title: `该商品限购:${this.remainingPurchaseLimit}件\n已达购买上限`,
+            duration: 2000
+          });
+		 }
+		 //单笔商品限购
+		 if (this.singlePurchaseLimit !== null && typeof this.singlePurchaseLimit === 'number' && this.specNum > this.singlePurchaseLimit) {
+			 this.isSingle=true
+		 this.specNum = this.singlePurchaseLimit;
+		 this.$refs.customToast.show({
+		   title: `已达单笔最高购买件数`,
+		   duration: 3000
+		 });
+		 }
+			},
+			// 数量减法
+			lessNum() {
+				this.specNum--
+				this.isSingle=false
+				if (this.specNum < 1) {
+					this.specNum = 1
+				}
+				if (this.specNum >= this.productValueSelect.stock) {
+					this.specNum = this.productValueSelect.stock
+				}
+				// 检查限购数量
+				if (this.remainingPurchaseLimit !== null && typeof this.remainingPurchaseLimit === 'number' && this.specNum > this.remainingPurchaseLimit) {
+					this.specNum = this.remainingPurchaseLimit;
+          this.$refs.customToast.show({
+            title: `该商品限购:${this.remainingPurchaseLimit}件\n已达购买上限`,
+            duration: 2000
+          });
+				}
+				//单笔商品限购
+				if (this.singlePurchaseLimit !== null && typeof this.singlePurchaseLimit === 'number' && this.specNum > this.singlePurchaseLimit) {
+					this.isSingle=true
+					this.specNum = this.singlePurchaseLimit;
+				this.$refs.customToast.show({
+				  title: `已达单笔最高购买件数`,
+				  duration: 3000
+				});
+				}
+			},
+			// 数量加法
+			addNum() {
+				this.specNum++
+				this.isSingle=false
+				if (this.specNum >= this.productValueSelect.stock) {
+					this.specNum = this.productValueSelect.stock
+				}
+				// 检查限购数量
+				if (this.remainingPurchaseLimit !== null && typeof this.remainingPurchaseLimit === 'number' && this.specNum > this.remainingPurchaseLimit) {
+					this.specNum = this.remainingPurchaseLimit;
+                 this.$refs.customToast.show({
+                 title: `该商品限购:${this.remainingPurchaseLimit}件\n已达购买上限`,
+                  duration: 2000
+                  });
+				}
+				//单笔商品限购
+				if (this.singlePurchaseLimit !== null && typeof this.singlePurchaseLimit === 'number' && this.specNum > this.singlePurchaseLimit) {
+					this.isSingle=true
+				this.specNum = this.singlePurchaseLimit;
+				this.$refs.customToast.show({
+				  title: `已达单笔最高购买件数`,
+				  duration: 3000
+				});
+				}
+			},
+			// 确定选择该规格
+			submit() {
+				this.specVisible = false
+				this.doAddCart(this.type);
+			},
+			hideModal() {
+				this.showModal = false;
+			},
+			getValueSelect() {
+				var valueSelect = this.values.filter((item) => {
+					return item.sku == this.selectVal;
+				});
+				return valueSelect;
+			},
+			pickerChange(e) {
+				console.log("pickerChange index:" + e.detail.value);
+				var valueSelect = this.getValueSelect();
+				this.productValueSelect = valueSelect[0];
+
+			},
+			pickerColumnchange(e) {
+
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.shop-banner {
+		height: 756upx;
+		background-color: #FFFFFF;
+		position: relative;
+
+		.swiper-item {
+			box-sizing: border-box;
+			position: relative;
+		}
+
+		.swiper,
+		.swiper-item,
+		.swiper-item image {
+			width: 100%;
+			height: 100%;
+		}
+
+		.banner-mask {
+			width: 100%;
+			height: 44upx;
+			// background: linear-gradient(0deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0));
+			// opacity: 0.8;
+			position: absolute;
+			left: 0;
+			bottom: 0;
+			z-index: 9;
+			background-image: url(https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/black_mask.png);
+			background-size: 20upx 44upx;
+			background-repeat: repeat-x;
+		}
+
+		.num-box {
+			width: 80upx;
+			height: 44upx;
+			line-height: 44upx;
+			text-align: center;
+			font-size: 24upx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #FFFFFF;
+			background: rgba(0, 0, 0, .3);
+			border-radius: 22upx;
+			position: absolute;
+			right: 30upx;
+			bottom: 30upx;
+			z-index: 10;
+		}
+
+		.cf-box {
+			position: absolute;
+			z-index: 10;
+			left: 0;
+			right: 0;
+			top: calc(50% - 200rpx);
+			bottom: calc(50% - 200rpx);
+			background-color: rgba(0, 0, 0, 0.3);
+			backdrop-filter: blur(2rpx);
+			/* 背景模糊度 */
+			display: flex;
+			flex-direction: column;
+			flex: 1;
+			justify-content: center;
+			align-items: center;
+			color: #EDEEEF;
+
+			.title {
+				font-size: 40rpx;
+				font-weight: bold;
+			}
+
+			.subTitle {
+				font-size: 28rpx;
+				font-weight: bold;
+				margin-top: 10rpx;
+			}
+		}
+
+
+	}
+
+	.det-info {
+		background: #FFFFFF;
+		padding: 36upx 30upx 25upx;
+
+		.price-box {
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+
+			.price {
+				display: flex;
+				align-items: flex-end;
+
+				.label {
+					color: #333;
+					font-size: 28upx;
+					font-family: PingFang SC;
+					line-height: 1.3;
+					margin-right: 5upx;
+				}
+
+				.unit {
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #FF6633;
+					line-height: 1.3;
+				}
+
+				.num {
+					font-size: 40upx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #FF6633;
+					margin: 0 20upx 0 10upx;
+					line-height: 1;
+				}
+
+				.old {
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					text-decoration: line-through;
+					color: #BBBBBB;
+					line-height: 1.3;
+				}
+			}
+
+			.share-box {
+				width: 120upx;
+				height: 46upx;
+				border: 1px solid #FF233C;
+				border-radius: 23upx;
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				position: relative;
+
+				.text {
+					font-size: 26upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #FF233C;
+				}
+
+				image {
+					margin-left: 2rpx;
+					width: 25upx;
+					height: 24upx;
+				}
+
+				.share {
+					display: inline-block;
+					position: absolute;
+					top: 0;
+					left: 0;
+					width: 100%;
+					height: 100%;
+					opacity: 0;
+				}
+			}
+
+			.spec {
+				font-size: 24upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #999999;
+				line-height: 36upx;
+			}
+		}
+
+		.name-box {
+			font-size: 32upx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #111111;
+			line-height: 44upx;
+			margin-top: 32upx;
+
+			.tag {
+				display: inline-block;
+				padding: 0 6upx;
+				height: 30upx;
+				background: linear-gradient(90deg, #FFC5C5 0%, #FF233C 100%);
+				border-radius: 4upx;
+				margin-right: 10upx;
+				font-size: 22upx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #FFFFFF;
+				line-height: 30upx;
+				float: left;
+				margin-top: 7upx;
+			}
+		}
+
+		.intro {
+			font-size: 26upx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #999999;
+			line-height: 36upx;
+			padding: 18upx 0 23upx;
+			border-bottom: 1px solid #f7f7f7;
+		}
+
+		.safe-box {
+			display: flex;
+			align-items: center;
+			padding-top: 24upx;
+
+			image {
+				width: 20upx;
+				height: 24upx;
+				margin-right: 20upx;
+			}
+
+			.text {
+				font-size: 22upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #999999;
+				line-height: 1;
+			}
+
+			.line {
+				width: 1px;
+				height: 23upx;
+				background: #EDEEEF;
+				margin: 0 20upx;
+			}
+		}
+	}
+
+	.inventor {
+		height: 88upx;
+		padding: 0 39upx 0 30upx;
+		margin-top: 10upx;
+		background: #FFFFFF;
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+
+		.left {
+			display: flex;
+			align-items: center;
+
+			.head-box {
+				margin-right: 27upx;
+				display: flex;
+				align-items: center;
+
+				.head {
+					width: 48upx;
+					height: 48upx;
+					border-radius: 50%;
+					overflow: hidden;
+					box-shadow: 0 0 0 1px #fff;
+					margin-right: -10upx;
+
+					image {
+						width: 100%;
+						height: 100%;
+					}
+				}
+			}
+
+			.num-box {
+				font-size: 24upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #999999;
+
+				.text {
+					font-size: 24upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #999999;
+				}
+				
+				.limit-text {
+					font-size: 32rpx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #FF6633;
+					margin-left: 20upx;
+				}
+			}
+		}
+
+		.right {
+			font-size: 24upx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #999999;
+
+			.text {
+				font-size: 24upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #666666;
+			}
+		}
+	}
+
+	.effect {
+		box-sizing: border-box;
+		padding: 20upx 30upx;
+		background: #FFFFFF;
+		font-size: 28upx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #666666;
+		line-height: 1.8;
+		margin-top: 10upx;
+		display: flex;
+		flex-direction: row;
+		align-items: center;
+		justify-content: space-between;
+
+		.label {
+			font-size: 28upx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #111111;
+			line-height: 1.8;
+		}
+	}
+
+	.det-box {
+		margin-top: 10upx;
+		padding: 40upx 30upx 130upx 30upx;
+		background-color: #FFFFFF;
+
+		.title {
+			font-size: 30upx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #333333;
+			line-height: 1;
+			margin-bottom: 25upx;
+		}
+
+	}
+
+	.btn-foot {
+		box-sizing: border-box;
+		width: 100%;
+		height: 121upx;
+		background: #FFFFFF;
+		padding: 0 32upx 0 28upx;
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		position: fixed;
+		left: 0;
+		bottom: 0;
+		z-index: 99;
+
+		.menu-box {
+			display: flex;
+			align-items: center;
+
+			.item {
+				display: flex;
+				align-items: center;
+				flex-direction: column;
+				margin-right: 48upx;
+
+				&:last-child {
+					margin-right: 0;
+				}
+
+				image {
+					width: 36upx;
+					height: 36upx;
+					margin-bottom: 10upx;
+				}
+
+				.label {
+					font-size: 20upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #666666;
+					text-align: center;
+				}
+			}
+
+			:deep(.uni-badge--x) {
+				display: flex;
+				align-items: center;
+				justify-content: center;
+			}
+
+			:deep(.uni-badge) {
+				border: none;
+				background-color: #FF3636;
+				font-family: Roboto;
+			}
+		}
+
+		.btn-box {
+			display: flex;
+			align-items: center;
+
+			.btn {
+				width: 200upx;
+				height: 88upx;
+				line-height: 88upx;
+				text-align: center;
+				border-radius: 44upx;
+				margin-left: 20upx;
+				font-size: 30upx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #FFFFFF;
+
+				&:first-child {
+					margin-left: 0;
+				}
+
+				&.cart {
+					background: #FF6633;
+				}
+
+				&.buy {
+					background: #FF233C;
+				}
+			}
+		}
+	}
+
+	.product-spec {
+		.pro-info {
+			display: flex;
+			align-items: center;
+
+			.img-box {
+				width: 200upx;
+				height: 200upx;
+				background: #FFFFFF;
+				border-radius: 16upx;
+				overflow: hidden;
+				margin-right: 30upx;
+
+				image {
+					width: 100%;
+					height: 100%;
+				}
+			}
+
+			.info-text {
+				height: 200upx;
+				display: flex;
+				flex-direction: column;
+				justify-content: space-between;
+
+				.price {
+					display: flex;
+					align-items: flex-end;
+
+					.unit {
+						font-size: 32upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #FF6633;
+						line-height: 1.2;
+						margin-right: 10upx;
+					}
+
+					.num {
+						font-size: 50upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #FF6633;
+						line-height: 1;
+					}
+				}
+
+				.desc-box {
+					display: flex;
+					flex-direction: column;
+					padding-bottom: 9upx;
+
+					.text {
+						font-size: 26upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #999999;
+						margin-top: 27upx;
+						line-height: 1;
+
+						&:first-child {
+							margin-top: 0;
+						}
+					}
+				}
+			}
+		}
+
+		.spec-box {
+			padding-top: 50upx;
+
+			.title {
+				font-size: 34upx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #111111;
+				line-height: 1;
+			}
+
+			.spec-list {
+				display: flex;
+				flex-wrap: wrap;
+				margin-top: 30upx;
+
+				.item {
+					box-sizing: border-box;
+					height: 64upx;
+					padding: 0 30upx;
+					line-height: 64upx;
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #111111;
+					background: #F7F7F7;
+					border: 1px solid #F7F7F7;
+					border-radius: 32upx;
+					margin-right: 20upx;
+					margin-bottom: 30upx;
+
+					&.active {
+						background: #fff;
+						border: 1px solid #FF233C;
+						color: #FF233C;
+					}
+				}
+			}
+		}
+
+		.price-num {
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			margin-top: 14upx;
+
+			.label {
+				font-size: 34upx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #111111;
+			}
+
+			.num-box {
+				display: flex;
+				align-items: center;
+
+				.img-box {
+					width: 60upx;
+					height: 60upx;
+					// border-radius: 4upx;
+					border: 1px solid #dddddd;
+					display: flex;
+					align-items: center;
+					justify-content: center;
+
+					image {
+						width: 25rpx;
+						height: 25rpx;
+					}
+				}
+
+				input {
+					width: 60upx;
+					height: 60upx;
+					line-height: 60upx;
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #111111;
+					// border-radius: 4upx;
+					border-top: 1px solid #dddddd;
+					border-bottom: 1px solid #dddddd;
+					text-align: center;
+					// margin: 0 16upx;
+				}
+			}
+		}
+
+		.sub-btn {
+			width: 100%;
+			height: 88upx;
+			line-height: 88upx;
+			text-align: center;
+			font-size: 30upx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #FFFFFF;
+			background: #FF233C;
+			border-radius: 44upx;
+			margin-top: 30upx;
+			// margin-bottom: 30upx;
+
+		}
+	}
+
+	.contact-btn {
+		display: inline-block;
+		position: absolute;
+		top: 0;
+		left: 0;
+		width: 100%;
+		height: 100%;
+		opacity: 0;
+		z-index: 9999;
+	}
+
+	.loadding {
+		background-color: #fff;
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		justify-content: center;
+		position: absolute;
+		top: 0;
+		left: 0;
+		width: 100%;
+		height: 100%;
+		z-index: 9999;
+
+		image {
+			border-radius: 50%;
+			animation: load linear 1s infinite;
+			width: 120rpx;
+			height: 120rpx;
+		}
+
+		.text {
+			font-size: 28rpx;
+			margin-top: 20rpx;
+		}
+	}
+
+	.form-item {
+		padding: 30upx 0;
+		display: flex;
+		align-items: flex-start;
+		border-bottom: 1px solid #F1F1F1;
+
+		&:last-child {
+			border-bottom: none;
+		}
+
+		.label {
+			width: 180upx;
+			text-align: left;
+			font-size: 30upx;
+			line-height: 44upx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #222222;
+			flex-shrink: 0;
+		}
+
+		input {
+			text-align: left;
+		}
+
+		.form-input {
+			font-size: 30upx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #999999;
+			text-align: left;
+		}
+
+		.form-textarea {
+			font-size: 30upx;
+			color: #999999;
+			height: 100upx;
+			padding: 4upx 0;
+		}
+
+		.birth-picker {
+			flex: 1;
+			display: flex;
+			align-items: center;
+
+			.right-box {
+				width: 100%;
+				display: flex;
+				align-items: center;
+
+				.input-box {
+					width: 470upx;
+				}
+
+				.arrow {
+					width: 13upx;
+					height: 23upx;
+					margin-left: 20upx;
+				}
+			}
+		}
+	}
+</style>

+ 289 - 0
pages_company/managerOrder/productList.vue

@@ -0,0 +1,289 @@
+<template>
+	<view class="content">
+		<view class="top-fixed">
+			<!-- 搜索框 -->
+			<view class="search-cont">
+				<view class="inner">
+					<image class="icon-search" src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/search.png" mode=""></image>
+					<input type="text" @confirm="goSearch"   :value="form.keyword" placeholder="输入产品名称" placeholder-style="font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;" />
+				</view>
+				<!-- <view class="icon-search">
+					<image @click="showChange(2)" v-if="showType==1"  src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/search1.png" mode=""></image>
+					<image @click="showChange(1)" v-if="showType==2"  src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/search2.png" mode=""></image>
+				</view> -->
+			</view>
+			<!-- 排序框 -->
+		<!-- 	<view class="sort-box">
+				<view class="item" :class="form.defaultOrder=='desc'?'active':''" @click="searchChange('1')">
+					<text class="label">默认</text>
+				</view>
+				<view class="item" :class="form.defaultOrder=='desc'?'active':''" @click="searchChange('1')">
+					<text class="label">新品</text>
+				</view>
+				<view class="item" :class="form.defaultOrder=='desc'?'active':''" @click="searchChange('1')">
+					<text class="label">默认</text>
+				</view>
+				<view class="item" @click="searchChange('2')">
+					<text class="label">价格</text>
+					<view class="sort-img">
+						<image v-if="form.priceOrder==null||form.priceOrder=='desc'" src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/price_arrow_up.png" mode="" @click="priceUp(true)"></image>
+						<image v-if="form.priceOrder=='asc'" src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/price_arrow_up2.png" mode="" @click="priceUp(false)"></image>
+						<image v-if="form.priceOrder==null||form.priceOrder=='asc'" src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/price_arrow_down.png" mode="" @click="priceDown(true)"></image>
+						<image v-if="form.priceOrder=='desc'" src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/price_arrow_down2.png" mode="" @click="priceDown(false)"></image>
+					</view>
+				</view>
+				<view class="item" @click="searchChange('3')">
+					<text class="label">销量</text>
+					<view class="sort-img">
+						<image v-if="form.salesOrder==null||form.salesOrder=='desc'" src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/price_arrow_up.png" mode="" @click="saleUp(true)"></image>
+						<image v-if="form.salesOrder=='asc'" src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/price_arrow_up2.png" mode="" @click="saleUp(false)"></image>
+						<image v-if="form.salesOrder==null||form.salesOrder=='asc'" src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/price_arrow_down.png" mode="" @click="saleDown(true)"></image>
+						<image v-if="form.salesOrder=='desc'" src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/price_arrow_down2.png" mode="" @click="saleDown(false)"></image>
+					</view>
+				</view>
+				<view class="item" :class="form.newOrder=='desc'?'active':''" @click="searchChange('4')">
+					<text class="label">新品</text>
+				</view>
+			</view> -->
+		</view>
+	 
+		<!-- 数据列表 -->
+		<mescroll-body top="100rpx" bottom="40rpx" ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption" :up="upOption">
+			<view class="goods-grid">
+				<view class="grid-item" v-for="(item, index) in dataList" :key="index">
+					<GoodsCard :item="item" @goPage="showDetail"/>
+				</view>
+			</view>
+		</mescroll-body>
+	</view>
+</template>
+
+<script>
+	import { getStoreProductList } from '@/api/companyOrder.js'
+	import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
+	import GoodsCard from './components/GoodsCard.vue';
+	export default {
+		components: { GoodsCard },
+		mixins: [MescrollMixin], 
+		data() {
+			return {
+				form:{
+					// defaultOrder:'desc',
+					// newOrder:null,
+					// priceOrder:null,
+					// salesOrder:null,
+					//position:1,
+					productName:"",
+					companyUserId:null,
+					companyId:null
+				},
+				mescroll:null,
+				// 上拉加载的配置
+				upOption: {
+					onScroll:true,
+					use: true, // 是否启用上拉加载; 默认true
+					page: {
+						num: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
+						size: 10 // 每页数据的数量,默认10
+					},
+					noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
+					empty: {
+						icon:'https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/no_data.png',
+						tip: '暂无数据'
+					},
+					textNoMore:"已经到底了",
+				},
+				// 列表数据
+				dataList: [],
+				companyId:null,
+				companyUserId:null,
+			};
+		},
+		onLoad(option) {
+			if(option.key!=undefined){
+				this.form.productName = option.key
+			}
+			if(option.id != undefined){
+				this.form.id= option.id
+			}
+			if(option.type!=undefined){
+				this.searchChange(option.type)
+			}
+			this.companyId = option.companyId||'';
+			this.companyUserId = option.companyUserId||'';
+			this.form.companyId=option.companyId||'';
+			this.form.companyUserId=option.companyUserId||'';
+		},
+		methods:{
+			goSearch(e) {
+				this.form.productName=e.detail.value;
+				this.mescroll.resetUpScroll();
+			},
+			searchChange(type){
+				
+				this.mescroll.resetUpScroll();
+			},
+			showChange(type){
+				this.showType=type;
+			},
+			mescrollInit(mescroll) {
+				this.mescroll = mescroll;
+			},
+			/*下拉刷新的回调 */
+			downCallback(mescroll) {
+				mescroll.resetUpScroll()
+			},
+			upCallback(page) {
+				// 与 newindex 瀑布流使用同一接口:getHomeGoods,id 为分类(0=全部)
+				//联网加载数据
+				var that = this;
+				this.form.pageNum=page.num;
+				this.form.pageSize=page.size;
+				getStoreProductList(this.form).then(res => {
+					if(res.code==200){
+						//设置列表数据
+						if (page.num == 1) {
+							that.dataList = res.data.list; 
+							
+						} else {
+							that.dataList = that.dataList.concat(res.data.list);
+							 
+						}
+						that.mescroll.endBySize(res.data.list.length, res.data.total);
+						
+					}else{
+						uni.showToast({
+							icon:'none',
+							title: "请求失败",
+						});
+						that.dataList = null;
+						that.mescroll.endErr();
+					}
+				}).catch(() => {
+				that.dataList = page.num == 1 ? [] : that.dataList
+				that.mescroll.endErr()
+			})
+			},
+			// 价格升序是否选中
+			priceUp(value) {
+				this.priceIsUp = value
+				this.priceIsDown = false
+			},
+			// 价格降序是否选中
+			priceDown(value) {
+				this.priceIsDown = value
+				this.priceIsUp = false
+			},
+			// 销量升序是否选中
+			saleUp(value) {
+				this.saleIsUp = value
+				this.saleIsDown = false
+			},
+			// 销量降序是否选中
+			saleDown(value) {
+				this.saleIsDown = value
+				this.saleIsUp = false
+			},
+			// 查看详情
+			showDetail(item) {
+				uni.navigateTo({
+					url: './productDetails?productId='+item.productId+"&companyId="+this.companyId+"&companyUserId="+this.companyUserId
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.top-fixed{
+		width: 100%;
+		position: fixed;
+		top: 0;
+		left: 0;
+		z-index: 10;
+	}
+	.search-cont{
+		padding: 16upx 30upx;
+		background-color: #FFFFFF;
+		display:flex;
+		align-items: center;
+		justify-content: space-between;
+		.inner{
+			box-sizing: border-box;
+			width: 100%;
+			height: 72upx;
+			background: #F7F7F7;
+			border-radius: 36upx;
+			display: flex;
+			align-items: center;
+			padding: 0 30upx;
+			.icon-search{
+				width: 28upx;
+				height: 28upx;
+				margin-right: 20upx;
+			}
+			input{
+				height: 60upx;
+				line-height: 60upx;
+				flex: 1;
+			}
+			
+		}
+		.icon-search{
+			margin-left: 10upx;
+			width: 40upx;
+			height: 40upx;
+			image{
+				width: 40upx;
+				height: 40upx;
+			}
+			
+		}
+	}
+	.sort-box{
+		height: 88upx;
+		background: #FFFFFF;
+		padding: 0 100upx;
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		.item{
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			&.active .label{
+				color: #FF233C;
+			}
+			.label{
+				font-size: 26upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #666666;
+				line-height: 1;
+			}
+			.sort-img{
+				height: 20upx;
+				display: flex;
+				flex-direction: column;
+				justify-content: space-between;
+				margin: 3upx 0 0 10upx;
+				image{
+					width: 12upx;
+					height: 8upx;
+				}
+			}
+		}
+	}
+	.goods-grid {
+		padding: 20rpx;
+		display: flex;
+		flex-direction: column;
+		gap: 20rpx;
+		// display: flex;
+		// flex-wrap: wrap;
+		// gap: 20rpx;
+	}
+	.goods-grid .grid-item {
+		width: 100%;
+	}
+</style>

+ 476 - 0
pages_company/managerOrder/productShowDetails.vue

@@ -0,0 +1,476 @@
+<template>
+	<view class="content">
+		<!-- 商品轮播图片 -->
+		<view class="shop-banner" @click="showImg()">
+			<swiper
+				class="swiper" 
+				:indicator-dots="false" 
+				:circular="true" 
+				:autoplay="true" 
+				:interval="3000" 
+				:duration="1000"
+				indicator-color="rgba(255, 255, 255, 0.6)"
+				indicator-active-color="#ffffff"
+				@change="swiperChange"
+			>
+				<swiper-item  class="swiper-item" v-for="(item,index) in  banner" :key="index">
+					<image :src="item" mode="aspectFill"></image>
+				</swiper-item>
+			</swiper>
+			<!-- 底部遮罩 -->
+			<view class="banner-mask"></view>
+			<!-- 数量 -->
+			<view class="num-box">{{ activeBanner }}/{{ banner.length }}</view>
+		</view>
+		<!-- 详细信息 -->
+		<view class="det-info">
+			<view class="price-box">
+				<view class="price">
+					<text class="label">会员价</text>
+					<text class="unit">¥</text>
+					<text class="num" >{{product.price}}</text>
+					<text class="label">零售价</text>
+					<text class="old" >¥{{product.otPrice}}</text>
+				</view>
+			</view>
+			<view class="name-box">
+				<!-- <view class="tag">{{utils.getDictLabelName("storeProductType",product.productType)}}</view> -->
+				{{product.productName}}
+			</view>
+			<view class="intro">
+				{{product.productInfo}}
+			</view>
+			<!-- <view class="safe-box">
+				<image src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/safe.png" mode=""></image>
+				<text class="text">免邮发货</text>
+				<view class="line"></view>
+				<text class="text">药师服务</text>
+				<view class="line"></view>
+				<text class="text">隐私保护</text>
+			</view> -->
+		</view>
+		<!-- 购买人数、库存 -->
+		<view class="inventor">
+			<view class="left">
+				<!-- <view class="head-box">
+					<view class="head" v-for="(item,j) in 5" :key="j">
+						<image src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/head.jpg" mode=""></image>
+					</view>
+				</view> -->
+				<view class="num-box">
+					已有 <text class="text">{{product.sales}}</text> 人购买
+				</view>
+			</view>
+			<!-- <view class="right">
+				库存 <text class="text">{{product.stock}}{{product.unitName}}</text>
+			</view> -->
+		<!-- 	<view class="right">
+				 <text class="text">库存{{product.stock>0?'充足':'售罄'}} </text>
+			</view> -->
+		</view>
+		<!-- 功效 -->
+		<!-- <view class="effect">
+			<view class="label">产品说明书</view>
+			<view class="label">查看</view>
+			
+		</view> -->
+		<!-- 图文详情 -->
+		<view class="det-box">
+			<view class="title">图文详情</view>
+			<view class="inner">
+				<view  v-html="product.description" style="font-size:0"></view>
+			</view>
+		</view>
+		
+		<view class="loadding" v-if="loadding==true">
+			<image src="../..https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/app/vip/share.png"></image>
+			<text class="text">加载中...</text>
+		</view>
+		
+
+	</view>
+</template>
+
+<script>
+	import {getDicts} from '@/api/index'
+	import {getProductDetails,getCartCount,addCart} from '@/api/product'
+	export default {
+		components: {
+		},
+		data() {
+			return {
+				banner:[],
+				productId:null,
+				product:{
+					price:0,
+					otPrice:0,
+				},
+				// 当前轮播的图片
+				activeBanner: 0,
+				loadding:true,
+			};
+		},
+		onLoad(options) {
+			this.getDicts();
+			this.productId = options.productId;
+		},
+		onShow() {
+			this.getProductDetails();
+		},
+		 
+		methods: {
+			getDicts:function(){
+				getDicts().then(
+					res => {
+						if(res.code==200){
+							uni.setStorageSync('dicts',JSON.stringify(res));
+						} 
+						 
+					},
+					rej => {}
+				);
+			},
+			showImg() {
+				 //预览图片
+				 uni.previewImage({
+				 	urls: this.banner,
+				 	current: this.banner[0]
+				 });
+			},
+			 
+			getProductDetails(){
+				let data = {productId:this.productId};
+				getProductDetails(data).then(
+					res => {
+						this.loadding=false;
+						if(res.code==200){
+							this.product=res.product;
+							this.product.otPrice=this.product.otPrice.toFixed(2);
+							this.product.price=this.product.price.toFixed(2);
+							if(this.product.sliderImage!=null){
+								this.banner=this.product.sliderImage.split(',');
+							}
+							else{
+								this.banner=[]
+							}
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: res.msg,
+							});
+							setTimeout(function(){
+								uni.reLaunch({
+									url: '/pages/home/index',
+								})
+							},2000)
+							
+						}
+					},
+					rej => {}
+				);
+			},
+			// swiper变化事件
+			swiperChange(event) {
+				this.activeBanner = event.detail.current + 1
+			},
+		}
+	}
+</script>
+
+<style lang="scss">
+	.shop-banner{
+		height: 756upx;
+		background-color: #FFFFFF;
+		position: relative;
+		.swiper-item{
+			box-sizing: border-box;
+		}
+		.swiper,
+		.swiper-item,
+		.swiper-item image{
+			width: 100%;
+			height: 100%;
+		}
+		.banner-mask{
+			width: 100%;
+			height: 44upx;
+			// background: linear-gradient(0deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0));
+			// opacity: 0.8;
+			position: absolute;
+			left: 0;
+			bottom: 0;
+			z-index: 9;
+			background-image: url(https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/black_mask.png);
+			background-size: 20upx 44upx;
+			background-repeat: repeat-x;
+		}
+		.num-box{
+			width: 80upx;
+			height: 44upx;
+			line-height: 44upx;
+			text-align: center;
+			font-size: 24upx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #FFFFFF;
+			background: rgba(0, 0, 0, .3);
+			border-radius: 22upx;
+			position: absolute;
+			right: 30upx;
+			bottom: 30upx;
+			z-index: 10;
+		}
+	}
+	.det-info{
+		background: #FFFFFF;
+		padding: 36upx 30upx 25upx;
+		.price-box{
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			.price{
+				display: flex;
+				align-items: flex-end;
+				.label{
+					color: #333;
+					font-size: 28upx;
+					font-family: PingFang SC;
+					line-height: 1.3;
+					margin-right: 5upx;
+				}
+				.unit{
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #FF6633;
+					line-height: 1.3;
+				}
+				.num{
+					font-size: 40upx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #FF6633;
+					margin: 0 20upx 0 10upx;
+					line-height: 1;
+				}
+				.old{
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					text-decoration: line-through;
+					color: #BBBBBB;
+					line-height: 1.3;
+				}
+			}
+			.share-box{
+				width: 120upx;
+				height: 46upx;
+				border: 1px solid #FF233C;
+				border-radius: 23upx;
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				position: relative;
+				.text{
+					font-size: 26upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #FF233C;
+				}
+				image{
+					margin-left: 2rpx;
+					width: 25upx;
+					height: 24upx;
+				}
+				.share{
+					display: inline-block;
+					position: absolute;
+					top: 0;
+					left: 0;
+					width: 100%;
+					height: 100%rpx;
+					opacity: 0;
+				}
+			}
+			.spec{
+				font-size: 24upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #999999;
+				line-height: 36upx;
+			}
+		}
+		.name-box{
+			font-size: 32upx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #111111;
+			line-height: 44upx;
+			margin-top: 32upx;
+			.tag{
+				display: inline-block;
+				padding: 0 6upx;
+				height: 30upx;
+				background: linear-gradient(90deg, #66b2ef 0%, #FF233C 100%);
+				border-radius: 4upx;
+				margin-right: 10upx;
+				font-size: 22upx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #FFFFFF;
+				line-height: 30upx;
+				float: left;
+				margin-top: 7upx;
+			}
+		}
+		.intro{
+			font-size: 26upx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #999999;
+			line-height: 36upx;
+			padding: 18upx 0 23upx;
+			border-bottom: 1px solid #f7f7f7;
+		}
+		.safe-box{
+			display: flex;
+			align-items: center;
+			padding-top: 24upx;
+			image{
+				width: 20upx;
+				height: 24upx;
+				margin-right: 20upx;
+			}
+			.text{
+				font-size: 22upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #999999;
+				line-height: 1;
+			}
+			.line{
+				width: 1px;
+				height: 23upx;
+				background: #EDEEEF;
+				margin: 0 20upx;
+			}
+		}
+	}
+	.inventor{
+		height: 88upx;
+		padding: 0 39upx 0 30upx;
+		margin-top: 10upx;
+		background: #FFFFFF;
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		.left{
+			display: flex;
+			align-items: center;
+			.head-box{
+				margin-right: 27upx;
+				display: flex;
+				align-items: center;
+				.head{
+					width: 48upx;
+					height: 48upx;
+					border-radius: 50%;
+					overflow: hidden;
+					box-shadow: 0 0 0 1px #fff;
+					margin-right: -10upx;
+					image{
+						width: 100%;
+						height: 100%;
+					}
+				}
+			}
+			.num-box{
+				font-size: 24upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #999999;
+				.text{
+					font-size: 24upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #999999;
+				}
+			}
+		}
+		.right{
+			font-size: 24upx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #999999;
+			.text{
+				font-size: 24upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #666666;
+			}
+		}
+	}
+	.effect{
+		box-sizing: border-box;
+		padding: 20upx 30upx;
+		background: #FFFFFF;
+		font-size: 28upx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #666666;
+		line-height: 1.8;
+		margin-top: 10upx;
+		display: flex; 
+		flex-direction: row;
+		align-items: center;
+		justify-content: space-between;
+		.label{
+			font-size: 28upx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #111111;
+			line-height: 1.8;
+		}
+	}
+	.det-box{
+		margin-top: 10upx;
+		padding: 40upx 30upx;
+		background-color: #FFFFFF;
+		.title{
+			font-size: 30upx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #333333;
+			line-height: 1;
+			margin-bottom: 25upx;
+		}
+		
+	}
+	
+   .loadding{
+	 	background-color: #fff;
+	 	display: flex;
+	 	flex-direction: column;
+	 	align-items: center;
+	 	justify-content: center;
+	 	position: absolute;
+	 	top: 0;
+	 	left: 0;
+	 	width: 100%;
+	 	height: 100%;
+	 	z-index: 9999;
+	 	image{
+	 		border-radius: 50%;
+	 		animation: load linear 1s infinite;
+	 		width: 120rpx;
+	 		height:120rpx;
+	 	}
+	 	.text{
+	 		font-size: 28rpx;
+	 		margin-top: 20rpx;
+	 	}
+	 }
+	 
+	 
+	 
+</style>

Разлика између датотеке није приказан због своје велике величине
+ 739 - 45
pages_course/video - old.vue


Разлика између датотеке није приказан због своје велике величине
+ 1753 - 138
pages_course/video.vue


+ 4252 - 0
pages_course/videovip-1.vue

@@ -0,0 +1,4252 @@
+<template>
+	<view class="content ">
+		<!-- <view class="header-nav" :style="{height: `calc(88rpx + ${statusBarHeight}px)`,paddingTop: statusBarHeight + 'px'}"> -->
+		<!-- <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="notice-box" v-if="isLogin&&isAddKf==1">
+			
+			<view class="notice-marquee-wrap">
+				<view class="notice-marquee-track">
+					<view class="notice-text"><image src="/static/images/notice.png"></image>{{notice || '央广网独家溯源&nbsp;&nbsp;全品类100%经过国标检测'}}</view>
+					<view class="notice-text"><image src="/static/images/notice.png"></image>{{notice || '央广网独家溯源&nbsp;&nbsp;全品类100%经过国标检测'}}</view>
+					<!-- <view class="notice-text"><image src="/static/images/notice.png"></image>央广网独家溯源&nbsp;&nbsp;全品类100%经过国标检测</view> -->
+				</view>
+			</view>
+		</view>
+		<view class="video-box" :style="{'height':isShu?'calc(100vh - 264rpx)':'420rpx'}" >
+			<image v-if="!isLogin || isAddKf!=1" class="video-poster" :src="courseInfo.imgUrl" mode="aspectFill">
+			</image>
+			<video @timeupdate="onTimeUpdate" @progress="progressChange" @error="videoErrorCallback" @play="getPlay"
+				@pause="getPause" @ended="getEnded" @fullscreenchange="fullscreenchange" :title="courseInfo.title" 
+				style="width: 100%;" :style="{'height':isShu?'100%':'420rpx'}" :poster="poster" id="video-content-box" controls
+				:auto-pause-if-open-native="true" :auto-pause-if-navigate="true" :enable-progress-gesture="false"
+				:show-progress="true" :picture-in-picture-mode="[]" :show-background-playback-button="false"
+				:src="videoUrl">
+					<cover-view v-if="remainTime > 0" class="progress-countdown">
+						<!-- <cover-view class="progress-title">完课积分</cover-view> -->
+						<cover-image class="progress-img" src="/static/images/wk.png"></cover-image>
+						<!-- <cover-view class="progress-bar-bg">
+							<cover-view class="progress-bar-fill" :style="{ width: countdownPercentage + '%' }"></cover-view>
+						</cover-view> -->
+						<cover-view class="progress-text">
+							<cover-view class="progress-text-label">倒计时</cover-view>
+							<cover-view style="font-size: 13px;">{{ formattedCountdown.hours||'00' }}:{{ formattedCountdown.minutes||'00' }}:{{ formattedCountdown.seconds||"00" }}</cover-view>
+						</cover-view>
+					</cover-view>
+					<!-- 虚拟下单跑马灯:视频顶层覆盖,向上滚动淡出切换 -->
+					<cover-view class="vip-order-cover-wrap vip-order-cover-wrap--triple" v-if="showFakeMarqueeOnVideoCover && isTripleMarqueeMode && marqueeTriplePayloads.length">
+						<cover-view class="vip-order-cover-triple-panel vip-order-cover-triple-current" :class="[marqueeTripleSwitching ? 'vip-order-triple-leave' : '']">
+							<cover-view
+								class="vip-order-cover-item vip-order-cover-triple-item"
+								v-for="(row, idx) in marqueeTriplePayloads"
+								:key="'triple-current-' + idx + '-' + row.nickname + row.timeOffset"
+								:class="[row.type === 'self' ? 'vip-order-cover-self' : '']"
+							>
+								<cover-view class="vip-order-cover-content" v-if="row.type === 'virtual' || row.type === 'self'">
+									<cover-view class="vip-order-seg vip-order-seg-user">{{ row.nickname }}{{ row.maskedId }}</cover-view>
+									<cover-view class="vip-order-seg vip-order-seg-time">{{ row.timeOffset }}{{ row.suffix }}</cover-view>
+									<!-- <cover-view class="vip-order-seg vip-order-seg-suffix"></cover-view> -->
+								</cover-view>
+								<cover-view class="vip-order-cover-content" v-else>
+									{{ row.fullText }}
+								</cover-view>
+							</cover-view>
+						</cover-view>
+						<cover-view v-if="marqueeTripleSwitching && marqueeTripleIncomingPayloads.length" class="vip-order-cover-triple-panel vip-order-cover-triple-incoming vip-order-triple-enter">
+							<cover-view
+								class="vip-order-cover-item vip-order-cover-triple-item"
+								v-for="(row, idx) in marqueeTripleIncomingPayloads"
+								:key="'triple-incoming-' + idx + '-' + row.nickname + row.timeOffset"
+								:class="[row.type === 'self' ? 'vip-order-cover-self' : '']"
+							>
+								<cover-view class="vip-order-cover-content" v-if="row.type === 'virtual' || row.type === 'self'">
+									<cover-view class="vip-order-seg vip-order-seg-user">{{ row.nickname }}{{ row.maskedId }}</cover-view>
+									<cover-view class="vip-order-seg vip-order-seg-time">{{ row.timeOffset }}{{ row.suffix }}</cover-view>
+									<!-- <cover-view class="vip-order-seg vip-order-seg-suffix"></cover-view> -->
+								</cover-view>
+								<cover-view class="vip-order-cover-content" v-else>
+									{{ row.fullText }}
+								</cover-view>
+							</cover-view>
+						</cover-view>
+					</cover-view>
+					<cover-view class="vip-order-cover-wrap" v-else-if="showFakeMarqueeOnVideoCover && marqueeDisplayPayload">
+						<cover-view
+							class="vip-order-cover-item vip-order-cover-current"
+							:class="[
+								marqueeSwitching ? 'vip-order-leave' : '',
+								marqueeDisplaySelf ? 'vip-order-cover-self' : ''
+							]"
+						>
+							<cover-view class="vip-order-cover-content" v-if="marqueeDisplayPayload.type === 'virtual' || marqueeDisplayPayload.type === 'self'">
+								<cover-view class="vip-order-seg vip-order-seg-user">{{ marqueeDisplayPayload.nickname }}{{ marqueeDisplayPayload.maskedId }}</cover-view>
+								<cover-view class="vip-order-seg vip-order-seg-time">{{ marqueeDisplayPayload.timeOffset }}{{ marqueeDisplayPayload.suffix }}</cover-view>
+								<!-- <cover-view class="vip-order-seg vip-order-seg-suffix"></cover-view> -->
+							</cover-view>
+							<cover-view class="vip-order-cover-content" v-else>
+								{{ marqueeDisplayPayload.fullText }}
+							</cover-view>
+						</cover-view>
+						<cover-view
+							v-if="marqueeSwitching && marqueeIncomingPayload"
+							class="vip-order-cover-item vip-order-cover-incoming"
+							:class="[
+								'vip-order-enter',
+								marqueeIncomingSelf ? 'vip-order-cover-self' : ''
+							]"
+						>
+							<cover-view class="vip-order-cover-content" v-if="marqueeIncomingPayload.type === 'virtual' || marqueeIncomingPayload.type === 'self'">
+								<cover-view class="vip-order-seg vip-order-seg-user">{{ marqueeIncomingPayload.nickname }}{{ marqueeIncomingPayload.maskedId }}</cover-view>
+								<cover-view class="vip-order-seg vip-order-seg-time">{{ marqueeIncomingPayload.timeOffset }}{{ marqueeIncomingPayload.suffix }}</cover-view>
+								<!-- <cover-view class="vip-order-seg vip-order-seg-suffix"></cover-view> -->
+							</cover-view>
+							<cover-view class="vip-order-cover-content" v-else>
+								{{ marqueeIncomingPayload.fullText }}
+							</cover-view>
+						</cover-view>
+					</cover-view>
+					<cover-view
+					  class="goods-cover" 
+					  :style="{ display:isFull&&cardPopup && currentCardItem ? 'block' : 'none'}"
+					  @click.stop="goBuy(currentCardItem)"
+					>
+					  <!-- 关闭按钮 -->
+					  <cover-view class="close-box" @click.stop="closeCardPopup">
+					    <cover-image src="/static/images/close.png"></cover-image>
+					  </cover-view>
+					
+					  <cover-view class="goods-cover-inner">
+					    <!-- 商品主图 -->
+					    <cover-view class="goods-cover-img">
+							<cover-image 
+							    style="width:150px;height:150px;object-fit:cover;"
+							    :src="currentCardItem.images"
+							    mode="aspectFit"
+							  ></cover-image>
+						</cover-view>
+					    <cover-view class="goods-cover-info">
+					      <cover-view class="goods-cover-title">{{ currentCardItem.productName || '-' }}</cover-view>
+					      
+					      <cover-view class="goods-cover-bottom">
+					        <cover-view class="goods-cover-tag">
+					          <cover-image class="goods-cover-tag-bg" src="/static/images/pbg.png" mode="widthFix"></cover-image>
+					          <cover-view class="goods-cover-tag-text">惊喜价</cover-view>
+					        </cover-view>
+					        
+					        <cover-view class="goods-cover-price">
+					          <cover-view class="unit">¥</cover-view>
+					          <cover-view class="price">
+					            {{ currentCardItem.price || '0.00' }}
+					          </cover-view>
+					        </cover-view>
+					      </cover-view>
+					    </cover-view>
+					  </cover-view>
+					</cover-view>
+			</video>
+		</view>
+		<!-- 商品卡片弹窗 -->
+		<view class="goods-card" :style="{'bottom':isShu?'280rpx':'220rpx'}" v-if="!isFull&&cardPopup && currentCardItem" @click.stop="goBuy(currentCardItem)">
+			<view class="close-box" @click.stop="closeCardPopup">
+				<image src="/static/images/close.png"></image>
+			</view>
+			<view class="goods-card-inner">
+				<image class="goods-card-img" :src="currentCardItem.images" mode="aspectFill"></image>
+				<view class="goods-card-info">
+					<view class="goods-card-title">{{ currentCardItem.productName || '-' }}</view>
+					<view class="goods-card-bottom">
+						<view class="goods-card-tag">
+							<image class="goods-card-tag-bg" src="/static/images/pbg.png" mode="widthFix"></image>
+							<view class="goods-card-tag-text">惊喜价</view>
+						</view>
+						<view class="goods-card-price">
+							<view class="unit">¥</view>
+							<text class="price">
+								{{ currentCardItem.price || '0.00' }}
+							</text>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<!-- <view v-if="remainTime > 0" class="progress-countdown end">
+			<view class="progress-title">完课积分</view>
+			<view class="progress-bar-bg">
+				<view class="progress-bar-fill" :style="{ width: countdownPercentage + '%' }"></view>
+			</view>
+			<view class="progress-text">
+				<text style="font-size: 24rpx;line-height: 40rpx;">倒计时</text>{{ formattedCountdown.hours||'00' }}:{{ formattedCountdown.minutes||'00' }}:{{ formattedCountdown.seconds||"00" }}
+			</view>
+		</view> -->
+		<!-- <view class="justify-start align-center fs24 base-color-9" v-if="userInfo.userId">
+			<view>{{nameuser?nameuser:'暂未授权昵称'}}#</view>
+			<view>{{userInfo.userId}}</view>
+		</view> -->
+		<!-- <view class="title-content" id="title-content"> -->
+			<!-- 答题时展示小节课程名,其他展示课程名 -->
+			<!-- 小节课程名 -->
+			<!-- <view class="subtitlebox " v-if="isLogin&&isAddKf==1">
+				{{courseInfo.title}}
+			</view> -->
+			<!-- 课程名字 -->
+			<!-- <view class="miantitlebox" v-else>
+				{{courseInfo.courseName}}
+			</view> -->
+		<!-- </view> -->
+		<!-- <scroll-view  style="display:none;"  v-show="!isShu" class="scroll-view" :style="{height: height}" :scroll-top="scrollTop" scroll-y="true"> -->
+			<!-- 无效或者已过期 -->
+			<!-- <view class="nocourse" v-if="msg">
+				<image :src="imgPath+'/app/image/course_expiration_img.png'" mode="widthFix"></image>
+				<view>{{msg}}</view>
+			</view> -->
+			<!-- 问题 -->
+			<!-- <view class="ques-content" v-if="isLogin&&isAddKf==1&&!isquestion">
+				<view v-if="isLogin">
+					<view class="ques-content-tit" v-if="!isquestion"
+						@click="tabChange(0)">问答题</view> -->
+					<!-- <view class="ques-content-tit" v-if="showTreatment==0"
+						:style="{ color: currentId==1? '#FF5C03':'#222'}" @click="tabChange(1)">商品</view> -->
+				<!-- </view> -->
+					<!-- <view v-for="(item,index) in quesList" :key="index">
+						<view class="ques-title">
+							<text>{{index + 1}}.</text> -->
+							<!-- <view class="ques-type" v-show="item.type == 1 || item.type == 2">
+								{{item.type == 1 ? '单选' : item.type == 2 ? '多选' : ''}}
+							</view> -->
+				<!-- 			<text class="fs40">{{item.title}}</text>
+						</view>
+						<view :class="isAnswer(item,option.name) ?'ques-option ques-option-active':'ques-option'"
+							v-for="(option,idx) in item.questionOption" :key="idx" @click="handleAnswer(item,option)">
+							<view class="fs40">
+								{{numberToLetter(idx)}}.
+							</view>
+							<view class="fs40">{{option.name}}</view>
+						</view>
+					</view>
+			</view>
+		</scroll-view> -->
+		<!-- 评价 -->
+		<view class="rating-box" v-if="isLogin&&isAddKf==1&&!isquestion&&!isShu">
+			<image class="bg" src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/app/vip/bg-back.png" mode="widthFix"></image>
+			<view class="rating-body" v-for="(item,index) in quesList" :key="index" >
+				<view class="title">{{item.title}}</view>
+				<view class="sat-box">
+					<view class="sat" v-for="(option,idx) in item.questionOption" :key="idx"  :class="aindex==option.indexId?'sat--active':''" @click="handleAnswer(item,option)">
+						<view class="sat-img-wrap" :class="rateBounceIndex==option.indexId?'sat-img-bounce':''">
+							<image :src="aindex==option.indexId?rateList[option.indexId].selIcon:rateList[option.indexId].icon" mode="aspectFit"></image>
+						</view>
+						<text :class="aindex==option.indexId?'active':''">{{option.name}}</text>
+					</view>
+					<!-- <view class="sat">
+						<image src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/app/vip/hsat_sel.png"></image>
+						<text>满意</text>
+					</view>
+					<view class="sat">
+						<image src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/app/vip/hsat_sel.png"></image>
+						<text>一般</text>
+					</view>
+					<view class="sat">
+						<image src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/app/vip/hsat_sel.png"></image>
+						<text>不满意</text>
+					</view> -->
+				</view>
+			</view>
+		</view>
+		<!-- 线路 -->
+		<!-- <view class="video-line" @click="openPop" v-if="isLogin&&isAddKf==1">
+			<image :src="imgPath+'/app/image/changePlayer-icon.png'"></image>
+			<text>线路{{lineIndex + 1 | numberToChinese}}</text>
+		</view> -->
+		<!-- 线路弹窗 -->
+		<!-- <uni-popup ref="popup" type="bottom"  class="full-width-popup">
+			<view class="popupbox">
+				<view class="popupbox-head">
+					<text>线路选择</text>
+					<image class="close-icon" :src="imgPath+'/app/image/tc_close_icon.png'" mode="aspectFill" @click="close">
+					</image>
+				</view>
+				<view class="popupbox-content">
+					<view :class="lineIndex == index ? 'line-item line-active': 'line-item'"
+						v-for="(it,index) in lineList" :key="index" @click="handleLine(index)">
+						线路{{index + 1 | numberToChinese}}</view>
+				</view>
+			</view>
+		</uni-popup> -->
+		<!-- 温馨提示弹窗 -->
+		<u-popup :show="tipsPopup" mode="center" :closeOnClickOverlay='true' @close='tipsPopup=!tipsPopup'
+			:safeAreaInsetBottom='false' round='12'>
+			<view class="tipsPopup-mask">
+				<image class="red_envelope_top" :src="imgPath+'/app/image/red_envelope_img.png'" mode="aspectFill">
+				</image>
+				<view class="tipsPopup">
+					<image class="tipsPopup-close" :src="imgPath+'/app/image/course_close_white_icon.png'"
+						mode="aspectFill" @click="closeTipsPop"></image>
+					<view class="tipsPopup-line">
+						<view class="tipsPopup-box">
+							<view class="tipsPopup-head">
+								<image class="tipsPopup-head-title" :src="imgPath+'/app/image/tips_title_img.png'"
+									mode="widthFix"></image>
+							</view>
+							<view class="tipsPopup-content">
+								<view class="tipsPopup-content-title">亲爱的用户,</view>
+								<view>您已经观看课程{{timepath}}的时间了,请注意休息并保持专注。</view>
+							</view>
+							<view class="tipsPopup-btn-box">
+								<view class="tipsPopup-btn" @click="closeTipsPop">继续观看领奖励</view>
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</u-popup>
+		<!-- 答题弹窗 -->
+		<u-popup :show="answerPopup" mode="center" @close="closepop()" @open="open" closeOnClickOverlay
+			:safeAreaInsetBottom='false' round='12'>
+			<view :class="errTitle == '恭喜你,回答正确' ? 'answerPopup-box bg':'answerPopup-box'">
+				<!-- 正确 -->
+				<image class="tipimg" v-if="errTitle == '恭喜你,回答正确'" :src="imgPath+'/app/image/course_answer_img.png'"
+					mode="aspectFill"></image>
+				<!-- 错误 -->
+				<image class="tipimg" v-else :src="imgPath+'/app/image/course_answer_incorrectly_img.png'"
+					mode="aspectFill">
+				</image>
+				<view class="answerPopup-title">{{errTitle}}</view>
+				<view class="answerPopup-desc" v-html="errDesc"></view>
+				<!-- 选择奖励 -->
+				<!-- 错误题目 -->
+				<view class="errQuesbox" v-if="errQues&&errQues.length>0">
+					<view class="errQuesbox-item textOne" v-for="(it,index) in errQues" :key="index">{{it.title}}</view>
+				</view>
+				<view class="answerPopup-btn" v-if="errTitle == '恭喜你,回答正确'" @click="closeAnswerPopup">点击领取红包</view>
+				<view class="tipsPopup-btn-box" v-else
+					:style="{marginTop: errQues&&errQues.length>0 ? '40rpx':'54rpx'}">
+					<view class="tipsPopup-btn" @click="closeAnswerPopup">{{remain > 0 ? '重新答题': '确认'}}</view>
+				</view>
+			</view>
+		</u-popup>
+		<!-- 客服二维码弹窗 -->
+		<u-popup :show="kfPopup" mode="center" :mask-click="false" round='12' @close="kefpop">
+			<view class="kfqrcode-box">
+				<view class="justify-start align-center fs24 base-color-9">
+					<view>{{nameuser}}#</view>
+					<view>{{userInfo.userId}}</view>
+				</view>
+				<view>请添加客服</view>
+				<image class="kfqrcode" :src="qrcode" show-menu-by-longpress="true" mode="aspectFit"></image>
+				<!-- <view v-show="qrcodeMsg" style="margin-top: 30rpx;" v-html="qrcodeMsg"></view> -->
+				<!-- <image class="kfqrcode-close" :src="imgPath+'/app/image/course_close_white_icon.png'" mode="aspectFill"
+					@click="closeKFPop"></image> -->
+			</view>
+		</u-popup>
+		<u-popup :show="timepop" mode="center" round='12'>
+			<view class="timepopbox center column">
+				<view class="fs40 bold ">不在看课时间范围内</view>
+				<view class="mtb20">看课时间</view>
+				<view>{{videocont.startDateTime}}</view>
+				<view>至</view>
+				<view>{{videocont.endDateTime}}</view>
+				<view class="base-bg-orange colorf p20 radius50 mt20" @click="getH5CourseVideoDetails">刷新时间</view>
+			</view>
+		</u-popup>
+		<u-popup :show="userlogo" mode="bottom" round='12'>
+			<view class="userlogo column">
+				<view class="mtb30 justify-start align-center ml20">
+					<u-avatar :src="imgPath+'/app/image/logo.jpg'" size="50"></u-avatar>
+					<view class="bold mlr20">{{imgname}}</view>
+					<view>申请</view>
+				</view>
+				<view class="bold fs36 ml20">授权你的昵称头像信息</view>
+				<view class="mtb20 justify-between align-center  plr20">
+					<view class="justify-start align-center">
+						<view class="boxweixin" :class="userinfos.nickname==''?'boxnosel':'boxsel'">
+							<view v-if="userinfos.nickname">√</view>
+						</view>
+						<view class="ml20">
+							<view class="base-color-3 bold">第一步</view>
+							<view class="fs32 base-color-9">请点击授权微信昵称</view>
+						</view>
+					</view>
+					<view class="button-container">
+						<input type="nickname" class="hidden-input" @blur="onNickNameInput" @input="onNickNameInput" />
+						<button class="custom-button"
+							:class="nameuser==''?'subname':'subavt'">{{nameuser?"已授权":'允许授权'}}</button>
+					</view>
+				</view>
+				<view class="mtb20 justify-between align-center  plr20 mt40">
+					<view class="justify-start align-center">
+						<view class="boxweixin" :class="userinfos.nickname==''?'boxnosel':'boxsel'">
+							<view v-if="userinfos.avatar">√</view>
+						</view>
+						<view class="ml20">
+							<view class="base-color-3 bold">第二步</view>
+							<view class="fs32 base-color-9">请点击授权微信头像</view>
+						</view>
+					</view>
+					<view class="button-container">
+						<button open-type="chooseAvatar" @chooseavatar="onChooseAvatar" class="hidden-input"
+							v-if="nameuser">
+							允许授权
+						</button>
+						<button class="custom-button sub" @click="shouquan" v-if="nameuser==''">允许授权</button>
+						<button class="custom-button " :class="avataruser==''?'subname':'subavt'"
+							v-else>{{avataruser?"已授权":'允许授权'}}</button>
+					</view>
+				</view>
+				<view class="submitname" @click="confimrname" :class="nameuser&&avataruser?'subact':'sub'">确定</view>
+			</view>
+		</u-popup>
+		<u-popup :show="isCart"  @close="closeShop" round="20rpx" bgColor="#fff">
+			<scroll-view class="scroll-view" style="height:500rpx;box-sizing: border-box;padding: 24rpx;" scroll-y="true" enable-flex>
+				<goodsList ref="goodsList" :treatmentPackage="displayProductList" :urlOption="urlOption"></goodsList>
+			</scroll-view>
+		</u-popup>
+		<u-popup :show="isMore"  @close="closeMore" round="20rpx" bgColor="#fff">
+			<view class="more-actions-popup">
+				<view class="more-action-item"
+					@click="navgetTo('/pages_user/user/storeOrder?status=')">
+					<u-icon name="shopping-cart" color="#FF233C" size="40"></u-icon>
+					<view class="action-label">我的订单</view>
+				</view>
+				<view class="more-action-item"
+					@click="navgetTo('/pages_user/user/integralLogsList')">
+					<u-icon name="calendar" color="#FF233C" size="40"></u-icon>
+					<view class="action-label">积分记录</view>
+				</view>
+				<view class="more-action-item" @click="navgetTo('/pages_user/user/integralGoodsList')">
+					<u-icon name="gift" color="#FF233C" size="40"></u-icon>
+					<view class="action-label">兑换好礼</view>
+				</view>
+			</view>
+		</u-popup>
+		<!-- <view class="footer-tips">重庆云联融智提供技术支持</view> -->
+		<!-- footer -->
+		<view class="footer" v-if="videoId">
+			<view class="btns" :style="{'justify-content':isLogin&&isAddKf==1&&!isquestion&&remainTime==0?'space-between':'flex-end'}">
+				<!-- <button
+					class="author-btn"
+					open-type="getPhoneNumber"
+					@getphonenumber="phoneLogin"  v-if="!isquestion&&authType==1">{{isLogin&&isAddKf==1 ? '提交答案领取奖励' : '立即学习'}}</button> -->
+				<!-- <button
+					class="author-btn"
+					open-type="getUserInfo" :disabled="userdisabled"
+					@getuserinfo="userInfologin"  v-if="authType==0&&!isquestion">{{isLogin&&isAddKf==1 ? '提交答案领取奖励' : '立即学习'}}</button> -->
+				
+				<template v-if="!isquestion">
+					<button class="author-btn" @click="openList" v-if="isLogin&&isAddKf==1&&isShu">评价得积分<image src="/static/images/jifen.png"></image>
+					</button>
+					<button class="author-btn" @click="submit" v-if="isLogin&&isAddKf==1&&remainTime==0&&!isShu">评价得积分
+					<image src="/static/images/jifen.png"></image>
+					</button>
+				</template>
+				<button class="author-btn" @click="submit" v-if="!isLogin&&isAddKf!==1">立即学习</button>
+				<!-- <button
+					class="author-btn"
+					open-type="getUserInfo" :disabled="userdisabled"
+					@getuserinfo="userInfologin" v-if="authType==0&&!isLogin&&isAddKf!==1">立即学习</button> -->
+				<view class="author-cart">
+					<view class="more-box">
+						<image src="/static/images/more24.png" @click="showMore"></image>
+						<view class="tips">更多</view>
+					</view>
+					<image class="xianshi" v-if="showTreatment==0&&displayProductList.length>0&&!cardPopup" src="/static/images/xg.png"></image>
+					<view class="more-box" v-if="showTreatment==0">
+						<image  @click="showCart"  src="/static/images/cart.png"></image>
+						<view class="tips">去下单</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<!-- 更多操作弹窗 -->
+		<view>
+			<u-modal :show="showfalse" title="提示" :content='contentmsg' @confirm='showfalse=false'></u-modal>
+		</view>
+		<u-loading-page :loading="viewload" iconSize="32" loadingColor="#3c9cff" fontSize="24"
+			:loading-text="loadingtext"></u-loading-page>
+		<ykscreenRecord></ykscreenRecord>
+		<courseExpiration v-if="showExpiration" :code="resCode" :msg="resMsg" :qrcode="qrcode"
+			:userId="user && userInfo.userId ? userInfo.userId : ''"></courseExpiration>
+	</view>
+</template>
+
+<script>
+	import goodsList from "./components/goodsList.vue"
+	import {
+		generateRandomString
+	} from "@/utils/common.js"
+	import {
+		buildFakeOrderPool
+	} from '@/utils/videovipFakeMarquee.js'
+	import dayjs from 'dayjs';
+	import {
+		mapGetters
+	} from 'vuex';
+	import ykscreenRecord from "@/components/yk-screenRecord/yk-screenRecord.vue"
+	import courseExpiration from './components/courseExpiration.vue'
+	import {
+		getErrMsg,
+		getH5CourseByVideoId,
+		getH5CourseVideoDetails,
+		courseAnswer,
+		getFinishCourseVideo,
+		getIsAddKf,
+		getInternetTraffic,
+		getIntegralByH5Video,
+		sendReward,
+		getRealLink,
+		loginByMiniApp,
+		handleFsUserWx,
+		getRemainTime
+	} from "@/api/courseLook.js"
+	import {
+		loginByMp
+	} from "@/api/courseAuto.js"
+	import {
+		getConfigByKey
+	} from "@/api/user.js"
+	export default {
+		components: {
+			ykscreenRecord,
+			courseExpiration,
+			goodsList
+		},
+		data() {
+			return {
+				displayType:'',
+				isMore:false,//更多
+				isCart:false,//购物车
+				isShu:false,//竖屏默认
+				aindex:null,
+				rateBounceIndex: null,
+				_rateBounceTimer: null,
+				rateList:[{
+					id:0,
+					icon:'https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/app/vip/hsat.png',
+					name:'非常满意',
+					selIcon:'https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/app/vip/hsat_sel.png'
+				},
+				{
+					id:1,
+					icon:'https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/app/vip/sat.png',
+					name:'满意',
+					selIcon:'https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/app/vip/sat_sel.png'
+				},
+				{
+					id:2,
+					icon:'https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/app/vip/fari.png',
+					name:'一般',
+					selIcon:'https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/app/vip/fari_sel.png'
+				},
+				{
+					id:3,
+					icon:'https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/app/vip/unsat.png',
+					name:'不满意',
+					selIcon:'https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/app/vip/unsat_sel.png'
+				}
+				],
+				resMsg: "",
+				resCode: '',
+				showExpiration: false,
+				videoItem: {},
+				viewload: true,
+				loadingtext: "数据加载中...",
+				baseUrl: uni.getStorageSync('requestPath'),
+				// 1 红包 2 积分
+				rewardType: [{
+					name: '红包奖励',
+					value: 1
+				}, {
+					name: '积分奖励',
+					value: 2
+				}],
+				currentReward: 1,
+				player: null,
+				loading: true,
+				progress: 0,
+				code: null,
+				statusBarHeight: uni.getSystemInfoSync().statusBarHeight,
+				scrollTop: 0,
+				height: '0px',
+				isLogin: false,
+				videoUrl: "",
+				videoId: "",
+				//现在的时长
+				playTime: 0,
+				//总时长
+				duration: 0,
+				playDuration: 0,
+				// 用于续播
+				playDurationSeek: 0,
+				// 温馨提醒时间节点,
+				tipsTime: 0,
+				tipsOpen: false,
+				config: {},
+				courseInfo: {},
+				quesList: [],
+				lineList: [],
+				// 错题
+				errQues: [],
+				// 答题机会
+				remain: 0,
+				errTitle: "",
+				errDesc: "",
+				showPlay: true,
+				showControls: false,
+				playStatus: "",
+				isFull: false,
+				fullscreenToggleLock: false,
+				fullscreenToggleTimer: null,
+				isAddKf: 0,
+				lineIndex: 0,
+				// 是否展开
+				isExpand: true,
+				textHeight: 0, //文本高度
+				qwUserId: "",
+				qrcode: "",
+				corpId: "",
+				periodId: "", //营期id
+				companyUserId: "", //销售id
+				companyId: "", //公司id
+				courseId: "", //课程id
+				qrcodeMsg: "",
+				urlOption: {},
+				bufferRate: 0, // 缓冲时间
+				uuId: "",
+				isEnded: false,
+				// 是否允许拖动进度条
+				linkType: 0,
+				ip: null,
+				checked: true,
+				isFinish: 0, // 是否完课
+				interval: null,
+				intervalIntegral: null, // 积分定时
+				options: {
+					sources: [{
+						src: ""
+					}],
+					poster: "",
+					live: false /* 是否直播 */ ,
+					controls: true,
+					autoplay: false,
+					licenseUrl: 'https://license.vod2.myqcloud.com/license/v2/1323137866_1/v_cube.license', // license 地址,参考准备工作部分,在视立方控制台申请 license 后可获得 licenseUrl,
+					LicenseKey: 'bcc5bd9a14b798b48c52ff005a21d926',
+					controlBar: {
+						volumePanel: false,
+						playbackRateMenuButton: false,
+						QualitySwitcherMenuButton: false,
+						// progressControl: false
+					},
+					plugins: {
+						// ProgressMarker: false,
+						ContextMenu: {
+							statistic: false
+						}
+					},
+				},
+				// 错误请求次数
+				errorCount: 0,
+				answerPopup: false,
+				sortLink: "",
+				// 课程是否过期
+				isExpire: false,
+				menuButtonLeft: 281,
+				menuButtonH: 45,
+				timer: null,
+				flag: false,
+				msg: '',
+				poster: '',
+				userInfo: {},
+				timeid: '',
+				videocont: {},
+				timepop: false,
+				appToken: '',
+				kfPopup: false,
+				iskftype: 0,
+				courseLogo: '',
+				isquestion: false,
+				tipsPopup: false,
+				timepath: '3分之1',
+				tipsTime2: 0,
+				userlogo: false,
+				userinfos: {
+					nickname: "",
+					avatar: ""
+				},
+				headImg: '',
+				authType: 0, //0微信登录 1手机号登录
+				userdisabled: false,
+				projectId: '',
+				showfalse: false,
+				contentmsg: null,
+				currentId: 0,
+				showTreatment: 1,
+				treatmentPackage: [],
+				// 商品栏展示列表(根据上架/下架时间过滤)
+				displayProductList: [],
+				// 商品卡片弹窗
+				cardPopup: false,
+				currentCardItem: null,
+				// 手动关闭后,当前卡片在其有效时段内不再重复弹出
+				dismissedCardKey: '',
+				// 完课积分倒计时(秒)
+				remainTime: 0,
+				// 完课积分总倒计时时长(秒),用于计算百分比
+				totalRemainTime: 0,
+				// 完课积分倒计时定时器
+				countdownTimer: null,
+				// 是否已从接口拉取到倒计时数据(避免 remainTime 初始为 0 时提前放开答题)
+				remainTimeReady: false,
+				// 倒计时结束后是否已补发过一次看课记录
+				hasReportedAfterCountdown: false,
+				notice:'',//跑马灯,
+				isHeight:false,
+				// 跑马灯数据就绪门禁:避免首次进入时使用旧状态导致闪现
+				marqueeDataReady: false,
+				// 虚拟下单跑马灯
+				fakeOrderPool: [],
+				marqueeTriplePayloads: [],
+				marqueeTripleIncomingPayloads: [],
+				marqueeTripleSwitching: false,
+				marqueeCurrentText: '',
+				marqueeSelfHighlight: false,
+				marqueeDisplayPayload: null,
+				marqueeDisplaySelf: false,
+				marqueeIncomingPayload: null,
+				marqueeIncomingSelf: false,
+				marqueeSwitching: false,
+				pendingSelfMarqueeFirst: false,
+				_fakeMarqueeStarted: false,
+				/** 与 computed fakeMarqueeEligible 上次值比较,避免无 watch 时在 updateProductAndCardDisplay 高频调用中反复重置防抖 */
+				_fakeMarqueeEligiblePrev: undefined,
+				_marqueeStartDebounceTimer: null,
+				_fakeMarqueeTimer: null,
+				_marqueeSwitchTimer: null,
+				_marqueeTripleSwitchTimer: null,
+				/** 本人下单条按缓存 ts 与当前时间差定时回显刷新 */
+				_selfMarqueeClockTimer: null,
+			}
+		},
+		filters: {
+			numberToChinese(number) {
+				if (number) {
+					const chineseNumber = ['一', '二', '三', '四', '五', '六', '七', '八', '九'];
+					return chineseNumber[number - 1];
+				} else {
+					return ''
+				}
+			},
+		},
+		computed: {
+			isAnswer() {
+				return (item, name) => {
+					if (item.type == 1) {
+						return item.answer == name
+					} else if (item.type == 2) {
+						const array = item.answer.split(',')
+						return array.some(i => i == name)
+					} else {
+						return false
+					}
+				}
+			},
+			imgPath() {
+				return this.$store.state.imgpath
+			},
+			imgname() {
+				return this.$store.state.logoname
+			},
+			appid() {
+				return this.$store.state.appid
+			},
+			nameuser() {
+				return this.userinfos.nickname
+			},
+			avataruser() {
+				return this.userinfos.avatar
+			},
+			// 格式化后的倒计时
+			formattedCountdown() {
+				return this.formatCountdown(this.remainTime);
+			},
+			// 倒计时百分比
+			countdownPercentage() {
+				return this.getCountdownPercentage();
+			},
+			...mapGetters(['coureLogin']),
+			/** 小黄车商品中「最早上架」时间点(秒),用于跑马灯起始展示 */
+			firstShelfSecondsAmongProducts() {
+				const list = this.treatmentPackage || []
+				if (!list.length) return Infinity
+				let minSec = Infinity
+				for (let i = 0; i < list.length; i++) {
+					const t = list[i].onShelfTime
+					if (!this._vipShelfTimeValid(t)) continue
+					const sec = this._vipTimeStrToSec(t)
+					if (sec > 0 && sec < minSec) minSec = sec
+				}
+				return minSec === Infinity ? Infinity : minSec
+			},
+			fakeMarqueeEligible() {
+				// 商品/回放数据未完成刷新前,不允许启动展示,避免首次闪现
+				if (!this.marqueeDataReady) return false
+				if (this.showTreatment !== 0) return false
+				// 以“当前应展示的商品列表非空”作为跑马灯出现条件
+				// 这样能对齐你说的“商品上架才出现”,避免只用最早上架秒点导致的一帧差异
+				return Array.isArray(this.displayProductList) && this.displayProductList.length > 0
+			},
+			// 竖屏课打开小黄车 goodsList 弹窗时先藏住视频上的虚拟下单条,关闭后再显(不影响底层跑马灯计时)
+			showFakeMarqueeOnVideoCover() {
+				if (!this.fakeMarqueeEligible) return false
+				if (this.displayType === 'portrait' && this.isCart) return false
+				return true
+			},
+			isTripleMarqueeMode() {
+				return !!(this.isShu || this.isFull)
+			},
+		},
+		watch: {
+			coureLogin: {
+				immediate: true, // 页面一进入就检查一次
+				handler(val) {
+					console.log(val, '----')
+					if (val == 2 && this.isLogin) {
+						console.log("看课AppToken失效,请重新登录")
+						this.isLogin = false
+						this.isAddKf = 0
+						this.goLogin()
+					}
+				}
+			},
+			isTripleMarqueeMode(now, was) {
+				if (!now || was) return
+				if (!this.fakeMarqueeEligible || !this._fakeMarqueeStarted) return
+				this.syncTripleMarqueeImmediate()
+			}
+		},
+		onLoad(option) {
+			this.getWebviewUrl()
+			uni.$on('usercode', (data) => {
+				console.log('huoqu ', data)
+				this.goLogin(data)
+			})
+			uni.$on('vipMsg', (data) => {
+				console.log(4444, data)
+				this.contentmsg = data
+				this.showfalse = true
+				uni.showToast({
+					icon: 'none',
+					title: data,
+					duration: 5000
+				});
+			})
+			this.videoContext = uni.createVideoContext('video-content-box', this)
+		    this.getVideoContainerHeight()
+			this.code = option.code
+			if (uni.getStorageSync('userInfo') && JSON.stringify(uni.getStorageSync('userInfo')) != '{}') {
+				this.userInfo = uni.getStorageSync('userInfo')
+			} else {
+				this.userInfo = {}
+			}
+			this.appToken = uni.getStorageSync('companyUserInfo')
+			console.log('option', option)
+			if (!option.course) {
+				const keys = decodeURIComponent(Object.keys(option)[0]);
+				this.urlOption = JSON.parse(keys.split('course=')[1])
+			} else {
+				this.urlOption = option.course ? JSON.parse(decodeURIComponent(option.course)) : {}
+			}
+			console.log(this.urlOption)
+			uni.setStorageSync('H5course', this.urlOption)
+			this.videoId = this.urlOption.videoId
+			this.courseId = this.urlOption.courseId
+			this.periodId = this.urlOption.periodId
+			this.companyId = this.urlOption.companyId
+			this.companyUserId = this.urlOption.companyUserId
+			this.projectId = this.urlOption.projectId
+			this.timeid = this.urlOption.id
+			console.log(this.urlOption)
+			console.log(decodeURIComponent(option.course))
+			// this.sortLink = this.urlOption.link || ''
+			this.getMenuButton()
+			// #ifdef MP-WEIXIN
+			// if(this.$store.state.logoname!=='乐氏本源'&&!uni.getStorageSync('userInfos')){
+			// 	this.userlogo=true
+			// }
+			console.log(uni.getStorageSync('userInfos'))
+			// if(!uni.getStorageSync('userInfos')&&this.$store.state.logoname=='岚财良品'){
+			// 	uni.navigateTo({
+			// 		url:'/pages_course/webview'
+			// 	})
+			// 	return
+			// }
+			// #endif
+		},
+		onShow() {
+			// 每次进入页面先关闭门禁,并清空旧跑马灯状态,等 getH5CourseVideoDetails 拉完数据再开启
+			this.stopFakeMarqueeLoop()
+			this.marqueeDataReady = false
+			this._fakeMarqueeEligiblePrev = undefined
+			this.userinfos = uni.getStorageSync('userinfos')
+			this.userInfo = uni.getStorageSync('userInfo')
+			this.tipsOpen = false
+			this.isExpand = true
+			this.uuId = generateRandomString(16)
+			this.refreshVipPurchaseMarqueeFlag()
+			if (this.videoId) {
+				this.getH5CourseByVideo()
+			}
+			const AppToken = uni.getStorageSync('TOKEN_WEXIN')
+			console.log(AppToken)
+			if (AppToken) {
+				// this.isLogin=true
+				if (this.isAddKf == 1 && this.userInfo.userId) {
+					console.log(1233)
+					this.getH5CourseVideoDetails()
+				} else {
+					// this.checkUserInfoA()
+					this.getIsAddKf()
+				}
+			}
+			// if(this.sortLink){
+			// 	this.getLink()
+			// } else {
+			// 	uni.showToast({
+			// 		title: 'sortLink is not found',
+			// 		icon: 'none'
+			// 	});
+			// }
+		},
+		mounted() {
+			// this.getIP()
+			this.getHeight()
+
+		},
+		onHide() {
+			// this.player = uni.createVideoContext('video-content-box');
+			if (this.player) {
+				this.player.pause()
+			}
+			this.stopFakeMarqueeLoop()
+			// 页面隐藏时停止完课积分倒计时
+			this.stopCountdown()
+			// if (this.interval != null) {
+			// 	clearInterval(this.interval)
+			// 	this.interval = null
+			// }
+		},
+		onPageResize(){
+			this.getVideoContainerHeight();
+		},
+		onUnload() {
+			if (this.interval != null) {
+				clearInterval(this.interval)
+				this.interval = null
+			}
+			if (this.fullscreenToggleTimer) {
+				clearTimeout(this.fullscreenToggleTimer)
+				this.fullscreenToggleTimer = null
+			}
+			if (this._rateBounceTimer) {
+				clearTimeout(this._rateBounceTimer)
+				this._rateBounceTimer = null
+			}
+			this.fullscreenToggleLock = false
+			// 页面卸载时清理完课积分倒计时
+			this.stopCountdown()
+			this.clearIntegral()
+			this.stopFakeMarqueeLoop()
+			this.fakeOrderPool = []
+			uni.$off('usercode')
+		},
+		beforeDestroy() {
+			this.player = uni.createVideoContext('video-content-box');
+			if (this.player) {
+				this.player.stop()
+				this.player = null
+			}
+			if (this.interval != null) {
+				clearInterval(this.interval)
+				this.interval = null
+			}
+			if (this.fullscreenToggleTimer) {
+				clearTimeout(this.fullscreenToggleTimer)
+				this.fullscreenToggleTimer = null
+			}
+			if (this._rateBounceTimer) {
+				clearTimeout(this._rateBounceTimer)
+				this._rateBounceTimer = null
+			}
+			this.fullscreenToggleLock = false
+			// 组件销毁前清理完课积分倒计时
+			this.stopCountdown()
+			this.clearIntegral()
+			this.stopFakeMarqueeLoop()
+		},
+		methods: {
+			_vipTimeStrToSec(timeStr) {
+				if (!timeStr || typeof timeStr !== 'string') return 0
+				const parts = timeStr.split(':')
+				if (parts.length !== 3) return 0
+				const h = parseInt(parts[0], 10) || 0
+				const m = parseInt(parts[1], 10) || 0
+				const s = parseInt(parts[2], 10) || 0
+				return h * 3600 + m * 60 + s
+			},
+			_vipShelfTimeValid(timeStr) {
+				if (!timeStr || typeof timeStr !== 'string') return false
+				if (timeStr === '00:00:00') return false
+				return this._vipTimeStrToSec(timeStr) > 0
+			},
+			/** 缓存下单时间戳(videovip_myPurchase_*)序列化后可能为字符串,统一为毫秒数 */
+			_normalizePurchaseTs(ts) {
+				if (ts == null || ts === '') return 0
+				const n = typeof ts === 'number' ? ts : Number(ts)
+				return Number.isFinite(n) && n > 0 ? n : 0
+			},
+			_readVipSelfPurchaseTsMs() {
+				const row = uni.getStorageSync('videovip_myPurchase_' + this.videoId)
+				return this._normalizePurchaseTs(row && row.ts)
+			},
+			refreshVipPurchaseMarqueeFlag() {
+				const key = 'videovip_myPurchase_' + this.videoId
+				const consumedKey = 'videovip_myPurchaseMarqueeConsumed_' + this.videoId
+				const row = uni.getStorageSync(key)
+				const consumed = uni.getStorageSync(consumedKey)
+				const tsMs = this._normalizePurchaseTs(row && row.ts)
+				if (tsMs && Date.now() - tsMs <= 10 * 60 * 1000) {
+					// 同一笔下单 ts 仅允许跑马灯展示一次;中途退出再进不再展示(新下单 ts 变化后会再展示一次)
+					const consumedTs = this._normalizePurchaseTs(consumed && consumed.ts)
+					this.pendingSelfMarqueeFirst = !(consumedTs > 0 && consumedTs === tsMs)
+				} else {
+					this.pendingSelfMarqueeFirst = false
+					if (row && row.ts != null && row.ts !== '') {
+						uni.removeStorageSync(key)
+						const consumedTs = this._normalizePurchaseTs(consumed && consumed.ts)
+						if (consumedTs > 0 && consumedTs === tsMs) uni.removeStorageSync(consumedKey)
+					}
+				}
+			},
+			_markSelfPurchaseMarqueeConsumed() {
+				const tsMs = this._readVipSelfPurchaseTsMs()
+				if (!tsMs) return
+				try {
+					uni.setStorageSync('videovip_myPurchaseMarqueeConsumed_' + this.videoId, { ts: tsMs })
+				} catch (e) {}
+			},
+			formatSelfPurchaseMarqueePayload() {
+				const tsMs = this._readVipSelfPurchaseTsMs()
+				if (!tsMs) {
+					return {
+						type: 'self',
+						nickname: '您本人',
+						maskedId: '',
+						timeOffset: '刚刚',
+						suffix: '已下单',
+						fullText: '您本人刚刚已下单'
+					}
+				}
+				const secTotal = Math.floor((Date.now() - tsMs) / 1000)
+				if (secTotal < 60) {
+					const text = `${Math.max(1, secTotal)}秒前`
+					return {
+						type: 'self',
+						nickname: '您本人',
+						maskedId: '',
+						timeOffset: text,
+						suffix: '已下单',
+						fullText: `您本人${text}已下单`
+					}
+				}
+				const min = Math.min(10, Math.floor(secTotal / 60))
+				const text = `${Math.max(1, min)}分钟前`
+				return {
+					type: 'self',
+					nickname: '您本人',
+					maskedId: '',
+					timeOffset: text,
+					suffix: '已下单',
+					fullText: `您本人${text}已下单`
+				}
+			},
+			_syncFakeMarqueeIfEligibleChanged() {
+				const val = this.fakeMarqueeEligible
+				if (val === this._fakeMarqueeEligiblePrev) return
+				this._fakeMarqueeEligiblePrev = val
+				if (val) {
+					if (this._marqueeStartDebounceTimer) {
+						clearTimeout(this._marqueeStartDebounceTimer)
+						this._marqueeStartDebounceTimer = null
+					}
+					this._marqueeStartDebounceTimer = setTimeout(() => {
+						this._marqueeStartDebounceTimer = null
+						if (this.fakeMarqueeEligible && !this._fakeMarqueeStarted) {
+							this.ensureFakeMarqueeStarted()
+						}
+					}, 300)
+				} else {
+					if (this._marqueeStartDebounceTimer) {
+						clearTimeout(this._marqueeStartDebounceTimer)
+						this._marqueeStartDebounceTimer = null
+					}
+					this.stopFakeMarqueeLoop()
+				}
+			},
+			ensureFakeMarqueeStarted() {
+				if (!this.fakeMarqueeEligible || this._fakeMarqueeStarted) return
+				this._fakeMarqueeStarted = true
+				if (!this.fakeOrderPool.length) {
+					this.fakeOrderPool = buildFakeOrderPool()
+				}
+				this.applyFakeMarqueeTick()
+				this.scheduleFakeMarqueeNext()
+				this._startSelfMarqueeClockIfNeeded()
+			},
+			applyFakeMarqueeTick() {
+				if (this.isTripleMarqueeMode) {
+					const rows = this.buildTripleMarqueePayloads()
+					this.setTripleMarqueeDisplayWithAnim(rows)
+					// 本人下单在三联模式也只展示一轮,下一轮起恢复纯虚拟随机
+					if (rows.some(item => item && item.type === 'self')) {
+						this.pendingSelfMarqueeFirst = false
+						this._markSelfPurchaseMarqueeConsumed()
+					}
+					if (rows.length) {
+						this.marqueeDisplayPayload = rows[0]
+						this.marqueeDisplaySelf = this.marqueeDisplayPayload.type === 'self'
+					}
+					return
+				}
+				this.marqueeTriplePayloads = []
+				this.marqueeTripleIncomingPayloads = []
+				this.marqueeTripleSwitching = false
+				const tsMs = this._readVipSelfPurchaseTsMs()
+				const purchaseOk = !!(tsMs && Date.now() - tsMs <= 10 * 60 * 1000)
+				if (purchaseOk && this.pendingSelfMarqueeFirst) {
+					const selfPayload = this.formatSelfPurchaseMarqueePayload()
+					this.marqueeCurrentText = selfPayload.fullText
+					this.marqueeSelfHighlight = true
+					this.pendingSelfMarqueeFirst = false
+					this._markSelfPurchaseMarqueeConsumed()
+					this.setMarqueeDisplayWithAnim(selfPayload, true)
+					return
+				}
+				this.marqueeSelfHighlight = false
+				if (!this.fakeOrderPool.length) {
+					this.fakeOrderPool = buildFakeOrderPool()
+				}
+				const line = this.fakeOrderPool.shift()
+				if (line) {
+					this.fakeOrderPool.push(line)
+					this.marqueeCurrentText = `${line.nickname}${line.maskedId}${line.timeOffset}${line.suffix}`
+					this.setMarqueeDisplayWithAnim({
+						type: 'virtual',
+						nickname: line.nickname,
+						maskedId: line.maskedId,
+						timeOffset: line.timeOffset,
+						suffix: line.suffix
+					}, false)
+				}
+			},
+			buildTripleMarqueePayloads() {
+				const rows = []
+				const hasSelf = this.hasRecentSelfPurchase() && this.pendingSelfMarqueeFirst
+				if (!this.fakeOrderPool.length) {
+					this.fakeOrderPool = buildFakeOrderPool()
+				}
+				let guard = 0
+				// 有本人记录时,把本人下单放第一条,其它再补足虚拟数据
+				if (hasSelf) {
+					rows.push(this.formatSelfPurchaseMarqueePayload())
+				}
+				const targetVirtualCount = hasSelf ? 2 : 3
+				let virtualCount = 0
+				while (virtualCount < targetVirtualCount && this.fakeOrderPool.length && guard < 10) {
+					const line = this.fakeOrderPool.shift()
+					guard += 1
+					if (!line) break
+					this.fakeOrderPool.push(line)
+					rows.push({
+						type: 'virtual',
+						nickname: line.nickname,
+						maskedId: line.maskedId,
+						timeOffset: line.timeOffset,
+						suffix: line.suffix
+					})
+					virtualCount += 1
+				}
+				return rows.slice(0, 3)
+			},
+			hasRecentSelfPurchase() {
+				const tsMs = this._readVipSelfPurchaseTsMs()
+				return !!(tsMs && Date.now() - tsMs <= 10 * 60 * 1000)
+			},
+			/** 按缓存 ts 与当前时间重新计算本人下单文案(停留同一轮跑马灯时也能更新相对时间) */
+			refreshSelfPurchaseMarqueeDisplayedTiming() {
+				const fresh = this.formatSelfPurchaseMarqueePayload()
+				if (this.isTripleMarqueeMode && this.marqueeTriplePayloads.length) {
+					const upd = (arr) =>
+						arr.map((r) => (r && r.type === 'self' ? Object.assign({}, fresh) : r))
+					this.marqueeTriplePayloads = upd(this.marqueeTriplePayloads)
+					if (this.marqueeTripleIncomingPayloads.length) {
+						this.marqueeTripleIncomingPayloads = upd(this.marqueeTripleIncomingPayloads)
+					}
+				}
+				if (this.marqueeDisplayPayload && this.marqueeDisplayPayload.type === 'self') {
+					this.marqueeDisplayPayload = Object.assign({}, fresh)
+				}
+				if (this.marqueeIncomingPayload && this.marqueeIncomingPayload.type === 'self') {
+					this.marqueeIncomingPayload = Object.assign({}, fresh)
+				}
+			},
+			_startSelfMarqueeClockIfNeeded() {
+				if (this._selfMarqueeClockTimer != null) return
+				if (!this.hasRecentSelfPurchase()) return
+				this._selfMarqueeClockTimer = setInterval(() => {
+					if (!this._fakeMarqueeStarted || !this.hasRecentSelfPurchase()) {
+						this._stopSelfMarqueeClock()
+						return
+					}
+					this.refreshSelfPurchaseMarqueeDisplayedTiming()
+				}, 10000)
+			},
+			_stopSelfMarqueeClock() {
+				if (this._selfMarqueeClockTimer != null) {
+					clearInterval(this._selfMarqueeClockTimer)
+					this._selfMarqueeClockTimer = null
+				}
+			},
+			/** 进入三联布局时立即补足 marqueeTriplePayloads,否则 v-if 会因 length 为 0 仍走单条分支直到下一轮定时 tick */
+			syncTripleMarqueeImmediate() {
+				if (!this.fakeMarqueeEligible || !this._fakeMarqueeStarted || !this.isTripleMarqueeMode) return
+				const rows = this.buildTripleMarqueePayloads()
+				if (!rows.length) return
+				this.setTripleMarqueeDisplayWithAnim(rows)
+				if (rows.some(item => item && item.type === 'self')) {
+					this.pendingSelfMarqueeFirst = false
+					this._markSelfPurchaseMarqueeConsumed()
+				}
+				if (rows[0]) {
+					this.marqueeDisplayPayload = rows[0]
+					this.marqueeDisplaySelf = rows[0].type === 'self'
+				}
+			},
+			setTripleMarqueeDisplayWithAnim(rows) {
+				if (!rows || !rows.length) return
+				if (!this.marqueeTriplePayloads.length) {
+					this.marqueeTriplePayloads = rows
+					this.marqueeTripleIncomingPayloads = []
+					this.marqueeTripleSwitching = false
+					return
+				}
+				if (this._marqueeTripleSwitchTimer) {
+					clearTimeout(this._marqueeTripleSwitchTimer)
+					this._marqueeTripleSwitchTimer = null
+				}
+				this.marqueeTripleIncomingPayloads = rows
+				this.marqueeTripleSwitching = true
+				this._marqueeTripleSwitchTimer = setTimeout(() => {
+					this.marqueeTriplePayloads = this.marqueeTripleIncomingPayloads
+					this.marqueeTripleIncomingPayloads = []
+					this.marqueeTripleSwitching = false
+					this._marqueeTripleSwitchTimer = null
+				}, 460)
+			},
+			setMarqueeDisplayWithAnim(payload, isSelf) {
+				if (!payload) return
+				if (!this.marqueeDisplayPayload) {
+					this.marqueeDisplayPayload = payload
+					this.marqueeDisplaySelf = !!isSelf
+					this.marqueeSwitching = false
+					this.marqueeIncomingPayload = null
+					this.marqueeIncomingSelf = false
+					return
+				}
+				if (this._marqueeSwitchTimer) {
+					clearTimeout(this._marqueeSwitchTimer)
+					this._marqueeSwitchTimer = null
+				}
+				this.marqueeIncomingPayload = payload
+				this.marqueeIncomingSelf = !!isSelf
+				this.marqueeSwitching = true
+				this._marqueeSwitchTimer = setTimeout(() => {
+					this.marqueeDisplayPayload = this.marqueeIncomingPayload
+					this.marqueeDisplaySelf = this.marqueeIncomingSelf
+					this.marqueeIncomingPayload = null
+					this.marqueeIncomingSelf = false
+					this.marqueeSwitching = false
+					this._marqueeSwitchTimer = null
+				}, 460)
+			},
+			scheduleFakeMarqueeNext() {
+				if (this._fakeMarqueeTimer) {
+					clearTimeout(this._fakeMarqueeTimer)
+					this._fakeMarqueeTimer = null
+				}
+				const delay = 4000 + Math.floor(Math.random() * 3001)
+				this._fakeMarqueeTimer = setTimeout(() => {
+					this._fakeMarqueeTimer = null
+					if (!this.fakeMarqueeEligible || !this._fakeMarqueeStarted) return
+					this.applyFakeMarqueeTick()
+					this.scheduleFakeMarqueeNext()
+				}, delay)
+			},
+			stopFakeMarqueeLoop() {
+				if (this._marqueeStartDebounceTimer) {
+					clearTimeout(this._marqueeStartDebounceTimer)
+					this._marqueeStartDebounceTimer = null
+				}
+				if (this._fakeMarqueeTimer) {
+					clearTimeout(this._fakeMarqueeTimer)
+					this._fakeMarqueeTimer = null
+				}
+				if (this._marqueeSwitchTimer) {
+					clearTimeout(this._marqueeSwitchTimer)
+					this._marqueeSwitchTimer = null
+				}
+				if (this._marqueeTripleSwitchTimer) {
+					clearTimeout(this._marqueeTripleSwitchTimer)
+					this._marqueeTripleSwitchTimer = null
+				}
+				this._fakeMarqueeStarted = false
+				this.marqueeSwitching = false
+				// 重要:清空非三联跑马灯展示 payload,避免下一次门禁打开前渲染旧内容
+				this.marqueeDisplayPayload = null
+				this.marqueeDisplaySelf = false
+				this.marqueeCurrentText = ''
+				this.marqueeSelfHighlight = false
+				this.marqueeIncomingPayload = null
+				this.marqueeIncomingSelf = false
+				this.marqueeTriplePayloads = []
+				this.marqueeTripleIncomingPayloads = []
+				this.marqueeTripleSwitching = false
+				this._stopSelfMarqueeClock()
+			},
+			goRate(index){
+				this.aindex = index
+				if (this._rateBounceTimer) {
+					clearTimeout(this._rateBounceTimer)
+					this._rateBounceTimer = null
+				}
+				this.rateBounceIndex = null
+				this.$nextTick(() => {
+					this.rateBounceIndex = index
+					this._rateBounceTimer = setTimeout(() => {
+						this.rateBounceIndex = null
+						this._rateBounceTimer = null
+					}, 480)
+				})
+			},
+			onVideoMetaLoaded(e) {
+				// const width = e.detail.width;
+				// const height = e.detail.height;
+				// const res = uni.getSystemInfoSync();
+				// const winH = res.windowHeight;
+				// const winW = res.windowWidth;
+				// //横屏
+				// const wW = (winW / winH) * 100;
+				// console.log(winH,winW,'高度')
+				// console.log(winH,winW,'高度')
+				// //竖屏
+				// if (height < width) {
+				// 	this.isHeight = true
+				// }
+			},
+			// 获取视频容器高度
+			getVideoContainerHeight() {
+			   const { windowWidth, windowHeight } = uni.getSystemInfoSync();
+			   this.isHeight = windowWidth > windowHeight;
+			   console.log('当前是否横屏:', this.isHeight);
+			},
+			fullscreenchange(event){
+				const isFullScreen = !!(event && event.detail && event.detail.fullScreen);
+				this.isFull = event.detail.fullScreen;
+				//this.getVideoContainerHeight();
+				//console.log(this.isFull,'this.isFull ')
+				// 竖屏课程下:把全屏按钮当作布局切换按钮,禁止原生全屏停留
+				if (this.displayType === 'portrait') {
+					if (event && event.stopPropagation) event.stopPropagation();
+					if (event && event.preventDefault) event.preventDefault();
+					// 只在“进入全屏”时切换,避免 exitFullScreen 触发的 false 事件二次反转
+					if (!isFullScreen || this.fullscreenToggleLock) return;
+					this.fullscreenToggleLock = true;
+					this.isShu = !this.isShu;
+					// 先让布局切换完成,再退出原生全屏,减少抖动闪频
+					setTimeout(() => {
+						if (this.videoContext && this.videoContext.exitFullScreen) {
+							this.videoContext.exitFullScreen();
+						}
+						this.isFull = false;
+						this.fullscreenToggleTimer = setTimeout(() => {
+							this.fullscreenToggleLock = false;
+							this.fullscreenToggleTimer = null;
+						}, 220);
+					}, 40);
+					//console.log(this.isFull,'this.isFull111 ')
+				}
+			},
+			//购物车
+			showCart(){
+				///console.log("[---]")
+				this.isCart=true
+			},
+			showMore(){
+				///console.log("[---]")
+				this.isMore=true
+			},
+			closeShop() {
+				this.isCart = false;
+			},
+			closeMore() {
+				this.isMore = false;
+			},
+			navgetTo(url){
+				uni.navigateTo({
+					url: url
+				});
+			},
+			openList(){
+				this.isShu=!this.isShu
+			},
+			// 倒计时格式化函数
+			formatCountdown(seconds) {
+				const totalSeconds = Math.max(0, Math.floor(Number(seconds) || 0));
+				const hours = Math.floor(totalSeconds / 3600);
+				const remainingAfterHours = totalSeconds % 3600;
+				const minutes = Math.floor(remainingAfterHours / 60);
+				const secs = remainingAfterHours % 60;
+				return {
+					hours: this.padZero(hours),
+					minutes: this.padZero(minutes),
+					seconds: this.padZero(secs),
+					total: totalSeconds
+				};
+			},
+			getCountdownPercentage() {
+				const total = Number(this.totalRemainTime) || 0;
+				if (!total) return 0;
+				const remain = Math.max(0, Number(this.remainTime) || 0);
+				const watched = Math.max(0, total - remain);
+				const percentage = (watched / total) * 100;
+				return Math.min(100, Math.max(0, Number(percentage.toFixed(2))));
+			},
+			// 补零函数
+			padZero(num) {
+				return num < 10 ? `0${num}` : num.toString();
+			},
+			// 启动完课积分倒计时(仅在播放时递减)
+			startCountdown() {
+				if (this.remainTime <= 0 || this.countdownTimer) return;
+				this.countdownTimer = setInterval(() => {
+					if (this.remainTime > 0) {
+						this.remainTime--;
+					}
+					if (this.remainTime <= 0 && this.countdownTimer) {
+						clearInterval(this.countdownTimer);
+						this.countdownTimer = null;
+						if (!this.hasReportedAfterCountdown) {
+							this.hasReportedAfterCountdown = true;
+							this.getFinishCourseVideo();
+							this.getInternetTraffic();
+						}
+					}
+				}, 1000);
+			},
+			// 停止完课积分倒计时(暂停/离开页面时调用)
+			stopCountdown() {
+				if (this.countdownTimer) {
+					clearInterval(this.countdownTimer);
+					this.countdownTimer = null;
+				}
+			},
+			//剩余时间
+			getRemainTime(userId) {
+				var data = {
+					"videoId": this.videoId,
+					"fsUserId": userId,
+					"courseId": this.courseId,
+					"projectId":this.projectId,
+					"periodId":this.periodId,
+					"companyUserId": this.companyUserId
+				}
+				getRemainTime(data).then(res => {
+					if (res.code == 200) {
+						const remain = Number(res.remainTime) || 0; // 积分看课剩余时间(秒)
+						this.remainTime = remain;
+						this.remainTimeReady = true;
+						this.hasReportedAfterCountdown = remain <= 0;
+						// 初始化或刷新总时长,用于进度条百分比
+						if (!this.totalRemainTime || remain > this.totalRemainTime) {
+							this.totalRemainTime = remain;
+						}
+					} else {
+						this.remainTimeReady = false
+						uni.showToast({
+							icon: 'none',
+							title: res.msg,
+						});
+					}
+				})
+			},
+			getWebviewUrl() {
+				var data = {
+					key: 'course.config'
+				}
+				getConfigByKey(data).then(res => {
+					if (res.code == 200) {
+						console.log("getConfigByKey====", JSON.parse(res.data))
+						let data = JSON.parse(res.data)
+						this.notice = data.camelCase
+						uni.setStorageSync('setWebviewUrl', data.userCourseAuthDomain)
+					} else {
+						uni.showToast({
+							icon: 'none',
+							title: res.msg,
+						});
+					}
+				})
+			},
+			tabChange(type) {
+				this.currentId = type
+			},
+			goLogin(data) {
+				if (data) {
+					console.log('huoqu1222', data)
+					uni.showLoading({
+						title: '加载中'
+					})
+					uni.login({
+						provider: "weixin",
+						success: async loginRes => {
+							//uni.setStorageSync('loginRes',loginRes)
+							let code = loginRes.code // 获取开发code
+							handleFsUserWx({
+									code: code,
+									appId: this.appid,
+									userId: data.userId
+								})
+								.then(res => {
+									if (res.code == 200) {
+										console.log(res)
+										uni.hideLoading();
+										uni.showToast({
+											icon: 'none',
+											title: "登录成功",
+										});
+										this.userinfos = uni.getStorageSync('userinfos')
+										uni.getStorageSync('TOKEN_WEXIN');
+										this.userInfo = uni.getStorageSync('userInfo');
+										this.isLogin = true
+										
+										setTimeout(() => {
+											this.getIsAddKf()
+											//this.getMp()
+										}, 200)
+									} else if (res.code == 406) {
+										uni.hideLoading();
+										uni.showToast({
+											icon: 'none',
+											title: '该用户已成为其他销售会员',
+										});
+									} else {
+										uni.hideLoading();
+										uni.showToast({
+											icon: 'none',
+											title: res.msg,
+										});
+									}
+
+								})
+						},
+					})
+				} else {
+					uni.navigateTo({
+						url: '/pages_course/webview?H5course=' + uni.getStorageSync('H5course')
+					})
+				}
+
+			},
+			shouquan() {
+				if (this.userinfos.nickname == '') {
+					uni.showToast({
+						icon: 'none',
+						title: "请先授权微信昵称",
+					});
+				}
+			},
+			confimrname() {
+				if (this.userinfos.nickname == '') {
+					uni.showToast({
+						icon: 'none',
+						title: "请授权微信昵称",
+					});
+					return
+				}
+				if (this.userinfos.avatar == '') {
+					uni.showToast({
+						icon: 'none',
+						title: "请授权微信头像",
+					});
+					return
+				}
+				uni.setStorageSync('userInfos', this.userinfos)
+				this.editUserA()
+				this.userlogo = false
+			},
+			onChooseAvatar(e) {
+				this.userinfos.avatar = e.detail.avatarUrl
+				uni.uploadFile({
+					url: uni.getStorageSync('requestPath') + '/app/common/uploadOSS', //仅为示例,非真实的接口地址
+					filePath: e.detail.avatarUrl,
+					name: 'file',
+					formData: {
+						'user': 'test' // 上传附带参数
+					},
+					success: (uploadFileRes) => {
+						console.log(uploadFileRes)
+						// 根据接口具体返回格式   赋值具体对应url
+						var data = JSON.parse(uploadFileRes.data)
+						this.headImg = uni.getStorageSync('requestPath') + data.fileName
+						this.userinfos.avatar = data.url
+					}
+				});
+			},
+			onNickNameInput(e) {
+				console.log(e)
+				this.userinfos.nickname = e.detail.value
+			},
+			kefpop() {
+				if (this.appToken) {
+					this.kfPopup == false
+				}
+			},
+			tosales() {
+				uni.switchTab({
+					url: "/pages/index/index"
+				})
+			},
+			closepop() {
+				this.answerPopup = false
+			},
+			open() {
+
+			},
+			userInfologin(e) {
+				console.log(e)
+				this.userdisabled = true
+				uni.showLoading({
+					title: "处理中..."
+				});
+				if (e.mp.detail.errMsg == 'getUserInfo:ok') {
+					this.utils.getProvider()
+						.then(provider => {
+							if (!provider) {
+								this.userdisabled = false
+								reject()
+							}
+							// uni登录
+							uni.login({
+								provider: provider,
+								success: async loginRes => {
+									console.log(loginRes)
+									console.log(e)
+									let code = loginRes.code // 获取开发code
+									this.userinfos = uni.getStorageSync('userInfos') ? uni.getStorageSync(
+										'userInfos') : this.userinfos
+									loginByMiniApp({
+											encryptedData: e.mp.detail.encryptedData,
+											iv: e.mp.detail.iv,
+											code: code,
+											companyId: this.companyId || '',
+											companyUserId: this.companyUserId || 0,
+											nickname: this.userinfos.nickname || '',
+											avatar: this.userinfos.avatar || '',
+											authType: this.authType,
+											appId: this.appid,
+											projectId: this.projectId
+										})
+										.then(res => {
+											this.userdisabled = false
+											if (res.code == 200) {
+												console.log(res)
+												uni.hideLoading();
+												uni.showToast({
+													icon: 'none',
+													title: "登录成功",
+												});
+												uni.setStorageSync('TOKEN_WEXIN', res.token);
+												uni.setStorageSync('userInfo', JSON.stringify(res
+													.user));
+												this.userInfo = res.user;
+												uni.hideLoading()
+												// this.checkUserInfoA()
+												this.isLogin = true
+                                                setTimeout(() => {
+                                                	this.getIsAddKf()
+                                                }, 200)
+											} else if (res.code == 406) {
+												uni.hideLoading();
+												uni.showToast({
+													icon: 'none',
+													title: '该用户已成为其他销售会员',
+												});
+											} else {
+												uni.hideLoading();
+												uni.showToast({
+													icon: 'none',
+													title: res.msg,
+												});
+											}
+
+										})
+										.catch(res => {
+											this.userdisabled = false
+										})
+								},
+								fail() {
+									this.userdisabled = false
+								}
+							})
+						})
+						.catch(err => {
+							this.userdisabled = false
+							uni.showToast({
+								icon: 'none',
+								title: err,
+							});
+						})
+
+				} else {
+					this.userdisabled = false
+					uni.showToast({
+						title: '已拒绝授权',
+						icon: 'none',
+						duration: 2000,
+					})
+				}
+			},
+			phoneLogin(e) {
+				console.log(e)
+				this.userdisabled = false
+				uni.showLoading({
+					title: "处理中..."
+				});
+				if (e.mp.detail.errMsg == 'getPhoneNumber:ok') {
+					this.utils.getProvider()
+						.then(provider => {
+							if (!provider) {
+								this.userdisabled = false
+								reject()
+							}
+							// uni登录
+							uni.login({
+								provider: provider,
+								success: async loginRes => {
+									this.userdisabled = false
+									console.log(loginRes)
+									console.log(e)
+									let code = loginRes.code // 获取开发code
+									this.userinfos = uni.getStorageSync('userInfos') ? uni.getStorageSync(
+										'userInfos') : this.userinfos
+									loginByMiniApp({
+											encryptedData: e.mp.detail.encryptedData,
+											iv: e.mp.detail.iv,
+											code: code,
+											companyId: this.companyId || '',
+											companyUserId: this.companyUserId || 0,
+											nickname: this.userinfos.nickname || '',
+											avatar: this.userinfos.avatar || "",
+											authType: this.authType,
+											appId: this.appid,
+											projectId: this.projectId
+										})
+										.then(res => {
+											this.userdisabled = false
+											if (res.code == 200) {
+												console.log(res)
+												uni.hideLoading();
+												uni.showToast({
+													icon: 'none',
+													title: "登录成功",
+												});
+												uni.setStorageSync('TOKEN_WEXIN', res.token);
+												uni.setStorageSync('userInfo', JSON.stringify(res
+													.user));
+												this.userInfo = res.user;
+												uni.hideLoading()
+												this.checkUserInfoA()
+												// this.isLogin = true
+												// setTimeout(()=>{
+												// 	this.getIsAddKf()
+												// },200)
+											} else if (res.code == 406) {
+												uni.hideLoading();
+												uni.showToast({
+													icon: 'none',
+													title: '该用户已成为其他销售会员',
+												});
+											} else {
+												uni.hideLoading();
+												uni.showToast({
+													icon: 'none',
+													title: res.msg,
+												});
+											}
+
+										})
+										.catch(res => {
+											this.userdisabled = false
+										})
+								},
+								fail() {
+									this.userdisabled = false
+								}
+							})
+
+						})
+						.catch(err => {
+							this.userdisabled = false
+							uni.showToast({
+								icon: 'none',
+								title: err,
+							});
+						})
+
+				} else {
+					this.userdisabled = false
+					uni.showToast({
+						title: '已拒绝授权',
+						icon: 'none',
+						duration: 2000,
+					})
+				}
+
+			},
+			getMenuButton() {
+				const menuButtonInfo = uni.getMenuButtonBoundingClientRect()
+				this.menuButtonLeft = menuButtonInfo.left
+				this.menuButtonH = menuButtonInfo.height
+			},
+			//播放时间更新事件方法
+			onTimeUpdate(e) {
+				let currentTime = Math.round(e.detail.currentTime)
+				if (this.playDurationSeek > 0) {
+					this.playTime = this.playDurationSeek
+					this.throttle(() => this.changeTime(this), 1000, false)
+				} else {
+					// console.log(this.isFinish)
+					if (this.linkType != 1 && (currentTime - this.playTime > 3 || currentTime - this.playTime < -3) && this
+						.isFinish != 1) {
+						uni.showToast({
+							title: '不能快进哦',
+							icon: 'none',
+						});
+						currentTime = this.playTime
+						this.player.seek(this.playTime);
+					}
+
+					if (Math.floor(e.detail.currentTime) != this.flagTime) {
+						this.flagTime = Math.floor(e.detail.currentTime)
+						// 中途弹窗逻辑
+						if (!this.tipsOpen && this.tipsTime && this.playTime == this.tipsTime) {
+							this.timepath = '33%'
+							this.openTipsPop()
+						}
+						if (!this.tipsOpen && this.tipsTime2 && this.playTime == this.tipsTime2) {
+							this.timepath = '66%'
+							this.openTipsPop()
+						}
+					}
+					this.playTime = currentTime
+					this.updateProductAndCardDisplay(currentTime)
+				}
+			},
+			// 根据当前播放时间:1)扫描商品栏展示(上架/下架时间)2)控制商品卡片弹窗(弹出/关闭时间)
+			updateProductAndCardDisplay(currentSec) {
+				const toSeconds = (timeStr) => {
+					if (!timeStr || typeof timeStr !== 'string') return 0
+					const parts = timeStr.split(':')
+					if (parts.length !== 3) return 0
+					const h = parseInt(parts[0], 10) || 0
+					const m = parseInt(parts[1], 10) || 0
+					const s = parseInt(parts[2], 10) || 0
+					return h * 3600 + m * 60 + s
+				}
+				const hasValidShelfTime = (timeStr) => {
+					if (!timeStr || typeof timeStr !== 'string') return false
+					if (timeStr === '00:00:00') return false
+					return !!toSeconds(timeStr)
+				}
+				if (this.treatmentPackage.length === 0) {
+					this.displayProductList = []
+					this.cardPopup = false
+					this.currentCardItem = null
+					this._syncFakeMarqueeIfEligibleChanged()
+					return
+				}
+				// 按“上架时间”倒序排序,保证后上架商品展示在列表最前
+				const sortedTreatmentPackage = this.treatmentPackage.slice().sort((a, b) => {
+					const aOn = hasValidShelfTime(a.onShelfTime) ? toSeconds(a.onShelfTime) : 0
+					const bOn = hasValidShelfTime(b.onShelfTime) ? toSeconds(b.onShelfTime) : 0
+					if (bOn !== aOn) return bOn - aOn
+					// 上架时间相同则按下架时间倒序,进一步保证新近优先
+					const aOff = hasValidShelfTime(a.offShelfTime) ? toSeconds(a.offShelfTime) : 0
+					const bOff = hasValidShelfTime(b.offShelfTime) ? toSeconds(b.offShelfTime) : 0
+					return bOff - aOff
+				})
+				const videoDuration = this.duration || 0
+				// 1. 商品栏展示:按上架/下架时间过滤
+				this.displayProductList = sortedTreatmentPackage.filter(item => {
+					// 上架时间必填;下架时间可为空(为空表示一直展示到视频结束)
+					if (!hasValidShelfTime(item.onShelfTime)) return false
+					const onShelfSec = toSeconds(item.onShelfTime)
+					if (currentSec < onShelfSec) return false
+					const hasOffShelfTime = hasValidShelfTime(item.offShelfTime)
+					if (!hasOffShelfTime) return true
+					const offShelfSec = toSeconds(item.offShelfTime)
+					if (videoDuration > 0 && offShelfSec > videoDuration) return true
+					return currentSec < offShelfSec
+				})
+				//console.log('this.displayProductList',this.displayProductList)
+				// 2. 商品卡片弹窗:按弹出/关闭时间查找当前应展示的卡片
+				let activeCard = null
+				let activePopupSec = -1
+				for (let i = 0; i < sortedTreatmentPackage.length; i++) {
+					const item = sortedTreatmentPackage[i]
+					const popupStr = item.cardPopupTime
+					const closeStr = item.cardCloseTime
+					if (!popupStr || popupStr === '00:00:00') continue
+					const popupSec = toSeconds(popupStr)
+					if (!popupSec) continue
+					const closeSec = (closeStr && closeStr !== '00:00:00') ? toSeconds(closeStr) : null
+					if (currentSec >= popupSec && (closeSec == null || currentSec < closeSec)) {
+						// 同时命中多个弹窗时:优先展示“启动时间更晚”的后续弹窗
+						if (popupSec > activePopupSec) {
+							activePopupSec = popupSec
+							activeCard = item
+						} else if (popupSec === activePopupSec && activeCard) {
+							// 上架时间更晚优先(兜底)
+							const activeOn = hasValidShelfTime(activeCard.onShelfTime) ? toSeconds(activeCard.onShelfTime) : 0
+							const itemOn = hasValidShelfTime(item.onShelfTime) ? toSeconds(item.onShelfTime) : 0
+							if (itemOn > activeOn) activeCard = item
+						}
+					}
+				}
+				const activeCardKey = activeCard ?
+					`${activeCard.productId || ''}_${activeCard.cardPopupTime || ''}_${activeCard.cardCloseTime || ''}` :
+					''
+				if (!activeCardKey) {
+					this.dismissedCardKey = ''
+				}
+				this.cardPopup = !!activeCard && this.dismissedCardKey !== activeCardKey
+				//this.getVideoContainerHeight()
+				this.currentCardItem = activeCard
+				this._syncFakeMarqueeIfEligibleChanged()
+			},
+			closeCardPopup() {
+				if (this.currentCardItem) {
+					this.dismissedCardKey =
+						`${this.currentCardItem.productId || ''}_${this.currentCardItem.cardPopupTime || ''}_${this.currentCardItem.cardCloseTime || ''}`
+				}
+				this.cardPopup = false
+			},
+			changeTime(that, e) {
+				that.playDurationSeek = 0
+			},
+			videoErrorCallback(e) {
+				this.clearIntegral()
+				this.errorCount++
+				if (this.errorCount > 3) return
+				console.log(e)
+				this.getErrMsg(e.target.errMsg)
+				this.getH5CourseVideoDetails('error')
+			},
+			// 商品卡片跳转
+			goBuy(item) {
+				if (!item || !item.productId) return
+				uni.navigateTo({
+					url: '/pages/shopping/productDetails?productId=' + item.productId +
+						'&companyId=' + (this.urlOption.companyId || '') +
+						'&companyUserId=' + (this.urlOption.companyUserId || '') +
+						'&courseId=' + (this.urlOption.courseId || '') +
+						'&videoId=' + (this.urlOption.videoId || '') +
+						'&projectId=' + (this.urlOption.projectId || '') +
+						'&periodId=' + (this.urlOption.periodId || '')
+				})
+			},
+			// 当开始/继续播放时触发play事件
+			getPlay() {
+				this.errorCount = 0
+				// this.judgeDuration()
+				// 开始播放时启动完课积分倒计时
+				this.startCountdown()
+			},
+			getPause() {
+				this.clearIntegral()
+				// 暂停时停止完课积分倒计时
+				this.stopCountdown()
+			},
+			getEnded() {
+				this.clearIntegral()
+				// 播放结束时停止完课积分倒计时
+				this.stopCountdown()
+				this.isEnded = true
+				this.isFinish = 1
+				this.getFinishCourseVideo()
+			},
+			getIP() {
+				uni.request({
+					url: 'https://ipinfo.io/json', //仅为示例,并非真实接口地址。
+					method: 'GET',
+					success: (res) => {
+						this.ip = res.data.ip
+					}
+				});
+			},
+			getHeight() {
+				this.height =
+					`calc(100vh - 420rpx - 160rpx)`
+				// this.$nextTick(() => {
+				// 	const query = uni.createSelectorQuery().in(this);
+				// 	query
+				// 		.select("#title-content")
+				// 		.boundingClientRect((data) => {
+				// 			this.height =
+				// 				`calc(100vh - ${data.height}px - 420rpx)`
+				// 		})
+				// 		.exec();
+				// })
+			},
+			getDescHeight() {
+				// this.$nextTick(() => {
+				// 	const query = uni.createSelectorQuery().in(this);
+				// 	query
+				// 		.select("#descbox-desc")
+				// 		.boundingClientRect((data) => {
+				// 			this.textHeight = data.height
+				// 		})
+				// 		.exec();
+				// })
+			},
+			numberToLetter(num) {
+				// 将数字转换为字母的 ASCII 码
+				let letterCode = num + 65;
+				// 将 ASCII 码转换为大写字母
+				let letter = String.fromCharCode(letterCode);
+				return letter;
+			},
+			updateTime() {
+				var that = this;
+				if (this.interval != null) {
+					clearInterval(this.interval)
+				}
+				this.interval = setInterval(function() {
+					that.getFinishCourseVideo()
+					that.getInternetTraffic()
+				}, 60000);
+			},
+			judgeDuration() {
+				var that = this;
+				if (this.intervalIntegral != null) {
+					clearInterval(this.intervalIntegral)
+					this.intervalIntegral = null
+				}
+				// 观看10分钟获得积分
+				this.intervalIntegral = setInterval(function() {
+					that.getIntegralByH5Video()
+				}, 600000);
+			},
+			clearIntegral() {
+				if (this.intervalIntegral != null) {
+					clearInterval(this.intervalIntegral)
+					this.intervalIntegral = null
+				}
+			},
+			// 展开简介
+			handleExpand() {
+				this.isExpand = !this.isExpand
+			},
+			getH5CourseByVideo() {
+				this.loading = true
+				getH5CourseByVideoId({
+					videoId: this.videoId
+				}).then(res => {
+						this.loading = false
+						if (res.code == 200) {
+							this.viewload = false
+							this.courseInfo = res.data
+							uni.setNavigationBarTitle({
+								title: this.courseInfo && this.courseInfo.title ? this.courseInfo.title : ''
+							});
+						}
+						this.getHeight()
+						this.getDescHeight()
+					},
+					rej => {
+						this.loading = false
+					}
+				).catch(() => {
+					this.loading = false
+				})
+			},
+			getH5CourseVideoDetails(type) {
+				uni.showLoading({
+					title: '加载中'
+				})
+				  //var user = uni.getStorageSync('userInfo');
+					const data = {
+						videoId: this.videoId,
+						fsUserId: this.userInfo.userId,
+						courseId: this.courseId,
+						companyUserId: this.companyUserId,
+						periodId: this.periodId,
+						id: this.timeid
+					}
+				getH5CourseVideoDetails(data).then(res => {
+						if (res.code == 200) {
+							this.config = res.data.courseConfig || {}
+							this.isFinish = res.data.isFinish || 0
+							this.duration = res.data.courseVideoDetails &&
+								res.data.courseVideoDetails.duration ? res.data.courseVideoDetails.duration : 0
+							this.courseLogo = this.config && JSON.stringify(this.config) != '{}' ? this.config
+								.courseLogo : ''
+							this.playDuration = res.data.playDuration || 0
+							this.playDurationSeek = res.data.playDuration || 0
+							// this.tipsTime =  38
+							this.tipsTime = res.data.tipsTime || 0
+							this.tipsTime2 = res.data.tipsTime2 || 0
+							this.displayType = res.data.courseVideoDetails && res.data.courseVideoDetails
+								.displayType != '' ? res.data.courseVideoDetails.displayType :'landscape'
+								this.isShu = this.displayType=='landscape'?false:true
+							const showTreatmentFlag = res.data.courseVideoDetails && res.data.courseVideoDetails
+								.showProduct != null ? res.data.courseVideoDetails.showProduct : 1
+							this.treatmentPackage = res.data.courseVideoDetails && res.data.courseVideoDetails
+								.fsStoreProductScrms ? res.data.courseVideoDetails.fsStoreProductScrms : []
+							this.showTreatment = showTreatmentFlag == 0 && this.treatmentPackage.length > 0 ? 0 : 1;
+							//console.log('this.showTreatment',this.showTreatment)
+							let lineList = []
+							// if (res.course && res.course.lineOne) {
+							// 	lineList.push(res.course.lineOne)
+							// }
+							// if (res.course && res.course.lineTwo) {
+							// 	lineList.push(res.course.lineTwo)
+							// }
+							// if (res.course && res.course.lineThree) {
+							// 	lineList.push(res.course.lineThree)
+							// }
+							this.lineList = lineList
+							if (!this.player || type == 'error') {
+								uni.hideLoading();
+								this.lineIndex = this.config.defaultLine
+								this.videoUrl = res.data.courseVideoDetails.videoUrl
+								this.poster = res.data.courseVideoDetails &&
+									res.data.courseVideoDetails.thumbnail ? res.data.courseVideoDetails.thumbnail : ''
+								this.videocont = res.data
+								// this.options.sources = [{
+								// 	src: this.videoUrl
+								// }]
+								// this.options.poster = res.course && res.course.imgUrl ? res.course.imgUrl : ''
+								// this.initVideo()
+								this.playTime = this.playDuration >= this.duration ? 0 : this.playDuration
+								if (this.videocont.rang) {
+									setTimeout(() => {
+										this.player = uni.createVideoContext('video-content-box');
+										this.player.seek(this.playTime)
+										this.player.play();
+									}, 500);
+									this.timepop = false
+								} else {
+									this.timepop = true
+								}
+
+							} else {
+								// let div = document.querySelector(".vjs-progress-control");
+								// if(div) {
+								// 	if (this.isFinish == 1 || this.isEnded || this.linkType == 1) {
+								// 		div.style.pointerEvents = "auto";
+								// 	} else {
+								// 		div.style.pointerEvents = "none"; //禁止所有事件
+								// 	}
+								// }
+								this.playTime = this.playTime > this.playDuration ? this.playTime : this
+									.playDuration >= this.duration ? 0 : this.playDuration
+								this.player.seek(this.playTime)
+								this.player.play();
+							}
+							this.updateTime();
+							// 初始扫描商品栏展示(根据上架/下架时间)
+							this.updateProductAndCardDisplay(this.playTime ?? this.playDuration ?? 0);
+							// 商品栏扫描完成后再允许虚拟跑马灯启动(延后到下一轮渲染,避免一帧闪现)
+							this.$nextTick(() => {
+								this.marqueeDataReady = true
+								this._syncFakeMarqueeIfEligibleChanged()
+							})
+							if (res.data.courseVideoDetails.questionBankList.length == 0) {
+								this.isquestion = true
+							} else {
+								this.isquestion = false
+							}
+							//console.log('题目', res.data.courseVideoDetails.questionBankList)
+							this.quesList = res.data.courseVideoDetails.questionBankList &&
+								res.data.courseVideoDetails.questionBankList.length > 0 ? res.data.courseVideoDetails
+								.questionBankList : [],
+								this.quesList = this.quesList.map(item => ({
+									...item,
+									questionOption: JSON.parse(item.question),
+									answer: ''
+								}))
+						}
+						this.getHeight()
+						this.getDescHeight()
+					},
+					rej => {}
+				)
+			},
+			handleAnswer(item, option, idx) {
+				// 以“完课积分倒计时”结束作为答题资格
+				// if (!this.remainTimeReady) {
+				// 	uni.showToast({
+				// 		title: "倒计时加载中,请稍后再答题哦~",
+				// 		icon: "none"
+				// 	})
+				// 	return
+				// }
+				this.goRate(option.indexId)
+				if (Number(this.remainTime || 0) > 0) {
+					uni.showToast({
+						title: "完课倒计时结束再评分",
+						icon: "none"
+					})
+					return
+				}
+
+				if (item.type == 1) {
+					// 单选option
+					item.answer = option.name
+				} else if (item.type == 2) {
+					// 多选
+					let answer = item.answer ? item.answer.split(',') : []
+					if (answer.indexOf(option.name) === -1) {
+						answer.push(option.name)
+						item.answer = answer.join(',')
+					} else {
+						answer.splice(answer.indexOf(option.name), 1)
+						item.answer = answer.join(',')
+					}
+				}
+			},
+			submit() {
+				if (this.isExpire) {
+					uni.showToast({
+						title: '课程已过期或链接无效',
+						icon: 'none'
+					});
+					return
+				}
+				// 登录
+				this.$isLoginCourse().then(
+					res => {
+						console.log(res)
+						if (res) {
+							console.log(res)
+							if (this.isAddKf == 1) {
+								// 答题
+								// 您已提交过答案,请领取红包
+								console.log(1223)
+								this.courseAnswer()
+							} else {
+								// 添加客服
+								if (this.videoId && this.isLogin) {
+									console.log(12223131)
+									this.getIsAddKf()
+								} else if (this.iskftype == 1) {
+									uni.showToast({
+										title: '已看过其他销售分享的此课程,不能重复观看',
+										icon: 'none'
+									})
+								} else {
+									// this.kfPopup=true
+									uni.removeStorageSync('TOKEN_WEXIN')
+									uni.showToast({
+										title: '已清除缓存,请重新进入页面!',
+										icon: 'none'
+									})
+								}
+							}
+						} else {
+							this.goLogin()
+						}
+					},
+					rej => {}
+				);
+
+			},
+			// 答题
+			courseAnswer() {
+				// 以“完课积分倒计时”结束作为答题资格
+				// if (!this.remainTimeReady) {
+				// 	uni.showToast({
+				// 		title: "倒计时加载中,请稍后再答题哦~",
+				// 		icon: "none"
+				// 	})
+				// 	return
+				// }
+				if (Number(this.remainTime || 0) > 0) {
+					uni.showToast({
+						title: "完课倒计时结束再评分",
+						icon: "none"
+					})
+					return
+				}
+				if (this.quesList.some(item => !item.answer)) {
+					uni.showToast({
+						title: "请选择评分",
+						icon: "none"
+					})
+					return
+				}
+				const questions = this.quesList.map(obj => {
+					const {
+						questionOption,
+						...rest
+					} = obj;
+					return rest;
+				});
+				const param = {
+					...this.urlOption,
+					userId: this.userInfo.userId,
+					questions: questions,
+					videoId: this.videoId,
+					duration: this.playTime,
+				}
+				this.errTitle = ""
+				this.errDesc = ""
+				this.errQues = []
+				courseAnswer(param).then(res => {
+						if (res.code == 200) {
+							if (res.incorrectQuestions) {
+								// 答题失败
+								if (res.incorrectQuestions.length > 0) {
+									this.errQues = res.incorrectQuestions
+								}
+								this.remain = res.remain || 0
+								if (res.remain > 0) {
+									this.answerPopup = true
+									this.errTitle = "很遗憾答错了"
+									this.errDesc = `<span style="color:#FF5C03">还有${res.remain}次机会,继续加油</span>`
+									// this.$refs.answerPopup.open("center")
+									this.answerPopup = true
+								}
+							} else {
+								// 答题成功
+								this.errTitle = "完课积分已到账"
+								//this.errDesc = `请选择奖励`
+								// this.$refs.answerPopup.open("center")
+								// this.answerPopup=true
+								if (res.msg == '答题成功') {
+									this.closeAnswerPopup()
+									// uni.login({
+									// 	provider: 'weixin',
+									// 	success: async loginRes => {
+									// 		console.log(loginRes)
+									// 		var code=loginRes
+									// 		this.closeAnswerPopup(loginRes.code)
+									// 	}
+									// })
+								}
+							}
+						} else {
+							if (res.msg == "该课题到达答错次数限制") {
+								this.errTitle = "答题次数超过限制"
+								this.errDesc = "以后的课程要认真学习哦"
+								// this.$refs.answerPopup.open("center")
+								this.answerPopup = true
+							} else {
+								if (res.msg.length > 14) {
+									if (res.msg == "该课程已答题完成,不可重复答题") {
+										uni.showToast({
+											title: '已评价请勿重复提交',
+											icon: 'none'
+										})
+									}else{
+										uni.showModal({
+											title: '提示',
+											content: res.msg,
+											showCancel: false,
+											confirmText: '我知道了'
+										})
+									}
+								} else {
+									uni.showToast({
+										title: res.msg,
+										icon: 'none'
+									})
+								}
+							}
+						}
+					},
+					rej => {}
+				)
+			},
+			// 选择
+			rewardChange(e) {
+				this.currentReward = e.detail.value
+			},
+			closeAnswerPopup() {
+				// this.$refs.answerPopup.close()
+				uni.showLoading({
+					title: "加载中..."
+				})
+				if (this.errTitle == '完课积分已到账') {
+					const param = {
+						...this.urlOption,
+						userId: this.userInfo.userId,
+						// rewardType: Number(this.currentReward),
+						source: 2, // 小程序
+						appId: this.appid
+					}
+					sendReward(param).then(res => {
+						if (res.code == 200) {
+							uni.hideLoading()
+							this.answerPopup = false
+							console.log('红包', res)
+							if (res.isNew && res.isNew == 1) {
+								console.log('红包配置', res)
+								const packageInfo = res.data.packageInfo || ''
+								if (packageInfo) {
+									uni.setStorageSync('receive_package', packageInfo)
+									uni.setStorageSync('mchId', res.mchId)
+									uni.navigateTo({
+										url: '/pages_course/reward'
+									})
+								}
+							} else {
+								if (res.msg.length > 14) {
+									uni.showModal({
+										title: '提示',
+										content: res.msg,
+										showCancel: false,
+										confirmText: '我知道了'
+									})
+								} else {
+									uni.showToast({
+										title: res.msg,
+										icon: 'none'
+									})
+								}
+							}
+						} else {
+							uni.hideLoading()
+							if (res.msg.length > 14) {
+								uni.showModal({
+									title: '提示',
+									content: res.msg,
+									showCancel: false,
+									confirmText: '我知道了'
+								})
+							} else {
+								uni.showToast({
+									title: res.msg,
+									icon: 'none'
+								})
+							}
+						}
+						// if(res.code == 200) {
+						// 	//重构 发红包,后台通过OPENID发零钱到 账
+						// 	//this.initWXConfig(res.package)
+						// }else {
+						// 	uni.showToast({
+						// 		title: res.msg,
+						// 		icon: 'none'
+						// 	})
+						// }
+					})
+				} else {
+					uni.hideLoading()
+					this.answerPopup = !this.answerPopup
+				}
+			},
+			// 线路
+			openPop() {
+				this.$refs.popup.open('bottom')
+			},
+			close() {
+				this.$refs.popup.close()
+			},
+			handleLine(index) {
+				var that = this;
+				if (this.lineIndex == index && this.videoUrl == this.lineList[index]) {
+					this.close()
+					return
+				} else {
+					// let div = document.querySelector(".vjs-progress-control");
+					// if(div) {
+					// 	if (this.isFinish == 1 || this.isEnded || this.linkType == 1) {
+					// 		div.style.pointerEvents = "auto";
+					// 	} else {
+					// 		div.style.pointerEvents = "none"; //禁止所有事件
+					// 	}
+					// }
+					this.lineIndex = index
+					this.videoUrl = this.lineList[index]
+					this.tipsOpen = false
+					this.playDurationSeek = this.playTime || 0
+					this.player = uni.createVideoContext('video-content-box');
+					setTimeout(function() {
+						that.player.seek(that.playDurationSeek)
+						that.player.play();
+					}, 500);
+					// this.player.src(this.lineList[index])
+					// this.player.one('loadedmetadata', () => {
+					// 	this.player.currentTime(this.playDurationSeek);
+					// 	this.player.play();
+					// });
+					this.close()
+				}
+
+			},
+			// 温馨提示
+			openTipsPop() {
+				// this.$refs.tipsPopup.open()
+				this.tipsPopup = true
+				// 暂停视频
+				this.videoContext.pause()
+				// this.tipsOpen = true
+				// this.pause()
+			},
+			closeTipsPop() {
+				// this.$refs.tipsPopup.close()
+				this.videoContext.play()
+				this.tipsPopup = !this.tipsPopup
+			},
+			// 客服
+			getIsAddKf() {
+				this.qrcode = ''
+				this.qrcodeMsg = ''
+				this.isAddKf = 0
+				//console.log('this.userInfo',this.userInfo)
+				this.userInfo = uni.getStorageSync('userInfo')
+				const data = {
+					videoId: this.videoId,
+					userId: this.userInfo.userId,
+					companyUserId: this.companyUserId,
+					companyId: this.companyId,
+					courseId: this.courseId,
+					periodId: this.periodId,
+					projectId: this.projectId,
+					appId: wx.getAccountInfoSync().miniProgram.appId,
+				}
+				// {videoId: this.videoId,qwUserId: this.qwUserId,corpId: this.corpId}
+				getIsAddKf(data).then(res => {
+						if (res.code == 200) {
+							this.isLogin = true
+							if (res.data) {
+								this.isAddKf = 1
+								if (this.userInfo) {
+								  if (typeof this.userInfo === 'string') {
+								    try {
+								      this.userInfo = JSON.parse(this.userInfo);
+								    } catch (e) {
+								      this.userInfo = {};
+								    }
+								  }
+								  if (this.userInfo.userId) {
+								    this.getH5CourseVideoDetails();
+								    this.getRemainTime(this.userInfo.userId);
+									this.getMp()
+								  }
+								}
+							}
+							// else{
+							// 	uni.showToast({
+							// 		title: '请联系管理员,注册为会员!',
+							// 		icon: 'none'
+							// 	});
+							// }
+						} else if (res.code == 1002) {
+							this.isAddKf = 0
+							this.qrcode = res.ext
+							this.kfPopup = true
+							uni.showToast({
+								title: "请添加管理员微信,成为会员!",
+								icon: 'none'
+							});
+							this.initExpiration(res.msg, res.code)
+						} else if (res.code == 505) {
+							this.isAddKf = 0
+							this.qrcode = res.ext
+							this.kfPopup = true
+							uni.showToast({
+								title: "管理员开启了会员审核,请等待审核!",
+								icon: 'none'
+							});
+							this.initExpiration(res.msg, res.code)
+						} else if (res.code == 406) {
+							uni.hideLoading();
+							uni.showToast({
+								icon: 'none',
+								title: '该用户已成为其他销售会员',
+							});
+							this.initExpiration(res.msg, res.code)
+						} else if (res.code == 504) {
+							this.isAddKf = 0
+							this.iskftype = 1
+							uni.showToast({
+								title: res.msg,
+								icon: 'none'
+							});
+							this.initExpiration(res.msg, res.code)
+						} else {
+							this.isAddKf = 0
+							uni.showToast({
+								title: res.msg,
+								icon: 'none'
+							});
+							this.initExpiration(res.msg, res.code)
+						}
+					},
+					err => {}
+				);
+			},
+			getMp(){
+				let provider = 'weixin'
+				uni.login({
+					provider: provider,
+					success: async loginRes => {
+						console.log(loginRes)
+						uni.getUserInfo({
+						   provider: provider,
+						   success: (infoRes)=> {
+							  //   uni.showToast({
+									// title: '处理中...',
+									// icon: 'loading'
+							  //   });
+								//console.log(infoRes,'infoRes')
+								loginByMiniApp({
+									code: loginRes.code,
+									encryptedData:infoRes.encryptedData,
+									iv:infoRes.iv,
+									appId:wx.getAccountInfoSync().miniProgram.appId,
+								}).then(res=>{
+									 //uni.hideLoading();
+									 if (res.code == 200) {
+										 uni.setStorageSync('userInfo',JSON.stringify(res.user));
+									 } else {
+										uni.showToast({
+											title: res.msg,
+											icon: 'none'
+										});
+									 }
+								 }).catch(err=>{
+									//uni.hideLoading();
+									uni.showToast({
+										icon:'none',
+										title: "登录失败,请重新登录",
+									});
+								});
+						   }
+						});
+					}
+				})
+			},
+			initExpiration(resMsg, resCode) {
+				if (resCode == 401) return;
+				this.resMsg = resMsg
+				this.resCode = resCode
+				this.showExpiration = true
+			},
+			closeKFPop() {
+				// this.$refs.kfPopup.close()
+				// this.kfPopup=!this.kfPopup
+			},
+			getFinishCourseVideo() {
+				if (!this.playTime) return
+				// {videoId: this.videoId,duration:this.playTime}
+				const param = {
+					duration: this.playTime,
+					videoId: this.videoId,
+					userId: this.userInfo.userId,
+					companyUserId: this.companyUserId
+				}
+				getFinishCourseVideo(param)
+			},
+			// 每十分钟获得积分
+			getIntegralByH5Video() {
+				const param = {
+					duration: this.playTime,
+					...this.urlOption
+				}
+				getIntegralByH5Video(param).then(res => {
+					if (res.code == 200) {
+						uni.showToast({
+							title: "积分+10",
+							icon: "none"
+						})
+					}
+				})
+			},
+			progressChange(e) {
+				this.bufferRate = Math.ceil(e.detail.buffered)
+				// console.log('缓冲结果',this.bufferRate)
+				// console.log('缓冲',this.playTime,this.duration)
+			},
+			// 缓冲
+			getInternetTraffic() {
+				const playVideoTime = Math.ceil(this.playTime / this.duration * 100) // 播放百分比
+				// console.log('播放百分比',playVideoTime)
+				if (this.bufferRate == 0 || this.bufferRate < playVideoTime) {
+					this.bufferRate = playVideoTime
+					console.log(this.bufferRate)
+				}
+				if (this.bufferRate == 0 || Number(this.bufferRate.toFixed(2)) == 0) return
+				const param = {
+					uuId: dayjs().format('YYYYMMDD') + this.uuId,
+					duration: this.playTime,
+					bufferRate: Number(this.bufferRate.toFixed(2)),
+					userId: this.userId,
+					periodId: this.periodId,
+					...this.urlOption
+				}
+				getInternetTraffic(param)
+			},
+			getErrMsg(err) {
+				let msgerr = {
+					videoUrl: this.videoUrl,
+					lineIndex: this.lineIndex,
+					errTime: new Date(),
+					// ip: this.ip,
+					errMsg: err
+				}
+				getErrMsg({
+					msg: JSON.stringify(msgerr)
+				})
+			},
+			getLink() {
+				this.goLogin()
+				return
+				let that = this;
+				this.msg = ''
+				getRealLink({
+					sortLink: this.sortLink
+				}).then(res => {
+					if (res.code == 200) {
+						this.isExpire = false
+						// 如果响应中包含真实链接,则跳转到真实链接
+						// window.location.href = res.realLink +"&sortLink="+this.sortLink+"&code="+this.code+"&time="+new Date().getTime()
+						if (this.isLogin && this.isAddKf == 1) {
+							this.getH5CourseVideoDetails()
+						}
+						if (this.videoId && this.isAddKf != 1) {
+							this.$isLoginCourse().then(
+								isLogin => {
+									this.isLogin = isLogin
+									if (isLogin) {
+										this.getIsAddKf()
+									} else {
+										this.goLogin()
+									}
+								},
+								rej => {}
+							);
+						}
+					} else {
+						this.isExpire = true
+						this.msg = '课程已过期或链接无效'
+						uni.showToast({
+							title: '课程已过期或链接无效',
+							icon: 'none'
+						});
+					}
+				}).catch(err => {
+					this.isExpire = true
+					this.msg = '发生错误,请稍后再试'
+					uni.showToast({
+						title: '发生错误,请稍后再试',
+						icon: 'none'
+					});
+				})
+			},
+			/**
+			 * 节流原理:在一定时间内,只能触发一次
+			 *
+			 * @param {Function} func 要执行的回调函数
+			 * @param {Number} wait 延时的时间
+			 * @param {Boolean} immediate 是否立即执行
+			 * @return null
+			 */
+			throttle(func, wait = 500, immediate = true) {
+				if (immediate) {
+					if (!this.flag) {
+						this.flag = true
+						// 如果是立即执行,则在wait毫秒内开始时执行
+						typeof func === 'function' && func()
+						this.timer = setTimeout(() => {
+							this.flag = false
+						}, wait)
+					}
+				} else if (!this.flag) {
+					this.flag = true
+					// 如果是非立即执行,则在wait毫秒内的结束处执行
+					this.timer = setTimeout(() => {
+						this.flag = false
+						typeof func === 'function' && func()
+					}, wait)
+				}
+			}
+		}
+	}
+</script>
+
+<style scoped>
+	.full-width-popup {
+		width: 100%;
+	}
+</style>
+<style lang="scss" scoped>
+	.notice-box{
+		padding: 12rpx 18rpx;
+		background: #FFF8F8;
+		display: flex;
+		align-items: center;
+		image{
+			width:40rpx;
+			height:40rpx;
+			margin-right: 10rpx;
+			flex-shrink: 0;
+		}
+		.notice-marquee-wrap{
+			flex: 1;
+			min-width: 0;
+			overflow: hidden;
+			display: flex;
+			align-items: center;
+		}
+		.notice-marquee-track{
+			display: inline-flex;
+			white-space: nowrap;
+			animation: notice-marquee-scroll 20s linear infinite;
+		}
+		.notice-text{
+			flex-shrink: 0;
+			padding-right: 60rpx;
+			font-family: PingFangSC, PingFang SC;
+			font-weight: 600;
+			font-size: 32rpx;
+			line-height: 44rpx;
+			color: #FF0C4D;
+			display: flex;
+		}
+	}
+	@keyframes notice-marquee-scroll{
+		0%{ transform: translateX(0); }
+		100%{ transform: translateX(-50%); }
+	}
+	.vip-order-cover-wrap {
+		position: fixed;
+		left: 10px;
+		bottom:40px;
+		height: 26px;
+		z-index: 999;
+		/* 容器按内容宽度自适应 */
+		display: inline-block;
+		overflow: visible;
+		pointer-events: none;
+		width: 200px;
+	}
+	.vip-order-cover-wrap--triple {
+		height: 110px;
+		//width: 240px;
+	}
+	.vip-order-cover-triple-panel {
+		display: flex;
+		align-items: flex-start;
+		flex-direction: column;
+		position: absolute;
+		left: 0;
+		right: auto;
+		top: 0;
+	}
+	.vip-order-cover-triple-current {
+		z-index: 1;
+	}
+	.vip-order-cover-triple-incoming {
+		z-index: 2;
+	}
+	.vip-order-cover-item {
+		position: absolute;
+		left: 0;
+		/* 不再撑满整块固定宽度,让背景宽度随内容变化 */
+		right: auto;
+		top: 0;
+		display: inline-flex;
+		align-items: center;
+		background: rgba(0,0,0,0.35);
+		border-radius: 26rpx;
+		text-align: center;
+		//border: 1px solid rgba(255, 12, 77, 0.2);
+		font-family: PingFangSC, PingFang SC;
+		font-size: 16px;
+		height: 26px;
+		line-height: 26px;
+		color: #fff;
+		font-weight: 400;
+		box-sizing: border-box;
+	}
+	.vip-order-cover-triple-item {
+		position: relative;
+		top: auto;
+		margin-bottom: 8px;
+	}
+	.vip-order-cover-triple-item:last-child {
+		margin-bottom: 0;
+	}
+	.vip-order-triple-enter {
+		animation: vip-order-triple-enter-up 0.46s ease-out forwards;
+	}
+	.vip-order-triple-leave {
+		animation: vip-order-triple-leave-up 0.46s ease-in forwards;
+	}
+	@keyframes vip-order-triple-enter-up {
+		0% {
+			opacity: 0;
+			transform: translateY(38px);
+		}
+		100% {
+			opacity: 1;
+			transform: translateY(0);
+		}
+	}
+	@keyframes vip-order-triple-leave-up {
+		0% {
+			opacity: 1;
+			transform: translateY(0);
+		}
+		78% {
+			opacity: 1;
+			transform: translateY(-34px);
+		}
+		100% {
+			opacity: 0;
+			transform: translateY(-38px);
+		}
+	}
+	.vip-order-cover-content {
+		display: flex;
+		align-items: center;
+		flex-wrap: nowrap;
+		white-space: nowrap;
+		overflow: visible;
+		justify-content: flex-start;
+		height: 26px;
+		line-height: 26px;
+		padding:0 8px;
+	}
+	.vip-order-seg {
+		display: inline-block;
+	}
+	.vip-order-seg-user {
+		color: #fff;
+		//font-weight: 600;
+	}
+	.vip-order-seg-time {
+		// font-size: 14px;
+		margin-left: 6px;
+	}
+	.vip-order-seg-suffix {
+		color: #fff;
+		// margin-left: 2px;
+	}
+	.vip-order-cover-self {
+		// width: 180px !important;
+		background: rgba(230,0,26,0.5);
+		// border: 1px solid #FFB020;
+		color: #fff;
+	}
+	.vip-order-cover-self .vip-order-seg-user {
+		color: #fff;
+		
+	}
+	.vip-order-cover-self .vip-order-seg-time {
+		color: #fff;
+		margin-left: 6px;
+	}
+	.vip-order-cover-self .vip-order-seg-suffix {
+		color: #fff;
+	}
+	.vip-order-enter {
+		animation: vip-order-enter-up 0.46s ease-out forwards;
+	}
+	.vip-order-leave {
+		animation: vip-order-leave-up 0.46s ease-in forwards;
+	}
+	@keyframes vip-order-enter-up {
+		0% {
+			opacity: 0;
+			transform: translateY(24px);
+		}
+		100% {
+			opacity: 1;
+			transform: translateY(0);
+		}
+	}
+	@keyframes vip-order-leave-up {
+		0% {
+			opacity: 1;
+			transform: translateY(0);
+		}
+		100% {
+			opacity: 0;
+			transform: translateY(-24px);
+		}
+	}
+	.rating-box{
+		position: relative;
+		padding:40rpx 24rpx 24rpx;
+		z-index:0;
+		height: calc(100vh - 488rpx);
+		.bg {
+			width: 100%;
+			// height: 500rpx;
+			position: absolute;
+			top: 0;
+			left: 0;
+			z-index: 0;
+		}
+		.rating-body{
+			//margin-top: 40rpx;
+			position: relative;
+			z-index: 1;
+			padding:30rpx;
+			box-sizing: border-box;
+			background: #FFFFFF;
+			border-radius: 24rpx;
+			max-height: calc(100% - 200rpx);
+			overflow-y: auto;
+			-webkit-overflow-scrolling: touch;
+			.title{
+				font-family: PingFangSC, PingFang SC;
+				font-weight: 600;
+				font-size: 40rpx;
+				color: rgba(0,0,0,0.85);
+				line-height: 56rpx;
+			}
+		}
+		.sat-box{
+			display: grid;
+			grid-template-columns: repeat(2, 1fr);
+			gap: 28rpx 24rpx;
+			margin-top: 32rpx;
+		}
+		.sat{
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+			justify-content: center;
+			text-align: center;
+			background: #F5F7FA;
+			padding: 20rpx;
+			border-radius: 20rpx;
+			transition: background 0.3s ease, box-shadow 0.3s ease;
+			.sat-img-wrap{
+				width: 100rpx;
+				height: 100rpx;
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				will-change: transform;
+				image{
+					width: 100rpx;
+					height: 100rpx;
+					transition: transform 0.35s cubic-bezier(0.34, 1.3, 0.64, 1);
+				}
+			}
+			.sat-img-bounce{
+				animation: sat-rate-pop 0.48s cubic-bezier(0.34, 1.45, 0.64, 1);
+			}
+			text{
+				margin-top: 10rpx;
+				font-family: PingFangSC, PingFang SC;
+			    font-weight: 400;
+			    font-size: 36rpx;
+				line-height: 50rpx;
+				transition: color 0.32s ease, font-weight 0.28s ease, transform 0.28s ease;
+				color: rgba(0,0,0,0.42);
+			}
+			.active{
+				font-weight: 600;
+				color: #FF233C;
+			}
+		}
+		.sat.sat--active{
+			background: #FFEEF0;
+			//box-shadow: 0 4rpx 16rpx rgba(255, 92, 3, 0.12);
+			.sat-img-wrap image{
+				transform: scale(1.06);
+			}
+		}
+	}
+	@keyframes sat-rate-pop{
+		0%{ transform: scale(1); }
+		28%{ transform: scale(1.2); }
+		52%{ transform: scale(0.94); }
+		76%{ transform: scale(1.06); }
+		100%{ transform: scale(1); }
+	}
+	// 更多操作弹窗
+	.more-actions-popup {
+		border-radius: 20rpx 0 0 20rpx;
+		padding: 30rpx;
+		display: flex;
+		justify-content: space-between;
+	
+		.more-action-item {
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+	
+			.action-icon {
+				width: 48rpx;
+				height: 48rpx;
+			}
+	
+			.action-label {
+				color: #1e1e1e;
+				text-align: center;
+				margin-top: 10rpx;
+			}
+		}
+	}
+	.progress-countdown {
+		position: fixed; 
+		right: 6px;
+		top: 6px;
+		z-index: 99999999;
+		// width: 112px;
+		height: 50px;
+		background: rgba(0,0,0,0.45);
+		display: flex;
+		align-items: center;
+		justify-content: space-around;
+		padding:2px 8px;
+		flex-direction: column;
+        border-radius: 6px;
+		 box-sizing: border-box; /* 避免padding撑大容器 */
+	}
+	.progress-title {
+		font-size: 16px;
+		color:#FFA643;
+		font-weight: 600;
+	}
+	.progress-img{
+		width: 63px;
+		height: 15px;
+	}
+	.progress-bar-bg {
+		width: 86px;
+		height: 6px;
+		//margin-top: 16rpx;
+		background: rgba(255,255,255,0.8);
+		border-radius: 3px;
+		overflow: hidden;
+		// margin-bottom: 16rpx;
+	}
+	.progress-bar-fill {
+		height: 100%;
+		background: #FF233C;
+		border-radius: 3px;
+		transition: width 1s linear;
+	}
+.progress-text {
+	white-space: nowrap; /* 强制不换行 */
+	color: #fff;
+	font-size: 13px;
+    display: flex;
+	align-items: flex-start; /* 垂直居中 */
+	justify-content: center; /* 水平居中 */
+		}
+	.progress-text-label {
+		font-size: 12px;
+		margin-right: 2px;
+	}
+	.ques-flex {
+		display: flex;
+		align-items: center;
+		flex-direction: row;
+		justify-content: space-around;
+	}
+
+	.subname {
+		background-color: #00aa00;
+		color: #fff;
+	}
+
+	.subavt {
+		background-color: #fff;
+		border: 2rpx #0a0 solid;
+		color: #00aa00;
+	}
+
+	.boxweixin {
+		width: 44rpx;
+		height: 44rpx;
+		border-radius: 50%;
+		text-align: center;
+		line-height: 34rpx;
+		color: #0a0;
+	}
+
+	.boxnosel {
+		border: #757575 4rpx solid;
+	}
+
+	.boxsel {
+		border: #0a0 4rpx solid;
+	}
+
+	.button-container {
+		position: relative;
+		width: 240rpx;
+	}
+
+	.hidden-input {
+		position: absolute;
+		top: 0;
+		left: 0;
+		width: 100%;
+		height: 100%;
+		opacity: 0;
+		z-index: 2;
+	}
+
+	.custom-button {
+		position: relative;
+		z-index: 1;
+		/* 其他样式 */
+		width: 100%;
+		margin: 0 auto;
+		height: 80rpx;
+		line-height: 60rpx;
+		font-size: 28rpx;
+		padding: 10rpx 20rpx;
+	}
+
+	.submitname {
+		width: 90%;
+
+		margin: 0 auto;
+		text-align: center;
+		padding: 30rpx;
+		margin-top: 40rpx;
+	}
+
+	.sub {
+		background-color: #f0f0f0;
+		color: #0a0;
+	}
+
+	.subact {
+		background-color: #0a0;
+		color: #fff;
+	}
+
+	.userlogo {
+		height: 760rpx;
+	}
+
+	.getlogo {
+		width: 240rpx;
+		background-color: #fff;
+		// padding: 10rpx 20rpx;
+	}
+
+	@mixin u-flex($flexD, $alignI, $justifyC) {
+		display: flex;
+		flex-direction: $flexD;
+		align-items: $alignI;
+		justify-content: $justifyC;
+	}
+
+	.footer-tips {
+		position: fixed;
+		width: 100%;
+		bottom: 144rpx;
+		text-align: center;
+		font-family: PingFang SC, PingFang SC;
+		font-weight: 500;
+		font-size: 12px;
+		color: #bbb;
+		transform: scale(0.8);
+	}
+
+	.btns {
+		//position: relative;
+		width: 100%;
+		height: 96rpx;
+		display: flex;
+		    align-items: center;
+		    justify-content: space-between;
+		.author-btn {
+			// z-index: 100;
+			// position: absolute;
+			// width: 100%;
+			flex:1;
+			height: 96rpx;
+			background: linear-gradient( 135deg, #FF5267 0%, #FF233C 100%);
+			border-radius: 48rpx;
+			font-family: PingFangSC, PingFang SC;
+			font-weight: 600;
+			font-style: normal;
+			font-size: 40rpx;
+			color: #FFFFFF;
+			text-align: center;
+			line-height: 96rpx;
+			display: flex;
+			    align-items: center;
+			    justify-content: center;
+				image{
+					margin-left: 4rpx;
+					width: 40rpx;
+					height: 40rpx;
+				}
+		}
+		.author-cart{
+			padding-left: 40rpx;
+			display: flex;
+			    align-items: center;
+				.more-box{
+					display: flex;
+					align-items: center;
+					flex-direction: column;
+					.tips{
+						font-family: PingFangSC, PingFang SC;
+						font-weight: 600;
+						font-size: 32rpx;
+						color: #222222;
+						line-height: 44rpx;
+						text-align: center;
+						margin-top: 12rpx;
+					}
+					image{
+						width: 80rpx;
+						height: 80rpx;
+					}
+					&:last-child{
+						margin-left: 40rpx;
+					}
+				}
+			.xianshi{
+				position: absolute;
+				z-index: 10;
+				right:20rpx;
+				bottom: 180rpx;
+				width: 214rpx;
+				height:90rpx;
+			}
+		}
+	}
+
+	.textOne {
+		overflow: hidden;
+		white-space: nowrap;
+		text-overflow: ellipsis;
+	}
+
+	.textTwo {
+		overflow: hidden;
+		text-overflow: ellipsis;
+		display: -webkit-box;
+		-webkit-line-clamp: 2;
+		-webkit-box-orient: vertical;
+	}
+
+	.header-nav {
+		height: 88rpx;
+		@include u-flex(row, center, flex-start);
+		overflow: hidden;
+		background-color: #fff;
+		box-sizing: border-box;
+
+		.header-title {
+			text-align: center;
+			overflow: hidden;
+			white-space: nowrap;
+			text-overflow: ellipsis;
+			padding: 0 10rpx 0 100rpx;
+			font-family: PingFang SC, PingFang SC;
+			font-weight: 500;
+			font-size: 15px;
+			color: #000;
+			box-sizing: border-box;
+		}
+	}
+
+	.reward-list {
+		width: 100%;
+		margin-top: 20rpx;
+		margin-bottom: -40rpx;
+
+		&-group {
+			font-family: PingFang SC, PingFang SC;
+			font-weight: 400;
+			font-size: 14px;
+			color: #222222;
+			@include u-flex(row, center, center);
+		}
+
+		&-option {
+			@include u-flex(row, center, flex-start);
+
+			&:first-child {
+				margin-right: 40rpx;
+			}
+		}
+	}
+
+	.err {
+		color: #f56c6c !important;
+	}
+
+	.kfqrcode-box {
+		background-color: #fff;
+		border-radius: 16rpx;
+		max-width: 560rpx;
+		padding: 60rpx 40rpx;
+		margin-top: -100rpx;
+		box-sizing: border-box;
+		@include u-flex(column, center, flex-start);
+		font-family: PingFang SC, PingFang SC;
+		font-weight: 400;
+		font-size: 34rpx;
+		color: #222;
+		position: relative;
+		text-align: center;
+
+		.kfqrcode {
+			// height: 460rpx;
+			width: 460rpx;
+		}
+	}
+
+	.kfqrcode-close {
+		width: 64rpx;
+		height: 64rpx;
+		position: absolute;
+		bottom: -100rpx;
+		left: 50%;
+		transform: translateX(-50%);
+	}
+
+	.tipsPopup-mask {
+		position: relative;
+		width: 560rpx;
+		background-color: transparent;
+
+		.red_envelope_top {
+			width: 480rpx;
+			height: 360rpx;
+			margin: 0 auto;
+			display: inherit;
+		}
+	}
+
+	.tipsPopup-btn-box {
+		width: 456rpx;
+		height: 104rpx;
+		padding: 4rpx;
+		box-sizing: border-box;
+		background: linear-gradient(180deg, rgba(252, 209, 94, 1), rgba(254, 253, 251, 1));
+		border-radius: 52rpx;
+	}
+
+	.tipsPopup-btn {
+		width: 100%;
+		height: 100%;
+		background: linear-gradient(180deg, #FF9F22 0%, #FA1E05 100%);
+		border-radius: 52rpx 52rpx 52rpx 52rpx;
+		font-family: PingFang SC, PingFang SC;
+		font-weight: 500;
+		font-size: 36rpx;
+		color: #FFFFFF;
+		line-height: 96rpx;
+		text-align: center;
+	}
+
+	.tipsPopup {
+		width: 560rpx;
+		padding: 12rpx;
+		margin-top: -72rpx;
+		box-sizing: border-box;
+		background: linear-gradient(180deg, #FFFBEF 0%, #FFFFF5 43%, #F5EAC2 100%);
+		border-radius: 32rpx 32rpx 32rpx 32rpx;
+		position: relative;
+
+		&-close {
+			width: 64rpx;
+			height: 64rpx;
+			position: absolute;
+			right: 0;
+			top: -188rpx;
+		}
+
+		&-line {
+			padding: 3rpx;
+			box-sizing: border-box;
+			background: linear-gradient(180deg, rgba(247, 245, 220, 1), rgba(250, 220, 157, 1));
+			border-radius: 24rpx;
+		}
+
+		&-box {
+			padding: 0 40rpx 40rpx 40rpx;
+			box-sizing: border-box;
+			background: linear-gradient(180deg, #FFFBEF 0%, #FFFFF5 43%, #F5EAC2 100%);
+			border-radius: 24rpx;
+			@include u-flex(column, center, flex-start);
+		}
+
+		&-head {
+			@include u-flex(row, center, center);
+
+			&-title {
+				width: 364rpx;
+				height: auto;
+				margin-top: -22rpx;
+			}
+		}
+
+		&-content {
+			margin: 48rpx 0;
+			font-family: PingFang SC, PingFang SC;
+			font-weight: 500;
+			font-size: 32rpx;
+			color: #222222;
+			text-align: center;
+
+			&-title {
+				margin-bottom: 26rpx;
+				font-weight: 600;
+				font-size: 40rpx;
+				color: #FF5C03;
+			}
+		}
+	}
+    
+	// 商品卡片样式
+	.goods-card {
+		position: absolute;
+		right: 24rpx;
+		bottom: 280rpx;
+		z-index: 9999;
+		width: 300rpx;
+		background: #FFFFFF;
+		border-radius: 20rpx;
+		overflow: hidden;
+
+		&-inner {
+			display: flex;
+			flex-direction:column;
+		}
+
+		&-img {
+			width:300rpx;
+			height:300rpx;
+			flex-shrink: 0;
+		}
+
+		&-info {
+			flex: 1;
+			padding: 12rpx;
+			display: flex;
+			flex-direction: column;
+			justify-content: space-between;
+		}
+
+		&-title {
+			font-family: PingFangSC, PingFang SC;
+			font-weight: 600;
+			font-size: 32rpx;
+			color: rgba(0,0,0,0.85);
+			line-height: 44rpx;
+			overflow: hidden;
+			text-overflow: ellipsis;
+			display: -webkit-box;
+			-webkit-line-clamp: 2;
+			-webkit-box-orient: vertical;
+		}
+		&-bottom {
+			margin-top: 12rpx;
+			display: flex;
+			flex-direction: row;
+			align-items: center;
+			//justify-content: space-between;
+		}
+
+		&-tag {
+			position: relative;
+			width: 120rpx;
+			height: 44rpx;
+		}
+
+		&-tag-bg {
+			width: 100%;
+			height: 100%;
+		}
+
+		&-tag-text {
+			position: absolute;
+			left: 0;
+			top: 0;
+			width: 100%;
+			height: 100%;
+			text-align: center;
+			line-height: 44rpx;
+			font-size: 24rpx;
+			color: #FFFFFF;
+			font-weight: 500;
+		}
+		
+		&-price{
+			margin-left: 14rpx;
+			display: flex;
+			align-items:baseline;
+			.unit{
+				font-family: PingFangSC, PingFang SC;
+				font-weight: 600;
+				font-size: 32rpx;
+				color: #FF233C;
+			}
+			.price{
+				font-family: PingFangSC, PingFang SC;
+				font-weight: 600;
+				font-size: 48rpx;
+				color: #FF233C;
+			}
+		}
+		.close-box{
+			position: absolute;
+			top:20rpx;
+			right:20rpx;
+			image{
+				width: 30rpx;
+				height: 30rpx;
+			}
+		}
+	}
+   /* 商品卡片样式 */
+   .goods-cover {
+     /* cover-view 在 video 内使用 absolute 比 fixed 更稳定 */
+     position: absolute;
+     right: 12px;
+	 width: 150px;
+     z-index: 99999;
+     background: #FFFFFF;
+     border-radius: 10px;
+     overflow: hidden;
+     bottom: 40px;
+     &-inner {
+       display: flex;
+       flex-direction:column;
+     }
+   
+     &-img {
+       width:150px;
+       height:150px;
+       flex-shrink: 0;
+     }
+   
+     &-info {
+       flex: 1;
+       padding: 6px;
+       display: flex;
+       flex-direction: column;
+       justify-content: space-between;
+     }
+   
+     &-title {
+       font-family: PingFangSC, PingFang SC;
+       font-weight: 600;
+       font-size: 16px;
+       color: #000000D9;
+       line-height: 22px;
+       overflow: hidden;
+        width: 150px; /* 必须给宽度 */
+        white-space: nowrap; /* 关键 */
+        text-overflow: ellipsis;
+     }
+     &-bottom {
+       margin-top: 6px;
+       display: flex;
+       flex-direction: row;
+       align-items: center;
+     }
+   
+     &-tag {
+       position: relative;
+       width: 60px;
+       height: 22px;
+     }
+   
+     &-tag-bg {
+       width: 100%;
+       height: 100%;
+     }
+   
+     &-tag-text {
+       position: absolute;
+       left: 0;
+       top: 0;
+       width: 100%;
+       height: 100%;
+       text-align: center;
+       line-height: 22px;
+       font-size: 12px;
+       color: #FFFFFF;
+       font-weight: 500;
+     }
+     
+     &-price{
+       margin-left: 7px;
+       display: flex;
+       align-items:baseline;
+       .unit{
+         font-family: PingFangSC, PingFang SC;
+         font-weight: 600;
+         font-size: 16px;
+         color: #FF233C;
+       }
+       .price{
+         font-family: PingFangSC, PingFang SC;
+         font-weight: 600;
+         font-size: 24px;
+         color: #FF233C;
+       }
+     }
+     .close-box{
+       position: absolute;
+       top:10px;
+       right:10px;
+	   z-index:9;
+       cover-image{
+         width: 15px;
+         height: 15px;
+       }
+     }
+   }
+	.video-controls-box {
+		width: 100%;
+		height: 300rpx;
+		overflow: hidden;
+		position: absolute;
+		bottom: 0;
+		left: 0;
+		z-index: 2;
+		background: rgba(0, 0, 0, 0.2);
+
+		.video-play {
+			height: 72rpx;
+			width: 72rpx;
+			position: absolute;
+			top: 50%;
+			left: 50%;
+			transform: translate(-50%, -50%);
+		}
+	}
+
+	.video-controls {
+		width: 100%;
+		height: 80rpx;
+		padding: 0 28rpx;
+		box-sizing: border-box;
+		position: absolute;
+		bottom: 0;
+		left: 0;
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		background: linear-gradient(to top, #222 0%, transparent 80%);
+
+		.video-icon {
+			height: 44rpx;
+			width: 44rpx;
+		}
+	}
+
+	.errQuesbox {
+		width: 100%;
+		max-height: 260rpx;
+		overflow-y: auto;
+		margin-top: 24rpx;
+		font-family: PingFang SC, PingFang SC;
+		font-weight: 500;
+		font-size: 30rpx;
+		color: #222222;
+
+		&-item {
+			width: 100%;
+			height: 128rpx;
+			line-height: 128rpx;
+			margin-bottom: 24rpx;
+			padding: 0 30rpx;
+			box-sizing: border-box;
+			overflow: hidden;
+			background: #fff;
+			border-radius: 16rpx 16rpx 16rpx 16rpx;
+			position: relative;
+
+			&::after {
+				content: "题目";
+				min-width: 64rpx;
+				height: 36rpx;
+				padding: 0 12rpx;
+				line-height: 36rpx;
+				background: #FF5C03;
+				box-sizing: border-box;
+				border-radius: 0rpx 0rpx 16rpx 0rpx;
+				text-align: center;
+				font-family: PingFang SC, PingFang SC;
+				font-weight: 500;
+				font-size: 20rpx;
+				color: #fff;
+				position: absolute;
+				left: 0;
+				top: 0;
+			}
+		}
+	}
+
+	.bg {
+		background: #fff !important;
+	}
+
+	.timepopbox {
+		width: 560rpx;
+		padding: 32rpx;
+		box-sizing: border-box;
+	}
+
+	.answerPopup {
+		&-box {
+			width: 560rpx;
+			background: linear-gradient(180deg, #FFFAF6 0%, #FEECD8 100%);
+			border-radius: 32rpx 32rpx 32rpx 32rpx;
+			background-color: #fff;
+			font-weight: 400;
+			padding: 32rpx;
+			box-sizing: border-box;
+			position: relative;
+			@include u-flex(column, center, flex-start);
+			font-family: PingFang SC, PingFang SC;
+			font-weight: 400;
+
+			.tipimg {
+				width: 206rpx;
+				height: 206rpx;
+				margin-bottom: 16rpx;
+			}
+		}
+
+		&-title {
+			font-weight: 600;
+			font-size: 36rpx;
+			color: #222222;
+		}
+
+		&-desc {
+			margin-top: 10rpx;
+			font-size: 28rpx;
+			color: #757575;
+		}
+
+		&-btn {
+			width: 464rpx;
+			height: 84rpx;
+			margin-top: 54rpx;
+			margin-bottom: 16rpx;
+			background: #FF5C03;
+			border-radius: 42rpx;
+			font-weight: 500;
+			font-size: 32rpx;
+			color: #FFFFFF;
+			text-align: center;
+			line-height: 84rpx;
+		}
+	}
+
+	.popupbox {
+		width: 100%;
+		background-color: #fff;
+		border-radius: 16rpx 16rpx 0 0;
+		padding: 24rpx 32rpx;
+		position: relative;
+
+		&-head {
+			height: 60rpx;
+			margin-bottom: 30rpx;
+			text-align: center;
+			overflow-y: auto;
+			color: #414858;
+			font-size: 32rpx;
+			font-weight: bold;
+			position: relative;
+
+			.close-icon {
+				position: absolute;
+				right: 0;
+				top: 0;
+				height: 40rpx;
+				width: 40rpx;
+			}
+		}
+
+		&-content {
+			height: 20vh;
+			overflow-y: auto;
+			display: flex;
+			align-items: flex-start;
+			flex-wrap: wrap;
+			gap: 32rpx;
+
+			.line-item {
+				display: inline-block;
+				min-width: 200rpx;
+				min-height: 60rpx;
+				padding: 0 20rpx;
+				box-sizing: border-box;
+				border-radius: 50rpx;
+				overflow: hidden;
+				background-color: #f7f7f7;
+				text-align: center;
+				color: #414858;
+				font-size: 28rpx;
+				line-height: 60rpx;
+			}
+
+			.line-active {
+				color: #f56c6c !important;
+				background-color: #fef0f0 !important;
+			}
+		}
+	}
+
+	.content {
+		//padding-bottom: calc(var(--window-bottom) + 100rpx);
+
+		.video-box {
+			width: 100%;
+			height: 420rpx;
+			overflow: hidden;
+			position: relative;
+
+			#myVideo {
+				width: 100%;
+				height: 100%;
+			}
+		}
+
+		.video-poster {
+			width: 100%;
+			height: 420rpx;
+		}
+
+		.miantitlebox {
+			padding: 30rpx 0;
+			border-bottom: 2rpx solid #F5F7FA;
+			font-family: PingFang SC, PingFang SC;
+			font-weight: 500;
+			font-size: 40rpx;
+			color: #222222;
+		}
+
+		.subtitlebox {
+			padding: 30rpx 0;
+			border-bottom: 2rpx solid #F5F7FA;
+			font-family: PingFang SC, PingFang SC;
+			font-weight: 500;
+			font-size: 40rpx;
+			color: #222222;
+		}
+
+		.title-content {
+			padding: 0 32rpx;
+			background-color: #fff;
+			font-size: 28rpx;
+			line-height: 1.6;
+
+			.title {
+				font-size: 36rpx;
+				font-weight: 500;
+				color: #414858;
+			}
+
+			.time-or-subtitle {
+				margin-top: 12rpx;
+				color: #666666;
+			}
+		}
+
+		.descbox {
+			padding: 36rpx 32rpx;
+			margin-bottom: 20rpx;
+			background-color: #fff;
+			font-family: PingFang SC, PingFang SC;
+			font-weight: 400;
+			font-size: 28rpx;
+			color: #222222;
+			line-height: 42rpx;
+			word-break: break-word;
+
+			&-title {
+				margin-bottom: 24rpx;
+				font-weight: 500;
+				font-size: 32rpx;
+			}
+
+			&-info {
+				margin-bottom: 24rpx;
+				@include u-flex(row, center, space-between);
+				font-size: 26rpx;
+				color: #757575;
+
+				&-l {
+					flex: 1;
+					@include u-flex(row, center, flex-start);
+				}
+
+				&-time {
+					margin-left: 18rpx;
+					padding-left: 18rpx;
+					position: relative;
+
+					&::after {
+						content: "";
+						width: 4rpx;
+						height: 4rpx;
+						background: #999999;
+						border-radius: 50%;
+						position: absolute;
+						left: 0;
+						top: 50%;
+						transform: translateY(-50%);
+					}
+				}
+
+				&-r {
+					background: transparent;
+				}
+			}
+
+			&-desc {
+				overflow: hidden;
+				position: relative;
+			}
+		}
+
+		.expand {
+			flex-shrink: 0;
+			@include u-flex(row, center, flex-end);
+			color: #FF5C03;
+			font-weight: 400;
+			font-size: 24rpx;
+
+			image {
+				width: 32rpx;
+				height: 32rpx;
+			}
+		}
+
+		.expand-ab {
+			position: absolute;
+			top: 0;
+			right: 0;
+			box-shadow: -50rpx 0 20rpx 8rpx #FFFFFF;
+			background-color: #fff;
+		}
+
+		.ques-content {
+			background-color: #fff;
+			padding: 40rpx 32rpx;
+			box-sizing: border-box;
+			font-family: PingFang SC, PingFang SC;
+			font-weight: 400;
+			font-size: 28rpx;
+			color: #222222;
+		}
+
+		.ques-content-tit {
+			font-family: PingFangSC, PingFang SC;
+			font-weight: 600;
+			font-size: 48rpx;
+			color: rgba(0,0,0,0.85);
+			line-height: 66rpx;
+		}
+
+		.ques-title {
+			margin: 48rpx 0 34rpx 0;
+			font-weight: 600;
+			font-size: 40rpx;
+			white-space: normal;
+		}
+
+		.ques-type {
+			flex-shrink: 0;
+			min-width: 72rpx;
+			min-height: 40rpx;
+			padding: 0 12rpx;
+			margin: 0 12rpx;
+			box-sizing: border-box;
+			background: #FF5C03;
+			border-radius: 8rpx 8rpx 8rpx 8rpx;
+			line-height: 40rpx;
+			text-align: center;
+			font-family: PingFang SC, PingFang SC;
+			font-weight: 400;
+			font-size: 24rpx;
+			color: #FFFFFF;
+			display: inline-block;
+		}
+
+		.ques-option {
+			min-height: 88rpx;
+			padding: 24rpx 32rpx;
+			box-sizing: border-box;
+			margin-bottom: 24rpx;
+			background: #F5F7FA;
+			border-radius: 16rpx 16rpx 16rpx 16rpx;
+			display: flex;
+			align-items: center;
+
+			&-active {
+				color: #FF5C03 !important;
+				background: #FCF0E7 !important;
+			}
+		}
+
+		.video-line {
+			min-width: 140rpx;
+			max-width: 200rpx;
+			height: 60rpx;
+			padding: 0 20rpx;
+			box-sizing: border-box;
+			border-radius: 50rpx 0 0 50rpx;
+			overflow: hidden;
+			background-color: #fff;
+			text-align: center;
+			color: #888;
+			font-size: 28rpx;
+			line-height: 60rpx;
+			display: inline-flex;
+			align-items: center;
+			justify-content: center;
+			position: fixed;
+			right: 0;
+			z-index: 9;
+			bottom: calc(var(--window-bottom) + 280rpx);
+			box-shadow: 0 4rpx 10rpx rgba(0, 0, 0, .12);
+
+			image {
+				flex-shrink: 0;
+				height: 30rpx;
+				width: 30rpx;
+				margin-right: 6rpx;
+			}
+		}
+
+		.footer {
+			//border-top: 1rpx solid #ededef;
+			background: #fff;
+			width: 100%;
+			position: fixed;
+			bottom: 0;
+			padding: 32rpx;
+			padding-bottom:68rpx;
+			box-sizing: border-box;
+			z-index: 0;
+
+			&-btn {
+				width: 100%;
+				height: 98rpx;
+				background: #FF5C03;
+				border-radius: 49rpx 49rpx 49rpx 49rpx;
+				line-height: 98rpx;
+				text-align: center;
+				font-family: PingFang SC, PingFang SC;
+				font-weight: 600;
+				font-size: 32rpx;
+				color: #FFFFFF;
+				@include u-flex(row, center, center);
+
+				&-img {
+					flex-shrink: 0;
+					width: 144rpx;
+					height: 144rpx;
+					margin-right: 8rpx;
+					margin-top: -24rpx;
+				}
+			}
+
+			&-btn-border {
+				position: relative;
+
+				&::after {
+					content: "";
+					background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1));
+					position: absolute;
+					top: -2rpx;
+					left: 0;
+					height: 103rpx;
+					width: 100%;
+					z-index: -1;
+					border-radius: 49rpx 49rpx 49rpx 49rpx;
+					box-shadow: 0rpx 8rpx 11rpx 0rpx rgba(255, 92, 3, 0.3);
+					overflow: hidden;
+				}
+			}
+		}
+	}
+
+	.agreement {
+		display: inline-flex;
+		margin-top: 16rpx;
+		font-size: 24rpx;
+		color: #525252;
+		align-items: center;
+		justify-content: center;
+	}
+
+	.nocourse {
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		padding-bottom: 88rpx;
+		justify-content: center;
+		font-family: PingFang SC, PingFang SC;
+		font-weight: 400;
+		font-size: 32rpx;
+		color: #757575;
+		line-height: 48rpx;
+		text-align: center;
+
+		image {
+			width: 328rpx;
+			height: auto;
+			margin-bottom: 30rpx;
+		}
+	}
+
+	.logo {
+		display: inline-block;
+		width: 30px;
+		height: auto;
+		margin: 20px 0 0 10px;
+		pointer-events: none;
+		object-fit: cover;
+	}
+
+	.logo-full {
+		display: inline-block;
+		width: 40px;
+		height: auto;
+		margin: 50px 0 0 30px;
+		pointer-events: none;
+		object-fit: cover;
+	}
+</style>

Разлика између датотеке није приказан због своје велике величине
+ 1267 - 34
pages_course/videovip.vue


+ 160 - 19
pages_index/course.vue

@@ -32,7 +32,7 @@
 						<text>{{ cat }}</text>
 					</view>
 				</view>
-				<view class="expand-btn" @click="categoryExpand = !categoryExpand">
+				<view v-if="categories.length>9" class="expand-btn" @click="categoryExpand = !categoryExpand">
 					<text>{{ categoryExpand ? '收起' : '展开' }}</text>
 					<image :class="{ 'rotate-arrow': !categoryExpand }"   src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/class/expand.png"></image>
 					<!-- <text class="arrow">{{ categoryExpand ? '▲' : '▼' }}</text> -->
@@ -41,7 +41,14 @@
 		</view>
 
 		<!-- 精品课程 内容 -->
-		<scroll-view v-show="tabIndex === 0" scroll-y class="scroll-wrap" :show-scrollbar="false">
+		<scroll-view
+			v-show="tabIndex === 0"
+			scroll-y
+			class="scroll-wrap"
+			:show-scrollbar="false"
+			lower-threshold="120"
+			@scrolltolower="onCourseScrollToLower"
+		>
 			<!-- 分类标签区 -->
 			
 
@@ -69,11 +76,22 @@
 					
 				</view>
 			</view>
+			<view v-if="courseList.length > 0" class="load-tip">
+				<text v-if="courseLoading">加载中...</text>
+				<text v-else-if="!courseHasMore">没有更多了</text>
+			</view>
 			<view class="bottom-placeholder"></view>
 		</scroll-view>
 
 		<!-- 最近学习 内容 -->
-		<scroll-view v-show="tabIndex === 1" scroll-y class="scroll-wrap" :show-scrollbar="false">
+		<scroll-view
+			v-show="tabIndex === 1"
+			scroll-y
+			class="scroll-wrap"
+			:show-scrollbar="false"
+			lower-threshold="120"
+			@scrolltolower="onRecentScrollToLower"
+		>
 			<!-- 有学习记录:按日期分组列表 -->
 			<template v-if="recentList.length > 0">
 				<view v-for="(group, gIdx) in recentList" :key="gIdx" class="recent-group">
@@ -99,6 +117,10 @@
 						</view>
 					</view>
 				</view>
+				<view class="load-tip">
+					<text v-if="recentLoading">加载中...</text>
+					<text v-else-if="!recentHasMore">没有更多了</text>
+				</view>
 			</template>
 
 			<!-- 无学习记录:空态 + 为您精选 -->
@@ -153,6 +175,15 @@ export default {
 			categories: [],
 			categoryRows: [],
 			courseList: [],
+			coursePageNum: 1,
+			coursePageSize: 10,
+			courseLoading: false,
+			courseHasMore: true,
+			courseQuerySubCateId: null,
+			recentPageNum: 1,
+			recentPageSize: 10,
+			recentLoading: false,
+			recentHasMore: true,
 			recentList: [
 				// {
 				// 	date: '2026-02-08',
@@ -197,9 +228,10 @@ export default {
 			return "100w+";
 		},
 		async initPublicCourseData() {
-          await this.getCategoryList()
-			await this.getCourseList()
-			await this.getCourseStudyList()
+			await this.getCategoryList()
+			this.courseQuerySubCateId = null
+			await this.getCourseList({})
+			await this.getCourseStudyList({})
 		},
 		async getNewCourseList() {
 			try {
@@ -218,7 +250,7 @@ export default {
 		},
 		async getCategoryList() {
 			try {
-				const res = await listPublicCourseCategory({ pageNum: 1, pageSize: 10 })
+				const res = await listPublicCourseCategory({ pageNum: 1, pageSize: 50 })
 				const list = (res && res.data && res.data.list) || []
 				this.categoryRows = [{ cateId: null, cateName: '全部' }, ...list]
 				this.categories = this.categoryRows.map(item => item.cateName || '')
@@ -227,39 +259,141 @@ export default {
 				this.categories = ['全部']
 			}
 		},
-		async getCourseList(subCateId) {
-			try {
-				const params = {yxxTag:0, pageNum: 1, pageSize: 10 }
-				if (subCateId) {
-					params.subCateId = subCateId
+		countRecentCourses(groups) {
+			if (!Array.isArray(groups)) return 0
+			return groups.reduce((n, g) => n + (g && g.courses ? g.courses.length : 0), 0)
+		},
+		mergeRecentGroups(existing, incoming) {
+			if (!Array.isArray(incoming) || incoming.length === 0) {
+				return Array.isArray(existing) ? existing.slice() : []
+			}
+			if (!Array.isArray(existing) || existing.length === 0) {
+				return incoming.map(g => ({
+					date: g.date,
+					courses: [...(g.courses || [])]
+				}))
+			}
+			const result = existing.map(g => ({
+				date: g.date,
+				courses: [...(g.courses || [])]
+			}))
+			for (const ng of incoming) {
+				const last = result[result.length - 1]
+				if (last && last.date === ng.date) {
+					last.courses = last.courses.concat(ng.courses || [])
+				} else {
+					result.push({ date: ng.date, courses: [...(ng.courses || [])] })
 				}
+			}
+			return result
+		},
+		async getCourseList(options = {}) {
+			const loadMore = !!options.loadMore
+			if (this.courseLoading) return
+			if (loadMore && !this.courseHasMore) return
+			if (!loadMore) {
+				this.coursePageNum = 1
+				this.courseHasMore = true
+				if (options.subCateId !== undefined) {
+					this.courseQuerySubCateId = options.subCateId
+				}
+			}
+			const currentPageNum = this.coursePageNum
+			const params = {
+				yxxTag: 0,
+				pageNum: currentPageNum,
+				pageSize: this.coursePageSize
+			}
+			if (this.courseQuerySubCateId) {
+				params.subCateId = this.courseQuerySubCateId
+			}
+			this.courseLoading = true
+			try {
 				const res = await listPublicCourse(params)
 				const list = (res && res.data && res.data.list) || []
-				this.courseList = list.map(item => ({
+				const mapped = list.map(item => ({
 					courseId: item.courseId,
 					title: item.courseTitle || item.courseName || '',
 					views: item.watchUserCount || 0,
 					cover: item.imgUrl || ''
 				}))
+				this.courseList = loadMore ? this.courseList.concat(mapped) : mapped
+				const total = Number(res.data && res.data.total)
+				if (Number.isFinite(total) && total >= 0) {
+					this.courseHasMore = this.courseList.length < total
+				} else {
+					this.courseHasMore = mapped.length >= this.coursePageSize
+				}
+				if (mapped.length > 0) {
+					this.coursePageNum = currentPageNum + 1
+				} else {
+					this.courseHasMore = false
+				}
 			} catch (e) {
-				this.courseList = []
+				if (!loadMore) {
+					this.courseList = []
+				}
+				this.courseHasMore = false
+			} finally {
+				this.courseLoading = false
 			}
 		},
-		async getCourseStudyList() {
+		onCourseScrollToLower() {
+			if (this.tabIndex !== 0) return
+			this.getCourseList({ loadMore: true })
+		},
+		async getCourseStudyList(options = {}) {
+			const loadMore = !!options.loadMore
+			if (this.recentLoading) return
+			if (loadMore && !this.recentHasMore) return
+			if (!loadMore) {
+				this.recentPageNum = 1
+				this.recentHasMore = true
+			}
+			const currentPageNum = this.recentPageNum
+			const params = {
+				courseType: 0,
+				pageNum: currentPageNum,
+				pageSize: this.recentPageSize
+			}
+			this.recentLoading = true
 			try {
-				const params = { courseType:0,pageNum: 1, pageSize: 10 }
 				const res = await getCourseStudyList(params)
 				const list = (res && res.data && res.data.list) || []
-				this.recentList = list
+				const merged = loadMore ? this.mergeRecentGroups(this.recentList, list) : list
+				this.recentList = merged
+				const pageCourseCount = this.countRecentCourses(list)
+				const total = Number(res.data && res.data.total)
+				if (Number.isFinite(total) && total >= 0) {
+					const loaded = this.countRecentCourses(this.recentList)
+					this.recentHasMore = loaded < total
+				} else {
+					this.recentHasMore = pageCourseCount >= this.recentPageSize
+				}
+				if (pageCourseCount > 0) {
+					this.recentPageNum = currentPageNum + 1
+				} else {
+					this.recentHasMore = false
+				}
 			} catch (e) {
-				this.recentList = []
+				if (!loadMore) {
+					this.recentList = []
+				}
+				this.recentHasMore = false
+			} finally {
+				this.recentLoading = false
 			}
 		},
+		onRecentScrollToLower() {
+			if (this.tabIndex !== 1) return
+			if (!this.recentList.length) return
+			this.getCourseStudyList({ loadMore: true })
+		},
 		onSelectCategory(idx) {
 			this.categoryIndex = idx
 			const selected = this.categoryRows[idx]
 			const subCateId = selected && selected.cateId ? selected.cateId : null
-			this.getCourseList(subCateId)
+			this.getCourseList({ subCateId })
 		},
 		onCourseClick(course) {
 			if (course && course.courseId) {
@@ -634,4 +768,11 @@ export default {
 .bottom-placeholder {
 	height: 120rpx;
 }
+
+.load-tip {
+	padding: 24rpx 0 8rpx;
+	text-align: center;
+	font-size: 28rpx;
+	color: #999;
+}
 </style>

+ 41 - 11
pages_index/courseDetail.vue

@@ -91,7 +91,7 @@
 			<view class="bottom-space"></view>
 		</scroll-view>
 		
-		<view class="answer-entry" @click="openAnswerPopup">
+		<view v-if="showAnswerEntry" class="answer-entry" @click="openAnswerPopup">
 			<image class="gift-icon" src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/class/box.png"></image>
 			<view class="answer-tip y-bc" :class="{ done: hasAward }">
 				<template v-if="answerShowCountdownLines">
@@ -105,7 +105,7 @@
 					</view>
 				</template>
 				<text v-else class="answer-tip-single">{{ answerEntryTip }}</text>
-				<view class="answer-btn" v-if="answerStatus==1 || answerStatus==2">答题</view>
+				<view class="answer-btn" v-if="answerStatus!==3&&answerStatus!==4">答题</view>
 			</view>
 		</view>
 
@@ -140,6 +140,7 @@
 					</view>
 				</view>
 				<view class="answer-divider"></view>
+				<scroll-view class="popup-scroll" scroll-y>
 				<view v-for="(ques, idx) in answerQuestion" :key="idx">
 				<view class="question-title">{{ ques.title }}</view>
 				<view
@@ -153,6 +154,7 @@
 				</view>
 				
 			</view>
+			</scroll-view>
 			<view
 				class="submit-btn"
 				:class="{ active: isAnswerReady, disabled: !isAnswerReady }"
@@ -272,6 +274,26 @@ export default {
 			const item = (this.catalogList || []).find((v) => v.videoId === this.activeIndex);
 			return (item && item.imgUrl) || this.courseInfo.imgUrl;
 		},
+		/** 无有效视频地址,或当前小节无 watchDurationMinutes / 为 null / 非法 / 明确为 0 时,不展示答题浮层 */
+		showAnswerEntry() {
+			const url = (this.videoUrl && String(this.videoUrl).trim()) || "";
+			if (!url) {
+				return false;
+			}
+			const currentLesson =
+				(this.catalogList || []).find((v) => v.videoId === this.activeIndex) ||
+				(this.catalogList || [])[0] ||
+				{};
+			const raw = currentLesson.watchDurationMinutes;
+			if (raw === undefined || raw === null) {
+				return false;
+			}
+			const minutes = Number(raw);
+			if (!Number.isFinite(minutes) || minutes === 0) {
+				return false;
+			}
+			return true;
+		},
 		canAnswer() {
 			return this.answerCountdown <= 0;
 		},
@@ -303,7 +325,7 @@ export default {
 				return "已完成本节答题";
 			}
 			if (this.answerStatus === 3) {
-				return "答题次数已用完";
+				return "未答对\n明天再来";
 			}
 			return "答题得奖励";
 		},
@@ -489,6 +511,7 @@ export default {
 	},
 	onHide() {
 		this.flushStudyProgress();
+		this.clearTrafficInterval();
 	},
 	onShow() {
 		this.trafficUuId = generateRandomString(16)
@@ -1107,6 +1130,14 @@ export default {
 			}
 			this.saveStudyProgress(this.playTime);
 			this.getInternetTraffic();
+			// 当前小节播放结束后自动切换下一讲(已在上方保存进度,避免 selectCourse 内再次 flush 重复上报)
+			const list = this.catalogList || [];
+			const idx = list.findIndex((v) => v.videoId == this.activeIndex);
+			if (idx >= 0 && idx < list.length - 1) {
+				this.$nextTick(() => {
+					this.selectCourse(list[idx + 1], { skipFlush: true });
+				});
+			}
 		},
 		fullscreenchange(e) {
 			const d = (e && e.detail) || {};
@@ -1117,15 +1148,12 @@ export default {
 			const raw = currentLesson.watchDurationMinutes;
 			const minutes = Number(raw);
 			// 未配置或非法值:沿用默认 90 秒;明确为 0 表示不要求观看时长,不展示倒计时
-			if (raw === null || raw === undefined || !Number.isFinite(minutes)) {
-				return 90;
+			if (!raw||raw === null || raw === undefined || !Number.isFinite(minutes)) {
+				return 0;
 			}
 			if (minutes === 0) {
 				return 0;
 			}
-			if (minutes < 0) {
-				return 90;
-			}
 			return Math.floor(minutes * 60);
 		},
 		resetAnswerCountdownByCurrentLesson() {
@@ -1333,12 +1361,14 @@ export default {
 				}
 			});
 		},
-		selectCourse(item) {
+		selectCourse(item, opts) {
 			if (item.videoId == this.activeIndex) {
 				this.showCatalog = false;
 				return;
 			}
-			this.flushStudyProgress();
+			if (!opts || !opts.skipFlush) {
+				this.flushStudyProgress();
+			}
 			this.activeIndex = item.videoId;
 			this.videoInfo = item;
 			this.resetAnswerCountdownByCurrentLesson();
@@ -1826,7 +1856,7 @@ export default {
 	font-family: PingFangSC, PingFang SC;
 	font-weight: 400;
 	font-size: 32rpx;
-	color: rgba(0,0,0,0.25);
+	//color: rgba(0,0,0,0.25);
 	display: flex;
 	align-items: center;
 }

+ 77 - 18
pages_index/courseSearch.vue

@@ -32,7 +32,13 @@
 				</view> -->
 		</view>
 		<!-- 最近学习 内容 -->
-		<scroll-view scroll-y class="scroll-wrap" :show-scrollbar="false">
+		<scroll-view
+			scroll-y
+			class="scroll-wrap"
+			:show-scrollbar="false"
+			lower-threshold="120"
+			@scrolltolower="onCourseScrollToLower"
+		>
 			<!-- 有学习记录:按日期分组列表 -->
 			<template v-if="isSearch">
 				<view class="course-grid">
@@ -58,6 +64,10 @@
 						
 					</view>
 				</view>
+				<view v-if="courseList.length > 0" class="load-tip">
+					<text v-if="courseLoading">加载中...</text>
+					<text v-else-if="!courseHasMore">没有更多了</text>
+				</view>
 			</template>
          
 			<!-- 无学习记录:空态 + 为您精选 -->
@@ -118,6 +128,11 @@ export default {
 			categoryIndex: 0,
 			categories: ['全部', '歌唱艺术', '太极养生', '防骗指南', '手机摄影', '棋牌益智', '用药指导', '膳食营养', '慢病管理'],
 			courseList: [],
+			coursePageNum: 1,
+			coursePageSize: 10,
+			courseLoading: false,
+			courseHasMore: true,
+			courseSearchKeyword: '',
 			recentList: [
 				// {
 				// 	date: '2026-02-08',
@@ -147,7 +162,7 @@ export default {
 	},
 	onLoad(options) {
 		// this.keyword = (options && options.keyword) || ''
-		this.getCourseList()
+		this.getCourseList({})
 		this.getNewCourseList()
 	},
 	methods: {
@@ -181,24 +196,61 @@ export default {
 		            this.showClearIcon = false;
 					this.isSearch=false;
 		        },
-		async getCourseList(keyword) {
-			try {
-				const params = { pageNum: 1, pageSize: 10 }
-				if (keyword) {
-					params.keyword = keyword
+		async getCourseList(options = {}) {
+			const loadMore = !!options.loadMore
+			if (this.courseLoading) return
+			if (loadMore && !this.courseHasMore) return
+			if (!loadMore) {
+				this.coursePageNum = 1
+				this.courseHasMore = true
+				if (options.keyword !== undefined) {
+					this.courseSearchKeyword = (options.keyword || '').trim()
 				}
+			}
+			const currentPageNum = this.coursePageNum
+			const params = {
+				yxxTag:3,
+				pageNum: currentPageNum,
+				pageSize: this.coursePageSize
+			}
+			if (this.courseSearchKeyword) {
+				params.keyword = this.courseSearchKeyword
+			}
+			this.courseLoading = true
+			try {
 				const res = await listPublicCourse(params)
 				const list = (res && res.data && res.data.list) || []
-				this.courseList = list.map(item => ({
+				const mapped = list.map(item => ({
 					courseId: item.courseId,
 					title: item.courseTitle || item.courseName || '',
 					views: item.watchUserCount || 0,
 					cover: item.imgUrl || ''
 				}))
+				this.courseList = loadMore ? this.courseList.concat(mapped) : mapped
+				const total = Number(res.data && res.data.total)
+				if (Number.isFinite(total) && total >= 0) {
+					this.courseHasMore = this.courseList.length < total
+				} else {
+					this.courseHasMore = mapped.length >= this.coursePageSize
+				}
+				if (mapped.length > 0) {
+					this.coursePageNum = currentPageNum + 1
+				} else {
+					this.courseHasMore = false
+				}
 			} catch (e) {
-				this.courseList = []
+				if (!loadMore) {
+					this.courseList = []
+				}
+				this.courseHasMore = false
+			} finally {
+				this.courseLoading = false
 			}
 		},
+		onCourseScrollToLower() {
+			if (!this.isSearch) return
+			this.getCourseList({ loadMore: true })
+		},
 		async getNewCourseList() {
 			try {
 				const params = { pageNum: 1, pageSize: 6 }
@@ -215,15 +267,15 @@ export default {
 			}
 		},
 		goSearch() {
-			 this.isSearch=!this.isSearch
-			 if (!this.keyword.trim()) {
-			        uni.showToast({
-			          icon: 'none',
-			          title: '请输入搜索内容'
-			        });
-			        return;
-			      }
-			this.getCourseList(this.keyword)
+			if (!this.keyword.trim()) {
+				uni.showToast({
+					icon: 'none',
+					title: '请输入搜索内容'
+				})
+				return
+			}
+			this.isSearch = true
+			this.getCourseList({ keyword: this.keyword })
 		},
 		onCourseClick(course) {
 			if (course && course.courseId) {
@@ -634,4 +686,11 @@ export default {
 .bottom-placeholder {
 	height: 120rpx;
 }
+
+.load-tip {
+	padding: 24rpx 0 8rpx;
+	text-align: center;
+	font-size: 28rpx;
+	color: #999;
+}
 </style>

+ 169 - 38
pages_index/video.vue

@@ -32,7 +32,7 @@
 						<text>{{ cat.cateName }}</text>
 					</view>
 				</view>
-				<view class="expand-btn" @click="categoryExpand = !categoryExpand">
+				<view v-if="categories.length>9" class="expand-btn" @click="categoryExpand = !categoryExpand">
 					<text>{{ categoryExpand ? '收起' : '展开' }}</text>
 					<image :class="{ 'rotate-arrow': !categoryExpand }"   src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/class/expand.png"></image>
 					<!-- <text class="arrow">{{ categoryExpand ? '▲' : '▼' }}</text> -->
@@ -41,7 +41,14 @@
 		</view>
 
 		<!-- 精品课程 内容 -->
-		<scroll-view v-show="tabIndex === 0" scroll-y class="scroll-wrap" :show-scrollbar="false">
+		<scroll-view
+			v-show="tabIndex === 0"
+			scroll-y
+			class="scroll-wrap"
+			:show-scrollbar="false"
+			lower-threshold="120"
+			@scrolltolower="onCourseScrollToLower"
+		>
 			<!-- 分类标签区 -->
 			
 
@@ -69,11 +76,22 @@
 					
 				</view>
 			</view>
+			<view v-if="courseList.length > 0" class="load-tip">
+				<text v-if="courseLoading">加载中...</text>
+				<text v-else-if="!courseHasMore">没有更多了</text>
+			</view>
 			<view class="bottom-placeholder"></view>
 		</scroll-view>
 
 		<!-- 最近学习 内容 -->
-		<scroll-view v-show="tabIndex === 1" scroll-y class="scroll-wrap" :show-scrollbar="false">
+		<scroll-view
+			v-show="tabIndex === 1"
+			scroll-y
+			class="scroll-wrap"
+			:show-scrollbar="false"
+			lower-threshold="120"
+			@scrolltolower="onRecentScrollToLower"
+		>
 			<!-- 有学习记录:按日期分组列表 -->
 			<template v-if="recentList.length > 0">
 				<view v-for="(group, gIdx) in recentList" :key="gIdx" class="recent-group">
@@ -101,6 +119,10 @@
 						</view>
 					</view>
 				</view>
+				<view class="load-tip">
+					<text v-if="recentLoading">加载中...</text>
+					<text v-else-if="!recentHasMore">没有更多了</text>
+				</view>
 			</template>
 
 			<!-- 无学习记录:空态 + 为您精选 -->
@@ -156,6 +178,15 @@ export default {
 			categories: [],
 			activeCateId: null,
 			courseList: [],
+			coursePageNum: 1,
+			coursePageSize: 10,
+			courseLoading: false,
+			courseHasMore: true,
+			courseQuerySubCateId: null,
+			recentPageNum: 1,
+			recentPageSize: 10,
+			recentLoading: false,
+			recentHasMore: true,
 			recentList: [
 				// {
 				// 	date: '2026-02-08',
@@ -180,32 +211,35 @@ export default {
 		}
 	},
 	onLoad() {
-		this.initPublicVideoData();
-		this.getCourseStudyList();
+		this.initPublicVideoData()
 		this.getNewCourseList()
 	},
 	methods: {
 		onSelectCategory(cat, idx) {
-			this.categoryIndex = idx;
-			this.activeCateId = cat.cateId;
-			this.getPublicVideoList(this.activeCateId);
+			this.categoryIndex = idx
+			this.activeCateId = cat.cateId
+			const subCateId = cat.cateId === 0 || cat.cateId == null ? null : cat.cateId
+			this.getPublicVideoList({ subCateId })
 		},
 		async initPublicVideoData() {
 			try {
-				const res = await listPublicCourseCategory({ yxxTag: 1, pageNum: 1, pageSize: 10 });
+				const res = await listPublicCourseCategory({ yxxTag: 1, pageNum: 1, pageSize: 50 });
 				const list = (res && res.data && res.data.list) || [];
 				this.categories = [{ cateId: 0, cateName: '全部' }].concat(list);
 				if (this.categories.length > 0) {
-					this.categoryIndex = 0;
-					this.activeCateId = this.categories[0].cateId;
-					await this.getPublicVideoList(this.activeCateId);
+					this.categoryIndex = 0
+					this.activeCateId = this.categories[0].cateId
+					this.courseQuerySubCateId =
+						this.activeCateId === 0 || this.activeCateId == null ? null : this.activeCateId
+					await this.getPublicVideoList({})
 				} else {
-					this.courseList = [];
+					this.courseList = []
 				}
 			} catch (e) {
-				this.categories = [];
-				this.courseList = [];
+				this.categories = []
+				this.courseList = []
 			}
+			await this.getCourseStudyList({})
 		},
 		async getNewCourseList() {
 			try {
@@ -222,40 +256,130 @@ export default {
 				this.recommendList = []
 			}
 		},
-		async getCourseStudyList(subCateId) {
+		countRecentCourses(groups) {
+			if (!Array.isArray(groups)) return 0
+			return groups.reduce((n, g) => n + (g && g.courses ? g.courses.length : 0), 0)
+		},
+		mergeRecentGroups(existing, incoming) {
+			if (!Array.isArray(incoming) || incoming.length === 0) {
+				return Array.isArray(existing) ? existing.slice() : []
+			}
+			if (!Array.isArray(existing) || existing.length === 0) {
+				return incoming.map(g => ({
+					date: g.date,
+					courses: [...(g.courses || [])]
+				}))
+			}
+			const result = existing.map(g => ({
+				date: g.date,
+				courses: [...(g.courses || [])]
+			}))
+			for (const ng of incoming) {
+				const last = result[result.length - 1]
+				if (last && last.date === ng.date) {
+					last.courses = last.courses.concat(ng.courses || [])
+				} else {
+					result.push({ date: ng.date, courses: [...(ng.courses || [])] })
+				}
+			}
+			return result
+		},
+		async getCourseStudyList(options = {}) {
+			const loadMore = !!options.loadMore
+			if (this.recentLoading) return
+			if (loadMore && !this.recentHasMore) return
+			if (!loadMore) {
+				this.recentPageNum = 1
+				this.recentHasMore = true
+			}
+			const currentPageNum = this.recentPageNum
+			const params = {
+				courseType: 1,
+				pageNum: currentPageNum,
+				pageSize: this.recentPageSize
+			}
+			this.recentLoading = true
 			try {
-				const param={
-					pageNum: 1,
-					pageSize: 10,
-					courseType:1,
+				const res = await getCourseStudyList(params)
+				const list = (res && res.data && res.data.list) || []
+				const merged = loadMore ? this.mergeRecentGroups(this.recentList, list) : list
+				this.recentList = merged
+				const pageCourseCount = this.countRecentCourses(list)
+				const total = Number(res.data && res.data.total)
+				if (Number.isFinite(total) && total >= 0) {
+					const loaded = this.countRecentCourses(this.recentList)
+					this.recentHasMore = loaded < total
+				} else {
+					this.recentHasMore = pageCourseCount >= this.recentPageSize
+				}
+				if (pageCourseCount > 0) {
+					this.recentPageNum = currentPageNum + 1
+				} else {
+					this.recentHasMore = false
 				}
-				// if(subCateId){
-				// 	param.subCateId=subCateId
-				// }
-				const res = await getCourseStudyList(param);
-				const list = (res && res.data && res.data.list) || [];
-				this.recentList = list
 			} catch (e) {
-				this.recentList = [];
+				if (!loadMore) {
+					this.recentList = []
+				}
+				this.recentHasMore = false
+			} finally {
+				this.recentLoading = false
 			}
 		},
-		async getPublicVideoList(subCateId) {
+		onRecentScrollToLower() {
+			if (this.tabIndex !== 1) return
+			if (!this.recentList.length) return
+			this.getCourseStudyList({ loadMore: true })
+		},
+		async getPublicVideoList(options = {}) {
+			const loadMore = !!options.loadMore
+			if (this.courseLoading) return
+			if (loadMore && !this.courseHasMore) return
+			if (!loadMore) {
+				this.coursePageNum = 1
+				this.courseHasMore = true
+				if (options.subCateId !== undefined) {
+					this.courseQuerySubCateId = options.subCateId
+				}
+			}
+			const currentPageNum = this.coursePageNum
+			const params = {
+				yxxTag: 1,
+				pageNum: currentPageNum,
+				pageSize: this.coursePageSize
+			}
+			if (this.courseQuerySubCateId) {
+				params.subCateId = this.courseQuerySubCateId
+			}
+			this.courseLoading = true
 			try {
-				const param={
-					yxxTag: 1,
-					pageNum: 1,
-					pageSize: 10
+				const res = await listPublicCourse(params)
+				const list = (res && res.data && res.data.list) || []
+				this.courseList = loadMore ? this.courseList.concat(list) : list
+				const total = Number(res.data && res.data.total)
+				if (Number.isFinite(total) && total >= 0) {
+					this.courseHasMore = this.courseList.length < total
+				} else {
+					this.courseHasMore = list.length >= this.coursePageSize
 				}
-				if(subCateId){
-					param.subCateId=subCateId
+				if (list.length > 0) {
+					this.coursePageNum = currentPageNum + 1
+				} else {
+					this.courseHasMore = false
 				}
-				const res = await listPublicCourse(param);
-				const list = (res && res.data && res.data.list) || [];
-				this.courseList = list
 			} catch (e) {
-				this.courseList = [];
+				if (!loadMore) {
+					this.courseList = []
+				}
+				this.courseHasMore = false
+			} finally {
+				this.courseLoading = false
 			}
 		},
+		onCourseScrollToLower() {
+			if (this.tabIndex !== 0) return
+			this.getPublicVideoList({ loadMore: true })
+		},
 		onCourseClick(course) {
 			if (course && course.courseId) {
 				uni.navigateTo({ url: '/pages_index/courseDetail?courseId=' + course.courseId + '&type=1' })
@@ -648,4 +772,11 @@ export default {
 .bottom-placeholder {
 	height: 120rpx;
 }
+
+.load-tip {
+	padding: 24rpx 0 8rpx;
+	text-align: center;
+	font-size: 28rpx;
+	color: #999;
+}
 </style>

+ 45 - 7
pages_user/user/addAddress.vue

@@ -1,12 +1,12 @@
 <template>
 	<view class="content">
 		<view class="inner">
-			<!-- <view class="address-box">
+			<view class="address-box">
 				<textarea class="textarea" v-model="content"  placeholder="请粘贴或输入文本,点击'识别'自动识别姓名、电话、地址,格式:深圳市龙岗区坂田街道长坑路西2巷2号202 黄大大 18888888888"   />
 				<view  class="btns" >
 					<view  class="btn parse" @click="parseAddress()">识别</view>
 				</view>
-			</view> -->
+			</view>
 			<view class="form-box">
 				
 				<view class="form-item">
@@ -84,8 +84,36 @@
 				  title:"新增收货地址"
 				})
 			}
+			uni.showShareMenu({
+				withShareTicket: true,
+				//小程序的原生菜单中显示分享按钮,才能够让发送给朋友与分享到朋友圈两个按钮可以点击
+				menus: ["shareAppMessage", "shareTimeline"] //不设置默认发送给朋友
+			})
 			this.getCitys()
 		},
+		//发送给朋友
+		onShareAppMessage(res) {
+			if (this.utils.isLogin()) {
+				var user = JSON.parse(uni.getStorageSync('userInfo'))
+				return {
+					title: '邀请你填写地址,下单更方便',
+					path: '/pages_user/user/addAddress?id='+this.id +'&type='+this.type,
+					imageUrl: 'https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/app/vip/share.png' //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
+				}
+			}
+		},
+		//分享到朋友圈
+		onShareTimeline(res) {
+			if (this.utils.isLogin()) {
+				var user = JSON.parse(uni.getStorageSync('userInfo'))
+				return {
+					title: '邀请你填写地址,下单更方便',
+					query: 'id='+this.id+'&type='+this.type, //页面参数
+					imageUrl: 'https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/app/vip/share.png' //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
+				}
+			}
+		
+		},
 		methods: {
 			parseAddress(){
 				if(this.content==null||this.content==""){
@@ -152,8 +180,13 @@
 							 setTimeout(function() {
 								 uni.$emit('refreshAddress');
 								 uni.navigateBack({
-									 delta: 1
-								 })
+								 	delta: 1,
+								 	fail: () => {
+								 		uni.redirectTo({
+								 			url: "/pages_user/user/address"
+								 		});
+								 	}
+								 });
 							 }, 500);
 						}else{
 							uni.showToast({
@@ -176,9 +209,14 @@
 							 });
 							 setTimeout(function() {
 								 uni.$emit('refreshAddress');
-								 uni.navigateBack({
-									 delta: 1
-								 })
+								uni.navigateBack({
+									delta: 1,
+									fail: () => {
+										uni.redirectTo({
+											url: "/pages_user/user/address"
+										});
+									}
+								});
 							 }, 500);
 						}else{
 							uni.showToast({

+ 32 - 4
pages_user/user/address.vue

@@ -42,11 +42,39 @@
 			}
 		},
 		onLoad() {
-			this.getAddressList()
-			uni.$on('refreshAddress', () => {
-				this.getAddressList()
+			// uni.$on('refreshAddress', () => {
+			// 	this.getAddressList()
+			// })
+			uni.showShareMenu({
+				withShareTicket: true,
+				//小程序的原生菜单中显示分享按钮,才能够让发送给朋友与分享到朋友圈两个按钮可以点击
+				menus: ["shareAppMessage", "shareTimeline"] //不设置默认发送给朋友
 			})
-		 
+		},
+		onShow() {
+			this.getAddressList()
+		},
+		//发送给朋友
+		onShareAppMessage(res) {
+			if (this.utils.isLogin()) {
+				var user = JSON.parse(uni.getStorageSync('userInfo'))
+				return {
+					title: '邀请你填写地址,下单更方便',
+					path: '/pages_user/user/address',
+					imageUrl: 'https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/app/vip/share.png' //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
+				}
+			}
+		},
+		//分享到朋友圈
+		onShareTimeline(res) {
+			if (this.utils.isLogin()) {
+				var user = JSON.parse(uni.getStorageSync('userInfo'))
+				return {
+					title: '邀请你填写地址,下单更方便',
+					imageUrl: 'https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/app/vip/share.png' //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
+				}
+			}
+		
 		},
 		methods: {
 			selectAddress(item){

BIN
static/images/cart_sel.png


BIN
static/images/points_title2.png


BIN
static/tabbar/yxy.png


BIN
static/tabbar/yxy_sel.png


Неке датотеке нису приказане због велике количине промена