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
c8b2ef96
authored
Sep 27, 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
c9c29bc0
d8e1c6c4
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
158 additions
and
243 deletions
app.js
pages/commodity/home/home.js
pages/commodity/home/home.wxml
pages/commodity/home/home.wxss
pages/commodity/menu-food/menu-food.js
pages/commodity/menu-food/menu-food.wxml
pages/commodity/menu-food/menu-food.wxss
pages/commodity/project-detail/project-detail.wxml
pages/commodity/project/project.js
pages/commodity/shopping-cart/shopping-cart.wxss
pages/home/home/home.js
pages/pay/order-input/order-input.wxml
pages/pay/order-input/order-input.wxss
pages/play/service-detail/service-detail.js
pages/play/service-detail/service-detail.wxml
pages/play/service-detail/service-detail.wxss
app.js
View file @
c8b2ef96
...
...
@@ -338,7 +338,8 @@ App({
// 商品通用属性设置
let
funcInfo
=
{
'id'
:
funcInfoRaw
.
id
,
'typeId'
:
funcInfoRaw
.
genre
,
// 分类
'typeId'
:
Number
(
funcInfoRaw
.
genre
),
// 分类
'shopId'
:
funcInfoRaw
.
officeId
,
// 门店
'name'
:
funcInfoRaw
.
name
,
// 名称
'cover'
:
funcInfoRaw
.
ticketsImg
,
// 封面
'notificationId'
:
funcInfoRaw
.
notificationId
,
// 购买须知
...
...
@@ -353,6 +354,11 @@ App({
'dateValid'
:
this
.
modular
.
miment
().
format
(
'YYYY.MM.DD'
),
// 有效时间
'dateInvalid'
:
funcInfoRaw
.
cardNam
,
// 失效时间
'quantity'
:
1
,
'quantityMin'
:
1
,
'quantityMax'
:
1
,
'isActive'
:
true
}
let
funcUserType
=
wx
.
getStorageSync
(
'userInfo'
).
userType
...
...
pages/commodity/home/home.js
View file @
c8b2ef96
...
...
@@ -5,6 +5,8 @@ Page({
imageBase
:
App
.
globalData
.
appImageBase
,
resourcesBase
:
App
.
globalData
.
appResourcesBase
,
cssGreeting
:
''
,
// 适应顶部边距
option
:
{},
userInfo
:
{},
...
...
@@ -25,14 +27,16 @@ Page({
// formPage=order&shopAppId=1&commodityType=5
this
.
setData
({
option
:
option
,
userInfo
:
wx
.
getStorageSync
(
'userInfo'
)
})
this
.
setGreetingMessage
()
this
.
queryShopCover
()
},
onShow
:
function
()
{
this
.
setData
({
userInfo
:
wx
.
getStorageSync
(
'userInfo'
),
cssGreeting
:
wx
.
getStorageSync
(
'navigationStatusHeight'
)
+
wx
.
getStorageSync
(
'navigationCapsuleHeight'
)
+
20
*
wx
.
getStorageSync
(
'unitProportion'
),
})
this
.
setGreetingMessage
()
this
.
queryShopCover
()
this
.
queryRecommend
()
},
...
...
pages/commodity/home/home.wxml
View file @
c8b2ef96
...
...
@@ -2,8 +2,8 @@
<view class="container">
<!-- 问候订制 -->
<view class="greeting">
<text>{{greetingName + greetingMessage}}</text>
<view class="greeting"
style="{{'padding-top:' + cssGreeting + 'px;'}}"
>
<text>{{greetingName +
',' +
greetingMessage}}</text>
</view>
<!-- 商店 -->
...
...
@@ -102,8 +102,8 @@
<image src="{{resourcesBase + 'commodity/home/shop-title-2.png'}}"></image>
</view>
<view class="shop-title col">
<text>
这里有来自大自然的馈赠
</text>
<text>
用心烹饪的美食
</text>
<text>
可以为家人、朋友
</text>
<text>
准备一份精心的礼物
</text>
</view>
<swiper indicator-dots="true">
<!-- 海错图文创店 -->
...
...
@@ -140,17 +140,37 @@
</swiper>
</view>
<view class="service_item">
<view class="room-appointment">
<view class="shop-title col">
<text>滨海温泉院墅</text>
<text>足不出户即可享受滨海温泉</text>
</view>
<view bindtap="onRoomAppointment">
<image src="{{resourcesBase + 'commodity/home/room-appointment.png'}}"></image>
</view>
</view>
<view class="after-sales">
<view class="shop-title col">
<text>碧海文化,真挚银湖</text>
<text>为您创造健康休闲的度假生活方式</text>
</view>
<view bindtap="customerService">
<image src="{{resourcesBase + 'commodity/home/after-sales.png'}}"></image>
</view>
</view>
<!-- <view class="service-item">
<view class="shop-title col">
<text>滨海温泉院墅</text>
<text>足不出户即可享受滨海温泉</text>
</view>
<view style="position: relative;">
<image class="home
_
footer" src="{{resourcesBase + 'commodity/home/other.png'}}"></image>
<view class="
seeHouse
" bindtap="onRoomAppointment">预约看房</view>
<image class="home
-
footer" src="{{resourcesBase + 'commodity/home/other.png'}}"></image>
<view class="
room-appointment
" bindtap="onRoomAppointment">预约看房</view>
<view class="call" bindtap="customerService">拨打客服</view>
</view>
</view>
</view>
-->
</view>
<!-- 客服热线 -->
...
...
pages/commodity/home/home.wxss
View file @
c8b2ef96
.greetings_header {
padding-top: 196rpx;
padding-left: 46rpx;
width: 750rpx;
}
.greetings_title {
font-size: 58rpx;
font-weight: 500;
color: #15191f;
text-align: left;
}
.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: 4rpx;
background: #86c5e1;
font-weight: 500;
color: #fff;
font-size: 26rpx;
line-height: 64rpx;
text-align: center;
}
.items_text {
text-align: center;
margin-top: 45rpx;
font-weight: 300;
color: #000;
letter-spacing: 3px;
line-height: 42rpx;
}
.home_footer {
width: 750rpx;
height: 1640rpx;
margin-top: 64rpx;
}
.seeHouse {
position: absolute;
background: #86c5e1;
border-radius: 4rpx;
top: 294rpx;
width: 200rpx;
height: 64rpx;
left: 276rpx;
line-height: 64rpx;
color: #fff;
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: #fff;
font-size: 26rpx;
text-align: center;
font-weight: 500;
}
.greeting {
width: 750rpx;
padding:
140rpx
46rpx 130rpx 46rpx;
padding:
0
46rpx 130rpx 46rpx;
}
.greeting text {
...
...
@@ -197,21 +19,21 @@ swiper {
}
.shop-name image {
width:
67
0rpx;
width:
75
0rpx;
height: 60rpx;
}
.shop-title {
width: 670rpx;
height: 172rpx;
margin:
3
2rpx 40rpx 0 40rpx;
margin:
2
2rpx 40rpx 0 40rpx;
}
.shop-title text {
font-size: 34rpx;
font-weight: 300;
line-height: 6
4
rpx;
letter-spacing:
4
rpx;
line-height: 6
0
rpx;
letter-spacing:
6
rpx;
color: #15191F;
}
...
...
@@ -360,4 +182,30 @@ swiper {
font-weight: 300;
line-height: 42rpx;
color: #000000;
}
.home-footer {
width: 750rpx;
height: 1640rpx;
margin-top: 64rpx;
}
.room-appointment {
margin-top: 200rpx;
}
.room-appointment image {
display: block;
width: 750rpx;
height: 570rpx;
}
.after-sales {
margin-top: 200rpx;
}
.after-sales image {
display: block;
width: 750rpx;
height: 700rpx;
}
\ No newline at end of file
pages/commodity/menu-food/menu-food.js
View file @
c8b2ef96
...
...
@@ -227,8 +227,8 @@ Page({
'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
)
,
// 活动价文本格式
'priceDiscount'
:
100
,
// 活动价
'priceDiscountText'
:
'100.00'
,
// 活动价文本格式
'priceType'
:
1
,
'describe'
:
funcResponse
[
i
].
synopsis
,
'describeDetail'
:
''
,
// 商品描述详情,在点击详情时获得数据
...
...
pages/commodity/menu-food/menu-food.wxml
View file @
c8b2ef96
...
...
@@ -30,15 +30,15 @@
</scroll-view>
<!-- 商品列表 -->
<scroll-view class="menu-list" scroll-y scroll-top="{{commoditScroll}}" bindscroll="onCommoditScroll">
<scroll-view class="menu-list" scroll-y s
tyle="{{'padding-top: ' + sideBarTopPadding + 'px;'}}" s
croll-top="{{commoditScroll}}" bindscroll="onCommoditScroll">
<block wx:for="{{commodityList}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="
right-conten
t-title">{{item.tab}}</view>
<view class="
menu-lis
t-title">{{item.tab}}</view>
<!-- 循环商品列表 -->
<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="
widthFix
"></image>
<image src="{{itemCommodity.cover}}" mode="
aspectFill
"></image>
</view>
<view class="item-info">
<view class="item-info-title">{{itemCommodity.name}}</view>
...
...
@@ -50,7 +50,7 @@
<view class="item-other row con-b">
<!-- 活动价样式 -->
<view wx:if="{{itemCommodity.priceType === 1}}">
<view class="item-price row align-
c
">
<view class="item-price row align-
e
">
<text>¥</text>
<text>{{itemCommodity.priceDiscountText}}</text>
<text class="item-price-discount">活动价</text>
...
...
@@ -83,10 +83,8 @@
</view>
</view>
<view class="item-operation-add">
<button class="row con-c align-c" data-item="{{itemCommodity}}" catchtap="onCommodityAdd">
<image mode="widthFix" src="{{imageBase + 'icon/cart-3.png'}}"></image>
</button>
<view class="item-operation-add row con-c align-c">
<image mode="aspectFill" src="{{imageBase + 'icon/cart-3.png'}}" catchtap="onCommodityAdd"></image>
</view>
</view>
</view>
...
...
pages/commodity/menu-food/menu-food.wxss
View file @
c8b2ef96
...
...
@@ -40,17 +40,16 @@ page {
.menu-list {
width: 590rpx;
height: 100vh;
margin-top: 140rpx;
padding: 0 32rpx 200rpx 32rpx;
padding: 0 28rpx 80rpx 32rpx;
overflow-y: scroll;
background: #FFFFFF;
}
.
right-conten
t::-webkit-scrollbar {
.
menu-lis
t::-webkit-scrollbar {
width: 0;
}
.
right-conten
t-title {
.
menu-lis
t-title {
height: 100rpx;
padding: 32rpx 0;
font-size: 26rpx;
...
...
@@ -89,17 +88,16 @@ page {
.commodity-item {
width: 100%;
min-height: 250rpx;
padding-bottom: 5
6
rpx;
padding-bottom: 5
8
rpx;
box-sizing: border-box;
}
.item-img {
.item-img
image
{
width: 160rpx;
height: 160rpx;
}
.item-info {
flex: 1;
margin-left: 28rpx;
}
...
...
@@ -130,7 +128,7 @@ page {
}
.item-other {
margin-top:
24
rpx;
margin-top:
30
rpx;
}
.item-operation {
...
...
@@ -142,11 +140,15 @@ page {
.item-price text:nth-child(1) {
font-size: 22rpx;
font-weight: 800;
line-height: 24rpx;
}
.item-price text:nth-child(2) {
margin-right: 8rpx;
font-size: 30rpx;
font-weight: 800;
line-height: 30rpx;
}
.item-price-discount {
...
...
@@ -175,7 +177,7 @@ page {
color: #E8D0AF;
}
.item-operation-add
button
{
.item-operation-add {
width: 44rpx;
height: 44rpx;
border-radius: 50%;
...
...
@@ -204,7 +206,7 @@ page {
}
.item-info-old-price {
margin-top:
4
rpx;
margin-top:
8
rpx;
font-size: 22rpx;
color: #959da9;
text-decoration: line-through;
...
...
pages/commodity/project-detail/project-detail.wxml
View file @
c8b2ef96
...
...
@@ -14,7 +14,7 @@
<view class="project-name">
<text>{{item.name}}</text>
</view>
<view class="project-msg" wx:if="{{shopInfo.appId === 7}}">
<view class="project-msg" wx:if="{{shopInfo.appId === 7
&& item.describe
}}">
<text>{{item.describe}}</text>
</view>
...
...
pages/commodity/project/project.js
View file @
c8b2ef96
...
...
@@ -69,7 +69,7 @@ Page({
'id'
:
funcResponse
[
i
].
id
,
'cover'
:
funcResponse
[
i
].
img
,
'targetId'
:
funcResponse
[
i
].
jumpId
,
// 跳转目标 id
'targetType'
:
funcResponse
[
i
].
jumpColumnId
,
'targetType'
:
Number
(
funcResponse
[
i
].
jumpColumnId
)
,
}
funcList
.
push
(
funcItem
)
}
...
...
@@ -235,11 +235,10 @@ Page({
* @returns
*/
onBanner
:
function
(
event
)
{
return
let
funcItme
=
event
.
currentTarget
.
dataset
.
item
// 月卡商品
funcItme
.
targetId
=
'94b7a6a7f82845d3a1875ee1e7a033fa'
//
funcItme.targetId = '94b7a6a7f82845d3a1875ee1e7a033fa'
// 门票商品
// funcItme.targetId = '0ac170457a8546469976753ea21cd8e9'
...
...
@@ -253,7 +252,7 @@ Page({
// 餐品
// funcItme.targetId = '329f304aca104ff1887dde5877e15126'
funcItme
.
targetType
=
4
//
funcItme.targetType = 4
let
funcUrl
=
''
if
(
funcItme
.
targetType
)
{
...
...
@@ -285,17 +284,17 @@ Page({
case
3
:
// 攻略详情
if
(
funcItme
.
targetId
)
{
funcUrl
=
'/pages/play/strategy-detail/strategy-detail?id='
+
funcItme
.
targetId
wx
.
navigateTo
({
url
:
funcUrl
})
}
if
(
funcItme
.
targetId
===
''
)
return
funcUrl
=
'/pages/play/strategy-detail/strategy-detail?id='
+
funcItme
.
targetId
wx
.
navigateTo
({
url
:
funcUrl
})
break
case
4
:
// 商品
// 跳转商品下单,需要查询商品参数
if
(
funcItme
.
targetId
===
''
)
return
App
.
wxRequest
({
url
:
'/api/v1/commodity/getCommodityParticulars'
,
data
:
{
...
...
@@ -304,15 +303,24 @@ Page({
success
:
(
response
)
=>
{
console
.
log
(
response
)
console
.
log
(
App
.
setCommodityInfo
(
response
.
data
))
let
funcCommodityInfo
=
App
.
setCommodityInfo
(
response
.
data
)
let
funcShopInfo
=
App
.
globalData
.
shopId
for
(
let
i
=
0
,
l
=
funcShopInfo
.
length
;
i
<
l
;
i
++
)
{
if
(
funcCommodityInfo
.
shopId
===
funcShopInfo
[
i
].
id
)
{
App
.
setShopInfo
(
funcShopInfo
[
i
].
appId
,
funcCommodityInfo
.
typeId
)
break
}
}
wx
.
setStorageSync
(
'shoppingCartBuffer'
,
[
funcCommodityInfo
])
funcUrl
=
'/pages/pay/order-input/order-input?type='
+
funcCommodityInfo
.
typeId
wx
.
navigateTo
({
url
:
funcUrl
})
}
})
// if (funcItme.targetId) {
// funcUrl = '/pages/pay/order-input/order-input?type=' + funcItme.targetId
// wx.navigateTo({
// url: funcUrl
// })
// }
break
}
}
...
...
pages/commodity/shopping-cart/shopping-cart.wxss
View file @
c8b2ef96
...
...
@@ -322,9 +322,10 @@
.empty-title {
margin-top: 64rpx;
color: #959DA9;
font-size: 38rpx;
font-weight: 800;
line-height: 52rpx;
color: #959DA9;
}
.empty-btn {
...
...
pages/home/home/home.js
View file @
c8b2ef96
...
...
@@ -217,7 +217,7 @@ Page({
})
},
getBanner
()
{
getBanner
:
function
()
{
var
that
=
this
App
.
wxRequest
({
url
:
'/api/v1/banner/getList'
,
...
...
@@ -228,6 +228,17 @@ Page({
}
})
// App.wxRequest({
// url: '/api/v1/banner/getOfficeByBanner',
// data: {
// 'smColumnId': 0,
// },
// success: (res) => {
// this.setData({
// banner: res.data.splice(0, 3)
// })
// }
// })
},
// 最新动态列表
...
...
pages/pay/order-input/order-input.wxml
View file @
c8b2ef96
...
...
@@ -291,7 +291,7 @@
<cover-view class="pay-tip-text row con-c align-c">付款后一经确认不得退款</cover-view>
</cover-view>
<cover-view class="pay-operation row con-b align-c">
<cover-view class="pay-operation-amount row
con-c
align-c">{{'¥' + payAmount}}</cover-view>
<cover-view class="pay-operation-amount row align-c">{{'¥' + payAmount}}</cover-view>
<cover-view class="pay-operation-confirm row con-c align-c" bindtap="onPaySubmit">立即支付</cover-view>
</cover-view>
</cover-view>
...
...
pages/pay/order-input/order-input.wxss
View file @
c8b2ef96
...
...
@@ -620,6 +620,7 @@
}
.pay-operation-amount {
width: 442rpx;
height: 58rpx;
background: rgba(0, 0, 0, 0);
...
...
pages/play/service-detail/service-detail.js
View file @
c8b2ef96
...
...
@@ -842,9 +842,19 @@ Page({
* @returns
*/
onCommodityAll
:
function
()
{
wx
.
navigateTo
({
url
:
'/pages/commodity/menu-food/menu-food'
,
})
console
.
log
(
this
.
data
.
option
)
switch
(
Number
(
this
.
data
.
option
.
id
))
{
case
7
:
wx
.
navigateTo
({
url
:
'/pages/commodity/project-detail/project-detail'
,
})
break
default
:
wx
.
navigateTo
({
url
:
'/pages/commodity/menu-food/menu-food'
,
})
}
},
onMovieAll
:
function
()
{
...
...
pages/play/service-detail/service-detail.wxml
View file @
c8b2ef96
...
...
@@ -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
ll
" src="{{item.img[0]}}"></image>
<image mode="aspectFi
t
" src="{{item.img[0]}}"></image>
</view>
<view class="commodity-card-item-title row con-b align-c">
<text>{{item.name}}</text>
...
...
pages/play/service-detail/service-detail.wxss
View file @
c8b2ef96
...
...
@@ -267,7 +267,6 @@
.commodity-card-item-nothing image {
width: 96rpx;
height: 76rpx;
}
.commodity-card-item-nothing text {
...
...
@@ -312,10 +311,16 @@
width: 562rpx;
height: 316rpx;
}
.commodity-card-item-cover image{
.commodity-card-item-cover {
width: 562rpx;
height: 316rpx;
}
.commodity-card-item-cover image {
max-width: 562rpx;
height: 316rpx;
}
.movie-card-item > image {
width: 300rpx;
height: 369rpx;
...
...
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