@@ -2,6 +2,7 @@ let config = require("../../config/config.js"); | |||
let app = getApp(); | |||
const Http = require("../../utils/HttpBasics"); | |||
const util = require("../../utils/util"); | |||
const imgurl = require("../../utils/imgurl"); | |||
Page({ | |||
data: { | |||
data: {}, | |||
@@ -9,6 +10,7 @@ Page({ | |||
orderId: "", | |||
day: "", | |||
hour: "", | |||
wmhome: imgurl.wmhome.url, | |||
minute: "", | |||
nodes: '' | |||
}, | |||
@@ -41,6 +43,11 @@ Page({ | |||
}) | |||
} | |||
}, | |||
goback: function () { | |||
wx.switchTab({ | |||
url: '/pages/main/index', | |||
}) | |||
}, | |||
gotoactdetail:function(){ | |||
let that = this; | |||
console.log(that.data.data.detail) | |||
@@ -1,3 +1,4 @@ | |||
<button class='goback' bindtap='goback'><image src='{{wmhome}}' mode="widthFix"></image></button> | |||
<!-- banner活动详情页面 --> | |||
<view class='coupons'> | |||
<view class="coupons-body"> | |||
@@ -349,6 +349,7 @@ navigator:nth-of-type(2n+1) { | |||
border-radius: 16rpx; | |||
padding-bottom: 21rpx; | |||
overflow: hidden; | |||
height: 486rpx; | |||
} | |||
/* .coupons1-border { | |||
@@ -464,6 +465,7 @@ navigator:nth-of-type(2n+1) { | |||
width: 300rpx; | |||
color: #999; | |||
letter-spacing: 0; | |||
height: 30rpx; | |||
} | |||
.coupons1-info-manjian { | |||
@@ -540,3 +542,25 @@ scroll-view { | |||
font-size: 26rpx; | |||
line-height: 15rpx; | |||
} | |||
button::after{ border: none; } | |||
.goback{ | |||
position: fixed; | |||
right: 50rpx; | |||
bottom: 60rpx; | |||
width:100rpx!important; | |||
height:100rpx; | |||
z-index: 100; | |||
background:rgba(255,255,255,1); | |||
line-height: 95rpx; | |||
border:1rpx solid rgba(227,227,227,1); | |||
border-radius:50%; | |||
} | |||
.goback image{ | |||
position: absolute; | |||
width: 60rpx; | |||
left: 0; | |||
right: 0; | |||
top: 0; | |||
bottom: 0; | |||
margin: auto; | |||
} |
@@ -13,15 +13,17 @@ Page({ | |||
}, | |||
onLoad: function(options) { | |||
var that = this; | |||
console.log(options) | |||
if (options.couponChannelId && !options.cuserId||options.orderId) { | |||
that.setData({ | |||
couponChannelId: options.couponChannelId, | |||
orderId:options.orderId | |||
}) | |||
} | |||
this.setData({ | |||
optionData:options | |||
that.setData({ | |||
optionData: options | |||
}) | |||
if (options&&options.path == 'index') { | |||
that.setData({ | |||
path: options.path | |||
@@ -31,7 +33,6 @@ Page({ | |||
* 来自转赠 | |||
*/ | |||
if (options.couponChannelId && options.cuserId){ | |||
console.log(1231231231,options) | |||
that.setData({ | |||
couponChannelId: options.couponChannelId, | |||
cuserId: options.cuserId, | |||
@@ -107,7 +108,12 @@ Page({ | |||
} else if (that.data.optionData.id && app.globalData.type == 'gm') { | |||
// 游戏页面 | |||
that.getGameOne(app.globalData.token, that.data.optionData.id) | |||
} else if (that.data.optionData.id && app.globalData.type == 'td') { | |||
wx.redirectTo({ | |||
url: `/pages/topicDetail/index?id=${that.data.optionData.id}` | |||
}); | |||
} else if (that.data.optionData.bt && that.data.optionData.id && app.globalData.type == 'bd') { | |||
debugger; | |||
// 宣传页详情 | |||
if (that.data.optionData.bt == '2') { | |||
// 自由图文 | |||
@@ -191,15 +197,6 @@ Page({ | |||
url: '/pages/topicDetail/index' | |||
}); | |||
} | |||
/** | |||
* options有问题 | |||
*/ | |||
// else if (options && options.id && app.globalData.type == 'td') { | |||
// // 专题活动页 | |||
// wx.redirectTo({ | |||
// url: '/pages/topicDetail/index' | |||
// }); | |||
// } | |||
else if (app.globalData.type == 'ml') { | |||
// 门店 | |||
wx.switchTab({ | |||
@@ -8,21 +8,17 @@ Page({ | |||
/** | |||
* 页面的初始数据 | |||
*/ | |||
data: { | |||
}, | |||
data: {}, | |||
/** | |||
* 生命周期函数--监听页面加载 | |||
*/ | |||
onLoad: function (options) { | |||
console.log(options); | |||
let that = this; | |||
/** | |||
* 根据接收到的参数的值,判断跳转到哪个页面 | |||
*/ | |||
if (options && options.type) { | |||
app.globalData.type = options.type; | |||
console.log(app.globalData.type) | |||
} | |||
if (decodeURIComponent(options.scene) == "undefined") { | |||
that.setData({ | |||
@@ -59,6 +55,9 @@ Page({ | |||
options.id = this.data.newArr[2]; | |||
} else if (options.type == 'sd') { | |||
options.couponChannelId = this.data.newArr[2]; | |||
} else if (options.type == 'td') { | |||
// 专题活动页 | |||
options.id = this.data.newArr[2]; | |||
} | |||
} | |||
} | |||
@@ -71,7 +70,7 @@ Page({ | |||
wx.setStorageSync('imgurl', imgurl) | |||
app.getLocation(); | |||
if (options.couponChannelId || options.orderId || options.id) { | |||
console.log(options, 33333333333) | |||
debugger; | |||
that.userLogin(options); | |||
} else { | |||
that.userLogin() | |||
@@ -113,7 +112,6 @@ Page({ | |||
}); | |||
return; | |||
} | |||
if (options && options.couponChannelId && app.globalData.type == 'cd') { | |||
// 跳转普通券/消费卡/限时秒杀/砍价详情 | |||
wx.redirectTo({ | |||
@@ -145,7 +143,12 @@ Page({ | |||
url: `/pages/bannerdetail/index?id=${options.id}`, | |||
}) | |||
} | |||
} else if (options && options.orderId && app.globalData.type == 'bg') { | |||
} else if (options && options.id && app.globalData.type == 'td'){ | |||
wx.redirectTo({ | |||
url: `/pages/topicDetail/index?id=${options.id}` | |||
}); | |||
} | |||
else if (options && options.orderId && app.globalData.type == 'bg') { | |||
// 参与砍价 | |||
wx.redirectTo({ | |||
url: `/pages/bargain/bargainDatail/bargainDatail?orderId=${options.orderId}&from=${"discount"}`, | |||
@@ -210,12 +213,7 @@ Page({ | |||
wx.redirectTo({ | |||
url: '/pages/discountCardList/discountCardList' | |||
}); | |||
} else if (options && options.id && app.globalData.type == 'td') { | |||
// 专题活动页 | |||
wx.redirectTo({ | |||
url: `/pages/topicDetail/index?id=${options.id}` | |||
}); | |||
} else if (app.globalData.type == 'ml') { | |||
} else if (app.globalData.type == 'ml') { | |||
// 门店 | |||
wx.switchTab({ | |||
url: '/pages/index/searchbar/index' | |||
@@ -263,7 +261,6 @@ Page({ | |||
* 用户登录 | |||
*/ | |||
userLogin: function (options) { | |||
console.log(1111, options, 2222222222) | |||
var that = this; | |||
// 登录 | |||
wx.login({ | |||
@@ -3,4 +3,4 @@ Page{ | |||
width: 100%; | |||
background:#fff; | |||
opacity: 0; | |||
} | |||
} |
@@ -2,11 +2,13 @@ let config = require("../../config/config.js"); | |||
let app = getApp(); | |||
const Http = require("../../utils/HttpBasics"); | |||
const util = require("../../utils/util"); | |||
const imgurl = require("../../utils/imgurl"); | |||
Page({ | |||
data: { | |||
data: { | |||
bgColor:"#fff" | |||
}, | |||
wmhome: imgurl.wmhome.url, | |||
couponId: null, | |||
orderId: "", | |||
day: "", | |||
@@ -23,6 +25,11 @@ Page({ | |||
this.topicShow(options.id) | |||
} | |||
}, | |||
goback: function () { | |||
wx.switchTab({ | |||
url: '/pages/main/index', | |||
}) | |||
}, | |||
topicShow(id){ | |||
let that = this; | |||
Http.get({ | |||
@@ -1,3 +1,4 @@ | |||
<button class='goback' bindtap='goback'><image src='{{wmhome}}' mode="widthFix"></image></button> | |||
<!-- banner活动详情页面 --> | |||
<view class='coupons' style='background:{{data.bgColor}};height:{{winHeight}}'> | |||
<view class="coupons-body"> | |||
@@ -531,8 +531,29 @@ scroll-view { | |||
display: block; | |||
margin: 30rpx auto; | |||
} | |||
.description { | |||
font-size: 26rpx; | |||
line-height: 15rpx; | |||
} | |||
button::after{ border: none; } | |||
.goback{ | |||
position: fixed; | |||
right: 50rpx; | |||
bottom: 60rpx; | |||
width:100rpx!important; | |||
height:100rpx; | |||
z-index: 100; | |||
background:rgba(255,255,255,1); | |||
line-height: 95rpx; | |||
border:1rpx solid rgba(227,227,227,1); | |||
border-radius:50%; | |||
} | |||
.goback image{ | |||
position: absolute; | |||
width: 60rpx; | |||
left: 0; | |||
right: 0; | |||
top: 0; | |||
bottom: 0; | |||
margin: auto; | |||
} |