xhj преди 2 години
ревизия
694993640b
променени са 100 файла, в които са добавени 15191 реда и са изтрити 0 реда
  1. 1 0
      .gitignore
  2. 28 0
      .hbuilderx/launch.json
  3. 842 0
      App.vue
  4. 0 0
      README.md
  5. 308 0
      action_sdk/ReqBase.js
  6. 529 0
      action_sdk/actionTemplete.js
  7. 263 0
      action_sdk/actionsdk-1.0.0.js
  8. 160 0
      action_sdk/readme.md
  9. 267 0
      action_sdk_copy/ReqBase.js
  10. 186 0
      action_sdk_copy/actionsdk-1.0.0.js
  11. 114 0
      activity/bargain/detail/detail.css
  12. 1493 0
      activity/bargain/detail/detail.vue
  13. 25 0
      activity/bargain/index/index.css
  14. 341 0
      activity/bargain/index/index.vue
  15. 74 0
      activity/bargain/kjDetail/kjDetail.css
  16. 574 0
      activity/bargain/kjDetail/kjDetail.vue
  17. 23 0
      activity/content/content.css
  18. 145 0
      activity/content/content.vue
  19. 141 0
      activity/group/detail/detail.css
  20. 1558 0
      activity/group/detail/detail.vue
  21. 28 0
      activity/group/index/index.css
  22. 362 0
      activity/group/index/index.vue
  23. 58 0
      activity/group/ptDetail/ptDetail.css
  24. 449 0
      activity/group/ptDetail/ptDetail.vue
  25. 96 0
      activity/newbornDetails/newbornDetails.css
  26. 1248 0
      activity/newbornDetails/newbornDetails.vue
  27. 57 0
      activity/newbornZone/newbornZone.css
  28. 310 0
      activity/newbornZone/newbornZone.vue
  29. 123 0
      activity/seckill/seckill.css
  30. 585 0
      activity/seckill/seckill.vue
  31. 113 0
      activity/seckillDetails/seckillDetails.css
  32. 1177 0
      activity/seckillDetails/seckillDetails.vue
  33. BIN
      activity/static/activity/images/cha.png
  34. BIN
      activity/static/activity/images/clock2.png
  35. BIN
      activity/static/activity/images/guarantee.png
  36. BIN
      activity/static/activity/images/kanjia.png
  37. BIN
      activity/static/activity/images/kanle1.png
  38. BIN
      activity/static/activity/images/kanle2.png
  39. BIN
      activity/static/activity/images/rednaozhong.png
  40. BIN
      activity/static/activity/images/seckill.png
  41. BIN
      activity/static/activity/images/seckillDetails.png
  42. BIN
      activity/static/activity/images/share_pintuan.jpg
  43. BIN
      activity/static/activity/images/xrzx.png
  44. BIN
      activity/static/activity/images/xrzxbg.png
  45. 381 0
      app.css
  46. 112 0
      card/components/shmily-drag-image/README.md
  47. 10 0
      card/components/shmily-drag-image/changelog.md
  48. 591 0
      card/components/shmily-drag-image/components/shmily-drag-image/shmily-drag-image.vue
  49. 84 0
      card/components/shmily-drag-image/package.json
  50. 123 0
      card/components/wangding-pickerAddress/wangding-pickerAddress.vue
  51. 23 0
      card/create/create.css
  52. 329 0
      card/create/create.vue
  53. 7 0
      card/editDesc/editDesc.css
  54. 108 0
      card/editDesc/editDesc.vue
  55. 1 0
      card/imgList/index.css
  56. 62 0
      card/imgList/index.vue
  57. 64 0
      card/index/index.css
  58. 719 0
      card/index/index.vue
  59. 9 0
      card/industry/industry.css
  60. 96 0
      card/industry/industry.vue
  61. 8 0
      card/not/not.css
  62. 62 0
      card/not/not.vue
  63. 141 0
      card/poster/poster.css
  64. 443 0
      card/poster/poster.vue
  65. BIN
      card/static/images/add.png
  66. BIN
      card/static/images/add_ico1.png
  67. BIN
      card/static/images/bg.png
  68. BIN
      card/static/images/bico1.png
  69. BIN
      card/static/images/bj_ico.png
  70. BIN
      card/static/images/car_p_bg.png
  71. BIN
      card/static/images/card_ico1.png
  72. BIN
      card/static/images/card_ico2.png
  73. BIN
      card/static/images/card_ico3.png
  74. BIN
      card/static/images/card_ico4.png
  75. BIN
      card/static/images/card_logo_bg.png
  76. BIN
      card/static/images/code.png
  77. BIN
      card/static/images/edit.png
  78. BIN
      card/static/images/fx_ico.png
  79. BIN
      card/static/images/hb_ico1.png
  80. BIN
      card/static/images/hb_ico2.png
  81. BIN
      card/static/images/jia.png
  82. BIN
      card/static/images/jj_ico.png
  83. BIN
      card/static/images/like_h.png
  84. BIN
      card/static/images/message.png
  85. BIN
      card/static/images/phone.png
  86. BIN
      card/static/images/poster_bg.png
  87. BIN
      card/static/images/rqico.png
  88. BIN
      card/static/images/sc_ico.png
  89. BIN
      card/static/images/sj_ico.png
  90. BIN
      card/static/images/sp_ico.png
  91. BIN
      card/static/images/tp_ico.png
  92. BIN
      card/static/images/wap_logo.png
  93. BIN
      card/static/images/wechat.png
  94. BIN
      card/static/images/wxth.png
  95. BIN
      card/static/images/yin_l.png
  96. BIN
      card/static/images/yin_r.png
  97. BIN
      card/static/images/zan_ico.png
  98. 4 0
      chat/chatroom/chatroom.css
  99. 100 0
      chat/chatroom/chatroom.vue
  100. 36 0
      chat/components/chat/chat.css

+ 1 - 0
.gitignore

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

+ 28 - 0
.hbuilderx/launch.json

@@ -0,0 +1,28 @@
+{ // 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": [{
+     	"app-plus" : 
+     	{
+     		"launchtype" : "remote"
+     	},
+     	"default" : 
+     	{
+     		"launchtype" : "remote"
+     	},
+     	"mp-alipay" : 
+     	{
+     		"launchtype" : "remote"
+     	},
+     	"mp-toutiao" : 
+     	{
+     		"launchtype" : "remote"
+     	},
+     	"mp-weixin" : 
+     	{
+     		"launchtype" : "remote"
+     	},
+     	"type" : "uniCloud"
+     }
+    ]
+}

+ 842 - 0
App.vue

@@ -0,0 +1,842 @@
+<script>
+	//app.js
+	const req = require("./utils/request.js");
+	// // #ifndef H5
+	// let livePlayer = requirePlugin('live-player-plugin')
+	// // #endif
+	// import _chunkArr from './hxChatSDK/utils/chunkArr';
+	// let WebIM = (wx.WebIM = require("./hxChatSDK/utils/WebIM")["default"]);
+	// let msgStorage = require("./chat/components/chat/msgstorage");
+	// let msgType = require("./chat/components/chat/msgtype");
+	// let disp = require("./hxChatSDK/utils/broadcast");
+	// let logout = false;
+
+	// import {
+	// 	onGetSilentConfig
+	// } from './chat/components/chat/pushStorage'
+	export default {
+		onLaunch: function(options) {
+			//拉取模板配置自定义详细
+			if (wx.getExtConfig) {
+				wx.getExtConfig({
+					success(res) {
+						console.log(res.extConfig)
+						if (res.extConfig && res.extConfig.NODE_ENV) {
+							req.env.NODE_ENV = res.extConfig.NODE_ENV;
+						}
+
+						if (res.extConfig && res.extConfig.authAppId) {
+							req.setStorage('appId', res.extConfig.authAppId)
+						}
+
+					}
+				})
+			}
+			req.removeStorage('isShowUpdateMobile')
+			req.removeStorage('isShowUpdateInfo')
+
+			let scene = options.scene;
+			req.setStorage('scene', 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)
+				}
+			})
+			this.globalData.InitUpdateManager();
+			this.globalData.getChatList();
+			this.globalData.upColor()
+			// #ifndef APP-PLUS
+			uni.hideTabBar()
+			// #endif
+			// req.getWebchatAppId();
+
+			// var me = this;
+			// var logs = uni.getStorageSync("logs") || [];
+			// logs.unshift(Date.now());
+			// uni.setStorageSync("logs", logs);
+
+			// disp.on("em.main.ready", function() {
+			// 	calcUnReadSpot();
+			// });
+			// disp.on("em.chatroom.leave", function() {
+			// 	calcUnReadSpot();
+			// });
+			// disp.on("em.chat.session.remove", function() {
+			// 	calcUnReadSpot();
+			// });
+			// disp.on("em.chat.audio.fileLoaded", function() {
+			// 	calcUnReadSpot();
+			// });
+			// disp.on("em.main.deleteFriend", function() {
+			// 	calcUnReadSpot();
+			// });
+			// disp.on("em.chat.audio.fileLoaded", function() {
+			// 	calcUnReadSpot();
+			// }); //
+			// disp.on("em.mian.profile.update", function() {
+			// 	me.fetchUserInfoWithLoginId()
+			// });
+			// disp.on("em.mian.friendProfile.update", function() {
+			// 	me.fetchFriendInfoFromServer()
+			// });
+			// WebIM.conn.listen({
+			// 	onOpened(message) {
+			// 		console.log('监听onOpened>>>>>', message);
+
+			// 		if (
+			// 			getCurrentRoute() == "pages/user/user" ||
+			// 			getCurrentRoute() == "pages/login_token/login_token"
+			// 		) {
+			// 			me.globalData.onLoginSuccess(
+			// 				uni.getStorageSync("myUsername")
+			// 			);
+			// 		}
+			// 	},
+
+			// 	onReconnect() {
+			// 		uni.showToast({
+			// 			title: "重连中...",
+			// 			duration: 2000,
+			// 		});
+			// 	},
+
+			// 	onSocketConnected() {
+			// 		uni.showToast({
+			// 			title: "socket连接成功",
+			// 			duration: 2000,
+			// 		});
+			// 	},
+
+			// 	onClosed() {
+			// 		// uni.showToast({
+			// 		// 	title: "退出登录",
+			// 		// 	icon: "none",
+			// 		// 	duration: 2000,
+			// 		// });
+			// 		console.log('>>>>>>>>>>>IM被退出登录>>>>>>>>>>>>>>>>>')
+			// 		// uni.redirectTo({
+			// 		// 	url: "../login/login",
+			// 		// });
+			// 		me.globalData.conn.closed = true;
+			// 		me.globalData.conn.isLoginIM = false;
+			// 		WebIM.conn.close();
+			// 	},
+
+			// 	onInviteMessage(message) {
+			// 		me.globalData.saveGroupInvitedList.push(message);
+			// 		disp.fire("em.invite.joingroup", message);
+			// 	},
+
+			// 	onReadMessage(message) {
+			// 		//console.log('已读', message)
+			// 	},
+
+			// 	//onPresence为旧版 ,建议参考最新增删好友api文档 :http://docs-im.easemob.com/im/web/basics/buddy
+			// 	onPresence(message) {
+			// 		switch (message.type) {
+			// 			case "unsubscribe":
+			// 				break;
+			// 				// 好友邀请列表
+			// 			case "subscribe":
+			// 				for (let i = 0; i < me.globalData.saveFriendList.length; i++) {
+			// 					if (me.globalData.saveFriendList[i].from === message.from) {
+			// 						me.globalData.saveFriendList[i] = message;
+			// 						disp.fire("em.subscribe");
+			// 						return;
+			// 					}
+			// 				}
+			// 				msgStorage.saveReceiveMsg(message, "INFORM"); //存添加好友消息,方便展示通知
+			// 				me.globalData.saveFriendList.push(message);
+			// 				disp.fire("em.subscribe");
+			// 				break;
+			// 			case "subscribed":
+			// 				uni.showToast({
+			// 					title: "添加成功",
+			// 					duration: 1000,
+			// 				});
+			// 				disp.fire("em.subscribed");
+			// 				break;
+			// 			case "unsubscribed":
+			// 				disp.fire("em.unsubscribed", message);
+			// 				break;
+			// 			case "direct_joined":
+			// 				saveGroups();
+			// 				uni.showToast({
+			// 					title: "已进群",
+			// 					duration: 1000,
+			// 				});
+			// 				break;
+			// 			case "memberJoinPublicGroupSuccess":
+			// 				saveGroups();
+			// 				uni.showToast({
+			// 					title: "已进群",
+			// 					duration: 1000,
+			// 				});
+			// 				break;
+			// 			case "invite":
+			// 				// 防止重复添加
+			// 				for (
+			// 					let i = 0; i < me.globalData.saveGroupInvitedList.length; i++
+			// 				) {
+			// 					if (me.globalData.saveGroupInvitedList[i].from === message.from) {
+			// 						me.globalData.saveGroupInvitedList[i] = message;
+			// 						disp.fire("em.invite.joingroup");
+			// 						return;
+			// 					}
+			// 				}
+			// 				me.globalData.saveGroupInvitedList.push(message);
+			// 				msgStorage.saveReceiveMsg(message, "INFORM"); //存添加好友消息,方便展示通知
+			// 				disp.fire("em.invite.joingroup");
+			// 				break;
+			// 			case "unavailable":
+			// 				disp.fire("em.contacts.remove");
+			// 				disp.fire("em.group.leaveGroup", message);
+			// 				break;
+			// 			case "deleteGroupChat":
+			// 				disp.fire("em.invite.deleteGroup", message);
+			// 				break;
+			// 			case "leaveGroup":
+			// 				disp.fire("em.group.leaveGroup", message);
+			// 				break;
+			// 			case "removedFromGroup":
+			// 				disp.fire("em.group.leaveGroup", message);
+			// 				break;
+			// 			default:
+			// 				break;
+			// 		}
+			// 	},
+
+			// 	onRoster(message) {},
+
+			// 	onVideoMessage(message) {
+			// 		console.log("onVideoMessage: ", message);
+			// 		if (message) {
+			// 			msgStorage.saveReceiveMsg(message, msgType.VIDEO);
+			// 		}
+			// 		calcUnReadSpot(message);
+			// 		ack(message);
+			// 		onGetSilentConfig(message);
+			// 	},
+
+			// 	onAudioMessage(message) {
+			// 		console.log("onAudioMessage", message);
+			// 		if (message) {
+			// 			if (onMessageError(message)) {
+			// 				msgStorage.saveReceiveMsg(message, msgType.AUDIO);
+			// 			}
+			// 			calcUnReadSpot(message);
+			// 			ack(message);
+			// 			onGetSilentConfig(message);
+			// 		}
+			// 	},
+
+			// 	onCmdMessage(message) {
+			// 		console.log("onCmdMessage", message);
+			// 		if (message) {
+			// 			if (onMessageError(message)) {
+			// 				msgStorage.saveReceiveMsg(message, msgType.CMD);
+			// 			}
+			// 			calcUnReadSpot(message);
+			// 			ack(message);
+			// 			onGetSilentConfig(message);
+			// 		}
+			// 	},
+
+			// 	onTextMessage(message) {
+			// 		console.log("onTextMessage", message);
+
+			// 		if (message) {
+			// 			if (onMessageError(message)) {
+			// 				msgStorage.saveReceiveMsg(message, msgType.TEXT);
+			// 			}
+
+			// 			calcUnReadSpot(message);
+			// 			ack(message);
+			// 			onGetSilentConfig(message);
+			// 		}
+			// 	},
+
+			// 	onEmojiMessage(message) {
+			// 		console.log("onEmojiMessage", message);
+			// 		if (message) {
+			// 			if (onMessageError(message)) {
+			// 				msgStorage.saveReceiveMsg(message, msgType.EMOJI);
+			// 			}
+			// 			calcUnReadSpot(message);
+			// 			ack(message);
+			// 			onGetSilentConfig(message);
+			// 		}
+			// 	},
+
+			// 	onPictureMessage(message) {
+			// 		console.log("onPictureMessage", message);
+			// 		if (message) {
+			// 			if (onMessageError(message)) {
+			// 				msgStorage.saveReceiveMsg(message, msgType.IMAGE);
+			// 			}
+			// 			calcUnReadSpot(message);
+			// 			ack(message);
+			// 			onGetSilentConfig(message);
+			// 		}
+			// 	},
+
+			// 	onFileMessage(message) {
+			// 		console.log("onFileMessage", message);
+			// 		if (message) {
+			// 			if (onMessageError(message)) {
+			// 				msgStorage.saveReceiveMsg(message, msgType.FILE);
+			// 			}
+			// 			calcUnReadSpot(message);
+			// 			ack(message);
+			// 			onGetSilentConfig(message);
+			// 		}
+			// 	},
+
+			// 	// 各种异常
+			// 	onError(error) {
+			// 		console.log(error); // 16: server-side close the websocket connection
+			// 		if (error.type == WebIM.statusCode.WEBIM_CONNCTION_OPEN_ERROR) {
+			// 			uni.hideLoading();
+			// 			disp.fire("em.error.passwordErr");
+			// 		}
+			// 		if (error.type == WebIM.statusCode.WEBIM_CONNCTION_AUTH_ERROR) {
+			// 			uni.hideLoading();
+			// 			disp.fire("em.error.tokenErr");
+			// 		}
+
+			// 		if (error.type == "socket_error") {
+			// 			///sendMsgError
+			// 			console.log("socket_errorsocket_error", error);
+			// 			uni.showToast({
+			// 				title: "网络已断开",
+			// 				icon: "none",
+			// 				duration: 2000,
+			// 			});
+			// 			disp.fire("em.error.sendMsgErr", error);
+			// 		}
+			// 	},
+			// });
+		},
+		onShow(options) {
+			// #ifdef MP-WEIXIN
+			uni.hideHomeButton();
+			// #endif
+			// // #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
+			// console.log('调用了this.globalData.conn.isLoginIM>>>>>', this.globalData.conn.isLoginIM);
+			//记录已经是登录状态,并且检测到被断开
+			let config = JSON.parse(req.getStorage('configRes'));
+			// if (this.globalData.conn.isLoginIM && !WebIM.conn.isOpened()) {
+			// 	console.log('执行重连逻辑>>>')
+			// 	// WebIM.conn.close();
+			// 	//增加延时目的是为了,确保连接完全断开再去执行重新openIM操作
+			// 	setTimeout(() => {
+			// 		if (config) {
+			// 			if (config.is_not_open_im != 1) req.initIMChat();
+			// 		} else {
+			// 			req.getRequest('/api/config', {}, data => {
+			// 				if (data.is_not_open_im != 1) req.initIMChat();
+			// 			})
+			// 		}
+			// 	}, 500)
+			// } else {
+			// 	console.log('不需要执行重新登陆')
+			// }
+		},
+		globalData: {
+			phoneNumber: '',
+			unReadMessageNum: 0,
+			userInfo: null,
+			// userInfoFromServer: null, //用户属性从环信服务器获取
+			// friendUserInfoMap: new Map(), //好友属性
+			// saveFriendList: [],
+			// saveGroupInvitedList: [],
+			// isIPX: false, //是否为iphone X
+			// conn: {
+			// 	isLoginIM: false,
+			// 	closed: false,
+			// 	curOpenOpt: {},
+			// 	open(opt) {
+			// 		// uni.showLoading({
+			// 		// 	title: "加载中...",
+			// 		// 	mask: true,
+			// 		// });
+			// 		this.curOpenOpt = opt;
+			// 		const me = this;
+			// 		WebIM.conn.open(opt).then(() => {
+			// 			//token获取成功,即可开始请求用户属性。
+			// 			disp.fire("em.mian.profile.update");
+			// 			disp.fire("em.mian.friendProfile.update");
+			// 			me.isLoginIM = true;
+			// 			console.log('>>>>>token成功=', me.isLoginIM);
+			// 		}).catch((err) => {
+			// 			console.log('>>>>>token获取失败', err)
+			// 		});
+			// 		this.closed = false;
+			// 	},
+
+			// 	reopen() {
+			// 		if (this.closed) {
+			// 			//this.open(this.curOpenOpt);
+			// 			WebIM.conn.open(this.curOpenOpt);
+			// 			this.closed = false;
+			// 		}
+			// 	},
+			// },
+			// onLoginSuccess: function(myName) {
+			// 	// uni.hideLoading();
+			// 	uni.navigateTo({
+			// 		url: "/chat/conversation/conversation?myName=" + myName,
+			// 	});
+			// },
+			getUserInfo(cb) {
+				var me = this;
+				if (this.userInfo) {
+					typeof cb == "function" && cb(this.userInfo);
+				} else {
+					// 调用登录接口
+					uni.login({
+						success() {
+							uni.getUserInfo({
+								success(res) {
+									me.userInfo = res.userInfo;
+									typeof cb == "function" && cb(me.userInfo);
+								},
+							});
+						},
+					});
+				}
+			},
+			// 更新配色方案
+			upColor(isUpdata) {
+				return new Promise((r, j) => {
+					let configRes = req.getStorage('configRes')
+					if (configRes && !isUpdata) {
+						configRes = JSON.parse(configRes)
+						if (configRes && configRes.mainColor) {
+							try {
+								this.mainStyle = JSON.parse(configRes.mainColor)
+							} catch (e) {
+								this.mainStyle = null
+							}
+						} else {
+							this.mainStyle = null
+						}
+						r()
+					} else {
+						req.getRequest('/api/config', {}, data => {
+							if (data) req.setStorage('configRes', JSON.stringify(data));
+							console.log('upColor', data)
+							if (data && data.mainColor) {
+								try {
+									this.mainStyle = JSON.parse(data.mainColor)
+									console.log('mainStyle', this.mainStyle)
+								} catch (e) {
+									//TODO handle the exception
+									console.log('mainStyle catch', this.mainStyle)
+									this.mainStyle = null
+								}
+							} else {
+								this.mainStyle = null
+							}
+							r()
+						});
+					}
+				})
+			},
+			//获取客服配置
+			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;
+			},
+
+			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);
+				//   }
+				// })
+				// #ifdef MP-WEIXIN
+				this.getSessionKey(success);
+				// #endif
+
+			},
+
+			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,
+			mainStyle: {},
+
+			/**
+			 * 打开新页面
+			 */
+			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}`
+				});
+			},
+
+			/**
+			 * 返回首页
+			 */
+			openHome() {
+				var url = '/pages/tabBar/index?appId=' + req.getStorage('appId');
+				uni.reLaunch({
+					url: url
+				});
+			},
+
+			/**
+			 * 
+			 * 关闭所有页面,打开到应用内的某个页面
+			 */
+			reLaunchTo(path) {
+				uni.reLaunch({
+					url: `/${path}`
+				});
+			},
+
+			/**
+			 * 
+			 * 保留当前页面,跳转到应用内的某个页面
+			 */
+			navigateTo(path) {
+				uni.navigateTo({
+					url: `/${path}`
+				});
+			},
+			clickBanner(params) {
+				console.log('params==', params.type)
+				var dt = params
+				var url = "";
+				var id = "";
+				var acid = "";
+				if (dt.content != "") {
+					let conunt = dt.content.split("_");
+					id = conunt[1];
+					acid = conunt[0];
+				}
+
+				if (dt.type * 1 == 2 && dt.content != "") {
+					url = "product/detail/detail?id=" + dt.content;
+				} else if (dt.type * 1 == 4) {
+					url = "product/groupDetail/groupDetail?acid=" + acid + "&id=" + id;
+				} else if (dt.type * 1 == 5) {
+					url = "product/couponList/index";
+				} else if (dt.type * 1 == 6) {
+					url = "service/live/live";
+				} else if (dt.type * 1 == 7) {
+					url = "product/groupList/groupList";
+				} else if (dt.type * 1 == 9 && dt.content != "") {
+					url = "product/list/list?id=" + dt.content;
+				} else if (dt.type * 1 == 10) {
+					url = "plugin-private://wx2b03c6e691cd7370/pages/live-player-plugin?room_id=" + dt.content;
+					// console.log(
+					// url); // url=`plugin-private://wx2b03c6e691cd7370/pages/live-player-plugin?room_id=${dt.content}`
+				} else if (dt.type * 1 == 11) {
+					url = "activity/group/index/index";
+				} else if (dt.type * 1 == 12) {
+					url = "activity/seckill/seckill";
+				} else if (dt.type * 1 == 13) {
+					url = "activity/bargain/index/index";
+				} else if (dt.type * 1 == 14) {
+					url = "activity/newbornZone/newbornZone";
+				} else if (dt.type * 1 == 15 && dt.content != "") {
+					url = "activity/newbornDetails/newbornDetails?acid=" + acid + "&id=" + id;
+				} else if (dt.type * 1 == 16 && dt.content != "") {
+					url = "activity/seckillDetails/seckillDetails?acid=" + acid + "&id=" + id;
+				} else if (dt.type * 1 == 17 && dt.content != "") {
+					url = "activity/bargain/detail/detail?acid=" + acid + "&id=" + id;
+				} else if (dt.type * 1 == 18 && dt.content != "") {
+					url = "activity/group/detail/detail?acid=" + acid + "&id=" + id;
+				} else if (dt.type * 1 == 19 && dt.content != "") { //文章内容
+					url = "activity/content/content?id=" + dt.content + "&type=" + 1; //1为普通文章内容
+				} else if (dt.type * 1 == 3 && dt.content != "") { //外链类型
+					url = dt.content; //1为普通文章内容
+				} else if (dt.type * 1 == 22) { //团购广场
+					url = "group/index/index";
+				} else if (dt.type * 1 == 23 && dt.content != "") { //团购商品详情
+					let content = JSON.parse(dt.content)
+					url = "product/detail/detail?id=" + content.productId + '&groupId=' + content.groupId;
+				} else if (dt.type * 1 == 24) { //课程列表
+					url = "course/list/index";
+				} else if (dt.type * 1 == 25 && dt.content != "") { //课程详情
+					url = "course/detail/index?id=" + dt.content;
+				} else {
+					url = "";
+				}
+				if (dt.type * 1 == 6) this.switchTab(url);
+				else this.openPage(url);
+			}
+
+		},
+		methods: {
+			async fetchUserInfoWithLoginId() {
+				const userId = await uni.WebIM.conn.user;
+				if (userId) {
+					try {
+						const {
+							data
+						} = await uni.WebIM.conn.fetchUserInfoById(userId)
+						this.globalData.userInfoFromServer = Object.assign({}, data[userId]);
+					} catch (error) {
+						console.log(error)
+						// uni.showToast({
+						// 	title: "用户属性获取失败",
+						// 	icon: "none",
+						// 	duration: 2000,
+						// })
+					}
+
+				}
+			},
+			async fetchFriendInfoFromServer() {
+				let friendList = []
+				try {
+					const res = await uni.WebIM.conn.getContacts()
+					friendList = Object.assign([], res?.data)
+					if (friendList.length && friendList.length < 99) {
+						const {
+							data
+						} = await uni.WebIM.conn.fetchUserInfoById(friendList)
+						this.setFriendUserInfotoMap(data)
+					} else {
+						let newArr = _chunkArr(friendList, 99)
+						for (let i = 0; i < newArr.length; i++) {
+							const {
+								data
+							} = await uni.WebIM.conn.fetchUserInfoById(newArr[i])
+							this.setFriendUserInfotoMap(data)
+						}
+					}
+				} catch (error) {
+					console.log(error)
+					// uni.showToast({
+					// 	title: "用户属性获取失败",
+					// 	icon: "none"
+					// })
+				}
+
+			},
+			setFriendUserInfotoMap(data) {
+				if (Object.keys(data).length) {
+					for (const key in data) {
+						if (Object.hasOwnProperty.call(data, key)) {
+							const values = data[key];
+							Object.values(values).length && this.globalData.friendUserInfoMap.set(key, values);
+						}
+					}
+				}
+			}
+		}
+	};
+
+
+	/*--------环信SDK消息-----------------------*/
+
+	function ack(receiveMsg) {
+		// 处理未读消息回执
+		var bodyId = receiveMsg.id; // 需要发送已读回执的消息id
+
+		var ackMsg = new WebIM.message("read", WebIM.conn.getUniqueId());
+		ackMsg.set({
+			id: bodyId,
+			to: receiveMsg.from,
+		});
+		WebIM.conn.send(ackMsg.body);
+	}
+
+	function onMessageError(err) {
+		if (err.type === "error") {
+			uni.showToast({
+				title: err.errorText,
+			});
+			return false;
+		}
+
+		return true;
+	}
+
+	function getCurrentRoute() {
+		let pages = getCurrentPages();
+		if (pages.length > 0) {
+			let currentPage = pages[pages.length - 1];
+			return currentPage.route;
+		}
+		return "/";
+	}
+
+	// 包含陌生人版本
+	//该方法用以计算本地存储消息的未读总数。
+	function calcUnReadSpot(message) {
+		// let myName = uni.getStorageSync("myUsername");
+		// let pushObj = uni.getStorageSync("pushStorageData")
+		// let pushAry = pushObj[myName] || []
+		// uni.getStorageInfo({
+		// 	success: function(res) {
+		// 		let storageKeys = res.keys;
+		// 		let newChatMsgKeys = [];
+		// 		let historyChatMsgKeys = [];
+		// 		storageKeys.forEach((item) => {
+		// 			if (item.indexOf(myName) > -1 && item.indexOf("rendered_") == -1 && item.indexOf(
+		// 					"imUserInfo_") == -1) {
+		// 				newChatMsgKeys.push(item);
+		// 			}
+		// 		});
+
+		// 		console.log('newChatMsgKeys》》》》》', newChatMsgKeys);
+
+		// 		let count = newChatMsgKeys.reduce(function(result, curMember, idx) {
+		// 			let newName = curMember.split(myName)[0]
+		// 			let chatMsgs;
+		// 			chatMsgs = uni.getStorageSync(curMember) || [];
+		// 			console.log('chatMsgs>>>>>', chatMsgs);
+		// 			//过滤消息来源与当前登录ID一致的消息,不计入总数中。
+		// 			chatMsgs = chatMsgs.filter((msg) => msg.yourname !== myName);
+		// 			if (pushAry.includes(newName)) return result
+		// 			return result + chatMsgs.length;
+		// 		}, 0);
+		// 		getApp().globalData.unReadMessageNum = count;
+
+		// 		disp.fire("em.unreadspot", message);
+		// 	},
+		// });
+	}
+
+	function saveGroups() {
+		var me = this;
+		return WebIM.conn.getGroup({
+			limit: 50,
+			success: function(res) {
+				uni.setStorage({
+					key: "listGroup",
+					data: res.data,
+				});
+			},
+			error: function(err) {
+				console.log(err);
+			},
+		});
+	}
+</script>
+<style>
+	@import "./app.css";
+</style>

+ 0 - 0
README.md


+ 308 - 0
action_sdk/ReqBase.js

@@ -0,0 +1,308 @@
+const req = require('../utils/request.js')
+const env = {
+	NODE_ENV: req.env.NODE_ENV=='dev'?'dev':req.env.NODE_ENV=='prd'?'product':'lo',
+	dev: { //测试环境
+		apiUrl: 'https://apitest.zhiqiyun.com',
+	},
+	product: { //生产环境
+		apiUrl: 'https://apimall.zhiqiyun.com',
+	},
+	
+	lo: { //生产环境
+		apiUrl: 'http://192.168.110.180:8078',
+	}
+}
+
+class ReqBase {
+	/**
+	 * 构造函数
+	 * @param {Object} options 接口参数,appId 为必选参数
+	 */
+	constructor(options) {
+		console.log('ReqBase sdk:', options);
+		// if (!options.appId) {
+		// 	throw Error('appId值不能为空');
+		// }
+		// this.appId = options.appId;
+		this.appId = options.appId;
+		this.getSystemInfo();
+	}
+
+	/*
+	 * 获取token
+	 */
+	getToken(url, success) {
+		let token = '';
+		var dataP = {};
+		var header = {};
+		token = this.getStorage('ACTION_TOKEN');
+		dataP = {};
+		header.appId = this.appId;
+		header['content-type'] = 'application/json;charset=UTF-8';
+		if (token) {
+			header.authorityToken = token;
+			success.call(this, token);
+			return false;
+		} else {
+			this.loadToken(header, dataP, data => {
+				success.call(this, data);
+			});
+		}
+	}
+
+	loadToken(header, dataP, success) {
+		let that = this
+		uni.request({
+			url: env[env.NODE_ENV].apiUrl + '/api/access_token',
+			data: dataP,
+			method: 'get',
+			header: header,
+			success(json) {
+				if (json.statusCode !== 200) {
+					console.log('ACTION_TOKEN 获取失败>>>>>', json.data.message);
+					return;
+				}
+				var token = json.data.data;
+				that.setStorage('ACTION_TOKEN', token);
+				success.call(that, token);
+			},
+			fail(res) {
+				console.log('ACTION_TOKEN 获取失败>>>>>', res);
+			}
+		})
+	}
+
+	clearValueEmpty(data) {
+		let keyValue = {};
+		for (let key in data) {
+			let value = typeof data[key];
+			if (value == 'string' && value) {
+				if (data[key] != 'undefined' || data[key] != " " || data[key] != undefined || data[key] != null) {
+					if (data[key] != '') {
+						keyValue[key] = data[key];
+					}
+				}
+				if (data[key] != '') {
+					keyValue[key] = data[key];
+				}
+			} else if (value == 'number' && value != null) {
+				keyValue[key] = data[key];
+			} else if (value == 'boolean') {
+				keyValue[key] = data[key];
+			} else {
+				if (data[key]) keyValue[key] = data[key];
+			}
+		}
+		return keyValue;
+	}
+
+	/**
+	 * 公共请求
+	 * 
+	 * @param {*} url  请求url
+	 * @param {*} data 请求参数
+	 * @param {*} method 请求方法
+	 * @param {*} success 成功函数
+	 * @param {*} isLoad 是否显示加载提示
+	 */
+	baseRequest(url, data, method, success) {
+		var header = {};
+		var deviceInfo = this.getStorage('deviceInfo');
+		// #ifdef APP-PLUS
+		var sysMac = this.getStorage('sysMac');
+		// #endif
+		var device_info = {};
+		if (deviceInfo) {
+			data.browser = deviceInfo.browserName;
+			data.browserVersion = deviceInfo.browserVersion;
+			data.manufacturer = deviceInfo.deviceBrand;
+			data.model = deviceInfo.deviceModel;
+			data.deviceId = deviceInfo.deviceId;
+			data.os = deviceInfo.osName;
+			data.osVersion = deviceInfo.osVersion;
+			// #ifdef APP-PLUS
+			if (sysMac) {
+				data.sysMac = sysMac;
+			}
+			// #endif
+		}
+		var dataP = {
+			uri: url,
+			code: 'sys.behavior.service',
+			body: data
+		}
+		this.getToken(url, token => {
+			header.authorityToken = token;
+			header.appId = this.appId;
+			header['content-type'] = 'application/json;charset=UTF-8';
+			uni.request({
+				url: env[env.NODE_ENV].apiUrl + '/api/v3/application/public',
+				data: this.clearValueEmpty(dataP),
+				method: method,
+				header: header,
+				success(json) {
+					if (json.statusCode !== 200) {
+						console.log('action sdk error:', json.data.message);
+						success.call(this, -1);//接口异常返回-1,不影响其他应用
+						return;
+					}
+					if (json.data.code !== 0) {
+						console.log('action sdk error:', json.data.msg);
+						success.call(this, -1);//接口异常返回-1,不影响其他应用
+						return;
+					}
+					let dataR = json.data.data;
+					if (typeof dataR === 'string' && dataR.indexOf("{") === 0) {
+						dataR = JSON.parse(dataR);
+					}
+					success.call(this, dataR);
+				},
+				fail() {
+
+				}
+			})
+		})
+	}
+
+	/**GET请求 */
+	getRequest(url, data, success) {
+		this.baseRequest(url, data, 'get', success);
+	}
+
+	/**POST请求 */
+	postRequest(url, data, success) {
+		this.baseRequest(url, data, 'post', success);
+	}
+	
+	/**GET请求 请求api项目 */
+	getRequestAPI(url, data, success, isLoad){
+		this.baseRequestAPI(url, data, 'get', success, isLoad);
+	}
+	
+	/**
+	 * 公共请求 请求api项目
+	 * 
+	 * @param {*} url  请求url
+	 * @param {*} data 请求参数
+	 * @param {*} method 请求方法
+	 * @param {*} success 成功函数
+	 * @param {*} isLoad 是否显示加载提示
+	 */
+	baseRequestAPI(url, data, method, success) {
+		var header = {};
+		this.getToken(url, token => {
+			header.authorityToken = token;
+			header.appId = this.appId;
+			if (url.indexOf('/v3') != -1 || url.indexOf('/paper/create') != -1) {
+				header['content-type'] = 'application/json;charset=UTF-8'
+			} else {
+				header['content-type'] = 'application/x-www-form-urlencoded'
+			}
+			uni.request({
+				url: env[env.NODE_ENV].apiUrl + url,
+				data: this.clearValueEmpty(data),
+				method: method,
+				header: header,
+				success(json) {
+					if (json.statusCode !== 200) {
+						console.log('action sdk error:', json.data.message);
+						success.call(this, -1);//接口异常返回-1,不影响其他应用
+						return;
+					}
+					if (json.data.code !== 0) {
+						console.log('action sdk error:', json.data.msg);
+						success.call(this, -1);//接口异常返回-1,不影响其他应用
+						return;
+					}
+					let dataR = json.data.data;
+					if (typeof dataR === 'string' && dataR.indexOf("{") === 0) {
+						dataR = JSON.parse(dataR);
+					}
+					success.call(this, dataR);
+				},
+				fail() {
+	
+				}
+			})
+		})
+	}
+	
+	setStorage(key, value, expire = 0) {
+		let obj = {
+			data: value, //存储的数据
+			time: Date.now() / 1000, //记录存储的时间戳
+			expire: expire //记录过期时间,单位秒
+		}
+		uni.setStorageSync(env.NODE_ENV + "_" + key, JSON.stringify(obj))
+	}
+
+	getStorage(key) {
+		let val = uni.getStorageSync(env.NODE_ENV + "_" + key)
+		if (!val) {
+			return null
+		}
+		try {
+			val = JSON.parse(val)
+			if (val.expire && Date.now() / 1000 - val.time > val.expire) {
+				this.removeStorage(key)
+				return null
+			} else {
+				return val.data
+			}
+		} catch (e) {
+			return uni.getStorageSync(env.NODE_ENV + "_" + key)
+		}
+		return uni.getStorageSync(env.NODE_ENV + "_" + key)
+	}
+
+	removeStorage(key) {
+		return uni.removeStorageSync(env.NODE_ENV + "_" + key);
+	}
+
+	getSystemInfo() {
+		var that = this;
+		console.log('getSystemInfo>>>>>>>');
+		uni.getSystemInfo({
+			success: function(res) {
+				that.setStorage('deviceInfo', res);
+				// #ifdef APP-PLUS
+				that.getDeviceMac();
+				// #endif
+			}
+		});
+	};
+
+	getDeviceMac() {
+		var deviceMac = ""
+		if (this.isAndroidSys()) {
+			var net = plus.android.importClass("java.net.NetworkInterface");
+			var wl0 = net.getByName('wlan0');
+			var macByte = wl0.getHardwareAddress();
+			deviceMac = '';
+			for (var i = 0; i < macByte.length; i++) {
+				var tmp = "";
+				var num = macByte[i];
+				if (num < 0) {
+					tmp = (255 + num + 1).toString(16);
+				} else {
+					tmp = num.toString(16);
+				}
+				if (tmp.length == 1) {
+					tmp = "0" + tmp;
+				}
+				deviceMac += tmp;
+			}
+		}
+		this.setStorage('sysMac', deviceMac);
+	};
+
+	/**
+	 * 安卓环境
+	 */
+	isAndroidSys() {
+		return uni.getSystemInfoSync().platform == 'android';
+	}
+
+}
+
+module.exports = ReqBase

+ 529 - 0
action_sdk/actionTemplete.js

@@ -0,0 +1,529 @@
+const actionsdk = require('../action_sdk/actionsdk-1.0.0.js');
+const REQ_BASE = require('../action_sdk/ReqBase.js');
+import PAGES_JSON from "@/pages.json"
+
+export default {
+	data() {
+		return {
+			ACTION_SDK:{},
+			
+			ACTION_ENTER_TIME : '',//页面进入时间
+			ACTION_OUT_TIME : '',//页面离开时间
+			ACTION_STAY_TIME : '',//页面停留时间
+			
+			BIND_ID:'',//行为对象id
+			BIND_TYPE:'',//行为对象类型
+			USER_ID:'',//当前用户id
+			TYPE_NAME:'',//自定义类型名称
+			SHARE_USER_ID : '',//分享用户userId
+			CURRENT_CODE:'',//当前素材的行为code(作为分享出去的PARENT_CODE使用)
+			PARENT_CODE : '',//当前素材的上级行为code(二次分享可用,保证行为轨迹链条完整)
+			CURRENT_ROUTE:{},//当前页面实例
+			
+			USER_TIMER:null,
+			USER_TIMER_NUM:0,
+			
+			OPTIONS:{},//页面入参
+			
+			PAGE_NAME:'',//页面名称
+		};
+	},
+	async onLoad(options) {
+		this.ACTION_SDK = actionsdk.initAction();
+		// #ifdef H5
+		// h5分享跳转启动页加载配置
+		if(options.isShare){
+			let url = window.location.href.split('?')[0]
+			let params = this.getQueryParams()
+			delete params.isShare
+			
+			let paramsStr = []
+			for(let key in params){
+				paramsStr.push(key + '='+params[key])
+			}
+			let url_copy = url
+			if(paramsStr.length>0){
+				url_copy = url_copy + '?' + paramsStr.join('&')
+			}
+			uni.setStorageSync('window_location', url_copy);
+			uni.redirectTo({
+				url:'/pages/launch/launch'
+			})
+			return false
+		}
+		// #endif
+		
+		this.OPTIONS = options
+		
+		if(options.scene){
+			await this.LOAD_CODE_PARAMS(options.scene)
+		}else if(options.x_code_id){
+			await this.LOAD_CODE_PARAMS(options.x_code_id)
+		}else{
+			this.BIND_ID = options.id
+			this.SHARE_USER_ID = options.userId
+			this.PARENT_CODE = options.parentCode
+		}
+		
+		this.CURRENT_CODE = actionsdk.creatBehaviorCode()
+		
+		let pageList = getCurrentPages()
+		this.CURRENT_ROUTE = pageList[pageList.length - 1]; //页面实例
+		
+		this.PAGE_NAME = this.GET_PAGE_NAME()
+		
+		console.log('this.CURRENT_ROUTE',this.CURRENT_ROUTE)
+		this.PAGE_BROWSE_FN()
+		this.USER_ID = this.ACTION_SDK.getStorage('userInfo')?this.ACTION_SDK.getStorage('userInfo').id:''
+		// 等待用户登陆成功后开始处理
+		if(!this.USER_ID){
+			this.USER_TIMER = setInterval(()=>{
+					console.log('USER_TIMER')
+					//最多10s,10s内无法获取到userId则清除定时器防止卡死 
+					this.USER_TIMER_NUM = this.USER_TIMER_NUM + 1
+					if(this.USER_TIMER_NUM>20){
+						clearInterval(this.USER_TIMER)
+						this.USER_TIMER = null
+					}
+					if(!this.USER_ID){
+						this.USER_ID = this.ACTION_SDK.getStorage('userInfo')?this.ACTION_SDK.getStorage('userInfo').id:''
+					}else{
+						clearInterval(this.USER_TIMER)
+						this.USER_TIMER = null
+					}
+				},500)
+		}else{
+		}
+	},
+	onShow() {
+		this.USER_ID = this.ACTION_SDK.getStorage('userInfo')?this.ACTION_SDK.getStorage('userInfo').id:''
+		// 用户进入时间
+		this.ACTION_ENTER_TIME = new Date();
+		
+		console.log('页面展示',this.ACTION_ENTER_TIME);
+		
+		switch (this.channel){
+			case 'home':{
+				this.PAGE_NAME = '首页' //产品
+			} break;
+			case 'service':{
+				this.PAGE_NAME = '服务项目' //活动
+			} break;
+			case 'user':{
+				this.PAGE_NAME = '我的' //文章
+			} break;
+			case 'cart':{
+				this.PAGE_NAME = '购物车' //文章
+			} break;
+			
+			default:{
+			} break;
+		}
+	},
+	onHide() {
+		// 解决onHide重复调用问题
+		if(!this.CURRENT_ROUTE.route) return false
+		
+		// 用户退出时间
+		this.ACTION_OUT_TIME = new Date();
+		//停留时间(毫秒)
+		this.ACTION_STAY_TIME = this.ACTION_OUT_TIME.getTime() - this.ACTION_ENTER_TIME.getTime();
+		console.log('页面隐藏' + this.CURRENT_ROUTE.route + ':' + this.ACTION_STAY_TIME);
+		console.log('---用户浏览---',Math.ceil(this.ACTION_STAY_TIME/1000))
+		this.SEND_BROWSE_FN()
+	},
+	onUnload() {
+		// 解决onHide重复调用问题
+		if(!this.CURRENT_ROUTE.route) return false
+		
+		// 用户退出时间
+		this.ACTION_OUT_TIME = new Date();
+		//停留时间(毫秒)
+		this.ACTION_STAY_TIME = this.ACTION_OUT_TIME.getTime() - this.ACTION_ENTER_TIME.getTime();
+		console.log('页面卸载' + this.CURRENT_ROUTE.route + ':' + this.ACTION_STAY_TIME);
+		console.log('---用户浏览总时长---',Math.ceil(this.ACTION_STAY_TIME/1000))
+		this.SEND_BROWSE_FN()
+	},
+	methods: {
+		// 获取参数
+		getQueryParams() {
+		  const url = window.location.search;
+		  const params = url
+		    .substring(1)
+		    .split('&')
+		    .reduce((result, param) => {
+		      const [key, value] = param.split('=');
+		      result[decodeURIComponent(key)] = decodeURIComponent(value);
+		      return result;
+		    }, {});
+		  
+		  return params;
+		},
+		// 页面浏览行为个性化页面处理
+		PAGE_BROWSE_FN(){
+			switch (this.CURRENT_ROUTE.route){
+				case 'product/detail/detail':{
+					this.BIND_TYPE = 1 //产品
+				} break;
+				case 'match/activityDetail/activityDetail':{
+					this.BIND_TYPE = 2 //活动
+				} break;
+				case 'topic/content/content':{
+					this.BIND_TYPE = 3 //文章
+				} break;
+				case 'topic/case/case':{
+					this.BIND_TYPE = 3 //文章
+					this.TYPE_NAME = '案例'
+				} break;
+				case 'card/index/index':{
+					this.BIND_TYPE = 7 //名片
+					this.BIND_ID = this.OPTIONS.cardId
+				} break;
+				case 'leaflet/detail/index':{
+					this.BIND_TYPE = 8 //素材
+				} break;
+				case 'topic/solDet/solDet':{
+					this.BIND_TYPE = 9 //专题
+				} break;
+				case 'promote/info/info':{
+					this.BIND_TYPE = 12 //合伙人招募页面
+					this.BIND_ID = 0 //
+				} break;
+				case 'martial/content/index':{
+					this.BIND_TYPE = 8 //文章
+					this.TYPE_NAME = '软文'
+				} break;
+				case 'martial/leaflet/index':{
+					this.BIND_TYPE = 8 //宣传彩页
+					this.TYPE_NAME = '宣传彩页'
+				} break;
+				case 'martial/file/index':{
+					this.BIND_TYPE = 8 //宣传彩页
+					this.TYPE_NAME = '文件'
+				} break;
+				case 'martial/video/index':{
+					this.BIND_TYPE = 8 //宣传彩页
+					this.TYPE_NAME = '文件'
+				} break;
+				default:{
+					this.BIND_TYPE = 14
+					this.BIND_ID = ''
+				} break;
+			}
+		},
+		
+		/**
+		 * 修改参数(需要修改参数时传入对应需要修改的参数即可)
+		 * @param BIND_TYPE 行为对象类型
+		 * @param BIND_ID 行为对象id
+		 * @param USER_ID 当前用户id
+		 * @param SHARE_USER_ID  分享用户id
+		 * @param PARENT_CODE 上级行为code(用与二次转发)
+		 * @param TYPE_NAME 自定义类型名称
+		 * @param PAGE_NAME 自定义页面标题
+		 */
+		PAGE_DATA_INIT_FN({
+			BIND_TYPE = '',
+			BIND_ID = '',
+			USER_ID = '',
+			SHARE_USER_ID = '',
+			PARENT_CODE = '',
+			TYPE_NAME = '',
+			PAGE_NAME = ''
+		}={}){
+			if(BIND_TYPE) this.BIND_TYPE = BIND_TYPE
+			if(BIND_ID) this.BIND_ID = BIND_ID
+			if(USER_ID) this.USER_ID = USER_ID
+			if(SHARE_USER_ID) this.SHARE_USER_ID = SHARE_USER_ID
+			if(PARENT_CODE) this.PARENT_CODE = PARENT_CODE
+			if(TYPE_NAME) this.TYPE_NAME = TYPE_NAME
+			if(PAGE_NAME) this.PAGE_NAME = PAGE_NAME
+		},
+		
+		/**
+		 * 记录用户浏览行为,浏览行为上报(参数非必传,只有需要修改参数时传入对应需要修改的参数即可)
+		 * @param BIND_TYPE 行为对象类型
+		 * @param BIND_ID 行为对象id
+		 * @param USER_ID 当前用户id
+		 * @param SHARE_USER_ID  分享用户id
+		 * @param PARENT_CODE 上级行为code(用与二次转发)
+		 */
+		SEND_BROWSE_FN ({
+			BIND_TYPE = this.BIND_TYPE,
+			BIND_ID = this.BIND_ID,
+			USER_ID = this.USER_ID,
+			SHARE_USER_ID = this.SHARE_USER_ID,
+			PARENT_CODE = this.PARENT_CODE
+		}={}){
+			// console.log(BIND_TYPE,BIND_ID,USER_ID,SHARE_USER_ID,PARENT_CODE)
+			let postObj = {
+				type:BIND_TYPE,
+				bindId:BIND_ID,
+				uid:USER_ID,
+				shareUid:SHARE_USER_ID,
+				parentCode:PARENT_CODE,
+				code:this.CURRENT_CODE,
+				pageUri:this.CURRENT_ROUTE.route,
+				readTime:this.ACTION_STAY_TIME?Math.ceil(this.ACTION_STAY_TIME/1000):null
+			}
+			// 自定义类型名称
+			if(this.TYPE_NAME) postObj.typeName = this.TYPE_NAME
+			// 如果是页面浏览
+			if(postObj.type==14){
+				postObj.content = `浏览了${this.PAGE_NAME}页面`;
+				postObj.typeName = this.PAGE_NAME
+			}
+			actionsdk.saveBrowse(postObj);
+		},
+		
+		/**
+		 * 记录用户分享行为,分享行为上报
+		 * @param BIND_TYPE 行为对象类型
+		 * @param BIND_ID 行为对象id
+		 * @param USER_ID 当前用户id
+		 * @param SHARE_USER_ID  分享用户id
+		 * @param PARENT_CODE 上级行为code(用与二次转发)
+		 */
+		SEND_SHARE_FN ({
+			BIND_TYPE = this.BIND_TYPE,
+			BIND_ID = this.BIND_ID,
+			USER_ID = this.USER_ID,
+			SHARE_USER_ID = this.SHARE_USER_ID,
+			PARENT_CODE = this.PARENT_CODE
+		}={}){
+			let postObj = {
+				behaviorType:5,
+				type:BIND_TYPE,
+				bindId:BIND_ID,
+				uid:USER_ID,
+				shareUid:SHARE_USER_ID,
+				parentCode:PARENT_CODE,
+				code:this.CURRENT_CODE
+			}
+			// 自定义类型名称
+			if(this.TYPE_NAME) postObj.typeName = this.TYPE_NAME
+			// 分享行为固定behaviorType 5
+			// 延后分享是因为分享不是在成功回调调用的,导致浏览上报事件在分享上报事件前执行了,延后1s可保证时序性
+			setTimeout(()=>{
+				actionsdk.saveBehavior(postObj);
+			},1000)
+		},
+		
+		/**
+		 * 分享行为预处理(处理分享出去的PARENT_CODE,参数按分享参数传入,分享时取该方法返回的参数)
+		 * @param path 分享路径
+		 * @param sendShare 是否立即触发分享行为上报,默认不开启
+		 * @param codeScene 生成小程序码时的自定义参数,object
+		 */
+		SHARE_BEHAVIOR_FN({
+			path = '',
+			sendShare = false,
+			codeScene = {}
+		}={}){
+			if(!this.CURRENT_CODE){
+				this.CURRENT_CODE = actionsdk.creatBehaviorCode()
+			}
+			if(sendShare){
+				this.SEND_SHARE_FN()
+			}
+			// 小程序码参数拼接parentCode
+			codeScene.parentCode = this.CURRENT_CODE
+			// 分享路径拼接parentCode
+			if(path.indexOf('?')>-1){
+				path = path + '&parentCode='+this.CURRENT_CODE
+			}else{
+				path = path + '?parentCode='+this.CURRENT_CODE
+			}
+			return {
+				path:path,
+				codeScene:codeScene
+			}
+		},
+		
+		/**
+		 * 记录用户收藏行为,收藏行为上报
+		 * @param BIND_TYPE 行为对象类型
+		 * @param BIND_ID 行为对象id
+		 * @param USER_ID 当前用户id
+		 * @param SHARE_USER_ID  分享用户id
+		 * @param PARENT_CODE 上级行为code(用与二次转发)
+		 */
+		SEND_COLLECT_FN ({
+			BIND_TYPE = this.BIND_TYPE,
+			BIND_ID = this.BIND_ID,
+			USER_ID = this.USER_ID,
+			SHARE_USER_ID = this.SHARE_USER_ID,
+			PARENT_CODE = this.PARENT_CODE,
+		}={}){
+			let postObj = {
+				behaviorType:2,
+				type:BIND_TYPE,
+				bindId:BIND_ID,
+				uid:USER_ID,
+				shareUid:SHARE_USER_ID,
+				parentCode:PARENT_CODE,
+				code:this.CURRENT_CODE
+			}
+			// 收藏行为固定behaviorType 2
+			actionsdk.saveBehavior(postObj);
+		},
+		
+		/**
+		 * 其他行为上报
+		 * @param BEHAVIOR_TYPE 行为类型
+		 * @param BIND_TYPE 行为对象类型
+		 * @param BIND_ID 行为对象id
+		 * @param USER_ID 当前用户id
+		 * @param CONTENT 日志文案(如:'浏览了xxx文章')
+		 * @param READ_TIME 行为时长(如:'浏览时长',单位s)
+		 * @param TYPE_NAME 自定义类型名称
+		 * @param SHARE_USER_ID  分享用户id
+		 * @param PARENT_CODE 上级行为code(用与二次转发)
+		 */
+		SEND_SELF_FN ({
+			BEHAVIOR_TYPE = '',
+			BIND_TYPE = this.BIND_TYPE,
+			BIND_ID = this.BIND_ID,
+			USER_ID = this.USER_ID,
+			CONTENT = '',
+			READ_TIME = '',
+			TYPE_NAME = '',
+			SHARE_USER_ID = this.SHARE_USER_ID,
+			PARENT_CODE = this.PARENT_CODE,
+		}={}){
+			if(!BEHAVIOR_TYPE) {
+				throw new Error("未传入行为类型")
+				return false
+			}
+			let postObj = {
+				behaviorType:BEHAVIOR_TYPE,
+				type:BIND_TYPE,
+				bindId:BIND_ID,
+				uid:USER_ID,
+				shareUid:SHARE_USER_ID,
+				parentCode:PARENT_CODE,
+				code:this.CURRENT_CODE,
+				content:CONTENT,
+				pageUri:this.CURRENT_ROUTE.route,
+				readTime:READ_TIME,
+				TYPE_NAME:TYPE_NAME
+			}
+			actionsdk.saveBehavior(postObj);
+		},
+		
+		/**
+		 * 记录用户点赞行为,点赞行为上报
+		 * @param BIND_TYPE 行为对象类型
+		 * @param BIND_ID 行为对象id
+		 * @param USER_ID 当前用户id
+		 * @param SHARE_USER_ID  分享用户id
+		 * @param PARENT_CODE 上级行为code(用与二次转发)
+		 * @param IS_THUMBS 是否是点赞,false为取消点赞
+		 */
+		SEND_COLLECT_FN ({
+			BIND_TYPE = this.BIND_TYPE,
+			BIND_ID = this.BIND_ID,
+			USER_ID = this.USER_ID,
+			SHARE_USER_ID = this.SHARE_USER_ID,
+			PARENT_CODE = this.PARENT_CODE,
+			IS_THUMBS = true
+		}={}){
+			let postObj = {
+				behaviorType:3,
+				type:BIND_TYPE,
+				bindId:BIND_ID,
+				uid:USER_ID,
+				shareUid:SHARE_USER_ID,
+				parentCode:PARENT_CODE,
+				code:this.CURRENT_CODE,
+				IS_THUMBS:IS_THUMBS
+			}
+			// 点赞行为固定behaviorType 3
+			if(IS_THUMBS){
+				actionsdk.saveBehavior(postObj);
+			}else{
+				actionsdk.removeBehavior(postObj);
+			}
+		},
+		
+		// 获取行为接口请求参数(为实现部分项目未埋点时可通过后台接口埋点的冗余方案,纯后台埋点无行为完整链条,只有传入前端参数才能保证行为链条完整)
+		GET_API_DATA(){
+			let data = {
+				shareUid: this.SHARE_USER_ID,
+				code:this.CURRENT_CODE,
+				shareCode: this.PARENT_CODE,
+			};
+			
+			var deviceInfo = this.ACTION_SDK.getStorage('deviceInfo');
+			// #ifdef APP-PLUS
+			var sysMac = this.ACTION_SDK.getStorage('sysMac');
+			// #endif
+			var device_info = {};
+			if (deviceInfo) {
+				data.model = deviceInfo.deviceModel;
+				data.manufacturer = deviceInfo.deviceBrand;
+				data.os = deviceInfo.osName;
+				data.osVersion = deviceInfo.osVersion;
+				data.browser = deviceInfo.browserName;
+				data.browserVersion = deviceInfo.browserVersion;
+				data.deviceId = deviceInfo.deviceId;
+				// #ifdef APP-PLUS
+				if (sysMac) {
+					data.sysMac = sysMac;
+				}
+				// #endif
+			}
+			return data
+		},
+		
+		// 扫码进入时解码方法
+		LOAD_CODE_PARAMS(scene) {
+			return new Promise((resolve, reject) => {
+				let form = {
+					scene: scene
+				};
+				if (!scene) {
+					resolve();
+					return false;
+				}
+				this.ACTION_SDK.getRequestAPI('/api/code/params', form, data => {
+					let res = JSON.parse(data.scene);
+					if(data.userId){
+						this.SHARE_USER_ID = data.userId
+					}
+					if(res.id){
+						this.BIND_ID = res.id
+					}
+					if(res.userId){
+						this.SHARE_USER_ID = res.userId
+					}
+					if(res.parentCode){
+						this.PARENT_CODE = res.parentCode
+					}
+					resolve();
+				});
+			});
+		},
+		
+		// 获取页面标题
+		GET_PAGE_NAME(){
+			let name = this.CURRENT_ROUTE.route
+			console.log('GET_PAGE_NAME',PAGES_JSON)
+			for(let key in PAGES_JSON){
+				let getCurrentStyle = PAGES_JSON.pages.find((item) => item.path == this.CURRENT_ROUTE.route);
+				if(getCurrentStyle){
+					return getCurrentStyle.style&&getCurrentStyle.style.navigationBarTitleText?getCurrentStyle.style.navigationBarTitleText:getCurrentStyle.path
+				}else{
+					for(let i=0;i<PAGES_JSON.subPackages.length;i++){
+						let subPackages = PAGES_JSON.subPackages[i]
+						let getCurrentStyle = subPackages.pages.find((item) => subPackages.root+'/'+item.path == this.CURRENT_ROUTE.route);
+						if(getCurrentStyle){
+							return getCurrentStyle.style&&getCurrentStyle.style.navigationBarTitleText?getCurrentStyle.style.navigationBarTitleText:getCurrentStyle.path
+						}
+					}
+				}
+			}
+			return name
+		}
+	}
+};

+ 263 - 0
action_sdk/actionsdk-1.0.0.js

@@ -0,0 +1,263 @@
+const ReqBase = require('./ReqBase.js');
+
+const save_browse_api = '/api/behavior/saveBrowse'; //保存用户浏览行为数据
+const save_behavior_api = '/api/behavior/save'; //保存用户行为数据
+const remove_behavior_api = '/api/behavior/remove'; //移出用户行为数据(取消点赞等)
+
+let reqBase;
+
+const req = require('../utils/request.js');
+
+const initAction = () => {
+	if (!reqBase) {
+		reqBase = new ReqBase({
+			appId: req.getStorage('appId')
+		});
+	}
+	getStartTime();
+	return reqBase;
+};
+
+/**
+ * 记录浏览行为
+ * @param type 1"产品"、2 "活动"、3"文章"、4"社区"、5"海报"、6"发现"、7"名片"、8"素材内容"、9"专题"
+ * @param bindId 操作对象ID、code(必填)
+ *  @param uid  当前用户ID(选填)
+ *  @param shareUid 分享用户ID(选填)
+ *  @param parentCode 父级分享生成的code(选填:别人的连接二次分享时获取)
+ * @param typeName (选填:需要自定义type名称的时候传,比如通过文章做的风采,typeName传风采,type为3)
+ * @param code 行为code(选填:需要先生成code时或code生成操作和分享操作不同时发送时(如小程序码分享携带该code)传,先调用creatBehaviorCode方法)
+ * @param content 行为日志文案(选填:页面浏览时传)
+ * @param pageUri 当前访问的页面(选填:页面路径)
+ * @param readTime 当前访问的页面浏览时长(选填:单位s)
+ */
+const saveBrowse = ({
+	type = 3,
+	bindId = '',
+	uid = '',
+	shareUid = '',
+	code = '',
+	parentCode = '',
+	typeName = '',
+	content = '',
+	pageUri = '',
+	readTime = ''
+} = {}) => {
+	// if (bindId === '' || bindId === undefined || bindId === null) {
+	// 	console.log('保存浏览行为 Error:请传入浏览对象bindId');
+	// 	return;
+	// }
+	var dataP = {
+		behaviorType: 4,
+		type: type,
+		bindId: bindId,
+		uid: uid,
+		shareUid: shareUid,
+		code:code?code:creatBehaviorCode(),
+		parentCode: parentCode,
+		typeName:typeName,
+		content:content,
+		pageUri:pageUri,
+		readTime:readTime
+	};
+	var endTime = getCurrentDateTiem();
+	dataP.startTime = reqBase.getStorage('startTime');
+	dataP.endTime = endTime;
+	reqBase.postRequest(save_browse_api, dataP, data => {
+
+	});
+};
+
+/**
+ * 记录用户操作行为
+ * @param behaviorType 行为类型
+ * @param type 1"产品"、2 "活动"、3"文章"、4"社区"、5"海报"、6"发现"、7"名片"、8"素材内容"
+ * @param bindId 操作对象ID、code(必填)
+ * @param uid  当前用户ID(选填)
+ * @param shareUid 分享用户ID(选填)
+ * @param parentCode 父级分享生成的code(选填:别人的连接二次分享时获取)
+ * @param typeName (选填:需要自定义type名称的时候传,比如通过文章做的风采,typeName传风采,type为3)
+ * @param success 成功后回调,返回生成的code,(选填:获取当前行为code时传)
+ * @param code 行为code(选填:需要先生成code时或code生成操作和分享操作不同时发送时(如小程序码分享携带该code)传,先调用creatBehaviorCode方法)
+ * @param content 行为日志文案(选填:页面浏览时传)
+ * @param pageUri 当前访问的页面(选填:页面路径)
+ * @param readTime 当前访问的页面浏览时长(选填:单位s)
+ */
+const saveBehavior = ({
+	behaviorType = 4,
+	type = 3,
+	bindId = '',
+	uid = '',
+	shareUid = '',
+	code = '',
+	parentCode = '',
+	typeName = '',
+	content = '',
+	pageUri = '',
+	readTime = '',
+	success = (res)=>{}
+} = {}) => {
+	var dataP = {
+		behaviorType: behaviorType,
+		type: type,
+		bindId: bindId,
+		uid: uid,
+		shareUid: shareUid,
+		code:code?code:creatBehaviorCode(),
+		parentCode: parentCode,
+		typeName:typeName,
+		content:content,
+		pageUri:pageUri,
+		readTime:readTime
+	};
+	reqBase.postRequest(save_behavior_api, dataP, data => {
+		if(data==-1){//接口请求异常时返回空
+			// success.call(this,null)
+		}else{
+			// success.call(this,dataP.code)
+		}
+	});
+	// 直接回调行为code,防止影响引用行为操作的其他代码执行
+	success.call(this,dataP.code)
+};
+
+/**
+ * 记录用户取消操作行为
+ * @param behaviorType 行为类型
+ * @param type 1"产品"、2 "活动"、3"文章"、4"社区"、5"海报"、6"发现"、7"名片"、8"素材内容"
+ * @param bindId 操作对象ID、code(必填)
+ * @param uid  当前用户ID(选填)
+ * @param shareUid 分享用户ID(选填)
+ * @param parentCode 父级分享生成的code(选填:别人的连接二次分享时获取)
+ * @param typeName (选填:需要自定义type名称的时候传,比如通过文章做的风采,typeName传风采,type为3)
+ * @param success 成功后回调,返回生成的code,(选填:获取当前行为code时传)
+ * @param code 行为code(选填:需要先生成code时或code生成操作和分享操作不同时发送时(如小程序码分享携带该code)传,先调用creatBehaviorCode方法)
+ * @param content 行为日志文案(选填:页面浏览时传)
+ * @param pageUri 当前访问的页面(选填:页面路径)
+ * @param readTime 当前访问的页面浏览时长(选填:单位s)
+ */
+const removeBehavior = ({
+	behaviorType = 4,
+	type = 3,
+	bindId = '',
+	uid = '',
+	shareUid = '',
+	code = '',
+	parentCode = '',
+	typeName = '',
+	content = '',
+	pageUri = '',
+	readTime = '',
+	success = (res)=>{}
+} = {}) => {
+	var dataP = {
+		behaviorType: behaviorType,
+		type: type,
+		bindId: bindId,
+		uid: uid,
+		shareUid: shareUid,
+		code:code?code:creatBehaviorCode(),
+		parentCode: parentCode,
+		typeName:typeName,
+		content:content,
+		pageUri:pageUri,
+		readTime:readTime
+	};
+	reqBase.postRequest(remove_behavior_api, dataP, data => {
+		if(data==-1){//接口请求异常时返回空
+			// success.call(this,null)
+		}else{
+			// success.call(this,dataP.code)
+		}
+	});
+	// 直接回调行为code,防止影响引用行为操作的其他代码执行
+	success.call(this,dataP.code)
+};
+
+function creatBehaviorCode() {
+	var date = new Date();
+	var code = randomText(6) + date.getTime();
+	return code;
+};
+
+function randomText(num) {
+	var num = num || 32,
+		t = "ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678",
+		a = t.length,
+		text = "";
+	for (i = 0; i < num; i++) text += t.charAt(Math.floor(Math.random() * a));
+
+	console.log('randomText>>>>>', text);
+	return text
+};
+
+
+
+/**
+ * 获取当前开始时间
+ */
+function getStartTime() {
+	var startTime = getCurrentDateTiem();
+	reqBase.setStorage('startTime', startTime);
+};
+
+
+//当前时间
+function getCurrentDateTiem() {
+	var date = new Date();
+	return getBaseCurrentDateTiem(date);
+};
+
+function getBaseCurrentDateTiem(date, isNoTiem) {
+	var year = date.getFullYear(); //年 ,从 Date 对象以四位数字返回年份
+	var month = date.getMonth() + 1; //月 ,从 Date 对象返回月份 (0 ~ 11) ,date.getMonth()比实际月份少 1 个月
+	var day = date.getDate(); //日 ,从 Date 对象返回一个月中的某一天 (1 ~ 31)
+	var hours = date.getHours(); //小时 ,返回 Date 对象的小时 (0 ~ 23)
+	var minutes = date.getMinutes(); //分钟 ,返回 Date 对象的分钟 (0 ~ 59)
+	var seconds = date.getSeconds(); //秒 ,返回 Date 对象的秒数 (0 ~ 59)   
+	//获取当前系统时间  
+	// var currentDate = year + "-" + month + "-" + day + " " + hours + ":" + minutes + ":" + seconds;
+	// alert(currentDate);
+	//修改月份格式
+	if (month >= 1 && month <= 9) {
+		month = "0" + month;
+	}
+	//修改日期格式
+	if (day >= 0 && day <= 9) {
+		day = "0" + day;
+	}
+
+	//修改小时格式
+	if (hours >= 0 && hours <= 9) {
+		hours = "0" + hours;
+	}
+	//修改分钟格式
+	if (minutes >= 0 && minutes <= 9) {
+		minutes = "0" + minutes;
+	}
+	// //修改秒格式
+	// if (seconds >= 0 && seconds <= 9) {
+	// 	seconds = "0" + seconds;
+	// }
+	//获取当前系统时间  格式(yyyy-mm-dd hh:mm:ss)
+	var currentFormatDate = '';
+	if (isNoTiem) {
+		currentFormatDate = year + "-" + month + "-" + day
+	} else {
+		currentFormatDate = year + "-" + month + "-" + day + " " + hours + ":" + minutes;
+	}
+	return currentFormatDate;
+};
+
+
+
+
+
+
+module.exports = {
+	initAction: initAction,
+	saveBrowse: saveBrowse,
+	saveBehavior: saveBehavior,
+	removeBehavior:removeBehavior,
+	creatBehaviorCode:creatBehaviorCode
+};

+ 160 - 0
action_sdk/readme.md

@@ -0,0 +1,160 @@
+## 用户行为分析埋点
+###  使用方式
+
+1. 全局混入,在main.js内混入actionTemplete,混入之后每个页面会自动初始化actionsdk
+```javascript
+import action from "@/action_sdk/actionTemplete.js"
+Vue.mixin(action)
+```
+2. 局部混入使用,适用于单个页面需要埋点
+```javascript
+<script>
+//引入混入的文件
+import {action} from "@/action_sdk/actionTemplete.js"
+export default {
+    mixins:[action], //混入文件
+    data() {
+        return {
+        };
+    },
+    
+    methods: {
+    }
+};
+</script>
+```
+###  说明
+1.混入模板后统一在onLoad获取参数,
+  提供可处理特殊页面参数的方法PAGE_BROWSE_FN,
+  提供可调整模板内参数方法PAGE_DATA_INIT_FN
+  
+2.初始化完成会生成行为code 参数名为CURRENT_CODE,
+  该code为此次发生的所有行为code,包括浏览,分享行为等,
+  即该次时间段内的所有浏览分享行为code保持一致
+  
+3.当此次行为需要分享时可调用分享预处理方法 SHARE_BEHAVIOR_FN ,
+  获取处理后的分享路径和小程序码,该路径和小程序码会自动拼接参数parentCode
+  parentCode值为本次行为的code ,即前文CURRENT_CODE,
+  待转发后打开时即可根据parentCode溯源上级分享行为,只需要查询本次浏览行为的parentCode是哪一次行为的code即可
+
+### 注意事项
+1.注意将项目request.js文件内env环境值与action_sdk目录下ReqBase.js文件内env统一,
+  不然ReqBase无法同步获取当前项目缓存(如用户信息缓存userinfo)
+  dev测试环境 prd正式环境 pota本地环境
+  
+2.统一在onLoad内获取分享人id,字段为userId,需将所有项目带分享用户的字段统一为userId
+
+3.统一在onLoad内获取行为对象id,字段为id(如文章id等),需将所有项目进入页面时传入参数统一为id(如文章topic/content/content?id=xxx)
+
+4.扫码进入后获取的参数统一引用json字符串格式,需将所有项目生成码时自定义的分享参数以json字符串格式存入,保证在行为埋点解析分享码参数时格式正确
+
+5.当页面参数与行为埋点混入模板内参数不一致时可在 PAGE_BROWSE_FN 方法内统一调整或处理(id字段不一致时不建议在该方法内调整,因为可能还有扫码进入的情况,建议在页面获取到id后用PAGE_DATA_INIT_FN直接调整)
+
+6.一般来说浏览行为上报是当页面离开或销毁时触发,所以如需调整模板内参数,可调用 PAGE_DATA_INIT_FN 方法传入对应参数
+	注:如果进入页面立即触发浏览行为上报的,不适用该方法,请在 PAGE_BROWSE_FN 方法内单独处理
+	
+7.分享前调用分享预处理方法 SHARE_BEHAVIOR_FN (),获取分享路径或小程序码自定义参数,
+  分享路径只需传path字段即可,分享小程序码需传codeScene(小程序码自定义参数,类型object),
+  预处理完成后调用分享行为上报方法SEND_SHARE_FN即可,或者在预处理中传参sendShare=true也可在预处理后直接上报分享行为,
+  SEND_SHARE_FN可用于延迟分享,如先生成小程序码后点击保存小程序码才计入分享行为的情况,
+  不需要延迟分享直接预处理时传参sendShare=true即可无需单独调用SEND_SHARE_FN
+  
+8.关于页面浏览展示的用户日志文案,请在pages.json文件中完善所有页面的navigationBarTitleText,以保证正常获取到页面标题,否则只能展示浏览的页面路径
+
+### 方法 
+注:由于使用的是混入模式,在页面内可直接调用以下方法
+
+1.参数修改
+```javascript
+/**
+ * 修改参数(需要修改参数时传入对应需要修改的参数即可)
+ * @param BIND_TYPE 行为对象类型
+ * @param BIND_ID 行为对象id
+ * @param USER_ID 当前用户id
+ * @param SHARE_USER_ID  分享用户id
+ * @param PARENT_CODE 上级行为code(用与二次转发)
+ */
+this.PAGE_DATA_INIT_FN()
+//以上参数只传需要修改的
+```
+
+2.浏览行为上报
+```javascript
+/**
+ * 记录用户浏览行为(参数非必传,只有需要修改参数时传入对应需要修改的参数即可)
+ * @param BIND_TYPE 行为对象类型
+ * @param BIND_ID 行为对象id
+ * @param USER_ID 当前用户id
+ * @param SHARE_USER_ID  分享用户id
+ * @param PARENT_CODE 上级行为code(用与二次转发)
+ */
+this.SEND_BROWSE_FN()
+// 无需传递参数,可直接触发一次浏览行为上报,参数默认为混入模板内部获取的参数,可传参(参数类型object,传入对应需要修改的参数即可,如{BIND_ID:xxx})
+```
+
+3.分享行为上报
+```javascript
+/**
+ * 记录用户分享行为,分享行为上报
+ * @param BIND_TYPE 行为对象类型
+ * @param BIND_ID 行为对象id
+ * @param USER_ID 当前用户id
+ */
+this.SEND_SHARE_FN()
+// 无需传递参数,可直接触发一次分享行为上报,参数默认为混入模板内部获取的参数
+```
+
+4.分享行为预处理
+```javascript
+//小程序分享
+onShareAppMessage(options) {
+	let path = '/topic/content/content?id=' + this.id + '&userId=' + req.getStorage('userInfo').id;
+	
+	// SHARE_BEHAVIOR_FN 预处理分享路径,通过path获得
+	path = this.SHARE_BEHAVIOR_FN({path:path,sendShare:true}).path
+	
+	return {
+		title: this.detaile.title,
+		imageUrl: this.detaile.pic,
+		path: path
+	};
+}
+
+// 小程序码分享(先获取小程序吗并对参数预处理,调用SHARE_BEHAVIOR_FN,在分享的时候单独调用SEND_SHARE_FN触发分享行为上报)
+getCodeUrl() {
+	let that = this;
+	let scene = {
+		id: that.detaile.id,
+		userId: req.getStorage('userInfo').id
+	};
+	console.log(scene); //获取小程序码
+	const params = {
+		page: 'topic/content/content',
+		// SHARE_BEHAVIOR_FN 预处理分享参数,通过codeScene获得
+		scene: JSON.stringify(this.SHARE_BEHAVIOR_FN({codeScene:scene}).codeScene)
+	};
+	req.getRequest('/api/program/codev', params, url => {
+		that.setData({
+			codeUrl: url
+		});
+	});
+},
+
+this.SEND_SHARE_FN()
+```
+
+5.其他行为上报
+```javascript
+/**
+ * 其他行为上报
+ * @param BEHAVIOR_TYPE 行为类型
+ * @param BIND_TYPE 行为对象类型
+ * @param BIND_ID 行为对象id
+ * @param USER_ID 当前用户id
+ * @param CONTENT 日志文案(如:'浏览了xxx文章')
+ * @param READ_TIME 行为时长(如:'浏览时长',单位s)
+ * @param TYPE_NAME 自定义类型名称
+ */
+this.SEND_SELF_FN ()
+// BEHAVIOR_TYPE必传,可直接触发一次其他行为上报,参数需要自定义赋值
+```

+ 267 - 0
action_sdk_copy/ReqBase.js

@@ -0,0 +1,267 @@
+const req = require("../utils/request.js");
+// const env = {
+// 	NODE_ENV: 'dev',
+// 	dev: { //测试环境
+// 		apiUrl: 'https://apitest.zhiqiyun.com',
+// 	},
+// 	product: { //生产环境
+// 		apiUrl: 'https://apimall.zhiqiyun.com',
+// 	},
+	
+// 	lo: { //生产环境
+// 		apiUrl: 'http://192.168.110.180:8078',
+// 	}
+// }
+const env = {
+	NODE_ENV: req.env.NODE_ENV=='dev'?'dev':req.env.NODE_ENV=='prd'?'product':'lo',
+	dev: { //测试环境
+		apiUrl: 'https://apitest.zhiqiyun.com',
+	},
+	product: { //生产环境
+		apiUrl: 'https://apimall.zhiqiyun.com',
+	},
+	
+	lo: { //生产环境
+		apiUrl: 'http://192.168.110.180:8078',
+	}
+}
+
+class ReqBase {
+	/**
+	 * 构造函数
+	 * @param {Object} options 接口参数,appId 为必选参数
+	 */
+	constructor(options) {
+		console.log('ReqBase sdk:', options);
+		if (!options.appId) {
+			throw Error('appId值不能为空');
+		}
+		this.appId = options.appId;
+		this.getSystemInfo();
+	}
+
+	/*
+	 * 获取token
+	 */
+	getToken(url, success) {
+		let token = '';
+		var dataP = {};
+		var header = {};
+		token = this.getStorage('ACTION_TOKEN');
+		dataP = {};
+		header.appId = this.appId;
+		header['content-type'] = 'application/json;charset=UTF-8';
+		if (token) {
+			header.authorityToken = token;
+			success.call(this, token);
+			return false;
+		} else {
+			this.loadToken(header, dataP, data => {
+				success.call(this, data);
+			});
+		}
+	}
+
+	loadToken(header, dataP, success) {
+		let that = this
+		uni.request({
+			url: env[env.NODE_ENV].apiUrl + '/api/access_token',
+			data: dataP,
+			method: 'get',
+			header: header,
+			success(json) {
+				if (json.statusCode !== 200) {
+					console.log('ACTION_TOKEN 获取失败>>>>>', json.data.message);
+					return;
+				}
+				var token = json.data.data;
+				that.setStorage('ACTION_TOKEN', token);
+				success.call(that, token);
+			},
+			fail(res) {
+				console.log('ACTION_TOKEN 获取失败>>>>>', res);
+			}
+		})
+	}
+
+	clearValueEmpty(data) {
+		let keyValue = {};
+		for (let key in data) {
+			let value = typeof data[key];
+			if (value == 'string' && value) {
+				if (data[key] != 'undefined' || data[key] != " " || data[key] != undefined || data[key] != null) {
+					if (data[key] != '') {
+						keyValue[key] = data[key];
+					}
+				}
+				if (data[key] != '') {
+					keyValue[key] = data[key];
+				}
+			} else if (value == 'number' && value != null) {
+				keyValue[key] = data[key];
+			} else if (value == 'boolean') {
+				keyValue[key] = data[key];
+			} else {
+				if (data[key]) keyValue[key] = data[key];
+			}
+		}
+		return keyValue;
+	}
+
+	/**
+	 * 公共请求
+	 * 
+	 * @param {*} url  请求url
+	 * @param {*} data 请求参数
+	 * @param {*} method 请求方法
+	 * @param {*} success 成功函数
+	 * @param {*} isLoad 是否显示加载提示
+	 */
+	baseRequest(url, data, method, success) {
+		var header = {};
+		var deviceInfo = this.getStorage('deviceInfo');
+		// #ifdef APP-PLUS
+		var sysMac = this.getStorage('sysMac');
+		// #endif
+		var device_info = {};
+		if (deviceInfo) {
+			data.browser = deviceInfo.browserName;
+			data.browserVersion = deviceInfo.browserVersion;
+			data.manufacturer = deviceInfo.deviceBrand;
+			data.model = deviceInfo.deviceModel;
+			data.deviceId = deviceInfo.deviceId;
+			data.os = deviceInfo.osName;
+			data.osVersion = deviceInfo.osVersion;
+			// #ifdef APP-PLUS
+			if (sysMac) {
+				data.sysMac = sysMac;
+			}
+			// #endif
+		}
+		var dataP = {
+			uri: url,
+			code: 'sys.behavior.service',
+			body: data
+		}
+		this.getToken(url, token => {
+			header.authorityToken = token;
+			header.appId = this.appId;
+			header['content-type'] = 'application/json;charset=UTF-8';
+			uni.request({
+				url: env[env.NODE_ENV].apiUrl + '/api/v3/application/public',
+				data: this.clearValueEmpty(dataP),
+				method: method,
+				header: header,
+				success(json) {
+					if (json.statusCode !== 200) {
+						console.log('action sdk error:', json.data.message);
+						success.call(this, -1);//接口异常返回-1,不影响其他应用
+						return;
+					}
+					if (json.data.code !== 0) {
+						console.log('action sdk error:', json.data.msg);
+						success.call(this, -1);//接口异常返回-1,不影响其他应用
+						return;
+					}
+					let dataR = json.data.data;
+					if (typeof dataR === 'string' && dataR.indexOf("{") === 0) {
+						dataR = JSON.parse(dataR);
+					}
+					success.call(this, dataR);
+				},
+				fail() {
+
+				}
+			})
+		})
+	}
+
+	/**GET请求 */
+	getRequest(url, data, success) {
+		this.baseRequest(url, data, 'get', success);
+	}
+
+	/**POST请求 */
+	postRequest(url, data, success) {
+		this.baseRequest(url, data, 'post', success);
+	}
+
+	setStorage(key, value, expire = 0) {
+		let obj = {
+			data: value, //存储的数据
+			time: Date.now() / 1000, //记录存储的时间戳
+			expire: expire //记录过期时间,单位秒
+		}
+		uni.setStorageSync(env.NODE_ENV + "_" + key, JSON.stringify(obj))
+	}
+
+	getStorage(key) {
+		let val = uni.getStorageSync(env.NODE_ENV + "_" + key)
+		if (!val) {
+			return null
+		}
+		try {
+			val = JSON.parse(val)
+			if (val.expire && Date.now() / 1000 - val.time > val.expire) {
+				this.removeStorage(key)
+				return null
+			} else {
+				return val.data
+			}
+		} catch (e) {
+			return uni.getStorageSync(env.NODE_ENV + "_" + key)
+		}
+		return uni.getStorageSync(env.NODE_ENV + "_" + key)
+	}
+
+	removeStorage(key) {
+		return uni.removeStorageSync(env.NODE_ENV + "_" + key);
+	}
+
+	getSystemInfo() {
+		var that = this;
+		console.log('getSystemInfo>>>>>>>');
+		uni.getSystemInfo({
+			success: function(res) {
+				that.setStorage('deviceInfo', res);
+				// #ifdef APP-PLUS
+				that.getDeviceMac();
+				// #endif
+			}
+		});
+	};
+
+	getDeviceMac() {
+		var deviceMac = ""
+		if (this.isAndroidSys()) {
+			var net = plus.android.importClass("java.net.NetworkInterface");
+			var wl0 = net.getByName('wlan0');
+			var macByte = wl0.getHardwareAddress();
+			deviceMac = '';
+			for (var i = 0; i < macByte.length; i++) {
+				var tmp = "";
+				var num = macByte[i];
+				if (num < 0) {
+					tmp = (255 + num + 1).toString(16);
+				} else {
+					tmp = num.toString(16);
+				}
+				if (tmp.length == 1) {
+					tmp = "0" + tmp;
+				}
+				deviceMac += tmp;
+			}
+		}
+		this.setStorage('sysMac', deviceMac);
+	};
+
+	/**
+	 * 安卓环境
+	 */
+	isAndroidSys() {
+		return uni.getSystemInfoSync().platform == 'android';
+	}
+
+}
+
+module.exports = ReqBase

+ 186 - 0
action_sdk_copy/actionsdk-1.0.0.js

@@ -0,0 +1,186 @@
+const ReqBase = require('./ReqBase.js');
+
+const save_browse_api = '/api/behavior/saveBrowse'; //保存用户浏览行为数据
+const save_behavior_api = '/api/behavior/save'; //保存用户行为数据
+
+let reqBase;
+
+const req = require('../utils/request.js');
+
+const initAction = () => {
+	if (!reqBase) {
+		reqBase = new ReqBase({
+			appId: req.getStorage('appId')
+		});
+	}
+	getStartTime();
+};
+
+/**
+ * 记录浏览行为
+ * @param type 1"产品"、2 "活动"、3"文章"、4"社区"、5"海报"、6"发现"、7"名片"、8"素材内容"
+ * @param bindId 操作对象ID、code(必填)
+ *  @param uid  当前用户ID(选填)
+ *  @param shareUid 分享用户ID(选填)
+ *  @param parentCode 父级分享生成的code(选填:别人的连接二次分享时获取)
+ * @param typeName (选填:需要自定义type名称的时候传,比如通过文章做的风采,typeName传风采,type为3)
+ */
+const saveBrowse = ({
+	type = 3,
+	bindId = '',
+	uid = '',
+	shareUid = '',
+	parentCode = '',
+	typeName = ''
+} = {}) => {
+	if (!bindId) {
+		console.log('保存浏览行为 Error:请传入浏览对象bindId');
+		return;
+	}
+	var dataP = {
+		behaviorType: 4,
+		type: type,
+		bindId: bindId,
+		uid: uid,
+		shareUid: shareUid,
+		code: creatBehaviorCode(),
+		parentCode: parentCode,
+		typeName:typeName
+	};
+	var endTime = getCurrentDateTiem();
+	dataP.startTime = reqBase.getStorage('startTime');
+	dataP.endTime = endTime;
+	reqBase.postRequest(save_browse_api, dataP, data => {
+
+	});
+};
+
+/**
+ * 记录用户操作行为
+ * @param behaviorType 行为类型
+ * @param type 1"产品"、2 "活动"、3"文章"、4"社区"、5"海报"、6"发现"、7"名片"、8"素材内容"
+ * @param bindId 操作对象ID、code(必填)
+ * @param uid  当前用户ID(选填)
+ * @param shareUid 分享用户ID(选填)
+ * @param parentCode 父级分享生成的code(选填:别人的连接二次分享时获取)
+ * @param typeName (选填:需要自定义type名称的时候传,比如通过文章做的风采,typeName传风采,type为3)
+ * @param success 成功后回调,返回生成的code,(选填:获取当前行为code时传)
+ * @param code 行为code(选填:需要先生成code时或code生成操作和分享操作不同时发送时(如小程序码分享携带该code)传,先调用creatBehaviorCode方法)
+ */
+const saveBehavior = ({
+	behaviorType = 4,
+	type = 3,
+	bindId = '',
+	uid = '',
+	shareUid = '',
+	code = '',
+	parentCode = '',
+	typeName = '',
+	success = (res)=>{}
+} = {}) => {
+	var dataP = {
+		behaviorType: behaviorType,
+		type: type,
+		bindId: bindId,
+		uid: uid,
+		shareUid: shareUid,
+		code:code?code:creatBehaviorCode(),
+		parentCode: parentCode,
+		typeName:typeName
+	};
+	reqBase.postRequest(save_behavior_api, dataP, data => {
+		if(data==-1){//接口请求异常时返回空
+			// success.call(this,null)
+		}else{
+			// success.call(this,dataP.code)
+		}
+	});
+	success.call(this,dataP.code)
+};
+
+function creatBehaviorCode() {
+	var date = new Date();
+	var code = randomText(6) + date.getTime();
+	return code;
+};
+
+function randomText(num) {
+	var num = num || 32,
+		t = "ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678",
+		a = t.length,
+		text = "";
+	for (i = 0; i < num; i++) text += t.charAt(Math.floor(Math.random() * a));
+
+	console.log('randomText>>>>>', text);
+	return text
+};
+
+
+
+/**
+ * 获取当前开始时间
+ */
+function getStartTime() {
+	var startTime = getCurrentDateTiem();
+	reqBase.setStorage('startTime', startTime);
+};
+
+
+//当前时间
+function getCurrentDateTiem() {
+	var date = new Date();
+	return getBaseCurrentDateTiem(date);
+};
+
+function getBaseCurrentDateTiem(date, isNoTiem) {
+	var year = date.getFullYear(); //年 ,从 Date 对象以四位数字返回年份
+	var month = date.getMonth() + 1; //月 ,从 Date 对象返回月份 (0 ~ 11) ,date.getMonth()比实际月份少 1 个月
+	var day = date.getDate(); //日 ,从 Date 对象返回一个月中的某一天 (1 ~ 31)
+	var hours = date.getHours(); //小时 ,返回 Date 对象的小时 (0 ~ 23)
+	var minutes = date.getMinutes(); //分钟 ,返回 Date 对象的分钟 (0 ~ 59)
+	var seconds = date.getSeconds(); //秒 ,返回 Date 对象的秒数 (0 ~ 59)   
+	//获取当前系统时间  
+	// var currentDate = year + "-" + month + "-" + day + " " + hours + ":" + minutes + ":" + seconds;
+	// alert(currentDate);
+	//修改月份格式
+	if (month >= 1 && month <= 9) {
+		month = "0" + month;
+	}
+	//修改日期格式
+	if (day >= 0 && day <= 9) {
+		day = "0" + day;
+	}
+
+	//修改小时格式
+	if (hours >= 0 && hours <= 9) {
+		hours = "0" + hours;
+	}
+	//修改分钟格式
+	if (minutes >= 0 && minutes <= 9) {
+		minutes = "0" + minutes;
+	}
+	// //修改秒格式
+	// if (seconds >= 0 && seconds <= 9) {
+	// 	seconds = "0" + seconds;
+	// }
+	//获取当前系统时间  格式(yyyy-mm-dd hh:mm:ss)
+	var currentFormatDate = '';
+	if (isNoTiem) {
+		currentFormatDate = year + "-" + month + "-" + day
+	} else {
+		currentFormatDate = year + "-" + month + "-" + day + " " + hours + ":" + minutes;
+	}
+	return currentFormatDate;
+};
+
+
+
+
+
+
+module.exports = {
+	initAction: initAction,
+	saveBrowse: saveBrowse,
+	saveBehavior: saveBehavior,
+	creatBehaviorCode:creatBehaviorCode
+};

+ 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;}

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

@@ -0,0 +1,1493 @@
+<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="picUrlss+'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="picUrlss+'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="picUrlss+'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 ? atOnceBuy() : ''">
+				<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'">
+			<button open-type="contact" class="botbtn">
+				<image src="/static/pages/images/kfico.png"></image>在线客服
+			</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="picUrlss + 'tjcg1.png'" class="tjcg1"></image>
+			<image :src="picUrlss+'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>
+		<update-userinfo :update-info="isUpdateInfo" :update-mobile="isUpdateMobile" v-if="isShowUpdate"
+			@closeUpdate="closeUpdate"></update-userinfo>
+		<privacy :is-update="true" @getLocations="initLocation"></privacy>
+		<!-- #ifdef H5 -->
+		<wx-share ref="wxshare" />
+		<!-- #endif -->
+	</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 productPopup from "../../../components/product-popup/index";
+	import vShare from "../../../components/share/share";
+	import productLogin from "../../../components/product-login/index";
+
+	export default {
+		data() {
+			return {
+				picUrlss: req.public.picUrls,
+				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,
+				isShowUpdate: false, //是否显示更新信息弹窗
+				isUpdateInfo: false, //更新用户信息
+				isUpdateMobile: false, //绑定手机号
+			};
+		},
+
+		components: {
+			productPopup,
+			vShare,
+			productLogin
+		},
+		props: {},
+		onLoad: async function(options) {
+			if (options.appId) req.setStorage('appId', options.appId);
+			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 : '',
+				}
+				await this.bindUser(params);
+			} else {
+				await req.silenceLogin();
+			}
+			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) {
+						that.getMerchant();
+					}
+				})
+				// this.loadDefaultAddress();
+				await this.browsRecound(this.query.id);
+				this.initState();
+				// let merchant = req.getStorage('defaultMerchant');
+				// this.setData({ merchant: merchant });
+				// this.getMerchant();
+			}
+		},
+
+
+		onShareAppMessage: function() {
+			return this.onShareMessage(); 
+		},
+
+		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);
+			}
+		},
+
+		onReady() {
+			// #ifdef H5
+			var that = this;
+			//初始化分享内容
+			setTimeout(function() {
+				var shareContent = that.onShareMessage();
+				if (shareContent) {
+					shareContent.path = window.location.origin + shareContent.path;
+				}
+				console.log('分享内容》》》》》', shareContent);
+				that.$refs.wxshare.init(shareContent);
+			}, 4 * 1000);
+			// #endif
+		},
+
+		methods: {
+			initLocation() {
+				this.getMerchant();
+			},
+			onShareMessage() {
+				let merchantId = '';
+				let path = '';
+				let isSolution = '';
+				// #ifndef H5
+				isSolution = req.env[req.env.NODE_ENV].isSolution;
+				// #endif
+				// #ifdef H5
+				isSolution = false;
+				// #endif
+				let userInfo = req.getStorage('userInfo');
+				if (isSolution) {
+					path = '/share/home/index?appId=' + req.getStorage('appId') + '&userId=' + userInfo.id;
+				} else {
+					path = '/activity/bargain/detail/detail?id=' + this.query.id + '&acid=' + this.query.acid +
+						'&isShare=' + true + '&appId=' + req.getStorage('appId');
+					if (!userInfo.id) {} else {
+						path += '&userId=' + userInfo.id;
+					}
+
+					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, userInfo.id, path, merchantId, shopId, 9, this.query.acid + '_' + this.query.id);
+				return {
+					title: this.pro.title,
+					imageUrl: this.pro.pic,
+					path: path
+				};
+			},
+
+
+
+			getMerchant() {
+				let that = this;
+				api.getMerchant(this.query, req, data => {
+					that.loadDefaultAddress();
+					if (data == 1) {
+						if (that.about.Many_Store == 1) api.locationShow()
+						else {
+							that.getuserInfos(data);
+							if (req.getStorage('defaultMerchant')) {
+								that.merchant = req.getStorage('defaultMerchant');
+								that.query.merchantId = that.merchant.id
+							} else {
+								api.defaultMerchant(req, that.query, defaultRes => {
+									that.merchant = defaultRes;
+									that.query.merchantId = defaultRes.id
+								});
+							}
+							that.loadProudct(that.query);
+						}
+					} 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
+					}
+				})
+			},
+			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((reject, resolve) => {
+					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 => {
+						let res = data.scene.split('_');
+						this.query.id = res[0];
+						this.query.acid = res[1];
+						this.query.merchantId = res[2];
+						this.query.shopId = res[3];
+						this.query.userId = data.userId;
+						req.setStorage('pidCode', data.userId);
+						req.setStorage('appId', res[res.length - 1]);
+						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;
+					}
+				}
+				if (req.getStorage('appId')) scene += '_' + req.getStorage('appId');
+
+				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 if (this.about.Many_Store == 1) this.pointLocation();
+					}, true);
+				} else {
+					if (this.about.Many_Store == 1) this.pointLocation();
+				}
+			},
+
+			toAddress() {
+				app.globalData.openPage('mine/address/address');
+			},
+
+			toMerchant() {
+				if (this.about.User_Limit_Store == 1) {
+
+				} else {
+					app.globalData.openPage('merchant/nearby/nearby?isChoose=true');
+				}
+			},
+
+			pointLocation() {
+				//定位当前位置
+				let _ts = this;
+
+				QQMapWX.initMap(req.public.mapLBSKEY);
+				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('活动已结束');
+				if (!this.getUpdate()) return false;
+				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('活动已结束');
+				if (!this.getUpdate()) return false;
+				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 + '&appId=' +
+					req.getStorage('appId');
+
+				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
+				})
+			},
+			getUpdate() {
+				let userInfos = req.getStorage('userInfo');
+				if (!userInfos.mobile) {
+					console.log('没有手机号')
+					this.isShowUpdate = true;
+					this.isUpdateMobile = true;
+					req.setStorage('isShowUpdateMobile', true)
+					return false;
+				}
+				if (!userInfos.avatar || userInfos.avatar.indexOf('thirdwx.qlogo') > -1 || userInfos.nickName.indexOf(
+						'用户') > -1) {
+					console.log('没有昵称')
+					this.isShowUpdate = true;
+					this.isUpdateInfo = true;
+					req.setStorage('isShowUpdateInfo', true)
+					return false;
+				}
+				return true;
+			},
+			closeUpdate() {
+				this.isShowUpdate = false
+				this.isUpdateInfo = false;
+				this.isUpdateMobile = false;
+			},
+		}
+	};
+</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="picUrlss+'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;}

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

@@ -0,0 +1,574 @@
+<template>
+<view>
+<!--activity/bargain/kjDetail/kjDetail.wxml-->
+<view class="banner">
+	<image :src="picUrlss+'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>
+<!-- #ifdef H5 -->
+		<wx-share ref="wxshare" />
+		<!-- #endif -->
+</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) {
+	  if(options.appId) req.setStorage('appId',options.appId);
+    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 () {
+	   return this.onShareMessage();
+	  
+    // 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
+    // };
+  },
+  
+  onReady() {
+  	// #ifdef H5
+  	var that = this;
+  	//初始化分享内容
+  	setTimeout(function() {
+  		var shareContent = that.onShareMessage();
+  		if (shareContent) {
+  			shareContent.path = window.location.origin + shareContent.path;
+  		}
+  		console.log('分享内容》》》》》', shareContent);
+  		that.$refs.wxshare.init(shareContent);
+  	}, 4 * 1000);
+  	// #endif
+  },
+  
+  
+  methods: {
+    tab(event) {
+      const tabIndex = event.currentTarget.dataset.current;
+      if (this.currentTab === tabIndex) return false;
+      this.setData({
+        currentTab: tabIndex
+      });
+    },
+	
+	onShareMessage(){
+		let merchantId = '';
+		 let path = '';
+		let isSolution = '';
+		// #ifndef H5
+		isSolution = req.env[req.env.NODE_ENV].isSolution;
+		// #endif
+		// #ifdef H5
+		isSolution = false;
+		// #endif
+		 let userInfo = req.getStorage('userInfo');
+		 let shopId = '';
+		 if(isSolution){
+				  path = '/share/home/index?appId='+req.getStorage('appId')+'&userId='+userInfo.id;
+		 }else{
+					path = '/activity/bargain/kjDetail/kjDetail?id=' + this.query.id + '&superiorId=' + this.aprList.groupMainP.userId + '&proid=' + this.query.proid+ '&appId=' + req.getStorage('appId');
+					  if (!userInfo.id) {} else {
+						path += '&userId=' + userInfo.id;
+					  }
+		 // console.log(this.query.merchantId);
+		   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, userInfo.id, path, merchantId, shopId, 9, this.query.proid + '_' + this.query.id);
+		 return {
+		   title: userInfo.nickName + '邀请您帮忙砍价:' + this.acProduc.productName,
+		   imageUrl: this.acProduc.pic,
+		   path: path
+		 };
+	},
+
+    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;}

+ 145 - 0
activity/content/content.vue

@@ -0,0 +1,145 @@
+<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>
+		<!-- #ifdef H5 -->
+		<wx-share ref="wxshare" />
+		<!-- #endif -->
+	</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) {
+		if(options.appId) req.setStorage('appId',options.appId);
+		uni.showShareMenu({
+			withShareTicket: true,
+			menus: ['shareAppMessage', 'shareTimeline']
+		});
+		this.id = options.id;
+		this.type = options.type ? options.type : 2;
+		this.getDetail();
+	},
+	onShow(){
+	},
+
+	onShareAppMessage() {
+		return this.onShareMessage();
+	},
+	onShareTimeline() {
+		return {
+			title: this.detaile.title,
+			imageUrl: this.detaile.pic,
+			path: '/activity/content/content?id=' + this.id+'&appId='+req.getStorage('appId')
+		};
+	},
+	
+	onReady() {
+		// #ifdef H5
+		var that = this;
+		//初始化分享内容
+		setTimeout(function() {
+			var shareContent = that.onShareMessage();
+			if (shareContent) {
+				shareContent.path = window.location.origin + shareContent.path;
+			}
+			console.log('分享内容》》》》》', shareContent);
+			that.$refs.wxshare.init(shareContent);
+		}, 4 * 1000);
+		// #endif
+	},
+	
+	methods: {
+		
+		onShareMessage(){
+			let path = '';
+			let isSolution = '';
+			// #ifndef H5
+			isSolution = req.env[req.env.NODE_ENV].isSolution;
+			// #endif
+			// #ifdef H5
+			isSolution = false;
+			// #endif
+			if(isSolution){
+				path = '/share/home/index?appId='+req.getStorage('appId')+'&userId='+userInfo.id;
+			}else{
+				path = '/activity/content/content?id=' + this.id+ '&appId=' + req.getStorage('appId');
+			}
+			return {
+				title: this.detaile.title,
+				imageUrl: this.detaile.pic,
+				path: path
+			};
+		},
+		
+		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;}

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

@@ -0,0 +1,1558 @@
+<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="picUrlss+'ptbg.png'" class="ptbg" v-if="act.start"></image>
+			<image :src="picUrlss+'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="picUrlss+'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="picUrlss+'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 ? atOnceBuy() : ''">
+				<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'">
+			<button open-type="contact" class="botbtn">
+				<image src="/static/pages/images/kfico.png"></image>在线客服
+			</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="picUrlss + 'tjcg1.png'" class="tjcg1"></image>
+			<image :src="picUrlss+'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>
+		<update-userinfo :update-info="isUpdateInfo" :update-mobile="isUpdateMobile" v-if="isShowUpdate" @closeUpdate="closeUpdate"></update-userinfo>
+		<privacy :is-update="true" @getLocations="initLocation"></privacy>
+	<!-- #ifdef H5 -->
+	<wx-share ref="wxshare" />
+	<!-- #endif -->
+	</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 productPopup from "../../../components/product-popup/index";
+	import vShare from "../../../components/share/share";
+	import productLogin from "../../../components/product-login/index";
+
+	export default {
+		data() {
+			return {
+				picUrlss: req.public.picUrls,
+				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,
+				isShowUpdate: false,//是否显示更新信息弹窗
+				isUpdateInfo: false,//更新用户信息
+				isUpdateMobile: false,//绑定手机号
+			};
+		},
+
+		components: {
+			productPopup,
+			vShare,
+			productLogin
+		},
+		props: {},
+		onLoad: async function(options) {
+			// console.log(options);
+			if(options.appId) req.setStorage('appId',options.appId);
+			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 : '',
+				}
+				await this.bindUser(params);
+			}else{
+				await req.silenceLogin();
+			}
+
+			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) {
+						that.getMerchant();
+					}
+				})
+				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() {
+			return this.onShareMessage();
+			 // 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();
+		},
+		
+		onReady() {
+			// #ifdef H5
+			var that = this;
+			//初始化分享内容
+			setTimeout(function() {
+				var shareContent = that.onShareMessage();
+				if (shareContent) {
+					shareContent.path = window.location.origin + shareContent.path;
+				}
+				console.log('分享内容》》》》》', shareContent);
+				that.$refs.wxshare.init(shareContent);
+			}, 4 * 1000);
+			// #endif
+		},
+
+		methods: {
+			initLocation(){
+				this.getMerchant();
+			},
+			
+			onShareMessage(){
+				let merchantId = '';
+				let path = '';
+				let isSolution = '';
+				// #ifndef H5
+				isSolution = req.env[req.env.NODE_ENV].isSolution;
+				// #endif
+				// #ifdef H5
+				isSolution = false;
+				// #endif
+				let userInfo = req.getStorage('userInfo');
+				let shopId = '';
+				if(isSolution){
+					path = '/share/home/index?appId='+req.getStorage('appId')+'&userId='+userInfo.id;
+				}else{
+					path = '/activity/group/detail/detail?id=' + this.query.id + '&acid=' + this.query.acid + '&isShare=' +true+ '&appId=' + req.getStorage('appId');
+					// console.log(!req.getStorage('userInfo').id);
+				
+					if (!userInfo.id) {} else {
+						path += '&userId=' + userInfo.id;
+					}
+				
+					// console.log(this.query.merchantId);
+					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, userInfo.id, path, merchantId, shopId, 7, this.query.acid + '_' + this.query.id);
+				return {
+					title: this.pro.title,
+					imageUrl: this.pro.pic,
+					path: path
+				};
+			},
+			
+			getMerchant(){
+				let that = this;
+				api.getMerchant(this.query, req, data => {
+					that.loadDefaultAddress();
+					if (data == 1) {
+						if(that.about.Many_Store == 1) api.locationShow()
+						else{
+							that.getuserInfos(data);
+							if(req.getStorage('defaultMerchant')) {
+								that.merchant = req.getStorage('defaultMerchant');
+								that.query.merchantId = that.merchant.id
+							}else{
+								api.defaultMerchant(req, that.query, defaultRes=>{
+									that.merchant = defaultRes;
+									that.query.merchantId = defaultRes.id
+								});
+							}
+							that.loadProudct(that.query);
+						}
+					} 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
+					}
+				})
+			},
+			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((reject,resolve)=>{
+					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 => {
+						let res = data.scene.split('_');
+						this.query.id = res[0];
+						this.query.acid = res[1];
+						this.query.merchantId = res[2];
+						this.query.shopId = res[3];
+						this.query.userId = data.userId;
+						req.setStorage('pidCode', data.userId);
+						req.setStorage('appId',res[res.length-1]);
+						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;
+					}
+				}
+				if(req.getStorage('appId')) scene += '_'+ req.getStorage('appId');
+				// 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 if(this.about.Many_Store == 1) this.pointLocation();
+					}, true);
+				} else {
+					if(this.about.Many_Store == 1) this.pointLocation();
+				}
+			},
+
+			toAddress() {
+				app.globalData.openPage('mine/address/address');
+			},
+
+			toMerchant() {
+				if (this.about.User_Limit_Store == 1) {
+
+				} else {
+					app.globalData.openPage('merchant/nearby/nearby?isChoose=true');
+				}
+			},
+
+
+			pointLocation() {
+				//定位当前位置
+				let _ts = this;
+
+				QQMapWX.initMap(req.public.mapLBSKEY);
+				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('活动已结束');
+				if(!this.getUpdate()) return false;
+				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.getUpdate()) return false;
+
+				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 => {
+				// })
+				if(!this.getUpdate()) return false;
+				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+'&appId='+req.getStorage('appId');
+
+				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 })
+
+					});
+				})
+			},
+			getUpdate() {
+				let userInfos = req.getStorage('userInfo');
+				if(!userInfos.mobile){
+					console.log('没有手机号')
+					this.isShowUpdate = true;
+					this.isUpdateMobile = true;
+					req.setStorage('isShowUpdateMobile',true)
+					return false;
+				}
+				if (!userInfos.avatar || userInfos.avatar.indexOf('thirdwx.qlogo') > -1 || userInfos.nickName.indexOf('用户') > -1 ) {
+					console.log('没有昵称')
+					this.isShowUpdate = true;
+					this.isUpdateInfo = true;
+					req.setStorage('isShowUpdateInfo',true)
+					return false;
+				}
+				return true;
+			},
+			closeUpdate(){
+				this.isShowUpdate = false
+				this.isUpdateInfo = false;
+				this.isUpdateMobile = false;
+			},
+
+		}
+	};
+</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="picUrlss+'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;}

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

@@ -0,0 +1,449 @@
+<template>
+<view>
+<!--group/ptDetail/ptDetail.wxml-->
+<view class="banner">
+	<image :src="picUrlss+'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>
+<!-- #ifdef H5 -->
+	<wx-share ref="wxshare" />
+	<!-- #endif -->
+</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) {
+	  if(options.appId) req.setStorage('appId',options.appId);
+    this.query = options; // this.getBargainPriceDetail();
+
+    // console.log(options);
+  },
+  onShow: function () {
+    // req.redirectIndex()
+    req.isLogin().then(success => {});
+    this.getBargainPriceDetail();
+  },
+  onShareAppMessage: function () {
+    return this.onShareMessage();
+  },
+  // 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
+	 //  };
+  // },
+  
+  onReady() {
+  	// #ifdef H5
+  	var that = this;
+  	//初始化分享内容
+  	setTimeout(function() {
+  		var shareContent = that.onShareMessage();
+  		if (shareContent) {
+  			shareContent.path = window.location.origin + shareContent.path;
+  		}
+  		console.log('分享内容》》》》》', shareContent);
+  		that.$refs.wxshare.init(shareContent);
+  	}, 4 * 1000);
+  	// #endif
+  },
+  
+  methods: {
+    tab(event) {
+      const tabIndex = event.currentTarget.dataset.current;
+      if (this.currentTab === tabIndex) return false;
+      this.setData({
+        currentTab: tabIndex
+      });
+    },
+	onShareMessage(){
+		let merchantId = '';
+		let path = '';
+		let isSolution = '';
+		// #ifndef H5
+		isSolution = req.env[req.env.NODE_ENV].isSolution;
+		// #endif
+		// #ifdef H5
+		isSolution = false;
+		// #endif
+		let userInfo = req.getStorage('userInfo');
+		let shopId = '';
+		if(isSolution){
+			path = '/share/home/index?appId='+req.getStorage('appId')+'&userId='+userInfo.id;
+		}else{
+			path = '/activity/group/ptDetail/ptDetail?id=' + this.query.id + '&acid=' + this.actData.acProduc.id + '&isShare=' + true + '&appId=' + req.getStorage('appId');
+			// console.log(!req.getStorage('userInfo').id);
+			if (!userInfo.id) {} else {
+			  path += '&userId=' + userInfo.id;
+			}
+			// console.log(this.query.merchantId);
+			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, 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
+		};
+	},
+
+    //获取平团详情
+    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;}

+ 1248 - 0
activity/newbornDetails/newbornDetails.vue

@@ -0,0 +1,1248 @@
+<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="picUrlss+'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="picUrlss+'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'">
+			<button open-type="contact" class="botbtn">
+				<image src="/static/pages/images/kfico.png"></image>在线客服
+			</button>
+			<view class="botbtn" @click="jumpCart('pages/cart/cart')">
+				<image src="/static/pages/images/gwc.png"></image>购物车<text class="message"
+					v-if="pro.count > 0">{{pro.count}}</text>
+			</view>
+			<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="picUrlss + 'tjcg1.png'" class="tjcg1"></image>
+			<image :src="picUrlss+'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>
+		<update-userinfo :update-info="isUpdateInfo" :update-mobile="isUpdateMobile" v-if="isShowUpdate"
+			@closeUpdate="closeUpdate"></update-userinfo>
+		<privacy :is-update="true" @getLocations="initLocation"></privacy>
+		<!-- #ifdef H5 -->
+		<wx-share ref="wxshare" />
+		<!-- #endif -->
+	</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 productPopup from "../../components/product-popup/index";
+	import vShare from "../../components/share/share";
+	import productLogin from "../../components/product-login/index";
+
+	export default {
+		data() {
+			return {
+				picUrlss: req.public.picUrls,
+				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,
+				isShowUpdate: false, //是否显示更新信息弹窗
+				isUpdateInfo: false, //更新用户信息
+				isUpdateMobile: false, //绑定手机号
+			};
+		},
+
+		components: {
+			productPopup,
+			vShare,
+			productLogin
+		},
+		props: {},
+
+		/**
+		 * 生命周期函数--监听页面加载
+		 */
+		onLoad: async function(options) {
+			if (options.appId) req.setStorage('appId', options.appId);
+			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 : '',
+				}
+				await this.bindUser(params);
+			} else {
+				await req.silenceLogin();
+			}
+
+			// console.log(options);
+			// console.info(options);
+			setInterval(() => {
+				this.setData({
+					isNotice: true
+				});
+			}, 10000);
+		},
+
+		onUnload() {
+			if (this.timer) clearInterval(this.timer);
+		},
+
+		onShareAppMessage: function() {
+			return this.onShareMessage();
+			// 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() {
+			// #ifdef H5
+			var that = this;
+			//初始化分享内容
+			setTimeout(function() {
+				var shareContent = that.onShareMessage();
+				if (shareContent) {
+					shareContent.path = window.location.origin + shareContent.path;
+				}
+				console.log('分享内容》》》》》', shareContent);
+				that.$refs.wxshare.init(shareContent);
+			}, 4 * 1000);
+			// #endif
+		},
+
+		/**
+		 * 生命周期函数--监听页面显示
+		 */
+		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) {
+						that.getMerchant();
+					}
+				})
+				// 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: {
+			initLocation() {
+				this.getMerchant();
+			},
+
+			onShareMessage() {
+				let merchantId = '';
+				let path = '';
+				let isSolution = '';
+				// #ifndef H5
+				isSolution = req.env[req.env.NODE_ENV].isSolution;
+				// #endif
+				// #ifdef H5
+				isSolution = false;
+				// #endif
+				let userInfo = req.getStorage('userInfo');
+				let shopId = '';
+				if (isSolution) {
+					path = '/share/home/index?appId=' + req.getStorage('appId') + '&userId=' + userInfo.id;
+				} else {
+					path = '/activity/newbornDetails/newbornDetails?id=' + this.query.id + '&acid=' + this.query.acid +
+						'&isShare=' + true + '&appId=' + req.getStorage('appId');
+					// console.log(!req.getStorage('userInfo').id);
+
+					if (!userInfo.id) {} else {
+						path += '&userId=' + userInfo.id;
+					}
+
+					// console.log(this.query.merchantId);
+					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, userInfo.id, path, merchantId, shopId, 8, this.query.acid + '_' + this
+					.query.id);
+				return {
+					title: this.pro.title,
+					imageUrl: this.pro.pic,
+					path: path
+				};
+			},
+
+			getMerchant() {
+				let that = this;
+				api.getMerchant(this.query, req, data => {
+					that.loadDefaultAddress();
+					if (data == 1) {
+						if (that.about.Many_Store == 1) api.locationShow()
+						else {
+							that.getuserInfos(data);
+							if (req.getStorage('defaultMerchant')) {
+								that.merchant = req.getStorage('defaultMerchant');
+								that.query.merchantId = that.merchant.id
+							} else {
+								api.defaultMerchant(req, that.query, defaultRes => {
+									that.merchant = defaultRes;
+									that.query.merchantId = defaultRes.id
+								});
+							}
+							that.loadProudct(that.query);
+						}
+					} 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
+					}
+				})
+			},
+			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((reject, resolve) => {
+					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) {
+							let res = data.scene.split('_');
+							res.map(it => {
+								if (it.indexOf('poid') > -1) {
+									_ts.query.id = it.split('=')[1]
+								}
+								if (it.indexOf('acid') > -1) {
+									_ts.query.acid = it.split('=')[1]
+								}
+								if (it.indexOf('mid') > -1) {
+									_ts.query.merchantId = it.split('=')[1]
+								}
+								if (it.indexOf('sid') > -1) {
+									_ts.query.shopId = it.split('=')[1]
+								}
+							})
+							this.query.userId = data.userId;
+							req.setStorage('pidCode', data.userId);
+							req.setStorage('appId', res[res.length - 1]);
+						}
+						resolve();
+					});
+				});
+			},
+
+			getCodeUrl() {
+				let that = this; //获取小程序码
+				const query = this.query;
+				let scene = 'poid=' + that.pro.id + '_acid=' + query.acid;
+				if (req.getStorage('MERCHANT') && req.getStorage('MERCHANT').id != null) {
+					scene += '_mid=' + req.getStorage('MERCHANT').id;
+					if (req.getStorage('smallShop') && req.getStorage('MERCHANT').id != null) {
+						scene += '_sid=' + req.getStorage('smallShop').id;
+					}
+				}
+				if (req.getStorage('appId')) scene += '_' + req.getStorage('appId');
+				// 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 if (this.about.Many_Store == 1) this.pointLocation();
+					}, true);
+				} else {
+					if (this.about.Many_Store == 1) this.pointLocation();
+				}
+			},
+
+			toAddress() {
+				app.globalData.openPage('mine/address/address');
+			},
+
+			toMerchant() {
+				if (this.about.User_Limit_Store == 1) {
+
+				} else {
+					app.globalData.openPage('merchant/nearby/nearby?isChoose=true');
+				}
+			},
+
+			toactive() {
+				app.globalData.openPage('merchant/nearby/nearby');
+			},
+
+			pointLocation() {
+				//定位当前位置
+				let _ts = this;
+
+				QQMapWX.initMap(req.public.mapLBSKEY);
+				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('活动已结束');
+				if (!this.getUpdate()) return false;
+				// 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('活动已结束');
+				if (!this.getUpdate()) return false;
+				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 + '&appId=' +
+					req.getStorage('appId');
+
+				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
+				})
+			},
+			getUpdate() {
+				let userInfos = req.getStorage('userInfo');
+				if (!userInfos.mobile) {
+					console.log('没有手机号')
+					this.isShowUpdate = true;
+					this.isUpdateMobile = true;
+					req.setStorage('isShowUpdateMobile', true)
+					return false;
+				}
+				if (!userInfos.avatar || userInfos.avatar.indexOf('thirdwx.qlogo') > -1 || userInfos.nickName.indexOf(
+					'用户') > -1) {
+					console.log('没有昵称')
+					this.isShowUpdate = true;
+					this.isUpdateInfo = true;
+					req.setStorage('isShowUpdateInfo', true)
+					return false;
+				}
+				return true;
+			},
+			closeUpdate() {
+				this.isShowUpdate = false
+				this.isUpdateInfo = false;
+				this.isUpdateMobile = false;
+			},
+			jumpCart(url) {
+				if (req.getStorage('cartTab')) {
+					app.globalData.reLaunchTo(url);
+				} else {
+					app.globalData.openPage(url)
+				}
+			}
+		}
+	};
+</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="picUrlss+'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="picUrlss+'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;}

+ 1177 - 0
activity/seckillDetails/seckillDetails.vue

@@ -0,0 +1,1177 @@
+<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="picUrlss+'msbg.png'" class="ptbg" v-if="act.start"></image>
+			<image :src="picUrlss+'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="picUrlss+'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="picUrlss+'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="picUrlss+'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'">
+			<button open-type="contact" class="botbtn">
+				<image src="/static/pages/images/kfico.png"></image>在线客服
+			</button>
+			<view class="botbtn" @tap="jumpCart('pages/cart/cart')">
+				<image src="/static/pages/images/gwc.png"></image>购物车<text class="message"
+					v-if="pro.count > 0">{{pro.count}}</text>
+			</view>
+			<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="picUrlss + 'tjcg1.png'" class="tjcg1"></image>
+			<image :src="picUrlss+'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>
+		<update-userinfo :update-info="isUpdateInfo" :update-mobile="isUpdateMobile" v-if="isShowUpdate" @closeUpdate="closeUpdate"></update-userinfo>
+		<privacy :is-update="true" @getLocations="initLocation"></privacy>
+	<!-- #ifdef H5 -->
+	<wx-share ref="wxshare" />
+	<!-- #endif -->
+	</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 productPopup from "../../components/product-popup/index";
+	import vShare from "../../components/share/share";
+	import productLogin from "../../components/product-login/index";
+
+	export default {
+		data() {
+			return {
+				picUrlss: req.public.picUrls,
+				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,
+				isShowUpdate: false,//是否显示更新信息弹窗
+				isUpdateInfo: false,//更新用户信息
+				isUpdateMobile: false,//绑定手机号
+			};
+		},
+
+		components: {
+			productPopup,
+			vShare,
+			productLogin
+		},
+		props: {},
+		onLoad: async function(options) {
+			console.log('秒杀详情==' + JSON.stringify(options));
+			if(options.appId) req.setStorage('appId',options.appId);
+			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 : '',
+				}
+				await this.bindUser(params);
+			}else{
+				await req.silenceLogin();
+			}
+
+			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) {
+						that.getMerchant();
+					}
+				})
+				await this.browsRecound(this.query.id);
+			}
+		},
+
+		onUnload() {
+			if (this.timer) clearInterval(this.timer);
+		},
+
+		onShareAppMessage: function() {
+			return this.onShareMessage();
+		},
+		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);
+			}
+		},
+		onReady() {
+			// #ifdef H5
+			var that = this;
+			//初始化分享内容
+			setTimeout(function() {
+				var shareContent = that.onShareMessage();
+				if (shareContent) {
+					shareContent.path = window.location.origin + shareContent.path;
+				}
+				console.log('分享内容》》》》》', shareContent);
+				that.$refs.wxshare.init(shareContent);
+			}, 4 * 1000);
+			// #endif
+		},
+
+		methods: {
+			initLocation(){
+				this.getMerchant();
+			},
+			onShareMessage(){
+				let merchantId = '';
+				let path = '';
+				let isSolution = '';
+				// #ifndef H5
+				isSolution = req.env[req.env.NODE_ENV].isSolution;
+				// #endif
+				// #ifdef H5
+				isSolution = false;
+				// #endif
+				let userInfo = req.getStorage('userInfo');
+				let shopId = '';
+				if(isSolution){
+					path = '/share/home/index?appId='+req.getStorage('appId')+'&userId='+userInfo.id;
+				}else{
+					path = '/activity/seckillDetails/seckillDetails?id=' + this.query.id + '&acid=' + this.query.acid +
+						'&isShare=' + true+ '&appId=' + req.getStorage('appId');
+					// console.log(!req.getStorage('userInfo').id);
+				
+					if (!userInfo.id) {} else {
+						path += '&userId=' + userInfo.id;
+					}
+				
+					// console.log(this.query.merchantId);
+					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, userInfo.id, path, merchantId, shopId, 6, this.query.acid + '_' + this.query.id);
+				return {
+					title: this.pro.title,
+					imageUrl: this.pro.pic,
+					path: path
+				};
+			},
+			
+			getMerchant(){
+				let that = this;
+				api.getMerchant(this.query, req, data => {
+					that.loadDefaultAddress();
+					if (data == 1) {
+						if(that.about.Many_Store == 1) api.locationShow()
+						else{
+							that.getuserInfos(data);
+							if(req.getStorage('defaultMerchant')) {
+								that.merchant = req.getStorage('defaultMerchant');
+								that.query.merchantId = that.merchant.id
+							}else{
+								api.defaultMerchant(req, that.query, defaultRes=>{
+									that.merchant = defaultRes;
+									that.query.merchantId = defaultRes.id
+								});
+							}
+							that.loadProudct(that.query);
+						}
+					} 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
+					}
+				})
+			},
+			bindUser(par){
+				let userInfo = req.getStorage('userInfo');
+				if(!userInfo){
+					req.silenceLogin(par.userId, par.merchantId ? par.merchantId : par.shopId ? par.shopId : '');
+					// 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;
+				}
+			},
+			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((reject,resolve)=>{
+					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) {
+							let res = data.scene.split('_');
+							res.map(it=>{
+								if(it.indexOf('poid')>-1){
+									_ts.query.id = it.split('=')[1]
+								}
+								if(it.indexOf('acid')>-1){
+									_ts.query.acid = it.split('=')[1]
+								}
+								if(it.indexOf('mid')>-1){
+									_ts.query.merchantId = it.split('=')[1]
+								}
+								if(it.indexOf('sid')>-1){
+									_ts.query.shopId = it.split('=')[1]
+								}
+							})
+							_ts.query.userId = data.userId;
+							req.setStorage('pidCode', data.userId);
+							req.setStorage('appId',res[res.length-1]);
+						}
+						resolve();
+					});
+				});
+			},
+
+			getCodeUrl() {
+				let that = this; //获取小程序码
+				const query = this.query;
+				let scene = 'poid='+that.pro.id + '_acid=' + query.acid;
+				if (req.getStorage('MERCHANT') && req.getStorage('MERCHANT').id != null) {
+					scene += '_mid=' + req.getStorage('MERCHANT').id;
+					if (req.getStorage('smallShop') && req.getStorage('MERCHANT').id != null) {
+						scene += '_sid=' + req.getStorage('smallShop').id;
+					}
+				}
+				if(req.getStorage('appId')) scene += '_'+ req.getStorage('appId');
+				// 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 if(this.about.Many_Store == 1) this.pointLocation();
+					}, true);
+				} else {
+					if(this.about.Many_Store == 1) this.pointLocation();
+				}
+			},
+
+			toAddress() {
+				app.globalData.openPage('mine/address/address');
+			},
+
+			toMerchant() {
+				if (this.about.User_Limit_Store == 1) {
+
+				} else {
+					app.globalData.openPage('merchant/nearby/nearby?isChoose=true');
+				}
+			},
+
+			toactive() {
+				app.globalData.openPage('merchant/nearby/nearby');
+			},
+
+			pointLocation() {
+				//定位当前位置
+				let _ts = this;
+
+				QQMapWX.initMap(req.public.mapLBSKEY);
+				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('活动已结束');
+				if(!this.getUpdate()) return false;
+				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('活动已结束');
+				if(!this.getUpdate()) return false;
+				// 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+'&appId='+req.getStorage('appId');
+
+				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
+				})
+			},
+			getUpdate() {
+				let userInfos = req.getStorage('userInfo');
+				if(!userInfos.mobile){
+					console.log('没有手机号')
+					this.isShowUpdate = true;
+					this.isUpdateMobile = true;
+					req.setStorage('isShowUpdateMobile',true)
+					return false;
+				}
+				if (!userInfos.avatar || userInfos.avatar.indexOf('thirdwx.qlogo') > -1 || userInfos.nickName.indexOf('用户') > -1 ) {
+					console.log('没有昵称')
+					this.isShowUpdate = true;
+					this.isUpdateInfo = true;
+					req.setStorage('isShowUpdateInfo',true)
+					return false;
+				}
+				return true;
+			},
+			closeUpdate(){
+				this.isShowUpdate = false
+				this.isUpdateInfo = false;
+				this.isUpdateMobile = false;
+			},
+			jumpCart(url){
+				if(req.getStorage('cartTab')){
+					app.globalData.reLaunchTo(url);
+				}else{
+					app.globalData.openPage(url)
+				}
+			}
+		}
+	};
+</script>
+<style>
+	@import "./seckillDetails.css";
+</style>

BIN
activity/static/activity/images/cha.png


BIN
activity/static/activity/images/clock2.png


BIN
activity/static/activity/images/guarantee.png


BIN
activity/static/activity/images/kanjia.png


BIN
activity/static/activity/images/kanle1.png


BIN
activity/static/activity/images/kanle2.png


BIN
activity/static/activity/images/rednaozhong.png


BIN
activity/static/activity/images/seckill.png


BIN
activity/static/activity/images/seckillDetails.png


BIN
activity/static/activity/images/share_pintuan.jpg


BIN
activity/static/activity/images/xrzx.png


BIN
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 */
+
+@import "./static/iconfont.css";
+@import "./static/stylesheet.css";
+
+page {
+  --mina: #2B8CFF;
+  --submain:#29BDFF;
+  --main: #2B8CFF;
+  --light: #fff;
+  --textbg:#f5fafd;
+  --btn: #2B8CFF;
+  --red: #FE0419;
+  --black: #201d1d;
+  --fff: #fff;
+  --vip:#e6b422;
+  font-size: 28rpx;
+  color: #333;
+  background: #f5f5f5;
+}
+
+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;
+  flex-shrink: 0;
+}
+
+.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));
+	/* background: linear-gradient(90deg, #E0C29A 0%, #B18347 100%); */
+}
+
+.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;
+}
+
+.pdlr30 {
+  padding-left: 30rpx;
+  padding-right: 30rpx;
+}
+
+.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: #fff !important;
+  border-radius: 50% !important;
+  width: 80rpx !important;
+  height: 80rpx !important;
+  box-shadow: 0 0 10rpx rgba(86, 86, 86, 0.36);
+  font-size: 18rpx;
+  color: #555;
+  z-index: 20;
+  text-align: center;
+}
+
+.contact_index image {
+  width: 34rpx;
+  height: 34rpx;
+  margin: 12rpx 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); 
+}

+ 112 - 0
card/components/shmily-drag-image/README.md

@@ -0,0 +1,112 @@
+# 图片拖拽排序插件
+<font color='red'>1. H5 和微信小程序已测试通过</font>
+
+<font color='red'>2. App 和其他平台小程序未测试,大概率支持</font>
+
+<font color='red'>3. 非uni_modules版本未更新</font>
+
+## shmily-drag-image
+
+> 点击预览、长按拖拽排序、自定义添加图片、删除确认、支持对象数组
+
+## 预览
+您可以通过微信扫码,查看最佳的演示效果。
+
+![wp](https://web.shmily.ren/shmily-drag-image/static/wp.jpg)
+
+## 基本使用:
+
+```
+<shmily-drag-image v-model="list"></shmily-drag-image>
+
+
+export default {
+  data() {
+    return {
+      list: [
+        'http://static-11ea0c21-6b8f-47f7-b77f-cb0c7ea3f355.bspapp.com/shmily-drag-image/static/1.jpg',
+        'http://static-11ea0c21-6b8f-47f7-b77f-cb0c7ea3f355.bspapp.com/shmily-drag-image/static/2.jpg',
+        'http://static-11ea0c21-6b8f-47f7-b77f-cb0c7ea3f355.bspapp.com/shmily-drag-image/static/3.jpg',
+      ]
+    }
+  }
+}
+```
+
+## 自定义添加、删除确认:
+```
+<shmily-drag-image v-model="list" :addImage="addImage" :delImage="delImage"></shmily-drag-image>
+
+
+export default {
+  data() {
+    return {
+      list: [
+        'http://static-11ea0c21-6b8f-47f7-b77f-cb0c7ea3f355.bspapp.com/shmily-drag-image/static/1.jpg',
+        'http://static-11ea0c21-6b8f-47f7-b77f-cb0c7ea3f355.bspapp.com/shmily-drag-image/static/2.jpg',
+        'http://static-11ea0c21-6b8f-47f7-b77f-cb0c7ea3f355.bspapp.com/shmily-drag-image/static/3.jpg',
+      ]
+    }
+  },
+  methods:{
+    addImage() {
+      // 将图片地址添加到图片数组
+      this.list.push('http://static-11ea0c21-6b8f-47f7-b77f-cb0c7ea3f355.bspapp.com/shmily-drag-image/static/4.jpg')
+    },
+    delImage(done) {
+      uni.showModal({
+        content: '是否删除?',
+        success: (res) => {
+          if(res.confirm) {
+            // 执行 done() 删除
+            done()
+          }
+        }
+      })
+    }
+  }
+}
+```
+
+## 支持对象数组:
+```
+<shmily-drag-image v-model="list" keyName="src"></shmily-drag-image>
+
+
+export default {
+  data() {
+    return {
+      list: [
+        {
+          src: 'http://static-11ea0c21-6b8f-47f7-b77f-cb0c7ea3f355.bspapp.com/shmily-drag-image/static/1.jpg',
+        },
+        {
+          src: 'http://static-11ea0c21-6b8f-47f7-b77f-cb0c7ea3f355.bspapp.com/shmily-drag-image/static/2.jpg',
+        },
+        {
+          src: 'http://static-11ea0c21-6b8f-47f7-b77f-cb0c7ea3f355.bspapp.com/shmily-drag-image/static/3.jpg',
+        }
+      ]
+    }
+  }
+}
+```
+
+---
+
+## 属性说明
+
+属性名 | 类型 | 默认值 | 说明
+:-:|:-:|:-:|---
+v-model | Array | [ ] | 图片数组,元素为图片地址字符串或对象,默认为`Array<String>`
+keyName | String | null | 从图片数组元素对象中读取的键名
+number | Number | 6 | 图片数量限制
+imageWidth | Number | 0 | 图片父容器宽度(实际显示的图片宽度为 imageWidth / 1.1 ),单位 rpx。imageWidth > 0 则 cols 无效
+cols | Number | 3 | 图片列数(cols > 0 则 imageWidth 无效)
+borderRadius | Number | 0 | 图片圆角,单位 rpx
+padding | Number | 10 | 图片周围空白填充,单位 rpx
+scale | Number | 1.1 | 拖动图片时放大倍数 [0, ∞)
+opacity | Number | 0.7 | 拖动图片时不透明度
+addImage | Function | null | 自定义添加,见上方示例
+delImage | Function | null | 删除确认,见上方示例
+

+ 10 - 0
card/components/shmily-drag-image/changelog.md

@@ -0,0 +1,10 @@
+## 2.0.2(2022-09-17)
+- 修复图片删除
+## 2.0.1(2022-09-16)
+- 修改文档
+## 2.0.0(2022-09-16)
+- 支持 Vue 3
+- 图片数组支持对象元素
+- 新增删除确认
+- 解决了一些已知问题
+- 调整为 uni_modules 目录规范

+ 591 - 0
card/components/shmily-drag-image/components/shmily-drag-image/shmily-drag-image.vue

@@ -0,0 +1,591 @@
+<template>
+  <view class="con">
+    <template v-if="viewWidth">
+      <movable-area class="area" :style="{ height: areaHeight }" @mouseenter="mouseenter" @mouseleave="mouseleave">
+        <movable-view v-for="(item, index) in imageList" :key="item.id" class="view" direction="all" :y="item.y"
+          :x="item.x" :damping="40" :disabled="item.disable" @change="onChange($event, item)"
+          @touchstart="touchstart(item)" @mousedown="touchstart(item)" @touchend="touchend(item)"
+          @mouseup="touchend(item)" :style="{
+          width: viewWidth + 'px', 
+          height: viewWidth + 'px', 
+          'z-index': item.zIndex, 
+          opacity: item.opacity 
+        }">
+          <view class="area-con" :style="{
+            width: childWidth, 
+            height: childWidth, 
+            borderRadius: borderRadius + 'rpx',
+            transform: 'scale(' + item.scale + ')' 
+          }">
+            <image class="pre-image" :src="item.src" mode="aspectFill"></image>
+            <view class="del-con" @click="delImages(item, index)" @touchstart.stop="delImageMp(item, index)"
+              @touchend.stop="nothing()" @mousedown.stop="nothing()" @mouseup.stop="nothing()">
+              <view class="del-wrap">
+                <image class="del-image"
+                  src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAhdEVYdENyZWF0aW9uIFRpbWUAMjAyMDowNzoyNSAyMTo1NDoyOU4TkJAAAADcSURBVFhH7ZfRCoMwDEXLvkjwwVf/bH/emmAyN6glTW9WBjsgwm28OeCLpj81Sil7zvlJ90UiONS/yY5VogsO6XrBg3IEQ5a/s8vRSWUAKmLqp2w5jz5BiNQEGMo3GbloDLtFXJ1IkaEuhAiiY6gEIqB4yqACSk9piIBiKQ8VUFpLviKg3C2rESKgWERCBZSWiEfgIfffYvrrsAgoISJ3Apy3zuTxcSxLQkV6ykNEPKVQkZEyiAiiZKgDIaC4upACSlcn5fM/+WuDCAHF1E/Z/N9AhkMZnPNDPI+UDjPIXgAQIGjNAAAAAElFTkSuQmCC">
+                </image>
+              </view>
+            </view>
+          </view>
+        </movable-view>
+        <view class="add" v-if="imageList.length < number"
+          :style="{ top: add.y, left: add.x, width: viewWidth + 'px', height: viewWidth + 'px' }" @click="addImages">
+          <view class="add-wrap" :style="{ width: childWidth, height: childWidth, borderRadius: borderRadius + 'rpx' }">
+            <image style="width: 54rpx;height: 54rpx;"
+              src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADYAAAA2CAYAAACMRWrdAAABIUlEQVRoQ+2a2w2DMAxFeQzWrsMUbadAsEw3S1CqVgppKwLX8BEOP4iHTXx8uUgWdVXoVhdaV0VhSmf7vr/H8V3XzY6V3P9iD+nYOI5P7/01LMI596AwoZV0TIBXIUWFXhKLFBWYSFGhhxQN6SFFQ5i4ogITKSr0cEVDekjRECauqMBEigq9U7piOk2yAti27SUe5ljlTfPEQ6KZecTvwl4P3ytvOv06R2HDMNzes7+6aRrvnHvtf50L13Lp50rx88zcvNlS3JpwKQ67XyK04nq2nFbk/LqVjin0TvmBNgQ2S4UUDcliHgpMpKjQwxUN6SFFQ5i4ogITKSr0cEVDekjRECauqMAsVoph+hVPtYr5+03p9tbYQ96xrYtT4ootbAJGVxxVTapVswAAAABJRU5ErkJggg==">
+            </image>
+          </view>
+        </view>
+      </movable-area>
+
+    </template>
+  </view>
+</template>
+
+<script>
+	const app = getApp();
+	const req = require('../../../../../utils/request.js');
+	const api = require('../../../../../utils/api.js');
+  export default {
+    emits: ['input', 'update:modelValue'],
+    props: {
+      // 排序图片
+      value: {
+        type: Array,
+        default: function() {
+          return []
+        }
+      },
+      // 排序图片
+      modelValue: {
+        type: Array,
+        default: function() {
+          return []
+        }
+      },
+      // 从 list 元素对象中读取的键名
+      keyName: {
+        type: String,
+        default: null
+      },
+      // 选择图片数量限制
+      number: {
+        type: Number,
+        default: 6
+      },
+      // 图片父容器宽度(实际显示的图片宽度为 imageWidth / 1.1 ),单位 rpx
+      // imageWidth > 0 则 cols 无效
+      imageWidth: {
+        type: Number,
+        default: 0
+      },
+      // 图片列数
+      cols: {
+        type: Number,
+        default: 3
+      },
+      // 图片圆角,单位 rpx
+      borderRadius: {
+        type: Number,
+        default: 0
+      },
+      // 图片周围空白填充,单位 rpx
+      padding: {
+        type: Number,
+        default: 10
+      },
+      // 拖动图片时放大倍数 [0, ∞)
+      scale: {
+        type: Number,
+        default: 1.1
+      },
+      // 拖动图片时不透明度
+      opacity: {
+        type: Number,
+        default: 0.7
+      },
+      // 自定义添加
+      addImage: {
+        type: Function,
+        default: null
+      },
+      // 删除确认
+      delImage: {
+        type: Function,
+        default: null
+      }
+    },
+    data() {
+      return {
+        imageList: [],
+        width: 0,
+        add: {
+          x: 0,
+          y: 0
+        },
+        colsValue: 0,
+        viewWidth: 0,
+        tempItem: null,
+        timer: null,
+        changeStatus: true,
+        preStatus: true,
+        first: true,
+      }
+    },
+    computed: {
+      areaHeight() {
+        let height = ''
+        // return '355px'
+        if (this.imageList.length < this.number) {
+          height = (Math.ceil((this.imageList.length + 1) / this.colsValue) * this.viewWidth).toFixed() + 'px'
+        } else {
+          height = (Math.ceil(this.imageList.length / this.colsValue) * this.viewWidth).toFixed() + 'px'
+        }
+        console.log('areaHeight', height)
+        return height
+      },
+      childWidth() {
+        return this.viewWidth - this.rpx2px(this.padding) * 2 + 'px'
+      },
+    },
+    watch: {
+      value: {
+        handler(n) {
+          if (!this.first && this.changeStatus) {
+            console.log('watch', n)
+            let flag = false
+            for (let i = 0; i < n.length; i++) {
+              if (flag) {
+                this.addProperties(this.getSrc(n[i]))
+                continue
+              }
+              if (this.imageList.length === i || this.imageList[i].src !== this.getSrc(n[i])) {
+                flag = true
+                this.imageList.splice(i)
+                this.addProperties(this.getSrc(n[i]))
+              }
+            }
+          }
+        },
+        deep: true
+      },
+      modelValue: {
+        handler(n) {
+          if (!this.first && this.changeStatus) {
+            console.log('watch', n)
+            let flag = false
+            for (let i = 0; i < n.length; i++) {
+              if (flag) {
+                this.addProperties(this.getSrc(n[i]))
+                continue
+              }
+              if (this.imageList.length === i || this.imageList[i].src !== this.getSrc(n[i])) {
+                flag = true
+                this.imageList.splice(i)
+                this.addProperties(this.getSrc(n[i]))
+              }
+            }
+          }
+        },
+        deep: true
+      },
+    },
+    created() {
+      this.width = uni.getSystemInfoSync().windowWidth
+    },
+    mounted() {
+      const query = uni.createSelectorQuery().in(this)
+      query.select('.con').boundingClientRect(data => {
+        this.colsValue = this.cols
+        this.viewWidth = data.width / this.cols
+        if (this.imageWidth > 0) {
+          this.viewWidth = this.rpx2px(this.imageWidth)
+          this.colsValue = Math.floor(data.width / this.viewWidth)
+        }
+        let list = this.value
+        // #ifdef VUE3
+        list = this.modelValue
+        // #endif
+        for (let item of list) {
+          this.addProperties(this.getSrc(item))
+        }
+        this.first = false
+
+      })
+      query.exec()
+    },
+    methods: {
+      getSrc(item) {
+        if(this.keyName !== null) {
+          return item[this.keyName]
+        }
+        return item
+      },
+      onChange(e, item) {
+        if (!item) return
+        item.oldX = e.detail.x
+        item.oldY = e.detail.y
+        if (e.detail.source === 'touch') {
+          if (item.moveEnd) {
+            item.offset = Math.sqrt(Math.pow(item.oldX - item.absX * this.viewWidth, 2) + Math.pow(item.oldY - item
+              .absY * this.viewWidth, 2))
+          }
+          let x = Math.floor((e.detail.x + this.viewWidth / 2) / this.viewWidth)
+          if (x >= this.colsValue) return
+          let y = Math.floor((e.detail.y + this.viewWidth / 2) / this.viewWidth)
+          let index = this.colsValue * y + x
+          if (item.index != index && index < this.imageList.length) {
+            this.changeStatus = false
+            for (let obj of this.imageList) {
+              if (item.index > index && obj.index >= index && obj.index < item.index) {
+                this.change(obj, 1)
+              } else if (item.index < index && obj.index <= index && obj.index > item.index) {
+                this.change(obj, -1)
+              } else if (obj.id != item.id) {
+                obj.offset = 0
+                obj.x = obj.oldX
+                obj.y = obj.oldY
+                setTimeout(() => {
+                  this.$nextTick(() => {
+                    obj.x = obj.absX * this.viewWidth
+                    obj.y = obj.absY * this.viewWidth
+                  })
+                }, 0)
+              }
+            }
+            item.index = index
+            item.absX = x
+            item.absY = y
+            if (!item.moveEnd) {
+              setTimeout(() => {
+                this.$nextTick(() => {
+                  item.x = item.absX * this.viewWidth
+                  item.y = item.absY * this.viewWidth
+                })
+              }, 0)
+            }
+            // console.log('bbb', JSON.parse(JSON.stringify(item)));
+            this.sortList()
+          }
+        }
+      },
+      change(obj, i) {
+        obj.index += i
+        obj.offset = 0
+        obj.x = obj.oldX
+        obj.y = obj.oldY
+        obj.absX = obj.index % this.colsValue
+        obj.absY = Math.floor(obj.index / this.colsValue)
+        setTimeout(() => {
+          this.$nextTick(() => {
+            obj.x = obj.absX * this.viewWidth
+            obj.y = obj.absY * this.viewWidth
+          })
+        }, 0)
+      },
+      touchstart(item) {
+        this.imageList.forEach(v => {
+          v.zIndex = v.index + 9
+        })
+        item.zIndex = 99
+        item.moveEnd = true
+        this.tempItem = item
+        this.timer = setTimeout(() => {
+          item.scale = this.scale
+          item.opacity = this.opacity
+          clearTimeout(this.timer)
+          this.timer = null
+        }, 200)
+      },
+      touchend(item) {
+        this.previewImage(item)
+        item.scale = 1
+        item.opacity = 1
+        item.x = item.oldX
+        item.y = item.oldY
+        item.offset = 0
+        item.moveEnd = false
+        setTimeout(() => {
+          this.$nextTick(() => {
+            item.x = item.absX * this.viewWidth
+            item.y = item.absY * this.viewWidth
+            this.tempItem = null
+            this.changeStatus = true
+          })
+          // console.log('ccc', JSON.parse(JSON.stringify(item)));
+        }, 0)
+        // console.log('ddd', JSON.parse(JSON.stringify(item)));
+      },
+      previewImage(item) {
+        if (this.timer && this.preStatus && this.changeStatus && item.offset < 28.28) {
+          clearTimeout(this.timer)
+          this.timer = null
+          const list = this.value || this.modelValue
+          let srcList = list.map(v => this.getSrc(v))
+          console.log(list, srcList);
+          uni.previewImage({
+            urls: srcList,
+            current: item.src,
+            success: () => {
+              this.preStatus = false
+              setTimeout(() => {
+                this.preStatus = true
+              }, 600)
+            },
+            fail: (e) => {
+              console.log(e);
+            }
+          })
+        } else if (this.timer) {
+          clearTimeout(this.timer)
+          this.timer = null
+        }
+      },
+      mouseenter() {
+        //#ifdef H5
+        this.imageList.forEach(v => {
+          v.disable = false
+        })
+        //#endif
+
+      },
+      mouseleave() {
+        //#ifdef H5
+        if (this.tempItem) {
+          this.imageList.forEach(v => {
+            v.disable = true
+            v.zIndex = v.index + 9
+            v.offset = 0
+            v.moveEnd = false
+            if (v.id == this.tempItem.id) {
+              if (this.timer) {
+                clearTimeout(this.timer)
+                this.timer = null
+              }
+              v.scale = 1
+              v.opacity = 1
+              v.x = v.oldX
+              v.y = v.oldY
+              this.$nextTick(() => {
+                v.x = v.absX * this.viewWidth
+                v.y = v.absY * this.viewWidth
+                this.tempItem = null
+              })
+            }
+          })
+          this.changeStatus = true
+        }
+        //#endif
+      },
+      addImages() {
+		  let that = this;
+        if (typeof this.addImage === 'function') {
+          this.addImage.bind(this.$parent)()
+        } else {
+          let checkNumber = this.number - this.imageList.length
+          uni.chooseImage({
+            count: checkNumber,
+            sourceType: ['album', 'camera'],
+            success: function({ tempFilePaths }) {
+				uni.showLoading({
+					title: '上传中'
+				});
+				var promise = Promise.all(
+					tempFilePaths.map(tempFilePath => {
+						return new Promise(function(resolve, reject) {
+							req.uploadFile(api.upload, tempFilePath, res => {
+								let picUrls = [];
+								let zhiPicUrls = picUrls.concat(res.src);
+								let count = checkNumber <= zhiPicUrls.length ? checkNumber : zhiPicUrls.length
+								for (let i = 0; i < count; i++) {
+								  that.addProperties(zhiPicUrls[i])
+								}
+								that.sortList()
+								uni.hideLoading();
+								// let picUrls = that.zhiPicUrls;
+								// that.zhiPicUrls = picUrls.concat(res.src);
+								// if (tempFilePaths.length == that.zhiPicUrls.length) {
+								// 	//上传完成,则更新保存
+								// 	that.updateCard(1, that.zhiPicUrls.join(','));
+								// }
+							});
+						});
+					})
+				);
+				promise
+					.then(function(results) {
+						console.log(results);
+					})
+					.catch(function(err) {
+						console.log(err);
+					});
+            }
+          })
+        }
+      },
+      delImages(item, index) {
+        if (typeof this.delImage === 'function') {
+          this.delImage.bind(this.$parent)(() => {
+            this.delImageHandle(item, index)
+          })
+        } else {
+          this.delImageHandle(item, index)
+        }
+      },
+      delImageHandle(item, index) {
+        this.imageList.splice(index, 1)
+        for (let obj of this.imageList) {
+          if (obj.index > item.index) {
+            obj.index -= 1
+            obj.x = obj.oldX
+            obj.y = obj.oldY
+            obj.absX = obj.index % this.colsValue
+            obj.absY = Math.floor(obj.index / this.colsValue)
+            this.$nextTick(() => {
+              obj.x = obj.absX * this.viewWidth
+              obj.y = obj.absY * this.viewWidth
+            })
+          }
+        }
+        this.add.x = (this.imageList.length % this.colsValue) * this.viewWidth + 'px'
+        this.add.y = Math.floor(this.imageList.length / this.colsValue) * this.viewWidth + 'px'
+        this.sortList()
+      },
+      delImageMp(item, index) {
+        //#ifdef MP
+        this.delImages(item, index)
+        //#endif
+      },
+      sortList() {
+        console.log('sortList');
+        const result = []
+        let source = this.value
+        // #ifdef VUE3
+        source = this.modelValue
+        // #endif
+        
+        let list = this.imageList.slice()
+        list.sort((a, b) => {
+          return a.index - b.index
+        })
+        for (let s of list) {
+          let item = source.find(d => this.getSrc(d) == s.src)
+          if (item) {
+            result.push(item)
+          } else {
+            if(this.keyName !== null) {
+              result.push({
+                [this.keyName]: s.src
+              })
+            } else {
+              result.push(s.src)
+            }
+          }
+        }
+        
+        this.$emit("input", result);
+        this.$emit("update:modelValue", result);
+      },
+      addProperties(item) {
+        console.log(item);
+        let absX = this.imageList.length % this.colsValue
+        let absY = Math.floor(this.imageList.length / this.colsValue)
+        let x = absX * this.viewWidth
+        let y = absY * this.viewWidth
+        this.imageList.push({
+          src: item,
+          x,
+          y,
+          oldX: x,
+          oldY: y,
+          absX,
+          absY,
+          scale: 1,
+          zIndex: 9,
+          opacity: 1,
+          index: this.imageList.length,
+          id: this.guid(16),
+          disable: false,
+          offset: 0,
+          moveEnd: false
+        })
+        this.add.x = (this.imageList.length % this.colsValue) * this.viewWidth + 'px'
+        this.add.y = Math.floor(this.imageList.length / this.colsValue) * this.viewWidth + 'px'
+      },
+      nothing() {},
+      rpx2px(v) {
+        return this.width * v / 750
+      },
+      guid(len = 32) {
+        const chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split('')
+        const uuid = []
+        const radix = chars.length
+        for (let i = 0; i < len; i++) uuid[i] = chars[0 | Math.random() * radix]
+        uuid.shift()
+        return `u${uuid.join('')}`
+      }
+    }
+  }
+</script>
+
+<style lang="scss" scoped>
+  .con {
+    // padding: 30rpx;
+
+    .area {
+      width: 100%;
+
+      .view {
+        display: flex;
+        justify-content: center;
+        align-items: center;
+
+        .area-con {
+          position: relative;
+          overflow: hidden;
+
+          .pre-image {
+            width: 100%;
+            height: 100%;
+          }
+
+          .del-con {
+            position: absolute;
+            top: 0rpx;
+            right: 0rpx;
+            padding: 0 0 20rpx 20rpx;
+
+            .del-wrap {
+              width: 36rpx;
+              height: 36rpx;
+              background-color: rgba(0, 0, 0, 0.4);
+              border-radius: 0 0 0 10rpx;
+              display: flex;
+              justify-content: center;
+              align-items: center;
+
+              .del-image {
+                width: 20rpx;
+                height: 20rpx;
+              }
+            }
+          }
+        }
+      }
+
+      .add {
+        position: absolute;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+
+        .add-wrap {
+          display: flex;
+          justify-content: center;
+          align-items: center;
+          background-color: #eeeeee;
+        }
+      }
+    }
+  }
+</style>

+ 84 - 0
card/components/shmily-drag-image/package.json

@@ -0,0 +1,84 @@
+{
+  "id": "shmily-drag-image",
+  "displayName": "图片拖拽排序",
+  "version": "2.0.2",
+  "description": "图片排序、图片拖动排序",
+  "keywords": [
+    "drag",
+    "图片",
+    "排序",
+    "拖拽",
+    "拖动"
+],
+  "repository": "https://github.com/shmilyany/shmily-drag-image",
+  "engines": {
+    "HBuilderX": "^3.2.8"
+  },
+  "directories": {
+    "example": "../../temps/example_temps"
+  },
+"dcloudext": {
+    "sale": {
+      "regular": {
+        "price": "0.00"
+      },
+      "sourcecode": {
+        "price": "0.00"
+      }
+    },
+    "contact": {
+      "qq": "617942150"
+    },
+    "declaration": {
+      "ads": "无",
+      "data": "无",
+      "permissions": "无"
+    },
+    "npmurl": "",
+    "type": "component-vue"
+  },
+  "uni_modules": {
+    "dependencies": ["uni-scss"],
+    "encrypt": [],
+    "platforms": {
+      "cloud": {
+        "tcb": "y",
+        "aliyun": "y"
+      },
+      "client": {
+        "App": {
+          "app-vue": "u",
+          "app-nvue": "u"
+        },
+        "H5-mobile": {
+          "Safari": "y",
+          "Android Browser": "y",
+          "微信浏览器(Android)": "y",
+          "QQ浏览器(Android)": "y"
+        },
+        "H5-pc": {
+          "Chrome": "y",
+          "IE": "n",
+          "Edge": "y",
+          "Firefox": "y",
+          "Safari": "y"
+        },
+        "小程序": {
+          "微信": "y",
+          "阿里": "u",
+          "百度": "u",
+          "字节跳动": "u",
+          "QQ": "u"
+        },
+        "快应用": {
+          "华为": "u",
+          "联盟": "u"
+        },
+        "Vue": {
+          "vue2": "y",
+          "vue3": "y"
+        }
+      }
+    }
+  }
+}

+ 123 - 0
card/components/wangding-pickerAddress/wangding-pickerAddress.vue

@@ -0,0 +1,123 @@
+<template>
+	<picker @change="bindPickerChange" @columnchange="columnchange" :range="array" range-key="name" :value="value" mode="multiSelector"><slot></slot></picker>
+</template>
+
+<script>
+const req = require('../../../utils/request.js');
+// import AllAddress from './data.js';
+let selectVal = ['', '', ''];
+
+export default {
+	data() {
+		return {
+			value: [0, 0,0],
+			ids:[],
+			array: [],
+			index: 0,
+			allAddressData:[]
+		};
+	},
+	created() {
+		this.getReqAreaList();
+	},
+	methods: {
+		getReqAreaList() {
+			req.reqAreaList(data => {
+				this.allAddressData=data.areas;
+				console.log('地址数据====', data);
+				this.initSelect();
+			});
+		},
+		// 初始化地址选项
+		initSelect() {
+			this.updateSourceDate() // 更新源数据
+				.updateAddressDate() // 更新结果数据
+				.updateIdsDate()
+				.$forceUpdate(); // 触发双向绑定
+		},
+		// 地址控件改变控件
+		columnchange(d) {
+			this.updateSelectIndex(d.detail.column, d.detail.value) // 更新选择索引
+				.updateSourceDate() // 更新源数据
+				.updateAddressDate()
+				.updateIdsDate()// 更新结果数据
+				.$forceUpdate(); // 触发双向绑定
+		},
+
+		/**
+		 * 更新源数据
+		 * */
+		updateSourceDate() {
+			this.array = [];
+			if(this.allAddressData.length > 0){
+				this.array[0] = this.allAddressData.map(obj => {
+					return {
+						name: obj.name,
+						id: obj.id
+					};
+				});
+				this.array[1] = this.allAddressData[this.value[0]].children.map(obj => {
+					return {
+						name: obj.name,
+						id: obj.id
+					};
+				});
+				this.array[2] = this.allAddressData[this.value[0]].children[this.value[1]].children.map(obj => {
+					return {
+						name: obj.name,
+						id: obj.id
+					};
+				});
+			}
+			return this;
+		},
+
+		/**
+		 * 更新索引
+		 * */
+		updateSelectIndex(column, value) {
+			let arr = JSON.parse(JSON.stringify(this.value));
+			arr[column] = value;
+			if (column === 0) {
+				arr[1] = 0;
+				// arr[2] = 0;
+			}
+			if (column === 1) {
+				arr[2] = 0;
+			}
+			this.value = arr;
+			return this;
+		},
+
+		/**
+		 * 更新结果数据
+		 * */
+		updateAddressDate() {
+			selectVal[0] = this.array[0][this.value[0]].name+' ';
+			selectVal[1] = this.array[1][this.value[1]].name+' ';
+			selectVal[2] = this.array[2][this.value[2]].name+' ';
+			return this;
+		},
+		updateIdsDate() {
+			this.ids[0] = this.array[0][this.value[0]].id;
+			this.ids[1] = this.array[1][this.value[1]].id;
+			this.ids[2] = this.array[2][this.value[2]].id;
+			return this;
+		},
+
+		/**
+		 * 点击确定
+		 * */
+		bindPickerChange(e) {
+			this.$emit('change', {
+				index: this.value,
+				data: selectVal,
+				ids:this.ids
+			});
+			return this;
+		}
+	}
+};
+</script>
+
+<style></style>

+ 23 - 0
card/create/create.css

@@ -0,0 +1,23 @@
+/* create.css */
+page{background: #f9f9f9;padding-bottom: 130rpx;}
+.form{background: #fff;padding: 0 35rpx 20rpx;margin-bottom: 20rpx;}
+.form .li{padding: 30rpx 0;position: relative;}
+.label{font-size: 30rpx;color: #999;width: 160rpx;}
+.photo{justify-content: space-between;}
+.userimg{width: 90rpx;height: 90rpx;border-radius: 50%;background-color: #EFEFEF;}
+.rico{width: 15rpx;height: 22rpx;}
+.ipt{font-size: 30rpx;color: #333;}
+.textarea{font-size: 30rpx;color: #333;height: 100rpx;}
+.tit{font-size: 30rpx;color: #333;font-weight: bold;padding: 35rpx 0;}
+.alstart{align-items: flex-start;}
+.num{position: absolute;right: 0;bottom: 0;}
+.tong{font-size: 26rpx;color: var(--mina);}
+.tong image{width: 32rpx;height: 32rpx;margin-right: 10rpx;}
+.add{font-size: 26rpx;color: var(--mina);font-weight: normal;}
+.add image{width: 33rpx;height: 33rpx;margin-right: 10rpx;}
+.picker{position: relative;}
+.picker view{width: 100%;font-size: 30rpx;}
+.picker .rico{position: absolute;right: 0;top: 50%;transform: translateY(-50%);}
+.placeholder{color: #ccc;}
+.bot{position: fixed;left: 0;right: 0;bottom: 0;background: #fff;padding: 25rpx 32rpx;z-index: 50;}
+.btn{height: 80rpx;background: var(--mina);border-radius: 40rpx;font-size: 30rpx;color: #fff;text-align: center;line-height: 80rpx;}

+ 329 - 0
card/create/create.vue

@@ -0,0 +1,329 @@
+<template>
+	<view>
+		<view class="form">
+			<view class="li ddflex">
+				<view class="label">头像</view>
+				<view class="photo ddflex flex" @tap="uploadImgs(1)">
+					<image :src="avatar ? avatar : '../../static/pages/images/userimg.png'" mode="aspectFill" class="userimg"></image>
+					<image src="../../static/pages/images/rico.png" class="rico"></image>
+				</view>
+			</view>
+			<view class="li ddflex">
+				<view class="label">姓名</view>
+				<input v-model="realName" placeholder="请填写你的真实姓名" placeholder-class="placeholder" class="ipt flex" />
+			</view>
+			<view class="li ddflex">
+				<view class="label">服务寄语</view>
+				<input v-model="msg" placeholder="请填写你的服务寄语" placeholder-class="placeholder" class="ipt flex" />
+			</view>
+			<!-- <view class="li ddflex">
+				<view class="label">个人简介</view>
+				<input v-if="!brief" @tap="jumpUrl('/card/editDesc/editDesc')" :disabled="true"  maxlength="11" type="number" placeholder="请做简单自我介绍" placeholder-class="placeholder" class="ipt flex" />
+				<view class="fflex" v-else style="color: #47C776;" @tap="jumpUrl('/card/editDesc/editDesc')">已完善</view>
+				<image src="../../static/pages/images/rico.png" class="rico"></image>
+			</view> -->
+		</view>
+		
+		<view class="form">
+			<view class="tit ddflex"><view class="flex">联系信息</view></view>
+			<view class="li ddflex">
+				<view class="label">手机</view>
+				<input v-model="phone" maxlength="11" type="number" placeholder="请填写手机号" placeholder-class="placeholder" class="ipt flex" />
+				<view class="tong ddflex" @click="intWechatNumber"><image src="../static/images/wxth.png"></image>微信同号</view>
+			</view>
+			<view class="li ddflex">
+				<view class="label">邮箱</view>
+				<input v-model="email" placeholder="请填写邮箱地址" placeholder-class="placeholder" class="ipt flex" />
+			</view>
+			<view class="li ddflex">
+				<view class="label">微信号</view>
+				<input v-model="wechat" placeholder="请填写微信号" placeholder-class="placeholder" class="ipt flex" />
+			</view>
+		</view>
+
+		<view class="form">
+			<view class="tit ddflex"><view class="flex">公司信息</view></view>
+			<view class="li ddflex">
+				<view class="label">公司</view>
+				<input v-model="companyName" placeholder="请填写公司名称" placeholder-class="placeholder" class="ipt flex" />
+			</view>
+			<view class="li ddflex">
+				<view class="label">职位</view>
+				<input v-model="job" placeholder="请填写职位" placeholder-class="placeholder" class="ipt flex" />
+				<view class="ddflex" style="padding: 30rpx 0 30rpx 90rpx;"
+					@click="jumpUrl('/card/industry/industry?isPoistion=true')">
+					<view class="tong ddflex" style="margin-right: 10rpx;">
+						常用职位
+					</view>
+					<image src="../../static/pages/images/rico.png" class="rico"></image>
+				</view>
+			</view>
+			<!-- <view class="li ddflex" @click="jumpUrl('/card/industry/industry?isPoistion=true')">
+				<view class="label">行业</view>
+				<view :class="'flex' + (industryName ? '' :' placeholder')">{{industryName ? industryName : '请填写行业'}}</view>
+				<image src="../../static/pages/images/rico.png" class="rico"></image>
+			</view> -->
+			<view class="li ddflex">
+				<view class="label">所在地区</view>
+				<view :class="['item flex', city ? 'active' : '']">
+					<!-- #ifdef MP-WEIXIN -->
+					<picker class="picker flex" mode="region" :value="morCity" @change="bindCity">
+						<view :class="city?'':'placeholder'">{{ city ? city : '请选择地区' }}</view>
+					</picker>
+					<!-- #endif -->
+					<!-- #ifdef APP-PLUS -->
+					<pickerAddress class="picker flex" @change="bindAddressChange">
+						<view :class="city?'':'placeholder'">{{ city ? city : '请选择地区' }}</view>
+					</pickerAddress>
+					<!-- #endif -->
+				</view>
+				<image src="../../static/pages/images/rico.png" class="rico"></image>
+				<!-- <picker class="picker flex">
+					<view class="placeholder">请选择省份城市</view>
+					<image src="../../static/images/rico.png" class="rico"></image>
+				</picker> -->
+			</view>
+			<view class="li ddflex">
+				<view class="label">地址</view>
+				<input v-model="address" placeholder="填写街道地址" placeholder-class="placeholder" class="ipt flex" />
+			</view>
+			<!-- <view class="li ddflex">
+				<view class="label">公司LOGO</view>
+				<view class="photo ddflex flex" @tap="uploadImgs(2)">
+					<image :src="companyLogo ? companyLogo : ''" mode="aspectFit" class="userimg"></image>
+					<image src="../../static/pages/images/rico.png" class="rico"></image>
+				</view>
+			</view> -->
+		</view>
+		<view class="bot">
+			<view class="btn" @click="submitCard()">{{ isEdit ? '保存' : '确认创建' }}</view>
+		</view>
+	</view>
+</template>
+
+<script>
+const req = require('../../utils/request.js');
+const api = require('../../utils/api.js');
+const util = require('../../utils/util.js');
+var app = getApp();
+import pickerAddress from '../components/wangding-pickerAddress/wangding-pickerAddress.vue';
+export default {
+	components: { pickerAddress },
+	data() {
+		return {
+			avatar: '',
+			realName: '',
+			phone: '',
+			wechat: '',
+			email: '',
+			companyName: '',
+			job:'',//职业
+			industryName: '',//行业
+			tradeId: '',//行业id
+			message: '',
+			isEdit: false,
+			id: '' ,//名片id
+			nums: 0,
+			msg: '',
+			brief:'',//简介
+			address:'',//详细地址
+			companyLogo: '',
+			
+			city: '',
+			areaCode: '',
+			morCity: [],
+			
+			userCard:null,//用户IP名片
+		};
+	},
+	onLoad(opt) {
+		this.isEdit = opt.isEdit;
+		this.id = opt.id;
+		console.log('getUserCard')
+		this.getUserCard()
+	},
+
+	methods: {
+		getUserInfo(){
+			return new Promise((resolve,reject)=>{
+				req.getRequest('/api/user/info',{},res=>{
+					this.avatar = res.avatar;
+					this.realName = res.realName ? res.realName : res.nickName;
+					this.phone = res.mobile;
+					resolve();
+				})
+			})
+		},
+		// 用户名片信息
+		getUserCard(){
+			req.getRequest(api.card_userInfo, {}, res => {
+				console.log('getUserCard',res)
+				this.userCard = res
+				if(!res){
+					this.getCompanyData()
+					this.getUserInfo()
+				}else{
+					this.id = res.id
+					this.avatar = res.avatar;
+					this.realName = res.realName;
+					this.msg = res.msg;
+					this.brief = res.brief;
+					this.phone = res.phone;
+					this.wechat = res.wechat;
+					this.email = res.email;
+					this.companyName = res.companyName;
+					this.industryName = res.industryName;
+					this.tradeId = res.tradeId;
+					this.address = res.address;
+					this.companyLogo = res.companyLogo;
+					this.job = res.job;
+					res.areaCode = JSON.parse(res.areaCode)
+					this.morCity = [res.areaCode.id.substring(0,2)+'0000',res.areaCode.id.substring(0,4)+'00',res.areaCode.id]
+					this.city = res.areaCode.name
+					this.areaCode = this.morCity[2];
+				}
+			});
+		},
+		getCompanyData(){
+			req.getRequest('/api/CKBCompany/info',{},res=>{
+				if(res){
+					this.companyName = res.title
+					this.industryName = res.trade
+					this.tradeId = res.industryId
+					this.address = res.address
+					this.morCity = JSON.parse(res.areaCode).map(item=>{return item.id})
+					this.areaCode = JSON.parse(res.areaCode).map(item=>{return item.id})[2]
+					this.city = JSON.parse(res.areaCode).map(item=>{return item.name}).join('')
+				}
+			})
+		},
+		jumpUrl(url) {
+			uni.navigateTo({
+				url: url
+			});
+		},
+		uploadImgs(type) {
+			let that = this;
+			uni.chooseImage({
+				count: 1,
+				sizeType: ['original', 'compressed'],
+				sourceType: ['album', 'camera'],
+				success: function({ tempFilePaths }) {
+					uni.showLoading({
+						title: '正在上传'
+					})
+					var promise = Promise.all(
+						tempFilePaths.map(tempFilePath => {
+							return new Promise(function(resolve, reject) {
+								req.uploadFile('/api/upload', tempFilePath, res => {
+									if(type == 1){
+										that.avatar = res.src;
+									}else{
+										that.companyLogo = res.src;
+									}
+									uni.hideLoading();
+								});
+							});
+						})
+					);
+					promise
+						.then(function(results) {
+							console.log(results);
+						})
+						.catch(function(err) {
+							console.log(err);
+						});
+				}
+			});
+		},
+		intMessage(e){
+			this.nums = e.detail.value.length
+		},
+		intWechatNumber(){
+			this.wechat = this.phone
+		},
+		
+		bindCity: function(e) {
+			this.morCity = e.detail.code;
+			this.city = e.detail.value.join().replace(/[,]/g, '');
+			this.areaCode = e.detail.code[2];
+		},
+		
+		bindAddressChange(data) {
+			this.morCity = data.ids;
+			this.city = data.data[0] + data.data[1] + data.data[2];
+			this.areaCode = data.ids[2];
+		},
+
+		/**
+		 * 提交名片
+		 */
+		submitCard() {
+			let that = this;
+			if (!this.avatar) return req.msg('请上传头像');
+			if (!this.realName) return req.msg('请填写你的真实姓名');
+			if (!this.msg) return req.msg('请填写你的服务寄语');
+			// if (!this.brief) return req.msg('请填写个人简介');
+			if (!this.phone) return req.msg('请填写手机号');
+			if (!this.wechat) return req.msg('请填写微信号');
+			if (!this.email) return req.msg('请填写邮箱地址');
+			if (!this.companyName) return req.msg('请填写公司名称');
+			if (!this.job) return req.msg('请填写职位')
+			// if (!this.industryName) return req.msg('请填写行业');
+			if (!this.areaCode) return req.msg('请选择所在地区');
+			if (!this.address) return req.msg('请填写详细地址');
+			// if (!this.companyLogo) return req.msg('请上传公司LOGO');
+			var dataP = {};
+			dataP.avatar = this.avatar;
+			dataP.realName = this.realName;
+			dataP.msg = this.msg;
+			// dataP.brief = this.brief;
+			dataP.phone = this.phone;
+			dataP.wechat = this.wechat;
+			dataP.email = this.email;
+			dataP.companyName = this.companyName;
+			dataP.job = this.job;
+			// dataP.industryName = this.industryName;
+			// dataP.tradeId = this.tradeId;
+			dataP.areaCode = {
+				id:this.areaCode,
+				name :this.city
+			};
+			dataP.areaCode = JSON.stringify(dataP.areaCode)
+			dataP.address = this.address;
+			// dataP.companyLogo = this.companyLogo;
+			var url = '';
+			if (this.id) {
+				dataP.id = this.id;
+			} 
+
+			req.postRequest(
+				api.card_saveOrUpdate,
+				dataP,
+				json => {
+					if (that.id) {
+						req.msg('保存成功');
+						setTimeout(function() {
+							uni.navigateBack({
+								delta: 1
+							});
+						}, 1500);
+					} else {
+						req.msg('名片创建成功');
+						setTimeout(function() {
+							uni.redirectTo({
+								url: '/card/index/index'
+							})
+						}, 1500);
+					}
+				},
+				true
+			);
+		}
+	}
+};
+</script>
+
+<style>
+@import './create.css';
+</style>

+ 7 - 0
card/editDesc/editDesc.css

@@ -0,0 +1,7 @@
+page{background-color: #fff;}
+.content {padding: 0 56rpx 520rpx;border-top: 2rpx solid #fbfbfb;}
+.placeholder {color: #A2A6AF;}
+.textarea {height: 500rpx;padding: 30rpx 0;width: 100%;font-size: 32rpx;color: #666;}
+.brief {font-size: 28rpx;color: #999;margin: 25rpx 0 0;}
+.brief text {color: var(--mina);}
+.btn {width: 638rpx;height: 94rpx;background: var(--mina);border-radius: 47rpx;font-size: 36rpx;color: #fff;text-align: center;line-height: 94rpx;margin: 0 auto; margin-top: 30rpx; }

+ 108 - 0
card/editDesc/editDesc.vue

@@ -0,0 +1,108 @@
+<template>
+	<view class="content">
+		<editor
+			@ready="onEditorReady"
+			id="editor"
+			placeholder="输入个人简介内容"
+			placeholder-class="placeholder"
+			class="textarea"
+			@input="descInput"
+			:read-only="isReadOnly"
+		></editor>
+
+		<view class="btn" @click="save()">保存</view>
+	</view>
+</template>
+
+<script>
+const app = getApp();
+const req = require('../../utils/request.js');
+const api = require('../../utils/api.js');
+export default {
+	data() {
+		return {
+			id: '',
+			brief: '',
+			isReadOnly: true
+		};
+	},
+
+	onLoad(opt) {
+		this.id = opt.id;
+		let pages = getCurrentPages();
+		let prevPage = pages[pages.length - 2];
+		if(prevPage && prevPage.$vm.brief){
+			this.brief = prevPage.$vm.brief;
+		}
+	},
+
+	methods: {
+		descInput(event) {
+			this.brief = event.detail.html;
+			// if (this.brief) {
+			// 	this.descLength = event.detail.text.length - 1;
+			// } else {
+			// 	this.descLength = 0;
+			// }
+		},
+		onEditorReady() {
+			if (this.isEndit) {
+				return;
+			}
+			const that = this;
+			uni.createSelectorQuery()
+				.select('#editor')
+				.context(function(res) {
+					that.editorCtx = res.context;
+					that.editorCtx.setContents({
+						html: that.brief //这里就是设置默认值的地方(html 后面给什么就显示什么)
+					});
+					that.isReadOnly = false;
+				})
+				.exec();
+		},
+		save() {
+			var prama = {
+				id: this.id,
+				brief: this.brief
+			};
+		
+			req.postRequest(
+				api.card_saveOrUpdate,
+				prama,
+				json => {
+					req.msg('保存成功');
+					let pages = getCurrentPages(); //获取所有页面栈实例列表
+					let prevPage = pages[pages.length - 2]; //上一页页面实例
+					prevPage.$vm.cardInfo.brief = this.brief;
+					uni.navigateBack({
+						//uni.navigateTo跳转的返回,默认1为返回上一级
+						delta: 1
+					});
+				},
+				true
+			);
+		}
+	// 	save() {
+	// 		if(!this.brief) return req.msg('输入个人简介内容')
+	// 		let pages = getCurrentPages(); //获取所有页面栈实例列表
+	// 		let prevPage = pages[pages.length - 2]; //上一页页面实例
+	// 		prevPage.$vm.brief = this.brief;
+	// 		uni.navigateBack({
+	// 			//uni.navigateTo跳转的返回,默认1为返回上一级
+	// 			delta: 1
+	// 		});
+	// 	}
+	}
+};
+</script>
+
+<style>
+@import './editDesc.css';
+.ql-editor.ql-blank:before {
+	/* 此处设置 placeholder 样式 */
+	color: rgba(204, 204, 204, 1);
+	font-style: normal;
+	min-height: 400px;
+}
+</style>

+ 1 - 0
card/imgList/index.css

@@ -0,0 +1 @@
+.save{position: fixed;left: 30rpx;right: 30rpx;bottom: 60rpx;height: 80rpx;background-color: var(--mina);font-size: 30rpx;color: #fff;border-radius: 40rpx;text-align: center;line-height: 80rpx;}

+ 62 - 0
card/imgList/index.vue

@@ -0,0 +1,62 @@
+<template>
+	<view>
+		<shmily-drag-image :number="9" v-model="list"></shmily-drag-image>
+		<view class="save" @tap="updateCard()">保存</view>
+	</view>
+</template>
+
+<script>
+const app = getApp();
+const req = require('../../utils/request.js');
+const api = require('../../utils/api.js');
+import shmilyDragImage from "../../card/components/shmily-drag-image/components/shmily-drag-image/shmily-drag-image.vue";
+export default {
+	components:{
+		shmilyDragImage
+	},
+  data() {
+	return {
+	  list: [],
+	  id: ''
+	}
+  },
+  onLoad(opt) {
+  	this.id = opt.id;
+  	let pages = getCurrentPages();
+  	let prevPage = pages[pages.length - 2];
+  	if(prevPage && prevPage.$vm.cardInfo.pictures){
+		console.log('图片',prevPage.$vm.cardInfo.pictures)
+  		this.list = prevPage.$vm.cardInfo.pictures.split(',');
+  	}
+  },
+  
+  methods: {
+  	/**
+  	 * @param {Object} type 1图片 2、视频
+  	 * @param {Object} url 资源地址
+  	 */
+  	updateCard() {
+  		var dataP = {};
+  		dataP.id = this.id;
+		dataP.pictures = this.list.join(',');
+  		req.postRequest(api.card_saveOrUpdate, dataP, json => {
+			uni.navigateBack()
+  		});
+  	},
+  // 	save() {
+  // 		if(!this.brief) return req.msg('输入个人简介内容')
+  // 		let pages = getCurrentPages(); //获取所有页面栈实例列表
+  // 		let prevPage = pages[pages.length - 2]; //上一页页面实例
+  // 		prevPage.$vm.brief = this.brief;
+  // 		uni.navigateBack({
+  // 			//uni.navigateTo跳转的返回,默认1为返回上一级
+  // 			delta: 1
+  // 		});
+  // 	}
+  }
+}
+</script>
+
+<style>
+	@import './index.css';
+</style>

+ 64 - 0
card/index/index.css

@@ -0,0 +1,64 @@
+/* index.css */
+page{background: #f2f2f2;padding-bottom: 50rpx;}
+.photo{margin: 32rpx 32rpx 0;box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.06);border-radius: 12rpx 12rpx 0 0;height: 682rpx;position: relative;}
+.poster{width: 100%;height: 100%;border-radius: 12rpx 12rpx 0 0;}
+.change{position: absolute;right: 0;bottom: 0;background: rgba(0,0,0,.5);font-size: 24rpx;color: #fff;padding: 8rpx 10rpx;border-radius: 15rpx 0 0 0;}
+.change image{width: 29rpx;height: 25rpx;margin-right: 12rpx;}
+.upload{width: 100%;height: 100%;flex-direction: column;justify-content: center;font-size: 26rpx;color: var(--main);}
+.upload image{width: 27rpx;height: 27rpx;margin: 0 auto 20rpx;}
+.infos{background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #FFFFFF 43%, #FFFFFF 100%);}
+.info{margin: 0 32rpx;background: #fff;border-radius: 0 0 12rpx 12rpx;box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.06);padding: 40rpx;}
+.company{font-size: 28rpx;color: #666;}
+.name{font-size: 38rpx;color: #333;font-weight: bold;margin-top: 30rpx;}
+.job{font-size: 24rpx;color: #666;margin-top: 10rpx;}
+.logo{width: 128rpx;height: 128rpx;border: 1rpx solid #D9D9D9;border-radius: 50%;}
+.logo image{width: 100%;height: 100%;border-radius: 50%;}
+.zhan{justify-content: center;font-size: 24rpx;color: #999;padding: 30rpx 0;}
+.bico{width: 23rpx;height: 14rpx;margin-left: 15rpx;transition: all .3s ease;}
+.zhan-romate .bico{transform: rotate(180deg);}
+.share{width: 638rpx !important;height: 94rpx !important;background: #108FFF;border-radius: 47rpx !important;font-size: 36rpx;color: #fff;text-align: center;line-height: 94rpx !important;margin: 0 auto !important;}
+.opt{justify-content: space-around;width: 638rpx;margin: 15rpx auto 0;border-bottom: 1rpx solid #e9e9e9;}
+.opt .li{font-size: 26rpx;color: #333;padding: 40rpx 0;}
+.opt .li image{width: 49rpx;height: 44rpx;margin: 0 auto 10rpx;}
+.datas{padding: 28rpx 32rpx;}
+.users{padding-left: 10rpx;font-size: 24rpx;color: #999;}
+.users image{width: 50rpx;height: 50rpx;border-radius: 50%;margin-left: -10rpx;}
+/* .users view{margin-left: 15rpx;} */
+.q-users{margin-right: 20rpx;}
+.q-users image{width: 50rpx;height: 50rpx;border: 2rpx solid #E5E5E5;border-radius: 50%;margin-left: -14rpx;background: #D8D8D8;}
+.q-users image:first-child{margin-left: 0;}
+.zan,.renqi{font-size: 22rpx;color: #5F5F5F;}
+.renqi{margin-left: 50rpx;}
+.zan image{width: 30rpx;height: 32rpx;margin-right: 10rpx;}
+.renqi image{width: 25rpx;height: 33rpx;margin-right: 10rpx;}
+.box{background: #fff;border-radius: 12rpx;margin: 20rpx 32rpx;padding: 0 30rpx;overflow: hidden;}
+.brief{padding-bottom: 45rpx;}
+.tit{font-size: 30rpx;color: #000;font-weight: 600;margin: 35rpx 0 0;}
+.tit image{width: 42rpx;height: 42rpx;margin-right: 20rpx;}
+.tit text{font-size: 24rpx;color: #999;margin-left: 15rpx;font-weight: normal;}
+.bri{font-size: 28rpx;color: #333;line-height: 38rpx;margin-top: 25rpx;}
+.card-datas{margin-top: 20rpx;}
+.card-datas .li{font-size: 24rpx;color: #999;width: 33.33%;text-align: center;padding: 35rpx 0;}
+.card-datas .li text{display: block;font-size: 38rpx;color: #333;margin-bottom: 5rpx;}
+.tit image.edit{width: 30rpx;height: 32rpx;margin-right: 0;}
+.videos{padding-bottom: 40rpx;}
+.video{margin-top: 30rpx;}
+.not{font-size: 30rpx;color: #108FFF;text-align: center;padding: 70rpx 0 30rpx;}
+.not image{width: 53rpx;height: 46rpx;margin: 0 auto 20rpx;}
+.video-sp{width: 100%;height: 352rpx;border-radius: 4rpx;}
+.pic{padding-bottom: 40rpx;}
+.picture{margin-top: 30rpx;}
+.pics image{width: 100%;margin-top: 20rpx;}
+.pics image:first-child{margin-top: 0;}
+.also{font-size: 26rpx;color: #108FFF;text-align: center;padding: 20rpx 0 40rpx;}
+.contacts{height: 136rpx;overflow: hidden;margin: 30rpx 0 0;}
+.contact{white-space: nowrap;height: 136rpx;padding-bottom: 20rpx;}
+.contact .li{display: inline-block;height: 136rpx;background: #FFFFFF;border: 1rpx solid #CFCFCF;border-radius: 10rpx;box-sizing: border-box;padding: 25rpx 22rpx 0;margin-right: 25rpx;min-width: 270rpx;line-height: 1;}
+.contact .li:first-child{margin-left: 32rpx;}
+.contact .li:last-child{margin-right: 32rpx;}
+.lit{font-size: 26rpx;color: #000;}
+.lit image{width: 34rpx;height: 34rpx;margin-right: 10rpx;}
+.num{font-size: 24rpx;color: #666;margin-top: 22rpx;}
+.btns{padding: 0 32rpx;justify-content: space-between;margin-top: 30rpx;}
+.share-ta{width: 326rpx;height: 90rpx;border: 2rpx solid #108fff;font-size: 36rpx;color: #108fff;text-align: center;line-height: 90rpx;border-radius: 47rpx;}
+.save{width: 330rpx;height: 94rpx;background: #108fff;font-size: 36rpx;color: #fff;text-align: center;line-height: 94rpx;border-radius: 47rpx;}

+ 719 - 0
card/index/index.vue

@@ -0,0 +1,719 @@
+<template>
+	<view>
+		<view class="photo">
+			<block v-if="cardInfo.imageMap">
+				<image :src="cardInfo.imageMap" mode="aspectFill" class="poster"></image>
+				<view class="change ddflex" @click="uploadImg()">
+					<image src="../static/images/sc_ico.png"></image>
+					更换形象图
+				</view>
+			</block>
+			<view class="upload ddflex" v-else @click="uploadImg()">
+				<image src="../static/images/jia.png"></image>
+				上传专属形象
+			</view>
+		</view>
+		<view class="infos">
+			<view class="info ddflex">
+				<view class="flex">
+					<view class="company">{{ cardInfo.companyName }}</view>
+					<view class="name">{{ cardInfo.realName }}</view>
+					<view class="job">{{ cardInfo.job }}</view>
+				</view>
+				<view class="logo">
+					<image :src="cardInfo.avatar" mode="aspectFit"></image>
+				</view>
+				<!-- <view class="logo"><image src="../static/images/wap_logo.png" mode="aspectFit"></image></view> -->
+			</view>
+			<view class="btns ddflex" v-if="cardId">
+				<button open-type="share" hover-class="none" class="share-ta">分享名片</button>
+				<view class="save" @tap="addContact()">保存到通讯录</view>
+			</view>
+			<view class="contacts" v-if="cardId || isShowContacts">
+				<scroll-view scroll-x="true" class="contact">
+					<view class="li" @click="goPhone()">
+						<view class="lit dflex">
+							<image src="../static/images/phone.png"></image>
+							拨打电话
+						</view>
+						<view class="num">{{ cardInfo.phone }}</view>
+					</view>
+					<view class="li" @click="copy(cardInfo.wechat, 1)">
+						<view class="lit ddflex">
+							<image src="../static/images/wechat.png"></image>
+							复制微信
+						</view>
+						<view class="num">{{ cardInfo.wechat }}</view>
+					</view>
+					<view class="li" @click="copy(cardInfo.email, 2)">
+						<view class="lit ddflex">
+							<image src="../static/images/message.png"></image>
+							复制邮箱
+						</view>
+						<view class="num">{{ cardInfo.email }}</view>
+					</view>
+				</scroll-view>
+			</view>
+			<view :class="'zhan ddflex' + (isShowContacts ? ' zhan-romate' : '')" v-if="!cardId"
+				@click="showContacts()">
+				{{ isShowContacts ? '收起' : '展开全部名片信息' }}
+				<image src="../static/images/bico1.png" class="bico"></image>
+			</view>
+			<block v-if="!cardId">
+				<button open-type="share" hover-class="none" class="share">发名片</button>
+				<view class="opt ddflex">
+					<view class="li" @click="jumpUrl('/card/create/create?isEdit=true&id=' + cardInfo.id)">
+						<image src="../static/images/edit.png"></image>
+						<view>编辑名片</view>
+					</view>
+					<!-- <view class="li">
+						<image src="../static/images/fx_ico.png"></image>
+						<view>分享图像名片</view>
+					</view> -->
+					<view class="li" @click="jumpUrl('/card/poster/poster?id=' + cardInfo.id)">
+						<image src="../static/images/code.png"></image>
+						<view>名片码</view>
+					</view>
+				</view>
+			</block>
+			<view class="datas ddflex">
+				<view class="users ddflex fflex">
+					<!-- <view class="q-users ddflex" v-if="cardInfo.pageUser.list.length > 0">
+						<image :src="item.avatar" mode="aspectFill" v-for="(item, index) in cardInfo.pageUser.list" v-if="index<3" :key="index"></image>
+					</view> -->
+					<view class="fflex">{{ cardInfo.person }}人看过</view>
+				</view>
+				<view class="zan ddflex" @click="userBehavior(3)">
+					<image :src="'../static/images/'+(cardInfo.isThumbs ? 'like_h.png':'zan_ico.png')"></image>
+					{{ cardInfo.thumbs }}
+				</view>
+				<!-- <view class="renqi ddflex">
+					<image src="../static/images/rqico.png"></image>
+					{{ cardInfo.viewsNo }}
+				</view> -->
+			</view>
+		</view>
+		<view class="box brief">
+			<view class="tit ddflex">
+				<view class="flex ddflex">
+					<image src="../static/images/jj_ico.png"></image>
+					<view>个人简介</view>
+				</view>
+				<image v-if="!cardId" src="../static/images/bj_ico.png" class="edit"
+					@tap="jumpUrl('/card/editDesc/editDesc?id=' + cardInfo.id)"></image>
+			</view>
+			<view class="bri"><rich-text :nodes="cardInfo.brief ? cardInfo.brief : '一句话介绍自己'"></rich-text></view>
+		</view>
+		<view class="box" v-if="!cardId">
+			<view class="tit ddflex">
+				<image src="../static/images/sj_ico.png"></image>
+				<view>
+					名片数据
+					<text>(人次)</text>
+				</view>
+			</view>
+			<view class="card-datas ddflex">
+				<view class="li">
+					<text>{{ cardInfo.todayBrowse }}</text>
+					今日访问
+				</view>
+				<view class="li">
+					<text>{{ cardInfo.browse }}</text>
+					访问总量
+				</view>
+				<view class="li">
+					<text>{{ cardInfo.share }}</text>
+					名片分享
+				</view>
+			</view>
+		</view>
+		<view class="box videos" v-if="!cardId">
+			<view class="tit ddflex">
+				<view class="flex ddflex">
+					<image src="../static/images/sp_ico.png"></image>
+					<view>我的视频</view>
+				</view>
+				<!-- <image v-if="cardInfo.videoId" @click="uploadVodChangeHandle()" src="../static/images/bj_ico.png" class="edit"></image> -->
+				<image v-if="cardInfo.videoId" @click="uploadVideo()" src="../static/images/bj_ico.png" class="edit">
+				</image>
+			</view>
+			<view class="video">
+				<!-- <video v-if="cardInfo.videoId" controls="true" class="video-sp" :src="videoInfo.playUrl"></video> -->
+				<video v-if="cardInfo.videoId" controls="true" class="video-sp" :src="cardInfo.videoId"></video>
+				<view v-else class="not" @click="uploadVideo()" v-else>
+					<image src="../static/images/add_ico1.png"></image>
+					<view>点击添加个人介绍视频</view>
+				</view>
+			</view>
+		</view>
+		<block v-else>
+			<view class="box videos" v-if="cardInfo.videoId">
+				<view class="tit ddflex">
+					<view class="flex ddflex">
+						<image src="../static/images/sp_ico.png"></image>
+						<view>我的视频</view>
+					</view>
+				</view>
+				<view class="video">
+					<video controls="true" class="video-sp" :src="cardInfo.videoId"></video>
+					<!-- <video controls="true" class="video-sp" :src="videoInfo.playUrl"></video> -->
+				</view>
+			</view>
+		</block>
+		<view class="box pic">
+			<view class="tit ddflex">
+				<view class="flex ddflex">
+					<image src="../static/images/tp_ico.png"></image>
+					<view>风采展示</view>
+				</view>
+				<!-- <image v-if="cardInfo.pictures && !cardId" @click="uploadImgs()" src="../static/images/bj_ico.png" class="edit"></image> -->
+				<image v-if="cardInfo.pictures && !cardId" @click="jumpUrl('/card/imgList/index?id='+cardInfo.id)"
+					src="../static/images/bj_ico.png" class="edit"></image>
+			</view>
+			<view class="picture">
+				<view class="pics" v-if="cardInfo.pictures">
+					<image v-for="(item, index) in getImgList(cardInfo.pictures)" :key="index" :src="item"
+						mode="widthFix" @tap="previewImg(getImgList(cardInfo.pictures), index)"></image>
+				</view>
+				<view class="not" v-else @click="jumpUrl('/card/imgList/index?id='+cardInfo.id)">
+					<!-- @click="uploadImgs()" -->
+					<image src="../static/images/add_ico1.png"></image>
+					<view>点击添加图片</view>
+				</view>
+			</view>
+		</view>
+		<view class="also" v-if="cardId" @click="jumpUrl('/card/create/create')">我也要创建电子名片</view>
+		<!-- #ifdef H5 -->
+		<wx-share ref="wxshare" />
+		<!-- #endif -->
+	</view>
+</template>
+<script>
+	const app = getApp();
+	const req = require('../../utils/request.js');
+	const api = require('../../utils/api.js');
+	import VODUpload from '@/utils/aliyun-upload-sdk-1.0.1.min.js'
+	export default {
+		data() {
+			return {
+				options: '',
+				scene: null,
+				cardId: '',
+				cardInfo: '',
+				cardCount: '',
+				isShowContacts: true,
+				zhiPicUrls: [],
+
+				isFirst: true, //页面加载第一次调用
+
+				uploader: '',
+				isStart: false,
+				videoInfo: '',
+				fileName: '', //视频名称
+			};
+		},
+		onLoad(options) {
+			this.options = options
+			this.cardId = options.cardId;
+			if (options.scene)
+				this.scene = options.scene
+		},
+
+		async onShow() {
+			if (this.scene) {
+				await this.loadCodeParams();
+			}
+			console.log('req.isLogins(false)', req.isLogins(false))
+			
+			// #ifdef H5
+			req.isLogins(true)
+			// #endif
+			
+			// #ifdef APP
+			await req.silenceLogin(this.options.userId ? this.options.userId : '', '')
+			// #endif
+			
+			await this.getCardInfo();
+		},
+
+		onShareAppMessage: function() {
+			this.saveShareBehavior()
+			return this.onShareMessage();
+		},
+		onShareTimeline() {
+			this.saveShareBehavior()
+			return {
+				title: this.getShareTitle(),
+				imageUrl: this.cardInfo.imageMap ? this.cardInfo.imageMap : this.cardInfo.avatar,
+				query: this.getSharePath()
+			};
+		},
+
+		onReady() {
+			// #ifdef H5
+			var that = this;
+			//初始化分享内容
+			setTimeout(function() {
+				var shareContent = that.onShareMessage();
+				if (shareContent) {
+					shareContent.path = window.location.origin + shareContent.path;
+				}
+				console.log('分享内容》》》》》', shareContent);
+				that.$refs.wxshare.init(shareContent);
+			}, 4 * 1000);
+			// #endif
+		},
+
+
+		methods: {
+			saveShareBehavior() {
+				let params = {
+					behavior: 6,
+					type: 23,
+					bindId: this.cardInfo.id
+				}
+				req.saveBehavior(params, res => {})
+			},
+			
+			onShareMessage(){
+				
+				return {
+					title: this.getShareTitle(),
+					imageUrl: this.cardInfo.imageMap ? this.cardInfo.imageMap : this.cardInfo.avatar,
+					path: this.getSharePath()
+				};
+			},
+			
+			addContact: function() {
+				var that = this;
+				wx.showActionSheet({
+					itemList: ['添加联系人'],
+					success: function(res) {
+						// 添加到手机通讯录
+						uni.addPhoneContact({
+							firstName: that.cardInfo.realName, //联系人姓名
+							mobilePhoneNumber: that.cardInfo.phone, //联系人手机号
+							organization: that.cardInfo.companyName, //公司
+							weChatNumber: that.cardInfo.wechat, //微信
+							email: that.cardInfo.email, //电子邮件
+						})
+					}
+				})
+			},
+			getSharePath() {
+				let path = '/card/index/index?cardId=' + this.cardInfo.id + '&appId=' + req.getStorage('appId');
+				return path;
+			},
+			getShareTitle() {
+				let title = this.cardInfo.realName;
+				return (req.excludeSpecial(req.getStorage('userInfo').nickName) ? req.excludeSpecial(req.getStorage(
+					'userInfo').nickName) : '') + '分享了一张' + title + '的名片';
+			},
+			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.options.userId = data.userId
+							this.cardId = data.scene
+							resolve();
+						}
+					);
+				});
+			},
+			getImgList(url) {
+				var list = [];
+				if (url) {
+					list = url.split(',');
+				}
+				return list;
+			},
+
+			jumpUrl(url) {
+				uni.navigateTo({
+					url: url
+				});
+			},
+
+			getCardInfo() {
+				var url = '';
+				var dataP = {};
+				if (this.cardId) {
+					url = api.card_info;
+					dataP.id = this.cardId;
+				} else {
+					url = api.card_userInfo;
+					dataP = {};
+				}
+				return new Promise((resolve, reject) => {
+					req.getRequest(url, dataP, data => {
+						this.cardInfo = data;
+						// if(this.cardInfo.videoId){
+						// 	this.getPlayInfo(this.cardInfo.videoId);
+						// }
+						console.log('isFirst')
+						if (this.cardId && this.cardInfo.userId == req.getStorage('userInfo').id) {
+							this.cardId = null
+							this.getCardInfo()
+						} else {
+							if (this.cardInfo.userId == req.getStorage('userInfo').id) {
+
+							} else {
+								// 用户浏览
+								if (this.isFirst) {
+									this.userBehavior(4)
+								}
+							}
+							this.isFirst = false
+						}
+						resolve()
+					});
+				})
+			},
+
+			getPlayInfo(videoId) {
+				req.getRequest('/api/v3/vod/playInfo', {
+					videoId: videoId
+				}, data => {
+					this.videoInfo = data
+				})
+			},
+			// 用户行为
+			userBehavior(type) {
+				var dataP = {};
+				dataP.type =
+					23 //、产品 2、活动 3、未知 4、内容 5、课程 6、老师 7、素材 8、题目 9、资料领取 10、招聘职位 12、用户须知 13、素材 15、医院科室 16、海报 20、医生 21 新闻 23名片
+				dataP.behavior = type; //1、关注 2、收藏 3、点赞 4、浏览 5、确认 6、分享
+				dataP.bindId = this.cardInfo.id;
+				req.postRequestLoding('/api/v3/behavior/save', dataP, data => {
+					if (type == 3) {
+						if (!this.cardInfo.isThumbs) this.cardInfo.thumbs++;
+						else this.cardInfo.thumbs--
+						this.cardInfo.isThumbs = !this.cardInfo.isThumbs
+					}
+					if (type == 1) {
+						this.cardInfo.follow = !this.cardInfo.follow
+					}
+				});
+			},
+			showContacts() {
+				this.isShowContacts = !this.isShowContacts;
+			},
+
+			goPhone() {
+				uni.makePhoneCall({
+					phoneNumber: this.cardInfo.phone
+				}); // 传参带入号码即可
+			},
+
+			copy(valueText, type) {
+				uni.setClipboardData({
+					data: valueText,
+					success: function(res) {
+						if (type == 1) {
+							req.msg('微信号复制成功');
+						} else if (type == 2) {
+							req.msg('邮箱复制成功');
+						}
+					}
+				});
+			},
+
+			createUploader() {
+				let self = this;
+				return new VODUpload({
+					timeout: 60000,
+					partSize: 1048576,
+					parallel: 5,
+					retryCount: 3,
+					retryDuration: 2,
+					region: this.regionId,
+					userId: this.accountId,
+					// 开始上传
+					onUploadstarted: function(uploadInfo) {
+						uni.showLoading({
+							title: '视频上传中'
+						})
+						console.log('uploadInfo==', uploadInfo)
+						if (!uploadInfo.videoId) {
+							req.getRequest('/api/v3/vod/uploadAuth?fileName=' + self.fileName, {}, res => {
+								var data = res;
+								self.uploader.setUploadAuthAndAddress(uploadInfo, data.uploadAuth, data
+									.uploadAddress, data.videoId)
+							})
+							self.isStart = true;
+						} else {
+							req.getRequest('/api/v3/vod/refreshUploadAuth?videoId=' + uploadInfo.videoId, {},
+								res => {
+									var data = res;
+									self.uploader.setUploadAuthAndAddress(uploadInfo, data.uploadAuth, data
+										.uploadAddress, data.videoId)
+								})
+						}
+					},
+					// 文件上传成功
+					onUploadSucceed: function(uploadInfo) {
+						// req.msg("视频上传成功");
+						let dataP = {
+							id: self.cardInfo.id,
+							videoId: uploadInfo.videoId,
+							videoInfo: JSON.stringify(uploadInfo)
+						}
+						req.postRequest(api.card_saveOrUpdate, dataP, res => {
+							self.getPlayInfo(uploadInfo.videoId);
+							setTimeout(() => {
+								self.isStart = false;
+							}, 1000);
+							uni.hideLoading()
+						})
+					},
+					// 文件上传失败
+					onUploadFailed: function(uploadInfo, code, message) {
+						req.msg("文件上传失败");
+					},
+					// 取消文件上传
+					onUploadCanceled: function(uploadInfo, code, message) {
+						req.msg("文件已暂停上传");
+					},
+					// 文件上传进度,单位:字节, 可以在这个函数中拿到上传进度并显示在页面上
+					onUploadProgress: function(uploadInfo, totalSize, progress) {
+						var progressPercent = Math.ceil(progress * 100);
+						// self.$set(self.uploader, 'authProgress', progressPercent);
+					},
+					// 上传凭证超时
+					onUploadTokenExpired: function(uploadInfo) {
+						req.getRequest('/api/v3/vod/refreshUploadAuth?videoId=' + uploadInfo.videoId, {},
+							res => {
+								var data = res;
+								self.uploader.resumeUploadWithAuth(data.uploadAuth)
+							})
+					}
+				})
+			},
+			uploadVodChangeHandle: function(e) {
+				let self = this;
+				uni.chooseVideo({
+					count: 1, //上传视频的个数
+					mediaType: ['video'], //限制上传的类型为video
+					sourceType: ['album', 'camera'], //视频选择来源
+					maxDuration: 58, //拍摄限制时间
+					camera: 'back', //采用后置摄像头
+					success: function(res) {
+						//获取临时存放的视频资源
+						// let tempFilePath=res.tempFiles[0]
+						console.log('视频文件==', res)
+						var file = {
+							url: res.tempFilePath,
+							coverUrl: res.thumbTempFilePath
+						};
+						self.fileName = res.tempFilePath.substring(res.tempFilePath.lastIndexOf('/') + 1)
+						// if (self.uploader) {
+						// 	self.uploader.stopUpload();
+						// 	self.authProgress = 0;
+						// }
+						var userData = '{"Vod":{}}';
+						self.uploader = self.createUploader();
+						self.uploader.addFile(file, null, null, null, userData);
+						self.uploader.startUpload();
+					},
+				})
+			},
+
+			uploadVideo() {
+				let that = this;
+				uni.chooseVideo({
+					sourceType: ['camera', 'album'],
+					success(res) {
+						uni.showLoading({
+							title: '上传中'
+						})
+						req.uploadFile(api.upload, res.tempFilePath, res => {
+							that.updateCard(2, res.src);
+							uni.hideLoading();
+						});
+					}
+				});
+			},
+			uploadImg() {
+				let that = this;
+				uni.chooseImage({
+					count: 1,
+					sizeType: ['original', 'compressed'],
+					sourceType: ['album', 'camera'],
+					success: function({
+						tempFilePaths
+					}) {
+						var promise = Promise.all(
+							tempFilePaths.map(tempFilePath => {
+								return new Promise(function(resolve, reject) {
+									req.uploadFile(api.upload, tempFilePath, res => {
+										that.imageMap = res.src;
+										//上传完成,则更新保存
+										that.updateCard(3, that.imageMap);
+									});
+								});
+							})
+						);
+						promise
+							.then(function(results) {
+								console.log(results);
+							})
+							.catch(function(err) {
+								console.log(err);
+							});
+					}
+				});
+			},
+
+			uploadImgs() {
+				let that = this;
+				uni.chooseImage({
+					count: 9,
+					sizeType: ['original', 'compressed'],
+					sourceType: ['album', 'camera'],
+					success: function({
+						tempFilePaths
+					}) {
+						uni.showLoading({
+							title: '上传中'
+						});
+						var promise = Promise.all(
+							tempFilePaths.map(tempFilePath => {
+								return new Promise(function(resolve, reject) {
+									req.uploadFile(api.upload, tempFilePath, res => {
+										let picUrls = that.zhiPicUrls;
+										that.zhiPicUrls = picUrls.concat(res.src);
+										if (tempFilePaths.length == that.zhiPicUrls
+											.length) {
+											//上传完成,则更新保存
+											that.updateCard(1, that.zhiPicUrls.join(
+												','));
+										}
+										uni.hideLoading();
+									});
+								});
+							})
+						);
+						promise
+							.then(function(results) {
+								console.log(results);
+							})
+							.catch(function(err) {
+								console.log(err);
+							});
+					}
+				});
+			},
+
+			//预览图片
+			previewImg(picUrls, index) {
+				//预览合同图片
+				var src = picUrls[index];
+				let imgs = picUrls;
+				uni.previewImage({
+					current: src, // 当前显示图片的http链接
+					urls: imgs
+				});
+			},
+
+			cleanimages(index) {
+				// 删除图片
+				let arr = this.zhiPicUrls;
+				arr.splice(index, 1);
+				this.zhiPicUrls = arr;
+			},
+
+			/**
+			 * @param {Object} type 1图片 2、视频
+			 * @param {Object} url 资源地址
+			 */
+			updateCard(type, url) {
+				var dataP = {};
+				dataP.id = this.cardInfo.id;
+				if (type == 1) {
+					dataP.pictures = url;
+				} else if (type == 2) {
+					dataP.videoId = url;
+				} else if (type == 3) {
+					dataP.imageMap = url;
+				}
+				req.postRequest(api.card_saveOrUpdate, dataP, json => {
+					if (type == 1) {
+						this.cardInfo.pictures = url;
+						this.zhiPicUrls = [];
+					} else if (type == 2) {
+						this.cardInfo.videoId = url;
+					} else if (type == 3) {
+						this.cardInfo.imageMap = url;
+					}
+				});
+			},
+
+			toWxShare() {
+				req.getWXOriginalId(data => {
+					if (data) {
+						this.wxShare(data);
+					} else {
+						this.$showModal({
+							title: '提示',
+							content: '未配置微信小程序',
+							cancelText: '取消',
+							confirmText: '设置开通'
+						}).then(res => {
+							// 点击确认的操作
+							// tha.copy(content);
+						});
+					}
+				});
+			},
+
+			wxShare(originalId) {
+				//分享H5
+				// uni.share({
+				// 	provider: 'weixin',
+				// 	scene: 'WXSceneSession',
+				// 	type: 0,
+				// 	href: req.env[req.env.NODE_ENV].h5BaseUrl + '/share/card/index?cardId=' + this.cardInfo.id,
+				// 	title: this.cardInfo.nickName + ' - 电子名片',
+				// 	summary: this.cardInfo.title + ' ' + this.cardInfo.position.name + ' ' + this.cardInfo.message,
+				// 	imageUrl: this.cardInfo.avatar,
+				// 	success: function(res) {
+				// 		console.log('success:' + JSON.stringify(res));
+				// 	},
+				// 	fail: function(err) {
+				// 		console.log('fail:' + JSON.stringify(err));
+				// 	}
+				// });
+
+				uni.share({
+					provider: 'weixin',
+					scene: 'WXSceneSession',
+					type: 5,
+					imageUrl: this.cardInfo.avatar + '?x-oss-process=style/w375',
+					title: this.cardInfo.nickName + ' - 电子名片',
+					summary: this.cardInfo.title + ' ' + this.cardInfo.position.name + ' ' + this.cardInfo.message,
+					miniProgram: {
+						id: originalId,
+						path: '/share/card/index?cardId=' + this.cardInfo.id,
+						type: req.env[req.env.NODE_ENV].typeMiniProgram,
+						webUrl: 'http://www.zhiqiyun.com'
+					},
+					success: ret => {
+						console.log(JSON.stringify(ret));
+					}
+				});
+			}
+		}
+	};
+</script>
+
+<style>
+	@import './index.css';
+</style>

+ 9 - 0
card/industry/industry.css

@@ -0,0 +1,9 @@
+/* industry.css */
+.industry{}
+.left{position: absolute;top: 0;left: 0;bottom: 140rpx;background: #f5f5f5;width: 35%;overflow: hidden;overflow-y: scroll;-webkit-overflow-scrolling: touch;}
+.left .li{padding: 25rpx;font-size: 28rpx;color: #333;min-height: 80rpx;box-sizing: border-box;}
+.left .li.active{color: var(--main);}
+.right{position: absolute;top: 0;right: 0;bottom: 140rpx;background: #fff;width: 65%;overflow: hidden;overflow-y: scroll;-webkit-overflow-scrolling: touch;}
+.right .li{padding: 30rpx;font-size: 28rpx;color: #666;}
+.right .li.active{color: var(--main);}
+.btn{position: fixed;left: 40rpx;right: 40rpx;bottom: 30rpx;z-index: 10;height: 80rpx;background: var(--main);border-radius: 40rpx;font-size: 32rpx;color: #fff;text-align: center;line-height: 80rpx;}

+ 96 - 0
card/industry/industry.vue

@@ -0,0 +1,96 @@
+<template>
+	<view>
+		<view class="industry">
+			<view class="left">
+				<view :class="'li dflex' + (checkIndex == index ? ' active':'')" v-for="(item,index) in industryList" :key="index" @click="checkIndustry(index)">
+					{{item.name}}
+				</view>
+			</view>
+			<view class="right">
+				<view :class="'li' + (arrayIndex == index ? ' active':'')" v-for="(item,index) in rightArray" :key="index" @click="checkArray(index)">
+					{{item.name}}
+				</view>
+			</view>
+		</view>
+		<view class="btn" @click="save()">确定</view>
+	</view>
+</template>
+
+<script>
+const req = require('../../utils/request.js');
+const api = require('../../utils/api.js');
+const util = require('../../utils/util.js');
+var app = getApp();
+export default {
+	data() {
+		return {
+			industryList: [],
+			checkIndex: 0,
+			rightArray: [],
+			arrayIndex: -1,
+			industryName: '',
+			tradeId: '',
+			isPoistion: false
+		};
+	},
+	onLoad(options) {
+		this.isPoistion = options.isPoistion
+		var titleTxt = '';
+		if (this.isPoistion) {
+			titleTxt = '选择职位';
+			this.getPositionList();
+		} else {
+			titleTxt = '选择行业';
+			this.getIndustry();
+		}
+		uni.setNavigationBarTitle({
+			title: titleTxt
+		});
+	},
+	methods: {
+		getPositionList() {
+			req.getRequest(api.api_position_list, {}, data => {
+				this.industryList = data;
+				this.rightArray = data[0].children;
+			});
+		},
+		getIndustry() {
+			req.getRequest(api.company_industry, {}, json => {
+				this.industryList = json;
+				this.rightArray = json[0].children;
+			});
+		},
+		checkIndustry(index){
+			if(this.checkIndex == index) return false;
+			this.checkIndex = index;
+			this.rightArray = this.industryList[this.checkIndex].children;
+			this.arrayIndex=-1;
+		},
+		checkArray(index){
+			if(this.arrayIndex == index) return false;
+			this.arrayIndex = index;
+			this.industryName = this.rightArray[this.arrayIndex].name;
+			this.tradeId = this.rightArray[this.arrayIndex].id;
+		},
+		save(){
+			if(this.arrayIndex < 0) return req.msg('请选择行业');
+			let pages = getCurrentPages();             //获取所有页面栈实例列表
+			let nowPage = pages[ pages.length - 1];    //当前页页面实例
+			let prevPage = pages[ pages.length - 2 ];  //上一页页面实例
+			if(this.isPoistion){
+				prevPage.$vm.job = this.industryName;
+			}else{
+				prevPage.$vm.industryName = this.industryName;         //修改上一页面的 couponNumber 参数值为 value
+				prevPage.$vm.tradeId = this.tradeId;         //修改上一页面的 couponNumber 参数值为 value
+			}
+			uni.navigateBack({                         //uni.navigateTo跳转的返回,默认1为返回上一级
+				delta: 1
+			});
+		}
+	}
+};
+</script>
+
+<style>
+	@import "./industry.css";
+</style>

+ 8 - 0
card/not/not.css

@@ -0,0 +1,8 @@
+page{background-color: #fff;}
+.bg{width: 100%;position: absolute;top: 0;left: 0;z-index: 1;}
+.con{position: relative;z-index: 2;}
+.title{text-align: center;font-size: 70rpx;color: #108FFF;font-weight: bold;padding: 110rpx 0 0;}
+.list{margin: 125rpx 0 0 135rpx;}
+.list .li{font-size: 30rpx;color: #000;margin-bottom: 50rpx;}
+.list .li image{width: 66rpx;height: 66rpx;margin-right: 20rpx;}
+.btn{width: 560rpx;height: 94rpx;background: #108FFF;border-radius: 47rpx;font-size: 36rpx;color: #fff;text-align: center;line-height: 94rpx;margin: 220rpx auto 0;}

+ 62 - 0
card/not/not.vue

@@ -0,0 +1,62 @@
+<template>
+	<view>
+		<image src="../static/images/bg.png" mode="widthFix" class="bg"></image>
+		<view class="con">
+			<view class="title">AI智能名片</view>
+			<view class="list">
+				<view class="li ddflex">
+					<image src="../static/images/card_ico1.png"></image>
+					低成本拓客,线索一键入库
+				</view>
+				<view class="li ddflex">
+					<image src="../static/images/card_ico2.png"></image>
+					定制企业/个人专属名片
+				</view>
+				<view class="li ddflex">
+					<image src="../static/images/card_ico3.png"></image>
+					无需加好友,随时随地畅聊
+				</view>
+				<view class="li ddflex">
+					<image src="../static/images/card_ico4.png"></image>
+					客户轨迹追踪推送,快速成交
+				</view>
+			</view>
+			<view class="btn" @click="tocreate()">创建一张电子名片</view>
+		</view>
+	</view>
+</template>
+
+<script>
+const req = require('../../utils/request.js');
+const api = require('../../utils/api.js');
+const util = require('../../utils/util.js');
+var app = getApp();
+
+export default {
+	components: {},
+	data() {
+		return {
+			systems: {},
+		};
+	},
+
+	onLoad() {},
+	onShow() {},
+
+	methods: {
+		jumpUrl(url) {
+			uni.redirectTo({
+				url: url
+			});
+		},
+
+		tocreate() {
+			this.jumpUrl('/card/create/create');
+		}
+	}
+};
+</script>
+
+<style>
+@import './not.css';
+</style>

+ 141 - 0
card/poster/poster.css

@@ -0,0 +1,141 @@
+/* follow.css */
+page{
+	
+}
+.bg{
+	filter: blur(50rpx);
+	position: absolute;
+	top:0;
+	left:0;
+	right: 0;
+	bottom: 0;
+	height: 100%;
+	z-index: -1;
+	background: rgba(255,255,255,0.49);
+}
+.bg image{width: 100%;height: 100%;}
+.info {
+	width: 590rpx;
+	background: #228AF9;
+	border-radius: 16rpx;
+	margin: 215rpx auto 0;
+	position: relative;
+	padding: 50rpx 0 0;
+	box-sizing: border-box;
+	overflow: hidden;
+}
+
+.logo {
+	width: 130rpx;
+	height: 130rpx;
+	border: 6rpx solid rgba(255, 255, 255, .8);
+	border-radius: 50%;
+	position: absolute;
+	left: 50%;
+	transform: translateX(-50%);
+	top: -70rpx;
+}
+
+.logo image {
+	width: 100%;
+	height: 100%;
+	border-radius: 50%;
+}
+
+.brief {
+	font-size: 38rpx;
+	color: #fff;
+	margin: 0 60rpx;
+	position: relative;
+	line-height: 60rpx;
+	text-align: center;
+}
+
+.brief view {
+	display: inline-block;
+}
+
+.brief image {
+	width: 24rpx;
+	height: 21rpx;
+	display: inline-block;
+	position: relative;
+}
+
+.yin-l {
+	top: -20rpx;
+	margin-right: 25rpx;
+}
+
+.yin-r {
+	bottom: 20rpx;
+	margin-left: 25rpx;
+}
+
+.code {
+	width: 304rpx;
+	height: 304rpx;
+	border-radius: 16rpx;
+	background: #fff;
+	margin: 40rpx auto 0;
+	padding: 10rpx;
+}
+
+.code image {
+	width: 100%;
+	height: 100%;
+	border-radius: 16rpx;
+}
+
+.infos {
+	padding: 0 133rpx 70rpx;
+	margin-top: 35rpx;
+}
+
+.name {
+	font-size: 30rpx;
+	height: 53rpx;
+	line-height: 53rpx;
+	color: #fff;
+}
+
+.company {
+	font-size: 22rpx;
+	height: 40rpx;
+	line-height: 40rpx;
+	color: #fff;
+	margin-top: 15rpx;
+	opacity: .8;
+}
+.industry{
+	margin-top: 15rpx;
+	color: #fff;
+	font-size: 22rpx;
+	opacity: .8;
+}
+
+.qy-logo{height: 120rpx;background-color: #fff;border-radius: 0 0 16rpx 16rpx;justify-content: center;}
+.qy-logo image{width: 175rpx;height: 48rpx;}
+
+.opt {
+	justify-content: space-around;
+	width: 500rpx;
+	margin: 60rpx auto 0;
+}
+
+.opt .li {
+	font-size: 26rpx;
+	color: #333;
+	padding: 20rpx 0 !important;
+}
+
+.opt .li image {
+	width: 80rpx;
+	height: 80rpx;
+	margin: 0 auto 15rpx;
+}
+
+canvas {
+	position: fixed;
+	left: 9000px;
+}

+ 443 - 0
card/poster/poster.vue

@@ -0,0 +1,443 @@
+<template>
+	<view class="content">
+		<view class="bg" >
+			<image  :src="cardInfo.avatar" mode="aspectFit"></images>
+		</view>
+		<view>
+			<view class="info">
+				<!-- <view class="logo"><image :src="cardInfo.avatar ? cardInfo.avatar : '../../static/images/qy_logo.jpg'" mode="aspectFit"></image></view> -->
+				<view class="brief" v-if="cardInfo.msg">
+					<image src="../static/images/yin_l.png" class="yin-l"></image>
+					{{ cardInfo.msg }}
+					<image src="../static/images/yin_r.png" class="yin-r"></image>
+				</view>
+				<!-- codUrl -->
+				<view class="code"><image :src="codUrl"></image></view>
+				<view class="infos">
+					<view class="name">{{ cardInfo.realName }}</view>
+					<view class="company">{{ cardInfo.companyName }}</view>
+					<view class="industry">{{ cardInfo.job }}</view>
+				</view>
+				<!-- <view class="qy-logo ddflex"><image src="../../static/images/logo.png"></image></view> -->
+			</view>
+			<view class="opt dflex">
+				<!-- @click="downloadImg(codUrl)" -->
+				<!-- <button class="li" hover-class="none" open-type="share">
+					<image src="../static/images/hb_ico1.png"></image>
+					<view>分享到微信</view>
+				</button> -->
+				<view class="li" @click="downloadImg(codUrl)">
+					<image src="../static/images/hb_ico1.png"></image>
+					<view>下载名片码</view>
+				</view>
+				
+				<view class="li" @click="generatePoster()">
+					<image src="../static/images/hb_ico2.png"></image>
+					<view>保存图片</view>
+				</view>
+			</view>
+			<canvas class="canvas" style="width:590px;height:736px;" canvas-id="share"></canvas>
+		</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');
+export default {
+	data() {
+		return {
+			id: '',
+			cardInfo: '',
+			codUrl: 'https://img.zhiqiyun.com/zqy3t9kp2zc5i/2023/03/20/be0cfb643cd38b97d5a7b14eecaaa8a1.png',
+			isShowLoading: false
+		};
+	},
+
+	onLoad(opt) {
+		this.id = opt.id;
+		this.getCardInfo();
+	},
+	onShareAppMessage(res) {
+		if (res.from == 'button') {
+			let userInfo = req.getStorage('userInfo');
+			this.userBehavior(6)
+			return {
+				title: this.cardInfo.realName,
+				path: '/card/index/index?cardId=' + this.cardInfo.id + '&userId=' + userInfo.id+ '&appId=' + req.getStorage('appId'),
+				imageUrl: this.cardInfo.avatar + '?x-oss-process=style/w375', // 分享图
+			};
+		}
+	},
+	
+	
+	
+	methods: {
+		removeHtml(content){
+			return util.removeHtml(content);
+		},
+		
+		appToShare() {
+			let userInfo = req.getStorage('userInfo');
+			uni.share({
+				provider: 'weixin',
+				scene: 'WXSceneSession',
+				type: 5,
+				imageUrl: this.cardInfo.avatar + '?x-oss-process=style/w375',
+				title: this.cardInfo.realName,
+				summary: this.cardInfo.realName,
+				miniProgram: {
+					id: req.public.miniProgramGh_id,
+					path: '/card/index/index?cardId=' + this.cardInfo.id + '&userId=' + userInfo.id,
+					type: req.env[req.env.NODE_ENV].typeMiniProgram,
+					webUrl: req.public.homeWebUrl
+				},
+				success: ret => {
+					this.userBehavior(6)
+				}
+			});
+		},
+		getCardInfo() {
+			let dataP = {}
+			let url = ''
+			if (this.id) {
+				url = api.card_info;
+				dataP.id = this.id;
+			} else {
+				url = api.card_userInfo;
+				dataP = {};
+			}
+			req.getRequest(url, dataP, data => {
+				this.cardInfo = data;
+				this.getCodeUrl()
+			});
+		},
+		
+		// 用户行为
+		userBehavior(type){
+			var dataP = {};
+			dataP.type = 23 //、产品 2、活动 3、未知 4、内容 5、课程 6、老师 7、素材 8、题目 9、资料领取 10、招聘职位 12、用户须知 13、素材 15、医院科室 16、海报 20、医生 21 新闻 23名片
+			dataP.behavior = type; //1、关注 2、收藏 3、点赞 4、浏览 5、确认 6、分享
+			dataP.bindId = this.cardInfo.id;
+			req.postRequestLoding('/api/v3/behavior/save', dataP, data => {
+			});
+		},
+		
+		getCodeUrl() {
+			let that = this; //获取小程序码
+			const params = {
+				page: 'card/index/index',
+				scene: this.cardInfo.id
+			};
+			return new Promise((resolve, reject) => {
+				req.getRequest('/api/program/codev', params, url => {
+					// console.log(url);
+					this.codUrl = url
+					resolve();
+				});
+			});
+		},
+
+		generatePoster() {
+			let that = this;
+			if (!that.isShowLoading) {
+				uni.showLoading({
+					title: '生成中',
+					mask: true
+				});
+				that.isShowLoading = true;
+			}
+			this.generate(imgUrl => {
+				console.log(imgUrl)
+				if (that.isShowLoading) {
+					uni.hideLoading();
+					that.isShowLoading = false;
+					that.saveImage(imgUrl);
+				}
+			});
+		},
+
+		generate(success) {
+			let that = this;
+			let logoPromise = this.getImageInfo(this.cardInfo.imageMap?this.cardInfo.imageMap:this.cardInfo.avatar);
+			let codePromise = this.getImageInfo(this.codUrl);
+			Promise.all([logoPromise, codePromise]).then(([logo, code]) => {
+				const ctx = uni.createCanvasContext('share', this); // 绘制背景,填充满整个canvas画布
+				let width = 590;
+				let height = 736;
+				// ctx.setFillStyle('#fff');
+				ctx.fillRect(0, 0, width, height);
+				ctx.drawImage('../static/images/poster_bg.png',0, 0, width, height);
+				
+				
+				// 简介
+				ctx.fillStyle = '#fff';
+				ctx.font = '30px PingFang SC';
+				// let text = '“'+that.removeHtml(that.cardInfo.brief)+'”';
+				let text = '“'+that.cardInfo.msg+'”';
+				var textWidth = ctx.measureText(text).width;
+				var xPosition = width / 2 - textWidth / 2;
+				ctx.fillText(text,xPosition,70);
+				ctx.save();
+
+				// 姓名
+				ctx.fillStyle = '#fff';
+				ctx.font = '32px PingFang SC';
+				ctx.fillText(that.cardInfo.realName, (width - 324) / 2 , 490);
+				ctx.save();
+
+				ctx.fillStyle = '#fff';
+				ctx.font = '20px PingFang SC';
+				ctx.fillText(that.cardInfo.companyName, (width - 324) / 2, 530);
+				ctx.save();
+				
+				ctx.fillStyle = '#fff';
+				ctx.font = '20px PingFang SC';
+				ctx.fillText(that.cardInfo.job, (width - 324) / 2, 570);
+				ctx.save();
+				
+				this.roundRect(ctx,(width - 324) / 2, 100,324, 324,16)
+				
+				// 小程序码
+				ctx.drawImage(code.path, (width - 304) / 2, 110, 304, 304);
+				ctx.save();
+				
+
+				// 完成作画
+				ctx.draw(false, function() {
+					uni.canvasToTempFilePath(
+						{
+							canvasId: 'share',
+							success: function(res) {
+								success.call(this, res.tempFilePath);
+							},
+							fail: function(res) {}
+						},
+						that
+					);
+				});
+			});
+		},
+
+		getImageInfo(url) {
+			if (url) {
+				return new Promise((resolve, reject) => {
+					if (!url) {
+						resolve();
+						return '';
+					}
+					uni.getImageInfo({
+						src: url,
+						success: resolve,
+						fail: reject
+					});
+				});
+			} else {
+				return '';
+			}
+		},
+		/**
+		 *
+		 * @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('#fff'); // 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();
+		},
+		
+		borderRect(ctx, x, y, w, h, r, fillColor, strokeColor) {
+		    // 画圆角 ctx、x起点、y起点、w宽度、y高度、r圆角半径、fillColor填充颜色、strokeColor边框颜色
+		    // 开始绘制
+		    ctx.beginPath()
+		 
+		    // 绘制左上角圆弧 Math.PI = 180度
+		    // 圆心x起点、圆心y起点、半径、以3点钟方向顺时针旋转后确认的起始弧度、以3点钟方向顺时针旋转后确认的终止弧度
+		    ctx.arc(x + r, y + r, r, Math.PI, Math.PI * 1.5)
+		 
+		    // 绘制border-top
+		    // 移动起点位置 x终点、y终点
+		    ctx.moveTo(x + r, y)
+		    // 画一条线 x终点、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)
+		 
+		    if (fillColor) {
+		      // 因为边缘描边存在锯齿,最好指定使用 transparent 填充
+		      ctx.setFillStyle(fillColor)
+		      // 对绘画区域填充
+		      ctx.fill()
+		    }
+		 
+		    if (strokeColor) {
+		      // 因为边缘描边存在锯齿,最好指定使用 transparent 填充
+		      ctx.setStrokeStyle(strokeColor)
+		      // 画出当前路径的边框
+		      ctx.stroke()
+		    }
+		    // 关闭一个路径
+		    // ctx.closePath()
+		 
+		    // 剪切,剪切之后的绘画绘制剪切区域内进行,需要save与restore
+		    ctx.clip()
+		  },
+
+		/**
+		 * 下载图片
+		 * @param {Object} url
+		 */
+		downloadImg(url) {
+			let that = this;
+			uni.getImageInfo({
+				src: url,
+				success(res) {
+					console.log('res==',res)
+					that.saveImage(res.path);
+				}
+			})
+			// that.saveImage(url);
+		},
+		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
+		},
+		/**
+		 * 保存图片
+		 * @param {Object} tempFilePath
+		 */
+		saveImage(tempFilePath) {
+			let that = this;
+			that.isAuth(success => {
+				if (success) {
+					uni.saveImageToPhotosAlbum({
+						filePath: tempFilePath,
+		
+						success(res) {
+							that.saveShareBehavior();
+							uni.showToast({
+								title: '图片保存成功',
+								icon: 'none',
+		
+								success() { // that.generate(imgUrl => {
+									//   that.setData({
+									//     imgUrl: imgUrl
+									//   })
+									// })
+								},
+		
+								fail() {
+									uni.showToast({
+										title: '图片保存失败'
+									});
+								}
+		
+							});
+						}
+		
+					});
+				}
+			});
+		},
+		saveShareBehavior(){
+			let params = {
+				behavior: 6,
+				type: 23,
+				bindId: this.cardInfo.id
+			}
+			req.saveBehavior(params,res=>{})
+		},
+		// saveImage(tempFilePath) {
+		// 	util.saveImage(tempFilePath);
+		// }
+	}
+};
+</script>
+
+<style>
+@import './poster.css';
+</style>

BIN
card/static/images/add.png


BIN
card/static/images/add_ico1.png


BIN
card/static/images/bg.png


BIN
card/static/images/bico1.png


BIN
card/static/images/bj_ico.png


BIN
card/static/images/car_p_bg.png


BIN
card/static/images/card_ico1.png


BIN
card/static/images/card_ico2.png


BIN
card/static/images/card_ico3.png


BIN
card/static/images/card_ico4.png


BIN
card/static/images/card_logo_bg.png


BIN
card/static/images/code.png


BIN
card/static/images/edit.png


BIN
card/static/images/fx_ico.png


BIN
card/static/images/hb_ico1.png


BIN
card/static/images/hb_ico2.png


BIN
card/static/images/jia.png


BIN
card/static/images/jj_ico.png


BIN
card/static/images/like_h.png


BIN
card/static/images/message.png


BIN
card/static/images/phone.png


BIN
card/static/images/poster_bg.png


BIN
card/static/images/rqico.png


BIN
card/static/images/sc_ico.png


BIN
card/static/images/sj_ico.png


BIN
card/static/images/sp_ico.png


BIN
card/static/images/tp_ico.png


BIN
card/static/images/wap_logo.png


BIN
card/static/images/wechat.png


BIN
card/static/images/wxth.png


BIN
card/static/images/yin_l.png


BIN
card/static/images/yin_r.png


BIN
card/static/images/zan_ico.png


+ 4 - 0
chat/chatroom/chatroom.css

@@ -0,0 +1,4 @@
+page{
+	background-color: #EDEDED;
+	height: 100%;
+}

+ 100 - 0
chat/chatroom/chatroom.vue

@@ -0,0 +1,100 @@
+<template>
+	<view>
+		<view style="border-top: 2rpx solid #D4D4D4;position: fixed;top: 0;left: 0;right: 0;"></view>
+		<chat id="chat" :username="username" ref="chat" chatType="singleChat" @onClickInviteMsg="onClickMsg"></chat>
+	</view>
+</template>
+
+<script>
+	let disp = require("../../hxChatSDK/utils/broadcast");
+	let req = require("../../utils/request.js");
+	import chat from "../../chat/components/chat/chat.vue";
+	var WebIM = require("../../hxChatSDK/utils/WebIM")["default"];
+
+	export default {
+		data() {
+			return {
+				username: {
+					your: ""
+				}
+			};
+		},
+
+		components: {
+			chat
+		},
+		props: {},
+		// options = 系统传入的 url 参数
+		onLoad(options) {
+			console.log('options>>>', options)
+			let username = JSON.parse(options.username);
+			this.setData({
+				username: username
+			});
+			// 生成的支付宝小程序在onLoad里获取不到,这里放到全局变量下
+			uni.username = username;
+
+			var userNameText = username.your;
+			const imUserInfo = uni.getStorageSync("imUserInfo_" + username.your);
+			if (imUserInfo && imUserInfo.nickName) {
+				userNameText = imUserInfo.nickName;
+			}
+			uni.setNavigationBarTitle({
+				title: userNameText
+			});
+			// this.subscribePresence();
+		},
+		onShow() {
+			req.onNetworkStatusChangeIM()
+		},
+		onUnload(options) {
+			disp.fire("em.chatroom.leave");
+		},
+
+		onPullDownRefresh: function() {
+			uni.showNavigationBarLoading();
+			this.$refs.chat.getMore();
+			// 停止下拉动作
+			uni.hideNavigationBarLoading();
+			uni.stopPullDownRefresh();
+		},
+		methods: {
+
+			/**
+			 * 需要到环信开通功能才能生效(增值功能)
+			 */
+			subscribePresence() {
+				let option = {
+					usernames: [this.username.your],
+					expiry: 7 * 24 * 3600 // 单位为秒
+				}
+				WebIM.conn.subscribePresence(option).then(res => {
+					console.log('subscribePresence>>>>>', res)
+				})
+
+				WebIM.conn.addEventHandler('MESSAGES', {
+					onPresenceStatusChange: function(msg) {
+						// 这里可以处理订阅用户状态更新后的逻辑。
+						console.log('状态更新', msg);
+					},
+				})
+			},
+
+
+			onClickMsg(msg) {
+				msg.action = 'join'
+				uni.navigateTo({
+					url: "../emedia/index?srcData=" + JSON.stringify(msg)
+				});
+			},
+			onNavigationBarButtonTap(e) {
+				uni.navigateTo({
+					url: `/pages/moreMenu/moreMenu?username=${this.username.your}&type=singleChat`
+				})
+			},
+		}
+	};
+</script>
+<style>
+	@import "./chatroom.css";
+</style>

+ 36 - 0
chat/components/chat/chat.css

@@ -0,0 +1,36 @@
+.main {
+	width: 100%;
+	height: 100%;
+}
+
+/* 邀请码弹窗 */
+.ceng2{position: fixed;top: 0;left: 0;right: 0;bottom: 0;background-color: rgba(0,0,0,.5);z-index: 99;}
+.code-pop{
+	position: fixed;
+	top:50%;
+	left:50%;
+	transform: translate(-50%,-50%);
+	width: 574rpx;
+	background: #FFFFFF;
+	border-radius: 20rpx 20rpx 20rpx 20rpx;
+	z-index: 100;
+}
+.code-text{
+	line-height: 41rpx;
+	color: #151515;
+	font-size: 28rpx;
+	margin: 51rpx 47rpx 50rpx;
+	text-align: center;
+}
+.code-content image{
+	width: 365rpx;
+	height: 365rpx;
+	margin: 50rpx auto 30rpx;
+}
+.code-btn{
+	padding: 25rpx;
+	text-align: center;
+	font-size: 28rpx;
+	color: #2A82FD;
+	border-top: 1px solid #E9E9E9;
+}

Някои файлове не бяха показани, защото твърде много файлове са промени