liujiaxin 2 hodín pred
rodič
commit
5542d38591
100 zmenil súbory, kde vykonal 3152 pridanie a 5329 odobranie
  1. 5 0
      api/live.js
  2. 43 0
      api/order.js
  3. 3 3
      common/request.js
  4. 2 2
      core/config/defaultConfig.js
  5. 1 1
      manifest.json
  6. 0 275
      node_modules/mescroll-uni/README.md
  7. 0 55
      node_modules/mescroll-uni/components/mescroll-down.css
  8. 0 47
      node_modules/mescroll-uni/components/mescroll-down.vue
  9. 0 118
      node_modules/mescroll-uni/components/mescroll-empty.vue
  10. 0 83
      node_modules/mescroll-uni/components/mescroll-top.vue
  11. 0 47
      node_modules/mescroll-uni/components/mescroll-up.css
  12. 0 39
      node_modules/mescroll-uni/components/mescroll-up.vue
  13. 0 19
      node_modules/mescroll-uni/mescroll-body.css
  14. 0 403
      node_modules/mescroll-uni/mescroll-body.vue
  15. 0 15
      node_modules/mescroll-uni/mescroll-i18n.js
  16. 0 57
      node_modules/mescroll-uni/mescroll-mixins.js
  17. 0 64
      node_modules/mescroll-uni/mescroll-uni-option.js
  18. 0 36
      node_modules/mescroll-uni/mescroll-uni.css
  19. 0 799
      node_modules/mescroll-uni/mescroll-uni.js
  20. 0 480
      node_modules/mescroll-uni/mescroll-uni.vue
  21. 0 47
      node_modules/mescroll-uni/mixins/mescroll-comp.js
  22. 0 66
      node_modules/mescroll-uni/mixins/mescroll-more-item.js
  23. 0 74
      node_modules/mescroll-uni/mixins/mescroll-more.js
  24. 0 39
      node_modules/mescroll-uni/package.json
  25. 0 109
      node_modules/mescroll-uni/wxs/mixins.js
  26. 0 92
      node_modules/mescroll-uni/wxs/renderjs.js
  27. 0 268
      node_modules/mescroll-uni/wxs/wxs.wxs
  28. 0 5
      package-lock.json
  29. 1 2
      package.json
  30. 9 0
      pages.json
  31. 9 0
      pages/home/index.vue
  32. 229 241
      pages/home/living.vue
  33. 261 192
      pages_shop/cart.vue
  34. 30 30
      pages_shop/components/likeProduct.vue
  35. 162 129
      pages_shop/confirmCreateOrder.vue
  36. 74 64
      pages_shop/goods.vue
  37. 98 26
      pages_shop/order.vue
  38. 14 13
      pages_shop/paymentOrder.vue
  39. 178 170
      pages_shop/store.vue
  40. 565 0
      pages_shop/storeOrder.vue
  41. 5 4
      pages_user/addAddress.vue
  42. 1 3
      pages_user/address.vue
  43. BIN
      static/images/search_white.png
  44. 6 0
      unpackage/dist/dev/mp-weixin/api/live.js
  45. 31 1
      unpackage/dist/dev/mp-weixin/api/order.js
  46. 1 0
      unpackage/dist/dev/mp-weixin/app.js
  47. 1 0
      unpackage/dist/dev/mp-weixin/app.json
  48. 0 3
      unpackage/dist/dev/mp-weixin/app.wxss
  49. 31 31
      unpackage/dist/dev/mp-weixin/common/assets.js
  50. 2 2
      unpackage/dist/dev/mp-weixin/common/request.js
  51. 10 0
      unpackage/dist/dev/mp-weixin/common/vendor.js
  52. 0 20
      unpackage/dist/dev/mp-weixin/components/Loading.js
  53. 0 4
      unpackage/dist/dev/mp-weixin/components/Loading.json
  54. 0 1
      unpackage/dist/dev/mp-weixin/components/Loading.wxml
  55. 0 0
      unpackage/dist/dev/mp-weixin/components/Loading.wxss
  56. 1 1
      unpackage/dist/dev/mp-weixin/core/config/defaultConfig.js
  57. 1 1
      unpackage/dist/dev/mp-weixin/pages/auth/h5WxLogin.js
  58. 4 4
      unpackage/dist/dev/mp-weixin/pages/auth/login.js
  59. 2 2
      unpackage/dist/dev/mp-weixin/pages/auth/loginIndex.js
  60. 2 2
      unpackage/dist/dev/mp-weixin/pages/auth/register.js
  61. 10 0
      unpackage/dist/dev/mp-weixin/pages/home/index.js
  62. 2 2
      unpackage/dist/dev/mp-weixin/pages/home/live.js
  63. 202 200
      unpackage/dist/dev/mp-weixin/pages/home/living.js
  64. 0 0
      unpackage/dist/dev/mp-weixin/pages/home/living.wxml
  65. 7 2
      unpackage/dist/dev/mp-weixin/pages/home/living.wxss
  66. 145 150
      unpackage/dist/dev/mp-weixin/pages_shop/cart.js
  67. 1 3
      unpackage/dist/dev/mp-weixin/pages_shop/cart.json
  68. 1 1
      unpackage/dist/dev/mp-weixin/pages_shop/cart.wxml
  69. 8 0
      unpackage/dist/dev/mp-weixin/pages_shop/cart.wxss
  70. 0 87
      unpackage/dist/dev/mp-weixin/pages_shop/components/likeProduct.js
  71. 0 6
      unpackage/dist/dev/mp-weixin/pages_shop/components/likeProduct.json
  72. 0 1
      unpackage/dist/dev/mp-weixin/pages_shop/components/likeProduct.wxml
  73. 0 115
      unpackage/dist/dev/mp-weixin/pages_shop/components/likeProduct.wxss
  74. 128 74
      unpackage/dist/dev/mp-weixin/pages_shop/confirmCreateOrder.js
  75. 3 3
      unpackage/dist/dev/mp-weixin/pages_shop/confirmPackageOrder.js
  76. 62 60
      unpackage/dist/dev/mp-weixin/pages_shop/goods.js
  77. 50 12
      unpackage/dist/dev/mp-weixin/pages_shop/order.js
  78. 1 1
      unpackage/dist/dev/mp-weixin/pages_shop/order.wxml
  79. 30 3
      unpackage/dist/dev/mp-weixin/pages_shop/order.wxss
  80. 18 17
      unpackage/dist/dev/mp-weixin/pages_shop/paymentOrder.js
  81. 1 1
      unpackage/dist/dev/mp-weixin/pages_shop/paymentOrder.wxml
  82. 114 110
      unpackage/dist/dev/mp-weixin/pages_shop/store.js
  83. 1 2
      unpackage/dist/dev/mp-weixin/pages_shop/store.json
  84. 0 0
      unpackage/dist/dev/mp-weixin/pages_shop/store.wxml
  85. 35 62
      unpackage/dist/dev/mp-weixin/pages_shop/store.wxss
  86. 217 0
      unpackage/dist/dev/mp-weixin/pages_shop/storeOrder.js
  87. 5 0
      unpackage/dist/dev/mp-weixin/pages_shop/storeOrder.json
  88. 0 0
      unpackage/dist/dev/mp-weixin/pages_shop/storeOrder.wxml
  89. 319 0
      unpackage/dist/dev/mp-weixin/pages_shop/storeOrder.wxss
  90. 7 7
      unpackage/dist/dev/mp-weixin/pages_user/addAddress.js
  91. 1 4
      unpackage/dist/dev/mp-weixin/pages_user/address.js
  92. 1 1
      unpackage/dist/dev/mp-weixin/project.config.json
  93. 1 1
      unpackage/dist/dev/mp-weixin/project.private.config.json
  94. BIN
      unpackage/dist/dev/mp-weixin/static/images/search_white.png
  95. 0 37
      unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/components/u-sticky/props.js
  96. 0 141
      unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/components/u-sticky/u-sticky.js
  97. 0 4
      unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/components/u-sticky/u-sticky.json
  98. 0 1
      unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/components/u-sticky/u-sticky.wxml
  99. 0 30
      unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/components/u-sticky/u-sticky.wxss
  100. 0 2
      unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/function/index.js

+ 5 - 0
api/live.js

@@ -12,6 +12,7 @@ const api = {
 
 
 // 直播订单
+	searchStore:(storeId) =>  `app/live/store/${storeId}`,// 查询店铺
 	liveStore:(liveId) =>  `/app/live/liveGoods/liveStore/${liveId}`,// 店铺展示
 	liveGoodsDetail:(productId) =>  `/app/live/liveGoods/liveGoodsDetail/${productId}`,// 商品详情
 	liveOrderUser:(liveId) =>  `/app/live/liveOrder/liveOrderUser/${liveId}`,// 正在购买
@@ -65,6 +66,10 @@ export function liveGoodsDetail(productId,data) {
 export function liveOrderUser(liveId,data={}) {
 	return request(api.liveOrderUser(liveId),data,'GET','application/json;charset=UTF-8')
 }
+//查询店铺
+export function searchStore(storeId,data={}) {
+	return request(api.searchStore(storeId),data,'GET','application/json;charset=UTF-8')
+}
 
 
 

+ 43 - 0
api/order.js

@@ -14,6 +14,14 @@ const api = {
 	getCitys: '/app/common/getCitys', // 获取省市区
 	parseAddress: '/app/userAddress/parseAddress', //地址解析 
 	getAddressById: '/app/userAddress/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', //购物车订单
 }
 
 
@@ -75,3 +83,38 @@ export function parseAddress(data) {
 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')
+}

+ 3 - 3
common/request.js

@@ -3,10 +3,10 @@ export default class Request {
 	http(router, data = {}, method,contentType) {
 		let that = this;
 		// let path = 'http://nd383294.natappfree.cc'//余红奇
-		let path = 'https://live.test.ylrztop.com/prod-api'//余红奇
+		// let path = 'https://live.test.ylrztop.com/prod-api'//余红奇
 		// let path = 'http://v56c9b8e.natappfree.cc'//余红奇
 		// let path = 'http://192.168.10.170:7114'//陈果
-		// let path = 'http://192.168.10.166:7114'
+		let path = 'http://192.168.10.166:7114'//余红奇
 		// let path = 'http://h5api.wxcourse.cdwjyyh.com'
 		uni.setStorageSync('requestPath',path)
 		uni.showLoading({
@@ -62,7 +62,7 @@ export default class Request {
 				},
 				complete:(res) =>{
 					//接口调用结束的回调函数(调用成功、失败都会执行)
-					if (res.data.code == 401) {
+					if (res.code&&res.data.code == 401) {
 						return false
 					}
 					uni.hideLoading();

+ 2 - 2
core/config/defaultConfig.js

@@ -14,10 +14,10 @@ const productionUrl = 'https://wanbei.monvkeji.cn/'
 // 测试环境
 const testUrl = 'https://wanbei.monvkeji.cn/'
 // 开发环境
-// const developUrl = 'http://192.168.10.166:7114/'//余红奇
+const developUrl = 'http://192.168.10.166:7114/'//余红奇
 // const developUrl = 'http://v56c9b8e.natappfree.cc/'//余红奇
 // const developUrl = 'http://nd383294.natappfree.cc/'//余红奇
-const developUrl = 'https://live.test.ylrztop.com/prod-api/'//余红奇
+// const developUrl = 'https://live.test.ylrztop.com/prod-api/'//余红奇
 // const developUrl = 'http://192.168.10.170:7114/'//陈果
 export default {
 	// 系统名称

+ 1 - 1
manifest.json

@@ -115,7 +115,7 @@
     "quickapp" : {},
     /* 小程序特有相关 */
     "mp-weixin" : {
-        "appid" : "wx9ea36eecd281bcd3",
+        "appid" : "wx29d26f63f836be7f",
         "libVersion" : "3.4.2",
         "setting" : {
             "urlCheck" : true,

+ 0 - 275
node_modules/mescroll-uni/README.md

@@ -1,275 +0,0 @@
-## mescroll --【wxs+renderjs实现】高性能的下拉刷新上拉加载组件
-1. mescroll的uni版本 是专门用在uni-app的下拉刷新和上拉加载的组件, 支持一套代码编译到iOS、Android、H5、小程序等多个平台
-
-2. mescroll的uni版本 继承了mescroll.js的实用功能: 自动处理分页, 自动控制无数据, 空布局提示, 回到顶部按钮 ..
-
-3. mescroll的uni版本 丰富的案例, 自由灵活的api, 超详细的注释, 可让您快速自定义真正属于自己的下拉上拉组件
-
-<br/>
-
-
-## 最新文档(1.3.7版本): <a href="http://www.mescroll.com/uni.html">http://www.mescroll.com/uni.html</a>
-2021-04-13 by mescroll (文档可能会有缓存,建议打开时刷新一下)
-
-
-## 近期已更新优化的内容:
-1. 微信小程序, app, h5使用高性能wxs和renderjs, 下拉刷新更流畅丝滑, 尤其能明显解决Android小程序下拉卡顿的问题
-2. 新增国际化`mescroll-i18n.vue`示例, 新增轮播吸顶菜单`mescroll-swiper-sticky.vue`示例,    
-3. 新增 "局部区域滚动" 的案例: mescroll-body-part.vue 和 mescroll-uni-part.vue  
-4. 新增 me-video 视频组件, 解决APP端视频下拉悬浮错位的问题, 参考 mescroll-options.vue 示例  
-5. 新增 me-tabs 组件,tabs支持水平滑动; 优化mescroll-more和mescroll-swiper的案例, 顶部tab支持水平滑动
-6. 吸顶悬浮提供了原生sticky和监听滚动条实现的示例: sticky.vue 和 sticky-scroll.vue (推荐使用sticky样式实现)
-7. mescroll.scrollTo(y)的y支持css选择器, 包括跨自定义组件的后代选择器, 支持滚动到子组件的view (参考 mescroll-options.vue)  
-8. topbar 顶部是否预留状态栏的高度, 默认false; 还可支持设置状态栏背景: 如 '#ffff00', 'url(xxx) 0 0/100% 100%', 'linear-gradient(xx)'
-9. down.bgColor 和 up.bgColor 加载区域的背景,不仅支持色值, 而且还是支持背景图和渐变: 如 'url(xxx) 0 0/100% 100%', 'linear-gradient(xx)'
-10. topbar,bgColor支持一行代码定义background: [https://www.runoob.com/cssref/css3-pr-background.html](https://www.runoob.com/cssref/css3-pr-background.html)
-<br/>
-<br/>
-<a href="https://ext.dcloud.net.cn/plugin?id=343&update_log">查看更多 ... </a>
-
-
-### 更新记录:
-
----
-#### 1.3.7版本 (2021/04/13)  
-1. 新增`mescroll-swiper-sticky.vue`的示例, 轮播吸顶菜单导航  
-2. 新增`mescroll-empty.vue`的示例, 单独使用空布局组件  
-3. 简化tabs在具体项目中的使用,并简化对应的示例  
-4. mescroll-uni 支持动态禁止滚动的属性 disableScroll (注: mescroll-body不支持)  
--by 小瑾同学
-
----
-#### 1.3.5版本 (2021/04/10)  
-1. 新增 `mescroll-i18n.vue` 的示例, 支持国际化的配置  
-2. down的`beforeEndDelay`不再默认配置 // (显示加载成功/失败的时长, android小程序设置此项结束下拉会卡顿, 配置后请注意测试)  
-3. mescroll-body-part.vue 和 mescroll-uni-part.vue 的示例新增参考代码: `异步加载左侧菜单(超简单)`  
-4. mescroll的极简示例新增参考代码: `先请求其他接口,再触发upCallback,无需配置auto为false(超简单)`  
-5. 修复mescroll-swiper的tabs在app或h5错位的问题  
--by 小瑾同学
-
----
-#### 1.3.3版本 (2020/09/15)  
-1. 新增下拉刷新成功和失败的文本配置, 可在 mescroll-uni-option.js 配置修改  
-1. 新增 me-video 视频组件, 解决APP端视频下拉悬浮错位的问题, 参考最新的 mescroll-options.vue 示例  
-2. 更新 mescroll-comp.vue 的示例, 支持 mescroll-body 子子..子组件 , 包括 mescroll-more.vue 也支持写在子子..子组件  
-3. mescroll-uni 的 down.offset 由原来的 80 调整为 150 , 避免超快速滑动列表到底部,偶尔出现无法再翻页的问题 (mescroll-body无此问题)  
-4. 修复 mescroll-more.vue 和 mescroll-swiper.vue 的示例在字节跳动小程序2.0.0以上新版编辑器无法正常运行的问题  
-5. 修复淘宝和美团的示例下拉卡顿的问题 ( 案例需重新下载 )  
--by mescroll  
-
----
-#### 1.3.2版本 (2020/08/05)
-1. mescroll-body新增sticky属性, 简化吸顶悬浮sticky.vue的示例  
-2. QQ小程序支持wxs,解决QQ小程序卡顿和无法隐藏加载状态的问题  
-3. mescroll.scrollTo(y)的y支持css选择器, 包括跨自定义组件的后代选择器, 支持滚动到子组件的view (参考 mescroll-options.vue)  
--by 小瑾同学
-
----
-#### 1.3.1版本 (2020/07/27)
-1. 修复Android小程序下拉刷新时, image 和 swiper 脱离文档流的问题  
-2. 修复H5端, 当配置down.use为false时, 返回其他页面无法滚动的问题  
-3. mescroll-comp.js支持mescroll-body写在子子子...组件中 (以前版本仅支持写在一级子组件) 
-4. 吸顶悬浮提供了sticky样式和监听滚动条实现的示例: sticky.vue 和 sticky-scroll.vue (推荐使用sticky样式实现)  
--by 小瑾同学
-
----
-#### 1.3.0版本 (2020/07/10)
-1. 微信小程序, app, h5使用高性能wxs和renderjs, 下拉刷新更流畅丝滑, 尤其能明显解决Android小程序下拉卡顿的问题
-2. 使用wxs和renderjs优化所有案例, 尤其是中高级案例, 建议大家重新下载最新的案例
-3. 废弃down的isBounce配置, 已通过renderjs自动判断, 无需配置mescroll-touch
-4. 废弃down的fps配置, 已通过wxs提高性能, 无需手动节流
-5. 新增 "局部区域滚动" 的案例: mescroll-body-part.vue 和 mescroll-uni-part.vue
-6. 解决swiper切换时,有时会触发下拉刷新的问题, 已避免swiper和下拉刷新相互冲突
-7. 解决钉钉小程序mescroll-uni下拉刷新有时无法触发的问题
-8. 解决上拉加载进度在部分Android手机显示不全的问题
-9. 提高 me-tabs 组件在部分Android手机的兼容性  
--by 小瑾同学
-
----
-#### 1.2.8版本 (2020/06/28)
-1. 解决 mescroll-uni 再某些情况下列表数据渲染不完全的问题 ( mescroll-body无此问题 )
-2. 优化 me-tabs 组件, 使用支付宝小程序可隐藏滚动条, 同时修复字节跳动小程序tab切换时渲染延迟的问题
--by 小瑾同学
-
----
-#### 1.2.7版本 (2020/06/24)
-1. 上拉加载结束隐藏底部加载区域,避免加载区域占位
-2. h5端的tab页默认偏移TabBar的高度,避免h5端列表被TabBar遮住 (如不想偏移,可通过配置 :bottombar="false" 取消)
-3. 新增 me-tabs 组件,tabs支持水平滑动; 优化mescroll-more和mescroll-swiper的案例, 顶部tab支持水平滑动
-
----
-#### 1.2.6版本 (2020/06/16)
-1. mescroll-uni 和 mescroll-body 的 scrollTo 正式支持 scroll-into-view (传入的 y 为view的id即可生效)
-2. topbar 顶部是否预留状态栏的高度, 默认false; 这个版本还可支持设置状态栏背景: 如 '#ffff00', 'url(xxx)', 'linear-gradient(xx)'
-3. down.bgColor 和 up.bgColor 加载区域的背景,不仅支持色值, 而且还是支持背景图和渐变: 如 'url(xxx)', 'linear-gradient(xx)'
-4. 通过css方式适配iPhoneX, 比之前通过style方式具有更好的兼容性, 也同时消除了edge浏览器重复设置相同属性的警告
-5. 移除非必须的标签选择器,避免微信小程序提示组件内不可使用标签选择器的警告
-6. 修复当配置up的use为false时,默认的下拉刷新有时候无法自动隐藏的问题
-7. 修复当配置down的native为true时,auto失效的问题
-8. 修复空布局在某些情况下图片和文本错位的问题
-
----
-#### 1.2.5版本 (2020/03/15)
-1. mescroll-body 的 props 支持 safearea 的配置 (需要适配iPhoneX时,配置为 true 即可, 默认 false)
-2. mescroll-uni 的 scrollTo 支持 scroll-into-view (当传入的 y 为view的id时, 即可生效)
-3. 新增 下拉加载聊天记录的案例 list-msg.vue, 类似微信QQ的聊天记录
-
----
-#### 1.2.4版本 (2020/03/11)
-1. down和up分别新增 bgColor 的配置: 下拉区域背景颜色,默认"transparent"
-2. down和up分别新增 textColor 的配置: 下拉文本的颜色,默认"gray" (当bgColor配置了颜色,而textColor未配置时,则自动默认为白色)
-3. 调整mescroll-more-item.js, 使mescroll-more的案例支持初始化tabIndex大于0的tab页
-4. mescroll-body支持isBounce的配置, 解决H5下拉刷新失效的问题
-5. 解决mescroll-body在Android真机小程序下拉卡顿的问题 (mescroll-uni无此问题)
-
----
-#### 1.2.3版本 (2020/02/18)
-新增3个mescroll的mixins, 极大简化了mescroll-comp, mescroll-more, mescroll-swiper的案例
-
-
-#### 1.2.2版本 (2020/02/16)
-1. 调整mescroll-more和mescroll-swiper的案例,确保各小程序平台可正确获取到mescroll对象  
-2. 修复字节跳动小程序初始化时的异常警告: <a href="http://www.mescroll.com/qa.html?v=20200216#q26">详情</a>
-
-
-#### 1.2.1版本 (2020/02/08)
-1. 新增 &lt;mescroll-body&gt; 组件, 用来填补 &lt;mescroll-uni&gt; 的不足.
-2. mescroll-body基于原生页的滚动,支持写入原生组件和fixed元素,不必固定高度,不必配置pages.json,简单性能好.
-3. mescroll-body可配置down的native:true, 可直接代理系统自带的下拉组件, 参考 mescroll-native 示例
-4. 新增mescroll-mixins.js,简化代码,兼容更多小程序平台
-5. 修复字节跳动小程序和支付宝小程序的部分异常警告
-
-#### 1.2.0版本 (2020/01/06)
-1. mescroll-uni.vue的props新增height. // 简单快捷设置mescroll的高度, 此项有值,则不使用fixed. 
-	使用场景: 当在弹窗或浮层中使用fixed固定mescroll高度比较麻烦时, 配置此项就很方便了
-	支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx, 百分比则相对于windowHeight
-2. mescroll-uni.vue的props新增safearea. // bottom的偏移量是否加上底部安全区的距离, 默认false (需要适配iPhoneX时使用,此项值对回到顶部按钮生效)
-3. mescroll-uni.vue的props中,top和bottom不仅仅支持数字, 还支持"20rpx", "20px", "20%"格式的值
-4. 补充锁定上拉加载mescroll.lockUpScroll的方法
-5. down.fps默认值提高至80
-6. 独立出空布局的组件&lt;mescroll-empty&gt;, 以便在不使用mescroll的界面也能统一管理空布局
-```
-<template>
-		<view>
-			// 基本用法
-			<mescroll-empty v-if="list.length==0"></mescroll-empty>
-			// 所有配置项 (option同up.empty的配置一致)
-			<mescroll-empty v-if="isShowEmpty" :option="optEmpty" @emptyclick="emptyClick"></mescroll-empty>
-		</view>
-	</template>
-	
-	<script>
-		import MescrollEmpty from '@/components/mescroll-uni/components/mescroll-empty.vue';
-		export default {
-			components: {
-				MescrollEmpty
-			},
-			...
-		}
-```
-7. 为了更快速自定义回到顶部按钮, up.toTop新增以下配置项:
-```
-	toTop: {
-		zIndex: 9990, // fixed定位z-index值
-		right: 20, // 到右边的距离, 默认20 (支持"20rpx", "20px", "20%"格式的值, 纯数字则默认单位rpx)
-		bottom: 120, // 到底部的距离, 默认120 (支持"20rpx", "20px", "20%"格式的值, 纯数字则默认单位rpx)
-		safearea: false, // bottom的偏移量是否加上底部安全区的距离, 默认false. 需要适配iPhoneX时使用 (具体的界面如果不配置此项,则取mescroll-uni.vue的safearea值)
-		width: 72, // 回到顶部图标的宽度, 默认72 (支持"20rpx", "20px", "20%"格式的值, 纯数字则默认单位rpx)
-		radius: "50%", // 圆角, 默认"50%" (支持"20rpx", "20px", "20%"格式的值, 纯数字则默认单位rpx)
-		left: null, // 到左边的距离, 默认null. 此项有值时,right不生效. (支持"20rpx", "20px", "20%"格式的值, 纯数字则默认单位rpx)
-		duration: 300, // 回到顶部的动画时长,默认300ms (当值为0或300则使用系统自带回到顶部,更流畅; 其他值则通过step模拟,部分机型可能不够流畅,所以非特殊情况不建议修改此项)
-		src: null, // (已有配置)
-		offset: 1000 // (已有配置)
-	}
-```
-
-
----
-#### 1.1.9版本 (2019/12/16)
-1. 解决左右滑动屏幕,某些情况下会触发上拉回调的bug
-2. mescroll-uni.vue的props新增topbar: top的偏移量是否加上状态栏高度 (当fixed为false时不生效; 使用场景:取消原生导航栏时,配置此项可自动加上状态栏高度的偏移量)
-
----
-#### 1.1.8版本 (2019/11/01)
-1. 解决Android小程序快速上拉可能会导致不断翻页直到没有数据为止的bug
-2. 过滤某些情况下touch的警告输出
-
----
-#### 1.1.7版本 (2019/10/15)
-1. 重点解决下拉刷新卡顿,特别是Android小程序卡顿的问题
-2. 补充之前版本遗漏的mescroll.lockUpScroll方法
-3. 支持数据不满屏时,仍可触发翻页的回调
-
----
-#### 1.1.5版本 (2019/07/25)
-1. up新增isBounce的配置, 默认值为false. 目的是解决H5在ios下拉出现灰色背景和android端无法正常下拉的问题. 详见: <a href="http://www.mescroll.com/qa.html?v=190725#q25">http://www.mescroll.com/qa.html?v=190725#q25</a>
-2. 修复setClientHeight某些情况下会提示undefined的问题
-3. 修复在mescroll-uni-option.js配置page会导致分页异常的问题
-
----
-#### 1.1.2版本 (2019/07/19)
-一. 修复和优化的内容:
-1. 修复列表不满屏时,无法上拉的问题
-2. 修复列表滚动到底部,有时无法上拉的问题
-3. 修复快速滚动到顶部时,滚动条的位置有时不为0的问题
-4. 修复配置page.num不生效的问题
-5. 修复小程序android端下拉卡顿的问题 (可配置down的supply,复杂的列表可适当调大值)
-6. 修复H5多mescroll的情况下回到顶部按钮错位的问题
-7. 优化和简化逻辑,去除冗余代码
-
-二. 完善获取节点信息的方式:
-1. 获取mescroll的唯一元素id: mescroll.viewId (可通过uni.createSelectorQuery进一步获取更多信息)
-2. 获取滚动内容的高度: mescroll.getScrollHeight()
-3. 获取mescroll的高度: mescroll.getClientHeight()
-4. 获取滚动条位置: mescroll.getScrollTop()
-5. 获取到底部的距离: mescroll.getScrollBottom()
-6. 获取滚动的方向: mescroll.isScrollUp // true向上滑; false向下滑
-7. 更多信息详见mescroll-options的示例
-
----
-#### 1.1.1版本 (2019/07/16)
-1. 修复滚动到顶部,有时无法下拉的问题
-2. 修复禁止上拉时,列表底部有空白区域的问题
-
----
-#### 1.1.0版本 (重要版本) (2019/07/01)
-一. 简化使用:
-1. **无需**在page.json中配置onReachBottomDistance<br/>
-2. **无需**在页面中注册onReachBottom 和 onPageScroll<br/>
-3. 初始化时@init**不再**是必须配置项<br/>
-4. 极大的**简化** list-mescroll-more.vue 的案例<br/>
-5. 全面**支持swiper**,详见 mescroll-swiper.vue 的案例<br/>
-6. 所有基础案例都有所简化, **建议**重新下载参考. (以前版本向下兼容)<br/> 
-7. 所有中高级案例自定义的部分,改动比较大, **必须**重新下载参考. (不兼容以前版本)
-
-二. 优化性能:
-1. 支持fixed定位,可实现局部**区域滚动**<br/>
-2. 支持swiper,scrollview**嵌套**使用<br/>
-3. 优化下拉逻辑,修复下拉刷新卡顿和抖动的问题<br/>
-4. 优化默认样式,避免某些情况出现双滚动条的问题<br/>
-5. up废弃errDistance配置, 内部已优化处理相关问题
-
-三. 新增配置:
-1. down和up新增fps节流配置.(默认40fps, 值越大每秒刷新频率越高)<br/>
-2. up新增offset配置: 距底部多远时,触发upCallback (默认80, 代替page.json的onReachBottomDistance)<br/>
-3. up新增onScroll配置: 是否监听滚动事件,默认false<br/>
-4. < mescroll-uni 新增 @scroll="scroll" 获取滚动条的位置和滚动方向, 需配置up的onScroll为true, 详见 mescroll-options.vue 的示例<br/>
-5. < mescroll-uni 新增 :fixed="true/false" 是否支持fixed定位, 默认 true. 
-<br/> 当:fixed="true", 此时 :top 和 :bottom 为 fixed 的 top 和 bottom
-<br/> 当:fixed="false", 此时 :top 和 :bottom 为 padding-top 和 padding-bottom
-
-
----
-#### 1.0.3版本 (2019/06/13)
-1. 默认设置page高度100%,使列表不满屏的时候,仍可下拉刷新<br/>
-2. 加入-webkit-overflow-scrolling: touch, 编译到H5和APP,使iOS列表滚动更流畅<br/>
-3. mescroll-empty加入box-sizing: border-box, 修复图标和文本不居中的问题<br/>
-4. 上拉配置新增errDistance,默认110 // mescroll.endErr()的时候需往上滑动一段距离,使其能再次触发上拉加载 (已在1.1.0版本废弃)<br/>
-5. mescroll.endErr(errDistance) 新增的参数 errDistance; 可单独配置异常往上滑动的距离 (已在1.1.0版本废弃)<br/>
-6. 修改了list-mescroll-more的160行为mescroll.endErr(0);(已在1.1.0版本优化)<br/>
-7. 新增mescroll.scrollTo(y,t) 滚动到指定的位置; 本质调用的是uni.pageScrollTo
-
----
-#### 1.0.2版本 (2019/05/28)  
-1. 组件根元素加入mescroll-uni的样式,empty新增fixed等配置项; <br/>
-2. 修复list-mescroll-more案例切换tabs,某些情况的page.num会错乱的问题

+ 0 - 55
node_modules/mescroll-uni/components/mescroll-down.css

@@ -1,55 +0,0 @@
-/* 下拉刷新区域 */
-.mescroll-downwarp {
-	position: absolute;
-	top: -100%;
-	left: 0;
-	width: 100%;
-	height: 100%;
-	text-align: center;
-}
-
-/* 下拉刷新--内容区,定位于区域底部 */
-.mescroll-downwarp .downwarp-content {
-	position: absolute;
-	left: 0;
-	bottom: 0;
-	width: 100%;
-	min-height: 60rpx;
-	padding: 20rpx 0;
-	text-align: center;
-}
-
-/* 下拉刷新--提示文本 */
-.mescroll-downwarp .downwarp-tip {
-	display: inline-block;
-	font-size: 28rpx;
-	vertical-align: middle;
-	margin-left: 16rpx;
-	/* color: gray; 已在style设置color,此处删去*/
-}
-
-/* 下拉刷新--旋转进度条 */
-.mescroll-downwarp .downwarp-progress {
-	display: inline-block;
-	width: 32rpx;
-	height: 32rpx;
-	border-radius: 50%;
-	border: 2rpx solid gray;
-	border-bottom-color: transparent !important; /*已在style设置border-color,此处需加 !important*/
-	vertical-align: middle;
-}
-
-/* 旋转动画 */
-.mescroll-downwarp .mescroll-rotate {
-	animation: mescrollDownRotate 0.6s linear infinite;
-}
-
-@keyframes mescrollDownRotate {
-	0% {
-		transform: rotate(0deg);
-	}
-
-	100% {
-		transform: rotate(360deg);
-	}
-}

+ 0 - 47
node_modules/mescroll-uni/components/mescroll-down.vue

@@ -1,47 +0,0 @@
-<!-- 下拉刷新区域 -->
-<template>
-	<view v-if="mOption.use" class="mescroll-downwarp" :style="{'background-color':mOption.bgColor,'color':mOption.textColor}">
-		<view class="downwarp-content">
-			<view class="downwarp-progress" :class="{'mescroll-rotate': isDownLoading}" :style="{'border-color':mOption.textColor, 'transform':downRotate}"></view>
-			<view class="downwarp-tip">{{downText}}</view>
-		</view>
-	</view>
-</template>
-
-<script>
-export default {
-	props: {
-		option: Object , // down的配置项
-		type: Number, // 下拉状态(inOffset:1, outOffset:2, showLoading:3, endDownScroll:4)
-		rate: Number // 下拉比率 (inOffset: rate<1; outOffset: rate>=1)
-	},
-	computed: {
-		// 支付宝小程序需写成计算属性,prop定义default仍报错
-		mOption(){
-			return this.option || {}
-		},
-		// 是否在加载中
-		isDownLoading(){
-			return this.type === 3
-		},
-		// 旋转的角度
-		downRotate(){
-			return 'rotate(' + 360 * this.rate + 'deg)'
-		},
-		// 文本提示
-		downText(){
-			switch (this.type){
-				case 1: return this.mOption.textInOffset;
-				case 2: return this.mOption.textOutOffset;
-				case 3: return this.mOption.textLoading;
-				case 4: return this.mOption.textLoading;
-				default: return this.mOption.textInOffset;
-			}
-		}
-	}
-};
-</script>
-
-<style>
-@import "./mescroll-down.css";
-</style>

+ 0 - 118
node_modules/mescroll-uni/components/mescroll-empty.vue

@@ -1,118 +0,0 @@
-<!--空布局:
-
-可作为独立的组件, 不使用mescroll的页面也能单独引入, 以便APP全局统一管理:
-import MescrollEmpty from '@/components/mescroll-uni/components/mescroll-empty.vue';
-<mescroll-empty v-if="isShowEmpty" :option="optEmpty" @emptyclick="emptyClick"></mescroll-empty>
--->
-<template>
-	<view class="mescroll-empty" :class="{ 'empty-fixed': option.fixed }" :style="{ 'z-index': option.zIndex, top: option.top }">
-		<view> <image v-if="icon" class="empty-icon" :src="icon" mode="widthFix" /> </view>
-		<view v-if="tip" class="empty-tip">{{ tip }}</view>
-		<view v-if="btnText" class="empty-btn" @click="emptyClick">{{ btnText }}</view>
-	</view>
-</template>
-
-<script>
-// 引入全局配置
-import GlobalOption from './../mescroll-uni-option.js';
-// 引入国际化工具类
-import mescrollI18n from './../mescroll-i18n.js';
-export default {
-	props: {
-		// empty的配置项: 默认为GlobalOption.up.empty
-		option: {
-			type: Object,
-			default() {
-				return {};
-			}
-		}
-	},
-	// 使用computed获取配置,用于支持option的动态配置
-	computed: {
-		// 图标
-		icon() {
-			if (this.option.icon != null) { // 此处不使用短路求值, 用于支持传空串不显示图标
-				return this.option.icon
-			} else{
-				let i18nType = mescrollI18n.getType() // 国际化配置
-				if (this.option.i18n) {
-					return this.option.i18n[i18nType].icon
-				} else{
-					return GlobalOption.i18n[i18nType].up.empty.icon || GlobalOption.up.empty.icon
-				}
-			}
-		},
-		// 文本提示
-		tip() {
-			if (this.option.tip != null) { // 支持传空串不显示文本提示
-				return this.option.tip
-			} else{
-				let i18nType = mescrollI18n.getType() // 国际化配置
-				if (this.option.i18n) {
-					return this.option.i18n[i18nType].tip
-				} else{
-					return GlobalOption.i18n[i18nType].up.empty.tip || GlobalOption.up.empty.tip
-				}
-			}
-		},
-		// 按钮文本
-		btnText() {
-			if (this.option.i18n) {
-				let i18nType = mescrollI18n.getType() // 国际化配置
-				return this.option.i18n[i18nType].btnText
-			} else{
-				return this.option.btnText
-			}
-		}
-	},
-	methods: {
-		// 点击按钮
-		emptyClick() {
-			this.$emit('emptyclick');
-		}
-	}
-};
-</script>
-
-<style>
-/* 无任何数据的空布局 */
-.mescroll-empty {
-	box-sizing: border-box;
-	width: 100%;
-	padding: 100rpx 50rpx;
-	text-align: center;
-}
-
-.mescroll-empty.empty-fixed {
-	z-index: 99;
-	position: absolute; /*transform会使fixed失效,最终会降级为absolute */
-	top: 100rpx;
-	left: 0;
-}
-
-.mescroll-empty .empty-icon {
-	width: 280rpx;
-	height: 280rpx;
-}
-
-.mescroll-empty .empty-tip {
-	margin-top: 20rpx;
-	font-size: 24rpx;
-	color: gray;
-}
-
-.mescroll-empty .empty-btn {
-	display: inline-block;
-	margin-top: 40rpx;
-	min-width: 200rpx;
-	padding: 18rpx;
-	font-size: 28rpx;
-	border: 1rpx solid #e04b28;
-	border-radius: 60rpx;
-	color: #e04b28;
-}
-
-.mescroll-empty .empty-btn:active {
-	opacity: 0.75;
-}
-</style>

+ 0 - 83
node_modules/mescroll-uni/components/mescroll-top.vue

@@ -1,83 +0,0 @@
-<!-- 回到顶部的按钮 -->
-<template>
-	<image
-		v-if="mOption.src"
-		class="mescroll-totop"
-		:class="[value ? 'mescroll-totop-in' : 'mescroll-totop-out', {'mescroll-totop-safearea': mOption.safearea}]"
-		:style="{'z-index':mOption.zIndex, 'left': left, 'right': right, 'bottom':addUnit(mOption.bottom), 'width':addUnit(mOption.width), 'border-radius':addUnit(mOption.radius)}"
-		:src="mOption.src"
-		mode="widthFix"
-		@click="toTopClick"
-	/>
-</template>
-
-<script>
-export default {
-	props: {
-		// up.toTop的配置项
-		option: Object,
-		// 是否显示
-		value: false
-	},
-	computed: {
-		// 支付宝小程序需写成计算属性,prop定义default仍报错
-		mOption(){
-			return this.option || {}
-		},
-		// 优先显示左边
-		left(){
-			return this.mOption.left ? this.addUnit(this.mOption.left) : 'auto';
-		},
-		// 右边距离 (优先显示左边)
-		right() {
-			return this.mOption.left ? 'auto' : this.addUnit(this.mOption.right);
-		}
-	},
-	methods: {
-		addUnit(num){
-			if(!num) return 0;
-			if(typeof num === 'number') return num + 'rpx';
-			return num
-		},
-		toTopClick() {
-			this.$emit('input', false); // 使v-model生效
-			this.$emit('click'); // 派发点击事件
-		}
-	}
-};
-</script>
-
-<style>
-/* 回到顶部的按钮 */
-.mescroll-totop {
-	z-index: 9990;
-	position: fixed !important; /* 加上important避免编译到H5,在多mescroll中定位失效 */
-	right: 20rpx;
-	bottom: 120rpx;
-	width: 72rpx;
-	height: auto;
-	border-radius: 50%;
-	opacity: 0;
-	transition: opacity 0.5s; /* 过渡 */
-	margin-bottom: var(--window-bottom); /* css变量 */
-}
-
-/* 适配 iPhoneX */
-@supports (bottom: constant(safe-area-inset-bottom)) or (bottom: env(safe-area-inset-bottom)) {
-	.mescroll-totop-safearea {
-		margin-bottom: calc(var(--window-bottom) + constant(safe-area-inset-bottom)); /* window-bottom + 适配 iPhoneX */
-		margin-bottom: calc(var(--window-bottom) + env(safe-area-inset-bottom));
-	}
-}
-
-/* 显示 -- 淡入 */
-.mescroll-totop-in {
-	opacity: 1;
-}
-
-/* 隐藏 -- 淡出且不接收事件*/
-.mescroll-totop-out {
-	opacity: 0;
-	pointer-events: none;
-}
-</style>

+ 0 - 47
node_modules/mescroll-uni/components/mescroll-up.css

@@ -1,47 +0,0 @@
-/* 上拉加载区域 */
-.mescroll-upwarp {
-	box-sizing: border-box;
-	min-height: 110rpx;
-	padding: 30rpx 0;
-	text-align: center;
-	clear: both;
-}
-
-/*提示文本 */
-.mescroll-upwarp .upwarp-tip,
-.mescroll-upwarp .upwarp-nodata {
-	display: inline-block;
-	font-size: 28rpx;
-	vertical-align: middle;
-	/* color: gray; 已在style设置color,此处删去*/
-}
-
-.mescroll-upwarp .upwarp-tip {
-	margin-left: 16rpx;
-}
-
-/*旋转进度条 */
-.mescroll-upwarp .upwarp-progress {
-	display: inline-block;
-	width: 32rpx;
-	height: 32rpx;
-	border-radius: 50%;
-	border: 2rpx solid gray;
-	border-bottom-color: transparent !important; /*已在style设置border-color,此处需加 !important*/
-	vertical-align: middle;
-}
-
-/* 旋转动画 */
-.mescroll-upwarp .mescroll-rotate {
-	animation: mescrollUpRotate 0.6s linear infinite;
-}
-
-@keyframes mescrollUpRotate {
-	0% {
-		transform: rotate(0deg);
-	}
-
-	100% {
-		transform: rotate(360deg);
-	}
-}

+ 0 - 39
node_modules/mescroll-uni/components/mescroll-up.vue

@@ -1,39 +0,0 @@
-<!-- 上拉加载区域 -->
-<template>
-	<view class="mescroll-upwarp" :style="{'background-color':mOption.bgColor,'color':mOption.textColor}">
-		<!-- 加载中 (此处不能用v-if,否则android小程序快速上拉可能会不断触发上拉回调) -->
-		<view v-show="isUpLoading">
-			<view class="upwarp-progress mescroll-rotate" :style="{'border-color':mOption.textColor}"></view>
-			<view class="upwarp-tip">{{ mOption.textLoading }}</view>
-		</view>
-		<!-- 无数据 -->
-		<view v-if="isUpNoMore" class="upwarp-nodata">{{ mOption.textNoMore }}</view>
-	</view>
-</template>
-
-<script>
-export default {
-	props: {
-		option: Object, // up的配置项
-		type: Number // 上拉加载的状态:0(loading前),1(loading中),2(没有更多了)
-	},
-	computed: {
-		// 支付宝小程序需写成计算属性,prop定义default仍报错
-		mOption() {
-			return this.option || {};
-		},
-		// 加载中
-		isUpLoading() {
-			return this.type === 1;
-		},
-		// 没有更多了
-		isUpNoMore() {
-			return this.type === 2;
-		}
-	}
-};
-</script>
-
-<style>
-@import './mescroll-up.css';
-</style>

+ 0 - 19
node_modules/mescroll-uni/mescroll-body.css

@@ -1,19 +0,0 @@
-.mescroll-body {
-	position: relative; /* 下拉刷新区域相对自身定位 */
-	height: auto; /* 不可固定高度,否则overflow:hidden导致无法滑动; 同时使设置的最小高生效,实现列表不满屏仍可下拉*/
-	overflow: hidden; /* 当有元素写在mescroll-body标签前面时,可遮住下拉刷新区域 */
-	box-sizing: border-box; /* 避免设置padding出现双滚动条的问题 */
-}
-
-/* 使sticky生效: 父元素不能overflow:hidden或者overflow:auto属性 */
-.mescroll-body.mescorll-sticky{
-	overflow: unset !important
-}
-
-/* 适配 iPhoneX */
-@supports (bottom: constant(safe-area-inset-bottom)) or (bottom: env(safe-area-inset-bottom)) {
-	.mescroll-safearea {
-		padding-bottom: constant(safe-area-inset-bottom);
-		padding-bottom: env(safe-area-inset-bottom);
-	}
-}

+ 0 - 403
node_modules/mescroll-uni/mescroll-body.vue

@@ -1,403 +0,0 @@
-<template>
-	<view 
-	class="mescroll-body mescroll-render-touch" 
-	:class="{'mescorll-sticky': sticky}"
-	:style="{'minHeight':minHeight, 'padding-top': padTop, 'padding-bottom': padBottom}" 
-	@touchstart="wxsBiz.touchstartEvent" 
-	@touchmove="wxsBiz.touchmoveEvent" 
-	@touchend="wxsBiz.touchendEvent" 
-	@touchcancel="wxsBiz.touchendEvent"
-	:change:prop="wxsBiz.propObserver"
-	:prop="wxsProp"
-	>
-		<!-- 状态栏 -->
-		<view v-if="topbar&&statusBarHeight" class="mescroll-topbar" :style="{height: statusBarHeight+'px', background: topbar}"></view>
-		
-		<view class="mescroll-body-content mescroll-wxs-content" :style="{ transform: translateY, transition: transition }" :change:prop="wxsBiz.callObserver" :prop="callProp">
-			<!-- 下拉加载区域 (支付宝小程序子组件传参给子子组件仍报单项数据流的异常,暂时不通过mescroll-down组件实现)-->
-			<!-- <mescroll-down :option="mescroll.optDown" :type="downLoadType" :rate="downRate"></mescroll-down> -->
-			<view v-if="mescroll.optDown.use" class="mescroll-downwarp" :style="{'background':mescroll.optDown.bgColor,'color':mescroll.optDown.textColor}">
-				<view class="downwarp-content">
-					<view class="downwarp-progress mescroll-wxs-progress" :class="{'mescroll-rotate': isDownLoading}" :style="{'border-color':mescroll.optDown.textColor, 'transform': downRotate}"></view>
-					<view class="downwarp-tip">{{downText}}</view>
-				</view>
-			</view>
-	
-			<!-- 列表内容 -->
-			<slot></slot>
-
-			<!-- 空布局 -->
-			<mescroll-empty v-if="isShowEmpty" :option="mescroll.optUp.empty" @emptyclick="emptyClick"></mescroll-empty>
-
-			<!-- 上拉加载区域 (下拉刷新时不显示, 支付宝小程序子组件传参给子子组件仍报单项数据流的异常,暂时不通过mescroll-up组件实现)-->
-			<!-- <mescroll-up v-if="mescroll.optUp.use && !isDownLoading && upLoadType!==3" :option="mescroll.optUp" :type="upLoadType"></mescroll-up> -->
-			<view v-if="mescroll.optUp.use && !isDownLoading && upLoadType!==3" class="mescroll-upwarp" :style="{'background':mescroll.optUp.bgColor,'color':mescroll.optUp.textColor}">
-				<!-- 加载中 (此处不能用v-if,否则android小程序快速上拉可能会不断触发上拉回调) -->
-				<view v-show="upLoadType===1">
-					<view class="upwarp-progress mescroll-rotate" :style="{'border-color':mescroll.optUp.textColor}"></view>
-					<view class="upwarp-tip">{{ mescroll.optUp.textLoading }}</view>
-				</view>
-				<!-- 无数据 -->
-				<view v-if="upLoadType===2" class="upwarp-nodata">{{ mescroll.optUp.textNoMore }}</view>
-			</view>
-		</view>
-		
-		<!-- 底部是否偏移TabBar的高度(默认仅在H5端的tab页生效) -->
-		<!-- #ifdef H5 -->
-		<view v-if="bottombar && windowBottom>0" class="mescroll-bottombar" :style="{height: windowBottom+'px'}"></view>
-		<!-- #endif -->
-		
-		<!-- 适配iPhoneX -->
-		<view v-if="safearea" class="mescroll-safearea"></view>
-		
-		<!-- 回到顶部按钮 (fixed元素需写在transform外面,防止降级为absolute)-->
-		<mescroll-top v-model="isShowToTop" :option="mescroll.optUp.toTop" @click="toTopClick"></mescroll-top>
-		
-		<!-- #ifdef MP-WEIXIN || MP-QQ || APP-PLUS || H5 -->
-		<!-- renderjs的数据载体,不可写在mescroll-downwarp内部,避免use为false时,载体丢失,无法更新数据 -->
-		<view :change:prop="renderBiz.propObserver" :prop="wxsProp"></view>
-		<!-- #endif -->
-	</view>
-</template>
-
-<!-- 微信小程序, QQ小程序, app, h5使用wxs -->
-<!-- #ifdef MP-WEIXIN || MP-QQ || APP-PLUS || H5 -->
-<script src="./wxs/wxs.wxs" module="wxsBiz" lang="wxs"></script>
-<!-- #endif -->
-
-<!-- app, h5使用renderjs -->
-<!-- #ifdef APP-PLUS || H5 -->
-<script module="renderBiz" lang="renderjs">
-	import renderBiz from './wxs/renderjs.js';
-	export default {
-		mixins: [renderBiz]
-	}
-</script>
-<!-- #endif -->
-
-<script>
-	// 引入mescroll-uni.js,处理核心逻辑
-	import MeScroll from './mescroll-uni.js';
-	// 引入全局配置
-	import GlobalOption from './mescroll-uni-option.js';
-	// 引入空布局组件
-	import MescrollEmpty from './components/mescroll-empty.vue';
-	// 引入国际化工具类
-	import mescrollI18n from './mescroll-i18n.js';
-	// 引入回到顶部组件
-	import MescrollTop from './components/mescroll-top.vue';
-	// 引入兼容wxs(含renderjs)写法的mixins
-	import WxsMixin from './wxs/mixins.js';
-	
-	/**
-	 * mescroll-body 基于page滚动的下拉刷新和上拉加载组件, 支持嵌套原生组件, 性能好
-	 * @property {Object} down 下拉刷新的参数配置
-	 * @property {Object} up 上拉加载的参数配置
-	 * @property {Object} i18n 国际化的参数配置
-	 * @property {String, Number} top 下拉布局往下的偏移量 (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx, 百分比则相对于windowHeight)
-	 * @property {Boolean, String} topbar 偏移量top是否加上状态栏高度, 默认false (使用场景:取消原生导航栏时,配置此项可留出状态栏的占位, 支持传入字符串背景,如色值,背景图,渐变)
-	 * @property {String, Number} bottom 上拉布局往上的偏移量 (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx, 百分比则相对于windowHeight)
-	 * @property {Boolean} safearea 偏移量bottom是否加上底部安全区的距离, 默认false (需要适配iPhoneX时使用)
-	 * @property {Boolean} fixed 是否通过fixed固定mescroll的高度, 默认true
-	 * @property {String, Number} height 指定mescroll最小高度,默认windowHeight,使列表不满屏仍可下拉
-	 * @property {Boolean} bottombar 底部是否偏移TabBar的高度 (仅在H5端的tab页生效)
-	 * @property {Boolean} sticky 是否支持sticky,默认false; 当值配置true时,需避免在mescroll-body标签前面加非定位的元素,否则下拉区域无法隐藏
-	 * @event {Function} init 初始化完成的回调 
-	 * @event {Function} down 下拉刷新的回调
-	 * @event {Function} up 上拉加载的回调 
-	 * @event {Function} emptyclick 点击empty配置的btnText按钮回调
-	 * @event {Function} topclick 点击回到顶部的按钮回调
-	 * @event {Function} scroll 滚动监听 (需在 up 配置 onScroll:true 才生效)
-	 * @example <mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback"> ... </mescroll-body>
-	 */
-	export default {
-		name: 'mescroll-body',
-		mixins: [WxsMixin],
-		components: {
-			MescrollEmpty,
-			MescrollTop
-		},
-		props: {
-			down: Object,
-			up: Object,
-			i18n: Object,
-			top: [String, Number],
-			topbar: [Boolean, String],
-			bottom: [String, Number],
-			safearea: Boolean,
-			height: [String, Number],
-			bottombar:{
-				type: Boolean,
-				default: true
-			},
-			sticky: Boolean
-		},
-		data() {
-			return {
-				mescroll: {optDown:{},optUp:{}}, // mescroll实例
-				downHight: 0, //下拉刷新: 容器高度
-				downRate: 0, // 下拉比率(inOffset: rate<1; outOffset: rate>=1)
-				downLoadType: 0, // 下拉刷新状态: 0(loading前), 1(inOffset), 2(outOffset), 3(showLoading), 4(endDownScroll)
-				upLoadType: 0, // 上拉加载状态:0(loading前),1(loading中),2(没有更多了,显示END文本提示),3(没有更多了,不显示END文本提示)
-				isShowEmpty: false, // 是否显示空布局
-				isShowToTop: false, // 是否显示回到顶部按钮
-				windowHeight: 0, // 可使用窗口的高度
-				windowBottom: 0, // 可使用窗口的底部位置
-				statusBarHeight: 0 // 状态栏高度
-			};
-		},
-		computed: {
-			// mescroll最小高度,默认windowHeight,使列表不满屏仍可下拉
-			minHeight(){
-				return this.toPx(this.height || '100%') + 'px'
-			},
-			// 下拉布局往下偏移的距离 (px)
-			numTop() {
-				return this.toPx(this.top)
-			},
-			padTop() {
-				return this.numTop + 'px';
-			},
-			// 上拉布局往上偏移 (px)
-			numBottom() {
-				return this.toPx(this.bottom);
-			},
-			padBottom() {
-				return this.numBottom + 'px';
-			},
-			// 是否为重置下拉的状态
-			isDownReset() {
-				return this.downLoadType === 3 || this.downLoadType === 4;
-			},
-			// 过渡
-			transition() {
-				return this.isDownReset ? 'transform 300ms' : '';
-			},
-			translateY() {
-				return this.downHight > 0 ? 'translateY(' + this.downHight + 'px)' : ''; // transform会使fixed失效,需注意把fixed元素写在mescroll之外
-			},
-			// 是否在加载中
-			isDownLoading(){
-				return this.downLoadType === 3
-			},
-			// 旋转的角度
-			downRotate(){
-				return 'rotate(' + 360 * this.downRate + 'deg)'
-			},
-			// 文本提示
-			downText(){
-				if(!this.mescroll) return ""; // 避免头条小程序初始化时报错
-				switch (this.downLoadType){
-					case 1: return this.mescroll.optDown.textInOffset;
-					case 2: return this.mescroll.optDown.textOutOffset;
-					case 3: return this.mescroll.optDown.textLoading;
-					case 4: return this.mescroll.isDownEndSuccess ? this.mescroll.optDown.textSuccess : this.mescroll.isDownEndSuccess==false ? this.mescroll.optDown.textErr : this.mescroll.optDown.textInOffset;
-					default: return this.mescroll.optDown.textInOffset;
-				}
-			}
-		},
-		methods: {
-			//number,rpx,upx,px,% --> px的数值
-			toPx(num) {
-				if (typeof num === 'string') {
-					if (num.indexOf('px') !== -1) {
-						if (num.indexOf('rpx') !== -1) {
-							// "10rpx"
-							num = num.replace('rpx', '');
-						} else if (num.indexOf('upx') !== -1) {
-							// "10upx"
-							num = num.replace('upx', '');
-						} else {
-							// "10px"
-							return Number(num.replace('px', ''));
-						}
-					} else if (num.indexOf('%') !== -1) {
-						// 传百分比,则相对于windowHeight,传"10%"则等于windowHeight的10%
-						let rate = Number(num.replace('%', '')) / 100;
-						return this.windowHeight * rate;
-					}
-				}
-				return num ? uni.upx2px(Number(num)) : 0;
-			},
-			// 点击空布局的按钮回调
-			emptyClick() {
-				this.$emit('emptyclick', this.mescroll);
-			},
-			// 点击回到顶部的按钮回调
-			toTopClick() {
-				this.mescroll.scrollTo(0, this.mescroll.optUp.toTop.duration); // 执行回到顶部
-				this.$emit('topclick', this.mescroll); // 派发点击回到顶部按钮的回调
-			}
-		},
-		// 使用created初始化mescroll对象; 如果用mounted部分css样式编译到H5会失效
-		created() {
-			let vm = this;
-
-			let diyOption = {
-				// 下拉刷新的配置
-				down: {
-					inOffset() {
-						vm.downLoadType = 1; // 下拉的距离进入offset范围内那一刻的回调 (自定义mescroll组件时,此行不可删)
-					},
-					outOffset() {
-						vm.downLoadType = 2; // 下拉的距离大于offset那一刻的回调 (自定义mescroll组件时,此行不可删)
-					},
-					onMoving(mescroll, rate, downHight) {
-						// 下拉过程中的回调,滑动过程一直在执行;
-						vm.downHight = downHight; // 设置下拉区域的高度 (自定义mescroll组件时,此行不可删)
-						vm.downRate = rate; //下拉比率 (inOffset: rate<1; outOffset: rate>=1)
-					},
-					showLoading(mescroll, downHight) {
-						vm.downLoadType = 3; // 显示下拉刷新进度的回调 (自定义mescroll组件时,此行不可删)
-						vm.downHight = downHight; // 设置下拉区域的高度 (自定义mescroll组件时,此行不可删)
-					},
-					beforeEndDownScroll(mescroll){
-						vm.downLoadType = 4; 
-						return mescroll.optDown.beforeEndDelay // 延时结束的时长
-					},
-					endDownScroll() {
-						vm.downLoadType = 4; // 结束下拉 (自定义mescroll组件时,此行不可删)
-						vm.downHight = 0; // 设置下拉区域的高度 (自定义mescroll组件时,此行不可删)
-						if(vm.downResetTimer) {clearTimeout(vm.downResetTimer); vm.downResetTimer = null} // 移除重置倒计时
-						vm.downResetTimer = setTimeout(()=>{ // 过渡动画执行完毕后,需重置为0的状态,避免下次inOffset不及时显示textInOffset
-							if(vm.downLoadType === 4) vm.downLoadType = 0
-						},300)
-					},
-					// 派发下拉刷新的回调
-					callback: function(mescroll) {
-						vm.$emit('down', mescroll);
-					}
-				},
-				// 上拉加载的配置
-				up: {
-					// 显示加载中的回调
-					showLoading() {
-						vm.upLoadType = 1;
-					},
-					// 显示无更多数据的回调
-					showNoMore() {
-						vm.upLoadType = 2;
-					},
-					// 隐藏上拉加载的回调
-					hideUpScroll(mescroll) {
-						vm.upLoadType = mescroll.optUp.hasNext ? 0 : 3;
-					},
-					// 空布局
-					empty: {
-						onShow(isShow) {
-							// 显示隐藏的回调
-							vm.isShowEmpty = isShow;
-						}
-					},
-					// 回到顶部
-					toTop: {
-						onShow(isShow) {
-							// 显示隐藏的回调
-							vm.isShowToTop = isShow;
-						}
-					},
-					// 派发上拉加载的回调
-					callback: function(mescroll) {
-						vm.$emit('up', mescroll);
-					}
-				}
-			};
-			
-			let i18nType = mescrollI18n.getType() // 当前语言类型
-			let i18nOption = {type: i18nType} // 国际化配置
-			MeScroll.extend(i18nOption, vm.i18n) // 具体页面的国际化配置
-			MeScroll.extend(i18nOption, GlobalOption.i18n) // 全局的国际化配置
-			MeScroll.extend(diyOption, i18nOption[i18nType]); // 混入国际化配置
-			MeScroll.extend(diyOption, {down:GlobalOption.down, up:GlobalOption.up}); // 混入全局的配置
-			let myOption = JSON.parse(JSON.stringify({down: vm.down,up: vm.up})); // 深拷贝,避免对props的影响
-			MeScroll.extend(myOption, diyOption); // 混入具体界面的配置
-
-			// 初始化MeScroll对象
-			vm.mescroll = new MeScroll(myOption, true); // 传入true,标记body为滚动区域
-			// 挂载语言包
-			vm.mescroll.i18n = i18nOption;
-			// init回调mescroll对象
-			vm.$emit('init', vm.mescroll);
-
-			// 设置高度
-			const sys = uni.getSystemInfoSync();
-			if (sys.windowHeight) vm.windowHeight = sys.windowHeight;
-			if (sys.windowBottom) vm.windowBottom = sys.windowBottom;
-			if (sys.statusBarHeight) vm.statusBarHeight = sys.statusBarHeight;
-			// 使down的bottomOffset生效
-			vm.mescroll.setBodyHeight(sys.windowHeight);
-
-			// 因为使用的是page的scroll,这里需自定义scrollTo
-			vm.mescroll.resetScrollTo((y, t) => {
-				if(typeof y === 'string'){
-					// 滚动到指定view (y为css选择器)
-					setTimeout(()=>{ // 延时确保view已渲染; 不使用$nextTick
-						let selector;
-						if(y.indexOf('#')==-1 && y.indexOf('.')==-1){
-							selector = '#'+y // 不带#和. 则默认为id选择器
-						}else{
-							selector = y
-							// #ifdef APP-PLUS || H5 || MP-ALIPAY || MP-DINGTALK
-							if(y.indexOf('>>>')!=-1){ // 不支持跨自定义组件的后代选择器 (转为普通的选择器即可跨组件查询)
-								selector = y.split('>>>')[1].trim()
-							}
-							// #endif
-						}
-						uni.createSelectorQuery().select(selector).boundingClientRect(function(rect){
-							if (rect) {
-								let top = rect.top
-								top += vm.mescroll.getScrollTop()
-								uni.pageScrollTo({
-									scrollTop: top,
-									duration: t
-								})
-							} else{
-								console.error(selector + ' does not exist');
-							}
-						}).exec()
-					},30)
-				} else{
-					// 滚动到指定位置 (y必须为数字)
-					uni.pageScrollTo({
-						scrollTop: y,
-						duration: t
-					})
-				}
-			});
-
-			// 具体的界面如果不配置up.toTop.safearea,则取本vue的safearea值
-			if (vm.up && vm.up.toTop && vm.up.toTop.safearea != null) {} else {
-				vm.mescroll.optUp.toTop.safearea = vm.safearea;
-			}
-			
-			// 全局配置监听
-			uni.$on("setMescrollGlobalOption", options=>{
-				if(!options) return;
-				let i18nType = options.i18n ? options.i18n.type : null
-				if(i18nType && vm.mescroll.i18n.type != i18nType){
-					vm.mescroll.i18n.type = i18nType
-					mescrollI18n.setType(i18nType)
-					MeScroll.extend(options, vm.mescroll.i18n[i18nType])
-				}
-				if(options.down){
-					let down = MeScroll.extend({}, options.down)
-					vm.mescroll.optDown = MeScroll.extend(down, vm.mescroll.optDown)
-				}
-				if(options.up){
-					let up = MeScroll.extend({}, options.up)
-					vm.mescroll.optUp = MeScroll.extend(up, vm.mescroll.optUp)
-				}
-			})
-		},
-		destroyed() {
-			// 注销全局配置监听
-			uni.$off("setMescrollGlobalOption")
-		}
-	};
-</script>
-
-<style>
-	@import "./mescroll-body.css";
-	@import "./components/mescroll-down.css";
-	@import './components/mescroll-up.css';
-</style>

+ 0 - 15
node_modules/mescroll-uni/mescroll-i18n.js

@@ -1,15 +0,0 @@
-// 国际化工具类
-const mescrollI18n = {
-	// 默认语言
-	def: "zh",
-	// 获取当前语言类型
-	getType(){
-		return uni.getStorageSync("mescroll-i18n") || this.def
-	},
-	// 设置当前语言类型
-	setType(type){
-		uni.setStorageSync("mescroll-i18n", type)
-	}
-}
-
-export default mescrollI18n

+ 0 - 57
node_modules/mescroll-uni/mescroll-mixins.js

@@ -1,57 +0,0 @@
-// mescroll-body 和 mescroll-uni 通用
-const MescrollMixin = {
-	data() {
-		return {
-			mescroll: null //mescroll实例对象
-		}
-	},
-	// 注册系统自带的下拉刷新 (配置down.native为true时生效, 还需在pages配置enablePullDownRefresh:true;详请参考mescroll-native的案例)
-	onPullDownRefresh(){
-		this.mescroll && this.mescroll.onPullDownRefresh();
-	},
-	// 注册列表滚动事件,用于判定在顶部可下拉刷新,在指定位置可显示隐藏回到顶部按钮 (此方法为页面生命周期,无法在子组件中触发, 仅在mescroll-body生效)
-	onPageScroll(e) {
-		this.mescroll && this.mescroll.onPageScroll(e);
-	},
-	// 注册滚动到底部的事件,用于上拉加载 (此方法为页面生命周期,无法在子组件中触发, 仅在mescroll-body生效)
-	onReachBottom() {
-		this.mescroll && this.mescroll.onReachBottom();
-	},
-	methods: {
-		// mescroll组件初始化的回调,可获取到mescroll对象
-		mescrollInit(mescroll) {
-			this.mescroll = mescroll;
-			this.mescrollInitByRef(); // 兼容字节跳动小程序
-		},
-		// 以ref的方式初始化mescroll对象 (兼容字节跳动小程序)
-		mescrollInitByRef() {
-			if(!this.mescroll || !this.mescroll.resetUpScroll){
-				let mescrollRef = this.$refs.mescrollRef;
-				if(mescrollRef) this.mescroll = mescrollRef.mescroll
-			}
-		},
-		// 下拉刷新的回调 (mixin默认resetUpScroll)
-		downCallback() {
-			if(this.mescroll.optUp.use){
-				this.mescroll.resetUpScroll()
-			}else{
-				setTimeout(()=>{
-					this.mescroll.endSuccess();
-				}, 500)
-			}
-		},
-		// 上拉加载的回调
-		upCallback() {
-			// mixin默认延时500自动结束加载
-			setTimeout(()=>{
-				this.mescroll.endErr();
-			}, 500)
-		}
-	},
-	mounted() {
-		this.mescrollInitByRef(); // 兼容字节跳动小程序, 避免未设置@init或@init此时未能取到ref的情况
-	}
-	
-}
-
-export default MescrollMixin;

+ 0 - 64
node_modules/mescroll-uni/mescroll-uni-option.js

@@ -1,64 +0,0 @@
-// 全局配置
-// mescroll-body 和 mescroll-uni 通用
-const GlobalOption = {
-	down: {
-		// 其他down的配置参数也可以写,这里只展示了常用的配置:
-		offset: 80, // 在列表顶部,下拉大于80px,松手即可触发下拉刷新的回调
-		native: false // 是否使用系统自带的下拉刷新; 默认false; 仅在mescroll-body生效 (值为true时,还需在pages配置enablePullDownRefresh:true;详请参考mescroll-native的案例)
-	},
-	up: {
-		// 其他up的配置参数也可以写,这里只展示了常用的配置:
-		offset: 150, // 距底部多远时,触发upCallback,仅mescroll-uni生效 ( mescroll-body配置的是pages.json的 onReachBottomDistance )
-		toTop: {
-			// 回到顶部按钮,需配置src才显示
-			src: "https://www.mescroll.com/img/mescroll-totop.png", // 图片路径 (建议放入static目录, 如 /static/img/mescroll-totop.png )
-			offset: 1000, // 列表滚动多少距离才显示回到顶部按钮,默认1000px
-			right: 20, // 到右边的距离, 默认20 (支持"20rpx", "20px", "20%"格式的值, 纯数字则默认单位rpx)
-			bottom: 120, // 到底部的距离, 默认120 (支持"20rpx", "20px", "20%"格式的值, 纯数字则默认单位rpx)
-			width: 72 // 回到顶部图标的宽度, 默认72 (支持"20rpx", "20px", "20%"格式的值, 纯数字则默认单位rpx)
-		},
-		empty: {
-			use: true, // 是否显示空布局
-			icon: "https://www.mescroll.com/img/mescroll-empty.png" // 图标路径 (建议放入static目录, 如 /static/img/mescroll-empty.png )
-		}
-	},
-	// 国际化配置
-	i18n: {
-		// 中文
-		zh: {
-			down: {
-				textInOffset: '下拉刷新', // 下拉的距离在offset范围内的提示文本
-				textOutOffset: '释放更新', // 下拉的距离大于offset范围的提示文本
-				textLoading: '加载中 ...', // 加载中的提示文本
-				textSuccess: '加载成功', // 加载成功的文本
-				textErr: '加载失败', // 加载失败的文本
-			},
-			up: {
-				textLoading: '加载中 ...', // 加载中的提示文本
-				textNoMore: '-- END --', // 没有更多数据的提示文本
-				empty: {
-					tip: '~ 空空如也 ~' // 空提示
-				}
-			}
-		},
-		// 英文
-		en: {
-			down: {
-				textInOffset: 'drop down refresh',
-				textOutOffset: 'release updates',
-				textLoading: 'loading ...',
-				textSuccess: 'loaded successfully',
-				textErr: 'loading failed'
-			},
-			up: {
-				textLoading: 'loading ...',
-				textNoMore: '-- END --',
-				empty: {
-					tip: '~ absolutely empty ~'
-				}
-			}
-		}
-	}
-}
-
-export default GlobalOption

+ 0 - 36
node_modules/mescroll-uni/mescroll-uni.css

@@ -1,36 +0,0 @@
-.mescroll-uni-warp{
-	height: 100%;
-}
-
-.mescroll-uni-content{
-	height: 100%;
-}
-
-.mescroll-uni {
-	position: relative;
-	width: 100%;
-	height: 100%;
-	min-height: 200rpx;
-	overflow-y: auto;
-	box-sizing: border-box; /* 避免设置padding出现双滚动条的问题 */
-}
-
-/* 定位的方式固定高度 */
-.mescroll-uni-fixed{
-	z-index: 1;
-	position: fixed;
-	top: 0;
-	left: 0;
-	right: 0;
-	bottom: 0;
-	width: auto; /* 使right生效 */
-	height: auto; /* 使bottom生效 */
-}
-
-/* 适配 iPhoneX */
-@supports (bottom: constant(safe-area-inset-bottom)) or (bottom: env(safe-area-inset-bottom)) {
-	.mescroll-safearea {
-		padding-bottom: constant(safe-area-inset-bottom);
-		padding-bottom: env(safe-area-inset-bottom);
-	}
-}

+ 0 - 799
node_modules/mescroll-uni/mescroll-uni.js

@@ -1,799 +0,0 @@
-/* mescroll
- * version 1.3.7
- * 2021-04-13 wenju
- * https://www.mescroll.com
- */
-
-export default function MeScroll(options, isScrollBody) {
-	let me = this;
-	me.version = '1.3.7'; // mescroll版本号
-	me.options = options || {}; // 配置
-	me.isScrollBody = isScrollBody || false; // 滚动区域是否为原生页面滚动; 默认为scroll-view
-
-	me.isDownScrolling = false; // 是否在执行下拉刷新的回调
-	me.isUpScrolling = false; // 是否在执行上拉加载的回调
-	let hasDownCallback = me.options.down && me.options.down.callback; // 是否配置了down的callback
-
-	// 初始化下拉刷新
-	me.initDownScroll();
-	// 初始化上拉加载,则初始化
-	me.initUpScroll();
-
-	// 自动加载
-	setTimeout(function() { // 待主线程执行完毕再执行,避免new MeScroll未初始化,在回调获取不到mescroll的实例
-		// 自动触发下拉刷新 (只有配置了down的callback才自动触发下拉刷新)
-		if ((me.optDown.use || me.optDown.native) && me.optDown.auto && hasDownCallback) {
-			if (me.optDown.autoShowLoading) {
-				me.triggerDownScroll(); // 显示下拉进度,执行下拉回调
-			} else {
-				me.optDown.callback && me.optDown.callback(me); // 不显示下拉进度,直接执行下拉回调
-			}
-		}
-		// 自动触发上拉加载
-		if(!me.isUpAutoLoad){ // 部分小程序(头条小程序)emit是异步, 会导致isUpAutoLoad判断有误, 先延时确保先执行down的callback,再执行up的callback
-			setTimeout(function(){
-				me.optUp.use && me.optUp.auto && !me.isUpAutoLoad && me.triggerUpScroll();
-			},100)
-		}
-	}, 30); // 需让me.optDown.inited和me.optUp.inited先执行
-}
-
-/* 配置参数:下拉刷新 */
-MeScroll.prototype.extendDownScroll = function(optDown) {
-	// 下拉刷新的配置
-	MeScroll.extend(optDown, {
-		use: true, // 是否启用下拉刷新; 默认true
-		auto: true, // 是否在初始化完毕之后自动执行下拉刷新的回调; 默认true
-		native: false, // 是否使用系统自带的下拉刷新; 默认false; 仅mescroll-body生效 (值为true时,还需在pages配置enablePullDownRefresh:true;详请参考mescroll-native的案例)
-		autoShowLoading: false, // 如果设置auto=true(在初始化完毕之后自动执行下拉刷新的回调),那么是否显示下拉刷新的进度; 默认false
-		isLock: false, // 是否锁定下拉刷新,默认false;
-		offset: 80, // 在列表顶部,下拉大于80px,松手即可触发下拉刷新的回调
-		startTop: 100, // scroll-view快速滚动到顶部时,此时的scroll-top可能大于0, 此值用于控制最大的误差
-		inOffsetRate: 1, // 在列表顶部,下拉的距离小于offset时,改变下拉区域高度比例;值小于1且越接近0,高度变化越小,表现为越往下越难拉
-		outOffsetRate: 0.2, // 在列表顶部,下拉的距离大于offset时,改变下拉区域高度比例;值小于1且越接近0,高度变化越小,表现为越往下越难拉
-		bottomOffset: 20, // 当手指touchmove位置在距离body底部20px范围内的时候结束上拉刷新,避免Webview嵌套导致touchend事件不执行
-		minAngle: 45, // 向下滑动最少偏移的角度,取值区间  [0,90];默认45度,即向下滑动的角度大于45度则触发下拉;而小于45度,将不触发下拉,避免与左右滑动的轮播等组件冲突;
-		textInOffset: '下拉刷新', // 下拉的距离在offset范围内的提示文本
-		textOutOffset: '释放更新', // 下拉的距离大于offset范围的提示文本
-		textLoading: '加载中 ...', // 加载中的提示文本
-		textSuccess: '加载成功', // 加载成功的文本
-		textErr: '加载失败', // 加载失败的文本
-		beforeEndDelay: 0, // 延时结束的时长 (显示加载成功/失败的时长, android小程序设置此项结束下拉会卡顿, 配置后请注意测试)
-		bgColor: "transparent", // 背景颜色 (建议在pages.json中再设置一下backgroundColorTop)
-		textColor: "gray", // 文本颜色 (当bgColor配置了颜色,而textColor未配置时,则textColor会默认为白色)
-		inited: null, // 下拉刷新初始化完毕的回调
-		inOffset: null, // 下拉的距离进入offset范围内那一刻的回调
-		outOffset: null, // 下拉的距离大于offset那一刻的回调
-		onMoving: null, // 下拉过程中的回调,滑动过程一直在执行; rate下拉区域当前高度与指定距离的比值(inOffset: rate<1; outOffset: rate>=1); downHight当前下拉区域的高度
-		beforeLoading: null, // 准备触发下拉刷新的回调: 如果return true,将不触发showLoading和callback回调; 常用来完全自定义下拉刷新, 参考案例【淘宝 v6.8.0】
-		showLoading: null, // 显示下拉刷新进度的回调
-		afterLoading: null, // 显示下拉刷新进度的回调之后,马上要执行的代码 (如: 在wxs中使用)
-		beforeEndDownScroll: null, // 准备结束下拉的回调. 返回结束下拉的延时执行时间,默认0ms; 常用于结束下拉之前再显示另外一小段动画,才去隐藏下拉刷新的场景, 参考案例【dotJump】
-		endDownScroll: null, // 结束下拉刷新的回调
-		afterEndDownScroll: null, // 结束下拉刷新的回调,马上要执行的代码 (如: 在wxs中使用)
-		callback: function(mescroll) {
-			// 下拉刷新的回调;默认重置上拉加载列表为第一页
-			mescroll.resetUpScroll();
-		}
-	})
-}
-
-/* 配置参数:上拉加载 */
-MeScroll.prototype.extendUpScroll = function(optUp) {
-	// 上拉加载的配置
-	MeScroll.extend(optUp, {
-		use: true, // 是否启用上拉加载; 默认true
-		auto: true, // 是否在初始化完毕之后自动执行上拉加载的回调; 默认true
-		isLock: false, // 是否锁定上拉加载,默认false;
-		isBoth: true, // 上拉加载时,如果滑动到列表顶部是否可以同时触发下拉刷新;默认true,两者可同时触发;
-		callback: null, // 上拉加载的回调;function(page,mescroll){ }
-		page: {
-			num: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
-			size: 10, // 每页数据的数量
-			time: null // 加载第一页数据服务器返回的时间; 防止用户翻页时,后台新增了数据从而导致下一页数据重复;
-		},
-		noMoreSize: 5, // 如果列表已无数据,可设置列表的总数量要大于等于5条才显示无更多数据;避免列表数据过少(比如只有一条数据),显示无更多数据会不好看
-		offset: 150, // 距底部多远时,触发upCallback,仅mescroll-uni生效 ( mescroll-body配置的是pages.json的 onReachBottomDistance )
-		textLoading: '加载中 ...', // 加载中的提示文本
-		textNoMore: '-- END --', // 没有更多数据的提示文本
-		bgColor: "transparent", // 背景颜色 (建议在pages.json中再设置一下backgroundColorBottom)
-		textColor: "gray", // 文本颜色 (当bgColor配置了颜色,而textColor未配置时,则textColor会默认为白色)
-		inited: null, // 初始化完毕的回调
-		showLoading: null, // 显示加载中的回调
-		showNoMore: null, // 显示无更多数据的回调
-		hideUpScroll: null, // 隐藏上拉加载的回调
-		errDistance: 60, // endErr的时候需往上滑动一段距离,使其往下滑动时再次触发onReachBottom,仅mescroll-body生效
-		toTop: {
-			// 回到顶部按钮,需配置src才显示
-			src: null, // 图片路径,默认null (绝对路径或网络图)
-			offset: 1000, // 列表滚动多少距离才显示回到顶部按钮,默认1000
-			duration: 300, // 回到顶部的动画时长,默认300ms (当值为0或300则使用系统自带回到顶部,更流畅; 其他值则通过step模拟,部分机型可能不够流畅,所以非特殊情况不建议修改此项)
-			btnClick: null, // 点击按钮的回调
-			onShow: null, // 是否显示的回调
-			zIndex: 9990, // fixed定位z-index值
-			left: null, // 到左边的距离, 默认null. 此项有值时,right不生效. (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
-			right: 20, // 到右边的距离, 默认20 (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
-			bottom: 120, // 到底部的距离, 默认120 (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
-			safearea: false, // bottom的偏移量是否加上底部安全区的距离, 默认false, 需要适配iPhoneX时使用 (具体的界面如果不配置此项,则取本vue的safearea值)
-			width: 72, // 回到顶部图标的宽度, 默认72 (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
-			radius: "50%" // 圆角, 默认"50%" (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
-		},
-		empty: {
-			use: true, // 是否显示空布局
-			icon: null, // 图标路径
-			tip: '~ 暂无相关数据 ~', // 提示
-			btnText: '', // 按钮
-			btnClick: null, // 点击按钮的回调
-			onShow: null, // 是否显示的回调
-			fixed: false, // 是否使用fixed定位,默认false; 配置fixed为true,以下的top和zIndex才生效 (transform会使fixed失效,最终会降级为absolute)
-			top: "100rpx", // fixed定位的top值 (完整的单位值,如 "10%"; "100rpx")
-			zIndex: 99 // fixed定位z-index值
-		},
-		onScroll: false // 是否监听滚动事件
-	})
-}
-
-/* 配置参数 */
-MeScroll.extend = function(userOption, defaultOption) {
-	if (!userOption) return defaultOption;
-	for (let key in defaultOption) {
-		if (userOption[key] == null) {
-			let def = defaultOption[key];
-			if (def != null && typeof def === 'object') {
-				userOption[key] = MeScroll.extend({}, def); // 深度匹配
-			} else {
-				userOption[key] = def;
-			}
-		} else if (typeof userOption[key] === 'object') {
-			MeScroll.extend(userOption[key], defaultOption[key]); // 深度匹配
-		}
-	}
-	return userOption;
-}
-
-/* 简单判断是否配置了颜色 (非透明,非白色) */
-MeScroll.prototype.hasColor = function(color) {
-	if(!color) return false;
-	let c = color.toLowerCase();
-	return c != "#fff" && c != "#ffffff" && c != "transparent" && c != "white"
-}
-
-/* -------初始化下拉刷新------- */
-MeScroll.prototype.initDownScroll = function() {
-	let me = this;
-	// 配置参数
-	me.optDown = me.options.down || {};
-	if(!me.optDown.textColor && me.hasColor(me.optDown.bgColor)) me.optDown.textColor = "#fff"; // 当bgColor有值且textColor未设置,则textColor默认白色
-	me.extendDownScroll(me.optDown);
-	
-	// 如果是mescroll-body且配置了native,则禁止自定义的下拉刷新
-	if(me.isScrollBody && me.optDown.native){
-		me.optDown.use = false
-	}else{
-		me.optDown.native = false // 仅mescroll-body支持,mescroll-uni不支持
-	}
-	
-	me.downHight = 0; // 下拉区域的高度
-
-	// 在页面中加入下拉布局
-	if (me.optDown.use && me.optDown.inited) {
-		// 初始化完毕的回调
-		setTimeout(function() { // 待主线程执行完毕再执行,避免new MeScroll未初始化,在回调获取不到mescroll的实例
-			me.optDown.inited(me);
-		}, 0)
-	}
-}
-
-/* 列表touchstart事件 */
-MeScroll.prototype.touchstartEvent = function(e) {
-	if (!this.optDown.use) return;
-
-	this.startPoint = this.getPoint(e); // 记录起点
-	this.startTop = this.getScrollTop(); // 记录此时的滚动条位置
-	this.startAngle = 0; // 初始角度
-	this.lastPoint = this.startPoint; // 重置上次move的点
-	this.maxTouchmoveY = this.getBodyHeight() - this.optDown.bottomOffset; // 手指触摸的最大范围(写在touchstart避免body获取高度为0的情况)
-	this.inTouchend = false; // 标记不是touchend
-}
-
-/* 列表touchmove事件 */
-MeScroll.prototype.touchmoveEvent = function(e) {
-	if (!this.optDown.use) return;
-	let me = this;
-
-	let scrollTop = me.getScrollTop(); // 当前滚动条的距离
-	let curPoint = me.getPoint(e); // 当前点
-
-	let moveY = curPoint.y - me.startPoint.y; // 和起点比,移动的距离,大于0向下拉,小于0向上拉
-
-	// 向下拉 && 在顶部
-	// mescroll-body,直接判定在顶部即可
-	// scroll-view在滚动时不会触发touchmove,当触顶/底/左/右时,才会触发touchmove
-	// scroll-view滚动到顶部时,scrollTop不一定为0,也有可能大于0; 在iOS的APP中scrollTop可能为负数,不一定和startTop相等
-	if (moveY > 0 && (
-			(me.isScrollBody && scrollTop <= 0)
-			||
-			(!me.isScrollBody && (scrollTop <= 0 || (scrollTop <= me.optDown.startTop && scrollTop === me.startTop)) )
-		)) {
-		// 可下拉的条件
-		if (!me.inTouchend && !me.isDownScrolling && !me.optDown.isLock && (!me.isUpScrolling || (me.isUpScrolling &&
-				me.optUp.isBoth))) {
-
-			// 下拉的初始角度是否在配置的范围内
-			if(!me.startAngle) me.startAngle = me.getAngle(me.lastPoint, curPoint); // 两点之间的角度,区间 [0,90]
-			if (me.startAngle < me.optDown.minAngle) return; // 如果小于配置的角度,则不往下执行下拉刷新
-
-			// 如果手指的位置超过配置的距离,则提前结束下拉,避免Webview嵌套导致touchend无法触发
-			if (me.maxTouchmoveY > 0 && curPoint.y >= me.maxTouchmoveY) {
-				me.inTouchend = true; // 标记执行touchend
-				me.touchendEvent(); // 提前触发touchend
-				return;
-			}
-			
-			me.preventDefault(e); // 阻止默认事件
-
-			let diff = curPoint.y - me.lastPoint.y; // 和上次比,移动的距离 (大于0向下,小于0向上)
-
-			// 下拉距离  < 指定距离
-			if (me.downHight < me.optDown.offset) {
-				if (me.movetype !== 1) {
-					me.movetype = 1; // 加入标记,保证只执行一次
-					me.isDownEndSuccess = null; // 重置是否加载成功的状态 (wxs执行的是wxs.wxs)
-					me.optDown.inOffset && me.optDown.inOffset(me); // 进入指定距离范围内那一刻的回调,只执行一次
-					me.isMoveDown = true; // 标记下拉区域高度改变,在touchend重置回来
-				}
-				me.downHight += diff * me.optDown.inOffsetRate; // 越往下,高度变化越小
-
-				// 指定距离  <= 下拉距离
-			} else {
-				if (me.movetype !== 2) {
-					me.movetype = 2; // 加入标记,保证只执行一次
-					me.optDown.outOffset && me.optDown.outOffset(me); // 下拉超过指定距离那一刻的回调,只执行一次
-					me.isMoveDown = true; // 标记下拉区域高度改变,在touchend重置回来
-				}
-				if (diff > 0) { // 向下拉
-					me.downHight += diff * me.optDown.outOffsetRate; // 越往下,高度变化越小
-				} else { // 向上收
-					me.downHight += diff; // 向上收回高度,则向上滑多少收多少高度
-				}
-			}
-			
-			me.downHight = Math.round(me.downHight) // 取整
-			let rate = me.downHight / me.optDown.offset; // 下拉区域当前高度与指定距离的比值
-			me.optDown.onMoving && me.optDown.onMoving(me, rate, me.downHight); // 下拉过程中的回调,一直在执行
-		}
-	}
-
-	me.lastPoint = curPoint; // 记录本次移动的点
-}
-
-/* 列表touchend事件 */
-MeScroll.prototype.touchendEvent = function(e) {
-	if (!this.optDown.use) return;
-	// 如果下拉区域高度已改变,则需重置回来
-	if (this.isMoveDown) {
-		if (this.downHight >= this.optDown.offset) {
-			// 符合触发刷新的条件
-			this.triggerDownScroll();
-		} else {
-			// 不符合的话 则重置
-			this.downHight = 0;
-			this.endDownScrollCall(this);
-		}
-		this.movetype = 0;
-		this.isMoveDown = false;
-	} else if (!this.isScrollBody && this.getScrollTop() === this.startTop) { // scroll-view到顶/左/右/底的滑动事件
-		let isScrollUp = this.getPoint(e).y - this.startPoint.y < 0; // 和起点比,移动的距离,大于0向下拉,小于0向上拉
-		// 上滑
-		if (isScrollUp) {
-			// 需检查滑动的角度
-			let angle = this.getAngle(this.getPoint(e), this.startPoint); // 两点之间的角度,区间 [0,90]
-			if (angle > 80) {
-				// 检查并触发上拉
-				this.triggerUpScroll(true);
-			}
-		}
-	}
-}
-
-/* 根据点击滑动事件获取第一个手指的坐标 */
-MeScroll.prototype.getPoint = function(e) {
-	if (!e) {
-		return {
-			x: 0,
-			y: 0
-		}
-	}
-	if (e.touches && e.touches[0]) {
-		return {
-			x: e.touches[0].pageX,
-			y: e.touches[0].pageY
-		}
-	} else if (e.changedTouches && e.changedTouches[0]) {
-		return {
-			x: e.changedTouches[0].pageX,
-			y: e.changedTouches[0].pageY
-		}
-	} else {
-		return {
-			x: e.clientX,
-			y: e.clientY
-		}
-	}
-}
-
-/* 计算两点之间的角度: 区间 [0,90]*/
-MeScroll.prototype.getAngle = function(p1, p2) {
-	let x = Math.abs(p1.x - p2.x);
-	let y = Math.abs(p1.y - p2.y);
-	let z = Math.sqrt(x * x + y * y);
-	let angle = 0;
-	if (z !== 0) {
-		angle = Math.asin(y / z) / Math.PI * 180;
-	}
-	return angle
-}
-
-/* 触发下拉刷新 */
-MeScroll.prototype.triggerDownScroll = function() {
-	if (this.optDown.beforeLoading && this.optDown.beforeLoading(this)) {
-		//return true则处于完全自定义状态
-	} else {
-		this.showDownScroll(); // 下拉刷新中...
-		!this.optDown.native && this.optDown.callback && this.optDown.callback(this); // 执行回调,联网加载数据
-	}
-}
-
-/* 显示下拉进度布局 */
-MeScroll.prototype.showDownScroll = function() {
-	this.isDownScrolling = true; // 标记下拉中
-	if (this.optDown.native) {
-		uni.startPullDownRefresh(); // 系统自带的下拉刷新
-		this.showDownLoadingCall(0); // 仍触发showLoading,因为上拉加载用到
-	} else{
-		this.downHight = this.optDown.offset; // 更新下拉区域高度
-		this.showDownLoadingCall(this.downHight); // 下拉刷新中...
-	}
-}
-
-MeScroll.prototype.showDownLoadingCall = function(downHight) {
-	this.optDown.showLoading && this.optDown.showLoading(this, downHight); // 下拉刷新中...
-	this.optDown.afterLoading && this.optDown.afterLoading(this, downHight); // 下拉刷新中...触发之后马上要执行的代码
-}
-
-/* 显示系统自带的下拉刷新时需要处理的业务 */
-MeScroll.prototype.onPullDownRefresh = function() {
-	this.isDownScrolling = true; // 标记下拉中
-	this.showDownLoadingCall(0); // 仍触发showLoading,因为上拉加载用到
-	this.optDown.callback && this.optDown.callback(this); // 执行回调,联网加载数据
-}
-
-/* 结束下拉刷新 */
-MeScroll.prototype.endDownScroll = function() {
-	if (this.optDown.native) { // 结束原生下拉刷新
-		this.isDownScrolling = false;
-		this.endDownScrollCall(this);
-		uni.stopPullDownRefresh();
-		return
-	}
-	let me = this;
-	// 结束下拉刷新的方法
-	let endScroll = function() {
-		me.downHight = 0;
-		me.isDownScrolling = false;
-		me.endDownScrollCall(me);
-		if(!me.isScrollBody){
-			me.setScrollHeight(0) // scroll-view重置滚动区域,使数据不满屏时仍可检查触发翻页
-			me.scrollTo(0,0) // scroll-view需重置滚动条到顶部,避免startTop大于0时,对下拉刷新的影响
-		}
-	}
-	// 结束下拉刷新时的回调
-	let delay = 0;
-	if (me.optDown.beforeEndDownScroll) {
-		delay = me.optDown.beforeEndDownScroll(me); // 结束下拉刷新的延时,单位ms
-		if(me.isDownEndSuccess == null) delay = 0; // 没有执行加载中,则不延时
-	}
-	if (typeof delay === 'number' && delay > 0) {
-		setTimeout(endScroll, delay);
-	} else {
-		endScroll();
-	}
-}
-
-MeScroll.prototype.endDownScrollCall = function() {
-	this.optDown.endDownScroll && this.optDown.endDownScroll(this);
-	this.optDown.afterEndDownScroll && this.optDown.afterEndDownScroll(this);
-}
-
-/* 锁定下拉刷新:isLock=ture,null锁定;isLock=false解锁 */
-MeScroll.prototype.lockDownScroll = function(isLock) {
-	if (isLock == null) isLock = true;
-	this.optDown.isLock = isLock;
-}
-
-/* 锁定上拉加载:isLock=ture,null锁定;isLock=false解锁 */
-MeScroll.prototype.lockUpScroll = function(isLock) {
-	if (isLock == null) isLock = true;
-	this.optUp.isLock = isLock;
-}
-
-/* -------初始化上拉加载------- */
-MeScroll.prototype.initUpScroll = function() {
-	let me = this;
-	// 配置参数
-	me.optUp = me.options.up || {use: false}
-	if(!me.optUp.textColor && me.hasColor(me.optUp.bgColor)) me.optUp.textColor = "#fff"; // 当bgColor有值且textColor未设置,则textColor默认白色
-	me.extendUpScroll(me.optUp);
-
-	if (me.optUp.use === false) return; // 配置不使用上拉加载时,则不初始化上拉布局
-	me.optUp.hasNext = true; // 如果使用上拉,则默认有下一页
-	me.startNum = me.optUp.page.num + 1; // 记录page开始的页码
-
-	// 初始化完毕的回调
-	if (me.optUp.inited) {
-		setTimeout(function() { // 待主线程执行完毕再执行,避免new MeScroll未初始化,在回调获取不到mescroll的实例
-			me.optUp.inited(me);
-		}, 0)
-	}
-}
-
-/*滚动到底部的事件 (仅mescroll-body生效)*/
-MeScroll.prototype.onReachBottom = function() {
-	if (this.isScrollBody && !this.isUpScrolling) { // 只能支持下拉刷新的时候同时可以触发上拉加载,否则滚动到底部就需要上滑一点才能触发onReachBottom
-		if (!this.optUp.isLock && this.optUp.hasNext) {
-			this.triggerUpScroll();
-		}
-	}
-}
-
-/*列表滚动事件 (仅mescroll-body生效)*/
-MeScroll.prototype.onPageScroll = function(e) {
-	if (!this.isScrollBody) return;
-	
-	// 更新滚动条的位置 (主要用于判断下拉刷新时,滚动条是否在顶部)
-	this.setScrollTop(e.scrollTop);
-
-	// 顶部按钮的显示隐藏
-	if (e.scrollTop >= this.optUp.toTop.offset) {
-		this.showTopBtn();
-	} else {
-		this.hideTopBtn();
-	}
-}
-
-/*列表滚动事件*/
-MeScroll.prototype.scroll = function(e, onScroll) {
-	// 更新滚动条的位置
-	this.setScrollTop(e.scrollTop);
-	// 更新滚动内容高度
-	this.setScrollHeight(e.scrollHeight);
-
-	// 向上滑还是向下滑动
-	if (this.preScrollY == null) this.preScrollY = 0;
-	this.isScrollUp = e.scrollTop - this.preScrollY > 0;
-	this.preScrollY = e.scrollTop;
-
-	// 上滑 && 检查并触发上拉
-	this.isScrollUp && this.triggerUpScroll(true);
-
-	// 顶部按钮的显示隐藏
-	if (e.scrollTop >= this.optUp.toTop.offset) {
-		this.showTopBtn();
-	} else {
-		this.hideTopBtn();
-	}
-
-	// 滑动监听
-	this.optUp.onScroll && onScroll && onScroll()
-}
-
-/* 触发上拉加载 */
-MeScroll.prototype.triggerUpScroll = function(isCheck) {
-	if (!this.isUpScrolling && this.optUp.use && this.optUp.callback) {
-		// 是否校验在底部; 默认不校验
-		if (isCheck === true) {
-			let canUp = false;
-			// 还有下一页 && 没有锁定 && 不在下拉中
-			if (this.optUp.hasNext && !this.optUp.isLock && !this.isDownScrolling) {
-				if (this.getScrollBottom() <= this.optUp.offset) { // 到底部
-					canUp = true; // 标记可上拉
-				}
-			}
-			if (canUp === false) return;
-		}
-		this.showUpScroll(); // 上拉加载中...
-		this.optUp.page.num++; // 预先加一页,如果失败则减回
-		this.isUpAutoLoad = true; // 标记上拉已经自动执行过,避免初始化时多次触发上拉回调
-		this.num = this.optUp.page.num; // 把最新的页数赋值在mescroll上,避免对page的影响
-		this.size = this.optUp.page.size; // 把最新的页码赋值在mescroll上,避免对page的影响
-		this.time = this.optUp.page.time; // 把最新的页码赋值在mescroll上,避免对page的影响
-		this.optUp.callback(this); // 执行回调,联网加载数据
-	}
-}
-
-/* 显示上拉加载中 */
-MeScroll.prototype.showUpScroll = function() {
-	this.isUpScrolling = true; // 标记上拉加载中
-	this.optUp.showLoading && this.optUp.showLoading(this); // 回调
-}
-
-/* 显示上拉无更多数据 */
-MeScroll.prototype.showNoMore = function() {
-	this.optUp.hasNext = false; // 标记无更多数据
-	this.optUp.showNoMore && this.optUp.showNoMore(this); // 回调
-}
-
-/* 隐藏上拉区域**/
-MeScroll.prototype.hideUpScroll = function() {
-	this.optUp.hideUpScroll && this.optUp.hideUpScroll(this); // 回调
-}
-
-/* 结束上拉加载 */
-MeScroll.prototype.endUpScroll = function(isShowNoMore) {
-	if (isShowNoMore != null) { // isShowNoMore=null,不处理下拉状态,下拉刷新的时候调用
-		if (isShowNoMore) {
-			this.showNoMore(); // isShowNoMore=true,显示无更多数据
-		} else {
-			this.hideUpScroll(); // isShowNoMore=false,隐藏上拉加载
-		}
-	}
-	this.isUpScrolling = false; // 标记结束上拉加载
-}
-
-/* 重置上拉加载列表为第一页
- *isShowLoading 是否显示进度布局;
- * 1.默认null,不传参,则显示上拉加载的进度布局
- * 2.传参true, 则显示下拉刷新的进度布局
- * 3.传参false,则不显示上拉和下拉的进度 (常用于静默更新列表数据)
- */
-MeScroll.prototype.resetUpScroll = function(isShowLoading) {
-	if (this.optUp && this.optUp.use) {
-		let page = this.optUp.page;
-		this.prePageNum = page.num; // 缓存重置前的页码,加载失败可退回
-		this.prePageTime = page.time; // 缓存重置前的时间,加载失败可退回
-		page.num = this.startNum; // 重置为第一页
-		page.time = null; // 重置时间为空
-		if (!this.isDownScrolling && isShowLoading !== false) { // 如果不是下拉刷新触发的resetUpScroll并且不配置列表静默更新,则显示进度;
-			if (isShowLoading == null) {
-				this.removeEmpty(); // 移除空布局
-				this.showUpScroll(); // 不传参,默认显示上拉加载的进度布局
-			} else {
-				this.showDownScroll(); // 传true,显示下拉刷新的进度布局,不清空列表
-			}
-		}
-		this.isUpAutoLoad = true; // 标记上拉已经自动执行过,避免初始化时多次触发上拉回调
-		this.num = page.num; // 把最新的页数赋值在mescroll上,避免对page的影响
-		this.size = page.size; // 把最新的页码赋值在mescroll上,避免对page的影响
-		this.time = page.time; // 把最新的页码赋值在mescroll上,避免对page的影响
-		this.optUp.callback && this.optUp.callback(this); // 执行上拉回调
-	}
-}
-
-/* 设置page.num的值 */
-MeScroll.prototype.setPageNum = function(num) {
-	this.optUp.page.num = num - 1;
-}
-
-/* 设置page.size的值 */
-MeScroll.prototype.setPageSize = function(size) {
-	this.optUp.page.size = size;
-}
-
-/* 联网回调成功,结束下拉刷新和上拉加载
- * dataSize: 当前页的数据量(必传)
- * totalPage: 总页数(必传)
- * systime: 服务器时间 (可空)
- */
-MeScroll.prototype.endByPage = function(dataSize, totalPage, systime) {
-	let hasNext;
-	if (this.optUp.use && totalPage != null) hasNext = this.optUp.page.num < totalPage; // 是否还有下一页
-	this.endSuccess(dataSize, hasNext, systime);
-}
-
-/* 联网回调成功,结束下拉刷新和上拉加载
- * dataSize: 当前页的数据量(必传)
- * totalSize: 列表所有数据总数量(必传)
- * systime: 服务器时间 (可空)
- */
-MeScroll.prototype.endBySize = function(dataSize, totalSize, systime) {
-	let hasNext;
-	if (this.optUp.use && totalSize != null) {
-		let loadSize = (this.optUp.page.num - 1) * this.optUp.page.size + dataSize; // 已加载的数据总数
-		hasNext = loadSize < totalSize; // 是否还有下一页
-	}
-	this.endSuccess(dataSize, hasNext, systime);
-}
-
-/* 联网回调成功,结束下拉刷新和上拉加载
- * dataSize: 当前页的数据个数(不是所有页的数据总和),用于上拉加载判断是否还有下一页.如果不传,则会判断还有下一页
- * hasNext: 是否还有下一页,布尔类型;用来解决这个小问题:比如列表共有20条数据,每页加载10条,共2页.如果只根据dataSize判断,则需翻到第三页才会知道无更多数据,如果传了hasNext,则翻到第二页即可显示无更多数据.
- * systime: 服务器时间(可空);用来解决这个小问题:当准备翻下一页时,数据库新增了几条记录,此时翻下一页,前面的几条数据会和上一页的重复;这里传入了systime,那么upCallback的page.time就会有值,把page.time传给服务器,让后台过滤新加入的那几条记录
- */
-MeScroll.prototype.endSuccess = function(dataSize, hasNext, systime) {
-	let me = this;
-	// 结束下拉刷新
-	if (me.isDownScrolling) {
-		me.isDownEndSuccess = true
-		me.endDownScroll();
-	}
-
-	// 结束上拉加载
-	if (me.optUp.use) {
-		let isShowNoMore; // 是否已无更多数据
-		if (dataSize != null) {
-			let pageNum = me.optUp.page.num; // 当前页码
-			let pageSize = me.optUp.page.size; // 每页长度
-			// 如果是第一页
-			if (pageNum === 1) {
-				if (systime) me.optUp.page.time = systime; // 设置加载列表数据第一页的时间
-			}
-			if (dataSize < pageSize || hasNext === false) {
-				// 返回的数据不满一页时,则说明已无更多数据
-				me.optUp.hasNext = false;
-				if (dataSize === 0 && pageNum === 1) {
-					// 如果第一页无任何数据且配置了空布局
-					isShowNoMore = false;
-					me.showEmpty();
-				} else {
-					// 总列表数少于配置的数量,则不显示无更多数据
-					let allDataSize = (pageNum - 1) * pageSize + dataSize;
-					if (allDataSize < me.optUp.noMoreSize) {
-						isShowNoMore = false;
-					} else {
-						isShowNoMore = true;
-					}
-					me.removeEmpty(); // 移除空布局
-				}
-			} else {
-				// 还有下一页
-				isShowNoMore = false;
-				me.optUp.hasNext = true;
-				me.removeEmpty(); // 移除空布局
-			}
-		}
-
-		// 隐藏上拉
-		me.endUpScroll(isShowNoMore);
-	}
-}
-
-/* 回调失败,结束下拉刷新和上拉加载 */
-MeScroll.prototype.endErr = function(errDistance) {
-	// 结束下拉,回调失败重置回原来的页码和时间
-	if (this.isDownScrolling) {
-		this.isDownEndSuccess = false
-		let page = this.optUp.page;
-		if (page && this.prePageNum) {
-			page.num = this.prePageNum;
-			page.time = this.prePageTime;
-		}
-		this.endDownScroll();
-	}
-	// 结束上拉,回调失败重置回原来的页码
-	if (this.isUpScrolling) {
-		this.optUp.page.num--;
-		this.endUpScroll(false);
-		// 如果是mescroll-body,则需往回滚一定距离
-		if(this.isScrollBody && errDistance !== 0){ // 不处理0
-			if(!errDistance) errDistance = this.optUp.errDistance; // 不传,则取默认
-			this.scrollTo(this.getScrollTop() - errDistance, 0) // 往上回滚的距离
-		}
-	}
-}
-
-/* 显示空布局 */
-MeScroll.prototype.showEmpty = function() {
-	this.optUp.empty.use && this.optUp.empty.onShow && this.optUp.empty.onShow(true)
-}
-
-/* 移除空布局 */
-MeScroll.prototype.removeEmpty = function() {
-	this.optUp.empty.use && this.optUp.empty.onShow && this.optUp.empty.onShow(false)
-}
-
-/* 显示回到顶部的按钮 */
-MeScroll.prototype.showTopBtn = function() {
-	if (!this.topBtnShow) {
-		this.topBtnShow = true;
-		this.optUp.toTop.onShow && this.optUp.toTop.onShow(true);
-	}
-}
-
-/* 隐藏回到顶部的按钮 */
-MeScroll.prototype.hideTopBtn = function() {
-	if (this.topBtnShow) {
-		this.topBtnShow = false;
-		this.optUp.toTop.onShow && this.optUp.toTop.onShow(false);
-	}
-}
-
-/* 获取滚动条的位置 */
-MeScroll.prototype.getScrollTop = function() {
-	return this.scrollTop || 0
-}
-
-/* 记录滚动条的位置 */
-MeScroll.prototype.setScrollTop = function(y) {
-	this.scrollTop = y;
-}
-
-/* 滚动到指定位置 */
-MeScroll.prototype.scrollTo = function(y, t) {
-	this.myScrollTo && this.myScrollTo(y, t) // scrollview需自定义回到顶部方法
-}
-
-/* 自定义scrollTo */
-MeScroll.prototype.resetScrollTo = function(myScrollTo) {
-	this.myScrollTo = myScrollTo
-}
-
-/* 滚动条到底部的距离 */
-MeScroll.prototype.getScrollBottom = function() {
-	return this.getScrollHeight() - this.getClientHeight() - this.getScrollTop()
-}
-
-/* 计步器
- star: 开始值
- end: 结束值
- callback(step,timer): 回调step值,计步器timer,可自行通过window.clearInterval(timer)结束计步器;
- t: 计步时长,传0则直接回调end值;不传则默认300ms
- rate: 周期;不传则默认30ms计步一次
- * */
-MeScroll.prototype.getStep = function(star, end, callback, t, rate) {
-	let diff = end - star; // 差值
-	if (t === 0 || diff === 0) {
-		callback && callback(end);
-		return;
-	}
-	t = t || 300; // 时长 300ms
-	rate = rate || 30; // 周期 30ms
-	let count = t / rate; // 次数
-	let step = diff / count; // 步长
-	let i = 0; // 计数
-	let timer = setInterval(function() {
-		if (i < count - 1) {
-			star += step;
-			callback && callback(star, timer);
-			i++;
-		} else {
-			callback && callback(end, timer); // 最后一次直接设置end,避免计算误差
-			clearInterval(timer);
-		}
-	}, rate);
-}
-
-/* 滚动容器的高度 */
-MeScroll.prototype.getClientHeight = function(isReal) {
-	let h = this.clientHeight || 0
-	if (h === 0 && isReal !== true) { // 未获取到容器的高度,可临时取body的高度 (可能会有误差)
-		h = this.getBodyHeight()
-	}
-	return h
-}
-MeScroll.prototype.setClientHeight = function(h) {
-	this.clientHeight = h;
-}
-
-/* 滚动内容的高度 */
-MeScroll.prototype.getScrollHeight = function() {
-	return this.scrollHeight || 0;
-}
-MeScroll.prototype.setScrollHeight = function(h) {
-	this.scrollHeight = h;
-}
-
-/* body的高度 */
-MeScroll.prototype.getBodyHeight = function() {
-	return this.bodyHeight || 0;
-}
-MeScroll.prototype.setBodyHeight = function(h) {
-	this.bodyHeight = h;
-}
-
-/* 阻止浏览器默认滚动事件 */
-MeScroll.prototype.preventDefault = function(e) {
-	// 小程序不支持e.preventDefault, 已在wxs中禁止
-	// app的bounce只能通过配置pages.json的style.app-plus.bounce为"none"来禁止, 或使用renderjs禁止
-	// cancelable:是否可以被禁用; defaultPrevented:是否已经被禁用
-	if (e && e.cancelable && !e.defaultPrevented) e.preventDefault()
-}

+ 0 - 480
node_modules/mescroll-uni/mescroll-uni.vue

@@ -1,480 +0,0 @@
-<template>
-	<view class="mescroll-uni-warp">
-		<scroll-view :id="viewId" class="mescroll-uni" :class="{'mescroll-uni-fixed':isFixed}" :style="{'height':scrollHeight,'padding-top':padTop,'padding-bottom':padBottom,'top':fixedTop,'bottom':fixedBottom}" :scroll-top="scrollTop" :scroll-with-animation="scrollAnim" @scroll="scroll" :scroll-y='scrollable' :enable-back-to-top="true" :throttle="false">
-			<view class="mescroll-uni-content mescroll-render-touch"
-			@touchstart="wxsBiz.touchstartEvent" 
-			@touchmove="wxsBiz.touchmoveEvent" 
-			@touchend="wxsBiz.touchendEvent" 
-			@touchcancel="wxsBiz.touchendEvent"
-			:change:prop="wxsBiz.propObserver"
-			:prop="wxsProp">
-				<!-- 状态栏 -->
-				<view v-if="topbar&&statusBarHeight" class="mescroll-topbar" :style="{height: statusBarHeight+'px', background: topbar}"></view>
-		
-				<view class="mescroll-wxs-content" :style="{'transform': translateY, 'transition': transition}" :change:prop="wxsBiz.callObserver" :prop="callProp">
-					<!-- 下拉加载区域 (支付宝小程序子组件传参给子子组件仍报单项数据流的异常,暂时不通过mescroll-down组件实现)-->
-					<!-- <mescroll-down :option="mescroll.optDown" :type="downLoadType" :rate="downRate"></mescroll-down> -->
-					<view v-if="mescroll.optDown.use" class="mescroll-downwarp" :style="{'background':mescroll.optDown.bgColor,'color':mescroll.optDown.textColor}">
-						<view class="downwarp-content">
-							<view class="downwarp-progress mescroll-wxs-progress" :class="{'mescroll-rotate': isDownLoading}" :style="{'border-color':mescroll.optDown.textColor, 'transform': downRotate}"></view>
-							<view class="downwarp-tip">{{downText}}</view>
-						</view>
-					</view>
-
-					<!-- 列表内容 -->
-					<slot></slot>
-
-					<!-- 空布局 -->
-					<mescroll-empty v-if="isShowEmpty" :option="mescroll.optUp.empty" @emptyclick="emptyClick"></mescroll-empty>
-
-					<!-- 上拉加载区域 (下拉刷新时不显示, 支付宝小程序子组件传参给子子组件仍报单项数据流的异常,暂时不通过mescroll-up组件实现)-->
-					<!-- <mescroll-up v-if="mescroll.optUp.use && !isDownLoading && upLoadType!==3" :option="mescroll.optUp" :type="upLoadType"></mescroll-up> -->
-					<view v-if="mescroll.optUp.use && !isDownLoading && upLoadType!==3" class="mescroll-upwarp" :style="{'background':mescroll.optUp.bgColor,'color':mescroll.optUp.textColor}">
-						<!-- 加载中 (此处不能用v-if,否则android小程序快速上拉可能会不断触发上拉回调) -->
-						<view v-show="upLoadType===1">
-							<view class="upwarp-progress mescroll-rotate" :style="{'border-color':mescroll.optUp.textColor}"></view>
-							<view class="upwarp-tip">{{ mescroll.optUp.textLoading }}</view>
-						</view>
-						<!-- 无数据 -->
-						<view v-if="upLoadType===2" class="upwarp-nodata">{{ mescroll.optUp.textNoMore }}</view>
-					</view>
-				</view>
-			
-				<!-- 底部是否偏移TabBar的高度(默认仅在H5端的tab页生效) -->
-				<!-- #ifdef H5 -->
-				<view v-if="bottombar && windowBottom>0" class="mescroll-bottombar" :style="{height: windowBottom+'px'}"></view>
-				<!-- #endif -->
-				
-				<!-- 适配iPhoneX -->
-				<view v-if="safearea" class="mescroll-safearea"></view>
-			</view>
-		</scroll-view>
-
-		<!-- 回到顶部按钮 (fixed元素,需写在scroll-view外面,防止滚动的时候抖动)-->
-		<mescroll-top v-model="isShowToTop" :option="mescroll.optUp.toTop" @click="toTopClick"></mescroll-top>
-		
-		<!-- #ifdef MP-WEIXIN || MP-QQ || APP-PLUS || H5 -->
-		<!-- renderjs的数据载体,不可写在mescroll-downwarp内部,避免use为false时,载体丢失,无法更新数据 -->
-		<view :change:prop="renderBiz.propObserver" :prop="wxsProp"></view>
-		<!-- #endif -->
-	</view>
-</template>
-
-<!-- 微信小程序, QQ小程序, app, h5使用wxs -->
-<!-- #ifdef MP-WEIXIN || MP-QQ || APP-PLUS || H5 -->
-<script src="./wxs/wxs.wxs" module="wxsBiz" lang="wxs"></script>
-<!-- #endif -->
-
-<!-- app, h5使用renderjs -->
-<!-- #ifdef APP-PLUS || H5 -->
-<script module="renderBiz" lang="renderjs">
-	import renderBiz from './wxs/renderjs.js';
-	export default {
-		mixins:[renderBiz]
-	}
-</script>
-<!-- #endif -->
-
-<script>
-	// 引入mescroll-uni.js,处理核心逻辑
-	import MeScroll from './mescroll-uni.js';
-	// 引入全局配置
-	import GlobalOption from './mescroll-uni-option.js';
-	// 引入空布局组件
-	import MescrollEmpty from './components/mescroll-empty.vue';
-	// 引入国际化工具类
-	import mescrollI18n from './mescroll-i18n.js';
-	// 引入回到顶部组件
-	import MescrollTop from './components/mescroll-top.vue';
-	// 引入兼容wxs(含renderjs)写法的mixins
-	import WxsMixin from './wxs/mixins.js';
-	
-	/**
-	 * mescroll-uni 嵌在页面某个区域的下拉刷新和上拉加载组件, 如嵌在弹窗,浮层,swiper中...
-	 * @property {Object} down 下拉刷新的参数配置
-	 * @property {Object} up 上拉加载的参数配置
-	 * @property {Object} i18n 国际化的参数配置
-	 * @property {String, Number} top 下拉布局往下的偏移量 (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx, 百分比则相对于windowHeight)
-	 * @property {Boolean, String} topbar 偏移量top是否加上状态栏高度, 默认false (使用场景:取消原生导航栏时,配置此项可留出状态栏的占位, 支持传入字符串背景,如色值,背景图,渐变)
-	 * @property {String, Number} bottom 上拉布局往上的偏移量 (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx, 百分比则相对于windowHeight)
-	 * @property {Boolean} safearea 偏移量bottom是否加上底部安全区的距离, 默认false (需要适配iPhoneX时使用)
-	 * @property {Boolean} fixed 是否通过fixed固定mescroll的高度, 默认true
-	 * @property {String, Number} height 指定mescroll的高度, 此项有值,则不使用fixed. (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx, 百分比则相对于windowHeight)
-	 * @property {Boolean} bottombar 底部是否偏移TabBar的高度 (仅在H5端的tab页生效)
-	 * @property {Boolean} disableScroll 是否禁止滚动, 默认false
-	 * @event {Function} init 初始化完成的回调 
-	 * @event {Function} down 下拉刷新的回调
-	 * @event {Function} up 上拉加载的回调 
-	 * @event {Function} emptyclick 点击empty配置的btnText按钮回调
-	 * @event {Function} topclick 点击回到顶部的按钮回调
-	 * @event {Function} scroll 滚动监听 (需在 up 配置 onScroll:true 才生效)
-	 * @example <mescroll-uni ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback"> ... </mescroll-uni>
-	 */
-	export default {
-		name: 'mescroll-uni',
-		mixins: [WxsMixin],
-		components: {
-			MescrollEmpty,
-			MescrollTop
-		},
-		props: {
-			down: Object,
-			up: Object,
-			i18n: Object,
-			top: [String, Number],
-			topbar: [Boolean, String],
-			bottom: [String, Number],
-			safearea: Boolean,
-			fixed: {
-				type: Boolean,
-				default: true
-			},
-			height: [String, Number],
-			bottombar:{
-				type: Boolean,
-				default: true
-			},
-			disableScroll: Boolean
-		},
-		data() {
-			return {
-				mescroll: {optDown:{},optUp:{}}, // mescroll实例
-				viewId: 'id_' + Math.random().toString(36).substr(2,16), // 随机生成mescroll的id(不能数字开头,否则找不到元素)
-				downHight: 0, //下拉刷新: 容器高度
-				downRate: 0, // 下拉比率(inOffset: rate<1; outOffset: rate>=1)
-				downLoadType: 0, // 下拉刷新状态: 0(loading前), 1(inOffset), 2(outOffset), 3(showLoading), 4(endDownScroll)
-				upLoadType: 0, // 上拉加载状态: 0(loading前), 1loading中, 2没有更多了,显示END文本提示, 3(没有更多了,不显示END文本提示)
-				isShowEmpty: false, // 是否显示空布局
-				isShowToTop: false, // 是否显示回到顶部按钮
-				scrollTop: 0, // 滚动条的位置
-				scrollAnim: false, // 是否开启滚动动画
-				windowTop: 0, // 可使用窗口的顶部位置
-				windowBottom: 0, // 可使用窗口的底部位置
-				windowHeight: 0, // 可使用窗口的高度
-				statusBarHeight: 0 // 状态栏高度
-			}
-		},
-		computed: {
-			// 是否使用fixed定位 (当height有值,则不使用)
-			isFixed(){
-				return !this.height && this.fixed
-			},
-			// mescroll的高度
-			scrollHeight(){
-				if (this.isFixed) {
-					return "auto"
-				} else if(this.height){
-					return this.toPx(this.height) + 'px'
-				}else{
-					return "100%"
-				}
-			},
-			// 下拉布局往下偏移的距离 (px)
-			numTop() {
-				return this.toPx(this.top)
-			},
-			fixedTop() {
-				return this.isFixed ? (this.numTop + this.windowTop) + 'px' : 0
-			},
-			padTop() {
-				return !this.isFixed ? this.numTop + 'px' : 0
-			},
-			// 上拉布局往上偏移 (px)
-			numBottom() {
-				return this.toPx(this.bottom)
-			},
-			fixedBottom() {
-				return this.isFixed ? (this.numBottom + this.windowBottom) + 'px' : 0
-			},
-			padBottom() {
-				return !this.isFixed ? this.numBottom + 'px' : 0
-			},
-			// 是否为重置下拉的状态
-			isDownReset(){
-				return this.downLoadType===3 || this.downLoadType===4
-			},
-			// 过渡
-			transition() {
-				return this.isDownReset ? 'transform 300ms' : '';
-			},
-			translateY() {
-				return this.downHight > 0 ? 'translateY(' + this.downHight + 'px)' : ''; // transform会使fixed失效,需注意把fixed元素写在mescroll之外
-			},
-			// 列表是否可滑动
-			scrollable(){
-				if(this.disableScroll) return false
-				return this.downLoadType===0 || this.isDownReset
-			},
-			// 是否在加载中
-			isDownLoading(){
-				return this.downLoadType === 3
-			},
-			// 旋转的角度
-			downRotate(){
-				return 'rotate(' + 360 * this.downRate + 'deg)'
-			},
-			// 文本提示
-			downText(){
-				if(!this.mescroll) return ""; // 避免头条小程序初始化时报错
-				switch (this.downLoadType){
-					case 1: return this.mescroll.optDown.textInOffset;
-					case 2: return this.mescroll.optDown.textOutOffset;
-					case 3: return this.mescroll.optDown.textLoading;
-					case 4: return this.mescroll.isDownEndSuccess ? this.mescroll.optDown.textSuccess : this.mescroll.isDownEndSuccess==false ? this.mescroll.optDown.textErr : this.mescroll.optDown.textInOffset;
-					default: return this.mescroll.optDown.textInOffset;
-				}
-			}
-		},
-		methods: {
-			//number,rpx,upx,px,% --> px的数值
-			toPx(num){
-				if(typeof num === "string"){
-					if (num.indexOf('px') !== -1) {
-						if(num.indexOf('rpx') !== -1) { // "10rpx"
-							num = num.replace('rpx', '');
-						} else if(num.indexOf('upx') !== -1) { // "10upx"
-							num = num.replace('upx', '');
-						} else { // "10px"
-							return Number(num.replace('px', ''))
-						}
-					}else if (num.indexOf('%') !== -1){
-						// 传百分比,则相对于windowHeight,传"10%"则等于windowHeight的10%
-						let rate = Number(num.replace("%","")) / 100
-						return this.windowHeight * rate
-					}
-				}
-				return num ? uni.upx2px(Number(num)) : 0
-			},
-			//注册列表滚动事件,用于下拉刷新和上拉加载
-			scroll(e) {
-				this.mescroll.scroll(e.detail, () => {
-					this.$emit('scroll', this.mescroll) // 此时可直接通过 this.mescroll.scrollTop获取滚动条位置; this.mescroll.isScrollUp获取是否向上滑动
-				})
-			},
-			// 点击空布局的按钮回调
-			emptyClick() {
-				this.$emit('emptyclick', this.mescroll)
-			},
-			// 点击回到顶部的按钮回调
-			toTopClick() {
-				this.mescroll.scrollTo(0, this.mescroll.optUp.toTop.duration); // 执行回到顶部
-				this.$emit('topclick', this.mescroll); // 派发点击回到顶部按钮的回调
-			},
-			// 更新滚动区域的高度 (使内容不满屏和到底,都可继续翻页)
-			setClientHeight() {
-				if (this.mescroll.getClientHeight(true) === 0 && !this.isExec) {
-					this.isExec = true; // 避免多次获取
-					this.$nextTick(() => { // 确保dom已渲染
-						this.getClientInfo(data=>{
-							this.isExec = false;
-							if (data) {
-								this.mescroll.setClientHeight(data.height);
-							} else if (this.clientNum != 3) { // 极少部分情况,可能dom还未渲染完毕,递归获取,最多重试3次
-								this.clientNum = this.clientNum == null ? 1 : this.clientNum + 1;
-								setTimeout(() => {
-									this.setClientHeight()
-								}, this.clientNum * 100)
-							}
-						})
-					})
-				}
-			},
-			// 获取滚动区域的信息
-			getClientInfo(success){
-				let query = uni.createSelectorQuery();
-				// #ifndef MP-ALIPAY || MP-DINGTALK
-				query = query.in(this) // 支付宝小程序不支持in(this),而字节跳动小程序必须写in(this), 否则都取不到值
-				// #endif
-				let view = query.select('#' + this.viewId);
-				view.boundingClientRect(data => {
-					success(data)
-				}).exec();
-			}
-		},
-		// 使用created初始化mescroll对象; 如果用mounted部分css样式编译到H5会失效
-		created() {
-			let vm = this;
-
-			let diyOption = {
-				// 下拉刷新的配置
-				down: {
-					inOffset() {
-						vm.downLoadType = 1; // 下拉的距离进入offset范围内那一刻的回调 (自定义mescroll组件时,此行不可删)
-					},
-					outOffset() {
-						vm.downLoadType = 2; // 下拉的距离大于offset那一刻的回调 (自定义mescroll组件时,此行不可删)
-					},
-					onMoving(mescroll, rate, downHight) {
-						// 下拉过程中的回调,滑动过程一直在执行;
-						vm.downHight = downHight; // 设置下拉区域的高度 (自定义mescroll组件时,此行不可删)
-						vm.downRate = rate; //下拉比率 (inOffset: rate<1; outOffset: rate>=1)
-					},
-					showLoading(mescroll, downHight) {
-						vm.downLoadType = 3; // 显示下拉刷新进度的回调 (自定义mescroll组件时,此行不可删)
-						vm.downHight = downHight; // 设置下拉区域的高度 (自定义mescroll组件时,此行不可删)
-					},
-					beforeEndDownScroll(mescroll){
-						vm.downLoadType = 4; 
-						return mescroll.optDown.beforeEndDelay // 延时结束的时长
-					},
-					endDownScroll() {
-						vm.downLoadType = 4; // 结束下拉 (自定义mescroll组件时,此行不可删)
-						vm.downHight = 0; // 设置下拉区域的高度 (自定义mescroll组件时,此行不可删)
-						vm.downResetTimer && clearTimeout(vm.downResetTimer)
-						vm.downResetTimer = setTimeout(()=>{ // 过渡动画执行完毕后,需重置为0的状态,以便置空this.transition,避免iOS小程序列表渲染不完整
-							if(vm.downLoadType===4) vm.downLoadType = 0
-						},300)
-					},
-					// 派发下拉刷新的回调
-					callback: function(mescroll) {
-						vm.$emit('down', mescroll)
-					}
-				},
-				// 上拉加载的配置
-				up: {
-					// 显示加载中的回调
-					showLoading() {
-						vm.upLoadType = 1;
-					},
-					// 显示无更多数据的回调
-					showNoMore() {
-						vm.upLoadType = 2;
-					},
-					// 隐藏上拉加载的回调
-					hideUpScroll(mescroll) {
-						vm.upLoadType = mescroll.optUp.hasNext ? 0 : 3;
-					},
-					// 空布局
-					empty: {
-						onShow(isShow) { // 显示隐藏的回调
-							vm.isShowEmpty = isShow;
-						}
-					},
-					// 回到顶部
-					toTop: {
-						onShow(isShow) { // 显示隐藏的回调
-							vm.isShowToTop = isShow;
-						}
-					},
-					// 派发上拉加载的回调
-					callback: function(mescroll) {
-						vm.$emit('up', mescroll);
-						// 更新容器的高度 (多mescroll的情况)
-						vm.setClientHeight()
-					}
-				}
-			}
-
-			let i18nType = mescrollI18n.getType() // 当前语言类型
-			let i18nOption = {type: i18nType} // 国际化配置
-			MeScroll.extend(i18nOption, vm.i18n) // 具体页面的国际化配置
-			MeScroll.extend(i18nOption, GlobalOption.i18n) // 全局的国际化配置
-			MeScroll.extend(diyOption, i18nOption[i18nType]); // 混入国际化配置
-			MeScroll.extend(diyOption, {down:GlobalOption.down, up:GlobalOption.up}); // 混入全局的配置
-			let myOption = JSON.parse(JSON.stringify({'down': vm.down,'up': vm.up})) // 深拷贝,避免对props的影响
-			MeScroll.extend(myOption, diyOption); // 混入具体界面的配置
-
-			// 初始化MeScroll对象
-			vm.mescroll = new MeScroll(myOption);
-			vm.mescroll.viewId = vm.viewId; // 附带id
-			vm.mescroll.i18n = i18nOption; // 挂载语言包
-			// init回调mescroll对象
-			vm.$emit('init', vm.mescroll);
-			
-			// 设置高度
-			const sys = uni.getSystemInfoSync();
-			if(sys.windowTop) vm.windowTop = sys.windowTop;
-			if(sys.windowBottom) vm.windowBottom = sys.windowBottom;
-			if(sys.windowHeight) vm.windowHeight = sys.windowHeight;
-			if(sys.statusBarHeight) vm.statusBarHeight = sys.statusBarHeight;
-			// 使down的bottomOffset生效
-			vm.mescroll.setBodyHeight(sys.windowHeight);
-
-			// 因为使用的是scrollview,这里需自定义scrollTo
-			vm.mescroll.resetScrollTo((y, t) => {
-				vm.scrollAnim = (t !== 0); // t为0,则不使用动画过渡
-				if(typeof y === 'string'){
-					// 小程序不支持slot里面的scroll-into-view, 统一使用计算的方式实现
-					vm.getClientInfo(function(rect){
-						let mescrollTop = rect.top // mescroll到顶部的距离
-						let selector;
-						if(y.indexOf('#')==-1 && y.indexOf('.')==-1){
-							selector = '#'+y // 不带#和. 则默认为id选择器
-						}else{
-							selector = y
-							// #ifdef APP-PLUS || H5 || MP-ALIPAY || MP-DINGTALK
-							if(y.indexOf('>>>')!=-1){ // 不支持跨自定义组件的后代选择器 (转为普通的选择器即可跨组件查询)
-								selector = y.split('>>>')[1].trim()
-							}
-							// #endif
-						}
-						uni.createSelectorQuery().select(selector).boundingClientRect(function(rect){
-							if (rect) {
-								let curY = vm.mescroll.getScrollTop()
-								let top = rect.top - mescrollTop
-								top += curY
-								if(!vm.isFixed) top -= vm.numTop
-								vm.scrollTop = curY;
-								vm.$nextTick(function() {
-									vm.scrollTop = top
-								})
-							} else{
-								console.error(selector + ' does not exist');
-							}
-						}).exec()
-					})
-					return;
-				}
-				let curY = vm.mescroll.getScrollTop()
-				if (t === 0 || t === 300) { // 当t使用默认配置的300时,则使用系统自带的动画过渡
-					vm.scrollTop = curY;
-					vm.$nextTick(function() {
-						vm.scrollTop = y
-					})
-				} else {
-					vm.mescroll.getStep(curY, y, step => { // 此写法可支持配置t
-						vm.scrollTop = step
-					}, t)
-				}
-			})
-			
-			// 具体的界面如果不配置up.toTop.safearea,则取本vue的safearea值
-			if (vm.up && vm.up.toTop && vm.up.toTop.safearea != null) {} else {
-				vm.mescroll.optUp.toTop.safearea = vm.safearea;
-			}
-			
-			// 全局配置监听
-			uni.$on("setMescrollGlobalOption", options=>{
-				if(!options) return;
-				let i18nType = options.i18n ? options.i18n.type : null
-				if(i18nType && vm.mescroll.i18n.type != i18nType){
-					vm.mescroll.i18n.type = i18nType
-					mescrollI18n.setType(i18nType)
-					MeScroll.extend(options, vm.mescroll.i18n[i18nType])
-				}
-				if(options.down){
-					let down = MeScroll.extend({}, options.down)
-					vm.mescroll.optDown = MeScroll.extend(down, vm.mescroll.optDown)
-				}
-				if(options.up){
-					let up = MeScroll.extend({}, options.up)
-					vm.mescroll.optUp = MeScroll.extend(up, vm.mescroll.optUp)
-				}
-			})
-		},
-		mounted() {
-			// 设置容器的高度
-			this.setClientHeight()
-		},
-		destroyed() {
-			// 注销全局配置监听
-			uni.$off("setMescrollGlobalOption")
-		}
-	}
-</script>
-
-<style>
-	@import "./mescroll-uni.css";
-	@import "./components/mescroll-down.css";
-	@import './components/mescroll-up.css';
-</style>

+ 0 - 47
node_modules/mescroll-uni/mixins/mescroll-comp.js

@@ -1,47 +0,0 @@
-/**
- * mescroll-body写在子组件时,需通过mescroll的mixins补充子组件缺少的生命周期
- */
-const MescrollCompMixin = {
-	// 因为子组件无onPageScroll和onReachBottom的页面生命周期,需在页面传递进到子组件 (一级)
-	onPageScroll(e) {
-		this.handlePageScroll(e)
-	},
-	onReachBottom() {
-		this.handleReachBottom()
-	},
-	// 当down的native: true时, 还需传递此方法进到子组件
-	onPullDownRefresh(){
-		this.handlePullDownRefresh()
-	},
-	data() {
-		return {
-			mescroll: { // mescroll-body写在子子子...组件的情况 (多级)
-				onPageScroll: e=>{
-					this.handlePageScroll(e)
-				},
-				onReachBottom: ()=>{
-					this.handleReachBottom()
-				},
-				onPullDownRefresh: ()=>{
-					this.handlePullDownRefresh()
-				}
-			}
-		}
-	},
-	methods:{
-		handlePageScroll(e){
-			let item = this.$refs["mescrollItem"];
-			if(item && item.mescroll) item.mescroll.onPageScroll(e);
-		},
-		handleReachBottom(){
-			let item = this.$refs["mescrollItem"];
-			if(item && item.mescroll) item.mescroll.onReachBottom();
-		},
-		handlePullDownRefresh(){
-			let item = this.$refs["mescrollItem"];
-			if(item && item.mescroll) item.mescroll.onPullDownRefresh();
-		}
-	}
-}
-
-export default MescrollCompMixin;

+ 0 - 66
node_modules/mescroll-uni/mixins/mescroll-more-item.js

@@ -1,66 +0,0 @@
-/**
- * mescroll-more-item的mixins, 仅在多个 mescroll-body 写在子组件时使用 (参考 mescroll-more 案例)
- */
-const MescrollMoreItemMixin = {
-	// 支付宝小程序不支持props的mixin,需写在具体的页面中
-	// #ifndef MP-ALIPAY || MP-DINGTALK
-	props:{
-		i: Number, // 每个tab页的专属下标
-		index: { // 当前tab的下标
-			type: Number,
-			default(){
-				return 0
-			}
-		}
-	},
-	// #endif
-	data() {
-		return {
-			downOption:{
-				auto:false // 不自动加载
-			},
-			upOption:{
-				auto:false // 不自动加载
-			},
-			isInit: false // 当前tab是否已初始化
-		}
-	},
-	watch:{
-		// 监听下标的变化
-		index(val){
-			if (this.i === val && !this.isInit) this.mescrollTrigger()
-		}
-	},
-	methods: {
-		// 以ref的方式初始化mescroll对象 (兼容字节跳动小程序)
-		mescrollInitByRef() {
-			if(!this.mescroll || !this.mescroll.resetUpScroll){
-				// 字节跳动小程序编辑器不支持一个页面存在相同的ref, 多mescroll的ref需动态生成, 格式为'mescrollRef下标'
-				let mescrollRef = this.$refs.mescrollRef || this.$refs['mescrollRef'+this.i];
-				if(mescrollRef) this.mescroll = mescrollRef.mescroll
-			}
-		},
-		// mescroll组件初始化的回调,可获取到mescroll对象 (覆盖mescroll-mixins.js的mescrollInit, 为了标记isInit)
-		mescrollInit(mescroll) {
-			this.mescroll = mescroll;
-			this.mescrollInitByRef && this.mescrollInitByRef(); // 兼容字节跳动小程序
-			// 自动加载当前tab的数据
-			if(this.i === this.index){
-				this.mescrollTrigger()
-			}
-		},
-		// 主动触发加载
-		mescrollTrigger(){
-			this.isInit = true; // 标记为true
-			if (this.mescroll) {
-				if (this.mescroll.optDown.use) {
-					this.mescroll.triggerDownScroll();
-				} else{
-					this.mescroll.triggerUpScroll();
-				}
-			}
-		}
-	}
-}
-
-export default MescrollMoreItemMixin;

+ 0 - 74
node_modules/mescroll-uni/mixins/mescroll-more.js

@@ -1,74 +0,0 @@
-/**
- * mescroll-body写在子组件时, 需通过mescroll的mixins补充子组件缺少的生命周期
- */
-const MescrollMoreMixin = {
-	data() {
-		return {
-			tabIndex: 0, // 当前tab下标
-			mescroll: { // mescroll-body写在子子子...组件的情况 (多级)
-				onPageScroll: e=>{
-					this.handlePageScroll(e)
-				},
-				onReachBottom: ()=>{
-					this.handleReachBottom()
-				},
-				onPullDownRefresh: ()=>{
-					this.handlePullDownRefresh()
-				}
-			}
-		}
-	},
-	// 因为子组件无onPageScroll和onReachBottom的页面生命周期,需在页面传递进到子组件
-	onPageScroll(e) {
-		this.handlePageScroll(e)
-	},
-	onReachBottom() {
-		this.handleReachBottom()
-	},
-	// 当down的native: true时, 还需传递此方法进到子组件
-	onPullDownRefresh(){
-		this.handlePullDownRefresh()
-	},
-	methods:{
-		handlePageScroll(e){
-			let mescroll = this.getMescroll(this.tabIndex);
-			mescroll && mescroll.onPageScroll(e);
-		},
-		handleReachBottom(){
-			let mescroll = this.getMescroll(this.tabIndex);
-			mescroll && mescroll.onReachBottom();
-		},
-		handlePullDownRefresh(){
-			let mescroll = this.getMescroll(this.tabIndex);
-			mescroll && mescroll.onPullDownRefresh();
-		},
-		// 根据下标获取对应子组件的mescroll
-		getMescroll(i){
-			if(!this.mescrollItems) this.mescrollItems = [];
-			if(!this.mescrollItems[i]) {
-				// v-for中的refs
-				let vForItem = this.$refs["mescrollItem"];
-				if(vForItem){
-					this.mescrollItems[i] = vForItem[i]
-				}else{
-					// 普通的refs,不可重复
-					this.mescrollItems[i] = this.$refs["mescrollItem"+i];
-				}
-			}
-			let item = this.mescrollItems[i]
-			return item ? item.mescroll : null
-		},
-		// 切换tab,恢复滚动条位置
-		tabChange(i){
-			let mescroll = this.getMescroll(i);
-			if(mescroll){
-				// 延时(比$nextTick靠谱一些),确保元素已渲染
-				setTimeout(()=>{
-					mescroll.scrollTo(mescroll.getScrollTop(),0)
-				},30)
-			}
-		}
-	}
-}
-
-export default MescrollMoreMixin;

+ 0 - 39
node_modules/mescroll-uni/package.json

@@ -1,39 +0,0 @@
-{
-  "_from": "mescroll-uni",
-  "_id": "mescroll-uni@1.3.7",
-  "_inBundle": false,
-  "_integrity": "sha512-1pQMtGA+iVRKhfJZZNXdBx05NnthIk6zm3hRbumswSA54eaKOMgpUDb9AQ2+rRdXmS6kLkEYSbW/fkb7/IyoAg==",
-  "_location": "/mescroll-uni",
-  "_phantomChildren": {},
-  "_requested": {
-    "type": "tag",
-    "registry": true,
-    "raw": "mescroll-uni",
-    "name": "mescroll-uni",
-    "escapedName": "mescroll-uni",
-    "rawSpec": "",
-    "saveSpec": null,
-    "fetchSpec": "latest"
-  },
-  "_requiredBy": [
-    "#USER",
-    "/"
-  ],
-  "_resolved": "https://registry.npmjs.org/mescroll-uni/-/mescroll-uni-1.3.7.tgz",
-  "_shasum": "6b31114c92162315dfd2ac2e7809c2eacd15dc91",
-  "_spec": "mescroll-uni",
-  "_where": "C:\\Users\\Administrator\\Desktop\\项目\\直播\\liveH5-v3",
-  "author": {
-    "name": "wenju"
-  },
-  "bundleDependencies": false,
-  "deprecated": false,
-  "description": "mescroll的uni-app版本:【wxs+renderjs实现】高性能的下拉刷新上拉加载组件",
-  "license": "MIT",
-  "main": "mescroll-uni.vue",
-  "name": "mescroll-uni",
-  "scripts": {
-    "test": "echo \"Error: no test specified\" && exit 1"
-  },
-  "version": "1.3.7"
-}

+ 0 - 109
node_modules/mescroll-uni/wxs/mixins.js

@@ -1,109 +0,0 @@
-// 定义在wxs (含renderjs) 逻辑层的数据和方法, 与视图层相互通信
-const WxsMixin = {
-	data() {
-		return {
-			// 传入wxs视图层的数据 (响应式)
-			wxsProp: {
-				optDown:{}, // 下拉刷新的配置
-				scrollTop:0, // 滚动条的距离
-				bodyHeight:0, // body的高度
-				isDownScrolling:false, // 是否正在下拉刷新中
-				isUpScrolling:false, // 是否正在上拉加载中
-				isScrollBody:true, // 是否为mescroll-body滚动
-				isUpBoth:true, // 上拉加载时,是否同时可以下拉刷新
-				t: 0 // 数据更新的标记 (只有数据更新了,才会触发wxs的Observer)
-			},
-			
-			// 标记调用wxs视图层的方法
-			callProp: {
-				callType: '', // 方法名
-				t: 0 // 数据更新的标记 (只有数据更新了,才会触发wxs的Observer)
-			},
-			
-			// 不用wxs的平台使用此处的wxsBiz对象,抹平wxs的写法 (微信小程序和APP使用的wxsBiz对象是./wxs/wxs.wxs)
-			// #ifndef MP-WEIXIN || MP-QQ || APP-PLUS || H5
-			wxsBiz: {
-				//注册列表touchstart事件,用于下拉刷新
-				touchstartEvent: e=> {
-					this.mescroll.touchstartEvent(e);
-				},
-				//注册列表touchmove事件,用于下拉刷新
-				touchmoveEvent: e=> {
-					this.mescroll.touchmoveEvent(e);
-				},
-				//注册列表touchend事件,用于下拉刷新
-				touchendEvent: e=> {
-					this.mescroll.touchendEvent(e);
-				},
-				propObserver(){}, // 抹平wxs的写法
-				callObserver(){} // 抹平wxs的写法
-			},
-			// #endif
-			
-			// 不用renderjs的平台使用此处的renderBiz对象,抹平renderjs的写法 (app 和 h5 使用的renderBiz对象是./wxs/renderjs.js)
-			// #ifndef APP-PLUS || H5
-			renderBiz: {
-				propObserver(){} // 抹平renderjs的写法
-			}
-			// #endif
-		}
-	},
-	methods: {
-		// wxs视图层调用逻辑层的回调
-		wxsCall(msg){
-			if(msg.type === 'setWxsProp'){
-				// 更新wxsProp数据 (值改变才触发更新)
-				this.wxsProp = {
-					optDown: this.mescroll.optDown,
-					scrollTop: this.mescroll.getScrollTop(),
-					bodyHeight: this.mescroll.getBodyHeight(),
-					isDownScrolling: this.mescroll.isDownScrolling,
-					isUpScrolling: this.mescroll.isUpScrolling,
-					isUpBoth: this.mescroll.optUp.isBoth,
-					isScrollBody:this.mescroll.isScrollBody,
-					t: Date.now()
-				}
-			}else if(msg.type === 'setLoadType'){
-				// 设置inOffset,outOffset的状态
-				this.downLoadType = msg.downLoadType
-				// 状态挂载到mescroll对象, 以便在其他组件中使用, 比如<me-video>中
-				this.$set(this.mescroll, 'downLoadType', this.downLoadType)
-				// 重置是否加载成功的状态
-				this.$set(this.mescroll, 'isDownEndSuccess', null)
-			}else if(msg.type === 'triggerDownScroll'){
-				// 主动触发下拉刷新
-				this.mescroll.triggerDownScroll();
-			}else if(msg.type === 'endDownScroll'){
-				// 结束下拉刷新
-				this.mescroll.endDownScroll();
-			}else if(msg.type === 'triggerUpScroll'){
-				// 主动触发上拉加载
-				this.mescroll.triggerUpScroll(true);
-			}
-		}
-	},
-	mounted() {
-		// #ifdef MP-WEIXIN || MP-QQ || APP-PLUS || H5
-		// 配置主动触发wxs显示加载进度的回调
-		this.mescroll.optDown.afterLoading = ()=>{
-			this.callProp = {callType: "showLoading", t: Date.now()} // 触发wxs的方法 (值改变才触发更新)
-		}
-		// 配置主动触发wxs隐藏加载进度的回调
-		this.mescroll.optDown.afterEndDownScroll = ()=>{
-			this.callProp = {callType: "endDownScroll", t: Date.now()} // 触发wxs的方法 (值改变才触发更新)
-			let delay = 300 + (this.mescroll.optDown.beforeEndDelay || 0)
-			setTimeout(()=>{
-				if(this.downLoadType === 4 || this.downLoadType === 0){
-					this.callProp = {callType: "clearTransform", t: Date.now()} // 触发wxs的方法 (值改变才触发更新)
-				}
-				// 状态挂载到mescroll对象, 以便在其他组件中使用, 比如<me-video>中
-				this.$set(this.mescroll, 'downLoadType', this.downLoadType)
-			}, delay)
-		}
-		// 初始化wxs的数据
-		this.wxsCall({type: 'setWxsProp'})
-		// #endif
-	}
-}
-
-export default WxsMixin;

+ 0 - 92
node_modules/mescroll-uni/wxs/renderjs.js

@@ -1,92 +0,0 @@
-// 使用renderjs直接操作window对象,实现动态控制app和h5的bounce
-// bounce: iOS橡皮筋,Android半月弧,h5浏览器下拉背景等效果 (下拉刷新时禁止)
-// https://uniapp.dcloud.io/frame?id=renderjs
-
-// 与wxs的me实例一致
-var me = {}
-
-// 初始化window对象的touch事件 (仅初始化一次)
-if(window && !window.$mescrollRenderInit){
-	window.$mescrollRenderInit = true
-	
-	
-	window.addEventListener('touchstart', function(e){
-		if (me.disabled()) return;
-		me.startPoint = me.getPoint(e); // 记录起点
-	}, {passive: true})
-	
-	
-	window.addEventListener('touchmove', function(e){
-		if (me.disabled()) return;
-		if (me.getScrollTop() > 0) return; // 需在顶部下拉,才禁止bounce
-		
-		var curPoint = me.getPoint(e); // 当前点
-		var moveY = curPoint.y - me.startPoint.y; // 和起点比,移动的距离,大于0向下拉,小于0向上拉
-		// 向下拉
-		if (moveY > 0) {
-			// 可下拉的条件
-			if (!me.isDownScrolling && !me.optDown.isLock && (!me.isUpScrolling || (me.isUpScrolling && me.isUpBoth))) {
-				
-				// 只有touch在mescroll的view上面,才禁止bounce
-				var el = e.target;
-				var isMescrollTouch = false;
-				while (el && el.tagName && el.tagName !== 'UNI-PAGE-BODY' && el.tagName != "BODY") {
-					var cls = el.classList;
-					if (cls && cls.contains('mescroll-render-touch')) {
-						isMescrollTouch = true
-						break;
-					}
-					el = el.parentNode; // 继续检查其父元素
-				}
-				// 禁止bounce (不会对swiper和iOS侧滑返回造成影响)
-				if (isMescrollTouch && e.cancelable && !e.defaultPrevented) e.preventDefault();
-			}
-		}
-	}, {passive: false})
-}
-
-/* 获取滚动条的位置 */
-me.getScrollTop = function() {
-	return me.scrollTop || 0
-}
-
-/* 是否禁用下拉刷新 */
-me.disabled = function(){
-	return !me.optDown || !me.optDown.use || me.optDown.native
-}
-
-/* 根据点击滑动事件获取第一个手指的坐标 */
-me.getPoint = function(e) {
-	if (!e) {
-		return {x: 0,y: 0}
-	}
-	if (e.touches && e.touches[0]) {
-		return {x: e.touches[0].pageX,y: e.touches[0].pageY}
-	} else if (e.changedTouches && e.changedTouches[0]) {
-		return {x: e.changedTouches[0].pageX,y: e.changedTouches[0].pageY}
-	} else {
-		return {x: e.clientX,y: e.clientY}
-	}
-}
-
-/**
- * 监听逻辑层数据的变化 (实时更新数据)
- */
-function propObserver(wxsProp) {
-	me.optDown = wxsProp.optDown
-	me.scrollTop = wxsProp.scrollTop
-	me.isDownScrolling = wxsProp.isDownScrolling
-	me.isUpScrolling = wxsProp.isUpScrolling
-	me.isUpBoth = wxsProp.isUpBoth
-}
-
-/* 导出模块 */
-const renderBiz = {
-	data() {
-		return {
-			propObserver: propObserver,
-		}
-	}
-}
-
-export default renderBiz;

+ 0 - 268
node_modules/mescroll-uni/wxs/wxs.wxs

@@ -1,268 +0,0 @@
-// 使用wxs处理交互动画, 提高性能, 同时避免小程序bounce对下拉刷新的影响
-// https://uniapp.dcloud.io/frame?id=wxs
-// https://developers.weixin.qq.com/miniprogram/dev/framework/view/interactive-animation.html 
-
-// 模拟mescroll实例, 与mescroll.js的写法尽量保持一致
-var me = {}
-
-// ------ 自定义下拉刷新动画 start ------
-
-/* 下拉过程中的回调,滑动过程一直在执行 (rate<1为inOffset; rate>1为outOffset) */
-me.onMoving = function (ins, rate, downHight){
-	ins.requestAnimationFrame(function () {
-		ins.selectComponent('.mescroll-wxs-content').setStyle({
-			'will-change': 'transform', // 可解决下拉过程中, image和swiper脱离文档流的问题
-			'transform': 'translateY(' + downHight + 'px)',
-			'transition': ''
-		})
-		// 环形进度条
-		var progress = ins.selectComponent('.mescroll-wxs-progress')
-		progress && progress.setStyle({transform: 'rotate(' + 360 * rate + 'deg)'})
-	})
-}
-
-/* 显示下拉刷新进度 */
-me.showLoading = function (ins){
-	me.downHight = me.optDown.offset
-	ins.requestAnimationFrame(function () {
-		ins.selectComponent('.mescroll-wxs-content').setStyle({
-			'will-change': 'auto',
-			'transform': 'translateY(' + me.downHight + 'px)',
-			'transition': 'transform 300ms'
-		})
-	})
-}
-
-/* 结束下拉 */
-me.endDownScroll = function (ins){
-	me.downHight = 0;
-	me.isDownScrolling = false;
-	ins.requestAnimationFrame(function () {
-		ins.selectComponent('.mescroll-wxs-content').setStyle({
-			'will-change': 'auto',
-			'transform': 'translateY(0)', // 不可以写空串,否则scroll-view渲染不完整 (延时350ms会调clearTransform置空)
-			'transition': 'transform 300ms'
-		})
-	})
-}
-
-/* 结束下拉动画执行完毕后, 清除transform和transition, 避免对列表内容样式造成影响, 如: h5的list-msg示例下拉进度条漏出来等 */
-me.clearTransform = function (ins){
-	ins.requestAnimationFrame(function () {
-		ins.selectComponent('.mescroll-wxs-content').setStyle({
-			'will-change': '',
-			'transform': '',
-			'transition': ''
-		})
-	})
-}
-
-// ------ 自定义下拉刷新动画 end ------
-
-/**
- * 监听逻辑层数据的变化 (实时更新数据)
- */
-function propObserver(wxsProp) {
-	me.optDown = wxsProp.optDown
-	me.scrollTop = wxsProp.scrollTop
-	me.bodyHeight = wxsProp.bodyHeight
-	me.isDownScrolling = wxsProp.isDownScrolling
-	me.isUpScrolling = wxsProp.isUpScrolling
-	me.isUpBoth = wxsProp.isUpBoth
-	me.isScrollBody = wxsProp.isScrollBody
-	me.startTop = wxsProp.scrollTop // 及时更新touchstart触发的startTop, 避免scroll-view快速惯性滚动到顶部取值不准确
-}
-
-/**
- * 监听逻辑层数据的变化 (调用wxs的方法)
- */
-function callObserver(callProp, oldValue, ins) {
-	if (me.disabled()) return;
-	if(callProp.callType){
-		// 逻辑层(App Service)的style已失效,需在视图层(Webview)设置style
-		if(callProp.callType === 'showLoading'){
-			me.showLoading(ins)
-		}else if(callProp.callType === 'endDownScroll'){
-			me.endDownScroll(ins)
-		}else if(callProp.callType === 'clearTransform'){
-			me.clearTransform(ins)
-		}
-	}
-}
-
-/**
- * touch事件
- */
-function touchstartEvent(e, ins) {
-	me.downHight = 0; // 下拉的距离
-	me.startPoint = me.getPoint(e); // 记录起点
-	me.startTop = me.getScrollTop(); // 记录此时的滚动条位置
-	me.startAngle = 0; // 初始角度
-	me.lastPoint = me.startPoint; // 重置上次move的点
-	me.maxTouchmoveY = me.getBodyHeight() - me.optDown.bottomOffset; // 手指触摸的最大范围(写在touchstart避免body获取高度为0的情况)
-	me.inTouchend = false; // 标记不是touchend
-	
-	me.callMethod(ins, {type: 'setWxsProp'}) // 同步更新wxsProp的数据 (小程序是异步的,可能touchmove先执行,才到propObserver; h5和app是同步)
-}
-
-function touchmoveEvent(e, ins) {
-	var isPrevent = true // false表示不往上冒泡,相当于调用了同时调用了stopPropagation和preventDefault (对小程序生效, h5和app无效)
-	
-	if (me.disabled()) return isPrevent;
-	
-	var scrollTop = me.getScrollTop(); // 当前滚动条的距离
-	var curPoint = me.getPoint(e); // 当前点
-	
-	var moveY = curPoint.y - me.startPoint.y; // 和起点比,移动的距离,大于0向下拉,小于0向上拉
-	
-	// 向下拉 && 在顶部
-	// mescroll-body,直接判定在顶部即可
-	// scroll-view在滚动时不会触发touchmove,当触顶/底/左/右时,才会触发touchmove
-	// scroll-view滚动到顶部时,scrollTop不一定为0,也有可能大于0; 在iOS的APP中scrollTop可能为负数,不一定和startTop相等
-	if (moveY > 0 && (
-			(me.isScrollBody && scrollTop <= 0)
-			||
-			(!me.isScrollBody && (scrollTop <= 0 || (scrollTop <= me.optDown.startTop && scrollTop === me.startTop)) )
-		)) {
-		// 可下拉的条件
-		if (!me.inTouchend && !me.isDownScrolling && !me.optDown.isLock && (!me.isUpScrolling || (me.isUpScrolling &&
-				me.isUpBoth))) {
-	
-			// 下拉的角度是否在配置的范围内
-			if(!me.startAngle) me.startAngle = me.getAngle(me.lastPoint, curPoint); // 两点之间的角度,区间 [0,90]
-			if (me.startAngle < me.optDown.minAngle) return isPrevent; // 如果小于配置的角度,则不往下执行下拉刷新
-	
-			// 如果手指的位置超过配置的距离,则提前结束下拉,避免Webview嵌套导致touchend无法触发
-			if (me.maxTouchmoveY > 0 && curPoint.y >= me.maxTouchmoveY) {
-				me.inTouchend = true; // 标记执行touchend
-				touchendEvent(e, ins); // 提前触发touchend
-				return isPrevent;
-			}
-			
-			isPrevent = false // 小程序是return false
-	
-			var diff = curPoint.y - me.lastPoint.y; // 和上次比,移动的距离 (大于0向下,小于0向上)
-	
-			// 下拉距离  < 指定距离
-			if (me.downHight < me.optDown.offset) {
-				if (me.movetype !== 1) {
-					me.movetype = 1; // 加入标记,保证只执行一次
-					// me.optDown.inOffset && me.optDown.inOffset(me); // 进入指定距离范围内那一刻的回调,只执行一次
-					me.callMethod(ins, {type: 'setLoadType', downLoadType: 1})
-					me.isMoveDown = true; // 标记下拉区域高度改变,在touchend重置回来
-				}
-				me.downHight += diff * me.optDown.inOffsetRate; // 越往下,高度变化越小
-	
-				// 指定距离  <= 下拉距离
-			} else {
-				if (me.movetype !== 2) {
-					me.movetype = 2; // 加入标记,保证只执行一次
-					// me.optDown.outOffset && me.optDown.outOffset(me); // 下拉超过指定距离那一刻的回调,只执行一次
-					me.callMethod(ins, {type: 'setLoadType', downLoadType: 2})
-					me.isMoveDown = true; // 标记下拉区域高度改变,在touchend重置回来
-				}
-				if (diff > 0) { // 向下拉
-					me.downHight += diff * me.optDown.outOffsetRate; // 越往下,高度变化越小
-				} else { // 向上收
-					me.downHight += diff; // 向上收回高度,则向上滑多少收多少高度
-				}
-			}
-			
-			me.downHight = Math.round(me.downHight) // 取整
-			var rate = me.downHight / me.optDown.offset; // 下拉区域当前高度与指定距离的比值
-			// me.optDown.onMoving && me.optDown.onMoving(me, rate, me.downHight); // 下拉过程中的回调,一直在执行
-			me.onMoving(ins, rate, me.downHight)
-		}
-	}
-	
-	me.lastPoint = curPoint; // 记录本次移动的点
-	
-	return isPrevent // false表示不往上冒泡,相当于调用了同时调用了stopPropagation和preventDefault (对小程序生效, h5和app无效)
-}
-
-function touchendEvent(e, ins) {
-	// 如果下拉区域高度已改变,则需重置回来
-	if (me.isMoveDown) {
-		if (me.downHight >= me.optDown.offset) {
-			// 符合触发刷新的条件
-			me.downHight = me.optDown.offset; // 更新下拉区域高度
-			// me.triggerDownScroll();
-			me.callMethod(ins, {type: 'triggerDownScroll'})
-		} else {
-			// 不符合的话 则重置
-			me.downHight = 0;
-			// me.optDown.endDownScroll && me.optDown.endDownScroll(me);
-			me.callMethod(ins, {type: 'endDownScroll'})
-		}
-		me.movetype = 0;
-		me.isMoveDown = false;
-	} else if (!me.isScrollBody && me.getScrollTop() === me.startTop) { // scroll-view到顶/左/右/底的滑动事件
-		var isScrollUp = me.getPoint(e).y - me.startPoint.y < 0; // 和起点比,移动的距离,大于0向下拉,小于0向上拉
-		// 上滑
-		if (isScrollUp) {
-			// 需检查滑动的角度
-			var angle = me.getAngle(me.getPoint(e), me.startPoint); // 两点之间的角度,区间 [0,90]
-			if (angle > 80) {
-				// 检查并触发上拉
-				// me.triggerUpScroll(true);
-				me.callMethod(ins, {type: 'triggerUpScroll'})
-			}
-		}
-	}
-	me.callMethod(ins, {type: 'setWxsProp'}) // 同步更新wxsProp的数据 (小程序是异步的,可能touchmove先执行,才到propObserver; h5和app是同步)
-}
-
-/* 是否禁用下拉刷新 */
-me.disabled = function(){
-	return !me.optDown || !me.optDown.use || me.optDown.native
-}
-
-/* 根据点击滑动事件获取第一个手指的坐标 */
-me.getPoint = function(e) {
-	if (!e) {
-		return {x: 0,y: 0}
-	}
-	if (e.touches && e.touches[0]) {
-		return {x: e.touches[0].pageX,y: e.touches[0].pageY}
-	} else if (e.changedTouches && e.changedTouches[0]) {
-		return {x: e.changedTouches[0].pageX,y: e.changedTouches[0].pageY}
-	} else {
-		return {x: e.clientX,y: e.clientY}
-	}
-}
-
-/* 计算两点之间的角度: 区间 [0,90]*/
-me.getAngle = function (p1, p2) {
-	var x = Math.abs(p1.x - p2.x);
-	var y = Math.abs(p1.y - p2.y);
-	var z = Math.sqrt(x * x + y * y);
-	var angle = 0;
-	if (z !== 0) {
-		angle = Math.asin(y / z) / Math.PI * 180;
-	}
-	return angle
-}
-
-/* 获取滚动条的位置 */
-me.getScrollTop = function() {
-	return me.scrollTop || 0
-}
-
-/* 获取body的高度 */
-me.getBodyHeight = function() {
-	return me.bodyHeight || 0;
-}
-
-/* 调用逻辑层的方法 */
-me.callMethod = function(ins, param) {
-	if(ins) ins.callMethod('wxsCall', param)
-}
-
-/* 导出模块 */
-module.exports = {
-	propObserver: propObserver,
-	callObserver: callObserver,
-	touchstartEvent: touchstartEvent,
-	touchmoveEvent: touchmoveEvent,
-	touchendEvent: touchendEvent
-}

+ 0 - 5
package-lock.json

@@ -16,11 +16,6 @@
       "version": "1.6.7",
       "resolved": "https://registry.npmjs.org/hls.js/-/hls.js-1.6.7.tgz",
       "integrity": "sha512-QW2fnwDGKGc9DwQUGLbmMOz8G48UZK7PVNJPcOUql1b8jubKx4/eMHNP5mGqr6tYlJNDG1g10Lx2U/qPzL6zwQ=="
-    },
-    "mescroll-uni": {
-      "version": "1.3.7",
-      "resolved": "https://registry.npmjs.org/mescroll-uni/-/mescroll-uni-1.3.7.tgz",
-      "integrity": "sha512-1pQMtGA+iVRKhfJZZNXdBx05NnthIk6zm3hRbumswSA54eaKOMgpUDb9AQ2+rRdXmS6kLkEYSbW/fkb7/IyoAg=="
     }
   }
 }

+ 1 - 2
package.json

@@ -2,7 +2,6 @@
   "dependencies": {
     "crypto-js": "^4.2.0",
     "dayjs": "^1.11.13",
-    "hls.js": "^1.6.7",
-    "mescroll-uni": "^1.3.7"
+    "hls.js": "^1.6.7"
   }
 }

+ 9 - 0
pages.json

@@ -198,6 +198,15 @@
 							"bounce": "none"
 						}
 					}
+				},{
+					"path": "storeOrder",
+					"style": {
+						"navigationBarTitleText": "订单",
+						"navigationBarTextStyle": "black",
+						"app-plus": {
+							"bounce": "none"
+						}
+					}
 				}, {
 					"path": "success",
 					"style": {

+ 9 - 0
pages/home/index.vue

@@ -62,6 +62,7 @@
 			}
 		},
 		onLoad(option) {
+			this.a()
 			// if (this.code) {
 			// 	this.loginByMp()
 			// } else {
@@ -74,6 +75,14 @@
 			}
 		},
 		methods: {
+			a() {
+			uni.login({
+				provider: "weixin",
+				success: async loginRes => {
+					let code = loginRes.code
+					console.log("that.code",code)
+				}
+			})},
 			open() {
 
 			},

+ 229 - 241
pages/home/living.vue

@@ -59,22 +59,20 @@
 					人正在去购买</text>
 			</view>
 
-
-
-
-			<!-- <view class="videolist " style="margin: auto 0">
-				<view class="vedio" :style="{height:isScreen?'100vh':''}">
-					<video id="myVideo" class="videotop" :src="livingUrl" :autoplay="autoplay" :controls='false'
-						vslide-gesture-in-fullscreen='true' :show-center-play-btn="false"></video>
-				</view>
-			</view> -->
 			<!-- object-fit:fill; -->
 			<view class="videolist " style="margin: auto 0">
-				<view class="vedio" :style="{height:isScreen?'100vh':''}">
+				<view class="video" :style="{height:isScreen?'100vh':''}">
 					<!-- 修改video组件以支持HLS -->
-					<video id="myVideo" class="videotop" :src="livingUrl" :autoplay="autoplay" :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" @error="videoError" >
+					<video v-if="livingUrl" id="myVideo" class="videotop" :src="livingUrl" :autoplay="autoplay"
+						: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"
+						@error="videoError">
+					</video>
+
+					<video v-if="videoUrl" class="videotop" :src="videoUrl" :autoplay="autoplay" :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">
 					</video>
 				</view>
 			</view>
@@ -153,7 +151,7 @@
 
 				<view class="justify-between p24">
 					<view class="u-flex-y-center"
-						style="background:rgba(255,255,255,0.2);padding:18rpx 14rpx 18rpx 32rpx;width: 526rpx;box-sizing:border-box;border-radius:36rpx;">
+						style="background:rgba(157, 157, 157, 0.8);padding:18rpx 14rpx 18rpx 32rpx;width: 526rpx;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' class="ml20"
 							@keydown.enter="sendMsg" @confirm="sendMsg">
@@ -345,7 +343,8 @@
 											src="/static/images/collect.png">
 										</image>
 									</view>
-									<view v-if="item.status==1" class="shop-btn" @click="goShop(item.productId)">去购买
+									<view v-if="item.status==1" class="shop-btn"
+										@click="goShop(item.productId,item.goodsId)">去购买
 									</view>
 									<view v-else-if="item.status==0" @click="goShop(item.productId)" class="shop-btn">
 										已下架</view>
@@ -388,10 +387,10 @@
 		getAnswerlist,
 		submitAnswer
 	} from '@/api/home'
-	// var wsUrl = "ws://192.168.10.166:17114/app/webSocket";
+	// var wsUrl = "ws://192.168.10.166:7114/app/webSocket";
 
-	// var wsUrl = "ws://192.168.10.166:7114/app/webSocket"; //余红奇
-	var wsUrl = "ws://live.test.ylrztop.com/prod-api/app/webSocket"; //余红奇
+	var wsUrl = "ws://192.168.10.166:7114/app/webSocket"; //余红奇
+	// var wsUrl = "ws://live.test.ylrztop.com/prod-api/app/webSocket"; //余红奇
 	// var wsUrl = "ws://nd383294.natappfree.cc/app/webSocket"; //余红奇
 	// var wsUrl = "ws://v56c9b8e.natappfree.cc/app/webSocket"; //余红奇
 	// var wsUrl = "ws://192.168.10.170:7114/app/webSocket"; //陈果
@@ -404,6 +403,8 @@
 	export default {
 		data() {
 			return {
+				videoUrl: null,
+				showType: 1, //横屏1 竖屏2
 				boxHeight: 300, //小黄车高度
 				isFollow: true,
 				liveViewData: {},
@@ -423,9 +424,9 @@
 				placeholderText: '说点什么...',
 				isZoom: false, //点赞按钮控制是否放大
 				userinfo: '', //用户信息
-				// path: 'http://192.168.10.166/dev-api', //余红奇
+				path: 'http://192.168.10.166/dev-api', //余红奇
 				// path: 'http://v56c9b8e.natappfree.cc', //余红奇
-				path: 'live.test.ylrztop.com/prod-api', //余红奇
+				// path: 'live.test.ylrztop.com/prod-api', //余红奇
 				// path: 'http://192.168.10.170/dev-api', //陈果
 				value: '',
 				talkdisabled: false, //输入框是否禁用
@@ -463,38 +464,7 @@
 				old: {
 					scrollTop: 0
 				},
-				liveData: {}, //直播间点赞、关注、在线人数数据
-
-				// shopList: [{
-				// 	title: '史士昊老师四神汤健脾消食疗法',
-				// 	details: '看它来喘口气,小小震撼,',
-				// 	people: '45708 '
-				// },{
-				// 	title: '史士昊老师四神汤健脾消食疗法',
-				// 	details: '看它来喘口气,小小震撼,',
-				// 	people: '45708 '
-				// }],
-				// chatList: [{
-				// 		lable: '达人',
-				// 		name: '锅巴',
-				// 		txt: '中医调节身体确实'
-				// 	},
-				// 	{
-				// 		lable: '',
-				// 		name: '从芯开始',
-				// 		txt: '来了'
-				// 	}
-				// 	{
-				// 		lable: '',
-				// 		name: '北京的帅小伙:',
-				// 		txt: '来了来了,上茶'
-				// 	},
-				// 	{
-				// 		lable: '',
-				// 		name: '萍萍',
-				// 		txt: '来了'
-				// 	}
-				// ]
+				// liveData: {}, //直播间点赞、关注、在线人数数据
 
 			};
 		},
@@ -513,11 +483,6 @@
 				return this.liveViewers.slice(0, 3);
 			}
 		},
-		// computed: {
-		// 	 userId() {
-		// 	       return this.$store.state.user.userId
-		// 	     }
-		// },
 		mounted() {
 			// this.onLike() 
 			this.getliveViewData() ////直播间点赞、关注、在线人数数据
@@ -555,20 +520,20 @@
 			// console.log(this.videoContext)
 		},
 		onUnload() {
-			// 销毁HLS播放器
+			this.closeWebSocket(); // 安全关闭
 			if (this.hlsPlayer) {
-				this.hlsPlayer.destroy();
-				this.hlsPlayer = null;
+				this.hlsPlayer.destroy(); // 清理 HLS 播放器
+			}
+			if (this.pingpangTimes) {
+				clearInterval(this.pingpangTimes); // 清除心跳定时器
 			}
 		},
 		methods: {
 			goStore() {
+				console.log("带过去storeId",this.products[0].storeId)
 				uni.navigateTo({
-					url: '/pages_shop/store?liveId=' + this.liveId
+					url: '/pages_shop/store?liveId=' + this.liveId + "&storeId=" + this.products[0].storeId
 				})
-				// uni.navigateTo({
-				// 	url: "/pages_shop/store"
-				// })
 			},
 			// 去订单列表
 			goOrderList() {
@@ -604,52 +569,78 @@
 			},
 
 			getliving() {
+				console.log("获取直播信息");
 				const param = {
 					id: this.liveId
-				}
-				getlive(param).then(res => {
-					if (res.code == 200) {
-						this.livedata = res.data
-						// this.codeimg = res.data.qwQrCode
-						this.livingUrl = res.data.livingUrl; // 确保设置livingUrl
-
-						// 检查是否是HLS流
-						if (this.livingUrl && this.livingUrl.indexOf('.m3u8') > -1) {
-							// 在H5平台初始化HLS播放器
-							// #ifdef H5
-							this.initHlsPlayer();
-							// #endif
+				};
 
-							// 其他平台(App、小程序)原生支持HLS
-							this.$nextTick(() => {
-								if (this.videoContext) {
-									this.videoContext.play();
-								}
-							});
-						} else {
-							// 非HLS流正常播放
-							if (this.livedata.liveType == 1) {
-								this.autoplay = true
-								this.livingUrl=res.videoUrl
-								this.videoContext.seek(this.livedata.nowDuration)
-							} else if(this.livedata.liveType == 2) {
-								this.autoplay = true
-								this.getLiveinformation()
-								// this.livingUrl=res.livingUrl
-							} else {
-								this.autoplay = false
-								this.placeholderText = "直播开始才能发言讨论"
-								this.talkdisabled = true
-							}
-						}
-					} else {
+				getlive(param).then(res => {
+					if (res.code !== 200) {
 						uni.showToast({
 							title: res.msg,
 							icon: 'none',
 							duration: 2000
 						});
+						return;
 					}
-				})
+
+					this.livedata = res.data;
+					this.showType = res.showType;
+
+					// 1. 根据直播类型设置播放地址
+					if (res.data.liveType === 1) {
+						// 回放视频
+						this.videoUrl = res.data.videoUrl;
+						this.autoplay = true;
+						this.placeholderText = "观看回放中";
+						this.talkdisabled = false;
+					} else if (res.data.liveType === 2) {
+						// 直播流
+						this.livingUrl = res.data.livingUrl;
+						this.autoplay = true;
+						this.placeholderText = "说点什么...";
+						this.talkdisabled = false;
+					} else {
+						// 未开播
+						this.livingUrl = "";
+						this.autoplay = false;
+						this.placeholderText = "直播未开始,暂时无法发言";
+						this.talkdisabled = true;
+						return;
+					}
+
+					// 2. 根据不同平台处理播放逻辑
+					this.$nextTick(() => {
+						if (!this.livingUrl) return;
+
+						// H5 平台:使用 HLS.js 处理 .m3u8 流
+						// #ifdef H5
+						if (this.livingUrl.includes('.m3u8')) {
+							this.initHlsPlayer();
+							return;
+						}
+						// #endif
+
+						// 小程序/App 平台:直接使用 video 组件
+						if (!this.videoContext) {
+							this.videoContext = uni.createVideoContext('myVideo', this);
+						}
+
+						if (res.data.liveType === 1) {
+							// 回放:跳转到指定位置
+							this.videoContext.seek(res.data.nowDuration || 0);
+						} else {
+							// 直播:直接播放
+							this.videoContext.play();
+						}
+					});
+				}).catch(err => {
+					console.error("获取直播信息失败:", err);
+					uni.showToast({
+						title: "获取直播信息失败",
+						icon: 'none'
+					});
+				});
 			},
 			maskString(str, maskChar = '*') {
 				// 新增:如果str是undefined或null,直接返回空字符串
@@ -667,12 +658,8 @@
 			// 返回上一个页面并关闭WebSocket
 			goBack() {
 				uni.navigateBack();
-				closeWebSocket();
+				this.closeWebSocket();
 			},
-			// // 收藏商品
-			// collectProducts(){
-
-			// },
 
 			//直播间点赞、关注、在线人数数据
 			getliveViewData() {
@@ -717,7 +704,6 @@
 						if (res.code == 200) {
 							console.log("小黄车 店铺展示>>>>", res)
 							this.products = res.data
-							// this.store = res.store
 						} else {
 							uni.showToast({
 								title: res.msg,
@@ -767,17 +753,16 @@
 			onLike() {
 				liveDataLike(this.liveId).then(res => {
 						if (res.code == 200) {
-							if (
-								typeof res.msg === 'number' || (typeof res.msg === 'string' && /^\d+$/.test(res.msg
-									.trim()))
-							) {
-								this.liveData++
+							if (res.like) {
+								// this.liveData++
+								this.liveViewData.like++
 							} else {
 								uni.showToast({
 									title: res.msg,
 									icon: 'none'
 								});
 							}
+
 						} else {
 							uni.showToast({
 								title: res.msg,
@@ -790,21 +775,22 @@
 
 			},
 			// 去购买,跳商品详情
-			goShop(item) {
-				console.log("去购买,跳商品详情", item)
+			goShop(productId, goodsId) {
+				// console.log("去购买,跳商品详情")
 				uni.navigateTo({
-					url: '/pages_shop/goods?productId=' + item + '&liveId=' + this.liveId
+					url: '/pages_shop/goods?productId=' + productId + '&liveId=' + this.liveId + '&goodsId=' +
+						goodsId
 				})
 			},
 
 			// 收藏
 			onCollect(item) {
-				console.log("item>>>", item.productId)
-				uni.setStorageSync("storeId", storeId);
+				// console.log("item>>>", item.productId)
+				// uni.setStorageSync("storeId", storeId);
 				let data = {
 					liveId: this.liveId,
 					productId: item.productId,
-					storeId: this.store.storeId
+					storeId: this.products.storeId
 				}
 				collectStore(data).then(res => {
 						if (res.code == 200) {
@@ -834,8 +820,6 @@
 			initTime() {
 				const now = new Date();
 				this.timestamp = now.getTime(); // 例如:'2023-04-01 12:00:00'
-				// 或者使用其他格式化方法,例如:
-				// this.currentTime = `${now.getFullYear()}-${now.getMonth() + 1}-${now.getDate()} ${now.getHours()}:${now.getMinutes()}:${now.getSeconds()}`;
 			},
 			// initWebSocket() {
 			//       const liveWS = new LiveWS('ws://your-server.com', 123, 456);
@@ -922,32 +906,32 @@
 					this.isSubmit = false;
 				})
 			},
-			handleCheckboxSelect(value) {
-				const index = this.checkboxValue.indexOf(value)
-				console.log(value)
-				if (this.answerlist.type == 1) {
-					this.checkboxValue = [value]
-					this.checkboxFormValue = this.checkboxValue.join(',')
-					// setTimeout(() => {
-					//       uni.showToast({
-					//         title: '准备下一题',
-					//         icon: 'none',
-					//         duration: 2000
-					//       });
-					//     }, 1000);
-					this.submitAnswers()
-					console.log(this.checkboxValue)
-				} else if (this.answerlist.type == 2) {
-					if (index > -1) {
-						this.checkboxValue.splice(index, 1)
-						this.checkboxFormValue = this.checkboxValue.join(',')
-					} else {
-						this.checkboxValue.push(value)
-						this.checkboxFormValue = this.checkboxValue.join(',')
-					}
-					console.log(this.checkboxFormValue)
-				}
-			},
+			// handleCheckboxSelect(value) {
+			// 	const index = this.checkboxValue.indexOf(value)
+			// 	console.log(value)
+			// 	if (this.answerlist.type == 1) {
+			// 		this.checkboxValue = [value]
+			// 		this.checkboxFormValue = this.checkboxValue.join(',')
+			// 		setTimeout(() => {
+			// 		      uni.showToast({
+			// 		        title: '准备下一题',
+			// 		        icon: 'none',
+			// 		        duration: 2000
+			// 		      });
+			// 		    }, 1000);
+			// 		this.submitAnswers()
+			// 		console.log(this.checkboxValue)
+			// 	} else if (this.answerlist.type == 2) {
+			// 		if (index > -1) {
+			// 			this.checkboxValue.splice(index, 1)
+			// 			this.checkboxFormValue = this.checkboxValue.join(',')
+			// 		} else {
+			// 			this.checkboxValue.push(value)
+			// 			this.checkboxFormValue = this.checkboxValue.join(',')
+			// 		}
+			// 		console.log(this.checkboxFormValue)
+			// 	}
+			// },
 			getAnswerlists() {
 				console.log(123)
 				const data = {
@@ -1038,33 +1022,6 @@
 			handleTouchEnd() {
 				this.isZoom = false; // 恢复原状
 			},
-			// getliving() {
-			// 	const param = {
-			// 		id: this.liveId
-			// 	}
-			// 	getlive(param).then(res => {
-			// 		if (res.code == 200) {
-			// 			this.livedata = res.data
-			// 			this.codeimg = res.data.qwQrCode
-			// 			if (this.livedata.status == 1) {
-			// 				this.autoplay = true
-			// 				this.videoContext.seek(this.livedata.nowDuration)
-			// 				// console.log(this.autoplay)
-			// 			} else {
-			// 				this.autoplay = false
-			// 				this.placeholderText = "直播开始才能发言讨论"
-			// 				this.talkdisabled = true
-			// 			}
-			// 			console.log(this.autoplay)
-			// 		} else {
-			// 			uni.showToast({
-			// 				title: res.msg,
-			// 				icon: 'none',
-			// 				duration: 2000
-			// 			});
-			// 		}
-			// 	})
-			// },
 			getEWechatSdk() {
 				// 只在H5平台执行
 				// #ifdef H5
@@ -1080,10 +1037,17 @@
 				// #endif
 			},
 			closeWebSocket() {
-				if (socket != null) {
-					uni.closeSocket();
+				clearInterval(this.pingpangTimes);
+				clearTimeout(this.reconnectTimer);
+				if (socket && isSocketOpen) {
+					try {
+						uni.closeSocket();
+						isSocketOpen = false;
+						console.log('WebSocket已主动关闭');
+					} catch (e) {
+						console.error('关闭WebSocket时出错:', e);
+					}
 				}
-				clearInterval(pingpangTimes)
 			},
 			reConnect() {
 				var that = this;
@@ -1097,36 +1061,63 @@
 				}, 10000);
 
 			},
+			startHeartbeat() {
+				clearInterval(this.pingpangTimes);
+				// 实现心跳检测逻辑
+				console.log('开始心跳检测');
+				this.pingpangTimes = setInterval(() => {
+					if (isSocketOpen) {
+						const pingData = {
+							cmd: 'ping',
+							timestamp: new Date().getTime()
+						};
+
+						socket.send({
+							data: JSON.stringify(pingData),
+							success: () => {
+								console.log('心跳发送成功');
+							},
+							fail: (err) => {
+								console.error('心跳发送失败:', err);
+								// 心跳失败也触发重连
+								this.scheduleReconnect();
+							}
+						});
+					}
+				}, 30000);
+			},
 			initSocket() {
-				this.userinfo = JSON.parse(uni.getStorageSync("userInfo"))
-				// console.log("liveId", this.liveId);
-				// console.log("userId", this.userinfo.userId);
-				// console.log("userType", this.userType);
-				// console.log("timestamp", this.timestamp);
+				if (this.reconnectCount >= this.maxReconnectAttempts) {
+					console.log('已达到最大重连次数,不再尝试连接');
+					uni.showToast({
+						title: '连接失败,请稍后再试',
+						icon: 'none'
+					});
+					return;
+				}
+				this.userinfo = JSON.parse(uni.getStorageSync("userInfo"));
 				let signature = CryptoJS.HmacSHA256(
 					CryptoJS.enc.Utf8.parse(this.liveId.toString() + this.userinfo.userId + this.userType + this
 						.timestamp),
-					CryptoJS.enc.Utf8.parse(this.timestamp)).toString(CryptoJS.enc.Hex)
+					CryptoJS.enc.Utf8.parse(this.timestamp)).toString(CryptoJS.enc.Hex);
 
-				var that = this;
-				// console.log("initSocket")
-				//创建一个socket连接
-				socket = uni.connectSocket({
-					// url: wsUrl+"?userId=40486&liveId=2",
-					// 	url: wsUrl + "?userId=" + this.userid + "&liveId=" +
-					// this.liveId+"&AppToken="+'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiI0IiwiaWF0IjoxNzQwNzIxMDQ1LCJleHAiOjE3NDEzMjU4NDV9.PgS83JTMSJgVFD6vGAhUsEPbS6Az4yMyX8wVug61TZNTB3092CtvANo-AB9ZG4NdSBLgLrf4litM3vvTk-FK0g',
-					// 
+				const that = this;
+				// 先清除之前的连接和心跳
+				this.closeWebSocket();
 
-					// url: wsUrl + "?userId=" + this.userId + "&liveId=" + this.liveId + "&AppToken=" + uni
-					// 	.getStorageSync('AppToken'),
 
+				// 创建一个新的socket连接
+				socket = uni.connectSocket({
 					url: wsUrl + "?userId=" + this.userinfo.userId + "&liveId=" + this.liveId + "&userType=" + this
 						.userType +
 						"&timestamp=" + this.timestamp + "&signature=" + signature,
 					multiple: true,
 					success: res => {
-						//先确保清除了之前的心跳定时器
-						clearInterval(pingpangTimes)
+						this.reconnectCount++; // 增加重连计数
+
+						// 清除之前的心跳定时器
+						clearInterval(this.pingpangTimes);
+
 						uni.onSocketMessage((res) => {
 							if (res.data.code == 500) {
 								uni.showToast({
@@ -1161,59 +1152,58 @@
 								// 	this.showWelcomeMessage = false;
 								//   }, 1000);
 								uni.$emit('entry', redata.data);
-								// console.log(redata.data)/
 							}
-
 						})
 					},
-					error: res => {
+					fail: res => {
 						uni.$emit('websocket', 0);
-						console.log(res)
+						console.log(res);
+						this.scheduleReconnect();
 					},
 				})
 				//监听socket打开
 				uni.onSocketOpen(() => {
-					isSocketOpen = true
-					console.log('WebSocket连接已打开!!');
-					// uni.$emit('websocket',1);
-					uni.showToast({
-						title: "插件已打开",
-						icon: 'none',
-					});
-				})
+					isSocketOpen = true;
+					this.reconnectCount = 0; // 重置重连计数器
+					console.log('WebSocket 连接成功');
+					this.startHeartbeat();
+				});
 				//监听socket关闭
 				uni.onSocketClose(() => {
-					isSocketOpen = false
-					clearInterval(pingpangTimes)
+					isSocketOpen = false;
 					console.log('WebSocket连接已关闭!');
-					// uni.$emit('websocket',0);
-					uni.showToast({
-						title: "插件离线",
-						icon: 'none',
-					});
-					//重连
-					that.reConnect()
-				})
+					this.scheduleReconnect();
+				});
 				//监听socket错误
-				uni.onSocketError(() => {
-					isSocketOpen = false
-					clearInterval(pingpangTimes)
-					console.log('WebSocket连接打开失败');
-					// uni.$emit('websocket',0);
+				uni.onSocketError((err) => {
+					isSocketOpen = false;
+					console.error('WebSocket 连接错误:', err);
+					this.scheduleReconnect();
+				});
+			},
+			scheduleReconnect() {
+				if (this.reconnectCount >= this.maxReconnectAttempts) {
+					console.log('已达到最大重连次数,不再尝试连接');
 					uni.showToast({
-						title: "插件离线",
-						icon: 'none',
+						title: '连接失败,请刷新页面重试',
+						icon: 'none'
 					});
-					uni.showModal({
-						content: '聊天连接失败是否重新尝试连接',
-						success() {
-							that.reConnect()
-						}
-					})
-				})
+					return;
+				}
+
+				// 清除之前的定时器和连接
+				clearTimeout(this.reconnectTimer);
+				this.closeWebSocket();
+
+				// 指数退避策略,重连间隔逐渐增加
+				const delay = Math.min(1000 * Math.pow(2, this.reconnectCount), 30000);
+				console.log(`将在 ${delay}ms 后尝试第 ${this.reconnectCount + 1} 次重连`);
+
+				this.reconnectTimer = setTimeout(() => {
+					this.initSocket();
+				}, delay);
 			},
 			sendMsg() {
-				// this.userinfo = JSON.parse(uni.getStorageSync("userInfo"))
 				if (isSocketOpen) {
 					const data = {
 						liveId: this.liveId,
@@ -1228,13 +1218,11 @@
 						uni.showToast({
 							title: "不能发送空消息",
 							icon: 'none',
-
 						});
 					} else {
 						socket.send({
 							data: JSON.stringify(data),
 							success: () => {
-								// this.gettalklist()
 								console.log("发送成功")
 								this.value = ''
 							},
@@ -1350,11 +1338,11 @@
 	// 	}
 	// }
 
-	// .talk-list {
-	// 	border-radius: 30rpx;
-	// 	background-color: rgba(255, 255, 255, 0.1);
-	// 	padding: 10rpx 30rpx;
-	// }
+	.talk-list {
+		border-radius: 30rpx;
+		background-color: rgba(33, 33, 33, 0.5);
+		padding: 10rpx 30rpx;
+	}
 
 	// .zoom-button-active {
 	// 	transform: scale(1.5);
@@ -1441,7 +1429,7 @@
 		position: relative;
 	}
 
-	.vedio {
+	.video {
 		// height: 500rpx;
 		height: 100vh;
 		/* 占屏幕高度的80% */
@@ -1477,7 +1465,7 @@
 	}
 
 	.icon-bg {
-		background-color: rgba(255, 255, 255, 0.2);
+		background-color: rgba(157, 157, 157, 0.8);
 		border-radius: 50%;
 		width: 72rpx;
 		height: 72rpx;
@@ -1674,4 +1662,4 @@
 		display: flex;
 		align-items: center;
 	}
-</style>
+</style>

+ 261 - 192
pages_shop/cart.vue

@@ -1,26 +1,27 @@
 <template>
 	<view class="content">
 		<!-- 商品列表 -->
-		<view class="shopbox" v-for="(shop,idx) in carts" :key="idx">
-			<view class="shopbox-name" v-if="shop.storeName && shop.storeName != 'null'">
+		<!-- <view class="shopbox" v-for="(shop,idx) in shopList" :key="idx"> -->
+		<!-- <view class="shopbox-name" v-if="shop.storeName && shop.storeName != 'null'">
 				<label style="margin-right: 30upx;">
 					<checkbox :value="shop.checked" :checked="shop.checked" @click="checkShopChange(shop)" />
 				</label>
 				<text>{{shop.storeName}}</text>
-			</view>
+			</view> -->
+		<view class="shopbox">
 			<view class="goods-list">
-				<view class="item" v-for="(item,index) in shop.list" :key="index">
+				<view class="item" v-for="(item,index) in shopList" :key="index">
 					<label style="margin-right: 30upx;">
-						<checkbox :value="item.checked"  :checked="item.checked" @click="checkChange(item,shop)" />
+						<checkbox :value="item.checked" :checked="item.checked" @click="checkChange(item,shop)" />
 					</label>
-					<image class="goods-img" :src="item.productAttrImage==null||item.productAttrImage==''?item.productImage:item.productAttrImage" mode="aspectFit"></image>
+					<image class="goods-img" @click="showProduct(item)" :src="item.imgUrl" mode="aspectFit"></image>
 					<view class="info-box">
 						<view>
 							<view class="title-box">
-								<view class="tag">{{utils.getDictLabelName("storeProductType",item.productType)}}</view>
+								<!-- <view class="tag">{{utils.getDictLabelName("storeProductType",item.productType)}}</view> -->
 								<view class="title ellipsis">{{ item.productName }}</view>
 							</view>
-							<view class="intro ellipsis">{{item.productAttrName}}</view>
+							<!-- <view class="intro ellipsis">{{item.productAttrName}}</view> -->
 						</view>
 						<view class="price-num">
 							<view class="price">
@@ -32,7 +33,7 @@
 									<image v-if="item.cartNum <= 1" src="/static/images/jian.png" mode=""></image>
 									<image v-else src="/static/images/jian2.png" mode=""></image>
 								</view>
-								<input  type="number" @change="changeNum($event,item)" :value="item.cartNum"   />
+								<input type="number" @change="changeNum($event,item)" :value="item.cartNum" />
 								<view class="img-box" @click="addNum(item)">
 									<image src="/static/images/add.png" mode=""></image>
 								</view>
@@ -42,20 +43,16 @@
 				</view>
 			</view>
 		</view>
-		<view v-if="carts.length == 0" class="no-data-box">
+		<view v-if="shopList.length == 0" class="no-data-box">
 			<image src="/static/images/no_data.png" mode="aspectFit"></image>
 			<view class="empty-title">暂无数据</view>
 		</view>
-		<!-- 猜你喜欢 -->
-		 
-		<view class="like-product">
-			<likeProduct  ref="product" />
-		</view>
+
 		<!-- 底部按钮 -->
 		<view class="btn-foot">
 			<view class="left">
 				<label>
-					<checkbox  :checked="checkAll" @click="handleCheckAll()" />
+					<checkbox :checked="checkAll" @click="handleCheckAll()" />
 				</label>
 				<text class="text">全选</text>
 				<text class="text" @click="delCart()">删除</text>
@@ -71,136 +68,83 @@
 				<view class="btn" @click="submit">结算</view>
 			</view>
 		</view>
-		
+
 	</view>
 </template>
 
 <script>
+	import {
+		queryLiveCartList, // 查询购物车列表
+		exportLiveCartList, // 导出购物车列表
+		liveCartDetails, //获取购物车详情
+		// addLiveCart, //新增购物车 
+		modifyLiveCart, //修改购物车
+		delLiveCart, // 删除购物车
+		liveOrderKey // 生成订单key
+	} from "@/api/order.js"
 	// import {getCarts,cartNum,delCart} from '@/api/product'
-	import likeProduct from './components/likeProduct.vue'
+	// import likeProduct from './components/likeProduct.vue'
 	export default {
-		components: {
-			likeProduct
-		},	
+		// components: {
+		// 	likeProduct
+		// },
 		data() {
 			return {
-				 
-				totalMoney:0.00,
-				carts:[],
-				checkAll:false,
-			}	
+				shopList: [],
+				totalMoney: 0.00,
+				// carts: [],
+				checkAll: false,
+			}
 		},
 		onLoad() {
 			// this.getCarts();
- 
-		},
-		onShow() {
-			this.getCarts();
+
 		},
+
 		onReachBottom() {
 			// this.$refs.product.getGoodsProducts();
 		},
+		mounted() {
+			this.queryLiveCart();
+		},
 		methods: {
-			delCart(){			
-				var selectCarts = this.carts.flatMap(item => item.list.filter(listItem => listItem.checked === true)).map(el => el.id);
-				
-				if(selectCarts.length==0){
-					uni.showToast({
-						icon:'none',
-						title: "请选择商品删除",
-					});
-					return;
-				}
-				let data = {ids:selectCarts};
-				delCart(data).then(
-					res => {
-						if(res.code==200){
-							uni.showToast({
-								icon:'success',
-								title: "操作成功",
+			// 获得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_shop/confirmCreateOrder?type=cart&orderKey=' + this.orderKey
 							});
-							this.getCarts()
-						}else{
-							
+						} else {
 							uni.showToast({
-								icon:'none',
 								title: res.msg,
+								icon: 'none'
 							});
 						}
 					},
 					rej => {}
 				);
-				console.log(selectCarts)
-			},
-			computedMoney(){
-				var money=0;
-				var that=this;
-				this.carts.forEach((item,index,arr)=>{
-					item.list.forEach(it => {
-						if(it.checked){
-							money+=it.price*it.cartNum;
-						}
-					});
-				})
-				console.log(money);
-				this.totalMoney=money;
-			},
-			handleCheckAll(){
-				this.checkAll=!this.checkAll;
-				var that=this;
-				this.carts.forEach((item,index,arr)=>{
-				     item.checked=that.checkAll;
-					 item.list.forEach(it => {
-					 	it.checked=that.checkAll;
-					 });
-				})
-				this.computedMoney();
-			},
-			checkShopChange(item) {
-				item.checked = !item.checked;
-				item.list.forEach(it => {
-					it.checked= item.checked;
-				});
-				this.computedMoney();
-			},
-			checkChange(item,shop){
-				item.checked=!item.checked;
-				shop.checked = shop.list.every(it => it.checked == true);
-				this.computedMoney();
 			},
-			changeNum(e,item) {
-				item.cartNum = e.detail.value.replace(/\D/g, '')
-				if (item.cartNum <= 1) {
-				  uni.showToast({
-				    title: "已经是底线啦!",
-				    icon: "none",
-				    duration: 2000
-				  });
-				  return;
-				}
-				if(item.cartNum < 1) {
-					item.cartNum = 1
-				}
-				if(item.cartNum>=item.stock){
-					item.cartNum=item.stock;
-				}
-				this.changeCartNum(item)
-			},
-			changeCartNum(item){
-				let data = {number:item.cartNum,id:item.id};
-				cartNum(data).then(
+			// 修改购物车
+			modifyLiveCart(item) {
+				let data = {
+					checked: item.checked,
+					cartId: item.cartId,
+					cartNum: item.cartNum
+				};
+				modifyLiveCart(data).then(
 					res => {
-						if(res.code==200){
-							uni.showToast({
-								icon:'none',
-								title: "操作成功",
-							});
+						if (res.code == 200) {
 							this.computedMoney();
-							
-						}else{
-							
+
+						} else {
+
 							uni.showToast({
-								icon:'none',
+								icon: 'none',
 								title: res.msg,
 							});
 						}
@@ -208,21 +152,45 @@
 					rej => {}
 				);
 			},
-			getCarts(){
-				getCarts().then(
+
+
+
+			// modifyLiveCartList() {
+			// 	modifyLiveCart().then(
+			// 		res => {
+			// 			if (res.code == 200) {
+			// 				this.shopList = res.rows;
+			// 				console.log(this.shopList)
+			// 				console.log(res.rows)
+			// 				this.shopList.forEach(item => {
+			// 					item.checked == 1 ? true : false
+			// 				});
+
+			// 				// this.computedMoney();
+			// 			} else {
+			// 				uni.showToast({
+			// 					icon: 'none',
+			// 					title: "请求失败",
+			// 				});
+			// 			}
+			// 		},
+			// 		rej => {}
+			// 	);
+			// },
+			// 查询购物车列表
+			queryLiveCart() {
+				queryLiveCartList().then(
 					res => {
-						if(res.code==200){
-							 this.carts=res.carts;
-							 this.carts.forEach(item => {
-							   item.checked = false;
-							   item.list.forEach(it => {
-							     it.checked = false;
-							   });
-							 });
-							 this.computedMoney();
-						}else{
+						if (res.code == 200) {
+							this.shopList = res.rows;
+							this.shopList.forEach(item => {
+								item.checked == 1 ? true : false
+							});
+
+							// this.computedMoney();
+						} else {
 							uni.showToast({
-								icon:'none',
+								icon: 'none',
 								title: "请求失败",
 							});
 						}
@@ -230,57 +198,120 @@
 					rej => {}
 				);
 			},
+			// 删除购物车
+			delCart() {
+				// 直接过滤已选商品
+				const data = this.shopList
+					.filter(item => item.checked)
+					.map(item => item.cartId);
+
+				if (data.length === 0) {
+					uni.showToast({
+						icon: 'none',
+						title: "请选择商品删除"
+					});
+					return;
+				}
+				delLiveCart(data).then(res => {
+					if (res.code === 200) {
+						uni.showToast({
+							icon: 'success',
+							title: "操作成功"
+						});
+						this.queryLiveCart(); // 重新加载数据
+					} else {
+						uni.showToast({
+							icon: 'none',
+							title: res.msg
+						});
+					}
+				});
+			},
+			// 计算价格
+			computedMoney() {
+				this.totalMoney = this.shopList.reduce((total, item) => {
+					return total + (item.checked ? item.price * item.cartNum : 0);
+				}, 0);
+			},
+			// 全选
+			handleCheckAll() {
+				this.checkAll = !this.checkAll;
+				this.shopList.forEach(item => {
+					item.checked = this.checkAll; // 直接操作商品
+				});
+				this.computedMoney();
+			},
+			//选择
+			checkChange(item, shop) {
+				item.checked = !item.checked;
+				// console.log(item.checked)
+				this.computedMoney(item.checked);
+			},
+			// 改数量
+			changeNum(e, item) {
+				item.cartNum = e.detail.value.replace(/\D/g, '')
+				if (item.cartNum <= 1) {
+					uni.showToast({
+						title: "已经是底线啦!",
+						icon: "none",
+						duration: 2000
+					});
+					return;
+				}
+				if (item.cartNum < 1) {
+					item.cartNum = 1
+				}
+				if (item.cartNum >= item.stock) {
+					item.cartNum = item.stock;
+				}
+				this.modifyLiveCart(item)
+			},
+
 			// 购物车减法
 			delNum(item) {
 				if (item.cartNum <= 1) {
-				  uni.showToast({
-				    title: "已经是底线啦!",
-				    icon: "none",
-				    duration: 2000
-				  });
-				  return;
+					uni.showToast({
+						title: "已经是底线啦!",
+						icon: "none",
+						duration: 2000
+					});
+					return;
 				}
-				item.cartNum --
-				if(item.cartNum < 1) {
+				item.cartNum--
+				if (item.cartNum < 1) {
 					item.cartNum = 1
 				}
-				 
-				this.changeCartNum(item)
+
+				this.modifyLiveCart(item)
 			},
 			// 购物车加法
 			addNum(item) {
-				console.log(item)
+				// console.log(item)
 				item.cartNum++
-				if(item.cartNum>=item.stock){
-					item.cartNum=item.stock;
+				if (item.cartNum >= item.stock) {
+					item.cartNum = item.stock;
 				}
-				this.changeCartNum(item)
+				this.modifyLiveCart(item)
 			},
 			// 结算
 			submit() {
-				let selectCarts = this.carts
-				  .filter(item => item.list.some(listItem => listItem.checked === true))
-				  .map(item => ({
-				    storeId: item.list[0].storeId || "",
-				    data: {
-				      type: "cart",
-				      cartIds: item.list.filter(it=>it.checked == true).map(it => it.id).join(","),
-				    }
-				  }));
-				if(selectCarts.length==0){
+				const selectedItems = this.shopList.filter(item => item.checked);
+
+				if (selectedItems.length === 0) {
 					uni.showToast({
-						icon:'none',
-						title: "请选择商品",
+						icon: 'none',
+						title: "请选择商品"
 					});
 					return;
 				}
-				uni.navigateTo({
-					url: './confirmOrder?type=cart&confirmParam='+ encodeURIComponent(JSON.stringify(selectCarts))
-				})
+
+				
+				this.getKey()
+				
 			},
-			showProduct(item){
+			showProduct(item) {
 				uni.navigateTo({
-					url: '../shopping/productDetails?productId='+item.productId
+					url: './goods?productId=' + item.productId
 				})
 			},
 		}
@@ -291,14 +322,23 @@
 	page {
 		height: 100%;
 	}
-	.content{
+
+	.content {
 		height: 100%;
 		padding: 20upx;
+
 		.shopbox {
 			background: #FFFFFF;
 			border-radius: 16rpx;
 			margin-bottom: 20rpx;
 		}
+
+		.no-data-box {
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+		}
+
 		.shopbox-name {
 			padding: 30rpx 30rpx 0 30rpx;
 			font-family: PingFang SC, PingFang SC;
@@ -309,8 +349,11 @@
 			white-space: nowrap;
 			text-overflow: ellipsis;
 		}
-		.goods-list{
-			.item{
+
+		.goods-list {
+			padding-bottom: 140rpx;
+
+			.item {
 				box-sizing: border-box;
 				height: 221upx;
 				background: #FFFFFF;
@@ -319,27 +362,32 @@
 				padding: 30upx;
 				display: flex;
 				align-items: center;
-				&:last-child{
+
+				&:last-child {
 					margin-bottom: 0;
 				}
-				.goods-img{
+
+				.goods-img {
 					width: 160upx;
 					height: 160upx;
 					background: #FFFFFF;
 					margin-right: 30upx;
 					flex-shrink: 0;
 				}
-				.info-box{
+
+				.info-box {
 					height: 160upx;
 					display: flex;
 					flex-direction: column;
 					justify-content: space-between;
 					width: calc(100% - 255upx);
-					.title-box{
+
+					.title-box {
 						width: 100%;
 						display: flex;
 						align-items: center;
-						.tag{
+
+						.tag {
 							padding: 0 6upx;
 							height: 30upx;
 							line-height: 30upx;
@@ -352,7 +400,8 @@
 							margin-right: 10upx;
 							flex-shrink: 0;
 						}
-						.title{
+
+						.title {
 							flex: 1;
 							font-size: 28upx;
 							font-family: PingFang SC;
@@ -361,7 +410,8 @@
 							line-height: 1;
 						}
 					}
-					.intro{
+
+					.intro {
 						font-size: 24upx;
 						font-family: PingFang SC;
 						font-weight: 500;
@@ -369,14 +419,17 @@
 						margin-top: 22upx;
 						line-height: 1;
 					}
-					.price-num{
+
+					.price-num {
 						display: flex;
 						align-items: center;
 						justify-content: space-between;
-						.price{
+
+						.price {
 							display: flex;
 							align-items: flex-end;
-							.unit{
+
+							.unit {
 								font-size: 24upx;
 								font-family: PingFang SC;
 								font-weight: 500;
@@ -384,7 +437,8 @@
 								line-height: 1.2;
 								margin-right: 4upx;
 							}
-							.text{
+
+							.text {
 								font-size: 32upx;
 								font-family: PingFang SC;
 								font-weight: bold;
@@ -392,10 +446,12 @@
 								line-height: 1;
 							}
 						}
-						.num-box{
+
+						.num-box {
 							display: flex;
 							align-items: center;
-							.img-box{
+
+							.img-box {
 								width: 60upx;
 								height: 60upx;
 								// border-radius: 4upx;
@@ -403,12 +459,14 @@
 								display: flex;
 								align-items: center;
 								justify-content: center;
-								image{
+
+								image {
 									width: 25rpx;
 									height: 25rpx;
 								}
 							}
-							input{
+
+							input {
 								width: 60upx;
 								height: 60upx;
 								line-height: 60upx;
@@ -427,10 +485,12 @@
 				}
 			}
 		}
-		.like-product{
+
+		.like-product {
 			padding-bottom: 120upx;
 		}
-		.btn-foot{
+
+		.btn-foot {
 			box-sizing: border-box;
 			width: 100%;
 			height: 121upx;
@@ -443,10 +503,12 @@
 			left: 0;
 			bottom: 0;
 			z-index: 99;
-			.left{
+
+			.left {
 				display: flex;
 				align-items: center;
-				.text{
+
+				.text {
 					margin-left: 14upx;
 					font-size: 28upx;
 					font-family: PingFang SC;
@@ -455,24 +517,29 @@
 					line-height: 1;
 				}
 			}
-			.right{
+
+			.right {
 				display: flex;
 				align-items: center;
-				.total{
+
+				.total {
 					display: flex;
 					align-items: flex-end;
 					margin-right: 36upx;
-					.label{
+
+					.label {
 						font-size: 26upx;
 						font-family: PingFang SC;
 						font-weight: 500;
 						color: #999999;
 						line-height: 1.5;
 					}
-					.price{
+
+					.price {
 						display: flex;
 						align-items: flex-end;
-						.unit{
+
+						.unit {
 							font-size: 32upx;
 							font-family: PingFang SC;
 							font-weight: bold;
@@ -480,7 +547,8 @@
 							line-height: 1.2;
 							margin-right: 10upx;
 						}
-						.num{
+
+						.num {
 							font-size: 30upx;
 							font-family: PingFang SC;
 							font-weight: bold;
@@ -489,7 +557,8 @@
 						}
 					}
 				}
-				.btn{
+
+				.btn {
 					width: 200upx;
 					height: 88upx;
 					line-height: 88upx;
@@ -504,4 +573,4 @@
 			}
 		}
 	}
-</style>
+</style>

+ 30 - 30
pages_shop/components/likeProduct.vue

@@ -46,39 +46,39 @@
 	created() {
 	},
 	mounted() {
-		this.getGoodsProducts();
+		// this.getGoodsProducts();
 	},
 	
 	methods: {
-		getGoodsProducts(){
-			console.log(1)
-			var that=this;
-			if (that.loaded == true || that.loading == true) return;
-			that.loading = true;
-			uni.showLoading({
-				title:"加载中..."
-			})
-			getGoodsProducts(that.page).then(
-				res => {
-					if(res.code==200){
-						that.total=res.data.total;
-						that.list.push.apply(that.list, res.data.list);
-						that.loading = false;
-						that.loaded = that.list.length<that.total?false:true;
-						that.page.page = that.page.page + 1;
-						uni.hideLoading()
-					}
-				},
-				err => {
-					uni.hideLoading()
-					uni.showToast({
-						title: err.msg ,
-						icon: 'none',
-						duration: 2000
-					});
-				}
-			);
-		},
+		// getGoodsProducts(){
+		// 	console.log(1)
+		// 	var that=this;
+		// 	if (that.loaded == true || that.loading == true) return;
+		// 	that.loading = true;
+		// 	uni.showLoading({
+		// 		title:"加载中..."
+		// 	})
+		// 	getGoodsProducts(that.page).then(
+		// 		res => {
+		// 			if(res.code==200){
+		// 				that.total=res.data.total;
+		// 				that.list.push.apply(that.list, res.data.list);
+		// 				that.loading = false;
+		// 				that.loaded = that.list.length<that.total?false:true;
+		// 				that.page.page = that.page.page + 1;
+		// 				uni.hideLoading()
+		// 			}
+		// 		},
+		// 		err => {
+		// 			uni.hideLoading()
+		// 			uni.showToast({
+		// 				title: err.msg ,
+		// 				icon: 'none',
+		// 				duration: 2000
+		// 			});
+		// 		}
+		// 	);
+		// },
 		showProduct(item){
 			uni.navigateTo({
 				url: '/pages/shopping/productDetails?productId='+item.productId

+ 162 - 129
pages_shop/confirmCreateOrder.vue

@@ -186,7 +186,8 @@
 	// import { getMyEnableCouponList } from '@/api/coupon'
 	import {
 		createliveOrder, // 创建订单
-		userAddr // 获取用户收货地址
+		userAddr, // 获取用户收货地址
+		cartOrder //购物车订单
 	} from "@/api/order.js"
 	import EvanSwitch from '@/components/evan-switch/evan-switch.vue'
 	import popupBottom from '@/components/px-popup-bottom/px-popup-bottom.vue'
@@ -246,7 +247,7 @@
 			this.productId = options.productId
 			this.totalNum = Number(options.totalNum)
 			this.price = Number(options.price)
-
+			this.type = options.type
 
 			// this.confirmParam = JSON.parse(decodeURIComponent(option.confirmParam))
 			// this.form.createOrderKey=option.createOrderKey;
@@ -274,6 +275,7 @@
 			uni.$off('updateAddress');
 		},
 		methods: {
+
 			// 获取用户收货地址
 			getUserAddr() {
 				this.userInfo = JSON.parse(uni.getStorageSync("userInfo"))
@@ -281,7 +283,7 @@
 						if (res.code == 200) {
 							console.log("用户收货地址>>>>", res.data)
 							// this.address = res.data;
-							 this.address = res.data.find(item => item.isDefault == 1);
+							this.address = res.data.find(item => item.isDefault == 1);
 						} else {
 							uni.showToast({
 								title: res.msg,
@@ -356,133 +358,99 @@
 				this.form.useIntegral = e ? 1 : 0
 				this.computed()
 			},
-			// confirm(item) {
-			// 	// let data = {type:this.type,cartIds:this.cartIds};
-			// 	confirm(this.confirmParam).then(
-			// 		res => {
-			// 			if (res.code == 200) {
-
-			// 				this.carts = res.carts.map(item => ({
-			// 					...item,
-			// 					markinfo: ""
-			// 				}));
-			// 				this.form.orderKey = res.orderKeys;
-			// 				if (res.address != null) {
-			// 					this.form.addressId = res.address.id;
-			// 					this.address = res.address;
-			// 				}
-			// 				this.computed()
-			// 			} else {
-
-			// 				uni.showToast({
-			// 					icon: 'none',
-			// 					title: res.msg,
-			// 				});
-			// 			}
-			// 		},
-			// 		rej => {}
-			// 	);
-			// },
-			// computed(item) {
-			// 	let data = {
-			// 		createOrderKey: this.form.createOrderKey,
-			// 		couponUserId: this.couponUserId,
-			// 		orderKeys: this.form.orderKey,
-			// 		addressId: this.form.addressId,
-			// 		useIntegral: this.form.useIntegral
-			// 	};
-			// 	computed(data).then(
-			// 		res => {
-			// 			if (res.code == 200) {
-			// 				// this.price=res.data
-			// 				this.price = res.data && res.data.length > 0 ? res.data : []
-			// 				this.priceAll = res.data && res.data.length > 0 ? res.data[res.data.length - 1] : {
-			// 					payPrice: 0,
-			// 					totalPostage: 0,
-			// 					usedIntegral: 0,
-			// 					totalPrice: 0.00,
-			// 				}
-			// 			} else {
-			// 				if (res.code == 501) {
-			// 					uni.showToast({
-			// 						icon: 'none',
-			// 						title: res.msg,
-			// 					});
-			// 					setTimeout(function() {
-			// 						uni.navigateBack({
-			// 							delta: 1
-			// 						})
-			// 					}, 500);
-			// 					return;
-			// 				} else {
-			// 					uni.showToast({
-			// 						icon: 'none',
-			// 						title: res.msg,
-			// 					});
-			// 				}
-
-			// 			}
-			// 		},
-			// 		rej => {}
-			// 	);
-			// },
+			openAddress() {
+				uni.navigateTo({
+					url: '/pages_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;
-						}
-						const orderList = await this.createLiveOrder(); // 等待订单数据返回
-						const orderListStr = encodeURIComponent(JSON.stringify(orderList));
-						uni.navigateTo({
-							url: `/pages_shop/paymentOrder?orderList=${orderListStr}`
+				try {
+					if (this.orderKey == null) {
+						uni.showToast({
+							icon: 'none',
+							title: '订单KEY不存在',
 						});
-					} catch (error) {
-						console.error('订单创建失败:', error);
+						return;
+					}
+					if (this.address == null) {
 						uni.showToast({
-							title: '提交失败',
-							icon: 'none'
+							icon: 'none',
+							title: '收货地址不能为空',
+						});
+						return;
+					}
+					const orderList = await this.createLiveOrder(); // 等待订单数据返回
+					const orderListStr = encodeURIComponent(JSON.stringify(orderList));
+					uni.navigateTo({
+						url: `/pages_shop/paymentOrder?orderList=${orderListStr}`
+					});
+				} catch (error) {
+					console.error('订单创建失败:', error);
+					uni.showToast({
+						title: '提交失败',
+						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_shop/paymentOrder?orderList=${orderListStr}`
+					});
+				} catch (error) {
+					console.error('订单创建失败:', error);
+					uni.showToast({
+						title: '提交失败',
+						icon: 'none'
+					});
 				}
-				// var that=this;
-				// if(this.form.orderKey==null){
-				// 	uni.showToast({
-				// 		icon:'none',
-				// 		title: '订单KEY不存在',
-				// 	});
-				// 	return;
-				// }
-				// if(this.form.addressId==null){
-				// 	uni.showToast({
-				// 		icon:'none',
-				// 		title: '收货地址不能为空',
-				// 	});
-				// 	return;
-				// }
-
-				// uni.requestSubscribeMessage({
-				// 	tmplIds: this.temps,
-				// 	success(res) {
-				// 		 that.createOrder();
-				// 	},
-				// 	fail(res) {
-				// 		that.createOrder();
-				// 	}
-				// })
-
-				,
+			},
+
+			// var that=this;
+			// if(this.form.orderKey==null){
+			// 	uni.showToast({
+			// 		icon:'none',
+			// 		title: '订单KEY不存在',
+			// 	});
+			// 	return;
+			// }
+			// if(this.form.addressId==null){
+			// 	uni.showToast({
+			// 		icon:'none',
+			// 		title: '收货地址不能为空',
+			// 	});
+			// 	return;
+			// }
+
+			// uni.requestSubscribeMessage({
+			// 	tmplIds: this.temps,
+			// 	success(res) {
+			// 		 that.createOrder();
+			// 	},
+			// 	fail(res) {
+			// 		that.createOrder();
+			// 	}
+			// })
+
+
 			// createOrder() {
 			// 	const mark = this.carts.map(item => item.markinfo)
 			// 	var that = this;
@@ -579,12 +547,77 @@
 			// 		},
 			// 		rej => {}
 			// 	);
+			// },// confirm(item) {
+			// 	// let data = {type:this.type,cartIds:this.cartIds};
+			// 	confirm(this.confirmParam).then(
+			// 		res => {
+			// 			if (res.code == 200) {
+
+			// 				this.carts = res.carts.map(item => ({
+			// 					...item,
+			// 					markinfo: ""
+			// 				}));
+			// 				this.form.orderKey = res.orderKeys;
+			// 				if (res.address != null) {
+			// 					this.form.addressId = res.address.id;
+			// 					this.address = res.address;
+			// 				}
+			// 				this.computed()
+			// 			} else {
+
+			// 				uni.showToast({
+			// 					icon: 'none',
+			// 					title: res.msg,
+			// 				});
+			// 			}
+			// 		},
+			// 		rej => {}
+			// 	);
 			// },
-			openAddress() {
-				uni.navigateTo({
-					url: '/pages_user/address'
-				})
-			}
+			// computed(item) {
+			// 	let data = {
+			// 		createOrderKey: this.form.createOrderKey,
+			// 		couponUserId: this.couponUserId,
+			// 		orderKeys: this.form.orderKey,
+			// 		addressId: this.form.addressId,
+			// 		useIntegral: this.form.useIntegral
+			// 	};
+			// 	computed(data).then(
+			// 		res => {
+			// 			if (res.code == 200) {
+			// 				// this.price=res.data
+			// 				this.price = res.data && res.data.length > 0 ? res.data : []
+			// 				this.priceAll = res.data && res.data.length > 0 ? res.data[res.data.length - 1] : {
+			// 					payPrice: 0,
+			// 					totalPostage: 0,
+			// 					usedIntegral: 0,
+			// 					totalPrice: 0.00,
+			// 				}
+			// 			} else {
+			// 				if (res.code == 501) {
+			// 					uni.showToast({
+			// 						icon: 'none',
+			// 						title: res.msg,
+			// 					});
+			// 					setTimeout(function() {
+			// 						uni.navigateBack({
+			// 							delta: 1
+			// 						})
+			// 					}, 500);
+			// 					return;
+			// 				} else {
+			// 					uni.showToast({
+			// 						icon: 'none',
+			// 						title: res.msg,
+			// 					});
+			// 				}
+
+			// 			}
+			// 		},
+			// 		rej => {}
+			// 	);
+			// },
+
 		}
 	}
 </script>
@@ -1068,4 +1101,4 @@
 	.coupon-list .item .text .data .bnt.gray {
 		background-color: #ccc;
 	}
-</style>
+</style>

+ 74 - 64
pages_shop/goods.vue

@@ -132,8 +132,7 @@
 					<view class="desc">24小时营业 · 月售{{}} · 支持预订</view>
 				</view>
 			</view>
-			<button class="goShop"
-				@click="navgetTo('/pages_shop/store?liveId='+liveId)">进店</button>
+			<button class="goShop" @click="navgetTo('/pages_shop/store?liveId='+liveId)">进店</button>
 		</view>
 
 		<!-- 图文详情 -->
@@ -287,9 +286,11 @@
 
 <script>
 	import {
+		liveCartDetails, //获取购物车详情
 		updateConfirm, // 点击取消/支付订单
 		updateLiveOrder, // 取消/支付订单
-		liveOrderKey // 生成订单key
+		liveOrderKey, // 生成订单key
+		addLiveCart // 新增购物车
 	} from "@/api/order.js"
 	import popupBottom from '@/components/px-popup-bottom/px-popup-bottom.vue'
 	import {
@@ -301,6 +302,7 @@
 		},
 		data() {
 			return {
+				goodsId: null,
 				totalNum: 1,
 				orderKey: null,
 				type: null,
@@ -315,10 +317,6 @@
 				buyText: "立即购买",
 				showStorePicker: false,
 				goodsNum: 0, //商品选择数量
-				productValueSelect: {
-					price: 0,
-					serviceFee: 0
-				},
 				attrs: [],
 				values: [],
 				stores: [],
@@ -336,8 +334,8 @@
 				cartCount: 0,
 				// 规格弹窗
 				specVisible: false,
-				// 规格数量
-				specNum: 1,
+				// // 规格数量
+				// specNum: 1,
 				config: null,
 				showServiceFee: false,
 				selectVal: "",
@@ -359,6 +357,7 @@
 				console.log("接收到的productId:", this.productId);
 			}
 			this.liveId = options.liveId
+			this.goodsId = options.goodsId
 			// console.log("options", JSON.stringify(options))
 			// if (options.param) {
 			// 	console.log("param", JSON.stringify(param))
@@ -381,7 +380,69 @@
 		},
 
 		methods: {
+			// getLiveCartDetails() {
+			// 	let data = {
+			// 		productId: this.productId,
+			// 		liveId: this.liveId,
+			// 		goodsId: this.goodsId,
+			// 		cartNum: this.totalNum,
+			// 	};
+			// 	liveCartDetails(data).then(
+			// 		res => {
+			// 			if (res.code == 200) {
+			// 				console.log("加购物车啦", res)
+			// 				this.cartCount = cartRes.data;
+			// 			}
+			// 		},
+			// 		rej => {}
+			// 	);
+
+			// },
+
+			doAddCart(type) {
+				if (this.totalNum == 0) {
+					uni.showToast({
+						icon: 'none',
+						title: "库存不足",
+					});
+					return;
+				}
+				var isBuy = type == "buy" ? 1 : 0;
+				// let data = {
+				// 	isBuy: isBuy,
+				// 	cartNum: this.totalNum,
+				// 	productId: this.productId,
+				// };
+
+				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 => {
@@ -390,7 +451,7 @@
 							this.orderKey = res.orderKey
 							console.log("key>>>>", this.orderKey)
 							uni.navigateTo({
-								url: '/pages_shop/confirmCreateOrder?orderKey=' + this.orderKey + '&liveId=' +
+								url: '/pages_shop/confirmCreateOrder?type=goods&orderKey=' + this.orderKey + '&liveId=' +
 									this.liveId + '&productId=' + this.productId + '&totalNum=' + this
 									.totalNum + '&price=' + this.goosDetail.price
 							})
@@ -434,65 +495,14 @@
 			// 提交
 			submit() {
 				this.specVisible = false
-				this.getKey()
-				// this.doAddCart(this.type);
+				this.doAddCart(this.type);
 			},
 			// 加入购物车
 			addCart(type) {
 				this.type = type;
 				this.specVisible = true
-
-
 			},
-			// doAddCart(type) {
-			// 	if (this.specNum == 0) {
-			// 		uni.showToast({
-			// 			icon: 'none',
-			// 			title: "库存不足",
-			// 		});
-			// 		return;
-			// 	}
-			// 	var isBuy = type == "buy" ? 1 : 0;
-			// 	let data = {
-			// 		isBuy: isBuy,
-			// 		cartNum: this.specNum,
-			// 		productId: this.productValueSelect.productId,
-			// 		attrValueId: this.productValueSelect.id
-			// 	};
-			// 	addCart(data).then(
-			// 		res => {
-			// 			if (res.code == 200) {
-			// 				if (type == "buy") {
-			// 					const selectCarts = [{
-			// 						storeId: this.storeId,
-			// 						data: {
-			// 							type: this.type,
-			// 							cartIds: res.id,
-			// 						}
-			// 					}]
-			// 					uni.navigateTo({
-			// 						url: '/pages/shopping/confirmOrder?type=' + this.type + '&orderType=' +
-			// 							this.orderType + '&confirmParam=' + encodeURIComponent(JSON.stringify(
-			// 								selectCarts))
-			// 					})
-			// 				} else {
-			// 					this.getCartCount()
-			// 					uni.showToast({
-			// 						icon: 'success',
-			// 						title: "添加成功",
-			// 					});
-			// 				}
-			// 			} else {
-			// 				uni.showToast({
-			// 					icon: 'none',
-			// 					title: res.msg,
-			// 				});
-			// 				this.getProductDetails()
-			// 			}
-			// 		},
-			// 		rej => {}
-			// 	);
-			// },
+
 
 			// 跳转页面
 			navgetTo(url) {
@@ -1798,4 +1808,4 @@
 			}
 		}
 	}
-</style>
+</style>

+ 98 - 26
pages_shop/order.vue

@@ -7,7 +7,6 @@
 			<view class="order-list">
 				<view class="order-item" v-for="(item,index) in orderList" :key="index">
 					<view class="order-num">
-						<!-- {{item.}} -->
 						<text>订单号:{{item.orderCode}}</text>
 						<text v-if="item.status==-1">申请退款</text>
 						<text v-else-if="item.status==-2">退货成功</text>
@@ -17,12 +16,13 @@
 						<text v-else-if="item.status==4">待评价</text>
 						<text v-else-if="item.status==5">已完成</text>
 					</view>
-					<view class="order-main">
+					<view class="order-main" v-for="(itm,idx) in item.orderItemList" :key="idx">
 						<view class="img-box">
-							<image src="/static/images/a.jpg"></image>
+							<!-- <image src="/static/images/a.jpg"></image> -->
+							<!-- <image :src=""></image> -->
 						</view>
-						<view class="order-text">
-							<view class="title">{{item.orderName}}</view>
+						<view class="order-text" >
+							<view class="title">{{itm.orderName}}</view>
 							<view class="txt">适用于乏力、头晕等人群,通过问诊可明确诊断给予专业性指导意见。</view>
 							<view class="num">
 								<text>45708 人已购</text>
@@ -30,9 +30,21 @@
 							</view>
 						</view>
 					</view>
-					<view class="order-money">
-						<text class="title">订单金额:</text>
-						<text class="num">¥<text class="bold">{{item.totalPrice}}</text>.00</text>
+					<view class="order-bottom">
+						<view class="order-money">
+							<text class="title">订单金额:</text>
+							<text class="num">¥<text class="bold">{{item.totalPrice}}</text>.00</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" @click="pay(item)" class="button pay">去支付</view>
+							<!-- <view v-if="item.status == 1" class="button">申请售后</view> -->
+							<!-- <view class="button">查看物流</view> -->
+							<!-- <view v-if="item.status == 1" class="button pay">去支付</view>
+							<view v-if="item.status == 1" class="button pay">去支付</view> -->
+						</view>
+						<!-- <view class="button">申请售后</view>
+						<view class="button">查看物流</view> -->
 					</view>
 				</view>
 			</view>
@@ -49,20 +61,45 @@
 			return {
 				orderList: [],
 				tabList: [{
-					name: '全部'
-				}, {
-					name: '待付款'
-				}, {
-					name: '已付款'
-				}]
+						name: "全部",
+						value: ""
+					},
+					{
+						name: "待支付",
+						value: "0"
+					},
+					{
+						name: "待发货",
+						value: "1"
+					},
+					{
+						name: "待收货",
+						value: "2"
+					}, {
+						name: "退款/售后",
+						value: "3"
+					}
+					// {
+					// 	name: "已完成",
+					// 	value: "3"
+					// }
+				]
 			}
 		},
 		mounted() {
 			this.getliveOrderList()
 		},
 		methods: {
+			// 申请售后
+			refund(item) {
+				uni.navigateTo({
+					url: './refundOrderProduct?orderId='+item.id
+				})	
+			},
+				// tab切换
 			tabsClick(item) {
 				console.log('item', item);
+				this.status = item.value
 			},
 
 			// 订单列表
@@ -96,6 +133,10 @@
 		background-color: #FFFFFF;
 	}
 
+	:deep(.u-tabs__wrapper__nav) {
+		width: 100%;
+	}
+
 	.content {
 
 		.order-list {
@@ -164,24 +205,55 @@
 
 				}
 
-				.order-money {
-					.title {
-						font-size: 24rpx;
-						color: #757575;
+				.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;
+							}
+						}
 					}
 
-					.num {
-						font-weight: 600;
-						font-size: 20rpx;
-						color: #FF5C03;
+					.button-group {
+						display: flex;
+						align-items: center;
 
-						.bold {
-							font-weight: bold;
-							font-size: 36rpx;
+						.button {
+							margin-left: 20rpx;
+							padding: 10rpx 24rpx;
+							border-radius: 8rpx;
+							font-weight: 500;
+							font-size: 26rpx;
+						}
+
+
+						.cancel {
+							background-color: #ececec;
+							color: #2c2c2c;
+						}
+
+						.pay {
+							color: #FFFFFF;
+							background: linear-gradient(270deg, #FF5C03 0%, #FFAC64 100%);
 						}
 					}
+
 				}
 			}
 		}
 	}
-</style>
+</style>

+ 14 - 13
pages_shop/paymentOrder.vue

@@ -137,7 +137,7 @@
 						<view>
 							<view class="text">{{order?.orderCode}}</view>
 						</view>
-						<view class="copy-btn" @click="copyOrderSn(orderCode)">复制</view>
+						<!-- <view class="copy-btn" @click="copyOrderSn(order?.orderCode)">复制</view> -->
 					</view>
 				</view>
 				<view class="item">
@@ -416,18 +416,19 @@
 					this.editPayType(e.detail.value)
 				}
 			},
-			copyOrderSn(text) {
-				// 复制方法
-				uni.setClipboardData({
-					data: text,
-					success: () => {
-						uni.showToast({
-							title: '内容已成功复制到剪切板',
-							icon: 'none'
-						})
-					}
-				});
-			},
+			// copyOrderSn(text) {
+			// 	console.log(text)
+			// 	// 复制方法
+			// 	uni.setClipboardData({
+			// 		data: text,
+			// 		success: () => {
+			// 			uni.showToast({
+			// 				title: '内容已成功复制到剪切板',
+			// 				icon: 'none'
+			// 			})
+			// 		}
+			// 	});
+			// },
 			// getStoreOrderById(){
 			// 	var data = {orderId:this.orderId};
 			// 	var that=this;

+ 178 - 170
pages_shop/store.vue

@@ -1,17 +1,17 @@
 <template>
 	<!-- v-show="liveId" -->
-	<view class="content" >
-		<view class="uni-nav-bar" :style="{backgroundColor: `rgba(58, 17, 1,${opacity})`}">
+	<view class="content">
+		<view class="uni-nav-bar" :style="{backgroundColor: `rgba(58, 17, 1,1)`}">
 			<view :style="{height: statusBarHeight + 'px',width: '100%'}"></view>
 			<view class="uni-nav-barbox">
 				<view class="uni-nav-back">
 					<u-icon name="arrow-left" color="#ffffff" size="20" @click="rightClick"></u-icon>
 				</view>
-				<view class="uni-nav-title"
-					:style="{opacity: 1,width:`calc(100vw - 100rpx - ${menuRight} - ${menuWidth})`}">
-					<view class="inputbox" :style="{background: opacity >= 0.6 ? '#6b4d40':'#fff'}" @click="toSearch">
-						<image class="icon-search" src="/static/images/search.png" mode=""></image>
-						<view>搜索店内药品</view>
+				<view class="uni-nav-title">
+					<view class="inputbox" :style="{background: opacity >= 0.6 ? '#6b4d40':'#6b4d40'}"
+						@click="toSearch">
+						<image class="icon-search" src="/static/images/search_white.png"></image>
+						<view>搜索店</view>
 					</view>
 				</view>
 			</view>
@@ -34,18 +34,27 @@
 				</view>
 			</view>
 			<view class="storebox">
-				<u-sticky bgColor="#fff" :offset-top="statusBarHeight + 44">
-					<u-tabs :list="tabbar" :current="current" @click="clickTab" class="u-tabs"></u-tabs>
-				</u-sticky>
 				<!-- 商品 -->
-				<view :style="{height: divHeight,display: current == 0 ? 'flex' : 'none'}" class="medic-box">
-					<view class="cate-list">
+				<view class="medic-box">
+					<!-- <view class="cate-list">
 						<view v-for="(item,index) in cates" :key="index" :class="cateSelect == item.cateId?'item active':'item'" @click="choseCate(item)">
 							{{item.cateName }}</view>
-					</view>
+					</view> -->
 					<view class="medic">
+						<view class="tabs">
+							<u-tabs :list="tabList" lineColor="linear-gradient( 90deg, #FE8227 0%, #FE4E12 100%)"
+								:activeStyle="{
+						             color: '#222222',
+						             fontWeight: '600',
+						             fontSize: '28rpx'
+						         }" :inactiveStyle="{
+						             color: '#757575',
+									 fontSize: '28rpx',
+						           fontWeight: '400'
+						         }" @click="selectTabList"></u-tabs>
+						</view>
 						<!-- 轮播图 -->
-						<view class="banner-box">
+						<!-- <view class="banner-box">
 							<swiper class="swiper" :indicator-dots="true" :circular="true" :autoplay="true"
 								:interval="3000" :duration="1000" indicator-color="rgba(255, 255, 255, 0.6)"
 								indicator-active-color="#ffffff">
@@ -53,15 +62,21 @@
 									<image :src="item.imageUrl" mode=""></image>
 								</swiper-item>
 							</swiper>
-						</view>
+						</view> -->
 						<!-- 药品列表 -->
 						<view class="medic-list">
 							<view class="inner-list">
-								<view class="definite" v-for="(subItem,index) in products" :key="index"	@click="showProductList(subItem)">
+								<view class="definite" v-for="(subItem,index) in products" :key="index"
+									@click="showProductList(subItem)">
 									<view class="img-box">
-										<image :src="subItem.imgUrl" mode="aspectFit"></image>
+										<image :src="subItem.imgUrl" mode="widthFix"></image>
+									</view>
+									<view class="name ellipsis2">{{subItem.productName}}</view>
+									<view class="price">
+										<text class="red"><text style="font-size: 20rpx;">¥</text><text
+												style="font-size: 36rpx;">{{Math.trunc(subItem.price)}}</text>.{{getPureDecimal(subItem.price)?getPureDecimal(subItem.price):'00'}}</text>
+										<text class="del">¥19.80</text>
 									</view>
-									<view class="name ellipsis">{{subItem.productName}}</view>
 								</view>
 							</view>
 						</view>
@@ -99,8 +114,9 @@
 
 <script>
 	import {
-		// 小黄车
-		liveStore, //店铺展示,
+
+		searchStore, //查询店铺
+		liveStore //店铺展示,
 	} from '@/api/live'
 	// import {getProductCate} from '@/api/product';
 	// import {getAdv} from '@/api/adv';
@@ -109,8 +125,14 @@
 	export default {
 		data() {
 			return {
-				products:[],
-				liveId:null,
+				tabList: [{
+					name: '推荐',
+				}, {
+					name: '分类',
+				}],
+				products: [],
+				liveId: null,
+				storeId: null,
 				statusBarHeight: uni.getWindowInfo().statusBarHeight,
 				// 右侧的胶囊距离右侧屏幕距离-px
 				menuRight: uni.getStorageSync('menuInfo').menuRight,
@@ -118,7 +140,6 @@
 				menuWidth: uni.getStorageSync('menuInfo').menuWidth,
 				opacity: 0,
 				opacityTxt: 0,
-				// storeId: "",
 				tabbar: [{
 					name: '商品',
 				}, {
@@ -142,32 +163,25 @@
 			}
 		},
 		onLoad(options) {
+			console.log("接收到的options:", options);
 			if (options.liveId) {
 				this.liveId = options.liveId;
+				this.getliveStore() // 获取小黄车 店铺展示
 				console.log("接收到的liveId:", this.liveId);
 			}
+
+
+
+
+
 			
+				this.storeId = options.storeId || ""
+				this.getSearchStore() //查询店铺
 			
-			
-			
-			this.storeId = options.storeId || ""
-			this.from = options.from || ''
-			if (this.storeId) {
-				this.getStoreInfo()
-				this.getProductCate();
-			} else {
-				uni.showToast({
-					title: "storeId不存在~",
-					icon: "none"
-				})
-			}
-		},
-		mounted() {
-			this.getliveStore() // 获取小黄车 店铺展示
 		},
+
 		onShow() {
 			this.divHeight = `calc(100vh - 44px - 88rpx - ${this.statusBarHeight}px)`
-			// this.getAdv();
 		},
 		onPageScroll(e) {
 			if (e.scrollTop <= 44) {
@@ -180,8 +194,11 @@
 
 		},
 		methods: {
-			
-			//小黄车 店铺展示
+			getPureDecimal(num, precision = 6) {
+				const decimalPart = Math.abs(num).toFixed(precision).split('.')[1];
+				return decimalPart?.replace(/0+$/, '') || ''; // 移除末尾多余的0
+			},
+			//店铺展示
 			getliveStore() {
 				let data = {
 					pageSize: 10,
@@ -201,12 +218,25 @@
 					rej => {}
 				);
 			},
-			
-			
-			
-			
-			
-			
+			//查询店铺
+			getSearchStore() {
+				console.log("查询店铺", this.storeId)
+				searchStore(this.storeId).then(res => {
+						if (res.code == 200) {
+							console.log("查询店铺>>>>", res)
+						} else {
+							uni.showToast({
+								title: res.msg,
+								icon: 'none'
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+
+
+
 			rightClick() {
 				uni.navigateBack()
 			},
@@ -220,25 +250,25 @@
 					urls: this.licenseImagesList
 				});
 			},
-			getStoreInfo() {
-				getStoreById({
-					storeId: this.storeId
-				}).then(
-					res => {
-						if (res.code == 200) {
-							this.storeInfo = res.data || {}
-							// this.licenseImagesList = this.storeInfo.licenseImages ? this.storeInfo.licenseImages.split(',') : []
-
-						} else {
-							uni.showToast({
-								icon: 'none',
-								title: res.msg,
-							});
-						}
-					},
-					rej => {}
-				);
-			},
+			// getStoreInfo() {
+			// 	getStoreById({
+			// 		storeId: this.storeId
+			// 	}).then(
+			// 		res => {
+			// 			if (res.code == 200) {
+			// 				this.storeInfo = res.data || {}
+			// 				// this.licenseImagesList = this.storeInfo.licenseImages ? this.storeInfo.licenseImages.split(',') : []
+
+			// 			} else {
+			// 				uni.showToast({
+			// 					icon: 'none',
+			// 					title: res.msg,
+			// 				});
+			// 			}
+			// 		},
+			// 		rej => {}
+			// 	);
+			// },
 			toSearch() {
 				if (this.from == 'company') {
 					uni.navigateTo({
@@ -281,29 +311,29 @@
 			// 		rej => {}
 			// 	);
 			// },
-			getProductCate() {
-				let data = {};
-				getProductCate(data).then(
-					res => {
-						if (res.code == 200) {
-							this.allCates = res.data;
-							this.cates = this.allCates.filter(function(item) {
-								return item.pid == 0
-							});
-							if (this.cates != null && this.cates.length > 0) {
-								this.cateSelect = this.cates[0].cateId;
-								this.getSubCate()
-							}
-						} else {
-							uni.showToast({
-								icon: 'none',
-								title: "请求失败",
-							});
-						}
-					},
-					rej => {}
-				);
-			},
+			// getProductCate() {
+			// 	let data = {};
+			// 	getProductCate(data).then(
+			// 		res => {
+			// 			if (res.code == 200) {
+			// 				this.allCates = res.data;
+			// 				this.cates = this.allCates.filter(function(item) {
+			// 					return item.pid == 0
+			// 				});
+			// 				if (this.cates != null && this.cates.length > 0) {
+			// 					this.cateSelect = this.cates[0].cateId;
+			// 					this.getSubCate()
+			// 				}
+			// 			} else {
+			// 				uni.showToast({
+			// 					icon: 'none',
+			// 					title: "请求失败",
+			// 				});
+			// 			}
+			// 		},
+			// 		rej => {}
+			// 	);
+			// },
 			// 药品分类选择
 			choseCate(item) {
 				this.cateSelect = item.cateId;
@@ -334,6 +364,10 @@
 </script>
 
 <style scoped lang="scss">
+	:deep(.u-tabs__wrapper__nav) {
+		margin: 0 auto;
+	}
+
 	@mixin u-flex($flexD, $alignI, $justifyC) {
 		display: flex;
 		flex-direction: $flexD;
@@ -348,7 +382,7 @@
 		border-radius: 40rpx;
 		line-height: 60rpx;
 		font-size: 28rpx;
-		color: #999;
+		color: #ffffff;
 
 		.icon-search {
 			width: 28rpx;
@@ -382,8 +416,8 @@
 			font-size: 14px;
 			/* #endif */
 			overflow: hidden;
-			overflow: hidden;
 			white-space: nowrap;
+			width: 100%;
 			text-overflow: ellipsis;
 		}
 
@@ -493,7 +527,6 @@
 
 	.storebox {
 		width: 100%;
-		margin-top: -60rpx;
 		padding-top: 80rpx;
 		background-color: #fff;
 		box-shadow: 0 -20rpx 16rpx #fff;
@@ -531,113 +564,88 @@
 	.medic-box {
 		display: flex;
 
-		.cate-list {
-			box-sizing: border-box;
-			width: 200upx;
-			background: #F2F5F9;
-			display: flex;
-			flex-direction: column;
-			padding: 20upx 0;
-			overflow-y: scroll;
-
-			.item {
-				height: 100upx;
-				line-height: 100upx;
-				padding-left: 30upx;
-				font-size: 28upx;
-				font-family: PingFang SC;
-				font-weight: 500;
-				color: #333333;
-				position: relative;
-
-				&.active {
-					color: #0bb3f2;
-
-					&::after {
-						content: "";
-						width: 8upx;
-						height: 50upx;
-						background: #0bb3f2;
-						position: absolute;
-						top: 25upx;
-						left: 0;
-					}
-				}
-			}
-		}
-
 		.medic {
 			box-sizing: border-box;
-			width: calc(100% - 200upx);
 			height: 100%;
-			padding: 0 30upx;
-
-			.banner-box {
-				margin-top: 30rpx;
-				width: 100%;
-				height: 160upx;
-				border-radius: 10upx;
-				overflow: hidden;
-
-				.swiper,
-				.swiper-item,
-				.swiper-item image {
-					width: 100%;
-					height: 100%;
-				}
-			}
+
+
+			// .banner-box {
+			// 	margin-top: 30rpx;
+			// 	width: 100%;
+			// 	height: 160upx;
+			// 	border-radius: 10upx;
+			// 	overflow: hidden;
+
+			// 	.swiper,
+			// 	.swiper-item,
+			// 	.swiper-item image {
+			// 		width: 100%;
+			// 		height: 100%;
+			// 	}
+			// }
+
 
 			.medic-list {
+				padding: 20upx 30upx;
 				box-sizing: border-box;
-				padding: 30upx 0;
 				overflow-y: auto;
+				background: #F5F7FA;
 				height: calc(100% - 220upx);
 				position: relative;
-				// .item{
-				// 	.title{
-				// 		font-size: 28upx;
-				// 		font-family: PingFang SC;
-				// 		font-weight: bold;
-				// 		color: #333333;
-				// 		padding-top: 20upx;
-				// 		margin-bottom: 30upx;
-				// 	}
-
-				// }
+
 				.inner-list {
 					display: flex;
 					flex-wrap: wrap;
 
 					.definite {
-						width: calc(33% - 20upx);
-						margin-right: 30upx;
+						width: calc(50% - 10upx);
+						margin-right: 20upx;
 						margin-bottom: 30upx;
+						background: #ffffff;
+						border-radius: 16rpx;
 
 						.img-box {
 							width: 100%;
-							height: 144upx;
-							background: #F5F5F5;
-							border-radius: 8upx;
+							height: 343upx;
+							border-radius: 16rpx 16rpx 0rpx 0rpx;
 							overflow: hidden;
 							display: flex;
 							align-items: center;
 
 							image {
-								max-width: 100%;
+								width: 100%;
 							}
 						}
 
 						.name {
 							width: 100%;
-							margin-top: 20upx;
-							font-size: 24upx;
-							font-family: PingFang SC;
-							font-weight: 500;
-							color: #666666;
-							text-align: center;
+							margin-top: 12upx;
+							font-size: 28rpx;
+							color: #222222;
+							padding: 0 20rpx;
+							box-sizing: border-box;
+						}
+
+						.price {
+							padding: 0 20rpx 32rpx;
+							box-sizing: border-box;
+							margin-top: 12rpx;
+
+							.red {
+								font-weight: bold;
+								font-size: 26rpx;
+								color: #FF5C03;
+							}
+
+							.del {
+								margin-left: 16rpx;
+								text-decoration: line-through;
+								font-size: 24rpx;
+								color: #999999;
+							}
 						}
 
-						&:nth-child(3n) {
+						&:nth-child(2n) {
 							margin-right: 0;
 						}
 					}

+ 565 - 0
pages_shop/storeOrder.vue

@@ -0,0 +1,565 @@
+<template>
+	<view>
+		<view class="top-fixed">
+			<!-- tab切换 -->
+			<view class="pub-tab-box">
+				<view class="tab-inner">
+					<view 
+						v-for="(item,index) in orderStatus" 
+						:key="index"
+						:class="status ==item.value?'item active':'item'"
+						@click="orderStatusChange(item)">
+						<view class="text">
+							{{ item.name }}
+							<image v-show="status ==item.value" class="tab-bg" src="/static/images/tab_bg.png" mode=""></image>
+						</view>
+					</view>
+				</view>
+			</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>
+		</view>
+		<view class="top-seat"></view>
+		
+		<!-- 订单列表 -->
+		<!-- <mescroll-body 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 style="padding: 34rpx 0 0;">
+						<view class="storeName" v-show="item.storeName">{{item.storeName|| ''}}</view>
+						<view class="ordersn-box" @click="showDetail(item)">
+							<view class="num">订单号:{{item.orderCode}}</view>
+							<view class="status-box">
+								<!-- <view   class="recom-box">推荐订单</view> -->
+								<text   class="text success">
+									{{utils.getDictLabelName("storeOrderStatus",item.status)}}
+								</text>
+							</view>
+						</view>
+					</view>
+					<!-- 药品列表 -->
+					<view  class="drug-list"  >
+						<view @click="showDetail(item)"  v-if="item.isPackage!=1" v-for="(subItem,subIndex) in item.items" :key="subIndex" class="drug-item" >
+							<view class="img-box">
+								<image :src="JSON.parse(subItem.jsonInfo).image" mode="aspectFill"></image>
+							</view>
+							<view class="drug-info"  >
+								<view>
+									<view class="name-box ellipsis2">
+										<view v-if="subItem.isPrescribe==1" class="tag">处方药</view>{{JSON.parse(subItem.jsonInfo).productName}}
+									</view>
+									<view class="spec ellipsis2">{{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 v-if="item.isPackage==1&&item.packageJson!=null" class="drug-item" @click="showDetail(item)">
+							<view class="img-box">
+								<image :src="JSON.parse(item.packageJson).imgUrl" mode="aspectFill"></image>
+							</view>
+							<view class="drug-info"  >
+								<view>
+									<view class="name-box ellipsis2">
+										<view class="tag">套餐</view>{{JSON.parse(item.packageJson).title}}
+									</view>
+									<view class="spec ellipsis2">{{JSON.parse(item.packageJson).descs}}</view>
+								</view>
+								<!-- <view class="num-box">
+									<view class="price">
+										<text class="unit">¥</text>
+										<text class="num">{{JSON.parse(item.packageJson).payMoney.toFixed(2)}}</text>
+									</view>
+									<view class="amount"></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.payPrice.toFixed(2)}}</view>
+								</view>
+							</view>
+							<view class="btn-box">
+								<view v-if="item.status == 0" class="btn cancel" @click="cancel(item)">取消订单</view>
+								<view v-if="item.status == 0" class="btn pay" @click="pay(item)">支付</view>
+								<view v-if="item.isAfterSales==1" class="btn cancel" @click="refund(item)">申请售后</view>
+								<view v-if="item.status >=2 &&item.deliveryId!=null" class="btn pay" @click.stop="showDelivery(item)">查看物流</view>
+								<!-- <view v-if="item.status==4" class="btn pay">再次购买</view> -->
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+		<!-- </mescroll-body> -->
+	</view>
+</template>
+
+<script>
+	// import {getMyStoreOrderList,cancelOrder} from '@/api/storeOrder'
+	// import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
+	export default {
+		// mixins: [MescrollMixin], 
+		data() {
+			return {
+				searchKey:"",
+				status:0,
+				orderStatus: [
+					{name:"全部",value:""},
+					{name:"待付款",value:"0"},
+					{name:"待发货",value:"1"},
+					{name:"待收货",value:"2"},
+					{name:"已完成",value:"3"}
+				],
+				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: '暂无数据'
+					}
+				},
+				// 列表数据
+				dataList: [],
+			};
+		},
+		onLoad(option) {
+			this.status = option.status
+			var that=this;
+			uni.$on('refreshOrder', () => {
+				that.mescroll.resetUpScroll()
+			});
+		},
+		methods: {
+			goSearch(e) {
+				this.searchKey=e.detail.value;
+				this.mescroll.resetUpScroll()
+			},
+			refund(item) {
+				uni.navigateTo({
+					url: './refundOrderProduct?orderId='+item.id
+				})	
+			},
+			// tab切换
+			orderStatusChange(item) {
+				this.status = item.value
+				this.mescroll.resetUpScroll()
+			},
+			mescrollInit(mescroll) {
+				this.mescroll = mescroll;
+			},
+			/*下拉刷新的回调 */
+			downCallback(mescroll) {
+				mescroll.resetUpScroll()
+			},
+			upCallback(page) {
+				//联网加载数据
+				var that = this;
+				var data = {
+					keyword:this.searchKey,
+					status:this.status,
+					page: page.num,
+					pageSize: page.size
+				};
+				getMyStoreOrderList(data).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) {
+				console.log(item)
+				uni.navigateTo({
+					url: './storeOrderDetail?id=' + item.id
+				})
+			},
+			cancel(item){
+				var that=this;
+				uni.showModal({
+				    title: '提示',
+				    content: '确定取消订单吗',
+				    success: function (res) {
+				        if (res.confirm) {
+							var data = {
+								orderId:item.id
+							};
+							cancelOrder(data).then(res => {
+								if(res.code==200){
+									uni.showToast({
+										icon:'success',
+										title: "操作成功",
+									});
+									 that.mescroll.resetUpScroll()
+								}else{
+									uni.showToast({
+										icon:'none',
+										title: res.msg,
+									});
+								}
+							});
+				        } 
+						else if (res.cancel) {
+							
+				        }
+				    }
+				});
+			},
+			pay(item) {
+				if(item.isPrescribe==1 && item.prescribeId==null){
+					uni.navigateTo({
+						url:"/pages/shopping/prescribe?orderId="+item.id
+					});
+				}
+				else{
+					uni.navigateTo({
+						url: '/pages/shopping/paymentOrder?orderId='+item.id
+					})
+				}
+			},
+			// 查看物流
+			showDelivery(item) {
+				uni.navigateTo({
+					url: './storeOrderDelivery?orderId='+item.id
+				})
+			}
+			
+		}
+	}
+</script>
+
+<style lang="scss">
+	.top-fixed{
+		width: 100%;
+		position: fixed;
+		top: 0;
+		left: 0;
+		z-index: 10;
+	}
+	.pub-tab-box{
+		box-sizing: border-box;
+		width: 100%;
+		padding: 0 40upx;
+		background-color: #FFFFFF;
+		.tab-inner{
+			height: 88upx;
+			line-height: 88upx;
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			overflow-x: auto;
+		}
+		.item{
+			font-size: 28upx;
+			white-space: nowrap;
+			line-height: 1;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #666666;
+			margin-right: 60upx;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			&:last-child{
+				margin-right: 0;
+			}
+			&.active{
+				font-weight: bold;
+				color: #333333;
+			}
+			.text{
+				position: relative;
+				z-index: 1;
+			}
+			.tab-bg{
+				width: 72upx;
+				height: 28upx;
+				position: absolute;
+				top: 17upx;
+				left: 50%;
+				transform: translateX(-36upx);
+				z-index: -1;
+			}
+		}
+	}
+	.top-seat{
+		width: 100%;
+		height: 192upx;
+	}
+	.search-cont{
+		padding: 16upx 30upx;
+		background-color: #FFFFFF;
+		.inner{
+			box-sizing: border-box;
+			width: 100%;
+			height: 72upx;
+			background: #F7F7F7;
+			border-radius: 36upx;
+			display: flex;
+			align-items: center;
+			padding: 0 30upx;
+			.icon-search{
+				width: 28upx;
+				height: 28upx;
+				margin-right: 20upx;
+			}
+			input{
+				height: 60upx;
+				line-height: 60upx;
+				flex: 1;
+			}
+		}
+	}
+	.order-list{
+		padding: 20upx;
+		.item{
+			background: #FFFFFF;
+			border-radius: 16upx;
+			padding: 0 30upx;
+			margin-bottom: 20upx;
+			.storeName {
+				overflow: hidden;
+				white-space: nowrap;
+				text-overflow: ellipsis;
+				font-size: 28rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #111111;
+				margin-bottom: 10rpx;
+			}
+			.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;
+					.recom-box{
+						width: 108upx;
+						height: 30upx;
+						line-height: 30upx;
+						text-align: left;
+						padding-left: 8upx;
+						font-size: 22upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #FFFFFF;
+						background-image: url(../../static/images/recom.png);
+						background-repeat: no-repeat;
+						background-size: 100% 100%;
+						margin-right: 8upx;
+					}
+					.text{
+						font-size: 28upx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						line-height: 1;
+						&.success{
+							color: #0bb3f2;
+						}
+						&.black{
+							color: #111111;
+						}
+						&.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, #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: 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: 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;
+							}
+							&.pay{
+								background: #0bb3f2;
+								color: #FFFFFF;
+							}
+						}
+					}
+				}
+			}
+		}
+	}
+	
+</style>

+ 5 - 4
pages_user/addAddress.vue

@@ -68,7 +68,7 @@
 				content: null,
 				type: null,
 				addressId: null,
-				// isDefault: false,
+				isDefault: false,
 				multiIndex: [0, 0, 0],
 				address: [],
 				addressList: [
@@ -116,6 +116,7 @@
 		methods: {
 			logChange(value) {
 				console.log('isDefault 新值:', value); // 验证值是否更新
+				this.form.isDefault=value?1:0
 			},
 			parseAddress() {
 				if (this.content == null || this.content == "") {
@@ -156,7 +157,7 @@
 					res => {
 						if (res.code == 200) {
 							this.form = res.data;
-							console.log(" this.form", this.form)
+							// console.log(" this.form", JSON.stringify(this.form))
 							this.isDefault = this.form.isDefault == 1 ? true : false;
 							this.form.address = this.form.province + this.form.city + this.form.district
 						} else {
@@ -181,8 +182,8 @@
 
 			},
 			editAddress() {
-				this.form.isDefault=this.isDefault?1:0
-				editAddress(submitData).then(
+				console.log('提交数据:', JSON.stringify(this.form));
+				editAddress(this.form).then(
 					res => {
 						if (res.code == 200) {
 							uni.showToast({

+ 1 - 3
pages_user/address.vue

@@ -52,9 +52,7 @@
 			})
 
 		},
-		// mounted() {
-		// 	this.getUserAddr()
-		// },
+		
 		methods: {
 			// 获取用户收货地址
 			getUserAddr() {

BIN
static/images/search_white.png


+ 6 - 0
unpackage/dist/dev/mp-weixin/api/live.js

@@ -16,6 +16,8 @@ const api = {
   getLiveViewData: (liveId) => `/app/live/liveData/getLiveViewData/${liveId}`,
   // 直播间点赞、关注、在线人数数据
   // 直播订单
+  searchStore: (storeId) => `app/live/store/${storeId}`,
+  // 查询店铺
   liveStore: (liveId) => `/app/live/liveGoods/liveStore/${liveId}`,
   // 店铺展示
   liveGoodsDetail: (productId) => `/app/live/liveGoods/liveGoodsDetail/${productId}`,
@@ -44,6 +46,9 @@ function liveGoodsDetail(productId, data) {
 function liveOrderUser(liveId, data = {}) {
   return request(api.liveOrderUser(liveId), data, "GET", "application/json;charset=UTF-8");
 }
+function searchStore(storeId, data = {}) {
+  return request(api.searchStore(storeId), data, "GET", "application/json;charset=UTF-8");
+}
 function getLiveInfo(liveId, data = {}) {
   return request(api.getLiveInfo(liveId), data, "GET", "application/json;charset=UTF-8");
 }
@@ -59,3 +64,4 @@ exports.liveDataLike = liveDataLike;
 exports.liveGoodsDetail = liveGoodsDetail;
 exports.liveOrderUser = liveOrderUser;
 exports.liveStore = liveStore;
+exports.searchStore = searchStore;

+ 31 - 1
unpackage/dist/dev/mp-weixin/api/order.js

@@ -25,8 +25,22 @@ const api = {
   // 获取省市区
   parseAddress: "/app/userAddress/parseAddress",
   //地址解析 
-  getAddressById: "/app/userAddress/getAddressById"
+  getAddressById: "/app/userAddress/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"
+  //购物车订单
 };
 function createliveOrder(data) {
   return request(api.createliveOrder, data, "POST", "application/json;charset=UTF-8");
@@ -58,13 +72,29 @@ function parseAddress(data) {
 function getAddressById(data) {
   return request(api.getAddressById, data, "GET", "application/json;charset=UTF-8");
 }
+function queryLiveCartList(data) {
+  return request(api.queryLiveCartList, data, "GET", "application/json;charset=UTF-8");
+}
+function addLiveCart(data) {
+  return request(api.addLiveCart, data, "POST", "application/json;charset=UTF-8");
+}
+function modifyLiveCart(data) {
+  return request(api.modifyLiveCart, data, "POST", "application/json;charset=UTF-8");
+}
+function delLiveCart(data) {
+  return request(api.delLiveCart, data, "POST", "application/json;charset=UTF-8");
+}
 exports.addAddress = addAddress;
+exports.addLiveCart = addLiveCart;
 exports.createliveOrder = createliveOrder;
 exports.delAddress = delAddress;
+exports.delLiveCart = delLiveCart;
 exports.editAddress = editAddress;
 exports.getAddressById = getAddressById;
 exports.getCitys = getCitys;
 exports.liveOrderKey = liveOrderKey;
 exports.liveOrderList = liveOrderList;
+exports.modifyLiveCart = modifyLiveCart;
 exports.parseAddress = parseAddress;
+exports.queryLiveCartList = queryLiveCartList;
 exports.userAddr = userAddr;

+ 1 - 0
unpackage/dist/dev/mp-weixin/app.js

@@ -27,6 +27,7 @@ if (!Math) {
   "./pages_shop/confirmCreateOrder.js";
   "./pages_shop/paymentOrder.js";
   "./pages_shop/confirmPackageOrder.js";
+  "./pages_shop/storeOrder.js";
   "./pages_shop/success.js";
   "./pages_user/address.js";
   "./pages_user/addAddress.js";

+ 1 - 0
unpackage/dist/dev/mp-weixin/app.json

@@ -23,6 +23,7 @@
         "confirmCreateOrder",
         "paymentOrder",
         "confirmPackageOrder",
+        "storeOrder",
         "success"
       ]
     },

+ 0 - 3
unpackage/dist/dev/mp-weixin/app.wxss

@@ -21653,9 +21653,6 @@ to {
 .icon-shanchu:before {
   content: "\e6b7";
 }
-.icon-search:before {
-  content: "\e6bf";
-}
 .icon-camera:before {
   content: "\e6c4";
 }

+ 31 - 31
unpackage/dist/dev/mp-weixin/common/assets.js

@@ -1,13 +1,13 @@
 "use strict";
-const _imports_0$f = "/static/images/shipin.png";
-const _imports_0$e = "/static/images/live/return.png";
-const _imports_1$8 = "/static/images/live/like.png";
+const _imports_0$e = "/static/images/shipin.png";
+const _imports_0$d = "/static/images/live/return.png";
+const _imports_1$9 = "/static/images/live/like.png";
 const _imports_2$6 = "/static/images/live/shop.png";
 const _imports_3$2 = "/static/images/live/share.png";
 const _imports_4 = "/static/images/live/shopping.png";
 const _imports_5 = "/static/images/shopping.png";
 const _imports_6 = "/static/images/more-icon.png";
-const _imports_0$d = "/static/images/search.png";
+const _imports_1$8 = "/static/images/search.png";
 const _imports_10 = "/static/images/collect.png";
 const _imports_9 = "/static/images/order.png";
 const _imports_0$c = "/static/images/top.png";
@@ -29,41 +29,41 @@ const _imports_0$6 = "/static/images/googs_service.png";
 const _imports_1$2 = "/static/images/right_arrow.png";
 const _imports_2$1 = "/static/images/googs1.png";
 const _imports_3$1 = "/static/images/googs3.png";
-const _imports_0$5 = "/static/images/a.jpg";
+const _imports_0$5 = "/static/images/search_white.png";
 const _imports_0$4 = "/static/images/arrow_gray.png";
 const _imports_2 = "/static/images/coupon1.png";
 const _imports_3 = "/static/images/coupon2.png";
 const _imports_0$3 = "/static/images/wecha_pay.png";
 const _imports_1$1 = "/static/images/arrow4.png";
-const _imports_0$2 = "/static/images/success.png";
-const _imports_0$1 = "/static/images/del1.png";
+const _imports_0$2 = "/static/images/tab_bg.png";
+const _imports_0$1 = "/static/images/success.png";
+const _imports_0 = "/static/images/del1.png";
 const _imports_1 = "/static/images/edit.png";
-const _imports_0 = "/static/images/like.png";
-exports._imports_0 = _imports_0$f;
+exports._imports_0 = _imports_0$e;
 exports._imports_0$1 = _imports_0$d;
-exports._imports_0$10 = _imports_0$5;
-exports._imports_0$11 = _imports_0$4;
-exports._imports_0$12 = _imports_0$3;
-exports._imports_0$13 = _imports_0$2;
-exports._imports_0$14 = _imports_0$1;
-exports._imports_0$15 = _imports_0;
-exports._imports_0$2 = _imports_0$e;
-exports._imports_0$3 = _imports_0$c;
-exports._imports_0$4 = _imports_0$a;
-exports._imports_0$5 = _imports_0$b;
-exports._imports_0$6 = _imports_0$9;
-exports._imports_0$7 = _imports_0$8;
-exports._imports_0$8 = _imports_0$7;
-exports._imports_0$9 = _imports_0$6;
+exports._imports_0$10 = _imports_0$4;
+exports._imports_0$11 = _imports_0$3;
+exports._imports_0$12 = _imports_0$2;
+exports._imports_0$13 = _imports_0$1;
+exports._imports_0$14 = _imports_0;
+exports._imports_0$2 = _imports_0$c;
+exports._imports_0$3 = _imports_0$a;
+exports._imports_0$4 = _imports_0$b;
+exports._imports_0$5 = _imports_0$9;
+exports._imports_0$6 = _imports_0$8;
+exports._imports_0$7 = _imports_0$7;
+exports._imports_0$8 = _imports_0$6;
+exports._imports_0$9 = _imports_0$5;
 exports._imports_1 = _imports_1$8;
-exports._imports_1$1 = _imports_1$7;
-exports._imports_1$2 = _imports_1$5;
-exports._imports_1$3 = _imports_1$6;
-exports._imports_1$4 = _imports_1$4;
-exports._imports_1$5 = _imports_1$3;
-exports._imports_1$6 = _imports_1$2;
-exports._imports_1$7 = _imports_1$1;
-exports._imports_1$8 = _imports_1;
+exports._imports_1$1 = _imports_1$9;
+exports._imports_1$2 = _imports_1$7;
+exports._imports_1$3 = _imports_1$5;
+exports._imports_1$4 = _imports_1$6;
+exports._imports_1$5 = _imports_1$4;
+exports._imports_1$6 = _imports_1$3;
+exports._imports_1$7 = _imports_1$2;
+exports._imports_1$8 = _imports_1$1;
+exports._imports_1$9 = _imports_1;
 exports._imports_10 = _imports_10;
 exports._imports_2 = _imports_2$6;
 exports._imports_2$1 = _imports_2$5;

+ 2 - 2
unpackage/dist/dev/mp-weixin/common/request.js

@@ -2,7 +2,7 @@
 const common_vendor = require("./vendor.js");
 class Request {
   http(router, data = {}, method, contentType) {
-    let path = "https://live.test.ylrztop.com/prod-api";
+    let path = "http://192.168.10.166:7114";
     common_vendor.index.setStorageSync("requestPath", path);
     common_vendor.index.showLoading({
       title: "加载中"
@@ -50,7 +50,7 @@ class Request {
         fail: (res) => {
         },
         complete: (res) => {
-          if (res.data.code == 401) {
+          if (res.code && res.data.code == 401) {
             return false;
           }
           common_vendor.index.hideLoading();

+ 10 - 0
unpackage/dist/dev/mp-weixin/common/vendor.js

@@ -46841,6 +46841,16 @@ const subPackages = [
           }
         }
       },
+      {
+        path: "storeOrder",
+        style: {
+          navigationBarTitleText: "订单",
+          navigationBarTextStyle: "black",
+          "app-plus": {
+            bounce: "none"
+          }
+        }
+      },
       {
         path: "success",
         style: {

+ 0 - 20
unpackage/dist/dev/mp-weixin/components/Loading.js

@@ -1,20 +0,0 @@
-"use strict";
-const common_vendor = require("../common/vendor.js");
-const _sfc_main = {
-  name: "Loading",
-  props: {
-    loaded: Boolean,
-    loading: Boolean
-  }
-};
-function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
-  return common_vendor.e({
-    a: $props.loading || !$props.loaded
-  }, $props.loading || !$props.loaded ? common_vendor.e({
-    b: $props.loading
-  }, $props.loading ? {} : {}, {
-    c: !$props.loading
-  }, !$props.loading ? {} : {}) : {});
-}
-const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
-wx.createComponent(Component);

+ 0 - 4
unpackage/dist/dev/mp-weixin/components/Loading.json

@@ -1,4 +0,0 @@
-{
-  "component": true,
-  "usingComponents": {}
-}

+ 0 - 1
unpackage/dist/dev/mp-weixin/components/Loading.wxml

@@ -1 +0,0 @@
-<view wx:if="{{a}}" class="Loads acea-row row-center-wrapper" style="margin-top:20rpx"><block wx:if="{{b}}"><view class="iconfont icon-jiazai loading acea-row row-center-wrapper"></view> 正在加载中 </block><block wx:if="{{c}}"> 上拉加载更多 </block></view>

+ 0 - 0
unpackage/dist/dev/mp-weixin/components/Loading.wxss


+ 1 - 1
unpackage/dist/dev/mp-weixin/core/config/defaultConfig.js

@@ -1,5 +1,5 @@
 "use strict";
-const developUrl = "https://live.test.ylrztop.com/prod-api/";
+const developUrl = "http://192.168.10.166:7114/";
 const defaultConfig = {
   // 系统名称
   name: "签约",

+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/auth/h5WxLogin.js

@@ -80,7 +80,7 @@ const _sfc_main = {
 };
 function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
   return {
-    a: common_assets._imports_0$6,
+    a: common_assets._imports_0$5,
     b: common_vendor.o(($event) => $options.loginByMp())
   };
 }

+ 4 - 4
unpackage/dist/dev/mp-weixin/pages/auth/login.js

@@ -428,7 +428,7 @@ const _sfc_main = {
 function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
   return common_vendor.e({
     a: common_vendor.o(($event) => $options.goBack()),
-    b: common_assets._imports_0$5,
+    b: common_assets._imports_0$4,
     c: $data.userName,
     d: common_vendor.o(($event) => $data.userName = $event.detail.value),
     e: $data.password,
@@ -437,16 +437,16 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
     h: common_vendor.o(($event) => $options.goToRegister()),
     i: $data.isApp && $data.isAgreePrivacy
   }, $data.isApp && $data.isAgreePrivacy ? common_vendor.e({
-    j: common_assets._imports_1$3,
+    j: common_assets._imports_1$4,
     k: common_vendor.o((...args) => $options.loginWeixin && $options.loginWeixin(...args)),
     l: $data.isIos
   }, $data.isIos ? {
     m: common_assets._imports_2$2,
     n: common_vendor.o((...args) => $options.quickAppleLogin && $options.quickAppleLogin(...args))
   } : {}) : {}, {
-    o: common_assets._imports_0$4,
+    o: common_assets._imports_0$3,
     p: !$data.agree,
-    q: common_assets._imports_1$2,
+    q: common_assets._imports_1$3,
     r: $data.agree,
     s: common_vendor.o((...args) => $options.handleAgree && $options.handleAgree(...args)),
     t: common_vendor.o(($event) => $options.goToWeb(0)),

+ 2 - 2
unpackage/dist/dev/mp-weixin/pages/auth/loginIndex.js

@@ -90,9 +90,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
     c: common_vendor.o((...args) => $options.submit && $options.submit(...args)),
     d: $data.btnLoading,
     e: common_vendor.o((...args) => $options.handleOtherLogin && $options.handleOtherLogin(...args)),
-    f: common_assets._imports_0$7,
+    f: common_assets._imports_0$6,
     g: !$data.agree,
-    h: common_assets._imports_1$4,
+    h: common_assets._imports_1$5,
     i: $data.agree,
     j: common_vendor.o((...args) => $options.handleAgree && $options.handleAgree(...args)),
     k: common_vendor.o(($event) => $options.goToWeb(0)),

+ 2 - 2
unpackage/dist/dev/mp-weixin/pages/auth/register.js

@@ -137,9 +137,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
     e: $data.password1,
     f: common_vendor.o(($event) => $data.password1 = $event.detail.value),
     g: common_vendor.o((...args) => $options.doRegister && $options.doRegister(...args)),
-    h: common_assets._imports_0$4,
+    h: common_assets._imports_0$3,
     i: !$data.agree,
-    j: common_assets._imports_1$2,
+    j: common_assets._imports_1$3,
     k: $data.agree,
     l: common_vendor.o((...args) => $options.handleAgree && $options.handleAgree(...args)),
     m: common_vendor.o(($event) => $options.goToWeb(0)),

+ 10 - 0
unpackage/dist/dev/mp-weixin/pages/home/index.js

@@ -21,6 +21,7 @@ const _sfc_main = {
     };
   },
   onLoad(option) {
+    this.a();
   },
   onShow() {
     if (common_vendor.index.getStorageSync("AppToken")) {
@@ -28,6 +29,15 @@ const _sfc_main = {
     }
   },
   methods: {
+    a() {
+      common_vendor.index.login({
+        provider: "weixin",
+        success: async (loginRes) => {
+          let code = loginRes.code;
+          console.log("that.code", code);
+        }
+      });
+    },
     open() {
     },
     close() {

+ 2 - 2
unpackage/dist/dev/mp-weixin/pages/home/live.js

@@ -326,10 +326,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
       itemStyle: "width:120rpx;height: 80rpx;"
     }),
     k: common_vendor.o(($event) => $options.getliving()),
-    l: common_assets._imports_0$3,
+    l: common_assets._imports_0$2,
     m: $data.upDown,
     n: common_vendor.o(($event) => $data.upDown = !$data.upDown),
-    o: common_assets._imports_1$1,
+    o: common_assets._imports_1$2,
     p: !$data.upDown,
     q: common_vendor.o(($event) => $data.upDown = !$data.upDown),
     r: $data.acttab == 0

+ 202 - 200
unpackage/dist/dev/mp-weixin/pages/home/living.js

@@ -4,13 +4,15 @@ const api_live = require("../../api/live.js");
 require("../../api/order.js");
 const api_home = require("../../api/home.js");
 const common_assets = require("../../common/assets.js");
-var wsUrl = "ws://live.test.ylrztop.com/prod-api/app/webSocket";
-var pingpangTimes = null;
+var wsUrl = "ws://192.168.10.166:7114/app/webSocket";
 var isSocketOpen = false;
 var socket = null;
 const _sfc_main = {
   data() {
     return {
+      videoUrl: null,
+      showType: 1,
+      //横屏1 竖屏2
       boxHeight: 300,
       //小黄车高度
       isFollow: true,
@@ -36,10 +38,10 @@ const _sfc_main = {
       //点赞按钮控制是否放大
       userinfo: "",
       //用户信息
-      // path: 'http://192.168.10.166/dev-api', //余红奇
-      // path: 'http://v56c9b8e.natappfree.cc', //余红奇
-      path: "live.test.ylrztop.com/prod-api",
+      path: "http://192.168.10.166/dev-api",
       //余红奇
+      // path: 'http://v56c9b8e.natappfree.cc', //余红奇
+      // path: 'live.test.ylrztop.com/prod-api', //余红奇
       // path: 'http://192.168.10.170/dev-api', //陈果
       value: "",
       talkdisabled: false,
@@ -98,39 +100,8 @@ const _sfc_main = {
       //弹幕
       old: {
         scrollTop: 0
-      },
-      liveData: {}
-      //直播间点赞、关注、在线人数数据
-      // shopList: [{
-      // 	title: '史士昊老师四神汤健脾消食疗法',
-      // 	details: '看它来喘口气,小小震撼,',
-      // 	people: '45708 '
-      // },{
-      // 	title: '史士昊老师四神汤健脾消食疗法',
-      // 	details: '看它来喘口气,小小震撼,',
-      // 	people: '45708 '
-      // }],
-      // chatList: [{
-      // 		lable: '达人',
-      // 		name: '锅巴',
-      // 		txt: '中医调节身体确实'
-      // 	},
-      // 	{
-      // 		lable: '',
-      // 		name: '从芯开始',
-      // 		txt: '来了'
-      // 	}
-      // 	{
-      // 		lable: '',
-      // 		name: '北京的帅小伙:',
-      // 		txt: '来了来了,上茶'
-      // 	},
-      // 	{
-      // 		lable: '',
-      // 		name: '萍萍',
-      // 		txt: '来了'
-      // 	}
-      // ]
+      }
+      // liveData: {}, //直播间点赞、关注、在线人数数据
     };
   },
   onLoad(options) {
@@ -144,11 +115,6 @@ const _sfc_main = {
       return this.liveViewers.slice(0, 3);
     }
   },
-  // computed: {
-  // 	 userId() {
-  // 	       return this.$store.state.user.userId
-  // 	     }
-  // },
   mounted() {
     this.getliveViewData();
     this.intervalId = setInterval(() => {
@@ -178,15 +144,19 @@ const _sfc_main = {
     this.videoContext = common_vendor.index.createVideoContext("myVideo");
   },
   onUnload() {
+    this.closeWebSocket();
     if (this.hlsPlayer) {
       this.hlsPlayer.destroy();
-      this.hlsPlayer = null;
+    }
+    if (this.pingpangTimes) {
+      clearInterval(this.pingpangTimes);
     }
   },
   methods: {
     goStore() {
+      console.log("带过去storeId", this.products[0].storeId);
       common_vendor.index.navigateTo({
-        url: "/pages_shop/store?liveId=" + this.liveId
+        url: "/pages_shop/store?liveId=" + this.liveId + "&storeId=" + this.products[0].storeId
       });
     },
     // 去订单列表
@@ -219,40 +189,56 @@ const _sfc_main = {
       }
     },
     getliving() {
+      console.log("获取直播信息");
       const param = {
         id: this.liveId
       };
       api_home.getlive(param).then((res) => {
-        if (res.code == 200) {
-          this.livedata = res.data;
-          this.livingUrl = res.data.livingUrl;
-          if (this.livingUrl && this.livingUrl.indexOf(".m3u8") > -1) {
-            this.$nextTick(() => {
-              if (this.videoContext) {
-                this.videoContext.play();
-              }
-            });
-          } else {
-            if (this.livedata.liveType == 1) {
-              this.autoplay = true;
-              this.livingUrl = res.videoUrl;
-              this.videoContext.seek(this.livedata.nowDuration);
-            } else if (this.livedata.liveType == 2) {
-              this.autoplay = true;
-              this.getLiveinformation();
-            } else {
-              this.autoplay = false;
-              this.placeholderText = "直播开始才能发言讨论";
-              this.talkdisabled = true;
-            }
-          }
-        } else {
+        if (res.code !== 200) {
           common_vendor.index.showToast({
             title: res.msg,
             icon: "none",
             duration: 2e3
           });
+          return;
         }
+        this.livedata = res.data;
+        this.showType = res.showType;
+        if (res.data.liveType === 1) {
+          this.videoUrl = res.data.videoUrl;
+          this.autoplay = true;
+          this.placeholderText = "观看回放中";
+          this.talkdisabled = false;
+        } else if (res.data.liveType === 2) {
+          this.livingUrl = res.data.livingUrl;
+          this.autoplay = true;
+          this.placeholderText = "说点什么...";
+          this.talkdisabled = false;
+        } else {
+          this.livingUrl = "";
+          this.autoplay = false;
+          this.placeholderText = "直播未开始,暂时无法发言";
+          this.talkdisabled = true;
+          return;
+        }
+        this.$nextTick(() => {
+          if (!this.livingUrl)
+            return;
+          if (!this.videoContext) {
+            this.videoContext = common_vendor.index.createVideoContext("myVideo", this);
+          }
+          if (res.data.liveType === 1) {
+            this.videoContext.seek(res.data.nowDuration || 0);
+          } else {
+            this.videoContext.play();
+          }
+        });
+      }).catch((err) => {
+        console.error("获取直播信息失败:", err);
+        common_vendor.index.showToast({
+          title: "获取直播信息失败",
+          icon: "none"
+        });
       });
     },
     maskString(str, maskChar = "*") {
@@ -268,11 +254,8 @@ const _sfc_main = {
     // 返回上一个页面并关闭WebSocket
     goBack() {
       common_vendor.index.navigateBack();
-      closeWebSocket();
+      this.closeWebSocket();
     },
-    // // 收藏商品
-    // collectProducts(){
-    // },
     //直播间点赞、关注、在线人数数据
     getliveViewData() {
       api_live.getLiveViewData(this.liveId).then(
@@ -371,8 +354,8 @@ const _sfc_main = {
       api_live.liveDataLike(this.liveId).then(
         (res) => {
           if (res.code == 200) {
-            if (typeof res.msg === "number" || typeof res.msg === "string" && /^\d+$/.test(res.msg.trim())) {
-              this.liveData++;
+            if (res.like) {
+              this.liveViewData.like++;
             } else {
               common_vendor.index.showToast({
                 title: res.msg,
@@ -391,20 +374,17 @@ const _sfc_main = {
       );
     },
     // 去购买,跳商品详情
-    goShop(item) {
-      console.log("去购买,跳商品详情", item);
+    goShop(productId, goodsId) {
       common_vendor.index.navigateTo({
-        url: "/pages_shop/goods?productId=" + item + "&liveId=" + this.liveId
+        url: "/pages_shop/goods?productId=" + productId + "&liveId=" + this.liveId + "&goodsId=" + goodsId
       });
     },
     // 收藏
     onCollect(item) {
-      console.log("item>>>", item.productId);
-      common_vendor.index.setStorageSync("storeId", storeId);
       let data = {
         liveId: this.liveId,
         productId: item.productId,
-        storeId: this.store.storeId
+        storeId: this.products.storeId
       };
       api_live.collectStore(data).then(
         (res) => {
@@ -509,25 +489,32 @@ const _sfc_main = {
         this.isSubmit = false;
       });
     },
-    handleCheckboxSelect(value) {
-      const index = this.checkboxValue.indexOf(value);
-      console.log(value);
-      if (this.answerlist.type == 1) {
-        this.checkboxValue = [value];
-        this.checkboxFormValue = this.checkboxValue.join(",");
-        this.submitAnswers();
-        console.log(this.checkboxValue);
-      } else if (this.answerlist.type == 2) {
-        if (index > -1) {
-          this.checkboxValue.splice(index, 1);
-          this.checkboxFormValue = this.checkboxValue.join(",");
-        } else {
-          this.checkboxValue.push(value);
-          this.checkboxFormValue = this.checkboxValue.join(",");
-        }
-        console.log(this.checkboxFormValue);
-      }
-    },
+    // handleCheckboxSelect(value) {
+    // 	const index = this.checkboxValue.indexOf(value)
+    // 	console.log(value)
+    // 	if (this.answerlist.type == 1) {
+    // 		this.checkboxValue = [value]
+    // 		this.checkboxFormValue = this.checkboxValue.join(',')
+    // 		setTimeout(() => {
+    // 		      uni.showToast({
+    // 		        title: '准备下一题',
+    // 		        icon: 'none',
+    // 		        duration: 2000
+    // 		      });
+    // 		    }, 1000);
+    // 		this.submitAnswers()
+    // 		console.log(this.checkboxValue)
+    // 	} else if (this.answerlist.type == 2) {
+    // 		if (index > -1) {
+    // 			this.checkboxValue.splice(index, 1)
+    // 			this.checkboxFormValue = this.checkboxValue.join(',')
+    // 		} else {
+    // 			this.checkboxValue.push(value)
+    // 			this.checkboxFormValue = this.checkboxValue.join(',')
+    // 		}
+    // 		console.log(this.checkboxFormValue)
+    // 	}
+    // },
     getAnswerlists() {
       console.log(123);
       const data = {
@@ -615,40 +602,20 @@ const _sfc_main = {
     handleTouchEnd() {
       this.isZoom = false;
     },
-    // getliving() {
-    // 	const param = {
-    // 		id: this.liveId
-    // 	}
-    // 	getlive(param).then(res => {
-    // 		if (res.code == 200) {
-    // 			this.livedata = res.data
-    // 			this.codeimg = res.data.qwQrCode
-    // 			if (this.livedata.status == 1) {
-    // 				this.autoplay = true
-    // 				this.videoContext.seek(this.livedata.nowDuration)
-    // 				// console.log(this.autoplay)
-    // 			} else {
-    // 				this.autoplay = false
-    // 				this.placeholderText = "直播开始才能发言讨论"
-    // 				this.talkdisabled = true
-    // 			}
-    // 			console.log(this.autoplay)
-    // 		} else {
-    // 			uni.showToast({
-    // 				title: res.msg,
-    // 				icon: 'none',
-    // 				duration: 2000
-    // 			});
-    // 		}
-    // 	})
-    // },
     getEWechatSdk() {
     },
     closeWebSocket() {
-      if (socket != null) {
-        common_vendor.index.closeSocket();
+      clearInterval(this.pingpangTimes);
+      clearTimeout(this.reconnectTimer);
+      if (socket && isSocketOpen) {
+        try {
+          common_vendor.index.closeSocket();
+          isSocketOpen = false;
+          console.log("WebSocket已主动关闭");
+        } catch (e) {
+          console.error("关闭WebSocket时出错:", e);
+        }
       }
-      clearInterval(pingpangTimes);
     },
     reConnect() {
       var that = this;
@@ -660,24 +627,49 @@ const _sfc_main = {
         that.initSocket();
       }, 1e4);
     },
+    startHeartbeat() {
+      clearInterval(this.pingpangTimes);
+      console.log("开始心跳检测");
+      this.pingpangTimes = setInterval(() => {
+        if (isSocketOpen) {
+          const pingData = {
+            cmd: "ping",
+            timestamp: (/* @__PURE__ */ new Date()).getTime()
+          };
+          socket.send({
+            data: JSON.stringify(pingData),
+            success: () => {
+              console.log("心跳发送成功");
+            },
+            fail: (err) => {
+              console.error("心跳发送失败:", err);
+              this.scheduleReconnect();
+            }
+          });
+        }
+      }, 3e4);
+    },
     initSocket() {
+      if (this.reconnectCount >= this.maxReconnectAttempts) {
+        console.log("已达到最大重连次数,不再尝试连接");
+        common_vendor.index.showToast({
+          title: "连接失败,请稍后再试",
+          icon: "none"
+        });
+        return;
+      }
       this.userinfo = JSON.parse(common_vendor.index.getStorageSync("userInfo"));
       let signature = common_vendor.CryptoJS.HmacSHA256(
         common_vendor.CryptoJS.enc.Utf8.parse(this.liveId.toString() + this.userinfo.userId + this.userType + this.timestamp),
         common_vendor.CryptoJS.enc.Utf8.parse(this.timestamp)
       ).toString(common_vendor.CryptoJS.enc.Hex);
-      var that = this;
+      this.closeWebSocket();
       socket = common_vendor.index.connectSocket({
-        // url: wsUrl+"?userId=40486&liveId=2",
-        // 	url: wsUrl + "?userId=" + this.userid + "&liveId=" +
-        // this.liveId+"&AppToken="+'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiI0IiwiaWF0IjoxNzQwNzIxMDQ1LCJleHAiOjE3NDEzMjU4NDV9.PgS83JTMSJgVFD6vGAhUsEPbS6Az4yMyX8wVug61TZNTB3092CtvANo-AB9ZG4NdSBLgLrf4litM3vvTk-FK0g',
-        // 
-        // url: wsUrl + "?userId=" + this.userId + "&liveId=" + this.liveId + "&AppToken=" + uni
-        // 	.getStorageSync('AppToken'),
         url: wsUrl + "?userId=" + this.userinfo.userId + "&liveId=" + this.liveId + "&userType=" + this.userType + "&timestamp=" + this.timestamp + "&signature=" + signature,
         multiple: true,
         success: (res) => {
-          clearInterval(pingpangTimes);
+          this.reconnectCount++;
+          clearInterval(this.pingpangTimes);
           common_vendor.index.onSocketMessage((res2) => {
             if (res2.data.code == 500) {
               common_vendor.index.showToast({
@@ -712,44 +704,45 @@ const _sfc_main = {
             }
           });
         },
-        error: (res) => {
+        fail: (res) => {
           common_vendor.index.$emit("websocket", 0);
           console.log(res);
+          this.scheduleReconnect();
         }
       });
       common_vendor.index.onSocketOpen(() => {
         isSocketOpen = true;
-        console.log("WebSocket连接已打开!!");
-        common_vendor.index.showToast({
-          title: "插件已打开",
-          icon: "none"
-        });
+        this.reconnectCount = 0;
+        console.log("WebSocket 连接成功");
+        this.startHeartbeat();
       });
       common_vendor.index.onSocketClose(() => {
         isSocketOpen = false;
-        clearInterval(pingpangTimes);
         console.log("WebSocket连接已关闭!");
-        common_vendor.index.showToast({
-          title: "插件离线",
-          icon: "none"
-        });
-        that.reConnect();
+        this.scheduleReconnect();
       });
-      common_vendor.index.onSocketError(() => {
+      common_vendor.index.onSocketError((err) => {
         isSocketOpen = false;
-        clearInterval(pingpangTimes);
-        console.log("WebSocket连接打开失败");
+        console.error("WebSocket 连接错误:", err);
+        this.scheduleReconnect();
+      });
+    },
+    scheduleReconnect() {
+      if (this.reconnectCount >= this.maxReconnectAttempts) {
+        console.log("已达到最大重连次数,不再尝试连接");
         common_vendor.index.showToast({
-          title: "插件离线",
+          title: "连接失败,请刷新页面重试",
           icon: "none"
         });
-        common_vendor.index.showModal({
-          content: "聊天连接失败是否重新尝试连接",
-          success() {
-            that.reConnect();
-          }
-        });
-      });
+        return;
+      }
+      clearTimeout(this.reconnectTimer);
+      this.closeWebSocket();
+      const delay = Math.min(1e3 * Math.pow(2, this.reconnectCount), 3e4);
+      console.log(`将在 ${delay}ms 后尝试第 ${this.reconnectCount + 1} 次重连`);
+      this.reconnectTimer = setTimeout(() => {
+        this.initSocket();
+      }, delay);
     },
     sendMsg() {
       if (isSocketOpen) {
@@ -800,7 +793,7 @@ if (!Math) {
 function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
   return common_vendor.e({
     a: common_vendor.o((...args) => $options.goBack && $options.goBack(...args)),
-    b: common_assets._imports_0$2,
+    b: common_assets._imports_0$1,
     c: common_vendor.p({
       src: $data.livedata.liveImgUrl,
       size: "32"
@@ -821,7 +814,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
     }),
     j: common_vendor.t($data.liveViewData.online),
     k: common_vendor.o(($event) => $options.onLike()),
-    l: common_assets._imports_1,
+    l: common_assets._imports_1$1,
     m: common_vendor.t($data.liveViewData.like),
     n: common_assets._imports_2,
     o: common_vendor.o(($event) => $options.goStore()),
@@ -829,11 +822,20 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
     q: common_assets._imports_4,
     r: common_vendor.t($data.orderUser.userName ? $options.maskString($data.orderUser.userName) : ""),
     s: common_vendor.t($data.orderUser.count || 0),
-    t: $data.livingUrl,
-    v: $data.autoplay,
-    w: common_vendor.o((...args) => $options.videoError && $options.videoError(...args)),
-    x: $data.isScreen ? "100vh" : "",
-    y: common_vendor.f($data.talklist, (item, index, i0) => {
+    t: $data.livingUrl
+  }, $data.livingUrl ? {
+    v: $data.livingUrl,
+    w: $data.autoplay,
+    x: common_vendor.o((...args) => $options.videoError && $options.videoError(...args))
+  } : {}, {
+    y: $data.videoUrl
+  }, $data.videoUrl ? {
+    z: $data.videoUrl,
+    A: $data.autoplay,
+    B: common_vendor.o((...args) => $options.videoError && $options.videoError(...args))
+  } : {}, {
+    C: $data.isScreen ? "100vh" : "",
+    D: common_vendor.f($data.talklist, (item, index, i0) => {
       return {
         a: common_vendor.t(item.msg),
         b: item.index,
@@ -841,8 +843,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
         d: item.cmd == "announcement"
       };
     }),
-    z: common_vendor.t($data.messageContent),
-    A: common_vendor.f($data.talklist, (item, index, i0) => {
+    E: common_vendor.t($data.messageContent),
+    F: common_vendor.f($data.talklist, (item, index, i0) => {
       return {
         a: common_vendor.t(item.nickName),
         b: common_vendor.t(item.msg),
@@ -851,9 +853,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
         e: item.cmd == "sendMsg"
       };
     }),
-    B: $data.showWelcomeMessage
+    G: $data.showWelcomeMessage
   }, $data.showWelcomeMessage ? {
-    C: common_vendor.f($data.talklist, (item, index, i0) => {
+    H: common_vendor.f($data.talklist, (item, index, i0) => {
       return {
         a: common_vendor.t(item.nickName),
         b: common_vendor.t(item.msg),
@@ -862,13 +864,13 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
         e: item.cmd == "entry" || item.cmd == "out"
       };
     }),
-    D: common_vendor.t($data.messageContent)
+    I: common_vendor.t($data.messageContent)
   } : {}, {
-    E: $data.scrollIntoView,
-    F: common_vendor.o($options.sendMsg),
-    G: common_vendor.o($options.sendMsg),
-    H: common_vendor.o(($event) => $data.value = $event),
-    I: common_vendor.p({
+    J: $data.scrollIntoView,
+    K: common_vendor.o($options.sendMsg),
+    L: common_vendor.o($options.sendMsg),
+    M: common_vendor.o(($event) => $data.value = $event),
+    N: common_vendor.p({
       placeholder: $data.placeholderText,
       border: "none",
       customStyle: "font-size:24rpx;",
@@ -877,32 +879,32 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
       placeholderStyle: "color:#e7e7e7",
       modelValue: $data.value
     }),
-    J: common_assets._imports_5,
-    K: common_vendor.o(($event) => $data.shopping = !$data.shopping),
-    L: common_assets._imports_6,
-    M: common_vendor.o(($event) => $data.showziliao = !$data.showziliao),
-    N: common_vendor.o(($event) => $data.showziliao = !$data.showziliao),
-    O: common_vendor.p({
+    O: common_assets._imports_5,
+    P: common_vendor.o(($event) => $data.shopping = !$data.shopping),
+    Q: common_assets._imports_6,
+    R: common_vendor.o(($event) => $data.showziliao = !$data.showziliao),
+    S: common_vendor.o(($event) => $data.showziliao = !$data.showziliao),
+    T: common_vendor.p({
       name: "close",
       size: "18"
     }),
-    P: $data.livedata.liveDesc,
-    Q: common_vendor.o($options.closes),
-    R: common_vendor.p({
+    U: $data.livedata.liveDesc,
+    V: common_vendor.o($options.closes),
+    W: common_vendor.p({
       show: $data.showziliao,
       round: "20",
       bgColor: "#fffee1"
     }),
-    S: common_vendor.p({
+    X: common_vendor.p({
       src: $data.livedata.liveImgUrl,
       size: "36"
     }),
-    T: common_assets._imports_0$1,
-    U: common_assets._imports_10,
-    V: common_vendor.o((...args) => $options.onCollect && $options.onCollect(...args)),
-    W: common_assets._imports_9,
-    X: common_vendor.o((...args) => $options.goOrderList && $options.goOrderList(...args)),
-    Y: common_vendor.f($data.products, (item, index, i0) => {
+    Y: common_assets._imports_1,
+    Z: common_assets._imports_10,
+    aa: common_vendor.o((...args) => $options.onCollect && $options.onCollect(...args)),
+    ab: common_assets._imports_9,
+    ac: common_vendor.o((...args) => $options.goOrderList && $options.goOrderList(...args)),
+    ad: common_vendor.f($data.products, (item, index, i0) => {
       return common_vendor.e({
         a: item.imgUrl,
         b: common_vendor.t(index + 1),
@@ -914,7 +916,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
         h: common_vendor.o(($event) => $options.onCollect(item), index),
         i: item.status == 1
       }, item.status == 1 ? {
-        j: common_vendor.o(($event) => $options.goShop(item.productId), index)
+        j: common_vendor.o(($event) => $options.goShop(item.productId, item.goodsId), index)
       } : item.status == 0 ? {
         l: common_vendor.o(($event) => $options.goShop(item.productId), index)
       } : {}, {
@@ -922,11 +924,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
         m: index
       });
     }),
-    Z: common_assets._imports_10,
-    aa: $data.boxHeight + "px",
-    ab: common_vendor.o($options.closeshop),
-    ac: common_vendor.o($options.open),
-    ad: common_vendor.p({
+    ae: common_assets._imports_10,
+    af: $data.boxHeight + "px",
+    ag: common_vendor.o($options.closeshop),
+    ah: common_vendor.o($options.open),
+    ai: common_vendor.p({
       show: $data.shopping,
       round: "20rpx",
       bgColor: "#f3f5f9"

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
unpackage/dist/dev/mp-weixin/pages/home/living.wxml


+ 7 - 2
unpackage/dist/dev/mp-weixin/pages/home/living.wxss

@@ -24,6 +24,11 @@
 /* 透明度 */
 /* 文章场景相关 */
 /*自定义主题色 */
+.talk-list.data-v-471975a0 {
+  border-radius: 30rpx;
+  background-color: rgba(33, 33, 33, 0.5);
+  padding: 10rpx 30rpx;
+}
 .content.data-v-471975a0 {
   position: relative;
   z-index: 2;
@@ -65,7 +70,7 @@
 .videolist.data-v-471975a0 {
   position: relative;
 }
-.vedio.data-v-471975a0 {
+.video.data-v-471975a0 {
   height: 100vh;
   /* 占屏幕高度的80% */
   width: 100%;
@@ -96,7 +101,7 @@
   line-height: 60rpx;
 }
 .icon-bg.data-v-471975a0 {
-  background-color: rgba(255, 255, 255, 0.2);
+  background-color: rgba(157, 157, 157, 0.8);
   border-radius: 50%;
   width: 72rpx;
   height: 72rpx;

+ 145 - 150
unpackage/dist/dev/mp-weixin/pages_shop/cart.js

@@ -1,44 +1,60 @@
 "use strict";
 const common_vendor = require("../common/vendor.js");
+const api_order = require("../api/order.js");
 const common_assets = require("../common/assets.js");
-const likeProduct = () => "./components/likeProduct.js";
 const _sfc_main = {
-  components: {
-    likeProduct
-  },
+  // components: {
+  // 	likeProduct
+  // },
   data() {
     return {
+      shopList: [],
       totalMoney: 0,
-      carts: [],
+      // carts: [],
       checkAll: false
     };
   },
   onLoad() {
   },
-  onShow() {
-    this.getCarts();
-  },
   onReachBottom() {
   },
+  mounted() {
+    this.queryLiveCart();
+  },
   methods: {
-    delCart() {
-      var selectCarts = this.carts.flatMap((item) => item.list.filter((listItem) => listItem.checked === true)).map((el) => el.id);
-      if (selectCarts.length == 0) {
-        common_vendor.index.showToast({
-          icon: "none",
-          title: "请选择商品删除"
-        });
-        return;
-      }
-      let data = { ids: selectCarts };
-      delCart(data).then(
+    // 获得key
+    getKey() {
+      api_order.liveOrderKey().then(
         (res) => {
           if (res.code == 200) {
+            console.log("下订单的key>>>>", res);
+            this.orderKey = res.orderKey;
+            console.log("key>>>>", this.orderKey);
+            common_vendor.index.navigateTo({
+              url: "/pages_shop/confirmCreateOrder?type=cart&orderKey=" + this.orderKey
+            });
+          } else {
             common_vendor.index.showToast({
-              icon: "success",
-              title: "操作成功"
+              title: res.msg,
+              icon: "none"
             });
-            this.getCarts();
+          }
+        },
+        (rej) => {
+        }
+      );
+    },
+    // 修改购物车
+    modifyLiveCart(item) {
+      let data = {
+        checked: item.checked,
+        cartId: item.cartId,
+        cartNum: item.cartNum
+      };
+      api_order.modifyLiveCart(data).then(
+        (res) => {
+          if (res.code == 200) {
+            this.computedMoney();
           } else {
             common_vendor.index.showToast({
               icon: "none",
@@ -49,43 +65,93 @@ const _sfc_main = {
         (rej) => {
         }
       );
-      console.log(selectCarts);
     },
-    computedMoney() {
-      var money = 0;
-      this.carts.forEach((item, index, arr) => {
-        item.list.forEach((it) => {
-          if (it.checked) {
-            money += it.price * it.cartNum;
+    // modifyLiveCartList() {
+    // 	modifyLiveCart().then(
+    // 		res => {
+    // 			if (res.code == 200) {
+    // 				this.shopList = res.rows;
+    // 				console.log(this.shopList)
+    // 				console.log(res.rows)
+    // 				this.shopList.forEach(item => {
+    // 					item.checked == 1 ? true : false
+    // 				});
+    // 				// this.computedMoney();
+    // 			} else {
+    // 				uni.showToast({
+    // 					icon: 'none',
+    // 					title: "请求失败",
+    // 				});
+    // 			}
+    // 		},
+    // 		rej => {}
+    // 	);
+    // },
+    // 查询购物车列表
+    queryLiveCart() {
+      api_order.queryLiveCartList().then(
+        (res) => {
+          if (res.code == 200) {
+            this.shopList = res.rows;
+            this.shopList.forEach((item) => {
+              item.checked == 1 ? true : false;
+            });
+          } else {
+            common_vendor.index.showToast({
+              icon: "none",
+              title: "请求失败"
+            });
           }
+        },
+        (rej) => {
+        }
+      );
+    },
+    // 删除购物车
+    delCart() {
+      const data = this.shopList.filter((item) => item.checked).map((item) => item.cartId);
+      if (data.length === 0) {
+        common_vendor.index.showToast({
+          icon: "none",
+          title: "请选择商品删除"
         });
+        return;
+      }
+      api_order.delLiveCart(data).then((res) => {
+        if (res.code === 200) {
+          common_vendor.index.showToast({
+            icon: "success",
+            title: "操作成功"
+          });
+          this.queryLiveCart();
+        } else {
+          common_vendor.index.showToast({
+            icon: "none",
+            title: res.msg
+          });
+        }
       });
-      console.log(money);
-      this.totalMoney = money;
     },
+    // 计算价格
+    computedMoney() {
+      this.totalMoney = this.shopList.reduce((total, item) => {
+        return total + (item.checked ? item.price * item.cartNum : 0);
+      }, 0);
+    },
+    // 全选
     handleCheckAll() {
       this.checkAll = !this.checkAll;
-      var that = this;
-      this.carts.forEach((item, index, arr) => {
-        item.checked = that.checkAll;
-        item.list.forEach((it) => {
-          it.checked = that.checkAll;
-        });
-      });
-      this.computedMoney();
-    },
-    checkShopChange(item) {
-      item.checked = !item.checked;
-      item.list.forEach((it) => {
-        it.checked = item.checked;
+      this.shopList.forEach((item) => {
+        item.checked = this.checkAll;
       });
       this.computedMoney();
     },
+    //选择
     checkChange(item, shop) {
       item.checked = !item.checked;
-      shop.checked = shop.list.every((it) => it.checked == true);
-      this.computedMoney();
+      this.computedMoney(item.checked);
     },
+    // 改数量
     changeNum(e, item) {
       item.cartNum = e.detail.value.replace(/\D/g, "");
       if (item.cartNum <= 1) {
@@ -102,51 +168,7 @@ const _sfc_main = {
       if (item.cartNum >= item.stock) {
         item.cartNum = item.stock;
       }
-      this.changeCartNum(item);
-    },
-    changeCartNum(item) {
-      let data = { number: item.cartNum, id: item.id };
-      cartNum(data).then(
-        (res) => {
-          if (res.code == 200) {
-            common_vendor.index.showToast({
-              icon: "none",
-              title: "操作成功"
-            });
-            this.computedMoney();
-          } else {
-            common_vendor.index.showToast({
-              icon: "none",
-              title: res.msg
-            });
-          }
-        },
-        (rej) => {
-        }
-      );
-    },
-    getCarts() {
-      getCarts().then(
-        (res) => {
-          if (res.code == 200) {
-            this.carts = res.carts;
-            this.carts.forEach((item) => {
-              item.checked = false;
-              item.list.forEach((it) => {
-                it.checked = false;
-              });
-            });
-            this.computedMoney();
-          } else {
-            common_vendor.index.showToast({
-              icon: "none",
-              title: "请求失败"
-            });
-          }
-        },
-        (rej) => {
-        }
-      );
+      this.modifyLiveCart(item);
     },
     // 购物车减法
     delNum(item) {
@@ -162,96 +184,69 @@ const _sfc_main = {
       if (item.cartNum < 1) {
         item.cartNum = 1;
       }
-      this.changeCartNum(item);
+      this.modifyLiveCart(item);
     },
     // 购物车加法
     addNum(item) {
-      console.log(item);
       item.cartNum++;
       if (item.cartNum >= item.stock) {
         item.cartNum = item.stock;
       }
-      this.changeCartNum(item);
+      this.modifyLiveCart(item);
     },
     // 结算
     submit() {
-      let selectCarts = this.carts.filter((item) => item.list.some((listItem) => listItem.checked === true)).map((item) => ({
-        storeId: item.list[0].storeId || "",
-        data: {
-          type: "cart",
-          cartIds: item.list.filter((it) => it.checked == true).map((it) => it.id).join(",")
-        }
-      }));
-      if (selectCarts.length == 0) {
+      const selectedItems = this.shopList.filter((item) => item.checked);
+      if (selectedItems.length === 0) {
         common_vendor.index.showToast({
           icon: "none",
           title: "请选择商品"
         });
         return;
       }
-      common_vendor.index.navigateTo({
-        url: "./confirmOrder?type=cart&confirmParam=" + encodeURIComponent(JSON.stringify(selectCarts))
-      });
+      this.getKey();
     },
     showProduct(item) {
       common_vendor.index.navigateTo({
-        url: "../shopping/productDetails?productId=" + item.productId
+        url: "./goods?productId=" + item.productId
       });
     }
   }
 };
-if (!Array) {
-  const _component_likeProduct = common_vendor.resolveComponent("likeProduct");
-  _component_likeProduct();
-}
 function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
   return common_vendor.e({
-    a: common_vendor.f($data.carts, (shop, idx, i0) => {
+    a: common_vendor.f($data.shopList, (item, index, i0) => {
       return common_vendor.e({
-        a: shop.storeName && shop.storeName != "null"
-      }, shop.storeName && shop.storeName != "null" ? {
-        b: shop.checked,
-        c: shop.checked,
-        d: common_vendor.o(($event) => $options.checkShopChange(shop), idx),
-        e: common_vendor.t(shop.storeName)
-      } : {}, {
-        f: common_vendor.f(shop.list, (item, index, i1) => {
-          return common_vendor.e({
-            a: item.checked,
-            b: item.checked,
-            c: common_vendor.o(($event) => $options.checkChange(item, shop), index),
-            d: item.productAttrImage == null || item.productAttrImage == "" ? item.productImage : item.productAttrImage,
-            e: common_vendor.t(_ctx.utils.getDictLabelName("storeProductType", item.productType)),
-            f: common_vendor.t(item.productName),
-            g: common_vendor.t(item.productAttrName),
-            h: common_vendor.t(item.price),
-            i: item.cartNum <= 1
-          }, item.cartNum <= 1 ? {
-            j: common_assets._imports_0$8
-          } : {
-            k: common_assets._imports_1$5
-          }, {
-            l: common_vendor.o(($event) => $options.delNum(item), index),
-            m: common_vendor.o(($event) => $options.changeNum($event, item), index),
-            n: item.cartNum,
-            o: common_vendor.o(($event) => $options.addNum(item), index),
-            p: index
-          });
-        }),
-        g: idx
+        a: item.checked,
+        b: item.checked,
+        c: common_vendor.o(($event) => $options.checkChange(item, _ctx.shop), index),
+        d: common_vendor.o(($event) => $options.showProduct(item), index),
+        e: item.imgUrl,
+        f: common_vendor.t(item.productName),
+        g: common_vendor.t(item.price),
+        h: item.cartNum <= 1
+      }, item.cartNum <= 1 ? {
+        i: common_assets._imports_0$7
+      } : {
+        j: common_assets._imports_1$6
+      }, {
+        k: common_vendor.o(($event) => $options.delNum(item), index),
+        l: common_vendor.o(($event) => $options.changeNum($event, item), index),
+        m: item.cartNum,
+        n: common_vendor.o(($event) => $options.addNum(item), index),
+        o: index
       });
     }),
     b: common_assets._imports_2$4,
-    c: $data.carts.length == 0
-  }, $data.carts.length == 0 ? {
+    c: $data.shopList.length == 0
+  }, $data.shopList.length == 0 ? {
     d: common_assets._imports_2$3
   } : {}, {
-    e: common_vendor.sr("product", "50e5f29e-0"),
-    f: $data.checkAll,
-    g: common_vendor.o(($event) => $options.handleCheckAll()),
-    h: common_vendor.o(($event) => $options.delCart()),
-    i: common_vendor.t($data.totalMoney.toFixed(2)),
-    j: common_vendor.o((...args) => $options.submit && $options.submit(...args))
+    e: $data.checkAll,
+    f: common_vendor.o(($event) => $options.handleCheckAll()),
+    g: common_vendor.o(($event) => $options.delCart()),
+    h: common_vendor.t($data.totalMoney.toFixed(2)),
+    i: common_vendor.o((...args) => $options.submit && $options.submit(...args))
   });
 }
 const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);

+ 1 - 3
unpackage/dist/dev/mp-weixin/pages_shop/cart.json

@@ -1,6 +1,4 @@
 {
   "navigationBarTitleText": "购物车",
-  "usingComponents": {
-    "like-product": "./components/likeProduct"
-  }
+  "usingComponents": {}
 }

+ 1 - 1
unpackage/dist/dev/mp-weixin/pages_shop/cart.wxml

@@ -1 +1 @@
-<view class="content"><view wx:for="{{a}}" wx:for-item="shop" wx:key="g" class="shopbox"><view wx:if="{{shop.a}}" class="shopbox-name"><label style="margin-right:30upx"><checkbox value="{{shop.b}}" checked="{{shop.c}}" bindtap="{{shop.d}}"/></label><text>{{shop.e}}</text></view><view class="goods-list"><view wx:for="{{shop.f}}" wx:for-item="item" wx:key="p" class="item"><label style="margin-right:30upx"><checkbox value="{{item.a}}" checked="{{item.b}}" bindtap="{{item.c}}"/></label><image class="goods-img" src="{{item.d}}" mode="aspectFit"></image><view class="info-box"><view><view class="title-box"><view class="tag">{{item.e}}</view><view class="title ellipsis">{{item.f}}</view></view><view class="intro ellipsis">{{item.g}}</view></view><view class="price-num"><view class="price"><text class="unit">¥</text><text class="text">{{item.h}}</text></view><view class="num-box"><view class="img-box" bindtap="{{item.l}}"><image wx:if="{{item.i}}" src="{{item.j}}" mode=""></image><image wx:else src="{{item.k}}" mode=""></image></view><input type="number" bindchange="{{item.m}}" value="{{item.n}}"/><view class="img-box" bindtap="{{item.o}}"><image src="{{b}}" mode=""></image></view></view></view></view></view></view></view><view wx:if="{{c}}" class="no-data-box"><image src="{{d}}" mode="aspectFit"></image><view class="empty-title">暂无数据</view></view><view class="like-product"><like-product class="r" u-r="product" u-i="50e5f29e-0" bind:__l="__l"/></view><view class="btn-foot"><view class="left"><label><checkbox checked="{{f}}" bindtap="{{g}}"/></label><text class="text">全选</text><text class="text" bindtap="{{h}}">删除</text></view><view class="right"><view class="total"><text class="label">合计:</text><view class="price"><text class="unit">¥</text><text class="num">{{i}}</text></view></view><view class="btn" bindtap="{{j}}">结算</view></view></view></view>
+<view class="content"><view class="shopbox"><view class="goods-list"><view wx:for="{{a}}" wx:for-item="item" wx:key="o" class="item"><label style="margin-right:30upx"><checkbox value="{{item.a}}" checked="{{item.b}}" bindtap="{{item.c}}"/></label><image class="goods-img" bindtap="{{item.d}}" src="{{item.e}}" mode="aspectFit"></image><view class="info-box"><view><view class="title-box"><view class="title ellipsis">{{item.f}}</view></view></view><view class="price-num"><view class="price"><text class="unit">¥</text><text class="text">{{item.g}}</text></view><view class="num-box"><view class="img-box" bindtap="{{item.k}}"><image wx:if="{{item.h}}" src="{{item.i}}" mode=""></image><image wx:else src="{{item.j}}" mode=""></image></view><input type="number" bindchange="{{item.l}}" value="{{item.m}}"/><view class="img-box" bindtap="{{item.n}}"><image src="{{b}}" mode=""></image></view></view></view></view></view></view></view><view wx:if="{{c}}" class="no-data-box"><image src="{{d}}" mode="aspectFit"></image><view class="empty-title">暂无数据</view></view><view class="btn-foot"><view class="left"><label><checkbox checked="{{e}}" bindtap="{{f}}"/></label><text class="text">全选</text><text class="text" bindtap="{{g}}">删除</text></view><view class="right"><view class="total"><text class="label">合计:</text><view class="price"><text class="unit">¥</text><text class="num">{{h}}</text></view></view><view class="btn" bindtap="{{i}}">结算</view></view></view></view>

+ 8 - 0
unpackage/dist/dev/mp-weixin/pages_shop/cart.wxss

@@ -36,6 +36,11 @@ page {
   border-radius: 16rpx;
   margin-bottom: 20rpx;
 }
+.content .no-data-box {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+}
 .content .shopbox-name {
   padding: 30rpx 30rpx 0 30rpx;
   font-family: PingFang SC, PingFang SC;
@@ -46,6 +51,9 @@ page {
   white-space: nowrap;
   text-overflow: ellipsis;
 }
+.content .goods-list {
+  padding-bottom: 140rpx;
+}
 .content .goods-list .item {
   box-sizing: border-box;
   height: 221rpx;

+ 0 - 87
unpackage/dist/dev/mp-weixin/pages_shop/components/likeProduct.js

@@ -1,87 +0,0 @@
-"use strict";
-const common_vendor = require("../../common/vendor.js");
-const common_assets = require("../../common/assets.js");
-const Loading = () => "../../components/Loading.js";
-const _sfc_main = {
-  components: { Loading },
-  name: "likeProduct",
-  data() {
-    return {
-      page: {
-        page: 1,
-        pageSize: 10
-      },
-      total: 0,
-      list: [],
-      loaded: false,
-      loading: false
-    };
-  },
-  created() {
-  },
-  mounted() {
-    this.getGoodsProducts();
-  },
-  methods: {
-    getGoodsProducts() {
-      console.log(1);
-      var that = this;
-      if (that.loaded == true || that.loading == true)
-        return;
-      that.loading = true;
-      common_vendor.index.showLoading({
-        title: "加载中..."
-      });
-      getGoodsProducts(that.page).then(
-        (res) => {
-          if (res.code == 200) {
-            that.total = res.data.total;
-            that.list.push.apply(that.list, res.data.list);
-            that.loading = false;
-            that.loaded = that.list.length < that.total ? false : true;
-            that.page.page = that.page.page + 1;
-            common_vendor.index.hideLoading();
-          }
-        },
-        (err) => {
-          common_vendor.index.hideLoading();
-          common_vendor.index.showToast({
-            title: err.msg,
-            icon: "none",
-            duration: 2e3
-          });
-        }
-      );
-    },
-    showProduct(item) {
-      common_vendor.index.navigateTo({
-        url: "/pages/shopping/productDetails?productId=" + item.productId
-      });
-    }
-  }
-};
-if (!Array) {
-  const _component_Loading = common_vendor.resolveComponent("Loading");
-  _component_Loading();
-}
-function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
-  return {
-    a: common_assets._imports_0$15,
-    b: common_vendor.f($data.list, (item, index, i0) => {
-      return {
-        a: item.image,
-        b: common_vendor.t(item.productName),
-        c: common_vendor.t(item.price.toFixed(2)),
-        d: common_vendor.t(item.otPrice.toFixed(2)),
-        e: index,
-        f: common_vendor.o(($event) => $options.showProduct(item), index)
-      };
-    }),
-    c: common_vendor.p({
-      loaded: $data.loaded,
-      loading: $data.loading
-    })
-  };
-}
-const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
-wx.createComponent(Component);

+ 0 - 6
unpackage/dist/dev/mp-weixin/pages_shop/components/likeProduct.json

@@ -1,6 +0,0 @@
-{
-  "component": true,
-  "usingComponents": {
-    "loading": "../../components/Loading"
-  }
-}

+ 0 - 1
unpackage/dist/dev/mp-weixin/pages_shop/components/likeProduct.wxml

@@ -1 +0,0 @@
-<view><view class="like-title"><image src="{{a}}" mode=""></image><text class="text">猜你喜欢</text></view><view class="like-list"><view wx:for="{{b}}" wx:for-item="item" wx:key="e" class="item" bindtap="{{item.f}}"><view class="img-box"><image src="{{item.a}}" mode=""></image></view><view class="info-box"><view class="title ellipsis2">{{item.b}}</view><view class="price-box"><view class="now"><text class="unit">¥</text><text class="num">{{item.c}}</text></view><view class="old">¥{{item.d}}</view></view></view></view></view><loading wx:if="{{c}}" u-i="741c0e5d-0" bind:__l="__l" u-p="{{c}}"></loading></view>

+ 0 - 115
unpackage/dist/dev/mp-weixin/pages_shop/components/likeProduct.wxss

@@ -1,115 +0,0 @@
-/**
- * 这里是uni-app内置的常用样式变量
- *
- * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
- * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
- *
- */
-/**
- * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
- *
- * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
- */
-/* 颜色变量 */
-/* 行为相关颜色 */
-/* 文字基本颜色 */
-/* 背景颜色 */
-/* 边框颜色 */
-/* 尺寸变量 */
-/* 文字尺寸 */
-/* 图片尺寸 */
-/* Border Radius */
-/* 水平间距 */
-/* 垂直间距 */
-/* 透明度 */
-/* 文章场景相关 */
-/*自定义主题色 */
-.like-title {
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  padding: 30rpx 0;
-}
-.like-title image {
-  width: 37rpx;
-  height: 37rpx;
-  margin-right: 20rpx;
-}
-.like-title .text {
-  font-size: 36rpx;
-  font-family: PingFang SC;
-  font-weight: bold;
-  color: #111111;
-  line-height: 1;
-}
-.like-list {
-  display: flex;
-  flex-wrap: wrap;
-}
-.like-list .item {
-  margin-right: 20rpx;
-  margin-bottom: 20rpx;
-  width: 345rpx;
-  background: #FFFFFF;
-  box-shadow: 0px 0px 10rpx 4rpx rgba(199, 199, 199, 0.22);
-  border-radius: 20rpx;
-  overflow: hidden;
-}
-.like-list .item:nth-child(2n) {
-  margin-right: 0;
-}
-.like-list .item .img-box {
-  width: 100%;
-  height: 334rpx;
-}
-.like-list .item .img-box image {
-  width: 100%;
-  height: 100%;
-}
-.like-list .item .info-box {
-  box-sizing: border-box;
-  height: 182rpx;
-  padding: 20rpx 20rpx 30rpx;
-  display: flex;
-  flex-direction: column;
-  justify-content: space-between;
-}
-.like-list .item .info-box .title {
-  font-size: 26rpx;
-  font-family: PingFang SC;
-  font-weight: 500;
-  color: #111111;
-  line-height: 40rpx;
-}
-.like-list .item .info-box .price-box {
-  display: flex;
-  align-items: flex-end;
-}
-.like-list .item .info-box .price-box .now {
-  display: flex;
-  align-items: flex-end;
-  margin-right: 20rpx;
-}
-.like-list .item .info-box .price-box .now .unit {
-  font-size: 24rpx;
-  font-family: PingFang SC;
-  font-weight: 500;
-  color: #FF6633;
-  line-height: 1.2;
-  margin-right: 4rpx;
-}
-.like-list .item .info-box .price-box .now .num {
-  font-size: 36rpx;
-  font-family: PingFang SC;
-  font-weight: bold;
-  color: #FF6633;
-  line-height: 1;
-}
-.like-list .item .info-box .price-box .old {
-  font-size: 26rpx;
-  font-family: PingFang SC;
-  font-weight: 500;
-  text-decoration: line-through;
-  color: #BBBBBB;
-  line-height: 1.1;
-}

+ 128 - 74
unpackage/dist/dev/mp-weixin/pages_shop/confirmCreateOrder.js

@@ -60,6 +60,7 @@ const _sfc_main = {
     this.productId = options.productId;
     this.totalNum = Number(options.totalNum);
     this.price = Number(options.price);
+    this.type = options.type;
   },
   mounted() {
     this.getUserAddr();
@@ -151,73 +152,11 @@ const _sfc_main = {
       this.form.useIntegral = e ? 1 : 0;
       this.computed();
     },
-    // confirm(item) {
-    // 	// let data = {type:this.type,cartIds:this.cartIds};
-    // 	confirm(this.confirmParam).then(
-    // 		res => {
-    // 			if (res.code == 200) {
-    // 				this.carts = res.carts.map(item => ({
-    // 					...item,
-    // 					markinfo: ""
-    // 				}));
-    // 				this.form.orderKey = res.orderKeys;
-    // 				if (res.address != null) {
-    // 					this.form.addressId = res.address.id;
-    // 					this.address = res.address;
-    // 				}
-    // 				this.computed()
-    // 			} else {
-    // 				uni.showToast({
-    // 					icon: 'none',
-    // 					title: res.msg,
-    // 				});
-    // 			}
-    // 		},
-    // 		rej => {}
-    // 	);
-    // },
-    // computed(item) {
-    // 	let data = {
-    // 		createOrderKey: this.form.createOrderKey,
-    // 		couponUserId: this.couponUserId,
-    // 		orderKeys: this.form.orderKey,
-    // 		addressId: this.form.addressId,
-    // 		useIntegral: this.form.useIntegral
-    // 	};
-    // 	computed(data).then(
-    // 		res => {
-    // 			if (res.code == 200) {
-    // 				// this.price=res.data
-    // 				this.price = res.data && res.data.length > 0 ? res.data : []
-    // 				this.priceAll = res.data && res.data.length > 0 ? res.data[res.data.length - 1] : {
-    // 					payPrice: 0,
-    // 					totalPostage: 0,
-    // 					usedIntegral: 0,
-    // 					totalPrice: 0.00,
-    // 				}
-    // 			} else {
-    // 				if (res.code == 501) {
-    // 					uni.showToast({
-    // 						icon: 'none',
-    // 						title: res.msg,
-    // 					});
-    // 					setTimeout(function() {
-    // 						uni.navigateBack({
-    // 							delta: 1
-    // 						})
-    // 					}, 500);
-    // 					return;
-    // 				} else {
-    // 					uni.showToast({
-    // 						icon: 'none',
-    // 						title: res.msg,
-    // 					});
-    // 				}
-    // 			}
-    // 		},
-    // 		rej => {}
-    // 	);
-    // },
+    openAddress() {
+      common_vendor.index.navigateTo({
+        url: "/pages_user/address"
+      });
+    },
     // 提交订单
     async submitOrder() {
       try {
@@ -248,6 +187,60 @@ const _sfc_main = {
         });
       }
     },
+    // 购物车支付订单
+    async creatCartOrder() {
+      try {
+        if (this.orderKey == null) {
+          common_vendor.index.showToast({
+            icon: "none",
+            title: "订单KEY不存在"
+          });
+          return;
+        }
+        if (this.address == null) {
+          common_vendor.index.showToast({
+            icon: "none",
+            title: "收货地址不能为空"
+          });
+          return;
+        }
+        const orderList = await this.cartOrder();
+        const orderListStr = encodeURIComponent(JSON.stringify(orderList));
+        common_vendor.index.navigateTo({
+          url: `/pages_shop/paymentOrder?orderList=${orderListStr}`
+        });
+      } catch (error) {
+        console.error("订单创建失败:", error);
+        common_vendor.index.showToast({
+          title: "提交失败",
+          icon: "none"
+        });
+      }
+    }
+    // var that=this;
+    // if(this.form.orderKey==null){
+    // 	uni.showToast({
+    // 		icon:'none',
+    // 		title: '订单KEY不存在',
+    // 	});
+    // 	return;
+    // }
+    // if(this.form.addressId==null){
+    // 	uni.showToast({
+    // 		icon:'none',
+    // 		title: '收货地址不能为空',
+    // 	});
+    // 	return;
+    // }
+    // uni.requestSubscribeMessage({
+    // 	tmplIds: this.temps,
+    // 	success(res) {
+    // 		 that.createOrder();
+    // 	},
+    // 	fail(res) {
+    // 		that.createOrder();
+    // 	}
+    // })
     // createOrder() {
     // 	const mark = this.carts.map(item => item.markinfo)
     // 	var that = this;
@@ -344,12 +337,73 @@ const _sfc_main = {
     // 		},
     // 		rej => {}
     // 	);
+    // },// confirm(item) {
+    // 	// let data = {type:this.type,cartIds:this.cartIds};
+    // 	confirm(this.confirmParam).then(
+    // 		res => {
+    // 			if (res.code == 200) {
+    // 				this.carts = res.carts.map(item => ({
+    // 					...item,
+    // 					markinfo: ""
+    // 				}));
+    // 				this.form.orderKey = res.orderKeys;
+    // 				if (res.address != null) {
+    // 					this.form.addressId = res.address.id;
+    // 					this.address = res.address;
+    // 				}
+    // 				this.computed()
+    // 			} else {
+    // 				uni.showToast({
+    // 					icon: 'none',
+    // 					title: res.msg,
+    // 				});
+    // 			}
+    // 		},
+    // 		rej => {}
+    // 	);
+    // },
+    // computed(item) {
+    // 	let data = {
+    // 		createOrderKey: this.form.createOrderKey,
+    // 		couponUserId: this.couponUserId,
+    // 		orderKeys: this.form.orderKey,
+    // 		addressId: this.form.addressId,
+    // 		useIntegral: this.form.useIntegral
+    // 	};
+    // 	computed(data).then(
+    // 		res => {
+    // 			if (res.code == 200) {
+    // 				// this.price=res.data
+    // 				this.price = res.data && res.data.length > 0 ? res.data : []
+    // 				this.priceAll = res.data && res.data.length > 0 ? res.data[res.data.length - 1] : {
+    // 					payPrice: 0,
+    // 					totalPostage: 0,
+    // 					usedIntegral: 0,
+    // 					totalPrice: 0.00,
+    // 				}
+    // 			} else {
+    // 				if (res.code == 501) {
+    // 					uni.showToast({
+    // 						icon: 'none',
+    // 						title: res.msg,
+    // 					});
+    // 					setTimeout(function() {
+    // 						uni.navigateBack({
+    // 							delta: 1
+    // 						})
+    // 					}, 500);
+    // 					return;
+    // 				} else {
+    // 					uni.showToast({
+    // 						icon: 'none',
+    // 						title: res.msg,
+    // 					});
+    // 				}
+    // 			}
+    // 		},
+    // 		rej => {}
+    // 	);
     // },
-    openAddress() {
-      common_vendor.index.navigateTo({
-        url: "/pages_user/address"
-      });
-    }
   }
 };
 if (!Array) {
@@ -361,7 +415,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
   return common_vendor.e({
     a: $data.address == null
   }, $data.address == null ? {
-    b: common_assets._imports_0$11,
+    b: common_assets._imports_0$10,
     c: common_vendor.o(($event) => $options.openAddress())
   } : {}, {
     d: $data.address != null
@@ -375,7 +429,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
     i: common_vendor.t($data.address.city),
     j: common_vendor.t($data.address.district),
     k: common_vendor.t($data.address.detail),
-    l: common_assets._imports_0$11,
+    l: common_assets._imports_0$10,
     m: common_vendor.o(($event) => $options.openAddress())
   }) : {}, {
     n: common_vendor.f($data.carts, (shop, idx, i0) => {

+ 3 - 3
unpackage/dist/dev/mp-weixin/pages_shop/confirmPackageOrder.js

@@ -191,7 +191,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
   return common_vendor.e({
     a: $data.address == null
   }, $data.address == null ? {
-    b: common_assets._imports_0$11,
+    b: common_assets._imports_0$10,
     c: common_vendor.o(($event) => $options.openAddress())
   } : {}, {
     d: $data.address != null
@@ -205,7 +205,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
     i: common_vendor.t($data.address.city),
     j: common_vendor.t($data.address.district),
     k: common_vendor.t($data.address.detail),
-    l: common_assets._imports_0$11,
+    l: common_assets._imports_0$10,
     m: common_vendor.o(($event) => $options.openAddress())
   }) : {}, {
     n: $data.package.imgUrl,
@@ -220,7 +220,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
     t: common_vendor.t($data.package.payMoney.toFixed(2))
   } : {}, {
     v: common_vendor.t($data.couponText),
-    w: common_assets._imports_1$7,
+    w: common_assets._imports_1$8,
     x: common_vendor.o(($event) => $options.openCoupon()),
     y: $data.form.mark,
     z: common_vendor.o(($event) => $data.form.mark = $event.detail.value),

+ 62 - 60
unpackage/dist/dev/mp-weixin/pages_shop/goods.js

@@ -10,6 +10,7 @@ const _sfc_main = {
   },
   data() {
     return {
+      goodsId: null,
       totalNum: 1,
       orderKey: null,
       type: null,
@@ -27,10 +28,6 @@ const _sfc_main = {
       showStorePicker: false,
       goodsNum: 0,
       //商品选择数量
-      productValueSelect: {
-        price: 0,
-        serviceFee: 0
-      },
       attrs: [],
       values: [],
       stores: [],
@@ -48,8 +45,8 @@ const _sfc_main = {
       cartCount: 0,
       // 规格弹窗
       specVisible: false,
-      // 规格数量
-      specNum: 1,
+      // // 规格数量
+      // specNum: 1,
       config: null,
       showServiceFee: false,
       selectVal: "",
@@ -70,6 +67,7 @@ const _sfc_main = {
       console.log("接收到的productId:", this.productId);
     }
     this.liveId = options.liveId;
+    this.goodsId = options.goodsId;
   },
   mounted() {
     this.getliveGoods();
@@ -79,6 +77,59 @@ const _sfc_main = {
   onShow() {
   },
   methods: {
+    // getLiveCartDetails() {
+    // 	let data = {
+    // 		productId: this.productId,
+    // 		liveId: this.liveId,
+    // 		goodsId: this.goodsId,
+    // 		cartNum: this.totalNum,
+    // 	};
+    // 	liveCartDetails(data).then(
+    // 		res => {
+    // 			if (res.code == 200) {
+    // 				console.log("加购物车啦", res)
+    // 				this.cartCount = cartRes.data;
+    // 			}
+    // 		},
+    // 		rej => {}
+    // 	);
+    // },
+    doAddCart(type) {
+      if (this.totalNum == 0) {
+        common_vendor.index.showToast({
+          icon: "none",
+          title: "库存不足"
+        });
+        return;
+      }
+      if (type == "buy") {
+        this.getKey();
+      } else {
+        this.getCartCount();
+        common_vendor.index.showToast({
+          icon: "success",
+          title: "添加成功"
+        });
+      }
+    },
+    getCartCount() {
+      let data = {
+        productId: this.productId,
+        liveId: this.liveId,
+        goodsId: this.goodsId,
+        cartNum: this.totalNum
+      };
+      api_order.addLiveCart(data).then(
+        (res) => {
+          if (res.code == 200) {
+            console.log("加购物车啦", res);
+            this.cartCount = res.data;
+          }
+        },
+        (rej) => {
+        }
+      );
+    },
     // 获得key
     getKey() {
       api_order.liveOrderKey().then(
@@ -88,7 +139,7 @@ const _sfc_main = {
             this.orderKey = res.orderKey;
             console.log("key>>>>", this.orderKey);
             common_vendor.index.navigateTo({
-              url: "/pages_shop/confirmCreateOrder?orderKey=" + this.orderKey + "&liveId=" + this.liveId + "&productId=" + this.productId + "&totalNum=" + this.totalNum + "&price=" + this.goosDetail.price
+              url: "/pages_shop/confirmCreateOrder?type=goods&orderKey=" + this.orderKey + "&liveId=" + this.liveId + "&productId=" + this.productId + "&totalNum=" + this.totalNum + "&price=" + this.goosDetail.price
             });
           } else {
             common_vendor.index.showToast({
@@ -114,62 +165,13 @@ const _sfc_main = {
     // 提交
     submit() {
       this.specVisible = false;
-      this.getKey();
+      this.doAddCart(this.type);
     },
     // 加入购物车
     addCart(type) {
       this.type = type;
       this.specVisible = true;
     },
-    // doAddCart(type) {
-    // 	if (this.specNum == 0) {
-    // 		uni.showToast({
-    // 			icon: 'none',
-    // 			title: "库存不足",
-    // 		});
-    // 		return;
-    // 	}
-    // 	var isBuy = type == "buy" ? 1 : 0;
-    // 	let data = {
-    // 		isBuy: isBuy,
-    // 		cartNum: this.specNum,
-    // 		productId: this.productValueSelect.productId,
-    // 		attrValueId: this.productValueSelect.id
-    // 	};
-    // 	addCart(data).then(
-    // 		res => {
-    // 			if (res.code == 200) {
-    // 				if (type == "buy") {
-    // 					const selectCarts = [{
-    // 						storeId: this.storeId,
-    // 						data: {
-    // 							type: this.type,
-    // 							cartIds: res.id,
-    // 						}
-    // 					}]
-    // 					uni.navigateTo({
-    // 						url: '/pages/shopping/confirmOrder?type=' + this.type + '&orderType=' +
-    // 							this.orderType + '&confirmParam=' + encodeURIComponent(JSON.stringify(
-    // 								selectCarts))
-    // 					})
-    // 				} else {
-    // 					this.getCartCount()
-    // 					uni.showToast({
-    // 						icon: 'success',
-    // 						title: "添加成功",
-    // 					});
-    // 				}
-    // 			} else {
-    // 				uni.showToast({
-    // 					icon: 'none',
-    // 					title: res.msg,
-    // 				});
-    // 				this.getProductDetails()
-    // 			}
-    // 		},
-    // 		rej => {}
-    // 	);
-    // },
     // 跳转页面
     navgetTo(url) {
       console.log("跳转");
@@ -229,8 +231,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
         b: index
       };
     }),
-    g: common_assets._imports_0$9,
-    h: common_assets._imports_1$6,
+    g: common_assets._imports_0$8,
+    h: common_assets._imports_1$7,
     i: common_vendor.o(($event) => $options.openEditMoney()),
     j: $data.editShow
   }, $data.editShow ? {
@@ -265,7 +267,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
         c: common_vendor.t(item.storeName),
         d: "14e5f6c8-3-" + i0 + ",14e5f6c8-2",
         e: index,
-        f: common_vendor.n($data.productValueSelect.storeId == item.storeId ? "item hover" : "item"),
+        f: common_vendor.n(_ctx.productValueSelect.storeId == item.storeId ? "item hover" : "item"),
         g: common_vendor.o(($event) => _ctx.pickerStore(item, index), index)
       };
     }),

+ 50 - 12
unpackage/dist/dev/mp-weixin/pages_shop/order.js

@@ -1,26 +1,52 @@
 "use strict";
 const common_vendor = require("../common/vendor.js");
 const api_order = require("../api/order.js");
-const common_assets = require("../common/assets.js");
 const _sfc_main = {
   data() {
     return {
       orderList: [],
-      tabList: [{
-        name: "全部"
-      }, {
-        name: "待付款"
-      }, {
-        name: "已付款"
-      }]
+      tabList: [
+        {
+          name: "全部",
+          value: ""
+        },
+        {
+          name: "待支付",
+          value: "0"
+        },
+        {
+          name: "待发货",
+          value: "1"
+        },
+        {
+          name: "待收货",
+          value: "2"
+        },
+        {
+          name: "退款/售后",
+          value: "3"
+        }
+        // {
+        // 	name: "已完成",
+        // 	value: "3"
+        // }
+      ]
     };
   },
   mounted() {
     this.getliveOrderList();
   },
   methods: {
+    // 申请售后
+    refund(item) {
+      common_vendor.index.navigateTo({
+        url: "./refundOrderProduct?orderId=" + item.id
+      });
+    },
+    // tab切换
     tabsClick(item) {
       console.log("item", item);
+      this.status = item.value;
     },
     // 订单列表
     getliveOrderList() {
@@ -74,13 +100,25 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
         f: item.status == 3,
         g: item.status == 4,
         h: item.status == 5,
-        i: common_vendor.t(item.orderName),
+        i: common_vendor.f(item.orderItemList, (itm, idx, i1) => {
+          return {
+            a: common_vendor.t(itm.orderName),
+            b: idx
+          };
+        }),
         j: common_vendor.t(item.totalNum),
         k: common_vendor.t(item.totalPrice),
-        l: index
+        l: item.status == 1
+      }, item.status == 1 ? {
+        m: common_vendor.o(($event) => _ctx.cancel(item), index)
+      } : {}, {
+        n: item.status == 1
+      }, item.status == 1 ? {
+        o: common_vendor.o(($event) => _ctx.pay(item), index)
+      } : {}, {
+        p: index
       });
-    }),
-    d: common_assets._imports_0$10
+    })
   };
 }
 const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-11bfd2e6"]]);

+ 1 - 1
unpackage/dist/dev/mp-weixin/pages_shop/order.wxml

@@ -1 +1 @@
-<view class="data-v-11bfd2e6"><view class=" data-v-11bfd2e6"></view><view class="content data-v-11bfd2e6"><u-tabs wx:if="{{b}}" class="tabs data-v-11bfd2e6" bindclick="{{a}}" u-i="11bfd2e6-0" bind:__l="__l" u-p="{{b}}"></u-tabs><view class="order-list data-v-11bfd2e6"><view wx:for="{{c}}" wx:for-item="item" wx:key="l" class="order-item data-v-11bfd2e6"><view class="order-num data-v-11bfd2e6"><text class="data-v-11bfd2e6">订单号:{{item.a}}</text><text wx:if="{{item.b}}" class="data-v-11bfd2e6">申请退款</text><text wx:elif="{{item.c}}" class="data-v-11bfd2e6">退货成功</text><text wx:elif="{{item.d}}" class="data-v-11bfd2e6">待支付</text><text wx:elif="{{item.e}}" class="data-v-11bfd2e6">待发货</text><text wx:elif="{{item.f}}" class="data-v-11bfd2e6">待收货</text><text wx:elif="{{item.g}}" class="data-v-11bfd2e6">待评价</text><text wx:elif="{{item.h}}" class="data-v-11bfd2e6">已完成</text></view><view class="order-main data-v-11bfd2e6"><view class="img-box data-v-11bfd2e6"><image class="data-v-11bfd2e6" src="{{d}}"></image></view><view class="order-text data-v-11bfd2e6"><view class="title data-v-11bfd2e6">{{item.i}}</view><view class="txt data-v-11bfd2e6">适用于乏力、头晕等人群,通过问诊可明确诊断给予专业性指导意见。</view><view class="num data-v-11bfd2e6"><text class="data-v-11bfd2e6">45708 人已购</text><text class="grey data-v-11bfd2e6">x{{item.j}}</text></view></view></view><view class="order-money data-v-11bfd2e6"><text class="title data-v-11bfd2e6">订单金额:</text><text class="num data-v-11bfd2e6">¥<text class="bold data-v-11bfd2e6">{{item.k}}</text>.00</text></view></view></view></view></view>
+<view class="data-v-11bfd2e6"><view class=" data-v-11bfd2e6"></view><view class="content data-v-11bfd2e6"><u-tabs wx:if="{{b}}" class="tabs data-v-11bfd2e6" bindclick="{{a}}" u-i="11bfd2e6-0" bind:__l="__l" u-p="{{b}}"></u-tabs><view class="order-list data-v-11bfd2e6"><view wx:for="{{c}}" wx:for-item="item" wx:key="p" class="order-item data-v-11bfd2e6"><view class="order-num data-v-11bfd2e6"><text class="data-v-11bfd2e6">订单号:{{item.a}}</text><text wx:if="{{item.b}}" class="data-v-11bfd2e6">申请退款</text><text wx:elif="{{item.c}}" class="data-v-11bfd2e6">退货成功</text><text wx:elif="{{item.d}}" class="data-v-11bfd2e6">待支付</text><text wx:elif="{{item.e}}" class="data-v-11bfd2e6">待发货</text><text wx:elif="{{item.f}}" class="data-v-11bfd2e6">待收货</text><text wx:elif="{{item.g}}" class="data-v-11bfd2e6">待评价</text><text wx:elif="{{item.h}}" class="data-v-11bfd2e6">已完成</text></view><view wx:for="{{item.i}}" wx:for-item="itm" wx:key="b" class="order-main data-v-11bfd2e6"><view class="img-box data-v-11bfd2e6"></view><view class="order-text data-v-11bfd2e6"><view class="title data-v-11bfd2e6">{{itm.a}}</view><view class="txt data-v-11bfd2e6">适用于乏力、头晕等人群,通过问诊可明确诊断给予专业性指导意见。</view><view class="num data-v-11bfd2e6"><text class="data-v-11bfd2e6">45708 人已购</text><text class="grey data-v-11bfd2e6">x{{item.j}}</text></view></view></view><view class="order-bottom data-v-11bfd2e6"><view class="order-money data-v-11bfd2e6"><text class="title data-v-11bfd2e6">订单金额:</text><text class="num data-v-11bfd2e6">¥<text class="bold data-v-11bfd2e6">{{item.k}}</text>.00</text></view><view class="button-group data-v-11bfd2e6"><view wx:if="{{item.l}}" bindtap="{{item.m}}" class="button cancel data-v-11bfd2e6">取消订单</view><view wx:if="{{item.n}}" bindtap="{{item.o}}" class="button pay data-v-11bfd2e6">去支付</view></view></view></view></view></view></view>

+ 30 - 3
unpackage/dist/dev/mp-weixin/pages_shop/order.wxss

@@ -27,6 +27,9 @@
 .data-v-11bfd2e6 .u-tabs {
   background-color: #FFFFFF;
 }
+.data-v-11bfd2e6 .u-tabs__wrapper__nav {
+  width: 100%;
+}
 .content .order-list.data-v-11bfd2e6 {
   background: #F5F7FA;
   padding: 0 24rpx;
@@ -80,16 +83,40 @@
   font-size: 24rpx;
   color: #999999;
 }
-.content .order-list .order-item .order-money .title.data-v-11bfd2e6 {
+.content .order-list .order-item .order-bottom.data-v-11bfd2e6 {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+}
+.content .order-list .order-item .order-bottom .order-money .title.data-v-11bfd2e6 {
   font-size: 24rpx;
   color: #757575;
 }
-.content .order-list .order-item .order-money .num.data-v-11bfd2e6 {
+.content .order-list .order-item .order-bottom .order-money .num.data-v-11bfd2e6 {
   font-weight: 600;
   font-size: 20rpx;
   color: #FF5C03;
 }
-.content .order-list .order-item .order-money .num .bold.data-v-11bfd2e6 {
+.content .order-list .order-item .order-bottom .order-money .num .bold.data-v-11bfd2e6 {
   font-weight: bold;
   font-size: 36rpx;
+}
+.content .order-list .order-item .order-bottom .button-group.data-v-11bfd2e6 {
+  display: flex;
+  align-items: center;
+}
+.content .order-list .order-item .order-bottom .button-group .button.data-v-11bfd2e6 {
+  margin-left: 20rpx;
+  padding: 10rpx 24rpx;
+  border-radius: 8rpx;
+  font-weight: 500;
+  font-size: 26rpx;
+}
+.content .order-list .order-item .order-bottom .button-group .cancel.data-v-11bfd2e6 {
+  background-color: #ececec;
+  color: #2c2c2c;
+}
+.content .order-list .order-item .order-bottom .button-group .pay.data-v-11bfd2e6 {
+  color: #FFFFFF;
+  background: linear-gradient(270deg, #FF5C03 0%, #FFAC64 100%);
 }

+ 18 - 17
unpackage/dist/dev/mp-weixin/pages_shop/paymentOrder.js

@@ -134,17 +134,19 @@ const _sfc_main = {
         this.editPayType(e.detail.value);
       }
     },
-    copyOrderSn(text) {
-      common_vendor.index.setClipboardData({
-        data: text,
-        success: () => {
-          common_vendor.index.showToast({
-            title: "内容已成功复制到剪切板",
-            icon: "none"
-          });
-        }
-      });
-    },
+    // copyOrderSn(text) {
+    // 	console.log(text)
+    // 	// 复制方法
+    // 	uni.setClipboardData({
+    // 		data: text,
+    // 		success: () => {
+    // 			uni.showToast({
+    // 				title: '内容已成功复制到剪切板',
+    // 				icon: 'none'
+    // 			})
+    // 		}
+    // 	});
+    // },
     // getStoreOrderById(){
     // 	var data = {orderId:this.orderId};
     // 	var that=this;
@@ -357,17 +359,16 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
   return common_vendor.e({
     a: common_vendor.t($options.payLimitTime),
     b: common_vendor.t($data.order ? (Number($data.order.totalPrice) || 0).toFixed(2) : "0.00"),
-    c: common_assets._imports_0$12,
+    c: common_assets._imports_0$11,
     d: $data.payType === 1,
     e: common_vendor.o((...args) => $options.handlePayTypeChange && $options.handlePayTypeChange(...args)),
     f: common_vendor.t((_a = $data.order) == null ? void 0 : _a.orderCode),
-    g: common_vendor.o(($event) => $options.copyOrderSn(_ctx.orderCode)),
-    h: common_vendor.t($options.formattedDate),
-    i: $data.order != null
+    g: common_vendor.t($options.formattedDate),
+    h: $data.order != null
   }, $data.order != null ? {
-    j: common_vendor.t($data.order ? (Number($data.order.totalPrice) || 0).toFixed(2) : "0.00")
+    i: common_vendor.t($data.order ? (Number($data.order.totalPrice) || 0).toFixed(2) : "0.00")
   } : {}, {
-    k: common_vendor.o(($event) => $options.payOrder())
+    j: common_vendor.o(($event) => $options.payOrder())
   });
 }
 const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);

+ 1 - 1
unpackage/dist/dev/mp-weixin/pages_shop/paymentOrder.wxml

@@ -1 +1 @@
-<view class="content"><view class="inner"><view class="time-price"><text class="time">请在{{a}}前完成支付</text><view class="price-box"><text class="unit">¥</text><text class="num">{{b}}</text></view></view><view class="pay-type"><view class="title">支付方式</view><radio-group bindchange="{{e}}"><view class="item"><view class="left"><image src="{{c}}" mode=""></image><text class="text">微信支付</text></view><label><radio value="{{1}}" checked="{{d}}"/></label></view></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">{{f}}</view></view><view class="copy-btn" bindtap="{{g}}">复制</view></view></view><view class="item"><text class="label">下单时间</text><text class="text">{{h}}</text></view><view class="item"><text class="label">订单金额</text><text wx:if="{{i}}" class="text">{{j}}</text></view></view></view><view class="btn-box"><view class="btn" bindtap="{{k}}">去支付</view></view></view>
+<view class="content"><view class="inner"><view class="time-price"><text class="time">请在{{a}}前完成支付</text><view class="price-box"><text class="unit">¥</text><text class="num">{{b}}</text></view></view><view class="pay-type"><view class="title">支付方式</view><radio-group bindchange="{{e}}"><view class="item"><view class="left"><image src="{{c}}" mode=""></image><text class="text">微信支付</text></view><label><radio value="{{1}}" checked="{{d}}"/></label></view></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">{{f}}</view></view></view></view><view class="item"><text class="label">下单时间</text><text class="text">{{g}}</text></view><view class="item"><text class="label">订单金额</text><text wx:if="{{h}}" class="text">{{i}}</text></view></view></view><view class="btn-box"><view class="btn" bindtap="{{j}}">去支付</view></view></view>

+ 114 - 110
unpackage/dist/dev/mp-weixin/pages_shop/store.js

@@ -5,8 +5,14 @@ const common_assets = require("../common/assets.js");
 const _sfc_main = {
   data() {
     return {
+      tabList: [{
+        name: "推荐"
+      }, {
+        name: "分类"
+      }],
       products: [],
       liveId: null,
+      storeId: null,
       statusBarHeight: common_vendor.index.getWindowInfo().statusBarHeight,
       // 右侧的胶囊距离右侧屏幕距离-px
       menuRight: common_vendor.index.getStorageSync("menuInfo").menuRight,
@@ -14,7 +20,6 @@ const _sfc_main = {
       menuWidth: common_vendor.index.getStorageSync("menuInfo").menuWidth,
       opacity: 0,
       opacityTxt: 0,
-      // storeId: "",
       tabbar: [{
         name: "商品"
       }, {
@@ -38,24 +43,14 @@ const _sfc_main = {
     };
   },
   onLoad(options) {
+    console.log("接收到的options:", options);
     if (options.liveId) {
       this.liveId = options.liveId;
+      this.getliveStore();
       console.log("接收到的liveId:", this.liveId);
     }
     this.storeId = options.storeId || "";
-    this.from = options.from || "";
-    if (this.storeId) {
-      this.getStoreInfo();
-      this.getProductCate();
-    } else {
-      common_vendor.index.showToast({
-        title: "storeId不存在~",
-        icon: "none"
-      });
-    }
-  },
-  mounted() {
-    this.getliveStore();
+    this.getSearchStore();
   },
   onShow() {
     this.divHeight = `calc(100vh - 44px - 88rpx - ${this.statusBarHeight}px)`;
@@ -70,7 +65,11 @@ const _sfc_main = {
     }
   },
   methods: {
-    //小黄车 店铺展示
+    getPureDecimal(num, precision = 6) {
+      const decimalPart = Math.abs(num).toFixed(precision).split(".")[1];
+      return (decimalPart == null ? void 0 : decimalPart.replace(/0+$/, "")) || "";
+    },
+    //店铺展示
     getliveStore() {
       let data = {
         pageSize: 10,
@@ -92,6 +91,24 @@ const _sfc_main = {
         }
       );
     },
+    //查询店铺
+    getSearchStore() {
+      console.log("查询店铺", this.storeId);
+      api_live.searchStore(this.storeId).then(
+        (res) => {
+          if (res.code == 200) {
+            console.log("查询店铺>>>>", res);
+          } else {
+            common_vendor.index.showToast({
+              title: res.msg,
+              icon: "none"
+            });
+          }
+        },
+        (rej) => {
+        }
+      );
+    },
     rightClick() {
       common_vendor.index.navigateBack();
     },
@@ -105,24 +122,24 @@ const _sfc_main = {
         urls: this.licenseImagesList
       });
     },
-    getStoreInfo() {
-      getStoreById({
-        storeId: this.storeId
-      }).then(
-        (res) => {
-          if (res.code == 200) {
-            this.storeInfo = res.data || {};
-          } else {
-            common_vendor.index.showToast({
-              icon: "none",
-              title: res.msg
-            });
-          }
-        },
-        (rej) => {
-        }
-      );
-    },
+    // getStoreInfo() {
+    // 	getStoreById({
+    // 		storeId: this.storeId
+    // 	}).then(
+    // 		res => {
+    // 			if (res.code == 200) {
+    // 				this.storeInfo = res.data || {}
+    // 				// this.licenseImagesList = this.storeInfo.licenseImages ? this.storeInfo.licenseImages.split(',') : []
+    // 			} else {
+    // 				uni.showToast({
+    // 					icon: 'none',
+    // 					title: res.msg,
+    // 				});
+    // 			}
+    // 		},
+    // 		rej => {}
+    // 	);
+    // },
     toSearch() {
       if (this.from == "company") {
         common_vendor.index.navigateTo({
@@ -164,30 +181,29 @@ const _sfc_main = {
     // 		rej => {}
     // 	);
     // },
-    getProductCate() {
-      let data = {};
-      getProductCate(data).then(
-        (res) => {
-          if (res.code == 200) {
-            this.allCates = res.data;
-            this.cates = this.allCates.filter(function(item) {
-              return item.pid == 0;
-            });
-            if (this.cates != null && this.cates.length > 0) {
-              this.cateSelect = this.cates[0].cateId;
-              this.getSubCate();
-            }
-          } else {
-            common_vendor.index.showToast({
-              icon: "none",
-              title: "请求失败"
-            });
-          }
-        },
-        (rej) => {
-        }
-      );
-    },
+    // getProductCate() {
+    // 	let data = {};
+    // 	getProductCate(data).then(
+    // 		res => {
+    // 			if (res.code == 200) {
+    // 				this.allCates = res.data;
+    // 				this.cates = this.allCates.filter(function(item) {
+    // 					return item.pid == 0
+    // 				});
+    // 				if (this.cates != null && this.cates.length > 0) {
+    // 					this.cateSelect = this.cates[0].cateId;
+    // 					this.getSubCate()
+    // 				}
+    // 			} else {
+    // 				uni.showToast({
+    // 					icon: 'none',
+    // 					title: "请求失败",
+    // 				});
+    // 			}
+    // 		},
+    // 		rej => {}
+    // 	);
+    // },
     // 药品分类选择
     choseCate(item) {
       this.cateSelect = item.cateId;
@@ -211,15 +227,13 @@ if (!Array) {
   const _easycom_u_icon2 = common_vendor.resolveComponent("u-icon");
   const _easycom_u_image2 = common_vendor.resolveComponent("u-image");
   const _easycom_u_tabs2 = common_vendor.resolveComponent("u-tabs");
-  const _easycom_u_sticky2 = common_vendor.resolveComponent("u-sticky");
-  (_easycom_u_icon2 + _easycom_u_image2 + _easycom_u_tabs2 + _easycom_u_sticky2)();
+  (_easycom_u_icon2 + _easycom_u_image2 + _easycom_u_tabs2)();
 }
 const _easycom_u_icon = () => "../uni_modules/uview-plus/components/u-icon/u-icon.js";
 const _easycom_u_image = () => "../uni_modules/uview-plus/components/u-image/u-image.js";
 const _easycom_u_tabs = () => "../uni_modules/uview-plus/components/u-tabs/u-tabs.js";
-const _easycom_u_sticky = () => "../uni_modules/uview-plus/components/u-sticky/u-sticky.js";
 if (!Math) {
-  (_easycom_u_icon + _easycom_u_image + _easycom_u_tabs + _easycom_u_sticky)();
+  (_easycom_u_icon + _easycom_u_image + _easycom_u_tabs)();
 }
 function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
   return common_vendor.e({
@@ -230,88 +244,78 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
       color: "#ffffff",
       size: "20"
     }),
-    d: common_assets._imports_0$1,
-    e: $data.opacity >= 0.6 ? "#6b4d40" : "#fff",
+    d: common_assets._imports_0$9,
+    e: $data.opacity >= 0.6 ? "#6b4d40" : "#6b4d40",
     f: common_vendor.o((...args) => $options.toSearch && $options.toSearch(...args)),
-    g: `calc(100vw - 100rpx - ${$data.menuRight} - ${$data.menuWidth})`,
-    h: `rgba(58, 17, 1,${$data.opacity})`,
-    i: common_vendor.p({
+    g: `rgba(58, 17, 1,1)`,
+    h: common_vendor.p({
       shape: "square",
       src: $data.storeInfo.logoUrl || _ctx.logoUrl,
       width: "100rpx",
       height: "100rpx",
       radius: "6"
     }),
-    j: common_vendor.t($data.storeInfo.storeName || ""),
-    k: common_vendor.t($data.storeInfo.salesCount),
-    l: $data.storeInfo.storeName,
-    m: common_vendor.o($options.clickTab),
-    n: common_vendor.p({
-      list: $data.tabbar,
-      current: $data.current
-    }),
-    o: common_vendor.p({
-      bgColor: "#fff",
-      ["offset-top"]: $data.statusBarHeight + 44
-    }),
-    p: common_vendor.f($data.cates, (item, index, i0) => {
-      return {
-        a: common_vendor.t(item.cateName),
-        b: index,
-        c: common_vendor.n($data.cateSelect == item.cateId ? "item active" : "item"),
-        d: common_vendor.o(($event) => $options.choseCate(item), index)
-      };
-    }),
-    q: common_vendor.f($data.advs, (item, index, i0) => {
-      return {
-        a: item.imageUrl,
-        b: index,
-        c: common_vendor.o(($event) => $options.handleAdvClick(item), index)
-      };
+    i: common_vendor.t($data.storeInfo.storeName || ""),
+    j: common_vendor.t($data.storeInfo.salesCount),
+    k: $data.storeInfo.storeName,
+    l: common_vendor.o(_ctx.selectTabList),
+    m: common_vendor.p({
+      list: $data.tabList,
+      lineColor: "linear-gradient( 90deg, #FE8227 0%, #FE4E12 100%)",
+      activeStyle: {
+        color: "#222222",
+        fontWeight: "600",
+        fontSize: "28rpx"
+      },
+      inactiveStyle: {
+        color: "#757575",
+        fontSize: "28rpx",
+        fontWeight: "400"
+      }
     }),
-    r: common_vendor.f($data.products, (subItem, index, i0) => {
+    n: common_vendor.f($data.products, (subItem, index, i0) => {
       return {
         a: subItem.imgUrl,
         b: common_vendor.t(subItem.productName),
-        c: index,
-        d: common_vendor.o(($event) => $options.showProductList(subItem), index)
+        c: common_vendor.t(Math.trunc(subItem.price)),
+        d: common_vendor.t($options.getPureDecimal(subItem.price) ? $options.getPureDecimal(subItem.price) : "00"),
+        e: index,
+        f: common_vendor.o(($event) => $options.showProductList(subItem), index)
       };
     }),
-    s: $data.divHeight,
-    t: $data.current == 0 ? "flex" : "none",
-    v: common_vendor.p({
+    o: common_vendor.p({
       name: "map",
       color: "#ccc",
       size: "18"
     }),
-    w: common_vendor.t($data.storeInfo.address || "--"),
-    x: $data.storeInfo.phone
+    p: common_vendor.t($data.storeInfo.address || "--"),
+    q: $data.storeInfo.phone
   }, $data.storeInfo.phone ? {
-    y: common_vendor.p({
+    r: common_vendor.p({
       name: "phone",
       color: "#ccc",
       size: "18"
     }),
-    z: common_vendor.t($data.storeInfo.phone || "--")
+    s: common_vendor.t($data.storeInfo.phone || "--")
   } : {}, {
-    A: $data.storeInfo.descs
+    t: $data.storeInfo.descs
   }, $data.storeInfo.descs ? {
-    B: common_vendor.p({
+    v: common_vendor.p({
       name: "volume",
       color: "#ccc",
       size: "18"
     }),
-    C: common_vendor.t($data.storeInfo.descs || "--")
+    w: common_vendor.t($data.storeInfo.descs || "--")
   } : {}, {
-    D: common_vendor.p({
+    x: common_vendor.p({
       name: "file-text",
       color: "#ccc",
       size: "18"
     }),
-    E: common_vendor.f(_ctx.licenseImagesList, (img, i, i0) => {
+    y: common_vendor.f(_ctx.licenseImagesList, (img, i, i0) => {
       return {
         a: common_vendor.o(($event) => $options.previewImage(i), i),
-        b: "dd5fc6f3-8-" + i0,
+        b: "dd5fc6f3-7-" + i0,
         c: common_vendor.p({
           shape: "square",
           lazyLoad: true,
@@ -323,8 +327,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
         d: i
       };
     }),
-    F: $data.divHeight,
-    G: $data.current == 1
+    z: $data.divHeight,
+    A: $data.current == 1
   });
 }
 const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-dd5fc6f3"]]);

+ 1 - 2
unpackage/dist/dev/mp-weixin/pages_shop/store.json

@@ -6,7 +6,6 @@
   "usingComponents": {
     "u-icon": "../uni_modules/uview-plus/components/u-icon/u-icon",
     "u-image": "../uni_modules/uview-plus/components/u-image/u-image",
-    "u-tabs": "../uni_modules/uview-plus/components/u-tabs/u-tabs",
-    "u-sticky": "../uni_modules/uview-plus/components/u-sticky/u-sticky"
+    "u-tabs": "../uni_modules/uview-plus/components/u-tabs/u-tabs"
   }
 }

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
unpackage/dist/dev/mp-weixin/pages_shop/store.wxml


+ 35 - 62
unpackage/dist/dev/mp-weixin/pages_shop/store.wxss

@@ -24,6 +24,9 @@
 /* 透明度 */
 /* 文章场景相关 */
 /*自定义主题色 */
+.data-v-dd5fc6f3 .u-tabs__wrapper__nav {
+  margin: 0 auto;
+}
 .inputbox.data-v-dd5fc6f3 {
   height: 60rpx;
   padding: 0 20rpx;
@@ -34,7 +37,7 @@
   border-radius: 40rpx;
   line-height: 60rpx;
   font-size: 28rpx;
-  color: #999;
+  color: #ffffff;
 }
 .inputbox .icon-search.data-v-dd5fc6f3 {
   width: 28rpx;
@@ -63,8 +66,8 @@
 .uni-nav-bar .uni-nav-title.data-v-dd5fc6f3 {
   font-size: 14px;
   overflow: hidden;
-  overflow: hidden;
   white-space: nowrap;
+  width: 100%;
   text-overflow: ellipsis;
 }
 .uni-nav-bar .uni-nav-back.data-v-dd5fc6f3 {
@@ -160,7 +163,6 @@
 }
 .storebox.data-v-dd5fc6f3 {
   width: 100%;
-  margin-top: -60rpx;
   padding-top: 80rpx;
   background-color: #fff;
   box-shadow: 0 -20rpx 16rpx #fff;
@@ -193,60 +195,15 @@
 .medic-box.data-v-dd5fc6f3 {
   display: flex;
 }
-.medic-box .cate-list.data-v-dd5fc6f3 {
-  box-sizing: border-box;
-  width: 200rpx;
-  background: #F2F5F9;
-  display: flex;
-  flex-direction: column;
-  padding: 20rpx 0;
-  overflow-y: scroll;
-}
-.medic-box .cate-list .item.data-v-dd5fc6f3 {
-  height: 100rpx;
-  line-height: 100rpx;
-  padding-left: 30rpx;
-  font-size: 28rpx;
-  font-family: PingFang SC;
-  font-weight: 500;
-  color: #333333;
-  position: relative;
-}
-.medic-box .cate-list .item.active.data-v-dd5fc6f3 {
-  color: #0bb3f2;
-}
-.medic-box .cate-list .item.active.data-v-dd5fc6f3::after {
-  content: "";
-  width: 8rpx;
-  height: 50rpx;
-  background: #0bb3f2;
-  position: absolute;
-  top: 25rpx;
-  left: 0;
-}
 .medic-box .medic.data-v-dd5fc6f3 {
   box-sizing: border-box;
-  width: calc(100% - 200rpx);
-  height: 100%;
-  padding: 0 30rpx;
-}
-.medic-box .medic .banner-box.data-v-dd5fc6f3 {
-  margin-top: 30rpx;
-  width: 100%;
-  height: 160rpx;
-  border-radius: 10rpx;
-  overflow: hidden;
-}
-.medic-box .medic .banner-box .swiper.data-v-dd5fc6f3,
-.medic-box .medic .banner-box .swiper-item.data-v-dd5fc6f3,
-.medic-box .medic .banner-box .swiper-item image.data-v-dd5fc6f3 {
-  width: 100%;
   height: 100%;
 }
 .medic-box .medic .medic-list.data-v-dd5fc6f3 {
+  padding: 20rpx 30rpx;
   box-sizing: border-box;
-  padding: 30rpx 0;
   overflow-y: auto;
+  background: #F5F7FA;
   height: calc(100% - 220rpx);
   position: relative;
 }
@@ -255,31 +212,47 @@
   flex-wrap: wrap;
 }
 .medic-box .medic .medic-list .inner-list .definite.data-v-dd5fc6f3 {
-  width: calc(33% - 20rpx);
-  margin-right: 30rpx;
+  width: calc(50% - 10rpx);
+  margin-right: 20rpx;
   margin-bottom: 30rpx;
+  background: #ffffff;
+  border-radius: 16rpx;
 }
 .medic-box .medic .medic-list .inner-list .definite .img-box.data-v-dd5fc6f3 {
   width: 100%;
-  height: 144rpx;
-  background: #F5F5F5;
-  border-radius: 8rpx;
+  height: 343rpx;
+  border-radius: 16rpx 16rpx 0rpx 0rpx;
   overflow: hidden;
   display: flex;
   align-items: center;
 }
 .medic-box .medic .medic-list .inner-list .definite .img-box image.data-v-dd5fc6f3 {
-  max-width: 100%;
+  width: 100%;
 }
 .medic-box .medic .medic-list .inner-list .definite .name.data-v-dd5fc6f3 {
   width: 100%;
-  margin-top: 20rpx;
+  margin-top: 12rpx;
+  font-size: 28rpx;
+  color: #222222;
+  padding: 0 20rpx;
+  box-sizing: border-box;
+}
+.medic-box .medic .medic-list .inner-list .definite .price.data-v-dd5fc6f3 {
+  padding: 0 20rpx 32rpx;
+  box-sizing: border-box;
+  margin-top: 12rpx;
+}
+.medic-box .medic .medic-list .inner-list .definite .price .red.data-v-dd5fc6f3 {
+  font-weight: bold;
+  font-size: 26rpx;
+  color: #FF5C03;
+}
+.medic-box .medic .medic-list .inner-list .definite .price .del.data-v-dd5fc6f3 {
+  margin-left: 16rpx;
+  text-decoration: line-through;
   font-size: 24rpx;
-  font-family: PingFang SC;
-  font-weight: 500;
-  color: #666666;
-  text-align: center;
+  color: #999999;
 }
-.medic-box .medic .medic-list .inner-list .definite.data-v-dd5fc6f3:nth-child(3n) {
+.medic-box .medic .medic-list .inner-list .definite.data-v-dd5fc6f3:nth-child(2n) {
   margin-right: 0;
 }

+ 217 - 0
unpackage/dist/dev/mp-weixin/pages_shop/storeOrder.js

@@ -0,0 +1,217 @@
+"use strict";
+const common_vendor = require("../common/vendor.js");
+const common_assets = require("../common/assets.js");
+const _sfc_main = {
+  // mixins: [MescrollMixin], 
+  data() {
+    return {
+      searchKey: "",
+      status: 0,
+      orderStatus: [
+        { name: "全部", value: "" },
+        { name: "待付款", value: "0" },
+        { name: "待发货", value: "1" },
+        { name: "待收货", value: "2" },
+        { name: "已完成", value: "3" }
+      ],
+      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: "暂无数据"
+        }
+      },
+      // 列表数据
+      dataList: []
+    };
+  },
+  onLoad(option) {
+    this.status = option.status;
+    var that = this;
+    common_vendor.index.$on("refreshOrder", () => {
+      that.mescroll.resetUpScroll();
+    });
+  },
+  methods: {
+    goSearch(e) {
+      this.searchKey = e.detail.value;
+      this.mescroll.resetUpScroll();
+    },
+    refund(item) {
+      common_vendor.index.navigateTo({
+        url: "./refundOrderProduct?orderId=" + item.id
+      });
+    },
+    // tab切换
+    orderStatusChange(item) {
+      this.status = item.value;
+      this.mescroll.resetUpScroll();
+    },
+    mescrollInit(mescroll) {
+      this.mescroll = mescroll;
+    },
+    /*下拉刷新的回调 */
+    downCallback(mescroll) {
+      mescroll.resetUpScroll();
+    },
+    upCallback(page) {
+      var that = this;
+      var data = {
+        keyword: this.searchKey,
+        status: this.status,
+        page: page.num,
+        pageSize: page.size
+      };
+      getMyStoreOrderList(data).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 {
+          common_vendor.index.showToast({
+            icon: "none",
+            title: "请求失败"
+          });
+          that.dataList = null;
+          that.mescroll.endErr();
+        }
+      });
+    },
+    // 查看订单详情
+    showDetail(item) {
+      console.log(item);
+      common_vendor.index.navigateTo({
+        url: "./storeOrderDetail?id=" + item.id
+      });
+    },
+    cancel(item) {
+      var that = this;
+      common_vendor.index.showModal({
+        title: "提示",
+        content: "确定取消订单吗",
+        success: function(res) {
+          if (res.confirm) {
+            var data = {
+              orderId: item.id
+            };
+            cancelOrder(data).then((res2) => {
+              if (res2.code == 200) {
+                common_vendor.index.showToast({
+                  icon: "success",
+                  title: "操作成功"
+                });
+                that.mescroll.resetUpScroll();
+              } else {
+                common_vendor.index.showToast({
+                  icon: "none",
+                  title: res2.msg
+                });
+              }
+            });
+          } else if (res.cancel)
+            ;
+        }
+      });
+    },
+    pay(item) {
+      if (item.isPrescribe == 1 && item.prescribeId == null) {
+        common_vendor.index.navigateTo({
+          url: "/pages/shopping/prescribe?orderId=" + item.id
+        });
+      } else {
+        common_vendor.index.navigateTo({
+          url: "/pages/shopping/paymentOrder?orderId=" + item.id
+        });
+      }
+    },
+    // 查看物流
+    showDelivery(item) {
+      common_vendor.index.navigateTo({
+        url: "./storeOrderDelivery?orderId=" + item.id
+      });
+    }
+  }
+};
+function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
+  return {
+    a: common_vendor.f($data.orderStatus, (item, index, i0) => {
+      return {
+        a: common_vendor.t(item.name),
+        b: $data.status == item.value,
+        c: index,
+        d: common_vendor.n($data.status == item.value ? "item active" : "item"),
+        e: common_vendor.o(($event) => $options.orderStatusChange(item), index)
+      };
+    }),
+    b: common_assets._imports_0$12,
+    c: common_assets._imports_1,
+    d: common_vendor.o((...args) => $options.goSearch && $options.goSearch(...args)),
+    e: common_vendor.f($data.dataList, (item, index, i0) => {
+      return common_vendor.e({
+        a: common_vendor.t(item.storeName || ""),
+        b: item.storeName,
+        c: common_vendor.t(item.orderCode),
+        d: common_vendor.t(_ctx.utils.getDictLabelName("storeOrderStatus", item.status)),
+        e: common_vendor.o(($event) => $options.showDetail(item), index),
+        f: item.isPackage != 1
+      }, item.isPackage != 1 ? {
+        g: common_vendor.f(item.items, (subItem, subIndex, i1) => {
+          return common_vendor.e({
+            a: JSON.parse(subItem.jsonInfo).image,
+            b: subItem.isPrescribe == 1
+          }, subItem.isPrescribe == 1 ? {} : {}, {
+            c: common_vendor.t(JSON.parse(subItem.jsonInfo).productName),
+            d: common_vendor.t(JSON.parse(subItem.jsonInfo).sku),
+            e: common_vendor.t(JSON.parse(subItem.jsonInfo).price.toFixed(2)),
+            f: common_vendor.t(JSON.parse(subItem.jsonInfo).num),
+            g: common_vendor.o(($event) => $options.showDetail(item), subIndex),
+            h: subIndex
+          });
+        })
+      } : {}, {
+        h: item.isPackage == 1 && item.packageJson != null
+      }, item.isPackage == 1 && item.packageJson != null ? {
+        i: JSON.parse(item.packageJson).imgUrl,
+        j: common_vendor.t(JSON.parse(item.packageJson).title),
+        k: common_vendor.t(JSON.parse(item.packageJson).descs),
+        l: common_vendor.o(($event) => $options.showDetail(item), index)
+      } : {}, {
+        m: common_vendor.t(item.payPrice.toFixed(2)),
+        n: item.status == 0
+      }, item.status == 0 ? {
+        o: common_vendor.o(($event) => $options.cancel(item), index)
+      } : {}, {
+        p: item.status == 0
+      }, item.status == 0 ? {
+        q: common_vendor.o(($event) => $options.pay(item), index)
+      } : {}, {
+        r: item.isAfterSales == 1
+      }, item.isAfterSales == 1 ? {
+        s: common_vendor.o(($event) => $options.refund(item), index)
+      } : {}, {
+        t: item.status >= 2 && item.deliveryId != null
+      }, item.status >= 2 && item.deliveryId != null ? {
+        v: common_vendor.o(($event) => $options.showDelivery(item), index)
+      } : {}, {
+        w: index
+      });
+    })
+  };
+}
+const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
+wx.createPage(MiniProgramPage);

+ 5 - 0
unpackage/dist/dev/mp-weixin/pages_shop/storeOrder.json

@@ -0,0 +1,5 @@
+{
+  "navigationBarTitleText": "订单",
+  "navigationBarTextStyle": "black",
+  "usingComponents": {}
+}

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
unpackage/dist/dev/mp-weixin/pages_shop/storeOrder.wxml


+ 319 - 0
unpackage/dist/dev/mp-weixin/pages_shop/storeOrder.wxss

@@ -0,0 +1,319 @@
+/**
+ * 这里是uni-app内置的常用样式变量
+ *
+ * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
+ * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
+ *
+ */
+/**
+ * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
+ *
+ * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
+ */
+/* 颜色变量 */
+/* 行为相关颜色 */
+/* 文字基本颜色 */
+/* 背景颜色 */
+/* 边框颜色 */
+/* 尺寸变量 */
+/* 文字尺寸 */
+/* 图片尺寸 */
+/* Border Radius */
+/* 水平间距 */
+/* 垂直间距 */
+/* 透明度 */
+/* 文章场景相关 */
+/*自定义主题色 */
+.top-fixed {
+  width: 100%;
+  position: fixed;
+  top: 0;
+  left: 0;
+  z-index: 10;
+}
+.pub-tab-box {
+  box-sizing: border-box;
+  width: 100%;
+  padding: 0 40rpx;
+  background-color: #FFFFFF;
+}
+.pub-tab-box .tab-inner {
+  height: 88rpx;
+  line-height: 88rpx;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  overflow-x: auto;
+}
+.pub-tab-box .item {
+  font-size: 28rpx;
+  white-space: nowrap;
+  line-height: 1;
+  font-family: PingFang SC;
+  font-weight: 500;
+  color: #666666;
+  margin-right: 60rpx;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+.pub-tab-box .item:last-child {
+  margin-right: 0;
+}
+.pub-tab-box .item.active {
+  font-weight: bold;
+  color: #333333;
+}
+.pub-tab-box .item .text {
+  position: relative;
+  z-index: 1;
+}
+.pub-tab-box .item .tab-bg {
+  width: 72rpx;
+  height: 28rpx;
+  position: absolute;
+  top: 17rpx;
+  left: 50%;
+  transform: translateX(-36rpx);
+  z-index: -1;
+}
+.top-seat {
+  width: 100%;
+  height: 192rpx;
+}
+.search-cont {
+  padding: 16rpx 30rpx;
+  background-color: #FFFFFF;
+}
+.search-cont .inner {
+  box-sizing: border-box;
+  width: 100%;
+  height: 72rpx;
+  background: #F7F7F7;
+  border-radius: 36rpx;
+  display: flex;
+  align-items: center;
+  padding: 0 30rpx;
+}
+.search-cont .inner .icon-search {
+  width: 28rpx;
+  height: 28rpx;
+  margin-right: 20rpx;
+}
+.search-cont .inner input {
+  height: 60rpx;
+  line-height: 60rpx;
+  flex: 1;
+}
+.order-list {
+  padding: 20rpx;
+}
+.order-list .item {
+  background: #FFFFFF;
+  border-radius: 16rpx;
+  padding: 0 30rpx;
+  margin-bottom: 20rpx;
+}
+.order-list .item .storeName {
+  overflow: hidden;
+  white-space: nowrap;
+  text-overflow: ellipsis;
+  font-size: 28rpx;
+  font-family: PingFang SC;
+  font-weight: 500;
+  color: #111111;
+  margin-bottom: 10rpx;
+}
+.order-list .item .ordersn-box {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+}
+.order-list .item .ordersn-box .num {
+  font-size: 26rpx;
+  font-family: PingFang SC;
+  font-weight: 500;
+  color: #999999;
+  line-height: 1;
+}
+.order-list .item .ordersn-box .status-box {
+  display: flex;
+  align-items: center;
+}
+.order-list .item .ordersn-box .status-box .recom-box {
+  width: 108rpx;
+  height: 30rpx;
+  line-height: 30rpx;
+  text-align: left;
+  padding-left: 8rpx;
+  font-size: 22rpx;
+  font-family: PingFang SC;
+  font-weight: 500;
+  color: #FFFFFF;
+  background-image: url(../../static/images/recom.png);
+  background-repeat: no-repeat;
+  background-size: 100% 100%;
+  margin-right: 8rpx;
+}
+.order-list .item .ordersn-box .status-box .text {
+  font-size: 28rpx;
+  font-family: PingFang SC;
+  font-weight: 500;
+  line-height: 1;
+}
+.order-list .item .ordersn-box .status-box .text.success {
+  color: #0bb3f2;
+}
+.order-list .item .ordersn-box .status-box .text.black {
+  color: #111111;
+}
+.order-list .item .ordersn-box .status-box .text.info {
+  color: #999999;
+}
+.order-list .item .drug-list .drug-item {
+  padding: 30rpx 0;
+  border-bottom: 1px soli #F0F0F0;
+  display: flex;
+  align-items: center;
+}
+.order-list .item .drug-list .drug-item .img-box {
+  width: 160rpx;
+  height: 160rpx;
+  margin-right: 30rpx;
+  flex-shrink: 0;
+}
+.order-list .item .drug-list .drug-item .img-box image {
+  width: 100%;
+  height: 100%;
+}
+.order-list .item .drug-list .drug-item .drug-info {
+  width: calc(100% - 190rpx);
+  height: 160rpx;
+  display: flex;
+  flex-direction: column;
+  justify-content: space-between;
+}
+.order-list .item .drug-list .drug-item .drug-info .name-box {
+  font-size: 28rpx;
+  font-family: PingFang SC;
+  font-weight: 500;
+  color: #111111;
+  line-height: 40rpx;
+}
+.order-list .item .drug-list .drug-item .drug-info .name-box .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;
+}
+.order-list .item .drug-list .drug-item .drug-info .spec {
+  font-size: 24rpx;
+  font-family: PingFang SC;
+  font-weight: 500;
+  color: #999999;
+  line-height: 1;
+  margin-top: 10rpx;
+}
+.order-list .item .drug-list .drug-item .drug-info .num-box {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+}
+.order-list .item .drug-list .drug-item .drug-info .num-box .price {
+  display: flex;
+  align-items: flex-end;
+}
+.order-list .item .drug-list .drug-item .drug-info .num-box .price .unit {
+  font-size: 24rpx;
+  font-family: PingFang SC;
+  font-weight: 500;
+  color: #111111;
+  line-height: 1.2;
+  margin-right: 4rpx;
+}
+.order-list .item .drug-list .drug-item .drug-info .num-box .price .num {
+  font-size: 32rpx;
+  font-family: PingFang SC;
+  font-weight: 500;
+  color: #111111;
+  line-height: 1;
+}
+.order-list .item .drug-list .drug-item .drug-info .num-box .amount {
+  font-size: 24rpx;
+  font-family: PingFang SC;
+  font-weight: 500;
+  color: #999999;
+  line-height: 1;
+}
+.order-list .item .drug-list .bottom-box {
+  height: 110rpx;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+}
+.order-list .item .drug-list .bottom-box .amount-paid {
+  display: flex;
+  align-items: center;
+}
+.order-list .item .drug-list .bottom-box .amount-paid .label {
+  font-size: 24rpx;
+  font-family: PingFang SC;
+  font-weight: 500;
+  color: #999999;
+  line-height: 1;
+}
+.order-list .item .drug-list .bottom-box .amount-paid .price-box {
+  display: flex;
+  align-items: flex-end;
+}
+.order-list .item .drug-list .bottom-box .amount-paid .price-box .unit {
+  font-size: 24rpx;
+  font-family: PingFang SC;
+  font-weight: 500;
+  color: #FF6633;
+  line-height: 1.2;
+  margin-right: 4rpx;
+}
+.order-list .item .drug-list .bottom-box .amount-paid .price-box .num {
+  font-size: 32rpx;
+  font-family: PingFang SC;
+  font-weight: bold;
+  color: #FF6633;
+  line-height: 1;
+}
+.order-list .item .drug-list .bottom-box .btn-box {
+  box-sizing: border-box;
+  display: flex;
+  align-items: center;
+}
+.order-list .item .drug-list .bottom-box .btn-box .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;
+}
+.order-list .item .drug-list .bottom-box .btn-box .btn:first-child {
+  margin-left: 0;
+}
+.order-list .item .drug-list .bottom-box .btn-box .btn.cancel {
+  border: 1px solid #DDDDDD;
+  color: #666666;
+}
+.order-list .item .drug-list .bottom-box .btn-box .btn.pay {
+  background: #0bb3f2;
+  color: #FFFFFF;
+}

+ 7 - 7
unpackage/dist/dev/mp-weixin/pages_user/addAddress.js

@@ -12,7 +12,7 @@ const _sfc_main = {
       content: null,
       type: null,
       addressId: null,
-      // isDefault: false,
+      isDefault: false,
       multiIndex: [0, 0, 0],
       address: [],
       addressList: [
@@ -57,6 +57,7 @@ const _sfc_main = {
   methods: {
     logChange(value) {
       console.log("isDefault 新值:", value);
+      this.form.isDefault = value ? 1 : 0;
     },
     parseAddress() {
       if (this.content == null || this.content == "") {
@@ -98,7 +99,6 @@ const _sfc_main = {
         (res) => {
           if (res.code == 200) {
             this.form = res.data;
-            console.log(" this.form", this.form);
             this.isDefault = this.form.isDefault == 1 ? true : false;
             this.form.address = this.form.province + this.form.city + this.form.district;
           } else {
@@ -121,8 +121,8 @@ const _sfc_main = {
       }
     },
     editAddress() {
-      this.form.isDefault = this.isDefault ? 1 : 0;
-      api_order.editAddress(submitData).then(
+      console.log("提交数据:", JSON.stringify(this.form));
+      api_order.editAddress(this.form).then(
         (res) => {
           if (res.code == 200) {
             common_vendor.index.showToast({
@@ -244,7 +244,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
     g: common_vendor.o(($event) => $data.form.phone = $event.detail.value),
     h: $data.form.address,
     i: common_vendor.o(($event) => $data.form.address = $event.detail.value),
-    j: common_assets._imports_0$11,
+    j: common_assets._imports_0$10,
     k: $data.multiIndex,
     l: $data.addressList,
     m: common_vendor.o((...args) => $options.pickerChange && $options.pickerChange(...args)),
@@ -252,11 +252,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
     o: $data.form.detail,
     p: common_vendor.o(($event) => $data.form.detail = $event.detail.value),
     q: common_vendor.o($options.logChange),
-    r: common_vendor.o(($event) => _ctx.isDefault = $event),
+    r: common_vendor.o(($event) => $data.isDefault = $event),
     s: common_vendor.p({
       activeColor: "#0bb3f2",
       inactiveColor: "rgba(0, 0, 0, 0.1)",
-      modelValue: _ctx.isDefault
+      modelValue: $data.isDefault
     }),
     t: common_vendor.o(($event) => $options.submit())
   };

+ 1 - 4
unpackage/dist/dev/mp-weixin/pages_user/address.js

@@ -14,9 +14,6 @@ const _sfc_main = {
       this.getUserAddr();
     });
   },
-  // mounted() {
-  // 	this.getUserAddr()
-  // },
   methods: {
     // 获取用户收货地址
     getUserAddr() {
@@ -165,7 +162,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
       });
     }),
     b: common_assets._imports_0$14,
-    c: common_assets._imports_1$8,
+    c: common_assets._imports_1$9,
     d: $data.address.length == 0
   }, $data.address.length == 0 ? {
     e: common_assets._imports_2$3,

+ 1 - 1
unpackage/dist/dev/mp-weixin/project.config.json

@@ -13,7 +13,7 @@
   },
   "compileType": "miniprogram",
   "libVersion": "3.4.2",
-  "appid": "wx9ea36eecd281bcd3",
+  "appid": "wx29d26f63f836be7f",
   "projectname": "签约",
   "condition": {
     "search": {

+ 1 - 1
unpackage/dist/dev/mp-weixin/project.private.config.json

@@ -10,7 +10,7 @@
       "list": [
         {
           "name": "pages_shop/confirmCreateOrder",
-          "pathName": "pages_shop/store",
+          "pathName": "pages_shop/order",
           "query": "",
           "scene": null,
           "launchMode": "default"

BIN
unpackage/dist/dev/mp-weixin/static/images/search_white.png


+ 0 - 37
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/components/u-sticky/props.js

@@ -1,37 +0,0 @@
-"use strict";
-const uni_modules_uviewPlus_libs_config_props = require("../../libs/config/props.js");
-const props = {
-  props: {
-    // 吸顶容器到顶部某个距离的时候,进行吸顶,在H5平台,NavigationBar为44px
-    offsetTop: {
-      type: [String, Number],
-      default: () => uni_modules_uviewPlus_libs_config_props.defProps.sticky.offsetTop
-    },
-    // 自定义导航栏的高度
-    customNavHeight: {
-      type: [String, Number],
-      default: () => uni_modules_uviewPlus_libs_config_props.defProps.sticky.customNavHeight
-    },
-    // 是否开启吸顶功能
-    disabled: {
-      type: Boolean,
-      default: () => uni_modules_uviewPlus_libs_config_props.defProps.sticky.disabled
-    },
-    // 吸顶区域的背景颜色
-    bgColor: {
-      type: String,
-      default: () => uni_modules_uviewPlus_libs_config_props.defProps.sticky.bgColor
-    },
-    // z-index值
-    zIndex: {
-      type: [String, Number],
-      default: () => uni_modules_uviewPlus_libs_config_props.defProps.sticky.zIndex
-    },
-    // 列表中的索引值
-    index: {
-      type: [String, Number],
-      default: () => uni_modules_uviewPlus_libs_config_props.defProps.sticky.index
-    }
-  }
-};
-exports.props = props;

+ 0 - 141
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/components/u-sticky/u-sticky.js

@@ -1,141 +0,0 @@
-"use strict";
-const common_vendor = require("../../../../common/vendor.js");
-const uni_modules_uviewPlus_components_uSticky_props = require("./props.js");
-const uni_modules_uviewPlus_libs_mixin_mpMixin = require("../../libs/mixin/mpMixin.js");
-const uni_modules_uviewPlus_libs_mixin_mixin = require("../../libs/mixin/mixin.js");
-const uni_modules_uviewPlus_libs_function_index = require("../../libs/function/index.js");
-const uni_modules_uviewPlus_libs_config_zIndex = require("../../libs/config/zIndex.js");
-const _sfc_main = {
-  name: "u-sticky",
-  mixins: [uni_modules_uviewPlus_libs_mixin_mpMixin.mpMixin, uni_modules_uviewPlus_libs_mixin_mixin.mixin, uni_modules_uviewPlus_components_uSticky_props.props],
-  data() {
-    return {
-      cssSticky: false,
-      // 是否使用css的sticky实现
-      stickyTop: 0,
-      // 吸顶的top值,因为可能受自定义导航栏影响,最终的吸顶值非offsetTop值
-      elId: uni_modules_uviewPlus_libs_function_index.guid(),
-      left: 0,
-      // js模式时,吸顶的内容因为处于postition: fixed模式,为了和原来保持一致的样式,需要记录并重新设置它的left,height,width属性
-      width: "auto",
-      height: "auto",
-      fixed: false
-      // js模式时,是否处于吸顶模式
-    };
-  },
-  computed: {
-    style() {
-      const style = {};
-      if (!this.disabled) {
-        if (this.cssSticky) {
-          style.position = "sticky";
-          style.zIndex = this.uZindex;
-          style.top = uni_modules_uviewPlus_libs_function_index.addUnit(this.stickyTop);
-        } else {
-          style.height = this.fixed ? this.height + "px" : "auto";
-        }
-      } else {
-        style.position = "static";
-      }
-      style.backgroundColor = this.bgColor;
-      return uni_modules_uviewPlus_libs_function_index.deepMerge(uni_modules_uviewPlus_libs_function_index.addStyle(this.customStyle), style);
-    },
-    // 吸顶内容的样式
-    stickyContent() {
-      const style = {};
-      if (!this.cssSticky) {
-        style.position = this.fixed ? "fixed" : "static";
-        style.top = this.stickyTop + "px";
-        style.left = this.left + "px";
-        style.width = this.width == "auto" ? "auto" : this.width + "px";
-        style.zIndex = this.uZindex;
-      }
-      return style;
-    },
-    uZindex() {
-      return this.zIndex ? this.zIndex : uni_modules_uviewPlus_libs_config_zIndex.zIndex.sticky;
-    }
-  },
-  mounted() {
-    this.init();
-  },
-  methods: {
-    init() {
-      this.getStickyTop();
-      this.checkSupportCssSticky();
-      if (!this.cssSticky) {
-        !this.disabled && this.initObserveContent();
-      }
-    },
-    initObserveContent() {
-      this.$uGetRect("#" + this.elId).then((res) => {
-        this.height = res.height;
-        this.left = res.left;
-        this.width = res.width;
-        this.$nextTick(() => {
-          this.observeContent();
-        });
-      });
-    },
-    observeContent() {
-      this.disconnectObserver("contentObserver");
-      const contentObserver = common_vendor.index.createIntersectionObserver({
-        // 检测的区间范围
-        thresholds: [0.95, 0.98, 1]
-      });
-      contentObserver.relativeToViewport({
-        top: -this.stickyTop
-      });
-      contentObserver.observe(`#${this.elId}`, (res) => {
-        this.setFixed(res.boundingClientRect.top);
-      });
-      this.contentObserver = contentObserver;
-    },
-    setFixed(top) {
-      const fixed = top <= this.stickyTop;
-      this.fixed = fixed;
-    },
-    disconnectObserver(observerName) {
-      const observer = this[observerName];
-      observer && observer.disconnect();
-    },
-    getStickyTop() {
-      this.stickyTop = uni_modules_uviewPlus_libs_function_index.getPx(this.offsetTop) + uni_modules_uviewPlus_libs_function_index.getPx(this.customNavHeight);
-    },
-    async checkSupportCssSticky() {
-      if (uni_modules_uviewPlus_libs_function_index.os() === "android" && Number(uni_modules_uviewPlus_libs_function_index.sys().system) > 8) {
-        this.cssSticky = true;
-      }
-      this.cssSticky = await this.checkComputedStyle();
-      if (uni_modules_uviewPlus_libs_function_index.os() === "ios") {
-        this.cssSticky = true;
-      }
-    },
-    // 在APP和微信小程序上,通过uni.createSelectorQuery可以判断是否支持css sticky
-    checkComputedStyle() {
-      return new Promise((resolve) => {
-        common_vendor.index.createSelectorQuery().in(this).select(".u-sticky").fields({
-          computedStyle: ["position"]
-        }).exec((e) => {
-          resolve("sticky" === e[0].position);
-        });
-      });
-    },
-    // H5通过创建元素的形式嗅探是否支持css sticky
-    // 判断浏览器是否支持sticky属性
-    checkCssStickyForH5() {
-    }
-  },
-  beforeUnmount() {
-    this.disconnectObserver("contentObserver");
-  }
-};
-function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
-  return {
-    a: common_vendor.s($options.stickyContent),
-    b: $data.elId,
-    c: common_vendor.s($options.style)
-  };
-}
-const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-8b303089"]]);
-wx.createComponent(Component);

+ 0 - 4
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/components/u-sticky/u-sticky.json

@@ -1,4 +0,0 @@
-{
-  "component": true,
-  "usingComponents": {}
-}

+ 0 - 1
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/components/u-sticky/u-sticky.wxml

@@ -1 +0,0 @@
-<view class="u-sticky data-v-8b303089" id="{{b}}" style="{{c}}"><view style="{{a}}" class="u-sticky__content data-v-8b303089"><slot/></view></view>

+ 0 - 30
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/components/u-sticky/u-sticky.wxss

@@ -1,30 +0,0 @@
-/**
- * 这里是uni-app内置的常用样式变量
- *
- * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
- * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
- *
- */
-/**
- * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
- *
- * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
- */
-/* 颜色变量 */
-/* 行为相关颜色 */
-/* 文字基本颜色 */
-/* 背景颜色 */
-/* 边框颜色 */
-/* 尺寸变量 */
-/* 文字尺寸 */
-/* 图片尺寸 */
-/* Border Radius */
-/* 水平间距 */
-/* 垂直间距 */
-/* 透明度 */
-/* 文章场景相关 */
-/*自定义主题色 */
-.u-sticky.data-v-8b303089 {
-  position: -webkit-sticky;
-  position: sticky;
-}

+ 0 - 2
unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/libs/function/index.js

@@ -496,9 +496,7 @@ exports.deepMerge = deepMerge;
 exports.error = error;
 exports.formValidate = formValidate;
 exports.getPx = getPx;
-exports.guid = guid;
 exports.index = index;
-exports.os = os;
 exports.page = page;
 exports.priceFormat = priceFormat;
 exports.queryParams = queryParams;

Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov