浏览代码

[券详情和砍价的倒计时时间的修改]

tags/富茂链客4.1.0
meo 6 年前
父节点
当前提交
d7d93cf826
共有 18 个文件被更改,包括 217 次插入158 次删除
  1. +1
    -1
      ext.json
  2. +1
    -0
      pages/bargain/bargainDatail/bargainDatail.js
  3. +1
    -1
      pages/bargain/bargainDatail/bargainDatail.wxml
  4. +149
    -95
      pages/coupon/detail/index.js
  5. +2
    -1
      pages/coupon/detail/index.json
  6. +2
    -7
      pages/coupon/detail/index.wxml
  7. +1
    -1
      pages/coupon/detail/index.wxss
  8. +2
    -2
      pages/couponorder/detail/index.wxml
  9. +1
    -1
      pages/index/searchbar/index.wxml
  10. +0
    -1
      pages/joinFrDpell/index.wxml
  11. +1
    -1
      pages/main/index.wxml
  12. +5
    -13
      pages/main/index.wxss
  13. +35
    -13
      pages/rushToBuy/index.js
  14. +13
    -12
      pages/rushToBuy/index.wxml
  15. +0
    -1
      pages/spellGroup/mySpellGroup/index.wxml
  16. +1
    -1
      project.config.json
  17. +0
    -5
      utils/HttpBasics.js
  18. +2
    -2
      utils/util.js

+ 1
- 1
ext.json 查看文件

@@ -4,7 +4,7 @@
"ext": {
"weappId": "wxea71200db93d756b",
"name": "富茂客官开发",
"appVersion": "C.3.4.7",
"appVersion": "C.3.5.6",
"attr": {
"ifHaveCarModular": "1",
"etcpversion": "release",


+ 1
- 0
pages/bargain/bargainDatail/bargainDatail.js 查看文件

@@ -12,6 +12,7 @@ Page({
bannerUrl: imgurl.banner.url,
data: null,
from: null,
day: null,
hour: null,
min: null,
sec: null,


+ 1
- 1
pages/bargain/bargainDatail/bargainDatail.wxml 查看文件

@@ -16,7 +16,7 @@
</view>
<progress percent="{{((data.price-data.salePrice-data.pressCurrentValue)/(data.price-data.salePrice))*100}}" color="#FF3535" class="progressbar"border-radius="10px" backgroundColor="#FECFCF" stroke-width="10" />
<view class="time" hover-class="none" hover-stop-propagation="false" wx:if="{{data.orderStatus != 7}}">
还剩 <text>{{hour}}</text>:<text>{{min}}</text>:<text>{{sec}}</text> 结束
还剩 <text>{{day}}</text>天:<text>{{hour}}</text>:<text>{{min}}</text>:<text>{{sec}}</text> 结束
</view>
</view>
<view class="fail" hover-class="none" hover-stop-propagation="false" wx:if="{{data.orderStatus==9}}">


+ 149
- 95
pages/coupon/detail/index.js 查看文件

@@ -65,16 +65,22 @@ Page({
hour: "00",
min: "00",
sec: "00",
countdown: ""
clock02: "00",
day02: "00",
hour02: "00",
min02: "00",
sec02: "00",
countdown: "",
showbutton1:false
},
phone: function (e) {
phone: function(e) {
let that = this;
wx.makePhoneCall({
phoneNumber: e.target.dataset.merchantlinkphone
});
},
// 点击查看更多
more: function () {
more: function() {
let that = this;
if (that.data.more == '点击查看更多') {
this.setData({
@@ -83,8 +89,7 @@ Page({
more: "点击收起",
showMore: true
})
}
else {
} else {
this.setData({
hidden: "hidden",
height: 4 * 140 + 'rpx',
@@ -94,13 +99,13 @@ Page({
}
},
//获取当前登录用户信息
getUserInfo: function () {
getUserInfo: function() {
let that = this;
// 获取用户信息
Http.get({
url: config.api.getScore,
data: {}
})
url: config.api.getScore,
data: {}
})
.then(res => {
console.log(res)
that.getQueryCardStatus()
@@ -121,9 +126,9 @@ Page({
updateDate: util.formatTime(Number(that.data.cardData.updateDate), "yyyy-MM-dd hh:mm:ss")
}
Http.get({
url: config.api.queryCardStatus,
data: param
})
url: config.api.queryCardStatus,
data: param
})
.then(res => {
console.log(res, 333333333333)
})
@@ -145,9 +150,9 @@ Page({
receivedDisabled: true
})
Http.post({
url: config.api.cardAccept,
data: param
})
url: config.api.cardAccept,
data: param
})
.then(res => {
wx.showToast({
title: '领取成功!',
@@ -176,7 +181,7 @@ Page({
showCardOffer: false
})
},
goback: function () {
goback: function() {
wx.switchTab({
url: '/pages/main/index',
})
@@ -184,7 +189,7 @@ Page({
/**
* 点击提交问题单选
*/
formSubmit: function (e) {
formSubmit: function(e) {
console.log(e);
let that = this;
/**
@@ -196,19 +201,18 @@ Page({
} else {
var answserIs = that.data.anwserId.join(",");
}
}
else if (e.currentTarget.dataset.flags == 'single') {
} else if (e.currentTarget.dataset.flags == 'single') {
var answserIs = e.detail.value;
}
console.log(answserIs)
console.log(e.currentTarget.dataset.questionid)
Http.post({
url: config.api.answerQuestion,
data: {
answer: answserIs,
questionId: e.currentTarget.dataset.questionid
}
})
url: config.api.answerQuestion,
data: {
answer: answserIs,
questionId: e.currentTarget.dataset.questionid
}
})
.then(res => {
that.closeQuestion();
})
@@ -224,28 +228,28 @@ Page({
/**
* 多选
*/
checkboxChange: function (e) {
checkboxChange: function(e) {
console.log(e)
this.setData({
anwserId: e.detail.value
})
},

closeQuestion: function () {
closeQuestion: function() {
let that = this;
that.setData({
display: "none",
zIndex: 11,
opacity: 0
})
setTimeout(function () {
setTimeout(function() {
that.orderFunc();
}, 500)
},
/**
* gotopay
*/
gotopay: function (e) {
gotopay: function(e) {
let that = this;
var discount = e.currentTarget.dataset.discount;
that.setData({
@@ -253,11 +257,11 @@ Page({
showbutton: true
})
Http.get({
url: config.api.getQuestion,
data: {
couponType: JSON.stringify(that.data.data.type)
}
})
url: config.api.getQuestion,
data: {
couponType: JSON.stringify(that.data.data.type)
}
})
.then(res => {
console.log(res);
if (res.data == undefined) {
@@ -296,7 +300,6 @@ Page({
var total_micro_second = EndTime - NowTime || [];
// 渲染倒计时时钟
let obj = that.dateformat(total_micro_second);
console.log(obj)
if (total_micro_second > 0) {
that.setData({
clock: obj,
@@ -313,14 +316,45 @@ Page({
min: "00",
sec: "00",
})
that.getDetail(that.data.couponChannelId);
}
total_micro_second -= 1000;
console.log(obj);
},
countdown: function (end_time) {
// countdown02(end_time) {
// let that = this;
// var EndTime = end_time;
// var NowTime = new Date().getTime();
// var total_micro_second = EndTime - NowTime || [];
// // 渲染倒计时时钟
// let obj = that.dateformat(total_micro_second);
// if (total_micro_second > 0) {
// that.setData({
// clock02: obj,
// day02: obj.a1,
// hour02: obj.b1,
// min02: obj.c1,
// sec02: obj.d1,
// })
// } else {
// that.setData({
// clock02: "00",
// day02: "0",
// hour02: "00",
// min02: "00",
// sec02: "00",
// showbutton1: false
// })
// }
// console.log(that.data.showbutton1)
// setTimeout(function() {
// total_micro_second -= 1000;
// that.countdown02(end_time);
// }, 1000)
// },
countdown: function(end_time) {
let that = this;
that.setIntervalTime(end_time);
that.data.setInterval = setInterval(function () {
that.data.setInterval = setInterval(function() {
that.setIntervalTime(end_time);
}, 1000)
},
@@ -346,13 +380,14 @@ Page({
}
},
/**
* 获取用户信息
*/
* 获取用户信息
*/
onLoad(options) {
let that = this;
wx.showLoading({
title: "加载中..."
});
that.getDetail(options.couponChannelId);
/**
* 转赠判断
*/
@@ -372,10 +407,13 @@ Page({
cardType: options.cardType
})
}
},
getDetail: function(couponChannelId) {
let that = this;
var parmer = {
url: config.api.couponDetail,
data: {
couponChannelId: options.couponChannelId
couponChannelId: couponChannelId
}
};
Http.get(parmer)
@@ -400,19 +438,41 @@ Page({
showbutton1: true
})
}
// that.countdown02(res.data.validStartDate)
if (res.data.endTime) {
that.countdown(res.data.endTime);
//如果是砍价券
// if (res.data.type == 8) {
// that.countdown02(res.data.validStartDate);
// }
if (res.data.endTime && res.data.beginTime) {
//activityStatus==0 活动未开始
//activityStatus==1 活动已开始
if (res.data.activityStatus == 0) {
that.countdown(res.data.beginTime);
} else {
that.countdown(res.data.endTime);
}
//当前时间与优惠券下架时间做计算
var endTime = util.formatTime(res.data.endTime, "yyyy-MM-dd hh:mm:ss");
if (util.timechuo(endTime).indexOf('-') == 0) {
that.setData({
endtime: "活动已结束",
});
if (res.data.activityStatus == 0) {
var beginTime = util.formatTime(res.data.beginTime, "yyyy-MM-dd hh:mm:ss");
if (util.timechuo(beginTime).indexOf('-') == 0) {
that.setData({
beginTime: "活动已结束",
});
} else {
that.setData({
beginTime: util.timechuo(beginTime)
});
}
} else {
that.setData({
endtime: util.timechuo(endTime)
});
var endTime = util.formatTime(res.data.endTime, "yyyy-MM-dd hh:mm:ss");
if (util.timechuo(endTime).indexOf('-') == 0) {
that.setData({
endtime: "活动已结束",
});
} else {
that.setData({
endtime: util.timechuo(endTime)
});
}
}
}
wx.hideLoading();
@@ -429,7 +489,6 @@ Page({
height: 4 * 140 + 'rpx'
})
}
console.log(that.data.height)
if (res.data.validType == 1) {
that.setData({
validStartDate: util.formatTime(res.data.validStartDate, "yyyy-MM-dd"),
@@ -454,7 +513,7 @@ Page({
/**
* 邀请好友继续砍价
*/
inviteFriend: function () {
inviteFriend: function() {
let that = this;
that.orderFunc("discount");
that.setData({
@@ -468,14 +527,14 @@ Page({
let that = this;
// 支付成功
Http.post({
url: config.api.payOrderUpdate,
data: {
payOrderId: payOrderId,
orderId: orderId,
status: status,
reason: reason
}
})
url: config.api.payOrderUpdate,
data: {
payOrderId: payOrderId,
orderId: orderId,
status: status,
reason: reason
}
})
.then(res => {
wx.hideLoading()
// 有价券
@@ -496,18 +555,18 @@ Page({
.catch(err => {
console.log(err);
if (!type) {
setTimeout(function () {
setTimeout(function() {
_this.payOrderUpdate(orderId, payOrderId, status, reason, type, _this);
}, 2000)
}
})
},
checkPhoneStatus: function () {
checkPhoneStatus: function() {
let that = this;
Http.post({
url: config.api.checkPhoneStatus,
data: {}
})
url: config.api.checkPhoneStatus,
data: {}
})
.then(res => {
console.log(666, '授权成功!')
that.receiveCard()
@@ -544,9 +603,9 @@ Page({
console.log(discount)
var that = this;
Http.post({
url: config.api.checkPhoneStatus,
data: {}
})
url: config.api.checkPhoneStatus,
data: {}
})
.then(res => {
if (discount == 'discount') {
var data = {
@@ -667,7 +726,7 @@ Page({
.then(res => {
console.log(res)
if (discount != 'discount') {
if (typeof (res) != "undefined") {
if (typeof(res) != "undefined") {
let orderId = "" + res.data.id;
that.setData({
orderId: orderId
@@ -678,11 +737,11 @@ Page({
* 支付订单创建
*/
Http.post({
url: config.api.payOrderCreate,
data: {
orderId: orderId
}
})
url: config.api.payOrderCreate,
data: {
orderId: orderId
}
})
.then(res => {
var payOrderId = "" + res.data.payOrderId;
wx.hideLoading();
@@ -696,12 +755,12 @@ Page({
wx.showLoading({
title: '订单正在处理中...',
})
setTimeout(function () {
setTimeout(function() {
wx.hideLoading()
}, 5000)
that.payOrderUpdate(that.data.orderId, payOrderId, 1, '', '', that);
if (res.errMsg == "requestPayment:ok") {
setTimeout(function () {
setTimeout(function() {
wx.hideLoading();
}, 2000);
/**
@@ -730,7 +789,7 @@ Page({
})
return;
},
complete: res => { }
complete: res => {}
});
/// End payment --------
})
@@ -770,20 +829,20 @@ Page({
},
onShow() {
this.setData({
showbutton: false
showbutton: false,
showbutton1:false
})
console.log(this.data.showMore)
},
onShareAppMessage: function (options) {
onShareAppMessage: function(options) {
var that = this;
var shareObj = {
title: that.data.data.title,
path: `/pages/index/index?couponChannelId=${that.data.couponChannelId}`,
success: function (res) {
if (res.errMsg == 'shareAppMessage:ok') { }
success: function(res) {
if (res.errMsg == 'shareAppMessage:ok') {}
},
fail: function (error) {
if (res.errMsg == 'shareAppMessage:fail cancel') { } else if (res.errMsg == 'shareAppMessage:fail') { }
fail: function(error) {
if (res.errMsg == 'shareAppMessage:fail cancel') {} else if (res.errMsg == 'shareAppMessage:fail') {}
}
};
// 来自页面内的按钮的转发
@@ -794,14 +853,9 @@ Page({
// 返回shareObj
return shareObj;
},
onUnload: function () {
let that = this;
console.log("onUnload")
clearInterval(that.data.setInterval);
},
onHide: function () {
let that = this;
console.log("onHide");
clearInterval(that.data.setInterval);
// 下拉刷新
onPullDownRefresh: function() {
this.getDetail(this.data.couponChannelId);
wx.stopPullDownRefresh()
}
});

+ 2
- 1
pages/coupon/detail/index.json 查看文件

@@ -1,4 +1,5 @@
{
"navigationBarTitleText": "券详情",
"backgroundColor":"#f4f4f4"
"backgroundColor":"#f4f4f4",
"enablePullDownRefresh": true
}

+ 2
- 7
pages/coupon/detail/index.wxml 查看文件

@@ -18,12 +18,7 @@
<text class="qiang" wx:if="{{data.activityStatus==0}}">距开始 :</text>
</view>
<view wx:if="{{clock=='已经截止'||data.remainInventory==0||data.status==1}}" class='times'>
<view style="display:inline-block;" wx:if="{{day!=0}}">
<text>{{day}}</text>天:
</view>
<text>{{hour}}</text>:
<text>{{min}}</text>:
<text>{{sec}}</text>
已经结束
</view>
<view wx:if="{{clock!='已经截止'&&data.remainInventory!=0}}" class='times'>
<view style="display:inline-block;" wx:if="{{day!=0}}">
@@ -52,7 +47,7 @@
</view>
<text class="restNum fr">剩余<text>{{data.remainInventory}}件</text></text>
</view>
<view wx:if="{{showbutton1&&data.type==8}}" style='font-size:24rpx;font-family:PingFang-SC-Medium;font-weight:500;color:rgba(0,0,0,1);'>砍价活动将于<view style='display:inline;margin:0 8rpx;color:#F74812;font-size:28rpx;font-family:PingFang-SC-Medium;font-weight:500;'>{{day02+'天'+hour02+':'+min02+':'+sec02}}</view>后准时开始</view>
<!-- <view wx:if="{{showbutton1&&data.type==8}}" style='font-size:24rpx;font-family:PingFang-SC-Medium;font-weight:500;color:rgba(0,0,0,1);'>砍价活动将于<view style='display:inline;margin:0 8rpx;color:#F74812;font-size:28rpx;font-family:PingFang-SC-Medium;font-weight:500;'>{{day02+'天'+hour02+':'+min02+':'+sec02}}</view>后准时开始</view> -->
<view class='rest' wx:if="{{data.validType==2}}">有效期:自领取之日起
<text class='time'>{{validDays}}</text>天内有效<text class="use">(请在有效期内使用)</text></view>
<view class='rest' wx:if="{{data.validType==1}}">有效期:


+ 1
- 1
pages/coupon/detail/index.wxss 查看文件

@@ -377,8 +377,8 @@ button::after{ border: none; }
.times text {
display: inline-block;
margin: 6rpx;
width: 46rpx;
height: 56rpx;
padding: 0 6rpx;
text-align: center;
font-size: 28rpx;
line-height: 60rpx;


+ 2
- 2
pages/couponorder/detail/index.wxml 查看文件

@@ -11,8 +11,8 @@
<text wx:if="{{data.type == 8&&data.price != data.couponPrice}}">¥{{data.salePrice/100}}</text>
<text wx:if="{{data.type != 8}}">¥{{data.salePrice/100}}</text>
<del>¥{{data.price/100}}</del>
<text class="refund">
<text wx:if="{{data.autoRefund == 1}}">过期不退款</text>
<text class="refund" wx:if="{{data.autoRefund == 1}}">
<text>过期不退款</text>
</text>
</view>
</view>


+ 1
- 1
pages/index/searchbar/index.wxml 查看文件

@@ -23,7 +23,7 @@
</view>
<view>
<text>{{item.merchantName}}</text>
<text>{{item.addr}}{{item.buildingName}}{{item.floorName}}</text>
<text>{{item.buildingName}}{{item.floorName}}</text>
</view>
<image bindtap='phone' data-merchantLinkPhone='{{item.merchantLinkPhone}}' class="tel" src="{{teljpgUrl}}" mode="widthFix" />
</view>


+ 0
- 1
pages/joinFrDpell/index.wxml 查看文件

@@ -16,7 +16,6 @@
<view class='rest'>
<text class='txt01'>限购条件:</text>
<text class='time'>每人{{data.useLimitQuantity}}张</text>
<text class='times' style='margin-left:10rpx;' wx:if="{{data.autoRefund == 0}}">(支持过期自动退款)</text>
<text class='times' style='margin-left:10rpx;' wx:if="{{data.autoRefund == 1}}">(不支持过期自动退款)</text>
</view>
<view class='status'>


+ 1
- 1
pages/main/index.wxml 查看文件

@@ -2,7 +2,7 @@
<!-- 门店列表展示 -->
<view class='search'>
<view class='searchbar' bindtap='searchbar'>
<text>搜索门店</text>
<text>门店></text>
<image src='./../../assets/images/search.png' mode='widthFix'></image>
</view>
</view>


+ 5
- 13
pages/main/index.wxss 查看文件

@@ -124,29 +124,21 @@ page {
}
.search{
background:rgba(2, 192, 255, 1);
height: 76rpx;
padding: 20rpx 0;
height: 50rpx;
}
.searchbar{
position: relative;
width: 685rpx;
height: 76rpx;
margin: 0 auto;
background: #fff;
border-radius:60rpx;
text-align: center;
}
.searchbar image{
position: absolute;
width: 40rpx;
left: 20rpx;
top:0;
bottom: 0;
margin: auto;
}
.searchbar text{
font-size: 32rpx;
line-height: 76rpx;
color: #555555;
font-size: 28rpx;
line-height: 50rpx;
color: #fff;
display: inline-block;
margin-left: 70rpx;
}

+ 35
- 13
pages/rushToBuy/index.js 查看文件

@@ -70,28 +70,50 @@ Page({
})
for (let i = 0; i < that.data.list.length; i++) {
var startTime = util.formatTime(that.data.list[i].endTime, "yyyy-MM-dd hh:mm:ss");
var beginTimes = util.formatTime(that.data.list[i].beginTime, "yyyy-MM-dd hh:mm:ss");
console.log(that.data.list[i].activityStatus)
var alsell = Math.floor((that.data.list[i].inventory - (that.data.list[i].remainInventory))/(that.data.list[i].inventory)*100);
util.timechuo(startTime);
/**
* 修改list的endtime
* 渲染到页面
*/
var endtime = 'list[' + i + '].endtime';
var beginTime = 'list[' + i + '].beginTime';
var flags = 'list[' + i + '].flags';
var alsells = 'list[' + i + '].alsells';
if (util.timechuo(startTime).indexOf('-')==0){
that.setData({
[flags]: "end",
[endtime]: util.timechuo(startTime),
[alsells]: alsell
});
}
else{
that.setData({
[endtime]: util.timechuo(startTime),
[alsells]: alsell
});
//活动未开始
console.log(beginTime)
if (that.data.list[i].activityStatus==0){
if (util.timechuo(beginTime).indexOf('-') == 0) {
that.setData({
[flags]: "end",
[beginTime]: util.timechuo(beginTimes),
[alsells]: alsell
});
}
else {
that.setData({
[beginTime]: util.timechuo(beginTimes),
[alsells]: alsell
});
}
} if (that.data.list[i].activityStatus != 0) {
//活动已经开始
if (util.timechuo(startTime).indexOf('-') == 0) {
that.setData({
[flags]: "end",
[endtime]: util.timechuo(startTime),
[alsells]: alsell
});
}
else {
that.setData({
[endtime]: util.timechuo(startTime),
[alsells]: alsell
});
}
}
}

})


+ 13
- 12
pages/rushToBuy/index.wxml 查看文件

@@ -1,7 +1,7 @@
<!-- 限时抢购 查看更多对应的页面 -->
<view wx:if="{{showPage}}">
<view wx:if="{{showPage}}">
<view wx:for="{{list}}" wx:if="{{item.targetA!='end'&&list.length>0}}" class='flashSaleItemWrap' wx:key="index">
<view class='flashSaleItem'>
<view class='flashSaleItem' data-couponId="{{item.couponId}}" data-couponChannelId="{{item.id}}" data-targetAd="{{item.targetAd}}" bindtap="gotodetail">
<view class='flashSaleItemTop'>
<view class='flashSaleItemTopL'>
<image mode='aspectFill' src='{{item.coverImg}}' class='food' lazy-load="true"></image>
@@ -12,17 +12,18 @@
<text class='small'>{{item.subTitle}}</text>
</view>
<view class='flashSaleItemTopRBottom'>
<text class='presentPrice'><text class='sale'>售价:</text>{{item.salePriceStr}}<text class='yuan'>元</text></text><text class='originalPrice'>{{item.priceStr}}元</text>
<view class='presentPrice'><text class='sale'>售价:</text>{{item.salePriceStr}}<text class='yuan'>元</text><text class='originalPrice'>{{item.priceStr}}元</text></view>
</view>
</view>
</view>
<image class='lines' src='{{linesUrl}}' mode='widthFix'></image>
<view class='flashSaleItemBottom'>
<view class='flashSaleItemBottomTop'>
<text class='remainingTime' wx:if="{{item.activityStatus!=0}}">距结束:</text>
<text class='remainingTime' wx:if="{{item.activityStatus==1}}">距结束:</text>
<text class='remainingTime' wx:if="{{item.activityStatus==0}}">距开始还有:</text>
<text wx:if="{{item.flags=='end'&&item.activityStatus==2}}" class='realRemainingTime'>活动已结束</text>
<text wx:if="{{item.flags!='end'}}" class='realRemainingTime'>{{item.endtime}}</text>
<text wx:if="{{item.flags!='end'&&item.activityStatus==1}}" class='realRemainingTime'>{{item.endtime}}</text> {{beginTime}}
<text wx:if="{{item.flags!='end'&&item.activityStatus==0}}" class='realRemainingTime'>{{item.beginTime}}</text>
</view>
<view class='flashSaleItemBottomBottm'>
<view class="view1">
@@ -31,19 +32,19 @@
<progress percent="{{(item.inventory-item.remainInventory)/item.inventory*100}}" wx:if="{{item.activityStatus!=0}}" stroke-width="6" activeColor="#ff4949" />
<progress percent="0" wx:if="{{item.activityStatus==0}}" stroke-width="6" activeColor="#ff4949" />
</view>
<view class='buy' data-couponId="{{item.couponId}}" data-couponChannelId="{{item.id}}" data-targetAd="{{item.targetAd}}" bindtap="gotodetail" hover-class='active' wx:if="{{item.salePriceStr!=0&&item.activityStatus!=0}}">马上购</view>
<view class='buy' data-couponId="{{item.couponId}}" data-couponChannelId="{{item.id}}" data-targetAd="{{item.targetAd}}" bindtap="gotodetail" hover-class='active' wx:if="{{item.salePriceStr==0&&item.remainInventory!=0}}">立即领</view>
<view class='buy' data-couponId="{{item.couponId}}" data-couponChannelId="{{item.id}}" data-targetAd="{{item.targetAd}}" bindtap="gotodetail" hover-class='active' style='background:#999;color:#fff;border:1px solid #999;' wx:if="{{item.salePriceStr==0&&item.remainInventory==0}}">已售罄</view>
<view class='buy' data-couponId="{{item.couponId}}" data-couponChannelId="{{item.id}}" data-targetAd="{{item.targetAd}}" bindtap="gotodetail" hover-class='active' wx:if="{{item.activityStatus==0}}">即将开始</view>
<view class='buy' wx:if="{{item.salePriceStr!=0&&item.activityStatus!=0}}">马上购</view>
<view class='buy' wx:if="{{item.salePriceStr==0&&item.remainInventory!=0}}">立即领</view>
<view class='buy' style='background:#999;color:#fff;border:1px solid #999;' wx:if="{{item.salePriceStr==0&&item.remainInventory==0}}">已售罄</view>
<view class='buy' wx:if="{{item.activityStatus==0}}">即将开始</view>
<view class='buy' wx:if="{{item.flags=='end'}}" style='background:#999;color:#fff;border:1px solid #999;'>已结束</view>
</view>
</view>
</view>
</view>
<view class='expect' wx:if="{{list.length==0}}">
<image src='./../../assets/images/gift.png' mode='widthFix'></image>
<text>请您敬请期待</text>
<text>我们正在筹备一大堆优惠活动</text>
<image src='./../../assets/images/gift.png' mode='widthFix'></image>
<text>请您敬请期待</text>
<text>我们正在筹备一大堆优惠活动</text>
</view>
<view class="loading" wx:if="{{loading}}">
<image src="{{loadingUrl}}" mode="widthFix"></image>{{content}}


+ 0
- 1
pages/spellGroup/mySpellGroup/index.wxml 查看文件

@@ -16,7 +16,6 @@
<view class='rest'>
<text class='txt01'>限购条件:</text>
<text class='time'>每人{{data.useLimitQuantity}}张</text>
<text class='times' style='margin-left:10rpx;' wx:if="{{data.autoRefund == 0}}">(支持过期自动退款)</text>
<text class='times' style='margin-left:10rpx;' wx:if="{{data.autoRefund == 1}}">(不支持过期自动退款)</text>
</view>
<view class='status' wx:if="{{spellData!=null}}">


+ 1
- 1
project.config.json 查看文件

@@ -9,7 +9,7 @@
"postcss": true,
"minified": true,
"newFeature": true,
"autoAudits": true
"autoAudits": false
},
"compileType": "miniprogram",
"libVersion": "2.2.0",


+ 0
- 5
utils/HttpBasics.js 查看文件

@@ -34,9 +34,6 @@ class HttpBasics {
get({ url, data, headers }) {
headers = { ...this.headers, ...headers };
url = `${this.address}${url}`;
wx.showLoading({
title: '加载中',
})
return new Promise((resolve, reject) => {
wx.request({
url: url,
@@ -44,12 +41,10 @@ class HttpBasics {
data: data,
method: "Get",
success: res => {
wx.hideLoading()
this.responseMap(res, resolve, reject);
},
fail: err => {
console.log(err)
wx.hideLoading()
if (err.errMsg == 'request:fail timeout') {
err.errMsg = '请求超时,请检查您的网络设置!'
} else if (err.errMsg == 'request:fail '){


+ 2
- 2
utils/util.js 查看文件

@@ -95,9 +95,9 @@ function timechuo(startTime) {
if (day && !year && !month){
return (day + '天' + hour + "小时" + minute + "分钟")
} else if (month && !year){
return (month +'个月'+day + '天' + hour + "小时" + minute + "分钟")
return ((month*30+day) +'天' + hour + "小时" + minute + "分钟")
} else if (year) {
return (year + '年' + month+'个月'+ day + '天' + hour + "小时" + minute + "分钟")
return ((year*365 + month*30+ day) + '天' + hour + "小时" + minute + "分钟")
}else{
return (hour + "小时" + minute + "分钟")
}


正在加载...
取消
保存