liujiaxin 1 month ago
parent
commit
9abfd91428
100 changed files with 19207 additions and 721 deletions
  1. 11 1
      App.vue
  2. 3 3
      api/common.js
  3. 106 0
      api/course.js
  4. 77 0
      api/courseLook.js
  5. 149 0
      api/living.js
  6. 204 0
      api/order.js
  7. 149 0
      api/pay.js
  8. 23 0
      api/pay_new.js
  9. 4 0
      api/storeOrder.js
  10. 11 1
      api/user.js
  11. 137 0
      assets/css/common.scss
  12. 231 0
      assets/css/commonTheme.css
  13. 37 5
      common/request.js
  14. 1 1
      components/likeProduct.vue
  15. 1 1
      components/tuiProduct.vue
  16. 14 12
      main.js
  17. 3 3
      manifest.json
  18. 44 37
      package-lock.json
  19. 7 2
      package.json
  20. 319 501
      pages.json
  21. 10 7
      pages/auth/login.vue
  22. 2 5
      pages/common/launch.vue
  23. 0 1
      pages/home/companyInfo.vue
  24. 1 1
      pages/home/components/HotProduct.vue
  25. 1 1
      pages/home/components/NewProduct.vue
  26. 34 17
      pages/home/h5.vue
  27. 12 24
      pages/home/index.vue
  28. 1 1
      pages/home/productList.vue
  29. 6 4
      pages/shopping/cart.vue
  30. 1 1
      pages/shopping/index.vue
  31. 44 16
      pages/user/index.vue
  32. 12 2
      pages_company/index.vue
  33. 4 4
      pages_company/order/confirmCompanyOrder.vue
  34. 1 1
      pages_company/order/confirmOrder.vue
  35. 3 3
      pages_company/order/productDetails.vue
  36. 263 0
      pages_company/shareLive.vue
  37. 13 12
      pages_company/storeOrderDetail.vue
  38. 3 3
      pages_company/storeProductPackageDetails.vue
  39. 106 0
      pages_course/components/ThreeItemSwiper.vue
  40. 705 0
      pages_course/components/commentBox.vue
  41. 158 0
      pages_course/components/descInfo.vue
  42. 202 0
      pages_course/components/descInfoNav.vue
  43. 255 0
      pages_course/components/like.vue
  44. 135 0
      pages_course/components/ques.vue
  45. 160 0
      pages_course/courseCover.vue
  46. 472 0
      pages_course/feedback.vue
  47. 2741 0
      pages_course/living.vue
  48. 149 0
      pages_course/livingList.vue
  49. 161 0
      pages_course/reward.vue
  50. 2126 0
      pages_course/video.vue
  51. 2478 0
      pages_course/videovip.vue
  52. 208 0
      pages_course/webview.vue
  53. 745 0
      pages_shopping/live/confirmCreateOrder.vue
  54. 1645 0
      pages_shopping/live/goods.vue
  55. 389 0
      pages_shopping/live/order.vue
  56. 614 0
      pages_shopping/live/paymentOrder.vue
  57. 548 0
      pages_shopping/live/refundOrder.vue
  58. 260 0
      pages_shopping/live/refundOrderProduct.vue
  59. 306 0
      pages_shopping/live/storeOrderDelivery.vue
  60. 851 0
      pages_shopping/live/storeOrderDetail.vue
  61. 146 0
      pages_shopping/live/storeOrderRefundAddDelivery.vue
  62. 592 0
      pages_shopping/live/storeOrderRefundDetails.vue
  63. 357 0
      pages_shopping/live/storeOrderRefundList.vue
  64. 456 0
      pages_shopping/live/storeOrderRefundSubmit.vue
  65. 223 0
      pages_shopping/live/success.vue
  66. 2 2
      pages_shopping/shopping/activityDetails.vue
  67. 2 2
      pages_shopping/shopping/confirmCreateOrder.vue
  68. 3 3
      pages_shopping/shopping/confirmOrder.vue
  69. 3 3
      pages_shopping/shopping/confirmPackageOrder.vue
  70. 1 1
      pages_shopping/shopping/coupon.vue
  71. 1 1
      pages_shopping/shopping/payOrder.vue
  72. 15 3
      pages_shopping/shopping/paymentOrder.vue
  73. 2 2
      pages_shopping/shopping/prescribe.vue
  74. 8 8
      pages_shopping/shopping/productDetails.vue
  75. 1 1
      pages_shopping/shopping/productList.vue
  76. 1 1
      pages_shopping/shopping/productSalesList.vue
  77. 1 1
      pages_shopping/shopping/success.vue
  78. 1 1
      pages_user/user/address.vue
  79. 1 1
      pages_user/user/doctorOrder.vue
  80. 1 1
      pages_user/user/otherPaySuccess.vue
  81. 21 7
      pages_user/user/otherPaymentOrder.vue
  82. 1 1
      pages_user/user/patient.vue
  83. 1 1
      pages_user/user/pay.vue
  84. 2 2
      pages_user/user/paymentOrderRemain.vue
  85. 1 1
      pages_user/user/storeOrder.vue
  86. 2 2
      pages_user/user/storeOrderDetail.vue
  87. 2 2
      pages_user/user/storeProductRelation.vue
  88. 1 1
      pages_user/user/success.vue
  89. 2 2
      pages_user/user/userTuiAdd.vue
  90. 1 1
      pages_user/user/userTuiProduct.vue
  91. BIN
      static/images/account.png
  92. BIN
      static/images/audio-msg.png
  93. BIN
      static/images/banner1.png
  94. BIN
      static/images/banner2.png
  95. BIN
      static/images/banner_coupon.jpg
  96. BIN
      static/images/bg_1.png
  97. BIN
      static/images/bg_coupon_3x.png
  98. BIN
      static/images/close32.png
  99. BIN
      static/images/collect.png
  100. BIN
      static/images/collect_select.png

+ 11 - 1
App.vue

@@ -3,6 +3,10 @@
 	// import TIM from 'tim-wx-sdk';
 	// import COS from 'cos-wx-sdk-v5';
 	export default {
+		globalData: {
+			wsUrl: 'wss://websocket.cdwjyyh.com',
+			appId: 'wx503cf8ab31f83dd4'
+		},
 		onLaunch: function() {
 			// uni.$TUIKit = TIM.create({
 			// 	SDKAppID: 1400693126
@@ -109,6 +113,12 @@
 	}
 </script>
  
+<style lang="scss">
+	/* 注意要写在第一行,同时给style标签加入lang="scss"属性 */
+	@import "@/uni_modules/uview-ui/index.scss";
+	@import '@/assets/css/commonTheme.css';
+	@import '@/assets/css/common.scss';
+</style>
 <style lang="less">
 /*每个页面公共css */
 	// @import 'animate.css';
@@ -127,7 +137,7 @@
 	/*每个页面公共css */
 	/* 解决小程序和app滚动条的问题 */
 	/* #ifdef MP-WEIXIN || APP-PLUS */
-		/deep/ ::-webkit-scrollbar {
+		::v-deep ::-webkit-scrollbar {
 		    display: none !important;
 		    width: 0 !important;
 		    height: 0 !important;

+ 3 - 3
api/common.js

@@ -22,6 +22,6 @@ let request = new Request().http
  export function getWeixinPrescribeTemps() {
  	 return request('/app/common/getWeixinPrescribeTemps',null,'GET');
  }
- 
- 
- 
+ export function getCourseDomain(data) {
+ 	 return request('/app/common/getDomain',data,'GET');
+ }

+ 106 - 0
api/course.js

@@ -0,0 +1,106 @@
+import Request from '../common/request.js';
+let request = new Request().http
+
+export function loginByMp(data) {
+ 	 return request('/app/wx/courseLogin',data,'POST','application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
+ }
+
+// 获取真实链接
+export function getRealLink(data) {
+	return request('/app/course/getRealLink', data, 'GET','','https://h5api.his.cdwjyyh.com');
+}
+
+// h5课程简介
+export function getH5CourseByVideoId(data) {
+	return request('/app/course/getH5CourseByVideoId', data, 'GET','','https://h5api.his.cdwjyyh.com');
+}
+
+// h5课程详情加问答
+export function getH5CourseVideoDetails(data) {
+	return request('/app/course/getH5CourseVideoDetails', data, 'GET','','https://h5api.his.cdwjyyh.com');
+}
+
+// 答题发红包
+export function courseAnswer(data) {
+	return request('/app/course/courseAnswer', data, 'POST', 'application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
+}
+
+// // 记录看课时间(旧)
+// export function getFinishCourseVideo(data) {
+// 	return request('/app/course/getFinishCourseVideo', data, 'POST', 'application/json;charset=UTF-8');
+// }
+
+// 记录看课时间(新)
+export function getFinishCourseVideo(data) {
+	return request('/app/course/updateWatchDuration', data, 'POST', 'application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
+}
+
+// 关注客服
+export function getIsAddKf(data) {
+	return request('/app/course/isAddKf', data, 'POST', 'application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
+}
+
+// 流量(缓冲百分比)
+export function internetTraffic(data) {
+	return request('/app/course/getInternetTraffic', data, 'POST', 'application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
+}
+
+// 每十分钟获得积分
+export function getIntegralByH5Video(data) {
+	return request('/app/course/getIntegralByH5Video', data, 'POST', 'application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
+}
+
+// 发送奖励
+export function sendReward(data) {
+	return request('/app/course/sendReward', data, 'POST', 'application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
+}
+
+// 播放错误上报
+export function getErrMsg(data) {
+	return request('/app/course/getErrMsg', data, 'POST', 'application/x-www-form-urlencoded','https://h5api.his.cdwjyyh.com');
+}
+
+
+// 获取getWxConfig
+export function getWxConfig(data) {
+	return request('/app/wx/mp/getWxConfig', data, 'GET','','https://h5api.his.cdwjyyh.com');
+}
+
+ //获取弹幕列表
+ export function getDanmuList(videoId) {
+ 	 return request('/barrage/barrage/list/'+videoId,null,'GET','','https://h5api.his.cdwjyyh.com');
+ }
+ 
+ // 保存评论数据
+ export function saveMsg(data, type) {
+ 	return request('/app/course/saveMsg', data, 'POST', 'application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
+ }
+ 
+ // 撤销评论
+ export function revokeMsg(data, type) {
+ 	return request('/app/course/revokeMsg', data, 'PUT', 'application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
+ }
+ 
+ // 获取历史评论数据
+ export function getComments(data, type) {
+ 	return request('/app/course/getComments', data, 'GET','','https://h5api.his.cdwjyyh.com');
+ }
+ 
+ // 错误日志未知异常,请联系管理员
+ export function errorLogUpload(data, type) {
+ 	return request('/app/common/errorLogUpload', data, 'POST','','https://h5api.his.cdwjyyh.com');
+ }
+ 
+ export function getTypeTree(data, type) {
+ 	return request('/app/user/complaint/getTypeTree', null, 'GET','','https://h5api.his.cdwjyyh.com');
+ }
+ export function complaintRecord(data, type) {
+ 	return request('/app/user/complaint/record', data, 'POST','application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
+ }
+ 
+ export function uploadOSS(data, type) {
+ 	return request('/app/common/uploadOSS', data, 'POST','application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
+ }
+ export function getConfigByKey(data) {
+ 	 return request('/app/common/getConfigByKey',data,'GET','','https://h5api.his.cdwjyyh.com');
+ }

+ 77 - 0
api/courseLook.js

@@ -0,0 +1,77 @@
+import Request from '../common/request.js';
+let request = new Request().http
+
+ //微信小程序登录
+ export function loginByMiniApp(data) {
+ 	 return request('/course_uniapp/app/wx/miniapp/loginByMa',data,'POST','application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
+ }
+// 播放错误上报
+export function getErrMsg(data) {
+	return request('/course_uniapp/app/course/wx/h5/getErrMsg', data, 'POST', 'application/x-www-form-urlencoded','https://h5api.his.cdwjyyh.com');
+}
+// h5课程简介
+export function getH5CourseByVideoId(data) {
+	return request('/course_uniapp/app/course/wx/h5/getH5CourseByVideoId', data, 'GET','','https://h5api.his.cdwjyyh.com');
+}
+// h5课程详情加问答
+export function getH5CourseVideoDetails(data) {
+	return request('/course_uniapp/app/course/wx/h5/videoDetails', data, 'GET','','https://h5api.his.cdwjyyh.com');
+}
+// 答题发红包
+export function courseAnswer(data) {
+	return request('/course_uniapp/app/course/wx/h5/courseAnswer', data, 'POST', 'application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
+}
+// 记录看课时间(新)
+export function getFinishCourseVideo(data) {
+	return request('/course_uniapp/app/course/wx/h5/updateWatchDuration', data, 'POST', 'application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
+}
+// 关注客服 是否添加客服
+export function getIsAddKf(data) {
+	return request('/course_uniapp/app/course/wx/h5/isAddKf', data, 'POST', 'application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
+}
+// 流量(缓冲百分比)
+export function getInternetTraffic(data) {
+	return request('/course_uniapp/app/course/wx/h5/getInternetTraffic', data, 'POST', 'application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
+}
+// 每十分钟获得积分
+export function getIntegralByH5Video(data) {
+	return request('/app/course/getIntegralByH5Video', data, 'POST', 'application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
+}
+
+// 发送奖励
+export function sendReward(data) {
+	return request('/course_uniapp/app/course/wx/h5/sendReward', data, 'POST', 'application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
+}
+// 获取真实链接
+export function getRealLink(data) {
+	return request('/app/course/getRealLink', data, 'GET','','https://h5api.his.cdwjyyh.com');
+}
+ //检查是否有头像以及昵称
+ export function checkUserInfo(data) {
+ 	 return request('/course_uniapp/app/user/checkUserInfo',data,'GET','application/json;charset=UTF-8');
+ }
+ //更改用户头像以及昵称
+ export function editUser(data) {
+ 	 return request('/course_uniapp/app/user/editUser',data,'POST','application/json;charset=UTF-8');
+ }
+ // 成为会员
+ export function registerCourses(data) {
+ 	 return request('/course_uniapp/companyapp/app/fs/user/beMember',data,'POST','application/json;charset=UTF-8');
+ }
+ //获取头像以及昵称信息
+ export function getusername(data) {
+ 	 return request('/companyapp/app/wx/h5/mp/userInfo',data,'POST','application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
+ }
+ //h5授权登录
+ export function H5logoinApp(data,type) {
+	 if(type&&type==1) {
+		return request('/app/wx/h5/mp/courseLoginByMp',data,'POST','application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com'); 
+	 } else {
+		return request('/app/wx/h5/mp/loginByMp',data,'POST','application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com'); 
+	 }
+ }
+ 
+ //h5授权登录
+ export function handleFsUserWx(data) {
+ 	 return request('/app/wx/h5/mp/handleFsUserWx',data,'POST','application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
+ }

+ 149 - 0
api/living.js

@@ -0,0 +1,149 @@
+import Request from '@/common/request.js';
+let request = new Request().http
+const api = {
+	liveDataLike: (liveId) => `/app/live/liveData/like/${liveId}`, // 点赞
+	collectStore: (sotreId) => `/app/live/liveData/collectStore?storeId=${sotreId}`, // 店铺收藏/取消收藏
+	collectGoods: (goodId) => `/app/live/liveData/collectGoods?goodId=${goodId}`, // 商品收藏/取消收藏
+	store: (storeld, key, liveId) => `/app/live/store/${storeld}?key=${key}&liveId=${liveId}`, // 小黄车查询店铺
+
+	queryStore: (storeld, pageSize, pageNum, keywords) =>
+		`/app/live/store?storeId=${storeld}&pageSize=${pageSize}&pageNum=${pageNum}&keywords=${keywords}`, // 查询店铺
+	follow: (liveId) => `/app/live/liveData/follow/${liveId}`, // 关注/取消关注
+	// getRecentLiveViewers: (liveId) => `/app/live/liveData/getRecentLiveViewers/${liveId}`, // 获取直播间用户(展示在线用户)
+	watchUserList: (liveId, pageSize, pageNum, reasonable) =>
+		`/app/live/liveWatchUser/watchUserList/?liveId=${liveId}&pageSize=${pageSize}&pageNum=${pageNum}&reasonable=${reasonable}`, // 获取直播间用户(展示在线用户)
+	liveMsg: (liveId, pageSize, pageNum) =>
+		`/app/live/liveMsg/list/?liveId=${liveId}&pageSize=${pageSize}&pageNum=${pageNum}`, //获取最近聊天记录
+
+	// checkSms: 'api/sms/checkSms',
+	getLiveInfo: (liveId) => `/app/live/${liveId}`, // 获取直播间信息接口
+	getLiveViewData: (liveId) => `/app/live/liveData/getLiveViewData/${liveId}`, // 直播间点赞、关注、在线人数数据
+	liveRed: '/app/live/liveRed/claim', // 点击领红包
+	// 直播订单
+	liveStore: (liveId, key) => `/app/live/liveGoods/liveStore/${liveId}?key=${key}`, // 店铺展示
+	liveGoodsDetail: (productId) => `/app/live/liveGoods/liveGoodsDetail/${productId}`, // 商品详情
+	liveOrderUser: (liveId) => `/app/live/liveOrder/liveOrderUser/${liveId}`, // 正在购买
+	showGoods: (liveId) => `/app/live/liveGoods/showGoods/${liveId}`, // 弹出商品卡片
+	currentActivities: (liveId) => `/app/live/currentActivities?liveId=${liveId}`, // 弹出商品卡片
+	claim: '/app/live/liveLottery/claim', // 抽奖
+	liveLottery: '/app/live/liveLottery/detail', // 抽奖查询
+	getlive: '/app/live/live',
+	liveList: '/app/live/liveList', //直播列表
+	liveShareList: (companyId, pageSize, pageNum) =>`/app/live/liveList/${companyId}?pageSize=${pageSize}&pageNum=${pageNum}` //直播列表
+
+}
+// 点赞
+export function liveDataLike(liveId, data = {}) {
+	return request(api.liveDataLike(liveId), data, 'GET', 'application/json;charset=UTF-8')
+}
+
+// 店铺收藏/取消收藏
+export function collectStore(sotreId, data = {}) {
+	return request(api.collectStore(sotreId), data, 'POST', 'application/json;charset=UTF-8')
+}
+
+// 商品收藏/取消收藏
+export function collectGoods(goodId, data = {}) {
+	return request(api.collectGoods(goodId), data, 'POST', 'application/json;charset=UTF-8')
+}
+// 小黄车查询店铺
+export function store(storeld, key, liveId, data = {}) {
+	return request(api.store(storeld, key, liveId), data, 'GET', 'application/json;charset=UTF-8')
+}
+// 查询店铺
+export function queryStore(storeld, pageSize, pageNum, keywords, data = {}) {
+	return request(api.queryStore(storeld, pageSize, pageNum, keywords), data, 'GET', 'application/json;charset=UTF-8',
+		false)
+}
+
+//弹出商品卡片
+export function showGoods(liveId, data = {}) {
+	return request(api.showGoods(liveId), data, 'GET', 'application/json;charset=UTF-8')
+}
+
+// 点击领红包
+export function liveRed(data) {
+	return request(api.liveRed, data, 'POST', 'application/json;charset=UTF-8')
+}
+
+// 关注/取消关注
+export function follow(liveId, data = {}) {
+	return request(api.follow(liveId), data, 'GET', 'application/json;charset=UTF-8')
+}
+
+
+// 观众
+// 获取直播间用户(展示在线用户)
+// export function getRecentLiveViewers(liveId, data = {}) {
+// 	return request(api.getRecentLiveViewers(liveId), data, 'GET', 'application/json;charset=UTF-8')
+// }
+// 获取直播间用户(展示在线用户)
+export function watchUserList(liveId, pageSize, pageNum, reasonable, data = {}) {
+	return request(api.watchUserList(liveId, pageSize, pageNum, reasonable), data, 'GET',
+		'application/json;charset=UTF-8')
+}
+// 获取最近聊天记录
+export function liveMsg(liveId, pageSize, pageNum, data = {}) {
+	return request(api.liveMsg(liveId, pageSize, pageNum), data, 'GET', 'application/json;charset=UTF-8')
+}
+
+
+// 小黄车
+// 店铺展示
+export function liveStore(liveId, key, data) {
+	return request(api.liveStore(liveId, key), data, 'GET', 'application/json;charset=UTF-8')
+}
+
+// 商品详情
+export function liveGoodsDetail(productId, data) {
+	return request(api.liveGoodsDetail(productId), data, 'GET', 'application/json;charset=UTF-8')
+}
+
+//正在购买
+export function liveOrderUser(liveId, data = {}) {
+	return request(api.liveOrderUser(liveId), data, 'GET', 'application/json;charset=UTF-8')
+}
+
+
+
+
+
+
+// 直播间
+export function getLiveInfo(liveId, data = {}) {
+	return request(api.getLiveInfo(liveId), data, 'GET', 'application/json;charset=UTF-8')
+}
+
+// 直播间点赞、关注、在线人数数据
+export function getLiveViewData(liveId, data = {}) {
+	return request(api.getLiveViewData(liveId), data, 'GET', 'application/json;charset=UTF-8')
+}
+
+
+// 红包 卡片 抽奖
+export function currentActivities(liveId, data = {}) {
+	return request(api.currentActivities(liveId), data, 'GET', 'application/json;charset=UTF-8')
+}
+
+//抽奖
+export function claim(data) {
+	return request(api.claim, data, 'POST', 'application/json;charset=UTF-8')
+}
+// 抽奖查询
+export function liveLottery(data) {
+	return request(api.liveLottery, data, 'POST', 'application/json;charset=UTF-8')
+}
+
+//直播间信息
+export function getlive(data) {
+	return request(api.getlive, data, 'GET', 'application/json;charset=UTF-8');
+}
+//直播列表
+export function liveList(data) {
+	return request(api.liveList, data, 'GET', 'application/json;charset=UTF-8');
+}
+
+//销售端分享直播列表
+export function liveShareList(companyId, pageSize, pageNum, data = {}) {
+	return request(api.liveShareList(companyId, pageSize, pageNum), data, 'GET', 'application/json;charset=UTF-8');
+}

+ 204 - 0
api/order.js

@@ -0,0 +1,204 @@
+import Request from '@/common/request.js';
+let request = new Request().http
+const api = {
+	// 直播订单
+	liveOrderList: '/app/live/liveOrder/list', // 订单列表
+	createliveOrder: '/app/live/liveOrder/create', // 创建订单
+	updateConfirm: (orderId, type) => `/app/live/liveOrder/updateConfirm/${orderId}/${type} `, // 取消/支付订单确认
+	updateLiveOrder: '/app/live/liveOrder/update', // 取消/支付订单
+	liveOrderKey: '/app/live/liveOrder/confirm', // 生成订单key
+	userAddr: '/app/address/getAddressByDefault ', // 获取用户收货地址
+	addAddress: '/app/address/addAddress', // 添加地址
+	editAddress: '/app/address/editAddress', // 编辑地址
+	delAddress: '/app/address/delAddress', // 删除地址
+	getCitys: '/app/common/getCitys', // 获取省市区
+	parseAddress: '/app/address/parseAddress', //地址解析 
+	getAddressById: '/app/address/getAddressById', //
+
+	queryLiveCartList: '/live/liveCart/list', //查询购物车列表
+	exportLiveCartList: '(/live/liveCart/export ', //导出购物车列表
+	liveCartDetails: (cardIds) => `/live/liveCart/${cardId} `, //获取购物车详情
+	addLiveCart: '/live/liveCart ', //新增购物车
+	modifyLiveCart: '/live/liveCart/update', //修改购物车
+	delLiveCart: '/live/liveCart/delete', //删除购物车
+	cartOrder: '/app/live/liveOrder/buy', //购物车订单
+	checked: '/live/liveCart/checked', //获取购物车选中商品
+	cancelOrder: '/app/live/liveOrder/cancelOrder', // 取消订单
+	finishOrder: '/app/live/liveOrder/finishOrder', // 确认收货
+
+	getStoreOrderItems: '/app/live/storeAfterSales/getStoreOrderItems', // 获取订单项列表
+	applyAfterSales: '/app/live/storeAfterSales/applyAfterSales', // 申请售后
+	revoke: '/app/live/storeAfterSales/revoke', // 撤销售后
+	getStoreAfterSalesList: (liveId, pageSize, pageNum, status) =>
+		`/app/live/storeAfterSales/getStoreAfterSalesList?liveId=${liveId}&pageSize=${pageSize}&pageNum=${pageNum}&status=${status}`, // 获取售后列表
+	getStoreAfterSalesById: (id) => `/app/live/storeAfterSales/getStoreAfterSalesById?id=${id}`, // 获取售后详情
+
+	liveOrder: (orderId) => `/app/live/liveOrder/info/${orderId}`, // 订单详情
+	getMyStoreOrderById: (orderId) => `/app/live/liveOrder/info/${orderId}`,
+	// finishOrder: '/app/live/liveOrder/finishOrder', 
+	// cancelOrder: '/app/live/liveOrder/cancelOrder',
+	
+
+}
+
+
+// 直播订单
+
+// 创建订单
+export function createliveOrder(data) {
+	return request(api.createliveOrder, data, 'POST', 'application/json;charset=UTF-8')
+}
+// 生成订单key
+export function liveOrderKey(data = {}) {
+	return request(api.liveOrderKey, data, 'POST', 'application/json;charset=UTF-8')
+}
+
+// 点击取消/支付订单
+export function updateConfirm(data) {
+	return request(api.updateConfirm(orderId, type), data, 'GET', 'application/json;charset=UTF-8')
+}
+
+// 取消/支付订单
+export function updateLiveOrder(data) {
+	return request(api.updateLiveOrder, data, 'POST', 'application/json;charset=UTF-8')
+}
+// 订单列表
+export function liveOrderList(data) {
+	return request(api.liveOrderList, data, 'GET', 'application/json;charset=UTF-8')
+}
+// 订单详情
+export function liveOrder(orderId, data = {}) {
+	return request(api.liveOrder(orderId), data, 'GET', 'application/json;charset=UTF-8')
+}
+
+// 获取用户收货地址
+export function userAddr(data = {}) {
+	return request(api.userAddr, data, 'GET', 'application/json;charset=UTF-8')
+}
+
+// 添加地址
+export function addAddress(data) {
+	return request(api.addAddress, data, 'POST', 'application/json;charset=UTF-8')
+}
+// 编辑地址
+export function editAddress(data) {
+	return request(api.editAddress, data, 'POST', 'application/json;charset=UTF-8')
+}
+// 删除地址
+export function delAddress(data) {
+	return request(api.delAddress, data, 'POST', 'application/json;charset=UTF-8')
+}
+
+//获取省市区 
+export function getCitys(data) {
+	return request(api.getCitys, data, 'GET', 'application/json;charset=UTF-8')
+}
+
+
+//地址解析 
+export function parseAddress(data) {
+	return request(api.parseAddress, data, 'POST', 'application/json;charset=UTF-8')
+}
+
+// 
+export function getAddressById(data) {
+	return request(api.getAddressById, data, 'GET', 'application/json;charset=UTF-8')
+}
+
+
+// 查询购物车列表
+export function queryLiveCartList(data) {
+	return request(api.queryLiveCartList, data, 'GET', 'application/json;charset=UTF-8')
+}
+// 导出购物车列表
+export function exportLiveCartList(data) {
+	return request(api.exportLiveCartList, data, 'GET', 'application/json;charset=UTF-8')
+}
+
+// 获取购物车详情
+export function liveCartDetails(cardIds, data = {}) {
+	return request(api.liveCartDetails(cardIds), data, 'GET', 'application/json;charset=UTF-8')
+}
+
+// 新增购物车
+export function addLiveCart(data) {
+	return request(api.addLiveCart, data, 'POST', 'application/json;charset=UTF-8')
+}
+
+// 修改购物车
+export function modifyLiveCart(data) {
+	return request(api.modifyLiveCart, data, 'POST', 'application/json;charset=UTF-8')
+}
+
+// 删除购物车
+export function delLiveCart(data) {
+	return request(api.delLiveCart, data, 'POST', 'application/json;charset=UTF-8')
+}
+
+//购物车订单
+export function cartOrder(data) {
+	return request(api.cartOrder, data, 'POST', 'application/json;charset=UTF-8')
+}
+
+//获取购物车选中商品
+export function checked(data) {
+	return request(api.checked, data, 'GET', 'application/json;charset=UTF-8')
+}
+
+// 取消订单
+export function cancelOrder(data) {
+	return request(api.cancelOrder, data, 'POST', 'application/json;charset=UTF-8')
+}
+
+// 确认收货
+export function finishOrder(data) {
+	return request(api.finishOrder, data, 'POST', 'application/json;charset=UTF-8')
+}
+
+
+// 售后
+// 获取订单项列表
+export function getStoreOrderItems(data) {
+	return request(api.getStoreOrderItems, data, 'GET', 'application/json;charset=UTF-8')
+}
+
+// 申请售后
+export function applyAfterSales(data) {
+	return request(api.applyAfterSales, data, 'POST', 'application/json;charset=UTF-8')
+}
+
+// 撤销售后
+export function revoke(data) {
+	return request(api.revoke, data, 'POST', 'application/json;charset=UTF-8')
+}
+
+//获取售后列表
+export function getStoreAfterSalesList(liveId, pageSize, pageNum, status, data = {}) {
+	return request(api.getStoreAfterSalesList(liveId, pageSize, pageNum, status), data, 'GET',
+		'application/json;charset=UTF-8')
+}
+
+// 获取售后详情
+export function getStoreAfterSalesById(id, data = {}) {
+	return request(api.getStoreAfterSalesById(id), data, 'GET', 'application/json;charset=UTF-8')
+}
+
+// 申请原因
+export function Dicts(data) {
+	return request('/app/common/getDictByKey', data, 'GET', 'application/json;charset=UTF-8');
+}
+
+
+
+
+
+
+export function getMyStoreOrderById(orderId, data = {}) {
+	return request(api.getMyStoreOrderById(orderId), data, 'GET');
+}
+// export function cancelOrder(data) {
+// 	return request(api.cancelOrder(), data, 'POST', 'application/json;charset=UTF-8');
+// }
+// export function finishOrder(data) {
+// 	return request(api.finishOrder(), data, 'POST', 'application/json;charset=UTF-8');
+// }

+ 149 - 0
api/pay.js

@@ -0,0 +1,149 @@
+import Request from '@/common/request.js';
+let request = new Request().http
+const api = {
+	// 支付
+	zfbPayment: '/app/live/liveOrder/aliPayment', // 支付宝付款
+	weChatPayment: '/app/live/liveOrder/weChatPayment', // 微信付款
+
+
+	// updateConfirm: (orderId, type) => `/app/live/liveOrder/updateConfirm/${orderId}/${type} `, // 取消/支付订单确认
+
+
+
+}
+
+
+// 支付
+
+// 支付宝付款
+export function zfbPayment(data) {
+	return request(api.zfbPayment, data, 'POST', 'application/json;charset=UTF-8')
+}
+// 微信付款
+// export function weChatPayment(data) {
+// 	return request(api.weChatPayment, data, 'POST', 'application/json;charset=UTF-8')
+// }
+/**
+ * 微信支付(全平台适配简化版)
+ * @param {String} orderId 订单ID
+ * @param {Number} amount 金额(单位:分)
+ * @returns {Promise}
+ */
+// export function weChatPayment(orderId, amount) {
+export function weChatPayment(data) {
+	return new Promise((resolve, reject) => {
+		let res = {
+"code": 200,
+"msg": "success",
+"payType": 1,
+"result": {"timeStamp":"1757906581","package":"prepay_id=wx151123017811185ff21654a23ca0660000","paySign":"XZOdWmeUE4vtrsTiBcgc830dI5cTxDMOld4nEodSImjtnxNP7g4ehBCYBT9lSXQviX2CAqYfYS3Nazt81jCz3U8rjcxvf0IP1rKzesYHozTwkTh9PfOMu5kwBIf48pF1pG8P4w02cBMvfmEvN8c9ISc1Lx528IqV/pC12cxGTNBktH8UFFU5hdEmbpu9sI+4VfDpgroHs5y8xx2DK072LulF8g9xQvP2Hif/PFuEphBRmdxAN7Cp+gX6kHYmIijPe10eI0dTG/L0nR/r3UPUt9vubUnLW0cnYnimQ0FW5A1ANXN4LdCO+R3jFONsu99qpw/7uqrpJ1vUVpEvLu8fTg==","appId":"wx503cf8ab31f83dd4","signType":"RSA","nonceStr":"RKjdY0O5yroLPnEjXmTMtAEFIq2AhD63"}
+}
+				invokePayment(res.data)
+					.then(resolve)
+					.catch(err => {
+						handlePaymentError(err);
+						reject(err);
+					});
+
+		// 1. 获取支付参数
+		// totalFee: amount, // platform: getPlatform() // 自动识别平台
+		// request(api.weChatPayment, data, 'POST', 'application/json;charset=UTF-8')
+		// 	.then(res => {
+		// 		// 2. 调用平台支付
+				// invokePayment(res.data)
+				// 	.then(resolve)
+				// 	.catch(err => {
+				// 		handlePaymentError(err);
+				// 		reject(err);
+				// 	});
+		// 	})
+		// 	.catch(err => {
+		// 		handlePaymentError(err);
+		// 		reject(err);
+		// 	});
+	});
+}
+
+// ==================== 内部方法 ====================
+function getPlatform() {
+	// #ifdef MP-WEIXIN
+	return 'miniprogram';
+	// #endif
+	// #ifdef APP-PLUS
+	return 'app';
+	// #endif
+	// #ifdef H5
+	return 'h5';
+	// #endif
+}
+
+function invokePayment(payData) {
+	return new Promise((resolve, reject) => {
+		// #ifdef MP-WEIXIN
+		uni.requestPayment({
+			provider: 'wxpay',
+			...payData, // 直接展开小程序所需参数
+			success: (res) => {
+				uni.showToast({
+					title: '支付成功'
+				});
+				resolve(res);
+			},
+			fail: (err) => {
+				reject(new Error(formatError(err)));
+			}
+		});
+		// #endif
+
+		// #ifdef APP-PLUS
+		uni.requestPayment({
+			provider: 'wxpay',
+			orderInfo: payData.orderInfo,
+			success: resolve,
+			fail: (err) => {
+				reject(new Error(formatError(err)));
+			}
+		});
+		// #endif
+
+		// #ifdef H5
+		if (typeof WeixinJSBridge === 'undefined') {
+			return reject(new Error('请在微信浏览器中打开'));
+		}
+
+		WeixinJSBridge.invoke(
+			'getBrandWCPayRequest',
+			payData,
+			(res) => {
+				if (res.err_msg === 'get_brand_wcpay_request:ok') {
+					resolve(res);
+				} else {
+					reject(new Error(res.err_msg || '支付失败'));
+				}
+			}
+		);
+		// #endif
+	});
+}
+
+function formatError(err) {
+	if (err.errMsg) {
+		if (err.errMsg.includes('cancel')) return '支付已取消';
+		if (err.errMsg.includes('fail')) return '支付失败';
+	}
+	return err.message || '支付异常';
+}
+
+function handlePaymentError(err) {
+	console.error('[支付错误]', err);
+	uni.showToast({
+		title: err.message,
+		icon: 'none',
+		duration: 3000
+	});
+}
+
+// 微信
+// export function userAddr(userId, data={}) {
+// 	return request(api.userAddr(userId), data, 'GET', 'application/json;charset=UTF-8')
+// }

+ 23 - 0
api/pay_new.js

@@ -0,0 +1,23 @@
+import Request from '@/common/request.js';
+let request = new Request().http
+const api = {
+	// 支付
+	zfbPayment: '/app/live/liveOrder/aliPayment', // 支付宝付款
+	weChatPayment: '/app/live/liveOrder/weChatPayment', // 微信付款
+
+
+	// updateConfirm: (orderId, type) => `/app/live/liveOrder/updateConfirm/${orderId}/${type} `, // 取消/支付订单确认
+
+
+
+}
+
+
+//微信支付
+ export function weChatPayment(data) {
+ 	 return request(api.weChatPayment,data,'POST','application/json;charset=UTF-8');
+ }
+// 支付宝付款
+export function zfbPayment(data) {
+	return request(api.zfbPayment, data, 'POST', 'application/json;charset=UTF-8')
+}

+ 4 - 0
api/storeOrder.js

@@ -77,6 +77,10 @@ let request = new Request().http
  export function getExpresslist(data) {
  	 return request('/app/storeOrder/getExpressMulti',data,'POST','application/json;charset=UTF-8');
  }
+ //用户取消支付
+ export function userCancelPay(data) {
+ 	 return request('/app/storeOrder/cancelPay',data,'POST','application/json;charset=UTF-8');
+ } 
  
  
  

+ 11 - 1
api/user.js

@@ -60,7 +60,17 @@ let request = new Request().http
  export function getUserShareList(data) {
  	 return request('/app/user/getUserShareList',data,'GET');
  }
- 
+ //隐私保护
+ export function getyingsi(data) {
+ 	 return request('/h5/privacyPolicyNew',data,'GET');
+ }
+ //用户协议
+ export function getxieyi(data) {
+ 	 return request('/h5/userAgreementNew',data,'GET');
+ }
+ export function getConfigByKey(data) {
+ 	 return request('/app/common/getConfigByKey',data,'GET');
+ } 
  
  
  

+ 137 - 0
assets/css/common.scss

@@ -0,0 +1,137 @@
+// 字体
+@for $i from 20 through 100{
+    .fs#{$i} {
+			font-size: #{$i}rpx;
+    }
+}
+// 颜色
+@for $i from 0 through 9{
+    .color#{$i} {
+			color: #{$i}#{$i}#{$i};
+    }
+}
+// padding
+@for $i from 1 through 100{
+    .p#{$i} {
+			padding: #{$i}rpx;
+    }
+}
+@for $i from 1 through 100{
+    .ptb#{$i} {
+			padding-top: #{$i}rpx ;
+			padding-bottom: #{$i}rpx ;
+    }
+}
+@for $i from 1 through 100{
+    .plr#{$i} {
+			padding-left: #{$i}rpx;
+			padding-right: #{$i}rpx;
+    }
+}
+@for $i from 1 through 200{
+    .pt#{$i} {
+			padding-top: #{$i}rpx;
+    }
+}
+@for $i from 1 through 100{
+    .pl#{$i} {
+			padding-left: #{$i}rpx;
+    }
+}
+@for $i from 1 through 100{
+    .pr#{$i} {
+			padding-right: #{$i}rpx;
+    }
+}
+@for $i from 1 through 200{
+    .pb#{$i} {
+			padding-bottom: #{$i}rpx;
+    }
+}
+// margin
+@for $i from 1 through 100{
+    .m#{$i} {
+			margin: #{$i}rpx;
+    }
+}
+@for $i from 1 through 100{
+    .mtb#{$i} {
+			margin-top: #{$i}rpx ;
+			margin-bottom: #{$i}rpx ;
+    }
+}
+@for $i from 1 through 100{
+    .mlr#{$i} {
+			margin-left: #{$i}rpx;
+			margin-right: #{$i}rpx;
+    }
+}
+@for $i from 1 through 100{
+    .mt#{$i} {
+			margin-top: #{$i}rpx;
+    }
+}
+@for $i from 1 through 100{
+    .ml#{$i} {
+			margin-left: #{$i}rpx;
+    }
+}
+@for $i from 1 through 100{
+    .mr#{$i} {
+			margin-right: #{$i}rpx;
+    }
+}
+@for $i from 1 through 100{
+    .mb#{$i} {
+			margin-bottom: #{$i}rpx;
+    }
+}
+// 圆角
+@for $i from 0 through 100{
+    .radius#{$i} {
+			border-radius: #{$i}rpx;
+    }
+}
+// padding 左右+width自动计算
+@for $i from 10 through 60{
+    .w-calc-#{$i} {
+			width: calc(100% - #{$i*2}rpx);
+			padding-left:  #{$i}rpx;
+			padding-right:  #{$i}rpx;
+    }
+}
+
+// gap
+@for $i from 1 through 100{
+	.gap#{$i} {
+		gap: #{$i}rpx;
+	}
+}
+
+// 高
+@for $i from 1 through 900{
+	.h#{$i} {
+		height: #{$i}rpx;
+	}
+}
+// 宽
+@for $i from 1 through 900{
+	.w#{$i} {
+		width: #{$i}rpx;
+	}
+}
+// 宽
+@for $i from 1 through 900{
+	.lh#{$i} {
+		line-height: #{$i}rpx;
+	}
+}
+
+
+// font-weight
+$steps: 100 200 300 400 500 600 700 800 bold;
+@each $i in $steps {
+	.weight-#{$i} {
+		font-weight: $i;
+	}
+}

+ 231 - 0
assets/css/commonTheme.css

@@ -0,0 +1,231 @@
+.hb {
+	height: 100%;
+	box-sizing: border-box;
+}
+	
+.hidden {
+	overflow: hidden;
+}
+.w100 {
+	width: 100%;
+}
+
+.h100 {
+	height: 100%;
+}
+.row {
+	display: flex;
+	flex-direction: row;
+}
+
+.column {
+	display: flex;
+	flex-direction: column;
+}
+
+.justify-start {
+	display: flex;
+	justify-content: flex-start;
+}
+
+.justify-center {
+	display: flex;
+	justify-content: center;
+}
+
+.justify-end {
+	display: flex;
+	justify-content: flex-end;
+}
+
+.justify-around {
+	display: flex;
+	justify-content: space-around;
+}
+.justify-evenly {
+	display: flex;
+	justify-content: space-evenly;
+}
+
+.justify-between {
+	display: flex;
+	justify-content: space-between;
+}
+
+.align-start {
+	display: flex;
+	align-items: flex-start;
+}
+
+.align-center {
+	display: flex;
+	align-items: center;
+}
+
+.align-end {
+	display: flex;
+	align-items: flex-end;
+}
+
+.center {
+	display: flex;
+	justify-content: center;
+	align-items: center;
+}
+
+.centerV {
+	display: flex;
+	justify-content: center;
+	align-items: center;
+	flex-direction: column;
+}
+
+.wrap {
+	flex-wrap: wrap;
+}
+
+.flex-1 {
+	flex: 1;
+}
+.ellipsis {
+	overflow: hidden;
+	text-overflow: ellipsis;
+	display: -webkit-box;
+	-webkit-box-orient: vertical;
+	box-sizing: border-box;
+	width: 100%;
+	-webkit-line-clamp: 1;
+}
+.text-ellipsis {
+  display: -webkit-box;          /* 关键属性 */
+  -webkit-box-orient: vertical;  /* 排列方向 */
+  -webkit-line-clamp: 2;         /* 显示行数 */
+  overflow: hidden;              /* 超出隐藏 */
+  text-overflow: ellipsis;       /* 超出显示省略号 */
+  word-break: break-all;         /* 允许单词断行 */
+}
+
+.lines-2 {
+	-webkit-line-clamp: 2 !important;
+}
+
+.lines-3 {
+	-webkit-line-clamp: 3 !important;
+}
+
+.bold {
+	font-weight: bold;
+}
+
+.line-through {
+	text-decoration: line-through;
+}
+
+.nowrap {
+	white-space: nowrap;
+}
+
+.scrollx {
+	overflow-x: scroll;
+}
+
+.scrolly {
+	overflow-y: scroll;
+}
+.base-textcol{
+	color: var(--base-color-text);
+}
+.color9{
+	color: #999;
+}
+.color6{
+	color: #666;
+}
+.bgf{
+	background-color: #fff;
+}
+.base-color{
+	/* color: #018C39; */
+	color: #1773ff;
+}
+.colorf {
+	color: #fff;
+}
+.base-color-2 {
+	color: #e7f1fe;
+}
+
+.base-color-3 {
+	color: #425034;
+}
+.base-color-9 {
+	color: #999999;
+}
+.base-color-8 {
+	color: #f8f8f8;
+}
+.base-color-6 {
+	color: #666;
+}
+.base-color-gray {
+	color: #DEDFE4;
+}
+.base-color-red{
+		color:#ee0a25;
+}
+.base-color-dark {
+	color: #313131;
+}
+
+.base-color-dark2 {
+	color: #3E3E3E;
+}
+
+.base-price {
+	color: #FF1212;
+}
+
+.base-success {
+	color: #a3db42;
+}
+
+.base-bg {
+	background: #1773ff;
+}
+
+.base-bg-2 {
+	background: #e7f1fe;
+}
+.base-bg-red{
+	background: #ee0a25;
+}
+.base-bg-f{
+	background-color:#fff;
+}
+.base-bg-f8{
+	background-color: #f8f8f8;
+}
+.base-bg-f5{
+	background-color: #f5f5f5;
+}
+.base-bg-9{
+	background-color: #999;
+}
+.base-bg-blue{
+	background:#1677ff;
+}
+.base-bg-sure{
+	background:#e7f2fe;
+}
+.base-bg-orange{
+	background:#FF7F00;
+}
+.base-bg-false{
+	background:#fae7e7;
+}
+.bor-blue{
+	border: 2rpx solid #c9e1fb;
+}
+.bor-red{
+	border: 2rpx solid #f7a1a1;
+}

+ 37 - 5
common/request.js

@@ -1,16 +1,48 @@
 // uni-app请求封装
 export default class Request {
-	http(router, data = {}, method,contentType) {
+	http(router, data = {}, method,contentType,url) {
 		let that = this;
 		// let path =  'http://192.168.10.122:7014';
-		let path = 'https://api.zxfh.cdwjyyh.com'; 
-		uni.setStorageSync('requestPath',path)
+		let path = 'https://api.fhhx.runtzh.com'; 
+		// let path = 'http://192.168.10.126:7014';
+		
+		   // let path = 'https://live.test.ylrztop.com/live-api'; // 余红奇
+		   // let path = 'http://192.168.10.166:7014'; // 余红奇
+		
+		let token="";
+		let type = 0
+		if(url!=null){
+			type = 1
+			let projectCode = uni.getStorageSync('projectCode')
+			path= uni.getStorageSync('addressUrl_'+projectCode)
+			token= uni.getStorageSync('AppTokenmini_MYCourse')
+			
+		}
+		else{
+			type = 0
+			uni.setStorageSync('requestPath',path)
+			token= uni.getStorageSync('AppToken');
+		}
+		if(router.indexOf("/course_uniapp")!=-1){
+			type = 2;
+			router =router.replace('/course_uniapp','')
+			let projectCode = uni.getStorageSync('projectCode')
+			path= uni.getStorageSync('addressUrl_'+projectCode)
+			token =uni.getStorageSync('TOKEN_WEXIN')
+		}
 		// uni.showLoading({
 		// 	title: '加载中'
 		// });
 		return new Promise((resolve, reject) => {
-			let token = uni.getStorageSync('AppToken');
 			var httpContentType='application/x-www-form-urlencoded';
+			if(!path) {
+				uni.showToast({
+					title: '链接有误',
+					icon: 'none'
+				});
+				return
+				reject('链接有误')
+			}
 			if(contentType!=undefined){
 				//application/json;charset=UTF-8
 				httpContentType=contentType;
@@ -54,7 +86,7 @@ export default class Request {
 						})
 						return;
 					}
-					if (res.data.token) {
+					if (res.data.token&&type==0) {
 						uni.setStorageSync('AppToken',res.data.token)
 					}
 					resolve(res.data)

+ 1 - 1
components/likeProduct.vue

@@ -81,7 +81,7 @@
 		},
 		showProduct(item){
 			uni.navigateTo({
-				url: '/pages/shopping/productDetails?productId='+item.productId
+				url: '/pages_shopping/shopping/productDetails?productId='+item.productId
 			})
 		},
 	}

+ 1 - 1
components/tuiProduct.vue

@@ -81,7 +81,7 @@
 		},
 		showProduct(item){
 			uni.navigateTo({
-				url: '/pages/shopping/productDetails?productId='+item.productId
+				url: '/pages_shopping/shopping/productDetails?productId='+item.productId
 			})
 		},
 	}

+ 14 - 12
main.js

@@ -1,22 +1,24 @@
 import Vue from 'vue'
 import App from './App'
 
- 
+import uView from '@/uni_modules/uview-ui'
+Vue.use(uView)
 Vue.config.productionTip = false
-  
+
 import utils from './utils/common.js'
 Vue.prototype.utils = utils;
- 
-import {setData} from './utils/common.js'
+import store from './store/index.js' // 确保路径正确
+Vue.prototype.$store = store;
+import {isLoginCourse} from './utils/common.js'
+Vue.prototype.$isLoginCourse = isLoginCourse
+import {
+	setData
+} from './utils/common.js'
 Vue.prototype.setData = setData;
- 
- 
+
+
 App.mpType = 'app'
 const app = new Vue({
-    ...App
+	...App
 })
-app.$mount()
-
-
- 
- 
+app.$mount()

+ 3 - 3
manifest.json

@@ -1,5 +1,5 @@
 {
-    "name" : "互联网医院",
+    "name" : "芳华惠选",
     "appid" : "__UNI__D138114",
     "description" : "",
     "versionName" : "1.0.0",
@@ -50,7 +50,7 @@
     "quickapp" : {},
     /* 小程序特有相关 */
     "mp-weixin" : {
-        "appid" : "wx19c8813ffc33d1cb",
+        "appid" : "wx503cf8ab31f83dd4",
         "setting" : {
             "urlCheck" : false,
             "minified" : true,
@@ -81,7 +81,7 @@
     },
     "vueVersion" : "2",
     "h5" : {
-        "title" : "芳华选",
+        "title" : "芳华选",
         "devServer" : {
             "https" : false
         },

+ 44 - 37
package-lock.json

@@ -1,63 +1,70 @@
 {
     "name": "shop",
     "version": "1.0.0",
-    "lockfileVersion": 3,
+    "lockfileVersion": 1,
     "requires": true,
-    "packages": {
-        "": {
-            "name": "shop",
-            "version": "1.0.0",
-            "license": "ISC",
-            "dependencies": {
-                "animate.css": "^3.7.2",
-                "cos-wx-sdk-v5": "^1.0.10",
-                "dayjs": "^1.11.7",
-                "tim-wx-sdk": "^2.17.0"
-            }
+    "dependencies": {
+        "@vue/devtools-api": {
+            "version": "6.6.4",
+            "resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-6.6.4.tgz",
+            "integrity": "sha512-sGhTPMuXqZ1rVOk32RylztWkfXTRhuS7vgAKv0zjqk8gbsHkJ7xfFf+jbySxt7tWObEJwyKaHMikV/WGDiQm8g=="
         },
-        "node_modules/animate.css": {
+        "animate.css": {
             "version": "3.7.2",
-            "resolved": "https://registry.npmmirror.com/animate.css/-/animate.css-3.7.2.tgz",
+            "resolved": "https://registry.npmjs.org/animate.css/-/animate.css-3.7.2.tgz",
             "integrity": "sha512-0bE8zYo7C0KvgOYrSVfrzkbYk6IOTVPNqkiHg2cbyF4Pq/PXzilz4BRWA3hwEUBoMp5VBgrC29lQIZyhRWdBTw=="
         },
-        "node_modules/cos-wx-sdk-v5": {
+        "cos-wx-sdk-v5": {
             "version": "1.1.5",
-            "resolved": "https://registry.npmmirror.com/cos-wx-sdk-v5/-/cos-wx-sdk-v5-1.1.5.tgz",
+            "resolved": "https://registry.npmjs.org/cos-wx-sdk-v5/-/cos-wx-sdk-v5-1.1.5.tgz",
             "integrity": "sha512-++O7HD6Hz6UDlhgKMchJOap85bQtY+DKzPg2r5uCdyRb45AWC+Xj9qetXohPpA2G/inNVSqxw/EtjGPe2OIhyg==",
-            "dependencies": {
+            "requires": {
                 "mime": "^2.4.6",
                 "xmldom": "^0.1.31"
             }
         },
-        "node_modules/dayjs": {
+        "crypto": {
+            "version": "1.0.1",
+            "resolved": "https://registry.npmjs.org/crypto/-/crypto-1.0.1.tgz",
+            "integrity": "sha512-VxBKmeNcqQdiUQUW2Tzq0t377b54N2bMtXO/qiLa+6eRRmmC4qT3D4OnTGoT/U6O9aklQ/jTwbOtRMTTY8G0Ig=="
+        },
+        "crypto-js": {
+            "version": "4.2.0",
+            "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz",
+            "integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q=="
+        },
+        "dayjs": {
             "version": "1.11.7",
-            "resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.7.tgz",
+            "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.7.tgz",
             "integrity": "sha512-+Yw9U6YO5TQohxLcIkrXBeY73WP3ejHWVvx8XCk3gxvQDCTEmS48ZrSZCKciI7Bhl/uCMyxYtE9UqRILmFphkQ=="
         },
-        "node_modules/mime": {
+        "hls": {
+            "version": "0.0.1",
+            "resolved": "https://registry.npmjs.org/hls/-/hls-0.0.1.tgz",
+            "integrity": "sha512-ov6aIzckaDCdFFAeJbrmZYhAR0O7w+nDXh3fz9XEcf8P6EercldLht/23JHRFXmAMtvKw8dzuOCafzktdV1AZw=="
+        },
+        "mime": {
             "version": "2.6.0",
-            "resolved": "https://registry.npmmirror.com/mime/-/mime-2.6.0.tgz",
-            "integrity": "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==",
-            "bin": {
-                "mime": "cli.js"
-            },
-            "engines": {
-                "node": ">=4.0.0"
-            }
+            "resolved": "https://registry.npmjs.org/mime/-/mime-2.6.0.tgz",
+            "integrity": "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg=="
         },
-        "node_modules/tim-wx-sdk": {
+        "tim-wx-sdk": {
             "version": "2.18.0",
-            "resolved": "https://registry.npmmirror.com/tim-wx-sdk/-/tim-wx-sdk-2.18.0.tgz",
+            "resolved": "https://registry.npmjs.org/tim-wx-sdk/-/tim-wx-sdk-2.18.0.tgz",
             "integrity": "sha512-Dz6aHpaCdk1ST/ZzltliSFHBsB5CdFU+q2NpFZc9PV8br0a5F2GyYgrdLn1Yqt8YntEwMReaud3LUY638zNJug=="
         },
-        "node_modules/xmldom": {
-            "version": "0.1.31",
-            "resolved": "https://registry.npmmirror.com/xmldom/-/xmldom-0.1.31.tgz",
-            "integrity": "sha512-yS2uJflVQs6n+CyjHoaBmVSqIDevTAWrzMmjG1Gc7h1qQ7uVozNhEPJAwZXWyGQ/Gafo3fCwrcaokezLPupVyQ==",
-            "deprecated": "Deprecated due to CVE-2021-21366 resolved in 0.5.0",
-            "engines": {
-                "node": ">=0.1"
+        "vuex": {
+            "version": "4.1.0",
+            "resolved": "https://registry.npmjs.org/vuex/-/vuex-4.1.0.tgz",
+            "integrity": "sha512-hmV6UerDrPcgbSy9ORAtNXDr9M4wlNP4pEFKye4ujJF8oqgFFuxDCdOLS3eNoRTtq5O3hoBDh9Doj1bQMYHRbQ==",
+            "requires": {
+                "@vue/devtools-api": "^6.0.0-beta.11"
             }
+        },
+        "xmldom": {
+            "version": "0.1.31",
+            "resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.1.31.tgz",
+            "integrity": "sha512-yS2uJflVQs6n+CyjHoaBmVSqIDevTAWrzMmjG1Gc7h1qQ7uVozNhEPJAwZXWyGQ/Gafo3fCwrcaokezLPupVyQ=="
         }
     }
 }

+ 7 - 2
package.json

@@ -6,13 +6,18 @@
     "dependencies": {
         "animate.css": "^3.7.2",
         "cos-wx-sdk-v5": "^1.0.10",
+        "crypto": "^1.0.1",
+        "crypto-js": "^4.2.0",
         "dayjs": "^1.11.7",
-        "tim-wx-sdk": "^2.17.0"
+        "hls": "0.0.1",
+        "tim-wx-sdk": "^2.17.0",
+        "vuex": "^4.1.0"
     },
     "main": "main.js",
     "scripts": {
         "test": "echo \"Error: no test specified\" && exit 1"
     },
     "author": "",
-    "license": "ISC"
+    "license": "ISC",
+    "devDependencies": {}
 }

File diff suppressed because it is too large
+ 319 - 501
pages.json


+ 10 - 7
pages/auth/login.vue

@@ -5,9 +5,9 @@
       <view class="force-login__content y-f">
         <view class="logo">
         	<view class="logo-img">
-        		<image  src="https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20250310/aeb776c6aa174d7c94181e5fd212e0f1.png"></image>
+        		<image  src="https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20250721/efce6c594de34caba6537992083a5e47.png"></image>
         	</view>
-        	<view class="title">芳华选</view>
+        	<view class="title">芳华选</view>
         </view>
         <view class="login-notice">为了提供更优质的服务,请先登录</view>
 		<!-- <button
@@ -30,8 +30,8 @@
 		<view class="tips">
 			<checkbox  :checked="isAgreement" @click="handleAgreement()" />
 			<view  @click="handleAgreement()">您同意并接受</view>
-		 	<view class="btn"  @click="openH5('/h5/userAgreement')">《用户协议》</view>
-		 	<view class="btn" @click="openH5('/h5/privacyPolicy')">《隐私保护》</view>
+		 	<view class="btn"  @click="openH5(1)">《用户协议》</view>
+		 	<view class="btn" @click="openH5(2)">《隐私保护》</view>
 		</view>
       </view>
     </view>
@@ -112,7 +112,7 @@ export default {
 		getWxCode() {
 			//在微信公众号请求用户网页授权之前,开发者需要先到公众平台官网中的“开发 - 接口权限 - 网页服务 - 网页帐号 - 网页授权获取用户基本信息”的配置选项中,修改授权回调域名。请注意,这里填写的是域名(是一个字符串),而不是URL,因此请勿加 http:// 等协议头; 
 			//http://shequ.natapp1.cc/#/pages/index/index?deviceId=8
-			var appId="wx19c8813ffc33d1cb";
+			var appId="wx503cf8ab31f83dd4";
 			var url="https://api.zxfh.cdwjyyh.com";
 			window.location.href ='https://open.weixin.qq.com/connect/oauth2/authorize?appid='+appId+'&redirect_uri=' +encodeURIComponent(url+"/#/pages/auth/wxLogin") +'&response_type=code&scope=snsapi_userinfo&state=JeffreySu-954&connect_redirect=1#wechat_redirect';
 			//console.log('https://open.weixin.qq.com/connect/oauth2/authorize?appid='+appId+'&redirect_uri=' +encodeURIComponent("http://shequ.natapp1.cc/#/pages/index/index?deviceId="+this.deviceId) +'&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect')
@@ -138,9 +138,9 @@ export default {
 		},
 		openH5(url){
 			var requestPath = uni.getStorageSync('requestPath');
-			uni.setStorageSync('url',requestPath+url);
+			// uni.setStorageSync('url',requestPath+url);
 			uni.navigateTo({
-				url: '../home/h5'
+				url: '../home/h5?type='+url
 			})
 		},
 		getCode(){
@@ -326,6 +326,9 @@ export default {
 		},
 		back() {
 			uni.navigateBack()
+			// uni.switchTab({
+			// 	url:'/pages/home/index'
+			// })
 		}
 	}
 }

+ 2 - 5
pages/common/launch.vue

@@ -1,8 +1,8 @@
 <template>
 	<view class="content">
 		<view class="loadding" v-if="loadding==true">
-			<image src="/static/images/logo.jpg"></image>
-			<text class="text">芳华选</text>
+			<image src="/static/images/logo.png"></image>
+			<text class="text">芳华选</text>
 		</view>
 	</view>
 </template>
@@ -43,10 +43,7 @@
 			
 		},
 		onLoad() {
-			
 			this.getDicts()
-			
-			
 		}
 	};
  

+ 0 - 1
pages/home/companyInfo.vue

@@ -12,7 +12,6 @@
 			controls
 			></video> 
 		</view>
-		
 	</view>
 </template>
 

+ 1 - 1
pages/home/components/HotProduct.vue

@@ -86,7 +86,7 @@
 			},
 			showProduct(item){
 				uni.navigateTo({
-					url: '/pages/shopping/productDetails?productId='+item.productId
+					url: '/pages_shopping/shopping/productDetails?productId='+item.productId
 				})
 			},
             

+ 1 - 1
pages/home/components/NewProduct.vue

@@ -86,7 +86,7 @@
 			},
 			showProduct(item){
 				uni.navigateTo({
-					url: '/pages/shopping/productDetails?productId='+item.productId
+					url: '/pages_shopping/shopping/productDetails?productId='+item.productId
 				})
 			},
 			

+ 34 - 17
pages/home/h5.vue

@@ -1,22 +1,46 @@
 <template>
 	<view class="content">
-		 <web-view :src="url"></web-view>
+		 <view v-html="ulrtext" style="padding-top: 20rpx;"></view>
 	</view>
 </template>
 
 <script>
- 
+ import {getyingsi,getxieyi} from '@/api/user.js'
  export default {
  	data() {
  		return {
-			url:"",
+			type:"",
+			ulrtext:''
  		}
  	},
-	onLoad(val) {
-		this.url=uni.getStorageSync('url');
-		console.log(this.url)
-	}
- 	 
+	onLoad(option) {
+		if(option.type==1){
+			//协议
+			uni.setNavigationBarTitle({
+				title: "用户协议"
+			  });
+			this.getgetxieyilist()
+		}else{
+			//隐私
+			uni.setNavigationBarTitle({
+				title: "隐私保护"
+			  });
+			this.getyingsilist()
+		}
+		console.log(this.type)
+	},
+ 	 methods:{
+		 getyingsilist(){
+			 getyingsi().then(res=>{
+				 this.ulrtext=res
+			 })
+		 },
+		 getgetxieyilist(){
+			 getxieyi().then(res=>{
+				 this.ulrtext=res
+			 })
+		 }
+	 }
  }
  
  
@@ -24,16 +48,9 @@
 
 
 <style scoped lang="scss">
-page{
-	height: 100%;
-}
 .content{
-	width: 100%;
-	height: 100%;
-	display: flex;
-	align-items: center;
-	justify-content: center;
-	
+	padding: 20rpx;
+	padding-bottom: 60rpx;
 }
  
 

+ 12 - 24
pages/home/index.vue

@@ -9,7 +9,7 @@
 					<view class="status_bar" :style="{height: statusBarHeight}"></view>
 					<view class="top-title">
 						<image class="name" src="../../static/images/name.png"></image>
-						<!-- <view class="name">芳华选</view> -->
+						<!-- <view class="name">芳华选</view> -->
 						<!-- <view class="dot">•</view><view class="sub-name">七彩互联网医院</view> -->
 					</view>
 					<!-- 搜索框、购物车、客服 -->
@@ -80,14 +80,9 @@
 					<image src="https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20250320/f2d3ba32a9344dc79b4df7c228189243.png" mode=""></image>
 				</view> -->
 			</view>
-			<view class="item"  @click="navTo('/pages_user/user/userShareList')">
-				<!-- <image class="bg-img" src="../../static/images/banner2.png" mode=""></image> -->
-				<image class="bg-img" src="https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20250320/0a47b5c6b5fb43eab0b4426d5db27471.png" mode=""></image>
-				<!-- <view class="inner">
-					<text class="title">分享榜</text>
-					<text class="sub-title"></text>
-					<image src="../../static/images/cu_search.png" mode=""></image>
-				</view> -->
+			<view class="item"  @click="navTo('/pages_course/livingList')">
+				<image class="bg-img" src="/static/images/banner2.png" mode=""></image>
+				
 			</view>
 		</view>
 		<view class="index-cont">
@@ -502,9 +497,9 @@
 		},
 		onShareAppMessage(res) {
 			return {
-				title: '芳华选',
+				title: '芳华选',
 				path: `/pages/common/launch`,
-				imageUrl: 'https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20250310/aeb776c6aa174d7c94181e5fd212e0f1.png' //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
+				imageUrl: 'https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20250721/efce6c594de34caba6537992083a5e47.png' //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
 			}
 		},
 		onReachBottom() {
@@ -514,9 +509,9 @@
 		//分享到朋友圈
 		onShareTimeline(res) {
 			return {
-				title: '芳华选互联网医院',
+				title: '芳华选互联网医院',
 				query:'',//页面参数
-				imageUrl: 'https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20250310/aeb776c6aa174d7c94181e5fd212e0f1.png' //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
+				imageUrl: 'https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20250721/efce6c594de34caba6537992083a5e47.png' //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
 			}
 		},
 		computed: {
@@ -547,7 +542,7 @@
 			navToMiniProgram(){
 				uni.navigateToMiniProgram({
 					// appid  写你要跳转的小程序的 appid
-					appId: 'wx19c8813ffc33d1cb',
+					appId: 'wx503cf8ab31f83dd4',
 					// 路径写  src下的路径,假如你跳转的是pages下的页面,就可以写pages/index
 					path: '/pages/common/launch',
 					extraData: {
@@ -916,7 +911,7 @@
 			},
 			showProduct(item){
 				uni.navigateTo({
-					url: '../shopping/productDetails?productId='+item.productId
+					url: '/pages_shopping/shopping/productDetails?productId='+item.productId
 				})
 			},
 			// 顶部搜索
@@ -1023,13 +1018,6 @@
 						height:100%;
 					}
 				}
-				// .name{
-				// 	font-size: 42upx;
-				// 	font-family: Source Han Sans CN;
-				// 	font-weight: bold;
-				// 	color: #FFFFFF;
-				// 	padding-left: 41upx;
-				// }
 				.dot{
 					margin: 0upx 10upx;
 					font-size: 28upx;
@@ -1069,7 +1057,7 @@
 						flex: 1;
 					}
 				}
-				/deep/.uni-badge{
+				::v-deep.uni-badge{
 					border: none;
 					background-color: #FF3636;
 					font-family: Roboto;
@@ -1977,7 +1965,7 @@
 				align-items: center;
 				position: relative;
 				image{
-					width::100%;
+					width:100%;
 				}
 			}
 		}

+ 1 - 1
pages/home/productList.vue

@@ -236,7 +236,7 @@
 			// 查看详情
 			showDetail(item) {
 				uni.navigateTo({
-					url: '../shopping/productDetails?productId='+item.productId
+					url: '/pages_shopping/shopping/productDetails?productId='+item.productId
 				})
 			}
 		}

+ 6 - 4
pages/shopping/cart.vue

@@ -87,7 +87,9 @@
 			// this.getCarts();
 		},
 		onShow() {
-			this.getCarts();
+			if(uni.getStorageSync('AppToken')){
+				this.getCarts();
+			}
 		},
 		onReachBottom() {
 			this.$refs.product.getGoodsProducts();
@@ -246,12 +248,12 @@
 					return;
 				}
 				uni.navigateTo({
-					url: './confirmOrder?type=cart&cartIds='+selectCarts.toString()
+					url: '/pages_shopping/shopping/confirmOrder?type=cart&cartIds='+selectCarts.toString()
 				})
 			},
 			showProduct(item){
 				uni.navigateTo({
-					url: '../shopping/productDetails?productId='+item.productId
+					url: '/pages_shopping/shopping/productDetails?productId='+item.productId
 				})
 			},
 		}
@@ -303,7 +305,7 @@
 							font-family: PingFang SC;
 							font-weight: bold;
 							color: #FFFFFF;
-							background: linear-gradient(90deg, #2BC7B9 0%, #2BC7A4 100%);
+							background: linear-gradient(90deg, #2BC7B9 0%, #77cbf3 100%);
 							border-radius: 4upx;
 							margin-right: 10upx;
 							flex-shrink: 0;

+ 1 - 1
pages/shopping/index.vue

@@ -182,7 +182,7 @@
 			// 查看药品详情
 			showProductList(item) {
 				uni.navigateTo({
-					url: './productList?cateId='+item.cateId+"&pid="+item.pid
+					url: '/pages_shopping/shopping/productList?cateId='+item.cateId+"&pid="+item.pid
 				})
 			},
 			goSearch(e) {

+ 44 - 16
pages/user/index.vue

@@ -29,7 +29,6 @@
 						</uni-badge>
 					</view>
 					
-					
 				</view>
 				<!-- 我的订单 -->
 				<view class="my-order">
@@ -91,6 +90,10 @@
 								<image src="../../static/images/my_ask.png" mode=""></image>
 								<text class="text">我的问诊</text>
 							</view> -->
+							<view class="item no-marin-bottom" @click="navgetTo('/pages_shopping/live/order')">
+								<image src="../../static/images/live.png" mode=""></image>
+								<text class="text">直播订单</text>
+							</view>
 							<view class="item" @click="navgetTo('/pages_user/user/prescribeOrder')">
 								<image src="../../static/images/prescription.png" mode=""></image>
 								<text class="text">我的处方</text>
@@ -103,10 +106,10 @@
 								<image src="../../static/images/address.png" mode=""></image>
 								<text class="text">收货地址</text>
 							</view>
-							<view class="item no-marin-bottom" @click="navgetTo('/pages_user/user/integral')">
+							<!-- <view class="item no-marin-bottom" @click="navgetTo('/pages_user/user/integral')">
 								<image src="../../static/images/integral.png" mode=""></image>
 								<text class="text">积分管理</text>
-							</view>
+							</view> -->
 							<view class="item no-marin-bottom"  @click="navgetTo('/pages_shopping/shopping/myCoupon')">
 								<image src="../../static/images/mycoupon.png" mode=""></image>
 								<text class="text">优惠券</text>
@@ -115,11 +118,11 @@
 								<image src="../../static/images/service_file.png" mode=""></image>
 								<text class="text">我的足迹</text>
 							</view>
-							<view class="item no-marin-bottom" @click="openH5('/h5/userAgreement')">
+							<view class="item no-marin-bottom" @click="openH5(1)">
 								<image src="../../static/images/service_file.png" mode=""></image>
 								<text class="text">用户协议</text>
 							</view>
-							<view class="item no-marin-bottom align-top"  @click="openH5('/h5/privacyPolicy')">
+							<view class="item no-marin-bottom align-top"  @click="openH5(2)">
 								<image src="../../static/images/advice.png" mode=""></image>
 								<text class="text">隐私保护</text>
 							</view>
@@ -142,21 +145,25 @@
 							</view>
 	
 							<view class="item no-marin-bottom" @click="toManager()">
-								<image src="../../static/images/sale_file.png" mode=""></image>
+								<image src="../../static/images/management.png" mode=""></image>
 								<text class="text">销售管理</text>
 							</view>
-							 
+							
+							 <!-- <view class="item no-marin-bottom" @click="toManagerCourse()">
+							 	<image src="../../static/images/management.png" mode=""></image>
+							 	<text class="text">销售管理</text>
+							 </view> -->
 						</view>
 					</view>
 					<!-- 退出登录按钮 -->
 				</view>
-				<view style="padding-bottom: 20rpx;">
+				<view style="padding-bottom: 20rpx;" v-if="user.phone!=''">
 					<view @tap="loginOUt" class="log-out x-c" >退出登录</view>
 				</view>
-				<view class="banner">
+				<!-- <view class="banner">
 					<image src="https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20221125/71ddd95044bb46d5b27e19a5f61cf5ab.png"></image>
 					<view class="tel_btn" @click="callService()"></view>
-				</view>
+				</view> -->
 				<view class="like-product">
 					<likeProduct  ref="product" />
 				</view>
@@ -192,7 +199,7 @@
 				statusBarHeight: uni.getStorageSync('menuInfo').statusBarHeight,
 				// 消息数量
 				msgNum: 0,
-			 
+				
 				 
 			};
 		},
@@ -202,10 +209,14 @@
 		onShow() {
 			console.log("onshow")
 			var that=this;
-			this.utils.isLogin().then(res => {
+			if(uni.getStorageSync('AppToken')){
 				that.getUserInfo();
 				that.getOrderCount();
-			})
+			}
+			// this.utils.isLogin().then(res => {
+			// 	that.getUserInfo();
+			// 	that.getOrderCount();
+			// })
 			
 		},
 		onReachBottom() {
@@ -213,9 +224,25 @@
 			this.$refs.product.getGoodsProducts();
 		},
 		methods: {
+			toManagerCourse(){
+				if(uni.getStorageSync('ManageToken')){
+					uni.navigateTo({
+						url: '/pages_manage/index'
+					})
+				}
+				else{
+					uni.navigateTo({
+						url: '/pages_manage/login'
+					})
+				}
+				
+			},
 			loginOUt(){
 				this.utils.loginOut();
 				this.getUserInfo();
+				// uni.switchTab({
+				// 	url:'/pages/home/index'
+				// })
 			},
 			openPersonInfo(){
 				this.utils.isLogin().then(res => {
@@ -263,11 +290,11 @@
 				}
 				
 			},
-			openH5(url){
+			openH5(type){
 				var requestPath = uni.getStorageSync('requestPath');
-				uni.setStorageSync('url',requestPath+url);
+				// uni.setStorageSync('url',requestPath+url);
 				uni.navigateTo({
-					url: '../home/h5'
+					url: '../home/h5?type='+type
 				})
 			},
 			getUserInfo(){
@@ -276,6 +303,7 @@
 						if(res.code==200){
 							if(res.user!=null){
 								this.user=res.user;
+								uni.setStorageSync('userData',res.user)
 							}
 							else{
 								this.utils.loginOut();

+ 12 - 2
pages_company/index.vue

@@ -24,10 +24,10 @@
 						<image src="../static/images/icon_coupon.png" mode=""></image>
 						<text class="text">制单优惠券</text>
 					</view> -->
-					<view class="item" @click="toPay()">
+					<!-- <view class="item" @click="toPay()">
 						<image src="../static/images/money.png" mode=""></image>
 						<text class="text">微信收款</text>
-					</view>
+					</view> -->
 					<!-- <view class="item" @click="alipay()">
 						<image src="../static/images/money.png" mode=""></image>
 						<text class="text">支付宝收款</text>
@@ -45,6 +45,11 @@
 						<text class="text">套餐优惠券</text>
 					</view>
 					
+					<view class="item" @click="toShareLive()">
+						<image src="/static/images/live_icon.png" mode=""></image>
+						<text class="text">分享直播间</text>
+					</view>
+					
 				</view>
 			</view>
 			<!-- 退出登录按钮 -->
@@ -113,6 +118,11 @@
 					url:'/pages_company/coupon'
 				})
 			},
+			toShareLive(){
+				uni.navigateTo({
+					url:'/pages_company/shareLive?companyId='+this.user.companyId+"&companyUserId="+this.user.userId
+				})
+			},
 			toCreateCoupon(){
 				uni.navigateTo({
 					url:'/pages_company/order/coupon'

+ 4 - 4
pages_company/order/confirmCompanyOrder.vue

@@ -83,18 +83,18 @@
 		//发送给朋友
 		onShareAppMessage(res) {
 			return {
-				title: "芳华选-您的专属健康解决方案",
+				title: "芳华选-您的专属健康解决方案",
 				path: '/pages_company/order/confirmOrder?orderKey='+this.orderKey,
-				imageUrl: 'https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20250310/aeb776c6aa174d7c94181e5fd212e0f1.png' //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
+				imageUrl: 'https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20250721/efce6c594de34caba6537992083a5e47.png' //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
 			}
 			
 		},
 		//分享到朋友圈
 		onShareTimeline(res) {
 			return {
-				title:"芳华选-您的专属健康解决方案",
+				title:"芳华选-您的专属健康解决方案",
 				query:'orderKey='+this.orderKey,
-				imageUrl:  'https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20250310/aeb776c6aa174d7c94181e5fd212e0f1.png' //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
+				imageUrl:  'https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20250721/efce6c594de34caba6537992083a5e47.png' //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
 			}
 		},
 		methods: {

+ 1 - 1
pages_company/order/confirmOrder.vue

@@ -150,7 +150,7 @@
 							res => {
 								if(res.code==200){
 									uni.navigateTo({
-										url: '/pages/shopping/confirmCreateOrder?type=buy&cartIds='+res.cartIds.toString()+"&companyId="+res.companyId+"&companyUserId="+res.companyUserId+"&createOrderKey="+this.orderKey
+										url: '/pages_shopping/shopping/confirmCreateOrder?type=buy&cartIds='+res.cartIds.toString()+"&companyId="+res.companyId+"&companyUserId="+res.companyUserId+"&createOrderKey="+this.orderKey
 									})
 								}else{
 									uni.showToast({

+ 3 - 3
pages_company/order/productDetails.vue

@@ -239,7 +239,7 @@
 						if(res.code==200){
 							if(type=="buy"){
 								uni.navigateTo({
-									url: '/pages/shopping/confirmOrder?type='+this.type+"&cartIds="+res.id
+									url: '/pages_shopping/shopping/confirmOrder?type='+this.type+"&cartIds="+res.id
 								})
 							}
 							else
@@ -724,12 +724,12 @@
 					text-align: center;
 				}
 			}
-			/deep/.uni-badge--x{
+			::v-deep.uni-badge--x{
 				display: flex;
 				align-items: center;
 				justify-content: center;
 			}
-			/deep/.uni-badge{
+			::v-deep.uni-badge{
 				border: none;
 				background-color: #FF3636;
 				font-family: Roboto;

+ 263 - 0
pages_company/shareLive.vue

@@ -0,0 +1,263 @@
+<template>
+	<view>
+		<!-- <view class="search-cont">
+			<view class="inner">
+				<image class="icon-search" src="/static/images/search.png" mode=""></image>
+				<input type="text" value="" placeholder="输入订单号" confirm-type="搜索" @confirm="goSearch"
+					placeholder-style="font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;" />
+			</view>
+		</view> -->
+		<!-- 订单列表 -->
+		<mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption"
+			:up="upOption">
+			<view class="live-list">
+				<view v-for="(item,index) in dataList" :key="index" class="item">
+					<!-- 药品列表 -->
+					<!-- 实付金额、按钮 -->
+					<view class="bottom-box">
+						<view class="left">
+							<image class="img" v-if="item.liveImgUrl" :src="item.liveImgUrl"></image>
+							<text class="ml30 label">{{item.liveName}}</text>
+						</view>
+						<view class="btn-box">
+							<!-- <view class="btn pay" @click.stop="showDetail(item)">
+									分享直播间
+								</view> -->
+							<button open-type="share" class="button" :data-item="JSON.stringify(item)"
+								@click="setShareItem($event)">
+								分享
+							</button>
+						</view>
+					</view>
+				</view>
+			</view>
+		</mescroll-body>
+	</view>
+</template>
+
+<script>
+	import {
+		liveList
+	} from '@/api/living.js'
+
+
+	// import {
+	// 	getCompanyStoreOrderList
+	// } from '@/api/storeOrder'
+	import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
+	export default {
+		mixins: [MescrollMixin],
+		data() {
+			return {
+				userinfo: {},
+				currentShareItem: null,
+				// searchKey: "",
+				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: '/static/images/no_data.png',
+						tip: '暂无数据'
+					}
+				},
+				companyId: null,
+				companyUserId:null,
+				// 列表数据
+				dataList: [],
+			};
+		},
+		onLoad(options) {
+			var that = this;
+			// uni.$on('refreshOrder', () => {
+			that.mescroll.resetUpScroll()
+			// })
+			this.companyId = options.companyId;
+			this.companyUserId = options.companyUserId;
+			this.userinfo = JSON.parse(uni.getStorageSync("userInfo"))
+		},
+		onShareAppMessage() {
+			const item = this.currentShareItem || {};
+			console.log("item.liveId", item.liveId)
+			console.log("this.companyUserId", this.companyUserId)
+			return {
+				title: '邀请你来观看直播:' + item.liveName,
+				path: `/pages_course/living?companyId=${this.companyId}&companyUserId=${this.companyUserId}&liveId=${item.liveId}`,
+				// imageUrl: this.products.image,
+				imageUrl: '/static/images/logo.png',
+				success(res) {
+					console.log("分享成功", res);
+				},
+				fail(err) {
+					console.error("分享失败", err);
+				}
+			};
+		},
+		methods: { // 记录当前要分享的item
+			setShareItem(e) {
+				// 从事件对象的currentTarget.dataset中获取item(需解析JSON)
+				const itemStr = e.currentTarget.dataset.item;
+				this.currentShareItem = JSON.parse(itemStr);
+			},
+			// goSearch(e) {
+			// 	this.searchKey = e.detail.value;
+			// 	this.mescroll.resetUpScroll()
+			// },
+			mescrollInit(mescroll) {
+				this.mescroll = mescroll;
+			},
+			/*下拉刷新的回调 */
+			downCallback(mescroll) {
+				mescroll.resetUpScroll()
+			},
+			upCallback(page) {
+				//联网加载数据
+				var that = this;
+				// var data = {
+				// 	pageNum: page.num,
+				// 	pageSize: page.size,
+				// };
+				liveList(this.companyId,page.size,page.num).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();
+					}
+				});
+			},
+			// showDetail(item) {
+			// 	uni.navigateTo({
+			// 		url: './storeOrderDetail?id=' + item.id
+			// 	})
+			// },
+
+		}
+	}
+</script>
+
+<style lang="scss">
+	.search-cont {
+		padding: 16rpx 30rpx;
+		background-color: #FFFFFF;
+
+		.inner {
+			box-sizing: border-box;
+			width: 100%;
+			height: 72rpx;
+			background: #F7F7F7;
+			border-radius: 36rpx;
+			display: flex;
+			align-items: center;
+			padding: 0 30rpx;
+
+			.icon-search {
+				width: 28rpx;
+				height: 28rpx;
+				margin-right: 20rpx;
+			}
+
+			input {
+				height: 60rpx;
+				line-height: 60rpx;
+				flex: 1;
+			}
+		}
+	}
+
+	.live-list {
+		padding: 20rpx;
+
+		.item {
+			background: #FFFFFF;
+			border-radius: 16rpx;
+			padding: 20rpx 30rpx;
+			margin-bottom: 20rpx;
+
+			.bottom-box {
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+
+				.left {
+					display: flex;
+					align-items: center;
+
+					.img {
+						width: 140rpx;
+						height: 140rpx;
+					}
+
+					.label {
+						font-size: 28rpx;
+						font-weight: 500;
+						color: #999999;
+						line-height: 1;
+					}
+
+
+
+					.price-box {
+						display: flex;
+						align-items: flex-end;
+
+						.unit {
+							font-size: 24rpx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #FF6633;
+							line-height: 1.2;
+							margin-right: 4rpx;
+						}
+
+						.num {
+							font-size: 32rpx;
+							font-family: PingFang SC;
+							font-weight: bold;
+							color: #FF6633;
+							line-height: 1;
+						}
+					}
+				}
+
+				.btn-box {
+					box-sizing: border-box;
+					display: flex;
+					align-items: center;
+
+					button {
+						font-size: 28rpx;
+						color: #F7F7F7;
+						padding: 12rpx 20rpx !important;
+						background-color: #2BC7B9 !important;
+						line-height: inherit !important;
+						margin: 0 !important;
+						width: auto !important;
+						font-weight: 500 !important;
+						border-radius: none !important;
+					}
+				}
+			}
+
+		}
+	}
+</style>

+ 13 - 12
pages_company/storeOrderDetail.vue

@@ -21,33 +21,34 @@
 				<!-- 订单状态 -->
 				<view class="order-status">
 					<!-- 待付款 -->
-					<view v-if="order.status == 0" class="inner">
+					<view v-if="order.status == 1" class="inner">
 						<view class="img-box">
 							<image src="/static/images/pag96.png" mode=""></image>
 						</view>
 						<view class="status-box">
-							<text class="status">待付</text>
+							<text class="status">待付</text>
 							<text class="desc">请在{{payLimitTime}}前完成支付</text>
 						</view>
 					</view>
+					
 					<!-- 待发货 -->
-					<view v-if="order.status == 1" class="inner">
+					<view v-if="order.status == 2" class="inner">
 						<view class="img-box">
-							<image src="/static/images/pag96.png" mode=""></image>
+							<image src="/static/images/receipt.png" mode=""></image>
 						</view>
 						<view class="status-box">
 							<text class="status">待发货</text>
-							<text class="desc">等待后台发货</text>
+							<text class="desc">等待后台发货 </text>
 						</view>
 					</view>
-					<!-- 已发货、待收货 -->
-					<view v-if="order.status == 2" class="inner">
+					<!-- 待收货 -->
+					<view v-if="order.status == 3" class="inner">
 						<view class="img-box">
-							<image src="/static/images/receipt.png" mode=""></image>
+							<image src="/static/images/finish96.png" mode=""></image>
 						</view>
 						<view class="status-box">
 							<text class="status">待收货</text>
-							<text class="desc">运输中</text>
+							<text class="desc">运输中 </text>
 						</view>
 					</view>
 					<!-- 已完成 -->
@@ -220,9 +221,9 @@
 				支付分享
 				<button  class="share" data-name="shareBtn" open-type="share">分享</button>
 			</view>
-			<view class="btn share-btn" v-if="order.status==0" @click="openEditMoney()">
+			<!-- <view class="btn share-btn" v-if="order.status==0" @click="openEditMoney()">
 				修改定金
-			</view>
+			</view> -->
 		</view>
 	 
 		<view class="popup-box" v-if="editShow">
@@ -273,7 +274,7 @@
 		onShareAppMessage(res) {
 			return {
 				title: "订单:"+this.order.orderCode,
-				path: `/pages/shopping/paymentOrder?orderId=${this.order.id}`,
+				path: `pages_shopping/shopping/paymentOrder?orderId=${this.order.id}`,
 			}
 		},
 		methods: {

+ 3 - 3
pages_company/storeProductPackageDetails.vue

@@ -246,7 +246,7 @@
 				this.utils.isLogin().then(res => {
 					if(res){
 						uni.navigateTo({
-							url: '/pages/shopping/confirmPackageOrder?packageId='+this.packageId+"&companyUserId="+this.companyUserId
+							url: '/pages_shopping/shopping/confirmPackageOrder?packageId='+this.packageId+"&companyUserId="+this.companyUserId
 						})
 						this.isSubmitting = false; // 禁用按钮
 					}
@@ -581,12 +581,12 @@
 					text-align: center;
 				}
 			}
-			/deep/.uni-badge--x{
+			::v-deep.uni-badge--x{
 				display: flex;
 				align-items: center;
 				justify-content: center;
 			}
-			/deep/.uni-badge{
+			::v-deep.uni-badge{
 				border: none;
 				background-color: #FF3636;
 				font-family: Roboto;

+ 106 - 0
pages_course/components/ThreeItemSwiper.vue

@@ -0,0 +1,106 @@
+<template>
+	<view class="custom-swiper-wrapper">
+		<swiper class="custom-swiper" :current="activeIndex" @change="onSwiperChange" circular :duration="300"
+			indicator-dots="false" autoplay="false" display-multiple-items="1" :previous-margin="outerMargin"
+			:next-margin="outerMargin" indicator-color="rgba(255, 255, 255, 0.5)" indicator-active-color="#FFEB66">
+			<swiper-item v-for="(item, index) in (products||[])" :key="index">
+				<view class="item-container">
+					<view class="swiper-item" :class="{ 'swiper-item-active': index === currentCenterIndex }">
+						<image class="item-image" :src="item.imgUrl" mode="aspectFit"></image>
+						<view class="item-text" v-if="index === currentCenterIndex">
+							<view class="text-title">{{ item.prizeLevel }}等奖</view>
+							<view class="text-desc">{{ item.productName }}</view>
+						</view>
+					</view>
+				</view>
+			</swiper-item>
+		</swiper>
+	</view>
+</template>
+
+<script>
+	export default {
+		props: {
+			products: {
+				type: Array,
+				default:() => [],
+			}
+		},
+		data() {
+			return {
+				activeIndex: 0, // 初始激活项索引(建议从1开始,避免循环时偏移)
+				outerMargin: '120rpx', // 轮播左右外部间距
+				
+			};
+		},
+		computed: {
+			currentCenterIndex() {
+				if (this.products.length === 0) return 0;
+				return this.activeIndex % this.products.length;
+			}
+		},
+		methods: {
+			onSwiperChange(e) {
+				this.activeIndex = e.detail.current;
+			},
+		},
+	};
+</script>
+
+<style scoped>
+	.custom-swiper-wrapper {
+		width: 100%;
+		overflow: hidden;
+	}
+
+	.custom-swiper {
+		width: 100%;
+		height: 500rpx;
+	}
+
+	.item-container {
+		padding: 0 20rpx;
+	}
+
+	.swiper-item {
+		width: 100% !important;
+		height: 348rpx;
+		background: #FFFFFF;
+		box-shadow: 0rpx 12rpx 19rpx 2rpx rgba(219, 73, 22, 0.6);
+		border-radius: 24rpx;
+		border: 4rpx solid #FFCA96;
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		box-sizing: border-box;
+		padding: 20rpx 0;
+		transition: all 0.3s ease;
+	}
+
+	.swiper-item-active {
+		transition: all 0.5s ease;
+		height: 420rpx;
+		z-index: 10;
+	}
+
+	.item-image {
+		width: 280rpx;
+		height: 280rpx;
+	}
+
+	.item-text {
+		text-align: center;
+	}
+
+	.text-title {
+		font-weight: 500;
+		font-size: 32rpx;
+		color: #222222;
+		margin: 20rpx 0 10rpx;
+	}
+
+	.text-desc {
+		font-size: 24rpx;
+		color: #757575;
+	}
+</style>

+ 705 - 0
pages_course/components/commentBox.vue

@@ -0,0 +1,705 @@
+<template>
+	<view>
+		<template v-if="openCommentStatus==2">
+			<!-- <text v-for="(item, index) in activeDanmus" :key="item.commentId" class="danmu-item danmuMove"
+				:style="{
+				  top: item.top + 'px',
+				  ...item.style,
+				  'animation-duration': '8s'
+				 }" @animationend="animationend(item,index)">
+				{{ item.content }}
+			</text> -->
+		</template>
+		<view class="container-body" id="msglist" v-if="openCommentStatus==1">
+			<view class="listbox" v-for="(item, index) in msgs" :key="index" :id="'view' + index">
+				<text :class="userId&&item.userId == userId?'list-name my':'list-name'">
+					{{userId&&item.userId == userId ? '我' : item.nickName||'--'}}:
+				</text>
+				<text class="list-con">{{item.content||''}}</text>
+			</view>
+			<view class="empty" v-if="msgs&&msgs.length==0">暂无评论~</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import { saveMsg,revokeMsg,getComments} from "@/api/course.js"
+	export default {
+		props: {
+			height:{
+				type: String,
+				default:'0px'
+			},
+			urlOption:{
+				type: Object,
+				default:{}
+			},
+			time:{
+				type: [String,Number],
+				default: 0
+			},
+			viewCommentNum:{
+				type: [String,Number],
+				default: 200
+			},
+			openCommentStatus:{
+				type: [String,Number],
+				default: 3
+			},
+			//  用户自己开启关闭弹幕展示 1,展示弹幕,0 关闭的弹幕
+			showDanmu:{
+				type: [String,Number],
+				default: 1
+			},
+		},
+		data() {
+			return {
+				statusBarHeight: uni.getSystemInfoSync().statusBarHeight,
+				scrollTop: 0,
+				inputText:"",
+				isSocketOpen:false,
+				socket:null,
+				isSend:true,
+				commentList:[],
+				msgs: [],
+				pageNum: 1,
+				pageSize: 10,
+				userInfo: {},
+				userId: '',
+				pingpangTimes:null,
+				// 弹幕
+				danmuList: [],
+				tracks:[],
+				activeDanmus:[],
+				flagTime: 0,
+				danmuItemStyle:{
+					color: '#ffffff',
+					fontSize: '16px',
+					border: 'solid 1px #ffffff',
+					borderRadius: '5px',
+					padding: '2px 2px',
+					backgroundColor: 'rgba(255, 255, 255, 0.1)'
+				},
+				ctx: null,
+				danmuIndex:{}
+			}
+		},
+		mounted() {
+			this.getComments()
+			this.getUser();
+			this.initTracks()
+			if(!this.socket || !this.isSocketOpen) {
+				this.initSocket()
+			}
+		},
+		methods: {
+			back() {
+				uni.navigateBack()
+			},
+			getUser() {
+				const userInfo = uni.getStorageSync('userInfo');
+				if(userInfo&&JSON.stringify(userInfo)!='{}') {
+					this.userInfo = JSON.parse(userInfo)
+					this.userId = this.userInfo.userId || ''
+				}else {
+					this.userInfo = {}
+					this.userId = ''
+				}
+			},
+			getComments() {
+				let that = this
+				getComments({
+					pageNum: this.openCommentStatus==2 ? 1 : this.pageNum,
+					pageSize: this.openCommentStatus==2 ? this.viewCommentNum : this.pageSize,
+					courseId: this.urlOption.courseId,
+					videoId: this.urlOption.videoId,
+					openCommentStatus: this.openCommentStatus
+				}).then(res=>{
+					if(res.code==200){
+						if(this.openCommentStatus==2) {
+							this.danmuList = res.data.list.map(item=>({
+								commentId: item.commentId,
+								content: item.content,
+								time: item.time || this.time,
+								color: "#FFFFFF",
+								mode: item.mode || "scroll",
+								top: null,
+								style: {
+									color: item.isColor==1 ? item.color || this.danmuItemStyle.color : this.danmuItemStyle.color,//是否彩色1是0否
+									fontSize: item.fontSize || this.danmuItemStyle.fontSize, 
+									padding: this.danmuItemStyle.padding,
+									border:this.userInfo.userId ==item.userId ? item.color ? `solid 1px ${item.color}`: this.danmuItemStyle.border : 'none',
+									borderRadius: this.userInfo.userId==item.userId ? this.danmuItemStyle.borderRadius : 0,
+									backgroundColor: this.userInfo.userId==item.userId ? this.danmuItemStyle.backgroundColor : 'transparent'
+								},
+							}))
+							this.initDanmuIndex()
+							that.$emit('getMore',0)
+						} else if(this.openCommentStatus==1) {
+							this.danmuList = []
+							this.activeDanmus = []
+							this.danmuIndex = {};
+							let list = res.data.list.reverse()
+							if (that.pageNum == 1) {
+								that.commentList = list; 
+								that.handleScrollBottom();
+							} else {
+								that.commentList = that.commentList.concat(list);
+							}
+							that.msgs = [...list,...that.msgs]
+							if(that.commentList.length >= res.data.total || that.commentList.length >= Number(this.viewCommentNum||200)) {
+								that.$emit('getMore',1)
+							} else {
+								this.pageNum++
+								that.$emit('getMore',0)
+							}
+						} else {
+							that.danmuList = []
+							that.activeDanmus = []
+							that.danmuIndex = {};
+							that.commentList = [];
+							that.msgs = that.msgs;
+							that.$emit('getMore',0);
+						}
+					}
+					else{
+						that.danmuList = []
+						that.danmuIndex = {};
+						that.commentList = [];
+						that.msgs = that.msgs;
+						that.$emit('getMore',0);
+					}
+				})
+			},
+			saveMsg() {
+				if (this.inputText == "" || this.inputText.trim() == "") {
+					uni.showToast({
+						title: '请输入评论',
+						icon: "none"
+					})
+					return;
+				}
+				if (!this.isSend) {
+					return;
+				}
+				const param = {
+					userId: this.userId || '',
+					userType: 2, // 1-管理员,2-用户
+					courseId: this.urlOption.courseId,
+					videoId: this.urlOption.videoId,
+					type:1, // 评论类型 1:评论,2:回复,目前没有回复,默认传1就行了
+					content: this.inputText,
+					time: this.time,
+					fontSize: '16px',
+					mode: "scroll",
+					color: "#ffffff",
+				}
+				saveMsg(param).then(res=>{
+					if(res.code == 200) {
+						const status = res.status ? 0 : 1
+						this.sendMsg(param,status);
+					} else {
+						uni.showToast({
+							title: res.msg,
+							icon: "none"
+						})
+					}
+				})
+			},
+			handleInput(val) {
+				this.inputText = val
+				if(!this.isSocketOpen) {
+					// 重新发起会话
+					this.initSocket('reStart')
+				} else {
+					this.saveMsg();
+				}
+			},
+			handleScrollBottom() {
+				setTimeout(() => {
+					const query = uni.createSelectorQuery().in(this);
+					query.select('#msglist')
+						.boundingClientRect((res) => {
+							if(res) {
+								const scrollH = res.height;
+								this.scrollTop = res.height;
+								this.$emit('getScrollTop',this.scrollTop)
+							}
+						}).exec();
+				},500);
+			},
+			initSocket(type) { 
+				//创建一个socket连接
+				var userId = this.userInfo.userId;
+				var that = this;
+				if (this.socket) {
+					this.socket.close()
+					this.socket = null;
+				}
+				this.socket = uni.connectSocket({
+					url: getApp().globalData.wsUrl + "/app/webSocket/" + userId,
+					multiple: true,
+					success: res => {
+						console.log('WebSocket连接已打开1!');
+						that.isSocketOpen = true
+						// 保持心跳
+						if(that.pingpangTimes) {
+							clearInterval(that.pingpangTimes)
+							that.pingpangTimes= null
+						}
+						that.pingpangTimes=setInterval(()=>{
+							let data={
+								userId: that.userId || '',
+								userType: 2, // 1-管理员,2-用户
+								courseId: that.urlOption.courseId,
+								videoId: that.urlOption.videoId,
+								type:1, // 评论类型 1:评论,2:回复,目前没有回复,默认传1就行了
+								// msg: that.inputText,
+								cmd:'heartbeat'
+							};
+							that.socket.send({
+								data: JSON.stringify(data),
+								success: () => {
+									// console.log('WebSocket发送心条数据!');
+								},
+								fail: () => {
+									that.isSocketOpen=false
+								}
+							});
+						},15000)
+					},
+					error: res => {
+						console.log(res)
+					},
+				})
+				this.socket.onMessage((res) => {
+					// console.log("收到消息parse",JSON.parse(res.data))
+					const redata = JSON.parse(res.data);
+					if(redata.cmd=="heartbeat"){
+						  //心跳
+						  // console.log("heartbeat")
+					}else if(redata.cmd=="sendMsg"){
+						that.isSend=true;
+						that.addMsg(redata);
+					}
+				})
+				//监听socket打开
+				this.socket.onOpen(() => {
+					console.log('WebSocket连接已打开2!');
+					that.isSocketOpen = true
+					that.isSend = true;
+					if(type=='reStart') {
+						// 重连的时候重新发消息
+						this.saveMsg()
+					}
+				})
+				//监听socket关闭
+				this.socket.onClose(() => {
+					that.isSocketOpen = false
+					that.socket = null
+					console.log('WebSocket连接已关闭!');
+					if(that.pingpangTimes) {
+						clearInterval(that.pingpangTimes)
+						that.pingpangTimes= null
+					}
+				})
+				//监听socket错误
+				this.socket.onError((err) => {
+					console.log("socket err:",err)
+					that.isSocketOpen = false
+					that.socket = null
+					if(that.pingpangTimes) {
+						clearInterval(that.pingpangTimes)
+						that.pingpangTimes= null
+					}
+				})
+			},
+			sendMsg(param,status) {
+				if(status == 1) {
+					this.isSend = true;
+					this.addMsg({msg: param.content,time: param.time},2)
+					return
+				}
+				if (this.isSocketOpen) {
+					var userId = this.userInfo.userId;
+					var data = {
+						userId: this.userId || '',
+						userType: 2, // 1-管理员,2-用户
+						courseId: this.urlOption.courseId,
+						videoId: this.urlOption.videoId,
+						type:1, // 评论类型 1:评论,2:回复,目前没有回复,默认传1就行了
+						msg: param.content,
+						cmd: 'sendMsg',
+						time: param.time,
+						fontSize: '16px',
+						mode: "scroll",
+						color: "#ffffff",
+					};
+					this.socket.send({
+						data: JSON.stringify(data),
+						success: () => {
+							console.log("发送成功")
+							this.isSend = false;
+						},
+						fail: () => {
+							console.log("发送失败")
+						}
+					});
+			
+				}
+			
+			},
+			addMsg(data,type) {
+				let obj  = {}
+				if (type==2) {
+					obj = {
+						content: data.msg,
+						courseId: this.urlOption.courseId,
+						type: 1,
+						userId: this.userId,
+						userType: 2,
+						videoId: this.urlOption.videoId,
+						nickName: '',
+						time: data.time,
+						fontSize: data.fontSize,
+						mode: data.mode,
+						color: data.color,
+					}
+				} else {
+					obj = {
+						content: data.msg,
+						courseId: this.urlOption.courseId,
+						type: data.type,
+						userId: data.userId,
+						userType: data.userType,
+						videoId: this.urlOption.videoId,
+						nickName: data.nickName,
+						time: data.time,
+						fontSize: data.fontSize,
+						mode: data.mode,
+						color: data.color,
+					}
+				}
+				if(this.openCommentStatus == 1){
+					this.msgs.push(obj)
+					this.handleScrollBottom();
+				} else if(this.openCommentStatus == 2) {
+					this.addDanmuMsg(obj)
+				}
+				this.inputText = ""
+				this.$emit("setInputText")
+			},
+			addDanmuMsg(content) {
+				const id = content.userId +'_' + new Date().getTime()
+				const mystyle = {
+					color: content.color || this.danmuItemStyle.color,
+					fontSize: content.fontSize || this.danmuItemStyle.fontSize,
+					border: content.color ? `solid 1px ${content.color}`: this.danmuItemStyle.border,
+					borderRadius: this.danmuItemStyle.borderRadius,
+					padding: this.danmuItemStyle.padding,
+					backgroundColor: this.danmuItemStyle.backgroundColor
+				}
+				const otherstyle = {
+					color: content.color || this.danmuItemStyle.color,
+					fontSize: content.fontSize || this.danmuItemStyle.fontSize,
+					padding: this.danmuItemStyle.padding,
+				}
+				const mode = content.mode || "scroll"
+				const obj = {
+					commentId: content.commentId || id,
+					userId: content.userId,
+					content: content.content,
+					time: this.flagTime + 1,
+					color: content.color || this.danmuItemStyle.color,
+					style: this.userInfo.userId == content.userId ? mystyle : otherstyle,
+					top: null
+				}
+				if(this.showDanmu == 0) return
+
+				// 如果danmuList超过最大大小,移除旧的弹幕
+				const maxDanmuListSize = 10000; // 设置最大大小
+				if (this.danmuList.length >= maxDanmuListSize) {
+					this.danmuList.shift(); // 移除最旧的弹幕
+				}
+				this.danmuList.push(obj);
+			
+				// 更新索引
+				if (!this.danmuIndex[obj.time]) {
+					this.danmuIndex[obj.time] = [];
+				}
+				this.danmuIndex[obj.time].push(obj);
+			},
+			closeWSocket() {
+				if(this.socket!=null){
+					this.socket.close()
+				}
+				if(this.pingpangTimes) {
+					clearInterval(this.pingpangTimes)
+					this.pingpangTimes= null
+				}
+			},
+			initTracks() {
+				this.tracks = [];
+				const trackHeight = 22; // 每行高度
+				const trackCount = 3;
+				for (let i = 0; i < trackCount; i++) {
+					this.tracks.push({
+						top: i * trackHeight + 10,
+						isFree: true,
+						releaseTime: 0 // 轨道释放时间
+					});
+				}
+			},
+			// 获取字体高度
+			getTextWidth(content) {
+				if (!this.ctx) {
+					this.ctx = uni.createCanvasContext('myCanvas')
+				}
+				const metrics = this.ctx.measureText(content)
+				return Math.ceil(metrics.width)
+			},
+			// 分配轨道
+			getFreeTrack(item) {
+				const screenWidth = uni.getSystemInfoSync().screenWidth;
+				const width = this.getTextWidth(item.content);
+				const passWidth = width + screenWidth;
+				const duration = 8; // 持续时间(秒)
+				const currentTime = Date.now();
+			
+				for (let i = 0; i < this.tracks.length; i++) {
+					if (this.tracks[i].isFree || this.tracks[i].releaseTime <= currentTime) {
+						this.tracks[i].isFree = false;
+						this.tracks[i].releaseTime = currentTime + Math.ceil(duration * 1000 / passWidth * width) + 1000;
+						return this.tracks[i].top;
+					}
+				}
+			
+				// 无可用轨道
+				if (this.userInfo.userId && item.userId == this.userInfo.userId) {
+					// console.log("自己发的弹幕");
+					let trackHeight = this.tracks[this.tracks.length - 1].top;
+					return Math.random() * trackHeight + 16; // 自己发的弹幕随机高度
+				} else {
+					// console.log("无可用轨道");
+					return 'abandon';
+				}
+			},
+			// 初始化时建立索引
+			initDanmuIndex() {
+			    this.danmuIndex = {};
+			    this.danmuList.forEach((item) => {
+			        if (!this.danmuIndex[item.time]) {
+			            this.danmuIndex[item.time] = [];
+			        }
+			        this.danmuIndex[item.time].push(item);
+			    });
+			},
+			// 检测并激活弹幕
+			checkDanmu(flagTime) {
+				this.flagTime = flagTime;
+				if(this.showDanmu == 0) return;
+				const newDanmus = this.danmuList.filter((item) => Math.abs(item.time - this.flagTime) < 1);
+				// 分配轨道高度
+				const aliveNewDanmus = newDanmus.map((item) => {
+					if (!item.top) {
+						item.top = this.getFreeTrack(item);
+					}
+					return item;
+				}).filter((item) => item.top !== 'abandon');
+				// 添加到活跃列表
+				this.activeDanmus = [...this.activeDanmus, ...aliveNewDanmus];
+				this.$emit("getActiveDanmus",this.activeDanmus)
+			},
+			animationend(moveItem, i) {
+				// 移除动画结束的弹幕(性能优化)
+				this.activeDanmus = this.activeDanmus.filter((item) => item.commentId !== moveItem.commentId)
+				this.$emit("getActiveDanmus",this.activeDanmus)
+			},
+		},
+		beforeDestroy() {
+			if(this.socket!=null){
+				this.socket.close()
+			}
+			if(this.pingpangTimes) {
+				clearInterval(this.pingpangTimes)
+				this.pingpangTimes= null
+			}
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	@mixin u-flex($flexD, $alignI, $justifyC) {
+		display: flex;
+		flex-direction: $flexD;
+		align-items: $alignI;
+		justify-content: $justifyC;
+	}
+	.empty {
+		@include u-flex(row, center, center);
+		padding: 24rpx 50rpx;
+		color: #999999;
+	}
+	.listbox {
+		white-space: pre-wrap;
+		letter-spacing: 1px;
+		margin-bottom: 16rpx;
+	}
+	.list-name {
+		flex-shrink: 0;
+		font-family: PingFang SC, PingFang SC;
+		font-weight: 600;
+		font-size: 28rpx;
+		color: #222222;
+		margin-right: 16rpx;
+	}
+	.my {
+		color: #FF5C03;
+	}
+	.list-con {
+		font-family: PingFang SC, PingFang SC;
+		font-size: 28rpx;
+		color: #222222;
+	}
+	.nav-bar {
+		position: fixed;
+		z-index: 9999;
+		top: 0;
+		left: 0;
+		width: 100%;
+		overflow: hidden;
+
+		.nav-bg {
+			width: 100%;
+			height: 100%;
+			position: absolute;
+			left: 0;
+			top: 0;
+			z-index: 1;
+			background-color: #fff;
+		}
+
+		&-box {
+			position: relative;
+			padding: 0 24rpx;
+			@include u-flex(row, center, flex-start);
+			height: 88rpx;
+			box-sizing: border-box;
+			z-index: 3;
+		}
+
+		&-left {
+			width: 100%;
+			@include u-flex(row, center, flex-start);
+			overflow: hidden;
+
+			image {
+				flex-shrink: 0;
+				width: 64rpx;
+				height: 64rpx;
+				border-radius: 12rpx 12rpx 12rpx 12rpx;
+			}
+		}
+
+		&-name {
+			font-family: PingFang SC, PingFang SC;
+			font-weight: 600;
+			font-size: 28rpx;
+			color: #222222;
+		}
+
+		&-head {
+			flex: 1;
+			overflow: hidden;
+			margin-left: 22rpx;
+			margin-right: 22rpx;
+			font-family: PingFang SC, PingFang SC;
+			font-weight: 400;
+			font-size: 23rpx;
+			color: #999999;
+		}
+	}
+
+	.page-bg {
+		position: absolute;
+		top: 0;
+		left: 0;
+	}
+
+	.container-body {
+		padding: 32rpx 30rpx;
+		box-sizing: border-box;
+	}
+
+	.TUI-message-list {
+		width: 100%;
+		box-sizing: border-box;
+	}
+	.chatinput {
+		position: fixed;
+		left: 32rpx;
+		right: 32rpx;
+		z-index: 999;
+		bottom: calc(var(--window-bottom) + 24rpx);
+		height: 96rpx;
+		background-color: green;
+		background: #FFFFFF;
+		box-shadow: 0rpx 8rpx 21rpx 0rpx rgba(0, 0, 0, 0.1);
+		border-radius: 24rpx 24rpx 24rpx 24rpx;
+		@include u-flex(row, center, center);
+		padding: 0 24rpx;
+		box-sizing: border-box;
+		.uni-input {
+			flex: 1;
+			margin-right: 32rpx;
+			font-size: 30rpx;
+		}
+	
+		.send {
+			font-family: PingFang SC, PingFang SC;
+			font-weight: 400;
+			font-size: 28rpx;
+			color: #FFFFFF !important;
+			flex-shrink: 0;
+			padding: 0 20rpx;
+			height: 72rpx;
+			background: #FF5C03 !important;
+			border-radius: 8rpx 8rpx 8rpx 8rpx;
+			&::after {
+				border: none;
+			}
+		}
+	}
+	// .danmu-item {
+	// 	position: absolute;
+	// 	top: 0;
+	// 	white-space: nowrap;
+	// 	font-size: 16px;
+	// 	height: 20px;
+	// 	display: inline-flex;
+	// 	box-sizing: border-box;
+	// 	align-items: center;
+	// }
+	// .danmuMove {
+	// 	// animation: mymove 8s linear forwards;
+	// 	// animation-duration: 8s;
+	// 	animation-timing-function: linear;
+	// 	animation-delay: 0s;
+	// 	animation-iteration-count: 1;
+	// 	animation-direction: normal;
+	// 	animation-fill-mode: forwards;
+	// 	animation-play-state: running;
+	// 	animation-name: mymove;
+	// 	will-change: transform;
+	// }
+	
+	// @keyframes mymove {
+	// 	from {
+	// 		transform: translateX(100vw);
+	// 	}
+	
+	// 	to {
+	// 		transform: translateX(-100%);
+	// 	}
+	// }
+</style>

+ 158 - 0
pages_course/components/descInfo.vue

@@ -0,0 +1,158 @@
+<template>
+	<view class="descbox" >
+		<template v-if="!isLogin||isAddKf!=1">
+			<view class="descbox-title">{{courseInfo.title||''}}</view>
+			<view class="descbox-info">
+				<!-- <view class="descbox-info-l">
+					<view>{{courseInfo.views}}次播放</view>
+					<view class="descbox-info-time">总时长:{{courseInfo.totalDuration}}</view>
+				</view> -->
+				<view class="descbox-info-r expand" v-if="textHeight > 21">
+					<text @click="handleExpand">{{isExpand ? '收起简介' : '展开简介'}}</text>
+					<image :src="baseUrl+'/app/image/course_arrow_up_icon.png'" v-show="isExpand"></image>
+					<image :src="baseUrl+'/app/image/course_arrow_down_icon.png'" v-show="!isExpand"></image>
+				</view>
+			</view>
+		</template>
+		<view class="descbox-desc" id="descbox-desc" :style="{height: isExpand ? 'auto': '42rpx'}">
+			<text>{{courseInfo.description||''}}</text>
+			<view :class="isExpand ? 'expand': 'expand expand-ab'" v-if="isLogin&&isAddKf==1&&textHeight > 21">
+				<text @click="handleExpand">{{isExpand ? '收起简介' : '展开简介'}}</text>
+				<image :src="baseUrl+'/app/image/course_arrow_up_icon.png'" v-show="isExpand"></image>
+				<image :src="baseUrl+'/app/image/course_arrow_down_icon.png'" v-show="!isExpand"></image>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		props: {
+			isLogin: {
+				type: Boolean,
+				default: false,
+			},
+			isAddKf: {
+				type: [String,Number],
+				default: 0,
+			},
+			courseInfo: {
+				type: Object,
+				default: {},
+			},
+		},
+		data() {
+			return {
+				baseUrl:uni.getStorageSync('requestImagesPath'),
+				// 是否展开
+				isExpand: true,
+				textHeight: 0, //文本高度
+			}
+		},
+		methods: {
+			// 展开简介
+			handleExpand() {
+				this.isExpand = !this.isExpand
+			},
+			getDescHeight() {
+				this.$nextTick(() => {
+					const query = uni.createSelectorQuery().in(this);
+					query
+						.select("#descbox-desc")
+						.boundingClientRect((data) => {
+							if(data) {
+								this.textHeight = data.height
+							}
+						})
+						.exec();
+				})
+			},
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	@mixin u-flex($flexD, $alignI, $justifyC) {
+		display: flex;
+		flex-direction: $flexD;
+		align-items: $alignI;
+		justify-content: $justifyC;
+	}
+	.descbox {
+		padding: 20rpx 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 {
+			padding: 24rpx 0;
+			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;
+	}
+	
+</style>

+ 202 - 0
pages_course/components/descInfoNav.vue

@@ -0,0 +1,202 @@
+<template>
+	<view style="background-color: #fff;padding-bottom: 116rpx;">
+		<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>
+		<view class="descbox" >
+			<template v-if="!isLogin||isAddKf!=1">
+				<view class="descbox-title">{{courseInfo.title|| ''}}</view>
+				<view class="descbox-info">
+					<!-- <view class="descbox-info-l">
+						<view>{{courseInfo.views}}次播放</view>
+						<view class="descbox-info-time">总时长:{{courseInfo.totalDuration}}</view>
+					</view> -->
+					<view class="descbox-info-r expand" v-if="textHeight > 21">
+						<text @click="handleExpand">{{isExpand ? '收起简介' : '展开简介'}}</text>
+						<image :src="baseUrl+'/app/image/course_arrow_up_icon.png'" v-show="isExpand"></image>
+						<image :src="baseUrl+'/app/image/course_arrow_down_icon.png'" v-show="!isExpand"></image>
+					</view>
+				</view>
+			</template>
+			<view class="descbox-desc" id="descbox-desc" :style="{height: isExpand ? 'auto': '42rpx'}">
+				<text>{{courseInfo.description|| ''}}</text>
+				<view :class="isExpand ? 'expand': 'expand expand-ab'" v-if="isLogin&&isAddKf==1&&textHeight > 21">
+					<text @click="handleExpand">{{isExpand ? '收起简介' : '展开简介'}}</text>
+					<image :src="baseUrl+'/app/image/course_arrow_up_icon.png'" v-show="isExpand"></image>
+					<image :src="baseUrl+'/app/image/course_arrow_down_icon.png'" v-show="!isExpand"></image>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		props: {
+			isLogin: {
+				type: Boolean,
+				default: false,
+			},
+			isAddKf: {
+				type: [String,Number],
+				default: 0,
+			},
+			courseInfo: {
+				type: Object,
+				default: {},
+			},
+		},
+		data() {
+			return {
+				baseUrl:uni.getStorageSync('requestImagesPath'),
+				// 是否展开
+				isExpand: true,
+				textHeight: 0, //文本高度
+			}
+		},
+		methods: {
+			// 展开简介
+			handleExpand() {
+				this.isExpand = !this.isExpand
+			},
+			getDescHeight() {
+				this.$nextTick(() => {
+					const query = uni.createSelectorQuery().in(this);
+					query
+						.select("#descbox-desc")
+						.boundingClientRect((data) => {
+							if(data){
+								this.textHeight = data.height
+							}
+						})
+						.exec();
+				})
+			},
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	@mixin u-flex($flexD, $alignI, $justifyC) {
+		display: flex;
+		flex-direction: $flexD;
+		align-items: $alignI;
+		justify-content: $justifyC;
+	}
+	.miantitlebox {
+		padding: 30rpx 32rpx;
+		font-family: PingFang SC, PingFang SC;
+		font-weight: 500;
+		font-size: 36rpx;
+		color: #222222;
+	}
+	.subtitlebox {
+		padding: 30rpx 0;
+		font-family: PingFang SC, PingFang SC;
+		font-weight: 500;
+		font-size: 36rpx;
+		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: 14rpx 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;
+	}
+	
+</style>

+ 255 - 0
pages_course/components/like.vue

@@ -0,0 +1,255 @@
+<template>
+	<view class="like-container">
+		<image class="image" @click="handleLike" src="/static/images/like.png" ref="likeBtn"></image>
+		<view v-for="(icon, index) in icons" :key="icon.id" class="animated-icon" :style="{
+        top: icon.top + 'rpx',
+        left: icon.left + 'rpx',  // 补充left属性的单位
+        fontSize: icon.size + 'rpx',
+        color: icon.color,
+        opacity: icon.opacity,
+        transform: 'translateY(' + icon.y + 'rpx) rotate(' + icon.rotate + 'deg)',
+        transition: 'all ' + icon.duration + 'ms ' + icon.delay + 'ms ease-out'
+      }">
+			{{ icon.symbol }}
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		name: 'DouyinLike',
+		props: {
+			// 初始点赞数
+			initialCount: {
+				type: Number,
+				default: 0
+			},
+			// 单次点击生成的图标数量
+			iconAmount: {
+				type: Number,
+				default: 6
+			},
+			// 图标颜色集合
+			iconColors: {
+				type: Array,
+				default: () => [
+					'#ff6082', '#ffb92b', '#ffaefb',
+					'#87f37f', '#6eb9ff', '#6d86d6',
+					'#ab71de', '#ff4b84'
+				]
+			},
+			// 图标大小范围
+			sizeRange: {
+				type: Array,
+				default: () => [40, 78]
+			},
+			// 动画持续时间范围(ms)
+			durationRange: {
+				type: Array,
+				default: () => [700, 1300]
+			},
+			// 上升距离范围(px)
+			riseRange: {
+				type: Array,
+				default: () => [200, 420]
+			},
+			// 左右飘动范围(px)
+			floatRange: {
+				type: Array,
+				default: () => [-50, 50]
+			}
+		},
+		data() {
+			return {
+				// 当前点赞数
+				count: this.initialCount,
+				// 是否已点赞
+				isLiked: false,
+				// 动画图标数组
+				icons: [],
+				// 按钮位置信息
+				btnRect: null,
+				// 可使用的图标集合
+				iconSymbols: ['❤', '★', '🎁', '🔥', '👍', '✨', '💖', '🌟'],
+				// 用于生成唯一ID
+				iconId: 0
+			};
+		},
+		mounted() {
+			// 获取按钮位置信息
+			this.getBtnRect();
+		},
+		methods: {
+			/**
+			 * 获取按钮位置信息
+			 */
+			getBtnRect() {
+				const query = uni.createSelectorQuery().in(this);
+				query.select('.image').boundingClientRect(data => {
+					this.btnRect = data;
+				}).exec();
+			},
+
+			/**
+			 * 处理点击事件
+			 */
+			handleLike(e) {
+				// 更新点赞状态
+				this.isLiked = !this.isLiked;
+				this.count += this.isLiked ? 1 : -1;
+				this.$emit('change', {
+					isLiked: this.isLiked,
+					count: this.count
+				});
+
+				// 生成图标动画
+				this.createIcons(e);
+			},
+
+			/**
+			 * 创建多个图标动画
+			 */
+			createIcons(e) {
+				if (!this.btnRect) {
+					this.getBtnRect();
+					return;
+				}
+
+				// 获取点击位置(相对于按钮)
+				const rect = this.btnRect;
+				const x = e.detail.x - rect.left;
+				const y = e.detail.y - rect.top;
+
+				// 生成多个图标,带轻微延迟形成连续效果
+				for (let i = 0; i < this.iconAmount; i++) {
+					this.createIcon(x, y, i * 40);
+				}
+			},
+
+			/**
+			 * 创建单个图标动画
+			 * @param {Number} x 初始X坐标
+			 * @param {Number} y 初始Y坐标
+			 * @param {Number} delay 延迟时间(ms)
+			 */
+			createIcon(x, y, delay) {
+				// 随机属性
+				const size = this.getRandom(...this.sizeRange);
+				const color = this.iconColors[Math.floor(Math.random() * this.iconColors.length)];
+				const duration = this.getRandom(...this.durationRange);
+				const riseDistance = -this.getRandom(...this.riseRange);
+				const floatOffset = this.getRandom(...this.floatRange);
+				const rotate = this.getRandom(-30, 30);
+				// 随机选择一个图标
+				const symbol = this.iconSymbols[Math.floor(Math.random() * this.iconSymbols.length)];
+
+				// 生成唯一ID
+				const iconId = this.iconId++;
+
+				// 创建图标对象
+				const icon = {
+					id: iconId,
+					left: x,
+					top: y,
+					size,
+					color,
+					opacity: 1,
+					y: 0,
+					rotate,
+					duration,
+					delay,
+					symbol
+				};
+
+				// 添加到数组
+				this.icons.push(icon);
+
+				// 触发动画
+				setTimeout(() => {
+					// 使用Vue的$set方法确保响应式更新
+					this.$set(this.icons, this.icons.findIndex(item => item.id === iconId), {
+						...this.icons.find(item => item.id === iconId),
+						y: riseDistance,
+						left: x + floatOffset,
+						opacity: 0
+					});
+				}, delay);
+
+				// 动画结束后移除
+				setTimeout(() => {
+					const index = this.icons.findIndex(item => item.id === iconId);
+					if (index !== -1) {
+						this.icons.splice(index, 1);
+					}
+				}, duration + delay);
+			},
+
+			/**
+			 * 生成范围内的随机数
+			 */
+			getRandom(min, max) {
+				return min + Math.random() * (max - min);
+			}
+		}
+	};
+</script>
+
+<style scoped lang="scss">
+	.like-container {
+		position: relative;
+	}
+
+	.image {
+		width: 72rpx;
+		height: 72rpx;
+	}
+
+	.like-icon {
+		font-size: 28rpx;
+		color: #999;
+		transition: all 0.3s ease;
+	}
+
+	/* 动画容器 */
+	.like-container {
+		/* position: absolute;
+  top: 0;
+  left: 0;
+  width: 100%;
+  height: 100%;
+  pointer-events: none;
+  overflow: visible; */
+		position: relative;
+
+		.image {
+			width: 72rpx;
+			height: 72rpx;
+		}
+
+		/* 动画图标样式 */
+		.animated-icon {
+			position: absolute;
+			will-change: transform, opacity, left;
+			text-shadow: 0 1rpx 2rpx rgba(0, 0, 0, 0.2);
+			z-index: 10;
+			animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
+		}
+	/* 点赞按钮动画 */
+	@keyframes pulse {
+		0% {
+			transform: scale(1);
+		}
+
+		50% {
+			transform: scale(1.4);
+		}
+
+		100% {
+			transform: scale(1);
+		}
+	}
+	}
+
+
+
+</style>

+ 135 - 0
pages_course/components/ques.vue

@@ -0,0 +1,135 @@
+<template>
+	<view class="ques-content">
+		<view class="ques-content-tit" v-show="openCommentStatus!=1">问答题</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>{{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,index)">
+				<view>
+					{{numberToLetter(idx)}}.
+				</view>
+				<view>{{option.name}}</view>
+			</view>
+		</view>
+		<view class="empty" v-if="quesList&&quesList.length==0">暂未设置题目~</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		props: ['quesList','openCommentStatus'],
+		data() {
+			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
+					}
+				}
+			}
+		},
+		methods: {
+			numberToLetter(num) {
+				// 将数字转换为字母的 ASCII 码
+				let letterCode = num + 65;
+				// 将 ASCII 码转换为大写字母
+				let letter = String.fromCharCode(letterCode);
+				return letter;
+			},
+			handleAnswer(item, option,index) {
+				const param = {
+					item,
+					option,
+					index
+				}
+				this.$emit("handleAnswer", param)
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	@mixin u-flex($flexD, $alignI, $justifyC) {
+		display: flex;
+		flex-direction: $flexD;
+		align-items: $alignI;
+		justify-content: $justifyC;
+	}
+	.empty {
+		@include u-flex(row, center, center);
+		padding: 24rpx 50rpx;
+		color: #999999;
+	}
+	.ques-content {
+		background-color: #fff;
+		padding: 24rpx 32rpx 24rpx 32rpx;
+		box-sizing: border-box;
+		font-family: PingFang SC, PingFang SC;
+		font-weight: 400;
+		font-size: 28rpx;
+		color: #222222;
+	}
+
+	.ques-content-tit {
+		font-family: PingFang SC, PingFang SC;
+		font-weight: 600;
+		font-size: 36rpx;
+		color: #222222;
+	}
+
+	.ques-title {
+		margin: 48rpx 0 34rpx 0;
+		font-weight: 500;
+		font-size: 32rpx;
+		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;
+		}
+	}
+</style>

+ 160 - 0
pages_course/courseCover.vue

@@ -0,0 +1,160 @@
+<template>
+	<view class="w100" style="width: 100%;">
+		<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>
+			<image  class="video-poster" :src="courseInfo.imgUrl" mode="aspectFill">
+			<view class="title-content" id="title-content">
+				<!-- 答题时展示小节课程名,其他展示课程名 -->
+				<!-- 小节课程名 -->
+				<view class="subtitlebox " >
+					{{courseInfo.title}}
+				</view>
+				<!-- 课程名字 -->
+				<view class="base-color-6 fs24">
+					{{courseInfo.courseName}}
+				</view>
+			</view>
+		</view>
+		<view class="btns">
+			<view class="author-btn" @click="comecourse">进入课程</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		getH5CourseByVideoId,
+	} from "@/api/courseLook.js"
+	export default{
+		data(){
+			return{
+				videoId:3450,
+				courseInfo:'',
+				projectCode:'',
+				sendType:'',
+				courselist:{},
+				statusBarHeight: uni.getSystemInfoSync().statusBarHeight,
+			}
+		},
+		onLoad(option) {
+			console.log(option)
+			const keys = decodeURIComponent(Object.keys(option)[0]);
+			this.courselist=JSON.parse(keys.split('course=')[1])
+			this.videoId=this.courselist.videoId
+			this.projectCode=this.courselist.projectCode
+			console.log(keys)
+			console.log(this.courselist)
+			// if(this.videoId){
+			// 	this.getH5CourseByVideo()
+			// }
+		},
+		onShow() {
+			this.getHeight()
+			this.utils.getDomain({projectCode:this.projectCode}).then(res=>{
+				if(res.code == 200) {
+					if (this.videoId) {
+						this.sendType=uni.getStorageSync('sendType')
+						this.getH5CourseByVideo()
+						// this.utils.getConfigKey()
+					}
+				}
+			})
+		},
+		methods:{
+			getHeight() {
+				this.$nextTick(() => {
+					const query = uni.createSelectorQuery().in(this);
+					query
+						.select("#title-content")
+						.boundingClientRect((data) => {
+							this.height =
+								`calc(100vh - ${data.height}px - 420rpx - ${this.statusBarHeight}px - 120rpx )`
+						})
+						.exec();
+				})
+			},
+			comecourse(){
+				if(this.sendType==1){
+					uni.navigateTo({
+						url:'/pages_course/videovip?course='+JSON.stringify(this.courselist)
+					})
+				}else{
+					
+				}
+				
+			},
+			getH5CourseByVideo() {
+				const data={
+					videoId:this.videoId
+				}
+				getH5CourseByVideoId(data).then(res=>{
+					if (res.code == 200) {
+						this.courseInfo = res.data
+						uni.setNavigationBarTitle({
+							title: this.courseInfo && this.courseInfo.title ? this.courseInfo.title : ''
+						});
+					}else{
+						
+					}
+				})
+			},
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.header-nav {
+		height: 88rpx;
+		// @include u-flex(row, center, flex-start);
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		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 0rpx;
+			font-family: PingFang SC,PingFang SC;
+			font-weight: 500;
+			font-size: 15px;
+			color: #000;
+			box-sizing: border-box;
+		}
+	}
+	.video-poster{
+		width: 100%;
+	}
+	.title-content{
+		padding: 20rpx;
+		.subtitlebox{
+			font-size: 32rpx;
+			font-weight: bold;
+		}
+	}
+	.btns{
+		position: fixed;
+		padding: 40rpx 20rpx;
+		bottom: 0;
+		width: calc(100% - 40rpx);
+	}
+	.author-btn{
+			z-index:100;
+			width: 100%;
+			height: 80rpx;
+			background: #ff5c03;
+			border-radius: 40rpx;
+			font-size: 36rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			text-align: center;
+			line-height: 80rpx;
+			color: rgba(255, 255, 255, 1);
+		}
+</style>

+ 472 - 0
pages_course/feedback.vue

@@ -0,0 +1,472 @@
+<template>
+	<view>
+		<view class="header-nav" :style="{height: `calc(88rpx + ${statusBarHeight}px)`,paddingTop: statusBarHeight + 'px'}">
+			<view class="arrow-left" :style="{top: statusBarHeight + 'px'}" @click="goBack">返回</view>
+			<view class="header-title" :style="{height:menuButtonH+'px',lineHeight:menuButtonH+'px'}">投诉反馈</view>
+		</view>
+		<view class="container" :style="{paddingTop: `calc(88rpx + ${statusBarHeight}px)`}">
+			<view class="formbox" v-if="isLastChild==1">
+				<view class="formbox-title">{{ text }}</view>
+				<view class="form">
+					<u-form labelPosition="top" labelWidth='auto' :model="formdata" :rules="rules" ref="uForm" errorType="toast">
+						<u-form-item label=" " prop="complaintContent">
+							<u--textarea v-model="formdata.complaintContent" border="none" :clearable="true" placeholder="请填写反馈内容" count maxlength='200'></u--textarea>
+						</u-form-item>
+						<view class="box">
+							<u-form-item label="图片(最多9张)">
+								<view class="imgitem">
+									<u-upload
+										:fileList="fileList1"
+										@afterRead="afterRead"
+										@delete="deletePic"
+										name="1"
+										:maxCount="9"
+									></u-upload>
+								</view>
+							</u-form-item>
+						</view>
+					</u-form>
+				</view>
+				<view class="footer-btn">
+					<button class="submit-btn" @click="submit">提交</button>
+					<!-- <button class="submit-btn back-btn" @click="goBack">返回</button> -->
+				</view>
+			</view>
+			<view class="container" v-else>
+				<view class="list-item title">请选择反馈类型</view>
+				<view class="list-item" v-for="(item, index) in feedbackItems" :key="index"
+					@click="handleClick(item,index)">
+					<view>{{ item.complaintTypeName }}</view>
+					<uni-icons type="right" size="20" color="rgba(0,0,0,.3)" v-if="isLastChild==0"></uni-icons>
+				</view>
+				<view class="list-item" v-if="pageIndex!=0&&isLastChild==0" @click="goBack">
+					返回上一层
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import{ getTypeTree, complaintRecord,loginByMp } from "@/api/course.js"
+	export default {
+		data() {
+			return {
+				statusBarHeight: uni.getSystemInfoSync().statusBarHeight,
+				menuButtonH: 45,
+				pageIndex: 0,
+				list: [],
+				feedbackItems: [],
+				userId: '',
+				courseId: '',
+				videoId: '',
+				formdata: {
+					complaintContent: ""
+				},
+				rules: {
+					complaintContent:[{
+						required: true,
+						message: '投诉反馈内容不能为空',
+						trigger: ["change", "blur"]
+					}]
+				},
+				text: '',
+				templateId: 0,
+				user: {},
+				isLastChild: 0,
+				isLogin: false,
+				fileList1: [],
+				projectCode:'',
+				code:''
+			};
+		},
+		onLoad(option) {
+			this.userId = option.userId || ''
+			this.courseId = option.courseId || ''
+			this.videoId = option.videoId || ''
+			this.projectCode = option.projectCode || ''
+			uni.$on('usercode',(data)=>{
+				if(data) {
+					this.code=data.code
+					this.goLogin(data)
+				}
+			})
+			this.utils.getDomain({projectCode:this.projectCode}).then(res=>{
+				if(res.code == 200) {
+					uni.setStorageSync('addressUrl',res.addressUrl)
+					this.utils.isLoginCourseAuto().then(
+						res => {
+							if(res){
+								this.isLogin = true
+								this.getMenuButton()
+								this.getList()
+							} else{
+								this.isLogin = false
+								this.goLogin()
+							}
+						},
+						rej => {}
+					);
+				}
+			})
+		},
+		onUnload() {
+			uni.$off('usercode')
+		},
+		methods: {
+			getMenuButton(){
+				const menuButtonInfo = uni.getMenuButtonBoundingClientRect()
+				this.menuButtonH = menuButtonInfo.height
+			},
+			goBack() {
+				// 返回上一层逻辑
+				if (this.pageIndex == 0) {
+					uni.navigateBack();
+				} else {
+					this.pageIndex--;
+					this.formdata = {
+						complaintContent: ""
+					}
+					if (this.isLastChild == 1) {
+						this.isLastChild = 0
+					} else {
+						if (this.pageIndex == 0) {
+							this.feedbackItems = this.list
+							this.templateId = 0
+						} else {
+							const list = this.findGrandparentOrAllData(this.list, this.templateId)
+							this.feedbackItems = list.childrenType
+							this.templateId = list.complaintTypeId
+						}
+					}
+				
+				}
+			},
+			findGrandparentOrAllData(data, targetId) {
+				// 递归函数,用于查找目标节点的父级节点
+				function findParent(node, targetId) {
+					if (!node || !node.childrenType) return null;
+			
+					for (let child of node.childrenType) {
+						if (child.complaintTypeId === targetId) {
+							return node; // 找到目标节点的父级节点
+						}
+			
+						const result = findParent(child, targetId); // 递归查找子节点
+						if (result) return result;
+					}
+			
+					return null;
+				}
+			
+				// 遍历顶层节点,查找目标节点的父级和祖父级节点
+				for (let root of data) {
+					if (root.complaintTypeId === targetId) {
+						return data; // 如果目标节点是顶层节点,返回所有数据
+					}
+			
+					const parent = findParent(root, targetId); // 查找目标节点的父级节点
+					if (parent) {
+						const grandparent = findParent(root, parent.complaintTypeId); // 查找父级节点的父级节点
+						return grandparent || data; // 如果找到祖父节点返回祖父节点,否则返回所有数据
+					}
+				}
+			
+				return data; // 如果没有找到目标节点,返回所有数据
+			},
+			handleClick(item,index) {
+				if (this.isLastChild == 1) return
+				if (this.pageIndex >= 0) {
+					this.pageIndex++
+					let children = this.feedbackItems[index].childrenType || [];
+					this.templateId = this.feedbackItems[index].complaintTypeId
+					this.formdata = {
+						complaintContent: ""
+					}
+					this.text = this.feedbackItems[index].complaintTypeName
+					if (children.length > 0) {
+						this.isLastChild = 0
+						this.feedbackItems = children
+						this.templateId = this.feedbackItems[0].complaintTypeId
+					} else {
+						this.isLastChild = 1
+						this.formdata = {
+							complaintContent: ""
+						}
+						setTimeout(() => {
+							this.$refs.uForm.setRules(this.rules)
+						}, 200)
+					}
+				}
+			},
+			getList(){
+				getTypeTree().then(res=>{
+					if(res.code == 200) {
+						this.list = res.data
+						this.pageIndex = 0
+						this.feedbackItems = this.list
+					}
+				})
+			},
+			submit() {
+				if(this.fileList1.some(item=>item.status == 'uploading')) {
+					uni.showToast({
+						title: '等待图片上传中',
+						icon: 'none'
+					})
+					return
+				}
+				var images=[];
+				this.fileList1.forEach(function(element) {
+					images.push(element.url)
+				});
+				this.$refs.uForm.validate().then(res => {
+					if (res) {
+						const param = {
+							userId: this.userId,
+							complaintTypeId: this.templateId,
+							complaintContent: this.formdata.complaintContent,
+							courseId: this.courseId,
+							videoId: this.videoId,
+							complaintUrl: images.toString()
+						}
+						complaintRecord(param).then(res=>{
+							uni.showModal({
+								title: '',
+								content: '我们已收到您的反馈,谢谢',
+								showCancel: false,
+								success: function (res) {
+									if (res.confirm) {
+										uni.navigateBack()
+									} else if (res.cancel) {
+										uni.navigateBack()
+									}
+								}
+							});
+						})
+					}
+				})
+			},
+			deletePic(event) {
+				this[`fileList${event.name}`].splice(event.index, 1)
+			},
+			async afterRead(event) {
+				// 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
+				let lists = [].concat(event.file)
+				let fileListLen = this[`fileList${event.name}`].length
+				lists.map((item) => {
+					this[`fileList${event.name}`].push({
+						...item,
+						status: 'uploading',
+						message: '上传中'
+					})
+				})
+				for (let i = 0; i < lists.length; i++) {
+					const result = await this.uploadFilePromise(lists[i].url)
+					let item = this[`fileList${event.name}`][fileListLen]
+					this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
+						status: 'success',
+						message: '',
+						url: result
+					}))
+					fileListLen++
+				}
+			},
+			uploadFilePromise(url) {
+				const projectCode = uni.getStorageSync('projectCode')
+				return new Promise((resolve, reject) => {
+					let a = uni.uploadFile({
+						url: uni.getStorageSync('addressUrl_'+projectCode)+ '/app/common/uploadOSS', // 仅为示例,非真实的接口地址
+						filePath: url,
+						name: 'file',
+						success: (res) => {
+							setTimeout(() => {
+								console.log(JSON.parse(res.data).url)
+								resolve(JSON.parse(res.data).url)
+							}, 1000)
+						}
+					});
+				})
+			},
+			goLogin(data) {
+				if(!this.projectCode){
+					uni.showToast({
+						title: '链接有误',
+						icon: 'none'
+					});
+					return
+				} 
+				this.loginFsUserWx(data)
+				return
+				this.utils.getProvider().then(provider=>{
+					console.log('当前的环境商',provider)
+					if (!provider) {
+					  reject()
+					}
+					uni.login({
+						provider: provider,
+						success: async loginRes => {
+							console.log(loginRes)
+							uni.getUserInfo({
+							   provider: provider,
+							   success: (infoRes)=> {
+								    uni.showToast({
+										title: '处理中...',
+										icon: 'loading'
+								    });
+									loginByMp({code: loginRes.code,encryptedData:infoRes.encryptedData,iv:infoRes.iv,appId:getApp().globalData.appId}).then(res=>{
+										 uni.hideLoading();
+										 if (res.code == 200) {
+											uni.setStorageSync(this.utils.TOKEN_KEYAuto, res.token);
+											uni.setStorageSync('auto_userInfo', JSON.stringify(res.user));
+											this.userId = res.user.userId || ''
+											this.isLogin = true
+											this.getMenuButton()
+											this.getList()
+										 } else {
+											uni.showToast({
+												title: res.msg,
+												icon: 'none'
+											});
+										 }
+									 }).catch(err=>{
+										uni.hideLoading();
+										uni.showToast({
+											icon:'none',
+											title: "登录失败,请重新登录",
+										});
+									});
+							   }
+							});
+						}
+					})
+				}).catch(err => {})
+			},
+			// H5授权绑定关系
+			async loginFsUserWx(data){
+				if(data){
+					let token = uni.getStorageSync('TOKEN_WEXIN');
+					let user = uni.getStorageSync('userInfo')
+					
+					uni.setStorageSync(this.utils.TOKEN_KEYAuto, token);
+					uni.setStorageSync('auto_userInfo', JSON.stringify(user));
+					this.userId = user.userId || ''
+					this.isLogin = true
+					this.getMenuButton()
+					this.getList()
+				}else{
+					uni.setStorageSync('H5course',{
+						companyId: this.urlOption.companyId,
+						companyUserId:this.urlOption.companyUserId,
+						type: 1, //1自动,其他手动
+					})
+					uni.showLoading({ title: '加载中' });
+										
+					try {
+					  await this.utils.getDomain({ projectCode: this.projectCode}); // code 换成你的业务标识
+					  await this.utils.getConfigKey();
+					  uni.navigateTo({
+					  	url:'/pages_course/webview?H5course='+uni.getStorageSync('H5course')
+					  })
+					} catch (err) {
+					  console.error('初始化失败', err);
+					  uni.showToast({ title: '请求失败', icon: 'none' });
+					} finally {
+					  uni.hideLoading();
+					}
+				}
+			}
+		}
+	};
+</script>
+
+<style scoped lang="scss">
+	.container {
+		background-color: #fff;
+	}
+	.formbox-title {
+		padding-bottom: 30rpx;
+		border-bottom: 1px solid #f4f4f4;
+	}
+	.formbox {
+		border-top: 1px solid #f4f4f4;
+		padding: 30rpx;
+	}
+	.box {
+		padding-bottom: 24rpx;
+		border-top: 1px solid #f4f4f4;
+		.imgitem {
+			padding-top: 20rpx;
+		}
+	}
+	.footer-btn {
+		margin-top: 50rpx;
+	}
+	.submit-btn {
+		width: 50%;
+		height: 88rpx;
+		line-height: 88rpx;
+		text-align: center;
+		font-size: 30rpx;
+		font-family: PingFang SC;
+		color: #FFFFFF;
+		background: rgb(0,178,106);
+		border-radius: 16rpx;
+		border: 1rpx solid ;
+		margin-bottom: 30rpx;
+		&::after {
+			border: none;
+		}
+	}
+	.back-btn {
+		color: #bbb;
+		background: transparent;
+		border-radius: 16rpx;
+		border: 1rpx solid #999;
+	}
+	.header-nav {
+		height: 88rpx;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		overflow: hidden;
+		background-color: #fff;
+		box-sizing: border-box;
+		width: 100%;
+		position: fixed;
+		top: 0;
+		left: 0;
+		.header-title {
+			flex: 1;
+			text-align: center;
+			overflow: hidden;
+			white-space: nowrap;
+			text-overflow: ellipsis;
+			font-family: PingFang SC,PingFang SC;
+			font-weight: 500;
+			font-size: 15px;
+			color: #000;
+			box-sizing: border-box;
+		}
+	}
+	.arrow-left {
+		position: absolute;
+		left: 24rpx;
+		height: 88rpx;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		overflow: hidden;
+	}
+	.list-item {
+		background-color: #fff;
+		padding: 24rpx;
+		border-bottom: 1rpx solid #f4f4f4;
+		font-size: 15px;
+		color: #333;
+	}
+
+	.title {
+		background-color: #f4f4f4;
+	}
+</style>

+ 2741 - 0
pages_course/living.vue

@@ -0,0 +1,2741 @@
+<template>
+	<view class="swiper-wrapper">
+		<view class="container">
+			<view class="content">
+				<view style="position: fixed;top: 0;z-index: 5;" class="content-top">
+					<view class="x-f">
+						<image v-if="!scene" @click="goBack" class="w60 h64 mr26" src="/static/images/return3.png" />
+						<view class="align-center"
+							style="padding: 6rpx 8rpx;height: 64rpx;background: rgba(0,0,0,0.5);border-radius: 32rpx;">
+							<u-avatar :src="liveItem.liveImgUrl||'/static/images/logo.png'" :size="32"></u-avatar>
+							<view class="colorf ml10 mr6">
+								<view>{{liveItem.liveName?truncateString(liveItem.liveName,8):"未命名"}}</view>
+							</view>
+						</view>
+					</view>
+					<view v-if="Array.isArray(filteredViewers)" class=" align-center" @click="toggleViewerList"
+						style="margin-top: 120rpx;">
+						<image class="w52 h52 mr4" v-for="(item,viewerIndex) in filteredViewers" :key="viewerIndex"
+							style="border-radius: 26rpx;" :src="item.avatar||'/static/images/logo.png'" />
+						<view class="sum">{{liveUserTotal||0}}</view>
+					</view>
+				</view>
+				<!-- 右边的side -->
+				<view class="side-group">
+					<view class="side-item" @click="onLike">
+						<LikeButton :initialCount="100" :heartsPerClick="5" @like="onLike" />
+						<view>{{liveViewData && liveViewData.like||0}}</view>
+					</view>
+
+					<view class="side-item">
+						<button open-type="share" class="button">
+							<image class="image" src="/static/images/wechat.png" mode="widthFix" />
+						</button>
+						<view>分享</view>
+					</view>
+				</view>
+
+				<view class="activity-box">
+					<view class="item-box" @click="onRed()" v-if="isShowRed">
+						<view class="x-f">
+							<view class="tip">领红包</view>
+							<view class="item">
+								<image class="w70 img" src="/static/images/redbag.png" mode="widthFix" />
+							</view>
+						</view>
+					</view>
+					<view class="item-box" @click="onLottery()" v-if="isShowLottery">
+						<view class="x-f">
+							<view class="tip">抽奖</view>
+							<view class="item">
+								<image class="w60" src="/static/images/lottery.png" mode="widthFix" />
+							</view>
+						</view>
+					</view>
+				</view>
+
+				<view class="shop-prompt f30 x-f"
+					v-if="showPurchasePrompt&&orderUser&&orderUser.count&&liveItem.status==2">
+					<image class="w32 h32 mr8" src="/static/images/shopping.png" />
+					<text>{{ orderUser.count || 0 }}人正在去购买</text>
+				</view>
+
+				<view class="videolist" v-if="liveItem.status==2">
+					<view class="video" :class="liveItem.showType == 1 ? 'video_row' : ''">
+						<!-- 视频组件 -->
+						<live-player v-if="liveItem.livingUrl && liveItem.liveType == 1" :id="'myLivePlayer_' + liveId"
+							:src="liveItem.livingUrl" autoplay mode="live" object-fit="contain" :muted="false"
+							orientation="vertical" :enable-play-gesture="true" min-cache="1" max-cache="3"
+							@statechange="onLiveStateChange($event, liveItem)" @error="onLiveError($event, liveItem)"
+							class="item"></live-player>
+						<!-- 录播 -->
+						<video v-if="liveItem.videoUrl&&liveItem.liveType==2" :id="`myVideo_${liveId}`" class="item"
+							:src="liveItem.videoUrl" :autoplay="true" :controls="false" object-fit="contain"
+							:custom-cache="false" :enable-progress-gesture="false" vslide-gesture-in-fullscreen="true"
+							:show-center-play-btn="false" :http-cache="false" loop @error="videoError"
+							@timeupdate="onVideoTimeUpdate" @loadeddata="onVideoLoaded"
+							@loadedmetadata="onVideoMetaLoaded" @pause="onVideoPause" @play="onVideoPlay">
+						</video>
+
+						<!-- 直播回放 -->
+						<!-- :enable-progress-gesture="true" -->
+						<video v-if="liveItem.videoUrl&&liveItem.liveType==3" :id="`myVideo_${liveId}`" class="item"
+							:src="liveItem.videoUrl" :autoplay="true" :controls="true" object-fit="contain"
+							:custom-cache="false" :enable-progress-gesture="liveItem.isSpeedAllowed"
+							vslide-gesture-in-fullscreen="true" :show-center-play-btn="true" :http-cache="false" loop
+							@error="videoError" @timeupdate="onVideoTimeUpdate" @loadeddata="onVideoLoaded"
+							@loadedmetadata="onVideoMetaLoaded" @pause="onVideoPause" @play="onVideoPlay"
+							@seek="onVideoSeek">
+						</video>
+						<view v-if="liveItem.videoUrl&&liveItem.liveType==2" class="time">{{liveItem.totalTime}}</view>
+						<view v-if="liveItem.videoUrl&&liveItem.liveType==3" class="lable">直播回放</view>
+					</view>
+				</view>
+
+				<view class="trailer-box">
+
+					<!-- <video v-if="liveItem.videoUrl&&liveItem.liveType==1" :id="`myVideo_${liveId}`" class="item"
+							:src="liveItem.videoUrl" :autoplay="true" :controls="true" object-fit="contain"
+							:custom-cache="false" :enable-progress-gesture="liveItem.isSpeedAllowed"
+							vslide-gesture-in-fullscreen="true" :show-center-play-btn="true" :http-cache="false" loop
+							@error="videoError" @timeupdate="onVideoTimeUpdate" @loadeddata="onVideoLoaded"
+							@loadedmetadata="onVideoMetaLoaded" @pause="onVideoPause" @play="onVideoPlay"
+							@seek="onVideoSeek">
+						</video> -->
+					<video v-if="liveItem.status==1" :id="`myVideo_${liveId}`" class="item" :src="liveItem.previewUrl"
+						:autoplay="true" :controls="false" object-fit="contain" :custom-cache="false"
+						:enable-progress-gesture="false" vslide-gesture-in-fullscreen="false"
+						:show-center-play-btn="false" :http-cache="false" loop @error="videoError"
+						@loadeddata="onVideoLoaded" @loadedmetadata="onVideoMetaLoaded" @pause="onVideoPause"
+						@play="onVideoPlay" :disable-progress="true">
+					</video>
+
+					<image v-if="liveItem.status==1" class="img" src="/static/images/no_live.png">
+					</image>
+					<view class="countdown-item mt30 mb30">
+						开播倒计时
+						<view class="x-f">
+							<view class="white">
+								{{liveCountdown.hours||"00"}}
+							</view>
+							<view class="white">
+								{{ liveCountdown.minutes||"00"}}
+							</view>
+							<view class="white">
+								{{ liveCountdown.seconds||"00" }}
+							</view>
+						</view>
+					</view>
+					<view class="name"> {{liveItem.liveName}}</view>
+					<view class="title"> 暂未开播</view>
+				</view>
+
+				<!-- 底部聊天区域 -->
+				<view :style="{position: 'fixed',width: '100%',bottom: chatHeight + 'rpx',zIndex:999}">
+					<!-- height: 30vh; -->
+					<view class="mt20" :style="{ height: chatHeight ? '64rpx' : '30vh' }">
+						<scroll-view v-if="Array.isArray(talklist)" enable-flex scroll-y="true"
+							class=" pl20 scrolly flex-1 column" style="width: calc(100% - 20rpx); height: 100%;"
+							:scroll-into-view="scrollIntoView">
+
+							<view class="list justify-start" v-for="(item,talkIndex) in (talklist||[])" :key="talkIndex"
+								:id="`list_${talkIndex}`" v-show="item.cmd!='red'&&item.cmd!='out'&&item.cmd!='entry'">
+								<view class="talk-list  justify-start">
+									<view class="fs30">
+										<text style="color: #FFDA73;">{{item.nickName||"未命名"}}:</text>
+										<text class='colorf'>{{item.msg}}</text>
+									</view>
+								</view>
+							</view>
+							<view v-if="showWelcomeMessage" class="welcome-message">
+								<view class="list justify-start" v-show="inAndOut.cmd=='entry'||inAndOut.cmd=='out'">
+									<view class="talk-list justify-start">
+										<view class="fs30">
+											<text style="color: #ff89d6;">{{inAndOut.nickName||"未命名"}} </text>
+											<text class='colorf'>
+												{{inAndOut.msg}}直播间</text>
+										</view>
+									</view>
+								</view>
+							</view>
+						</scroll-view>
+					</view>
+
+					<!-- 底部输入框和操作按钮 -->
+					<view class="justify-between p24 ">
+						<view class="x-f w580"
+							style="background:rgba(57, 57, 57, 1);padding:10rpx 14rpx 10rpx 32rpx;box-sizing:border-box;border-radius:36rpx;">
+							<u-input :placeholder="placeholderText" border="none" customStyle='font-size:24rpx;'
+								v-model="value" shape='circle' color='#fff' placeholderStyle='color:#e7e7e7'
+								:adjust-position="false" :scroll-with-animation="false" class="ml20" @focus="inputFocus"
+								@blur="inputBlur">
+							</u-input>
+							<view class="send" @click="sendMsg()">发送</view>
+						</view>
+						<view class="justify-between mr15 align-center">
+							<view class="icon-bg ml20" @click="openCart()">
+								<image src="/static/images/shopping.png" class="w58 h58" />
+							</view>
+						</view>
+					</view>
+				</view>
+
+			</view>
+
+			<view class="goods" v-if="isShowGoods">
+				<view class="top">
+					<view class="left">
+						<image class="w30 h30 mr8" src="/static/images/signal.png" />讲解中
+					</view>
+					<image @click="isShowGoods=false" class="w40 h40 " src="/static/images/del2.png" />
+				</view>
+
+				<image class="photo" :src="goodsCard.imgUrl" />
+				<view class="item">
+					<view class="price"><text class="red">¥{{goodsCard.price}} </text><text
+							class="del">¥{{goodsCard.otPrice}}</text></view>
+					<view class="title oneline-hide">{{goodsCard.productName}}</view>
+					<view class="button" @click="goShop(goodsCard.productId,goodsCard.goodsId)">
+						立即抢购
+					</view>
+				</view>
+			</view>
+
+			<u-popup :show="isShowLotteryPop" round='40rpx'>
+				<view class="prize-box" style="border-radius: 40rpx;height: fit-content;">
+					<image class="nav-img " src="/static/images/red_head.png" mode="widthFix" />
+					<image class="bg-img " src="/static/images/red_bg.png" />
+					<view class="prize-content">
+						<view class=" mr20">
+							<u-icon class="x-end" name="close" color="#fff" size="20"
+								@click="isShowLotteryPop=false"></u-icon>
+						</view>
+						<view class="column align-center ">
+							<image class="w446 h80" src="/static/images/red_title.png" />
+							<view class="fs24 colorf x-f mt30 mb30">
+								开奖倒计时
+								<view class="x-f">
+									<view class="white-item">
+										{{countdown.hours||"00"}}
+									</view>
+									<view class="white-item">
+										{{ countdown.minutes||"00" }}
+									</view>
+									<view class="white-item">
+										{{ countdown.seconds||"00" }}
+									</view>
+								</view>
+							</view>
+							<view class="item-group">
+								<ThreeItemSwiper :products="lotteryProducts"></ThreeItemSwiper>
+							</view>
+							<view class="point-group" v-for="(item,index) in lotteryProducts" :key="index">
+							</view>
+							<view class="colorf  fs28">
+								观看直播参与抽奖
+							</view>
+							<view class="button" @click="onClaim">参与抽奖</view>
+						</view>
+					</view>
+				</view>
+			</u-popup>
+			<u-popup :show="!!integral.status" round='20rpx' mode="center" bgColor='#ffffff' zIndex='10076'>
+				<view class="integral-box">
+					<view class="top">
+						<view class="title">观看视频领芳华币</view>
+						<image class="photo" src="/static/images/integral_bg.png" mode="widthFix" />
+					</view>
+					<view class="item">
+						<view class="title ">{{integral.msg}}</view>
+						<view class="button" @click="integral.status=false">确认</view>
+					</view>
+				</view>
+			</u-popup>
+
+			<u-popup :show="isShowRedCard" round='20rpx' mode="center" bgColor='transparent' zIndex='10076'>
+				<view class="red-card">
+					<image class="img" src="/static/images/red_card.png" />
+					<view class="red-content">
+						<view class="title">{{redCard.msg}}</view>
+						<view class="txt ">直播惊喜芳华币</view>
+						<view class="button" @click="isShowRedCard=false">确认</view>
+					</view>
+				</view>
+			</u-popup>
+			<u-popup :show="isShowPrize" round='20rpx' mode="center" bgColor='#fff' zIndex='10076'>
+				<view class="prize-card">
+					<image class="nav-img " src="/static/images/red_head.png" mode="widthFix" />
+					<view class="title">{{prizeInfo.length}}位幸运观众</view>
+					<view class="prize-content" v-for="(item,index) in (prizeInfo||[])" :key="index">
+						<view>{{item.userName}}</view>
+						<view>{{item.userId}}</view>
+						<view class="txt">{{item.prizeLevel}}等奖</view>
+					</view>
+					<view class="tip">请联系管理员领取</view>
+					<view class="button" @click="isShowPrize=false">确认</view>
+				</view>
+			</u-popup>
+
+			<!-- 观众列表弹窗 -->
+			<u-popup :show="showadd" @close="close" @open="openViews" round='20rpx' bgColor='#ffffff' zIndex='10077'>
+				<view class="view-box">
+					<view class="fs32" style="text-align: center;">在线观众</view>
+					<scroll-view v-if="Array.isArray(liveViewers)" scroll-y class="scroll-content"
+						:style="{height: scrollHeight + 'px'}" @scrolltolower="handleScrollToLower">
+						<view class="fs28 x-f mb20 mt20" v-for="(item,index) in (liveViewers||[])" :key="index">
+							<view
+								:style="{color: index === 0 ? '#FF3B30' : index === 1 ? '#FF9500' : index === 2 ? '#FFCC00' :  '#8E8E93',fontWeight: index < 3 ? 'bold' : 'normal',width: '50rpx'}"
+								class="mr10">{{index+1}}</view>
+							<u-avatar :src="item.avatar||'/static/images/logo.png'" :size="36"></u-avatar>
+							<text class="ml16 f30">{{item.nickName||"未命名"}}</text>
+						</view>
+					</scroll-view>
+				</view>
+			</u-popup>
+
+
+			<!-- 商品弹窗 -->
+			<u-popup :show="shopping" @close="closeShop" round='20rpx' bgColor='#f3f5f9' zIndex='10075'>
+				<view class="shoppop">
+					<view class="shoppop-top">
+						<view class="search-input x-f">
+							<image class="w24 mr16" src="/static/images/search.png" mode="widthFix" />
+							<input placeholder="请搜索商品" v-model="inputInfo" @input="handleSearchInput" />
+						</view>
+						<view class=" search-top" @click="goOrderList()">
+							<image class="w48 h48" src="/static/images/order.png" />
+							<view>订单</view>
+						</view>
+					</view>
+
+					<scroll-view enable-flex scroll-y class="shop-list" :style="{ height: boxHeight + 'px' }">
+						<view class="list-item" v-for="(item,index) in products" :key="index">
+							<view class="goods-img">
+								<image class="img" :src="item.imgUrl" mode="widthFix" />
+								<view class="goods-label">{{index+1}}</view>
+							</view>
+							<view class="goods-right">
+								<view class="goods-title">{{item.productName}}</view>
+								<view class="goods-people">{{item.sales}} 人已购</view>
+								<view class="goods-shop">
+									<text class="nummber"><text style="font-size: 20rpx;font-weight: 600;">¥</text><text
+											style="font-size: 36rpx;font-weight: bold;">{{Math.trunc(item.price)}}</text>.{{getPureDecimal(item.price)?getPureDecimal(item.price):'00'}}</text>
+									<view class="btn-group x-f">
+										<view class="collect-btn">
+											<image v-if="item.isFavorite" @click="onGoodsCollect(item)"
+												class="w36 h36 mt10" src="/static/images/collect_select.png" />
+											<image v-else @click="onGoodsCollect(item)" class="w36 h36 mt10"
+												src="/static/images/collect.png" />
+										</view>
+										<view v-if="item.status==1" class="shop-btn"
+											@click="goShop(item.productId,item.goodsId)">去购买 </view>
+										<view v-else-if="item.status==0" class="shop-btn">
+											已下架</view>
+									</view>
+								</view>
+							</view>
+						</view>
+					</scroll-view>
+				</view>
+			</u-popup>
+		</view>
+
+	</view>
+</template>
+<script>
+	import LikeButton from '@/pages_course/components/like.vue'
+	import ThreeItemSwiper from '@/pages_course/components/ThreeItemSwiper.vue'
+	import CryptoJS from 'crypto-js'
+	import {
+		liveLottery, // 抽奖查询
+		claim, //抽奖
+
+		liveRed, // 点击领红包
+		liveDataLike, // 点赞
+		collectStore, // 店铺收藏/取消收藏
+		collectGoods, // 商品收藏/取消收藏
+		// store, // 查询店铺
+		// follow, // 关注/取消关注
+		watchUserList, //获取直播间用户(展示在线用户)
+		liveMsg, //获取最近聊天记录
+		// 小黄车
+		liveStore, //店铺展示,
+		liveOrderUser, //正在购买
+		getLiveInfo, //获取直播间信息接口
+		getLiveViewData, //直播间点赞、关注、在线人数数据
+		currentActivities, //红包 卡片 抽奖
+		getlive
+	} from '@/api/living.js'
+
+
+	// var wsUrl = "wss://live.test.ylrztop.com/ws/live-api/app/webSocket"; //余红奇
+	var pingpangTimes = null;
+	var initTimes = null;
+	var isSocketOpen = false;
+	var socket = null;
+
+	export default {
+		components: {
+			ThreeItemSwiper,
+			LikeButton
+		},
+		data() {
+			return {
+				socket: null, // WebSocket 实例
+				isSocketOpen: false, // 连接是否已打开
+				heartBeatTimer: null, // 心跳定时器
+				heartBeatInterval: 15000, // 心跳发送间隔(15秒)
+				reconnectTimer: null, // 重连定时器
+				reconnectCount: 0, // 当前重连次数
+				maxReconnectAttempts: 3, // 最大重连次数
+				isManualClose: false, // 是否手动关闭(用于区分主动关闭和异常断开)
+				pingTimeout: 10000, // 心跳响应超时时间(10秒)
+				pingTimeoutTimer: null, // 心跳超时定时器
+
+
+
+				// wsNewUrl: 'ws://192.168.10.126:7014/app/webSocket',
+				wsNewUrl: 'wss://api.fhhx.runtzh.com/app/webSocket',
+				// wsNewUrl:'ws://192.168.10.166:7014/app/webSocket',
+				qrFrom: null,
+				scene: '',
+
+				liveCountdown: {},
+				countdown: {},
+
+				liveViewData: {},
+
+				chatHeight: 0,
+
+				keyboardHeight: 0,
+				// inputHeight: null,
+				videoCurrentTime: 0, // 当前视频播放时间
+				isVideoPlaying: false, // 视频是否正在播放
+				videoProgressKey: '', // 存储进度的key
+				inAndOut: {},
+
+				isShowPrize: false,
+				prizeInfo: [],
+				timeData: {},
+				countDownKey: 0,
+				lotteryProducts: [],
+				lotteryList: [],
+				talklist: [],
+				isShowLotteryPop: false,
+				liveItem: {},
+				isSending: false,
+
+				welcomeTimer: null,
+				redTimer: null,
+				lotteryTimer: null,
+
+				isShowLottery: false,
+				isShowRedCard: false,
+				redCard: null, //点击红包出现弹窗
+				integral: {},
+				lotteryInfo: {},
+				goodsCard: {},
+				redInfo: {},
+				storeId: null,
+				isFocus: false,
+				shopping: false,
+
+				inputInfo: '',
+				showWelcomeMessage: false,
+				scrollIntoView: '',
+
+				isShowGoods: false,
+				isShowRed: false,
+
+				lastClickTime: 0,
+				clickDelay: 300, // 300ms内只响应一次点击
+
+				videoRetryCounts: {}, // 记录每个直播间的视频重试次数,格式: { liveId: 次数 }
+
+				placeholderText: '说点什么...',
+
+				liveUserTotal: null,
+				viewPageSize: 10, // 每页数量
+				viewPageNum: 1, // 当前页码
+				viewLoading: false, // 是否正在加载
+				scrollHeight: 0,
+				scrollTimer: null, // 滚动防抖定时器
+
+
+				socketInstance: null, // 统一管理 socket 实例
+				maxReconnectAttempts: 3,
+				isManualClose: false, // 标记是否手动关闭
+
+				showRed: true,
+				searchTimer: null,
+				reconnectTimer: null,
+				isCollect: false,
+				showPurchasePrompt: false,
+				purchasePromptTimer: null,
+				prevOrderCount: 0, // 用于记录上一次的购买人数
+				videoUrl: null,
+				showType: 1, //横屏1 竖屏2
+				boxHeight: 300, //小黄车高度
+				liveViewers: [], //观众
+				likeName: 0,
+				hlsPlayer: null, // HLS播放器实例,
+				livingUrl: "",
+				products: [],
+				store: {},
+				orderUser: {}, //正在购买
+				userType: 0,
+				timestamp: '',
+				liveId: null,
+				userinfo: '', //用户信息
+				// path: 'http://192.168.10.166/dev-api', //余红奇
+				// path: 'http://v56c9b8e.natappfree.cc', //余红奇
+				// path: 'live.test.ylrztop.com/prod-api', //余红奇
+				value: '',
+				talkdisabled: false, //输入框是否禁用
+				autoplay: false, //视频自动播放
+				showadd: false,
+				videoContext: '',
+				livedata: {}, //直播间点赞、关注、在线人数数据
+				userData: {}
+
+			};
+		},
+
+
+		onLoad(options) {
+			console.log("全部参数", options)
+			//获取键盘高度
+			this.keyboardListener = uni.onKeyboardHeightChange(res => {
+				console.log('键盘高度', res.height);
+				this.keyboardHeight = res.height * 2;
+			});
+			this.initTime();
+
+			if (options.liveId) {
+				this.liveId = options.liveId; // 仅当 liveId 变化时更新
+				console.log("option.liveId", options.liveId)
+			}
+			// 扫码传来的参数
+			if (options.scene) {
+				this.scene = options.scene;
+				const decodedScene = decodeURIComponent(this.scene);
+				const params = {};
+				decodedScene.split('&').forEach(item => {
+					const [key, value] = item.split('=');
+					params[key] = value;
+					this.liveId = params.a;
+				})
+
+				if (params.b && params.c) {
+					this.qrFrom = `&companyId=${params.b}&companyUserId=${params.c}`;
+				}
+			}
+
+			if (options.companyId && options.companyUserId) {
+				this.qrFrom = `&companyId=${options.companyId}&companyUserId=${options.companyUserId}`;
+				console.log("这个", this.qrFrom)
+			}
+
+			this.userinfo = JSON.parse(uni.getStorageSync("userInfo"))
+			this.userData = uni.getStorageSync("userData")
+			// 初始化直播间列表
+			this.getliving(this.liveId);
+			this.initSocket();
+		},
+		onShow() {
+		  this.startTimeTimer(this.liveItem);
+		  this.setVideoCurrentTime(this.liveItem.totalTime);
+		  
+		  // 新增:页面显示时,若连接未打开则重新初始化
+		  if (!this.isSocketAvailable()) {
+		    this.initSocket();
+		  }
+		},
+
+		//分享给好友
+		onShareAppMessage() {
+			return {
+				title: '邀请你来观看直播:' + this.liveItem.liveName,
+				path: '/pages_course/living?companyId=-2&companyUserId=' + this.userinfo.userId + '&liveId=' + this.liveId,
+				imageUrl: '/static/images/logo.png',
+				success(res) {
+					console.log("分享成功", res);
+				},
+				fail(err) {
+					console.error("分享失败", err);
+				}
+			};
+		},
+		computed: {
+			filteredViewers() {
+				// 1. 强制兜底:若 liveViewers 不是数组(如 null/undefined),直接返回空数组
+				const safeLiveViewers = Array.isArray(this.liveViewers) ? this.liveViewers : [];
+				// 2. 截取前3项(空数组 slice 不会报错)
+				return safeLiveViewers.slice(0, 3);
+			}
+			// payLimitTime() {
+			// 	return this.order?.updateTime ?
+			// 		dayjs(this.order.updateTime).add(2, 'day').format('YYYY-MM-DD HH:mm:ss') :
+			// 		'';
+			// }
+		},
+		onHide() {
+			 this.saveVideoProgress();
+			  this.stopHeartBeat(); 
+			// 页面隐藏时保存视频进度
+			this.saveVideoProgress();
+			// this.closeWebSocket(false); // 页面隐藏时非手动关闭(可按需改为true)
+			const currentLive = this.liveItem;
+			if (currentLive) {
+				this.pauseVideo(currentLive);
+				this.clearTimeTimer(currentLive); // 隐藏时清除当前直播间定时器
+			} // 隐藏时关闭所有连接
+			this.closeAllWebSockets();
+
+			// 抽奖
+			if (this.lotteryList) {
+				this.clearTimeTimer(this.lotteryList)
+			}
+		},
+
+		mounted() {
+			this.getCurrentActivities();
+			this.getliveOrder()
+
+		},
+		onUnload() {
+			if (this.socket) {
+				this.socket.close({
+					code: 1000,
+					reason: "页面卸载"
+				});
+				this.socket = null;
+			}
+			this.closeWebSocket(true); // 页面卸载时手动关闭,不触发重连
+			// 页面卸载时保存视频进度
+			this.saveVideoProgress();
+
+			// 清除定时器
+			if (this.redTimer) {
+				clearInterval(this.redTimer);
+				this.redTimer = null;
+			}
+			if (this.lotteryTimer) {
+				clearInterval(this.lotteryTimer);
+				this.lotteryTimer = null;
+			}
+
+			this.lotteryTime = 0; // 重置时间
+			if (this.welcomeTimer) {
+				clearInterval(this.welcomeTimer);
+				this.welcomeTimer = null;
+			}
+			// 移除所有全局事件监听
+			this.removeAllEventListeners();
+
+			// 清理定时器
+			this.clearAllTimers();
+			// 移除所有全局事件监听
+			this.removeAllEventListeners();
+
+			// 清理定时器
+			this.clearAllTimers();
+			// 暂停视频
+			const videoId = `myVideo_${this.liveId}`;
+			const videoContext = uni.createVideoContext(videoId, this);
+			if (videoContext) {
+				videoContext.pause();
+			}
+		},
+		watch: {
+			// 监听orderUser.count的变化
+			'orderUser.count': {
+				handler(newVal, oldVal) {
+					if (newVal !== this.prevOrderCount) {
+						this.prevOrderCount = newVal;
+						this.showPurchaseMessage();
+					}
+				},
+				immediate: true
+			}
+		},
+		methods: {
+			sendHeartBeat() {
+				if (!this.isSocketAvailable()) return; // 替换原校验逻辑
+				try {
+					// 心跳包内容(根据服务端协议调整,此处为示例)
+					const heartBeatMsg = JSON.stringify({
+						cmd: "heartbeat",
+						msg: "ping",
+						userId: this.userinfo?.userId,
+						liveId: this.liveId
+						// timestamp: Date.now()
+					});
+					this.socket.send({
+						data: heartBeatMsg,
+						success: () => {
+							console.log("心跳包发送成功");
+							// 发送心跳后启动超时检测
+							this.startPingTimeout();
+						},
+						fail: (err) => {
+							console.error("心跳包发送失败:", err);
+							// 心跳发送失败,触发重连
+							this.handleReconnect();
+						}
+					});
+				} catch (err) {
+					console.error("心跳发送异常:", err);
+					this.handleReconnect();
+				}
+			}, // 启动心跳超时检测
+			startPingTimeout() {
+				// 清除之前的超时定时器
+				if (this.pingTimeoutTimer) {
+					clearTimeout(this.pingTimeoutTimer);
+					this.pingTimeoutTimer = null;
+				}
+				// 超时后触发重连
+				this.pingTimeoutTimer = setTimeout(() => {
+					console.error("心跳响应超时,连接异常");
+					this.handleReconnect();
+				}, this.pingTimeout);
+			},
+			stopHeartBeat() {
+				if (this.heartBeatTimer) {
+					clearInterval(this.heartBeatTimer);
+					this.heartBeatTimer = null;
+				}
+				if (this.pingTimeoutTimer) {
+					clearTimeout(this.pingTimeoutTimer);
+					this.pingTimeoutTimer = null;
+				}
+			}, // 封装通用的连接状态校验方法
+			isSocketAvailable() {
+				// WebSocket readyState:0=CONNECTING, 1=OPEN, 2=CLOSING, 3=CLOSED
+				return this.socket && this.isSocketOpen && this.socket.readyState === 1;
+			},
+			// 处理重连逻辑
+			handleReconnect() {
+			  if (this.isManualClose || this.reconnectCount >= this.maxReconnectAttempts) {
+			    console.log(`停止重连(手动关闭/已达最大次数)`);
+			    this.resetReconnectState();
+			    return;
+			  }
+			
+			  this.closeWebSocket(false);
+			  this.stopHeartBeat();
+			  this.reconnectCount++;
+			  
+			  // 优化:固定短延迟(如1秒),而非指数退避(避免延迟过长)
+			  const delay = 1000; 
+			  console.log(`第${this.reconnectCount}次重连,延迟${delay}ms`);
+			
+			  this.reconnectTimer = setTimeout(() => {
+			    this.initSocket();
+			  }, delay);
+			},
+ // 重置重连状态
+			resetReconnectState() {
+				this.reconnectCount = 0;
+				if (this.reconnectTimer) {
+					clearTimeout(this.reconnectTimer);
+					this.reconnectTimer = null;
+				}
+			},
+
+			//输入框
+			inputFocus() {
+				this.chatHeight = this.keyboardHeight;
+				this.isFocus = true;
+			},
+			inputBlur() {
+				this.chatHeight = 0;
+				this.isFocus = false
+			},
+
+			// resetCountdown() {
+			// 	// 先停止
+			// 	this.$refs.countDownRef && this.$refs.countDownRef.stop();
+
+			// 	// 重新设置时间并启动
+			// 	this.$nextTick(() => {
+			// 		this.$refs.countDownRef && this.$refs.countDownRef.start();
+			// 	});
+			// },
+			// 录播时间点
+			onVideoMetaLoaded(e) {
+				// 设置存储key
+				this.videoProgressKey = `videoProgress_${this.liveId}`;
+
+				// 尝试从存储中获取保存的播放进度
+				uni.getStorage({
+					key: this.videoProgressKey,
+					success: (res) => {
+						this.videoCurrentTime = res.data;
+
+						// 设置视频播放位置
+						this.setVideoCurrentTime(this.videoCurrentTime);
+					},
+					fail: (err) => {
+						console.log('没有找到保存的播放进度或获取失败', err);
+						this.videoCurrentTime = 0;
+					}
+				});
+			},
+
+			// 视频数据加载完成
+			onVideoLoaded(e) {
+				console.log('视频数据加载完成');
+			},
+
+			// 视频时间更新
+			onVideoTimeUpdate(e) {
+				// 获取当前播放时间
+				this.videoCurrentTime = e.detail.currentTime;
+
+				// 每隔5秒保存一次进度(避免频繁存储)
+				if (Math.floor(this.videoCurrentTime) % 5 === 0) {
+					this.saveVideoProgress();
+				}
+			},
+
+			// 视频暂停
+			onVideoPause(e) {
+				this.isVideoPlaying = false;
+				// 暂停时保存进度
+				this.saveVideoProgress();
+			},
+
+			// 视频播放
+			onVideoPlay(e) {
+				this.isVideoPlaying = true;
+			},
+			// 设置视频当前时间
+			setVideoCurrentTime(time) {
+				const videoId = `myVideo_${this.liveId}`;
+				const videoContext = uni.createVideoContext(videoId, this);
+
+				if (videoContext) {
+					videoContext.seek(time);
+				}
+			},
+
+			// 保存视频进度
+			saveVideoProgress() {
+				if (this.videoProgressKey) {
+					uni.setStorage({
+						key: this.videoProgressKey,
+						data: this.videoCurrentTime,
+						success: () => {},
+						fail: (err) => {
+							console.error('保存视频进度失败:', err);
+						}
+					});
+				}
+			},
+			// 参与抽奖
+			onClaim() {
+				let data = {
+					liveId: this.liveId,
+					lotteryId: this.lotteryInfo.lotteryId,
+				}
+
+				claim(data).then(res => {
+
+						if (res.code == 200) {
+							uni.showToast({
+								title: res.msg,
+								icon: 'none'
+							});
+							this.isShowLotteryPop = false
+						} else {
+							uni.showToast({
+								title: res.msg,
+								icon: 'none'
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+			// 点击抽奖图标
+			// onLottery() {
+			// 	if (!this.lotteryInfo) return;
+
+			// 	let data = {
+			// 		lotteryId: this.lotteryInfo.lotteryId
+			// 	}
+
+			// 	// 抽奖查询
+			// 	liveLottery(data).then(res => {
+			// 			if (res.code == 200) {
+			// 				this.lotteryList = Array.isArray(res.data) ? res.data : []; // 额外补全lotteryList的校验
+			// 				this.lotteryProducts = Array.isArray(res.data.products) ? res.data.products : [];
+
+			// 				if (res.data.duration) {
+			// 					this.isShowLotteryPop = true
+			// 				}
+			// 			} else {
+			// 				uni.showToast({
+			// 					title: res.msg,
+			// 					icon: 'none'
+			// 				});
+			// 			}
+			// 		},
+			// 		rej => {}
+			// 	);
+			// },
+			onLottery() {
+				if (!this.lotteryInfo) return;
+
+				let data = {
+					lotteryId: this.lotteryInfo.lotteryId
+				};
+
+				liveLottery(data)
+					.then(res => {
+						if (res.code == 200) {
+							const resData = res.data || {}; // 兜底 res.data 为对象,避免访问 res.data.products 报错
+							this.lotteryList = Array.isArray(resData) ? resData : [];
+							// 兜底 products 为数组
+							this.lotteryProducts = Array.isArray(resData.products) ? resData.products : [];
+							if (resData.duration) {
+								this.isShowLotteryPop = true;
+							}
+						} else {
+							uni.showToast({
+								title: res.msg,
+								icon: 'none'
+							});
+							// 非 200 状态时兜底
+							this.lotteryList = [];
+							this.lotteryProducts = [];
+						}
+					})
+					.catch(rej => { // 捕获接口请求失败(如网络错误)
+						uni.showToast({
+							title: '获取抽奖信息失败',
+							icon: 'none'
+						});
+						// 失败时强制重置为数组
+						this.lotteryList = [];
+						this.lotteryProducts = [];
+					});
+			},
+			// 商品收藏
+			onGoodsCollect(item) {
+				if (!item || item.length === 0 || !item.goodsId) {
+					return;
+				}
+				collectGoods(item.goodsId).then(res => {
+						if (res.code == 200) {
+							uni.showToast({
+								title: res.msg,
+								icon: 'none'
+							});
+							item.isFavorite = !item.isFavorite
+						} else {
+							uni.showToast({
+								title: res.msg,
+								icon: 'none'
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+
+			//正在购买
+			getliveOrder(item) {
+				if (!this.liveId) {
+					return;
+				}
+				liveOrderUser(this.liveId).then(res => {
+						console.log("正在购买", res)
+						if (res.code == 200) {
+							this.orderUser = res;
+						} else {
+							console.log('获取正在购买用户失败');
+						}
+					},
+					rej => {}
+				);
+			},
+			onLiveStateChange(e, liveItem) {
+				// console.log('直播状态变化:', e.detail.code, e.detail);
+				// 可以根据状态码处理不同的直播状态
+				const stateCode = e.detail.code;
+				// 2001: 已经连接服务器
+				// 2002: 已经连接服务器,开始拉流
+				// 2003: 网络接收到首个视频数据包(IDR)
+				// 2004: 视频播放开始
+				// 2005: 视频播放进度
+				// 2006: 视频播放结束
+				// 2007: 视频播放Loading
+				// 2008: 解码器启动
+				// -2301: 网络断连,且经多次重连抢救无效,更多重试请自行重启播放
+				// -2302: 获取加速拉流地址失败
+			}, // 直播错误事件
+			onLiveError(e, liveItem) {
+				this.videoError(e, liveItem);
+			},
+			//  红包 卡片 抽奖
+			getCurrentActivities() {
+				if (!this.liveId) return;
+				currentActivities(this.liveId).then(res => {
+					if (res.code === 200) {
+						// 提取数据(默认空数组/对象避免报错)
+						this.redInfo = (res.red || [])[0];
+						this.lotteryInfo = (res.lottery || [])[0];
+						this.goodsCard = res.goods || {};
+
+
+						this.isShowGoods = this.goodsCard && this.goodsCard.status == 1;
+						this.isShowRed = this.redInfo && this.redInfo.redStatus == 1;
+						this.isShowLottery = this.lotteryInfo && this.lotteryInfo.lotteryStatus == 1;
+						if (this.isShowRed) {
+							this.redTimer = setInterval(() => {
+								const redCountdown = this.handleTime(this.redInfo.updateTime, this.redInfo
+									.duration)
+								if (!redCountdown) {
+									this.isShowRed = false
+									clearInterval(this.redTimer)
+								}
+							}, 1000);
+						}
+						// 处理抽奖定时器
+						if (this.isShowLottery) {
+							this.lotteryTimer = setInterval(() => {
+								this.countdown = this.handleTime(this.lotteryInfo.updateTime, this
+									.lotteryInfo
+									.duration)
+							}, 1000);
+						}
+					} else {
+						uni.showToast({
+							title: res.msg,
+							icon: 'none'
+						});
+					}
+				}, rej => {});
+
+			},
+
+			// 计算当前时间与 liveItem.startTime 的差值,并更新 totalTime
+			calculateTimeDiff(item) {
+				// 防御1:item 不存在直接返回
+				if (!item.startTime) return;
+				// 步骤1:提取对应场景的时间字符串(直播用startTime,抽奖用updateTime)
+				let timeStr = item.startTime;
+
+				// 转换时间格式(适配iOS,将 "-" 替换为 "/")
+				const iosCompatibleTime = timeStr.replace(/-/g, "/");
+				const time = new Date(iosCompatibleTime);
+
+				if (isNaN(time.getTime())) {
+					return;
+				}
+				const now = new Date();
+				let diffMs = Math.max(0, now - time); // 直播:已播放时长(现在-开始时间)
+				// 步骤4:转换为 时:分:秒(补零处理)
+				const totalSeconds = Math.floor(diffMs / 1000);
+				const hours = this.padZero(Math.floor(totalSeconds / 3600));
+				const minutes = this.padZero(Math.floor((totalSeconds % 3600) / 60));
+				const seconds = this.padZero(totalSeconds % 60);
+				this.$set(this.liveItem, "totalTime", `${hours}:${minutes}:${seconds}`);
+			},
+
+			padZero(num) {
+				return num < 10 ? `0${num}` : num;
+			},
+
+			// 启动当前直播间的时间差值定时器
+			startTimeTimer(item) {
+				// 防御:若 item 不存在,直接返回
+				if (!item) return;
+				// 立即计算一次(避免等待1秒才显示)
+				const totalTime = this.calculateTimeDiff(item);
+				item.timeTimer = setInterval(() => {
+					const totalTime = this.calculateTimeDiff(item);
+				}, 1000);
+
+			},
+			// 清除指定直播间的时间定时器
+			clearTimeTimer(item) {
+				if (item.timeTimer) {
+					clearInterval(item.timeTimer);
+					item.timeTimer = null; // 清空定时器标识
+				}
+			},
+
+
+			toggleViewerList() {
+				const now = Date.now();
+				if (now - this.lastClickTime > this.clickDelay) {
+					this.showadd = !this.showadd;
+					// 打开弹窗时,若观众列表为空,主动加载第一页
+					if (this.showadd && this.liveViewers.length === 0) {
+						this.getliveUser(false); // 加载第一页观众
+					}
+					this.lastClickTime = now;
+				}
+			},
+			closeAllWebSockets() {
+				this.isManualClose = true;
+				isSocketOpen = false;
+			}, // 移除所有全局事件监听器
+			removeAllEventListeners() {
+				uni.$off('initSocket');
+				uni.$off('sendMsg');
+				uni.$off('closeWebSocket');
+				uni.$off('refreshOrder');
+				// 可以根据实际情况添加其他需要移除的事件
+			}, // 清理所有定时器
+			clearAllTimers() {
+				if (this.intervalId) {
+					clearInterval(this.intervalId);
+					this.intervalId = null;
+				}
+
+				if (this.pingpangTimes) {
+					clearInterval(this.pingpangTimes);
+					this.pingpangTimes = null;
+				}
+
+				if (this.reconnectTimer) {
+					clearInterval(this.reconnectTimer);
+					this.reconnectTimer = null;
+				}
+
+				if (this.scrollTimer) {
+					clearTimeout(this.scrollTimer);
+					this.scrollTimer = null;
+				}
+
+				if (this.searchTimer) {
+					clearTimeout(this.searchTimer);
+					this.searchTimer = null;
+				}
+
+				if (this.purchasePromptTimer) {
+					clearTimeout(this.purchasePromptTimer);
+					this.purchasePromptTimer = null;
+				}
+			},
+			// 播放视频
+			playVideo(liveItem) {
+				if (!liveItem) return;
+				console.log("直播的状态", liveItem)
+
+				try {
+					// 直播流使用live-player
+					if (liveItem.liveType === 1 && liveItem.livingUrl) {
+						const livePlayerId = `myLivePlayer_${this.liveId}`;
+						const livePlayerContext = uni.createLivePlayerContext(livePlayerId, this);
+						if (livePlayerContext) {
+							livePlayerContext.play();
+						}
+					} else if (liveItem.liveType === 1 && liveItem.status == 1 && liveItem.videoUrl) {
+						console.log("直播预告")
+						const videoId = `myVideo_${this.liveId}`;
+						const videoContext = uni.createVideoContext(videoId, this);
+						if (videoContext) {
+							videoContext.pause(() => {
+								videoContext.play();
+							});
+						}
+					}
+					// 回放视频使用video
+					else if (liveItem.liveType === 2 && liveItem.videoUrl) {
+						const videoId = `myVideo_${this.liveId}`;
+						const videoContext = uni.createVideoContext(videoId, this);
+						if (videoContext) {
+							videoContext.pause(() => {
+								videoContext.play();
+							});
+						}
+					} else if (liveItem.liveType === 3 && liveItem.videoUrl) {
+						const videoId = `myVideo_${this.liveId}`;
+						const videoContext = uni.createVideoContext(videoId, this);
+						if (videoContext) {
+							videoContext.pause(() => {
+								videoContext.play();
+							});
+						}
+					}
+				} catch (error) {
+					console.error("播放视频失败:", error);
+				}
+			},
+
+			pauseVideo(liveItem) {
+				if (!liveItem) return;
+
+				try {
+					// 直播流使用live-player
+					if (liveItem.liveType === 1) {
+						const livePlayerId = `myLivePlayer_${this.liveId}`;
+						const livePlayerContext = uni.createLivePlayerContext(livePlayerId, this);
+						if (livePlayerContext) {
+							livePlayerContext.pause();
+						}
+					}
+					// 回放视频使用video
+					else if (liveItem.liveType === 2) {
+						const videoId = `myVideo_${this.liveId}`;
+						const videoContext = uni.createVideoContext(videoId, this);
+						if (videoContext) {
+							videoContext.pause();
+						}
+					}
+				} catch (error) {
+					console.error("暂停视频失败:", error);
+				}
+			},
+
+
+
+			openViews() {
+				// 计算scroll-view高度
+				this.$nextTick(() => {
+					const query = uni.createSelectorQuery().in(this);
+					query.select('.view-box').boundingClientRect(data => {
+						if (data) {
+							// 减去标题和底部固定区域的高度
+							this.scrollHeight = data.height - 80 - 120; // 80是标题高度,120是底部高度
+						}
+					}).exec();
+				});
+			},
+
+			// 获取直播间用户
+			async getliveUser(isLoadMore = false) {
+				this.viewLoading = true;
+				try {
+					const res = await watchUserList(this.liveId, this.viewPageSize, this.viewPageNum, false);
+					if (res.code === 200) {
+						this.liveUserTotal = res.total || 0;
+						// 兜底 newRows:接口返回的 rows 必须是数组,否则为空数组
+						const newRows = Array.isArray(res.rows) ? res.rows : [];
+						// 兜底 currentViewers:确保是数组(即使初始被意外修改)
+						const currentViewers = Array.isArray(this.liveViewers) ? this.liveViewers : [];
+						// 合并数组(此时两者均为数组,扩展运算符不会报错)
+						this.liveViewers = isLoadMore ? [...currentViewers, ...newRows] : newRows;
+						this.viewPageNum++;
+					} else {
+						this.liveViewers = []; // 接口失败时强制置空数组
+					}
+				} catch (error) {
+					console.error('获取观众列表失败:', error);
+					this.liveViewers = []; // 捕获异常时强制置空数组
+				} finally {
+					this.viewLoading = false;
+				}
+			},
+			// 滚动到底部触发
+			handleScrollToLower() {
+				// 清除上一次未执行的定时器,避免重复请求
+				if (this.scrollTimer) {
+					clearTimeout(this.scrollTimer);
+				}
+				// 延迟0.5秒(500毫秒)执行接口请求
+				this.scrollTimer = setTimeout(() => {
+					// this.getliveUser(true); // 加载更多数据
+				}, 1000); // 延迟时间:500毫秒
+			},
+			async getLiveMsg(liveItem) {
+				// 强化校验:确保 liveItem 存在且包含 liveId
+				if (!liveItem || !this.liveId) {
+					console.error('getLiveMsg 错误:无效的 liveItem', {
+						liveItem: liveItem,
+						currentIndex: this.currentSwiperIndex,
+					});
+					return; // 直接返回,不执行后续逻辑
+				}
+				try {
+					const res = await liveMsg(this.liveId, 30, 1);
+					if (res.code == 200) {
+						const rows = Array.isArray(res.rows) ? res.rows : [];
+						const reversedTalkList = [...rows];
+						// .reverse();
+						this.talklist = Array.isArray(reversedTalkList) ? reversedTalkList : [];
+						this.$nextTick(() => {
+							this.scrollIntoView = `list_${reversedTalkList.length - 1}`;
+						});
+					} else {
+						this.talklist = [];
+					}
+				} catch (error) {
+					this.talklist = [];
+					console.error("获取聊天记录失败:", error);
+				}
+			},
+
+			// 点击红包
+			onRed() {
+
+				if (!this.liveId) return;
+				if (!this.redInfo?.redId) return;
+				if (this.redTimer) {
+					clearInterval(this.redTimer);
+					this.redTimer = null;
+				}
+				let data = {
+					liveId: this.liveId,
+					userId: this.userinfo.userId,
+					redId: this.redInfo.redId,
+				}
+				liveRed(data).then(res => {
+						this.isShowRed = false
+						this.redCard = res
+						this.isShowRedCard = true
+					},
+					rej => {}
+				);
+			},
+			handleSearchInput() {
+				// 使用防抖优化性能,避免频繁请求
+				clearTimeout(this.searchTimer);
+				this.searchTimer = setTimeout(() => {
+					this.queryCollect();
+				}, 500); // 500毫秒延迟
+			},
+			// 显示购买提示信息
+			showPurchaseMessage() {
+				// 清除之前的定时器
+				if (this.purchasePromptTimer) {
+					clearTimeout(this.purchasePromptTimer);
+				}
+
+				// 显示提示
+				this.showPurchasePrompt = true;
+
+				// 2秒后自动隐藏
+				this.purchasePromptTimer = setTimeout(() => {
+					this.showPurchasePrompt = false;
+				}, 2000);
+			},
+			truncateString(str, maxLength) {
+				if (typeof str !== 'string' || str.length <= maxLength) {
+					return str;
+				}
+				return str.slice(0, maxLength) + '...'; // 截断后加省略号
+			},
+
+			// 去订单列表
+			goOrderList() {
+				uni.navigateTo({
+					url: "/pages_shopping/live/order"
+				})
+			},
+			// 视频错误处理
+			videoError(e, liveItem) {
+				if (!liveItem || !this.liveId) return;
+
+				// 初始化重试计数
+				if (this.videoRetryCounts[liveItem.liveId] === undefined) {
+					this.videoRetryCounts[liveItem.liveId] = 0;
+				}
+
+				// 限制重试次数
+				if (this.videoRetryCounts[liveItem.liveId] >= 3) {
+					console.error(`直播间 ${this.liveId} 视频加载失败,停止重试`);
+					// 显示错误提示
+					uni.showToast({
+						title: "视频加载失败,请检查网络",
+						icon: 'none',
+						duration: 2000
+					});
+					return;
+				}
+
+				this.videoRetryCounts[this.liveId]++;
+
+				// 延迟重试
+				setTimeout(() => {
+					if (this.liveId === this.liveId) {
+						console.log(`第${this.videoRetryCounts[this.liveId]}次重试播放视频`);
+						this.playVideo(liveItem);
+					}
+				}, 2000);
+			},
+
+			// 修改获取直播信息方法
+			async getliving(liveId) {
+				if (!liveId) return;
+				const param = {
+					id: liveId
+				};
+
+				try {
+					const res = await getlive(param);
+					if (res.code !== 200) {
+						uni.showToast({
+							title: res.msg,
+							icon: 'none'
+						});
+						return;
+					}
+					this.liveItem = res.data;
+					this.talklist = Array.isArray((res.data || {}).talklist) ? res.data.talklist : [];
+					if (res.data.status == 1) {
+						// 直播预告
+						this.liveCountdown = this.handleTime(this.liveItem.startTime, 0)
+						this.$set(this.liveItem, 'previewUrl', res.data.previewUrl);
+						this.$set(this.liveItem, 'livingUrl', ''); // 清空直播流
+						this.$set(this.liveItem, 'videoUrl', ''); // 清空回放视频
+					} else if (res.data.status == 2) {
+						if (res.data.liveType == 1) {
+							// 直播流
+							let cTime = Math.floor(Math.random() * 10000) + 1;
+							let livingUrl = res.data.flvHlsUrl + "&t=" + cTime;
+							console.log("地址在", this.liveItem.livingUrl)
+							this.$set(this.liveItem, 'livingUrl', livingUrl);
+							this.$set(this.liveItem, 'videoUrl', ''); // 清空回放视频
+						} else if (res.data.liveType === 2 || res.data.liveType === 3) {
+							// 回放视频   2录播 3直播回放
+							this.$set(this.liveItem, 'videoUrl', res.data.videoUrl);
+							this.$set(this.liveItem, 'livingUrl', ''); // 清空直播流
+						} else {
+							// 未开播
+							this.$set(this.liveItem, 'livingUrl', '');
+							this.$set(this.liveItem, 'videoUrl', '');
+						}
+					}
+
+					this.startTimeTimer(this.liveItem);
+					await this.getLiveMsg(this.liveItem);
+					await this.getliveViewData(this.liveItem);
+
+					this.$set(this.liveItem, 'autoplay', res.data.liveType !== 0);
+					this.$set(this.liveItem, 'showType', res.data.showType);
+					this.storeId = res.storeId;
+				} catch (err) {
+					console.error("获取直播信息失败:", err);
+					uni.showToast({
+						title: "获取直播信息失败",
+						icon: 'none'
+					});
+				}
+			}, // 设置视频播放
+			maskString(str, maskChar = '*') {
+				// 如果str是undefined或null,直接返回空字符串
+				if (!str) return '';
+				// 确保str是字符串(如果是数字等类型,先转为字符串)
+				const strVal = String(str);
+				return strVal.split('').map((char, index) => (index === 0 ? char : maskChar)).join(
+					'');
+			},
+
+			getPureDecimal(num, precision = 6) {
+				const decimalPart = Math.abs(num).toFixed(precision).split('.')[1];
+				return decimalPart?.replace(/0+$/, '') || ''; // 移除末尾多余的0
+			},
+
+			// 返回上一个页面并关闭WebSocket
+			goBack() {
+				// 暂停当前视频
+				const currentLive = this.liveItem;
+				if (currentLive) {
+					this.pauseVideo(currentLive);
+				}
+
+				// 关闭所有WebSocket连接
+				this.closeWebSocket();
+
+				// 导航返回
+				const pages = getCurrentPages();
+				if (pages.length > 1) {
+					uni.navigateBack();
+				} else {
+					uni.reLaunch({
+						url: '/pages_course/livingList'
+					});
+				}
+			},
+			// 点赞
+			async onLike() {
+				if (!this.liveId) return;
+				try {
+					const res = await liveDataLike(this.liveId);
+					if (res?.like) {
+						this.liveViewData.like++; // 只更新当前直播间的点赞数
+					} else {
+						uni.showToast({
+							title: res.msg,
+							icon: 'none'
+						});
+					}
+				} catch (error) {
+					console.error('点赞失败:', error);
+				}
+			},
+			//直播间点赞、关注、在线人数数据
+			async getliveViewData(liveItem) {
+				if (!liveItem || !this.liveId) return;
+				try {
+					const res = await getLiveViewData(this.liveId);
+					if (res.code == 200) {
+						// 强制响应式更新,确保数据实时显示
+						this.liveViewData = res;
+					}
+				} catch (error) {
+					console.error("获取直播间数据失败:", error);
+					// 失败时兜底,避免显示异常
+					this.liveViewData = {
+						like: 0,
+						watchCount: 0
+					};
+				}
+			},
+			// 去购买,跳商品详情
+			goShop(productId, goodsId) {
+				if (!this.liveId) return;
+				uni.navigateTo({
+					url: '/pages_shopping/live/goods?productId=' + productId + '&liveId=' + this.liveId +
+						'&goodsId=' +
+						goodsId + '&storeId=' + this.storeId
+				})
+			},
+
+			// 查询店铺
+			async queryCollect() {
+				if (!this.liveId) return;
+				if (this.inputInfo == null) this.inputInfo = ''
+				try {
+					const res = await liveStore(this.liveId, this.inputInfo);
+					if (res.code === 200) {
+						// 数据绑定到当前 liveItem,避免全局污染
+						this.products = Array.isArray(res.data) ? res.data : [];
+					}
+				} catch (error) {
+					console.error('获取小黄车商品失败:', error);
+				}
+			},
+			// 时间戳
+			initTime() {
+				const now = new Date();
+				this.timestamp = now.getTime(); // 例如:'2023-04-01 12:00:00'
+			},
+
+			openCart() {
+				this.queryCollect()
+				this.shopping = true
+			},
+			close() {
+				this.showadd = false
+			},
+
+			// 关闭小黄车
+			closeShop() {
+				this.shopping = false;
+			},
+			// 修改关闭WebSocket方法
+			// closeWebSocket() {
+			// 	this.socket?.close();
+			// },
+			// 关闭WebSocket连接(isManual:是否手动关闭)
+			closeWebSocket(isManual = true) {
+				this.isManualClose = isManual;
+				this.stopHeartBeat(); // 停止心跳
+				this.resetReconnectState(); // 重置重连状态
+
+				if (this.socket && this.isSocketOpen) {
+					try {
+						this.socket.close({
+							code: 1000, // 正常关闭状态码
+							reason: isManual ? "主动关闭" : "异常关闭"
+						});
+						console.log("WebSocket连接已关闭");
+					} catch (err) {
+						console.error("关闭WebSocket失败:", err);
+					}
+				}
+
+				// 重置连接状态
+				this.socket = null;
+				this.isSocketOpen = false;
+			},
+			startHeartBeat() {
+				this.stopHeartBeat(); // 先停止现有心跳,防止重复
+				this.sendHeartBeat(); // 立即发送一次心跳
+				// 按间隔循环发送心跳
+				this.heartBeatTimer = setInterval(() => {
+					this.sendHeartBeat();
+				}, this.heartBeatInterval);
+			},
+			initSocket() {
+				// 校验必要参数
+				if (!this.liveId) return;
+				if (!this.userinfo || !this.userinfo.userId) {
+					console.error("用户信息缺失,无法初始化WebSocket");
+					return;
+				}
+
+				// 清除之前的重连定时器
+				if (this.reconnectTimer) {
+					clearTimeout(this.reconnectTimer);
+					this.reconnectTimer = null;
+				}
+
+				// 生成签名(原有逻辑保留)
+				const signature = CryptoJS.HmacSHA256(
+					`${this.liveId}${this.userinfo.userId}${this.userType}${this.timestamp}`,
+					this.timestamp.toString()
+				).toString(CryptoJS.enc.Hex);
+
+				try {
+					// 【关键修复】使用临时变量存储基础地址,避免修改实例的 wsNewUrl
+					const baseWsUrl = 'wss://api.fhhx.runtzh.com/app/webSocket'; // 基础地址(固定)
+					// 首次拼接用 ?,后续用 &
+					let wsUrl =
+						`${baseWsUrl}?userId=${this.userinfo.userId}&liveId=${this.liveId}&userType=${this.userType}&timestamp=${this.timestamp}&signature=${signature}`;
+					if (this.qrFrom) wsUrl += this.qrFrom; // 追加 qrFrom(如果有)
+					console.log("WebSocket连接地址:", wsUrl); // 此时URL格式正确
+
+					// 创建Socket任务(使用临时变量 wsUrl,而非 this.wsNewUrl)
+					const socketTask = uni.connectSocket({
+						url: wsUrl, // 用临时变量
+						success: () => console.log("Socket连接请求发送成功"),
+						fail: (err) => {
+							console.error("Socket连接请求失败:", err);
+							this.handleReconnect();
+						}
+					});
+
+					// 连接打开事件
+					socketTask.onOpen((res) => {
+						console.log("WebSocket连接已打开");
+						this.socket = socketTask;
+						this.isSocketOpen = true;
+						this.resetReconnectState(); // 重连成功,重置状态
+
+						// 启动心跳检测
+						this.startHeartBeat();
+					});
+
+					// 消息接收事件
+					socketTask.onMessage((res) => {
+						try {
+							const data = JSON.parse(res.data);
+							// 处理服务端心跳响应(根据服务端协议调整cmd字段)
+							if (data.cmd === "heartBeatAck") {
+								console.log("收到心跳响应");
+								this.stopHeartBeat(); // 清除当前超时检测
+								this.startHeartBeat(); // 重新启动心跳周期
+								return;
+							}
+
+							// 原有消息处理逻辑(保留)
+							const targetLive = this.liveItem;
+							if (targetLive) {
+								this.handleSocketMessage(res, targetLive);
+							}
+						} catch (err) {
+							console.error("消息解析异常:", err);
+						}
+					});
+
+					// 连接关闭事件
+					socketTask.onClose((res) => {
+						console.log("WebSocket连接关闭:", res);
+						this.isSocketOpen = false;
+						this.stopHeartBeat();
+
+						// 非手动关闭且未达最大重连次数,触发重连
+						if (!this.isManualClose && this.reconnectCount < this.maxReconnectAttempts) {
+							this.handleReconnect();
+						}
+					});
+
+					// 连接错误事件
+					socketTask.onError((err) => {
+						console.error("WebSocket连接错误:", err);
+						this.isSocketOpen = false;
+						this.handleReconnect(); // 错误直接触发重连
+					});
+
+				} catch (e) {
+					console.error("创建WebSocket异常:", e);
+					this.handleReconnect();
+				}
+			},
+			handleTime(time, duration) {
+				const targetTimestamp = time + duration * 60 * 1000;
+				// 获取当前时间的时间戳(毫秒级)
+				const currentTimestamp = new Date().getTime();
+
+				// 计算时间差(目标时间 - 当前时间):若为负,说明目标时间已过
+				const timeDiffMs = targetTimestamp - currentTimestamp;
+				if (timeDiffMs <= 0) {
+					return false;
+				}
+
+				// 4. 毫秒转时分秒(核心运算)
+				const hours = Math.floor(timeDiffMs / (1000 * 60 * 60)); // 1小时 = 3600000毫秒
+				const minutes = Math.floor((timeDiffMs % (1000 * 60 * 60)) / (1000 * 60)); // 剩余毫秒转分钟
+				const seconds = Math.floor((timeDiffMs % (1000 * 60)) / 1000); // 剩余毫秒转秒
+
+				// 5. 补零处理(单位数转两位数,如 5 → 05)
+				const formatNum = (num) => num.toString().padStart(2, "0");
+				return {
+					hours: formatNum(hours),
+					minutes: formatNum(minutes),
+					seconds: formatNum(seconds)
+				};
+
+			},
+			// 处理Socket消息
+			handleSocketMessage(message, liveItem) {
+				let data = JSON.parse(message.data)
+				const socketMessage = data.data // 服务端返回的消息体
+				if (data.code == 200) {
+					const messageData = {
+						...socketMessage,
+						cmd: socketMessage.cmd || '', // 确保cmd字段存在
+						ts: Date.now() // 新增时间戳,用于排序(可选)
+					};
+
+					// 处理服务端返回的sendMsg消息,加入本地列表
+					if (socketMessage.cmd == 'sendMsg') {
+						if (!this.isSocketAvailable()) {
+							uni.showToast({
+								title: '连接已断开,正在重试...',
+								icon: 'none'
+							});
+							this.handleReconnect(); // 主动触发重连
+							return;
+						}
+						console.log("聊天", messageData)
+						const oldList = Array.isArray(this.talklist) ? this.talklist : [];
+						const newList = [...oldList, messageData];
+						this.talklist = newList;
+						// 1. 将消息追加到当前直播间的talklist中(响应式更新)
+						this.talklist = newList;
+						// 2. 延迟下一帧滚动到最新消息(确保DOM已更新)
+						this.$nextTick(() => {
+							const lastIndex = this.talklist.length - 1;
+							this.scrollIntoView = `list_${lastIndex}`;
+						});
+					} else if (socketMessage.cmd == 'red') {
+						this.redInfo = JSON.parse(socketMessage.data);
+						this.isShowRed = socketMessage.status === 1;
+						if (this.isShowRed) {
+							this.redTimer = setInterval(() => {
+								const redCountdown = this.handleTime(this.redInfo.updateTime, this.redInfo
+									.duration)
+								if (!redCountdown) {
+									this.isShowRed = false
+									clearInterval(this.redTimer)
+								}
+							}, 1000);
+						}
+
+					} else if (socketMessage.cmd == 'goods') {
+						this.goodsCard = JSON.parse(socketMessage.data);
+						this.isShowGoods = socketMessage.status == 1;
+
+					} else if (socketMessage.cmd == 'lottery') {
+
+						const parsedData = JSON.parse(socketMessage.data || '{}'); // 默认为空对象
+						this.lotteryInfo = parsedData || {}; // 确保是对象,避免 null
+						this.isShowLottery = socketMessage.status === 1;
+						if (socketMessage.status != 1) {
+							this.isShowLotteryPop = false
+						}
+						// 清除已有定时器(无论状态是否为1,先清掉旧的)
+						clearTimeout(this.lotteryTimer);
+
+						if (this.isShowLottery) {
+							this.lotteryTimer = setInterval(() => {
+								this.countdown = this.handleTime(this.lotteryInfo.updateTime, this.lotteryInfo
+									.duration)
+								if (!this.countdown) {
+									console.log("倒计时", this.countdown)
+									this.isShowLottery = false;
+									this.isShowLotteryPop = false;
+									clearInterval(this.lotteryTimer)
+								}
+							}, 1000);
+
+
+						} else {
+							this.isShowLottery = false
+						}
+					} else if (socketMessage.cmd == 'entry' || socketMessage.cmd ==
+						'out') {
+						// 1. 将消息追加到当前直播间的talklist中(响应式更新)
+						this.inAndOut = socketMessage;
+						this.showWelcomeMessage = false;
+						this.showWelcomeMessage = true;
+						this.getliveUser(false);
+						if (this.welcomeTimer) clearTimeout(this.welcomeTimer);
+						this.welcomeTimer = setTimeout(() => {
+							this.showWelcomeMessage = false;
+						}, 1000);
+					} else if (socketMessage.cmd == 'Integral') {
+						this.integral = {
+							msg: socketMessage.msg,
+							status: true
+						}
+					} else if (socketMessage.cmd == 'LotteryDetail') {
+						try {
+							// 1. 兜底空数据为 "[]",避免 JSON.parse(undefined) 报错
+							const parseData = socketMessage.data || '[]';
+							// 2. 解析 JSON 并捕获异常
+							const prizeData = JSON.parse(parseData);
+							// 3. 强制转为数组
+							this.prizeInfo = Array.isArray(prizeData) ? prizeData : [];
+						} catch (err) {
+							console.error('解析抽奖结果失败:', err);
+							// 4. 异常时兜底为数组
+							this.prizeInfo = [];
+						}
+						this.isShowPrize = true;
+						this.isShowLottery = false;
+						this.isShowLotteryPop = false;
+					} else if (socketMessage.cmd == 'blockUser') {
+						uni.removeStorage({
+							key: 'AppToken',
+							success: () => {
+								uni.reLaunch({
+									url: '/pages/auth/login'
+								});
+							}
+						});
+					}
+				} else {
+					uni.showToast({
+						title: data.msg,
+						icon: 'none'
+					});
+				}
+			},
+			sendMsg(retries = 1) { 
+			  // 防止连续点击发送两次(短时锁定)
+			  if (this.isSending) return;
+			  this.isSending = true;
+			  setTimeout(() => {
+			    this.isSending = false;
+			  }, 800); // 800ms 内禁止再次发送
+			
+			  const text = (this.value || '').trim();
+			  if (!text) {
+			    uni.showToast({ title: "不能发送空消息", icon: 'none' });
+			    return;
+			  }
+			
+			  // 1. 连接状态校验:使用定义后的 retries
+			  if (!this.isSocketAvailable()) {
+			    if (retries > 0) {
+			      uni.showToast({ title: `连接不稳定,正在重试(${retries}次)...`, icon: 'none' });
+			      // 延迟500ms重试,重试次数减1
+			      setTimeout(() => this.sendMsg(retries - 1), 500);
+			    } else {
+			      uni.showToast({ title: '连接已断开,发送失败', icon: 'none' });
+			      this.value = text; // 恢复输入框内容
+			    }
+			    return;
+			  }
+			
+			  const liveId = this.liveId;
+			  this.value = ''; // 立即清空输入框,提升体验
+			
+			  // 构造发送给服务端的消息数据
+			  const data = {
+			    liveId,
+			    userId: this.userinfo.userId,
+			    userType: 0,
+			    cmd: "sendMsg",
+			    msg: text,
+			    nickName: this.userinfo.nickName || this.userData.nickname,
+			    avatar: this.userinfo.avatar
+			  };
+			
+			  // 发送socket消息
+			  try {
+			    this.socket.send({
+			      data: JSON.stringify(data),
+			      success: () => {
+			        console.log("发送成功");
+			        this.value = '';
+			      },
+			      fail: (err) => {
+			        console.error("消息发送失败:", err);
+			        // 2. 发送失败重试:使用定义后的 retries
+			        if (retries > 0) {
+			          uni.showToast({ title: `发送失败,正在重试(${retries}次)...`, icon: 'none' });
+			          setTimeout(() => this.sendMsg(retries - 1), 500);
+			        } else {
+			          uni.showToast({ title: '发送失败,请稍后再试', icon: 'none' });
+			          this.value = text; // 恢复输入框内容
+			        }
+			      }
+			    });
+			  } catch (err) {
+			    console.error("发送消息异常:", err);
+			    if (retries > 0) {
+			      setTimeout(() => this.sendMsg(retries - 1), 500);
+			    } else {
+			      uni.showToast({ title: '发送失败,请稍后再试', icon: 'none' });
+			      this.value = text;
+			    }
+			  }
+			}
+
+		}
+	};
+</script>
+
+<style scoped lang="scss">
+	.swiper-wrapper {
+		position: relative;
+		width: 100%;
+		height: 100vh;
+		overflow: hidden;
+		background-color: #000000;
+
+		.container {
+			width: 100%;
+			height: 100%;
+			position: relative;
+			transition: opacity 0.3s ease;
+			transform: translateZ(0); // 开启GPU加速
+			will-change: opacity; // 告诉浏览器提前优化该属性
+		}
+
+
+	}
+
+
+
+	.loading-tip {
+		position: absolute;
+		top: 50%;
+		left: 50%;
+		transform: translate(-50%, -50%);
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		justify-content: center;
+		z-index: 10;
+
+		.loading-text {
+			color: #ffffff;
+			font-size: 28rpx;
+			margin-top: 20rpx;
+		}
+	}
+
+	.loading-more,
+	.no-more {
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		padding: 20rpx 0;
+		color: #999;
+		font-size: 24rpx;
+	}
+
+	.loading-more {
+		flex-direction: column;
+	}
+
+
+
+	/* button自带样式清除 */
+	button::after {
+		border: none !important;
+		padding: 0 !important;
+		margin: 0 !important;
+	}
+
+	button {
+		background-color: transparent !important;
+		padding: 0 !important;
+		line-height: inherit !important;
+		margin: 0 !important;
+		width: auto !important;
+		font-weight: 500 !important;
+		border-radius: none !important;
+	}
+
+	.welcome-message {
+		position: fixed;
+		width: 100%;
+		bottom: 38vh;
+		left: 50%;
+		transform: translateX(-50%);
+		color: white;
+		padding: 10px 20px;
+		border-radius: 20px;
+		z-index: 10;
+		transition: opacity 0.3s ease;
+	}
+
+	@keyframes fadeOut {
+		from {
+			opacity: 1;
+		}
+
+		to {
+			opacity: 0;
+		}
+	}
+
+	.send {
+		background-color: #fafafa;
+		border-radius: 28rpx;
+		padding: 14rpx 16rpx;
+		color: #181818;
+		font-weight: 500;
+	}
+
+	.talk-list {
+		border-radius: 30rpx;
+		background-color: rgba(33, 33, 33, 0.5);
+		padding: 10rpx 30rpx;
+	}
+
+	.content {
+		position: relative;
+		z-index: 2;
+		height: 100%;
+		width: 100%;
+		top: 0;
+		left: 0;
+		display: flex;
+		flex-direction: column;
+		justify-content: space-between;
+
+		.activity-box {
+			position: fixed;
+			top: 188rpx;
+			left: 30rpx;
+			z-index: 5;
+			display: flex;
+			align-items: center;
+
+			.item-box {
+				border-radius: 16rpx;
+				background-color: rgba(77, 77, 77, 0.5);
+				width: 90rpx;
+				height: 100rpx;
+				margin-right: 20rpx;
+				position: relative;
+
+				.tip {
+					position: absolute;
+					width: 100%;
+					bottom: 0;
+					color: #fafcff;
+					font-size: 26rpx;
+					background-color: rgba(15, 15, 15, 0.8);
+					border-radius: 16rpx;
+					text-align: center;
+				}
+
+				.item {
+					margin: 0 auto;
+					padding: 10rpx 0;
+
+					.img {
+						height: 100%;
+					}
+				}
+			}
+		}
+
+
+		.side-group {
+			position: absolute;
+			top: 65%;
+			right: 30rpx;
+			z-index: 1000;
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+
+			.side-item {
+				font-weight: 500;
+				font-size: 24rpx;
+				color: #FFFFFF;
+				margin-bottom: 32rpx;
+				text-align: center;
+
+				.image {
+					width: 72rpx;
+					height: 72rpx;
+				}
+			}
+		}
+
+		.content-top {
+			width: 100%;
+			margin-top: 48rpx;
+			display: flex;
+			justify-content: space-between;
+			padding: 0 24rpx;
+			box-sizing: border-box;
+
+
+
+			.sum {
+				width: 80rpx;
+				height: 52rpx;
+				background: rgba(0, 0, 0, 0.5);
+				border-radius: 26rpx 26rpx 26rpx 26rpx;
+				font-size: 24rpx;
+				color: #FFFFFF;
+				text-align: center;
+				line-height: 52rpx;
+
+			}
+		}
+
+		.follow-btn {
+			padding: 8rpx 16rpx;
+			background: linear-gradient(270deg, #FF5C03 0%, #FFAC64 100%);
+			border-radius: 26rpx;
+			font-weight: 500;
+			font-size: 26rpx;
+			color: #FFFFFF;
+		}
+	}
+
+	.trailer-box {
+		position: relative;
+		top: 15%;
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		color: #ffffff;
+		padding: 20rpx;
+
+		.countdown-item {
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+
+			.white {
+				width: 60rpx;
+				height: 60rpx;
+				text-align: center;
+				overflow: hidden;
+				background: #FFFFFF;
+				border-radius: 8rpx;
+				margin: 30rpx 10rpx 0;
+				font-weight: 600;
+				font-size: 24rpx;
+				color: #000000;
+				line-height: 60rpx;
+			}
+		}
+
+		.item {
+			width: 100%;
+			height: 400rpx;
+		}
+
+		.name {
+
+			font-size: 34rpx;
+		}
+
+		.img {
+			margin-bottom: 40rpx;
+			width: 240rpx;
+			height: 240rpx;
+		}
+
+		.title {
+			margin-top: 30rpx;
+			font-size: 42rpx;
+			font-weight: 500;
+		}
+
+	}
+
+
+	.videolist {
+		position: relative;
+		height: 100vh;
+		width: 100%;
+
+		.video {
+			height: 100vh;
+			width: 100%;
+			background-color: rgba(57, 57, 57, 0.4);
+
+			.item {
+				width: 100%;
+				height: 100%;
+			}
+
+			.time {
+
+				color: #ffffff;
+				font-size: 20rpx;
+				margin-left: 10rpx;
+			}
+
+			.lable {
+				position: absolute;
+				top: 50rpx;
+				right: 16rpx;
+				background-color: rgba(57, 57, 57, 0.6);
+				padding: 4rpx 10rpx;
+				color: #fff;
+				border-radius: 15rpx;
+			}
+		}
+
+		.video_row {
+			position: absolute;
+			top: 23%;
+			max-height: 450rpx;
+			z-index: 99;
+		}
+	}
+
+	.prize-card {
+		width: 504rpx;
+		padding: 40rpx 40rpx 30rpx;
+		box-sizing: border-box;
+		display: flex;
+		flex-direction: column;
+		border-radius: 20rpx;
+		// overflow: hidden;
+		align-items: center;
+		background: linear-gradient(180deg, #f76446 0%, #ffd7d5 27%, #ffffff 100%);
+		position: relative;
+
+		.nav-img {
+			width: 311rpx;
+			position: absolute;
+			top: -122rpx;
+			left: 50%;
+			transform: translateX(-50%);
+
+		}
+
+		.title {
+			color: #C32008;
+			font-size: 34rpx;
+			font-weight: 600;
+			margin: 20rpx 0 40rpx;
+		}
+
+		.prize-content {
+			width: 100%;
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			font-size: 28rpx;
+			margin: 10rpx 0;
+
+
+
+			.txt {
+				font-weight: 600;
+			}
+		}
+
+		.tip {
+			font-size: 28rpx;
+			color: #414141;
+			margin: 40rpx 0;
+		}
+
+		.button {
+			width: 200rpx;
+			height: 70rpx;
+			line-height: 70rpx;
+			background: linear-gradient(180deg, #ff7c30 0%, #FF3A1E 100%);
+			border-radius: 28rpx;
+			font-weight: 500;
+			font-size: 32rpx;
+			color: #ffffff;
+			text-align: center;
+		}
+	}
+
+	.red-card {
+		width: 550rpx;
+		height: 636rpx;
+		position: relative;
+
+		.img {
+			position: absolute;
+			width: 100%;
+			height: 100%;
+		}
+
+		.red-content {
+			position: relative;
+			z-index: 5;
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+
+			.title {
+				font-size: 36rpx;
+				color: #FF3A1E;
+				margin: 180rpx 0 90rpx;
+			}
+
+			.txt {
+				font-size: 28rpx;
+				color: #FFECC3;
+				margin: 80rpx 0 40rpx;
+			}
+
+			.button {
+				width: 392rpx;
+				height: 96rpx;
+				line-height: 96rpx;
+				background: linear-gradient(180deg, #FFF4D5 0%, #FFE5B1 100%);
+				border-radius: 48rpx 48rpx 48rpx 48rpx;
+				font-weight: 600;
+				font-size: 36rpx;
+				color: #C32008;
+				text-align: center;
+			}
+		}
+
+	}
+
+	.integral-box {
+		min-width: 400rpx;
+		max-width: 600rpx;
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		border-radius: 20rpx;
+		overflow: hidden;
+
+		.top {
+			width: 100%;
+			position: relative;
+
+			.title {
+				width: 100%;
+				font-weight: 600;
+				font-size: 40rpx;
+				color: #FFFFFF;
+				text-shadow: 0px 4px 8px rgba(255, 89, 2, 0.8);
+				position: absolute;
+				top: 50rpx;
+				text-align: center;
+			}
+
+			.photo {
+				width: 100%;
+
+			}
+		}
+
+		.item {
+			padding: 20rpx;
+
+			.title {
+				font-weight: 500;
+				font-size: 32rpx;
+				text-align: center;
+			}
+
+			.button {
+				font-size: 32rpx;
+				margin-top: 20rpx;
+				background: linear-gradient(270deg, #ff4702 0%, #fe6304 100%);
+				color: #fff;
+				text-align: center;
+				padding: 18rpx 60rpx;
+				border-radius: 10rpx;
+				font-weight: 500;
+			}
+		}
+	}
+
+	.goods {
+		position: fixed;
+		bottom: 140rpx;
+		right: 100rpx;
+		z-index: 5;
+		background-color: #fff;
+		border-radius: 20rpx;
+		overflow: hidden;
+		width: 280rpx;
+		padding: 4rpx;
+
+		.top {
+			position: absolute;
+			top: 4rpx;
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			color: #fff;
+			width: 100%;
+			padding-right: 10rpx;
+			box-sizing: border-box;
+
+			.left {
+				background-color: rgba(0, 0, 0, 0.8);
+				padding: 12rpx;
+				font-size: 22rpx;
+				display: flex;
+				justify-content: space-between;
+				align-items: center;
+				border-radius: 10rpx;
+			}
+
+
+		}
+
+		.photo {
+			width: 100%;
+			height: 180rpx;
+			border-radius: 16rpx 16rpx 0 0;
+			overflow: hidden;
+		}
+
+
+
+		.item {
+			padding: 4rpx;
+
+			.price {
+				font-size: 30rpx;
+
+				.red {
+					color: #FF5701;
+					font-weight: 600;
+					margin-right: 10rpx;
+				}
+
+				.del {
+					color: #828282;
+					font-weight: 500;
+					font-size: 28rpx;
+					text-decoration: line-through
+				}
+			}
+
+			.title {
+				font-weight: 500;
+				font-size: 30rpx;
+				margin: 10rpx 0 12rpx;
+			}
+
+			.button {
+				background: linear-gradient(270deg, #ff4702 0%, #fe6304 100%);
+				color: #fff;
+				text-align: center;
+				padding: 16rpx 0;
+				border-radius: 10rpx;
+				font-weight: 500;
+				font-size: 30rpx;
+			}
+
+		}
+
+	}
+
+	.icon-bg {
+		background-color: rgba(57, 57, 57, 0.8);
+		border-radius: 50%;
+		width: 88rpx;
+		height: 88rpx;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		transition: transform 0.2s ease;
+
+	}
+
+	.list {
+		width: 80%;
+		margin-bottom: 20rpx;
+		animation: xxxawdawd .2s;
+	}
+
+	@keyframes xxxawdawd {
+		from {
+			margin-top: 0rpx;
+			opacity: 0;
+		}
+
+		to {
+			margin-top: 20rpx;
+			opacity: 1;
+		}
+	}
+
+	.shop-prompt {
+		position: absolute;
+		bottom: 750rpx;
+		left: 24rpx;
+		padding: 6rpx 20rpx;
+		background: rgba(230, 154, 34, 0.7);
+		border-radius: 24rpx;
+		z-index: 9;
+		font-weight: 500;
+		color: #FFFFFF;
+		transition: opacity 0.3s ease;
+	}
+
+
+
+	.red-box {
+
+		.button {
+			margin: 0 auto;
+			width: 80%;
+			line-height: 88rpx;
+			height: 88rpx;
+			background: linear-gradient(90deg, #FF5701 0%, #FFB501 100%);
+			box-shadow: 0rpx 8rpx 8rpx 0rpx rgba(238, 124, 80, 0.2);
+			border-radius: 44rpx 44rpx 44rpx 44rpx;
+			font-weight: 600;
+			font-size: 32rpx;
+			color: #FFFFFF;
+			text-align: center;
+		}
+	}
+
+	.view-box {
+		position: relative;
+		height: 40vh;
+		/* 设置弹出层高度为视窗高度的70% */
+		padding: 40rpx 0rpx 120rpx;
+		box-sizing: border-box;
+		display: flex;
+		flex-direction: column;
+
+		.scroll-content {
+			flex: 1;
+			overflow-y: auto;
+			padding: 0 40rpx;
+		}
+
+		.bottom {
+			padding: 20rpx 40rpx;
+			position: absolute;
+			bottom: 0;
+			width: 100%;
+			box-shadow: 0rpx -4rpx 10rpx 0rpx rgba(195, 195, 195, 0.3);
+			background: #fff;
+		}
+	}
+
+	// 抽奖
+	.prize-box {
+		position: relative;
+
+		.nav-img {
+			width: 311rpx;
+			position: absolute;
+			top: -122rpx;
+			left: 50%;
+			transform: translateX(-50%);
+
+		}
+
+		.bg-img {
+			position: absolute;
+			top: 0;
+			left: 0;
+			width: 100%;
+			height: 100%;
+			z-index: 1;
+
+		}
+
+		.prize-content {
+			position: relative;
+			z-index: 2;
+			padding: 24rpx 0 68rpx;
+
+			.white-item {
+				width: 40rpx;
+				height: 40rpx;
+				text-align: center;
+				overflow: hidden;
+				background: #FFFFFF;
+				box-shadow: inset 0rpx 2rpx 8rpx 0rpx #FFEBB2;
+				border-radius: 8rpx;
+				margin: 4rpx;
+				font-weight: 600;
+				font-size: 24rpx;
+				color: #F85D22;
+				line-height: 40rpx;
+			}
+
+			.item-group {
+				width: 100%;
+			}
+
+			.point-group {
+				margin: 20rpx 0 50rpx;
+				display: flex;
+				gap: 6rpx;
+
+				.item {
+					width: 20rpx;
+					height: 8rpx;
+					background: rgba(255, 255, 255, 0.5);
+					border-radius: 4rpx 4rpx 4rpx 4rpx;
+				}
+
+				.selected {
+					background: #FFEB66;
+				}
+			}
+
+			.button {
+				margin-top: 30rpx;
+				width: 520rpx;
+				height: 88rpx;
+				line-height: 88rpx;
+				background: linear-gradient(180deg, #FFF4D6 0%, #FFEB66 100%);
+				box-shadow: 0rpx 10rpx 8rpx 4rpx rgba(246, 82, 25, 0.5);
+				border-radius: 44rpx;
+				font-weight: 500;
+				font-size: 36rpx;
+				color: #F4410B;
+				text-align: center;
+
+			}
+		}
+
+
+	}
+
+	.shoppop {
+		padding: 22rpx 16rpx;
+
+		.shoppop-top {
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			padding: 0 16rpx 22rpx;
+
+			.search-input {
+				width: 414rpx;
+				height: 76rpx;
+				background: #FFFFFF;
+				border-radius: 36rpx;
+				margin-left: 20rpx;
+				padding: 0 32rpx;
+				box-sizing: border-box;
+				font-size: 24rpx;
+				margin-right: 24rpx;
+
+			}
+
+			.search-top {
+				font-size: 20rpx;
+				color: #222222;
+			}
+		}
+
+
+		.shop-list {
+			overflow: hidden;
+
+			.list-item {
+				display: flex;
+				align-items: center;
+				padding: 20rpx 16rpx;
+				background: #FFFFFF;
+				border-radius: 16rpx;
+				margin-bottom: 16rpx;
+
+				.goods-img {
+					width: 200rpx;
+					height: 200rpx;
+					border-radius: 16rpx;
+					overflow: hidden;
+					position: relative;
+					margin-right: 24rpx;
+
+					.img {
+						width: 100%;
+						height: 100%;
+					}
+
+					.goods-label {
+						position: absolute;
+						top: 0;
+						width: 64rpx;
+						height: 40rpx;
+						background: rgba(0, 0, 0, 0.5);
+						border-radius: 16rpx 0rpx 16rpx 0rpx;
+						text-align: center;
+						font-weight: 500;
+						font-size: 28rpx;
+						color: #FFFFFF;
+					}
+				}
+
+				.goods-right {
+					flex: 1;
+
+					.goods-title {
+						font-weight: 500;
+						font-size: 30rpx;
+						color: #000000;
+						margin-bottom: 10rpx;
+
+					}
+
+					.goods-details {
+						font-size: 24rpx;
+						color: #999999;
+						margin: 10rpx 0 20rpx;
+					}
+
+					.goods-people {
+						font-size: 22rpx;
+						color: #E69A22;
+						height: 56rpx;
+					}
+
+					.goods-shop {
+						display: flex;
+						justify-content: space-between;
+
+						.nummber {
+							color: #FF5C03;
+							font-size: 22rpx;
+							font-weight: 500;
+						}
+
+						.btn-group {
+							text-align: center;
+							line-height: 56rpx;
+
+							.collect-btn {
+								width: 72rpx;
+								background: #F5F7FA;
+								border-radius: 8rpx 0rpx 0rpx 8rpx;
+
+							}
+
+							.shop-btn {
+								width: 152rpx;
+								background: linear-gradient(270deg, #FF5C03 0%, #FFAC64 100%);
+								border-radius: 0rpx 8rpx 8rpx 0rpx;
+								font-weight: 500;
+								font-size: 30rpx;
+								color: #FFFFFF;
+
+							}
+						}
+					}
+				}
+			}
+		}
+	}
+</style>

+ 149 - 0
pages_course/livingList.vue

@@ -0,0 +1,149 @@
+<template>
+	<view class="content">
+		<mescroll-body bottom="0" ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback"
+			:down="downOption" :up="upOption">
+			<view class="list">
+				<view class="list-item" @click="goLive(item)" v-for="(item,index) in list" :key="index">
+					<image class="img" v-if="item.liveImgUrl" :src="item.liveImgUrl"></image>
+					<view class="info">
+						<text>{{item.liveName}}</text>
+					</view>
+				</view>
+			</view>
+		</mescroll-body>
+	</view>
+</template>
+
+<script>
+	import {
+		liveList
+	} from '@/api/living.js'
+	import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
+	export default {
+		mixins: [MescrollMixin],
+		data() {
+			return {
+
+				list: [],
+				downOption: {
+					offset: 80,
+					use: true,
+					auto: false
+				},
+				upOption: {
+					use: true,
+					auto: true,
+					page: {
+						num: 0,
+						size: 10
+					}
+				},
+				mescroll: null,
+			}
+		},
+		onLoad() {
+			// if (!uni.getStorageSync("AppToken")) {
+			// 	uni.navigateTo({
+			// 		url: '/pages/auth/login'
+			// 	});
+			// }
+		},
+		onUnload() {
+
+		},
+		methods: {
+			mescrollInit(mescroll) {
+				this.mescroll = mescroll;
+			},
+
+			// 下拉刷新回调
+			downCallback(mescroll) {
+				this.list = [];
+				mescroll.resetUpScroll();
+			},
+
+			// 上拉加载回调
+			upCallback(mescroll) {
+				const pageNum = mescroll.num;
+				const pageSize = mescroll.size;
+
+				let data = {
+					pageSize: pageSize,
+					pageNum: pageNum,
+				}
+				liveList(data).then(res => {
+					if (!res) {
+						mescroll.endErr();
+						return;
+					}
+					if (res.code == 200) {
+						let curPageData = Array.isArray(res.data.list) ? res.data.list : [];
+						let totalSize = Number(res.data.total) || 0;
+						if (pageNum === 1) {
+							this.list = [];
+						}
+						this.list = this.list.concat(curPageData);
+
+						mescroll.endBySize(curPageData.length, totalSize);
+					} else {
+						mescroll.endErr();
+						uni.showToast({
+							title: res.msg,
+							icon: 'none'
+						});
+					}
+				}).catch(err => {
+					mescroll.endErr();
+				});
+			},
+
+			goLive(item) {
+				uni.navigateTo({
+					url: `./living?liveId=${item.liveId}&immediate=true`
+				});
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.content {
+		background-color: #111;
+		min-height: 100vh;
+		padding: 24rpx;
+
+		.list {
+			display: flex;
+			justify-content: space-between;
+			flex-wrap: wrap;
+
+			.list-item {
+				border-radius: 16rpx;
+				width: 340rpx;
+				height: 600rpx;
+				background-color: #0d0d0d;
+				margin-bottom: 24rpx;
+				overflow: hidden;
+				position: relative;
+
+				.img{
+					width: 100%;
+					height: 100%;
+				}
+
+				.info {
+					position: absolute;
+					left: 20rpx;
+					bottom: 14rpx;
+					right: 20rpx;
+					color: #ffffff;
+					display: flex;
+					align-items: center;
+				}
+			}
+			.list-item:nth-child(2n) {
+				margin-right: 0;
+			}
+		}
+	}
+</style>

+ 161 - 0
pages_course/reward.vue

@@ -0,0 +1,161 @@
+<template>
+	<view class="answerPopup-box bg">
+		<!-- 正确 -->
+		<image class="tipimg" src="https://zkzh-2025.oss-cn-beijing.aliyuncs.com/shop/images/course_answer_img.png"
+			mode="aspectFill"></image>
+		<view class="answerPopup-title">恭喜你,回答正确</view>
+		<view class="answerPopup-desc">您有一份奖励待领取哦</view>
+		<view class="answerPopup-btn" @click="handleReceive">领取</view>
+		<!-- <view class="footer-tips">重庆云联融智提供技术支持</view> -->
+	</view>
+</template>
+
+<script>
+	// import wx from 'jweixin-module';
+	// import { initJssdk } from "@/utils/common.js"
+	export default {
+		data() {
+			return {
+				mchId:'',
+				packageInfo: ''
+			}
+		},
+		methods: {
+			handleReceive() {
+				this.packageInfo = uni.getStorageSync('receive_package') || ''
+				this.mchId = uni.getStorageSync('mchId') || ''
+				// this.initWXConfig(this.packageInfo)
+				this.$nextTick(()=>{
+					this.handleTest()
+				})
+			},
+			handleTest() {
+				const that = this
+				// console.log(that.mchId)
+				// console.log('wx3de90a39feb8107a',wx.getAccountInfoSync().miniProgram.appId)
+				// console.log(that.packageInfo)
+				if (wx.canIUse('requestMerchantTransfer')) {
+				  wx.requestMerchantTransfer({
+				    mchId:that.mchId,
+				    appId:wx.getAccountInfoSync().miniProgram.appId,
+				    package:that.packageInfo,
+				    success: (res) => {
+				    },
+				    fail: (res) => {
+				    },
+				  });
+				} else {
+				  wx.showModal({
+				    content: '你的微信版本过低,请更新至最新版本。',
+				    showCancel: false,
+				  });
+				}
+				// wx.ready(() => {
+				// 	// config信息验证后会执行ready方法,所有接口调用都必须在config之后
+				// 	wx.checkJsApi({
+				// 		jsApiList: ['requestMerchantTransfer'],
+				// 		success: function(res) {
+				// 			if (res.checkResult['requestMerchantTransfer']) {
+				// 				WeixinJSBridge.invoke('requestMerchantTransfer', {
+				// 						mchId: that.mchId,
+				// 						appId: appId,
+				// 						package: packageVal,
+				// 					},
+				// 					function(res) {
+				// 						if (res.err_msg === 'requestMerchantTransfer:ok') {
+				// 							// res.err_msg将在页面展示成功后返回应用时返回success,并不代表付款成功
+				// 						}
+				// 					}
+				// 				);
+				// 			} else {
+				// 				alert('你的微信版本过低,请更新至最新版本。');
+				// 			}
+				// 		}
+				// 	});
+				// });
+				// wx.error(function(res){
+				//   // config信息验证失败会执行error函数,如签名过期导致验证失败,具体错误信息可以打开config的debug模式查看,也可以在返回的res参数中查看,对于SPA可以在这里更新签名。
+				// });
+			},
+			initWXConfig(packageVal) {
+				const isWechat = String(navigator.userAgent.toLowerCase().match(/MicroMessenger/i)) === "micromessenger";
+				if(isWechat) {
+					let url = window.location.href.split('#')[0]
+					initJssdk((data)=>{
+						this.handleTest(packageVal,data.appId,data.mchId)
+					},url)
+				} else {
+					uni.showToast({
+						title: '请在微信浏览器中打开'
+					})
+				}
+			}
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	@mixin u-flex($flexD, $alignI, $justifyC) {
+		display: flex;
+		flex-direction: $flexD;
+		align-items: $alignI;
+		justify-content: $justifyC;
+	}
+	.footer-tips {
+		width: 100%;
+		position: absolute;
+		left: 0;
+		bottom: 14rpx;
+		text-align: center;
+		font-family: PingFang SC,PingFang SC;
+		font-weight: 500;
+		font-size: 12px;
+		color: #bbb;
+	}
+	.answerPopup {
+		&-box {
+			width: 100%;
+			height: 100vh;
+			background: linear-gradient(180deg, #FFFAF6 50%, #FEECD8 100%);
+			background-color: #fff;
+			font-weight: 400;
+			box-sizing: border-box;
+			position: relative;
+			@include u-flex(column, center, center);
+			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: 30rpx;
+			font-size: 28rpx;
+			color: #757575;
+		}
+	
+		&-btn {
+			width: 464rpx;
+			height: 84rpx;
+			margin-top: 10vh;
+			margin-bottom: 16vh;
+			background: #FF5C03;
+			border-radius: 42rpx;
+			font-weight: 500;
+			font-size: 32rpx;
+			color: #FFFFFF;
+			text-align: center;
+			line-height: 84rpx;
+		}
+	}
+</style>

+ 2126 - 0
pages_course/video.vue

@@ -0,0 +1,2126 @@
+<template>
+	<view class="content">
+		<view class="header-nav" :style="{height: `calc(88rpx + ${statusBarHeight}px)`,paddingTop: statusBarHeight + 'px'}">
+			<view class="arrow-left-warning" @click="feedback">
+				<image :src="baseUrl+'/app/image/warning.png'"></image>
+				<text>投诉</text>
+			</view>
+			<view class="header-title" :style="{width:menuButtonLeft + 'px',height:menuButtonH+'px',lineHeight:menuButtonH+'px'}">{{courseInfo.title}}</view>
+		</view>
+		<view class="video-box">
+			<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"
+			@controlstoggle="controlstoggle"
+			@waiting="getWaiting"
+			:title="courseInfo.title"
+			style="width: 100%;height: 420rpx;" 
+			:poster="poster"  
+			id="video-content-box"  
+			controls
+			:show-fullscreen-btn="true"
+			: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"
+			>
+			<!-- :danmu-list="danmuList"
+			enable-danmu
+			danmu-btn -->
+			<!-- 弹幕展示 -->
+			<template v-if="showDanmu==1&&openCommentStatus==2">
+				<text v-for="(item, index) in activeDanmus" :key="item.commentId" class="danmu-item danmuMove"
+					:style="item.danmustyle" @animationend="animationend(item,index)">
+					{{ item.content }}
+				</text>
+			</template>
+				<cover-view class="video-danmu-btnbox" :style="{display: openCommentStatus==2&&isfull&&crtShow&&isLogin&&isAddKf==1 ? 'block':'none'}">
+					<cover-image class="video-danmu-image"
+					 :src="baseUrl+'/app/image/danmu_set.png'"
+					 @click="openDanmu(1)"></cover-image>
+				</cover-view>
+			</video>
+		</view>
+		<!-- 弹幕方法 -->
+		<commentBox
+			v-if="openCommentStatus==2"
+			ref="danmuBox" 
+			:height="height" 
+			:urlOption="urlOption" 
+			:time="playTime"
+			:showDanmu="showDanmu"
+			:viewCommentNum="viewCommentNum"
+			:openCommentStatus="openCommentStatus"
+			@setInputText="setInputText" 
+			@getScrollTop="getScrollTop"
+			@getMore="getMore"
+			@getActiveDanmus="getActiveDanmus"></commentBox>
+		<view id="title-contentnav">
+			<view class="title-content" v-if="openCommentStatus!=1">
+				<!-- 答题时展示小节课程名,其他展示课程名 -->
+				<!-- 小节课程名 -->
+				<view class="subtitlebox" v-if="isLogin&&isAddKf==1">
+					{{courseInfo.title|| ''}}
+				</view>
+				<!-- 课程名字 -->
+				<view class="miantitlebox" v-else>
+					{{courseInfo.courseName|| ''}}
+				</view>
+				<!-- 投诉 -->
+				<!-- <view class="warning" @click="feedback" v-if="isLogin&&videoId">
+					<image :src="baseUrl+'/app/image/warning.png'"></image>
+					<text>投诉</text>
+				</view> -->
+			</view>
+			<view class="tabbox-bar" v-if="openCommentStatus==1">
+				<view class="tabbox">
+					<view :class="currentTab == nav.id ? 'tabbox-active':''" v-for="nav in navList" :key="nav.id" @click="handleTab(nav.id)">{{nav.name}}</view>
+				</view>
+				<!-- 投诉 -->
+				<!-- <view class="warning" @click="feedback">
+					<image :src="baseUrl+'/app/image/warning.png'"></image>
+					<text>投诉</text>
+				</view> -->
+			</view>
+		</view>
+		<scroll-view
+		class="scroll-view" 
+		:style="{height: height}" 
+		:scroll-top="scrollTop" 
+		:scroll-y="true" 
+		:refresher-enabled="currentTab == 2"
+		:refresher-triggered="triggered"
+		@refresherrefresh="handleRefresher">
+			<template v-if="openCommentStatus==1">
+				<view v-show="currentTab==0">
+					<descInfoNav ref="descInfoNav" :isLogin="isLogin" :isAddKf="isAddKf" :courseInfo="courseInfo"></descInfoNav>
+				</view>
+				<view v-show="currentTab==2">
+					<commentBox 
+					ref="commentBox" 
+					:height="height" 
+					:urlOption="urlOption" 
+					:time="playTime"
+					:flagTime="flagTime"
+					:showDanmu="showDanmu"
+					:viewCommentNum="viewCommentNum"
+					:openCommentStatus="openCommentStatus"
+					@setInputText="setInputText" 
+					@getScrollTop="getScrollTop"
+					@getMore="getMore"></commentBox>
+				</view>
+			</template>
+			<view v-show="currentTab==1">
+				<template v-if="openCommentStatus!=1">
+					<!-- 介绍 -->
+					<descInfo ref="descInfo" :isLogin="isLogin" :isAddKf="isAddKf" :courseInfo="courseInfo"></descInfo>
+				</template>
+				<!-- 问题 -->
+				<template v-if="isLogin&&isAddKf==1">
+					<ques ref="ques" :quesList="quesList" :openCommentStatus="openCommentStatus" @handleAnswer="handleAnswer"></ques>
+				</template>
+			</view>
+		</scroll-view>
+		<!-- 线路 -->
+		<view class="video-line" v-if="isLogin&&isAddKf==1" @click="openPop">
+			<image :src="baseUrl+'/app/image/changePlayer-icon.png'"></image>
+			<text>线路{{numberToChinese(lineIndex + 1)}}</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="baseUrl+'/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)">
+						线路{{numberToChinese(index + 1)}}</view>
+				</view>
+			</view>
+		</uni-popup>
+		<!-- 发送弹幕 -->
+		<view class="video-line danmu-line" v-if="isLogin&&isAddKf==1&&openCommentStatus==2" @click="openDanmu(0)" >
+			<image class="set_image" :src="baseUrl+'/app/image/danmu_set_black'" mode="aspectFill"></image>
+			<text>发弹幕</text>
+		</view>
+		<!-- 发送弹幕弹窗 -->
+		<uni-popup ref="danmuPopup" type="bottom" style="z-index: 999;" @change="changeShowPopup">
+			<view class="danmuPopup" :style="{marginLeft:isfull ? statusBarHeight+'px': 0,marginBottom: danmuboxHeight+'px'}">
+				<view class="danmuPopup-head border-line">
+					<image class="danmu-icon" :src="showDanmu==0?baseUrl+'/app/image/danmu-off.png':baseUrl+'/app/image/danmu-on.png'" mode="heightFix" @click="switchDanmu()"></image>
+					<view class="u-border">
+						<u-input 
+						class="danmuPopup-input" 
+						placeholder="发个弹幕吧~" 
+						border="border"
+						:focus="focus"
+						:adjustPosition="false" 
+						:autoBlur="true" 
+						maxlength="50"
+						v-model.trim="inputText">
+						</u-input>
+						<text style="font-size: 24rpx;color: #bbb;margin-left: 10rpx;">{{inputText?inputText.trim().length:0}}/50</text>
+					</view>
+					<button class="danmuPopup-send" @click="handleChatInput">发送</button>
+				</view>
+			</view>
+		</uni-popup>
+		<!-- 答题弹窗 -->
+		<uni-popup ref="answerPopup" type="center" :show="answerPopup">
+			<view :class="errTitle == '恭喜你,回答正确' ? 'answerPopup-box bg':'answerPopup-box'">
+				<!-- 正确 -->
+				<image class="tipimg" v-if="errTitle == '恭喜你,回答正确'" :src="baseUrl+'/app/image/course_answer_img.png'"
+					mode="aspectFill"></image>
+				<!-- 错误 -->
+				<image class="tipimg" v-else :src="baseUrl+'/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="reward-list" v-if="errTitle == '恭喜你,回答正确'">
+					<radio-group class="reward-list-group" @change="rewardChange">
+						<label class="reward-list-option" v-for="(item, index) in rewardType" :key="item.value">
+							<radio :value="item.value+ ''" :checked="item.value == currentReward"
+								activeBorderColor="#FF5C03" activeBackgroundColor="#FF5C03"
+								style="transform:scale(0.7)" />
+							<view :style="{color: item.value == currentReward ? '#FF5C03':''}">{{item.name}}</view>
+						</label>
+					</radio-group>
+				</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>
+		</uni-popup>
+		<!-- 客服二维码弹窗 -->
+		<uni-popup ref="kfPopup" type="center" :mask-click="false">
+			<view class="kfqrcode-box">
+				<image class="kfqrcode" :src="qrcode" show-menu-by-longpress="true"></image>
+				<view v-show="qrcodeMsg" style="margin-top: 30rpx;" v-html="qrcodeMsg"></view>
+				<image class="kfqrcode-close" :src="baseUrl+'/app/image/course_close_white_icon.png'" mode="aspectFill"
+					@click="closeKFPop"></image>
+			</view>
+		</uni-popup>
+		<!-- 可以答题提示 -->
+		<view class="answerTip" v-if="currentTab!=1&&openCommentStatus==1&&showAnswerTip" @click="handleTab(1)">
+			可以答题啦
+		</view>
+		<!-- footer -->
+		<view class="footer" v-show="currentTab!=2&&videoId">
+			<view class="footer-btn" v-if="!isLogin || isAddKf !=1" @click="submit">
+				<text>立即学习</text>
+			</view>
+			<view v-if="isLogin&&isAddKf==1&&currentTab==1&&quesList&&quesList.length>0" class="footer-btn footer-btn-border" @click="submit">
+				<!-- <image class="footer-btn-img" :src="baseUrl+'/app/image/red_envelope_btnimg.png'" mode="aspectFill"></image> -->
+				<text>提交答案领取奖励</text>
+			</view>
+			<!-- <view @click="checked=!checked" class="agreement" v-if="!isLogin">
+				<radio value="r1" :checked="checked" color="#ff5c03" activeBorderColor="#ff5c03"
+					style="transform:scale(0.6);" />
+				<view>阅读并同意<text style="color: #ff5c03;" @click.stop="goWeb(0)">《用户协议》</text>和<text
+						style="color: #ff5c03;" @click.stop="goWeb(1)">《隐私协议》</text></view>
+			</view> -->
+			<!-- <view class="footer-tips">重庆云联融智提供技术支持</view> -->
+		</view>
+		<view v-show="currentTab==2">
+			<view class="chatinput" :style="{bottom:danmuboxHeight>0?danmuboxHeight+'px':'calc(var(--window-bottom) + 24rpx)'}">
+				<input class="uni-input" v-model.trim="inputText" :adjustPosition="false" :autoBlur="false" maxlength="140" placeholder="发消息···" confirm-type="send" @confirm="handleChatInput" />
+				<button class="send" @click="handleChatInput">发送</button>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import ques from "./components/ques.vue"
+	import descInfo from "./components/descInfo.vue"
+	import descInfoNav from "./components/descInfoNav.vue"
+	import commentBox from "./components/commentBox.vue"
+	import dayjs from 'dayjs';
+	import {
+		getErrMsg,
+		getH5CourseByVideoId,
+		getH5CourseVideoDetails,
+		courseAnswer,
+		getFinishCourseVideo,
+		getIsAddKf,
+		internetTraffic,
+		getIntegralByH5Video,
+		sendReward,
+		loginByMp,
+		getRealLink,
+		errorLogUpload,
+	} from "@/api/course.js"
+	import {handleFsUserWx} from '@/api/courseLook.js'
+	export default {
+		components: {
+			descInfoNav,
+			descInfo,
+			commentBox,
+			ques,
+		},
+		data() {
+			return {
+				baseUrl:uni.getStorageSync('requestImagesPath'),
+				// 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,
+				isAddKf: 0,
+				lineIndex: 0,
+				textHeight: 0, //文本高度
+				qwUserId: "",
+				qrcode: "",
+				corpId: "",
+				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
+						}
+					},
+				},
+				poster: "",
+				// 错误请求次数
+				errorCount: 0,
+				answerPopup: false,
+				sortLink:"",
+				// 课程是否过期
+				isExpire: false,
+				menuButtonLeft: 281,
+				menuButtonH: 45,
+				timer: null,
+				flag: false,
+				focus: false,
+				openDanmuType: 0,
+				danmuboxHeight: 0,
+				user: {},
+				crtShow: true,
+				// 是否获取到对应观看者的真实链接
+				isCheckRealUrl: false,
+				courseLogo: '',
+				isfull: false,
+				navList:[{
+					id: 0,
+					name: '介绍'
+				},{
+					id: 1,
+					name: '答题'
+				},{
+					id: 2,
+					name: '评论'
+				}],
+				currentTab: 1,
+				triggered: false,
+				// 没有更多
+				isMore: false,
+				inputText:"",
+				// 获取最多历史评论条数
+				viewCommentNum: 200,
+				// 1-开启评论;2-开启弹幕;3-关闭
+				openCommentStatus: 3,
+				showAnswerTip: false,
+				showDanmu: 1,
+				activeDanmus:[],
+				flagTime: 0,
+				projectCode:''
+			}
+		},
+		onLoad(option) {
+			console.log("onLoad===",'')
+			this.urlOption = option.course ? JSON.parse(option.course) : {}
+			this.videoId = this.urlOption.videoId || ''
+			this.qwUserId = this.urlOption.qwUserId || ''
+			this.corpId = this.urlOption.corpId || ''
+			this.linkType = this.urlOption.linkType || 0
+			this.projectCode = this.urlOption.projectCode || ''
+			// if (this.code) {
+			// 	this.loginByMp()
+			// }
+			this.sortLink = this.urlOption.link || ''
+			
+			uni.$on('usercode',(data)=>{
+				if(data) {
+					this.code=data.code
+					this.goLogin(data)
+				}
+			})
+			this.getMenuButton()
+			// #ifndef H5
+			uni.onKeyboardHeightChange(this.keyboardHeightChange);
+			// #endif
+		},
+		onShow() {
+			this.baseUrl=uni.getStorageSync('requestImagesPath')
+			this.tipsOpen = false
+			// this.isLogin = this.utils.isLoginCourseAuto()
+			this.uuId = this.utils.generateRandomString(16)
+			if(uni.getStorageSync('auto_userInfo') && JSON.stringify(uni.getStorageSync('auto_userInfo'))!='{}') {
+				this.user = JSON.parse(uni.getStorageSync('auto_userInfo'))
+			} else {
+				this.user = {}
+			}
+			console.log("https://wxaurl.cn/skRIquxVTtu==========")
+			if(!this.sortLink||!this.projectCode){
+				uni.showToast({
+					title: '链接有误',
+					icon: 'none'
+				});
+				return
+			} 
+			this.utils.getDomain({projectCode:this.projectCode}).then(res=>{
+				if(res.code == 200) {
+					if (this.videoId) {
+						this.getH5CourseByVideo()
+					}
+					if(this.sortLink){
+						this.getLink()
+					}
+				}
+			})
+		},
+		mounted() {
+			this.getIP()
+			this.getHeight()
+		},
+		onHide() {
+			// this.player = uni.createVideoContext('video-content-box');
+			if (this.player) {
+				this.player.pause()
+			}
+			// if (this.interval != null) {
+			// 	clearInterval(this.interval)
+			// 	this.interval = null
+			// }
+		},
+		onUnload() {
+			uni.$off('usercode')
+			if (this.interval != null) {
+				clearInterval(this.interval)
+				this.interval = null
+			}
+			this.clearIntegral()
+			// #ifndef H5
+			uni.offKeyboardHeightChange(this.keyboardHeightChange);
+			// #endif
+		},
+		beforeDestroy() {
+			uni.$off('usercode')
+			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
+			}
+			this.clearIntegral()
+			// #ifndef H5
+			uni.offKeyboardHeightChange(this.keyboardHeightChange);
+			// #endif
+		},
+		methods: {
+			numberToChinese(number) {
+				if (number) {
+					const chineseNumber = ['一', '二', '三', '四', '五', '六', '七', '八', '九'];
+					return chineseNumber[number - 1];
+				} else {
+					return ''
+				}
+			},
+			keyboardHeightChange(res) {
+				// #ifndef H5
+				console.log("this.danmuboxHeight",this.danmuboxHeight)
+				 this.danmuboxHeight = res.height
+				// #endif
+			},
+			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 {
+					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);
+					}
+					this.playTime = currentTime
+				}
+				if(this.isEnded||this.playTime >= this.duration - 60) {
+					this.showAnswerTip = true
+				} else {
+					this.showAnswerTip = false
+				}
+				if (Math.floor(e.detail.currentTime) != this.flagTime &&this.openCommentStatus == 2) {
+					this.flagTime = Math.floor(e.detail.currentTime)
+					this.$refs.danmuBox&&this.$refs.danmuBox.checkDanmu(this.flagTime)
+				}
+			},
+			changeTime(that,e) {
+				that.playDurationSeek = 0
+			},
+			videoErrorCallback(e) {
+				this.errorCount++
+				if (this.errorCount > 3) return
+				if (this.interval != null) {
+					clearInterval(this.interval)
+				}
+				this.clearIntegral()
+				console.log(e)
+				this.getErrMsg(e.target.errMsg)
+				this.getH5CourseVideoDetails('error')
+			},
+			// 当开始/继续播放时触发play事件
+			getPlay() {
+				this.errorCount = 0
+				this.judgeDuration()
+			},
+			getPause() {
+				this.clearIntegral()
+			},
+			getEnded() {
+				this.clearIntegral()
+				this.isEnded = true
+				this.showAnswerTip = true
+				this.isFinish = 1
+				this.getFinishCourseVideo()
+			},
+			getWaiting() {
+				this.getErrMsg('','waiting')
+			},
+			fullscreenchange(event) {
+				this.isfull = event.detail.fullScreen
+				if(this.isfull) {
+					this.$refs.danmuBox&&this.$refs.danmuBox.initTracks()
+				}
+			},
+			controlstoggle(event) {
+				this.crtShow =  event.detail.show
+			},
+			getIP() {
+				uni.request({
+					url: 'https://ipinfo.io/json', //仅为示例,并非真实接口地址。
+					method: 'GET',
+					success: (res) => {
+						this.ip = res.data.ip
+					}
+				});
+			},
+			getHeight() {
+				setTimeout(()=>{
+					const query = uni.createSelectorQuery().in(this);
+					query
+						.select("#title-contentnav")
+						.boundingClientRect((data) => {
+							if(data) {
+								this.height =
+									`calc(100vh - ${data.height}px - 420rpx - ${this.statusBarHeight}px - 80px - 88rpx)`
+							}
+						})
+						.exec();
+				},200)
+			},
+			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
+				}
+			},
+			getH5CourseByVideo() {
+				this.loading = true
+				getH5CourseByVideoId({
+					videoId: this.videoId
+				}).then(res => {
+						this.loading = false
+						if (res.code == 200) {
+							this.courseInfo = res.data
+							uni.setNavigationBarTitle({
+								title: this.courseInfo && this.courseInfo.title ? this.courseInfo.title : ''
+							});
+						}
+						this.getHeight()
+						this.$nextTick(()=>{
+							this.$refs.descInfo&&this.$refs.descInfo.getDescHeight()
+							this.$refs.descInfoNav&&this.$refs.descInfoNav.getDescHeight()
+						})
+					},
+					rej => {
+						this.loading = false
+					}
+				).catch(() => {
+					this.loading = false
+				})
+			},
+			getH5CourseVideoDetails(type) {
+				getH5CourseVideoDetails(this.urlOption).then(res => {
+						if (res.code == 200) {
+							this.config = res.config || {}
+							this.isFinish = res.isFinish || 0
+							this.duration = res.course && res.course.duration ? res.course.duration : 0
+							this.playDuration = res.playDuration || 0
+							this.tipsTime = res.tipsTime || 0
+							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
+							this.courseLogo = res.config&&res.config.courseLogo
+							this.viewCommentNum = res.config&&res.config.viewCommentNum || 200
+							if(this.openCommentStatus == 3) {
+								this.$refs.commentBox&&this.$refs.commentBox.closeWSocket()
+								this.$refs.danmuBox&&this.$refs.danmuBox.closeWSocket()
+							}
+							const status = res.config&&res.config.openCommentStatus || 3
+							if(status != this.openCommentStatus) {
+								this.openCommentStatus = status
+							}
+							this.currentTab = 1
+							if(this.openCommentStatus!=2 || this.showDanmu!=1) {
+								this.activeDanmus = []
+							}
+							if (!this.player || type == 'error') {
+								this.lineIndex = this.config.defaultLine
+								this.videoUrl = lineList[this.lineIndex]
+								this.poster= res.course && res.course.imgUrl ? res.course.imgUrl : ''
+								// 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
+								this.playDurationSeek = this.playTime
+								setTimeout(()=>{
+									this.player = uni.createVideoContext('video-content-box');
+									this.player.seek(this.playTime)
+									this.player.play();
+								},500);
+							} 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.playDurationSeek = this.playTime
+								this.player.seek(this.playTime)
+								this.player.play();
+							}
+							this.updateTime();
+							this.quesList = res.questions && res.questions.length > 0 ? res.questions : [],
+								this.quesList = this.quesList.map(item => ({
+									...item,
+									questionOption: JSON.parse(item.question),
+									answer: ''
+								}))
+						}
+						this.getHeight()
+						this.$nextTick(()=>{
+							this.$refs.descInfo&&this.$refs.descInfo.getDescHeight()
+							this.$refs.descInfoNav&&this.$refs.descInfoNav.getDescHeight()
+						})
+					},
+					rej => {}
+				)
+			},
+			handleAnswer(val) {
+				let {item, option,index} = val
+				let time = this.playTime
+				if(this.isEnded||this.isFinish==1) {
+					time = this.duration
+				} else {
+					if(time < this.playDuration&&this.isFinish!=1) {
+						// 没完课且小于续播的时间
+						time = this.playDuration
+					}
+				}
+				if(Number(this.duration || 0) == 0 || time < this.duration - 60) {
+					uni.showToast({
+						title: "请先观看完整课程再答题哦~",
+						icon: "none"
+					})
+					return
+				}
+
+				if (this.quesList[index].type == 1) {
+					// 单选option
+					this.quesList[index].answer = option.name
+				} else if (this.quesList[index].type == 2) {
+					// 多选
+					let answer = this.quesList[index].answer ? this.quesList[index].answer.split(',') : []
+					if (answer.indexOf(option.name) === -1) {
+						answer.push(option.name)
+						this.quesList[index].answer = answer.join(',')
+					} else {
+						answer.splice(answer.indexOf(option.name), 1)
+						this.quesList[index].answer = answer.join(',')
+					}
+				}
+			},
+			submit() {
+				if(this.isExpire){
+					uni.showToast({
+						title: '课程已过期或链接无效',
+						icon: 'none'
+					});
+					return
+				}
+				// 登录
+				this.utils.isLoginCourseAuto().then(
+					res => {
+						if(res){
+							if (this.isAddKf == 1&&this.isCheckRealUrl) {
+								// 答题
+								// 您已提交过答案,请领取红包
+								this.courseAnswer()
+							} else {
+								// 添加客服
+								if (this.videoId && this.qwUserId) {
+									this.getIsAddKf()
+								} else {
+									uni.showToast({
+										title: '请添加客服',
+										icon: 'none'
+									})
+								}
+							} 
+						} else{
+							this.goLogin()
+						}
+					},
+					rej => {}
+				);
+			},
+			// 答题
+			courseAnswer() {
+				let time = this.playTime
+				if (this.isEnded || this.isFinish==1) {
+					time = this.duration
+				} else {
+					if (time < this.playDuration && this.isFinish != 1) {
+						// 没完课且小于续播的时间
+						time = this.playDuration
+					}
+				}
+				if (Number(this.duration || 0) == 0 || time < this.duration - 60) {
+					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;
+				});
+				if(!this.isCheckRealUrl) return;
+				const param = {
+					...this.urlOption,
+					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.errTitle = "很遗憾答错了"
+									this.errDesc = `<span style="color:#FF5C03">还有${res.remain}次机会,继续加油</span>`
+									this.$refs.answerPopup.open("center")
+								}
+							} else {
+								// 答题成功
+								this.errTitle = "恭喜你,回答正确"
+								this.errDesc = `请选择奖励`
+								// this.$refs.answerPopup.open("center")
+								this.closeAnswerPopup()
+							}
+						} else {
+							if (res.msg == "该课题到达答错次数限制") {
+								this.errTitle = "答题次数超过限制"
+								this.errDesc = "以后的课程要认真学习哦"
+								this.$refs.answerPopup.open("center")
+							} else {
+								uni.showToast({
+									title: res.msg,
+									icon: "none"
+								})
+							}
+						}
+					},
+					rej => {}
+				)
+			},
+			// 选择
+			rewardChange(e) {
+				this.currentReward = e.detail.value
+			},
+			closeAnswerPopup() {
+				this.$refs.answerPopup.close()
+				if(!this.isCheckRealUrl) return;
+				if (this.errTitle == '恭喜你,回答正确') {
+					const param = {
+						...this.urlOption,
+						// rewardType: Number(this.currentReward),
+						source: 2,
+						appId:getApp().globalData.appId
+					}
+					sendReward(param).then(res => {
+						if(res.isNew&&res.isNew==1) {
+							const packageInfo = res.data.packageInfo || ''
+							if(packageInfo) {
+								uni.setStorageSync('receive_package',packageInfo);
+								if(res.mchId) uni.setStorageSync('mchId',res.mchId);
+								uni.navigateTo({
+									url: '/pages_course/reward'
+								})
+							}
+						} else {
+							uni.showToast({
+								title: res.msg,
+								icon: 'none'
+							})
+						}
+					})
+				}
+			},
+			// 线路
+			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()
+				}
+
+			},
+			// 客服
+			getIsAddKf() {
+				this.qrcode = ''
+				this.qrcodeMsg = ''
+				this.isAddKf = 0
+				// {videoId: this.videoId,qwUserId: this.qwUserId,corpId: this.corpId}
+				getIsAddKf(this.urlOption).then(res => {
+						if (res.code == 200) {
+							this.isAddKf = 1
+							this.isCheckRealUrl = true
+							this.getH5CourseVideoDetails()
+						} else if (res.code == 400) {
+							this.isAddKf = 0
+							this.isCheckRealUrl = false
+							this.qrcode = res.qrcode
+							this.qrcodeMsg = res.msg
+							this.$refs.kfPopup.open()
+						} else if (res.code == 504) {
+							// 登录
+							this.isCheckRealUrl = false
+							this.goLogin()
+						} else if (res.code == 566) {
+							// 官方群发通用链接
+							const url = res.courseLink.realLink.split('?course=')[1]
+							this.urlOption = JSON.parse(url)
+							this.isAddKf = 1
+							this.isCheckRealUrl = true
+							this.getH5CourseVideoDetails()
+						} else if (res.code == 567) {
+							// 群聊通用链接
+							this.urlOption = {
+								...this.urlOption,
+								qwExternalId: res.qwExternalId
+							}
+							this.isAddKf = 1
+							this.isCheckRealUrl = true
+							this.getH5CourseVideoDetails()
+						} else {
+							this.isCheckRealUrl = false
+							this.isAddKf = 0
+							uni.showToast({
+								title: res.msg,
+								icon: 'none'
+							});
+						}
+					},
+					err => {}
+				);
+			},
+			closeKFPop() {
+				this.$refs.kfPopup.close()
+			},
+			getFinishCourseVideo() {
+				if (!this.isLogin||!this.playTime || !this.isCheckRealUrl) return
+				// {videoId: this.videoId,duration:this.playTime}
+				const param = {
+					duration: this.playTime,
+					...this.urlOption
+				}
+				getFinishCourseVideo(param)
+			},
+			// 每十分钟获得积分
+			getIntegralByH5Video() {
+				if(!this.isLogin||!this.isCheckRealUrl) return
+				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)
+			},
+			// 缓冲
+			getInternetTraffic() {
+				if(!this.isLogin||!this.isCheckRealUrl) return
+				const playVideoTime = Math.ceil(this.playTime / this.duration * 100) // 播放百分比
+				if(this.bufferRate == 0 || this.bufferRate < playVideoTime) {
+					this.bufferRate = playVideoTime
+				}
+				if(this.bufferRate == 0 || Number(this.bufferRate.toFixed(2)) == 0) return
+				const param = {
+					...this.urlOption,
+					uuId: dayjs().format('YYYYMMDD') + this.uuId,
+					duration: this.playTime,
+					bufferRate: Number(this.bufferRate.toFixed(2)),
+				}
+				if(!param.bufferRate) return
+				internetTraffic(param)
+			},
+			getErrMsg(err,type) {
+				let msgerr = {
+					errType: type || 'error',
+					videoUrl: this.videoUrl,
+					lineIndex: this.lineIndex,
+					errTime: new Date(),
+					ip: this.ip,
+					errMsg: err || ''
+				}
+				getErrMsg({
+					msg: JSON.stringify(msgerr)
+				})
+			},
+			goLogin(data) {
+				if(!this.sortLink||!this.projectCode){
+					uni.showToast({
+						title: '链接有误',
+						icon: 'none'
+					});
+					return
+				} 
+				this.loginFsUserWx(data)
+				return
+				this.utils.getProvider().then(provider=>{
+					console.log('当前的环境商',provider)
+					if (!provider) {
+					  reject()
+					}
+					uni.login({
+						provider: provider,
+						success: async loginRes => {
+							console.log(loginRes)
+							uni.getUserInfo({
+							   provider: provider,
+							   success: (infoRes)=> {
+								    uni.showToast({
+										title: '处理中...',
+										icon: 'loading'
+								    });
+									loginByMp({code: loginRes.code,encryptedData:infoRes.encryptedData,iv:infoRes.iv,appId:getApp().globalData.appId}).then(res=>{
+										 uni.hideLoading();
+										 if (res.code == 200) {
+											uni.setStorageSync(this.utils.TOKEN_KEYAuto, res.token);
+											uni.setStorageSync('auto_userInfo', JSON.stringify(res.user));
+											this.user = res.user
+											this.isLogin = true
+											this.getIsAddKf() 
+										 } else {
+											uni.showToast({
+												title: res.msg,
+												icon: 'none'
+											});
+										 }
+									 }).catch(err=>{
+										uni.hideLoading();
+										uni.showToast({
+											icon:'none',
+											title: "登录失败,请重新登录",
+										});
+									});
+							   }
+							});
+						}
+					})
+				}).catch(err => {})
+			},
+			getLink() {
+				let that = this;
+				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.isCheckRealUrl) {
+							this.getH5CourseVideoDetails()
+						}
+						if (this.videoId &&(this.isAddKf != 1 || !this.isCheckRealUrl)) {
+							this.utils.isLoginCourseAuto().then(
+								isLogin => {
+									this.isLogin = isLogin
+									if(isLogin){
+										this.getIsAddKf() 
+									} else {
+										this.goLogin()
+									}
+								},
+								rej => {}
+							);
+						}
+					} else {
+						this.isExpire = true
+						uni.showToast({
+							title: '课程已过期或链接无效',
+							icon: 'none'
+						});
+					}
+				}).catch(err=>{
+					this.isExpire = true
+					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)
+			    }
+			},
+			// 弹幕
+			openDanmu(type) {
+				this.openDanmuType = type
+				this.inputText = ''
+				if(type == 1) {
+					this.player.exitFullScreen()
+				}
+				this.$refs.danmuPopup.open()
+			},
+			changeShowPopup(val) {
+				this.focus = val.show
+			},
+			switchDanmu() {
+				this.showDanmu = this.showDanmu == 1 ? 0:1
+				if(this.showDanmu == 0&&this.$refs.danmuBox) {
+					this.$refs.danmuPopup.close()
+					this.activeDanmus = []
+					this.$refs.danmuBox.activeDanmus = []
+					this.$refs.danmuBox.initTracks()
+				}
+			},
+			getScrollTop(res) {
+				console.log(res)
+				if(this.currentTab == 2) {
+					this.scrollTop = res
+				} else {
+					this.scrollTop = 0
+				}
+			},
+			handleTab(index) {
+				this.currentTab = index
+				if(this.currentTab==2) {
+					if(this.$refs.commentBox) {
+						this.$refs.commentBox.msgs = []
+						this.$refs.commentBox.pageNum = 1
+						this.$refs.commentBox.getComments()
+					}
+				} else {
+					setTimeout(()=>{
+						this.scrollTop = 0
+					},100)
+				}
+			},
+			handleRefresher() {
+				this.triggered = true;
+				if (!this.isMore&&this.currentTab==2&&this.openCommentStatus==1) {
+					this.$nextTick(()=>{
+						this.$refs.commentBox&&this.$refs.commentBox.getComments()
+					})
+				}
+				setTimeout(() => {
+					this.triggered = false;
+				}, 500);
+			},
+			getMore(val) {
+				this.triggered = false;
+				this.isMore = val == 1
+			},
+			handleChatInput() {
+				this.inputText = this.inputText.trim()
+				if (this.inputText == "" || this.inputText.trim() == "") {
+					uni.showToast({
+						title: '请输入评论',
+						icon: "none"
+					})
+					return;
+				}
+				if(this.openCommentStatus==1) {
+					this.$refs.commentBox&&this.$refs.commentBox.handleInput(this.inputText)
+				} else if(this.openCommentStatus==2) {
+					this.$refs.danmuBox&&this.$refs.danmuBox.handleInput(this.inputText)
+				}
+			},
+			setInputText() {
+				this.inputText = ""
+				if(this.openCommentStatus==2) {
+					this.$refs.danmuPopup.close()
+				}
+			},
+			getActiveDanmus(val) {
+				this.activeDanmus = val.map(item=>({
+					...item,
+					danmustyle: {
+						top: item.top + 'px',
+						...item.style, 
+						'animation-duration': '8s'
+					}
+				}))
+			},
+			animationend(moveItem, i) {
+				// 移除动画结束的弹幕(性能优化)
+				if(this.openCommentStatus==2) {
+					this.$refs.danmuBox&&this.$refs.danmuBox.animationend(moveItem, i)
+				}
+			},
+			feedback() {
+				const userId = this.user.userId || ''
+				const courseId = this.urlOption.courseId || ''
+				const videoId = this.urlOption.videoId || ''
+				uni.navigateTo({
+					url: './feedback?userId='+userId+'&courseId='+courseId+'&videoId='+videoId+'&projectCode='+this.projectCode
+				})
+			},
+			// H5授权绑定关系
+			async loginFsUserWx(data){
+				if(data){
+					console.log('huoqu1222',data)
+					// console.log("loginFsUserWx:",res)
+					// this.userinfos=uni.getStorageSync('userinfos')
+					let token = uni.getStorageSync('TOKEN_WEXIN');
+					let user = uni.getStorageSync('userInfo')
+					// this.userInfo=uni.getStorageSync('userInfo');
+					// this.isLogin = true
+					
+					
+					uni.setStorageSync(this.utils.TOKEN_KEYAuto, token);
+					uni.setStorageSync('auto_userInfo', JSON.stringify(user));
+					this.user = user
+					this.isLogin = true
+					this.getIsAddKf()
+				}else{
+					uni.setStorageSync('H5course',{
+						companyId: this.urlOption.companyId,
+						companyUserId:this.urlOption.companyUserId,
+						type: 1, //1自动,其他手动
+					})
+					uni.showLoading({ title: '加载中' });
+										
+					try {
+					  await this.utils.getDomain({ projectCode: this.projectCode}); // code 换成你的业务标识
+					  await this.utils.getConfigKey();
+					  uni.navigateTo({
+					  	url:'/pages_course/webview?H5course='+uni.getStorageSync('H5course')
+					  })
+					} catch (err) {
+					  console.error('初始化失败', err);
+					  uni.showToast({ title: '请求失败', icon: 'none' });
+					} finally {
+					  uni.hideLoading();
+					}
+				}
+			}
+		}
+	}
+</script>
+
+<style scoped>
+.full-width-popup {
+  width: 100%;
+}
+</style>
+<style lang="scss" scoped>
+	@mixin u-flex($flexD, $alignI, $justifyC) {
+		display: flex;
+		flex-direction: $flexD;
+		align-items: $alignI;
+		justify-content: $justifyC;
+	}
+	.footer-tips {
+		margin-top: 14rpx;
+		text-align: center;
+		font-family: PingFang SC,PingFang SC;
+		font-weight: 500;
+		font-size: 12px;
+		color: #bbb;
+	}
+	.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;
+			}
+		}
+	}
+
+	.video-controls-box {
+		width: 100%;
+		height: 420rpx;
+		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;
+	}
+
+	.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));
+		.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: 36rpx;
+			color: #222222;
+		}
+
+		.subtitlebox {
+			padding: 30rpx 0;
+			border-bottom: 2rpx solid #F5F7FA;
+			font-family: PingFang SC, PingFang SC;
+			font-weight: 500;
+			font-size: 36rpx;
+			color: #222222;
+		}
+
+		.title-content {
+			padding: 0 32rpx;
+			background-color: #fff;
+			font-size: 28rpx;
+			line-height: 1.6;
+			box-sizing: border-box;
+			@include u-flex(row, center, space-between);
+			.title {
+				font-size: 36rpx;
+				font-weight: 500;
+				color: #414858;
+			}
+
+			.time-or-subtitle {
+				margin-top: 12rpx;
+				color: #666666;
+			}
+		}
+		.warning {
+			flex-shrink: 0;
+			color: #888;
+			font-size: 24rpx;
+			@include u-flex(column, center, center);
+			image {
+				flex-shrink: 0;
+				height: 36rpx;
+				width: 36rpx;
+			}
+		}
+		.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: 34rpx;
+				width: 34rpx;
+				margin-right: 6rpx;
+			}
+		}
+		.danmu-line {
+			bottom: calc(var(--window-bottom) + 370rpx);
+			word-break: keep-all;
+			.set_image {
+				height: 40rpx;
+				width: 40rpx;
+			}
+		}
+		.footer {
+			border-top: 1rpx solid #ededef;
+			background: #fff;
+			width: 100%;
+			position: fixed;
+			bottom: 0;
+			padding: 32rpx;
+			padding-bottom: calc(var(--window-bottom) + 14rpx);
+			box-sizing: border-box;
+			z-index: 9;
+
+			&-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;
+	}
+	.video-danmu-btnbox {
+		width: 50px;
+		height: 50px;
+		border-radius: 50%;
+		overflow: hidden;
+		position: absolute;
+		right: 10px;
+		bottom: calc(50% - 50px);
+		transform: translateY(-50%);
+		padding: 8px;
+		box-sizing: border-box;
+	}
+	.video-danmu-image {
+		width: 100%;
+		height: 100%;
+	}
+	.danmuPopup {
+		background-color: #fff;
+		padding-bottom: calc(var(--window-bottom) + 10px);
+		.u-border {
+			flex: 1;
+			@include u-flex(row,center,flex-start);
+			padding: 0 6rpx;
+			border-radius: 6px;
+		}
+		&-head {
+			width: 100%;
+			padding: 10px;
+			box-sizing: border-box;
+			overflow: hidden;
+			@include u-flex(row,center,flex-start);
+			.danmu-icon {
+				height: 24px;
+				width: 24px;
+				margin-right: 10px;
+			}
+		}
+		&-input {
+			flex: 1;
+			height: 35px;
+		}
+		&-send {
+			flex-shrink: 0;
+			height: 35px;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			padding: 5px 15px;
+			box-sizing: border-box;
+			background: #FF5C03 !important;
+			border-radius: 6px;
+			font-family: PingFang SC, PingFang SC;
+			font-weight: 500;
+			font-size: 15px;
+			color: #fff !important;
+			margin-left: 12px;
+			&::after {
+				border: none;
+			}
+		}
+		&-con {
+			background-color: #F5F7FA;
+			padding: 24px 12px 48px 12px;
+			font-family: PingFang SC, PingFang SC;
+			font-weight: 400;
+			font-size: 14px;
+			color: #757575;
+		}
+	}
+	.danmu-icon{
+		height: 24px;
+		width: 24px;
+		margin-right: 12px;
+	}
+	.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;
+	}
+	.tabbox-bar {
+		@include u-flex(row, center, flex-start);
+		background-color: #fff;
+		.warning {
+			flex-shrink: 0;
+			padding-right: 20rpx;
+		}
+	}
+	.tabbox {
+		flex: 1;
+		@include u-flex(row, center, center);
+		border-bottom: 2rpx solid #F5F7FA;
+		height: 44px;
+		background-color: #fff;
+		view {
+			flex: 1;
+			padding: 20rpx 0;
+			margin-right: 40rpx;
+			text-align: center;
+		}
+		&-active {
+			position: relative;
+			&::after {
+				position: absolute;
+				bottom: 0;
+				left: 50%;
+				transform: translateX(-50%);
+				content: "";
+				width: 3rem;
+				border-bottom: 4px solid #FF5C03;
+			}
+		}
+	}
+	.chatinput {
+		position: fixed;
+		left: 32rpx;
+		right: 32rpx;
+		z-index: 999;
+		height: 96rpx;
+		background-color: green;
+		background: #FFFFFF;
+		box-shadow: 0rpx 8rpx 21rpx 0rpx rgba(0, 0, 0, 0.1);
+		border-radius: 24rpx 24rpx 24rpx 24rpx;
+		@include u-flex(row, center, center);
+		padding: 0 24rpx;
+		box-sizing: border-box;
+		.uni-input {
+			flex: 1;
+			margin-right: 32rpx;
+			font-size: 30rpx;
+		}
+	
+		.send {
+			font-family: PingFang SC, PingFang SC;
+			font-weight: 400;
+			font-size: 28rpx;
+			color: #FFFFFF !important;
+			flex-shrink: 0;
+			padding: 0 20rpx;
+			height: 72rpx;
+			background: #FF5C03 !important;
+			border-radius: 8rpx 8rpx 8rpx 8rpx;
+			&::after {
+				border: none;
+			}
+		}
+	}
+	.answerTip {
+		position: fixed;
+		right: 0;
+		z-index: 9;
+		bottom: calc(var(--window-bottom) + 380rpx);
+		box-shadow: 0rpx 8rpx 21rpx 0rpx rgba(0, 0, 0, 0.1);
+		border-radius: 24rpx 24rpx 24rpx 24rpx;
+		background-color: #ff5c03;
+		color: #fff;
+		border-radius: 50%;
+		height: 100rpx;
+		width: 100rpx;
+		font-size: 25rpx;
+		text-align: center;
+		padding: 10rpx;
+		@include u-flex(row, center, center);
+	}
+	.danmu-item {
+		position: absolute;
+		top: 0;
+		white-space: nowrap;
+		font-size: 16px;
+		height: 20px;
+		display: inline-flex;
+		box-sizing: border-box;
+		align-items: center;
+	}
+	.danmuMove {
+		// animation: mymove 8s linear forwards;
+		// animation-duration: 8s;
+		animation-timing-function: linear;
+		animation-delay: 0s;
+		animation-iteration-count: 1;
+		animation-direction: normal;
+		animation-fill-mode: forwards;
+		animation-play-state: running;
+		animation-name: mymove;
+		will-change: transform;
+	}
+	
+	@keyframes mymove {
+		from {
+			transform: translateX(100vw);
+		}
+	
+		to {
+			transform: translateX(-100%);
+		}
+	}
+	.arrow-left-warning {
+		position: absolute;
+		left: 24rpx;
+		height: 88rpx;
+		overflow: hidden;
+		color: #888;
+		font-size: 24rpx;
+		@include u-flex(column, center, center);
+		image {
+			flex-shrink: 0;
+			height: 36rpx;
+			width: 36rpx;
+		}
+	}
+</style>

+ 2478 - 0
pages_course/videovip.vue

@@ -0,0 +1,2478 @@
+<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="video-box" >
+			<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%;height: 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-image v-if="courseLogo" :class="isFull?'logo-full':'logo'" :src="courseLogo" mode="widthFix"></cover-image> -->
+			</video>
+		</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 class="scroll-view" :style="{height: height}" :scroll-top="scrollTop" scroll-y="true">
+			<!-- 介绍 -->
+			<view class="descbox">
+				<template v-if="!isLogin||isAddKf!=1">
+					<view class="descbox-title">{{courseInfo.title}}</view>
+					<view class="descbox-info">
+						<!-- <view class="descbox-info-l">
+							<view>{{courseInfo.views}}次播放</view>
+							<view class="descbox-info-time">总时长:{{courseInfo.totalDuration}}</view>
+						</view> -->
+						<view class="descbox-info-r expand" v-if="textHeight > 21">
+							<text @click="handleExpand">{{isExpand ? '收起简介' : '展开简介'}}</text>
+							<image :src="imgPath+'/app/image/course_arrow_up_icon.png'" v-show="isExpand"></image>
+							<image :src="imgPath+'/app/image/course_arrow_down_icon.png'" v-show="!isExpand"></image>
+						</view>
+					</view>
+				</template>
+				<view class="descbox-desc" id="descbox-desc" :style="{height: isExpand ? 'auto': '42rpx'}">
+					<text>{{courseInfo.description==null?'暂无简介':courseInfo.description}}</text>
+					<view :class="isExpand ? 'expand': 'expand expand-ab'" v-if="isLogin&&isAddKf==1&&textHeight > 21">
+						<text @click="handleExpand">{{isExpand ? '收起简介' : '展开简介'}}</text>
+						<image :src="imgPath+'/app/image/course_arrow_up_icon.png'" v-show="isExpand"></image>
+						<image :src="imgPath+'/app/image/course_arrow_down_icon.png'" v-show="!isExpand"></image>
+					</view>
+				</view>
+			</view>
+			<!-- 无效或者已过期 -->
+			<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">
+				<view class="ques-content-tit" v-if="isLogin &&!isquestion" >问答题</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="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="answerPopup-btn" v-if="errTitle == '恭喜你,回答正确'" @click="nvtored">点击领取红包</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.png'" 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>
+		<!-- <view class="footer-tips">重庆云联融智提供技术支持</view> -->
+		<!-- footer -->
+		<view class="footer" v-if="videoId">
+			<view class="btns"  >
+<!-- 				<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> -->
+				<button class="author-btn"  
+				@click="submit">{{isLogin&&isAddKf==1 ?'提交答案领取奖励' : '立即学习'}}</button>
+			</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>
+	</view>
+</template>
+
+<script>
+	import { generateRandomString} from "@/utils/common.js"
+	import dayjs from 'dayjs';
+	import {
+		getErrMsg,
+		getH5CourseByVideoId,
+		getH5CourseVideoDetails,
+		courseAnswer,
+		getFinishCourseVideo,
+		getIsAddKf,
+		getInternetTraffic,
+		getIntegralByH5Video,
+		sendReward,
+		getRealLink,
+		loginByMiniApp,
+		handleFsUserWx
+	} from "@/api/courseLook.js"
+	import {
+		getConfigByKey
+	} from "@/api/course.js"
+	export default {
+		data() {
+			return {
+				imgPath:uni.getStorageSync('requestImagesPath'),
+				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,
+				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,
+				iskftypemsg:'',
+				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,
+			}
+		},
+		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
+					}
+				}
+			},
+			// imgname() {
+			//   return this.$store.state.logoname
+			// },
+			appid() {
+				return this.$store.state.appid
+			},
+			nameuser() {
+				return this.userinfos.nickname
+			},
+			avataruser() {
+				return this.userinfos.avatar
+			},
+		},
+		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.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')
+			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(option.course) : {}
+			}
+			uni.setStorageSync('H5course',this.urlOption)
+			console.log('lll',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() {
+			this.userinfos=uni.getStorageSync('userinfos')
+			this.userinfo=uni.getStorageSync('userinfo')
+			this.tipsOpen = false
+			this.isExpand = true
+			this.uuId = generateRandomString(16)
+			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()
+			}
+			// if (this.interval != null) {
+			// 	clearInterval(this.interval)
+			// 	this.interval = null
+			// }
+		},
+		onUnload() {
+			if (this.interval != null) {
+				clearInterval(this.interval)
+				this.interval = null
+			}
+			this.clearIntegral()
+			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
+			}
+			this.clearIntegral()
+		},
+		methods: {
+			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,)
+							uni.setStorageSync('weixinOauth',data.userCourseAuthDomain)
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: res.msg,
+							});
+						}
+					})
+			},
+			goLogin(data) {
+				if(data){
+					console.log('huoqu1222',data)
+					uni.showLoading({
+						title: '加载中'
+					})
+					uni.login({
+						provider: "weixin",
+						success: async 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
+									this.getH5CourseVideoDetails()
+									// 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,
+									});
+								}
+							   
+							 })
+						},
+					})
+				}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
+										
+									}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
+					
+				}
+			},
+			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')
+			},
+			// 当开始/继续播放时触发play事件
+			getPlay() {
+				this.errorCount = 0
+				// this.judgeDuration()
+			},
+			getPause() {
+				this.clearIntegral()
+			},
+			getEnded() {
+				this.clearIntegral()
+				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.$nextTick(() => {
+					const query = uni.createSelectorQuery().in(this);
+					query
+						.select("#title-content")
+						.boundingClientRect((data) => {
+							this.height =
+								`calc(100vh - ${data.height}px - 420rpx - ${this.statusBarHeight}px - 120rpx )`
+						})
+						.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: '加载中'
+				})
+				console.log(this.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
+							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();
+							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) {
+				let time = this.playTime
+				if(this.isEnded || this.isFinish==1) {
+					time = this.duration
+				} else {
+					if(time < this.playDuration&&this.isFinish!=1) {
+						// 没完课且小于续播的时间
+						time = this.playDuration
+					}
+				}
+				if(Number(this.duration || 0) == 0 || time < this.duration - 60) {
+					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: this.iskftypemsg,
+										icon: 'none'
+									})
+								}
+								else {
+									// this.kfPopup=true
+									uni.removeStorageSync('TOKEN_WEXIN')
+									uni.showToast({
+										title: '已清除缓存,请重新进入页面!',
+										icon: 'none'
+									})
+								}
+							} 
+						} else{
+							this.goLogin()
+						}
+					},
+					rej => {}
+				);
+					
+			},
+			nvtored(){
+				const packageInfo =uni.getStorageSync('receive_package',packageInfo)
+				const mchId =uni.getStorageSync('mchId',res.mchId)
+				uni.navigateToMiniProgram({
+				  appId: 'wxc89db69a69a79011',
+				  path: '/pages_course/reward?mchId='+mchId+'&packageInfo='+packageInfo,
+				  success(res) {
+					this.answerPopup=false
+					// this.$refs.appPopup.close()
+				  }
+				})
+			},
+			// 答题
+			courseAnswer() {
+				let time = this.playTime
+				if (this.isEnded||this.isFinish==1) {
+					time = this.duration
+				} else {
+					if (time < this.playDuration && this.isFinish != 1) {
+						// 没完课且小于续播的时间
+						time = this.playDuration
+					}
+				}
+				if (Number(this.duration || 0) == 0 || time < this.duration - 60) {
+					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=='答题成功'){
+									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 {
+								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()
+							console.log('红包',res)
+							if(res.isNew&&res.isNew==1) {
+								console.log('红包配置',res)
+								const packageInfo = res.data.packageInfo || ''
+								if(packageInfo) {
+									this.answerPopup=true
+									uni.setStorageSync('receive_package',packageInfo)
+									uni.setStorageSync('mchId',res.mchId)
+									uni.navigateTo({
+										url: '/pages_course/reward'
+									})
+								}
+							} else {
+								uni.showToast({
+									title: res.msg,
+									icon: 'none'
+								})
+							}
+						}else {
+							uni.hideLoading()
+							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
+				const data = {
+					videoId:this.videoId,
+					userId:this.userInfo.userId,
+					companyUserId:this.companyUserId,
+					companyId:this.companyId,
+					courseId:this.courseId,
+					periodId:this.periodId,
+					projectId:this.projectId
+				}
+				// {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.userId){
+									this.getH5CourseVideoDetails()
+									console.log(123223)
+								}
+								
+							}
+							// 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'
+							});
+						}else if(res.code==505){
+							this.isAddKf = 0
+							this.qrcode=res.ext
+							this.kfPopup=true
+							uni.showToast({
+								title: "管理员开启了会员审核,请等待审核!",
+								icon: 'none'
+							});
+						}else if(res.code==406){
+							uni.hideLoading();
+							uni.showToast({
+								icon:'none',
+								title: '该用户已成为其他销售会员',
+							});
+						}else if(res.code==504){
+							this.isAddKf = 0
+							this.iskftype=1
+							this.iskftypemsg=res.msg
+							uni.showToast({
+								title: res.msg,
+								icon: 'none'
+							});
+						}else {
+							this.isAddKf = 0
+							uni.showToast({
+								title: res.msg,
+								icon: 'none'
+							});
+						}
+					},
+					err => {}
+				);
+			},
+			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>
+	.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: 80rpx;
+		.author-btn{				
+			z-index:100;
+			position: absolute;
+			width: 100%;
+			height: 80rpx;
+			background: #ff5c03;
+			border-radius: 40rpx;
+			font-size: 36rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			text-align: center;
+			line-height: 80rpx;
+			color: rgba(255, 255, 255, 1);
+		}
+	}
+	.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;
+			}
+		}
+	}
+
+	.video-controls-box {
+		width: 100%;
+		height: 420rpx;
+		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: PingFang SC, PingFang SC;
+			font-weight: 600;
+			font-size: 36rpx;
+			color: #222222;
+		}
+
+		.ques-title {
+			margin: 48rpx 0 34rpx 0;
+			font-weight: 500;
+			font-size: 32rpx;
+			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: calc(var(--window-bottom) + 14rpx);
+			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>

+ 208 - 0
pages_course/webview.vue

@@ -0,0 +1,208 @@
+<template>
+  <view class="container">
+    <!-- 加载提示 -->
+   <view class="loading2" v-if="loading">
+      <text>加载中...</text>
+    </view>
+    <!-- web-view组件 -->
+	<web-view
+	  :src="webviewUrl" 
+	  @message="handleMessage"
+	  @load="onLoads"
+	  @error="onError"
+	></web-view>
+  </view>
+</template>
+
+<script>
+import { H5logoinApp} from '@/api/courseLook.js'
+export default {
+  data() {
+    return {
+      loading: false,
+	  // webviewUrl: uni.getStorageSync('authUrl'),//
+	  // webviewUrl: 'https://company.h5.test.ylrztop.com/avatarAuth/weixinOauth.html',//云联融智
+	  // webviewUrl: 'https://authdrk.ylrztop.com/weixinOauth',//青岛德瑞康
+	  // webviewUrl: 'https://wxmpauth.zkwlyf.com/weixinOauth',//中康智慧
+	  // webviewUrl:'https://userappkyt.ylrzcloud.com/weixinOauth',
+	  // webviewUrl:'https://uviewui.com/components/popup.html',
+      userinfos:{
+      	nickname:"",
+      	avatar:""
+      },
+	  usercode:{},
+	  h5Appid:'',
+	  redirect_uri: '',
+	  appid:'',
+	  webviewUrl:''
+    }
+  },
+  onLoad(options) {
+	  this.appid = getApp().globalData.appId
+	  this.webviewUrl = uni.getStorageSync('weixinOauth')
+	  if(options.code){
+		  // uni.$emit('us ercode', {  code: options.code });
+		  this.loginweixin(options.code)
+	  }
+	  console.log(this.webviewUrl)
+    // 生成带参的H5授权页面URL
+    // this.webviewUrl = this.generateAuthUrl()
+  },
+  methods: {
+	  // 截取url中的参数方法
+	  getUrlParam() {
+	      var url = this.webviewUrl;
+	      var theRequest = new Object();
+	      if (url.indexOf("?") != -1) {
+	          var str = url.substr(1);
+	          var strs = str.split("&");
+	          for (var i = 0; i < strs.length; i++) {
+	              theRequest[strs[i].split("=")[0]] = strs[i].split("=")[1];
+	          }
+	      }
+	      return theRequest;
+	  },
+	  loginweixin(datas){
+		 const h5course=uni.getStorageSync('H5course')
+		  var data = {
+		  	code: datas,
+			appId:this.appid,
+			companyId:h5course.companyId,
+			companyUserId:h5course.companyUserId,
+			projectId:h5course.projectId
+		  }
+		  // 自动看课调courseLoginByMp接口,其他变
+		  let type = h5course.type==1 ? 1 : 0 
+		  H5logoinApp(data,type).then(res => {
+		  		  this.res=res
+		  		uni.hideLoading();
+		  		if (res.code == 200) {
+		  			console.log(res)
+		  			uni.hideLoading();
+		  			uni.showToast({
+		  				icon:'none',
+		  				title: "成功获取用户信息",
+		  			});
+					this.userinfos.nickname=res.user.nickname
+					this.userinfos.avatar=res.user.avatar
+					uni.setStorageSync("userinfos",this.userinfos)
+					uni.setStorageSync('userInfo', res.user);
+					uni.setStorageSync('TOKEN_WEXIN', res.token);
+					this.usercode.code=datas
+					this.usercode.userId=res.user.userId
+		  			uni.$emit('usercode',this.usercode)
+		  			uni.navigateBack({
+		  				delta: 1
+		  			});
+		  		} else {
+					uni.hideLoading();
+		  			uni.showToast({
+		  			  title: res.msg || '获取用户信息失败',
+		  			  icon: 'none'
+		  			})
+					setTimeout(()=>{
+						uni.navigateBack({
+							delta: 1
+						});
+					},2000)
+		  		}
+		  	},
+		  	err => {}
+		  ).catch(err=>{
+		  	uni.hideLoading();
+		  		uni.showToast({
+		  			icon:'none',
+		  			title: "获取用户信息失败",
+		  		});
+		  });
+	  },
+    // 生成授权页面URL,附带小程序传递的参数
+    generateAuthUrl() {
+      // 获取当前小程序的场景值,用于后续业务处理
+      const scene = uni.getLaunchOptionsSync().scene
+      
+      // 这里替换为你的uniapp H5项目域名
+      
+      // 拼接参数,可包含小程序特有的信息
+	  this.h5Appid = this.getUrlParam().appid
+	  this.redirect_uri = this.webviewUrl
+      const params = {
+        scene,
+        appid: this.h5Appid, // 公众号AppID
+        redirect_uri: encodeURIComponent(this.redirect_uri),
+        scope: 'snsapi_userinfo',
+        state: 'wechat_redirect'
+      }
+      
+      // 微信公众号授权URL
+      return `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${params.appid}&redirect_uri=${params.redirect_uri}&response_type=code&scope=${params.scope}&state=${params.state}#wechat_redirect`
+    },
+    
+    // 处理web-view向小程序发送的消息
+    handleMessage(e) {
+      console.log('收到web-view消息:', e.detail)
+      console.log('收到web-view消息:', e)
+      // 获取H5页面传递过来的用户信息
+      if (e.detail && e.detail.type === 'user_info') {
+        this.userInfo = e.detail.data
+         this.token= e.detail.token
+        // 存储用户信息到本地
+        uni.setStorageSync('userInfo', this.userInfo)
+		uni.setStorageSync('TOKEN_WEXIN', this.userInfo)
+        
+        // 返回上一页或跳转到首页
+        uni.showToast({
+          title: '登录成功',
+          icon: 'success'
+        })
+        
+        setTimeout(() => {
+          uni.navigateBack()
+        }, 1500)
+      }
+    },
+    
+    // web-view加载完成
+    onLoads() {
+      this.loading = false
+      console.log('web-view加载完成')
+    },
+    
+    // web-view加载失败
+    onError(e) {
+      this.loading = false
+      console.error('web-view加载失败:', e)
+      uni.showToast({
+        title: '页面加载失败',
+        icon: 'none'
+      })
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.container {
+  width: 100%;
+  height: 100%;
+  position: relative;
+}
+
+.loading2 {
+  position: absolute;
+  top: 0;
+  left: 0;
+  width: 100%;
+  height: 100%;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  background-color: #fff;
+  z-index: 100;
+}
+
+web-view {
+  width: 100%;
+  height: 100%;
+}
+</style>    

+ 745 - 0
pages_shopping/live/confirmCreateOrder.vue

@@ -0,0 +1,745 @@
+<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>
+				</view>
+				<view class="arrow-box">
+					<image src="/static/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">{{address.phone}}</text>
+					</view>
+					<view class="address">
+						{{address.province}}{{address.city}}{{address.district}}{{address.detail}}
+					</view>
+				</view>
+				<view class="arrow-box">
+					<image src="/static/images/arrow_gray.png" mode=""></image>
+				</view>
+			</view>
+			<!-- 药品列表 -->
+			<view class="shopbox" v-for="(shop,idx) in carts" :key="idx">
+				<view class="shopbox-name" v-if="shop.storeName && shop.storeName != 'null'">
+					<text>{{shop.storeName}}</text>
+				</view>
+				<view class="goods-list">
+					<view v-for="(item,index) in shop.list" :key="index" class="item">
+						<view class="img-box">
+							<image :src="item.productAttrImage?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||0).toFixed(2)}}</text>
+								</view>
+								<view class="num">x{{item.cartNum}}</view>
+							</view>
+						</view>
+					</view>
+					<!-- 运费 -->
+					<view class="points">
+						<view class="left">
+							<text class="text">运费</text>
+						</view>
+						<view class="right" v-if="price&&price.length > 0">
+							<text
+								class="text">{{price[idx].payPostage==null||price[idx].payPostage==0?'免运费':(price[idx].payPostage||0).toFixed(2)}}</text>
+						</view>
+					</view>
+					<!-- 备注 -->
+					<view class="points">
+						<view class="left">
+							<text class="text">备注</text>
+						</view>
+						<view class="remarks">
+							<input type="text" v-model="shop.markinfo" placeholder="备注留言(选填)"
+								placeholder-class="input" />
+						</view>
+					</view>
+				</view>
+			</view>
+			<!-- 积分 -->
+			<view class="price-info">
+				<view class="price-info-title">价格明细</view>
+				<view class="points">
+					<view class="left">
+						<text class="text">商品总价</text>
+					</view>
+					<view class="right" style="align-items: baseline;">
+						<text class="price-info-unit">¥</text>
+						<text class="price-info-num">{{(priceSum||0).toFixed(2)}}</text>
+					</view>
+				</view>
+				<view class="points">
+					<view class="left">
+						<text class="text">运费</text>
+					</view>
+					<view class="right">
+						<text class="text" v-if="address!=null">{{price.pay_delivery==null||price.pay_delivery==0?'免运费':price.pay_delivery.toFixed(2)}}</text>
+						<text class="text" v-if="address==null">--</text>
+					</view>
+				</view>
+				<!-- <view class="points">
+					<view class="left">
+						<text class="text">服务费</text>
+					</view>
+					<view class="right">
+						<text class="text">{{price.serviceFee.toFixed(2)}}</text>
+					</view>
+				</view> -->
+				<view class="points">
+					<view class="left">
+						<text class="text">合计</text>
+					</view>
+					<view class="right" style="align-items: baseline;">
+						<text class="price-info-unit">¥</text>
+						<text class="price-info-num">{{(priceSum||0).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">{{(priceSum||0).toFixed(2)}}</text>
+					</view>
+				</view>
+				<view class="btn" @click="submitOrder">提交订单</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		createliveOrder, // 创建订单
+		userAddr, // 获取用户收货地址
+		cartOrder, //购物车订单
+		checked //获取购物车选中商品
+	} from "@/api/order.js"
+	export default {
+		data() {
+			return {
+				cityId:null,
+				priceSum: null,
+				cartsSelect: [],
+				address: null,
+				addressId: null,
+				totalNum: null,
+				orderKey: null,
+				price: null,
+				liveId: null,
+				orderList: [],
+				userInfo: null,
+				temps: [],
+				couponUserId: null,
+				couponText: "请选择",
+				couponsList: [],
+				couponVisible: false,
+				carts: [],
+				checked: false,
+				// type: null,
+				cartIds: null,
+				confirmParam: [],
+				
+			}
+		},
+
+		onLoad(options) {
+			uni.$on('updateAddress', this.handleAddressUpdate);
+			console.log("确认订单", options)
+
+			this.orderKey = options.orderKey;
+			this.liveId = options.liveId
+			this.productId = options.productId
+			this.totalNum = Number(options.totalNum) || 0
+			this.price = Number(options.price) || 0
+			this.priceSum = this.price * this.totalNum
+		},
+
+		mounted() {
+			this.getUserAddr()
+			uni.$on('updateAddress', (e) => {
+				this.address = e;
+				this.addressId = e.addressId;
+			});
+		},
+		onUnload() {
+			// 页面卸载时移除监听,避免内存泄漏
+			uni.$off('updateAddress', this.handleAddressUpdate);
+		},
+		beforeDestroy() {
+			// 移除事件监听,避免内存泄漏
+			uni.$off('updateAddress');
+		},
+		methods: {
+			handleAddressUpdate(item) {
+				console.log('接收到地址数据:', item);
+				// 在这里处理地址数据
+				this.cityId = item.cityId;
+				// 更新页面显示或其他操作
+			},
+			// 获取用户收货地址
+			getUserAddr() {
+				userAddr().then(res => {
+						if (res.code == 200) {
+							console.log("用户收货地址>>>>", res.data)
+							this.address = res.data;
+						} else {
+							uni.showToast({
+								title: res.msg,
+								icon: 'none'
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+
+
+			// 创建订单
+			createLiveOrder() {
+
+				let data = {
+					cityId:this.cityId,
+					liveId: this.liveId,
+					orderKey: this.orderKey,
+					userName: this.address.realName,
+					userPhone: this.address.phone,
+					userAddress: this.address.province+' ' + this.address.city+' ' + this.address.district+' ' + this.address
+						.detail,
+					cartId: "5",
+					productId: this.productId,
+					totalNum: this.totalNum,
+
+				}
+
+				return createliveOrder(data).then(res => { // 添加 return
+					if (res.code == 200) {
+						this.orderList = res.order;
+						return res.order; // 返回订单数据供后续使用
+					} else {
+						uni.showToast({
+							title: res.msg,
+							icon: 'none'
+						});
+						throw new Error(res.msg); // 抛出错误以便 submitOrder 捕获
+					}
+				});
+			},
+			getWeixinOrderTemps: function() {
+				getWeixinOrderTemps().then(
+					res => {
+						if (res.code == 200) {
+							this.temps = res.temp
+						} else {
+
+						}
+					},
+					rej => {}
+				);
+			},
+			couponSelect(item) {
+				this.couponText = "-¥" + (item.couponPrice || 0).toFixed(2);
+				this.couponUserId = item.id;
+				this.couponVisible = false;
+				this.computed();
+			},
+			openCoupon() {
+				let that = this;
+				var data = {
+					couponType: 2,
+					useMinPrice: this.price.payPrice
+				};
+				getMyEnableCouponList(data).then(res => {
+					this.couponVisible = true;
+					that.couponsList = res.data
+				})
+			},
+			integralChange(e) {
+				this.form.useIntegral = e ? 1 : 0
+				this.computed()
+			},
+			openAddress() {
+				uni.navigateTo({
+					url: '/pages_user/user/address'
+				})
+			},
+			// 提交订单
+			async submitOrder() {
+				try {
+					if (this.orderKey == null) {
+						uni.showToast({
+							icon: 'none',
+							title: '订单KEY不存在',
+						});
+						return;
+					}
+					if (this.address == null) {
+						uni.showToast({
+							icon: 'none',
+							title: '收货地址不能为空',
+						});
+						return;
+					}
+					let orderList;
+					orderList = await this.createLiveOrder(); // 等待订单数据返回
+					console.log("orderList>>", orderList)
+					const orderListStr = encodeURIComponent(JSON.stringify(orderList));
+					uni.navigateTo({
+						url: `/pages_shopping/live/paymentOrder?orderList=${orderListStr}`
+					});
+				} catch (error) {
+					uni.showToast({
+						title: res.msg,
+						icon: 'none'
+					});
+				}
+			},
+			// 购物车支付订单
+			async creatCartOrder() {
+				try {
+					if (this.orderKey == null) {
+						uni.showToast({
+							icon: 'none',
+							title: '订单KEY不存在',
+						});
+						return;
+					}
+					if (this.address == null) {
+						uni.showToast({
+							icon: 'none',
+							title: '收货地址不能为空',
+						});
+						return;
+					}
+					const orderList = await this.cartOrder(); // 等待订单数据返回
+					const orderListStr = encodeURIComponent(JSON.stringify(orderList));
+					uni.navigateTo({
+						url: `/pages_shopping/live/paymentOrder?orderList=${orderListStr}`
+					});
+				} catch (error) {
+					console.error('订单创建失败:', error);
+					uni.showToast({
+						title: '提交失败',
+						icon: 'none'
+					});
+				}
+			},
+		}
+	}
+</script>
+
+<style lang="scss">
+	.inner-box {
+		padding: 20upx 20upx 140upx;
+
+		.address-box {
+			margin-bottom: 20rpx;
+			box-sizing: border-box;
+			min-height: 171upx;
+			background: #FFFFFF;
+			border-radius: 16upx;
+			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%;
+				}
+			}
+		}
+
+		.shopbox {
+			background: #FFFFFF;
+			border-radius: 16rpx;
+			margin-bottom: 20rpx;
+
+			.points {
+				padding: 0 !important;
+			}
+
+			.remarks {
+				padding: 0 !important;
+			}
+		}
+
+		.shopbox-name {
+			padding: 30rpx 30rpx 0 30rpx;
+			font-family: PingFang SC, PingFang SC;
+			font-weight: 400;
+			font-size: 30rpx;
+			color: #111;
+			overflow: hidden;
+			white-space: nowrap;
+			text-overflow: ellipsis;
+		}
+
+		.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%, #0bb3f2 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;
+					}
+				}
+			}
+		}
+
+		.price-info {
+			background: #FFFFFF;
+			border-radius: 16upx;
+
+			&-title {
+				padding: 30rpx 30rpx 20rpx 30rpx;
+				font-family: PingFang SC, PingFang SC;
+				font-weight: 500;
+				font-size: 30rpx;
+				color: #111;
+			}
+
+			&-unit {
+				font-size: 24rpx;
+			}
+
+			&-num {
+				font-size: 28rpx;
+			}
+		}
+
+		.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: #0bb3f2;
+				border-radius: 44upx;
+			}
+		}
+	}
+</style>

+ 1645 - 0
pages_shopping/live/goods.vue

@@ -0,0 +1,1645 @@
+<template>
+	<view class="">
+		<view class="content">
+			<view class="shop-banner">
+				
+				<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="swiper">
+					<view class="swiper-item">
+						<image :src="goosDetail.image" mode="aspectFill"></image>
+						
+					</view>
+				</view> -->
+			</view>
+			<!-- 详细信息 -->
+			<view class="det-info">
+				<view class="price-box">
+					<view class="price">
+						<text class="label">会员价</text>
+						<text class="unit">¥</text>
+						<text class="num">{{goosDetail.price}}</text>
+						<text class="fs24 color-text2">零售价</text>
+						<text class="old">¥{{goosDetail.otPrice}}</text>
+					</view>
+					<text class="fs24 color-text2">月售{{goosDetail.sales}}件</text>
+				</view>
+				<view class="name-box">
+					{{goosDetail.productName}}
+				</view>
+			
+			</view>
+		</view>
+		<view class="guige">
+		
+			<view class="safe-box">
+				<text class="text">服务</text>
+				<view class="box">
+					<view v-for="(item,index) in serviceList" :key="index">
+						<image src="/static/images/googs_service.png" mode=""></image>
+						<text>{{item}}</text>
+					</view>
+					<view @click="openEditMoney()">
+						<image class='w48 h48' src="/static/images/arrow4.png"></image>
+					</view>
+				</view>
+			</view>
+
+			<!-- 点击服务,出现弹窗-->
+			<view class="popup-box" v-if="editShow">
+				<view class="info-mask" @tap="cancelEditMoney()"></view>
+				<view class="info-form">
+					<view class="top">
+						<view class="title">服务</view>
+						<view class="close" @click="cancelEditMoney()">
+						</view>
+					</view>
+					<view class="line"></view>
+					<view class="form-box">
+						<view class="form-item2">
+							<view class="form-item-box">
+								<text>免邮发货</text>
+							</view>
+							<view class="form-content">
+								订单支付成功后48小时内发货,若未在48小时内发货,平台审核后消费者将会收到至少3元无门槛红包(特殊商品及不可抗力因素除外)
+							</view>
+						</view>
+						<view class="form-item2">
+							<view class="form-item-box">
+								<text>药师服务</text>
+							</view>
+							<view class="form-content">
+								用药关怀认证药师,24小时专业用药咨询
+							</view>
+						</view>
+						<view class="form-item2">
+							<view class="form-item-box">
+								<text>隐私保护</text>
+							</view>
+							<view class="form-content">
+								除患者本人或其授权的代理人外,其他人员未经允许不得随意查阅患者的医疗记录
+							</view>
+						</view>
+					</view>
+					<view class="btns">
+						<view class="sub-btn" @click="cancelEditMoney()">确定</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<!-- 购买人数、库存 -->
+		<view class="det-box">
+			<view class="title">图文详情</view>
+			<view class="inner">
+				<view  v-html="goosDetail.description" style="font-size:0"></view>
+			</view>
+		</view>
+		<!-- 底部按钮 -->
+		<view class="btn-foot">
+			<view class="menu-box">
+					<view class="item"  @click="navgetTo('./storeOrderRefundList?liveId='+liveId)" style="position: relative;">
+					<image src="/static/images/googs2.png" mode=""></image>
+					<text class="label">售后</text>
+				</view>
+			</view>
+			<view class="btn-box">
+				<view class="btn buy" @click="addCart('buy')">{{buyText}}</view>
+			</view>
+		</view>
+
+		<!-- 选择药品规格弹窗 -->
+		<popupBottom ref="popup" :visible.sync="specVisible" title=" " radius="32" maxHeight="800">
+			<view class="product-spec">
+				<view class="pro-info">
+					<view class="img-box">
+						<image :src="goosDetail.image ||'/static/images/img.png'" mode="aspectFill"></image>
+					</view>
+					<view class="info-text">
+						<view class="info-title">{{goosDetail.productName}}</view>
+						<view class="price">
+							<view class="label">会员价</view>
+							<text class="unit">¥</text>
+							<text class="num">{{ goosDetail.price}}</text>
+						</view>
+						<view class="desc-box">
+							<text class="text">月售{{goosDetail.sales}}件</text>
+						</view>
+					</view>
+				</view>
+			
+				<view class="price-num">
+					<view class="label">数量</view>
+					<u-number-box bgColor="#ececec" v-model="goodsNum" @change="goodsNumChange"></u-number-box>
+				</view>
+				<view class="sub-btn" @click="submit">确定</view>
+			</view>
+		</popupBottom>
+	</view>
+</template>
+
+<script>
+	import {
+		liveGoodsDetail
+	
+	} from '@/api/living'
+	import {
+		liveCartDetails, //获取购物车详情
+		updateConfirm, // 点击取消/支付订单
+		updateLiveOrder, // 取消/支付订单
+		liveOrderKey, // 生成订单key
+		addLiveCart // 新增购物车
+	} from "@/api/order.js"
+	import popupBottom from '@/components/px-popup-bottom/px-popup-bottom.vue'
+	
+	export default {
+		components: {
+			popupBottom
+		},
+		data() {
+			return {
+				banner:[],
+				storeInfo:{},
+				goodsId: null,
+				totalNum: 1,
+				orderKey: null,
+				type: null,
+				liveOrderList: [], //下订单的 不在这个页面
+				liveId: null,
+				storeId:null,
+				serviceList: ['免邮发货', '药师服务', '隐私保护'],
+				editShow: false,
+				productId: null,
+				goosDetail: {}, //商品详情
+				loadding: true,
+				buyText: "立即购买",
+				goodsNum: 0, //商品选择数量
+				attrs: [],
+				values: [],
+				stores: [],
+				storeNames: [],
+				storeIdx: 0,
+				storeName: "",
+				product: {
+					price: 0,
+					otPrice: 0,
+				},
+				showModal: false,
+				// 当前轮播的图片
+				activeBanner: 1,
+				// 购物车数量
+				cartCount: 0,
+				// 规格弹窗
+				specVisible: false,
+				// // 规格数量
+				// specNum: 1,
+				config: null,
+				showServiceFee: false,
+				selectVal: "",
+				// 链接带的storeId
+				urlStoreId: undefined,
+				// 所选店铺
+				storeSelectInfo: {},
+				// 保存选的规格
+				choseSpecSubIndex: 0,
+				choseSpecIndex: 0,
+			};
+		},
+		onLoad(options) {
+			console.log("商品详情options",options)
+			if (options.productId) {
+				this.productId = options.productId;
+			}
+			this.liveId = options.liveId
+			this.goodsId = options.goodsId
+			
+			if (options.storeId) {
+				this.storeId = options.storeId || ""
+			
+			} else {
+				uni.showToast({
+					title: "storeId不存在~",
+					icon: "none"
+				})
+			}
+		
+		},
+		mounted() {
+			this.getliveGoods()
+			var userInfo = uni.getStorageSync("userInfo")
+		
+		},
+		methods: {
+			// swiper变化事件
+			swiperChange(event) {
+				this.activeBanner = event.detail.current + 1
+			},
+			// //店铺展示
+			// getliveStore() {
+			// 	let data = {
+			// 		pageSize: 10,
+			// 		page: 1
+			// 	}
+			// 	liveStore(this.liveId, data).then(res => {
+			// 			if (res.code == 200) {
+			// 				console.log("小黄车 店铺展示>>>>", res)
+			// 				this.products = res.data
+			// 			} else {
+			// 				uni.showToast({
+			// 					title: res.msg,
+			// 					icon: 'none'
+			// 				});
+			// 			}
+			// 		},
+			// 		rej => {}
+			// 	);
+			// },
+
+			doAddCart(type) {
+				if (this.totalNum == 0) {
+					uni.showToast({
+						icon: 'none',
+						title: "库存不足",
+					});
+					return;
+				}
+				var isBuy = type == "buy" ? 1 : 0;
+				if (type == "buy") {
+					this.getKey()
+				} else {
+					this.getCartCount()
+					uni.showToast({
+						icon: 'success',
+						title: "添加成功",
+					});
+				}
+
+			},
+			getCartCount() {
+				let data = {
+					productId: this.productId,
+					liveId: this.liveId,
+					goodsId: this.goodsId||"",
+					cartNum: this.totalNum,
+				};
+				addLiveCart(data).then(
+					res => {
+						if (res.code == 200) {
+							console.log("加购物车啦", res)
+							this.cartCount = res.data;
+						}
+					},
+					rej => {}
+				);
+
+			},
+			// 获得key
+			getKey() {
+				liveOrderKey().then(res => {
+						if (res.code == 200) {
+							console.log("下订单的key>>>>", res)
+							this.orderKey = res.orderKey
+							console.log("key>>>>", this.orderKey)
+							uni.navigateTo({
+								url: '/pages_shopping/live/confirmCreateOrder?&orderKey=' + this.orderKey +
+									'&liveId=' +
+									this.liveId + '&productId=' + this.productId + '&totalNum=' + this
+									.totalNum + '&price=' + (this.goosDetail.price || 0)
+							})
+						} else {
+							uni.showToast({
+								title: res.msg,
+								icon: 'none'
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+			// 选择商品数量
+			goodsNumChange(e) {
+				console.log('当前选择商品数量为: ' + e.value)
+				this.totalNum = e.value
+			},
+			// 提交
+			submit() {
+				this.specVisible = false
+				this.doAddCart(this.type);
+			},
+			// 加入购物车
+			addCart(type) {
+				this.type = type;
+				this.specVisible = true
+			},
+
+
+			// 跳转页面
+			navgetTo(url) {
+				uni.navigateTo({
+					url: url
+				})
+			},
+			openEditMoney() {
+				this.editShow = true;
+			},
+			cancelEditMoney(){
+				this.editShow = false;
+			},
+			//商品详情
+			getliveGoods() {
+				if (!this.productId) return;
+				liveGoodsDetail(this.productId).then(res => {
+						if (res.code == 200) {
+							// console.log("小黄车 商品详情>>>>", res)
+							this.goosDetail = res.data
+							this.banner = res.data.sliderImage.split(',');
+							console.log("轮播图",this.banner)
+
+						} else {
+							uni.showToast({
+								title: res.msg,
+								icon: 'none'
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+		}
+	}
+</script>
+
+<style lang="scss">
+	.content {
+		font-family: PingFang SC;
+	}
+
+	.share-box {
+		position: fixed;
+		right: 24rpx;
+		top: 70%;
+		z-index: 99;
+		width: 112rpx;
+		height: 112rpx;
+		border-radius: 16rpx 16rpx 16rpx 16rpx;
+		border: 1rpx solid #EFF3F7;
+		background-color: #FFFFFF;
+	}
+
+	.shop-banner {
+		height: 756rpx;
+		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: 44rpx;
+			position: absolute;
+			left: 0;
+			bottom: 0;
+			z-index: 9;
+			background-size: 20rpx 44rpx;
+			background-repeat: repeat-x;
+		}
+
+		.num-box {
+			width: 80rpx;
+			height: 40rpx;
+			line-height: 40rpx;
+			text-align: center;
+			font-size: 24rpx;
+			color: #FFFFFF;
+			background: rgba(0, 0, 0, .7);
+			border-radius: 20rpx;
+			position: absolute;
+			right: 40rpx;
+			bottom: 34rpx;
+			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;
+			}
+		}
+
+
+	}
+
+	.guige {
+		padding: 24rpx;
+		border-radius: 16rpx;
+		background: #fff;
+		width: auto;
+		font-size: 24rpx;
+		color: #222426;
+		margin: 24rpx;
+
+		.guige-gg {
+			.gg-text {
+				color: #898E91;
+				margin-right: 40rpx;
+			}
+		}
+
+		.safe-box {
+			display: flex;
+			align-items: center;
+			padding-top: 24rpx;
+			font-size: 24rpx;
+			color: #222426;
+
+			.text {
+				color: #999999;
+				margin-right: 40rpx;
+			}
+
+			.box {
+				display: flex;
+				align-items: center;
+
+				image {
+					width: 28rpx;
+					height: 28rpx;
+					margin-right: 10rpx;
+				}
+
+				view {
+					display: flex;
+					align-items: center;
+					margin-right: 40rpx;
+
+					&:last-child {
+						margin-right: 0;
+
+						image {
+							margin-right: 0;
+						}
+					}
+				}
+			}
+
+		}
+
+		.popup-box {
+			position: fixed;
+			top: 0;
+			right: 0;
+			left: 0;
+			bottom: 0;
+			z-index: 999;
+			display: flex;
+			justify-content: center;
+			align-items: flex-end;
+
+			.info-mask {
+				position: fixed;
+				top: 0;
+				right: 0;
+				bottom: 0;
+				left: 0;
+				background-color: rgba($color: #000000, $alpha: 0.5);
+				z-index: 999;
+			}
+
+			.info-form {
+				z-index: 1000;
+				width: 100%;
+				display: flex;
+				flex-direction: column;
+				justify-content: center;
+				align-items: center;
+				padding: 0 30rpx 60rpx;
+				background: #FFFFFF;
+				border-radius: 40rpx;
+
+				.top {
+					display: flex;
+				}
+
+				.line {
+					border-top: 1px solid #F1F1F1;
+					width: 100%;
+				}
+
+				.title {
+					padding: 30rpx;
+					display: flex;
+					justify-content: center;
+					align-items: center;
+					font-size: 36rpx;
+					font-weight: bold;
+					line-height: 44rpx;
+					color: #222222;
+				}
+
+				.close {
+					padding-top: 30rpx;
+					position: absolute;
+					right: 30rpx;
+				}
+
+				.form-box {
+					width: 100%;
+					padding-top: 30rpx;
+
+					.form-item2 {
+						padding-bottom: 30rpx;
+
+						// display: flex;
+						// align-items: flex-start;
+						// border-bottom: 1px solid #F1F1F1;
+						.form-item-box {
+							display: flex;
+							align-items: center;
+
+							text {
+								font-size: 28rpx;
+								color: #222426;
+								margin-left: 10rpx;
+								font-weight: bold;
+							}
+						}
+
+						.form-content {
+							font-size: 24rpx;
+							text-align: left;
+							color: #626468;
+							margin-top: 20rpx;
+							line-height: 40rpx;
+						}
+					}
+				}
+
+				.btns {
+					width: 100%;
+					height: 120rpx;
+					padding: 20rpx 30rpx;
+					display: flex;
+					align-items: center;
+					justify-content: center;
+
+					.sub-btn {
+						width: 100%;
+						height: 88rpx;
+						line-height: 88rpx;
+						text-align: center;
+						font-size: 36rpx;
+						font-weight: bold;
+						color: #FFFFFF;
+						background: #008FD3;
+						border-radius: 44rpx;
+					}
+				}
+
+			}
+		}
+	}
+
+	.det-info {
+		// background: #FFFFFF;
+		// padding: 36rpx 30rpx 25rpx;
+		background: #FFFFFF;
+		padding: 24rpx;
+		margin: 24rpx;
+		border-radius: 16rpx;
+
+		.price-box {
+			display: flex;
+			align-items: flex-end;
+			justify-content: space-between;
+
+			.price {
+				display: flex;
+				align-items: flex-end;
+
+				.label {
+					font-weight: 500;
+					font-size: 24rpx;
+					color: #FF5030;
+					line-height: 1.3;
+					margin-right: 10rpx;
+				}
+
+				.unit {
+					font-size: 26rpx;
+					font-weight: bold;
+					color: #FF6633;
+					line-height: 1.3;
+				}
+
+				.num {
+					font-size: 48rpx;
+					font-weight: bold;
+					color: #FF5030;
+					margin-right: 20rpx;
+					line-height: 1;
+				}
+
+				.old {
+					font-size: 24rpx;
+					font-family: PingFang SC;
+					font-weight: 400;
+					// text-decoration: line-through;
+					color: #898E91;
+					margin-left: 10rpx;
+					// line-height: 1.3;
+				}
+			}
+
+			// .share-box{
+			// 	width: 120rpx;
+			// 	height: 46rpx;
+			// 	border: 1px solid #0bb3f2;
+			// 	border-radius: 23rpx;
+			// 	display: flex;
+			// 	align-items: center;
+			// 	justify-content: center;
+			// 	position: relative;
+			// 	.text{
+			// 		font-size: 26rpx;
+			// 		font-family: PingFang SC;
+			// 		font-weight: 500;
+			// 		color: #0bb3f2;
+			// 	}
+			// 	image{
+			// 		margin-left: 2rpx;
+			// 		width: 25rpx;
+			// 		height: 24rpx;
+			// 	}
+			// 	.share{
+			// 		display: inline-block;
+			// 		position: absolute;
+			// 		top: 0;
+			// 		left: 0;
+			// 		width: 100%;
+			// 		height: 100%;
+			// 		opacity: 0;
+			// 	}
+			// }
+
+			.spec {
+				font-size: 24rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #999999;
+				line-height: 36rpx;
+			}
+		}
+
+		.name-box {
+			font-size: 32rpx;
+			font-weight: bold;
+			color: #111111;
+			line-height: 44rpx;
+			margin-top: 32rpx;
+
+			.tag {
+				display: inline-block;
+				padding: 2rpx 8rpx;
+				height: 32rpx;
+				background: #F5A623;
+				border-radius: 4rpx;
+				margin-right: 10rpx;
+				font-weight: 400;
+				font-size: 20rpx;
+				color: #FFFFFF;
+				line-height: 30rpx;
+				float: left;
+				margin-top: 7rpx;
+			}
+		}
+
+		.intro {
+			font-size: 26rpx;
+			font-weight: 500;
+			color: #999999;
+			line-height: 36rpx;
+			padding: 18rpx 0 23rpx;
+		}
+
+		.intro-box {
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			padding: 20rpx;
+			border-radius: 16rpx;
+			background: #F5F7FA;
+			width: auto;
+
+			.title-1 {
+				font-size: 24rpx;
+				color: #222426;
+				font-weight: bold;
+				width: 40%;
+				text-align: center;
+			}
+
+			.title-2 {
+				font-size: 24rpx;
+				color: #222426;
+				font-weight: bold;
+				display: block;
+			}
+
+			.intro-text {
+				// padding: 0 20rpx;
+			}
+
+			.intro-text2 {
+				width: 50%;
+			}
+
+			.intro-content {
+				color: #898E91;
+				font-size: 24rpx;
+			}
+
+			.line {
+				width: 1px;
+				height: 40rpx;
+				background: #EDEEEF;
+				margin: 0 20rpx;
+			}
+		}
+
+		.safe-box {
+			display: flex;
+			align-items: center;
+			padding-top: 24rpx;
+
+			image {
+				width: 20rpx;
+				height: 24rpx;
+				margin-right: 20rpx;
+			}
+
+			.text {
+				font-size: 22rpx;
+				font-weight: 500;
+				color: #999999;
+				line-height: 1;
+			}
+
+			.line {
+				width: 1px;
+				height: 23rpx;
+				background: #EDEEEF;
+				margin: 0 20rpx;
+			}
+		}
+	}
+
+	.inventor {
+		height: 88rpx;
+		padding: 0 39rpx 0 30rpx;
+		margin-top: 10rpx;
+		background: #FFFFFF;
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+
+		.left {
+			display: flex;
+			align-items: center;
+
+			.head-box {
+				margin-right: 27rpx;
+				display: flex;
+				align-items: center;
+
+				.head {
+					width: 48rpx;
+					height: 48rpx;
+					border-radius: 50%;
+					overflow: hidden;
+					box-shadow: 0 0 0 1px #fff;
+					margin-right: -10rpx;
+
+					image {
+						width: 100%;
+						height: 100%;
+					}
+				}
+			}
+
+			.num-box {
+				font-size: 24rpx;
+				font-weight: 500;
+				color: #999999;
+
+				.text {
+					font-size: 24rpx;
+					font-weight: 500;
+					color: #999999;
+				}
+			}
+		}
+
+		.right {
+			font-size: 24rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #999999;
+
+			.text {
+				font-size: 24rpx;
+				font-weight: 500;
+				color: #666666;
+			}
+		}
+	}
+
+	.effect {
+		box-sizing: border-box;
+		padding: 20rpx 30rpx;
+		background: #FFFFFF;
+		font-size: 28rpx;
+		font-weight: 500;
+		color: #666666;
+		line-height: 1.8;
+		margin-top: 10rpx;
+		display: flex;
+		flex-direction: row;
+		align-items: center;
+		justify-content: space-between;
+
+		.label {
+			font-size: 28rpx;
+			font-weight: 500;
+			color: #111111;
+			line-height: 1.8;
+		}
+	}
+
+
+	.shop-box {
+		
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		background: #FFFFFF;
+		font-size: 28rpx;
+		font-weight: 500;
+		color: #666666;
+		line-height: 1.8;
+		padding: 24rpx;
+		margin: 24rpx;
+		border-radius: 16rpx;
+
+		.logo {
+			flex-shrink: 0;
+			width: 100rpx;
+			height: 100rpx;
+			border-radius: 16rpx;
+			overflow: hidden;
+
+			image {
+				width: 100%;
+				height: 100%;
+			}
+		}
+
+		.txtBox {
+			flex: 1;
+			overflow: hidden;
+			margin: 0 30rpx;
+			display: flex;
+			flex-direction: column;
+			justify-content: space-between;
+		}
+
+		.name {
+			font-size: 32rpx;
+			font-weight: 600;
+			color: #333;
+			text-align: left;
+			overflow: hidden;
+			white-space: nowrap;
+			text-overflow: ellipsis;
+		}
+
+		.desc {
+			font-size: 24rpx;
+			font-weight: normal;
+			color: #222426;
+			text-align: left;
+		}
+
+
+		.goShop {
+			flex-shrink: 0;
+			width: 96rpx;
+			height: 56rpx;
+			background: #fff;
+			border-radius: 30rpx;
+			color: #008FD3;
+			font-size: 24rpx;
+			margin: 0;
+			border: 1px solid #008FD3;
+			padding: 0;
+			line-height: 56rpx;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+		}
+	}
+
+	.tech-pBox {
+		box-sizing: border-box;
+		padding: 0rpx 0rpx;
+		background: #FFFFFF;
+		font-size: 28rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #666666;
+
+		.label {
+			font-weight: bold;
+			font-size: 26rpx;
+			color: #222426;
+			text-align: left;
+			padding: 24rpx 0;
+		}
+
+		.item {
+			border: 1px solid #fff;
+			border-radius: 12rpx;
+			padding: 30rpx;
+			border: 1px solid #EFF3F7;
+			display: flex;
+			align-items: center;
+			margin-bottom: 20rpx;
+
+			.price {
+				font-size: 42rpx;
+				font-weight: bold;
+				color: #FF6633;
+				display: flex;
+				flex: 1;
+			}
+
+			.num {
+				font-size: 28rpx;
+				font-weight: normal;
+				color: #999;
+				width: 200rpx;
+				text-align: right;
+			}
+
+			.name {
+				max-width: 60%;
+				margin-right: 10rpx;
+				font-size: 28rpx;
+				font-weight: normal;
+				color: #333;
+				text-align: left;
+				overflow: hidden;
+				white-space: nowrap;
+				text-overflow: ellipsis;
+			}
+
+			image {
+				width: 100rpx;
+				height: 100rpx;
+				border-radius: 50%;
+				margin-right: 30rpx;
+			}
+
+			.tech-right {
+				flex: 1;
+
+				&-bottom {
+					color: #898E91;
+					font-size: 24rpx;
+				}
+
+				&-top {
+					display: flex;
+					align-items: flex-end;
+					margin-bottom: 10rpx;
+
+					.title-1 {
+						font-size: 32rpx;
+						color: #222426;
+						margin-right: 14rpx;
+					}
+
+					.title-2 {
+						font-weight: 400;
+						font-size: 24rpx;
+						color: #222426;
+					}
+				}
+			}
+
+		}
+
+		.hover {
+			border: 1rpx solid #008FD3;
+			background: #F0FAFF;
+		}
+
+		.shop-morebtn {
+			margin-top: 14rpx;
+			box-sizing: border-box;
+			padding: 12rpx 30rpx;
+			font-size: 28rpx;
+			font-weight: 500;
+			color: #111111;
+			background: #F7F7F7;
+			border-radius: 32rpx;
+			text-align: center;
+
+			text {
+				color: #999;
+			}
+		}
+	}
+
+	.shop-pBox {
+		box-sizing: border-box;
+		padding: 0rpx 0rpx;
+		background: #FFFFFF;
+		font-size: 28rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #666666;
+
+		.item {
+			border: 1px solid #fff;
+			border-radius: 12rpx;
+			padding: 18rpx 20rpx 24rpx;
+
+			.price {
+				font-size: 42rpx;
+				font-weight: bold;
+				color: #FF6633;
+				display: flex;
+				flex: 1;
+
+				.strong {
+					font-size: 30rpx;
+					line-height: 46rpx;
+					margin-top: 14rpx;
+				}
+			}
+
+			.num {
+				font-size: 28rpx;
+				font-weight: normal;
+				color: #999;
+				width: 200rpx;
+				text-align: right;
+			}
+
+			.name {
+				max-width: 60%;
+				margin-right: 10rpx;
+				font-size: 28rpx;
+				font-weight: normal;
+				color: #333;
+				text-align: left;
+				overflow: hidden;
+				white-space: nowrap;
+				text-overflow: ellipsis;
+			}
+
+		}
+
+		.hover {
+			border: 1rpx solid #FF6633;
+		}
+
+		.shop-morebtn {
+			margin-top: 14rpx;
+			box-sizing: border-box;
+			padding: 12rpx 30rpx;
+			font-size: 28rpx;
+			font-weight: 500;
+			color: #111111;
+			background: #F7F7F7;
+			border-radius: 32rpx;
+			text-align: center;
+
+			text {
+				color: #999;
+			}
+		}
+	}
+
+	.shop-pBox-name {
+		display: flex;
+		align-items: center;
+		justify-content: flex-start;
+	}
+
+	.storepopup {
+		padding: 40rpx 20rpx 20rpx 20rpx;
+
+		.storepopup-title {
+			text-align: center;
+			margin-bottom: 30rpx;
+			position: relative;
+
+			.close-icon {
+				width: 40rpx;
+				height: 40rpx;
+				position: absolute;
+				right: 0;
+				top: 50%;
+				transform: translate(0, -50%);
+			}
+		}
+
+		.storepopup-box {
+			height: 60vh;
+		}
+	}
+
+	.det-box {
+	
+		margin-top: 10rpx;
+		background-color: #FFFFFF;
+		padding: 24rpx;
+		margin: 24rpx 24rpx 175rpx 24rpx;
+		border-radius: 16rpx;
+
+		.title {
+			font-size: 32rpx;
+			font-weight: bold;
+			color: #333333;
+			line-height: 60rpx;
+			margin-bottom: 30rpx;
+			padding-bottom: 24rpx;
+			border-bottom: 1px solid #ECECEC;
+		}
+
+		.det-title {
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+
+			.tt {
+				font-size: 28rpx;
+				font-weight: bold;
+				color: #222426;
+			}
+		}
+
+		.det-right {
+			display: flex;
+			font-size: 24rpx;
+			color: #898E91;
+			align-items: center;
+		}
+
+		.det-table {
+			width: 100%;
+			margin: 24rpx 0;
+			background: #FFFFFF;
+			border-radius: 16rpx 16rpx 16rpx 16rpx;
+			border: 1rpx solid #ECECEC;
+			overflow: hidden;
+			font-size: 24rpx;
+
+			.row {
+				display: table-row;
+
+			}
+
+			.row:last-child .cell-1,
+			.row:last-child .cell-2 {
+				border-bottom: 0;
+			}
+
+			.cell {
+				display: table-cell;
+				padding: 24rpx;
+
+				&.cell-1 {
+					width: 30%;
+					text-align: center;
+					color: #626468;
+					background: #F5F7FA;
+					border-right: 1rpx solid #ECECEC;
+					border-bottom: 1rpx solid #ECECEC;
+				}
+
+				&.cell-2 {
+					color: #222426;
+					text-align: center;
+					border-bottom: 1rpx solid #ECECEC;
+				}
+			}
+		}
+	}
+
+	.btn-foot {
+		box-sizing: border-box;
+		width: 100%;
+		height: 151rpx;
+		background: #FFFFFF;
+		padding: 0 24rpx;
+		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: 48rpx;
+
+				&:last-child {
+					margin-right: 0;
+				}
+
+				image {
+					width: 40rpx;
+					height: 40rpx;
+					margin-bottom: 10rpx;
+				}
+
+				.label {
+					font-size: 20rpx;
+					font-weight: 500;
+					color: #626468;
+					text-align: center;
+				}
+			}
+		}
+
+		.btn-box {
+			display: flex;
+			align-items: center;
+
+			.btn {
+				width: 200rpx;
+				height: 88rpx;
+				line-height: 88rpx;
+				text-align: center;
+				border-radius: 44rpx;
+				margin-left: 20rpx;
+				font-size: 28rpx;
+				font-weight: bold;
+				color: #FFFFFF;
+
+				&:first-child {
+					margin-left: 0;
+				}
+
+				&.cart {
+					background: #FF5030;
+				}
+
+				&.buy {
+					background: #008FD3;
+				}
+			}
+		}
+	}
+
+	.product-spec {
+		padding-bottom: 30rpx;
+
+		.pro-info {
+			display: flex;
+			align-items: center;
+
+			.img-box {
+				width: 200rpx;
+				height: 200rpx;
+				background: #FFFFFF;
+				border-radius: 16rpx;
+				overflow: hidden;
+				margin-right: 30rpx;
+
+				image {
+					width: 100%;
+					height: 100%;
+				}
+			}
+
+			.info-text {
+				height: 200rpx;
+				display: flex;
+				flex-direction: column;
+				justify-content: space-between;
+
+				.info-title {
+					font-family: PingFang SC;
+					font-weight: 600;
+					font-size: 28rpx;
+					color: #222426;
+					text-align: left;
+				}
+
+				.price {
+					display: flex;
+					align-items: flex-end;
+
+					.label {
+						font-weight: 500;
+						font-size: 24rpx;
+						color: #FF5030;
+						line-height: 1.3;
+						margin-right: 10rpx;
+					}
+
+					.unit {
+						font-size: 32rpx;
+						font-weight: bold;
+						color: #FF6633;
+						line-height: 1.2;
+						margin-right: 10rpx;
+					}
+
+					.num {
+						font-size: 50rpx;
+						font-weight: bold;
+						color: #FF6633;
+						line-height: 1;
+					}
+				}
+
+				.desc-box {
+					display: flex;
+					flex-direction: column;
+					padding-bottom: 9rpx;
+
+					.text {
+						font-size: 26rpx;
+						font-weight: 500;
+						color: #999999;
+						margin-top: 27rpx;
+						line-height: 1;
+
+						&:first-child {
+							margin-top: 0;
+						}
+					}
+				}
+			}
+		}
+
+		.spec-box {
+			padding-top: 50rpx;
+
+			.title {
+				font-size: 26rpx;
+				font-weight: bold;
+				color: #111111;
+				line-height: 1;
+			}
+
+			.spec-list {
+				display: flex;
+				flex-wrap: wrap;
+				margin-top: 30rpx;
+
+				.item {
+					box-sizing: border-box;
+					height: 64rpx;
+					padding: 0 30rpx;
+					line-height: 64rpx;
+					font-size: 24rpx;
+					font-weight: 500;
+					color: #111111;
+					background: #F7F7F7;
+					border: 1px solid #F7F7F7;
+					border-radius: 32rpx;
+					margin-right: 20rpx;
+					margin-bottom: 30rpx;
+
+					&.active {
+						background: #F1FFFE;
+						border: 1px solid #008FD3;
+						color: #008FD3;
+					}
+				}
+			}
+		}
+
+		.price-num {
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			margin-top: 14rpx;
+
+			.label {
+				font-size: 26rpx;
+				font-weight: bold;
+				color: #111111;
+			}
+
+			// .num-box {
+			// 	display: flex;
+			// 	align-items: center;
+
+			// 	.img-box {
+			// 		width: 60rpx;
+			// 		height: 60rpx;
+			// 		border: 1px solid #dddddd;
+			// 		display: flex;
+			// 		align-items: center;
+			// 		justify-content: center;
+
+			// 		image {
+			// 			width: 25rpx;
+			// 			height: 25rpx;
+			// 		}
+			// 	}
+
+			// 	input {
+			// 		width: 60rpx;
+			// 		height: 60rpx;
+			// 		line-height: 60rpx;
+			// 		font-size: 28rpx;
+			// 		font-weight: 500;
+			// 		color: #111111;
+			// 		// border-radius: 4rpx;
+			// 		border-top: 1px solid #dddddd;
+			// 		border-bottom: 1px solid #dddddd;
+			// 		text-align: center;
+			// 		// margin: 0 16rpx;
+			// 	}
+			// }
+		}
+
+		.sub-btn {
+			width: 100%;
+			height: 88rpx;
+			line-height: 88rpx;
+			text-align: center;
+			font-size: 32rpx;
+			font-weight: bold;
+			color: #FFFFFF;
+			background: #008FD3;
+			border-radius: 44rpx;
+			margin-top: 30rpx;
+			// margin-bottom: 30rpx;
+
+		}
+	}
+
+	.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: 30rpx 0;
+		display: flex;
+		align-items: flex-start;
+		border-bottom: 1px solid #F1F1F1;
+
+		&:last-child {
+			border-bottom: none;
+		}
+
+		.label {
+			width: 180rpx;
+			text-align: left;
+			font-size: 30rpx;
+			line-height: 44rpx;
+			font-weight: 500;
+			color: #222222;
+			flex-shrink: 0;
+		}
+
+		input {
+			text-align: left;
+		}
+
+		.form-input {
+			font-size: 30rpx;
+			font-weight: 500;
+			color: #999999;
+			text-align: left;
+		}
+
+		.form-textarea {
+			font-size: 30rpx;
+			color: #999999;
+			height: 100rpx;
+			padding: 4rpx 0;
+		}
+
+		.birth-picker {
+			flex: 1;
+			display: flex;
+			align-items: center;
+
+			.right-box {
+				width: 100%;
+				display: flex;
+				align-items: center;
+
+				.input-box {
+					width: 470rpx;
+				}
+
+				.arrow {
+					width: 13rpx;
+					height: 23rpx;
+					margin-left: 20rpx;
+				}
+			}
+		}
+	}
+</style>

+ 389 - 0
pages_shopping/live/order.vue

@@ -0,0 +1,389 @@
+<template>
+	<view>
+		<view class="content">
+			<!-- 使用mescroll-body包裹订单列表 -->
+			<mescroll-body  bottom="0" ref="mescrollRef" @init="mescrollInit" 
+				@down="downCallback" @up="upCallback" :down="downOption" :up="upOption">
+			<u-tabs class="tabs" itemStyle="width:14%;height:100rpx;" :list="tabList" @click="tabsClick"
+				lineColor="#FF5C03"></u-tabs>
+				<view class="order-list">
+					<view class="order-item" v-for="(item,index) in orderList" :key="index">
+						<view class="order-num">
+							<text>订单号:{{item.orderCode}}</text>
+							<text v-if="item.status==-1">申请售后</text>
+							<text v-else-if="item.status==-2">退款成功</text>
+							<text v-else-if="item.status==1">待支付</text>
+							<text v-else-if="item.status==2">待发货</text>
+							<text v-else-if="item.status==3">待收货</text>
+							<text v-else-if="item.status==5">已完成</text>
+							<text v-else-if="item.status==-3">已取消</text>
+						</view>
+						<view class="order-main" v-for="(itm,idx) in item.orderItemList" :key="idx" @click="goDetail(itm)">
+							<view class="img-box">
+								<image :src="itm.imgUrl"></image>
+							</view>
+							<view class="order-text">
+								<view class="title">{{itm.productName}}</view>
+								<view class="txt">适用于乏力、头晕等人群,通过问诊可明确诊断给予专业性指导意见。</view>
+								<view class="num">
+									<text>{{itm.sales}} 人已购</text>
+									<text class="grey">x{{itm.num}}</text>
+								</view>
+							</view>
+						</view>
+						<view class="order-bottom">
+							<view class="order-money">
+								<text class="title">订单金额:</text>
+								<text class="num">¥<text class="bold">{{item.totalPrice}}</text></text>
+							</view>
+							<view class="button-group">
+								<view v-if="item.status == 1" @click="cancel(item)" class="button cancel ">取消订单</view>
+								<view v-if="item.status !== -1 && item.status !== -3&& item.status !== 1&& item.status !==-2" @click="refund(item)" class="button cancel">申请售后</view>
+								<view v-if="item.status ==3 ||item.status ==5 " class="button cancel"
+									@click.stop="showDelivery(item)">查看物流</view>
+								<view v-if="item.status == 1" @click="pay(item)" class="button pay">去支付</view>
+								<view v-if="item.status == 3" @click="confirmReceipt(item)" class="button pay">确认收货</view>
+							</view>
+						</view>
+					</view>
+				</view>
+			</mescroll-body>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		cancelOrder, //取消订单
+		liveOrderList, // 订单列表
+		finishOrder //确认收货
+	} from '@/api/order.js'
+	import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
+	
+	export default {
+		mixins: [MescrollMixin], // 使用mixin
+		data() {
+			return {
+				status: '',
+				orderList: [],
+				tabList: [{
+						name: "全部",
+						status: ""
+					},
+					{
+						name: "待支付",
+						status: "1"
+					},
+					{
+						name: "待发货",
+						status: "2"
+					},
+					{
+						name: "待收货",
+						status: "3"
+					},
+					{
+						name: "已完成",
+						status: "5"
+					}
+				],
+				// mescroll配置
+				downOption: {
+					use: true,
+					auto: false // 是否在初始化后自动执行下拉回调
+				},
+				upOption: {
+					use: true,
+					auto: true, // 是否在初始化时自动执行上拉回调
+					page: {
+						num: 0, // 当前页码
+						size: 10 // 每页数据条数
+					},
+					noMoreSize: 5, // 如果列表已无数据,可设置列表的总数量要大于等于5条才显示无更多数据
+					empty: {
+						icon: '/static/images/empty.png', // 可配置空状态图片
+						tip: '暂无订单数据' // 空状态提示文字
+					}
+				},
+				mescroll: null // mescroll实例
+			}
+		},
+		methods: {
+			goDetail(item){
+				console.log("跳转",item)
+				uni.navigateTo({
+					url: './storeOrderDetail?id=' + item.orderId
+				})
+			},
+			// mescroll初始化
+			mescrollInit(mescroll) {
+				this.mescroll = mescroll;
+			},
+			// 下拉刷新回调
+			downCallback(mescroll) {
+				// 重置列表数据
+				this.orderList = [];
+				mescroll.resetUpScroll();
+			},
+			// 上拉加载回调
+			upCallback(mescroll) {
+				const pageNum = mescroll.num;
+				const pageSize = mescroll.size;
+				
+				let data = {
+					pageSize: pageSize,
+					pageNum: pageNum,
+					status: this.status
+				}
+				
+				liveOrderList(data).then(res => {
+					if (res.code == 200) {
+						// 请求成功,处理数据
+						let curPageData = res.data.list || [];
+						// let curPageData = res.rows || [];
+						let curPageLen = curPageData.length;
+						let totalSize = res.total || 0;
+						
+						// 如果是第一页,直接赋值
+						if (pageNum === 1) {
+							this.orderList = [];
+						}
+						
+						// 追加新数据
+						this.orderList = this.orderList.concat(curPageData);
+						
+						// 方法一(推荐): 后台返回有总数据量
+						mescroll.endBySize(curPageLen, totalSize);
+						
+					} else {
+						// 请求失败
+						mescroll.endErr();
+						uni.showToast({
+							title: res.msg,
+							icon: 'none'
+						});
+					}
+				}).catch(err => {
+					// 请求异常
+					mescroll.endErr();
+					console.log("请求异常:" + JSON.stringify(err));
+				});
+			},
+			// 确认收货
+			confirmReceipt(item) {
+				var that = this;
+				uni.showModal({
+					title: '提示',
+					content: '确认收到货了吗',
+					success: function(res) {
+						if (res.confirm) {
+							var data = {
+								orderId: item.orderId,
+							};
+							finishOrder(data).then(res => {
+								if (res.code == 200) {
+									uni.showToast({
+										icon: 'success',
+										title: "操作成功",
+									});
+									// 刷新列表
+									that.mescroll.resetUpScroll();
+								} else {
+									uni.showToast({
+										icon: 'none',
+										title: res.msg,
+									});
+								}
+							});
+						}
+					}
+				});
+			},
+			// 取消订单
+			cancel(item) {
+			
+				var that = this;
+				uni.showModal({
+					title: '提示',
+					content: '确定取消订单吗',
+					success: function(res) {
+						if (res.confirm) {
+							const data = {
+								orderId: item.orderId,
+							};
+							console.log(data)	
+							cancelOrder(data).then(res => {
+								if (res.code == 200) {
+									uni.showToast({
+										icon: 'success',
+										title: "操作成功",
+									});
+									// 刷新列表
+									that.mescroll.resetUpScroll();
+								} else {
+									uni.showToast({
+										icon: 'none',
+										title: res.msg,
+									});
+								}
+							});
+						}
+					}
+				});
+			},
+			// 申请售后
+			refund(item) {
+				uni.navigateTo({
+					url: './refundOrderProduct?orderId=' + item.orderId
+				})
+			},
+			// tab切换
+			tabsClick(item) {
+				this.status = item.status;
+				// 切换tab时刷新列表
+				this.mescroll.resetUpScroll();
+			},
+			// 查看物流
+			showDelivery(item) {
+				uni.navigateTo({
+					url: `./storeOrderDelivery?orderId=${item.orderId}`
+				})
+			},
+			// 支付
+			pay(item) {
+				console.log("去支付",item)
+				uni.navigateTo({
+					url: `./paymentOrder?orderList=${encodeURIComponent(JSON.stringify(item))}`
+				})
+			},
+			// 评价
+			evaluate(item) {
+				// 评价逻辑
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	:deep(.u-tabs) {
+		background-color: #FFFFFF;
+	}
+
+	:deep(.u-tabs__wrapper__nav) {
+		width: 100%;
+	}
+
+	.content {
+		.order-list {
+			background: #F5F7FA;
+			padding: 0 24rpx;
+
+			.order-item {
+				background: #FFFFFF;
+				border-radius: 16rpx;
+				padding: 30rpx 24rpx;
+				margin-top: 24rpx;
+
+				.order-num {
+					display: flex;
+					justify-content: space-between;
+					font-size: 26rpx;
+					color: #999999;
+				}
+
+				.order-main {
+					display: flex;
+					margin: 26rpx 0 30rpx;
+
+					.img-box {
+						width: 180rpx;
+						height: 180rpx;
+						border-radius: 16rpx;
+						flex-shrink: 0;
+						overflow: hidden;
+						margin-right: 26rpx;
+
+						image {
+							width: 100%;
+							height: 100%;
+						}
+					}
+
+					.order-text {
+						.title {
+							font-weight: 500;
+							font-size: 28rpx;
+							color: #222222;
+						}
+
+						.txt {
+							font-size: 24rpx;
+							color: #999999;
+							margin: 8rpx 0 18rpx 0;
+						}
+
+						.num {
+							display: flex;
+							justify-content: space-between;
+							font-size: 22rpx;
+							color: #E69A22;
+
+							.grey {
+								margin-top: 12rpx;
+								font-size: 24rpx;
+								color: #999999;
+							}
+						}
+					}
+				}
+
+				.order-bottom {
+					display: flex;
+					justify-content: space-between;
+					align-items: center;
+
+					.order-money {
+						.title {
+							font-size: 24rpx;
+							color: #757575;
+						}
+
+						.num {
+							font-weight: 600;
+							font-size: 20rpx;
+							color: #FF5C03;
+
+							.bold {
+								font-weight: bold;
+								font-size: 36rpx;
+							}
+						}
+					}
+
+					.button-group {
+						display: flex;
+						align-items: center;
+
+						.button {
+							margin-left: 10rpx;
+							padding: 10rpx 14rpx;
+							border-radius: 8rpx;
+							font-weight: 500;
+							font-size: 24rpx;
+						}
+
+						.cancel {
+							background-color: #ececec;
+							color: #2c2c2c;
+						}
+
+						.pay {
+							color: #FFFFFF;
+							background: linear-gradient(270deg, #FF5C03 0%, #FFAC64 100%);
+						}
+					}
+				}
+			}
+		}
+	}
+</style>

+ 614 - 0
pages_shopping/live/paymentOrder.vue

@@ -0,0 +1,614 @@
+<template>
+	<view class="content">
+		<view class="inner">
+			<!-- 时间、价格 -->
+			<view class="time-price">
+				<text class="time">待支付</text>
+				<view class="price-box">
+					<text class="unit">¥</text>
+					<text class="num">{{order ? (Number(order.totalPrice) || 0).toFixed(2) : "0.00"}}</text>
+				</view>
+
+			</view>
+			<!-- 支付方式 -->
+			<view class="pay-type">
+				<view class="title">支付方式</view>
+				<radio-group @change="handlePayTypeChange">
+					<view class="item">
+						<view class="left">
+							<image src="/static/images/wecha_pay.png" mode=""></image>
+							<text class="text">微信支付</text>
+						</view>
+						<label>
+							<radio :value="1" :checked="payType === 1" />
+						</label>
+					</view>
+					<!-- #ifdef APP-PLUS||H5 -->
+					<view class="item">
+						<view class="left">
+							<image src="/static/images/zfb.png" mode=""></image>
+							<text class="text">支付宝</text>
+						</view>
+						<label>
+							<radio :value="2" :checked="payType === 2" />
+						</label>
+					</view>
+					<!-- #endif -->
+				</radio-group>
+			</view>
+			<!-- 订单详情查看 -->
+			<view class="order-info">
+				<view class="title">订单信息</view>
+				<view class="item">
+					<text class="label">订单编号</text>
+					<view class="sn-box">
+						<view>
+							<view class="text">{{order.orderCode}}</view>
+						</view>
+					</view>
+				</view>
+				<view class="item">
+					<text class="label">下单时间</text>
+					<text class="text">{{ formattedDate}} </text>
+				</view>
+				<view class="item">
+					<text class="label">订单金额</text>
+					<text class="text"
+						v-if="order!=null">{{order ? (Number(order.totalPrice) || 0).toFixed(2) : "0.00"}}</text>
+				</view>
+			</view>
+
+		</view>
+		<view class="btn-box">
+			<view class="btn" @click="payOrder()">去支付</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import dayjs from 'dayjs';
+	import {
+		weChatPayment
+	} from '@/api/pay_new'
+	import {
+		zfbPayment,
+		// weChatPayment
+	} from '@/api/pay'
+	export default {
+		data() {
+			return {
+				newOrder:{},
+				payType: 2,
+				order: null,
+				orderId: null,
+				payDelivery: 0,
+				payMoney: 0,
+				config: null,
+				payType: 1,
+				user: null,
+			}
+		},
+		computed: {
+			formattedDate() {
+				return this.order?.createTime ? dayjs(this.order.createTime).format('YYYY-MM-DD HH:mm:ss') : '';
+			},
+			payLimitTime() {
+				return this.order?.updateTime ?
+					dayjs(this.order.updateTime).add(2, 'day').format('YYYY-MM-DD HH:mm:ss') :
+					'';
+			}
+		},
+		onLoad(options) {
+			console.log("支付订单是>>", options)
+			// this.orderKey = options.orderKey;
+			// this.liveId = options.liveId
+			// this.productId=options.productId
+			// console.log("支付订单",options)
+
+			if (options.orderList) {
+				try {
+					const decoded = decodeURIComponent(options.orderList);
+					this.order = JSON.parse(decoded) || {}; // 默认空对象
+				} catch (e) {
+					console.error('参数解析失败:', e);
+					this.order = {}; // 显式赋默认值
+				}
+			}
+		},
+		// //发送给朋友
+		// onShareAppMessage(res) {
+		// 	const combinationOrderId = this.combinationOrderId ?
+		// 		`&combinationOrderId=${encodeURIComponent(this.combinationOrderId)}` : ''
+		// 	return {
+		// 		title: "帮TA支付",
+		// 		path: '/pages_user/user/otherPaymentOrder?orderId=' + this.orderId + combinationOrderId,
+		// 		imageUrl: '/static/images/logo.png' //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
+		// 	}
+
+		// },
+		methods: {
+			weixinPayOrder() {
+				var data = {
+					orderId: this.order.orderId,
+					payType: 1
+					// payType: this.order.payType
+				};
+				
+				var that = this;
+				uni.showLoading();
+				weChatPayment(data).then(
+					res => {
+						if (res.code == 200) {
+							console.log(res);
+								
+							if (res.payType == 1 || res.payType == 2) {
+								var result = JSON.parse(res.result);
+								uni.requestPayment({
+									provider: 'wxpay',
+									timeStamp: result.timeStamp,
+									nonceStr: result.nonceStr,
+									package: result.package,
+									signType: result.signType,
+									paySign: result.paySign,
+									success: function(res) {
+										uni.hideLoading();
+										
+											uni.redirectTo({
+											url: "./success?order=" + JSON.stringify(that.newOrder)
+										})
+										
+										
+									},
+									fail: function(err) {
+										uni.showToast({
+											icon: 'none',
+											title: 'fail:' + JSON.stringify(err),
+										});
+										uni.hideLoading();
+									}
+								});
+							}
+
+						} else {
+							uni.showToast({
+								icon: 'none',
+								title: res.msg,
+							});
+						}
+					},
+					rej => {}
+				);
+
+			},
+
+
+
+
+
+
+
+
+
+
+			payOrder() {
+				if (this.payType == 1) {
+					// this.doWechatPay()
+					console.log("这个order", this.order)
+					const {
+						itemJson,
+						...newOrder
+					} = this.order;
+					this.newOrder = newOrder;
+					console.log("这个newOrder", this.newOrder)
+					this.weixinPayOrder()
+				} else if (this.payType == 2) {
+					this.doAlipay()
+				} else {
+					uni.showToast({
+						title: "暂时无可用支付",
+						icon: 'none'
+					})
+				}
+			},
+
+			// 选微信支付或者支付宝支付
+			handlePayTypeChange(e) {
+				this.payType = e.detail.value; // 获取选中的 value
+				console.log('当前选中:', this.payType);
+			},
+
+
+			// async doWechatPay() {
+			// 	try {
+			// 		uni.showLoading({
+			// 			title: '发起支付中...',
+			// 			mask: true
+			// 		});
+			// 		let data = {
+			// 			orderId: this.order.orderId
+			// 		}
+			// 		await weChatPayment(data);
+			// 		uni.redirectTo({
+			// 			url: '/pages_shopping/live/success'
+			// 		});
+
+			// 	} catch (err) {
+			// 		console.error('支付流程异常:', err);
+			// 	} finally {
+			// 		uni.hideLoading();
+			// 	}
+			// },
+
+			// 支付宝支付
+			// doAlipay() {
+			// 	var data = {
+			// 		orderId: this.order.orderId
+			// 	};
+			// 	console.log("orderId>>", this.order.orderId)
+			// 	let that = this;
+			// 	// #ifdef H5||APP-PLUS
+			// 	// #ifdef APP-PLUS
+			// 	const tzCashier = uni.requireNativePlugin("TZBank-Cashier");
+			// 	// #endif
+			// 	uni.showLoading();
+			// 	zfbPayment(data).then(res => {
+			// 			console.log("支付开始", res)
+			// 			uni.hideLoading();
+			// 			if (res.code == 200) {
+			// 				console.log("支付在这里", res)
+			// 				if (res.type == "tz") {
+			// 					//console.log("qxj orderFlowNo:"+res.data.body.orderFlowNo+" businessCstNo:"+res.data.body.orderNo+" platMerCstNo:"+res.data.body.platMerCstNo);
+			// 					const match = res.data.body.url.match(/[\?&]businessCstNo=([^&]+)/);
+			// 					const businessCstNo = match ? match[1] : null;
+			// 					console.log("qxj tzCashier:" + tzCashier + " businessCstNo:" + businessCstNo);
+			// 					tzCashier.pay({
+			// 						env: 0,
+			// 						wxMiniProgramType: 0,
+			// 						// wxAppId: 'wx703c4bd07bbd1695',
+			// 						wxAppId: 'wx9ea36eecd281bcd3',
+			// 						wxUniversalLink: "https://yjf.runtzh.com/",
+			// 						orderFlowNo: res.data.body.orderFlowNo,
+			// 						businessCstNo: businessCstNo,
+			// 						platMerCstNo: res.data.body.platMerCstNo
+			// 					}, (res) => {
+			// 						// uni.showToast({
+			// 						// 	title:'收银台回调:'+JSON.stringify(res),
+			// 						// 	icon:'none'
+			// 						// })
+			// 						uni.$emit('closePrivilege', {});
+			// 						that.showPayTips = true;
+			// 					});
+			// 				} else if (res.type == 'hf') {
+			// 					if (uni.getWindowInfo().platform == 'android') {
+			// 						var alipayScheme = 'alipays://platformapi/startApp?&saId=10000007&qrcode=' + res
+			// 							.data.qr_code;
+			// 					} else {
+			// 						var alipayScheme = 'alipay://platformapi/startApp?&saId=10000007&qrcode=' + res
+			// 							.data.qr_code;
+			// 					}
+			// 					// 在uni-app中使用plus.runtime.openURL打开URL
+			// 					plus.runtime.openURL(alipayScheme, function(error) {
+
+			// 					});
+			// 					uni.$emit('closePrivilege', {});
+			// 					that.showPayTips = true;
+			// 				}
+			// 			} else {
+			// 				uni.showToast({
+			// 					title: res.msg,
+			// 					icon: 'none'
+			// 				})
+			// 			}
+			// 		},
+			// 		rej => {}
+			// 	);
+			// 	// #endif
+			// },
+
+
+			getUserInfo() {
+				getUserInfo().then(
+					res => {
+						if (res.code == 200) {
+							if (res.user != null) {
+								this.user = res.user;
+							}
+						} else {
+							uni.showToast({
+								icon: 'none',
+								title: "请求失败",
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+			getStoreConfig() {
+				getStoreConfig().then(
+					res => {
+						if (res.code == 200) {
+							this.config = res.data
+							console.log(this.config);
+						}
+					},
+					rej => {}
+				);
+			},
+			payTypeChange(e) {
+				if (this.combinationOrderId) {
+					this.editPayTypeByCombinationId(e.detail.value)
+				} else {
+					this.editPayType(e.detail.value)
+				}
+			},
+			editPayType(payType) {
+				var data = {
+					orderId: this.orderId,
+					payType: payType
+				};
+				var that = this;
+				uni.showLoading();
+				editPayType(data).then(
+					res => {
+						if (res.code == 200) {
+							console.log(res);
+							uni.hideLoading();
+							that.order = res.order;
+							that.order.orderCodes = that.order.orderCode ? [that.order.orderCode] : []
+							that.orderCode = that.order.orderCode
+							// this.payType=this.order.payType
+							this.payMoney = this.order.payMoney;
+							this.payDelivery = this.order.payDelivery;
+						} else {
+							uni.showToast({
+								icon: 'none',
+								title: res.msg,
+							});
+						}
+					},
+					rej => {}
+				);
+
+			},
+
+		}
+	}
+</script>
+
+<style lang="scss">
+	page {
+		height: 100%;
+	}
+
+	.content {
+		height: 100%;
+		display: flex;
+		flex-direction: column;
+		justify-content: space-between;
+
+		.inner {
+			padding: 20upx;
+
+			.time-price {
+				box-sizing: border-box;
+				padding: 50upx 0upx;
+				background: #FFFFFF;
+				border-radius: 16upx;
+				display: flex;
+				flex-direction: column;
+				align-items: center;
+
+				.time {
+					font-size: 32upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #222222;
+					line-height: 1;
+					text-align: center;
+				}
+
+				.desc {
+					margin: 30upx 0upx 15upx;
+					font-size: 26upx;
+					font-family: PingFang SC;
+					color: #999999;
+					line-height: 1;
+					text-align: center;
+				}
+
+				.price-box {
+					display: flex;
+					align-items: flex-end;
+					margin-top: 28upx;
+
+					.unit {
+						font-size: 32upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #FF6633;
+						line-height: 1.3;
+						margin-right: 10upx;
+					}
+
+					.num {
+						font-size: 56upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #FF6633;
+						line-height: 1;
+					}
+				}
+			}
+
+			.pay-type {
+				box-sizing: border-box;
+				background: #FFFFFF;
+				border-radius: 16upx;
+				margin-top: 20upx;
+				padding: 40upx 30upx;
+				display: flex;
+				flex-direction: column;
+				justify-content: space-between;
+
+				.title {
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #999999;
+					line-height: 1;
+					margin-bottom: 10upx;
+				}
+
+				.item {
+					padding: 15upx 0upx;
+					display: flex;
+					align-items: center;
+					justify-content: space-between;
+
+					.left {
+						display: flex;
+						align-items: center;
+
+						image {
+							width: 44upx;
+							height: 44upx;
+							margin-right: 20upx;
+						}
+
+						.text {
+							font-size: 30upx;
+							font-family: PingFang SC;
+							font-weight: bold;
+							color: #222222;
+							line-height: 1;
+						}
+					}
+				}
+			}
+
+			.order-info {
+				margin-top: 20upx;
+				background: #FFFFFF;
+				border-radius: 16upx;
+				padding: 40upx 30upx;
+
+				.title {
+					font-size: 30upx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #222222;
+					line-height: 1;
+				}
+
+				.item {
+					margin-top: 40upx;
+					display: flex;
+					align-items: center;
+					justify-content: space-between;
+
+					.label {
+						font-size: 26upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #666666;
+						line-height: 1;
+					}
+
+					.text {
+						font-size: 26upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #222222;
+						line-height: 32upx;
+					}
+
+					.cont-text {
+						font-size: 26upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #666666;
+
+						.bold {
+							color: #111111;
+						}
+					}
+
+					.sn-box {
+						display: flex;
+						align-items: center;
+
+						.copy-btn {
+							width: 58upx;
+							height: 32upx;
+							line-height: 32upx;
+							text-align: center;
+							font-size: 22upx;
+							font-weight: 500;
+							color: #222222;
+							background: #F5F5F5;
+							border-radius: 4upx;
+							margin-left: 24upx;
+						}
+					}
+
+				}
+
+				.line {
+					width: 100%;
+					height: 1px;
+					background: #F0F0F0;
+					margin-top: 30upx;
+				}
+			}
+		}
+
+		.btn-box {
+			height: 242upx;
+			background: #FFFFFF;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			flex-direction: column;
+
+			.btn {
+				width: 91.73%;
+				height: 88upx;
+				line-height: 88upx;
+				font-size: 30upx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #FFFFFF;
+				text-align: center;
+				background: #0bb3f2;
+				border-radius: 44upx;
+				margin-bottom: 10rpx;
+			}
+
+			.other-btn {
+				width: 91.73%;
+				height: 88upx;
+				line-height: 88upx;
+				font-size: 30upx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #0bb3f2;
+				border: 1rpx solid #0bb3f2;
+				text-align: center;
+				background: #FFFFFF;
+				border-radius: 44upx;
+				margin-bottom: 10rpx;
+				position: relative;
+
+				.share {
+					display: inline-block;
+					position: absolute;
+					top: 0;
+					left: 0;
+					width: 100%;
+					height: 100%;
+					opacity: 0;
+				}
+			}
+		}
+	}
+</style>

+ 548 - 0
pages_shopping/live/refundOrder.vue

@@ -0,0 +1,548 @@
+<template>
+	<view class="content">
+		<view class="inner">
+			<!-- 药品列表 -->
+			<view class="drug-list">
+				<view class="item">
+					<!-- 药品信息 -->
+					<view v-if="order!=null&&order.isPackage!=1" class="drug-info" v-for="(item,index) in items"
+						:key="index">
+						<view class="img-box">
+							<image :src="JSON.parse(item.jsonInfo).image" mode="aspectFit"></image>
+						</view>
+						<view class="info">
+							<view class="top">
+								<view class="title ellipsis2">{{ JSON.parse(item.jsonInfo).productName}}</view>
+							</view>
+							<view class="price-num">
+								<view class="price-box">
+									<text class="unit">¥</text>
+									<text class="price">{{JSON.parse(item.jsonInfo).price.toFixed(2)}}</text>
+								</view>
+								<view class="num">x{{JSON.parse(item.jsonInfo).num}}</view>
+							</view>
+						</view>
+					</view>
+					<view v-if="order!=null&&order.isPackage==1&&order.packageJson!=null" class="drug-info">
+						<view class="img-box">
+							<image :src="JSON.parse(order.packageJson).imgUrl" mode="aspectFit"></image>
+						</view>
+						<view class="info">
+							<view class="top">
+								<view class="title ellipsis2">
+									<view class="tag">套餐</view>{{JSON.parse(order.packageJson).title}}
+								</view>
+								<view class="spec">{{JSON.parse(order.packageJson).descs}}</view>
+							</view>
+
+						</view>
+					</view>
+				</view>
+			</view>
+			<!-- 申请原因 -->
+			<view class="reason-apply">
+				<view class="title-box">
+					<text class="label">退款金额</text>
+					<input class="money" type="text" disabled v-model="refundAmount" placeholder="退款金额"
+						placeholder-class="form-input" />
+				</view>
+				<view class="title-box">
+					<text class="label">申请原因</text>
+					<picker @change="reasonsChange" :value="reasons" range-key="dictLabel" :range="reasonsList">
+						<view class="chose-box">
+							<text class="text">{{reasons}}</text>
+							<image src="/static/images/arrow_gray.png" mode=""></image>
+						</view>
+					</picker>
+				</view>
+				<view class="textarea-box">
+					<textarea v-model="explains" placeholder="请描述申请售后服务的具体原因" placeholder-class="textarea-place" />
+				</view>
+			</view>
+			<!-- 底部按钮 -->
+			<view class="btn-box">
+				<view class="sub-btn" @click="submit()">申请售后</view>
+			</view>
+		</view>
+
+
+	</view>
+</template>
+
+<script>
+	import {
+		// Dicts,
+		getStoreOrderItems, //获取订单项列表
+		applyAfterSales, // 申请售后
+		revoke //撤销售后
+	} from '@/api/order.js'
+	export default {
+
+		data() {
+			return {
+				orderId: null,
+				order: null,
+				orderCode: null,
+				items: [],
+				type: null,
+				reasonsList: [],
+				reasons: "请选择",
+				explains: "",
+				refundAmount: 0.00,
+
+			}
+		},
+		onLoad(option) {
+			this.type = option.type;
+			this.orderCode = option.orderCode;
+			this.orderId = option.orderId;
+			console.log(this.orderId);
+			this.getStoreOrder()
+			this.reasonsList=this.utils.getDict("storeAfterSalesReasons");
+			// this.getDicts()
+		},
+		methods: {
+			// getDicts() {
+			// 	var data = {
+			// 		key: "store_after_sales_reasons"
+			// 	};
+			// 	Dicts(data).then(res => {
+			// 		if (res.code == 200) {
+			// 		this.reasonsList=res.data
+			// 		} else {
+			// 			uni.showToast({
+			// 				icon: 'none',
+			// 				title: "请求失败",
+			// 			});
+
+			// 		}
+			// 	});
+			// },
+			getStoreOrder() {
+				var data = {
+					orderId: this.orderId
+				};
+				getStoreOrderItems(data).then(res => {
+					if (res.code == 200) {
+						this.order = res.order;
+						this.items = res.items;
+						if (this.order.isPayRemain == 0) {
+							this.refundAmount = this.order.totalPrice.toFixed(2)
+						} else {
+							this.refundAmount = this.order.totalPrice.toFixed(2)
+						}
+					} else {
+						uni.showToast({
+							icon: 'none',
+							title: "请求失败",
+						});
+
+					}
+				});
+			},
+			reasonsChange(e) {
+				console.log(e.detail.value)
+				this.reasons = this.reasonsList[e.detail.value].dictLabel
+			},
+			submit() {
+				if (this.reasons == "请选择") {
+					uni.showToast({
+						icon: 'none',
+						title: '请选择原因'
+					});
+					return;
+				}
+				if (this.refundAmount < 0) {
+					uni.showToast({
+						icon: 'none',
+						title: '请输入退款金额'
+					});
+					return;
+				}
+
+				var productIds = this.items.map(item => item.productId);
+				var products = [];
+				for (var i = 0; i < productIds.length; i++) {
+					var item = {
+						productId: productIds[i]
+					};
+					products.push(item);
+				}
+				var data = {
+					orderId:this.orderId,
+					refundType:this.type,//0仅退款1退货退款
+					refundAmount: this.refundAmount,
+					orderCode: this.orderCode,
+					reasons: this.reasons,
+					explains: this.explains,
+					productList: products
+				};
+				applyAfterSales(data).then(res => {
+					if (res.code == 200) {
+						uni.showToast({
+							icon: 'success',
+							title: '提交成功'
+						});
+						setTimeout(function() {
+							uni.redirectTo({
+								url: './order'
+							})
+						}, 500);
+
+					} else {
+						uni.showToast({
+							icon: 'none',
+							title: res.msg
+						});
+
+					}
+				});
+			},
+		}
+	}
+</script>
+
+<style lang="scss">
+	.content {
+		margin-bottom: 170upx;
+
+		.inner {
+			padding: 20upx;
+
+			.drug-list {
+				.item {
+					background: #FFFFFF;
+					border-radius: 16upx;
+					margin-bottom: 20upx;
+					padding: 0 30upx;
+
+					.drug-info {
+						display: flex;
+						align-items: center;
+						padding: 30upx 0;
+
+						.img-box {
+							width: 160upx;
+							height: 160upx;
+							margin-right: 30upx;
+
+							image {
+								width: 100%;
+								height: 100%;
+							}
+						}
+
+						.info {
+							width: calc(100% - 160upx);
+							height: 160upx;
+							display: flex;
+							flex-direction: column;
+							justify-content: space-between;
+
+							.top {
+								.title {
+									font-size: 28upx;
+									font-family: PingFang SC;
+									font-weight: 500;
+									color: #111111;
+									line-height: 1.4;
+
+									.tag {
+										display: inline-block;
+										padding: 0 6upx;
+										height: 30upx;
+										background: linear-gradient(90deg, #66b2ef 0%, #0bb3f2 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 {
+									font-size: 24upx;
+									font-family: PingFang SC;
+									font-weight: 500;
+									color: #999999;
+									line-height: 1;
+									margin-top: 14upx;
+								}
+							}
+
+							.price-num {
+								display: flex;
+								align-items: center;
+								justify-content: space-between;
+
+								.price-box {
+									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: 5upx;
+									}
+
+									.price {
+										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: bold;
+									color: #666666;
+								}
+							}
+						}
+					}
+
+				}
+			}
+
+			.reason-apply {
+				margin-top: 20upx;
+				background: #FFFFFF;
+				border-radius: 16upx;
+				padding: 0 30upx;
+
+				.title-box {
+					height: 86upx;
+					display: flex;
+					align-items: center;
+					justify-content: space-between;
+					border-bottom: 1px solid #F0F0F0;
+
+					.label {
+						font-size: 30upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #333333;
+					}
+
+					.money {
+
+						font-size: 24upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #999999;
+					}
+
+					.chose-box {
+						display: flex;
+						align-items: center;
+
+						.text {
+							font-size: 24upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #999999;
+						}
+
+						image {
+							width: 14upx;
+							height: 24upx;
+							margin-left: 10upx;
+						}
+					}
+				}
+
+				.textarea-box {
+					padding: 30upx 0;
+
+					textarea {
+						width: 100%;
+						box-sizing: border-box;
+						background: #F5F5F5;
+						border-radius: 16upx;
+						padding: 30upx 20upx;
+						font-size: 24upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #111111;
+					}
+
+					.textarea-place {
+						font-size: 24upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #999999;
+					}
+				}
+			}
+
+			.return-method {
+				background: #FFFFFF;
+				border-radius: 16upx;
+				margin-top: 20upx;
+				padding: 0 30upx 40upx;
+
+				.title-box {
+					height: 86upx;
+					display: flex;
+					align-items: center;
+					justify-content: space-between;
+					border-bottom: 1px solid #F0F0F0;
+
+					.text {
+						font-size: 30upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #333333;
+					}
+				}
+
+				.return-tips {
+					margin-top: 30upx;
+					margin-bottom: 30upx;
+					height: 80upx;
+					background: #FFF4E6;
+					border-radius: 16upx;
+					padding: 0 20upx;
+					display: flex;
+					align-items: center;
+
+					.text {
+						font-size: 24upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #EF8A07;
+					}
+				}
+
+				.info-item {
+					display: flex;
+					align-items: center;
+					justify-content: space-between;
+					margin-bottom: 40upx;
+
+					&:last-child {
+						margin-bottom: 0;
+					}
+
+					.label {
+						font-size: 26upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #666666;
+						line-height: 1;
+					}
+
+					.text {
+						font-size: 26upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #111111;
+						line-height: 1;
+					}
+
+					.detail-box {
+						display: flex;
+						align-items: center;
+
+						.price-box {
+							display: flex;
+							align-items: flex-end;
+							margin-right: 18upx;
+
+							.unit {
+								font-size: 24upx;
+								font-family: PingFang SC;
+								font-weight: 500;
+								color: #111111;
+								line-height: 1.2;
+							}
+
+							.num {
+								font-size: 32upx;
+								font-family: PingFang SC;
+								font-weight: bold;
+								color: #111111;
+								line-height: 1;
+							}
+						}
+
+						.det-text {
+							font-size: 26upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #111111;
+						}
+
+						image {
+							width: 14upx;
+							height: 24upx;
+							margin-left: 10upx;
+						}
+					}
+				}
+			}
+		}
+
+		.reson-box {
+			padding: 0 10upx 60upx;
+
+			.reson-item {
+				width: 100%;
+				height: 110upx;
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+
+				.title {
+					font-size: 30upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #111111;
+				}
+			}
+		}
+	}
+
+	.btn-box {
+		height: 120upx;
+		padding: 0 30upx;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+
+		.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: #0bb3f2;
+			border-radius: 44upx;
+		}
+	}
+
+	input {
+		text-align: right;
+	}
+
+	.form-input {
+		font-size: 30upx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #999999;
+		text-align: right;
+	}
+</style>

+ 260 - 0
pages_shopping/live/refundOrderProduct.vue

@@ -0,0 +1,260 @@
+<template>
+	<view class="content">
+		<view class="inner">
+			<view class="goods-list">
+				<view v-if="order!=null&&order.isPackage!=1" class="item" v-for="(item,index) in items" :key="index">
+					<image class="goods-img" :src="JSON.parse(item.jsonInfo).image" mode="aspectFit"></image>
+					<view class="info">
+						<view class="top">
+							<view class="title ellipsis2">{{ JSON.parse(item.jsonInfo).productName}}</view>
+							<view class="spec">{{JSON.parse(item.jsonInfo).sku}}</view>
+						</view>
+						<view class="price-num">
+							<view class="price-box">
+								<text class="unit">¥</text>
+								<text class="price">{{JSON.parse(item.jsonInfo).price.toFixed(2)}}</text>
+							</view>
+							<view class="num">x{{JSON.parse(item.jsonInfo).num}}</view>
+						</view>
+					</view>
+				</view>
+				<view v-if="order!=null&&order.isPackage==1&&order.packageJson!=null" class="item">
+					<image class="goods-img" :src="JSON.parse(order.packageJson).imgUrl" mode="aspectFit"></image>
+				</view>
+			</view>
+
+		</view>
+		<!-- 底部按钮 -->
+		<view class="btn-box">
+			<view class="text">提交申请后,客服会与您电话沟通,请保持手机通畅</view>
+			<view class="btns">
+				<view class="left"></view>
+				<view class="right">
+					<view class="btn cancel" v-if="order.status==2 || order.status==2" @click="submit(0)">仅退款</view>
+					<view class="btn cancel" v-if="order.status==3||order.status==4" @click="submit(1)">退款退货</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		getStoreOrderItems, //获取订单项列表
+	} from '@/api/order.js'
+	export default {
+
+		data() {
+			return {
+				order: {},
+				items: [],
+
+			}
+		},
+		onLoad(option) {
+			this.orderId = option.orderId;
+			this.getStoreOrder()
+		},
+		methods: {
+			checkChange(item) {
+				item.checked = !item.checked;
+			},
+			submit(type) {
+				uni.redirectTo({
+					url: '/pages_shopping/live/refundOrder?orderId=' + this.order.orderId + "&type=" + type + "&orderCode=" +
+						this.order.orderCode
+				})
+			},
+			getStoreOrder() {
+				var data = {
+					orderId: this.orderId
+				};
+				getStoreOrderItems(data).then(res => {
+					if (res.code == 200) {
+						console.log("获取订单项列表>>>", res)
+						this.order = res.order;
+						this.items = res.items;
+
+					} else {
+						uni.showToast({
+							icon: 'none',
+							title: "请求失败",
+						});
+
+					}
+				});
+			},
+		}
+	}
+</script>
+
+<style lang="scss">
+	.content {
+		margin-bottom: 170rpx;
+
+		.inner {
+			padding: 20rpx;
+
+			.goods-list {
+				.item {
+					box-sizing: border-box;
+					height: 221rpx;
+					background: #FFFFFF;
+					padding: 30rpx;
+					display: flex;
+					align-items: center;
+
+					&:last-child {
+						margin-bottom: 0;
+					}
+
+					.goods-img {
+						width: 160rpx;
+						height: 160rpx;
+						background: #FFFFFF;
+						margin-right: 30rpx;
+						flex-shrink: 0;
+					}
+
+					.info {
+						width: calc(100% - 160rpx);
+						height: 160rpx;
+						display: flex;
+						flex-direction: column;
+						justify-content: space-between;
+
+						.top {
+							.title {
+								font-size: 28rpx;
+								font-family: PingFang SC;
+								font-weight: 500;
+								color: #111111;
+								line-height: 1.4;
+
+								.tag {
+									display: inline-block;
+									padding: 0 6rpx;
+									height: 30rpx;
+									background: linear-gradient(90deg, #66b2ef 0%, #0bb3f2 100%);
+									border-radius: 4rpx;
+									margin-right: 10rpx;
+									font-size: 22rpx;
+									font-family: PingFang SC;
+									font-weight: bold;
+									color: #FFFFFF;
+									line-height: 30rpx;
+									float: left;
+									margin-top: 7rpx;
+								}
+							}
+
+							.spec {
+								font-size: 24rpx;
+								font-family: PingFang SC;
+								font-weight: 500;
+								color: #999999;
+								line-height: 1;
+								margin-top: 14rpx;
+							}
+						}
+
+						.price-num {
+							display: flex;
+							align-items: center;
+							justify-content: space-between;
+
+							.price-box {
+								display: flex;
+								align-items: flex-end;
+
+								.unit {
+									font-size: 24rpx;
+									font-family: PingFang SC;
+									font-weight: 500;
+									color: #111111;
+									line-height: 1.2;
+									margin-right: 5rpx;
+								}
+
+								.price {
+									font-size: 32rpx;
+									font-family: PingFang SC;
+									font-weight: 500;
+									color: #111111;
+									line-height: 1;
+								}
+							}
+
+							.num {
+								font-size: 24rpx;
+								font-family: PingFang SC;
+								font-weight: bold;
+								color: #666666;
+							}
+						}
+					}
+				}
+			}
+
+		}
+
+		.btn-box {
+			width: 100%;
+			height: 160rpx;
+			position: fixed;
+			bottom: 0;
+			background: #FFFFFF;
+
+			.text {
+				font-size: 24rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #999999;
+				line-height: 1;
+				padding: 28rpx 0;
+				text-align: center;
+			}
+
+			.btns {
+				padding: 0rpx 30rpx;
+				display: flex;
+				flex-direction: row;
+				justify-content: space-between;
+				align-items: center;
+
+				.left {
+					font-size: 24rpx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #999999;
+				}
+
+				.right {
+					display: flex;
+					flex-direction: row;
+					justify-content: flex-end;
+					align-items: center;
+
+					.btn {
+						width: 155rpx;
+						height: 64rpx;
+						line-height: 64rpx;
+						font-size: 26rpx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						text-align: center;
+						border-radius: 32rpx;
+						margin-left: 15rpx;
+
+						&.cancel {
+							border: 1px solid #DDDDDD;
+							color: #666666;
+						}
+					}
+				}
+
+			}
+
+		}
+	}
+</style>

+ 306 - 0
pages_shopping/live/storeOrderDelivery.vue

@@ -0,0 +1,306 @@
+<template>
+	<view>
+		<view class="top-cont">
+			<!-- 背景图片 -->
+			<image class="bg" src="/static/images/order_top_bg.png" mode=""></image>
+			<view class="top-inner">			
+				<!-- 这里是状态栏 -->
+				<view class="status_bar" :style="{height: statusBarHeight}"></view>
+				<view class="back-box" @click="back">
+					<image src="/static/images/back_white.png" mode=""></image>
+					<text class="title">物流信息</text>
+					<text></text>
+				</view>
+				<!-- 运单号 -->
+				<view class="waybill-number">
+					<view class="inner">
+						<view class="num-box">
+							<text class="text">运单号</text>
+							<text class="text">{{deliveryId}}</text>
+							<view class="copy" @click="copyOrderSn(deliveryId)">复制</view>
+						</view>
+						<view class="kf-box">
+							<text class="text">{{express.name}}</text>
+							<!-- <text class="text">客服电话:95311</text> -->
+						</view>
+					</view>
+				</view>
+				<view class="content"  v-if="expressList!=null">
+					<!-- 物流信息 -->
+					<view class="refund-steps" v-if="expressList.Traces!=null">
+						<view v-for="(item,index) in expressList.Traces" :key="index" class="steps">
+							<view class="title">
+								<!-- <text v-if="index == 0" class="text black-text">已签收</text> -->
+								<!-- <text  class="text gray-bold">运输中</text> -->
+								<!-- 左侧灰色圆点 -->
+								<view class="dot"></view>
+								<!-- 对号 -->
+								<image  class="img" src="/static/images/complete.png" mode=""></image>
+								<!-- 运输中图标 -->
+								<image  class="img" src="/static/images/car40.png" mode=""></image>
+							</view>
+							<view  class="desc-text">
+								{{item.AcceptStation}}
+							</view>
+							 
+							<view class="time">{{item.AcceptTime}}</view>
+						</view>
+					</view>
+				</view>
+				
+			</view>
+			
+		</view>
+		
+	</view>
+</template>
+
+<script>
+	// import {getMyStoreOrderById,cancelOrder,getExpress} from '@/api/storeOrder'
+	export default {
+		data() {
+			return {
+				statusBarHeight:uni.getStorageSync("menuInfo").statusBarHeight,
+				orderId:null,
+				deliveryId:null,
+				express:{},
+				expressList:[],
+			};
+		},
+		onLoad(option) {
+			this.orderId=option.orderId;
+			this.getExpress();
+		},
+		methods: {
+			getExpress(){
+				var data={orderId:this.orderId};
+				
+				getExpress(data).then(res => {
+					if(res.code==200){
+						this.express=res.express;
+						this.expressList=res.data;
+						this.deliveryId=res.deliveryId
+				 
+					}else{
+						uni.showToast({
+							icon:'none',
+							title: "请求失败",
+						});
+						 
+					}
+				});
+			},
+			// 返回上一页
+			back() {
+				uni.navigateBack()
+			},
+			// 复制运单号
+			copyOrderSn(text) {
+				// 复制方法
+				uni.setClipboardData({
+					data:text,
+					success:()=>{
+						uni.showToast({
+							title:'内容已成功复制到剪切板',
+							icon:'none'
+						})
+					}
+				});
+			},
+			// 拨打电话
+			callPhone(phone) {
+				uni.makePhoneCall({
+					phoneNumber: phone
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.top-cont{
+		width: 100%;
+		height: 336upx;
+		position: relative;
+		.bg{
+			width: 100%;
+			height: 100%;
+			position: absolute;
+			top: 0;
+			left: 0;
+			z-index: 1;
+		}
+		.top-inner{
+			width: 100%;
+			height: 100%;
+			position: absolute;
+			top: 0;
+			left: 0;
+			z-index: 2;
+			.back-box{
+				height: 88upx;
+				padding-left: 22upx;
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+				padding: 0 20upx;
+				image{
+					width: 40upx;
+					height: 40upx;
+				}
+				.title{
+					font-size: 36upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #FFFFFF;
+				}
+			}
+			.waybill-number{
+				padding: 0 20upx;
+				margin-top: 66upx;
+				.inner{
+					box-sizing: border-box;
+					height: 150upx;
+					background: #FFFFFF;
+					border-radius: 16upx;
+					padding: 40upx 30upx;
+					display: flex;
+					flex-direction: column;
+					justify-content: space-between;
+					.num-box{
+						display: flex;
+						align-items: center;
+						.text{
+							font-size: 28upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #111111;
+							line-height: 1;
+							margin-right: 30upx;
+							&:last-child{
+								margin-right: 20upx;
+							}
+						}
+						.copy{
+							width: 58upx;
+							height: 32upx;
+							line-height: 32upx;
+							text-align: center;
+							font-size: 22upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #222222;
+							background: #F5F5F5;
+							border-radius: 4upx;
+						}
+					}
+					.kf-box{
+						display: flex;
+						align-items: center;
+						.text{
+							font-size: 26upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #999999;
+							line-height: 1;
+							margin-right: 20upx;
+						}
+					}
+				}
+			}
+			
+		}
+	}
+	.content{
+		margin: 20rpx 0rpx;
+		padding: 0 20upx;
+		.refund-steps{
+			background: #FFFFFF;
+			border-radius: 16upx;
+			padding: 40upx 44upx;
+			.steps{
+				padding-left: 40upx;
+				padding-bottom: 56upx;
+				position: relative;
+				&::after{
+					content: "";
+					width: 4upx;
+					height: 100%;
+					background: #F1F1F1;
+					position: absolute;
+					left: 0;
+					top: 20upx;
+				}
+				&:last-child{
+					padding-bottom: 0;
+					&::after{
+						display: none;
+					}
+				}
+				.title{
+					position: relative;
+					.text{
+						font-size: 30upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #666666;
+						line-height: 38upx;
+						&.black-text{
+							color: #111111;
+							font-weight: bold;
+						}
+						&.gray-bold{
+							font-weight: bold;
+							color: #666666;
+						}
+					}
+					.dot{
+						width: 16upx;
+						height: 16upx;
+						background: #EBEBEB;
+						border-radius: 50%;
+						position: absolute;
+						left: -46upx;
+						top: 11upx;
+						z-index: 10;
+						&.active{
+							background-color: #0bb3f2;
+						}
+					}
+					.img{
+						width: 40upx;
+						height: 40upx;
+						position: absolute;
+						left: -57upx;
+						top: 2upx;
+						z-index: 10;
+					}
+				}
+				.desc-text{
+					font-size: 28upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #666666;
+					line-height: 1.6;
+					margin-top: 10upx;
+					.phone{
+						font-size: 28upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #0bb3f2;
+						line-height: 1.6;
+					}
+				}
+				.time{
+					font-size: 24upx;
+					font-family: Gilroy;
+					font-weight: 500;
+					color: #999999;
+					margin-top: 10upx;
+				}
+			}
+		}
+		
+	}
+	
+</style>

+ 851 - 0
pages_shopping/live/storeOrderDetail.vue

@@ -0,0 +1,851 @@
+<template>
+	<view>
+		<view class="top-cont">
+			<!-- 背景图片 -->
+			<image class="bg" src="../../static/images/order_top_bg.png" mode=""></image>
+			<view class="top-inner">
+				<!-- 这里是状态栏 -->
+				<view class="fixed-top-box">
+					<view class="status_bar" :style="{height: statusBarHeight}"></view>
+					<view class="back-box" @click="back">
+						<image src="../../static/images/back_white.png" mode=""></image>
+						<text class="title">订单详情</text>
+						<text></text>
+					</view>
+				</view>
+
+				<!-- 顶部固定后站位元素 -->
+				<view style="padding-bottom: 88upx;">
+					<view :style="{height: statusBarHeight}"></view>
+				</view>
+				<!-- 订单状态 -->
+				<view class="order-status">
+					<!-- 待付款 -->
+					<view v-if="order.status == 1" class="inner">
+						<view class="img-box">
+							<image src="../../static/images/pag96.png" mode=""></image>
+						</view>
+						<view class="status-box">
+							<text class="status">待付款</text>
+							<!-- <text class="desc">请在{{payLimitTime}}前完成支付</text> -->
+						</view>
+					</view>
+					<!-- 待发货 -->
+					<view v-if="order.status == 2" class="inner">
+						<view class="img-box">
+							<image src="../../static/images/pag96.png" mode=""></image>
+						</view>
+						<view class="status-box">
+							<text class="status">待发货</text>
+							<text class="desc">等待后台发货</text>
+						</view>
+					</view>
+					<!-- 已发货、待收货 -->
+					<view v-if="order.status == 3" class="inner">
+						<view class="img-box">
+							<image src="../../static/images/receipt.png" mode=""></image>
+						</view>
+						<view class="status-box">
+							<text class="status">待收货</text>
+							<text class="desc">运输中</text>
+						</view>
+					</view>
+					<!-- 已完成 -->
+					<view v-if="order.status == 5" class="inner">
+						<view class="img-box">
+							<image src="../../static/images/finish96.png" mode=""></image>
+						</view>
+						<view class="status-box">
+							<text class="status">已完成</text>
+							<text class="desc">订单已确认收货,交易完成</text>
+						</view>
+					</view>
+					<!--交易取消 -->
+					<view v-if="order.status == -3" class="inner">
+						<view class="img-box">
+							<image src="../../static/images/close_trade.png" mode=""></image>
+						</view>
+						<view class="status-box">
+							<text class="status">交易关闭</text>
+							<text class="desc">订单已取消</text>
+						</view>
+					</view>
+					<view v-if="order.status == -1" class="inner">
+						<view class="img-box">
+							<image src="../../static/images/close_trade.png" mode=""></image>
+						</view>
+						<view class="status-box">
+							<text class="status">申请售后</text>
+							<text class="desc">请等待客服审核</text>
+						</view>
+					</view>
+					<view v-if="order.status == -2" class="inner">
+						<view class="img-box">
+							<image src="../../static/images/close_trade.png" mode=""></image>
+						</view>
+						<view class="status-box">
+							<text class="status">退款成功</text>
+							<text class="desc">已成功退款</text>
+						</view>
+					</view>
+				</view>
+				<!-- 下单人信息 -->
+				<view class="order-placer">
+					<view class="inner">
+						<image class="location" src="../../static/images/location.png" mode=""></image>
+						<view class="info">
+							<view class="name-phone">
+								<text class="text">{{order.userName}}</text>
+								<text class="text"
+									v-if="order.userPhone!=null">{{utils.parsePhone(order.userPhone)}}</text>
+							</view>
+							<view class="address ellipsis2">
+								{{order.userAddress}}
+							</view>
+						</view>
+					</view>
+				</view>
+				<view class="content">
+					
+					<!-- 药品列表 -->
+					<view class="goods-list">
+						<view class="item"	@click="openDetails(product)">
+							<view class="img-box">
+								<image :src="product.image" mode="aspectFill"></image>
+							</view>
+							<view class="info-box">
+								<view>
+									<view class="name-box ellipsis2">
+										<!-- <view class="tag">处方药</view> -->
+										{{product.productName}}
+									</view>
+									<view class="spec ellipsis2">{{product.sales}}</view>
+								</view>
+								<view class="price-num">
+									<view class="price">
+										<text class="unit">¥</text>
+										<text class="num">{{product.price.toFixed(2)}}</text>
+									</view>
+									<!-- <view class="num">x{{item.num}}</view> -->
+								</view>
+							</view>
+						</view>
+						<!-- <view class="item">
+							<view class="img-box">
+								<image :src="JSON.parse(order.packageJson).imgUrl" mode="aspectFill"></image>
+							</view>
+							<view class="info-box">
+								<view>
+									<view class="name-box ellipsis2">
+										<view class="tag">套餐</view>{{JSON.parse(order.packageJson).title}}
+									</view>
+									<view class="spec ellipsis2">{{JSON.parse(order.packageJson).descs}}</view>
+								</view>
+							</view>
+						</view> -->
+
+						<!-- 已优惠、小计 -->
+						<view class="sub-total">
+							<view class="discount">
+								订单金额:¥{{order.totalPrice}}
+							</view>
+						</view>
+					</view>
+					
+					
+					
+					
+					<!-- 订单信息 -->
+					<view class="order-info">
+						<view class="title">订单信息</view>
+						<view class="item">
+							<text class="label">订单编号</text>
+							<view class="sn-box">
+								<text class="text">{{order.orderCode}}</text>
+								<view class="copy-btn" @click="copyOrderSn(order.orderCode)">复制</view>
+							</view>
+						</view>
+						<view class="item">
+							<text class="label">下单时间</text>
+							<text class="text">{{order.createTime}}</text>
+						</view>
+						<view class="item">
+							<text class="label">支付方式</text>
+							<text class="text" v-if="order.payType==1">微信支付</text>
+							<!-- <text class="text" v-if="order.payType==2">物流代收</text> -->
+						</view>
+						<view class="item">
+							<text class="label">订单金额</text>
+							<text class="text" v-if="order.totalPrice!=null">¥{{order.totalPrice.toFixed(2)}}</text>
+						</view>
+
+						<view class="item">
+							<text class="label">运费</text>
+							<text class="text" v-if="order.payPostage!=null">¥{{order.payPostage.toFixed(2)}}</text>
+						</view>
+						<!-- <view class="item">
+							<text class="label">服务费</text>
+							<text class="text" v-if="order.serviceFee!=null">¥{{order.serviceFee.toFixed(2)}}</text>
+						</view> -->
+						<!-- <view class="item">
+							<text class="label">优惠金额</text>
+							<text class="text" v-if="order.couponPrice!=null">-¥{{order.couponPrice.toFixed(2)}}</text>
+						</view> -->
+						<view class="item">
+							<text class="label">应付金额</text>
+							<text class="text" v-if="order.totalPrice!=null">¥{{order.totalPrice.toFixed(2)}}</text>
+						</view>
+						<view class="item">
+							<text class="label">支付金额</text>
+							<text class="text" v-if="order.payMoney!=null">¥{{order.payMoney.toFixed(2)}}</text>
+						</view>
+						<!-- <view class="item">
+							<text class="label">代收金额</text>
+							<text class="text" v-if="order.payDelivery!=null">¥{{order.payDelivery.toFixed(2)}}</text>
+						</view> -->
+						<view class="item">
+							<text class="label">支付时间</text>
+							<text class="text" v-if="order.payTime!=null">{{order.payTime}}</text>
+						</view>
+					</view>
+					<!-- 处方信息 -->
+					<!-- <view class="order-info" v-if="order.isPrescribe&&prescribe!=null">
+						<view class="title">处方信息</view>
+						<view class="item">
+							<text class="label">处方单号</text>
+							<text class="text">{{prescribe.rpId}}</text>
+						</view>
+						<view class="item" v-if="prescribe.doctorName!=null">
+							<text class="label">开方医生</text>
+							<text class="text">{{prescribe.doctorName}}</text>
+						</view>
+						<view class="item" v-if="prescribe.rpUrl!=null">
+							<text class="label">电子处方</text>
+							<view class="check-box" @click="showImg()">
+								<text class="text">查看</text>
+								<image src="../../static/images/arrow4.png" mode=""></image>
+							</view>
+						</view>
+						<view class="item">
+							<text class="label">审核意见</text>
+							<text class="text" v-if="prescribe.auditReason!=null">{{prescribe.auditReason}}</text>
+						</view>
+					</view> -->
+				</view>
+
+			</view>
+		</view>
+		<!-- 按钮 -->
+		<view class="btn-box">
+			<view class="btn cancel" v-if="order.status==0" @click="cancel()">取消订单</view>
+			<view class="btn pay" v-if="order.status==0" @click="pay()">立即付款</view>
+			<!-- <view class="btn cancel"  v-if="(order.status==0||order.status==1)&&order.isPrescribe==1&&prescribe==null"  @click="addPrescribe()">开处方</view> -->
+			<view class="btn cancel" v-if="isAfterSales==1" @click="refund()">申请售后</view>
+			<view class="btn pay" v-if="order.status>=2&&order.deliveryId!=null" @click="express()">查看物流</view>
+			<view class="btn pay" v-if="order.status==2&&order.payType!=1&&order.isPayRemain==0&&order.deliverySn=='SF'"
+				@click="payRemain()">支付尾款</view>
+			<view class="btn pay" v-if="order.status==2" @click="finish()">确认收货</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		getMyStoreOrderById,
+		cancelOrder,
+		finishOrder
+	} from '@/api/order.js'
+	export default {
+		data() {
+			return {
+				product:{},
+				isAfterSales: 0,
+				payLimitTime: null,
+				orderId: null,
+				order: {},
+				items: [],
+				prescribe: null,
+				orderCode: '',
+				// 状态栏的高度
+				statusBarHeight: uni.getStorageSync('menuInfo').statusBarHeight,
+
+			};
+		},
+		onLoad(option) {
+			this.orderId = option.id
+			if (!option.orderCode) {}
+		},
+		onShow() {
+			this.getMyStoreOrderById()
+		},
+		methods: {
+			openDetails(item) {
+				console.log(item)
+				uni.navigateTo({
+					url: '/pages_shopping/shopping/productDetails?productId=' + item.productId
+				})
+			},
+			addPrescribe() {
+				uni.navigateTo({
+					url: "/pages/shopping/prescribe?orderId=" + this.order.id
+				})
+			},
+			showImg() {
+				var imgArr = [];
+				imgArr.push(this.prescribe.rpUrl)
+				//预览图片
+				uni.previewImage({
+					urls: imgArr,
+					current: imgArr[0]
+				});
+			},
+			getMyStoreOrderById() {
+				// var data={orderId:this.orderId};
+				getMyStoreOrderById(this.orderId).then(res => {
+					if (res.code == 200) {
+						this.order = res.data;
+						this.product=JSON.parse(res.data.itemJson) 
+						console.log("这个》》》",this.product)
+						console.log(this.product.image)
+						// this.order=res.order;
+						// this.items=res.items;
+						// this.payLimitTime=res.payLimitTime;
+						// this.prescribe=res.prescribe;
+						// this.isAfterSales=res.isAfterSales;
+					} else {
+						uni.showToast({
+							icon: 'none',
+							title: "请求失败",
+						});
+					}
+				});
+			},
+			express() {
+				uni.navigateTo({
+					url: './storeOrderDelivery?orderId=' + this.order.id
+				})
+			},
+			cancel() {
+				var that = this;
+				uni.showModal({
+					title: '提示',
+					content: '确定取消订单吗',
+					success: function(res) {
+						if (res.confirm) {
+							var data = {
+								orderId: that.order.id
+							};
+							cancelOrder(data).then(res => {
+								if (res.code == 200) {
+									that.getMyStoreOrderById()
+									// uni.$emit('refreshOrder');
+								} else {
+									uni.showToast({
+										icon: 'none',
+										title: res.msg,
+									});
+								}
+							});
+						} else if (res.cancel) {}
+					}
+				});
+			},
+			finish() {
+				var that = this;
+				uni.showModal({
+					title: '提示',
+					content: '确定已收货吗',
+					success: function(res) {
+						if (res.confirm) {
+							var data = {
+								orderId: that.order.id
+							};
+							finishOrder(data).then(res => {
+								if (res.code == 200) {
+									that.getMyStoreOrderById()
+									uni.$emit('refreshOrder');
+								} else {
+									uni.showToast({
+										icon: 'none',
+										title: res.msg,
+									});
+								}
+							});
+						} else if (res.cancel) {}
+					}
+				});
+			},
+			pay() {
+				uni.navigateTo({
+					url: './paymentOrder?orderId=' + this.order.id
+				})
+			},
+			// payRemain() {
+			// 	 uni.navigateTo({
+			// 	 	url: '/pages_user/user/paymentOrderRemain?orderId='+this.order.id
+			// 	 })
+			// },
+			// 返回上一页
+			back() {
+				let pages = getCurrentPages();
+				console.log(pages.length);
+				if (pages.length > 1) {
+					uni.navigateBack()
+				} else {
+					uni.reLaunch({
+						url: "/pages/common/launch"
+					})
+				}
+
+			},
+			// 复制订单编号
+			copyOrderSn(text) {
+				// 复制方法
+				uni.setClipboardData({
+					data: text,
+					success: () => {
+						uni.showToast({
+							title: '内容已成功复制到剪切板',
+							icon: 'none'
+						})
+					}
+				});
+			},
+			// 退货
+			refund() {
+				uni.navigateTo({
+					url: './refundOrderProduct?orderId=' + this.orderId
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.fixed-top-box {
+		width: 100%;
+		background: linear-gradient(135deg, #2BC7B9 0%, #60CDC3 100%);
+		position: fixed;
+		top: 0;
+		left: 0;
+		z-index: 1000;
+	}
+
+	.top-cont {
+		width: 100%;
+		height: 476upx;
+		position: relative;
+
+		.bg {
+			width: 100%;
+			height: 100%;
+			position: absolute;
+			top: 0;
+			left: 0;
+			z-index: 1;
+		}
+
+		.top-inner {
+			width: 100%;
+			height: 100%;
+			position: absolute;
+			top: 0;
+			left: 0;
+			z-index: 2;
+
+			.back-box {
+				height: 88upx;
+				padding-left: 22upx;
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+				padding: 0 20upx;
+
+				image {
+					width: 40upx;
+					height: 40upx;
+				}
+
+				.title {
+					font-size: 36upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #FFFFFF;
+				}
+			}
+
+			.order-status {
+				margin-top: 60upx;
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+				padding: 0 30upx;
+
+				.inner {
+					display: flex;
+					align-items: center;
+
+					.img-box {
+						width: 96upx;
+						height: 96upx;
+						margin-right: 30upx;
+
+						image {
+							width: 100%;
+							height: 100%;
+						}
+					}
+
+					.status-box {
+						height: 96upx;
+						display: flex;
+						flex-direction: column;
+						justify-content: center;
+
+						.status {
+							font-size: 40upx;
+							font-family: PingFang SC;
+							font-weight: bold;
+							color: #FFFFFF;
+							line-height: 1;
+						}
+
+						.desc {
+							font-size: 26upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #FFFFFF;
+							line-height: 1;
+							margin-top: 30upx;
+						}
+					}
+				}
+			}
+
+			.order-placer {
+				margin-top: 50upx;
+				padding: 0 20upx;
+
+				.inner {
+					box-sizing: border-box;
+					border-radius: 16upx;
+					height: 150upx;
+					padding: 40upx 30upx;
+					display: flex;
+					align-items: center;
+					background: #FFFFFF;
+
+					.location {
+						width: 24upx;
+						height: 27upx;
+						margin-right: 18upx;
+						flex-shrink: 0;
+					}
+
+					.info {
+						.name-phone {
+							display: flex;
+							align-items: center;
+
+							.text {
+								font-size: 28upx;
+								font-family: PingFang SC;
+								font-weight: bold;
+								color: #333333;
+								line-height: 1;
+								margin-right: 20upx;
+
+								&:last-child {
+									margin-right: 0;
+								}
+							}
+						}
+
+						.address {
+							font-size: 26upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #999999;
+							line-height: 1.3;
+							margin-top: 10upx;
+						}
+					}
+				}
+
+			}
+		}
+	}
+
+	.content {
+		margin: 20rpx 0rpx;
+		padding: 0 20upx 140rpx 20upx;
+
+		.goods-list {
+			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(135deg, #2BC7B9 0%, #60CDC3 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: 18upx;
+						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;
+
+				.discount {
+					font-size: 24upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #999999;
+					line-height: 1;
+					margin-right: 30upx;
+				}
+
+				.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;
+					}
+				}
+			}
+		}
+
+		.order-info {
+			margin-top: 20upx;
+			background: #FFFFFF;
+			border-radius: 16upx;
+			padding: 40upx 30upx;
+
+			.title {
+				font-size: 30upx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #222222;
+				line-height: 1;
+			}
+
+			.item {
+				margin-top: 40upx;
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+
+				.label {
+					font-size: 26upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #666666;
+					line-height: 1;
+				}
+
+				.text {
+					font-size: 26upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #222222;
+					line-height: 32upx;
+				}
+
+				.cont-text {
+					font-size: 26upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #666666;
+
+					.bold {
+						color: #111111;
+					}
+				}
+
+				.sn-box {
+					display: flex;
+					align-items: center;
+
+					.copy-btn {
+						width: 58upx;
+						height: 32upx;
+						line-height: 32upx;
+						text-align: center;
+						font-size: 22upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #222222;
+						background: #F5F5F5;
+						border-radius: 4upx;
+						margin-left: 24upx;
+					}
+				}
+
+				.check-box {
+					display: flex;
+					align-items: center;
+
+					image {
+						width: 14upx;
+						height: 24upx;
+						margin-left: 10upx;
+					}
+				}
+			}
+
+			.line {
+				width: 100%;
+				height: 1px;
+				background: #F0F0F0;
+				margin-top: 30upx;
+			}
+		}
+	}
+
+	.btn-box {
+		z-index: 999;
+		bottom: 0;
+		width: 100%;
+		position: fixed;
+		height: 120upx;
+		box-sizing: border-box;
+		background: #FFFFFF;
+		padding: 0 30upx;
+		display: flex;
+		align-items: center;
+		justify-content: flex-end;
+
+		.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 #DDDDDD;
+				color: #666666;
+			}
+
+			&.pay {
+				background: #2BC7B9;
+				color: #FFFFFF;
+			}
+		}
+	}
+</style>

+ 146 - 0
pages_shopping/live/storeOrderRefundAddDelivery.vue

@@ -0,0 +1,146 @@
+<template>
+  <view class="content">
+  	<view class="inner">
+  		<view class="form-box">
+  			<view class="form-item">
+  				<text class="label">快递公司</text>
+  				<input type="text" v-model="form.deliveryName" placeholder="请输入物流公司" placeholder-class="form-input" />
+  			</view>
+  			<view class="form-item">
+  			 	<text class="label">快递单号</text>
+  			 	<input type="text" v-model="form.deliverySn"   placeholder="请输入物流单号" placeholder-class="form-input" />
+  			</view>
+  		</view>
+  	</view>
+  	<view class="btn-box">
+  		<view class="sub-btn" @click="submit()">提交</view>
+  	</view>
+  </view>
+</template>
+
+<script>
+// import {addDelivery} from '@/api/storeAfterSales.js'
+	
+export default {
+  data() {
+    return {
+		form:{
+			salesId:null,
+			deliverySn:null,
+			deliveryName:null,
+		}
+    }
+  },
+  onLoad(option) {
+	  this.form.id=option.id
+  },
+  methods: {
+	submit(){
+		if(this.form.deliveryName==null){
+			uni.showToast({
+				icon:'none',
+				title: '请输入快递公司'
+			});
+			return;
+		}
+		if(this.form.deliverySn==null){
+			uni.showToast({
+				icon:'none',
+				title: '请输入快递单号'
+			});
+			return;
+		}
+	 	addDelivery(this.form).then(
+	 		res => {
+	 			if(res.code==200){
+	 				 uni.showToast({
+	 				 	icon:'success',
+	 				 	title: "提交成功",
+	 				 });
+					 uni.navigateBack({
+					 	delta: 1
+					 })
+	 			}else{
+	 				uni.showToast({
+	 					icon:'none',
+	 					title: res.msg,
+	 				});
+	 			}
+	 		},
+	 		rej => {}
+	 	);
+	 },
+  },
+  
+}
+</script>
+
+<style lang="scss">
+	page{
+		height: 100%;
+	}
+	.content{
+		display: flex;
+		flex-direction: column;
+		justify-content: space-between;
+		
+		.inner{
+			padding: 20upx;
+			.form-box{
+				padding: 0 30upx;
+				background: #FFFFFF;
+				border-radius: 16upx;
+				.form-item{
+					padding: 30upx 0;
+					display: flex;
+					align-items: flex-start;
+					border-bottom: 1px solid #F1F1F1;
+					&:last-child{
+						border-bottom: none;
+					}
+					.label{
+						width: 150upx;
+						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;
+					}
+					 
+				}
+			}
+			 
+		}
+		.btn-box{
+			height: 120upx;
+			padding: 0 30upx;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			.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: #C39A58;
+				border-radius: 44upx;
+			}
+		}
+	}
+</style>

+ 592 - 0
pages_shopping/live/storeOrderRefundDetails.vue

@@ -0,0 +1,592 @@
+<template>
+	<view>
+		<view class="top-cont">
+			<view class="bg"></view>
+			<view class="top-inner">			
+				<!-- 订单状态 -->
+				<view class="order-status" >
+					<!-- 处理中 -->
+					<view  v-if="sales.salesStatus == 0" class="inner">
+						<view class="img-box">
+							<image src="https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/a4bf17c7fb7342118f5ba52911fbcd84.png" mode=""></image>
+						</view>
+						<view class="status-box">
+							<text class="status">售后中</text>
+							<text class="desc">请等待客服处理...</text>
+						</view>
+					</view>
+					<view  v-if="sales.salesStatus == 1" class="inner">
+						<view class="img-box">
+							<image src="https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/5be93a404ff148c99ff41b39a3b23665.png" mode=""></image>
+						</view>
+						<view class="status-box">
+							<text class="status">售后取消</text>
+							<text class="desc">用户已取消售后</text>
+						</view>
+					</view>
+					<view  v-if="sales.salesStatus == 2" class="inner">
+						<view class="img-box">
+							<image src="https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/5be93a404ff148c99ff41b39a3b23665.png" mode=""></image>
+						</view>
+						<view class="status-box">
+							<text class="status">售后取消</text>
+							<text class="desc">商家已拒绝...</text>
+						</view>
+					</view>
+					<!-- 退款成功 -->
+					<view  v-if="sales.salesStatus == 3" class="inner">
+						<view class="img-box">
+							<image src="https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/09e5cf7de97d4ee6aa9f0c778599d760.png" mode=""></image>
+						</view>
+						<view class="status-box">
+							<text class="status">退款成功</text>
+							<text class="desc">已退款,退款金额将按原支付退回</text>
+						</view>
+					</view>
+					
+				</view>
+				<!-- 退款信息 -->
+				<view class="refund-info">
+					<view class="inner">
+						<view class="title-box">
+							<view class="left">
+								<text class="title">退款金额</text>
+								<view class="price-box">
+									<text class="unit">¥</text>
+									<text class="num" v-if="sales.refundAmount!=null">{{sales.refundAmount.toFixed(2)}}</text>
+								</view>
+							</view>
+							<view class="right">
+								<text class="text" >
+										<text  class="text success">
+										</text>
+								</text>
+							</view>
+						</view>
+			 
+						<view class="refund-item" v-if="sales.status>=1&&sales.refundType==1">
+							<view class="text">收件人:{{sales.consignee}} </view>
+							<view class="text">电话:{{sales.address}} </view>
+							<view class="text">收件地址:{{sales.phoneNumber}}</view>
+						</view>
+						<view class="btn-box"  v-if="sales.salesStatus==0" >
+							<view   v-if="sales.status==1"  class="btn cancel" @click="addDeliverySn()"  >填写物流</view>
+							<view  v-if="sales.status==0||sales.status==1" class="btn cancel" @click="revoke()"  >撤销申请</view>
+							<!-- <view  class="btn cancel" @click="showLogs()" >查看进度</view> -->
+						</view>
+						<view class="refund-item" v-if="sales.status==0">
+							<view class="text">已提交等待平台审核 </view>
+						</view>
+						<view class="refund-item" v-if="sales.status==1">
+							<view class="text">平台已审核,等待用户发货 </view>
+						</view>
+						 <view class="refund-item" v-if="sales.status==2">
+						 	<view class="text">用户已发货,等待仓库审核 </view>
+						 </view>
+						 <view class="refund-item" v-if="sales.status==3">
+						 	<view class="text">财务审核 </view>
+						 </view>
+						 <view class="refund-item" v-if="sales.status==4">
+						 	<view class="text">已完成 </view>
+						 </view>
+					</view>
+				</view>
+				<view class="content">
+					<!-- 退货信息 -->
+					<view class="return-info">
+						<!-- 退货列表 -->
+						<view class="goods-list">
+							<view v-if="sales!=null"  v-for="(item,index) in items" :key="index" class="item">
+								<view class="img-box">
+									<image :src="JSON.parse(item.jsonInfo).image==''?'/static/images/drug.svg':JSON.parse(item.jsonInfo).image" mode="aspectFill"></image>
+								</view>
+								<view class="info-box">
+									<view>
+										<view class="title ellipsis2">{{JSON.parse(item.jsonInfo).productName}}</view>
+										<view class="spec">规格:{{JSON.parse(item.jsonInfo).sku}}</view>
+									</view>
+									<view class="price-num">
+										<view class="price">
+											<text class="unit">¥</text>
+											<text class="num">{{JSON.parse(item.jsonInfo).price.toFixed(2)}}</text>
+										</view>
+										<view class="num">x{{JSON.parse(item.jsonInfo).num}}</view>
+									</view>
+								</view>
+							</view>
+							 
+							<!-- 详细信息 -->
+							<view class="refund-det-info">
+								<view class="det-item">
+									<text class="label">退货原因</text>
+									<text class="text">{{sales.reasons}}</text>
+								</view>
+								<view class="det-item">
+									<text class="label">退货说明</text>
+									<text class="text">{{sales.explains}}</text>
+								</view>
+								<view class="det-item">
+									<text class="label">退款金额</text>
+									<text class="text" v-if="sales.refundAmount!=null">¥{{sales.refundAmount.toFixed(2)}}</text>
+								</view>
+								 <view class="det-item">
+								 	<text class="label">订单编号</text>
+								 	<text class="text">{{order.orderCode}}</text>
+								 </view>
+								<view class="det-item">
+									<text class="label">申请时间</text>
+									<text class="text">{{sales.createTime}}</text>
+								</view>
+								
+							</view>
+						</view>
+					</view>
+				</view>
+			
+			</view>
+		</view>
+		
+	</view>
+</template>
+
+<script>
+	import {getStoreAfterSalesById,revoke} from '@/api/order.js'
+	
+	export default {
+		data() {
+			return {
+				statusOptions:[],
+				sales:{},
+				items:[],
+				order:null,
+				salesId:null,
+				// 状态栏的高度
+				statusBarHeight: uni.getStorageSync('menuInfo').statusBarHeight,
+ 
+			};
+		},
+		onLoad(option) {
+			this.id = option.id
+
+		},
+		onShow() {
+			this.getStoreAfterSalesById()
+			// this.getDictByKey("sys_after_sales_status")
+		},
+		methods: {
+			// getDictByKey(key){
+			// 	var data={key:key}
+			// 	getDictByKey(data).then(
+			// 		res => {
+			// 			if(res.code==200){
+			// 				if(key=="sys_after_sales_status"){
+			// 					this.statusOptions=res.data;
+			// 				}
+			// 			}
+			// 		},
+			// 		err => {
+			// 		}
+			// 	);
+				
+			// },
+			addDeliverySn(){
+				uni.navigateTo({
+					url: './storeOrderRefundAddDelivery?id=' + this.id
+				}) 
+			},
+			revoke(){
+				var data={id:this.id};
+				revoke(data).then(res => {
+					if(res.code==200){
+						 uni.showToast({
+						 	icon:'success',
+						 	title:'操作成功'
+						 });
+						 setTimeout(function() {
+							 uni.$emit('refreshAfterSales');
+							 uni.navigateBack({
+								 delta: 1
+							 })
+						 }, 500);
+						 
+					}else{
+						uni.showToast({
+							icon:'none',
+							title: res.msg
+						});
+						 
+					}
+				});
+			},
+			getStoreAfterSalesById() {
+				//联网加载数据
+				getStoreAfterSalesById(this.id).then(res => {
+					if(res.code==200){
+						//设置列表数据
+						this.sales=res.sales;
+						this.items=res.items;
+						this.order=res.order;
+					}else{
+						uni.showToast({
+							icon:'none',
+							title: res.msg
+						});
+						 
+					}
+				});
+			},
+		 
+			// showLogs(status) {
+			// 	uni.navigateTo({
+			// 		url: './refundOrderLogs?orderStatus=' + status
+			// 	})
+			// },
+			
+		}
+	}
+</script>
+
+<style lang="scss">
+	.fixed-top-box{
+		width: 100%;
+		background: linear-gradient(135deg, #2BC7B9 0%, #60CDC3 100%);
+		position: fixed;
+		top: 0;
+		left: 0;
+		z-index: 1000;
+	}
+	.top-cont{
+		width: 100%;
+		height: 500upx;
+		position: relative;
+		.bg{
+			width: 100%;
+			height: 350upx;
+			position: absolute;
+			top: 0;
+			left: 0;
+			z-index: 1;
+			background-color: #FF5C03;
+			background: linear-gradient(#FF5C03, #E2C99E);
+			border-radius: 0rpx 0rpx 100rpx 100rpx;
+		}
+		.top-inner{
+			width: 100%;
+			height: 100%;
+			position: absolute;
+			top: 0;
+			left: 0;
+			z-index: 2;
+			.back-box{
+				height: 88upx;
+				padding-left: 22upx;
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+				padding: 0 20upx;
+				image{
+					width: 40upx;
+					height: 40upx;
+				}
+				.title{
+					font-size: 36upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #FFFFFF;
+				}
+			}
+			.order-status{
+				margin-top: 60upx;
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+				padding: 0 30upx;
+				.inner{
+					display: flex;
+					align-items: center;
+					.img-box{
+						width: 96upx;
+						height: 96upx;
+						margin-right: 30upx;
+						image{
+							width: 100%;
+							height: 100%;
+						}
+					}
+					.status-box{
+						height: 96upx;
+						display: flex;
+						flex-direction: column;
+						justify-content: center;
+						.status{
+							font-size: 40upx;
+							font-family: PingFang SC;
+							font-weight: bold;
+							color: #FFFFFF;
+							line-height: 1;
+						}
+						.desc{
+							font-size: 26upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #FFFFFF;
+							line-height: 1;
+							margin-top: 30upx;
+						}
+						.det-box{
+							display: flex;
+							align-items: center;
+							image{
+								width: 14upx;
+								height: 24upx;
+								margin-left: 12upx;
+								margin-top: 30upx;
+							}
+						}
+					}
+				}
+			}
+			.refund-info{
+				margin-top: 50upx;
+				padding: 0 20upx;
+				.inner{
+					
+					background: #FFFFFF;
+					border-radius: 16upx;
+					padding: 0 30upx 15upx 30upx;
+					.title-box{
+						height: 88upx;
+						border-bottom: 1px solid #F0F0F0;
+						display: flex;
+						align-items: center;
+						justify-content: space-between;
+						.left{
+							display: flex;
+							align-items: center;
+							.title{
+								font-size: 30upx;
+								font-family: PingFang SC;
+								font-weight: bold;
+								color: #333333;
+								line-height: 1;
+								margin-right: 20upx;
+							}
+							.price-box{
+								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;
+								}
+							}
+						}
+						.right{
+							display: flex;
+							align-items: center;
+							.text{
+								font-size: 24upx;
+								font-family: PingFang SC;
+								font-weight: 500;
+								color: #999999;
+								line-height: 1;
+								margin-right: 10upx;
+							}
+							image{
+								width: 12upx;
+								height: 22upx;
+							}
+						}
+					}
+					.refund-item{
+						margin-top: 40upx;
+						.text{
+							margin-bottom: 10upx;
+							font-size: 26upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #666666;
+							line-height: 1;
+						}
+					}
+				}
+			}
+		}
+	}
+	.content{
+		padding: 0 20upx 20upx;
+		.return-info{
+			margin-top: 30upx;
+			background: #FFFFFF;
+			border-radius: 16upx;
+			.title-box{
+				height: 88upx;
+				padding: 0 30upx;
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+				.label{
+					font-size: 30upx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #333333;
+				}
+				.ret-num{
+					font-size: 26upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #999999;
+				}
+			}
+			.goods-list{
+				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;
+						.title{
+							font-size: 28upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #333333;
+							line-height: 36upx;
+							.tag{
+								display: inline-block;
+								padding: 0 6upx;
+								height: 30upx;
+								background: linear-gradient(90deg, #2BC7B9 0%, #2BC7A4 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: 18upx;
+							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;
+							}
+						}
+					}
+				}
+				.refund-det-info{
+					padding-bottom: 30upx;
+					.det-item{
+						margin-top: 40upx;
+						display: flex;
+						align-items: center;
+						justify-content: space-between;
+						.label{
+							font-size: 26upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #666666;
+							line-height: 1;
+						}
+						.text{
+							font-size: 26upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #222222;
+							line-height: 1;
+						}
+					}
+				}
+			}
+		}
+		
+	}
+	.btn-box{
+		margin-top: 15upx;
+		box-sizing: border-box;
+		display: flex;
+		align-items: center;
+		justify-content: flex-end;
+		.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;
+			&:first-child{
+				margin-left: 0;
+			}
+			&.cancel{
+				border: 1px solid #DDDDDD;
+				color: #666666;
+			}
+			 
+		}
+	}
+	
+</style>

+ 357 - 0
pages_shopping/live/storeOrderRefundList.vue

@@ -0,0 +1,357 @@
+<template>
+	<view>
+		<u-sticky>
+			<view class="top-fixed">
+				 <u-tabs
+				  :scrollable="true"
+				  :list="tabs"  
+				  lineColor="#FF5C03"
+				 @change="tabChange">
+				 </u-tabs>
+			</view>
+		</u-sticky>
+		<!-- 订单列表 -->
+		<mescroll-body top="110rpx" bottom="0"  ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption" :up="upOption">
+			<view class="order-list">
+				<view v-for="(item,index) in dataList" :key="index" class="item"  >
+					<!-- 订单号,状态 -->
+					<view class="ordersn-box">
+						<view class="num">订单号:{{item.orderCode}}</view>
+						<view class="status-box">
+							<text  class="text info">
+							</text>
+						</view>
+					</view>
+					<!-- 药品列表 -->
+					<view class="drug-list">
+						<view v-if="item!=null" v-for="(subitem,j) in item.items" :key="j" class="drug-item">
+							<view class="img-box">
+								<image :src="JSON.parse(subitem.jsonInfo).image==''?'/static/images/drug.svg':JSON.parse(subitem.jsonInfo).image" mode="aspectFill"></image>
+							</view>
+							<view class="drug-info">
+								<view>
+									<view class="name-box ellipsis2">
+										<!-- <view class="tag">处方药</view> -->
+										{{JSON.parse(subitem.jsonInfo).productName}}
+									</view>
+									<view class="spec">规格:{{JSON.parse(subitem.jsonInfo).sku}}</view>
+								</view>
+								<view class="num-box">
+									<view class="price">
+										<text class="unit">¥</text>
+										<text class="num">{{JSON.parse(subitem.jsonInfo).price.toFixed(2)}}</text>
+									</view>
+									<view class="amount">x{{JSON.parse(subitem.jsonInfo).num}}</view>
+								</view>
+							</view>
+						</view>
+						 
+						<!-- 实付金额、按钮 -->
+						<view class="bottom-box">
+							<view class="amount-paid">
+								<text class="label">退款金额:</text>
+								<view class="price-box">
+									<view class="unit">¥</view>
+									<view class="num">{{item.refundAmount.toFixed(2)}}</view>
+								</view>
+							</view>
+							<view class="btn-box">
+								<view class="btn pay" @click="showDetail(item)">查看详情</view>
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</mescroll-body>
+	</view>
+</template>
+
+<script>
+	import {getStoreAfterSalesList} from '@/api/order.js' //获取售后列表
+	import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
+	export default {
+		mixins: [MescrollMixin], 
+		data() {
+			return {
+				userId:uni.getStorageSync("userInfo").userId,
+				statusOptions:[],
+				liveId:null,
+				tabs: [
+					{name:"全部",status:""},
+					{name:"待平台审核",status:"0"},
+					{name:"待用户发货",status:"1"},
+					{name:"待仓库审核",status:"2"},
+					{name:"财务审核 ",status:"3"},
+					{name:"退款成功 ",status:"4"},
+				],
+				status: 0,
+				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://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png',
+						tip: '暂无数据'
+					}
+				},
+				// 列表数据
+				dataList: []
+			};
+		},
+		onLoad(options) {
+			console.log("拿到了",options)
+			if(options.liveId){
+				console.log("拿到了",options.liveId)
+				this.liveId=options.liveId
+			}
+			
+		
+		},
+		methods: {
+			tabChange(item) {
+				this.status = item.status
+				this.mescroll.resetUpScroll()
+			},
+			mescrollInit(mescroll) {
+				this.mescroll = mescroll;
+			},
+			/*下拉刷新的回调 */
+			downCallback(mescroll) {
+				mescroll.resetUpScroll()
+			},
+			upCallback(page) {
+				//联网加载数据
+				var that = this;
+				getStoreAfterSalesList(this.liveId,page.size,page.num,this.status).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();
+					}
+				});
+			},
+			// 查看订单详情
+			showDetail(item) {
+				uni.navigateTo({
+					url: './storeOrderRefundDetails?id=' + item.id
+				})
+			},
+			
+		}
+	}
+</script>
+
+<style lang="scss">
+	:deep(.u-tabs__wrapper__nav__line){
+		bottom: 10px !important;
+	}
+	.top-fixed{
+		width: 100%;
+		position: absolute;
+		top: 0;
+		left: 0;
+		z-index: 10;
+		height: 110upx;
+		background-color: #fff;
+	}
+	.order-list{
+		padding: 20upx;
+		.item{
+			background: #FFFFFF;
+			border-radius: 16upx;
+			padding: 0 30upx;
+			margin-bottom: 20upx;
+			.ordersn-box{
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+				padding: 34upx 0 20upx;
+				.num{
+					font-size: 26upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #999999;
+					line-height: 1;
+				}
+				.status-box{
+					display: flex;
+					align-items: center;
+					.text{
+						font-size: 28upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						line-height: 1;
+						&.success{
+							color: #FF5C03;
+						}
+						&.info{
+							color: #999999;
+						}
+					}
+				}
+			}
+			.drug-list{
+				.drug-item{
+					padding: 30upx 0;
+					border-bottom: 1px soli #F0F0F0;
+					display: flex;
+					align-items: center;
+					.img-box{
+						width: 160upx;
+						height: 160upx;
+						margin-right: 30upx;
+						flex-shrink: 0;
+						image{
+							width: 100%;
+							height: 100%;
+						}
+					}
+					.drug-info{
+						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, #2BC7B9 0%, #2BC7A4 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{
+							font-size: 24upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #999999;
+							line-height: 1;
+							margin-top: 10upx;
+						}
+						.num-box{
+							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;
+								}
+							}
+							.amount{
+								font-size: 24upx;
+								font-family: PingFang SC;
+								font-weight: 500;
+								color: #999999;
+								line-height: 1;
+							}
+						}
+					}
+				}
+				.bottom-box{
+					height: 110upx;
+					display: flex;
+					align-items: center;
+					justify-content: space-between;
+					.amount-paid{
+						display: flex;
+						align-items: center;
+						.label{
+							font-size: 24upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #999999;
+							line-height: 1;
+						}
+						.price-box{
+							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;
+							}
+						}
+					}
+					.btn-box{
+						box-sizing: border-box;
+						display: flex;
+						align-items: center;
+						.btn{
+							width: 220upx;
+							height: 64upx;
+							line-height: 64upx;
+							font-size: 26upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							text-align: center;
+							border-radius: 32upx;
+							&.pay{
+								background: #FF5C03;
+								color: #FFFFFF;
+							}
+						}
+					}
+				}
+			}
+		}
+	}
+	
+</style>

+ 456 - 0
pages_shopping/live/storeOrderRefundSubmit.vue

@@ -0,0 +1,456 @@
+<template>
+	<view class="content">
+		<view class="inner">
+			<!-- 药品列表 -->
+			<view class="drug-list">
+				<view  class="item">
+					<!-- 药品信息 -->
+					<view v-if="order!=null" class="drug-info" v-for="(item,index) in items" :key="index">
+						<view class="img-box">
+							<image :src="JSON.parse(item.jsonInfo).image==''?'/static/images/drug.svg':JSON.parse(item.jsonInfo).image" mode="aspectFit"></image>
+						</view>
+						<view class="info">
+							<view class="top">
+								<view class="title ellipsis2">{{ JSON.parse(item.jsonInfo).productName}}</view>
+								<view class="spec">{{JSON.parse(item.jsonInfo).sku}}</view>
+							</view>
+							<view class="price-num">
+								<view class="price-box">
+									<text class="unit">¥</text>
+									<text class="price">{{JSON.parse(item.jsonInfo).price.toFixed(2)}}</text>
+								</view>
+								<view class="num">x{{JSON.parse(item.jsonInfo).num}}</view>
+							</view>
+						</view>
+					</view>
+					 
+				</view>
+			</view>
+			<!-- 申请原因 -->
+			<view class="reason-apply">
+				<view class="title-box">
+					<text class="label">退款金额</text>
+					 <input class="money" type="text" disabled v-model="refundAmount" placeholder="退款金额" placeholder-class="form-input" />
+				</view>
+				<view class="title-box" >
+					<text class="label">申请原因</text>
+					<picker @change="handleReasons" :value="reasons"  range-key="dictLabel" :range="reasonsOptions">
+						<view class="chose-box"  >
+							<text class="text">{{reasons}}</text>
+							<image src="/static/images/arrow_gray.png" mode=""></image>
+						</view>
+					</picker>
+				</view>
+				<view class="textarea-box">
+					<u--textarea :height="100" v-model="explains" placeholder="请描述申请售后服务的具体原因"  :count="100"></u--textarea>
+				</view>
+			</view>
+			 <!-- 底部按钮 -->
+			 <view class="btn-box">
+			 	<view class="sub-btn" @click="submit()">申请售后</view>
+			 </view>
+		</view>
+		
+	 
+	</view>
+</template>
+
+<script>
+	// import {getDictByKey} from '@/api/common.js'
+	
+	// import {applyAfterSales,getStoreOrderItems} from '@/api/storeAfterSales'
+	export default {
+		data() {
+			return {
+				orderId:null,
+				order:null,
+				orderCode:null,
+				items:[],
+				type:null,
+				reasonsOptions:[],
+				reasons:"请选择",
+				explains:"",
+				refundAmount:0.00,
+				 
+			}
+		},
+		onLoad(option) {
+			this.type=option.type;
+			this.orderId=option.orderId;
+			this.getStoreOrderItems()
+			this.getDictByKey("sys_sales_reasons")
+		},
+		methods: {
+			getDictByKey(key){
+				var data={key:key}
+				getDictByKey(data).then(
+					res => {
+						if(res.code==200){
+							if(key=="sys_sales_reasons"){
+								this.reasonsOptions=res.data;
+							}
+						}
+					},
+					err => {
+					}
+				);
+				
+			},
+			getStoreOrderItems(){
+				var data={orderId:this.orderId};
+				getStoreOrderItems(data).then(res => {
+					if(res.code==200){
+						this.order=res.order;
+						this.items=res.items;
+						this.refundAmount=this.order.payMoney.toFixed(2)
+					}else{
+						uni.showToast({
+							icon:'none',
+							title: "请求失败",
+						});
+						 
+					}
+				});
+			},
+			handleReasons(e) {
+				console.log(e.detail.value)
+				this.reasons = this.reasonsOptions[e.detail.value].dictLabel
+			},
+			submit(){
+				if(this.reasons=="请选择"){
+					uni.showToast({
+						icon:'none',
+						title: '请选择原因'
+					});
+					return;
+				}
+				if(this.refundAmount<0){
+					uni.showToast({
+						icon:'none',
+						title: '请输入退款金额'
+					});
+					return;
+				}
+				 
+				var productIds=this.items.map(item=>item.productId);
+				var products=[];
+				for(var i=0;i<productIds.length;i++){
+					var item={productId:productIds[i]};
+					products.push(item);
+				}
+				var data={
+					refundAmount:this.refundAmount,
+					orderId:this.orderId,
+					refundType:this.type,
+					reasons:this.reasons,
+					explains:this.explains,
+					productList:products,
+				};
+				applyAfterSales(data).then(res => {
+					if(res.code==200){
+						 uni.showToast({
+						 	icon:'success',
+						 	title:'提交成功'
+						 });
+						 setTimeout(function() {
+							 uni.$emit('refreshOrder');
+							 uni.navigateBack({
+								 delta: 1
+							 })
+						 }, 500);
+						 
+					}else{
+						uni.showToast({
+							icon:'none',
+							title: res.msg
+						});
+						 
+					}
+				});
+			},
+		}
+	}
+</script>
+
+<style lang="scss">
+	.content{
+		margin-bottom: 170upx;
+		.inner{
+			padding: 20upx;
+			.drug-list{
+				.item{
+					background: #FFFFFF;
+					border-radius: 16upx;
+					margin-bottom: 20upx;
+					padding: 0 30upx;
+					.drug-info{
+						display: flex;
+						align-items: center;
+						padding: 30upx 0;
+						.img-box{
+							width: 160upx;
+							height: 160upx;
+							margin-right: 30upx;
+							image{
+								width: 100%;
+								height: 100%;
+							}
+						}
+						.info{
+							width: calc(100% - 160upx);
+							height: 160upx;
+							display: flex;
+							flex-direction: column;
+							justify-content: space-between;
+							.top{
+								.title{
+									font-size: 28upx;
+									font-family: PingFang SC;
+									font-weight: 500;
+									color: #111111;
+									line-height: 1.4;
+									.tag{
+										display: inline-block;
+										padding: 0 6upx;
+										height: 30upx;
+										background: linear-gradient(90deg, #2BC7B9 0%, #2BC7A4 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{
+									font-size: 24upx;
+									font-family: PingFang SC;
+									font-weight: 500;
+									color: #999999;
+									line-height: 1;
+									margin-top: 14upx;
+								}
+							}
+							.price-num{
+								display: flex;
+								align-items: center;
+								justify-content: space-between;
+								.price-box{
+									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: 5upx;
+									}
+									.price{
+										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: bold;
+									color: #666666;
+								}
+							}
+						}
+					}
+					 
+				}
+			}
+			.reason-apply{
+				margin-top: 20upx;
+				background: #FFFFFF;
+				border-radius: 16upx;
+				padding: 0 30upx;
+				.title-box{
+					height: 86upx;
+					display: flex;
+					align-items: center;
+					justify-content: space-between;
+					border-bottom: 1px solid #F0F0F0;
+					.label{
+						font-size: 30upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #333333;
+					}
+					.money{
+						
+						font-size: 24upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #999999;
+					}
+					.chose-box{
+						display: flex;
+						align-items: center;
+						.text{
+							font-size: 24upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #999999;
+						}
+						image{
+							width: 14upx;
+							height: 24upx;
+							margin-left: 10upx;
+						}
+					}
+				}
+				.textarea-box{
+					padding: 30upx 0;
+				}
+			}
+			.return-method{
+				background: #FFFFFF;
+				border-radius: 16upx;
+				margin-top: 20upx;
+				padding: 0 30upx 40upx;
+				.title-box{
+					height: 86upx;
+					display: flex;
+					align-items: center;
+					justify-content: space-between;
+					border-bottom: 1px solid #F0F0F0;
+					.text{
+						font-size: 30upx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #333333;
+					}
+				}
+				.return-tips{
+					margin-top: 30upx;
+					margin-bottom: 30upx;
+					height: 80upx;
+					background: #FFF4E6;
+					border-radius: 16upx;
+					padding: 0 20upx;
+					display: flex;
+					align-items: center;
+					.text{
+						font-size: 24upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #FF5C03;
+					}
+				}
+				.info-item{
+					display: flex;
+					align-items: center;
+					justify-content: space-between;
+					margin-bottom: 40upx;
+					&:last-child{
+						margin-bottom: 0;
+					}
+					.label{
+						font-size: 26upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #666666;
+						line-height: 1;
+					}
+					.text{
+						font-size: 26upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #111111;
+						line-height: 1;
+					}
+					.detail-box{
+						display: flex;
+						align-items: center;
+						.price-box{
+							display: flex;
+							align-items: flex-end;
+							margin-right: 18upx;
+							.unit{
+								font-size: 24upx;
+								font-family: PingFang SC;
+								font-weight: 500;
+								color: #111111;
+								line-height: 1.2;
+							}
+							.num{
+								font-size: 32upx;
+								font-family: PingFang SC;
+								font-weight: bold;
+								color: #111111;
+								line-height: 1;
+							}
+						}
+						.det-text{
+							font-size: 26upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #111111;
+						}
+						image{
+							width: 14upx;
+							height: 24upx;
+							margin-left: 10upx;
+						}
+					}
+				}
+			}
+		}
+		 
+		.reson-box{
+			padding: 0 10upx 60upx;
+			.reson-item{
+				width: 100%;
+				height: 110upx;
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+				.title{
+					font-size: 30upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #111111;
+				}
+			}
+		}
+	}
+	.btn-box{
+		height: 120upx;
+		padding: 0 30upx;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		.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: #FF5C03;
+			border-radius: 44upx;
+		}
+	}
+	input{
+		text-align: right;
+	}
+	.form-input{
+		font-size: 30upx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #999999;
+		text-align: right;
+	}
+</style>

+ 223 - 0
pages_shopping/live/success.vue

@@ -0,0 +1,223 @@
+<template>
+	<view class="content">
+		<view class="inner">
+			<view class="top">
+				<text class="title">支付成功</text>
+				<image class="icon" src="/static/images/success.png"></image>
+				<view class="btn-box">
+					<view class="btn cancel" @click="goOrderDetails(order.orderId)"> 查看订单</view>
+				</view>
+			</view>
+			<!-- 订单详情查看 -->
+			<view class="order-info">
+				<view class="title">订单信息</view>
+				<view class="item">
+					<text class="label">订单编号</text>
+					<view class="sn-box">
+						<view class="text">{{orderCode}}</view>
+						<view class="copy-btn" @click="copyOrderSn(orderCode)">复制</view>
+					</view>
+				</view>
+				<view class="item">
+					<text class="label">下单时间</text>
+					<text class="text">{{order.createTime}}</text>
+				</view>
+
+			</view>
+
+		</view>
+
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				order: null,
+				orderCode: "",
+				ids: []
+			}
+		},
+		onLoad(option) {
+			console.log("options是", option)
+			// this.order=JSON.parse(decodeURIComponent(option.order))
+			this.order = JSON.parse(decodeURIComponent(option.order))
+			console.log("this.order是", this.order)
+			// orderCodes和ids字段表示店铺订单
+			this.orderCode = this.order.orderCode || '';
+			this.orderId = this.order.orderId ? this.order.orderId : '';
+			// this.ids = this.order && this.order.ids ? this.order.ids : this.order.orderid?  [this.order.orderid] : [];
+		},
+		methods: {
+			copyOrderSn(text) {
+				// 复制方法
+				uni.setClipboardData({
+					data: text,
+					success: () => {
+						uni.showToast({
+							title: '内容已成功复制到剪切板',
+							icon: 'none'
+						})
+					}
+				});
+			},
+			goOrderDetails(id) {
+				console.log("id是", id)
+				if (id) {
+					uni.redirectTo({
+						url: "./storeOrderDetail?id=" + id
+					})
+
+				} else {
+					uni.navigateTo({
+						url: './order'
+					})
+				}
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	page {
+		height: 100%;
+	}
+
+	.content {
+		height: 100%;
+		display: flex;
+		flex-direction: column;
+		justify-content: space-between;
+
+		.inner {
+			padding: 20upx;
+
+			.top {
+				box-sizing: border-box;
+				background: #FFFFFF;
+				border-radius: 16upx;
+				display: flex;
+				flex-direction: column;
+				align-items: center;
+				padding: 50upx 0upx;
+
+				.title {
+					font-size: 40upx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #222222;
+					line-height: 1;
+					text-align: center;
+				}
+
+				.icon {
+					margin: 60upx 0upx;
+					width: 100upx;
+					height: 100upx;
+				}
+
+			}
+
+			.order-info {
+				margin-top: 20upx;
+				background: #FFFFFF;
+				border-radius: 16upx;
+				padding: 40upx 30upx;
+
+				.title {
+					font-size: 30upx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #222222;
+					line-height: 1;
+				}
+
+				.item {
+					margin-top: 40upx;
+					display: flex;
+					align-items: center;
+					justify-content: space-between;
+
+					.label {
+						font-size: 26upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #666666;
+						line-height: 1;
+					}
+
+					.text {
+						font-size: 26upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #222222;
+						line-height: 32upx;
+					}
+
+					.cont-text {
+						font-size: 26upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #666666;
+
+						.bold {
+							color: #111111;
+						}
+					}
+
+					.sn-box {
+						display: flex;
+						align-items: center;
+
+						.copy-btn {
+							width: 58upx;
+							height: 32upx;
+							line-height: 32upx;
+							text-align: center;
+							font-size: 22upx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #222222;
+							background: #F5F5F5;
+							border-radius: 4upx;
+							margin-left: 24upx;
+						}
+					}
+
+				}
+
+				.line {
+					width: 100%;
+					height: 1px;
+					background: #F0F0F0;
+					margin-top: 30upx;
+				}
+			}
+		}
+
+		.btn-box {
+			margin-top: 20upx;
+			box-sizing: border-box;
+			display: flex;
+			align-items: center;
+
+			.btn {
+				width: 155upx;
+				height: 64upx;
+				line-height: 64upx;
+				font-size: 26upx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				text-align: center;
+				border-radius: 32upx;
+
+				&.cancel {
+					border: 1px solid #DDDDDD;
+					color: #666666;
+				}
+
+			}
+		}
+	}
+</style>

+ 2 - 2
pages_shopping/shopping/activityDetails.vue

@@ -115,12 +115,12 @@ export default {
 		selectProduct(item){
 			console.log(item);
 			uni.navigateTo({
-				url: '../../pages/shopping/productDetails?productId='+item.id
+				url: '/pages_shopping/shopping/productDetails?productId='+item.id
 			})
 		},
 		showDetail(item) {
 			uni.navigateTo({
-				url: '../../pages/shopping/productDetails?productId='+item.productId
+				url: '/pages_shopping/shopping/productDetails?productId='+item.productId
 			})
 		},
 		getStoreActivityDetails() {

+ 2 - 2
pages/shopping/confirmCreateOrder.vue → pages_shopping/shopping/confirmCreateOrder.vue

@@ -343,14 +343,14 @@
 							if(res.order.isPrescribe==1){
 								setTimeout(function(){
 									uni.redirectTo({
-										url:"prescribe?orderId="+res.order.id
+										url:"/pages_shopping/shopping/prescribe?orderId="+res.order.id
 									})
 								},200);
 							}
 							else{
 								setTimeout(function(){
 									uni.redirectTo({
-										url: './paymentOrder?orderId='+res.order.id
+										url: '/pages_shopping/shopping/paymentOrder?orderId='+res.order.id
 									})
 								},200);
 							}

+ 3 - 3
pages/shopping/confirmOrder.vue → pages_shopping/shopping/confirmOrder.vue

@@ -345,14 +345,14 @@
 							if(res.order.isPrescribe==1){
 								setTimeout(function(){
 									uni.redirectTo({
-										url:"prescribe?orderId="+res.order.id
+										url:"/pages_shopping/shopping/prescribe?orderId="+res.order.id
 									})
 								},200);
 							}
 							else{
 								setTimeout(function(){
 									uni.redirectTo({
-										url: './paymentOrder?orderId='+res.order.id
+										url: '/pages_shopping/shopping/paymentOrder?orderId='+res.order.id
 									})
 								},200);
 							}
@@ -480,7 +480,7 @@
 							display: inline-block;
 							padding: 0 6upx;
 							height: 30upx;
-							background: linear-gradient(90deg, #2BC7B9 0%, #2BC7A4 100%);
+							background: linear-gradient(90deg, #2BC7B9 0%, #77cbf3 100%);
 							border-radius: 4upx;
 							margin-right: 10upx;
 							font-size: 22upx;

+ 3 - 3
pages/shopping/confirmPackageOrder.vue → pages_shopping/shopping/confirmPackageOrder.vue

@@ -300,14 +300,14 @@
 							if(res.order.isPrescribe==1){
 								setTimeout(function(){
 									uni.redirectTo({
-										url:"prescribe?orderId="+res.order.id
+										url:"/pages_shopping/shopping/prescribe?orderId="+res.order.id
 									})
 								},200);
 							}
 							else{
 								setTimeout(function(){
 									uni.redirectTo({
-										url: './paymentOrder?orderId='+res.order.id
+										url: '/pages_shopping/shopping/paymentOrder?orderId='+res.order.id
 									})
 								},200);
 							}
@@ -435,7 +435,7 @@
 							display: inline-block;
 							padding: 0 6upx;
 							height: 30upx;
-							background: linear-gradient(90deg, #2BC7B9 0%, #2BC7A4 100%);
+							background: linear-gradient(90deg, #2BC7B9 0%, #77cbf3 100%);
 							border-radius: 4upx;
 							margin-right: 10upx;
 							font-size: 22upx;

+ 1 - 1
pages_shopping/shopping/coupon.vue

@@ -3,7 +3,7 @@
 	<image src="../../static/images/banner_coupon.jpg" mode="widthFix" class="tui-coupon-banner"></image>
     <view class="tui-coupon-list">
       <view class="tui-coupon-item tui-top20" v-for="(item, index) in couponsList" :key="index">
-         <image src="../../static/images/bg_coupon_3x.png" class="tui-coupon-bg" mode="widthFix"></image>
+         <image src="/static/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>

+ 1 - 1
pages/shopping/payOrder.vue → pages_shopping/shopping/payOrder.vue

@@ -132,7 +132,7 @@
 									 if(that.order.isPrescribe){
 										 //如果是处方订单开处方
 										uni.redirectTo({
-										 	url:"prescribe?orderId="+that.order.id
+										 	url:"/pages_shopping/shopping/prescribe?orderId="+that.order.id
 										})
 									 }
 									 else{

+ 15 - 3
pages/shopping/paymentOrder.vue → pages_shopping/shopping/paymentOrder.vue

@@ -147,7 +147,7 @@
 import {getUserInfo} from '@/api/user'
 
 import {getStoreConfig} from '@/api/common'
-import {editPayType,pay,getStoreOrderById} from '@/api/storeOrder'
+import {editPayType,pay,getStoreOrderById,userCancelPay} from '@/api/storeOrder'
 export default {
   data() {
     return {
@@ -316,6 +316,7 @@ export default {
                       title:'fail:' + JSON.stringify(err),
                     });
                     // console.log('fail:' + JSON.stringify(err));
+					that.getcanle()
                     uni.hideLoading();
                   }
                 });
@@ -348,7 +349,7 @@ export default {
                 if(that.order.isPrescribe){
                   //如果是处方订单开处方
                   uni.redirectTo({
-                    url:"prescribe?orderId="+that.order.id
+                    url:"/pages_shopping/shopping/prescribe?orderId="+that.order.id
                   })
                 }
                 else{
@@ -369,7 +370,18 @@ export default {
           rej => {}
       );
 
-    }
+    },
+	getcanle(){
+		var that=this;
+		var data = {orderId:this.order.id,payType:this.order.payType};
+		userCancelPay(data).then(res=>{
+			if(res.code==200){
+				console.log(res)
+			}else{
+				
+			}
+		})
+	}
   }
 }
 </script>

+ 2 - 2
pages/shopping/prescribe.vue → pages_shopping/shopping/prescribe.vue

@@ -335,7 +335,7 @@
 									setTimeout(function(){
 										if(order.paid!=1){
 											uni.redirectTo({
-												url: './paymentOrder?orderId='+that.order.id
+												url: '/pages_shopping/shopping/paymentOrder?orderId='+that.order.id
 											})
 										}
 										else{
@@ -351,7 +351,7 @@
 							 		setTimeout(function(){
 										if(order.paid!=1){
 											uni.redirectTo({
-												url: './paymentOrder?orderId='+that.order.id
+												url: '/pages_shopping/shopping/paymentOrder?orderId='+that.order.id
 											})
 										}
 										else{

+ 8 - 8
pages/shopping/productDetails.vue → pages_shopping/shopping/productDetails.vue

@@ -165,7 +165,7 @@
 			</view>
 		</popupBottom>
 		<view class="loadding" v-if="loadding==true">
-			<image src="../../static/images/logo.jpg"></image>
+			<image src="../../static/images/logo.png"></image>
 			<text class="text">加载中...</text>
 		</view>
 	</view>
@@ -302,7 +302,7 @@
 						if(res.code==200){
 							if(type=="buy"){
 								uni.navigateTo({
-									url: '/pages/shopping/confirmOrder?type='+this.type+"&cartIds="+res.id+"&orderType="+this.orderType
+									url: '/pages_shopping/shopping/confirmOrder?type='+this.type+"&cartIds="+res.id+"&orderType="+this.orderType
 								})
 								 this.isSubmitting = false; // 禁用按钮
 							}
@@ -491,10 +491,10 @@
 				if (this.isSubmitting) return; // 防止重复点击
 				 this.isSubmitting = true; // 禁用按钮
 				 if(this.isSubmitting){
-				 	uni.showToast({
-				 		icon:'none',
-				 		title: '不能重复点击',
-				 	});
+				 	// uni.showToast({
+				 	// 	icon:'none',
+				 	// 	title: '不能重复点击',
+				 	// });
 				 }
 				this.specVisible = false
 				this.doAddCart(this.type);
@@ -811,12 +811,12 @@
 					text-align: center;
 				}
 			}
-			/deep/.uni-badge--x{
+			::v-deep.uni-badge--x{
 				display: flex;
 				align-items: center;
 				justify-content: center;
 			}
-			/deep/.uni-badge{
+			::v-deep.uni-badge{
 				border: none;
 				background-color: #FF3636;
 				font-family: Roboto;

+ 1 - 1
pages/shopping/productList.vue → pages_shopping/shopping/productList.vue

@@ -181,7 +181,7 @@
 			// 查看药品详情
 			showDetail(item) {
 				uni.navigateTo({
-					url: './productDetails?productId='+item.productId
+					url: '/pages_shopping/shopping/productDetails?productId='+item.productId
 				})
 			}
 			

+ 1 - 1
pages_shopping/shopping/productSalesList.vue

@@ -114,7 +114,7 @@
 			// 查看详情
 			showDetail(item) {
 				uni.navigateTo({
-					url: '/pages/shopping/productDetails?productId='+item.productId
+					url: '/pages_shopping/shopping/productDetails?productId='+item.productId
 				})
 			}
 		}

+ 1 - 1
pages/shopping/success.vue → pages_shopping/shopping/success.vue

@@ -3,7 +3,7 @@
 		<view class="inner">
 			<view class="top">
 				<text class="title">支付成功</text>
-				 <image class="icon" src="../../static/images/success.png" ></image>
+				 <image class="icon" src="/static/images/success.png" ></image>
 				 <view   class="btn-box">
 				 	<view class="btn cancel" @click="goOrderDetails(order.id)"> 查看订单</view>
 				 </view>

+ 1 - 1
pages_user/user/address.vue

@@ -16,7 +16,7 @@
 					</view>
 				</view>
 				<view class="operat-box">
-					<image src="../../static/images/del1.png" mode="" @click="delAddress(item)"></image>
+					<image src="../../static/images/del.png" mode="" @click="delAddress(item)"></image>
 					<image src="../../static/images/edit.png" mode="" @click="editAddress(item)"></image>
 				</view>
 			</view>

+ 1 - 1
pages_user/user/doctorOrder.vue

@@ -107,7 +107,7 @@
 		methods: {
 			pay(item){
 				uni.navigateTo({
-					url: '../doctor/paymentOrder?orderId='+item.orderId
+					url: '/pages_shopping/shopping/paymentOrder?orderId='+item.orderId
 				})
 			},
 			cancel(item){

+ 1 - 1
pages_user/user/otherPaySuccess.vue

@@ -3,7 +3,7 @@
 		<view class="inner">
 			<view class="top">
 				<text class="title">支付成功</text>
-				<image class="icon" src="../../static/images/success.png" ></image>
+				<image class="icon" src="/static/images/success.png" ></image>
 				<view   class="btn-box">
 					<view class="btn cancel" @click="goBack()"> 返回首页</view>
 				</view>

+ 21 - 7
pages_user/user/otherPaymentOrder.vue

@@ -52,7 +52,7 @@
 </template>
 
 <script>
-	import {otherPayment,getStoreOrderById,getMyStoreOrderById} from '@/api/storeOrder'
+	import {otherPayment,getStoreOrderById,getMyStoreOrderById,userCancelPay} from '@/api/storeOrder'
 	import {checkpayment} from '@/api/payment'
 	export default {
 		data() {
@@ -130,7 +130,9 @@
 					res => {
 						if(res.code==200){
 							console.log('json;;;;;',res.result)
-							var result=res.result;
+							// var result=res.result;
+							var result=JSON.parse(res.result);
+							console.log('1211521',result)
 							// wx.navigateToMiniProgram({
 							// 	   appId: 'wx1b63de1096c46cde', // 收银台小程序 AppId 固定值
 							// 	   path: '/pages/pay/pay', // 收银台小程序 固定路径
@@ -235,11 +237,11 @@
 							// });
 							uni.requestPayment({
 								provider: 'wxpay',
-								timeStamp: res.result.timeStamp,
-								nonceStr: res.result.nonceStr,
-								package: res.result.packageValue,
-								signType: res.result.signType,
-								paySign: res.result.paySign,
+								timeStamp: result.timeStamp,
+								nonceStr: result.nonceStr,
+								package: result.package,
+								signType: result.signType,
+								paySign: result.paySign,
 								success: function(res) {
 									uni.hideLoading();
 									uni.redirectTo({
@@ -252,6 +254,7 @@
 										title:'fail:' + JSON.stringify(err),
 									});
 									console.log('fail:' + JSON.stringify(err));
+									that.getcanle()
 									uni.hideLoading();
 								}
 							});
@@ -266,6 +269,17 @@
 					rej => {}
 				);
 				
+			},
+			getcanle(){
+				var that=this;
+				var data = {orderId:this.order.id,payType:this.order.payType};
+				userCancelPay(data).then(res=>{
+					if(res.code==200){
+						console.log(res)
+					}else{
+						
+					}
+				})
 			}
 		}
 	}

+ 1 - 1
pages_user/user/patient.vue

@@ -12,7 +12,7 @@
 					</view>
 				</view>
 				<view class="operat-box">
-					<image src="../../static/images/del1.png" mode="" @click="delPatient(item)" ></image>
+					<image src="../../static/images/del.png" mode="" @click="delPatient(item)" ></image>
 					<image src="../../static/images/edit.png" mode="" @click="editPatient(item)"></image>
 				</view>
 			</view>

+ 1 - 1
pages_user/user/pay.vue

@@ -4,7 +4,7 @@
       <view class="inner">
         <view class="pay">
           <view class="title">
-            <text class="name">付款给 芳华选</text>
+            <text class="name">付款给 芳华选</text>
             <text class="desc">微信收款</text>
           </view>
           <view class="pay-money">

+ 2 - 2
pages_user/user/paymentOrderRemain.vue

@@ -64,7 +64,7 @@
 
 <script>
 	import {getUserInfo} from '@/api/user'
-	import {payRemain,getStoreOrderById} from '@/api/storeOrder'
+	import {payRemain,getStoreOrderById,userCancelPay} from '@/api/storeOrder'
 	export default {
 		data() {
 			return {
@@ -92,7 +92,7 @@
 			return {
 				title: "帮TA支付",
 				path: '/pages_user/user/otherPaymentOrderRemain?orderId='+this.orderId,
-				imageUrl: 'https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20250310/aeb776c6aa174d7c94181e5fd212e0f1.png' //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
+				imageUrl: 'https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20250721/efce6c594de34caba6537992083a5e47.png' //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
 			}
 			
 		},

+ 1 - 1
pages_user/user/storeOrder.vue

@@ -241,7 +241,7 @@
 			pay(item) {
 				console.log(item)
 				 uni.navigateTo({
-				 	url: '/pages/shopping/paymentOrder?orderId='+item.id
+				 	url: '/pages_shopping/shopping/paymentOrder?orderId='+item.id
 				 })
 			},
 			// 查看物流

+ 2 - 2
pages_user/user/storeOrderDetail.vue

@@ -282,7 +282,7 @@
 			openDetails(item){
 				console.log(item)
 				uni.navigateTo({
-					url: '/pages/shopping/productDetails?productId='+item.productId
+					url: '/pages_shopping/shopping/productDetails?productId='+item.productId
 				})
 			},
 			addPrescribe(){
@@ -377,7 +377,7 @@
 			},
 			pay() {
 				 uni.navigateTo({
-				 	url: '/pages/shopping/paymentOrder?orderId='+this.order.id
+				 	url: '/pages_shopping/shopping/paymentOrder?orderId='+this.order.id
 				 })
 			},
 			payRemain() {

+ 2 - 2
pages_user/user/storeProductRelation.vue

@@ -16,7 +16,7 @@
 			 					<text class="num">{{item.price.toFixed(2)}} </text>
 			 				</view>
 							<view class="operat-box">
-								<image src="/static/images/del1.png" mode="" @click="del(item)"></image>
+								<image src="/static/images/del.png" mode="" @click="del(item)"></image>
 								 
 							</view>
 			 			</view>
@@ -133,7 +133,7 @@
 			showDetail(item) {
 				console.log(item)
 				uni.navigateTo({
-					url: '/pages/shopping/productDetails?productId=' + item.productId
+					url: '/pages_shopping/shopping/productDetails?productId=' + item.productId
 				})
 			},
 			 

+ 1 - 1
pages_user/user/success.vue

@@ -3,7 +3,7 @@
 		<view class="inner">
 			<view class="top">
 				<text class="title">支付成功</text>
-				<image class="icon" src="../../static/images/success.png" ></image>
+				<image class="icon" src="/static/images/success.png" ></image>
 				<view   class="btn-box">
 					<view class="btn cancel" @click="goBack()"> 返回</view>
 				</view>

+ 2 - 2
pages_user/user/userTuiAdd.vue

@@ -1,12 +1,12 @@
 <template>
   <view>
 		<view class="form-box">
-			<view class="title">你为什么想成为芳华选健康推广?</view>
+			<view class="title">你为什么想成为芳华选健康推广?</view>
 			<view class="textarea-box">
 				<textarea v-model="question1" value="" placeholder="请输入..." maxlength="200" placeholder-class="textarea-place" />
 				<view class="num-box">{{ question1.length }}/200</view>
 			</view>
-			<view class="title">你是否了解芳华选健康推广大使?</view>
+			<view class="title">你是否了解芳华选健康推广大使?</view>
 			<view class="textarea-box">
 				<textarea v-model="question2" value="" placeholder="请输入..." maxlength="200" placeholder-class="textarea-place" />
 				<view class="num-box">{{ question1.length }}/200</view>

+ 1 - 1
pages_user/user/userTuiProduct.vue

@@ -129,7 +129,7 @@
 			},
 			showDetail(item) {
 				uni.navigateTo({
-					url: '/pages/shopping/productDetails?productId=' + item.productId
+					url: '/pages_shopping/shopping/productDetails?productId=' + item.productId
 				})
 			},
 		}

BIN
static/images/account.png


BIN
static/images/audio-msg.png


BIN
static/images/banner1.png


BIN
static/images/banner2.png


BIN
static/images/banner_coupon.jpg


BIN
static/images/bg_1.png


BIN
static/images/bg_coupon_3x.png


BIN
static/images/close32.png


BIN
static/images/collect.png


BIN
static/images/collect_select.png


Some files were not shown because too many files changed in this diff