Commit d0ecb2cc by 严立

LL - 商品列表对接接口

parents 1bf256b3 5974eb8f
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
"pages/commodity/shopping-cart/shopping-cart", "pages/commodity/shopping-cart/shopping-cart",
"pages/home/home/home", "pages/home/home/home",
"pages/home/service/service",
"pages/home/dynamic/dynamic", "pages/home/dynamic/dynamic",
"pages/home/dynamic-detail/dynamic-detail", "pages/home/dynamic-detail/dynamic-detail",
"pages/home/night-appointment/night-appointment", "pages/home/night-appointment/night-appointment",
......
image/scan.png

261 Bytes

// pages/home/service/service.js
const App = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
imageBase: App.globalData.appResourcesBase,
data:[ //畅想美食
{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',
hotline: false, //客服热线
},
//客服热线拨打
call() {
wx.makePhoneCall({
phoneNumber: this.data.phone,
})
},
//取消拨打
cancel() {
this.setData({
hotline: false,
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
<!--pages/home/service/service.wxml-->
<navigation class="navigation"></navigation>
<view class="container">
<view class="greetings_header">
<view class="greetings_title">Monica , 早上好!</view>
<image src="/image/cxms@2x.png" class="title_img"></image>
<view class="greetings_header_describe">这里有来自大自然的馈赠用心烹饪的美食</view>
</view>
<view class="greetings_body">
<swiper indicator-dots="true" style="height:1469rpx;">
<block wx:for="{{data}}">
<swiper-item >
<view class="service_store" style="background:{{item.bgc}}">
<image src="{{item.url}}" class="{{index == 0? 'store_img' : 'store_img1'}} "></image>
<view class="order_button">立即点餐</view>
</view>
<view class="service_store_shop">
<view class="service_store_shop_item" wx:for="{{4}}">
<image class="shop_img"></image>
<text class="shop_goods">炭烤猪肋排拼盘</text>
</view>
</view>
</swiper-item>
</block>
</swiper>
</view>
<view class="service_item" style="margin-bottom:136rpx;">
<view style="padding-left:40rpx;" class="greetings_header_describe">您可以用最优惠的价格享受超级服务</view>
<view class="item_banner">
<image style="z-index:-1;" class="item_banner_img" src="{{imageBase + 'commodity/home-head.png'}}"></image>
<view class="goods_buy">立即选购</view>
</view>
<view class="item_container">
<image wx:for="{{3}}" class="items_img"></image>
</view>
</view>
<view class="service_item">
<view style="padding-left:40rpx;white-space:pre-wrap" class="greetings_header_describe">尽情玩耍
随时为你补充能量</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="item_container">
<view style="margin-bottom:64rpx;" wx:for="{{2}}">
<image class="items_img" style="margin-bottom:0;"></image>
<view class="items_text">儿童营地接待区</view>
</view>
</view>
</view>
<view class="service_item">
<image style="margin-left:40rpx;" src="/image/wcsc@2x.png" class="title_img"></image>
<view style="padding-left:40rpx;white-space:pre-wrap" class="greetings_header_describe">可以为家人、朋友
准备一份精心的礼物</view>
<view class="greetings_body">
<swiper indicator-dots="true" style="height:1469rpx;">
<block wx:for="{{data1}}">
<swiper-item >
<view class="service_store">
<image src="{{item.url}}" class="item_banner_img"></image>
<view style="width:750rpx;height:382rpx;"></view>
<view style="background:{{index== 0 ?'#C93120' : '#BD5B66' }} ;color: #FAF0DF;" class="order_button">立即选购</view>
</view>
<view class="service_store_shop">
<view class="service_store_shop_item" wx:for="{{4}}">
<image class="shop_img"></image>
<text class="shop_goods">炭烤猪肋排拼盘</text>
</view>
</view>
</swiper-item>
</block>
</swiper>
</view>
</view>
<view class="service_item">
<view style="padding-left:40rpx;white-space:pre-wrap;width:472rpx;" class="greetings_header_describe">滨海温泉院墅
足不出户即可享受滨海温泉</view>
<view style="position: relative;">
<image class="home_footer" src="{{imageBase + 'commodity/home-footer.png'}}"></image>
<view class="seeHouse">预约看房</view>
<view class="call" bindtap="call">拨打客服</view>
</view>
</view>
</view>
<!-- 客服热线 -->
<l-arc-popup show="{{hotline}}" arc-radius="30">
<view class="phone">{{phone}}</view>
<view class="call" bindtap="call">呼叫</view>
<view style="height:10rpx;background-color:rgb(246,247,249);"></view>
<view class="call" bindtap="cancel">取消</view>
</l-arc-popup>
/* pages/home/service/service.wxss */
.greetings_header{
padding-top: 196rpx;
padding-left: 46rpx;
width: 750rpx;
}
.greetings_title{
font-size: 58rpx;
font-weight: 500;
color: #15191F;
text-align: left;
}
.title_img{
width: 214rpx;
height: 50rpx;
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{
width: 750rpx;
height: height;
margin-top: 64rpx;
margin-bottom: 200rpx;
}
.service_store{
width: 750rpx;
height: 600rpx;
/* background: #586A46; */
text-align: center;
}
.store_img{
width: 178rpx;
height: 186rpx;
margin-top: 92rpx;
margin-bottom: 48rpx;
}
.store_img1{
width: 320rpx;
height: 120rpx;
margin-top: 134rpx;
margin-bottom: 72rpx;
}
.order_button{
background: #EBE2CE;
width: 200rpx;
height: 64rpx;
border-radius: 4rpx;
font-size: 26rpx;
font-weight: 500;
line-height: 64rpx;
color: #586A46;
margin: auto;
}
.service_store_shop{
width: 670rpx;
/* height: 932rpx; */
margin: auto;
margin-top: -100rpx;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
.service_store_shop_item{
width:328rpx;
height: 410rpx;
text-align: center;
margin-bottom: 48rpx;
}
.shop_img{
width: 328rpx;
height: 328rpx;
background-color: blue;
}
.shop_goods{
font-weight: 300;
color: #15191F;
line-height: 42px;
}
.service_item{
width: 750rpx;
height: auto;
/* margin-bottom: 136rpx; */
}
.item_banner{
width: 750rpx;
height: 600rpx;
margin-top: 64rpx;
position: relative;
/* background-color: red; */
}
.item_banner_img{
width: 750rpx;
height: 600rpx;
position: absolute;
left: 0;
top: 0;
z-index: -1;
}
.item_container{
width: 670rpx;
height: auto;
margin: auto;
margin-top: -100rpx;
}
.items_img{
width: 670rpx;
height: 328rpx;
background-color: blue;
margin-bottom: 64rpx;
}
.goods_buy{
position: absolute;
width: 200rpx;
height: 64rpx;
top: 308rpx;
left: 276rpx;
border-radius: 4px;
background: #86C5E1;
font-weight: 500;
color: #FFFFFF;
font-size: 26rpx;
line-height: 64rpx;
text-align: center;
}
.items_text{
text-align: center;
margin-top: 45rpx;
font-weight: 300;
color: #000000;
letter-spacing: 3px;
text-align: center;
line-height: 42rpx;
}
.home_footer{
width: 750rpx;
height:1640rpx;
margin-top: 64rpx;
}
.seeHouse{
position: absolute;
background: #86C5E1;
border-radius: 4px;
top: 294rpx;
width: 200rpx;
height: 64rpx;
left: 276rpx;
line-height: 64rpx;
color: #FFFFFF;
font-size: 26rpx;
text-align: center;
font-weight: 500;
}
.call{
position: absolute;
top: 1310rpx;
width: 200rpx;
height: 64rpx;
background: #D0B08F;
left: 276rpx;
line-height: 64rpx;
color: #FFFFFF;
font-size: 26rpx;
text-align: center;
font-weight: 500;
}
Page({ Page({
data: { data: {
orderType: 1, // 1 - 年卡/月卡,2 - 次票, 3 - SPA, 4 - 文创, 5 - 餐品, 6 - 活动, 7 - 观影
couponInfo: {
type: '套票',
store: '儿童营地',
id: '26719921231',
useTime: '2020-11-06'
},
goodsList: [
{
id: 0,
cover: '',
name: '咖喱蔬菜大虾',
quantity: '2',
price: '30.60'
},
{
id: 1,
cover: '',
name: '南瓜坚果汤',
quantity: '3',
price: '30.60'
},
],
orderInfo: {
name: '林有一',
phone: '15802035122',
idNum: '350600366462131',
}
}, },
onLoad: function (options) { onLoad: function (options) {
console.log(options)
if (options.type) options.type = Number(options.type)
let orderType = options.type
this.setData({
orderType
})
this.setView()
}, },
setView() {
let orderType = this.data.orderType
switch (orderType) {
case 4:
this.setData({
goodsList: [
{
cover: '',
name: '《海错图》超级豪华精致古风限量版折扇',
quantity: '1',
price: '30.60'
}
],
note: '身份证号变更为350600366462132'
})
break
case 5:
break
}
}
}) })
\ No newline at end of file
{ {
"usingComponents": {} "usingComponents": {
"Blank": "../../../component/Blank/Blank"
}
} }
\ No newline at end of file
<!--pages/home/home/home.wxml--> <navigation class="navigation" titleText="券码核销" background="#ffffff" backIcon="/image/back.png"></navigation>
<text>pages/home/home/home.wxml</text>
<view class="container">
<view class="list-wrapper">
<view class="title-wrapper">兑换券信息</view>
<view class="info-wrapper row con-b">
<view class="info-name">商品类型</view>
<view class="info-text">{{couponInfo.type}}</view>
</view>
<view class="info-wrapper row con-b">
<view class="info-name">所属门店</view>
<view class="info-text">{{couponInfo.store}}</view>
</view>
<view class="info-wrapper row con-b">
<view class="info-name">券号</view>
<view class="info-text">{{couponInfo.id}}</view>
</view>
<view class="info-wrapper row con-b">
<view class="info-name">有效期</view>
<view class="info-text">{{couponInfo.useTime}}</view>
</view>
</view>
<view class="list-wrapper">
<view class="title-wrapper">商品详情</view>
<view class="goods-list">
<view class="goods-item row align-c" wx:for="{{goodsList}}" wx:key="id">
<view class="goods-img">
<image mode="widthFix" src="{{item.cover}}"></image>
</view>
<view class="goods-name">{{item.name}}</view>
<view class="goods-price-num col">
<view class="goods-num">{{'共'+item.quantity + '件'}}</view>
<view class="goods-price">
<text class="price-symbol">¥</text>
<text>{{item.price}}</text>
</view>
</view>
</view>
</view>
</view>
<view class="list-wrapper">
<view class="title-wrapper">订单详情</view>
<view class="info-wrapper row con-b">
<view class="info-name">姓名</view>
<view class="info-text">{{orderInfo.name}}</view>
</view>
<view class="info-wrapper row con-b">
<view class="info-name">手机</view>
<view class="info-text">{{orderInfo.phone}}</view>
</view>
<view class="info-wrapper row con-b">
<view class="info-name">身份证</view>
<view class="info-text">{{orderInfo.idNum}}</view>
</view>
</view>
<view class="list-wrapper">
<view class="title-wrapper">订单详情</view>
<view class="info-wrapper row con-b">
<view class="info-name">姓名</view>
<view class="info-text">{{orderInfo.name}}</view>
</view>
<view class="info-wrapper row con-b">
<view class="info-name">手机</view>
<view class="info-text">{{orderInfo.phone}}</view>
</view>
<view class="info-wrapper row con-b">
<view class="info-name">身份证</view>
<view class="info-text">{{orderInfo.idNum}}</view>
</view>
</view>
<view class="list-wrapper" wx:if="{{note}}">
<view class="title-wrapper">备注</view>
<view class="info-wrapper row con-b">
<view class="info-name">{{note}}</view>
</view>
</view>
</view>
<view class="footer-wrapper">
<view class="footer-btn row con-b align-e">
<view class="cancel-btn">取消核销</view>
<view class="confirm-btn">确认核销</view>
</view>
<Blank></Blank>
</view>
/* pages/home/home/home.wxss */ .container {
\ No newline at end of file margin-top: 120rpx;
padding-bottom: 196rpx;
}
.list-wrapper {
width: 750rpx;
}
.title-wrapper {
width: 750rpx;
height: 64rpx;
padding: 0 40rpx;
color: #959DA9;
font-size: 26rpx;
font-weight: 600;
line-height: 64rpx;
background-color: #F7F8FA;
}
.info-wrapper {
width: 670rpx;
height: 96rpx;
margin: 0 auto;
color: #15191F;
font-size: 30rpx;
line-height: 96rpx;
border-bottom: 1px solid #E2E7EF;
}
.info-wrapper:last-child {
border-bottom: none;
}
.goods-list {
padding: 24rpx 40rpx;
}
.goods-item {
height: 188rpx;
}
.goods-img {
width: 140rpx;
height: 140rpx;
background-color: #ccc;
}
.goods-name {
flex: 1;
height: 84rpx;
color: #15191F;
font-size: 30rpx;
font-weight: 600;
line-height: 42rpx;
margin: 0 32rpx;
}
.goods-price-num {
width: 100rpx;
height: 84rpx;
}
.goods-num {
flex: 1;
font-size: 30rpx;
font-weight: 600;
text-align: right;
}
.goods-price {
flex: 1;
text-align: right;
color: #959DA9;
font-size: 26rpx;
}
.price-symbol {
font-size: 22rpx;
}
.footer-wrapper {
position: fixed;
left: 0;
bottom: 0rpx;
}
.footer-btn {
width: 750rpx;
height: 128rpx;
padding: 0 40rpx;
background-color: #fff;
border-top: 1px solid #E2E7EF;
}
.cancel-btn, .confirm-btn {
width: 318rpx;
height: 96rpx;
font-size: 30rpx;
font-weight: 600;
line-height: 96rpx;
text-align: center;
border-radius: 4rpx;
}
.cancel-btn {
color: #656E7B;
background-color: #fff;
border: 1px solid #C2C7CF;
}
.confirm-btn {
color: #fff;
background-color: #86C5E1;
}
image {
width: 100%;
height: 100%;
}
Page({ Page({
data: { data: {
avatarUrl: '/pages/mine/home/image/avatar.png',
showDialog: false
}, },
onLoad: function (options) { onLoad: function (options) {
}, },
handleWriteOff() {
let showDialog = true
this.setData({
showDialog
})
},
handleScanCode() {
wx.scanCode({
onlyFromCamera: true,
success: (res) => {
console.log(res)
}
})
}
}) })
\ No newline at end of file
<!--pages/home/home/home.wxml--> <navigation class="navigation" titleText="券码核销" backIcon="/image/back.png"></navigation>
<text>pages/home/home/home.wxml</text>
<view class="container">
<!-- 头像信息 -->
<view class="header col align-c">
<view class="header-bg">
<image src=""></image>
</view>
<view class="header-avatar">
<l-avatar size="160" src="{{avatarUrl}}"></l-avatar>
</view>
<view class="header-info">
<view class="info-name">文碧海</view>
<view class="info-text col con-b">
<view class="row con-b">
<text class="info-left">工作身份</text>
<text class="info-right">前台核销</text>
</view>
<view class="row con-b">
<text class="info-left">所属门店</text>
<text class="info-right">艺术花坊</text>
</view>
</view>
</view>
</view>
<!-- 核销输入框 -->
<view class="coupon-input-wrapper row con-b">
<input placeholder="请输入券码" placeholder-style="color: #C2C7CF"></input>
<view class="coupon-input-btn" bindtap="handleWriteOff">核销</view>
<l-dialog show="{{showDialog}}" l-class="dialog-wrapper" l-title-class="dialog-title" l-confirm-class="dialog-confirm" title="非本店券码,无法使用">
<view class="dialog-content">所属门店:原味舒食</view>
</l-dialog>
<l-toast show="{{true}}" l-image-class="toast-image" l-class="toast-bg" image="/image/success.png" title="核销成功" />
</view>
<!-- 扫码核销 -->
<view class="coupon-scan-wrapper row con-c align-c" bindtap="handleScanCode">
<view class="scan-icon">
<image mode="widthFix" src="/image/scan.png"></image>
</view>
<view class="scan-text" bindtap="handleCouponScan">扫码核销</view>
<view class="scan-right">
<image mode="widthFix" src="/image/more-g.png"></image>
</view>
</view>
</view>
\ No newline at end of file
/* pages/home/home/home.wxss */ .header-bg {
\ No newline at end of file width: 750rpx;
height: 774rpx;
background-color: #ccc;
}
.header-avatar {
position: absolute;
top: 264rpx;
width: 160rpx;
height: 160rpx;
}
.header-info {
position: absolute;
top: 472rpx;
width: 232rpx;
height: 205rpx;
}
.info-name {
width: 100%;
height: 116rpx;
text-align: center;
color: #15191F;
font-size: 34rpx;
font-weight: 600;
}
.info-text {
height: 88rpx;
}
.info-left {
color: #959DA9;
font-size: 26rpx;
}
.info-right {
color: #15191F;
font-size: 26rpx;
}
.coupon-input-wrapper {
width: 668rpx;
height: 80rpx;
margin-top: 70rpx;
}
.coupon-input-wrapper input {
width: 480rpx;
height: 80rpx;
padding: 0 22rpx 0 24rpx;
font-size: 30rpx;
line-height: 80rpx;
border: 1px solid #DBDFE5;
border-radius: 4rpx;
}
.coupon-input-btn {
width: 156rpx;
height: 80rpx;
margin-left: 32rpx;
font-size: 30rpx;
color: #fff;
line-height: 80rpx;
text-align: center;
background-color: #86C5E1;
border-radius: 4rpx;
}
.dialog-wrapper {
width: 590rpx !important;
}
.dialog-title {
margin-top: 48rpx !important;
color: #15191F !important;
font-size: 34rpx !important;
font-weight: 600 !important;
}
.dialog-confirm {
height: 94rpx !important;
color: #5DB5DD !important;
font-size: 30rpx !important;
}
.dialog-content {
margin-bottom: 30rpx;
color: #959DA9;
font-size: 30rpx;
}
.toast-bg {
min-width: 262rpx !important;
min-height: 262prx !important;
}
.toast-image {
}
.coupon-scan-wrapper {
width: 668rpx;
height: 160rpx;
margin-top: 64rpx;
padding: 0 48rpx;
background-color: #F2F3F5;
border-radius: 4rpx;
}
.scan-text {
flex: 1;
height: 48rpx;
padding: 0 16rpx;
color: #15191F;
font-size: 34rpx;
font-weight: 600;
}
.scan-icon, .scan-right {
width: 40rpx;
height: 40rpx;
}
image {
width: 100%;
height: 100%;
}
...@@ -133,15 +133,34 @@ ...@@ -133,15 +133,34 @@
}, },
{ {
"id": -1, "id": -1,
"name": "pages/home/home/home", "name": "pages/commodity/snacks/snacks",
"pathName": "pages/home/home/home", "pathName": "pages/commodity/snacks/snacks",
"query": "", "query": "",
"scene": null "scene": null
}, },
{ {
"id": -1, "id": -1,
<<<<<<< HEAD
"name": "pages/commodity/snacks/snacks", "name": "pages/commodity/snacks/snacks",
"pathName": "pages/commodity/snacks/snacks", "pathName": "pages/commodity/snacks/snacks",
=======
"name": "pages/pay/coupon-input/coupon-input",
"pathName": "pages/pay/coupon-input/coupon-input",
>>>>>>> 667f630dfecbd067586751628eb240b2f54db267
"query": "",
"scene": null
},
{
<<<<<<< HEAD
"id": 11,
"name": "pages/home/service/service",
"pathName": "pages/home/service/service",
"query": "",
=======
"id": -1,
"name": "pages/pay/coupon-detail/coupon-detail",
"pathName": "pages/pay/coupon-detail/coupon-detail",
>>>>>>> 667f630dfecbd067586751628eb240b2f54db267
"scene": null "scene": null
} }
] ]
......
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