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