Просмотр исходного кода

[砍价,砍价详情][修改]:[砍价]

tags/同保楼3.3.1
meo 6 лет назад
Родитель
Сommit
46b6aaad72
6 измененных файлов: 38 добавлений и 39 удалений
  1. +8
    -15
      pages/bargain/bargain.js
  2. +15
    -13
      pages/bargain/bargain.wxml
  3. +11
    -6
      pages/bargain/bargain.wxss
  4. +0
    -2
      pages/bargain/bargainDatail/bargainDatail.js
  5. +3
    -2
      pages/bargain/bargainDatail/bargainDatail.wxss
  6. +1
    -1
      pages/user/index.wxml

+ 8
- 15
pages/bargain/bargain.js Просмотреть файл

@@ -24,25 +24,18 @@ Page({
onShow: function () {
let that = this;
that.getBannerlist();
console.log("onShow")
console.log()
var todayDate=new Date().getTime();
that.setData({
todayDate:todayDate
})
let myDiscount = wx.getStorageSync('myDiscount');
console.log(myDiscount)
if (myDiscount == 'myDiscount') {
wx.setStorageSync('myDiscount', "dismyDiscount")
that.getList(1, "mybargain");
that.setData({
flag: "mybargain"
})
} else {
wx.setStorageSync('myDiscount', "dismyDiscount")
that.getList(1, "bargaingoods");
that.setData({
flag: "bargaingoods"
})
}
that.getList(1, "bargaingoods");
that.setData({
flag: "bargaingoods",
bargaingoods:true,
mybargain:false
})
},
/**
* banner


+ 15
- 13
pages/bargain/bargain.wxml Просмотреть файл

@@ -26,27 +26,29 @@
</view>
<view class="list mybargain" wx:if="{{mybargain}}" hover-class="none" hover-stop-propagation="false">
<view class="listitem clearfix" wx:for="{{lists}}" wx:key="index" wx:if="{{item.orderStatus == 6||item.orderStatus == 7|| item.orderStatus == 8 || item.orderStatus == 9}}" hover-class="none" hover-stop-propagation="false">
<image class="fl" src="{{item.coverImg}}" mode="widthFix" lazy-load="true" binderror=""
bindload=""></image>
<image class="fl" src="{{item.coverImg}}" mode="widthFix" lazy-load="true"></image>
<view class="fl ri" hover-class="none" hover-stop-propagation="false">
<text class="txt01">{{item.title}}</text>
<text class="txt02">{{item.subTitle}}</text>
<text class="txt04 mr" wx:if="{{item.orderStatus != 7&&item.orderStatus != 8}}">距砍价到{{item.salePrice/100}}元还差:{{item.pressCurrentValue/100}}元</text>
<text class="txt04 mr" wx:if="{{item.orderStatus == 6&&todayDate<=item.pressEndDate}}">距砍价到{{item.salePrice/100}}元还差:{{item.pressCurrentValue/100}}元</text>
<text class="txt04 mr" wx:if="{{item.orderStatus == 7}}">已砍价到底价:{{item.salePrice/100}}元</text>
</view>
<view class="botton1" wx:if="{{item.orderStatus == 6&&todayDate<=item.pressEndDate}}" hover-class="none" hover-stop-propagation="false" data-id="{{item.id}}" bindtap="inviteFriend">邀请好友砍价</view>
<view class="botton3" wx:if="{{item.orderStatus == 6&&todayDate>item.pressEndDate}}" hover-class="none" hover-stop-propagation="false" data-couponChannelId="{{item.couponChannelId}}" data-couponId="{{item.productId}}" data-id="{{item.id}}" bindtap="barginAgain">重新砍价</view>
<view wx:if="{{item.orderStatus == 7}}">
<view class="botton2" hover-class="none" hover-stop-propagation="false" data-id="{{item.id}}" bindtap="inviteFriend">立即支付</view>
<image class="icon" src="./../../assets/images/bargainsuccess.png" lazy-load="true" binderror="" bindload="" />
<view class='again' wx:if="{{item.orderStatus == 6&&todayDate<=item.pressEndDate}}" hover-class="none" hover-stop-propagation="false" data-id="{{item.id}}" bindtap="inviteFriend">
<view class="botton1">邀请好友砍价</view>
</view>
<view wx:if="{{item.orderStatus == 8||item.orderStatus == 6&&todayDate>item.pressEndDate}}">
<view class="botton3" hover-class="none" hover-stop-propagation="false" data-couponChannelId="{{item.couponChannelId}}" data-couponId="{{item.productId}}" data-id="{{item.id}}" bindtap="barginAgain">重新砍价</view>
<image class="icon" src="./../../assets/images/bargainfail.png" lazy-load="true" binderror="" bindload="" />
<view class='again' wx:if="{{item.orderStatus == 7}}" data-id="{{item.id}}" bindtap="inviteFriend">
<view class="botton2" hover-class="none" hover-stop-propagation="false">立即支付</view>
<image class="icon" src="./../../assets/images/bargainsuccess.png" lazy-load="true"/>
</view>

<view class='again' wx:if="{{item.orderStatus == 8||item.orderStatus == 6&&todayDate>item.pressEndDate}}" data-couponChannelId="{{item.couponChannelId}}" data-couponId="{{item.productId}}" data-id="{{item.id}}" bindtap="barginAgain">
<view class="botton3" hover-class="none" hover-stop-propagation="false">重新砍价</view>
<image class="icon" src="./../../assets/images/bargainfail.png" lazy-load="true"/>
</view>

<view wx:if="{{item.orderStatus == 9}}">
<!-- <view class="botton3" hover-class="none" hover-stop-propagation="false">砍价取消</view> -->
<image class="icon" src="./../../assets/images/bargaincancel.png" lazy-load="true" binderror="" bindload="" />
<image class="icon" src="./../../assets/images/bargaincancel.png" lazy-load="true"/>
</view>
</view>
<view class='dingdan' wx:if="{{list.length==0}}">


+ 11
- 6
pages/bargain/bargain.wxss Просмотреть файл

@@ -17,16 +17,17 @@ page{
padding: 0 32rpx;
}
.listitem .fl {
width: 200rpx;
width: 180rpx;
height: 180rpx!important;
border-radius: 10rpx;
overflow: hidden;
margin-top:10rpx;
}
.listitem .icon{
width: 140rpx;
height: 116rpx;
position: absolute;
top: 12rpx;
top: 0;
right: 0;
}
.listitem .ri {
@@ -64,7 +65,6 @@ page{
}
.ri .txt04 {
width: 100%;
color:#FF3232;
font-size:24rpx;
color:rgba(255,50,50,1);
line-height:44rpx;
@@ -77,7 +77,7 @@ page{
}
.listitem{
position: relative;
padding: 31rpx 0;
padding: 21rpx 0;
border-bottom: 1rpx solid #F9F9F9;
}
.botton{
@@ -97,7 +97,7 @@ page{
position: absolute;
right: 0;
text-align: center;
bottom: 31rpx;
bottom: 6rpx;
width:186rpx;
height:48rpx;
line-height:48rpx;
@@ -123,7 +123,7 @@ page{
position: absolute;
right: 0;
text-align: center;
bottom: 31rpx;
bottom: 8rpx;
line-height:48rpx;
border-radius:24rpx;
font-size:26rpx;
@@ -404,4 +404,9 @@ page{
width: 300rpx;
height: 300rpx;
margin: 0 auto 16rpx;
}
.again{
position: relative;
width: 686rpx;
height: 200rpx;
}

+ 0
- 2
pages/bargain/bargainDatail/bargainDatail.js Просмотреть файл

@@ -36,7 +36,6 @@ Page({
})
}
that.pressOrderDetail(options.orderId);
// that.getPressOrderStatus(options.orderId)
}
},
/**
@@ -141,7 +140,6 @@ Page({
},
onShow: function() {
let that = this;
wx.setStorageSync('myDiscount', "myDiscount");
var todayDate = new Date().getTime();
that.setData({
todayDate: todayDate,


+ 3
- 2
pages/bargain/bargainDatail/bargainDatail.wxss Просмотреть файл

@@ -225,7 +225,8 @@
text-align: center;
line-height: 200rpx;
margin-top: 30rpx;
background: #EC3B2D;
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);
color: #fff!important;
}
.helpDiscount::after{ border: none; }
@@ -295,7 +296,7 @@
color: #fff;
}
.status button:nth-of-type(2){
background:rgba(190,190,190,1);
background:#fff;
border:1px solid rgba(190,190,190,1);
border-radius:48rpx;
color: #333;

+ 1
- 1
pages/user/index.wxml Просмотреть файл

@@ -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.2.3</view>
<view wx:if="{{flag=='show'}}">版本号:3.3.1</view>
<view wx:if="{{flag=='hidden'}}"></view>
</view>
</view>


Загрузка…
Отмена
Сохранить