Commit b52c5598 by 严立

我的订单,我的预约问题修改。

parent cfa619c6
...@@ -27,6 +27,8 @@ Page({ ...@@ -27,6 +27,8 @@ Page({
userInfo: {}, userInfo: {},
goodsList: [], goodsList: [],
couponCodeList: [], couponCodeList: [],
couponCodeSelectionIndex: 0,
viewCouponCode: false,
winInstructions: false, winInstructions: false,
}, },
...@@ -89,6 +91,7 @@ Page({ ...@@ -89,6 +91,7 @@ Page({
'viewButton': [], 'viewButton': [],
} }
if (funcOrderInfo.state === 3 && funcOrderInfo.goodsType === -3) funcOrderInfo.state = 6
this.setActivityDetailView(funcOrderInfo) this.setActivityDetailView(funcOrderInfo)
console.log(funcOrderInfo) console.log(funcOrderInfo)
...@@ -116,7 +119,7 @@ Page({ ...@@ -116,7 +119,7 @@ Page({
'couponName': '', 'couponName': '',
'couponNumber': '', 'couponNumber': '',
'couponQrCode': '', 'couponQrCode': '',
'couponState': funcGoodsListBuffer[i].status, 'couponState': Number(funcGoodsListBuffer[i].status),
}) })
} }
...@@ -349,7 +352,7 @@ Page({ ...@@ -349,7 +352,7 @@ Page({
}, },
// 一键扫码 // 一键扫码
onCouponCodeScan: function (event) { onCouponCodeScan: function (funcEvent) {
App.ui.showToast({ iconType: 'loading', title: '加载中' }) App.ui.showToast({ iconType: 'loading', title: '加载中' })
App.request({ App.request({
url: 'v1/order/getVolumesByOrderId', url: 'v1/order/getVolumesByOrderId',
...@@ -375,6 +378,16 @@ Page({ ...@@ -375,6 +378,16 @@ Page({
} }
} }
let funcItem = funcEvent.currentTarget.dataset.item
if (funcItem) {
for (let i = 0, l = funcList.length; i < l; i++ ) {
if (funcItem.couponId === funcList[i].couponId) {
this.setData({ couponCodeSelectionIndex: i })
break
}
}
}
this.setData({ this.setData({
winCouponCode: true, winCouponCode: true,
couponCodeList: funcList couponCodeList: funcList
...@@ -396,51 +409,6 @@ Page({ ...@@ -396,51 +409,6 @@ Page({
}) })
}, },
// 弹出单张二维码
onCouponCode: function (event) {
let funcOrderInfo = event.currentTarget.dataset.item
App.ui.showToast({
'iconType': 'loading',
'title': '加载中',
'duration': 60000
})
App.request({
url: 'v1/volume/getVolume',
params: {
'volumeId': funcOrderInfo.codeId
},
})
.then((response) => {
App.ui.hideToast()
let funcResponse = response.data
let funcCodeInfo = {
'codeNo': funcResponse.serialNumber,
'codeName': funcResponse.name,
'codeBase64': funcResponse.qrcode,
}
this.setData({
codeInfo: funcCodeInfo,
winCode: true,
})
})
},
// 多二维码 复制券码
setClipboard: function (event) {
const code = event.currentTarget.dataset.code
wx.setClipboardData({
data: code,
})
},
// 单个二维码 复制券码
onCodeCopy: function () {
wx.setClipboardData({
data: this.data.codeInfo.codeNo,
})
},
onCodeClose: function () { onCodeClose: function () {
this.setData({ this.setData({
winCode: false, winCode: false,
......
...@@ -259,9 +259,8 @@ ...@@ -259,9 +259,8 @@
<text>{{item.priceTotal}}</text> <text>{{item.priceTotal}}</text>
</view> </view>
</view> </view>
<view class="commodity-item-operation" wx:if="{{item.couponQrCodeId}}"> <view class="commodity-item-operation" wx:if="{{item.couponId}}">
<!-- 状态(0已过期1带使用2已使用) --> <button wx:if="{{item.couponState === 1}}" class="row cc ac" data-item="{{item}}" bindtap="onCouponCodeScan">查看券码</button>
<button wx:if="{{item.couponState === 1}}" class="row cc ac" data-item="{{item}}" bindtap="onCouponCode">查看券码</button>
<button wx:if="{{item.couponState === 0}}" disabled class="row cc ac btn-disabled">已过期</button> <button wx:if="{{item.couponState === 0}}" disabled class="row cc ac btn-disabled">已过期</button>
<button wx:if="{{item.couponState === 2}}" disabled class="row cc ac btn-disabled">已使用</button> <button wx:if="{{item.couponState === 2}}" disabled class="row cc ac btn-disabled">已使用</button>
</view> </view>
......
...@@ -98,11 +98,9 @@ Page({ ...@@ -98,11 +98,9 @@ Page({
'viewStateInvalid': '', 'viewStateInvalid': '',
'viewButton': [], 'viewButton': [],
} }
this.setActivityItemView(funcItem)
console.log(funcItem)
// 俱乐部活动没有评价,直接设置为已评价状态。 // 俱乐部活动没有评价,直接设置为已评价状态。
// if (funcItem.status === 3 && funcItem.belongType === 2) funcItem.status = 6 if (funcItem.orderStatus === 3 && funcItem.belongType === 2) funcItem.orderStatus = 6
this.setActivityItemView(funcItem)
funcList.push(funcItem) funcList.push(funcItem)
} }
...@@ -305,7 +303,7 @@ Page({ ...@@ -305,7 +303,7 @@ Page({
onToActivityDetail: function (funcEvent) { onToActivityDetail: function (funcEvent) {
let funcItem = funcEvent.currentTarget.dataset.item let funcItem = funcEvent.currentTarget.dataset.item
if (funcItem.belongType === 2) { if (funcItem.belongType === -3) {
wx.navigateTo({ url: '/pages/club/home/home' }) wx.navigateTo({ url: '/pages/club/home/home' })
} else { } else {
wx.navigateTo({ url: '/pages/play/activity/activity' }) wx.navigateTo({ url: '/pages/play/activity/activity' })
......
...@@ -434,7 +434,7 @@ Page({ ...@@ -434,7 +434,7 @@ Page({
* @param * @param
* @returns * @returns
*/ */
doCancel: function (event) { doDelete: function (event) {
App.ui.showDialog({ App.ui.showDialog({
type: 'confirm', type: 'confirm',
title: '是否确认删除订单?', title: '是否确认删除订单?',
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<!-- 订单状态选择 --> <!-- 订单状态选择 -->
<view class="order-type-selection column" wx:if="{{winOrderType}}" bindtap="onOrderType"> <view class="order-type-selection column" wx:if="{{winOrderType}}" bindtap="onOrderType">
<view> <view style="{{'margin:' + cssCategoryHeight + 'px 0 0 0;'}}">
<view class="order-type-row row cb ac"> <view class="order-type-row row cb ac">
<block wx:for="{{orderType}}" wx:for-index="index" wx:for-item="item" wx:key="index"> <block wx:for="{{orderType}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view wx:if="{{index < 3}}" class="order-type-item row cc ac {{orderTypeActive === index ? 'order-type-item-active' : ''}}" data-item="{{item}}" data-index="{{index}}" bindtap="onOrderTypeSelection"> <view wx:if="{{index < 3}}" class="order-type-item row cc ac {{orderTypeActive === index ? 'order-type-item-active' : ''}}" data-item="{{item}}" data-index="{{index}}" bindtap="onOrderTypeSelection">
...@@ -93,12 +93,12 @@ ...@@ -93,12 +93,12 @@
</view> </view>
<view class="row ac"> <view class="row ac">
<block wx:for="{{item.viewButton}}" wx:for-item="itemButton" wx:for-index="indexButton" wx:key="indexButton"> <block wx:for="{{item.viewButton}}" wx:for-item="itemButton" wx:for-index="indexButton" wx:key="indexButton">
<button wx:if="{{itemButton.buttonId === 1}}" class="operation-invalid row cc ac" data-item="{{item}}" data-type="0" catchtap="doCancel">取消订单</button> <button wx:if="{{itemButton.buttonId === 1}}" class="operation-invalid row cc ac" data-item="{{item}}" catchtap="doCancel">取消订单</button>
<button wx:if="{{itemButton.buttonId === 2}}" class="operation-tip row cc ac" data-item="{{item}}" catchtap="onOrderPay">去支付</button> <button wx:if="{{itemButton.buttonId === 2}}" class="operation-tip row cc ac" data-item="{{item}}" catchtap="onOrderPay">去支付</button>
<button wx:if="{{itemButton.buttonId === 3}}" class="operation-invalid row cc ac" data-item="{{item}}" catchtap="onOrderRefund">申请退款</button> <button wx:if="{{itemButton.buttonId === 3}}" class="operation-invalid row cc ac" data-item="{{item}}" catchtap="onOrderRefund">申请退款</button>
<button wx:if="{{itemButton.buttonId === 4}}" class="operation-tip row cc ac" data-item="{{item}}" catchtap="onOrderUse">去使用</button> <button wx:if="{{itemButton.buttonId === 4}}" class="operation-tip row cc ac" data-item="{{item}}" catchtap="onOrderUse">去使用</button>
<button wx:if="{{itemButton.buttonId === 5}}" class="operation-tip row cc ac" data-item="{{item}}" catchtap="onOrderEvaluate">去评价</button> <button wx:if="{{itemButton.buttonId === 5}}" class="operation-tip row cc ac" data-item="{{item}}" catchtap="onOrderEvaluate">去评价</button>
<button wx:if="{{itemButton.buttonId === 6}}" class="operation-invalid row cc ac" data-item="{{item}}" data-type="1" catchtap="doCancel">删除订单</button> <button wx:if="{{itemButton.buttonId === 6}}" class="operation-invalid row cc ac" data-item="{{item}}" catchtap="doDelete">删除订单</button>
<button wx:if="{{itemButton.buttonId === 7}}" class="operation-tip row cc ac" data-item="{{item}}" catchtap="onOrderAgain">再次订单</button> <button wx:if="{{itemButton.buttonId === 7}}" class="operation-tip row cc ac" data-item="{{item}}" catchtap="onOrderAgain">再次订单</button>
</block> </block>
</view> </view>
......
/* 订单分类 */ /* 订单分类 */
.order-category { .order-category {
z-index: 5; z-index: 6;
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
...@@ -37,9 +37,9 @@ ...@@ -37,9 +37,9 @@
/* 订单类型选择 */ /* 订单类型选择 */
.order-type-selection { .order-type-selection {
z-index: 6; z-index: 5;
position: fixed; position: fixed;
top: 176rpx; top: 0;
left: 0; left: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
......
...@@ -96,7 +96,6 @@ Page({ ...@@ -96,7 +96,6 @@ Page({
}, },
onLoad: function (options) { onLoad: function (options) {
console.log(options)
if (options.type) options.type = Number(options.type) if (options.type) options.type = Number(options.type)
logicData.option = options logicData.option = options
...@@ -347,7 +346,6 @@ Page({ ...@@ -347,7 +346,6 @@ Page({
funcPriceUnit = funcShoppingCart[i].priceFinal funcPriceUnit = funcShoppingCart[i].priceFinal
if (funcShoppingCart[i].isActive) funcPayAmount = funcPayAmount + funcShoppingCart[i].priceUnit * funcShoppingCart[i].quantity if (funcShoppingCart[i].isActive) funcPayAmount = funcPayAmount + funcShoppingCart[i].priceUnit * funcShoppingCart[i].quantity
console.log(funcPayAmount)
} }
this.setData({ this.setData({
...@@ -399,7 +397,6 @@ Page({ ...@@ -399,7 +397,6 @@ Page({
* @returns * @returns
*/ */
setEntryTime: function (funcEntryId) { setEntryTime: function (funcEntryId) {
console.log(funcEntryId)
let funcItem = wx.getStorageSync('shoppingCartBuffer')[0] let funcItem = wx.getStorageSync('shoppingCartBuffer')[0]
App.request({ App.request({
url: 'v1/activity/getEnrollView', url: 'v1/activity/getEnrollView',
...@@ -482,17 +479,18 @@ Page({ ...@@ -482,17 +479,18 @@ Page({
let funcTimeBegin = '' let funcTimeBegin = ''
let funcTimeEnd = '' let funcTimeEnd = ''
console.log('funcTimetable') console.log('funcEntryId', funcEntryId)
console.log(funcTimetable)
for (let i = 0, l = funcTimetable.length; i < l; i++) { for (let i = 0, l = funcTimetable.length; i < l; i++) {
if (funcEntryId === funcTimetable[i].id) { if (funcEntryId === funcTimetable[i].id) {
console.log('funcTimetable[i]', funcTimetable[i])
funcDateBegin = App.modular.miment(funcTimetable[i].beginTime).format('MM月DD日') funcDateBegin = App.modular.miment(funcTimetable[i].beginTime).format('MM月DD日')
funcTimeBegin = App.modular.miment(funcTimetable[i].beginTime).format('hh:mm') funcTimeBegin = App.modular.miment(funcTimetable[i].beginTime).format('hh:mm')
funcTimeEnd = App.modular.miment(funcTimetable[i].endTime).format('hh:mm') funcTimeEnd = App.modular.miment(funcTimetable[i].endTime).format('hh:mm')
this.setData({ this.setData({
quantityTipNumber: funcTimetable[i].residue, quantityTipNumber: funcTimetable[i].residue,
buyContentTime: funcDateBegin + ' ' + funcTimeBegin + ' - ' + funcTimeEnd buyContentTime: funcDateBegin + ' ' + funcTimeBegin + ' - ' + funcTimeEnd,
quantityMax: funcTimetable[i].residue < 3 ? funcTimetable[i].residue : 3,
}) })
break break
} }
...@@ -754,6 +752,9 @@ Page({ ...@@ -754,6 +752,9 @@ Page({
* @returns * @returns
*/ */
onQuantityAdd: function () { onQuantityAdd: function () {
console.log('this.data.quantity', this.data.quantity)
console.log('this.data.quantityMin', this.data.quantityMin)
// 购买数量最大为 20 // 购买数量最大为 20
if (this.data.quantity >= this.data.quantityMax) { if (this.data.quantity >= this.data.quantityMax) {
// 针对不同商品类型订制提示语 // 针对不同商品类型订制提示语
...@@ -994,7 +995,6 @@ Page({ ...@@ -994,7 +995,6 @@ Page({
this.queryPayStatus(pagePayId) this.queryPayStatus(pagePayId)
}) })
.catch((response) => { .catch((response) => {
console.log(response)
if (/商品不存在/.test(response.message)) { if (/商品不存在/.test(response.message)) {
wx.setStorageSync('shoppingCartBuffer', []) wx.setStorageSync('shoppingCartBuffer', [])
App.ui.showToast({ App.ui.showToast({
......
...@@ -27,7 +27,6 @@ Page({ ...@@ -27,7 +27,6 @@ Page({
// 选择标签页日期 // 选择标签页日期
onSelectionStatus: function (event) { onSelectionStatus: function (event) {
console.log(event.currentTarget.dataset.type)
this.setData({ this.setData({
statusActive: Number(event.currentTarget.dataset.type) statusActive: Number(event.currentTarget.dataset.type)
}) })
...@@ -53,7 +52,6 @@ Page({ ...@@ -53,7 +52,6 @@ Page({
}) })
.then((response) => { .then((response) => {
let movieInfo = response.data let movieInfo = response.data
console.log(movieInfo)
let showList = {} let showList = {}
let statusList = [] let statusList = []
let day = 2 let day = 2
...@@ -65,7 +63,6 @@ Page({ ...@@ -65,7 +63,6 @@ Page({
} }
timeList = timeList.sort((a, b) => a-b ) timeList = timeList.sort((a, b) => a-b )
timeList = timeList.map(v => App.modular.miment(v).format('YYYY-MM-DD')) timeList = timeList.map(v => App.modular.miment(v).format('YYYY-MM-DD'))
// console.log(timeList)
timeList.forEach(key => { timeList.forEach(key => {
let tempItem = {} let tempItem = {}
if (key === App.modular.miment().format('YYYY-MM-DD') && movieInfo.today.length > 0) { if (key === App.modular.miment().format('YYYY-MM-DD') && movieInfo.today.length > 0) {
...@@ -96,11 +93,9 @@ Page({ ...@@ -96,11 +93,9 @@ Page({
} }
}) })
movieInfo.priceSpecialText = App.modular.utils.formatAmount(movieInfo.ownerPrice), // 业主价文本格式 movieInfo.priceSpecialText = App.modular.utils.formatAmount(movieInfo.ownerPrice)
movieInfo.priceText = App.modular.utils.formatAmount(movieInfo.visitorPrice), movieInfo.priceText = App.modular.utils.formatAmount(movieInfo.visitorPrice)
movieInfo.tags = movieInfo.tags movieInfo.tags = movieInfo.tags.split(' ')
let funcUserType = wx.getStorageSync('userInfo').userType let funcUserType = wx.getStorageSync('userInfo').userType
// 根据后台判断价格显示类型 // 根据后台判断价格显示类型
...@@ -157,8 +152,6 @@ Page({ ...@@ -157,8 +152,6 @@ Page({
funcMovieInfo.priceType = 3 funcMovieInfo.priceType = 3
} }
} }
console.log(funcMovieInfo)
wx.setStorageSync('shoppingCartBuffer', [funcMovieInfo]) wx.setStorageSync('shoppingCartBuffer', [funcMovieInfo])
wx.navigateTo({ wx.navigateTo({
url: '/pages/pay/order-input/order-input?type=7', url: '/pages/pay/order-input/order-input?type=7',
......
...@@ -72,7 +72,6 @@ Page({ ...@@ -72,7 +72,6 @@ Page({
this.setData({ this.setData({
allHitMovie: funcAllHitMovie allHitMovie: funcAllHitMovie
}) })
console.log(this.data.allHitMovie)
}, },
/** /**
...@@ -130,8 +129,6 @@ Page({ ...@@ -130,8 +129,6 @@ Page({
let funcData = response.data.list let funcData = response.data.list
let funcList = this.movieDataFormat(funcData) let funcList = this.movieDataFormat(funcData)
App.ui.hideToast() App.ui.hideToast()
console.log('queryMovieThisWeek')
console.log(JSON.stringify(funcList))
let funcAllHitMovie = this.data.allHitMovie let funcAllHitMovie = this.data.allHitMovie
funcAllHitMovie[0].list = funcList funcAllHitMovie[0].list = funcList
...@@ -158,8 +155,6 @@ Page({ ...@@ -158,8 +155,6 @@ Page({
}).then((response) => { }).then((response) => {
let funcData = response.data.list let funcData = response.data.list
let funcList = this.movieDataFormat(funcData) let funcList = this.movieDataFormat(funcData)
console.log('queryMovieNextWeek')
console.log(JSON.stringify(funcList))
let funcAllHitMovie = this.data.allHitMovie let funcAllHitMovie = this.data.allHitMovie
funcAllHitMovie[1].list = funcList funcAllHitMovie[1].list = funcList
this.setData({ this.setData({
...@@ -185,8 +180,6 @@ Page({ ...@@ -185,8 +180,6 @@ Page({
}).then((response) => { }).then((response) => {
let funcData = response.data.list let funcData = response.data.list
let funcList = this.movieDataFormat(funcData) let funcList = this.movieDataFormat(funcData)
console.log('queryMovieSpecial')
console.log(JSON.stringify(funcList))
let funcAllHitMovie = this.data.allHitMovie let funcAllHitMovie = this.data.allHitMovie
for (let i = 0, l = funcList.length; i < l; i++) { for (let i = 0, l = funcList.length; i < l; i++) {
if (funcList[i].tagId.includes('110')) funcAllHitMovie[2].list.push(funcList[i]) if (funcList[i].tagId.includes('110')) funcAllHitMovie[2].list.push(funcList[i])
......
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