Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wxapp
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
亲子游项目
wxapp
Commits
a28f3d12
Commit
a28f3d12
authored
Oct 10, 2018
by
汪睦雄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
123
parent
c8a31f00
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
89 additions
and
36 deletions
+89
-36
app.wxss
+0
-0
components/banners/index.js
+11
-0
components/banners/index.wxml
+3
-3
components/banners/index.wxss
+3
-2
pages/detail/appoint/index.js
+17
-1
pages/detail/appoint/index.wxml
+4
-4
pages/detail/enroll/index.js
+19
-9
pages/detail/enroll/index.wxml
+14
-8
pages/detail/enroll/index.wxss
+5
-0
pages/index/index.wxml
+4
-4
pages/index/index.wxss
+4
-0
pages/me/order/index.wxml
+2
-2
project.config.json
+3
-3
No files found.
app.wxss
View file @
a28f3d12
components/banners/index.js
View file @
a28f3d12
...
@@ -53,6 +53,17 @@ Component({
...
@@ -53,6 +53,17 @@ Component({
wx
.
navigateTo
({
wx
.
navigateTo
({
url
:
'/pages/webview/index?url='
+
url
+
'&t='
+
type_text
,
url
:
'/pages/webview/index?url='
+
url
+
'&t='
+
type_text
,
})
})
}
else
{
// 预览大图
let
image
=
event
.
currentTarget
.
dataset
.
image
let
imgs
=
[]
for
(
let
i
=
0
;
i
<
this
.
data
.
banners
.
length
;
i
++
)
{
imgs
.
push
(
this
.
data
.
banners
[
i
].
image
)
}
wx
.
previewImage
({
urls
:
imgs
,
current
:
image
})
}
}
}
}
}
}
...
...
components/banners/index.wxml
View file @
a28f3d12
<!--components/banners/index.wxml-->
<!--components/banners/index.wxml-->
<view class='banners-wrapper'>
<view class='banners-wrapper'>
<view class='banners-swipper'>
<view class='banners-swipper'>
<swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}">
<swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}"
style='height:180px;'
>
<block wx:for="{{banners}}" wx:for-item="banner" wx:key="{{banner.id}}">
<block wx:for="{{banners}}" wx:for-item="banner" wx:key="{{banner.id}}">
<swiper-item>
<swiper-item
class="banner-item"
>
<view data-url="{{banner.url}}" data-type="{{banner.type}}" data-oid="{{banner.oid}}" data-txt="{{banner.type_text}}" catchtap='_tapBanner'>
<view data-url="{{banner.url}}" data-type="{{banner.type}}" data-oid="{{banner.oid}}" data-txt="{{banner.type_text}}"
data-image="{{banner.image}}"
catchtap='_tapBanner'>
<form bindsubmit="__collectFormId" report-submit='true'>
<form bindsubmit="__collectFormId" report-submit='true'>
<button class='form-button' form-type='submit'>
<button class='form-button' form-type='submit'>
<image src="{{banner.image}}" class="banner-image" mode='aspectFill' />
<image src="{{banner.image}}" class="banner-image" mode='aspectFill' />
...
...
components/banners/index.wxss
View file @
a28f3d12
...
@@ -16,9 +16,10 @@
...
@@ -16,9 +16,10 @@
transform: translateZ(0);
transform: translateZ(0);
-webkit-mask-image: -webkit-radial-gradient(circle, white 100%, black 100%);
-webkit-mask-image: -webkit-radial-gradient(circle, white 100%, black 100%);
}
}
.banner-item{
height: 180px;
}
.banner-image {
.banner-image {
background: transparent;
background: transparent;
width: 100%;
width: 100%;
height: 150px;
}
}
pages/detail/appoint/index.js
View file @
a28f3d12
...
@@ -13,6 +13,7 @@ Page({
...
@@ -13,6 +13,7 @@ Page({
* 页面的初始数据
* 页面的初始数据
*/
*/
data
:
{
data
:
{
nickname
:
{},
detail
:
{},
detail
:
{},
phone
:
''
,
phone
:
''
,
...
@@ -51,7 +52,14 @@ Page({
...
@@ -51,7 +52,14 @@ Page({
* 生命周期函数--监听页面显示
* 生命周期函数--监听页面显示
*/
*/
onShow
:
function
()
{
onShow
:
function
()
{
this
.
setData
({
nickname
:
app
.
globalData
.
userInfo
.
nickname
})
if
(
app
.
globalData
.
userInfo
.
phone
&&
app
.
globalData
.
userInfo
.
phone
.
length
>
0
)
{
this
.
setData
({
phone
:
app
.
globalData
.
userInfo
.
phone
})
}
},
},
getDetailData
:
function
()
{
getDetailData
:
function
()
{
...
@@ -144,6 +152,13 @@ Page({
...
@@ -144,6 +152,13 @@ Page({
content
:
res
.
msg
,
content
:
res
.
msg
,
type
:
!
res
.
code
?
'success'
:
'error'
type
:
!
res
.
code
?
'success'
:
'error'
});
});
if
(
!
res
.
code
)
{
setTimeout
(()
=>
{
wx
.
navigateBack
({
delta
:
1
})
},
800
)
}
})
})
}
}
})
})
\ No newline at end of file
pages/detail/appoint/index.wxml
View file @
a28f3d12
...
@@ -27,8 +27,8 @@
...
@@ -27,8 +27,8 @@
<!-- 报名信息 -->
<!-- 报名信息 -->
<view class='project-input'>
<view class='project-input'>
<i-cell-group>
<i-cell-group>
<i-cell title="姓名" i
s-link i
-class="cell-class">
<i-cell title="姓名" i-class="cell-class">
<input slot="footer" class='input' type='text' placeholder='请输入您的姓名' bindinput='handleNickname'></input>
<input slot="footer" class='input' type='text' placeholder='请输入您的姓名' bindinput='handleNickname'
value='{{nickname}}'
></input>
</i-cell>
</i-cell>
<i-cell title="手机号" i-class="cell-class">
<i-cell title="手机号" i-class="cell-class">
<block wx:if="{{phone.length == 0}}">
<block wx:if="{{phone.length == 0}}">
...
@@ -38,12 +38,12 @@
...
@@ -38,12 +38,12 @@
<text slot="footer">{{phone}}</text>
<text slot="footer">{{phone}}</text>
</block>
</block>
</i-cell>
</i-cell>
<i-cell title="期望
活动
时间" is-link i-class="cell-class">
<i-cell title="期望时间" is-link i-class="cell-class">
<picker slot="footer" class='input' mode="date" value="{{date}}" bindchange="handleDateChange" class="picker">
<picker slot="footer" class='input' mode="date" value="{{date}}" bindchange="handleDateChange" class="picker">
<view class='picker-text'>{{date}}</view>
<view class='picker-text'>{{date}}</view>
</picker>
</picker>
</i-cell>
</i-cell>
<i-cell title="备注" i
s-link i
-class="cell-class">
<i-cell title="备注" i-class="cell-class">
<input slot="footer" class='input' type='text' placeholder='备注(可选)' bindinput='handleRemark'></input>
<input slot="footer" class='input' type='text' placeholder='备注(可选)' bindinput='handleRemark'></input>
</i-cell>
</i-cell>
</i-cell-group>
</i-cell-group>
...
...
pages/detail/enroll/index.js
View file @
a28f3d12
...
@@ -25,7 +25,8 @@ Page({
...
@@ -25,7 +25,8 @@ Page({
childrenAge
:
0
,
childrenAge
:
0
,
remark
:
''
,
remark
:
''
,
// 订单
// 订单
order
:
{}
order
:
{},
nums
:
[
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
,
11
,
12
,
13
,
14
,
15
]
},
},
/**
/**
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
...
@@ -60,6 +61,14 @@ Page({
...
@@ -60,6 +61,14 @@ Page({
this
.
setData
({
this
.
setData
({
user
:
app
.
globalData
.
userInfo
user
:
app
.
globalData
.
userInfo
})
})
this
.
setData
({
nickname
:
app
.
globalData
.
userInfo
.
nickname
})
if
(
app
.
globalData
.
userInfo
.
phone
&&
app
.
globalData
.
userInfo
.
phone
.
length
>
0
)
{
this
.
setData
({
phone
:
app
.
globalData
.
userInfo
.
phone
})
}
},
},
getDetailData
:
function
()
{
getDetailData
:
function
()
{
...
@@ -109,9 +118,10 @@ Page({
...
@@ -109,9 +118,10 @@ Page({
})
})
},
},
handleFamilyNum
:
function
(
event
)
{
// 家庭组数
bindPickerChange
:
function
(
event
)
{
this
.
setData
({
this
.
setData
({
familyNum
:
event
.
detail
.
value
familyNum
:
parseInt
(
event
.
detail
.
value
)
})
})
},
},
...
@@ -123,13 +133,13 @@ Page({
...
@@ -123,13 +133,13 @@ Page({
handleAdultNum
:
function
(
event
)
{
handleAdultNum
:
function
(
event
)
{
this
.
setData
({
this
.
setData
({
adultNum
:
event
.
detail
.
value
adultNum
:
parseInt
(
event
.
detail
.
value
)
})
})
},
},
handleChildrenNum
:
function
(
event
)
{
handleChildrenNum
:
function
(
event
)
{
this
.
setData
({
this
.
setData
({
childrenNum
:
event
.
detail
.
value
childrenNum
:
parseInt
(
event
.
detail
.
value
)
})
})
},
},
...
@@ -147,7 +157,7 @@ Page({
...
@@ -147,7 +157,7 @@ Page({
handleSubmit
:
function
()
{
handleSubmit
:
function
()
{
let
that
=
this
let
that
=
this
if
(
!
this
.
data
.
familyNum
||
!
this
.
data
.
nickname
||
!
this
.
data
.
phone
)
{
if
(
!
this
.
data
.
nickname
||
!
this
.
data
.
phone
)
{
$Toast
({
$Toast
({
content
:
'请完善必要信息'
,
content
:
'请完善必要信息'
,
type
:
'error'
type
:
'error'
...
@@ -163,11 +173,11 @@ Page({
...
@@ -163,11 +173,11 @@ Page({
}
}
api
.
project
.
order
({
api
.
project
.
order
({
pid
:
this
.
data
.
id
,
pid
:
this
.
data
.
id
,
sign_limits
:
this
.
data
.
familyNum
,
sign_limits
:
this
.
data
.
familyNum
+
1
,
nickname
:
this
.
data
.
nickname
,
nickname
:
this
.
data
.
nickname
,
phone
:
this
.
data
.
phone
,
phone
:
this
.
data
.
phone
,
adult_number
:
this
.
data
.
adultNum
,
adult_number
:
this
.
data
.
adultNum
+
1
,
children_number
:
this
.
data
.
childrenNum
,
children_number
:
this
.
data
.
childrenNum
+
1
,
children_age
:
this
.
data
.
childrenAge
,
children_age
:
this
.
data
.
childrenAge
,
remark
:
this
.
data
.
remark
remark
:
this
.
data
.
remark
}).
then
(
res
=>
{
}).
then
(
res
=>
{
...
...
pages/detail/enroll/index.wxml
View file @
a28f3d12
...
@@ -28,15 +28,17 @@
...
@@ -28,15 +28,17 @@
<view class='project-input margin-bottom'>
<view class='project-input margin-bottom'>
<i-cell-group>
<i-cell-group>
<i-cell title="家庭组数" is-link i-class="cell-class">
<i-cell title="家庭组数" is-link i-class="cell-class">
<input slot="footer" class='input' type='number' placeholder='请输入家庭组数' bindinput='handleFamilyNum'></input>
<picker slot="footer" class="num-picker" bindchange="bindPickerChange" range="{{nums}}" value="{{familyNum}}">
<view class='picker-text'>{{familyNum + 1}}</view>
</picker>
</i-cell>
</i-cell>
</i-cell-group>
</i-cell-group>
</view>
</view>
<view class='project-input'>
<view class='project-input'>
<i-cell-group>
<i-cell-group>
<i-cell title="姓名" i
s-link i
-class="cell-class">
<i-cell title="姓名" i-class="cell-class">
<input slot="footer" class='input' type='text' placeholder='请输入您的姓名' bindinput='handleNickname'></input>
<input slot="footer" class='input' type='text' placeholder='请输入您的姓名' bindinput='handleNickname'
value='{{nickname}}'
></input>
</i-cell>
</i-cell>
<i-cell title="手机号" i-class="cell-class">
<i-cell title="手机号" i-class="cell-class">
<block wx:if="{{phone.length == 0}}">
<block wx:if="{{phone.length == 0}}">
...
@@ -47,15 +49,19 @@
...
@@ -47,15 +49,19 @@
</block>
</block>
</i-cell>
</i-cell>
<i-cell title="成人人数" is-link i-class="cell-class">
<i-cell title="成人人数" is-link i-class="cell-class">
<input slot="footer" class='input' type='number' placeholder='请输入成人人数' bindinput='handleAdultNum'></input>
<picker slot="footer" class="num-picker" bindchange="handleAdultNum" range="{{nums}}" value="{{adultNum}}">
<view class='picker-text'>{{adultNum + 1}}</view>
</picker>
</i-cell>
</i-cell>
<i-cell title="孩子人数" is-link i-class="cell-class">
<i-cell title="孩子人数" is-link i-class="cell-class">
<input slot="footer" class='input' type='number' placeholder='请输入孩子人数' bindinput='handleChildrenNum'></input>
<picker slot="footer" class="num-picker" bindchange="handleChildrenNum" range="{{nums}}" value="{{childrenNum}}">
<view class='picker-text'>{{childrenNum + 1}}</view>
</picker>
</i-cell>
</i-cell>
<i-cell title="孩子年龄" i
s-link i
-class="cell-class">
<i-cell title="孩子年龄" i-class="cell-class">
<input slot="footer" class='input' type='text' placeholder='如5岁、八岁' bindinput='handleChildrenAge'></input>
<input slot="footer" class='input' type='text' placeholder='如5岁、八岁' bindinput='handleChildrenAge'></input>
</i-cell>
</i-cell>
<i-cell title="备注" i
s-link i
-class="cell-class">
<i-cell title="备注" i-class="cell-class">
<input slot="footer" class='input' type='text' placeholder='备注(可选)' bindinput='handleRemark'></input>
<input slot="footer" class='input' type='text' placeholder='备注(可选)' bindinput='handleRemark'></input>
</i-cell>
</i-cell>
</i-cell-group>
</i-cell-group>
...
@@ -65,7 +71,7 @@
...
@@ -65,7 +71,7 @@
<i-col span="20" offset='2' i-class="col-class">
<i-col span="20" offset='2' i-class="col-class">
<i-button bind:click="handleSubmit" type="info" shape="circle" loading="{{loading}}">
<i-button bind:click="handleSubmit" type="info" shape="circle" loading="{{loading}}">
立即支付
立即支付
<text class='margin-left-10'>¥ {{user.is_vip != 0 ? detail.vip_price
: detail.price
}}</text>
<text class='margin-left-10'>¥ {{user.is_vip != 0 ? detail.vip_price
*(familyNum+1) : detail.price*(familyNum+1)
}}</text>
</i-button>
</i-button>
</i-col>
</i-col>
</i-row>
</i-row>
...
...
pages/detail/enroll/index.wxss
View file @
a28f3d12
...
@@ -111,3 +111,7 @@ page {
...
@@ -111,3 +111,7 @@ page {
border-bottom: 1rpx solid #e9e9e9;
border-bottom: 1rpx solid #e9e9e9;
margin-left: 30rpx;
margin-left: 30rpx;
}
}
.num-picker{
width: 100px;
}
\ No newline at end of file
pages/index/index.wxml
View file @
a28f3d12
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
<navs />
<navs />
<i-cell-group i-class="section-wrapper">
<i-cell-group i-class="section-wrapper">
<i-cell title="最新活动" is-link>
<i-cell title="最新活动" is-link
i-class="text-mtitle"
>
<text slot="footer" class='text-gray text-small' catchtap='gotoMoreProjects' data-type='1' data-name='最新活动'>更多</text>
<text slot="footer" class='text-gray text-small' catchtap='gotoMoreProjects' data-type='1' data-name='最新活动'>更多</text>
</i-cell>
</i-cell>
<i-row i-class="col-wrapper">
<i-row i-class="col-wrapper">
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
</i-cell-group>
</i-cell-group>
<i-cell-group i-class="section-wrapper">
<i-cell-group i-class="section-wrapper">
<i-cell title="爆款专区" is-link>
<i-cell title="爆款专区" is-link
i-class="text-mtitle"
>
<text slot="footer" class='text-gray text-small' catchtap='gotoMoreProjects' data-type='2' data-name='爆款专区'>更多</text>
<text slot="footer" class='text-gray text-small' catchtap='gotoMoreProjects' data-type='2' data-name='爆款专区'>更多</text>
</i-cell>
</i-cell>
<i-row i-class="col-wrapper">
<i-row i-class="col-wrapper">
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
</i-cell-group>
</i-cell-group>
<i-cell-group i-class="section-wrapper">
<i-cell-group i-class="section-wrapper">
<i-cell title="酒店预订" is-link>
<i-cell title="酒店预订" is-link
i-class="text-mtitle"
>
<text slot="footer" class='text-gray text-small' catchtap='gotoSearchProjects' data-catalog='5' data-name='酒店预订'>更多</text>
<text slot="footer" class='text-gray text-small' catchtap='gotoSearchProjects' data-catalog='5' data-name='酒店预订'>更多</text>
</i-cell>
</i-cell>
<i-row i-class="col-wrapper">
<i-row i-class="col-wrapper">
...
@@ -60,7 +60,7 @@
...
@@ -60,7 +60,7 @@
</i-cell-group>
</i-cell-group>
<i-cell-group i-class="section-wrapper">
<i-cell-group i-class="section-wrapper">
<i-cell title="美行攻略" is-link url="/pages/guide/index">
<i-cell title="美行攻略" is-link url="/pages/guide/index"
i-class="text-mtitle"
>
<text slot="footer" class='text-gray text-small'>更多</text>
<text slot="footer" class='text-gray text-small'>更多</text>
</i-cell>
</i-cell>
<view class="guides-wrapper">
<view class="guides-wrapper">
...
...
pages/index/index.wxss
View file @
a28f3d12
...
@@ -96,3 +96,7 @@ page {
...
@@ -96,3 +96,7 @@ page {
-webkit-box-orient: vertical;
-webkit-box-orient: vertical;
overflow: hidden;
overflow: hidden;
}
}
.text-mtitle{
font-size: 16px;
font-weight: bolder;
}
pages/me/order/index.wxml
View file @
a28f3d12
...
@@ -13,13 +13,13 @@
...
@@ -13,13 +13,13 @@
</i-col>
</i-col>
<i-col span="20" offset='2' i-class="col-class text order-content">
<i-col span="20" offset='2' i-class="col-class text order-content">
<i-row>
<i-row>
<view catchtap="handleProjectClick" data-pid="{{item.id}}">
<view catchtap="handleProjectClick" data-pid="{{item.
p
id}}">
<i-col span="8" offset='1' i-class='order-info'>
<i-col span="8" offset='1' i-class='order-info'>
<image class='order-image' src='{{item.project.poster}}'></image>
<image class='order-image' src='{{item.project.poster}}'></image>
</i-col>
</i-col>
<i-col span="9" offset='1' i-class='order-info'>
<i-col span="9" offset='1' i-class='order-info'>
<view>{{item.title}}</view>
<view>{{item.title}}</view>
<view>¥{{item.total_fee}}
0
</view>
<view>¥{{item.total_fee}}</view>
</i-col>
</i-col>
<i-col span="2" offset='2' i-class='order-info'>
<i-col span="2" offset='2' i-class='order-info'>
<image class='order-right' src='/images/icon_right.png'></image>
<image class='order-right' src='/images/icon_right.png'></image>
...
...
project.config.json
View file @
a28f3d12
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
"list"
:
[]
"list"
:
[]
},
},
"miniprogram"
:
{
"miniprogram"
:
{
"current"
:
8
,
"current"
:
11
,
"list"
:
[
"list"
:
[
{
{
"id"
:
0
,
"id"
:
0
,
...
@@ -106,10 +106,10 @@
...
@@ -106,10 +106,10 @@
"query"
:
"id=1"
"query"
:
"id=1"
},
},
{
{
"id"
:
-
1
,
"id"
:
1
1
,
"name"
:
"预约下次"
,
"name"
:
"预约下次"
,
"pathName"
:
"pages/detail/appoint/index"
,
"pathName"
:
"pages/detail/appoint/index"
,
"query"
:
"id=
1
"
"query"
:
"id=
8
"
},
},
{
{
"id"
:
-1
,
"id"
:
-1
,
...
...
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