@@ -7,7 +7,7 @@ | |||||
"navigationBarTitleText": "Mini Program", | "navigationBarTitleText": "Mini Program", | ||||
"navigationBarTextStyle": "black", | "navigationBarTextStyle": "black", | ||||
"navigationStyle": "custom" | "navigationStyle": "custom" | ||||
}, | |||||
}, | |||||
"ext": { | "ext": { | ||||
"weappId": "ttef6599d8705b49b101", | "weappId": "ttef6599d8705b49b101", | ||||
"name": "富茂券模板", | "name": "富茂券模板", | ||||
@@ -12,5 +12,5 @@ | |||||
}, | }, | ||||
"enablePullDownRefresh": true, | "enablePullDownRefresh": true, | ||||
"navigationBarBackgroundColor": "#F4F5F9" | "navigationBarBackgroundColor": "#F4F5F9" | ||||
} | |||||
} | |||||
@@ -221,7 +221,6 @@ | |||||
<view class="selling">{{data.type==50?priceAndStockObj.creditPrice+'积分':priceAndStockObj.salePrice/100}} </view> | <view class="selling">{{data.type==50?priceAndStockObj.creditPrice+'积分':priceAndStockObj.salePrice/100}} </view> | ||||
<view class="qsOriginal">¥{{priceAndStockObj.price/100}}</view> | <view class="qsOriginal">¥{{priceAndStockObj.price/100}}</view> | ||||
<button bindtap="gotopay" disabled='{{showbutton}}' hover-class='active' class='buyX' | <button bindtap="gotopay" disabled='{{showbutton}}' hover-class='active' class='buyX' | ||||
tt:if="{{data.type!=11&&data.type!=8&&data.type!=50&&data.type!=51&&priceAndStockObj.salePrice/100!=0&&data.remainInventory!=0&&endtime!='活动已结束'&&data.activityStatus!=0}}"> | tt:if="{{data.type!=11&&data.type!=8&&data.type!=50&&data.type!=51&&priceAndStockObj.salePrice/100!=0&&data.remainInventory!=0&&endtime!='活动已结束'&&data.activityStatus!=0}}"> | ||||
马上购买</button> | 马上购买</button> | ||||
@@ -246,6 +245,11 @@ | |||||
<button class='buyX' disabled='true' tt:if="{{total_micro_second<=0&&data.activityStatus!=0}}">活动已结束</button> | <button class='buyX' disabled='true' tt:if="{{total_micro_second<=0&&data.activityStatus!=0}}">活动已结束</button> | ||||
<button id='buyX' disabled='true' tt:if="{{data.activityStatus==0}}">活动未开始</button> | <button id='buyX' disabled='true' tt:if="{{data.activityStatus==0}}">活动未开始</button> | ||||
<!-- <view class="sell">已售出<span class="sellP">{{data.inventory-data.remainInventory}}</span>件</view> --> | <!-- <view class="sell">已售出<span class="sellP">{{data.inventory-data.remainInventory}}</span>件</view> --> | ||||
<button class="serviceBox" open-type="contact"> | |||||
<view class="fuwuLogoBox f" > | |||||
<image class="itemLogo" src="../../../assets/images/service1.png" /> | |||||
</view> | |||||
</button> | |||||
</view> | </view> | ||||
</form> | </form> | ||||
</view> | </view> | ||||
@@ -343,13 +343,7 @@ button::after { | |||||
font-weight: 400; | font-weight: 400; | ||||
float: left; | float: left; | ||||
} | } | ||||
.serviceBox{ | |||||
float: left; | |||||
margin-top: 58rpx; | |||||
margin-left: 14rpx; | |||||
height: 40rpx; | |||||
width: 40rpx; | |||||
} | |||||
.serviceImg{ | .serviceImg{ | ||||
height: 100%; | height: 100%; | ||||
width: 100%; | width: 100%; | ||||
@@ -1190,4 +1184,26 @@ button{ | |||||
color: #fff; | color: #fff; | ||||
background-color: rgba(221,171,90, 0.5); | background-color: rgba(221,171,90, 0.5); | ||||
padding:0; | padding:0; | ||||
} | |||||
.serviceBox{ | |||||
float: right; | |||||
margin-top: 58rpx; | |||||
margin-right: 14rpx; | |||||
height: 40rpx; | |||||
width: 40rpx; | |||||
background-color: #fff; | |||||
} | |||||
.fuwuLogoBox{ | |||||
width: 40rpx; | |||||
height: 40rpx; | |||||
line-height: 0; | |||||
} | |||||
.itemLogo{ | |||||
width: 100%; | |||||
height: 100%; | |||||
} | |||||
.fuwuName{ | |||||
text-align: center; | |||||
color: #000; | |||||
font-size: 24rpx; | |||||
} | } |
@@ -49,9 +49,14 @@ Page({ | |||||
console.log(options); | console.log(options); | ||||
that.setData({ | that.setData({ | ||||
code: options.quancode, | code: options.quancode, | ||||
couponorderstatus: options.couponorderstatus | |||||
couponorderstatus: options.couponorderstatus, | |||||
validStatus:options.validStatus | |||||
}); | }); | ||||
that.setRq()//动态二维码 //这个方法必须在拿到 options.quancode 后调用 | |||||
if(options.couponorderstatus==0&&options.validStatus!=0){ | |||||
that.setRq()//动态二维码 //这个方法必须在拿到 options.quancode 后调用 | |||||
} | |||||
//初始数据不能延时收到写一边 | //初始数据不能延时收到写一边 | ||||
Http.get({ | Http.get({ | ||||
url: config.api.couponOrderDetail, | url: config.api.couponOrderDetail, | ||||
@@ -165,24 +170,27 @@ Page({ | |||||
TYPE: "couponorder", | TYPE: "couponorder", | ||||
ID: _this.data.dynamicRq | ID: _this.data.dynamicRq | ||||
}) | }) | ||||
if(res.data.expiredSeconds==0){ | |||||
let inre = setInterval(()=>{ | |||||
if(_this.data.expiredSeconds>1){ | |||||
_this.setData({ | |||||
expiredSeconds: _this.data.expiredSeconds-1 | |||||
}) | |||||
console.log("有效",_this.data.expiredSeconds) | |||||
}else{ | |||||
console.log("无效", _this.data.expiredSeconds) | |||||
clearInterval(_this.data.templTiem) | |||||
_this.setData({ | |||||
showhieRq:true | |||||
}) | |||||
} | |||||
},1000) | |||||
_this.setData({ | |||||
templTiem:inre | |||||
}) | |||||
}else{ | |||||
let inre = setInterval(()=>{ | |||||
if(_this.data.expiredSeconds>1){ | |||||
_this.setData({ | |||||
expiredSeconds: _this.data.expiredSeconds-1 | |||||
}) | |||||
console.log("有效",_this.data.expiredSeconds) | |||||
}else{ | |||||
console.log("无效", _this.data.expiredSeconds) | |||||
clearInterval(_this.data.templTiem) | |||||
_this.setData({ | |||||
showhieRq:true | |||||
}) | |||||
} | |||||
},1000) | |||||
_this.setData({ | |||||
templTiem:inre | |||||
}) | |||||
} | |||||
// util.qrcode("qrcode", url, 350, 350); | // util.qrcode("qrcode", url, 350, 350); | ||||
_this.createQrCode(url, "qrcode", 210, 210); | _this.createQrCode(url, "qrcode", 210, 210); | ||||
}).catch(err => { | }).catch(err => { | ||||
@@ -69,7 +69,7 @@ Page({ | |||||
let tempArr= that.data.list | let tempArr= that.data.list | ||||
if(tempArr.length>0){ | if(tempArr.length>0){ | ||||
tempArr.map(item=>{ | tempArr.map(item=>{ | ||||
item.createDate = util.formatTime(item.createDate, "yyyy-MM-dd hh:mm:ss"); | |||||
item.expiredTime = util.formatTime(item.expiredTime, "yyyy-MM-dd "); | |||||
}) | }) | ||||
} | } | ||||
@@ -88,7 +88,7 @@ Page({ | |||||
let tempLsit = res.data.list?res.data.list:[] | let tempLsit = res.data.list?res.data.list:[] | ||||
if(tempLsit.length>0){ | if(tempLsit.length>0){ | ||||
tempLsit.map(item=>{ | tempLsit.map(item=>{ | ||||
item.createDate = util.formatTime(item.createDate, "yyyy-MM-dd hh:mm:ss"); | |||||
item.expiredTime = util.formatTime(item.expiredTime, "yyyy-MM-dd"); | |||||
}) | }) | ||||
} | } | ||||
that.setData({ | that.setData({ | ||||
@@ -126,8 +126,6 @@ Page({ | |||||
this.getList() | this.getList() | ||||
}, | }, | ||||
onShow:function(){ | onShow:function(){ | ||||
debugger | |||||
this.getList() | this.getList() | ||||
} | } | ||||
@@ -19,15 +19,15 @@ | |||||
</view> | </view> | ||||
<view class="ticketData"> | <view class="ticketData"> | ||||
<view class="ticketTitle">{{item.title}}</view> | <view class="ticketTitle">{{item.title}}</view> | ||||
<view class="date">{{item.createDate}}</view> | |||||
<view class="date">{{item.expiredTime}}</view> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
<navigator class="useBtn" tt:if="{{item.couponOrderStatus==0}}" | <navigator class="useBtn" tt:if="{{item.couponOrderStatus==0}}" | ||||
url="/pages/couponorder/detail/index?quancode={{item.id}}&couponorderstatus={{boatFlag}}" | |||||
url="/pages/couponorder/detail/index?quancode={{item.id}}&couponorderstatus={{boatFlag}}&validStatus={{item.validStatus}}" | |||||
hover-class="navigator-hover" open-type="navigate">去使用</navigator> | hover-class="navigator-hover" open-type="navigate">去使用</navigator> | ||||
<navigator class="nouseBtn" | <navigator class="nouseBtn" | ||||
tt:if="{{item.couponOrderStatus==1||item.couponOrderStatus==2||item.couponOrderStatus==3}}" | tt:if="{{item.couponOrderStatus==1||item.couponOrderStatus==2||item.couponOrderStatus==3}}" | ||||
url="/pages/couponorder/detail/index?quancode={{item.id}}&couponorderstatus={{boatFlag}}" | |||||
url="/pages/couponorder/detail/index?quancode={{item.id}}&couponorderstatus={{boatFlag}}&validStatus={{item.validStatus}}" | |||||
hover-class="navigator-hover" open-type="navigate">查看</navigator> | hover-class="navigator-hover" open-type="navigate">查看</navigator> | ||||
</view> | </view> | ||||
@@ -1,11 +1,13 @@ | |||||
const navigationBarHeight = (getApp().statusBarHeight + 50) + 'px' | |||||
const navigationBarHeight = (getApp().statusBarHeight + 44) + 'px' | |||||
const util = require("../../utils/util.js"); | const util = require("../../utils/util.js"); | ||||
const Http = require("../../utils/HttpBasics"); | const Http = require("../../utils/HttpBasics"); | ||||
const config = require("../../config/config"); | const config = require("../../config/config"); | ||||
const imgurl = require("../../utils/imgurl"); | const imgurl = require("../../utils/imgurl"); | ||||
const { alipay } = require("../../utils/imgurl"); | |||||
let app = getApp(); | let app = getApp(); | ||||
Page({ | Page({ | ||||
data: { | data: { | ||||
navLineHeight: ((app.statusBarHeight + app.statusBarHeight) + 50) + "px", | |||||
navigationBarHeight, | navigationBarHeight, | ||||
noDataFlag: false, | noDataFlag: false, | ||||
businePageNum: 1, | businePageNum: 1, | ||||
@@ -40,13 +42,15 @@ Page({ | |||||
url: config.api.couponChannelDouyinLiveList, | url: config.api.couponChannelDouyinLiveList, | ||||
data: param | data: param | ||||
}).then(res => { | }).then(res => { | ||||
if (res.data.list && res.data.list.length != 0) { | if (res.data.list && res.data.list.length != 0) { | ||||
let tempArr = [] | let tempArr = [] | ||||
let tempLsit = this.data.businessData | let tempLsit = this.data.businessData | ||||
let data = res.data.list | let data = res.data.list | ||||
data.map(item => { | data.map(item => { | ||||
tempArr.push(item.id) | tempArr.push(item.id) | ||||
item.discount = (((item.salePriceStr*1)/(item.priceStr*1))*10).toFixed(1) | |||||
}) | }) | ||||
if (this.data.businePageNum > 1) { | if (this.data.businePageNum > 1) { | ||||
this.setData({ | this.setData({ | ||||
@@ -107,7 +111,7 @@ Page({ | |||||
let data = res.data.list | let data = res.data.list | ||||
data.map(item => { | data.map(item => { | ||||
tempArr.push(item.id) | tempArr.push(item.id) | ||||
item.discount = (((item.salePriceStr*1)/(item.priceStr*1))*10).toFixed(1) | |||||
}) | }) | ||||
if (this.data.businePageNum > 1) { | if (this.data.businePageNum > 1) { | ||||
this.setData({ | this.setData({ | ||||
@@ -195,6 +199,7 @@ Page({ | |||||
}) | }) | ||||
}, | }, | ||||
onLoad: function (options) { | onLoad: function (options) { | ||||
app.globalData.ifCongPh = 1//固定写法 放在指定要手机号授权框出现 | |||||
this.getCouponChannelList() | this.getCouponChannelList() | ||||
}, | }, | ||||
onReachBottom: function () { | onReachBottom: function () { | ||||
@@ -1,5 +1,5 @@ | |||||
{ | { | ||||
"usingComponents": { | |||||
"navbar": "../../components/navbar/navbar" | |||||
} | |||||
} | |||||
"usingComponents": { | |||||
"navbar": "../../components/navbar/navbar" | |||||
} | |||||
} |
@@ -1,5 +1,6 @@ | |||||
<navbar text="直播商品"></navbar> | |||||
<view style="height:{{navigationBarHeight}} "></view> | |||||
<navbar home text="直播商品"></navbar> | |||||
<!-- <view style="height:{{navigationBarHeight}};line-height: {{navLineHeight}}; " class="title">直播商品</view> --> | |||||
<view style="height:{{navigationBarHeight}};"></view> | |||||
<view class="LsitBox" > | <view class="LsitBox" > | ||||
<view tt:for="{{businessData}}" bindtap="goDetail" data-couponid="{{item.couponId}}" data-id="{{item.id}}" class="wBox"> | <view tt:for="{{businessData}}" bindtap="goDetail" data-couponid="{{item.couponId}}" data-id="{{item.id}}" class="wBox"> | ||||
@@ -17,12 +18,14 @@ | |||||
<view class="rmb">¥</view> | <view class="rmb">¥</view> | ||||
<view class="pri01">{{item.salePriceStr}}</view> | <view class="pri01">{{item.salePriceStr}}</view> | ||||
<view class="throgh">{{item.priceStr}}元</view> | <view class="throgh">{{item.priceStr}}元</view> | ||||
<view class="discount1" tt:if="{{item.salePriceStr!=0}}">{{item.discount}}折</view> | |||||
</view> | </view> | ||||
<!-- <view class="progressBox"> | <!-- <view class="progressBox"> | ||||
<view class="schedule" style="width:{{item.percent}};"></view> | <view class="schedule" style="width:{{item.percent}};"></view> | ||||
<view class="scheduleText">已售{{item.sale}}份</view> | <view class="scheduleText">已售{{item.sale}}份</view> | ||||
</view> --> | </view> --> | ||||
<view class="goPay">立即抢购</view> | |||||
<!-- <view class="discount">享{{item.discount}}折</view> --> | |||||
<view class="goPay">{{item.salePriceStr!=0?"立即抢购":"免费领取"}}</view> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
@@ -4,8 +4,19 @@ | |||||
overflow: hidden; | overflow: hidden; | ||||
background-color: #f4f5f9;; | background-color: #f4f5f9;; | ||||
} | } | ||||
.title{ | |||||
text-align: center; | |||||
position: fixed; | |||||
top:0; | |||||
left: 0; | |||||
width: 100%; | |||||
background-color: #fff; | |||||
z-index: 10000; | |||||
font-size: 36rpx; | |||||
font-weight: 500; | |||||
} | |||||
.wBox{ | .wBox{ | ||||
margin: 30rpx auto; | |||||
margin: 20rpx auto; | |||||
} | } | ||||
.itemBox{ | .itemBox{ | ||||
overflow: hidden; | overflow: hidden; | ||||
@@ -14,12 +25,12 @@ | |||||
} | } | ||||
.imgBox{ | .imgBox{ | ||||
width: 200rpx; | |||||
height: 200rpx; | |||||
width: 160rpx; | |||||
height: 160rpx; | |||||
border-radius: 8px; | border-radius: 8px; | ||||
overflow: hidden; | overflow: hidden; | ||||
float: left; | float: left; | ||||
margin: 12rpx 0 12rpx 20rpx; | |||||
margin: 20rpx 0 20rpx 20rpx; | |||||
position: relative; | position: relative; | ||||
} | } | ||||
.num{ | .num{ | ||||
@@ -40,21 +51,20 @@ | |||||
height: 100%; | height: 100%; | ||||
} | } | ||||
.dataBox{ | .dataBox{ | ||||
width: 420rpx; | |||||
height: 240rpx; | |||||
width: 460rpx; | |||||
/* height: 220rpx; */ | |||||
float: left; | float: left; | ||||
margin-left: 20rpx; | margin-left: 20rpx; | ||||
position: relative; | position: relative; | ||||
} | } | ||||
.titleName{ | .titleName{ | ||||
color: #402e1e; | color: #402e1e; | ||||
font-size: 15px; | |||||
font-family: "PingFangSC-Regular"; | font-family: "PingFangSC-Regular"; | ||||
font-weight: 400; | |||||
font-weight: 600; | |||||
width: 100%; | width: 100%; | ||||
font-size: 14px; | |||||
font-size: 28rpx; | |||||
display: -webkit-box; | display: -webkit-box; | ||||
-webkit-line-clamp: 2; | |||||
-webkit-line-clamp: 1; | |||||
-webkit-box-orient: vertical; | -webkit-box-orient: vertical; | ||||
overflow: hidden; | overflow: hidden; | ||||
text-overflow: ellipsis; | text-overflow: ellipsis; | ||||
@@ -64,7 +74,7 @@ | |||||
.subTitleC{ | .subTitleC{ | ||||
color: #402e1e; | color: #402e1e; | ||||
font-size: 24rpx; | font-size: 24rpx; | ||||
margin: 10rpx 0 0 0; | |||||
margin: 6rpx 0 0 0; | |||||
display: -webkit-box; | display: -webkit-box; | ||||
-webkit-line-clamp: 1; | -webkit-line-clamp: 1; | ||||
-webkit-box-orient: vertical; | -webkit-box-orient: vertical; | ||||
@@ -74,7 +84,7 @@ | |||||
.subTitle{ | .subTitle{ | ||||
color: #a6a6a6; | color: #a6a6a6; | ||||
font-size: 24rpx; | font-size: 24rpx; | ||||
margin: 10rpx 0 0 0; | |||||
margin: 6rpx 0 0 0; | |||||
display: -webkit-box; | display: -webkit-box; | ||||
-webkit-line-clamp: 1; | -webkit-line-clamp: 1; | ||||
-webkit-box-orient: vertical; | -webkit-box-orient: vertical; | ||||
@@ -83,7 +93,8 @@ | |||||
} | } | ||||
.priceBox{ | .priceBox{ | ||||
overflow: hidden; | overflow: hidden; | ||||
margin-top: 10rpx; | |||||
margin-top: 6rpx; | |||||
margin-bottom: 10rpx; | |||||
} | } | ||||
.rmb{ | .rmb{ | ||||
color: #d5af67; | color: #d5af67; | ||||
@@ -92,7 +103,7 @@ | |||||
float: left; | float: left; | ||||
} | } | ||||
.pri01{ | .pri01{ | ||||
font-size: 32rpx; | |||||
font-size: 28rpx; | |||||
color: #d5af67; | color: #d5af67; | ||||
letter-spacing: 0; | letter-spacing: 0; | ||||
line-height: 40rpx; | line-height: 40rpx; | ||||
@@ -104,7 +115,7 @@ | |||||
margin-left: 10rpx; | margin-left: 10rpx; | ||||
color: #999 !important; | color: #999 !important; | ||||
line-height: 40rpx; | line-height: 40rpx; | ||||
font-size: 28rpx; | |||||
font-size: 24rpx; | |||||
float: left; | float: left; | ||||
} | } | ||||
.progressBox{ | .progressBox{ | ||||
@@ -133,13 +144,30 @@ | |||||
font-size: 20rpx; | font-size: 20rpx; | ||||
color: #fff; | color: #fff; | ||||
} | } | ||||
.discount{ | |||||
position: absolute; | |||||
bottom: 60rpx; | |||||
right: 12rpx; | |||||
color: #d5af67; | |||||
font-size: 24rpx; | |||||
} | |||||
.discount1{ | |||||
float: left; | |||||
font-size: 20rpx; | |||||
border: #d5af67 1px solid; | |||||
color: #d5af67; | |||||
border-radius: 20rpx; | |||||
padding: 2rpx 10rpx; | |||||
margin-left: 10rpx; | |||||
margin-top: 4rpx; | |||||
} | |||||
.goPay{ | .goPay{ | ||||
position: absolute; | position: absolute; | ||||
bottom: 14rpx; | |||||
bottom: 6rpx; | |||||
right: 0rpx; | right: 0rpx; | ||||
background-color: #d5af67; | background-color: #d5af67; | ||||
color: #fff; | color: #fff; | ||||
font-size: 28rpx; | |||||
font-size: 24rpx; | |||||
text-align: center; | text-align: center; | ||||
line-height: 28rpx; | line-height: 28rpx; | ||||
padding: 12rpx 16rpx; | padding: 12rpx 16rpx; | ||||
@@ -175,9 +175,9 @@ Page({ | |||||
createDate: createDate, | createDate: createDate, | ||||
composeOrderType: tempData.composeOrderType, | composeOrderType: tempData.composeOrderType, | ||||
contentType: tempData.contentType ? tempData.contentType : 0, | contentType: tempData.contentType ? tempData.contentType : 0, | ||||
orderFlag: tempData.type == 11 ? true : false //判断是不是线上配送 | |||||
orderFlag: tempData.type == 11 ? true : false ,//判断是不是线上配送 | |||||
}) | }) | ||||
if (tempData.couponOrderId&&(tempData.orderStatus != 0&&tempData.orderStatus != 2)) { //0未付款 1已支付 2已取消 3退款中 4已退款 | |||||
if (tempData.couponOrderId) { //0未付款 1已支付 2已取消 3退款中 4已退款 | |||||
that.setRq() | that.setRq() | ||||
// that.upStatus() | // that.upStatus() | ||||
let setInter = setInterval(() => { | let setInter = setInterval(() => { | ||||
@@ -327,7 +327,7 @@ Page({ | |||||
couponOrderId: _this.data.order.couponOrderId | couponOrderId: _this.data.order.couponOrderId | ||||
} | } | ||||
}).then(res => { | }).then(res => { | ||||
console.log(res, "res") | |||||
console.log(res, "res") | |||||
_this.setData({ | _this.setData({ | ||||
dynamicRq: res.data.dynamicId, | dynamicRq: res.data.dynamicId, | ||||
expiredSeconds: res.data.expiredSeconds | expiredSeconds: res.data.expiredSeconds | ||||
@@ -338,24 +338,27 @@ Page({ | |||||
TYPE: "couponorder", | TYPE: "couponorder", | ||||
ID: _this.data.dynamicRq | ID: _this.data.dynamicRq | ||||
}) | }) | ||||
let inre = setInterval(() => { | |||||
if (_this.data.expiredSeconds > 1) { | |||||
_this.setData({ | |||||
expiredSeconds: _this.data.expiredSeconds - 1 | |||||
}) | |||||
// console.log("有效", _this.data.expiredSeconds) | |||||
} else { | |||||
// console.log("无效", _this.data.expiredSeconds) | |||||
clearInterval(_this.data.templTiem) | |||||
if(res.data.expiredSeconds==0){ | |||||
//倒计时为零直接显示券码 | |||||
}else{ | |||||
let inre = setInterval(() => { | |||||
if (_this.data.expiredSeconds > 1) { | |||||
_this.setData({ | |||||
expiredSeconds: _this.data.expiredSeconds - 1 | |||||
}) | |||||
// console.log("有效", _this.data.expiredSeconds) | |||||
} else { | |||||
// console.log("无效", _this.data.expiredSeconds) | |||||
clearInterval(_this.data.templTiem) | |||||
_this.setData({ | |||||
showhieRq: true | |||||
}) | |||||
} | |||||
_this.setData({ | _this.setData({ | ||||
showhieRq: true | |||||
templTiem: inre | |||||
}) | }) | ||||
} | |||||
}, 1000) | |||||
_this.setData({ | |||||
templTiem: inre | |||||
}) | |||||
}, 1000) | |||||
} | |||||
_this.createQrCode(url, "qrcode", 350, 350); | _this.createQrCode(url, "qrcode", 350, 350); | ||||
}).catch(err => { | }).catch(err => { | ||||
tt.showToast({ | tt.showToast({ | ||||
@@ -46,7 +46,7 @@ | |||||
<image tt:if="{{order.couponOrderStatus==1}}" src="{{wm01Url}}" mode='widthFix'></image> | <image tt:if="{{order.couponOrderStatus==1}}" src="{{wm01Url}}" mode='widthFix'></image> | ||||
<image tt:if="{{order.couponOrderStatus==2}}" src="{{wm02Url}}" mode='widthFix'></image> | <image tt:if="{{order.couponOrderStatus==2}}" src="{{wm02Url}}" mode='widthFix'></image> | ||||
<image tt:if="{{order.couponOrderStatus==3}}" src="{{wm03Url}}" mode='widthFix'></image> | <image tt:if="{{order.couponOrderStatus==3}}" src="{{wm03Url}}" mode='widthFix'></image> | ||||
<image tt:if="{{order.couponOrderStatus==0&&validStatus==0}}" src="{{wm04Url}}" mode='widthFix'></image> | |||||
<image tt:if="{{order.couponOrderStatus==0&&order.validStatus==0}}" src="{{wm04Url}}" mode='widthFix'></image> | |||||
<view class="panel" tt:if="{{order.couponOrderStatus==0&&order.validStatus!=0}}"> | <view class="panel" tt:if="{{order.couponOrderStatus==0&&order.validStatus!=0}}"> | ||||
<view class="canWrap"> | <view class="canWrap"> | ||||
@@ -85,24 +85,28 @@ Page({ | |||||
TYPE: "couponorder", | TYPE: "couponorder", | ||||
ID: _this.data.dynamicRq | ID: _this.data.dynamicRq | ||||
}) | }) | ||||
if(res.data.expiredSeconds==0){ | |||||
let inre = setInterval(() => { | |||||
if (_this.data.expiredSeconds > 1) { | |||||
_this.setData({ | |||||
expiredSeconds: _this.data.expiredSeconds - 1 | |||||
}) | |||||
console.log("有效", _this.data.expiredSeconds) | |||||
} else { | |||||
console.log("无效", _this.data.expiredSeconds) | |||||
clearInterval(_this.data.templTiem) | |||||
_this.setData({ | |||||
showhieRq: true | |||||
}) | |||||
} | |||||
}, 1000) | |||||
_this.setData({ | |||||
templTiem: inre | |||||
}) | |||||
}else{ | |||||
let inre = setInterval(() => { | |||||
if (_this.data.expiredSeconds > 1) { | |||||
_this.setData({ | |||||
expiredSeconds: _this.data.expiredSeconds - 1 | |||||
}) | |||||
console.log("有效", _this.data.expiredSeconds) | |||||
} else { | |||||
console.log("无效", _this.data.expiredSeconds) | |||||
clearInterval(_this.data.templTiem) | |||||
_this.setData({ | |||||
showhieRq: true | |||||
}) | |||||
} | |||||
}, 1000) | |||||
_this.setData({ | |||||
templTiem: inre | |||||
}) | |||||
} | |||||
// util.qrcode("qrcode", url, 350, 350); | // util.qrcode("qrcode", url, 350, 350); | ||||
_this.createQrCode(url, "qrcode", 350, 350); | _this.createQrCode(url, "qrcode", 350, 350); | ||||
}).catch(err => { | }).catch(err => { | ||||
@@ -14,7 +14,7 @@ | |||||
"projectname": "tt富茂C", | "projectname": "tt富茂C", | ||||
"condition": { | "condition": { | ||||
"miniprogram": { | "miniprogram": { | ||||
"current": 1649905362371, | |||||
"current": -1, | |||||
"list": [ | "list": [ | ||||
{ | { | ||||
"id": 1650610427387, | "id": 1650610427387, | ||||