浏览代码

拼团分享授权跳转判断修改

tags/富茂链客4.1.0
刘晖 6 年前
父节点
当前提交
339502e755
共有 6 个文件被更改,包括 25 次插入17 次删除
  1. +9
    -7
      pages/getphoneInfo/index.js
  2. +9
    -6
      pages/getuserinfo/index.js
  3. +3
    -0
      pages/index/index.js
  4. +2
    -2
      pages/spellDetail/index.js
  5. +1
    -1
      pages/spellGroup/mySpellGroup/index.js
  6. +1
    -1
      pages/spellGroup/spellGroup.js

+ 9
- 7
pages/getphoneInfo/index.js 查看文件

@@ -9,9 +9,10 @@ Page({
paramData:null
},
onLoad: function (options) {
if(options.path=='index'){
this.path = options.path
}
console.log(options,98888)
this.setData({
path: options.path
})
this.setData({
paramData: options
})
@@ -62,20 +63,21 @@ Page({
/**
* 来自拼团详情
*/
if (that.path == 'spell') {
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
url: "/pages/spellGroup/mySpellGroup/index?couponChannelId=" + that.data.paramData.couponChannelId + "&couponId=" + that.data.paramData.couponId
})
return;
}
/**
* fromId若存在来自卡转赠
*/
if (that.path == 'index' && !that.data.paramData.cuserId) {
if (that.data.path == 'index' && !that.data.paramData.cuserId) {
wx.redirectTo({
url: "/pages/game/index?url=" + that.data.paramData.url + "&id=" + that.data.paramData.id + "&gameId=" + that.data.paramData.gameId,
})
} else if (that.path == 'index' && that.data.paramData.cuserId){
} else if (that.data.path == 'index' && that.data.paramData.cuserId){
wx.reLaunch({
url: "/pages/coupon/detail/index?cuserId=" + that.data.paramData.cuserId + '&couponChannelId=' + that.data.paramData.couponChannelId + '&coverImg=' + that.data.paramData.coverImg + '&avatarUrl=' + that.data.paramData.avatarUrl + '&userName=' + that.data.paramData.userName + '&couponOrderId=' + that.data.paramData.couponOrderId + "&updateDate=" + that.data.paramData.updateDate
})


+ 9
- 6
pages/getuserinfo/index.js 查看文件

@@ -22,6 +22,11 @@ Page({
this.setData({
optionData:options
})
if (options&&options.path == 'index') {
that.setData({
path: options.path
})
}
/**
* 来自转赠
*/
@@ -36,9 +41,6 @@ Page({
couponOrderId: options.couponOrderId
})
}
if (options.path == 'index') {
that.path = options.path
}
Http.get({
url: config.api.marketicon,
data: {
@@ -75,13 +77,14 @@ Page({
})
.then(
function (res) {
console.log(res)
console.log(res, that.data,6666666666)
if (that.data.optionData.orderGroupId){
wx.reLaunch({
url: `/pages/joinFrDpell/index?couponId=${optionData.couponId}&orderGroupId=${optionData.orderGroupId}&couponChannelId=${optionData.couponChannelId}&orderId=${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}`
});
return;
}
if (that.path == 'index') {
if (that.data.path == 'index') {
wx.reLaunch({
url: "/pages/game/index"
});


+ 3
- 0
pages/index/index.js 查看文件

@@ -13,6 +13,7 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
console.log(options,10001)
let that = this;
if (decodeURIComponent(options.scene) == "undefined") {
that.setData({
@@ -40,6 +41,7 @@ Page({
wx.setStorageSync('imgurl', imgurl)
app.getLocation();
if (options.couponChannelId || options.orderId) {
console.log(options,33333333333)
that.userLogin(options);
// if (options.cuserId){
// /**
@@ -127,6 +129,7 @@ Page({
* 用户登录
*/
userLogin: function (options) {
console.log(1111,options,2222222222)
var that = this;
// 登录
wx.login({


+ 2
- 2
pages/spellDetail/index.js 查看文件

@@ -168,8 +168,8 @@ Page({
let _this = this;
return {
title: '拼团',
path: `/pages/index/index?couponId=${this.data.couponId}&orderGroupId=${this.data.orderGroupId}&couponChannelId=${this.data.couponChannelId}&orderId=${this.data.orderId}`,
imageUrl: this.data.data.coverImg,
path: `/pages/index/index?couponId=${_this.data.data.couponId}&orderGroupId=${_this.data.data.orderGroupId}&couponChannelId=${_this.data.paramData.couponChannelId}&orderId=${_this.data.data.orderId}`,
imageUrl: _this.data.data.coverImg,
success: function (res) {
// 转发成功
},


+ 1
- 1
pages/spellGroup/mySpellGroup/index.js 查看文件

@@ -175,7 +175,7 @@ Page({
})
.then(res => {
wx.navigateTo({
url: `/pages/spellDetail/index?orderId=${orderId}&couponId=${_this.data.data.couponId}&orderGroupId=${res.data.orderGroupId}`
url: `/pages/spellDetail/index?orderId=${orderId}&couponId=${_this.data.data.couponId}&orderGroupId=${res.data.orderGroupId}&couponChannelId=${_this.data.couponChannelId}`
});
})
.catch(err => {


+ 1
- 1
pages/spellGroup/spellGroup.js 查看文件

@@ -51,7 +51,7 @@ Page({
console.log(e,333)
let data = e.currentTarget.dataset.data
wx.navigateTo({
url: `/pages/spellDetail/index?orderId=${data.orderId}&couponId=${data.couponId}&orderGroupId=${data.orderGroupId}`,
url: `/pages/spellDetail/index?orderId=${data.orderId}&couponId=${data.couponId}&orderGroupId=${data.orderGroupId}&couponChannelId=${data.couponChannelId}`,
})
},
//切换我的拼团


正在加载...
取消
保存