Commit 773fab64 by 严立

LL - 儿童营地评价

parent b44f534b
Showing with 1459 additions and 1201 deletions
...@@ -56,6 +56,7 @@ App({ ...@@ -56,6 +56,7 @@ App({
}).then((response) => { }).then((response) => {
let funcData = response.data let funcData = response.data
this.globalData.appStatus = Boolean(Number(funcData[0].value)) this.globalData.appStatus = Boolean(Number(funcData[0].value))
console.log(this.globalData.appStatus)
}).catch(() => {}) }).catch(() => {})
}, },
......
{ {
"pages": [ "pages": [
"pages/home/home/home", "pages/home/home/home",
"pages/home/guide/guide", "pages/home/guide/guide",
"pages/home/history/history", "pages/home/history/history",
...@@ -60,9 +58,11 @@ ...@@ -60,9 +58,11 @@
"pages/mall/exchange-state/exchange-state", "pages/mall/exchange-state/exchange-state",
"pages/mall/exchange-record/exchange-record", "pages/mall/exchange-record/exchange-record",
"pages/mall/exchange-submit/exchange-submit", "pages/mall/exchange-submit/exchange-submit",
"pages/login/login" "pages/login/login",
"pages/campsite/evaluate/evaluate"
], ],
"usingComponents": { "usingComponents": {
"coupon-code": "/component/coupon-code/coupon-code",
"m-button-bottom": "./component/m-button-bottom/m-button-bottom", "m-button-bottom": "./component/m-button-bottom/m-button-bottom",
"m-checkbox": "./component/m-checkbox/m-checkbox", "m-checkbox": "./component/m-checkbox/m-checkbox",
"m-dialog": "./component/m-dialog/m-dialog", "m-dialog": "./component/m-dialog/m-dialog",
...@@ -79,7 +79,6 @@ ...@@ -79,7 +79,6 @@
"l-collapse": "./miniprogram_npm/lin-ui/collapse/index", "l-collapse": "./miniprogram_npm/lin-ui/collapse/index",
"l-collapse-item": "./miniprogram_npm/lin-ui/collapse-item/index", "l-collapse-item": "./miniprogram_npm/lin-ui/collapse-item/index",
"l-textarea": "./miniprogram_npm/lin-ui/textarea/index", "l-textarea": "./miniprogram_npm/lin-ui/textarea/index",
"l-popup": "./miniprogram_npm/lin-ui/popup/index",
"l-image-picker": "./miniprogram_npm/lin-ui/image-picker/index" "l-image-picker": "./miniprogram_npm/lin-ui/image-picker/index"
}, },
"window": { "window": {
......
Component({
options: {
styleIsolation: 'apply-shared'
},
properties: {
couponCodeSelectionIndex: {
type: Number,
value: 0,
},
couponCodeList: {
type: Array,
value: []
},
unit: {
type: String,
value: '件'
},
viewCouponCode: {
type: Boolean,
value: false,
}
},
data: {
usableCouponCodeTotal: 0,
couponCodeActiveIndex: 1,
},
observers: {
'couponCodeList': function (funcValue) {
if (!this.inspectCouponCodeItemFormat()) return
this.setTitle()
},
'couponCodeSelectionIndex': function (funcValue) {
this.setData({ couponCodeActiveIndex: funcValue + 1 })
},
},
methods: {
inspectCouponCodeItemFormat: function () {
let funcCouponCodeFormat = {
'couponId': '',
'couponName': '',
'couponNumber': '',
'couponQrCode': '',
'couponState': '',
}
let funcCouponCodeKeys = Object.keys(funcCouponCodeFormat)
let funcCouponCodeList = this.data.couponCodeList
for (let i = 0, l = funcCouponCodeList.length; i < l; i++) {
let funcItemKeys = Object.keys(funcCouponCodeList[i])
for (let ii = 0, ll = funcCouponCodeKeys.length; ii < ll; ii++) {
if (!funcItemKeys.includes(funcCouponCodeKeys[ii])) {
console.error('[coupon-code] properties "couponCodeList" item format should be ' + JSON.stringify(funcCouponCodeFormat))
this.setData({
couponCodeList: []
})
return false
}
}
}
return true
},
setTitle: function () {
let funcCouponCodeList = this.data.couponCodeList
let funcUsableCouponCodeTotal = 0
for (let i = 0, l = funcCouponCodeList.length; i < l; i++) {
if (funcCouponCodeList[i].state !== 2) funcUsableCouponCodeTotal++
}
funcUsableCouponCodeTotal === 0 ? funcUsableCouponCodeTotal = '无' : funcUsableCouponCodeTotal = funcUsableCouponCodeTotal + this.data.unit
this.setData({ usableCouponCodeTotal: funcUsableCouponCodeTotal })
},
onCouponCodeClose: function () {
this.setData({ viewCouponCode: false, })
},
/**
* 复制兑换券码
* @function
* @param
* @returns
*/
onCouponCodeCopy: function () {
wx.setClipboardData({
data: this.data.couponCodeList[this.data.couponCodeSelectionIndex].couponNumber,
})
},
eventIndexChange: function (funcEvent) {
let funcIndex = funcEvent.detail.current
this.setData({
couponCodeActiveIndex: funcIndex + 1
})
},
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<view class="coupon_code_container column cc ac" hidden="{{!viewCouponCode}}">
<text class="font_normal_30 color_submit">{{usableCouponCodeTotal + '商品可用'}}</text>
<text class="coupon_code_tip font_normal_26 color_submit">{{'请将券码出示给门店核销人员'}}</text>
<swiper class="coupon_code_swiper" current="{{couponCodeSelectionIndex}}" bindchange="eventIndexChange">
<swiper-item class="coupon_code_item row cc" wx:for="{{couponCodeList}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="coupon_code_info col cc ac">
<!-- 无效券码蒙尘样式 -->
<view class="coupon_code_mask" wx:if="{{item.couponState === 2}}"></view>
<image mode="aspectFill" class="coupon_code_seal" wx:if="{{item.couponState === 2}}" src="./image/seal-used.png"></image>
<text class="font_normal_30 color_regular">{{item.couponName}}</text>
<image class="coupon_code_content" src="{{'data:image/png;base64,' + item.couponQrCode}}"></image>
<view class="coupon_code_operation row con-b ac">
<block wx:if="{{item.couponState === 1}}">
<text class="font_bold_26 color_secondary">券码</text>
<text class="font_bold_30 color_regular">{{item.couponNumber}}</text>
<text class="font_bold_26 color_primary" bindtap="onCouponCodeCopy">复制</text>
</block>
<block wx:if="{{item.couponState === 2}}">
<text class="font_bold_26 color_secondary">券码</text>
<text class="font_bold_30 color_secondary text_decoration_delete" wx:if="{{item.couponState === 2}}">{{item.couponNumber}}</text>
<text class="font_bold_26 color_primary" space="nbsp">  </text>
</block>
</view>
</view>
</swiper-item>
</swiper>
<view class="coupon_code_indicator row ac">
<text class="font_normal_34 color_submit">{{couponCodeActiveIndex}}</text>
<text class="font_normal_26 color_secondary" space="nbsp"> / </text>
<text class="font_normal_26 color_secondary">{{couponCodeList.length}}</text>
</view>
<image class="coupon_code_close" src="./image/close.png" bindtap="onCouponCodeClose"></image>
</view>
\ No newline at end of file
/* 券码弹窗 */
.coupon_code_container {
z-index: 7;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, .65);
}
.coupon_code_tip {
margin: 28rpx 0 0 0;
}
.coupon_code_swiper {
width: 750rpx;
height: 730rpx;
margin: 0 0 16rpx 0;
}
.coupon_code_item {
left: 88rpx;
width: 574rpx !important;
height: 666rpx;
}
.coupon_code_info {
position: relative;
width: 526rpx;
height: 666rpx;
margin: 56rpx 0 48rpx 0;
border-radius: 2px;
background: #FFFFFF;
}
.coupon_code_mask {
position: absolute;
top: 154rpx;
left: 116rpx;
width: 296rpx;
height: 296rpx;
background: rgba(255, 255, 255, .8);
}
.coupon_code_seal {
position: absolute;
top: 252rpx;
right: -68rpx;
width: 254rpx;
height: 254rpx;
}
.coupon_code_content {
width: 296rpx;
height: 296rpx;
margin: 56rpx 0 0 0;
}
.coupon_code_operation {
width: 446rpx;
height: 96rpx;
margin: 56rpx 0 0 0;
padding: 0 24rpx;
border-radius: 2px;
background: #F2F3F5;
}
.coupon_code_indicator {
margin: 24rpx 0 0 0;
}
.coupon_code_indicator > text:nth-child(3) {
margin: 2rpx 0 0 0;
}
.coupon_code_close {
width: 80rpx;
height: 80rpx;
margin: 32rpx 0 0 0;
}
\ No newline at end of file
...@@ -30,7 +30,7 @@ let Development = { ...@@ -30,7 +30,7 @@ let Development = {
{ appId: 5, id: '26c40446fc454a02abe61758176597f6', logo: 'shop/logo-5.png', commodityLogo: 'shop/commodity-logo-5.png', cover: 'shop/cover-5.png', printUse: 'shop/print/print-5-1.png', print: 'shop/print/print-5-2.png', name: '拾光花坊', title: ['拾光花坊', '拾光花坊', '拾光花坊', '拾光花坊', '拾光花坊', '拾光花坊', '拾光花坊'] }, { appId: 5, id: '26c40446fc454a02abe61758176597f6', logo: 'shop/logo-5.png', commodityLogo: 'shop/commodity-logo-5.png', cover: 'shop/cover-5.png', printUse: 'shop/print/print-5-1.png', print: 'shop/print/print-5-2.png', name: '拾光花坊', title: ['拾光花坊', '拾光花坊', '拾光花坊', '拾光花坊', '拾光花坊', '拾光花坊', '拾光花坊'] },
{ appId: 6, id: 'd9436d7018de43809824b6ec221ea01f', logo: 'shop/logo-6.png', commodityLogo: 'shop/commodity-logo-6.png', cover: 'shop/cover-6.png', printUse: 'shop/print/print-6-1.png', print: 'shop/print/print-6-2.png', name: '原味舒食', title: ['原味舒食', '原味舒食', '原味舒食', '原味舒食', '原味舒食', '原味舒食', '原味舒食'] }, { appId: 6, id: 'd9436d7018de43809824b6ec221ea01f', logo: 'shop/logo-6.png', commodityLogo: 'shop/commodity-logo-6.png', cover: 'shop/cover-6.png', printUse: 'shop/print/print-6-1.png', print: 'shop/print/print-6-2.png', name: '原味舒食', title: ['原味舒食', '原味舒食', '原味舒食', '原味舒食', '原味舒食', '原味舒食', '原味舒食'] },
{ appId: 7, id: '2614f117406548718bc091f24368c16e', logo: 'shop/logo-7.png', commodityLogo: 'shop/commodity-logo-7.png', cover: 'shop/cover-7.png', printUse: 'shop/print/print-7-1.png', print: 'shop/print/print-7-2.png', name: '元养水韵SPA', title: ['元养水韵SPA', '元养水韵SPA', '元养水韵SPA', '元养水韵SPA', '元养水韵SPA', '元养水韵SPA', '元养水韵SPA'] }, { appId: 7, id: '2614f117406548718bc091f24368c16e', logo: 'shop/logo-7.png', commodityLogo: 'shop/commodity-logo-7.png', cover: 'shop/cover-7.png', printUse: 'shop/print/print-7-1.png', print: 'shop/print/print-7-2.png', name: '元养水韵SPA', title: ['元养水韵SPA', '元养水韵SPA', '元养水韵SPA', '元养水韵SPA', '元养水韵SPA', '元养水韵SPA', '元养水韵SPA'] },
{ appId: 8, id: '2614f117406548718bc091f24368c16e', logo: 'shop/logo-7.png', commodityLogo: 'shop/commodity-logo-7.png', cover: 'shop/cover-7.png', printUse: 'shop/print/print-8-1.png', print: 'shop/print/print-8-2.png', name: '星光广场', title: ['星光广场', '星光广场', '星光广场', '星光广场', '星光广场', '星光广场', '星光广场'] }, { appId: 8, id: '2614f117406548718bc091f24368c16e', logo: 'shop/logo-7.png', commodityLogo: 'shop/commodity-logo-7.png', cover: 'shop/cover-7.png', printUse: 'shop/print/print-8-1.png', print: 'shop/print/print-8-2.png', name: '星光广场', title: ['星光广场', '星光广场', '星光广场', '星光广场', '星光广场', '星光广场', '星光广场'] },
] ]
} }
......

157 Bytes | W: | H:

113 Bytes | W: | H:

image/icon/add-1.png
image/icon/add-1.png
image/icon/add-1.png
image/icon/add-1.png
  • 2-up
  • Swipe
  • Onion skin

1.46 KB | W: | H:

113 Bytes | W: | H:

image/icon/add-2.png
image/icon/add-2.png
image/icon/add-2.png
image/icon/add-2.png
  • 2-up
  • Swipe
  • Onion skin

603 Bytes | W: | H:

520 Bytes | W: | H:

image/icon/album-1.png
image/icon/album-1.png
image/icon/album-1.png
image/icon/album-1.png
  • 2-up
  • Swipe
  • Onion skin

1.09 KB | W: | H:

573 Bytes | W: | H:

image/icon/album-2.png
image/icon/album-2.png
image/icon/album-2.png
image/icon/album-2.png
  • 2-up
  • Swipe
  • Onion skin

1.9 KB | W: | H:

273 Bytes | W: | H:

image/icon/arrow-b-1.png
image/icon/arrow-b-1.png
image/icon/arrow-b-1.png
image/icon/arrow-b-1.png
  • 2-up
  • Swipe
  • Onion skin

2.27 KB | W: | H:

282 Bytes | W: | H:

image/icon/arrow-b-2.png
image/icon/arrow-b-2.png
image/icon/arrow-b-2.png
image/icon/arrow-b-2.png
  • 2-up
  • Swipe
  • Onion skin

2.11 KB | W: | H:

287 Bytes | W: | H:

image/icon/arrow-b-3.png
image/icon/arrow-b-3.png
image/icon/arrow-b-3.png
image/icon/arrow-b-3.png
  • 2-up
  • Swipe
  • Onion skin

257 Bytes | W: | H:

216 Bytes | W: | H:

image/icon/arrow-l-1.png
image/icon/arrow-l-1.png
image/icon/arrow-l-1.png
image/icon/arrow-l-1.png
  • 2-up
  • Swipe
  • Onion skin

1.83 KB | W: | H:

218 Bytes | W: | H:

image/icon/arrow-l-2.png
image/icon/arrow-l-2.png
image/icon/arrow-l-2.png
image/icon/arrow-l-2.png
  • 2-up
  • Swipe
  • Onion skin

2.1 KB | W: | H:

222 Bytes | W: | H:

image/icon/arrow-r-1.png
image/icon/arrow-r-1.png
image/icon/arrow-r-1.png
image/icon/arrow-r-1.png
  • 2-up
  • Swipe
  • Onion skin

6.03 KB | W: | H:

1.47 KB | W: | H:

image/icon/cart-4.png
image/icon/cart-4.png
image/icon/cart-4.png
image/icon/cart-4.png
  • 2-up
  • Swipe
  • Onion skin

382 Bytes | W: | H:

359 Bytes | W: | H:

image/icon/clock-1.png
image/icon/clock-1.png
image/icon/clock-1.png
image/icon/clock-1.png
  • 2-up
  • Swipe
  • Onion skin

377 Bytes | W: | H:

352 Bytes | W: | H:

image/icon/clock-2.png
image/icon/clock-2.png
image/icon/clock-2.png
image/icon/clock-2.png
  • 2-up
  • Swipe
  • Onion skin

382 Bytes | W: | H:

359 Bytes | W: | H:

image/icon/clock-3.png
image/icon/clock-3.png
image/icon/clock-3.png
image/icon/clock-3.png
  • 2-up
  • Swipe
  • Onion skin

500 Bytes | W: | H:

221 Bytes | W: | H:

image/icon/close-1.png
image/icon/close-1.png
image/icon/close-1.png
image/icon/close-1.png
  • 2-up
  • Swipe
  • Onion skin

136 Bytes | W: | H:

107 Bytes | W: | H:

image/icon/cut-1.png
image/icon/cut-1.png
image/icon/cut-1.png
image/icon/cut-1.png
  • 2-up
  • Swipe
  • Onion skin

1.43 KB | W: | H:

107 Bytes | W: | H:

image/icon/cut-2.png
image/icon/cut-2.png
image/icon/cut-2.png
image/icon/cut-2.png
  • 2-up
  • Swipe
  • Onion skin

1.83 KB | W: | H:

317 Bytes | W: | H:

image/icon/edit-1.png
image/icon/edit-1.png
image/icon/edit-1.png
image/icon/edit-1.png
  • 2-up
  • Swipe
  • Onion skin

669 Bytes | W: | H:

309 Bytes | W: | H:

image/icon/edit-4.png
image/icon/edit-4.png
image/icon/edit-4.png
image/icon/edit-4.png
  • 2-up
  • Swipe
  • Onion skin

398 Bytes | W: | H:

363 Bytes | W: | H:

image/icon/evaluate-1.png
image/icon/evaluate-1.png
image/icon/evaluate-1.png
image/icon/evaluate-1.png
  • 2-up
  • Swipe
  • Onion skin
let App = getApp()
Page({
data: {
officeService: 0,
officeServiceText: '5.0', // 门店服务评分
officeProduct: 0,
officeProductText: '5.0', // 门店产品评分
officeEnvironmental: 0,
officeEnvironmentalText: '5.0', // 门店环境评分
detailEvaluate: [],
},
onLoad: function (options) {
this.getOfficeAppraise()
this.getAppraise()
},
// 查询门店评分
getOfficeAppraise: function() {
let that = this
let officeId = wx.getStorageSync('shopInfoBuffer').id
App.wxRequest({
url: 'v1/appraise/getOfficeAppraise',
data: {
'officeId': '8a3e59c57f564c569b3d7bb278ea50b3'
},
success: function(response) {
let funcData = response.data
that.setData({
officeServiceText: funcData.serviceEvaluation.toFixed(1),
officeProductText: funcData.productEvaluatio.toFixed(1),
officeEnvironmentalText: funcData.environmentalEvaluation.toFixed(1),
})
}
})
},
/**
* 查询评论列表
* @function
* @param
* @returns
*/
getAppraise: function () {
App.wxRequest({
url: 'v1/appraise/getList',
data: {
'pageNo': '1',
'pageSize': '-1',
'officeId': '8a3e59c57f564c569b3d7bb278ea50b3'
},
success: (response) => {
let funcResponse = response.data
let funcList = []
for (let i = 0, l = funcResponse.list.length; i < l; i++) {
let funcItem = {
'star': 4,
'scoreService': funcResponse.list[i].serviceEvaluation, // 服务评价
'scoreCommodity': funcResponse.list[i].productEvaluation, // 商品评价
'scoreEnvironmental': funcResponse.list[i].environmentalEvaluation, // 环境评价
'userName': funcResponse.list[i].nickname,
'userAvatar': funcResponse.list[i].headImg,
'userType': funcResponse.list[i].userType,
'userAlbum': funcResponse.list[i].imgUrls, // 评论图册
'date': funcResponse.list[i].createDate,
'content': funcResponse.list[i].content,
'isMore': false,
'isDetail': false,
}
// 没有评论也没有图片,使用默认文本。
if (funcItem.content === '' && funcItem.userAlbum.length === 0) {
funcItem.content = '此用户没有填写评价。'
}
funcItem.star = Math.floor((funcItem.scoreService + funcItem.scoreCommodity + funcItem.scoreEnvironmental) / 3)
funcList.push(funcItem)
}
this.setData({
detailEvaluate: funcList
})
const funcQuery = wx.createSelectorQuery()
funcQuery.selectAll('.evaluate-item-content-mark').boundingClientRect()
funcQuery.exec((response) => {
let funcContentHeight = 88 * wx.getStorageSync('unitProportion')
let funcEvaluate = this.data.detailEvaluate
let funcTextHeight = response[0]
for (let i = 0, l = funcTextHeight.length; i < l; i++) {
if (funcContentHeight < funcTextHeight[i].height) {
funcEvaluate[i].isMore = true
}
}
this.setData({
detailEvaluate: funcEvaluate
})
})
}
})
},
/**
* 页面滚动事件
* @function
* @param {object} - funcEvent
* @returns
*/
onPageScroll: function (funcEvent) {
App.pageScroll(funcEvent, this)
},
})
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
<m-nav titleText="全部评价" scrollHeight="{{navScroll}}"></m-nav>
<view class="evaluate">
<view class="evaluate-option row con-b align-c">
<view class="evaluate-option-item row align-c">
<image src="{{imageBase + 'icon/evaluate-1.png'}}"></image>
<text>服务</text>
<text>{{officeServiceText}}</text>
<text>分</text>
</view>
<view class="evaluate-option-item row align-c">
<image src="{{imageBase + 'icon/shop-1.png'}}"></image>
<text>产品</text>
<text>{{officeProductText}}</text>
<text>分</text>
</view>
<view class="evaluate-option-item row align-c">
<image src="{{imageBase + 'icon/album-1.png'}}"></image>
<text>环境</text>
<text>{{officeEnvironmentalText}}</text>
<text>分</text>
</view>
</view>
<view class="evaluate-list col">
<block wx:for="{{detailEvaluate}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="evaluate-item col">
<view class="row">
<image class="evaluate-item-avatar" src="{{item.userAvatar}}" mode="widthFix"></image>
<view class="evaluate-item-info">
<view class="evaluate-item-info-text row align-c">
<text>{{item.userName}}</text>
<text>业主</text>
<text>{{item.date}}</text>
</view>
<view class="evaluate-item-info-star row align-c">
<block wx:for="{{item.star}}" wx:for-index="indexStar" wx:for-item="itemStar" wx:key="indexStar">
<image src="{{imageBase + 'icon/star-1.png'}}" data-item="{{item}}"></image>
</block>
</view>
</view>
</view>
<!-- 评论 -->
<view class="{{!item.isDetail ? 'evaluate-item-content' : 'evaluate-item-content-whole'}}" hidden="{{!item.content}}">
<text class="evaluate-item-content-mark">{{item.content}}</text>
</view>
<view wx:if="{{!item.isDetail && item.isMore && item.content}}" class="evaluate-item-content-more row ac" data-item="{{item}}" data-index="{{index}}" bindtap="onEvaluateMore">
<text>全文</text>
</view>
<view class="evaluate-item-album" wx:if="{{item.userAlbum.length}}">
<block wx:for="{{item.userAlbum}}" wx:for-index="indexAlbum" wx:for-item="itemAlbum" wx:key="indexAlbum">
<image wx:if="{{indexAlbum < 4}}" src="{{itemAlbum}}" data-index="{{indexAlbum}}" data-item="{{item}}" bindtap="onEvaluateAlbum"></image>
</block>
<view wx:if="{{item.userAlbum.length > 4}}" class="evaluate-item-album-more row con-c align-c" data-index="{{3}}" data-item="{{item}}" bindtap="onEvaluateAlbum">
<text>{{'+' + (item.userAlbum.length - 4)}}</text>
</view>
</view>
</view>
</block>
</view>
</view>
\ No newline at end of file
.evaluate {
padding-bottom: 160rpx;
}
.evaluate-option {
width: 750rpx;
margin: 62rpx 0 16rpx 0;
padding: 0 40rpx;
}
.evaluate-option-item image {
width: 40rpx;
height: 40rpx;
margin-right: 16rpx;
}
.evaluate-option-item text:nth-child(2) {
width: 44rpx;
height: 32rpx;
margin-right: 8rpx;
font-size: 22rpx;
font-weight: 400;
line-height: 32rpx;
color: #959da9;
}
.evaluate-option-item text:nth-child(3) {
height: 40rpx;
font-size: 26rpx;
font-weight: 500;
line-height: 40rpx;
color: #15191f;
}
.evaluate-option-item text:nth-child(4) {
height: 40rpx;
font-size: 20rpx;
font-weight: 500;
line-height: 40rpx;
color: #15191f;
}
/* 评论详情 */
.evaluate-item {
position: relative;
width: 670rpx;
min-height: 204rpx;
margin: 48rpx 40rpx 0 40rpx;
border-bottom: 1px solid #e2e7ef;
}
.evaluate-item:last-child {
border-bottom: none;
}
.evaluate-item-avatar {
width: 80rpx;
height: 80rpx;
margin-right: 16rpx;
border-radius: 50%;
background: #999;
}
.evaluate-item-info-text {
width: 574rpx;
}
.evaluate-item-info-text text:nth-child(1) {
max-width: 340rpx;
height: 44rpx;
margin-right: 12rpx;
font-size: 30rpx;
font-weight: 400;
line-height: 44rpx;
color: #15191f;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.evaluate-item-info-text text:nth-child(2) {
width: 60rpx;
height: 32rpx;
border-radius: 4rpx;
background: linear-gradient(180deg, #3f4357 0%, #252532 100%);
text-align: center;
font-size: 18rpx;
font-weight: 500;
line-height: 32rpx;
color: #e8d0af;
}
.evaluate-item-info-text text:nth-child(3) {
flex-grow: 1;
height: 32rpx;
text-align: right;
font-size: 22rpx;
font-weight: 400;
line-height: 32rpx;
color: #959da9;
}
.evaluate-item-info-star {
margin-top: 8rpx;
}
.evaluate-item-info-star image {
width: 28rpx;
height: 28rpx;
margin-right: 4rpx;
}
.evaluate-item-content {
display: -webkit-box;
position: relative;
width: 670rpx;
max-height: 132rpx;
margin-top: 32rpx;
font-size: 26rpx;
font-weight: 400;
line-height: 44rpx;
color: #15191f;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
overflow: hidden;
}
.evaluate-item-content-whole {
position: relative;
width: 670rpx;
min-height: 132rpx;
margin-top: 32rpx;
font-size: 26rpx;
font-weight: 400;
line-height: 44rpx;
color: #15191f;
}
.evaluate-item-content-more {
height: 44rpx;
margin-top: 8rpx;
font-size: 26rpx;
font-weight: 400;
line-height: 32rpx;
}
.evaluate-item-content-more-movie {
position: absolute;
bottom: 0;
right: 18rpx;
width: 106rpx;
height: 26rpx;
background: #1c1c25;
text-align: right;
font-size: 26rpx;
font-weight: 400;
line-height: 26rpx;
}
.evaluate-item-content-more text {
color: #86c5e1;
}
.evaluate-item-album {
position: relative;
display: flex;
flex-wrap: wrap;
flex-direction: row;
justify-content: flex-start;
margin: 32rpx 0 48rpx 0;
border-bottom: 1px #e2e7ef solid;
}
.evaluate-item-album:last-child {
border: none;
}
.evaluate-item-album image {
width: 160rpx;
height: 160rpx;
margin: 0 10rpx 10rpx 0;
border-radius: 4rpx;
background: #999;
}
.evaluate-item-album image:nth-child(4n) {
margin-right: 0;
}
.evaluate-item-album-more {
position: absolute;
right: 0;
width: 160rpx;
height: 160rpx;
margin: 0 5rpx 10rpx 0;
border-radius: 4rpx;
background: rgba(0, 0, 0, 0.4);
}
.evaluate-item-album-more text {
height: 53rpx;
font-size: 38rpx;
font-weight: 400;
line-height: 52rpx;
color: #fff;
}
\ No newline at end of file
...@@ -2,36 +2,25 @@ let App = getApp() ...@@ -2,36 +2,25 @@ let App = getApp()
Page({ Page({
data: { data: {
appStatus: App.globalData.appStatus, appStatus: false,
imageBase: App.globalData.appImageBase,
appResourcesBase: App.globalData.appResourcesBase,
showPopup: false, showPopup: false,
winSide: true, winSide: true,
sideHeight: 1250, sideHeight: 1250,
shareImage: App.globalData.appResourcesBase + 'share/share-1.png', shareImage: App.globalData.appResourcesBase + 'share/share-1.png',
childActivity: [], childActivity: [],
bannerImage: App.globalData.appResourcesBase + 'campsite/campsite-header.png', bannerImage: App.globalData.appResourcesBase + 'campsite/campsite-header.png',
bottomImage: App.globalData.appResourcesBase + 'campsite/bottom.png',
detailImage: [], campsiteDescribe: [],
detailImageUrl: [
App.globalData.appResourcesBase + 'campsite/campsite-1.png',
App.globalData.appResourcesBase + 'campsite/campsite-2.png',
App.globalData.appResourcesBase + 'campsite/campsite-3.png',
App.globalData.appResourcesBase + 'campsite/campsite-4.png',
App.globalData.appResourcesBase + 'campsite/campsite-5.png',
App.globalData.appResourcesBase + 'campsite/campsite-6.png',
],
detailIndex: 0,
}, },
onLoad: function (options) { onLoad: function (options) {
this.setSideHeight() this.setSideHeight()
this.setData({ appStatus: App.globalData.appStatus })
console.log(App.globalData.appStatus)
}, },
onShow: function () { onShow: function () {
this.setData({ appStatus: App.globalData.appStatus })
this.setShopInfo(3, 1) this.setShopInfo(3, 1)
this.queryDetail() this.queryCampsiteDescribe()
this.queryActivity() this.queryActivity()
}, },
...@@ -60,19 +49,22 @@ Page({ ...@@ -60,19 +49,22 @@ Page({
} }
} }
}, },
// 获取后台信息 // 获取后台信息
queryDetail: function () { queryCampsiteDescribe: function () {
let that = this App.request({
App.wxRequest({
url: 'v1/park/getList', url: 'v1/park/getList',
success: function(res) { }).then((response) => {
let funcData = res.list.filter(v => v.name === '儿童营地') let funcData = response.data
that.setData({ for (let i = 0, l = funcData.length; i < l; i++) {
detailImageUrl: funcData[0].content if (funcData[i].name === '儿童营地') {
}) this.setData({ campsiteDescribe: funcData[i].content })
break
}
} }
}) })
}, },
// 获取活动信息 // 获取活动信息
queryActivity: function () { queryActivity: function () {
let that = this let that = this
...@@ -93,6 +85,11 @@ Page({ ...@@ -93,6 +85,11 @@ Page({
} }
}) })
}, },
onEvaluateMore: function () {
wx.navigateTo({ url: '/pages/campsite/evaluate/evaluate' })
},
onBackTop: function () { onBackTop: function () {
wx.pageScrollTo({ wx.pageScrollTo({
scrollTop: 0 scrollTop: 0
......
<m-toast></m-toast> <m-toast></m-toast>
<m-nav titleText="营地" scrollHeight="{{navScroll}}" styleIndex="{{9}}" isOccupy="{{false}}"></m-nav> <m-nav titleText="营地" scrollHeight="{{navScroll}}" styleIndex="{{9}}" isOccupy="{{false}}"></m-nav>
<view class="container"> <view class="container">
<view class="appointment-side col con-b align-c" hidden="{{winSide}}"> <image class="title" src="{{resourcesBase + 'campsite/bgi.png'}}"></image>
<button class="appointment-side-top" bindtap="onBackTop">
<image src="{{imageBase + 'top.png'}}"></image>
</button>
</view>
<!-- 头部背景图 -->
<image class="banner" src="{{bannerImage}}"></image>
<!-- 分享按钮 --> <!-- 开放时间,总合评价,分享,位置 -->
<view class="share col con-c align-c" bindtap="onShare"> <view class="other">
<image class="icon-share" src="/image/icon/share-3.png"></image> <view class="other_business_hours row ac">
</view> <image class="other_business_hours_title" src="./image/business-hours-title.png"></image>
<!-- 分享弹出图片 --> <image class="other_business_hours_time" src="./image/business-hours.png"></image>
<view class="container-share row con-c align-c" hidden="{{!showPopup}}"> </view>
<view class="col con-c"> <view class="row cb ac">
<view class="share-content"> <view class="other_evaluate row ac">
<image src="{{shareImage}}"></image> <image class="other_evaluate_title" src="./image/evaluate-title.png"></image>
<block wx:for="{{5}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<image class="other_evaluate_start" src="{{imageBase + 'icon/star-1.png'}}"></image>
</block>
<image class="other_evaluate_more" src="./image/evaluate.png" bindtap="onEvaluateMore"></image>
</view> </view>
<view class="share-operation row con-b align-c"> <view class="row ac">
<button bindtap="onCancel">取消</button> <view class="share column cc ac" bindtap="onShare">
<button bindtap="onDownload">下载图片</button> <image class="icon-share" src="/image/icon/share-3.png"></image>
</view>
<view class="location column cc ac" bindtap="onLocation">
<image class="icon-location" src="/image/icon/location-3.png"></image>
</view>
</view> </view>
</view> </view>
</view> </view>
<!-- 位置按钮 -->
<view class="location col con-c align-c" bindtap="onLocation">
<image class="icon-location" src="/image/icon/location-3.png"></image>
</view>
<!-- 入园购票 --> <!-- 入园购票 -->
<view class="buy-coupon" bindtap="onBuyMembership" data-id="{{3}}"> <view class="buy-coupon" bindtap="onBuyMembership" data-id="{{3}}">
<view class="buy-coupon-title row align-c"> <view class="buy-coupon-title row ac">
<image src="./image/ruyuangoupiao.png"></image> <image src="./image/ruyuangoupiao.png"></image>
<image src="{{imageBase + 'icon/arrow-r-1.png'}}"></image> <image src="{{imageBase + 'icon/arrow-r-1.png'}}"></image>
</view> </view>
<view class="buy-coupon-type row con-b"> <view class="buy-coupon-type row cb">
<image src="./image/single.png"></image> <image src="./image/single.png"></image>
<image src="./image/month.png"></image> <image src="./image/month.png"></image>
<image src="./image/year.png"></image> <image src="./image/year.png"></image>
</view> </view>
</view> </view>
<block wx:if="{{appStatus}}"> <!-- 餐品预定,文创周边 -->
<!-- 饮品预订 文创周边--> <view class="buy-other row cb" wx:if="{{appStatus}}">
<view class="buy-other row con-b"> <image src="./image/shop-food.png" data-id="{{3}}" bindtap="onBuySnacks"></image>
<!-- 饮品预订 --> <image src="./image/shop-art.png" data-id="{{3}}" bindtap="onBuyArt"></image>
<view class="buy-snacks row" bindtap="onBuySnacks" data-id="{{3}}"> </view>
<view class="buy-left col con-c">
<image src="./image/yinpinyuding.png"></image> <!-- 活动展示 -->
</view> <view class="all_activity" bindtap="onActivityAll">
<view class="buy-right col con-c"> <image class="all_activity_title" src="{{resourcesBase + 'campsite/all-activities.png'}}"></image>
<image src="./image/icon-bg.png"></image>
<image class="snacks-img" src="./image/yinpin.png"></image> <!-- 单活动 -->
</view> <view class="swiper" wx:if="{{childActivity.length === 1}}">
</view> <image mode="scaleToFill" src="{{childActivity[0].childImg}}" bindtap="onActivityDetail" data-id="{{childActivity[0].id}}"></image>
<!-- 文创周边 -->
<view class="buy-art row" bindtap="onBuyArt" data-id="{{3}}">
<view class="buy-left col con-c">
<image src="./image/wenchuangzhoubian.png"></image>
</view>
<view class="buy-right col con-c">
<image src="./image/icon-bg.png"></image>
<image class="art-img" src="./image/shanzi.png"></image>
</view>
</view>
</view> </view>
</block> <!-- 多活动 -->
<swiper class="swiper" indicator-dots indicator-color="#F6DADA" indicator-active-color="#E57C99" autoplay circular wx:if="{{childActivity.length > 1}}">
<block wx:for="{{childActivity}}" wx:key="id">
<swiper-item>
<image mode="scaleToFill" src="{{item.cover}}" bindtap="onActivityDetail" data-id="{{item.id}}"></image>
</swiper-item>
</block>
</swiper>
<!-- 全部活动 --> <view class="all_activity_nothing">
<view class="activity" bindtap="onActivityAll"> <image src="{{resourcesBase + 'campsite/all-activities-nothing.png'}}"></image>
<image src="{{appResourcesBase + 'campsite/title.png'}}"></image> </view>
</view> </view>
<!-- 滚动图片 --> <!-- 详情展示 -->
<!-- 无活动 --> <view class="describe">
<view class="activity-empty" wx:if="{{childActivity.length === 0}}"> <block wx:for="{{campsiteDescribe}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<block> <image mode="widthFix" src="{{item}}"></image>
<image src="{{appResourcesBase + 'campsite/empty.png'}}"></image>
</block> </block>
</view> </view>
<!-- 单活动 --> </view>
<view class="swiper" wx:if="{{childActivity.length === 1}}">
<image mode="scaleToFill" src="{{childActivity[0].childImg}}" bindtap="onActivityDetail" data-id="{{childActivity[0].id}}"></image>
</view>
<!-- 多活动 -->
<swiper class="swiper" indicator-dots indicator-color="#F6DADA" indicator-active-color="#E57C99" autoplay circular wx:if="{{childActivity.length > 1}}">
<block wx:for="{{childActivity}}" wx:key="id">
<swiper-item>
<image mode="scaleToFill" src="{{item.cover}}" bindtap="onActivityDetail" data-id="{{item.id}}"></image>
</swiper-item>
</block>
</swiper>
<!-- 分享弹出图片 -->
<view class="container-share row cc ac" hidden="{{!showPopup}}">
<view class="column cc">
<view class="share-content">
<image src="{{shareImage}}"></image>
</view>
<view class="share-operation row cb ac">
<button bindtap="onCancel">取消</button>
<button bindtap="onDownload">下载图片</button>
</view>
</view>
</view>
<block wx:for="{{detailImageUrl}}" wx:for-index="index" wx:for-item="item" wx:key="index"> <!-- 侧边返回顶部 -->
<image mode="widthFix" src="{{item}}"></image> <view class="appointment-side column cb ac" hidden="{{winSide}}">
</block> <button class="appointment-side-top" bindtap="onBackTop">
<image src="{{imageBase + 'top.png'}}"></image>
<image mode="widthFix" src="{{bottomImage}}"></image> </button>
</view> </view>
\ No newline at end of file
.title {
position: absolute;
top: 0;
left: 0;
width: 750rpx;
height: 1460rpx;
}
/* 开放时间,总合评价,分享,位置 */
.other {
z-index: 4;
width: 750rpx;
margin: 728rpx 0 0 0;
padding: 0 40rpx;
}
.other_business_hours {
margin: 0 0 16rpx 0;
}
.other_business_hours_title {
width: 120rpx;
height: 34rpx;
margin: 0 24rpx 0 0;
}
.other_business_hours_time {
width: 188rpx;
height: 30rpx;
}
.other_evaluate_title {
width: 122rpx;
height: 34rpx;
margin: 0 24rpx 0 0;
}
.other_evaluate_start {
display: inline-block;
width: 32rpx;
height: 32rpx;
}
.other_evaluate_more {
width: 76rpx;
height: 34rpx;
margin: 0 0 0 8rpx;
}
.appointment { .appointment {
position: absolute; position: absolute;
top: 1250rpx; top: 1250rpx;
...@@ -52,26 +101,16 @@ ...@@ -52,26 +101,16 @@
width: 750rpx; width: 750rpx;
} }
.banner {
width: 750rpx;
height: 1676rpx;
}
.share { .share {
position: absolute;
top: 710rpx;
right: 136rpx;
width: 64rpx; width: 64rpx;
height: 64rpx; height: 64rpx;
margin: 0 32rpx 0 0;
background: #F28FA2; background: #F28FA2;
box-shadow: 8rpx 8rpx 20rpx 0rpx rgba(242,143,162,0.3); box-shadow: 8rpx 8rpx 20rpx 0rpx rgba(242,143,162,0.3);
border-radius: 50%; border-radius: 50%;
} }
.location { .location {
position: absolute;
top: 710rpx;
right: 40rpx;
width: 64rpx; width: 64rpx;
height: 64rpx; height: 64rpx;
background: #F28FA2; background: #F28FA2;
...@@ -85,10 +124,10 @@ ...@@ -85,10 +124,10 @@
} }
.buy-coupon { .buy-coupon {
position: absolute; z-index: 2;
top: 804rpx;
width: 670rpx; width: 670rpx;
height: 312rpx; height: 312rpx;
margin: 32rpx 0 0 0;
padding: 40rpx 32rpx; padding: 40rpx 32rpx;
background: rgba(255, 255, 255, 0.85); background: rgba(255, 255, 255, 0.85);
box-shadow: 8rpx 10rpx 52rpx 0rpx rgba(238,211,153,0.3); box-shadow: 8rpx 10rpx 52rpx 0rpx rgba(238,211,153,0.3);
...@@ -115,12 +154,12 @@ ...@@ -115,12 +154,12 @@
} }
.buy-other { .buy-other {
position: absolute; z-index: 4;
top: 1140rpx;
width: 670rpx; width: 670rpx;
margin: 24rpx 0 96rpx 0;
} }
.buy-snacks, .buy-art { .buy-other > image {
width: 322rpx; width: 322rpx;
height: 154rpx; height: 154rpx;
background: rgba(255, 255, 255, 0.65); background: rgba(255, 255, 255, 0.65);
...@@ -128,50 +167,14 @@ ...@@ -128,50 +167,14 @@
border-radius: 4px; border-radius: 4px;
} }
.buy-left, .buy-right { .all_activity_title {
position: relative; display: block;
margin-left: 32rpx;
}
.buy-left image{
width: 120rpx;
height: 34rpx;
}
.buy-right image:first-child {
width: 132rpx;
height: 136rpx;
}
.snacks-img {
position: absolute;
top: 38rpx;
left: 42rpx;
width: 50rpx;
height: 76rpx;
}
.art-img {
position: absolute;
top: 42rpx;
left: 12rpx;
width: 86rpx;
height: 70rpx;
}
.activity {
position: absolute;
top: 1602rpx;
}
.activity image{
width: 160rpx;
height: 34rpx;
}
.activity-empty {
width: 750rpx; width: 750rpx;
height: 544rpx; height: 250rpx;
} }
.activity-empty image {
.all_activity_nothing > image {
display: block;
width: 750rpx; width: 750rpx;
height: 544rpx; height: 544rpx;
} }
...@@ -192,6 +195,7 @@ ...@@ -192,6 +195,7 @@
left: 0; left: 0;
right: 0; right: 0;
} }
.wx-swiper-dots.wx-swiper-dots-horizontal{ .wx-swiper-dots.wx-swiper-dots-horizontal{
margin-bottom: 64rpx; margin-bottom: 64rpx;
} }
...@@ -242,15 +246,7 @@ ...@@ -242,15 +246,7 @@
color: #FFFFFF; color: #FFFFFF;
} }
.toast { .describe > image {
width: 262rpx; display: block;
height: 262rpx; width: 750rpx;
border-radius: 4px;
box-shadow: 0px 0px 68px 0px rgba(0,0,0,0.16);
background: #1F252E;
}
.toast-icon {
width: 88rpx !important;
height: 88rpx !important;
} }
\ No newline at end of file
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
<!-- 原野mojito --> <!-- 原野mojito -->
<swiper-item> <swiper-item>
<view class="shop-banner row con-c"> <view class="shop-banner row con-c">
<image src="{{resourcesBase + 'commodity/home/shop-3.png'}}"></image> <image src="{{resourcesBase + 'commodity/home/shop-2.png'}}"></image>
<button class="row con-c align-c" data-id="{{4}}" bindtap="onBuyFood"></button> <button class="row con-c align-c" data-id="{{4}}" bindtap="onBuyFood"></button>
</view> </view>
<view class="shop-menu"> <view class="shop-menu">
......
...@@ -449,10 +449,8 @@ Page({ ...@@ -449,10 +449,8 @@ Page({
* @param * @param
* @returns * @returns
*/ */
onCommodityClose: function () { onGoodsDetailClose: function () {
this.setData({ this.setData({ winCommodityDetail: false })
winCommodityDetail: false
})
}, },
/** /**
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
<text>{{itemCommodity.priceDiscountText}}</text> <text>{{itemCommodity.priceDiscountText}}</text>
<text class="item-price-discount">活动价</text> <text class="item-price-discount">活动价</text>
</view> </view>
<view class="item-info-old-price row align-c"> <view class="item-info-old-price row ac">
<text>¥</text> <text>¥</text>
<text>{{itemCommodity.priceText}}</text> <text>{{itemCommodity.priceText}}</text>
</view> </view>
...@@ -48,12 +48,12 @@ ...@@ -48,12 +48,12 @@
<!-- 业主价样式 --> <!-- 业主价样式 -->
<view wx:if="{{itemCommodity.priceType === 2}}"> <view wx:if="{{itemCommodity.priceType === 2}}">
<view class="item-price row align-c"> <view class="item-price row ac">
<text>¥</text> <text>¥</text>
<text>{{itemCommodity.priceSpecialText}}</text> <text>{{itemCommodity.priceSpecialText}}</text>
<text class="item-price-special">业主价</text> <text class="item-price-special">业主价</text>
</view> </view>
<view class="item-info-old-price row align-c"> <view class="item-info-old-price row ac">
<text>¥</text> <text>¥</text>
<text>{{itemCommodity.priceText}}</text> <text>{{itemCommodity.priceText}}</text>
</view> </view>
...@@ -61,14 +61,14 @@ ...@@ -61,14 +61,14 @@
<!-- 普通价样式 --> <!-- 普通价样式 -->
<view wx:if="{{itemCommodity.priceType === 3}}"> <view wx:if="{{itemCommodity.priceType === 3}}">
<view class="item-price row align-c"> <view class="item-price row ac">
<text>¥</text> <text>¥</text>
<text>{{itemCommodity.priceText}}</text> <text>{{itemCommodity.priceText}}</text>
<text></text> <text></text>
</view> </view>
</view> </view>
<view class="item-operation-add row con-c align-c"> <view class="item-operation-add row cc ac">
<image mode="aspectFill" src="{{imageBase + 'icon/cart-3.png'}}" data-item="{{itemCommodity}}" catchtap="onCommodityAdd"></image> <image mode="aspectFill" src="{{imageBase + 'icon/cart-3.png'}}" data-item="{{itemCommodity}}" catchtap="onCommodityAdd"></image>
</view> </view>
</view> </view>
...@@ -78,17 +78,17 @@ ...@@ -78,17 +78,17 @@
</block> </block>
<block wx:if="{{commodityList.length === 0}}"> <block wx:if="{{commodityList.length === 0}}">
<view class="nothing-tip row con-c align-c"> <view class="nothing-tip row cc ac">
<image src="./image/tip.png"></image> <image src="./image/tip.png"></image>
</view> </view>
</block> </block>
<!-- 购物车按钮 --> <!-- 购物车按钮 -->
<view id="cart" class="cart row con-c align-c" bindtap="onShoppingCart"> <view id="cart" class="cart row cc ac" bindtap="onShoppingCart">
<!-- 添加动画圆点 --> <!-- 添加动画圆点 -->
<!-- <view class="cart-animation" wx:if="{{winAnimationPoint}}" animation="{{animationData}}"></view> --> <!-- <view class="cart-animation" wx:if="{{winAnimationPoint}}" animation="{{animationData}}"></view> -->
<view class="cart-num row con-c align-c">{{shoppingCartTotal}}</view> <view class="cart-num row cc ac">{{shoppingCartTotal}}</view>
<view class="cart-img-wrap"> <view class="cart-img-wrap">
<image src="../../../image/cart.png" mode="widthFix"></image> <image src="../../../image/cart.png" mode="widthFix"></image>
</view> </view>
...@@ -97,9 +97,9 @@ ...@@ -97,9 +97,9 @@
</view> </view>
<!-- 商品详情弹窗 --> <!-- 商品详情弹窗 -->
<l-popup l-class="popup-mask" show="{{winCommodityDetail}}" content-align="center" locked="{{true}}"> <view class="goods_detail_container column cc ac" hidden="{{!winCommodityDetail}}">
<view class="popup-wrap"> <view class="goods_detail">
<view id="banner" class="banner"> <view class="banner">
<swiper autoplay circular indicator-dots="{{commodityDetail.banner.length > 1 ? true : false}}" indicator-active-color="#fff" indicator-color="rgba(255, 255, 255, .4)" class="banner-swiper" interval="5000" duration="500"> <swiper autoplay circular indicator-dots="{{commodityDetail.banner.length > 1 ? true : false}}" indicator-active-color="#fff" indicator-color="rgba(255, 255, 255, .4)" class="banner-swiper" interval="5000" duration="500">
<block wx:for="{{commodityDetail.banner}}" wx:for-index="index" wx:for-item="item" wx:key="index"> <block wx:for="{{commodityDetail.banner}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<swiper-item class="banner-swiper-item"> <swiper-item class="banner-swiper-item">
...@@ -126,8 +126,8 @@ ...@@ -126,8 +126,8 @@
<view class="popup-footer-wrapper"> <view class="popup-footer-wrapper">
<!-- 活动价样式 --> <!-- 活动价样式 -->
<view class="popup-price-row row align-c" wx:if="{{commodityDetail.priceType === 1}}"> <view class="popup-price-row row ac" wx:if="{{commodityDetail.priceType === 1}}">
<view class="detail-price-discount row con-c align-c"> <view class="detail-price-discount row cc ac">
<text>活动价</text> <text>活动价</text>
</view> </view>
<view class="detail-price"> <view class="detail-price">
...@@ -141,8 +141,8 @@ ...@@ -141,8 +141,8 @@
</view> </view>
<!-- 业主价样式 --> <!-- 业主价样式 -->
<view class="popup-price-row row align-c" wx:if="{{commodityDetail.priceType === 2}}"> <view class="popup-price-row row ac" wx:if="{{commodityDetail.priceType === 2}}">
<view class="detail-price-special row con-c align-c"> <view class="detail-price-special row cc ac">
<text>业主价</text> <text>业主价</text>
</view> </view>
<view class="detail-price"> <view class="detail-price">
...@@ -156,8 +156,8 @@ ...@@ -156,8 +156,8 @@
</view> </view>
<!-- 普通价样式 --> <!-- 普通价样式 -->
<view class="popup-price-row row align-c" wx:if="{{commodityDetail.priceType === 3}}"> <view class="popup-price-row row ac" wx:if="{{commodityDetail.priceType === 3}}">
<view class="popup-price-special row con-c align-c"> <view class="popup-price-special row cc ac">
<text></text> <text></text>
</view> </view>
<view class="detail-price"> <view class="detail-price">
...@@ -166,12 +166,10 @@ ...@@ -166,12 +166,10 @@
</view> </view>
</view> </view>
<view class="popup-footer-btn row con-c align-c" bindtap="onCommodityAdd">加入购物车</view> <view class="popup-footer-btn row cc ac" bindtap="onCommodityAdd">加入购物车</view>
</view> </view>
</view> </view>
<view class="popup-close-btn row con-c align-c" bindtap="onCommodityClose"> <view class="goods_detail_close row cc ac" bindtap="onGoodsDetailClose">
<view class="popup-close"> <image mode="widthFix" src="{{imageBase + 'icon/close-1.png'}}"></image>
<image mode="widthFix" src="../../../image/icon_close.png"></image>
</view>
</view> </view>
</l-popup> </view>
\ No newline at end of file \ No newline at end of file
...@@ -214,12 +214,17 @@ page { ...@@ -214,12 +214,17 @@ page {
margin-bottom: 32rpx; margin-bottom: 32rpx;
} }
.popup-mask { .goods_detail_container {
z-index: 11111 !important; z-index: 7;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.65); background: rgba(0, 0, 0, 0.65);
} }
.popup-wrap { .goods_detail {
width: 606rpx; width: 606rpx;
margin-top: 100rpx; margin-top: 100rpx;
background-color: #fff; background-color: #fff;
...@@ -326,16 +331,15 @@ page { ...@@ -326,16 +331,15 @@ page {
border-radius: 4rpx; border-radius: 4rpx;
} }
.popup-close-btn { .goods_detail_close {
width: 80rpx; width: 80rpx;
height: 80rpx; height: 80rpx;
margin: 48rpx auto 0; margin: 48rpx 0 0 0;
background: rgba(254, 252, 249, 0.5);
border-radius: 50%; border-radius: 50%;
background: rgba(254, 252, 249, 0.5);
} }
.popup-close, .goods_detail_close > image {
.popup-close > image {
width: 40rpx; width: 40rpx;
height: 40rpx; height: 40rpx;
} }
......
...@@ -18,57 +18,8 @@ Page({ ...@@ -18,57 +18,8 @@ Page({
allChecked: false, allChecked: false,
isFoodCart: true, isFoodCart: true,
isEnough: false, cart: [],
cart: [{ notEnough: []
goods_id: 0,
goods_name: '雪碧迷你瓶装300ml',
goods_now_price: 49.00,
goods_old_price: 42.00,
goods_now_text: '业主价',
goods_num: 1,
store_num: 1,
checked: true,
img: './image/item01.png'
},
{
goods_id: 1,
goods_name: '可口可乐300ml',
goods_now_price: 52.00,
goods_old_price: 49.00,
goods_now_text: '活动价',
goods_num: 1,
store_num: 2,
checked: true,
img: './image/item01.png'
},
{
goods_id: 2,
goods_name: '葡萄汁饮料238ml',
goods_now_price: 30.00,
goods_num: 2,
checked: true,
img: './image/item01.png'
},
{
goods_id: 3,
goods_name: '牛奶苏打碳酸250ml',
goods_now_price: 78,
goods_num: 12,
checked: false,
img: './image/item01.png'
}
],
notEnough: [{
id: 0,
img: './image/item01.png',
title: '葱爆牛肉佐秘制麻椒汁'
},
{
id: 1,
img: './image/item01.png',
title: '抹茶酸奶芝士'
}
]
}, },
onLoad: function () { onLoad: function () {
...@@ -315,11 +266,6 @@ Page({ ...@@ -315,11 +266,6 @@ Page({
return return
} }
// let isEnough = true
// this.setData({
// isEnough
// })
// 在此之前需要校验用户是否登录,以及商品库存是否充足 // 在此之前需要校验用户是否登录,以及商品库存是否充足
wx.navigateTo({ wx.navigateTo({
url: '/pages/pay/order-input/order-input?type=' + this.data.shopInfo.shopType url: '/pages/pay/order-input/order-input?type=' + this.data.shopInfo.shopType
...@@ -331,12 +277,7 @@ Page({ ...@@ -331,12 +277,7 @@ Page({
let cart = this.data.cart let cart = this.data.cart
cart.forEach(v => v.checked = allChecked) cart.forEach(v => v.checked = allChecked)
}, },
handleBackCart() {
let isEnough = false
this.setData({
isEnough
})
},
onToBuy: function () { onToBuy: function () {
wx.navigateBack({ wx.navigateBack({
delta: 1, delta: 1,
......
...@@ -90,7 +90,6 @@ ...@@ -90,7 +90,6 @@
<text>全选</text> <text>全选</text>
</view> </view>
<view class="pay-amount"> <view class="pay-amount">
<view class="pay-amount-total"> <view class="pay-amount-total">
<text>¥</text> <text>¥</text>
...@@ -101,26 +100,6 @@ ...@@ -101,26 +100,6 @@
</view> </view>
</view> </view>
<view class="order-pay-wrap row con-c align-c" bindtap="onPaySubmit">结算</view> <view class="order-pay-wrap row con-c align-c" bindtap="onPaySubmit">结算</view>
<!-- 库存提示弹窗 -->
<l-popup show="{{isEnough}}" content-align="center" locked="{{true}}">
<view class="popup-wrap">
<view class="popup-title">抱歉,您本单商品有2件库存不足</view>
<view class="popup-list">
<view class="popup-item row align-c" wx:for="{{notEnough}}" wx:key="id">
<view class="popup-item-img">
<image mode="widthFix" src="{{item.img}}"></image>
</view>
<view class="popup-item-title">{{item.title}}</view>
</view>
</view>
<view class="popup-back-cart row con-c align-c" bindtap="handleBackCart">返回购物车</view>
</view>
<view class="popup-close-btn row con-c align-c" bindtap="handleClosePopup">
<view class="popup-close">
<image mode="widthFix" src="../../../image/icon_close.png"></image>
</view>
</view>
</l-popup>
</view> </view>
</view> </view>
......
...@@ -250,51 +250,6 @@ ...@@ -250,51 +250,6 @@
color: #fff; color: #fff;
} }
.popup-wrap {
width: 606rpx;
height: 690rpx;
padding: 0 40rpx;
background-color: #fff;
border-radius: 4rpx;
}
.popup-title {
padding: 56rpx 0;
font-size: 34rpx;
font-weight: 600;
color: #15191f;
text-align: center;
border-bottom: 1px solid #e2e7ef;
}
.popup-list {
padding: 26rpx 0;
}
.popup-item {
padding: 32rpx 0;
}
.popup-item-img {
width: 96rpx;
height: 96rpx;
}
.popup-item-title {
margin-left: 32rpx;
font-size: 30rpx;
color: #15191f;
}
.popup-back-cart {
width: 526rpx;
height: 80rpx;
margin-top: 32rpx;
font-size: 30rpx;
color: #fff;
background-color: #86c5e1;
}
.empty { .empty {
height: 100vh; height: 100vh;
} }
......
...@@ -186,7 +186,7 @@ ...@@ -186,7 +186,7 @@
<view class="dialog_coupon_code_info col cc ac"> <view class="dialog_coupon_code_info col cc ac">
<!-- 无效券码蒙尘样式 --> <!-- 无效券码蒙尘样式 -->
<view class="dialog_coupon_code_mask" wx:if="{{item.state === 2}}"></view> <view class="dialog_coupon_code_mask" wx:if="{{item.state === 2}}"></view>
<image mode="aspectFill" class="dialog_coupon_code_seal" wx:if="{{item.state === 2}}" src="{{resourcesBase + 'mine/server/codeUsed.png'}}"></image> <image mode="aspectFill" class="dialog_coupon_code_seal" wx:if="{{item.state === 2}}" src="./image/seal-used.png"></image>
<text class="font_normal_30 color_regular">{{item.name}}</text> <text class="font_normal_30 color_regular">{{item.name}}</text>
<image class="dialog_coupon_code_content" src="{{'data:image/png;base64,' + item.codeBase64}}"></image> <image class="dialog_coupon_code_content" src="{{'data:image/png;base64,' + item.codeBase64}}"></image>
......
...@@ -4,13 +4,13 @@ Page({ ...@@ -4,13 +4,13 @@ Page({
data: { data: {
options: {}, options: {},
isDoing: false, isDoing: false,
showNotice: false, instructions: false,
swiperCurrent: 0, swiperCurrent: 0,
showCodePopup: false, showCodePopup: false,
shopInfo: {},
orderType: 1, // 1 - 年卡/月卡,2 - 次票, 3 - SPA, 4 - 文创, 5 - 餐品, 6 - 活动, 7 - 观影 orderType: 1, // 1 - 年卡/月卡,2 - 次票, 3 - SPA, 4 - 文创, 5 - 餐品, 6 - 活动, 7 - 观影
orderInfo: {},
fromPage: '', fromPage: '',
codeInfo: {}, codeInfo: {},
...@@ -20,31 +20,151 @@ Page({ ...@@ -20,31 +20,151 @@ Page({
codeList: [], codeList: [],
sealSrc: '',
shopConfig: App.globalData.shopId,
shopAppId: "", shopAppId: "",
activityId: '', activityId: '',
shopInfo: {},
orderInfo: {},
codeInfo: {},
userInfo: {},
goodsList: [],
couponCodeList: [],
winInstructions: false,
}, },
onLoad: function (options) { onLoad: function (options) {
let funcOrderInfo = this.data.orderInfo
funcOrderInfo.id = options.id
this.setData({ this.setData({
options: options, options: options,
activityId: options.activityId, activityId: options.activityId,
shopInfo: wx.getStorageSync('shopInfoBuffer'), orderInfo: { 'id': options.id },
orderInfo: funcOrderInfo,
shopAppId: options.shopAppId, shopAppId: options.shopAppId,
fromPage: options.fromPage === 'order' ? 'order' : '', fromPage: options.fromPage === 'order' ? 'order' : '',
isFromUse: options.showCode === 'true' ? true : false, isFromUse: options.showCode === 'true' ? true : false,
}) })
this.queryOrderDetail() this.queryOrderDetail()
}, },
/**
* 订单详情
* @function
* @param
* @returns
*/
queryOrderDetail: function () {
App.request({
url: 'v1/order/getOrderDetail',
params: {
'orderId': this.data.orderInfo.id
}
}).then((response) => {
let funcResponse = response.data
let funcShopInfo = {
'id': funcResponse.officeId,
'name': funcResponse.officeName,
'logo': '',
'seal': '',
'businessHours': funcResponse.businessTime,
}
let funcShopInfoBuffer = App.getShopInfo(funcShopInfo.id)
funcShopInfo.logo = funcShopInfoBuffer.logo
funcShopInfo.seal = funcShopInfoBuffer.print
let funcUserInfo = {
'id': '',
'name': funcResponse.name,
'phone': funcResponse.mobilePhone,
}
let funcOrderInfo = {
'id': this.data.orderInfo.id,
'state': Number(funcResponse.status),
'goodsType': Number(funcResponse.goodType),
'number': funcResponse.orderSerialNumber,
'payTime': funcResponse.paymentTime ? App.modular.miment(funcResponse.paymentTime).format('YYYY-MM-DD hh:mm:ss') : '',
'payAmount': funcResponse.totalMoney,
'submitTime': funcResponse.createDate,
'integral': funcResponse.integral,
'instructions': funcResponse.particulars,
'expireTime': funcResponse.expireTime.replace(/-/g, '.').replace('~', '-'), //订单有效期
// 'wxRequest': funcResponse.wxRequest,
}
// 电影
if (funcOrderInfo.goodsType === -2 && funcOrderInfo.expireTime) {
let funcDate = funcOrderInfo.expireTime.match(/[0-9]+\.[0-9]+\.[0-9]+/)[0]
let funcTime = funcOrderInfo.expireTime.match(/[0-9]+:[0-9]+/g)
// miment npm 包在 ios 下必须传 yyyy-mm-dd hh:mm:ss 格式,否则无法转换。
funcDate = funcDate.replace(/\./g, '-')
funcOrderInfo.expireTime = App.modular.miment(funcDate).format('MM月DD日') + ' ' + funcTime[0] + ' - ' + funcTime[1]
}
let funcGoodsList = []
let funcGoodsListBuffer = funcResponse.smOrderDetails
for (let i = 0, l = funcGoodsListBuffer.length; i < l; i++) {
funcGoodsList.push({
'price': funcGoodsListBuffer[i].unitPrice,
'cover': funcGoodsListBuffer[i].imgUrl,
'quantity': funcGoodsListBuffer[i].number,
'priceTotal': funcGoodsListBuffer[i].totalPrices,
'name': funcGoodsListBuffer[i].name,
'couponId': funcGoodsListBuffer[i].volumeId,
'couponName': '',
'couponNumber': '',
'couponQrCode': '',
'couponState': funcGoodsListBuffer[i].status,
})
}
this.setData({
orderInfo: funcOrderInfo,
shopInfo: funcShopInfo,
userInfo: funcUserInfo,
goodsList: funcGoodsList,
})
// 等待支付时间计时
if (funcOrderInfo.state == 0) this.setPayCouponInfo(funcOrderInfo.submitTime)
this.setData({
orderInfo: funcOrderInfo,
shopInfo: funcShopInfo,
userInfo: funcUserInfo,
goodsList: funcGoodsList,
})
// 等待支付时间计时
if (funcOrderInfo.state == 0) this.setPayCountdown(funcOrderInfo.submitTime)
}).catch(() => {})
},
setPayCountdown: function (funcSubmitTime) {
let doTime = 15 * 60 * 1000
let timeInter = setInterval(() => {
let creatdTime = new Date(funcSubmitTime.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) {
this.setData({
residuePayTime: residuePayTime
})
} else {
clearInterval(timeInter)
let state = `orderInfo.state`
this.setData({
[state]: -1
})
}
}, 1000)
},
// 再次下单 // 再次下单
onOrderAgain: function (event) { onOrderAgain: function (event) {
console.log(this.data.orderInfo)
let funcItem = this.data.orderInfo let funcItem = this.data.orderInfo
funcItem.shopAppId = wx.getStorageSync('shopInfoBuffer').appId funcItem.shopAppId = wx.getStorageSync('shopInfoBuffer').appId
...@@ -185,37 +305,46 @@ Page({ ...@@ -185,37 +305,46 @@ Page({
} }
}) })
}, },
// 使用须知 // 使用须知
handleNotice() { handleNotice() {
let showNotice = true this.setData({ winInstructions: true })
this.setData({
showNotice
})
}, },
// 一键扫码 // 一键扫码
onCouponCodeScan: function (event) {
App.ui.showToast({ iconType: 'loading', title: '加载中' })
onFastScan: function (event) { App.request({
wx.showLoading({
title: '加载中',
})
App.wxRequest({
url: 'v1/order/getVolumesByOrderId', url: 'v1/order/getVolumesByOrderId',
data: { params: {
'orderId': this.data.orderInfo.id 'orderId': this.data.orderInfo.id
},
success: (response) => {
wx.hideLoading()
let list = response.data
this.setData({
showCodePopup: true,
codeList: list
})
} }
}) }).then((response) => {
App.ui.hideToast()
let funcData = response.data
let funcGoodsList = this.data.goodsList
let funcList = []
for (let i = 0, l = funcGoodsList.length; i < l; i++) {
for (let ii = 0, ll = funcData.length; ii < ll; ii++) {
if (funcGoodsList[i].couponId === funcData[ii].volumeId) {
funcList.push({
'couponId': funcData[ii].volumeId,
'couponName': funcData[ii].name,
'couponNumber': funcData[ii].serialNumber,
'couponQrCode': funcData[ii].qrcode,
'couponState': Number(funcData[ii].status),
})
}
}
}
this.setData({
winCouponCode: true,
couponCodeList: funcList
})
}).catch(() => {})
}, },
swiperChange(e) { swiperChange(e) {
let swiperCurrent = e.detail.current let swiperCurrent = e.detail.current
this.setData({ this.setData({
...@@ -229,99 +358,6 @@ Page({ ...@@ -229,99 +358,6 @@ Page({
// swiperCurrent:0 // swiperCurrent:0
}) })
}, },
/**
* 订单详情
* @function
* @param
* @returns
*/
queryOrderDetail: function () {
App.request({
url: 'v1/order/getOrderDetail',
params: {
'orderId': this.data.orderInfo.id
}
}).then((response) => {
let funcData = response.data
let funcOrderInfo = {
'id': this.data.orderInfo.id,
'score': funcData.integral,
'state': Number(funcData.status),
'amount': funcData.totalMoney,
'contactName': funcData.name,
'contactPhone': funcData.mobilePhone,
'commodityType': Number(funcData.goodType),
'commodity': [],
'tipOrderNo': funcData.orderSerialNumber,
'tipTimeSubmit': funcData.createDate,
'tipTimePay': funcData.paymentTime ? App.modular.miment(funcData.paymentTime).format('YYYY-MM-DD hh:mm:ss') : '',
'tipIntegral': funcData.integral,
'officeName': funcData.officeName,
'wxRequest': funcData.wxRequest,
'businessTime': this.options.date,
'expireTime': funcData.expireTime,
'particulars': funcData.particulars,
'belongType': Number(this.data.options.belongType)
}
if (funcOrderInfo.state === 3 && funcOrderInfo.belongType === 2) funcOrderInfo.state = 7
// 设置印章
let shopName = funcData.officeName
let shopFilter = this.data.shopConfig.filter(
item => {
return item.name.toLowerCase() == shopName.toLowerCase() || shopName.toLowerCase().indexOf(item.name.toLowerCase()) != -1
}
)
funcOrderInfo.shopInfo = shopFilter[0]
console.log('funcOrderInfo.shopInfo', funcOrderInfo.shopInfo)
// 添加订单商品列表
let funcCommodity = funcData.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) {
this.setData({
residuePayTime: residuePayTime
})
} else {
clearInterval(timeInter)
let state = `orderInfo.state`
this.setData({
[state]: -1
})
}
}, 1000)
}
this.setData({
orderInfo: funcOrderInfo
})
console.log(this.data.orderInfo)
}).catch(() => {
})
},
// 弹出单张二维码 // 弹出单张二维码
onCouponCode: function (event) { onCouponCode: function (event) {
......
...@@ -4,44 +4,41 @@ ...@@ -4,44 +4,41 @@
<view class="container"> <view class="container">
<!-- 订单状态 --> <!-- 订单状态 -->
<view class="state row con-c"> <view class="state row cc">
<view class="state-content col con-c" wx:if="{{orderInfo.state === 0}}"> <view class="state-content column cc" wx:if="{{orderInfo.state === 0}}">
<view class="state-content-title row"> <view class="state-content-title row">
<text>订单待付款</text> <text>订单待付款</text>
</view> </view>
<view class="state-content-tip row"> <view class="state-content-tip row">
<text>请在 {{residuePayTime}} 内付款,否则将自动取消订单</text> <text>{{'请在 ' + residuePayTime + ' 内付款,否则将自动取消订单'}}</text>
</view> </view>
</view> </view>
<view class="state-content col con-c" wx:if="{{orderInfo.state === 3}}"> <view class="state-content column cc" wx:if="{{orderInfo.state === 3}}">
<view class="state-content-title row"> <view class="state-content-title row">
<text>订单待评价</text> <text>订单待评价</text>
</view> </view>
</view> </view>
<view class="state-content state-content-invalid col con-c" wx:if="{{orderInfo.state === 4}}"> <view class="state-content state-content-invalid column cc" wx:if="{{orderInfo.state === 4}}">
<view class="state-content-title row"> <view class="state-content-title row">
<text>订单已过期</text> <text>订单已过期</text>
</view> </view>
<view class="state-content-tip row"> <view class="state-content-tip row">
<text>有效期 {{orderInfo.expireTime}}</text> <text>{{'有效期' + orderInfo.expireTime}}</text>
</view> </view>
</view> </view>
<view class="state-content state-content-invalid col con-c" wx:if="{{orderInfo.state === -1}}"> <view class="state-content state-content-invalid column cc" wx:if="{{orderInfo.state === -1}}">
<view class="state-content-title row"> <view class="state-content-title row">
<text>订单已取消</text> <text>订单已取消</text>
</view> </view>
<!-- <view class="state-content-tip row">
<text>下单后15分钟内未付款,自动取消订单</text>
</view> -->
</view> </view>
<view class="state-content state-content-invalid col con-c" wx:if="{{orderInfo.state === 6}}"> <view class="state-content state-content-invalid column cc" wx:if="{{orderInfo.state === 6}}">
<view class="state-content-title row"> <view class="state-content-title row">
<text>订单已评价</text> <text>订单已评价</text>
</view> </view>
</view> </view>
<view class="state-content state-content-invalid col con-c" wx:if="{{orderInfo.state === 7}}"> <view class="state-content state-content-invalid column cc" wx:if="{{orderInfo.state === 7}}">
<view class="state-content-title row"> <view class="state-content-title row">
<text>订单已完成</text> <text>订单已完成</text>
</view> </view>
...@@ -51,29 +48,30 @@ ...@@ -51,29 +48,30 @@
<!-- 订单信息 --> <!-- 订单信息 -->
<view class="info"> <view class="info">
<!-- 年卡月卡 --> <!-- 年卡月卡 -->
<block wx:if="{{orderInfo.commodityType === 1}}"> <block wx:if="{{orderInfo.goodsType === 1}}">
<view class="info-content col con-c"> <view class="info-content column cc">
<view class="info-content-item row"> <view class="info-content-item row">
<text class="info-content-item-label">使用门店</text> <text class="info-content-item-label">使用门店</text>
<text class="info-content-item-title">{{orderInfo.officeName}}</text> <text class="info-content-item-title">{{shopInfo.name}}</text>
</view> </view>
<view class="info-content-item row"> <view class="info-content-item row">
<text class="info-content-item-label"></text> <text class="info-content-item-label"></text>
<text class="info-content-item-describe">{{orderInfo.businessTime}}</text> <text class="info-content-item-describe">{{shopInfo.businessHours}}</text>
</view> </view>
<image class="seal-shot" src="{{resourcesBase+orderInfo.shopInfo.print}}"></image> <image class="seal-shot" src="{{resourcesBase + shopInfo.seal}}"></image>
</view> </view>
</block> </block>
<!-- 普通商品 --> <!-- 普通商品 -->
<block wx:if="{{orderInfo.commodityType === 2}}"> <block wx:if="{{orderInfo.goodsType === 2}}">
<view class="info-content col con-c"> <view class="info-content column cc">
<view class="info-content-item row"> <view class="info-content-item row">
<text class="info-content-item-label">使用门店</text> <text class="info-content-item-label">使用门店</text>
<text class="info-content-item-title">{{orderInfo.officeName}}</text> <text class="info-content-item-title">{{shopInfo.name}}</text>
</view> </view>
<view class="info-content-item row"> <view class="info-content-item row">
<text class="info-content-item-label"></text> <text class="info-content-item-label"></text>
<text class="info-content-item-describe">{{orderInfo.businessTime}}</text> <text class="info-content-item-describe">{{shopInfo.businessHours}}</text>
</view> </view>
<view class="info-content-item row"> <view class="info-content-item row">
...@@ -84,150 +82,144 @@ ...@@ -84,150 +82,144 @@
<text class="info-content-item-label"></text> <text class="info-content-item-label"></text>
<text class="info-content-item-tip">{{orderInfo.contactPhone}}</text> <text class="info-content-item-tip">{{orderInfo.contactPhone}}</text>
</view> </view>
<image wx:if="{{orderInfo.state!==2}}" class="seal-shot" src="{{resourcesBase+orderInfo.shopInfo.print}}"> <image wx:if="{{orderInfo.state !== 2}}" class="seal-shot" src="{{resourcesBase + shopInfo.seal}}">
</image> </image>
</view> </view>
<block wx:if="{{orderInfo.state===2}}"> <block wx:if="{{orderInfo.state === 2}}">
<view class="info-line row con-b align-c"> <view class="info-line row con-b ac">
<view class="info-line-point-left"></view> <view class="info-line-point-left"></view>
<view class="info-line-line"></view> <view class="info-line-line"></view>
<view class="info-line-point-right"></view> <view class="info-line-point-right"></view>
<image class="seal-long" src="{{resourcesBase+orderInfo.shopInfo.printUse}}"></image> <image class="seal-long" src="{{resourcesBase + shopInfo.seal}}"></image>
</view> </view>
<view class="info-code col con-c align-c"> <view class="info-code column cc ac">
<text>{{orderInfo.commodity.length}}件商品可用</text> <text>{{goodsList.length}} 件商品可用</text>
<button bindtap="onFastScan" class="row con-c align-c">一键扫码</button> <button bindtap="onCouponCodeScan" class="row cc ac">一键扫码</button>
<text>{{orderInfo.expireTime}}</text> <text>{{'有效期' + orderInfo.expireTime}}</text>
</view> </view>
</block> </block>
</block> </block>
<!-- 餐品 文创 门票--> <!-- 餐品 文创 门票-->
<block wx:if="{{orderInfo.commodityType === 5||orderInfo.commodityType === 4||orderInfo.commodityType === 3}}"> <block wx:if="{{orderInfo.goodsType === 5 || orderInfo.goodsType === 4 || orderInfo.goodsType === 3}}">
<view class="info-content col con-c {{ orderInfo.state!==2?'p-relative':'' }}"> <view class="info-content column cc {{ orderInfo.state!==2?'p-relative':'' }}">
<view class="info-content-item row"> <view class="info-content-item row">
<text class="info-content-item-label">使用门店</text> <text class="info-content-item-label">使用门店</text>
<text class="info-content-item-title">{{orderInfo.officeName}}</text> <text class="info-content-item-title">{{shopInfo.name}}</text>
</view> </view>
<view class="info-content-item row"> <view class="info-content-item row">
<text class="info-content-item-label"></text> <text class="info-content-item-label"></text>
<text class="info-content-item-describe">{{orderInfo.businessTime}}</text> <text class="info-content-item-describe">{{shopInfo.businessHours}}</text>
</view> </view>
<view class="info-content-item row"> <view class="info-content-item row">
<text class="info-content-item-label">订单信息</text> <text class="info-content-item-label">订单信息</text>
<text class="info-content-item-tip">{{orderInfo.contactName}}</text> <text class="info-content-item-tip">{{userInfo.name}}</text>
</view> </view>
<view class="info-content-item row"> <view class="info-content-item row">
<text class="info-content-item-label"></text> <text class="info-content-item-label"></text>
<text class="info-content-item-tip">{{orderInfo.contactPhone}}</text> <text class="info-content-item-tip">{{userInfo.phone}}</text>
</view> </view>
<image wx:if="{{orderInfo.state!==2}}" class="seal-shot" src="{{resourcesBase+orderInfo.shopInfo.print}}"> <image wx:if="{{orderInfo.state !== 2}}" class="seal-shot" src="{{resourcesBase + shopInfo.seal}}">
</image> </image>
</view> </view>
<block wx:if="{{orderInfo.state===2}}"> <block wx:if="{{orderInfo.state === 2}}">
<view class="info-line row con-b align-c"> <view class="info-line row con-b ac">
<view class="info-line-point-left"></view> <view class="info-line-point-left"></view>
<view class="info-line-line"></view> <view class="info-line-line"></view>
<view class="info-line-point-right"></view> <view class="info-line-point-right"></view>
<image class="seal-long" src="{{resourcesBase+orderInfo.shopInfo.printUse}}"></image> <image class="seal-long" src="{{resourcesBase + shopInfo.seal}}"></image>
</view> </view>
<view class="info-code col con-c align-c"> <view class="info-code column cc ac">
<text wx:if="{{orderInfo.commodityType === 5}}">{{'1件餐品可用'}}</text> <text wx:if="{{orderInfo.goodsType === 5}}">{{'1 件餐品可用'}}</text>
<text wx:if="{{orderInfo.commodityType === 4}}">{{'1件商品可用'}}</text> <text wx:if="{{orderInfo.goodsType === 4}}">{{'1 件商品可用'}}</text>
<text wx:if="{{orderInfo.commodityType === 3}}">{{orderInfo.commodity.length}}张门票可用</text> <text wx:if="{{orderInfo.goodsType === 3}}">{{goodsList.length}}张门票可用</text>
<button bindtap="onFastScan" class="row con-c align-c">一键扫码</button> <button bindtap="onCouponCodeScan" class="row cc ac">一键扫码</button>
<text>{{orderInfo.expireTime}}</text> <text>{{orderInfo.expireTime}}</text>
</view> </view>
</block> </block>
</block> </block>
<!-- 活动 --> <!-- 活动 -->
<block wx:if="{{orderInfo.goodsType === -1}}">
<block wx:if="{{orderInfo.commodityType === -1}}"> <view class="info-content column cc">
<view class="info-content col con-c">
<view class="info-content-item row"> <view class="info-content-item row">
<text class="info-content-item-label">报名活动</text> <text class="info-content-item-label">报名活动</text>
<text class="info-content-item-title">{{orderInfo.commodity[0].name}}</text> <text class="info-content-item-title">{{goodsList[0].name}}</text>
</view> </view>
<view class="info-content-item row"> <view class="info-content-item row">
<text class="info-content-item-label">活动时间</text> <text class="info-content-item-label">活动时间</text>
<text class="info-content-item-describe">{{orderInfo.businessTime}}</text> <text class="info-content-item-describe">{{orderInfo.expireTime}}</text>
</view> </view>
<view class="info-content-item row"> <view class="info-content-item row">
<text class="info-content-item-label">活动地点</text> <text class="info-content-item-label">活动地点</text>
<text class="info-content-item-describe">{{orderInfo.officeName}}</text> <text class="info-content-item-describe">{{shopInfo.name}}</text>
</view> </view>
<view class="info-content-item row"> <view class="info-content-item row">
<text class="info-content-item-label">订单信息</text> <text class="info-content-item-label">订单信息</text>
<text class="info-content-item-tip">{{orderInfo.contactName}}</text> <text class="info-content-item-tip">{{userInfo.name}}</text>
</view> </view>
<view class="info-content-item row"> <view class="info-content-item row">
<text class="info-content-item-label"></text> <text class="info-content-item-label"></text>
<text class="info-content-item-tip">{{orderInfo.contactPhone}}</text> <text class="info-content-item-tip">{{userInfo.phone}}</text>
</view> </view>
<image wx:if="{{orderInfo.state!==2}}" class="seal-shot" src="{{resourcesBase+orderInfo.shopInfo.print}}"> <image wx:if="{{orderInfo.state!==2}}" class="seal-shot" src="{{resourcesBase + shopInfo.seal}}">
</image> </image>
</view> </view>
<block wx:if="{{orderInfo.state===2}}"> <block wx:if="{{orderInfo.state===2}}">
<view class="info-line row con-b align-c"> <view class="info-line row con-b ac">
<view class="info-line-point-left"></view> <view class="info-line-point-left"></view>
<view class="info-line-line"></view> <view class="info-line-line"></view>
<view class="info-line-point-right"></view> <view class="info-line-point-right"></view>
<image class="seal-long" src="{{resourcesBase+orderInfo.shopInfo.printUse}}"></image> <image class="seal-long" src="{{resourcesBase + shopInfo.seal}}"></image>
</view> </view>
<view class="info-code col con-c align-c"> <view class="info-code column cc ac">
<text>{{orderInfo.commodity.length}}张门票可用</text> <text>{{goodsList.length}}张门票可用</text>
<button bindtap="onFastScan" class="row con-c align-c">一键扫码</button> <button bindtap="onCouponCodeScan" class="row cc ac">一键扫码</button>
<text>{{orderInfo.expireTime}}</text> <text>{{orderInfo.expireTime}}</text>
</view> </view>
</block> </block>
</block> </block>
<!-- 观影 --> <!-- 观影 -->
<block wx:if="{{orderInfo.goodsType === -2}}">
<block wx:if="{{orderInfo.commodityType === -2}}"> <view class="info-content column cc">
<view class="info-content col con-c">
<view class="info-content-item row"> <view class="info-content-item row">
<text class="info-content-item-label">电影</text> <text class="info-content-item-label">电影</text>
<text class="info-content-item-title">{{orderInfo.commodity[0].name}}</text> <text class="info-content-item-title">{{goodsList[0].name}}</text>
</view> </view>
<view class="info-content-item row"> <view class="info-content-item row">
<text class="info-content-item-label">场次</text> <text class="info-content-item-label">场次</text>
<text class="info-content-item-describe">{{orderInfo.businessTime}}</text> <text class="info-content-item-describe">{{orderInfo.expireTime}}</text>
</view> </view>
<view class="info-content-item row"> <view class="info-content-item row">
<text class="info-content-item-label">订单信息</text> <text class="info-content-item-label">订单信息</text>
<text class="info-content-item-tip">{{orderInfo.contactName}}</text> <text class="info-content-item-tip">{{userInfo.name}}</text>
</view> </view>
<view class="info-content-item row"> <view class="info-content-item row">
<text class="info-content-item-label"></text> <text class="info-content-item-label"></text>
<text class="info-content-item-tip">{{orderInfo.contactPhone}}</text> <text class="info-content-item-tip">{{userInfo.phone}}</text>
</view> </view>
<image wx:if="{{orderInfo.state!==2}}" class="seal-shot" src="{{resourcesBase+orderInfo.shopInfo.print}}"> <image wx:if="{{orderInfo.state !== 2}}" class="seal-shot" src="{{resourcesBase + shopInfo.seal}}">
</image> </image>
</view> </view>
<block wx:if="{{orderInfo.state===2}}"> <block wx:if="{{orderInfo.state === 2}}">
<view class="info-line row con-b align-c"> <view class="info-line row con-b ac">
<view class="info-line-point-left"></view> <view class="info-line-point-left"></view>
<view class="info-line-line"></view> <view class="info-line-line"></view>
<view class="info-line-point-right"></view> <view class="info-line-point-right"></view>
<image class="seal-long" src="{{resourcesBase+orderInfo.shopInfo.printUse}}"></image> <image class="seal-long" src="{{resourcesBase + shopInfo.seal}}"></image>
</view> </view>
<view class="info-code col con-c align-c"> <view class="info-code column cc ac">
<text>{{orderInfo.commodity.length}}张电影票可用</text> <text>{{goodsList.length}}张电影票可用</text>
<button bindtap="onFastScan" class="row con-c align-c">一键扫码</button> <button bindtap="onCouponCodeScan" class="row cc ac">一键扫码</button>
<text>{{orderInfo.expireTime}}</text> <text>{{orderInfo.expireTime}}</text>
</view> </view>
</block> </block>
</block> </block>
</view> </view>
<view class="notice-wrapper row con-e" bindtap="handleNotice"> <view class="notice-wrapper row ce ac" bindtap="handleNotice">
<view class="notice">活动须知</view> <view class="notice">活动须知</view>
<!-- <view class="notice">活动须知</view> <image class="icon_32" src="{{imageBase + 'icon/arrow-r-2.png'}}"></image>
<view class="notice">观影须知</view> -->
<l-icon name="right" color="#959DAA" size="22" />
</view> </view>
<!-- 商品信息 --> <!-- 商品信息 -->
...@@ -236,29 +228,29 @@ ...@@ -236,29 +228,29 @@
<text>购买商品</text> <text>购买商品</text>
</view> </view>
<view class="commodity-list"> <view class="commodity-list">
<view class="commodity-shop-info row align-c"> <view class="commodity-shop-info row ac">
<view class="logo-box"> <view class="logo-box">
<image src="{{resourcesBase + orderInfo.shopInfo.logo}}" mode="aspectFit"></image> <image src="{{resourcesBase + shopInfo.logo}}" mode="aspectFit"></image>
</view> </view>
<text>{{orderInfo.officeName}}</text> <text>{{shopInfo.name}}</text>
</view> </view>
<block wx:for="{{orderInfo.commodity}}" wx:for-index="index" wx:for-item="item" wx:key="index"> <block wx:for="{{goodsList}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="commodity-item row align-c"> <view class="commodity-item row ac">
<image src="{{item.cover}}"></image> <image src="{{item.cover}}"></image>
<view class="commodity-item-info col"> <view class="commodity-item-info column ca">
<view> <view>
<text>{{item.name}}</text> <text>{{item.name}}</text>
</view> </view>
<view class="row"> <view class="row">
<text>¥</text> <text>¥</text>
<text>{{item.amount}}</text> <text>{{item.priceTotal}}</text>
</view> </view>
</view> </view>
<view class="commodity-item-operation" wx:if="{{item.codeId}}"> <view class="commodity-item-operation" wx:if="{{item.couponQrCodeId}}">
<!-- 状态(0已过期1带使用2已使用) --> <!-- 状态(0已过期1带使用2已使用) -->
<button wx:if="{{item.state==1}}" class="row con-c align-c" data-item="{{item}}" bindtap="onCouponCode">查看券码</button> <button wx:if="{{item.couponState === 1}}" class="row cc ac" data-item="{{item}}" bindtap="onCouponCode">查看券码</button>
<button wx:if="{{item.state==0}}" disabled class="row con-c align-c btn-disabled">已过期</button> <button wx:if="{{item.couponState === 0}}" disabled class="row cc ac btn-disabled">已过期</button>
<button wx:if="{{item.state==2}}" disabled class="row con-c align-c btn-disabled">已使用</button> <button wx:if="{{item.couponState === 2}}" disabled class="row cc ac btn-disabled">已使用</button>
</view> </view>
</view> </view>
</block> </block>
...@@ -267,105 +259,44 @@ ...@@ -267,105 +259,44 @@
<!-- 订单提示 --> <!-- 订单提示 -->
<view class="tip"> <view class="tip">
<view class="tip-pay row con-b align-c"> <view class="tip-pay row con-b ac">
<view class="tip-pay-title" wx:if="{{orderInfo.amount!==undefined}}"> <view class="tip-pay-title" wx:if="{{orderInfo.payAmount !== undefined}}">
<text wx:if="{{orderInfo.state === 0||orderInfo.state === -1}}">待付金额</text> <text wx:if="{{orderInfo.state === 0 || orderInfo.state === -1}}">待付金额</text>
<text wx:else>实付金额</text> <text wx:else>实付金额</text>
</view> </view>
<view class="tip-pay-amount"> <view class="tip-pay-amount">
<text>¥</text> <text>¥</text>
<text>{{orderInfo.amount}}</text> <text>{{orderInfo.payAmount}}</text>
</view> </view>
</view> </view>
<view class="tip-describe col"> <view class="tip-describe col">
<text>{{'订单编号:' +( orderInfo.tipOrderNo?orderInfo.tipOrderNo:"")}}</text> <text>{{'订单编号:' + ( orderInfo.number ? orderInfo.number : "")}}</text>
<text>{{'下单时间:' + (orderInfo.tipTimeSubmit?orderInfo.tipTimeSubmit:'')}}</text> <text>{{'下单时间:' + (orderInfo.submitTime ? orderInfo.submitTime : '')}}</text>
<text wx:if="{{orderInfo.state !== 0 && orderInfo.state !== -1}}">{{'付款时间:' + (orderInfo.tipTimePay?orderInfo.tipTimePay:'')}}</text> <text wx:if="{{orderInfo.state !== 0 && orderInfo.state !== -1}}">{{'付款时间:' + (orderInfo.payTime ? orderInfo.payTime : '')}}</text>
<text wx:if="{{orderInfo.state !== 0 && orderInfo.state !== -1&&orderInfo.tipIntegral}}">{{'获得积分:' + (orderInfo.tipIntegral?orderInfo.tipIntegral:'')}}</text> <text wx:if="{{orderInfo.state !== 0 && orderInfo.state !== -1&&orderInfo.integral}}">{{'获得积分:' + (orderInfo.integral ? orderInfo.integral : '') + '分'}}</text>
</view>
</view>
</view>
<!-- 多张 扫码弹窗 -->
<l-popup show="{{showCodePopup}}" l-class="l-popup-bg" animation="{{false}}">
<view class="scan-code-wrapper col align-c">
<view class="code-header" wx:if="{{orderInfo.commodityType === 5}}">{{codeList.length}}件餐品可用</view>
<view class="code-header" wx:if="{{orderInfo.commodityType === 4}}">{{codeList.length}}件商品可用</view>
<view class="code-header" wx:if="{{orderInfo.commodityType === 3}}">{{codeList.length}}张门票可用</view>
<view class="code-tips">请将券码出示给门店核销人员</view>
<swiper class="code-main" next-margin="64rpx" bindchange="swiperChange">
<swiper-item wx:for="{{codeList}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="code-item col con-c align-c {{index === swiperCurrent ? 'item-center' : ''}}">
<view class="code-item-title cord-title">{{item.name}}</view>
<view class="code-img">
<image mode="widthFix" src="{{'data:image/jpg;base64,'+item.qrcode}}"></image>
</view>
<view class="code-num-wrapper row align-c con-a">
<view class="code-num-title {{item.status==2 ? 'code-used' : ''}}">券码{{index+1}}:</view>
<view class="code-num {{item.status==2 ? 'code-used' : ''}}">{{item.serialNumber}}</view>
<view class="num-copy" wx:if="{{item.status!=2}}" bindtap="setClipboard" data-code="{{item.serialNumber}}" data-index="{{index}}">复制</view>
</view>
<view class="code-used-seal" wx:if="{{item.status==2}}">
<image mode="widthFix" src="{{resourcesBase+'mine/server/codeUsed.png'}}"></image>
</view>
</view>
</swiper-item>
</swiper>
<view class="img-num row align-c">
<text class="current-img-num">{{swiperCurrent+1}}</text>
<text class="symbol-img-num"> / </text>
<text class="total-img-num">{{codeList.length}}</text>
</view>
<view class="code-close-btn row con-c align-c" bindtap="closeQRcode">
<image mode="widthFix" src="/image/icon_close.png"></image>
</view>
</view>
</l-popup>
<!--单个 二维码弹窗 -->
<view class="code-mask row con-c align-c" wx:if="{{winCode}}">
<view class="code col con-c align-c">
<view class="code-tip row con-c align-c">
<text>{{'请将券码出示给门店核销人员'}}</text>
</view>
<view class="code-info col con-c align-c">
<view class="code-info-title">
<text>{{codeInfo.codeName}}</text>
</view>
<view class="code-info-qrcode">
<image src="{{'data:image/png;base64,' + codeInfo.codeBase64}}"></image>
</view>
<view class="code-info-copy row con-b align-c">
<text>券码</text>
<text>{{codeInfo.codeNo}}</text>
<text bindtap="onCodeCopy">复制</text>
</view>
</view>
<view class="code-close row con-c align-c" bindtap="onCodeClose">
<image src="{{imageBase + 'icon/close-1.png'}}"></image>
</view> </view>
</view> </view>
</view> </view>
<!-- 底部按钮 --> <!-- 底部按钮 -->
<view class="footer-btn row con-e" wx:if="{{orderInfo.state !== 2}}"> <view class="footer-btn row ce" wx:if="{{orderInfo.state !== 2}}">
<!-- 状态(-1已取消,0未付款,1未发货,2待使用,3已使用,4已过期,5已发货,6已关闭/已评价) --> <!-- 状态(-1已取消,0未付款,1未发货,2待使用,3已使用,4已过期,5已发货,6已关闭/已评价) -->
<view class="delete-btn" bindtap="onDelOrCancelOrder" data-type='0' wx:if="{{orderInfo.state===0}}">取消订单</view> <view class="delete-btn" bindtap="onDelOrCancelOrder" data-type='0' wx:if="{{orderInfo.state===0}}">取消订单</view>
<view class="order-btn" bindtap="onOrderPay" wx:if="{{orderInfo.state===0}}">去支付</view> <view class="order-btn" bindtap="onOrderPay" wx:if="{{orderInfo.state===0}}">去支付</view>
<view class="order-btn" bindtap="onOrderEvaluate" wx:if="{{orderInfo.state===3}}">去评价</view> <view class="order-btn" bindtap="onOrderEvaluate" wx:if="{{orderInfo.state===3}}">去评价</view>
<view class="delete-btn" bindtap="onDelOrCancelOrder" data-type='1' wx:if="{{orderInfo.state===4 || orderInfo.state===-1 || orderInfo.state===6 || orderInfo.state===7}}">删除订单</view> <view class="delete-btn" bindtap="onDelOrCancelOrder" data-type='1' wx:if="{{orderInfo.state === 4 || orderInfo.state===-1 || orderInfo.state===6 || orderInfo.state===7}}">删除订单</view>
<view class="order-btn" bindtap="onOrderAgain" wx:if="{{orderInfo.state===-1}}">再次下单</view> <view class="order-btn" wx:if="{{orderInfo.state === -1}}" bindtap="onOrderAgain">再次报名</view>
</view> </view>
<!-- 二维码弹窗 -->
<coupon-code couponCodeList="{{couponCodeList}}" couponCodeSelectionIndex="{{couponCodeSelectionIndex}}" viewCouponCode="{{winCouponCode}}"></coupon-code>
<!-- 活动须知 --> <!-- 活动须知 -->
<l-popup show="{{showNotice}}" content-align="bottom"> <m-popup isShow="{{winInstructions}}">
<view class="notice-popup-wrapper"> <view class="popup_container column" slot="content">
<view class="notice-popup-title">活动须知</view> <text class="popup_title font_bold_42 color_regular">活动须知</text>
<scroll-view scroll-y class="notice-popup-content"> <view class="popup_content">
<view> <rich-text nodes="{{orderInfo.instructions}}"></rich-text>
<rich-text nodes="{{orderInfo.particulars}}"></rich-text> </view>
</view>
</scroll-view>
</view> </view>
</l-popup> </m-popup>
\ No newline at end of file \ No newline at end of file
...@@ -621,10 +621,6 @@ ...@@ -621,10 +621,6 @@
width: 60%; width: 60%;
} }
.l-popup-bg {
background: rgba(0, 0, 0, 0.4);
}
.tips-wrapper { .tips-wrapper {
margin: 40rpx 40rpx 0; margin: 40rpx 40rpx 0;
} }
......
...@@ -49,7 +49,7 @@ Page({ ...@@ -49,7 +49,7 @@ Page({
option: options, option: options,
active: type active: type
}) })
type === 0 ? this.getActivity() : this.getList(type) type === 0 ? this.queryActivityList() : this.getList(type)
}, },
onShow: function () { onShow: function () {
...@@ -64,13 +64,61 @@ Page({ ...@@ -64,13 +64,61 @@ Page({
let type = this.data.option.tab ? 1 * this.data.option.tab : 0 let type = this.data.option.tab ? 1 * this.data.option.tab : 0
if (type === 0) { if (type === 0) {
this.getActivity() this.queryActivityList()
} else { } else {
this.getList(type) this.getList(type)
} }
} }
}, },
queryActivityList: function () {
wx.setStorageSync('option-appointment', '')
App.ui.showToast({
'iconType': 'loading',
'title': '加载中',
'duration': 30000,
})
App.request({
url: 'v1/activity/getMyActivityList',
params: {
'type': '',
'activeState': '',
'pageSize': this.data.pageSize,
'pageNo': this.data.pageNo,
}
}).then((response) => {
App.ui.hideToast()
let funcData = response.data.list
let funcList = []
for (let i = 0, l = funcData.length; i < l; i++) {
let funcItem = {
'orderId': funcData[i].orderId,
'enrollId': funcData[i].enrollId,
'name': funcData[i].name,
'status': Number(funcData[i].status), // 订单状态(-1已取消, 0未付款, 2待使用, 3已使用, 4已过期 6已关闭)
'activeState': Number(funcData[i].activeState), // 活动状态(0 未开始 1进行中 2 已结束)
'cover': funcData[i].cover,
'date': funcData[i].activeTime,
'address': funcData[i].address,
'num': funcData[i].number,
'amount': funcData[i].totalMoney ? funcData[i].totalMoney.toFixed(2) : 0,
'wxRequest': funcData[i].wxRequest,
'belongType': Number(funcData[i].type)
}
if (funcItem.status === 3 && funcItem.belongType === 2) funcItem.status = 6
funcList.push(funcItem)
}
if (this.data.pageNo !== 1) funcList = this.data.activityList.concat(funcList)
this.setData({
activityList: funcList,
isLoading: false
})
}).catch(() => {})
},
// 去使用 // 去使用
onOrderUse: function (event) { onOrderUse: function (event) {
this.onOrderDetail(event) this.onOrderDetail(event)
...@@ -86,14 +134,13 @@ Page({ ...@@ -86,14 +134,13 @@ Page({
let funcItem = funcEvent.currentTarget.dataset.item let funcItem = funcEvent.currentTarget.dataset.item
console.log(funcItem) console.log(funcItem)
wx.navigateTo({ wx.navigateTo({
url: '/pages/pay/order-comment/order-comment?id=' + funcItem.orderId, url: '/pages/pay/order-comment/order-comment?id=' + funcItem.orderId + '&pageFrom=activityList',
}) })
}, },
// 跳转详情页面 // 跳转详情页面
onOrderDetail: function (event) { onOrderDetail: function (event) {
let funcItem = event.currentTarget.dataset.item let funcItem = event.currentTarget.dataset.item
console.log('onOrderDetail', funcItem)
wx.navigateTo({ wx.navigateTo({
url: '/pages/mine/appointment-detail/appointment-detail?id=' + funcItem.orderId + '&activityId=' + funcItem.enrollId + '&date=' + funcItem.date + '&belongType=' + funcItem.belongType, url: '/pages/mine/appointment-detail/appointment-detail?id=' + funcItem.orderId + '&activityId=' + funcItem.enrollId + '&date=' + funcItem.date + '&belongType=' + funcItem.belongType,
}) })
...@@ -105,7 +152,7 @@ Page({ ...@@ -105,7 +152,7 @@ Page({
this.setData({ this.setData({
pageNo: 1, pageNo: 1,
}) })
this.getActivity() this.queryActivityList()
} else { } else {
this.getList(index) this.getList(index)
} }
...@@ -151,23 +198,19 @@ Page({ ...@@ -151,23 +198,19 @@ Page({
url: '/pages/mine/appointment-ticket/appointment-ticket?detail=' + JSON.stringify(e.currentTarget.dataset.item), url: '/pages/mine/appointment-ticket/appointment-ticket?detail=' + JSON.stringify(e.currentTarget.dataset.item),
}) })
}, },
//预约
goAppoint(e) { onToActivityDetail: function (funcEvent) {
let type = e.currentTarget.dataset.index; let funcItem = funcEvent.currentTarget.dataset.item
let url = '' console.log(funcItem)
if (type == 0) { wx.navigateTo({ url: '/pages/play/activity/activity' })
//活动列表 },
url = '/pages/play/activity/activity'
} else if (type == 1) { onToVisitParkAppointment: function () {
// 夜间入园预约 wx.navigateTo({ url: '/pages/home/night-appointment/night-appointment?frompage=appointment&tab=1' })
url = '/pages/home/night-appointment/night-appointment?frompage=appointment&tab=1' },
} else if (type == 2) {
// 房产预约 onToVisitRoomAppointment: function () {
url = "/pages/commodity/room-appointment/room-appointment?frompage=appointment&tab=2" wx.navigateTo({ url: '/pages/commodity/room-appointment/room-appointment?frompage=appointment&tab=2' })
}
wx.navigateTo({
url: url
})
}, },
// 删除,取消预约 // 删除,取消预约
...@@ -213,67 +256,15 @@ Page({ ...@@ -213,67 +256,15 @@ Page({
'isDoing': false, 'isDoing': false,
'pageNo': 1, 'pageNo': 1,
}) })
this.getActivity() this.queryActivityList()
}, 2000); }, 2000);
} }
} }
}) })
}, },
fail: () => {}, fail: () => {},
}) })
}, },
// 我的活动
getActivity: function () {
wx.setStorageSync('option-appointment', '')
App.ui.showToast({
'iconType': 'loading',
'title': '加载中',
'duration': 30000,
})
App.request({
url: 'v1/activity/getMyActivityList',
params: {
'type': '',
'activeState': '',
'pageSize': this.data.pageSize,
'pageNo': this.data.pageNo,
}
}).then((response) => {
App.ui.hideToast()
let funcData = response.data.list
let funcList = []
for (let i = 0, l = funcData.length; i < l; i++) {
let funcItem = {
'orderId': funcData[i].orderId,
'enrollId': funcData[i].enrollId,
'name': funcData[i].name,
'status': Number(funcData[i].status), // 订单状态(-1已取消, 0未付款, 2待使用, 3已使用, 4已过期 6已关闭)
'activeState': Number(funcData[i].activeState), // 活动状态(0 未开始 1进行中 2 已结束)
'cover': funcData[i].cover,
'date': funcData[i].activeTime,
'address': funcData[i].address,
'num': funcData[i].number,
'amount': funcData[i].totalMoney ? funcData[i].totalMoney.toFixed(2) : 0,
'wxRequest': funcData[i].wxRequest,
'belongType': Number(funcData[i].type)
}
if (funcItem.status === 3 && funcItem.belongType === 2) funcItem.status = 6
funcList.push(funcItem)
}
if (this.data.pageNo !== 1) funcList = this.data.activityList.concat(funcList)
this.setData({
activityList: funcList,
isLoading: false
})
console.log(this.data.activityList)
}).catch(() => {
})
},
// 预约列表/我的预约 // 预约列表/我的预约
getList: function (index) { getList: function (index) {
wx.setStorageSync('option-appointment', '') wx.setStorageSync('option-appointment', '')
...@@ -348,7 +339,7 @@ Page({ ...@@ -348,7 +339,7 @@ Page({
pageNo: this.data.pageNo + 1 pageNo: this.data.pageNo + 1
}) })
if (this.data.active == 0) { if (this.data.active == 0) {
this.getActivity() this.queryActivityList()
} }
}, },
......
...@@ -206,7 +206,7 @@ ...@@ -206,7 +206,7 @@
</view> </view>
<view class="appointment-activity-btn row"> <view class="appointment-activity-btn row">
<view class="cancel-btn cancel" data-item="{{item}}" catchtap="doCancel" data-type="1">删除报名</view> <view class="cancel-btn cancel" data-item="{{item}}" catchtap="doCancel" data-type="1">删除报名</view>
<view data-index="0" catchtap="goAppoint" class="confirm-btn confirm-once">再次报名</view> <view class="confirm-btn confirm-once" data-item="{{item}}" catchtap="onToActivityDetail">再次报名</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -228,16 +228,16 @@ ...@@ -228,16 +228,16 @@
<view class="noActive" wx:if="{{data.length === 0 && active === 1&&!isLoading}}"> <view class="noActive" wx:if="{{data.length === 0 && active === 1&&!isLoading}}">
<view class="noActive-title">暂无夜间入园预约</view> <view class="noActive-title">暂无夜间入园预约</view>
<view class="noActive-rule">20:00后入园需要提前预约,每日限流200人</view> <view class="noActive-rule">20:00后入园需要提前预约,每日限流200人</view>
<view class="noActive-botton" data-index="1" bindtap="goAppoint">去预约</view> <view class="noActive-botton" bindtap="onToVisitParkAppointment">去预约</view>
</view> </view>
<view class="noActive" wx:if="{{data.length === 0 && active === 2&&!isLoading}}"> <view class="noActive" wx:if="{{data.length === 0 && active === 2&&!isLoading}}">
<view class="noActive-title">暂无看房预约</view> <view class="noActive-title">暂无看房预约</view>
<view class="noActive-botton" data-index="2" bindtap="goAppoint">去预约</view> <view class="noActive-botton" bindtap="onToVisitRoomAppointment">去预约</view>
</view> </view>
<!-- 主题活动数据为空 --> <!-- 主题活动数据为空 -->
<view class="noActive" wx:if="{{activityList.length === 0 && active === 0&&!isLoading}}"> <view class="noActive" wx:if="{{activityList.length === 0 && active === 0&&!isLoading}}">
<view class="noActive-title">暂无活动预约</view> <view class="noActive-title">暂无活动预约</view>
<view class="noActive-botton" data-index="0" bindtap="goAppoint">去预约</view> <view class="noActive-botton" bindtap="onToActivityDetail">去预约</view>
</view> </view>
</view> </view>
......
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
</view> </view>
<view class="row ac"> <view class="row ac">
<button wx:if="{{item.status === 0}}" class="delete row con-c ac" data-index="{{index}}" data-item="{{item}}" catchtap="onOrderCancel" disabled="{{isDoing}}">取消订单</button> <button wx:if="{{item.status === 0}}" class="delete row con-c ac" data-index="{{index}}" data-item="{{item}}" catchtap="onOrderCancel" disabled="{{isDoing}}">取消订单</button>
<button disabled="{{isDoing}}" wx:if="{{item.status === -1 || item.status === 4}}" class="delete row con-c ac" data-item="{{item}}" catchtap="onOrderRemove">删除订单</button> <button disabled="{{isDoing}}" wx:if="{{item.status === -1 || item.status === 4 || item.status === 6}}" class="delete row con-c ac" data-item="{{item}}" catchtap="onOrderRemove">删除订单</button>
<button disabled="{{isDoing}}" wx:if="{{item.status === 0}}" class="again row con-c ac" data-item="{{item}}" catchtap="onOrderPay">去支付</button> <button disabled="{{isDoing}}" wx:if="{{item.status === 0}}" class="again row con-c ac" data-item="{{item}}" catchtap="onOrderPay">去支付</button>
<button disabled="{{isDoing}}" wx:if="{{item.status === 2}}" class="again row con-c ac" data-item="{{item}}" catchtap="onOrderUse">去使用</button> <button disabled="{{isDoing}}" wx:if="{{item.status === 2}}" class="again row con-c ac" data-item="{{item}}" catchtap="onOrderUse">去使用</button>
<button disabled="{{isDoing}}" wx:if="{{item.status === 3}}" class="again row con-c ac" data-item="{{item}}" catchtap="onOrderEvaluate">去评价</button> <button disabled="{{isDoing}}" wx:if="{{item.status === 3}}" class="again row con-c ac" data-item="{{item}}" catchtap="onOrderEvaluate">去评价</button>
......
let App = getApp() let App = getApp()
Page({ Page({
data: { data: {
isDoing: false,
showNotice: false,
swiperCurrent: 0,
winCouponCode: false,
imageBase: App.globalData.appImageBase,
resourcesBase: App.globalData.appResourcesBase,
shopInfo: {},
orderType: 1, // 1 - 年卡/月卡,2 - 次票, 3 - SPA, 4 - 文创, 5 - 餐品, 6 - 活动, 7 - 观影 orderType: 1, // 1 - 年卡/月卡,2 - 次票, 3 - SPA, 4 - 文创, 5 - 餐品, 6 - 活动, 7 - 观影
orderInfo: {},
fromPage: '', fromPage: '',
codeInfo: {}, residuePayTime: '', //剩余支付时间
isFromUse: false,
winCode: false,
residuePayTime: "", //剩余支付时间
shopInfo: {},
orderInfo: {},
codeInfo: {},
userInfo: {},
goodsList: [],
couponCodeList: [], couponCodeList: [],
couponCodeSelectionIndex: 0, couponCodeSelectionIndex: 0,
viewCouponCode: false,
sealSrc: '', winInstructions: false,
shopConfig: App.globalData.shopId,
shopAppId: "",
marginTop: 0,
}, },
onLoad: function (options) { onLoad: function (options) {
let funcOrderInfo = this.data.orderInfo
funcOrderInfo.id = options.id
this.setData({ this.setData({
shopInfo: wx.getStorageSync('shopInfoBuffer'), orderInfo: { 'id': options.id },
orderInfo: funcOrderInfo,
shopAppId: options.shopAppId,
fromPage: options.fromPage === 'order' ? 'order' : '', fromPage: options.fromPage === 'order' ? 'order' : '',
isFromUse: options.showCode === 'true' ? true : false,
marginTop: wx.getStorageSync('navStatusHeight') + wx.getStorageSync('navTitleHeight')
}) })
console.log(this.data.orderInfo)
this.queryOrderDetail() this.queryOrderDetail()
}, },
/**
* 订单详情
* @function
* @param
* @returns
*/
queryOrderDetail: function () {
App.request({
url: 'v1/order/getOrderDetail',
params: {
'orderId': this.data.orderInfo.id
}
}).then((response) => {
let funcResponse = response.data
let funcShopInfo = {
'id': funcResponse.officeId,
'name': funcResponse.officeName,
'logo': '',
'seal': '',
'businessHours': funcResponse.businessTime,
}
let funcShopInfoBuffer = App.getShopInfo(funcShopInfo.id)
funcShopInfo.logo = funcShopInfoBuffer.logo
funcShopInfo.seal = funcShopInfoBuffer.print
let funcUserInfo = {
'id': '',
'name': funcResponse.name,
'phone': funcResponse.mobilePhone,
}
let funcOrderInfo = {
'id': this.data.orderInfo.id,
'state': Number(funcResponse.status),
'goodsType': Number(funcResponse.goodType),
'number': funcResponse.orderSerialNumber,
'payTime': funcResponse.paymentTime ? App.modular.miment(funcResponse.paymentTime).format('YYYY-MM-DD hh:mm:ss') : '',
'payAmount': funcResponse.totalMoney,
'submitTime': funcResponse.createDate,
'integral': funcResponse.integral,
'instructions': funcResponse.particulars,
'expireTime': funcResponse.expireTime.replace(/-/g, '.').replace('~', '-'), //订单有效期
// 'wxRequest': funcResponse.wxRequest,
}
// 电影
if (funcOrderInfo.goodsType === -2 && funcOrderInfo.expireTime) {
let funcDate = funcOrderInfo.expireTime.match(/[0-9]+\.[0-9]+\.[0-9]+/)[0]
let funcTime = funcOrderInfo.expireTime.match(/[0-9]+:[0-9]+/g)
// miment npm 包在 ios 下必须传 yyyy-mm-dd hh:mm:ss 格式,否则无法转换。
funcDate = funcDate.replace(/\./g, '-')
funcOrderInfo.expireTime = App.modular.miment(funcDate).format('MM月DD日') + ' ' + funcTime[0] + ' - ' + funcTime[1]
}
let funcGoodsList = []
let funcGoodsListBuffer = funcResponse.smOrderDetails
for (let i = 0, l = funcGoodsListBuffer.length; i < l; i++) {
funcGoodsList.push({
'price': funcGoodsListBuffer[i].unitPrice,
'cover': funcGoodsListBuffer[i].imgUrl,
'quantity': funcGoodsListBuffer[i].number,
'priceTotal': funcGoodsListBuffer[i].totalPrices,
'name': funcGoodsListBuffer[i].name,
'couponId': funcGoodsListBuffer[i].volumeId,
'couponName': '',
'couponNumber': '',
'couponQrCode': '',
'couponState': Number(funcGoodsListBuffer[i].status),
})
}
this.setData({
orderInfo: funcOrderInfo,
shopInfo: funcShopInfo,
userInfo: funcUserInfo,
goodsList: funcGoodsList,
})
console.log(this.data.goodsList)
// 等待支付时间计时
if (funcOrderInfo.state == 0) this.setPayCountdown(funcOrderInfo.submitTime)
})
},
setPayCountdown: function (funcSubmitTime) {
let doTime = 15 * 60 * 1000
let timeInter = setInterval(() => {
let creatdTime = new Date(funcSubmitTime.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) {
this.setData({
residuePayTime: residuePayTime
})
} else {
clearInterval(timeInter)
let state = `orderInfo.state`
this.setData({
[state]: -1
})
}
}, 1000)
},
// 再次下单 // 再次下单
onOrderAgain: function (event) { onOrderAgain: function (event) {
let funcItem = this.data.orderInfo let funcItem = this.data.orderInfo
funcItem.shopAppId = wx.getStorageSync('shopInfoBuffer').appId funcItem.shopAppId = wx.getStorageSync('shopInfoBuffer').appId
let funcUrl = '' let funcUrl = ''
App.setShopInfo(funcItem.shopAppId, funcItem.commodityType) App.setShopInfo(funcItem.shopAppId, funcItem.goodsType)
switch (funcItem.shopAppId) { switch (funcItem.shopAppId) {
// 海错图 // 海错图
case 1: case 1:
if (funcItem.commodityType === -1) funcUrl = '/pages/play/activity/activity' if (funcItem.goodsType === -1) funcUrl = '/pages/play/activity/activity'
if (funcItem.commodityType === 1) funcUrl = '/pages/commodity/project-detail/project-detail' if (funcItem.goodsType === 1) funcUrl = '/pages/commodity/project-detail/project-detail'
if (funcItem.commodityType === 3) funcUrl = '/pages/commodity/project-detail/project-detail' if (funcItem.goodsType === 3) funcUrl = '/pages/commodity/project-detail/project-detail'
if (funcItem.commodityType === 4) funcUrl = '/pages/commodity/menu-food/menu-food' if (funcItem.goodsType === 4) funcUrl = '/pages/commodity/menu-food/menu-food'
break break
// 星空影院 // 星空影院
case 2: case 2:
if (funcItem.commodityType === -2) funcUrl = '/pages/play/movie/movie' if (funcItem.goodsType === -2) funcUrl = '/pages/play/movie/movie'
break break
// 儿童营地 // 儿童营地
case 3: case 3:
if (funcItem.commodityType === 1) funcUrl = '/pages/commodity/project-detail/project-detail' if (funcItem.goodsType === 1) funcUrl = '/pages/commodity/project-detail/project-detail'
if (funcItem.commodityType === 2) funcUrl = '/pages/commodity/menu-food/menu-food' if (funcItem.goodsType === 2) funcUrl = '/pages/commodity/menu-food/menu-food'
if (funcItem.commodityType === 3) funcUrl = '/pages/commodity/project-detail/project-detail' if (funcItem.goodsType === 3) funcUrl = '/pages/commodity/project-detail/project-detail'
if (funcItem.commodityType === 4) funcUrl = '/pages/commodity/menu-food/menu-food' if (funcItem.goodsType === 4) funcUrl = '/pages/commodity/menu-food/menu-food'
break break
// 原野MOJITO // 原野MOJITO
case 4: case 4:
if (funcItem.commodityType === 5) funcUrl = '/pages/commodity/menu-food/menu-food' if (funcItem.goodsType === 5) funcUrl = '/pages/commodity/menu-food/menu-food'
break break
// 拾光花坊 // 拾光花坊
case 5: case 5:
if (funcItem.commodityType === -1) funcUrl = '/pages/play/activity/activity' if (funcItem.goodsType === -1) funcUrl = '/pages/play/activity/activity'
if (funcItem.commodityType === 5) funcUrl = '/pages/commodity/menu-food/menu-food' if (funcItem.goodsType === 5) funcUrl = '/pages/commodity/menu-food/menu-food'
break break
// 原味舒食 // 原味舒食
case 6: case 6:
if (funcItem.commodityType === 5) funcUrl = '/pages/commodity/menu-food/menu-food' if (funcItem.goodsType === 5) funcUrl = '/pages/commodity/menu-food/menu-food'
break break
// 元养水韵SPA // 元养水韵SPA
case 7: case 7:
if (funcItem.commodityType === 2) funcUrl = '/pages/commodity/project-detail/project-detail' if (funcItem.goodsType === 2) funcUrl = '/pages/commodity/project-detail/project-detail'
break break
} }
...@@ -138,9 +232,6 @@ Page({ ...@@ -138,9 +232,6 @@ Page({
title: '处理中', title: '处理中',
duration: 60000, duration: 60000,
}) })
this.setData({
isDoing: true,
})
App.wxRequest({ App.wxRequest({
url: 'v1/order/cancelOrder', url: 'v1/order/cancelOrder',
data: { data: {
...@@ -157,9 +248,6 @@ Page({ ...@@ -157,9 +248,6 @@ Page({
}) })
} }
}) })
this.setData({
isDoing: false,
})
} }
}) })
} }
...@@ -167,19 +255,13 @@ Page({ ...@@ -167,19 +255,13 @@ Page({
}, },
// 使用须知 // 使用须知
handleNotice() { handleNotice() {
console.log(this.data.orderInfo.particulars) this.setData({ winInstructions: true })
let showNotice = true
this.setData({
showNotice
})
}, },
// 一键扫码 // 一键扫码
onFastScan: function (event) { onCouponCodeScan: function (funcEvent) {
App.ui.showToast({ console.log('onCouponCodeScan')
iconType: 'loading', App.ui.showToast({ iconType: 'loading', title: '加载中' })
title: '加载中',
})
App.request({ App.request({
url: 'v1/order/getVolumesByOrderId', url: 'v1/order/getVolumesByOrderId',
params: { params: {
...@@ -188,203 +270,38 @@ Page({ ...@@ -188,203 +270,38 @@ Page({
}).then((response) => { }).then((response) => {
App.ui.hideToast() App.ui.hideToast()
let funcData = response.data let funcData = response.data
let funcGoodsList = this.data.goodsList
let funcList = [] let funcList = []
for (let i = 0, l = funcData.length; i < l; i++) { for (let i = 0, l = funcGoodsList.length; i < l; i++) {
let funcItem = { for (let ii = 0, ll = funcData.length; ii < ll; ii++) {
'name': funcData[i].name, if (funcGoodsList[i].couponId === funcData[ii].volumeId) {
'codeBase64': funcData[i].qrcode, funcList.push({
'codeNumber': funcData[i].serialNumber, 'couponId': funcData[ii].volumeId,
'state': Number(funcData[i].status), 'couponName': funcData[ii].name,
// 'couponCodeId': funcData[i].volumeId, 'couponNumber': funcData[ii].serialNumber,
} 'couponQrCode': funcData[ii].qrcode,
funcList.push(funcItem) 'couponState': Number(funcData[ii].status),
} })
this.setData({
winCouponCode: true,
couponCodeList: funcList
})
}).catch(() => {
})
},
swiperChange(e) {
let swiperCurrent = e.detail.current
this.setData({
swiperCurrent
})
},
closeQRcode() {
let winCouponCode = false
this.setData({
winCouponCode,
// swiperCurrent:0
})
},
/**
* 订单详情
* @function
* @param
* @returns
*/
queryOrderDetail: function () {
App.wxRequest({
url: 'v1/order/getOrderDetail',
data: {
'orderId': this.data.orderInfo.id
},
success: (response) => {
let funcResponse = response.data
let funcOrderInfo = {
'id': this.data.orderInfo.id,
'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': funcResponse.paymentTime ? 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.replace(/-/g, '.').replace('~', '-'), //订单有效期
'particulars': funcResponse.particulars
}
// 电影
if (funcOrderInfo.expireTime !== '' && Number(funcOrderInfo.commodityType) === -2) {
let funcDate = funcOrderInfo.expireTime.match(/[0-9]+\.[0-9]+\.[0-9]+/)[0]
let funcTime = funcOrderInfo.expireTime.match(/[0-9]+:[0-9]+/g)
// miment npm 包在 ios 下必须传 yyyy-mm-dd hh:mm:ss 格式,否则无法转换。
funcDate = funcDate.replace(/\./g, '-')
funcOrderInfo.expireTime = App.modular.miment(funcDate).format('MM月DD日') + ' ' + funcTime[0] + ' - ' + funcTime[1]
}
// 设置印章
let shopName = funcResponse.officeName;
let shopFilter = this.data.shopConfig.filter(
item => {
return item.name.toLowerCase() == shopName.toLowerCase() || shopName.toLowerCase().indexOf(item.name.toLowerCase()) != -1
}
)
funcOrderInfo.shopInfo = shopFilter[0]
// 添加订单商品列表
let funcCommodity = funcResponse.smOrderDetails
for (let i = 0, l = funcCommodity.length; i < l; i++) {
let funcCommodityItem = {
'cover': funcCommodity[i].imgUrl ? funcCommodity[i].imgUrl : this.data.resourcesBase + 'commodity/menu/commodity-item.png',
'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) {
this.setData({
residuePayTime: residuePayTime
})
} else {
clearInterval(timeInter)
let state = `orderInfo.state`
this.setData({
[state]: -1
})
}
}, 1000)
} }
this.setData({
orderInfo: funcOrderInfo
})
console.log(this.data.orderInfo)
} }
})
},
/**
* 查看兑换券码
* @function
* @param
* @returns
*/
onCouponCodeScan: function (funcEvent) {
this.setData({ winCouponCode: true })
let funcItem = funcEvent.currentTarget.dataset.item
if (!funcItem) return
let funcCouponCodeList = this.data.couponCodeList
for (let i = 0, l = funcCouponCodeList.length; i < l; i++ ) {
if (funcItem.couponCodeId === funcCouponCodeList[i].couponCodeId) {
this.setData({ couponCodeSelectionIndex: i })
break
}
}
},
// 弹出单张二维码 console.log(funcEvent)
onCouponCode: function (event) { let funcItem = funcEvent.currentTarget.dataset.item
let funcOrderInfo = event.currentTarget.dataset.item if (funcItem) {
App.ui.showToast({ for (let i = 0, l = funcList.length; i < l; i++ ) {
iconType: 'loading', if (funcItem.couponId === funcList[i].couponId) {
title: '加载中', this.setData({ couponCodeSelectionIndex: i })
duration: 60000, break
}) }
App.wxRequest({
url: 'v1/volume/getVolume',
data: {
'volumeId': funcOrderInfo.codeId
},
success: (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,
})
} }
})
},
/**
* 复制兑换券码
* @function
* @param
* @returns
*/
onCouponCodeCopy: function () {
wx.setClipboardData({
data: this.data.couponCodeList[this.data.couponCodeSelectionIndex].codeNumber,
})
},
onCouponCodeClose: function () { this.setData({
this.setData({ viewCouponCode: true,
winCouponCode: false, couponCodeList: funcList
}) })
}).catch(() => {})
}, },
navBack: function () { navBack: function () {
......
<m-toast></m-toast> <m-toast></m-toast>
<m-dialog></m-dialog> <m-dialog></m-dialog>
<m-nav titleText="订单详情" styleIndex="{{1}}" bind:navBack="navBack"></m-nav> <m-nav titleText="订单详情" styleIndex="{{1}}" bind:navBack="navBack"></m-nav>
<view class="container"> <view class="container">
<!-- 订单状态 --> <!-- 订单状态 -->
<view class="state row con-c"> <view class="state row cc">
<view class="state-content col con-c" wx:if="{{orderInfo.state === 0}}"> <view class="state-content column cc" wx:if="{{orderInfo.state === 0}}">
<view class="state-content-title row"> <view class="state-content-title row">
<text>订单待付款</text> <text>订单待付款</text>
</view> </view>
<view class="state-content-tip row"> <view class="state-content-tip row">
<text decode>请在&nbsp;</text> <text>{{'请在 ' + residuePayTime + ' 内付款,否则将自动取消订单'}}</text>
<text>{{residuePayTime}}</text>
<text decode>&nbsp;内付款,否则将自动取消订单</text>
</view> </view>
</view> </view>
<view class="state-content col con-c" wx:if="{{orderInfo.state === 3}}"> <view class="state-content column cc" wx:if="{{orderInfo.state === 3}}">
<view class="state-content-title row"> <view class="state-content-title row">
<text>订单待评价</text> <text>订单待评价</text>
</view> </view>
</view> </view>
<view class="state-content state-content-invalid col con-c" wx:if="{{orderInfo.state === 4}}"> <view class="state-content state-content-invalid column cc" wx:if="{{orderInfo.state === 4}}">
<view class="state-content-title row"> <view class="state-content-title row">
<text>订单已过期</text> <text>订单已过期</text>
</view> </view>
...@@ -29,47 +28,50 @@ ...@@ -29,47 +28,50 @@
<text>{{'有效期' + orderInfo.expireTime}}</text> <text>{{'有效期' + orderInfo.expireTime}}</text>
</view> </view>
</view> </view>
<view class="state-content state-content-invalid col con-c" wx:if="{{orderInfo.state === -1}}"> <view class="state-content state-content-invalid column cc" wx:if="{{orderInfo.state === -1}}">
<view class="state-content-title row"> <view class="state-content-title row">
<text>订单已取消</text> <text>订单已取消</text>
</view> </view>
<!-- <view class="state-content-tip row">
<text>下单后15分钟内未付款,自动取消订单</text>
</view> -->
</view> </view>
<view class="state-content state-content-invalid col con-c" wx:if="{{orderInfo.state === 6}}"> <view class="state-content state-content-invalid column cc" wx:if="{{orderInfo.state === 6}}">
<view class="state-content-title row"> <view class="state-content-title row">
<text>订单已评价</text> <text>订单已评价</text>
</view> </view>
</view> </view>
<view class="state-content state-content-invalid column cc" wx:if="{{orderInfo.state === 7}}">
<view class="state-content-title row">
<text>订单已完成</text>
</view>
</view>
</view> </view>
<!-- 订单信息 --> <!-- 订单信息 -->
<view class="info"> <view class="info">
<!-- 年卡月卡 --> <!-- 年卡月卡 -->
<block wx:if="{{orderInfo.commodityType === 1}}"> <block wx:if="{{orderInfo.goodsType === 1}}">
<view class="info-content col con-c"> <view class="info-content column cc">
<view class="info-content-item row"> <view class="info-content-item row">
<text class="info-content-item-label">使用门店</text> <text class="info-content-item-label">使用门店</text>
<text class="info-content-item-title">{{orderInfo.officeName}}</text> <text class="info-content-item-title">{{shopInfo.name}}</text>
</view> </view>
<view class="info-content-item row"> <view class="info-content-item row">
<text class="info-content-item-label"></text> <text class="info-content-item-label"></text>
<text class="info-content-item-describe">{{orderInfo.expireTime}}</text> <text class="info-content-item-describe">{{orderInfo.expireTime}}</text>
</view> </view>
<image class="seal-shot" src="{{resourcesBase+orderInfo.shopInfo.print}}"></image> <image class="seal-shot" src="{{resourcesBase + shopInfo.seal}}"></image>
</view> </view>
</block> </block>
<!-- 普通商品 --> <!-- 普通商品 -->
<block wx:if="{{orderInfo.commodityType === 2}}"> <block wx:if="{{orderInfo.goodsType === 2}}">
<view class="info-content col con-c"> <view class="info-content column cc">
<view class="info-content-item row"> <view class="info-content-item row">
<text class="info-content-item-label">使用门店</text> <text class="info-content-item-label">使用门店</text>
<text class="info-content-item-title">{{orderInfo.officeName}}</text> <text class="info-content-item-title">{{shopInfo.name}}</text>
</view> </view>
<view class="info-content-item row"> <view class="info-content-item row">
<text class="info-content-item-label"></text> <text class="info-content-item-label"></text>
<text class="info-content-item-describe">{{orderInfo.businessTime}}</text> <text class="info-content-item-describe">{{shopInfo.businessHours}}</text>
</view> </view>
<view class="info-content-item row"> <view class="info-content-item row">
...@@ -80,68 +82,68 @@ ...@@ -80,68 +82,68 @@
<text class="info-content-item-label"></text> <text class="info-content-item-label"></text>
<text class="info-content-item-tip">{{orderInfo.contactPhone}}</text> <text class="info-content-item-tip">{{orderInfo.contactPhone}}</text>
</view> </view>
<image wx:if="{{orderInfo.state!==2}}" class="seal-shot" src="{{resourcesBase+orderInfo.shopInfo.print}}"> <image wx:if="{{orderInfo.state !== 2}}" class="seal-shot" src="{{resourcesBase + shopInfo.seal}}">
</image> </image>
</view> </view>
<block wx:if="{{orderInfo.state===2}}"> <block wx:if="{{orderInfo.state === 2}}">
<view class="info-line row con-b align-c"> <view class="info-line row con-b ac">
<view class="info-line-point-left"></view> <view class="info-line-point-left"></view>
<view class="info-line-line"></view> <view class="info-line-line"></view>
<view class="info-line-point-right"></view> <view class="info-line-point-right"></view>
<image class="seal-long" src="{{resourcesBase+orderInfo.shopInfo.printUse}}"></image> <image class="seal-long" src="{{resourcesBase + shopInfo.seal}}"></image>
</view> </view>
<view class="info-code col con-c align-c"> <view class="info-code column cc ac">
<text>{{orderInfo.commodity.length}} 件商品可用</text> <text>{{goodsList.length + ' 件商品可用'}}</text>
<button bindtap="onFastScan" class="row con-c align-c">一键扫码</button> <button class="row cc ac" bindtap="onCouponCodeScan">一键扫码</button>
<text>{{'有效期' + orderInfo.expireTime}}</text> <text>{{'有效期' + orderInfo.expireTime}}</text>
</view> </view>
</block> </block>
</block> </block>
<!-- 餐品 文创 门票--> <!-- 餐品 文创 门票-->
<block wx:if="{{orderInfo.commodityType === 5 || orderInfo.commodityType === 4 || orderInfo.commodityType === 3}}"> <block wx:if="{{orderInfo.goodsType === 5 || orderInfo.goodsType === 4 || orderInfo.goodsType === 3}}">
<view class="info-content col con-c {{ orderInfo.state!==2?'p-relative':'' }}"> <view class="info-content column cc {{ orderInfo.state !== 2 ? 'p-relative' : '' }}">
<view class="info-content-item row"> <view class="info-content-item row">
<text class="info-content-item-label">使用门店</text> <text class="info-content-item-label">使用门店</text>
<text class="info-content-item-title">{{orderInfo.officeName}}</text> <text class="info-content-item-title">{{shopInfo.name}}</text>
</view> </view>
<view class="info-content-item row"> <view class="info-content-item row">
<text class="info-content-item-label"></text> <text class="info-content-item-label"></text>
<text class="info-content-item-describe">{{orderInfo.businessTime}}</text> <text class="info-content-item-describe">{{shopInfo.businessHours}}</text>
</view> </view>
<view class="info-content-item row"> <view class="info-content-item row">
<text class="info-content-item-label">订单信息</text> <text class="info-content-item-label">订单信息</text>
<text class="info-content-item-tip">{{orderInfo.contactName}}</text> <text class="info-content-item-tip">{{userInfo.name}}</text>
</view> </view>
<view class="info-content-item row"> <view class="info-content-item row">
<text class="info-content-item-label"></text> <text class="info-content-item-label"></text>
<text class="info-content-item-tip">{{orderInfo.contactPhone}}</text> <text class="info-content-item-tip">{{userInfo.phone}}</text>
</view> </view>
<image wx:if="{{orderInfo.state!==2}}" class="seal-shot" src="{{resourcesBase+orderInfo.shopInfo.print}}"> <image wx:if="{{orderInfo.state !== 2}}" class="seal-shot" src="{{resourcesBase + shopInfo.seal}}">
</image> </image>
</view> </view>
<block wx:if="{{orderInfo.state===2}}"> <block wx:if="{{orderInfo.state === 2}}">
<view class="info-line row con-b align-c"> <view class="info-line row con-b ac">
<view class="info-line-point-left"></view> <view class="info-line-point-left"></view>
<view class="info-line-line"></view> <view class="info-line-line"></view>
<view class="info-line-point-right"></view> <view class="info-line-point-right"></view>
<image class="seal-long" src="{{resourcesBase+orderInfo.shopInfo.printUse}}"></image> <image class="seal-long" src="{{resourcesBase + shopInfo.seal}}"></image>
</view> </view>
<view class="info-code col con-c align-c"> <view class="info-code column cc ac">
<text wx:if="{{orderInfo.commodityType === 5}}">{{'1 件餐品可用'}}</text> <text wx:if="{{orderInfo.goodsType === 5}}">{{'1 件餐品可用'}}</text>
<text wx:if="{{orderInfo.commodityType === 4}}">{{'1 件商品可用'}}</text> <text wx:if="{{orderInfo.goodsType === 4}}">{{'1 件商品可用'}}</text>
<text wx:if="{{orderInfo.commodityType === 3}}">{{orderInfo.commodity.length}}张门票可用</text> <text wx:if="{{orderInfo.goodsType === 3}}">{{goodsList.length}}张门票可用</text>
<button bindtap="onFastScan" class="row con-c align-c">一键扫码</button> <button bindtap="onCouponCodeScan" class="row cc ac">一键扫码</button>
<text>{{orderInfo.expireTime}}</text> <text>{{orderInfo.expireTime}}</text>
</view> </view>
</block> </block>
</block> </block>
<!-- 活动 --> <!-- 活动 -->
<block wx:if="{{orderInfo.commodityType === -1}}"> <block wx:if="{{orderInfo.goodsType === -1}}">
<view class="info-content col con-c"> <view class="info-content column cc">
<view class="info-content-item row"> <view class="info-content-item row">
<text class="info-content-item-label">报名活动</text> <text class="info-content-item-label">报名活动</text>
<text class="info-content-item-title">{{orderInfo.commodity[0].name}}</text> <text class="info-content-item-title">{{goodsList[0].name}}</text>
</view> </view>
<view class="info-content-item row"> <view class="info-content-item row">
<text class="info-content-item-label">活动时间</text> <text class="info-content-item-label">活动时间</text>
...@@ -149,40 +151,40 @@ ...@@ -149,40 +151,40 @@
</view> </view>
<view class="info-content-item row"> <view class="info-content-item row">
<text class="info-content-item-label">活动地点</text> <text class="info-content-item-label">活动地点</text>
<text class="info-content-item-describe">{{orderInfo.officeName}}</text> <text class="info-content-item-describe">{{shopInfo.name}}</text>
</view> </view>
<view class="info-content-item row"> <view class="info-content-item row">
<text class="info-content-item-label">订单信息</text> <text class="info-content-item-label">订单信息</text>
<text class="info-content-item-tip">{{orderInfo.contactName}}</text> <text class="info-content-item-tip">{{userInfo.name}}</text>
</view> </view>
<view class="info-content-item row"> <view class="info-content-item row">
<text class="info-content-item-label"></text> <text class="info-content-item-label"></text>
<text class="info-content-item-tip">{{orderInfo.contactPhone}}</text> <text class="info-content-item-tip">{{userInfo.phone}}</text>
</view> </view>
<image wx:if="{{orderInfo.state!==2}}" class="seal-shot" src="{{resourcesBase+orderInfo.shopInfo.print}}"> <image wx:if="{{orderInfo.state !==2 }}" class="seal-shot" src="{{resourcesBase + shopInfo.seal}}">
</image> </image>
</view> </view>
<block wx:if="{{orderInfo.state===2}}"> <block wx:if="{{orderInfo.state === 2}}">
<view class="info-line row con-b align-c"> <view class="info-line row con-b ac">
<view class="info-line-point-left"></view> <view class="info-line-point-left"></view>
<view class="info-line-line"></view> <view class="info-line-line"></view>
<view class="info-line-point-right"></view> <view class="info-line-point-right"></view>
<image class="seal-long" src="{{resourcesBase+orderInfo.shopInfo.printUse}}"></image> <image class="seal-long" src="{{resourcesBase + shopInfo.seal}}"></image>
</view> </view>
<view class="info-code col con-c align-c"> <view class="info-code column cc ac">
<text>{{orderInfo.commodity.length}}张门票可用</text> <text>{{goodsList.length}}张门票可用</text>
<button bindtap="onFastScan" class="row con-c align-c">一键扫码</button> <button bindtap="onCouponCodeScan" class="row cc ac">一键扫码</button>
<!-- <text>{{orderInfo.expireTime}}</text> --> <!-- <text>{{orderInfo.expireTime}}</text> -->
</view> </view>
</block> </block>
</block> </block>
<!-- 观影 --> <!-- 观影 -->
<block wx:if="{{orderInfo.commodityType === -2}}"> <block wx:if="{{orderInfo.goodsType === -2}}">
<view class="info-content col con-c"> <view class="info-content column cc">
<view class="info-content-item row"> <view class="info-content-item row">
<text class="info-content-item-label">电影</text> <text class="info-content-item-label">电影</text>
<text class="info-content-item-title">{{orderInfo.commodity[0].name}}</text> <text class="info-content-item-title">{{goodsList[0].name}}</text>
</view> </view>
<view class="info-content-item row"> <view class="info-content-item row">
<text class="info-content-item-label">场次</text> <text class="info-content-item-label">场次</text>
...@@ -190,39 +192,39 @@ ...@@ -190,39 +192,39 @@
</view> </view>
<view class="info-content-item row"> <view class="info-content-item row">
<text class="info-content-item-label">订单信息</text> <text class="info-content-item-label">订单信息</text>
<text class="info-content-item-tip">{{orderInfo.contactName}}</text> <text class="info-content-item-tip">{{userInfo.name}}</text>
</view> </view>
<view class="info-content-item row"> <view class="info-content-item row">
<text class="info-content-item-label"></text> <text class="info-content-item-label"></text>
<text class="info-content-item-tip">{{orderInfo.contactPhone}}</text> <text class="info-content-item-tip">{{userInfo.phone}}</text>
</view> </view>
<image wx:if="{{orderInfo.state!==2}}" class="seal-shot" src="{{resourcesBase+orderInfo.shopInfo.print}}"> <image wx:if="{{orderInfo.state !== 2}}" class="seal-shot" src="{{resourcesBase + shopInfo.seal}}">
</image> </image>
</view> </view>
<block wx:if="{{orderInfo.state===2}}"> <block wx:if="{{orderInfo.state === 2}}">
<view class="info-line row con-b align-c"> <view class="info-line row con-b ac">
<view class="info-line-point-left"></view> <view class="info-line-point-left"></view>
<view class="info-line-line"></view> <view class="info-line-line"></view>
<view class="info-line-point-right"></view> <view class="info-line-point-right"></view>
<image class="seal-long" src="{{resourcesBase+orderInfo.shopInfo.printUse}}"></image> <image class="seal-long" src="{{resourcesBase + shopInfo.seal}}"></image>
</view> </view>
<view class="info-code col con-c align-c"> <view class="info-code column cc ac">
<text>{{orderInfo.commodity.length}}张电影票可用</text> <text>{{goodsList.length}}张电影票可用</text>
<button bindtap="onFastScan" class="row con-c align-c">一键扫码</button> <button bindtap="onCouponCodeScan" class="row cc ac">一键扫码</button>
<!-- <text>{{orderInfo.expireTime}}</text> --> <!-- <text>{{orderInfo.expireTime}}</text> -->
</view> </view>
</block> </block>
</block> </block>
</view> </view>
<view wx:if="{{orderInfo.commodityType === 5}}" class="buy-content-art-tip row align-c"> <view wx:if="{{orderInfo.goodsType === 5}}" class="buy-content-art-tip row ac">
<image src="{{imageBase + 'icon/warning-4.png'}}"></image> <image src="{{imageBase + 'icon/warning-4.png'}}"></image>
<text>请在下单3天内取餐,逾期失效</text> <text>请在下单3天内取餐,逾期失效</text>
</view> </view>
<view class="notice-wrapper row con-e" bindtap="handleNotice"> <view class="notice-wrapper row ce ac" bindtap="handleNotice">
<view class="notice">使用须知</view> <view class="notice">使用须知</view>
<l-icon name="right" color="#959DAA" size="22" /> <image class="icon_32" src="{{imageBase + 'icon/arrow-r-2.png'}}"></image>
</view> </view>
<!-- 商品信息 --> <!-- 商品信息 -->
...@@ -231,29 +233,28 @@ ...@@ -231,29 +233,28 @@
<text>购买商品</text> <text>购买商品</text>
</view> </view>
<view class="commodity-list"> <view class="commodity-list">
<view class="commodity-shop-info row align-c"> <view class="commodity-shop-info row ac">
<view class="logo-box"> <view class="logo-box">
<image src="{{resourcesBase + orderInfo.shopInfo.logo}}" mode="aspectFit"></image> <image src="{{resourcesBase + shopInfo.logo}}" mode="aspectFit"></image>
</view> </view>
<text>{{orderInfo.officeName}}</text> <text>{{shopInfo.name}}</text>
</view> </view>
<block wx:for="{{orderInfo.commodity}}" wx:for-index="index" wx:for-item="item" wx:key="index"> <block wx:for="{{goodsList}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="commodity-item row align-c"> <view class="commodity-item row ac">
<image src="{{item.cover}}"></image> <image src="{{item.cover}}"></image>
<view class="commodity-item-info col con-a"> <view class="commodity-item-info column ca">
<view> <view>
<text>{{item.name}}</text> <text>{{item.name}}</text>
</view> </view>
<view class="row"> <view class="row">
<text>¥</text> <text>¥</text>
<text>{{item.amount}}</text> <text>{{item.priceTotal}}</text>
</view> </view>
</view> </view>
<view class="commodity-item-operation" wx:if="{{item.codeId}}"> <view class="commodity-item-operation" wx:if="{{item.couponId}}">
<!-- 状态(0已过期1带使用2已使用) --> <button wx:if="{{item.couponState === 1 && orderInfo.goodsType !== 5}}" class="row cc ac" data-item="{{item}}" bindtap="onCouponCodeScan">查看券码</button>
<button wx:if="{{item.state==1}}" class="row con-c align-c" data-item="{{item}}" bindtap="onCouponCode">查看券码</button> <button wx:if="{{item.couponState === 0}}" disabled class="row cc ac btn-disabled">已过期</button>
<button wx:if="{{item.state==0}}" disabled class="row con-c align-c btn-disabled">已过期</button> <button wx:if="{{item.couponState === 2}}" disabled class="row cc ac btn-disabled">已使用</button>
<button wx:if="{{item.state==2}}" disabled class="row con-c align-c btn-disabled">已使用</button>
</view> </view>
</view> </view>
</block> </block>
...@@ -262,74 +263,43 @@ ...@@ -262,74 +263,43 @@
<!-- 订单提示 --> <!-- 订单提示 -->
<view class="tip"> <view class="tip">
<view class="tip-pay row con-b align-c"> <view class="tip-pay row con-b ac">
<view class="tip-pay-title" wx:if="{{orderInfo.amount!==undefined}}"> <view class="tip-pay-title" wx:if="{{orderInfo.payAmount !== undefined}}">
<text wx:if="{{orderInfo.state === 0||orderInfo.state === -1}}">待付金额</text> <text wx:if="{{orderInfo.state === 0 || orderInfo.state === -1}}">待付金额</text>
<text wx:else>实付金额</text> <text wx:else>实付金额</text>
</view> </view>
<view class="tip-pay-amount"> <view class="tip-pay-amount">
<text>¥</text> <text>¥</text>
<text>{{orderInfo.amount}}</text> <text>{{orderInfo.payAmount}}</text>
</view> </view>
</view> </view>
<view class="tip-describe col"> <view class="tip-describe col">
<text>{{'订单编号:' +( orderInfo.tipOrderNo?orderInfo.tipOrderNo:"")}}</text> <text>{{'订单编号:' + ( orderInfo.number ? orderInfo.number : "")}}</text>
<text>{{'下单时间:' + (orderInfo.tipTimeSubmit?orderInfo.tipTimeSubmit:'')}}</text> <text>{{'下单时间:' + (orderInfo.submitTime ? orderInfo.submitTime : '')}}</text>
<text wx:if="{{orderInfo.state !== 0 && orderInfo.state !== -1}}">{{'付款时间:' + (orderInfo.tipTimePay?orderInfo.tipTimePay:'')}}</text> <text wx:if="{{orderInfo.state !== 0 && orderInfo.state !== -1}}">{{'付款时间:' + (orderInfo.payTime ? orderInfo.payTime : '')}}</text>
<text wx:if="{{orderInfo.state !== 0 && orderInfo.state !== -1&&orderInfo.tipIntegral}}">{{'获得积分:' + (orderInfo.tipIntegral?orderInfo.tipIntegral:'') + '分'}}</text> <text wx:if="{{orderInfo.state !== 0 && orderInfo.state !== -1&&orderInfo.integral}}">{{'获得积分:' + (orderInfo.integral ? orderInfo.integral : '') + '分'}}</text>
</view> </view>
</view> </view>
</view> </view>
<!-- 底部按钮 --> <!-- 底部按钮 -->
<view class="footer-btn row con-e" wx:if="{{orderInfo.state !== 2}}"> <view class="footer-btn row ce" wx:if="{{orderInfo.state !== 2}}">
<!-- 状态(-1已取消,0未付款,1未发货,2待使用,3已使用,4已过期,5已发货,6已关闭/已评价) --> <!-- 状态(-1已取消,0未付款,1未发货,2待使用,3已使用,4已过期,5已发货,6已关闭/已评价) -->
<view class="delete-btn" bindtap="onDelOrCancelOrder" data-type='0' wx:if="{{orderInfo.state===0}}">取消订单</view> <view class="delete-btn" bindtap="onDelOrCancelOrder" data-type='0' wx:if="{{orderInfo.state === 0}}">取消订单</view>
<view class="order-btn" bindtap="onOrderPay" wx:if="{{orderInfo.state===0}}">去支付</view> <view class="order-btn" bindtap="onOrderPay" wx:if="{{orderInfo.state === 0}}">去支付</view>
<view class="order-btn" bindtap="onOrderEvaluate" wx:if="{{orderInfo.state===3}}">去评价</view> <view class="order-btn" bindtap="onOrderEvaluate" wx:if="{{orderInfo.state === 3}}">去评价</view>
<view class="delete-btn" bindtap="onDelOrCancelOrder" data-type='1' wx:if="{{orderInfo.state===4||orderInfo.state===-1||orderInfo.state===6}}">删除订单</view> <view class="delete-btn" bindtap="onDelOrCancelOrder" data-type='1' wx:if="{{orderInfo.state === 4 || orderInfo.state === -1 || orderInfo.state === 6}}">删除订单</view>
<view class="order-btn" bindtap="onOrderAgain" wx:if="{{orderInfo.state===-1}}">再次下单</view> <view class="order-btn" bindtap="onOrderAgain" wx:if="{{orderInfo.state === -1}}">再次下单</view>
</view> </view>
<!-- 二维码弹窗 --> <!-- 二维码弹窗 -->
<view class="dialog_coupon_code row cc ac" wx:if="{{winCouponCode}}"> <coupon-code couponCodeList="{{couponCodeList}}" couponCodeSelectionIndex="{{couponCodeSelectionIndex}}" viewCouponCode="{{viewCouponCode}}"></coupon-code>
<view class="dialog_coupon_code_wrap col cc ac">
<text class="font_normal_26 color_submit">{{'请将券码出示给门店核销人员'}}</text>
<swiper class="dialog_coupon_code_swiper" current="{{couponCodeSelectionIndex}}">
<swiper-item class="dialog_coupon_code_item row cc" wx:for="{{couponCodeList}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="dialog_coupon_code_info col cc ac">
<!-- 无效券码蒙尘样式 -->
<view class="dialog_coupon_code_mask" wx:if="{{item.state === 2}}"></view>
<image mode="aspectFill" class="dialog_coupon_code_seal" wx:if="{{item.state === 2}}" src="{{resourcesBase + 'mine/server/codeUsed.png'}}"></image>
<text class="font_normal_30 color_regular">{{item.name}}</text>
<image class="dialog_coupon_code_content" src="{{'data:image/png;base64,' + item.codeBase64}}"></image>
<view class="dialog_coupon_code_operation row con-b ac">
<block wx:if="{{item.state === 1}}">
<text class="font_bold_26 color_secondary">券码</text>
<text class="font_bold_30 color_regular">{{item.codeNumber}}</text>
<text class="font_bold_26 color_primary" bindtap="onCouponCodeCopy">复制</text>
</block>
<block wx:if="{{item.state === 2}}">
<text class="font_bold_26 color_secondary">券码</text>
<text class="font_bold_30 color_secondary text_decoration_delete" wx:if="{{item.state === 2}}">{{item.codeNumber}}</text>
<text class="font_bold_26 color_primary" space="nbsp">  </text>
</block>
</view>
</view>
</swiper-item>
</swiper>
<view class="dialog_coupon_code_close row cc ac" bindtap="onCouponCodeClose">
<image class="icon_48" src="{{imageBase + 'icon/close-1.png'}}"></image>
</view>
</view>
</view>
<m-popup isShow="{{showNotice}}"> <m-popup isShow="{{winInstructions}}">
<view class="popup_container column" slot="content"> <view class="popup_container column" slot="content">
<text class="popup_title font_bold_42 color_regular">使用须知</text> <text class="popup_title font_bold_42 color_regular">使用须知</text>
<view class="popup_content"> <view class="popup_content">
<rich-text nodes="{{orderInfo.particulars}}"></rich-text> <rich-text nodes="{{orderInfo.instructions}}"></rich-text>
</view> </view>
</view> </view>
</m-popup> </m-popup>
\ No newline at end of file
...@@ -216,10 +216,11 @@ ...@@ -216,10 +216,11 @@
border-bottom: 1px #e2e7ef solid; border-bottom: 1px #e2e7ef solid;
} }
.commodity-item>image { .commodity-item > image {
width: 140rpx; width: 140rpx;
height: 136rpx; height: 136rpx;
margin-right: 24rpx; margin-right: 24rpx;
background: #999999;
} }
.commodity-item-info { .commodity-item-info {
...@@ -411,21 +412,20 @@ ...@@ -411,21 +412,20 @@
} }
/* 印章图 */ /* 印章图 */
.seal-shot { .seal-shot {
width: 166rpx;
height: 166rpx;
position: absolute; position: absolute;
right: -30rpx; right: -30rpx;
bottom: -30rpx; bottom: -30rpx;
width: 166rpx;
height: 164rpx;
} }
.seal-long { .seal-long {
width: 166rpx;
height: 200rpx;
position: absolute; position: absolute;
right: 0; right: 0;
bottom: -30rpx; bottom: -30rpx;
width: 166rpx;
height: 164rpx;
} }
.p-relative { .p-relative {
...@@ -661,10 +661,6 @@ ...@@ -661,10 +661,6 @@
width: 60%; width: 60%;
} }
.l-popup-bg {
background: rgba(0, 0, 0, 0.4);
}
.tips-wrapper { .tips-wrapper {
margin: 40rpx 40rpx 0; margin: 40rpx 40rpx 0;
} }
...@@ -851,11 +847,6 @@ ...@@ -851,11 +847,6 @@
background: #86c5e1; background: #86c5e1;
} }
image {
width: 100%;
height: 100%;
}
.logo-box { .logo-box {
width: 100rpx; width: 100rpx;
height: 80rpx; height: 80rpx;
...@@ -888,75 +879,4 @@ image { ...@@ -888,75 +879,4 @@ image {
width: 28rpx; width: 28rpx;
height: 28rpx; height: 28rpx;
margin-right: 14rpx; margin-right: 14rpx;
}
/* 券码弹窗 */
.dialog_coupon_code {
z-index: 7;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, .65);
}
.dialog_coupon_code_swiper {
width: 750rpx;
height: 730rpx;
}
.dialog_coupon_code_item {
left: 88rpx;
width: 574rpx !important;
height: 666rpx;
}
.dialog_coupon_code_info {
position: relative;
width: 526rpx;
height: 666rpx;
margin: 56rpx 0 48rpx 0;
border-radius: 2px;
background: #FFFFFF;
}
.dialog_coupon_code_mask {
position: absolute;
top: 154rpx;
left: 116rpx;
width: 296rpx;
height: 296rpx;
background: rgba(255, 255, 255, .8);
}
.dialog_coupon_code_seal {
position: absolute;
top: 252rpx;
right: -68rpx;
width: 254rpx;
height: 254rpx;
}
.dialog_coupon_code_content {
width: 296rpx;
height: 296rpx;
margin: 56rpx 0 0 0;
}
.dialog_coupon_code_operation {
width: 446rpx;
height: 96rpx;
margin: 56rpx 0 0 0;
padding: 0 24rpx;
border-radius: 2px;
background: #F2F3F5;
}
.dialog_coupon_code_close {
width: 80rpx;
height: 80rpx;
border-radius: 50%;
margin: 32rpx 0 0 0;
background: rgba(254, 252, 249, 0.5);
} }
\ No newline at end of file
...@@ -17,6 +17,7 @@ Page({ ...@@ -17,6 +17,7 @@ Page({
}, },
onLoad: function (options) { onLoad: function (options) {
console.log(options)
this.setData({ this.setData({
id: options.id id: options.id
}) })
......
...@@ -601,7 +601,6 @@ ...@@ -601,7 +601,6 @@
} }
/* 评论 */ /* 评论 */
.evaluate { .evaluate {
padding-bottom: 160rpx; padding-bottom: 160rpx;
} }
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"ignore": [] "ignore": []
}, },
"setting": { "setting": {
"urlCheck": false, "urlCheck": true,
"es6": true, "es6": true,
"enhance": true, "enhance": true,
"postcss": true, "postcss": true,
...@@ -28,12 +28,12 @@ ...@@ -28,12 +28,12 @@
"disablePlugins": [], "disablePlugins": [],
"outputPath": "" "outputPath": ""
}, },
"enableEngineNative": false,
"useIsolateContext": true, "useIsolateContext": true,
"useCompilerModule": true, "useCompilerModule": true,
"userConfirmedUseCompilerModuleSwitch": false, "userConfirmedUseCompilerModuleSwitch": false,
"packNpmManually": false, "packNpmManually": false,
"packNpmRelationList": [], "packNpmRelationList": [],
"enableEngineNative": false,
"minifyWXSS": true "minifyWXSS": true
}, },
"compileType": "miniprogram", "compileType": "miniprogram",
......
...@@ -2,9 +2,8 @@ let funcPageExtend = function (App) { ...@@ -2,9 +2,8 @@ let funcPageExtend = function (App) {
let funcPage = Page let funcPage = Page
Page = function (funcOption) { Page = function (funcOption) {
// 增加全局资源引用路径 // 页面全局变量初始化。
funcOption.data = Object.assign(funcOption.data, { funcOption.data = Object.assign(funcOption.data, {
'appStatus': App.globalData.appStatus,
'imageBase': App.globalData.appImageBase, 'imageBase': App.globalData.appImageBase,
'resourcesBase': App.globalData.appResourcesBase, 'resourcesBase': App.globalData.appResourcesBase,
'isViewDataReady': false, // 视图显示控制,当页面数据请求到位时设置为 true ,以显示视图。避免请求过程中页面显示不完整问题。 'isViewDataReady': false, // 视图显示控制,当页面数据请求到位时设置为 true ,以显示视图。避免请求过程中页面显示不完整问题。
......
...@@ -58,14 +58,26 @@ let Output = { ...@@ -58,14 +58,26 @@ let Output = {
break break
case 200: case 200:
return { if (funcResponse.data.data) {
success: true, return {
response: { success: true,
code: funcResponse.data.code, response: {
data: funcResponse.data.data, code: funcResponse.data.code,
message: funcResponse.data.msg data: funcResponse.data.data,
message: funcResponse.data.msg
}
}
}
if (funcResponse.data.list) {
return {
success: true,
response: {
code: funcResponse.data.code,
data: funcResponse.data.list,
message: funcResponse.data.msg
} }
} }
}
break break
case 402: case 402:
......
const output = { const output = {
// 二期测试环境 // 二期测试环境
baseUrl: 'https://sm-web2.meiqicloud.com/api/', // baseUrl: 'https://sm-web2.meiqicloud.com/api/',
// 三期测试环境 // 三期测试环境
// baseUrl: 'https://sm-web.meiqicloud.com/api/', baseUrl: 'https://sm-web.meiqicloud.com/api/',
// 正式环境 // 正式环境
......
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