xhj 3 年之前
当前提交
b2fce6b4e0
共有 100 个文件被更改,包括 18483 次插入0 次删除
  1. 1 0
      .gitignore
  2. 20 0
      .hbuilderx/launch.json
  3. 203 0
      App.vue
  4. 0 0
      README.md
  5. 114 0
      activity/bargain/detail/detail.css
  6. 1396 0
      activity/bargain/detail/detail.vue
  7. 25 0
      activity/bargain/index/index.css
  8. 341 0
      activity/bargain/index/index.vue
  9. 74 0
      activity/bargain/kjDetail/kjDetail.css
  10. 538 0
      activity/bargain/kjDetail/kjDetail.vue
  11. 23 0
      activity/content/content.css
  12. 107 0
      activity/content/content.vue
  13. 141 0
      activity/group/detail/detail.css
  14. 1470 0
      activity/group/detail/detail.vue
  15. 28 0
      activity/group/index/index.css
  16. 362 0
      activity/group/index/index.vue
  17. 58 0
      activity/group/ptDetail/ptDetail.css
  18. 413 0
      activity/group/ptDetail/ptDetail.vue
  19. 96 0
      activity/newbornDetails/newbornDetails.css
  20. 1134 0
      activity/newbornDetails/newbornDetails.vue
  21. 57 0
      activity/newbornZone/newbornZone.css
  22. 310 0
      activity/newbornZone/newbornZone.vue
  23. 123 0
      activity/seckill/seckill.css
  24. 585 0
      activity/seckill/seckill.vue
  25. 113 0
      activity/seckillDetails/seckillDetails.css
  26. 1077 0
      activity/seckillDetails/seckillDetails.vue
  27. 二进制
      activity/static/activity/images/cha.png
  28. 二进制
      activity/static/activity/images/clock2.png
  29. 二进制
      activity/static/activity/images/guarantee.png
  30. 二进制
      activity/static/activity/images/kanjia.png
  31. 二进制
      activity/static/activity/images/kanle1.png
  32. 二进制
      activity/static/activity/images/kanle2.png
  33. 二进制
      activity/static/activity/images/kjban.jpg
  34. 二进制
      activity/static/activity/images/kjbg.jpg
  35. 二进制
      activity/static/activity/images/msbg.png
  36. 二进制
      activity/static/activity/images/msyybg.png
  37. 二进制
      activity/static/activity/images/nbzbg.png
  38. 二进制
      activity/static/activity/images/ptban.jpg
  39. 二进制
      activity/static/activity/images/ptban1.jpg
  40. 二进制
      activity/static/activity/images/ptbg.png
  41. 二进制
      activity/static/activity/images/rednaozhong.png
  42. 二进制
      activity/static/activity/images/seckill.png
  43. 二进制
      activity/static/activity/images/seckillDetails.png
  44. 二进制
      activity/static/activity/images/seckillbg.png
  45. 二进制
      activity/static/activity/images/share_pintuan.jpg
  46. 二进制
      activity/static/activity/images/xrzx.png
  47. 二进制
      activity/static/activity/images/xrzxbg.png
  48. 381 0
      app.css
  49. 4 0
      components/contact-button/index.css
  50. 82 0
      components/contact-button/index.vue
  51. 16 0
      components/footer-copyright/footer-copyright.css
  52. 54 0
      components/footer-copyright/footer-copyright.vue
  53. 117 0
      components/goodsList/goodsList.css
  54. 568 0
      components/goodsList/goodsList.vue
  55. 62 0
      components/integral-nav/index.css
  56. 132 0
      components/integral-nav/index.vue
  57. 409 0
      components/mp-html/components/mp-html/mp-html.vue
  58. 493 0
      components/mp-html/components/mp-html/node/node.vue
  59. 1095 0
      components/mp-html/components/mp-html/parser.js
  60. 0 0
      components/mp-html/static/app-plus/mp-html/js/handler.js
  61. 0 0
      components/mp-html/static/app-plus/mp-html/js/uni.webview.min.js
  62. 1 0
      components/mp-html/static/app-plus/mp-html/local.html
  63. 62 0
      components/nav-bar/index.css
  64. 164 0
      components/nav-bar/index.vue
  65. 29 0
      components/product-activity/index.css
  66. 64 0
      components/product-activity/index.vue
  67. 7 0
      components/product-login/index.css
  68. 83 0
      components/product-login/index.vue
  69. 28 0
      components/product-popup/index.css
  70. 824 0
      components/product-popup/index.vue
  71. 37 0
      components/product_footer/index.css
  72. 369 0
      components/product_footer/index.vue
  73. 18 0
      components/refund-popup/index.css
  74. 237 0
      components/refund-popup/index.vue
  75. 37 0
      components/share-activity/share.css
  76. 385 0
      components/share-activity/share.vue
  77. 37 0
      components/share/share.css
  78. 575 0
      components/share/share.vue
  79. 44 0
      components/shopping-cart/index.css
  80. 65 0
      components/shopping-cart/index.vue
  81. 13 0
      components/update-userinfo/index.css
  82. 144 0
      components/update-userinfo/index.vue
  83. 26 0
      htmllogin/login/login.css
  84. 170 0
      htmllogin/login/login.vue
  85. 二进制
      htmllogin/static/common/images/dlbg.png
  86. 二进制
      htmllogin/static/common/images/wechat.png
  87. 二进制
      htmllogin/static/common/images/xyico.png
  88. 二进制
      htmllogin/static/common/images/xyico_h.png
  89. 12 0
      integralShop/activity/index.css
  90. 107 0
      integralShop/activity/index.vue
  91. 65 0
      integralShop/cart/cart.css
  92. 799 0
      integralShop/cart/cart.vue
  93. 62 0
      integralShop/content/content.css
  94. 180 0
      integralShop/content/content.vue
  95. 83 0
      integralShop/detail/detail.css
  96. 750 0
      integralShop/detail/detail.vue
  97. 80 0
      integralShop/index/index.css
  98. 378 0
      integralShop/index/index.vue
  99. 58 0
      integralShop/integralDetailed/index.css
  100. 268 0
      integralShop/integralDetailed/index.vue

+ 1 - 0
.gitignore

@@ -0,0 +1 @@
+/unpackage/

+ 20 - 0
.hbuilderx/launch.json

@@ -0,0 +1,20 @@
+{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
+  // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
+    "version": "0.0",
+    "configurations": [{
+     	"default" : 
+     	{
+     		"launchtype" : "remote"
+     	},
+     	"mp-alipay" : 
+     	{
+     		"launchtype" : "remote"
+     	},
+     	"mp-weixin" : 
+     	{
+     		"launchtype" : "remote"
+     	},
+     	"type" : "uniCloud"
+     }
+    ]
+}

+ 203 - 0
App.vue

@@ -0,0 +1,203 @@
+<script>
+	//app.js
+	const req = require("./utils/request.js");
+	// // #ifndef H5
+	// let livePlayer = requirePlugin('live-player-plugin')
+	// // #endif
+	export default {
+		onLaunch: function(options) {
+			// this.globalData.appInitData();
+			this.globalData.InitUpdateManager();
+			this.globalData.getChatList();
+			// 
+			uni.hideTabBar()
+		},
+		onShow(options) {
+			let scene = options.scene;
+			req.setStorage('scene',scene)
+			this.globalData.getVideoScene();
+			// // #ifndef H5
+			// // 分享卡片/订阅消息/扫码二维码/广告/朋友圈等场景才能调用getShareParams接口获取以下参数
+			// const sceneList = [1007, 1008, 1014, 1044, 1045, 1046, 1047, 1048, 1049, 1073, 1154, 1155]
+			// if (sceneList.includes(options.scene)) {
+			// 	livePlayer.getShareParams()
+			// 		.then(res => {
+			// 			// 房间号
+			// 			console.log('get room id', res.room_id)
+			// 			// 用户openid
+			// 			console.log('get openid', res.openid)
+			// 			// 分享者openid,分享卡片进入场景才有
+			// 			console.log('get share openid', res.share_openid)
+			// 			// 开发者在跳转进入直播间页面时,页面路径上携带的自定义参数,这里传回给开发者
+			// 			console.log('get custom params', res.custom_params)
+			// 			if(res.custom_params){
+			// 				req.setStorage('pidCode',res.custom_params.userId)
+			// 			}
+			// 		}).catch(err => {
+			// 			console.log('get share params', err)
+			// 		})
+			// }
+			// // #endif
+		},
+		globalData: {
+			//获取客服配置
+			getChatList() {
+				req.getRequest('/api/customer/list', {}, res => {
+					req.setStorage('chatService', res);
+				});
+			},
+			appInitData() {
+				var getSysInfo = uni.getSystemInfoSync();
+				this.isIPhone = getSysInfo.model.indexOf("iPhone") != -1;
+				this.isIPhoneX = getSysInfo.model.indexOf("iPhone X") != -1 || getSysInfo.model.indexOf("iPhone 11") != -
+				1; // 是否为全面屏
+
+				this.isFullScreen = getSysInfo.screenHeight / getSysInfo.screenWidth >= 2.1; // iPhoneX底部空白高度为68,全面屏为20
+
+				this.bottomBlankHeignt = this.isIPhoneX ? 68 : this.isFullScreen ? 10 : 0;
+				this.height = getSysInfo.statusBarHeight;
+				this.screenHeight = getSysInfo.screenHeight;
+			},
+			getVideoScene(){
+				let scene = req.getStorage('scene');
+				let arr = [1195,1193,1191,1184,1177,1176,1175,1201,1216,10001]
+				req.setStorage('isVideoScene',false)
+				arr.some(it=>{
+					if(it === scene){
+						req.setStorage('isVideoScene',true)
+					}
+				})
+				console.log('isVideoScene==',req.getStorage('isVideoScene'))
+			},
+			InitUpdateManager() {
+				const updateManager = uni.getUpdateManager();
+				let that = this;
+				updateManager.onCheckForUpdate(function(res) {
+					// 请求完新版本信息的回调
+					console.log(res.hasUpdate);
+				});
+				updateManager.onUpdateReady(function() {
+					uni.showModal({
+						title: '更新提示',
+						content: '新版本已经准备好,是否重启应用?',
+						success: function(res) {
+							if (res.confirm) {
+								// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
+								uni.clearStorage({
+									success() {
+										updateManager.applyUpdate();
+									}
+
+								});
+							}
+						}
+					});
+				});
+				updateManager.onUpdateFailed(function() { // 新版本下载失败
+				});
+			},
+
+			getCheckSessoin(success) {
+				// var sessionKey = req.getStorage('SESSION_KEY');
+				// let that = this;
+				// wx.checkSession({
+				//   success() {
+				//     if (!sessionKey) {
+				//       that.getSessionKey(success);
+				//     } else {
+				//       success.call(this, sessionKey);
+				//     }
+				//   },
+				//   fail() {
+				//     that.getSessionKey(success);
+				//   }
+				// })
+				this.getSessionKey(success);
+			},
+
+			getSessionKey(success) {
+				let that = this;
+				uni.login({
+					success(res) {
+						req.postRequest('/api/code', {
+							code: res.code
+						}, data => {
+							that.SESSION_KEY = data.session_key;
+							req.setStorage('SESSION_KEY', data.session_key);
+							success.call(this, data);
+						}, true);
+					}
+				});
+			},
+
+			userInfo: null,
+			height: 0,
+			isredenvelopes:true,
+			isLayerAd:true,
+
+			/**
+			 * 打开新页面
+			 */
+			openPage(e) {
+				let url
+				if (e.indexOf("plugin-private:") != -1) {
+					url = `${e}`
+				} else {
+					url = `/${e}`
+				}
+				uni.navigateTo({
+					// url: `/${e}` 
+					url: url
+				});
+				// uni.navigateTo({
+				//   url: `/${e}`
+				// });
+			},
+
+			/**
+			 * 
+			 * 关闭当前页面,跳转到应用内的某个页面。
+			 */
+			redirectTab(path) {
+				uni.redirectTo({
+					url: `/${path}`
+				});
+			},
+
+			/**
+			 * 
+			 * 跳转到 tabBar 页面,并关闭其他所有非 tabBar 页面
+			 */
+			switchTab(path) {
+				uni.switchTab({
+					url: `/${path}`
+				});
+			},
+
+			/**
+			 * 
+			 * 关闭所有页面,打开到应用内的某个页面
+			 */
+			reLaunchTo(path) {
+				uni.reLaunch({
+					url: `/${path}`
+				});
+			},
+
+			/**
+			 * 
+			 * 保留当前页面,跳转到应用内的某个页面
+			 */
+			navigateTo(path) {
+				uni.navigateTo({
+					url: `/${path}`
+				});
+			}
+
+		},
+		methods: {}
+	};
+</script>
+<style>
+	@import "./app.css";
+</style>

+ 0 - 0
README.md


+ 114 - 0
activity/bargain/detail/detail.css

@@ -0,0 +1,114 @@
+/* bargin/detail/detail.wxss */
+.banner{overflow: hidden;position: relative;}
+.swiper,.swiper image{width: 100%;height: 750rpx;}
+.dots{position: absolute;left: 0;right: 0;bottom: 11rpx;align-items: center;justify-content: center;}
+.dot{background:var(--mina) ;width: 10rpx;height: 10rpx;border-radius: 5rpx;margin: 0 3rpx;}
+.dot.active{width: 30rpx;}
+.group{position: relative;height: 120rpx;}
+.ptbg{width: 100%;height: 120rpx;position: absolute;top: 0;left: 0;z-index: 1;}
+.groups{position: relative;z-index: 2;align-items: center;padding: 0 30rpx;justify-content: space-between;height: 120rpx;}
+.price{font-size: 28rpx;color: #FE0419;}
+.price text{font-size: 40rpx;font-weight: bold;}
+.pin text.origin,.price text.origin{font-weight: normal;font-size: 24rpx;text-decoration: line-through;}
+.price text.origin{color: #999;}
+.left .price,.left .price text.origin{color: #fff;}
+.pin{font-size: 22rpx;color: #fff;}
+.tuan{width: 160rpx;height: 36rpx;float: right;}
+.endtime{align-items: center;font-size: 22rpx;color: #fff;line-height: 36rpx;margin-top: 47rpx;overflow: hidden;clear: both;}
+.endtime view{margin-right: 15rpx;}
+.endtime text{display: block;width:36rpx;height:36rpx;background:rgb(0,0,0,.4);border-radius:6rpx;font-size: 24rpx;color: #fff;text-align: center;line-height: 36rpx;margin:0 5rpx}
+
+
+.info{padding: 30rpx 30rpx 40rpx;}
+.infos{align-items: center;justify-content: space-between;}
+.share{font-size: 20rpx;color: #999;text-align: center;position: relative;margin-left: 45rpx !important;}
+.share::after{content: '';display: block;width: 2rpx;height: 45rpx;background: #e7e7e7;position: absolute;top: 50%;transform: translateY(-50%);left: -30rpx;}
+.share image{width: 31rpx;height: 31rpx;margin: 0 auto 10rpx;}
+.title{font-size: 30rpx;color: #222;line-height: 40rpx;font-weight: bold;}
+.tag{width: 82rpx;height: 36rpx;display: inline-block;margin: 0 10rpx 0 0;position: relative;top: 7rpx;}
+.detinfo .item{padding: 30rpx;border-bottom: 1rpx solid #f6f6f6;}
+.detinfo .item:last-child{border-bottom: none;}
+.item label{display: block;width: 130rpx;font-size: 28rpx;color: #222;font-weight: bold;line-height: 40rpx;}
+.quan .flex{align-items: center;}
+.quan text{display: block;background: #FDF5F3;padding: 0 13rpx;height: 40rpx;line-height: 40rpx;font-size: 24rpx;color: #FF5F08;margin-right: 10rpx;}
+.ling{font-size: 24rpx;color: #FF5F08;align-items: center;}
+.ling image{width: 14rpx;height: 24rpx;margin-left: 11rpx;}
+.address{font-size: 28rpx;color: #333;line-height: 40rpx;}
+.huo{font-size: 24rpx;color: #666;line-height: 40rpx;}
+.huo text{color: #FE0419;}
+.more{width: 36rpx;height: 10rpx;margin-top: 15rpx;}
+
+
+
+/* .user{width: 68rpx;height: 68rpx;border-radius: 50%;margin-right: 15rpx;} */
+.name{font-size: 28rpx;color: #666;line-height: 68rpx;justify-content: space-between;align-items: center;}
+.pinglun{font-size: 28rpx;color: #333;margin: 15rpx 0 0;line-height: 44rpx;}
+.huifu{background: #F2F2F2;border-radius: 6rpx;margin: 25rpx 0 0;line-height: 42rpx;padding: 20rpx 30rpx;position: relative;}
+.huifu::after{content: '';display: block;width: 0;height: 0;border: 9rpx solid transparent;border-bottom-color: #F2F2F2;border-top: none;position: absolute;top: -8rpx;left: 39rpx;}
+.show{display: block;}
+.hide{display: none;}
+
+.bot{height: 80rpx;align-items: center;padding: 20rpx 30rpx 20rpx 0;}
+.botbtn{font-size: 22rpx;color: #6A6A6A;width: 145rpx !important;text-align: center;position: relative;}
+.botbtn image{width: 40rpx;height: 34rpx;margin: 10rpx auto 5rpx;}
+.message{background: #DF1A14;height: 28rpx;line-height: 28rpx;font-size: 20rpx;color: #fff;text-align: center;border-radius: 15rpx;box-sizing: border-box;min-width: 21rpx;padding: 0 8rpx;position: absolute;top: 0;right: 25%;}
+.gmbtn{width: 276rpx;height: 76rpx;border-radius: 40rpx;text-align: center;line-height: 76rpx;font-size: 30rpx;color: #FD3C31;border: 2rpx solid #FD3C31;margin-right: 20rpx;}
+.ctbtn{width: 280rpx;height: 80rpx;border-radius: 40rpx;text-align: center;line-height: 80rpx;font-size: 30rpx;color: #fff;}
+.yybtn{width: 430rpx;height: 80rpx;border-radius: 40rpx;text-align: center;line-height: 80rpx;font-size: 30rpx;color: #fff;align-items: center;justify-content: center;}
+.cancel-yy{width: 426rpx;height: 76rpx;border: 2rpx solid #05C379;border-radius: 40rpx;text-align: center;line-height: 76rpx;font-size: 30rpx;color: #05C379;align-items: center;justify-content: center;}
+.yybtn .icon,.cancel-yy .icon{font-size: 30rpx;margin-right: 15rpx;}
+
+
+/* 组团情况 */
+.zu-tit{height: 100rpx;align-items: center;justify-content: space-between;padding: 0 30rpx;border-bottom: 2rpx solid #f5f6f7;font-size: 30rpx;}
+.zu-tit .icon{color: #C1C1C1;font-size: 18rpx;width: 40rpx; height: 40rpx;}
+.zu-list .li{border-bottom: 2rpx solid #f5f6f7;height: 120rpx;padding: 0 30rpx;align-items: center;}
+.zu-list .li:last-child{border-bottom: none;}
+.zu-list .li image{width: 72rpx;height: 72rpx;border-radius: 50%;}
+.zu-name{font-size: 28rpx;margin: 0 20rpx;overflow:hidden; 
+  text-overflow:ellipsis; 
+  white-space:nowrap; }
+.zu-ren{text-align: right;margin-right: 20rpx;}
+.cha{font-size: 24rpx;color: #333;}
+.cha text{color: #FE0419;}
+.zu-time{font-size: 22rpx;margin-top: 8rpx;}
+.zu-time text{color: #666;}
+.zu-btn{width: 150rpx;height: 60rpx;border-radius: 30rpx;font-size: 24rpx;color: #fff;text-align: center;line-height: 60rpx;}
+.end{background: #999999;}
+.remind{width: 280rpx;height: 80rpx;border-radius: 50rpx;font-size: 30rpx;color: #fff;text-align: center;justify-content: center;line-height: 50rpx;align-items: center;}
+
+/* 更多砍价 */
+.ptuanmode{position: fixed;z-index: 100;background: #fff;width: 90%; border-radius:30rpx 30rpx;left: 50%;top: 50%; transform: translate(-50%, -50%);}
+.tole{font-size: 24rpx;color: #999;text-align: center;padding: 0 0 10rpx 0;}
+.pttop{padding: 30rpx 0;text-align: center;font-size: 34rpx;border-bottom: 2rpx solid #9999;}
+/* .zutuan{position: relative;} */
+.page{position: fixed;z-index: 100;}
+.guarantee{border-top: 1rpx solid #f6f6f6;padding: 15rpx 0 0 0; margin-top: 15rpx;}
+.guarantee .cont{flex-wrap: wrap;font-size: 26rpx;}
+.guarantee .cont .li{align-items: center;margin-right: 20rpx;
+  margin-bottom: 10rpx;}
+.guarantee .cont image{        width: 30rpx;
+  height: 30rpx;}
+  
+  /* 小店相关 */
+  .xiaodian{position: relative;height: 122rpx;padding: 0 26rpx 0 110rpx;align-items: center;margin: 35rpx 30rpx 0;}
+  .xdbg{position: absolute;left: 0;top: 0;width: 100%;height: 100%;z-index: 1;}
+  .shouyi{position: relative;z-index: 2;color: #fff;margin-right: 10rpx;}
+  .shouyi view{font-size: 40rpx;font-weight: bold;margin-top: 8rpx;}
+  .shouyi text{font-weight: normal;font-size: 24rpx;}
+  .addshop{height: 62rpx;padding: 0 25rpx;border-radius: 31rpx;background:linear-gradient(115deg,rgba(255,78,78,1) 0%,rgba(220,21,21,1) 100%);text-align: center;line-height: 62rpx;font-size: 24rpx;color: #fff;position: relative;z-index: 2;}
+  .fenxiang{height: 62rpx;padding: 0 25rpx;margin-left: 15rpx;border-radius: 31rpx;background:linear-gradient(115deg,rgba(255,78,78,1) 0%,rgba(220,21,21,1) 100%);text-align: center;line-height: 62rpx;font-size: 24rpx;color: #fff;position: relative;z-index: 2;}
+  .goShop{height: 62rpx;padding: 0 25rpx;margin-left: 15rpx;border-radius: 31rpx;background:linear-gradient(115deg,rgba(255,78,78,1) 0%,rgba(220,21,21,1) 100%);text-align: center;line-height: 62rpx;font-size: 24rpx;color: #fff;position: relative;z-index: 2;}
+  
+  .suc{position: fixed;left: 50%;top: 50%;transform: translate(-50%,-50%);background: #fff;width: 536rpx;border-radius: 20rpx;z-index: 100;text-align: center;padding-bottom: 47rpx;}
+  .tjcg1{width: 100%;height: 284rpx;}
+  .tjcg{width: 195rpx;height: 38rpx;margin: 52rpx auto 15rpx;}
+  .suc text{display: block;font-size: 24rpx;color: #333;}
+  .shopcc{justify-content: center;}
+  .shop{width:220rpx;height:80rpx;background:linear-gradient(123deg,rgba(255,130,130,1) 0%,rgba(220,21,21,1) 100%);font-size: 30rpx;color: #fff;line-height: 80rpx;border-radius: 40rpx;margin: 45rpx 15rpx 40rpx;}
+  .share-btn{justify-content: space-between;padding: 0 54rpx;}
+  .suc-close{position: absolute;left: 50%;transform: translateX(-50%);bottom: -102rpx;width: 62rpx;height: 62rpx;}
+  
+  .pro-sel{align-items: center;}
+  .pro-sel .flex{text-overflow: ellipsis;white-space: nowrap;overflow: hidden;}
+  .mrico{width: 16rpx;height: 27rpx;}

+ 1396 - 0
activity/bargain/detail/detail.vue

@@ -0,0 +1,1396 @@
+<template>
+	<view v-if="allShow">
+		<!--bargin/detail/detail.wxml-->
+		<view class="banner">
+			<swiper class="swiper" @change="swiperChange" :current="current" autoplay="true" circular="true"
+				duration="1000">
+				<block v-for="(item, index) in bannerUrls" :key="index">
+					<swiper-item autoplay="true">
+						<image :src="item + '?x-oss-process=style/w750-auto'" mode="aspectFit"></image>
+					</swiper-item>
+				</block>
+			</swiper>
+			<view class="dots dflex">
+				<block v-for="(item, index) in bannerUrls" :key="index">
+					<view :class="'dot ' + (index == swiperCurrent ? ' active' : '')" :data-current="index"
+						@tap="dotEvent"></view>
+				</block> 
+			</view>
+		</view>
+		<!-- <view class="notification_bar" wx:if="{{isNotice}}">
+	<swiper class="swiper_container" vertical="true" autoplay="true" circular="false" duration="1000" interval="5000" easing-function="easeInOutCubic" class="bar_box dflex">
+		<swiper-item class="bar_con dflex" wx:for="{{contentList}}" wx:key="item">
+			<view class="bar dflex">
+				<image class="bar_left" src="{{item.pic}}" />
+				<text class="bar_text">最新订单来自</text>
+				<text class="bar_text">{{item.name}},</text>
+				<text class="bar_text">{{item.time}}</text>
+			</view>
+		</swiper-item>
+	</swiper>
+</view> -->
+		<view class="group">
+			<image src="/activity/static/activity/images/kjbg.jpg" class="ptbg"></image>
+			<view class="groups dflex">
+				<view class="left">
+					<view class="price">砍后价¥<text>{{act.money}}</text></view>
+					<view class="pin"><text class="origin"
+							v-if="act.orPrice!=0&&act.orPrice>act.money">原价¥{{act.orPrice?act.orPrice:''}}</text>
+						<block v-if="act.orPrice!=0&&act.orPrice>act.money"> | </block>{{count ? count:0}}人已参与
+					</view>
+				</view>
+				<view class="right">
+					<image src="/activity/static/activity/images/kanjia.png" class="tuan"></image>
+					<view class="endtime dflex">
+
+						<view>{{act.start==false&&act.end==false?'距开始':'距结束'}}</view>
+						<block v-if="timer.length==4">
+							<block v-if="timer[0] !=0"><text>{{timer[0]}}</text>天</block>
+							<text>{{timer[1]}}</text>:
+							<text>{{timer[2]}}</text>:
+							<text>{{timer[3]}}</text>
+						</block>
+						<block v-else>
+							<text>{{timer[0]}}</text>:
+							<text>{{timer[1]}}</text>:
+							<text>{{timer[2]}}</text>
+						</block>
+					</view>
+				</view>
+			</view>
+		</view>
+
+		<view class="info bgfff">
+			<view class="infos dflex">
+				<view class="title flex">{{pro.title?pro.title:''}}</view>
+				<view class="share" @tap="showShare">
+					<image src="/static/pages/images/fxico.png"></image>分享
+				</view>
+			</view>
+			<view class="guarantee dflex" v-if="guarantee.length>0">
+				<view class="cont dflex">
+					<view v-for="(item, index) in guarantee" :key="index" class="dflex li">
+						<image src="/activity/static/activity/images/guarantee.png"></image>{{item}}
+					</view>
+				</view>
+			</view>
+		</view>
+
+		<view class="detinfo mt20 bgfff">
+			<!-- isOtc 0 默认 1 处方药 2 非处方药 3 医疗器械 4 食品类 5 海外购 -->
+			<block v-if="act.isOtc!=5">
+			<block v-if="is_open_shop == 1 && ascription">
+			<view class="xiaodian dflex malr20" v-if="((act.isMeCommission != 1 || act.isMeCommission != '1') && act.oneCommission>0) || ((act.isMeCommission == 1 || act.isMeCommission == '1') && act.twoCommission>0) || act.serviceShopRate">
+				<image src="/static/pages/images/xdbg1.png" class="xdbg"></image>
+				<view class="shouyi flex" v-if="((act.isMeCommission != 1 || act.isMeCommission != '1') && act.oneCommission>0) || ((act.isMeCommission == 1 || act.isMeCommission == '1') && act.twoCommission>0)">
+					<text>分销收益</text>
+					<view v-if="act.isMeCommission == 0"><text>¥</text>{{act.oneCommission}}</view>
+					<view v-else><text>¥</text>{{act.twoCommission}}</view>
+				</view>
+				<view class="shouyi flex" v-if="act.serviceShopRate">
+					<text>小店服务费</text>
+					<view><text>¥</text>{{act.serviceShopRate}}</view>
+				</view>
+				<view class="dflex" v-if="act.isJoinShop">
+					<view class="fenxiang" @tap="showShare">分享推广</view>
+					<navigator :url="url" hover-class="none" class="goShop">去小店</navigator>
+				</view>
+				<view class="addshop" @tap="addShop" v-else>添加到小店</view>
+			</view>
+			</block>
+			<block v-else>
+			<view class="xiaodian dflex malr20" v-if="((act.isMeCommission != 1 || act.isMeCommission != '1') && act.oneCommission>0) || ((act.isMeCommission == 1 || act.isMeCommission == '1') && act.twoCommission>0)">
+				<image src="/static/pages/images/xdbg1.png" class="xdbg"></image>
+				<view class="shouyi flex">
+					<text>分销收益</text>
+					<view v-if="act.isMeCommission == 0"><text>¥</text>{{act.oneCommission}}</view>
+					<view v-else><text>¥</text>{{act.twoCommission}}</view>
+				</view>
+				<navigator url="/promote/apply/apply" hover-class="none" class="fenxiang" v-if="isDistriUser != 2">我要推广</navigator>
+				<view class="fenxiang" @tap="showShare" v-else>分享推广</view>
+			</view>
+			</block>
+			</block>
+			<!-- <view class="item dflex">
+		<label>优惠券</label>
+		<view class="quan flex dflex">
+			<view class="flex dflex">
+				<text>满500减50</text>
+				<text>满200减10</text>
+			</view>
+			<view class="ling dflex">领券<image src="/pages/images/more3.png"></image>
+			</view>
+		</view>
+	</view> -->
+			<view class="item pro-sel dflex" v-if="pro.propertiesList && pro.propertiesList.length > 0"
+				@click="pro.stock > 0 ? addShopCart() : ''">
+				<label>已选</label>
+				<view class="flex">{{pro.properties}}</view>
+				<image src="/static/pages/images/more.png" class="mrico"></image>
+			</view>
+			<view class="item dflex">
+				<label>配送至</label>
+				<view class="flex" @tap="toAddress">
+					<view class="address">{{address.address?address.address:''}}{{address.house?address.house:''}}
+					</view>
+					<view class="huo" v-if="pro.isTimely == 1"><text>现货</text>,现在下单,预计2小时后送达</view>
+				</view>
+				<image src="/static/pages/images/more2.png" class="more" @tap="toAddress"></image>
+			</view>
+			<view class="item dflex">
+				<label>门店</label>
+				<view class="flex" @tap="toMerchant">
+					<view class="address">{{merchant.title}}</view>
+				</view>
+			</view>
+		</view>
+		<!-- 砍价情况 -->
+		<view class="zutuan bgfff mt20"
+			v-if="(activityPurchaseRecordListDTO&&activityPurchaseRecordListDTO.length > 0)||(act.activityPurchaseRecordListDTO&&act.activityPurchaseRecordListDTO.length>0)">
+			<view class="zu-tit dflex">{{act.activityPurchaseRecordListDTO.length}}人正在砍价,可直接参与<icon
+					class="icon iconfont icon-bottom"
+					@tap="activityPurchaseRecordListDTO.length>1&&activityDot.length>0?clickmore():''"> </icon>
+			</view>
+			<view class="zu-list">
+				<block v-for="(item, index) in activityPurchaseRecordListDTO" :key="index">
+					<view class="li dflex" @tap="toKanjia" :data-id="item.id" :data-acid="item.groupMainP.acpId"
+						:data-proid="item.groupMainP.productId" :data-superid="item.groupMainP.id"
+						:data-userid="item.groupMainP.userId" :data-end="item.end">
+						<image :src="item.groupMainP.uavatar" mode="aspectFit"></image>
+						<view class="zu-name flex">{{item.groupMainP.unickName}}</view>
+						<view class="zu-ren">
+							<view class="cha" v-if="item.groupMainP.bargainingAmount == 0">已砍到底价</view>
+							<view class="cha" v-else>
+								只差<text>¥{{item.groupMainP.bargainingAmount>0 ? item.groupMainP.bargainingAmount : ((act.orPrice)*10000-(act.money)*10000)/10000}}</text>到底价
+							</view>
+							<view class="zu-time" v-if="item.end ||item.groupMainP.bargainingAmount == 0">已结束</view>
+							<view class="zu-time" v-else>剩余<text>{{item.times}}</text></view>
+						</view>
+						<view
+							:class="'zu-btn ' + (item.groupMainP.bargainingAmount == 0 || item.end ? 'end' : 'mbglinear')"
+							v-if="item.groupMainP.bargainingAmount == 0">查看详情</view>
+						<view
+							:class="'zu-btn ' + (item.groupMainP.bargainingAmount == 0 || item.end ? 'end' : 'mbglinear')"
+							v-else>帮TA砍价
+						</view>
+
+					</view>
+				</block>
+			</view>
+		</view>
+
+
+
+		<!--  商品详情等页面 -->
+		<product-footer ref="list" @scoreTab="scoreTab" id="list" :detail="nodes" :imgs="imgs" :proId="pro.id"
+			v-if="pro.id" :form="form" @showTab="showTab" @freshen="freshenFun"></product-footer>
+
+		<v-share :hide-toast="hideShare" :product="pro" :code-url="codeUrl" a-type="5" @onFather="click"></v-share>
+
+		<view class="placeholder-view" :style="'height:' + (bottomBlankHeight + 140) + 'rpx'"></view>
+		<view class="bot fixed bgfff dflex" :style="'padding-bottom: ' + (bottomBlankHeight + 20) + 'rpx'" >
+			<contact-button img-url="/static/pages/images/kfico.png" class-name="botbtn" button-text="在线客服"></contact-button>
+			<!-- <navigator class="botbtn" open-type="switchTab" url="/pages/cart/cart" hover-class="none">
+		<image src="/pages/images/gwc.png"></image>购物车<text class="message" wx:if="{{pro.count > 0}}">{{pro.count}}</text>
+	</navigator> -->
+			<!-- <view class="botbtn" bindtap="clickCollect">
+		<image src="/pages/images/shoucang_h.png" wx:if="{{pro.isCollect}}"></image>
+		<image src="/pages/images/shoucang.png" wx:else></image>收藏
+	</view> -->
+			<!-- <view class="addcart">加入购物车</view> -->
+			<view class="gmbtn" @tap="atOnceBuy">¥{{salePrice}} 下单购买</view>
+			<block v-if="act.start==true">
+				<view class="ctbtn mbglinear" @tap="toKjDetail" v-if="isBargain||isuser">我的砍价</view>
+				<view class="ctbtn mbglinear" @tap="create" :data-actid="act.id"
+					v-if="act.end==false&&!isBargain&&!isuser">发起砍价</view>
+				<view class="ctbtn end" v-if="act.end==true&&!isBargain&&!isuser">活动已结束</view>
+			</block>
+
+			<block v-if="act.start==false&&act.end==false">
+				<view class="remind mbggreen dflex" v-if="act.start==false&&isRemind" @tap="cancelActivityRemind"
+					:data-index="index" data-type="2">取消预约</view>
+				<view class="remind mbggreen dflex" v-if="act.start==false&&!isRemind" @tap="addActivityRemind">
+					<icon class="iconfont icon-yugao" :data-index="index" data-type="2"></icon>预约提醒
+				</view>
+			</block>
+		</view>
+
+		<!-- 商品规格 -->
+		<block v-if="isShow">
+			<product-popup :product="popup" order-type="1" @hidePopup="hidePopup" :merchant="merchant"
+				:merchant-id="query.merchantId" :shopId="query.shopId"></product-popup>
+		</block>
+
+		<view class="contact_index" @tap="goTop">
+			<image src="/static/pages/images/backtop.png"></image>顶部
+		</view>
+
+		<!-- 查看更多 -->
+		<view class="mask" @tap="eliminate" v-if="show" catchtouchmove="true"></view>
+		<view class="page" :style="'margin:-' + (windowHeight/2) + 'px 0 0 -' + (windowWidth/2) + 'px'">
+			<view class="ptuanmode" catchtouchmove="true" v-if="show">
+
+				<view class="zu-list">
+					<view class="pttop">正在砍价</view>
+					<scroll-view scroll-y="true" style="max-height: 550rpx;">
+						<view v-for="(item, index) in activityDot" :key="index" class="li dflex" @tap="toKanjia"
+							:data-id="item.id" :data-acid="item.groupMainP.acpId"
+							:data-proid="item.groupMainP.productId" :data-superid="item.groupMainP.id"
+							:data-userid="item.groupMainP.userId" :data-end="item.end">
+							<image :src="item.groupMainP.uavatar" mode="aspectFit"></image>
+							<view class="zu-name flex">{{item.groupMainP.unickName}}</view>
+							<view class="zu-ren">
+								<view class="cha" v-if="item.groupMainP.bargainingAmount == 0">已砍到底价</view>
+								<view class="cha" v-else>
+									只差<text>¥{{item.groupMainP.bargainingAmount>0 ? item.groupMainP.bargainingAmount : ((act.orPrice)*10000-(act.money)*10000)/10000}}</text>到底价
+								</view>
+								<view class="zu-time" v-if="item.end ||item.groupMainP.bargainingAmount == 0">已结束</view>
+								<view class="zu-time" v-else>剩余<text>{{item.times}}</text></view>
+							</view>
+							<view
+								:class="'zu-btn ' + (item.groupMainP.bargainingAmount == 0 || item.end ? 'end' : 'mbglinear')"
+								v-if="item.groupMainP.bargainingAmount == 0">查看详情</view>
+							<view
+								:class="'zu-btn ' + (item.groupMainP.bargainingAmount == 0 || item.end ? 'end' : 'mbglinear')"
+								v-else>帮TA砍价
+							</view>
+
+						</view>
+					</scroll-view>
+					<view class="tole" v-if="activityDot.length==21">--仅显示20个正在砍价的人--</view>
+				</view>
+			</view>
+		</view>
+		<!-- 添加到小店成功 -->
+		<view class="mask" :hidden="isHide" @tap="hidePop"></view>
+		<view class="suc" :hidden="isHide">
+			<image src="/static/pages/images/tjcg1.png" class="tjcg1"></image>
+			<image src="/static/pages/images/tjcg.png" class="tjcg"></image>
+			<text>快去我的小店看看吧</text>
+			<view class="shopcc dflex">
+				<view class="shop" @tap="showShare">分享推广</view>
+				<navigator :url="url" hover-class="none" class="shop" >我的小店</navigator>
+			</view>
+			<!-- <view class="share-btn dflex">
+				<button class="wxfriend dflex" open-type="share">
+					<image src="/static/pages/images/wechat.png"></image>
+					微信好友
+				</button>
+				<view class="wxposter dflex" @tap="generatePoster">
+					<image src="/static/pages/images/poster.png"></image>
+					生成海报
+				</view>
+			</view> -->
+			<image src="/static/pages/images/close2.png" class="suc-close" @tap="hidePop"></image>
+		</view>
+		<block v-if="isPopupLogin">
+			<product-login :about="about" @hidePopupLogin="hidePopupLogin"></product-login>
+		</block>
+	</view>
+</template>
+
+<script>
+	const app = getApp();
+	const req = require("../../../utils/request.js");
+	const utils = require("../../../utils/util.js");
+	var QQMapWX = require("../../../utils/qqmap.js");
+	const requsetmessage = require("../../../utils/requestmessage.js");
+	const route = require("../../../utils/route");
+	const api = require("../../../utils/api.js");
+	import productFooter from "../../../components/product_footer/index";
+	import productPopup from "../../../components/product-popup/index";
+	import vShare from "../../../components/share/share";
+	import productLogin from "../../../components/product-login/index";
+
+	export default {
+		data() {
+			return {
+				bottomBlankHeight: app.globalData.isIPhoneX ? 68 : 0,
+				swiperCurrent: 0,
+				bannerUrls: [],
+				isShow: false,
+				pro: {},
+				timer: [],
+				isRemind: false,
+				hideShare: true,
+				codeUrl: '',
+				bgUrl: "/activity/static/activity/images/share_pintuan.jpg",
+				contentList: [{
+					pic: "/static/pages/images/bar.png",
+					name: '好风依旧',
+					time: '4秒前'
+				}, {
+					pic: "/static/pages/images/bar.png",
+					name: '杨鑫',
+					time: '20秒前'
+				}, {
+					pic: "/static/pages/images/bar.png",
+					name: '杨鑫',
+					time: '5秒前'
+				}],
+				isNotice: false,
+				activityPurchaseRecordListDTO: [],
+				isBargain: false,
+				//是否发起砍价
+				form: {
+					page: 1,
+					limit: 10
+				},
+				freshen: true //是否更新页面
+					,
+				current: "",
+				query: "",
+				merchant: "",
+				merchantId: "",
+				shopId: "",
+				imgs: "",
+				nodes: "",
+				salePrice: "",
+				isuser: false,
+				acid: "",
+				act: "",
+				activityDot: "",
+				isStates: 0,
+				address: {},
+				popup: "",
+				bargainId: "",
+				count: "",
+				show: false,
+				tabIndex: "",
+				guarantee: "",
+				is_open_comments: "",
+				switch: true,
+				about:{},
+				allShow:false,
+				isHide: true,//添加小店成功弹窗
+				url: '',
+				is_open_shop: '',//商户是否开启分销
+				ascription: false,//是否开启小店
+				isDistriUser: 0, // 判断用户是否是分销员 2为分销员
+				isPopupLogin: false
+			};
+		},
+
+		components: {
+			productFooter,
+			productPopup,
+			vShare,
+			productLogin
+		},
+		props: {},
+		onLoad: function(options) {
+			this.query = options;
+			this.setData({
+				query: options
+			});
+
+			if (options.scene) {
+				this.scene = options.scene;
+			}
+
+			if (options.isShare) {
+				this.query.id = options.id;
+				this.query.acid = options.acid;
+				req.setStorage('pidCode', options.userId);
+				req.setStorage('pidCode', options.userId);
+				let params = {
+					userId: options.userId,
+					merchantId: options.merchantId ? options.merchantId : '',
+				}
+				this.bindUser(params);
+			}
+			setInterval(() => {
+				this.setData({
+					isNotice: true
+				});
+			}, 10000);
+		},
+		onShow: async function() {
+			let that = this
+			if (this.freshen) {
+				await this.loadCodeParams();
+				if(that.scene){
+					await that.bindUser(that.query);
+				}
+				this.getGuarantee().then(data => {
+					if (this.switch) {
+						api.getMerchant(this.query, req, data => {
+							that.loadDefaultAddress();
+							if (data == 1) {
+								api.locationShow()
+							} else {
+								that.getuserInfos(data);
+								if (data.type == 5) {
+									that.query.merchantId = data.merchantDTO.id
+									that.query.shopId = data.id
+								} else {
+									that.query.merchantId = data.id
+								}
+								if (req.getStorage('userInfo') && that.merchant.id != data.id) {
+									this.loadProudct();
+									let pages = getCurrentPages();
+									var prevPage = pages[pages.length - 2];
+									if (prevPage) {
+										prevPage.$vm.setData({
+											freshen: true
+										});
+									}
+								} else {
+									this.loadProudct();
+								}
+								that.merchant = data
+							}
+						})
+					}
+				})
+				// this.loadDefaultAddress();
+				await this.browsRecound(this.query.id);
+				this.initState();
+				// let merchant = req.getStorage('defaultMerchant');
+				// this.setData({ merchant: merchant });
+				// this.getMerchant();
+			}
+		},
+
+
+		onShareAppMessage: function() {
+			let merchantId = '';
+			let path = '/activity/bargain/detail/detail?id=' + this.query.id + '&acid=' + this.query.acid +
+				'&isShare=' + true;
+			if (!req.getStorage('userInfo').id) {} else {
+				path += '&userId=' + req.getStorage('userInfo').id;
+			}
+
+			let shopId = '';
+			if (req.getStorage('MERCHANT') && req.getStorage('MERCHANT').id != null) {
+				path += '&merchantId=' + req.getStorage('MERCHANT').id;
+				merchantId = req.getStorage('MERCHANT').id;
+
+				if (req.getStorage('smallShop') && req.getStorage('MERCHANT').id != null) {
+					path += '&shopId=' + req.getStorage('smallShop').id;
+					shopId = req.getStorage('smallShop').id;
+					merchantId = req.getStorage('smallShop').merchantDTO.id;
+				}
+			}
+
+
+			route.share(1, req.getStorage('userInfo').id, path, merchantId, shopId, 9, this.query.acid + '_' + this
+				.query.id);
+			return {
+				title: this.pro.title,
+				imageUrl: this.pro.pic,
+				path: path
+			}; // return {
+			//   title: this.data.pro.title,
+			//   imageUrl: this.data.pro.pic,
+			//   path: 'activity/bargain/detail/detail?id=' + this.query.id + '&acid=' + this.query.acid + '&isShare=' + true + '&userId=' + req.getStorage('userInfo').id+'&merchantId='+this.data.query.merchantId
+			// }
+		},
+
+		onUnload() {
+			this.clearAllTimer();
+			if (this.timer) clearInterval(this.timer);
+		},
+
+		onHide() {
+			this.clearAllTimer();
+		},
+
+		onReachBottom() {
+			if (this.is_open_comments == 1 && this.tabIndex == 2) {
+				this.form.page++;
+				this.setData({
+					['form.page']: this.form.page
+				});
+				// this.selectComponent("#list").loadScore(this.current);
+				this.$refs.list.loadScore(this.current);
+			}
+		},
+
+		methods: {
+			bindUser(par){
+				let userInfo = req.getStorage('userInfo');
+				if(!userInfo){
+					// uni.login({
+					// 	success(res) {
+					// 		let params = {
+					// 			code: res.code,
+					// 			parentId: par.userId,
+					// 			merchantId: par.merchantId ? par.merchantId : par.shopId ? par.shopId : ''
+					// 		}
+					// 		return new Promise((resolve,reject)=>{
+					// 			req.postRequest('/api/v2/login', params, data => {
+					// 				resolve();
+					// 			});
+					// 		})
+					// 	}
+					// });
+					// this.isPopupLogin = true;
+					req.silenceLogin(par.userId, par.merchantId ? par.merchantId : par.shopId ? par.shopId : '');
+				}
+			},
+			click(e) {
+		
+				this.hideShare = e
+			},
+			showShare() {
+				// #ifndef H5
+				req.isLogin().then(success => {
+					if (success) {
+						this.getCodeUrl()
+						this.setData({
+							hideShare: false
+						});
+					}
+				});
+				// #endif
+			},
+
+			/**
+			 * 轮播切换
+			 */
+			swiperChange({
+				detail
+			}) {
+				if (this.current == 0 && this.swiperCurrent > 1) {
+					//卡死时,重置current为正确索引
+					this.setData({
+						current: this.swiperCurrent
+					});
+				} else {
+					//正常轮转时,记录正确页码索引
+					this.setData({
+						swiperCurrent: detail.current
+					});
+				}
+			},
+
+			dotEvent(e) {
+				this.setData({
+					current: e.currentTarget.dataset.current
+				});
+			},
+
+			browsRecound(id) {
+				let from = {
+					bindId: id,
+					type: 9,
+					page: '/activity/bargain/detail/detail?id=' + this.query.id + '&acid=' + this.query.acid
+				};
+				if (this.query.isShare) {
+					from.shareType = 1;
+					from.page = '/activity/bargain/detail/detail?id=' + this.query.id + '&acid=' + this.query.acid +
+						'&isShare=' + true;
+
+					if (!this.query.userId) {} else {
+						from.page += '&userId=' + this.query.userId;
+					}
+
+					if (!this.query.merchantId) {} else {
+						from.merchantId = this.query.merchantId;
+					}
+
+					if (!this.query.shopId) {} else {
+						from.shopId = this.query.shopId;
+					}
+
+					if (!this.query.userId) {} else {
+						from.uid = this.query.userId;
+					}
+				}
+
+				if (this.query.isShareTimeline) {
+					from.shareType = 2;
+					from.page = '/activity/bargain/detail/detail?id=' + this.query.id + '&acid=' + this.query.acid +
+						'&isShareTimeline=' + true;
+
+					if (!this.query.userId) {} else {
+						from.page += '&userId=' + this.query.userId;
+					}
+
+					if (!this.query.merchantId) {} else {
+						from.merchantId = this.query.merchantId;
+					}
+
+					if (!this.query.shopId) {} else {
+						from.shopId = this.query.shopId;
+					}
+
+					if (!this.query.userId) {} else {
+						from.uid = this.query.userId;
+					}
+				}
+				return new Promise((resolve,reject)=>{
+					req.postRequest('/api/browse', from, data => {resolve()});
+				})
+			},
+
+			loadCodeParams() {
+				let _ts = this;
+
+				return new Promise((resolve, reject) => {
+					if (!_ts.scene) {
+						resolve();
+						return false;
+					}
+
+					req.getRequest('/api/code/params', {
+						scene: _ts.scene
+					}, data => {
+						this.query.id = data.scene.split('_')[0];
+						this.query.acid = data.scene.split('_')[1];
+						this.query.merchantId = data.scene.split('_')[2];
+						this.query.shopId = data.scene.split('_')[3];
+						this.query.userId = data.userId;
+						req.setStorage('pidCode', data.userId);
+						resolve();
+					});
+				});
+			},
+
+			getCodeUrl() {
+				let that = this; //获取小程序码
+				const query = this.query;
+				// const params = {
+				// 	page: 'activity/bargain/detail/detail',
+				// 	scene: that.pro.id + '_' + query.acid+'_'+query.merchantId
+				// };
+				let scene = that.pro.id + '_' + query.acid;
+				if (req.getStorage('MERCHANT') && req.getStorage('MERCHANT').id != null) {
+					scene += '_' + req.getStorage('MERCHANT').id;
+					if (req.getStorage('smallShop') && req.getStorage('MERCHANT').id != null) {
+						scene += '_' + req.getStorage('smallShop').id;
+					}
+				}
+		
+				const params = {
+					page: 'activity/bargain/detail/detail',
+					scene: scene
+				};
+				req.getRequest('/api/program/codev', params, url => {
+					that.setData({
+						codeUrl: url
+					});
+				});
+			},
+
+			async loadProudct() {
+				let that = this;
+				await that.loadActivity();
+				const query = that.query;
+				let isShowLoading = false;
+				
+				if (!isShowLoading) {
+					req.loadIng('加载中');
+					isShowLoading = true;
+				}
+				req.getRequest('/api/product/detail', {
+					id: query.id
+				}, data => {
+					var nodes = data.detail;
+
+					// if (nodes) {
+					// 	if (nodes.indexOf("src") >= 0) {
+					// 		//正则匹配所有图片路径
+					// 		var imgs = [];
+					// 		nodes = nodes.replace(/<img [^>]*src=['"]([^'"]+)[^>]*>/gi, function(match, capture) {
+					// 			imgs.push(capture);
+					// 			that.setData({
+					// 				imgs: imgs
+					// 			});
+					// 			return '';
+					// 		});
+					// 	}
+					// }
+					let propertiesList = []
+					if (data.propertiesList && data.propertiesList.length > 0) {
+						data.propertiesList.map(it => {
+							propertiesList.push(it.value);
+						})
+					}
+					data.properties = propertiesList.join(' / ')
+					that.setData({
+						bannerUrls: data.images,
+						pro: data,
+						nodes: nodes,
+						'pro.salePrice': this.act.money,
+						salePrice: data.salePrice,
+						// 'pro.stock': this.act.quantity,
+						'pro.stock': this.act.quantity - this.act.payQuantity,
+						'pro.payQuantity': this.act.payQuantity,
+						'pro.maxBuy': this.act.maxBuy,
+						allShow:true
+					});
+					if (isShowLoading) {
+						uni.hideLoading();
+						isShowLoading = false;
+					}
+					// that.getCodeUrl();
+				});
+			},
+
+			loadActivity() {
+				let that = this;
+				const query = this.query;
+				return new Promise((resolve, reject) => {
+					let from = {
+						id: query.acid,
+						type: 5,
+					}
+					if(!this.query.merchantId){}else{
+						from.merchantId=this.query.merchantId
+					}
+					let userInfo = req.getStorage('userInfo');
+					if(userInfo.listShopBase && userInfo.listShopBase.length >0 ){
+						from.shopId = userInfo.listShopBase[0].id;
+					}
+					req.getRequest('/api/activity/detailNew', from, data => {
+						/**
+						 * 判断活动是否结束,结束,2秒后为用户跳转至该商品的详情页面
+						 */
+						// if (data.end) {
+						//   this.setData({ start: data.end })
+						//   wx.showToast({
+						//     title: '活动已结束,两秒后将为您跳转至该商品页面',
+						//     icon: 'none',
+						//     success: function () {
+						//       setTimeout(function () {
+						//         wx.redirectTo({ url: '/product/detail/detail?id=' + data.productId })
+						//       }, 2000);
+						//     }
+						//   })
+						// }
+						this.getMy();
+						if (data.activityPurchaseRecordListDTO) {
+							data.activityPurchaseRecordListDTO.forEach(res => {
+								if (req.getStorage('userInfo').id == res.groupMainP.userId) {
+									this.setData({
+										isuser: true,
+										acid: res.groupMainP.id
+									});
+								}
+							});
+						}
+
+						this.setData({
+							act: data,
+							isRemind: data.remindId
+						});
+						if (data.activityPurchaseRecordListDTO) {
+							let groupList = [];
+							data.activityPurchaseRecordListDTO.map(item => {
+								if (item.groupList) {
+									groupList.push(item.groupList[item.groupList.length - 1]);
+								}
+							});
+							// console.log(groupList);
+							// data.activityPurchaseRecordListDTO.map((item, index) => {
+							// 	groupList.map((gItem, gIndex) => {
+							// 		console.log(gIndex, index,"123");
+							// 		if (gIndex == index) {
+							// 			console.log(gItem);
+							// 			item.groupMainP.bargainingAmount = parseFloat(gItem
+							// 				.afterAmount - that.act.money).toFixed(2);
+							// 			return item;
+							// 		}
+							// 	});
+							// });
+							// console.log(data.activityPurchaseRecordListDTO);
+							let activityPurchaseRecordListDTO;
+							let arr;
+
+							if (data.activityPurchaseRecordListDTO) {
+								activityPurchaseRecordListDTO = data.activityPurchaseRecordListDTO.slice(0,
+									2);
+								arr = data.activityPurchaseRecordListDTO.slice(0, 21);
+							}
+
+							this.setData({
+								activityPurchaseRecordListDTO: activityPurchaseRecordListDTO,
+								activityDot: arr
+							});
+							// console.log(activityPurchaseRecordListDTO, arr);
+						}
+						this.bargainingCount(); 
+						this.initTimer(data);
+						this.groupItemTimer(1);
+						this.groupItemTimer();
+						resolve();
+					});
+				});
+			},
+			// 获取用户信息
+			getuserInfos(data) {
+				let userInfo = req.getStorage('userInfo');
+				if (userInfo && userInfo.listShopBase && userInfo.listShopBase != null && userInfo.listShopBase.length >
+					0) {
+					if (userInfo.listShopBase[0].merchant_id == data.id && data.type != 5) {
+						let url = '/mine/shop/shop?merchantId=' + userInfo.listShopBase[0].merchant_id + '&shopId=' + userInfo.listShopBase[0].id;
+						this.url = url;
+						this.ascription = true;
+					}
+				}
+			},
+			getMy() {
+				let that = this;
+				let userInfo = req.getStorage('userInfo');
+				if(!userInfo || userInfo == null) return false;
+				req.getRequest('/api/user/my', {}, data => {
+					that.isDistriUser = data.isDistriUser;
+				});
+			},
+
+			initTimer(group) {
+				//计时器
+				let _ts = this; //group.endTime
+
+
+				let nowTime = new Date(group.nowTime.replace(/-/g, '/')).getTime();
+				let startTime = new Date(group.startTime.replace(/-/g, '/')).getTime();
+				let endTime = new Date(group.endTime.replace(/-/g, '/')).getTime();
+				if (!group.start) endTime = startTime;
+				let times = parseInt((endTime - nowTime) / 1000);
+				let data = {}; //判断是否已开始
+
+				if (nowTime - startTime > 0) {
+					//开始了
+					_ts.setData({
+						isStates: 1
+					});
+				} else {
+					//未开始
+					_ts.setData({
+						isStates: 0
+					});
+				}
+
+				_ts.setData(data);
+
+				if (times > 0) {
+					_ts.timer = setInterval(() => {
+						times--;
+
+						if (times <= 0) {
+							//重新加载列表
+							_ts.setData({
+								'act.end': true
+							});
+
+							return false;
+						}
+
+						let n = utils.formatDayTimes(times);
+
+						_ts.setData({
+							timer: n.split(/:|天/g)
+						});
+					}, 1000);
+				} else {
+					_ts.setData({
+						isStates: 2
+					});
+				}
+			},
+
+			//组团倒计时
+			groupItemTimer(type) {
+				//社区拼图定时器
+				let _ts = this;
+
+				let group;
+
+				if (type == 1) {
+					group = this.activityPurchaseRecordListDTO;
+				} else {
+					group = this.activityDot;
+				}
+
+				if (group && group.length > 0) {
+					let pageList = group;
+
+					for (let i = 0, len = pageList.length; i < len; i++) {
+						let group = pageList[i];
+						let nowTime = new Date(this.act.nowTime.replace(/-/g, '/')).getTime();
+						let endTime = new Date(group.endDate.replace(/-/g, '/'))
+							.getTime(); // let actend=new Date(this.data.act.endTime.replace(/-/g, '/')).getTime();
+						// let times
+						// if(actend-endTime>0){
+						//    times = parseInt((endTime - nowTime) / 1000);
+						// }else{
+						//   times = parseInt((actend - nowTime) / 1000);
+						// }
+
+						let times = parseInt((endTime - nowTime) / 1000); // console.log(group)
+						// group.map(item => {
+						//   item.end = false
+						//   return item;
+						// })
+
+						if (times < 0) {
+							let data = {};
+
+							if (type == 1) {
+								data['activityPurchaseRecordListDTO[' + i + '].end'] = true;
+							} else {
+								data['activityDot[' + i + '].end'] = true;
+							}
+
+							_ts.setData(data);
+						}
+
+						let timer = setInterval(() => {
+							times--;
+							let data = {};
+
+							if (times === 0) {
+								//重新加载列表
+								clearInterval(timer);
+							} else {
+								let n = utils.formatDayTimes(times);
+
+								if (type == 1) {
+									data['activityPurchaseRecordListDTO[' + i + '].times'] = n;
+								} else {
+									data['activityDot[' + i + '].times'] = n;
+								}
+							}
+
+							_ts.setData(data);
+						}, 1000);
+						let fs = [];
+
+						if (type == 1) {
+							fs['activityPurchaseRecordListDTO[' + i + '].timer'] = timer;
+						} else {
+							fs['activityDot[' + i + '].timer'] = timer;
+						} // this.clearAllTimer()
+
+
+						_ts.setData(fs);
+					}
+				}
+			},
+
+			clearAllTimer() {
+				if (this.activityPurchaseRecordListDTO) {
+					this.activityPurchaseRecordListDTO.forEach(it => {
+						clearInterval(it.timer);
+						clearInterval(it.times);
+					});
+				}
+
+				if (this.activityDot) {
+					this.activityDot.forEach(it => {
+						clearInterval(it.timer);
+						clearInterval(it.times);
+					});
+				}
+			},
+
+			loadDefaultAddress() {
+				if (req.isAuth()) {
+					req.g('/api/address/default', data => {
+						if (data) this.setData({
+							address: data
+						});
+						else this.pointLocation();
+					}, true);
+				} else {
+					this.pointLocation();
+				}
+			},
+
+			toAddress() {
+				app.globalData.openPage('mine/address/address');
+			},
+
+			toMerchant() {
+				if(this.about.User_Limit_Store==1){
+					
+				}else{
+				app.globalData.openPage('pages/nearby/nearby?isChoose=true');
+				}
+			},
+
+			pointLocation() {
+				//定位当前位置
+				let _ts = this;
+
+				QQMapWX.initMap();
+				req.getLocation(res => {
+					QQMapWX.reverseGeocoder(res, data => {
+						_ts.setData({
+							['address.address']: data.address
+						});
+					});
+				});
+			},
+
+			atOnceBuy() {
+				//立即购买
+				// if (this.data.isStates == 0) return req.msg('活动还未开始');
+				// if (this.data.isStates == 2) return req.msg('活动已结束');
+				// if(this.data.start) return req.msg('活动已结束');
+				let popup = this.pro;
+				popup.salePrice = this.pro.actualPrice;
+				popup.stock = this.pro.stock;
+				this.setData({
+					isShow: true,
+					popup: popup
+				});
+			},
+
+			addActivityRemind() {
+				req.postRequest('/api/activity/remind', {
+					activityId: this.act.id
+				}, res => {
+					requsetmessage.remind();
+					req.msg('订阅提醒成功');
+					this.setData({
+						isRemind: true
+					});
+				});
+			},
+
+			cancelActivityRemind(event) {
+				if (req.header.appId == 'ZQ1VK5oc17I387E') {
+
+				} else {
+					req.postRequest('/api/activity/cancel/remind', {
+						id: this.act.id
+					}, res => {
+						req.msg('取消提醒成功');
+						this.setData({
+							isRemind: false
+						});
+					});
+				}
+			},
+
+			hidePopup() {
+				this.setData({
+					isShow: false
+				});
+			},
+			hidePopupLogin(data) {
+				this.isPopupLogin = false;
+			},
+
+			clickCollect() {
+				let _ts = this;
+
+				req.postRequest('/api/collect', {
+					bindId: this.pro.id,
+					type: 1
+				}, data => {
+					_ts.setData({
+						'pro.isCollect': !_ts.pro.isCollect
+					});
+				});
+			},
+
+			goTop: function(e) {
+				// 一键回到顶部
+				if (uni.pageScrollTo) {
+					uni.pageScrollTo({
+						scrollTop: 0
+					});
+				} else {
+					uni.showModal({
+						title: '提示',
+						content: '当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。'
+					});
+				}
+			},
+
+			create(event) {
+				req.isLogin().then(success => {});
+				if (!req.getStorage('userInfo')) return false;
+				if (this.isStates == 0) return req.msg('活动还未开始');
+				if (this.isStates == 2) return req.msg('活动已结束');
+				let that = this;
+				let end = event.currentTarget.dataset.end;
+				if (end == true) return req.msg('活动已结束');
+				let acpId = event.currentTarget.dataset.acid;
+				let actid = event.currentTarget.dataset.actid;
+				let superid = event.currentTarget.dataset.superid;
+				let proid = this.pro.id;
+				let userid = event.currentTarget.dataset.userid;
+				let param = {
+					acpId: acpId,
+					actId: this.act.actId,
+					productId: proid,
+					type: 5,
+					initOrPart: userid == req.getStorage('userInfo').id ? 1 : 2,
+					superiorId: superid
+				};
+				req.getRequest('/api/activity/participationActivity', param, res => {
+					//判断是否帮砍过
+					if (res.state == 1) {
+						let url = 'activity/bargain/kjDetail/kjDetail?id=' + superid + '&proid=' + this.pro.id +
+							'&merchantId=' + this.query
+							.merchantId;
+						if (userid !== req.getStorage('userInfo').id) url += '&isShow=' + true;
+						app.globalData.openPage(url);
+						return false;
+					}
+
+					let params = {
+						acpId: this.act.id,
+						type: 5
+					};
+
+					if (superid) {
+						params.superiorId = superid;
+					}
+
+					req.postRequest('/api/activity/carterActivityPurchaseRecords', params, res => {
+						if (res) {
+							let money = '';
+							let id = '';
+							if (superid) money = res, id = superid;
+							else id = res;
+							app.globalData.openPage('activity/bargain/kjDetail/kjDetail?id=' + id +
+								'&money=' + money + '&proid=' +
+								proid);
+						}
+					});
+				});
+			},
+
+			initState() {
+				//判断是否发起砍价
+				let params = {
+					acpId: this.act.id,
+					actId: this.act.actId,
+					productId: this.act.productId,
+					type: 5,
+					initOrPart: 1
+				};
+				return new Promise((resolve, reject) => {
+					req.getRequest('/api/activity/participationActivity', params, res => {
+						if (res.state == 1) {
+							this.setData({
+								isBargain: true,
+								bargainId: res.id
+							});
+						} else if (res.state != 1) {
+							this.setData({
+								isBargain: false
+							});
+						}
+
+						resolve();
+					});
+				});
+			},
+
+			toKjDetail(event) {
+				event.currentTarget.dataset.id;
+				app.globalData.openPage('activity/bargain/kjDetail/kjDetail?id=' + this.acid + '&proid=' + this.pro.id +
+					'&merchantId=' + this.query.merchantId);
+			},
+
+			toKanjia(event) {
+				req.isLogin().then(success => {});
+				let acid = event.currentTarget.dataset.id;
+				let proid = event.currentTarget.dataset.proid;
+				app.globalData.openPage('activity/bargain/kjDetail/kjDetail?id=' + acid + '&proid=' + proid +
+					'&merchantId=' + this
+					.query.merchantId);
+			},
+
+			onShareTimeline() {
+				let merchantId = '';
+				let path = 'id=' + this.query.id + '&acid=' + this.query.acid + '&isShareTimeline=' + true;
+
+				if (!req.getStorage('userInfo').id) {} else {
+					path += '&userId=' + req.getStorage('userInfo').id;
+				}
+
+				// console.log(this.merchantId);
+				let shopId = '';
+
+
+				if (req.getStorage('MERCHANT') && req.getStorage('MERCHANT').id != null) {
+					path += '&merchantId=' + req.getStorage('MERCHANT').id;
+					merchantId = req.getStorage('MERCHANT').id;
+
+					if (req.getStorage('smallShop') && req.getStorage('MERCHANT').id != null) {
+						path += '&shopId=' + req.getStorage('smallShop').id;
+						shopId = req.getStorage('smallShop').id;
+						merchantId = req.getStorage('smallShop').merchantDTO.id;
+					}
+				}
+
+
+				let url = '/activity/bargain/detail/detail?' + path;
+				route.share(2, req.getStorage('userInfo').id, url, merchantId, shopId, 9, this.query.acid + '_' + this
+					.query.id);
+				return {
+					title: (req.getStorage("userInfo").nickName?req.getStorage("userInfo").nickName:'') + '邀请您参与砍价:'+this.pro.title,
+					query: path,
+					imageUrl: this.pro.pic
+				}; // return {
+				//   title: this.data.pro.title,
+				//   imageUrl: this.data.pro.pic
+				// }
+			},
+
+			// 获取砍价活动总人数
+			bargainingCount() {
+				if (!req.getStorage('userInfo')) return false;
+				let param = {
+					acpId: this.query.acid,
+					actId: this.act.actId,
+					productId: this.act.productId
+				}
+				// console.log(param,"------------------------")
+				req.getRequest('/api/activity/bargainingCount', param, data => {
+					this.setData({
+						count: data
+					});
+				});
+			},
+
+			clickmore() {
+				// let arrayShow = [];
+				// let index = 0;
+				// for (let i = index; i < index + 5; i++) {
+				//   if (this.data.activityPurchaseRecordListDTO[i]) {
+				//     arrayShow.push(this.data.activityPurchaseRecordListDTO[i]);
+				//     index = i;
+				//   }
+				// }
+				// index = index + 1;
+				// if(arrayShow.length>=20){
+				//   return req.msg("仅显示20个正在拼团的人")
+				// }
+				// this.setData({arrayShow:arrayShow})
+				// this.groupItemTimer()
+				this.getPage();
+				this.setData({
+					show: true
+				});
+			},
+
+			eliminate() {
+				this.setData({
+					show: false
+				});
+			},
+
+			getPage() {
+				//获取系统信息:获取当前屏幕可见区域的宽和高
+				let that = this;
+				uni.getSystemInfo({
+					success: function(res) {
+						that.setData({
+							"windowWidth": res.windowWidth,
+							//可使用窗口宽度,单位px
+							"windowHeight": res.windowHeight //可使用窗口高度,单位px
+
+						});
+						// console.log(res.windowWidth, that.windowWidth);
+						// console.log(res.windowHeight, that.windowHeight);
+					}
+				});
+			},
+
+			showTab: function(e) {
+				this.setData({
+					tabIndex: e.detail
+				});
+			},
+			scoreTab: function(e) {
+				this.form.page = 0;
+				this.setData({
+					current: e.detail,
+					['form.page']: 1
+				});
+			},
+			freshenFun: function(e) {
+				this.setData({
+					freshen: e.detail
+				});
+			},
+
+			// 获取品种保证
+			getGuarantee() {
+				return new Promise((data, rej) => {
+					req.getRequest('/api/config', {}, res => {
+						req.setStorage("configRes", JSON.stringify(res))
+						this.about=res
+						data(res)
+						if (this.merchant && this.merchant.isDefault == 1 || this.query.acid) {
+							// 切割;拿到数组,然后在过滤掉空值
+							if (res.b2c_service_guarantee && res.b2c_service_guarantee != null) {
+								this.setData({
+									guarantee: res.b2c_service_guarantee.split(";").filter(it => {
+										return it = it && it.trim();
+									})
+								});
+							}
+						} else {
+							if (res.o2o_service_guarantee && res.b2c_service_guarantee != null) {
+								this.setData({
+									guarantee: res.o2o_service_guarantee.split(";").filter(it => {
+										return it = it && it.trim();
+									})
+								});
+							}
+						} // if(res.Is_Store_Price_Stock){
+						//   this.setData({Is_Store_Price_Stock:res.Is_Store_Price_Stock})
+						// }
+						if (res.is_open_shop) {
+							this.is_open_shop = res.is_open_shop;
+						}
+
+						if (res.is_open_comments) {
+							this.setData({
+								is_open_comments: res.is_open_comments
+							});
+						} // this.setData({ show_membership_price: res.show_membership_price, Is_Store_Price_Stock: res.Is_Store_Price_Stock, is_open_shop: res.is_open_shop })
+
+					});
+				})
+			},
+			// 是否开启小店
+			isShop() {
+				if (req.getStorage('distribution')) {
+					dist = req.getStorage('distribution')
+					this.setData({
+						distr: dist
+					})
+					console.log(dist)
+					if (dist.distributionSmallShopOpen == 1) {
+						req.postRequest('/api/shopBase/isOpenShop', {}, data => {
+							this.setData({
+								isshop: data
+							})
+							console.log(data)
+						})
+					}
+				}
+			},
+			addShop() { //添加到小店
+				req.postRequest('/api/shopProduct/save', {
+					productId: this.act.id,
+					type: 7
+				}, data => {
+					this.act.isJoinShop = true;
+					this.isHide = false;
+				})
+			},
+			hidePop() { //添加到小店
+				this.setData({
+					isHide: true
+				})
+			},
+
+		}
+	};
+</script>
+<style>
+	@import "./detail.css";
+</style>

+ 25 - 0
activity/bargain/index/index.css

@@ -0,0 +1,25 @@
+/* activity/bargain/index/index.wxss */
+page{background: #E0212A;}
+.banner image{width: 100%;}
+.con{padding: 0 20rpx 50rpx;margin-top: -15rpx;position: relative;z-index: 2;}
+.title{align-items: center;justify-content: center;font-size: 32rpx;color: #fff;height: 80rpx;line-height: 80rpx;border-radius: 12rpx 12rpx 0 0;}
+.title .icon{margin-right: 7rpx;font-size: 32rpx;}
+.list{border-radius: 0 0 12rpx 12rpx;padding: 0 20rpx;margin-bottom: 30rpx;}
+.list .li{padding: 30rpx 0;border-bottom: 2rpx solid #E8E8E8;align-items: center;}
+.list .li:last-child{border-bottom: none;}
+.list .li .flex{overflow: hidden;}
+.proimg{width: 180rpx;height: 180rpx;margin-right: 20rpx;}
+.name{font-size: 28rpx;color: #333;text-overflow: ellipsis;white-space: nowrap;overflow-y: hidden;}
+.kan-price{align-items: center;margin: 10rpx 0 45rpx;}
+.tag{width: 80rpx;height: 36rpx;border-radius: 8rpx;text-align: center;line-height: 36rpx;font-size: 20rpx;color: #fff;}
+.price{font-size: 38rpx;color: #FE0419;margin: 0 20rpx 0 12rpx;}
+.price text{font-size: 25rpx;}
+.del{font-size: 24rpx;color: #999;text-decoration: line-through;}
+.kan-times{align-items: center;justify-content: space-between;}
+.kan-time{align-items: center;font-size: 24rpx;color: #333;}
+.kan-time text{display: block;width: 38rpx;height: 38rpx;border-radius: 8rpx;background: #333;line-height: 38rpx;text-align: center;margin: 0 7rpx;font-size: 24rpx;color: #fff;}
+.kan-time text:first-child{margin-left: 0;}
+.kan-time view{margin-left: 5rpx;}
+.kan-btn{width: 150rpx;height: 50rpx;border-radius: 25rpx;text-align: center;line-height: 50rpx;font-size: 24rpx;color: #fff;}
+.kan-guoqi{background: #999;}
+.remind{width: 150rpx;height: 50rpx;border-radius: 25rpx;font-size: 24rpx;color: #fff;text-align: center;justify-content: center;line-height: 50rpx;}

+ 341 - 0
activity/bargain/index/index.vue

@@ -0,0 +1,341 @@
+<template>
+	<view>
+		<!--activity/bargain/index/index.wxml-->
+		<view class="banner">
+			<image src="/activity/static/activity/images/kjban.jpg" mode="widthFix"></image>
+		</view>
+		<view class="con">
+			<view class="title mbglinear dflex" v-if="pageMyList.length > 0">
+				<icon class="icon iconfont icon-shandian-shi"></icon>我的砍价
+			</view>
+			<view class="list bgfff" v-if="pageMyList.length > 0">
+				<block v-for="(item, index) in pageMyList" :key="index">
+					<view class="li dflex" @tap="toDetail" :data-id="item.productId" :data-acid="item.id">
+						<image :src="item.pic" lazy-load="true" mode="aspectFit" class="proimg"></image>
+						<view class="flex">
+							<view class="name">{{item.productName}}</view>
+							<view class="kan-price dflex">
+								<text class="tag mbglinear">砍价后</text>
+								<view class="price"><text>¥</text>{{item.money}}</view>
+								<text class="del"
+									v-if="item.orPrice!=0&&item.orPrice>item.money">原价:¥{{item.orPrice}}</text>
+							</view>
+							<view class="kan-times dflex">
+								<view class="kan-time" v-if="item.end">已结束</view>
+								<block v-else>
+									<view class="kan-time dflex" v-if="item.times.length==4">
+										<block v-if="item.times[0] !=0"><text>{{item.times[0]}}</text>天</block>
+										<text>{{item.times[1]}}</text>:
+										<text>{{item.times[2]}}</text>:
+										<text>{{item.times[3]}}</text>
+										<view>后结束</view>
+									</view>
+									<view class="kan-time dflex" v-else>
+										<text>{{item.times[0]}}</text>:
+										<text>{{item.times[1]}}</text>:
+										<text>{{item.times[2]}}</text>
+										<view>后结束</view>
+									</view>
+								</block>
+								<view class="kan-btn mbglinear" v-if="!item.end">继续砍价</view>
+								<view class="kan-btn kan-guoqi" v-else>活动结束</view>
+							</view>
+						</view>
+					</view>
+				</block>
+			</view>
+			<view class="title mbglinear dflex">全民砍价</view>
+			<view class="list bgfff" v-if="pageList.length>0">
+				<block v-for="(item, index) in pageList" :key="index">
+					<view class="li dflex">
+						<image :src="item.pic" mode="aspectFit" class="proimg" @tap="toDetail" :data-id="item.productId"
+							:data-acid="item.id" lazy-load="true"></image>
+						<view class="flex">
+							<view class="name" @tap="toDetail" :data-id="item.productId" :data-acid="item.id">
+								{{item.productName}}</view>
+							<view class="kan-price dflex" @tap="toDetail" :data-id="item.productId"
+								:data-acid="item.id">
+								<text class="tag mbglinear">砍价后</text>
+								<view class="price"><text>¥</text>{{item.money}}</view>
+								<text class="del"
+									v-if="item.orPrice!=0&&item.orPrice>item.money">原价:¥{{item.orPrice}}</text>
+							</view>
+							<view class="kan-times dflex">
+								<view class="kan-time" v-if="item.end">已结束</view>
+								<block v-else>
+									<view class="kan-time dflex" v-if="item.times.length==4">
+										<block v-if="item.times[0] !=0"><text>{{item.times[0]}}</text>天</block>
+										<text>{{item.times[1]}}</text>:
+										<text>{{item.times[2]}}</text>:
+										<text>{{item.times[3]}}</text>
+										<view>{{item.start==false&&item.end==false?'后开始':'后结束'}}</view>
+									</view>
+									<view class="kan-time dflex" v-else>
+										<text>{{item.times[0]}}</text>:
+										<text>{{item.times[1]}}</text>:
+										<text>{{item.times[2]}}</text>
+										<view>{{item.start==false&&item.end==false?'后开始':'后结束'}}</view>
+									</view>
+								</block>
+								<view class="kan-btn mbglinear" v-if="item.end==false&&item.start==true" @tap="toDetail"
+									:data-id="item.productId" :data-acid="item.id">立即砍价</view>
+								<block v-else>
+									<view class="remind mbggreen dflex" v-if="item.start==false&&item.isRemind"
+										@tap="cancelActivityRemind" :data-index="index" data-type="2">取消预约</view>
+									<view class="remind mbggreen dflex" v-if="item.start==false&&!item.isRemind"
+										@tap="addActivityRemind" :data-index="index">
+										<icon class="iconfont icon-yugao" data-type="2"></icon>预约提醒
+									</view>
+								</block>
+							</view>
+						</view>
+					</view>
+				</block>
+			</view>
+			<view class="nodata nosp bgfff" v-if="pageList.length<=0">
+				<image :src="picUrlss+'empty_sp.png'"></image>
+				<text>暂无商品</text>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	// activity/bargain/index/index.js
+	const app = getApp();
+	const req = require("../../../utils/request.js");
+	const utils = require("../../../utils/util.js");
+	const requsetmessage = require("../../../utils/requestmessage.js");
+
+	export default {
+		data() {
+			return {
+				picUrlss: req.public.picUrls,
+				form: {
+					page: 1,
+					limit: 10
+				},
+				pageList: [],
+				pageMyList: [],
+				isLoad: true,
+				hasmore: true
+			};
+		},
+
+		components: {},
+		props: {},
+
+		onLoad(options) {
+			this.query = options;
+			// console.log(options); // this.getData();
+			// this.getList();
+		},
+
+		onShow() {
+			this.isLoad = true, this.form.page = 1;
+			this.setData({
+				pageList: [],
+				pageMyList: []
+			});
+			this.getData();
+			this.getList();
+		},
+
+		onReachBottom() {
+			this.form.page++;
+			this.getList();
+		},
+
+		onUnload() {
+			this.clearAllTimer();
+		},
+
+		onHide() {
+			this.clearAllTimer(1);
+			this.clearAllTimer(2);
+		},
+
+		methods: {
+			getList() {
+				//砍价
+				let that = this;
+				if (!that.isLoad) return false;
+				that.isLoad = false;
+				that.form.type = '5';
+
+				if (this.query.merchantId) {
+					that.form.merchantId = this.query.merchantId;
+				} else if (req.getStorage('MERCHANT')) {
+					that.form.merchantId = req.getStorage('MERCHANT').id;
+				}
+
+				req.getRequest('/api/activity/listNew', that.form, data => {
+					if (data.list && data.list.length == 10) {
+						that.isLoad = true;
+					}
+
+					data = that.pageList.concat(data.list);
+
+					if (data) {
+						data = data.map(it => {
+							it.isRemind = it.remindId;
+							return it;
+						}); // let arrObjFilter = data.filter(ele => ele.end == false)
+
+						that.setData({
+							pageList: data
+						});
+						that.clearAllTimer(2);
+						that.initGroupTimer();
+					}
+				});
+			},
+
+			getData() {
+				//我的砍价
+				let that = this; // that.clearAllTimer(2);
+				if (req.getStorage("userInfo")) {
+					req.postRequest('/api/activity/userActivityData', {
+						state: 0,
+						type: 5
+					}, data => {
+						if (data) {
+							data = that.pageMyList.concat(
+							data); // let arrObjFilter = data.filter(ele => ele.end == false)
+
+							that.setData({
+								pageMyList: data
+							});
+							that.clearAllTimer(1);
+							that.initGroupTimer();
+						}
+					});
+				}
+			},
+
+			initGroupTimer() {
+				//社区拼图定时器
+				let _ts = this;
+				// console.log(this.pageList)
+				if (this.pageList && this.pageList.length > 0) {
+					let pageList = this.pageList;
+					const initPage = (parseInt(this.form.page) - 1) * 10;
+					for (let i = initPage, len = pageList.length; i < len; i++) {
+						let group = pageList[i];
+						let nowTime = new Date(group.nowTime.replace(/-/g, '/')).getTime();
+						let startTime = new Date(group.startTime.replace(/-/g, '/')).getTime();
+						let endTime = new Date(group.endTime.replace(/-/g, '/')).getTime();
+						if (!group.start) endTime = startTime;
+						let times = parseInt((endTime - nowTime) / 1000);
+						let timer = setInterval(() => {
+							times--;
+							let data = {};
+
+							if (times === 0) {
+								//重新加载列表
+								data['pageList[' + i + '].end'] = true;
+								clearInterval(timer);
+							} else {
+								let n = utils.formatDayTimes(times);
+								data['pageList[' + i + '].times'] = n.split(/:|天/g);
+							}
+
+							_ts.setData(data);
+						}, 1000);
+						let fs = [];
+						fs['pageList[' + i + '].timer'] = timer;
+
+						_ts.setData(fs);
+						// console.log(fs)
+					}
+				}
+				if (this.pageMyList && this.pageMyList.length > 0) {
+					let pageMyList = this.pageMyList;
+
+					for (let i = 0, len = pageMyList.length; i < len; i++) {
+						let group = pageMyList[i];  
+						let nowTime = new Date(group.nowTime.replace(/-/g, '/')).getTime();
+						let startTime = new Date(group.startTime.replace(/-/g, '/')).getTime();
+						let endTime = new Date(group.endTime.replace(/-/g, '/')).getTime();
+						if (!group.start) endTime = startTime;
+						let times = parseInt((endTime - nowTime) / 1000);
+						let timer = setInterval(() => {
+							times--;
+							let data = {};
+
+							if (times === 0) {
+								//重新加载列表
+								data['pageMyList[' + i + '].end'] = true;
+								clearInterval(timer);
+							} else {
+								let n = utils.formatDayTimes(times);
+								data['pageMyList[' + i + '].times'] = n.split(/:|天/g);
+							}
+
+							_ts.setData(data);
+						}, 1000);
+						let fs = [];
+						fs['pageMyList[' + i + '].timer'] = timer;
+
+						_ts.setData(fs);
+					}
+				}
+			},
+
+			clearAllTimer(type) {
+				if (type == 1) this.pageList.forEach(it => clearInterval(it.timer));
+				else this.pageMyList.forEach(it => clearInterval(it.timer));
+			},
+
+			cancelActivityRemind(event) {
+				const index = event.currentTarget.dataset.index;
+				const page = this.pageList[index];
+				if (req.header.appId == 'ZQ1VK5oc17I387E') {
+
+				} else {
+					req.postRequest('/api/activity/cancel/remind', {
+						id: page.id
+					}, res => {
+						req.msg('取消提醒成功');
+						let data = {};
+						data['pageList[' + index + '].isRemind'] = false;
+						this.setData(data);
+					});
+				}
+			},
+
+			toDetail(event) {
+				let id = event.currentTarget.dataset.id;
+				let acid = event.currentTarget.dataset.acid;
+				let url='activity/bargain/detail/detail?id=' + id + '&acid=' + acid
+				if(!this.query.merchantId){
+					
+				}else{
+					url+='&merchantId='+this.query.merchantId
+				}
+				app.globalData.openPage(url);
+			},
+
+			addActivityRemind(event) {
+				const index = event.currentTarget.dataset.index;
+				const page = this.pageList[index]; // 订阅调用
+
+
+				req.postRequest('/api/activity/remind', {
+					activityId: page.id
+				}, res => {
+					requsetmessage.remind();
+					req.msg('订阅提醒成功');
+					let data = {};
+					data['pageList[' + index + '].isRemind'] = true;
+					this.setData(data);
+				});
+			},
+
+
+		}
+	};
+</script>
+<style>
+	@import "./index.css";
+</style>

+ 74 - 0
activity/bargain/kjDetail/kjDetail.css

@@ -0,0 +1,74 @@
+/* group/ptDetail/ptDetail.wxss */
+page{background: #E0212A;}
+.banner image{width: 100%;}
+.con{position: relative;z-index: 1;padding: 0 20rpx 50rpx;margin-top: 7rpx;}
+.info{background: #fff;border-radius: 12rpx;padding: 30rpx 20rpx;}
+.pinimgs{box-sizing: border-box;width: 180rpx;height: 180rpx;border-radius: 10rpx;margin-right: 30rpx;border: 2rpx solid #E5E5E5;position: relative;}
+.pinimg{display: block;width: 100%;height: 100%;border-radius: 10rpx;}
+.tuan{display: block;width: 87rpx;height: 44rpx;font-size: 22rpx;color: #fff;text-align: center;line-height: 34rpx;position: absolute;top: 21rpx;left: -10rpx;}
+.tuan image{display: block;width: 100%;height: 100%;position: absolute;top: 0;left: 0;}
+.tuan text{position: relative;z-index: 2;display: block;}
+.proname{font-size: 28rpx;color: #333;}
+.guige{font-size: 24rpx;color: #999;margin-top: 5rpx;}
+.sta{align-items: center;justify-content: space-between;margin-top: 30rpx;}
+.price{font-size: 37rpx;color: #FE0419;}
+.price text{font-size: 25rpx;}
+.price text.del{font-size: 24rpx;color: #999;margin-left: 16rpx;text-decoration: line-through;}
+.nums{font-size: 30rpx;color: #333;}
+.cantuan{padding: 35rpx 55rpx 40rpx;}
+.can-info{text-align: center;font-size: 29rpx;color: #333;margin: 35rpx 0 25rpx;}
+.can-info text{color: #E81033;}
+.sheng{align-items: center;justify-content: center;font-size: 22rpx;color: #333;margin-top: 25rpx;}
+.sheng::before,.sheng::after{content: '';display: block;width: 110rpx;height: 2rpx;background: #FD4D36;}
+.sheng::before{margin-right: 16rpx;}
+.sheng::after{margin-left: 16rpx;}
+.sheng-time{font-size: 24rpx;color: #FD4D36;align-items: center;}
+.sheng-time text{display: block;width: 36rpx;height: 36rpx;border-radius: 6rpx;background: #FD5238;font-size: 22rpx;color: #fff;text-align: center;line-height: 36rpx;margin: 0 10rpx;}
+.process{background: #E8E8E8;height: 16rpx;border-radius: 8rpx;position: relative;}
+.process .ing{position: absolute;top: 0;left: 0;height: 100%;background: #F71F42;border-radius: 8rpx;}
+.can-btn{height: 90rpx !important;border-radius: 45rpx!important;font-size: 30rpx;color: #fff;text-align: center;line-height: 90rpx !important;margin-top: 60rpx !important;}
+.kai-btn{height: 86rpx;border-radius: 45rpx;font-size: 30rpx;color: #FE0419;border: 2rpx solid #FE0419;text-align: center;line-height: 86rpx;margin-top: 20rpx;}
+.tab{height: 104rpx;border-bottom: 2rpx solid #E8E8E8;}
+.tab .li{font-size: 26rpx;color: #999;width: 33.33%;text-align: center;line-height: 104rpx;position: relative;}
+.tab .on{font-size: 28rpx;color: #333;}
+.tab .on::after{content: '';display: block;width:130rpx;height:4rpx;background:linear-gradient(359deg,rgba(240,73,39,1) 0%,rgba(255,142,78,1) 100%);position: absolute;bottom: 0;left: 50%;transform: translateX(-50%);}
+.det-text{padding: 20rpx 30rpx;word-break: break-all;}
+.details .rich-img{width: 100%;}
+.details .img{width: 100%;}
+.friend .li{border-bottom: 2rpx solid #E8E8E8;padding: 28rpx 20rpx;align-items: center;}
+.friend .li:last-child{border-bottom: none;}
+.timg{position: relative;margin-right: 20rpx;}
+.timg image{width: 90rpx;height: 90rpx;border-radius: 50%;}
+.timg text{display: block;width: 78rpx;height: 32rpx;border-radius: 17rpx;border: 2rpx solid #fff;background: #FD4534;font-size: 20rpx;color: #fff;text-align: center;line-height: 32rpx;position: absolute;left: 50%;transform: translateX(-50%);bottom: -12rpx;}
+.name{font-size: 28rpx;color: #333;margin-right: 20rpx;}
+.name text{display: block;font-size: 24rpx;color: #999;margin-top: 5rpx;}
+.time{font-size: 24rpx;color: #999;}
+.nopeople{padding: 100rpx 0;text-align: center;font-size: 28rpx;color: #999;}
+.nopeople image{width: 219rpx;height: 147rpx;margin: 0 auto 30rpx;}
+.guize{font-size: 24rpx;line-height: 40rpx;padding: 30rpx;}
+
+.show{display: block;}
+.hide{display: none;}
+
+
+/* 砍价弹窗 */
+.kjpop{position: fixed;top: 50%;transform: translateY(-50%);left: 85rpx;right: 85rpx;background: #fff;border-radius: 20rpx;padding: 90rpx 45rpx 55rpx;text-align: center;z-index: 100;}
+.kjclose{width: 62rpx;height: 62rpx;position: absolute;top: -30rpx;right: -30rpx;}
+.kjimg{width: 219rpx;height: 147rpx;margin: 0 auto;}
+.kjtip{font-size: 32rpx;color: #333;margin: 45rpx 0 35rpx;}
+.kjbtn{justify-content: space-between;}
+.back{width: 216rpx;height: 66rpx;border: 2rpx solid #F71F42;border-radius: 35rpx;font-size: 32rpx;color: #F71F42;text-align: center;line-height: 66rpx;}
+.ljgm{width: 220rpx;height: 70rpx;background: #F71F42;border-radius: 35rpx;font-size: 32rpx;color: #fff;text-align: center;line-height: 70rpx;}
+
+.kanle1{width: 174rpx;height: 133rpx;margin: 0 auto;}
+.kanle2{width: 189rpx;height: 94rpx;margin: 0 auto;}
+.kandiao{font-size: 32rpx;color: #333;}
+.kandiao text{font-size: 36rpx;color: #F71F42;}
+.kjpop .process{margin: 30rpx 0 95rpx;}
+.end{background: #d1d1d1;}
+.fenx{width: 220rpx !important;height: 70rpx !important;background: #F71F42;border-radius: 35rpx !important;font-size: 32rpx;color: #fff;text-align: center;line-height: 70rpx !important;}
+.faqir{margin: 0 auto;text-align: center;padding: 0 0 35rpx 0;}
+.faqir image{width: 90rpx;height: 90rpx;border-radius: 50%;margin: 0 auto;}
+.faqir view{font-size: 36rpx; padding: 10rpx 0;}
+.faqir text{color: #999;margin: 0 10rpx;}
+.iconfont{display: inline; color: #999;}

+ 538 - 0
activity/bargain/kjDetail/kjDetail.vue

@@ -0,0 +1,538 @@
+<template>
+<view>
+<!--activity/bargain/kjDetail/kjDetail.wxml-->
+<view class="banner">
+	<image src="/activity/static/activity/images/kjban.jpg" mode="widthFix"></image>
+</view>
+<view class="con">
+	<view class="info dflex" @tap="goPrcdetail">
+		<view class="pinimgs">
+			<image :src="acProduc.pic" mode="aspectFit" class="pinimg"></image>
+		</view>
+		<view class="pininfo flex">
+			<view class="proname">{{acProduc.productName?acProduc.productName:''}}</view>
+			<!-- <view class="guige">规格:15G</view> -->
+			<view class="sta dflex">
+				<view class="price"><text>¥</text>{{acProduc.money?acProduc.money:0}}<text class="del" v-if="acProduc.orPrice!=0&&acProduc.orPrice>acProduc.money">原价:¥{{acProduc.orPrice?acProduc.orPrice:'0'}}</text></view>
+				<!-- <view class="nums">×1</view> -->
+			</view>
+		</view>
+	</view>
+	<view class="cantuan bgfff mt20 r10">
+		<view class="faqir">
+			<image :src="aprList.groupMainP.uavatar"></image>
+			<view>{{aprList.groupMainP.unickName}}</view>
+			<icon class="icon iconfont iconbaojiaquotation2"></icon><text>我想要这件好物,快来帮我砍一刀吧</text>
+			<icon class="icon iconfont iconbaojiaquotation"></icon>
+		</view>
+		<view class="sheng dflex" v-if="!act.isJieshu || !acProduc.end">
+			剩余
+			<view class="sheng-time dflex">
+				<!-- <block wx:if="acProduc.end">
+					<text>{{timer[0]}}</text>
+					<text>{{timer[1]}}</text>:
+					<text>{{timer[2]}}</text>:
+					<text>{{timer[3]}}</text>
+				</block> -->
+				<!-- <block wx:else> -->
+					<block v-if="timer.length==4">
+					<block v-if="timer[0] !=0"><text>{{timer[0]}}</text>天</block>
+					<text>{{timer[1]}}</text>:
+					<text>{{timer[2]}}</text>:
+					<text>{{timer[3]}}</text>
+				</block>
+				<block v-else>
+					<text>{{timer[0]}}</text>:
+					<text>{{timer[1]}}</text>:
+					<text>{{timer[2]}}</text>
+				</block>
+				<!-- </block> -->
+			</view>
+			结束
+		</view>
+		<view v-else class="sheng dflex">已过期</view>
+		<view class="can-info">已邀{{participateCount}}人,共砍<text>¥{{bargainingMoney}},</text>仅差<text>¥{{surplusMoney<=0?'0':surplusMoney}}</text></view>
+		<view class="process">
+			<view class="ing" :style="'width:' + percent + ';'"></view>
+		</view>
+		<block v-if="!act.isJieshu">
+			<block v-if="isSuccess">
+				<view class="can-btn mbglinear" @tap="confirmBuy" v-if="whether == 2&&topay==null">立即购买</view>
+				<view class="can-btn mbglinear" @tap="toOrder" v-if="whether == 2&&topay!=null">查看订单详情</view>
+				<view class="kai-btn" v-if="whether == 1" @tap="goUrl">我也要发起砍价</view>
+			</block>
+			<block v-else>
+				<block v-if="isKanjia!=1">
+					<button @tap="initState" class="can-btn mbglinear" v-if="whether == 2 &&isKanjia!=1">立即砍价</button>
+					<view class="can-btn mbglinear" v-if="whether == 1&&isKanjia!=1" @tap="initState">帮TA砍一刀</view>
+				</block>
+				<block v-else>
+					<button open-type="share" class="can-btn mbglinear" v-if="whether == 1">邀请好友帮TA砍价</button>
+					<view class="kai-btn" v-if="whether == 1" @tap="goUrl">我也要发起砍价</view>
+				</block>
+				<button open-type="share" class="can-btn mbglinear" v-if="whether == 2">邀请好友砍价</button>
+			</block>
+		</block>
+		<view v-else class="can-btn end">已过期</view>
+	</view>
+	<view class="detail bgfff mt20 r10">
+		<view class="tab dflex">
+			<view :class="'li ' + (currentTab == 0? 'on' : '')" data-current="0" @tap="tab">商品详情</view>
+			<view :class="'li ' + (currentTab == 1? 'on' : '')" data-current="1" @tap="tab">砍价亲友团</view>
+			<view :class="'li ' + (currentTab == 2? 'on' : '')" data-current="2" @tap="tab">活动规则</view>
+		</view>
+		<view :class="currentTab == 0? 'show' : 'hide'">
+			<mp-html :content="nodes" lazy-load="true"></mp-html>
+			<block v-if="diyNodes || diyImgs.length > 0">
+				<view class="details">
+					<rich-text :nodes="diyNodes" @tap="richImg"></rich-text>
+				</view>
+				<view class="details">
+					<block v-for="(item, index) in diyImgs" :key="index">
+						<image class="img" :src="item" mode="widthFix" @tap="chooseImg1" :data-src="item"></image>
+					</block>
+				</view>
+			</block>
+		</view>
+		<view :class="'friend ' + (currentTab == 1? 'show' : 'hide')">
+			<block v-if="aprList.groupList.length > 0">
+				<view v-for="(item, index) in aprList.groupList" :key="index" class="li dflex">
+					<view class="timg">
+						<image :src="item.uavatar" mode="aspectFit"></image>
+					</view>
+					<view class="name flex">{{item.unickName}}<text>{{item.careatDate}}</text></view>
+					<view class="time">帮砍{{item.bargainingAmount}}元</view>
+				</view>
+			</block>
+			<view class="nopeople" v-else>
+				<image :src="picUrlss+'sqimg2.png'"></image>
+				<text>还没有人帮你砍价,去邀请好友帮忙</text>
+			</view>
+		</view>
+		<view :class="'guize ' + (currentTab == 2? 'show' : 'hide')">
+			<rich-text :nodes="activityMain.rule"></rich-text>
+		</view>
+	</view>
+</view>
+
+<view class="mask" @tap="closeLayer" :hidden="isShow"></view>
+<view class="kjpop" :hidden="isShow">
+	<image src="/static/pages/images/close3.png" class="kjclose" @tap="closeLayer"></image>
+	<!-- <image :src="picUrlss+'sqimg2.png'" class="kjimg"></image>砍价了 -->
+	<image src="/activity/static/activity/images/kanle1.png" class="kanle1" v-if="whether == 1"></image>
+	<!--帮TA砍掉-->
+	<image src="/activity/static/activity/images/kanle2.png" class="kanle2" v-if="whether == 2"></image>
+	<!--您已砍了-->
+	<!-- <image :src="picUrlss+'thsb.png'" class="kjimg"></image> -->
+	<!--砍价失败了-->
+	<!-- <view class="kjtip" wx:if="{{participate == 1}}">您已经砍过了</view> -->
+	<!-- <view class="kjtip">砍价失败了</view> -->
+	<view class="kandiao" v-if="whether == 2 && isSuccess">您已经砍到底价了</view>
+	<!--砍到底价-->
+	<view class="kandiao" v-if="whether == 1">帮TA砍掉<text>{{money}}元</text></view>
+	<!--帮TA砍掉-->
+	<view class="kandiao" v-if="whether == 2 && !isSuccess">您砍了<text>{{money}}元</text></view>
+	<!--帮TA砍掉-->
+	<view class="process">
+		<view class="ing" :style="'width:' + percent + ';'"></view>
+	</view>
+	<view class="kjbtn dflex">
+		<view class="back" @tap="closeLayer">返回</view>
+		<block v-if="whether == 2">
+			<view class="ljgm" @tap="confirmBuy" v-if="isSuccess&&topay==null">立即购买</view>
+			<view class="ljgm" @tap="toOrder" v-if="isSuccess&&topay!=null">查看订单详情</view>
+			<button open-type="share" class="fenx" v-if="!isSuccess">分享给好友</button>
+		</block>
+		<block v-else>
+			<view class="ljgm" @tap="goUrl" v-if="whether == 1">我也要砍价</view>
+		</block>
+	</view>
+</view>
+</view>
+</template>
+
+<script>
+// activity/bargain/kjDetail/kjDetail.js
+const app = getApp();
+const req = require("../../../utils/request.js");
+const utils = require("../../../utils/util.js");
+const route =require("../../../utils/route.js");
+import mpHtml from "../../../components/mp-html/components/mp-html/mp-html";
+export default {
+  data() {
+    return {
+		picUrlss: req.public.picUrls,
+      currentTab: 0,
+      isShow: true,
+      money: '',
+      isSuccess: false,
+      isKanjia: '',
+      start: false,
+      percent: "",
+      timer: "",
+      merchantId: "",
+      topay: ""
+    };
+  },
+
+  components: {mpHtml},
+  props: {},
+
+  async onLoad(options) {
+    this.query = options;
+    // console.log(options);
+
+    if (options.money) {
+      this.setData({
+        isShow: false,
+        money: options.money
+      });
+    }
+
+    if (options.isShow) {
+      this.setData({
+        isShow: true
+      });
+    }
+  },
+
+  async onShow() {
+    req.isLogin().then(success => {});
+	 this.getData();
+
+    await this.loadProudct();
+    this.gettoPay();
+  },
+  // onShareTimeline(){
+	 //  let merchantId = '';
+	 //  let path = '/activity/bargain/kjDetail/kjDetail?id=' + this.query.id + '&superiorId=' + this.aprList.groupMainP.userId + '&proid=' + this.query.proid ;
+	 //  console.log(!req.getStorage('userInfo').id);
+	 //  if (!req.getStorage('userInfo').id) {} else {
+	 //    path += '&userId=' + req.getStorage('userInfo').id;
+	 //  }
+	 //  console.log(this.query.merchantId);
+	 //  let shopId = '';
+	 //    if (req.getStorage('MERCHANT') && req.getStorage('MERCHANT').id != null) {
+	 //      path += '&merchantId=' + req.getStorage('MERCHANT').id;
+	 //      merchantId = req.getStorage('MERCHANT').id;
+	    	  
+	 //      if (req.getStorage('smallShop') && req.getStorage('MERCHANT').id != null) {
+	 //        path += '&shopId=' + req.getStorage('smallShop').id;
+	 //        shopId = req.getStorage('smallShop').id;
+	 //        merchantId = req.getStorage('smallShop').merchantDTO.id;
+	 //      }
+	 //    }
+	  
+	 //  console.log(path,"456")
+	 //  route.share(1, req.getStorage('userInfo').id, path, merchantId, shopId, 9, this.query.proid + '_' + this.query.id);
+	 //  return {
+	 //    title: req.getStorage("userInfo").nickName + '邀请您帮忙砍价:' + this.acProduc.productName,
+	 //    imageUrl: this.acProduc.pic,
+	 //    path: path
+	 //  };
+  // },
+
+  onShareAppMessage: function () {
+	  let merchantId = '';
+	  let path = '/activity/bargain/kjDetail/kjDetail?id=' + this.query.id + '&superiorId=' + this.aprList.groupMainP.userId + '&proid=' + this.query.proid ;
+	  // console.log(!req.getStorage('userInfo').id);
+	  if (!req.getStorage('userInfo').id) {} else {
+	    path += '&userId=' + req.getStorage('userInfo').id;
+	  }
+	  // console.log(this.query.merchantId);
+	  let shopId = '';
+	    if (req.getStorage('MERCHANT') && req.getStorage('MERCHANT').id != null) {
+	      path += '&merchantId=' + req.getStorage('MERCHANT').id;
+	      merchantId = req.getStorage('MERCHANT').id;
+	    	  
+	      if (req.getStorage('smallShop') && req.getStorage('MERCHANT').id != null) {
+	        path += '&shopId=' + req.getStorage('smallShop').id;
+	        shopId = req.getStorage('smallShop').id;
+	        merchantId = req.getStorage('smallShop').merchantDTO.id;
+	      }
+	    }
+	  
+	  // console.log(path,"456")
+	  route.share(1, req.getStorage('userInfo').id, path, merchantId, shopId, 9, this.query.proid + '_' + this.query.id);
+	  return {
+	    title: req.getStorage("userInfo").nickName + '邀请您帮忙砍价:' + this.acProduc.productName,
+	    imageUrl: this.acProduc.pic,
+	    path: path
+	  };
+	  
+    // return {
+    //   title: req.getStorage("userInfo").nickName + '邀请您帮忙砍价:' + this.acProduc.productName,
+    //   imageUrl: this.acProduc.pic,
+    //   path: '/activity/bargain/kjDetail/kjDetail?id=' + this.query.id + '&superiorId=' + this.aprList.groupMainP.userId + '&proid=' + this.query.proid + "&merchantId=" + this.query.merchantId
+    // };
+  },
+  methods: {
+    tab(event) {
+      const tabIndex = event.currentTarget.dataset.current;
+      if (this.currentTab === tabIndex) return false;
+      this.setData({
+        currentTab: tabIndex
+      });
+    },
+
+    closeLayer() {
+      this.setData({
+        isShow: true
+      });
+    },
+
+    loadProudct() {
+      let that = this;
+      const query = that.query;
+      // console.log(query.id);
+      return new Promise((resolve, reject) => {
+        req.getRequest('/api/activity/bargainPriceDetail', {
+          id: query.id,
+          merchantId: query.merchantId
+        }, data => {
+			if(data){
+				data.bargainingMoney = parseFloat(data.bargainingMoney).toFixed(2);
+				data.surplusMoney = parseFloat(data.surplusMoney).toFixed(2);
+				this.setData(data);
+				this.initStates();
+				let percent = Math.round(data.bargainingMoney / (data.acProduc.orPrice - data.acProduc.money) * 100) + '%';
+				
+				if (data.bargainingMoney == (data.acProduc.orPrice * 10000 - data.acProduc.money * 10000) / 10000) {
+				  this.setData({
+				    isSuccess: true
+				  });
+				}
+				
+				this.setData({
+				  percent: percent
+				});
+				this.initTimer(data.acProduc, data.aprList);
+			}
+          resolve(); // that.getCodeUrl();
+        });
+      });
+    },
+
+    getData() {
+      let that = this;
+      const query = this.query;
+      return new Promise((resolve, reject) => {
+        req.getRequest('/api/product/detail', { id: query.proid }, data => {
+          // console.log("/api/product/detail")
+          var nodes = data.detail;
+          that.setData({ bannerUrls: data.images, pro: data, nodes: nodes });
+          resolve();
+        })
+      })
+    },
+    initTimer(group, list) {
+      //计时器
+      let _ts = this;
+
+      let nowTime = new Date(group.nowTime.replace(/-/g, '/')).getTime();
+      let startTime = new Date(group.createDate.replace(/-/g, '/')).getTime();
+      let endTime = new Date(list.endDate.replace(/-/g, '/')).getTime(); 
+      let times = parseInt((endTime - nowTime) / 1000);
+      this.timer = setInterval(() => {
+        times--;
+
+        if (times === 0) {
+          //重新加载列表
+          _ts.setData({
+            'act.end': true
+          });
+
+          return false;
+        }
+
+        if (times < 0) {
+          _ts.setData({
+            'act.isJieshu': true
+          });
+        }
+
+        let n = utils.formatDayTimes(times);
+
+        _ts.setData({
+          timer: n.split(/:|天/g)
+        });
+      }, 1000);
+
+      if (this.start) {
+        clearInterval(this.timer);
+      }
+    },
+
+    goUrl() {
+      app.globalData.redirectTab('activity/bargain/index/index?merchantId=' + this.query.merchantId);
+    },
+
+    confirmBuy() {
+      //直接购买
+      if (this.start) return req.msg('活动已结束'); // let merchant = req.getStorage('defaultMerchant');
+
+      if (this.query.merchantId) {
+        this.setData({
+          merchantId: this.query.merchantId
+        });
+      } // else{
+      //   if (req.getStorage('smallShop')) {
+      //     this.setData({ merchant: req.getStorage('smallShop').merchantDTO })
+      //     this.setData({ merchantId: req.getStorage('smallShop').merchantDTO.id })
+      //   } else if (req.getStorage('MERCHANT')) {
+      //     this.setData({ merchantId: req.getStorage('MERCHANT').id })
+      //     this.setData({ merchant: req.getStorage('MERCHANT') })
+      //   }
+      // }
+
+
+      // console.log(this.acProduc);
+      const params = {
+        skuId: this.acProduc.skuId,
+        quantity: 1,
+        productId: this.acProduc.productId,
+        activityId: this.acProduc.id,
+        aprId: this.query.id
+      };
+
+      if (this.query.merchantId) {
+        params.merchantId = this.query.merchantId;
+      } // if (this.data.merchant && this.data.merchant.type == 5) {
+      //   params.shopId = this.data.merchant.id
+      // }
+      // if (this.data.merchantId) params.merchantId = this.data.merchantId;
+
+
+      req.postRequest('/api/purchase/direct/buy', params, res => {
+        let redirect = '/product/subOrder/subOrder?ids=' + res;
+        let orderType = 7; //砍价订单类型
+
+        redirect += '&orderType=' + orderType;
+        redirect += '&aprId=' + params.aprId;
+
+        if (params.merchantId) {
+          redirect += '&merchantId=' + this.merchantId;
+        }
+
+        if (params.shopId) {
+          redirect += '&shopId=' + params.shopId;
+        }
+
+        uni.navigateTo({
+          url: redirect
+        });
+      });
+    },
+
+    initState() {
+      //判断是否发起砍价
+      req.isLogin().then(success => {});
+      let superid = this.query.id;
+      let proid = this.acProduc.productId;
+      if (this.isStates == 0) return req.msg('活动还未开始'); // if (this.data.isStates == 2) return req.msg('活动已结束');
+
+      if (this.start) return req.msg('活动已结束');
+      let param = {
+        acpId: this.acProduc.id,
+        actId: this.acProduc.actId,
+        productId: this.acProduc.productId,
+        type: 5,
+        initOrPart: 2,
+        superiorId: superid
+      };
+      req.getRequest('/api/activity/participationActivity', param, res => {
+        //判断是否帮砍过
+        // console.log("/api/activity/participationActivity");
+
+        if (res.state == 1) {
+          this.setData({
+            isKanjia: res.state,
+            isShow: false
+          });
+          return false;
+        }
+
+        let params = {
+          acpId: this.acProduc.id,
+          type: 5
+        };
+
+        if (superid) {
+          params.superiorId = superid;
+        }
+
+        req.postRequest('/api/activity/carterActivityPurchaseRecords', params, res => {
+          if (res) {
+            let money = '';
+            let id = '';
+            if (superid) money = res, id = superid;else id = res;
+            this.setData({
+              isShow: false,
+              money: money
+            });
+            this.loadProudct(); // wx.redirectTo({ url: '/activity/bargain/kjDetail/kjDetail?id=' + id + '&money=' + money + '&proid=' + proid })
+            // app.openPage('activity/bargain/kjDetail/kjDetail?id=' + id + '&money=' + money + '&proid=' + proid)
+          }
+        });
+      });
+    },
+
+    initStates() {
+      //判断是否发起砍价
+      req.isLogin().then(success => {});
+      let params = {
+        acpId: this.acProduc.id,
+        actId: this.acProduc.actId,
+        productId: this.acProduc.productId,
+        type: 5,
+        initOrPart: 2,
+        superiorId: this.query.id
+      };
+      return new Promise((resolve, reject) => {
+        req.getRequest('/api/activity/participationActivity', params, res => {
+          // console.log("/api/activity/participationActivity");
+
+          if (res.state != 1) {
+            this.setData({
+              isKanjia: res.state,
+              isShow: true
+            });
+          } else {
+            this.setData({
+              isKanjia: res.state
+            });
+          }
+
+          resolve();
+        });
+      });
+    },
+
+    gettoPay() {
+      req.postRequest('/api/activity/toPay', {
+        aprId: this.query.id,
+        type: 5
+      }, data => {
+        this.setData({
+          topay: data
+        });
+      });
+    },
+
+    toOrder() {
+      uni.navigateTo({
+        url: '/mine/orderDet/orderDet?id=' + this.topay
+      });
+    },
+
+    // 活动商品详情
+    goPrcdetail() {
+      app.globalData.openPage('activity/bargain/detail/detail?acid=' + this.acProduc.id + '&id=' + this.acProduc.productId);
+    }
+
+  }
+};
+</script>
+<style>
+@import "./kjDetail.css";
+</style>

+ 23 - 0
activity/content/content.css

@@ -0,0 +1,23 @@
+/* content.css */
+page{background: #fff;padding: 30rpx 0;box-sizing: border-box;}
+.title{font-size: 40rpx;color: #282828;font-weight: bold;line-height: 60rpx;padding: 0 30rpx;}
+.time{font-size: 24rpx;color: #999;padding: 0 30rpx;}
+.time text{font-size: 28rpx;color: #333;margin-right: 23rpx;}
+.content{font-size: 34rpx;color: #333;padding: 30rpx 30rpx;line-height: 1.7;}
+.con-vheight{height: 100vh;position: relative;overflow: hidden;}
+.con-vheight::after{content: '';display: block;position: absolute;left: 0;right: 0;bottom: 0;height: 15vh;background: linear-gradient(rgba(255, 255, 255, 0), #fff);z-index: 5;}
+.content video{width: 100%;height: 400rpx;object-fit:fill; margin-bottom: 20rpx;}
+.content image{width: 100%;margin: 30rpx 0;}
+.view-more{width: 230rpx;height: 70rpx;border: 2rpx solid var(--main);border-radius: 35rpx;font-size: 30rpx;color: var(--main);margin: 30rpx auto 0;text-align: center;line-height: 70rpx;}
+.bot{padding: 40rpx 35rpx 0;}
+.sbanner{overflow: hidden;position: relative;}
+.sbanner .swiper,.sbanner .swiper image{width: 100%;height: 160rpx;border-radius: 12rpx;overflow: hidden;}
+.dots{position: absolute;left: 0;right: 0;bottom: 20rpx;align-items: center;justify-content: center;}
+.dot{background: rgba(0,0,0,.5);width: 12rpx;height: 12rpx;border-radius: 6rpx;margin: 0 4rpx;}
+.dot.active{width: 30rpx;background: #fff;}
+.tits{font-size: 36rpx;color: #333;font-weight: bold;margin: 30rpx 0 0;}
+.zxlist .li{padding: 40rpx 0;border-bottom: 1rpx solid #EBEBEB;}
+.zximg{width: 230rpx;height: 150rpx;border-radius: 12rpx;margin-right: 23rpx;}
+.zxtit{font-size: 30rpx;color: #333;line-height: 41rpx;height: 82rpx;}
+.datas{font-size: 24rpx;color: #999;margin-top: 30rpx;}
+.adContainer{margin: 30rpx 0 0;border-radius: 10rpx;overflow: hidden;}

+ 107 - 0
activity/content/content.vue

@@ -0,0 +1,107 @@
+<template>
+	<view v-if="detaile">
+		<view class="title">{{ detaile.title }}</view>
+		<view class="content">
+			<view class="viewMore">
+				<rich-text :nodes="detaile.text | formatRichText"></rich-text>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+const req = require('../../utils/request.js');
+const api = require('../../utils/api.js');
+const util = require('../../utils/util.js');
+export default {
+	data() {
+		return {
+			detaile: '',
+			type: 2, //详情类型:1 普通内容 2 自定义页面内容
+		};
+	},
+
+	onLoad: function(options) {
+		uni.showShareMenu({
+			withShareTicket: true,
+			menus: ['shareAppMessage', 'shareTimeline']
+		});
+		this.id = options.id;
+		this.type = options.type ? options.type : 2;
+		this.getDetail();
+	},
+	onShow(){
+	},
+
+	onShareAppMessage() {
+		return {
+			title: this.detaile.title,
+			imageUrl: this.detaile.pic,
+			path: '/activity/content/content?id=' + this.id
+		};
+	},
+	onShareTimeline() {
+		return {
+			title: this.detaile.title,
+			imageUrl: this.detaile.pic,
+			path: '/activity/content/content?id=' + this.id
+		};
+	},
+	methods: {
+		getDetail() {
+			let apiUrl = '';
+			if(this.type == 1){
+				apiUrl = '/api/content/detail'
+			}else{
+				apiUrl = '/api/help/detailV2'
+			}
+			let param = {}
+			if(this.type == 1){
+				param.id = this.id;
+			}else{
+				param.code = this.id;
+			}
+			req.getRequest(
+				apiUrl,
+				param,
+				res => {
+					this.detaile = res;
+				}
+			);
+		},
+	},
+	filters: {
+		/**
+		 * 处理富文本里的图片宽度自适应
+		 * 1.去掉img标签里的style、width、height属性
+		 * 2.img标签添加style属性:max-width:100%;height:auto
+		 * 3.修改所有style里的width属性为max-width:100%
+		 * 4.去掉<br/>标签
+		 * @param html
+		 * @returns {void|string|*}
+		 */
+		formatRichText(html) {
+			//控制小程序中图片大小
+			let newContent = html.replace(/<img[^>]*>/gi, function(match, capture) {
+				match = match.replace(/style="[^"]+"/gi, '').replace(/style='[^']+'/gi, '');
+				match = match.replace(/width="[^"]+"/gi, '').replace(/width='[^']+'/gi, '');
+				match = match.replace(/height="[^"]+"/gi, '').replace(/height='[^']+'/gi, '');
+				return match;
+			});
+			newContent = newContent.replace(/style="[^"]+"/gi, function(match, capture) {
+				match = match.replace(/width:[^;]+;/gi, 'max-width:100%;').replace(/width:[^;]+;/gi, 'max-width:100%;');
+				return match;
+			});
+			// newContent = newContent.replace(/<br[^>]*\/>/gi, '');
+			newContent = newContent.replace(/<br[^>]*\/>/gi, '<p style="margin: 10px 0;"></p>');
+			newContent = newContent.replace(/<br[^>]*\>/gi, '<p style="margin: 10px 0;"></p>');
+			newContent = newContent.replace(/font-size:[^;]+;?/g,'');
+			newContent = newContent.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:inline-block;margin:12rpx auto;"');
+			return newContent;
+		}
+	}
+};
+</script>
+<style>
+@import './content.css';
+</style>

+ 141 - 0
activity/group/detail/detail.css

@@ -0,0 +1,141 @@
+/* group/detail/detail.wxss */
+.banner{overflow: hidden;position: relative;}
+.swiper,.swiper image{width: 100%;height: 750rpx;}
+.dots{position: absolute;left: 0;right: 0;bottom: 11rpx;align-items: center;justify-content: center;}
+.dot{background:var(--mina) ;width: 10rpx;height: 10rpx;border-radius: 5rpx;margin: 0 3rpx;}
+.dot.active{width: 30rpx;}
+.group{position: relative;height: 120rpx;}
+.ptbg{width: 100%;height: 120rpx;position: absolute;top: 0;left: 0;z-index: 1;}
+.groups{position: relative;z-index: 2;align-items: center;padding: 0 30rpx;justify-content: space-between;height: 120rpx;}
+/* .price{font-size: 28rpx;color: #FE0419;}
+.price text{font-size: 40rpx;font-weight: bold;}
+.pin text{font-weight: normal;font-size: 24rpx;text-decoration: line-through;}
+.price text{color: #999;} */
+
+.price{font-size: 28rpx;color: #FE0419;}
+.price text{font-size: 40rpx;font-weight: bold;}
+.price text.origin{font-weight: normal;font-size: 24rpx;color: #999;text-decoration: line-through;margin-left: 10rpx;}
+.left .price,.left .price text.origin{color: #fff;}
+
+.pin{font-size: 22rpx;color: #fff;}
+.tuan{width: 154rpx;height: 40rpx;float: right;}
+.endtime{align-items: center;font-size: 22rpx;color: #fff;line-height: 36rpx;margin-top: 47rpx;overflow: hidden;clear: both;}
+.endtime view{margin-right: 15rpx;}
+.endtime text{display: block;width:36rpx;height:36rpx;background:rgb(0,0,0,.4);border-radius:6rpx;font-size: 24rpx;color: #fff;text-align: center;line-height: 36rpx;margin:0 5rpx}
+
+
+.info{padding: 30rpx 30rpx 40rpx;}
+.infos{align-items: center;justify-content: space-between;}
+.share{font-size: 20rpx;color: #999;text-align: center;position: relative;margin-left: 45rpx !important;}
+.share::after{content: '';display: block;width: 2rpx;height: 45rpx;background: #e7e7e7;position: absolute;top: 50%;transform: translateY(-50%);left: -30rpx;}
+.share image{width: 31rpx;height: 31rpx;margin: 0 auto 10rpx;}
+.title{font-size: 30rpx;color: #222;line-height: 40rpx;font-weight: bold;}
+.tag{width: 82rpx;height: 36rpx;display: inline-block;margin: 0 10rpx 0 0;position: relative;top: 7rpx;}
+.detinfo .item{padding: 30rpx;border-bottom: 1rpx solid #f6f6f6;}
+.detinfo .item:last-child{border-bottom: none;}
+.item label{display: block;width: 130rpx;font-size: 28rpx;color: #222;font-weight: bold;line-height: 40rpx;}
+.quan .flex{align-items: center;}
+.quan text{display: block;background: #FDF5F3;padding: 0 13rpx;height: 40rpx;line-height: 40rpx;font-size: 24rpx;color: #FF5F08;margin-right: 10rpx;}
+.ling{font-size: 24rpx;color: #FF5F08;align-items: center;}
+.ling image{width: 14rpx;height: 24rpx;margin-left: 11rpx;}
+.address{font-size: 28rpx;color: #333;line-height: 40rpx;}
+.huo{font-size: 24rpx;color: #666;line-height: 40rpx;}
+.huo text{color: #FE0419;}
+.more{width: 36rpx;height: 10rpx;margin-top: 15rpx;}
+
+
+
+/* .user{width: 68rpx;height: 68rpx;border-radius: 50%;margin-right: 15rpx;} */
+.name{font-size: 28rpx;color: #666;line-height: 68rpx;justify-content: space-between;align-items: center;}
+.pinglun{font-size: 28rpx;color: #333;margin: 15rpx 0 0;line-height: 44rpx;}
+.huifu{background: #F2F2F2;border-radius: 6rpx;margin: 25rpx 0 0;line-height: 42rpx;padding: 20rpx 30rpx;position: relative;}
+.huifu::after{content: '';display: block;width: 0;height: 0;border: 9rpx solid transparent;border-bottom-color: #F2F2F2;border-top: none;position: absolute;top: -8rpx;left: 39rpx;}
+.show{display: block;}
+.hide{display: none;}
+
+.bot{height: 80rpx;align-items: center;padding: 20rpx 30rpx 20rpx 0;justify-content: space-between;}
+.botbtn{font-size: 22rpx;color: #6A6A6A;width: 145rpx !important;text-align: center;position: relative;}
+.botbtn image{width: 40rpx;height: 34rpx;margin: 10rpx auto 5rpx;}
+.message{background: #DF1A14;height: 28rpx;line-height: 28rpx;font-size: 20rpx;color: #fff;text-align: center;border-radius: 15rpx;box-sizing: border-box;min-width: 21rpx;padding: 0 8rpx;position: absolute;top: 0;right: 25%;}
+.gmbtn{width: 276rpx;height: 76rpx;border-radius: 40rpx;text-align: center;line-height: 76rpx;font-size: 30rpx;color: #FD3C31;border: 2rpx solid #FD3C31;margin-right: 20rpx;}
+.ctbtn{width: 280rpx;height: 80rpx;border-radius: 40rpx;text-align: center;line-height: 80rpx;font-size: 30rpx;color: #fff;}
+.yybtn{width: 430rpx;height: 80rpx;border-radius: 40rpx;text-align: center;line-height: 80rpx;font-size: 30rpx;color: #fff;align-items: center;justify-content: center;}
+.cancel-yy{width: 426rpx;height: 76rpx;border: 2rpx solid #05C379;border-radius: 40rpx;text-align: center;line-height: 76rpx;font-size: 30rpx;color: #05C379;align-items: center;justify-content: center;}
+.yybtn .icon,.cancel-yy .icon{font-size: 30rpx;margin-right: 15rpx;}
+
+
+/* 参团情况 */
+.cantuan{padding: 35rpx 55rpx 30rpx;}
+.can-info{text-align: center;font-size: 40rpx;color: #333;}
+.can-info text{font-size: 43rpx;color: #FE0419;}
+.can-infos{flex-wrap: wrap;padding: 0 35rpx;}
+.can-infos .li{width: 90rpx;height: 90rpx;position: relative;margin-right: 30rpx;margin-top: 55rpx;}
+.can-infos .li:nth-child(5n){margin-right: 0;}
+.can-infos .li image{width: 90rpx;height: 90rpx;border-radius: 50%;}
+.can-infos .li text{display: block;width: 78rpx;height: 32rpx;border-radius: 17rpx;border: 2rpx solid #fff;background: #FD4534;font-size: 20rpx;color: #fff;text-align: center;line-height: 32rpx;position: absolute;left: 50%;transform: translateX(-50%);bottom: -12rpx;}
+.can-btn{height: 90rpx;border-radius: 45rpx;font-size: 30rpx;color: #fff;text-align: center;line-height: 90rpx;margin-top: 50rpx;}
+/* 组团情况 */
+.zu-tit{height: 100rpx;align-items: center;justify-content: space-between;padding: 0 30rpx;border-bottom: 2rpx solid #f5f6f7;font-size: 30rpx;}
+.zu-tit .icon{color: #C1C1C1;font-size: 18rpx;width: 40rpx;
+  height: 40rpx;}
+.zu-list .li{border-bottom: 2rpx solid #f5f6f7;height: 120rpx;padding: 0 30rpx;align-items: center;}
+.zu-list .li:last-child{border-bottom: none;}
+.zu-list .li image{width: 72rpx;height: 72rpx;border-radius: 50%;}
+.zu-name{font-size: 28rpx;margin: 0 20rpx;}
+.zu-ren{text-align: right;margin-right: 20rpx;}
+.cha{font-size: 24rpx;color: #333;}
+.cha text{color: #FE0419;}
+.zu-time{font-size: 22rpx;margin-top: 8rpx;}
+.zu-time text{color: #666;}
+.zu-btn{width: 150rpx;height: 60rpx;border-radius: 30rpx;font-size: 24rpx;color: #fff;text-align: center;line-height: 60rpx;}
+
+/* 玩法 */
+.wanfa{padding: 35rpx 30rpx;}
+.wan-tit{font-size: 30rpx;color: #333;}
+.wan-info{justify-content: space-around;margin-top: 35rpx;}
+.icon-right{margin: 0 25rpx;font-size: 24rpx;color: #C1C1C1;}
+.wan-info .li{font-size: 24rpx;color: #333;line-height: 36rpx;align-items: center;}
+.wan-info .li .icon{width: 42rpx;height: 42rpx;border: 2rpx solid #fe1a2c;border-radius: 50%;color: #fe1a2c;font-size: 24rpx;margin-right: 7rpx;font-weight: bold;}
+.wan-info .li text{display: block;}
+
+/* 小店相关 */
+.xiaodian{position: relative;height: 122rpx;padding: 0 26rpx 0 110rpx;align-items: center;margin: 35rpx 30rpx 0;}
+.xdbg{position: absolute;left: 0;top: 0;width: 100%;height: 100%;z-index: 1;}
+.shouyi{position: relative;z-index: 2;color: #fff;margin-right: 10rpx;}
+.shouyi view{font-size: 40rpx;font-weight: bold;margin-top: 8rpx;}
+.shouyi text{font-weight: normal;font-size: 24rpx;}
+.addshop{height: 62rpx;padding: 0 25rpx;border-radius: 31rpx;background:linear-gradient(115deg,rgba(255,78,78,1) 0%,rgba(220,21,21,1) 100%);text-align: center;line-height: 62rpx;font-size: 24rpx;color: #fff;position: relative;z-index: 2;}
+.fenxiang{height: 62rpx;padding: 0 25rpx;margin-left: 15rpx;border-radius: 31rpx;background:linear-gradient(115deg,rgba(255,78,78,1) 0%,rgba(220,21,21,1) 100%);text-align: center;line-height: 62rpx;font-size: 24rpx;color: #fff;position: relative;z-index: 2;}
+.goShop{height: 62rpx;padding: 0 25rpx;margin-left: 15rpx;border-radius: 31rpx;background:linear-gradient(115deg,rgba(255,78,78,1) 0%,rgba(220,21,21,1) 100%);text-align: center;line-height: 62rpx;font-size: 24rpx;color: #fff;position: relative;z-index: 2;}
+.suc{position: fixed;left: 50%;top: 50%;transform: translate(-50%,-50%);background: #fff;width: 536rpx;border-radius: 20rpx;z-index: 100;text-align: center;padding-bottom: 47rpx;}
+.tjcg1{width: 100%;height: 284rpx;}
+.tjcg{width: 195rpx;height: 38rpx;margin: 52rpx auto 15rpx;}
+.suc text{display: block;font-size: 24rpx;color: #333;}
+.shopcc{justify-content: center;}
+.shop{width:220rpx;height:80rpx;background:linear-gradient(123deg,rgba(255,130,130,1) 0%,rgba(220,21,21,1) 100%);font-size: 30rpx;color: #fff;line-height: 80rpx;border-radius: 40rpx;margin: 45rpx 15rpx 40rpx;}
+.share-btn{justify-content: space-between;padding: 0 54rpx;}
+.wxfriend,.wxposter{width: 196rpx !important;height: 76rpx !important;align-items: center;justify-content: center;font-size: 30rpx;color: #666;border: 2rpx solid #D8D8D8;border-radius: 40rpx !important;}
+.wxfriend image,.wxposter image{width: 31rpx;height: 31rpx;margin-right: 13rpx;}
+.suc-close{position: absolute;left: 50%;transform: translateX(-50%);bottom: -102rpx;width: 62rpx;height: 62rpx;}
+.sellStock{text-align: right; color: #999;position: relative; left: 145rpx;}
+.sellStock text{ color:#222 ;}
+.protext{color: #999;margin-top: 15rpx;overflow:hidden; text-overflow:ellipsis;display:-webkit-box; -webkit-box-orient:vertical;-webkit-line-clamp:2; }
+
+/* 更多拼团 */
+.ptuanmode{position: fixed;z-index: 100;background: #fff;width: 90%; border-radius:30rpx 30rpx;left: 50%;top: 50%; transform: translate(-50%, -50%);}
+.tole{font-size: 24rpx;color: #999;text-align: center;padding: 0 0 10rpx 0;}
+.pttop{padding: 30rpx 0;text-align: center;font-size: 34rpx;border-bottom: 2rpx solid #9999;}
+/* .zutuan{position: relative;} */
+.page{position: fixed;z-index: 100;}
+.end{background: #999999;}
+
+.guarantee{border-top: 1rpx solid #f6f6f6;padding: 15rpx 0 0 0; margin-top: 15rpx;}
+.guarantee .cont{flex-wrap: wrap;font-size: 26rpx;}
+.guarantee .cont .li{align-items: center;margin-right: 20rpx;
+  margin-bottom: 10rpx;}
+.guarantee .cont image{        width: 30rpx;
+  height: 30rpx;}
+  
+.pro-sel{align-items: center;}
+.pro-sel .flex{text-overflow: ellipsis;white-space: nowrap;overflow: hidden;}
+.mrico{width: 16rpx;height: 27rpx;}

+ 1470 - 0
activity/group/detail/detail.vue

@@ -0,0 +1,1470 @@
+<template>
+	<view v-if="allShow">
+		<!--group/detail/detail.wxml-->
+		<view class="banner">
+			<swiper class="swiper" @change="swiperChange" :current="current" autoplay="true" circular="true"
+				duration="1000">
+				<block v-for="(item, index) in bannerUrls" :key="index">
+					<swiper-item autoplay="true">
+						<image :src="item + '?x-oss-process=style/w750-auto'" mode="aspectFit"></image>
+					</swiper-item>
+				</block>
+			</swiper>
+			<view class="dots dflex">
+				<block v-for="(item, index) in bannerUrls" :key="index">
+					<view :class="'dot ' + (index == swiperCurrent ? ' active' : '')" :data-current="index"
+						@tap="dotEvent"></view>
+				</block>
+			</view>
+		</view>
+		<!-- <view class="notification_bar" wx:if="{{isNotice}}">
+	<swiper class="swiper_container" vertical="true" autoplay="true" circular="false" duration="1000" interval="5000" easing-function="easeInOutCubic" class="bar_box dflex">
+		<swiper-item class="bar_con dflex" wx:for="{{contentList}}" wx:key="item">
+			<view class="bar dflex">
+				<image class="bar_left" src="{{item.pic}}" />
+				<text class="bar_text">最新订单来自</text>
+				<text class="bar_text">{{item.name}},</text>
+				<text class="bar_text">{{item.time}}</text>
+			</view>
+		</swiper-item>
+	</swiper>
+</view> -->
+		<view class="group">
+			<image src="/activity/static/activity/images/ptbg.png" class="ptbg" v-if="act.start"></image>
+			<image src="/activity/static/activity/images/msyybg.png" class="ptbg" v-else></image>
+			<view class="groups dflex">
+				<view class="left">
+					<view class="price">拼团价¥<text>{{act.money}}</text></view>
+					<view class="pin"><text class="origin" v-if="act.marketPrice<act.money&&act.marketPrice!=0">原价
+							{{act.marketPrice}}</text>
+						<block v-if="act.marketPrice<act.money&&act.marketPrice!=0"> | </block>{{count? count:0}}人已拼
+						{{act.activityMainEntity.numberPeople}}人团
+					</view>
+				</view>
+				<view class="right">
+					<image src="/static/pages/images/tuan.png" class="tuan"></image>
+					<view class="endtime dflex">
+						<view>{{isStates==0?'距开始':isStates==1?'距结束':'已结束'}}</view>
+						<block v-if="timer.length==4">
+							<block v-if="timer[0] !=0"><text>{{timer[0]}}</text>天</block>
+							<text>{{timer[1]}}</text>:
+							<text>{{timer[2]}}</text>:
+							<text>{{timer[3]}}</text>
+						</block>
+						<block v-else>
+							<text>{{timer[0]}}</text>:
+							<text>{{timer[1]}}</text>:
+							<text>{{timer[2]}}</text>
+						</block>
+						<!-- <block wx:if="{{timer&&timer.length>0}}">
+				<text>{{timer[0]}}</text>天</block>
+				<text>{{timer[1]}}</text>:
+				<text>{{timer[2]}}</text>:
+				<text>{{timer[3]}}</text> -->
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="text">
+			{{product.brandName ? product.brandName : ''}} {{product.brief ?  product.brief : ''}}
+		</view>
+		<view class="info bgfff">
+			<view class="infos dflex">
+				<view class="title flex">{{pro.title?pro.title:'0'}}</view>
+				<view class="share" @tap="showShare">
+					<image src="/static/pages/images/fxico.png"></image>分享
+				</view>
+			</view>
+			<view class="guarantee dflex" v-if="guarantee.length>0">
+				<view class="cont dflex">
+					<view v-for="(item, index) in guarantee" :key="index" class="dflex li">
+						<image src="/activity/static/activity/images/guarantee.png"></image>{{item}}
+					</view>
+				</view>
+			</view>
+		</view>
+
+		<view class="detinfo mt20 bgfff">
+			<!-- isOtc 0 默认 1 处方药 2 非处方药 3 医疗器械 4 食品类 5 海外购 -->
+			<block v-if="act.isOtc!=5">
+			<block v-if="is_open_shop == 1 && ascription">
+			<view class="xiaodian dflex malr20" v-if="((act.isMeCommission != 1 || act.isMeCommission != '1') && act.oneCommission>0) || ((act.isMeCommission == 1 || act.isMeCommission == '1') && act.twoCommission>0) || act.serviceShopRate">
+				<image src="/static/pages/images/xdbg1.png" class="xdbg"></image>
+				<view class="shouyi flex" v-if="((act.isMeCommission != 1 || act.isMeCommission != '1') && act.oneCommission>0) || ((act.isMeCommission == 1 || act.isMeCommission == '1') && act.twoCommission>0)">
+					<text>分销收益</text>
+					<view v-if="act.isMeCommission == 0"><text>¥</text>{{act.oneCommission}}</view>
+					<view v-else><text>¥</text>{{act.twoCommission}}</view>
+				</view>
+				<view class="shouyi flex" v-if="act.serviceShopRate">
+					<text>小店服务费</text>
+					<view><text>¥</text>{{act.serviceShopRate}}</view>
+				</view>
+				<view class="dflex" v-if="act.isJoinShop">
+					<view class="fenxiang" @tap="showShare">分享推广</view>
+					<navigator :url="url" hover-class="none" class="goShop">去小店</navigator>
+				</view>
+				<view class="addshop" @tap="addShop" v-else>添加到小店</view>
+			</view>
+			</block>
+			<block v-else>
+			<view class="xiaodian dflex malr20" v-if="((act.isMeCommission != 1 || act.isMeCommission != '1') && act.oneCommission>0) || ((act.isMeCommission == 1 || act.isMeCommission == '1') && act.twoCommission>0)">
+				<image src="/static/pages/images/xdbg1.png" class="xdbg"></image>
+				<view class="shouyi flex">
+					<text>分销收益</text>
+					<view v-if="act.isMeCommission == 0"><text>¥</text>{{act.oneCommission}}</view>
+					<view v-else><text>¥</text>{{act.twoCommission}}</view>
+				</view>
+				<navigator url="/promote/apply/apply" hover-class="none" class="fenxiang" v-if="isDistriUser != 2">我要推广</navigator>
+				<view class="fenxiang" @tap="showShare" v-else>分享推广</view>
+			</view>
+			</block>
+			</block>
+			<!-- <view class="item dflex">
+		<label>优惠券</label>
+		<view class="quan flex dflex">
+			<view class="flex dflex">
+				<text>满500减50</text>
+				<text>满200减10</text>
+			</view>
+			<view class="ling dflex">领券<image src="/pages/images/more3.png"></image>
+			</view>
+		</view>
+	</view> -->
+			<view class="item pro-sel dflex" v-if="pro.propertiesList && pro.propertiesList.length > 0"
+				@click="pro.stock > 0 ? addShopCart() : ''">
+				<label>已选</label>
+				<view class="flex">{{pro.properties}}</view>
+				<image src="/static/pages/images/more.png" class="mrico"></image>
+			</view>
+			<view class="item dflex">
+				<label>配送至</label>
+				<view class="flex" @tap="toAddress">
+					<view class="address">{{address.address?address.address:''}}{{address.house?address.house:''}}
+					</view>
+					<view class="huo" v-if="pro.isTimely == 1"><text>现货</text>,现在下单,预计2小时后送达</view>
+				</view>
+				<image src="/static/pages/images/more2.png" class="more" @tap="toAddress"></image>
+			</view>
+			<view class="item dflex">
+				<label>门店</label>
+				<view class="flex" @tap="toMerchant">
+					<view class="address">{{merchant.title}}</view>
+				</view>
+			</view>
+		</view>
+		<!-- 参团情况 -->
+		<!-- <view class="cantuan bgfff mt20">
+	<view class="can-info">{{act.activityMainEntity.numberPeople}}人团,还差<text>{{act.activityMainEntity.numberPeople-(act.activityPurchaseRecordEntitys?act.activityPurchaseRecordEntitys.length:0)}}人</text></view>
+	<view class="can-infos dflex" wx:for="{{act.activityPurchaseRecordEntitys}}">
+		<view class="li">
+			<image src="/pages/images/bar.png" mode="aspectFit"></image>
+			<text>团长</text>
+		</view>
+		<view class="li">
+			<image src="/pages/images/bar.png" mode="aspectFit"></image>
+		</view>
+		<view class="li">
+			<image src="/pages/images/cha.png"></image>
+		</view>
+		<view class="li">
+			<image src="/pages/images/cha.png"></image>
+		</view>
+	</view>
+	<view class="can-btn mbglinear">我要参团</view>
+</view> -->
+		<!-- 组团情况 -->
+		<view class="zutuan bgfff mt20">
+			<view
+				v-if="(activityPurchaseRecordListDTO&&activityPurchaseRecordListDTO.length>0)||(act.activityPurchaseRecordListDTO.length>0&&act.activityPurchaseRecordListDTO)"
+				class="zu-tit dflex">
+				{{act.activityPurchaseRecordListDTO.length}}人正在组团,可直接参与<icon class="icon iconfont icon-bottom"
+					@tap="activityPurchaseRecordListDTO.length>1&&activityDot.length>0?clickmore():''">
+				</icon>
+			</view>
+			<view class="zu-list">
+				<view v-for="(item, index) in activityPurchaseRecordListDTO" :key="index" class="li dflex">
+					<image :src="item.groupMainP.uavatar" mode="aspectFit"></image>
+					<view class="zu-name flex">{{item.groupMainP.unickName}}</view>
+					<view class="zu-ren">
+						<view class="cha"
+							v-if="(act.activityMainEntity.numberPeople-(item.groupList?item.groupList.length:0))>0">
+							{{act.activityMainEntity.numberPeople}}人成团,还差<text>{{(act.activityMainEntity.numberPeople-(item.groupList?item.groupList.length:0))>0?(act.activityMainEntity.numberPeople-(item.groupList?item.groupList.length:0)):0}}人</text>
+						</view>
+						<view class="zu-time"
+							v-if="item.isGroup&&(act.activityMainEntity.numberPeople-(item.groupList?item.groupList.length:0))>0">
+							剩余<text>{{item.times}}</text></view>
+						<block v-else>
+							<view
+								v-if="!item.isGroup&&(act.activityMainEntity.numberPeople-(item.groupList?item.groupList.length:0))>0">
+								拼团失败</view>
+							<view
+								v-if="(act.activityMainEntity.numberPeople-(item.groupList?item.groupList.length:0))<=0">
+								<text>{{item.groupMainP.state==1?'拼团完成':'拼团待支付'}}</text>
+							</view>
+						</block>
+					</view>
+					<view class="zu-btn mbglinear" :data-index="index" @tap="toGoGroup"
+						v-if="(act.activityMainEntity.numberPeople-(item.groupList?item.groupList.length:0))>0">去参团
+					</view>
+					<view class="zu-btn mbglinear" :data-index="index" @tap="toGoGroup" v-else>查看详情</view>
+
+				</view>
+			</view>
+		</view>
+
+		<!-- 拼团玩法 -->
+		<view class="wanfa bgfff mt20">
+			<view class="wan-tit">拼团玩法</view>
+			<view class="wan-info dflex">
+				<view class="li dflex">
+					<icon class="icon iconfont icon-zhifu"></icon>
+					<view class="flex">支付开团<text>或参团</text></view>
+				</view>
+				<icon class="icon iconfont icon-right"></icon>
+				<view class="li dflex">
+					<icon class="icon iconfont icon-haoyou"></icon>
+					<view class="flex">邀请好友<text>拼团</text></view>
+				</view>
+				<icon class="icon iconfont icon-right"></icon>
+				<view class="li dflex">
+					<icon class="icon iconfont icon-dingdan"></icon>
+					<view class="flex">达到人数拼团成功<text>人数不足拼团失败</text></view>
+				</view>
+			</view>
+		</view>
+
+
+		<!--  商品详情等页面 -->
+		<product-footer ref="list" id="list" :detail="nodes" :imgs="imgs" :proId="pro.id" v-if="pro.id" :form="form"
+			@showTab="showTab" @scoreTab="scoreTab" @freshen="freshenFun"></product-footer>
+
+		<v-share :hide-toast="hideShare" :product="pro" :code-url="codeUrl" :a-type="'3'" @onFather="click"></v-share>
+
+		<view class="placeholder-view" :style="'height:' + (bottomBlankHeight + 140) + 'rpx'"></view>
+		<view class="bot fixed bgfff dflex" :style="'padding-bottom: ' + (bottomBlankHeight + 20) + 'rpx'">
+			<contact-button img-url="/static/pages/images/kfico.png" class-name="botbtn" button-text="在线客服"></contact-button>
+			<!-- <navigator class="botbtn" open-type="switchTab" url="/pages/cart/cart" hover-class="none">
+		<image src="/pages/images/gwc.png"></image>购物车<text class="message" wx:if="{{pro.count > 0}}">{{pro.count}}</text>
+	</navigator> -->
+			<!-- <view class="botbtn" bindtap="clickCollect">
+		<image src="/pages/images/shoucang_h.png" wx:if="{{pro.isCollect}}"></image>
+		<image src="/pages/images/shoucang.png" wx:else></image>收藏
+	</view> -->
+			<!-- <view class="addcart">加入购物车</view> -->
+			<block v-if="isStates!=0">
+				<view class="gmbtn" @tap="atOnceBuy">¥{{salePrice}} 单独购买</view>
+
+				<!-- <view class="ctbtn mbglinear">我要参团</view>官方组团按钮 -->
+				<!-- 自由组团按钮 -->
+				<view class="ctbtn mbglinear" @tap="createGroup" v-if="isStates==1&&myActData.state!=1&&!activityEnd">
+					¥{{ act.money}}发起拼团</view>
+				<view class="ctbtn mbglinear" @tap="createGroup" v-if="myActData.state==1">查看拼团</view>
+				<view class="ctbtn end" v-if="(isStates==2&&myActData.state!=1)||activityEnd">活动已结束</view>
+
+			</block>
+			<block v-if="isStates==0">
+				<view class="cancel-yy dflex" @tap="cancelActivityRemind" v-if="isRemind">
+					<icon class="icon iconfont icon-yugao"></icon>取消提醒
+				</view>
+				<view class="yybtn mbggreen dflex" @tap="addActivityRemind" v-else>
+					<icon class="icon iconfont icon-yugao"></icon>预约提醒
+				</view>
+			</block>
+		</view>
+
+		<!-- 商品规格 -->
+		<block v-if="isShow">
+			<product-popup :product="popup" :activityId="act.id" :is-cart="isCart" order-type="4" @hidePopup="hidePopup"
+				@addCartSuccess="addCartSuccess" :order-type="orderType" :merchant="merchant"
+				:merchant-id="query.merchantId" :shop-id="query.shopId"></product-popup>
+		</block>
+
+		<view class="contact_index" @tap="goTop">
+			<image src="/static/pages/images/backtop.png"></image>顶部
+		</view>
+
+
+
+		<!-- 查看更多 -->
+		<view class="mask" @tap="eliminate" v-if="show" catchtouchmove="true"></view>
+		<view class="page" :style="'margin:-' + (windowHeight/2) + 'px 0 0 -' + (windowWidth/2) + 'px'">
+			<view class="ptuanmode" catchtouchmove="true" v-if="show">
+				<view class="zu-list">
+					<view class="pttop">正在拼团</view>
+					<scroll-view scroll-y="true" style="max-height: 550rpx;">
+						<view v-for="(item, index) in activityDot" :key="index" class="li dflex">
+							<image :src="item.groupMainP.uavatar" mode="aspectFit"></image>
+							<view class="zu-name flex">{{item.groupMainP.unickName}}</view>
+							<view class="zu-ren">
+								<view class="cha"
+									v-if="(act.activityMainEntity.numberPeople-(item.groupList?item.groupList.length:0))>0">
+									{{act.activityMainEntity.numberPeople}}人成团,还差<text>{{(act.activityMainEntity.numberPeople-(item.groupList?item.groupList.length:0))>0?(act.activityMainEntity.numberPeople-(item.groupList?item.groupList.length:0)):0}}人</text>
+								</view>
+								<view class="zu-time"
+									v-if="item.isGroup&&(act.activityMainEntity.numberPeople-(item.groupList?item.groupList.length:0))>0">
+									剩余<text>{{item.times}}</text></view>
+								<block v-else>
+									<view
+										v-if="!item.isGroup&&(act.activityMainEntity.numberPeople-(item.groupList?item.groupList.length:0))>0">
+										拼团失败</view>
+									<view
+										v-if="(act.activityMainEntity.numberPeople-(item.groupList?item.groupList.length:0))<=0">
+										<text>{{item.groupMainP.state==1?'拼团完成':'拼团待支付'}}</text>
+									</view>
+								</block>
+							</view>
+							<view class="zu-btn mbglinear" :data-index="index" data-type="1" @tap="toGoGroup"
+								v-if="(act.activityMainEntity.numberPeople-(item.groupList?item.groupList.length:0))>0">
+								去参团</view>
+							<view class="zu-btn mbglinear" :data-index="index" @tap="toGoGroup" :data-type="1" v-else>
+								查看详情</view>
+						</view>
+					</scroll-view>
+					<view class="tole" v-if="activityDot.length==21">--仅显示20个正在拼团的人--</view>
+				</view>
+			</view>
+		</view>
+
+		<!-- 添加到小店成功 -->
+		<view class="mask" :hidden="isHide" @tap="hidePop"></view>
+		<view class="suc" :hidden="isHide">
+			<image src="/static/pages/images/tjcg1.png" class="tjcg1"></image>
+			<image src="/static/pages/images/tjcg.png" class="tjcg"></image>
+			<text>快去我的小店看看吧</text>
+			<view class="shopcc dflex">
+				<view class="shop" @tap="showShare">分享推广</view>
+				<navigator :url="url" hover-class="none" class="shop" >我的小店</navigator>
+			</view>
+			<!-- <view class="share-btn dflex">
+				<button class="wxfriend dflex" open-type="share">
+					<image src="/static/pages/images/wechat.png"></image>
+					微信好友
+				</button>
+				<view class="wxposter dflex" @tap="generatePoster">
+					<image src="/static/pages/images/poster.png"></image>
+					生成海报
+				</view>
+			</view> -->
+			<image src="/static/pages/images/close2.png" class="suc-close" @tap="hidePop"></image>
+		</view>
+		<block v-if="isPopupLogin">
+			<product-login :about="about" @hidePopupLogin="hidePopupLogin"></product-login>
+		</block>
+	</view>
+</template>
+
+<script>
+	const app = getApp();
+	const req = require("../../../utils/request.js");
+	const utils = require("../../../utils/util.js");
+	var QQMapWX = require("../../../utils/qqmap.js");
+	const requsetmessage = require("../../../utils/requestmessage.js");
+	const route = require("../../../utils/route");
+	const api = require("../../../utils/api.js");
+	import productFooter from "../../../components/product_footer/index";
+	import productPopup from "../../../components/product-popup/index";
+	import vShare from "../../../components/share/share";
+	import productLogin from "../../../components/product-login/index";
+
+	export default {
+		data() {
+			return {
+				bottomBlankHeight: app.globalData.isIPhoneX ? 68 : 0,
+				swiperCurrent: 0,
+				bannerUrls: [],
+				isShow: false,
+				pro: {},
+				timer: [],
+				isRemind: false,
+				hideShare: true,
+				codeUrl: '',
+				start: false,
+				activityPurchaseRecordListDTO: [],
+				activityDot: [],
+				act: {},
+				isGroup: true,
+				hideShop: true,
+				//隐藏添加到小店
+				isHide: true,
+				//添加小店成功弹窗
+				contentList: [{
+					pic: "/static/pages/images/bar.png",
+					name: '好风依旧',
+					time: '4秒前'
+				}, {
+					pic: "/static/pages/images/bar.png",
+					name: '杨鑫',
+					time: '20秒前'
+				}, {
+					pic: "/static/pages/images/bar.png",
+					name: '杨鑫',
+					time: '5秒前'
+				}],
+				isNotice: false,
+				form: {
+					page: 1,
+					limit: 10
+				},
+				freshen: true //是否更新页面
+					,
+				current: "",
+				query: "",
+				merchant: "",
+				merchantId: "",
+				shopId: "",
+				imgs: "",
+				nodes: "",
+				salePrice: "",
+				activityEnd: false,
+				isStates: 0,
+				address: {},
+				popup: "",
+				myActData: "",
+				count: "",
+				show: false,
+				tabIndex: "",
+				guarantee: "",
+				is_open_comments: "",
+				switch: true,
+				about: {},
+				allShow: false,
+				url:'',
+				is_open_shop: '',//商户是否开启分销
+				ascription: false,//是否开启小店
+				isDistriUser: 0, // 判断用户是否是分销员 2为分销员
+				isPopupLogin: false
+			};
+		},
+
+		components: {
+			productFooter,
+			productPopup,
+			vShare,
+			productLogin
+		},
+		props: {},
+		onLoad: function(options) {
+			// console.log(options);
+			this.query = options;
+			this.setData({
+				query: options
+			});
+
+			if (options.scene) {
+				this.scene = options.scene;
+			}
+
+			if (options.isShare) {
+				this.query.id = options.id;
+				this.query.acid = options.acid;
+				req.setStorage('pidCode', options.userId);
+				req.setStorage('pidCode', options.userId);
+				let params = {
+					userId: options.userId,
+					merchantId: options.merchantId ? options.merchantId : '',
+				}
+				this.bindUser(params);
+			}
+
+			if (options.hideShop) {
+				this.setData({
+					hideShop: this.query.hideShop
+				});
+			} else {
+				this.setData({
+					hideShop: 'true'
+				});
+			} // this.isShop()
+
+
+			setInterval(() => {
+				this.setData({
+					isNotice: true
+				});
+			}, 10000);
+			// this.getuserInfo()
+		},
+		onShow: async function() {
+			let that = this
+			if (this.freshen) {
+				await this.loadCodeParams();
+				if(that.scene){
+					await that.bindUser(that.query);
+				}
+				// this.loadDefaultAddress();
+				this.groupCount();
+				this.getGuarantee().then(data => {
+					if (this.switch) {
+						api.getMerchant(this.query, req, data => {
+							that.loadDefaultAddress();
+							if (data == 1) {
+								api.locationShow()
+							} else {
+								that.getuserInfos(data);
+								if (data.type == 5) {
+									that.query.merchantId = data.merchantDTO.id
+									that.query.shopId = data.id
+								} else {
+									that.query.merchantId = data.id
+								}
+								if (req.getStorage('userInfo') && that.merchant.id != data.id) {
+									this.loadProudct();
+									let pages = getCurrentPages();
+									var prevPage = pages[pages.length - 2];
+									if (prevPage) {
+										prevPage.$vm.setData({
+											freshen: true
+										});
+									}
+								} else {
+									this.loadProudct();
+								}
+								that.merchant = data
+							}
+						})
+					}
+				})
+				await this.browsRecound(this.query.id); // let merchant = req.getStorage('defaultMerchant');
+				// this.setData({ merchant: merchant });
+				// this.getMerchant();
+			}
+		},
+		onUnload() {
+			if (this.timer) clearInterval(this.timer);
+			this.clearAllTimer();
+		},
+
+		onShareAppMessage: function() {
+			let merchantId = '';
+			let path = '/activity/group/detail/detail?id=' + this.query.id + '&acid=' + this.query.acid + '&isShare=' +
+				true;
+			// console.log(!req.getStorage('userInfo').id);
+
+			if (!req.getStorage('userInfo').id) {} else {
+				path += '&userId=' + req.getStorage('userInfo').id;
+			}
+
+			// console.log(this.query.merchantId);
+			let shopId = '';
+
+
+			if (req.getStorage('MERCHANT') && req.getStorage('MERCHANT').id != null) {
+				path += '&merchantId=' + req.getStorage('MERCHANT').id;
+				merchantId = req.getStorage('MERCHANT').id;
+
+				if (req.getStorage('smallShop') && req.getStorage('MERCHANT').id != null) {
+					path += '&shopId=' + req.getStorage('smallShop').id;
+					shopId = req.getStorage('smallShop').id;
+					merchantId = req.getStorage('smallShop').merchantDTO.id;
+				}
+			}
+			// console.log(path)
+			route.share(1, req.getStorage('userInfo').id, path, merchantId, shopId, 7, this.query.acid + '_' + this
+				.query.id);
+			return {
+				title: this.pro.title,
+				imageUrl: this.pro.pic,
+				path: path
+			}; // return {
+			//   title: this.data.pro.title,
+			//   imageUrl: this.data.pro.pic,
+			//   path: 'activity/group/detail/detail?acid=' + this.query.acid + "&id=" + this.query.id + '&isShare=' + true + '&userId=' + req.getStorage('userInfo').id + '&merchantId=' + this.data.query.merchantId
+			//   // path: '/product/groupDetail/groupDetail?id=' + this.query.id + '&acid=' + this.query.acid + '&isShare=' + true + '&userId=' + req.getStorage('userInfo').id
+			// }
+		},
+
+		onReachBottom() {
+			if (this.is_open_comments == 1 && this.tabIndex == 2) {
+				this.form.page++;
+				this.setData({
+					['form.page']: this.form.page
+				});
+				// this.selectComponent("#list").loadScore(this.current);
+				this.$refs.list.loadScore(this.current);
+			}
+		},
+
+		onHide() {
+			this.clearAllTimer();
+		},
+
+		methods: {
+			bindUser(par){
+				let userInfo = req.getStorage('userInfo');
+				if(!userInfo){
+					// uni.login({
+					// 	success(res) {
+					// 		let params = {
+					// 			code: res.code,
+					// 			parentId: par.userId,
+					// 			merchantId: par.merchantId ? par.merchantId : par.shopId ? par.shopId : ''
+					// 		}
+					// 		return new Promise((resolve,reject)=>{
+					// 			req.postRequest('/api/v2/login', params, data => {
+					// 				resolve();
+					// 			});
+					// 		})
+					// 	}
+					// });
+					// this.isPopupLogin = true;
+					req.silenceLogin(par.userId, par.merchantId ? par.merchantId : par.shopId ? par.shopId : '');
+				}
+			},
+			// 获取用户信息
+			getuserInfo() {
+				let userInfo = req.getStorage('userInfo');
+				if (userInfo && userInfo.listShopBase && userInfo.listShopBase != null && userInfo.listShopBase.length >
+					0) {
+					if (userInfo.listShopBase[0].merchant_id) {
+						let url = '/mine/shop/shop?merchantId=' + userInfo.listShopBase[0].merchant_id + '&shopId=' +
+							userInfo.listShopBase[
+								0].id;
+						this.setData({
+							url: url
+						});
+					}
+					console.log(this.url)
+				}
+			},
+			click(e) {
+				// console.log(e)
+				this.hideShare = e
+			},
+			showShare() {
+				// #ifndef H5
+				req.isLogin().then(success => {
+					if (success) {
+						this.setData({
+							hideShare: false
+						});
+						this.getCodeUrl()
+					}
+				});
+				// #endif
+			},
+
+			/**
+			 * 轮播切换
+			 */
+			swiperChange({
+				detail
+			}) {
+				if (this.current == 0 && this.swiperCurrent > 1) {
+					//卡死时,重置current为正确索引
+					this.setData({
+						current: this.swiperCurrent
+					});
+				} else {
+					//正常轮转时,记录正确页码索引
+					this.setData({
+						swiperCurrent: detail.current
+					});
+				}
+			},
+
+			dotEvent(e) {
+				this.setData({
+					current: e.currentTarget.dataset.current
+				});
+			},
+
+			browsRecound(id) {
+				let from = {
+					bindId: id,
+					type: 7,
+					page: '/activity/group/detail/detail?id=' + this.query.id + '&acid=' + this.query.acid
+				};
+				if (this.query.isShare) {
+					from.shareType = 1;
+					from.page = '/activity/group/detail/detail?id=' + this.query.id + '&acid=' + this.query.acid +
+						'&isShare=' + true;
+
+					if (!this.query.userId) {} else {
+						from.page += '&userId=' + this.query.userId;
+					}
+
+					if (!this.query.merchantId) {} else {
+						from.merchantId = this.query.merchantId;
+					}
+
+					if (!this.query.shopId) {} else {
+						from.shopId = this.query.shopId;
+					}
+
+					if (!this.query.userId) {} else {
+						from.uid = this.query.userId;
+					}
+				}
+
+				if (this.query.isShareTimeline) {
+					from.shareType = 2;
+					from.page = '/activity/group/detail/detail?id=' + this.query.id + '&acid=' + this.query.acid +
+						'&isShareTimeline=' +
+						true;
+
+					if (!this.query.userId) {} else {
+						from.page += '&userId=' + this.query.userId;
+					}
+
+					if (!this.query.merchantId) {} else {
+						from.merchantId = this.query.merchantId;
+					}
+
+					if (!this.query.shopId) {} else {
+						from.shopId = this.query.shopId;
+					}
+
+					if (!this.query.userId) {} else {
+						from.uid = this.query.userId;
+					}
+				}
+				return new Promise((resolve,reject)=>{
+					req.postRequest('/api/browse', from, data => {resolve()});
+				})
+			},
+
+			loadCodeParams() {
+				let _ts = this;
+
+				return new Promise((resolve, reject) => {
+					if (!_ts.scene) {
+						resolve();
+						return false;
+					}
+
+					req.getRequest('/api/code/params', {
+						scene: _ts.scene
+					}, data => {
+						this.query.id = data.scene.split('_')[0];
+						this.query.acid = data.scene.split('_')[1];
+						this.query.merchantId = data.scene.split('_')[2];
+						this.query.shopId = data.scene.split('_')[3];
+						this.query.userId = data.userId;
+						req.setStorage('pidCode', data.userId);
+						resolve();
+					});
+				});
+			},
+
+			getCodeUrl() {
+				let that = this; //获取小程序码
+				const query = this.query;
+				let scene = that.pro.id + '_' + query.acid;
+				if (req.getStorage('MERCHANT') && req.getStorage('MERCHANT').id != null) {
+					scene += '_' + req.getStorage('MERCHANT').id;
+					if (req.getStorage('smallShop') && req.getStorage('MERCHANT').id != null) {
+						scene += '_' + req.getStorage('smallShop').id;
+					}
+				}
+				// console.log(scene); //获取小程序码
+				const params = {
+					page: 'activity/group/detail/detail',
+					scene: scene
+				};
+				req.getRequest('/api/program/codev', params, url => {
+					that.setData({
+						codeUrl: url
+					});
+				});
+			},
+
+			async loadProudct() {
+				let that = this;
+				await that.loadActivity();
+				const query = that.query;
+				let isShowLoading = false;
+
+				if (!isShowLoading) {
+					req.loadIng('加载中');
+					isShowLoading = true;
+				}
+				req.getRequest('/api/product/detail', {
+					id: query.id
+				}, data => {
+					//富文本图片放大
+					var nodes = data.detail;
+
+					// if (nodes) {
+					// 	if (nodes.indexOf("src") >= 0) {
+					// 		//正则匹配所有图片路径
+					// 		var imgs = [];
+					// 		nodes = nodes.replace(/<img [^>]*src=['"]([^'"]+)[^>]*>/gi, function(match, capture) {
+					// 			imgs.push(capture);
+					// 			that.setData({
+					// 				imgs: imgs
+					// 			});
+					// 			return '';
+					// 		});
+					// 	}
+					// }
+					let propertiesList = []
+					if (data.propertiesList && data.propertiesList.length > 0) {
+						data.propertiesList.map(it => {
+							propertiesList.push(it.value);
+						})
+					}
+					data.properties = propertiesList.join(' / ')
+					that.setData({
+						bannerUrls: data.images,
+						pro: data,
+						nodes: nodes,
+						// 'pro.stock': this.act.quantity,
+						'pro.stock': this.act.quantity - this.act.payQuantity,
+						salePrice: data.salePrice,
+						'pro.payQuantity': this.act.payQuantity,
+						'pro.maxBuy': this.act.maxBuy,
+						'pro.salePrice': this.act.money,
+						allShow: true
+					});
+					if (isShowLoading) {
+						uni.hideLoading();
+						isShowLoading = false;
+					}
+					// console.log(this.pro);
+					// that.getCodeUrl();
+				});
+			},
+
+			loadActivity() {
+				const query = this.query;
+				return new Promise((resolve, reject) => {
+					let from = {
+						id: query.acid,
+						type: 3
+					}
+					if (!this.query.merchantId) {} else {
+						from.merchantId = this.query.merchantId
+					}
+					let userInfo = req.getStorage('userInfo');
+					if(userInfo.listShopBase && userInfo.listShopBase.length >0 ){
+						from.shopId = userInfo.listShopBase[0].id;
+					}
+					req.getRequest('/api/activity/detailNew', from, data => {
+						/**
+						 * 判断活动是否结束,结束,2秒后为用户跳转至该商品的详情页面
+						 */
+						// if (data.end) {
+						//   this.setData({ start: data.end })
+						//   console.log(this.data.start)
+						//   wx.showToast({
+						//     title: '活动已结束,两秒后将为您跳转至该商品页面',
+						//     icon: 'none',
+						//     success: function () {
+						//       setTimeout(function () {
+						//         wx.redirectTo({ url: '/product/detail/detail?id=' + data.productId })
+						//       }, 2000);
+						//     }
+						//   })
+						// }
+						// data.activityPurchaseRecordListDTO.content(data.activityPurchaseRecordListDTO)
+						// let arr=data.activityPurchaseRecordListDTO.filter(ele=>console.log(ele))
+						this.getMy();
+						if (!data || data == 2001) {
+							this.setData({
+								activityEnd: true
+							});
+							return false;
+						} else {
+							let activityPurchaseRecordListDTO;
+							let arr;
+
+							if (data.activityPurchaseRecordListDTO) {
+								activityPurchaseRecordListDTO = data.activityPurchaseRecordListDTO.slice(0,
+									2);
+								arr = data.activityPurchaseRecordListDTO.slice(0, 21);
+								// console.log(arr,"789");
+							}
+
+							// console.log(data.activityPurchaseRecordListDTO);
+							this.setData({
+								act: data,
+								isRemind: data.remindId
+							});
+							this.setData({
+								activityPurchaseRecordListDTO: activityPurchaseRecordListDTO,
+								activityDot: arr
+							});
+							// console.log(this.activityPurchaseRecordListDTO, this
+							// 	.activityPurchaseRecordListDTO);
+							this.checkMyIsGroup();
+							this.initTimer(data);
+							this.groupItemTimer(1);
+							this.groupItemTimer();
+						}
+
+						resolve();
+					});
+				});
+			},
+			// 获取用户信息
+			getuserInfos(data) {
+				let userInfo = req.getStorage('userInfo');
+				if (userInfo && userInfo.listShopBase && userInfo.listShopBase != null && userInfo.listShopBase.length >
+					0) {
+					if (userInfo.listShopBase[0].merchant_id == data.id && data.type != 5) {
+						let url = '/mine/shop/shop?merchantId=' + userInfo.listShopBase[0].merchant_id + '&shopId=' + userInfo.listShopBase[0].id;
+						this.url = url;
+						this.ascription = true;
+					}
+				}
+			},
+			getMy() {
+				let that = this;
+				let userInfo = req.getStorage('userInfo');
+				if(!userInfo || userInfo == null) return false;
+				req.getRequest('/api/user/my', {}, data => {
+					that.isDistriUser = data.isDistriUser;
+				});
+			},
+
+			//组团倒计时
+			groupItemTimer(type) {
+				// this.clearAllTimer();
+				//社区拼图定时器
+				let _ts = this;
+
+				let group;
+
+				if (type == 1) {
+					group = this.activityPurchaseRecordListDTO;
+				} else {
+					group = this.activityDot;
+				}
+
+				if (group && group.length > 0) {
+					let pageList = group;
+
+					for (let i = 0, len = pageList.length; i < len; i++) {
+						let group = pageList[i]; // let startTime = new Date(group.startTime.replace(/-/g, '/')).getTime();
+
+						let nowTime = new Date(this.act.nowTime.replace(/-/g, '/')).getTime();
+						let endTime = new Date(group.endDate.replace(/-/g, '/'))
+							.getTime(); // let actend=new Date(this.data.act.endTime.replace(/-/g, '/')).getTime();
+						// if (!group.start) endTime = startTime;
+						// let times
+						// if(actend-endTime>0){
+						//    times = parseInt((endTime - nowTime) / 1000);
+						// }else{
+						//   times = parseInt((actend - nowTime) / 1000);
+						// }
+
+						let times = parseInt((endTime - nowTime) / 1000);
+						let timer = setInterval(() => {
+							times--;
+							let data = {};
+
+							if (times < 0) {
+								if (type == 1) {
+									data['activityPurchaseRecordListDTO[' + i + '].isGroup'] = false;
+								} else {
+									data['activityDot[' + i + '].isGroup'] = false;
+								} // this.setData({isGroup:false})
+
+							} else if (times === 0) {
+								//重新加载列表
+								clearInterval(timer);
+							} else {
+								let n = utils.formatDayTimes(times);
+
+								if (type == 1) {
+									data['activityPurchaseRecordListDTO[' + i + '].times'] = n;
+									data['activityPurchaseRecordListDTO[' + i + '].isGroup'] = true;
+								} else {
+									data['activityDot[' + i + '].times'] = n;
+									data['activityDot[' + i + '].isGroup'] = true;
+								}
+							}
+
+							_ts.setData(data);
+						}, 1000);
+						let fs = [];
+
+						if (type == 1) {
+							fs['activityPurchaseRecordListDTO[' + i + '].timer'] = timer;
+						} else {
+							fs['activityDot[' + i + '].timer'] = timer;
+						}
+
+						_ts.setData(fs);
+					}
+				}
+			},
+
+			clearAllTimer() {
+				if (this.activityPurchaseRecordListDTO) {
+					this.activityPurchaseRecordListDTO.forEach(it => {
+						// console.log(it);
+						clearInterval(it.timer);
+						clearInterval(it.times);
+					});
+				}
+
+				if (this.activityDot) {
+					this.activityDot.forEach(it => {
+						// console.log(it);
+						clearInterval(it.timer);
+						clearInterval(it.times);
+					});
+				}
+			},
+
+			initTimer(group) {
+				//计时器
+				let _ts = this;
+
+				let nowTime = new Date(group.nowTime.replace(/-/g, '/')).getTime();
+				let startTime = new Date(group.startTime.replace(/-/g, '/')).getTime();
+				let endTime = new Date(group.endTime.replace(/-/g, '/')).getTime();
+				if (!group.start) endTime = startTime;
+				let times = parseInt((endTime - nowTime) / 1000);
+				let data = {}; //判断是否已开始
+
+				if (nowTime - startTime > 0) {
+					//开始了
+					_ts.setData({
+						isStates: 1
+					});
+				} else {
+					//未开始
+					_ts.setData({
+						isStates: 0
+					});
+				}
+
+				_ts.setData(data);
+
+				if (times > 0) {
+					this.timer = setInterval(() => {
+						times--;
+
+						if (times === 0) {
+							//重新加载列表
+							_ts.setData({
+								'act.end': true
+							});
+
+							return false;
+						}
+
+						let n = utils.formatDayTimes(times);
+
+						_ts.setData({
+							timer: n.split(/:|天/g)
+						});
+					}, 1000);
+				} else {
+					_ts.setData({
+						isStates: 2
+					});
+				}
+			},
+
+
+			loadDefaultAddress() {
+				if (req.isAuth()) {
+					req.g('/api/address/default', data => {
+						if (data) this.setData({
+							address: data
+						});
+						else this.pointLocation();
+					}, true);
+				} else {
+					this.pointLocation();
+				}
+			},
+
+			toAddress() {
+				app.globalData.openPage('mine/address/address');
+			},
+
+			toMerchant() {
+				if (this.about.User_Limit_Store == 1) {
+
+				} else {
+					app.globalData.openPage('pages/nearby/nearby?isChoose=true');
+				}
+			},
+
+
+			pointLocation() {
+				//定位当前位置
+				let _ts = this;
+
+				QQMapWX.initMap();
+				req.getLocation(res => {
+					QQMapWX.reverseGeocoder(res, data => {
+						_ts.setData({
+							['address.address']: data.address
+						});
+					});
+				});
+			},
+
+			atOnceBuy() {
+				//立即购买
+				// console.log("立即购买"); // if (this.data.isStates == 0) return req.msg('活动还未开始');
+				// if (this.data.isStates == 2) return req.msg('活动已结束');
+				// if (this.data.start) return req.msg('活动已结束');
+
+				let popup = this.pro;
+				popup.salePrice = this.salePrice;
+				popup.stock = this.pro.stock;
+				this.setData({
+					isShow: true,
+					popup: popup
+				});
+			},
+
+			//创建拼团
+			createGroup() {
+				req.isLogin().then(success => {});
+				if (!req.getStorage('userInfo')) return false;
+				// console.log(this.start);
+				if (this.start) return req.msg(
+					'活动已结束'); //state 1存在记录,2不存在,id创建团时存在则为已创建过团记录id,未创建则为-1    参与团id返回为传入的superiorId
+
+				if (this.myActData.state == 1) {
+					//存在拼团记录
+					this.jumpGoGroup(this.myActData.id);
+				} else {
+					//不存在,去创建
+					req.postRequest('/api/activity/carterActivityPurchaseRecords', {
+						acpId: this.act.id,
+						type: 3
+					}, res => {
+						// this.jumpGoGroup(res);
+						// this.atOnceBuy(res)
+						this.createGroupOrder(res);
+					});
+				}
+			},
+
+			createGroupOrder(aprId) {
+				const params = {
+					skuId: this.act.skuId,
+					quantity: 1,
+					productId: this.act.productId,
+					aprId: aprId
+				};
+
+				if (this.merchant && this.merchant.type != 5) {
+					params.merchantId = this.merchant.id;
+				}
+
+				if (this.merchant && this.merchant.type == 5) {
+					params.merchantId = this.merchant.merchantDTO.id
+					params.shopId = this.merchant.id;
+				}
+
+				if (this.act.id) params.activityId = this.act.id;
+				req.postRequest('/api/purchase/direct/buy', params, res => {
+					let redirect = '/product/subOrder/subOrder?ids=' + res;
+					redirect += '&orderType=' + 4;
+					redirect += '&aprId=' + aprId;
+					redirect += '&activityId=' + this.act.id;
+
+					if (params.merchantId) {
+						redirect += '&merchantId=' + params.merchantId;
+					}
+
+					if (params.shopId) {
+						redirect += '&shopId=' + params.shopId;
+					}
+
+					uni.navigateTo({
+						url: redirect
+					});
+				});
+			},
+
+			//校验是否开团
+			checkMyIsGroup() {
+				req.getRequest('/api/activity/participationActivity', {
+					acpId: this.act.id,
+					actId: this.act.actId,
+					productId: this.act.productId,
+					type: 3,
+					initOrPart: 1
+				}, res => {
+					this.setData({
+						myActData: res
+					});
+				});
+			},
+
+			toGoGroup(event) {
+				// req.isLogin().then(success => {
+				// })
+				const index = event.currentTarget.dataset.index;
+				const type = event.currentTarget.dataset.type;
+				let activityPurchaseRecord;
+
+				if (type == 1) {
+					activityPurchaseRecord = this.activityDot[index];
+				} else {
+					activityPurchaseRecord = this.activityPurchaseRecordListDTO[index];
+				}
+
+				// console.log(index, activityPurchaseRecord, type);
+				this.jumpGoGroup(activityPurchaseRecord.id);
+			},
+
+			//跳入到平团详情
+			jumpGoGroup(groupId) {
+				app.globalData.openPage('activity/group/ptDetail/ptDetail?acid=' + this.act.id + "&id=" + groupId +
+					"&merchantId=" +
+					this.query.merchantId);
+			},
+
+			addActivityRemind() {
+
+				req.postRequest('/api/activity/remind', {
+					activityId: this.act.id
+				}, res => {
+					requsetmessage.remind();
+					req.msg('订阅提醒成功');
+					this.setData({
+						isRemind: true
+					});
+				});
+			},
+
+			cancelActivityRemind(event) {
+				if (req.header.appId == 'ZQ1VK5oc17I387E') {
+
+				} else {
+					req.postRequest('/api/activity/cancel/remind', {
+						id: this.act.id
+					}, res => {
+						req.msg('取消提醒成功');
+						this.setData({
+							isRemind: false
+						});
+					});
+				}
+			},
+
+			hidePopup() {
+				this.setData({
+					isShow: false
+				});
+			},
+			hidePopupLogin(data) {
+				this.isPopupLogin = false;
+			},
+
+			clickCollect() {
+				let _ts = this;
+
+				req.postRequest('/api/collect', {
+					bindId: this.pro.id,
+					type: 1
+				}, data => {
+					_ts.setData({
+						'pro.isCollect': !_ts.pro.isCollect
+					});
+				});
+			},
+
+			goTop: function(e) {
+				// 一键回到顶部
+				if (uni.pageScrollTo) {
+					uni.pageScrollTo({
+						scrollTop: 0
+					});
+				} else {
+					uni.showModal({
+						title: '提示',
+						content: '当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。'
+					});
+				}
+			},
+
+			onShareTimeline() {
+				let merchantId = '';
+				let path = 'id=' + this.query.id + '&acid=' + this.query.acid + '&isShareTimeline=' + true;
+
+				if (!req.getStorage('userInfo').id) {} else {
+					path += '&userId=' + req.getStorage('userInfo').id;
+				}
+				let shopId = '';
+
+
+				if (req.getStorage('MERCHANT') && req.getStorage('MERCHANT').id != null) {
+					path += '&merchantId=' + req.getStorage('MERCHANT').id;
+					merchantId = req.getStorage('MERCHANT').id;
+
+					if (req.getStorage('smallShop') && req.getStorage('MERCHANT').id != null) {
+						path += '&shopId=' + req.getStorage('smallShop').id;
+						shopId = req.getStorage('smallShop').id;
+						merchantId = req.getStorage('smallShop').merchantDTO.id;
+					}
+				}
+				let url = '/activity/group/detail/detail?' + path;
+				route.share(2, req.getStorage('userInfo').id, url, merchantId, shopId, 7, this.query.acid + '_' + this
+					.query.id);
+				return {
+					title: (req.getStorage("userInfo").nickName ? req.getStorage("userInfo").nickName : '') + '邀请您参加拼团:' +
+						this.pro.title,
+					query: path,
+					imageUrl: this.pro.pic
+				}; // return {
+				//   title: this.data.pro.title,
+				//   imageUrl: this.data.pro.pic
+				// }
+			},
+
+			// 获取参团活动总人数
+			groupCount() {
+				let param = {
+					aprId: this.query.acid
+				};
+				req.getRequest('/api/activity/groupCount', param, data => {
+					this.setData({
+						count: data
+					});
+				});
+			},
+
+			// 是否开启小店
+			isShop() {
+				if (req.getStorage('distribution')) {
+					dist = req.getStorage('distribution')
+					this.setData({
+						distr: dist
+					})
+					console.log(dist)
+					if (dist.distributionSmallShopOpen == 1) {
+						req.postRequest('/api/shopBase/isOpenShop', {}, data => {
+							this.setData({
+								isshop: data
+							})
+							console.log(data)
+						})
+					}
+				}
+			},
+			addShop() { //添加到小店
+				req.postRequest('/api/shopProduct/save', {
+					productId: this.act.id,
+					type: 4
+				}, data => {
+					this.act.isJoinShop = true;
+					this.isHide = false;
+				})
+			},
+			hidePop() { //添加到小店
+				this.setData({
+					isHide: true
+				})
+			},
+			clickmore() {
+				// let arrayShow = [];
+				// let index = 0;
+				// for (let i = index; i < index + 5; i++) {
+				//   if (this.data.activityPurchaseRecordListDTO[i]) {
+				//     arrayShow.push(this.data.activityPurchaseRecordListDTO[i]);
+				//     index = i;
+				//   }
+				// }
+				// index = index + 1;
+				// if(arrayShow.length>=20){
+				//   return req.msg("仅显示20个正在拼团的人")
+				// }
+				// this.setData({arrayShow:arrayShow})
+				// this.groupItemTimer()
+				// console.log("123",this.activityDot)
+				this.getPage();
+				this.setData({
+					show: true
+				});
+			},
+
+			eliminate() {
+				this.setData({
+					show: false
+				});
+			},
+
+			getPage() {
+				//获取系统信息:获取当前屏幕可见区域的宽和高
+				let that = this;
+				uni.getSystemInfo({
+					success: function(res) {
+						that.setData({
+							"windowWidth": res.windowWidth,
+							//可使用窗口宽度,单位px
+							"windowHeight": res.windowHeight //可使用窗口高度,单位px
+
+						});
+						// console.log(res.windowWidth, that.windowWidth);
+						// console.log(res.windowHeight, that.windowHeight);
+					}
+				});
+			},
+
+			showTab: function(e) {
+				this.setData({
+					tabIndex: e.detail
+				});
+			},
+			scoreTab: function(e) {
+				this.form.page = 0;
+				this.setData({
+					current: e.detail,
+					['form.page']: 1
+				});
+			},
+			freshenFun: function(e) {
+				this.setData({
+					freshen: e.detail
+				});
+			},
+
+			// 获取品种保证
+			getGuarantee() {
+				return new Promise((data, rej) => {
+					req.getRequest('/api/config', {}, res => {
+						req.setStorage("configRes", JSON.stringify(res))
+						this.about = res
+						data(res)
+						if (this.merchant && this.merchant.isDefault == 1 || this.query.acid) {
+							// 切割;拿到数组,然后在过滤掉空值
+							if (res.b2c_service_guarantee && res.b2c_service_guarantee != null) {
+								this.setData({
+									guarantee: res.b2c_service_guarantee.split(";").filter(it => {
+										return it = it && it.trim();
+									})
+								});
+							}
+						} else {
+							if (res.o2o_service_guarantee && res.b2c_service_guarantee != null) {
+								this.setData({
+									guarantee: res.o2o_service_guarantee.split(";").filter(it => {
+										return it = it && it.trim();
+									})
+								});
+							}
+						} // if(res.Is_Store_Price_Stock){
+						//   this.setData({Is_Store_Price_Stock:res.Is_Store_Price_Stock})
+						// }
+						if (res.is_open_shop) {
+							this.is_open_shop = res.is_open_shop;
+						}
+
+						if (res.is_open_comments) {
+							this.setData({
+								is_open_comments: res.is_open_comments
+							});
+						} // this.setData({ show_membership_price: res.show_membership_price, Is_Store_Price_Stock: res.Is_Store_Price_Stock, is_open_shop: res.is_open_shop })
+
+					});
+				})
+			}
+
+		}
+	};
+</script>
+<style>
+	@import "./detail.css";
+</style>

+ 28 - 0
activity/group/index/index.css

@@ -0,0 +1,28 @@
+/* group/index/index.wxss */
+page{background: #fe5c31;}
+.banner image{width: 100%;}
+.con{padding: 0 20rpx 50rpx;position: relative;z-index: 2;margin-top: -110rpx;}
+.tab .li{width: 50%;align-items: center;justify-content: center;background: #FD4033;height: 80rpx;border-radius: 12rpx 12rpx 0 0;font-size: 28rpx;color: #fff;}
+.tab .li .icon{color: #fff;margin-right: 12rpx;}
+.tab .on{background: #fff;color: #FE0419;}
+.tab .on .icon{color: #FE0419;}
+.pintuan{padding-bottom: 10rpx;padding-top: 10rpx;border-radius: 0 0 12rpx 12rpx;}
+.pintuan .li{border-bottom: 2rpx solid #E8E8E8;padding: 20rpx 0;}
+.pintuan .li:last-child{border-bottom: 0;}
+.pinimgs{box-sizing: border-box;width: 210rpx;height: 210rpx;border-radius: 10rpx;margin-right: 20rpx;border: 2rpx solid #E5E5E5;position: relative;}
+.pinimg{display: block;width: 100%;height: 100%;border-radius: 10rpx;}
+.proname{font-size: 28rpx;color: #333;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;}
+.endtime{display: inline-block;height: 32rpx;line-height: 32rpx;border: 2rpx solid #FE0419;border-radius: 6rpx;padding: 0 8rpx;font-size: 24rpx;color: #FE0419;margin: 15rpx 0 45rpx;}
+.endtimes{display: inline-block;height: 32rpx;line-height: 32rpx;border-radius: 6rpx;padding: 0 8rpx;font-size: 24rpx;color: #FE0419;margin: 15rpx 0 65rpx;}
+.wei{color: #333;border-color: #333;}
+.operate{justify-content: space-between;align-items: center;}
+.price{font-size: 24rpx;color: #FE0419;}
+.price text{font-size: 36rpx;font-weight: bold;}
+.price .del{font-weight: normal;font-size: 24rpx;color: #999;text-decoration: line-through;}
+.remind{width: 150rpx;height: 50rpx;border-radius: 25rpx;font-size: 24rpx;color: #fff;text-align: center;line-height: 50rpx;align-items: center;justify-content: center;}
+.remind icon{margin-right: 10rpx;font-size: 24rpx;}
+.tuan{display: block;width: 87rpx;height: 44rpx;font-size: 22rpx;color: #fff;text-align: center;line-height: 34rpx;position: absolute;top: 21rpx;left: -10rpx;}
+.tuan image{display: block;width: 100%;height: 100%;position: absolute;top: 0;left: 0;}
+.tuan text{position: relative;z-index: 2;display: block;}
+.pininfo{overflow: hidden;}
+.del{font-weight: normal;font-size: 24rpx;color: #999;text-decoration: line-through;}

+ 362 - 0
activity/group/index/index.vue

@@ -0,0 +1,362 @@
+<template>
+	<view>
+		<!--group/index/index.wxml-->
+		<view class="banner">
+			<image src="/activity/static/activity/images/ptban.jpg" mode="widthFix"></image>
+		</view>
+		<view class="con">
+			<view class="tab dflex">
+				<view :class="'li dflex ' + (tabIndex==1?'on':'')" data-index="1" @tap="clickTab">
+					<icon class="icon iconfont icon-hot"></icon>
+					<text>今日拼团</text>
+				</view>
+				<view :class="'li dflex ' + (tabIndex==2?'on':'')" data-index="2" @tap="clickTab">
+					<icon class="icon iconfont icon-yugao"></icon>
+					<text>明日预告</text>
+				</view>
+				<view :class="'li dflex ' + (tabIndex==3?'on':'')" data-index="3" @tap="clickTab">
+					<icon class="icon iconfont icon-yugao"></icon>
+					<text>全部</text>
+				</view>
+			</view>
+			<view class="pintuan pdlr20 bgfff" v-if="pageList.length>0">
+				<view v-for="(item, index) in pageList" :key="index" class="li">
+					<view class="dflex" :data-index="index">
+						<view class="pinimgs" @tap="toGroupRemind" :data-index="index">
+							<image :src="item.pic" mode="aspectFit" class="pinimg" lazy-load="true"></image>
+							<view class="tuan">
+								<image src="/static/pages/images/tagbg.png"></image>
+								<text>{{item.activityMainEntity.numberPeople}}人团</text>
+							</view>
+						</view>
+						<view class="pininfo flex">
+							<view class="proname" @tap="toGroupRemind" :data-index="index">{{item.productName}}</view>
+							
+								<view :class="[item.start==false||item.end==true? 'wei' : '',item.times?'endtime':'endtimes']" @tap="toGroupRemind"
+									:data-index="index">
+									<block v-if="item.times">
+										{{item.start==false? '距开始': item.end==false?'距结束':'已结束'}}
+										{{item.times?item.times:''}}
+									</block>
+								</view>
+							<view class="del" @tap="toGroupRemind" :data-index="index"
+								v-if="item.marketPrice<item.money&&item.marketPrice!=0">¥{{item.marketPrice}}</view>
+							<view class="operate dflex">
+								<view class="price" @tap="toGroupRemind" :data-index="index">
+									拼团价¥<text>{{item.money}}</text></view>
+								<view class="add-cart">
+									<view class="remind mbglinear dflex" v-if="item.start==true&&item.end==false"
+										@tap="toGroupRemind" :data-index="index">立即开团</view>
+									<block v-else>
+										<view class="remind mbggreen dflex"
+											v-if="item.start==false&&item.end==false&&item.isRemind"
+											@tap="cancelActivityRemind" :data-index="index">取消预约</view>
+										<view class="remind mbggreen dflex"
+											v-if="item.start==false&&item.end==false&&!item.isRemind"
+											@tap="addActivityRemind" :data-index="index">
+											<icon class="iconfont icon-yugao"></icon>预约提醒
+										</view>
+									</block>
+								</view>
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+			<view class="nodata nosp bgfff" v-if="ishow">
+				<image :src="picUrlss+'empty_sp.png'"></image>
+				<text>暂无商品</text>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	// group/index/index.js
+	const app = getApp();
+	const req = require("../../../utils/request.js");
+	const utils = require("../../../utils/util.js");
+	const requsetmessage = require("../../../utils/requestmessage.js");
+
+	export default {
+		data() {
+			return {
+				picUrlss: req.public.picUrls,
+				form: {
+					page: 1,
+					limit: 10
+				},
+				pageList: [],
+				isLoad: true,
+				hasmore: true,
+				tabIndex: 1,
+				ishow: false
+			};
+		},
+
+		components: {},
+		props: {},
+
+		onLoad(options) {
+			this.query = options;
+			// console.log(options);
+		},
+
+		onShow: function() {
+			this.isLoad = true, this.form.page = 1;
+			this.setData({
+				pageList: []
+			});
+			this.getList(this.tabIndex); // console.log("=======================")
+		},
+		onReachBottom: function() {
+			// console.log(this.data.pageList.length)
+			// if (this.data.pageList.length >= 10) {
+			// console.log("111111111111")
+			this.form.page++;
+			this.getList(this.tabIndex); // }
+		},
+
+		onUnload() {
+			this.clearAllTimer();
+		},
+
+		onHide() {
+			this.clearAllTimer();
+		},
+
+		methods: {
+			clickTab(event) {
+				const index = event.currentTarget.dataset.index;
+				this.setData({
+					tabIndex: index,
+					'form.page': 1
+				});
+				this.isLoad = true,
+					this.getList(index);
+				this.clearAllTimer();
+			},
+
+			getList(dayType) {
+				let isShowLoading = false;
+
+				if (this.form.page == 1 && !isShowLoading) {
+					req.loadIng('加载中');
+					isShowLoading = true;
+				}
+
+				// console.log(this.isLoad);
+				let that = this;
+				if (!this.isLoad) return false;
+				this.isLoad = false;
+				that.form.dayType = dayType;
+				if (dayType == 3) {
+					delete that.form.dayType
+				}
+				if (this.query.merchantId) {
+					that.form.merchantId = this.query.merchantId;
+				} else if (req.getStorage('MERCHANT')) {
+					that.form.merchantId = req.getStorage('MERCHANT').id;
+				} // if (this.query.type == 4) {
+				// 	that.data.form.type = '4'
+				// 	req.getRequest('/api/shopProduct/list', that.data.form, data => {
+				// 		// console.log(data,data.length)
+				// 		if (data && data.list.length >= 10) that.data.isLoad = true;
+				// 		if (that.data.form.page > 1) data.list = that.data.pageList.concat(data.list);
+				// 		data = data.list.map(it => {
+				// 			it.isRemind = it.remindId;
+				// 			return it
+				// 		});
+				// 		console.log(data);
+				// 		let arrObjFilter = data.filter(ele => ele.end == false)
+				// 		that.setData({
+				// 			pageList: arrObjFilter
+				// 		})
+				// 		console.log(that.data.pageList)
+				// 		if (this.data.pageList.length <= 0) {
+				// 			that.setData({
+				// 				ishow: true
+				// 			})
+				// 		} else {
+				// 			that.setData({
+				// 				ishow: false
+				// 			})
+				// 		}
+				// 		if (isShowLoading) {
+				// 			wx.hideLoading()
+				// 			isShowLoading = false;
+				// 		}
+				// 		that.initGroupTimer();
+				// 	})
+				// } else {
+
+
+				that.form.type = '3';
+				req.getRequest('/api/activity/listNew', that.form, data => {
+					// console.log(data,data.length)
+					if (data && data.list.length >= 10) that.isLoad = true;
+					// console.log(that.form.page);
+					if (that.form.page > 1) data.list = that.pageList.concat(data.list);
+					data = data.list.map(it => {
+						it.isRemind = it.remindId;
+						return it;
+					});
+					// console.log(data); // let arrObjFilter = data.filter(ele => ele.end==false)
+					// let res=arrObjFilter.filter(it=>it.id)
+
+					// console.log(data);
+					that.setData({
+						pageList: data
+					});
+					// console.log(that.pageList);
+
+					if (this.pageList.length <= 0) {
+						that.setData({
+							ishow: true
+						});
+					} else {
+						that.setData({
+							ishow: false
+						});
+					}
+
+					if (isShowLoading) {
+						uni.hideLoading();
+						isShowLoading = false;
+					}
+
+					that.initGroupTimer();
+				}); // }
+
+				// console.log(that.isLoad);
+			},
+
+			initGroupTimer() {
+				//社区拼图定时器
+				let _ts = this;
+
+				if (this.pageList && this.pageList.length > 0) {
+					let pageList = this.pageList;
+					const initPage = (parseInt(this.form.page) - 1) * 10;
+
+					for (let i = initPage, len = pageList.length; i < len; i++) {
+						let group = pageList[i];
+						let nowTime = new Date(group.nowTime.replace(/-/g, '/')).getTime();
+						let startTime = new Date(group.startTime.replace(/-/g, '/')).getTime();
+						let endTime = new Date(group.endTime.replace(/-/g, '/')).getTime();
+						if (!group.start) endTime = startTime;
+						let times = parseInt((endTime - nowTime) / 1000);
+						let data = {}; //判断是否已开始
+
+						if (nowTime - startTime > 0) {
+							//开始了
+							data['pageList[' + i + '].isStates'] = 1;
+						} else {
+							//未开始
+							data['pageList[' + i + '].isStates'] = 0;
+						}
+
+						_ts.setData(data); //判断是否为负数,为负数则表示已经结束
+
+
+						if (times > 0) {
+							let timer = setInterval(() => {
+								times--;
+								let data = {};
+
+								if (times === 0) {
+									//重新加载列表
+									data['pageList[' + i + '].end'] = true;
+									clearInterval(timer);
+								} else {
+									let n = utils.formatDayTimes(times);
+									data['pageList[' + i + '].times'] = n;
+								}
+
+								_ts.setData(data);
+							}, 1000);
+							let fs = [];
+							fs['pageList[' + i + '].timer'] = timer;
+
+							_ts.setData(fs);
+						} else {
+							//已经结束
+							data['pageList[' + i + '].times'] = group.endTime;
+							data['pageList[' + i + '].isStates'] = 2;
+
+							_ts.setData(data);
+						}
+					}
+				}
+			},
+
+			toGroupRemind(event) {
+				const index = event.currentTarget.dataset.index;
+				const activity = this.pageList[index];
+				let merchantId;
+
+				if (this.query.merchantId) {
+					merchantId = this.query.merchantId;
+				} else if (req.getStorage('MERCHANT')) {
+					merchantId = req.getStorage('MERCHANT').id;
+				}
+				let url='activity/group/detail/detail?acid=' + activity.id + "&id=" + activity
+						.productId
+				if(!merchantId){
+					
+				}else{
+					url+="&merchantId=" + merchantId
+				}
+				
+				if (this.query.type == 4) {
+					app.globalData.openPage('activity/group/detail/detail?acid=' + activity.id + "&id=" + activity
+						.productId +
+						'&hideShop=' + false);
+				} else {
+					app.globalData.openPage(url);
+				}
+			},
+
+			clearAllTimer() {
+				this.pageList.forEach(it => clearInterval(it.timer));
+			},
+
+			addActivityRemind(event) {
+				const index = event.currentTarget.dataset.index;
+				const page = this.pageList[index];
+
+				req.postRequest('/api/activity/remind', {
+					activityId: page.id
+				}, res => {
+					// requsetmessage.distribution()
+					requsetmessage.remind();
+					req.msg('添加提醒成功');
+					let data = {};
+					data['pageList[' + index + '].isRemind'] = true;
+					this.setData(data);
+				});
+			},
+
+			cancelActivityRemind(event) {
+				const index = event.currentTarget.dataset.index;
+				const page = this.pageList[index];
+				if (req.header.appId == 'ZQ1VK5oc17I387E') {
+
+				} else {
+					req.postRequest('/api/activity/cancel/remind', {
+						id: page.id
+					}, res => {
+						req.msg('取消提醒成功');
+						let data = {};
+						data['pageList[' + index + '].isRemind'] = false;
+						this.setData(data);
+					});
+				}
+			}
+
+		}
+	};
+</script>
+<style>
+	@import "./index.css";
+</style>

+ 58 - 0
activity/group/ptDetail/ptDetail.css

@@ -0,0 +1,58 @@
+/* group/ptDetail/ptDetail.wxss */
+page{background: #FFEAD4;}
+.banner image{width: 100%;}
+.con{position: relative;z-index: 1;padding: 0 20rpx 50rpx;margin-top: -330rpx;}
+.info{background: #fff;border-radius: 12rpx;padding: 30rpx 20rpx;}
+.pinimgs{box-sizing: border-box;width: 180rpx;height: 180rpx;border-radius: 10rpx;margin-right: 30rpx;border: 2rpx solid #E5E5E5;position: relative;}
+.pinimg{display: block;width: 100%;height: 100%;border-radius: 10rpx;}
+.tuan{display: block;width: 87rpx;height: 44rpx;font-size: 22rpx;color: #fff;text-align: center;line-height: 34rpx;position: absolute;top: 21rpx;left: -10rpx;}
+.tuan image{display: block;width: 100%;height: 100%;position: absolute;top: 0;left: 0;}
+.tuan text{position: relative;z-index: 2;display: block;}
+.proname{font-size: 28rpx;color: #333;}
+.guige{font-size: 24rpx;color: #999;margin-top: 5rpx;}
+.sta{align-items: center;justify-content: space-between;margin-top: 30rpx;}
+.price{font-size: 37rpx;color: #FE0419;}
+.price text{font-size: 25rpx;}
+.price text.del{font-size: 24rpx;color: #999;margin-left: 16rpx;text-decoration: line-through;}
+.nums{font-size: 30rpx;color: #333;}
+.cantuan{padding: 35rpx 55rpx 40rpx;}
+.can-info{text-align: center;font-size: 40rpx;color: #333;}
+.can-info text{font-size: 43rpx;color: #FE0419;}
+.sheng{align-items: center;justify-content: center;font-size: 22rpx;color: #333;margin-top: 25rpx;}
+.sheng::before,.sheng::after{content: '';display: block;width: 110rpx;height: 2rpx;background: #FD4D36;}
+.sheng::before{margin-right: 16rpx;}
+.sheng::after{margin-left: 16rpx;}
+.sheng-time{font-size: 22rpx;color: #FD4D36;align-items: center;}
+.sheng-time text{display: block;width: 36rpx;height: 36rpx;border-radius: 6rpx;background: #FD5238;font-size: 22rpx;color: #fff;text-align: center;line-height: 36rpx;margin: 0 10rpx;}
+.can-infos{flex-wrap: wrap;padding: 0 35rpx;}
+.can-infos .li{width: 90rpx;height: 90rpx;position: relative;margin-right: 20rpx;margin-top: 55rpx;position: relative;}
+.can-infos .li:nth-child(5n){margin-right: 0;}
+.can-bg{width: 86rpx;height: 86rpx;margin: 1rpx auto;}
+.can-user{position: absolute;top: 0;left: 0;width: 90rpx;height: 90rpx;border-radius: 50%;}
+.can-infos .li text{display: block;width: 78rpx;height: 32rpx;border-radius: 17rpx;border: 2rpx solid #fff;background: #FD4534;font-size: 20rpx;color: #fff;text-align: center;line-height: 32rpx;position: absolute;left: 50%;transform: translateX(-50%);bottom: -12rpx;}
+.can-btn{height: 90rpx !important;border-radius: 45rpx !important;font-size: 30rpx;color: #fff;text-align: center;line-height: 90rpx !important;margin-top: 50rpx !important;}
+.kai-btn{height: 86rpx;border-radius: 45rpx;font-size: 30rpx;color: #FE0419;border: 2rpx solid #FE0419;text-align: center;line-height: 86rpx;margin-top: 20rpx;}
+.tab{height: 104rpx;border-bottom: 2rpx solid #E8E8E8;}
+.tab .li{font-size: 26rpx;color: #999;width: 33.33%;text-align: center;line-height: 104rpx;position: relative;}
+.tab .on{font-size: 28rpx;color: #333;}
+.tab .on::after{content: '';display: block;width:130rpx;height:4rpx;background:linear-gradient(359deg,rgba(240,73,39,1) 0%,rgba(255,142,78,1) 100%);position: absolute;bottom: 0;left: 50%;transform: translateX(-50%);}
+.det-text{padding: 20rpx 30rpx;word-break: break-all;}
+.details .rich-img{width: 100%;}
+.details .img{width: 100%;}
+.friend .li{border-bottom: 2rpx solid #E8E8E8;padding: 28rpx 20rpx;align-items: center;}
+.friend .li:last-child{border-bottom: none;}
+.timg{position: relative;margin-right: 20rpx;}
+.timg image{width: 90rpx;height: 90rpx;border-radius: 50%;}
+.timg text{display: block;width: 78rpx;height: 32rpx;border-radius: 17rpx;border: 2rpx solid #fff;background: #FD4534;font-size: 20rpx;color: #fff;text-align: center;line-height: 32rpx;position: absolute;left: 50%;transform: translateX(-50%);bottom: -12rpx;}
+.name{font-size: 28rpx;color: #333;margin-right: 20rpx;}
+.time{font-size: 24rpx;color: #999;}
+.guize{font-size: 24rpx;line-height: 40rpx;padding: 30rpx;}
+
+.show{display: block;}
+.hide{display: none;}
+
+
+/* 拼团状态 */
+.status{padding: 70rpx 55rpx 60rpx;}
+.status-c{text-align: center;font-size: 30rpx;color: #999;}
+.status-c image{width: 219rpx;height: 147rpx;margin: 0 auto 45rpx;}

+ 413 - 0
activity/group/ptDetail/ptDetail.vue

@@ -0,0 +1,413 @@
+<template>
+<view>
+<!--group/ptDetail/ptDetail.wxml-->
+<view class="banner">
+	<image src="/activity/static/activity/images/ptban1.jpg" mode="widthFix"></image>
+</view>
+<view class="con">
+	<view class="info dflex" @tap="goPrcdetail">
+		<view class="pinimgs">
+			<image :src="actData.acProduc.pic" mode="aspectFit" class="pinimg"></image>
+			<view class="tuan">
+				<image src="/static/pages/images/tagbg.png"></image>
+				<text>{{actData.activityMain.numberPeople}}人团</text>
+			</view>
+		</view>
+		<view class="pininfo flex">
+			<view class="proname">{{actData.acProduc.productName}}</view>
+			<view class="guige"></view>
+			<view class="sta dflex">
+				<view class="price"><text>¥</text>{{actData.acProduc.money}}<text class="del" v-if="actData.acProduc.marketPrice!=0&&actData.acProduc.marketPrice>actData.acProduc.money">原价:{{actData.acProduc.marketPrice}}</text></view>
+				<!-- <view class="nums">×1</view> -->
+			</view>
+		</view>
+	</view>
+
+	<!-- 0进行中  1标识拼团成功正常结束   2拼团特有状态,此状态下拼团未付款  3失败  4退款成功 -->
+	<view v-if="actData.aprList.groupMainP.state==0" class="cantuan bgfff mt20 r10">
+		<view class="can-info" v-if="actData.activityMain.numberPeople-actData.aprList.groupList.length<=0">{{actData.aprList.groupMainP.state==1?'拼团完成':'拼团待支付'}}</view>
+		<view class="can-info" v-else>还差<text>{{actData.activityMain.numberPeople-actData.aprList.groupList.length}}人</text>成团</view>
+		<view class="sheng dflex" v-if="actData.aprList.groupMainP.state==0">
+			剩余
+			<view class="sheng-time dflex">
+				<block v-if="timer.length==4">
+					<block v-if="timer[0] !=0"><text>{{timer[0]}}</text>天</block>
+					<text>{{timer[1]}}</text>:
+					<text>{{timer[2]}}</text>:
+					<text>{{timer[3]}}</text>
+				</block>
+				<block v-else>
+					<text>{{timer[0]}}</text>:
+					<text>{{timer[1]}}</text>:
+					<text>{{timer[2]}}</text>
+				</block>
+			</view>
+			结束
+		</view>
+		<view class="can-infos dflex">
+			<view v-for="(item, index) in groupList" :key="index" class="li">
+				<image v-if="item.uavatar" :src="item.uavatar" mode="aspectFit" class="can-user"></image>
+				<text v-if="index==0">团长</text>
+				<text v-else>团员</text>
+				<image v-if="!item.uavatar" src="/activity/static/activity/images/cha.png" class="can-bg"></image>
+			</view>
+		</view>
+		<view class="can-btn mbglinear" @tap="addGroup" v-if="isJion&&actData.aprList.groupList.length!=actData.activityMain.numberPeople">我要参团</view>
+		<button open-type="share" class="can-btn mbglinear" v-if="!isJion">邀请好友参团</button>
+		<view class="kai-btn" v-if="actData.whether!=2" @tap="createGroup">我也要开团</view>
+	</view>
+	<view v-if="actData.aprList.groupMainP.state!=0" class="status bgfff mt20 r10">
+		<view v-if="actData.aprList.groupMainP.state==1" class="status-c">
+			<image :src="picUrlss+'sqimg3.png'"></image>
+			<text>拼团成功啦~</text>
+		</view>
+		<view v-if="actData.aprList.groupMainP.state==3" class="status-c">
+			<image :src="picUrlss+'sqimg2.png'"></image>
+			<text>拼团失败,已退款~</text>
+		</view>
+		<view class="can-infos dflex" v-if="actData.aprList.groupMainP.state!=1">
+			<view v-for="(item, index) in groupList" :key="index" class="li">
+				<image v-if="item.uavatar" :src="item.uavatar" mode="aspectFit" class="can-user"></image>
+				<text v-if="index==0">团长</text>
+				<image v-if="!item.uavatar" src="/activity/static/activity/images/cha.png" class="can-bg"></image>
+			</view>
+		</view>
+		<view class="can-btn mbglinear" v-if="isUser" @tap="toOrder">查看订单详情</view>
+		<view class="can-btn mbglinear" @tap="goSeept">查看其他拼团</view>
+	</view>
+	<view class="detail bgfff mt20 r10">
+		<view class="tab dflex">
+			<view :class="'li ' + (currentTab == 0? 'on' : '')" data-current="0" @tap="tab">商品详情</view>
+			<view :class="'li ' + (currentTab == 1? 'on' : '')" data-current="1" @tap="tab">拼团记录</view>
+			<view :class="'li ' + (currentTab == 2? 'on' : '')" data-current="2" @tap="tab">活动规则</view>
+		</view>
+		<view :class="currentTab == 0? 'show' : 'hide'">
+			<mp-html :content="nodes" lazy-load="true" @imgtap="chooseImg1"></mp-html>
+<!-- 			<view class="details det-text">
+				<rich-text :nodes="nodes"></rich-text>
+			</view>
+			<view class="details">
+				<block v-for="(item, index) in imgs" :key="index">
+					<image class="img" :src="item" mode="widthFix" @tap="chooseImg1" :data-src="item"></image>
+				</block>
+			</view> -->
+		</view>
+		<view :class="'friend ' + (currentTab == 1? 'show' : 'hide')">
+			<view v-for="(item, index) in groupList" :key="index" class="li dflex" v-if="item.careatDate">
+				<view class="timg">
+					<image :src="item.uavatar" mode="aspectFit"></image>
+					<text v-if="item.userId==actData.aprList.groupMainP.userId">团长</text>
+					<text v-else>团员</text>
+				</view>
+				<view class="name flex">{{item.unickName}}</view>
+				<view class="time">{{item.careatDate}}{{item.userId==actData.aprList.groupMainP.userId?'开团':'参团'}}</view>
+			</view>
+
+
+		</view>
+		<view :class="'guize ' + (currentTab == 2? 'show' : 'hide')">
+			<rich-text :nodes="actData.activityMain.rule"></rich-text>
+		</view>
+	</view>
+</view>
+</view>
+</template>
+
+<script>
+const app = getApp();
+const req = require("../../../utils/request.js");
+const utils = require("../../../utils/util.js");
+const route = require("../../../utils/route");
+import mpHtml from "../../../components/mp-html/components/mp-html/mp-html";
+export default {
+  data() {
+    return {
+		picUrlss: req.public.picUrls,
+      currentTab: 0,
+      isJion: true,
+      isGroup: true,
+      isUser: false,
+      start: false,
+      actData: "",
+      groupList: "",
+      timer: "",
+      hideShare: false
+    };
+  },
+
+  components: {
+	  mpHtml
+  },
+  props: {},
+  onLoad: function (options) {
+    this.query = options; // this.getBargainPriceDetail();
+
+    // console.log(options);
+  },
+  onShow: function () {
+    // req.redirectIndex()
+    req.isLogin().then(success => {});
+    this.getBargainPriceDetail();
+  },
+  onShareAppMessage: function () {
+    let merchantId = '';
+    let path = '/activity/group/ptDetail/ptDetail?id=' + this.query.id + '&acid=' + this.actData.acProduc.id + '&isShare=' + true;
+    // console.log(!req.getStorage('userInfo').id);
+    if (!req.getStorage('userInfo').id) {} else {
+      path += '&userId=' + req.getStorage('userInfo').id;
+    }
+    // console.log(this.query.merchantId);
+    let shopId = '';
+    if (req.getStorage('MERCHANT') && req.getStorage('MERCHANT').id != null) {
+      	path += '&merchantId=' + req.getStorage('MERCHANT').id;
+      	merchantId = req.getStorage('MERCHANT').id;
+      
+      	if (req.getStorage('smallShop') && req.getStorage('MERCHANT').id != null) {
+      		path += '&shopId=' + req.getStorage('smallShop').id;
+      		shopId = req.getStorage('smallShop').id;
+      		merchantId = req.getStorage('smallShop').merchantDTO.id;
+      	}
+    }
+	// console.log(path,"456")
+    route.share(1, req.getStorage('userInfo').id, path, merchantId, shopId, 7, this.actData.acProduc.id + '_' + this.query.id);
+    return {
+      title: this.actData.aprList.groupMainP.unickName + '邀请您一起拼团:' + this.actData.acProduc.productName,
+      imageUrl: this.actData.acProduc.pic,
+      path: path
+    };
+  },
+  // onShareTimeline(){
+	 //  let merchantId = '';
+	 //  let path = '/activity/group/ptDetail/ptDetail?id=' + this.query.id + '&acid=' + this.actData.acProduc.id + '&isShareTimeline=' + true;
+	 //  console.log(!req.getStorage('userInfo').id);
+	 //  if (!req.getStorage('userInfo').id) {} else {
+	 //    path += '&userId=' + req.getStorage('userInfo').id;
+	 //  }
+	 //  let shopId = '';
+	 //  if (req.getStorage('MERCHANT') && req.getStorage('MERCHANT').id != null) {
+	 //    	path += '&merchantId=' + req.getStorage('MERCHANT').id;
+	 //    	merchantId = req.getStorage('MERCHANT').id;
+	    
+	 //    	if (req.getStorage('smallShop') && req.getStorage('MERCHANT').id != null) {
+	 //    		path += '&shopId=' + req.getStorage('smallShop').id;
+	 //    		shopId = req.getStorage('smallShop').id;
+	 //    		merchantId = req.getStorage('smallShop').merchantDTO.id;
+	 //    	}
+	 //  }
+	 //  console.log(path,"456")
+	 //  route.share(1, req.getStorage('userInfo').id, path, merchantId, shopId, 7, this.actData.acProduc.id + '_' + this.query.id);
+	 //  return {
+	 //    title: this.actData.aprList.groupMainP.unickName + '邀请您一起拼团:' + this.actData.acProduc.productName,
+	 //    imageUrl: this.actData.acProduc.pic,
+	 //    path: path
+	 //  };
+  // },
+  methods: {
+    tab(event) {
+      const tabIndex = event.currentTarget.dataset.current;
+      if (this.currentTab === tabIndex) return false;
+      this.setData({
+        currentTab: tabIndex
+      });
+    },
+
+    //获取平团详情
+    getBargainPriceDetail() {
+      req.getRequest('/api/activity/groupDetail', {
+        id: this.query.id,
+        merchantId: this.query.merchantId
+      }, data => {
+        // console.log(data);
+		if(data){
+			this.setData({
+			  actData: data
+			});
+			this.initTimer(data.acProduc.nowTime, data.aprList.groupMainP, data.acProduc.endTime);
+			var groupList = []; //  groupList.push(data.aprList.groupMainP);
+			
+			if (data.aprList.groupList) {
+			  groupList = groupList.concat(data.aprList.groupList);
+			  groupList.forEach(res => {
+			    if (res.userId == req.getStorage("userInfo").id) {
+			      this.setData({
+			        isUser: true
+			      });
+			    }
+			  });
+			}
+			
+			if (groupList.length < data.activityMain.numberPeople) {
+			  for (var i = 0; i < data.activityMain.numberPeople - data.count; i++) {
+			    // console.log(data.activityMain.numberPeople - data.count);
+			    var nullGroup = {};
+			    groupList.push(nullGroup);
+			  }
+			}
+			
+			// console.log(groupList);
+			this.isJionFun(groupList);
+			this.setData({
+			  groupList: groupList
+			}); 
+			 this.loadProudct(data.acProduc.productId);
+		}
+      });
+    },
+
+    initTimer(nowdata, group, end) {
+      //计时器
+      let _ts = this;
+
+      let nowTime = new Date(nowdata.replace(/-/g, '/')).getTime();
+      let endTime = new Date(group.endDate.replace(/-/g, '/')).getTime(); // let actend=new Date(end.replace(/-/g, '/')).getTime();
+      // let times
+      // if(actend-endTime>0){
+      //    times = parseInt((endTime - nowTime) / 1000);
+      // }else{
+      //   times = parseInt((actend - nowTime) / 1000);
+      // }
+
+      let times = parseInt((endTime - nowTime) / 1000);
+      // console.log(times);
+      this.timer = setInterval(() => {
+        times--;
+
+        if (times === 0) {
+          return false;
+        }
+
+        if (times < 0) {
+          this.setData({
+            isGroup: false
+          });
+        }
+
+        let n = utils.formatDayTimes(times);
+
+        _ts.setData({
+          timer: n.split(/:|天/g)
+        });
+      }, 1000);
+    },
+
+     loadProudct(proId) {
+      let that = this;
+      req.getRequest('/api/product/detail', { id: proId }, data => {
+        //富文本图片放大
+        var nodes = data.detail;
+        // if (nodes) {
+        //   if (nodes.indexOf("src") >= 0) {
+        //     //正则匹配所有图片路径
+        //     var imgs = [];
+        //     nodes = nodes.replace(/<img [^>]*src=['"]([^'"]+)[^>]*>/gi, function (match, capture) {
+        //       imgs.push(capture);
+        //       that.setData({
+        //         imgs: imgs
+        //       });
+        //       return '';
+        //     });
+        //   }
+        // }
+        that.setData({ bannerUrls: data.images, pro: data ,nodes: nodes});
+      })
+    },
+    // 活动商品详情
+    goPrcdetail() {
+      app.globalData.openPage('activity/group/detail/detail?acid=' + this.actData.acProduc.id + '&id=' + this.actData.acProduc.productId);
+    },
+
+    //创建拼团
+    createGroup() {
+      if (this.start) return req.msg('活动已结束');
+      req.postRequest('/api/activity/carterActivityPurchaseRecords', {
+        acpId: this.actData.aprList.groupMainP.acpId,
+        type: 3
+      }, res => {
+        this.createGroupOrder(res);
+      });
+    },
+
+    //加入平团
+    addGroup() {
+      if (this.start) return req.msg('活动已结束');
+      if (this.actData.aprList.groupList.length == this.actData.activityMain.numberPeople) return req.msg('该团参与人数已满');
+      this.createGroupOrder(this.actData.aprList.id);
+    },
+
+    showShare() {
+	  // #ifndef H5
+      req.isLogin().then(success => {
+        if (success) {
+          this.setData({
+            hideShare: false
+          });
+        }
+      });
+	  // #endif
+    },
+
+    goSeept() {
+      uni.redirectTo({
+        url: '/activity/group/index/index'
+      });
+    },
+
+    createGroupOrder(aprId) {
+      // let merchant = req.getStorage('defaultMerchant');
+      const params = {
+        skuId: this.actData.acProduc.skuId,
+        quantity: 1,
+        productId: this.actData.acProduc.productId,
+        aprId: aprId
+      };
+	  if (this.query.merchantId) {
+	  	params.merchantId = this.query.merchantId;
+		if(this.query.shopId){
+			params.shopId = this.query.shopId;
+		}
+	  }
+      // if (this.query.merchantId) params.merchantId = this.query.merchantId;
+      params.activityId = this.actData.acProduc.id;
+      req.postRequest('/api/purchase/direct/buy', params, res => {
+        let redirect = '/product/subOrder/subOrder?ids=' + res;
+        redirect += '&orderType=' + 4;
+        redirect += '&aprId=' + aprId;
+        redirect += '&activityId=' + this.actData.acProduc.id;
+        redirect += '&pay=' + 1;
+		if (params.merchantId) {
+			redirect += '&merchantId=' + params.merchantId;
+		}
+		
+		if (params.shopId) {
+			redirect += '&shopId=' + params.shopId;
+		}
+		
+        uni.navigateTo({
+          url: redirect
+        });
+      });
+    },
+
+    /**判断是否已经参团 */
+    isJionFun(groupList) {
+      let userInfo = req.getStorage('userInfo');
+      groupList.forEach(res => {
+        // console.log(res.userId == userInfo.id);
+        if (res.userId == userInfo.id) this.setData({
+          isJion: false
+        });
+      }); // console.log(groupList)
+    },
+
+    toOrder() {
+      uni.navigateTo({
+        url: '/mine/orderDet/orderDet?id=' + this.actData.orderId
+      });
+    }
+
+  }
+};
+</script>
+<style>
+@import "./ptDetail.css";
+</style>

+ 96 - 0
activity/newbornDetails/newbornDetails.css

@@ -0,0 +1,96 @@
+/* product/xrzqDetails/xrzqDetails.wxss */
+.banner{overflow: hidden;position: relative;}
+.swiper,.swiper image{width: 100%;height: 750rpx;}
+.dots{position: absolute;left: 0;right: 0;bottom: 11rpx;align-items: center;justify-content: center;}
+.dot{background:var(--mina) ;width: 10rpx;height: 10rpx;border-radius: 5rpx;margin: 0 3rpx;}
+.dot.active{width: 30rpx;}
+.group{position: relative;height: 120rpx;}
+.ptbg{width: 100%;height: 120rpx;position: absolute;top: 0;left: 0;z-index: 1;}
+.origin text{font-weight: bold; font-size: 24rpx !important ;}
+.groups{position: relative;z-index: 2;align-items: center;padding: 0 30rpx;justify-content: space-between;height: 120rpx;}
+.price{font-size: 28rpx;color: #FE0419;}
+.price text{font-size: 48rpx;font-weight: bold;}
+.price text.origin{font-weight: normal;font-size: 24rpx;color: #999;text-decoration: line-through;margin-left: 10rpx;}
+.left .price,.left .price text.origin{color: #fff;}
+.pin{font-size: 24rpx;color: #fff;}
+.tuan{width: 154rpx;height: 40rpx;float: right;}
+.endtime{align-items: center;font-size: 24rpx;color: #fff;line-height: 36rpx;margin-top: 47rpx;overflow: hidden;clear: both;}
+.endtime view{margin-right: 15rpx;}
+.endtime text{display: block;width:36rpx;height:36rpx;background:rgba(0, 0, 0, 0.4);border-radius:6rpx;font-size: 24rpx;color: #fff;text-align: center;line-height: 36rpx;margin:0 5rpx;}
+.info{padding: 30rpx 30rpx 40rpx;}
+.infos{align-items: center;justify-content: space-between;}
+.share{font-size: 24rpx;color: #999;text-align: center;position: relative;margin-left: 45rpx !important;}
+.share::after{content: '';display: block;width: 2rpx;height: 45rpx;background: #e7e7e7;position: absolute;top: 50%;transform: translateY(-50%);left: -30rpx;}
+.share image{width: 31rpx;height: 31rpx;margin: 0 auto 10rpx;}
+.title{font-size: 30rpx;color: #222;line-height: 40rpx;font-weight: bold;}
+.tag{width: 82rpx;height: 36rpx;display: inline-block;margin: 0 10rpx 0 0;position: relative;top: 7rpx;}
+.detinfo .item{padding: 30rpx;border-bottom: 1rpx solid #f6f6f6;}
+.detinfo .item:last-child{border-bottom: none;}
+.item label{display: block;width: 130rpx;font-size: 28rpx;color: #222;font-weight: bold;line-height: 40rpx;}
+.quan .flex{align-items: center;}
+.quan text{display: block;background: #FDF5F3;padding: 0 13rpx;height: 40rpx;line-height: 40rpx;font-size: 24rpx;color: #FF5F08;margin-right: 10rpx;}
+.ling{font-size: 24rpx;color: #FF5F08;align-items: center;}
+.ling image{width: 14rpx;height: 24rpx;margin-left: 11rpx;}
+.address{font-size: 28rpx;color: #333;line-height: 40rpx;}
+.huo{font-size: 24rpx;color: #666;line-height: 40rpx;}
+.huo text{color: #FE0419;}
+.more{width: 36rpx;height: 10rpx;margin-top: 15rpx;}
+.dis{display: flex;justify-content: space-between;}
+.more{width: 36rpx;height: 10rpx;margin-top: 15rpx;}
+.more1{width: 12rpx; height: 22rpx;}
+.txt{margin-left: 14rpx;}
+.gmbtn1{border: 2rpx solid #FE0419; width: 430rpx;height: 77rpx;border-radius:40rpx;text-align: center;line-height: 80rpx;font-size: 30rpx;color: #FE0419;background-color: #FFFFFF;}
+.gmbtnor{width: 210rpx;height: 80rpx;border-radius: 40rpx;text-align: center;line-height: 80rpx;font-size: 30rpx;color: #fff;}
+/* .user{width: 68rpx;height: 68rpx;border-radius: 50%;margin-right: 15rpx;} */
+.name{font-size: 28rpx;color: #666;line-height: 68rpx;justify-content: space-between;align-items: center;}
+.pinglun{font-size: 28rpx;color: #333;margin: 15rpx 0 0;line-height: 44rpx;}
+.huifu{background: #F2F2F2;border-radius: 6rpx;margin: 25rpx 0 0;line-height: 42rpx;padding: 20rpx 30rpx;position: relative;}
+.huifu::after{content: '';display: block;width: 0;height: 0;border: 9rpx solid transparent;border-bottom-color: #F2F2F2;border-top: none;position: absolute;top: -8rpx;left: 39rpx;}
+.show{display: block;}
+.hide{display: none;}
+.bot{height: 80rpx;align-items: center;padding: 20rpx 30rpx 20rpx 0; display: flex; justify-content: space-around;}
+.botbtn{font-size: 22rpx;color: #6A6A6A;width: 108rpx !important;text-align: center;position: relative;}
+.botbtn image{width: 40rpx;height: 34rpx;margin: 10rpx auto 5rpx;}
+.message{background: #DF1A14;height: 28rpx;line-height: 28rpx;font-size: 24rpx;color: #fff;text-align: center;border-radius: 15rpx;box-sizing: border-box;min-width: 21rpx;padding: 0 8rpx;position: absolute;top: 0;right: 25%;}
+.gmbtn{width: 430rpx;height: 80rpx;border-radius: 40rpx;text-align: center;line-height: 80rpx;font-size: 30rpx;color: #fff;}
+.addcart{width: 206rpx;height: 76rpx;border: 2rpx solid #FD3C31;border-radius: 40rpx;text-align: center;line-height: 76rpx;font-size: 30rpx;color: #FD3A31;margin: 0 10rpx;}
+.flot{float: left;}
+.background {
+  width: 30rpx;
+  height: 30rpx;
+  position:absolute; 
+	background-size:100% 100%;
+	margin-top: 2rpx;
+  /* z-index: -1; */
+}
+.ico{width: 30rpx;height: 30rpx;}
+
+
+.guarantee{border-top: 1rpx solid #f6f6f6;padding: 15rpx 0 0 0; margin-top: 15rpx;}
+.guarantee .cont{flex-wrap: wrap;font-size: 26rpx;}
+.guarantee .cont .li{align-items: center;margin-right: 20rpx;
+  margin-bottom: 10rpx;}
+.guarantee .cont image{        width: 30rpx;
+  height: 30rpx;}
+  
+  /* 小店相关 */
+  .xiaodian{position: relative;height: 122rpx;padding: 0 26rpx 0 110rpx;align-items: center;margin: 35rpx 30rpx 0;}
+  .xdbg{position: absolute;left: 0;top: 0;width: 100%;height: 100%;z-index: 1;}
+  .shouyi{position: relative;z-index: 2;color: #fff;margin-right: 10rpx;}
+  .shouyi view{font-size: 40rpx;font-weight: bold;margin-top: 8rpx;}
+  .shouyi text{font-weight: normal;font-size: 24rpx;}
+  .addshop{height: 62rpx;padding: 0 25rpx;border-radius: 31rpx;background:linear-gradient(115deg,rgba(255,78,78,1) 0%,rgba(220,21,21,1) 100%);text-align: center;line-height: 62rpx;font-size: 24rpx;color: #fff;position: relative;z-index: 2;}
+  .fenxiang{height: 62rpx;padding: 0 25rpx;margin-left: 15rpx;border-radius: 31rpx;background:linear-gradient(115deg,rgba(255,78,78,1) 0%,rgba(220,21,21,1) 100%);text-align: center;line-height: 62rpx;font-size: 24rpx;color: #fff;position: relative;z-index: 2;}
+  .goShop{height: 62rpx;padding: 0 25rpx;margin-left: 15rpx;border-radius: 31rpx;background:linear-gradient(115deg,rgba(255,78,78,1) 0%,rgba(220,21,21,1) 100%);text-align: center;line-height: 62rpx;font-size: 24rpx;color: #fff;position: relative;z-index: 2;}
+  
+  .suc{position: fixed;left: 50%;top: 50%;transform: translate(-50%,-50%);background: #fff;width: 536rpx;border-radius: 20rpx;z-index: 100;text-align: center;padding-bottom: 47rpx;}
+  .tjcg1{width: 100%;height: 284rpx;}
+  .tjcg{width: 195rpx;height: 38rpx;margin: 52rpx auto 15rpx;}
+  .suc text{display: block;font-size: 24rpx;color: #333;}
+  .shopcc{justify-content: center;}
+  .shop{width:220rpx;height:80rpx;background:linear-gradient(123deg,rgba(255,130,130,1) 0%,rgba(220,21,21,1) 100%);font-size: 30rpx;color: #fff;line-height: 80rpx;border-radius: 40rpx;margin: 45rpx 15rpx 40rpx;}
+  .suc-close{position: absolute;left: 50%;transform: translateX(-50%);bottom: -102rpx;width: 62rpx;height: 62rpx;}
+  
+  .pro-sel{align-items: center;}
+  .pro-sel .flex{text-overflow: ellipsis;white-space: nowrap;overflow: hidden;}
+  .mrico{width: 16rpx;height: 27rpx;}

+ 1134 - 0
activity/newbornDetails/newbornDetails.vue

@@ -0,0 +1,1134 @@
+<template>
+	<view v-if="allShow">
+		<!--product/xrzqDetails/xrzqDetails.wxml-->
+		<view class="banner">
+			<swiper class="swiper" @change="swiperChange" :current="current" autoplay="true" circular="true"
+				duration="1000">
+				<block v-for="(item, index) in bannerUrls" :key="index">
+					<swiper-item autoplay="true">
+						<image :src="item + '?x-oss-process=style/w750-auto'" mode="aspectFit"></image>
+					</swiper-item>
+				</block>
+			</swiper>
+			<view class="dots dflex">
+				<block v-for="(item, index) in bannerUrls" :key="index">
+					<view :class="'dot ' + (index == swiperCurrent ? ' active' : '')" :data-current="index"
+						@tap="dotEvent"></view>
+				</block>
+			</view>
+		</view>
+		<!-- <view class="notification_bar" wx:if="{{isNotice}}">
+	<swiper class="swiper_container" vertical="true" autoplay="true" circular="false" duration="1000" interval="5000" easing-function="easeInOutCubic" class="bar_box dflex">
+		<swiper-item class="bar_con dflex" wx:for="{{contentList}}" wx:key="item">
+			<view class="bar dflex">
+				<image class="bar_left" src="{{item.pic}}" />
+				<text class="bar_text">最新订单来自</text>
+				<text class="bar_text">{{item.name}},</text>
+				<text class="bar_text">{{item.time}}</text>
+			</view>
+		</swiper-item>
+	</swiper>
+</view> -->
+		<view class="group">
+			<image src="/activity/static/activity/images/xrzxbg.png" class="ptbg"></image>
+			<!-- <image src="/activity/images/xrzxbg.png" class="ptbg" wx:else></image> -->
+			<view class="groups dflex">
+				<view class="left">
+					<view class="price">¥<text>{{act.money}}</text>
+						<text class="origin"
+							v-if="pro.marketPrice!=0&&pro.marketPrice>act.money">¥<text>{{pro.marketPrice}}</text></text>
+					</view>
+					<view class="pin">{{act.payQuantity?act.payQuantity:'0'}}人已参与</view>
+				</view>
+				<view class="right">
+					<image src="/activity/static/activity/images/xrzx.png" class="tuan"></image>
+					<view class="endtime dflex">
+						<view>距结束还剩</view>
+						<block v-if="timer[0] !==0"><text>{{timer[0]}}</text>{{timer.length>=4?'天':':'}}</block>
+						<text>{{timer[1]}}</text>:
+						<text>{{timer[2]}}</text>{{timer.length>=4?':':''}}
+						<text v-if="timer.length>=4">{{timer[3]}}</text>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="info bgfff">
+			<view class="infos dflex">
+				<view class="title flex">
+					<image src="/static/pages/images/jishida.png" class="tag" v-if="pro.isTimely === 1"></image>
+					{{pro.title?pro.title:''}}
+				</view>
+				<view class="share" @tap="showShare">
+					<image src="/static/pages/images/fxico.png"></image>分享
+				</view>
+			</view>
+			<view class="guarantee dflex" v-if="guarantee.length>0">
+				<view class="cont dflex">
+					<view v-for="(item, index) in guarantee" :key="index" class="dflex li">
+						<image src="/activity/static/activity/images/guarantee.png"></image>{{item}}
+					</view>
+				</view>
+			</view>
+		</view>
+
+		<view class="detinfo mt20 bgfff">
+			<!-- isOtc 0 默认 1 处方药 2 非处方药 3 医疗器械 4 食品类 5 海外购 -->
+			<block v-if="act.isOtc!=5">
+			<block v-if="is_open_shop == 1 && ascription">
+			<view class="xiaodian dflex malr20" v-if="((act.isMeCommission != 1 || act.isMeCommission != '1') && act.oneCommission>0) || ((act.isMeCommission == 1 || act.isMeCommission == '1') && act.twoCommission>0) || act.serviceShopRate">
+				<image src="/static/pages/images/xdbg1.png" class="xdbg"></image>
+				<view class="shouyi flex" v-if="((act.isMeCommission != 1 || act.isMeCommission != '1') && act.oneCommission>0) || ((act.isMeCommission == 1 || act.isMeCommission == '1') && act.twoCommission>0)">
+					<text>分销收益</text>
+					<view v-if="act.isMeCommission == 0"><text>¥</text>{{act.oneCommission}}</view>
+					<view v-else><text>¥</text>{{act.twoCommission}}</view>
+				</view>
+				<view class="shouyi flex" v-if="act.serviceShopRate">
+					<text>小店服务费</text>
+					<view><text>¥</text>{{act.serviceShopRate}}</view>
+				</view>
+				<view class="dflex" v-if="act.isJoinShop">
+					<view class="fenxiang" @tap="showShare">分享推广</view>
+					<navigator :url="url" hover-class="none" class="goShop">去小店</navigator>
+				</view>
+				<view class="addshop" @tap="addShop" v-else>添加到小店</view>
+			</view>
+			</block>
+			<block v-else>
+			<view class="xiaodian dflex malr20" v-if="((act.isMeCommission != 1 || act.isMeCommission != '1') && act.oneCommission>0) || ((act.isMeCommission == 1 || act.isMeCommission == '1') && act.twoCommission>0)">
+				<image src="/static/pages/images/xdbg1.png" class="xdbg"></image>
+				<view class="shouyi flex">
+					<text>分销收益</text>
+					<view v-if="act.isMeCommission == 0"><text>¥</text>{{act.oneCommission}}</view>
+					<view v-else><text>¥</text>{{act.twoCommission}}</view>
+				</view>
+				<navigator url="/promote/apply/apply" hover-class="none" class="fenxiang" v-if="isDistriUser != 2">我要推广</navigator>
+				<view class="fenxiang" @tap="showShare" v-else>分享推广</view>
+			</view>
+			</block>
+			</block>
+			<!-- <view class="item dflex">
+		<label>优惠券</label>
+		<view class="quan flex dflex">
+			<view class="flex dflex">
+				<text>满500减50</text>
+				<text>满200减10</text>
+			</view>
+			<view class="ling dflex">领券<image src="/pages/images/more3.png"></image>
+			</view>
+		</view>
+	</view> -->
+			<view class="item pro-sel dflex" v-if="pro.propertiesList && pro.propertiesList.length > 0"
+				@click="pro.stock > 0 ? addShopCart() : ''">
+				<label>已选</label>
+				<view class="flex">{{pro.properties}}</view>
+				<image src="/static/pages/images/more.png" class="mrico"></image>
+			</view>
+			<view class="item dflex">
+				<label>配送至</label>
+				<view class="flex" @tap="toAddress">
+					<view class="address">{{address.address?address.address:''}}{{address.house?address.house:''}}
+					</view>
+					<view class="huo" v-if="pro.isTimely == 1"><text>现货</text>,现在下单,预计2小时后送达</view>
+				</view>
+				<image src="/static/pages/images/more2.png" class="more" @tap="toAddress"></image>
+			</view>
+			<view class="item dflex">
+				<label>提货门店</label>
+				<view class="flex" @tap="toMerchant">
+					<view class="address">{{merchant.title}}</view>
+				</view>
+			</view>
+			<!-- <view class="item dflex">
+		<label>参数</label>
+		<view class="flex dis">
+			<view wx:for="{{params}}" wx:key="index">
+				{{item.name}}
+			</view>
+			<image src="../../pages/images/more.png" class="more1"></image>
+		</view>
+	</view> -->
+		</view>
+
+		<!--  商品详情等页面 -->
+		<product-footer ref="list" id="list" :detail="nodes" :imgs="imgs" :proId="pro.id" v-if="pro.id" :form="form"
+			@showTab="showTab" @scoreTab="scoreTab" @freshen="freshenFun">
+		</product-footer>
+
+		<v-share :hide-toast="hideShare" :product="pro" :code-url="codeUrl" a-type="4" @onFather="click"></v-share>
+
+		<view class="placeholder-view" :style="'height:' + (bottomBlankHeight + 140) + 'rpx'"></view>
+		<view class="bot fixed bgfff dflex" :style="'padding-bottom: ' + (bottomBlankHeight + 20) + 'rpx'">
+			<contact-button img-url="/static/pages/images/kfico.png" class-name="botbtn" button-text="在线客服"></contact-button>
+			<navigator class="botbtn" open-type="switchTab" url="/pages/cart/cart" hover-class="none">
+				<image src="/static/pages/images/gwc.png"></image>购物车<text class="message"
+					v-if="pro.count > 0">{{pro.count}}</text>
+			</navigator>
+			<block v-if="!activityEnd">
+				<block v-if="act.start">
+					<view :class="['addcart',act.start? '' : 'gray']" @tap="addShopCart">加入购物车</view>
+					<view class="gmbtnor mbglinear flot" @tap="atOnceBuy">{{pro.isOtc==1 ?'预约下单': '立即购买'}}</view>
+				</block>
+				<view v-else>
+					<!-- <view class="addcart flot" bindtap="addShopCart">加入购物车</view> -->
+					<view class="gmbtn1  flot" @tap="cancelActivityRemind" v-if="isRemind">
+						<icon class="ico">
+							<image src="/activity/static/activity/images/rednaozhong.png" class="background"></image>
+						</icon>
+						<text class="txt">取消提醒</text>
+					</view>
+					<view class="gmbtn mbglinear flot" @tap="addActivityRemind" v-else>
+						<icon class="ico">
+							<image src="/activity/static/activity/images/clock2.png" class="background"></image>
+						</icon>
+						<text class="txt">预约提醒</text>
+					</view>
+				</view>
+			</block>
+			<block v-else>
+				<view class="gmbtn mbggray">活动不存在</view>
+			</block>
+
+			<!-- <view class="addcart {{pro.state == 1 ? '' : 'gray'}}" bindtap="addShopCart">加入购物车</view>
+	<view class="gmbtn mbglinear" bindtap="atOnceBuy" wx:if="{{act.start}}">立即购买</view> -->
+			<!-- <view wx:if="{{false}}">
+		<view class="addcart flot" bindtap="addShopCart">加入购物车</view>
+	</view> -->
+		</view>
+
+		<!-- 商品规格 -->
+		<block v-if="isShow">
+			<product-popup :product="popup" :activityId="act.id" :is-cart="isCart" @hidePopup="hidePopup"
+				@addCartSuccess="addCartSuccess" :orderType="orderType" :merchant="merchant"
+				:merchant-id="query.merchantId" :shopId="query.shopId" :actId="act.actId" @getPor="getPor">
+			</product-popup>
+		</block>
+
+		<view class="contact_index" @tap="goTop">
+			<image src="/static/pages/images/backtop.png"></image>顶部
+		</view>
+		<!-- 添加到小店成功 -->
+		<view class="mask" :hidden="isHide" @tap="hidePop"></view>
+		<view class="suc" :hidden="isHide">
+			<image src="/static/pages/images/tjcg1.png" class="tjcg1"></image>
+			<image src="/static/pages/images/tjcg.png" class="tjcg"></image>
+			<text>快去我的小店看看吧</text>
+			<view class="shopcc dflex">
+				<view class="shop" @tap="showShare">分享推广</view>
+				<navigator :url="url" hover-class="none" class="shop" >我的小店</navigator>
+			</view>
+			<!-- <view class="share-btn dflex">
+				<button class="wxfriend dflex" open-type="share">
+					<image src="/static/pages/images/wechat.png"></image>
+					微信好友
+				</button>
+				<view class="wxposter dflex" @tap="generatePoster">
+					<image src="/static/pages/images/poster.png"></image>
+					生成海报
+				</view>
+			</view> -->
+			<image src="/static/pages/images/close2.png" class="suc-close" @tap="hidePop"></image>
+		</view>
+		<block v-if="isPopupLogin">
+			<product-login :about="about" @hidePopupLogin="hidePopupLogin"></product-login>
+		</block>
+	</view>
+</template>
+
+<script>
+	// product/xrzqDetails/xrzqDetails.js
+	const app = getApp();
+	const req = require("../../utils/request.js");
+	const utils = require("../../utils/util.js");
+	var QQMapWX = require("../../utils/qqmap.js");
+	const requsetmessage = require("../../utils/requestmessage.js");
+	const route = require("../../utils/route");
+	const api = require("../../utils/api");
+	import productFooter from "../../components/product_footer/index";
+	import productPopup from "../../components/product-popup/index";
+	import vShare from "../../components/share/share";
+	import productLogin from "../../components/product-login/index";
+
+	export default {
+		data() {
+			return {
+				bottomBlankHeight: app.globalData.isIPhoneX ? 68 : 0,
+				swiperCurrent: 0,
+				bannerUrls: [],
+				isShow: false,
+				pro: {},
+				timer: [],
+				orderType: '',
+				isRemind: false,
+				hideShare: true,
+				isCart: false,
+				codeUrl: '',
+				contentList: [{
+					pic: "/static/pages/images/bar.png",
+					name: '好风依旧',
+					time: '4秒前'
+				}, {
+					pic: "/static/pages/images/bar.png",
+					name: '杨鑫',
+					time: '20秒前'
+				}, {
+					pic: "/static/pages/images/bar.png",
+					name: '杨鑫',
+					time: '5秒前'
+				}],
+				isNotice: false,
+				user: true,
+				form: {
+					page: 1,
+					limit: 10
+				},
+				freshen: true //是否更新页面
+					,
+				current: "",
+				query: "",
+				imgs: "",
+				activityEnd: false,
+				act: "",
+				address: {},
+				popup: {},
+				params: "",
+				tabIndex: "",
+				guarantee: "",
+				is_open_comments: "",
+				merchant: "",
+				merchantId: "",
+				shopId: "",
+				nodes: "",
+				switch: true,
+				about: {},
+				allShow: false,
+				isHide: true,//添加小店成功弹窗
+				is_open_shop: '',//商户是否开启分销
+				ascription: false,//是否开启小店
+				isDistriUser: 0, // 判断用户是否是分销员 2为分销员
+				isPopupLogin: false
+			};
+		},
+
+		components: {
+			productFooter,
+			productPopup,
+			vShare,
+			productLogin
+		},
+		props: {},
+
+		/**
+		 * 生命周期函数--监听页面加载
+		 */
+		onLoad: function(options) {
+			this.query = options;
+			this.setData({
+				query: options
+			});
+
+			if (options.scene) {
+				this.scene = options.scene;
+			}
+
+			if (options.isShare) {
+				this.query.id = options.id;
+				this.query.acid = options.acid;
+				req.setStorage('pidCode', options.userId);
+				let params = {
+					userId: options.userId,
+					merchantId: options.merchantId ? options.merchantId : '',
+				}
+				this.bindUser(params);
+			}
+
+			// console.log(options);
+			// console.info(options);
+			setInterval(() => {
+				this.setData({
+					isNotice: true
+				});
+			}, 10000);
+		},
+
+		onUnload() {
+			if (this.timer) clearInterval(this.timer);
+		},
+
+		onShareAppMessage: function() {
+			let merchantId = '';
+			let path = '/activity/newbornDetails/newbornDetails?id=' + this.query.id + '&acid=' + this.query.acid +
+				'&isShare=' +
+				true;
+			// console.log(!req.getStorage('userInfo').id);
+
+			if (!req.getStorage('userInfo').id) {} else {
+				path += '&userId=' + req.getStorage('userInfo').id;
+			}
+
+			// console.log(this.query.merchantId);
+			let shopId = '';
+
+			if (req.getStorage('MERCHANT') && req.getStorage('MERCHANT').id != null) {
+				path += '&merchantId=' + req.getStorage('MERCHANT').id;
+				merchantId = req.getStorage('MERCHANT').id;
+
+				if (req.getStorage('smallShop') && req.getStorage('MERCHANT').id != null) {
+					path += '&shopId=' + req.getStorage('smallShop').id;
+					shopId = req.getStorage('smallShop').id;
+					merchantId = req.getStorage('smallShop').merchantDTO.id;
+				}
+			}
+			// console.log(path)
+			route.share(1, req.getStorage('userInfo').id, path, merchantId, shopId, 8, this.query.acid + '_' + this
+				.query.id);
+			return {
+				title: this.pro.title,
+				imageUrl: this.pro.pic,
+				path: path
+			}; // return {
+			//   title: this.data.pro.title,
+			//   imageUrl: this.data.pro.pic,
+			//   path: '/activity/newbornDetails/newbornDetails?id=' + this.query.id + '&acid=' + this.query.acid + '&isShare=' + true + '&userId=' + req.getStorage('userInfo').id+'&merchantId='+this.data.query.merchantId
+			// }
+		},
+
+		/**
+		 * 生命周期函数--监听页面初次渲染完成
+		 */
+		onReady: function() {},
+
+		/**
+		 * 生命周期函数--监听页面显示
+		 */
+		onShow: async function() {
+			let that = this
+			if (this.freshen) {
+				await this.loadCodeParams();
+				if(that.scene){
+					await that.bindUser(that.query);
+				}
+				this.getGuarantee().then(data => {
+					if (this.switch) {
+						api.getMerchant(this.query, req, data => {
+							that.loadDefaultAddress();
+							if (data == 1) {
+								api.locationShow()
+							} else {
+								that.getuserInfos(data);
+								if (data.type == 5) {
+									that.query.merchantId = data.merchantDTO.id
+									that.query.shopId = data.id
+								} else {
+									that.query.merchantId = data.id
+
+								}
+								if (req.getStorage('userInfo') && that.merchant.id != data.id) {
+									this.loadProudct();
+									let pages = getCurrentPages();
+									var prevPage = pages[pages.length - 2];
+									if (prevPage) {
+										prevPage.$vm.setData({
+											freshen: true
+										});
+									}
+								} else {
+									this.loadProudct();
+								}
+								that.merchant = data
+								// console.log(that.query.merchantId,"dddddd")
+							}
+						})
+					}
+				})
+				// this.loadDefaultAddress();
+			
+				this.newuser();
+				await this.browsRecound(this.query.id)
+			}
+
+		},
+
+		/**
+		 * 生命周期函数--监听页面隐藏
+		 */
+		onHide: function() {},
+
+		/**
+		 * 生命周期函数--监听页面卸载
+		 */
+		onUnload: function() {},
+
+		/**
+		 * 页面相关事件处理函数--监听用户下拉动作
+		 */
+		onPullDownRefresh: function() {},
+
+		/**
+		 * 页面上拉触底事件的处理函数
+		 */
+		onReachBottom: function() {},
+
+		onReachBottom() {
+			if (this.is_open_comments == 1 && this.tabIndex == 2) {
+				this.form.page++;
+				this.setData({
+					['form.page']: this.form.page
+				});
+				// this.selectComponent("#list").loadScore(this.current);
+				this.$refs.list.loadScore(this.current);
+			}
+		},
+
+		methods: {
+			bindUser(par){
+				let userInfo = req.getStorage('userInfo');
+				if(!userInfo){
+					// uni.login({
+					// 	success(res) {
+					// 		let params = {
+					// 			code: res.code,
+					// 			parentId: par.userId,
+					// 			merchantId: par.merchantId ? par.merchantId : par.shopId ? par.shopId : ''
+					// 		}
+					// 		return new Promise((resolve,reject)=>{
+					// 			req.postRequest('/api/v2/login', params, data => {
+					// 				resolve();
+					// 			});
+					// 		})
+					// 	}
+					// });
+					// this.isPopupLogin = true;
+					req.silenceLogin(par.userId, par.merchantId ? par.merchantId : par.shopId ? par.shopId : '');
+				}
+			},
+			click(e) {
+				// console.log(e)
+				this.hideShare = e
+			},
+			showShare() {
+				// #ifndef H5
+				req.isLogin().then(success => {
+					if (success) {
+						this.getCodeUrl()
+						this.setData({
+							hideShare: false
+						});
+					}
+				});
+				// #endif
+			},
+
+			/**
+			 * 轮播切换
+			 */
+			swiperChange({
+				detail
+			}) {
+				if (this.current == 0 && this.swiperCurrent > 1) {
+					//卡死时,重置current为正确索引
+					this.setData({
+						current: this.swiperCurrent
+					});
+				} else {
+					//正常轮转时,记录正确页码索引
+					this.setData({
+						swiperCurrent: detail.current
+					});
+				}
+			},
+
+			dotEvent(e) {
+				this.setData({
+					current: e.currentTarget.dataset.current
+				});
+			},
+
+			browsRecound(id) {
+				let from = {
+					bindId: id,
+					type: 8,
+					page: '/activity/newbornDetails/newbornDetails?id=' + this.query.id + '&acid=' + this.query.acid
+				}; //  if(this.query.scene){
+				//    from.shareType=12
+				//    from.page='/activity/seckillDetails/seckillDetails?id=' + this.query.id+'&acid=' + this.query.acid +'&scene='+this.query.scene
+				//    if(!this.data.params.merchantId){}else{
+				//      from.merchantId=this.data.params.merchantId
+				//    }
+				//    if(!this.data.params.shopId){}else{
+				//      from.shopId=this.data.params.shopId
+				//    }
+				//    if(!this.data.params.userId){}else{
+				//      from.uid=this.data.params.userId
+				//    }
+				//  }
+
+				if (this.query.isShare) {
+					from.shareType = 1;
+					from.page = '/activity/newbornDetails/newbornDetails?id=' + this.query.id + '&acid=' + this.query
+						.acid +
+						'&isShare=' + true;
+
+					if (!this.query.userId) {} else {
+						from.page += '&userId=' + this.query.userId;
+					}
+
+					if (!this.query.merchantId) {} else {
+						from.merchantId = this.query.merchantId;
+					}
+
+					if (!this.query.shopId) {} else {
+						from.shopId = this.query.shopId;
+					}
+
+					if (!this.query.userId) {} else {
+						from.uid = this.query.userId;
+					}
+				}
+
+				if (this.query.isShareTimeline) {
+					from.shareType = 2;
+					from.page = '/activity/newbornDetails/newbornDetails?id=' + this.query.id + '&acid=' + this.query
+						.acid +
+						'&isShareTimeline=' + true;
+
+					if (!this.query.userId) {} else {
+						from.page += '&userId=' + this.query.userId;
+					}
+
+					if (!this.query.merchantId) {} else {
+						from.merchantId = this.query.merchantId;
+					}
+
+					if (!this.query.shopId) {} else {
+						from.shopId = this.query.shopId;
+					}
+
+					if (!this.query.userId) {} else {
+						from.uid = this.query.userId;
+					}
+				}
+				return new Promise((resolve,reject)=>{
+					req.postRequest('/api/browse', from, data => {resolve()});
+				})
+			},
+			getPor: function(e) {
+				// console.log(e.detail, "qqqqq")
+				this.popup = e.detail
+				this.act.id = e.detail.actId
+			},
+
+			loadCodeParams() {
+				let _ts = this;
+
+				return new Promise((resolve, reject) => {
+					if (!_ts.scene) {
+						resolve();
+						return false;
+					}
+
+					req.getRequest('/api/code/params', {
+						scene: _ts.scene
+					}, data => {
+						if (data) {
+							this.query.id = data.scene.split('_')[0];
+							this.query.acid = data.scene.split('_')[1];
+							this.query.merchantId = data.scene.split('_')[2];
+							this.query.shopId = data.scene.split('_')[3];
+							this.query.userId = data.userId;
+							req.setStorage('pidCode', data.userId);
+						}
+						resolve();
+					});
+				});
+			},
+
+			getCodeUrl() {
+				let that = this; //获取小程序码
+				const query = this.query;
+				let scene = that.pro.id + '_' + query.acid;
+				if (req.getStorage('MERCHANT') && req.getStorage('MERCHANT').id != null) {
+					scene += '_' + req.getStorage('MERCHANT').id;
+					if (req.getStorage('smallShop') && req.getStorage('MERCHANT').id != null) {
+						scene += '_' + req.getStorage('smallShop').id;
+					}
+				}
+				// console.log(scene); //获取小程序码
+				const params = {
+					page: 'activity/newbornDetails/newbornDetails',
+					scene: scene
+				};
+				// console.log('ma--', params);
+				req.getRequest('/api/program/codev', params, url => {
+					that.setData({
+						codeUrl: url
+					});
+				});
+			},
+
+			async loadProudct() {
+				let that = this;
+				await that.loadActivity();
+				const query = that.query;
+				let isShowLoading = false;
+
+				if (!isShowLoading) {
+					req.loadIng('加载中');
+					isShowLoading = true;
+				}
+				req.getRequest('/api/product/detail', {
+					id: query.id
+				}, data => {
+					//富文本图片放大
+					that.nodes = data.detail;
+					let propertiesList = []
+					if (data.propertiesList && data.propertiesList.length > 0) {
+						data.propertiesList.map(it => {
+							propertiesList.push(it.value);
+						})
+					}
+					data.properties = propertiesList.join(' / ')
+					that.setData({
+						bannerUrls: data.images,
+						pro: data,
+						'pro.salePrice': this.act.money,
+						// 'pro.stock': this.act.quantity,
+						'pro.stock': this.act.quantity - this.act.payQuantity,
+						'pro.payQuantity': this.act.payQuantity,
+						'pro.maxBuy': this.act.maxBuy,
+						allShow: true
+					});
+					if (isShowLoading) {
+						uni.hideLoading();
+						isShowLoading = false;
+					}
+					// console.log(this.pro);
+					// that.getCodeUrl();
+				});
+			},
+
+			loadActivity() {
+				const query = this.query;
+				return new Promise((resolve, reject) => {
+					let from = {
+						id: query.acid
+					}
+					if (!this.query.merchantId) {} else {
+						from.merchantId = this.query.merchantId
+					}
+					let userInfo = req.getStorage('userInfo');
+					if(userInfo.listShopBase && userInfo.listShopBase.length >0 ){
+						from.shopId = userInfo.listShopBase[0].id;
+					}
+					req.getRequest('/api/activity/detail', from, data => {
+						// console.log(data);
+						this.getMy();
+						if (data.type == 1) {
+							this.setData({
+								orderType: 2
+							});
+						}
+
+						if (data.type == 2) {
+							this.setData({
+								orderType: 3
+							});
+						}
+
+						if (data.type == 4) {
+							this.setData({
+								orderType: 6
+							});
+						}
+
+						if (data.type == 5) {
+							this.setData({
+								orderType: 7
+							});
+						}
+
+						if (!data || data == 2001) {
+							this.setData({
+								activityEnd: true
+							});
+							return false;
+						} else {
+							this.setData({
+								act: data,
+								isRemind: data.remindId
+							});
+							this.initTimer(data);
+						}
+
+						resolve();
+					});
+				});
+			},
+			// 获取用户信息
+			getuserInfos(data) {
+				let userInfo = req.getStorage('userInfo');
+				if (userInfo && userInfo.listShopBase && userInfo.listShopBase != null && userInfo.listShopBase.length >
+					0) {
+					if (userInfo.listShopBase[0].merchant_id == data.id && data.type != 5) {
+						let url = '/mine/shop/shop?merchantId=' + userInfo.listShopBase[0].merchant_id + '&shopId=' + userInfo.listShopBase[0].id;
+						this.url = url;
+						this.ascription = true;
+					}
+				}
+			},
+			getMy() {
+				let that = this;
+				let userInfo = req.getStorage('userInfo');
+				if(!userInfo || userInfo == null) return false;
+				req.getRequest('/api/user/my', {}, data => {
+					that.isDistriUser = data.isDistriUser;
+				});
+			},
+
+			initTimer(group) {
+				//计时器
+				let _ts = this;
+
+				let nowTime = new Date(group.nowTime.replace(/-/g, '/')).getTime();
+				let startTime = new Date(group.startTime.replace(/-/g, '/')).getTime();
+				let endTime = new Date(group.endTime.replace(/-/g, '/')).getTime();
+				if (!group.start) endTime = startTime;
+				let times = parseInt((endTime - nowTime) / 1000);
+				// console.log(times / 60 / 60);
+				this.timer = setInterval(() => {
+					times--;
+
+					if (times <= 0) {
+						//重新加载列表
+						_ts.setData({
+							'act.end': true
+						});
+
+						return false;
+					}
+
+					let n = utils.formatDayTimes(times);
+
+					_ts.setData({
+						timer: n.split(/:|天/g)
+					});
+				}, 1000);
+			},
+
+			loadDefaultAddress() {
+				if (req.isAuth()) {
+					req.g('/api/address/default', data => {
+						if (data) this.setData({
+							address: data
+						});
+						else this.pointLocation();
+					}, true);
+				} else {
+					this.pointLocation();
+				}
+			},
+
+			toAddress() {
+				app.globalData.openPage('mine/address/address');
+			},
+
+			toMerchant() {
+				if (this.about.User_Limit_Store == 1) {
+
+				} else {
+					app.globalData.openPage('pages/nearby/nearby?isChoose=true');
+				}
+			},
+
+			toactive() {
+				app.globalData.openPage('pages/nearby/nearby');
+			},
+
+			pointLocation() {
+				//定位当前位置
+				let _ts = this;
+
+				QQMapWX.initMap();
+				req.getLocation(res => {
+					QQMapWX.reverseGeocoder(res, data => {
+						_ts.setData({
+							['address.address']: data.address
+						});
+					});
+				});
+			},
+			addCartSuccess(event) {
+				this.setData({
+					'pro.count': parseInt(this.pro.count) + parseInt(event.detail.quantity),
+					isShow: false
+				});
+			},
+
+			atOnceBuy() {
+				// //立即购买
+				if (!this.user) return req.msg('您不是新用户');
+				if (!this.act.start) return req.msg('活动还未开始');
+				if (this.act.end) return req.msg('活动已结束');
+				// this.setData({ isShow: true, isCart: false, popup: this.data.product });
+
+				this.setData({
+					isShow: true,
+					isCart: false,
+					popup: {
+						id: this.pro.id,
+						pic: this.pro.pic,
+						title: this.pro.title,
+						salePrice: this.act.money,
+						stock: this.pro.stock,
+						paramsId: this.pro.paramsId,
+						marketPrice: this.pro.marketPrice,
+						skuId: this.pro.skuId
+					}
+				});
+			},
+
+			/**
+			 * 判断是否为新用户,不是,2秒后为用户跳转至该商品的详情页面
+			 */
+			newuser() {
+				var id = this.query.id;
+
+				if (req.getStorage('userInfo')) {
+					req.postRequest('/api/order/isnew', {}, res => {
+						if (res == 'false') {
+							this.setData({
+								user: false
+							});
+							// wx.showToast({
+							//   title: '您不是新用户,两秒后将为您跳转至该商品页面',
+							//   icon: 'none',
+							//   success: function () {
+							//     setTimeout(function () {
+							//       wx.redirectTo({ url: '/product/detail/detail?id=' + id })
+							//     }, 2000);
+							//   }
+							// })
+						}
+
+						// console.log(res);
+					});
+				}
+			},
+
+			addShopCart() {
+				if (!this.user) return req.msg('您不是新用户');
+				if (this.act.end) return req.msg('活动已结束');
+				this.setData({
+					isShow: true,
+					isCart: true,
+					popup: {
+						id: this.pro.id,
+						pic: this.pro.pic,
+						title: this.pro.title,
+						salePrice: this.act.money,
+						stock: this.pro.stock,
+						paramsId: this.pro.paramsId,
+						marketPrice: this.pro.marketPrice,
+						skuId: this.pro.skuId
+					}
+				});
+			},
+
+			clickCollect() {
+				let _ts = this;
+
+				req.postRequest('/api/collect', {
+					bindId: this.pro.id,
+					type: 1
+				}, data => {
+					_ts.setData({
+						'pro.isCollect': !_ts.pro.isCollect
+					});
+				});
+			},
+
+			goTop: function(e) {
+				// 一键回到顶部
+				if (uni.pageScrollTo) {
+					uni.pageScrollTo({
+						scrollTop: 0
+					});
+				} else {
+					uni.showModal({
+						title: '提示',
+						content: '当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。'
+					});
+				}
+			},
+
+			onShareTimeline() {
+				let merchantId = '';
+				let path = 'id=' + this.query.id + '&acid=' + this.query.acid + '&isShareTimeline=' + true;
+
+				if (!req.getStorage('userInfo').id) {} else {
+					path += '&userId=' + req.getStorage('userInfo').id;
+				}
+
+				// console.log(this.merchantId);
+				let shopId = '';
+
+				if (req.getStorage('MERCHANT') && req.getStorage('MERCHANT').id != null) {
+					path += '&merchantId=' + req.getStorage('MERCHANT').id;
+					merchantId = req.getStorage('MERCHANT').id;
+
+					if (req.getStorage('smallShop') && req.getStorage('MERCHANT').id != null) {
+						path += '&shopId=' + req.getStorage('smallShop').id;
+						shopId = req.getStorage('smallShop').id;
+						merchantId = req.getStorage('smallShop').merchantDTO.id;
+					}
+				}
+
+
+				let url = '/activity/newbornDetails/newbornDetails?' + path;
+				route.share(2, req.getStorage('userInfo').id, url, merchantId, shopId, 8, this.query.acid + '_' + this
+					.query.id);
+				return {
+					title: this.pro.title,
+					query: path,
+					imageUrl: this.pro.pic
+				}; // return {
+				//   title: this.data.pro.title,
+				//   imageUrl: this.data.pro.pic
+				// }
+			},
+
+			hidePopup() {
+				this.setData({
+					isShow: false
+				});
+			},
+			hidePopupLogin(data) {
+				this.isPopupLogin = false;
+			},
+
+			addActivityRemind() {
+				// if (!this.data.user) return req.msg('您不是新用户')
+				// 订阅调用
+
+				req.postRequest('/api/activity/remind', {
+					activityId: this.act.id
+				}, res => {
+					requsetmessage.remind();
+					req.msg('预约成功');
+					this.setData({
+						isRemind: true
+					});
+				});
+			},
+
+			cancelActivityRemind(event) {
+				if (req.header.appId == 'ZQ1VK5oc17I387E') {
+
+				} else {
+					req.postRequest('/api/activity/cancel/remind', {
+						id: this.act.id
+					}, res => {
+						req.msg('取消预约成功');
+						this.setData({
+							isRemind: false
+						});
+					});
+				}
+			},
+
+			showTab: function(e) {
+				this.setData({
+					tabIndex: e.detail
+				});
+			},
+			scoreTab: function(e) {
+				this.form.page = 0;
+				this.setData({
+					current: e.detail,
+					['form.page']: 1
+				});
+			},
+			freshenFun: function(e) {
+				this.setData({
+					freshen: e.detail
+				});
+			},
+
+			// 获取品种保证
+			getGuarantee() {
+				return new Promise((data, rej) => {
+					req.getRequest('/api/config', {}, res => {
+						req.setStorage("configRes", JSON.stringify(res))
+						this.about = res
+						data(res)
+						if (this.merchant && this.merchant.isDefault == 1 || this.query.acid) {
+							// 切割;拿到数组,然后在过滤掉空值
+							if (res.b2c_service_guarantee && res.b2c_service_guarantee != null) {
+								this.setData({
+									guarantee: res.b2c_service_guarantee.split(";").filter(it => {
+										return it = it && it.trim();
+									})
+								});
+							}
+						} else {
+							if (res.o2o_service_guarantee && res.b2c_service_guarantee != null) {
+								this.setData({
+									guarantee: res.o2o_service_guarantee.split(";").filter(it => {
+										return it = it && it.trim();
+									})
+								});
+							}
+						} // if(res.Is_Store_Price_Stock){
+						//   this.setData({Is_Store_Price_Stock:res.Is_Store_Price_Stock})
+						// }
+						if (res.is_open_shop) {
+							this.is_open_shop = res.is_open_shop;
+						}
+
+						if (res.is_open_comments) {
+							this.setData({
+								is_open_comments: res.is_open_comments
+							});
+						} // this.setData({ show_membership_price: res.show_membership_price, Is_Store_Price_Stock: res.Is_Store_Price_Stock, is_open_shop: res.is_open_shop })
+
+					});
+				})
+			},
+			// 是否开启小店
+			isShop() {
+				if (req.getStorage('distribution')) {
+					dist = req.getStorage('distribution')
+					this.setData({
+						distr: dist
+					})
+					console.log(dist)
+					if (dist.distributionSmallShopOpen == 1) {
+						req.postRequest('/api/shopBase/isOpenShop', {}, data => {
+							this.setData({
+								isshop: data
+							})
+							console.log(data)
+						})
+					}
+				}
+			},
+			addShop() { //添加到小店
+				req.postRequest('/api/shopProduct/save', {
+					productId: this.act.id,
+					type: 6
+				}, data => {
+					this.act.isJoinShop = true;
+					this.isHide = false;
+				})
+			},
+			hidePop() { //添加到小店
+				this.setData({
+					isHide: true
+				})
+			},
+
+		}
+	};
+</script>
+<style>
+	@import "./newbornDetails.css";
+</style>

+ 57 - 0
activity/newbornZone/newbornZone.css

@@ -0,0 +1,57 @@
+/* product/newbornZone/newbornZone.wxss */
+page{
+  background: #6254EB;
+}
+.banner{
+  height: 475rpx;
+}
+.background {
+  width: 100%;
+  position:absolute; 
+  background-size:100% 100%;
+  z-index: -1;
+  /* background-attachment:fixed; */
+}
+.conunt {
+  width: 710rpx;
+  margin: 0 auto;
+  position: absolute;
+  /* position: fixed; */
+  top: 380rpx;
+  /* left: 20rpx; */
+  left: 50%;
+  transform: translateX(-50%);
+}
+
+.conunt .li {
+  height: 240rpx;
+  padding: 20rpx;
+  border-radius: 25rpx;
+  background-color: #FFFFFF;
+  margin-bottom: 16rpx;
+  overflow: hidden;
+  display: flex;
+  justify-content: space-between;}
+.conunt .li .flex {overflow: hidden;margin-left: 20rpx;}
+.proimg {width: 220rpx;height: 220rpx;border-radius: 12rpx;margin-top: 10rpx;}
+.proname {font-size: 28rpx;color: #333;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;}
+.endtime {display: inline-block;height: 32rpx;line-height: 32rpx;border-radius: 6rpx;font-size: 24rpx;margin: 16rpx 0 0 0;  letter-spacing:2rpx}
+.black{font-size: 24rpx;color: #333333;}
+.red{color: #FE0419; font-size: 26rpx;}
+.operate {justify-content: space-between;align-items: center;}
+.price {font-size: 24rpx; color: red;}
+.price .pce {font-size: 38rpx;color: red;font-weight: bold;}
+.price .del {font-weight: normal;font-size: 24rpx;color: #999999;margin-left: 12rpx;text-decoration: line-through;}
+.add-cart {width: 150rpx;height: 50rpx;border-radius: 25rpx;background-image: linear-gradient(to right, #FE934C, #FD3A31);text-align: center;line-height: 50rpx;color: #FFFFFF;font-size: 24rpx;}
+.progress-box {justify-content: left;display: flex;color: #999999;font-size: 24rpx;margin-top: 13rpx;}
+.progress-box text{color: #999999;font-size: 24rpx;margin-left: 10rpx;}
+.progress {width: 230rpx;}
+.tp{margin: 16rpx 0 70rpx;}
+.add-cart .order{float:left;margin-left: 8rpx;}
+.add-cart .or{margin-left: 28rpx;color: #FE0419;}
+.add-cart1{width: 150rpx;height: 50rpx;border-radius: 25rpx;border: 2rpx solid #FE0419;text-align: center;line-height: 50rpx;color: #FE0419;font-size: 24rpx;}
+.nosp{color: #FFFFFF;}
+.add-cart image{width: 24rpx;height: 24rpx;margin-left: 35rpx;margin-top: 13rpx;float: left;}
+.yuyue{margin: 90rpx 0 0 0;}
+.noyuyue{margin: 50rpx 0 0 0;}
+.nosp text{color: #FFFFFF !important;}

+ 310 - 0
activity/newbornZone/newbornZone.vue

@@ -0,0 +1,310 @@
+<template>
+<view>
+<!--product/newbornZone/newbornZone.wxml-->
+<view class="banner">
+	<image src="/activity/static/activity/images/nbzbg.png" class="background"></image>
+</view>
+<view class="conunt" v-if="activityGroup.length > 0">
+	<view v-for="(item, index) in activityGroup" :key="index" class="li" :data-index="index">
+		<image :src="item.pic + '?x-oss-process=style/w210'" mode="aspectFit" class="proimg" :data-index="index" @tap="toGroupRemind" lazy-load="true"></image>
+		<view class="flex">
+			<view class="proname" :data-index="index" @tap="toGroupRemind">
+				{{item.productName}}
+			</view>
+			<view class="progress-box" v-if="item.payQuantity">
+				<progress stroke-width="8" color="red" :percent="item.num" border-radius="25rpx" backgroundColor="#FFB2B8" class="progress" v-if="item.payQuantity"></progress><text>已抢{{item.payQuantity}}</text>
+			</view>
+			<view class="progress-box" v-if="item.makePerson">
+				<progress stroke-width="8" color="red" :percent="item.makePerson" border-radius="25rpx" backgroundColor="#FFB2B8" class="progress" v-if="item.makePerson"></progress><text>已{{item.makePerson}}人预约</text>
+			</view>
+			<view class="endtime" :data-index="index" @tap="toGroupRemind"><text class="black">{{item.start ? '距结束' : '距开始'}}</text><text class="red">{{item.times}}</text></view>
+			<view :class="'operate dflex ' + (item.payQuantity?'noyuyue':'yuyue')" v-if="item.start">
+				<view class="price proprice" :data-index="index" @tap="toGroupRemind">¥<text class="pce">{{item.money}}</text><text class="del">¥{{item.marketPrice}}</text></view>
+				<view class="add-cart" :data-index="index" @tap="toGroupRemind">
+					立即抢购
+				</view>
+			</view>
+			<view :class="'operate dflex ' + (item.makePerson?'noyuyue':'yuyue')" v-else>
+				<view class="price proprice" :data-index="index" @tap="toGroupRemind">¥<text class="pce">{{item.money}}</text><text class="del">¥{{item.marketPrice}}</text></view>
+				<view :class="(item.isRemind?'add-cart1':'add-cart') + ' car'">
+					<image src="/activity/static/activity/images/clock2.png" v-if="!item.isRemind"></image>
+					<view class="order or" @tap="cancelActivityRemind" :data-index="index" :data-id="item.id" v-if="item.isRemind">取消预约</view>
+					<view class="order" @tap="addActivityRemind" :data-index="index" :data-id="item.id" v-else>预约</view>
+				</view>
+			</view>
+		</view>
+	</view>
+	<!-- <view class="nomore dflex">亲,没有更多了</view> -->
+</view>
+<view class="nodata nosp" v-if="ishow">
+	<image :src="picUrlss+'empty_sp.png'"></image>
+	<text >暂无商品</text>
+</view>
+</view>
+</template>
+
+<script>
+// product/newbornZone/newbornZone.js
+const req = require("../../utils/request.js");
+const utils = require("../../utils/util.js");
+const requsetmessage = require("../../utils/requestmessage.js");
+const app = getApp();
+
+export default {
+  data() {
+    return {
+		picUrlss: req.public.picUrls,
+      form: {
+        page: 1,
+        limit: 10,
+        type: 4
+      },
+      page: 1,
+      isLoad: true,
+      newuser: true,
+      activityGroup: [],
+      query: "",
+      ishow: false,
+      user: false
+    };
+  },
+
+  components: {},
+  props: {},
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+    this.query = options;
+    this.setData({
+      query: options
+    }); // this.newuser()
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+    this.isLoad = true;
+    this.form.page = 1; // this.data.activityGroup=[]
+
+    this.setData({
+      activityGroup: []
+    });
+    // console.log(this.activityGroup);
+    this.loadGroup();
+  },
+
+  onReachBottom() {
+    this.form.page++;
+    this.loadGroup();
+  },
+
+  onHide() {
+    this.clearAllTimer();
+  },
+
+  methods: {
+    /**
+     * 获取商品列表
+     */
+    loadGroup() {
+      let isShowLoading = false;
+
+      if (this.form.page == 1 && !isShowLoading) {
+        req.loadIng('加载中');
+        isShowLoading = true;
+      }
+
+      let _ts = this;
+
+      // console.log(this.isLoad);
+      if (!this.isLoad) return false;
+      this.isLoad = false;
+      let from = this.form;
+
+      if (this.query.merchantId) {
+        from.merchantId = this.query.merchantId;
+      } else if (req.getStorage('MERCHANT')) {
+        from.merchantId = req.getStorage('MERCHANT').id;
+      }
+
+      req.getRequest('/api/activity/list', from, data => {
+        if (data && data.length == 10) this.isLoad = true;
+        data = data.map(it => {
+          it.isRemind = it.remindId, it.num = it.payQuantity / it.quantity * 100;
+          return it;
+        });
+        if (_ts.form.page > 1) data = _ts.activityGroup.concat(data);
+
+        _ts.setData({
+          activityGroup: data
+        });
+
+        // console.log(this.activityGroup);
+
+        if (this.activityGroup.length <= 0) {
+          _ts.setData({
+            ishow: true
+          });
+        } else {
+          _ts.setData({
+            ishow: false
+          });
+        }
+
+        if (isShowLoading) {
+          uni.hideLoading();
+          isShowLoading = false;
+        } // this.clearAllTimer();
+
+
+        _ts.initGroupTimer();
+
+        // console.log(this.activityGroup);
+      });
+    },
+
+    initGroupTimer() {
+      //社区拼图定时器
+      let _ts = this;
+
+      if (this.activityGroup && this.activityGroup.length > 0) {
+        let activityGroup = this.activityGroup;
+        const initPage = (parseInt(this.form.page) - 1) * 10;
+
+        for (let i = initPage, len = activityGroup.length; i < len; i++) {
+          let group = activityGroup[i];
+          let nowTime = new Date(group.nowTime.replace(/-/g, '/')).getTime();
+          let startTime = new Date(group.startTime.replace(/-/g, '/')).getTime();
+          let endTime = new Date(group.endTime.replace(/-/g, '/')).getTime();
+          if (!group.start) endTime = startTime;
+          let times = parseInt((endTime - nowTime) / 1000);
+          let timer = setInterval(() => {
+            times--;
+            let data = {};
+
+            if (times === 0) {
+              //重新加载列表
+              data['activityGroup[' + i + '].end'] = true;
+              clearInterval(timer);
+            } else {
+              let n = utils.formatDayTimes(times);
+              data['activityGroup[' + i + '].times'] = n;
+            }
+
+            _ts.setData(data);
+          }, 1000);
+          let fs = [];
+          fs['activityGroup[' + i + '].timer'] = timer;
+
+          _ts.setData(fs);
+        }
+      }
+    },
+
+    /**
+     * 
+     * 点击li获取商品详情
+     */
+    toGroupRemind(event) {
+      const index = event.currentTarget.dataset.index;
+      // console.log(event);
+      const activity = this.activityGroup[index];
+      let merchantId;
+
+      if (this.query.merchantId) {
+        merchantId = this.query.merchantId;
+      } else if (req.getStorage('MERCHANT')) {
+        merchantId = req.getStorage('MERCHANT').id;
+      }
+	  let url='activity/newbornDetails/newbornDetails?acid=' + activity.id + "&id=" + activity.productId
+	  
+	  if(!merchantId){
+		  
+	  }else{
+		  url +="&merchantId=" + merchantId
+	  }
+
+      app.globalData.openPage(url); // console.log('acid', activity.id)
+      // console.log('productId', activity.productId)
+    },
+
+    /**
+     * 活动产品预约
+     */
+    addActivityRemind(event) {
+      // if (!this.data.user) return req.msg('您不是新用户')
+      const index = event.currentTarget.dataset.index;
+      const id = event.currentTarget.dataset.id; // 订阅调用
+
+      
+      req.postRequest('/api/activity/remind', {
+        activityId: id
+      }, res => {
+		  this.requsetmessage.remind();
+        req.msg('预约成功');
+        let data = {};
+        data['activityGroup[' + index + '].isRemind'] = true;
+        this.setData(data);
+      });
+    },
+
+    cancelActivityRemind(event) {
+      const index = event.currentTarget.dataset.index;
+      const id = event.currentTarget.dataset.id;
+	  if(req.header.appId=='ZQ1VK5oc17I387E'){
+	  		  
+	  }else{
+		req.postRequest('/api/activity/cancel/remind', {
+		  id: id
+		}, res => {
+		  req.msg('取消预约成功');
+		  let data = {};
+		  data['activityGroup[' + index + '].isRemind'] = false;
+		  this.setData(data);
+		});  
+	  }
+    },
+
+    clearAllTimer() {
+      this.activityGroup.forEach(it => {
+        clearInterval(it.timer);
+        clearInterval(it.times);
+      });
+    },
+
+    /**
+     * 判断是否为新用户,不是,2秒后为用户跳转至该商品的详情页面
+     */
+    newuserFun() {
+      id = this.query.id;
+      req.postRequest('/api/order/isnew', {}, res => {
+        if (res == 'false') {
+          this.setData({
+            user: false
+          });
+          uni.showToast({
+            title: '您不是新用户,两秒后将为您跳转至该商品页面',
+            icon: 'none',
+            success: function () {
+              setTimeout(function () {
+                uni.redirectTo({
+                  url: '/product/detail/detail?id=' + id
+                });
+              }, 2000);
+            }
+          });
+        }
+
+        // console.log(res);
+      });
+    }
+
+  }
+};
+</script>
+<style>
+@import "./newbornZone.css";
+</style>

+ 123 - 0
activity/seckill/seckill.css

@@ -0,0 +1,123 @@
+/* product/seckill/seckill.wxss */
+
+.seckill {
+  width: 100%;
+  height: 100%;
+  font-size: 24rpx;
+}
+
+.top {
+  height: 352rpx;
+  width: 100%;
+
+}
+.background {
+  width: 100%;
+  height: 352rpx;
+  position:absolute; 
+  background-size:100% 100%;
+  /*  #ifndef  H5  */
+  z-index: -1;
+   /*  #endif   */
+}
+.tab {
+  padding:35rpx 0;
+  /* height: 100rpx; */
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+}
+
+.tab .logo {
+  width: 100rpx;
+  height: 100rpx;
+  float: left;
+}
+
+/* .tab .li {
+  color: #999;
+  text-align: center;
+  color: #FCBDC9;
+  height:100rpx;
+  line-height: 53rpx;
+  float: left;
+} */
+
+/* .tab .li text{
+  width: 152rpx;
+  font-weight: bold;
+  font-size: 26rpx;
+} */
+
+.times .li.active {
+  color: #FFFFFF;
+  font-size: 32rpx;
+}
+.weight{
+  font-weight: bold;
+}
+.times .bg {
+  background-color: #FFFFFF;
+  color: #FE0419 !important;
+}
+
+.times .state {
+  width: 100rpx;
+  height: 36rpx;
+  border-radius: 25rpx;
+  color: #FCBDC9;
+  text-align: center;
+  font-size: 24rpx;
+  line-height: 36rpx;
+  margin: auto;
+  margin-top: 3rpx;
+}
+
+.conunt {
+  width: 710rpx;
+  margin: 0 auto;
+  position: absolute;
+  top: 14%;
+  left: 20rpx;
+}
+
+.conunt .li {
+  height: 240rpx;
+  padding: 20rpx;
+  border-radius: 25rpx;
+  background-color: #FFFFFF;
+  margin-bottom: 16rpx;
+  overflow: hidden;
+  display: flex;
+  justify-content: space-between;}
+.conunt .li .flex {overflow: hidden;margin-left: 20rpx;}
+.proimg {width: 220rpx;height: 220rpx;border-radius: 12rpx;margin-top: 10rpx;}
+.proname {font-size: 28rpx;color: #333;line-height: 36rpx;height: 72rpx;/* text-overflow: ellipsis;white-space: nowrap; */overflow: hidden;}
+.endtime {display: inline-block;height: 32rpx;line-height: 32rpx;border-radius: 6rpx;font-size: 24rpx;margin: 16rpx 0 0 0;letter-spacing:2rpx}
+.black{font-size: 24rpx;color: #333333;}
+.tp{margin: 16rpx 0 70rpx;}
+.red{color: #FE0419;}
+.operate {justify-content: space-between;align-items: center;}
+.price {font-size: 24rpx; color: red;}
+.price .pce {font-size: 38rpx;color: red;font-weight: bold;}
+.price .del {font-weight: normal;font-size: 24rpx;color: #999999;margin-left: 12rpx;text-decoration: line-through;}
+.add-cart {width: 150rpx;height: 50rpx;border-radius: 25rpx;background-image: linear-gradient(to right, #FF5D5D, #FE0419);text-align: center;line-height: 50rpx;color: #FFFFFF;font-size: 24rpx;}
+.add-cart1{width: 150rpx;height: 50rpx;border-radius: 25rpx;border: 2rpx solid #FE0419;text-align: center;line-height: 50rpx;color: #FE0419;font-size: 24rpx;}
+.car{margin-top: -24rpx;}
+.progress-box {justify-content: left;display: flex;color: #999999;font-size: 24rpx;margin-top: 13rpx;}
+.progress-box text{color: #999999;font-size: 24rpx;margin-left: 10rpx;}
+.progress {width: 230rpx;}
+.add-cart image{width: 24rpx;height: 24rpx;margin-left: 35rpx;margin-top: 13rpx;float: left;}
+.add-cart .order{float:left;margin-left: 8rpx;}
+.add-cart .or{margin-left: 28rpx;color: #FE0419;}
+.date{font-size: 24rpx;color: #333;}
+.hour{font-size: 24rpx;color: #FE0419;}
+.yuyue{margin: 54rpx 0 0 0;}
+.noyuyue{margin: 30rpx 0 0 0;}
+
+.times{ flex: 1;}
+.times .li{width: 20%;text-align: center;font-size: 20rpx;color: #999;position: relative;}
+.times .li::before{content: '';display: block;width: 2rpx;height: 61rpx;background: #D2D2D2;position: absolute;left: 0;bottom: 5rpx;}
+.times .li:first-child::before{display: none;}
+.times .li text{display: block;font-size: 29rpx;color: #333;margin-bottom: 5rpx;}
+/* .times .li.active,.times .li.active text{color: #FE0419;} */

+ 585 - 0
activity/seckill/seckill.vue

@@ -0,0 +1,585 @@
+<template>
+	<!--product/seckill/seckill.wxml-->
+	<view class="seckill">
+		<view class="top">
+			<image src="/activity/static/activity/images/seckillbg.png" class="background"></image>
+			<view class=" tab">
+				<image src="/activity/static/activity/images/seckill.png" class="logo"></image>
+				<view class="times dflex">
+					<view v-for="(item, index) in TabList" :key="index"
+						:class="'li ' + (item.active ? 'active' : '') + ' left'" :data-index="index" @tap="switchTab">
+						<text :class="item.active ? 'weight' : ''">{{item.label}}</text>
+						<view :class="'state ' + (item.active? 'bg' :'')">{{item.state}}</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="conunt" v-if="activityGroup.length > 0">
+			<view v-for="(item, index) in activityGroup" :key="index" class="li" :data-index="index">
+				<image :src="item.pic + '?x-oss-process=style/w210'" lazy-load="true" mode="aspectFit" class="proimg"
+					:data-index="index" @tap="toGroupRemind"></image>
+				<view class="flex">
+					<view class="proname" :data-index="index" @tap="toGroupRemind">
+						{{item.productName}}
+					</view>
+					<view class="progress-box" v-if="item.payQuantity&&item.start">
+						<progress stroke-width="8" color="red" :percent="item.num" border-radius="25rpx"
+							backgroundColor="#FFB2B8" class="progress"
+							v-if="item.payQuantity"></progress><text>已抢{{item.payQuantity}}</text>
+					</view>
+					<view class="progress-box" v-if="item.makePerson&&!item.start">
+						<progress stroke-width="8" color="red" :percent="item.makePerson" border-radius="25rpx"
+							backgroundColor="#FFB2B8" class="progress"
+							v-if="item.makePerson"></progress><text>已{{item.makePerson}}人预约</text>
+					</view>
+					<view class="endtime " :data-index="index" @tap="toGroupRemind" v-if="item.start"><text
+							class="black">{{item.start ? '距结束' : '距开始'}}</text><text class="red">{{item.times}}</text>
+					</view>
+					<view class="endtime" :data-index="index" @tap="toGroupRemind" v-else>
+						<text class="date">{{item.date}}</text>
+						<text class="hour">{{item.hour}}</text>
+						<text class="date">开始</text>
+					</view>
+					<view :class="'operate dflex ' + (item.payQuantity?'noyuyue':'yuyue')" v-if="item.start">
+						<view class="price proprice" :data-index="index" @tap="toGroupRemind">¥<text
+								class="pce">{{item.money}}</text><text class="del"
+								v-if="item.marketPrice!=0&&item.money<item.marketPrice">¥{{item.marketPrice}}</text>
+						</view>
+						<view class="add-cart" :data-index="index" @tap="toGroupRemind">
+							立即抢购
+						</view>
+					</view>
+					<view :class="'operate dflex ' + (item.makePerson?'noyuyue':'yuyue')" v-else>
+						<view class="price proprice" :data-index="index" @tap="toGroupRemind">¥<text
+								class="pce">{{item.money}}</text><text class="del">¥{{item.marketPrice}}</text></view>
+						<view :class="(item.isRemind?'add-cart1':'add-cart') + ' car'">
+							<image src="/activity/static/activity/images/clock2.png" v-if="!item.isRemind"></image>
+							<view class="order or" @tap="cancelActivityRemind" :data-index="index" :data-id="item.id"
+								v-if="item.isRemind">取消预约</view>
+							<view class="order" @tap="addActivityRemind" :data-index="index" :data-id="item.id" v-else>
+								预约</view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="nodata" v-if="ishow">
+			<image :src="picUrlss+'empty_sp.png'"></image>
+			<text>暂无商品</text>
+		</view>
+	</view>
+</template>
+
+<script>
+	// product/seckill/seckill.js
+	const app = getApp();
+	const req = require("../../utils/request.js");
+	const utils = require("../../utils/util.js");
+	const requsetmessage = require("../../utils/requestmessage.js");
+
+	export default {
+		data() {
+			return {
+				picUrlss: req.public.picUrls,
+				TabList: [{
+					label: '今天',
+					active: true,
+					state: "抢购中",
+					dayType: 1,
+					time: ''
+				}, {
+					label: '明天',
+					state: "预热中",
+					active: false,
+					time: '',
+					dayType: 2
+				}, {
+					label: '后天',
+					state: "预热中",
+					dayType: 3,
+					time: ''
+				}, {
+					label: '',
+					state: "预热中",
+					dayType: 4,
+					active: false,
+					time: ''
+				}, {
+					label: '',
+					state: "预热中",
+					dayType: 5,
+					active: false,
+					time: ''
+				}],
+				form: {
+					page: 1,
+					limit: 10,
+					type: 2,
+					dayType: 1
+				},
+				isRemind: false,
+				page: 1,
+				isLoad: true,
+				dayType: '',
+				activityGroup: [],
+				ishow: false,
+				activityGroupAll: "",
+				hasmore: ""
+			};
+		},
+
+		components: {},
+		props: {},
+
+		/**
+		 * 生命周期函数--监听页面加载
+		 */
+		onLoad: function(options) {
+			// this.loadGroupAll();
+			this.query = options;
+			// this.getTime();//给tab添加动态时间
+			this.initTab();//初始化tab时间
+			this.loadGroupAll(); // this.setData({TabList[3].label:})
+			// this.laterDay(4)[2]
+		},
+		onReady: function() {},
+
+		/**
+		 * 生命周期函数--监听页面显示
+		 */
+		onShow: function() {
+			// this.isLoad = true;
+			this.form.page = 1; // this.setData({activityGroup:[]})
+		},
+
+		/**
+		 * 生命周期函数--监听页面隐藏
+		 */
+		onHide: function() { // this.clearAllTimer();
+			// let def = this.data.TabList.findIndex(it => it.active);
+			// let d={}
+			// d[`TabList[${def}].active`] = false;
+			// this.setData(d);
+		},
+
+		/**
+		 * 生命周期函数--监听页面卸载
+		 */
+		onUnload: function() { // this.clearAllTimer();
+		},
+
+		/**
+		 * 页面相关事件处理函数--监听用户下拉动作
+		 */
+		onPullDownRefresh: function() {},
+
+		/**
+		 * 页面上拉触底事件的处理函数
+		 */
+		onReachBottom: function() {
+			// this.setData({})
+			this.form.page++;
+
+			this.loadGroupAll(1); // this.clearAllTimer();
+			// console.log(this.form.page)
+		},
+
+
+		methods: {
+			fun_data(aa){
+				var date1 = new Date(),
+				time1=date1.getFullYear()+"-"+(date1.getMonth()+1)+"-"+date1.getDate();//time1表示当前时间
+				var date2 = new Date(date1);
+				date2.setDate(date1.getDate()+aa);
+				// var time2 = date2.getFullYear()+"-"+(date2.getMonth()+1)+"-"+date2.getDate();
+				var time2 = (date2.getMonth()+1)+"月"+date2.getDate() + "日";
+				return time2;
+			},
+			// 初始化tab导航
+			initTab(){
+				let tabList = this.TabList;
+				tabList[3].label = this.fun_data(4);
+				tabList[4].label = this.fun_data(5);
+			},
+			/**
+			 * 
+			 * 设置tab导航
+			 */
+			switchTab(event) {
+				let index = event.currentTarget.dataset.index;
+				let def = this.TabList.findIndex(it => it.active);
+				let d = {};
+				// console.log(index, def);
+				d[`TabList[${def}].active`] = false;
+				d[`TabList[${index}].active`] = true;
+				// console.log(d);
+				this.isLoad = true;
+				this.form.page = 1;
+				d['pageList'] = [];
+				this.form.dayType = this.TabList[index].dayType;
+				this.setData(d);
+				this.loadGroupAll(1);
+				this.clearAllTimer(); // this.getDate()
+			},
+			/**
+			 * 获取所有产品列表
+			 */
+			loadGroupAll(type) {
+				// console.log(this.isLoad)
+				let isShowLoading = false;
+
+				if (this.form.page == 1 && !isShowLoading) {
+					req.loadIng('加载中');
+					isShowLoading = true;
+				}
+				if (!this.isLoad) return false;
+				this.isLoad = false;
+				let _ts = this;
+				let from = this.form
+				if (this.query.merchantId) {
+					from.merchantId = this.query.merchantId;
+				} else if (req.getStorage('MERCHANT')) {
+					from.merchantId = req.getStorage('MERCHANT').id;
+				}
+				req.getRequest('/api/activity/list', from, res => {
+					if (res && res.length == 10) _ts.isLoad = true;
+					if (from.page > 1) res = _ts.activityGroup.concat(res);
+					let data = res;
+					// var data = res.map(it => {
+					// 	var allTime = this.getDate(it.startTime);
+					// 	it.isRemind = it.remindId, it.num = it.sellStock / it.quantity * 100, it.date =
+					// 		allTime.date, it.hour =
+					// 		allTime.date1, it.year = new Date(allTime.date2).getTime();
+					// 	return it;
+					// });
+					// console.log(data, _ts.isLoad);
+					console.log(data.length)
+					if (data.length <= 0) {
+						_ts.ishow =  true;
+						// return false;
+					}else{
+						_ts.ishow =  false;
+					}
+					console.log(isShowLoading)
+					this.activityGroup = data;
+					// if (type == 1) {
+					// 	_ts.setData({
+					// 		activityGroup: data,
+					// 		hasmore: res && res.length > 0
+					// 	});
+					// } else {
+					// 	data.sort(function(a, b) {
+					// 		return Date.parse(a.startTime) - Date.parse(b.startTime);
+					// 	});
+
+					// 	/**
+					// 	 * 商品日期排序
+					// 	 */
+
+					// 	var arr = [];
+					// 	var allTime = {}
+					// 	for (var i = 0; i < data.length; i++) {
+					// 		if (data[i].end != true && data[i].start == true) {
+					// 			allTime = this.getDate(data[i].nowTime);
+					// 		} else {
+					// 			allTime = this.getDate(data[i].startTime);
+					// 		}
+
+					// 		arr.push(allTime.date2);
+					// 	}
+
+					// 	/**
+					// 	 * 数组去重
+					// 	 */
+
+
+					// 	let temp = [...new Set(arr)];
+					// 	/**
+					// 	 * 判断日期
+					// 	 */
+
+					// 	let tabList = [];
+					// 	let list = this.TabList;
+					// 	// console.log(list, tabList);
+
+					// 	for (let i = 0; i < list.length; i++) {
+					// 		tabList.push(list[i].time);
+					// 	}
+
+					// 	/**
+					// 	 * 拿到日期,把空白填补
+					// 	 */
+
+
+					// 	temp.forEach(item1 => {
+					// 		tabList.forEach((item2, j) => {
+					// 			// console.log(item2,item1)
+					// 			if (item2 == item1) {
+					// 				tabList.splice(j, 1);
+
+					// 				if (tabList.length < 6) {
+					// 					tabList.splice(j, 0, 1);
+					// 				}
+
+					// 				j -= 1;
+					// 			}
+					// 		});
+					// 	});
+
+
+					// 	/**
+					// 	 * 删除没有产品的导航栏
+					// 	 */
+					// 	let newlist = [];
+					// 	for (let i = 0; i < list.length; i++) {
+
+					// 		if (tabList[i] == 1) {
+					// 			newlist.push(list[i]);
+					// 		}
+					// 	}
+					// 	// console.log(newlist, list, tabList);
+					// 	if (newlist.length != 0) {
+					// 		// console.log(this.isLoad, "++++++++++++++++++++++++++", newlist[0]);
+					// 		// if (!this.isLoad) return false;
+					// 		// this.isLoad = false;
+					// 		newlist[0]['active'] = true;
+					// 		this.setData({
+					// 			TabList: newlist
+					// 		});
+					// 		var all = new Date().getTime()
+					// 		if (newlist[0].dayType == 1) {
+					// 			_ts.setData({
+					// 				activityGroup: data.filter(it => it.year <= all)
+					// 			});
+					// 		} else {
+					// 			_ts.setData({
+					// 				activityGroup: data.filter(it => it.date == newlist[0].times)
+					// 			});
+					// 		}
+					// 		// console.log(data, all)
+					// 	}
+					// }
+					if (isShowLoading) {
+						uni.hideLoading();
+						isShowLoading = false;
+					}
+					_ts.clearAllTimer();
+					_ts.initGroupTimer();
+				});
+			},
+
+			/**
+			 * 
+			 * 
+			 * 点击li获取商品详情
+			 */
+			toGroupRemind(event) {
+				const index = event.currentTarget.dataset.index; // console.log(event)
+
+				const activity = this.activityGroup[index];
+				let merchantId;
+
+				if (this.query.merchantId) {
+					merchantId = this.query.merchantId;
+				} else if (req.getStorage('MERCHANT')) {
+					merchantId = req.getStorage('MERCHANT').id;
+				}
+				let url = 'activity/seckillDetails/seckillDetails?acid=' + activity.id + "&id=" + activity.productId
+				if (!merchantId) {
+
+				} else {
+					url += "&merchantId=" + merchantId
+				}
+				app.globalData.openPage(url); // console.log('acid', activity.id)
+				// console.log('productId', activity.productId)
+			},
+
+			/**
+			 * 生命周期函数--监听页面初次渲染完成
+			 */
+			initGroupTimer() {
+				//社区拼图定时器
+				let _ts = this;
+
+				if (this.activityGroup && this.activityGroup.length > 0) {
+					let activityGroup = this.activityGroup;
+					for (let i = 0, len = activityGroup.length; i < len; i++) {
+						let group = activityGroup[i];
+						let nowTime = new Date(group.nowTime.replace(/-/g, '/')).getTime();
+						let startTime = new Date(group.startTime.replace(/-/g, '/')).getTime();
+						let endTime = new Date(group.endTime.replace(/-/g, '/')).getTime();
+						if (!group.start) endTime = startTime;
+						let times = parseInt((endTime - nowTime) / 1000);
+						let timer = setInterval(() => {
+							times--;
+							let data = {};
+
+							if (times === 0) {
+								//重新加载列表
+								data['activityGroup[' + i + '].end'] = true;
+								clearInterval(timer);
+							} else {
+								let n = utils.formatDayTimes(times);
+								data['activityGroup[' + i + '].times'] = n;
+							}
+
+							_ts.setData(data); // console.log(data)
+
+						}, 1000);
+						this.activityGroup[i]['timer'] = timer; // let fs = [];
+						// fs['activityGroup[' + i + '].timer'] = timer;
+						// _ts.setData(fs);
+					}
+				}
+			},
+
+			clearAllTimer() {
+				this.activityGroup.forEach(it => clearInterval(it.timer));
+			},
+
+			/**
+			 * 
+			 *  产品活动开始时间转换 year-month-day hour:minute:00
+			 * 
+			 */
+			getDate(str) {
+				var strArr = str.split(' ');
+				var time = strArr[0].toString().split('-');
+				var hose = strArr[1].toString().split(':');
+				var hour = hose[0];
+				var minute = hose[1];
+				var day = time[2];
+				var month = time[1];
+				var year = time[0];
+				var date = (month + '月' + day + '日').toString();
+				var date1 = (hour + ':' + minute).toString();
+				var date2 = strArr[0];
+				var allTime = {
+					date: (month + '月' + day + '日').toString(),
+					date1: (hour + ':' + minute).toString(),
+					date2: strArr[0]
+				}
+				return allTime
+			},
+
+			/**
+			 * 时间转换
+			 */
+			getda(str) {
+				var strArr = str.split('-');
+				var day = strArr[2];
+				var month = strArr[1];
+				var year = strArr[0];
+				var date = (month + '月' + day + '日').toString();
+				return date;
+			},
+
+			/**
+			 * 活动产品预约
+			 */
+			addActivityRemind(event) {
+				const index = event.currentTarget.dataset.index;
+				const id = event.currentTarget.dataset.id; // 订阅调用
+
+
+				req.postRequest('/api/activity/remind', {
+					activityId: id
+				}, res => {
+					requsetmessage.remind(res => {
+						// console.log(res, "11111111111");
+					});
+					req.msg('预约成功');
+					let data = {};
+					data['activityGroup[' + index + '].isRemind'] = true;
+					this.setData(data);
+				});
+			},
+
+			cancelActivityRemind(event) {
+				const index = event.currentTarget.dataset.index;
+				const id = event.currentTarget.dataset.id;
+				if (req.header.appId == 'ZQ1VK5oc17I387E') {
+
+				} else {
+					req.postRequest('/api/activity/cancel/remind', {
+						id: id
+					}, res => {
+						req.msg('取消预约成功');
+						let data = {};
+						data['activityGroup[' + index + '].isRemind'] = false;
+						this.setData(data);
+					});
+				}
+			},
+
+			/**
+			 * 获取当前时间往后退四天
+			 */
+			laterDay(num) {
+				var t = new Date();
+				var iToDay = t.getDate();
+				var iToMon = t.getMonth();
+				var iToYear = t.getFullYear();
+				var arr = [];
+				var day = []
+
+				for (var i = 1; i < num + 1; i++) {
+					var newDate = new Date(iToYear, iToMon, iToDay + i);
+					arr.push(newDate.getFullYear() + '-' + (newDate.getMonth() + 1).toString().padStart(2, '0') + "-" +
+						newDate.getDate()
+						.toString().padStart(2, '0'));
+					day.push((newDate.getMonth() + 1).toString().padStart(2, '0') + "月" + newDate.getDate()
+						.toString().padStart(2, '0') + "日"
+					)
+				} // console.log(arr)
+				var obj={
+					arr:arr,
+					day:day
+				}
+		
+				return obj;
+			},
+
+			/**
+			 * 给tab添加动态时间
+			 */
+			getTime() {
+				const data = this.TabList;
+				var t = new Date();
+				var iToDay = t.getDate().toString().padStart(2, '0');
+				var iToMon = (t.getMonth() + 1).toString().padStart(2, '0');
+				var iToYear = t.getFullYear();
+				const rq = (iToYear + '-' + iToMon + '-' + iToDay).toString();
+				const rq5 = (iToMon + '月' + iToDay + '日').toString()
+				const rq1 = this.laterDay(4).arr[0];
+				const rq6 =this.laterDay(4).day[0]
+				const rq2 = this.laterDay(4).arr[1];
+				const rq7 =this.laterDay(4).day[1]
+				const rq3 = this.laterDay(4).arr[2];
+				const rq8 =this.laterDay(4).day[2]
+				const rq4 = this.laterDay(4).arr[3]; // console.log("rq" + "---", rq1, rq2, rq3, rq4)
+				const rq9 =this.laterDay(4).day[3]
+
+				data[0].time = rq;
+				data[0].times = rq5;
+				data[1].time = rq1;
+				data[1].times = rq6;
+				data[2].time = rq2;
+				data[2].times = rq7;
+				data[3].label = this.getda(rq3);
+				data[3].time = rq3;
+				data[3].times = rq8;
+				data[4].label = this.getda(rq4);
+				data[4].time = rq4;
+				data[4].times = rq9;
+				this.setData({
+					TabList: data
+				}); // console.log(this.data.TabList)
+			},
+
+		}
+	};
+</script>
+<style>
+	@import "./seckill.css";
+</style>

+ 113 - 0
activity/seckillDetails/seckillDetails.css

@@ -0,0 +1,113 @@
+/* product/groupSeckill/groupSeckill.wxss */
+.banner{overflow: hidden;position: relative;}
+.swiper,.swiper image{width: 100%;height: 750rpx;}
+.dots{position: absolute;left: 0;right: 0;bottom: 11rpx;align-items: center;justify-content: center;}
+.dot{background:var(--mina) ;width: 10rpx;height: 10rpx;border-radius: 5rpx;margin: 0 3rpx;}
+.dot.active{width: 30rpx;}
+.group{position: relative;height: 120rpx;}
+.ptbg{width: 100%;height: 120rpx;position: absolute;top: 0;left: 0;z-index: 1;}
+.origin text{font-weight: bold; font-size: 24rpx !important ;}
+.groups{position: relative;z-index: 2;align-items: center;padding: 0 30rpx;justify-content: space-between;height: 120rpx;}
+.price{font-size: 28rpx;color: #FE0419;}
+.price text{font-size: 48rpx;font-weight: bold;}
+.price text.origin{font-weight: normal;font-size: 24rpx;color: #999;text-decoration: line-through;margin-left: 10rpx;}
+.left .price,.left .price text.origin{color: #fff;}
+.pin{font-size: 24rpx;color: #fff;}
+.tuan{width: 154rpx;height: 40rpx;float: right;}
+.endtime{align-items: center;font-size: 24rpx;color: #fff;line-height: 36rpx;margin-top: 47rpx;overflow: hidden;clear: both;}
+.endtime view{margin-right: 15rpx;}
+.endtime text{display: block;width:36rpx;height:36rpx;background:rgba(0, 0, 0, 0.4);border-radius:6rpx;font-size: 24rpx;color: #fff;text-align: center;line-height: 36rpx;margin:0 5rpx;}
+.info{padding: 30rpx 30rpx 40rpx;}
+.infos{align-items: center;justify-content: space-between;}
+.share{font-size: 24rpx;color: #999;text-align: center;position: relative;margin-left: 45rpx !important;}
+.share::after{content: '';display: block;width: 2rpx;height: 45rpx;background: #e7e7e7;position: absolute;top: 50%;transform: translateY(-50%);left: -30rpx;}
+.share image{width: 31rpx;height: 31rpx;margin: 0 auto 10rpx;}
+.title{font-size: 30rpx;color: #222;line-height: 40rpx;font-weight: bold;}
+.tag{width: 82rpx;height: 36rpx;display: inline-block;margin: 0 10rpx 0 0;position: relative;top: 7rpx;}
+.detinfo .item{padding: 30rpx;border-bottom: 1rpx solid #f6f6f6;}
+.detinfo .item:last-child{border-bottom: none;}
+.item label{display: block;width: 130rpx;font-size: 28rpx;color: #222;font-weight: bold;line-height: 40rpx;}
+.quan .flex{align-items: center;}
+.quan text{display: block;background: #FDF5F3;padding: 0 13rpx;height: 40rpx;line-height: 40rpx;font-size: 24rpx;color: #FF5F08;margin-right: 10rpx;}
+.ling{font-size: 24rpx;color: #FF5F08;align-items: center;}
+.ling image{width: 14rpx;height: 24rpx;margin-left: 11rpx;}
+.address{font-size: 28rpx;color: #333;line-height: 40rpx;}
+.huo{font-size: 24rpx;color: #666;line-height: 40rpx;}
+.huo text{color: #FE0419;}
+.more{width: 36rpx;height: 10rpx;margin-top: 15rpx;}
+/* .col{
+	width: 30rpx;height: 30rpx;background-repeat: no-repeat;background-size: 30rpx;line-height: 30rpx;float: left;margin-top: 25rpx;margin-left: 20rpx;}
+.red{background-repeat: no-repeat;background-size: 30rpx;line-height: 30rpx;float: left;margin-top: 25rpx;margin-left: 20rpx;width: 30rpx;height: 30rpx;} */
+.dis{display: flex;justify-content: space-between;}
+.more{width: 36rpx;height: 10rpx;margin-top: 15rpx;}
+.more1{width: 12rpx; height: 22rpx;}
+.txt{margin-left: 14rpx;}
+.gmbtn1{border: 2rpx solid #FE0419; width: 430rpx;height: 77rpx;border-radius: 40rpx ;text-align: center;line-height: 80rpx;font-size: 30rpx;color: #FE0419;background-color: #FFFFFF;}
+/* .user{width: 68rpx;height: 68rpx;border-radius: 50%;margin-right: 15rpx;} */
+.name{font-size: 28rpx;color: #666;line-height: 68rpx;justify-content: space-between;align-items: center;}
+.pinglun{font-size: 28rpx;color: #333;margin: 15rpx 0 0;line-height: 44rpx;}
+.huifu{background: #F2F2F2;border-radius: 6rpx;margin: 25rpx 0 0;line-height: 42rpx;padding: 20rpx 30rpx;position: relative;}
+.huifu::after{content: '';display: block;width: 0;height: 0;border: 9rpx solid transparent;border-bottom-color: #F2F2F2;border-top: none;position: absolute;top: -8rpx;left: 39rpx;}
+.show{display: block;}
+.hide{display: none;}
+.bot{height: 80rpx;align-items: center;padding: 20rpx 30rpx 20rpx 0; display: flex; justify-content: space-around;}
+.botbtn{font-size: 22rpx;color: #6A6A6A;width: 108rpx !important;text-align: center;position: relative;}
+.botbtn image{width: 40rpx;height: 34rpx;margin: 10rpx auto 5rpx;}
+.message{background: #DF1A14;height: 28rpx;line-height: 28rpx;font-size: 24rpx;color: #fff;text-align: center;border-radius: 15rpx;box-sizing: border-box;min-width: 21rpx;padding: 0 8rpx;position: absolute;top: 0;right: 25%;}
+.gmbtn{width: 430rpx;height: 80rpx;text-align: center;line-height: 80rpx;font-size: 30rpx;color: #fff;border-radius:40rpx}
+.addcart{width: 206rpx;height: 76rpx;border: 2rpx solid #FD3C31;border-radius: 40rpx;text-align: center;line-height: 76rpx;font-size: 30rpx;color: #FD3A31;margin: 0 10rpx;}
+.background {
+  width: 30rpx;
+  height: 30rpx;
+  position:absolute; 
+	background-size:100% 100%;
+	margin-top: 2rpx;
+  /* z-index: -1; */
+}
+.ico{width: 30rpx;height: 30rpx;}
+/* .flot{float: left;} */
+/* 小店相关 */
+.xiaodian{position: relative;height: 122rpx;padding: 0 26rpx 0 110rpx;align-items: center;margin: 35rpx 30rpx 0;}
+.xdbg{position: absolute;left: 0;top: 0;width: 100%;height: 100%;z-index: 1;}
+.shouyi{position: relative;z-index: 2;color: #fff;margin-right: 10rpx;}
+.shouyi view{font-size: 40rpx;font-weight: bold;margin-top: 8rpx;}
+.shouyi text{font-weight: normal;font-size: 24rpx;}
+.addshop{height: 62rpx;padding: 0 25rpx;border-radius: 31rpx;background:linear-gradient(115deg,rgba(255,78,78,1) 0%,rgba(220,21,21,1) 100%);text-align: center;line-height: 62rpx;font-size: 24rpx;color: #fff;position: relative;z-index: 2;}
+.fenxiang{height: 62rpx;padding: 0 25rpx;margin-left: 15rpx;border-radius: 31rpx;background:linear-gradient(115deg,rgba(255,78,78,1) 0%,rgba(220,21,21,1) 100%);text-align: center;line-height: 62rpx;font-size: 24rpx;color: #fff;position: relative;z-index: 2;}
+.goShop{height: 62rpx;padding: 0 25rpx;margin-left: 15rpx;border-radius: 31rpx;background:linear-gradient(115deg,rgba(255,78,78,1) 0%,rgba(220,21,21,1) 100%);text-align: center;line-height: 62rpx;font-size: 24rpx;color: #fff;position: relative;z-index: 2;}
+
+.suc{position: fixed;left: 50%;top: 50%;transform: translate(-50%,-50%);background: #fff;width: 536rpx;border-radius: 20rpx;z-index: 100;text-align: center;padding-bottom: 47rpx;}
+.tjcg1{width: 100%;height: 284rpx;}
+.tjcg{width: 195rpx;height: 38rpx;margin: 52rpx auto 15rpx;}
+.suc text{display: block;font-size: 24rpx;color: #333;}
+.shopcc{justify-content: center;}
+.shop{width:220rpx;height:80rpx;background:linear-gradient(123deg,rgba(255,130,130,1) 0%,rgba(220,21,21,1) 100%);font-size: 30rpx;color: #fff;line-height: 80rpx;border-radius: 40rpx;margin: 45rpx 15rpx 40rpx;}
+.wxfriend,.wxposter{width: 196rpx !important;height: 76rpx !important;align-items: center;justify-content: center;font-size: 30rpx;color: #666;border: 2rpx solid #D8D8D8;border-radius: 40rpx !important;}
+.wxfriend image,.wxposter image{width: 31rpx;height: 31rpx;margin-right: 13rpx;}
+.suc-close{position: absolute;left: 50%;transform: translateX(-50%);bottom: -102rpx;width: 62rpx;height: 62rpx;}
+.sellStock{text-align: right; color: #999;position: relative; left: 145rpx;}
+.sellStock text{ color:#222 ;}
+.protext{color: #999;margin-top: 15rpx;overflow:hidden; text-overflow:ellipsis;display:-webkit-box; -webkit-box-orient:vertical;-webkit-line-clamp:2; }
+
+.guarantee{border-top: 1rpx solid #f6f6f6;padding: 15rpx 0 0 0; margin-top: 15rpx;}
+.guarantee .cont{flex-wrap: wrap;font-size: 26rpx;}
+.guarantee .cont .li{align-items: center;margin-right: 20rpx;
+  margin-bottom: 10rpx;}
+.guarantee .cont image{        width: 30rpx;
+  height: 30rpx;}
+.addcart{width: 206rpx;height: 76rpx;border: 2rpx solid #FD3C31;border-radius: 40rpx;text-align: center;line-height: 76rpx;font-size: 30rpx;color: #FD3A31;margin: 0 10rpx;}
+.gmbtnyuyue {
+  width: 400rpx;
+  height: 80rpx;
+  border-radius: 40rpx;
+  text-align: center;
+  line-height: 80rpx;
+  font-size: 30rpx;
+  color: #fff;
+}
+.gmbtn{width: 210rpx;height: 80rpx;border-radius: 40rpx;text-align: center;line-height: 80rpx;font-size: 30rpx;color: #fff;}
+.gray{color: #999;border-color: #999;}
+
+.pro-sel{align-items: center;}
+.pro-sel .flex{text-overflow: ellipsis;white-space: nowrap;overflow: hidden;}
+.mrico{width: 16rpx;height: 27rpx;}

+ 1077 - 0
activity/seckillDetails/seckillDetails.vue

@@ -0,0 +1,1077 @@
+<template>
+	<view v-if="allShow">
+		<!--product/groupSeckill/groupSeckill.wxml-->
+		<view class="banner">
+			<swiper class="swiper" @change="swiperChange" :current="current" autoplay="true" circular="true"
+				duration="1000">
+				<block v-for="(item, index) in bannerUrls" :key="index">
+					<swiper-item autoplay="true">
+						<image :src="item + '?x-oss-process=style/w750-auto'" mode="aspectFit"></image>
+					</swiper-item>
+				</block>
+			</swiper>
+			<view class="dots dflex">
+				<block v-for="(item, index) in bannerUrls" :key="index">
+					<view :class="'dot ' + (index == swiperCurrent ? ' active' : '')" :data-current="index"
+						@tap="dotEvent"></view>
+				</block>
+			</view>
+		</view>
+		<!-- <view class="notification_bar" wx:if="{{isNotice}}">
+	<swiper class="swiper_container" vertical="true" autoplay="true" circular="false" duration="1000" interval="5000" easing-function="easeInOutCubic" class="bar_box dflex">
+		<swiper-item class="bar_con dflex" wx:for="{{contentList}}" wx:key="item">
+			<view class="bar dflex">
+				<image class="bar_left" src="{{item.pic}}" />
+				<text class="bar_text">最新订单来自</text>
+				<text class="bar_text">{{item.name}},</text>
+				<text class="bar_text">{{item.time}}</text>
+			</view>
+		</swiper-item>
+	</swiper>
+</view> -->
+		<view class="group">
+			<image src="/activity/static/activity/images/msbg.png" class="ptbg" v-if="act.start"></image>
+			<image src="/activity/static/activity/images/msyybg.png" class="ptbg" v-else></image>
+			<view class="groups dflex">
+				<view class="left">
+					<view class="price">¥<text>{{act.money}}</text>
+						<text class="origin"
+							v-if="pro.marketPrice!=0&&pro.marketPrice>act.money">¥<text>{{pro.marketPrice}}</text></text>
+					</view>
+					<view class="pin">{{act.person?act.person:'0'}}人已参与</view>
+				</view>
+				<view class="right">
+					<image src="/activity/static/activity/images/seckillDetails.png" class="tuan"></image>
+					<view class="endtime dflex">
+						<view>{{act.start?'距结束还剩':'距开始还剩'}}</view>
+						<block v-if="timer[0] !==0"><text>{{timer[0]}}</text>{{timer.length>=4?'天':':'}}</block>
+						<text>{{timer[1]}}</text>:
+						<text>{{timer[2]}}</text>{{timer.length>=4?':':''}}
+						<text v-if="timer.length>=4">{{timer[3]}}</text>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="info bgfff">
+			<view class="infos dflex">
+				<view class="title flex">
+					<!-- <image src="/pages/images/jishida.png" class="tag" wx:if="{{pro.isTimely === 1}}"></image> -->
+					{{pro.title?pro.title:'0'}}
+				</view>
+				<view class="share" @tap="showShare">
+					<image src="/static/pages/images/fxico.png"></image>分享
+				</view>
+			</view>
+			<view class="guarantee dflex" v-if="guarantee.length>0">
+				<view class="cont dflex">
+					<view v-for="(item, index) in guarantee" :key="index" class="dflex li">
+						<image src="/activity/static/activity/images/guarantee.png"></image>{{item}}
+					</view>
+				</view>
+			</view>
+			<!-- <view class="xiaodian dflex" wx:if="{{hideShop&&distr.distributionSmallShopOpen==1&&isshop==1}}">
+		<image src="/pages/images/xdbg1.png" class="xdbg"></image>
+		<view class="shouyi flex">
+			<text>销售收益</text>
+			<view>8.65<text>元</text></view>
+		</view>
+		<view class="addshop" bindtap="addShop">添加到小店</view>
+	</view> -->
+		</view>
+
+		<view class="detinfo mt20 bgfff">
+			<!-- isOtc 0 默认 1 处方药 2 非处方药 3 医疗器械 4 食品类 5 海外购 -->
+			<block v-if="act.isOtc!=5">
+			<block v-if="is_open_shop == 1 && ascription">
+			<view class="xiaodian dflex malr20" v-if="((act.isMeCommission != 1 || act.isMeCommission != '1') && act.oneCommission>0) || ((act.isMeCommission == 1 || act.isMeCommission == '1') && act.twoCommission>0) || act.serviceShopRate">
+				<image src="/static/pages/images/xdbg1.png" class="xdbg"></image>
+				<view class="shouyi flex" v-if="((act.isMeCommission != 1 || act.isMeCommission != '1') && act.oneCommission>0) || ((act.isMeCommission == 1 || act.isMeCommission == '1') && act.twoCommission>0)">
+					<text>分销收益</text>
+					<view v-if="act.isMeCommission == 0"><text>¥</text>{{act.oneCommission}}</view>
+					<view v-else><text>¥</text>{{act.twoCommission}}</view>
+				</view>
+				<view class="shouyi flex" v-if="act.serviceShopRate">
+					<text>小店服务费</text>
+					<view><text>¥</text>{{act.serviceShopRate}}</view>
+				</view>
+				<view class="dflex" v-if="act.isJoinShop">
+					<view class="fenxiang" @tap="showShare">分享推广</view>
+					<navigator :url="url" hover-class="none" class="goShop">去小店</navigator>
+				</view>
+				<view class="addshop" @tap="addShop" v-else>添加到小店</view>
+			</view>
+			</block>
+			<block v-else>
+			<view class="xiaodian dflex malr20" v-if="((act.isMeCommission != 1 || act.isMeCommission != '1') && act.oneCommission>0) || ((act.isMeCommission == 1 || act.isMeCommission == '1') && act.twoCommission>0)">
+				<image src="/static/pages/images/xdbg1.png" class="xdbg"></image>
+				<view class="shouyi flex">
+					<text>分销收益</text>
+					<view v-if="act.isMeCommission == 0"><text>¥</text>{{act.oneCommission}}</view>
+					<view v-else><text>¥</text>{{act.twoCommission}}</view>
+				</view>
+				<navigator url="/promote/apply/apply" hover-class="none" class="fenxiang" v-if="isDistriUser != 2">我要推广</navigator>
+				<view class="fenxiang" @tap="showShare" v-else>分享推广</view>
+			</view>
+			</block>
+			</block>
+			<!-- <view class="item dflex">
+		<label>优惠券</label>
+		<view class="quan flex dflex">
+			<view class="flex dflex">
+				<text>满500减50</text>
+				<text>满200减10</text>
+			</view>
+			<view class="ling dflex">领券<image src="/pages/images/more3.png"></image>
+			</view>
+		</view>
+	</view> -->
+			<view class="item pro-sel dflex" v-if="pro.propertiesList && pro.propertiesList.length > 0"
+				@click="pro.stock > 0 ? addShopCart() : ''">
+				<label>已选</label>
+				<view class="flex">{{pro.properties}}</view>
+				<image src="/static/pages/images/more.png" class="mrico"></image>
+			</view>
+			<view class="item dflex">
+				<label>配送至</label>
+				<view class="flex" @tap="toAddress">
+					<view class="address">{{address.address?address.address:''}}{{address.house?address.house:''}}
+					</view>
+					<!-- <view class="huo" wx:if="{{pro.isTimely == 1}}"><text>现货</text>,现在下单,预计2小时后送达</view> -->
+				</view>
+				<image src="/static/pages/images/more2.png" class="more" @tap="toAddress"></image>
+			</view>
+			<view class="item dflex">
+				<label>提货门店</label>
+				<view class="flex" @tap="toMerchant">
+					<view class="address">{{merchant.title}}</view>
+				</view>
+			</view>
+			<!-- <view class="item dflex">
+		<label>参数</label>
+		<view class="flex dis">
+			<view wx:for="{{params}}" wx:key="index">
+				{{item.name}}
+			</view>
+			<image src="../../pages/images/more.png" class="more1"></image>
+		</view>
+	</view> -->
+		</view>
+
+		<!--  商品详情等页面 -->
+		<product-footer id="list" ref="list" :detail="nodes" :imgs="imgs" :proId="pro.id" v-if="pro.id" :form="form"
+			@showTab="showTab" @scoreTab="scoreTab" @freshen="freshenFun">
+		</product-footer>
+
+		<v-share :hide-toast="hideShare" :product="pro" :code-url="codeUrl" a-type="2" @onFather="click"></v-share>
+
+		<view class="placeholder-view" :style="'height:' + (bottomBlankHeight + 140) + 'rpx'"></view>
+		<view class="bot fixed bgfff dflex" :style="'padding-bottom: ' + (bottomBlankHeight + 20) + 'rpx'">
+			<contact-button img-url="/static/pages/images/kfico.png" class-name="botbtn" button-text="在线客服"></contact-button>
+			<navigator class="botbtn" open-type="switchTab" url="/pages/cart/cart" hover-class="none">
+				<image src="/static/pages/images/gwc.png"></image>购物车<text class="message"
+					v-if="pro.count > 0">{{pro.count}}</text>
+			</navigator>
+			<block v-if="!activityEnd">
+				<block v-if="act.start">
+					<!-- <view class="addcart flot" bindtap="addShopCart">加入购物车</view> -->
+					<view :class="['addcart',act.start? '' : 'gray']" @tap="act.start ? addShopCart() : ''">加入购物车
+					</view>
+					<view class="gmbtn mbglinear flot" @tap="atOnceBuy">{{pro.isOtc==1 ?'预约下单': '立即购买'}}</view>
+				</block>
+				<!-- 
+				<view class="addcart {{pro.state == 1 ? '' : 'gray'}}" bindtap="addShopCart">加入购物车</view>
+	<view class="gmbtn mbglinear" bindtap="atOnceBuy" wx:if="{{act.start}}">立即购买</view> -->
+				<view v-else>
+					<!-- <view class="addcart flot" bindtap="addShopCart">加入购物车</view> -->
+					<view class="gmbtn1   flot" @tap="cancelActivityRemind" v-if="isRemind">
+						<icon class="ico">
+							<image src="/activity/static/activity/images/rednaozhong.png" class="background"></image>
+						</icon>
+						<text class="txt">取消提醒</text>
+					</view>
+					<view class="gmbtnyuyue mbggreen flot" @tap="addActivityRemind" v-else>
+						<icon class="ico">
+							<image src="/activity/static/activity/images/clock2.png" class="background"></image>
+						</icon>
+						<text class="txt">预约提醒</text>
+					</view>
+				</view>
+			</block>
+			<block v-else>
+				<view class="gmbtnyuyue mbggray">活动不存在</view>
+			</block>
+		</view>
+
+		<!-- 商品规格 -->
+		<block v-if="isShow">
+			<product-popup :product="popup" :activityId="act.id" :is-cart="isCart" @hidePopup="hidePopup"
+				@add-cart-success="addCartSuccess" :order-type="orderType" :merchant="merchant" :actId="act.actId"
+				:merchant-id="query.merchantId" :shop-id="query.shopId" @getPor="getPor"></product-popup>
+		</block>
+
+		<view class="contact_index" @tap="goTop">
+			<image src="/static/pages/images/backtop.png"></image>顶部
+		</view>
+
+		<!-- 添加到小店成功 -->
+		<view class="mask" :hidden="isHide" @tap="hidePop"></view>
+		<view class="suc" :hidden="isHide">
+			<image src="/static/pages/images/tjcg1.png" class="tjcg1"></image>
+			<image src="/static/pages/images/tjcg.png" class="tjcg"></image>
+			<text>快去我的小店看看吧</text>
+			<view class="shopcc dflex">
+				<view class="shop" @tap="showShare">分享推广</view>
+				<navigator :url="url" hover-class="none" class="shop" >我的小店</navigator>
+			</view>
+			<!-- <view class="share-btn dflex">
+				<button class="wxfriend dflex" open-type="share">
+					<image src="/static/pages/images/wechat.png"></image>
+					微信好友
+				</button>
+				<view class="wxposter dflex" @tap="generatePoster">
+					<image src="/static/pages/images/poster.png"></image>
+					生成海报
+				</view>
+			</view> -->
+			<image src="/static/pages/images/close2.png" class="suc-close" @tap="hidePop"></image>
+		</view>
+		<block v-if="isPopupLogin">
+			<product-login :about="about" @hidePopupLogin="hidePopupLogin"></product-login>
+		</block>
+	</view>
+</template>
+
+<script>
+	const app = getApp();
+	const req = require("../../utils/request.js");
+	const utils = require("../../utils/util.js");
+	var QQMapWX = require("../../utils/qqmap.js");
+	const requsetmessage = require("../../utils/requestmessage.js");
+	const route = require("../../utils/route");
+	const api = require("../../utils/api");
+	import productFooter from "../../components/product_footer/index";
+	import productPopup from "../../components/product-popup/index";
+	import vShare from "../../components/share/share";
+	import productLogin from "../../components/product-login/index";
+
+	export default {
+		data() {
+			return {
+				bottomBlankHeight: app.globalData.isIPhoneX ? 68 : 0,
+				swiperCurrent: 0,
+				bannerUrls: [],
+				isShow: false,
+				pro: {},
+				timer: [],
+				orderType: '',
+				isRemind: false,
+				hideShare: true,
+				isCart: false,
+				codeUrl: '',
+				hideShop: true,
+				//隐藏添加到小店
+				isHide: true,
+				//添加小店成功弹窗
+				url: '/mine/shop/shop?userId=' + req.getStorage('userInfo').id,
+				contentList: [{
+					pic: "/static/pages/images/bar.png",
+					name: '好风依旧',
+					time: '4秒前'
+				}, {
+					pic: "/static/pages/images/bar.png",
+					name: '杨鑫',
+					time: '20秒前'
+				}, {
+					pic: "/static/pages/images/bar.png",
+					name: '杨鑫',
+					time: '5秒前'
+				}],
+				isNotice: false,
+				form: {
+					page: 1,
+					limit: 10
+				},
+				freshen: true //是否更新页面
+					,
+				current: "",
+				query: "",
+				merchant: "",
+				merchantId: "",
+				shopId: "",
+				imgs: "",
+				activityEnd: false,
+				act: "",
+				address: {},
+				popup: {},
+				params: "",
+				tabIndex: "",
+				guarantee: "",
+				is_open_comments: "",
+				nodes: "",
+				switch: true,
+				about: {},
+				allShow: false,
+				url:'',
+				is_open_shop: '',//商户是否开启分销
+				ascription: false,//是否开启小店
+				isDistriUser: 0, // 判断用户是否是分销员 2为分销员
+				isPopupLogin: false
+			};
+		},
+
+		components: {
+			productFooter,
+			productPopup,
+			vShare,
+			productLogin
+		},
+		props: {},
+		onLoad: function(options) {
+			console.log('秒杀详情==' + JSON.stringify(options));
+			this.query = options;
+			this.setData({
+				query: options
+			});
+
+			if (options.scene) {
+				this.scene = options.scene;
+			}
+
+			if (options.isShare) {
+				this.query.id = options.id;
+				this.query.acid = options.acid;
+				req.setStorage('pidCode', options.userId);
+				let params = {
+					userId: options.userId,
+					merchantId: options.merchantId ? options.merchantId : '',
+				}
+				this.bindUser(params);
+			}
+
+			if (options.hideShop) {
+				// console.log(options.hideShop);
+				this.setData({
+					hideShop: false
+				});
+			}
+
+			// console.log(this.hideShop);
+			// console.log(options);
+			setInterval(() => {
+				this.setData({
+					isNotice: true
+				});
+			}, 10000); // this.isShop()
+		},
+		onShow: async function() {
+			console.log("7899")
+			let that = this
+			if (this.freshen) {
+				console.log("rty")
+				if (that.scene) {
+					await this.loadCodeParams();
+				}
+				if(that.scene){
+					await that.bindUser(that.query);
+				}
+				// this.getMerchant();
+				this.getGuarantee().then(data => {
+					// console.log(data)
+					if (this.switch) {
+						api.getMerchant(this.query, req, data => {
+							// console.log(data)
+							that.loadDefaultAddress();
+							if (data == 1) {
+								api.locationShow()
+							} else {
+								that.getuserInfos(data);
+								if (data.type == 5) {
+									that.query.merchantId = data.merchantDTO.id
+									that.query.shopId = data.id
+								} else {
+									that.query.merchantId = data.id
+								}
+
+								if (req.getStorage('userInfo') && that.merchant.id != data.id) {
+									console.log(1, that.merchant, data)
+									let pages = getCurrentPages();
+									var prevPage = pages[pages.length - 2];
+									if (prevPage) {
+										prevPage.$vm.setData({
+											freshen: true
+										});
+									}
+								} else {
+									console.log(2, this.freshen, this.switch)
+									// this.loadProudct();
+								}
+								this.loadProudct();
+								that.merchant = data
+							}
+						})
+					}
+				})
+				await this.browsRecound(this.query.id);
+			}
+		},
+
+		onUnload() {
+			if (this.timer) clearInterval(this.timer);
+		},
+
+		onShareAppMessage: function() {
+			let merchantId = '';
+			let path = '/activity/seckillDetails/seckillDetails?id=' + this.query.id + '&acid=' + this.query.acid +
+				'&isShare=' + true;
+			// console.log(!req.getStorage('userInfo').id);
+
+			if (!req.getStorage('userInfo').id) {} else {
+				path += '&userId=' + req.getStorage('userInfo').id;
+			}
+
+			// console.log(this.query.merchantId);
+			let shopId = '';
+			if (req.getStorage('MERCHANT') && req.getStorage('MERCHANT').id != null) {
+				path += '&merchantId=' + req.getStorage('MERCHANT').id;
+				merchantId = req.getStorage('MERCHANT').id;
+
+				if (req.getStorage('smallShop') && req.getStorage('MERCHANT').id != null) {
+					path += '&shopId=' + req.getStorage('smallShop').id;
+					shopId = req.getStorage('smallShop').id;
+					merchantId = req.getStorage('smallShop').merchantDTO.id;
+				}
+			}
+			// console.log(path)
+			route.share(1, req.getStorage('userInfo').id, path, merchantId, shopId, 6, this.query.acid + '_' + this
+				.query.id);
+			return {
+				title: this.pro.title,
+				imageUrl: this.pro.pic,
+				path: path
+			};
+		},
+		onUnload: function() {},
+
+		onReachBottom() {
+			if (this.is_open_comments == 1 && this.tabIndex == 2) {
+				this.form.page++;
+				this.setData({
+					['form.page']: this.form.page
+				});
+				// this.selectComponent("#list").loadScore(this.current);
+				this.$refs.list.loadScore(this.current);
+			}
+		},
+
+		methods: {
+			bindUser(par){
+				let userInfo = req.getStorage('userInfo');
+				if(!userInfo){
+					// uni.login({
+					// 	success(res) {
+					// 		let params = {
+					// 			code: res.code,
+					// 			parentId: par.userId,
+					// 			merchantId: par.merchantId ? par.merchantId : par.shopId ? par.shopId : ''
+					// 		}
+					// 		return new Promise((resolve,reject)=>{
+					// 			req.postRequest('/api/v2/login', params, data => {
+					// 				resolve();
+					// 			});
+					// 		})
+					// 	}
+					// });
+					// this.isPopupLogin = true;
+					req.silenceLogin(par.userId, par.merchantId ? par.merchantId : par.shopId ? par.shopId : '');
+				}
+			},
+			click(e) {
+				// console.log(e)
+				this.hideShare = e
+			},
+			showShare() {
+				// #ifndef H5
+				req.isLogin().then(success => {
+					if (success) {
+
+						this.getCodeUrl()
+
+						this.setData({
+							hideShare: false
+						});
+					}
+				});
+				// #endif
+			},
+
+			/**
+			 * 轮播切换
+			 */
+			swiperChange({
+				detail
+			}) {
+				if (this.current == 0 && this.swiperCurrent > 1) {
+					//卡死时,重置current为正确索引
+					this.setData({
+						current: this.swiperCurrent
+					});
+				} else {
+					//正常轮转时,记录正确页码索引
+					this.setData({
+						swiperCurrent: detail.current
+					});
+				}
+			},
+
+			dotEvent(e) {
+				this.setData({
+					current: e.currentTarget.dataset.current
+				});
+			},
+
+			browsRecound(id) {
+				let from = {
+					bindId: id,
+					type: 6,
+					page: '/activity/seckillDetails/seckillDetails?id=' + this.query.id + '&acid=' + this.query.acid
+				};
+
+				if (this.query.isShare) {
+					from.shareType = 1;
+					from.page = '/activity/seckillDetails/seckillDetails?id=' + this.query.id + '&acid=' + this.query
+						.acid + '&isShare=' + true;
+
+					if (!this.query.userId) {} else {
+						from.page += '&userId=' + this.query.userId;
+					}
+
+					if (!this.query.merchantId) {} else {
+						from.merchantId = this.query.merchantId;
+					}
+
+					if (!this.query.shopId) {} else {
+						from.shopId = this.query.shopId;
+					}
+
+					if (!this.query.userId) {} else {
+						from.uid = this.query.userId;
+					}
+				}
+
+				if (this.query.isShareTimeline) {
+					from.shareType = 2;
+					from.page = '/activity/seckillDetails/seckillDetails?id=' + this.query.id + '&acid=' + this.query
+						.acid + '&isShareTimeline=' + true;
+
+					if (!this.query.userId) {} else {
+						from.page += '&userId=' + this.query.userId;
+					}
+
+					if (!this.query.merchantId) {} else {
+						from.merchantId = this.query.merchantId;
+					}
+
+					if (!this.query.shopId) {} else {
+						from.shopId = this.query.shopId;
+					}
+
+					if (!this.query.userId) {} else {
+						from.uid = this.query.userId;
+					}
+				}
+				return new Promise((resolve,reject)=>{
+					req.postRequest('/api/browse', from, data => {resolve()});
+				})
+			},
+
+			loadCodeParams() {
+				let _ts = this;
+
+				return new Promise((resolve, reject) => {
+					if (!_ts.scene) {
+						resolve();
+						return false;
+					}
+
+					req.getRequest('/api/code/params', {
+						scene: _ts.scene
+					}, data => {
+						if (data) {
+							_ts.query.id = data.scene.split('_')[0];
+							_ts.query.acid = data.scene.split('_')[1];
+							_ts.query.merchantId = data.scene.split('_')[2];
+							_ts.query.shopId = data.scene.split('_')[3];
+							_ts.query.userId = data.userId;
+							req.setStorage('pidCode', data.userId);
+						}
+						resolve();
+					});
+				});
+			},
+
+			getCodeUrl() {
+				let that = this; //获取小程序码
+				const query = this.query;
+				let scene = that.pro.id + '_' + query.acid;
+				if (req.getStorage('MERCHANT') && req.getStorage('MERCHANT').id != null) {
+					scene += '_' + req.getStorage('MERCHANT').id;
+					if (req.getStorage('smallShop') && req.getStorage('MERCHANT').id != null) {
+						scene += '_' + req.getStorage('smallShop').id;
+					}
+				}
+				// console.log(scene); //获取小程序码
+				const params = {
+					page: 'activity/seckillDetails/seckillDetails',
+					scene: scene
+				};
+				// console.log('ma--', params);
+				req.getRequest('/api/program/codev', params, url => {
+					that.setData({
+						codeUrl: url
+					});
+				});
+			},
+
+			async loadProudct() {
+				let that = this;
+				await that.loadActivity();
+				const query = that.query;
+				let isShowLoading = false;
+
+				if (!isShowLoading) {
+					req.loadIng('加载中');
+					isShowLoading = true;
+				}
+				req.getRequest('/api/product/detail', {
+					id: query.id
+				}, data => {
+					//富文本图片放大
+					that.nodes = data.detail;
+					let propertiesList = []
+					if (data.propertiesList && data.propertiesList.length > 0) {
+						data.propertiesList.map(it => {
+							propertiesList.push(it.value);
+						})
+					}
+					data.properties = propertiesList.join(' / ')
+					that.setData({
+						bannerUrls: data.images,
+						pro: data,
+						'pro.salePrice': this.act.money,
+						// 'pro.stock': this.act.quantity,
+						'pro.stock': this.act.quantity - this.act.payQuantity,
+						'pro.payQuantity': this.act.payQuantity,
+						'pro.maxBuy': this.act.maxBuy,
+						allShow: true
+					});
+					if (isShowLoading) {
+						uni.hideLoading();
+						isShowLoading = false;
+						// this.freshen = false
+					}
+					// console.log(this.pro);
+					// that.getCodeUrl();
+				});
+			},
+
+			loadActivity() {
+				const query = this.query;
+				return new Promise((resolve, reject) => {
+					let from = {
+						id: query.acid
+					}
+					// console.log(this.query.merchantId)
+					if (this.query.merchantId) {
+						from.merchantId = this.query.merchantId
+					}
+					let userInfo = req.getStorage('userInfo');
+					if(userInfo.listShopBase && userInfo.listShopBase.length >0 ){
+						from.shopId = userInfo.listShopBase[0].id;
+					}
+					req.getRequest('/api/activity/detail', from, data => {
+						// console.log(data);
+						this.getMy();
+						if (data.type == 1) {
+							this.setData({
+								orderType: 2
+							});
+						}
+
+						if (data.type == 2) {
+							this.setData({
+								orderType: 3
+							});
+						}
+
+						if (data.type == 4) {
+							this.setData({
+								orderType: 6
+							});
+						}
+
+						if (data.type == 5) {
+							this.setData({
+								orderType: 7
+							});
+						}
+
+						if (!data || data == 2001) {
+							this.setData({
+								activityEnd: true
+							});
+							return false;
+						} else {
+							this.setData({
+								act: data,
+								isRemind: data.remindId
+							});
+							this.initTimer(data);
+						}
+
+						resolve();
+					});
+				});
+			},
+			// 获取用户信息
+			getuserInfos(data) {
+				let userInfo = req.getStorage('userInfo');
+				if (userInfo && userInfo.listShopBase && userInfo.listShopBase != null && userInfo.listShopBase.length >
+					0) {
+					if (userInfo.listShopBase[0].merchant_id == data.id && data.type != 5) {
+						let url = '/mine/shop/shop?merchantId=' + userInfo.listShopBase[0].merchant_id + '&shopId=' + userInfo.listShopBase[0].id;
+						this.url = url;
+						this.ascription = true;
+					}
+				}
+			},
+			getMy() {
+				let that = this;
+				let userInfo = req.getStorage('userInfo');
+				if(!userInfo || userInfo == null) return false;
+				req.getRequest('/api/user/my', {}, data => {
+					that.isDistriUser = data.isDistriUser;
+				});
+			},
+
+			initTimer(group) {
+				//计时器
+				let _ts = this;
+
+				let nowTime = new Date(group.nowTime.replace(/-/g, '/')).getTime();
+				let startTime = new Date(group.startTime.replace(/-/g, '/')).getTime();
+				let endTime = new Date(group.endTime.replace(/-/g, '/')).getTime();
+				if (!group.start) endTime = startTime;
+				let times = parseInt((endTime - nowTime) / 1000);
+				// console.log(times / 60 / 60);
+				this.timer = setInterval(() => {
+					times--;
+					if (times <= 0) {
+						//重新加载列表
+						_ts.setData({
+							'act.end': true
+						});
+						return false;
+					}
+
+					let n = utils.formatDayTimes(times);
+
+					_ts.setData({
+						timer: n.split(/:|天/g)
+					});
+				}, 1000);
+			},
+
+			loadDefaultAddress() {
+				if (req.isAuth()) {
+					req.g('/api/address/default', data => {
+						if (data) this.setData({
+							address: data
+						});
+						else this.pointLocation();
+					}, true);
+				} else {
+					this.pointLocation();
+				}
+			},
+
+			toAddress() {
+				app.globalData.openPage('mine/address/address');
+			},
+
+			toMerchant() {
+				if (this.about.User_Limit_Store == 1) {
+
+				} else {
+					app.globalData.openPage('pages/nearby/nearby?isChoose=true');
+				}
+			},
+
+			toactive() {
+				app.globalData.openPage('pages/nearby/nearby');
+			},
+
+			pointLocation() {
+				//定位当前位置
+				let _ts = this;
+
+				QQMapWX.initMap();
+				req.getLocation(res => {
+					QQMapWX.reverseGeocoder(res, data => {
+						_ts.setData({
+							['address.address']: data.address
+						});
+					});
+				});
+			},
+			addShopCart() {
+				// 加入购物车
+				if (!this.act.start) return req.msg('活动还未开始');
+				if (this.act.payQuantity >= this.act.quantity) return req.msg('活动产品已售罄');
+				if (this.act.end) return req.msg(
+					'活动已结束');
+				this.setData({
+					isShow: true,
+					isCart: true,
+					popup: {
+						id: this.pro.id,
+						pic: this.pro.pic,
+						title: this.pro.title,
+						salePrice: this.act.money,
+						stock: this.pro.stock,
+						paramsId: this.pro.paramsId,
+						marketPrice: this.pro.marketPrice,
+						skuId: this.pro.skuId
+					}
+				});
+			},
+
+			atOnceBuy() {
+				//立即购买
+				if (!this.act.start) return req.msg('活动还未开始');
+				if (this.act.payQuantity >= this.act.quantity) return req.msg('活动产品已售罄');
+				if (this.act.end) return req.msg(
+					'活动已结束');
+				// this.setData({ isShow: true, isCart: false, popup: this.data.product });
+				this.setData({
+					isShow: true,
+					isCart: false,
+					popup: {
+						id: this.pro.id,
+						pic: this.pro.pic,
+						title: this.pro.title,
+						salePrice: this.act.money,
+						stock: this.pro.stock,
+						paramsId: this.pro.paramsId,
+						marketPrice: this.pro.marketPrice,
+						skuId: this.pro.skuId
+					}
+				});
+			},
+
+			addActivityRemind() {
+				// 订阅调用
+
+				req.postRequest('/api/activity/remind', {
+					activityId: this.act.id
+				}, res => {
+					requsetmessage.remind();
+					req.msg('预约成功');
+					this.setData({
+						isRemind: true
+					});
+				});
+			},
+
+			addCartSuccess(event) {
+				this.setData({
+					'pro.count': parseInt(this.pro.count) + parseInt(event.detail.quantity),
+					isShow: false
+				});
+			},
+
+			cancelActivityRemind(event) {
+				if (req.header.appId == 'ZQ1VK5oc17I387E') {
+
+				} else {
+					req.postRequest('/api/activity/cancel/remind', {
+						id: this.act.id
+					}, res => {
+						req.msg('取消预约成功');
+						this.setData({
+							isRemind: false
+						});
+					});
+				}
+			},
+
+			hidePopup() {
+				this.setData({
+					isShow: false
+				});
+			},
+			hidePopupLogin(data) {
+				this.isPopupLogin = false;
+			},
+
+			clickCollect() {
+				let _ts = this;
+
+				req.postRequest('/api/collect', {
+					bindId: this.pro.id,
+					type: 1
+				}, data => {
+					_ts.setData({
+						'pro.isCollect': !_ts.pro.isCollect
+					});
+				});
+			},
+
+			goTop: function(e) {
+				// 一键回到顶部
+				if (uni.pageScrollTo) {
+					uni.pageScrollTo({
+						scrollTop: 0
+					});
+				} else {
+					uni.showModal({
+						title: '提示',
+						content: '当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。'
+					});
+				}
+			},
+			getPor: function(e) {
+				// console.log(e.detail, "qqqqq")
+				this.popup = e.detail
+				this.act.id = e.detail.actId
+			},
+
+			onShareTimeline() {
+				let merchantId = '';
+				let path = 'id=' + this.query.id + '&acid=' + this.query.acid + '&isShareTimeline=' + true;
+
+				if (!req.getStorage('userInfo').id) {} else {
+					path += '&userId=' + req.getStorage('userInfo').id;
+				}
+
+				// console.log(this.merchantId);
+				let shopId = '';
+
+				if (req.getStorage('MERCHANT') && req.getStorage('MERCHANT').id != null) {
+					path += '&merchantId=' + req.getStorage('MERCHANT').id;
+					merchantId = req.getStorage('MERCHANT').id;
+
+					if (req.getStorage('smallShop') && req.getStorage('MERCHANT').id != null) {
+						path += '&shopId=' + req.getStorage('smallShop').id;
+						shopId = req.getStorage('smallShop').id;
+						merchantId = req.getStorage('smallShop').merchantDTO.id;
+					}
+				}
+
+				let url = '/activity/seckillDetails/seckillDetails?' + path;
+				route.share(2, req.getStorage('userInfo').id, url, merchantId, shopId, 6, this.query.acid + '_' + this
+					.query.id);
+				return {
+					title: this.pro.title,
+					query: path,
+					imageUrl: this.pro.pic
+				};
+			},
+
+
+			showTab: function(e) {
+				this.setData({
+					tabIndex: e.detail
+				});
+			},
+			scoreTab: function(e) {
+				this.form.page = 0;
+				this.setData({
+					current: e.detail,
+					['form.page']: 1
+				});
+			},
+			freshenFun: function(e) {
+				this.setData({
+					freshen: e.detail
+				});
+			},
+
+			// 获取品种保证
+			getGuarantee() {
+				return new Promise((data, rej) => {
+					req.getRequest('/api/config', {}, res => {
+						req.setStorage("configRes", JSON.stringify(res))
+						this.about = res
+						data(res)
+						if (this.merchant && this.merchant.isDefault == 1 || this.query.acid) {
+							// 切割;拿到数组,然后在过滤掉空值
+							if (res.b2c_service_guarantee && res.b2c_service_guarantee != null) {
+								this.setData({
+									guarantee: res.b2c_service_guarantee.split(";").filter(it => {
+										return it = it && it.trim();
+									})
+								});
+							}
+						} else {
+							if (res.o2o_service_guarantee && res.b2c_service_guarantee != null) {
+								this.setData({
+									guarantee: res.o2o_service_guarantee.split(";").filter(it => {
+										return it = it && it.trim();
+									})
+								});
+							}
+						} // if(res.Is_Store_Price_Stock){
+						//   this.setData({Is_Store_Price_Stock:res.Is_Store_Price_Stock})
+						// }
+						if (res.is_open_shop) {
+							this.is_open_shop = res.is_open_shop;
+						}
+
+						if (res.is_open_comments) {
+							this.setData({
+								is_open_comments: res.is_open_comments
+							});
+						} // this.setData({ show_membership_price: res.show_membership_price, Is_Store_Price_Stock: res.Is_Store_Price_Stock, is_open_shop: res.is_open_shop })
+
+					});
+				})
+			},
+			// 是否开启小店
+			isShop() {
+				if (req.getStorage('distribution')) {
+					dist = req.getStorage('distribution')
+					this.setData({
+						distr: dist
+					})
+					console.log(dist)
+					if (dist.distributionSmallShopOpen == 1) {
+						req.postRequest('/api/shopBase/isOpenShop', {}, data => {
+							this.setData({
+								isshop: data
+							})
+							console.log(data)
+						})
+					}
+				}
+			},
+			addShop() { //添加到小店
+				req.postRequest('/api/shopProduct/save', {
+					productId: this.act.id,
+					type: 3
+				}, data => {
+					this.act.isJoinShop = true;
+					this.isHide = false;
+				})
+			},
+			hidePop() { //添加到小店
+				this.setData({
+					isHide: true
+				})
+			},
+
+		}
+	};
+</script>
+<style>
+	@import "./seckillDetails.css";
+</style>

二进制
activity/static/activity/images/cha.png


二进制
activity/static/activity/images/clock2.png


二进制
activity/static/activity/images/guarantee.png


二进制
activity/static/activity/images/kanjia.png


二进制
activity/static/activity/images/kanle1.png


二进制
activity/static/activity/images/kanle2.png


二进制
activity/static/activity/images/kjban.jpg


二进制
activity/static/activity/images/kjbg.jpg


二进制
activity/static/activity/images/msbg.png


二进制
activity/static/activity/images/msyybg.png


二进制
activity/static/activity/images/nbzbg.png


二进制
activity/static/activity/images/ptban.jpg


二进制
activity/static/activity/images/ptban1.jpg


二进制
activity/static/activity/images/ptbg.png


二进制
activity/static/activity/images/rednaozhong.png


二进制
activity/static/activity/images/seckill.png


二进制
activity/static/activity/images/seckillDetails.png


二进制
activity/static/activity/images/seckillbg.png


二进制
activity/static/activity/images/share_pintuan.jpg


二进制
activity/static/activity/images/xrzx.png


二进制
activity/static/activity/images/xrzxbg.png


+ 381 - 0
app.css

@@ -0,0 +1,381 @@
+/**app.wxss**/
+/* 济民绿色 00923f */
+/* 通御绿色 008457 */
+/* 佐今明蓝色 0065AC */
+/* 九芝堂 cd0b01 */
+/* 柚荚 fc5c25 */
+/* 焦娇美人 c9136d */
+/* 利省家居 0065AC */
+/* 云助手 00a3ff */
+/* 通御科技 18AAA3 */
+/* 康宁医药 23AC3A */
+/* 四季康来 18AAA3 */
+/* 精戈MALL c30d23 */
+/* 一源有品 00a3ff */
+/* 享团 、仁和 cd0b01  */
+/*清泉云购  cd0b01 */
+/* 乡亲  1796CB*/
+/* 晓琳优品 00923f */
+/* 奥工匠 1582F7 */
+
+@import "./static/iconfont.css";
+@import "./static/stylesheet.css";
+
+page {
+  --mina: #cd0b01;
+  --main: #cd0b01;
+  --btn: #cd0b01;
+  --red: #FE0419;
+  --black: #201d1d;
+  --fff: #fff;
+  --vip:#e6b422;
+  font-size: 28rpx;
+  color: #333;
+  background: #f6f6f6;
+}
+
+button::after {
+  border: none;
+}
+
+button {
+  background: none;
+  border: none;
+  padding: 0 !important;
+  margin: 0 !important;
+  line-height: initial !important;
+  width: auto !important;
+  font-weight: normal !important;
+  height: auto !important;
+  border-radius: 0 !important;
+  overflow: initial;
+}
+
+image {
+  display: block;
+}
+
+.mbgcolor {
+  background: #FE0419;
+}
+
+.sbgcolor {
+  background: var(--mina) !important;
+}
+
+.bgfff {
+  background: #fff;
+}
+
+.mbglinear {
+  background: linear-gradient(90deg, rgba(254, 147, 76, 1), rgba(253, 58, 49, 1));
+}
+
+.mbglinear-gray {
+  background: #999;
+}
+
+
+
+.sbglinear {
+  background: linear-gradient(0deg, rgba(255, 198, 164, 1), rgba(255, 239, 232, 1));
+}
+
+.mbggray {
+  background: linear-gradient(0deg, #e0e0e0, #c4c4c4);
+}
+
+.mbggreen {
+  background: linear-gradient(0deg, #2AE075, #0ECA78, #05C379);
+}
+
+.mcolor {
+  color: #FE0419;
+}
+
+.scolor {
+  color: var(--mina) !important;
+}
+
+.r50 {
+  border-radius: 50%;
+}
+
+.r10 {
+  border-radius: 12rpx;
+}
+
+.r20 {
+  border-radius: 20rpx;
+}
+
+
+.pdlr20 {
+  padding-left: 20rpx;
+  padding-right: 20rpx;
+}
+
+.mlr20 {
+  margin-left: 20rpx;
+  margin-right: 20rpx;
+}
+
+.mb20 {
+  margin-bottom: 20rpx;
+}
+
+.mr20 {
+  margin-right: 20rpx;
+}
+
+.mt20 {
+  margin-top: 20rpx;
+}
+
+
+
+.f26 {
+  font-size: 26rpx;
+}
+
+.f28 {
+  font-size: 28rpx;
+}
+
+.f30 {
+  font-size: 30rpx;
+}
+
+
+
+.dflex {
+  display: flex;
+  display: -webkit-flex;
+}
+
+.flex {
+  flex: 1;
+  -webkit-flex: 1;
+}
+
+
+/* 为空 */
+.nodata {
+  text-align: center;
+  padding: 100rpx 0 40rpx 0;
+  font-size: 30rpx;
+  color: #333;
+}
+
+.nodata image {
+  display: block;
+  width: 352rpx;
+  height: 307rpx;
+  margin: 0 auto 50rpx;
+}
+
+.nodata text {
+  font-size: 28rpx;
+  color: #777;
+}
+
+.nomore {
+  font-size: 24rpx;
+  color: #999;
+  padding: 25rpx 0;
+  align-items: center;
+  justify-content: center;
+}
+
+.nomore::before,
+.nomore::after {
+  display: block;
+  content: '';
+  width: 168rpx;
+  height: 2rpx;
+  background: #e0e0e0;
+}
+
+.nomore::before {
+  margin-right: 50rpx;
+}
+
+.nomore::after {
+  margin-left: 50rpx;
+}
+
+.fixed {
+  position: fixed;
+  left: 0;
+  bottom: 0;
+  right: 0;
+  z-index: 50;
+}
+
+.mask {
+  position: fixed;
+  z-index: 99;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  background: rgba(0, 0, 0, .5);
+}
+
+/* 客服 */
+.contact_index {
+  position: fixed;
+  bottom: 300rpx;
+  right: 20rpx;
+  background: var(--mina) !important;
+  border-radius: 50% !important;
+  width: 100rpx !important;
+  height: 100rpx !important;
+  box-shadow: 0 0 10rpx rgba(86, 86, 86, 0.36);
+  font-size: 22rpx;
+  color: #fff;
+  z-index: 20;
+  text-align: center;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+}
+
+.contact_index image {
+  width: 40rpx;
+  height: 40rpx;
+  margin: 0 auto 5rpx;
+}
+
+/* 列表购物车 */
+.contact_index1 {
+  position: fixed;
+  bottom: 300rpx;
+  right: 30rpx;
+  background: #fff !important;
+  border-radius: 50% !important;
+  width: 75rpx !important;
+  height: 75rpx !important;
+  /* box-shadow: 0 0 10rpx rgba(86,86,86,0.36); */
+  font-size: 18rpx;
+  color: #555;
+  z-index: 20;
+  align-items: center;
+  text-align: center;
+  border: 1rpx solid #eee;
+}
+
+.contact_index1 image {
+  width: 45rpx;
+  height: 45rpx;
+  margin: 15rpx auto;
+}
+
+/* 购物车为空 */
+.nodata_cart {
+  text-align: center;
+  padding: 85rpx 0;
+}
+
+.nodata_cart image {
+  width: 320rpx;
+  height: 307rpx;
+  margin: 0 auto;
+}
+
+.nodata_cart view {
+  font-size: 30rpx;
+  color: #333;
+  margin: 15rpx 0;
+}
+
+.nodata_cart text {
+  display: block;
+  font-size: 18rpx;
+  color: #999;
+}
+
+.nodata_cart navigator {
+  width: 176rpx;
+  height: 66rpx;
+  line-height: 66rpx;
+  border: 2rpx solid #EA6739;
+  border-radius: 35rpx;
+  font-size: 30rpx;
+  color: #EA6739;
+  margin: 40rpx auto 0;
+}
+
+
+/* 通告 */
+.notification_bar {
+  position: fixed;
+  top: 250rpx;
+  left: 20rpx;
+  width: 100%;
+  z-index: 20;
+  height: 100rpx;
+  overflow: hidden;
+}
+
+.bar_box {
+  height: 100rpx;
+}
+
+.bar_con {
+  align-items: center;
+}
+
+.bar {
+  padding-right: 30rpx;
+  align-items: center;
+  background: rgba(0, 0, 0, 0.49);
+  height: 42rpx;
+  line-height: 42rpx;
+  border-radius: 21rpx;
+}
+
+.bar_left {
+  width: 42rpx;
+  height: 42rpx;
+  border-radius: 50%;
+  margin-right: 12rpx;
+}
+
+.bar_text {
+
+  font-size: 18rpx;
+  color: #fff;
+}
+
+.iconfont {
+  display: flex;
+  display: -webkit-flex;
+  align-items: center;
+  justify-content: center;
+}
+
+.color999 {
+  color: #999;
+}
+
+
+.ddflex{display: flex;display: -webkit-flex;align-items: center;flex-wrap: wrap;}
+.fflex{flex: 1;-webkit-flex: 1;overflow: hidden;}
+.tover{text-overflow: ellipsis;white-space: nowrap;overflow: hidden;}
+.tovers{overflow : hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-line-clamp: 2;-webkit-box-orient: vertical;}
+
+
+/* ios底部安全距离-padding */
+.savepadding{
+    padding-bottom: constant(safe-area-inset-bottom);  
+    padding-bottom: env(safe-area-inset-bottom); 
+    /* box-sizing: content-box; */
+}
+
+/* ios底部安全距离-bottom */
+.savebottom{
+    bottom: constant(safe-area-inset-bottom);  
+    bottom: env(safe-area-inset-bottom); 
+}

+ 4 - 0
components/contact-button/index.css

@@ -0,0 +1,4 @@
+/* 底部导航样式 */
+
+
+contact-button{display: block;line-height: initial;}

+ 82 - 0
components/contact-button/index.vue

@@ -0,0 +1,82 @@
+<template>
+	<view>
+		<!-- :class="specClass" :style="'top:' +  contactTop + 'px;'" -->
+		<view :class="[className,classNames]" :style="styles" @click="customerServiceChat" v-if="type == 2">
+			<image lazy-load="true" :src="imgUrl" :mode="imageMode" v-if="imgUrl"></image>
+			<view v-if="buttonText">
+				{{buttonText}}
+			</view>
+		</view>
+		<button open-type="contact" hover-class="none" :class="className" v-else>
+			<image lazy-load="true" :src="imgUrl" v-if="imgUrl"></image>
+			<view v-if="buttonText">{{buttonText}}</view>
+		</button>
+	</view>
+</template>
+
+<script>
+	const app = getApp();
+	const req = require("../../utils/request.js");
+
+	export default {
+		data() {
+			return {
+				chatPrams: {},
+				type: 1
+			};
+		},
+
+		components: {},
+		props: {
+			imgUrl: String,
+			buttonText: String,
+			className: String,
+			classNames: String,
+			styles: String,
+			imageMode: String,
+			isUpdate: {
+				type: Boolean,
+				default: true
+			},
+			productType: {
+				type: Number,
+				default: 0
+			}
+		},
+		watch: {},
+
+		mounted() {
+			// console.log('ready');
+			this.getChatPrams();
+			// this.getChatList();
+		},
+
+		methods: {
+			getChatPrams() {
+				let that = this;
+				let chatPrams = req.getStorage('chatService');
+				if(chatPrams){
+					that.chatPrams = chatPrams;
+					that.type = chatPrams.type;
+					console.log('type==', that.type)
+					that.$forceUpdate();
+				}
+			},
+			customerServiceChat() {
+				let chatPrams = this.chatPrams;
+				wx.openCustomerServiceChat({
+					extInfo: {
+						url: chatPrams.url
+					},
+					corpId: chatPrams.enterpriseId,
+					success(res) {
+						console.log('调用微信客服')
+					}
+				})
+			},
+		}
+	};
+</script>
+<style>
+	@import "./index.css";
+</style>

+ 16 - 0
components/footer-copyright/footer-copyright.css

@@ -0,0 +1,16 @@
+.conts {
+  font-size: 20rpx;
+  color: #999;
+  text-align: center;
+  padding: 30rpx;
+}
+
+.conts .logos {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  margin-top: 8rpx;
+}
+.conts .image{width: 156rpx;height: 40rpx;}
+.phone{display: flex;  align-items: center;
+  justify-content: center;}

+ 54 - 0
components/footer-copyright/footer-copyright.vue

@@ -0,0 +1,54 @@
+<template>
+<!--components/footer-logo/footer-logo.wxml-->
+<view class="conts" :hidden="hidden" @tap="copyrightlogo == 'zhiqiyun' ? toZhiqiyun() : ''">
+
+  <!-- <view class="logos">
+    <image :src="'/static/pages/images/' + copyrightlogo + '.png'" class="image"></image>
+  </view> -->
+  <view class="phone">- 智企云 技术支持 -</view>
+  
+  <!-- <view class="phone">提供技术支持 服务电话:<view bindtap="phone">{{copyrighttel}}</view></view> -->
+</view>
+</template>
+
+<script>
+// components/footer-logo/footer-logo.js
+const req = require("../../utils/request");
+
+export default {
+  data() {
+    return {
+      copyrighttitle: req.public.copyrighttitle,
+      //头部页面背景链接
+      copyrighttel: req.public.copyrighttel,
+      copyrightlogo: req.public.copyrightlogo
+    };
+  },
+
+  components: {},
+  props: {
+    hidden: {
+      type: Boolean
+    }
+  },
+  methods: {
+    phone() {
+      uni.makePhoneCall({
+        phoneNumber: req.public.copyrighttel
+      });
+    },
+
+    toZhiqiyun() {
+      uni.navigateToMiniProgram({
+        appId: 'wx0ecc71add476037a',
+        path: 'pages/index/index',
+        envVersion: req.env.NODE_ENV == 'product' ? 'release' : 'trial'
+      });
+    }
+
+  }
+};
+</script>
+<style>
+@import "./footer-copyright.css";
+</style>

+ 117 - 0
components/goodsList/goodsList.css

@@ -0,0 +1,117 @@
+/* components/topicList/topicList.wxss */
+/* 分块一 */
+.list1 {
+	/* padding: 0 20rpx 20rpx; */
+}
+.list1 .li {background: #fff;border-radius: 12rpx;padding: 20rpx;overflow: hidden;align-items: center;margin-top: 20rpx;}
+.list1 .li:nth-child(1) {margin-top: 0rpx;}
+.list1 .li .title {font-size: 28rpx;color: #333;text-overflow: ellipsis;white-space: nowrap;overflow: hidden}
+.liimg {width: 100%;height: 100%;border-radius: 12rpx;}
+.list1 .li .info {overflow: hidden;
+	/* height: 200rpx; */
+}
+.list1 .li .proname {font-size: 28rpx;color: #333;}
+.yushou{display: inline-block;border: 2rpx solid #FE0419;border-radius: 6rpx;font-size: 22rpx;color: #FE0419;height: 28rpx;line-height: 29rpx;padding: 0 10rpx;vertical-align: top;margin-right: 15rpx;}
+.list1 .li .infos {font-size: 24rpx;color: #999;margin: 0 0 10rpx;
+	/* height: 20rpx; */
+	text-overflow: ellipsis;white-space: nowrap;overflow: hidden;}
+/* .Ninfos {padding: 16rpx 0;} */
+.operate {justify-content: space-between;align-items: center;clear: both;overflow: hidden;margin-top: 15rpx;}
+.price {font-size: 25rpx;color: #FE0419;align-items: center;flex-wrap: nowrap;}
+.price text {font-size: 36rpx;font-weight: bold;}
+.price text.del {font-size: 24rpx !important;color: #999;text-decoration: line-through;margin-left: 15rpx;font-weight: normal !important;}
+.show-vip{margin-bottom: 10rpx;}
+.price .vip,.show-vip .vip {font-size: 24rpx;margin-left: 12rpx;color: var(--vip);border: 1rpx solid;padding: 0 8rpx 2rpx 8rpx;border-radius: 5px;font-weight: normal;}
+.btn {width: 150rpx;height: 50rpx;background: linear-gradient(90deg, rgba(254, 147, 76, 1) 0%, rgba(253, 58, 49, 1) 100%);font-size: 24rpx;color: #fff;text-align: center;line-height: 50rpx;border-radius: 25rpx;}
+/* yml */
+.jsdimgs1 {position: relative;width: 200rpx;height: 200rpx;border-radius: 12rpx;margin-right: 20rpx;overflow: hidden;}
+.jsdimg1 {position: absolute;top: 5rpx;left: 0rpx;width: 82rpx;height: 36rpx;}
+/* 分块二 */
+.list2 {flex-wrap: wrap;
+	/* padding: 0 20rpx 20rpx; */
+}
+.list2 .li {background: #fff;border-radius: 10rpx;width: 345rpx;margin: 20rpx 20rpx 0 0;overflow: hidden;}
+.list2 .li:nth-child(2n) {margin-right: 0;}
+.jsdimgs {width: 345rpx;height: 345rpx;position: relative;overflow: hidden;}
+.jsdpro {width: 100%;height: 100%;border-radius: 10rpx 10rpx 0 0;}
+.proname {font-size: 28rpx;color: #333;}
+.jsdimg {width: 82rpx;height: 36rpx;position: absolute;top: 20rpx;left: 20rpx;z-index: 1;}
+.shouqing{width: 100%;height: 100%;position: absolute;top: 0;left: 0;z-index: 2;}
+.jsdinfo {padding: 15rpx 20rpx 30rpx;}
+.add-cart image {width: 42rpx;height: 42rpx;}
+.list2 .li .price {display: flex;font-size: 24rpx;}
+.list2 .li .price text {font-size: 36rpx;font-weight: bold;}
+.list2 .li .price .vip,.list2 .li .show-vip .vip {font-size: 24rpx;margin-left: 12rpx;color: var(--vip);border: 1rpx solid;padding: 0 8rpx 2rpx 8rpx;border-radius: 5px;font-weight: normal;}
+.list2 .li .show-vip .vip{margin-left: 0;}
+.price .vip .members,.show-vip .vip {font-size: 24rpx !important;font-weight: normal !important;margin-left: 2rpx;}
+.price .vip .sale,.show-vip .vip {font-size: 24rpx !important;font-weight: normal !important;}
+/* 分块三 */
+.list3 {flex-wrap: wrap;
+	/* padding: 0 20rpx 20rpx; */
+}
+.list3 .li {background: #fff;border-radius: 10rpx;width: 220rpx;margin: 20rpx 25rpx 0 0;}
+.list3 .li:nth-child(3n) {margin-right: 0;}
+.list3 .jsdimgs {width: 100%;height: 220rpx;}
+.list3 .li .jsdinfo {padding: 10px 14px 15rpx;}
+.list3 .li .proname {margin-bottom: 10rpx;}
+.list3 .li .price {font-size: 20rpx;}
+.list3 .li .price text {font-size: 28rpx;}
+.list3 .li .jsdimg {top: 0;left: 0;}
+/* 分隔线一 */
+.list4 {padding: 0 20rpx;background: #fff;}
+.list4 .li {border-radius: 0;background-color: none;border-bottom: 2rpx solid #f4f1f4;padding: 20rpx 0;margin-top: 0;}
+.list4 .li:first-child {padding: 0 0 20rpx 0;}
+.list4 .li:last-child {border-bottom: none;}
+/* 分隔线二 */
+.list5 {
+	/* padding: 20rpx; */
+	background: #fff;}
+.list5 .li {width: 355rpx;border-radius: 0;background-color: none;border-top: 2rpx solid #f4f1f4;border-right: 2rpx solid #f4f1f4;margin: 0;box-sizing: border-box;padding-top: 20rpx;}
+.list5 .li:nth-child(2n) {padding-left: 10rpx;border-right: none;}
+.list5 .li:nth-child(3n) {padding-right: 10rpx;}
+.list5 .li:first-child {padding-right: 10rpx;}
+.list5 .li:first-child, .list5 .li:nth-child(2) {padding-top: 0;border-top: none;}
+/* .list5 .li:nth-last-child(2), */
+.list5 .li:last-child {border-bottom: none;}
+.list5 .li .jsdinfo {padding-bottom: 20rpx;}
+.list5 .li:nth-last-child(2) .jsdinfo, .list5 .li:last-child .jsdinfo {padding-bottom: 10rpx;}
+/* 分隔线三 */
+.list6 {
+	/* padding: 20rpx; */
+	background: #fff;}
+.list6 .li {width: 237rpx;border-radius: 0;background-color: none;border-bottom: 2rpx solid #f4f1f4;border-right: 2rpx solid #f4f1f4;margin: 0;box-sizing: border-box;padding: 20rpx 10rpx 0;}
+.list6 .li:nth-child(3n) {padding-right: 0;border-right: none;}
+.list6 .li:first-child, .list6 .li:nth-child(3n+1) {padding-left: 0;}
+.list6 .li:first-child, .list6 .li:nth-child(2), .list6 .li:nth-child(3) {padding-top: 0;}
+/* .list6 .li:nth-last-child(3),
+.list6 .li:nth-last-child(2), */
+.list6 .li:last-child {border-bottom: none;}
+.list6 .li .jsdinfo {padding: 10rpx 10rpx 15rpx;}
+/* 无分隔线 */
+.list7 {background: #fff;margin: 20rpx;border-radius: 12rpx;padding: 0 20rpx 15rpx;}
+.list7 .li {width: 210rpx;margin-right: 22rpx;}
+.list7 .li:nth-child(3n) {margin-right: 0;}
+.list7 .li .jsdinfo {padding: 10rpx 0 15rpx;}
+/* yml  banner图 */
+.banner {margin-bottom: 20rpx;height: 300rpx;overflow: hidden;position: relative;}
+.banner2 {padding: 20rpx;height: 300rpx;overflow: hidden;position: relative;}
+.banner .swiper, .banner .swiper image {width: 100%;height: 300rpx;}
+.banner2 .swiper, .banner2 .swiper image {width: 100%;height: 300rpx;border-radius: 20rpx;}
+.dots {position: absolute;left: 0;right: 0;bottom: 20rpx;align-items: center;justify-content: center;}
+.dot {background: #fff;width: 10rpx;height: 10rpx;border-radius: 5rpx;margin: 0 3rpx;}
+.dot.active {width: 30rpx;}
+.endtimes {display: inline-block;height: 32rpx;line-height: 32rpx;border-radius: 6rpx;padding: 0 8rpx;font-size: 24rpx;color: #FE0419;margin: 15rpx 0 65rpx;}
+.remind {width: 150rpx;height: 50rpx;border-radius: 25rpx;font-size: 24rpx;color: #fff;text-align: center;justify-content: center;line-height: 50rpx;}
+.xiaol {margin-top: 15rpx;line-height: 32rpx;flex-wrap: nowrap;}
+.xiaoll{margin-bottom: 0;}
+.zhuan {float: left;height: 32rpx;font-size: 20rpx;color: #fff;box-sizing: border-box;align-items: center;margin-right: 15rpx;}
+.zhuan text {padding: 0 6rpx;border-radius: 2rpx 0 0 2rpx;background: #C28A4F;height: 32rpx;line-height: 32rpx;}
+.zhuan view {font-size: 22rpx;color: #BF7A40;padding: 0 5rpx 0 2rpx;background: #fff;height: 28rpx;border: 2rpx solid #C08046;border-radius: 0 2rpx 2rpx 0;border-left: none;}
+.yishou {font-size: 24rpx;color: #999;clear: both;overflow: hidden;white-space: nowrap;}
+
+.list-tag{margin-top: 15rpx;height: 32rpx;}
+.list-tag view {height: 30rpx;border: 1px solid var(--main);border-radius: 6rpx;padding: 0 7rpx;font-size: 20rpx;color: var(--main);margin-right: 10rpx;}
+.vip-news{height: 36rpx;background: #222222;border-radius: 8rpx;line-height: 36rpx;flex-wrap: nowrap;margin-right: 12rpx;font-weight: bold;}
+.vip-sale{background: linear-gradient(to right,#f9e0bc,#d9a168);font-size: 20rpx !important;color: #222;height: 36rpx;border-radius: 8rpx 0 0 8rpx;white-space: nowrap;width: 70rpx;text-align: center;}
+.vip-members{padding: 0 8rpx 0 5rpx;font-size: 22rpx !important;color: #fde9cd !important;white-space: nowrap;}
+.list1 .vip-news{margin-right: 0;margin-left: 12rpx;}

+ 568 - 0
components/goodsList/goodsList.vue

@@ -0,0 +1,568 @@
+<template>
+	<!--components/topicList/topicList.wxml-->
+	<view :style="'background-color:' + pageList.backgroundColor + ';'">
+		<!-- 分块版式一 -->
+		<view class="list1" v-if="pageList.displayStyle=='2' && pageList.lineNumber=='1'">
+			<view v-for="(item, index) in pageList.products" :key="index" @tap="goUrl" :data-id="item.id"
+				:data-type="type" :data-index="index" class="li dflex">
+				<view class="jsdimgs1">
+					<image lazy-load="true" :src="item.pic+ '?x-oss-process=style/w750-auto'" mode="aspectFit"
+						class="liimg"></image>
+					<image v-if="item.isJs && about.timely_close != 1" src="/static/pages/images/jishida.png" class="jsdimg1"></image>
+					<image src="../../static/pages/images/shouqing.png" class="shouqing" v-if="item.stock < 1"></image>
+				</view>
+				<view class="info flex">
+					<block v-if="!type">
+						<view class="proname"><text class="yushou" v-if="item.estimatedDeliveryTimeStr">预售</text>{{item.title}}</view>
+						<view :class="!item.brief?'Ninfos infos':'infos'">{{item.brief==null?' ':item.brief}}</view>
+					</block>
+					<block v-else>
+						<view class="proname"><text class="yushou" v-if="item.estimatedDeliveryTimeStr">预售</text>{{item.productName}}</view>
+						<view style="height: 46rpx;" v-if="type!=5">
+							<view :class="item.times?'endtime':'endtimes'" v-if="item.times">
+								<block v-if="item.times">
+									{{item.start ? '距结束' : '距开始'}}
+									{{item.times?item.times:''}}
+								</block>
+							</view>
+						</view>
+						<view style="height: 46rpx;" v-else>
+							<view class="kan-time dflex" v-if="item.times && item.times.length > 0">
+								<block v-if="item.times.length==4">
+									<block v-if="item.times[0] !=0"><text>{{item.times[0]}}</text>天</block>
+									<text>{{item.times[1]}}</text>:
+									<text>{{item.times[2]}}</text>:
+									<text>{{item.times[3]}}</text>
+								</block>
+								<block v-else>
+									<text>{{item.times[0]}}</text>:
+									<text>{{item.times[1]}}</text>:
+									<text>{{item.times[2]}}</text>
+								</block>
+								<view>{{item.start==false?'后开始':'后结束'}}</view>
+							</view>
+						</view>
+
+					</block>
+					<view class="xiaol xiaoll dflex">
+						<block v-if="item.isOtc != 5 && about.is_open_shop == 1 && (isDistriUser == 2 || ascription)">
+							<view class="zhuan dflex" v-if="item.commission>0">
+								<block>
+									<text>赚</text>
+									<view class="dflex">¥{{item.commission }}</view>
+								</block>
+							</view>
+						</block>
+						<view class="yishou">{{item.sellStock}}件已售</view>
+					</view>
+					<view class="operate dflex">
+						<block v-if="!type">
+							<view class="price proprice ddflex">
+								¥<text>{{item.salePrice}}</text>
+								<view class="vip-news ddflex" v-if="about.show_membership_price==1&&item.actualPrice < item.salePrice"><text class="vip-sale">会员价</text><text class="vip-members">¥{{item.actualPrice}}</text></view>
+								<view class="vip-news ddflex" v-if="about.show_membership_price==1&&item.membersPrice<item.salePrice"><text class="vip-sale">会员价</text><text class="vip-members">¥{{item.membersPrice}}</text></view>
+								<text class="del" v-if="about.show_membership_price!=1">
+									<block v-if="item.marketPrice!=0&&item.marketPrice>item.salePrice">
+										¥{{item.marketPrice}}
+									</block>
+								</text>
+							</view>
+							<view class="btn">立即抢购</view>
+						</block>
+						<block v-else>
+							<view class="price dflex">
+								<block>{{typeName?typeName:''}}</block>
+								¥<text>{{item.money}}</text><text class="del"
+									v-if="item.marketPrice!=0&&item.marketPrice>item.money">¥{{item.marketPrice}}</text>
+							</view>
+							<view class="add-cart">
+								<!-- <image src="/static/pages/images/jia.png" v-if="item.start"></image> -->
+								<block v-if="!item.start">
+									<view class="remind mbggreen" v-if="item.isRemind" data-type="1">取消提醒</view>
+									<view class="remind mbggreen" v-else>开团提醒</view>
+								</block>
+							</view>
+						</block>
+					</view>
+				</view>
+			</view>
+		</view>
+		<!-- 分块版式二 -->
+		<view class="list2 dflex" v-if="pageList.displayStyle=='2' && pageList.lineNumber=='2'">
+			<view v-for="(item, index) in pageList.products" :key="index" class="li">
+				<view @tap="goUrl" :data-id="item.id" :data-type="type" :data-index="index">
+					<view class="jsdimgs">
+						<image lazy-load="true" :src="item.pic + '?x-oss-process=style/w375'" mode="aspectFit"
+							class="jsdpro"></image>
+						<image v-if="item.isJs && about.timely_close != 1" src="/static/pages/images/jishida.png" class="jsdimg"></image>
+						<image src="../../static/pages/images/shouqing.png" class="shouqing" v-if="item.stock < 1"></image>
+					</view>
+					<view class="jsdinfo">
+						<view class="proname" v-if="!type"><text class="yushou" v-if="item.estimatedDeliveryTimeStr">预售</text>{{item.title}}</view>
+						<view class="proname" v-else><text class="yushou" v-if="item.estimatedDeliveryTimeStr">预售</text>{{item.productName}}</view>
+						<view class="list-tag ddflex">
+							<block v-if="item.label">
+							<view v-for="(it,idx) in item.label.split(',')" :key="idx" v-if="idx < 2">{{it}}</view>
+							</block>
+						</view>
+						<view class="xiaol dflex">
+							<block v-if="item.isOtc != 5 && about.is_open_shop == 1 && (isDistriUser == 2 || ascription)">
+								<view class="zhuan dflex" v-if="item.commission>0">
+									<block>
+										<text>赚</text>
+										<view class="dflex">¥{{item.commission }}</view>
+									</block>
+								</view>
+							</block>
+							<block v-else>
+								<view class="vip-news ddflex" v-if="about.show_membership_price==1&&item.actualPrice < item.salePrice"><text class="vip-sale">会员价</text><text class="vip-members">¥{{item.actualPrice}}</text></view>
+								<view class="vip-news ddflex" v-if="about.show_membership_price==1&&item.membersPrice<item.salePrice"><text class="vip-sale">会员价</text><text class="vip-members">¥{{item.membersPrice}}</text></view>
+							</block>
+							<view class="yishou">{{item.sellStock}}件已售</view>
+						</view>
+						<!-- <view class="show-vip">
+							<text class="vip" v-if="about.show_membership_price==1&&item.actualPrice < item.salePrice"><text class="sale">VIP</text><text class="members">{{item.actualPrice}}</text></text>
+							<text class="vip"
+								v-if="about.show_membership_price==1&&item.membersPrice<item.salePrice"><text
+									class="sale">VIP</text><text
+									class="members">{{item.membersPrice}}</text></text>
+						</view> -->
+						<view class="operate dflex">
+							<block v-if="!type">
+								<view class="price proprice">
+									¥<text>{{item.salePrice}}</text>
+									<text class="del">
+										<block v-if="item.marketPrice!=0&&item.marketPrice>item.salePrice">
+											¥{{item.marketPrice}}
+										</block>
+									</text>
+								</view>
+								<view class="add-cart">
+									<image src="/static/pages/images/jia.png"></image>
+								</view>
+							</block>
+							<block v-else>
+								<view class="price dflex">
+									<block>{{typeName?typeName:''}}</block>
+									¥<text>{{item.money}}</text><text class="del"
+										v-if="item.marketPrice!=0&&item.marketPrice>item.money">¥{{item.marketPrice}}</text>
+								</view>
+							</block>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<!-- 分块版式三 -->
+		<view class="list3 dflex" v-if="pageList.displayStyle=='2' && pageList.lineNumber=='3'">
+			<view v-for="(item, index) in pageList.products" :key="index" class="li">
+				<navigator :url="'/product/detail/detail?id=' + item.id+merchant" hover-class="none">
+					<view class="jsdimgs">
+						<image lazy-load="true" :src="item.pic + '?x-oss-process=style/w210'" mode="aspectFit"
+							class="jsdpro"></image>
+						<image v-if="item.isJs && about.timely_close != 1" src="/static/pages/images/jishida.png" class="jsdimg1"></image>
+						<image src="../../static/pages/images/shouqing.png" class="shouqing" v-if="item.stock < 1"></image>
+					</view>
+					<view class="jsdinfo">
+						<view class="proname"><text class="yushou" v-if="item.estimatedDeliveryTimeStr">预售</text>{{item.title}}</view>
+						<view class="xiaol">
+							<!-- <block v-if="item.isOtc != 5 && about.is_open_shop == 1 && (isDistriUser == 2 || ascription)">
+							<view class="zhuan dflex" v-if="item.commission>0">
+								<block>
+								<text>赚</text>
+								<view class="dflex">¥{{item.commission }}</view>
+								</block>
+							</view>
+							</block> -->
+							<view class="yishou">{{item.sellStock}}件已售</view>
+						</view>
+						<view class="operate dflex">
+							<view class="price proprice">¥<text>{{item.salePrice}}</text>
+							<text class="del" v-if="item.marketPrice!=0&&item.marketPrice>item.salePrice">¥{{item.marketPrice}}</text>
+							</view>
+
+							<view class="add-cart">
+								<image src="/static/pages/images/jia.png"></image>
+							</view>
+						</view>
+					</view>
+				</navigator>
+			</view>
+		</view>
+		<!-- 分隔线版式一 -->
+		<view class="list1 list4" v-if="pageList.displayStyle=='1' && pageList.lineNumber=='1'">
+			<view v-for="(item, index) in pageList.products" :key="index" @tap="goUrl" :data-id="item.id"
+				:data-type="type" :data-index="index" class="li dflex">
+				<view class="jsdimgs1">
+					<image lazy-load="true" :src="item.pic+ '?x-oss-process=style/w750-auto'" mode="aspectFit"
+						class="liimg"></image>
+					<image v-if="item.isJs && about.timely_close != 1" src="/static/pages/images/jishida.png" class="jsdimg1"></image>
+					<image src="../../static/pages/images/shouqing.png" class="shouqing" v-if="item.stock < 1"></image>
+				</view>
+				<view class="info flex">
+					<block v-if="!type">
+						<view class="proname"><text class="yushou" v-if="item.estimatedDeliveryTimeStr">预售</text>{{item.title}}</view>
+						<view :class="!item.brief?'Ninfos infos':'infos'">{{item.brief==null?' ':item.brief}}</view>
+					</block>
+					<block v-else>
+						<view class="proname"><text class="yushou" v-if="item.estimatedDeliveryTimeStr">预售</text>{{item.productName}}</view>
+
+						<view style="height: 46rpx;" v-if="type!=5">
+							<view :class="item.times?'endtime':'endtimes'" v-if="item.times">
+								<block v-if="item.times">
+									{{item.start ? '距结束' : '距开始'}}
+									{{item.times?item.times:''}}
+								</block>
+							</view>
+						</view>
+						<view style="height: 46rpx;" v-else>
+							<view class="kan-time dflex" v-if="item.times && item.times.length > 0">
+								<block v-if="item.times.length==4">
+									<block v-if="item.times[0] !=0"><text>{{item.times[0]}}</text>天</block>
+									<text>{{item.times[1]}}</text>:
+									<text>{{item.times[2]}}</text>:
+									<text>{{item.times[3]}}</text>
+								</block>
+								<block v-else>
+									<text>{{item.times[0]}}</text>:
+									<text>{{item.times[1]}}</text>:
+									<text>{{item.times[2]}}</text>
+								</block>
+								<view>{{item.start==false?'后开始':'后结束'}}</view>
+							</view>
+						</view>
+
+					</block>
+					<view class="xiaol dflex">
+						<block v-if="item.isOtc != 5 && about.is_open_shop == 1 && (isDistriUser == 2 || ascription)">
+							<view class="zhuan dflex" v-if="item.commission>0">
+								<block>
+									<text>赚</text>
+									<view class="dflex">¥{{item.commission }}</view>
+								</block>
+							</view>
+						</block>
+						<view class="yishou">{{item.sellStock}}件已售</view>
+					</view>
+					<view class="operate dflex">
+						<block v-if="!type">
+							<view class="price proprice ddflex">
+								¥<text>{{item.salePrice}}</text>
+								<view class="vip-news ddflex" v-if="about.show_membership_price==1&&item.actualPrice < item.salePrice"><text class="vip-sale">会员价</text><text class="vip-members">¥{{item.actualPrice}}</text></view>
+								<view class="vip-news ddflex" v-if="about.show_membership_price==1&&item.membersPrice<item.salePrice"><text class="vip-sale">会员价</text><text class="vip-members">¥{{item.membersPrice}}</text></view>
+								<text class="del" v-if="about.show_membership_price!=1">
+									<block v-if="item.marketPrice!=0&&item.marketPrice>item.salePrice">
+										¥{{item.marketPrice}}
+									</block>
+								</text>
+							</view>
+							<view class="btn">立即抢购</view>
+						</block>
+						<block v-else>
+							<view class="price dflex">
+								<block>{{typeName?typeName:''}}</block>
+								¥<text>{{item.money}}</text><text class="del"
+									v-if="item.marketPrice!=0&&item.marketPrice>item.money">¥{{item.marketPrice}}</text>
+							</view>
+							<view class="add-cart">
+								<!-- <image src="/static/pages/images/jia.png" v-if="item.start"></image> -->
+								<block v-if="!item.start">
+									<view class="remind mbggreen" v-if="item.isRemind" data-type="1">取消提醒</view>
+									<view class="remind mbggreen" v-else>开团提醒</view>
+								</block>
+							</view>
+						</block>
+					</view>
+				</view>
+			</view>
+		</view>
+
+		<!-- 分隔线版式二 -->
+		<view class="list2 list5 dflex" v-if="pageList.displayStyle=='1' && pageList.lineNumber=='2'">
+			<view v-for="(item, index) in pageList.products" :key="index" class="li">
+				<view @tap="goUrl" :data-id="item.id" :data-type="type" :data-index="index">
+					<view class="jsdimgs">
+						<image lazy-load="true" :src="item.pic + '?x-oss-process=style/w375'" mode="aspectFit"
+							class="jsdpro"></image>
+						<image v-if="item.isJs && about.timely_close != 1" src="/static/pages/images/jishida.png" class="jsdimg1"></image>
+						<image src="../../static/pages/images/shouqing.png" class="shouqing" v-if="item.stock < 1"></image>
+					</view>
+					<view class="jsdinfo">
+						<view class="proname" v-if="!type"><text class="yushou" v-if="item.estimatedDeliveryTimeStr">预售</text>{{item.title}}</view>
+						<view class="proname" v-else><text class="yushou" v-if="item.estimatedDeliveryTimeStr">预售</text>{{item.productName}}</view>
+						<view class="list-tag ddflex">
+							<block v-if="item.label">
+							<view v-for="(it,idx) in item.label.split(',')" :key="idx" v-if="idx < 2">{{it}}</view>
+							</block>
+						</view>
+						<view class="xiaol dflex">
+							<block
+								v-if="item.isOtc != 5 && about.is_open_shop == 1 && (isDistriUser == 2 || ascription)">
+								<view class="zhuan dflex" v-if="item.commission>0">
+									<block>
+										<text>赚</text>
+										<view class="dflex">¥{{item.commission }}</view>
+									</block>
+								</view>
+							</block>
+							<block v-else>
+								<view class="vip-news ddflex" v-if="about.show_membership_price==1&&item.actualPrice < item.salePrice"><text class="vip-sale">会员价</text><text class="vip-members">¥{{item.actualPrice}}</text></view>
+								<view class="vip-news ddflex" v-if="about.show_membership_price==1&&item.membersPrice<item.salePrice"><text class="vip-sale">会员价</text><text class="vip-members">¥{{item.membersPrice}}</text></view>
+							</block>
+							<view class="yishou">{{item.sellStock}}件已售</view>
+						</view>
+						<!-- <view class="show-vip">
+							<text class="vip" v-if="about.show_membership_price==1&&item.actualPrice < item.salePrice"><text class="sale">VIP</text><text class="members">{{item.actualPrice}}</text></text>
+							<text class="vip"
+								v-if="about.show_membership_price==1&&item.membersPrice<item.salePrice"><text
+									class="sale">VIP</text><text
+									class="members">{{item.membersPrice}}</text></text>
+						</view> -->
+						<view class="operate dflex">
+							<block v-if="!type">
+								<view class="price proprice">
+									¥<text>{{item.salePrice}}</text>
+									<text class="del">
+										<block v-if="item.marketPrice!=0&&item.marketPrice>item.salePrice">
+											¥{{item.marketPrice}}
+										</block>
+									</text>
+								</view>
+								<view class="add-cart">
+									<image src="/static/pages/images/jia.png"></image>
+								</view>
+							</block>
+							<block v-else>
+								<view class="price dflex">
+									<block>{{typeName?typeName:''}}</block>
+									¥<text>{{item.money}}</text><text class="del"
+										v-if="item.marketPrice!=0&&item.marketPrice>item.money">¥{{item.marketPrice}}</text>
+								</view>
+							</block>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<!-- 分隔线版式三 -->
+		<view class="list3 list6 dflex" v-if="pageList.displayStyle=='1' && pageList.lineNumber=='3'">
+			<view v-for="(item, index) in pageList.products" :key="index" class="li">
+				<navigator :url="'/product/detail/detail?id=' + item.id+merchant" hover-class="none">
+					<view class="jsdimgs">
+						<image lazy-load="true" :src="item.pic + '?x-oss-process=style/w210'" mode="aspectFit"
+							class="jsdpro"></image>
+						<image v-if="item.isJs && about.timely_close != 1" src="/static/pages/images/jishida.png" class="jsdimg1"></image>
+						<image src="../../static/pages/images/shouqing.png" class="shouqing" v-if="item.stock < 1"></image>
+					</view>
+					<view class="jsdinfo">
+						<view class="proname"><text class="yushou" v-if="item.estimatedDeliveryTimeStr">预售</text>{{item.title}}</view>
+						<view class="xiaol dflex">
+							<!-- <block v-if="item.isOtc != 5 && about.is_open_shop == 1 && (isDistriUser == 2 || ascription)">
+							<view class="zhuan dflex" v-if="item.commission>0">
+								<block>
+								<text>赚</text>
+								<view class="dflex">¥{{item.commission }}</view>
+								</block>
+							</view>
+							</block> -->
+							<view class="yishou">{{item.sellStock}}件已售</view>
+						</view>
+						<view class="operate dflex">
+							<view class="price proprice">¥<text>{{item.salePrice}}</text>
+								<text class="del"
+									v-if="item.marketPrice!=0&&item.marketPrice>item.salePrice">¥{{item.marketPrice}}</text>
+							</view>
+							<view class="add-cart">
+								<image src="/static/pages/images/jia.png"></image>
+							</view>
+						</view>
+					</view>
+				</navigator>
+			</view>
+		</view>
+		<!-- 无分隔线版式 -->
+		<!-- <view class="list3 list7 dflex" wx:if="{{styletype==7}}">
+  <view class="li">
+    <view class="jsdimgs">
+      <image :src="picUrlss+'zbgw.png'" mode="aspectFit" class="jsdpro"></image>
+      <image src="/pages/images/jishida.png" class="jsdimg"></image>
+    </view>
+    <view class="jsdinfo">
+      <view class="proname">约斯夫儿童型医用退热贴约斯夫儿童型医用退热贴</view>
+      <view class="operate dflex">
+        <view class="price proprice">¥<text>129.00</text></view>
+        <view class="add-cart">
+          <image src="/pages/images/jia.png"></image>
+        </view>
+      </view>
+    </view>
+  </view>
+  <view class="li">
+    <view class="jsdimgs">
+      <image :src="picUrlss+'zbgw.png'" mode="aspectFit" class="jsdpro"></image>
+      <image src="/pages/images/jishida.png" class="jsdimg"></image>
+    </view>
+    <view class="jsdinfo">
+      <view class="proname">约斯夫儿童型医用退热贴约斯夫儿童型医用退热贴</view>
+      <view class="operate dflex">
+        <view class="price proprice">¥<text>129.00</text></view>
+        <view class="add-cart">
+          <image src="/pages/images/jia.png"></image>
+        </view>
+      </view>
+    </view>
+  </view>
+  <view class="li">
+    <view class="jsdimgs">
+      <image :src="picUrlss+'zbgw.png'" mode="aspectFit" class="jsdpro"></image>
+      <image src="/pages/images/jishida.png" class="jsdimg"></image>
+    </view>
+    <view class="jsdinfo">
+      <view class="proname">约斯夫儿童型医用退热贴约斯夫儿童型医用退热贴</view>
+      <view class="operate dflex">
+        <view class="price proprice">¥<text>129.00</text></view>
+        <view class="add-cart">
+          <image src="/pages/images/jia.png"></image>
+        </view>
+      </view>
+    </view>
+  </view>
+</view> -->
+	</view>
+</template>
+
+<script>
+	// components/topicList/topicList.js
+	const app = getApp();
+	const req = require("../../utils/request");
+
+	export default {
+		data() {
+			return {
+				picUrlss: req.public.picUrls,
+				isDistriUser: 0, // 判断用户是否是分销员 2为分销员
+				ascription: false, //是否开启小店
+			};
+		},
+
+		components: {},
+		props: {
+			pageList: Object,
+			about: Object,
+			merchant: String,
+			type: String,
+			typeName: String
+		},
+
+		/**
+		 * 组件的属性列表
+		 */
+		options: {
+			addGlobalClass: true
+		},
+
+		mounted() {
+			this.getMy();
+			console.log("组件页面pageList", this.pageList, this.merchant)
+		},
+
+		methods: {
+			getMy() {
+				let that = this;
+				let userInfo = req.getStorage('userInfo');
+				if (!userInfo || userInfo == null) return false;
+				if (userInfo && userInfo.listShopBase && userInfo.listShopBase != null && userInfo.listShopBase.length >
+					0) {
+					if (userInfo.listShopBase[0].merchant_id == that.merchant.id && that.merchant.type != 5) {
+						that.ascription = true;
+					}
+				}
+				console.log('userInfo.isDistriUser==',userInfo.isDistriUser)
+				that.isDistriUser = userInfo.isDistriUser;
+				// req.getRequest('/api/user/my', {}, data => {
+				// 	that.isDistriUser = data.isDistriUser;
+				// });
+			},
+			goUrl(event) {
+				console.log("qwewqe")
+				let id = event.currentTarget.dataset.id
+				let type = event.currentTarget.dataset.type
+				let index = event.currentTarget.dataset.index
+				const activity = this.pageList.products[index];
+				let merchant = this.merchant
+				// console.log(type, !type)
+				if (!type) {
+					// console.log("123", id)
+					app.globalData.openPage('product/detail/detail?id=' + id + merchant)
+				} else if (type == 1) {
+					app.globalData.openPage('product/groupDetail/groupDetail?acid=' + activity.id + "&id=" + activity
+						.productId +
+						merchant)
+				} else if (type == 4) {
+					app.globalData.openPage('activity/newbornDetails/newbornDetails?acid=' + activity.id + '&id=' +
+						activity.productId +
+						merchant)
+				} else if (type == 5) {
+					app.globalData.openPage('activity/bargain/detail/detail?acid=' + activity.id + '&id=' + activity
+						.productId +
+						merchant)
+				} else if (type == 3) {
+					app.globalData.openPage('activity/group/detail/detail?acid=' + activity.id + '&id=' + activity
+						.productId +
+						merchant)
+				} else if (type == 2) {
+					app.globalData.openPage('activity/seckillDetails/seckillDetails?acid=' + activity.id + '&id=' +
+						activity.productId +
+						merchant)
+				}
+			},
+			// toGroupRemind(event) {
+			// 	const index = event.currentTarget.dataset.index;
+			// 	const activity = this.activityGroup[index];
+			// 	const url = event.currentTarget.dataset.url;
+			// 	console.log(url)
+			// 	app.globalData.openPage('product/groupDetail/groupDetail?acid=' + activity.id + "&id=" + activity.productId + url); // app.openPage('product/groupDetail/groupDetail?acid=' + activity.id + "&id=" + activity.productId);
+			// },
+
+
+			cancelActivityRemind(event) {
+				const index = event.currentTarget.dataset.index;
+				const id = event.currentTarget.dataset.id;
+				const type = event.currentTarget.dataset.type;
+				if (req.header.appId == 'ZQ1VK5oc17I387E') {
+
+				} else {
+					route.cancelActivityRemind({
+						id: id
+					}, res => {
+						req.msg('取消提醒成功');
+						let data = {};
+						if (type == 1) data['activityGroup[' + index + '].isRemind'] = false;
+						this.setData(data);
+					});
+				}
+			},
+
+			addActivityRemind(event) {
+				const index = event.currentTarget.dataset.index;
+				const id = event.currentTarget.dataset.id;
+				const type = event.currentTarget.dataset.type;
+
+				route.addActivityRemind({
+					activityId: id
+				}, res => {
+					// mes.remind().then(res=>res)
+					// mes.requsetmessage()
+					mes.remind().then(res => res);
+					req.msg('订阅提醒成功');
+					let data = {};
+					if (type == 1) data['activityGroup[' + index + '].isRemind'] = true;
+					this.setData(data);
+				});
+			}
+		}
+	};
+</script>
+<style>
+	@import "./goodsList.css";
+</style>

+ 62 - 0
components/integral-nav/index.css

@@ -0,0 +1,62 @@
+/* 底部导航样式 */
+
+.active {
+    color: #222;
+}
+
+.Tabbar {
+    position: fixed;
+    bottom: 0;
+    left: 0;
+    display: flex;
+    height: 115rpx;
+    width: 100%;
+    font-size: 26rpx;
+    color: #888;
+    background: #fff;
+    z-index: 98;
+}
+
+.Tabbar .tab-item {
+    width: 33%;
+    text-align: center;
+    position: relative;
+    line-height: initial;
+}
+
+.tab-item .image {
+    display: block;
+    width: 54rpx;
+    height: 54rpx;
+    margin: 13rpx auto 0;
+}
+
+.dot {
+    display: block;
+    height: 15rpx;
+    width: 15rpx;
+    border-radius: 50%;
+    background: #F51A1A;
+    box-sizing: border-box;
+    position: absolute;
+    top: 3rpx;
+    right: 30%;
+}
+
+.dots {
+    display: block;
+    height: 30rpx;
+    border-radius: 30rpx;
+    padding: 0 8rpx;
+    font-size: 24rpx;
+    color: #fff;
+    line-height: 30rpx;
+    background: #F51A1A;
+    min-width: 30rpx;
+    box-sizing: border-box;
+    text-align: center;
+    position: absolute;
+    top: 10rpx;
+    right: 34%;
+}
+

+ 132 - 0
components/integral-nav/index.vue

@@ -0,0 +1,132 @@
+<template>
+<view class="Tabbar" :style="'padding-bottom:' + bottomBlankHeignt + 'rpx;height:115rpx;'">
+  <!-- <view class="tab-item" bindtap="goTimely">
+    <image class="nav_icon21 image" src="/pages/images/{{channel==='sort' ? iconSrc + 'sort_h':'sort'}}.png"></image>
+    <view class="{{channel==='store'?'active':''}}">及时达</view>
+  </view> -->
+  <view class="tab-item" @tap="goHome">
+    <image class="nav_icon11 image" :src="'/static/pages/images/' + (channel==='home'? iconSrc + 'home_h':'home') + '.png'"></image>
+    <view :class="channel==='home'?'active':''">积分商城</view>
+  </view>
+  <!-- <view class="tab-item" bindtap="goLive">
+    <image class="nav_icon21 image" src="/pages/images/{{channel==='live'? iconSrc + 'live_h':'live'}}.png"></image>
+    <view class="{{channel==='live'?'active':''}}">直播</view>
+  </view> -->
+  <view class="img4 tab-item" @tap="goCart">
+    <image class="nav_icon41 image" :src="'/static/pages/images/' + (channel==='cart'? iconSrc + 'cart_h':'cart') + '.png'"></image>
+    <view :class="channel==='cart'?'active':''">兑换清单
+      <text class="dots" v-if="count > 0">{{count}}</text>
+    </view>
+  </view>
+  <view class="tab-item" @tap="goOrder">
+    <image class="nav_icon41 image" :src="'/static/pages/images/' + (channel==='order'? iconSrc + 'cart_h':'cart') + '.png'"></image>
+    <view :class="channel==='order'?'active':''">积分订单</view>
+  </view>
+  <!-- <view class="img5 tab-item" bindtap="goUser">
+   <image class="nav_icon51 image" src="/pages/images/{{channel==='user'? iconSrc + 'user_h':'user'}}.png"></image>
+    <view class="{{channel==='user'?'active':''}}">我的</view>
+  </view> -->
+</view>
+</template>
+
+<script>
+const app = getApp();
+const req = require("../../utils/request.js");
+import foot from "./index";
+
+export default {
+  data() {
+    return {
+      // channel: 'home',
+      bottomBlankHeignt: app.globalData.isIPhoneX ? 68 : 0,
+      iconSrc: req.public.iconSrc,
+      about: {},
+      count: ""
+    };
+  },
+
+  components: {
+    foot
+  },
+  props: {
+    channel: {
+      type: String,
+      default: 'home'
+    },
+    isUpdate: {
+      type: Boolean,
+      default: false
+    },
+    productType: {
+      type: Number,
+      default: 0
+    }
+  },
+  watch: {
+    "isUpdate": function (isUpdate) {
+      // console.log('需要更新消息', isUpdate);
+      if (!this.isReady) return;
+      this.getCount();
+    }
+  },
+
+  mounted() {
+    // console.log('ready');
+    this.isReady = true;
+    this.getCount();
+  },
+
+  methods: {
+    getCount() {
+      let from = {};
+
+      if (this.productType == 2) {
+        from.purchaseType = 2;
+      } else {
+        from.purchaseType = 1;
+      }
+
+      req.getRequest('/api/purchase/count', from, res => {
+        this.setData({
+          count: res
+        });
+      });
+    },
+
+    /**
+     * 跳转
+     */
+    goHome: function () {
+      if (this.channel === "home") return;
+      uni.redirectTo({
+        url: '/integralshop/index/index'
+      });
+    },
+    goTimely: function () {
+      if (this.channel === "sort") return;
+      app.globalData.switchTab('pages/timelyDelivery/index');
+    },
+    goLive: function () {
+      if (this.channel === "live") return;
+      app.globalData.switchTab('pages/live/live');
+    },
+    goCart: function () {
+      if (this.channel === "cart") return;
+      uni.redirectTo({
+        url: '/integralshop/cart/cart'
+      });
+    },
+    goUser: function () {
+      if (this.channel === "user") return;
+      app.globalData.switchTab('pages/user/user');
+    },
+    goOrder: function () {
+      if (this.channel === "oredr") return;
+      app.globalData.redirectTab('integralshop/order/order?orderType=11');
+    }
+  }
+};
+</script>
+<style>
+@import "./index.css";
+</style>

+ 409 - 0
components/mp-html/components/mp-html/mp-html.vue

@@ -0,0 +1,409 @@
+<template>
+  <view id="_root" :class="(selectable?'_select ':'')+'_root'">
+    <slot v-if="!nodes[0]" />
+    <!-- #ifndef APP-PLUS-NVUE -->
+    <node v-else :childs="nodes" :opts="[lazyLoad,loadingImg,errorImg,showImgMenu]" />
+    <!-- #endif -->
+    <!-- #ifdef APP-PLUS-NVUE -->
+    <web-view ref="web" src="/static/app-plus/mp-html/local.html" :style="'margin-top:-2px;height:' + height + 'px'" @onPostMessage="_onMessage" />
+    <!-- #endif -->
+  </view>
+</template>
+
+<script>
+/**
+ * mp-html v2.0.3
+ * @description 富文本组件
+ * @tutorial https://github.com/jin-yufeng/mp-html
+ * @property {String} content 用于渲染的 html 字符串
+ * @property {Boolean} copy-link 是否允许外部链接被点击时自动复制
+ * @property {String} domain 主域名,用于拼接链接
+ * @property {String} error-img 图片出错时的占位图链接
+ * @property {Boolean} lazy-load 是否开启图片懒加载
+ * @property {string} loading-img 图片加载过程中的占位图链接
+ * @property {Boolean} pause-video 是否在播放一个视频时自动暂停其他视频
+ * @property {Boolean} preview-img 是否允许图片被点击时自动预览
+ * @property {Boolean} scroll-table 是否给每个表格添加一个滚动层使其能单独横向滚动
+ * @property {Boolean} selectable 是否开启长按复制
+ * @property {Boolean} set-title 是否将 title 标签的内容设置到页面标题
+ * @property {Boolean} show-img-menu 是否允许图片被长按时显示菜单
+ * @property {Object} tag-style 标签的默认样式
+ * @property {Boolean | Number} use-anchor 是否使用锚点链接
+ * @event {Function} load dom 结构加载完毕时触发
+ * @event {Function} ready 所有图片加载完毕时触发
+ * @event {Function} imgTap 图片被点击时触发
+ * @event {Function} linkTap 链接被点击时触发
+ * @event {Function} error 媒体加载出错时触发
+ */
+const plugins=[]
+const parser = require('./parser')
+// #ifndef APP-PLUS-NVUE
+import node from './node/node'
+// #endif
+// #ifdef APP-PLUS-NVUE
+const dom = weex.requireModule('dom')
+// #endif
+export default {
+  name: 'mp-html',
+  data() {
+    return {
+      nodes: [],
+      // #ifdef APP-PLUS-NVUE
+      height: 0
+      // #endif
+    }
+  },
+  props: {
+    // #ifdef APP-PLUS-NVUE
+    bgColor: String,
+    // #endif
+    content: String,
+    copyLink: {
+      type: Boolean,
+      default: true
+    },
+    domain: String,
+    errorImg: {
+      type: String,
+      default: ''
+    },
+    lazyLoad: {
+      type: Boolean,
+      default: false
+    },
+    loadingImg: {
+      type: String,
+      default: ''
+    },
+    pauseVideo: {
+      type: Boolean,
+      default: true
+    },
+    previewImg: {
+      type: Boolean,
+      default: true
+    },
+    scrollTable: Boolean,
+    selectable: Boolean,
+    setTitle: {
+      type: Boolean,
+      default: true
+    },
+    showImgMenu: {
+      type: Boolean,
+      default: true
+    },
+    tagStyle: Object,
+    useAnchor: null
+  },
+  // #ifndef APP-PLUS-NVUE
+  components: {
+    node
+  },
+  // #endif
+  watch: {
+    content(content) {
+      this.setContent(content)
+    }
+  },
+  created() {
+    this.plugins = []
+    for (var i = plugins.length; i--;)
+      this.plugins.push(new plugins[i](this))
+  },
+  mounted() {
+    if (this.content && !this.nodes.length)
+      this.setContent(this.content)
+  },
+  beforeDestroy() {
+    this._hook('onDetached')
+    clearInterval(this._timer)
+  },
+  methods: {
+    /**
+     * @description 将锚点跳转的范围限定在一个 scroll-view 内
+     * @param {Object} page scroll-view 所在页面的示例
+     * @param {String} selector scroll-view 的选择器
+     * @param {String} scrollTop scroll-view scroll-top 属性绑定的变量名
+     */
+    in(page, selector, scrollTop) {
+      // #ifndef APP-PLUS-NVUE
+      if (page && selector && scrollTop)
+        this._in = {
+          page,
+          selector,
+          scrollTop
+        }
+      // #endif
+    },
+
+    /**
+     * @description 锚点跳转
+     * @param {String} id 要跳转的锚点 id
+     * @param {Number} offset 跳转位置的偏移量
+     * @returns {Promise}
+     */
+    navigateTo(id, offset) {
+      return new Promise((resolve, reject) => {
+        if (!this.useAnchor)
+          return reject('Anchor is disabled')
+        offset = offset || parseInt(this.useAnchor) || 0
+        // #ifdef APP-PLUS-NVUE
+        if (!id) {
+          dom.scrollToElement(this.$refs.web, {
+            offset
+          })
+          resolve()
+        } else {
+          this._navigateTo = {
+            resolve,
+            reject,
+            offset
+          }
+          this.$refs.web.evalJs('uni.postMessage({data:{action:"getOffset",offset:(document.getElementById(' + id + ')||{}).offsetTop}})')
+        }
+        // #endif
+        // #ifndef APP-PLUS-NVUE
+        var deep = ' '
+        // #ifdef MP-WEIXIN || MP-QQ || MP-TOUTIAO
+        deep = '>>>'
+        // #endif
+        var selector = uni.createSelectorQuery()
+          // #ifndef MP-ALIPAY
+          .in(this._in ? this._in.page : this)
+          // #endif
+          .select((this._in ? this._in.selector : '._root') + (id ? `${deep}#${id}` : '')).boundingClientRect()
+        if (this._in)
+          selector.select(this._in.selector).scrollOffset()
+            .select(this._in.selector).boundingClientRect() // 获取 scroll-view 的位置和滚动距离
+        else
+          selector.selectViewport().scrollOffset() // 获取窗口的滚动距离
+        selector.exec(res => {
+          if (!res[0])
+            return reject('Label not found')
+          var scrollTop = res[1].scrollTop + res[0].top - (res[2] ? res[2].top : 0) + offset
+          if (this._in)
+            // scroll-view 跳转
+            this._in.page[this._in.scrollTop] = scrollTop
+          else
+            // 页面跳转
+            uni.pageScrollTo({
+              scrollTop,
+              duration: 300
+            })
+          resolve()
+        })
+        // #endif
+      })
+    },
+
+    /**
+     * @description 获取文本内容
+     * @return {String}
+     */
+    getText() {
+      var text = '';
+      (function traversal(nodes) {
+        for (var i = 0; i < nodes.length; i++) {
+          var node = nodes[i]
+          if (node.type == 'text')
+            text += node.text.replace(/&amp;/g, '&')
+          else if (node.name == 'br')
+            text += '\n'
+          else {
+            // 块级标签前后加换行
+            var isBlock = node.name == 'p' || node.name == 'div' || node.name == 'tr' || node.name == 'li' || (node.name[0] == 'h' && node.name[1] > '0' && node.name[1] < '7')
+            if (isBlock && text && text[text.length - 1] != '\n')
+              text += '\n'
+            // 递归获取子节点的文本
+            if (node.children)
+              traversal(node.children)
+            if (isBlock && text[text.length - 1] != '\n')
+              text += '\n'
+            else if (node.name == 'td' || node.name == 'th')
+              text += '\t'
+          }
+        }
+      })(this.nodes)
+      return text
+    },
+
+    /**
+     * @description 获取内容大小和位置
+     * @return {Promise}
+     */
+    getRect() {
+      return new Promise((resolve, reject) => {
+        uni.createSelectorQuery()
+          // #ifndef MP-ALIPAY
+          .in(this)
+          // #endif
+          .select('#_root').boundingClientRect().exec(res => res[0] ? resolve(res[0]) : reject('Root label not found'))
+      })
+    },
+
+    /**
+     * @description 设置内容
+     * @param {String} content html 内容
+     * @param {Boolean} append 是否在尾部追加
+     */
+    setContent(content, append) {
+      if (!append || !this.imgList)
+        this.imgList = []
+      var nodes = new parser(this).parse(content)
+      // #ifdef APP-PLUS-NVUE
+      if (this._ready)
+        this._set(nodes, append)
+      // #endif
+      this.$set(this, 'nodes', append ? (this.nodes || []).concat(nodes) : nodes)
+
+      // #ifndef APP-PLUS-NVUE
+      this._videos = []
+      this.$nextTick(() => {
+        this._hook('onLoad')
+        this.$emit('load')
+      })
+
+      // 等待图片加载完毕
+      var height
+      clearInterval(this._timer)
+      this._timer = setInterval(() => {
+        this.getRect().then(rect => {
+          // 350ms 总高度无变化就触发 ready 事件
+          if (rect.height == height) {
+            this.$emit('ready', rect)
+            clearInterval(this._timer)
+          }
+          height = rect.height
+        }).catch(() => { })
+      }, 350)
+      // #endif
+    },
+
+    /**
+     * @description 调用插件钩子函数
+     */
+    _hook(name) {
+      for (var i = plugins.length; i--;)
+        if (this.plugins[i][name])
+          this.plugins[i][name]()
+    },
+
+    // #ifdef APP-PLUS-NVUE
+    /**
+     * @description 设置内容
+     */
+    _set(nodes, append) {
+      this.$refs.web.evalJs('setContent(' + JSON.stringify(nodes) + ',' + JSON.stringify([this.bgColor, this.errorImg, this.loadingImg, this.pauseVideo, this.scrollTable, this.selectable]) + ',' + append + ')')
+    },
+
+    /**
+     * @description 接收到 web-view 消息
+     */
+    _onMessage(e) {
+      var message = e.detail.data[0]
+      switch (message.action) {
+        // web-view 初始化完毕
+        case 'onJSBridgeReady':
+          this._ready = true
+          if (this.nodes)
+            this._set(this.nodes)
+          break
+        // 内容 dom 加载完毕
+        case 'onLoad':
+          this.height = message.height
+          this._hook('onLoad')
+          this.$emit('load')
+          break
+        // 所有图片加载完毕
+        case 'onReady':
+          this.getRect().then(res => {
+            this.$emit('ready', res)
+          }).catch(() => { })
+          break
+        // 总高度发生变化
+        case 'onHeightChange':
+          this.height = message.height
+          break
+        // 图片点击
+        case 'onImgTap':
+          this.$emit('imgtap', message.attrs)
+          if (this.previewImg)
+            uni.previewImage({
+              current: parseInt(message.attrs.i),
+              urls: this.imgList
+            })
+          break
+        // 链接点击
+        case 'onLinkTap':
+          var href = message.attrs.href
+          this.$emit('linktap', message.attrs)
+          if (href) {
+            // 锚点跳转
+            if (href[0] == '#') {
+              if (this.useAnchor)
+                dom.scrollToElement(this.$refs.web, {
+                  offset: message.offset
+                })
+            }
+            // 打开外链
+            else if (href.includes('://')) {
+              if (this.copyLink)
+                plus.runtime.openWeb(href)
+            }
+            else
+              uni.navigateTo({
+                url: href,
+                fail() {
+                  wx.switchTab({
+                    url: href
+                  })
+                }
+              })
+          }
+          break
+        // 获取到锚点的偏移量
+        case 'getOffset':
+          if (typeof message.offset == 'number') {
+            dom.scrollToElement(this.$refs.web, {
+              offset: message.offset + this._navigateTo.offset
+            })
+            this._navigateTo.resolve()
+          } else
+            this._navigateTo.reject('Label not found')
+          break
+        // 点击
+        case 'onClick':
+          this.$emit('tap')
+          break
+        // 出错
+        case 'onError':
+          this.$emit('error', {
+            source: message.source,
+            attrs: message.attrs
+          })
+      }
+    }
+    // #endif
+  }
+}
+</script>
+
+<style>
+/* #ifndef APP-PLUS-NVUE */
+/* 根节点样式 */
+._root {
+  overflow: auto;
+  -webkit-overflow-scrolling: touch;
+  line-height: 1.7;
+  font-size: 34rpx;color: #333;
+}
+
+._root rich-text{margin: 10rpx 0;padding: 0 30rpx;display: block;}
+
+/* 长按复制 */
+._select {
+  user-select: text;
+}
+/* #endif */
+</style>

+ 493 - 0
components/mp-html/components/mp-html/node/node.vue

@@ -0,0 +1,493 @@
+<template>
+  <view :id="attrs.id" :class="'_'+name+' '+attrs.class" :style="attrs.style">
+    <block v-for="(n, i) in childs" v-bind:key="i">
+      <!-- 图片 -->
+      <!-- 占位图 -->
+      <image v-if="n.name=='img'&&((opts[1]&&!ctrl[i])||ctrl[i]<0)" class="_img" :style="n.attrs.style" :src="ctrl[i]<0?opts[2]:opts[1]" mode="widthFix" />
+      <!-- 显示图片 -->
+      <!-- #ifdef H5 || APP-PLUS -->
+      <img v-if="n.name=='img'" :id="n.attrs.id" :class="'_img '+n.attrs.class" :style="(ctrl[i]==-1?'display:none;':'')+n.attrs.style" :src="n.attrs.src||(ctrl.load?n.attrs['data-src']:'')" :data-i="i" @load="imgLoad" @error="mediaError" @tap.stop="imgTap" @longpress="imgLongTap"/>
+      <!-- #endif -->
+      <!-- #ifndef H5 || APP-PLUS -->
+      <image v-if="n.name=='img'" :id="n.attrs.id" :class="'_img '+n.attrs.class" :style="(ctrl[i]==-1?'display:none;':'')+'width:'+(ctrl[i]||1)+'px;height:1px;'+n.attrs.style" :src="n.attrs.src" :mode="n.h?'':'widthFix'" :lazy-load="opts[0]" :webp="n.webp" :show-menu-by-longpress="opts[3]&&!n.attrs.ignore" :image-menu-prevent="!opts[3]||n.attrs.ignore" :data-i="i" @load="imgLoad" @error="mediaError" @tap.stop="imgTap" @longpress="imgLongTap" />
+      <!-- #endif -->
+      <!-- 文本 -->
+      <!-- #ifndef MP-BAIDU -->
+      <text v-else-if="n.type=='text'" decode>{{n.text}}</text>
+      <!-- #endif -->
+      <text v-else-if="n.name=='br'">\n</text>
+      <!-- 链接 -->
+      <view v-else-if="n.name=='a'" :id="n.attrs.id" :class="(n.attrs.href?'_a ':'')+n.attrs.class" hover-class="_hover" :style="'display:inline;'+n.attrs.style" :data-i="i" @click.capture.stop="linkTap">
+        <!-- #ifdef MP-ALIPAY || MP-TOUTIAO -->
+        <rich-text :nodes="n.children" style="display:inline" />
+        <!-- #endif -->
+        <!-- #ifndef MP-ALIPAY || MP-TOUTIAO -->
+        <node name="span" :childs="n.children" :opts="opts" />
+        <!-- #endif -->
+      </view>
+      <!-- 视频 -->
+      <!-- #ifdef APP-PLUS -->
+      <view v-else-if="n.html" :id="n.attrs.id" :class="n.attrs.class" :style="n.attrs.style" v-html="n.html" />
+      <!-- #endif -->
+      <!-- #ifndef APP-PLUS -->
+      <video v-else-if="n.name=='video'" :id="n.attrs.id" :class="n.attrs.class" :style="n.attrs.style" :autoplay="n.attrs.autoplay" :controls="n.attrs.controls" :loop="n.attrs.loop" :muted="n.attrs.muted" :poster="n.attrs.poster" :src="n.src[ctrl[i]||0]" :data-i="i" @play="play" @error="mediaError" />
+      <!-- #endif -->
+      <!-- #ifdef H5 || APP-PLUS -->
+      <iframe v-else-if="n.name=='iframe'" :style="n.attrs.style" :allowfullscreen="n.attrs.allowfullscreen" :frameborder="n.attrs.frameborder" :src="n.attrs.src" />
+      <embed v-else-if="n.name=='embed'" :style="n.attrs.style" :src="n.attrs.src" />
+      <!-- #endif -->
+      <!-- #ifndef MP-TOUTIAO -->
+      <!-- 音频 -->
+      <audio v-else-if="n.name=='audio'" :id="n.attrs.id" :class="n.attrs.class" :style="n.attrs.style" :author="n.attrs.author" :controls="n.attrs.controls" :loop="n.attrs.loop" :name="n.attrs.name" :poster="n.attrs.poster" :src="n.src[ctrl[i]||0]" :data-i="i" @play="play" @error="mediaError" />
+      <!-- #endif -->
+      <view v-else-if="(n.name=='table'&&n.c)||n.name=='li'" :id="n.attrs.id" :class="'_'+n.name+' '+n.attrs.class" :style="n.attrs.style">
+        <node v-if="n.name=='li'" :childs="n.children" :opts="opts" />
+        <view v-else v-for="(tbody, x) in n.children" v-bind:key="x" :class="'_'+tbody.name+' '+tbody.attrs.class" :style="tbody.attrs.style">
+          <node v-if="tbody.name=='td'||tbody.name=='th'" :childs="tbody.children" :opts="opts" />
+          <block v-else v-for="(tr, y) in tbody.children" v-bind:key="y">
+            <view v-if="tr.name=='td'||tr.name=='th'" :class="'_'+tr.name+' '+tr.attrs.class" :style="tr.attrs.style">
+              <node :childs="tr.children" :opts="opts" />
+            </view>
+            <view v-else :class="'_'+tr.name+' '+tr.attrs.class" :style="tr.attrs.style">
+              <view v-for="(td, z) in tr.children" v-bind:key="z" :class="'_'+td.name+' '+td.attrs.class" :style="td.attrs.style">
+                <node :childs="td.children" :opts="opts" />
+              </view>
+            </view>
+          </block>
+        </view>
+      </view>
+      
+      <!-- 富文本 -->
+      <!-- #ifdef H5 || MP-WEIXIN || MP-QQ || APP-PLUS || MP-360 -->
+      <rich-text v-else-if="handler.use(n)" :id="n.attrs.id" :style="n.f" :nodes="[n]" />
+      <!-- #endif -->
+      <!-- #ifndef H5 || MP-WEIXIN || MP-QQ || APP-PLUS || MP-360 -->
+      <rich-text v-else-if="!n.c" :id="n.attrs.id" :style="n.f+';display:inline'" :preview="false" :nodes="[n]" />
+      <!-- #endif -->
+      <!-- 继续递归 -->
+      <view v-else-if="n.c==2" :id="n.attrs.id" :class="'_'+n.name+' '+n.attrs.class" :style="n.f+';'+n.attrs.style">
+        <node v-for="(n2, j) in n.children" v-bind:key="j" :style="n2.f" :name="n2.name" :attrs="n2.attrs" :childs="n2.children" :opts="opts" />
+      </view>
+      <node v-else :style="n.f" :name="n.name" :attrs="n.attrs" :childs="n.children" :opts="opts" />
+    </block>
+  </view>
+</template>
+<script module="handler" lang="wxs">
+// 行内标签列表
+var inlineTags = {
+  abbr: true,
+  b: true,
+  big: true,
+  code: true,
+  del: true,
+  em: true,
+  i: true,
+  ins: true,
+  label: true,
+  q: true,
+  small: true,
+  span: true,
+  strong: true,
+  sub: true,
+  sup: true
+}
+/**
+ * @description 是否使用 rich-text 显示剩余内容
+ */
+module.exports = {
+  use: function (item) {
+  // 微信和 QQ 的 rich-text inline 布局无效
+  if (inlineTags[item.name] || (item.attrs.style || '').indexOf('display:inline') != -1)
+    return false
+  return !item.c
+  }
+}
+</script>
+<script>
+
+import node from './node'
+export default {
+  name: 'node',
+  // #ifdef MP-WEIXIN
+  options: {
+    virtualHost: true
+  },
+  // #endif
+  data() {
+    return {
+      ctrl: {}
+    }
+  },
+  props: {
+    name: String,
+    attrs: {
+      type: Object,
+      default() {
+        return {}
+      }
+    },
+    childs: Array,
+    opts: Array
+  },
+  components: {
+
+    node
+  },
+  mounted() {
+    for (this.root = this.$parent; this.root.$options.name != 'mp-html'; this.root = this.root.$parent);
+    // #ifdef H5 || APP-PLUS
+    if (this.opts[0]) {
+      for (var i = this.childs.length; i--;)
+        if (this.childs[i].name == 'img')
+          break
+      if (i != -1) {
+        this.observer = uni.createIntersectionObserver(this).relativeToViewport({
+          top: 500,
+          bottom: 500
+        })
+        this.observer.observe('._img', res => {
+          if (res.intersectionRatio) {
+            this.$set(this.ctrl, 'load', 1)
+            this.observer.disconnect()
+          }
+        })
+      }
+    }
+    // #endif
+  },
+  beforeDestroy() {
+    // #ifdef H5 || APP-PLUS
+    if (this.observer)
+      this.observer.disconnect()
+    // #endif
+  },
+  methods:{
+    // #ifdef MP-WEIXIN
+    toJSON() { },
+    // #endif
+    /**
+     * @description 播放视频事件
+     * @param {Event} e 
+     */
+    play(e) {
+      // #ifndef APP-PLUS
+      if (this.root.pauseVideo) {
+        var flag = false, id = e.target.id
+        for (var i = this.root._videos.length; i--;) {
+          if (this.root._videos[i].id == id)
+            flag = true
+          else
+            this.root._videos[i].pause() // 自动暂停其他视频
+        }
+        // 将自己加入列表
+        if (!flag) {
+          var ctx = uni.createVideoContext(id
+            // #ifndef MP-BAIDU
+            , this
+            // #endif
+          )
+          ctx.id = id
+          this.root._videos.push(ctx)
+        }
+      }
+      // #endif
+    },
+
+    /**
+     * @description 图片点击事件
+     * @param {Event} e 
+     */
+    imgTap(e) {
+      var attrs = this.childs[e.currentTarget.dataset.i].attrs
+      if (attrs.ignore)
+        return
+      attrs.src = attrs['data-src'] || attrs.src
+      this.root.$emit('imgtap', attrs)
+      // 自动预览图片
+      if (this.root.previewImg)
+        uni.previewImage({
+          current: parseInt(attrs.i),
+          urls: this.root.imgList
+        })
+    },
+
+    /**
+     * @description 图片长按
+     */
+    imgLongTap() {
+      // #ifdef APP-PLUS
+      var attrs = this.childs[e.currentTarget.dataset.i].attrs
+      if (!attrs.ignore)
+        uni.showActionSheet({
+          itemList: ['保存图片'],
+          success: () => {
+            uni.downloadFile({
+              url: this.root.imgList[attrs.i],
+              success: res => {
+                uni.saveImageToPhotosAlbum({
+                  filePath: res.tempFilePath,
+                  success() {
+                    uni.showToast({
+                      title: '保存成功'
+                    })
+                  }
+                })
+              }
+            })
+          }
+        })
+      // #endif
+    },
+
+    /**
+     * @description 图片加载完成事件
+     * @param {Event} e 
+     */
+    imgLoad(e) {
+      var i = e.currentTarget.dataset.i
+      // #ifndef H5 || APP-PLUS
+      // 设置原宽度
+      if (!this.childs[i].w)
+        this.$set(this.ctrl, i, e.detail.width)
+      else
+        // #endif
+        // 加载完毕,取消加载中占位图
+        if ((this.opts[1] && !this.ctrl[i]) || this.ctrl[i] == -1)
+          this.$set(this.ctrl, i, 1)
+    },
+
+    /**
+     * @description 链接点击事件
+     * @param {Event} e 
+     */
+    linkTap(e) {
+      var attrs = this.childs[e.currentTarget.dataset.i].attrs,
+        href = attrs.href
+      this.root.$emit('linktap', attrs)
+      if (href) {
+        // 跳转锚点
+        if (href[0] == '#')
+          this.root.navigateTo(href.substring(1)).catch(() => { })
+        // 复制外部链接
+        else if (href.includes('://')) {
+          if (this.root.copyLink) {
+            // #ifdef H5
+            window.open(href)
+            // #endif
+            // #ifdef MP
+            uni.setClipboardData({
+              data: href,
+              success: () =>
+                uni.showToast({
+                  title: '链接已复制'
+                })
+            })
+            // #endif
+            // #ifdef APP-PLUS
+            plus.runtime.openWeb(href)
+            // #endif
+          }
+        }
+        // 跳转页面
+        else
+          uni.navigateTo({
+            url: href,
+            fail() {
+              uni.switchTab({
+                url: href,
+                fail() { }
+              })
+            }
+          })
+      }
+    },
+
+    /**
+     * @description 错误事件
+     * @param {Event} e 
+     */
+    mediaError(e) {
+      var i = e.currentTarget.dataset.i,
+        node = this.childs[i]
+      // 加载其他源
+      if (node.name == 'video' || node.name == 'audio') {
+        var index = (this.ctrl[i] || 0) + 1
+        if (index > node.src.length)
+          index = 0
+        if (index < node.src.length)
+          return this.$set(this.ctrl, i, index)
+      }
+      // 显示错误占位图
+      else if (node.name == 'img' && this.opts[2])
+        this.$set(this.ctrl, i, -1)
+      if (this.root)
+        this.root.$emit('error', {
+          source: node.name,
+          attrs: node.attrs,
+          errMsg: e.detail.errMsg
+        })
+    }
+  }
+}
+</script>
+<style>
+/* a 标签默认效果 */
+._a {
+  padding: 1.5px 0 1.5px 0;
+  color: #366092;
+  word-break: break-all;
+}
+
+/* a 标签点击态效果 */
+._hover {
+  text-decoration: underline;
+  opacity: 0.7;
+}
+
+/* 图片默认效果 */
+._img {
+  max-width: 100%;
+  -webkit-touch-callout: none;
+}
+
+/* 内部样式 */
+
+._b,
+._strong {
+  font-weight: bold;
+}
+
+._code {
+  font-family: monospace;
+}
+
+._del {
+  text-decoration: line-through;
+}
+
+._em,
+._i {
+  font-style: italic;
+}
+
+._h1 {
+  font-size: 2em;
+}
+
+._h2 {
+  font-size: 1.5em;
+}
+
+._h3 {
+  font-size: 1.17em;
+}
+
+._h5 {
+  font-size: 0.83em;
+}
+
+._h6 {
+  font-size: 0.67em;
+}
+
+._h1,
+._h2,
+._h3,
+._h4,
+._h5,
+._h6 {
+  display: block;
+  font-weight: bold;
+}
+
+._image {
+  height: 1px;
+}
+
+._ins {
+  text-decoration: underline;
+}
+
+._li {
+  display: list-item;
+}
+
+._ol {
+  list-style-type: decimal;
+}
+
+._ol,
+._ul {
+  display: block;
+  padding-left: 40px;
+  margin: 1em 0;
+}
+
+._q::before {
+  content: '"';
+}
+
+._q::after {
+  content: '"';
+}
+
+._sub {
+  font-size: smaller;
+  vertical-align: sub;
+}
+
+._sup {
+  font-size: smaller;
+  vertical-align: super;
+}
+
+._thead,
+._tbody,
+._tfoot {
+  display: table-row-group;
+}
+
+._tr {
+  display: table-row;
+}
+
+._td,
+._th {
+  display: table-cell;
+  vertical-align: middle;
+}
+
+._th {
+  font-weight: bold;
+  text-align: center;
+}
+
+._ul {
+  list-style-type: disc;
+}
+
+._ul ._ul {
+  margin: 0;
+  list-style-type: circle;
+}
+
+._ul ._ul ._ul {
+  list-style-type: square;
+}
+
+._abbr,
+._b,
+._code,
+._del,
+._em,
+._i,
+._ins,
+._label,
+._q,
+._span,
+._strong,
+._sub,
+._sup {
+  display: inline;
+}
+</style>

+ 1095 - 0
components/mp-html/components/mp-html/parser.js

@@ -0,0 +1,1095 @@
+"use strict";
+
+/**
+ * @fileoverview html 解析器
+ */
+// 配置
+var config = {
+  // 信任的标签(保持标签名不变)
+  trustTags: makeMap('a,abbr,ad,audio,b,blockquote,br,code,col,colgroup,dd,del,dl,dt,div,em,fieldset,h1,h2,h3,h4,h5,h6,hr,i,img,ins,label,legend,li,ol,p,q,ruby,rt,source,span,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,title,ul,video'),
+  // 块级标签(转为 div,其他的非信任标签转为 span)
+  blockTags: makeMap('address,article,aside,body,caption,center,cite,footer,header,html,nav,pre,section'),
+  // 要移除的标签
+  ignoreTags: makeMap('area,base,canvas,embed,frame,head,iframe,input,link,map,meta,param,rp,script,source,style,textarea,title,track,wbr'),
+  // 自闭合的标签
+  voidTags: makeMap('area,base,br,col,circle,ellipse,embed,frame,hr,img,input,line,link,meta,param,path,polygon,rect,source,track,use,wbr'),
+  // html 实体
+  entities: {
+    lt: '<',
+    gt: '>',
+    quot: '"',
+    apos: "'",
+    ensp: "\u2002",
+    emsp: "\u2003",
+    nbsp: '\xA0',
+    semi: ';',
+    ndash: '–',
+    mdash: '—',
+    middot: '·',
+    lsquo: '‘',
+    rsquo: '’',
+    ldquo: '“',
+    rdquo: '”',
+    bull: '•',
+    hellip: '…'
+  },
+  // 默认的标签样式
+  tagStyle: {
+    // #ifndef APP-PLUS-NVUE
+    address: 'font-style:italic',
+    big: 'display:inline;font-size:1.2em',
+    caption: 'display:table-caption;text-align:center',
+    center: 'text-align:center',
+    cite: 'font-style:italic',
+    dd: 'margin-left:40px',
+    mark: 'background-color:yellow',
+    pre: 'font-family:monospace;white-space:pre',
+    s: 'text-decoration:line-through',
+    small: 'display:inline;font-size:0.8em',
+    u: 'text-decoration:underline' // #endif
+
+  }
+};
+var windowWidth = uni.getSystemInfoSync().windowWidth;
+var blankChar = makeMap(' ,\r,\n,\t,\f');
+var idIndex = 0; // #ifdef H5 || APP-PLUS
+
+config.ignoreTags.iframe = void 0;
+config.trustTags.iframe = true;
+config.ignoreTags.embed = void 0;
+config.trustTags.embed = true; // #endif
+// #ifdef APP-PLUS-NVUE
+
+config.ignoreTags.source = void 0;
+config.ignoreTags.style = void 0; // #endif
+
+/**
+ * @description 创建 map
+ * @param {String} str 逗号分隔
+ */
+
+function makeMap(str) {
+  var map = Object.create(null),
+      list = str.split(',');
+
+  for (var i = list.length; i--;) {
+    map[list[i]] = true;
+  }
+
+  return map;
+}
+/**
+ * @description 解码 html 实体
+ * @param {String} str 要解码的字符串
+ * @param {Boolean} amp 要不要解码 &amp;
+ * @returns {String} 解码后的字符串
+ */
+
+
+function decodeEntity(str, amp) {
+  var i = str.indexOf('&');
+
+  while (i != -1) {
+    var j = str.indexOf(';', i + 3),
+        code = void 0;
+    if (j == -1) break;
+
+    if (str[i + 1] == '#') {
+      // &#123; 形式的实体
+      code = parseInt((str[i + 2] == 'x' ? '0' : '') + str.substring(i + 2, j));
+      if (!isNaN(code)) str = str.substr(0, i) + String.fromCharCode(code) + str.substr(j + 1);
+    } else {
+      // &nbsp; 形式的实体
+      code = str.substring(i + 1, j);
+      if (config.entities[code] || code == 'amp' && amp) str = str.substr(0, i) + (config.entities[code] || '&') + str.substr(j + 1);
+    }
+
+    i = str.indexOf('&', i + 1);
+  }
+
+  return str;
+}
+/**
+ * @description html 解析器
+ * @param {Object} vm 组件实例
+ */
+
+
+function parser(vm) {
+  this.options = vm || {};
+  this.tagStyle = Object.assign(config.tagStyle, this.options.tagStyle);
+  this.imgList = vm.imgList || [];
+  this.plugins = vm.plugins || [];
+  this.attrs = Object.create(null);
+  this.stack = [];
+  this.nodes = [];
+}
+/**
+ * @description 执行解析
+ * @param {String} content 要解析的文本
+ */
+
+
+parser.prototype.parse = function (content) {
+  // 插件处理
+  for (var i = this.plugins.length; i--;) {
+    if (this.plugins[i].onUpdate) content = this.plugins[i].onUpdate(content, config) || content;
+  }
+
+  new lexer(this).parse(content); // 出栈未闭合的标签
+
+  while (this.stack.length) {
+    this.popNode();
+  }
+
+  return this.nodes;
+};
+/**
+ * @description 将标签暴露出来(不被 rich-text 包含)
+ */
+
+
+parser.prototype.expose = function () {
+  // #ifndef APP-PLUS-NVUE
+  for (var i = this.stack.length; i--;) {
+    var item = this.stack[i];
+    if (item.name == 'a' || item.c) return;
+    item.c = 1;
+  } // #endif
+
+};
+/**
+ * @description 处理插件
+ * @param {Object} node 要处理的标签
+ * @returns {Boolean} 是否要移除此标签
+ */
+
+
+parser.prototype.hook = function (node) {
+  for (var i = this.plugins.length; i--;) {
+    if (this.plugins[i].onParse && this.plugins[i].onParse(node, this) == false) return false;
+  }
+
+  return true;
+};
+/**
+ * @description 将链接拼接上主域名
+ * @param {String} url 需要拼接的链接
+ * @returns {String} 拼接后的链接
+ */
+
+
+parser.prototype.getUrl = function (url) {
+  var domain = this.options.domain;
+
+  if (url[0] == '/') {
+    // // 开头的补充协议名
+    if (url[1] == '/') url = (domain ? domain.split('://')[0] : 'http') + ':' + url; // 否则补充整个域名
+    else if (domain) url = domain + url;
+  } else if (domain && !url.includes('data:') && !url.includes('://')) url = domain + '/' + url;
+
+  return url;
+};
+/**
+ * @description 解析样式表
+ * @param {Object} node 标签
+ * @returns {Object} 
+ */
+
+
+parser.prototype.parseStyle = function (node) {
+  var attrs = node.attrs,
+      list = (this.tagStyle[node.name] || '').split(';').concat((attrs.style || '').split(';')),
+      styleObj = {},
+      tmp = '';
+
+  if (attrs.id) {
+    // 暴露锚点
+    if (this.options.useAnchor) this.expose();else if (node.name != 'img' && node.name != 'a' && node.name != 'video' && node.name != 'audio') attrs.id = void 0;
+  } // #ifndef APP-PLUS-NVUE
+  // 转换 width 和 height 属性
+
+
+  if (attrs.width) {
+    styleObj.width = parseFloat(attrs.width) + (attrs.width.includes('%') ? '%' : 'px');
+    attrs.width = void 0;
+  }
+
+  if (attrs.height) {
+    styleObj.height = parseFloat(attrs.height) + (attrs.height.includes('%') ? '%' : 'px');
+    attrs.height = void 0;
+  } // #endif
+
+
+  for (var i = 0, len = list.length; i < len; i++) {
+    var info = list[i].split(':');
+    if (info.length < 2) continue;
+    var key = info.shift().trim().toLowerCase(),
+        value = info.join(':').trim(); // 兼容性的 css 不压缩
+
+    if (value[0] == '-' && value.lastIndexOf('-') > 0 || value.includes('safe')) tmp += ";".concat(key, ":").concat(value); // 重复的样式进行覆盖
+    else if (!styleObj[key] || value.includes('import') || !styleObj[key].includes('import')) {
+        // 填充链接
+        if (value.includes('url')) {
+          var j = value.indexOf('(') + 1;
+
+          if (j) {
+            while (value[j] == '"' || value[j] == "'" || blankChar[value[j]]) {
+              j++;
+            }
+
+            value = value.substr(0, j) + this.getUrl(value.substr(j));
+          }
+        } // 转换 rpx(rich-text 内部不支持 rpx)
+        else if (value.includes('rpx')) value = value.replace(/[0-9.]+\s*rpx/g, function ($) {
+            return parseFloat($) * windowWidth / 750 + 'px';
+          });
+
+        styleObj[key] = value;
+      }
+  }
+
+  node.attrs.style = tmp;
+  return styleObj;
+};
+/**
+ * @description 解析到标签名
+ * @param {String} name 标签名
+ * @private
+ */
+
+
+parser.prototype.onTagName = function (name) {
+  this.tagName = this.xml ? name : name.toLowerCase();
+  if (this.tagName == 'svg') this.xml = true; // svg 标签内大小写敏感
+};
+/**
+ * @description 解析到属性名
+ * @param {String} name 属性名
+ * @private
+ */
+
+
+parser.prototype.onAttrName = function (name) {
+  name = this.xml ? name : name.toLowerCase();
+
+  if (name.substr(0, 5) == 'data-') {
+    // data-src 自动转为 src
+    if (name == 'data-src') this.attrName = 'src'; // a 和 img 标签保留 data- 的属性,可以在 imgtap 和 linktap 事件中使用
+    else if (this.tagName == 'img' || this.tagName == 'a') this.attrName = name; // 剩余的移除以减小大小
+      else this.attrName = void 0;
+  } else {
+    this.attrName = name;
+    this.attrs[name] = 'T'; // boolean 型属性缺省设置
+  }
+};
+/**
+ * @description 解析到属性值
+ * @param {String} val 属性值
+ * @private
+ */
+
+
+parser.prototype.onAttrVal = function (val) {
+  var name = this.attrName || ''; // 部分属性进行实体解码
+
+  if (name == 'style' || name == 'href') this.attrs[name] = decodeEntity(val, true); // 拼接主域名
+  else if (name.includes('src')) this.attrs[name] = this.getUrl(decodeEntity(val, true));else if (name) this.attrs[name] = val;
+};
+/**
+ * @description 解析到标签开始
+ * @param {Boolean} selfClose 是否有自闭合标识 />
+ * @private
+ */
+
+
+parser.prototype.onOpenTag = function (selfClose) {
+  // 拼装 node
+  var node = Object.create(null);
+  node.name = this.tagName;
+  node.attrs = this.attrs;
+  this.attrs = Object.create(null);
+  var attrs = node.attrs,
+      parent = this.stack[this.stack.length - 1],
+      siblings = parent ? parent.children : this.nodes,
+      close = this.xml ? selfClose : config.voidTags[node.name]; // 转换 embed 标签
+
+  if (node.name == 'embed') {
+    // #ifndef H5 || APP-PLUS
+    var src = attrs.src || ''; // 按照后缀名和 type 将 embed 转为 video 或 audio
+
+    if (src.includes('.mp4') || src.includes('.3gp') || src.includes('.m3u8') || (attrs.type || '').includes('video')) node.name = 'video';else if (src.includes('.mp3') || src.includes('.wav') || src.includes('.aac') || src.includes('.m4a') || (attrs.type || '').includes('audio')) node.name = 'audio';
+    if (attrs.autostart) attrs.autoplay = 'T';
+    attrs.controls = 'T'; // #endif
+    // #ifdef H5 || APP-PLUS
+
+    this.expose(); // #endif
+  } // #ifndef APP-PLUS-NVUE
+  // 处理音视频
+
+
+  if (node.name == 'video' || node.name == 'audio') {
+    // 设置 id 以便获取 context
+    if (node.name == 'video' && !attrs.id) attrs.id = 'v' + idIndex++; // 没有设置 controls 也没有设置 autoplay 的自动设置 controls
+
+    if (!attrs.controls && !attrs.autoplay) attrs.controls = 'T'; // 用数组存储所有可用的 source
+
+    node.src = [];
+
+    if (attrs.src) {
+      node.src.push(attrs.src);
+      attrs.src = void 0;
+    }
+
+    this.expose();
+  } // #endif
+  // 处理自闭合标签
+
+
+  if (close) {
+    if (!this.hook(node) || config.ignoreTags[node.name]) {
+      // 通过 base 标签设置主域名
+      if (node.name == 'base' && !this.options.domain) this.options.domain = attrs.href; // #ifndef APP-PLUS-NVUE
+      // 设置 source 标签(仅父节点为 video 或 audio 时有效)
+      else if (node.name == 'source' && parent && (parent.name == 'video' || parent.name == 'audio') && attrs.src) parent.src.push(attrs.src); // #endif
+
+      return;
+    } // 解析 style
+
+
+    var styleObj = this.parseStyle(node); // 处理图片
+
+    if (node.name == 'img') {
+      if (attrs.src) {
+        // 标记 webp
+        if (attrs.src.includes('webp')) node.webp = 'T'; // data url 图片如果没有设置 original-src 默认为不可预览的小图片
+
+        if (attrs.src.includes('data:') && !attrs['original-src']) attrs.ignore = 'T';
+
+        if (!attrs.ignore || node.webp || attrs.src.includes('cloud://')) {
+          var i;
+
+          for (i = this.stack.length; i--;) {
+            var item = this.stack[i];
+            if (item.name == 'a') break; // #ifndef H5 || APP-PLUS
+
+            var style = item.attrs.style || '';
+
+            if (style.includes('flex:') && !style.includes('flex:0') && !style.includes('flex: 0') && (!styleObj.width || !styleObj.width.includes('%'))) {
+              styleObj.width = '100% !important';
+              styleObj.height = '';
+
+              for (var j = i + 1; j < this.stack.length; j++) {
+                this.stack[j].attrs.style = (this.stack[j].attrs.style || '').replace('inline-', '');
+              }
+            } else if (style.includes('flex') && styleObj.width == '100%') {
+              for (var _j = i + 1; _j < this.stack.length; _j++) {
+                var _style = this.stack[_j].attrs.style || '';
+
+                if (!_style.includes(';width') && !_style.includes(' width') && _style.indexOf('width') != 0) {
+                  styleObj.width = '';
+                  break;
+                }
+              }
+            } else if (style.includes('inline-block')) {
+              if (styleObj.width && styleObj.width[styleObj.width.length - 1] == '%') {
+                item.attrs.style += ';max-width:' + styleObj.width;
+                styleObj.width = '';
+              } else item.attrs.style += ';max-width:100%';
+            } // #endif
+
+
+            item.c = 1;
+          }
+
+          if (i == -1) {
+            attrs.i = this.imgList.length.toString();
+
+            var _src = attrs['original-src'] || attrs.src; // #ifndef H5 || MP-ALIPAY || APP-PLUS || MP-360
+
+
+            if (this.imgList.includes(_src)) {
+              // 如果有重复的链接则对域名进行随机大小写变换避免预览时错位
+              var _i = _src.indexOf('://');
+
+              if (_i != -1) {
+                _i += 3;
+
+                var newSrc = _src.substr(0, _i);
+
+                for (; _i < _src.length; _i++) {
+                  if (_src[_i] == '/') break;
+                  newSrc += Math.random() > 0.5 ? _src[_i].toUpperCase() : _src[_i];
+                }
+
+                newSrc += _src.substr(_i);
+                _src = newSrc;
+              }
+            } // #endif
+
+
+            this.imgList.push(_src); // #ifdef H5 || APP-PLUS
+
+            if (this.options.lazyLoad) {
+              attrs['data-src'] = attrs.src;
+              attrs.src = void 0;
+            } // #endif
+
+          } else attrs.ignore = 'T';
+        }
+      }
+
+      if (styleObj.display == 'inline') styleObj.display = ''; // #ifndef APP-PLUS-NVUE
+
+      if (attrs.ignore) {
+        styleObj['max-width'] = '100%';
+        attrs.style += ';-webkit-touch-callout:none';
+      } // #endif
+      // 设置的宽度超出屏幕,为避免变形,高度转为自动
+
+
+      if (parseInt(styleObj.width) > windowWidth) styleObj.height = void 0; // 记录是否设置了宽高
+
+      if (styleObj.width) {
+        if (styleObj.width.includes('auto')) styleObj.width = '';else {
+          node.w = 'T';
+          if (styleObj.height && !styleObj.height.includes('auto')) node.h = 'T';
+        }
+      }
+    } else if (node.name == 'svg') {
+      siblings.push(node);
+      this.stack.push(node);
+      this.popNode();
+      return;
+    }
+
+    for (var key in styleObj) {
+      if (styleObj[key]) attrs.style += ";".concat(key, ":").concat(styleObj[key].replace(' !important', ''));
+    }
+
+    attrs.style = attrs.style.substr(1) || void 0;
+  } else {
+    if (node.name == 'pre' || (attrs.style || '').includes('white-space') && attrs.style.includes('pre')) this.pre = node.pre = true;
+    node.children = [];
+    this.stack.push(node);
+  } // 加入节点树
+
+
+  siblings.push(node);
+};
+/**
+ * @description 解析到标签结束
+ * @param {String} name 标签名
+ * @private
+ */
+
+
+parser.prototype.onCloseTag = function (name) {
+  // 依次出栈到匹配为止
+  name = this.xml ? name : name.toLowerCase();
+  var i;
+
+  for (i = this.stack.length; i--;) {
+    if (this.stack[i].name == name) break;
+  }
+
+  if (i != -1) {
+    while (this.stack.length > i) {
+      this.popNode();
+    }
+  } else if (name == 'p' || name == 'br') {
+    var siblings = this.stack.length ? this.stack[this.stack.length - 1].children : this.nodes;
+    siblings.push({
+      name: name,
+      attrs: {}
+    });
+  }
+};
+/**
+ * @description 处理标签出栈
+ * @private
+ */
+
+
+parser.prototype.popNode = function () {
+  var node = this.stack.pop(),
+      attrs = node.attrs,
+      children = node.children,
+      parent = this.stack[this.stack.length - 1],
+      siblings = parent ? parent.children : this.nodes;
+
+  if (!this.hook(node) || config.ignoreTags[node.name]) {
+    // 获取标题
+    if (node.name == 'title' && children.length && children[0].type == 'text' && this.options.setTitle) uni.setNavigationBarTitle({
+      title: children[0].text
+    });
+    siblings.pop();
+    return;
+  }
+
+  if (node.pre) {
+    // 是否合并空白符标识
+    node.pre = this.pre = void 0;
+
+    for (var i = this.stack.length; i--;) {
+      if (this.stack[i].pre) this.pre = true;
+    }
+  }
+
+  var styleObj = {}; // 转换 svg
+
+  if (node.name == 'svg') {
+    // #ifndef APP-PLUS-NVUE
+    var src = '',
+        style = attrs.style;
+    attrs.style = '';
+    attrs.xmlns = 'http://www.w3.org/2000/svg';
+
+    (function traversal(node) {
+      src += '<' + node.name;
+
+      for (var item in node.attrs) {
+        var val = node.attrs[item];
+
+        if (val) {
+          if (item == 'viewbox') item = 'viewBox';
+          src += " ".concat(item, "=\"").concat(val, "\"");
+        }
+      }
+
+      if (!node.children) src += '/>';else {
+        src += '>';
+
+        for (var _i2 = 0; _i2 < node.children.length; _i2++) {
+          traversal(node.children[_i2]);
+        }
+
+        src += '</' + node.name + '>';
+      }
+    })(node);
+
+    node.name = 'img';
+    node.attrs = {
+      src: 'data:image/svg+xml;utf8,' + src.replace(/#/g, '%23'),
+      style: style,
+      ignore: 'T'
+    };
+    node.children = void 0; // #endif
+
+    this.xml = false;
+    return;
+  } // #ifndef APP-PLUS-NVUE
+  // 转换 align 属性
+
+
+  if (attrs.align) {
+    if (node.name == 'table') {
+      if (attrs.align == 'center') styleObj['margin-inline-start'] = styleObj['margin-inline-end'] = 'auto';else styleObj["float"] = attrs.align;
+    } else styleObj['text-align'] = attrs.align;
+
+    attrs.align = void 0;
+  } // 转换 font 标签的属性
+
+
+  if (node.name == 'font') {
+    if (attrs.color) {
+      styleObj.color = attrs.color;
+      attrs.color = void 0;
+    }
+
+    if (attrs.face) {
+      styleObj['font-family'] = attrs.face;
+      attrs.face = void 0;
+    }
+
+    if (attrs.size) {
+      var size = parseInt(attrs.size);
+
+      if (!isNaN(size)) {
+        if (size < 1) size = 1;else if (size > 7) size = 7;
+        styleObj['font-size'] = ['xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large'][size - 1];
+      }
+
+      attrs.size = void 0;
+    }
+  } // #endif
+  // 一些编辑器的自带 class
+
+
+  if ((attrs["class"] || '').includes('align-center')) styleObj['text-align'] = 'center';
+  Object.assign(styleObj, this.parseStyle(node));
+  if (parseInt(styleObj.width) > windowWidth) styleObj['max-width'] = '100%'; // #ifndef APP-PLUS-NVUE
+
+  if (config.blockTags[node.name]) node.name = 'div'; // 未知标签转为 span,避免无法显示
+  else if (!config.trustTags[node.name] && !this.xml) node.name = 'span';
+  if (node.name == 'a' || node.name == 'ad' // #ifdef H5 || APP-PLUS
+  || node.name == 'iframe' // #endif
+  ) this.expose(); // #ifdef APP-PLUS
+  else if (node.name == 'video') {
+      var str = '<video style="max-width:100%"';
+
+      for (var item in attrs) {
+        if (attrs[item]) str += ' ' + item + '="' + attrs[item] + '"';
+      }
+
+      if (this.options.pauseVideo) str += ' onplay="for(var e=document.getElementsByTagName(\'video\'),t=0;t<e.length;t++)e[t]!=this&&e[t].pause()"';
+      str += '>';
+
+      for (var _i3 = 0; _i3 < node.src.length; _i3++) {
+        str += '<source src="' + node.src[_i3] + '">';
+      }
+
+      str += '</video>';
+      node.html = str;
+    } // #endif
+    // 列表处理
+    else if ((node.name == 'ul' || node.name == 'ol') && node.c) {
+        var types = {
+          a: 'lower-alpha',
+          A: 'upper-alpha',
+          i: 'lower-roman',
+          I: 'upper-roman'
+        };
+
+        if (types[attrs.type]) {
+          attrs.style += ';list-style-type:' + types[attrs.type];
+          attrs.type = void 0;
+        }
+
+        for (var _i4 = children.length; _i4--;) {
+          if (children[_i4].name == 'li') children[_i4].c = 1;
+        }
+      } // 表格处理
+      else if (node.name == 'table') {
+          // cellpadding、cellspacing、border 这几个常用表格属性需要通过转换实现
+          var padding = parseFloat(attrs.cellpadding),
+              spacing = parseFloat(attrs.cellspacing),
+              border = parseFloat(attrs.border);
+
+          if (node.c) {
+            // padding 和 spacing 默认 2
+            if (isNaN(padding)) padding = 2;
+            if (isNaN(spacing)) spacing = 2;
+          }
+
+          if (border) attrs.style += ';border:' + border + 'px solid gray';
+
+          if (node.flag && node.c) {
+            // 有 colspan 或 rowspan 且含有链接的表格通过 grid 布局实现
+            styleObj.display = 'grid';
+
+            if (spacing) {
+              styleObj['grid-gap'] = spacing + 'px';
+              styleObj.padding = spacing + 'px';
+            } // 无间隔的情况下避免边框重叠
+            else if (border) attrs.style += ';border-left:0;border-top:0';
+
+            var width = [],
+                // 表格的列宽
+            trList = [],
+                // tr 列表
+            cells = [],
+                // 保存新的单元格
+            map = {}; // 被合并单元格占用的格子
+
+            (function traversal(nodes) {
+              for (var _i5 = 0; _i5 < nodes.length; _i5++) {
+                if (nodes[_i5].name == 'tr') trList.push(nodes[_i5]);else traversal(nodes[_i5].children || []);
+              }
+            })(children);
+
+            for (var row = 1; row <= trList.length; row++) {
+              var col = 1;
+
+              for (var j = 0; j < trList[row - 1].children.length; j++, col++) {
+                var td = trList[row - 1].children[j];
+
+                if (td.name == 'td' || td.name == 'th') {
+                  // 这个格子被上面的单元格占用,则列号++
+                  while (map[row + '.' + col]) {
+                    col++;
+                  }
+
+                  var _style2 = td.attrs.style || '',
+                      start = _style2.indexOf('width') ? _style2.indexOf(';width') : 0; // 提取出 td 的宽度
+
+
+                  if (start != -1) {
+                    var end = _style2.indexOf(';', start + 6);
+
+                    if (end == -1) end = _style2.length;
+                    if (!td.attrs.colspan) width[col] = _style2.substring(start ? start + 7 : 6, end);
+                    _style2 = _style2.substr(0, start) + _style2.substr(end);
+                  }
+
+                  _style2 += (border ? ";border:".concat(border, "px solid gray") + (spacing ? '' : ';border-right:0;border-bottom:0') : '') + (padding ? ";padding:".concat(padding, "px") : ''); // 处理列合并
+
+                  if (td.attrs.colspan) {
+                    _style2 += ";grid-column-start:".concat(col, ";grid-column-end:").concat(col + parseInt(td.attrs.colspan));
+                    if (!td.attrs.rowspan) _style2 += ";grid-row-start:".concat(row, ";grid-row-end:").concat(row + 1);
+                    col += parseInt(td.attrs.colspan) - 1;
+                  } // 处理行合并
+
+
+                  if (td.attrs.rowspan) {
+                    _style2 += ";grid-row-start:".concat(row, ";grid-row-end:").concat(row + parseInt(td.attrs.rowspan));
+                    if (!td.attrs.colspan) _style2 += ";grid-column-start:".concat(col, ";grid-column-end:").concat(col + 1); // 记录下方单元格被占用
+
+                    for (var k = 1; k < td.attrs.rowspan; k++) {
+                      map[row + k + '.' + col] = 1;
+                    }
+                  }
+
+                  if (_style2) td.attrs.style = _style2;
+                  cells.push(td);
+                }
+              }
+
+              if (row == 1) {
+                var temp = '';
+
+                for (var _i6 = 1; _i6 < col; _i6++) {
+                  temp += (width[_i6] ? width[_i6] : 'auto') + ' ';
+                }
+
+                styleObj['grid-template-columns'] = temp;
+              }
+            }
+
+            node.children = cells;
+          } else {
+            // 没有使用合并单元格的表格通过 table 布局实现
+            if (node.c) styleObj.display = 'table';
+            if (!isNaN(spacing)) styleObj['border-spacing'] = spacing + 'px';
+
+            if (border || padding) {
+              // 遍历
+              (function traversal(nodes) {
+                for (var _i7 = 0; _i7 < nodes.length; _i7++) {
+                  var _td = nodes[_i7];
+
+                  if (_td.name == 'th' || _td.name == 'td') {
+                    if (border) _td.attrs.style = "border:".concat(border, "px solid gray;").concat(_td.attrs.style || '');
+                    if (padding) _td.attrs.style = "padding:".concat(padding, "px;").concat(_td.attrs.style || '');
+                  } else if (_td.children) traversal(_td.children);
+                }
+              })(children);
+            }
+          } // 给表格添加一个单独的横向滚动层
+
+
+          if (this.options.scrollTable && !(attrs.style || '').includes('inline')) {
+            var table = Object.assign({}, node);
+            node.name = 'div';
+            node.attrs = {
+              style: 'overflow:auto'
+            };
+            node.children = [table];
+            attrs = table.attrs;
+          }
+        } else if ((node.name == 'td' || node.name == 'th') && (attrs.colspan || attrs.rowspan)) {
+          for (var _i8 = this.stack.length; _i8--;) {
+            if (this.stack[_i8].name == 'table') {
+              this.stack[_i8].flag = 1; // 指示含有合并单元格
+
+              break;
+            }
+          }
+        } // 转换 ruby
+        else if (node.name == 'ruby') {
+            node.name = 'span';
+
+            for (var _i9 = 0; _i9 < children.length - 1; _i9++) {
+              if (children[_i9].type == 'text' && children[_i9 + 1].name == 'rt') {
+                children[_i9] = {
+                  name: 'div',
+                  attrs: {
+                    style: 'display:inline-block'
+                  },
+                  children: [{
+                    name: 'div',
+                    attrs: {
+                      style: 'font-size:50%;text-align:start'
+                    },
+                    children: children[_i9 + 1].children
+                  }, children[_i9]]
+                };
+                children.splice(_i9 + 1, 1);
+              }
+            }
+          } else if (node.c) {
+            node.c = 2;
+
+            for (var _i10 = node.children.length; _i10--;) {
+              if (!node.children[_i10].c || node.children[_i10].name == 'table') node.c = 1;
+            }
+          }
+  if ((styleObj.display || '').includes('flex') && !node.c) for (var _i11 = children.length; _i11--;) {
+    var _item = children[_i11];
+
+    if (_item.f) {
+      _item.attrs.style = (_item.attrs.style || '') + _item.f;
+      _item.f = void 0;
+    }
+  } // flex 布局时部分样式需要提取到 rich-text 外层
+
+  var flex = parent && (parent.attrs.style || '').includes('flex') // #ifdef MP-WEIXIN
+  // 检查基础库版本 virtualHost 是否可用
+  && !(node.c && wx.getNFCAdapter) // #endif
+  // #ifndef MP-WEIXIN || MP-QQ || MP-BAIDU || MP-TOUTIAO
+  && !node.c; // #endif
+
+  if (flex) node.f = ';max-width:100%'; // #endif
+
+  for (var key in styleObj) {
+    if (styleObj[key]) {
+      var val = ";".concat(key, ":").concat(styleObj[key].replace(' !important', '')); // #ifndef APP-PLUS-NVUE
+
+      if (flex && (key.includes('flex') && key != 'flex-direction' || key == 'align-self' || styleObj[key][0] == '-' || key == 'width' && val.includes('%'))) {
+        node.f += val;
+        if (key == 'width') attrs.style += ';width:100%';
+      } else // #endif
+        attrs.style += val;
+    }
+  }
+
+  attrs.style = attrs.style.substr(1) || void 0;
+};
+/**
+ * @description 解析到文本
+ * @param {String} text 文本内容
+ */
+
+
+parser.prototype.onText = function (text) {
+  if (!this.pre) {
+    // 合并空白符
+    var trim = '',
+        flag;
+
+    for (var i = 0, len = text.length; i < len; i++) {
+      if (!blankChar[text[i]]) trim += text[i];else {
+        if (trim[trim.length - 1] != ' ') trim += ' ';
+        if (text[i] == '\n' && !flag) flag = true;
+      }
+    } // 去除含有换行符的空串
+
+
+    if (trim == ' ' && flag) return;
+    text = trim;
+  }
+
+  var node = Object.create(null);
+  node.type = 'text';
+  node.text = decodeEntity(text);
+
+  if (this.hook(node)) {
+    var siblings = this.stack.length ? this.stack[this.stack.length - 1].children : this.nodes;
+    siblings.push(node);
+  }
+};
+/**
+ * @description html 词法分析器
+ * @param {Object} handler 高层处理器
+ */
+
+
+function lexer(handler) {
+  this.handler = handler;
+}
+/**
+ * @description 执行解析
+ * @param {String} content 要解析的文本
+ */
+
+
+lexer.prototype.parse = function (content) {
+  this.content = content || '';
+  this.i = 0; // 标记解析位置
+
+  this.start = 0; // 标记一个单词的开始位置
+
+  this.state = this.text; // 当前状态
+
+  for (var len = this.content.length; this.i != -1 && this.i < len;) {
+    this.state();
+  }
+};
+/**
+ * @description 检查标签是否闭合
+ * @param {String} method 如果闭合要进行的操作
+ * @returns {Boolean} 是否闭合
+ * @private
+ */
+
+
+lexer.prototype.checkClose = function (method) {
+  var selfClose = this.content[this.i] == '/';
+
+  if (this.content[this.i] == '>' || selfClose && this.content[this.i + 1] == '>') {
+    if (method) this.handler[method](this.content.substring(this.start, this.i));
+    this.i += selfClose ? 2 : 1;
+    this.start = this.i;
+    this.handler.onOpenTag(selfClose);
+    this.state = this.text;
+    return true;
+  }
+
+  return false;
+};
+/**
+ * @description 文本状态
+ * @private
+ */
+
+
+lexer.prototype.text = function () {
+  this.i = this.content.indexOf('<', this.i); // 查找最近的标签
+
+  if (this.i == -1) {
+    // 没有标签了
+    if (this.start < this.content.length) this.handler.onText(this.content.substring(this.start, this.content.length));
+    return;
+  }
+
+  var c = this.content[this.i + 1];
+
+  if (c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z') {
+    // 标签开头
+    if (this.start != this.i) this.handler.onText(this.content.substring(this.start, this.i));
+    this.start = ++this.i;
+    this.state = this.tagName;
+  } else if (c == '/' || c == '!' || c == '?') {
+    if (this.start != this.i) this.handler.onText(this.content.substring(this.start, this.i));
+    var next = this.content[this.i + 2];
+
+    if (c == '/' && (next >= 'a' && next <= 'z' || next >= 'A' && next <= 'Z')) {
+      // 标签结尾
+      this.i += 2;
+      this.start = this.i;
+      return this.state = this.endTag;
+    } // 处理注释
+
+
+    var end = '-->';
+    if (c != '!' || this.content[this.i + 2] != '-' || this.content[this.i + 3] != '-') end = '>';
+    this.i = this.content.indexOf(end, this.i);
+
+    if (this.i != -1) {
+      this.i += end.length;
+      this.start = this.i;
+    }
+  } else this.i++;
+};
+/**
+ * @description 标签名状态
+ * @private
+ */
+
+
+lexer.prototype.tagName = function () {
+  if (blankChar[this.content[this.i]]) {
+    // 解析到标签名
+    this.handler.onTagName(this.content.substring(this.start, this.i));
+
+    while (blankChar[this.content[++this.i]]) {
+      ;
+    }
+
+    if (this.i < this.content.length && !this.checkClose()) {
+      this.start = this.i;
+      this.state = this.attrName;
+    }
+  } else if (!this.checkClose('onTagName')) this.i++;
+};
+/**
+ * @description 属性名状态
+ * @private
+ */
+
+
+lexer.prototype.attrName = function () {
+  var c = this.content[this.i];
+
+  if (blankChar[c] || c == '=') {
+    // 解析到属性名
+    this.handler.onAttrName(this.content.substring(this.start, this.i));
+    var needVal = c == '=',
+        len = this.content.length;
+
+    while (++this.i < len) {
+      c = this.content[this.i];
+
+      if (!blankChar[c]) {
+        if (this.checkClose()) return;
+
+        if (needVal) {
+          // 等号后遇到第一个非空字符
+          this.start = this.i;
+          return this.state = this.attrVal;
+        }
+
+        if (this.content[this.i] == '=') needVal = true;else {
+          this.start = this.i;
+          return this.state = this.attrName;
+        }
+      }
+    }
+  } else if (!this.checkClose('onAttrName')) this.i++;
+};
+/**
+ * @description 属性值状态
+ * @private
+ */
+
+
+lexer.prototype.attrVal = function () {
+  var c = this.content[this.i],
+      len = this.content.length; // 有冒号的属性
+
+  if (c == '"' || c == "'") {
+    this.start = ++this.i;
+    this.i = this.content.indexOf(c, this.i);
+    if (this.i == -1) return;
+    this.handler.onAttrVal(this.content.substring(this.start, this.i));
+  } // 没有冒号的属性
+  else for (; this.i < len; this.i++) {
+      if (blankChar[this.content[this.i]]) {
+        this.handler.onAttrVal(this.content.substring(this.start, this.i));
+        break;
+      } else if (this.checkClose('onAttrVal')) return;
+    }
+
+  while (blankChar[this.content[++this.i]]) {
+    ;
+  }
+
+  if (this.i < len && !this.checkClose()) {
+    this.start = this.i;
+    this.state = this.attrName;
+  }
+};
+/**
+ * @description 结束标签状态
+ * @returns {String} 结束的标签名
+ * @private
+ */
+
+
+lexer.prototype.endTag = function () {
+  var c = this.content[this.i];
+
+  if (blankChar[c] || c == '>' || c == '/') {
+    this.handler.onCloseTag(this.content.substring(this.start, this.i));
+
+    if (c != '>') {
+      this.i = this.content.indexOf('>', this.i);
+      if (this.i == -1) return;
+    }
+
+    this.start = ++this.i;
+    this.state = this.text;
+  } else this.i++;
+};
+
+module.exports = parser;

文件差异内容过多而无法显示
+ 0 - 0
components/mp-html/static/app-plus/mp-html/js/handler.js


文件差异内容过多而无法显示
+ 0 - 0
components/mp-html/static/app-plus/mp-html/js/uni.webview.min.js


+ 1 - 0
components/mp-html/static/app-plus/mp-html/local.html

@@ -0,0 +1 @@
+<head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"><style>body,html{width:100%;height:100%;overflow:hidden}body{margin:0}video{max-width:100%}img{max-width:100%;-webkit-touch-callout:none}@keyframes show{0%{opacity:0}100%{opacity:1}}</style></head><body><div id="content"></div><script type="text/javascript" src="./js/uni.webview.min.js"></script><script type="text/javascript" src="./js/handler.js"></script></body>

+ 62 - 0
components/nav-bar/index.css

@@ -0,0 +1,62 @@
+/* 底部导航样式 */
+
+.active {
+    color: var(--mina);
+}
+
+.Tabbar {
+    position: fixed;
+    bottom: 0;
+    left: 0;
+    display: flex;
+    height: 115rpx;
+    width: 100%;
+    font-size: 26rpx;
+    color: #888;
+    background: #fff;
+    z-index: 98;
+}
+
+.Tabbar .tab-item {
+    width: 25%;
+    text-align: center;
+    position: relative;
+    line-height: initial;
+}
+
+.tab-item .image {
+    display: block;
+    width: 54rpx;
+    height: 54rpx;
+    margin: 13rpx auto 0;
+}
+
+.dot {
+    display: block;
+    height: 15rpx;
+    width: 15rpx;
+    border-radius: 50%;
+    background: #F51A1A;
+    box-sizing: border-box;
+    position: absolute;
+    top: 3rpx;
+    right: 30%;
+}
+
+.dots {
+    display: block;
+    height: 30rpx;
+    border-radius: 30rpx;
+    padding: 0 8rpx;
+    font-size: 24rpx;
+    color: #fff;
+    line-height: 30rpx;
+    background: #F51A1A;
+    min-width: 30rpx;
+    box-sizing: border-box;
+    text-align: center;
+    position: absolute;
+    top: 10rpx;
+    right: 20%;
+}
+

+ 164 - 0
components/nav-bar/index.vue

@@ -0,0 +1,164 @@
+<template>
+	<view>
+		<view class="Tabbar savepadding">
+			<view v-for="(item, index) in list" :key="index" class="tab-item" @tap="goUrl(item.click)">
+				<image class="nav_icon11 image" :src="channel===item.channel ?item.selectedIconPath:item.iconPath">
+				</image>
+				<view :class="channel===item.channel?'active':''">{{item.text}}<text class="dots"
+						v-if="count > 0&&item.channel==='cart'">{{count}}</text></view>
+
+			</view>
+		</view>
+		<view class="savepadding" style="height:115rpx"></view>
+	</view>
+
+</template>
+
+<script>
+	const app = getApp();
+	const req = require("../../utils/request.js");
+	import foot from "./index";
+
+	export default {
+		data() {
+			return {
+				bottomBlankHeignt: app.globalData.isIPhoneX ? 68 : 0,
+				iconSrc: req.public.iconSrc,
+				about: {},
+				list: [],
+				count: ""
+			};
+		},
+
+		components: {
+			foot
+		},
+		props: {
+			channel: {
+				type: String,
+				default: 'home'
+			},
+			isUpdate: {
+				type: Boolean,
+				default: false
+			},
+			productType: {
+				type: Number,
+				default: 0
+			}
+		},
+		watch: {
+			"isUpdate": function(isUpdate) {
+				// console.log('需要更新消息', isUpdate);
+				if (!this.isReady) return;
+				this.getCount();
+			}
+		},
+
+		mounted() {
+			// console.log('ready');
+			this.isReady = true;
+			this.getCount();
+			this.getTab();
+		},
+
+		methods: {
+			getCount() {
+				// console.log(this.productType);
+				let from = {};
+
+				if (this.productType == 2) {
+					from.purchaseType = 2;
+				} else {
+					from.purchaseType = 1;
+				}
+
+				req.getRequest('/api/purchase/count', from, res => {
+					this.setData({
+						count: res
+					});
+				});
+			},
+
+			// 获取tab导航
+			getTab() {
+				// console.log(req.tab); // 过滤关闭的tab
+
+				let data = req.tab.filter(it => it.show == true); // 排序更换位置
+				// console.log(data.sort(this.compare('index')))
+				this.setData({
+					list: data.sort(this.compare('index'))
+				}); // console.log(data.sort(this.compare('index')))
+			},
+
+			// 排序
+			compare(property) {
+				return function(a, b) {
+					var value1 = a[property];
+					var value2 = b[property];
+					return value1 - value2;
+				};
+			},
+
+
+			/**
+			 * 跳转
+			 */
+			goUrl: function(e) {
+				// console.log(e)
+				if (e == "goShop") {
+					this.goShop()
+				}
+				if (e == "goHome") {
+					this.goHome()
+				}
+				if (e == "goSort") {
+					this.goSort()
+				}
+				if (e == "goInteractive") {
+					this.goInteractive()
+				}
+				if (e == "goLive") {
+					this.goLive()
+				}
+				if (e == "goCart") {
+					this.goCart()
+				}
+				if (e == "goUser") {
+					this.goUser()
+				}
+			},
+			goHome: function() {
+				if (this.channel === "home") return;
+				app.globalData.switchTab('pages/index/index');
+			},
+			goSort: function() {
+				if (this.channel === "sort") return;
+				app.globalData.switchTab('pages/sort/sort');
+			},
+			goInteractive: function() {
+				if (this.channel === "interactive") return;
+				app.globalData.switchTab('pages/interactive/index');
+			},
+			goLive: function() {
+				if (this.channel === "live") return;
+				app.globalData.switchTab('pages/live/live');
+			},
+			goCart: function() {
+				if (this.channel === "cart") return;
+				app.globalData.switchTab('pages/cart/cart');
+			},
+			goUser: function() {
+				if (this.channel === "user") return;
+				app.globalData.switchTab('pages/user/user');
+			},
+			goShop: function() {
+				if (this.channel === "shop") return;
+				app.globalData.switchTab('pages/timelyDelivery/index');
+			}
+		}
+	};
+</script>
+<style>
+	@import "./index.css";
+</style>

+ 29 - 0
components/product-activity/index.css

@@ -0,0 +1,29 @@
+/* components/product-activity/index.wxss */
+.popup{position: fixed;z-index: 100;left: 0;right: 0;bottom: 0;background: #fff;border-radius: 20rpx 20rpx 0 0;padding: 35rpx 30rpx 50rpx;}
+.close{position: absolute;top: 30rpx;right: 30rpx;}
+.close .image{width: 42rpx;height: 42rpx;}
+.top{font-size: 32rpx;color: #222222; text-align: center;font-weight: bold;}
+.cont{padding: 42rpx 30rpx 0 30rpx;}
+.promotion{font-size: 30rpx; color: #999999;}
+.discount{align-items: center;margin: 40rpx 0 0 0;justify-content: space-between;}
+.discount .duo{display: block;background: #FDF5F3;padding: 0 13rpx;height: 40rpx;line-height: 40rpx;font-size: 24rpx;color: #FF5F08;margin: 0 20rpx 0 0;white-space: nowrap;}
+.discount .intensity{font-size: 26rpx;}
+.ricoimg{width: 15rpx;height: 20rpx;}
+.mask {
+  position: fixed;
+  z-index: 99;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  background: rgba(0, 0, 0, .5);
+}
+.dflex {
+  display: flex;
+  display: -webkit-flex;
+}
+
+.flex {
+  flex: 1;
+  -webkit-flex: 1;
+}

+ 64 - 0
components/product-activity/index.vue

@@ -0,0 +1,64 @@
+<template>
+<view>
+<!--components/product-activity/index.wxml-->
+<!-- 还未使用 活动 -->
+<view class="mask" @tap="hideActive"></view>
+<view class="popup">
+  <view class="close" @tap="hideActive">
+    <image class="image" src="/static/pages/images/close.png"></image>
+  </view>
+  <view class="top">活动</view>
+  <view class="cont">
+    <view class="promotion">促销活动</view>
+    <view class="discount dflex flex">
+      <view class="dflex">
+        <text class="duo">多买优惠</text>
+        <view class="intensity">满2件,总价打75折</view>
+      </view>
+      <image src="/static/pages/images/rico.png" class="ricoimg"></image>
+    </view>
+    <view class="discount dflex flex">
+      <view class="dflex">
+        <text class="duo">拼团</text>
+        <view class="intensity">此商品正常参加拼团购</view>
+      </view>
+      <image src="/static/pages/images/rico.png" class="ricoimg"></image>
+    </view>
+    <view class="discount dflex flex">
+      <view class="dflex">
+        <view class="duo">限购</view>
+        <view class="intensity">该商品购买1-200件时享受单价¥79.00,超出数量
+以结算价为准</view>
+      </view>
+      <!-- <image src="/pages/images/rico.png" class="ricoimg"></image> -->
+    </view>
+  </view>
+  <view></view>
+</view>
+</view>
+</template>
+
+<script>
+
+export default {
+  data() {
+    return {
+		value:''
+	};
+  },
+
+  components: {},
+  props: {},
+  methods: {
+    hideActive() {
+      this.$emit('hideActive', {
+        detail: this
+      });
+    }
+
+  }
+};
+</script>
+<style>
+@import "./index.css";
+</style>

+ 7 - 0
components/product-login/index.css

@@ -0,0 +1,7 @@
+.ceng{position: fixed;top: 0;left: 0;right: 0;bottom: 0;background: rgba(0,0,0,.5);z-index: 99;}
+.popup-login{position: fixed;top: 50%;transform: translateY(-50%);left: 80rpx;right: 80rpx;background: #fff;border-radius: 20rpx;padding: 80rpx 50rpx;text-align: center;z-index: 100;}
+.close{position: absolute;top: 30rpx;right: 30rpx;}
+.close .image{width: 42rpx;height: 42rpx;}
+.logo{width: 100rpx;height: 100rpx;border-radius: 50%;margin: 0 auto;}
+.title{font-size: 32rpx;color: #333;font-weight: bold;margin-top: 30rpx;}
+.l-btn{height: 80rpx;line-height: 80rpx;background: var(--mina);border-radius: 40rpx;font-size: 30rpx;color: #fff;margin-top: 80rpx;}

+ 83 - 0
components/product-login/index.vue

@@ -0,0 +1,83 @@
+<template>
+	<view>
+		<view class="ceng" @tap="hidePopupLogin"></view>
+		<view class="popup-login">
+			<view class="close" @tap="hidePopupLogin">
+				<image class="image" src="/static/pages/images/close.png"></image>
+			</view>
+			<image :src="about.CONFIG_PROJECT_LOGO" mode="aspectFill" class="logo"></image>
+			<view class="title">{{about.CONFIG_PROJECT_TITLE}}</view>
+			<view class="l-btn" @click="getWXUserProfile()">授权登录</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	const app = getApp();
+	const req = require("../../utils/request");
+	export default {
+		data() {
+			return {
+				sessionKey: '',
+				openid:''
+			};
+		},
+		props: {
+			about: Object,
+		},
+		watch: {},
+		options: {},
+
+		mounted() {
+			app.globalData.getCheckSessoin(json => {
+				this.sessionKey = json.session_key;
+				this.openid = json.openid;
+				if(json.unionid){
+					this.unionid = json.unionid;
+				}
+			});
+		},
+
+		methods: {
+			hidePopupLogin() {
+				this.$emit('hidePopupLogin');
+			},
+			getWXUserProfile() {
+				uni.getUserProfile({
+					desc: '注册',
+					success: res => {
+						this.toSubmitLogin(res.iv, res.encryptedData);
+					},
+					fail: res => {
+						req.msg(res);
+					}
+				});
+			},
+			toSubmitLogin(iv, encryptedData) {
+				let that = this;
+				if (!encryptedData || !iv) return false;
+				let _params = {
+					sessionKey: this.sessionKey,
+					openId: this.openid,
+					iv: iv,
+					encryptedData: encryptedData
+				};
+				if (req.getStorage('pidCode')) {
+					_params.parentId = req.getStorage('pidCode');
+				}
+				if (that.unionid) {
+					_params.unionid = that.unionid;
+				}
+				req.postRequest('/api/login', _params, json => {
+					let params = json;
+					req.setStorage('userInfo', json);
+					that.hidePopupLogin();
+				});
+			},
+		}
+	};
+</script>
+
+<style scoped>
+	@import "./index.css";
+</style>

+ 28 - 0
components/product-popup/index.css

@@ -0,0 +1,28 @@
+/* 商品规格 */
+.popup{position: fixed;z-index: 100;left: 0;right: 0;bottom: 0;background: #fff;border-radius: 20rpx 20rpx 0 0;padding: 35rpx 30rpx 50rpx;max-height: 80%;padding-bottom: 165rpx;overflow: hidden;overflow-y: scroll;-webkit-scrolling-overflow: touch;box-sizing: border-box;}
+.close{position: absolute;top: 30rpx;right: 30rpx;}
+.close .image{width: 42rpx;height: 42rpx;}
+.popinfo{align-items: flex-start;padding-right: 105rpx;}
+.popinfo .image{width: 180rpx;height: 180rpx;border-radius: 10rpx;margin-right: 20rpx;}
+.popinfo .title{margin-top: 0;margin-bottom: 40rpx;}
+.pop-cons{max-height: 580rpx;overflow: hidden;overflow-y: scroll;-webkit-scrolling-overflow: touch;padding: 25rpx 0 20rpx;}
+.sku-con{max-height: 550rpx;overflow-y: scroll;-webkit-overflow-scrolling: touch;margin-bottom: 30rpx;}
+.tits{font-size: 28rpx;color: #333;font-weight: bold;}
+.tits text{font-size: 24rpx;color: #999;margin-left: 15rpx;font-weight: normal;}
+.pguige{flex-wrap: wrap;margin: 25rpx 0 45rpx;}
+.pguige .li{background: #F3F3F3;border: 2rpx solid #F3F3F3;border-radius: 25rpx;height: 46rpx;line-height: 46rpx;font-size: 24rpx;color: #666;padding: 0 20rpx;margin: 0 20rpx 20rpx 0;}
+.pguige .li.active{border-color: #FD3B31;color: #FD3B31;background:rgba(253,60,49,0.1);}
+.shuliang{justify-content: space-between;align-items: center;}
+.num{height: 44rpx;box-sizing: border-box;display: flex;display: -webkit-flex;align-items: center;text-align: center;}
+.jian{display: block;width: 56rpx;height: 44rpx;font-size: 42rpx;color: #333;line-height: 38rpx;}
+.nums{display: block;line-height: 44rpx;font-size: 28rpx;color: #333;width: 66rpx;background: #F0F0F0;border-radius: 6rpx;}
+.confirm{height: 80rpx;line-height: 80rpx;border-radius: 40rpx;font-size: 30rpx;color: #fff;text-align: center;margin-top: 115rpx;}
+.title{font-size: 30rpx;color: #222;line-height: 40rpx;font-weight: bold;margin-top: 25rpx;}
+.price{font-size: 28rpx;color: #FE0419;align-items: flex-end;}
+.price text{font-size: 40rpx;color: #FE0419;font-weight: bold;}
+.price text.origin{font-weight: normal;font-size: 24rpx;color: #999;text-decoration: line-through;margin-left: 10rpx;}
+.pro-p-btn{justify-content: space-between;align-items: center;position: fixed;left: 0;right: 0;bottom: 0;background: #fff;padding: 35rpx 30rpx 50rpx;z-index: 100;}
+.pro-add{width: 330rpx;height: 80rpx;border: 2rpx solid #FD3C31;border-radius: 40rpx;text-align: center;line-height: 80rpx;font-size: 30rpx;color: #FD3A31;}
+.pro-addgray{width: 330rpx;height: 80rpx;border: 2rpx solid #999999;border-radius: 40rpx;text-align: center;line-height: 80rpx;font-size: 30rpx;color: #999;}
+
+.pro-buy{width: 330rpx;height: 80rpx;line-height: 80rpx;border-radius: 40rpx;font-size: 30rpx;color: #fff;text-align: center;}

+ 824 - 0
components/product-popup/index.vue

@@ -0,0 +1,824 @@
+<template>
+	<view v-if="isShowPop">
+		<view class="mask" @tap="hidePopup"></view>
+		<view class="popup">
+			<view class="close" @tap="hidePopup"><image class="image" src="/static/pages/images/close.png"></image></view>
+			<view class="popinfo dflex">
+				<image class="image" :src="skuPic + '?x-oss-process=style/w160'" v-if="skuPic" @click="previewSkuPic()"></image>
+				<image class="image" :src="product.pic + '?x-oss-process=style/w160'" v-else @click="previewSkuPic()"></image>
+				<view class="flex">
+					<view class="title">{{ product.title }}</view>
+					<view class="price" v-if="product.mode != 2">
+						¥
+						<text>{{ show_membership_price == 1 && product.actualPrice < product.salePrice ? product.actualPrice : product.salePrice }}</text>
+
+						<!-- <text class="origin"
+							v-if="product.salePrice == product.actualPrice && product.marketPrice > 0">¥{{product.marketPrice}}</text> -->
+					</view>
+					<view class="price dflex" v-if="product.mode == 2">
+						<text>{{ product.integral }}积分</text>
+						<text class="money">+¥{{ product.actualPrice }}</text>
+						<text class="origin" v-if="product.salePrice == product.actualPrice && product.marketPrice > 0">¥{{ product.marketPrice }}</text>
+					</view>
+				</view>
+			</view>
+			<view class="pop-cons">
+				
+			
+			<!-- sku参数 -->
+				<view class="sku-con" v-for="(item, index) in skuParam" :key="index">
+					<view class="tits">{{ item.name }}</view>
+					<view class="pguige dflex">
+						<view :class="'li tover ' + (it.active ? 'active' : '')" @tap="chooseSku(index, ind)" v-for="(it, ind) in item.params" :key="ind">{{ it.name }}</view>
+					</view>
+				</view>
+			<!-- <block v-if="skuList&& skuList.length > 0">
+				<view class="tits">规格</view>
+				<view class="pguige dflex">
+					<view v-for="(item, index) in skuList" :key="index" :class="'li ' + (item.active ? 'active' : '')"
+						@tap="chooseSku" :data-index="index" :data-ind="ind">{{item.skuStr}}</view>
+				</view>
+			</block> -->
+			<view class="shuliang dflex">
+				<view class="tits">
+					数量
+					<text>库存{{ stock }}件</text>
+				</view>
+				<view class="num" v-if="stock > 0">
+					<view class="jian" @tap="jianQuantity">-</view>
+					<!-- <text class="nums">{{initNum}}</text> -->
+					<input class="nums" :value="initNum" type="number" @input="getNum" @blur="minNum" />
+					<view class="jian" @tap="jiaQuantity">+</view>
+				</view>
+			</view>
+			</view>
+			<view class="pro-p-btn dflex">
+				<view :class="stock > 0 ? 'pro-add' : 'pro-addgray'" @click="addCart()">加入购物车</view>
+				<view :class="'pro-buy ' + (stock > 0 ? 'mbglinear' : 'mbglinear-gray')" @click="directBuy()">{{ product.isOtc == 1 ? '预约下单' : '立即购买' }}</view>
+			</view>
+			<!-- <view class="confirm mbglinear" @tap="confirmBuy">确定</view> -->
+		</view>
+	</view>
+</template>
+
+<script>
+const req = require('../../utils/request');
+const utils = require('../../utils/util');
+
+export default {
+	data() {
+		return {
+			isShowPop: false,
+			skuList: [],
+			skuParam: [],
+			params: [],
+			//规格参数List数据
+			initNum: 1,
+			show_membership_price: 0,
+			stock: 0,
+			skuPic: '',//当前sku图片
+			skuPicList: [],//sku图片列表
+			skuIndex: 0
+		};
+	},
+
+	components: {},
+	props: {
+		actId: String, //产品id
+		activityId: Number, //活动id
+		product: Object, //产品
+		maxBuy: Number, //最大购买量
+		orderType: {
+			//订单类型
+			type: Number,
+			default: 1
+		},
+		isCart: {
+			//是否加入购物车
+			type: Boolean,
+			default: false
+		},
+		isTimely: {
+			//是否及时达
+			type: Number,
+			default: 0
+		},
+		merchant: Object, //门店
+		merchantId: String, //门店id
+		index: String, //荣康判断
+		shopId: String //小店id
+	},
+	options: {
+		addGlobalClass: true
+	},
+
+	// created(){
+	//   console.log(this.data.merchant)
+	//   req.getRequest('/api/merchant/getMerchantList',{}, res => {
+	//     res = res.filter(it=>it.isDefault==1)
+	//      this.setData({merchant:res[0]})
+	//    })
+	// },
+	mounted() {
+		
+		this.getMerchant();
+		this.getConfig();
+	},
+
+	methods: {
+		loadSkuParams(from) {
+			let _ts = this;
+			return new Promise((resolve, reject) => {
+				req.getRequest(
+					'/api/product/skuParam',
+					from,
+					data => {
+						if (data && data.length > 0) {
+							_ts.skuParam = data.map(it => {
+								let arr = [];
+								it.params.map(its => {
+									let par = {
+										name: its,
+										active: false,
+									};
+									arr.push(par);
+								});
+								// let stock = _ts.stock;
+								// console.log('stock==' + stock);
+								// if (stock > 0) {
+								// 	if (_ts.product.properties) {
+								// 		let propertiesList = _ts.product.properties.split(' / ');
+								// 		propertiesList.map(pit => {
+								// 			arr.map(its => {
+								// 				if (its.name == pit) {
+								// 					console.log('its.name==' + its.name+'>>>>>>pit=='+pit);
+								// 					its.active = true;
+								// 				}
+								// 				return its;
+								// 			});
+								// 		});
+								// 	}
+								// } else {
+								//遍历出默认选中有库存的规格
+								// let skuList = _ts.skuList;
+								// for(var i=0;i<skuList.length;i++){
+								// 	var skuit=skuList[i];
+								// 	var properties = JSON.parse(skuit.properties);
+								// 	for(var k=0;k<properties.length;k++){
+								// 		var pit=properties[k];
+								// 		for(var j=0;j<arr.length;j++){
+								// 			var ait=arr[j];
+								// 			if(_ts.stock==0&&skuit.stock > 0 && pit.value == ait.name){
+								// 				arr[j].active=true;
+								// 				_ts.stock = skuit.stock;
+								// 				console.log(arr[j].name+'stock222==' + _ts.stock )
+								// 				// return;
+								// 			}
+								// 		}
+								// 	}
+								// }
+								// }
+
+								// console.log('arr》》》》》',JSON.stringify(arr));
+								// skuList.map(skuit=>{
+								// 	console.log('skuit》》》》》',skuit.properties)
+								// 	var properties = JSON.parse(skuit.properties);
+								// 	properties.map(pit=>{
+								// 		arr.some(ait => {
+								// 			if(skuit.stock > 0 && pit.value == ait.name){
+								// 				ait.active = true;
+								// 				_ts.stock = skuit.stock;
+								// 				console.log('stock222==' + _ts.stock )
+								// 			}
+								// 			return ait;
+								// 		})
+								// 	})
+								// })
+
+								console.log('arr》》》》》', JSON.stringify(arr));
+								return {
+									id: it.id,
+									name: it.paramName,
+									params: arr
+								};
+							});
+							console.log('_ts.skuParam==',_ts.skuParam)
+							// _ts.skuList.map(it=>{
+							// 	arrPic.map((arrIt,index)=>{
+							// 		let properties = JSON.parse(it.properties);
+							// 		properties.map(pit=>{
+							// 			if(arrIt.name===pit.value){
+							// 				_ts.skuPicList[index] = it.skuPic
+							// 			}
+							// 		})
+							// 	})
+							// })
+							console.log('_ts.skuPicList==',_ts.skuPicList)
+							//遍历出默认选中有库存的规格
+							let skuList = _ts.skuList;
+							for (var i = 0; i < skuList.length; i++) {
+								var skuit = skuList[i];
+								//如果有库存
+								if (skuit.stock > 0) {
+									var properties = JSON.parse(skuit.properties); //得到对应的sku组合对象
+
+									for (var k = 0; k < properties.length; k++) {
+										var pit = properties[k];
+										for (var g = 0; g < _ts.skuParam.length; g++) {
+											var skuArr = _ts.skuParam[g].params;
+											for (var f = 0; f < skuArr.length; f++) {
+												var ait = skuArr[f];
+												if (pit.value == ait.name) {
+													_ts.skuParam[g].params[f].active = true;
+												}
+											}
+										}
+									}
+									_ts.stock = skuit.stock;
+									this.setSkuData(skuit);
+									return;
+								}
+							}
+							// for (var j = 0; j < arr.length; j++) {
+							// 	var ait = arr[j];
+							// 	for (var i = 0; i < skuList.length; i++) {
+							// 		var skuit = skuList[i];
+							// 		var properties = JSON.parse(skuit.properties);
+							// 		for (var k = 0; k < properties.length; k++) {
+							// 			var pit = properties[k];
+							// 			if (skuit.stock > 0 && pit.value == ait.name) {
+							// 				arr[j].active = true;
+							// 				_ts.stock = skuit.stock;
+							// 				console.log(arr[j].name + 'stock222==' + _ts.stock);
+							// 				return;
+							// 			}
+							// 		}
+							// 	}
+							// }
+						}
+						resolve();
+					},
+					true
+				);
+			});
+		},
+
+		analysisSku(propterties) {
+			if (propterties === -1 || propterties === 'DEFAULT_SKU') return false;
+			const ties = JSON.parse(propterties);
+			this.setData({
+				params: this.params.map(it => {
+					let value = ties.filter(r => r.id === it.id)[0].value;
+					it.active = it.nodes.indexOf(value);
+					return it;
+				})
+			});
+		},
+
+		async getMerchant() {
+			// await this.loadSkuParams();
+			let _ts = this;
+
+			let from = {
+				id: this.product.id
+			};
+			if (!this.merchantId && this.index != 'index') {
+				// console.log(222);
+				from.merchantId = this.merchantId;
+			} else {
+				from.merchantId = this.merchantId;
+			} // }
+
+			await this.loadProductSku(from);
+			await this.loadSkuParams(from);
+		},
+
+		loadProductSku(from) {
+			let _ts = this;
+
+			// console.log(from);
+			if (this.actId) {
+				from.actId = this.actId;
+			}
+			uni.showLoading({
+				title: '加载中'
+			})
+			return new Promise((resolve, reject) => {
+				req.getRequest(
+					'/api/product/sku',
+					from,
+					res => {
+						// console.log("sku数据===" + JSON.stringify(res));
+						let data = {}; //将规格数据抽离出来;
+						
+						if (res && res.length > 0) {
+							// if (res[0].properties === -1 || res[0].properties === 'DEFAULT_SKU') {
+							// } else {
+								res.forEach(it => {
+									if (it.properties === -1 || it.properties === 'DEFAULT_SKU') {
+									} else {
+										it.skuStr = JSON.parse(it.properties)
+											.map(ij => ij.value.replace(' ', ''))
+											.join(' ');
+										it.active = false;
+									}
+								});
+								res[0].active = true;
+								_ts.skuIndex = 0
+								_ts.skuPic = res[0].skuPic;
+								data.skuList = res;
+							// }
+						}else{
+							if (_ts.product) {
+								_ts.stock = _ts.product.stock;
+							}
+						}
+
+						data['product.marketPrice'] = res[0].marketPrice;
+						data['activityId'] = res[0].apId;
+						data.sku = res[0]; //当是活动时销售价格统一
+						// if (!_ts.data.activityId) data['product.salePrice'] = res[0].salePrice;
+
+						// console.log(!_ts.activityId);
+						// console.log('sku价格数据>>>>>==' + JSON.stringify(data.skuList));
+						_ts.setData(data); // _ts.analysisSku(res[0].properties);
+						data.skuList.map(it => {
+							if (it.skuId === _ts.product.skuId) {
+								_ts.stock = it.stock;
+								// console.log('skuStock==' + _ts.stock);
+							}
+						});
+						this.isShowPop = true;
+						uni.hideLoading();
+						resolve();
+					},
+					true
+				);
+			});
+		},
+		getConfig() {
+			var _this = this;
+
+			return new Promise((resolve, reject) => {
+				req.getRequest('/api/config', {}, function(res) {
+					if (res && res.show_membership_price == 1) {
+						_this.setData({
+							show_membership_price: 1
+						});
+					}
+
+					resolve();
+				});
+			});
+		},
+
+		// chooseSku(event) {
+		// 	const index = event.currentTarget.dataset.index;
+		// 	this.skuList.forEach(it => {
+		// 		it.active = false;
+		// 	});
+		// 	this.skuList[index].active = true;
+		// 	let data = {};
+		// 	data.skuList = this.skuList;
+		// 	const filters = this.skuList[index]; // if (filters && filters.length > 0) {
+
+		// 	data.sku = filters;
+		// 	// this.product.skuId=filters.skuId
+		// 	data['product.skuId'] = filters.skuId
+		// 	data['product.marketPrice'] = filters.marketPrice;
+		// 	data['product.actualPrice'] = filters.actualPrice
+		// 	// this.product.marketPrice=filters.marketPrice
+		// 	this.activityId = filters.apId
+		// 	data['product.actId'] = filters.apId
+		// 	data['product.salePrice'] = filters.salePrice;
+		// 	this.setData(data); // }
+		// 	this.$emit('getPor', {
+		// 		detail: this.product
+		// 	});
+		// 	// console.log(this.product, filters.marketPrice, filters.salePrice, filters.actualPrice, filters)
+		// },
+		getChooseParams: function() {
+			var data = [];
+			this.skuParam.forEach(sku => {
+				sku.params.forEach(sk => {
+					if (sk.active) {
+						var params = {
+							id: sku.id,
+							name: sk.name,
+							skuPic: sk.skuPic
+						};
+						if (
+							!data.some(dt => {
+								return dt.id === sku.id;
+							})
+						) {
+							data.push(params);
+						} else {
+							const chooseIndex = data.findIndex(dt => dt.id === sku.id);
+							data[chooseIndex] = params;
+						}
+					}
+				});
+			});
+			return data;
+		},
+		chooseSku(index, ind) {
+			console.log('index==' + index);
+			console.log('ind==' + ind);
+			this.skuParam[index].params.map((it, idx) => {
+				it.active = false;
+				return it;
+			});
+			this.skuParam[index].params[ind].active = true;
+			const data = this.getChooseParams();
+			console.log('data==' + JSON.stringify(data));
+			const filters = this.skuList.filter(it => {
+				if (it.properties == -1 || it.properties == 'DEFAULT_SKU') {
+				} else {
+					var properties = JSON.parse(it.properties);
+					if (properties.length == data.length) {
+						return (
+							properties.filter(pro => {
+								return data.some(ds => {
+									return ds.id == pro.id && ds.name == pro.value;
+								});
+							}).length == data.length
+						);
+					}
+				}
+				return false;
+			});
+			console.log('filters==', filters);
+			this.skuIndex = ind;
+			if (filters && filters.length > 0) {
+				let sku = filters[0];
+				this.sku = sku;
+				console.log('sku==' + JSON.stringify(sku));
+				console.log('sku.stock==' + JSON.stringify(sku.stock));
+				this.stock = sku.stock;
+				this.skuPic = sku.skuPic;
+				if (sku.stock === 0) return req.msg('库存不足');
+				this.setSkuData(sku);
+			} else {
+				this.stock = 0;
+				req.msg('库存不足');
+			}
+		},
+
+		setSkuData(sku) {
+			let params = {};
+			params['product.marketPrice'] = sku.marketPrice;
+			params['product.actualPrice'] = sku.actualPrice;
+			params['product.jianMoney'] = (sku.salePrice-sku.actualPrice).toFixed(2);
+			if (!this.activityId) {
+				params['product.salePrice'] = sku.salePrice;
+			}
+			params['product.properties'] = JSON.parse(sku.properties)
+				.map(pro => {
+					return pro.value;
+				})
+				.join(' / ');
+			params['product.skuId'] = sku.skuId;
+			if(this.activityId) params['product.actId'] = this.activityId
+			this.setData(params);
+			this.$emit('getPor', {
+				detail: this.product
+			});
+		},
+
+		hidePopup() {
+			this.$emit('hidePopup');
+		},
+
+		jianQuantity() {
+			const quantity = parseInt(this.initNum) - 1;
+			this.setData({
+				initNum: quantity < 1 ? 1 : quantity
+			});
+		},
+
+		jiaQuantity() {
+			const quantity = parseInt(this.initNum) + 1;
+			if (this.product.maxBuy > 0) {
+				if (quantity > this.product.maxBuy) {
+					return req.msg('非常的抱歉,本产品最多可购买' + this.product.maxBuy);
+				}
+				if (quantity > this.stock) {
+					return req.msg('非常的抱歉,本产品最多可购买' + this.stock);
+				}
+				this.setData({
+					initNum: quantity
+				});
+			} else {
+				this.setData({
+					initNum: quantity
+				});
+			}
+		},
+
+		// 获取输入的值
+		getNum(e) {
+			const quantity = parseInt(e.detail.value);
+			// console.log(e.detail.value == '');
+			if (this.product.maxBuy > 0) {
+				// console.log(e.detail.value, quantity);
+				if (quantity > this.product.maxBuy) {
+					this.setData({
+						initNum: this.product.maxBuy
+					});
+					return req.msg('非常的抱歉,本产品最多可购买' + this.product.maxBuy);
+				}
+				if (quantity > this.stock) {
+					this.setData({
+						initNum: this.stock
+					});
+					return req.msg('非常的抱歉,本产品最多可购买' + this.stock);
+				}
+				this.setData({
+					initNum: e.detail.value
+				});
+			} else {
+				if (quantity > this.stock) {
+					this.setData({
+						initNum: this.stock
+					});
+					return req.msg('非常的抱歉,本产品最多可购买' + this.stock);
+				}
+				this.setData({
+					initNum: e.detail.value
+				});
+			}
+		},
+
+		// 失去焦点
+		minNum(e) {
+			// console.log(this.product);
+			// console.log(e.detail.value == '');
+
+			if (e.detail.value == '') {
+				this.setData({
+					initNum: 1
+				});
+			} else {
+				this.setData({
+					initNum: e.detail.value
+				});
+			}
+		},
+		getParams() {
+			//加入购物车
+			let _ts = this;
+			//直接购买
+			// let merchant = req.getStorage('MERCHANT');
+			// console.log(this.product);
+
+			if (this.product.payQuantity) {
+				if (this.product.stock - this.product.payQuantity < 1) return req.msg('产品已售罄,平台正在紧急补货中...');
+				if (this.product.stock - this.product.payQuantity < this.initNum)
+					return req.msg('购买数量超出剩余库存' + (this.product.stock - this.product.payQuantity) + ',请重新选择');
+			} else {
+				if (this.initNum > this.product.stock) return req.msg('非常的抱歉,本产品库存量剩余' + this.product.stock);
+			} // console.log(merchant)
+
+			const params = {
+				skuId: this.product.skuId,
+				quantity: this.initNum,
+				productId: this.product.id
+			};
+
+			if (this.product.isOtc == 5) {
+				this.setData({
+					orderType: 10
+				});
+			} // if(this.data.merchant&&this.data.merchant.type==2&&this.data.merchantId!=''){
+			//   params.merchantId=this.data.merchant.merchantDTO.id
+			//   params.shopId=this.data.merchant.id
+			// }else{
+			//   params.merchantId=this.data.merchant.id
+			// }
+
+			if (!this.merchant) {
+			} else {
+				if (this.merchant.type == 5) {
+					(params.shopId = this.merchant.id), (params.merchantId = this.merchant.merchantDTO.id);
+				} else {
+					params.merchantId = this.merchant.id;
+				}
+			}
+
+			if (this.activityId) params.activityId = this.activityId;
+			return params;
+		},
+		addCart() {
+			let _ts = this;
+			if (_ts.initNum == 0) return req.msg('请输入商品数量');
+			if (_ts.stock === 0) return req.msg('库存不足');
+			let params = _ts.getParams();
+			// console.log(this.merchantId, params.merchantId);
+			params.orderType = _ts.orderType;
+			let isShowLoading = false;
+			if (!isShowLoading) {
+				req.loadIng('加载中');
+				isShowLoading = true;
+			}
+			// console.log(params);
+			req.postRequest('/api/purchase/cart', params, res => {
+				if (isShowLoading) {
+					uni.hideLoading();
+					isShowLoading = false;
+					req.msg('加入购物车成功', () => {
+						_ts.$emit('addCartSuccess', {
+							detail: {
+								quantity: params.quantity
+							}
+						});
+					});
+				}
+			});
+			this.$emit('hidePopup');
+		},
+		directBuy() {
+			let _ts = this;
+			if (_ts.initNum == 0) return req.msg('请输入商品数量');
+			if (_ts.stock === 0) return req.msg('库存不足');
+			let params = _ts.getParams();
+			// console.log(this.merchantId, params.merchantId);
+			if (req.getStorage('configRes')) {
+				let config = JSON.parse(req.getStorage('configRes')); // JSON.parse(req.getStorage('configRes'))
+
+				if (config.Min_Order_Money) {
+					if (parseFloat(config.Min_Order_Money - (this.show_membership_price == 1 ? this.product.actualPrice : this.product.salePrice) * this.initNum).toFixed(2) > 0)
+						return req.msg('最小下单金额为' + config.Min_Order_Money + '元');
+				}
+			}
+			let isShowLoading = false;
+			if (!isShowLoading) {
+				req.loadIng('加载中');
+				isShowLoading = true;
+			}
+			req.postRequest('/api/purchase/direct/buy', params, res => {
+				let redirect = '/product/subOrder/subOrder?ids=' + res;
+				let orderType = this.orderType;
+				// console.log(orderType); // if (orderType === 1 && this.data.isTimely === 1) orderType = 5;
+
+				redirect += '&orderType=' + orderType;
+				if (!this.merchantId) {
+					redirect += '&merchantId=' + this.merchant.id;
+				} else {
+					redirect += '&merchantId=' + this.merchantId;
+				}
+				if (!this.activityId) {
+				} else {
+					redirect += '&activityId=' + this.activityId;
+				}
+				if (!this.shopId) {
+				} else {
+					redirect += '&shopId=' + this.shopId;
+				}
+				if (isShowLoading) {
+					uni.hideLoading();
+					isShowLoading = false;
+				}
+				uni.navigateTo({
+					url: redirect
+				});
+			});
+			this.$emit('hidePopup');
+		},
+
+		confirmBuy() {
+			//直接购买
+			// let merchant = req.getStorage('MERCHANT');
+			// console.log(this.product);
+
+			if (this.product.payQuantity) {
+				if (this.product.stock - this.product.payQuantity < 1) return req.msg('产品已售罄,平台正在紧急补货中...');
+				if (this.product.stock - this.product.payQuantity < this.initNum)
+					return req.msg('购买数量超出剩余库存' + (this.product.stock - this.product.payQuantity) + ',请重新选择');
+			} else {
+				if (this.initNum > this.product.stock) return req.msg('非常的抱歉,本产品库存量剩余' + this.product.stock);
+			} // console.log(merchant)
+
+			// console.log(this.product);
+			const params = {
+				skuId: this.product.skuId,
+				quantity: this.initNum,
+				productId: this.product.id
+			};
+
+			if (this.product.isOtc == 5) {
+				this.setData({
+					orderType: 10
+				});
+			} // if(this.data.merchant&&this.data.merchant.type==2&&this.data.merchantId!=''){
+			//   params.merchantId=this.data.merchant.merchantDTO.id
+			//   params.shopId=this.data.merchant.id
+			// }else{
+			//   params.merchantId=this.data.merchant.id
+			// }
+
+			if (!this.merchant) {
+			} else {
+				if (this.merchant.type == 5) {
+					(params.shopId = this.merchant.id), (params.merchantId = this.merchant.merchantDTO.id);
+				} else {
+					params.merchantId = this.merchant.id;
+				}
+			}
+
+			if (this.activityId) params.activityId = this.activityId;
+			// console.log(this.merchantId, params.merchantId);
+			if (this.isCart) {
+				//加入购物车
+				let _ts = this;
+				params.orderType = this.orderType;
+				let isShowLoading = false;
+				if (!isShowLoading) {
+					req.loadIng('加载中');
+					isShowLoading = true;
+				}
+				// console.log(params);
+				req.postRequest('/api/purchase/cart', params, res => {
+					if (isShowLoading) {
+						uni.hideLoading();
+						isShowLoading = false;
+						req.msg('加入购物车成功', () => {
+							_ts.$emit('addCartSuccess', {
+								detail: {
+									quantity: params.quantity
+								}
+							});
+						});
+					}
+				});
+			} else {
+				if (req.getStorage('configRes')) {
+					let config = JSON.parse(req.getStorage('configRes')); // JSON.parse(req.getStorage('configRes'))
+
+					if (config.Min_Order_Money) {
+						if (
+							parseFloat(config.Min_Order_Money - (this.show_membership_price == 1 ? this.product.actualPrice : this.product.salePrice) * this.initNum).toFixed(2) > 0
+						)
+							return req.msg('最小下单金额为' + config.Min_Order_Money + '元');
+					}
+				}
+				let isShowLoading = false;
+				if (!isShowLoading) {
+					req.loadIng('加载中');
+					isShowLoading = true;
+				}
+				req.postRequest('/api/purchase/direct/buy', params, res => {
+					let redirect = '/product/subOrder/subOrder?ids=' + res;
+					let orderType = this.orderType;
+					// console.log(orderType); // if (orderType === 1 && this.data.isTimely === 1) orderType = 5;
+
+					redirect += '&orderType=' + orderType;
+					if (!this.merchantId) {
+					} else {
+						redirect += '&merchantId=' + this.merchantId;
+					}
+					if (!this.activityId) {
+					} else {
+						redirect += '&activityId=' + this.activityId;
+					}
+					if (!this.shopId) {
+					} else {
+						redirect += '&shopId=' + this.shopId;
+					}
+					if (isShowLoading) {
+						uni.hideLoading();
+						isShowLoading = false;
+					}
+					uni.navigateTo({
+						url: redirect
+					});
+				});
+			}
+
+			this.$emit('hidePopup');
+		},
+		previewSkuPic(){
+			let that = this;
+			let arr = []
+			if(this.skuPic){
+				arr[0] = this.skuPic;
+			}else{
+				arr[0] = this.product.pic
+			}
+			console.log('arr=====',arr)
+			uni.previewImage({
+				current: this.skuIndex, //当前为第几张
+				urls: arr,
+				complete() {
+					that.$emit('freshen', this);
+				}
+				// indicator: 'number',
+				// loop: true
+			});
+		}
+	}
+};
+</script>
+<style>
+@import './index.css';
+</style>

+ 37 - 0
components/product_footer/index.css

@@ -0,0 +1,37 @@
+.tab{line-height: 100rpx;font-size: 30rpx;color: #999;text-align: center;}
+.tab .li{width: 50%;position: relative;}
+.tab .li::before{content: '';display: block;width: 2rpx;height: 27rpx;background: #d0cfcf;position: absolute;left: 0;top: 50%;transform: translateY(-50%);}
+.tab .li:first-child::before{display: none;}
+.tab .li.active{color: #222;font-weight: bold;}
+.tabcon{overflow: hidden;}
+/* .details{padding: 0 30rpx;} */
+.det-text{/* padding: 0 30rpx; */word-break: break-all;}
+.details .rich-img{width: 100%;}
+.details .img{width: 100%;}
+.canshu{margin: 0 20rpx 30rpx;border: 2rpx solid #e5e5e5;}
+.canshu .li{border-bottom: 2rpx solid #e5e5e5;font-size: 28rpx;color: #666;}
+.canshu .li:last-child{border-bottom: none;}
+.canshu .li .label{width: 190rpx;padding: 20rpx 25rpx;}
+.canshu .li .view{padding: 20rpx 25rpx;border-left: 2rpx solid #e5e5e5;}
+.fen{border-bottom: 20rpx solid #f6f6f6;padding: 30rpx 0;}
+.zong{font-size: 22rpx;color: #6B6B6B;text-align: center;width: 273rpx;border-right: 2rpx solid #e9e9e9;height: 178rpx;}
+.zong .text{display: block;font-size: 80rpx;color: #FF6000;}
+.xing{padding: 40rpx 0 0 65rpx;font-size: 24rpx;color: #6B6B6B;}
+.ping{align-items: center;line-height: 30rpx;margin-bottom: 35rpx;}
+.ping .view{margin-right: 20rpx;}
+.ping .image{width: 23rpx;height: 23rpx;margin: 0 3rpx;}
+.ping .text{color: #FF6000;margin-left: 20rpx;}
+.pltab{flex-wrap: wrap;padding: 30rpx 0 20rpx 30rpx;border-bottom: 2rpx solid #eee;}
+.pltab .li{height: 52rpx;line-height: 52rpx;border-radius: 28rpx;border: 2rpx solid #bbb;font-size: 28rpx;color: #333;padding: 0 20rpx;margin-right: 20rpx;}
+.pltab .li.active{background: #FE0419;color: #fff;border-color: #FE0419;}
+.plcon{padding: 0 30rpx;}
+.plcon .li{padding: 30rpx 0 40rpx;border-bottom: 2rpx solid #eee;overflow: hidden;}
+.plcon .li:last-child{border-bottom: none;}
+.plcon .li .flex{overflow: hidden;}
+.pinglun{word-wrap: break-word;}
+.plimg{margin-top: 30rpx;}
+.plimg image{width: 148rpx;height: 148rpx;margin-right: 30rpx;}
+.plimg image:nth-child(3n){margin-right: 0;}
+.user{width: 68rpx;height: 68rpx;border-radius: 50%;margin-right: 15rpx;}
+.show{display: block;}
+.hide{display: none;}

+ 369 - 0
components/product_footer/index.vue

@@ -0,0 +1,369 @@
+<template>
+	<view class="detail mt20 bgfff">
+		<view class="tab dflex">
+			<view :class="'li ' + (currentTab == 0 ? 'active' : '')" data-current="0" @tap="tab">图文详情</view>
+			<view :class="'li ' + (currentTab == 1 ? 'active' : '')" data-current="1" @tap="tab" v-if=""
+				v-if="config.is_hide_product_parameter != 1">产品说明</view>
+			<view :class="'li ' + (currentTab == 2 ? 'active' : '')" data-current="2" @tap="tab"
+				v-if="isOpenComments == 1">买家评价</view>
+		</view>
+		<view :class="currentTab == 0 ? 'show' : 'hide'">
+			<view class="tabcon details det-text">
+				<!-- <rich-text :nodes="detail"></rich-text> -->
+
+				<mp-html :content="detail" :lazy-load="true" @imgtap="choose"></mp-html>
+			</view>
+			<!-- 		<view class="tabcon details">
+			<block v-for="(item, index) in imgs" :key="index">
+					<image class="img" :src="item + '?x-oss-process=style/w750-auto'" mode="widthFix" @tap="chooseImg" :data-src="item"></image>
+			</block>
+		</view> -->
+			<block v-if="diyNodes || diyImgs.length > 0">
+				<view class="tabcon details">
+					<rich-text :nodes="diyNodes" @tap="richImg"></rich-text>
+				</view>
+				<view class="tabcon details">
+					<block v-for="(item, index) in diyImgs" :key="index">
+						<image class="img" :src="item + '?x-oss-process=style/w750-auto'" mode="widthFix"
+							@tap="chooseImg1" :data-src="item"></image>
+					</block>
+				</view>
+			</block>
+		</view>
+		<view :class="[currentTab == 1? 'show' : 'hide','tabcon']">
+			<view class="canshu" v-if="params.length > 0">
+				<view v-for="(item, index) in params" :key="index" class="li dflex">
+					<label class="label">{{item.name}}</label>
+					<view class="view flex">{{item.value}}</view>
+				</view>
+			</view>
+			<view class="nodata" v-else>
+				<image :src="picUrlss+'empty.png'"></image>
+				<text>暂无记录~</text>
+			</view>
+		</view>
+		<view :class="[currentTab == 2 ? 'show' : 'hide','tabcon']">
+			<view class="fen dflex">
+				<view class="zong"><text class="text">{{overallRating}}</text>综合评分</view>
+				<view class="xing flex">
+					<view class="ping dflex">
+						<view class="view">服务态度</view>
+						<image v-for="(item, index) in [1,2,3,4,5]" :key="index" class="image"
+							:src="score.serviceAttitude >= item ? '/static/pages/images/star_h.png' : '/static/pages/images/star.png'">
+						</image>
+						<text class="text">{{score.serviceAttitude}}分</text>
+					</view>
+					<view class="ping dflex">
+						<view class="view">商品评分</view>
+						<image v-for="(item, index) in [1,2,3,4,5]" :key="index" class="image"
+							:src="score.productRating >= item ? '/static/pages/images/star_h.png' : '/static/pages/images/star.png'">
+						</image>
+						<text class="text">{{score.productRating}}分</text>
+					</view>
+				</view>
+			</view>
+			<view class="pltab dflex">
+				<view :class="'li ' + (scoreTab == 0 ? 'active' : '')" @tap="scoreTabFun" data-current="0">
+					全部({{score.ratingAll}})</view>
+				<view :class="'li ' + (scoreTab == 3 ? 'active' : '')" @tap="scoreTabFun" data-current="3">
+					好评({{score.ratingGood}})</view>
+				<view :class="'li ' + (scoreTab == 2 ? 'active' : '')" @tap="scoreTabFun" data-current="2">
+					中评({{score.ratingMedium}})</view>
+				<view :class="'li ' + (scoreTab == 1 ? 'active' : '')" @tap="scoreTabFun" data-current="1">
+					差评({{score.ratingBad}})</view>
+			</view>
+			<view class="plcon">
+				<block v-if="scoreList.length > 0">
+					<view v-for="(item, index) in scoreList" :key="index" class="li dflex">
+						<image :src="item.avatar" mode="aspectFit" class="user"></image>
+						<view class="flex">
+							<view class="name dflex">{{item.nickName.replace(/^(.).*(.)$/,"$1***$2")}}<text class="time">{{item.createDate}}</text>
+							</view>
+							<view class="pinglun">{{item.evaluateText ? item.evaluateText : '此用户没有填写评价。'}}</view>
+							<view class="plimg dflex" v-if="item.buyShow.length > 0">
+								<image v-for="(it, index2) in item.buyShow" :key="index2" :src="it" mode="aspectFit"
+									@tap="previewImg" :data-src="it" :data-list="item.buyShow"></image>
+							</view>
+							<!-- <view class="huifu">商家回复:感谢您对我们的支持,我们更加用心的服务好每一位客户!</view> -->
+						</view>
+					</view>
+				</block>
+				<view class="nodata" v-else>
+					<image :src="picUrlss+'empty_dd.png'"></image>
+					<text>商品还没有人评价</text>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	const req = require("../../utils/request");
+	import mpHtml from "../mp-html/components/mp-html/mp-html";
+	export default {
+		components: {
+			mpHtml
+		},
+		data() {
+			return {
+				picUrlss: req.public.picUrls,
+				currentTab: 0,
+				params: [],
+				scoreList: [],
+				isLoad: true,
+				scoreTab: 0,
+				overallRating: '0' //综合评分
+					,
+				diyImgs: "",
+				diyNodes: "",
+				score: "",
+				isOpenComments: "",
+				config: {}
+			};
+		},
+		props: {
+			detail: String,
+			proId: String,
+			imgs: Array,
+			form: {
+				type: Object,
+				default: () => ({})
+			}
+		},
+		watch: {
+			'proId': function(oldValue, newValue) {
+				// console.log(oldValue, newValue);
+			},
+		},
+		options: {
+			addGlobalClass: true
+		},
+
+		mounted() {
+			// console.log(this.detail,"7899879")
+			let that = this;
+			that.isOpenCommentsFun();
+			that.loadParams();
+			that.joinFootprint();
+
+			if (req.getStorage('productDiy')) {
+				//富文本图片放大
+				var diyNodes = req.getStorage('productDiy');
+
+				if (diyNodes) {
+					if (diyNodes.indexOf("src") >= 0) {
+						//正则匹配所有图片路径
+						var diyImgs = [];
+						diyNodes = diyNodes.replace(/<img [^>]*src=['"]([^'"]+)[^>]*>/gi, function(match, capture) {
+							diyImgs.push(capture);
+							that.setData({
+								diyImgs: diyImgs
+							});
+							return '';
+						});
+					}
+				} // console.log(diyNodes,this.data.imgs,this.data.diyImgs)
+
+				// console.log(this.detail,"================");
+				that.setData({
+					diyNodes: diyNodes
+				});
+			}
+			this.config = JSON.parse(req.getStorage('configRes'));
+		},
+
+		methods: {
+			choose: function() {
+				// console.log(123);
+				let freshen = false;
+				this.$emit('freshen', {
+					detail: freshen
+				});
+			},
+			tab(event) {
+				const tabIndex = event.currentTarget.dataset.current;
+				if (this.currentTab === tabIndex) return false;
+				this.setData({
+					currentTab: tabIndex
+				});
+				this.$emit('showTab', {
+					detail: tabIndex
+				});
+			},
+
+			joinFootprint() {
+				req.postRequest('/api/footprint', {
+					bindId: this.proId,
+					type: 1
+				}, () => {}, true);
+			},
+
+			loadParams() {
+				let _ts = this;
+
+				req.getRequest('/api/product/params', {
+					id: this.proId
+				}, data => {
+					_ts.setData({
+						params: data
+					});
+				});
+			},
+
+			loadScore(scoreType, from) {
+				//买家评价
+				let _ts = this;
+
+				// console.log(this.isLoad, scoreType,this.form);
+
+				// if (scoreType) {
+				//   this.isLoad = true; // this.setData({['form.page']:1})
+				// }
+
+				if (!this.isLoad) return false;
+				this.isLoad = false;
+				let userInfo = req.getStorage('userInfo');
+				let form
+				if (from) {
+					form = from;
+				} else {
+					form = _ts.form;
+				}
+				form.bindId = _ts.proId; // form.uid = userInfo.id;
+
+				form.type = scoreType;
+				req.getRequest('/api/sysScore/getList', form, res => {
+					if (res.list && res.list.length == 10) _ts.isLoad = true;
+					if (_ts.form.page > 1) res.list = _ts.scoreList.concat(res.list);
+					res.list.map(item => {
+						if (typeof item.buyShow != 'object') {
+							if (!item.buyShow) {
+								item.buyShow = [];
+							} else {
+								item.buyShow = item.buyShow.split(',');
+							}
+						} // item.buyShow = !item.buyShow ? [] : item.buyShow.split(',');
+
+
+						return item;
+					});
+
+					_ts.setData({
+						scoreList: res.list
+					});
+
+					// console.log('评价列表', _ts.scoreList, _ts.isLoad);
+				});
+			},
+
+			loadScoreData() {
+				req.getRequest('/api/sysScore/statisticsScore', {
+					productId: this.proId
+				}, res => {
+					// console.log('评价统计', res);
+					res.serviceAttitude = res.serviceAttitude.toFixed(0) == 0 ? '5' : res.serviceAttitude.toFixed(
+						0);
+					res.productRating = res.productRating.toFixed(0) == 0 ? '5' : res.productRating.toFixed(0);
+					let overallRating = (Number(res.serviceAttitude) + Number(res.productRating)) / 2;
+					this.setData({
+						score: res,
+						overallRating: overallRating
+					});
+				});
+			},
+
+			scoreTabFun(event) {
+				this.form.page = 1
+				this.isLoad = true
+				let current = event.currentTarget.dataset.current;
+				this.setData({
+					scoreTab: current
+				});
+				this.$emit('scoreTab', {
+					detail: current
+				});
+				this.$emit('getForm', {
+					detail: this.form.page
+				});
+				this.loadScore(current);
+			},
+
+			chooseImg: function(e) {
+				//预览
+				var src = e.currentTarget.dataset.src;
+				let freshen = false;
+				this.$emit('freshen', {
+					detail: freshen
+				});
+				uni.previewImage({
+					current: src,
+					// 当前显示图片的http链接  
+					urls: this.imgs
+				});
+			},
+			chooseImg1: function(e) {
+				//预览
+				var src = e.currentTarget.dataset.src;
+				let freshen = false;
+				this.$emit('freshen', {
+					detail: freshen
+				});
+				uni.previewImage({
+					current: src,
+					// 当前显示图片的http链接  
+					urls: this.diyImgs
+				});
+			},
+			previewImg: function(e) {
+				//预览评论买家秀
+				var src = e.currentTarget.dataset.src;
+				let list = e.currentTarget.dataset.list;
+				let freshen = false;
+				this.$emit('freshen', {
+					detail: freshen
+				});
+				uni.previewImage({
+					current: src,
+					// 当前显示图片的http链接  
+					urls: list
+				});
+			},
+
+			isOpenCommentsFun() {
+				//是否开启评论
+				let that = this;
+
+				if (req.getStorage('configRes') && JSON.parse(req.getStorage('configRes')).is_open_comments) {
+					let isOpenCommentss = JSON.parse(req.getStorage('configRes')).is_open_comments;
+
+					if (isOpenCommentss == 1) {
+						that.loadScore(that.scoreType);
+						that.loadScoreData();
+					}
+
+					this.setData({
+						isOpenComments: isOpenCommentss
+					});
+				} else {
+					req.g('/api/config', res => {
+						let isOpenCommentss = res.is_open_comments;
+
+						if (isOpenCommentss == 1) {
+							that.loadScore(that.scoreType);
+							that.loadScoreData();
+						}
+
+						this.setData({
+							isOpenComments: isOpenCommentss
+						});
+						req.setStorage('configRes', JSON.stringify(res));
+					});
+				}
+			}
+
+		}
+	};
+</script>
+<style>
+	@import "./index.css";
+</style>

+ 18 - 0
components/refund-popup/index.css

@@ -0,0 +1,18 @@
+/* components/refund-popup/index.wxss */
+/* 商品规格 */
+.popup{position: fixed;z-index: 100;left: 0;right: 0;bottom: 0;background: #fff;border-radius: 20rpx 20rpx 0 0;padding: 35rpx 30rpx 50rpx;}
+.pop{text-align: center;padding: 0 0 45rpx 0;}
+.popup .txt{ font-size: 30rpx;color: #333333;}
+.close{position: absolute;top: 30rpx;right: 30rpx;}
+.close .image{width: 42rpx;height: 42rpx;}
+.confirm{height: 80rpx;line-height: 80rpx;border-radius: 40rpx;font-size: 30rpx;color: #fff;text-align: center;margin-top: 24rpx;}
+
+.list1{margin: 20rpx 20rpx;background: #fff;border-radius: 10rpx;}
+.dpname{display: flex;display: -webkit-flex;align-items: center;font-size: 30rpx;color: #333;border-bottom: 2rpx solid #eee;padding: 35rpx 20rpx;font-weight: 500;}
+.li{display: flex;display: -webkit-flex;align-items: center;border-bottom: 2rpx solid #eee;}
+.li .image{width: 42rpx; height: 42rpx; margin: 42rpx 20rpx;float: left;}
+.li .cont{padding: 36rpx 0rpx;float: left;}
+.cont {font-size: 30rpx; color: #333333;}
+.cont .color{font-size: 24rpx;color: #999999;}
+.right{width: 38rpx;height: 38rpx;position: absolute;right: 6%;
+}

+ 237 - 0
components/refund-popup/index.vue

@@ -0,0 +1,237 @@
+<template>
+<view>
+<!--components/refund-popup/index.wxml-->
+<view class="mask" @tap="hidePopup"></view>
+<view class="popup">
+	<view class="pop">
+		<text class="txt">{{refundType==1?"退款原因":refundType==2?"退货方式":refundType==3?"货物状态":"快递公司"}}</text>
+	</view>
+	<view class="close" @tap="hidePopup">
+		<image class="image" src="/static/pages/images/close.png"></image>
+	</view>
+	<scroll-view scroll-y="true" style="height: 500rpx;">
+			<radio-group @change="radioChange">
+				<label v-for="(item, index) in refundType==1&&isrefund==2?list:refundType==2?goods:refundType==3?goodstare:refundType==1&&isrefund==1?refund:express" :key="index" class="li">
+					<view class="cont">
+						<view class="weui-cell__bd">{{item.label}}</view>
+					</view>
+					<radio :value="item.value" :checked="item.checked" class="right" :data-index="item.value" color="red"></radio>
+				</label>
+			</radio-group>
+	</scroll-view>
+	<view class="confirm mbglinear" @tap="getValue">确定</view>
+</view>
+</view>
+</template>
+
+<script>
+// components/refund-popup/index.js
+const req = require("../../utils/request");
+
+export default {
+  data() {
+    return {
+      list: [],
+      goods: [{
+        label: "送回门店",
+        value: 2
+      }, {
+        label: "邮寄",
+        value: 1
+      }, {
+        label: "货物拒收",
+        value: 3
+      }],
+      goodstare: [{
+        label: "未收货",
+        value: 1
+      }, {
+        label: "已收货",
+        value: 2
+      }],
+      express: [],
+      refund: [],
+      value: "",
+      listtype: "",
+      huo: "",
+      huotype: "",
+      start: "",
+      starttype: "",
+      expresstype: ""
+    };
+  },
+
+  components: {},
+  props: {
+    // 1 为退款原因 2为退货方式 3为货物状态 4为物流方式
+    refundType: {
+      type: String,
+      default: ''
+    },
+    isrefund: {
+      type: String,
+      default: ''
+    }
+  },
+
+  mounted() {
+    // if (req.getStorage('isrefund')) {
+    //   let isrefund=req.getStorage('isrefund')
+    //   let express=isrefund.express
+    //     express.splice(isrefund.express.length - 3, 3)
+    //   this.setData({list:isrefund.reason,express:express})
+    //   console.log(this.data.list,this.data.express)
+    // }else{
+    req.getRequest('/api/orderRefund/refundReason', '', data => {
+      let express = data.express;
+      express.splice(data.express.length - 3, 3);
+      this.setData({
+        list: data.reason,
+        express: express,
+        refund: data.refund
+      });
+      // console.log(this.refundType, this.isrefund);
+    }); // }
+  } // created: function() {
+  //   // 页面被展示
+  //   // req.getStorage('isrefund')
+  // let isrefund=req.getStorage('isrefund')
+  // let express=isrefund.express
+  //   express.splice(isrefund.express.length - 3, 3)
+  // this.setData({list:isrefund.reason,express:express})
+  // console.log(this.data.list,this.data.express)
+  // },
+  ,
+
+  options: {
+    addGlobalClass: true
+  },
+  methods: {
+    radioChange(e) {
+      // console.log(e); // console.log(this.data.refundType)
+      // console.log('radio发生change事件,携带value值为:', e.detail.value)
+
+      if (this.refundType == 1) {
+        if (this.isrefund == 1) {
+          let list = this.refund;
+
+          for (let i = 0, len = list.length; i < len; ++i) {
+            if (list[i].value == e.detail.value) {
+              list[i].checked = true;
+              this.setData({
+                value: list[i].label,
+                listtype: list[i].value
+              });
+            }
+          }
+        } else {
+          let list = this.list;
+
+          for (let i = 0, len = list.length; i < len; ++i) {
+            if (list[i].value == e.detail.value) {
+              list[i].checked = true;
+              this.setData({
+                value: list[i].label,
+                listtype: list[i].value
+              });
+            }
+          }
+        }
+      }
+
+      if (this.refundType == 2) {
+        let list = this.goods;
+
+        for (let i = 0, len = list.length; i < len; ++i) {
+          if (list[i].value == e.detail.value) {
+            list[i].checked = true;
+            this.setData({
+              huo: list[i].label,
+              huotype: list[i].value
+            });
+          }
+        }
+      }
+
+      if (this.refundType == 3) {
+        let list = this.goodstare;
+
+        for (let i = 0, len = list.length; i < len; ++i) {
+          if (list[i].value == e.detail.value) {
+            list[i].checked = true;
+            this.setData({
+              start: list[i].label,
+              starttype: list[i].value
+            });
+            this.setData({
+              list
+            });
+          }
+        }
+      }
+
+      if (this.refundType == 4) {
+        let express = this.express;
+
+        for (let i = 0, len = express.length; i < len; ++i) {
+          if (express[i].value == e.detail.value) {
+            // express[i].checked = true
+            this.setData({
+              start: express[i].label,
+              expresstype: express[i].value
+            }); // this.setData({ express })
+          }
+        }
+      }
+    },
+
+    hidePopup() {
+      this.$emit('hidePopup');
+    },
+
+    getValue() {
+      if (this.refundType == 1) {
+        this.$emit('getValue', {
+          detail: this.value
+        });
+        this.$emit('getIndex', {
+          detail: this.listtype
+        });
+      }
+
+      if (this.refundType == 2) {
+        this.$emit('getValue', {
+          detail: this.huo
+        });
+        this.$emit('getIndex', {
+          detail: this.huotype
+        });
+      }
+
+      if (this.refundType == 3) {
+        this.$emit('getValue', {
+          detail: this.start
+        });
+        this.$emit('getIndex', {
+          detail: this.starttype
+        });
+      }
+
+      if (this.refundType == 4) {
+        this.$emit('getValue', {
+          detail: this.start
+        });
+        this.$emit('getIndex', {
+          detail: this.expresstype
+        });
+      }
+
+      this.hidePopup();
+    }
+
+  }
+};
+</script>
+<style>
+@import "./index.css";
+</style>

+ 37 - 0
components/share-activity/share.css

@@ -0,0 +1,37 @@
+/* 分享弹窗 */
+.ceng{position: fixed;top: 0;left: 0;right: 0;bottom: 0;background: rgba(0,0,0,.8);z-index: 99;}
+.beshare{position: fixed;top: 50%;left: 50%;transform: translate(-50%,-50%);z-index: 100;width: 638rpx;}
+.beshares{background: #fff;border-radius: 12rpx;position: relative;}
+.sharebg{position: absolute;top: 0;left: 0;width: 100%;border-radius: 20rpx;z-index: 1;}
+.close{display: block;width: 41rpx;height: 41rpx;position: absolute;top: -20rpx;right: -20rpx;z-index: 10;}
+.dflex{display: flex;display: -webkit-flex;align-items: center;}
+.flex{flex: 1;-webkit-flex: 1;}
+.user{padding: 30rpx 0;position: relative;z-index: 2;}
+.user .toux{display: block;width: 100rpx;height: 100rpx;border-radius: 50%;margin-right: 30rpx;}
+.user .live{width: 100rpx; height: 56rpx; position: fixed; top: 60rpx; right: 30rpx;}
+.user .flex view{font-size: 32rpx;color: #333;}
+.user .flex text{display: block;font-size: 24rpx;color: #999;margin-top: 10rpx;}
+.user .flex view.colorfff,.user .flex text.colorfff{color: #fff;}
+.binfos{background: #fff;border-radius: 12rpx;position: relative;overflow: hidden;z-index: 2;}
+.bimgbox{width: 100%;}
+.bimg{display: block;width: 100%;height: 500rpx;margin: 0 auto;position: relative;z-index: 2;}
+.btit{font-size: 30rpx;color: #000;margin: 0 20rpx 0 0;display: -webkit-box;overflow : hidden;text-overflow: ellipsis;-webkit-line-clamp: 2;-webkit-box-orient: vertical;line-height: 1.6;}
+.bprice{font-size: 24rpx;color: #333;margin-top: 15rpx;}
+.bprice text{color: #999;margin-right: 15rpx;}
+.del{font-size: 24rpx;color: #999;text-decoration: line-through;margin-left: 20rpx;}
+.texts{font-size: 30rpx;color: #333;padding: 35rpx 30rpx;display: flex;display: -webkit-flex;align-items: center;justify-content: space-between;}
+.code{position: relative;z-index: 3;}
+.code image{display: block;width: 200rpx;height: 200rpx;margin: 0 auto;}
+.save{width: 330rpx;height: 80rpx;border-radius: 40rpx;border: 1rpx solid #BEBEBE;font-size: 30rpx;color: #fff;text-align: center;line-height: 80rpx;margin: 40rpx auto 0;}
+.sharePop{background: #F6F6F6;position: fixed;left: 0;bottom: 0;right: 0;z-index: 101;padding: 50rpx 0 0;}
+.share-tit{font-size: 36rpx;color: #333;text-align: center;display: flex;display: -webkit-flex;align-items: center;justify-content: center;}
+.share-tit::before{content: '';display: block;width: 70rpx;height: 2rpx;background: #666;margin-right: 20rpx;}
+.share-tit::after{content: '';display: block;width: 70rpx;height: 2rpx;background: #666;margin-left: 20rpx;}
+.share-btn{padding: 35rpx 0 60rpx;display: flex;display: -webkit-flex;justify-content: center;}
+.friend,.poster{width: 50% !important;text-align: center;font-size: 28rpx;color: #333;}
+.friend image,.poster image{display: block;width: 110rpx;height: 110rpx;margin: 0 auto 15rpx;}
+.cancel{font-size: 30rpx;color: #333;text-align: center;padding: 30rpx 0;background: #fff;}
+canvas{
+  position:fixed;left:9000px;
+}
+.blive{font-size: 40rpx; color: #333333;}

+ 385 - 0
components/share-activity/share.vue

@@ -0,0 +1,385 @@
+<template>
+	<view>
+		<view class="ceng" :hidden="hideToast" @tap="cancelPopup"></view>
+		<view class="sharePop" :hidden="hideToast">
+			<!-- <view class="share-tit">分享到</view> -->
+			<view class="share-btn">
+				<button class="friend" open-type="share" v-if="!isVideoScene">
+					<image src="/static/pages/images/wechat.png"></image>
+					微信好友
+				</button>
+				<view class="poster" @tap="generatePoster" v-if="codeUrl">
+					<image src="/static/pages/images/poster.png"></image>
+					生成海报
+				</view> 
+			</view>
+			<view class="cancel" @tap="cancelPopup">取消</view>
+		</view>
+
+		<canvas class="canvas" style="width:400px;height:460px;" canvas-id="share"></canvas>
+		<!-- 分享弹窗 -->
+		<view class="ceng" :hidden="hidePoster" @tap="showPoster"></view>
+		<view class="beshare" :hidden="hidePoster">
+			<view class="beshares">
+				<image src="/static/pages/images/close.png" class="close" @tap="showPoster"></image>
+				<view class="binfos">
+					<view class="bimgbox">
+						<image :src="product.fileUrl?product.fileUrl:product.pic" mode="aspectFit" class="bimg"></image>
+					</view>
+					<view class="texts">
+						<view class="binfo">
+							<view class="btit">{{product.title}}</view>
+							<view class="bprice dflex">
+								<text>会员码</text>{{userInfo.userCode}}
+							</view>
+						</view>
+						<view class="code">
+							<image :src="codeUrl"></image>
+						</view>
+					</view>
+				</view>
+			</view>
+			<view class="save" @tap="saveImage">保存图片</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	const req = require("../../utils/request.js");
+
+	export default {
+		data() {
+			return {
+				// canvasW: 0,
+				// canvasH: 0,
+				picUrlss: req.public.picUrls,
+				imgUrl: '',
+				userInfo: {},
+				isVideoScene: false
+			};
+		},
+
+		components: {},
+		props: {
+			hideToast: {
+				type: Boolean,
+				default: true
+			},
+			hidePoster: {
+				type: Boolean,
+				default: true
+			},
+			product: Object,
+			codeUrl: String,
+			bgUrl: String,
+			aType: Number,
+			canvasW: Number,
+			canvasH: Number,
+			address: {
+				type: String,
+				default: '湖南省娄底市经济技术开发区大埠桥办事处南阳村'
+			},
+		},
+		onReady() {
+			// console.log(this.hideToast)
+		},
+		onHide() {
+			// console.log(this.hideToast)
+		},
+		mounted() {
+			this.isVideoScene = req.getStorage('isVideoScene')
+			// console.log(this.hideToast,888888888)
+		},
+		methods: {
+			generatePoster() {
+				let that = this;
+				let isShowLoading = false;
+				let userInfo = req.getStorage('userInfo');
+				this.setData({
+					userInfo: userInfo
+				});
+
+				if (!isShowLoading) {
+					uni.showLoading({
+						title: '生成中…',
+						mask: true
+					});
+					isShowLoading = true;
+				}
+
+				this.generate(imgUrl => {
+					// console.log(isShowLoading);
+
+					if (isShowLoading) {
+						uni.hideLoading();
+						isShowLoading = false;
+					}
+
+					that.setData({
+						imgUrl: imgUrl,
+						hideToast: true,
+						hidePoster: false
+					});
+				});
+			},
+
+			showPoster() {
+				//隐藏海报
+				this.setData({
+					hidePoster: true
+				});
+				this.$emit('onFather', this.hideToast)
+			},
+
+			cancelPopup() {
+				this.setData({
+					hideToast: true
+				});
+				this.$emit('onFather', this.hideToast)
+			},
+
+			isAuth(fun) {
+				if (!uni.saveImageToPhotosAlbum) {
+					uni.showModal({
+						title: '提示',
+						content: '当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。'
+					});
+					return;
+				}
+
+				; //可以通过 wx.getSetting 先查询一下用户是否授权了 "scope.writePhotosAlbum" 这个 scope  
+				// #ifndef H5
+				uni.getSetting({
+					success(res) {
+						// console.log(res);
+
+						if (!res.authSetting['scope.writePhotosAlbum']) {
+							// 接口调用询问  
+							uni.authorize({
+								scope: 'scope.writePhotosAlbum',
+
+								success() {
+									// console.log("2-授权《保存图片》权限成功");
+									fun(true);
+								},
+
+								fail() {
+									fun(false);
+								}
+
+							});
+						} else {
+							// 拒绝授权
+							fun(true);
+						}
+					},
+
+					fail(res) {
+						fun(false);
+					}
+
+				});
+				// #endif
+			},
+
+			saveImage() {
+				let that = this;
+				that.isAuth(success => {
+					if (success) {
+						uni.saveImageToPhotosAlbum({
+							filePath: that.imgUrl,
+
+							success(res) {
+								uni.showToast({
+									title: '图片保存成功',
+									icon: 'none',
+
+									success() { // that.generate(imgUrl => {
+										//   that.setData({
+										//     imgUrl: imgUrl
+										//   })
+										// })
+									},
+
+									fail() {
+										uni.showToast({
+											title: '图片保存失败'
+										});
+									}
+
+								});
+							}
+
+						});
+					}
+				});
+			},
+
+			getImageInfo(url) {
+				// console.log(url);
+				return new Promise((resolve, reject) => {
+					if (!url) {
+						resolve();
+						return false;
+					}
+
+					uni.getImageInfo({
+						src: url,
+						success: resolve,
+						fail: reject
+					});
+				});
+			},
+
+			generate(success) {
+				// console.log(this);
+				let picPromise = '';
+				let picUrl = this.product.fileUrl?this.product.fileUrl:this.product.pic;
+				picPromise = this.getImageInfo(picUrl);
+
+				let codePromise;
+				if (!this.codeUrl) {
+					return req.msg('二维码生成失败');
+				} else {
+					codePromise = this.getImageInfo(this.codeUrl);
+				}
+				let that = this;
+				Promise.all([picPromise, codePromise]).then(([pic, code]) => {
+					// console.log(pic, avatar, code); // 创建绘图上下文
+
+					const ctx = uni.createCanvasContext('share', this); // 绘制背景,填充满整个canvas画布
+
+					let width = 400,
+						height = 460; //默认背景
+
+					ctx.setFillStyle('#fff');
+					ctx.fillRect(0, 0, width, height); // 拼团背景
+					
+					
+					//白色背景
+					// ctx.save();
+					// that.roundRect(ctx, 0, 0, 400, 460, 10);
+					// ctx.restore();
+					const picW = 400;
+					ctx.drawImage(pic.path, 0, 0, 400, 313);
+					// let lv;
+
+					// if (pic.height >= pic.width) {
+					// 	lv = pic.width / pic.height;
+					// 	ctx.drawImage(pic.path, (400 - picW * lv) / 2, 0, picW * lv, picW);
+					// } else {
+					// 	lv = pic.height / pic.width;
+					// 	ctx.drawImage(pic.path, 0, (400 - picW * lv) / 2, picW, picW * lv);
+					// }
+
+					ctx.drawImage(code.path, 265, 328, 120, 120);
+					ctx.fillStyle = '#000';
+					ctx.font = "18px PingFang SC";
+					let title = that.product.title;
+					// console.log(title);
+					if (title) {
+						for (let i = 0; i <= title.length / 16 && i < 2; i++) {
+							ctx.restore();
+							if (i == 1) {
+								if (title.length > 31) {
+									console.log('...===',title.substring(i * 15, (i + 1) * 15) + '...')
+									ctx.fillStyle = '#000';
+									ctx.font = "16px PingFang SC";
+									ctx.fillText(title.substring(i * 15, (i + 1) * 15) + '...', 15, 368 + i * 22);
+								} else {
+									console.log('...===27',title.substring(i * 15, (i + 1) * 15))
+									ctx.fillStyle = '#000';
+									ctx.font = "16px PingFang SC";
+									ctx.fillText(title.substring(i * 15, (i + 1) * 15), 15, 368 + i * 22);
+								}
+							} else {
+								console.log('...===0',title.substring(i * 16, (i + 1) * 15),i)
+								ctx.fillStyle = '#000';
+								ctx.font = "16px PingFang SC";
+								ctx.fillText(title.substring(i * 16, (i + 1) * 15), 15, 368 + i * 22);
+							}
+						}
+					}
+					
+					ctx.fillStyle = '#999';
+					ctx.font = "14px PingFang SC";
+					ctx.fillText('会员码', 15, 422);
+					
+					ctx.fillStyle = '#333';
+					ctx.font = "14px PingFang SC";
+					ctx.fillText(that.userInfo.userCode, 65, 422);
+
+					ctx.save();
+					// ctx.beginPath();
+					// ctx.arc(40, 40, 25, 0, 2 * Math.PI, true); //画一个圆形裁剪区域
+
+					// ctx.clip(); //裁剪
+					// let config = JSON.parse(req.getStorage('configRes'))
+					// ctx.drawImage(avatar && avatar.path ? avatar.path : config.CONFIG_PROJECT_LOGO, 15, 15, 50, 50); //绘制图片
+					ctx.stroke()
+					// 完成作画
+
+					ctx.draw(false, function() {
+						uni.canvasToTempFilePath({
+							canvasId: 'share',
+							success: function(res) {
+								success.call(this, res.tempFilePath);
+							},
+							fail: function(res) {
+								// console.log(res);
+							}
+						}, that);
+					});
+				});
+			},
+
+			/**
+			 * 
+			 * @param {CanvasContext} ctx canvas上下文
+			 * @param {number} x 圆角矩形选区的左上角 x坐标
+			 * @param {number} y 圆角矩形选区的左上角 y坐标
+			 * @param {number} w 圆角矩形选区的宽度
+			 * @param {number} h 圆角矩形选区的高度
+			 * @param {number} r 圆角的半径
+			 */
+			roundRect: function(ctx, x, y, w, h, r) {
+				// 开始绘制
+				ctx.beginPath(); // 因为边缘描边存在锯齿,最好指定使用 transparent 填充
+				// 这里是使用 fill 还是 stroke都可以,二选一即可
+
+				ctx.setFillStyle('white'); // ctx.setStrokeStyle('transparent')
+				// 左上角
+
+				ctx.arc(x + r, y + r, r, Math.PI, Math.PI * 1.5); // border-top
+
+				ctx.moveTo(x + r, y);
+				ctx.lineTo(x + w - r, y);
+				ctx.lineTo(x + w, y + r); // 右上角
+
+				ctx.arc(x + w - r, y + r, r, Math.PI * 1.5, Math.PI * 2); // border-right
+
+				ctx.lineTo(x + w, y + h - r);
+				ctx.lineTo(x + w - r, y + h); // 右下角
+
+				ctx.arc(x + w - r, y + h - r, r, 0, Math.PI * 0.5); // border-bottom
+
+				ctx.lineTo(x + r, y + h);
+				ctx.lineTo(x, y + h - r); // 左下角
+
+				ctx.arc(x + r, y + h - r, r, Math.PI * 0.5, Math.PI); // border-left
+
+				ctx.lineTo(x, y + r);
+				ctx.lineTo(x + r, y); // 这里是使用 fill 还是 stroke都可以,二选一即可,但是需要与上面对应
+
+				ctx.fill(); // ctx.stroke()
+
+				ctx.closePath(); // 剪切
+
+				ctx.clip();
+			}
+		}
+	};
+</script>
+<style>
+	@import "./share.css";
+</style>

+ 37 - 0
components/share/share.css

@@ -0,0 +1,37 @@
+/* 分享弹窗 */
+.ceng{position: fixed;top: 0;left: 0;right: 0;bottom: 0;background: rgba(0,0,0,.4);z-index: 99;}
+.beshare{position: fixed;top: 50%;left: 60rpx;right: 60rpx;transform: translateY(-50%);z-index: 100;}
+.beshares{background: #f6f6f6;border-radius: 20rpx;position: relative;padding: 0 30rpx 30rpx;}
+.sharebg{position: absolute;top: 0;left: 0;width: 100%;border-radius: 20rpx;z-index: 1;}
+.close{display: block;width: 41rpx;height: 41rpx;position: absolute;top: -60rpx;right: 17rpx;}
+.dflex{display: flex;display: -webkit-flex;align-items: center;}
+.flex{flex: 1;-webkit-flex: 1;}
+.user{padding: 30rpx 0;position: relative;z-index: 2;}
+.user .toux{display: block;width: 100rpx;height: 100rpx;border-radius: 50%;margin-right: 30rpx;}
+.user .live{width: 100rpx; height: 56rpx; position: fixed; top: 60rpx; right: 30rpx;}
+.user .flex view{font-size: 32rpx;color: #333;}
+.user .flex text{display: block;font-size: 24rpx;color: #999;margin-top: 10rpx;}
+.user .flex view.colorfff,.user .flex text.colorfff{color: #fff;}
+.binfos{background: #fff;border-radius: 20rpx;position: relative;overflow: hidden;z-index: 2;}
+.bimgbox{padding: 20rpx 20rpx 0;}
+.bimg{display: block;width: 100%;height: 500rpx;margin: 0 auto;position: relative;z-index: 2;}
+.btit{font-size: 30rpx;color: #333;margin: 15rpx 20rpx 0 0;display: -webkit-box;overflow : hidden;text-overflow: ellipsis;-webkit-line-clamp: 2;-webkit-box-orient: vertical;}
+.bprice{font-size: 40rpx;color: #FD3B31;}
+.bprice text{font-size: 28rpx;}
+.del{font-size: 24rpx;color: #999;text-decoration: line-through;margin-left: 20rpx;}
+.texts{font-size: 30rpx;color: #333;padding: 20rpx 20rpx 30rpx;display: flex;display: -webkit-flex;align-items: center;justify-content: space-between;}
+.code{position: relative;z-index: 3;}
+.code image{display: block;width: 200rpx;height: 200rpx;margin: 0 auto;}
+.save{width: 330rpx;height: 80rpx;border-radius: 40rpx;background: #fff;font-size: 30rpx;color: #e80113;text-align: center;line-height: 80rpx;margin: 40rpx auto 0;}
+.sharePop{background: #fff;position: fixed;left: 0;bottom: 0;right: 0;z-index: 101;padding: 50rpx 0 0;}
+.share-tit{font-size: 36rpx;color: #333;text-align: center;display: flex;display: -webkit-flex;align-items: center;justify-content: center;}
+.share-tit::before{content: '';display: block;width: 70rpx;height: 2rpx;background: #666;margin-right: 20rpx;}
+.share-tit::after{content: '';display: block;width: 70rpx;height: 2rpx;background: #666;margin-left: 20rpx;}
+.share-btn{border-bottom: 1rpx solid #e5e5e5;padding: 60rpx 0 35rpx;display: flex;display: -webkit-flex;justify-content: center;}
+.friend,.poster{width: 50% !important;text-align: center;font-size: 30rpx;color: #666;}
+.friend image,.poster image{display: block;width: 110rpx;height: 110rpx;margin: 0 auto 15rpx;}
+.cancel{font-size: 30rpx;color: #333;text-align: center;padding: 25rpx 0;}
+canvas{
+  position:fixed;left:9000px;
+}
+.blive{font-size: 40rpx; color: #333333;}

+ 575 - 0
components/share/share.vue

@@ -0,0 +1,575 @@
+<template>
+	<view>
+		<view class="ceng" :hidden="hideToast" @tap="cancelPopup"></view>
+		<view class="sharePop" :hidden="hideToast">
+			<view class="share-tit">分享到</view>
+			<view class="share-btn">
+				<button class="friend" open-type="share" v-if="!isVideoScene">
+					<image src="/static/pages/images/wechat.png"></image>
+					微信好友
+				</button>
+				<view class="poster" @tap="generatePoster" v-if="codeUrl">
+					<image src="/static/pages/images/poster.png"></image>
+					生成海报
+				</view> 
+			</view>
+			<view class="cancel" @tap="cancelPopup">取消</view>
+		</view>
+
+		<canvas class="canvas" style="width:400px;height:595px;" canvas-id="share"></canvas>
+		<!-- 分享弹窗 -->
+		<view class="ceng" :hidden="hidePoster" @tap="showPoster"></view>
+		<view class="beshare" :hidden="hidePoster">
+			<view class="beshares">
+				<image src="/activity/static/activity/images/share_pintuan.jpg" mode="widthFix" class="sharebg" v-if="aType==3"></image>
+				<image src="/static/pages/images/close.png" class="close" @tap="showPoster"></image>
+				<view class="user dflex">
+					<image :src="userInfo.avatar" mode="aspectFit" class="toux"></image>
+					<view class="flex">
+						<view :class="aType==3 ? 'colorfff' : ''">{{userInfo.nickName}}</view>
+						<view v-if="product.pic">
+							<text v-if="aType==1">邀请您参与社区团购</text>
+							<text v-if="aType==2">邀请您参与限时秒杀</text>
+							<text v-if="aType==3" class="colorfff">邀请您参与拼团</text>
+							<text v-if="aType==4">邀请您参与新客特价</text>
+							<text v-if="aType==5">邀请您参与砍价</text>
+							<text v-if="aType==0">给你推荐了一个好东西</text>
+						</view>
+						<view v-if="product.share_img">
+							<text>邀请您观看直播</text>
+							<image src="/static/pages/images/live1.png" class="live"></image>
+						</view>
+					</view>
+				</view>
+				<view class="binfos">
+					<view class="bimgbox">
+						<image :src="product.images[0]" mode="aspectFit" class="bimg" v-if="product.images && product.images.length > 0"></image>
+						<block v-else>
+							<image :src="product.pic" mode="aspectFit" class="bimg" v-if="product.pic"></image>
+						</block>
+						<image :src="product.share_img" mode="aspectFit" class="bimg" v-if="product.share_img"></image>
+					</view>
+					<view class="texts">
+						<view class="binfo" v-if="product.pic">
+							<view class="bprice dflex">
+								<block v-if="product.mode==2">
+									<text>{{product.integral?product.integral:0}}积分</text>
+									<text class="money" v-if="product.salePrice">+¥{{product.salePrice}}</text>
+									<text class="del" v-if="product.salePrice == product.actualPrice && product.marketPrice > 0">¥{{product.marketPrice}}</text>
+								</block>
+								<block v-else>
+									<text>¥</text>{{product.salePrice?product.salePrice:'0'}}
+									<view class="del">¥{{product.marketPrice?product.marketPrice:'0'}}</view>
+								</block>
+							</view>
+							<view class="btit">{{product.title}}</view>
+						</view>
+						<view class="binfo" v-if="product.share_img">
+							<view class="blive dflex">
+								<text>{{product.anchor_name}}的直播间</text>
+							</view>
+							<view class="btit">{{product.month}}{{product.hour}}开播</view>
+						</view>
+
+						<view class="code">
+							<image :src="codeUrl"></image>
+						</view>
+					</view>
+				</view>
+			</view>
+			<view class="save" @tap="saveImage">保存图片</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	const req = require("../../utils/request.js");
+
+	export default {
+		data() {
+			return {
+				// canvasW: 0,
+				// canvasH: 0,
+				imgUrl: '',
+				userInfo: {},
+				isVideoScene: false
+			};
+		},
+
+		components: {},
+		props: {
+			hideToast: {
+				type: Boolean,
+				default: true
+			},
+			hidePoster: {
+				type: Boolean,
+				default: true
+			},
+			product: Object,
+			codeUrl: String,
+			bgUrl: String,
+			aType: Number,
+			canvasW: Number,
+			canvasH: Number,
+			address: {
+				type: String,
+				default: '湖南省娄底市经济技术开发区大埠桥办事处南阳村'
+			},
+		},
+		onReady() {
+			// console.log(this.hideToast)
+		},
+		onHide() {
+			// console.log(this.hideToast)
+		},
+		mounted() {
+			this.isVideoScene = req.getStorage('isVideoScene')
+			// console.log(this.hideToast,888888888)
+		},
+		methods: {
+			generatePoster() {
+				let that = this;
+				let isShowLoading = false;
+				let userInfo = req.getStorage('userInfo');
+				this.setData({
+					userInfo: userInfo
+				});
+
+				if (!isShowLoading) {
+					uni.showLoading({
+						title: '生成中…',
+						mask: true
+					});
+					isShowLoading = true;
+				}
+
+				this.generate(imgUrl => {
+					// console.log(isShowLoading);
+
+					if (isShowLoading) {
+						uni.hideLoading();
+						isShowLoading = false;
+					}
+
+					that.setData({
+						imgUrl: imgUrl,
+						hideToast: true,
+						hidePoster: false
+					});
+				});
+			},
+
+			showPoster() {
+				//隐藏海报
+				this.setData({
+					hidePoster: true
+				});
+				this.$emit('onFather', this.hideToast)
+			},
+
+			cancelPopup() {
+				this.setData({
+					hideToast: true
+				});
+				this.$emit('onFather', this.hideToast)
+			},
+
+			isAuth(fun) {
+				if (!uni.saveImageToPhotosAlbum) {
+					uni.showModal({
+						title: '提示',
+						content: '当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。'
+					});
+					return;
+				}
+
+				; //可以通过 wx.getSetting 先查询一下用户是否授权了 "scope.writePhotosAlbum" 这个 scope  
+				// #ifndef H5
+				uni.getSetting({
+					success(res) {
+						// console.log(res);
+
+						if (!res.authSetting['scope.writePhotosAlbum']) {
+							// 接口调用询问  
+							uni.authorize({
+								scope: 'scope.writePhotosAlbum',
+
+								success() {
+									// console.log("2-授权《保存图片》权限成功");
+									fun(true);
+								},
+
+								fail() {
+									fun(false);
+								}
+
+							});
+						} else {
+							// 拒绝授权
+							fun(true);
+						}
+					},
+
+					fail(res) {
+						fun(false);
+					}
+
+				});
+				// #endif
+			},
+
+			saveImage() {
+				let that = this;
+				that.isAuth(success => {
+					if (success) {
+						uni.saveImageToPhotosAlbum({
+							filePath: that.imgUrl,
+
+							success(res) {
+								uni.showToast({
+									title: '图片保存成功',
+									icon: 'none',
+
+									success() { // that.generate(imgUrl => {
+										//   that.setData({
+										//     imgUrl: imgUrl
+										//   })
+										// })
+									},
+
+									fail() {
+										uni.showToast({
+											title: '图片保存失败'
+										});
+									}
+
+								});
+							}
+
+						});
+					}
+				});
+			},
+
+			getImageInfo(url) {
+				// console.log(url);
+				return new Promise((resolve, reject) => {
+					if (!url) {
+						resolve();
+						return false;
+					}
+
+					uni.getImageInfo({
+						src: url,
+						success: resolve,
+						fail: reject
+					});
+				});
+			},
+
+			generate(success) {
+				// console.log(this);
+				let picPromise = '';
+				
+				if(this.product.images && this.product.images.length > 0){
+					picPromise = this.getImageInfo(this.product.images[0]);
+				}else{
+					if (this.product.pic != undefined) {
+						// 获取商品图片 
+						picPromise = this.getImageInfo(this.product.pic);
+						// console.log(picPromise);
+					}
+				}
+
+				if (this.product.share_img != undefined) {
+					//获取直播界面图片
+					picPromise = this.getImageInfo(this.product.share_img);
+				} // console.log(this.data.product.share_img)
+				// console.log(this.data.product.pic != undefined, this.data.product.share_img != undefined)
+				// console.log(this.data.product.share_img)
+				// 头像
+
+
+				const avatarPromise = this.getImageInfo(this.userInfo.avatar); // 获取小程序码图
+
+				let codePromise;
+
+				if (!this.codeUrl) {
+					return req.msg('二维码生成失败');
+				} else {
+					codePromise = this.getImageInfo(this.codeUrl);
+				} //获取背景图
+				// const  bgPromise=this.getImageInfo(this.data.bgUrl)
+				// console.log(this.data.userInfo.avatar)
+				// console.log(this.data.codeUrl)
+				// console.log(this.data.bgUrl)
+
+				let that = this;
+				Promise.all([picPromise, avatarPromise, codePromise]).then(([pic, avatar, code]) => {
+					// console.log(pic, avatar, code); // 创建绘图上下文
+
+					const ctx = uni.createCanvasContext('share', this); // 绘制背景,填充满整个canvas画布
+
+					let width = 400,
+						height = 595; //默认背景
+
+					ctx.setFillStyle('#f6f6f6');
+					ctx.fillRect(0, 0, width, height); // 拼团背景
+
+					if (this.aType == 3) {
+						// ctx.drawImage('/pages/images/live1.png', 333, 30,50,28) //绘制图片
+						ctx.drawImage("/activity/static/activity/images/share_pintuan.jpg", 0, 0, 400, 595);
+					}
+
+					if (that.product.share_img != undefined) {
+						ctx.drawImage("/static/pages/images/live1.png", 333, 30, 50, 28); //绘制图片
+						// ctx.drawImage('/activity/images/share_pintuan.jpg', 400, 595, 0, 0);
+					} // 用户信息
+
+
+					ctx.fillStyle = '#333';
+					ctx.font = "18px PingFang SC";
+
+					if (this.aType == 3) {
+						ctx.fillStyle = '#fff';
+					}
+
+					ctx.fillText(that.userInfo.nickName, 80, 35);
+					ctx.fillStyle = '#999';
+					ctx.font = "14px PingFang SC";
+
+					if (this.aType == 1) {
+						ctx.fillText('邀请您参与社区团购', 80, 58);
+					}
+
+					if (this.aType == 2) {
+						ctx.fillText('邀请您参与限时秒杀', 80, 58);
+					}
+
+					if (this.aType == 3) {
+						ctx.fillStyle = '#fff';
+						ctx.fillText('邀请您参与拼团', 80, 58);
+					}
+
+					if (this.aType == 4) {
+						ctx.fillText('邀请您参与新客特价', 80, 58);
+					}
+
+					if (this.aType == 5) {
+						ctx.fillText('邀请您参与砍价', 80, 58);
+					}
+
+					if (this.product.share_img != undefined && this.aType == 6) {
+						ctx.fillText('邀请您观看直播', 80, 58);
+					}
+
+					if (this.aType == 0) {
+						ctx.fillText('给你推荐了一个好东西', 80, 58);
+					} //白色背景
+
+
+					ctx.save();
+					that.roundRect(ctx, 15, 80, 370, 500, 10);
+					ctx.restore();
+					const picW = 340;
+					let lv;
+
+					if (pic.height >= pic.width) {
+						lv = pic.width / pic.height;
+						ctx.drawImage(pic.path, (340 - picW * lv) / 2 + 30, 95, picW * lv, picW);
+					} else {
+						lv = pic.height / pic.width;
+						ctx.drawImage(pic.path, 30, (340 - picW * lv) / 2 + 95, picW, picW * lv);
+					}
+
+					ctx.drawImage(code.path, 250, 445, 120, 120);
+					let tlength = '';
+					if (that.product.mode == 2) {
+						ctx.fillStyle = '#FD3B31';
+						ctx.font = "20px PingFang SC";
+						ctx.fillText(that.product.integral?that.product.integral:'0', 30, 470);
+						if ((that.product.integral?that.product.integral:'0').toString().length > 2) {
+							ctx.fillStyle = '#FD3B31';
+							ctx.font = "14px PingFang SC";
+							ctx.fillText('积分', 80, 470);
+							if(that.product.salePrice){
+								ctx.fillStyle = '#FD3B31';
+								ctx.font = "14px PingFang SC";
+								ctx.fillText('+¥', 90, 470);
+								ctx.fillStyle = '#FD3B31';
+								ctx.font = "20px PingFang SC";
+								ctx.fillText(that.product.salePrice?that.product.salePrice:'0', 100, 470);
+							}
+						} else {
+							ctx.fillStyle = '#FD3B31';
+							ctx.font = "14px PingFang SC";
+							ctx.fillText('积分', 58, 470);
+							if(that.product.salePrice){
+							ctx.fillStyle = '#FD3B31';
+							ctx.font = "14px PingFang SC";
+							ctx.fillText('+¥', 85, 470);
+							ctx.fillStyle = '#FD3B31';
+							ctx.font = "20px PingFang SC";
+							ctx.fillText(that.product.salePrice?that.product.salePrice:'0', 110, 470);	
+							}
+							
+						}
+						
+
+					}
+					if (that.product.salePrice  && that.product.mode != 2) {
+						ctx.fillStyle = '#FD3B31';
+						ctx.font = "16px PingFang SC";
+						ctx.fillText('¥', 30, 470);
+						ctx.fillStyle = '#FD3B31';
+						ctx.font = "20px PingFang SC";
+						ctx.fillText(that.product.salePrice, 50, 470);
+						ctx.fillStyle = '#999';
+						ctx.font = "14px PingFang SC"; // console.log(that.data.product.salePrice.toString().length)
+
+						if (that.product.salePrice.toString().length > 2) {
+							ctx.fillStyle = '#999';
+							ctx.font = "14px PingFang SC";
+							ctx.fillText('¥' + that.product.marketPrice, 100, 470);
+							let text = '¥' + that.product.marketPrice;
+							tlength = text.length;
+							ctx.beginPath();
+							ctx.moveTo(100, 465);
+							ctx.lineTo(100 + tlength * 11, 465);
+						} else {
+							ctx.fillStyle = '#999';
+							ctx.font = "14px PingFang SC";
+							ctx.fillText('¥' + that.product.marketPrice, 80, 470);
+							let text = '¥' + that.product.marketPrice;
+							tlength = text.length;
+							ctx.beginPath();
+							ctx.moveTo(80, 465);
+							ctx.lineTo(80 + tlength * 11, 465);
+						}
+
+					ctx.lineWidth = 1; //线的宽度
+
+					ctx.strokeStyle = '#999'; //线的颜色
+
+					ctx.stroke();
+					}
+					ctx.fillStyle = '#333';
+					ctx.font = "16px PingFang SC";
+					let title = that.product.title;
+					// console.log(title);
+
+					if (title) {
+						for (let i = 0; i < title.length / 14 && i < 2; i++) {
+							ctx.restore();
+
+							if (i == 1) {
+								if (title.length > 27) {
+									ctx.fillStyle = '#333';
+									ctx.font = "16px PingFang SC";
+									ctx.fillText(title.substring(i * 14, (i + 1) * 13) + '...', 30, 505 + i * 22);
+								} else {
+									ctx.fillStyle = '#333';
+									ctx.font = "16px PingFang SC";
+									ctx.fillText(title.substring(i * 14, (i + 1) * 13), 30, 505 + i * 22);
+								}
+							} else {
+								ctx.fillStyle = '#333';
+								ctx.font = "16px PingFang SC";
+								ctx.fillText(title.substring(i * 14, (i + 1) * 13), 30, 505 + i * 22);
+							}
+						}
+					}
+
+					if (that.product.share_img != undefined && this.aType == 6) {
+						ctx.font = "20px PingFang SC";
+						ctx.fillStyle = '#333333';
+						let title = that.product.anchor_name + '的直播间';
+
+						if (title) {
+							for (let i = 0; i < title.length / 14 && i < 2; i++) {
+								ctx.restore();
+								ctx.fillText(title.substring(i * 14, (i + 1) * 13), 30, 470 + i * 22);
+							}
+						}
+
+						ctx.fillStyle = '#333';
+						ctx.font = "15px PingFang SC";
+						ctx.fillText(that.product.month + that.product.hour + '开播', 30, 500);
+					} //用户头像
+
+
+					ctx.save();
+					ctx.beginPath();
+					ctx.arc(40, 40, 25, 0, 2 * Math.PI, true); //画一个圆形裁剪区域
+
+					ctx.clip(); //裁剪
+
+					ctx.drawImage(avatar && avatar.path ? avatar.path : "/static/pages/images/userimg.png", 15, 15, 50, 50); //绘制图片
+					// ctx.stroke()
+					// 完成作画
+
+					ctx.draw(false, function() {
+						uni.canvasToTempFilePath({
+							canvasId: 'share',
+							success: function(res) {
+								success.call(this, res.tempFilePath);
+							},
+							fail: function(res) {
+								// console.log(res);
+							}
+						}, that);
+					});
+				});
+			},
+
+			/**
+			 * 
+			 * @param {CanvasContext} ctx canvas上下文
+			 * @param {number} x 圆角矩形选区的左上角 x坐标
+			 * @param {number} y 圆角矩形选区的左上角 y坐标
+			 * @param {number} w 圆角矩形选区的宽度
+			 * @param {number} h 圆角矩形选区的高度
+			 * @param {number} r 圆角的半径
+			 */
+			roundRect: function(ctx, x, y, w, h, r) {
+				// 开始绘制
+				ctx.beginPath(); // 因为边缘描边存在锯齿,最好指定使用 transparent 填充
+				// 这里是使用 fill 还是 stroke都可以,二选一即可
+
+				ctx.setFillStyle('white'); // ctx.setStrokeStyle('transparent')
+				// 左上角
+
+				ctx.arc(x + r, y + r, r, Math.PI, Math.PI * 1.5); // border-top
+
+				ctx.moveTo(x + r, y);
+				ctx.lineTo(x + w - r, y);
+				ctx.lineTo(x + w, y + r); // 右上角
+
+				ctx.arc(x + w - r, y + r, r, Math.PI * 1.5, Math.PI * 2); // border-right
+
+				ctx.lineTo(x + w, y + h - r);
+				ctx.lineTo(x + w - r, y + h); // 右下角
+
+				ctx.arc(x + w - r, y + h - r, r, 0, Math.PI * 0.5); // border-bottom
+
+				ctx.lineTo(x + r, y + h);
+				ctx.lineTo(x, y + h - r); // 左下角
+
+				ctx.arc(x + r, y + h - r, r, Math.PI * 0.5, Math.PI); // border-left
+
+				ctx.lineTo(x, y + r);
+				ctx.lineTo(x + r, y); // 这里是使用 fill 还是 stroke都可以,二选一即可,但是需要与上面对应
+
+				ctx.fill(); // ctx.stroke()
+
+				ctx.closePath(); // 剪切
+
+				ctx.clip();
+			}
+		}
+	};
+</script>
+<style>
+	@import "./share.css";
+</style>

+ 44 - 0
components/shopping-cart/index.css

@@ -0,0 +1,44 @@
+/* components/shopping-cart/shopping-cart.wxss */
+/* 列表购物车 */
+.contact {
+  position: fixed;
+  bottom: 300rpx;
+  right: 30rpx;
+  background: #fff !important;
+  border-radius: 50% !important;
+  width: 75rpx !important;
+  height: 75rpx !important;
+  /* box-shadow: 0 0 10rpx rgba(86,86,86,0.36); */
+  font-size: 18rpx;
+  color: #555;
+  z-index: 20;
+  align-items: center;
+  text-align: center;
+  border: 1rpx solid #eee;
+}
+
+.contact image {
+  width: 45rpx;
+  height: 45rpx;
+  margin: 15rpx auto;
+}
+/* 购物车 */
+.dots {
+  display: block;
+  height: 30rpx;
+  border-radius: 30rpx;
+  padding: 0 7rpx;
+  font-size: 24rpx;
+  color: #fff;
+  line-height: 30rpx;
+  background: #F51A1A;
+  min-width: 30rpx;
+  box-sizing: border-box;
+  align-items: center;
+  justify-content: center;
+  border: none;
+  position: absolute;
+  top: -10rpx;
+  right: -10%;
+}
+

+ 65 - 0
components/shopping-cart/index.vue

@@ -0,0 +1,65 @@
+<template>
+<!--components/shopping-cart/shopping-cart.wxml-->
+<view class="contact" id="contact" @tap="goshopCar">
+  <image src="/static/pages/images/cart.png"></image>
+  <text class="dots dflex" v-if="count > 0">{{count}}</text>
+</view>
+</template>
+
+<script>
+// components/shopping-cart/shopping-cart.js
+const req = require("../../utils/request");
+
+export default {
+  data() {
+    return {
+      count: ""
+    };
+  },
+
+  components: {},
+  props: {
+	  //是否更新
+    isUpdate: {
+      type: Boolean,
+      default: false
+    }
+  },
+  watch: {
+    "isUpdate": function (isUpdate) {
+      // console.log('需要更新消息', isUpdate);
+      if (!this.isReady) return;
+      this.getCount();
+    }
+  },
+
+  mounted() {
+    // console.log('ready');
+    this.isReady = true;
+    this.getCount();
+  },
+
+  methods: {
+    getCount() {
+      req.getRequest('/api/purchase/count', {
+        purchaseType: 1
+      }, data => {
+        this.setData({
+          count: data
+        });
+        // console.log(this);
+      });
+    },
+
+    goshopCar() {
+      uni.switchTab({
+        url: '/pages/cart/cart'
+      });
+    }
+
+  }
+};
+</script>
+<style>
+@import "./index.css";
+</style>

+ 13 - 0
components/update-userinfo/index.css

@@ -0,0 +1,13 @@
+.ceng{position: fixed;top: 0;left: 0;right: 0;bottom: 0;background-color: rgba(0,0,0,.5);z-index: 99;}
+.update-pop{position: fixed;top: 50%;left: 50%;transform: translate(-50%,-50%);background-color: #fff;border-radius: 15rpx;width: 560rpx;z-index: 100;padding-bottom: 55rpx;}
+.update-img{width: 180rpx;height: 180rpx;margin: -42rpx auto 0;}
+.update-avatar{width: 150rpx !important;height: 150rpx !important;margin: 50rpx auto 0 !important;}
+.update-avatar image{width: 100%;height: 100%;}
+.update-avatars{border-radius: 50%;}
+.update-tip{font-size: 34rpx;color: #333;text-align: center;padding: 0 30rpx;margin: 34rpx 0 0;}
+.update-btn{width: 460rpx !important;height: 80rpx !important;background: #04C562;border-radius: 50rpx !important;font-size: 32rpx;color: #fff;margin: 45rpx auto 0 !important;text-align: center;line-height: 80rpx !important;}
+.update-close{width: 65rpx;height: 65rpx;position: absolute;left: 50%;transform: translateX(-50%);bottom: -110rpx;}
+.update-form{margin: 50rpx;}
+.update-label{font-size: 30rpx;color: #333;margin-right: 20rpx;}
+.update-ipt{font-size: 28rpx;color: #333;border-bottom: 1rpx solid #e9e9e9;padding: 25rpx 0;}
+.update-placeholder{color: #999;}

+ 144 - 0
components/update-userinfo/index.vue

@@ -0,0 +1,144 @@
+<template>
+	<view>
+		<view class="ceng"></view>
+		<view class="update-pop">
+			<block v-if="updateInfo">
+				<!-- <image :src="picUrlss+'update_info.png'" class="update-img"></image> -->
+				<view class="update-tip">完善头像/昵称信息</view>
+				<button open-type="chooseAvatar" hover-class="none" class="update-avatar" @chooseavatar="uploadAvatar">
+					<image :src="avatar" class="update-avatars" v-if="avatar"></image>
+					<image :src="picUrlss + 'upload_avatar.png'" v-else></image>
+				</button>
+				<view class="update-form ddflex">
+					<view class="update-label">昵称</view>
+					<input type="nickname" v-model="nickName" placeholder="请输入昵称" placeholder-class="update-placeholder" class="update-ipt fflex" @blur="getNickname" />
+				</view>
+				<view class="update-btn" @click="updateInfos()">确定</view>
+			</block>
+			<block v-if="updateMobile&&!updateInfo">
+			<image :src="picUrlss+'update_phone.png'" class="update-img"></image>
+			<view class="update-tip">授权手机号</view>
+			<button class="update-btn" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">立即绑定</button>
+			</block>
+			<image :src="picUrlss+'update_close.png'" class="update-close" @click="closeUpdate"></image>
+		</view>
+	</view>
+</template>
+
+<script>
+	const app = getApp();
+	const req = require("../../utils/request.js");
+
+	export default {
+		data() {
+			return {
+				picUrlss: req.public.picUrls,
+				avatar: '',
+				nickName: ''
+			};
+		},
+
+		components: {},
+		props: {
+			updateInfo: {
+				type: Boolean,
+				default: false
+			},
+			updateMobile: {
+				type: Boolean,
+				default: false
+			},
+		},
+		watch: {},
+
+		mounted() {
+			// console.log('ready');
+			// console.log('isUpdateInfo==',this.updateInfo)
+			// console.log('isUpdateMobile==',this.updateMobile)
+		},
+
+		methods: {
+			uploadAvatar(e) {
+				uni.showLoading({
+					title: '头像上传中'
+				});
+				req.uploadFile('/api/upload', e.detail.avatarUrl, res => {
+					this.avatar = res.src;
+					uni.hideLoading();
+				});
+			},
+			
+			getNickname: function(e) {
+				this.nickName = e.detail.value;
+			},
+			updateInfos() {
+				if (!this.avatar) return req.msg('请上传头像');
+				console.log('this.nickName>>>>', this.nickName);
+				if (!this.nickName) return req.msg('请输入昵称');
+				this.confirm();
+			},
+			confirm() {
+				let that = this;
+				let d = {
+					avatar: that.avatar,
+					nickName: that.nickName
+				};
+				// let isShowLoading = false;
+				// if (!isShowLoading) {
+				// 	req.loadIng('中');
+				// 	isShowLoading = true;
+				// }
+				req.postRequest(
+					'/api/user/save',
+					d,
+					res => {
+						// if (isShowLoading) {
+						// 	uni.hideLoading();
+						let userInfo = req.getStorage('userInfo');
+						userInfo.avatar = this.avatar;
+						userInfo.nickName = this.nickName;
+						req.setStorage('userInfo', userInfo);
+						this.$emit('updateInfo', false);
+						this.closeUpdate();
+						// 	isShowLoading = false;
+						// }
+					},
+					true
+				);
+			},
+			getPhoneNumber(e) {
+				let that = this;
+				let sessionKey = '';
+				app.globalData.getCheckSessoin(json => {
+					sessionKey = json.session_key;
+					let _params = {
+						sessionKey: sessionKey,
+						iv: e.detail.iv,
+						encryptedData: e.detail.encryptedData
+					};
+					if (req.getStorage('pidCode')) {
+						_params.parentId = req.getStorage('pidCode');
+					}
+					if (e.detail.errMsg == 'getPhoneNumber:ok') {
+						req.postRequest('/api/weixin/mobile', _params, json => {
+							if (json.mobile) {
+								var userInfo = req.getStorage('userInfo');
+								userInfo.mobile = json.mobile;
+								req.setStorage('userInfo', userInfo);
+								this.$emit('updateMobile', true);
+								this.closeUpdate();
+							}
+						});
+					} else {}
+				});
+			},
+			closeUpdate(){
+				this.$emit('closeUpdate');
+			},
+		}
+	};
+</script>
+
+<style>
+	@import "./index.css";
+</style>

+ 26 - 0
htmllogin/login/login.css

@@ -0,0 +1,26 @@
+/* login.css */
+.pages {padding: 135rpx 70rpx 50rpx;}
+.dlbg{position: fixed;top: 0;right: 0;width: 353rpx;height: 332rpx;}
+.title {font-size: 52rpx;color: #303338;font-weight: bold;margin: 0 0 125rpx;}
+.item {height: 113rpx;align-items: center;border-bottom: 1rpx solid #EBF2FF;}
+.item image {display: block;width: 28rpx;height: 36rpx;margin-right: 16rpx;}
+.item input {font-size: 32rpx;color: #303338;height: 113rpx;line-height: 60rpx;padding: 20rpx 0;flex: 1;box-sizing: border-box;}
+.placegolder{color: #B9BABB;}
+.xieyi{font-size: 26rpx;color: #8C929D;margin: 30rpx 0 0;}
+.xieyi image{width: 28rpx;height: 28rpx;margin-right: 14rpx;}
+.xieyi navigator{color: var(--mina);}
+
+.huoqu {display: block;border: 2rpx solid var(--mina);font-size: 28rpx;color: var(--mina);border-radius: 30rpx;height: 64rpx;line-height: 60rpx;width: 200rpx;text-align: center;box-sizing: border-box;}
+.huoqu[disabled]{border-color: #B9BABB;}
+button::after {
+	 border: none;
+}
+.submit {height: 90rpx;background: var(--mina);border-radius: 45rpx;line-height: 90rpx;font-size: 32rpx;color: #fff;letter-spacing: 20rpx;margin-top: 65rpx;text-align: center;}
+.bot{font-size: 30rpx;color: #5F6269;justify-content: space-between;margin: 40rpx 0 0;}
+.other{font-size: 30rpx;color: #B9BABB;justify-content: center;margin: 100rpx 0 0;}
+.other::before,.other::after{content: '';display: block;width: 165rpx;height: 2rpx;background: #E2E8ED;}
+.other::before{margin-right: 48rpx;}
+.other::after{margin-left: 48rpx;}
+.list{justify-content: center;padding: 60rpx 0 0;}
+.list .li{font-size: 30rpx;color: #5F6269;text-align: center;}
+.list .li image{width: 98rpx;height: 98rpx;margin: 0 auto 20rpx;}

+ 170 - 0
htmllogin/login/login.vue

@@ -0,0 +1,170 @@
+<template>
+	<view class="pages">
+		<image src="../static/common/images/dlbg.png" class="dlbg"></image>
+		<view class="title">用户登录</view>
+		<view class="item dflex"><input type="number" maxlength="11" focus placeholder="请输入手机号"
+				placeholder-class="placegolder" v-model="mobile" /></view>
+
+		<view class="item dflex" v-if="isLoginType == 0">
+			<input type="number" maxlength="6" placeholder="请输入验证码" placeholder-class="placegolder" v-model="code" />
+			<view class="huoqu"  @click="getCode()"
+				v-text="sendMsg"></view>
+		</view>
+		<view class="item dflex" v-else><input placeholder="请输入密码" password="true" placeholder-class="placegolder"
+				type="text" v-model="pwd" /></view>
+		<view class="xieyi dflex">
+			<image :src="'../static/common/images/' + (isCheckXY ? 'xyico_h' : 'xyico') + '.png'" @click="checkXY()">
+			</image>
+			<view class="dflex">
+				<text @click="checkXY()">已经阅读并同意</text>
+				<navigator :url="'/mine/page/page?title=用户协议&isXieyi=true'" hover-class="none">《用户隐私协议》</navigator>
+			</view>
+		</view>
+		<view class="submit" @click="submitLogin">登录</view>
+		<view class="bot dflex">
+			<!-- <navigator url="/comm/code/code" hover-class="none" @click="swiLoginWay()">{{ isLoginType == 0 ? '账号密码登录' : '验证码登录' }}</navigator> -->
+			<!-- <navigator url="/comm/password/password" hover-class="none">忘记密码?</navigator> -->
+		</view>
+		<view class="other dflex">更多登录方式</view>
+		<view class="list dflex">
+			<view class="li" @click="wxLogin()">
+				<image src="../static/common/images/wechat.png"></image>
+				<text>微信授权登录</text>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	const api = require('../../utils/api.js');
+	const util = require('../../utils/util.js');
+	const req = require('../../utils/request.js');
+
+	export default {
+		data() {
+			return {
+				isCheckXY: false,
+				isGetCodeDisabled: false,
+				isLoginType: 0,
+				mobile: '', //手机号
+				code: '', //code
+				pwd: '', //密码
+				sendMsg: '获取验证码'
+			};
+		},
+		onLoad() {},
+		onShow() {},
+
+		methods: {
+			wxLogin() {
+				uni.redirectTo({
+					url: '/comm/authorize/authorize'
+				})
+				// uni.login({
+				// 	provider: 'weixin',
+				// 	success: function(loginRes) {
+				// 		console.log('微信登录返回的微信数据>>>>>>', loginRes.authResult);
+				// 	}
+				// });
+			},
+			checkXY() {
+				this.isCheckXY = !this.isCheckXY;
+			},
+			//切换登录方式
+			swiLoginWay() {
+				if (this.isLoginType == 0) {
+					this.isLoginType = 1;
+				} else {
+					this.isLoginType = 0;
+				}
+			},
+
+			getCode() {
+				if(this.isGetCodeDisabled==true) return false
+				if (!this.mobile) {
+					req.msg('请输入手机号');
+					return;
+				}
+				// console.log(!util.isMobile(this.mobile))
+				if (!util.isMobile(this.mobile)) {
+					req.msg('请输入11位有效手机号');
+					return;
+				}
+				req.postRequest(api.api_sms_login, {
+						mobile: this.mobile
+					},
+					data => {
+						req.msg('验证码获取成功');
+						let time = 60;
+						let interval = setInterval(() => {
+							time--;
+							if (time == 0) {
+								this.isGetCodeDisabled = false;
+								this.sendMsg = '获取验证码';
+								clearInterval(interval);
+							} else {
+								this.isGetCodeDisabled = true;
+								this.sendMsg = time + '秒后再获取';
+							}
+						}, 1000);
+					},
+					true
+				);
+			},
+			submitLogin: function() {
+				var dataP = {};
+				var apiUrl = '';
+				if (!this.mobile) {
+					req.msg('请输入手机号');
+					return;
+				}
+				if (!util.isMobile(this.mobile)) {
+					req.msg('请输入11位有效手机号');
+					return;
+				}
+
+				if (this.isLoginType == 0) {
+					apiUrl = api.api_code_login;
+					if (!this.code) {
+						req.msg('请输入验证码');
+						return;
+					}
+					dataP.phone = this.mobile;
+					dataP.code = this.code;
+				} else {
+					apiUrl = api.api_account_login;
+					if (!this.pwd) {
+						req.msg('请输入密码');
+						return;
+					}
+					dataP.account = this.mobile;
+					dataP.password = this.pwd;
+				}
+
+				if (!this.isCheckXY) {
+					req.msg('请先阅读并同意《用户隐私协议》');
+					return;
+				}
+				req.postRequest(
+					apiUrl,
+					dataP,
+					data => {
+						// console.log('登录完成》》》》', data);
+						//缓存用户数据
+						req.setStorage('userInfo', data);
+						req.setStorage('AUTH_TOKEN', data.token);
+						uni.navigateBack();
+					},
+					true
+				);
+			}
+		}
+	};
+</script>
+
+<style>
+	@import './login.css';
+	page {
+		background: #fff;
+	}
+</style>

二进制
htmllogin/static/common/images/dlbg.png


二进制
htmllogin/static/common/images/wechat.png


二进制
htmllogin/static/common/images/xyico.png


二进制
htmllogin/static/common/images/xyico_h.png


+ 12 - 0
integralShop/activity/index.css

@@ -0,0 +1,12 @@
+page{background: #fff;}
+.line{height: 10rpx;background: #F5F5F5;}
+.list{padding: 0 30rpx 30rpx;}
+.list .li{box-shadow: 0 5rpx 12rpx 1rpx rgba(0,67,101,0.08);border-radius: 10rpx;margin-top: 30rpx;}
+.li-img{width: 100%;height: 360rpx;border-radius: 10rpx 10rpx 0 0;}
+.info{padding: 25rpx 30rpx 30rpx;}
+.title{font-size: 30rpx;color: #333;}
+.time{margin-top: 15rpx;font-size: 24rpx;color: #999;}
+.time image{width: 25rpx;height: 25rpx;margin-right: 11rpx;}
+.opt{margin-top: 20rpx;font-size: 24rpx;color: #999;justify-content: space-between;}
+.opt-btn{margin-left: 50rpx;}
+.opt-btn image{width: 33rpx;height: 33rpx;margin-right: 8rpx;}

+ 107 - 0
integralShop/activity/index.vue

@@ -0,0 +1,107 @@
+<template>
+	<view>
+		<view class="line"></view>
+		<view class="list" v-if="contentList && contentList.length > 0">
+			<!-- :url="'/topic/content/content?id=' + item.id" -->
+			<navigator :url="'/integralshop/content/content?id=' + item.id" hover-class="none" class="li" v-for="(item, index) in contentList" :key="index">
+				<image :src="item.pic" mode="aspectFill" class="li-img"></image>
+				<view class="info">
+					<view class="title">{{ item.title }}</view>
+					<view class="time ddflex">
+						<image src="../../static/pages/images/nearbytime.png"></image>
+						{{ item.createDate }}
+					</view>
+					<view class="opt ddflex" v-if="!bindId">
+						<view class="browse">{{item.browse}}次浏览</view>
+						<!-- <view class="ddflex">
+							<view class="opt-btn ddflex">
+								<image src="../../static/images/like.png"></image>
+								99+
+							</view>
+							<view class="opt-btn ddflex">
+								<image src="../../static/images/comment.png"></image>
+								99+
+							</view>
+							<view class="opt-btn ddflex">
+								<image src="../../static/images/jifen.png"></image>
+								+50
+							</view>
+						</view> -->
+					</view>
+				</view>
+			</navigator>
+		</view>
+
+		<view class="nodata" v-else>
+			<image :src="picUrlss + 'empty_dd.png'"></image>
+			<text>暂无活动</text>
+		</view>
+	</view>
+</template>
+
+<script>
+// pages/sort/sort.js
+//获取应用实例
+const app = getApp();
+const req = require('../../utils/request.js');
+
+export default {
+	data() {
+		return {
+			picUrlss: req.public.picUrls,
+			bindId: '',
+			form: {
+				page: 1,
+				limit: 10
+			},
+			contentList: [],
+			isLoad: true
+		};
+	},
+
+	onLoad: async function(options) {
+		this.bindId = options.bindId;
+		// if (this.bindId) {
+		this.getContentList(true);
+		// }
+	},
+
+	onShow() {},
+
+	onReachBottom() {
+		this.form.page++;
+		this.getContentList(false);
+	},
+
+	methods: {
+		getContentList(isShow) {
+			if (!this.isLoad) return false;
+			this.isLoad = false;
+			let form = this.form;
+			if (this.bindId) {
+				form.cid = this.bindId;
+			} else {
+				//获取个人数据
+				form.isMyData = 1;
+			}
+			req.getRequest(
+				'/api/content/list',
+				form,
+				res => {
+					if (res && res.length == 10) {
+						this.isLoad = true;
+					}
+					if (this.form.page > 1) {
+						res = this.contentList.concat(res);
+					}
+					this.contentList = res;
+				},
+				isShow
+			);
+		}
+	}
+};
+</script>
+<style>
+@import './index.css';
+</style>

+ 65 - 0
integralShop/cart/cart.css

@@ -0,0 +1,65 @@
+/* pages/cart/cart.wxss */
+.page{padding: 0 20rpx 105rpx;}
+.cart{margin: 20rpx 0 0;background: #fff;border-radius: 10rpx;}
+.dian{height: 99rpx;border-bottom: 2rpx solid #E5E5E5;padding: 0 20rpx;align-items: center;}
+.dian view{font-size: 30rpx;color: #333;font-weight: bold;}
+.list .li{display: flex;display: -webkit-flex;align-items: center;background: #fff;border-radius: 10rpx;padding: 0 20rpx 20rpx 14rpx;}
+.info{border-bottom: 2rpx solid #efefef;padding: 20rpx 0;overflow: hidden;}
+.checkbox{width: 54rpx;height: 180rpx;}
+.check{display: block;width: 34rpx;height: 34rpx;margin-top: 73rpx;}
+.dian .check{margin-top: 0;margin-right: 20rpx;}
+.cimgs{position: relative;width: 180rpx;height: 180rpx;box-sizing: border-box;border: 2rpx solid #E5E5E5;border-radius: 10rpx;margin-right: 20rpx;}
+.type{width: 82rpx;height: 36rpx;position: absolute;top: 10rpx;left: 10rpx;}
+.cimg{width: 100%;height: 100%;}
+.gys{text-align: center;position: absolute;top: 137rpx;background: rgba(0,0,0,.6);width: 179rpx;color: white;}
+.zhinfo{flex:1;-webkit-flex: 1;overflow: hidden;position: relative;}
+.list .li:last-child .info{border-bottom: none;}
+.zhtit{font-size: 30rpx;color: #212121;line-height: 34rpx;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;}
+.guigecontent{  
+  margin-top: 5rpx;
+  font-size: 22rpx;color: #999;
+  display: flex;  
+  flex-direction: row;  
+}
+.guige{font-size: 22rpx;color: #999;}
+.jiage{display: flex;display: -webkit-flex;align-items: center;justify-content: space-between;margin-top: 45rpx;}
+.zhjia{font-size: 36rpx;color: #FE0419;}
+.zhjia text{font-size: 28rpx;}
+.num{height: 44rpx;box-sizing: border-box;display: flex;display: -webkit-flex;align-items: center;text-align: center;}
+.jian{display: block;width: 56rpx;height: 44rpx;font-size: 30rpx;color: #333;}
+.nums{display: block;line-height: 44rpx;font-size: 28rpx;color: #333;width: 66rpx;background: #F0F0F0;border-radius: 6rpx;}
+.bot{background: #fff;height: 85rpx;position: fixed;left: 0;right: 0;bottom: 0;z-index: 80;display: flex;display: -webkit-flex;align-items: center;border-bottom: 1rpx solid #fafafa;}
+.botl{flex: 1;-webkit-flex: 1;display: flex;display: -webkit-flex;padding: 0 0 0 20rpx;}
+.botl .check{margin-top: 0;margin-right: 20rpx;}
+.all{display: flex;display: -webkit-flex;align-items: center;font-size: 24rpx;color: #6a6a6a;}
+.heji{line-height: 85rpx;font-size: 28rpx;color: #333;margin-left: 20rpx;}
+.heji text{color: #e80113;}
+.editc{height: 85rpx;line-height: 85rpx;padding: 0 30rpx;background: #EA452E;}
+.edit{font-size: 26rpx;color: #fff;}
+.jiesuan{width: 172rpx;height: 85rpx;line-height: 85rpx;background: var(--mina);font-size: 26rpx;color: #fff;text-align: center;}
+
+.putong{margin-top: 30rpx;}
+
+/* 猜你喜欢 */
+.cai{padding-bottom: 30rpx;}
+.cai-tit{align-items: center;justify-content: center;font-size: 30rpx;color: #EA6730;font-weight: bold;margin-bottom: 30rpx;}
+.cai-tit image{width: 63rpx;height: 5rpx;}
+.cai-tit image:first-child{margin-right: 20rpx;}
+.cai-tit image:last-child{margin-left: 20rpx;}
+.tabcon{flex-wrap: wrap;}
+.tabcon .li{background: #fff;border-radius: 10rpx;width: 345rpx;margin: 20rpx 20rpx 0 0;}
+.tabcon .li:nth-child(2n){margin-right: 0;}
+.jsdimgs{width: 345rpx;height: 345rpx;position: relative;}
+.jsdpro{width: 100%;height: 100%;}
+.jsdimg{width: 82rpx;height: 36rpx;position: absolute;top: 20rpx;left: 20rpx;}
+.jsdinfo{padding: 15rpx 20rpx 30rpx;}
+.proname{font-size: 28rpx;color: #333;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;margin-bottom: 20rpx;}
+.operate{justify-content: space-between;align-items: center;}
+.price{font-size: 24rpx;color: #FE0419;}
+.price text{font-size: 36rpx;font-weight: bold;}
+.price .del{font-weight: normal;font-size: 24rpx;color: #999;margin-left: 12rpx;text-decoration: line-through;}
+.add-cart image{width: 42rpx;height: 42rpx;}
+
+.integral{color: #FE0419;}
+.integral .intnum{font-size: 36rpx;}
+.integral .money{font-size: 28rpx;}

+ 799 - 0
integralShop/cart/cart.vue

@@ -0,0 +1,799 @@
+<template>
+	<view>
+		<view class="page">
+			<block v-for="(item, index) in pageList" :key="index">
+				<!-- 普通产品 -->
+				<view class="cart" v-if="item.list.length > 0">
+					<view class="dian dflex">
+						<image
+							:src="item.isActive ? '/static/pages/images/gou_h.png' : '/static/pages/images/gou.png'"
+							class="check"
+							:data-merchantId="item.merchantId"
+							:data-index="index"
+							@tap="checkProduct"
+						></image>
+						<view class="flex" v-if="item.isTimely == 0">{{ item.merchantName }}</view>
+						<view class="flex" v-if="item.isTimely == 1">{{ item.merchantName }}及时达</view>
+					</view>
+					<view class="list">
+						<block v-for="(item, idx) in item.list" :key="idx">
+							<view class="li">
+								<view class="checkbox" :data-index="index" :data-idx="idx" :data-store="item.store" @tap="checkProduct">
+									<image :src="item.isActive ? '/static/pages/images/gou_h.png' : '/static/pages/images/gou.png'" class="check"></image>
+								</view>
+								<view class="info dflex flex">
+									<view class="cimgs" @tap="toDetail" :data-id="item.productId">
+										<image :src="item.pic" mode="aspectFit" class="cimg"></image>
+										<image src="/static/pages/images/jishida.png" class="type" v-if="item.isTimely == 1"></image>
+										<view class="gys" v-if="item.isTimely == 2">不支持自提</view>
+										<!-- <view class="gys" wx:if="{{item.store<=0||item.isInvalid}}">{{item.store<=0?'已售罄':item.isInvalid?'已下架':''}}</view> -->
+									</view>
+									<view class="zhinfo">
+										<view :class="'zhtit ' + (item.store <= 0 || item.isInvalid ? 'color999' : '')" @tap="toDetail" :data-id="item.productId">
+											{{ item.title }}
+										</view>
+										<view class="color999" v-if="item.store <= 0 || item.isInvalid">{{ item.store <= 0 ? '已售罄' : item.isInvalid ? '已下架' : '' }}</view>
+										<view v-if="item.baseModelList" class="guigecontent">
+											规格:
+											<text v-for="(itemGuige, index) in item.baseModelList" class="guige" :decode="true" :key="index">{{ itemGuige.value }}&nbsp;</text>
+										</view>
+										<view class="jiage">
+											<view class="integral">
+												<text class="intnum">{{ item.integral }}积分</text>
+												<text class="money">+¥{{ item.price }}</text>
+											</view>
+											<view class="num">
+												<view class="jian" @tap="jianQuantity" :data-index="index" :data-idx="idx">-</view>
+												<input class="nums" :value="item.quantity" type="number" @input="getNum" @blur="minNum" :data-index="index" :data-idx="idx" />
+												<view class="jian" @tap="jiaQuantity" :data-index="index" :data-idx="idx">+</view>
+											</view>
+										</view>
+									</view>
+								</view>
+							</view>
+						</block>
+					</view>
+				</view>
+			</block>
+		</view>
+		<block v-if="ishow">
+			<view class="nodata_cart">
+				<image src="/static/pages/images/null.png"></image>
+				<view>购物车是空的</view>
+				<navigator url="/integralshop/index/index" open-type="reLaunch">去逛逛</navigator>
+			</view>
+			<view class="cai pdlr20">
+				<view class="cai-tit dflex">
+					<image src="/static/pages/images/cai_bg1.png"></image>
+					猜您喜欢
+					<image src="/static/pages/images/cai_bg2.png"></image>
+				</view>
+				<view class="tabcon dflex">
+					<block v-for="(item, index) in likeList" :key="index">
+						<view class="li">
+							<view class="jsdimgs" @tap="toDetail" :data-id="item.id">
+								<image :src="item.pic + '?x-oss-process=style/w375'" mode="aspectFit" class="jsdpro"></image>
+								<image src="/static/pages/images/jishida.png" v-if="item.isTimely === 1" class="jsdimg"></image>
+							</view>
+							<view class="jsdinfo">
+								<view class="proname" @tap="toDetail" :data-id="item.id">{{ item.title }}</view>
+								<view class="operate dflex">
+									<view class="price proprice">
+										¥
+										<text>{{ item.salePrice }}</text>
+										<text class="del">¥{{ item.marketPrice }}</text>
+									</view>
+									<view class="add-cart">
+										<view class="nums dflex" v-if="item.count > 0">
+											<image src="/static/pages/images/jian.png"></image>
+											<view class="num">{{ item.count }}</view>
+											<image src="/static/pages/images/jia1.png"></image>
+										</view>
+										<image src="/static/pages/images/jia.png" @tap="addShopCart" :data-id="item.id" :data-skuid="item.skuId" :data-index="index" v-else></image>
+									</view>
+								</view>
+							</view>
+						</view>
+					</block>
+				</view>
+			</view>
+		</block>
+
+		<view class="bot" :style="'bottom:' + (bottomBlankHeignt + 115) + 'rpx'" v-if="pageList.length > 0">
+			<view class="botl">
+				<view class="dflex flex">
+					<view class="all" data-index="-1" @tap="checkProduct">
+						<image :src="isAll ? '/static/pages/images/gou_h.png' : '/static/pages/images/gou.png'" class="check"></image>
+						全选
+					</view>
+					<view class="heji flex" v-if="!isEdit">
+						总计:
+						<text>{{ integral }}积分+¥{{ money }}</text>
+					</view>
+				</view>
+				<view class="editc">
+					<text class="edit" @tap="edit">{{ isEdit ? '完成' : '编辑' }}</text>
+				</view>
+			</view>
+			<view class="jiesuan" @tap="deleteCart" v-if="isEdit">删除({{ count }})</view>
+			<view class="jiesuan" @tap="Settlement" v-else>去结算({{ count }})</view>
+		</view>
+		<view class="placeholder-view" :style="'height:' + (bottomBlankHeignt + 115) + 'rpx'"></view>
+		<foot channel="cart" product-type="2" :isUpdate="isUpdate"></foot>
+	</view>
+</template>
+
+<script>
+const app = getApp();
+const req = require('../../utils/request.js');
+import foot from '../../components/integral-nav/index';
+
+export default {
+	data() {
+		return {
+			bottomBlankHeignt: app.globalData.isIPhoneX ? 68 : 0,
+			form: {},
+			pageList: [],
+			page: 1,
+			likeList: [],
+			isLoad: true,
+			isLikeLoad: true,
+			isAll: false,
+			isJsdAll: false,
+			isCgAll: false,
+			money: 0.0,
+			count: 0,
+			isEdit: false,
+			isUpdate: false,
+			// 是否更新消息
+			merchant: {},
+			integral: 0,
+			shopName: '',
+			ishow: false
+		};
+	},
+
+	components: {
+		foot
+	},
+	props: {},
+
+	onLoad(options) {
+		this.query = options;
+		// console.log(options);
+		this.getLikeList();
+	},
+
+	onShow: function() {
+		let _ts = this;
+
+		_ts.setData({
+			isUpdate: !_ts.isUpdate
+		}); // if (req.getStorage("MERCHANT").isDefault != 1) {
+		//   req.getRequest('/api/merchant/getMerchantList', {}, res => {
+		//     res = res.filter(it => it.isDefault == 1)
+		//     console.log(res)
+		//     this.data.merchant = res[0]
+		//   })
+		// } else {
+
+		this.merchant = req.getStorage('MERCHANT'); // }
+
+		this.isLoad = true;
+		this.setData({
+			count: 0,
+			money: 0,
+			integral: 0,
+			isAll: false,
+			shopName: this.merchant.title,
+			isEdit: false
+		});
+		this.getList();
+	},
+
+	onHide() {
+		// this.query.integralshop=0
+		// this.setData({integralshop:false})
+	},
+
+	methods: {
+		toDetail(e) {
+			let id = e.currentTarget.dataset.id;
+			app.globalData.openPage('integralshop/detail/detail?id=' + id);
+		},
+
+		addShopCart(e) {
+			let skuId = e.currentTarget.dataset.skuid;
+			let id = e.currentTarget.dataset.id;
+			let params = {
+				skuId: skuId,
+				quantity: 1,
+				productId: id
+			};
+
+			if (this.merchant) {
+				params.merchantId = this.merchant.id;
+			}
+
+			req.postRequest('/api/purchase/cart', params, res => {
+				req.msg('加入购物车成功');
+				this.setData({
+					isUpdate: !this.isUpdate
+				});
+				this.isLoad = true;
+				this.getList();
+			});
+		},
+
+		getList() {
+			let isShowLoading = false;
+
+			if (this.form.page == 1 && !isShowLoading) {
+				req.loadIng('加载中');
+				isShowLoading = true;
+			}
+
+			if (!this.isLoad) return false;
+			this.isLoad = false;
+			let that = this;
+			let newList = [];
+			this.form.purchaseType = 2;
+			// console.log(this.form);
+			req.getRequest('/api/purchase/list', this.form, data => {
+				let params = []; // 1及时达产品
+
+				params.push({
+					isTimely: 1,
+					isActive: false,
+					list: data.filter(it => it.isTimely == 1)
+				}); // 0常规产品
+
+				params.push({
+					isTimely: 0,
+					list: data.filter(it => it.isTimely == 0 || it.isTimely == 2)
+				}); //  常规产品
+
+				params[1].list.forEach(el => {
+					if (el.merchantId == '' || el.merchantId == null) {
+						let merchant = this.merchant; // let merchant = req.getStorage('MERCHANT');
+
+						el.merchantId = merchant.id;
+						el.merchantName = merchant.title;
+					}
+
+					if (newList.length == 0) {
+						newList.push({
+							merchantId: el.merchantId,
+							merchantName: el.merchantName,
+							isTimely: 0,
+							isActive: false,
+							list: [el]
+						});
+					} else {
+						let res = newList.some(item => {
+							if (item.merchantId == el.merchantId) {
+								item.list.push(el);
+								return true;
+							}
+						});
+
+						if (!res) {
+							newList.push({
+								merchantId: el.merchantId,
+								isTimely: 0,
+								merchantName: el.merchantName,
+								isActive: false,
+								list: [el]
+							});
+						}
+					}
+				});
+				// console.log(newList);
+				let jsd = [];
+				params[0].list.forEach(el => {
+					if (el.merchantId == '' || el.merchantId == null) {
+						// console.log(el); // let merchant = req.getStorage('MERCHANT');
+
+						let merchant = this.merchant;
+						el.merchantId = merchant.id;
+						el.merchantName = merchant.title;
+					}
+
+					if (jsd.length == 0) {
+						jsd.push({
+							merchantId: el.merchantId,
+							merchantName: el.merchantName,
+							isTimely: 1,
+							isActive: false,
+							list: [el]
+						});
+					} else {
+						let res = jsd.some(item => {
+							if (item.merchantId == el.merchantId) {
+								item.list.push(el);
+								return true;
+							}
+						});
+
+						if (!res) {
+							jsd.push({
+								merchantId: el.merchantId,
+								isTimely: 1,
+								merchantName: el.merchantName,
+								isActive: false,
+								list: [el]
+							});
+						}
+					}
+				}); // console.log(newList,jsd)
+
+				newList = newList.concat(jsd);
+				// console.log(newList); // newList.forEach(el => {
+				//   if (el.merchantId == '' || el.merchantName == '' || el.merchantName == null || el.merchantId == null) {
+				//     let merchant = req.getStorage('MERCHANT');
+				//     el.merchantId = merchant.id
+				//     el.merchantName = merchant.title
+				//     el.list.forEach(item => {
+				//       item.merchantId = merchant.id
+				//       item.merchantName = merchant.title
+				//       if (item.merchantId == el.merchantId) {
+				//         console.log(el)
+				//         // item.list.push(el.list)
+				//         // return true
+				//       }
+				//     })
+				//     console.log(el)
+				//   }
+				// })
+
+				that.setData({
+					pageList: newList
+				});
+
+				if (this.pageList <= 0) {
+					that.setData({
+						ishow: true
+					});
+				} else {
+					that.setData({
+						ishow: false
+					});
+				}
+
+				if (isShowLoading) {
+					uni.hideLoading();
+					isShowLoading = false;
+				}
+			});
+		},
+
+		checkProduct(event) {
+			// debugger
+			//选择商品
+			const that = this;
+			const index = event.currentTarget.dataset.index;
+			const idx = event.currentTarget.dataset.idx;
+			const store = event.currentTarget.dataset.store;
+			const merchantId = event.currentTarget.dataset.merchantid;
+			let d = {};
+
+			if (idx == undefined) {
+				// console.log("进行全选和店铺全选");
+
+				if (index == -1) {
+					// 全选
+					// console.log("全选");
+					const isAll = that.isAll;
+
+					for (let i = 0, len = that.pageList.length; i < len; i++) {
+						for (let j = 0, len = that.pageList[i].list.length; j < len; j++) {
+							if (!this.isEdit) {
+								if (this.pageList[i].list[j].store <= 0) return req.msg(this.pageList[i].list[j].title + '商品已售罄');
+								if (this.pageList[i].list[j].isInvalid) return req.msg(this.pageList[i].list[j].title + '商品已下架或失效');
+							}
+
+							if (!that.pageList[i].list[j].isInvalid) {
+								d['pageList[' + i + '].list[' + j + '].isActive'] = !isAll;
+								d['pageList[' + i + '].isActive'] = !isAll;
+							}
+						}
+					}
+
+					d['isAll'] = !isAll;
+				} else {
+					for (let i = 0, len = this.pageList[index].list.length; i < len; i++) {
+						if (!this.isEdit) {
+							if (this.pageList[index].list[i].store <= 0) return req.msg(this.pageList[index].list[i].title + '商品已售罄');
+							if (this.pageList[index].list[i].isInvalid) return req.msg(this.pageList[index].list[i].title + '商品已下架或失效');
+						}
+
+						if (!this.pageList[index].list[i].isInvalid) {
+							d['pageList[' + index + '].list[' + i + '].isActive'] = !this.pageList[index].isActive;
+							d['pageList[' + index + '].isActive'] = !this.pageList[index].isActive;
+						} // d['isJsd']=index
+					}
+				} // if (this.data.index == index) {
+				//   isJsdAll = this.data.isJsdAll
+				// }else{
+				//   isJsdAll=false
+				// }
+			} else {
+				// 单选
+				// console.log("单选");
+
+				if (!this.isEdit) {
+					if (this.pageList[index].list[idx].store <= 0) return req.msg(this.pageList[index].list[idx].title + '商品已售罄');
+					if (this.pageList[index].list[idx].isInvalid) return req.msg(this.pageList[index].list[idx].title + '商品已下架或失效');
+				}
+
+				d['pageList[' + index + '].list[' + idx + '].isActive'] = !this.pageList[index].list[idx].isActive;
+			}
+
+			// console.log(d);
+			this.setData(d);
+
+			if (index != -1) {
+				this.merchantCheckProduct(index, idx);
+			}
+
+			this.CalculationMoney(index);
+		},
+
+		// 判断店铺的商品是否全部选择
+		merchantCheckProduct(index, idx) {
+			let d = {}; // debugger
+
+			if (this.pageList[index].list.filter(it => it.isActive).length == this.pageList[index].list.length) {
+				if (this.pageList.filter(it => it.isActive).length == this.pageList.length) {
+					d['isAll'] = true;
+				}
+
+				d['pageList[' + index + '].isActive'] = true;
+			} else {
+				d['pageList[' + index + '].isActive'] = false;
+				d['isAll'] = false;
+			}
+
+			this.setData(d);
+		},
+
+		adjustmentQuantity(id, quantity, skuId, success) {
+			req.postRequest(
+				'/api/purchase/quantity',
+				{
+					id: id,
+					skuId: skuId,
+					quantity: quantity
+				},
+				() => {
+					this.setData({
+						isUpdate: !this.isUpdate
+					});
+					success.call(this);
+				}
+			);
+		},
+
+		jianQuantity(event) {
+			const index = event.currentTarget.dataset.index;
+			const idx = event.currentTarget.dataset.idx;
+			const page = this.pageList[index].list[idx];
+			if (page.store <= 0) return req.msg(page.title + '已售罄');
+			if (page.isInvalid) return req.msg('商品已下架或失效');
+			if (page.quantity <= 1) return false;
+			const q = parseInt(page.quantity) - 1;
+			let that = this;
+			this.adjustmentQuantity(page.id, q, page.skuId, () => {
+				let d = {};
+				d['pageList[' + index + '].list[' + idx + '].quantity'] = q;
+				that.setData(d);
+				if (page.isActive) that.CalculationMoney();
+			});
+		},
+
+		jiaQuantity(event) {
+			const index = event.currentTarget.dataset.index;
+			const idx = event.currentTarget.dataset.idx;
+			const page = this.pageList[index].list[idx];
+			if (page.store <= 0) return req.msg(page.title + '已售罄');
+			if (page.isInvalid) return req.msg('商品已下架或失效');
+			let q = parseInt(page.quantity) + 1;
+
+			if (page.maxBuy > 0) {
+				console.log(page, q, '===========================');
+				if (q > page.maxBuy) return req.msg('非常的抱歉,本产品最多可购买' + page.maxBuy);
+				else {
+					q = parseInt(page.quantity) + 1;
+				}
+			}
+
+			let that = this;
+			this.adjustmentQuantity(page.id, q, page.skuId, () => {
+				let d = {};
+				d['pageList[' + index + '].list[' + idx + '].quantity'] = q;
+				that.setData(d);
+				if (page.isActive) that.CalculationMoney();
+			});
+		},
+
+		// 获取输入的值
+		getNum(event) {
+			const index = event.currentTarget.dataset.index;
+			const idx = event.currentTarget.dataset.idx;
+			const page = this.pageList[index].list[idx];
+			if (page.store <= 0) return req.msg(page.title + '已售罄');
+			if (page.isInvalid) return req.msg('商品已下架或失效');
+			let q = event.detail.value;
+
+			if (page.maxBuy > 0) {
+				if (q > page.maxBuy) {
+					req.msg('非常的抱歉,本产品最多可购买' + page.maxBuy);
+					q = page.maxBuy;
+				} else {
+					q = event.detail.value;
+				}
+			}
+
+			let d = {};
+			d['pageList[' + index + '].list[' + idx + '].quantity'] = q;
+			this.setData(d);
+			if (page.isActive) this.CalculationMoney(); // let that = this;
+			// console.log(q)
+			// if(q!=''){
+			//   this.adjustmentQuantity(page.id, q, page.skuId, () => {
+			//     let d = {};
+			//     d['pageList[' + index + '].list[' + idx + '].quantity'] = q;
+			//     that.setData(d);
+			//     if (page.isActive) that.CalculationMoney();
+			//   })
+			// }
+		},
+
+		minNum(event) {
+			const index = event.currentTarget.dataset.index;
+			const idx = event.currentTarget.dataset.idx;
+			const page = this.pageList[index].list[idx];
+			let that = this;
+
+			if (event.detail.value == '') {
+				let q = 1;
+				this.adjustmentQuantity(page.id, q, page.skuId, () => {
+					let d = {};
+					d['pageList[' + index + '].list[' + idx + '].quantity'] = q;
+					that.setData(d);
+					if (page.isActive) that.CalculationMoney();
+				});
+			} else {
+				let q = parseInt(event.detail.value);
+
+				if (q > page.store) {
+					req.msg('非常的抱歉,本产品库存量剩余' + page.store);
+					q = page.store;
+				}
+
+				this.adjustmentQuantity(page.id, q, page.skuId, () => {
+					let d = {};
+					d['pageList[' + index + '].list[' + idx + '].quantity'] = q;
+					that.setData(d);
+					if (page.isActive) that.CalculationMoney();
+				});
+			}
+		},
+
+		deleteCart(event) {
+			//删除购物车数据
+			// const index = event.currentTarget.dataset.index;
+			// const page = this.data.pageList[index];
+			const page = this.pageList;
+			let ids = [];
+			page.map(item => {
+				item.list.map(it => {
+					if (it.isActive) ids.push(it.id);
+				});
+			});
+			if (!ids || ids.length == 0) return req.msg('请选择删除项');
+			let that = this;
+			req.msgConfirm('确定删除该商品', () => {
+				req.postRequest(
+					'/api/purchase/deletes',
+					{
+						ids: ids.join(',')
+					},
+					() => {
+						let data = [];
+
+						for (let i = 0, len = that.pageList.length; i < len; i++) {
+							data.push({
+								merchantId: that.pageList[i].merchantId,
+								merchantName: that.pageList[i].merchantName,
+								isTimely: that.pageList[i].isTimely,
+								list: that.pageList[i].list.filter(it => !it.isActive)
+							});
+						}
+
+						data = data.filter(res => res.list.length != 0);
+
+						if (data.length <= 0) {
+							that.setData({
+								ishow: true,
+								isAll: false
+							});
+						} else {
+							that.setData({
+								ishow: false
+							});
+						}
+
+						that.setData({
+							pageList: data,
+							count: 0,
+							money: 0
+						});
+						this.setData({
+							isUpdate: !this.isUpdate
+						}); // if (page.isActive) that.CalculationMoney();
+					}
+				);
+			});
+		},
+
+		CalculationMoney(index) {
+			//计算商品总价格
+			let arr = [];
+			let jsdMoney = 0;
+			let money = 0;
+			let integral = 0;
+			this.pageList.forEach(el => {
+				arr.push(el.list.filter(it => it.isActive).length);
+				el.list
+					.filter(it => it.isActive)
+					.forEach(lst => {
+						jsdMoney += lst.quantity * lst.price;
+						integral += lst.quantity * lst.integral;
+					});
+			});
+			var count = arr.reduce(function(prev, cur) {
+				return prev + cur;
+			}, 0);
+			money = Number(jsdMoney);
+			this.setData({
+				count: count,
+				money: parseFloat(money).toFixed(2),
+				integral: integral
+			});
+		},
+
+		Settlement() {
+			// debugger
+			const page = this.pageList;
+			const ids = [];
+			// console.log(page);
+			page.map(item => {
+				item.list.map(it => {
+					if (it.isActive) ids.push(it.id);
+				});
+			});
+			if (ids.length == 0) return req.msg('未选择结算商品');
+			const timely = [];
+			const noTimely = [];
+			const merchantList = [];
+			const timelyList = [];
+			page.map(item => {
+				item.list.map(it => {
+					if (it.isActive && it.isTimely === 1) timely.push(it);
+					if (it.isActive && (it.isTimely === 0 || it.isTimely === 2)) noTimely.push(it);
+				});
+			}); // 常规产品
+
+			noTimely.forEach(el => {
+				if (merchantList.length == 0) {
+					merchantList.push({
+						merchantId: el.merchantId,
+						merchantName: el.merchantName,
+						isTimely: 0,
+						isActive: false,
+						list: [el]
+					});
+				} else {
+					let res = merchantList.some(item => {
+						if (item.merchantId == el.merchantId) {
+							item.list.push(el);
+							return true;
+						}
+					});
+
+					if (!res) {
+						merchantList.push({
+							merchantId: el.merchantId,
+							isTimely: 0,
+							merchantName: el.merchantName,
+							isActive: false,
+							list: [el]
+						});
+					}
+				}
+			}); // 及时达
+
+			timely.forEach(el => {
+				if (timelyList.length == 0) {
+					timelyList.push({
+						merchantId: el.merchantId,
+						merchantName: el.merchantName,
+						isTimely: 1,
+						isActive: false,
+						list: [el]
+					});
+				} else {
+					let res = timelyList.some(item => {
+						if (item.merchantId == el.merchantId) {
+							item.list.push(el);
+							return true;
+						}
+					});
+
+					if (!res) {
+						timelyList.push({
+							merchantId: el.merchantId,
+							isTimely: 1,
+							merchantName: el.merchantName,
+							isActive: false,
+							list: [el]
+						});
+					}
+				}
+			}); // const timely = this.data.pageList.filter(it => it.isActive && it.isTimely === 1);
+			// const noTimely = this.data.pageList.filter(it => it.isActive && it.isTimely === 0);
+
+			// console.log(merchantList, timelyList, timely, noTimely); // 海外购产品
+
+			let hwg = noTimely.filter(it => it.isOtc == 5);
+			if (timely.length > 0 && noTimely.length > 0) return req.alertMsg('及时达商品和非及时达商品不能一起下单');
+			if (merchantList.length >= 2 || timelyList.length >= 2) return req.alertMsg('门店与门店之间不能一起下单'); //判断是否及时达订单
+
+			let redirect = 'product/subOrder/subOrder?ids=' + ids.join(',');
+			let orderType = 1;
+			let merchantId = '';
+
+			if (merchantList.length > 0) {
+				merchantId = merchantList[0].merchantId;
+			} // if (timely.length > 0) orderType = 5, merchantId = timelyList[0].merchantId;
+			// if (hwg.length > 0) orderType = 10
+
+			orderType = 11;
+			redirect += '&orderType=' + orderType + '&merchantId=' + merchantId;
+			app.globalData.openPage(redirect);
+		},
+
+		edit() {
+			this.setData({
+				isEdit: !this.isEdit
+			});
+		},
+
+		getLikeList() {
+			//Recommend
+			if (!this.isLikeLoad) return false;
+			this.isLikeLoad = false;
+			let that = this;
+			req.getRequest(
+				'/api/product/list',
+				{
+					page: that.page,
+					limit: 10,
+					attr: 'sell_well'
+				},
+				res => {
+					if (res && res.length >= 10) that.isLikeLoad = true;
+					if (that.page > 1) res = that.likeList.concat(res);
+					that.setData({
+						likeList: res
+					});
+				}
+			);
+		}
+	}
+};
+</script>
+<style>
+@import './cart.css';
+</style>

+ 62 - 0
integralShop/content/content.css

@@ -0,0 +1,62 @@
+/* content.css */
+page{background: #fff;padding: 30rpx 0;box-sizing: border-box;}
+.title{font-size: 40rpx;color: #282828;font-weight: bold;line-height: 60rpx;padding: 0 30rpx;}
+.det-sta{padding: 0 30rpx;margin-top: 20rpx;font-size: 24rpx;}
+.sitename{color: var(--mina);}
+.time{color: #999;margin-left: 15rpx;}
+.time text{font-size: 28rpx;color: #333;margin-right: 23rpx;}
+.content{font-size: 34rpx;color: #333;padding: 30rpx 0;line-height: 1.7;}
+.con-vheight{max-height: 120vh;position: relative;overflow: hidden;}
+.con-vheight::after{content: '';display: block;position: absolute;left: 0;right: 0;bottom: 0;height: 15vh;background: linear-gradient(rgba(255, 255, 255, 0), #fff);z-index: 5;}
+.content video{width: 100%;height: 400rpx;object-fit:fill; margin-bottom: 20rpx;}
+.content image{width: 100%;margin: 30rpx auto;}
+._p{padding: 0 30rpx;}
+.view-more{width: 230rpx;height: 70rpx;font-size: 30rpx;color: #999;margin: 30rpx auto 0;text-align: center;line-height: 70rpx;}
+.bot{padding: 40rpx 35rpx 0;}
+.sbanner{overflow: hidden;position: relative;}
+.sbanner .swiper,.sbanner .swiper image{width: 100%;height: 160rpx;border-radius: 12rpx;overflow: hidden;}
+.dots{position: absolute;left: 0;right: 0;bottom: 20rpx;align-items: center;justify-content: center;}
+.dot{background: rgba(0,0,0,.5);width: 12rpx;height: 12rpx;border-radius: 6rpx;margin: 0 4rpx;}
+.dot.active{width: 30rpx;background: #fff;}
+.tits{font-size: 36rpx;color: #333;font-weight: bold;margin: 30rpx 0 0;}
+.zxlist .li{padding: 40rpx 0;border-bottom: 1rpx solid #EBEBEB;}
+.zximg{width: 230rpx;height: 150rpx;border-radius: 12rpx;margin-right: 23rpx;}
+.zxtit{font-size: 30rpx;color: #333;line-height: 41rpx;height: 82rpx;}
+.datas{font-size: 24rpx;color: #999;margin-top: 30rpx;}
+.adContainer{margin: 30rpx 0 0;border-radius: 10rpx;overflow: hidden;}
+.operate{padding: 30rpx 30rpx 50rpx;justify-content: space-between;font-size: 28rpx;color: #666;}
+.zan image{width: 30rpx;height: 30rpx;margin-right: 15rpx;}
+.zan.active{color: #108FFF;}
+.share{font-size: 28rpx;color: #666;}
+.share image{width: 30rpx;height: 30rpx;margin-right: 15rpx;}
+.box{padding: 40rpx 30rpx 0;border-top: 20rpx solid #f9f9f9;}
+.tit{font-size: 32rpx;color: #333;font-weight: bold;align-items: center;}
+.pro{padding-bottom: 10rpx;}
+.pro .li{padding: 30rpx 0;border-bottom: 1rpx solid #e5e5e5;}
+.pro .li:last-child{border-bottom: none;}
+.proimg{box-sizing: border-box;width: 210rpx;height: 210rpx;border-radius: 10rpx;margin-right: 20rpx;border: 2rpx solid #E5E5E5;}
+.proname{font-size: 28rpx;color: #333;overflow : hidden;line-height: 36rpx;height: 72rpx;}
+.infos {font-size: 24rpx;color: #999;margin: 10rpx 0 20rpx;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;}
+.Ninfos{padding: 16rpx 0;}
+.ope{justify-content: space-between;align-items: center;}
+.price{font-size: 25rpx;color: #FE0419;align-items: center;}
+.price text{font-size: 36rpx;font-weight: bold;}
+.price text.del{font-size: 24rpx !important;color: #999;text-decoration: line-through;margin-left: 15rpx;font-weight: normal !important;}
+.price .vip{margin-left: 12rpx;color: var(--vip);border: 1rpx solid;padding: 0 8rpx 2rpx 8rpx;border-radius: 5px;}
+.price .vip text{font-size: 24rpx;font-weight: normal;}
+.btn{width: 150rpx;height: 50rpx;background: linear-gradient(90deg, rgba(254, 147, 76, 1) 0%, rgba(253, 58, 49, 1) 100%);font-size: 24rpx;color: #fff;text-align: center;line-height: 50rpx;border-radius: 25rpx;}
+.rec .li{padding: 30rpx 0;border-bottom: 1rpx solid #EDEDED;align-items: center;}
+.rec .li:last-child{border-bottom: none;}
+.rec-tit{font-size: 34rpx;color: #333;font-weight: bold;line-height: 48rpx;height: 96rpx;margin-bottom: 25rpx;}
+.author{font-size: 28rpx;color: #999;margin-right: 24rpx;}
+.author image{width: 32rpx;height: 32rpx;border-radius: 2rpx;margin-right: 10rpx;}
+.rec-time{font-size: 28rpx;color: #999;}
+.rec-img{width: 218rpx;height: 152rpx;margin-left: 55rpx;}
+
+/* 广告 */
+.banner{height: 200rpx;position: relative;padding: 30rpx;border-top: 20rpx solid #f9f9f9;}
+.swiper{width: 100%;height: 200rpx;border-radius: 10rpx;}
+.swiper image{width: 100%;height: 100%;border-radius: 10rpx;}
+.dots{position: absolute;left: 50%;transform: translateX(-50%);bottom: 50rpx;z-index: 3;justify-content: center;}
+.dot{width: 46rpx;height: 4rpx;background: rgba(255,255,255,.5);margin: 0 3rpx;}
+.dot.active{background: #fff;}

+ 180 - 0
integralShop/content/content.vue

@@ -0,0 +1,180 @@
+<template>
+	<view v-if="detaile">
+		<view class="title">{{ detaile.title }}</view>
+		<view class="det-sta dflex">
+			<view class="sitename" @click="toIndex('')">{{ config.CONFIG_PROJECT_TITLE }}</view>
+			<view class="time">{{ getDateTimeStamp(detaile.time) }}</view>
+		</view>
+		<view class="content">
+			<view class="viewMore"><mp-html :content="detaile.text" :lazy-load="true" @imgtap="choose"></mp-html></view>
+		</view>
+		<view class="operate dflex" style="justify-content: flex-end;">
+			<button class="share dflex" hover-class="none" open-type="share"><image src="../static/integralShop/images/share.png"></image>分享</button>
+		</view>
+	</view>
+</template>
+
+<script>
+const app = getApp();
+const req = require('../../utils/request.js');
+const api = require('../../utils/api.js');
+const util = require('../../utils/util.js');
+import mpHtml from '../../components/mp-html/components/mp-html/mp-html';
+export default {
+	components: {
+		mpHtml
+	},
+	data() {
+		return {
+			detaile: '',
+			type: 2, //详情类型:1 普通内容 2 自定义页面内容
+			form: {
+				page: 1,
+				limit: 4
+			},
+			contentList: [],
+			viewMore: false,
+			config: {},
+			isToShare: false,
+			pid: '',
+			userInfo: ''
+		};
+	},
+
+	onLoad: async function(options) {
+		this.config = JSON.parse(req.getStorage('configRes'));
+		this.userInfo = req.getStorage('userInfo');
+		uni.showShareMenu({
+			withShareTicket: true,
+			menus: ['shareAppMessage', 'shareTimeline']
+		});
+		this.id = options.id;
+		await this.getDetail();
+		if (options.isShare) {
+			this.pid = options.pid;
+			this.getBrowse();
+		}
+	},
+
+	onShow() {
+		if (this.isToShare) {
+			this.getBehaviorSave();
+			this.isToShare = false;
+		}
+	},
+
+	onShareAppMessage() {
+		this.isToShare = true;
+		return {
+			title: this.detaile.title,
+			imageUrl: this.detaile.pic,
+			path: '/integralshop/content/content?id=' + this.id + '&isShare=' + true + '&pid=' + this.userInfo.id
+		};
+	},
+	onShareTimeline() {
+		this.isToShare = true;
+		return {
+			title: this.detaile.title,
+			imageUrl: this.detaile.pic,
+			path: '/integralshop/content/content?id=' + this.id + '&isShare=' + true + '&pid=' + this.userInfo.id
+		};
+	},
+	methods: {
+		// 分享完成保存
+		getBehaviorSave() {
+			req.postRequest(
+				'/api/v3/behavior/save',
+				{ behavior: 6, type: 4, bindId: this.id },
+				data => {
+					req.msg('分享完成');
+				},
+				true
+			);
+		},
+
+		choose: function() {
+			let freshen = false;
+			this.$emit('freshen', {
+				detail: freshen
+			});
+		},
+		toIndex() {
+			uni.switchTab({
+				url: '/pages/index/index'
+			});
+		},
+		getDateTimeStamp(dateStr) {
+			return util.getDateDiff(Date.parse(dateStr.replace(/-/gi, '/')));
+		},
+		getDetail() {
+			let that = this;
+			let apiUrl = '/api/content/detail';
+			return new Promise((resolve, reject) => {
+				req.getRequest(
+					apiUrl,
+					{ id: that.id },
+					async res => {
+						if (res.productCategory) {
+							res.productCategory = res.productCategory.split(',');
+						}
+						that.detaile = res;
+						let arr = [];
+						if (res.productCategory && res.productCategory.length > 0) {
+							for (var i = 0; i < res.productCategory.length; i++) {
+								await that.getProductList(res.productCategory[i], i).then(res => {
+									arr = arr.concat(res);
+									that.productList = arr;
+									console.log('相关产品==' + JSON.stringify(arr), arr.length);
+								});
+							}
+						}
+						resolve();
+					},
+					true
+				);
+			});
+		},
+		getBrowse() {
+			let params = {
+				bindId: this.id,
+				type: 2,
+				pid: this.pid
+			};
+			req.postRequest('/api/browse', params, data => {});
+		}
+	},
+	filters: {
+		/**
+		 * 处理富文本里的图片宽度自适应
+		 * 1.去掉img标签里的style、width、height属性
+		 * 2.img标签添加style属性:max-width:100%;height:auto
+		 * 3.修改所有style里的width属性为max-width:100%
+		 * 4.去掉<br/>标签
+		 * @param html
+		 * @returns {void|string|*}
+		 */
+		formatRichText(html) {
+			//控制小程序中图片大小
+			let newContent = html.replace(/<img[^>]*>/gi, function(match, capture) {
+				match = match.replace(/style="[^"]+"/gi, '').replace(/style='[^']+'/gi, '');
+				match = match.replace(/width="[^"]+"/gi, '').replace(/width='[^']+'/gi, '');
+				match = match.replace(/height="[^"]+"/gi, '').replace(/height='[^']+'/gi, '');
+				return match;
+			});
+			newContent = newContent.replace(/style="[^"]+"/gi, function(match, capture) {
+				match = match.replace(/width:[^;]+;/gi, 'max-width:100%;').replace(/width:[^;]+;/gi, 'max-width:100%;');
+				return match;
+			});
+			// newContent = newContent.replace(/<br[^>]*\/>/gi, '');
+			newContent = newContent.replace(/<br[^>]*\/>/gi, '<p style="margin: 10px 0;"></p>');
+			newContent = newContent.replace(/<br[^>]*\>/gi, '<p style="margin: 10px 0;"></p>');
+			newContent = newContent.replace(/font-size:[^;]+;?/g, '');
+			newContent = newContent.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:inline-block;margin:12rpx auto;"');
+			return newContent;
+		}
+	}
+};
+</script>
+<style>
+@import './content.css';
+</style>

+ 83 - 0
integralShop/detail/detail.css

@@ -0,0 +1,83 @@
+/* pages/detail/detail.wxss */
+.banner{overflow: hidden;position: relative;background: #fff;}
+.swiper,.swiper image{width: 100%;height: 750rpx;}
+.dots{position: absolute;left: 0;right: 0;bottom: 11rpx;align-items: center;justify-content: center;}
+.dot{background:var(--mina) ;width: 10rpx;height: 10rpx;border-radius: 5rpx;margin: 0 3rpx;}
+.dot.active{width: 30rpx;}
+.info{padding: 30rpx 30rpx 40rpx;}
+.infos{align-items: center;justify-content: space-between;}
+.price{font-size: 28rpx;color: #FE0419;align-items: flex-end;}
+.price text{font-size: 40rpx;color: #FE0419;font-weight: bold;}
+.price text.origin{font-weight: normal;font-size: 24rpx;color: #999;text-decoration: line-through;margin-left: 10rpx;}
+/* 积分产品 */
+.bot .btnfot{flex: 0.5;display: flex;justify-content: space-around;}
+.bot .btnbuy{flex: 0.5;display: flex;}
+.price text.money{font-size: 26rpx;color: #FE0419;}
+.hyprice{align-items: center;margin-left: 15rpx;}
+.hyprice text{font-size: 30rpx;color: #333;font-weight: bold;}
+.hytxt{position: relative;width: 78rpx;height: 25rpx;margin-left: 8rpx;}
+.hytxt image{display: block;width: 78rpx;height: 25rpx;position: absolute;z-index: 1;top: 0;left: 0;}
+.hytxt text{font-size: 18rpx;color: #FFD9AF;position: relative;z-index: 2;font-weight: normal;display: block;line-height: 25rpx;text-align: center;padding-left: 5rpx;}
+.share{font-size: 20rpx;color: #999;text-align: center;position: relative;}
+.share::after{content: '';display: block;width: 2rpx;height: 45rpx;background: #e7e7e7;position: absolute;top: 50%;transform: translateY(-50%);left: -30rpx;}
+.share image{width: 31rpx;height: 31rpx;margin: 0 auto 10rpx;}
+.title{font-size: 30rpx;color: #222;line-height: 40rpx;font-weight: bold;margin-top: 25rpx;}
+.tag{width: 82rpx;height: 36rpx;display: inline-block;margin: 0 10rpx 0 0;position: relative;top: 7rpx;}
+.detinfo .item{padding: 30rpx;border-bottom: 1rpx solid #f6f6f6;}
+.detinfo .item:last-child{border-bottom: none;}
+.item label{display: block;width: 120rpx;font-size: 28rpx;color: #222;font-weight: bold;line-height: 40rpx;}
+.quan .flex{align-items: center;}
+.quan text{display: block;background: #FDF5F3;padding: 0 13rpx;height: 40rpx;line-height: 40rpx;font-size: 24rpx;color: #FF5F08;margin-right: 10rpx;}
+.ling{font-size: 24rpx;color: #FF5F08;align-items: center;}
+.ling image{width: 14rpx;height: 24rpx;margin-left: 11rpx;}
+.address{font-size: 28rpx;color: #333;line-height: 40rpx;}
+.huo{font-size: 24rpx;color: #666;line-height: 40rpx;}
+.huo text{color: #FE0419;}
+.more{width: 36rpx;height: 10rpx;margin-top: 15rpx;}
+/* .user{width: 68rpx;height: 68rpx;border-radius: 50%;margin-right: 15rpx;} */
+.name{font-size: 28rpx;color: #666;line-height: 68rpx;justify-content: space-between;align-items: center;}
+.pinglun{font-size: 28rpx;color: #333;margin: 15rpx 0 0;line-height: 44rpx;}
+.huifu{background: #F2F2F2;border-radius: 6rpx;margin: 25rpx 0 0;line-height: 42rpx;padding: 20rpx 30rpx;position: relative;}
+.huifu::after{content: '';display: block;width: 0;height: 0;border: 9rpx solid transparent;border-bottom-color: #F2F2F2;border-top: none;position: absolute;top: -8rpx;left: 39rpx;}
+.show{display: block;}
+.hide{display: none;}
+
+.bot{height: 80rpx;align-items: center;padding: 20rpx 30rpx 20rpx 0;}
+.botbtn{font-size: 22rpx;color: #6A6A6A;width: 95rpx !important;text-align: center;position: relative;}
+.botbtn image{width: 40rpx;height: 34rpx;margin: 10rpx auto 5rpx;}
+.message{background: #DF1A14;height: 28rpx;line-height: 28rpx;font-size: 20rpx;color: #fff;text-align: center;border-radius: 15rpx;box-sizing: border-box;min-width: 21rpx;padding: 0 8rpx;position: absolute;top: 0;right: 25%;}
+.addcart{width: 206rpx;height: 76rpx;border: 2rpx solid #FD3C31;border-radius: 40rpx;text-align: center;line-height: 76rpx;font-size: 30rpx;color: #FD3A31;margin: 0 10rpx;}
+.gray{color: #999;border-color: #999;}
+.gmbtn{width: 210rpx;height: 80rpx;border-radius: 40rpx;text-align: center;line-height: 80rpx;font-size: 30rpx;color: #fff;}
+.integral{width: 430rpx;height: 80rpx;border-radius: 40rpx;text-align: center;line-height: 80rpx;font-size: 30rpx;color: #fff;}
+.xiajia{position: fixed;background: rgba(0,0,0,.6);left: 0;right: 0;bottom: 120rpx;height: 80rpx;line-height: 80rpx;font-size: 28rpx;color: #999999;text-align: center;z-index: 50;}
+.kan-guoqi{background: #999;}
+
+.details image{width: 100%;}
+
+/* 小店相关 */
+.xiaodian{position: relative;height: 122rpx;margin-top: 35rpx;padding: 0 26rpx 0 128rpx;align-items: center;}
+.xdbg{position: absolute;left: 0;top: 0;width: 100%;height: 100%;z-index: 1;}
+.shouyi{position: relative;z-index: 2;color: #fff;}
+.shouyi view{font-size: 40rpx;font-weight: bold;margin-top: 8rpx;}
+.shouyi text{font-weight: normal;font-size: 24rpx;}
+.addshop{width: 170rpx;height: 62rpx;border-radius: 31rpx;background:linear-gradient(115deg,rgba(255,78,78,1) 0%,rgba(220,21,21,1) 100%);text-align: center;line-height: 62rpx;font-size: 24rpx;color: #fff;position: relative;z-index: 2;}
+
+.suc{position: fixed;left: 50%;top: 50%;transform: translate(-50%,-50%);background: #fff;width: 536rpx;border-radius: 20rpx;z-index: 100;text-align: center;padding-bottom: 47rpx;}
+.tjcg1{width: 100%;height: 284rpx;}
+.tjcg{width: 195rpx;height: 38rpx;margin: 52rpx auto 15rpx;}
+.suc text{display: block;font-size: 24rpx;color: #333;}
+.shop{width:429rpx;height:80rpx;background:linear-gradient(123deg,rgba(255,130,130,1) 0%,rgba(220,21,21,1) 100%);font-size: 30rpx;color: #fff;line-height: 80rpx;border-radius: 40rpx;margin: 45rpx auto 40rpx;}
+.share-btn{justify-content: space-between;padding: 0 54rpx;}
+.wxfriend,.wxposter{width: 196rpx !important;height: 76rpx !important;align-items: center;justify-content: center;font-size: 30rpx;color: #666;border: 2rpx solid #D8D8D8;border-radius: 40rpx !important;}
+.wxfriend image,.wxposter image{width: 31rpx;height: 31rpx;margin-right: 13rpx;}
+.suc-close{position: absolute;left: 50%;transform: translateX(-50%);bottom: -102rpx;width: 62rpx;height: 62rpx;}
+.sellStock{text-align: right; color: #999;position: relative; left: 45rpx;}
+.sellStock text{ color:#222 ;}
+.protext{color: #999;margin-top: 15rpx;overflow:hidden; text-overflow:ellipsis;display:-webkit-box; -webkit-box-orient:vertical;-webkit-line-clamp:2; }
+.you{width: 12rpx;height: 20rpx;}
+/* 海外购 */
+.logistics{align-items: center;justify-content: space-around;margin-top: 40rpx;}
+.logistics view{color: #666666;}
+.logistics .lsicText{color: #238CF5;}
+.logistics .abroad{width: 46rpx;height: 46rpx;margin: 0 auto 20rpx;}

+ 750 - 0
integralShop/detail/detail.vue

@@ -0,0 +1,750 @@
+<template>
+<view v-if="allShow">
+<!--pages/detail/detail.wxml-->
+<view class="banner">
+	<swiper class="swiper" @change="swiperChange" :current="current" autoplay="true" circular="true" duration="1000">
+		<block v-for="(item, index) in product.images" :key="index">
+			<swiper-item autoplay="true">
+				<image :src="item + '?x-oss-process=style/w750-auto'" mode="aspectFit"></image>
+			</swiper-item>
+		</block>
+	</swiper>
+	<view class="dots dflex">
+		<block v-for="(item, index) in product.images" :key="index">
+			<view :class="'dot ' + (index == swiperCurrent ? ' active' : '')" :data-current="index" @tap="dotEvent"></view>
+		</block>
+	</view>
+</view>
+<!-- <view bindtap="saoma">扫码</view> -->
+<!-- <view class="notification_bar" wx:if="{{isNotice}}">
+	<swiper class="swiper_container" vertical="true" autoplay="true" circular="false" duration="1000" interval="5000" easing-function="easeInOutCubic" class="bar_box dflex">
+		<swiper-item class="bar_con dflex" wx:for="{{contentList}}" wx:key="item">
+			<view class="bar dflex">
+				<image class="bar_left" src="{{item.pic}}" />
+				<text class="bar_text">最新订单来自</text>
+				<text class="bar_text">{{item.name}},</text>
+				<text class="bar_text">{{item.time}}</text>
+			</view>
+		</swiper-item>
+	</swiper>
+</view> -->
+<view class="info bgfff">
+	<view class="infos dflex">
+		<view class="price dflex" v-if="product.mode==2">
+			<text>{{product.integral?product.integral:'0'}}积分</text>
+			<text class="money" v-if="product.salePrice">+¥{{product.salePrice?product.salePrice:'0'}}</text>
+			<text class="origin" v-if="product.salePrice == product.actualPrice && product.marketPrice > 0">¥{{product.marketPrice}}</text>
+		</view>
+		<view class=" sellStock" v-if="product.sellStock>0">销量:<text>{{product.sellStock}}</text></view>
+		<view class="share" @tap="showShare">
+			<image src="/static/pages/images/fxico.png"></image>分享
+		</view>
+	</view>
+	<view class="title">
+		<image src="/static/pages/images/jishida.png" class="tag" v-if="product.isTimely === 1&&merchant.isDefault!=1"></image>
+		<image src="/product/static/product/image/overseasPurchase.png" class="tag" v-if="product.isOtc===5"></image>
+		{{product.title}}
+	</view>
+	<view class="protext">
+		{{product.brandName ? product.brandName : ''}} {{product.brief ?  product.brief : ''}}
+	</view>
+	<!-- <view class="xiaodian dflex" wx:if="{{hideShop=='true'}}">
+		<image src="/pages/images/xdbg1.png" class="xdbg"></image>
+		<view class="shouyi flex">
+			<text>销售收益</text>
+			<view>8.65<text>元</text></view>
+		</view>
+		<view class="addshop" bindtap="addShop">添加到小店</view>
+	</view> -->
+</view>
+
+<view class="detinfo mt20 bgfff">
+	<!-- <view class="item dflex">
+    <label>优惠券</label>
+    <view class="quan flex dflex">
+      <view class="flex dflex">
+        <text>满500减50</text>
+        <text>满200减10</text>
+      </view>
+      <view class="ling dflex">领券<image src="/pages/images/more3.png"></image></view>
+    </view>
+  </view> -->
+	<view class="item dflex">
+		<label>配送至</label>
+		<view class="flex" @tap="toAddress">
+			<view class="address">{{address.address}}{{address.house}}</view>
+			<view class="huo"><text>现货</text>
+				<!-- 现在下单,预计2小时后送达 -->
+			</view>
+		</view>
+		<image src="/static/pages/images/more2.png" class="more" @tap="toAddress"></image>
+	</view>
+
+	<!-- <view class="item dflex">
+		<label>服务门店</label>
+		<view class="flex" bindtap="updateShop">
+			<view class="address">{{merchant.title}}</view>
+		</view>
+	</view> -->
+</view>
+<!-- 海外购 -->
+<!-- <view class="detinfo mt20 bgfff" wx:if="{{product.isOtc==5}}">
+	<view class="item">
+		<view class="dflex">
+			<label>物流</label>
+			<view class="">
+				<view class="address">20:00前付款,预计9月30日前送达</view>
+			</view>
+		</view>
+		<view class="dflex logistics">
+			<view class="lsicText">
+				<image src="/product/image/abroad.png" class="abroad"></image>
+				德国进口
+			</view>
+			<image src="/product/image/you_h.png" class="you"></image>
+			<view class="lsicText">
+				<image src="/product/image/bonded.png" class="abroad"></image>
+				保税店
+			</view>
+			<image src="/product/image/you.png" class="you"></image>
+			<view>
+				<image src="/product/image/position.png" class="abroad"></image>
+				长沙市
+			</view>
+		</view>
+	</view>
+</view> -->
+<!--  商品详情等页面 -->
+<product-footer id="list" ref="list" :detail="nodes" :imgs="imgs" :proId="product.id" v-if="product.id" :form="form" @scoreTab="scoreTab" @showTab="showTab" @freshen="freshenFun"></product-footer>
+
+
+<v-share :hide-toast="hideShare" :product="product" :code-url="codeUrl" @onFather="click"></v-share>
+<view class="placeholder-view" :style="'height:' + (bottomBlankHeight + 140) + 'rpx'"></view>
+<view class="bot fixed bgfff dflex" :style="'padding-bottom: ' + (bottomBlankHeight + 20) + 'rpx'">
+	<view class="btnfot">
+		<contact-button img-url="/static/pages/images/kfico.png" class-name="botbtn" button-text="客服"></contact-button>
+		<navigator class="botbtn" open-type="reLaunch" url="/integralshop/cart/cart?integralshop=1" hover-class="none">
+			<image src="/static/pages/images/gwc.png"></image>购物车<text class="message" v-if="product.count > 0">{{product.count}}</text>
+		</navigator>
+	</view>
+	<view class="btnbuy">
+		<view :class="'addcart ' + (product.stock >= 1 && product.state == 1 ? '' : 'gray')" @tap="product.stock >= 1 && product.state == 1 ? addShopCart() : ''">加入购物车</view>
+		<view class="gmbtn mbglinear" @tap="atOnceBuy" v-if="product.stock >= 1 && product.state == 1">
+			{{product.isOtc==1 ?'预约下单': '立即兑换'}}</view>
+			<view class="gmbtn mbggray" v-if="product.stock < 1 && product.state == 1">立即兑换</view>
+			<!-- <view class="gmbtn kan-guoqi" wx:if="{{product.stock < 1 && product.state == 1}}">
+			商品已售罄</view> -->
+		<!-- <view class="integral mbggray" >积分不足</view> -->
+		<view class="gmbtn mbggray" v-if="product.state == 2">已下架</view>
+	</view>
+</view>
+<view class="xiajia" v-if="product.stock < 1 && product.state == 1">您来晚了,商品已经卖完了</view>
+<view class="xiajia" v-if="product.state == 2">您来晚了,商品已经下架</view>
+
+<!-- 商品规格 -->
+<block v-if="isShow">
+	<product-popup :product="product" :order-type="'11'" :is-cart="isCart" :is-timely="product.isTimely" :merchant="merchant" :merchant-id="merchantId" @hidePopup="hidePopup" @addCartSuccess="addCartSuccess">
+	</product-popup>
+</block>
+<!-- 返回顶部 -->
+<view class="contact_index" @tap="goTop">
+	<image src="/static/pages/images/backtop.png"></image>顶部
+</view>
+<!-- 添加到小店成功 -->
+<!-- <view class="mask" hidden="{{isHide}}" bindtap="hidePop"></view>
+<view class="suc" hidden="{{isHide}}">
+	<image src="/pages/images/tjcg1.png" class="tjcg1"></image>
+	<image src="/pages/images/tjcg.png" class="tjcg"></image>
+	<text>快去我的小店看看吧</text>
+	<navigator url="/mine/shop/shop" hover-class="none" class="shop">我的小店</navigator>
+	<view class="share-btn dflex">
+		<button class="wxfriend dflex" open-type="share">
+			<image src="/pages/images/wechat.png"></image>
+			微信好友
+		</button>
+		<view class="wxposter dflex" bindtap="generatePoster">
+			<image src="/pages/images/poster.png"></image>
+			生成海报
+		</view>
+	</view>
+	<image src="/pages/images/close2.png" class="suc-close" bindtap="hidePop"></image>
+</view> -->
+</view>
+</template>
+
+<script>
+const app = getApp();
+const req = require("../../utils/request.js");
+const utils = require("../../utils/util.js");
+var QQMapWX = require("../../utils/qqmap.js");
+const route = require("../../utils/route");
+import productFooter from "../../components/product_footer/index";
+import productPopup from "../../components/product-popup/index";
+import vShare from "../../components/share/share";
+
+export default {
+  data() {
+    return {
+      bottomBlankHeight: app.globalData.isIPhoneX ? 68 : 0,
+      swiperCurrent: 0,
+      bannerUrls: [],
+      isShow: false,
+      pro: {},
+      isCart: false,
+      timer: [],
+      hideShare: true,
+      codeUrl: '',
+      contentList: [{
+        pic: "/static/pages/images/bar.png",
+        name: '好风依旧',
+        time: '4秒前'
+      }, {
+        pic: "/static/pages/images/bar.png",
+        name: '杨鑫',
+        time: '20秒前'
+      }, {
+        pic: "/static/pages/images/bar.png",
+        name: '杨鑫',
+        time: '5秒前'
+      }],
+      isNotice: false,
+      form: {
+        page: 1,
+        limit: 10
+      },
+      freshen: true // hideShop: '',//隐藏添加到小店
+      // isHide: true,//添加小店成功弹窗
+      ,
+      current: "",
+      merchantId: "",
+      hideShop: "",
+      merchant: "",
+      shopId: "",
+      imgs: [],
+      product: "",
+      nodes: "",
+      address: "",
+      popup: "",
+      tabIndex: "",
+	  allShow:false
+    };
+  },
+
+  components: {
+    productFooter,
+    productPopup,
+    vShare
+  },
+  props: {},
+  onLoad: function (options) {
+    let that = this;
+    // console.log(options);
+    this.query = options;
+
+    if (options.scene) {
+      this.scene = options.scene;
+      this.merchantId = options.merchantId;
+    }
+
+    if (options.merchantId) {
+      that.setData({
+        merchantId: options.merchantId
+      });
+    }
+
+    if (options.isShare) {
+      req.setStorage('pidCode', options.userId);
+    }
+
+    if (options.hideShop) {
+      this.setData({
+        hideShop: this.query.hideShop
+      });
+    } else {
+      this.setData({
+        hideShop: 'true'
+      });
+    }
+
+    if (options.merchantId && options.merchantId != 'undefined') {
+      req.getRequest('/api/merchant/detail', {
+        id: options.merchantId
+      }, data => {
+		  var timestamp = Date.parse(new Date());
+		  data.time=timestamp+1*60*1000
+		  
+        req.setStorage("MERCHANT", data);
+        that.setData({
+          merchant: data
+        });
+        // console.log(data, "执行+++++++++++++++++++++");
+      });
+    } else {
+      let merchant = req.getStorage('MERCHANT');
+      this.setData({
+        merchant: merchant
+      });
+    } // else{
+    //   req.getRequest('/api/merchant/getMerchantList',{}, res => {
+    //    res = res.filter(it=>it.isDefault==1)
+    //     req.setStorage('MERCHANT', res[0]);
+    //     this.data.merchant=res[0]
+    //     that.setData({merchant:res[0]})
+    //     console.log(this.data.merchant)
+    //   })
+    // }
+
+
+    setInterval(() => {
+      this.setData({
+        isNotice: true
+      });
+    }, 10000);
+  },
+  onShow: async function () {
+    if (this.freshen) {
+      await this.loadCodeParams();
+      this.loadProudct(this.query);
+      this.loadDefaultAddress();
+      this.browsRecound(this.query.id);
+    }
+  },
+  onShareAppMessage: function () {
+    let merchantId = '';
+    let path = '/integralshop/detail/detail?id=' + this.query.id + '&isShare=' + true;
+    // console.log(!req.getStorage('userInfo').id);
+
+    if (!req.getStorage('userInfo').id) {} else {
+      path += '&userId=' + req.getStorage('userInfo').id;
+    }
+
+    // console.log(this.query.merchantId);
+    let shopId = '';
+
+      if (req.getStorage('MERCHANT') && req.getStorage('MERCHANT').id != null) {
+      	path += '&merchantId=' + req.getStorage('MERCHANT').id;
+      	merchantId = req.getStorage('MERCHANT').id;
+      
+      	if (req.getStorage('smallShop') && req.getStorage('MERCHANT').id != null) {
+      		path += '&shopId=' + req.getStorage('smallShop').id;
+      		shopId = req.getStorage('smallShop').id;
+      		merchantId = req.getStorage('smallShop').merchantDTO.id;
+      	}
+      }
+
+
+    route.share(1, req.getStorage('userInfo').id, path, merchantId, shopId, 1, this.query.id);
+    // console.log(path);
+    return {
+      title: this.product.title,
+      imageUrl: this.product.pic,
+      path: path
+    }; // let merchantId=''
+    // // if(this.data.merchant.isDefault!=1){
+    // //   merchantId=this.data.merchant.id
+    // // }
+    // if(this.query.merchantId) merchantId=this.query.merchantId
+    // return {
+    //   title: this.data.product.title,
+    //   imageUrl: this.data.product.pic,
+    //   path: '/integralshop/detail/detail?id=' + this.query.id + '&isShare=' + true + '&userId=' + req.getStorage('userInfo').id+'&merchantId='+merchantId
+    // }
+  },
+
+  onReachBottom() {
+    if (this.is_open_comments == 1 && this.tabIndex == 2) {
+      this.form.page++;
+      this.setData({
+        ['form.page']: this.form.page
+      });
+      // this.selectComponent("#list").loadScore(this.current);
+	  this.$refs.list.loadScore(this.current);
+    }
+  } // addShop() {//添加到小店
+  //   req.postRequest('/api/shopProduct/save',{productId:this.data.product.id,type:1},data=>{
+  //     console.log(data)
+  //     this.setData({ isHide: false })
+  //   })
+  // },
+  // hidePop() {//添加到小店
+  //   this.setData({ isHide: true })
+  // }
+  ,
+
+  methods: {
+	  click(e){
+	  		  // console.log(e)
+	  		  this.hideShare=e
+	  },
+    showShare() {
+		// #ifndef H5
+      req.isLogin().then(success => {
+        if (success) {
+			this.setData({
+			  hideShare: false
+			});
+          	this.getCodeUrl()
+        }
+      });
+	  // #endif
+    },
+
+    /**
+     * 轮播切换
+     */
+    swiperChange({
+      detail
+    }) {
+      if (this.current == 0 && this.swiperCurrent > 1) {
+        //卡死时,重置current为正确索引
+        this.setData({
+          current: this.swiperCurrent
+        });
+      } else {
+        //正常轮转时,记录正确页码索引
+        this.setData({
+          swiperCurrent: detail.current
+        });
+      }
+    },
+
+    dotEvent(e) {
+      this.setData({
+        current: e.currentTarget.dataset.current
+      });
+    },
+
+    browsRecound(id) {
+      let from = {
+        bindId: id,
+        type: 1,
+        page: '/integralshop/detail/detail?id=' + this.query.id
+      }; //  if(this.query.scene){
+      //    from.shareType=12
+      //    from.page='/product/detail/detail?id=' + this.data.query.id +'&scene='+this.query.scene
+      //    if(!this.data.params.merchantId){}else{
+      //      from.merchantId=this.data.params.merchantId
+      //    }
+      //    if(!this.data.params.shopId){}else{
+      //      from.shopId=this.data.params.shopId
+      //    }
+      //    if(!this.data.params.userId){}else{
+      //      from.uid=this.data.params.userId
+      //    }
+      //  }
+
+      if (this.query.isShare) {
+        from.shareType = 1;
+        from.page = '/integralshop/detail/detail?id=' + this.query.id + '&isShare=' + true;
+
+        if (!this.query.userId) {} else {
+          from.page += '&userId=' + this.query.userId;
+        }
+
+        if (!this.query.merchantId) {} else {
+          from.merchantId = this.query.merchantId;
+        }
+
+        if (!this.query.shopId) {} else {
+          from.shopId = this.query.shopId;
+        }
+
+        if (!this.query.userId) {} else {
+          from.uid = this.query.userId;
+        }
+      }
+
+      if (this.query.isShareTimeline) {
+        from.shareType = 2;
+        from.page = '/integralshop/detail/detail?id=' + this.query.id + '&isShareTimeline=' + true;
+
+        if (!this.query.userId) {} else {
+          from.page += '&userId=' + this.query.userId;
+        }
+
+        if (!this.query.merchantId) {} else {
+          from.merchantId = this.query.merchantId;
+        }
+
+        if (!this.query.shopId) {} else {
+          from.shopId = this.query.shopId;
+        }
+
+        if (!this.query.userId) {} else {
+          from.uid = this.query.userId;
+        }
+      }
+
+      req.postRequest('/api/browse', from, data => {});
+    },
+
+    // 选择服务门店
+    updateShop() {
+      let url = 'pages/nearby/nearby?isChoose=true';
+      app.globalData.openPage(url); // let url = 'pages/nearby/nearby';
+      // app.openPage(url)
+    },
+
+    loadCodeParams() {
+      let _ts = this;
+
+      return new Promise((resolve, reject) => {
+        let form = {
+          scene: _ts.scene
+        };
+
+        if (!_ts.scene) {
+          resolve();
+          return false;
+        }
+
+        if (_ts.merchantId) {
+          // console.log("解析出来有门店");
+          form.merchantId = _ts.merchantId;
+        }
+
+        req.getRequest('/api/code/params', form, data => {
+          // console.log("====================================================================================" + data.merchantId);
+          let res = data.scene.split('_');
+          // console.log(res);
+          this.query.id = res[0];
+          this.query.merchantId = res[1];
+          this.query.shopId = res[2]; // this.query.id = res[0];
+          // this.query.merchantId = res[1];
+          // this.query.shopId = res[2];
+
+          if (res[1]) {
+            this.setData({
+              merchantId: res[1]
+            });
+          }
+
+          if (res[2]) {
+            this.setData({
+              shopId: res[2]
+            });
+          }
+
+          req.setStorage('pidCode', data.userId); // if (this.query.scene) {
+          //   this.loadProudct();
+          // }
+          // this.browsRecound(this.query.id);
+
+          resolve();
+        });
+      });
+    },
+
+    loadProudct(query) {
+      // console.log(this.query)
+      // const query = this.query;
+      let that = this;
+      // console.log(query.merchantId);
+      let form = {
+        id: query.id
+      }; 
+      if (query.merchantId) form.merchantId = query.merchantId;
+	  let isShowLoading = false;
+	  
+	  if (!isShowLoading) {
+	  	req.loadIng('加载中');
+	  	isShowLoading = true;
+	  }
+      req.getRequest('/api/product/detail', form, data => {
+        //富文本图片放大
+        var nodes = data.detail;
+        if (data.isOtc == 5) {
+          uni.setNavigationBarTitle({
+            title: '海外购'
+          });
+        }
+
+        that.setData({
+          bannerUrls: data.images,
+          product: data,
+          nodes: nodes,
+		  allShow:true
+        }); 
+		if (isShowLoading) {
+			uni.hideLoading();
+			isShowLoading = false;
+		}
+		// if (data.detail) {
+        //   this.setData({ detail: data.detail.replace(/\<img/gi, '<img class="rich-img"') })
+        // }
+      });
+    },
+
+    getCodeUrl() {
+      let that = this;
+      let scene = that.product.id;
+
+      if (!this.merchantId) {} else {
+        scene += '_' + this.merchantId;
+      }
+
+      // console.log(scene); //获取小程序码
+
+      const params = {
+        page: 'integralshop/detail/detail',
+        scene: scene
+      }; // if(this.data.merchant&&this.data.merchant.isDefault!=1){
+      //   params.merchantId=this.data.merchant.id
+      // }
+
+      if (this.query.merchantId) var merchantId = this.query.merchantId;
+      req.getRequest('/api/program/codev', params, url => {
+        that.setData({
+          codeUrl: url
+        });
+      });
+    },
+
+    loadDefaultAddress() {
+      if (req.isAuth()) {
+        req.g('/api/address/default', data => {
+          if (data) this.setData({
+            address: data
+          });else this.pointLocation();
+        }, true);
+      } else {
+        this.pointLocation();
+      }
+    },
+
+    pointLocation() {
+      //定位当前位置
+      let _ts = this;
+
+      QQMapWX.initMap();
+      req.getLocation(res => {
+        QQMapWX.reverseGeocoder(res, data => {
+          _ts.setData({
+            'address.address': data.address
+          });
+        });
+      });
+    },
+
+    toAddress() {
+      app.globalData.openPage('mine/address/address');
+    },
+
+    atOnceBuy() {
+      this.setData({
+        isShow: true,
+        isCart: false,
+        popup: this.product
+      });
+    },
+
+    addShopCart() {
+      this.setData({
+        isShow: true,
+        isCart: true,
+        popup: this.product
+      });
+    },
+
+    hidePopup() {
+      this.setData({
+        isShow: false
+      });
+    },
+
+    addCartSuccess(event) {
+      this.setData({
+        'product.count': parseInt(this.product.count) + parseInt(event.detail.quantity),
+        isShow: false
+      });
+    },
+
+    clickCollect() {
+      let _ts = this;
+
+      req.postRequest('/api/collect', {
+        bindId: this.product.id,
+        type: 1
+      }, data => {
+        _ts.setData({
+          'product.isCollect': !_ts.product.isCollect
+        });
+      });
+    },
+
+    goTop: function (e) {
+      // 一键回到顶部
+      if (uni.pageScrollTo) {
+        uni.pageScrollTo({
+          scrollTop: 0
+        });
+      } else {
+        uni.showModal({
+          title: '提示',
+          content: '当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。'
+        });
+      }
+    },
+
+    onShareTimeline() {
+      let merchantId = '';
+      let path = 'id=' + this.query.id + '&isShareTimeline=' + true;
+
+      if (!req.getStorage('userInfo').id) {} else {
+        path += '&userId=' + req.getStorage('userInfo').id;
+      }
+
+      // console.log(this.merchantId);
+      let shopId = '';
+
+      if (!this.merchantId) {
+        // console.log(123, path);
+      } else {
+        if (req.getStorage('MERCHANT') && req.getStorage('MERCHANT').id != null) {
+          path += '&merchantId=' + req.getStorage('MERCHANT').id;
+          merchantId = req.getStorage('MERCHANT').id;
+
+          if (req.getStorage('smallShop') && req.getStorage('MERCHANT').id != null) {
+            path += '&shopId=' + req.getStorage('smallShop').id;
+            shopId = req.getStorage('smallShop').id;
+            merchantId = req.getStorage('smallShop').merchantDTO.id;
+          }
+        }
+      }
+
+      let url = '/integralshop/detail/detail?' + path;
+      route.share(2, req.getStorage('userInfo').id, url, merchantId, shopId, 1, this.query.id);
+      // console.log(path, url);
+      return {
+        title: this.product.title,
+        query: path,
+        imageUrl: this.product.images[0]
+      }; // return {
+      //   title: this.data.product.title,
+      //   path: this.data.product.images[0]
+      // }
+    },
+
+    showTab: function (e) {
+      this.setData({
+        tabIndex: e.detail
+      });
+    },
+    scoreTab: function (e) {
+      this.form.page = 0;
+      this.setData({
+        current: e.detail,
+        ['form.page']: 1
+      });
+    },
+    freshenFun: function (e) {
+      this.setData({
+        freshen: e.detail
+      });
+    }
+  }
+};
+</script>
+<style>
+@import "./detail.css";
+</style>

+ 80 - 0
integralShop/index/index.css

@@ -0,0 +1,80 @@
+/* pages/integralshop/integralshop.wxss */
+.banner{position:absolute;
+ /*  #ifndef  H5  */
+ z-index: -1;
+ /* #endif */
+height: 280rpx;width: 100%;}
+.banner image{width: 100%;height:280rpx}
+.banner::after{content: '';display: block;width: 110%;background: linear-gradient(#FD3A31,#FE934C);height: 280rpx;position: absolute;top: 0;left: -5%;border-radius: 0 0 10% 10%;}
+.top{padding: 50rpx 0 0 40rpx;}
+.top .my{font-size: 28rpx; color: #FFFFFF;align-items: center;}
+.top .my image{width: 29rpx;height: 27rpx;margin-right: 9rpx;}
+.top .integral{align-items: center;justify-content: space-between;}
+.top .integral .txt{font-size: 60rpx;color: #FFFFFF;}
+.top .integral .rule{font-size: 30rpx;
+	color: #FC9816;
+	background: linear-gradient(90deg, #FFF6E9 0%, #FCEEDB 60%, #FFDFB5 100%);
+	height: 64rpx;
+	border-radius: 32rpx 0 0 32rpx;
+	padding: 0 30rpx 0 27rpx;
+	align-items: center;
+	justify-content: center;}
+.top .integral .rule image{ width: 34rpx;height: 32rpx;margin-right: 11rpx;}
+.nav{margin: 50rpx 40rpx;border-radius: 12rpx;background: #fff;position: relative;z-index: 3;}
+.nav .item{padding: 31rpx 0;justify-content: space-between;}
+.nav .item view{color: #333333;align-items: center;
+    flex: 0.5;
+    justify-content: center;
+    font-size: 26rpx;}
+.grule {
+    border-right: 1rpx solid rgba(232,232,232,.6);
+}	
+/* .nav .item image{ width: 98rpx;height: 98rpx;} */
+
+/* 筛选 */
+.cont{background: #fff; margin-top: 35rpx;}
+.filter{padding: 0 20rpx; border-bottom:2rpx solid rgba(232,232,232,.5) ;}
+.filter1{position: relative;z-index: 100;}
+.filter .li{width: 33.33%;display: flex;display: -webkit-flex;align-items: center;justify-content: center;padding: 25rpx 0;font-size: 30rpx;color: #333;}
+.filter .li.active{color: #FE0419}
+.updown{width: 14rpx;height: 8rpx;margin-left: 9rpx;}
+.cont .pop .item{position: absolute;z-index: 100;background: #fff;width: 100%; border-radius: 0 0 30rpx 30rpx;}
+.cont .pop .item view{padding: 30rpx; justify-content: space-between; align-items: center; font-size: 28rpx;}
+.cont .pop .item image{width: 30rpx;height: 20rpx;}
+.cont .brbtm{border-bottom: 2rpx solid rgba(232,232,232,.5);}
+.cont .pop .active{color: #FE0419;}
+/* 产品展示 */
+.pintuan{ position: relative;}
+.pintuan .li{margin-top: 24rpx;padding-bottom: 35rpx;margin-bottom: 20rpx;border-bottom: 1rpx solid rgba(232,232,232,.5);}
+.pintuan .li:last-child{border-bottom: none;}
+.pinimgs{box-sizing: border-box;width: 210rpx;height: 210rpx;border-radius: 10rpx;margin-right: 20rpx;border: 2rpx solid #E5E5E5;position: relative;}
+.pinimg{display: block;width: 100%;height: 100%;border-radius: 10rpx;}
+.tuan{display: block;width: 87rpx;height: 44rpx;font-size: 22rpx;color: #fff;text-align: center;line-height: 34rpx;position: absolute;top: 21rpx;left: -10rpx;}
+.tuan image{display: block;width: 100%;height: 100%;position: absolute;top: 0;left: 0;}
+.tuan text{position: relative;z-index: 2;display: block;}
+.pininfo{overflow:hidden }
+.pininfo .proname{font-size: 28rpx;color: #333;overflow: hidden;
+    text-overflow: ellipsis;
+    display: -webkit-box;
+    -webkit-box-orient: vertical;
+    -webkit-line-clamp: 2;}
+.pininfo .operate{margin-bottom: 57rpx;}
+.pininfo .operate .introduce{color: #999999;font-size: 24rpx;}
+.pininfo .price{align-items: center;justify-content: space-between;line-height: 50rpx;}
+.pininfo .price .prc{font-size: 24rpx;color: #FE0419;margin-left: 8rpx;}
+
+.pininfo .price .num{font-size: 36rpx;color: #FE0419;}
+.pininfo .price .money{font-size: 24rpx;color: #FE0419;margin-left: 4rpx;}
+.pininfo .price .btn{width: 130rpx;height: 50rpx;border-radius: 25rpx;background: linear-gradient(90deg, #FF6070 0%, #FE0419 100%);text-align: center;line-height: 50rpx;font-size: 24rpx; color: #fff;}
+/* .pininfo .price .baglig{background: linear-gradient(to left,#FE0419,#FF6070);color: #fff;} */
+.pininfo .price .file{background: #D1D1D1; color: #999999;}
+.more{
+  width: 31rpx;
+  height: 31rpx;
+  margin-right: 13rpx;
+}
+.detailed{
+  width: 28rpx;
+  height: 28rpx;
+  margin-right: 12rpx;
+}

+ 378 - 0
integralShop/index/index.vue

@@ -0,0 +1,378 @@
+<template>
+	<view>
+		<!--pages/integralshop/integralshop.wxml-->
+		<view class="banner">
+			<!-- <image src="/integralshop/static/integralshop/images/integral_bg.png" role="img"></image> -->
+		</view>
+		<view class="top ">
+			<view class="dflex integral">
+				<view class="flex" @tap="goDetailed">
+					<view class="txt">{{userIntegral}}</view>
+					<view class="my dflex">积分余额</view>
+					<!--    <view class="rule dflex" @tap="goRule">积分规则<image src="/static/integralshop/images/you_h.png"></image>
+    </view> -->
+				</view>
+				<view class="rule dflex" @tap="isSign==0||sign==1?'':signFun()">
+					<image src="../static/integralshop/images/qdico.png"></image>{{isSign==0||sign==1?'已签到':'签到'}}
+				</view>
+			</view>
+		</view>
+		<view class="nav">
+			<view class="item dflex">
+				<view @tap="goRule" class="dflex grule">
+					<image src="/integralshop/static/integralshop/images/sign.png" class="more"></image>获取积分
+				</view>
+				<view @tap="goDetailed" class="dflex">
+					<image src="/integralshop/static/integralshop/images/detailed.png" class="detailed"></image>积分明细
+				</view>
+				<!-- <view>
+      <image src="/integralshop/images/card.png"></image>卡券兑换
+    </view> -->
+			</view>
+		</view>
+		<view class="cont">
+			<view class="pop">
+				<view :class="'filter dflex bgfff ' + (isShow?'filter1':'')">
+					<view :class="'li ' + (active=='default'?'active':'')" @tap="ss" data-v="default">默认</view>
+					<view :class="'li ' + (active=='stock'?'active':'')" @tap="ss" data-v="stock">销量
+					</view>
+					<view :class="'li ' + (active=='fraction'?'active':'')" @tap="ss" data-v="fraction">积分<image
+							:src="isShow?'/integralshop/static/integralshop/images/integral_up.png':'/integralshop/static/integralshop/images/integral_down.png'"
+							class="updown">
+						</image>
+					</view>
+				</view>
+				<view class="item" v-if="isShow">
+					<view :class="'brbtm dflex ' + (sort=='gtIntegral'?'active':'')" @tap="fraction"
+						data-v="gtIntegral">积分降序<image src="/integralshop/static/integralshop/images/integral_gou.png"
+							v-if="sort=='gtIntegral'"></image>
+					</view>
+					<view :class="'dflex ' + (sort=='ltIntegral'?'active':'')" @tap="fraction" data-v="ltIntegral">积分升序
+						<image src="/integralshop/static/integralshop/images/integral_gou.png"
+							v-if="sort=='ltIntegral'"></image>
+					</view>
+				</view>
+			</view>
+			<view class="mask" @tap="eliminate" v-if="isShow"></view>
+			<view class="pintuan pdlr20">
+				<view v-for="(item, index) in pageList" :key="index" class="li" @tap="goproDetail" :data-id="item.id"
+					:data-merchant="merchant.type==5?merchant.merchantDTO.id:merchant.id"
+					:data-shopId="merchant.type==5?merchant.id:''">
+					<view class="dflex">
+						<view class="pinimgs">
+							<image :src="item.pic" mode="aspectFit" class="pinimg"></image>
+						</view>
+						<view class="pininfo flex">
+							<view class="proname">
+								{{item.title}}
+							</view>
+							<view class="operate">
+								<view class="introduce">
+									{{item.brief}}
+								</view>
+							</view>
+							<view class="price dflex">
+								<view class="dflex">
+									<text class="num">{{item.integral}}</text><text class="money">积分</text>
+									<view><text class="prc">+¥{{item.actualPrice }}</text></view>
+								</view>
+								<view class="btn baglig">兑换</view>
+								<!-- <view class="btn file" >积分不足</view> -->
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="nodata" v-if="ishow">
+			<image :src="picUrlss+'empty_sp.png'"></image>
+			<text>暂无商品</text>
+		</view>
+		<view class="nomore dflex">亲,没有更多了</view>
+		<view class="placeholder-view" :style="'height:' + (bottomBlankHeight + 115) + 'rpx'"></view>
+		<foot product-type="2" :isUpdate="isUpdate"></foot>
+	</view>
+</template>
+
+<script>
+	// pages/integralshop/integralshop.js
+	const app = getApp();
+	const req = require("../../utils/request.js");
+	import foot from "../../components/integral-nav/index";
+
+	export default {
+		data() {
+			return {
+				picUrlss: req.public.picUrls,
+				page: 1,
+				isLoad: true,
+				isShow: false,
+				sort: '',
+				active: 'default',
+				isUpdate: false // 是否更新消息
+					,
+				merchant: "",
+				isSign: "",
+				hasmore: false,
+				pageList: "",
+				ishow: false,
+				sign: 0,
+				hasemore: false
+			};
+		},
+
+		components: {
+			foot
+		},
+		props: {},
+
+		/**
+		 * 生命周期函数--监听页面加载
+		 */
+		onLoad: function(options) {
+			// this.getProct()
+			// this.getMerchant()
+			// this.setData({merchant:req.getStorage("MERCHANT")})
+			this.setData({
+				merchant: req.getStorage("defaultMerchant")
+			});
+		},
+
+		/**
+		 * 生命周期函数--监听页面显示
+		 */
+		onShow: function() {
+			this.getProct();
+			this.isSignFun();
+			this.getIntegral();
+			this.setData({
+				isUpdate: !this.isUpdate
+			});
+		},
+
+		/**
+		 * 生命周期函数--监听页面隐藏
+		 */
+		onHide: function() {
+			this.isLoad = true;
+		},
+
+		/**
+		 * 生命周期函数--监听页面卸载
+		 */
+		onUnload: function() {},
+
+		/**
+		 * 页面相关事件处理函数--监听用户下拉动作
+		 */
+		onPullDownRefresh: function() {},
+
+		/**
+		 * 页面上拉触底事件的处理函数
+		 */
+		onReachBottom: function() {
+				this.page++;
+				this.getProct();
+			}
+			/**
+			 * 用户点击右上角分享
+			 */
+			// onShareAppMessage: function () {
+			// }
+			,
+		methods: {
+			// 是否签到{}
+			isSignFun() {
+				req.getRequest('/api/integral/isSign', {}, res => {
+					this.setData({
+						isSign: res
+					});
+				});
+			},
+
+			// 获取用户积分
+			getIntegral() {
+				req.getRequest('/api/integral/totalIntegral', {}, res => {
+					// console.log(res);
+					this.setData(res);
+				});
+			},
+
+			getMerchant() {
+				// let merchant = req.getStorage("MERCHANT");
+				req.getRequest('/api/merchant/getMerchantList', {}, res => {
+					res = res.filter(it => it.isDefault == 1);
+					var timestamp = Date.parse(new Date());
+					res[0].time = timestamp + 1 * 60 * 1000
+					req.setStorage('MERCHANT', res[0]);
+					this.setData({
+						merchant: res[0]
+					});
+				});
+			},
+
+			// 获取产品列表
+			getProct() {
+				let isShowLoading = false;
+
+				if (this.page == 1 && !isShowLoading) {
+					req.loadIng('加载中');
+					isShowLoading = true;
+				}
+
+				let that = this;
+				if (!that.isLoad) return false;
+				that.isLoad = false;
+				let from = {
+					page: this.page,
+					limit: 10,
+					mode: 2,
+					sort: this.sort
+				};
+				req.getRequest('/api/product/list', from, data => {
+					if (data && data.length >= 10) that.isLoad = true;
+					if (that.page > 1) data = that.pageList.concat(data);
+
+					if (!data || data.length < 10) {
+						that.setData({
+							hasmore: true
+						});
+					}
+
+					that.setData({
+						pageList: data
+					});
+					// console.log(data);
+
+					if (data.length <= 0) {
+						that.setData({
+							ishow: true
+						});
+					} else {
+						that.setData({
+							ishow: false
+						});
+					}
+
+					if (isShowLoading) {
+						uni.hideLoading();
+						isShowLoading = false;
+					}
+				});
+			},
+
+			// 商品详情
+			goproDetail(e) {
+				var id = e.currentTarget.dataset.id;
+				let merchantId = e.currentTarget.dataset.merchant;
+				let shopId = e.currentTarget.dataset.shopid;
+
+				if (!shopId) {
+					if (!merchantId) {
+						uni.navigateTo({
+							url: '/integralshop/detail/detail?id=' + id
+						});
+					} else {
+						uni.navigateTo({
+							url: '/integralshop/detail/detail?id=' + id + '&merchantId=' + merchantId
+						});
+					}
+				} else {
+					uni.navigateTo({
+						url: '/integralshop/detail/detail?id=' + id + '&merchantId=' + merchantId + '&shopId=' +
+							shopId
+					});
+				} // wx.navigateTo({
+				//   url: '/integralshop/detail/detail?id='+id,
+				// })
+
+			},
+
+			// 积分规则
+			goRule() {
+				uni.navigateTo({
+					url: "/integralshop/task/index"// /integralshop/integralRule/index
+				});
+			},
+
+			// 签到
+			signFun() {
+				req.postRequest('/api/integral/sign', {}, data => {
+					if (data) {
+						req.msg('连续签到' + data.continuityDay + '天' + ',获得' + data.IntegralChange + '积分');
+						this.setData({
+							sign: 1
+						});
+						this.getIntegral();
+					}
+				});
+			},
+
+			// 积分明细
+			goDetailed() {
+				uni.navigateTo({
+					url: "/integralshop/integralDetailed/index"
+				});
+			},
+
+			// 分数排序
+			fraction(e) {
+				var dt = e.currentTarget.dataset;
+				this.isLoad = true;
+				this.setData({
+					isShow: false
+				});
+				this.refresh(dt.v);
+			},
+
+			ss(e) {
+				var dt = e.currentTarget.dataset;
+
+				if (dt.v == 'fraction') {
+					this.setData({
+						isShow: true
+					});
+				} else {
+					this.setData({
+						isShow: false
+					});
+				}
+
+				if (dt.v == 'default') {
+					this.isLoad = true;
+					this.refresh(dt.v);
+				}
+
+				if (dt.v == 'stock') {
+					this.isLoad = true;
+					this.refresh(dt.v);
+				} // this.data.isLoad = true;
+				// this.refresh(dt.v);
+
+
+				this.setData({
+					active: dt.v
+				});
+			},
+
+			refresh(s, t) {
+				this.setData({
+					hasemore: true,
+					sort: s
+				});
+				this.page = 1;
+				this.getProct();
+			},
+
+			eliminate() {
+				this.setData({
+					isShow: false
+				});
+			}
+
+		}
+	};
+</script>
+<style>
+	@import "./index.css";
+</style>

+ 58 - 0
integralShop/integralDetailed/index.css

@@ -0,0 +1,58 @@
+/* pages/integralshop/integralDetailed/index.wxss */
+.banner{height: 180rpx;width: 100%;position:absolute;
+/*  #ifndef  H5  */
+z-index: -1;
+ /* #endif */
+ background-size:100% 100%;}
+.banner image{width: 100%;height: 180rpx}
+.banner::after{content: '';display: block;width: 110%;background: linear-gradient(#FD3A31,#FE934C);height: 180rpx;position: absolute;top: 0;left: -5%;border-radius: 0 0 10% 10%;}
+.nav{margin: 0 30rpx 0;position: relative;z-index: 3;padding: 50rpx 0 0;}
+.nav .item{padding: 44rpx 40rpx;justify-content: space-between;background: #fff;border-radius: 20rpx;}
+.nav .item .li{border-right: 1rpx solid rgba(232,232,232,.4);margin-right: 40rpx;}
+.nav .item .li .count{font-size: 28rpx;color: #666;}
+.nav .item .li .integral{font-size: 24rpx; color: #999999;}
+.nav .item .li .num{font-size: 56rpx; font-weight: bold;color: #333;margin-bottom: 10rpx; }
+.nav .item .li .num1{font-size: 56rpx; font-weight: bold;margin-bottom: 10rpx;}
+.nav .item .li .dflex{align-items: center;}
+.nav .item .li image{width: 29rpx;height: 27rpx;margin-right: 9rpx;}
+.duihuan{background: linear-gradient(90deg, #FF6070 0%, #FE0419 100%);font-size: 30rpx;color: #fff;width: 200rpx;height: 60rpx;line-height: 60rpx;border-radius: 30rpx;text-align: center;}
+.leiji{font-size: 26rpx;color: #999;margin-top: 20rpx;text-align: center;}
+.leiji text{color: #FD3A31;}
+
+/* 筛选 */
+.cont{padding: 0 30rpx 0;}
+.cont .top{padding: 40rpx 0 30rpx 0;font-size: 26rpx;color: #999999;}
+.filter{padding: 0 20rpx; border-bottom:2rpx solid #E8E8E8 ;}
+.filter1{position: relative;z-index: 100;}
+.filter .li{width: 33.33%;display: flex;display: -webkit-flex;align-items: center;justify-content: center;padding: 25rpx 0;font-size: 30rpx;color: #333;}
+.filter .li.active{color: #FE0419}
+.updown{width: 14rpx;height: 8rpx;margin-left: 9rpx;}
+.cont .pop .item{position: absolute;z-index: 100;background: #fff;width: 100%; border-radius: 0 0 30rpx 30rpx;}
+.cont .pop .item view{padding: 30rpx; justify-content: space-between; align-items: center; font-size: 28rpx;}
+.cont .pop .item image{width: 30rpx;height: 20rpx;}
+.cont .brbtm{border-bottom: 2rpx solid #E8E8E8;}
+.cont .pop .active{color: #FE0419;}
+/* 产品展示 */
+/* .pintuan .li:last-child{margin-bottom: 0;margin-top: 24rpx;} */
+.pintuan{background: #fff;border-radius: 12rpx;}
+.pinimgs{width: 70rpx;height:70rpx;position: relative;padding: 0 20rpx 0 0;}
+.pinimg{display: block;width: 100%;height: 100%;border-radius: 10rpx;}
+.pininfo{flex: 1;}
+.pininfo .proname{font-size: 30rpx;color: #333;}
+/* .pininfo .operate{margin-bottom: 66rpx;} */
+.pininfo .operate .introduce{color: #999999;font-size: 24rpx;margin-top:18rpx}
+.pintuan .li{border-bottom: 1rpx solid rgba(232,232,232,.4);padding: 0 30rpx;}
+.pintuan .li:last-child{border-bottom: none;}
+.pintuan .li .item{align-items: center;padding: 26rpx 0;}
+.yhq{width: 56rpx;height: 56rpx;}
+.pintuan .li .price{text-align: right;}
+.pintuan .li .price .prc{font-size: 36rpx;color: #FE0419;}
+.pintuan .li .price .prc1{font-size: 36rpx;}
+.pintuan .li .price .num{font-size: 24rpx;color: #999999;}
+
+/* 优惠券 */
+.coupon{margin-top: 40rpx; margin-left: 20rpx;}
+.coupon .proname{font-size: 30rpx;color: #333;}
+.coupon .operate{margin-bottom: 66rpx;}
+.coupon .operate .introduce{color: #999999;font-size: 24rpx;margin-top:18rpx}
+.pintuan .li .price .jian {font-size: 34rpx;color: #333333;font-weight: bold;}

+ 268 - 0
integralShop/integralDetailed/index.vue

@@ -0,0 +1,268 @@
+<template>
+<view>
+<!--pages/integralshop/integralDetailed/index.wxml-->
+<view class="banner">
+  <!-- <image src="/integralshop/static/integralshop/images/integralDetailed_bg.png" role="img"></image> -->
+</view>
+<view class="nav">
+  <view class="item dflex">
+    <view class="li flex">
+      <view class="num">{{userIntegral}}</view>
+      <view class="dflex"><!-- <image src="../static/integralshop/images/jfico1.png"></image> --><text class="count">积分余额</text></view>
+    </view>
+	<view class="ir">
+		<view class="duihuan" @tap="goHome">积分兑换</view>
+		<view class="leiji">累计积分:<text>{{cumulativeIntegral}}</text></view>
+	</view>
+    <!-- <view class="li">
+      <view class="num1">{{cumulativeIntegral}}</view>
+      <view class="dflex"><image src="../static/integralshop/images/jfico2.png"></image><text class="count">累计积分</text></view>
+    </view>
+	<view class="li" @tap="goHome">
+	  <view class="num1">{{userIntegral}}</view>
+	  <view class="dflex"><image src="../static/integralshop/images/jfico2.png"></image><text class="count">积分兑换</text></view>
+	</view> -->
+  </view>
+</view>
+
+<view class="cont">
+  <!-- <view class="pop">
+    <view class="filter dflex bgfff">
+      <view class="li {{sort==''?'active':''}}" bindtap="ss" data-v="">默认</view>
+      <view class="li {{sort=='stock'?'active':''}}" bindtap="ss" data-v="stock">时间<image
+          src="/pages/images/integral_down.png" class="updown"></image>
+      </view>
+      <view class="li active" bindtap="ss" data-v="gtPrice">分数<image src="/pages/images/integral_up.png" class="updown">
+        </image>
+      </view>
+    </view>
+    <view class="item">
+      <view class="brbtm dflex active">积分降序<image src="/pages/images/integral_gou.png"></image>
+      </view>
+      <view class="dflex">积分升序<image src="/pages/images/integral_gou.png"></image>
+      </view>
+    </view>
+  </view> -->
+  <!-- <view class="mask"></view> -->
+  <block v-if="pageList.length>0">
+    <view class="top" v-if="pageList.length>0">展示一个月内明细</view>
+  <view class="pintuan">
+    <view v-for="(item, index) in pageList" :key="index" class="li">
+      <view class="dflex item">
+        <view class="pinimgs">
+          <image src="/integralshop/static/integralshop/images/integralOrder.png" mode="aspectFit" class="pinimg" v-if="item.source==2||item.source==21">
+          </image>
+          <image src="/integralshop/static/integralshop/images/integralSign.png" mode="aspectFit" class="pinimg" v-if="item.source==1">
+          </image>
+          <image src="/integralshop/static/integralshop/images/integralDetailed_yhq.png" mode="aspectFit" class="pinimg" v-if="item.source==4||item.source==20"></image>
+            <image src="/integralshop/static/integralshop/images/extension.png" mode="aspectFit" class="pinimg" v-if="item.source==7||item.source==8">
+          </image>
+        </view>
+        <view class="pininfo ">
+          <view class="proname">
+            {{item.source==1?item.note:item.sourceStr}}
+          </view>
+          <view class="operate">
+            <view class="introduce">
+              {{item.createDate}}</view>
+          </view>
+        </view>
+        <view class="price">
+          <view><text :class="item.integralChange>=0?'prc':'prc1'">{{item.integralChange>=0?'+':''}}{{item.integralChange}}</text>
+          </view>
+          <view><text class="num">当前总分{{item.integralAfter}}</text></view>
+          <!-- <view class="btn file" >积分不足</view> -->
+        </view>
+      </view>
+    </view>
+  </view>
+  </block>
+  <block v-if="lastpageList.length>0">
+    <view class="top">展示上个月内明细</view>
+    <view class="pintuan pdlr20">
+      <view v-for="(item, index) in lastpageList" :key="index" class="li">
+        <view class="dflex item">
+          <view class="pinimgs">
+            <image src="/integralshop/static/integralshop/images/integralOrder.png" mode="aspectFit" class="pinimg" v-if="item.source==2||item.source==21">
+          </image>
+          <image src="/integralshop/static/integralshop/images/integralSign.png" mode="aspectFit" class="pinimg" v-if="item.source==1">
+          </image>
+          <image src="/integralshop/static/integralshop/images/integralDetailed_yhq.png" mode="aspectFit" class="pinimg" v-if="item.source==4||item.source==20"></image>
+            <image src="/integralshop/static/integralshop/images/extension.png" mode="aspectFit" class="pinimg" v-if="item.source==7||item.source==8">
+          </image>
+          </view>
+          <view class="pininfo ">
+            <view class="proname">
+              {{item.source==1?item.note:item.sourceStr}}
+            </view>
+            <view class="operate">
+              <view class="introduce">
+                {{item.createDate}}</view>
+            </view>
+          </view>
+          <view class="price">
+            <view><text class="prc">{{item.integralChange>0?'+':''}}{{item.integralChange}}</text></view>
+            <view><text class="num">当前总分{{item.integralAfter}}</text></view>
+          </view>
+        </view>
+      </view>
+    </view>
+  </block>
+  <view class="nodata" v-if="lastpageList.length<1&&pageList.length<1">
+    <image :src="picUrlss+'empty_dd.png'"></image>
+    <text>暂无明细</text>
+  </view>
+  <!-- <view class="pintuan pdlr20">
+    <view class="li">
+      <view class="dflex item">
+        <view class="">
+          <image src="{{item.pic}}" mode="aspectFit" class="pinimg"></image>
+          <image src="/pages/images/integralDetailed_yhq.png" class="yhq"></image>
+        </view>
+        <view class="coupon flex ">
+          <view class="proname">
+            兑换优惠劵
+          </view>
+          <view class="operate">
+            <view class="introduce">
+              活动扣积分 2020-02-25 12:25:36</view>
+          </view>
+        </view>
+        <view class="price dflex">
+          <view><text class="jian">-80</text></view>
+        </view>
+      </view>
+    </view>
+  </view> -->
+</view>
+</view>
+</template>
+
+<script>
+// const { time } = require('console');
+// pages/integralshop/integralDetailed/index.js
+const req = require("../../utils/request.js");
+const util = require("../../utils/util.js");
+
+export default {
+  data() {
+    return {
+		picUrlss: req.public.picUrls,
+      isLoad: true,
+      page: 1,
+      time: "",
+      pageList: "",
+      lastpageList: ""
+    };
+  },
+
+  components: {},
+  props: {},
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {},
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {},
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+    this.getMounth();
+    this.getIntegralList(1);
+    this.getIntegralList(2);
+    this.getIntegral(); // console.log(util.getPreMonth(util.formatTime(new Date()).t2))
+    // console.log(util.formatTime(new Date()))
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {},
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {},
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {},
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {// this.data.page++;
+    // this.getIntegralList(1)
+  }
+  /**
+   * 用户点击右上角分享
+   */
+  // onShareAppMessage: function () {
+  // }
+  ,
+  methods: {
+    // 获取当前月和上个月
+    getMounth() {
+      this.setData({
+        time: util.getPreMonth(util.formatTime(new Date()).t2)
+      });
+      // console.log(this.time);
+    },
+	goHome(){
+		uni.navigateTo({
+		  url: '/integralshop/index/index'
+		});
+	},
+
+    // 获取用户积分
+    getIntegral() {
+      req.getRequest('/api/integral/totalIntegral', {}, res => {
+        // console.log(res);
+        this.setData(res);
+      });
+    },
+
+    // 积分记录 展示当前月的积分
+    getIntegralList(type) {
+      let from = {
+        page: 1,
+        dataTime: '',
+        limit: 1000
+      };
+
+      if (type == 1) {
+        from.dataTime = this.time.t1;
+      } else {
+        from.dataTime = this.time.t2;
+      }
+
+      req.getRequest('/api/integral/list', from, data => {
+        // console.log(data);
+
+        if (type == 1) {
+          this.setData({
+            pageList: data
+          });
+        } else {
+          this.setData({
+            lastpageList: data
+          });
+        }
+
+        // console.log(data);
+      });
+    }
+
+  }
+};
+</script>
+<style>
+@import "./index.css";
+</style>

部分文件因为文件数量过多而无法显示