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
6717eeb4
Commit
6717eeb4
authored
Nov 06, 2018
by
ZhouWeiGuang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增报名地址 修复标签显示 搜索页面
parent
979a246e
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
129 additions
and
82 deletions
+129
-82
components/banners/index.js
+2
-2
components/banners/index.wxml
+1
-1
components/project-item/index.wxml
+0
-1
components/project-item/index.wxss
+6
-4
components/search-filter/index.wxml
+8
-5
components/search-filter/index.wxss
+21
-11
pages/detail/enroll/index.js
+23
-16
pages/detail/enroll/index.wxml
+3
-0
pages/detail/enroll/index.wxss
+6
-1
pages/detail/index.js
+1
-1
pages/detail/index.wxml
+2
-3
pages/index/index.wxml
+2
-2
pages/search/index.wxml
+1
-1
pages/search/index.wxss
+15
-9
pages/search/search/search.wxml
+9
-11
pages/search/search/search.wxss
+28
-13
project.config.json
+1
-1
No files found.
components/banners/index.js
View file @
6717eeb4
...
...
@@ -27,8 +27,8 @@ Component({
banners
:
[],
indicatorDots
:
true
,
autoplay
:
false
,
interval
:
50
00
,
duration
:
10
00
interval
:
25
00
,
duration
:
5
00
},
attached
()
{
...
...
components/banners/index.wxml
View file @
6717eeb4
<!--components/banners/index.wxml-->
<view class='banners-wrapper'>
<view class='banners-swipper'>
<swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" style='height:180px;'>
<swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="{{interval}}"
circular="true"
duration="{{duration}}" style='height:180px;'>
<block wx:for="{{banners}}" wx:for-item="banner" wx:key="{{banner.id}}">
<swiper-item class="banner-item">
<view data-url="{{banner.url}}" data-type="{{banner.type}}" data-oid="{{banner.oid}}" data-txt="{{banner.type_text}}" data-image="{{banner.image}}" catchtap='_tapBanner'>
...
...
components/project-item/index.wxml
View file @
6717eeb4
...
...
@@ -5,7 +5,6 @@
<text class='ptitle'>{{projectItem.title}}</text>
<view class="ptags">
<text wx-if="{{projectItem.type=='1'}}">限{{projectItem.sign_limits}}组</text>
<text wx-if="{{projectItem.type=='2'}}">可预约</text>
<text class='tags'>{{projectItem.tags}}</text>
</view>
<view class="pactivity" wx-if="{{projectItem.type=='1'}}">
...
...
components/project-item/index.wxss
View file @
6717eeb4
...
...
@@ -42,7 +42,6 @@
.prj-info .ptags .tags {
width: 75%;
margin-left: 20rpx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
...
...
@@ -98,14 +97,17 @@
white-space: nowrap;
text-overflow: ellipsis;
color: rgb(153, 153, 153);
flex: 1;
}
.prj-info .pshop .shop {
position: relative;
color: white;
padding: 0rpx 12rpx;
font-size: 24rpx;
line-height: 36rpx;
height: 36rpx;
background: #2691cd;
border-radius: 18rpx;
width: 44px;
height: 36rpx;
margin-left: 12px;
text-align: center;
}
components/search-filter/index.wxml
View file @
6717eeb4
...
...
@@ -29,7 +29,8 @@
</i-row>
<view catchtap='closeFilter' class='filter-content-wrapper' wx:if="{{filter_idx>0}}">
<view class="row-content" catchtap='preventEvent'>
<view wx:if="{{filter_idx==1}}" class='filter-row' wx:for="{{types}}" wx:for-index="idx" wx:for-item="n" wx:key="n.id">
<scroll-view class="scroll-view" scroll-y="true" style="width: 100%;height: 100%;" wx:if="{{filter_idx!=4}}">
<view wx:if="{{filter_idx==1}}" class='filter-row' wx:for="{{types}}" wx:for-index="idx" wx:for-item="n" wx:key="n.id">
<text bindtap="selectFilter" data-idx="{{n.id}}" data-name="{{n.name}}" class="{{selected.type==n.id?'seled':''}}">{{n.name}}</text>
<image wx:if="{{selected.type==n.id}}" class="f-selected" src='/images/icon_filter_selected.png'></image>
</view>
...
...
@@ -41,17 +42,18 @@
<text bindtap="selectFilter" data-idx="{{n.id}}" data-name="{{n.name}}">{{n.name}}</text>
<image wx:if="{{selected.region==n.id}}" class='f-selected' src='/images/icon_filter_selected.png'></image>
</view>
<view class="tags-wrapper" wx:if="{{filter_idx==4}}">
</scroll-view>
<view class="tags-wrapper" wx:if="{{filter_idx==4}}">
<block wx:for="{{tags}}" wx:for-index="idx" wx:for-item="n" wx:key="n.id">
<view class="tag-item {{common.inArray(selected.tags, n.id)==true?'active':''}}" bindtap="selectTags" data-idx="{{n.id}}">
{{n.name}}
</view>
</block>
<view class="tag-btn-wrapper">
</view>
<view class="tag-btn-wrapper" wx:if="{{filter_idx==4}}">
<button class="btn cancel" bindtap="cancelSelectTags">取消选择</button>
<button class="btn ensure" bindtap="ensureSelectTags">确定</button>
</view>
</view>
</view>
</view>
</view>
</view>
\ No newline at end of file
components/search-filter/index.wxss
View file @
6717eeb4
...
...
@@ -3,6 +3,7 @@
.filter-wrapper {
position: relative;
width: 100%;
z-index: 1;
}
.row-filter {
...
...
@@ -16,7 +17,6 @@
justify-content: center;
align-items: center;
}
.filter-item > image {
width: 12rpx;
height: 10rpx;
...
...
@@ -50,9 +50,8 @@
position: relative;
border-top: 1px solid #f4f4f4;
background: white;
height: 80%;
width: 100%;
padding: 34rpx 30rpx;
padding-right: 50rpx;
box-sizing: border-box;
}
...
...
@@ -87,10 +86,12 @@
.tags-wrapper {
display: flex;
flex-flow: row wrap;
justify-content: space-
between
;
justify-content: space-
around
;
align-items: center;
height: 88%;
width: 100%;
overflow: auto;
}
.tag-item {
min-width: 120rpx;
padding: 0 10rpx 0 10rpx;
...
...
@@ -104,26 +105,35 @@
margin: 10rpx;
border-radius: 2rpx;
}
.scroll-view {
height: 100%;
width: 100%;
padding: 26px;
box-sizing: border-box;
}
.tag-item.active {
color: rgb(43, 163, 215);
border: 1px solid rgb(43, 163, 215);
}
.tag-btn-wrapper {
display: block;
width: 100%;
margin-top: 30rpx;
text-align: center;
position: absolute;
bottom: 0;
height: 48px;
background-color: #f5f5f5;
display: flex;
justify-content: center;
align-items: center;
}
.tag-btn-wrapper > button.btn {
display: inline-block;
background: none;
font-size: 14px;
height: 60rpx;
border-radius: 30rpx;
line-height: 60rpx;
border-radius: 28rpx;
line-height: 58rpx;
outline-style: none;
}
...
...
pages/detail/enroll/index.js
View file @
6717eeb4
...
...
@@ -23,6 +23,7 @@ Page({
adultNum
:
0
,
childrenNum
:
0
,
childrenAge
:
0
,
address
:
''
,
remark
:
''
,
// 订单
order
:
{},
...
...
@@ -31,7 +32,7 @@ Page({
/**
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
onLoad
:
function
(
options
)
{
if
(
options
.
id
)
{
this
.
setData
({
id
:
options
.
id
...
...
@@ -42,7 +43,7 @@ Page({
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady
:
function
()
{
onReady
:
function
()
{
let
that
=
this
wx
.
showNavigationBarLoading
()
wx
.
showLoading
({
...
...
@@ -57,7 +58,7 @@ Page({
/**
* 生命周期函数--监听页面显示
*/
onShow
:
function
()
{
onShow
:
function
()
{
this
.
setData
({
user
:
app
.
globalData
.
userInfo
})
...
...
@@ -71,7 +72,7 @@ Page({
}
},
getDetailData
:
function
()
{
getDetailData
:
function
()
{
api
.
project
.
detail
({
id
:
this
.
data
.
id
}).
then
(
res
=>
{
...
...
@@ -83,7 +84,7 @@ Page({
})
},
handlePhoneAuth
:
function
(
event
)
{
handlePhoneAuth
:
function
(
event
)
{
Wx
.
login
().
then
(
res
=>
{
let
encryptedData
=
event
.
detail
.
encryptedData
let
iv
=
event
.
detail
.
iv
...
...
@@ -94,7 +95,7 @@ Page({
/**
* 解密手机号数据
*/
decodePhoneData
:
function
(
code
,
encryptedData
,
iv
)
{
decodePhoneData
:
function
(
code
,
encryptedData
,
iv
)
{
let
that
=
this
api
.
getPhoneNumber
({
code
:
code
,
...
...
@@ -119,43 +120,48 @@ Page({
},
// 家庭组数
bindPickerChange
:
function
(
event
)
{
bindPickerChange
:
function
(
event
)
{
this
.
setData
({
familyNum
:
parseInt
(
event
.
detail
.
value
)
})
},
handleNickname
:
function
(
event
)
{
handleNickname
:
function
(
event
)
{
this
.
setData
({
nickname
:
event
.
detail
.
value
})
},
handleAdultNum
:
function
(
event
)
{
handleAdultNum
:
function
(
event
)
{
this
.
setData
({
adultNum
:
parseInt
(
event
.
detail
.
value
)
})
},
handleChildrenNum
:
function
(
event
)
{
handleChildrenNum
:
function
(
event
)
{
this
.
setData
({
childrenNum
:
parseInt
(
event
.
detail
.
value
)
})
},
handleChildrenAge
:
function
(
event
)
{
handleChildrenAge
:
function
(
event
)
{
this
.
setData
({
childrenAge
:
event
.
detail
.
value
})
},
handleRemark
:
function
(
event
)
{
handleRemark
:
function
(
event
)
{
this
.
setData
({
remark
:
event
.
detail
.
value
})
},
handleAddress
:
function
(
event
)
{
this
.
setData
({
address
:
event
.
detail
.
value
})
},
handleSubmit
:
function
()
{
handleSubmit
:
function
()
{
let
that
=
this
if
(
!
this
.
data
.
nickname
||
!
this
.
data
.
phone
)
{
$Toast
({
...
...
@@ -179,7 +185,8 @@ Page({
adult_number
:
this
.
data
.
adultNum
+
1
,
children_number
:
this
.
data
.
childrenNum
+
1
,
children_age
:
this
.
data
.
childrenAge
,
remark
:
this
.
data
.
remark
remark
:
this
.
data
.
remark
,
address
:
this
.
data
.
address
}).
then
(
res
=>
{
if
(
res
.
code
)
{
$Toast
({
...
...
@@ -198,10 +205,10 @@ Page({
package
:
''
+
res
.
result
.
package
,
signType
:
''
+
res
.
result
.
signType
,
paySign
:
''
+
res
.
result
.
paySign
,
success
:
function
(
ret
)
{
success
:
function
(
ret
)
{
console
.
log
(
ret
)
if
(
ret
.
errMsg
===
'requestPayment:ok'
)
{
that
.
setOrderPaid
(
that
.
data
.
order
.
order_id
,
function
(
res
)
{
that
.
setOrderPaid
(
that
.
data
.
order
.
order_id
,
function
(
res
)
{
// 支付同步回调结果
console
.
log
(
"发送模版消息"
,
res
)
// 跳转到订单页面
...
...
pages/detail/enroll/index.wxml
View file @
6717eeb4
...
...
@@ -61,6 +61,9 @@
<i-cell title="孩子年龄" i-class="cell-class">
<input slot="footer" class='input' type='text' placeholder='如5岁、八岁' bindinput='handleChildrenAge'></input>
</i-cell>
<i-cell title="地址" i-class="cell-class">
<input slot="footer" class='input' type='text' placeholder='地址(可选)' bindinput='handleAddress'></input>
</i-cell>
<i-cell title="备注" i-class="cell-class">
<input slot="footer" class='input' type='text' placeholder='备注(可选)' bindinput='handleRemark'></input>
</i-cell>
...
...
pages/detail/enroll/index.wxss
View file @
6717eeb4
...
...
@@ -7,7 +7,12 @@ page {
.page-wrapper {
margin-bottom: 20px;
}
.icon,
.icon-map {
width: 18px;
height: 18px;
vertical-align: middle;
}
/* 报名详情 */
.project-title {
...
...
pages/detail/index.js
View file @
6717eeb4
...
...
@@ -252,10 +252,10 @@ Page({
let
that
=
this
if
(
event
.
type
==
'ok'
){
// 保存二维码
console
.
log
(
that
.
data
.
detail
.
kf_qrcode
)
wx
.
downloadFile
({
url
:
that
.
data
.
detail
.
kf_qrcode
,
success
:
function
(
res
){
console
.
log
(
res
)
if
(
res
.
statusCode
===
200
){
wx
.
saveImageToPhotosAlbum
({
filePath
:
res
.
tempFilePath
,
...
...
pages/detail/index.wxml
View file @
6717eeb4
...
...
@@ -8,7 +8,7 @@
<view class='header'>
<view class='title'>{{detail.title}}</view>
<view class='intro'>
{{detail.type=='2'?'
可预约
':'限'+detail.sign_limits+'组报名'}} 收藏{{detail.collect_num}}次
{{detail.type=='2'?'':'限'+detail.sign_limits+'组报名'}} 收藏{{detail.collect_num}}次
</view>
</view>
<i-cell-group>
...
...
@@ -76,10 +76,9 @@
</view>
</view>
<i-toast id="toast" />
<i-modal title="咨询客服" visible="{{show_kf}}" bind:ok="handleKfClose" bind:cancel="handleKfClose" ok-text="保存图片">
<view class="qrcode">
<image style='width:
150rpx;height:150
rpx;border-radius:4rpx;' src='{{detail.kf_qrcode}}'></image>
<image style='width:
236rpx;height:236
rpx;border-radius:4rpx;' src='{{detail.kf_qrcode}}'></image>
<text style='width:100%;text-align:center;height:24px;line-height:24px;font-size:24rpx;'>
保存图片后,扫码添加客服咨询
</text>
...
...
pages/index/index.wxml
View file @
6717eeb4
...
...
@@ -67,9 +67,9 @@
<view class='guide-item' wx:for="{{guides}}" wx:for-index="idx" wx:for-item="n" wx:key="n.id" data-content="{{n.type=='1'?n.id:n.content}}" data-type="{{n.type}}" catchtap='handleGuideDetail'>
<image class='image' src="{{n.poster}}" mode='aspectFill'></image>
<view class='info'>
<view class='text-small intro'>{{n.
intro ? n.intro
: ''}}</view>
<view class='text-small intro'>{{n.
title ? n.title
: ''}}</view>
<view class='text-small text-hint'>
<text
wx:for="{{n.tags}}" wx:for-index="idx" wx:key="idx" wx:for-item="t">{{t
}}</text>
<text
>{{n.intro
}}</text>
</view>
</view>
</view>
...
...
pages/search/index.wxml
View file @
6717eeb4
...
...
@@ -9,7 +9,7 @@
</view>
<view class="projects-wrapper">
<project-item wx:for="{{projects}}" wx:for-index="idx" wx:for-item="item" wx:key="n.id" project-item="{{item}}" />
<project-item wx:for="{{projects}}" wx:for-index="idx" wx:for-item="item" wx:key="n.id" project-item="{{item}}" />
</view>
<more hasMore="{{hasMore}}" loading="{{loading}}" page="{{currentPage}}" />
...
...
pages/search/index.wxss
View file @
6717eeb4
/* pages/search/index.wxss */
.page-wrapper{
.page-wrapper {
}
.search-header{
.search-header {
background: white;
padding-top: 14px;
position: relative;
z-index: 99999;
}
.search-wrapper{
.search-wrapper {
display: flex;
justify-content: flex-start;
align-items: center;
...
...
@@ -17,17 +20,19 @@
height: 40px;
padding-left: 20rpx;
}
.search-icon{
.search-icon {
width: 31rpx;
height: 31rpx;
}
.search-input{
.search-input {
font-size: 26rpx;
color: rgb(153, 153, 153);
padding-left: 20rpx;
width: 90%;
}
.projects-wrapper{
margin-top: 20rpx;
.projects-wrapper {
background: white;
}
}
\ No newline at end of file
pages/search/search/search.wxml
View file @
6717eeb4
...
...
@@ -8,20 +8,19 @@
<input class='search-input' placeholder='关键词如地名、游泳等' bindinput="inputChnage"></input>
</view>
</view>
<view class="tags-wrapper">
<text class="title">选择标签</text>
<view class="tags-list">
<block wx:for="{{tags}}" wx:for-index="idx" wx:for-item="n" wx:key="n.id">
<view class="tag-item {{common.inArray(seltags, n.id)==true?'active':''}}" bindtap="selectTags" data-idx="{{n.id}}">
{{n.name}}
</view>
</block>
<block wx:for="{{tags}}" wx:for-index="idx" wx:for-item="n" wx:key="n.id">
<view class="tag-item {{common.inArray(seltags, n.id)==true?'active':''}}" bindtap="selectTags" data-idx="{{n.id}}">
{{n.name}}
</view>
</block>
</view>
</view>
<view class='submitBtn'>
<view class='search-box'>
<view class='submitBtn'>
<i-button type="primary" bind:click="submitSearch" shape="circle">搜索</i-button>
</view></view>
</view>
</view>
\ No newline at end of file
pages/search/search/search.wxss
View file @
6717eeb4
/* pages/search/search/search.wxss */
.page-wrapper {
}
.page-wrapper {}
.search-header {
background: white;
...
...
@@ -33,27 +32,38 @@
width: 90%;
}
.search-input:-moz-placeholder, .search-input:-ms-input-placeholder,
.search-input:-moz-placeholder,
.search-input:-ms-input-placeholder,
.search-input::-webkit-input-placeholder {
color: rgb(153, 153, 153);
}
.tags-wrapper{
.tags-wrapper
{
background: white;
padding: 0 30rpx;
padding-bottom: 12px;
padding-left: 13px;
}
.tags-wrapper .title{
.tags-wrapper .title {
font-weight: bold;
font-size: 32rpx;
}
.tags-list {
margin-top: 24rpx;
width: 100%;
position: fixed;
top: 115px;
left: 0;
bottom: 66px;
right: 0;
background-color: #fff;
display: flex;
flex-flow: row wrap;
justify-content: space-between;
align-items: center;
padding-bottom: 36rpx;
justify-content: space-around;
overflow: auto;
}
.tag-item {
min-width: 120rpx;
padding: 0 10rpx 0 10rpx;
...
...
@@ -72,8 +82,12 @@
color: rgb(43, 163, 215);
border: 1px solid rgb(43, 163, 215);
}
.submitBtn{
width:80%;
margin: 40rpx auto;
.search-box {
position: absolute;
bottom: 0px;
width: 100%;
}
.search-box .submitBtn {
width: 80%;
margin: 0 auto;
}
\ No newline at end of file
project.config.json
View file @
6717eeb4
...
...
@@ -14,7 +14,7 @@
"compileType"
:
"miniprogram"
,
"libVersion"
:
"2.3.2"
,
"appid"
:
"wx1b834552a7d49bb3"
,
"projectname"
:
"
qz-tour
"
,
"projectname"
:
"
mxz
"
,
"debugOptions"
:
{
"hidedInDevtools"
:
[]
},
...
...
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