Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
严立
/
mini-shimao
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
4034dfe5
authored
Sep 28, 2020
by
wjw
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'master' of
http://120.77.182.185/yanl/mini-shimao.git
into master
parents
742d5476
da21f560
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
69 additions
and
65 deletions
app.js
image/commodity-default.png
pages/commodity/menu-food/menu-food.js
pages/commodity/menu-food/menu-food.wxml
pages/commodity/project-detail/project-detail.js
pages/commodity/project/project.wxss
pages/commodity/shopping-cart/shopping-cart.wxml
pages/commodity/shopping-cart/shopping-cart.wxss
pages/play/service-detail/service-detail.js
pages/play/service-detail/service-detail.wxml
app.js
View file @
4034dfe5
...
...
@@ -241,6 +241,7 @@ App({
break
}
funcUserInfo
.
userType
=
0
wx
.
setStorageSync
(
'userInfo'
,
funcUserInfo
)
// 如果用户身份有更新,则自动跳转到首页
...
...
image/commodity-default.png
0 → 100644
View file @
4034dfe5
72.6 KB
pages/commodity/menu-food/menu-food.js
View file @
4034dfe5
...
...
@@ -222,14 +222,14 @@ Page({
'inventoriesId'
:
funcResponse
[
i
].
inventoriesId
,
// 仓库标识
'sideBarId'
:
funcResponse
[
i
].
classifyId
,
// 商品标签
'name'
:
funcResponse
[
i
].
name
,
'cover'
:
funcResponse
[
i
].
coverImg
,
// 商品封面
'price'
:
funcResponse
[
i
].
sightseerPrice
,
//
普通价
'priceText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
sightseerPrice
),
// 普通价文本格式
'priceSpecial'
:
funcResponse
[
i
].
ownerPrice
,
//
业主价
'priceSpecialText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
ownerPrice
),
// 业主价文本格式
'priceDiscount'
:
100
,
//
活动价
'priceDiscountText'
:
'100.00'
,
// 活动价文本格式
'priceType'
:
1
,
'cover'
:
funcResponse
[
i
].
coverImg
?
funcResponse
[
i
].
coverImg
:
this
.
data
.
resourcesBase
+
'commodity/menu/commodity-item.png'
,
'price'
:
funcResponse
[
i
].
sightseerPrice
,
//
普通价
'priceText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
sightseerPrice
),
'priceSpecial'
:
funcResponse
[
i
].
ownerPrice
,
//
业主价
'priceSpecialText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
ownerPrice
),
'priceDiscount'
:
funcResponse
[
i
].
price
,
//
活动价
'priceDiscountText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
price
),
'priceType'
:
1
,
'describe'
:
funcResponse
[
i
].
synopsis
,
'describeDetail'
:
''
,
// 商品描述详情,在点击详情时获得数据
'tags'
:
funcResponse
[
i
].
tags
,
...
...
@@ -338,8 +338,6 @@ Page({
* @returns
*/
setCommodityDetail
:
function
()
{
console
.
log
(
this
.
data
.
commodityList
)
// 判断是否从推荐菜单进入,主动查询商品详情
if
(
this
.
data
.
option
.
commodityId
)
{
let
funcCommodityList
=
this
.
data
.
commodityList
...
...
@@ -466,8 +464,8 @@ Page({
*/
onCommodityAdd
:
function
(
event
)
{
// 获取点击高度
let
funcAnimationPointHeight
=
event
.
detail
.
y
this
.
setCartAnimationExport
(
funcAnimationPointHeight
)
//
let funcAnimationPointHeight = event.detail.y
//
this.setCartAnimationExport(funcAnimationPointHeight)
let
funcShoppingCart
=
this
.
data
.
shoppingCart
...
...
pages/commodity/menu-food/menu-food.wxml
View file @
4034dfe5
...
...
@@ -38,7 +38,9 @@
<block wx:for="{{item.commodity}}" wx:for-index="indexCommodity" wx:for-item="itemCommodity" wx:key="indexCommodity">
<view class="commodity-item row" data-item="{{itemCommodity}}" bind:tap="onCommodityDetail">
<view class="item-img">
<image src="{{itemCommodity.cover}}" mode="aspectFill"></image>
<!-- 暂时屏蔽图片下载 -->
<!-- <image src="{{itemCommodity.cover}}" mode="aspectFill"></image> -->
<image src="" mode="aspectFill"></image>
</view>
<view class="item-info">
<view class="item-info-title">{{itemCommodity.name}}</view>
...
...
@@ -84,7 +86,7 @@
</view>
<view class="item-operation-add row con-c align-c">
<image mode="aspectFill" src="{{imageBase + 'icon/cart-3.png'}}" catchtap="onCommodityAdd"></image>
<image mode="aspectFill" src="{{imageBase + 'icon/cart-3.png'}}"
data-item="{{itemCommodity}}"
catchtap="onCommodityAdd"></image>
</view>
</view>
</view>
...
...
@@ -115,6 +117,12 @@
<image class="banner-swiper-image" src="{{item}}"></image>
</swiper-item>
</block>
<block wx:if="{{commodityDetail.banner.length === 0}}">
<swiper-item class="banner-swiper-item">
<image class="banner-swiper-image" src="{{resourcesBase + 'commodity/menu/commodity-detail.png'}}"></image>
</swiper-item>
</block>
</swiper>
<view class="banner-wave">
...
...
pages/commodity/project-detail/project-detail.js
View file @
4034dfe5
...
...
@@ -108,7 +108,7 @@ Page({
'dateValid'
:
App
.
modular
.
miment
().
format
(
'YYYY.MM.DD'
),
// 有效时间
'dateInvalid'
:
funcResponse
[
i
].
inventorie
[
0
].
cardNam
,
// 失效时间
'name'
:
funcResponse
[
i
].
name
,
'cover'
:
funcResponse
[
i
].
ticketsImg
,
// 商品封面
'cover'
:
funcResponse
[
i
].
ticketsImg
?
funcResponse
[
i
].
ticketsImg
:
this
.
data
.
resourcesBase
+
'service/service.png'
,
'price'
:
funcResponse
[
i
].
inventorie
[
0
].
sightseerPrice
,
// 普通价
'priceText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
inventorie
[
0
].
sightseerPrice
),
// 普通价文本格式
'priceSpecial'
:
funcResponse
[
i
].
inventorie
[
0
].
ownerPrice
,
// 业主价
...
...
@@ -152,7 +152,7 @@ Page({
'dateValid'
:
App
.
modular
.
miment
().
format
(
'YYYY.MM.DD'
),
// 有效时间
'dateInvalid'
:
App
.
modular
.
miment
().
format
(
'YYYY.MM.DD'
),
// 失效时间
'name'
:
funcResponse
[
i
].
name
,
'cover'
:
funcResponse
[
i
].
ticketsImg
,
// 商品封面
'cover'
:
funcResponse
[
i
].
ticketsImg
?
funcResponse
[
i
].
ticketsImg
:
this
.
data
.
resourcesBase
+
'service/service.png'
,
'price'
:
funcResponse
[
i
].
sightseerPrice
,
// 普通价
'priceText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
sightseerPrice
),
// 普通价文本格式
'priceSpecial'
:
funcResponse
[
i
].
ownerPrice
,
// 业主价
...
...
@@ -219,7 +219,7 @@ Page({
'dateValid'
:
App
.
modular
.
miment
().
format
(
'YYYY.MM.DD'
),
// 有效时间
'dateInvalid'
:
funcResponse
[
i
].
inventorie
[
0
].
cardNam
,
// 失效时间
'name'
:
funcResponse
[
i
].
name
,
'cover'
:
funcResponse
[
i
].
ticketsImg
,
// 商品封面
'cover'
:
funcResponse
[
i
].
ticketsImg
?
funcResponse
[
i
].
ticketsImg
:
this
.
data
.
resourcesBase
+
'service/service.png'
,
'price'
:
funcResponse
[
i
].
inventorie
[
0
].
sightseerPrice
,
// 普通价
'priceText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
inventorie
[
0
].
sightseerPrice
),
// 普通价文本格式
'priceSpecial'
:
funcResponse
[
i
].
inventorie
[
0
].
ownerPrice
,
// 业主价
...
...
@@ -263,7 +263,7 @@ Page({
'dateValid'
:
App
.
modular
.
miment
().
format
(
'YYYY.MM.DD'
),
// 有效时间
'dateInvalid'
:
App
.
modular
.
miment
().
format
(
'YYYY.MM.DD'
),
// 失效时间
'name'
:
funcResponse
[
i
].
name
,
'cover'
:
funcResponse
[
i
].
ticketsImg
,
// 商品封面
'cover'
:
funcResponse
[
i
].
ticketsImg
?
funcResponse
[
i
].
ticketsImg
:
this
.
data
.
resourcesBase
+
'service/service.png'
,
// 商品封面
'price'
:
funcResponse
[
i
].
sightseerPrice
,
// 普通价
'priceText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
sightseerPrice
),
// 普通价文本格式
'priceSpecial'
:
funcResponse
[
i
].
ownerPrice
,
// 业主价
...
...
pages/commodity/project/project.wxss
View file @
4034dfe5
...
...
@@ -45,7 +45,7 @@
.shop-name {
width: 606rpx;
height:
7
0rpx;
height:
8
0rpx;
}
.shop-name image {
...
...
@@ -61,7 +61,7 @@
.commodity-item {
padding-bottom: 50rpx;
margin-top: 50rpx;
border-bottom:
1r
px #E2E7EF solid;
border-bottom:
0.5
px #E2E7EF solid;
}
.commodity-item:last-child {
...
...
@@ -159,7 +159,7 @@
width: 120rpx;
height: 56rpx;
margin-top: 24rpx;
border-radius:
4r
px;
border-radius:
2
px;
background: #86C5E1;
font-size: 22rpx;
...
...
pages/commodity/shopping-cart/shopping-cart.wxml
View file @
4034dfe5
...
...
@@ -19,7 +19,7 @@
<image hidden="{{item.isActive}}" class="list-item-selection-icon" src="/image/icon/selection-inactive.png" slot="icon"></image>
</l-checkbox>
</l-checkbox-group>
<image src="{{item.cover}}" mode="
widthFix
"></image>
<image src="{{item.cover}}" mode="
aspectFill
"></image>
</view>
<view class="list-item-info col">
<view class="list-item-name">
...
...
@@ -28,7 +28,7 @@
<view class="list-item-other row con-b">
<!-- 活动价样式 -->
<view class="list-item-price" wx:if="{{item.priceType === 1}}">
<view class="list-item-price-main row align-
c
">
<view class="list-item-price-main row align-
e
">
<text>¥</text>
<text>{{item.priceDiscountText}}</text>
<text class="price-discount">活动价</text>
...
...
@@ -41,7 +41,7 @@
<!-- 业主价样式 -->
<view class="list-item-price" wx:if="{{item.priceType === 2}}">
<view class="list-item-price-main row align-
c
">
<view class="list-item-price-main row align-
e
">
<text>¥</text>
<text>{{item.priceSpecialText}}</text>
<text class="price-special">业主价</text>
...
...
@@ -54,7 +54,7 @@
<!-- 普通价样式 -->
<view class="list-item-price" wx:if="{{item.priceType === 3}}">
<view class="list-item-price-main row align-
c
">
<view class="list-item-price-main row align-
e
">
<text>¥</text>
<text>{{item.priceText}}</text>
<text></text>
...
...
@@ -67,9 +67,10 @@
<view class="list-item-quantity col con-e align-e">
<view class="list-item-quantity-operation row con-b align-c">
<
text class="{{item.quantity === item.quantityMin ? '' : ''}}" data-index="{{index}}" bindtap="onQuantityReduce">-</text
>
<
image src="{{imageBase + 'icon/cut-1.png'}}" data-index="{{index}}" bindtap="onQuantityReduce"></image
>
<text>{{item.quantity}}</text>
<text class="{{item.quantityMax <= item.quantity ? 'list-item-quantity-disable' : ''}}" data-index="{{index}}" bindtap="onQuantityAdd">+</text>
<image hidden="{{item.quantityMax <= item.quantity}}" src="{{imageBase + 'icon/add-1.png'}}" data-index="{{index}}" bindtap="onQuantityAdd"></image>
<image hidden="{{item.quantityMax > item.quantity}}" src="{{imageBase + 'icon/add-2.png'}}" data-index="{{index}}" bindtap="onQuantityAdd"></image>
</view>
<view class="list-item-quantity-warning">
<text>{{item.quantityMax < 5 ? '仅剩' + item.quantityMax + '件' : ''}}</text>
...
...
@@ -82,7 +83,7 @@
</view>
<!-- 只有在食品购物车才出现 -->
<view class="pay-tip row align-c" wx:if="{{
isFoodCart && cart.length > 0
}}">
<view class="pay-tip row align-c" wx:if="{{
shopInfo.shopType === 5
}}">
<image src="{{imageBase + 'icon/warning-4.png'}}"></image>
<text>请在下单3天内取餐,逾期无效</text>
</view>
...
...
pages/commodity/shopping-cart/shopping-cart.wxss
View file @
4034dfe5
...
...
@@ -7,7 +7,7 @@
}
.container {
margin-top: 1
5
0rpx;
margin-top: 1
3
0rpx;
}
.shop-info {
...
...
@@ -36,7 +36,7 @@
/* 购物车列表 */
.shopping-cart-list {
width: 750rpx;
margin-top:
50
rpx;
margin-top:
38
rpx;
padding-bottom: 240rpx;
}
...
...
@@ -75,20 +75,22 @@
color: #15191F;
}
.list-item-price {
margin-top: 8rpx;
}
.list-item-price-main text:nth-child(1) {
height: 42rpx;
font-size: 22rpx;
font-weight:
5
00;
line-height:
42
rpx;
font-weight:
8
00;
line-height:
24
rpx;
color: #15191F;
}
.list-item-price-main text:nth-child(2) {
height: 42rpx;
margin-right: 8rpx;
font-size: 30rpx;
font-weight:
5
00;
line-height:
42
rpx;
font-weight:
8
00;
line-height:
30
rpx;
color: #15191F;
}
...
...
@@ -118,6 +120,10 @@
color: #E8D0AF;
}
.list-item-price-minor {
margin-top: 6rpx;
}
.list-item-price-minor text {
height: 32rpx;
font-size: 22rpx;
...
...
@@ -135,33 +141,27 @@
.list-item-quantity-operation {
width: 168rpx;
height: 48rpx;
padding: 0 1
6
rpx;
padding: 0 1
4
rpx;
border: 1px solid #DBDFE5;
border-radius: 4rpx;
}
.list-item-quantity-operation
text:nth-child(1)
{
.list-item-quantity-operation
image
{
width: 24rpx;
height: 24rpx;
line-height: 24rpx;
}
.list-item-quantity-operation text:nth-child(2) {
height: 36rpx;
font-size: 26rpx;
font-weight: 500;
line-height: 36rpx;
color: #15191F;
}
.list-item-quantity-operation text:nth-child(3) {
width: 24rpx;
.list-item-quantity-operation text {
width: 54rpx;
height: 24rpx;
line-height: 24rpx
;
}
border: 1px #DBDFE5 solid
;
border-style: none solid none solid;
.list-item-quantity-disable {
color: #CDD1D7;
text-align: center;
font-size: 24rpx;
font-weight: 500;
line-height: 24rpx;
color: #15191F;
}
.list-item-quantity-warning {
...
...
@@ -259,11 +259,12 @@
.order-pay-wrap {
width: 188rpx;
height: 96rpx;
border-radius: 2px;
background: #86c5e1;
font-size: 30rpx;
color: #fff;
font-weight: 600;
background-color: #86c5e1;
border-radius: 4rpx;
color: #fff;
}
.popup-wrap {
...
...
pages/play/service-detail/service-detail.js
View file @
4034dfe5
...
...
@@ -347,9 +347,6 @@ Page({
describe
:
funcDetail
[
funcIndex
].
describe
,
contact
:
funcDetail
[
funcIndex
].
contact
,
},
// detailActivity: funcDetail[funcIndex].activity,
// detailCommodity: funcDetail[funcIndex].commodity,
// detailEvaluate: funcDetail[funcIndex].evaluate,
})
}
})
...
...
@@ -403,7 +400,7 @@ Page({
let
funcList
=
[]
for
(
let
i
=
0
,
l
=
funcResponse
.
length
;
i
<
l
;
i
++
)
{
let
funcItem
=
{
'cover'
:
funcResponse
[
i
].
cover
,
'cover'
:
funcResponse
[
i
].
cover
?
funcResponse
[
i
].
cover
:
this
.
data
.
resourcesBase
+
'play/shop/commodity-card.png'
,
'id'
:
funcResponse
[
i
].
id
,
'title'
:
funcResponse
[
i
].
name
,
'officeId'
:
funcResponse
[
i
].
officeId
,
...
...
@@ -465,8 +462,7 @@ Page({
'typeId'
:
funcResponse
[
i
].
genre
,
// 商品类别标识
'sidebarId'
:
funcResponse
[
i
].
classifyId
,
// 商品分类标识
'name'
:
funcResponse
[
i
].
name
,
'cover'
:
funcResponse
[
i
].
coverImg
,
// 商品封面
'img'
:
funcResponse
[
i
].
img
.
split
(
'|'
),
// 商品详情图
'cover'
:
funcResponse
[
i
].
coverImg
?
funcResponse
[
i
].
coverImg
:
this
.
data
.
resourcesBase
+
'play/shop/commodity-card.png'
,
'price'
:
funcResponse
[
i
].
sightseerPrice
,
// 普通价
'priceText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
sightseerPrice
),
// 普通价文本格式
'priceSpecial'
:
funcResponse
[
i
].
ownerPrice
,
// 业主价
...
...
@@ -524,7 +520,7 @@ Page({
'name'
:
funcResponse
[
i
].
activityId
,
'dateBegin'
:
funcResponse
[
i
].
beginDate
,
'dateEnd'
:
funcResponse
[
i
].
endDate
,
'cover'
:
funcResponse
[
i
].
cover
,
'cover'
:
funcResponse
[
i
].
cover
?
funcResponse
[
i
].
cover
:
this
.
data
.
resourcesBase
+
'play/shop/commodity-card.png'
,
'movieDirector'
:
funcResponse
[
i
].
filmDirector
,
'movieLeader'
:
funcResponse
[
i
].
filmLead
,
'movieName'
:
funcResponse
[
i
].
filmName
,
...
...
@@ -859,7 +855,6 @@ Page({
* @returns
*/
onCommodityAll
:
function
()
{
console
.
log
(
this
.
data
.
option
)
switch
(
Number
(
this
.
data
.
option
.
id
))
{
case
7
:
wx
.
navigateTo
({
...
...
pages/play/service-detail/service-detail.wxml
View file @
4034dfe5
...
...
@@ -126,7 +126,7 @@
<block wx:for="{{detailCommodity}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="commodity-card-item col">
<view class="commodity-card-item-cover row con-c align-c">
<image mode="aspectFi
t" src="{{item.img[0] ? item.img[0] : emptyImg
}}"></image>
<image mode="aspectFi
ll" src="{{item.cover
}}"></image>
</view>
<view class="commodity-card-item-title row con-b align-c">
<text>{{item.name}}</text>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment