소스 검색

拼团分享功能授权修改

tags/富茂链客4.1.0
刘晖 6 년 전
부모
커밋
6bd59c3d60
3개의 변경된 파일26개의 추가작업 그리고 5개의 파일을 삭제
  1. +10
    -1
      pages/getuserinfo/index.js
  2. +15
    -3
      pages/index/index.js
  3. +1
    -1
      pages/spellDetail/index.js

+ 10
- 1
pages/getuserinfo/index.js 파일 보기

@@ -8,7 +8,8 @@ Page({
couponChannelId: null,
cuserId:null,
coverImg:null,
couponOrderId:null
couponOrderId:null,
optionData:null
},
onLoad: function(options) {
var that = this;
@@ -18,6 +19,9 @@ Page({
orderId:options.orderId
})
}
this.setData({
optionData:options
})
/**
* 来自转赠
*/
@@ -72,6 +76,11 @@ Page({
.then(
function (res) {
console.log(res)
if (that.data.optionData.orderGroupId){
wx.reLaunch({
url: `/pages/joinFrDpell/index?couponId=${optionData.couponId}&orderGroupId=${optionData.orderGroupId}&couponChannelId=${optionData.couponChannelId}&orderId=${optionData.orderId}`
});
}
if (that.path == 'index') {
wx.reLaunch({
url: "/pages/game/index"


+ 15
- 3
pages/index/index.js 파일 보기

@@ -64,6 +64,12 @@ Page({
data: {}
})
.then(res => {
if (options && options.orderGroupId) {
wx.redirectTo({
url: `/pages/joinFrDpell/index?couponId=${options.couponId}&orderGroupId=${options.orderGroupId}&couponChannelId=${options.couponChannelId}&orderId=${options.orderId}`
})
return;
}
if (options&&options.couponChannelId && !options.cuserId) {
wx.redirectTo({
url: `/pages/coupon/detail/index?couponChannelId=${options.couponChannelId}`,
@@ -88,18 +94,24 @@ Page({
.catch(err => {
if (err.code == 11004) {
// 用户昵称未授权
if (options.couponChannelId && !options.cuserId) {
if (options && options.orderGroupId) {
wx.redirectTo({
url: `/pages/getuserinfo/index?couponId=${options.couponId}&orderGroupId=${options.orderGroupId}&couponChannelId=${options.couponChannelId}&orderId=${options.orderId}`
})
return;
}
if (options && options.couponChannelId && !options.cuserId) {
wx.redirectTo({
url: `/pages/getuserinfo/index?couponChannelId=${options.couponChannelId}`
});
} else if (options.couponChannelId && options.cuserId){
} else if (options &&options.couponChannelId && options.cuserId){
/**
* 转赠判断
*/
wx.redirectTo({
url: `/pages/getuserinfo/index?couponChannelId=${options.couponChannelId}&cuserId=${options.cuserId}&coverImg=${options.coverImg}&userName=${options.userName}&avatarUrl=${options.avatarUrl}&couponOrderId=${options.couponOrderId}&updateDate=${options.updateDate}`
});
} else if (options.orderId) {
} else if (options && options.orderId) {
wx.redirectTo({
url: `/pages/getuserinfo/index?orderId=${options.orderId}&from='${"discount"}`
});


+ 1
- 1
pages/spellDetail/index.js 파일 보기

@@ -168,7 +168,7 @@ Page({
let _this = this;
return {
title: '拼团',
path: `/pages/index/index?couponId=${this.data.couponId}&orderGroupId=${this.data.orderGroupId}&couponChannelId=${this.data.couponChannelId}`,
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,
success: function (res) {
// 转发成功


불러오는 중...
취소
저장