diff --git a/app.wxss b/app.wxss
index f41d96b..2288bad 100644
--- a/app.wxss
+++ b/app.wxss
@@ -10,4 +10,69 @@
}
page{
background: #F3F3F3;
+}
+
+/* ================== 头像 ==================== */
+.cu-avatar {
+ font-variant: small-caps;
+ margin: 0;
+ padding: 0;
+ display: inline-flex;
+ text-align: center;
+ justify-content: center;
+ align-items: center;
+ background-color: #ccc;
+ color: #ffffff;
+ white-space: nowrap;
+ position: relative;
+ width: 64rpx;
+ height: 64rpx;
+ background-size: cover;
+ background-position: center;
+ vertical-align: middle;
+ font-size: 1.5em;
+}
+
+.cu-avatar.sm {
+ width: 48rpx;
+ height: 48rpx;
+ font-size: 1em;
+}
+
+.cu-avatar.lg {
+ width: 96rpx;
+ height: 96rpx;
+ font-size: 2em;
+}
+
+.cu-avatar.xl {
+ width: 128rpx;
+ height: 128rpx;
+ font-size: 2.5em;
+}
+
+.cu-avatar .avatar-text {
+ font-size: 0.4em;
+}
+
+.round{
+ border-radius: 50%;
+}
+
+.cu-avatar-group {
+ direction: rtl;
+ unicode-bidi: bidi-override;
+ padding: 0 10rpx 0 40rpx;
+ display: inline-block;
+}
+
+.cu-avatar-group .cu-avatar {
+ margin-left: -30rpx;
+ border: 4rpx solid #f1f1f1;
+ vertical-align: middle;
+}
+
+.cu-avatar-group .cu-avatar.sm {
+ margin-left: -20rpx;
+ border: 1rpx solid #f1f1f1;
}
\ No newline at end of file
diff --git a/images/question.svg b/images/question.svg
new file mode 100644
index 0000000..93a7a2a
--- /dev/null
+++ b/images/question.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/pages/activity_detail/activity_detail.js b/pages/activity_detail/activity_detail.js
index e4f2b71..0940ffe 100644
--- a/pages/activity_detail/activity_detail.js
+++ b/pages/activity_detail/activity_detail.js
@@ -46,6 +46,9 @@ Page({
icon: '../../images/moments_ico.png'
}],
qrImageUrl: "",
+ groupList:[],
+ group: null,
+ showM: true
},
/**
* 生命周期函数--监听页面加载
@@ -65,6 +68,33 @@ Page({
this.getActivityDetail();
},
+ //获取活动拼团列表信息
+ fetchActivityGroupList: function(){
+ let that = this;
+ // /mall/wxa/activity/group/recommend 推荐正在拼的团
+ wx.request({
+ url: app.gw.hostUrl + '/mall/wxa/activity/group/recommend',
+ method: 'get',
+ data: { activityNo: that.data.activityNo, pageNum: 1, pageSize: 3 },
+ header: {
+ 'Content-Type': 'application/x-www-form-urlencoded',
+ 'sessionId': wx.getStorageSync('sessionId')
+ },
+ success: function (res) {
+ if(res.data.code == 0){
+ that.setData({
+ groupList: res.data.response
+ })
+ }
+ }
+ })
+ },
+
+ getMemberNickname: function(index){
+ console.log('index>>' + index)
+ return 'Index'
+ },
+
getActivityDetail: function () {
let that = this;
that.stopInterval();
@@ -88,7 +118,6 @@ Page({
'sessionId': wx.getStorageSync('sessionId')
},
success: function (res) {
- console.log(res);
var data = res.data;
var status = data.code;
if (status == 0) {
@@ -116,14 +145,7 @@ Page({
remark: "block",
tagColor: "#F8B551",
});
- if (that.data.currentMemberType == -1) {
- //游客
- that.setData({
- one_content: "none",
- two_content: "block",
- buttomText: '参与拼团',
- });
- } else if (that.data.currentMemberType == 0 || that.data.currentMemberType == 10) {
+ if (that.data.currentMemberType == 0 || that.data.currentMemberType == 10) {
//发起人和邀请人
that.setData({
one_content: "block",
@@ -134,18 +156,7 @@ Page({
}
} else if (that.data.groupStatus == 20) {
//拼团成功
- if (that.data.currentMemberType == -1) {
- //游客
- that.setData({
- one_content: "block",
- two_content: "none",
- bottomBGColor: '#F36619',
- buttomText: '我要拼团',
- grounpInfo: "none",
- grounpInfo2: "block",
-
- });
- } else if (that.data.currentMemberType == 0 || that.data.currentMemberType == 10) {
+ if (that.data.currentMemberType == 0 || that.data.currentMemberType == 10) {
//发起人和邀请人
that.setData({
tagColor: "#21BE8D",
@@ -160,6 +171,7 @@ Page({
}
} else if (that.data.groupStatus == 90) {
//拼团失败
+ that.fetchActivityGroupList()
if (that.data.currentMemberType == -1) {
//游客
that.setData({
@@ -169,7 +181,6 @@ Page({
buttomText: '我要拼团',
grounpInfo: "none",
grounpInfo2: "block",
-
});
} else if (that.data.currentMemberType == 0 || that.data.currentMemberType == 10) {
//发起人和邀请人
@@ -186,7 +197,6 @@ Page({
});
}
}
-
} else {
that.countActivityTime(data.response.countdownSec);
that.setData({
@@ -194,6 +204,7 @@ Page({
grounpInfo: "none",
grounpInfo2: "none",
});
+ that.fetchActivityGroupList()
}
} else {
wx.showToast({
@@ -300,14 +311,14 @@ Page({
if (that.data.groupNo == "") {
url = '/mall/wxa/activity/group/open';
//首次开团
- this.groupOpenOrJoin(url);
+ this.groupOpenOrJoin(url, that.data.groupNo);
} else {
if (that.data.groupStatus == 10) {
//正在拼团
if (that.data.currentMemberType == -1) {
//游客
url = '/mall/wxa/activity/group/join';
- this.groupOpenOrJoin(url);
+ this.groupOpenOrJoin(url, that.data.groupNo);
} else {
//团长与参与人点击分享
this.openActionsheet();
@@ -317,7 +328,7 @@ Page({
if (that.data.currentMemberType == -1) {
//游客
url = '/mall/wxa/activity/group/open';
- this.groupOpenOrJoin(url);
+ this.groupOpenOrJoin(url, that.data.groupNo);
} else {
//团长与参与人立即预约
wx.showModal({
@@ -335,13 +346,13 @@ Page({
} else if (that.data.groupStatus == 90) {
//拼团失败
url = '/mall/wxa/activity/group/open';
- this.groupOpenOrJoin(url);
+ this.groupOpenOrJoin(url, that.data.groupNo);
}
}
},
//开团与参团
- groupOpenOrJoin: function (url) {
+ groupOpenOrJoin: function (url, groupNo) {
let that = this;
wx.showToast({
title: '正在调起支付',
@@ -353,7 +364,7 @@ Page({
data: {
openid: app.globalData.openid,
activityNo: that.data.activityNo,
- groupNo: that.data.groupNo,
+ groupNo: groupNo,
},
header: {
'Content-Type': 'application/x-www-form-urlencoded',
@@ -375,7 +386,6 @@ Page({
groupNo: data.response.orderNo == undefined ? that.data.groupNo : data.response.orderNo,
});
let dr = data.response.weixinTransParameters;
- console.log(dr);
wx.requestPayment({//微信支付
"timeStamp": dr.timeStamp,//时间戳
"nonceStr": dr.nonceStr,//随机字符串
@@ -383,7 +393,6 @@ Page({
"signType": dr.signType,//签名算法
"paySign": dr.paySign,//签名
"success": function (res) {//成功时回调
- console.log(res);
wx.showToast({
title: '支付成功',
icon: 'success',
@@ -395,7 +404,6 @@ Page({
})
},
"fail": function (res) {//接口调用失败的回调
- console.log(res);
if (res.errMsg == 'requestPayment:fail cancel') {
wx.showToast({
title: '取消支付',
@@ -422,13 +430,15 @@ Page({
});
},
-
-
- /**
- * 生命周期函数--监听页面隐藏
- */
- onHide: function () {
-
+ showDialog: function (e) {
+ if (wx.getStorageSync('sessionId') == '') {
+ wx.navigateTo({ url: '../login/login' })
+ return;
+ }
+ this.setData({
+ showM: false,
+ group: this.data.groupList[e.currentTarget.dataset.index]
+ })
},
/**
@@ -438,18 +448,13 @@ Page({
this.stopInterval();
},
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh: function () {
-
+ cancelR: function () {
+ this.setData({ showM: true })
},
-
- /**
- * 页面上拉触底事件的处理函数
- */
- onReachBottom: function () {
-
+
+ confirmR: function () {
+ this.setData({ showM: true })
+ this.groupOpenOrJoin('/mall/wxa/activity/group/join', this.data.group.groupNo);
},
//打败Actionsheet,进行分享
diff --git a/pages/activity_detail/activity_detail.wxml b/pages/activity_detail/activity_detail.wxml
index 0db0876..79722bc 100644
--- a/pages/activity_detail/activity_detail.wxml
+++ b/pages/activity_detail/activity_detail.wxml
@@ -38,6 +38,19 @@
+
+
+ 推荐拼团,可直接参与
+
+
+
+
+
+ {{group.members[0].nickName}}
+
+ 去拼团
+
+
{{activityDetail.statusDesc}}
@@ -62,7 +75,6 @@
团长
-
@@ -98,4 +110,13 @@
-0
\ No newline at end of file
+
+
+
+
+
+ 团主
+
+
+
+
\ No newline at end of file
diff --git a/pages/activity_detail/activity_detail.wxss b/pages/activity_detail/activity_detail.wxss
index 0bb24e2..e998065 100644
--- a/pages/activity_detail/activity_detail.wxss
+++ b/pages/activity_detail/activity_detail.wxss
@@ -18,7 +18,7 @@ image{
display: flex;
flex-direction: row;
flex-wrap: nowrap;
- margin-top: 39rpx;
+ padding-top: 5px;
}
.activity_info .row0 .sec{
@@ -332,4 +332,46 @@ float:right;
background:#F36619;
text-align: center;
float: left;
+}
+
+.group_list{
+ width:100%;
+ display:flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 12rpx 6rpx;
+ border-top:1rpx solid #f3f3f3;
+}
+
+.group-btn{
+ font-size: 28rpx;
+ width:150rpx;
+ line-height:32px;
+ background:rgba(255,160,67,1);
+ border-radius:18px;
+ margin-left: 26rpx;
+ text-align: center;
+ color: white;
+ margin-right: 28rpx;
+}
+
+.cu-tag.badge {
+ border-radius: 10rpx;
+ position: absolute;
+ top: -10rpx;
+ right: -10rpx;
+ font-size: 20rpx;
+ padding: 0rpx 10rpx;
+ line-height: 30rpx;
+ text-align: center;
+ background-color: #F36619;
+ color: white;
+}
+
+.model_list{
+ width:100%;
+ display:flex;
+ justify-content: center;
+ align-items: center;
+ padding: 12rpx 6rpx;
}
\ No newline at end of file
diff --git a/pages/index/index.js b/pages/index/index.js
index dc34622..3bba737 100644
--- a/pages/index/index.js
+++ b/pages/index/index.js
@@ -184,7 +184,6 @@ Page({
* 点击去开团
*/
openGroup: function(e) {
- console.log('activityNo:' + e.currentTarget.dataset.item);
wx.navigateTo({
url: '../activity_detail/activity_detail?activityNo=' + e.currentTarget.dataset.item,
})
diff --git a/pages/index/index.wxml b/pages/index/index.wxml
index e934eb1..2c8c254 100644
--- a/pages/index/index.wxml
+++ b/pages/index/index.wxml
@@ -32,7 +32,7 @@
¥{{item.participantPrice / 100}}
原价:{{item.originalPrice / 100}}
-
+
\ No newline at end of file
diff --git a/pages/login/login.js b/pages/login/login.js
index c70138c..24c9822 100644
--- a/pages/login/login.js
+++ b/pages/login/login.js
@@ -16,7 +16,6 @@ Page({
this.setData({
mobile: e.detail.value
})
- console.log(e.detail.value);
},
inputCode: function (e) {//输入短信动态码事件监听
this.setData({
@@ -113,6 +112,7 @@ Page({
}
},
bindFormSubmit: function (e) {//点击登录事件监听
+ console.log(e.detail)
let that = this;
let mobile = this.data.mobile;
let code = this.data.code;
@@ -120,7 +120,6 @@ Page({
var pages = getCurrentPages();
var currPage = pages[pages.length - 1]; //当前页面
var prevPage = pages[pages.length - 2]; //上一个页面
- console.log(mobile);
let checkMobile = that.checkForm(mobile,'手机号','mobile');
if(checkMobile!=false){
let checkCode = that.checkForm(code,'验证码','code');
diff --git a/pages/mcenter/mcenter.js b/pages/mcenter/mcenter.js
index 2fbeb62..faf6edb 100644
--- a/pages/mcenter/mcenter.js
+++ b/pages/mcenter/mcenter.js
@@ -67,7 +67,7 @@ Page({
var status = data.code;
if (status == 666){
wx.removeStorageSync('sessionId')
- this.setData({ sessionId: null })
+ that.setData({ sessionId: null })
return
} else if (status != 0) {
wx.showToast({