Commit 979a246e by ZhouWeiGuang

新增预约下单显示地址和打开地图,新增首页关注关注号

parent e810410d
......@@ -25,7 +25,7 @@ Page({
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
onLoad: function (options) {
if (options.id) {
this.setData({
id: options.id
......@@ -36,7 +36,7 @@ Page({
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function() {
onReady: function () {
let that = this
wx.showNavigationBarLoading()
wx.showLoading({
......@@ -51,7 +51,7 @@ Page({
/**
* 生命周期函数--监听页面显示
*/
onShow: function() {
onShow: function () {
this.setData({
nickname: app.globalData.userInfo.nickname
})
......@@ -62,19 +62,26 @@ Page({
}
},
getDetailData: function() {
getDetailData: function () {
api.project.detail({
id: this.data.id
}).then(res => {
if (!res.code) {
console.log(res.data)
this.setData({
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 => {
let encryptedData = event.detail.encryptedData
let iv = event.detail.iv
......@@ -85,7 +92,7 @@ Page({
/**
* 解密手机号数据
*/
decodePhoneData: function(code, encryptedData, iv) {
decodePhoneData: function (code, encryptedData, iv) {
let that = this
api.getPhoneNumber({
code: code,
......@@ -109,24 +116,24 @@ Page({
})
},
handleNickname: function(event) {
handleNickname: function (event) {
this.setData({
nickname: event.detail.value
})
},
handleDateChange: function(e) {
handleDateChange: function (e) {
this.setData({
date: e.detail.value
})
},
handleRemark: function(event) {
handleRemark: function (event) {
this.setData({
remark: event.detail.value
})
},
handleSubmit: function() {
handleSubmit: function () {
if (!this.data.nickname || !this.data.phone || !this.data.date) {
$Toast({
content: '请完善必要信息',
......
......@@ -46,6 +46,13 @@
<i-cell title="备注" i-class="cell-class">
<input slot="footer" class='input' type='text' placeholder='备注(可选)' bindinput='handleRemark'></input>
</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>
</view>
......
......@@ -7,6 +7,11 @@ page {
.page-wrapper {
margin-bottom: 20px;
}
.icon, .icon-map {
width: 18px;
height: 18px;
vertical-align:middle;
}
/* 报名详情 */
......
......@@ -130,7 +130,7 @@ Page({
detail: res.data
})
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({
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){
......
......@@ -72,7 +72,7 @@
</button>
</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>
<i-toast id="toast" />
......
......@@ -71,7 +71,6 @@ Page({
onReachBottom: function() {
},
/**
* 用户点击右上角分享
*/
......
......@@ -3,8 +3,8 @@
<view class='v-page'>
<banner banners="{{banners}}" />
<official-account binderror="official"></official-account>
<navs />
<i-cell-group i-class="section-wrapper">
<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>
......
......@@ -4,7 +4,7 @@
"ignore": []
},
"setting": {
"urlCheck": false,
"urlCheck": true,
"es6": true,
"postcss": true,
"minified": true,
......@@ -12,7 +12,7 @@
"nodeModules": false
},
"compileType": "miniprogram",
"libVersion": "2.3.0",
"libVersion": "2.3.2",
"appid": "wx1b834552a7d49bb3",
"projectname": "qz-tour",
"debugOptions": {
......@@ -116,6 +116,13 @@
"name": "我的订单",
"pathName": "pages/me/order/index",
"query": ""
},
{
"id": 13,
"name": "关注关注号",
"pathName": "pages/index/index",
"query": "",
"scene": "1047"
}
]
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment