Browse Source

【浮层banner】【修改】【授权和海报引起的跳转和显示问题】

wkx_ad_park
[caserKing] 4 years ago
parent
commit
06cb60b71f
9 changed files with 130 additions and 10 deletions
  1. +1
    -1
      components/banner/index.js
  2. +32
    -1
      components/shareposter/index.js
  3. +2
    -2
      ext.json
  4. +1
    -1
      index/index.js
  5. +28
    -1
      pages/coupon/detail/index.js
  6. +10
    -1
      pages/getuserinfo/index.js
  7. +4
    -1
      pages/index/index.js
  8. +25
    -1
      pages/index/searchbar/detail/index.js
  9. +27
    -1
      pages/spellGroup/mySpellGroup/index.js

+ 1
- 1
components/banner/index.js View File

@@ -31,7 +31,7 @@ Component({
let type = (e.currentTarget.dataset.data.pagePath).substr(23,2)
console.log(indexOf, id, type);
console.log(e.currentTarget.dataset.data.pagePath)
if(type == 'cd'){
if(type == 'cd' || type == 'sd'){
wx.navigateTo({
url: `/${e.currentTarget.dataset.data.pagePath}`,
})


+ 32
- 1
components/shareposter/index.js View File

@@ -30,11 +30,42 @@ Component({
/**
* 显示分享海报
*/
showPoster: function() {
/* showPoster: function() {
//跳转到海报生成页
wx.navigateTo({
url: `/pages/canvas/index?merchantId=${this.data.id}`
})
}, */
showPoster: function() {
//跳转到海报生成页
console.log(this.data.fromflag)
let that = this;
Http.get({
url: config.api.checkUserStatus,
data: {
token: app.globalData.token
}
}).then(res => {
wx.navigateTo({
url: `/pages/canvas/index?couponChannelId=${that.data.id}`
})
}).catch(err => {
console.log(err)
if (err.code == 11004) {
// 用户昵称未授权
wx.redirectTo({
url: `/pages/getuserinfo/index?couponChannelId=${that.data.id}&fromflag=poster`
})
}
})

},




}
});

+ 2
- 2
ext.json View File

@@ -23,7 +23,7 @@
"ifHaveCarModular": "1"
},
"name": "金泸商务",
"weappId": "wx9b0a894a3bbe9627",
"weappId": "wx649b3be73c1afe47",
"appVersion": "C.test.5.2.0"
},
"debug": false,
@@ -63,7 +63,7 @@
"navigationBarTitleText": "",
"navigationBarBackgroundColor": "#FFFFFF"
},
"extAppid": "wx9b0a894a3bbe9627",
"extAppid": "wx649b3be73c1afe47",
"extEnable": true,
"permission": {
"scope.userLocation": {


+ 1
- 1
index/index.js View File

@@ -659,7 +659,7 @@ Page({
openId: that.data.openId
}
}).then(res => {
res = JSON.parse('{"code":200,"message":"查询成功","data":{"tenantId":"789","id":"418717151530979328","coverImg":"https://iformall-net.s3.cn-northwest-1.amazonaws.com.cn/789/0296235f-39ef-4968-b076-cd76211fcf2d.jfif","produceId":"418715528452771840","pagePath":"pages/index/index?type=sd&couponChannelId=418715528452771840","status":0,"createTime":1588941559000,"updateTime":1588941559000}}')
// res = JSON.parse('{"code":200,"message":"查询成功","data":{"tenantId":"789","id":"418717151530979328","coverImg":"https://iformall-net.s3.cn-northwest-1.amazonaws.com.cn/789/0296235f-39ef-4968-b076-cd76211fcf2d.jfif","produceId":"418715528452771840","pagePath":"pages/index/index?type=sd&couponChannelId=418715528452771840","status":0,"createTime":1588941559000,"updateTime":1588941559000}}')
console.log(res)
if (res.data.id) {
that.setData({


+ 28
- 1
pages/coupon/detail/index.js View File

@@ -104,11 +104,38 @@ Page({
/**
* 显示分享海报
*/
showPoster: function() {
/* showPoster: function() {
//跳转到海报生成页
console.log(this.data.canIUse)

// return;
wx.navigateTo({
url: `/pages/canvas/index?couponChannelId=${this.data.data.id}`
})
}, */
showPoster: function() {
//跳转到海报生成页
let that = this;
Http.get({
url: config.api.checkUserStatus,
data: {
token: app.globalData.token
}
}).then(res => {
wx.navigateTo({
url: `/pages/canvas/index?couponChannelId=${that.data.data.id}`
})
}).catch(err => {
console.log(err)
if (err.code == 11004) {
// 用户昵称未授权
wx.redirectTo({
url: `/pages/getuserinfo/index?couponChannelId=${that.data.data.id}&fromflag=poster`
})
}
})
},
swiperChange: function (e) {
this.setData({


+ 10
- 1
pages/getuserinfo/index.js View File

@@ -117,6 +117,14 @@ Page({
})
.then(
function (res) {
// debugger;
if (that.data.fromflag == 'poster') {
wx.redirectTo({
url: `/pages/canvas/index?couponChannelId=${that.data.couponChannelId}`
})
return;
}
//
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}&avatarUrl=${that.data.optionData.avatarUrl}&nickName=${that.data.optionData.nickName}`
@@ -129,7 +137,8 @@ Page({
});
} else {
//返回主页
if (that.data.couponChannelId && !that.data.cuserId && !that.data.spellGroup||that.data.couponChannelId && !that.data.cuserId&&app.globalData.type == 'cd') {
// if (that.data.couponChannelId && !that.data.cuserId && !that.data.spellGroup||that.data.couponChannelId && !that.data.cuserId&&app.globalData.type == 'cd') {
if (that.data.couponChannelId && !that.data.cuserId && !that.data.spellGroup && app.globalData.type == 'cd') {
// 跳转普通券/消费卡/限时秒杀/砍价详情
wx.navigateTo({
url: `/pages/coupon/detail/index?couponChannelId=${that.data.couponChannelId}`


+ 4
- 1
pages/index/index.js View File

@@ -130,6 +130,7 @@ Page({
},
checkuserstatus(options) {
let that = this;
Http.get({
url: config.api.checkUserStatus,
data: {
@@ -137,6 +138,8 @@ Page({
}
})
.then(res => {
// res = JSON.parse('{"code":11004,"message":"用户昵称未授权,请跳转到用户昵称授权页!","data":{}}')
//参与拼团
if (options && options.orderGroupId) {
wx.redirectTo({
@@ -160,7 +163,7 @@ Page({
})
})
} else if (options && options.couponChannelId && !options.spellGroup && app.globalData.type != 'sd') {
console.log(3333333333333333)
// 转赠判断
if (options.cuserId) {
wx.redirectTo({


+ 25
- 1
pages/index/searchbar/detail/index.js View File

@@ -94,11 +94,35 @@ Page({
/**
* 显示分享海报
*/
showPoster: function() {
/* showPoster: function() {
//跳转到海报生成页
wx.navigateTo({
url: `/pages/canvas/index?merchantId=${this.data.id}`
})
}, */
showPoster: function() {
//跳转到海报生成页
let that = this;
Http.get({
url: config.api.checkUserStatus,
data: {
token: app.globalData.token
}
}).then(res => {
wx.navigateTo({
url: `/pages/canvas/index?couponChannelId=${that.data.id}`
})
}).catch(err => {
console.log(err)
if (err.code == 11004) {
// 用户昵称未授权
wx.redirectTo({
url: `/pages/getuserinfo/index?couponChannelId=${that.data.id}&fromflag=poster`
})
}
})
},
//点击切换
clickTab: function(e) {


+ 27
- 1
pages/spellGroup/mySpellGroup/index.js View File

@@ -68,11 +68,37 @@ Page({
/**
* 显示分享海报
*/
showPoster: function() {
/* showPoster: function() {
//跳转到海报生成页
wx.navigateTo({
url: `/pages/canvas/index?couponChannelId=${this.data.data.id}`
})
}, */
showPoster: function() {
console.log(this.data.data)
let that = this;
Http.get({
url: config.api.checkUserStatus,
data: {
token: app.globalData.token
}
}).then(res => {
wx.navigateTo({
url: `/pages/canvas/index?couponChannelId=${that.data.data.id}`
})
}).catch(err => {
console.log(err)
if (err.code == 11004) {
// 用户昵称未授权
wx.redirectTo({
url: `/pages/getuserinfo/index?couponChannelId=${that.data.data.id}&fromflag=poster`
})
}
})

//跳转到海报生成页
},
/**
* 显示分享弹框


Loading…
Cancel
Save