diff --git a/pages/getphoneInfo/index.js b/pages/getphoneInfo/index.js
index 1d72e69..00a56ad 100755
--- a/pages/getphoneInfo/index.js
+++ b/pages/getphoneInfo/index.js
@@ -65,9 +65,15 @@ Page({
*/
console.log(that.data, 98888)
if (that.data.path == 'spell') {
- wx.redirectTo({
- url: "/pages/spellGroup/mySpellGroup/index?couponChannelId=" + that.data.paramData.couponChannelId + "&couponId=" + that.data.paramData.couponId
- })
+ if (that.data.paramData.avatarUrl){
+ wx.redirectTo({
+ url: `/pages/joinFrDpell/index?couponId=${that.data.paramData.couponId}&orderGroupId=${that.data.paramData.orderGroupId}&couponChannelId=${that.data.paramData.couponChannelId}&orderId=${that.data.paramData.orderId}&avatarUrl=${that.data.paramData.avatarUrl}&nickName=${that.data.paramData.nickName}`
+ })
+ }else{
+ wx.redirectTo({
+ url: `pages/spellGroup/mySpellGroup/index?couponId=${that.data.paramData.couponId}&couponChannelId=${that.data.paramData.couponChannelId}`
+ })
+ }
return;
}
/**
diff --git a/pages/getuserinfo/index.js b/pages/getuserinfo/index.js
index d8a7e02..2bf20b7 100755
--- a/pages/getuserinfo/index.js
+++ b/pages/getuserinfo/index.js
@@ -80,7 +80,7 @@ Page({
console.log(res, that.data,6666666666)
if (that.data.optionData.orderGroupId){
wx.reLaunch({
- url: `/pages/joinFrDpell/index?couponId=${that.data.optionData.couponId}&orderGroupId=${that.data.optionData.orderGroupId}&couponChannelId=${that.data.optionData.couponChannelId}&orderId=${that.data.optionData.orderId}`
+ url: `/pages/joinFrDpell/index?couponId=${that.data.optionData.couponId}&orderGroupId=${that.data.optionData.orderGroupId}&couponChannelId=${that.data.optionData.couponChannelId}&orderId=${that.data.optionData.orderId}&avatarUrl=${options.avatarUrl}&nickName=${options.nickName}`
});
return;
}
diff --git a/pages/index/index.js b/pages/index/index.js
index 4298907..294e72a 100644
--- a/pages/index/index.js
+++ b/pages/index/index.js
@@ -68,7 +68,7 @@ Page({
.then(res => {
if (options && options.orderGroupId) {
wx.redirectTo({
- url: `/pages/joinFrDpell/index?couponId=${options.couponId}&orderGroupId=${options.orderGroupId}&couponChannelId=${options.couponChannelId}&orderId=${options.orderId}`
+ url: `/pages/joinFrDpell/index?couponId=${options.couponId}&orderGroupId=${options.orderGroupId}&couponChannelId=${options.couponChannelId}&orderId=${options.orderId}&avatarUrl=${options.avatarUrl}&nickName=${options.nickName}`
})
return;
}
@@ -98,7 +98,7 @@ Page({
// 用户昵称未授权
if (options && options.orderGroupId) {
wx.redirectTo({
- url: `/pages/getuserinfo/index?couponId=${options.couponId}&orderGroupId=${options.orderGroupId}&couponChannelId=${options.couponChannelId}&orderId=${options.orderId}`
+ url: `/pages/getuserinfo/index?couponId=${options.couponId}&orderGroupId=${options.orderGroupId}&couponChannelId=${options.couponChannelId}&orderId=${options.orderId}&avatarUrl=${options.avatarUrl}&nickName=${options.nickName}`
})
return;
}
diff --git a/pages/joinFrDpell/index.js b/pages/joinFrDpell/index.js
index da0f6d3..96fad3c 100644
--- a/pages/joinFrDpell/index.js
+++ b/pages/joinFrDpell/index.js
@@ -26,11 +26,14 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
+ console.log(options,22)
this.setData({
couponChannelId: options.couponChannelId,
couponId: options.couponId,
orderGroupId: options.orderGroupId,
- orderId:options.orderId
+ orderId:options.orderId,
+ avatarUrl: options.avatarUrl,
+ nickName: options.nickName,
})
this.checkUser(options);
},
@@ -146,9 +149,11 @@ Page({
getOneSpell(couponId) {
let that = this;
Http.get({
- url: config.api.queryRemainOne,
+ url: config.api.queryOrderGroupStatus,
data: {
- couponId: couponId
+ couponId: couponId,
+ id: that.data.orderGroupId,
+ orderId: that.data.orderId
}
}).then(res => {
if (res.data) {
diff --git a/pages/joinFrDpell/index.wxml b/pages/joinFrDpell/index.wxml
index 4c4ac14..3f805ba 100644
--- a/pages/joinFrDpell/index.wxml
+++ b/pages/joinFrDpell/index.wxml
@@ -11,6 +11,15 @@
{{data.salePriceStr}}元
+
+
+
+
+ 您的好友 {{nickName}} 邀请您参加拼团
+ 剩余时间:{{hour+' : '+min+' : '+sec}}
+
+
+
商品详情:
{{data.remark}}
diff --git a/pages/joinFrDpell/index.wxss b/pages/joinFrDpell/index.wxss
index 21b7d6c..f005301 100644
--- a/pages/joinFrDpell/index.wxss
+++ b/pages/joinFrDpell/index.wxss
@@ -316,4 +316,26 @@
margin: auto;
width: 50rpx;
height: 50rpx;
+}
+.j-f{
+ font-size:28rpx;
+ font-family:PingFang-SC-Medium;
+ font-weight:500;
+ color:rgba(51,51,51,1);
+ margin-top: 20rpx;
+}
+.j-t{
+ font-size:28rpx;
+ font-family:PingFang-SC-Medium;
+ font-weight:500;
+ color:rgba(51,51,51,1);
+ line-height: 44rpx;
+}
+.j-time{
+ display: inline;
+ font-size:26rpx;
+ font-family:PingFang-SC-Medium;
+ font-weight:500;
+ color:rgba(255,53,53,1);
+ line-height: 44rpx;
}
\ No newline at end of file
diff --git a/pages/phoneinput/phoneinput.js b/pages/phoneinput/phoneinput.js
index e637aa0..69240a8 100644
--- a/pages/phoneinput/phoneinput.js
+++ b/pages/phoneinput/phoneinput.js
@@ -48,10 +48,16 @@ Page({
/**
* 来自拼团详情
*/
- if (that.path == 'spell'){
- wx.redirectTo({
- url: "pages/spellGroup/mySpellGroup/index?couponChannelId=" + that.data.paramData.couponChannelId + "&couponId" + that.data.paramData.couponId
- })
+ if (that.data.path == 'spell') {
+ if (that.data.paramData.avatarUrl) {
+ wx.redirectTo({
+ url: `/pages/joinFrDpell/index?couponId=${that.data.paramData.couponId}&orderGroupId=${that.data.paramData.orderGroupId}&couponChannelId=${that.data.paramData.couponChannelId}&orderId=${that.data.paramData.orderId}&avatarUrl=${that.data.paramData.avatarUrl}&nickName=${that.data.paramData.nickName}`
+ })
+ } else {
+ wx.redirectTo({
+ url: `pages/spellGroup/mySpellGroup/index?couponId=${that.data.paramData.couponId}&couponChannelId=${that.data.paramData.couponChannelId}`
+ })
+ }
return;
}
if (that.path != 'index'){
diff --git a/pages/spellDetail/index.js b/pages/spellDetail/index.js
index 0df56e4..c1de2f7 100644
--- a/pages/spellDetail/index.js
+++ b/pages/spellDetail/index.js
@@ -31,6 +31,21 @@ Page({
url: `/pages/spellGroup/mySpellGroup/index?couponId=${data.couponId}&couponChannelId=${data.couponChannelId}`,
})
},
+ getUserInfo: function () {
+ let that = this;
+ // 获取用户信息
+ Http.get({
+ url: config.api.getScore,
+ data: {}
+ })
+ .then(res => {
+ console.log(res)
+ that.setData({
+ nickName: res.data.nickName,
+ avatarUrl: res.data.avatarUrl
+ })
+ })
+ },
gotoIndex(){
wx.reLaunch({
url: '/pages/index/index',
@@ -54,6 +69,7 @@ Page({
this.setData({
paramData: options
})
+ this.getUserInfo()
this.getDetail(options);
this.checkUser(options)
// 关闭来自于左上角的分享
@@ -231,12 +247,12 @@ Page({
// paramData
onShareAppMessage: function (res) {
if (res.from === 'button') {
- console.log(res, 3333333333333333333333)
+ console.log(res, this.data.nickName, this.data.avatarUrl, 3333333333333333333333)
// 来自页面内转发按钮
let _this = this;
return {
title: '拼团',
- path: `/pages/index/index?couponId=${_this.data.data.couponId}&orderGroupId=${_this.data.data.orderGroupId}&couponChannelId=${_this.data.paramData.couponChannelId}&orderId=${_this.data.data.orderId}`,
+ path: `/pages/index/index?couponId=${_this.data.data.couponId}&orderGroupId=${_this.data.data.orderGroupId}&couponChannelId=${_this.data.paramData.couponChannelId}&orderId=${_this.data.data.orderId}&avatarUrl=${_this.data.avatarUrl}&nickName=${_this.data.nickName}`,
imageUrl: _this.data.data.coverImg,
success: function (res) {
// 转发成功
diff --git a/pages/spellGroup/spellGroup.js b/pages/spellGroup/spellGroup.js
index 6aa7d12..4d1666f 100644
--- a/pages/spellGroup/spellGroup.js
+++ b/pages/spellGroup/spellGroup.js
@@ -31,6 +31,7 @@ Page({
todayDate: todayDate
})
that.getList(1, "spellList");
+ that.getUserInfo()
that.setData({
flag: "spellList",
spellList: true,
@@ -110,6 +111,21 @@ Page({
}
},
+ getUserInfo: function () {
+ let that = this;
+ // 获取用户信息
+ Http.get({
+ url: config.api.getScore,
+ data: {}
+ })
+ .then(res => {
+ console.log(res)
+ that.setData({
+ nickName: res.data.nickName,
+ avatarUrl: res.data.avatarUrl
+ })
+ })
+ },
/**
* 用户点击右上角分享
*/
@@ -122,7 +138,7 @@ Page({
let data = res.target.dataset.data
return {
title: '拼团',
- path: `/pages/index/index?couponId=${data.couponId}&orderGroupId=${data.orderGroupId}&couponChannelId=${data.couponChannelId}&orderId=${data.orderId}`,
+ path: `/pages/index/index?couponId=${data.couponId}&orderGroupId=${data.orderGroupId}&couponChannelId=${data.couponChannelId}&orderId=${data.orderId}&avatarUrl=${_this.data.avatarUrl}&nickName=${_this.data.nickName}`,
imageUrl: data.coverImg,
success: function (res) {
// 转发成功
diff --git a/pages/spellGroup/spellGroup.wxss b/pages/spellGroup/spellGroup.wxss
index 4ab30f7..a5a5939 100644
--- a/pages/spellGroup/spellGroup.wxss
+++ b/pages/spellGroup/spellGroup.wxss
@@ -81,6 +81,9 @@ image{
color:rgba(51,51,51,1);
line-height:44rpx;
padding-top: 16rpx;
+ overflow: hidden;
+ text-overflow:ellipsis;
+ white-space: nowrap;
}
.content .remark{
width:304rpx;