Browse Source

[优惠卡,停车,首页][修改]:[优惠卡返回首页,券增加返回首页的按钮,停车券返回,]

tags/同保楼3.3.1
meo 6 years ago
parent
commit
042c1b74c6
15 changed files with 110 additions and 125 deletions
  1. +2
    -2
      pages/bargain/bargainDatail/bargainDatail.js
  2. +7
    -7
      pages/bargain/bargainDatail/bargainDatail.wxml
  3. +10
    -10
      pages/bargain/bargainDatail/bargainDatail.wxss
  4. +1
    -1
      pages/cardorder/index/index.wxml
  5. +5
    -0
      pages/coupon/detail/index.js
  6. +1
    -0
      pages/coupon/detail/index.wxml
  7. +22
    -1
      pages/coupon/detail/index.wxss
  8. +1
    -1
      pages/couponorder/index/index.wxml
  9. +1
    -1
      pages/discountCardList/discountCardList.wxml
  10. +3
    -3
      pages/getuserinfo/index.js
  11. +53
    -60
      pages/index/index.js
  12. +1
    -36
      pages/login/index.js
  13. +1
    -1
      pages/passCar/choicecoupon/choicecoupon.wxml
  14. +1
    -1
      pages/passCar/couponList/couponList.wxml
  15. +1
    -1
      pages/user/index.wxml

+ 2
- 2
pages/bargain/bargainDatail/bargainDatail.js View File

@@ -52,8 +52,8 @@ Page({
})
},
goback:function(){
wx.reLaunch({
url: '/pages/index/index',
wx.switchTab({
url: '/pages/login/index',
})
},
/**


+ 7
- 7
pages/bargain/bargainDatail/bargainDatail.wxml View File

@@ -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="listitem clearfix" hover-class="none" hover-stop-propagation="false">
<image class="fl" src="{{data.coverImg}}" lazy-load="true" binderror="" bindload="" mode='aspectFill'></image>
@@ -57,13 +58,12 @@
</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 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>


+ 10
- 10
pages/bargain/bargainDatail/bargainDatail.wxss View File

@@ -217,29 +217,29 @@
z-index: 100;
background: #fff;
}
.btns > view,.btns > button{
width: 330rpx;
.btns button{
width: 320rpx!important;
height: 95rpx;
border-radius:48rpx;
text-align: center;
}
.btns .fl{
width: 250rpx;
color: #fff;
background:rgba(255,169,2,1);
box-shadow:0px 8px 8px 1px rgba(255,169,2,0.32);
margin-left: 22rpx;
}
.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);
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;
border-radius:50%;
}
.goback image{
position: absolute;
@@ -262,7 +262,7 @@
font-size: 30rpx;
color: #fff;
line-height: 95rpx;
width: 271rpx;
width: 256rpx;
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);
}


+ 1
- 1
pages/cardorder/index/index.wxml View File

@@ -8,7 +8,7 @@
<image src="{{couponUrl}}" mode="widthFix" />
<text class="txt001">请您敬请期待</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>
</navigator>
</view>


+ 5
- 0
pages/coupon/detail/index.js View File

@@ -54,6 +54,11 @@ Page({
phoneNumber: e.target.dataset.merchantlinkphone
});
},
goback: function () {
wx.switchTab({
url: '/pages/login/index',
})
},
/**
* 点击提交问题单选
*/


+ 1
- 0
pages/coupon/detail/index.wxml View File

@@ -84,6 +84,7 @@
</view>

<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!='活动已结束'}}">
<text class='txt'>{{data.salePriceStr}}元</text>马上购买</button>
<button bindtap='gotopay' disabled='{{showbutton}}' class='buy' wx:if="{{data.salePriceStr==0&&data.remainInventory!=0&&endtime!='活动已结束'}}">免费领取</button>


+ 22
- 1
pages/coupon/detail/index.wxss View File

@@ -279,13 +279,34 @@ button::after{ border: none; }
position: relative;
background: #00c0ff;
height: 94rpx;
width: 670rpx;
width: 560rpx;
margin: 0 auto 30rpx;
color: #fff;
font-size: 36rpx;
line-height: 94rpx;
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 {
right: 0;


+ 1
- 1
pages/couponorder/index/index.wxml View File

@@ -8,7 +8,7 @@
<image src="{{couponUrl}}" mode="widthFix" />
<text class="txt001">请您敬请期待</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>
</navigator>
</view>


+ 1
- 1
pages/discountCardList/discountCardList.wxml View File

@@ -9,7 +9,7 @@
<image src="{{couponUrl}}" mode="aspectFill" lazy-load="true" />
<text class="txt001">请您敬请期待</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>
</navigator>
</view>


+ 3
- 3
pages/getuserinfo/index.js View File

@@ -64,16 +64,16 @@ Page({
} else {
//返回主页
if (that.data.couponChannelId && that.data.couponId) {
wx.redirectTo({
wx.navigateTo({
url: `/pages/coupon/detail/index?couponChannelId=${that.data.couponChannelId}&couponId=${that.data.couponId}`
});
} else if (that.data.orderId) {
wx.redirectTo({
wx.navigateTo({
url: `/pages/bargain/bargainDatail/bargainDatail?orderId=${that.data.orderId}&from=${"friend"}`
});
} else {
wx.switchTab({
url: "/pages/index/index"
url: "/pages/login/index"
});
}
}


+ 53
- 60
pages/index/index.js View File

@@ -19,8 +19,6 @@ Page({
icon: "loading",
duration: 2000
})
console.log(options);
console.log("----------------------------------options---------------------------------------")
wx.setStorageSync('options', JSON.stringify(options))
wx.setStorageSync('imgurl', imgurl)
if (decodeURIComponent(options.scene) == "undefined") {
@@ -39,6 +37,42 @@ Page({
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;
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{
wx.switchTab({
url: '/pages/login/index',
})
that.checkuerstatus();
}
})
.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() {

}
})

+ 1
- 36
pages/login/index.js View File

@@ -244,7 +244,6 @@ Page({
if (app.businessListCallback) {
app.businessListCallback(app.globalData.token);
}
that.checkuerstatus(couponChannelId, couponId, orderId);
Http.get({
url: config.api.getWeapNote,
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) {
let _this = this;
Http.get({


+ 1
- 1
pages/passCar/choicecoupon/choicecoupon.wxml View File

@@ -4,7 +4,7 @@
<image src="{{couponUrl}}" mode="widthFix" />
<text class="txt001">请您敬请期待</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>
</navigator>
</view>


+ 1
- 1
pages/passCar/couponList/couponList.wxml View File

@@ -8,7 +8,7 @@
<image src="{{couponUrl}}" mode="widthFix" />
<text class="txt001">请您敬请期待</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>
</navigator>
</view>


+ 1
- 1
pages/user/index.wxml View File

@@ -76,7 +76,7 @@
<view class="margin"></view>
<!-- <button bindtap="navigateTo" class="user-out-btn">退出登陆</button> -->
<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>
</view>


Loading…
Cancel
Save