| @@ -65,9 +65,15 @@ Page({ | |||||
| */ | */ | ||||
| console.log(that.data, 98888) | console.log(that.data, 98888) | ||||
| if (that.data.path == 'spell') { | 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; | return; | ||||
| } | } | ||||
| /** | /** | ||||
| @@ -80,7 +80,7 @@ Page({ | |||||
| console.log(res, that.data,6666666666) | console.log(res, that.data,6666666666) | ||||
| if (that.data.optionData.orderGroupId){ | if (that.data.optionData.orderGroupId){ | ||||
| wx.reLaunch({ | 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; | return; | ||||
| } | } | ||||
| @@ -68,7 +68,7 @@ Page({ | |||||
| .then(res => { | .then(res => { | ||||
| if (options && options.orderGroupId) { | if (options && options.orderGroupId) { | ||||
| wx.redirectTo({ | 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; | return; | ||||
| } | } | ||||
| @@ -98,7 +98,7 @@ Page({ | |||||
| // 用户昵称未授权 | // 用户昵称未授权 | ||||
| if (options && options.orderGroupId) { | if (options && options.orderGroupId) { | ||||
| wx.redirectTo({ | 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; | return; | ||||
| } | } | ||||
| @@ -26,11 +26,14 @@ Page({ | |||||
| * 生命周期函数--监听页面加载 | * 生命周期函数--监听页面加载 | ||||
| */ | */ | ||||
| onLoad: function (options) { | onLoad: function (options) { | ||||
| console.log(options,22) | |||||
| this.setData({ | this.setData({ | ||||
| couponChannelId: options.couponChannelId, | couponChannelId: options.couponChannelId, | ||||
| couponId: options.couponId, | couponId: options.couponId, | ||||
| orderGroupId: options.orderGroupId, | orderGroupId: options.orderGroupId, | ||||
| orderId:options.orderId | |||||
| orderId:options.orderId, | |||||
| avatarUrl: options.avatarUrl, | |||||
| nickName: options.nickName, | |||||
| }) | }) | ||||
| this.checkUser(options); | this.checkUser(options); | ||||
| }, | }, | ||||
| @@ -146,9 +149,11 @@ Page({ | |||||
| getOneSpell(couponId) { | getOneSpell(couponId) { | ||||
| let that = this; | let that = this; | ||||
| Http.get({ | Http.get({ | ||||
| url: config.api.queryRemainOne, | |||||
| url: config.api.queryOrderGroupStatus, | |||||
| data: { | data: { | ||||
| couponId: couponId | |||||
| couponId: couponId, | |||||
| id: that.data.orderGroupId, | |||||
| orderId: that.data.orderId | |||||
| } | } | ||||
| }).then(res => { | }).then(res => { | ||||
| if (res.data) { | if (res.data) { | ||||
| @@ -11,6 +11,15 @@ | |||||
| <view class='des-saleprice'>{{data.salePriceStr}}元</view> | <view class='des-saleprice'>{{data.salePriceStr}}元</view> | ||||
| </view> | </view> | ||||
| <view class='status'> | <view class='status'> | ||||
| <view class='status01 st'> | |||||
| <image src='{{avatarUrl}}'></image> | |||||
| </view> | |||||
| <view class='status04 st join-c' style='width:auto;'> | |||||
| <view class='j-f'>您的好友 {{nickName}} 邀请您参加拼团</view> | |||||
| <view class='j-t'>剩余时间:<view class='j-time'>{{hour+' : '+min+' : '+sec}}</view></view> | |||||
| </view> | |||||
| </view> | |||||
| <!-- <view class='status'> | |||||
| <view class='status01 st'> | <view class='status01 st'> | ||||
| <image src='{{spellData.avatarUrl}}'></image> | <image src='{{spellData.avatarUrl}}'></image> | ||||
| </view> | </view> | ||||
| @@ -23,7 +32,7 @@ | |||||
| <view class='status04 st'> | <view class='status04 st'> | ||||
| <view class='s-button' bindtap='gotoPartner'>去拼团</view> | <view class='s-button' bindtap='gotoPartner'>去拼团</view> | ||||
| </view> | </view> | ||||
| </view> | |||||
| </view> --> | |||||
| <view class='p-des'> | <view class='p-des'> | ||||
| <view class='p-title'>商品详情:</view> | <view class='p-title'>商品详情:</view> | ||||
| <view class='p-list'>{{data.remark}}</view> | <view class='p-list'>{{data.remark}}</view> | ||||
| @@ -316,4 +316,26 @@ | |||||
| margin: auto; | margin: auto; | ||||
| width: 50rpx; | width: 50rpx; | ||||
| height: 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; | |||||
| } | } | ||||
| @@ -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; | return; | ||||
| } | } | ||||
| if (that.path != 'index'){ | if (that.path != 'index'){ | ||||
| @@ -31,6 +31,21 @@ Page({ | |||||
| url: `/pages/spellGroup/mySpellGroup/index?couponId=${data.couponId}&couponChannelId=${data.couponChannelId}`, | 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(){ | gotoIndex(){ | ||||
| wx.reLaunch({ | wx.reLaunch({ | ||||
| url: '/pages/index/index', | url: '/pages/index/index', | ||||
| @@ -54,6 +69,7 @@ Page({ | |||||
| this.setData({ | this.setData({ | ||||
| paramData: options | paramData: options | ||||
| }) | }) | ||||
| this.getUserInfo() | |||||
| this.getDetail(options); | this.getDetail(options); | ||||
| this.checkUser(options) | this.checkUser(options) | ||||
| // 关闭来自于左上角的分享 | // 关闭来自于左上角的分享 | ||||
| @@ -231,12 +247,12 @@ Page({ | |||||
| // paramData | // paramData | ||||
| onShareAppMessage: function (res) { | onShareAppMessage: function (res) { | ||||
| if (res.from === 'button') { | if (res.from === 'button') { | ||||
| console.log(res, 3333333333333333333333) | |||||
| console.log(res, this.data.nickName, this.data.avatarUrl, 3333333333333333333333) | |||||
| // 来自页面内转发按钮 | // 来自页面内转发按钮 | ||||
| let _this = this; | let _this = this; | ||||
| return { | return { | ||||
| title: '拼团', | 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, | imageUrl: _this.data.data.coverImg, | ||||
| success: function (res) { | success: function (res) { | ||||
| // 转发成功 | // 转发成功 | ||||
| @@ -31,6 +31,7 @@ Page({ | |||||
| todayDate: todayDate | todayDate: todayDate | ||||
| }) | }) | ||||
| that.getList(1, "spellList"); | that.getList(1, "spellList"); | ||||
| that.getUserInfo() | |||||
| that.setData({ | that.setData({ | ||||
| flag: "spellList", | flag: "spellList", | ||||
| spellList: true, | 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 | let data = res.target.dataset.data | ||||
| return { | return { | ||||
| title: '拼团', | 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, | imageUrl: data.coverImg, | ||||
| success: function (res) { | success: function (res) { | ||||
| // 转发成功 | // 转发成功 | ||||
| @@ -81,6 +81,9 @@ image{ | |||||
| color:rgba(51,51,51,1); | color:rgba(51,51,51,1); | ||||
| line-height:44rpx; | line-height:44rpx; | ||||
| padding-top: 16rpx; | padding-top: 16rpx; | ||||
| overflow: hidden; | |||||
| text-overflow:ellipsis; | |||||
| white-space: nowrap; | |||||
| } | } | ||||
| .content .remark{ | .content .remark{ | ||||
| width:304rpx; | width:304rpx; | ||||