浏览代码

【提交代码】

master
chenshengle 2 年前
父节点
当前提交
8c33bafba5
共有 15 个文件被更改,包括 170 次插入101 次删除
  1. +1
    -1
      ext.json
  2. +1
    -1
      index/index.json
  3. +5
    -1
      pages/coupon/detail/index.ttml
  4. +23
    -7
      pages/coupon/detail/index.ttss
  5. +27
    -19
      pages/couponorder/detail/index.js
  6. +2
    -4
      pages/couponorder/index/index.js
  7. +3
    -3
      pages/couponorder/index/index.ttml
  8. +8
    -3
      pages/liveLsit/liveLsit.js
  9. +4
    -4
      pages/liveLsit/liveLsit.json
  10. +6
    -3
      pages/liveLsit/liveLsit.ttml
  11. +45
    -17
      pages/liveLsit/liveLsit.ttss
  12. +22
    -19
      pages/order/detail/index.js
  13. +1
    -1
      pages/order/detail/index.ttml
  14. +21
    -17
      pages/orderquanma/index.js
  15. +1
    -1
      project.config.json

+ 1
- 1
ext.json 查看文件

@@ -7,7 +7,7 @@
"navigationBarTitleText": "Mini Program",
"navigationBarTextStyle": "black",
"navigationStyle": "custom"
},
},
"ext": {
"weappId": "ttef6599d8705b49b101",
"name": "富茂券模板",


+ 1
- 1
index/index.json 查看文件

@@ -12,5 +12,5 @@
},
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#F4F5F9"
}
}

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

@@ -221,7 +221,6 @@
<view class="selling">{{data.type==50?priceAndStockObj.creditPrice+'积分':priceAndStockObj.salePrice/100}} </view>
<view class="qsOriginal">¥{{priceAndStockObj.price/100}}</view>

<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}}">
马上购买</button>
@@ -246,6 +245,11 @@
<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>
<!-- <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>
</form>
</view>


+ 23
- 7
pages/coupon/detail/index.ttss 查看文件

@@ -343,13 +343,7 @@ button::after {
font-weight: 400;
float: left;
}
.serviceBox{
float: left;
margin-top: 58rpx;
margin-left: 14rpx;
height: 40rpx;
width: 40rpx;
}

.serviceImg{
height: 100%;
width: 100%;
@@ -1190,4 +1184,26 @@ button{
color: #fff;
background-color: rgba(221,171,90, 0.5);
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;
}

+ 27
- 19
pages/couponorder/detail/index.js 查看文件

@@ -49,9 +49,14 @@ Page({
console.log(options);
that.setData({
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({
url: config.api.couponOrderDetail,
@@ -165,24 +170,27 @@ Page({
TYPE: "couponorder",
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);
_this.createQrCode(url, "qrcode", 210, 210);
}).catch(err => {


+ 2
- 4
pages/couponorder/index/index.js 查看文件

@@ -69,7 +69,7 @@ Page({
let tempArr= that.data.list
if(tempArr.length>0){
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:[]
if(tempLsit.length>0){
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({
@@ -126,8 +126,6 @@ Page({
this.getList()
},
onShow:function(){
debugger
this.getList()
}


+ 3
- 3
pages/couponorder/index/index.ttml 查看文件

@@ -19,15 +19,15 @@
</view>
<view class="ticketData">
<view class="ticketTitle">{{item.title}}</view>
<view class="date">{{item.createDate}}</view>
<view class="date">{{item.expiredTime}}</view>
</view>
</view>
<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>
<navigator class="nouseBtn"
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>

</view>


+ 8
- 3
pages/liveLsit/liveLsit.js 查看文件

@@ -1,11 +1,13 @@
const navigationBarHeight = (getApp().statusBarHeight + 50) + 'px'
const navigationBarHeight = (getApp().statusBarHeight + 44) + 'px'
const util = require("../../utils/util.js");
const Http = require("../../utils/HttpBasics");
const config = require("../../config/config");
const imgurl = require("../../utils/imgurl");
const { alipay } = require("../../utils/imgurl");
let app = getApp();
Page({
data: {
navLineHeight: ((app.statusBarHeight + app.statusBarHeight) + 50) + "px",
navigationBarHeight,
noDataFlag: false,
businePageNum: 1,
@@ -40,13 +42,15 @@ Page({
url: config.api.couponChannelDouyinLiveList,
data: param
}).then(res => {

if (res.data.list && res.data.list.length != 0) {
let tempArr = []
let tempLsit = this.data.businessData
let data = res.data.list
data.map(item => {
tempArr.push(item.id)

item.discount = (((item.salePriceStr*1)/(item.priceStr*1))*10).toFixed(1)
})
if (this.data.businePageNum > 1) {
this.setData({
@@ -107,7 +111,7 @@ Page({
let data = res.data.list
data.map(item => {
tempArr.push(item.id)
item.discount = (((item.salePriceStr*1)/(item.priceStr*1))*10).toFixed(1)
})
if (this.data.businePageNum > 1) {
this.setData({
@@ -195,6 +199,7 @@ Page({
})
},
onLoad: function (options) {
app.globalData.ifCongPh = 1//固定写法 放在指定要手机号授权框出现
this.getCouponChannelList()
},
onReachBottom: function () {


+ 4
- 4
pages/liveLsit/liveLsit.json 查看文件

@@ -1,5 +1,5 @@
{
"usingComponents": {
"navbar": "../../components/navbar/navbar"
}
}
"usingComponents": {
"navbar": "../../components/navbar/navbar"
}
}

+ 6
- 3
pages/liveLsit/liveLsit.ttml 查看文件

@@ -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 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="pri01">{{item.salePriceStr}}</view>
<view class="throgh">{{item.priceStr}}元</view>
<view class="discount1" tt:if="{{item.salePriceStr!=0}}">{{item.discount}}折</view>
</view>
<!-- <view class="progressBox">
<view class="schedule" style="width:{{item.percent}};"></view>
<view class="scheduleText">已售{{item.sale}}份</view>
</view> -->
<view class="goPay">立即抢购</view>
<!-- <view class="discount">享{{item.discount}}折</view> -->
<view class="goPay">{{item.salePriceStr!=0?"立即抢购":"免费领取"}}</view>
</view>
</view>
</view>


+ 45
- 17
pages/liveLsit/liveLsit.ttss 查看文件

@@ -4,8 +4,19 @@
overflow: hidden;
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{
margin: 30rpx auto;
margin: 20rpx auto;
}
.itemBox{
overflow: hidden;
@@ -14,12 +25,12 @@
}

.imgBox{
width: 200rpx;
height: 200rpx;
width: 160rpx;
height: 160rpx;
border-radius: 8px;
overflow: hidden;
float: left;
margin: 12rpx 0 12rpx 20rpx;
margin: 20rpx 0 20rpx 20rpx;
position: relative;
}
.num{
@@ -40,21 +51,20 @@
height: 100%;
}
.dataBox{
width: 420rpx;
height: 240rpx;
width: 460rpx;
/* height: 220rpx; */
float: left;
margin-left: 20rpx;
position: relative;
}
.titleName{
color: #402e1e;
font-size: 15px;
font-family: "PingFangSC-Regular";
font-weight: 400;
font-weight: 600;
width: 100%;
font-size: 14px;
font-size: 28rpx;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
@@ -64,7 +74,7 @@
.subTitleC{
color: #402e1e;
font-size: 24rpx;
margin: 10rpx 0 0 0;
margin: 6rpx 0 0 0;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
@@ -74,7 +84,7 @@
.subTitle{
color: #a6a6a6;
font-size: 24rpx;
margin: 10rpx 0 0 0;
margin: 6rpx 0 0 0;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
@@ -83,7 +93,8 @@
}
.priceBox{
overflow: hidden;
margin-top: 10rpx;
margin-top: 6rpx;
margin-bottom: 10rpx;
}
.rmb{
color: #d5af67;
@@ -92,7 +103,7 @@
float: left;
}
.pri01{
font-size: 32rpx;
font-size: 28rpx;
color: #d5af67;
letter-spacing: 0;
line-height: 40rpx;
@@ -104,7 +115,7 @@
margin-left: 10rpx;
color: #999 !important;
line-height: 40rpx;
font-size: 28rpx;
font-size: 24rpx;
float: left;
}
.progressBox{
@@ -133,13 +144,30 @@
font-size: 20rpx;
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{
position: absolute;
bottom: 14rpx;
bottom: 6rpx;
right: 0rpx;
background-color: #d5af67;
color: #fff;
font-size: 28rpx;
font-size: 24rpx;
text-align: center;
line-height: 28rpx;
padding: 12rpx 16rpx;


+ 22
- 19
pages/order/detail/index.js 查看文件

@@ -175,9 +175,9 @@ Page({
createDate: createDate,
composeOrderType: tempData.composeOrderType,
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.upStatus()
let setInter = setInterval(() => {
@@ -327,7 +327,7 @@ Page({
couponOrderId: _this.data.order.couponOrderId
}
}).then(res => {
console.log(res, "res")
console.log(res, "res")
_this.setData({
dynamicRq: res.data.dynamicId,
expiredSeconds: res.data.expiredSeconds
@@ -338,24 +338,27 @@ Page({
TYPE: "couponorder",
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({
showhieRq: true
templTiem: inre
})
}
}, 1000)
_this.setData({
templTiem: inre
})
}, 1000)
}
_this.createQrCode(url, "qrcode", 350, 350);
}).catch(err => {
tt.showToast({


+ 1
- 1
pages/order/detail/index.ttml 查看文件

@@ -46,7 +46,7 @@
<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==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="canWrap">


+ 21
- 17
pages/orderquanma/index.js 查看文件

@@ -85,24 +85,28 @@ Page({
TYPE: "couponorder",
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);
_this.createQrCode(url, "qrcode", 350, 350);
}).catch(err => {


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

@@ -14,7 +14,7 @@
"projectname": "tt富茂C",
"condition": {
"miniprogram": {
"current": 1649905362371,
"current": -1,
"list": [
{
"id": 1650610427387,


正在加载...
取消
保存