瀏覽代碼

拼团分享页面数据展示修改

tags/富茂链客4.1.0
刘晖 6 年之前
父節點
當前提交
cffeca7937
共有 10 個檔案被更改,包括 100 行新增17 行删除
  1. +9
    -3
      pages/getphoneInfo/index.js
  2. +1
    -1
      pages/getuserinfo/index.js
  3. +2
    -2
      pages/index/index.js
  4. +8
    -3
      pages/joinFrDpell/index.js
  5. +10
    -1
      pages/joinFrDpell/index.wxml
  6. +22
    -0
      pages/joinFrDpell/index.wxss
  7. +10
    -4
      pages/phoneinput/phoneinput.js
  8. +18
    -2
      pages/spellDetail/index.js
  9. +17
    -1
      pages/spellGroup/spellGroup.js
  10. +3
    -0
      pages/spellGroup/spellGroup.wxss

+ 9
- 3
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;
}
/**


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


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


+ 8
- 3
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) {


+ 10
- 1
pages/joinFrDpell/index.wxml 查看文件

@@ -11,6 +11,15 @@
<view class='des-saleprice'>{{data.salePriceStr}}元</view>
</view>
<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'>
<image src='{{spellData.avatarUrl}}'></image>
</view>
@@ -23,7 +32,7 @@
<view class='status04 st'>
<view class='s-button' bindtap='gotoPartner'>去拼团</view>
</view>
</view>
</view> -->
<view class='p-des'>
<view class='p-title'>商品详情:</view>
<view class='p-list'>{{data.remark}}</view>


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

+ 10
- 4
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'){


+ 18
- 2
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) {
// 转发成功


+ 17
- 1
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) {
// 转发成功


+ 3
- 0
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;


Loading…
取消
儲存