Commit 67aac7a4 by 严立

LL - 支付流程,订单详情

parent 48479f01
......@@ -171,7 +171,7 @@ Component({
wx.navigateBack({
delta: 1
})
this.triggerEvent('back', { back: 1 })
this.triggerEvent('navBack', { back: 1 })
},
/**
......@@ -181,7 +181,7 @@ Component({
* @returns
*/
onHome: function () {
this.triggerEvent('home', {});
this.triggerEvent('navHome', {});
},
/**
......
......@@ -10,18 +10,18 @@ let Development = {
{ appId: 4, id: '81078c007c034d46b7dfe59935d84f7a', name: '原野MOJITO' },
{ appId: 5, id: 'b8f04379bf164b7f8bca69be14146a17', name: '拾光花坊' },
{ appId: 6, id: 'd0e5ff414f794e15bc33c4e11f5356a8', name: '原味舒食' },
{ appId: 7, id: 'd8922a8f759245d4949b62693099edb5', name: '元养水韵SPA' },
{ appId: 7, id: 'd8922a8f759245d4949b62693099edb5', name: '元养水韵SPA' },
],
// 门店信息
shopId: [
{ appId: 1, id: '581be62a80bb4f0485abd87abcf64dc0', name: '海错图', logo: 'shopping-cart-logo-4.png', title: ['海错图', '海错图购票', '海错图', '海错图文创店', '海错图', '海错图', '海错图'] },
{ appId: 2, id: '3cfe2e3b8b4342e8b62f8b45daf60d91', name: '星空影院', logo: 'shopping-cart-logo-6.png', title: ['星空影院', '星空影院', '星空影院', '星空影院', '星空影院', '星空影院', '星空影院'] },
{ appId: 3, id: '8a3e59c57f564c569b3d7bb278ea50b3', name: '儿童营地', logo: 'shopping-cart-logo-6.png', title: ['儿童营地', '儿童营地入园购票', '儿童营地', '儿童营地', '儿童营地', '儿童营地接待区', '儿童营地'] },
{ appId: 4, id: 'c63893bb472f43bca4ec72f890bcb4fd', name: '原野MOJITO', logo: 'shopping-cart-logo-6.png', title: ['原野MOJITO', '原野MOJITO', '原野MOJITO', '原野MOJITO', '原野MOJITO', '原野MOJITO', '原野MOJITO'] },
{ appId: 5, id: '26c40446fc454a02abe61758176597f6', name: '拾光花坊', logo: 'shopping-cart-logo-7.png', title: ['拾光花坊', '拾光花坊', '拾光花坊', '拾光花坊', '拾光花坊', '拾光花坊', '拾光花坊'] },
{ appId: 6, id: 'd9436d7018de43809824b6ec221ea01f', name: '原味舒食', logo: 'shopping-cart-logo-1.png', title: ['原味舒食', '原味舒食', '原味舒食', '原味舒食', '原味舒食', '原味舒食', '原味舒食'] },
{ appId: 7, id: '2614f117406548718bc091f24368c16e', name: '元养水韵SPA', logo: 'shopping-cart-logo-7.png', title: ['元养水韵SPA', '元养水韵SPA', '元养水韵SPA', '元养水韵SPA', '元养水韵SPA', '元养水韵SPA', '元养水韵SPA'] },
{ appId: 1, id: '581be62a80bb4f0485abd87abcf64dc0', logo: 'shop/logo-1.png', cover: 'shop/cover-1.png', name: '海错图', title: ['海错图', '海错图购票', '海错图', '海错图文创店', '海错图', '海错图', '海错图'] },
{ appId: 2, id: '3cfe2e3b8b4342e8b62f8b45daf60d91', logo: 'shop/logo-2.png', cover: 'shop/cover-2.png', name: '星空影院', title: ['星空影院', '星空影院', '星空影院', '星空影院', '星空影院', '星空影院', '星空影院'] },
{ appId: 3, id: '8a3e59c57f564c569b3d7bb278ea50b3', logo: 'shop/logo-3.png', cover: 'shop/cover-3.png', name: '儿童营地', title: ['儿童营地', '儿童营地入园购票', '儿童营地', '儿童营地', '儿童营地', '儿童营地接待区', '儿童营地'] },
{ appId: 4, id: 'c63893bb472f43bca4ec72f890bcb4fd', logo: 'shop/logo-4.png', cover: 'shop/cover-4.png', name: '原野MOJITO', title: ['原野MOJITO', '原野MOJITO', '原野MOJITO', '原野MOJITO', '原野MOJITO', '原野MOJITO', '原野MOJITO'] },
{ appId: 5, id: '26c40446fc454a02abe61758176597f6', logo: 'shop/logo-5.png', cover: 'shop/cover-5.png', name: '拾光花坊', title: ['拾光花坊', '拾光花坊', '拾光花坊', '拾光花坊', '拾光花坊', '拾光花坊', '拾光花坊'] },
{ appId: 6, id: 'd9436d7018de43809824b6ec221ea01f', logo: 'shop/logo-6.png', cover: 'shop/cover-6.png', name: '原味舒食', title: ['原味舒食', '原味舒食', '原味舒食', '原味舒食', '原味舒食', '原味舒食', '原味舒食'] },
{ appId: 7, id: '2614f117406548718bc091f24368c16e', logo: 'shop/logo-7.png', cover: 'shop/cover-7.png', name: '元养水韵SPA', title: ['元养水韵SPA', '元养水韵SPA', '元养水韵SPA', '元养水韵SPA', '元养水韵SPA', '元养水韵SPA', '元养水韵SPA'] },
]
}
......
......@@ -178,6 +178,7 @@ Page({
'appId': funcShopId[i].appId,
'name': funcShopId[i].title[funcShopType],
'logo': funcShopId[i].logo,
'cover': funcShopId[i].cover,
'shopType': funcShopType,
}
wx.setStorageSync('shopInfoBuffer', funcShopInfo)
......
......@@ -2,7 +2,8 @@
<view class="container">
<view class="shop-info row align-c">
<image wx:if="{{shopLogo}}" mode="aspectFill" src="{{resourcesBase + 'commodity/' + shopLogo}}" />
<image wx:if="{{shopLogo}}" src="{{resourcesBase + shopLogo}}" mode="left"></image>
<text>{{shopName}}</text>
<text bindtap="onClearn">清空</text>
</view>
......@@ -80,8 +81,9 @@
</view>
<!-- 只有在食品购物车才出现 -->
<view class="pay-tip" wx:if="{{isFoodCart && cart.length > 0}}">
<Tips text="请在下单内3天内取餐,逾期无效"></Tips>
<view class="pay-tip row align-c" wx:if="{{isFoodCart && cart.length > 0}}">
<image src="{{imageBase + 'icon/warning-4.png'}}"></image>
<text>请在下单3天内取餐,逾期无效</text>
</view>
<view class="pay row con-c align-c">
......
Page {
position: relative;
height: 100%;
}
.navigation {
z-index: 1100;
position: fixed;
......@@ -23,11 +18,20 @@ Page {
}
.shop-info > image {
width: 400rpx;
height: 100rpx;
max-width: 120rpx;
height: 100%;
}
.shop-info > text {
.shop-info > text:nth-child(2) {
flex-grow: 1;
height: 42rpx;
font-size: 30rpx;
font-weight: 500;
line-height: 42rpx;
color: #586A46;
}
.shop-info > text:nth-child(3) {
flex-grow: 1;
height: 100rpx;
text-align: right;
......@@ -191,6 +195,22 @@ Page {
bottom: 200rpx;
width: 750rpx;
height: 72rpx;
padding: 0 40rpx;
background: #F5EEDF;
}
.pay-tip > image {
width: 32rpx;
height: 32rpx;
margin-right: 12rpx;
}
.pay-tip > text {
height: 32rpx;
font-size: 22rpx;
font-weight: 400;
line-height: 32rpx;
color: #837048;
}
/* 结算区域 */
......@@ -295,9 +315,4 @@ Page {
font-size: 30rpx;
color: #fff;
background-color: #86c5e1;
}
image {
width: 100%;
height: 100%;
}
\ No newline at end of file
......@@ -19,7 +19,7 @@ Page({
})
},
back: function (e) {
navBack: function (e) {
if (this.data.islogin && this.data.isphone) {
console.log('授权及绑定成功')
} else {
......
<!--pages/login/login.wxml-->
<navigation class="navigation" backIcon="/image/back-w.png" bindback="back"></navigation>
<navigation class="navigation" backIcon="/image/back-w.png" bind:navBack="navBack"></navigation>
<view class="container">
<view style="height:{{height}}px;overflow:hidden;">
<image class="bgClass" src="http://upload.miaomiao-bao.com/97b52202008201410189925.png"></image>
......
......@@ -5,7 +5,7 @@
<image class="background-image" src="./image/mine.png"></image>
<view class="row align-c">
<view class="mine-avatar" bindtap="checkRegister">
<l-avatar size="112" src="{{userInfo.avatar}}"/>
<image src="{{userInfo.avatar ? userInfo.avatar : './image/avatar.png'}}"></image>
</view>
<view wx:if="{{isRegister}}" class="mine-info col">
......
......@@ -25,6 +25,12 @@
margin-right: 32rpx;
}
.mine-avatar > image {
width: 128rpx;
height: 128rpx;
border-radius: 50%;
}
.mine-info view:nth-child(1) text {
z-index: 11;
margin-right: 20rpx;
......
......@@ -151,6 +151,7 @@ Page({
'orderTypeTitle': funcItem.name,
'orderTypeActive': funcIndex,
'orderPages': 1,
'orderList': [],
})
this.queryOrder()
......@@ -166,6 +167,7 @@ Page({
this.setData({
'statusActive': Number(event.currentTarget.dataset.type),
'orderPages': 1,
'orderList': [],
})
this.queryOrder()
......
......@@ -65,7 +65,7 @@
<view class="order-list-item col align-c" data-item="{{item}}" bindtap="onOrderDetail">
<view class="order-list-item-title row con-b align-c">
<view class="row align-c">
<image wx:if="{{item.shopLogo}}" src="{{resourcesBase + 'commodity/' + item.shopLogo}}"></image>
<image wx:if="{{item.shopLogo}}" src="{{resourcesBase + item.shopLogo}}" mode="heightFix"></image>
<text>{{item.name}}</text>
</view>
<view>
......
page {
height: 100%;
}
.navigation-order {
z-index: 1700;
position: fixed;
......@@ -5,13 +9,12 @@
left: 0;
width: 750rpx;
height: 176rpx;
padding: 0 24rpx;
background: #FFFFFF;
}
.navigation-order image {
width: 64rpx;
height: 64rpx;
width: 50rpx;
height: 50rpx;
}
.order-type {
......@@ -107,6 +110,7 @@
/* 订单列表 */
.order-list {
width: 750rpx;
height: 100%;
padding-bottom: 120rpx;
background: linear-gradient(180deg, #FFFFFF 0%, #F3F4F6 100%);
}
......@@ -139,7 +143,6 @@
max-width: 100rpx;
height: 60rpx;
margin-right: 20rpx;
background: #999999;
}
.order-list-item-service {
......
......@@ -57,5 +57,5 @@ Page({
case 5:
break
}
}
},
})
\ No newline at end of file
......@@ -9,6 +9,7 @@ Page({
orderType: 1, // 1 - 年卡/月卡,2 - 次票, 3 - SPA, 4 - 文创, 5 - 餐品, 6 - 活动, 7 - 观影
orderInfo: {},
fromPage: '',
winCode: false,
},
......@@ -18,7 +19,8 @@ Page({
funcOrderInfo.id = options.id
this.setData({
shopInfo: wx.getStorageSync('shopInfoBuffer'),
orderInfo: funcOrderInfo
orderInfo: funcOrderInfo,
fromPage: options.fromPage === 'order' ? 'order' : ''
})
this.queryOrderDetail()
......@@ -91,4 +93,13 @@ Page({
})
console.log(funcOrderInfo)
},
navBack: function () {
if (this.data.fromPage) {
wx.switchTab({
url: '/pages/mine/home/home',
})
}
console.log('navBack')
}
})
\ No newline at end of file
{
"usingComponents": {
"Tips": "../../../component/Tips/Tips",
"Blank": "../../../component/Blank/Blank"
},
"navigationBarTitleText": "订单详情",
"navigationStyle": "default",
"navigationBarBackgroundColor": "#fff"
"usingComponents": {}
}
\ No newline at end of file
<!-- <navigation class="navigation" titleText="订单详情" color="#ffffff" background="#FFFFFF"></navigation> -->
<navigation class="navigation" titleText="订单详情" color="#000000" background="#FFFFFF" backIcon="/image/back.png" bind:navBack="navBack"></navigation>
<view class="container">
<!-- 订单状态 -->
......@@ -130,7 +130,7 @@
</view>
<view class="commodity-list">
<view class="commodity-shop-info row align-c">
<image src="{{resourcesBase + 'commodity/' + shopInfo.logo}}"></image>
<image src="{{resourcesBase + shopInfo.logo}}"></image>
<text>{{shopInfo.name}}</text>
</view>
<block wx:for="{{orderInfo.commodity}}" wx:for-index="index" wx:for-item="item" wx:key="index">
......
......@@ -3,6 +3,10 @@
width: 750rpx;
}
.container {
margin-top: 160rpx;
}
.state-content {
width: 670rpx;
height: 240rpx;
......
......@@ -17,11 +17,12 @@ let pagePayId = ''
Page({
data: {
imageBase: App.globalData.appImageBase,
resourcesBase: App.globalData.appResourcesBase,
animation: {},
shopInfo: {},
orderId: '',
orderType: 1, // 1 - 年卡/月卡,2 - 次票, 3 - SPA, 4 - 文创, 5 - 餐品, 6 - 活动, 7 - 观影
formName: '',
......@@ -468,11 +469,13 @@ Page({
let funcRegisterInfo = this.data.registerInfo
for (let i = 0, l = funcRegisterInfo.length; i < l; i++) {
if (funcRegisterInfo[i].name === '' || funcRegisterInfo[i].errorName !== '') {
this.setUserInfo('name', funcRegisterInfo[i].name, i, App.modular.rule.item('name', funcRegisterInfo[i].name))
funcPass = false
break
}
if (funcRegisterInfo[i].phone === '' || funcRegisterInfo[i].errorPhone !== '') {
this.setUserInfo('phone', funcRegisterInfo[i].phone, i, App.modular.rule.item('phone', funcRegisterInfo[i].phone))
funcPass = false
break
}
......@@ -480,6 +483,7 @@ Page({
// 仅在需要的订单场景下校验
if ([1].indexOf(this.data.orderType) >= 0) {
if (funcRegisterInfo[i].identity === '' || funcRegisterInfo[i].errorIdentity !== '') {
this.setUserInfo('identity', funcRegisterInfo[i].identity, i, App.modular.rule.item('identity', funcRegisterInfo[i].identity))
funcPass = false
break
}
......@@ -545,6 +549,9 @@ Page({
success: (response) => {
let funcResponse = response.data.wxRequest
pagePayId = response.data.orderId
this.setData({
orderId: pagePayId
})
wx.requestPayment({
'timeStamp': funcResponse.timeStamp,
......@@ -612,7 +619,7 @@ Page({
payStatus: function (funcPayResult) {
clearInterval(App.globalData.payStateTimer)
wx.navigateTo({
url: '/pages/pay/order-state/order-state?state=' + funcPayResult + '&amount=' + this.data.buyContentAmount
url: '/pages/pay/order-state/order-state?state=' + funcPayResult + '&amount=' + this.data.buyContentAmount + '&orderId=' + this.data.orderId
})
},
})
\ No newline at end of file
......@@ -18,7 +18,7 @@
<view class="buy-content-service row align-c" wx:if="{{orderType === 3}}">
<view class="row con-c align-c">
<image src="{{buyContentCover}}"></image>
<image src="{{resourcesBase + shopInfo.cover}}"></image>
</view>
<view class="buy-content-service-info col con-b">
<text>{{buyContentTitle}}</text>
......@@ -32,7 +32,7 @@
</view>
<view class="buy-content-art-item row align-c">
<view class="row con-c align-c">
<image src="{{buyContentCover}}"></image>
<image src="{{resourcesBase + shopInfo.cover}}"></image>
</view>
<view class="buy-content-art-info col con-c">
<text>{{buyContentTitle}}</text>
......@@ -47,7 +47,7 @@
</view>
<view class="buy-content-art-item row align-c">
<view class="row con-c align-c">
<image src="{{buyContentCover}}"></image>
<image src="{{resourcesBase + shopInfo.cover}}"></image>
</view>
<view class="buy-content-art-info col con-c">
<text>{{buyContentTitle}}</text>
......@@ -61,7 +61,7 @@
</view>
<view class="buy-content-activity row align-c" wx:if="{{orderType === 6}}">
<image src="{{buyContentCover}}"></image>
<image src="{{resourcesBase + shopInfo.cover}}"></image>
<view class="buy-content-activity-info col con-b">
<view class="title">
<text>{{buyContentTitle}}</text>
......@@ -76,7 +76,7 @@
</view>
<view class="buy-content-activity row align-c" wx:if="{{orderType === 7}}">
<image src="{{buyContentCover}}"></image>
<image src="{{resourcesBase + shopInfo.cover}}"></image>
<view class="buy-content-activity-info col con-b">
<view class="title">
<text>{{buyContentTitle}}</text>
......
......@@ -6,6 +6,7 @@ Page({
payState: '',
payAmount: 0,
orderId: '',
},
onLoad: function (options) {
......@@ -22,6 +23,10 @@ Page({
payAmount: App.modular.utils.formatAmount(Number(options.amount * 100))
})
}
this.setData({
orderId: options.orderId
})
},
onHome: function () {
......@@ -31,6 +36,8 @@ Page({
},
onPayDetail: function () {
wx.reLaunch({
url: '/pages/pay/order-detail/order-detail?id=' + this.data.orderId + '&fromPage=order'
})
},
})
\ No newline at end of file
......@@ -58,6 +58,7 @@ Page({
onLoad: function (options) {
this.setNavigationLogo()
this.queryActivity()
},
onShow: function () {
......@@ -81,6 +82,10 @@ Page({
})
},
queryActivity: function () {
},
/**
* 设置标题高度
* @function
......
......@@ -16,7 +16,7 @@
</view>
<view class="title-wrapper row con-b align-c">
<image class="title">近期活动</image>
<image class="title" src="./image/title-activity.png">近期活动</image>
<text bindtap="onAllRecent">查看全部</text>
</view>
<swiper class="recent-swiper" next-margin="38rpx" bindchange="swiperRecentChange">
......@@ -28,8 +28,8 @@
</swiper>
<view class="title-wrapper row con-b align-c">
<image class="title">近期活动</image>
<image class="all" bindtap="onAllRecent">查看全部</image>
<image class="title" src="./image/title-movie.png">热映影片</image>
<text bindtap="onAllRecent">查看全部</text>
</view>
<swiper class="movie-swiper" next-margin="38rpx" bindchange="swiperMovieChange">
<block wx:for="{{movieList}}" wx:key="id">
......@@ -69,4 +69,11 @@
</swiper-item>
</block>
</swiper>
<view class="title-wrapper row align-c">
<image class="title" src="./image/title-route.png">游客攻略</image>
</view>
<view>
</view>
</view>
\ No newline at end of file
......@@ -83,8 +83,7 @@
}
.title {
width: 184rpx;
height: 64rpx;
background-color: #ccc;
height: 44rpx;
}
.all {
width: 104rpx;
......
// 程序缓存关键字说明
// shopInfoBuffer: 门店详情信息
// buyCommodityInfo: 当前购买商品信息 - 单一种类
// buyCommodityInfoList: 当前购买商品信息 - 多种种类
\ No newline at end of file
// orderInfoBuffer: 订单信息缓存
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment