@@ -52,8 +52,8 @@ Page({ | |||||
}) | }) | ||||
}, | }, | ||||
goback:function(){ | goback:function(){ | ||||
wx.reLaunch({ | |||||
url: '/pages/index/index', | |||||
wx.switchTab({ | |||||
url: '/pages/login/index', | |||||
}) | }) | ||||
}, | }, | ||||
/** | /** | ||||
@@ -1,3 +1,4 @@ | |||||
<button class='goback' bindtap='goback'><image src='./../../../assets/images/home.png' mode="widthFix"></image></button> | |||||
<view class="bargainDetail" hover-class="none" hover-stop-propagation="false" wx:if="{{showPage}}"> | <view class="bargainDetail" hover-class="none" hover-stop-propagation="false" wx:if="{{showPage}}"> | ||||
<view class="listitem clearfix" hover-class="none" hover-stop-propagation="false"> | <view class="listitem clearfix" hover-class="none" hover-stop-propagation="false"> | ||||
<image class="fl" src="{{data.coverImg}}" lazy-load="true" binderror="" bindload="" mode='aspectFill'></image> | <image class="fl" src="{{data.coverImg}}" lazy-load="true" binderror="" bindload="" mode='aspectFill'></image> | ||||
@@ -57,13 +58,12 @@ | |||||
</view> | </view> | ||||
</view> | </view> | ||||
<view wx:if="{{data.orderStatus != 7&&discountStatus==1&&todayDate<=data.pressEndDate&&data.orderStatus!=1}}" class="btns clearfix" hover-class="none" hover-stop-propagation="false"> | |||||
<button class='goback' bindtap='goback'><image src='./../../../assets/images/home.png' mode="widthFix"></image></button> | |||||
<button class="fl" bindtap='orderFunc' disabled='{{showButton}}' data-orderId="{{data.id}}" data-price="{{data.price/100}}"> | |||||
<text>{{data.price/100}}元</text> | |||||
<text>立即购买</text> | |||||
</button> | |||||
<button class='share user-motto fr' data-orderId='{{data.id}}' id="shareBtn" open-type="share" hover-class="other-button-hover">邀请好友砍价</button> | |||||
<view class="btns clearfix" wx:if="{{data.orderStatus != 7&&discountStatus==1&&todayDate<=data.pressEndDate&&data.orderStatus!=1}}" hover-class="none" hover-stop-propagation="false"> | |||||
<button class="fl" bindtap='orderFunc' disabled='{{showButton}}' data-orderId="{{data.id}}" data-price="{{data.price/100}}"> | |||||
<text>{{data.price/100}}元</text> | |||||
<text>立即购买</text> | |||||
</button> | |||||
<button class='share user-motto fr' data-orderId='{{data.id}}' id="shareBtn" open-type="share" hover-class="other-button-hover">邀请好友砍价</button> | |||||
</view> | </view> | ||||
<view style='display:{{display}}' wx:if="{{data.orderStatus == 7&&discountStatus == 1}}" class="btns01 clearfix" hover-class="none" hover-stop-propagation="false"> | <view style='display:{{display}}' wx:if="{{data.orderStatus == 7&&discountStatus == 1}}" class="btns01 clearfix" hover-class="none" hover-stop-propagation="false"> | ||||
<button bindtap='orderFunc' data-orderId="{{data.id}}" data-salePrice="{{data.salePrice/100}}" hover-class="other-button-hover">{{data.salePrice/100}}元 底价购买</button> | <button bindtap='orderFunc' data-orderId="{{data.id}}" data-salePrice="{{data.salePrice/100}}" hover-class="other-button-hover">{{data.salePrice/100}}元 底价购买</button> | ||||
@@ -217,29 +217,29 @@ | |||||
z-index: 100; | z-index: 100; | ||||
background: #fff; | background: #fff; | ||||
} | } | ||||
.btns > view,.btns > button{ | |||||
width: 330rpx; | |||||
.btns button{ | |||||
width: 320rpx!important; | |||||
height: 95rpx; | height: 95rpx; | ||||
border-radius:48rpx; | border-radius:48rpx; | ||||
text-align: center; | text-align: center; | ||||
} | } | ||||
.btns .fl{ | .btns .fl{ | ||||
width: 250rpx; | |||||
color: #fff; | color: #fff; | ||||
background:rgba(255,169,2,1); | background:rgba(255,169,2,1); | ||||
box-shadow:0px 8px 8px 1px rgba(255,169,2,0.32); | box-shadow:0px 8px 8px 1px rgba(255,169,2,0.32); | ||||
margin-left: 22rpx; | |||||
} | } | ||||
.goback{ | .goback{ | ||||
position: relative; | |||||
float: left; | |||||
width:122rpx!important; | |||||
height:95rpx; | |||||
position: fixed; | |||||
right: 38rpx; | |||||
top: 60rpx; | |||||
width:100rpx!important; | |||||
height:100rpx; | |||||
z-index: 100; | |||||
background:rgba(255,255,255,1); | background:rgba(255,255,255,1); | ||||
line-height: 95rpx; | line-height: 95rpx; | ||||
border:1rpx solid rgba(227,227,227,1); | border:1rpx solid rgba(227,227,227,1); | ||||
box-shadow:0px 8px 8px 1px rgba(189,189,189,0.32); | box-shadow:0px 8px 8px 1px rgba(189,189,189,0.32); | ||||
border-radius:48rpx; | |||||
border-radius:50%; | |||||
} | } | ||||
.goback image{ | .goback image{ | ||||
position: absolute; | position: absolute; | ||||
@@ -262,7 +262,7 @@ | |||||
font-size: 30rpx; | font-size: 30rpx; | ||||
color: #fff; | color: #fff; | ||||
line-height: 95rpx; | line-height: 95rpx; | ||||
width: 271rpx; | |||||
width: 256rpx; | |||||
background:linear-gradient(90deg,rgba(236,59,45,1) 0%,rgba(248,98,52,1) 100%); | background:linear-gradient(90deg,rgba(236,59,45,1) 0%,rgba(248,98,52,1) 100%); | ||||
box-shadow:0px 8px 8px 1px rgba(246,93,51,0.32); | box-shadow:0px 8px 8px 1px rgba(246,93,51,0.32); | ||||
} | } | ||||
@@ -8,7 +8,7 @@ | |||||
<image src="{{couponUrl}}" mode="widthFix" /> | <image src="{{couponUrl}}" mode="widthFix" /> | ||||
<text class="txt001">请您敬请期待</text> | <text class="txt001">请您敬请期待</text> | ||||
<text class='txt002'>我们正在筹备一大波优惠活动</text> | <text class='txt002'>我们正在筹备一大波优惠活动</text> | ||||
<navigator class='nav' url="/pages/index/index" open-type="switchTab" hover-class="other-navigator-hover"> | |||||
<navigator class='nav' url="/pages/login/index" open-type="switchTab" hover-class="other-navigator-hover"> | |||||
<button hover-class='active'>前往首页看看</button> | <button hover-class='active'>前往首页看看</button> | ||||
</navigator> | </navigator> | ||||
</view> | </view> | ||||
@@ -54,6 +54,11 @@ Page({ | |||||
phoneNumber: e.target.dataset.merchantlinkphone | phoneNumber: e.target.dataset.merchantlinkphone | ||||
}); | }); | ||||
}, | }, | ||||
goback: function () { | |||||
wx.switchTab({ | |||||
url: '/pages/login/index', | |||||
}) | |||||
}, | |||||
/** | /** | ||||
* 点击提交问题单选 | * 点击提交问题单选 | ||||
*/ | */ | ||||
@@ -84,6 +84,7 @@ | |||||
</view> | </view> | ||||
<view class="buy-view app-border-top" style="position:fixed;z-index:{{zIndex}};"> | <view class="buy-view app-border-top" style="position:fixed;z-index:{{zIndex}};"> | ||||
<button class='goback' bindtap='goback'><image src='./../../../assets/images/home.png' mode="widthFix"></image></button> | |||||
<button bindtap='gotopay' disabled='{{showbutton}}' hover-class='active' class='buy' wx:if="{{data.salePriceStr!=0&&data.remainInventory!=0&&endtime!='活动已结束'}}"> | <button bindtap='gotopay' disabled='{{showbutton}}' hover-class='active' class='buy' wx:if="{{data.salePriceStr!=0&&data.remainInventory!=0&&endtime!='活动已结束'}}"> | ||||
<text class='txt'>{{data.salePriceStr}}元</text>马上购买</button> | <text class='txt'>{{data.salePriceStr}}元</text>马上购买</button> | ||||
<button bindtap='gotopay' disabled='{{showbutton}}' class='buy' wx:if="{{data.salePriceStr==0&&data.remainInventory!=0&&endtime!='活动已结束'}}">免费领取</button> | <button bindtap='gotopay' disabled='{{showbutton}}' class='buy' wx:if="{{data.salePriceStr==0&&data.remainInventory!=0&&endtime!='活动已结束'}}">免费领取</button> | ||||
@@ -279,13 +279,34 @@ button::after{ border: none; } | |||||
position: relative; | position: relative; | ||||
background: #00c0ff; | background: #00c0ff; | ||||
height: 94rpx; | height: 94rpx; | ||||
width: 670rpx; | |||||
width: 560rpx; | |||||
margin: 0 auto 30rpx; | margin: 0 auto 30rpx; | ||||
color: #fff; | color: #fff; | ||||
font-size: 36rpx; | font-size: 36rpx; | ||||
line-height: 94rpx; | line-height: 94rpx; | ||||
border-radius: 61rpx; | border-radius: 61rpx; | ||||
} | } | ||||
.goback{ | |||||
position: relative; | |||||
float: left; | |||||
width:122rpx!important; | |||||
height:95rpx; | |||||
background:rgba(255,255,255,1); | |||||
line-height: 95rpx; | |||||
border:1rpx solid rgba(227,227,227,1); | |||||
box-shadow:0px 8px 8px 1px rgba(189,189,189,0.32); | |||||
border-radius:48rpx; | |||||
margin-left: 25rpx; | |||||
} | |||||
.goback image{ | |||||
position: absolute; | |||||
width: 60rpx; | |||||
left: 0; | |||||
right: 0; | |||||
top: 0; | |||||
bottom: 0; | |||||
margin: auto; | |||||
} | |||||
.tel { | .tel { | ||||
right: 0; | right: 0; | ||||
@@ -8,7 +8,7 @@ | |||||
<image src="{{couponUrl}}" mode="widthFix" /> | <image src="{{couponUrl}}" mode="widthFix" /> | ||||
<text class="txt001">请您敬请期待</text> | <text class="txt001">请您敬请期待</text> | ||||
<text class='txt002'>我们正在筹备一大波优惠活动</text> | <text class='txt002'>我们正在筹备一大波优惠活动</text> | ||||
<navigator class='nav' url="/pages/index/index" open-type="switchTab" hover-class="other-navigator-hover"> | |||||
<navigator class='nav' url="/pages/login/index" open-type="switchTab" hover-class="other-navigator-hover"> | |||||
<button hover-class='active'>前往首页看看</button> | <button hover-class='active'>前往首页看看</button> | ||||
</navigator> | </navigator> | ||||
</view> | </view> | ||||
@@ -9,7 +9,7 @@ | |||||
<image src="{{couponUrl}}" mode="aspectFill" lazy-load="true" /> | <image src="{{couponUrl}}" mode="aspectFill" lazy-load="true" /> | ||||
<text class="txt001">请您敬请期待</text> | <text class="txt001">请您敬请期待</text> | ||||
<text class='txt002'>我们正在筹备一大波优惠活动</text> | <text class='txt002'>我们正在筹备一大波优惠活动</text> | ||||
<navigator class='nav' url="/pages/index/index" open-type="switchTab" hover-class="other-navigator-hover"> | |||||
<navigator class='nav' url="/pages/login/index" open-type="switchTab" hover-class="other-navigator-hover"> | |||||
<button hover-class='active'>前往首页看看</button> | <button hover-class='active'>前往首页看看</button> | ||||
</navigator> | </navigator> | ||||
</view> | </view> | ||||
@@ -64,16 +64,16 @@ Page({ | |||||
} else { | } else { | ||||
//返回主页 | //返回主页 | ||||
if (that.data.couponChannelId && that.data.couponId) { | if (that.data.couponChannelId && that.data.couponId) { | ||||
wx.redirectTo({ | |||||
wx.navigateTo({ | |||||
url: `/pages/coupon/detail/index?couponChannelId=${that.data.couponChannelId}&couponId=${that.data.couponId}` | url: `/pages/coupon/detail/index?couponChannelId=${that.data.couponChannelId}&couponId=${that.data.couponId}` | ||||
}); | }); | ||||
} else if (that.data.orderId) { | } else if (that.data.orderId) { | ||||
wx.redirectTo({ | |||||
wx.navigateTo({ | |||||
url: `/pages/bargain/bargainDatail/bargainDatail?orderId=${that.data.orderId}&from=${"friend"}` | url: `/pages/bargain/bargainDatail/bargainDatail?orderId=${that.data.orderId}&from=${"friend"}` | ||||
}); | }); | ||||
} else { | } else { | ||||
wx.switchTab({ | wx.switchTab({ | ||||
url: "/pages/index/index" | |||||
url: "/pages/login/index" | |||||
}); | }); | ||||
} | } | ||||
} | } | ||||
@@ -19,8 +19,6 @@ Page({ | |||||
icon: "loading", | icon: "loading", | ||||
duration: 2000 | duration: 2000 | ||||
}) | }) | ||||
console.log(options); | |||||
console.log("----------------------------------options---------------------------------------") | |||||
wx.setStorageSync('options', JSON.stringify(options)) | wx.setStorageSync('options', JSON.stringify(options)) | ||||
wx.setStorageSync('imgurl', imgurl) | wx.setStorageSync('imgurl', imgurl) | ||||
if (decodeURIComponent(options.scene) == "undefined") { | if (decodeURIComponent(options.scene) == "undefined") { | ||||
@@ -39,6 +37,42 @@ Page({ | |||||
that.userLogin() | that.userLogin() | ||||
} | } | ||||
}, | }, | ||||
checkuerstatus(couponChannelId, couponId, orderId) { | |||||
let that = this; | |||||
Http.post({ | |||||
url: config.api.checkUserStatus, | |||||
data: {} | |||||
}) | |||||
.then(res => { | |||||
if (couponChannelId && couponId) { | |||||
wx.redirectTo({ | |||||
url: `/pages/coupon/detail/index?couponChannelId=${couponChannelId}&couponId=${couponId}`, | |||||
}) | |||||
} else if (orderId) { | |||||
wx.redirectTo({ | |||||
url: `/pages/bargain/bargainDatail/bargainDatail?orderId=${orderId}&from='${"discount"}`, | |||||
}) | |||||
}else{ | |||||
wx.switchTab({ | |||||
url: '/pages/login/index' | |||||
}); | |||||
} | |||||
}) | |||||
.catch(err => { | |||||
if (err.code == 11004) { | |||||
// 用户昵称未授权 | |||||
if (couponChannelId && couponId) { | |||||
wx.redirectTo({ | |||||
url: `/pages/getuserinfo/index?couponChannelId=${couponChannelId}&couponId=${couponId}` | |||||
}); | |||||
} else if (orderId) { | |||||
wx.redirectTo({ | |||||
url: `/pages/getuserinfo/index?orderId=${orderId}&from='${"discount"}` | |||||
}); | |||||
} | |||||
} | |||||
}); | |||||
}, | |||||
/** | /** | ||||
* 用户登录 | * 用户登录 | ||||
*/ | */ | ||||
@@ -84,71 +118,30 @@ Page({ | |||||
}) | }) | ||||
app.globalData.token = res.data.token; | app.globalData.token = res.data.token; | ||||
Http.setToken(res.data.token); | Http.setToken(res.data.token); | ||||
if(orderId){ | |||||
wx.redirectTo({ | |||||
url: '/pages/bargain/bargainDatail/bargainDatail?orderId='+orderId, | |||||
}) | |||||
if (couponChannelId&&couponId || orderId){ | |||||
that.checkuerstatus(couponChannelId, couponId, orderId); | |||||
}else{ | }else{ | ||||
wx.switchTab({ | |||||
url: '/pages/login/index', | |||||
}) | |||||
that.checkuerstatus(); | |||||
} | } | ||||
}) | }) | ||||
.catch(err => { | .catch(err => { | ||||
wx.showToast({ | |||||
title: err.message, | |||||
icon: "none" | |||||
wx.showModal({ | |||||
title: '提示', | |||||
showCancel: false, | |||||
content: '登录失败,请重新尝试', | |||||
success:function(res){ | |||||
if (res.cancel) { | |||||
//点击取消,默认隐藏弹框 | |||||
} else { | |||||
//点击确定 | |||||
wx.reLaunch({ | |||||
url: '/pages/index/index', | |||||
}) | |||||
} | |||||
} | |||||
}) | }) | ||||
}); | }); | ||||
} | } | ||||
}); | }); | ||||
}, | }, | ||||
/** | |||||
* 生命周期函数--监听页面初次渲染完成 | |||||
*/ | |||||
onReady: function() { | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面显示 | |||||
*/ | |||||
onShow: function() { | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面隐藏 | |||||
*/ | |||||
onHide: function() { | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面卸载 | |||||
*/ | |||||
onUnload: function() { | |||||
}, | |||||
/** | |||||
* 页面相关事件处理函数--监听用户下拉动作 | |||||
*/ | |||||
onPullDownRefresh: function() { | |||||
}, | |||||
/** | |||||
* 页面上拉触底事件的处理函数 | |||||
*/ | |||||
onReachBottom: function() { | |||||
}, | |||||
/** | |||||
* 用户点击右上角分享 | |||||
*/ | |||||
onShareAppMessage: function() { | |||||
} | |||||
}) | }) |
@@ -244,7 +244,6 @@ Page({ | |||||
if (app.businessListCallback) { | if (app.businessListCallback) { | ||||
app.businessListCallback(app.globalData.token); | app.businessListCallback(app.globalData.token); | ||||
} | } | ||||
that.checkuerstatus(couponChannelId, couponId, orderId); | |||||
Http.get({ | Http.get({ | ||||
url: config.api.getWeapNote, | url: config.api.getWeapNote, | ||||
data: { | data: { | ||||
@@ -266,41 +265,7 @@ Page({ | |||||
}); | }); | ||||
}); | }); | ||||
}, | }, | ||||
checkuerstatus(couponChannelId, couponId, orderId) { | |||||
Http.post({ | |||||
url: config.api.checkUserStatus, | |||||
data: {} | |||||
}) | |||||
.then(res => { | |||||
if (couponChannelId && couponId) { | |||||
wx.navigateTo({ | |||||
url: `/pages/coupon/detail/index?couponChannelId=${couponChannelId}&couponId=${couponId}`, | |||||
}) | |||||
} else if (orderId) { | |||||
wx.navigateTo({ | |||||
url: `/pages/bargain/bargainDatail/bargainDatail?orderId=${orderId}&from='${"discount"}`, | |||||
}) | |||||
} | |||||
}) | |||||
.catch(err => { | |||||
if (err.code == 11004) { | |||||
// 用户昵称未授权 | |||||
if (couponChannelId && couponId) { | |||||
wx.redirectTo({ | |||||
url: `/pages/getuserinfo/index?couponChannelId=${couponChannelId}&couponId=${couponId}` | |||||
}); | |||||
} else if (orderId) { | |||||
wx.redirectTo({ | |||||
url: `/pages/getuserinfo/index?orderId=${orderId}&from='${"discount"}` | |||||
}); | |||||
} else { | |||||
wx.redirectTo({ | |||||
url: '/pages/getuserinfo/index' | |||||
}); | |||||
} | |||||
} | |||||
}); | |||||
}, | |||||
getStaticGame(token) { | getStaticGame(token) { | ||||
let _this = this; | let _this = this; | ||||
Http.get({ | Http.get({ | ||||
@@ -4,7 +4,7 @@ | |||||
<image src="{{couponUrl}}" mode="widthFix" /> | <image src="{{couponUrl}}" mode="widthFix" /> | ||||
<text class="txt001">请您敬请期待</text> | <text class="txt001">请您敬请期待</text> | ||||
<text class='txt002'>我们正在筹备一大波优惠活动</text> | <text class='txt002'>我们正在筹备一大波优惠活动</text> | ||||
<navigator class='nav' url="/pages/index/index" open-type="switchTab" hover-class="other-navigator-hover"> | |||||
<navigator class='nav' url="/pages/login/index" open-type="switchTab" hover-class="other-navigator-hover"> | |||||
<button hover-class='active'>前往首页看看</button> | <button hover-class='active'>前往首页看看</button> | ||||
</navigator> | </navigator> | ||||
</view> | </view> | ||||
@@ -8,7 +8,7 @@ | |||||
<image src="{{couponUrl}}" mode="widthFix" /> | <image src="{{couponUrl}}" mode="widthFix" /> | ||||
<text class="txt001">请您敬请期待</text> | <text class="txt001">请您敬请期待</text> | ||||
<text class='txt002'>我们正在筹备一大波优惠活动</text> | <text class='txt002'>我们正在筹备一大波优惠活动</text> | ||||
<navigator class='nav' url="/pages/index/index" open-type="switchTab" hover-class="other-navigator-hover"> | |||||
<navigator class='nav' url="/pages/login/index" open-type="switchTab" hover-class="other-navigator-hover"> | |||||
<button hover-class='active'>前往首页看看</button> | <button hover-class='active'>前往首页看看</button> | ||||
</navigator> | </navigator> | ||||
</view> | </view> | ||||
@@ -76,7 +76,7 @@ | |||||
<view class="margin"></view> | <view class="margin"></view> | ||||
<!-- <button bindtap="navigateTo" class="user-out-btn">退出登陆</button> --> | <!-- <button bindtap="navigateTo" class="user-out-btn">退出登陆</button> --> | ||||
<view bindlongtap='showVersion' class='version'> | <view bindlongtap='showVersion' class='version'> | ||||
<view wx:if="{{flag=='show'}}">版本号:3.3.4</view> | |||||
<view wx:if="{{flag=='show'}}">版本号:3.4.1</view> | |||||
<view wx:if="{{flag=='hidden'}}"></view> | <view wx:if="{{flag=='hidden'}}"></view> | ||||
</view> | </view> | ||||
</view> | </view> | ||||