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
979a246e
Commit
979a246e
authored
Oct 30, 2018
by
ZhouWeiGuang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增预约下单显示地址和打开地图,新增首页关注关注号
parent
e810410d
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
43 additions
and
17 deletions
+43
-17
pages/detail/appoint/index.js
+18
-11
pages/detail/appoint/index.wxml
+7
-0
pages/detail/appoint/index.wxss
+5
-0
pages/detail/index.js
+2
-1
pages/detail/index.wxml
+1
-1
pages/index/index.js
+0
-1
pages/index/index.wxml
+1
-1
project.config.json
+9
-2
No files found.
pages/detail/appoint/index.js
View file @
979a246e
...
@@ -25,7 +25,7 @@ Page({
...
@@ -25,7 +25,7 @@ Page({
/**
/**
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
*/
*/
onLoad
:
function
(
options
)
{
onLoad
:
function
(
options
)
{
if
(
options
.
id
)
{
if
(
options
.
id
)
{
this
.
setData
({
this
.
setData
({
id
:
options
.
id
id
:
options
.
id
...
@@ -36,7 +36,7 @@ Page({
...
@@ -36,7 +36,7 @@ Page({
/**
/**
* 生命周期函数--监听页面初次渲染完成
* 生命周期函数--监听页面初次渲染完成
*/
*/
onReady
:
function
()
{
onReady
:
function
()
{
let
that
=
this
let
that
=
this
wx
.
showNavigationBarLoading
()
wx
.
showNavigationBarLoading
()
wx
.
showLoading
({
wx
.
showLoading
({
...
@@ -51,7 +51,7 @@ Page({
...
@@ -51,7 +51,7 @@ Page({
/**
/**
* 生命周期函数--监听页面显示
* 生命周期函数--监听页面显示
*/
*/
onShow
:
function
()
{
onShow
:
function
()
{
this
.
setData
({
this
.
setData
({
nickname
:
app
.
globalData
.
userInfo
.
nickname
nickname
:
app
.
globalData
.
userInfo
.
nickname
})
})
...
@@ -62,19 +62,26 @@ Page({
...
@@ -62,19 +62,26 @@ Page({
}
}
},
},
getDetailData
:
function
()
{
getDetailData
:
function
()
{
api
.
project
.
detail
({
api
.
project
.
detail
({
id
:
this
.
data
.
id
id
:
this
.
data
.
id
}).
then
(
res
=>
{
}).
then
(
res
=>
{
if
(
!
res
.
code
)
{
if
(
!
res
.
code
)
{
console
.
log
(
res
.
data
)
this
.
setData
({
this
.
setData
({
detail
:
res
.
data
detail
:
res
.
data
})
})
}
}
})
})
},
},
// 打开位置
handlePhoneAuth
:
function
(
event
)
{
handleMap
:
function
()
{
wx
.
openLocation
({
latitude
:
parseFloat
(
this
.
data
.
detail
.
latitude
),
longitude
:
parseFloat
(
this
.
data
.
detail
.
longitude
),
})
},
handlePhoneAuth
:
function
(
event
)
{
Wx
.
login
().
then
(
res
=>
{
Wx
.
login
().
then
(
res
=>
{
let
encryptedData
=
event
.
detail
.
encryptedData
let
encryptedData
=
event
.
detail
.
encryptedData
let
iv
=
event
.
detail
.
iv
let
iv
=
event
.
detail
.
iv
...
@@ -85,7 +92,7 @@ Page({
...
@@ -85,7 +92,7 @@ Page({
/**
/**
* 解密手机号数据
* 解密手机号数据
*/
*/
decodePhoneData
:
function
(
code
,
encryptedData
,
iv
)
{
decodePhoneData
:
function
(
code
,
encryptedData
,
iv
)
{
let
that
=
this
let
that
=
this
api
.
getPhoneNumber
({
api
.
getPhoneNumber
({
code
:
code
,
code
:
code
,
...
@@ -109,24 +116,24 @@ Page({
...
@@ -109,24 +116,24 @@ Page({
})
})
},
},
handleNickname
:
function
(
event
)
{
handleNickname
:
function
(
event
)
{
this
.
setData
({
this
.
setData
({
nickname
:
event
.
detail
.
value
nickname
:
event
.
detail
.
value
})
})
},
},
handleDateChange
:
function
(
e
)
{
handleDateChange
:
function
(
e
)
{
this
.
setData
({
this
.
setData
({
date
:
e
.
detail
.
value
date
:
e
.
detail
.
value
})
})
},
},
handleRemark
:
function
(
event
)
{
handleRemark
:
function
(
event
)
{
this
.
setData
({
this
.
setData
({
remark
:
event
.
detail
.
value
remark
:
event
.
detail
.
value
})
})
},
},
handleSubmit
:
function
()
{
handleSubmit
:
function
()
{
if
(
!
this
.
data
.
nickname
||
!
this
.
data
.
phone
||
!
this
.
data
.
date
)
{
if
(
!
this
.
data
.
nickname
||
!
this
.
data
.
phone
||
!
this
.
data
.
date
)
{
$Toast
({
$Toast
({
content
:
'请完善必要信息'
,
content
:
'请完善必要信息'
,
...
...
pages/detail/appoint/index.wxml
View file @
979a246e
...
@@ -46,6 +46,13 @@
...
@@ -46,6 +46,13 @@
<i-cell title="备注" 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>
<image slot="icon" src='/images/icon_location.png' mode='scaleToFill' class='icon'></image>
<view catchtap='handleMap'>{{detail.location}}</view>
<view slot="footer">
<image src='/images/icon_map.png' class='icon-map' catchtap='handleMap'></image>
</view>
</i-cell>
</i-cell-group>
</i-cell-group>
</view>
</view>
...
...
pages/detail/appoint/index.wxss
View file @
979a246e
...
@@ -7,6 +7,11 @@ page {
...
@@ -7,6 +7,11 @@ page {
.page-wrapper {
.page-wrapper {
margin-bottom: 20px;
margin-bottom: 20px;
}
}
.icon, .icon-map {
width: 18px;
height: 18px;
vertical-align:middle;
}
/* 报名详情 */
/* 报名详情 */
...
...
pages/detail/index.js
View file @
979a246e
...
@@ -130,7 +130,7 @@ Page({
...
@@ -130,7 +130,7 @@ Page({
detail
:
res
.
data
detail
:
res
.
data
})
})
var
that
=
this
;
var
that
=
this
;
WxParse
.
wxParse
(
'description'
,
'html'
,
res
.
data
.
description
,
that
);
WxParse
.
wxParse
(
'description'
,
'html'
,
res
.
data
.
description
,
that
,
5
);
}
}
})
})
},
},
...
@@ -252,6 +252,7 @@ Page({
...
@@ -252,6 +252,7 @@ Page({
let
that
=
this
let
that
=
this
if
(
event
.
type
==
'ok'
){
if
(
event
.
type
==
'ok'
){
// 保存二维码
// 保存二维码
console
.
log
(
that
.
data
.
detail
.
kf_qrcode
)
wx
.
downloadFile
({
wx
.
downloadFile
({
url
:
that
.
data
.
detail
.
kf_qrcode
,
url
:
that
.
data
.
detail
.
kf_qrcode
,
success
:
function
(
res
){
success
:
function
(
res
){
...
...
pages/detail/index.wxml
View file @
979a246e
...
@@ -72,7 +72,7 @@
...
@@ -72,7 +72,7 @@
</button>
</button>
</view>
</view>
<view wx-if="{{detail.type=='1'}}" class="actions-section btn-wrapper {{detail.status==1?'btn-overdate':''}} {{detail.status==2?'btn-soldout':''}}" catchtap='enrollClick'>{{detail.status_text}}</view>
<view wx-if="{{detail.type=='1'}}" class="actions-section btn-wrapper {{detail.status==1?'btn-overdate':''}} {{detail.status==2?'btn-soldout':''}}" catchtap='enrollClick'>{{detail.status_text}}</view>
<view wx-if="{{detail.type=='2'}}" class='actions-section btn-wrapper' catchtap='kfClick'>咨询客服
下单
</view>
<view wx-if="{{detail.type=='2'}}" class='actions-section btn-wrapper' catchtap='kfClick'>咨询客服</view>
</view>
</view>
</view>
</view>
<i-toast id="toast" />
<i-toast id="toast" />
...
...
pages/index/index.js
View file @
979a246e
...
@@ -71,7 +71,6 @@ Page({
...
@@ -71,7 +71,6 @@ Page({
onReachBottom
:
function
()
{
onReachBottom
:
function
()
{
},
},
/**
/**
* 用户点击右上角分享
* 用户点击右上角分享
*/
*/
...
...
pages/index/index.wxml
View file @
979a246e
...
@@ -3,8 +3,8 @@
...
@@ -3,8 +3,8 @@
<view class='v-page'>
<view class='v-page'>
<banner banners="{{banners}}" />
<banner banners="{{banners}}" />
<official-account binderror="official"></official-account>
<navs />
<navs />
<i-cell-group i-class="section-wrapper">
<i-cell-group i-class="section-wrapper">
<i-cell title="最新活动" is-link i-class="text-mtitle">
<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>
...
...
project.config.json
View file @
979a246e
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
"ignore"
:
[]
"ignore"
:
[]
},
},
"setting"
:
{
"setting"
:
{
"urlCheck"
:
fals
e
,
"urlCheck"
:
tru
e
,
"es6"
:
true
,
"es6"
:
true
,
"postcss"
:
true
,
"postcss"
:
true
,
"minified"
:
true
,
"minified"
:
true
,
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
"nodeModules"
:
false
"nodeModules"
:
false
},
},
"compileType"
:
"miniprogram"
,
"compileType"
:
"miniprogram"
,
"libVersion"
:
"2.3.
0
"
,
"libVersion"
:
"2.3.
2
"
,
"appid"
:
"wx1b834552a7d49bb3"
,
"appid"
:
"wx1b834552a7d49bb3"
,
"projectname"
:
"qz-tour"
,
"projectname"
:
"qz-tour"
,
"debugOptions"
:
{
"debugOptions"
:
{
...
@@ -116,6 +116,13 @@
...
@@ -116,6 +116,13 @@
"name"
:
"我的订单"
,
"name"
:
"我的订单"
,
"pathName"
:
"pages/me/order/index"
,
"pathName"
:
"pages/me/order/index"
,
"query"
:
""
"query"
:
""
},
{
"id"
:
13
,
"name"
:
"关注关注号"
,
"pathName"
:
"pages/index/index"
,
"query"
:
""
,
"scene"
:
"1047"
}
}
]
]
}
}
...
...
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