Commit 23943668 by 严立

LL - 订单支付

parent b92a75d6
...@@ -116,25 +116,26 @@ App({ ...@@ -116,25 +116,26 @@ App({
this.wxRequest({ this.wxRequest({
url: '/api/v1/login/getSmallSession?code=' + res.code, url: '/api/v1/login/getSmallSession?code=' + res.code,
method: 'GET', method: 'GET',
success: function (res) { success: (response) => {
console.log(res) let funcResponse = response.data
this.globalData.token = funcResponse.token
this.globalData.refreshToken = funcResponse.refreshToken
that.globalData.token = res.data.token
that.globalData.refreshToken = res.data.refreshToken let funcUserInfo = {
wx.setStorageSync('expires_in', res.data.expires_in) 'openId': funcResponse.openid,
wx.setStorageSync('openid', res.data.openid) 'name': funcResponse.nickName,
wx.setStorageSync('session_key', res.data.session_key) 'phone': funcResponse.mobile,
wx.setStorageSync('mobile', res.data.mobile) 'avatar': funcResponse.avatarUrl,
wx.setStorageSync('nickName', res.data.nickName) 'address': funcResponse.address,
wx.setStorageSync('avatarUrl', res.data.avatarUrl) 'birthday': funcResponse.birthday,
wx.setStorageSync('userType', res.data.userType) // 0 游客 1 业主 'sex': funcResponse.sex,
wx.setStorageSync('sex', res.data.sex) 'userType': Number(funcResponse.userType),
wx.setStorageSync('birthday', res.data.birthday) }
wx.setStorageSync('address', res.data.address)
wx.setStorageSync('userInfo', funcUserInfo)
if (obj.success) { if (obj.success) {
obj.success(res.data.token) obj.success(funcResponse.token)
} }
}, },
}) })
......
...@@ -48,12 +48,14 @@ ...@@ -48,12 +48,14 @@
"pages/pay/home/home", "pages/pay/home/home",
"pages/pay/order-input/order-input", "pages/pay/order-input/order-input",
"pages/pay/order-state/order-state",
"pages/pay/order-detail/order-detail", "pages/pay/order-detail/order-detail",
"pages/pay/coupon/coupon", "pages/pay/coupon/coupon",
"pages/pay/coupon-input/coupon-input", "pages/pay/coupon-input/coupon-input",
"pages/pay/coupon-detail/coupon-detail", "pages/pay/coupon-detail/coupon-detail",
"pages/login/login" "pages/login/login"
], ],
"usingComponents": { "usingComponents": {
"navigation": "../component/navigation/navigation", "navigation": "../component/navigation/navigation",
...@@ -99,22 +101,26 @@ ...@@ -99,22 +101,26 @@
"iconPath": "image/tabbar/home.png", "iconPath": "image/tabbar/home.png",
"selectedIconPath": "image/tabbar/home-s.png", "selectedIconPath": "image/tabbar/home-s.png",
"text": "首页" "text": "首页"
}, { },
{
"pagePath": "pages/play/home/home", "pagePath": "pages/play/home/home",
"iconPath": "image/tabbar/play.png", "iconPath": "image/tabbar/play.png",
"selectedIconPath": "image/tabbar/play-s.png", "selectedIconPath": "image/tabbar/play-s.png",
"text": "畅玩" "text": "畅玩"
}, { },
{
"pagePath": "pages/commodity/home/home", "pagePath": "pages/commodity/home/home",
"iconPath": "image/tabbar/play.png", "iconPath": "image/tabbar/play.png",
"selectedIconPath": "image/tabbar/play-s.png", "selectedIconPath": "image/tabbar/play-s.png",
"text": "服务" "text": "服务"
},{ },
{
"pagePath": "pages/campsite/home/home", "pagePath": "pages/campsite/home/home",
"iconPath": "image/tabbar/campsite.png", "iconPath": "image/tabbar/campsite.png",
"selectedIconPath": "image/tabbar/campsite-s.png", "selectedIconPath": "image/tabbar/campsite-s.png",
"text": "营地" "text": "营地"
}, { },
{
"pagePath": "pages/mine/home/home", "pagePath": "pages/mine/home/home",
"iconPath": "image/tabbar/mine.png", "iconPath": "image/tabbar/mine.png",
"selectedIconPath": "image/tabbar/mine-s.png", "selectedIconPath": "image/tabbar/mine-s.png",
......
...@@ -27,18 +27,6 @@ Component({ ...@@ -27,18 +27,6 @@ Component({
type: String, type: String,
value: '' value: ''
}, },
fontSize: {
type: Number,
value: 34
},
iconWidth: {
type: Number,
value: 58
},
iconHeight: {
type: Number,
value: 19
},
// 标题栏滚动指定位置动态变换颜色属性 // 标题栏滚动指定位置动态变换颜色属性
// 优先级高于 background 属性 // 优先级高于 background 属性
...@@ -132,6 +120,8 @@ Component({ ...@@ -132,6 +120,8 @@ Component({
* @returns * @returns
*/ */
setNavigationStyle: function () { setNavigationStyle: function () {
let funcUnitProportion = wx.getStorageSync('unitProportion')
let funcStatusStyle = { let funcStatusStyle = {
'height': this.data.statusHeight + 'px', 'height': this.data.statusHeight + 'px',
'background': this.data.background, 'background': this.data.background,
...@@ -153,21 +143,25 @@ Component({ ...@@ -153,21 +143,25 @@ Component({
} }
let funcTextStyle = { let funcTextStyle = {
'font-size': this.data.fontSize + 'rpx',
'color': this.data.color, 'color': this.data.color,
} }
let funcIconStyle = { let funcIconStyle = {
'width': this.data.iconWidth + 'px', 'width': 52 * funcUnitProportion + 'px',
'height': this.data.iconHeight + 'px', 'height': 52 * funcUnitProportion + 'px',
'margin-right': 8 * funcUnitProportion + 'px',
} }
this.setData({ this.setData({
statusCss: App.cssObjectToCssString(funcStatusStyle), statusCss: App.cssObjectToCssString(funcStatusStyle),
titleCss: App.cssObjectToCssString(funcTitleStyle), titleCss: App.cssObjectToCssString(funcTitleStyle),
textCss: App.cssObjectToCssString(funcTextStyle), textCss: App.cssObjectToCssString(funcTextStyle),
iconCss: App.cssObjectToCssString(funcIconStyle), iconCss: App.cssObjectToCssString(funcIconStyle),
}) })
console.log(this.data.iconCss)
}, },
/** /**
......
<view class="navigation"> <view class="navigation">
<!-- 状态栏 --> <!-- 状态栏 -->
<view id="status" class='status' style="{{statusCss}}"></view> <view class="status" style="{{statusCss}}"></view>
<!-- 标题栏 --> <!-- 标题栏 -->
<view id="navbar" class='title' style="{{titleCss}}"> <view class="navbar" style="{{titleCss}}">
<view class='back-icon' wx:if="{{backIcon}}" bindtap='onBack'> <view class="navbar-operation">
<image src='{{backIcon}}'></image> <image class="navbar-operation-back" style="{{iconCss}}" src="{{backIcon}}" bindtap='onBack'></image>
<image class="navbar-operation-home" style="{{iconCss}}" src="{{homeIcon}}" bindtap='onHome'></image>
</view> </view>
<view class='home-icon' wx:if="{{homeIcon}}" bindtap='onHome'> <view class="title-text" style="{{titleCss}}" wx:if="{{titleText && !titleImg}}">
<image src='{{homeIcon}}'></image> <text style="{{textCss}}">{{titleText}}</text>
</view> </view>
<view class='title-icon' wx:if="{{titleImg}}"> <view class="navbar-operation">
<image src='{{titleImg}}' style='{{iconCss}}'></image>
</view>
<view class='title-text' style="{{titleCss}}" wx:if="{{titleText && !titleImg}}">
<text style='{{textCss}}'>{{titleText}}</text>
</view> </view>
</view> </view>
</view> </view>
\ No newline at end of file
.navigation { .navbar {
z-index: 2000; z-index: 2000;
}
.status {
width: 750rpx;
}
.title {
position: relative;
}
.back-icon,
.home-icon {
z-index: 1900;
width: 28px;
height: 100%;
position: absolute;
transform: translateY(-50%);
top: 50%;
display: flex; display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
} }
.back-icon { .navbar-operation {
left: 16px;
}
.home-icon {
left: 44px
}
.back-icon image {
width: 28px;
height: 28px;
margin: auto;
}
.home-icon image {
width: 20px;
height: 20px;
margin: auto;
}
.title-icon {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: center;
align-items: center; align-items: center;
width: 200rpx;
}
.navbar-operation-back,
.navbar-operation-home {
display: block;
} }
.title-text { .title-text {
...@@ -53,7 +23,8 @@ ...@@ -53,7 +23,8 @@
flex-direction: row; flex-direction: row;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
position: absolute; }
width: 750rpx;
font-weight: bold; .title-text text {
font-size: 14px;
} }
\ No newline at end of file
let Environmental = 'dev' let Environmental = 'dev'
let Development = { let Development = {
host: 'https://sm-web.meiqicloud.com', host: 'https://sm-web.meiqicloud.com',
// 景点信息
pointInfo: [
{ appId: 1, id: '21a0cbbd39604380bc46fba38ac5fb63', name: '海错图' },
{ appId: 2, id: '29e79743f0f94e5eb726e0ebdfe64248', name: '星空影院' },
{ appId: 3, id: '559d980e9eaf4459883fb3a556d24347', name: '儿童营地' },
{ appId: 4, id: '81078c007c034d46b7dfe59935d84f7a', name: '原野MOJITO' },
{ appId: 5, id: 'b8f04379bf164b7f8bca69be14146a17', name: '拾光花坊' },
{ appId: 6, id: 'd0e5ff414f794e15bc33c4e11f5356a8', name: '原味舒食' },
{ appId: 7, id: 'd8922a8f759245d4949b62693099edb5', name: '元养水韵SPA' },
],
// 门店信息
shopId: [ shopId: [
{ { appId: 1, id: '581be62a80bb4f0485abd87abcf64dc0', name: '海错图', logo: 'shopping-cart-logo-4.png', title: ['', '海错图购票', '11', '海错图文创店', '22', '儿童营地接待区', '33'] },
miniAppId: 1, { appId: 2, id: '3cfe2e3b8b4342e8b62f8b45daf60d91', name: '星空影院', logo: 'shopping-cart-logo-6.png', title: ['', '儿童营地入园购票', '11', '1', '1', '儿童营地接待区', '1'] },
databaseId: '581be62a80bb4f0485abd87abcf64dc0', { appId: 3, id: '8a3e59c57f564c569b3d7bb278ea50b3', name: '儿童营地', logo: 'shopping-cart-logo-6.png', title: ['', '儿童营地入园购票', '11', '1', '1', '儿童营地接待区', '1'] },
name: '海错图1号馆', { appId: 4, id: 'c63893bb472f43bca4ec72f890bcb4fd', name: '原野MOJITO', logo: 'shopping-cart-logo-6.png', title: ['', '儿童营地入园购票', '1', '1', '1', '儿童营地接待区', '1'] },
logo: 'shopping-cart-logo-4.png', { appId: 5, id: '26c40446fc454a02abe61758176597f6', name: '拾光花坊', logo: 'shopping-cart-logo-7.png', title: ['', '儿童营地入园购票', '1', '1', '1', '儿童营地接待区', '1'] },
}, { { appId: 6, id: 'd9436d7018de43809824b6ec221ea01f', name: '原味舒食', logo: 'shopping-cart-logo-1.png', title: ['', '儿童营地入园购票', '1', '1', '1', '原味舒食', '1'] },
miniAppId: 2, { appId: 7, id: '2614f117406548718bc091f24368c16e', name: '元养水韵SPA', logo: 'shopping-cart-logo-7.png', title: ['', '儿童营地入园购票', '1', '1', '1', '儿童营地接待区', '1'] },
databaseId: '26c40446fc454a02abe61758176597f6',
name: '拾光花坊',
logo: 'shopping-cart-logo-7.png',
}, {
miniAppId: 3,
databaseId: '2614f117406548718bc091f24368c16e',
name: '元养水韵SPA',
logo: '',
}, {
miniAppId: 4,
databaseId: 'd9436d7018de43809824b6ec221ea01f',
name: '原味舒食',
logo: 'shopping-cart-logo-1.png',
}, {
miniAppId: 5,
databaseId: 'c63893bb472f43bca4ec72f890bcb4fd',
name: '原野MOJITO',
logo: '',
}, {
miniAppId: 6,
databaseId: '3cfe2e3b8b4342e8b62f8b45daf60d91',
name: '5D星空影院',
logo: '',
}, {
miniAppId: 7,
databaseId: '8a3e59c57f564c569b3d7bb278ea50b3',
name: '儿童营地',
logo: 'shopping-cart-logo-6.png',
}
] ]
} }
......
...@@ -6,18 +6,70 @@ Page({ ...@@ -6,18 +6,70 @@ Page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
imageBase: App.globalData.appResourcesBase, imageBase: App.globalData.appImageBase,
data: [ //畅想美食 resourcesBase: App.globalData.appResourcesBase,
{ url: '/image/ywssLogo@2x.png', bgc: '#586A46', },
{ url: '/image/Logo@2x (3).png', bgc: '#13625F' },
],
data1: [
{ url: App.globalData.appResourcesBase + 'commodity/home-shop-3.png' },
{ url: App.globalData.appResourcesBase + 'commodity/home-shop-4.png' },
],
phone: '13316748039', phone: '13316748039',
hotline: false, //客服热线 hotline: false, //客服热线
}, },
onGoShop: function (event) {
let funcShopType = event.currentTarget.dataset.type
let funcShopAppId = event.currentTarget.dataset.id
// 获取门店基本信息
let funcShopId = App.globalData.shopId
for (let i = 0, l = funcShopId.length; i < l; i++) {
if (funcShopAppId === funcShopId[i].appId) {
let funcShopInfo = {
'id': funcShopId[i].id,
'appId': funcShopId[i].appId,
'name': funcShopId[i].title[funcShopType],
'logo': funcShopId[i].logo,
'shopType': funcShopType,
}
wx.setStorageSync('shopInfoBuffer', funcShopInfo)
break
}
}
// 1 - 年卡月卡,2 - 普通商品,3 - 门票商品,4 - 文创商品,5 - 餐品,6 - 积分商品
switch (funcShopType) {
case 1:
wx.navigateTo({
url: '/pages/commodity/menu-snacks/menu-snacks'
})
break
case 4:
wx.navigateTo({
url: '/pages/commodity/menu-snacks/menu-snacks'
})
break
case 5:
wx.navigateTo({
url: '/pages/commodity/menu-snacks/menu-snacks'
})
break
}
},
/**
* 跳转门票页面
* @function
* @param {object} - event
* @returns
*/
onMemberList: function (event) {
},
onReceptionList: function (event) {
},
//客服热线拨打 //客服热线拨打
call() { call() {
wx.makePhoneCall({ wx.makePhoneCall({
......
<!--pages/home/service/service.wxml-->
<navigation class="navigation"></navigation> <navigation class="navigation"></navigation>
<view class="container"> <view class="container">
<view class="greetings_header"> <view class="title">
<view class="greetings_title">Monica , 早上好!</view> <image src="{{resourcesBase + 'commodity/home/title.png'}}" class="title_img"></image>
<image src="/image/cxms@2x.png" class="title_img"></image> </view>
<view class="greetings_header_describe">这里有来自大自然的馈赠用心烹饪的美食</view>
</view> <!-- 商店 -->
<view class="greetings_body"> <view class="shop">
<swiper indicator-dots="true" style="height:1469rpx;"> <view class="shop-name">
<block wx:for="{{data}}"> <image src="{{resourcesBase + 'commodity/home/shop-title-1.png'}}"></image>
</view>
<view class="shop-title col">
<text>这里有来自大自然的馈赠</text>
<text>用心烹饪的美食</text>
</view>
<swiper indicator-dots="true">
<!-- 原味舒食 -->
<swiper-item> <swiper-item>
<view class="service_store" style="background:{{item.bgc}}"> <view class="shop-banner row con-c">
<image src="{{item.url}}" class="{{index == 0? 'store_img' : 'store_img1'}} "></image> <image src="{{resourcesBase + 'commodity/home/shop-1.png'}}"></image>
<view class="order_button">立即点餐</view> <button class="row con-c align-c" data-id="{{6}}" data-type="{{5}}" bindtap="onGoShop"></button>
</view> </view>
<view class="service_store_shop"> <view class="shop-menu">
<view class="service_store_shop_item" wx:for="{{4}}"> <view class="shop-menu-item" wx:for="{{4}}">
<image class="shop_img"></image> <image></image>
<text class="shop_goods">炭烤猪肋排拼盘</text> <text>炭烤猪肋排拼盘</text>
</view> </view>
</view> </view>
</swiper-item> </swiper-item>
</block>
</swiper> <!-- 原野mojito -->
<swiper-item>
<view class="shop-banner row con-c">
<image src="{{resourcesBase + 'commodity/home/shop-2.png'}}"></image>
<button class="row con-c align-c" data-id="{{5}}" data-type="{{5}}" bindtap="onGoShop"></button>
</view> </view>
<view class="service_item" style="margin-bottom:136rpx;"> <view class="shop-menu">
<view style="padding-left:40rpx;" class="greetings_header_describe">您可以用最优惠的价格享受超级服务</view> <view class="shop-menu-item" wx:for="{{4}}">
<view class="item_banner"> <image></image>
<image style="z-index:-1;" class="item_banner_img" src="{{imageBase + 'commodity/home-head.png'}}"></image> <text>炭烤猪肋排拼盘</text>
<view class="goods_buy">立即选购</view>
</view> </view>
<view class="item_container">
<image wx:for="{{3}}" class="items_img"></image>
</view> </view>
</swiper-item>
</swiper>
</view> </view>
<view class="service_item"> <!-- 项目服务 -->
<view style="padding-left:40rpx;white-space:pre-wrap" class="greetings_header_describe">尽情玩耍 随时为你补充能量 <view class="services col align-c">
<view class="services-title col">
<text>您可以用最优惠的价格</text>
<text>享受超级服务</text>
</view>
<view class="services-banner">
<image src="{{resourcesBase + 'commodity/home/services-title.png'}}"></image>
</view>
<view class="services-list col align-c">
<view class="services-list-item col align-c" data-id="{{3}}" data-type="{{1}}" bindtap="onGoShop">
<image src="{{resourcesBase + 'commodity/home/services-1.png'}}"></image>
</view>
<view class="services-list-item col align-c" data-id="{{1}}" data-type="{{1}}" bindtap="onGoShop">
<image src="{{resourcesBase + 'commodity/home/services-2.png'}}"></image>
</view>
<view class="services-list-item col align-c" data-id="{{7}}" data-type="{{1}}" bindtap="onGoShop">
<image src="{{resourcesBase + 'commodity/home/services-3.png'}}"></image>
</view>
</view> </view>
<view class="item_banner" style="background: #E8F1F6;text-align:center;z-index:-1;height:512rpx;">
<image style="width:312rpx;height:56rpx;margin-top:152rpx;" src="{{imageBase + 'commodity/home-title-1.png'}}"></image>
<view>
<image style="width:148rpx;height:16rpx;margin-top:8rpx;" src="{{imageBase + 'commodity/home-tip-1.png'}}"></image>
</view> </view>
<!-- 能量补给站 -->
<view class="reception col align-c">
<view class="reception-title col">
<text>尽情玩耍</text>
<text>随时为你补充能量</text>
</view>
<view class="reception-banner">
<image src="{{resourcesBase + 'commodity/home/reception-title.png'}}"></image>
</view> </view>
<view class="item_container"> <view class="reception-list col align-c">
<view style="margin-bottom:64rpx;" wx:for="{{2}}"> <view class="reception-list-item col align-c" data-id="{{3}}" data-type="{{5}}" bindtap="onGoShop">
<image class="items_img" style="margin-bottom:0;"></image> <image src="{{resourcesBase + 'commodity/home/reception-1.png'}}"></image>
<view class="items_text">儿童营地接待区</view> <text>儿童营地接待区</text>
</view>
<view class="reception-list-item col align-c" data-id="{{5}}" data-type="{{3}}" bindtap="onGoShop">
<image src="{{resourcesBase + 'commodity/home/reception-2.png'}}"></image>
<text>拾光花坊</text>
</view> </view>
</view> </view>
</view> </view>
<view class="service_item"> <!-- 商店 -->
<image style="margin-left:40rpx;" src="/image/wcsc@2x.png" class="title_img"></image> <view class="shop">
<view style="padding-left:40rpx;white-space:pre-wrap" class="greetings_header_describe">可以为家人、朋友 准备一份精心的礼物 <view class="shop-name">
<image src="{{resourcesBase + 'commodity/home/shop-title-2.png'}}"></image>
</view>
<view class="shop-title col">
<text>这里有来自大自然的馈赠</text>
<text>用心烹饪的美食</text>
</view> </view>
<view class="greetings_body"> <swiper indicator-dots="true">
<swiper indicator-dots="true" style="height:1469rpx;"> <!-- 海错图文创店 -->
<block wx:for="{{data1}}">
<swiper-item> <swiper-item>
<view class="service_store"> <view class="shop-banner row con-c">
<image src="{{item.url}}" class="item_banner_img"></image> <image src="{{resourcesBase + 'commodity/home/shop-3.png'}}"></image>
<view style="width:750rpx;height:382rpx;"></view> <button class="row con-c align-c" data-id="{{1}}" data-type="{{4}}" bindtap="onGoShop"></button>
<view style="background:{{index== 0 ?'#C93120' : '#BD5B66' }} ;color: #FAF0DF;" class="order_button">立即选购</view>
</view> </view>
<view class="service_store_shop"> <view class="shop-menu">
<view class="service_store_shop_item" wx:for="{{4}}"> <view class="shop-menu-item" wx:for="{{4}}">
<image class="shop_img"></image> <image></image>
<text class="shop_goods">炭烤猪肋排拼盘</text> <text>炭烤猪肋排拼盘</text>
</view> </view>
</view> </view>
</swiper-item> </swiper-item>
</block>
</swiper> <!-- 儿童营地文创店 -->
<swiper-item>
<view class="shop-banner row con-c">
<image src="{{resourcesBase + 'commodity/home/shop-4.png'}}"></image>
<button class="row con-c align-c" data-id="{{3}}" data-type="{{4}}" bindtap="onGoShop"></button>
</view>
<view class="shop-menu">
<view class="shop-menu-item" wx:for="{{4}}">
<image></image>
<text>炭烤猪肋排拼盘</text>
</view> </view>
</view> </view>
</swiper-item>
</swiper>
</view>
<view class="service_item"> <view class="service_item">
<view style="padding-left:40rpx;white-space:pre-wrap;width:472rpx;" class="greetings_header_describe">滨海温泉院墅 足不出户即可享受滨海温泉 <view class="shop-title col">
<text>滨海温泉院墅</text>
<text>足不出户即可享受滨海温泉</text>
</view> </view>
<view style="position: relative;"> <view style="position: relative;">
<image class="home_footer" src="{{imageBase + 'commodity/home-footer.png'}}"></image> <image class="home_footer" src="{{resourcesBase + 'commodity/home/other.png'}}"></image>
<view class="seeHouse">预约看房</view> <view class="seeHouse">预约看房</view>
<view class="call" bindtap="call">拨打客服</view> <view class="call" bindtap="call">拨打客服</view>
</view> </view>
......
...@@ -17,16 +17,6 @@ ...@@ -17,16 +17,6 @@
margin-top: 128rpx; margin-top: 128rpx;
} }
.greetings_header_describe {
font-weight: 300;
color: #15191f;
margin-top: 12rpx;
width: 414rpx;
font-size: 34rpx;
line-height: 58rpx;
letter-spacing: 1px;
}
.greetings_body { .greetings_body {
width: 750rpx; width: 750rpx;
height: height; height: height;
...@@ -191,3 +181,179 @@ ...@@ -191,3 +181,179 @@
text-align: center; text-align: center;
font-weight: 500; font-weight: 500;
} }
.title {
width: 750rpx;
height: 280rpx;
}
.title image {
width: 750rpx;
height: 80rpx;
}
/* 商店样式 */
.shop,
swiper {
width: 750rpx;
min-height: 1444rpx;
}
.shop-name image {
width: 670rpx;
height: 60rpx;
}
.shop-title {
width: 670rpx;
height: 172rpx;
margin: 32rpx 40rpx 0 40rpx;
}
.shop-title text {
font-size: 34rpx;
font-weight: 300;
line-height: 64rpx;
color: #15191F;
}
.shop-banner {
position: relative;
}
.shop-banner > image {
width: 750rpx;
height: 600rpx;
}
.shop-banner > button {
position: absolute;
top: 330rpx;
width: 204rpx;
height: 120rpx;
background: rgba(0, 0, 0, 0);
font-size: 26rpx;
font-weight: 500;
line-height: 36rpx;
color: #586A46;
}
.shop-menu {
position: relative;
top: -100rpx;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
flex-direction: row;
margin: 0 40rpx;
}
.shop-menu-item > image {
display: block;
width: 328rpx;
height: 328rpx;
background: #999999;
}
.shop-menu-item > text {
display: block;
margin: 40rpx 0 48rpx 0;
font-size: 30rpx;
font-weight: 300;
line-height: 42rpx;
color: #15191F;
}
/* 项目服务样式 */
.services {
margin-top: 200rpx;
}
.services-title {
width: 670rpx;
height: 172rpx;
}
.services-title text {
font-size: 34rpx;
font-weight: 300;
line-height: 64rpx;
color: #15191F;
}
.services-banner image {
display: block;
width: 750rpx;
height: 600rpx;
}
.services-item {
margin-bottom: 64rpx;
}
.services-list {
position: relative;
top: -164rpx;
}
.services-list-item {
margin-top: 64rpx;
}
.services-list-item > image {
display: block;
width: 670rpx;
height: 329rpx;
border-radius: 4px;
}
/* 能量补给站样式 */
.reception-title {
width: 670rpx;
height: 172rpx;
}
.reception-title text {
font-size: 34rpx;
font-weight: 300;
line-height: 64rpx;
color: #15191F;
}
.reception-banner image {
display: block;
width: 750rpx;
height: 512rpx;
}
.reception-item {
margin-bottom: 64rpx;
}
.reception-list {
position: relative;
top: -164rpx;
}
.reception-list-item {
margin-top: 64rpx;
}
.reception-list-item > image {
display: block;
width: 670rpx;
height: 329rpx;
border-radius: 4px;
}
.reception-list-item > text {
height: 42rpx;
margin-top: 48rpx;
font-size: 30rpx;
font-weight: 300;
line-height: 42rpx;
color: #000000;
}
\ No newline at end of file
...@@ -2,9 +2,8 @@ let App = getApp() ...@@ -2,9 +2,8 @@ let App = getApp()
Page({ Page({
data: { data: {
shopId: '', shopInfo: {},
shopName: '',
shopLogo: '',
sideBar: [], // 侧边菜单 sideBar: [], // 侧边菜单
menuTitle: '', // 商品列表标题 menuTitle: '', // 商品列表标题
commodityList: [], // 商品列表 commodityList: [], // 商品列表
...@@ -23,20 +22,16 @@ Page({ ...@@ -23,20 +22,16 @@ Page({
}, },
onLoad: function () { onLoad: function () {
// 儿童营地小程序内部 id this.setShopInfo()
let funcMiniAppId = 7 this.querySideBar()
let funcShopId = App.globalData.shopId },
for (let i = 0, l = funcShopId.length; i < l; i++) {
if (funcMiniAppId === funcShopId[i].miniAppId) { setShopInfo: function () {
let funcShopInfo = wx.getStorageSync('shopInfoBuffer')
this.setData({ this.setData({
shopId: funcShopId[i].databaseId, shopInfo: funcShopInfo
shopName: funcShopId[i].name,
shopLogo: funcShopId[i].logo,
}) })
break console.log(this.data.shopInfo)
}
}
this.querySideBar()
}, },
/** /**
...@@ -49,8 +44,8 @@ Page({ ...@@ -49,8 +44,8 @@ Page({
App.wxRequest({ App.wxRequest({
url: '/api/v1/commodity/getClassifys', url: '/api/v1/commodity/getClassifys',
data: { data: {
'officeId': this.data.shopId, 'officeId': this.data.shopInfo.id,
'genre': 5 'genre': this.data.shopInfo.shopType,
}, },
success: (response) => { success: (response) => {
let funcSideBar = [] let funcSideBar = []
...@@ -61,6 +56,16 @@ Page({ ...@@ -61,6 +56,16 @@ Page({
'tab': funcResponse[i].name, 'tab': funcResponse[i].name,
} }
funcSideBar.push(funcItem) funcSideBar.push(funcItem)
funcSideBar.push({ id: '1', tab: '2' })
funcSideBar.push({ id: '1', tab: '3' })
funcSideBar.push({ id: '1', tab: '4' })
funcSideBar.push({ id: '1', tab: '5' })
funcSideBar.push({ id: '1', tab: '6' })
funcSideBar.push({ id: '1', tab: '7' })
funcSideBar.push({ id: '1', tab: '8' })
funcSideBar.push({ id: '1', tab: '9' })
funcSideBar.push({ id: '1', tab: '10' })
funcSideBar.push({ id: '1', tab: '11' })
} }
this.setData({ this.setData({
...@@ -86,16 +91,18 @@ Page({ ...@@ -86,16 +91,18 @@ Page({
App.wxRequest({ App.wxRequest({
url: '/api/v1/commodity/getCommoditys', url: '/api/v1/commodity/getCommoditys',
data: { data: {
'officeId': this.data.shopId, 'officeId': this.data.shopInfo.id,
'classifyId': this.data.sideBar[this.data.currentIndex].id, 'classifyId': this.data.sideBar[this.data.currentIndex].id,
'genre': 5, 'genre': this.data.shopInfo.shopType,
}, },
success: (response) => { success: (response) => {
let funcCommodityList = [] let funcCommodityList = []
let funcResponse = response.data let funcResponse = response.data
for (let i = 0, l = funcResponse.length; i < l; i++) { for (let i = 0, l = funcResponse.length; i < l; i++) {
let funcItem = { let funcItem = {
'id': funcResponse[i].id, 'id': funcResponse[i].id, // 商品标识
'typeId': funcResponse[i].classifyId, // 商品分类标识
'inventoriesId': funcResponse[i].inventoriesId, // 仓库标识
'name': funcResponse[i].name, 'name': funcResponse[i].name,
'cover': funcResponse[i].coverImg, // 商品封面 'cover': funcResponse[i].coverImg, // 商品封面
'price': funcResponse[i].sightseerPrice, // 普通价 'price': funcResponse[i].sightseerPrice, // 普通价
...@@ -109,13 +116,14 @@ Page({ ...@@ -109,13 +116,14 @@ Page({
'tags': funcResponse[i].tags, 'tags': funcResponse[i].tags,
} }
let funcUserType = wx.getStorageSync('userInfo').userType
// 根据后台判断价格显示类型 // 根据后台判断价格显示类型
// 活动价优先级最高,如果存在活动价,则只显示活动价和普通价 // 活动价优先级最高,如果存在活动价,则只显示活动价和普通价
if (funcItem.priceDiscount) { if (funcItem.priceDiscount) {
funcItem.priceType = 1 funcItem.priceType = 1
} else { } else {
// 活动价不存在,进一步判断普通价与业主价是否一致,如果不一致,则显示两者 // 活动价不存在,进一步判断普通价与业主价是否一致,如果不一致,则显示两者
if (funcItem.price !== funcItem.priceSpecial) { if (funcItem.price !== funcItem.priceSpecial && funcUserType) {
funcItem.priceType = 2 funcItem.priceType = 2
} else { } else {
funcItem.priceType = 3 funcItem.priceType = 3
...@@ -158,13 +166,13 @@ Page({ ...@@ -158,13 +166,13 @@ Page({
*/ */
onCommodityDetail: function (event) { onCommodityDetail: function (event) {
let funcItem = event.currentTarget.dataset.item let funcItem = event.currentTarget.dataset.item
let funcCommodityId = funcItem.id
App.wxRequest({ App.wxRequest({
url: '/api/v1/commodity/getCommodityParticulars', url: '/api/v1/commodity/getCommodityParticulars',
data: { data: {
'commodityId': funcCommodityId, 'commodityId': funcItem.id,
'genre': 5 'classifyId': funcItem.typeId,
'genre': this.data.shopInfo.shopType,
}, },
success: (response) => { success: (response) => {
let funcResponse = response.data let funcResponse = response.data
...@@ -200,8 +208,10 @@ Page({ ...@@ -200,8 +208,10 @@ Page({
let funcShoppingCart = this.data.shoppingCart let funcShoppingCart = this.data.shoppingCart
// 详情加入购物车按钮商品数据不会存在于 event 对象中,所以要区分 // 详情加入购物车按钮商品数据不会存在于 event 对象中,所以要区分
let funcWinToast = false
let funcItem = event.currentTarget.dataset.item let funcItem = event.currentTarget.dataset.item
if (!funcItem) { if (!funcItem) {
funcWinToast = true
funcItem = this.data.commodityDetail funcItem = this.data.commodityDetail
} }
...@@ -233,7 +243,7 @@ Page({ ...@@ -233,7 +243,7 @@ Page({
this.setData({ this.setData({
shoppingCart: funcShoppingCart, shoppingCart: funcShoppingCart,
shoppingCartTotal: funcShoppingCartTotal, shoppingCartTotal: funcShoppingCartTotal,
winToast: true, winToast: funcWinToast,
winCommodityDetail: false, winCommodityDetail: false,
}) })
}, },
...@@ -245,7 +255,6 @@ Page({ ...@@ -245,7 +255,6 @@ Page({
* @returns * @returns
*/ */
onShoppingCart: function() { onShoppingCart: function() {
wx.setStorageSync('shopInfoBuffer', { 'id': this.data.shopId, 'name': this.data.shopName, 'logo': this.data.shopLogo })
wx.setStorageSync('shoppingCartBuffer', this.data.shoppingCart) wx.setStorageSync('shoppingCartBuffer', this.data.shoppingCart)
wx.navigateTo({ wx.navigateTo({
url: '/pages/commodity/shopping-cart/shopping-cart', url: '/pages/commodity/shopping-cart/shopping-cart',
......
...@@ -15,10 +15,9 @@ ...@@ -15,10 +15,9 @@
mask="{{true}}" mask="{{true}}"
></l-toast> ></l-toast>
<navigation class="navigation" titleText="{{shopName}}" background="#FFFFFF;" backIcon="/image/back.png"></navigation> <navigation class="navigation" titleText="{{shopInfo.name}}" background="#FFFFFF;" backIcon="/image/back.png"></navigation>
<view class="cates"> <view class="row">
<view class="cates-container">
<!-- 侧边菜单 --> <!-- 侧边菜单 -->
<view class="side-bar"> <view class="side-bar">
<block wx:for="{{sideBar}}" wx:for-index="index" wx:for-item="item" wx:key="index"> <block wx:for="{{sideBar}}" wx:for-index="index" wx:for-item="item" wx:key="index">
...@@ -29,7 +28,7 @@ ...@@ -29,7 +28,7 @@
</view> </view>
<!-- 商品列表 --> <!-- 商品列表 -->
<scroll-view scroll-top="{{scrollTop}}" scroll-y class="right-content"> <view class="menu-list">
<view class="right-content-title">{{menuTitle}}</view> <view class="right-content-title">{{menuTitle}}</view>
<block wx:for="{{commodityList}}" wx:for-index="index" wx:for-item="item" wx:key="index"> <block wx:for="{{commodityList}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="commodity-item row"> <view class="commodity-item row">
...@@ -96,10 +95,11 @@ ...@@ -96,10 +95,11 @@
<image src="../../../image/cart.png" mode="widthFix"></image> <image src="../../../image/cart.png" mode="widthFix"></image>
</view> </view>
</view> </view>
</scroll-view> </view>
</view>
<!-- 商品详情弹窗 --> <!-- 商品详情弹窗 -->
<l-popup show="{{winCommodityDetail}}" content-align="center" locked="{{true}}"> <l-popup show="{{winCommodityDetail}}" content-align="center" locked="{{true}}">
<view class="popup-wrap"> <view class="popup-wrap">
<view id="banner" class="banner"> <view id="banner" class="banner">
<swiper autoplay circular class="banner-swiper" interval="5000" duration="500"> <swiper autoplay circular class="banner-swiper" interval="5000" duration="500">
...@@ -170,6 +170,4 @@ ...@@ -170,6 +170,4 @@
<image mode="widthFix" src="../../../image/icon_close.png"></image> <image mode="widthFix" src="../../../image/icon_close.png"></image>
</view> </view>
</view> </view>
</l-popup> </l-popup>
</view> \ No newline at end of file
</view>
\ No newline at end of file
page {
overflow: hidden;
}
.navigation { .navigation {
z-index: 1100; z-index: 1100;
position: fixed; position: fixed;
...@@ -6,18 +10,10 @@ ...@@ -6,18 +10,10 @@
width: 750rpx; width: 750rpx;
} }
.cates {
height: 100%;
margin-top: 150rpx;
}
.cates-container {
height: 100vh;
display: flex;
}
.side-bar { .side-bar {
width: 160rpx; width: 160rpx;
height: 100vh;
margin-top: 140rpx;
overflow-y: scroll; overflow-y: scroll;
background: #f2f3f5; background: #f2f3f5;
} }
...@@ -42,10 +38,13 @@ ...@@ -42,10 +38,13 @@
border-left: 8rpx solid #86c5e1; border-left: 8rpx solid #86c5e1;
} }
.right-content { .menu-list {
position: relative; width: 590rpx;
flex: 1; height: 100vh;
padding: 0 32rpx 0 28rpx; margin-top: 140rpx;
padding: 0 32rpx 200rpx 32rpx;
overflow-y: scroll;
background: #FFFFFF;
} }
.right-content::-webkit-scrollbar { .right-content::-webkit-scrollbar {
...@@ -206,8 +205,8 @@ ...@@ -206,8 +205,8 @@
} }
.popup-wrap { .popup-wrap {
position: relative;
width: 606rpx; width: 606rpx;
margin-top: 100rpx;
background-color: #fff; background-color: #fff;
border-radius: 4rpx; border-radius: 4rpx;
} }
......
...@@ -342,10 +342,4 @@ Page({ ...@@ -342,10 +342,4 @@ Page({
url: '/pages/pay/order-detail/order-detail?type=' + event.currentTarget.dataset.index url: '/pages/pay/order-detail/order-detail?type=' + event.currentTarget.dataset.index
}) })
}, },
onShop: function (event) {
wx.navigateTo({
url: '/pages/commodity/menu-snacks/menu-snacks'
})
},
}) })
\ No newline at end of file
...@@ -92,8 +92,5 @@ ...@@ -92,8 +92,5 @@
<button class="test-button" data-index="{{3}}" bindtap="onTest3">订单 已取消</button> <button class="test-button" data-index="{{3}}" bindtap="onTest3">订单 已取消</button>
<button class="test-button" data-index="{{4}}" bindtap="onTest3">订单 已评价</button> <button class="test-button" data-index="{{4}}" bindtap="onTest3">订单 已评价</button>
<button class="test-button" data-index="{{5}}" bindtap="onTest3">订单 待付款</button> <button class="test-button" data-index="{{5}}" bindtap="onTest3">订单 待付款</button>
<button class="test-button" data-shop="{{4}}" bindtap="onShop">餐品列表1111</button>
</view> </view>
</view> </view>
\ No newline at end of file
...@@ -129,7 +129,22 @@ Page({ ...@@ -129,7 +129,22 @@ Page({
winOrderType: false, winOrderType: false,
}, },
onLoad: function (options) { onLoad: function (options) {
this.queryOrder()
},
queryOrder: function () {
App.wxRequest({
url: '/api/v1/order/getOrderList',
data: {
'goodType': '',
'status': '',
'pageSize': -1,
'pageNo': '',
},
success: (response) => {
console.log(response)
}
})
}, },
onOrderType: function () { onOrderType: function () {
......
...@@ -12,14 +12,15 @@ let logicData = { ...@@ -12,14 +12,15 @@ let logicData = {
} }
} }
let pagePayId = ''
let pagePayStateTimer = 0
Page({ Page({
data: { data: {
imageBase: App.globalData.appImageBase, imageBase: App.globalData.appImageBase,
animation: {}, animation: {},
shopId: '', shopInfo: {},
shopName: '',
shopLogo: '',
orderType: 1, // 1 - 年卡/月卡,2 - 次票, 3 - SPA, 4 - 文创, 5 - 餐品, 6 - 活动, 7 - 观影 orderType: 1, // 1 - 年卡/月卡,2 - 次票, 3 - SPA, 4 - 文创, 5 - 餐品, 6 - 活动, 7 - 观影
...@@ -89,6 +90,11 @@ Page({ ...@@ -89,6 +90,11 @@ Page({
winNoticeDetail: false, // 购买须知详情 winNoticeDetail: false, // 购买须知详情
}, },
onLoad: function (options) { onLoad: function (options) {
// 设置门店信息
this.setData({
shopInfo: wx.getStorageSync('shopInfoBuffer')
})
if (options.type) options.type = Number(options.type) if (options.type) options.type = Number(options.type)
if (options.passType) options.passType = Number(options.passType) if (options.passType) options.passType = Number(options.passType)
if (options.amount) { if (options.amount) {
...@@ -97,8 +103,6 @@ Page({ ...@@ -97,8 +103,6 @@ Page({
}) })
} }
// options.type = 7
// options.passType = 1
logicData.option = options logicData.option = options
this.setView() this.setView()
...@@ -106,8 +110,6 @@ Page({ ...@@ -106,8 +110,6 @@ Page({
duration: 700, duration: 700,
timingFunction: 'ease' timingFunction: 'ease'
}) })
this.setShopInfo()
this.setShoppingCartData() this.setShoppingCartData()
}, },
...@@ -156,7 +158,7 @@ Page({ ...@@ -156,7 +158,7 @@ Page({
case 3: case 3:
this.setData({ this.setData({
orderType: logicData.option.type, orderType: logicData.option.type,
buyContentTitle: '肌底补水保湿焕肤提华SPA套餐', buyContentTitle: this.data.shopInfo.name,
buyContentAmount: '360.00', buyContentAmount: '360.00',
winBuyContent: true, // 购买内容 winBuyContent: true, // 购买内容
...@@ -175,7 +177,7 @@ Page({ ...@@ -175,7 +177,7 @@ Page({
case 4: case 4:
this.setData({ this.setData({
orderType: logicData.option.type, orderType: logicData.option.type,
buyContentTitle: '海错图文创商店', buyContentTitle: this.data.shopInfo.name,
buyContentTime: '周一至周日 10:00-12:00', buyContentTime: '周一至周日 10:00-12:00',
shoppingCartList: [{ shoppingCartList: [{
cover: '', cover: '',
...@@ -205,7 +207,7 @@ Page({ ...@@ -205,7 +207,7 @@ Page({
case 5: case 5:
this.setData({ this.setData({
orderType: logicData.option.type, orderType: logicData.option.type,
buyContentTitle: '原味舒食', buyContentTitle: this.data.shopInfo.name,
buyContentTime: '周一至周日 10:00-21:30', buyContentTime: '周一至周日 10:00-21:30',
shoppingCartList: [{ shoppingCartList: [{
cover: '', cover: '',
...@@ -235,7 +237,7 @@ Page({ ...@@ -235,7 +237,7 @@ Page({
case 6: case 6:
this.setData({ this.setData({
orderType: logicData.option.type, orderType: logicData.option.type,
buyContentTitle: '拾光花坊插花分享会', buyContentTitle: this.data.shopInfo.name,
buyContentTime: '周一至周日 10:00-21:30', buyContentTime: '周一至周日 10:00-21:30',
buyContentAmount: '36.00', buyContentAmount: '36.00',
...@@ -255,7 +257,7 @@ Page({ ...@@ -255,7 +257,7 @@ Page({
case 7: case 7:
this.setData({ this.setData({
orderType: logicData.option.type, orderType: logicData.option.type,
buyContentTitle: '《哈利波特与死亡圣器》', buyContentTitle: this.data.shopInfo.name,
buyContentTime: '8月4日 19:30-21:30', buyContentTime: '8月4日 19:30-21:30',
buyContentAmount: '免费', buyContentAmount: '免费',
...@@ -279,23 +281,6 @@ Page({ ...@@ -279,23 +281,6 @@ Page({
}) })
}, },
/**
* 设置本店信息
* @function
* @param
* @returns
*/
setShopInfo: function () {
let funcShopInfo = wx.getStorageSync('shopInfoBuffer')
this.setData({
shopId: funcShopInfo.id,
shopName: funcShopInfo.name,
shopLogo: funcShopInfo.logo
})
console.log(this.data.shopLogo)
},
setShoppingCartData: function () { setShoppingCartData: function () {
// 读取上级页面的购物车数据,默认选中所有。 // 读取上级页面的购物车数据,默认选中所有。
let funcShoppingCart = wx.getStorageSync('shoppingCartBuffer') let funcShoppingCart = wx.getStorageSync('shoppingCartBuffer')
...@@ -512,9 +497,9 @@ Page({ ...@@ -512,9 +497,9 @@ Page({
'id': funcShoppingCartList[i].id, 'id': funcShoppingCartList[i].id,
}, },
'smInventory': { 'smInventory': {
'id': '', 'id': funcShoppingCartList[i].inventoriesId,
}, },
'goodType': '', 'goodType': funcShoppingCartList[i].typeId,
'name': funcShoppingCartList[i].name, 'name': funcShoppingCartList[i].name,
'number': funcShoppingCartList[i].quantity, 'number': funcShoppingCartList[i].quantity,
'unitPrice': Number(funcShoppingCartList[i].priceConfirm), 'unitPrice': Number(funcShoppingCartList[i].priceConfirm),
...@@ -534,7 +519,6 @@ Page({ ...@@ -534,7 +519,6 @@ Page({
} }
funcUserInfo.push(funcItem) funcUserInfo.push(funcItem)
} }
return
// 发送下单请求 // 发送下单请求
App.wxRequest({ App.wxRequest({
...@@ -542,13 +526,81 @@ Page({ ...@@ -542,13 +526,81 @@ Page({
data: { data: {
'isPayment': 2, 'isPayment': 2,
'totalMoney': Number(this.data.payAmount), 'totalMoney': Number(this.data.payAmount),
'office': { 'id': this.data.shopId }, 'office': { 'id': this.data.shopInfo.id },
'smOrderDetails': funcCommodity, 'smOrderDetails': funcCommodity,
'smPersonalDetails': funcUserInfo 'smPersonalDetails': funcUserInfo
}, },
success: (response) => { success: (response) => {
let funcResponse = response.data.wxRequest
pagePayId = response.data.orderId
wx.requestPayment({
'timeStamp': funcResponse.timeStamp,
'nonceStr': funcResponse.nonceStr,
'package': funcResponse.package,
'signType': funcResponse.signType,
'paySign': funcResponse.paySign,
'success': function (response) {
if (response.errMsg === 'requestPayment:ok') {
// 用户点击支付完成按钮回调
// This.payStatus(true)
}
if (response.errMsg === 'requestPayment:fail cancel') {
clearInterval(pagePayStateTimer)
this.payStatus(false)
}
},
'fail': function (response) {
clearInterval(pagePayStateTimer)
this.payStatus(false)
}
})
// 开启支付状态轮询
// wx.showLoading({ title: '正在获取数据', mask: true })
this.queryPayStatus(pagePayId)
}
})
},
queryPayStatus: function () {
let funcIndex = 0
pagePayStateTimer = setInterval(() => {
if (!pagePayId) return
App.wxRequest({
url: '/api/v1/order/getOrderStatus',
data: {
'orderId': pagePayId
},
success: (response) => {
console.log(response)
// -1 - 已取消,0 - 未付款,1 - 未发货,2 - 待使用,3 - 已使用,4 - 已过期
let funcResponse = response.data let funcResponse = response.data
if (funcResponse.status === '2') {
this.payStatus(true)
} }
}
})
funcIndex = funcIndex + 1
if (funcIndex >= 90) {
this.payStatus(false)
}
}, 2000)
},
/**
* 支付状态轮询结果
* @function
* @returns
*/
payStatus: function (funcPayResult) {
clearInterval(pagePayStateTimer)
wx.navigateTo({
url: '/pages/pay/order-state/order-state?state=' + funcPayResult + '&amount=' + this.data.buyContentAmount
}) })
}, },
}) })
\ No newline at end of file
let App = getApp()
Page({
data: {
imageBase: App.globalData.appImageBase,
payState: '',
payAmount: 0,
},
onLoad: function (options) {
console.log(options)
if (options.state === 'true') {
this.setData({
payState: true,
payAmount: App.modular.utils.formatAmount(Number(options.amount * 100))
})
} else {
this.setData({
payState: false,
payAmount: App.modular.utils.formatAmount(Number(options.amount * 100))
})
}
},
onHome: function () {
wx.switchTab({
url: '/pages/home/home/home'
})
},
onPayDetail: function () {
},
})
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
<view class="container pay-result">
<view class="pay-result-content col con-c align-c">
<view class="content-state-icon">
<image wx:if="{{payState}}" src="{{imageBase + 'icon/pay-success.png'}}"></image>
<image wx:if="{{!payState}}" src="{{imageBase + 'icon/pay-fail.png'}}"></image>
</view>
<view class="content-state-message">
<text>{{payState ? '支付成功' : '支付失败'}}</text>
</view>
<view class="content-state-amount">
<text>¥</text>
<text>{{payAmount}}</text>
</view>
</view>
<view class="operation">
<button class="operation-home row con-c align-c" bindtap="onHome">返回首页</button>
<button class="operation-detail row con-c align-c" bindtap="onPayDetail">查看订单</button>
</view>
</view>
\ No newline at end of file
.pay-result {
position: fixed;
top: 0;
left: 0;
width: 750rpx;
height: 100%;
}
.pay-result-content {
flex-grow: 1;
}
.content-state-icon image {
display: block;
width: 136rpx;
height: 136rpx;
}
.content-state-message {
margin-top: 24rpx;
}
.content-state-message text {
height: 64rpx;
font-size: 46rpx;
font-weight: 500;
line-height: 64rpx;
color: #15191F;
}
.content-state-amount {
margin-top: 8rpx;
}
.content-state-amount text:nth-child(1) {
height: 42rpx;
font-size: 22rpx;
font-weight: 500;
line-height: 32rpx;
color: #959DA9;
}
.content-state-amount text:nth-child(2) {
height: 42rpx;
font-size: 30rpx;
font-weight: 500;
line-height: 32rpx;
color: #959DA9;
}
.operation-home {
width: 670rpx;
height: 96rpx;
border-radius: 4px;
border: 1px solid #86C5E1;
font-size: 30rpx;
font-weight: 500;
line-height: 42rpx;
color: #86C5E1;
}
.operation-detail {
width: 670rpx;
height: 96rpx;
margin: 40rpx 0 130rpx 0;
background: #86C5E1;
border-radius: 4px;
font-size: 30rpx;
font-weight: 500;
line-height: 42rpx;
color: #FFFFFF;
}
\ No newline at end of file
/** // 程序缓存关键字说明
* unionId: // shopInfoBuffer: 门店详情信息
* scene: // 场景信息
* value: { scene: 0, value: '' }
* scene: 0 - 正常进入,1 - 无房源公众号进入,2 - 有房源扫码进入
* customerInfo:用户信息
* value:
*
*/
\ 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