Commit 573bd2f4 by 严立

Merge branch 'master' of http://120.77.182.185/yanl/mini-shimao

parents 45962e2d fa9f0e8c
......@@ -12,6 +12,8 @@ Page({
* 页面的初始数据
*/
data: {
isDoing: false,
pageNo: 1,
// 导航栏相关属性
navigationStyle: {
normal: {
......@@ -43,97 +45,74 @@ Page({
],
// 订单状态(-1已取消, 0未付款, 2待使用, 3已使用, 4已过期 6已关闭)
// 活动状态(0 未开始 1进行中 2 已结束)
activityList: [
// {
// orderId: 0,
// name: '海滩夏日音乐节',
// status: '0',
// activeState: '0',
// cover: '',
// date: '6月30日 10:00-12:00',
// address: '云之亭广场外侧',
// num: 3,
// amount: '326.00'
// },
// {
// orderId: 1,
// name: '海滩夏日音乐节',
// status: '2',
// activeState: '0',
// cover: '',
// date: '6月30日 10:00-12:00',
// address: '云之亭广场外侧',
// num: 3,
// amount: '326.00'
// },
// {
// orderId: 2,
// name: '海滩夏日音乐节海滩夏日音乐节海滩夏日音乐节海滩夏日音乐节',
// status: '2',
// activeState: '1',
// cover: '',
// date: '6月30日 10:00-12:00',
// address: '云之亭广场外侧云之亭广场外侧云之亭广场外侧云之亭广场外侧云之亭广场外侧',
// num: 3,
// amount: '326.00'
// },
// {
// orderId: 2,
// name: '海滩夏日音乐节海滩夏日音乐节海滩夏日音乐节海滩夏日音乐节',
// status: '3',
// activeState: '2',
// cover: '',
// date: '6月30日 10:00-12:00',
// address: '云之亭广场外侧云之亭广场外侧云之亭广场外侧云之亭广场外侧云之亭广场外侧',
// num: 3,
// amount: '326.00'
// },
activityList: [],
data: [ // 假数据数组,type=0入园预约,type=1 看房预约
// {
// orderId: 2,
// name: '海滩夏日音乐节海滩夏日音乐节海滩夏日音乐节海滩夏日音乐节',
// status: '4',
// activeState: '1',
// cover: '',
// date: '6月30日 10:00-12:00',
// address: '云之亭广场外侧云之亭广场外侧云之亭广场外侧云之亭广场外侧云之亭广场外侧',
// title: '夜间入园预约',
// type: '0',
// time: '6月30日 20:00-24:00',
// num: 3,
// amount: '326.00'
// url: 'http://upload.miaomiao-bao.com/36acd202008141719598303.jpg'
// },
// {
// orderId: 2,
// name: '海滩夏日音乐节海滩夏日音乐节海滩夏日音乐节海滩夏日音乐节',
// status: '-1',
// activeState: '1',
// cover: '',
// date: '6月30日 10:00-12:00',
// address: '云之亭广场外侧云之亭广场外侧云之亭广场外侧云之亭广场外侧云之亭广场外侧',
// title: '看房预约',
// type: '1',
// time: '6月30日',
// num: 3,
// amount: '326.00'
// url: ' http://upload.miaomiao-bao.com/4c644202008141702599692.jpg'
// },
],
data: [ // 假数据数组,type=0入园预约,type=1 看房预约
{
title: '夜间入园预约',
type: '0',
time: '6月30日 20:00-24:00',
num: 3,
url: 'http://upload.miaomiao-bao.com/36acd202008141719598303.jpg'
},
{
title: '看房预约',
type: '1',
time: '6月30日',
num: 3,
url: ' http://upload.miaomiao-bao.com/4c644202008141702599692.jpg'
},
],
active: 0,
height: 0,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
let type = options.tab ? 1 * options.tab : 0
this.setData({
height: wx.getSystemInfoSync().windowHeight, //获取屏幕的高度
active: type
})
if (type === 0) {
this.getActivity()
} else {
this.getList(type)
}
},
// 去使用
onOrderUse: function (event) {
this.onOrderDetail(event)
},
/**
* 订单评价
* @function
* @param
* @returns
*/
onOrderEvaluate: function (event) {
let item = JSON.stringify(event.currentTarget.dataset.item)
wx.navigateTo({
url: `/pages/pay/order-comment/order-comment?orderItem=${item}&pageFrom=activityList`,
})
},
// 跳转详情页面
onOrderDetail: function (event) {
let funcItem = event.currentTarget.dataset.item
wx.navigateTo({
url: '/pages/pay/order-detail/order-detail?id=' + funcItem.orderId,
})
},
// 点击导航切换,默认是全部的
chageNav(e) {
let index = e.currentTarget.dataset.index
if (index === 0) {
this.setData({
pageNo: 1,
activityList: []
})
this.getActivity()
} else {
this.getList(index)
......@@ -142,11 +121,44 @@ Page({
active: index
})
},
/**
* 订单支付
* @function
* @param
* @returns
*/
onOrderPay: function (event) {
// 数据校验不通过
let that = this
let funcItem = event.currentTarget.dataset.item
let wxRequest = funcItem.wxRequest
// 待支付返回的wx支付参数
if (wxRequest) {
wx.requestPayment({
timeStamp: wxRequest.timeStamp,
nonceStr: wxRequest.nonceStr,
package: wxRequest.package,
signType: wxRequest.signType,
paySign: wxRequest.paySign,
success(res) {
that.setData({
'orderList': [],
'orderPages': 1,
})
that.queryOrder()
},
fail(res) {}
})
}
},
//预约凭证
gohotelAccommodation(e) {
console.log(e)
wx.navigateTo({
url: '../hotelAccommodation/hotelAccommodation?detail=' + JSON.stringify(e.currentTarget.dataset.item),
url: '/pages/mine/appointment-ticket/appointment-ticket?detail=' + JSON.stringify(e.currentTarget.dataset.item),
})
},
//预约
......@@ -166,22 +178,7 @@ Page({
url: url
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
let type = options.tab ? 1 * options.tab : 0
this.setData({
height: wx.getSystemInfoSync().windowHeight, //获取屏幕的高度
active: type
})
if (type === 0) {
this.getActivity()
} else {
this.getList(type)
}
},
// 页面滚动
onPageScroll: function (funcEvent) {
// 优化滚动事件触发频率
......@@ -197,6 +194,55 @@ Page({
clearTimeout(logicData.pageScrollTimer)
}, 10)
},
// 删除,取消预约
doCancel: function (event) {
let that = this
wx.lin.showDialog({
type: "confirm",
title: "",
content: "是否确认删除报名",
success: (res) => {
if (res.confirm) {
console.log('用户点击确定')
wx.showLoading({
title: '处理中',
mask: true
})
this.setData({
isDoing: true
})
let funcItem = event.target.dataset.item
App.wxRequest({
url: '/api/v1/activity/doCancel',
data: {
'enrollId': funcItem.enrollId,
'type': 1, //0取消1删除
},
success: (response) => {
wx.hideLoading()
wx.lin.showToast({
image: '/image/success.png',
title: '删除成功',
})
setTimeout(() => {
that.setData({
isDoing: false,
'activityList': [],
'pageNo': 1,
})
that.getActivity()
}, 2000);
}
})
} else if (res.cancel) {
console.log('用户点击取消')
}
}
})
},
// 我的活动
getActivity: function () {
let that = this
......@@ -208,7 +254,7 @@ Page({
data: {
activeState: '', //""全部 0 未开始 1进行中 2已结束
pageSize: '10',
pageNo: '1',
pageNo: this.data.pageNo,
type: '1'
},
success: function (res) {
......@@ -225,7 +271,7 @@ Page({
status: item.status, // 订单状态(-1已取消, 0未付款, 2待使用, 3已使用, 4已过期 6已关闭)
activeState: item.activeState, // 活动状态(0 未开始 1进行中 2 已结束)
cover: item.cover,
date: item.activeDate + ' ' + item.activeTime,
date: item.activeTime,
address: item.address,
num: item.number,
amount: item.totalMoney.toFixed(2)
......@@ -297,6 +343,17 @@ Page({
})
}
})
}
},
// 触底加载
onReachBottom: function () {
this.setData({
pageNo: this.data.pageNo + 1
})
if (this.data.active == 0) {
this.getActivity()
}
},
})
\ No newline at end of file
<!--pages/myAppointment/myAppointment.wxml-->
<navigation class="navigation" titleText="我的预约" backIcon="/image/back.png" scrollStyle="{{navigationStyle}}" scrollHeight="{{navigationScroll}}"></navigation>
<navigation class="navigation" titleText="我的预约" backIcon="/image/back.png" scrollStyle="{{navigationStyle}}"
scrollHeight="{{navigationScroll}}"></navigation>
<view class="container all">
<view class="myActivity-container" style="min-height:{{height}}px;">
<view class="myAppointment-nav">
<!-- 遍历头部导航 -->
<view bindtap="chageNav" data-index="{{index}}" wx:for="{{navItem}}" wx:key="index" class="navItem {{index == active? 'active':''}}">{{item.content}}</view>
<view bindtap="chageNav" data-index="{{index}}" wx:for="{{navItem}}" wx:key="index"
class="navItem {{index == active? 'active':''}}">{{item.content}}</view>
</view>
<!-- 主题活动 -->
<view class="myAppointment-body" wx:if="{{activityList.length > 0 && active === 0}}">
<block wx:for="{{activityList}}" wx:for-item="activity" wx:for-index="indexActivity" wx:key="orderId">
<block wx:for="{{activityList}}" wx:for-item="activity" wx:for-index="indexActivity" wx:key="orderId">
<!-- 待付款 -->
<view class="appointment-wrapper" wx:if="{{activity.status === '0'}}">
<view class="appointment-wrapper" wx:if="{{activity.status === '0'}}" bindtap="onOrderDetail"
data-item="{{activity}}">
<view class="appointment-time">{{activity.date}}</view>
<view class="appintment-activity-status-pay">
<text>待付款</text>
......@@ -36,8 +40,8 @@
<text>{{activity.amount}}</text>
</view>
<view class="appointment-activity-btn row">
<view class="cancel-btn">删除报名</view>
<view class="confirm-btn">去支付</view>
<view catchtap="doCancel" data-item="{{activity}}" class="cancel-btn">删除报名</view>
<view catchtap="onOrderPay" data-item="{{activity}}" class="confirm-btn">去支付</view>
</view>
</view>
</view>
......@@ -69,7 +73,7 @@
<text>{{activity.amount}}</text>
</view>
<view class="appointment-activity-btn row">
<view class="confirm-btn">去使用</view>
<view data-item="{{activity}}" catchtap="onOrderUse" class="confirm-btn">去使用</view>
</view>
</view>
</view>
......@@ -81,7 +85,7 @@
</view>
<view class="appointment-activity-content row align-c">
<view class="appointment-activity-img">
<image src=""></image>
<image src="{{activity.cover}}"></image>
</view>
<view class="appointment-activity-info col con-a">
<view class="appointment-activity-title">
......@@ -101,7 +105,7 @@
<text>{{activity.amount}}</text>
</view>
<view class="appointment-activity-btn row">
<view class="confirm-btn">去使用</view>
<view data-item="{{activity}}" catchtap="onOrderUse" class="confirm-btn">去使用</view>
</view>
</view>
</view>
......@@ -113,7 +117,7 @@
</view>
<view class="appointment-activity-content row align-c">
<view class="appointment-activity-img">
<image src=""></image>
<image src="{{activity.cover}}"></image>
</view>
<view class="appointment-activity-info col con-a">
<view class="appointment-activity-title">
......@@ -133,7 +137,7 @@
<text>{{activity.amount}}</text>
</view>
<view class="appointment-activity-btn row">
<view class="confirm-btn">去评价</view>
<view data-item="{{activity}}" catchtap="onOrderEvaluate" class="confirm-btn">去评价</view>
</view>
</view>
</view>
......@@ -146,7 +150,7 @@
</view>
<view class="appointment-activity-content row align-c">
<view class="appointment-activity-img">
<image src=""></image>
<image src="{{activity.cover}}"></image>
</view>
<view class="appointment-activity-info col con-a">
<view class="appointment-activity-title">
......@@ -166,20 +170,20 @@
<text>{{activity.amount}}</text>
</view>
<view class="appointment-activity-btn row">
<view class="cancel-btn cancel-overtime">删除报名</view>
<view data-item="{{activity}}" catchtap="doCancel" class="cancel-btn cancel">删除报名</view>
</view>
</view>
</view>
<!-- 已取消 -->
<view class="appointment-wrapper" wx:if="{{activity.status === '-1'}}">
<view class="mask-cancel"></view>
<view class="mask-cancel" bindtap="onOrderDetail" data-item="{{activity}}"></view>
<view class="appointment-time mask-cancel-time">7月15日 10:00-12:00</view>
<view class="appintment-activity-status-cancel">
<text>已取消</text>
</view>
<view class="appointment-activity-content row align-c">
<view class="appointment-activity-img">
<image src=""></image>
<image src="{{activity.cover}}"></image>
</view>
<view class="appointment-activity-info col con-a">
<view class="appointment-activity-title">
......@@ -199,42 +203,48 @@
<text>{{activity.amount}}</text>
</view>
<view class="appointment-activity-btn row">
<view class="cancel-btn cancel">删除报名</view>
<view class="confirm-btn confirm-once">再次报名</view>
<view data-item="{{activity}}" catchtap="doCancel" class="cancel-btn cancel">删除报名</view>
<view data-index="0" catchtap="goAppoint" class="confirm-btn confirm-once">再次报名</view>
</view>
</view>
</view>
</block>
</view>
<!-- 夜间入园预约、看房预约 -->
<view class="myAppointment-body" wx:if="{{data.length > 0 && active !== 0}}">
<view class="myAppointment-item" wx:for="{{data}}" wx:key="index">
<image src="{{item.url}}" class="item-img"></image>
<view class="item-content">
<view class="item-title {{item.type == 0 ?'item-num-1' : ''}}">{{item.title}}</view>
<view class="item-time {{item.type == 1 ?'item-time-1' : ''}}">预约时间 {{item.time}}</view>
<view wx:if="{{item.type == 0}}" class="item-num">预约人数 {{item.num}}人</view>
</view>
<view class="button" data-item="{{item}}" bindtap="gohotelAccommodation">预约凭证</view>
<image src="{{item.url}}" class="item-img"></image>
<view class="item-content">
<view class="item-title {{item.type == 0 ?'item-num-1' : ''}}">{{item.title}}</view>
<view class="item-time {{item.type == 1 ?'item-time-1' : ''}}">预约时间 {{item.time}}</view>
<view wx:if="{{item.type == 0}}" class="item-num">预约人数 {{item.num}}人</view>
</view>
<view class="button" data-item="{{item}}" bindtap="gohotelAccommodation">预约凭证</view>
</view>
</view>
</view>
<view class="noActive" wx:if="{{data.length === 0 && active === 2}}">
<view class="noActive" wx:if="{{data.length === 0 && active === 1}}">
<view class="noActive-title">暂无夜间入园预约</view>
<view class="noActive-rule">20:00后入园需要提前预约,每日限流200人</view>
<view class="noActive-botton" data-index="2" bindtap="goAppoint">去预约</view>
</view>
<view class="noActive" wx:if="{{data.length === 0 && active === 1}}">
<view class="noActive" wx:if="{{data.length === 0 && active === 2}}">
<view class="noActive-title">暂无看房预约</view>
<view class="noActive-botton" data-index="1" bindtap="goAppoint">去预约</view>
</view>
<!-- 主题活动数据为空 -->
<view class="noActive" wx:if="{{activityList.length === 0 && active === 0}}">
<view class="noActive-title">暂无活动预约</view>
<view class="noActive-botton" data-index="0" bindtap="goAppoint">去预约</view>
</view>
</view>
<!-- 确认框 -->
<l-dialog />
<l-toast l-image-class="toast-image"></l-toast>
<wxs module="m1">
var getDate = function(date, type) {
var getDate = function (date, type) {
return date.substring(5, 11).replace('-', '月').replace(' ', '日') + ((type == 0) ? ' 20:00-24:00' : '');
}
module.exports.getDate = getDate;
......
......@@ -100,45 +100,45 @@
<view class="order-activity-icon-wrapper col align-c" data-type="3" bindtap="goOrderByclass">
<view class="order-activity-icon row con-c align-c">
<image src="{{imageResourcesBase+'mine/home/or_ticket.png'}}"></image>
<view class="order-activity-badge {{ goodTypeCountData['1'] > 9 ? 'badge-widen' : ''}}"
wx:if="{{goodTypeCountData['1'] > 0}}">
{{goodTypeCountData['1'] > 99 ? '···' : goodTypeCountData['1']}}</view>
<view class="order-activity-badge {{ goodTypeCountData['3'] > 9 ? 'badge-widen' : ''}}"
wx:if="{{goodTypeCountData['3'] > 0}}">
{{goodTypeCountData['3'] > 99 ? '···' : goodTypeCountData['3']}}</view>
</view>
<text>门票</text>
</view>
<view class="order-activity-icon-wrapper col align-c" data-type="5" bindtap="goOrderByclass">
<view class="order-activity-icon row con-c align-c">
<image src="{{imageResourcesBase+'mine/home/or_food.png'}}"></image>
<view class="order-activity-badge {{ goodTypeCountData['2'] > 9 ? 'badge-widen' : ''}}"
wx:if="{{goodTypeCountData['2'] > 0}}">
{{goodTypeCountData['2'] > 99 ? '···' : goodTypeCountData['2']}}</view>
<view class="order-activity-badge {{ goodTypeCountData['5'] > 9 ? 'badge-widen' : ''}}"
wx:if="{{goodTypeCountData['5'] > 0}}">
{{goodTypeCountData['5'] > 99 ? '···' : goodTypeCountData['5']}}</view>
</view>
<text>餐饮</text>
</view>
<view class="order-activity-icon-wrapper col align-c" data-type="3" bindtap="goOrderByclass">
<view class="order-activity-icon-wrapper col align-c" data-type="-2" bindtap="goOrderByclass">
<view class="order-activity-icon row con-c align-c">
<image src="{{imageResourcesBase+'mine/home/or_movice.png'}}"></image>
<view class="order-activity-badge {{ goodTypeCountData['3'] > 9 ? 'badge-widen' : ''}}"
wx:if="{{goodTypeCountData['3'] > 0}}">
{{goodTypeCountData['3'] > 99 ? '···' : goodTypeCountData['3']}}</view>
<view class="order-activity-badge {{ goodTypeCountData['-2'] > 9 ? 'badge-widen' : ''}}"
wx:if="{{goodTypeCountData['-2'] > 0}}">
{{goodTypeCountData['-2'] > 99 ? '···' : goodTypeCountData['-2']}}</view>
</view>
<text>影票</text>
</view>
<view class="order-activity-icon-wrapper col align-c" data-type="2" bindtap="goOrderByclass">
<view class="order-activity-icon row con-c align-c">
<image src="{{imageResourcesBase+'mine/home/or_spa.png'}}"></image>
<view class="order-activity-badge {{ goodTypeCountData['4'] > 9 ? 'badge-widen' : ''}}"
wx:if="{{goodTypeCountData['4'] > 0}}">
{{goodTypeCountData['4'] > 99 ? '···' : goodTypeCountData['4']}}</view>
<view class="order-activity-badge {{ goodTypeCountData['2'] > 9 ? 'badge-widen' : ''}}"
wx:if="{{goodTypeCountData['2'] > 0}}">
{{goodTypeCountData['2'] > 99 ? '···' : goodTypeCountData['2']}}</view>
</view>
<text>SPA</text>
</view>
<view class="order-activity-icon-wrapper col align-c" data-type="4" bindtap="goOrderByclass">
<view class="order-activity-icon row con-c align-c">
<image src="{{imageResourcesBase+'mine/home/or_art.png'}}"></image>
<view class="order-activity-badge {{ goodTypeCountData['5'] > 9 ? 'badge-widen' : ''}}"
wx:if="{{goodTypeCountData['5'] > 0}}">
{{goodTypeCountData['5'] > 99 ? '···' : goodTypeCountData['5']}}</view>
<view class="order-activity-badge {{ goodTypeCountData['4'] > 9 ? 'badge-widen' : ''}}"
wx:if="{{goodTypeCountData['4'] > 0}}">
{{goodTypeCountData['4'] > 99 ? '···' : goodTypeCountData['4']}}</view>
</view>
<text>文创</text>
</view>
......@@ -257,7 +257,7 @@
<!-- 预约卡片 -->
<view class="appintment">
<!-- 主题活动 -->
<view class="appointment-wrapper" wx:for="{{activityList}}" wx:key="*this">
<view class="appointment-wrapper" wx:for="{{activityList}}" wx:key="*this" data-item="{{item}}" bindtap="onOrderDetail">
<view class="appointment-time">{{item.activeTime}}</view>
<view class="appointment-activity-content row">
<view class="appointment-activity-img">
......
......@@ -33,12 +33,13 @@ Page({
orderPages: 1,
winOrderType: false,
isLoading: false,
isFinished: false
isFinished: false,
optionsGoodType: ''
},
onLoad: function (options) {
this.setData({
option: options,
orderTypeActive: options.goodType != undefined ? 1 * options.goodType : 0
optionsGoodType: options.goodType != undefined ? 1 * options.goodType : ''
})
// App.login({
// timeout: 0,
......@@ -176,10 +177,11 @@ Page({
* @returns
*/
setOrderType: function () {
let that = this;
App.wxRequest({
url: '/api/v1/common/getDictByType',
data: {
'type': 'good_type',
'type': 'order_good_type',
},
success: (response) => {
......@@ -196,14 +198,27 @@ Page({
funcList.push(funcItem)
}
let typeTitle = '全部分类' //
if (this.data.orderTypeActive) {
typeTitle = funcList[this.data.orderTypeActive].name
}
let orderTypeActive = 0 //
let aVal = ''
funcList.forEach((item, index) => {
if (item.value == that.data.optionsGoodType) {
typeTitle = item.name
orderTypeActive = index
}
})
// if (filter.length > 0) {
// typeTitle = filter[0].name
// orderTypeActive = 0
// }
this.setData({
'orderType': funcList,
orderTypeTitle: typeTitle
})
orderTypeTitle: typeTitle,
orderTypeActive
})
this.queryOrder()
}
})
......
......@@ -2,6 +2,7 @@ let App = getApp()
Page({
data: {
shopConfig: App.globalData.shopId,
imageBase: App.globalData.appImageBase,
resourcesBase: App.globalData.appResourcesBase,
scoreServe: 0, // 服务分数
......@@ -21,14 +22,114 @@ Page({
fileResults: []
},
onLoad: function (options) {
let orderItem = JSON.parse(options.orderItem)
console.log(options, '99999999999999999999999999999');
let pageFrom = options.pageFrom
let orderItem = JSON.parse(options.orderItem)
this.setData({
orderInfo: orderItem,
pageFrom: pageFrom
})
if (pageFrom == 'activityList') {
this.queryOrderDetail()
}
},
/**
* 订单详情
* @function
* @param
* @returns
*/
queryOrderDetail: function () {
let that = this
App.wxRequest({
url: '/api/v1/order/getOrderDetail',
data: {
'orderId': this.data.orderInfo.orderId
},
success: (response) => {
let funcResponse = response.data
let funcOrderInfo = {
'id': this.data.orderInfo.orderId,
'score': funcResponse.integral, // 积分
'state': Number(funcResponse.status), // 订单状态
'amount': funcResponse.totalMoney, // 实付金额
'contactName': funcResponse.name, // 联系人名称
'contactPhone': funcResponse.mobilePhone, // 联系人电话
'commodityType': Number(funcResponse.goodType), // 商品类型
'commodity': [],
'tipOrderNo': funcResponse.orderSerialNumber, // 订单编号
'tipTimeSubmit': funcResponse.createDate,
'tipTimePay': App.modular.miment(funcResponse.paymentTime).format('YYYY-MM-DD hh:mm:ss'),
'tipIntegral': funcResponse.integral,
'officeName': funcResponse.officeName,
'wxRequest': funcResponse.wxRequest,
'businessTime': funcResponse.businessTime, //营业时间
'expireTime': funcResponse.expireTime, //订单有效期
}
// 设置印章
let shopName = funcResponse.officeName;
let shopFilter = this.data.shopConfig.filter(
item => {
return item.name.toLowerCase() == shopName.toLowerCase()
}
)
funcOrderInfo.shopInfo = shopFilter[0]
console.log(shopFilter[0], '-----------shopFilter[0]------');
// 添加订单商品列表
let funcCommodity = funcResponse.smOrderDetails
for (let i = 0, l = funcCommodity.length; i < l; i++) {
let funcCommodityItem = {
'cover': funcCommodity[i].imgUrl,
'name': funcCommodity[i].name, // 名称
'quantity': funcCommodity[i].number, // 数量
'amount': funcCommodity[i].unitPrice, // 总价
'state': Number(funcCommodity[i].status), // 状态
'codeId': funcCommodity[i].volumeId, // 券码
}
funcOrderInfo.commodity.push(funcCommodityItem)
}
// 倒计时
if (funcOrderInfo.state == 0) {
// 待付款状态
let doTime = 15 * 60 * 1000
let timeInter = setInterval(() => {
let creatdTime = new Date(funcOrderInfo.tipTimeSubmit.replace(/-/g, '/')).getTime()
let endTime = creatdTime + doTime
let now = new Date().getTime()
let residueStamp = endTime - now
let residuePayTime = App.modular.miment(residueStamp).format('mm:ss')
if (residueStamp > 0) {
that.setData({
residuePayTime: residuePayTime
})
} else {
console.log(residueStamp, 'residueStamp----------------');
clearInterval(timeInter)
// that.queryOrderDetail()
let state = `orderInfo.state`
that.setData({
[state]: -1
})
}
}, 1000)
}
this.setData({
orderInfo: funcOrderInfo
})
// 判断是否自动展示二维码
// 订单列表 去使用 按钮
if (this.data.isFromUse) {
}
}
})
},
/**
......@@ -208,6 +309,9 @@ Page({
} else if (pageFrom == 'orderDetail') {
//评价详情
url = '/pages/pay/order-detail/order-detail?id=' + that.data.orderInfo.id
} else if (pageFrom == 'activityList') {
//主题活动列表
url = '/pages/mine/appointment/appointment'
} else {
url = '/pages/home/home/home'
}
......
......@@ -11,9 +11,8 @@
<image src="{{item.cover}}"></image>
</view>
</block>
<view class="order-name" wx:if="{{orderInfo.commodity.length === 1}}">
<text>{{orderInfo.name}}</text>
<text>{{orderInfo.commodity[0].name}}</text>
</view>
<view class="order-price-wrapper col align-e">
<view class="order-price">
......@@ -26,7 +25,6 @@
</view>
</view>
</view>
<view class="order-comment-wrapper">
<view class="order-comment-title">
<text>订单评价</text>
......
{
"description": "项目配置文件",
"packOptions": {
"ignore": []
"description": "项目配置文件",
"packOptions": {
"ignore": []
},
"setting": {
"urlCheck": true,
"es6": true,
"enhance": true,
"postcss": true,
"preloadBackgroundData": false,
"minified": true,
"newFeature": true,
"coverView": true,
"nodeModules": true,
"autoAudits": false,
"showShadowRootInWxmlPanel": true,
"scopeDataCheck": false,
"uglifyFileName": false,
"checkInvalidKey": true,
"checkSiteMap": false,
"uploadWithSourceMap": true,
"compileHotReLoad": false,
"useMultiFrameRuntime": false,
"useApiHook": true,
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
},
"setting": {
"urlCheck": true,
"es6": true,
"enhance": true,
"postcss": true,
"preloadBackgroundData": false,
"minified": true,
"newFeature": true,
"coverView": true,
"nodeModules": true,
"autoAudits": false,
"showShadowRootInWxmlPanel": true,
"scopeDataCheck": false,
"uglifyFileName": false,
"checkInvalidKey": true,
"checkSiteMap": false,
"uploadWithSourceMap": true,
"compileHotReLoad": false,
"useMultiFrameRuntime": false,
"useApiHook": true,
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
},
"useIsolateContext": true,
"useCompilerModule": true,
"userConfirmedUseCompilerModuleSwitch": false,
"packNpmManually": false,
"packNpmRelationList": [],
"enableEngineNative": false
"useIsolateContext": true,
"useCompilerModule": true,
"userConfirmedUseCompilerModuleSwitch": false,
"packNpmManually": false,
"packNpmRelationList": [],
"enableEngineNative": false
},
"compileType": "miniprogram",
"libVersion": "2.10.0",
"appid": "wx37a9b7a3d92029f2",
"projectname": "%E4%B8%96%E8%8C%82%E5%B0%8F%E7%A8%8B%E5%BA%8F%E4%BA%8C%E6%9C%9F",
"debugOptions": {
"hidedInDevtools": []
},
"isGameTourist": false,
"simulatorType": "wechat",
"simulatorPluginLibVersion": {},
"condition": {
"search": {
"current": -1,
"list": []
},
"compileType": "miniprogram",
"libVersion": "2.10.0",
"appid": "wx37a9b7a3d92029f2",
"projectname": "%E4%B8%96%E8%8C%82%E5%B0%8F%E7%A8%8B%E5%BA%8F%E4%BA%8C%E6%9C%9F",
"debugOptions": {
"hidedInDevtools": []
"conversation": {
"current": -1,
"list": []
},
"isGameTourist": false,
"simulatorType": "wechat",
"simulatorPluginLibVersion": {},
"condition": {
"search": {
"current": -1,
"list": []
},
"conversation": {
"current": -1,
"list": []
},
"plugin": {
"current": -1,
"list": []
"plugin": {
"current": -1,
"list": []
},
"game": {
"currentL": -1,
"list": []
},
"gamePlugin": {
"current": -1,
"list": []
},
"miniprogram": {
"current": -1,
"list": [
{
"id": -1,
"name": "pages/commodity/menu-food/menu-food",
"pathName": "pages/commodity/menu-food/menu-food",
"query": "",
"scene": null
},
"game": {
"currentL": -1,
"list": []
{
"id": -1,
"name": "pages/play/home/home",
"pathName": "pages/play/home/home",
"query": "",
"scene": null
},
"gamePlugin": {
"current": -1,
"list": []
{
"id": -1,
"name": "pages/play/service-detail/service-detail",
"pathName": "pages/play/service-detail/service-detail",
"query": "id=1&type=4",
"scene": null
},
"miniprogram": {
"current": -1,
"list": [
{
"id": -1,
"name": "pages/commodity/menu-food/menu-food",
"pathName": "pages/commodity/menu-food/menu-food",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/play/home/home",
"pathName": "pages/play/home/home",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/play/service-detail/service-detail",
"pathName": "pages/play/service-detail/service-detail",
"query": "id=1&type=4",
"scene": null
}
]
{
"id": -1,
"name": "pages/mine/home/home",
"pathName": "pages/mine/home/home",
"scene": null
}
]
}
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment