Commit a2b3f5c0 by 严立

LL - 商品列表,购物车

parent d0ecb2cc
{
"pages": [
"pages/commodity/shopping-cart/shopping-cart",
"pages/home/home/home",
"pages/home/service/service",
......@@ -23,7 +23,7 @@
"pages/play/strategy-detail/strategy-detail",
"pages/commodity/home/home",
"pages/commodity/shopping-cart/shopping-cart",
"pages/commodity/food/food",
"pages/commodity/project/project",
"pages/commodity/snacks/snacks",
......@@ -60,6 +60,8 @@
"l-avatar": "../miniprogram_npm/lin-ui/avatar/index",
"l-button": "../miniprogram_npm/lin-ui/button/index",
"l-card": "../miniprogram_npm/lin-ui/card/index",
"l-checkbox": "../miniprogram_npm/lin-ui/checkbox/index",
"l-checkbox-group": "../miniprogram_npm/lin-ui/checkbox-group/index",
"l-capsule-bar": "../miniprogram_npm/lin-ui/capsule-bar/index",
"l-dialog": "../miniprogram_npm/lin-ui/dialog/index",
"l-icon": "../miniprogram_npm/lin-ui/icon/index",
......@@ -96,20 +98,22 @@
"iconPath": "image/tabbar/home.png",
"selectedIconPath": "image/tabbar/home-s.png",
"text": "首页"
},
{
}, {
"pagePath": "pages/play/home/home",
"iconPath": "image/tabbar/play.png",
"selectedIconPath": "image/tabbar/play-s.png",
"text": "畅玩"
},
{
}, {
"pagePath": "pages/commodity/home/home",
"iconPath": "image/tabbar/play.png",
"selectedIconPath": "image/tabbar/play-s.png",
"text": "服务"
},{
"pagePath": "pages/campsite/home/home",
"iconPath": "image/tabbar/campsite.png",
"selectedIconPath": "image/tabbar/campsite-s.png",
"text": "营地"
},
{
}, {
"pagePath": "pages/mine/home/home",
"iconPath": "image/tabbar/mine.png",
"selectedIconPath": "image/tabbar/mine-s.png",
......
......@@ -6,30 +6,37 @@ let Development = {
miniAppId: 1,
databaseId: '581be62a80bb4f0485abd87abcf64dc0',
name: '海错图1号馆',
logo: 'shopping-cart-logo-4.png',
}, {
miniAppId: 2,
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',
}
]
}
......
{
"name": "mini-shimao",
"version": "1.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"lin-ui": {
"version": "0.8.6",
"resolved": "https://registry.npm.taobao.org/lin-ui/download/lin-ui-0.8.6.tgz",
"integrity": "sha1-mLXXHCzVzIAutYSCAJyRmlav1KY="
"name": "mini-shimao",
"version": "1.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"lin-ui": {
"version": "0.8.6",
"resolved": "https://registry.npm.taobao.org/lin-ui/download/lin-ui-0.8.6.tgz",
"integrity": "sha1-mLXXHCzVzIAutYSCAJyRmlav1KY="
}
}
}
}
}
\ No newline at end of file
{
"name": "mini-shimao",
"version": "1.0.0",
"description": "",
"main": "app.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"lin-ui": "^0.8.6"
}
}
"name": "mini-shimao",
"version": "1.0.0",
"description": "",
"main": "app.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"lin-ui": "^0.8.6"
}
}
\ No newline at end of file
{
"usingComponents": {
"Tips": "../../../component/Tips/Tips",
"Blank": "../../../component/Blank/Blank"
},
"navigationStyle": "default",
"navigationBarBackgroundColor": "#fff",
"navigationBarTitleText": "购物车"
"Tips": "../../../component/Tips/Tips"
}
}
\ No newline at end of file
......@@ -3,30 +3,35 @@ Page {
height: 100%;
}
.header {
width: 100%;
height: 116rpx;
padding: 16rpx 40rpx;
font-size: 30rpx;
.navigation {
z-index: 1100;
position: fixed;
top: 0;
left: 0;
width: 750rpx;
}
.header_img {
width: 112rpx;
height: 84rpx;
.container {
margin-top: 150rpx;
}
.header_img image {
width: 100%;
height: 100%;
.shop-info {
width: 750rpx;
height: 116rpx;
padding: 16rpx 40rpx;
font-size: 30rpx;
}
.header_title {
flex: 1;
color: #c36069;
.shop-info > image {
width: 400rpx;
height: 100rpx;
}
.header_clear {
height: 100%;
.shop-info > text {
flex-grow: 1;
height: 100rpx;
text-align: right;
line-height: 100rpx;
color: #656e7b;
}
......@@ -36,37 +41,36 @@ Page {
/* 购物车列表 */
.shopping-cart-list {
width: 100%;
height: calc(100vh - 390rpx);
margin-top: 10rpx;
width: 750rpx;
margin-top: 50rpx;
padding-bottom: 200rpx;
}
.list-item {
width: 100%;
height: 250rpx;
padding: 0 40rpx;
box-sizing: border-box;
}
.list-item-radio {
.list-item-selection,
.list-item-selection-icon {
width: 40rpx;
height: 40rpx;
margin: 54rpx 24rpx 0 0;
}
.list-item-radio radio {
transform: scale(0.7);
.list-item-cover {
height: 148rpx;
}
.list-item-cover image {
.list-item-cover > image {
width: 148rpx;
height: 148rpx;
margin-right: 30rpx;
margin: 0 30rpx 0 24rpx;
}
.list-item-info {
width: 430rpx;
height: 168rpx;
min-height: 168rpx;
}
.list-item-name {
......@@ -107,6 +111,19 @@ Page {
color: #EF4E4E;
}
.list-item-price-main .price-special {
width: 78rpx;
height: 32rpx;
border-radius: 4px;
background: linear-gradient(180deg, #3F4357 0%, #252532 100%);
text-align: center;
font-size: 18rpx;
font-weight: 500;
line-height: 30rpx;
color: #E8D0AF;
}
.list-item-price-minor text {
height: 32rpx;
font-size: 22rpx;
......@@ -147,6 +164,10 @@ Page {
line-height: 24rpx;
}
.list-item-quantity-disable {
color: #CDD1D7;
}
.list-item-quantity-warning {
width: 168rpx;
height: 32rpx;
......@@ -164,48 +185,63 @@ Page {
.tips-wrapper {
position: absolute;
.pay-tip {
position: fixed;
left: 0;
bottom: 196rpx;
width: 100%;
bottom: 200rpx;
width: 750rpx;
height: 72rpx;
}
.footer {
/* 结算区域 */
.pay {
position: fixed;
left: 0;
bottom: 0;
width: 100%;
height: 196rpx;
background-color: #fff;
display: flex;
width: 750rpx;
height: 200rpx;
padding: 0 40rpx 36rpx 36rpx;
box-sizing: border-box;
border-top: 1px solid #e2e7ef;
border-top: 1px solid #E2E7EF;
background: #FFFFFF;
}
.all_chk_wrap {
flex: 3;
.pay-selection {
height: 36rpx;
font-size: 26rpx;
color: #15191f;
font-weight: 400;
line-height: 36rpx;
color: #15191F;
}
.pay-selection text {
margin-left: 8rpx;
}
.total_price_wrap {
.pay-amount {
flex: 5;
text-align: right;
padding-right: 32rpx;
}
.total_price {
color: #86c5e1;
.pay-amount-total {
height: 53rpx;
font-size: 30rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
line-height: 42rpx;
color: #5DB5DD;
}
.total_price_text {
font-size: 44rpx;
.pay-amount-total text:nth-child(2) {
font-size: 38rpx;
}
.total_discount {
.pay-amount-discount {
height: 32rpx;
font-size: 22rpx;
font-weight: 400;
line-height: 32rpx;
color: #15191F;
}
.order_pay_wrap {
......@@ -264,4 +300,4 @@ Page {
image {
width: 100%;
height: 100%;
}
}
\ No newline at end of file
......@@ -3,6 +3,8 @@ let App = getApp()
Page({
data: {
shopId: '',
shopName: '',
shopLogo: '',
sideBar: [], // 侧边菜单
menuTitle: '', // 商品列表标题
commodityList: [], // 商品列表
......@@ -26,7 +28,9 @@ Page({
for (let i = 0, l = funcShopId.length; i < l; i++) {
if (funcMiniAppId === funcShopId[i].miniAppId) {
this.setData({
shopId: funcShopId[i].databaseId
shopId: funcShopId[i].databaseId,
shopName: funcShopId[i].name,
shopLogo: funcShopId[i].logo,
})
break
}
......@@ -157,6 +161,8 @@ Page({
success: (response) => {
let funcResponse = response.data
funcItem.banner = funcResponse.imgs.split('|')
funcItem.banner.pop()
console.log(funcItem.banner)
this.setData({
commodityDetail: funcItem,
winCommodityDetail: true
......@@ -233,6 +239,7 @@ Page({
*/
onShoppingCart: function() {
console.log(this.data.shoppingCart)
wx.setStorageSync('shopInfoBuffer', { 'id': this.data.shopId, 'name': this.data.shopName, 'logo': this.data.shopLogo })
wx.setStorageSync('shoppingCartBuffer', this.data.shoppingCart)
wx.navigateTo({
url: '/pages/commodity/shopping-cart/shopping-cart',
......
{
"usingComponents": {},
"navigationBarTitleText": "购物车",
"navigationStyle": "default",
"navigationBarBackgroundColor": "#fff"
"usingComponents": {}
}
\ No newline at end of file
<l-toast show="{{winToast}}" l-image-class="toast-image" l-class="toast-bg" image="/image/success.png" title="添加购物车成功" />
<navigation class="navigation" titleText="{{shopName}}" background="#FFFFFF;" backIcon="/image/back.png"></navigation>
<view class="cates">
<view class="cates-container">
<!-- 侧边菜单 -->
......@@ -84,9 +86,20 @@
<!-- 商品详情弹窗 -->
<l-popup show="{{winCommodityDetail}}" content-align="center" locked="{{true}}">
<view class="popup-wrap">
<view class="popup-img-wrapper">
<image mode="widthFix" src="./image/popup.png"></image>
<view id="banner" class="banner">
<swiper autoplay circular class="banner-swiper" interval="5000" duration="500">
<block wx:for="{{commodityDetail.banner}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<swiper-item class="banner-swiper-item">
<image class="banner-swiper-image" src="{{item}}"></image>
</swiper-item>
</block>
</swiper>
<view class="banner-wave">
<image src="/image/ornament-1.png" mode="widthFix"></image>
</view>
</view>
<view class="popup-info-wrapper">
<view class="popuo-info-title">{{commodityDetail.name}}</view>
<view class="popup-info-text">{{commodityDetail.describe}}</view>
......@@ -100,9 +113,12 @@
</view>
<view class="detail-price">
<text>¥</text>
<text>{{commodityDetail.priceDiscount}}</text>
</view>
<view class="popup-price-old">
<text>¥</text>
<text>{{commodityDetail.price}}</text>
</view>
<view class="popup-price-old">¥68.00</view>
</view>
<!-- 业主价样式 -->
......@@ -112,9 +128,12 @@
</view>
<view class="detail-price">
<text>¥</text>
<text>{{commodityDetail.priceSpecial}}</text>
</view>
<view class="popup-price-old">
<text>¥</text>
<text>{{commodityDetail.price}}</text>
</view>
<view class="popup-price-old">¥68.00</view>
</view>
<!-- 普通价样式 -->
......
Page {
height: 100%;
.navigation {
z-index: 1100;
position: fixed;
top: 0;
left: 0;
width: 750rpx;
}
.cates {
height: 100%;
margin-top: 150rpx;
}
.cates-container {
......@@ -145,7 +150,7 @@ Page {
width: 78rpx;
height: 32rpx;
border-radius: 4px;
background: #D56B52;
background: #FAEDEA;
text-align: center;
font-size: 18rpx;
......@@ -262,7 +267,7 @@ Page {
height: 36rpx;
margin-right: 16rpx;
border-radius: 4px;
background: #D56B52;
background: #FAEDEA;
text-align: center;
font-size: 18rpx;
......@@ -321,9 +326,47 @@ Page {
}
.toast-image {
z-index: 1900;
}
image {
width: 100%;
height: 100%;
}
/* 商品详情样式 */
.banner {
position: relative;
width: 606rpx;
height: 382rpx;
border-radius: 4px;
background: #FFFFFF;
}
.banner-swiper,
.banner-swiper-item,
.banner-swiper-image {
position: absolute;
top: 0 !important;
left: 0 !important;
width: 606rpx;
height: 382rpx;
}
.banner-wave {
z-index: 1100;
position: absolute;
bottom: -2rpx;
left: 0;
width: 606rpx;
height: 50rpx;
}
.banner-wave image {
width: 606rpx;
height: 50rpx;
}
\ No newline at end of file
......@@ -70,6 +70,17 @@ Page({
})
},
onShareAppMessage: function (res) {
if (res.from === 'button') {
// 来自页面内转发按钮
console.log(res.target)
}
return {
title: '自定义转发标题',
path: '/pages/home/home/home'
}
},
setNavigationLogo: function () {
this.setData({
navigationLogoTop: App.modular.utils.navigationElementCenterMarginTop(60)
......
......@@ -94,6 +94,6 @@
<button class="test-button" data-index="{{5}}" bindtap="onTest3">订单 待付款</button>
<button class="test-button" data-shop="{{4}}" bindtap="onShop">餐品列表</button>
<button class="test-button" data-shop="{{4}}" bindtap="onShop">餐品列表1111</button>
</view>
</view>
\ No newline at end of file
......@@ -140,27 +140,15 @@
},
{
"id": -1,
<<<<<<< HEAD
"name": "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
}
]
......
{
"desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
"rules": [{
"action": "allow",
"page": "*"
}]
"desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
"rules": [
{
"action": "allow",
"page": "*"
}
]
}
\ 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